@vuu-ui/vuu-table-extras 2.1.19-beta.1 → 2.1.19-beta.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 (96) hide show
  1. package/package.json +13 -14
  2. package/src/calculated-column/CalculatedColumnPanel.js +95 -0
  3. package/src/calculated-column/useCalculatedColumnPanel.js +60 -0
  4. package/src/calculated-column/useEditCalculatedColumn.js +104 -0
  5. package/src/cell-edit-validators/CaseValidator.js +21 -0
  6. package/src/cell-edit-validators/PatternValidator.js +23 -0
  7. package/src/cell-edit-validators/index.js +2 -0
  8. package/src/cell-renderers/background-cell/BackgroundCell.css.js +103 -0
  9. package/src/cell-renderers/background-cell/BackgroundCell.js +76 -0
  10. package/src/cell-renderers/background-cell/BackgroundCellConfigurationEditor.css.js +9 -0
  11. package/src/cell-renderers/background-cell/BackgroundCellConfigurationEditor.js +71 -0
  12. package/src/cell-renderers/background-cell/BackgroundKeyframes.css.js +187 -0
  13. package/src/cell-renderers/background-cell/index.js +2 -0
  14. package/src/cell-renderers/background-cell/useDirection.js +25 -0
  15. package/src/cell-renderers/button-cell/IconButtonCell.css.js +23 -0
  16. package/src/cell-renderers/button-cell/IconButtonCell.js +33 -0
  17. package/src/cell-renderers/dropdown-cell/DropdownCell.css.js +36 -0
  18. package/src/cell-renderers/dropdown-cell/DropdownCell.js +84 -0
  19. package/src/cell-renderers/dropdown-cell/index.js +1 -0
  20. package/src/cell-renderers/index.js +6 -0
  21. package/src/cell-renderers/lookup-cell/LookupCell.js +15 -0
  22. package/src/cell-renderers/lookup-cell/index.js +1 -0
  23. package/src/cell-renderers/pct-progress-cell/PctProgressCell.css.js +31 -0
  24. package/src/cell-renderers/pct-progress-cell/PctProgressCell.js +49 -0
  25. package/src/cell-renderers/pct-progress-cell/index.js +1 -0
  26. package/src/cell-renderers/progress-cell/ProgressCell.css.js +43 -0
  27. package/src/cell-renderers/progress-cell/ProgressCell.js +74 -0
  28. package/src/cell-renderers/progress-cell/index.js +1 -0
  29. package/src/column-expression-input/ColumnExpressionInput.css.js +94 -0
  30. package/src/column-expression-input/ColumnExpressionInput.js +28 -0
  31. package/src/column-expression-input/column-function-descriptors.js +281 -0
  32. package/src/column-expression-input/column-language-parser/ColumnExpressionLanguage.js +18 -0
  33. package/src/column-expression-input/column-language-parser/ColumnExpressionTreeWalker.js +381 -0
  34. package/src/column-expression-input/column-language-parser/column-expression-parse-utils.js +56 -0
  35. package/src/column-expression-input/column-language-parser/index.js +3 -0
  36. package/src/column-expression-input/functionDocInfo.js +24 -0
  37. package/src/column-expression-input/highlighting.js +18 -0
  38. package/src/column-expression-input/index.js +4 -0
  39. package/src/column-expression-input/theme.js +57 -0
  40. package/src/column-expression-input/useColumnAutoComplete.js +307 -0
  41. package/src/column-expression-input/useColumnExpressionEditor.js +133 -0
  42. package/src/column-expression-input/useColumnExpressionSuggestionProvider.js +211 -0
  43. package/src/column-formatting-settings/BaseNumericFormattingSettings.js +96 -0
  44. package/src/column-formatting-settings/ColumnFormattingPanel.js +112 -0
  45. package/src/column-formatting-settings/DateTimeFormattingSettings.js +116 -0
  46. package/src/column-formatting-settings/LongTypeFormattingSettings.css.js +11 -0
  47. package/src/column-formatting-settings/LongTypeFormattingSettings.js +54 -0
  48. package/src/column-formatting-settings/index.js +3 -0
  49. package/src/column-menu/ColumnMenu.css.js +25 -0
  50. package/src/column-menu/ColumnMenu.js +69 -0
  51. package/src/column-menu/column-action-types.js +0 -0
  52. package/src/column-menu/column-menu-utils.js +318 -0
  53. package/src/column-menu/useColumnActions.js +77 -0
  54. package/src/column-picker/ColumnModel.js +113 -0
  55. package/src/column-picker/ColumnPicker.css.js +96 -0
  56. package/src/column-picker/ColumnPicker.js +204 -0
  57. package/src/column-picker/ColumnPickerAction.js +24 -0
  58. package/src/column-picker/useColumnPicker.js +42 -0
  59. package/src/column-picker/useTableColumnPicker.js +27 -0
  60. package/src/column-picker/useTableColumnPickerDeprecated.js +87 -0
  61. package/src/column-settings-panel/ColumnNameLabel.css.js +18 -0
  62. package/src/column-settings-panel/ColumnNameLabel.js +54 -0
  63. package/src/column-settings-panel/ColumnSettingsPanel.css.js +70 -0
  64. package/src/column-settings-panel/ColumnSettingsPanel.js +173 -0
  65. package/src/column-settings-panel/useColumnSettings.js +205 -0
  66. package/src/csv-upload/CsvUpload.css.js +28 -0
  67. package/src/csv-upload/CsvUpload.js +95 -0
  68. package/src/csv-upload/index.js +7 -0
  69. package/src/csv-upload/parse/csv-constants.js +3 -0
  70. package/src/csv-upload/parse/csv-errors.js +54 -0
  71. package/src/csv-upload/parse/csv-parse.js +79 -0
  72. package/src/csv-upload/parse/csv-schema-validation.js +45 -0
  73. package/src/csv-upload/parse/csv-upload-utils.js +59 -0
  74. package/src/csv-upload/parse/index.js +5 -0
  75. package/src/csv-upload/useCsvUpload.js +260 -0
  76. package/src/csv-upload/useCsvUploadSessionPreview.js +70 -0
  77. package/src/datasource-stats/DatasourceStats.css.js +56 -0
  78. package/src/datasource-stats/DatasourceStats.js +89 -0
  79. package/src/datasource-stats/useDatasourceStats.js +48 -0
  80. package/src/freeze-control/FreezeControl.css.js +108 -0
  81. package/src/freeze-control/FreezeControl.js +96 -0
  82. package/src/freeze-control/FrozenBanner.css.js +16 -0
  83. package/src/freeze-control/FrozenBanner.js +48 -0
  84. package/src/freeze-control/freezeControlBadge.js +9 -0
  85. package/src/freeze-control/useFreezeControl.js +68 -0
  86. package/src/index.js +22 -0
  87. package/src/tabbed-table-config-panel/TabbedTableConfigPanel.css.js +23 -0
  88. package/src/tabbed-table-config-panel/TabbedTableConfigPanel.js +99 -0
  89. package/src/tabbed-table-config-panel/TabbedTableSettingsAction.js +28 -0
  90. package/src/tabbed-table-config-panel/useTabbedTableConfigPanel.js +29 -0
  91. package/src/table-footer/TableFooter.css.js +22 -0
  92. package/src/table-footer/TableFooter.js +30 -0
  93. package/src/table-provider/TableProvider.js +33 -0
  94. package/src/table-settings-panel/TableSettingsPanel.css.js +70 -0
  95. package/src/table-settings-panel/TableSettingsPanel.js +128 -0
  96. package/src/table-settings-panel/useTableSettings.js +50 -0
