@adaptabletools/adaptable-cjs 23.0.0-canary.3 → 23.0.0-canary.5
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/index.css +116 -61
- package/package.json +9 -4
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -4
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +0 -7
- package/src/AdaptableState/Common/AdaptableForm.d.ts +18 -1
- package/src/AdaptableState/Common/AdaptableForm.js +34 -0
- package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
- package/src/AdaptableState/Common/AggregationColumns.js +30 -3
- package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +3 -2
- package/src/AdaptableState/Common/ColumnScope.d.ts +4 -0
- package/src/AdaptableState/Common/Enums.d.ts +5 -10
- package/src/AdaptableState/Common/Enums.js +5 -11
- package/src/AdaptableState/PlusMinusState.d.ts +3 -3
- package/src/AdaptableState/ShortcutState.d.ts +2 -6
- package/src/AdaptableState/StyledColumnState.d.ts +3 -5
- package/src/AdaptableState/ThemeState.d.ts +33 -28
- package/src/Api/EventApi.d.ts +14 -1
- package/src/Api/Events/ThemeChanged.d.ts +6 -0
- package/src/Api/Events/ThemeSelected.d.ts +11 -0
- package/src/Api/Events/ThemeSelected.js +2 -0
- package/src/Api/Implementation/EventApiImpl.js +4 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -14
- package/src/Api/Implementation/LayoutHelpers.d.ts +2 -0
- package/src/Api/Implementation/LayoutHelpers.js +31 -8
- package/src/Api/Implementation/ThemeApiImpl.d.ts +3 -2
- package/src/Api/Implementation/ThemeApiImpl.js +19 -15
- package/src/Api/Internal/EventInternalApi.d.ts +2 -0
- package/src/Api/Internal/EventInternalApi.js +8 -1
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +4 -4
- package/src/Api/Internal/StyledColumnInternalApi.js +4 -4
- package/src/Api/Internal/ThemeInternalApi.d.ts +0 -1
- package/src/Api/Internal/ThemeInternalApi.js +0 -10
- package/src/Api/LayoutApi.d.ts +1 -8
- package/src/Api/ThemeApi.d.ts +6 -2
- package/src/Redux/ActionsReducers/ThemeRedux.d.ts +3 -3
- package/src/Strategy/CalculatedColumnModule.js +3 -1
- package/src/Strategy/FormatColumnModule.js +12 -5
- package/src/Strategy/LayoutModule.js +13 -8
- package/src/Strategy/StyledColumnModule.js +58 -30
- package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
- package/src/Utilities/Constants/ReduxConstants.js +1 -14
- package/src/Utilities/Helpers/FormatHelper.js +20 -1
- package/src/Utilities/Helpers/SparklineOptionsHelper.d.ts +7 -0
- package/src/Utilities/Helpers/SparklineOptionsHelper.js +68 -0
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +212 -1
- package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
- package/src/Utilities/Helpers/ThemeHelpers.js +43 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +155 -0
- package/src/Utilities/ObjectFactory.d.ts +1 -3
- package/src/Utilities/ObjectFactory.js +0 -9
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +1 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +7 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +4 -0
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +120 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +1 -0
- package/src/Utilities/Services/ThemeService.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +17 -16
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +113 -102
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +12 -13
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +54 -54
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -3
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +29 -37
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +2 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +28 -15
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/AgChargingWizard.js +3 -10
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +35 -52
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/ExternalChartingWizard.js +4 -31
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.d.ts +5 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/PreviewChartSection.js +26 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +9 -6
- package/src/View/Comments/CommentsEditor.js +1 -1
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +1 -1
- package/src/View/Components/ModuleProfile.js +1 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.d.ts +0 -1
- package/src/View/Components/Popups/WindowPopups/windowFactory.js +1 -2
- package/src/View/Components/RangesComponent.d.ts +7 -2
- package/src/View/Components/RangesComponent.js +94 -22
- package/src/View/Components/Selectors/ColumnSelector.js +5 -0
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +1 -1
- package/src/View/Components/ValueSelector/index.js +70 -57
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -13
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +8 -8
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +11 -12
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.js +5 -4
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +2 -1
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +4 -15
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -27
- package/src/View/Export/Wizard/ReportNameWizardSection.js +8 -11
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +19 -22
- package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
- package/src/View/Export/Wizard/ScheduledReportSettings.js +12 -12
- package/src/View/Export/Wizard/ScheduledReportWizard.js +2 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +22 -21
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +19 -3
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -4
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +7 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +120 -13
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +78 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +34 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +11 -6
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +3 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +64 -13
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +19 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +60 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +35 -70
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +14 -10
- package/src/View/Layout/LayoutViewPanel.js +23 -21
- package/src/View/Layout/TransposedPopup.js +2 -2
- package/src/View/Layout/Wizard/LayoutWizard.js +3 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +2 -3
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +116 -26
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +79 -79
- package/src/View/Layout/Wizard/sections/FilterSection.js +31 -32
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +10 -10
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -51
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +9 -8
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +4 -4
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +36 -33
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +95 -73
- package/src/View/Layout/Wizard/sections/SettingsSection.js +3 -4
- package/src/View/Layout/Wizard/sections/SortSection.js +2 -2
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +7 -12
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +1 -3
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +4 -0
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +45 -12
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +10 -17
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +5 -21
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +15 -21
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +10 -17
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +16 -5
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -2
- package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
- package/src/View/Shortcut/shortcutOperations.js +32 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +7 -6
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +26 -16
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +100 -15
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +48 -25
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +109 -33
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +20 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +124 -23
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +35 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +88 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +125 -35
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -74
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +20 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +6 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +11 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +20 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +32 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +64 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +35 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +96 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +57 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +58 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +66 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +133 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +12 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts +1 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +53 -29
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
- package/src/View/Theme/ThemePopup.d.ts +2 -14
- package/src/View/Theme/ThemePopup.js +1 -36
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +6 -20
- package/src/View/renderWithAdaptableContext.js +1 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +36 -41
- package/src/agGrid/AgGridAdapter.d.ts +1 -1
- package/src/agGrid/AgGridAdapter.js +27 -17
- package/src/agGrid/AgGridColumnAdapter.js +10 -19
- package/src/agGrid/AgGridMenuAdapter.d.ts +0 -1
- package/src/agGrid/AgGridMenuAdapter.js +20 -37
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +19 -0
- package/src/agGrid/buildValueAggregationMenuItem.js +114 -0
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
- package/src/agGrid/cellRenderers/IconRenderer.js +46 -17
- package/src/agGrid/createAgGridIcon.d.ts +10 -0
- package/src/agGrid/createAgGridIcon.js +19 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +10 -5
- package/src/components/Combobox/VirtualizedList.js +5 -5
- package/src/components/Combobox/comboboxUtils.d.ts +4 -1
- package/src/components/Combobox/comboboxUtils.js +2 -0
- package/src/components/Combobox/index.d.ts +1 -0
- package/src/components/Combobox/index.js +36 -16
- package/src/components/DragAndDropContext/UnusedPanel.js +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/Input/NumberInput.js +1 -1
- package/src/components/Panel/index.js +1 -1
- package/src/components/SimpleButton/index.js +4 -4
- package/src/components/Toggle/Toggle.js +1 -1
- package/src/components/Toggle/ToggleGroup.js +1 -1
- package/src/components/Tree/TreeDropdown/index.js +1 -5
- package/src/env.js +2 -2
- package/src/layout-manager/src/LayoutManagerModel.d.ts +5 -1
- package/src/layout-manager/src/index.js +2 -9
- package/src/metamodel/adaptable.metamodel.d.ts +39 -46
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +5 -5
- package/themes/dark.css +1 -68
- package/themes/light.css +1 -5
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
- package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -5
- package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
- package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -74
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -58
- package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
- package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -143
- package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
- package/src/Aggregation/parameterizedAggregationHeader.js +0 -65
- package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
- package/src/Aggregation/parameterizedAggregationHelpers.js +0 -121
- package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
- package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -74
- package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
- package/src/Aggregation/validateParameterizedAggregations.js +0 -25
- package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
- package/src/View/AdaptableComputedCSSVarsContext.js +0 -36
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -48
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -32
- package/src/View/Theme/VariantSelector.d.ts +0 -8
- package/src/View/Theme/VariantSelector.js +0 -25
- package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
- package/src/components/Select/CSSNumericVariableWatch.js +0 -51
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.findIconStyleMappingForValue = exports.getIconRendererForColumn = exports.resolveEffectiveIconStyleMappings = void 0;
|
|
3
|
+
exports.findIconStyleMappingForValue = exports.getIconRendererForColumn = exports.resolveIconStyleMappingsForSummaryPreview = exports.resolveEffectiveIconStyleMappings = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const Icon_1 = require("../../components/Icon");
|
|
@@ -12,6 +12,25 @@ const iconStyledColumnColumnSupport_1 = require("../../Utilities/Helpers/iconSty
|
|
|
12
12
|
const AdaptableLogger_1 = require("../AdaptableLogger");
|
|
13
13
|
const DEFAULT_SIZE = 18;
|
|
14
14
|
const DEFAULT_GAP = 4;
|
|
15
|
+
const normaliseIconMappingKey = (key, matchMode) => {
|
|
16
|
+
if (typeof key === 'string' && matchMode === 'CaseInsensitive') {
|
|
17
|
+
return key.toLowerCase();
|
|
18
|
+
}
|
|
19
|
+
return key;
|
|
20
|
+
};
|
|
21
|
+
const resolveIconStyleMappingParts = (iconStyle) => {
|
|
22
|
+
const presetMappings = iconStyle.Preset
|
|
23
|
+
? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset)
|
|
24
|
+
: [];
|
|
25
|
+
const userMappings = iconStyle.Mappings ?? [];
|
|
26
|
+
if (presetMappings.length === 0 || userMappings.length === 0) {
|
|
27
|
+
return { presetMappings, userMappings };
|
|
28
|
+
}
|
|
29
|
+
const matchMode = iconStyle.MatchMode ?? 'Exact';
|
|
30
|
+
const overrideKeys = new Set(userMappings.map((m) => normaliseIconMappingKey(m.Key, matchMode)));
|
|
31
|
+
const filteredPreset = presetMappings.filter((p) => !overrideKeys.has(normaliseIconMappingKey(p.Key, matchMode)));
|
|
32
|
+
return { presetMappings: filteredPreset, userMappings };
|
|
33
|
+
};
|
|
15
34
|
/**
|
|
16
35
|
* Resolve the **effective** mapping list for an `IconStyle`:
|
|
17
36
|
*
|
|
@@ -31,26 +50,36 @@ const DEFAULT_GAP = 4;
|
|
|
31
50
|
const resolveEffectiveIconStyleMappings = (iconStyle) => {
|
|
32
51
|
if (!iconStyle)
|
|
33
52
|
return [];
|
|
34
|
-
const presetMappings = iconStyle
|
|
35
|
-
? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset)
|
|
36
|
-
: [];
|
|
37
|
-
const userMappings = iconStyle.Mappings ?? [];
|
|
53
|
+
const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
|
|
38
54
|
if (presetMappings.length === 0)
|
|
39
55
|
return userMappings;
|
|
40
|
-
if (userMappings.length === 0)
|
|
41
|
-
return
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
if (typeof k === 'string' && matchMode === 'CaseInsensitive') {
|
|
45
|
-
return k.toLowerCase();
|
|
46
|
-
}
|
|
47
|
-
return k;
|
|
48
|
-
};
|
|
49
|
-
const overrideKeys = new Set(userMappings.map((m) => normaliseKey(m.Key)));
|
|
50
|
-
const filteredPreset = presetMappings.filter((p) => !overrideKeys.has(normaliseKey(p.Key)));
|
|
51
|
-
return [...filteredPreset, ...userMappings];
|
|
56
|
+
if (userMappings.length === 0) {
|
|
57
|
+
return iconStyle.Preset ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
|
|
58
|
+
}
|
|
59
|
+
return [...presetMappings, ...userMappings];
|
|
52
60
|
};
|
|
53
61
|
exports.resolveEffectiveIconStyleMappings = resolveEffectiveIconStyleMappings;
|
|
62
|
+
/**
|
|
63
|
+
* Mapping list for wizard / settings summaries: custom mappings first so
|
|
64
|
+
* user-authored entries are always visible, then any remaining preset
|
|
65
|
+
* entries (after override filtering).
|
|
66
|
+
*/
|
|
67
|
+
const resolveIconStyleMappingsForSummaryPreview = (iconStyle) => {
|
|
68
|
+
if (!iconStyle)
|
|
69
|
+
return [];
|
|
70
|
+
const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
|
|
71
|
+
if (userMappings.length === 0) {
|
|
72
|
+
if (presetMappings.length > 0) {
|
|
73
|
+
return presetMappings;
|
|
74
|
+
}
|
|
75
|
+
return iconStyle.Preset ? (0, IconStylePresets_1.getIconStylePresetMappings)(iconStyle.Preset) : [];
|
|
76
|
+
}
|
|
77
|
+
if (presetMappings.length === 0) {
|
|
78
|
+
return userMappings;
|
|
79
|
+
}
|
|
80
|
+
return [...userMappings, ...presetMappings];
|
|
81
|
+
};
|
|
82
|
+
exports.resolveIconStyleMappingsForSummaryPreview = resolveIconStyleMappingsForSummaryPreview;
|
|
54
83
|
/**
|
|
55
84
|
* Look up `cellValue` in the mapping list using the configured match mode.
|
|
56
85
|
*
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Creates an AG Grid icon element for the given icon name.
|
|
3
|
+
*
|
|
4
|
+
* Mimics AG Grid's internal icon creation, producing a
|
|
5
|
+
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
6
|
+
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
7
|
+
*
|
|
8
|
+
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
9
|
+
*/
|
|
10
|
+
export declare function createAgGridIcon(name: string): HTMLElement;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.createAgGridIcon = createAgGridIcon;
|
|
4
|
+
/**
|
|
5
|
+
* Creates an AG Grid icon element for the given icon name.
|
|
6
|
+
*
|
|
7
|
+
* Mimics AG Grid's internal icon creation, producing a
|
|
8
|
+
* `<span class="ag-icon ag-icon-{name}" role="presentation" unselectable="on">`
|
|
9
|
+
* so the icon picks up AG Grid's own icon font/theme styling.
|
|
10
|
+
*
|
|
11
|
+
* @see https://github.com/ag-grid/ag-grid/blob/5ca14e73188f6f52fd7d545d595c067bf1b72168/packages/ag-grid-community/src/utils/icon.ts#L139
|
|
12
|
+
*/
|
|
13
|
+
function createAgGridIcon(name) {
|
|
14
|
+
const element = document.createElement('span');
|
|
15
|
+
element.className = `ag-icon ag-icon-${name}`;
|
|
16
|
+
element.setAttribute('role', 'presentation');
|
|
17
|
+
element.setAttribute('unselectable', 'on');
|
|
18
|
+
return element;
|
|
19
|
+
}
|
|
@@ -209,10 +209,12 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
209
209
|
break;
|
|
210
210
|
}
|
|
211
211
|
case 'select': {
|
|
212
|
-
const
|
|
212
|
+
const optionItems = resolveOptions(field);
|
|
213
|
+
const items = optionItems.map((item) => ({
|
|
213
214
|
value: item.value,
|
|
214
215
|
label: item.label,
|
|
215
216
|
}));
|
|
217
|
+
const selectPlaceholder = (0, AdaptableForm_1.resolveSelectPlaceholder)(field, optionItems);
|
|
216
218
|
// The underlying SingleCombobox / MultiCombobox manage their own
|
|
217
219
|
// popup-based focus; we wrap them in a labelled `role="group"` so
|
|
218
220
|
// assistive tech announces "<label> group" when focus enters and
|
|
@@ -230,10 +232,10 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
230
232
|
// anything else (e.g. legacy string defaults) to [] so the
|
|
231
233
|
// underlying combobox never receives a non-array value.
|
|
232
234
|
const selected = Array.isArray(value) ? value : [];
|
|
233
|
-
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.MultiCombobox, { items: items, onValueChange: (newValues) => setFieldValue(field.name, newValues), value: selected, disabled: isDisabled, placeholder:
|
|
235
|
+
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.MultiCombobox, { items: items, onValueChange: (newValues) => setFieldValue(field.name, newValues), value: selected, disabled: isDisabled, placeholder: selectPlaceholder }) }));
|
|
234
236
|
}
|
|
235
237
|
else {
|
|
236
|
-
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.SingleCombobox, { items: items, onValueChange: (newValue) => setFieldValue(field.name, newValue), value: value, disabled: isDisabled, placeholder:
|
|
238
|
+
control = ((0, jsx_runtime_1.jsx)(Flex_1.Box, { ...groupProps, children: (0, jsx_runtime_1.jsx)(Combobox_1.SingleCombobox, { items: items, onValueChange: (newValue) => setFieldValue(field.name, (0, AdaptableForm_1.resolveSelectValueAfterClear)(field, newValue)), value: value, disabled: isDisabled, placeholder: selectPlaceholder }) }));
|
|
237
239
|
}
|
|
238
240
|
break;
|
|
239
241
|
}
|
|
@@ -359,10 +361,13 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
359
361
|
}
|
|
360
362
|
return items
|
|
361
363
|
.filter((field) => !(0, AdaptableForm_1.isAdaptableFormFieldHidden)(field, data, context))
|
|
362
|
-
.map((field) => {
|
|
364
|
+
.map((field, index) => {
|
|
363
365
|
const useFor = field.fieldType !== 'radio' && field.fieldType !== 'textOutput';
|
|
364
366
|
const requiredMarker = field.required ? ((0, jsx_runtime_1.jsx)("span", { className: "ab-Form_required-marker", "aria-hidden": "true", children: ' *' })) : null;
|
|
365
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", style: {
|
|
367
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", alignItems: "center", style: {
|
|
368
|
+
columnGap: 'var(--ab-base-space)',
|
|
369
|
+
marginLeft: index > 0 ? 'var(--ab-base-space)' : undefined,
|
|
370
|
+
}, children: [field.label ? (useFor ? ((0, jsx_runtime_1.jsxs)("label", { id: fieldLabelId(field), htmlFor: fieldDomId(field), className: "ab-FormLayout--inline_field-label", title: field.tooltip, children: [field.label, requiredMarker] })) : ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { id: fieldLabelId(field), className: "ab-FormLayout--inline_field-label", title: field.tooltip, children: [field.label, requiredMarker] }))) : null, renderField(field)] }, field.name));
|
|
366
371
|
});
|
|
367
372
|
};
|
|
368
373
|
const renderRowsEntry = (entry, index) => {
|
|
@@ -40,16 +40,16 @@ function VirtualizedList({ open, virtualizerRef, showItemTooltip, renderCheckbox
|
|
|
40
40
|
return null;
|
|
41
41
|
}
|
|
42
42
|
const isUncreatedCreatable = item.creatable && !item.created;
|
|
43
|
-
const
|
|
44
|
-
const tooltipText =
|
|
43
|
+
const itemText = (0, comboboxUtils_1.getItemTextLabel)(item);
|
|
44
|
+
const tooltipText = showItemTooltip && itemText != null
|
|
45
45
|
? isUncreatedCreatable
|
|
46
|
-
? `Create "${
|
|
47
|
-
:
|
|
46
|
+
? `Create "${itemText}"`
|
|
47
|
+
: itemText
|
|
48
48
|
: undefined;
|
|
49
49
|
const label = isUncreatedCreatable ? `Create "${item.label}"` : item.label;
|
|
50
50
|
const itemLabel = renderItemLabel ? (renderItemLabel(label, item)) : ((0, jsx_runtime_1.jsx)("span", { className: "twa:min-w-0 twa:flex-1 twa:truncate", children: label }));
|
|
51
51
|
const itemContent = isUncreatedCreatable ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.PlusIcon, {}), itemLabel] })) : (itemLabel);
|
|
52
|
-
const itemElement = ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxItem, { index: virtualItem.index, "data-index": virtualItem.index, ref: virtualizer.measureElement, value: item, renderCheckboxIndicator: renderCheckboxIndicator, "aria-setsize": filteredItems.length, "aria-posinset": virtualItem.index + 1, style: {
|
|
52
|
+
const itemElement = ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxItem, { index: virtualItem.index, "data-index": virtualItem.index, ref: virtualizer.measureElement, value: item, renderCheckboxIndicator: renderCheckboxIndicator, "aria-setsize": filteredItems.length, "aria-posinset": virtualItem.index + 1, "aria-label": itemText ?? undefined, style: {
|
|
53
53
|
position: 'absolute',
|
|
54
54
|
left: `var(--ab-base-space)`,
|
|
55
55
|
right: `var(--ab-base-space)`,
|
|
@@ -9,7 +9,9 @@ export type ComboboxItemType = {
|
|
|
9
9
|
value: any;
|
|
10
10
|
disabled?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export declare function getItemTextLabel<T extends ComboboxItemType>(item: T
|
|
12
|
+
export declare function getItemTextLabel<T extends ComboboxItemType>(item: T & {
|
|
13
|
+
tooltip?: string;
|
|
14
|
+
}): string;
|
|
13
15
|
export type ComboboxGroupType<T extends ComboboxItemType> = {
|
|
14
16
|
label: React.ReactNode;
|
|
15
17
|
items: T[];
|
|
@@ -45,6 +47,7 @@ export type ComboboxCommonProps<T extends ComboboxItemType> = {
|
|
|
45
47
|
renderItemLabel?: (defaultLabel: React.ReactNode, item: T) => React.ReactNode;
|
|
46
48
|
multiple?: boolean;
|
|
47
49
|
showClear?: boolean;
|
|
50
|
+
clearOnEscape?: boolean;
|
|
48
51
|
searchable?: boolean | 'inline' | 'menulist';
|
|
49
52
|
/**
|
|
50
53
|
* Custom filter function, or `null` to disable built-in filtering
|
|
@@ -12,6 +12,8 @@ function getItemTextLabel(item) {
|
|
|
12
12
|
return item.label;
|
|
13
13
|
if (typeof item.label === 'number')
|
|
14
14
|
return String(item.label);
|
|
15
|
+
if (typeof item.tooltip === 'string')
|
|
16
|
+
return String(item.tooltip);
|
|
15
17
|
return String(item.value);
|
|
16
18
|
}
|
|
17
19
|
function valueToItem(stringValue, lookup) {
|
|
@@ -35,4 +35,5 @@ export declare const MultiCombobox: <T extends ComboboxItemType>(props: MultiCom
|
|
|
35
35
|
export type GridFilterComboboxProps<T extends ComboboxItemType> = Omit<MultiComboboxProps<T>, 'showSelectAllCheckbox' | 'searchable' | 'renderInput' | 'renderInputValues'> & {
|
|
36
36
|
showSelectedCount?: boolean;
|
|
37
37
|
};
|
|
38
|
+
export declare const GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME: string;
|
|
38
39
|
export declare const GridFilterCombobox: <T extends ComboboxItemType>(props: GridFilterComboboxProps<T>) => React.JSX.Element;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.GridFilterCombobox = exports.MultiCombobox = exports.SingleCombobox = void 0;
|
|
3
|
+
exports.GridFilterCombobox = exports.GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME = exports.MultiCombobox = exports.SingleCombobox = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
@@ -35,9 +35,13 @@ const AdaptableComboboxList = (props) => {
|
|
|
35
35
|
const label = isUncreatedCreatable ? `Create "${item.label}"` : item.label;
|
|
36
36
|
const itemLabel = props.renderItemLabel ? props.renderItemLabel(label, item) : label;
|
|
37
37
|
const itemContent = isUncreatedCreatable ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(lucide_react_1.PlusIcon, {}), " ", itemLabel] })) : (itemLabel);
|
|
38
|
-
const
|
|
39
|
-
const tooltipText =
|
|
40
|
-
|
|
38
|
+
const itemText = (0, comboboxUtils_1.getItemTextLabel)(item);
|
|
39
|
+
const tooltipText = props.showItemTooltip && itemText != null
|
|
40
|
+
? isUncreatedCreatable
|
|
41
|
+
? `Create "${itemText}"`
|
|
42
|
+
: itemText
|
|
43
|
+
: undefined;
|
|
44
|
+
const itemElement = ((0, jsx_runtime_1.jsx)(combobox_1.ComboboxItem, { value: item, "aria-label": itemText ?? undefined, className: 'ab-Combobox-Row', disabled: item.disabled, renderCheckboxIndicator: props.renderCheckboxIndicator, children: itemContent }, item.value));
|
|
41
45
|
if (tooltipText != null) {
|
|
42
46
|
return ((0, jsx_runtime_1.jsxs)(tooltip_1.Tooltip, { children: [(0, jsx_runtime_1.jsx)(tooltip_1.TooltipTrigger, { render: itemElement, children: itemContent }), (0, jsx_runtime_1.jsx)(tooltip_1.TooltipContent, { side: "right", children: tooltipText })] }, item.value));
|
|
43
47
|
}
|
|
@@ -93,9 +97,15 @@ const AdaptableCombobox_Root = (props) => {
|
|
|
93
97
|
const internalDefaultValue = props.multiple
|
|
94
98
|
? (0, comboboxUtils_1.valueToItems)(props.defaultValue, itemByValue)
|
|
95
99
|
: (0, comboboxUtils_1.valueToItem)(props.defaultValue, itemByValue);
|
|
96
|
-
const handleValueChange = (next) => {
|
|
100
|
+
const handleValueChange = (next, eventDetails) => {
|
|
97
101
|
if (!props.onValueChange)
|
|
98
102
|
return;
|
|
103
|
+
// base-ui clears the selected value when Escape is pressed
|
|
104
|
+
// we only want to allow this if the clearOnEscape prop is true
|
|
105
|
+
if (eventDetails?.reason === 'escape-key' && !props.clearOnEscape) {
|
|
106
|
+
eventDetails.cancel?.();
|
|
107
|
+
return;
|
|
108
|
+
}
|
|
99
109
|
if (Array.isArray(next)) {
|
|
100
110
|
props.onValueChange((0, comboboxUtils_1.toStringValues)(next), next);
|
|
101
111
|
}
|
|
@@ -103,6 +113,15 @@ const AdaptableCombobox_Root = (props) => {
|
|
|
103
113
|
props.onValueChange((0, comboboxUtils_1.toStringValue)(next), next);
|
|
104
114
|
}
|
|
105
115
|
};
|
|
116
|
+
const handleInputValueChange = (next, eventDetails) => {
|
|
117
|
+
// base-ui blanks the input text (and then the selected value) when Escape is pressed
|
|
118
|
+
// we only want to allow this if the clearOnEscape prop is true
|
|
119
|
+
if (eventDetails?.reason === 'escape-key' && !props.clearOnEscape) {
|
|
120
|
+
eventDetails.cancel?.();
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
props.onInputValueChange?.(next);
|
|
124
|
+
};
|
|
106
125
|
let comboboxItems = props.groups ?? props.items;
|
|
107
126
|
if (props.isCreatable && allItems[allItems.length - 1]?.creatable) {
|
|
108
127
|
// let's detect all "creatable" items and add them to the combobox items
|
|
@@ -118,7 +137,7 @@ const AdaptableCombobox_Root = (props) => {
|
|
|
118
137
|
}
|
|
119
138
|
comboboxItems = [...comboboxItems, ...creatableItems];
|
|
120
139
|
}
|
|
121
|
-
return ((0, jsx_runtime_1.jsx)(combobox_1.Combobox, { ...props, items: comboboxItems, isItemEqualToValue: isItemEqualToValue, itemToStringLabel: comboboxUtils_1.getItemTextLabel, value: internalValue, defaultValue: internalDefaultValue, onValueChange: handleValueChange, "aria-label": props.ariaLabel || props['aria-label'], "data-name": props['data-name'], disabled: props.disabled, open: props.open, onOpenChange: props.onOpenChange, multiple: props.multiple, filter: props.filter, autoHighlight: true, children: props.children }));
|
|
140
|
+
return ((0, jsx_runtime_1.jsx)(combobox_1.Combobox, { ...props, items: comboboxItems, isItemEqualToValue: isItemEqualToValue, itemToStringLabel: comboboxUtils_1.getItemTextLabel, value: internalValue, defaultValue: internalDefaultValue, onValueChange: handleValueChange, onInputValueChange: handleInputValueChange, "aria-label": props.ariaLabel || props['aria-label'], "data-name": props['data-name'], disabled: props.disabled, open: props.open, onOpenChange: props.onOpenChange, multiple: props.multiple, filter: props.filter, autoHighlight: true, children: props.children }));
|
|
122
141
|
};
|
|
123
142
|
const useGetAllItems = (props) => {
|
|
124
143
|
const allItems = props.groups
|
|
@@ -501,6 +520,16 @@ const MultiCombobox = (props) => {
|
|
|
501
520
|
return searchable === 'menulist' ? ((0, jsx_runtime_1.jsx)(MultiCombobox_MenuListSearchable, { renderInput: false, ...props, multiple: true, open: open, onOpenChange: onOpenChange, searchable: searchable, showItemTooltip: showItemTooltip })) : ((0, jsx_runtime_1.jsx)(MultiCombobox_SimpleSearchable, { ...props, open: open, multiple: true, onOpenChange: onOpenChange, searchable: searchable, showItemTooltip: showItemTooltip }));
|
|
502
521
|
};
|
|
503
522
|
exports.MultiCombobox = MultiCombobox;
|
|
523
|
+
exports.GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME = (0, utils_1.cn)(
|
|
524
|
+
// remove the border/shadow and position it properly
|
|
525
|
+
// to adjust for outline on the input
|
|
526
|
+
'twa:[.ab-FloatingFilter_&]:border-none twa:[.ab-FloatingFilter_&]:inset-y-0.5 twa:[.ab-FloatingFilter_&]:inset-x-0 twa:[.ab-FloatingFilter_&]:absolute twa:[.ab-FloatingFilter_&]:shadow-none twa:[.ab-FloatingFilter_&]:min-h-auto!',
|
|
527
|
+
// more adjustments for very compact ag grid themes
|
|
528
|
+
'twa:[.ab-FloatingFilter_&]:[line-height:1]', 'twa:[.ab-FloatingFilter_[data-slot=combobox-trigger]]:py-0',
|
|
529
|
+
// also for very compact ag grid themes
|
|
530
|
+
// make the floating-filter combobox a size container so the toggle can
|
|
531
|
+
// shrink purely via CSS when the control is small in height (see ColumnFilter/base.css)
|
|
532
|
+
'twa:[.ab-FloatingFilter_&]:[container-type:size]');
|
|
504
533
|
const GridFilterCombobox = (props) => {
|
|
505
534
|
const { showSelectedCount = false, placeholder = 'Select...', ...comboboxProps } = props;
|
|
506
535
|
const sharedProps = {
|
|
@@ -520,16 +549,7 @@ const GridFilterCombobox = (props) => {
|
|
|
520
549
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)("div", { className: "twa:text-ellipsis twa:overflow-hidden twa:whitespace-nowrap twa:flex-1000", "data-slot": "combobox-selected-values", children: [showSelectedCount && items.length > 0 && ((0, jsx_runtime_1.jsxs)("span", { "data-name": "multiple-values-count", className: "twa:mr-0.5", children: ["(", items.length, ")"] })), children] }) }));
|
|
521
550
|
},
|
|
522
551
|
};
|
|
523
|
-
const className = (0, utils_1.cn)(
|
|
524
|
-
// remove the border/shadow and position it properly
|
|
525
|
-
// to adjust for outline on the input
|
|
526
|
-
'twa:[.ab-FloatingFilter_&]:border-none twa:[.ab-FloatingFilter_&]:inset-y-0.5 twa:[.ab-FloatingFilter_&]:inset-x-0 twa:[.ab-FloatingFilter_&]:absolute twa:[.ab-FloatingFilter_&]:shadow-none twa:[.ab-FloatingFilter_&]:min-h-auto!',
|
|
527
|
-
// more adjustments for very compact ag grid themes
|
|
528
|
-
'twa:[.ab-FloatingFilter_&]:[line-height:1]', 'twa:[.ab-FloatingFilter_[data-slot=combobox-trigger]]:py-0',
|
|
529
|
-
// also for very compact ag grid themes
|
|
530
|
-
// make the floating-filter combobox a size container so the toggle can
|
|
531
|
-
// shrink purely via CSS when the control is small in height (see ColumnFilter/base.css)
|
|
532
|
-
'twa:[.ab-FloatingFilter_&]:[container-type:size]', comboboxProps.className);
|
|
552
|
+
const className = (0, utils_1.cn)(exports.GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME, comboboxProps.className);
|
|
533
553
|
const mergedProps = {
|
|
534
554
|
...sharedProps,
|
|
535
555
|
...comboboxProps,
|
|
@@ -23,6 +23,6 @@ function UnusedItem({ unusedItem, disabled }) {
|
|
|
23
23
|
const title = currentItem ? currentItem.Title : unusedItem;
|
|
24
24
|
return ((0, jsx_runtime_1.jsx)(dnd_1.DragList.DraggableItem, { id: unusedItem, children: (itemDomProps) => {
|
|
25
25
|
const { onPointerDown, ...restDomProps } = itemDomProps;
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: (0, clsx_1.default)('twa:rounded-md twa:text-sm twa:text-
|
|
26
|
+
return ((0, jsx_runtime_1.jsx)("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: (0, clsx_1.default)('twa:rounded-md twa:text-sm twa:text-primary-foreground twa:p-2 twa:select-none', 'twa:bg-primary', restDomProps.className), children: title }));
|
|
27
27
|
} }));
|
|
28
28
|
}
|
|
@@ -155,7 +155,7 @@ const FunctionsDropdown = ({ expressionFunctions, baseClassName }) => {
|
|
|
155
155
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { onMouseEnter: () => setOverFunction(functionName), onClick: () => hidePopup(), children: functionName === 'VAR' ? ((0, jsx_runtime_1.jsx)(VarEditorButton, { className: buttonClassName }, functionName)) : ((0, jsx_runtime_1.jsx)(EditorButton_1.default, { data: getEditorButtonData(functionName), className: buttonClassName, children: functionName }, functionName)) }, functionName));
|
|
156
156
|
})
|
|
157
157
|
.filter(Boolean);
|
|
158
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-
|
|
158
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, clsx_1.default)('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-primary-foreground twa:w-full", children: StringExtensions_1.default.Humanize(groupName) }), fns] }, groupName));
|
|
159
159
|
}) })] }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: (0, clsx_1.default)(`${baseClassName}__dropdown-functions-description `, `twa:flex-1 twa:p-2 twa:w-[600px] twa:max-w-[60vw]`, `twa:rounded-standard twa:shadow-sm twa:overflow-auto twa:h-auto`, 'twa:bg-primarylight twa:text-primary-foreground'), children: overFunction ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:bg-accent twa:text-accent-foreground", children: overFunction }), (0, jsx_runtime_1.jsx)(ExpressionFunctionDocumentation_1.ExpressionFunctionDocumentation, { expressionFunction: expressionFunctions[overFunction] })] })) : ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:size-full twa:items-center twa:justify-center twa:text-2 twa:italic", children: (0, jsx_runtime_1.jsxs)("ul", { children: [(0, jsx_runtime_1.jsxs)("li", { children: ["Hover over a Function to learn more", (0, jsx_runtime_1.jsx)("br", {}), (0, jsx_runtime_1.jsx)("br", {})] }), (0, jsx_runtime_1.jsx)("li", { children: "Click a Function to add it to the Expression in the Editor" })] }) })) })] })] })), children: (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { "data-name": "expression-dropdown", icon: "arrow-down", iconPosition: 'end', className: "twa:mr-1", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:mr-1 twa:text-2", children: (0, jsx_runtime_1.jsx)(icons_1.Icon, { name: "equation" }) }) }) }));
|
|
160
160
|
};
|
|
161
161
|
function BaseEditorInput(props) {
|
|
@@ -4,7 +4,7 @@ exports.ExpressionFunctionDocumentation = void 0;
|
|
|
4
4
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
5
|
const Tag_1 = require("../Tag");
|
|
6
6
|
const Flex_1 = require("../Flex");
|
|
7
|
-
const signatureClassName = 'twa:m-0 twa:whitespace-pre-wrap twa:bg-primary twa:text-
|
|
7
|
+
const signatureClassName = 'twa:m-0 twa:whitespace-pre-wrap twa:bg-primary twa:text-primary-foreground twa:rounded-standard twa:p-1 twa:inline-block';
|
|
8
8
|
const ExpressionFunctionDocumentation = (props) => {
|
|
9
9
|
return props.expressionFunction ? ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation", className: "twa:my-2 twa:p-2 twa:rounded-standard twa:leading-normal", children: [props.expressionFunction.description && ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mb-3 twa:font-bold twa:whitespace-pre-wrap", "data-name": "expression-editor-documentation-description", children: props.expressionFunction.description })), props.expressionFunction.signatures && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation-signatures", children: [(0, jsx_runtime_1.jsx)("b", { children: "Signatures" }), (0, jsx_runtime_1.jsx)("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.signatures.map((signature, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("pre", { className: signatureClassName, children: signature }) }, index))) })] })), props.expressionFunction.examples && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation-examples", children: [(0, jsx_runtime_1.jsx)("b", { children: "Examples" }), (0, jsx_runtime_1.jsx)("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.examples.map((example, index) => ((0, jsx_runtime_1.jsx)("li", { children: (0, jsx_runtime_1.jsx)("pre", { className: signatureClassName, children: example }) }, index))) })] })), props.expressionFunction.returnType && ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { "data-name": "expression-editor-documentation-examples", children: [(0, jsx_runtime_1.jsx)("b", { children: "Return Type" }), (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:bg-accentlight twa:text-accent twa:ml-3 twa:rounded-full twa:py-1", children: props.expressionFunction.returnType })] }))] })) : null;
|
|
10
10
|
};
|
|
@@ -23,7 +23,7 @@ const Body = ({ children, bodyScroll, variant, className, style, }) => {
|
|
|
23
23
|
bodyScroll = 'auto';
|
|
24
24
|
}
|
|
25
25
|
const bodyCls = (0, clsx_1.default)(DEFAULT_BODY_CLS, `${exports.baseClassName}__body`, variant && `${exports.baseClassName}__body--variant-${variant}`, bodyScroll ? `twa:overflow-auto` : null, {
|
|
26
|
-
'twa:bg-primarylight twa:text-
|
|
26
|
+
'twa:bg-primarylight twa:text-primary-foreground twa:border-0': variant === 'modern',
|
|
27
27
|
}, className);
|
|
28
28
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { style: style, className: bodyCls, children: children }));
|
|
29
29
|
};
|
|
@@ -82,11 +82,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
82
82
|
'twa:*:z-1',
|
|
83
83
|
// all svgs inside should be aligned middle
|
|
84
84
|
'twa:[&_svg]:align-middle',
|
|
85
|
-
// 'twa:text-
|
|
85
|
+
// 'twa:text-primary-foreground',
|
|
86
86
|
// the text variant has the background applied on the before pseudo element
|
|
87
87
|
// so let's configure the before pseudo element for all buttons here
|
|
88
88
|
'twa:before:content-[""] twa:before:absolute twa:before:inset-0 twa:before:block', 'twa:before:z-0 twa:before:pointer-events-none twa:before:rounded-[inherit]', 'twa:outline-none twa:focus-visible:border-ring twa:focus-visible:ring-3 twa:focus-visible:ring-ring/50', disabled ? `${exports.baseClassName}--disabled` : '', `${exports.baseClassName}--variant-${variant}`, `${exports.baseClassName}--tone-${tone}`, 'twa:transition-opacity twa:duration-200', {
|
|
89
|
-
'twa:text-
|
|
89
|
+
'twa:text-primary-foreground': tone == 'neutral',
|
|
90
90
|
'twa:text-inherit': tone === 'none',
|
|
91
91
|
'twa:text-success': tone === 'success',
|
|
92
92
|
'twa:text-accent': tone === 'accent',
|
|
@@ -99,11 +99,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
99
99
|
? 'twa:bg-background twa:border-input-border twa:border'
|
|
100
100
|
: '', variant === 'raised'
|
|
101
101
|
? {
|
|
102
|
-
'twa:text-
|
|
102
|
+
'twa:text-primary-foreground twa:shadow-(--ab-cmp-simple-button__box-shadow) twa:hover:not-disabled:shadow-(--ab-cmp-simple-button__hover-box-shadow) twa:transition-(--ab-cmp-simple-button__transition) twa:duration-200 twa:focus:shadow-(--ab-focus__box-shadow)': true,
|
|
103
103
|
'twa:bg-success twa:text-text-on-success': tone == 'success',
|
|
104
104
|
'twa:bg-accent twa:text-accent-foreground': tone == 'accent',
|
|
105
105
|
'twa:bg-transparent': tone == 'none',
|
|
106
|
-
'twa:bg-primary twa:text-
|
|
106
|
+
'twa:bg-primary twa:text-primary-foreground': tone == 'neutral',
|
|
107
107
|
'twa:bg-error twa:text-text-on-error': tone == 'error',
|
|
108
108
|
'twa:bg-warn twa:text-text-on-warn': tone == 'warning',
|
|
109
109
|
'twa:bg-info twa:text-text-on-info': tone == 'info',
|
|
@@ -44,7 +44,7 @@ const Toggle = ({ onPressedChange, pressed, icon, children, ...rest }) => {
|
|
|
44
44
|
// backgrounds
|
|
45
45
|
{
|
|
46
46
|
'twa:text-inherit twa:bg-transparent': !pressed,
|
|
47
|
-
'twa:hover:bg-primarylight twa:hover:text-
|
|
47
|
+
'twa:hover:bg-primarylight twa:hover:text-primary-foreground': !pressed,
|
|
48
48
|
[`${baseClassName}--pressed`]: pressed,
|
|
49
49
|
'twa:bg-accent twa:hover:bg-accent/90 twa:text-accent-foreground': pressed,
|
|
50
50
|
}, {
|
|
@@ -24,7 +24,7 @@ const ToggleGroup = (props) => {
|
|
|
24
24
|
activeIndex: index,
|
|
25
25
|
}));
|
|
26
26
|
}, []);
|
|
27
|
-
return ((0, jsx_runtime_1.jsx)(exports.ToggleGroupContext.Provider, { value: context, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ref: ref, tabIndex: 0, className: (0, clsx_1.default)('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-
|
|
27
|
+
return ((0, jsx_runtime_1.jsx)(exports.ToggleGroupContext.Provider, { value: context, children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { ref: ref, tabIndex: 0, className: (0, clsx_1.default)('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-primary-foreground', 'twa:rounded-standard twa:overflow-hidden', 'twa:inline-flex twa:w-fit', 'twa:focus:outline-0',
|
|
28
28
|
// make the shadow of child Toggle buttons invisible when the group is not focused
|
|
29
29
|
'twa:not-focus-within:[--ab-focus-light__box-shadow:none]', 'twa:not-focus-within:[--ab-focus__box-shadow:none]'), onMouseDown: (event) => {
|
|
30
30
|
const index = context.toggleButtons.findIndex((btn) => (0, contains_1.default)(btn.node, event.target));
|
|
@@ -523,10 +523,6 @@ function GridFilterTreeDropdown(props) {
|
|
|
523
523
|
}
|
|
524
524
|
return ((0, jsx_runtime_1.jsxs)("div", { className: "twa:text-ellipsis twa:overflow-hidden twa:whitespace-nowrap twa:flex-1000", "data-slot": "combobox-selected-values", children: [showSelectedCount && selectedLeafPaths.length > 0 && ((0, jsx_runtime_1.jsxs)("span", { "data-name": "multiple-values-count", className: "twa:mr-0.5", children: ["(", selectedLeafPaths.length, ")"] })), children] }));
|
|
525
525
|
}, [placeholder, showSelectedCount]);
|
|
526
|
-
const mergedClassName = (0, utils_1.cn)(
|
|
527
|
-
// Match the restyling GridFilterCombobox uses: remove the field border,
|
|
528
|
-
// flatten the shadow and absolutely position so the component fits the
|
|
529
|
-
// grid's floating-filter input box.
|
|
530
|
-
'twa:[.ab-FloatingFilter_&]:border-none twa:[.ab-FloatingFilter_&]:inset-y-0.5 twa:[.ab-FloatingFilter_&]:inset-x-0 twa:[.ab-FloatingFilter_&]:absolute twa:[.ab-FloatingFilter_&]:shadow-none twa:[.ab-FloatingFilter_&]:min-h-auto!', className);
|
|
526
|
+
const mergedClassName = (0, utils_1.cn)(Combobox_1.GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME, className);
|
|
531
527
|
return ((0, jsx_runtime_1.jsx)(TreeDropdown, { ...rest, placeholder: placeholder, className: mergedClassName, showClear: rest.showClear ?? false, resizable: rest.resizable ?? true, renderSelectedValues: renderSelectedValues }));
|
|
532
528
|
}
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
NEXT_PUBLIC_INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "23.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1781098713794 || Date.now(),
|
|
6
|
+
VERSION: "23.0.0-canary.5" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ColumnSizingMap, LayoutRowSelection, RowGroupDisplayType } from '../../AdaptableState/LayoutState';
|
|
1
|
+
import { ColumnSizingMap, LayoutOpenChart, LayoutRowSelection, RowGroupDisplayType } from '../../AdaptableState/LayoutState';
|
|
2
2
|
import { XOR } from '../../Utilities/Extensions/TypeExtensions';
|
|
3
3
|
/**
|
|
4
4
|
* Defines how a Column is sorted
|
|
@@ -53,6 +53,10 @@ export interface BaseLayoutModel {
|
|
|
53
53
|
Ignore_AdaptableVersion?: string;
|
|
54
54
|
Ignore_Uuid?: string;
|
|
55
55
|
Ignore_Metadata?: any;
|
|
56
|
+
/**
|
|
57
|
+
* AG Grid charts to open when this layout is selected (not used by LayoutManager)
|
|
58
|
+
*/
|
|
59
|
+
Ignore_OpenCharts?: LayoutOpenChart[];
|
|
56
60
|
/**
|
|
57
61
|
* The Layout Name
|
|
58
62
|
*/
|
|
@@ -13,7 +13,6 @@ const destructurePivotColumnId_1 = require("./destructurePivotColumnId");
|
|
|
13
13
|
const isPivotAggTotalColumn_1 = require("./isPivotAggTotalColumn");
|
|
14
14
|
const isPivotGrandTotal_1 = require("./isPivotGrandTotal");
|
|
15
15
|
const isPivotColumnTotal_1 = require("./isPivotColumnTotal");
|
|
16
|
-
const ParameterizedAggregationRegistry_1 = require("../../Aggregation/ParameterizedAggregationRegistry");
|
|
17
16
|
const devTools_1 = require("../../devTools");
|
|
18
17
|
exports.PIVOT_ANY_TOTAL_COL_TYPE = 'pivotAnyTotal';
|
|
19
18
|
exports.PIVOT_GRAND_TOTAL_COL_TYPE = 'pivotGrandTotal';
|
|
@@ -526,24 +525,18 @@ class LayoutManager extends LMEmitter_1.LMEmitter {
|
|
|
526
525
|
});
|
|
527
526
|
}
|
|
528
527
|
if (gridState.aggregation) {
|
|
529
|
-
TableAggregationColumns = gridState.aggregation.aggregationModel
|
|
530
|
-
.map((agg) => {
|
|
528
|
+
TableAggregationColumns = gridState.aggregation.aggregationModel.map((agg) => {
|
|
531
529
|
const prevAggForColumn = prevAggColumnsMap?.[agg.colId];
|
|
532
530
|
if (prevAggForColumn && prevAggForColumn.AggFunc.aggFunc === agg.aggFunc) {
|
|
533
531
|
return prevAggForColumn;
|
|
534
532
|
}
|
|
535
|
-
// Parameterized aggs require layout metadata (e.g. weight column); ignore incomplete picks.
|
|
536
|
-
if ((0, ParameterizedAggregationRegistry_1.isParameterizedAggFuncName)(agg.aggFunc)) {
|
|
537
|
-
return prevAggForColumn ?? null;
|
|
538
|
-
}
|
|
539
533
|
return {
|
|
540
534
|
ColumnId: agg.colId,
|
|
541
535
|
AggFunc: {
|
|
542
536
|
aggFunc: agg.aggFunc,
|
|
543
537
|
},
|
|
544
538
|
};
|
|
545
|
-
})
|
|
546
|
-
.filter(Boolean);
|
|
539
|
+
});
|
|
547
540
|
}
|
|
548
541
|
// if there's a current layout set
|
|
549
542
|
// we want to only return the AG Grid columns that are also in the current layout
|