@omegagrid/grid-core 0.10.0 → 0.10.2

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.
Files changed (201) hide show
  1. package/package.json +3 -3
  2. package/dist/__generated/functions.d.ts +0 -4
  3. package/dist/__generated/functions.d.ts.map +0 -1
  4. package/dist/__generated/functions.js +0 -45
  5. package/dist/__generated/functions.js.map +0 -1
  6. package/dist/calculations/autofill.d.ts +0 -7
  7. package/dist/calculations/autofill.d.ts.map +0 -1
  8. package/dist/calculations/autofill.js +0 -84
  9. package/dist/calculations/autofill.js.map +0 -1
  10. package/dist/calculations/conditions.d.ts +0 -4
  11. package/dist/calculations/conditions.d.ts.map +0 -1
  12. package/dist/calculations/conditions.js +0 -41
  13. package/dist/calculations/conditions.js.map +0 -1
  14. package/dist/calculations/context.d.ts +0 -53
  15. package/dist/calculations/context.d.ts.map +0 -1
  16. package/dist/calculations/context.js +0 -85
  17. package/dist/calculations/context.js.map +0 -1
  18. package/dist/calculations/formula.d.ts +0 -89
  19. package/dist/calculations/formula.d.ts.map +0 -1
  20. package/dist/calculations/formula.js +0 -443
  21. package/dist/calculations/formula.js.map +0 -1
  22. package/dist/calculations/functions/dates.d.ts +0 -13
  23. package/dist/calculations/functions/dates.d.ts.map +0 -1
  24. package/dist/calculations/functions/dates.js +0 -58
  25. package/dist/calculations/functions/dates.js.map +0 -1
  26. package/dist/calculations/functions/index.d.ts +0 -11
  27. package/dist/calculations/functions/index.d.ts.map +0 -1
  28. package/dist/calculations/functions/index.js +0 -21
  29. package/dist/calculations/functions/index.js.map +0 -1
  30. package/dist/calculations/functions/logical.d.ts +0 -11
  31. package/dist/calculations/functions/logical.d.ts.map +0 -1
  32. package/dist/calculations/functions/logical.js +0 -50
  33. package/dist/calculations/functions/logical.js.map +0 -1
  34. package/dist/calculations/functions/lookup.d.ts +0 -18
  35. package/dist/calculations/functions/lookup.d.ts.map +0 -1
  36. package/dist/calculations/functions/lookup.js +0 -169
  37. package/dist/calculations/functions/lookup.js.map +0 -1
  38. package/dist/calculations/functions/math.d.ts +0 -72
  39. package/dist/calculations/functions/math.d.ts.map +0 -1
  40. package/dist/calculations/functions/math.js +0 -182
  41. package/dist/calculations/functions/math.js.map +0 -1
  42. package/dist/calculations/functions/special.d.ts +0 -2
  43. package/dist/calculations/functions/special.d.ts.map +0 -1
  44. package/dist/calculations/functions/special.js +0 -51
  45. package/dist/calculations/functions/special.js.map +0 -1
  46. package/dist/calculations/functions/statistical.d.ts +0 -7
  47. package/dist/calculations/functions/statistical.d.ts.map +0 -1
  48. package/dist/calculations/functions/statistical.js +0 -47
  49. package/dist/calculations/functions/statistical.js.map +0 -1
  50. package/dist/calculations/functions/text.d.ts +0 -29
  51. package/dist/calculations/functions/text.d.ts.map +0 -1
  52. package/dist/calculations/functions/text.js +0 -58
  53. package/dist/calculations/functions/text.js.map +0 -1
  54. package/dist/calculations/helpers.d.ts +0 -13
  55. package/dist/calculations/helpers.d.ts.map +0 -1
  56. package/dist/calculations/helpers.js +0 -32
  57. package/dist/calculations/helpers.js.map +0 -1
  58. package/dist/calculations/index.d.ts +0 -7
  59. package/dist/calculations/index.d.ts.map +0 -1
  60. package/dist/calculations/index.js +0 -7
  61. package/dist/calculations/index.js.map +0 -1
  62. package/dist/calculations/operators.d.ts +0 -19
  63. package/dist/calculations/operators.d.ts.map +0 -1
  64. package/dist/calculations/operators.js +0 -58
  65. package/dist/calculations/operators.js.map +0 -1
  66. package/dist/calculations/tokenization.d.ts +0 -36
  67. package/dist/calculations/tokenization.d.ts.map +0 -1
  68. package/dist/calculations/tokenization.js +0 -203
  69. package/dist/calculations/tokenization.js.map +0 -1
  70. package/dist/common/index.d.ts +0 -2
  71. package/dist/common/index.d.ts.map +0 -1
  72. package/dist/common/index.js +0 -2
  73. package/dist/common/index.js.map +0 -1
  74. package/dist/common/range.d.ts +0 -66
  75. package/dist/common/range.d.ts.map +0 -1
  76. package/dist/common/range.js +0 -222
  77. package/dist/common/range.js.map +0 -1
  78. package/dist/constants.d.ts +0 -68
  79. package/dist/constants.d.ts.map +0 -1
  80. package/dist/constants.js +0 -127
  81. package/dist/constants.js.map +0 -1
  82. package/dist/index.d.ts +0 -8
  83. package/dist/index.d.ts.map +0 -1
  84. package/dist/index.js +0 -8
  85. package/dist/index.js.map +0 -1
  86. package/dist/model/calculationModel.d.ts +0 -30
  87. package/dist/model/calculationModel.d.ts.map +0 -1
  88. package/dist/model/calculationModel.js +0 -206
  89. package/dist/model/calculationModel.js.map +0 -1
  90. package/dist/model/cellModel.d.ts +0 -134
  91. package/dist/model/cellModel.d.ts.map +0 -1
  92. package/dist/model/cellModel.js +0 -371
  93. package/dist/model/cellModel.js.map +0 -1
  94. package/dist/model/columnModel.d.ts +0 -160
  95. package/dist/model/columnModel.d.ts.map +0 -1
  96. package/dist/model/columnModel.js +0 -159
  97. package/dist/model/columnModel.js.map +0 -1
  98. package/dist/model/commentModel.d.ts +0 -58
  99. package/dist/model/commentModel.d.ts.map +0 -1
  100. package/dist/model/commentModel.js +0 -81
  101. package/dist/model/commentModel.js.map +0 -1
  102. package/dist/model/conditionalFormats.d.ts +0 -104
  103. package/dist/model/conditionalFormats.d.ts.map +0 -1
  104. package/dist/model/conditionalFormats.js +0 -414
  105. package/dist/model/conditionalFormats.js.map +0 -1
  106. package/dist/model/cssStyle.d.ts +0 -20
  107. package/dist/model/cssStyle.d.ts.map +0 -1
  108. package/dist/model/cssStyle.js +0 -301
  109. package/dist/model/cssStyle.js.map +0 -1
  110. package/dist/model/dependencies.d.ts +0 -30
  111. package/dist/model/dependencies.d.ts.map +0 -1
  112. package/dist/model/dependencies.js +0 -139
  113. package/dist/model/dependencies.js.map +0 -1
  114. package/dist/model/dependencyModel.d.ts +0 -9
  115. package/dist/model/dependencyModel.d.ts.map +0 -1
  116. package/dist/model/dependencyModel.js +0 -9
  117. package/dist/model/dependencyModel.js.map +0 -1
  118. package/dist/model/elementModel.d.ts +0 -103
  119. package/dist/model/elementModel.d.ts.map +0 -1
  120. package/dist/model/elementModel.js +0 -181
  121. package/dist/model/elementModel.js.map +0 -1
  122. package/dist/model/filterModel.d.ts +0 -35
  123. package/dist/model/filterModel.d.ts.map +0 -1
  124. package/dist/model/filterModel.js +0 -153
  125. package/dist/model/filterModel.js.map +0 -1
  126. package/dist/model/gridModel.d.ts +0 -181
  127. package/dist/model/gridModel.d.ts.map +0 -1
  128. package/dist/model/gridModel.js +0 -797
  129. package/dist/model/gridModel.js.map +0 -1
  130. package/dist/model/groupModel.d.ts +0 -26
  131. package/dist/model/groupModel.d.ts.map +0 -1
  132. package/dist/model/groupModel.js +0 -112
  133. package/dist/model/groupModel.js.map +0 -1
  134. package/dist/model/history.d.ts +0 -24
  135. package/dist/model/history.d.ts.map +0 -1
  136. package/dist/model/history.js +0 -35
  137. package/dist/model/history.js.map +0 -1
  138. package/dist/model/index.d.ts +0 -23
  139. package/dist/model/index.d.ts.map +0 -1
  140. package/dist/model/index.js +0 -23
  141. package/dist/model/index.js.map +0 -1
  142. package/dist/model/iterableRange.d.ts +0 -49
  143. package/dist/model/iterableRange.d.ts.map +0 -1
  144. package/dist/model/iterableRange.js +0 -108
  145. package/dist/model/iterableRange.js.map +0 -1
  146. package/dist/model/merges.d.ts +0 -34
  147. package/dist/model/merges.d.ts.map +0 -1
  148. package/dist/model/merges.js +0 -123
  149. package/dist/model/merges.js.map +0 -1
  150. package/dist/model/namingModel.d.ts +0 -25
  151. package/dist/model/namingModel.d.ts.map +0 -1
  152. package/dist/model/namingModel.js +0 -77
  153. package/dist/model/namingModel.js.map +0 -1
  154. package/dist/model/options.d.ts +0 -257
  155. package/dist/model/options.d.ts.map +0 -1
  156. package/dist/model/options.js +0 -35
  157. package/dist/model/options.js.map +0 -1
  158. package/dist/model/rowModel.d.ts +0 -104
  159. package/dist/model/rowModel.d.ts.map +0 -1
  160. package/dist/model/rowModel.js +0 -155
  161. package/dist/model/rowModel.js.map +0 -1
  162. package/dist/model/selectionModel.d.ts +0 -19
  163. package/dist/model/selectionModel.d.ts.map +0 -1
  164. package/dist/model/selectionModel.js +0 -40
  165. package/dist/model/selectionModel.js.map +0 -1
  166. package/dist/model/sortingModel.d.ts +0 -46
  167. package/dist/model/sortingModel.d.ts.map +0 -1
  168. package/dist/model/sortingModel.js +0 -157
  169. package/dist/model/sortingModel.js.map +0 -1
  170. package/dist/model/style.d.ts +0 -90
  171. package/dist/model/style.d.ts.map +0 -1
  172. package/dist/model/style.js +0 -34
  173. package/dist/model/style.js.map +0 -1
  174. package/dist/model/styleModel.d.ts +0 -22
  175. package/dist/model/styleModel.d.ts.map +0 -1
  176. package/dist/model/styleModel.js +0 -91
  177. package/dist/model/styleModel.js.map +0 -1
  178. package/dist/model/tableTheme.d.ts +0 -46
  179. package/dist/model/tableTheme.d.ts.map +0 -1
  180. package/dist/model/tableTheme.js +0 -93
  181. package/dist/model/tableTheme.js.map +0 -1
  182. package/dist/model/validations.d.ts +0 -5
  183. package/dist/model/validations.d.ts.map +0 -1
  184. package/dist/model/validations.js +0 -24
  185. package/dist/model/validations.js.map +0 -1
  186. package/dist/sparklines/index.d.ts +0 -2
  187. package/dist/sparklines/index.d.ts.map +0 -1
  188. package/dist/sparklines/index.js +0 -2
  189. package/dist/sparklines/index.js.map +0 -1
  190. package/dist/sparklines/sparklines.d.ts +0 -59
  191. package/dist/sparklines/sparklines.d.ts.map +0 -1
  192. package/dist/sparklines/sparklines.js +0 -176
  193. package/dist/sparklines/sparklines.js.map +0 -1
  194. package/dist/types.d.ts +0 -103
  195. package/dist/types.d.ts.map +0 -1
  196. package/dist/types.js +0 -2
  197. package/dist/types.js.map +0 -1
  198. package/dist/utils.d.ts +0 -4
  199. package/dist/utils.d.ts.map +0 -1
  200. package/dist/utils.js +0 -11
  201. package/dist/utils.js.map +0 -1
