@adaptabletools/adaptable 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 +31 -0
- package/src/AdaptableState/Common/AggregationColumns.d.ts +14 -6
- package/src/AdaptableState/Common/AggregationColumns.js +27 -2
- 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 +4 -10
- 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 +1 -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 +29 -7
- 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 +14 -7
- package/src/Strategy/LayoutModule.js +13 -8
- package/src/Strategy/StyledColumnModule.js +64 -36
- 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 +65 -0
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +23 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +204 -0
- package/src/Utilities/Helpers/ThemeHelpers.d.ts +5 -0
- package/src/Utilities/Helpers/ThemeHelpers.js +38 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +19 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +143 -0
- package/src/Utilities/ObjectFactory.d.ts +1 -3
- package/src/Utilities/ObjectFactory.js +0 -8
- 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 +115 -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 +114 -103
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +13 -14
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +55 -55
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +3 -2
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +31 -39
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +3 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +9 -13
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +30 -17
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -9
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +3 -3
- 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 +21 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.d.ts +1 -0
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +10 -7
- 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 +0 -1
- 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 +6 -4
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadTextSection.js +3 -2
- package/src/View/DataImport/DataImportWizard/sections/ValidationSection.js +5 -15
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +24 -26
- package/src/View/Export/Wizard/ReportNameWizardSection.js +10 -13
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +20 -22
- package/src/View/Export/Wizard/ScheduledReportSettings.d.ts +2 -0
- package/src/View/Export/Wizard/ScheduledReportSettings.js +13 -13
- package/src/View/Export/Wizard/ScheduledReportWizard.js +4 -5
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +8 -6
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +24 -23
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +20 -11
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +21 -5
- 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 +117 -12
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.d.ts +15 -0
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +66 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +4 -0
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +30 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +13 -8
- 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 +62 -13
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +5 -3
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.d.ts +2 -0
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +15 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.d.ts +10 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnDefinitionWizardSection.js +53 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +2 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +33 -68
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +15 -11
- 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 +115 -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 +11 -11
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +1 -2
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +101 -52
- 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 +4 -5
- 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 +9 -14
- 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 +43 -13
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +11 -18
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +2 -6
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +6 -22
- 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 +11 -18
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +17 -6
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +3 -3
- package/src/View/Shortcut/shortcutOperations.d.ts +3 -0
- package/src/View/Shortcut/shortcutOperations.js +28 -0
- package/src/View/SpecialColumnSettingsWizardStep.js +9 -8
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +24 -15
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +10 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +96 -16
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +14 -0
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +45 -24
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.d.ts +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +108 -33
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +21 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +121 -23
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +34 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +86 -12
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +121 -34
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +55 -75
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.js +16 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +4 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +5 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +12 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.js +16 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.d.ts +3 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +31 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +58 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview.js +30 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +91 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +52 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +53 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +18 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +58 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.d.ts +10 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +126 -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 +52 -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 +7 -21
- package/src/View/renderWithAdaptableContext.js +2 -3
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -1
- package/src/agGrid/AdaptableAgGrid.js +38 -43
- 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 +111 -0
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +6 -0
- package/src/agGrid/cellRenderers/IconRenderer.js +43 -15
- package/src/agGrid/createAgGridIcon.d.ts +10 -0
- package/src/agGrid/createAgGridIcon.js +16 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +11 -6
- 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 +35 -15
- 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 +2 -6
- 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.esm.tsbuildinfo +1 -1
- package/src/AdaptableState/Common/FilterActionOnDataChange.d.ts +0 -17
- package/src/AdaptableState/Common/FilterActionOnDataChange.js +0 -4
- package/src/Aggregation/ParameterizedAggregationRegistry.d.ts +0 -35
- package/src/Aggregation/ParameterizedAggregationRegistry.js +0 -63
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.d.ts +0 -3
- package/src/Aggregation/definitions/weightedAverageAggregationDefinition.js +0 -55
- package/src/Aggregation/parameterizedAggregationColumnMenu.d.ts +0 -8
- package/src/Aggregation/parameterizedAggregationColumnMenu.js +0 -137
- package/src/Aggregation/parameterizedAggregationHeader.d.ts +0 -13
- package/src/Aggregation/parameterizedAggregationHeader.js +0 -60
- package/src/Aggregation/parameterizedAggregationHelpers.d.ts +0 -23
- package/src/Aggregation/parameterizedAggregationHelpers.js +0 -111
- package/src/Aggregation/parameterizedAggregationWizardHelpers.d.ts +0 -9
- package/src/Aggregation/parameterizedAggregationWizardHelpers.js +0 -66
- package/src/Aggregation/validateParameterizedAggregations.d.ts +0 -4
- package/src/Aggregation/validateParameterizedAggregations.js +0 -20
- package/src/View/AdaptableComputedCSSVarsContext.d.ts +0 -12
- package/src/View/AdaptableComputedCSSVarsContext.js +0 -29
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.d.ts +0 -12
- package/src/View/Layout/Wizard/sections/ParameterizedAggFuncPicker.js +0 -43
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.d.ts +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgeSettings.js +0 -28
- package/src/View/Theme/VariantSelector.d.ts +0 -8
- package/src/View/Theme/VariantSelector.js +0 -20
- package/src/components/Select/CSSNumericVariableWatch.d.ts +0 -11
- package/src/components/Select/CSSNumericVariableWatch.js +0 -45
|
@@ -8,6 +8,25 @@ import { isUnsupportedColumnDataTypeForIconStyle } from '../../Utilities/Helpers
|
|
|
8
8
|
import { errorOnce } from '../AdaptableLogger';
|
|
9
9
|
const DEFAULT_SIZE = 18;
|
|
10
10
|
const DEFAULT_GAP = 4;
|
|
11
|
+
const normaliseIconMappingKey = (key, matchMode) => {
|
|
12
|
+
if (typeof key === 'string' && matchMode === 'CaseInsensitive') {
|
|
13
|
+
return key.toLowerCase();
|
|
14
|
+
}
|
|
15
|
+
return key;
|
|
16
|
+
};
|
|
17
|
+
const resolveIconStyleMappingParts = (iconStyle) => {
|
|
18
|
+
const presetMappings = iconStyle.Preset
|
|
19
|
+
? getIconStylePresetMappings(iconStyle.Preset)
|
|
20
|
+
: [];
|
|
21
|
+
const userMappings = iconStyle.Mappings ?? [];
|
|
22
|
+
if (presetMappings.length === 0 || userMappings.length === 0) {
|
|
23
|
+
return { presetMappings, userMappings };
|
|
24
|
+
}
|
|
25
|
+
const matchMode = iconStyle.MatchMode ?? 'Exact';
|
|
26
|
+
const overrideKeys = new Set(userMappings.map((m) => normaliseIconMappingKey(m.Key, matchMode)));
|
|
27
|
+
const filteredPreset = presetMappings.filter((p) => !overrideKeys.has(normaliseIconMappingKey(p.Key, matchMode)));
|
|
28
|
+
return { presetMappings: filteredPreset, userMappings };
|
|
29
|
+
};
|
|
11
30
|
/**
|
|
12
31
|
* Resolve the **effective** mapping list for an `IconStyle`:
|
|
13
32
|
*
|
|
@@ -27,24 +46,33 @@ const DEFAULT_GAP = 4;
|
|
|
27
46
|
export const resolveEffectiveIconStyleMappings = (iconStyle) => {
|
|
28
47
|
if (!iconStyle)
|
|
29
48
|
return [];
|
|
30
|
-
const presetMappings = iconStyle
|
|
31
|
-
? getIconStylePresetMappings(iconStyle.Preset)
|
|
32
|
-
: [];
|
|
33
|
-
const userMappings = iconStyle.Mappings ?? [];
|
|
49
|
+
const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
|
|
34
50
|
if (presetMappings.length === 0)
|
|
35
51
|
return userMappings;
|
|
36
|
-
if (userMappings.length === 0)
|
|
37
|
-
return
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
52
|
+
if (userMappings.length === 0) {
|
|
53
|
+
return iconStyle.Preset ? getIconStylePresetMappings(iconStyle.Preset) : [];
|
|
54
|
+
}
|
|
55
|
+
return [...presetMappings, ...userMappings];
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Mapping list for wizard / settings summaries: custom mappings first so
|
|
59
|
+
* user-authored entries are always visible, then any remaining preset
|
|
60
|
+
* entries (after override filtering).
|
|
61
|
+
*/
|
|
62
|
+
export const resolveIconStyleMappingsForSummaryPreview = (iconStyle) => {
|
|
63
|
+
if (!iconStyle)
|
|
64
|
+
return [];
|
|
65
|
+
const { presetMappings, userMappings } = resolveIconStyleMappingParts(iconStyle);
|
|
66
|
+
if (userMappings.length === 0) {
|
|
67
|
+
if (presetMappings.length > 0) {
|
|
68
|
+
return presetMappings;
|
|
42
69
|
}
|
|
43
|
-
return
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
70
|
+
return iconStyle.Preset ? getIconStylePresetMappings(iconStyle.Preset) : [];
|
|
71
|
+
}
|
|
72
|
+
if (presetMappings.length === 0) {
|
|
73
|
+
return userMappings;
|
|
74
|
+
}
|
|
75
|
+
return [...userMappings, ...presetMappings];
|
|
48
76
|
};
|
|
49
77
|
/**
|
|
50
78
|
* Look up `cellValue` in the mapping list using the configured match mode.
|
|
@@ -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,16 @@
|
|
|
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 function createAgGridIcon(name) {
|
|
11
|
+
const element = document.createElement('span');
|
|
12
|
+
element.className = `ag-icon ag-icon-${name}`;
|
|
13
|
+
element.setAttribute('role', 'presentation');
|
|
14
|
+
element.setAttribute('unselectable', 'on');
|
|
15
|
+
return element;
|
|
16
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { flattenAdaptableFormFields, isAdaptableFormFieldDisabled, isAdaptableFormFieldGroup, isAdaptableFormFieldGroupHidden, isAdaptableFormFieldHidden, validateAdaptableForm, } from '../../AdaptableState/Common/AdaptableForm';
|
|
3
|
+
import { flattenAdaptableFormFields, isAdaptableFormFieldDisabled, isAdaptableFormFieldGroup, isAdaptableFormFieldGroupHidden, isAdaptableFormFieldHidden, resolveSelectPlaceholder, resolveSelectValueAfterClear, validateAdaptableForm, } from '../../AdaptableState/Common/AdaptableForm';
|
|
4
4
|
import FormLayout, { FormRow } from '../FormLayout';
|
|
5
5
|
import Input from '../Input';
|
|
6
6
|
import { AdaptableButtonView, } from '../../View/Components/AdaptableButton';
|
|
@@ -204,10 +204,12 @@ export function AdaptableFormComponent({ formDef, data, onChange, onButtonClick,
|
|
|
204
204
|
break;
|
|
205
205
|
}
|
|
206
206
|
case 'select': {
|
|
207
|
-
const
|
|
207
|
+
const optionItems = resolveOptions(field);
|
|
208
|
+
const items = optionItems.map((item) => ({
|
|
208
209
|
value: item.value,
|
|
209
210
|
label: item.label,
|
|
210
211
|
}));
|
|
212
|
+
const selectPlaceholder = resolveSelectPlaceholder(field, optionItems);
|
|
211
213
|
// The underlying SingleCombobox / MultiCombobox manage their own
|
|
212
214
|
// popup-based focus; we wrap them in a labelled `role="group"` so
|
|
213
215
|
// assistive tech announces "<label> group" when focus enters and
|
|
@@ -225,10 +227,10 @@ export function AdaptableFormComponent({ formDef, data, onChange, onButtonClick,
|
|
|
225
227
|
// anything else (e.g. legacy string defaults) to [] so the
|
|
226
228
|
// underlying combobox never receives a non-array value.
|
|
227
229
|
const selected = Array.isArray(value) ? value : [];
|
|
228
|
-
control = (_jsx(Box, { ...groupProps, children: _jsx(MultiCombobox, { items: items, onValueChange: (newValues) => setFieldValue(field.name, newValues), value: selected, disabled: isDisabled, placeholder:
|
|
230
|
+
control = (_jsx(Box, { ...groupProps, children: _jsx(MultiCombobox, { items: items, onValueChange: (newValues) => setFieldValue(field.name, newValues), value: selected, disabled: isDisabled, placeholder: selectPlaceholder }) }));
|
|
229
231
|
}
|
|
230
232
|
else {
|
|
231
|
-
control = (_jsx(Box, { ...groupProps, children: _jsx(SingleCombobox, { items: items, onValueChange: (newValue) => setFieldValue(field.name, newValue), value: value, disabled: isDisabled, placeholder:
|
|
233
|
+
control = (_jsx(Box, { ...groupProps, children: _jsx(SingleCombobox, { items: items, onValueChange: (newValue) => setFieldValue(field.name, resolveSelectValueAfterClear(field, newValue)), value: value, disabled: isDisabled, placeholder: selectPlaceholder }) }));
|
|
232
234
|
}
|
|
233
235
|
break;
|
|
234
236
|
}
|
|
@@ -354,10 +356,13 @@ export function AdaptableFormComponent({ formDef, data, onChange, onButtonClick,
|
|
|
354
356
|
}
|
|
355
357
|
return items
|
|
356
358
|
.filter((field) => !isAdaptableFormFieldHidden(field, data, context))
|
|
357
|
-
.map((field) => {
|
|
359
|
+
.map((field, index) => {
|
|
358
360
|
const useFor = field.fieldType !== 'radio' && field.fieldType !== 'textOutput';
|
|
359
361
|
const requiredMarker = field.required ? (_jsx("span", { className: "ab-Form_required-marker", "aria-hidden": "true", children: ' *' })) : null;
|
|
360
|
-
return (_jsxs(Flex, { flexDirection: "row", alignItems: "center", style: {
|
|
362
|
+
return (_jsxs(Flex, { flexDirection: "row", alignItems: "center", style: {
|
|
363
|
+
columnGap: 'var(--ab-base-space)',
|
|
364
|
+
marginLeft: index > 0 ? 'var(--ab-base-space)' : undefined,
|
|
365
|
+
}, children: [field.label ? (useFor ? (_jsxs("label", { id: fieldLabelId(field), htmlFor: fieldDomId(field), className: "ab-FormLayout--inline_field-label", title: field.tooltip, children: [field.label, requiredMarker] })) : (_jsxs(Box, { id: fieldLabelId(field), className: "ab-FormLayout--inline_field-label", title: field.tooltip, children: [field.label, requiredMarker] }))) : null, renderField(field)] }, field.name));
|
|
361
366
|
});
|
|
362
367
|
};
|
|
363
368
|
const renderRowsEntry = (entry, index) => {
|
|
@@ -36,16 +36,16 @@ export function VirtualizedList({ open, virtualizerRef, showItemTooltip, renderC
|
|
|
36
36
|
return null;
|
|
37
37
|
}
|
|
38
38
|
const isUncreatedCreatable = item.creatable && !item.created;
|
|
39
|
-
const
|
|
40
|
-
const tooltipText =
|
|
39
|
+
const itemText = getItemTextLabel(item);
|
|
40
|
+
const tooltipText = showItemTooltip && itemText != null
|
|
41
41
|
? isUncreatedCreatable
|
|
42
|
-
? `Create "${
|
|
43
|
-
:
|
|
42
|
+
? `Create "${itemText}"`
|
|
43
|
+
: itemText
|
|
44
44
|
: undefined;
|
|
45
45
|
const label = isUncreatedCreatable ? `Create "${item.label}"` : item.label;
|
|
46
46
|
const itemLabel = renderItemLabel ? (renderItemLabel(label, item)) : (_jsx("span", { className: "twa:min-w-0 twa:flex-1 twa:truncate", children: label }));
|
|
47
47
|
const itemContent = isUncreatedCreatable ? (_jsxs(_Fragment, { children: [_jsx(PlusIcon, {}), itemLabel] })) : (itemLabel);
|
|
48
|
-
const itemElement = (_jsx(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: {
|
|
48
|
+
const itemElement = (_jsx(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: {
|
|
49
49
|
position: 'absolute',
|
|
50
50
|
left: `var(--ab-base-space)`,
|
|
51
51
|
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
|
|
@@ -5,6 +5,8 @@ export function getItemTextLabel(item) {
|
|
|
5
5
|
return item.label;
|
|
6
6
|
if (typeof item.label === 'number')
|
|
7
7
|
return String(item.label);
|
|
8
|
+
if (typeof item.tooltip === 'string')
|
|
9
|
+
return String(item.tooltip);
|
|
8
10
|
return String(item.value);
|
|
9
11
|
}
|
|
10
12
|
export 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;
|
|
@@ -31,9 +31,13 @@ const AdaptableComboboxList = (props) => {
|
|
|
31
31
|
const label = isUncreatedCreatable ? `Create "${item.label}"` : item.label;
|
|
32
32
|
const itemLabel = props.renderItemLabel ? props.renderItemLabel(label, item) : label;
|
|
33
33
|
const itemContent = isUncreatedCreatable ? (_jsxs(_Fragment, { children: [_jsx(PlusIcon, {}), " ", itemLabel] })) : (itemLabel);
|
|
34
|
-
const
|
|
35
|
-
const tooltipText =
|
|
36
|
-
|
|
34
|
+
const itemText = getItemTextLabel(item);
|
|
35
|
+
const tooltipText = props.showItemTooltip && itemText != null
|
|
36
|
+
? isUncreatedCreatable
|
|
37
|
+
? `Create "${itemText}"`
|
|
38
|
+
: itemText
|
|
39
|
+
: undefined;
|
|
40
|
+
const itemElement = (_jsx(ComboboxItem, { value: item, "aria-label": itemText ?? undefined, className: 'ab-Combobox-Row', disabled: item.disabled, renderCheckboxIndicator: props.renderCheckboxIndicator, children: itemContent }, item.value));
|
|
37
41
|
if (tooltipText != null) {
|
|
38
42
|
return (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { render: itemElement, children: itemContent }), _jsx(TooltipContent, { side: "right", children: tooltipText })] }, item.value));
|
|
39
43
|
}
|
|
@@ -88,9 +92,15 @@ const AdaptableCombobox_Root = (props) => {
|
|
|
88
92
|
const internalDefaultValue = props.multiple
|
|
89
93
|
? valueToItems(props.defaultValue, itemByValue)
|
|
90
94
|
: valueToItem(props.defaultValue, itemByValue);
|
|
91
|
-
const handleValueChange = (next) => {
|
|
95
|
+
const handleValueChange = (next, eventDetails) => {
|
|
92
96
|
if (!props.onValueChange)
|
|
93
97
|
return;
|
|
98
|
+
// base-ui clears the selected value when Escape is pressed
|
|
99
|
+
// we only want to allow this if the clearOnEscape prop is true
|
|
100
|
+
if (eventDetails?.reason === 'escape-key' && !props.clearOnEscape) {
|
|
101
|
+
eventDetails.cancel?.();
|
|
102
|
+
return;
|
|
103
|
+
}
|
|
94
104
|
if (Array.isArray(next)) {
|
|
95
105
|
props.onValueChange(toStringValues(next), next);
|
|
96
106
|
}
|
|
@@ -98,6 +108,15 @@ const AdaptableCombobox_Root = (props) => {
|
|
|
98
108
|
props.onValueChange(toStringValue(next), next);
|
|
99
109
|
}
|
|
100
110
|
};
|
|
111
|
+
const handleInputValueChange = (next, eventDetails) => {
|
|
112
|
+
// base-ui blanks the input text (and then the selected value) when Escape is pressed
|
|
113
|
+
// we only want to allow this if the clearOnEscape prop is true
|
|
114
|
+
if (eventDetails?.reason === 'escape-key' && !props.clearOnEscape) {
|
|
115
|
+
eventDetails.cancel?.();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
props.onInputValueChange?.(next);
|
|
119
|
+
};
|
|
101
120
|
let comboboxItems = props.groups ?? props.items;
|
|
102
121
|
if (props.isCreatable && allItems[allItems.length - 1]?.creatable) {
|
|
103
122
|
// let's detect all "creatable" items and add them to the combobox items
|
|
@@ -113,7 +132,7 @@ const AdaptableCombobox_Root = (props) => {
|
|
|
113
132
|
}
|
|
114
133
|
comboboxItems = [...comboboxItems, ...creatableItems];
|
|
115
134
|
}
|
|
116
|
-
return (_jsx(Combobox, { ...props, items: comboboxItems, isItemEqualToValue: isItemEqualToValue, itemToStringLabel: 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 }));
|
|
135
|
+
return (_jsx(Combobox, { ...props, items: comboboxItems, isItemEqualToValue: isItemEqualToValue, itemToStringLabel: 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 }));
|
|
117
136
|
};
|
|
118
137
|
const useGetAllItems = (props) => {
|
|
119
138
|
const allItems = props.groups
|
|
@@ -495,6 +514,16 @@ export const MultiCombobox = (props) => {
|
|
|
495
514
|
const showItemTooltip = props.showItemTooltip ?? !!props.virtualized;
|
|
496
515
|
return searchable === 'menulist' ? (_jsx(MultiCombobox_MenuListSearchable, { renderInput: false, ...props, multiple: true, open: open, onOpenChange: onOpenChange, searchable: searchable, showItemTooltip: showItemTooltip })) : (_jsx(MultiCombobox_SimpleSearchable, { ...props, open: open, multiple: true, onOpenChange: onOpenChange, searchable: searchable, showItemTooltip: showItemTooltip }));
|
|
497
516
|
};
|
|
517
|
+
export const GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME = cn(
|
|
518
|
+
// remove the border/shadow and position it properly
|
|
519
|
+
// to adjust for outline on the input
|
|
520
|
+
'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!',
|
|
521
|
+
// more adjustments for very compact ag grid themes
|
|
522
|
+
'twa:[.ab-FloatingFilter_&]:[line-height:1]', 'twa:[.ab-FloatingFilter_[data-slot=combobox-trigger]]:py-0',
|
|
523
|
+
// also for very compact ag grid themes
|
|
524
|
+
// make the floating-filter combobox a size container so the toggle can
|
|
525
|
+
// shrink purely via CSS when the control is small in height (see ColumnFilter/base.css)
|
|
526
|
+
'twa:[.ab-FloatingFilter_&]:[container-type:size]');
|
|
498
527
|
export const GridFilterCombobox = (props) => {
|
|
499
528
|
const { showSelectedCount = false, placeholder = 'Select...', ...comboboxProps } = props;
|
|
500
529
|
const sharedProps = {
|
|
@@ -514,16 +543,7 @@ export const GridFilterCombobox = (props) => {
|
|
|
514
543
|
return (_jsx(_Fragment, { children: _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 && (_jsxs("span", { "data-name": "multiple-values-count", className: "twa:mr-0.5", children: ["(", items.length, ")"] })), children] }) }));
|
|
515
544
|
},
|
|
516
545
|
};
|
|
517
|
-
const className = cn(
|
|
518
|
-
// remove the border/shadow and position it properly
|
|
519
|
-
// to adjust for outline on the input
|
|
520
|
-
'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!',
|
|
521
|
-
// more adjustments for very compact ag grid themes
|
|
522
|
-
'twa:[.ab-FloatingFilter_&]:[line-height:1]', 'twa:[.ab-FloatingFilter_[data-slot=combobox-trigger]]:py-0',
|
|
523
|
-
// also for very compact ag grid themes
|
|
524
|
-
// make the floating-filter combobox a size container so the toggle can
|
|
525
|
-
// shrink purely via CSS when the control is small in height (see ColumnFilter/base.css)
|
|
526
|
-
'twa:[.ab-FloatingFilter_&]:[container-type:size]', comboboxProps.className);
|
|
546
|
+
const className = cn(GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME, comboboxProps.className);
|
|
527
547
|
const mergedProps = {
|
|
528
548
|
...sharedProps,
|
|
529
549
|
...comboboxProps,
|
|
@@ -19,6 +19,6 @@ function UnusedItem({ unusedItem, disabled }) {
|
|
|
19
19
|
const title = currentItem ? currentItem.Title : unusedItem;
|
|
20
20
|
return (_jsx(DragList.DraggableItem, { id: unusedItem, children: (itemDomProps) => {
|
|
21
21
|
const { onPointerDown, ...restDomProps } = itemDomProps;
|
|
22
|
-
return (_jsx("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: clsx('twa:rounded-md twa:text-sm twa:text-
|
|
22
|
+
return (_jsx("div", { "data-name": "unused-item", ...restDomProps, ...(disabled ? {} : { onPointerDown }), className: clsx('twa:rounded-md twa:text-sm twa:text-primary-foreground twa:p-2 twa:select-none', 'twa:bg-primary', restDomProps.className), children: title }));
|
|
23
23
|
} }));
|
|
24
24
|
}
|
|
@@ -151,7 +151,7 @@ const FunctionsDropdown = ({ expressionFunctions, baseClassName }) => {
|
|
|
151
151
|
return (_jsx(Box, { onMouseEnter: () => setOverFunction(functionName), onClick: () => hidePopup(), children: functionName === 'VAR' ? (_jsx(VarEditorButton, { className: buttonClassName }, functionName)) : (_jsx(EditorButton, { data: getEditorButtonData(functionName), className: buttonClassName, children: functionName }, functionName)) }, functionName));
|
|
152
152
|
})
|
|
153
153
|
.filter(Boolean);
|
|
154
|
-
return (_jsxs(Box, { className: clsx('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [_jsx(Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-
|
|
154
|
+
return (_jsxs(Box, { className: clsx('twa:mb-2 twa:mx-1', fns.length === 0 ? 'twa:hidden' : ''), children: [_jsx(Tag, { className: "twa:mb-1 twa:bg-primarylight twa:text-primary-foreground twa:w-full", children: StringExtensions.Humanize(groupName) }), fns] }, groupName));
|
|
155
155
|
}) })] }), _jsx(Box, { className: clsx(`${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 ? (_jsxs(_Fragment, { children: [_jsx(Tag, { className: "twa:bg-accent twa:text-accent-foreground", children: overFunction }), _jsx(ExpressionFunctionDocumentation, { expressionFunction: expressionFunctions[overFunction] })] })) : (_jsx(Flex, { className: "twa:size-full twa:items-center twa:justify-center twa:text-2 twa:italic", children: _jsxs("ul", { children: [_jsxs("li", { children: ["Hover over a Function to learn more", _jsx("br", {}), _jsx("br", {})] }), _jsx("li", { children: "Click a Function to add it to the Expression in the Editor" })] }) })) })] })] })), children: _jsx(SimpleButton, { "data-name": "expression-dropdown", icon: "arrow-down", iconPosition: 'end', className: "twa:mr-1", children: _jsx(Flex, { className: "twa:mr-1 twa:text-2", children: _jsx(Icon, { name: "equation" }) }) }) }));
|
|
156
156
|
};
|
|
157
157
|
export function BaseEditorInput(props) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Tag } from '../Tag';
|
|
3
3
|
import { Box } from '../Flex';
|
|
4
|
-
const signatureClassName = 'twa:m-0 twa:whitespace-pre-wrap twa:bg-primary twa:text-
|
|
4
|
+
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';
|
|
5
5
|
export const ExpressionFunctionDocumentation = (props) => {
|
|
6
6
|
return props.expressionFunction ? (_jsxs(Box, { "data-name": "expression-editor-documentation", className: "twa:my-2 twa:p-2 twa:rounded-standard twa:leading-normal", children: [props.expressionFunction.description && (_jsx(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 && (_jsxs(Box, { "data-name": "expression-editor-documentation-signatures", children: [_jsx("b", { children: "Signatures" }), _jsx("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.signatures.map((signature, index) => (_jsx("li", { children: _jsx("pre", { className: signatureClassName, children: signature }) }, index))) })] })), props.expressionFunction.examples && (_jsxs(Box, { "data-name": "expression-editor-documentation-examples", children: [_jsx("b", { children: "Examples" }), _jsx("ul", { className: "twa:flex twa:flex-col twa:gap-1", children: props.expressionFunction.examples.map((example, index) => (_jsx("li", { children: _jsx("pre", { className: signatureClassName, children: example }) }, index))) })] })), props.expressionFunction.returnType && (_jsxs(Box, { "data-name": "expression-editor-documentation-examples", children: [_jsx("b", { children: "Return Type" }), _jsx(Tag, { className: "twa:bg-accentlight twa:text-accent twa:ml-3 twa:rounded-full twa:py-1", children: props.expressionFunction.returnType })] }))] })) : null;
|
|
7
7
|
};
|
|
@@ -19,7 +19,7 @@ const Body = ({ children, bodyScroll, variant, className, style, }) => {
|
|
|
19
19
|
bodyScroll = 'auto';
|
|
20
20
|
}
|
|
21
21
|
const bodyCls = clsx(DEFAULT_BODY_CLS, `${baseClassName}__body`, variant && `${baseClassName}__body--variant-${variant}`, bodyScroll ? `twa:overflow-auto` : null, {
|
|
22
|
-
'twa:bg-primarylight twa:text-
|
|
22
|
+
'twa:bg-primarylight twa:text-primary-foreground twa:border-0': variant === 'modern',
|
|
23
23
|
}, className);
|
|
24
24
|
return (_jsx(Box, { style: style, className: bodyCls, children: children }));
|
|
25
25
|
};
|
|
@@ -78,11 +78,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
78
78
|
'twa:*:z-1',
|
|
79
79
|
// all svgs inside should be aligned middle
|
|
80
80
|
'twa:[&_svg]:align-middle',
|
|
81
|
-
// 'twa:text-
|
|
81
|
+
// 'twa:text-primary-foreground',
|
|
82
82
|
// the text variant has the background applied on the before pseudo element
|
|
83
83
|
// so let's configure the before pseudo element for all buttons here
|
|
84
84
|
'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 ? `${baseClassName}--disabled` : '', `${baseClassName}--variant-${variant}`, `${baseClassName}--tone-${tone}`, 'twa:transition-opacity twa:duration-200', {
|
|
85
|
-
'twa:text-
|
|
85
|
+
'twa:text-primary-foreground': tone == 'neutral',
|
|
86
86
|
'twa:text-inherit': tone === 'none',
|
|
87
87
|
'twa:text-success': tone === 'success',
|
|
88
88
|
'twa:text-accent': tone === 'accent',
|
|
@@ -95,11 +95,11 @@ const SimpleButton = React.forwardRef((givenProps, theRef) => {
|
|
|
95
95
|
? 'twa:bg-background twa:border-input-border twa:border'
|
|
96
96
|
: '', variant === 'raised'
|
|
97
97
|
? {
|
|
98
|
-
'twa:text-
|
|
98
|
+
'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,
|
|
99
99
|
'twa:bg-success twa:text-text-on-success': tone == 'success',
|
|
100
100
|
'twa:bg-accent twa:text-accent-foreground': tone == 'accent',
|
|
101
101
|
'twa:bg-transparent': tone == 'none',
|
|
102
|
-
'twa:bg-primary twa:text-
|
|
102
|
+
'twa:bg-primary twa:text-primary-foreground': tone == 'neutral',
|
|
103
103
|
'twa:bg-error twa:text-text-on-error': tone == 'error',
|
|
104
104
|
'twa:bg-warn twa:text-text-on-warn': tone == 'warning',
|
|
105
105
|
'twa:bg-info twa:text-text-on-info': tone == 'info',
|
|
@@ -40,7 +40,7 @@ export const Toggle = ({ onPressedChange, pressed, icon, children, ...rest }) =>
|
|
|
40
40
|
// backgrounds
|
|
41
41
|
{
|
|
42
42
|
'twa:text-inherit twa:bg-transparent': !pressed,
|
|
43
|
-
'twa:hover:bg-primarylight twa:hover:text-
|
|
43
|
+
'twa:hover:bg-primarylight twa:hover:text-primary-foreground': !pressed,
|
|
44
44
|
[`${baseClassName}--pressed`]: pressed,
|
|
45
45
|
'twa:bg-accent twa:hover:bg-accent/90 twa:text-accent-foreground': pressed,
|
|
46
46
|
}, {
|
|
@@ -20,7 +20,7 @@ export const ToggleGroup = (props) => {
|
|
|
20
20
|
activeIndex: index,
|
|
21
21
|
}));
|
|
22
22
|
}, []);
|
|
23
|
-
return (_jsx(ToggleGroupContext.Provider, { value: context, children: _jsx(Flex, { ref: ref, tabIndex: 0, className: clsx('ab-Toggle-Group twa:shadow-sm', 'twa:bg-primary twa:text-
|
|
23
|
+
return (_jsx(ToggleGroupContext.Provider, { value: context, children: _jsx(Flex, { ref: ref, tabIndex: 0, className: clsx('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',
|
|
24
24
|
// make the shadow of child Toggle buttons invisible when the group is not focused
|
|
25
25
|
'twa:not-focus-within:[--ab-focus-light__box-shadow:none]', 'twa:not-focus-within:[--ab-focus__box-shadow:none]'), onMouseDown: (event) => {
|
|
26
26
|
const index = context.toggleButtons.findIndex((btn) => contains(btn.node, event.target));
|
|
@@ -3,7 +3,7 @@ import { useCallback, useMemo, useState } from 'react';
|
|
|
3
3
|
import clsx from 'clsx';
|
|
4
4
|
import { ChevronRightIcon, ChevronDownIcon, ChevronsDownUpIcon, ChevronsUpDownIcon, } from 'lucide-react';
|
|
5
5
|
import { TreeExpandState, TreeSelectionState } from '../../InfiniteTable';
|
|
6
|
-
import { MultiCombobox } from '../../Combobox';
|
|
6
|
+
import { GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME, MultiCombobox, } from '../../Combobox';
|
|
7
7
|
import { ComboboxChip } from '../../ui/combobox';
|
|
8
8
|
import { toDisplayValueDefault, toDisplayValueFromOptionTree } from '../treeUtils';
|
|
9
9
|
import { cn } from '../../../lib/utils';
|
|
@@ -516,10 +516,6 @@ export function GridFilterTreeDropdown(props) {
|
|
|
516
516
|
}
|
|
517
517
|
return (_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 && (_jsxs("span", { "data-name": "multiple-values-count", className: "twa:mr-0.5", children: ["(", selectedLeafPaths.length, ")"] })), children] }));
|
|
518
518
|
}, [placeholder, showSelectedCount]);
|
|
519
|
-
const mergedClassName = cn(
|
|
520
|
-
// Match the restyling GridFilterCombobox uses: remove the field border,
|
|
521
|
-
// flatten the shadow and absolutely position so the component fits the
|
|
522
|
-
// grid's floating-filter input box.
|
|
523
|
-
'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);
|
|
519
|
+
const mergedClassName = cn(GRID_FILTER_COMBBOX_ADJUSTMENTS_CLASSNAME, className);
|
|
524
520
|
return (_jsx(TreeDropdown, { ...rest, placeholder: placeholder, className: mergedClassName, showClear: rest.showClear ?? false, resizable: rest.resizable ?? true, renderSelectedValues: renderSelectedValues }));
|
|
525
521
|
}
|
package/src/env.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
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" || '',
|
|
3
|
-
PUBLISH_TIMESTAMP:
|
|
4
|
-
VERSION: "23.0.0-canary.
|
|
3
|
+
PUBLISH_TIMESTAMP: 1781098683970 || Date.now(),
|
|
4
|
+
VERSION: "23.0.0-canary.5" || '--current-version--',
|
|
5
5
|
};
|
|
@@ -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
|
*/
|
|
@@ -10,7 +10,6 @@ import { destructurePivotColumnId } from './destructurePivotColumnId';
|
|
|
10
10
|
import { isPivotAggTotalColumn } from './isPivotAggTotalColumn';
|
|
11
11
|
import { isPivotGrandTotal } from './isPivotGrandTotal';
|
|
12
12
|
import { isPivotColumnTotal } from './isPivotColumnTotal';
|
|
13
|
-
import { isParameterizedAggFuncName } from '../../Aggregation/ParameterizedAggregationRegistry';
|
|
14
13
|
import { getMarker } from '../../devTools';
|
|
15
14
|
export const PIVOT_ANY_TOTAL_COL_TYPE = 'pivotAnyTotal';
|
|
16
15
|
export const PIVOT_GRAND_TOTAL_COL_TYPE = 'pivotGrandTotal';
|
|
@@ -523,24 +522,18 @@ export class LayoutManager extends LMEmitter {
|
|
|
523
522
|
});
|
|
524
523
|
}
|
|
525
524
|
if (gridState.aggregation) {
|
|
526
|
-
TableAggregationColumns = gridState.aggregation.aggregationModel
|
|
527
|
-
.map((agg) => {
|
|
525
|
+
TableAggregationColumns = gridState.aggregation.aggregationModel.map((agg) => {
|
|
528
526
|
const prevAggForColumn = prevAggColumnsMap?.[agg.colId];
|
|
529
527
|
if (prevAggForColumn && prevAggForColumn.AggFunc.aggFunc === agg.aggFunc) {
|
|
530
528
|
return prevAggForColumn;
|
|
531
529
|
}
|
|
532
|
-
// Parameterized aggs require layout metadata (e.g. weight column); ignore incomplete picks.
|
|
533
|
-
if (isParameterizedAggFuncName(agg.aggFunc)) {
|
|
534
|
-
return prevAggForColumn ?? null;
|
|
535
|
-
}
|
|
536
530
|
return {
|
|
537
531
|
ColumnId: agg.colId,
|
|
538
532
|
AggFunc: {
|
|
539
533
|
aggFunc: agg.aggFunc,
|
|
540
534
|
},
|
|
541
535
|
};
|
|
542
|
-
})
|
|
543
|
-
.filter(Boolean);
|
|
536
|
+
});
|
|
544
537
|
}
|
|
545
538
|
// if there's a current layout set
|
|
546
539
|
// we want to only return the AG Grid columns that are also in the current layout
|