@deephaven/grid 0.51.0 → 0.51.1-alpha-theme-fix.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ColumnHeaderGroup.d.ts +1 -1
- package/dist/ColumnHeaderGroup.d.ts.map +1 -1
- package/dist/ColumnHeaderGroup.js.map +1 -1
- package/dist/DataBarGridModel.d.ts +1 -1
- package/dist/DataBarGridModel.d.ts.map +1 -1
- package/dist/DataBarGridModel.js.map +1 -1
- package/dist/EditableGridModel.d.ts +6 -6
- package/dist/EditableGridModel.d.ts.map +1 -1
- package/dist/EditableGridModel.js.map +1 -1
- package/dist/ExpandableGridModel.d.ts +6 -6
- package/dist/ExpandableGridModel.d.ts.map +1 -1
- package/dist/ExpandableGridModel.js.map +1 -1
- package/dist/MockGridModel.d.ts +2 -2
- package/dist/MockGridModel.d.ts.map +1 -1
- package/dist/MockGridModel.js.map +1 -1
- package/dist/TokenBoxCellRenderer.d.ts +1 -1
- package/dist/TokenBoxCellRenderer.d.ts.map +1 -1
- package/dist/TokenBoxCellRenderer.js.map +1 -1
- package/package.json +3 -3
|
@@ -4,6 +4,6 @@ export interface IColumnHeaderGroup {
|
|
|
4
4
|
name: string;
|
|
5
5
|
depth: number;
|
|
6
6
|
color?: string;
|
|
7
|
-
getVisibleRange(movedColumns: readonly MoveOperation[])
|
|
7
|
+
getVisibleRange: (movedColumns: readonly MoveOperation[]) => BoundedAxisRange;
|
|
8
8
|
}
|
|
9
9
|
//# sourceMappingURL=ColumnHeaderGroup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnHeaderGroup.d.ts","sourceRoot":"","sources":["../src/ColumnHeaderGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,YAAY,EAAE,SAAS,aAAa,EAAE,
|
|
1
|
+
{"version":3,"file":"ColumnHeaderGroup.d.ts","sourceRoot":"","sources":["../src/ColumnHeaderGroup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,CAAC,YAAY,EAAE,SAAS,aAAa,EAAE,KAAK,gBAAgB,CAAC;CAC/E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ColumnHeaderGroup.js","names":[],"sources":["../src/ColumnHeaderGroup.ts"],"sourcesContent":["import { MoveOperation } from './GridMetrics';\nimport { BoundedAxisRange } from './GridAxisRange';\n\nexport interface IColumnHeaderGroup {\n name: string;\n depth: number;\n color?: string;\n getVisibleRange(movedColumns: readonly MoveOperation[])
|
|
1
|
+
{"version":3,"file":"ColumnHeaderGroup.js","names":[],"sources":["../src/ColumnHeaderGroup.ts"],"sourcesContent":["import { MoveOperation } from './GridMetrics';\nimport { BoundedAxisRange } from './GridAxisRange';\n\nexport interface IColumnHeaderGroup {\n name: string;\n depth: number;\n color?: string;\n getVisibleRange: (movedColumns: readonly MoveOperation[]) => BoundedAxisRange;\n}\n"],"mappings":""}
|
|
@@ -43,6 +43,6 @@ export interface DataBarOptions {
|
|
|
43
43
|
}
|
|
44
44
|
export declare function isDataBarGridModel(model: GridModel): model is DataBarGridModel;
|
|
45
45
|
export interface DataBarGridModel extends GridModel {
|
|
46
|
-
dataBarOptionsForCell(column: ModelIndex, row: ModelIndex, theme: GridThemeType)
|
|
46
|
+
dataBarOptionsForCell: (column: ModelIndex, row: ModelIndex, theme: GridThemeType) => DataBarOptions;
|
|
47
47
|
}
|
|
48
48
|
//# sourceMappingURL=DataBarGridModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBarGridModel.d.ts","sourceRoot":"","sources":["../src/DataBarGridModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,GAAG,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,MAAM,MAAM,MAAM,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AACtD,MAAM,MAAM,UAAU,GAAG,cAAc,GAAG,QAAQ,GAAG,aAAa,CAAC;AACnE,MAAM,MAAM,oBAAoB,GAAG,QAAQ,GAAG,SAAS,GAAG,MAAM,CAAC;AACjE,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,CAAC;AAC5C,2DAA2D;AAC3D,MAAM,MAAM,aAAa,GAAG,GAAG,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC;AACxD;;;GAGG;AACH,MAAM,MAAM,QAAQ,GAAG,GAAG,CAAC,UAAU,EAAE,SAAS,GAAG,SAAS,EAAE,CAAC,CAAC;AAChE,sEAAsE;AACtE,MAAM,MAAM,iBAAiB,GAAG,GAAG,CAAC,UAAU,EAAE,oBAAoB,CAAC,CAAC;AACtE,uDAAuD;AACvD,MAAM,MAAM,UAAU,GAAG,GAAG,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC;AACjD,yDAAyD;AACzD,MAAM,MAAM,YAAY,GAAG,GAAG,CAAC,UAAU,EAAE,eAAe,CAAC,CAAC;AAC5D,8DAA8D;AAC9D,MAAM,MAAM,gBAAgB,GAAG,GAAG,CAAC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rC,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,SAAS,EAAE,eAAe,CAAC;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,gBAAgB,CAE3B;AAED,MAAM,WAAW,gBAAiB,SAAQ,SAAS;IACjD,qBAAqB,EAAE,CACrB,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,aAAa,KACjB,cAAc,CAAC;CACrB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataBarGridModel.js","names":["isDataBarGridModel","model","dataBarOptionsForCell","undefined"],"sources":["../src/DataBarGridModel.ts"],"sourcesContent":["import { GridThemeType } from '.';\nimport { ModelIndex } from './GridMetrics';\nimport GridModel from './GridModel';\nimport { GridColor } from './GridTheme';\n\nexport type Marker = { value: number; color: string };\nexport type AxisOption = 'proportional' | 'middle' | 'directional';\nexport type ValuePlacementOption = 'beside' | 'overlap' | 'hide';\nexport type DirectionOption = 'LTR' | 'RTL';\n/** Map from ModelIndex to the axis option of the column */\nexport type ColumnAxisMap = Map<ModelIndex, AxisOption>;\n/** Map from ModelIndex to a color or an array of colors\n * If given an array, then the bar will be a gradient\n * The colors should be given left to right (e.g. it should be like ['yellow', 'green'] for positive color and ['red', 'yellow'] for negative color)\n */\nexport type ColorMap = Map<ModelIndex, GridColor | GridColor[]>;\n/** Map from ModelIndex to the value placement option of the column */\nexport type ValuePlacementMap = Map<ModelIndex, ValuePlacementOption>;\n/** Map from ModelIndex to the opacity of the column */\nexport type OpacityMap = Map<ModelIndex, number>;\n/** Map from ModelIndex to the direction of the column */\nexport type DirectionMap = Map<ModelIndex, DirectionOption>;\n/** Map from ModelIndex to the text alignment of the column */\nexport type TextAlignmentMap = Map<ModelIndex, CanvasTextAlign>;\n/** Map from column to the columns its markers are from */\nexport type MarkerMap = Map<ModelIndex, Marker[]>;\n/** Map from column to whether the bar has a gradient */\nexport type GradientMap = Map<ModelIndex, boolean>;\n// Map from ModelIndex to the minimum number in the column\nexport type MinMap = Map<ModelIndex, number>;\n// Map from ModelIndex to the maximum number in the column\nexport type MaxMap = Map<ModelIndex, number>;\n\nexport interface DataBarOptions {\n columnMin: number;\n columnMax: number;\n axis: AxisOption;\n color: GridColor | GridColor[];\n valuePlacement: ValuePlacementOption;\n opacity: number;\n markers: Marker[];\n direction: DirectionOption;\n value: number;\n}\n\nexport function isDataBarGridModel(\n model: GridModel\n): model is DataBarGridModel {\n return (model as DataBarGridModel)?.dataBarOptionsForCell !== undefined;\n}\n\nexport interface DataBarGridModel extends GridModel {\n dataBarOptionsForCell(\n column: ModelIndex,\n row: ModelIndex,\n theme: GridThemeType\n )
|
|
1
|
+
{"version":3,"file":"DataBarGridModel.js","names":["isDataBarGridModel","model","dataBarOptionsForCell","undefined"],"sources":["../src/DataBarGridModel.ts"],"sourcesContent":["import { GridThemeType } from '.';\nimport { ModelIndex } from './GridMetrics';\nimport GridModel from './GridModel';\nimport { GridColor } from './GridTheme';\n\nexport type Marker = { value: number; color: string };\nexport type AxisOption = 'proportional' | 'middle' | 'directional';\nexport type ValuePlacementOption = 'beside' | 'overlap' | 'hide';\nexport type DirectionOption = 'LTR' | 'RTL';\n/** Map from ModelIndex to the axis option of the column */\nexport type ColumnAxisMap = Map<ModelIndex, AxisOption>;\n/** Map from ModelIndex to a color or an array of colors\n * If given an array, then the bar will be a gradient\n * The colors should be given left to right (e.g. it should be like ['yellow', 'green'] for positive color and ['red', 'yellow'] for negative color)\n */\nexport type ColorMap = Map<ModelIndex, GridColor | GridColor[]>;\n/** Map from ModelIndex to the value placement option of the column */\nexport type ValuePlacementMap = Map<ModelIndex, ValuePlacementOption>;\n/** Map from ModelIndex to the opacity of the column */\nexport type OpacityMap = Map<ModelIndex, number>;\n/** Map from ModelIndex to the direction of the column */\nexport type DirectionMap = Map<ModelIndex, DirectionOption>;\n/** Map from ModelIndex to the text alignment of the column */\nexport type TextAlignmentMap = Map<ModelIndex, CanvasTextAlign>;\n/** Map from column to the columns its markers are from */\nexport type MarkerMap = Map<ModelIndex, Marker[]>;\n/** Map from column to whether the bar has a gradient */\nexport type GradientMap = Map<ModelIndex, boolean>;\n// Map from ModelIndex to the minimum number in the column\nexport type MinMap = Map<ModelIndex, number>;\n// Map from ModelIndex to the maximum number in the column\nexport type MaxMap = Map<ModelIndex, number>;\n\nexport interface DataBarOptions {\n columnMin: number;\n columnMax: number;\n axis: AxisOption;\n color: GridColor | GridColor[];\n valuePlacement: ValuePlacementOption;\n opacity: number;\n markers: Marker[];\n direction: DirectionOption;\n value: number;\n}\n\nexport function isDataBarGridModel(\n model: GridModel\n): model is DataBarGridModel {\n return (model as DataBarGridModel)?.dataBarOptionsForCell !== undefined;\n}\n\nexport interface DataBarGridModel extends GridModel {\n dataBarOptionsForCell: (\n column: ModelIndex,\n row: ModelIndex,\n theme: GridThemeType\n ) => DataBarOptions;\n}\n"],"mappings":"AASA;;AAEA;AACA;AACA;AACA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAEA;;AAeA,OAAO,SAASA,kBAAkBA,CAChCC,KAAgB,EACW;EAC3B,OAAO,CAACA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAuBC,qBAAqB,MAAKC,SAAS;AACzE"}
|
|
@@ -28,14 +28,14 @@ export interface EditableGridModel extends GridModel {
|
|
|
28
28
|
* @param range The range to check if it is editable
|
|
29
29
|
* @returns True if the range is editable
|
|
30
30
|
*/
|
|
31
|
-
isEditableRange(range: GridRange)
|
|
31
|
+
isEditableRange: (range: GridRange) => boolean;
|
|
32
32
|
/**
|
|
33
33
|
* Get the edit text for a cell as a string
|
|
34
34
|
* @param column Column to get
|
|
35
35
|
* @param row Row to get
|
|
36
36
|
* @returns The value to use for editing
|
|
37
37
|
*/
|
|
38
|
-
editValueForCell(column: ModelIndex, row: ModelIndex)
|
|
38
|
+
editValueForCell: (column: ModelIndex, row: ModelIndex) => string;
|
|
39
39
|
/**
|
|
40
40
|
* Set value in an editable table
|
|
41
41
|
* @param column Column to set
|
|
@@ -43,20 +43,20 @@ export interface EditableGridModel extends GridModel {
|
|
|
43
43
|
* @param value The value to set
|
|
44
44
|
* @returns A promise that resolves successfully when the operation is complete, or rejects if there's an error
|
|
45
45
|
*/
|
|
46
|
-
setValueForCell(column: ModelIndex, row: ModelIndex, value: string)
|
|
46
|
+
setValueForCell: (column: ModelIndex, row: ModelIndex, value: string) => Promise<void>;
|
|
47
47
|
/**
|
|
48
48
|
* Set value in an editable table
|
|
49
49
|
* @param ranges The ranges to set
|
|
50
50
|
* @param value The value to set
|
|
51
51
|
* @returns A promise that resolves successfully when the operation is complete, or rejects if there's an error
|
|
52
52
|
*/
|
|
53
|
-
setValueForRanges(ranges: readonly GridRange[], value: string)
|
|
53
|
+
setValueForRanges: (ranges: readonly GridRange[], value: string) => Promise<void>;
|
|
54
54
|
/**
|
|
55
55
|
* Apply edits to the model
|
|
56
56
|
* @param edits Edits to apply to the model
|
|
57
57
|
* @returns A promise that resolves successfully when the operation is complete or rejects if there's an error
|
|
58
58
|
*/
|
|
59
|
-
setValues(edits: readonly EditOperation[])
|
|
59
|
+
setValues: (edits: readonly EditOperation[]) => Promise<void>;
|
|
60
60
|
/**
|
|
61
61
|
* Check if a text value is a valid edit for a cell
|
|
62
62
|
* @param column Column to check
|
|
@@ -64,7 +64,7 @@ export interface EditableGridModel extends GridModel {
|
|
|
64
64
|
* @param value Value to check if it's a valid value or not
|
|
65
65
|
* @returns True if it's a valid value, false otherwise
|
|
66
66
|
*/
|
|
67
|
-
isValidForCell(column: ModelIndex, row: ModelIndex, value: string)
|
|
67
|
+
isValidForCell: (column: ModelIndex, row: ModelIndex, value: string) => boolean;
|
|
68
68
|
}
|
|
69
69
|
export default EditableGridModel;
|
|
70
70
|
//# sourceMappingURL=EditableGridModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableGridModel.d.ts","sourceRoot":"","sources":["../src/EditableGridModel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,iBAAiB,CAE5B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,KAAK,IAAI,iBAAiB,CAMpC;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,kCAAkC;IAClC,MAAM,EAAE,UAAU,CAAC;IAEnB,+BAA+B;IAC/B,GAAG,EAAE,UAAU,CAAC;IAEhB,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IAEb,uCAAuC;IACvC,CAAC,CAAC,EAAE,UAAU,CAAC;IACf,oCAAoC;IACpC,CAAC,CAAC,EAAE,UAAU,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,eAAe,CAAC,KAAK,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"EditableGridModel.d.ts","sourceRoot":"","sources":["../src/EditableGridModel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,wBAAgB,mBAAmB,CACjC,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,iBAAiB,CAE5B;AAED,wBAAgB,yBAAyB,CACvC,KAAK,EAAE,SAAS,GACf,OAAO,CAAC,KAAK,IAAI,iBAAiB,CAMpC;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG;IAC1B,kCAAkC;IAClC,MAAM,EAAE,UAAU,CAAC;IAEnB,+BAA+B;IAC/B,GAAG,EAAE,UAAU,CAAC;IAEhB,wBAAwB;IACxB,IAAI,EAAE,MAAM,CAAC;IAEb,uCAAuC;IACvC,CAAC,CAAC,EAAE,UAAU,CAAC;IACf,oCAAoC;IACpC,CAAC,CAAC,EAAE,UAAU,CAAC;CAChB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAClD,UAAU,EAAE,OAAO,CAAC;IAEpB;;;;OAIG;IACH,eAAe,EAAE,CAAC,KAAK,EAAE,SAAS,KAAK,OAAO,CAAC;IAE/C;;;;;OAKG;IACH,gBAAgB,EAAE,CAAC,MAAM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,KAAK,MAAM,CAAC;IAElE;;;;;;OAMG;IACH,eAAe,EAAE,CACf,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnB;;;;;OAKG;IACH,iBAAiB,EAAE,CACjB,MAAM,EAAE,SAAS,SAAS,EAAE,EAC5B,KAAK,EAAE,MAAM,KACV,OAAO,CAAC,IAAI,CAAC,CAAC;IAEnB;;;;OAIG;IACH,SAAS,EAAE,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,cAAc,EAAE,CACd,MAAM,EAAE,UAAU,EAClB,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,MAAM,KACV,OAAO,CAAC;CACd;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EditableGridModel.js","names":["AssertionError","isEditableGridModel","model","isEditable","undefined","assertIsEditableGridModel","concat"],"sources":["../src/EditableGridModel.ts"],"sourcesContent":["import GridRange from './GridRange';\nimport { ModelIndex } from './GridMetrics';\nimport GridModel from './GridModel';\nimport { AssertionError } from './errors';\n\nexport function isEditableGridModel(\n model: GridModel\n): model is EditableGridModel {\n return (model as EditableGridModel)?.isEditable !== undefined;\n}\n\nexport function assertIsEditableGridModel(\n model: GridModel\n): asserts model is EditableGridModel {\n if (!isEditableGridModel(model)) {\n throw new AssertionError(\n `Expected 'model' to be editable, but received ${model}`\n );\n }\n}\n\n/**\n * Edit operation when applying multiple edits\n */\nexport type EditOperation = {\n /** Column to set the value for */\n column: ModelIndex;\n\n /** Row to set the value for */\n row: ModelIndex;\n\n /** Text value to set */\n text: string;\n\n /** @deprecated use `column` instead */\n x?: ModelIndex;\n /** @deprecated use `row` instead */\n y?: ModelIndex;\n};\n\n/**\n * Model for an editable grid\n */\nexport interface EditableGridModel extends GridModel {\n isEditable: boolean;\n\n /**\n * Check if a given range is editable\n * @param range The range to check if it is editable\n * @returns True if the range is editable\n */\n isEditableRange(range: GridRange)
|
|
1
|
+
{"version":3,"file":"EditableGridModel.js","names":["AssertionError","isEditableGridModel","model","isEditable","undefined","assertIsEditableGridModel","concat"],"sources":["../src/EditableGridModel.ts"],"sourcesContent":["import GridRange from './GridRange';\nimport { ModelIndex } from './GridMetrics';\nimport GridModel from './GridModel';\nimport { AssertionError } from './errors';\n\nexport function isEditableGridModel(\n model: GridModel\n): model is EditableGridModel {\n return (model as EditableGridModel)?.isEditable !== undefined;\n}\n\nexport function assertIsEditableGridModel(\n model: GridModel\n): asserts model is EditableGridModel {\n if (!isEditableGridModel(model)) {\n throw new AssertionError(\n `Expected 'model' to be editable, but received ${model}`\n );\n }\n}\n\n/**\n * Edit operation when applying multiple edits\n */\nexport type EditOperation = {\n /** Column to set the value for */\n column: ModelIndex;\n\n /** Row to set the value for */\n row: ModelIndex;\n\n /** Text value to set */\n text: string;\n\n /** @deprecated use `column` instead */\n x?: ModelIndex;\n /** @deprecated use `row` instead */\n y?: ModelIndex;\n};\n\n/**\n * Model for an editable grid\n */\nexport interface EditableGridModel extends GridModel {\n isEditable: boolean;\n\n /**\n * Check if a given range is editable\n * @param range The range to check if it is editable\n * @returns True if the range is editable\n */\n isEditableRange: (range: GridRange) => boolean;\n\n /**\n * Get the edit text for a cell as a string\n * @param column Column to get\n * @param row Row to get\n * @returns The value to use for editing\n */\n editValueForCell: (column: ModelIndex, row: ModelIndex) => string;\n\n /**\n * Set value in an editable table\n * @param column Column to set\n * @param row Row to set\n * @param value The value to set\n * @returns A promise that resolves successfully when the operation is complete, or rejects if there's an error\n */\n setValueForCell: (\n column: ModelIndex,\n row: ModelIndex,\n value: string\n ) => Promise<void>;\n\n /**\n * Set value in an editable table\n * @param ranges The ranges to set\n * @param value The value to set\n * @returns A promise that resolves successfully when the operation is complete, or rejects if there's an error\n */\n setValueForRanges: (\n ranges: readonly GridRange[],\n value: string\n ) => Promise<void>;\n\n /**\n * Apply edits to the model\n * @param edits Edits to apply to the model\n * @returns A promise that resolves successfully when the operation is complete or rejects if there's an error\n */\n setValues: (edits: readonly EditOperation[]) => Promise<void>;\n\n /**\n * Check if a text value is a valid edit for a cell\n * @param column Column to check\n * @param row Row to check\n * @param value Value to check if it's a valid value or not\n * @returns True if it's a valid value, false otherwise\n */\n isValidForCell: (\n column: ModelIndex,\n row: ModelIndex,\n value: string\n ) => boolean;\n}\n\nexport default EditableGridModel;\n"],"mappings":"SAGSA,cAAc;AAEvB,OAAO,SAASC,mBAAmBA,CACjCC,KAAgB,EACY;EAC5B,OAAO,CAACA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAAwBC,UAAU,MAAKC,SAAS;AAC/D;AAEA,OAAO,SAASC,yBAAyBA,CACvCH,KAAgB,EACoB;EACpC,IAAI,CAACD,mBAAmB,CAACC,KAAK,CAAC,EAAE;IAC/B,MAAM,IAAIF,cAAc,kDAAAM,MAAA,CAC2BJ,KAAK,CACxD,CAAC;EACH;AACF;;AAEA;AACA;AACA;;AAiBA;AACA;AACA"}
|
|
@@ -13,33 +13,33 @@ export interface ExpandableGridModel extends GridModel {
|
|
|
13
13
|
* @param row Row to check
|
|
14
14
|
* @returns True if the row is expandable
|
|
15
15
|
*/
|
|
16
|
-
isRowExpandable(row: ModelIndex)
|
|
16
|
+
isRowExpandable: (row: ModelIndex) => boolean;
|
|
17
17
|
/**
|
|
18
18
|
* @param row Row to check
|
|
19
19
|
* @returns True if the row is currently expanded
|
|
20
20
|
*/
|
|
21
|
-
isRowExpanded(row: ModelIndex)
|
|
21
|
+
isRowExpanded: (row: ModelIndex) => boolean;
|
|
22
22
|
/**
|
|
23
23
|
* Change the expanded status of an expandable row
|
|
24
24
|
* @param row Row to expand
|
|
25
25
|
* @param isExpanded True to expand the row, false to collapse
|
|
26
26
|
* @param expandDescendants True to expand nested rows, false otherwise
|
|
27
27
|
*/
|
|
28
|
-
setRowExpanded(row: ModelIndex, isExpanded: boolean, expandDescendants?: boolean)
|
|
28
|
+
setRowExpanded: (row: ModelIndex, isExpanded: boolean, expandDescendants?: boolean) => void;
|
|
29
29
|
/**
|
|
30
30
|
* Expand all rows
|
|
31
31
|
*/
|
|
32
|
-
expandAll()
|
|
32
|
+
expandAll: () => void;
|
|
33
33
|
/**
|
|
34
34
|
* Collapse all rows
|
|
35
35
|
*/
|
|
36
|
-
collapseAll()
|
|
36
|
+
collapseAll: () => void;
|
|
37
37
|
/**
|
|
38
38
|
* Get the depth of a row (ie. How indented the row should be)
|
|
39
39
|
* @param row Row to check
|
|
40
40
|
* @returns Depth of the row
|
|
41
41
|
*/
|
|
42
|
-
depthForRow(row: ModelIndex)
|
|
42
|
+
depthForRow: (row: ModelIndex) => number;
|
|
43
43
|
}
|
|
44
44
|
export default ExpandableGridModel;
|
|
45
45
|
//# sourceMappingURL=ExpandableGridModel.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableGridModel.d.ts","sourceRoot":"","sources":["../src/ExpandableGridModel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,mBAAmB,CAE9B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,qDAAqD;IACrD,iBAAiB,EAAE,OAAO,CAAC;IAE3B,sCAAsC;IACtC,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,eAAe,CAAC,GAAG,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"ExpandableGridModel.d.ts","sourceRoot":"","sources":["../src/ExpandableGridModel.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,wBAAgB,qBAAqB,CACnC,KAAK,EAAE,SAAS,GACf,KAAK,IAAI,mBAAmB,CAE9B;AAED;;GAEG;AACH,MAAM,WAAW,mBAAoB,SAAQ,SAAS;IACpD,qDAAqD;IACrD,iBAAiB,EAAE,OAAO,CAAC;IAE3B,sCAAsC;IACtC,oBAAoB,EAAE,OAAO,CAAC;IAE9B;;;OAGG;IACH,eAAe,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC;IAE9C;;;OAGG;IACH,aAAa,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,OAAO,CAAC;IAE5C;;;;;OAKG;IACH,cAAc,EAAE,CACd,GAAG,EAAE,UAAU,EACf,UAAU,EAAE,OAAO,EACnB,iBAAiB,CAAC,EAAE,OAAO,KACxB,IAAI,CAAC;IAEV;;OAEG;IACH,SAAS,EAAE,MAAM,IAAI,CAAC;IAEtB;;OAEG;IACH,WAAW,EAAE,MAAM,IAAI,CAAC;IAExB;;;;OAIG;IACH,WAAW,EAAE,CAAC,GAAG,EAAE,UAAU,KAAK,MAAM,CAAC;CAC1C;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpandableGridModel.js","names":["isExpandableGridModel","model","hasExpandableRows","undefined"],"sources":["../src/ExpandableGridModel.ts"],"sourcesContent":["import GridModel from './GridModel';\nimport { ModelIndex } from './GridMetrics';\n\nexport function isExpandableGridModel(\n model: GridModel\n): model is ExpandableGridModel {\n return (model as ExpandableGridModel)?.hasExpandableRows !== undefined;\n}\n\n/**\n * Expandable grid model. Allows for a grid with rows that can expand (e.g. A Tree Table)\n */\nexport interface ExpandableGridModel extends GridModel {\n /** Whether the grid has rows that can be expanded */\n hasExpandableRows: boolean;\n\n /** Whether the grid can expand all */\n isExpandAllAvailable: boolean;\n\n /**\n * @param row Row to check\n * @returns True if the row is expandable\n */\n isRowExpandable(row: ModelIndex)
|
|
1
|
+
{"version":3,"file":"ExpandableGridModel.js","names":["isExpandableGridModel","model","hasExpandableRows","undefined"],"sources":["../src/ExpandableGridModel.ts"],"sourcesContent":["import GridModel from './GridModel';\nimport { ModelIndex } from './GridMetrics';\n\nexport function isExpandableGridModel(\n model: GridModel\n): model is ExpandableGridModel {\n return (model as ExpandableGridModel)?.hasExpandableRows !== undefined;\n}\n\n/**\n * Expandable grid model. Allows for a grid with rows that can expand (e.g. A Tree Table)\n */\nexport interface ExpandableGridModel extends GridModel {\n /** Whether the grid has rows that can be expanded */\n hasExpandableRows: boolean;\n\n /** Whether the grid can expand all */\n isExpandAllAvailable: boolean;\n\n /**\n * @param row Row to check\n * @returns True if the row is expandable\n */\n isRowExpandable: (row: ModelIndex) => boolean;\n\n /**\n * @param row Row to check\n * @returns True if the row is currently expanded\n */\n isRowExpanded: (row: ModelIndex) => boolean;\n\n /**\n * Change the expanded status of an expandable row\n * @param row Row to expand\n * @param isExpanded True to expand the row, false to collapse\n * @param expandDescendants True to expand nested rows, false otherwise\n */\n setRowExpanded: (\n row: ModelIndex,\n isExpanded: boolean,\n expandDescendants?: boolean\n ) => void;\n\n /**\n * Expand all rows\n */\n expandAll: () => void;\n\n /**\n * Collapse all rows\n */\n collapseAll: () => void;\n\n /**\n * Get the depth of a row (ie. How indented the row should be)\n * @param row Row to check\n * @returns Depth of the row\n */\n depthForRow: (row: ModelIndex) => number;\n}\n\nexport default ExpandableGridModel;\n"],"mappings":"AAGA,OAAO,SAASA,qBAAqBA,CACnCC,KAAgB,EACc;EAC9B,OAAO,CAACA,KAAK,aAALA,KAAK,uBAALA,KAAK,CAA0BC,iBAAiB,MAAKC,SAAS;AACxE;;AAEA;AACA;AACA"}
|
package/dist/MockGridModel.d.ts
CHANGED
|
@@ -38,8 +38,8 @@ declare class MockGridModel extends GridModel implements EditableGridModel {
|
|
|
38
38
|
textForRowHeader(row: ModelIndex): string;
|
|
39
39
|
textForRowFooter(row: ModelIndex): string;
|
|
40
40
|
setValueForCell(column: ModelIndex, row: ModelIndex, value: string): Promise<void>;
|
|
41
|
-
setValueForRanges(ranges: GridRange[], text: string): Promise<void>;
|
|
42
|
-
setValues(edits: EditOperation[]): Promise<void>;
|
|
41
|
+
setValueForRanges(ranges: readonly GridRange[], text: string): Promise<void>;
|
|
42
|
+
setValues(edits: readonly EditOperation[]): Promise<void>;
|
|
43
43
|
editValueForCell(column: ModelIndex, row: ModelIndex): string;
|
|
44
44
|
isValidForCell(column: ModelIndex, row: ModelIndex, value: string): boolean;
|
|
45
45
|
isEditableRange(range: GridRange): boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockGridModel.d.ts","sourceRoot":"","sources":["../src/MockGridModel.ts"],"names":[],"mappings":"AAEA,OAAO,iBAAiB,EAAE,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,SAAS,MAAM,aAAa,CAAC;AACpC,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAEnD;;GAEG;AACH,cAAM,aAAc,SAAQ,SAAU,YAAW,iBAAiB;IAChE,SAAS,CAAC,OAAO,EA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AM,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAI3E,eAAe,CAAC,KAAK,EAAE,SAAS,GAAG,OAAO;IAI1C,MAAM,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAG3C;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MockGridModel.js","names":["GridModel","GridRange","MockGridModel","constructor","rowCount","columnCount","floatingTopRowCount","floatingBottomRowCount","floatingLeftColumnCount","floatingRightColumnCount","isEditable","editedData","arguments","length","undefined","_defineProperty","numRows","numColumns","floatingTop","floatingBottom","floatingLeft","floatingRight","editable","textForCell","column","row","_this$editedData$colu","_this$editedData$colu2","concat","colorForCell","theme","textColor","textForColumnHeader","depth","textForRowHeader","textForRowFooter","setValueForCell","value","_this","_asyncToGenerator","setValueForRanges","ranges","text","_this2","forEachCell","x","y","setValues","edits","_this3","i","_edit$column","_edit$row","edit","editValueForCell","isValidForCell","isEditableRange","range","delete","Error"],"sources":["../src/MockGridModel.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\nimport EditableGridModel, { EditOperation } from './EditableGridModel';\nimport { ModelIndex } from './GridMetrics';\nimport GridModel from './GridModel';\nimport GridRange from './GridRange';\nimport { GridColor, GridTheme } from './GridTheme';\n\n/**\n * Mock model implementing GridModel for testing out grid functionality\n */\nclass MockGridModel extends GridModel implements EditableGridModel {\n protected numRows: number;\n\n protected numColumns: number;\n\n protected floatingTop: number;\n\n protected floatingBottom: number;\n\n protected floatingLeft: number;\n\n protected floatingRight: number;\n\n protected editable: boolean;\n\n protected editedData: string[][];\n\n constructor({\n rowCount = 1000000000,\n columnCount = 100,\n floatingTopRowCount = 0,\n floatingBottomRowCount = 0,\n floatingLeftColumnCount = 0,\n floatingRightColumnCount = 0,\n isEditable = false,\n editedData = [],\n }: {\n rowCount?: number;\n columnCount?: number;\n floatingTopRowCount?: number;\n floatingBottomRowCount?: number;\n floatingLeftColumnCount?: number;\n floatingRightColumnCount?: number;\n isEditable?: boolean;\n editedData?: string[][];\n } = {}) {\n super();\n\n this.numRows = rowCount;\n this.numColumns = columnCount;\n this.floatingTop = floatingTopRowCount;\n this.floatingBottom = floatingBottomRowCount;\n this.floatingLeft = floatingLeftColumnCount;\n this.floatingRight = floatingRightColumnCount;\n this.editable = isEditable;\n this.editedData = editedData;\n }\n\n get rowCount(): number {\n return this.numRows;\n }\n\n get columnCount(): number {\n return this.numColumns;\n }\n\n get floatingTopRowCount(): number {\n return this.floatingTop;\n }\n\n get floatingBottomRowCount(): number {\n return this.floatingBottom;\n }\n\n get floatingLeftColumnCount(): number {\n return this.floatingLeft;\n }\n\n get floatingRightColumnCount(): number {\n return this.floatingRight;\n }\n\n get isEditable(): boolean {\n return this.editable;\n }\n\n textForCell(column: ModelIndex, row: ModelIndex): string {\n return this.editedData[column]?.[row] ?? `${column},${row}`;\n }\n\n colorForCell(\n column: ModelIndex,\n row: ModelIndex,\n theme: GridTheme\n ): GridColor {\n return theme.textColor;\n }\n\n textForColumnHeader(column: ModelIndex, depth = 0): string {\n return `${column}`;\n }\n\n textForRowHeader(row: ModelIndex): string {\n return `${row}`;\n }\n\n textForRowFooter(row: ModelIndex): string {\n return `${row}`;\n }\n\n async setValueForCell(\n column: ModelIndex,\n row: ModelIndex,\n value: string\n ): Promise<void> {\n if (this.editedData[column] == null) {\n this.editedData[column] = [];\n }\n this.editedData[column][row] = `${value}`;\n }\n\n async setValueForRanges(ranges: GridRange[]
|
|
1
|
+
{"version":3,"file":"MockGridModel.js","names":["GridModel","GridRange","MockGridModel","constructor","rowCount","columnCount","floatingTopRowCount","floatingBottomRowCount","floatingLeftColumnCount","floatingRightColumnCount","isEditable","editedData","arguments","length","undefined","_defineProperty","numRows","numColumns","floatingTop","floatingBottom","floatingLeft","floatingRight","editable","textForCell","column","row","_this$editedData$colu","_this$editedData$colu2","concat","colorForCell","theme","textColor","textForColumnHeader","depth","textForRowHeader","textForRowFooter","setValueForCell","value","_this","_asyncToGenerator","setValueForRanges","ranges","text","_this2","forEachCell","x","y","setValues","edits","_this3","i","_edit$column","_edit$row","edit","editValueForCell","isValidForCell","isEditableRange","range","delete","Error"],"sources":["../src/MockGridModel.ts"],"sourcesContent":["/* eslint class-methods-use-this: \"off\" */\n/* eslint no-unused-vars: \"off\" */\nimport EditableGridModel, { EditOperation } from './EditableGridModel';\nimport { ModelIndex } from './GridMetrics';\nimport GridModel from './GridModel';\nimport GridRange from './GridRange';\nimport { GridColor, GridTheme } from './GridTheme';\n\n/**\n * Mock model implementing GridModel for testing out grid functionality\n */\nclass MockGridModel extends GridModel implements EditableGridModel {\n protected numRows: number;\n\n protected numColumns: number;\n\n protected floatingTop: number;\n\n protected floatingBottom: number;\n\n protected floatingLeft: number;\n\n protected floatingRight: number;\n\n protected editable: boolean;\n\n protected editedData: string[][];\n\n constructor({\n rowCount = 1000000000,\n columnCount = 100,\n floatingTopRowCount = 0,\n floatingBottomRowCount = 0,\n floatingLeftColumnCount = 0,\n floatingRightColumnCount = 0,\n isEditable = false,\n editedData = [],\n }: {\n rowCount?: number;\n columnCount?: number;\n floatingTopRowCount?: number;\n floatingBottomRowCount?: number;\n floatingLeftColumnCount?: number;\n floatingRightColumnCount?: number;\n isEditable?: boolean;\n editedData?: string[][];\n } = {}) {\n super();\n\n this.numRows = rowCount;\n this.numColumns = columnCount;\n this.floatingTop = floatingTopRowCount;\n this.floatingBottom = floatingBottomRowCount;\n this.floatingLeft = floatingLeftColumnCount;\n this.floatingRight = floatingRightColumnCount;\n this.editable = isEditable;\n this.editedData = editedData;\n }\n\n get rowCount(): number {\n return this.numRows;\n }\n\n get columnCount(): number {\n return this.numColumns;\n }\n\n get floatingTopRowCount(): number {\n return this.floatingTop;\n }\n\n get floatingBottomRowCount(): number {\n return this.floatingBottom;\n }\n\n get floatingLeftColumnCount(): number {\n return this.floatingLeft;\n }\n\n get floatingRightColumnCount(): number {\n return this.floatingRight;\n }\n\n get isEditable(): boolean {\n return this.editable;\n }\n\n textForCell(column: ModelIndex, row: ModelIndex): string {\n return this.editedData[column]?.[row] ?? `${column},${row}`;\n }\n\n colorForCell(\n column: ModelIndex,\n row: ModelIndex,\n theme: GridTheme\n ): GridColor {\n return theme.textColor;\n }\n\n textForColumnHeader(column: ModelIndex, depth = 0): string {\n return `${column}`;\n }\n\n textForRowHeader(row: ModelIndex): string {\n return `${row}`;\n }\n\n textForRowFooter(row: ModelIndex): string {\n return `${row}`;\n }\n\n async setValueForCell(\n column: ModelIndex,\n row: ModelIndex,\n value: string\n ): Promise<void> {\n if (this.editedData[column] == null) {\n this.editedData[column] = [];\n }\n this.editedData[column][row] = `${value}`;\n }\n\n async setValueForRanges(\n ranges: readonly GridRange[],\n text: string\n ): Promise<void> {\n GridRange.forEachCell(ranges, (x, y) => {\n this.setValueForCell(x, y, text);\n });\n }\n\n async setValues(edits: readonly EditOperation[]): Promise<void> {\n for (let i = 0; i < edits.length; i += 1) {\n const edit = edits[i];\n this.setValueForCell(\n edit.column ?? edit.x,\n edit.row ?? edit.y,\n edit.text\n );\n }\n }\n\n editValueForCell(column: ModelIndex, row: ModelIndex): string {\n return this.textForCell(column, row);\n }\n\n isValidForCell(column: ModelIndex, row: ModelIndex, value: string): boolean {\n return true;\n }\n\n isEditableRange(range: GridRange): boolean {\n return this.isEditable;\n }\n\n delete(ranges: GridRange[]): Promise<void> {\n throw new Error('Method not implemented.');\n }\n}\n\nexport default MockGridModel;\n"],"mappings":";;;;;AAAA;AACA;AAAA,OAGOA,SAAS;AAAA,OACTC,SAAS;AAGhB;AACA;AACA;AACA,MAAMC,aAAa,SAASF,SAAS,CAA8B;EAiBjEG,WAAWA,CAAA,EAkBH;IAAA,IAlBI;MACVC,QAAQ,GAAG,UAAU;MACrBC,WAAW,GAAG,GAAG;MACjBC,mBAAmB,GAAG,CAAC;MACvBC,sBAAsB,GAAG,CAAC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,CAAC;IAAC;EACL;EAEMK,SAASA,CAACC,KAA+B,EAAiB;IAAA,IAAAC,MAAA;IAAA,OAAAV,iBAAA;MAC9D,KAAK,IAAIW,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,KAAK,CAACnC,MAAM,EAAEqC,CAAC,IAAI,CAAC,EAAE;QAAA,IAAAC,YAAA,EAAAC,SAAA;QACxC,IAAMC,IAAI,GAAGL,KAAK,CAACE,CAAC,CAAC;QACrBD,MAAI,CAACb,eAAe,EAAAe,YAAA,GAClBE,IAAI,CAAC7B,MAAM,cAAA2B,YAAA,cAAAA,YAAA,GAAIE,IAAI,CAACR,CAAC,GAAAO,SAAA,GACrBC,IAAI,CAAC5B,GAAG,cAAA2B,SAAA,cAAAA,SAAA,GAAIC,IAAI,CAACP,CAAC,EAClBO,IAAI,CAACX,IACP,CAAC;MACH;IAAC;EACH;EAEAY,gBAAgBA,CAAC9B,MAAkB,EAAEC,GAAe,EAAU;IAC5D,OAAO,IAAI,CAACF,WAAW,CAACC,MAAM,EAAEC,GAAG,CAAC;EACtC;EAEA8B,cAAcA,CAAC/B,MAAkB,EAAEC,GAAe,EAAEY,KAAa,EAAW;IAC1E,OAAO,IAAI;EACb;EAEAmB,eAAeA,CAACC,KAAgB,EAAW;IACzC,OAAO,IAAI,CAAC/C,UAAU;EACxB;EAEAgD,MAAMA,CAACjB,MAAmB,EAAiB;IACzC,MAAM,IAAIkB,KAAK,CAAC,yBAAyB,CAAC;EAC5C;AACF;AAEA,eAAezD,aAAa"}
|
|
@@ -4,7 +4,7 @@ import { GridRenderState } from './GridRendererTypes';
|
|
|
4
4
|
import { TokenBox } from './GridUtils';
|
|
5
5
|
export declare function isTokenBoxCellRenderer(cellRenderer: CellRenderer): cellRenderer is TokenBoxCellRenderer;
|
|
6
6
|
interface TokenBoxCellRenderer extends CellRenderer {
|
|
7
|
-
getTokenBoxesForVisibleCell(column: VisibleIndex, row: VisibleIndex, state: GridRenderState)
|
|
7
|
+
getTokenBoxesForVisibleCell: (column: VisibleIndex, row: VisibleIndex, state: GridRenderState) => TokenBox[];
|
|
8
8
|
}
|
|
9
9
|
export default TokenBoxCellRenderer;
|
|
10
10
|
//# sourceMappingURL=TokenBoxCellRenderer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenBoxCellRenderer.d.ts","sourceRoot":"","sources":["../src/TokenBoxCellRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,YAAY,GACzB,YAAY,IAAI,oBAAoB,CAKtC;AAED,UAAU,oBAAqB,SAAQ,YAAY;IACjD,2BAA2B,
|
|
1
|
+
{"version":3,"file":"TokenBoxCellRenderer.d.ts","sourceRoot":"","sources":["../src/TokenBoxCellRenderer.ts"],"names":[],"mappings":"AAAA,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,wBAAgB,sBAAsB,CACpC,YAAY,EAAE,YAAY,GACzB,YAAY,IAAI,oBAAoB,CAKtC;AAED,UAAU,oBAAqB,SAAQ,YAAY;IACjD,2BAA2B,EAAE,CAC3B,MAAM,EAAE,YAAY,EACpB,GAAG,EAAE,YAAY,EACjB,KAAK,EAAE,eAAe,KACnB,QAAQ,EAAE,CAAC;CACjB;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TokenBoxCellRenderer.js","names":["isTokenBoxCellRenderer","cellRenderer","getTokenBoxesForVisibleCell","undefined"],"sources":["../src/TokenBoxCellRenderer.ts"],"sourcesContent":["import CellRenderer from './CellRenderer';\nimport { VisibleIndex } from './GridMetrics';\nimport { GridRenderState } from './GridRendererTypes';\nimport { TokenBox } from './GridUtils';\n\nexport function isTokenBoxCellRenderer(\n cellRenderer: CellRenderer\n): cellRenderer is TokenBoxCellRenderer {\n return (\n (cellRenderer as TokenBoxCellRenderer)?.getTokenBoxesForVisibleCell !==\n undefined\n );\n}\n\ninterface TokenBoxCellRenderer extends CellRenderer {\n getTokenBoxesForVisibleCell(\n column: VisibleIndex,\n row: VisibleIndex,\n state: GridRenderState\n )
|
|
1
|
+
{"version":3,"file":"TokenBoxCellRenderer.js","names":["isTokenBoxCellRenderer","cellRenderer","getTokenBoxesForVisibleCell","undefined"],"sources":["../src/TokenBoxCellRenderer.ts"],"sourcesContent":["import CellRenderer from './CellRenderer';\nimport { VisibleIndex } from './GridMetrics';\nimport { GridRenderState } from './GridRendererTypes';\nimport { TokenBox } from './GridUtils';\n\nexport function isTokenBoxCellRenderer(\n cellRenderer: CellRenderer\n): cellRenderer is TokenBoxCellRenderer {\n return (\n (cellRenderer as TokenBoxCellRenderer)?.getTokenBoxesForVisibleCell !==\n undefined\n );\n}\n\ninterface TokenBoxCellRenderer extends CellRenderer {\n getTokenBoxesForVisibleCell: (\n column: VisibleIndex,\n row: VisibleIndex,\n state: GridRenderState\n ) => TokenBox[];\n}\n\nexport default TokenBoxCellRenderer;\n"],"mappings":"AAKA,OAAO,SAASA,sBAAsBA,CACpCC,YAA0B,EACY;EACtC,OACE,CAACA,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAA2BC,2BAA2B,MACnEC,SAAS;AAEb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deephaven/grid",
|
|
3
|
-
"version": "0.51.
|
|
3
|
+
"version": "0.51.1-alpha-theme-fix.3+884ed451",
|
|
4
4
|
"description": "Deephaven React grid component",
|
|
5
5
|
"author": "Deephaven Data Labs LLC",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"*.css"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@deephaven/utils": "^0.51.
|
|
34
|
+
"@deephaven/utils": "^0.51.1-alpha-theme-fix.3+884ed451",
|
|
35
35
|
"classnames": "^2.3.1",
|
|
36
36
|
"color-convert": "^2.0.1",
|
|
37
37
|
"event-target-shim": "^6.0.2",
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"publishConfig": {
|
|
45
45
|
"access": "public"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "884ed45197794b2d5c6c001b12af97d6c92cbcf5"
|
|
48
48
|
}
|