@omegagrid/grid-core 0.11.1 → 0.11.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/constants.d.ts.map +1 -1
- package/dist/constants.js +1 -0
- package/dist/constants.js.map +1 -1
- package/dist/model/calculationModel.d.ts.map +1 -1
- package/dist/model/calculationModel.js +39 -1
- package/dist/model/calculationModel.js.map +1 -1
- package/dist/model/cellModel.d.ts +2 -0
- package/dist/model/cellModel.d.ts.map +1 -1
- package/dist/model/cellModel.js.map +1 -1
- package/dist/model/options.d.ts +2 -0
- package/dist/model/options.d.ts.map +1 -1
- package/dist/model/options.js.map +1 -1
- package/package.json +3 -3
package/dist/constants.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAehD,eAAO,MAAM,sBAAsB,EAI9B,aAAa,CAAC;AAEnB,eAAO,MAAM,oBAAoB,EAG5B,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAehD,eAAO,MAAM,sBAAsB,EAI9B,aAAa,CAAC;AAEnB,eAAO,MAAM,oBAAoB,EAG5B,WAAW,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwFjB,wBAqBC"}
|
package/dist/constants.js
CHANGED
package/dist/constants.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,yBAAyB,GAAG;IACjC,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,CAAC;KACT;IACD,MAAM,EAAE;QACP,KAAK,EAAE,QAAQ;KACf;CACmB,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,IAAI;CACH,CAAC;AAEnB,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,KAAK;CACA,CAAC;AAEjB,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,MAAM,eAAe,GAAY;IAChC,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,CAAC;IACd,OAAO,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC;IACxB,UAAU,EAAE,EAAC,OAAO,EAAE,IAAI,EAAC;IAC3B,UAAU,EAAE,IAAI;IAChB,gBAAgB,EAAE,IAAI;IACtB,SAAS,EAAE,CAAC;IACZ,QAAQ,EAAE,EAAE;IACZ,SAAS,EAAE,UAAU;IACrB,SAAS,EAAE,IAAI;IACf,WAAW,EAAE,GAAG;IAChB,YAAY,EAAE,IAAI;IAClB,cAAc,EAAE,CAAC;IACjB,UAAU,EAAE,CAAC;IACb,WAAW,EAAE,CAAC;IACd,YAAY,EAAE,CAAC;IACf,iBAAiB,EAA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KAAK,EAAE,IAAI;KACX;CACD,CAAC;AAEF,eAAe;IACd,UAAU,EAAE,UAAU;IACtB,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,IAAI,EAAE,QAAQ;IAC/B,oBAAoB,EAAE,EAAE;IACxB,oBAAoB,EAAE,IAAI;IAC1B,qBAAqB,EAAE,CAAC;IACxB,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,mBAAmB,EAAE,GAAG;IACxB,gBAAgB,EAAE,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,yBAAyB,EAAE,yBAAyB;IACpD,eAAe,EAAE,eAAe;IAChC,sBAAsB,EAAE,GAAG;IAC3B,sBAAsB,EAAE,EAAE;IAC1B,GAAG,aAAa;CAChB,CAAA","sourcesContent":["import { constants as coreConstants } from '@omegagrid/core';\nimport { Options, FilterOptions, TreeOptions } from './model';\nimport { SparklineOptions } from './sparklines';\n\nconst DEFAULT_SPARKLINE_OPTIONS = {\n\tminValue: 'auto',\n\tmaxValue: 'auto',\n\ttype: 'line',\n\tstyle: {\n\t\tcolor: '0094FF',\n\t\tweight: 1\n\t},\n\tmarker: {\n\t\tcolor: 'ff0000'\n\t}\n} as SparklineOptions;\n\nexport const DEFAULT_FILTER_OPTIONS = {\n\tenabled: false,\n\tincludeChildren: true,\n\tincludeParents: true\n} as FilterOptions;\n\nexport const DEFAULT_TREE_OPTIONS = {\n\tenabled: true,\n\treversed: false,\n} as TreeOptions;\n\nconst ROW_HEIGHT = 22;\n\nconst DEFAULT_OPTIONS: Options = {\n\trows: 100,\n\tcolumns: 20,\n\treadOnly: false,\n\trowNumbers: true,\n\trowPriority: 2,\n\trowTree: {enabled: true},\n\tcolumnTree: {enabled: true},\n\tcolLetters: true,\n\temptyPlaceholder: true,\n\tfreezeTop: 0,\n\tfontSize: 14,\n\trowHeight: ROW_HEIGHT,\n\trowResize: true,\n\tcolumnWidth: 100,\n\tcolumnResize: true,\n\tcolumnPriority: 1,\n\tfreezeLeft: 0,\n\tfreezeRight: 0,\n\tfreezeBottom: 0,\n\tmaxSortingColumns: 3,\n\tnumberFormat: null,\n\tlevelIndentFactor: 2,\n\tcellIndentFactor: 10,\n\temptyClickable: false,\n\tgrid: true,\n\tautofill: true,\n\tformulas: true,\n\tundoRedo: true,\n\tcommandWindow: true,\n\tcellCache: true,\n\tsingleCellModel: false,\n\tzoom: 1,\n\tediting: {\n\t\trowInsertion: true,\n\t\trowDeletion: true,\n\t\tcolInsertion: true,\n\t\tcolDeletion: true,\n\t\trowOutline: true,\n\t\tcolOutline: true,\n\t\tdateCalendarEditor: false\n\t},\n\tcomments: {\n\t\thideTimeout: 1000,\n\t\toffsetX: 30,\n\t\toffsetY: -30,\n\t\tzIndex: 500,\n\t\theaderPosition: 'top'\n\t},\n\tscrolling: {\n\t\tverticalOverscroll: true,\n\t\thorizontalOverscroll: true,\n\t\tscrollbarVisibilityTreshold: 100\n\t},\n\tselecting: {\n\t\tenabled: true,\n\t\tmultiSelect: true,\n\t},\n\tevents: {\n\t\tclick: {\n\t\t\tmouseMoveTreshold: 10\n\t\t}\n\t},\n\tclipboard: {\n\t\tpasteProps: ['v', 'dv'],\n\t\trowPasteMode: 'rewrite_append',\n\t\tcolumnPasteMode: 'rewrite'\n\t},\n\tprint: {\n\t\tdpi: 600,\n\t\tmargins: {\n\t\t\tleft: 6.35,\n\t\t\tright: 6.35,\n\t\t\ttop: 19.05,\n\t\t\tbottom: 19.05,\n\t\t\theader: 7.62,\n\t\t\tfooter: 7.62\n\t\t},\n\t\torientation: 'portrait',\n\t\tpaper: 'A4'\n\t}\n};\n\nexport default {\n\tROW_HEIGHT: ROW_HEIGHT,\n\tRESIZE_TRESHOLD: 10,\n\tROW_HEADER_WIDTH: 60,\n\tSLIDER_SIZE: 12,\n\tEXPANDER_SIZE: 13,\n\tMAX_CACHE_ITEMS: 5000, //50000,\n\tCACHE_CLEAN_INTERVAL: 30,\n\tCOMMENT_HIDE_TIMEOUT: 1000,\n\tSELECTOR_BORDER_WIDTH: 1,\n\tMIN_ROW_HEIGHT: 5,\n\tMIN_COL_WIDTH: 5,\n\tSPARKLINE_GAP: 4,\n\tAUTOSCROLL_TRESHOLD: 100,\n\tAUTOSCROLL_RATIO: 1.1,\n\tAUTOSCROLL_INTERVAL: 100,\n\tDEFAULT_SPARKLINE_OPTIONS: DEFAULT_SPARKLINE_OPTIONS,\n\tDEFAULT_OPTIONS: DEFAULT_OPTIONS,\n\tMAX_COMMENT_AUTOHEIGHT: 300,\n\tMIN_COMMENT_AUTOHEIGHT: 25,\n\t...coreConstants\n}\n\n"]}
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../src/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAI7D,MAAM,yBAAyB,GAAG;IACjC,QAAQ,EAAE,MAAM;IAChB,QAAQ,EAAE,MAAM;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE;QACN,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,CAAC;KACT;IACD,MAAM,EAAE;QACP,KAAK,EAAE,QAAQ;KACf;CACmB,CAAC;AAEtB,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACrC,OAAO,EAAE,KAAK;IACd,eAAe,EAAE,IAAI;IACrB,cAAc,EAAE,IAAI;CACH,CAAC;AAEnB,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,OAAO,EAAE,IAAI;IACb,QAAQ,EAAE,KAAK;CACA,CAAC;AAEjB,MAAM,UAAU,GAAG,EAAE,CAAC;AAEtB,MAAM,eAAe,GAAY;IAChC,IAAI,EAAE,GAAG;IACT,OAAO,EAAE,EAAE;IACX,QAAQ,EAAE,KAAK;IACf,UAAU,EAAE,IAAI;IAChB,WAAW,EAAE,CAAC;IACd,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;IACD,MAAM,EAAE;QACP,KAAK,EAAE;YACN,iBAAiB,EAAE,EAAE;SACrB;KACD;IACD,SAAS,EAAE;QACV,UAAU,EAAE,CAAC,GAAG,EAAE,IAAI,CAAC;QACvB,YAAY,EAAE,gBAAgB;QAC9B,eAAe,EAAE,SAAS;KAC1B;IACD,KAAK,EAAE;QACN,GAAG,EAAE,GAAG;QACR,OAAO,EAAE;YACR,IAAI,EAAE,IAAI;YACV,KAAK,EAAE,IAAI;YACX,GAAG,EAAE,KAAK;YACV,MAAM,EAAE,KAAK;YACb,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,IAAI;SACZ;QACD,WAAW,EAAE,UAAU;QACvB,KAAK,EAAE,IAAI;KACX;CACD,CAAC;AAEF,eAAe;IACd,UAAU,EAAE,UAAU;IACtB,eAAe,EAAE,EAAE;IACnB,gBAAgB,EAAE,EAAE;IACpB,WAAW,EAAE,EAAE;IACf,aAAa,EAAE,EAAE;IACjB,eAAe,EAAE,IAAI,EAAE,QAAQ;IAC/B,oBAAoB,EAAE,EAAE;IACxB,oBAAoB,EAAE,IAAI;IAC1B,qBAAqB,EAAE,CAAC;IACxB,cAAc,EAAE,CAAC;IACjB,aAAa,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC;IAChB,mBAAmB,EAAE,GAAG;IACxB,gBAAgB,EAAE,GAAG;IACrB,mBAAmB,EAAE,GAAG;IACxB,yBAAyB,EAAE,yBAAyB;IACpD,eAAe,EAAE,eAAe;IAChC,sBAAsB,EAAE,GAAG;IAC3B,sBAAsB,EAAE,EAAE;IAC1B,GAAG,aAAa;CAChB,CAAA","sourcesContent":["import { constants as coreConstants } from '@omegagrid/core';\nimport { Options, FilterOptions, TreeOptions } from './model';\nimport { SparklineOptions } from './sparklines';\n\nconst DEFAULT_SPARKLINE_OPTIONS = {\n\tminValue: 'auto',\n\tmaxValue: 'auto',\n\ttype: 'line',\n\tstyle: {\n\t\tcolor: '0094FF',\n\t\tweight: 1\n\t},\n\tmarker: {\n\t\tcolor: 'ff0000'\n\t}\n} as SparklineOptions;\n\nexport const DEFAULT_FILTER_OPTIONS = {\n\tenabled: false,\n\tincludeChildren: true,\n\tincludeParents: true\n} as FilterOptions;\n\nexport const DEFAULT_TREE_OPTIONS = {\n\tenabled: true,\n\treversed: false,\n} as TreeOptions;\n\nconst ROW_HEIGHT = 22;\n\nconst DEFAULT_OPTIONS: Options = {\n\trows: 100,\n\tcolumns: 20,\n\treadOnly: false,\n\trowNumbers: true,\n\trowPriority: 2,\n\trowTree: {enabled: true},\n\tcolumnTree: {enabled: true},\n\tcolLetters: true,\n\temptyPlaceholder: true,\n\tfreezeTop: 0,\n\tfontSize: 14,\n\trowHeight: ROW_HEIGHT,\n\trowResize: true,\n\tcolumnWidth: 100,\n\tcolumnResize: true,\n\tcolumnPriority: 1,\n\tfreezeLeft: 0,\n\tfreezeRight: 0,\n\tfreezeBottom: 0,\n\tmaxSortingColumns: 3,\n\tnumberFormat: null,\n\tlevelIndentFactor: 2,\n\tcellIndentFactor: 10,\n\temptyClickable: false,\n\tgrid: true,\n\tautofill: true,\n\tformulas: true,\n\tmaxCalculationDepth: 50,\n\tundoRedo: true,\n\tcommandWindow: true,\n\tcellCache: true,\n\tsingleCellModel: false,\n\tzoom: 1,\n\tediting: {\n\t\trowInsertion: true,\n\t\trowDeletion: true,\n\t\tcolInsertion: true,\n\t\tcolDeletion: true,\n\t\trowOutline: true,\n\t\tcolOutline: true,\n\t\tdateCalendarEditor: false\n\t},\n\tcomments: {\n\t\thideTimeout: 1000,\n\t\toffsetX: 30,\n\t\toffsetY: -30,\n\t\tzIndex: 500,\n\t\theaderPosition: 'top'\n\t},\n\tscrolling: {\n\t\tverticalOverscroll: true,\n\t\thorizontalOverscroll: true,\n\t\tscrollbarVisibilityTreshold: 100\n\t},\n\tselecting: {\n\t\tenabled: true,\n\t\tmultiSelect: true,\n\t},\n\tevents: {\n\t\tclick: {\n\t\t\tmouseMoveTreshold: 10\n\t\t}\n\t},\n\tclipboard: {\n\t\tpasteProps: ['v', 'dv'],\n\t\trowPasteMode: 'rewrite_append',\n\t\tcolumnPasteMode: 'rewrite'\n\t},\n\tprint: {\n\t\tdpi: 600,\n\t\tmargins: {\n\t\t\tleft: 6.35,\n\t\t\tright: 6.35,\n\t\t\ttop: 19.05,\n\t\t\tbottom: 19.05,\n\t\t\theader: 7.62,\n\t\t\tfooter: 7.62\n\t\t},\n\t\torientation: 'portrait',\n\t\tpaper: 'A4'\n\t}\n};\n\nexport default {\n\tROW_HEIGHT: ROW_HEIGHT,\n\tRESIZE_TRESHOLD: 10,\n\tROW_HEADER_WIDTH: 60,\n\tSLIDER_SIZE: 12,\n\tEXPANDER_SIZE: 13,\n\tMAX_CACHE_ITEMS: 5000, //50000,\n\tCACHE_CLEAN_INTERVAL: 30,\n\tCOMMENT_HIDE_TIMEOUT: 1000,\n\tSELECTOR_BORDER_WIDTH: 1,\n\tMIN_ROW_HEIGHT: 5,\n\tMIN_COL_WIDTH: 5,\n\tSPARKLINE_GAP: 4,\n\tAUTOSCROLL_TRESHOLD: 100,\n\tAUTOSCROLL_RATIO: 1.1,\n\tAUTOSCROLL_INTERVAL: 100,\n\tDEFAULT_SPARKLINE_OPTIONS: DEFAULT_SPARKLINE_OPTIONS,\n\tDEFAULT_OPTIONS: DEFAULT_OPTIONS,\n\tMAX_COMMENT_AUTOHEIGHT: 300,\n\tMIN_COMMENT_AUTOHEIGHT: 25,\n\t...coreConstants\n}\n\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculationModel.d.ts","sourceRoot":"","sources":["../../src/model/calculationModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,QAAQ,EAAY,MAAM,UAAU,CAAC;AACpE,OAAO,EAAsB,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACxF,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AACxC,OAAO,EAAE,e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,wBAAwB,CAAC,IAAI,EAAE,SAAS;IASxC,oBAAoB,CAAC,KAAK,EAAE,QAAQ,CAAC,SAAS,CAAC;CA2B/C"}
|
|
@@ -1,7 +1,23 @@
|
|
|
1
1
|
import { CalculationContext, Formula, Tokenizer } from "../calculations";
|
|
2
2
|
import { DependencyModel } from "./dependencyModel";
|
|
3
|
+
/**
|
|
4
|
+
* cells being evaluated right now, shared by all models
|
|
5
|
+
* so the references between sheets are covered as well
|
|
6
|
+
*/
|
|
7
|
+
const evaluationStack = new Set();
|
|
8
|
+
/** error propagated through the evaluation stack to every cell of the reference chain */
|
|
9
|
+
class EvaluationStackError extends Error {
|
|
10
|
+
/** @param origin cell where the propagation stops, the error propagates to the top of the stack when not set */
|
|
11
|
+
constructor(message, origin) {
|
|
12
|
+
super(message);
|
|
13
|
+
this.origin = origin;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
3
16
|
function evaluationErrorHandler(error) {
|
|
4
|
-
if (error instanceof
|
|
17
|
+
if (error instanceof EvaluationStackError) {
|
|
18
|
+
return error.message;
|
|
19
|
+
}
|
|
20
|
+
else if (error instanceof RangeError) {
|
|
5
21
|
if (error.message == 'Maximum call stack size exceeded') {
|
|
6
22
|
return 'infinite loop';
|
|
7
23
|
}
|
|
@@ -81,7 +97,19 @@ export class CalculationModel extends DependencyModel {
|
|
|
81
97
|
return null;
|
|
82
98
|
let value = null;
|
|
83
99
|
if (cell.hasFormula) {
|
|
100
|
+
if (cell.error?.persistent) {
|
|
101
|
+
// evaluated alone, the cell would take the cached values of the rest of the cycle (nesting chain)
|
|
102
|
+
return null;
|
|
103
|
+
}
|
|
104
|
+
else if (evaluationStack.has(cell)) {
|
|
105
|
+
throw new EvaluationStackError('circular reference', cell);
|
|
106
|
+
}
|
|
107
|
+
else if (evaluationStack.size >= this.model.options.maxCalculationDepth) {
|
|
108
|
+
throw new EvaluationStackError('maximum nesting depth exceeded');
|
|
109
|
+
}
|
|
84
110
|
const formula = this.getFormula(cell);
|
|
111
|
+
const previousCell = this.context.currentCell;
|
|
112
|
+
evaluationStack.add(cell);
|
|
85
113
|
try {
|
|
86
114
|
cell.clearError();
|
|
87
115
|
this.context.currentCell = cell;
|
|
@@ -99,6 +127,16 @@ export class CalculationModel extends DependencyModel {
|
|
|
99
127
|
}
|
|
100
128
|
catch (error) {
|
|
101
129
|
cell.error = { message: evaluationErrorHandler(error) };
|
|
130
|
+
if (error instanceof EvaluationStackError) {
|
|
131
|
+
cell.error.persistent = true;
|
|
132
|
+
// every cell of the cycle (nesting chain) gets the error, not just the deepest one
|
|
133
|
+
if (error.origin ? error.origin !== cell : evaluationStack.size > 1)
|
|
134
|
+
throw error;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
finally {
|
|
138
|
+
evaluationStack.delete(cell);
|
|
139
|
+
this.context.currentCell = previousCell; // nested evaluation must not change the cell of the outer one
|
|
102
140
|
}
|
|
103
141
|
}
|
|
104
142
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"calculationModel.js","sourceRoot":"","sources":["../../src/model/calculationModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAiB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,SAAS,sBAAsB,CAAC,KAAc;IAC7C,IAAI,KAAK,YAAY,UAAU,EAAE,CAAC;QACjC,IAAI,KAAK,CAAC,OAAO,IAAI,kCAAkC,EAAE,CAAC;YACzD,OAAO,eAAe,CAAC;QACxB,CAAC;aAAM,CAAC;YACP,OAAO,KAAK,CAAC,OAAO,CAAC;QACtB,CAAC;IACF,CAAC;SAAM,CAAC;QACP,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IACzB,CAAC;AACF,CAAC;AAED,MAAM,OAAO,gBAAiB,SAAQ,eAAe;IAGpD,IAAI,SAAS,KAAK,OAAO,IAAI,CAAC,UAAU,CAAA,CAAC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CAAC;QAED,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;YAC5C,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;gBAC7F,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,YAAY,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;gBACrG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBACvD,IAAI,CAAC,eAAe,EAAE,CAAC;gBACvB,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC;IAC1B,CAAC;CAED","sourcesContent":["import { CellModel, GridModel, Viewport, RowModel } from \"../model\";\nimport { CalculationContext, Formula, FormulaString, Tokenizer } from \"../calculations\";\nimport { ShiftOptions } from \"../types\";\nimport { DependencyModel } from \"./dependencyModel\";\n\nfunction evaluationErrorHandler(error: unknown) {\n\tif (error instanceof RangeError) {\n\t\tif (error.message == 'Maximum call stack size exceeded') {\n\t\t\treturn 'infinite loop';\n\t\t} else {\n\t\t\treturn error.message;\n\t\t}\n\t} else {\n\t\treturn error.toString();\n\t}\n}\n\nexport class CalculationModel extends DependencyModel {\n\n\tprivate _tokenizer = new Tokenizer();\n\tget tokenizer() { return this._tokenizer }\n\n\tprivate _formulas = new Map<string, Formula>();\n\tget formulas() { return this._formulas }\n\n\tprivate context: CalculationContext;\n\n\tconstructor(model: GridModel) {\n\t\tsuper(model, 'calculations');\n\t\tthis.context = new CalculationContext(model);\n\t}\n\n\tcreateFormula(cell: CellModel) {\n\t\tconst f = new Formula(cell.formula, this.tokenizer);\n\t\tthis._formulas.set(cell.address, f);\n\t\tif (cell.hasOwnFormula) cell.formula = f.createFormulaString(); // normalize formula string\n\t\tthis.createDependecies(cell);\n\t\treturn f;\n\t}\n\n\tcreateDependecies(cell: CellModel) {\n\t\tconst addr = cell.address;\n\t\tif (this.formulas.has(addr)) {\n\t\t\tconst f = this.formulas.get(addr);\n\t\t\tf.ranges.forEach(([_i, r, sheet]) => this._dependencies.add(addr, r.A1, sheet));\n\t\t\tf.cells.forEach(([_i, r, sheet]) => this._dependencies.add(addr, r.A1, sheet));\n\t\t\tf.variables.forEach(([_i, v]) => {\n\t\t\t\tconst c = this.model.getCellByName(v, cell.range);\n\t\t\t\tif (c) this._dependencies.add(addr, c.address, null)\n\t\t\t});\n\t\t}\n\t\treturn this;\n\t}\n\n\trefreshFormula(cell: CellModel) {\n\t\tcell.refreshFormula();\n\t\tthis.formulas.delete(cell.address);\n\t\tthis.clearDependecies(cell);\n\t\treturn this;\n\t}\n\n\tupdateDependencies(cell: CellModel) {\n\t\tthis.clearDependecies(cell).getFormula(cell);\n\t\treturn this;\n\t}\n\n\tgetFormula(cell: CellModel) {\n\t\treturn this._formulas.has(cell.address) ? this._formulas.get(cell.address) : this.createFormula(cell);\n\t}\n\n\trefresh() {\n\t\tthis.dependencies.clear();\n\t\tthis._formulas.clear();\n\t}\n\n\tclearDependecies(cell: CellModel) {\n\t\tconst addr = cell.address;\n\t\tthis.dependencies.clearCellDependecies(addr);\n\t\tthis.formulas.delete(addr);\n\t\treturn this;\n\t}\n\n\tevaluateFormula(formula: Formula, cell: CellModel): unknown {\n\t\tthis.context.currentCell = cell;\n\t\treturn formula.fn(this.context, { cell, formula });\n\t}\n\n\tevaluateExpression(expression: FormulaString, cell?: CellModel): unknown {\n\t\tthis.context.currentCell = cell;\n\t\tconst formula = new Formula(expression, this.tokenizer);\n\t\treturn formula.fn(this.context, { cell, formula });\n\t}\n\t\n\tevaluate(cell: CellModel, noSpill?: boolean): unknown {\n\t\tif (!cell) return null;\n\t\tlet value = null;\n\t\tif (cell.hasFormula) {\n\t\t\tconst formula = this.getFormula(cell);\n\t\t\ttry {\n\t\t\t\tcell.clearError();\n\t\t\t\tthis.context.currentCell = cell;\n\t\t\t\tvalue = formula.fn(this.context, { cell, formula });\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tif (!noSpill) this.model.spillValues({cell: cell, values: value}).range;\n\t\t\t\t\tvalue = value.length > 0 && value[0].length > 0 ? value[0][0] : null;\n\t\t\t\t\tif (noSpill) cell.value = value;\n\t\t\t\t} else {\n\t\t\t\t\tcell.value = value;\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tcell.error = {message: evaluationErrorHandler(error)};\n\t\t\t}\n\t\t} else {\n\t\t\tvalue = cell.value;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tevaluateAll() {\n\t\tthis.model.rows.forEach(row => this.model.columns.forEach((_, c) => row.cell(c).evaluate()));\n\t}\n\n\tcalculateViewport(viewport: Viewport) {\n\t\tconst calculatedCells: CellModel[] = [];\n\t\tviewport.rows.forEach(row => row.cells.forEach(cell => {\n\t\t\tif (cell.hasFormula) {\n\t\t\t\tif (!cell.hasValue) {\n\t\t\t\t\tthis.evaluate(cell);\n\t\t\t\t\tif (cell.spillRange) {\n\t\t\t\t\t\tfor (const cell2 of this.model.getRangeIterator(cell.spillRange)) {\n\t\t\t\t\t\t\tcalculatedCells.push(cell2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcalculatedCells.push(cell);\n\t\t\t}\n\t\t}));\n\t\treturn calculatedCells;\n\t}\n\n\tshift(options: ShiftOptions) {\n\t\tthis.getFormulaCells().forEach(cell => {\n\t\t\tcell.formula = this.getFormula(cell).shift(options).createFormulaString(false);\n\t\t\tthis.updateDependencies(cell);\n\t\t});\n\n\t\tconst thisSheet = this.model.name;\n\t\tthis.dependencies.sheetDependants.forEach(sheet => {\n\t\t\tconst connectedModel = this.model.getConnectedModel(sheet);\n\t\t\tconnectedModel?.calculations.getFormulaCells().forEach(cell => {\n\t\t\t\tconst formula = connectedModel.calculations.getFormula(cell);\n\t\t\t\tif (formula.hasSheetReference(thisSheet)) {\n\t\t\t\t\tcell.formula = formula.shift(options).createFormulaString(false);\n\t\t\t\t\tconnectedModel.calculations.updateDependencies(cell);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tgetFormulaCells() {\n\t\tconst m = this.model;\n\t\tconst cells: CellModel[] = [];\n\t\tlet row: RowModel;\n\t\tconst rows = m.rows.length;\n\t\tconst columns = m.columns.length;\n\t\tfor (let r = 0; r < rows; r++) {\n\t\t\trow = m.rows[r];\n\t\t\tfor (let c = 0; c < columns; c++) {\n\t\t\t\tif (row.hasCellFormula(c)) cells.push(row.cell(c));\n\t\t\t}\n\t\t}\n\t\treturn cells;\n\t}\n\n\trenameSheet(oldName: string, newName: string) {\n\t\tlet renamed = false;\n\t\tthis.dependencies.renameSheet(oldName, newName);\n\t\tthis.getFormulaCells().forEach(cell => {\n\t\t\tconst f = this.getFormula(cell);\n\t\t\tif (f.renameSheet(oldName, newName)) {\n\t\t\t\tcell.formula = f.createFormulaString();\n\t\t\t\tthis.refreshFormula(cell);\n\t\t\t\trenamed = true;\n\t\t\t}\n\t\t});\n\t\treturn renamed;\n\t}\n\n\tinvalidateCellDependants(cell: CellModel) {\n\t\tconst cells: [CellModel, string?][] = [];\n\t\tthis.dependencies.getDependants(cell.range).forEach(([cell, sheet]) => {\n\t\t\tcells.push([cell, sheet]);\n\t\t\tcell.invalidateValue();\n\t\t});\n\t\treturn cells;\n\t}\n\n\tinvalidateDependants(cells: Iterable<CellModel>) {\n\t\tconst updatedCells = new Map<CellModel, string|null>();\n\t\tconst recalculatedCells = new Map<CellModel, string|null>();\n\t\tfor (const cell of cells) {\n\t\t\tthis.invalidateCellDependants(cell).forEach(([cell2, sheet]) => updatedCells.set(cell2, sheet));\n\t\t}\n\t\tupdatedCells.forEach((sheet, cell) => recalculatedCells.set(cell, sheet));\n\n\t\tfor (const cell of cells) {\n\t\t\tupdatedCells.set(cell, null);\n\t\t}\n\t\t\n\t\tupdatedCells.forEach((_sheet, updatedCell) => {\n\t\t\tthis.model.sparklines.dependencies.getDependants(updatedCell.range).forEach(([cell, sheet]) => {\n\t\t\t\trecalculatedCells.set(cell, sheet);\n\t\t\t});\n\n\t\t\tthis.model.conditionalFormats.dependencies.getDependants(updatedCell.range).forEach(([cell, sheet]) => {\n\t\t\t\tthis.model.conditionalFormats.invalidateExtremes(cell);\n\t\t\t\tcell.invalidateStyle();\n\t\t\t\trecalculatedCells.set(cell, sheet);\n\t\t\t});\n\t\t});\n\n\t\treturn recalculatedCells;\n\t}\n\n}"]}
|
|
1
|
+
{"version":3,"file":"calculationModel.js","sourceRoot":"","sources":["../../src/model/calculationModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,OAAO,EAAiB,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAExF,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD;;;GAGG;AACH,MAAM,eAAe,GAAG,IAAI,GAAG,EAAa,CAAC;AAE7C,yFAAyF;AACzF,MAAM,oBAAqB,SAAQ,KAAK;IACvC,gHAAgH;IAChH,YAAY,OAAe,EAAW,MAAkB;QAAI,KAAK,CAAC,OAAO,CAAC,CAAA;QAApC,WAAM,GAAN,MAAM,CAAY;IAAmB,CAAC;CAC5E;AAED,SAAS,sBAAsB,CAAC,KAAc;IAC7C,IAAI,KAAK,YAAY,oBAAoB,EAAE,CAAC;QAC3C,OAAO,KAAK,CAAC,OAAO,CAAC;IACtB,CAAC;SAAM,IAAI,KAAK,YAAY,UAAU,EAAE,CAAC;QACxC,IAAI,KAAK,CAAC,OAAO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AAI,CAAC,CAAC;QAC9B,CAAC;QAED,YAAY,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE;YAC5C,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;gBAC7F,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;YAEH,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,YAAY,CAAC,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,EAAE,KAAK,CAAC,EAAE,EAAE;gBACrG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC;gBACvD,IAAI,CAAC,eAAe,EAAE,CAAC;gBACvB,iBAAiB,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;QACJ,CAAC,CAAC,CAAC;QAEH,OAAO,iBAAiB,CAAC;IAC1B,CAAC;CAED","sourcesContent":["import { CellModel, GridModel, Viewport, RowModel } from \"../model\";\nimport { CalculationContext, Formula, FormulaString, Tokenizer } from \"../calculations\";\nimport { ShiftOptions } from \"../types\";\nimport { DependencyModel } from \"./dependencyModel\";\n\n/**\n * cells being evaluated right now, shared by all models\n * so the references between sheets are covered as well\n */\nconst evaluationStack = new Set<CellModel>();\n\n/** error propagated through the evaluation stack to every cell of the reference chain */\nclass EvaluationStackError extends Error {\n\t/** @param origin cell where the propagation stops, the error propagates to the top of the stack when not set */\n\tconstructor(message: string, readonly origin?: CellModel) { super(message) }\n}\n\nfunction evaluationErrorHandler(error: unknown) {\n\tif (error instanceof EvaluationStackError) {\n\t\treturn error.message;\n\t} else if (error instanceof RangeError) {\n\t\tif (error.message == 'Maximum call stack size exceeded') {\n\t\t\treturn 'infinite loop';\n\t\t} else {\n\t\t\treturn error.message;\n\t\t}\n\t} else {\n\t\treturn error.toString();\n\t}\n}\n\nexport class CalculationModel extends DependencyModel {\n\n\tprivate _tokenizer = new Tokenizer();\n\tget tokenizer() { return this._tokenizer }\n\n\tprivate _formulas = new Map<string, Formula>();\n\tget formulas() { return this._formulas }\n\n\tprivate context: CalculationContext;\n\n\tconstructor(model: GridModel) {\n\t\tsuper(model, 'calculations');\n\t\tthis.context = new CalculationContext(model);\n\t}\n\n\tcreateFormula(cell: CellModel) {\n\t\tconst f = new Formula(cell.formula, this.tokenizer);\n\t\tthis._formulas.set(cell.address, f);\n\t\tif (cell.hasOwnFormula) cell.formula = f.createFormulaString(); // normalize formula string\n\t\tthis.createDependecies(cell);\n\t\treturn f;\n\t}\n\n\tcreateDependecies(cell: CellModel) {\n\t\tconst addr = cell.address;\n\t\tif (this.formulas.has(addr)) {\n\t\t\tconst f = this.formulas.get(addr);\n\t\t\tf.ranges.forEach(([_i, r, sheet]) => this._dependencies.add(addr, r.A1, sheet));\n\t\t\tf.cells.forEach(([_i, r, sheet]) => this._dependencies.add(addr, r.A1, sheet));\n\t\t\tf.variables.forEach(([_i, v]) => {\n\t\t\t\tconst c = this.model.getCellByName(v, cell.range);\n\t\t\t\tif (c) this._dependencies.add(addr, c.address, null)\n\t\t\t});\n\t\t}\n\t\treturn this;\n\t}\n\n\trefreshFormula(cell: CellModel) {\n\t\tcell.refreshFormula();\n\t\tthis.formulas.delete(cell.address);\n\t\tthis.clearDependecies(cell);\n\t\treturn this;\n\t}\n\n\tupdateDependencies(cell: CellModel) {\n\t\tthis.clearDependecies(cell).getFormula(cell);\n\t\treturn this;\n\t}\n\n\tgetFormula(cell: CellModel) {\n\t\treturn this._formulas.has(cell.address) ? this._formulas.get(cell.address) : this.createFormula(cell);\n\t}\n\n\trefresh() {\n\t\tthis.dependencies.clear();\n\t\tthis._formulas.clear();\n\t}\n\n\tclearDependecies(cell: CellModel) {\n\t\tconst addr = cell.address;\n\t\tthis.dependencies.clearCellDependecies(addr);\n\t\tthis.formulas.delete(addr);\n\t\treturn this;\n\t}\n\n\tevaluateFormula(formula: Formula, cell: CellModel): unknown {\n\t\tthis.context.currentCell = cell;\n\t\treturn formula.fn(this.context, { cell, formula });\n\t}\n\n\tevaluateExpression(expression: FormulaString, cell?: CellModel): unknown {\n\t\tthis.context.currentCell = cell;\n\t\tconst formula = new Formula(expression, this.tokenizer);\n\t\treturn formula.fn(this.context, { cell, formula });\n\t}\n\t\n\tevaluate(cell: CellModel, noSpill?: boolean): unknown {\n\t\tif (!cell) return null;\n\t\tlet value = null;\n\t\tif (cell.hasFormula) {\n\t\t\tif (cell.error?.persistent) {\n\t\t\t\t// evaluated alone, the cell would take the cached values of the rest of the cycle (nesting chain)\n\t\t\t\treturn null;\n\t\t\t} else if (evaluationStack.has(cell)) {\n\t\t\t\tthrow new EvaluationStackError('circular reference', cell);\n\t\t\t} else if (evaluationStack.size >= this.model.options.maxCalculationDepth) {\n\t\t\t\tthrow new EvaluationStackError('maximum nesting depth exceeded');\n\t\t\t}\n\n\t\t\tconst formula = this.getFormula(cell);\n\t\t\tconst previousCell = this.context.currentCell;\n\t\t\tevaluationStack.add(cell);\n\t\t\ttry {\n\t\t\t\tcell.clearError();\n\t\t\t\tthis.context.currentCell = cell;\n\t\t\t\tvalue = formula.fn(this.context, { cell, formula });\n\t\t\t\tif (Array.isArray(value)) {\n\t\t\t\t\tif (!noSpill) this.model.spillValues({cell: cell, values: value}).range;\n\t\t\t\t\tvalue = value.length > 0 && value[0].length > 0 ? value[0][0] : null;\n\t\t\t\t\tif (noSpill) cell.value = value;\n\t\t\t\t} else {\n\t\t\t\t\tcell.value = value;\n\t\t\t\t}\n\t\t\t} catch (error) {\n\t\t\t\tcell.error = {message: evaluationErrorHandler(error)};\n\t\t\t\tif (error instanceof EvaluationStackError) {\n\t\t\t\t\tcell.error.persistent = true;\n\t\t\t\t\t// every cell of the cycle (nesting chain) gets the error, not just the deepest one\n\t\t\t\t\tif (error.origin ? error.origin !== cell : evaluationStack.size > 1) throw error;\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\tevaluationStack.delete(cell);\n\t\t\t\tthis.context.currentCell = previousCell; // nested evaluation must not change the cell of the outer one\n\t\t\t}\n\t\t} else {\n\t\t\tvalue = cell.value;\n\t\t}\n\n\t\treturn value;\n\t}\n\n\tevaluateAll() {\n\t\tthis.model.rows.forEach(row => this.model.columns.forEach((_, c) => row.cell(c).evaluate()));\n\t}\n\n\tcalculateViewport(viewport: Viewport) {\n\t\tconst calculatedCells: CellModel[] = [];\n\t\tviewport.rows.forEach(row => row.cells.forEach(cell => {\n\t\t\tif (cell.hasFormula) {\n\t\t\t\tif (!cell.hasValue) {\n\t\t\t\t\tthis.evaluate(cell);\n\t\t\t\t\tif (cell.spillRange) {\n\t\t\t\t\t\tfor (const cell2 of this.model.getRangeIterator(cell.spillRange)) {\n\t\t\t\t\t\t\tcalculatedCells.push(cell2);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcalculatedCells.push(cell);\n\t\t\t}\n\t\t}));\n\t\treturn calculatedCells;\n\t}\n\n\tshift(options: ShiftOptions) {\n\t\tthis.getFormulaCells().forEach(cell => {\n\t\t\tcell.formula = this.getFormula(cell).shift(options).createFormulaString(false);\n\t\t\tthis.updateDependencies(cell);\n\t\t});\n\n\t\tconst thisSheet = this.model.name;\n\t\tthis.dependencies.sheetDependants.forEach(sheet => {\n\t\t\tconst connectedModel = this.model.getConnectedModel(sheet);\n\t\t\tconnectedModel?.calculations.getFormulaCells().forEach(cell => {\n\t\t\t\tconst formula = connectedModel.calculations.getFormula(cell);\n\t\t\t\tif (formula.hasSheetReference(thisSheet)) {\n\t\t\t\t\tcell.formula = formula.shift(options).createFormulaString(false);\n\t\t\t\t\tconnectedModel.calculations.updateDependencies(cell);\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\treturn this;\n\t}\n\n\tgetFormulaCells() {\n\t\tconst m = this.model;\n\t\tconst cells: CellModel[] = [];\n\t\tlet row: RowModel;\n\t\tconst rows = m.rows.length;\n\t\tconst columns = m.columns.length;\n\t\tfor (let r = 0; r < rows; r++) {\n\t\t\trow = m.rows[r];\n\t\t\tfor (let c = 0; c < columns; c++) {\n\t\t\t\tif (row.hasCellFormula(c)) cells.push(row.cell(c));\n\t\t\t}\n\t\t}\n\t\treturn cells;\n\t}\n\n\trenameSheet(oldName: string, newName: string) {\n\t\tlet renamed = false;\n\t\tthis.dependencies.renameSheet(oldName, newName);\n\t\tthis.getFormulaCells().forEach(cell => {\n\t\t\tconst f = this.getFormula(cell);\n\t\t\tif (f.renameSheet(oldName, newName)) {\n\t\t\t\tcell.formula = f.createFormulaString();\n\t\t\t\tthis.refreshFormula(cell);\n\t\t\t\trenamed = true;\n\t\t\t}\n\t\t});\n\t\treturn renamed;\n\t}\n\n\tinvalidateCellDependants(cell: CellModel) {\n\t\tconst cells: [CellModel, string?][] = [];\n\t\tthis.dependencies.getDependants(cell.range).forEach(([cell, sheet]) => {\n\t\t\tcells.push([cell, sheet]);\n\t\t\tcell.invalidateValue();\n\t\t});\n\t\treturn cells;\n\t}\n\n\tinvalidateDependants(cells: Iterable<CellModel>) {\n\t\tconst updatedCells = new Map<CellModel, string|null>();\n\t\tconst recalculatedCells = new Map<CellModel, string|null>();\n\t\tfor (const cell of cells) {\n\t\t\tthis.invalidateCellDependants(cell).forEach(([cell2, sheet]) => updatedCells.set(cell2, sheet));\n\t\t}\n\t\tupdatedCells.forEach((sheet, cell) => recalculatedCells.set(cell, sheet));\n\n\t\tfor (const cell of cells) {\n\t\t\tupdatedCells.set(cell, null);\n\t\t}\n\t\t\n\t\tupdatedCells.forEach((_sheet, updatedCell) => {\n\t\t\tthis.model.sparklines.dependencies.getDependants(updatedCell.range).forEach(([cell, sheet]) => {\n\t\t\t\trecalculatedCells.set(cell, sheet);\n\t\t\t});\n\n\t\t\tthis.model.conditionalFormats.dependencies.getDependants(updatedCell.range).forEach(([cell, sheet]) => {\n\t\t\t\tthis.model.conditionalFormats.invalidateExtremes(cell);\n\t\t\t\tcell.invalidateStyle();\n\t\t\t\trecalculatedCells.set(cell, sheet);\n\t\t\t});\n\t\t});\n\n\t\treturn recalculatedCells;\n\t}\n\n}"]}
|
|
@@ -32,6 +32,8 @@ export type CellSource = {
|
|
|
32
32
|
export type CellError = {
|
|
33
33
|
message: string;
|
|
34
34
|
handled?: boolean;
|
|
35
|
+
/** the error stays until the cell value is invalidated, the cell is not evaluated meanwhile */
|
|
36
|
+
persistent?: boolean;
|
|
35
37
|
};
|
|
36
38
|
export declare class CellModel extends ElementModel {
|
|
37
39
|
_content: HTMLDivElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cellModel.d.ts","sourceRoot":"","sources":["../../src/model/cellModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAS,OAAO,EAAS,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAE1F,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAClD,OAAO,EAAE,QAAQ,EAAkB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAE,wBAAwB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC9D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,uCAAuC;AACvC,MAAM,MAAM,UAAU,GAAG;IACxB,gBAAgB;IAChB,CAAC,EAAE,MAAM,CAAC;I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IACxB,CAAC;IAED,qBAAqB,CAAC,KAAe;QACpC,KAAK,CAAC,qBAAqB,CAAC,KAAK,CAAC,CAAC;QACnC,IAAI,CAAC,eAAe,EAAE,CAAC;IACxB,CAAC;IAED,sBAAsB,CACrB,KAAwC,EACxC,OAA8B,MAAM;QAEpC,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,IAAI,CAAC,mBAAmB,CAAC,IAAI,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,IAAI,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC;QAEvI,IAAI,IAAI,IAAI,MAAM,EAAE,CAAC;YACpB,KAAK,MAAM,CAAC,IAAI,KAAK;gBAAE,aAAa,CAAC,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC;QACpD,CAAC;QACD,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,cAAc,CAAC,aAAa,CAAC,CAAC;IAChD,CAAC;IAED,QAAQ;QACP,IAAI,CAAC,IAAI,CAAC,UAAU;YAAE,OAAO,IAAI,CAAC;QAClC,OAAO,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC;IACxC,CAAC;IAED,QAAQ,KAAK,OAAO,IAAI,CAAC,OAAO,CAAA,CAAC,CAAC;CAElC","sourcesContent":["import { ComponentAdapter, dates, numbers, utils, ValueFormatter } from \"@omegagrid/core\";\nimport { hasQuotePrefix, isFormula, prefixFormula, stripQuotePrefix } from \"../calculations/formula\";\nimport { CellRange } from \"../common\";\n// import { cellTypeRendererMap } from \"../renderers\";\nimport { ColumnModel } from \"./columnModel\";\nimport { ElementModel, ElementSource } from \"./elementModel\";\nimport { GridModel } from \"./gridModel\";\nimport { RowModel } from \"./rowModel\";\nimport { Style, StylePropertyKey } from \"./style\";\nimport { CSSStyle, styleToCSStyle } from \"./cssStyle\";\nimport { CellSerializationOptions, CellType } from \"../types\";\nimport { CommentSource } from \"./commentModel\";\nimport { validateValue } from \"./validations\";\n\n/** Source object type for grid cell */\nexport type CellSource = {\n\t/** row index */\n\tr: number;\n\t/** col index */\n\tc: number;\n\t/** cell value */\n\tv?: unknown;\n\t/** cell display value */\n\tdv?: string;\n\t/** cell column span */\n\tcs?: number;\n\t/** cell row span */\n\trs?: number;\n\t/** hyperlink */\n\thl?: string;\n\t/** cell tooltip content */\n\ttooltip?: string|unknown;\n\t/** comment */\n\tcomment?: CommentSource;\n} & ElementSource;\n\nconst cellValueHandler: Record<string, (v: unknown, cell: CellModel) => unknown> = {\n\t['n']: (v) => {\n\t\tconst value = utils.isString(v) ? parseFloat((v as string).replace(',', '.')) : v;\n\t\treturn Number.isNaN(value) ? v : value;\n\t},\n\t['t']: (v) => v,\n\t['d']: (v, cell) => {\n\t\tif (v == null || v === '') return null;\n\t\tif (utils.isString(v)) {\n\t\t\ttry {\n\t\t\t\treturn utils.isNumericString(v as string)\n\t\t\t\t\t? utils.strToNum(v as string)\n\t\t\t\t\t: dates.dateToSerialDate(dates.parse(v as string, cell.model.options.formatLocale));\n\t\t\t} catch (error) {\n\t\t\t\tcell.model.logger.error(`Invalid date value in cell ${cell.address}: ${v}`);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tif (v instanceof Date) return dates.dateToSerialDate(v);\n\t\treturn v;\n\t},\n\t// TODO: unfinnished implementation of time and datetime\n\t['tm']: (v) => utils.isString(v) ? new Date(v as string) : v,\n\t['dt']: (v) => utils.isString(v) ? new Date(v as string) : v,\n\t['b']: (v) => !!v && v !== '0' && v.toString().toLowerCase() !== 'false',\n\t['s']: (v) => v,\n\t['m']: (v) => v,\n\t['g']: (v) => {\n\t\tif (v == null || v === '') return null;\n\t\tconst f = parseFloat((v as string).toString().replace(',', '.'));\n\t\treturn isNaN(f) ? v : f;\n\t},\n\t['a']: (v) => utils.isString(v) && v !== '' ? JSON.parse(v as string) : v,\n\t['h']: (v) => v,\n};\n\n/** cell types whose values are entered as a free text, only those accept the quote prefix */\nconst quotePrefixTypes: CellType[] = ['t', 'n', 'g'];\n\nconst dropdownFormatters = new Map<{k: string, v: string}[], ValueFormatter<string>>();\nconst getDropdownFormatter = (content?: { k: string, v: string }[]) => {\n\tcontent = content || null;\n\tif (!dropdownFormatters.has(content)) {\n\t\tif (content) {\n\t\t\tconst items = content.reduce((map, e) => map.set(e.k, e.v), new Map<string, string>());\n\t\t\tdropdownFormatters.set(content, (k: string) => items.has(k) ? items.get(k) : k);\n\t\t} else {\n\t\t\tdropdownFormatters.set(content, (k: string) => k);\n\t\t}\n\t}\n\treturn dropdownFormatters.get(content);\n};\n\nexport type CellError = {\n\tmessage: string;\n\thandled?: boolean;\n}\n\nexport class CellModel extends ElementModel {\n\n\tpublic _content: HTMLDivElement;\n\n\tprivate _tooltip: string|unknown;\n\tget tooltip() { return this._tooltip }\n\tset tooltip(v: string|unknown) { this._tooltip = v }\n\tget hasTooltip() { return this._tooltip != null }\n\n\tget merge() { return this.model.merges.mergedCells.get(this.address) }\n\n\tprivate _row: RowModel;\n\tget row() { return this._row }\n\tset row(v: RowModel) { this._row = v }\n\tget r() { return this._row.index}\n\n\tprivate _column: ColumnModel;\n\tget column() { return this._column }\n\tset column(v: ColumnModel) { this._column = v }\n\tget c() { return this._column.index }\n\n\t/** tells if the entered value of the cell can be prefixed by the quote prefix */\n\tget quotePrefixable() { return quotePrefixTypes.includes(this.type) }\n\n\t/**\n\t * tells if the cell value is a quote prefixed plain text,\n\t * the prefix stays a part of the value, the display value holds the value without it\n\t */\n\tget quotePrefix() { return this.quotePrefixable && !this.hasFormula && hasQuotePrefix(this._value) }\n\n\t/** cell value without the quote prefix, used where the value is compared as a text (sorting, filtering) */\n\tget plainValue() { return this.quotePrefix ? stripQuotePrefix(this._value) : this.value }\n\n\tprivate _value: unknown;\n\tprivate _evaluated = true;\n\tget hasValue() { return this._value != null }\n\tget value() {\n\t\tif (!this._evaluated) this.evaluate();\n\t\treturn this._value\n\t}\n\tset value(v: unknown) {\n\t\tif (v && this.model.formulasEnabled && isFormula(v.toString())) {\n\t\t\tthis._value = undefined;\n\t\t\tthis.formula = v as string;\n\t\t} else {\n\t\t\tlet value = this.quotePrefixable && hasQuotePrefix(v) ? v : cellValueHandler[this.type](v, this);\n\n\t\t\tif (!validateValue(this, value)) value = undefined;\n\n\t\t\tif (value !== this._value) {\n\t\t\t\tthis._value = value;\n\t\t\t\tthis._displayValue = undefined;\n\t\t\t}\n\n\t\t\tif (this.row.data && this.column.data) {\n\t\t\t\tthis.row.data[this.column.data] = this._value;\n\t\t\t}\n\t\t}\n\t}\n\tevaluate() {\n\t\tthis._value = cellValueHandler[this.type](this.model.calculations.evaluate(this), this);\n\t\tthis._evaluated = true;\n\t\treturn this._value;\n\t}\n\n\tget value2() { return this.hasFormula ? prefixFormula(this.formula) : this.value }\n\n\tprivate _displayValue: string;\n\tget hasDisplayValue() { return this._displayValue != null }\n\tget displayValue() { return this._displayValue }\n\tset displayValue(v: string) { this._displayValue = v }\n\n\t/* tells if cell has type that prefers usage of display value */\n\tget prefersDisplayValue() { return ['s', 'm'].includes(this.type) }\n\n\tprivate _error: CellError;\n\tget error() { return this._error }\n\tset error(v: CellError) { this._error = v }\n\tget hasError() { return !!this._error }\n\tclearError() { this._error = undefined }\n\n\tprivate _spillRange: CellRange;\n\tprivate _prevSpillRange: CellRange;\n\tget spillRange() { return this._spillRange }\n\tget prevSpillRange() { return this._prevSpillRange }\n\tset spillRange(v: CellRange) {\n\t\tif (this._spillRange && (!v || !this._spillRange.equals(v))) {\n\t\t\tthis._prevSpillRange = this._spillRange;\n\t\t}\n\t\tthis._spillRange = v;\n\t}\n\tget isSpillSource() { return this._spillRange != null }\n\n\tprivate _spillSource: CellModel;\n\tget spillSource() { return this._spillSource }\n\tget isSpilled() { return this._spillSource != null }\n\tspillValue(v: unknown, source?: CellModel) {\n\t\tthis.value = v;\n\t\tthis._spillSource = source;\n\t}\n\tclearSpilledValue() {\n\t\tthis._spillSource = undefined;\n\t\tthis._value = undefined;\n\t}\n\n\tprivate _sparkline: boolean = null;\n\tget hasSparkline() {\n\t\treturn this._sparkline === null ? (this._sparkline = this.model.sparklines.has(this.address)) : this._sparkline;\n\t}\n\n\tprivate _hasComment?: boolean = null;\n\tget hasComment() {\n\t\treturn this._hasComment === null ? (\n\t\t\tthis._hasComment = (this.model.comments.get(this.address) ?? []).length > 0\n\t\t) : this._hasComment;\n\t}\n\tget comments() { return this.model.comments.get(this.address) }\n\n\tprivate _composedStyle: Style;\n\tprivate _cssStyle: CSSStyle;\n\tprivate _hasStyle?: boolean = null;\n\n\tget valueFormatter(): ValueFormatter<unknown> {\n\t\tconst formatter = super.valueFormatter ?? this.row.valueFormatter ?? this.column.valueFormatter;\n\t\tif (formatter) return formatter;\n\n\t\tconst type = this.type;\n\t\tconst format = this.format;\n\t\tconst { formatLocale, fixNumberFormat } = this.model.options;\n\t\tconst v = this.value;\n\n\t\tif (v == null || v === '') { // TODO: maybe allow DropdownFormatter for v === ''\n\t\t\treturn null;\n\t\t} else if (type == 'n') {\n\t\t\tif (format != null) return numbers.getNumberFormatter(formatLocale, format, fixNumberFormat);\n\t\t\telse return this.model.options.numberFormatter;\n\t\t} else if (type == 'g') {\n\t\t\tif (format != null) return numbers.getNumberFormatter(formatLocale, format, fixNumberFormat);\n\t\t\telse if (utils.isNumber(v)) return this.model.options.numberFormatter;\n\t\t} else if (type == 't') {\n\t\t\treturn format == null ? null : numbers.getNumberFormatter(formatLocale, format, false);\n\t\t} else if (type == 'd') {\n\t\t\treturn format ? dates.getDateFormatter(formatLocale, format) : this.model.options.dateFormatter;\n\t\t} else if (type == 's' && this.editorContent) {\n\t\t\treturn getDropdownFormatter(this.editorContent as {k: string, v: string}[]);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget formattedValue(): string {\n\t\tif (this.value == null) return '';\n\t\tif (this.hasDisplayValue) return this.displayValue;\n\t\tif (this.quotePrefix) return stripQuotePrefix(this.value) as string;\n\t\treturn this.valueFormatter ? this.valueFormatter(this.value) : this.value.toString();\n\t}\n\n\tprivate get elm1() { return this.row.priority >= this.column.priority ? this.row : this.column }\n\tprivate get elm2() { return this.row.priority < this.column.priority ? this.row : this.column }\n\n\tget clickable() { return super.clickable ?? this.elm1.clickable ?? this.elm2.clickable }\n\tget type() { return super.type ?? this.elm1.type ?? this.elm2.type ?? 'g' }\n\tset type(value: CellType) { this._type = value }\n\tget editorContent() { return super.editorContent ?? this.elm1.editorContent ?? this.elm2.editorContent ?? null }\n\tget adapter() { return super.adapter ?? this.elm1.adapter ?? this.elm2.adapter }\n\tset adapter(value: ComponentAdapter) { this._adapter = value }\n\n\tget address() { return this.column.address + this.row.address }\n\tget range() { return CellRange.fromA1(this.address) }\n\tget validation() { return super.validation ?? this.elm1.validation ?? this.elm2.validation ?? this.model.options.cellValidation }\n\tget editable() { return super.editable ?? this.elm1.editable ?? this.elm2.editable ?? this.model.options.editable }\n\tset editable(v: boolean) { this._editable = v }\n\tget commentable() { return super.commentable ?? this.elm1.commentable ?? this.elm2.commentable ?? this.model.options.commentable }\n\tget renderer() { return super.renderer ?? this.elm1.renderer ?? this.elm2.renderer }\n\tget afterRenderer() { return super.afterRenderer ?? this.elm1.afterRenderer ?? this.elm2.afterRenderer ?? this.model.options.afterRenderer }\n\tget commentRenderer() { return super.commentRenderer ?? this.elm1.commentRenderer ?? this.elm2.commentRenderer ?? this.model.options.comments.renderer }\n\tget editorFactory() { return super.editorFactory ?? this.elm1.editorFactory ?? this.elm2.editorFactory }\n\tget format() { return super.format ?? this.elm1.format ?? this.elm2.format }\n\tset format(v: numbers.NumberFormatString) { super.format = v }\n\n\tprivate _hyperlink : string;\n\tget hyperlink() { return this._hyperlink }\n\tset hyperlink(v: string) { this._hyperlink = v }\n\n\tprivate _hasFormula: boolean;\n\n\tget hasOwnFormula() { return !!this._formula }\n\tget hasFormula() {\n\t\tif (this._hasFormula == null) this._hasFormula = !!this.formula;\n\t\treturn this._hasFormula;\n\t}\n\tget formula() { return this._formula ?? this.elm1.formula ?? this.elm2.formula }\n\tset formula(v: string) {\n\t\tsuper.formula = v;\n\t\tthis.refreshFormula();\n\t}\n\n\tgetProperty(key: string) { return super.getProperty(key) ?? this.elm1.getProperty(key) ?? this.elm2.getProperty(key) }\n\n\tinvalidateValue() {\n\t\tif (this.hasFormula) {\n\t\t\tthis._value = undefined;\n\t\t\tthis._evaluated = false;\n\t\t} else {\n\t\t\tthis._evaluated = true;\n\t\t}\n\t\tthis.clearError();\n\t}\n\n\trefreshFormula() {\n\t\tthis._hasFormula = null;\n\t\tthis.invalidateValue();\n\t}\n\n\tclearFormula() {\n\t\tthis._formula = null;\n\t\tthis._hasFormula = false;\n\t\tthis._evaluated = true;\n\t}\n\n\tconstructor(model: GridModel, source: CellSource) {\n\t\tsuper(model);\n\t\tthis.row = model.rows[source.r];\n\t\tthis.column = model.columns[source.c];\n\t\tthis.populate(source);\n\t}\n\n\tpopulate(source: CellSource) {\n\t\tsuper.populate(source);\n\t\tthis._tooltip = source.tooltip;\n\t\tthis._hyperlink = source.hl;\n\t\tif (this._formula != null && this._formula !== '') this._evaluated = false;\n\t\telse if (source.v != null) this.value = source.v; // load static value only if no formula is present\n\t\tthis._displayValue = source.dv; // display value must be set after value\n\t}\n\n\tupdate(source: Partial<CellSource>) {\n\t\tconst updatedProps = super.update(source) as CellSource;\n\t\tif ('tooltip' in source) { updatedProps.tooltip = this._tooltip; this._tooltip = source.tooltip; }\n\t\tif ('hl' in source) { updatedProps.hl = this._hyperlink; this._hyperlink = source.hl; }\n\t\tif ('f' in source && this.model.formulasEnabled) { this._evaluated = false; }\n\t\telse if ('v' in source) { updatedProps.v = this.value; this.value = source.v; }\n\t\tif ('dv' in source) { updatedProps.dv = this._displayValue; this._displayValue = source.dv; }\n\t\treturn updatedProps;\n\t}\n\n\tgetSourceData(options?: CellSerializationOptions) : CellSource {\n\t\tconst data = super.getSourceData() as CellSource;\n\n\t\tif (this.merge) {\n\t\t\tdata.cs = this.merge.cs;\n\t\t\tdata.rs = this.merge.rs;\n\t\t}\n\n\t\tif (this.value != null) data.v = this.value;\n\t\tif (this.hasTooltip) data.tooltip = this._tooltip;\n\t\tif (this._hyperlink) data.hl = this._hyperlink;\n\n\t\tif (options) {\n\t\t\tif (options.displayValue && this.hasDisplayValue) data.dv = this._displayValue;\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tprivate createComposedStyle(columnStyle?: Style|number, rowStyle?: Style|number, extraStyle?: Style) {\n\t\tconst styles: (number|Style)[] = [];\n\n\t\tcolumnStyle = columnStyle || this.column.style;\n\t\trowStyle = rowStyle || this.row.style;\n\t\tif (columnStyle != null && rowStyle != null) {\n\t\t\tif (this.column.priority > this.row.priority) {\n\t\t\t\tstyles.push(rowStyle, columnStyle);\n\t\t\t} else {\n\t\t\t\tstyles.push(columnStyle, rowStyle);\n\t\t\t}\n\t\t}\n\t\telse if (columnStyle != null) styles.push(columnStyle);\n\t\telse if (rowStyle != null) styles.push(rowStyle);\n\n\t\tif (this.style != null) styles.push(this.style);\n\t\tif (extraStyle != null) styles.push(extraStyle);\n\n\t\treturn styles.length > 0 ? this.model.styles.merge(...styles) : null;\n\t}\n\n\tget composedStyle() : Style {\n\t\tif (this._hasStyle === null) {\n\t\t\tconst s = this.createComposedStyle(null, null, this.model.conditionalFormats.evaluate(this));\n\t\t\tthis._hasStyle = s != null;\n\t\t\tthis._composedStyle = s;\n\t\t}\n\t\treturn this._composedStyle;\n\t}\n\n\tget calculatedIndent(): number|null {\n\t\tconst s = this.composedStyle;\n\t\tif (s?.alignment?.indent) return s.alignment.indent;\n\n\t\t// calculates cell text indent based on row level\n\t\tif (this.column.levelIndent && this.row.level > 0) {\n\t\t\treturn this.row.level * this.model.options.levelIndentFactor;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget cssStyle() : CSSStyle {\n\t\tif (this._hasStyle === false) return null;\n\t\tif (!this._cssStyle) {\n\t\t\tconst composedStyle = this.composedStyle;\n\t\t\tif (composedStyle) {\n\t\t\t\tthis._cssStyle = styleToCSStyle(composedStyle);\n\t\t\t}\n\t\t}\n\t\treturn this._cssStyle;\n\t}\n\n\tinvalidateStyle() {\n\t\tthis._hasComment = null;\n\t\tthis._hasStyle = null;\n\t\tthis._composedStyle = null;\n\t\tthis._cssStyle = null;\n\t\tthis._sparkline = null;\n\t}\n\n\tsetStyleProperties(props: Record<StylePropertyKey, unknown>) {\n\t\tsuper.setStyleProperties(props);\n\t\tthis.invalidateStyle();\n\t}\n\n\tremoveStyleProperties(props: string[]) {\n\t\tsuper.removeStyleProperties(props);\n\t\tthis.invalidateStyle();\n\t}\n\n\tpreviewStyleProperties(\n\t\tprops: Record<StylePropertyKey, unknown>,\n\t\ttype: 'cell'|'column'|'row' = 'cell'\n\t) {\n\t\tconst composedStyle = Object.assign({}, this.createComposedStyle(type == 'column' ? props : null, type == 'row' ? props : null) ?? {});\n\n\t\tif (type == 'cell') {\n\t\t\tfor (const k in props) composedStyle[k] = props[k];\n\t\t}\n\t\tthis._hasStyle = true;\n\t\tthis._cssStyle = styleToCSStyle(composedStyle);\n\t}\n\n\tvalidate() {\n\t\tif (!this.validation) return true;\n\t\treturn validateValue(this, this.value);\n\t}\n\n\ttoString() { return this.address }\n\n}\n"]}
|
|
1
|
+
{"version":3,"file":"cellModel.js","sourceRoot":"","sources":["../../src/model/cellModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,KAAK,EAAE,OAAO,EAAE,KAAK,EAAkB,MAAM,iBAAiB,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,aAAa,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AACrG,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAGtC,OAAO,EAAE,YAAY,EAAiB,MAAM,gBAAgB,CAAC;AAI7D,OAAO,EAAY,cAAc,EAAE,MAAM,YAAY,CAAC;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ormatter } from \"@omegagrid/core\";\nimport { hasQuotePrefix, isFormula, prefixFormula, stripQuotePrefix } from \"../calculations/formula\";\nimport { CellRange } from \"../common\";\n// import { cellTypeRendererMap } from \"../renderers\";\nimport { ColumnModel } from \"./columnModel\";\nimport { ElementModel, ElementSource } from \"./elementModel\";\nimport { GridModel } from \"./gridModel\";\nimport { RowModel } from \"./rowModel\";\nimport { Style, StylePropertyKey } from \"./style\";\nimport { CSSStyle, styleToCSStyle } from \"./cssStyle\";\nimport { CellSerializationOptions, CellType } from \"../types\";\nimport { CommentSource } from \"./commentModel\";\nimport { validateValue } from \"./validations\";\n\n/** Source object type for grid cell */\nexport type CellSource = {\n\t/** row index */\n\tr: number;\n\t/** col index */\n\tc: number;\n\t/** cell value */\n\tv?: unknown;\n\t/** cell display value */\n\tdv?: string;\n\t/** cell column span */\n\tcs?: number;\n\t/** cell row span */\n\trs?: number;\n\t/** hyperlink */\n\thl?: string;\n\t/** cell tooltip content */\n\ttooltip?: string|unknown;\n\t/** comment */\n\tcomment?: CommentSource;\n} & ElementSource;\n\nconst cellValueHandler: Record<string, (v: unknown, cell: CellModel) => unknown> = {\n\t['n']: (v) => {\n\t\tconst value = utils.isString(v) ? parseFloat((v as string).replace(',', '.')) : v;\n\t\treturn Number.isNaN(value) ? v : value;\n\t},\n\t['t']: (v) => v,\n\t['d']: (v, cell) => {\n\t\tif (v == null || v === '') return null;\n\t\tif (utils.isString(v)) {\n\t\t\ttry {\n\t\t\t\treturn utils.isNumericString(v as string)\n\t\t\t\t\t? utils.strToNum(v as string)\n\t\t\t\t\t: dates.dateToSerialDate(dates.parse(v as string, cell.model.options.formatLocale));\n\t\t\t} catch (error) {\n\t\t\t\tcell.model.logger.error(`Invalid date value in cell ${cell.address}: ${v}`);\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\t\tif (v instanceof Date) return dates.dateToSerialDate(v);\n\t\treturn v;\n\t},\n\t// TODO: unfinnished implementation of time and datetime\n\t['tm']: (v) => utils.isString(v) ? new Date(v as string) : v,\n\t['dt']: (v) => utils.isString(v) ? new Date(v as string) : v,\n\t['b']: (v) => !!v && v !== '0' && v.toString().toLowerCase() !== 'false',\n\t['s']: (v) => v,\n\t['m']: (v) => v,\n\t['g']: (v) => {\n\t\tif (v == null || v === '') return null;\n\t\tconst f = parseFloat((v as string).toString().replace(',', '.'));\n\t\treturn isNaN(f) ? v : f;\n\t},\n\t['a']: (v) => utils.isString(v) && v !== '' ? JSON.parse(v as string) : v,\n\t['h']: (v) => v,\n};\n\n/** cell types whose values are entered as a free text, only those accept the quote prefix */\nconst quotePrefixTypes: CellType[] = ['t', 'n', 'g'];\n\nconst dropdownFormatters = new Map<{k: string, v: string}[], ValueFormatter<string>>();\nconst getDropdownFormatter = (content?: { k: string, v: string }[]) => {\n\tcontent = content || null;\n\tif (!dropdownFormatters.has(content)) {\n\t\tif (content) {\n\t\t\tconst items = content.reduce((map, e) => map.set(e.k, e.v), new Map<string, string>());\n\t\t\tdropdownFormatters.set(content, (k: string) => items.has(k) ? items.get(k) : k);\n\t\t} else {\n\t\t\tdropdownFormatters.set(content, (k: string) => k);\n\t\t}\n\t}\n\treturn dropdownFormatters.get(content);\n};\n\nexport type CellError = {\n\tmessage: string;\n\thandled?: boolean;\n\t/** the error stays until the cell value is invalidated, the cell is not evaluated meanwhile */\n\tpersistent?: boolean;\n}\n\nexport class CellModel extends ElementModel {\n\n\tpublic _content: HTMLDivElement;\n\n\tprivate _tooltip: string|unknown;\n\tget tooltip() { return this._tooltip }\n\tset tooltip(v: string|unknown) { this._tooltip = v }\n\tget hasTooltip() { return this._tooltip != null }\n\n\tget merge() { return this.model.merges.mergedCells.get(this.address) }\n\n\tprivate _row: RowModel;\n\tget row() { return this._row }\n\tset row(v: RowModel) { this._row = v }\n\tget r() { return this._row.index}\n\n\tprivate _column: ColumnModel;\n\tget column() { return this._column }\n\tset column(v: ColumnModel) { this._column = v }\n\tget c() { return this._column.index }\n\n\t/** tells if the entered value of the cell can be prefixed by the quote prefix */\n\tget quotePrefixable() { return quotePrefixTypes.includes(this.type) }\n\n\t/**\n\t * tells if the cell value is a quote prefixed plain text,\n\t * the prefix stays a part of the value, the display value holds the value without it\n\t */\n\tget quotePrefix() { return this.quotePrefixable && !this.hasFormula && hasQuotePrefix(this._value) }\n\n\t/** cell value without the quote prefix, used where the value is compared as a text (sorting, filtering) */\n\tget plainValue() { return this.quotePrefix ? stripQuotePrefix(this._value) : this.value }\n\n\tprivate _value: unknown;\n\tprivate _evaluated = true;\n\tget hasValue() { return this._value != null }\n\tget value() {\n\t\tif (!this._evaluated) this.evaluate();\n\t\treturn this._value\n\t}\n\tset value(v: unknown) {\n\t\tif (v && this.model.formulasEnabled && isFormula(v.toString())) {\n\t\t\tthis._value = undefined;\n\t\t\tthis.formula = v as string;\n\t\t} else {\n\t\t\tlet value = this.quotePrefixable && hasQuotePrefix(v) ? v : cellValueHandler[this.type](v, this);\n\n\t\t\tif (!validateValue(this, value)) value = undefined;\n\n\t\t\tif (value !== this._value) {\n\t\t\t\tthis._value = value;\n\t\t\t\tthis._displayValue = undefined;\n\t\t\t}\n\n\t\t\tif (this.row.data && this.column.data) {\n\t\t\t\tthis.row.data[this.column.data] = this._value;\n\t\t\t}\n\t\t}\n\t}\n\tevaluate() {\n\t\tthis._value = cellValueHandler[this.type](this.model.calculations.evaluate(this), this);\n\t\tthis._evaluated = true;\n\t\treturn this._value;\n\t}\n\n\tget value2() { return this.hasFormula ? prefixFormula(this.formula) : this.value }\n\n\tprivate _displayValue: string;\n\tget hasDisplayValue() { return this._displayValue != null }\n\tget displayValue() { return this._displayValue }\n\tset displayValue(v: string) { this._displayValue = v }\n\n\t/* tells if cell has type that prefers usage of display value */\n\tget prefersDisplayValue() { return ['s', 'm'].includes(this.type) }\n\n\tprivate _error: CellError;\n\tget error() { return this._error }\n\tset error(v: CellError) { this._error = v }\n\tget hasError() { return !!this._error }\n\tclearError() { this._error = undefined }\n\n\tprivate _spillRange: CellRange;\n\tprivate _prevSpillRange: CellRange;\n\tget spillRange() { return this._spillRange }\n\tget prevSpillRange() { return this._prevSpillRange }\n\tset spillRange(v: CellRange) {\n\t\tif (this._spillRange && (!v || !this._spillRange.equals(v))) {\n\t\t\tthis._prevSpillRange = this._spillRange;\n\t\t}\n\t\tthis._spillRange = v;\n\t}\n\tget isSpillSource() { return this._spillRange != null }\n\n\tprivate _spillSource: CellModel;\n\tget spillSource() { return this._spillSource }\n\tget isSpilled() { return this._spillSource != null }\n\tspillValue(v: unknown, source?: CellModel) {\n\t\tthis.value = v;\n\t\tthis._spillSource = source;\n\t}\n\tclearSpilledValue() {\n\t\tthis._spillSource = undefined;\n\t\tthis._value = undefined;\n\t}\n\n\tprivate _sparkline: boolean = null;\n\tget hasSparkline() {\n\t\treturn this._sparkline === null ? (this._sparkline = this.model.sparklines.has(this.address)) : this._sparkline;\n\t}\n\n\tprivate _hasComment?: boolean = null;\n\tget hasComment() {\n\t\treturn this._hasComment === null ? (\n\t\t\tthis._hasComment = (this.model.comments.get(this.address) ?? []).length > 0\n\t\t) : this._hasComment;\n\t}\n\tget comments() { return this.model.comments.get(this.address) }\n\n\tprivate _composedStyle: Style;\n\tprivate _cssStyle: CSSStyle;\n\tprivate _hasStyle?: boolean = null;\n\n\tget valueFormatter(): ValueFormatter<unknown> {\n\t\tconst formatter = super.valueFormatter ?? this.row.valueFormatter ?? this.column.valueFormatter;\n\t\tif (formatter) return formatter;\n\n\t\tconst type = this.type;\n\t\tconst format = this.format;\n\t\tconst { formatLocale, fixNumberFormat } = this.model.options;\n\t\tconst v = this.value;\n\n\t\tif (v == null || v === '') { // TODO: maybe allow DropdownFormatter for v === ''\n\t\t\treturn null;\n\t\t} else if (type == 'n') {\n\t\t\tif (format != null) return numbers.getNumberFormatter(formatLocale, format, fixNumberFormat);\n\t\t\telse return this.model.options.numberFormatter;\n\t\t} else if (type == 'g') {\n\t\t\tif (format != null) return numbers.getNumberFormatter(formatLocale, format, fixNumberFormat);\n\t\t\telse if (utils.isNumber(v)) return this.model.options.numberFormatter;\n\t\t} else if (type == 't') {\n\t\t\treturn format == null ? null : numbers.getNumberFormatter(formatLocale, format, false);\n\t\t} else if (type == 'd') {\n\t\t\treturn format ? dates.getDateFormatter(formatLocale, format) : this.model.options.dateFormatter;\n\t\t} else if (type == 's' && this.editorContent) {\n\t\t\treturn getDropdownFormatter(this.editorContent as {k: string, v: string}[]);\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget formattedValue(): string {\n\t\tif (this.value == null) return '';\n\t\tif (this.hasDisplayValue) return this.displayValue;\n\t\tif (this.quotePrefix) return stripQuotePrefix(this.value) as string;\n\t\treturn this.valueFormatter ? this.valueFormatter(this.value) : this.value.toString();\n\t}\n\n\tprivate get elm1() { return this.row.priority >= this.column.priority ? this.row : this.column }\n\tprivate get elm2() { return this.row.priority < this.column.priority ? this.row : this.column }\n\n\tget clickable() { return super.clickable ?? this.elm1.clickable ?? this.elm2.clickable }\n\tget type() { return super.type ?? this.elm1.type ?? this.elm2.type ?? 'g' }\n\tset type(value: CellType) { this._type = value }\n\tget editorContent() { return super.editorContent ?? this.elm1.editorContent ?? this.elm2.editorContent ?? null }\n\tget adapter() { return super.adapter ?? this.elm1.adapter ?? this.elm2.adapter }\n\tset adapter(value: ComponentAdapter) { this._adapter = value }\n\n\tget address() { return this.column.address + this.row.address }\n\tget range() { return CellRange.fromA1(this.address) }\n\tget validation() { return super.validation ?? this.elm1.validation ?? this.elm2.validation ?? this.model.options.cellValidation }\n\tget editable() { return super.editable ?? this.elm1.editable ?? this.elm2.editable ?? this.model.options.editable }\n\tset editable(v: boolean) { this._editable = v }\n\tget commentable() { return super.commentable ?? this.elm1.commentable ?? this.elm2.commentable ?? this.model.options.commentable }\n\tget renderer() { return super.renderer ?? this.elm1.renderer ?? this.elm2.renderer }\n\tget afterRenderer() { return super.afterRenderer ?? this.elm1.afterRenderer ?? this.elm2.afterRenderer ?? this.model.options.afterRenderer }\n\tget commentRenderer() { return super.commentRenderer ?? this.elm1.commentRenderer ?? this.elm2.commentRenderer ?? this.model.options.comments.renderer }\n\tget editorFactory() { return super.editorFactory ?? this.elm1.editorFactory ?? this.elm2.editorFactory }\n\tget format() { return super.format ?? this.elm1.format ?? this.elm2.format }\n\tset format(v: numbers.NumberFormatString) { super.format = v }\n\n\tprivate _hyperlink : string;\n\tget hyperlink() { return this._hyperlink }\n\tset hyperlink(v: string) { this._hyperlink = v }\n\n\tprivate _hasFormula: boolean;\n\n\tget hasOwnFormula() { return !!this._formula }\n\tget hasFormula() {\n\t\tif (this._hasFormula == null) this._hasFormula = !!this.formula;\n\t\treturn this._hasFormula;\n\t}\n\tget formula() { return this._formula ?? this.elm1.formula ?? this.elm2.formula }\n\tset formula(v: string) {\n\t\tsuper.formula = v;\n\t\tthis.refreshFormula();\n\t}\n\n\tgetProperty(key: string) { return super.getProperty(key) ?? this.elm1.getProperty(key) ?? this.elm2.getProperty(key) }\n\n\tinvalidateValue() {\n\t\tif (this.hasFormula) {\n\t\t\tthis._value = undefined;\n\t\t\tthis._evaluated = false;\n\t\t} else {\n\t\t\tthis._evaluated = true;\n\t\t}\n\t\tthis.clearError();\n\t}\n\n\trefreshFormula() {\n\t\tthis._hasFormula = null;\n\t\tthis.invalidateValue();\n\t}\n\n\tclearFormula() {\n\t\tthis._formula = null;\n\t\tthis._hasFormula = false;\n\t\tthis._evaluated = true;\n\t}\n\n\tconstructor(model: GridModel, source: CellSource) {\n\t\tsuper(model);\n\t\tthis.row = model.rows[source.r];\n\t\tthis.column = model.columns[source.c];\n\t\tthis.populate(source);\n\t}\n\n\tpopulate(source: CellSource) {\n\t\tsuper.populate(source);\n\t\tthis._tooltip = source.tooltip;\n\t\tthis._hyperlink = source.hl;\n\t\tif (this._formula != null && this._formula !== '') this._evaluated = false;\n\t\telse if (source.v != null) this.value = source.v; // load static value only if no formula is present\n\t\tthis._displayValue = source.dv; // display value must be set after value\n\t}\n\n\tupdate(source: Partial<CellSource>) {\n\t\tconst updatedProps = super.update(source) as CellSource;\n\t\tif ('tooltip' in source) { updatedProps.tooltip = this._tooltip; this._tooltip = source.tooltip; }\n\t\tif ('hl' in source) { updatedProps.hl = this._hyperlink; this._hyperlink = source.hl; }\n\t\tif ('f' in source && this.model.formulasEnabled) { this._evaluated = false; }\n\t\telse if ('v' in source) { updatedProps.v = this.value; this.value = source.v; }\n\t\tif ('dv' in source) { updatedProps.dv = this._displayValue; this._displayValue = source.dv; }\n\t\treturn updatedProps;\n\t}\n\n\tgetSourceData(options?: CellSerializationOptions) : CellSource {\n\t\tconst data = super.getSourceData() as CellSource;\n\n\t\tif (this.merge) {\n\t\t\tdata.cs = this.merge.cs;\n\t\t\tdata.rs = this.merge.rs;\n\t\t}\n\n\t\tif (this.value != null) data.v = this.value;\n\t\tif (this.hasTooltip) data.tooltip = this._tooltip;\n\t\tif (this._hyperlink) data.hl = this._hyperlink;\n\n\t\tif (options) {\n\t\t\tif (options.displayValue && this.hasDisplayValue) data.dv = this._displayValue;\n\t\t}\n\n\t\treturn data;\n\t}\n\n\tprivate createComposedStyle(columnStyle?: Style|number, rowStyle?: Style|number, extraStyle?: Style) {\n\t\tconst styles: (number|Style)[] = [];\n\n\t\tcolumnStyle = columnStyle || this.column.style;\n\t\trowStyle = rowStyle || this.row.style;\n\t\tif (columnStyle != null && rowStyle != null) {\n\t\t\tif (this.column.priority > this.row.priority) {\n\t\t\t\tstyles.push(rowStyle, columnStyle);\n\t\t\t} else {\n\t\t\t\tstyles.push(columnStyle, rowStyle);\n\t\t\t}\n\t\t}\n\t\telse if (columnStyle != null) styles.push(columnStyle);\n\t\telse if (rowStyle != null) styles.push(rowStyle);\n\n\t\tif (this.style != null) styles.push(this.style);\n\t\tif (extraStyle != null) styles.push(extraStyle);\n\n\t\treturn styles.length > 0 ? this.model.styles.merge(...styles) : null;\n\t}\n\n\tget composedStyle() : Style {\n\t\tif (this._hasStyle === null) {\n\t\t\tconst s = this.createComposedStyle(null, null, this.model.conditionalFormats.evaluate(this));\n\t\t\tthis._hasStyle = s != null;\n\t\t\tthis._composedStyle = s;\n\t\t}\n\t\treturn this._composedStyle;\n\t}\n\n\tget calculatedIndent(): number|null {\n\t\tconst s = this.composedStyle;\n\t\tif (s?.alignment?.indent) return s.alignment.indent;\n\n\t\t// calculates cell text indent based on row level\n\t\tif (this.column.levelIndent && this.row.level > 0) {\n\t\t\treturn this.row.level * this.model.options.levelIndentFactor;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\tget cssStyle() : CSSStyle {\n\t\tif (this._hasStyle === false) return null;\n\t\tif (!this._cssStyle) {\n\t\t\tconst composedStyle = this.composedStyle;\n\t\t\tif (composedStyle) {\n\t\t\t\tthis._cssStyle = styleToCSStyle(composedStyle);\n\t\t\t}\n\t\t}\n\t\treturn this._cssStyle;\n\t}\n\n\tinvalidateStyle() {\n\t\tthis._hasComment = null;\n\t\tthis._hasStyle = null;\n\t\tthis._composedStyle = null;\n\t\tthis._cssStyle = null;\n\t\tthis._sparkline = null;\n\t}\n\n\tsetStyleProperties(props: Record<StylePropertyKey, unknown>) {\n\t\tsuper.setStyleProperties(props);\n\t\tthis.invalidateStyle();\n\t}\n\n\tremoveStyleProperties(props: string[]) {\n\t\tsuper.removeStyleProperties(props);\n\t\tthis.invalidateStyle();\n\t}\n\n\tpreviewStyleProperties(\n\t\tprops: Record<StylePropertyKey, unknown>,\n\t\ttype: 'cell'|'column'|'row' = 'cell'\n\t) {\n\t\tconst composedStyle = Object.assign({}, this.createComposedStyle(type == 'column' ? props : null, type == 'row' ? props : null) ?? {});\n\n\t\tif (type == 'cell') {\n\t\t\tfor (const k in props) composedStyle[k] = props[k];\n\t\t}\n\t\tthis._hasStyle = true;\n\t\tthis._cssStyle = styleToCSStyle(composedStyle);\n\t}\n\n\tvalidate() {\n\t\tif (!this.validation) return true;\n\t\treturn validateValue(this, this.value);\n\t}\n\n\ttoString() { return this.address }\n\n}\n"]}
|
package/dist/model/options.d.ts
CHANGED
|
@@ -191,6 +191,8 @@ export type Options = {
|
|
|
191
191
|
editable?: boolean;
|
|
192
192
|
/** enables formulas, enabled by default */
|
|
193
193
|
formulas?: boolean;
|
|
194
|
+
/** maximum nesting depth of the formula evaluation, deeper reference chains end with an error */
|
|
195
|
+
maxCalculationDepth?: number;
|
|
194
196
|
/** enables default cell commenting */
|
|
195
197
|
commentable?: boolean;
|
|
196
198
|
/** enables autofill function */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/model/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxE,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGtD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG;IAC5B,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,2BAA2B;IAC3B,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,wCAAwC;IACxC,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,mCAAmC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,8BAA8B;IAC9B,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB,2CAA2C;IAC3C,UAAU,CAAC,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AAC;AACvB,CAAC","sourcesContent":["import { numbers, initCommonOptions, CommonOptions, dates, MenuItem, paper } from \"@omegagrid/core\";\nimport { CellValidation, CellValidationSource, Renderer, StyleSource } from \"../types\";\nimport { CommentOptions, FilterSettings, SortSettings } from \"../model\";\nimport constants, { DEFAULT_FILTER_OPTIONS, DEFAULT_TREE_OPTIONS } from \"../constants\";\nimport { utils } from \"@omegagrid/core\";\nimport { ElementModel } from \"./elementModel\";\nimport { CellModel, CellSource } from \"./cellModel\";\nimport { RowModel } from \"./rowModel\";\nimport { ColumnModel } from \"./columnModel\";\nimport { CellAddress, RangeAddress } from \"../common\";\nimport { normalizeCellValidation } from \"./validations\";\n\nexport type ViewMode = 'grid' | 'singleObject';\n\nexport type EditingOptions = {\n\t/** enable inserting new rows */\n\trowInsertion?: boolean,\n\n\t/** enable deleting rows */\n\trowDeletion?: boolean,\n\n\t/** enable editing row outline levels */\n\trowOutline?: boolean,\n\n\t/** enable inserting new columns */\n\tcolInsertion?: boolean,\n\n\t/** enable deleting columns */\n\tcolDeletion?: boolean,\n\n\t/** enable editing column outline levels */\n\tcolOutline?: boolean,\n\n\t/** use calendar editor for date cells */\n\tdateCalendarEditor?: boolean,\n\n};\n\nexport type ScrollingOptions = {\n\t/** maximum proximity of cursor to scrollbar to be visible */\n\tscrollbarVisibilityTreshold?: number,\n\n\t/** enable vertical overscroll */\n\tverticalOverscroll?: boolean,\n\n\t/** enable horizontal overscroll */\n\thorizontalOverscroll?: boolean,\n};\n\nexport type GridMenuItem<T extends ElementModel> = MenuItem & {\n\thidden?: (model: T) => boolean,\n}\n\nexport type MenuOptionsItem<T extends ElementModel> = {\n\titems: GridMenuItem<T>[],\n\thidden?: (model: T) => boolean,\n\treplace?: boolean\n};\n\nexport type MenuOptions = {\n\tcell: MenuOptionsItem<CellModel>,\n\trow: MenuOptionsItem<RowModel>,\n\tcolumn: MenuOptionsItem<ColumnModel>,\n};\n\nexport type EventOptions = {\n\t/** grid click event options */\n\tclick: {\n\t\t/** maximum mouse move path length, after click event is allowed */\n\t\tmouseMoveTreshold: number\n\t}\n};\n\nexport type SortingOptions = {\n\t/** column sorting enabled */\n\tenabled?: boolean,\n\t\n\t/** maximum number of columns that can be sorted */\n\tmaxColumns?: number,\n\t\n\t/** initial sorting settings */\n\tdefaultSettings?: SortSettings[]\n};\n\nexport type FilterOptions = {\n\tenabled?: boolean;\n\t/** the parents of the matched rows will be included in the results */\n\tincludeParents?: boolean;\n\t/** the children of the matched rows will be included in the results */\n\tincludeChildren?: boolean;\n\t/** initial filter settings */\n\tdefaultSettings?: FilterSettings[]\n}\n\nexport type SelectingOptions = {\n\tenabled?: boolean;\n\tmultiSelect?: boolean;\n}\n\n\nexport type TreeOptions = {\n\tenabled?: boolean;\n\treversed?: boolean;\n}\n\nexport type PasteMode = 'insert'|'rewrite'|'rewrite_append';\n\nexport type ClipboardOptions = {\n\tpasteProps: (keyof CellSource)[]|'all';\n\n\t/**\n\t * paste mode for rows, \n\t * \tinsert = always insert new rows\n\t * \trewrite = rewrite when rows are availible\n\t * \trewrite_append = rewrite when rows are availible, otherwise insert new rows; default\n\t */\n\trowPasteMode?: PasteMode;\n\n\t/**\n\t * paste mode for columns, \n\t * \tinsert = always insert new columns\n\t * \trewrite = rewrite when columns are availible; default\n\t * \trewrite_append = rewrite when columns are availible, otherwise insert new columns\n\t */\n\tcolumnPasteMode?: PasteMode;\n\n\t/**\n\t * Skips hidden rows when pasting data.\n\t * Values are pasted into nearest visible row.\n\t */\n\tskipHiddenRows?: boolean;\n}\n\nexport type PrintOptions = {\n\t/** idexes of rows, after which page break will be inserted */\n\trowBreaks?: number[];\n\n\t/** range of rows to repeat at the top of each page, eg: \"1:20\" */\n\trowTitles?: RangeAddress;\n\n\t/** print scale, 50 = 50% */\n\tscale?: number;\n\n\t/** print page orientation */\n\torientation?: 'landscape'|'portrait';\n\n\t/** print quality */\n\tdpi?: number;\n\n\t/** print paper size */\n\tpaper?: paper.PaperType|paper.PaperSize;\n\n\t/** page margin settings */\n\tmargins?: {\n\t\ttop: number,\n\t\tbottom: number,\n\t\tleft: number,\n\t\tright: number,\n\t\theader: number,\n\t\tfooter: number\n\t}\n}\n\nexport type HeaderOptions = {\n\tstyle?: StyleSource;\n}\n\nexport type Options = {\n\tviewMode?: ViewMode,\n\n\t/** default number of rows */\n\trows?: number;\n\n\t/** default number of columns */\n\tcolumns?: number;\n\n\t/** readOnly cells */\n\treadOnly?: boolean;\n\n\t/** header options */\n\theaders?: HeaderOptions;\n\n\t/** render column with row numbers */\n\trowNumbers?: boolean;\n\n\t/** render column with row numbers */\n\trowResize?: boolean;\n\n\t/** default row priority */\n\trowPriority?: number;\n\n\t/** render column with row tree outline */\n\trowTree?: TreeOptions;\n\n\t/** render header row with column letters */\n\tcolLetters?: boolean;\n\n\t/** render row with column tree outline */\n\tcolumnTree?: TreeOptions;\n\n\t/** default column priority */\n\tcolumnPriority?: number;\n\n\t/** render column with row numbers */\n\tcolumnResize?: boolean;\n\n\t/** render tree buttons in column header labels */\n\tcolumnHeaderTreeButtons?: boolean;\n\n\t/** number of freezed rows on the top */\n\tfreezeTop?: number;\n\t\n\t/** number of freezed columns on the left */\n\tfreezeLeft?: number;\n\n\t/** number of freezed columns on the right, not implemented yet */\n\tfreezeRight?: number;\n\n\t/** number of freezed rows on the bottom, not implemented yet */\n\tfreezeBottom?: number;\n\n\t/** default font size */\n\tfontSize?: number;\n\n\t/** default row height */\n\trowHeight?: number;\n\n\t/** remove row hidden property after its parent is expanded */\n\tunhideRowAfterExpand?: boolean;\n\n\t/** default column width */\n\tcolumnWidth?: number;\n\n\t/** remove column hidden property after its parent is expanded */\n\tunhideColumnAfterExpand?: boolean;\n\n\t/** style source are native css styles */\n\tcssStyles?: boolean;\n\n\t/** cell border visibility */\n\tgrid?: boolean,\n\t\n\t/** column filter options */\n\tfilters?: FilterOptions,\n\n\t/** default number format */\n\tnumberFormat?: string,\n\t\n\t/** tries to repair invalid number/date formats */\n\tfixNumberFormat?: boolean,\n\n\t/** shows click indicator even in cells without value */\n\temptyClickable?: boolean,\n\n\t/** custom number formatter function */\n\tnumberFormatter?: numbers.NumberFormatterFunction,\n\n\t/** custom date formatter function */\n\tdateFormatter?: dates.DateFormatterFunction,\n\t\n\t/** enables default cell editing */\n\teditable?: boolean,\n\n\t/** enables formulas, enabled by default */\n\tformulas?: boolean,\n\n\t/** enables default cell commenting */\n\tcommentable?: boolean,\n\n\t/** enables autofill function */\n\tautofill?: boolean,\n\n\t/** number of rows on one page for dynamic row fetching */\n\tpageSize?: number,\n\n\t/** enables command window */\n\tcommandWindow?: boolean,\n\n\t/** enables undo/redo */\n\tundoRedo?: boolean,\n\n\t/** location of cell with level buttons */\n\tlevelButtonCell?: {c: number, r: number},\n\n\t/** shows placeholder if grid is empty */\n\temptyPlaceholder?: boolean,\n\n\t/** custom cell renderer applied after default renderers */\n\tafterRenderer?: Renderer,\n\n\t/** factor of cell indentation */\n\tcellIndentFactor?: number,\n\n\t/** factor of level indentation */\n\tlevelIndentFactor?: number,\n\n\t/** menu options */\n\tmenus?: MenuOptions,\n\n\t/** editing options */\n\tediting?: EditingOptions,\n\n\t/** selecting options */\n\tselecting?: SelectingOptions,\n\n\t/** comment options */\n\tcomments?: CommentOptions,\n\t\n\t/** scrolling options */\n\tscrolling?: ScrollingOptions,\n\n\t/** event options */\n\tevents?: EventOptions,\n\t\n\t/** max number of sorted columns, deprecated */\n\tmaxSortingColumns?: number;\n\n\t/** enabled column sorting, deprecated */\n\tcolumnSorting?: boolean,\n\n\t/** column sorting options */\n\tsorting?: SortingOptions,\n\n\t/** clipboard options */\n\tclipboard?: ClipboardOptions,\n\n\t/** default cell validation rules */\n\tcellValidation?: CellValidation,\n\n\t/** first cell in viewport */\n\tfirstCell?: CellAddress,\n\n\t/** cell element caching */\n\tcellCache?: boolean,\n\n\t/** use single cell model instance for all grid cells */\n\tsingleCellModel?: boolean,\n\n\t/** options for raw html export/print */\n\tprint?: PrintOptions,\n\n\t/** grid zoom factor */\n\tzoom?: number,\n\n\t/** hides the outer border of the grid (right and top) */\n\thideOuterBorder?: boolean,\n} & CommonOptions;\n\nexport type OptionSource = Omit<Options, 'rowTree'|'columnTree'|'filters'|'cellValidation'> & {\n\trowTree?: boolean|TreeOptions;\n\tcolumnTree?: boolean|TreeOptions;\n\tfilters?: boolean|FilterOptions;\n\tcellValidation?: CellValidationSource;\n}\n\nexport function initOptions(options?: Partial<OptionSource>, origOptions: OptionSource = null): Options {\n\tconst opt = utils.mergeDeep<OptionSource>({}, constants.DEFAULT_OPTIONS, origOptions, initCommonOptions(options, origOptions));\n\t\n\tif (opt.numberFormat) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale, opt.numberFormat);\n\t} else if (!opt.numberFormatter) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.dateFormat) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale, opt.dateFormat);\n\t} else if (!opt.dateFormatter) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.columnSorting) {\n\t\topt.sorting = opt.sorting || {enabled: true};\n\t}\n\t\n\tif (typeof opt.filters === 'boolean') opt.filters = {enabled: opt.filters};\n\topt.filters = Object.assign({}, DEFAULT_FILTER_OPTIONS, opt.filters);\n\n\tif (typeof opt.rowTree === 'boolean') opt.rowTree = {enabled: opt.rowTree};\n\topt.rowTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.rowTree);\n\n\tif (typeof opt.columnTree === 'boolean') opt.columnTree = {enabled: opt.columnTree};\n\topt.columnTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.columnTree);\n\n\tif (opt.cellValidation) opt.cellValidation = normalizeCellValidation(opt.cellValidation);\n\n\treturn opt as Options;\n}"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/model/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAA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AAK,SAAS;QAAE,GAAG,CAAC,OAAO,GAAG,EAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAC,CAAC;IAC3E,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,sBAAsB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAErE,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,SAAS;QAAE,GAAG,CAAC,OAAO,GAAG,EAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAC,CAAC;IAC3E,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAoB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnE,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,SAAS;QAAE,GAAG,CAAC,UAAU,GAAG,EAAC,OAAO,EAAE,GAAG,CAAC,UAAU,EAAC,CAAC;IACpF,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAoB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAEzE,IAAI,GAAG,CAAC,cAAc;QAAE,GAAG,CAAC,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEzF,OAAO,GAAc,CAAC;AACvB,CAAC","sourcesContent":["import { numbers, initCommonOptions, CommonOptions, dates, MenuItem, paper } from \"@omegagrid/core\";\nimport { CellValidation, CellValidationSource, Renderer, StyleSource } from \"../types\";\nimport { CommentOptions, FilterSettings, SortSettings } from \"../model\";\nimport constants, { DEFAULT_FILTER_OPTIONS, DEFAULT_TREE_OPTIONS } from \"../constants\";\nimport { utils } from \"@omegagrid/core\";\nimport { ElementModel } from \"./elementModel\";\nimport { CellModel, CellSource } from \"./cellModel\";\nimport { RowModel } from \"./rowModel\";\nimport { ColumnModel } from \"./columnModel\";\nimport { CellAddress, RangeAddress } from \"../common\";\nimport { normalizeCellValidation } from \"./validations\";\n\nexport type ViewMode = 'grid' | 'singleObject';\n\nexport type EditingOptions = {\n\t/** enable inserting new rows */\n\trowInsertion?: boolean,\n\n\t/** enable deleting rows */\n\trowDeletion?: boolean,\n\n\t/** enable editing row outline levels */\n\trowOutline?: boolean,\n\n\t/** enable inserting new columns */\n\tcolInsertion?: boolean,\n\n\t/** enable deleting columns */\n\tcolDeletion?: boolean,\n\n\t/** enable editing column outline levels */\n\tcolOutline?: boolean,\n\n\t/** use calendar editor for date cells */\n\tdateCalendarEditor?: boolean,\n\n};\n\nexport type ScrollingOptions = {\n\t/** maximum proximity of cursor to scrollbar to be visible */\n\tscrollbarVisibilityTreshold?: number,\n\n\t/** enable vertical overscroll */\n\tverticalOverscroll?: boolean,\n\n\t/** enable horizontal overscroll */\n\thorizontalOverscroll?: boolean,\n};\n\nexport type GridMenuItem<T extends ElementModel> = MenuItem & {\n\thidden?: (model: T) => boolean,\n}\n\nexport type MenuOptionsItem<T extends ElementModel> = {\n\titems: GridMenuItem<T>[],\n\thidden?: (model: T) => boolean,\n\treplace?: boolean\n};\n\nexport type MenuOptions = {\n\tcell: MenuOptionsItem<CellModel>,\n\trow: MenuOptionsItem<RowModel>,\n\tcolumn: MenuOptionsItem<ColumnModel>,\n};\n\nexport type EventOptions = {\n\t/** grid click event options */\n\tclick: {\n\t\t/** maximum mouse move path length, after click event is allowed */\n\t\tmouseMoveTreshold: number\n\t}\n};\n\nexport type SortingOptions = {\n\t/** column sorting enabled */\n\tenabled?: boolean,\n\t\n\t/** maximum number of columns that can be sorted */\n\tmaxColumns?: number,\n\t\n\t/** initial sorting settings */\n\tdefaultSettings?: SortSettings[]\n};\n\nexport type FilterOptions = {\n\tenabled?: boolean;\n\t/** the parents of the matched rows will be included in the results */\n\tincludeParents?: boolean;\n\t/** the children of the matched rows will be included in the results */\n\tincludeChildren?: boolean;\n\t/** initial filter settings */\n\tdefaultSettings?: FilterSettings[]\n}\n\nexport type SelectingOptions = {\n\tenabled?: boolean;\n\tmultiSelect?: boolean;\n}\n\n\nexport type TreeOptions = {\n\tenabled?: boolean;\n\treversed?: boolean;\n}\n\nexport type PasteMode = 'insert'|'rewrite'|'rewrite_append';\n\nexport type ClipboardOptions = {\n\tpasteProps: (keyof CellSource)[]|'all';\n\n\t/**\n\t * paste mode for rows, \n\t * \tinsert = always insert new rows\n\t * \trewrite = rewrite when rows are availible\n\t * \trewrite_append = rewrite when rows are availible, otherwise insert new rows; default\n\t */\n\trowPasteMode?: PasteMode;\n\n\t/**\n\t * paste mode for columns, \n\t * \tinsert = always insert new columns\n\t * \trewrite = rewrite when columns are availible; default\n\t * \trewrite_append = rewrite when columns are availible, otherwise insert new columns\n\t */\n\tcolumnPasteMode?: PasteMode;\n\n\t/**\n\t * Skips hidden rows when pasting data.\n\t * Values are pasted into nearest visible row.\n\t */\n\tskipHiddenRows?: boolean;\n}\n\nexport type PrintOptions = {\n\t/** idexes of rows, after which page break will be inserted */\n\trowBreaks?: number[];\n\n\t/** range of rows to repeat at the top of each page, eg: \"1:20\" */\n\trowTitles?: RangeAddress;\n\n\t/** print scale, 50 = 50% */\n\tscale?: number;\n\n\t/** print page orientation */\n\torientation?: 'landscape'|'portrait';\n\n\t/** print quality */\n\tdpi?: number;\n\n\t/** print paper size */\n\tpaper?: paper.PaperType|paper.PaperSize;\n\n\t/** page margin settings */\n\tmargins?: {\n\t\ttop: number,\n\t\tbottom: number,\n\t\tleft: number,\n\t\tright: number,\n\t\theader: number,\n\t\tfooter: number\n\t}\n}\n\nexport type HeaderOptions = {\n\tstyle?: StyleSource;\n}\n\nexport type Options = {\n\tviewMode?: ViewMode,\n\n\t/** default number of rows */\n\trows?: number;\n\n\t/** default number of columns */\n\tcolumns?: number;\n\n\t/** readOnly cells */\n\treadOnly?: boolean;\n\n\t/** header options */\n\theaders?: HeaderOptions;\n\n\t/** render column with row numbers */\n\trowNumbers?: boolean;\n\n\t/** render column with row numbers */\n\trowResize?: boolean;\n\n\t/** default row priority */\n\trowPriority?: number;\n\n\t/** render column with row tree outline */\n\trowTree?: TreeOptions;\n\n\t/** render header row with column letters */\n\tcolLetters?: boolean;\n\n\t/** render row with column tree outline */\n\tcolumnTree?: TreeOptions;\n\n\t/** default column priority */\n\tcolumnPriority?: number;\n\n\t/** render column with row numbers */\n\tcolumnResize?: boolean;\n\n\t/** render tree buttons in column header labels */\n\tcolumnHeaderTreeButtons?: boolean;\n\n\t/** number of freezed rows on the top */\n\tfreezeTop?: number;\n\t\n\t/** number of freezed columns on the left */\n\tfreezeLeft?: number;\n\n\t/** number of freezed columns on the right, not implemented yet */\n\tfreezeRight?: number;\n\n\t/** number of freezed rows on the bottom, not implemented yet */\n\tfreezeBottom?: number;\n\n\t/** default font size */\n\tfontSize?: number;\n\n\t/** default row height */\n\trowHeight?: number;\n\n\t/** remove row hidden property after its parent is expanded */\n\tunhideRowAfterExpand?: boolean;\n\n\t/** default column width */\n\tcolumnWidth?: number;\n\n\t/** remove column hidden property after its parent is expanded */\n\tunhideColumnAfterExpand?: boolean;\n\n\t/** style source are native css styles */\n\tcssStyles?: boolean;\n\n\t/** cell border visibility */\n\tgrid?: boolean,\n\t\n\t/** column filter options */\n\tfilters?: FilterOptions,\n\n\t/** default number format */\n\tnumberFormat?: string,\n\t\n\t/** tries to repair invalid number/date formats */\n\tfixNumberFormat?: boolean,\n\n\t/** shows click indicator even in cells without value */\n\temptyClickable?: boolean,\n\n\t/** custom number formatter function */\n\tnumberFormatter?: numbers.NumberFormatterFunction,\n\n\t/** custom date formatter function */\n\tdateFormatter?: dates.DateFormatterFunction,\n\t\n\t/** enables default cell editing */\n\teditable?: boolean,\n\n\t/** enables formulas, enabled by default */\n\tformulas?: boolean,\n\n\t/** maximum nesting depth of the formula evaluation, deeper reference chains end with an error */\n\tmaxCalculationDepth?: number,\n\n\t/** enables default cell commenting */\n\tcommentable?: boolean,\n\n\t/** enables autofill function */\n\tautofill?: boolean,\n\n\t/** number of rows on one page for dynamic row fetching */\n\tpageSize?: number,\n\n\t/** enables command window */\n\tcommandWindow?: boolean,\n\n\t/** enables undo/redo */\n\tundoRedo?: boolean,\n\n\t/** location of cell with level buttons */\n\tlevelButtonCell?: {c: number, r: number},\n\n\t/** shows placeholder if grid is empty */\n\temptyPlaceholder?: boolean,\n\n\t/** custom cell renderer applied after default renderers */\n\tafterRenderer?: Renderer,\n\n\t/** factor of cell indentation */\n\tcellIndentFactor?: number,\n\n\t/** factor of level indentation */\n\tlevelIndentFactor?: number,\n\n\t/** menu options */\n\tmenus?: MenuOptions,\n\n\t/** editing options */\n\tediting?: EditingOptions,\n\n\t/** selecting options */\n\tselecting?: SelectingOptions,\n\n\t/** comment options */\n\tcomments?: CommentOptions,\n\t\n\t/** scrolling options */\n\tscrolling?: ScrollingOptions,\n\n\t/** event options */\n\tevents?: EventOptions,\n\t\n\t/** max number of sorted columns, deprecated */\n\tmaxSortingColumns?: number;\n\n\t/** enabled column sorting, deprecated */\n\tcolumnSorting?: boolean,\n\n\t/** column sorting options */\n\tsorting?: SortingOptions,\n\n\t/** clipboard options */\n\tclipboard?: ClipboardOptions,\n\n\t/** default cell validation rules */\n\tcellValidation?: CellValidation,\n\n\t/** first cell in viewport */\n\tfirstCell?: CellAddress,\n\n\t/** cell element caching */\n\tcellCache?: boolean,\n\n\t/** use single cell model instance for all grid cells */\n\tsingleCellModel?: boolean,\n\n\t/** options for raw html export/print */\n\tprint?: PrintOptions,\n\n\t/** grid zoom factor */\n\tzoom?: number,\n\n\t/** hides the outer border of the grid (right and top) */\n\thideOuterBorder?: boolean,\n} & CommonOptions;\n\nexport type OptionSource = Omit<Options, 'rowTree'|'columnTree'|'filters'|'cellValidation'> & {\n\trowTree?: boolean|TreeOptions;\n\tcolumnTree?: boolean|TreeOptions;\n\tfilters?: boolean|FilterOptions;\n\tcellValidation?: CellValidationSource;\n}\n\nexport function initOptions(options?: Partial<OptionSource>, origOptions: OptionSource = null): Options {\n\tconst opt = utils.mergeDeep<OptionSource>({}, constants.DEFAULT_OPTIONS, origOptions, initCommonOptions(options, origOptions));\n\t\n\tif (opt.numberFormat) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale, opt.numberFormat);\n\t} else if (!opt.numberFormatter) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.dateFormat) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale, opt.dateFormat);\n\t} else if (!opt.dateFormatter) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.columnSorting) {\n\t\topt.sorting = opt.sorting || {enabled: true};\n\t}\n\t\n\tif (typeof opt.filters === 'boolean') opt.filters = {enabled: opt.filters};\n\topt.filters = Object.assign({}, DEFAULT_FILTER_OPTIONS, opt.filters);\n\n\tif (typeof opt.rowTree === 'boolean') opt.rowTree = {enabled: opt.rowTree};\n\topt.rowTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.rowTree);\n\n\tif (typeof opt.columnTree === 'boolean') opt.columnTree = {enabled: opt.columnTree};\n\topt.columnTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.columnTree);\n\n\tif (opt.cellValidation) opt.cellValidation = normalizeCellValidation(opt.cellValidation);\n\n\treturn opt as Options;\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/grid-core",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.3",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Grid model, no ui components",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"generate-functions-docs": "node ./scripts/generate-functions-docs.cjs"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@omegagrid/core": "^0.11.
|
|
32
|
-
"@omegagrid/localize": "^0.11.
|
|
31
|
+
"@omegagrid/core": "^0.11.3",
|
|
32
|
+
"@omegagrid/localize": "^0.11.3",
|
|
33
33
|
"@stdlib/stats": "^0.0.13",
|
|
34
34
|
"color": "^4.2.3",
|
|
35
35
|
"date-fns": "^3.2.0",
|