@adaptabletools/adaptable 24.0.1 → 24.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/devtools.d.ts +506 -5
- package/devtools.js +11 -1
- package/index.css +15 -5
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -1
- package/src/AdaptableOptions/DataImportOptions.d.ts +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +2 -10
- package/src/AdaptableState/Common/RowSummary.d.ts +2 -0
- package/src/AdaptableState/LayoutState.d.ts +1 -1
- package/src/Api/Implementation/AlertApiImpl.js +2 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +25 -3
- package/src/Api/Internal/ExportInternalApi.d.ts +2 -0
- package/src/Api/Internal/ExportInternalApi.js +39 -3
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +3 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +15 -7
- package/src/Api/Internal/LayoutInternalApi.d.ts +11 -1
- package/src/Api/Internal/LayoutInternalApi.js +34 -3
- package/src/Api/Internal/NoteInternalApi.d.ts +12 -0
- package/src/Api/Internal/NoteInternalApi.js +11 -0
- package/src/EnvVars.d.ts +1 -0
- package/src/EnvVars.js +1 -0
- package/src/Redux/Store/AdaptableStore.js +4 -7
- package/src/Strategy/FlashingCellModule.js +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +15 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +7 -0
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +17 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +11 -1
- package/src/Utilities/Services/QueryLanguageService.js +47 -2
- package/src/Utilities/Services/RowSummaryService.d.ts +2 -0
- package/src/Utilities/Services/RowSummaryService.js +6 -1
- package/src/Utilities/license/instanceLicense.d.ts +12 -0
- package/src/Utilities/license/instanceLicense.js +10 -0
- package/src/Utilities/license/licenseStatus.d.ts +26 -0
- package/src/Utilities/license/licenseStatus.js +72 -0
- package/src/View/Components/CellPopup/index.js +15 -10
- package/src/View/GridInfo/GridInfoPopup.js +6 -1
- package/src/View/Layout/TransposedPopup.js +1 -0
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +3 -5
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +10 -24
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +5 -1
- package/src/View/ObjectItemViews/Layout/aggregationSummaryHelpers.d.ts +5 -1
- package/src/View/ObjectItemViews/Layout/aggregationSummaryHelpers.js +6 -3
- package/src/agGrid/AdaptableAgGrid.d.ts +7 -3
- package/src/agGrid/AdaptableAgGrid.js +144 -78
- package/src/agGrid/AdaptableFilterHandler.d.ts +2 -0
- package/src/agGrid/AdaptableFilterHandler.js +34 -0
- package/src/agGrid/AgGridAdapter.d.ts +9 -0
- package/src/agGrid/AgGridAdapter.js +23 -12
- package/src/agGrid/AgGridColumnAdapter.d.ts +2 -0
- package/src/agGrid/AgGridColumnAdapter.js +124 -78
- package/src/agGrid/AgGridExportAdapter.d.ts +5 -0
- package/src/agGrid/AgGridExportAdapter.js +31 -0
- package/src/agGrid/AgGridMenuAdapter.js +1 -1
- package/src/agGrid/applyGlobalGridOptions.d.ts +9 -0
- package/src/agGrid/applyGlobalGridOptions.js +36 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +22 -0
- package/src/agGrid/columnMinMaxCache.d.ts +33 -0
- package/src/agGrid/columnMinMaxCache.js +50 -0
- package/src/devTools/PerfStore.d.ts +218 -0
- package/src/devTools/PerfStore.js +717 -0
- package/src/devTools/index.d.ts +33 -0
- package/src/devTools/index.js +132 -56
- package/src/devTools/logBuffer.d.ts +17 -0
- package/src/devTools/logBuffer.js +33 -0
- package/src/devTools/memoryInfo.d.ts +15 -0
- package/src/devTools/memoryInfo.js +229 -0
- package/src/devTools/memoryRoots.d.ts +41 -0
- package/src/devTools/memoryRoots.js +136 -0
- package/src/devTools/perfContext.d.ts +5 -0
- package/src/devTools/perfContext.js +155 -0
- package/src/devTools/perfInstrumentation.d.ts +13 -0
- package/src/devTools/perfInstrumentation.js +78 -0
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +3 -1
- package/src/layout-manager/src/expandAllRowGroups.d.ts +6 -0
- package/src/layout-manager/src/expandAllRowGroups.js +13 -0
- package/src/layout-manager/src/index.js +18 -10
- package/src/setupDevTools.js +560 -106
- 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/Radio/index.d.ts.map +1 -1
- package/vendor/components/Radio/index.js +1 -1
- package/vendor/components/Radio/index.js.map +1 -1
- package/vendor/components/Resizable/index.d.ts +14 -9
- package/vendor/components/Resizable/index.d.ts.map +1 -1
- package/vendor/components/Resizable/index.js +26 -26
- package/vendor/components/Resizable/index.js.map +1 -1
- package/vendor/components/Resizable/resizableUtils.d.ts +24 -13
- package/vendor/components/Resizable/resizableUtils.d.ts.map +1 -1
- package/vendor/components/Resizable/resizableUtils.js +13 -27
- 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.css +12 -5
- 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 +3 -39
- 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/input.js +1 -1
- package/vendor/components/ui/input.js.map +1 -1
- package/vendor/components/ui/select.js +1 -1
- package/vendor/components/ui/select.js.map +1 -1
- package/vendor/components/ui/tabs.js +0 -3
- package/vendor/components/ui/tabs.js.map +1 -1
- package/vendor/components/ui/textarea.js +1 -1
- package/vendor/components/ui/textarea.js.map +1 -1
- package/vendor/components/ui/tooltip.d.ts.map +1 -1
- package/vendor/components/ui/tooltip.js +3 -1
- package/vendor/components/ui/tooltip.js.map +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { getPerfRecorder } from '../../devTools/PerfStore';
|
|
2
|
+
import { recordExpressionEvaluation } from '../../devTools/perfInstrumentation';
|
|
1
3
|
import { acquireObservableSlots, canonicalizeExpression, createAggregationCatalogue, createAqlEngine, DEFAULT_ROW_SET_KIND, ExpressionEvaluationError, findDependencyCycle, getNodesFromExpression, hostGetFirstRowRef, mapDataTypeToStaticType, parse, validateAqlExpression, validateExpressionTypes, } from "../../../vendor/aql/index.js";
|
|
2
4
|
import { createComputedValueStore, createHistoryStore, createSystemClock, } from "../../../vendor/aql/store/index.js";
|
|
3
5
|
import { inferExpressionKindFromText, } from '../../AdaptableState/Common/AdaptableQuery';
|
|
@@ -11,7 +13,7 @@ import { PROTECTED_CORE_EXPRESSION_FUNCTIONS } from '../../aql/resolveCustomExpr
|
|
|
11
13
|
import { resolveCustomExpressionFunctions } from '../../aql/resolveCustomExpressionFunctions';
|
|
12
14
|
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
13
15
|
const VALID = { isValid: true, errorMessage: '' };
|
|
14
|
-
const ROW_EVALUATOR_CACHE_SIZE =
|
|
16
|
+
const ROW_EVALUATOR_CACHE_SIZE = 150;
|
|
15
17
|
const CANONICAL_TEXT_CACHE_SIZE = 1024;
|
|
16
18
|
const DEFAULT_MAX_WINDOW_MS = 28_800_000;
|
|
17
19
|
const DEFAULT_MAX_HISTORY_PER_CELL = 1000;
|
|
@@ -54,6 +56,7 @@ export class QueryLanguageService {
|
|
|
54
56
|
engineCache = new Map();
|
|
55
57
|
hostEngineCache = new WeakMap();
|
|
56
58
|
rowEvaluatorCache = new Map();
|
|
59
|
+
rowEvaluatorEvictions = 0;
|
|
57
60
|
hostRowEvaluatorCache = new WeakMap();
|
|
58
61
|
canonicalTextCache = new Map();
|
|
59
62
|
functionsGeneration = 0;
|
|
@@ -90,6 +93,20 @@ export class QueryLanguageService {
|
|
|
90
93
|
this.aggregationCatalogueCache.clear();
|
|
91
94
|
this.engineCache.clear();
|
|
92
95
|
}
|
|
96
|
+
getDiagnostics() {
|
|
97
|
+
return {
|
|
98
|
+
validationCache: this.validationCache.size,
|
|
99
|
+
expressionKindCache: this.expressionKindCache.size,
|
|
100
|
+
dependenciesCache: this.dependenciesCache.size,
|
|
101
|
+
engineCache: this.engineCache.size,
|
|
102
|
+
rowEvaluatorCache: this.rowEvaluatorCache.size,
|
|
103
|
+
rowEvaluatorCacheLimit: ROW_EVALUATOR_CACHE_SIZE,
|
|
104
|
+
rowEvaluatorEvictions: this.rowEvaluatorEvictions,
|
|
105
|
+
canonicalTextCache: this.canonicalTextCache.size,
|
|
106
|
+
canonicalTextCacheLimit: CANONICAL_TEXT_CACHE_SIZE,
|
|
107
|
+
history: this._historyStore ? this._historyStore.stats() : undefined,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
93
110
|
toCacheExpression(expression) {
|
|
94
111
|
const cached = this.canonicalTextCache.get(expression);
|
|
95
112
|
if (cached !== undefined) {
|
|
@@ -352,6 +369,7 @@ export class QueryLanguageService {
|
|
|
352
369
|
const oldestKey = cache.keys().next().value;
|
|
353
370
|
if (oldestKey !== undefined) {
|
|
354
371
|
cache.delete(oldestKey);
|
|
372
|
+
this.rowEvaluatorEvictions++;
|
|
355
373
|
this.releaseObservableSeries(oldestKey);
|
|
356
374
|
}
|
|
357
375
|
}
|
|
@@ -417,19 +435,46 @@ export class QueryLanguageService {
|
|
|
417
435
|
this.adaptableApi.logError('QueryLanguageService.evaluateBooleanExpression was called with an undefined expression');
|
|
418
436
|
return false;
|
|
419
437
|
}
|
|
420
|
-
|
|
438
|
+
const recorder = getPerfRecorder(this.getAdaptableIdForPerf());
|
|
439
|
+
const start = recorder ? performance.now() : 0;
|
|
440
|
+
const result = this.getPreparedRowEvaluator(expression, module, evalContext?.host)(rowNode, this.toPerRowConfig({
|
|
421
441
|
rowNode,
|
|
422
442
|
dataChangedEvent: evalContext?.dataChangedEvent,
|
|
423
443
|
pivotResultColumn: evalContext?.pivotResultColumn,
|
|
424
444
|
columnScope: evalContext?.columnScope,
|
|
425
445
|
cellValueOverride: evalContext?.cellValueOverride,
|
|
426
446
|
}));
|
|
447
|
+
if (recorder) {
|
|
448
|
+
recordExpressionEvaluation(recorder, this.adaptableApi, module, expression, start);
|
|
449
|
+
}
|
|
450
|
+
return result;
|
|
451
|
+
}
|
|
452
|
+
perfAdaptableId;
|
|
453
|
+
getAdaptableIdForPerf() {
|
|
454
|
+
if (this.perfAdaptableId === undefined) {
|
|
455
|
+
try {
|
|
456
|
+
this.perfAdaptableId = this.adaptableApi.optionsApi.getAdaptableId();
|
|
457
|
+
}
|
|
458
|
+
catch {
|
|
459
|
+
return undefined;
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
return this.perfAdaptableId;
|
|
427
463
|
}
|
|
428
464
|
evaluateScalarExpression(expression, module, rowNode, evalContext) {
|
|
429
465
|
return this.evaluateBooleanExpression(expression, module, rowNode, evalContext);
|
|
430
466
|
}
|
|
431
467
|
prepareBooleanRowEvaluator(expression, module) {
|
|
432
468
|
const evaluator = this.getPreparedRowEvaluator(expression, module);
|
|
469
|
+
const recorder = getPerfRecorder(this.getAdaptableIdForPerf());
|
|
470
|
+
if (recorder) {
|
|
471
|
+
return (rowNode) => {
|
|
472
|
+
const start = performance.now();
|
|
473
|
+
const result = evaluator(rowNode);
|
|
474
|
+
recordExpressionEvaluation(recorder, this.adaptableApi, module, expression, start);
|
|
475
|
+
return result;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
433
478
|
return (rowNode) => evaluator(rowNode);
|
|
434
479
|
}
|
|
435
480
|
executeValueExpression(expression, module, evalContext) {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { AdaptableApi, TableLayout } from '../../types';
|
|
2
|
+
import type { RowSummariesSkippedReason } from '../../Api/Internal/LayoutInternalApi';
|
|
2
3
|
/**
|
|
3
4
|
* Row Summary cells are computed-value store nodes with an explicit
|
|
4
5
|
* rowSetSpec (`visible` when IncludeOnlyFilteredRows, else `all`).
|
|
@@ -9,6 +10,7 @@ export declare class RowSummaryService {
|
|
|
9
10
|
private nodeHandles;
|
|
10
11
|
private isEvaluating;
|
|
11
12
|
previousRowSummaries: any;
|
|
13
|
+
previousSkippedReason: RowSummariesSkippedReason | undefined;
|
|
12
14
|
previousLayout: TableLayout | null;
|
|
13
15
|
constructor(api: AdaptableApi);
|
|
14
16
|
onAdaptableReady(): void;
|
|
@@ -9,6 +9,7 @@ export class RowSummaryService {
|
|
|
9
9
|
nodeHandles = new Map();
|
|
10
10
|
isEvaluating = false;
|
|
11
11
|
previousRowSummaries;
|
|
12
|
+
previousSkippedReason;
|
|
12
13
|
previousLayout;
|
|
13
14
|
constructor(api) {
|
|
14
15
|
this.api = api;
|
|
@@ -144,10 +145,14 @@ export class RowSummaryService {
|
|
|
144
145
|
this.nodeHandles.delete(key);
|
|
145
146
|
}
|
|
146
147
|
}
|
|
147
|
-
|
|
148
|
+
const skippedReason = this.api.layoutApi.internalApi.getRowSummariesSkippedReason(currentLayout);
|
|
149
|
+
if (this.previousRowSummaries &&
|
|
150
|
+
isEqual(rowSummariesResults, this.previousRowSummaries) &&
|
|
151
|
+
skippedReason === this.previousSkippedReason) {
|
|
148
152
|
return;
|
|
149
153
|
}
|
|
150
154
|
this.api.internalApi.dispatchReduxAction(RowSummarySet(rowSummariesResults));
|
|
151
155
|
this.previousRowSummaries = rowSummariesResults;
|
|
156
|
+
this.previousSkippedReason = skippedReason;
|
|
152
157
|
}
|
|
153
158
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AdaptableApi } from '../../Api/AdaptableApi';
|
|
2
|
+
import { LicenseStatus } from './licenseStatus';
|
|
3
|
+
/**
|
|
4
|
+
* The licence key an AdapTable instance runs with: a page-wide
|
|
5
|
+
* `ADAPTABLE_LICENSE_KEY` global wins over `AdaptableOptions.licenseKey`.
|
|
6
|
+
*/
|
|
7
|
+
export declare function getInstanceLicenseKey(api: AdaptableApi): string | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* What the instance's licence key means for this AdapTable version. Safe to display
|
|
10
|
+
* and to send to AdapTable DevTools: it never contains the key.
|
|
11
|
+
*/
|
|
12
|
+
export declare function getInstanceLicenseStatus(api: AdaptableApi): LicenseStatus;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ADAPTABLE_PUBLISH_DATE } from '../../EnvVars';
|
|
2
|
+
import { getLicenseStatus } from './licenseStatus';
|
|
3
|
+
export function getInstanceLicenseKey(api) {
|
|
4
|
+
const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
5
|
+
return (globalObject.ADAPTABLE_LICENSE_KEY ||
|
|
6
|
+
api.optionsApi.getLicenseKey());
|
|
7
|
+
}
|
|
8
|
+
export function getInstanceLicenseStatus(api) {
|
|
9
|
+
return getLicenseStatus(getInstanceLicenseKey(api), ADAPTABLE_PUBLISH_DATE);
|
|
10
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a licence key means, without any of its content: shown in place of the key
|
|
3
|
+
* in Grid Info and AdapTable DevTools.
|
|
4
|
+
*/
|
|
5
|
+
export type LicenseStatus = {
|
|
6
|
+
kind: 'none';
|
|
7
|
+
} | {
|
|
8
|
+
kind: 'invalid';
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'valid' | 'expired';
|
|
11
|
+
trial: boolean;
|
|
12
|
+
/** Licence end date, `yyyy-mm-dd` */
|
|
13
|
+
endDate: string;
|
|
14
|
+
/** Whole days left (`valid`) or since expiry (`expired`) */
|
|
15
|
+
days: number;
|
|
16
|
+
/**
|
|
17
|
+
* `expired` only: whether this AdapTable version was released before the licence
|
|
18
|
+
* expired. Omitted when the release date is unknown.
|
|
19
|
+
*
|
|
20
|
+
* Only a commercial licence keeps working for the versions it covers; an expired
|
|
21
|
+
* trial is restricted either way.
|
|
22
|
+
*/
|
|
23
|
+
coversThisVersion?: boolean;
|
|
24
|
+
};
|
|
25
|
+
export declare function getLicenseStatus(licenseKey: string | undefined, publishedAt?: number | Date, now?: Date): LicenseStatus;
|
|
26
|
+
export declare function formatLicenseStatus(status: LicenseStatus): string;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { decode } from './decode';
|
|
2
|
+
const DAY_IN_MS = 1000 * 60 * 60 * 24;
|
|
3
|
+
function toDateString(date) {
|
|
4
|
+
const pad = (value) => String(value).padStart(2, '0');
|
|
5
|
+
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}`;
|
|
6
|
+
}
|
|
7
|
+
function calendarDaysBetween(from, to) {
|
|
8
|
+
const fromMidnight = new Date(from);
|
|
9
|
+
fromMidnight.setHours(0, 0, 0, 0);
|
|
10
|
+
const toMidnight = new Date(to);
|
|
11
|
+
toMidnight.setHours(0, 0, 0, 0);
|
|
12
|
+
return Math.round((toMidnight.getTime() - fromMidnight.getTime()) / DAY_IN_MS);
|
|
13
|
+
}
|
|
14
|
+
export function getLicenseStatus(licenseKey, publishedAt, now = new Date()) {
|
|
15
|
+
if (!licenseKey) {
|
|
16
|
+
return { kind: 'none' };
|
|
17
|
+
}
|
|
18
|
+
let end;
|
|
19
|
+
let trial;
|
|
20
|
+
try {
|
|
21
|
+
({ end, trial } = decode(licenseKey));
|
|
22
|
+
}
|
|
23
|
+
catch {
|
|
24
|
+
return { kind: 'invalid' };
|
|
25
|
+
}
|
|
26
|
+
if (Number.isNaN(end.getTime())) {
|
|
27
|
+
return { kind: 'invalid' };
|
|
28
|
+
}
|
|
29
|
+
const endDate = toDateString(end);
|
|
30
|
+
const days = Math.abs(calendarDaysBetween(now, end));
|
|
31
|
+
if (end >= now) {
|
|
32
|
+
return { kind: 'valid', trial, endDate, days };
|
|
33
|
+
}
|
|
34
|
+
const status = { kind: 'expired', trial, endDate, days };
|
|
35
|
+
if (publishedAt != null) {
|
|
36
|
+
status.coversThisVersion = end > new Date(publishedAt);
|
|
37
|
+
}
|
|
38
|
+
return status;
|
|
39
|
+
}
|
|
40
|
+
function formatDate(endDate) {
|
|
41
|
+
const [year, month, day] = endDate.split('-').map(Number);
|
|
42
|
+
return new Date(year, month - 1, day).toLocaleDateString('en-GB', {
|
|
43
|
+
day: 'numeric',
|
|
44
|
+
month: 'short',
|
|
45
|
+
year: 'numeric',
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
function pluralDays(days) {
|
|
49
|
+
return days === 1 ? '1 day' : `${days} days`;
|
|
50
|
+
}
|
|
51
|
+
export function formatLicenseStatus(status) {
|
|
52
|
+
if (status.kind === 'none') {
|
|
53
|
+
return 'Not present';
|
|
54
|
+
}
|
|
55
|
+
if (status.kind === 'invalid') {
|
|
56
|
+
return 'Invalid';
|
|
57
|
+
}
|
|
58
|
+
const type = status.trial ? 'Trial' : 'Commercial';
|
|
59
|
+
const date = formatDate(status.endDate);
|
|
60
|
+
if (status.kind === 'valid') {
|
|
61
|
+
const left = status.days === 0 ? 'expires today' : `${pluralDays(status.days)} left`;
|
|
62
|
+
return `${type}, valid until ${date} (${left})`;
|
|
63
|
+
}
|
|
64
|
+
const ago = status.days === 0 ? 'today' : `${pluralDays(status.days)} ago`;
|
|
65
|
+
const text = `${type}, expired on ${date} (${ago})`;
|
|
66
|
+
if (status.trial || status.coversThisVersion == null) {
|
|
67
|
+
return text;
|
|
68
|
+
}
|
|
69
|
+
return status.coversThisVersion
|
|
70
|
+
? `${text}; covers this AdapTable version`
|
|
71
|
+
: `${text}; does not cover this AdapTable version (released after expiry)`;
|
|
72
|
+
}
|
|
@@ -32,12 +32,18 @@ const DEFAULT_ROW_ALIGN_POSITION = [
|
|
|
32
32
|
['TopCenter', 'BottomCenter'],
|
|
33
33
|
['BottomCenter', 'TopCenter'],
|
|
34
34
|
];
|
|
35
|
-
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
35
|
+
const escapeAttributeValue = (value) => {
|
|
36
|
+
const text = String(value);
|
|
37
|
+
return typeof CSS !== 'undefined' && typeof CSS.escape === 'function'
|
|
38
|
+
? CSS.escape(text)
|
|
39
|
+
: text.replace(/["\\]/g, '\\$&');
|
|
40
|
+
};
|
|
41
|
+
function queryGridElement(gridRoot, selector) {
|
|
42
|
+
const ownRootWrapper = gridRoot?.querySelector('.ag-root-wrapper');
|
|
43
|
+
if (!ownRootWrapper) {
|
|
44
|
+
return document.querySelector(selector);
|
|
39
45
|
}
|
|
40
|
-
return
|
|
46
|
+
return (Array.from(ownRootWrapper.querySelectorAll(selector)).find((element) => element.closest('.ag-root-wrapper') === ownRootWrapper) ?? null);
|
|
41
47
|
}
|
|
42
48
|
export const CellPopup = React.forwardRef((props, ref) => {
|
|
43
49
|
ensurePortalElement(props.className);
|
|
@@ -47,11 +53,10 @@ export const CellPopup = React.forwardRef((props, ref) => {
|
|
|
47
53
|
});
|
|
48
54
|
const OVERLAY_ID = 'cell-overlay';
|
|
49
55
|
const showCellPopupContent = () => {
|
|
50
|
-
const
|
|
51
|
-
const
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
: document.querySelector(cellSelector);
|
|
56
|
+
const gridRoot = adaptable.agGridAdapter.getAgGridRootElement();
|
|
57
|
+
const rowSelector = `.ag-row[row-id="${escapeAttributeValue(props.primaryKeyValue)}"]`;
|
|
58
|
+
const cellSelector = `${rowSelector} .ag-cell[col-id="${escapeAttributeValue(props.columnId)}"]`;
|
|
59
|
+
const alignTo = queryGridElement(gridRoot, props.anchor === 'row' ? rowSelector : cellSelector);
|
|
55
60
|
if (!alignTo) {
|
|
56
61
|
adaptable.logger.consoleError(`Cell not found for selector "${cellSelector}". Unable to display popup.`);
|
|
57
62
|
return;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
3
3
|
import { ADAPTABLE_VERSION } from '../../EnvVars';
|
|
4
|
+
import { formatLicenseStatus } from '../../Utilities/license/licenseStatus';
|
|
5
|
+
import { getInstanceLicenseStatus } from '../../Utilities/license/instanceLicense';
|
|
4
6
|
import { AG_GRID_VERSION } from '../../agGrid/AgGridModulesAdapter';
|
|
5
7
|
import { DataSource, InfiniteTableGrid } from '../../components/InfiniteTable';
|
|
6
8
|
import Panel from '../../components/Panel';
|
|
@@ -39,7 +41,10 @@ export const GridInfoPopup = (props) => {
|
|
|
39
41
|
if (api.optionsApi.getUserInterfaceOptions()?.showAgGridVersion) {
|
|
40
42
|
summaryKeyValuePairs.push({ Key: 'AG Grid Version', Value: agGridVersion });
|
|
41
43
|
}
|
|
42
|
-
summaryKeyValuePairs.push({
|
|
44
|
+
summaryKeyValuePairs.push({
|
|
45
|
+
Key: 'License',
|
|
46
|
+
Value: formatLicenseStatus(getInstanceLicenseStatus(api)),
|
|
47
|
+
});
|
|
43
48
|
summaryKeyValuePairs.push({ Key: 'Adaptable Id', Value: api.optionsApi.getAdaptableId() });
|
|
44
49
|
summaryKeyValuePairs.push({ Key: 'State Key', Value: api.optionsApi.getAdaptableStateKey() });
|
|
45
50
|
summaryKeyValuePairs.push({ Key: 'User Name', Value: api.optionsApi.getUserName() });
|
|
@@ -71,6 +71,7 @@ function buildTransposedGridOptions({ transposedRowsAndColumns, elevatedColumnId
|
|
|
71
71
|
...transposedRowsAndColumns.transposedColumns.map((col) => ({ field: col.colId, headerName: col.header })),
|
|
72
72
|
],
|
|
73
73
|
rowData: transposedRowsAndColumns.transposedRows,
|
|
74
|
+
getRowId: (params) => params.data[TRANSPOSED_FIRST_COLUMN_FIELD],
|
|
74
75
|
sideBar: false,
|
|
75
76
|
};
|
|
76
77
|
}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Layout, TableLayout } from '../../../../../types';
|
|
3
3
|
import { AggregationColumnValue } from '../../../../AdaptableState/Common/AggregationColumns';
|
|
4
|
-
|
|
5
|
-
export
|
|
4
|
+
import { GRAND_TOTAL_ROW_LABELS, GrandTotalRowPosition, getGrandTotalRowKey, getGrandTotalRowLabel } from '../../../../View/ObjectItemViews/Layout/aggregationSummaryHelpers';
|
|
5
|
+
export { GRAND_TOTAL_ROW_LABELS, getGrandTotalRowKey, getGrandTotalRowLabel };
|
|
6
|
+
export type { GrandTotalRowPosition };
|
|
6
7
|
export declare const GRAND_TOTAL_ROW_DESCRIPTIONS: Record<GrandTotalRowPosition | 'off', string>;
|
|
7
8
|
export declare const GRAND_TOTAL_ROW_OPTIONS: (GrandTotalRowPosition | 'off')[];
|
|
8
|
-
export declare function getGrandTotalRowKey(layout: Layout): GrandTotalRowPosition | 'off';
|
|
9
|
-
export declare function getGrandTotalRowLabel(layout: Layout): string;
|
|
10
9
|
export declare function getGrandTotalRowDescription(layout: Layout): string;
|
|
11
10
|
export declare function getAggFuncSummaryLabel(columnId: string, aggFunc: AggregationColumnValue, aggregationColumnsMap: Record<string, string>): string;
|
|
12
11
|
export declare const isAggregationsSectionValid: (data: Layout) => true | string;
|
|
@@ -18,4 +17,3 @@ interface AggregationsSectionProps {
|
|
|
18
17
|
layoutWizardMode?: 'create' | 'edit';
|
|
19
18
|
}
|
|
20
19
|
export declare const AggregationsSection: React.FunctionComponent<AggregationsSectionProps>;
|
|
21
|
-
export {};
|
|
@@ -15,17 +15,12 @@ import { Box, Flex } from '../../../../components/Flex';
|
|
|
15
15
|
import { SingleSelect } from '../../../../components/Select';
|
|
16
16
|
import { LAYOUT_WIZARD_COLUMN_LIST_HEADER_CLASS, LAYOUT_WIZARD_COLUMN_LIST_OPTION_CLASS, LAYOUT_WIZARD_COLUMN_LIST_SEARCH_CLASS, } from '../../Utilities/layoutWizardColumns';
|
|
17
17
|
import Radio, { RadioGroup } from '../../../../components/Radio';
|
|
18
|
+
import HelpBlock from '../../../../components/HelpBlock';
|
|
18
19
|
import { TypeRadio } from '../../../Wizard/TypeRadio';
|
|
19
|
-
import { getTableAggregationSummaryValues } from '../../../../View/ObjectItemViews/Layout/aggregationSummaryHelpers';
|
|
20
|
+
import { GRAND_TOTAL_ROW_LABELS, getGrandTotalRowKey, getGrandTotalRowLabel, getTableAggregationSummaryValues, } from '../../../../View/ObjectItemViews/Layout/aggregationSummaryHelpers';
|
|
20
21
|
import { renderSummaryStringTags } from '../../../Wizard/SummaryColorTag';
|
|
21
22
|
const WEIGHTED_AVERAGE_AGG_FN_NAME = 'weightedAvg';
|
|
22
|
-
export
|
|
23
|
-
off: 'None',
|
|
24
|
-
top: 'Top',
|
|
25
|
-
bottom: 'Bottom',
|
|
26
|
-
pinnedTop: 'Pinned Top',
|
|
27
|
-
pinnedBottom: 'Pinned Bottom',
|
|
28
|
-
};
|
|
23
|
+
export { GRAND_TOTAL_ROW_LABELS, getGrandTotalRowKey, getGrandTotalRowLabel };
|
|
29
24
|
export const GRAND_TOTAL_ROW_DESCRIPTIONS = {
|
|
30
25
|
off: 'Grand Total Row is not displayed in the grid',
|
|
31
26
|
top: 'Grand Total Row is displayed at the top of the grid',
|
|
@@ -40,16 +35,6 @@ export const GRAND_TOTAL_ROW_OPTIONS = [
|
|
|
40
35
|
'pinnedTop',
|
|
41
36
|
'pinnedBottom',
|
|
42
37
|
];
|
|
43
|
-
export function getGrandTotalRowKey(layout) {
|
|
44
|
-
const value = layout.GrandTotalRow;
|
|
45
|
-
if (value == null || value === false) {
|
|
46
|
-
return 'off';
|
|
47
|
-
}
|
|
48
|
-
return value;
|
|
49
|
-
}
|
|
50
|
-
export function getGrandTotalRowLabel(layout) {
|
|
51
|
-
return GRAND_TOTAL_ROW_LABELS[getGrandTotalRowKey(layout)];
|
|
52
|
-
}
|
|
53
38
|
export function getGrandTotalRowDescription(layout) {
|
|
54
39
|
return GRAND_TOTAL_ROW_DESCRIPTIONS[getGrandTotalRowKey(layout)];
|
|
55
40
|
}
|
|
@@ -161,6 +146,7 @@ export const AggregationsSection = (props) => {
|
|
|
161
146
|
const allAggregableColumns = adaptable.api.columnApi.getAggregatableColumns();
|
|
162
147
|
const allColumns = adaptable.api.columnApi.getUIAvailableColumns();
|
|
163
148
|
const numberColumns = adaptable.api.columnApi.getNumericColumns();
|
|
149
|
+
const hasActiveRowSummaries = (layout.RowSummaries ?? []).some((rowSummary) => !rowSummary.IsSuspended);
|
|
164
150
|
const allAggregatableColumnIds = allAggregableColumns.map((col) => col.columnId);
|
|
165
151
|
(layout.TableAggregationColumns || []).forEach((agg) => {
|
|
166
152
|
if (!allAggregatableColumnIds.includes(agg.ColumnId)) {
|
|
@@ -226,10 +212,10 @@ export const AggregationsSection = (props) => {
|
|
|
226
212
|
? 'Hide Function Name in Header'
|
|
227
213
|
: 'Show Function Name in Header' }), summary: _jsx(CollapsibleWizardValueSummary, { value: _jsx(Tag, { children: layout.SuppressAggFuncInHeader
|
|
228
214
|
? 'Hide Function Name in Header'
|
|
229
|
-
: 'Show Function Name in Header' }) }), children: _jsxs(RadioGroup, { orientation: "vertical", value: layout.SuppressAggFuncInHeader ?? false, onRadioChange: handleSuppressAggFuncInHeader, children: [_jsx(Radio, { value: false, children: "Show Aggregation function names" }), _jsx(Radio, { value: true, children: "Hide Aggregation function names" })] }) }),
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
215
|
+
: 'Show Function Name in Header' }) }), children: _jsxs(RadioGroup, { orientation: "vertical", value: layout.SuppressAggFuncInHeader ?? false, onRadioChange: handleSuppressAggFuncInHeader, children: [_jsx(Radio, { value: false, children: "Show Aggregation function names" }), _jsx(Radio, { value: true, children: "Hide Aggregation function names" })] }) }), _jsxs(CollapsibleWizardCard, { ...bindCard('grand-total'), surface: "panel", "data-name": "grand-total-row", title: "Grand Total Row", help: "Set position of the Grand Total Row in the grid", collapsedHelp: "Position of the Grand Total Row in the grid", compactSummary: _jsx(Tag, { children: getGrandTotalRowLabel(layout) }), summary: _jsx(CollapsibleWizardValueSummary, { value: _jsx(Tag, { children: getGrandTotalRowLabel(layout) }) }), children: [_jsx(RadioGroup, { orientation: "vertical", value: getGrandTotalRowKey(layout), onRadioChange: (key) => {
|
|
216
|
+
props.onChange({
|
|
217
|
+
...layout,
|
|
218
|
+
GrandTotalRow: key === 'off' ? null : key,
|
|
219
|
+
});
|
|
220
|
+
}, children: GRAND_TOTAL_ROW_OPTIONS.map((key) => (_jsx(TypeRadio, { value: key, text: GRAND_TOTAL_ROW_LABELS[key], description: GRAND_TOTAL_ROW_DESCRIPTIONS[key] }, key))) }), hasActiveRowSummaries && (_jsx(HelpBlock, { "data-name": "grand-total-row-summaries-note", className: "twa:mt-2", children: "The Row Summaries of this Layout are not displayed when the Grand Total Row is Pinned Top or Pinned Bottom" }))] })] }));
|
|
235
221
|
};
|
|
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
2
2
|
import * as React from 'react';
|
|
3
3
|
import { CheckBox } from '../../../../components/CheckBox';
|
|
4
4
|
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
5
|
+
import HelpBlock from '../../../../components/HelpBlock';
|
|
5
6
|
import SimpleButton from '../../../../components/SimpleButton';
|
|
6
7
|
import { ButtonNew } from '../../../Components/Buttons/ButtonNew';
|
|
7
8
|
import { Card } from '../../../../components/Card';
|
|
@@ -194,6 +195,7 @@ export const RowSummarySection = (props) => {
|
|
|
194
195
|
const adaptable = useAdaptable();
|
|
195
196
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
196
197
|
const rowSummaries = layout.RowSummaries ?? [];
|
|
198
|
+
const skippedReason = adaptable.api.layoutApi.internalApi.getRowSummariesSkippedReason(layout);
|
|
197
199
|
const availableScalarExpressions = React.useMemo(() => {
|
|
198
200
|
const sytemExpressions = adaptable.api.internalApi
|
|
199
201
|
.getQueryLanguageService()
|
|
@@ -235,7 +237,9 @@ export const RowSummarySection = (props) => {
|
|
|
235
237
|
}
|
|
236
238
|
}
|
|
237
239
|
};
|
|
238
|
-
return (_jsxs(Box, { className: cn(getWizardAccordionSectionClassName(hasExpandedCard, expandedFillsSpace), 'twa:p-3'), children: [_jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:mb-2 twa:max-w-[520px] twa:shrink-0", children: "Add summary rows at the top or bottom of the grid with aggregated column values" }),
|
|
240
|
+
return (_jsxs(Box, { className: cn(getWizardAccordionSectionClassName(hasExpandedCard, expandedFillsSpace), 'twa:p-3'), children: [_jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:mb-2 twa:max-w-[520px] twa:shrink-0", children: "Add summary rows at the top or bottom of the grid with aggregated column values" }), skippedReason && (_jsx(HelpBlock, { "data-name": "row-summaries-not-displayed", className: "twa:mb-2 twa:shrink-0", children: skippedReason === 'rowPinning'
|
|
241
|
+
? 'Row Summaries are not displayed, because Row Pinning is enabled in the grid'
|
|
242
|
+
: 'Row Summaries are not displayed while the Grand Total Row is pinned; choose Top or Bottom for the Grand Total Row in the Aggregations section to display them' })), _jsx(Flex, { className: "twa:justify-end twa:mb-2 twa:shrink-0", children: _jsx(ButtonNew, { onClick: handleAddRowSummary, children: "Add Row Summary" }) }), _jsx(Flex, { flexDirection: "column", className: "twa:gap-3 twa:min-h-0 twa:flex-1 twa:overflow-y-auto", children: rowSummaries.map((rowSummary, index) => {
|
|
239
243
|
const cardBinding = bindCard(rowSummaryCardId(index), { fillAvailable: true });
|
|
240
244
|
return (_jsx(CollapsibleWizardCard, { ...cardBinding, surface: "panel", "data-name": `row-summary-${index}`, title: `Row Summary ${index + 1}`, help: "Configure position, filters, and column aggregations for this summary row", collapsedHelp: false, compactSummary: _jsx(RowSummaryPositionTag, { position: rowSummary.Position }), headerVisual: !cardBinding.expanded ? (_jsx(RowSummaryPositionTag, { position: rowSummary.Position })) : undefined, headerActions: _jsxs(_Fragment, { children: [cardBinding.expanded ? (_jsx(SuspendToggleButton, { className: objectListActionButtonClassName('suspend'), onSuspend: () => {
|
|
241
245
|
const newSummaries = [...rowSummaries];
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
import { AdaptableApi, PivotLayout, TableLayout } from '../../../types';
|
|
1
|
+
import { AdaptableApi, LayoutBase, PivotLayout, TableLayout } from '../../../types';
|
|
2
|
+
export type GrandTotalRowPosition = 'top' | 'bottom' | 'pinnedTop' | 'pinnedBottom';
|
|
3
|
+
export declare const GRAND_TOTAL_ROW_LABELS: Record<GrandTotalRowPosition | 'off', string>;
|
|
4
|
+
export declare function getGrandTotalRowKey(layout: LayoutBase): GrandTotalRowPosition | 'off';
|
|
5
|
+
export declare function getGrandTotalRowLabel(layout: LayoutBase): string;
|
|
2
6
|
export declare function getTableAggregationSummaryValues(layout: TableLayout, api: AdaptableApi): string[];
|
|
3
7
|
export declare function getPivotAggregationSummaryValues(layout: PivotLayout, api: AdaptableApi): string[];
|
|
4
8
|
export declare function getLayoutTableAggregationViewItems(layout: TableLayout, api: AdaptableApi): {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WEIGHTED_AVERAGE_AGG_FN_NAME } from '../../../AdaptableState/Common/AggregationColumns';
|
|
2
2
|
const IGNORED_AGG_COLUMN_IDS = new Set(['Source', 'Uuid', 'AdaptableVersion']);
|
|
3
|
-
const GRAND_TOTAL_ROW_LABELS = {
|
|
3
|
+
export const GRAND_TOTAL_ROW_LABELS = {
|
|
4
4
|
off: 'None',
|
|
5
5
|
top: 'Top',
|
|
6
6
|
bottom: 'Bottom',
|
|
@@ -12,14 +12,17 @@ const PIVOT_LAYOUT_TOTAL_LABELS = {
|
|
|
12
12
|
before: 'Before',
|
|
13
13
|
after: 'After',
|
|
14
14
|
};
|
|
15
|
-
function getGrandTotalRowKey(layout) {
|
|
15
|
+
export function getGrandTotalRowKey(layout) {
|
|
16
16
|
const value = layout.GrandTotalRow;
|
|
17
17
|
if (value == null || value === false) {
|
|
18
18
|
return 'off';
|
|
19
19
|
}
|
|
20
|
+
if (value === true) {
|
|
21
|
+
return 'top';
|
|
22
|
+
}
|
|
20
23
|
return value;
|
|
21
24
|
}
|
|
22
|
-
function getGrandTotalRowLabel(layout) {
|
|
25
|
+
export function getGrandTotalRowLabel(layout) {
|
|
23
26
|
return GRAND_TOTAL_ROW_LABELS[getGrandTotalRowKey(layout)];
|
|
24
27
|
}
|
|
25
28
|
function getPivotLayoutTotalKey(value) {
|
|
@@ -111,7 +111,6 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
111
111
|
private listenerGlobalChartingChanges;
|
|
112
112
|
private listenerCellEditingStarted;
|
|
113
113
|
private listenerFirstDataRendered;
|
|
114
|
-
private listenerPivotChanged;
|
|
115
114
|
private listenerCellSelectionChanged;
|
|
116
115
|
private listenerSortChanged;
|
|
117
116
|
private listenerColumnGroupOpened;
|
|
@@ -356,6 +355,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
356
355
|
* `dataChanged`. Snapshot old data first and synthesize `onRowDataChanged`
|
|
357
356
|
* for those nodes after the transaction (see #off_screen_row_update).
|
|
358
357
|
*/
|
|
358
|
+
private countTransactionForPerf;
|
|
359
359
|
private applyAgGridTransaction;
|
|
360
360
|
/**
|
|
361
361
|
* This method internally differentiates between server-side and client-side row model
|
|
@@ -480,6 +480,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
480
480
|
* There are a few things we need to do AFTER we edit a cell and it makes sense to put them in one place
|
|
481
481
|
*/
|
|
482
482
|
private performPostEditChecks;
|
|
483
|
+
private performPostEditChecksNow;
|
|
483
484
|
/**
|
|
484
485
|
* Collect format / freetext / styled / observable / relative-styled columns
|
|
485
486
|
* into one scope. Edited-row-only ids stay in `columnIds`; `ALL_ROWS()`
|
|
@@ -496,9 +497,12 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
496
497
|
private checkFreeTextColumnChanges;
|
|
497
498
|
private checkFormatColumnExpressionStyleChanges;
|
|
498
499
|
private checkIfChangedCellCurrentlySelected;
|
|
499
|
-
private
|
|
500
|
+
private updateMinMaxCachedValueForColumn;
|
|
500
501
|
private filterOnDataChange;
|
|
501
|
-
refreshLayout(
|
|
502
|
+
refreshLayout(config?: {
|
|
503
|
+
columnsChanged?: boolean;
|
|
504
|
+
}): void;
|
|
505
|
+
private isAnyFilterActive;
|
|
502
506
|
private isRowGroupDifferentInLayout;
|
|
503
507
|
private hasPivotTotalsInLayout;
|
|
504
508
|
private onLayoutChange;
|