@adaptabletools/adaptable 23.0.0-canary.6 → 23.0.0-canary.8
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/icons/sort-asc.svg +1 -1
- package/index.css +828 -263
- package/package.json +1 -1
- package/src/AdaptableOptions/DataSetOptions.d.ts +26 -2
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +42 -10
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +7 -0
- package/src/AdaptableState/Common/AdaptableMessageType.d.ts +1 -1
- package/src/AdaptableState/Common/Enums.d.ts +1 -1
- package/src/AdaptableState/Common/Enums.js +1 -1
- package/src/AdaptableState/StyledColumnState.d.ts +8 -850
- package/src/AdaptableState/StyledColumnState.js +1 -9
- package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +9 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.d.ts +60 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +6 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +24 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.js +5 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +6 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +9 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
- package/src/AdaptableState/StyledColumns/IconStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.js +1 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.js +1 -0
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
- package/src/Api/Internal/DataSetInternalApi.js +73 -13
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
- package/src/Redux/Store/AdaptableStore.js +6 -4
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/ColumnFilterModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +6 -2
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/FreeTextColumnModule.js +38 -28
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +15 -66
- package/src/Strategy/StyledColumnModule.js +12 -29
- package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -0
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.d.ts +2 -0
- package/src/Strategy/Utilities/Export/getExportColumnsViewItems.js +14 -0
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +3 -0
- package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
- package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +105 -0
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +166 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -0
- package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.d.ts +26 -0
- package/src/Strategy/Utilities/Layout/rowGroupSummaryHelpers.js +85 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +46 -41
- package/src/Utilities/Helpers/FormatHelper.js +3 -0
- package/src/Utilities/Helpers/IconStylePresets.d.ts +1 -1
- package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
- package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
- package/src/Utilities/Helpers/StyleHelper.js +27 -0
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +3 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +7 -5
- package/src/Utilities/Helpers/barChartCellText.d.ts +63 -0
- package/src/Utilities/Helpers/barChartCellText.js +316 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +2 -1
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +3 -8
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +15 -0
- package/src/Utilities/getScopeViewItems.js +2 -0
- package/src/Utilities/wizardSelection.d.ts +10 -0
- package/src/Utilities/wizardSelection.js +15 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +3 -3
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +7 -4
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +0 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +0 -4
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +160 -126
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -5
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +31 -7
- package/src/View/Alert/Wizard/AlertWizard.js +13 -5
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -14
- package/src/View/BulkUpdate/BulkUpdatePopup.js +1 -1
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +4 -6
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.js +30 -4
- package/src/View/CellSummary/CellSummaryViewPanel.js +4 -4
- package/src/View/Charting/ShowChartButton.js +8 -8
- package/src/View/ColumnInfo/ColumnInfo.js +21 -1
- package/src/View/Components/AdaptableObjectCollection/index.js +2 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +7 -6
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +2 -0
- package/src/View/Components/AdaptableObjectRow/index.js +2 -2
- package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
- package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
- package/src/View/Components/Buttons/ButtonNew.js +1 -1
- package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +9 -9
- package/src/View/Components/ColumnFilter/ColumnFilter.js +16 -4
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
- package/src/View/Components/ColumnSelector/index.d.ts +12 -0
- package/src/View/Components/ColumnSelector/index.js +30 -6
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
- package/src/View/Components/ModuleValueSelector/index.js +2 -1
- package/src/View/Components/NewScopeComponent.js +4 -9
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -3
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +1 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +25 -27
- package/src/View/Components/PredicateEditor/PredicateEditor.js +1 -1
- package/src/View/Components/RangesComponent.d.ts +4 -5
- package/src/View/Components/RangesComponent.js +95 -66
- package/src/View/Components/ReorderDraggable/index.js +2 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.d.ts +0 -2
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +3 -3
- package/src/View/Components/StyleComponent.js +32 -65
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +10 -7
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -81
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +76 -0
- package/src/View/Components/ValueSelector/index.d.ts +29 -0
- package/src/View/Components/ValueSelector/index.js +113 -30
- package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
- package/src/View/Components/wizardColumnListStyles.js +10 -0
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +5 -7
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -2
- package/src/View/Dashboard/DashboardPopup.d.ts +1 -11
- package/src/View/Dashboard/DashboardPopup.js +3 -67
- package/src/View/Dashboard/DashboardPopupSections.d.ts +20 -0
- package/src/View/Dashboard/DashboardPopupSections.js +68 -0
- package/src/View/Dashboard/PinnedToolbarsSelector.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.d.ts +1 -6
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +8 -20
- package/src/View/DataChangeHistory/DataChangeHistoryTable.d.ts +8 -0
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +94 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
- package/src/View/DataChangeHistory/buildActionColumnButton.js +30 -39
- package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
- package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +37 -0
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -1
- package/src/View/DataImport/DataImportWizard/sections/ColumnsSection.js +32 -19
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +2 -2
- package/src/View/Export/ExportDestinationPicker.js +3 -3
- package/src/View/Export/ExportSchedulesTab.js +3 -4
- package/src/View/Export/ExportViewPanel.js +2 -2
- package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +4 -9
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +3 -6
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
- package/src/View/FlashingCell/FlashingCellStyle.js +4 -2
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +7 -11
- package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
- package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +5 -0
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -0
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +1 -5
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -3
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +99 -42
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +0 -4
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +56 -15
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +2 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -8
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +8 -13
- package/src/View/FreeTextColumn/Utilities/getFreeTextColumnSettingsTags.js +3 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +1 -2
- package/src/View/GridFilter/GridFilterPopupUI/index.js +3 -2
- package/src/View/GridFilter/GridFilterViewPanel.js +5 -5
- package/src/View/GridInfo/GridInfoPopup/AdaptableObjectsSummary.js +2 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +24 -28
- package/src/View/Layout/Wizard/sections/AggregationsSection.d.ts +13 -1
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +73 -33
- package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +155 -276
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +148 -145
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +24 -12
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +23 -12
- package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +19 -12
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +8 -4
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +132 -106
- package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +41 -17
- package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
- package/src/View/Layout/Wizard/sections/columnLayoutCards.js +159 -0
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +201 -0
- package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +63 -0
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +52 -0
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.d.ts +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +1 -2
- package/src/View/Note/NoteEditor.js +2 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +2 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
- package/src/View/StateManagement/StateManagementPopup.js +1 -1
- package/src/View/StateManagement/components/ExportDropdown.d.ts +2 -2
- package/src/View/StateManagement/components/ExportDropdown.js +12 -12
- package/src/View/StatusBar/StatusBarPanel.js +2 -2
- package/src/View/StatusBar/StatusBarPopup.js +33 -5
- package/src/View/StatusBar/statusBarPanelHelpers.d.ts +2 -0
- package/src/View/StatusBar/statusBarPanelHelpers.js +7 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +3 -1
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +14 -11
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.d.ts +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +143 -119
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +8 -14
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnTypeThumbnail.js +50 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +26 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +76 -70
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +83 -38
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +173 -76
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +32 -46
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +35 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.js +57 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +14 -7
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +27 -58
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +94 -7
- package/src/View/UIHelper.d.ts +0 -2
- package/src/View/UIHelper.js +8 -23
- package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
- package/src/View/Wizard/CollapsibleWizardCard.js +81 -0
- package/src/View/Wizard/OnePageWizards.js +6 -6
- package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
- package/src/View/Wizard/SummaryColorTag.js +67 -0
- package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
- package/src/View/Wizard/WizardTypeSelection.js +31 -0
- package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
- package/src/View/Wizard/rowGroupSummaryTags.js +14 -0
- package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
- package/src/View/Wizard/scopeSummaryTags.js +33 -0
- package/src/agGrid/AgGridAdapter.js +0 -5
- package/src/agGrid/AgGridColumnAdapter.js +4 -3
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
- package/src/agGrid/cellRenderers/BadgeRenderer.js +7 -5
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +43 -42
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +13 -11
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +24 -96
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +49 -46
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
- package/src/components/Card/index.js +5 -6
- package/src/components/CheckBox/index.js +2 -3
- package/src/components/CodeBlock/index.js +2 -2
- package/src/components/ColorPicker/ColorPicker.d.ts +1 -0
- package/src/components/ColorPicker/ColorPicker.js +8 -6
- package/src/components/ColorPicker/OptionalColorPicker.d.ts +12 -0
- package/src/components/ColorPicker/OptionalColorPicker.js +26 -0
- package/src/components/ColorPicker/index.d.ts +1 -0
- package/src/components/ColorPicker/index.js +1 -0
- package/src/components/Combobox/comboboxUtils.d.ts +1 -0
- package/src/components/Combobox/index.js +19 -18
- package/src/components/Dashboard/DashboardManager.js +2 -4
- package/src/components/Dialog/index.js +4 -4
- package/src/components/DragAndDropContext/DragAndDropContext.d.ts +5 -0
- package/src/components/DragAndDropContext/DragAndDropContext.js +3 -0
- package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
- package/src/components/DragAndDropContext/ModuleManager.js +47 -8
- package/src/components/DragAndDropContext/TabList.d.ts +11 -4
- package/src/components/DragAndDropContext/TabList.js +52 -38
- package/src/components/DragAndDropContext/UnusedPanel.d.ts +4 -3
- package/src/components/DragAndDropContext/UnusedPanel.js +15 -11
- package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
- package/src/components/DragAndDropContext/dragScope.js +26 -0
- package/src/components/DragAndDropContext/types.d.ts +7 -0
- package/src/components/DropdownButton/index.d.ts +33 -25
- package/src/components/DropdownButton/index.js +24 -158
- package/src/components/EmptyContent/index.js +2 -2
- package/src/components/ErrorBox/index.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
- package/src/components/FieldWrap/index.js +2 -2
- package/src/components/Flex.js +2 -2
- package/src/components/FormLayout/index.d.ts +1 -1
- package/src/components/HelpBlock/index.js +3 -3
- package/src/components/IconSelector/IconSelector.d.ts +8 -0
- package/src/components/IconSelector/IconSelector.js +11 -7
- package/src/components/IconSelector/index.d.ts +1 -0
- package/src/components/IconSelector/index.js +1 -0
- package/src/components/Modal/index.js +2 -2
- package/src/components/NewSelect/index.js +11 -1
- package/src/components/Panel/index.js +7 -7
- package/src/components/Radio/index.d.ts +1 -1
- package/src/components/Radio/index.js +8 -6
- package/src/components/SimpleButton/index.js +7 -7
- package/src/components/StylePreview.js +2 -2
- package/src/components/Tabs/index.js +4 -4
- package/src/components/Tag/Tag.d.ts +16 -0
- package/src/components/Tag/Tag.js +14 -4
- package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
- package/src/components/Tag/columnScopeTagHelpers.js +6 -0
- package/src/components/Tag/index.d.ts +1 -1
- package/src/components/Tag/index.js +1 -1
- package/src/components/Textarea/index.js +2 -3
- package/src/components/Toggle/Toggle.d.ts +2 -0
- package/src/components/Toggle/Toggle.js +14 -7
- package/src/components/Toggle/ToggleGroup.js +2 -2
- package/src/components/ToggleButton/index.js +4 -4
- package/src/components/Tree/TreeDropdown/index.js +3 -4
- package/src/components/WarningBox/index.js +2 -2
- package/src/components/icons/sort-asc.js +1 -1
- package/src/components/ui/button.d.ts +2 -2
- package/src/components/ui/combobox.d.ts +3 -1
- package/src/components/ui/combobox.js +2 -2
- package/src/components/ui/input-group.d.ts +1 -1
- package/src/components/ui/select.js +3 -2
- package/src/components/ui/textarea.js +1 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/index.js +7 -3
- package/src/metamodel/adaptable.metamodel.d.ts +80 -14
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.d.ts +27 -31
- package/src/migration/VersionUpgrade23.js +110 -29
- package/src/types.d.ts +13 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -290
- package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
- package/src/components/DropdownButton/renderItem.d.ts +0 -14
- package/src/components/DropdownButton/renderItem.js +0 -11
- package/src/components/DropdownButton/useExpanded.d.ts +0 -24
- package/src/components/DropdownButton/useExpanded.js +0 -56
- package/src/components/NewDropdownButton/index.d.ts +0 -27
- package/src/components/NewDropdownButton/index.js +0 -24
- /package/src/{components/DropdownButton/DropdownButtonItem.js → AdaptableState/StyledColumns/BulletChartStyle.js} +0 -0
|
@@ -9,8 +9,6 @@ import { RangesComponent } from '../../Components/RangesComponent';
|
|
|
9
9
|
import { ColumnSelector } from '../../Components/Selectors/ColumnSelector';
|
|
10
10
|
import { getGraySwatchColor } from '../../UIHelper';
|
|
11
11
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
12
|
-
import DropdownButton from '../../../components/DropdownButton';
|
|
13
|
-
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
14
12
|
import AdaptableInput from '../../Components/AdaptableInput';
|
|
15
13
|
import { Box, Flex } from '../../../components/Flex';
|
|
16
14
|
import { BulletRangesSummaryPreview } from './StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview';
|
|
@@ -18,10 +16,10 @@ import { StyledColumnBulletPreviewCard } from './StyledColumnWizardStyleSection/
|
|
|
18
16
|
import { SingleSelect } from '../../../components/NewSelect';
|
|
19
17
|
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
20
18
|
import { Card } from '../../../components/Card';
|
|
19
|
+
import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
|
|
20
|
+
import { formatBarChartCellTextLayoutSummary, getActiveBarChartCellTextTokens, hasBarChartCellTextConfigured, patchBarChartCellTextPlacement, resolveBarChartCellTextLayout, toggleBarChartCellTextToken, } from '../../../Utilities/Helpers/barChartCellText';
|
|
21
|
+
import { BarChartCellTextLayoutEditor } from './StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor';
|
|
21
22
|
const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
22
|
-
// ---------------------------------------------------------------------------
|
|
23
|
-
// Summary helpers
|
|
24
|
-
// ---------------------------------------------------------------------------
|
|
25
23
|
const getTargetSummary = (target) => {
|
|
26
24
|
if (target == undefined) {
|
|
27
25
|
return null;
|
|
@@ -73,11 +71,12 @@ export const getStyledColumnBulletRangesViewValues = (data) => {
|
|
|
73
71
|
};
|
|
74
72
|
const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
75
73
|
const items = [];
|
|
76
|
-
const
|
|
74
|
+
const targetProperties = bullet.TargetProperties;
|
|
75
|
+
const targetSummary = getTargetSummary(targetProperties?.Target);
|
|
77
76
|
if (targetSummary) {
|
|
78
77
|
items.push(`Target: ${targetSummary}`);
|
|
79
78
|
}
|
|
80
|
-
const marker =
|
|
79
|
+
const marker = targetProperties?.Marker;
|
|
81
80
|
if (marker?.Shape && marker.Shape !== 'Line') {
|
|
82
81
|
items.push(`Target Marker Shape: ${marker.Shape}`);
|
|
83
82
|
}
|
|
@@ -90,19 +89,24 @@ const buildStyledColumnBulletStyleSummaryStrings = (bullet, options) => {
|
|
|
90
89
|
if (bullet.Orientation === 'Vertical') {
|
|
91
90
|
items.push('Orientation: Vertical');
|
|
92
91
|
}
|
|
93
|
-
|
|
94
|
-
|
|
92
|
+
const barProperties = bullet.Bar;
|
|
93
|
+
if (barProperties?.Color) {
|
|
94
|
+
items.push(`Bar Colour: ${barProperties.Color}`);
|
|
95
95
|
}
|
|
96
|
-
if (
|
|
97
|
-
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${
|
|
96
|
+
if (barProperties?.Height != null) {
|
|
97
|
+
items.push(`${bullet.Orientation === 'Vertical' ? 'Bar Width' : 'Bar Height'}: ${barProperties.Height}px`);
|
|
98
98
|
}
|
|
99
99
|
items.push(`Origin: ${formatBulletOriginLabel(bullet.Origin)}`);
|
|
100
100
|
if (bullet.BackColor) {
|
|
101
101
|
items.push(`Back Colour: ${bullet.BackColor}`);
|
|
102
102
|
}
|
|
103
|
-
if (bullet.
|
|
104
|
-
|
|
105
|
-
items.push(`Cell Text
|
|
103
|
+
if (hasBarChartCellTextConfigured(bullet.CellTextProperties)) {
|
|
104
|
+
const tokens = getActiveBarChartCellTextTokens(bullet.CellTextProperties);
|
|
105
|
+
items.push(`Cell Text: ${formatBulletCellTextSummary(tokens)}`);
|
|
106
|
+
const layoutSummary = formatBarChartCellTextLayoutSummary(resolveBarChartCellTextLayout(bullet.CellTextProperties));
|
|
107
|
+
if (layoutSummary) {
|
|
108
|
+
items.push(`Placement: ${layoutSummary}`);
|
|
109
|
+
}
|
|
106
110
|
}
|
|
107
111
|
else if (options.includeEmptyCellText) {
|
|
108
112
|
items.push('Cell Text: None');
|
|
@@ -135,7 +139,7 @@ export const renderStyledColumnBulletRangesSummary = (data) => {
|
|
|
135
139
|
return _jsx(Tag, { children: "No bands defined" });
|
|
136
140
|
}
|
|
137
141
|
const tagItems = getStyledColumnBulletRangesViewValues(data);
|
|
138
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [
|
|
142
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [renderSummaryStringTags(tagItems), _jsx(BulletRangesSummaryPreview, { bulletStyle: bullet })] }));
|
|
139
143
|
};
|
|
140
144
|
export const StyledColumnBulletRangesView = ({ data }) => renderStyledColumnBulletRangesSummary(data);
|
|
141
145
|
/** Wizard / list-view summary for the Style step (target, bar, text, font). */
|
|
@@ -151,7 +155,7 @@ export const renderStyledColumnBulletStyleSummary = (data) => {
|
|
|
151
155
|
if (!items.length) {
|
|
152
156
|
return _jsx(Tag, { children: "No Style Defined" });
|
|
153
157
|
}
|
|
154
|
-
return (
|
|
158
|
+
return renderSummaryStringTags(items);
|
|
155
159
|
};
|
|
156
160
|
/** Full combined summary (ranges + style); kept for callers that expect one block. */
|
|
157
161
|
export const renderStyledColumnBulletSummary = (data) => {
|
|
@@ -260,20 +264,28 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
260
264
|
});
|
|
261
265
|
}, [data, bullet]);
|
|
262
266
|
// -- Target ----------------------------------------------------------------
|
|
263
|
-
const currentMode = getSimpleTargetMode(bullet.Target);
|
|
267
|
+
const currentMode = getSimpleTargetMode(bullet.TargetProperties?.Target);
|
|
268
|
+
const updateTargetProperties = (patch) => {
|
|
269
|
+
const merged = {
|
|
270
|
+
...bullet.TargetProperties,
|
|
271
|
+
...patch,
|
|
272
|
+
};
|
|
273
|
+
// Strip the wrapper when nothing meaningful is left.
|
|
274
|
+
const isEmpty = merged.Target == undefined && merged.Marker == undefined;
|
|
275
|
+
update({ TargetProperties: isEmpty ? undefined : merged });
|
|
276
|
+
};
|
|
277
|
+
const setTarget = (target) => updateTargetProperties({ Target: target });
|
|
264
278
|
const handleTargetModeChange = (mode) => {
|
|
265
279
|
if (mode === 'None') {
|
|
266
|
-
|
|
267
|
-
delete next.Target;
|
|
268
|
-
props.onChange({ ...data, BulletChartStyle: next });
|
|
280
|
+
setTarget(undefined);
|
|
269
281
|
return;
|
|
270
282
|
}
|
|
271
283
|
if (mode === 'Col-Avg' || mode === 'Col-Median') {
|
|
272
|
-
|
|
284
|
+
setTarget(mode);
|
|
273
285
|
return;
|
|
274
286
|
}
|
|
275
287
|
if (mode === 'Number') {
|
|
276
|
-
|
|
288
|
+
setTarget(minMaxRangeValues?.max ?? 0);
|
|
277
289
|
return;
|
|
278
290
|
}
|
|
279
291
|
if (mode === 'Column') {
|
|
@@ -281,38 +293,43 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
281
293
|
const candidate = api.columnApi
|
|
282
294
|
.getNumericColumns()
|
|
283
295
|
.find((c) => c.columnId !== data.ColumnId);
|
|
284
|
-
|
|
296
|
+
setTarget(candidate?.columnId ?? '');
|
|
285
297
|
return;
|
|
286
298
|
}
|
|
287
299
|
};
|
|
288
300
|
const handleNumericTargetChange = (value) => {
|
|
289
|
-
|
|
290
|
-
update({ Target: 0 });
|
|
291
|
-
}
|
|
292
|
-
else {
|
|
293
|
-
update({ Target: value });
|
|
294
|
-
}
|
|
301
|
+
setTarget(value == undefined || isNaN(value) ? 0 : value);
|
|
295
302
|
};
|
|
296
303
|
const handleColumnTargetChange = (columnId) => {
|
|
297
|
-
|
|
304
|
+
setTarget(columnId);
|
|
305
|
+
};
|
|
306
|
+
// -- Bar -------------------------------------------------------------------
|
|
307
|
+
const updateBar = (patch) => {
|
|
308
|
+
const merged = {
|
|
309
|
+
...bullet.Bar,
|
|
310
|
+
...patch,
|
|
311
|
+
};
|
|
312
|
+
const isEmpty = merged.Color == undefined && merged.Height == undefined;
|
|
313
|
+
update({ Bar: isEmpty ? undefined : merged });
|
|
298
314
|
};
|
|
299
315
|
// -- Marker ----------------------------------------------------------------
|
|
300
316
|
const updateMarker = (patch) => {
|
|
301
|
-
|
|
302
|
-
|
|
317
|
+
updateTargetProperties({
|
|
318
|
+
Marker: {
|
|
303
319
|
Shape: 'Line',
|
|
304
|
-
...bullet.
|
|
320
|
+
...bullet.TargetProperties?.Marker,
|
|
305
321
|
...patch,
|
|
306
322
|
},
|
|
307
323
|
});
|
|
308
324
|
};
|
|
309
325
|
// -- Cell text -------------------------------------------------------------
|
|
310
|
-
const toggleCellText = (token,
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
326
|
+
const toggleCellText = (token, show) => {
|
|
327
|
+
update(toggleBarChartCellTextToken(bullet.CellTextProperties, token, show));
|
|
328
|
+
};
|
|
329
|
+
const onCellTextPlacementChange = (token, patch) => {
|
|
330
|
+
update({
|
|
331
|
+
CellTextProperties: patchBarChartCellTextPlacement(bullet.CellTextProperties, token, patch),
|
|
332
|
+
});
|
|
316
333
|
};
|
|
317
334
|
const toggleToolTipText = (token, checked) => {
|
|
318
335
|
const current = bullet.ToolTipText ?? [];
|
|
@@ -321,9 +338,6 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
321
338
|
: current.filter((t) => t !== token);
|
|
322
339
|
update({ ToolTipText: next });
|
|
323
340
|
};
|
|
324
|
-
const handleCellTextPositionChange = (pos) => {
|
|
325
|
-
update({ CellTextPosition: pos });
|
|
326
|
-
};
|
|
327
341
|
// -------------------------------------------------------------------------
|
|
328
342
|
// Render
|
|
329
343
|
// -------------------------------------------------------------------------
|
|
@@ -336,22 +350,27 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
336
350
|
if (variant === 'ranges') {
|
|
337
351
|
return (_jsx(Box, { children: _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Ranges" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Define qualitative bands for the bullet scale" })] }), _jsx(Card.Body, { children: _jsx(RangesComponent, { disabled: disabled, minMaxRangeValues: minMaxRangeValues, api: api, scope: scope, ranges: bullet.CellRanges, rangeValueType: bullet.RangeValueType, onRangeValueTypeChange: onRangeValueTypeChange, columnComparison: bullet.ColumnComparison, updateRanges: onUpdateRanges, updateColumnComparison: onUpdateColumnComparison, hideColumnComparison: true }) })] }) }));
|
|
338
352
|
}
|
|
339
|
-
const
|
|
340
|
-
? bullet.Target
|
|
341
|
-
:
|
|
342
|
-
|
|
353
|
+
const primaryTarget = Array.isArray(bullet.TargetProperties?.Target)
|
|
354
|
+
? bullet.TargetProperties?.Target?.[0]
|
|
355
|
+
: bullet.TargetProperties?.Target;
|
|
356
|
+
const numericTargetValue = typeof primaryTarget === 'number'
|
|
357
|
+
? primaryTarget
|
|
358
|
+
: typeof primaryTarget?.Value === 'number'
|
|
359
|
+
? primaryTarget.Value
|
|
343
360
|
: undefined;
|
|
344
|
-
const columnTargetValue = typeof
|
|
345
|
-
?
|
|
346
|
-
: typeof
|
|
347
|
-
?
|
|
361
|
+
const columnTargetValue = typeof primaryTarget === 'string' && primaryTarget !== 'Col-Avg' && primaryTarget !== 'Col-Median'
|
|
362
|
+
? primaryTarget
|
|
363
|
+
: typeof primaryTarget?.Value === 'string'
|
|
364
|
+
? primaryTarget.Value
|
|
348
365
|
: undefined;
|
|
366
|
+
const markerCfg = bullet.TargetProperties?.Marker;
|
|
349
367
|
const marker = {
|
|
350
|
-
Shape:
|
|
351
|
-
Color:
|
|
352
|
-
Size:
|
|
368
|
+
Shape: markerCfg?.Shape ?? 'Line',
|
|
369
|
+
Color: markerCfg?.Color ?? '',
|
|
370
|
+
Size: markerCfg?.Size ?? (markerCfg?.Shape === 'Line' ? 2 : 8),
|
|
353
371
|
};
|
|
354
|
-
const
|
|
372
|
+
const cellTextProperties = bullet.CellTextProperties;
|
|
373
|
+
const cellTextDisabled = !hasBarChartCellTextConfigured(cellTextProperties) || disabled;
|
|
355
374
|
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Target" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Select a target value for the bullet scale" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Target:", children: _jsx(Box, { className: "twa:max-w-[180px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: currentMode, onValueChange: (v) => handleTargetModeChange(v), items: [
|
|
356
375
|
{ value: 'None', label: 'None' },
|
|
357
376
|
{ value: 'Number', label: 'Fixed Number' },
|
|
@@ -361,8 +380,8 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
361
380
|
] }) }) }), currentMode === 'Number' && (_jsx(FormRow, { label: "Target Value:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(AdaptableInput, { type: "number", value: numericTargetValue ?? '', onChange: (e) => handleNumericTargetChange(e.target.value === '' ? undefined : Number(e.target.value)) }) }) })), currentMode === 'Column' && (_jsx(FormRow, { label: "Target Column:", children: _jsx(Box, { className: "twa:max-w-[220px]", children: _jsx(ColumnSelector, { type: "number", value: columnTargetValue ?? '', onChange: handleColumnTargetChange, filterColumn: (c) => c.columnId !== data.ColumnId, placeholder: "Select numeric column" }) }) })), currentMode !== 'None' && (_jsxs(_Fragment, { children: [_jsx(FormRow, { label: "Marker Shape:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: marker.Shape, onValueChange: (s) => updateMarker({ Shape: s }), items: MARKER_SHAPES.map((s) => ({ value: s.value, label: s.label })) }) }) }), _jsx(FormRow, { label: "Marker Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: marker.Color || undefined, onChange: (c) => updateMarker({ Color: c }) }) }), _jsx(FormRow, { label: "Marker Size:", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: marker.Size, onChange: (e) => updateMarker({ Size: Number(e.target.value) }) }) }) })] }))] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Bar" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set the bar orientation and height" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Orientation:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: bullet.Orientation ?? 'Horizontal', onValueChange: (v) => update({ Orientation: v }), items: [
|
|
362
381
|
{ value: 'Horizontal', label: 'Horizontal' },
|
|
363
382
|
{ value: 'Vertical', label: 'Vertical' },
|
|
364
|
-
] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: bullet.
|
|
365
|
-
|
|
383
|
+
] }) }) }), bullet.Orientation === 'Vertical' && (_jsx(FormRow, { label: "", children: _jsxs(Box, { className: "twa:text-xs twa:text-neutral-500", children: ["Tip: vertical bullet charts need a tall row height to be readable (we recommend at least 60px). Set ", _jsx("code", { children: "rowHeight" }), " on ", _jsx("code", { children: " gridOptions " }), " or use", ' ', _jsx("code", { children: "getRowHeight" }), "."] }) })), _jsx(FormRow, { label: "Bar Colour:", children: _jsx(ColorPicker, { disabled: disabled, api: api, value: bullet.Bar?.Color, onChange: (c) => updateBar({ Color: c }) }) }), _jsx(FormRow, { label: bullet.Orientation === 'Vertical' ? 'Bar Width (px):' : 'Bar Height (px):', children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(AdaptableInput, { type: "number", min: 1, value: bullet.Bar?.Height ?? '', onChange: (e) => updateBar({
|
|
384
|
+
Height: e.target.value === '' ? undefined : Number(e.target.value),
|
|
366
385
|
}), placeholder: "8" }) }) }), _jsx(FormRow, { label: "Origin:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: typeof bullet.Origin === 'number' ? 'Number' : (bullet.Origin ?? 'Auto'), onValueChange: (v) => {
|
|
367
386
|
if (v === 'Auto' || v === 'Zero') {
|
|
368
387
|
update({ Origin: v });
|
|
@@ -373,20 +392,7 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
373
392
|
}, items: [
|
|
374
393
|
{ value: 'Auto', label: 'Auto' },
|
|
375
394
|
{ value: 'Zero', label: 'Zero' },
|
|
376
|
-
] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "
|
|
377
|
-
{
|
|
378
|
-
label: 'Above Bar',
|
|
379
|
-
onClick: () => handleCellTextPositionChange('Above'),
|
|
380
|
-
},
|
|
381
|
-
{
|
|
382
|
-
label: 'Below Bar',
|
|
383
|
-
onClick: () => handleCellTextPositionChange('Below'),
|
|
384
|
-
},
|
|
385
|
-
{
|
|
386
|
-
label: 'Merged',
|
|
387
|
-
onClick: () => handleCellTextPositionChange('Merged'),
|
|
388
|
-
},
|
|
389
|
-
], children: bullet.CellTextPosition ?? 'Below' }) })] }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
|
|
395
|
+
] }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Pick which values to display and where each one sits around the bar" })] }), _jsxs(Card.Body, { children: [_jsx(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: _jsx(FormRow, { label: "Cell Text Layout:", children: _jsx(BarChartCellTextLayoutEditor, { disabled: disabled, cellTextProperties: cellTextProperties, onToggle: toggleCellText, onPlacementChange: onCellTextPlacementChange }) }) }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: cellTextDisabled, value: bullet.Font, onChange: (next) => {
|
|
390
396
|
if (next) {
|
|
391
397
|
update({ Font: next });
|
|
392
398
|
}
|
|
@@ -10,6 +10,7 @@ import { NumberInput } from '../../../components/Input/NumberInput';
|
|
|
10
10
|
import { DEFAULT_GRADIENT_MAX_ALPHA, DEFAULT_GRADIENT_MIN_ALPHA, } from '../../../Utilities/Helpers/StyledColumnGradientHelper';
|
|
11
11
|
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
12
12
|
import { Card } from '../../../components/Card';
|
|
13
|
+
import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
|
|
13
14
|
import { StyledColumnGradientPreviewCard } from './StyledColumnWizardStyleSection/Components/StyledColumnGradientPreview';
|
|
14
15
|
const STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
15
16
|
function formatGradientToolTipSummary(opts) {
|
|
@@ -51,7 +52,7 @@ export const renderStyledColumnGradientStyleSummary = (data) => {
|
|
|
51
52
|
return _jsx(Tag, { children: "No Styling Defined" });
|
|
52
53
|
}
|
|
53
54
|
const items = buildStyledColumnGradientStyleSummaryStrings(gs, { includeEmptyTooltip: true });
|
|
54
|
-
return (
|
|
55
|
+
return renderSummaryStringTags(items);
|
|
55
56
|
};
|
|
56
57
|
export const StyledColumnWizardGradientSection = (props) => {
|
|
57
58
|
const { data, api } = useOnePageAdaptableWizardContext();
|
|
@@ -5,17 +5,22 @@ import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
|
5
5
|
import { Tag } from '../../../components/Tag';
|
|
6
6
|
import { CheckBox } from '../../../components/CheckBox';
|
|
7
7
|
import SimpleButton from '../../../components/SimpleButton';
|
|
8
|
+
import { ButtonNew } from '../../Components/Buttons/ButtonNew';
|
|
8
9
|
import { SingleSelect } from '../../../components/NewSelect';
|
|
9
10
|
import { NumberInput } from '../../../components/Input/NumberInput';
|
|
10
11
|
import Input from '../../../components/Input';
|
|
12
|
+
import { Popover, PopoverContent, PopoverTrigger } from '../../../components/ui/popover';
|
|
13
|
+
import { IconSelectorPanel } from '../../../components/IconSelector';
|
|
11
14
|
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
12
|
-
import {
|
|
15
|
+
import { useAdaptable } from '../../AdaptableContext';
|
|
13
16
|
import { AdaptableIconComponent } from '../../Components/AdaptableIconComponent';
|
|
14
17
|
import { ICON_STYLE_PRESET_DESCRIPTIONS, ICON_STYLE_PRESET_LABELS, getIconStylePresetMappings, } from '../../../Utilities/Helpers/IconStylePresets';
|
|
15
18
|
import { resolveEffectiveIconStyleMappings, resolveIconStyleMappingsForSummaryPreview } from '../../../agGrid/cellRenderers/IconRenderer';
|
|
16
19
|
import { Card } from '../../../components/Card';
|
|
20
|
+
import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
|
|
17
21
|
import { getCellBoxStyleSummaryItems, getCellFontStyleSummaryItems, StyledColumnCellStyleEditor, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
18
22
|
import { StyledColumnIconPreviewCard } from './StyledColumnWizardStyleSection/Components/StyledColumnIconPreview';
|
|
23
|
+
import { wizardSelectionSimpleButtonProps } from '../../../Utilities/wizardSelection';
|
|
19
24
|
const STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
20
25
|
const detectIconKind = (spec) => {
|
|
21
26
|
if (typeof spec === 'string')
|
|
@@ -73,8 +78,9 @@ export const getStyledColumnIconMappingsViewValues = (data) => {
|
|
|
73
78
|
if (ic.MatchMode && ic.MatchMode !== 'Exact') {
|
|
74
79
|
items.push(`Match Mode: ${ic.MatchMode}`);
|
|
75
80
|
}
|
|
76
|
-
|
|
77
|
-
|
|
81
|
+
const fallbackMode = ic.FallbackProperties?.Mode;
|
|
82
|
+
if (fallbackMode && fallbackMode !== 'Hide') {
|
|
83
|
+
items.push(`Fallback: ${fallbackMode}`);
|
|
78
84
|
}
|
|
79
85
|
return items;
|
|
80
86
|
};
|
|
@@ -86,9 +92,10 @@ const buildStyledColumnIconStyleSummaryStrings = (ic, options) => {
|
|
|
86
92
|
if (ic.Gap != null) {
|
|
87
93
|
items.push(`Gap: ${ic.Gap}px`);
|
|
88
94
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
items.push(`Cell Text
|
|
95
|
+
const ctp = ic.CellTextProperties;
|
|
96
|
+
if (ctp?.CellText?.length) {
|
|
97
|
+
items.push(`Cell Text: ${formatIconCellTextSummary(ctp.CellText)}`);
|
|
98
|
+
items.push(`Cell Text Position: ${ctp.CellTextPosition ?? 'After'}`);
|
|
92
99
|
}
|
|
93
100
|
else if (options.includeEmptyCellText) {
|
|
94
101
|
items.push('Cell Text: None');
|
|
@@ -125,7 +132,7 @@ export const renderStyledColumnIconMappingsSummary = (data) => {
|
|
|
125
132
|
}
|
|
126
133
|
const tagItems = getStyledColumnIconMappingsViewValues(data);
|
|
127
134
|
const previewMappings = resolveIconStyleMappingsForSummaryPreview(ic);
|
|
128
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [
|
|
135
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [renderSummaryStringTags(tagItems), renderMappingsPreview(previewMappings)] }));
|
|
129
136
|
};
|
|
130
137
|
export const StyledColumnIconMappingsView = ({ data }) => renderStyledColumnIconMappingsSummary(data);
|
|
131
138
|
/** Style step summary (size, text, tooltip, font / cell). */
|
|
@@ -141,7 +148,7 @@ export const renderStyledColumnIconStyleSummary = (data) => {
|
|
|
141
148
|
if (!items.length) {
|
|
142
149
|
return _jsx(Tag, { children: "No Style Defined" });
|
|
143
150
|
}
|
|
144
|
-
return (
|
|
151
|
+
return renderSummaryStringTags(items);
|
|
145
152
|
};
|
|
146
153
|
/**
|
|
147
154
|
* Combined summary for the Styled Columns list row (preview + key facts).
|
|
@@ -172,11 +179,7 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
172
179
|
const iconStyle = data.IconStyle ?? {};
|
|
173
180
|
const mappings = iconStyle.Mappings ?? [];
|
|
174
181
|
const disabled = !data.ColumnId;
|
|
175
|
-
|
|
176
|
-
// a single row at a time to keep the table tidy and to avoid having
|
|
177
|
-
// multiple editors fighting for screen space.
|
|
178
|
-
const [editingRow, setEditingRow] = React.useState(null);
|
|
179
|
-
const [fallbackIconEditing, setFallbackIconEditing] = React.useState(false);
|
|
182
|
+
const [autoOpenPickerIndex, setAutoOpenPickerIndex] = React.useState(null);
|
|
180
183
|
const update = (patch) => {
|
|
181
184
|
props.onChange({
|
|
182
185
|
...data,
|
|
@@ -236,9 +239,7 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
236
239
|
};
|
|
237
240
|
const removeMapping = (index) => {
|
|
238
241
|
setMappings(mappings.filter((_, i) => i !== index));
|
|
239
|
-
|
|
240
|
-
// want the wrong row to suddenly appear expanded.
|
|
241
|
-
setEditingRow(null);
|
|
242
|
+
setAutoOpenPickerIndex(null);
|
|
242
243
|
};
|
|
243
244
|
const addMapping = () => {
|
|
244
245
|
const next = [
|
|
@@ -249,18 +250,40 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
249
250
|
},
|
|
250
251
|
];
|
|
251
252
|
setMappings(next);
|
|
252
|
-
|
|
253
|
-
setEditingRow(next.length - 1);
|
|
253
|
+
setAutoOpenPickerIndex(next.length - 1);
|
|
254
254
|
};
|
|
255
255
|
// -----------------------------------------------------------------------
|
|
256
256
|
// CellText helpers
|
|
257
257
|
// -----------------------------------------------------------------------
|
|
258
|
+
const updateCellTextProperties = (patch) => {
|
|
259
|
+
const merged = {
|
|
260
|
+
...iconStyle.CellTextProperties,
|
|
261
|
+
...patch,
|
|
262
|
+
};
|
|
263
|
+
// Strip the wrapper when both inner properties are unset, so empty state
|
|
264
|
+
// serialises cleanly.
|
|
265
|
+
const isEmpty = !merged.CellText?.length && merged.CellTextPosition == undefined;
|
|
266
|
+
update({ CellTextProperties: isEmpty ? undefined : merged });
|
|
267
|
+
};
|
|
258
268
|
const toggleCellText = (token, checked) => {
|
|
259
|
-
const current = iconStyle.CellText ?? [];
|
|
269
|
+
const current = iconStyle.CellTextProperties?.CellText ?? [];
|
|
260
270
|
const next = checked
|
|
261
271
|
? Array.from(new Set([...current, token]))
|
|
262
272
|
: current.filter((t) => t !== token);
|
|
263
|
-
|
|
273
|
+
updateCellTextProperties({ CellText: next });
|
|
274
|
+
};
|
|
275
|
+
// -----------------------------------------------------------------------
|
|
276
|
+
// Fallback helpers
|
|
277
|
+
// -----------------------------------------------------------------------
|
|
278
|
+
const updateFallbackProperties = (patch) => {
|
|
279
|
+
const merged = {
|
|
280
|
+
...iconStyle.FallbackProperties,
|
|
281
|
+
...patch,
|
|
282
|
+
};
|
|
283
|
+
// Strip the wrapper when there's nothing to remember; the renderer
|
|
284
|
+
// already defaults to `Mode: 'Hide'` when `FallbackProperties` is unset.
|
|
285
|
+
const isEmpty = (merged.Mode == undefined || merged.Mode === 'Hide') && merged.Icon == undefined;
|
|
286
|
+
update({ FallbackProperties: isEmpty ? undefined : merged });
|
|
264
287
|
};
|
|
265
288
|
const toggleToolTipText = (token, checked) => {
|
|
266
289
|
const current = iconStyle.ToolTipText ?? [];
|
|
@@ -276,27 +299,27 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
276
299
|
const presetMappingsPreview = iconStyle.Preset
|
|
277
300
|
? getIconStylePresetMappings(iconStyle.Preset)
|
|
278
301
|
: [];
|
|
279
|
-
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Presets" }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Contains most commonly used values; add anything missing in", ' ', _jsx("strong", { children: "Custom mappings" }), " below"] })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Select Preset:", children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [['Flags', 'Currencies', 'Trend', 'Status'].map((p) => (_jsx(SimpleButton, {
|
|
302
|
+
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Presets" }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Contains most commonly used values; add anything missing in", ' ', _jsx("strong", { children: "Custom mappings" }), " below"] })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Select Preset:", children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:flex-wrap", children: [['Flags', 'Currencies', 'Trend', 'Status'].map((p) => (_jsx(SimpleButton, { ...wizardSelectionSimpleButtonProps(iconStyle.Preset === p), onClick: () => applyPreset(p), children: ICON_STYLE_PRESET_LABELS[p] }, p))), iconStyle.Preset && (_jsx(SimpleButton, { variant: "text", icon: "undo", tooltip: "Stop using this preset (custom mappings are kept)", onClick: clearPreset, children: "Clear preset" }))] }) }), iconStyle.Preset && (_jsx(FormRow, { label: "Active:", children: _jsxs(Flex, { flexDirection: "column", className: "twa:gap-1 twa:max-w-[640px]", children: [_jsxs(Box, { className: "twa:text-xs twa:opacity-70", children: [ICON_STYLE_PRESET_DESCRIPTIONS[iconStyle.Preset], " \u2014", ' ', presetMappingsPreview.length, " mappings shipped with the preset."] }), renderMappingsPreview(presetMappingsPreview)] }) }))] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Custom Mappings" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: iconStyle.Preset
|
|
280
303
|
? 'Add any mappings that are not present in the selected preset'
|
|
281
304
|
: 'Add custom mappings entries (icon, key and description)' })] }), _jsxs(Card.Body, { children: [mappings.length === 0 ? (_jsx(Box, { className: "twa:text-xs twa:opacity-60 twa:max-w-[520px] twa:mb-2", children: iconStyle.Preset
|
|
282
305
|
? 'No custom mappings — the preset above is being used as-is'
|
|
283
|
-
: 'No mappings applied - select a preset above or click "Add Mapping" to define your own' })) : (_jsxs(Box, { className: "twa:max-w-[720px]", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:px-2 twa:py-1 twa:text-xs twa:opacity-60", children: [_jsx(Box, { className: "twa:w-[44px] twa:shrink-0" }), _jsx(Box, { className: "twa:min-w-0 twa:flex-1", children: "Key" }), _jsx(Box, { className: "twa:min-w-0 twa:flex-1", children: "Description" }), _jsx(Box, { className: "twa:w-8 twa:shrink-0" })] }), mappings.map((m, i) => {
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
{ value: 'Exact', label: 'Exact
|
|
306
|
+
: 'No mappings applied - select a preset above or click "Add Mapping" to define your own' })) : (_jsxs(Box, { className: "twa:max-w-[720px]", children: [_jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:px-2 twa:py-1 twa:text-xs twa:opacity-60", children: [_jsx(Box, { className: "twa:w-[44px] twa:shrink-0" }), _jsx(Box, { className: "twa:min-w-0 twa:flex-1", children: "Key" }), _jsx(Box, { className: "twa:min-w-0 twa:flex-1", children: "Description" }), _jsx(Box, { className: "twa:w-8 twa:shrink-0" })] }), mappings.map((m, i) => (_jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:px-2 twa:py-1 twa:rounded twa:hover:bg-[var(--ab-color-primarylight)]", children: [_jsx(Box, { className: "twa:w-[44px] twa:shrink-0 twa:flex twa:justify-center", children: _jsx(IconPickerButton, { value: m.Icon, defaultOpen: autoOpenPickerIndex === i, onOpenChange: (open) => {
|
|
307
|
+
if (!open && autoOpenPickerIndex === i) {
|
|
308
|
+
setAutoOpenPickerIndex(null);
|
|
309
|
+
}
|
|
310
|
+
}, onChange: (next) => updateMapping(i, { Icon: next }) }) }), _jsx(Box, { className: "twa:min-w-0 twa:flex-1", children: _jsx(Input, { className: "twa:w-full", value: String(m.Key ?? ''), onChange: (e) => updateMapping(i, { Key: e.target.value }), placeholder: "Cell value" }) }), _jsx(Box, { className: "twa:min-w-0 twa:flex-1", children: _jsx(Input, { className: "twa:w-full", value: m.Description ?? '', onChange: (e) => updateMapping(i, {
|
|
311
|
+
Description: e.target.value || undefined,
|
|
312
|
+
}), placeholder: "Tooltip label (optional)" }) }), _jsx(Box, { className: "twa:w-8 twa:shrink-0 twa:flex twa:justify-center", children: _jsx(SimpleButton, { icon: "delete", variant: "text", tooltip: "Remove mapping", onClick: () => removeMapping(i) }) })] }, i)))] })), _jsx(Box, { className: "twa:mt-2", children: _jsx(ButtonNew, { onClick: addMapping, children: "Add Mapping" }) })] })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Matching" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "How keys are compared to cell values, and what to render when no mapping matches" })] }), _jsx(Card.Body, { children: _jsxs(FormLayout, { children: [_jsx(FormRow, { label: "Match Mode:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.MatchMode ?? 'Exact', onValueChange: (v) => update({ MatchMode: v }), items: [
|
|
313
|
+
{ value: 'Exact', label: 'Exact Match Required' },
|
|
291
314
|
{ value: 'CaseInsensitive', label: 'Case-insensitive (strings)' },
|
|
292
|
-
] }) }) }), _jsx(FormRow, { label: "Fallback:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.
|
|
315
|
+
] }) }) }), _jsx(FormRow, { label: "Fallback:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.FallbackProperties?.Mode ?? 'Hide', onValueChange: (v) => updateFallbackProperties({ Mode: v }), items: [
|
|
293
316
|
{ value: 'Hide', label: 'Show No Value' },
|
|
294
317
|
{ value: 'ShowText', label: 'Show Raw Value' },
|
|
295
318
|
{ value: 'Icon', label: 'Show Fallback Icon' },
|
|
296
|
-
] }) }) }), iconStyle.
|
|
319
|
+
] }) }) }), iconStyle.FallbackProperties?.Mode === 'Icon' && (_jsx(FormRow, { label: "Fallback Icon:", children: _jsx(IconPickerButton, { value: iconStyle.FallbackProperties?.Icon, onChange: (next) => updateFallbackProperties({ Icon: next }) }) }))] }) })] })] }));
|
|
297
320
|
}
|
|
298
321
|
// ----- Style variant (wizard step title: "Style") ------------------------
|
|
299
|
-
const cellText = iconStyle.CellText ?? [];
|
|
322
|
+
const cellText = iconStyle.CellTextProperties?.CellText ?? [];
|
|
300
323
|
const toolTipText = iconStyle.ToolTipText ?? [];
|
|
301
324
|
const cellTextDisabled = cellText.length === 0;
|
|
302
325
|
return (_jsxs(Box, { children: [_jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsx(Card.Title, { children: "Sizing" }), _jsx(Card.Body, { children: _jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsx(FormRow, { label: "Icon Size (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(Input, { type: "number", min: 8, step: 1, value: iconStyle.Size ?? '', placeholder: "18", className: "twa:w-full", onChange: (event) => {
|
|
@@ -309,14 +332,39 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
309
332
|
update({
|
|
310
333
|
Size: Number.isFinite(parsed) && parsed >= 8 ? parsed : undefined,
|
|
311
334
|
});
|
|
312
|
-
} }) }) }), _jsx(FormRow, { label: "Gap (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(NumberInput, { value: iconStyle.Gap ?? '', placeholder: "4", min: 0, step: 1, onChange: (value) => update({ Gap: typeof value === 'number' ? value : undefined }) }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optionally show the raw value or the matched description alongside the icon (e.g. flag plus label)." })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { checked: cellText.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: cellText.includes('IconDescription'), onChange: (checked) => toggleCellText('IconDescription', checked), children: "Description" })] }), _jsx(FormRow, { label: "Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.CellTextPosition ?? 'After', onValueChange: (v) =>
|
|
335
|
+
} }) }) }), _jsx(FormRow, { label: "Gap (px):", children: _jsx(Box, { className: "twa:max-w-[100px]", children: _jsx(NumberInput, { value: iconStyle.Gap ?? '', placeholder: "4", min: 0, step: 1, onChange: (value) => update({ Gap: typeof value === 'number' ? value : undefined }) }) }) })] }) })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell Text" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optionally show the raw value or the matched description alongside the icon (e.g. flag plus label)." })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { checked: cellText.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: cellText.includes('IconDescription'), onChange: (checked) => toggleCellText('IconDescription', checked), children: "Description" })] }), _jsx(FormRow, { label: "Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.CellTextProperties?.CellTextPosition ?? 'After', onValueChange: (v) => updateCellTextProperties({
|
|
336
|
+
CellTextPosition: v,
|
|
337
|
+
}), items: [
|
|
313
338
|
{ value: 'Before', label: 'Before' },
|
|
314
339
|
{ value: 'After', label: 'After' },
|
|
315
340
|
{ value: 'Above', label: 'Above' },
|
|
316
341
|
{ value: 'Below', label: 'Below' },
|
|
317
342
|
] }) }) })] }), _jsx(Box, { className: `twa:mt-3 twa:pt-3 twa:border-t twa:border-foreground/15 ${cellTextDisabled ? 'twa:opacity-50' : ''}`, children: _jsx(StyledColumnFontStyleEditor, { api: api, disabled: disabled || cellTextDisabled, value: iconStyle.Font, onChange: onFontChange }) })] })] }), _jsxs(Card, { shadow: false, className: "twa:mb-3", children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Tooltip" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether and how to display a tooltip" })] }), _jsx(Card.Body, { children: _jsx(FormLayout, { sizes: [...STYLE_FORM_SIZES], children: _jsxs(FormRow, { label: "Tooltip Display:", children: [_jsx(CheckBox, { checked: toolTipText.includes('CellValue'), onChange: (checked) => toggleToolTipText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { className: "twa:ml-3", checked: toolTipText.includes('IconDescription'), onChange: (checked) => toggleToolTipText('IconDescription', checked), children: "Description" })] }) }) })] }), _jsxs(Card, { shadow: false, children: [_jsxs(Card.Title, { children: [_jsx(Box, { className: "twa:font-medium", children: "Cell" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Optional cell box styling (overrides Format Column properties)" })] }), _jsx(Card.Body, { children: _jsx(StyledColumnCellStyleEditor, { api: api, disabled: disabled, value: iconStyle.Cell, onChange: onCellChange }) })] }), _jsx(StyledColumnIconPreviewCard, { data: data })] }));
|
|
318
343
|
};
|
|
344
|
+
// ---------------------------------------------------------------------------
|
|
345
|
+
// Icon picker — click-to-open popover (closes on outside click or system pick)
|
|
346
|
+
// ---------------------------------------------------------------------------
|
|
347
|
+
const ICON_KIND_OPTIONS = [
|
|
348
|
+
{ value: 'Emoji', label: 'Emoji' },
|
|
349
|
+
{ value: 'System', label: 'Built-in' },
|
|
350
|
+
{ value: 'Url', label: 'Image URL' },
|
|
351
|
+
];
|
|
352
|
+
const IconPickerButton = (props) => {
|
|
353
|
+
const [open, setOpen] = React.useState(props.defaultOpen ?? false);
|
|
354
|
+
React.useEffect(() => {
|
|
355
|
+
if (props.defaultOpen) {
|
|
356
|
+
setOpen(true);
|
|
357
|
+
}
|
|
358
|
+
}, [props.defaultOpen]);
|
|
359
|
+
const handleOpenChange = (next) => {
|
|
360
|
+
setOpen(next);
|
|
361
|
+
props.onOpenChange?.(next);
|
|
362
|
+
};
|
|
363
|
+
return (_jsxs(Popover, { open: open, onOpenChange: handleOpenChange, children: [_jsx(PopoverTrigger, { nativeButton: true, render: _jsx(SimpleButton, { type: "button", tooltip: "Choose icon", ...wizardSelectionSimpleButtonProps(open, 'twa:!min-w-[40px] twa:!w-10 twa:!h-10 twa:!p-0 twa:justify-center twa:items-center'), children: previewIcon(props.value) }) }), _jsx(PopoverContent, { align: "start", side: "bottom", sideOffset: 8, className: "twa:!w-[300px] twa:max-w-[300px] twa:p-3 twa:gap-0", children: _jsx(IconSpecEditorFields, { value: props.value, onChange: props.onChange, onSystemIconSelected: () => handleOpenChange(false) }) })] }));
|
|
364
|
+
};
|
|
319
365
|
const IconSpecEditorFields = (props) => {
|
|
366
|
+
const adaptable = useAdaptable();
|
|
367
|
+
const customIcons = adaptable.api.userInterfaceApi.getCustomIcons();
|
|
320
368
|
const kind = detectIconKind(props.value);
|
|
321
369
|
const [pendingKind, setPendingKind] = React.useState(null);
|
|
322
370
|
const prevValueRef = React.useRef(props.value);
|
|
@@ -344,13 +392,10 @@ const IconSpecEditorFields = (props) => {
|
|
|
344
392
|
? props.value.name
|
|
345
393
|
: undefined;
|
|
346
394
|
const urlSrc = isObject && 'src' in props.value ? props.value.src : '';
|
|
347
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-
|
|
348
|
-
{ value: 'Emoji', label: 'Emoji / text' },
|
|
349
|
-
{ value: 'System', label: 'System' },
|
|
350
|
-
{ value: 'Url', label: 'Image URL' },
|
|
351
|
-
] }), effectiveKind === 'Emoji' && (_jsx(Input, { className: "twa:w-full", value: typeof props.value === 'string' ? props.value : '', onChange: (e) => props.onChange(e.target.value), placeholder: "\uD83C\uDDFA\uD83C\uDDF8 $ \u2B06" })), effectiveKind === 'System' && (_jsx(AdaptableIconSelector, { clearable: false, value: systemName, onChange: (iconName) => {
|
|
395
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-3 twa:w-full", children: [_jsx(Box, { className: "twa:grid twa:grid-cols-3 twa:gap-1 twa:w-full", role: "tablist", "aria-label": "Icon type", children: ICON_KIND_OPTIONS.map((option) => (_jsx(SimpleButton, { type: "button", role: "tab", "aria-selected": effectiveKind === option.value, ...wizardSelectionSimpleButtonProps(effectiveKind === option.value, 'twa:w-full twa:min-h-[32px] twa:h-8 twa:px-1 twa:text-xs twa:leading-tight'), onClick: () => onKindChange(option.value), children: option.label }, option.value))) }), effectiveKind === 'Emoji' && (_jsx(Input, { className: "twa:w-full", value: typeof props.value === 'string' ? props.value : '', onChange: (e) => props.onChange(e.target.value), placeholder: "\uD83C\uDDFA\uD83C\uDDF8 $ \u2B06" })), effectiveKind === 'System' && (_jsx(IconSelectorPanel, { className: "twa:p-0", showTitle: false, customIcons: customIcons, value: systemName, onChange: (iconName) => {
|
|
352
396
|
if (iconName) {
|
|
353
397
|
props.onChange({ name: iconName });
|
|
398
|
+
props.onSystemIconSelected?.();
|
|
354
399
|
}
|
|
355
400
|
} })), effectiveKind === 'Url' && (_jsx(Input, { className: "twa:w-full", value: urlSrc, onChange: (e) => props.onChange({ src: e.target.value }), placeholder: "https://\u2026" }))] }));
|
|
356
401
|
};
|