@@ -1,159 +0,0 @@
1
- import { tree, utils } from "@omegagrid/core";
2
- import { CellRange, encodeColumn } from "../common/range";
3
- import { ElementModel } from "./elementModel";
4
- const DEFAULT_FILTER_COLUMN_OPTIONS = {
5
- property: 'value',
6
- enabled: true
7
- };
8
- export class ColumnModel extends tree.TreeNodeMixin(ElementModel) {
9
- get comparer() { return this._comparer; }
10
- set comparer(v) { this._comparer = v; }
11
- get filter() {
12
- return this._filter ?? (this.model.options.filters?.enabled ? DEFAULT_FILTER_COLUMN_OPTIONS : { enabled: false });
13
- }
14
- set filter(v) { this._filter = v; }
15
- get hasFilter() { return this.filter.enabled; }
16
- get sorting() { return this._sorting ?? this.model.options.columnSorting; }
17
- set sorting(v) { this._sorting = v; }
18
- get width() { return this._width ?? this.model.options.columnWidth; }
19
- set width(value) { this._width = value; }
20
- get levelIndent() { return this._levelIndent; }
21
- set levelIndent(value) { this._levelIndent = value; }
22
- get levelButtons() { return this._levelButtons; }
23
- set levelButtons(value) { this._levelButtons = value; }
24
- get priority() { return this._priority; }
25
- set priority(value) { this._priority = value; }
26
- get address() { return encodeColumn(this.index); }
27
- get range() { return new CellRange(this.index, null, this.index, null); }
28
- get hasFormula() { return !!this._formula; }
29
- get formula() { return this._formula; }
30
- set formula(v) {
31
- super.formula = v;
32
- const c = this.index;
33
- this.model.rows.forEach(row => row.cells[c]?.refreshFormula());
34
- }
35
- constructor(model, source) {
36
- super(model, source);
37
- if (this._priority == null)
38
- this._priority = model.options.columnPriority;
39
- }
40
- get mergedHeaders() {
41
- return this._mergedHeaders ?? (this._mergedHeaders = (this._header?.filter(h => h.cs > 1 || h.rs > 1) ?? []));
42
- }
43
- updateMergedHeaders() { this._mergedHeaders = null; }
44
- set header(header) {
45
- this._mergedHeaders = null;
46
- this._header = header;
47
- }
48
- get header() {
49
- if (!this._header || this._header.length < this.model.headerCount) {
50
- this._header = this._header ?? [];
51
- for (let r = this._header.length; r < this.model.headerCount; r++) {
52
- this._header.push({ r: r });
53
- }
54
- }
55
- return this._header;
56
- }
57
- hasHeaderTooltip(index) {
58
- const header = this.header?.[index];
59
- return header && header.tooltip != null;
60
- }
61
- convertSourceHeader(header) {
62
- if (Array.isArray(header)) {
63
- return header.map((h, r) => {
64
- h = h ?? { r: r };
65
- if (h.height == null)
66
- h.height = h.h;
67
- h.r = r;
68
- if (h.style == null)
69
- h.style = h.s;
70
- h._style = h.style == null ? null : this.model.styles.add(h.style).id;
71
- if (this.model.options.headers?.style != null) {
72
- const defaultStyle = this.model.styles.add(this.model.options.headers.style).id;
73
- h._style = this.model.styles.merge(h._style, defaultStyle).id;
74
- }
75
- return h;
76
- });
77
- }
78
- else if (utils.isString(header)) {
79
- return [{ label: header, r: 0 }];
80
- }
81
- return null;
82
- }
83
- populate(source) {
84
- super.populate(source);
85
- this._width = source.w == null || source.w == 'auto' ? null : source.w;
86
- this._levelIndent = source.levelIndent;
87
- this._levelButtons = source.levelButtons;
88
- this._header = this.convertSourceHeader(source.header);
89
- this._sorting = source.sorting;
90
- this._filter = utils.isObject(source.filter)
91
- ? Object.assign({ enabled: true }, source.filter)
92
- : (source.filter ? DEFAULT_FILTER_COLUMN_OPTIONS : (source.filter === false ? { enabled: false } : null));
93
- this._comparer = source.comparer;
94
- this.data = source.data;
95
- this._mergedHeaders = null;
96
- if (source.priority != null)
97
- this._priority = source.priority;
98
- }
99
- getSourceData() {
100
- const data = super.getSourceData();
101
- if (this._width != null)
102
- data.w = this._width;
103
- if (this._levelIndent != null)
104
- data.levelIndent = this._levelIndent;
105
- if (this._levelButtons != null)
106
- data.levelButtons = this._levelButtons;
107
- if (this._header != null)
108
- data.header = this._header;
109
- if (this._sorting != null)
110
- data.sorting = this._sorting;
111
- if (this._filter != null)
112
- data.filter = this._filter;
113
- if (this.data != null)
114
- data.data = this.data;
115
- return data;
116
- }
117
- expand(unhide) {
118
- super.expand(unhide);
119
- this.model.indexVisibleColumns();
120
- }
121
- collapse() {
122
- super.collapse();
123
- this.model.indexVisibleColumns();
124
- }
125
- get prev() { return this.model.columns[this.index - 1]; }
126
- get next() { return this.model.columns[this.index + 1]; }
127
- get prevVisible() {
128
- const vi = this.model.visibleColumnIndex[this.index];
129
- if (vi == null || vi === 0)
130
- return null;
131
- return this.model.visibleColumns[vi - 1];
132
- }
133
- get nextVisible() {
134
- const vi = this.model.visibleColumnIndex[this.index];
135
- if (vi == null)
136
- return null;
137
- return this.model.visibleColumns[vi + 1];
138
- }
139
- calculateRealColspan(colspan) {
140
- let sc = 1;
141
- let next = this.nextVisible;
142
- while (next && next.index - this.index < colspan && sc < colspan) {
143
- ++sc;
144
- next = next.nextVisible;
145
- }
146
- return sc;
147
- }
148
- cell(r) {
149
- return this.model.rows[r].cell(this.index);
150
- }
151
- clearCalculatedValues() {
152
- this.model.rows.forEach(row => {
153
- const cell = row.cells[this.index];
154
- if (cell)
155
- this.model.calculations.refreshFormula(cell);
156
- });
157
- }
158
- }
159
- //# sourceMappingURL=columnModel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"columnModel.js","sourceRoot":"","sources":["../../src/model/columnModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,EAAE,YAAY,EAAiB,MAAM,gBAAgB,CAAC;AAyC7D,MAAM,6BAA6B,GAAwB;IAC1D,QAAQ,EAAE,OAAO;IACjB,OAAO,EAAE,IAAI;CACb,CAAC;AAwBF,MAAM,OAAO,WAAY,SAAQ,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC;IAKhE,IAAI,QAAQ,KAAK,OAAO,IAAI,CAAC,SAAS,CAAA,CAAC,CAAC;IACxC,IAAI,QAAQ,CAAC,CAAW,IAAI,IAAI,CAAC,SAAS,GAAG,CAAC,CAAA,CAAC,CAAC;IAGhD,IAAI,MAAM;QACT,OAAO,IAAI,CAAC,OAAO,IAAI,CACrB,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,OAAyB,EAAE,OAAO,CAAC,CAAC,CAAC,6BAA6B,CAAC,CAAC,CAAC,EAAC,OAAO,EAAE,KAAK,EA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;QAC5B,OAAO,IAAI,IAAI,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,GAAG,OAAO,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC;YAClE,EAAE,EAAE,CAAC;YACL,IAAI,GAAG,IAAI,CAAC,WAAW,CAAC;QACzB,CAAC;QACD,OAAO,EAAE,CAAC;IACX,CAAC;IAED,IAAI,CAAC,CAAS;QACb,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC;IAED,qBAAqB;QACpB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;YAC7B,MAAM,IAAI,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACnC,IAAI,IAAI;gBAAE,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QACxD,CAAC,CAAC,CAAC;IACJ,CAAC;CAED","sourcesContent":["import { tree, utils } from \"@omegagrid/core\";\nimport { CellRange, encodeColumn } from \"../common/range\";\nimport { ElementModel, ElementSource } from \"./elementModel\";\nimport { GridModel } from \"./gridModel\";\nimport { Comparer, StyleSource } from \"../types\";\nimport { CellModel } from \"./cellModel\";\nimport { FilterOptions } from \"./options\";\n\n/** Source object type for column header item */\nexport type ColumnHeaderModel = {\n\t/** row index (readonly) */\n\tr?: number;\n\t/** header label */\n\tlabel?: string;\n\t/** enable html in header label */\n\thtml?: boolean;\n\t/** column span */\n\tcs?: number;\n\t/** row span */\n\trs?: number;\n\t/** header height */\n\th?: number;\n\t/** header height alias */\n\theight?: number;\n\t/** visibility (readonly) */\n\thidden?: boolean\n\t/** header cell style */\n\ts?: StyleSource,\n\t/** header cell style alias */\n\tstyle?: StyleSource,\n\t/** style index */\n\t_style?: number,\n\t/** header cell tooltip content */\n\ttooltip?: string|unknown\n};\n\nexport type FilterColumnOptions = {\n\t/** property by which to filter */\n\tproperty?: keyof CellModel;\n\t/** enable filter */\n\tenabled: boolean;\n};\n\nconst DEFAULT_FILTER_COLUMN_OPTIONS: FilterColumnOptions = {\n\tproperty: 'value',\n\tenabled: true\n};\n\n/** Source object type for grid column */\nexport type ColumnSource = {\n\t/** column width */\n\tw?: number|'auto',\n\t/** name of data property/index in row.data */\n\tdata?: number|string,\n\t/** column header array */\n\theader?: string|ColumnHeaderModel[],\n\t/** enable column sorting */\n\tsorting?: boolean,\n\t/** enable column filtering */\n\tfilter?: boolean|FilterColumnOptions,\n\t/** indent cell content by row level */\n\tlevelIndent?: boolean,\n\t/** show expand buttons inside cell */\n\tlevelButtons?: boolean,\n\t/** custom camparison function for column sorting */\n\tcomparer?: Comparer,\n\t/** if column priority is higher then row priority, column properties has precedence over row properties */\n\tpriority?: number,\n} & tree.TreeNodeSource & ElementSource;\n \nexport class ColumnModel extends tree.TreeNodeMixin(ElementModel) {\n\n\tpublic data?: number|string;\n\n\tprivate _comparer?: Comparer;\n\tget comparer() { return this._comparer }\n\tset comparer(v: Comparer) { this._comparer = v }\n\t\n\tprivate _filter: FilterColumnOptions;\n\tget filter() {\n\t\treturn this._filter ?? (\n\t\t\t(this.model.options.filters as FilterOptions)?.enabled ? DEFAULT_FILTER_COLUMN_OPTIONS : {enabled: false}\n\t\t)\n\t}\n\tset filter(v: FilterColumnOptions) { this._filter = v }\n\tget hasFilter() { return this.filter.enabled }\n\n\tprivate _sorting: boolean;\n\tget sorting() { return this._sorting ?? this.model.options.columnSorting }\n\tset sorting(v: boolean) { this._sorting = v }\n\t\n\tprivate _width: number;\n\tget width() { return this._width ?? this.model.options.columnWidth }\n\tset width(value: number) { this._width = value }\n\t\n\tprivate _levelIndent: boolean;\n\tget levelIndent() { return this._levelIndent }\n\tset levelIndent(value: boolean) { this._levelIndent = value }\n\t\n\tprivate _levelButtons: boolean;\n\tget levelButtons() { return this._levelButtons }\n\tset levelButtons(value: boolean) { this._levelButtons = value }\n\n\tprivate _priority: number;\n\tget priority() { return this._priority }\n\tset priority(value: number) { this._priority = value }\n\n\tget address() { return encodeColumn(this.index) }\n\tget range() { return new CellRange(this.index, null, this.index, null) }\n\n\tget hasFormula() { return !!this._formula }\n\tget formula() { return this._formula }\n\tset formula(v: string) {\n\t\tsuper.formula = v;\n\t\tconst c = this.index;\n\t\tthis.model.rows.forEach(row => row.cells[c]?.refreshFormula());\n\t}\n\n\tconstructor(model: GridModel, source?: ColumnSource) {\n\t\tsuper(model, source);\n\t\tif (this._priority == null) this._priority = model.options.columnPriority;\n\t}\n\n\tpublic _header?: ColumnHeaderModel[];\n\tprivate _mergedHeaders: ColumnHeaderModel[];\n\tget mergedHeaders() {\n\t\treturn this._mergedHeaders ?? (this._mergedHeaders = (this._header?.filter(h => h.cs > 1 || h.rs > 1) ?? []));\n\t}\n\tupdateMergedHeaders() { this._mergedHeaders = null }\n\n\tset header(header: ColumnHeaderModel[]) {\n\t\tthis._mergedHeaders = null;\n\t\tthis._header = header;\n\t}\n\tget header() {\n\t\tif (!this._header || this._header.length < this.model.headerCount) {\n\t\t\tthis._header = this._header ?? [];\n\t\t\tfor (let r = this._header.length; r < this.model.headerCount; r++) {\n\t\t\t\tthis._header.push({r: r});\n\t\t\t}\n\t\t}\n\t\treturn this._header;\n\t}\n\n\thasHeaderTooltip(index: number) {\n\t\tconst header = this.header?.[index];\n\t\treturn header && header.tooltip != null;\n\t}\n\n\tconvertSourceHeader(header: string|ColumnHeaderModel[]): ColumnHeaderModel[] {\n\t\tif (Array.isArray(header)) {\n\t\t\treturn header.map((h, r) => {\n\t\t\t\th = h ?? {r: r};\n\t\t\t\tif (h.height == null) h.height = h.h;\n\t\t\t\th.r = r;\n\t\t\t\tif (h.style == null) h.style = h.s;\n\t\t\t\th._style = h.style == null ? null : this.model.styles.add(h.style).id;\n\t\t\t\tif (this.model.options.headers?.style != null) {\n\t\t\t\t\tconst defaultStyle = this.model.styles.add(this.model.options.headers.style).id;\n\t\t\t\t\th._style = this.model.styles.merge(h._style, defaultStyle).id;\n\t\t\t\t}\n\t\t\t\treturn h;\n\t\t\t});\n\t\t} else if (utils.isString(header)) {\n\t\t\treturn [{label: header, r: 0}]\n\t\t}\n\t\treturn null;\n\t}\n\n\tpopulate(source: ColumnSource) {\n\t\tsuper.populate(source);\n\t\tthis._width = source.w == null || source.w == 'auto' ? null : source.w;\n\t\tthis._levelIndent = source.levelIndent;\n\t\tthis._levelButtons = source.levelButtons;\n\t\tthis._header = this.convertSourceHeader(source.header);\n\t\tthis._sorting = source.sorting;\n\t\tthis._filter = utils.isObject(source.filter) \n\t\t\t? Object.assign({enabled: true}, source.filter) as FilterColumnOptions \n\t\t\t: (source.filter ? DEFAULT_FILTER_COLUMN_OPTIONS : (\n\t\t\t\tsource.filter === false ? {enabled: false} : null\n\t\t\t));\n\t\tthis._comparer = source.comparer;\n\t\tthis.data = source.data;\n\t\tthis._mergedHeaders = null;\n\t\tif (source.priority != null) this._priority = source.priority;\n\t}\n\n\tgetSourceData() {\n\t\tconst data = super.getSourceData() as ColumnSource;\n\t\tif (this._width != null) data.w = this._width;\n\t\tif (this._levelIndent != null) data.levelIndent = this._levelIndent;\n\t\tif (this._levelButtons != null) data.levelButtons = this._levelButtons;\n\t\tif (this._header != null) data.header = this._header;\n\t\tif (this._sorting != null) data.sorting = this._sorting;\n\t\tif (this._filter != null) data.filter = this._filter;\n\t\tif (this.data != null) data.data = this.data;\n\t\treturn data;\n\t}\n\n\texpand(unhide?: boolean) {\n\t\tsuper.expand(unhide);\n\t\tthis.model.indexVisibleColumns();\n\t}\n\n\tcollapse() {\n\t\tsuper.collapse();\n\t\tthis.model.indexVisibleColumns();\n\t}\n\n\tget prev() { return this.model.columns[this.index - 1] }\n\tget next() { return this.model.columns[this.index + 1] }\n\n\tget prevVisible() : ColumnModel {\n\t\tconst vi = this.model.visibleColumnIndex[this.index];\n\t\tif (vi == null || vi === 0) return null;\n\t\treturn this.model.visibleColumns[vi - 1];\n\t}\n\n\tget nextVisible() : ColumnModel {\n\t\tconst vi = this.model.visibleColumnIndex[this.index];\n\t\tif (vi == null) return null;\n\t\treturn this.model.visibleColumns[vi + 1];\n\t}\n\n\tcalculateRealColspan(colspan: number) {\n\t\tlet sc = 1;\n\t\tlet next = this.nextVisible;\n\t\twhile (next && next.index - this.index < colspan && sc < colspan) {\n\t\t\t++sc;\n\t\t\tnext = next.nextVisible;\n\t\t}\n\t\treturn sc;\n\t}\n\n\tcell(r: number) {\n\t\treturn this.model.rows[r].cell(this.index);\n\t}\n\n\tclearCalculatedValues() {\n\t\tthis.model.rows.forEach(row => {\n\t\t\tconst cell = row.cells[this.index];\n\t\t\tif (cell) this.model.calculations.refreshFormula(cell);\n\t\t});\n\t}\n\n}"]}
@@ -1,58 +0,0 @@
1
- import { CustomProperties, User } from "@omegagrid/core";
2
- import { CellAddress } from "../common";
3
- import { GridModel } from ".";
4
- import { CommentRenderer, ShiftOptions } from "../types";
5
- export type CommentSource = {
6
- /** author of the comment */
7
- author?: User;
8
- /** comment data, that can be used in custom comment renderer */
9
- data?: unknown;
10
- /** comment text */
11
- text?: string;
12
- /** comment date */
13
- date?: string | number | Date;
14
- /** column index of commented cell */
15
- c?: number;
16
- /** row index of commented cell */
17
- r?: number;
18
- /** address of commented cell */
19
- a1?: CellAddress;
20
- /** readonly comment */
21
- readOnly?: boolean;
22
- /** custom properties */
23
- props?: CustomProperties;
24
- };
25
- export type CommentOptions = {
26
- hideTimeout?: number;
27
- offsetX?: number;
28
- offsetY?: number;
29
- zIndex?: number;
30
- headerPosition?: 'top' | 'bottom';
31
- renderer?: CommentRenderer;
32
- };
33
- export declare class CommentItem {
34
- author?: User;
35
- text?: string;
36
- date?: Date;
37
- data?: unknown;
38
- readOnly?: boolean;
39
- protected _properties: CustomProperties;
40
- get properties(): CustomProperties;
41
- set properties(v: CustomProperties);
42
- constructor(source?: CommentSource);
43
- pupulate(source: CommentSource): void;
44
- getSourceData(): CommentSource;
45
- }
46
- export declare class CommentModel {
47
- readonly model: GridModel;
48
- private _commentMap;
49
- constructor(model: GridModel, sourceData?: CommentSource[]);
50
- has: (a1: CellAddress) => boolean;
51
- delete: (a1: CellAddress) => boolean;
52
- cleanCell: (a1: CellAddress) => void;
53
- get: (a1: CellAddress) => CommentItem[];
54
- set: (a1: CellAddress, items: (CommentItem | CommentSource)[]) => void;
55
- populate(sourceData: CommentSource[]): void;
56
- shift(options: ShiftOptions): void;
57
- }
58
- //# sourceMappingURL=commentModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commentModel.d.ts","sourceRoot":"","sources":["../../src/model/commentModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAC;AACzD,OAAO,EAAE,WAAW,EAAa,MAAM,WAAW,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,GAAG,CAAC;AAC9B,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGzD,MAAM,MAAM,aAAa,GAAG;IAC3B,4BAA4B;IAC5B,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,gEAAgE;IAChE,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,mBAAmB;IACnB,IAAI,CAAC,EAAE,MAAM,GAAC,MAAM,GAAC,IAAI,CAAC;IAC1B,qCAAqC;IACrC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,CAAC,CAAC,EAAE,MAAM,CAAC;IACX,gCAAgC;IAChC,EAAE,CAAC,EAAE,WAAW,CAAC;IACjB,uBAAuB;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,wBAAwB;IACxB,KAAK,CAAC,EAAE,gBAAgB,CAAC;CACzB,CAAA;AAED,MAAM,MAAM,cAAc,GAAG;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,cAAc,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAClC,QAAQ,CAAC,EAAE,eAAe,CAAC;CAC3B,CAAA;AAED,qBAAa,WAAW;IACvB,MAAM,CAAC,EAAE,IAAI,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,IAAI,CAAC;IACZ,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,SAAS,CAAC,WAAW,EAAE,gBAAgB,CAAC;IACxC,IAAI,UAAU,IACI,gBAAgB,CADU;IAC5C,IAAI,UAAU,CAAC,CAAC,EAAE,gBAAgB,EAA0B;gBAEhD,MAAM,CAAC,EAAE,aAAa;IAIlC,QAAQ,CAAC,MAAM,EAAE,aAAa;IAS9B,aAAa;CAUb;AAED,qBAAa,YAAY;aAII,KAAK,EAAE,SAAS;IAF5C,OAAO,CAAC,WAAW,CAAyC;gBAEhC,KAAK,EAAE,SAAS,EAAE,UAAU,CAAC,EAAE,aAAa,EAAE;IAI1E,GAAG,GAAI,IAAI,WAAW,aAA8B;IAEpD,MAAM,GAAI,IAAI,WAAW,aAAiC;IAE1D,SAAS,GAAI,IAAI,WAAW,UAG1B;IAEF,GAAG,GAAI,IAAI,WAAW,mBAGrB;IAED,GAAG,GAAI,IAAI,WAAW,EAAE,OAAO,CAAC,WAAW,GAAC,aAAa,CAAC,EAAE,UAG3D;IAED,QAAQ,CAAC,UAAU,EAAE,aAAa,EAAE;IAapC,KAAK,CAAC,OAAO,EAAE,YAAY;CAW3B"}
@@ -1,81 +0,0 @@
1
- import { CellRange } from "../common";
2
- import { dates } from "@omegagrid/core";
3
- export class CommentItem {
4
- get properties() { return this._properties; }
5
- set properties(v) { this._properties = v; }
6
- constructor(source) {
7
- if (source)
8
- this.pupulate(source);
9
- }
10
- pupulate(source) {
11
- this.author = source.author;
12
- this.text = source.text;
13
- this.date = source.date ? new Date(source.date) : null;
14
- this.data = source.data;
15
- this.readOnly = !!source.readOnly;
16
- this._properties = source.props;
17
- }
18
- getSourceData() {
19
- const data = {};
20
- if (this._properties)
21
- data.props = this._properties;
22
- if (this.author)
23
- data.author = this.author;
24
- if (this.text)
25
- data.text = this.text;
26
- if (this.data)
27
- data.data = this.data;
28
- if (this.readOnly !== null)
29
- data.readOnly = this.readOnly;
30
- if (this.date)
31
- data.date = dates.getDateFormatter('en-US')(this.date, 'yyyy-MM-dd HH:mm:ss');
32
- return data;
33
- }
34
- }
35
- export class CommentModel {
36
- constructor(model, sourceData) {
37
- this.model = model;
38
- this._commentMap = new Map();
39
- this.has = (a1) => this._commentMap.has(a1);
40
- this.delete = (a1) => this._commentMap.delete(a1);
41
- this.cleanCell = (a1) => {
42
- if (!this.has(a1))
43
- return;
44
- this._commentMap.set(a1, this.get(a1).filter(item => (item.text ?? "").length > 0 || item.data != null));
45
- };
46
- this.get = (a1) => {
47
- if (!this.has(a1))
48
- this._commentMap.set(a1, []);
49
- return this._commentMap.get(a1);
50
- };
51
- this.set = (a1, items) => {
52
- this._commentMap.set(a1, items?.map(item => item instanceof CommentItem ? item : new CommentItem(item)) || []);
53
- this.cleanCell(a1);
54
- };
55
- if (sourceData)
56
- this.populate(sourceData);
57
- }
58
- populate(sourceData) {
59
- sourceData.forEach(itemSource => {
60
- const a1 = itemSource.a1 || (new CellRange(itemSource.c, itemSource.r)).A1;
61
- if (!this._commentMap.has(a1))
62
- this._commentMap.set(a1, []);
63
- this._commentMap.get(a1).push(new CommentItem(itemSource));
64
- });
65
- // sort comments by time
66
- this._commentMap.forEach(comments => {
67
- comments.sort((b, a) => (a.date ? a.date.getTime() : 0) - (b.date ? b.date.getTime() : 0));
68
- });
69
- }
70
- shift(options) {
71
- Array.from(this._commentMap.keys()).forEach((addr) => {
72
- const range = CellRange.fromA1(addr);
73
- range.shift(options);
74
- if (range.A1 != addr) {
75
- this._commentMap.set(range.A1, this._commentMap.get(addr));
76
- this._commentMap.delete(addr);
77
- }
78
- });
79
- }
80
- }
81
- //# sourceMappingURL=commentModel.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commentModel.js","sourceRoot":"","sources":["../../src/model/commentModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,SAAS,EAAE,MAAM,WAAW,CAAC;AAGnD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AAgCxC,MAAM,OAAO,WAAW;IAQvB,IAAI,UAAU,KAAK,OAAO,IAAI,CAAC,WAAW,CAAA,CAAC,CAAC;IAC5C,IAAI,UAAU,CAAC,CAAmB,IAAI,IAAI,CAAC,WAAW,GAAG,CAAC,CAAA,CAAC,CAAC;IAE5D,YAAY,MAAsB;QACjC,IAAI,MAAM;YAAE,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;IAED,QAAQ,CAAC,MAAqB;QAC7B,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;QAC5B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QACvD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAClC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,KAAK,CAAC;IACjC,CAAC;IAED,aAAa;QACZ,MAAM,IAAI,GAAkB,EAAE,CAAC;QAC/B,IAAI,IAAI,CAAC,WAAW;YAAE,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,WAAW,CAAC;QACpD,IAAI,IAAI,CAAC,MAAM;YA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C,OAAO,CAAC,QAAQ,CAAC,EAAE;YACnC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5F,CAAC,CAAC,CAAC;IACJ,CAAC;IAED,KAAK,CAAC,OAAqB;QAC1B,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,EAAE;YACpD,MAAM,KAAK,GAAG,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YACrC,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACrB,IAAI,KAAK,CAAC,EAAE,IAAI,IAAI,EAAE,CAAC;gBACtB,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,IAAI,CAAC,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;gBAC3D,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;YAC/B,CAAC;QACF,CAAC,CAAC,CAAC;IACJ,CAAC;CAED","sourcesContent":["import { CustomProperties, User } from \"@omegagrid/core\";\nimport { CellAddress, CellRange } from \"../common\";\nimport { GridModel } from \".\";\nimport { CommentRenderer, ShiftOptions } from \"../types\";\nimport { dates } from \"@omegagrid/core\";\n\nexport type CommentSource = {\n\t/** author of the comment */\n\tauthor?: User,\n\t/** comment data, that can be used in custom comment renderer */\n\tdata?: unknown\n\t/** comment text */\n\ttext?: string,\n\t/** comment date */\n\tdate?: string|number|Date,\n\t/** column index of commented cell */\n\tc?: number,\n\t/** row index of commented cell */\n\tr?: number,\n\t/** address of commented cell */\n\ta1?: CellAddress,\n\t/** readonly comment */\n\treadOnly?: boolean,\n\t/** custom properties */\n\tprops?: CustomProperties,\n}\n\nexport type CommentOptions = {\n\thideTimeout?: number,\n\toffsetX?: number,\n\toffsetY?: number,\n\tzIndex?: number,\n\theaderPosition?: 'top' | 'bottom',\n\trenderer?: CommentRenderer,\n}\n\nexport class CommentItem {\n\tauthor?: User;\n\ttext?: string;\n\tdate?: Date;\n\tdata?: unknown;\n\treadOnly?: boolean;\n\n\tprotected _properties: CustomProperties;\n\tget properties() { return this._properties }\n\tset properties(v: CustomProperties) { this._properties = v }\n\n\tconstructor(source?: CommentSource) {\n\t\tif (source) this.pupulate(source);\n\t}\n\n\tpupulate(source: CommentSource) {\n\t\tthis.author = source.author;\n\t\tthis.text = source.text;\n\t\tthis.date = source.date ? new Date(source.date) : null;\n\t\tthis.data = source.data;\n\t\tthis.readOnly = !!source.readOnly;\n\t\tthis._properties = source.props;\n\t}\n\n\tgetSourceData() {\n\t\tconst data: CommentSource = {};\n\t\tif (this._properties) data.props = this._properties;\n\t\tif (this.author) data.author = this.author;\n\t\tif (this.text) data.text = this.text;\n\t\tif (this.data) data.data = this.data;\n\t\tif (this.readOnly !== null) data.readOnly = this.readOnly;\n\t\tif (this.date) data.date = dates.getDateFormatter('en-US')(this.date, 'yyyy-MM-dd HH:mm:ss');\n\t\treturn data;\n\t}\n}\n\nexport class CommentModel {\n\n\tprivate _commentMap = new Map<CellAddress, CommentItem[]>();\n\n\tconstructor(public readonly model: GridModel, sourceData?: CommentSource[]) {\n\t\tif (sourceData) this.populate(sourceData);\n\t}\n\n\thas = (a1: CellAddress) => this._commentMap.has(a1);\n\n\tdelete = (a1: CellAddress) => this._commentMap.delete(a1);\n\n\tcleanCell = (a1: CellAddress) => {\n\t\tif (!this.has(a1)) return;\n\t\tthis._commentMap.set(a1, this.get(a1).filter(item => (item.text ?? \"\").length > 0 || item.data != null));\n\t};\n\n\tget = (a1: CellAddress) => {\n\t\tif (!this.has(a1)) this._commentMap.set(a1, []);\n\t\treturn this._commentMap.get(a1);\n\t}\n\n\tset = (a1: CellAddress, items: (CommentItem|CommentSource)[]) => {\n\t\tthis._commentMap.set(a1, items?.map(item => item instanceof CommentItem ? item : new CommentItem(item)) || []);\n\t\tthis.cleanCell(a1);\n\t}\n\n\tpopulate(sourceData: CommentSource[]) {\n\t\tsourceData.forEach(itemSource => {\n\t\t\tconst a1 = itemSource.a1 || (new CellRange(itemSource.c, itemSource.r)).A1;\n\t\t\tif (!this._commentMap.has(a1)) this._commentMap.set(a1, []);\n\t\t\tthis._commentMap.get(a1).push(new CommentItem(itemSource));\n\t\t});\n\n\t\t// sort comments by time\n\t\tthis._commentMap.forEach(comments => {\n\t\t\tcomments.sort((b, a) => (a.date ? a.date.getTime() : 0) - (b.date ? b.date.getTime() : 0));\n\t\t});\n\t}\n\n\tshift(options: ShiftOptions) {\n\t\tArray.from(this._commentMap.keys()).forEach((addr) => {\n\t\t\tconst range = CellRange.fromA1(addr);\n\t\t\trange.shift(options);\n\t\t\tif (range.A1 != addr) {\n\t\t\t\tthis._commentMap.set(range.A1, this._commentMap.get(addr));\n\t\t\t\tthis._commentMap.delete(addr);\n\t\t\t}\n\t\t});\n\t}\n\n}"]}
@@ -1,104 +0,0 @@
1
- import { StyleSource } from "../types";
2
- import { Formula, FormulaString } from "../calculations";
3
- import { CellRange, RangeAddress } from "../common";
4
- import { CellModel, GridModel, Style, Color } from "../model";
5
- import { IconSpec } from "@omegagrid/core";
6
- import { DependencyModel } from "./dependencyModel";
7
- export type ConditionalFormatTypeDiffStyle = 'avg' | /* Format only values that are above or below average */ 'blank' | /* Format only cells that contain: Blanks or no Blanks */ 'date' | /* Format only cells that contain: Dates Occurring */ 'dup' | /* Format all duplicate values */ 'error' | /* Format only cells that contain: Errors or No Errors */ 'formula' | /* Format values where formula is true */ 'rank' | /* Format only top or bottom ranked values */ 'text' | /* Format only cells that contain: Specific Text */ 'unique' | /* Format all unique values */ 'val';
8
- export type ConditionalFormatTypeNoDiff = 'bar' | /* Format all cells based on values: Data Bars */ 'icon' | /* Format all cells based on values: Icon Sets */ 'scale';
9
- export type ConditionalFormatIconType = '3Arrows' | /* 3 Arrows (Colored) */ '3ArrowsGray' | /* 3 Arrows (Gray) */ '3Flags' | /* 3 Flags */ '3TrafficLights1' | /* 3 Traffic Lights (unrimmed) */ '3TrafficLights2' | /* 3 Traffic Lights (rimmed) */ '3Signs' | /* 3 Signs */ '3Symbols' | /* 3 Symbols (Circled) */ '3Symbols2' | /* 3 Symbols (Uncircled) */ '3Stars' | /* 3 Stars */ '3Triangles' | /* 3 Triangles */ '4Arrows' | /* 4 Arrows (Colored) */ '4ArrowsGray' | /* 4 Arrows (Gray) */ '4RedToBlack' | /* Red To Black */ '4Rating' | /* 4 Ratings */ '4TrafficLights' | /* 4 Traffic Lights */ '5Arrows' | /* 5 Arrows (Colored) */ '5ArrowsGray' | /* 5 Arrows (Gray) */ '5Rating' | /* 5 Ratings */ '5Quarters' | /* 5 Quarters */ '5Boxes';
10
- export type ConditionalFormatIconSetDefinition = {
11
- type: string;
12
- count: number;
13
- icons: IconSpec[];
14
- };
15
- export type ConditionalFormatType = ConditionalFormatTypeDiffStyle | ConditionalFormatTypeNoDiff;
16
- export type ConditionalFormatThresholdType = 'num' | 'percent' | 'percentile' | 'formula' | 'min' | 'max';
17
- export type ConditionalFormatThreshold = {
18
- t?: ConditionalFormatThresholdType;
19
- v?: number;
20
- f?: FormulaString;
21
- color?: Color;
22
- };
23
- export type ConditionalFormatItemSource = {
24
- type?: ConditionalFormatType;
25
- ranges: RangeAddress;
26
- style?: StyleSource;
27
- condition?: FormulaString;
28
- stop?: boolean;
29
- cmin?: ConditionalFormatThreshold;
30
- cmid?: ConditionalFormatThreshold;
31
- cmax?: ConditionalFormatThreshold;
32
- color?: Color;
33
- v?: ConditionalFormatIconType | unknown;
34
- thresh?: ConditionalFormatThreshold[];
35
- };
36
- export type ConditionalFormatSource = ConditionalFormatItemSource[];
37
- export type ConditionalFormat = {
38
- type: ConditionalFormatType;
39
- key?: string;
40
- ranges?: CellRange[];
41
- firstCell?: CellRange;
42
- style?: Style;
43
- condition?: FormulaString;
44
- formula?: Formula;
45
- stop?: boolean;
46
- cmin?: ConditionalFormatThreshold;
47
- cmid?: ConditionalFormatThreshold;
48
- cmax?: ConditionalFormatThreshold;
49
- color?: Color;
50
- v?: ConditionalFormatIconType | unknown;
51
- thresh?: ConditionalFormatThreshold[];
52
- };
53
- export type CellConditionalFormat = {
54
- cf: ConditionalFormat;
55
- f?: Formula;
56
- initialized?: boolean;
57
- };
58
- export declare const iconSets: Map<ConditionalFormatIconType, IconSpec[]>;
59
- export declare class ConditionalFormats extends DependencyModel {
60
- readonly formats: ConditionalFormat[];
61
- readonly cellFormatMap: Map<string, CellConditionalFormat[]>;
62
- readonly extremes: Map<string, [number, number]>;
63
- constructor(model: GridModel, sourceData?: ConditionalFormatSource);
64
- populate(sourceData: ConditionalFormatSource): void;
65
- refresh(): void;
66
- clearCellDependecies(cell: CellModel): this;
67
- getExtremes(cf: ConditionalFormat): [number, number];
68
- invalidateExtremes(cell: CellModel): void;
69
- evaluateScaleFormat(cell: CellModel, ccf: CellConditionalFormat): Style;
70
- evaluateBarFormat(cell: CellModel, ccf: CellConditionalFormat): Style;
71
- evaluateFormulaFormat(cell: CellModel, ccf: CellConditionalFormat): {
72
- [name: string]: unknown;
73
- top?: import("./style").Border;
74
- bottom?: import("./style").Border;
75
- left?: import("./style").Border;
76
- right?: import("./style").Border;
77
- patternType?: import("./style").PatternStyle;
78
- fgColor?: Color;
79
- bgColor?: Color;
80
- alignment?: import("./style").Alignment;
81
- angle?: number;
82
- stops?: import("./style").GradientStop[];
83
- hidden?: boolean;
84
- editable?: boolean;
85
- icon?: IconSpec;
86
- cssStyle?: import("./cssStyle").CSSStyle;
87
- style?: string;
88
- hash?: string;
89
- id?: number;
90
- bold?: boolean;
91
- italic?: boolean;
92
- underline?: boolean;
93
- sz?: number;
94
- strike?: boolean;
95
- font?: string;
96
- color?: Color;
97
- };
98
- evaluateIconFormat(cell: CellModel, ccf: CellConditionalFormat): Style;
99
- evaluate(cell: CellModel): Style;
100
- initConditionalFormat(item: ConditionalFormat): ConditionalFormat;
101
- add(itemSource: ConditionalFormatItemSource): void;
102
- getSourceData(): ConditionalFormatItemSource[];
103
- }
104
- //# sourceMappingURL=conditionalFormats.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"conditionalFormats.d.ts","sourceRoot":"","sources":["../../src/model/conditionalFormats.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AACxD,OAAO,EAAe,SAAS,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AAChE,OAAO,EAAE,SAAS,EAAE,SAAS,EAAwB,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AACnF,OAAO,EAAE,QAAQ,EAAe,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,MAAM,MAAM,8BAA8B,GACtC,KAAK,GAAO,wDAAwD,CACpE,OAAO,GAAK,yDAAyD,CACrE,MAAM,GAAM,qDAAqD,CACjE,KAAK,GAAO,iCAAiC,CAC7C,OAAO,GAAK,yDAAyD,CACrE,SAAS,GAAG,yCAAyC,CACrD,MAAM,GAAM,6CAA6C,CACzD,MAAM,GAAM,mDAAmD,CAC/D,QAAQ,GAAI,8BAA8B,CAC1C,KAAK,CAAM;AAEf,MAAM,MAAM,2BAA2B,GACnC,KAAK,GAAO,iDAAiD,CAC7D,MAAM,GAAM,iDAAiD,CAC7D,OAAO,CAAI;AAEf,MAAM,MAAM,yBAAyB,GACpC,SAAS,GAAK,wBAAwB,CACtC,aAAa,GAAI,qBAAqB,CACtC,QAAQ,GAAK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