@adaptabletools/adaptable 24.0.1 → 24.0.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.
- package/package.json +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +3 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +15 -7
- package/src/Utilities/Services/QueryLanguageService.js +1 -1
- package/src/agGrid/AdaptableAgGrid.js +22 -31
- package/src/env.js +2 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/vendor/aql/api/QueryLanguageApi.d.ts +2 -1
- package/vendor/aql/api/QueryLanguageApi.d.ts.map +1 -1
- package/vendor/aql/api/QueryLanguageApi.js +28 -108
- package/vendor/aql/api/QueryLanguageApi.js.map +1 -1
- package/vendor/aql/contract/index.js +0 -34
- package/vendor/aql/contract/index.js.map +1 -1
- package/vendor/aql/corpus/corpusExpressions.js +0 -13
- package/vendor/aql/corpus/corpusExpressions.js.map +1 -1
- package/vendor/aql/corpus/corpusFixture.js +0 -7
- package/vendor/aql/corpus/corpusFixture.js.map +1 -1
- package/vendor/aql/draft/index.js +0 -4
- package/vendor/aql/draft/index.js.map +1 -1
- package/vendor/aql/evaluate.js +0 -22
- package/vendor/aql/evaluate.js.map +1 -1
- package/vendor/aql/evaluator/ExpressionEvaluationError.js +0 -4
- package/vendor/aql/evaluator/ExpressionEvaluationError.js.map +1 -1
- package/vendor/aql/evaluator/ExpressionNaError.js +0 -4
- package/vendor/aql/evaluator/ExpressionNaError.js.map +1 -1
- package/vendor/aql/evaluator/evaluateNode.js +0 -23
- package/vendor/aql/evaluator/evaluateNode.js.map +1 -1
- package/vendor/aql/functions/dateUtils.js +0 -63
- package/vendor/aql/functions/dateUtils.js.map +1 -1
- package/vendor/aql/functions/numberUtils.js +0 -12
- package/vendor/aql/functions/numberUtils.js.map +1 -1
- package/vendor/aql/functions/operatorFunctions.js +0 -13
- package/vendor/aql/functions/operatorFunctions.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/AND.js +0 -5
- package/vendor/aql/functions/scalar/functions/AND.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/ANY_CHANGE.js +0 -4
- package/vendor/aql/functions/scalar/functions/ANY_CHANGE.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/ANY_CONTAINS.js +0 -4
- package/vendor/aql/functions/scalar/functions/ANY_CONTAINS.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/AVG.js +0 -1
- package/vendor/aql/functions/scalar/functions/AVG.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/CASE.js +2 -2
- package/vendor/aql/functions/scalar/functions/CASE.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/COL.js +0 -2
- package/vendor/aql/functions/scalar/functions/COL.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/CONTAINS.js +0 -3
- package/vendor/aql/functions/scalar/functions/CONTAINS.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/DATE.js +0 -2
- package/vendor/aql/functions/scalar/functions/DATE.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/ENDS_WITH.js +0 -1
- package/vendor/aql/functions/scalar/functions/ENDS_WITH.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/EQ.js +0 -5
- package/vendor/aql/functions/scalar/functions/EQ.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/GT.js +0 -3
- package/vendor/aql/functions/scalar/functions/GT.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/GTE.js +0 -3
- package/vendor/aql/functions/scalar/functions/GTE.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/IF.js +0 -5
- package/vendor/aql/functions/scalar/functions/IF.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/IFERROR.js +0 -4
- package/vendor/aql/functions/scalar/functions/IFERROR.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/IFNA.js +0 -5
- package/vendor/aql/functions/scalar/functions/IFNA.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/IN.d.ts.map +1 -1
- package/vendor/aql/functions/scalar/functions/IN.js +54 -11
- package/vendor/aql/functions/scalar/functions/IN.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/IS_BLANK.js +0 -1
- package/vendor/aql/functions/scalar/functions/IS_BLANK.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/IS_DIFFERENT_DAY.js +0 -1
- package/vendor/aql/functions/scalar/functions/IS_DIFFERENT_DAY.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/IS_NOT_BLANK.js +0 -1
- package/vendor/aql/functions/scalar/functions/IS_NOT_BLANK.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/LT.js +0 -3
- package/vendor/aql/functions/scalar/functions/LT.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/LTE.js +0 -3
- package/vendor/aql/functions/scalar/functions/LTE.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/NA.js +0 -3
- package/vendor/aql/functions/scalar/functions/NA.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/NOT_CONTAINS.js +0 -1
- package/vendor/aql/functions/scalar/functions/NOT_CONTAINS.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/NOT_IN.js +0 -3
- package/vendor/aql/functions/scalar/functions/NOT_IN.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/OR.js +0 -4
- package/vendor/aql/functions/scalar/functions/OR.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/PRODUCT.js +0 -6
- package/vendor/aql/functions/scalar/functions/PRODUCT.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/QUERY.js +0 -1
- package/vendor/aql/functions/scalar/functions/QUERY.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/REGEX.js +0 -1
- package/vendor/aql/functions/scalar/functions/REGEX.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/SCOPE.js +0 -4
- package/vendor/aql/functions/scalar/functions/SCOPE.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/STARTS_WITH.js +0 -1
- package/vendor/aql/functions/scalar/functions/STARTS_WITH.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/SUB.js +0 -1
- package/vendor/aql/functions/scalar/functions/SUB.js.map +1 -1
- package/vendor/aql/functions/scalar/functions/SUM.js +0 -5
- package/vendor/aql/functions/scalar/functions/SUM.js.map +1 -1
- package/vendor/aql/functions/scalar/helpers.js +0 -3
- package/vendor/aql/functions/scalar/helpers.js.map +1 -1
- package/vendor/aql/functions/shared/FIELD.js +0 -3
- package/vendor/aql/functions/shared/FIELD.js.map +1 -1
- package/vendor/aql/functions/shared/VAR.js +0 -4
- package/vendor/aql/functions/shared/VAR.js.map +1 -1
- package/vendor/aql/functions/shared/index.js +0 -9
- package/vendor/aql/functions/shared/index.js.map +1 -1
- package/vendor/aql/functions/stringUtils.js +0 -25
- package/vendor/aql/functions/stringUtils.js.map +1 -1
- package/vendor/aql/functions/utils.js +0 -20
- package/vendor/aql/functions/utils.js.map +1 -1
- package/vendor/aql/host/access.js +0 -2
- package/vendor/aql/host/access.js.map +1 -1
- package/vendor/aql/host/createHostExpressionContext.js +0 -25
- package/vendor/aql/host/createHostExpressionContext.js.map +1 -1
- package/vendor/aql/host/createObjectDataHost.js +0 -9
- package/vendor/aql/host/createObjectDataHost.js.map +1 -1
- package/vendor/aql/index.js +0 -2
- package/vendor/aql/index.js.map +1 -1
- package/vendor/aql/normalize/canonicalize.js +0 -7
- package/vendor/aql/normalize/canonicalize.js.map +1 -1
- package/vendor/aql/normalize/migrateExpression.js +0 -8
- package/vendor/aql/normalize/migrateExpression.js.map +1 -1
- package/vendor/aql/normalize/names.js +0 -72
- package/vendor/aql/normalize/names.js.map +1 -1
- package/vendor/aql/normalize/normalizeAst.js +0 -102
- package/vendor/aql/normalize/normalizeAst.js.map +1 -1
- package/vendor/aql/normalize/print.js +0 -35
- package/vendor/aql/normalize/print.js.map +1 -1
- package/vendor/aql/operator/primitiveSlots.js +0 -4
- package/vendor/aql/operator/primitiveSlots.js.map +1 -1
- package/vendor/aql/operator/resolve.js +0 -18
- package/vendor/aql/operator/resolve.js.map +1 -1
- package/vendor/aql/parser/parser.js +4 -125
- package/vendor/aql/parser/parser.js.map +1 -1
- package/vendor/aql/plan/catalogue.js +0 -35
- package/vendor/aql/plan/catalogue.js.map +1 -1
- package/vendor/aql/plan/compile.js +0 -68
- package/vendor/aql/plan/compile.js.map +1 -1
- package/vendor/aql/plan/deepMap.js +0 -16
- package/vendor/aql/plan/deepMap.js.map +1 -1
- package/vendor/aql/plan/execute.js +0 -91
- package/vendor/aql/plan/execute.js.map +1 -1
- package/vendor/aql/plan/magnitudeLiteral.js +0 -29
- package/vendor/aql/plan/magnitudeLiteral.js.map +1 -1
- package/vendor/aql/plan/observable.js +0 -31
- package/vendor/aql/plan/observable.js.map +1 -1
- package/vendor/aql/plan/observableFixture.js +0 -3
- package/vendor/aql/plan/observableFixture.js.map +1 -1
- package/vendor/aql/plan/operators.js +0 -35
- package/vendor/aql/plan/operators.js.map +1 -1
- package/vendor/aql/plan/outer.js +0 -16
- package/vendor/aql/plan/outer.js.map +1 -1
- package/vendor/aql/predicate/mapExpressionToQlPredicate.js +1 -46
- package/vendor/aql/predicate/mapExpressionToQlPredicate.js.map +1 -1
- package/vendor/aql/predicate/mapQlPredicateToExpression.js +0 -13
- package/vendor/aql/predicate/mapQlPredicateToExpression.js.map +1 -1
- package/vendor/aql/store/computedValueStore.js +0 -35
- package/vendor/aql/store/computedValueStore.js.map +1 -1
- package/vendor/aql/store/history/clock.js +0 -1
- package/vendor/aql/store/history/clock.js.map +1 -1
- package/vendor/aql/store/history/historyStore.js +0 -14
- package/vendor/aql/store/history/historyStore.js.map +1 -1
- package/vendor/aql/store/history/monotonicDeque.js +0 -9
- package/vendor/aql/store/history/monotonicDeque.js.map +1 -1
- package/vendor/aql/store/history/operators.js +0 -13
- package/vendor/aql/store/history/operators.js.map +1 -1
- package/vendor/aql/store/history/ringBuffer.js +0 -12
- package/vendor/aql/store/history/ringBuffer.js.map +1 -1
- package/vendor/aql/store/history/rowSeries.js +0 -17
- package/vendor/aql/store/history/rowSeries.js.map +1 -1
- package/vendor/aql/store/history/types.js +0 -18
- package/vendor/aql/store/history/types.js.map +1 -1
- package/vendor/aql/tokenizer/tokenizer.js +0 -3
- package/vendor/aql/tokenizer/tokenizer.js.map +1 -1
- package/vendor/aql/types.js +0 -27
- package/vendor/aql/types.js.map +1 -1
- package/vendor/aql/utils/astUtils.js +0 -1
- package/vendor/aql/utils/astUtils.js.map +1 -1
- package/vendor/aql/utils/dependencyCycle.js +0 -5
- package/vendor/aql/utils/dependencyCycle.js.map +1 -1
- package/vendor/aql/validation/classifyExpression.js +0 -4
- package/vendor/aql/validation/classifyExpression.js.map +1 -1
- package/vendor/aql/validation/functionMetadata.js +0 -31
- package/vendor/aql/validation/functionMetadata.js.map +1 -1
- package/vendor/aql/validation/validateAqlExpression.js +2 -81
- package/vendor/aql/validation/validateAqlExpression.js.map +1 -1
- package/vendor/aql/validation/validateExpressionTypes.js +0 -64
- package/vendor/aql/validation/validateExpressionTypes.js.map +1 -1
- package/vendor/components/Button/index.js +0 -6
- package/vendor/components/Button/index.js.map +1 -1
- package/vendor/components/ColorField/index.js +0 -18
- package/vendor/components/ColorField/index.js.map +1 -1
- package/vendor/components/ColorPicker/colorPickerTab.js +0 -6
- package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -1
- package/vendor/components/ColorPicker/index.js +1 -66
- package/vendor/components/ColorPicker/index.js.map +1 -1
- package/vendor/components/ColorPicker/themeColors.js +0 -55
- package/vendor/components/ColorPicker/themeColors.js.map +1 -1
- package/vendor/components/Combobox/VirtualizedList.js +0 -5
- package/vendor/components/Combobox/VirtualizedList.js.map +1 -1
- package/vendor/components/Combobox/comboboxUtils.js +0 -5
- package/vendor/components/Combobox/comboboxUtils.js.map +1 -1
- package/vendor/components/Combobox/index.js +7 -106
- package/vendor/components/Combobox/index.js.map +1 -1
- package/vendor/components/Combobox/useScrollNearEnd.js +0 -6
- package/vendor/components/Combobox/useScrollNearEnd.js.map +1 -1
- package/vendor/components/DropdownButton/index.js +0 -5
- package/vendor/components/DropdownButton/index.js.map +1 -1
- package/vendor/components/NumberInput/index.js +0 -10
- package/vendor/components/NumberInput/index.js.map +1 -1
- package/vendor/components/Resizable/index.js +3 -26
- package/vendor/components/Resizable/index.js.map +1 -1
- package/vendor/components/Resizable/resizableUtils.js +0 -24
- package/vendor/components/Resizable/resizableUtils.js.map +1 -1
- package/vendor/components/SearchInput/index.js +0 -5
- package/vendor/components/SearchInput/index.js.map +1 -1
- package/vendor/components/Tree/TreeDropdown/index.js +3 -139
- package/vendor/components/Tree/TreeDropdown/index.js.map +1 -1
- package/vendor/components/Tree/treeUtils.js +0 -4
- package/vendor/components/Tree/treeUtils.js.map +1 -1
- package/vendor/components/index.js +0 -5
- package/vendor/components/index.js.map +1 -1
- package/vendor/components/lib/useProperty.js +0 -18
- package/vendor/components/lib/useProperty.js.map +1 -1
- package/vendor/components/twMerge.js +0 -2
- package/vendor/components/twMerge.js.map +1 -1
- package/vendor/components/twUtils.js +3 -12
- package/vendor/components/twUtils.js.map +1 -1
- package/vendor/components/ui/alert-dialog.js +0 -4
- package/vendor/components/ui/alert-dialog.js.map +1 -1
- package/vendor/components/ui/calendar.js +1 -9
- package/vendor/components/ui/calendar.js.map +1 -1
- package/vendor/components/ui/combobox.js +2 -38
- package/vendor/components/ui/combobox.js.map +1 -1
- package/vendor/components/ui/dialog.js +0 -4
- package/vendor/components/ui/dialog.js.map +1 -1
- package/vendor/components/ui/input-group.js +3 -12
- package/vendor/components/ui/input-group.js.map +1 -1
- package/vendor/components/ui/tabs.js +0 -3
- package/vendor/components/ui/tabs.js.map +1 -1
|
@@ -6,8 +6,4 @@ export class ExpressionEvaluationError extends Error {
|
|
|
6
6
|
this.name = 'ExpressionEvaluationError';
|
|
7
7
|
}
|
|
8
8
|
}
|
|
9
|
-
// NOTE: do not re-export ExpressionNaError from here — ExpressionNaError.ts
|
|
10
|
-
// imports this module to extend the class, and a back re-export creates a
|
|
11
|
-
// circular initialization order (TDZ crash under ESM/webpack depending on
|
|
12
|
-
// which module is evaluated first). It is exported from `evaluator/index.ts`.
|
|
13
9
|
//# sourceMappingURL=ExpressionEvaluationError.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionEvaluationError.js","sourceRoot":"","sources":["../../../src/evaluator/ExpressionEvaluationError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAEhC;IADlB,YACkB,gBAAwB,EACxC,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,qBAAgB,GAAhB,gBAAgB,CAAQ;QAIxC,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF
|
|
1
|
+
{"version":3,"file":"ExpressionEvaluationError.js","sourceRoot":"","sources":["../../../src/evaluator/ExpressionEvaluationError.ts"],"names":[],"mappings":"AAAA,MAAM,OAAO,yBAA0B,SAAQ,KAAK;IAEhC;IADlB,YACkB,gBAAwB,EACxC,OAAe;QAEf,KAAK,CAAC,OAAO,CAAC,CAAC;QAHC,qBAAgB,GAAhB,gBAAgB,CAAQ;QAIxC,IAAI,CAAC,IAAI,GAAG,2BAA2B,CAAC;IAC1C,CAAC;CACF"}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { ExpressionEvaluationError } from './ExpressionEvaluationError.js';
|
|
2
|
-
/**
|
|
3
|
-
* AQL stand-in for Excel `#N/A` — “value not available” (e.g. failed lookup).
|
|
4
|
-
* Caught by {@link IFNA} and also by {@link IFERROR}.
|
|
5
|
-
*/
|
|
6
2
|
export class ExpressionNaError extends ExpressionEvaluationError {
|
|
7
3
|
constructor(expressionFnName = 'NA', message = 'N/A') {
|
|
8
4
|
super(expressionFnName, message);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpressionNaError.js","sourceRoot":"","sources":["../../../src/evaluator/ExpressionNaError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"ExpressionNaError.js","sourceRoot":"","sources":["../../../src/evaluator/ExpressionNaError.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAMxE,MAAM,OAAO,iBAAkB,SAAQ,yBAAyB;IAC9D,YAAY,mBAA2B,IAAI,EAAE,UAAkB,KAAK;QAClE,KAAK,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,GAAG,mBAAmB,CAAC;IAClC,CAAC;CACF"}
|
|
@@ -5,7 +5,6 @@ export function evaluateNode(node, context) {
|
|
|
5
5
|
if (typeof node === 'boolean' ||
|
|
6
6
|
typeof node === 'number' ||
|
|
7
7
|
typeof node === 'string' ||
|
|
8
|
-
// handles NULL literal
|
|
9
8
|
node == null) {
|
|
10
9
|
return node;
|
|
11
10
|
}
|
|
@@ -13,26 +12,16 @@ export function evaluateNode(node, context) {
|
|
|
13
12
|
return node.map((n) => evaluateNode(n, context));
|
|
14
13
|
}
|
|
15
14
|
const fnNode = node;
|
|
16
|
-
// Inside a value-plan execution the injected resolver answers aggregation
|
|
17
|
-
// nodes (brace calls AND evaluation-time sugar wrappers, which are
|
|
18
|
-
// plain FUNCTION nodes) with their compiled slot binding — checked before
|
|
19
|
-
// any pool dispatch.
|
|
20
15
|
if (context.resolveContractNode) {
|
|
21
16
|
const resolved = context.resolveContractNode(fnNode);
|
|
22
17
|
if (resolved) {
|
|
23
18
|
return resolved.value;
|
|
24
19
|
}
|
|
25
20
|
}
|
|
26
|
-
// (`metaInfo` is the contract-v1 duplicate of `kind` — see types.ts.)
|
|
27
21
|
const nodeKind = fnNode.kind ?? fnNode.metaInfo;
|
|
28
|
-
// Duration literal (`10s`, `5m`): `args[0]` is the value in milliseconds.
|
|
29
22
|
if (fnNode.type === 'DURATION' && nodeKind === 'VALUE_REF') {
|
|
30
23
|
return fnNode.args[0];
|
|
31
24
|
}
|
|
32
|
-
// OBSERVABLE_CALL is a pure read from the bound history: compile the node to
|
|
33
|
-
// a slot once (per node identity) and dispatch into the history operators.
|
|
34
|
-
// `resolveContractNode` above wins first, so plan execution and prepared
|
|
35
|
-
// evaluation share one dispatch order.
|
|
36
25
|
if (nodeKind === 'OBSERVABLE_CALL') {
|
|
37
26
|
const observableContext = context;
|
|
38
27
|
const history = observableContext.history;
|
|
@@ -45,11 +34,6 @@ export function evaluateNode(node, context) {
|
|
|
45
34
|
const rowId = slot.key.scope === 'row' ? history.rowIdOf(observableContext.rowRef) : undefined;
|
|
46
35
|
return evaluateObservableSlot(slot, history, rowId).value;
|
|
47
36
|
}
|
|
48
|
-
// AGG_CALL / CLAUSE nodes are only evaluatable through a value plan
|
|
49
|
-
// (compile → execute injects `resolveContractNode`). Reaching this point
|
|
50
|
-
// means an aggregation was handed to the plain scalar evaluator — the
|
|
51
|
-
// scalar dual-name handlers (SUM/AVG/MIN/MAX as row-wise math) must never
|
|
52
|
-
// see brace calls.
|
|
53
37
|
if (nodeKind === 'AGG_CALL' || nodeKind === 'CLAUSE') {
|
|
54
38
|
throw new ExpressionEvaluationError(fnNode.type, `uses brace-call / clause syntax, which is not evaluatable in this context`);
|
|
55
39
|
}
|
|
@@ -58,13 +42,6 @@ export function evaluateNode(node, context) {
|
|
|
58
42
|
if (functionDef.hasEagerEvaluation) {
|
|
59
43
|
return functionDef.handler(fnNode.args, context);
|
|
60
44
|
}
|
|
61
|
-
// Arguments are evaluated first (each nested call scopes its own
|
|
62
|
-
// argNodes), then `argNodes` is bound for the duration of this handler
|
|
63
|
-
// call and restored afterwards. Save/restore instead of spreading a new
|
|
64
|
-
// context per node: a 3-clause filter is ~8 nodes per row and the spread
|
|
65
|
-
// copied the whole host context each time. Evaluation is synchronous, so
|
|
66
|
-
// the handler observes exactly its own args and nested / re-entrant
|
|
67
|
-
// evaluation (QUERY, prepared evaluators) sees a consistent value.
|
|
68
45
|
const args = fnNode.args.map((n) => evaluateNode(n, context));
|
|
69
46
|
const previousArgNodes = context.argNodes;
|
|
70
47
|
context.argNodes = fnNode.args;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"evaluateNode.js","sourceRoot":"","sources":["../../../src/evaluator/evaluateNode.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAS3E,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,OAAkC;IAC5E,IACE,OAAO,IAAI,KAAK,SAAS;QACzB,OAAO,IAAI,KAAK,QAAQ;QACxB,OAAO,IAAI,KAAK,QAAQ;
|
|
1
|
+
{"version":3,"file":"evaluateNode.js","sourceRoot":"","sources":["../../../src/evaluator/evaluateNode.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,uBAAuB,GACxB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,yBAAyB,EAAE,MAAM,gCAAgC,CAAC;AAS3E,MAAM,UAAU,YAAY,CAAC,IAAa,EAAE,OAAkC;IAC5E,IACE,OAAO,IAAI,KAAK,SAAS;QACzB,OAAO,IAAI,KAAK,QAAQ;QACxB,OAAO,IAAI,KAAK,QAAQ;QAExB,IAAI,IAAI,IAAI,EACZ,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,IAAI,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QACxB,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;IAC5D,CAAC;IAED,MAAM,MAAM,GAA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;IAED,MAAM,WAAW,GAAG,yBAAyB,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAExF,IAAI,WAAW,EAAE,CAAC;QAChB,IAAI,WAAW,CAAC,kBAAkB,EAAE,CAAC;YACnC,OAAO,WAAW,CAAC,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QACnD,CAAC;QAQD,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAU,EAAE,EAAE,CAAC,YAAY,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,CAAC;QACvE,MAAM,gBAAgB,GAAG,OAAO,CAAC,QAAQ,CAAC;QAC1C,OAAO,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAwB,CAAC;QACnD,IAAI,CAAC;YACH,OAAO,WAAW,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC5C,CAAC;gBAAS,CAAC;YACT,OAAO,CAAC,QAAQ,GAAG,gBAAgB,CAAC;QACtC,CAAC;IACH,CAAC;SAAM,CAAC;QACN,MAAM,IAAI,yBAAyB,CACjC,EAAE,EACF,+CAA+C,MAAM,CAAC,IAAI,GAAG,CAC9D,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { addDays, addMonths, endOfMonth, getQuarter, getWeek, isEqual, isSameDay, parseISO, startOfDay, startOfMonth, startOfQuarter, startOfWeek, startOfYear, } from 'date-fns';
|
|
2
|
-
/**
|
|
3
|
-
* Default week start used by AQL week truncators / week-number extractors
|
|
4
|
-
* when the host does not configure one. `0` = Sunday.
|
|
5
|
-
*/
|
|
6
2
|
export const AQL_WEEK_STARTS_ON = 0;
|
|
7
|
-
/** Normalize a week-start day to a valid `Date.getDay()` value (`0`–`6`). */
|
|
8
3
|
export const normalizeWeekStartsOn = (weekStartsOn) => {
|
|
9
4
|
if (Number.isInteger(weekStartsOn) && weekStartsOn >= 0 && weekStartsOn <= 6) {
|
|
10
5
|
return weekStartsOn;
|
|
@@ -12,11 +7,6 @@ export const normalizeWeekStartsOn = (weekStartsOn) => {
|
|
|
12
7
|
return AQL_WEEK_STARTS_ON;
|
|
13
8
|
};
|
|
14
9
|
const isValidDate = (date) => date instanceof Date && !isNaN(date.getTime());
|
|
15
|
-
/**
|
|
16
|
-
* Parses a cell / literal value into a `Date`, or `undefined` when it cannot
|
|
17
|
-
* be parsed. Accepts `Date` instances, epoch numbers and ISO-ish strings
|
|
18
|
-
* (with a native `Date.parse` fallback for non-ISO formats).
|
|
19
|
-
*/
|
|
20
10
|
export const parseDateValue = (dateValue, options) => {
|
|
21
11
|
if (dateValue == undefined || (typeof dateValue === 'string' && dateValue.trim() === '')) {
|
|
22
12
|
return undefined;
|
|
@@ -32,7 +22,6 @@ export const parseDateValue = (dateValue, options) => {
|
|
|
32
22
|
else {
|
|
33
23
|
dateInstance = parseISO(dateValue);
|
|
34
24
|
if (!isValidDate(dateInstance)) {
|
|
35
|
-
// last chance: native Date.parse()
|
|
36
25
|
dateInstance = new Date(Date.parse(dateValue));
|
|
37
26
|
}
|
|
38
27
|
}
|
|
@@ -49,22 +38,11 @@ export const parseDateValue = (dateValue, options) => {
|
|
|
49
38
|
return undefined;
|
|
50
39
|
}
|
|
51
40
|
};
|
|
52
|
-
/**
|
|
53
|
-
* When either side is already a `Date`, or the subject column is typed as
|
|
54
|
-
* `date`, parse both operands with {@link parseDateValue} so ISO string cells
|
|
55
|
-
* compare correctly against `DATE(...)` / Date literals.
|
|
56
|
-
*
|
|
57
|
-
* Returns `null` when this is not a date comparison, or either side cannot be
|
|
58
|
-
* parsed — callers should fall through to their non-date path.
|
|
59
|
-
*/
|
|
60
41
|
export const resolveDateComparisonPair = (left, right, options) => {
|
|
61
42
|
const treatAsDate = left instanceof Date || right instanceof Date || options?.subjectDataType === 'date';
|
|
62
43
|
if (!treatAsDate) {
|
|
63
44
|
return null;
|
|
64
45
|
}
|
|
65
|
-
// an operand that is not a date is a legitimate "not equal" here (the
|
|
66
|
-
// callers fall through to their non-date comparison), not something to warn
|
|
67
|
-
// about on every row
|
|
68
46
|
const parsedLeft = parseDateValue(left, { warn: false });
|
|
69
47
|
const parsedRight = parseDateValue(right, { warn: false });
|
|
70
48
|
if (!parsedLeft || !parsedRight) {
|
|
@@ -91,13 +69,6 @@ export const normalizeDateParam = (args) => {
|
|
|
91
69
|
}
|
|
92
70
|
return args;
|
|
93
71
|
};
|
|
94
|
-
/**
|
|
95
|
-
* Date membership for AQL `IN`.
|
|
96
|
-
*
|
|
97
|
-
* - ISO strings with a `T` (or the host's `shouldEvaluateDatesUsingTime`) →
|
|
98
|
-
* exact instant
|
|
99
|
-
* - otherwise → same calendar day (`isSameDay`)
|
|
100
|
-
*/
|
|
101
72
|
export const matchDateInList = (options) => {
|
|
102
73
|
const { value, inputs, columnId, context } = options;
|
|
103
74
|
if (value === undefined || value === null || value === '') {
|
|
@@ -118,31 +89,17 @@ export const matchDateInList = (options) => {
|
|
|
118
89
|
return useTime ? isEqual(parsedInput, parsedValue) : isSameDay(parsedInput, parsedValue);
|
|
119
90
|
});
|
|
120
91
|
};
|
|
121
|
-
/** Day of month `1`–`31` (Excel `DAY`). */
|
|
122
92
|
export const extractDayOfMonth = (date) => date.getDate();
|
|
123
|
-
/** Month of year `1`–`12` (Excel `MONTH`). */
|
|
124
93
|
export const extractMonthNumber = (date) => date.getMonth() + 1;
|
|
125
|
-
/** Full calendar year (Excel `YEAR`). */
|
|
126
94
|
export const extractYearNumber = (date) => date.getFullYear();
|
|
127
|
-
/**
|
|
128
|
-
* Day of week `1`–`7` where Sunday = 1 … Saturday = 7
|
|
129
|
-
* (Excel `WEEKDAY` with return_type `1`).
|
|
130
|
-
*/
|
|
131
95
|
export const extractWeekdayNumber = (date) => date.getDay() + 1;
|
|
132
|
-
/** ISO-calendar quarter `1`–`4`. */
|
|
133
96
|
export const extractQuarterNumber = (date) => getQuarter(date);
|
|
134
|
-
/** Week-of-year number (weeks start on `weekStartsOn`, default Sunday). */
|
|
135
97
|
export const extractWeekNumber = (date, weekStartsOn = AQL_WEEK_STARTS_ON) => getWeek(date, { weekStartsOn });
|
|
136
98
|
export const toStartOfDay = (date) => startOfDay(date);
|
|
137
99
|
export const toStartOfWeek = (date, weekStartsOn = AQL_WEEK_STARTS_ON) => startOfWeek(date, { weekStartsOn });
|
|
138
100
|
export const toStartOfMonth = (date) => startOfMonth(date);
|
|
139
101
|
export const toStartOfQuarter = (date) => startOfQuarter(date);
|
|
140
102
|
export const toStartOfYear = (date) => startOfYear(date);
|
|
141
|
-
/**
|
|
142
|
-
* Excel-compatible `DATE(year, month, day)`: month is **1-based**.
|
|
143
|
-
* Out-of-range month/day values roll like the JS `Date` constructor
|
|
144
|
-
* (e.g. month `14` → February of the following year).
|
|
145
|
-
*/
|
|
146
103
|
export const computeDateParts = (year, month, day) => {
|
|
147
104
|
const y = Math.trunc(Number(year));
|
|
148
105
|
const m = Math.trunc(Number(month));
|
|
@@ -152,15 +109,8 @@ export const computeDateParts = (year, month, day) => {
|
|
|
152
109
|
}
|
|
153
110
|
return startOfDay(new Date(y, m - 1, d));
|
|
154
111
|
};
|
|
155
|
-
/** True when `date`'s calendar day is strictly before today's calendar day. */
|
|
156
112
|
export const isBeforeToday = (date, now = new Date()) => startOfDay(date).getTime() < startOfDay(now).getTime();
|
|
157
|
-
/** True when `date`'s calendar day is strictly after today's calendar day. */
|
|
158
113
|
export const isAfterToday = (date, now = new Date()) => startOfDay(date).getTime() > startOfDay(now).getTime();
|
|
159
|
-
/**
|
|
160
|
-
* Excel-compatible `EDATE`: same calendar day `months` away (truncated).
|
|
161
|
-
* If that day does not exist in the target month, returns the last day of
|
|
162
|
-
* that month (date-fns / Excel behaviour).
|
|
163
|
-
*/
|
|
164
114
|
export const computeEDate = (start, months) => {
|
|
165
115
|
const monthsInt = Math.trunc(Number(months));
|
|
166
116
|
if (!Number.isFinite(monthsInt)) {
|
|
@@ -168,16 +118,7 @@ export const computeEDate = (start, months) => {
|
|
|
168
118
|
}
|
|
169
119
|
return addMonths(startOfDay(start), monthsInt);
|
|
170
120
|
};
|
|
171
|
-
/**
|
|
172
|
-
* Excel-compatible `EOMONTH`: last calendar day of the month that is
|
|
173
|
-
* `months` away from `start` (truncated). Time is normalized to start of day.
|
|
174
|
-
*/
|
|
175
121
|
export const computeEOMonth = (start, months) => startOfDay(endOfMonth(computeEDate(start, months)));
|
|
176
|
-
/**
|
|
177
|
-
* Excel-compatible `WORKDAY`: date that is `days` working days after (or
|
|
178
|
-
* before, when negative) `start`. The start date itself is not counted.
|
|
179
|
-
* Holidays / weekends are decided by the host `isWorkingDay` callback.
|
|
180
|
-
*/
|
|
181
122
|
export const computeWorkday = (start, days, isWorkingDay) => {
|
|
182
123
|
let current = startOfDay(start);
|
|
183
124
|
const daysInt = Math.trunc(Number(days));
|
|
@@ -194,10 +135,6 @@ export const computeWorkday = (start, days, isWorkingDay) => {
|
|
|
194
135
|
}
|
|
195
136
|
return current;
|
|
196
137
|
};
|
|
197
|
-
/**
|
|
198
|
-
* Excel-compatible `NETWORKDAYS`: count of working days between `start` and
|
|
199
|
-
* `end` inclusive. Returns a negative count when `start` is after `end`.
|
|
200
|
-
*/
|
|
201
138
|
export const computeNetworkDays = (start, end, isWorkingDay) => {
|
|
202
139
|
const from = startOfDay(start);
|
|
203
140
|
const to = startOfDay(end);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dateUtils.js","sourceRoot":"","sources":["../../../src/functions/dateUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,SAAS,EACT,UAAU,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,SAAS,EACT,QAAQ,EACR,UAAU,EACV,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,GAEZ,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"dateUtils.js","sourceRoot":"","sources":["../../../src/functions/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AO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC;IAChC,CAAC;IACD,OAAO,IAAI,GAAG,KAAK,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -1,16 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Numeric helpers for scalar maths functions.
|
|
3
|
-
* Rounding follows Excel-style half-away-from-zero; `digits` may be negative.
|
|
4
|
-
*/
|
|
5
1
|
const asFiniteNumber = (value) => {
|
|
6
2
|
const n = Number(value);
|
|
7
3
|
return Number.isFinite(n) ? n : undefined;
|
|
8
4
|
};
|
|
9
|
-
/**
|
|
10
|
-
* Excel-compatible `ROUND(number, [digits])`.
|
|
11
|
-
* `digits` defaults to 0 (nearest integer). Negative digits round left of the decimal
|
|
12
|
-
* (e.g. ROUND(1234, -2) → 1200). Ties round away from zero.
|
|
13
|
-
*/
|
|
14
5
|
export const roundNumber = (value, digits = 0) => {
|
|
15
6
|
const n = asFiniteNumber(value);
|
|
16
7
|
if (n === undefined) {
|
|
@@ -23,11 +14,9 @@ export const roundNumber = (value, digits = 0) => {
|
|
|
23
14
|
const d = Math.trunc(dRaw);
|
|
24
15
|
const factor = Math.pow(10, d);
|
|
25
16
|
const scaled = n * factor;
|
|
26
|
-
// Half away from zero (Excel); JS Math.round(-2.5) is -2, which is not Excel.
|
|
27
17
|
const absRounded = Math.round(Math.abs(scaled));
|
|
28
18
|
return (scaled < 0 ? -absRounded : absRounded) / factor;
|
|
29
19
|
};
|
|
30
|
-
/** Excel `SIGN`: -1, 0, or 1. Non-finite → undefined. */
|
|
31
20
|
export const signNumber = (value) => {
|
|
32
21
|
const n = asFiniteNumber(value);
|
|
33
22
|
if (n === undefined) {
|
|
@@ -41,7 +30,6 @@ export const signNumber = (value) => {
|
|
|
41
30
|
}
|
|
42
31
|
return 0;
|
|
43
32
|
};
|
|
44
|
-
/** Square root. Negative / non-finite → undefined. */
|
|
45
33
|
export const sqrtNumber = (value) => {
|
|
46
34
|
const n = asFiniteNumber(value);
|
|
47
35
|
if (n === undefined || n < 0) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"numberUtils.js","sourceRoot":"","sources":["../../../src/functions/numberUtils.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"numberUtils.js","sourceRoot":"","sources":["../../../src/functions/numberUtils.ts"],"names":[],"mappings":"AAKA,MAAM,cAAc,GAAG,CAAC,KAAc,EAAsB,EAAE;IAC5D,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACxB,OAAO,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AAC5C,CAAC,CAAC;AAOF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAc,EAAE,SAAkB,CAAC,EAAsB,EAAE;IACrF,MAAM,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,IAAI,IAAI,IAAI,MAAM,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;IAClE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QAC3B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IAC3B,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC;IAC/B,MAAM,MAAM,GAAG,CAAC,GAAG,MAAM,CAAC;IAE1B,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC;IAChD,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,GAAG,MAAM,CAAC;AAC1D,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAAsB,EAAE;IAC/D,MAAM,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK,SAAS,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACV,OAAO,CAAC,CAAC;IACX,CAAC;IACD,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACV,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC;IACD,OAAO,CAAC,CAAC;AACX,CAAC,CAAC;AAGF,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,KAAc,EAAsB,EAAE;IAC/D,MAAM,CAAC,GAAG,cAAc,CAAC,KAAK,CAAC,CAAC;IAChC,IAAI,CAAC,KAAK,SAAS,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QAC7B,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACtB,CAAC,CAAC"}
|
|
@@ -1,12 +1,4 @@
|
|
|
1
1
|
import { scalarFunctions } from './scalar/index.js';
|
|
2
|
-
/**
|
|
3
|
-
* Symbol operators (`+`, `=`, `>`, `a ? b : c`, …) parse to nodes named after
|
|
4
|
-
* a scalar function (`SUM`, `EQ`, `GT`, `IF`, …). They are syntax, not
|
|
5
|
-
* functions: removing the function from a pool (e.g. via
|
|
6
|
-
* `isExpressionFunctionAvailable`) hides `SUM(…)` but must not disable `+`.
|
|
7
|
-
* Keyword operators (`CONTAINS`, `IN`, `CASE … END`, …) are spelled as their
|
|
8
|
-
* function, so they stay tied to its availability.
|
|
9
|
-
*/
|
|
10
2
|
const SYMBOL_OPERATORS = {
|
|
11
3
|
INFIX: new Set([
|
|
12
4
|
'SUM',
|
|
@@ -27,7 +19,6 @@ const SYMBOL_OPERATORS = {
|
|
|
27
19
|
UNARY: new Set(['NOT']),
|
|
28
20
|
CONDITIONAL: new Set(['IF']),
|
|
29
21
|
};
|
|
30
|
-
/** Keyword operators: spelled as a function name, so hidden with that function. */
|
|
31
22
|
export const KEYWORD_OPERATORS = new Set([
|
|
32
23
|
'STARTS_WITH',
|
|
33
24
|
'ENDS_WITH',
|
|
@@ -38,10 +29,6 @@ export const KEYWORD_OPERATORS = new Set([
|
|
|
38
29
|
'CASE',
|
|
39
30
|
]);
|
|
40
31
|
export const isSymbolOperator = (type, kind) => kind !== undefined && (SYMBOL_OPERATORS[kind]?.has(type) ?? false);
|
|
41
|
-
/**
|
|
42
|
-
* The function definition a node dispatches to: the pool entry when present,
|
|
43
|
-
* else — for a symbol operator only — the system definition.
|
|
44
|
-
*/
|
|
45
32
|
export const resolveFunctionDefinition = (functions, type, kind) => functions[type] ??
|
|
46
33
|
(isSymbolOperator(type, kind)
|
|
47
34
|
? scalarFunctions[type]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operatorFunctions.js","sourceRoot":"","sources":["../../../src/functions/operatorFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"operatorFunctions.js","sourceRoot":"","sources":["../../../src/functions/operatorFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAUjD,MAAM,gBAAgB,GAAwC;IAC5D,KAAK,EAAE,IAAI,GAAG,CAAC;QACb,KAAK;QACL,KAAK;QACL,SAAS;QACT,KAAK;QACL,KAAK;QACL,KAAK;QACL,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,KAAK;QACL,IAAI;QACJ,KAAK;QACL,KAAK;QACL,IAAI;KACL,CAAC;IACF,KAAK,EAAE,IAAI,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC;IACvB,WAAW,EAAE,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC;CAC7B,CAAC;AAGF,MAAM,CAAC,MAAM,iBAAiB,GAAwB,IAAI,GAAG,CAAC;IAC5D,aAAa;IACb,WAAW;IACX,UAAU;IACV,cAAc;IACd,IAAI;IACJ,QAAQ;IACR,MAAM;CACP,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,IAAY,EAAE,IAAwB,EAAW,EAAE,CAClF,IAAI,KAAK,SAAS,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,EAAE,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,CAAC,CAAC;AAMrE,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAAwC,EACxC,IAAY,EACZ,IAAwB,EACT,EAAE,CACjB,SAAS,CAAC,IAAI,CAAC;IACf,CAAC,gBAAgB,CAAC,IAAI,EAAE,IAAI,CAAC;QAC3B,CAAC,CAAE,eAA2C,CAAC,IAAI,CAAkB;QACrE,CAAC,CAAC,SAAS,CAAC,CAAC"}
|
|
@@ -1,9 +1,4 @@
|
|
|
1
1
|
import { evaluateNode } from '../../../evaluator/evaluateNode.js';
|
|
2
|
-
/**
|
|
3
|
-
* Short-circuit: operands are evaluated left to right and evaluation stops at
|
|
4
|
-
* the first falsy one. Typical filters are `AND`-chains, so rows rejected by
|
|
5
|
-
* the first clause skip the rest of the tree.
|
|
6
|
-
*/
|
|
7
2
|
export const AND = {
|
|
8
3
|
handler(operandNodes, context) {
|
|
9
4
|
for (const operandNode of operandNodes) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AND.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/AND.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"AND.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/AND.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAS/D,MAAM,CAAC,MAAM,GAAG,GAA8C;IAC5D,OAAO,CAAC,YAAmB,EAAE,OAAO;QAClC,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;YACvC,IAAI,CAAC,YAAY,CAAC,WAAW,EAAE,OAAO,CAAC,EAAE,CAAC;gBACxC,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IACD,kBAAkB,EAAE,IAAI;IACxB,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,mHAAmH;IACrH,UAAU,EAAE,CAAC,yBAAyB,EAAE,6BAA6B,CAAC;IACtE,QAAQ,EAAE,CAAC,gCAAgC,EAAE,uCAAuC,CAAC;IACrF,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAClC,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -6,10 +6,8 @@ export const ANY_CHANGE = {
|
|
|
6
6
|
const dataChangedEvent = getCellDataChange(context, 'ANY_CHANGE');
|
|
7
7
|
const columnArg = args[0];
|
|
8
8
|
if (!columnArg) {
|
|
9
|
-
// if no column is provided, we check if any value has changed
|
|
10
9
|
return dataChangedEvent.oldValue !== dataChangedEvent.newValue;
|
|
11
10
|
}
|
|
12
|
-
// only COL argument is supported
|
|
13
11
|
if (columnArg.type !== 'COL' && columnArg.type !== '$SCOPE') {
|
|
14
12
|
throw new ExpressionEvaluationError('ANY_CHANGE', 'accepts only a column reference or scope as an argument');
|
|
15
13
|
}
|
|
@@ -28,8 +26,6 @@ export const ANY_CHANGE = {
|
|
|
28
26
|
category: 'changes',
|
|
29
27
|
returnType: 'boolean',
|
|
30
28
|
hasEagerEvaluation: true,
|
|
31
|
-
// Column or row: `ANY_CHANGE()` (row form) vs `ANY_CHANGE([col])` /
|
|
32
|
-
// `ANY_CHANGE($SCOPE)` (column/scope form). See isRowFormOperator.
|
|
33
29
|
appliesTo: 'column-or-row',
|
|
34
30
|
operands: ['any'],
|
|
35
31
|
requires: ['dataChange'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANY_CHANGE.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/ANY_CHANGE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAA8C;IACnE,OAAO,CAAC,IAAW,EAAE,OAAO;QAC1B,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAElE,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE1B,IAAI,CAAC,SAAS,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"ANY_CHANGE.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/ANY_CHANGE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAG/D,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE/C,MAAM,CAAC,MAAM,UAAU,GAA8C;IACnE,OAAO,CAAC,IAAW,EAAE,OAAO;QAC1B,MAAM,gBAAgB,GAAG,iBAAiB,CAAC,OAAO,EAAE,YAAY,CAAC,CAAC;QAElE,MAAM,SAAS,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QAE1B,IAAI,CAAC,SAAS,EAAE,CAAC;YAEf,OAAO,gBAAgB,CAAC,QAAQ,KAAK,gBAAgB,CAAC,QAAQ,CAAC;QACjE,CAAC;QAGD,IAAI,SAAS,CAAC,IAAI,KAAK,KAAK,IAAI,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC5D,MAAM,IAAI,yBAAyB,CACjC,YAAY,EACZ,yDAAyD,CAC1D,CAAC;QACJ,CAAC;QAED,MAAM,kBAAkB,GAAG,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,CAAC;QAC5D,MAAM,aAAa,GAAG,gBAAgB,CAAC,QAAQ,CAAC;QAEhD,OAAO,kBAAkB,KAAK,aAAa,CAAC;IAC9C,CAAC;IACD,WAAW,EACT,kNAAkN;IACpN,UAAU,EAAE,CAAC,cAAc,EAAE,sBAAsB,EAAE,oBAAoB,CAAC;IAC1E,QAAQ,EAAE;QACR,cAAc;QACd,sBAAsB;QACtB,yBAAyB;QACzB,oBAAoB;KACrB;IACD,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,SAAS;IACrB,kBAAkB,EAAE,IAAI;IAGxB,SAAS,EAAE,eAAe;IAC1B,QAAQ,EAAE,CAAC,KAAK,CAAC;IACjB,QAAQ,EAAE,CAAC,YAAY,CAAC;CACzB,CAAC"}
|
|
@@ -13,16 +13,12 @@ export const ANY_CONTAINS = {
|
|
|
13
13
|
return columnValue.indexOf(searchTerm) !== -1;
|
|
14
14
|
});
|
|
15
15
|
},
|
|
16
|
-
// Whole-row predicate — sits with other non-column-scoped ops in Special
|
|
17
|
-
// (not Strings: it searches across the row, not a single text column).
|
|
18
16
|
category: 'general',
|
|
19
17
|
description: 'Returns true if any cell in the row contains given the value as display text',
|
|
20
18
|
signatures: ['ANY_CONTAINS(value: text | number)'],
|
|
21
19
|
examples: ['ANY_CONTAINS("abc")', 'ANY_CONTAINS(11)'],
|
|
22
20
|
returnType: 'boolean',
|
|
23
21
|
appliesTo: 'row',
|
|
24
|
-
// Runtime stringifies the needle; number is a common “find 11 anywhere” use case.
|
|
25
|
-
// Two single-arg overloads (not `[['text', 'number']]`, which means two args).
|
|
26
22
|
operands: ['text', 'number'],
|
|
27
23
|
enforceOperandTypes: true,
|
|
28
24
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ANY_CONTAINS.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/ANY_CONTAINS.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAA8C;IACrE,OAAO,CAAC,IAAW,EAAE,OAAO;QAC1B,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC1E,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3D,OAAO,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;
|
|
1
|
+
{"version":3,"file":"ANY_CONTAINS.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/ANY_CONTAINS.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC7E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,CAAC,MAAM,YAAY,GAA8C;IACrE,OAAO,CAAC,IAAW,EAAE,OAAO;QAC1B,MAAM,UAAU,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC5D,MAAM,SAAS,GAAG,gBAAgB,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACjD,OAAO,SAAS,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,mBAAmB,CAAC,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,MAAM,EAAE,QAAQ,CAAC,CAAC;YAC1E,IAAI,CAAC,KAAK,EAAE,CAAC;gBACX,OAAO,KAAK,CAAC;YACf,CAAC;YACD,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;YAC3D,OAAO,WAAW,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;IACL,CAAC;IAGD,QAAQ,EAAE,SAAS;IACnB,WAAW,EACT,8EAA8E;IAChF,UAAU,EAAE,CAAC,oCAAoC,CAAC;IAClD,QAAQ,EAAE,CAAC,qBAAqB,EAAE,kBAAkB,CAAC;IACrD,UAAU,EAAE,SAAS;IACrB,SAAS,EAAE,KAAK;IAGhB,QAAQ,EAAE,CAAC,MAAM,EAAE,QAAQ,CAAC;IAC5B,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -3,7 +3,6 @@ export const AVG = {
|
|
|
3
3
|
handler(args) {
|
|
4
4
|
const sanitizedArguments = sanitizeArguments(flattenArguments(args));
|
|
5
5
|
if (args.length && !sanitizedArguments.length) {
|
|
6
|
-
// expression is syntactically valid, but operates with incompatible values
|
|
7
6
|
return;
|
|
8
7
|
}
|
|
9
8
|
return sanitizedArguments.reduce((a, b) => a + b) / sanitizedArguments.length;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AVG.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/AVG.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,CAAC,MAAM,GAAG,GAA8C;IAC5D,OAAO,CAAC,IAAW;QACjB,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;QACrE,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"AVG.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/AVG.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,CAAC,MAAM,GAAG,GAA8C;IAC5D,OAAO,CAAC,IAAW;QACjB,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC;QACrE,IAAI,IAAI,CAAC,MAAM,IAAI,CAAC,kBAAkB,CAAC,MAAM,EAAE,CAAC;YAE9C,OAAO;QACT,CAAC;QACD,OAAO,kBAAkB,CAAC,MAAM,CAAC,CAAC,CAAM,EAAE,CAAM,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,kBAAkB,CAAC,MAAM,CAAC;IAC1F,CAAC;IACD,WAAW,EAAE,6CAA6C;IAC1D,UAAU,EAAE,CAAC,gCAAgC,CAAC;IAC9C,QAAQ,EAAE,CAAC,kBAAkB,EAAE,iBAAiB,CAAC;IACjD,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,QAAQ;IACpB,QAAQ,EAAE,CAAC,CAAC,UAAU,CAAC,CAAC;IACxB,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -2,9 +2,9 @@ import { evaluateNode } from '../../../evaluator/evaluateNode.js';
|
|
|
2
2
|
export const CASE = {
|
|
3
3
|
handler([expressionValueNode, whenThenListNodes, defaultValueNode], context) {
|
|
4
4
|
const caseExpressionValue = expressionValueNode != undefined
|
|
5
|
-
?
|
|
5
|
+
?
|
|
6
6
|
evaluateNode(expressionValueNode, context)
|
|
7
|
-
:
|
|
7
|
+
:
|
|
8
8
|
true;
|
|
9
9
|
const matchingWhen = whenThenListNodes.find((whenThenStatement) => {
|
|
10
10
|
const whenValue = evaluateNode(whenThenStatement.WHEN, context);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CASE.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/CASE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI/D,MAAM,CAAC,MAAM,IAAI,GAA8C;IAC7D,OAAO,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,CAAQ,EAAE,OAAO;QAChF,MAAM,mBAAmB,GACvB,mBAAmB,IAAI,SAAS;YAC9B,CAAC
|
|
1
|
+
{"version":3,"file":"CASE.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/CASE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI/D,MAAM,CAAC,MAAM,IAAI,GAA8C;IAC7D,OAAO,CAAC,CAAC,mBAAmB,EAAE,iBAAiB,EAAE,gBAAgB,CAAQ,EAAE,OAAO;QAChF,MAAM,mBAAmB,GACvB,mBAAmB,IAAI,SAAS;YAC9B,CAAC;gBACC,YAAY,CAAC,mBAAmB,EAAE,OAAO,CAAC;YAC5C,CAAC;gBACC,IAAI,CAAC;QAEX,MAAM,YAAY,GAAI,iBAAwD,CAAC,IAAI,CACjF,CAAC,iBAAiB,EAAE,EAAE;YACpB,MAAM,SAAS,GAAG,YAAY,CAAC,iBAAiB,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;YAChE,OAAO,SAAS,KAAK,mBAAmB,CAAC;QAC3C,CAAC,CACF,CAAC;QAEF,IAAI,CAAC,YAAY,EAAE,CAAC;YAClB,IAAI,gBAAgB,EAAE,CAAC;gBACrB,OAAO,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;YACjD,CAAC;YACD,OAAO;QACT,CAAC;QAED,MAAM,YAAY,GAAG,YAAY,CAAC,YAAY,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAC9D,OAAO,YAAY,CAAC;IACtB,CAAC;IACD,kBAAkB,EAAE,IAAI;IACxB,WAAW,EACT,sOAAsO;IACxO,UAAU,EAAE;QACV,uDAAuD;QACvD,qDAAqD;KACtD;IACD,QAAQ,EAAE;QACR,iGAAiG;QACjG,qFAAqF;KACtF;IACD,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,KAAK;CAClB,CAAC"}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export const COL = {
|
|
2
2
|
handler(args, context) {
|
|
3
|
-
// resolveColumnValue applies validation (unknown / non-queryable),
|
|
4
|
-
// the cell-value override and column value aliases (pivot columns).
|
|
5
3
|
return context.resolveColumnValue(args[0], { reference: 'COL' });
|
|
6
4
|
},
|
|
7
5
|
description: 'Returns the value of a column. Prefer the bracket form [columnId] when possible; use COL when the name is dynamic.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"COL.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/COL.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,GAAG,GAA8C;IAC5D,OAAO,CAAC,IAAW,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"COL.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/COL.ts"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,GAAG,GAA8C;IAC5D,OAAO,CAAC,IAAW,EAAE,OAAO;QAG1B,OAAO,OAAO,CAAC,kBAAkB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IACnE,CAAC;IACD,WAAW,EACT,oHAAoH;IACtH,UAAU,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;IAC7C,QAAQ,EAAE,CAAC,UAAU,EAAE,eAAe,CAAC;IACvC,QAAQ,EAAE,SAAS;IACnB,UAAU,EAAE,KAAK;IACjB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC;IACpB,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import { getStringValues } from '../../utils.js';
|
|
2
2
|
export const CONTAINS = {
|
|
3
3
|
handler(args, context) {
|
|
4
|
-
// Legacy Contains: `if (!value) return false`. Without this,
|
|
5
|
-
// `String(null)` / `String(undefined)` become `"null"` / `"undefined"`
|
|
6
|
-
// and match needles like `"n"`.
|
|
7
4
|
if (!args[0]) {
|
|
8
5
|
return false;
|
|
9
6
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CONTAINS.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/CONTAINS.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,QAAQ,GAA8C;IACjE,OAAO,CAAC,IAAW,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"CONTAINS.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/CONTAINS.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,QAAQ,GAA8C;IACjE,OAAO,CAAC,IAAW,EAAE,OAAO;QAI1B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnF,OAAO,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACtC,CAAC;IACD,QAAQ,EAAE,MAAM;IAChB,WAAW,EACT,yHAAyH;IAC3H,UAAU,EAAE,CAAC,wBAAwB,EAAE,4BAA4B,CAAC;IACpE,QAAQ,EAAE,CAAC,0BAA0B,EAAE,4BAA4B,CAAC;IACpE,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -3,7 +3,6 @@ import { ExpressionEvaluationError } from '../../../evaluator/ExpressionEvaluati
|
|
|
3
3
|
import { computeDateParts, parseDateValue } from '../../dateUtils.js';
|
|
4
4
|
export const DATE = {
|
|
5
5
|
handler(args) {
|
|
6
|
-
// Excel-style DATE(year, month, day) — month is 1-based.
|
|
7
6
|
if (args.length >= 3) {
|
|
8
7
|
const year = Number(args[0]);
|
|
9
8
|
const month = Number(args[1]);
|
|
@@ -23,7 +22,6 @@ export const DATE = {
|
|
|
23
22
|
if (parsed) {
|
|
24
23
|
return parsed;
|
|
25
24
|
}
|
|
26
|
-
// Preserve historic ISO-only path for strings parseDateValue rejects oddly.
|
|
27
25
|
if (typeof args[0] === 'string') {
|
|
28
26
|
const iso = parseISO(args[0]);
|
|
29
27
|
if (!isNaN(iso.getTime())) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DATE.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/DATE.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AAGzF,OAAO,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAA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;gBACX,OAAO,MAAM,CAAC;YAChB,CAAC;YAED,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ,EAAE,CAAC;gBAChC,MAAM,GAAG,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC9B,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC,EAAE,CAAC;oBAC1B,OAAO,GAAG,CAAC;gBACb,CAAC;YACH,CAAC;YACD,MAAM,IAAI,yBAAyB,CAAC,MAAM,EAAE,kCAAkC,CAAC,CAAC;QAClF,CAAC;QACD,MAAM,IAAI,yBAAyB,CACjC,MAAM,EACN,oDAAoD,CACrD,CAAC;IACJ,CAAC;IACD,WAAW,EACT,6GAA6G;IAC/G,UAAU,EAAE;QACV,mBAAmB;QACnB,gDAAgD;QAChD,kBAAkB;QAClB,oBAAoB;QACpB,6BAA6B;KAC9B;IACD,QAAQ,EAAE;QACR,kBAAkB;QAClB,kBAAkB;QAClB,oBAAoB;QACpB,0BAA0B;KAC3B;IACD,QAAQ,EAAE,MAAM;IAChB,UAAU,EAAE,MAAM;IAClB,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACpD,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ENDS_WITH.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/ENDS_WITH.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,SAAS,GAA8C;IAClE,OAAO,CAAC,IAAW,EAAE,OAAO;
|
|
1
|
+
{"version":3,"file":"ENDS_WITH.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/ENDS_WITH.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,SAAS,GAA8C;IAClE,OAAO,CAAC,IAAW,EAAE,OAAO;QAE1B,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;YACb,OAAO,KAAK,CAAC;QACf,CAAC;QACD,MAAM,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,eAAe,CAAC,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACnF,OAAO,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,CAAC;IACD,QAAQ,EAAE,MAAM;IAChB,WAAW,EACT,4HAA4H;IAC9H,UAAU,EAAE,CAAC,yBAAyB,EAAE,6BAA6B,CAAC;IACtE,QAAQ,EAAE,CAAC,2BAA2B,EAAE,6BAA6B,CAAC;IACtE,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC5B,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -4,11 +4,6 @@ import { resolveDateComparisonPair } from '../../dateUtils.js';
|
|
|
4
4
|
import { getSubjectDataType } from '../helpers.js';
|
|
5
5
|
export const EQ = {
|
|
6
6
|
handler(args, context) {
|
|
7
|
-
// Date equality: coerce string/number/Date (column cells are often
|
|
8
|
-
// ISO strings while `DATE(...)` returns a Date). Without this,
|
|
9
|
-
// `"2021-02-28" = DATE("2021-02-28")` falls through to broken
|
|
10
|
-
// stringification.
|
|
11
|
-
// Exact-instant equality — use IS_SAME_DAY for calendar-day equality.
|
|
12
7
|
const dates = resolveDateComparisonPair(args[0], args[1], {
|
|
13
8
|
subjectDataType: getSubjectDataType(context),
|
|
14
9
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EQ.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/EQ.ts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CAAC,CAAC,CAAC;YACnF,OAAO,KAAK,IAAI,MAAM,CAAC;QACzB,CAAC;QACD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,CAAC;IAC5B,CAAC;IACD,QAAQ,EAAE,YAAY;IACtB,WAAW,EACT,0KAA0K;IAC5K,UAAU,EAAE,CAAC,eAAe,EAAE,wBAAwB,CAAC;IACvD,QAAQ,EAAE;QACR,cAAc;QACd,iBAAiB;QACjB,sBAAsB;QACtB,kBAAkB;QAClB,8BAA8B;KAC/B;IACD,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE;QACR,CAAC,QAAQ,EAAE,QAAQ,CAAC;QACpB,CAAC,MAAM,EAAE,MAAM,CAAC;QAChB,CAAC,MAAM,EAAE,MAAM,CAAC;QAChB,CAAC,SAAS,EAAE,SAAS,CAAC;KACvB;IACD,mBAAmB,EAAE,IAAI;CAC1B,CAAC"}
|
|
@@ -4,9 +4,6 @@ import { resolveDateComparisonPair } from '../../dateUtils.js';
|
|
|
4
4
|
import { getSubjectDataType } from '../helpers.js';
|
|
5
5
|
export const GT = {
|
|
6
6
|
handler(args, context) {
|
|
7
|
-
// Ordering against a missing value is undefined, not "compared to 0":
|
|
8
|
-
// a blank cell is neither below nor above a threshold, and an observable
|
|
9
|
-
// read with no history yet (`HIGHEST{…}` → null) is not a level.
|
|
10
7
|
if (args[0] == null || args[1] == null) {
|
|
11
8
|
return false;
|
|
12
9
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GT.js","sourceRoot":"","sources":["../../../../../src/functions/scalar/functions/GT.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAGnC,OAAO,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAEhD,M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