Skip to main content

SpreadsheetView

Note: this document is automatically generated from mobx-state-tree objects in our source code. See Core concepts and intro to pluggable elements for more info

Source file

plugins/spreadsheet-view/src/SpreadsheetView/models/SpreadsheetView.ts

SpreadsheetView - Properties

property: type

// type signature
ISimpleType<"SpreadsheetView">
// code
type: types.literal('SpreadsheetView')

property: offsetPx

// type signature
number
// code
offsetPx: 0

property: height

// type signature
IOptionalIType<ISimpleType<number>, [undefined]>
// code
height: types.optional(
types.refinement(
'SpreadsheetViewHeight',
types.number,
n => n >= minHeight,
),
defaultHeight,
)

property: hideVerticalResizeHandle

// type signature
false
// code
hideVerticalResizeHandle: false

property: hideFilterControls

// type signature
false
// code
hideFilterControls: false

property: filterControls

// type signature
IOptionalIType<IModelType<{ rowFullText: IOptionalIType<IModelType<{ type: ISimpleType<"RowFullText">; stringToFind: IType<string, string, string>; }, { readonly predicate: (_sheet: unknown, row: { cellsWithDerived: { text: string; }[]; }) => boolean; } & { ...; }, _NotCustomized, _NotCustomized>, [...]>; columnFilt...
// code
filterControls: types.optional(FilterControlsModel, () =>
FilterControlsModel.create({}),
)

property: mode

switch specifying whether we are showing the import wizard or the spreadsheet in our viewing area

// type signature
IOptionalIType<ISimpleType<string>, [undefined]>
// code
mode: types.optional(
types.enumeration('SpreadsheetViewMode', ['import', 'display']),
'import',
)

property: importWizard

// type signature
IOptionalIType<IModelType<{ fileType: IOptionalIType<ISimpleType<string>, [undefined]>; hasColumnNameLine: IType<boolean, boolean, boolean>; columnNameLineNumber: IType<...>; selectedAssemblyName: IMaybe<...>; }, { ...; } & ... 1 more ... & { ...; }, _NotCustomized, _NotCustomized>, [...]>
// code
importWizard: types.optional(ImportWizardModel, () =>
ImportWizardModel.create(),
)

property: spreadsheet

// type signature
IMaybe<IModelType<{ rowSet: IOptionalIType<IModelType<{ isLoaded: ISimpleType<true>; rows: IArrayType<IModelType<{ id: ISimpleType<string>; cells: IArrayType<IModelType<{ text: ISimpleType<string>; extendedData: IMaybe<IType<any, any, any>>; }, {}, _NotCustomized, _NotCustomized>>; extendedData: IMaybe<...>; isSelec...
// code
spreadsheet: types.maybe(SpreadsheetModel)

SpreadsheetView - Getters

getter: readyToDisplay

// type
boolean

getter: hideRowSelection

// type
boolean

getter: outputRows

// type
any

getter: assembly

// type
{ [x: string]: any; } & NonEmptyObject & { setSubschema(slotName: string, data: unknown): any; } & IStateTreeNode<AnyConfigurationSchemaType>

SpreadsheetView - Methods

method: menuItems

// type signature
menuItems: () => { label: string; onClick: () => void; icon: OverridableComponent<SvgIconTypeMap<{}, "svg">> & { muiName: string; }; }[]

SpreadsheetView - Actions

action: setRowMenuItems

// type signature
setRowMenuItems: (newItems: MenuItem[]) => void

action: setWidth

// type signature
setWidth: (newWidth: number) => number

action: setHeight

// type signature
setHeight: (newHeight: number) => number

action: resizeHeight

// type signature
resizeHeight: (distance: number) => number

action: resizeWidth

// type signature
resizeWidth: (distance: number) => number

action: displaySpreadsheet

load a new spreadsheet and set our mode to display it

// type signature
displaySpreadsheet: (spreadsheet: ModelCreationType<ExtractCFromProps<{ rowSet: IOptionalIType<IModelType<{ isLoaded: ISimpleType<true>; rows: IArrayType<IModelType<{ id: ISimpleType<string>; cells: IArrayType<IModelType<{ text: ISimpleType<string>; extendedData: IMaybe<...>; }, {}, _NotCustomized, _NotCustomized>>; extendedData: IMayb...

action: setImportMode

// type signature
setImportMode: () => void

action: setDisplayMode

// type signature
setDisplayMode: () => void

action: closeView

// type signature
closeView: () => void