1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00

Move IBlock to block.ts

This commit is contained in:
Chen-I Lim 2020-10-20 18:58:48 -07:00
parent fb438ac52c
commit 27f8e77033
16 changed files with 29 additions and 41 deletions

View File

@ -2,7 +2,7 @@
// See LICENSE.txt for license information.
import {BoardTree} from './viewModel/boardTree'
import mutator from './mutator'
import {IBlock} from './octoTypes'
import {IBlock} from './blocks/block'
import {Utils} from './utils'
interface Archive {

View File

@ -1,8 +1,21 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {IBlock} from '../octoTypes'
import {Utils} from '../utils'
interface IBlock {
readonly id: string
readonly parentId: string
readonly schema: number
readonly type: string
readonly title?: string
readonly fields: Readonly<Record<string, any>>
readonly createAt: number
readonly updateAt: number
readonly deleteAt: number
}
interface IMutableBlock extends IBlock {
id: string
parentId: string
@ -60,4 +73,4 @@ class MutableBlock implements IMutableBlock {
}
}
export {IMutableBlock, MutableBlock}
export {IBlock, IMutableBlock, MutableBlock}

View File

@ -1,6 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import { IBlock } from '../octoTypes'
import { IBlock } from '../blocks/block'
import {MutableBlock} from './block'
type PropertyType = 'text' | 'number' | 'select' | 'multiSelect' | 'date' | 'person' | 'file' | 'checkbox' | 'url' | 'email' | 'phone' | 'createdTime' | 'createdBy' | 'updatedTime' | 'updatedBy'

View File

@ -1,6 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import { IBlock } from '../octoTypes'
import { IBlock } from '../blocks/block'
import {FilterGroup} from '../filterGroup'
import {MutableBlock} from './block'

View File

@ -1,6 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import {IBlock} from '../octoTypes'
import {IBlock} from '../blocks/block'
import {MutableBlock} from './block'

View File

@ -1,6 +1,6 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import { IBlock } from '../octoTypes'
import { IBlock } from '../blocks/block'
import {MutableBlock} from './block'
interface CommentBlock extends IBlock {

View File

@ -1,4 +1,4 @@
import { IBlock } from "../octoTypes"
import { IBlock } from "../blocks/block"
import { MutableBlock } from "./block"
interface IOrderedBlock extends IBlock {

View File

@ -10,7 +10,7 @@ import { CardTree, MutableCardTree } from '../viewModel/cardTree'
import { Menu as OldMenu, MenuOption } from '../menu'
import mutator from '../mutator'
import { OctoListener } from '../octoListener'
import { IBlock } from '../octoTypes'
import { IBlock } from '../blocks/block'
import { OctoUtils } from '../octoUtils'
import { PropertyMenu } from '../propertyMenu'
import { Utils } from '../utils'

View File

@ -9,7 +9,7 @@ import {IOrderedBlock, MutableOrderedBlock} from './blocks/orderedBlock'
import {BoardTree} from './viewModel/boardTree'
import {FilterGroup} from './filterGroup'
import octoClient from './octoClient'
import {IBlock} from './octoTypes'
import {IBlock} from './blocks/block'
import undoManager from './undomanager'
import {Utils} from './utils'

View File

@ -1,7 +1,7 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import { IMutableBlock } from './blocks/block'
import {IBlock} from './octoTypes'
import {IBlock} from './blocks/block'
import {Utils} from './utils'
//

View File

@ -1,25 +0,0 @@
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
interface IBlock {
readonly id: string
readonly parentId: string
readonly schema: number
readonly type: string
readonly title?: string
readonly fields: Readonly<Record<string, any>>
readonly createAt: number
readonly updateAt: number
readonly deleteAt: number
}
// These are methods exposed by the top-level page to components
interface IPageController {
showBoard(boardId: string): void
showView(viewId: string): void
showFilter(anchorElement?: HTMLElement): void
setSearchText(text?: string): void
}
export {IBlock, IPageController}

View File

@ -14,7 +14,7 @@ import {BoardTree} from './viewModel/boardTree'
import {Editable} from './components/editable'
import {Menu} from './menu'
import mutator from './mutator'
import {IBlock} from './octoTypes'
import {IBlock} from './blocks/block'
import {Utils} from './utils'
class OctoUtils {

View File

@ -5,7 +5,7 @@ import { Archiver } from '../archiver'
import { MutableBoard } from '../blocks/board'
import Button from '../components/button'
import octoClient from '../octoClient'
import { IBlock } from '../octoTypes'
import { IBlock } from '../blocks/block'
import { Utils } from '../utils'

View File

@ -5,7 +5,7 @@ import {BoardView, MutableBoardView} from '../blocks/boardView'
import {Card} from '../blocks/card'
import {CardFilter} from '../cardFilter'
import octoClient from '../octoClient'
import {IBlock} from '../octoTypes'
import {IBlock} from '../blocks/block'
import {OctoUtils} from '../octoUtils'
import {Utils} from '../utils'

View File

@ -3,7 +3,7 @@
import {Card} from '../blocks/card'
import { IOrderedBlock } from '../blocks/orderedBlock'
import octoClient from '../octoClient'
import {IBlock} from '../octoTypes'
import {IBlock} from '../blocks/block'
import {OctoUtils} from '../octoUtils'
interface CardTree {

View File

@ -2,7 +2,7 @@
// See LICENSE.txt for license information.
import {Board} from '../blocks/board'
import octoClient from '../octoClient'
import { IBlock } from '../octoTypes'
import {IBlock} from '../blocks/block'
import {OctoUtils} from '../octoUtils'
interface WorkspaceTree {