@@ -0,0 +1,381 @@
1
+ class LiteralExpressionImpl {
2
+ type;
3
+ value;
4
+ constructor(value){
5
+ this.value = value;
6
+ switch(typeof value){
7
+ case "boolean":
8
+ this.type = "booleanLiteralExpression";
9
+ break;
10
+ case "number":
11
+ this.type = "numericLiteralExpression";
12
+ break;
13
+ default:
14
+ this.type = "stringLiteralExpression";
15
+ }
16
+ }
17
+ toJSON() {
18
+ return {
19
+ type: this.type,
20
+ value: this.value
21
+ };
22
+ }
23
+ }
24
+ class ColumnExpressionImpl {
25
+ type = "colExpression";
26
+ column;
27
+ constructor(columnName){
28
+ this.column = columnName;
29
+ }
30
+ toJSON() {
31
+ return {
32
+ type: this.type,
33
+ column: this.column
34
+ };
35
+ }
36
+ }
37
+ class ArithmeticExpressionImpl {
38
+ #expressions = [
39
+ {
40
+ type: "unknown"
41
+ },
42
+ {
43
+ type: "unknown"
44
+ }
45
+ ];
46
+ #op;
47
+ type = "arithmeticExpression";
48
+ constructor(op = "unknown"){
49
+ this.#op = op;
50
+ }
51
+ get op() {
52
+ return this.#op;
53
+ }
54
+ set op(op) {
55
+ this.#op = op;
56
+ }
57
+ get expressions() {
58
+ return this.#expressions;
59
+ }
60
+ toJSON() {
61
+ return {
62
+ type: this.type,
63
+ op: this.#op,
64
+ expressions: this.#expressions
65
+ };
66
+ }
67
+ }
68
+ class CallExpressionImpl {
69
+ #expressions = [];
70
+ functionName;
71
+ type = "callExpression";
72
+ constructor(functionName){
73
+ this.functionName = functionName;
74
+ }
75
+ get expressions() {
76
+ return this.#expressions;
77
+ }
78
+ get arguments() {
79
+ return this.#expressions;
80
+ }
81
+ toJSON() {
82
+ return {
83
+ type: this.type,
84
+ functionName: this.functionName,
85
+ arguments: this.#expressions.map((e)=>e.toJSON?.())
86
+ };
87
+ }
88
+ }
89
+ class RelationalExpressionImpl {
90
+ #expressions = [
91
+ {
92
+ type: "unknown"
93
+ },
94
+ {
95
+ type: "unknown"
96
+ }
97
+ ];
98
+ #op = "unknown";
99
+ type = "relationalExpression";
100
+ get op() {
101
+ return this.#op;
102
+ }
103
+ set op(op) {
104
+ this.#op = op;
105
+ }
106
+ get expressions() {
107
+ return this.#expressions;
108
+ }
109
+ toJSON() {
110
+ return {
111
+ type: this.type,
112
+ op: this.#op,
113
+ expressions: this.#expressions
114
+ };
115
+ }
116
+ }
117
+ class BooleanConditionImp {
118
+ #expressions = [
119
+ {
120
+ type: "unknown"
121
+ },
122
+ {
123
+ type: "unknown"
124
+ }
125
+ ];
126
+ #op;
127
+ type = "booleanCondition";
128
+ constructor(booleanOperator){
129
+ this.#op = booleanOperator;
130
+ }
131
+ get op() {
132
+ return this.#op;
133
+ }
134
+ get expressions() {
135
+ return this.#expressions;
136
+ }
137
+ toJSON() {
138
+ return {
139
+ type: this.type,
140
+ op: this.#op,
141
+ expressions: this.#expressions.map((e)=>e.toJSON?.())
142
+ };
143
+ }
144
+ }
145
+ class ConditionalExpressionImpl {
146
+ #expressions;
147
+ type = "conditionalExpression";
148
+ constructor(booleanOperator){
149
+ this.#expressions = [
150
+ booleanOperator ? new BooleanConditionImp(booleanOperator) : new RelationalExpressionImpl(),
151
+ {
152
+ type: "unknown"
153
+ },
154
+ {
155
+ type: "unknown"
156
+ }
157
+ ];
158
+ }
159
+ get expressions() {
160
+ return this.#expressions;
161
+ }
162
+ get condition() {
163
+ return this.#expressions[0];
164
+ }
165
+ get truthyExpression() {
166
+ return this.#expressions[1];
167
+ }
168
+ set truthyExpression(expression) {
169
+ this.#expressions[1] = expression;
170
+ }
171
+ get falsyExpression() {
172
+ return this.#expressions[2];
173
+ }
174
+ set falsyExpression(expression) {
175
+ this.#expressions[2] = expression;
176
+ }
177
+ toJSON() {
178
+ return {
179
+ type: this.type,
180
+ condition: this.condition.toJSON?.(),
181
+ truthyExpression: this.truthyExpression,
182
+ falsyExpression: this.falsyExpression?.toJSON?.() ?? this.falsyExpression
183
+ };
184
+ }
185
+ }
186
+ const isUnknown = (e)=>"unknown" === e.type;
187
+ const isArithmeticExpression = (expression)=>"arithmeticExpression" === expression.type;
188
+ const isCallExpression = (expression)=>"callExpression" === expression.type;
189
+ const isConditionalExpression = (expression)=>"conditionalExpression" === expression.type;
190
+ const isCondition = (expression)=>"relationalExpression" === expression.type || "booleanCondition" === expression.type;
191
+ const booleanConditionIsIncomplete = (condition)=>condition.expressions.length < 2 || condition.expressions.some((e)=>conditionIsIncomplete(e));
192
+ const isBooleanCondition = (expression)=>"booleanCondition" === expression.type;
193
+ const isRelationalExpression = (expression)=>expression?.type === "relationalExpression";
194
+ const conditionIsIncomplete = (condition)=>isBooleanCondition(condition) && booleanConditionIsIncomplete(condition) || isRelationalExpression(condition) && condition.expressions.length < 2;
195
+ const firstIncompleteExpression = (expression)=>{
196
+ if (isUnknown(expression)) return expression;
197
+ if (isRelationalExpression(expression)) {
198
+ const [operand1, operand2] = expression.expressions;
199
+ if (expressionIsIncomplete(operand1)) return firstIncompleteExpression(operand1);
200
+ if ("unknown" === expression.op) return expression;
201
+ if (expressionIsIncomplete(operand2)) return firstIncompleteExpression(operand2);
202
+ } else if (isCondition(expression)) {
203
+ const { expressions = [] } = expression;
204
+ for (const e of expressions)if (expressionIsIncomplete(e)) return firstIncompleteExpression(e);
205
+ } else if (isConditionalExpression(expression)) {
206
+ const { condition, truthyExpression, falsyExpression } = expression;
207
+ if (expressionIsIncomplete(condition)) return firstIncompleteExpression(condition);
208
+ if (expressionIsIncomplete(truthyExpression)) return firstIncompleteExpression(truthyExpression);
209
+ if (expressionIsIncomplete(falsyExpression)) return firstIncompleteExpression(falsyExpression);
210
+ } else if (isArithmeticExpression(expression)) {
211
+ const { expressions = [] } = expression;
212
+ for (const e of expressions)if (expressionIsIncomplete(e)) return firstIncompleteExpression(e);
213
+ }
214
+ };
215
+ const replaceUnknownExpression = (incompleteExpression, unknownExpression, expression)=>{
216
+ const { expressions = [] } = incompleteExpression;
217
+ if (expressions.includes(unknownExpression)) {
218
+ const pos = expressions.indexOf(unknownExpression);
219
+ expressions.splice(pos, 1, expression);
220
+ return true;
221
+ }
222
+ for (const e of expressions)if (replaceUnknownExpression(e, unknownExpression, expression)) return true;
223
+ return false;
224
+ };
225
+ const expressionIsIncomplete = (expression)=>{
226
+ if (isUnknown(expression)) return true;
227
+ if (isConditionalExpression(expression)) return expressionIsIncomplete(expression.condition) || expressionIsIncomplete(expression.truthyExpression) || expressionIsIncomplete(expression.falsyExpression);
228
+ if (isRelationalExpression(expression) || isBooleanCondition(expression)) return void 0 === expression.op || expression.expressions.some((e)=>expressionIsIncomplete(e));
229
+ return false;
230
+ };
231
+ const addExpression = (expression, subExpression)=>{
232
+ const targetExpression = firstIncompleteExpression(expression);
233
+ if (targetExpression) if (targetExpression.expressions) targetExpression.expressions.push(subExpression);
234
+ else console.warn("don't know how to treat targetExpression");
235
+ else console.error("no target expression found");
236
+ };
237
+ class ColumnExpression {
238
+ #expression;
239
+ #callStack = [];
240
+ setCondition(booleanOperator) {
241
+ if (void 0 === this.#expression) this.addExpression(new ConditionalExpressionImpl(booleanOperator));
242
+ else if (isConditionalExpression(this.#expression)) {
243
+ if (expressionIsIncomplete(this.#expression.condition)) {
244
+ const condition = booleanOperator ? new BooleanConditionImp(booleanOperator) : new RelationalExpressionImpl();
245
+ this.addExpression(condition);
246
+ } else if (isUnknown(this.#expression.truthyExpression)) this.#expression.truthyExpression = new ConditionalExpressionImpl(booleanOperator);
247
+ else if (expressionIsIncomplete(this.#expression.truthyExpression)) {
248
+ const condition = booleanOperator ? new BooleanConditionImp(booleanOperator) : new RelationalExpressionImpl();
249
+ this.addExpression(condition);
250
+ } else if (isUnknown(this.#expression.falsyExpression)) this.#expression.falsyExpression = new ConditionalExpressionImpl(booleanOperator);
251
+ else if (expressionIsIncomplete(this.#expression.falsyExpression)) {
252
+ const condition = booleanOperator ? new BooleanConditionImp(booleanOperator) : new RelationalExpressionImpl();
253
+ this.addExpression(condition);
254
+ }
255
+ } else console.error("setCondition called unexpectedly");
256
+ }
257
+ addExpression(expression) {
258
+ if (this.#callStack.length > 0) {
259
+ const currentCallExpression = this.#callStack.at(-1);
260
+ currentCallExpression?.arguments.push(expression);
261
+ } else if (void 0 === this.#expression) this.#expression = expression;
262
+ else if (isArithmeticExpression(this.#expression)) {
263
+ const targetExpression = firstIncompleteExpression(this.#expression);
264
+ if (targetExpression && isUnknown(targetExpression)) replaceUnknownExpression(this.#expression, targetExpression, expression);
265
+ } else if (isConditionalExpression(this.#expression)) {
266
+ if (expressionIsIncomplete(this.#expression)) {
267
+ const targetExpression = firstIncompleteExpression(this.#expression);
268
+ if (targetExpression && isUnknown(targetExpression)) replaceUnknownExpression(this.#expression, targetExpression, expression);
269
+ else if (targetExpression) addExpression(targetExpression, expression);
270
+ }
271
+ }
272
+ }
273
+ setFunction(functionName) {
274
+ const callExpression = new CallExpressionImpl(functionName);
275
+ this.addExpression(callExpression);
276
+ this.#callStack.push(callExpression);
277
+ }
278
+ setColumn(columnName) {
279
+ this.addExpression(new ColumnExpressionImpl(columnName));
280
+ }
281
+ setArithmeticOp(value) {
282
+ const op = value;
283
+ const expression = this.#expression;
284
+ if (isArithmeticExpression(expression)) expression.op = op;
285
+ }
286
+ setRelationalOperator(value) {
287
+ const op = value;
288
+ if (this.#expression && isConditionalExpression(this.#expression)) {
289
+ const targetExpression = firstIncompleteExpression(this.#expression);
290
+ if (isRelationalExpression(targetExpression)) targetExpression.op = op;
291
+ else console.error(`no target expression found (op = ${value})`);
292
+ }
293
+ }
294
+ setValue(value) {
295
+ const literalExpression = new LiteralExpressionImpl(value);
296
+ if (void 0 === this.#expression) this.#expression = literalExpression;
297
+ else if (isArithmeticExpression(this.#expression)) this.addExpression(literalExpression);
298
+ else if (isCallExpression(this.#expression)) this.#expression.arguments.push(literalExpression);
299
+ else if (isConditionalExpression(this.#expression)) if (expressionIsIncomplete(this.#expression)) {
300
+ const targetExpression = firstIncompleteExpression(this.#expression);
301
+ if (targetExpression && isUnknown(targetExpression)) replaceUnknownExpression(this.#expression, targetExpression, literalExpression);
302
+ else if (targetExpression) addExpression(targetExpression, literalExpression);
303
+ } else console.log("what do we do with value, in a complete expression");
304
+ }
305
+ closeBrace() {
306
+ this.#callStack.pop();
307
+ }
308
+ get expression() {
309
+ return this.#expression;
310
+ }
311
+ toJSON() {
312
+ return this.#expression?.toJSON();
313
+ }
314
+ }
315
+ const walkTree = (tree, source)=>{
316
+ const columnExpression = new ColumnExpression();
317
+ const cursor = tree.cursor();
318
+ do {
319
+ const { name, from, to } = cursor;
320
+ switch(name){
321
+ case "AndCondition":
322
+ columnExpression.setCondition("and");
323
+ break;
324
+ case "OrCondition":
325
+ columnExpression.setCondition("or");
326
+ break;
327
+ case "RelationalExpression":
328
+ columnExpression.setCondition();
329
+ break;
330
+ case "ArithmeticExpression":
331
+ columnExpression.addExpression(new ArithmeticExpressionImpl());
332
+ break;
333
+ case "Column":
334
+ {
335
+ const columnName = source.substring(from, to);
336
+ columnExpression.setColumn(columnName);
337
+ }
338
+ break;
339
+ case "Function":
340
+ {
341
+ const functionName = source.substring(from, to);
342
+ columnExpression.setFunction(functionName);
343
+ }
344
+ break;
345
+ case "Times":
346
+ case "Divide":
347
+ case "Plus":
348
+ case "Minus":
349
+ {
350
+ const op = source.substring(from, to);
351
+ columnExpression.setArithmeticOp(op);
352
+ }
353
+ break;
354
+ case "RelationalOperator":
355
+ {
356
+ const op = source.substring(from, to);
357
+ columnExpression.setRelationalOperator(op);
358
+ }
359
+ break;
360
+ case "False":
361
+ case "True":
362
+ {
363
+ const value = source.substring(from, to);
364
+ columnExpression.setValue("true" === value);
365
+ }
366
+ break;
367
+ case "String":
368
+ columnExpression.setValue(source.substring(from + 1, to - 1));
369
+ break;
370
+ case "Number":
371
+ columnExpression.setValue(parseFloat(source.substring(from, to)));
372
+ break;
373
+ case "CloseBrace":
374
+ columnExpression.closeBrace();
375
+ break;
376
+ default:
377
+ }
378
+ }while (cursor.next())
379
+ return columnExpression.toJSON();
380
+ };
381
+ export { walkTree };
@@ -0,0 +1,56 @@
1
+ import { parser } from "./generated/column-parser.js";
2
+ const strictParser = parser.configure({
3
+ strict: true
4
+ });
5
+ const RelationalOperands = [
6
+ "Number",
7
+ "String"
8
+ ];
9
+ const ColumnNamedTerms = [
10
+ ...RelationalOperands,
11
+ "AndCondition",
12
+ "ArithmeticExpression",
13
+ "BooleanOperator",
14
+ "RelationalOperatorOperator",
15
+ "CallExpression",
16
+ "CloseBrace",
17
+ "Column",
18
+ "Comma",
19
+ "ConditionalExpression",
20
+ "Divide",
21
+ "Equal",
22
+ "If",
23
+ "Minus",
24
+ "OpenBrace",
25
+ "OrCondition",
26
+ "ParenthesizedExpression",
27
+ "Plus",
28
+ "RelationalExpression",
29
+ "RelationalOperator",
30
+ "Times"
31
+ ];
32
+ const isCompleteExpression = (src)=>{
33
+ try {
34
+ strictParser.parse(src);
35
+ return true;
36
+ } catch (err) {
37
+ return false;
38
+ }
39
+ };
40
+ const lastNamedChild = (node)=>{
41
+ let { lastChild } = node;
42
+ while(lastChild && !ColumnNamedTerms.includes(lastChild.name)){
43
+ lastChild = lastChild.prevSibling;
44
+ console.log(lastChild?.name);
45
+ }
46
+ return lastChild;
47
+ };
48
+ const isCompleteRelationalExpression = (node)=>{
49
+ if (node?.name === "RelationalExpression") {
50
+ const { firstChild } = node;
51
+ const lastChild = lastNamedChild(node);
52
+ if (firstChild?.name === "Column" && "string" == typeof lastChild?.name && RelationalOperands.includes(lastChild.name)) return true;
53
+ }
54
+ return false;
55
+ };
56
+ export { ColumnNamedTerms, isCompleteExpression, isCompleteRelationalExpression, lastNamedChild };
@@ -0,0 +1,3 @@
1
+ export * from "./ColumnExpressionLanguage.js";
2
+ export * from "./ColumnExpressionTreeWalker.js";
3
+ export * from "./column-expression-parse-utils.js";
@@ -0,0 +1,24 @@
1
+ import { createEl } from "@vuu-ui/vuu-utils";
2
+ const functionDocInfo = ({ name, description, example, params, type })=>{
3
+ const rootElement = createEl("div", "vuuFunctionDoc");
4
+ const headingElement = createEl("div", "function-heading");
5
+ const nameElement = createEl("span", "function-name", name);
6
+ const paramElement = createEl("span", "param-list", params.description);
7
+ const typeElement = createEl("span", "function-type", type);
8
+ headingElement.appendChild(nameElement);
9
+ headingElement.appendChild(paramElement);
10
+ headingElement.appendChild(typeElement);
11
+ const child2 = createEl("p", void 0, description);
12
+ rootElement.appendChild(headingElement);
13
+ rootElement.appendChild(child2);
14
+ if (example) {
15
+ const exampleElement = createEl("div", "example-container");
16
+ const expressionElement = createEl("div", "example-expression", example.expression);
17
+ const resultElement = createEl("div", "example-result", example.result);
18
+ exampleElement.appendChild(expressionElement);
19
+ rootElement.appendChild(exampleElement);
20
+ rootElement.appendChild(resultElement);
21
+ }
22
+ return rootElement;
23
+ };
24
+ export { functionDocInfo };
@@ -0,0 +1,18 @@
1
+ import { HighlightStyle, syntaxHighlighting, tags } from "@vuu-ui/vuu-codemirror";
2
+ const myHighlightStyle = HighlightStyle.define([
3
+ {
4
+ tag: tags.attributeValue,
5
+ color: "var(--vuuFilterEditor-variableColor);font-weight: bold"
6
+ },
7
+ {
8
+ tag: tags.variableName,
9
+ color: "var(--vuuFilterEditor-variableColor)"
10
+ },
11
+ {
12
+ tag: tags.comment,
13
+ color: "green",
14
+ fontStyle: "italic"
15
+ }
16
+ ]);
17
+ const vuuHighlighting = syntaxHighlighting(myHighlightStyle);
18
+ export { vuuHighlighting };
@@ -0,0 +1,4 @@
1
+ export * from "./ColumnExpressionInput.js";
2
+ export * from "./column-language-parser/index.js";
3
+ export * from "./useColumnExpressionEditor.js";
4
+ export * from "./useColumnExpressionSuggestionProvider.js";
@@ -0,0 +1,57 @@
1
+ import { EditorView } from "@vuu-ui/vuu-codemirror";
2
+ const vuuTheme = EditorView.theme({
3
+ "&": {
4
+ border: "solid 1px var(--salt-container-primary-borderColor)",
5
+ color: "var(--vuuFilterEditor-color)",
6
+ backgroundColor: "var(--vuuFilterEditor-background)"
7
+ },
8
+ ".cm-content": {
9
+ caretColor: "var(--vuuFilterEditor-cursorColor)"
10
+ },
11
+ "&.cm-focused .cm-cursor": {
12
+ borderLeftColor: "var(--vuuFilterEditor-cursorColor)"
13
+ },
14
+ "&.cm-focused .cm-selectionBackground, ::selection": {
15
+ backgroundColor: "var(--vuuFilterEditor-selectionBackground)"
16
+ },
17
+ ".cm-selectionBackground, ::selection": {
18
+ backgroundColor: "var(--vuuFilterEditor-selectionBackground)"
19
+ },
20
+ ".cm-scroller": {
21
+ fontFamily: "var(--vuuFilterEditor-fontFamily)"
22
+ },
23
+ ".cm-completionLabel": {
24
+ color: "var(--vuu-color-gray-50)"
25
+ },
26
+ ".cm-completionMatchedText": {
27
+ color: "var(--vuu-color-gray-80)",
28
+ fontWeight: 700,
29
+ textDecoration: "none"
30
+ },
31
+ ".cm-tooltip": {
32
+ background: "var(--vuuFilterEditor-tooltipBackground)",
33
+ border: "var(--vuuFilterEditor-tooltipBorder)",
34
+ borderRadius: "4px",
35
+ boxShadow: "var(--vuuFilterEditor-tooltipElevation)",
36
+ "&.cm-tooltip-autocomplete > ul": {
37
+ fontFamily: "var(--vuuFilterEditor-fontFamily)",
38
+ fontSize: "var(--vuuFilterEditor-fontSize)",
39
+ maxHeight: "240px"
40
+ },
41
+ "&.cm-tooltip-autocomplete > ul > li": {
42
+ height: "var(--vuuFilterEditor-suggestion-height)",
43
+ padding: "0 3px",
44
+ lineHeight: "var(--vuuFilterEditor-suggestion-height)"
45
+ },
46
+ "&.cm-tooltip-autocomplete li[aria-selected]": {
47
+ background: "var(--vuuFilterEditor-suggestion-selectedBackground)",
48
+ color: "var(--vuuFilterEditor-suggestion-selectedColor)"
49
+ },
50
+ "&.cm-tooltip-autocomplete li .cm-completionDetail": {
51
+ color: "var(--vuuFilterEditor-suggestion-detailColor)"
52
+ }
53
+ }
54
+ }, {
55
+ dark: false
56
+ });
57
+ export { vuuTheme };