@adaptabletools/adaptable 23.0.0-canary.5 → 23.0.0-canary.7
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 +756 -257
- 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 +2 -2
- 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/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/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.js +7 -5
- 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 +2 -1
- 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 +3 -4
- 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 +4 -4
- 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 +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +4 -4
- 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.js +2 -2
- package/src/View/Components/ColumnFilter/ColumnFilter.js +2 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +0 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +3 -1
- 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 +1 -1
- 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 +2 -4
- 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/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/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 +11 -11
- 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 +2 -0
- 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 +137 -119
- 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 +8 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +46 -28
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +98 -43
- 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/StyledColumnWizardStyleSection.js +11 -6
- 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/AdaptableAgGrid.js +1 -1
- package/src/agGrid/AgGridAdapter.js +0 -5
- package/src/agGrid/AgGridColumnAdapter.js +2 -2
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
- 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.js +1 -1
- package/src/types.d.ts +1 -1
- 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/DropdownButtonItem.js +0 -1
- 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
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Box } from '../../../components/Flex';
|
|
3
|
+
import { Badge } from '../../Components/Badge';
|
|
4
|
+
import { RatingPreview } from './StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview';
|
|
5
|
+
import { WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS } from '../../Wizard/WizardTypeSelection';
|
|
6
|
+
const THUMBNAIL_FRAME_CLASS = WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS;
|
|
7
|
+
const THUMBNAIL_SVG_CLASS = 'twa:block twa:h-[22px] twa:w-full';
|
|
8
|
+
const DEFAULT_BAR = 'var(--ab-color-accent, #07c)';
|
|
9
|
+
const DEFAULT_TRACK = 'color-mix(in srgb, var(--ab-color-foreground) 30%, transparent)';
|
|
10
|
+
const DEFAULT_MARKER = 'var(--ab-color-foreground, #333)';
|
|
11
|
+
const flagEmoji = (countryCodeAlpha2) => {
|
|
12
|
+
const cc = countryCodeAlpha2.toUpperCase();
|
|
13
|
+
if (cc.length !== 2) {
|
|
14
|
+
return cc;
|
|
15
|
+
}
|
|
16
|
+
const regionalIndicatorBase = 0x1f1a5;
|
|
17
|
+
return String.fromCodePoint(regionalIndicatorBase + cc.charCodeAt(0), regionalIndicatorBase + cc.charCodeAt(1));
|
|
18
|
+
};
|
|
19
|
+
const BadgeThumbnail = () => (_jsx(Box, { className: `${THUMBNAIL_FRAME_CLASS} twa:justify-start`, children: _jsxs("div", { className: "ab-Badge__wrapper ab-Badge__wrapper--truncate", style: { gap: 4 }, children: [_jsx(Badge, { pillStyle: { BackColor: '#e8f5e9', ForeColor: '#2e7d32' }, shape: "Pill", density: "Compact", children: "Buy" }), _jsx(Badge, { pillStyle: { BackColor: '#ffebee', ForeColor: '#c62828' }, shape: "Pill", density: "Compact", children: "Sell" })] }) }));
|
|
20
|
+
const IconThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, style: { gap: 10 }, children: ['US', 'GB', 'FR'].map((code) => (_jsx("span", { className: "ab-IconStyle__glyph", style: {
|
|
21
|
+
fontSize: 18,
|
|
22
|
+
lineHeight: 1,
|
|
23
|
+
display: 'inline-flex',
|
|
24
|
+
alignItems: 'center',
|
|
25
|
+
justifyContent: 'center',
|
|
26
|
+
}, children: flagEmoji(code) }, code))) }));
|
|
27
|
+
const RatingThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsx(RatingPreview, { rating: { Max: 5, AllowHalf: true }, value: 3.5 }) }));
|
|
28
|
+
const GradientThumbnail = () => (_jsx(Box, { className: `${THUMBNAIL_FRAME_CLASS} twa:gap-1 twa:px-1`, children: [
|
|
29
|
+
{ label: '42', background: '#63be7b' },
|
|
30
|
+
{ label: '68', background: '#ffeb84' },
|
|
31
|
+
{ label: '91', background: '#f8696b' },
|
|
32
|
+
].map((cell) => (_jsx(Box, { className: "twa:flex-1 twa:rounded-sm twa:px-1 twa:py-0.5 twa:text-center twa:text-2 twa:leading-tight", style: { background: cell.background, color: '#1a1a1a' }, children: cell.label }, cell.label))) }));
|
|
33
|
+
const PercentBarThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsx(Box, { className: "twa:relative twa:h-[6px] twa:w-full twa:rounded-sm", style: { background: DEFAULT_TRACK }, children: _jsx(Box, { className: "twa:absolute twa:top-0 twa:h-full twa:rounded-sm", style: { left: '8%', width: '62%', background: DEFAULT_BAR } }) }) }));
|
|
34
|
+
const BulletThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsxs("svg", { className: THUMBNAIL_SVG_CLASS, viewBox: "0 0 100 22", preserveAspectRatio: "none", "aria-hidden": true, children: [_jsx("rect", { x: "0", y: "2", width: "33", height: "18", fill: "#f8696b", opacity: "0.45" }), _jsx("rect", { x: "33", y: "2", width: "34", height: "18", fill: "#ffeb84", opacity: "0.45" }), _jsx("rect", { x: "67", y: "2", width: "33", height: "18", fill: "#63be7b", opacity: "0.45" }), _jsx("rect", { x: "4", y: "7", width: "52", height: "8", rx: "1", fill: DEFAULT_BAR }), _jsx("line", { x1: "78", y1: "3", x2: "78", y2: "19", stroke: DEFAULT_MARKER, strokeWidth: "2.5", vectorEffect: "non-scaling-stroke" })] }) }));
|
|
35
|
+
const RangeBarThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsxs("svg", { className: THUMBNAIL_SVG_CLASS, viewBox: "0 0 100 22", preserveAspectRatio: "none", "aria-hidden": true, children: [_jsx("rect", { x: "0", y: "0", width: "100", height: "22", fill: "transparent" }), _jsx("rect", { x: "2", y: "8", width: "96", height: "6", rx: "1", fill: DEFAULT_TRACK }), _jsx("line", { x1: "38", y1: "4", x2: "38", y2: "18", stroke: DEFAULT_MARKER, strokeWidth: "2", vectorEffect: "non-scaling-stroke" }), _jsx("polygon", { points: "72,4 82,11 72,18", fill: DEFAULT_BAR })] }) }));
|
|
36
|
+
const SparklineThumbnail = () => (_jsx(Box, { className: THUMBNAIL_FRAME_CLASS, children: _jsxs("svg", { className: THUMBNAIL_SVG_CLASS, viewBox: "0 0 100 22", preserveAspectRatio: "none", "aria-hidden": true, children: [_jsx("polyline", { points: "0,16 12,12 24,14 36,8 48,10 60,4 72,7 84,3 100,6", fill: "none", stroke: DEFAULT_BAR, strokeWidth: "1.75", vectorEffect: "non-scaling-stroke" }), _jsx("polygon", { points: "0,22 0,16 12,12 24,14 36,8 48,10 60,4 72,7 84,3 100,6 100,22", fill: DEFAULT_BAR, opacity: "0.15" })] }) }));
|
|
37
|
+
const THUMBNAIL_BY_TYPE = {
|
|
38
|
+
badge: BadgeThumbnail,
|
|
39
|
+
icon: IconThumbnail,
|
|
40
|
+
rating: RatingThumbnail,
|
|
41
|
+
gradient: GradientThumbnail,
|
|
42
|
+
percent: PercentBarThumbnail,
|
|
43
|
+
bullet: BulletThumbnail,
|
|
44
|
+
rangeBar: RangeBarThumbnail,
|
|
45
|
+
sparkline: SparklineThumbnail,
|
|
46
|
+
};
|
|
47
|
+
export const StyledColumnTypeThumbnail = ({ type }) => {
|
|
48
|
+
const Thumbnail = THUMBNAIL_BY_TYPE[type];
|
|
49
|
+
return (_jsx(Box, { "aria-hidden": true, className: "twa:w-full", children: _jsx(Thumbnail, {}) }));
|
|
50
|
+
};
|
|
@@ -4,4 +4,6 @@ import { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
|
4
4
|
export interface StyledColumnWizardProps extends AdaptableOnePageWizardProps<StyledColumn> {
|
|
5
5
|
isNew: boolean;
|
|
6
6
|
}
|
|
7
|
+
/** First wizard step to open when editing an existing Styled Column (column menu, settings list, etc.). */
|
|
8
|
+
export declare const getStyledColumnEditDefaultSectionName: (styledColumn: StyledColumn) => string;
|
|
7
9
|
export declare const StyledColumnWizard: (props: StyledColumnWizardProps) => React.JSX.Element;
|
|
@@ -53,10 +53,33 @@ const computeDefaultStyledColumnName = (sc) => {
|
|
|
53
53
|
}
|
|
54
54
|
return `${typeKey}-${sc.ColumnId || 'column'}`;
|
|
55
55
|
};
|
|
56
|
+
/** First wizard step to open when editing an existing Styled Column (column menu, settings list, etc.). */
|
|
57
|
+
export const getStyledColumnEditDefaultSectionName = (styledColumn) => {
|
|
58
|
+
if (styledColumn.BadgeStyle) {
|
|
59
|
+
return 'Badges';
|
|
60
|
+
}
|
|
61
|
+
if (styledColumn.GradientStyle || styledColumn.PercentBarStyle) {
|
|
62
|
+
return 'Ranges';
|
|
63
|
+
}
|
|
64
|
+
if (styledColumn.BulletChartStyle) {
|
|
65
|
+
return 'Ranges';
|
|
66
|
+
}
|
|
67
|
+
if (styledColumn.RangeBarStyle) {
|
|
68
|
+
return 'Style';
|
|
69
|
+
}
|
|
70
|
+
if (styledColumn.IconStyle) {
|
|
71
|
+
return 'Mappings';
|
|
72
|
+
}
|
|
73
|
+
return 'Style';
|
|
74
|
+
};
|
|
56
75
|
export const StyledColumnWizard = (props) => {
|
|
57
76
|
const data = props.data ?? props.popupParams?.value;
|
|
58
77
|
const popupDefaultCurrentSectionName = props?.popupParams?.config?.defaultCurrentSectionName ?? undefined;
|
|
59
|
-
const
|
|
78
|
+
const hasExistingData = Boolean(data);
|
|
79
|
+
const isEdit = hasExistingData && props.popupParams?.action !== 'New';
|
|
80
|
+
const defaultCurrentSectionName = props.defaultCurrentSectionName ??
|
|
81
|
+
popupDefaultCurrentSectionName ??
|
|
82
|
+
(isEdit ? getStyledColumnEditDefaultSectionName(data) : undefined);
|
|
60
83
|
const allStyledColumns = useSelector((state) => state.StyledColumn?.StyledColumns ?? []);
|
|
61
84
|
const [styledColumn, setStyledColumn] = useState(() => {
|
|
62
85
|
if (data) {
|
|
@@ -111,7 +134,7 @@ export const StyledColumnWizard = (props) => {
|
|
|
111
134
|
}
|
|
112
135
|
else if (styledColumn.GradientStyle || styledColumn.PercentBarStyle) {
|
|
113
136
|
specificSteps.push({
|
|
114
|
-
details: '
|
|
137
|
+
details: 'Select type of Cell Range and configure contents',
|
|
115
138
|
renderSummary: renderStyledColumnRangesSummary,
|
|
116
139
|
render: () => (_jsx(Box, { className: "twa:p-2", children: _jsx(StyledColumnWizardRangesSection, { onChange: setStyledColumn }) })),
|
|
117
140
|
title: 'Ranges',
|
|
@@ -269,9 +292,7 @@ export const StyledColumnWizard = (props) => {
|
|
|
269
292
|
isValid: isValidStyledColumnScope,
|
|
270
293
|
renderSummary: renderStyledColumnScopeSummary,
|
|
271
294
|
details: 'Select the Column and Rows where Style should render',
|
|
272
|
-
render: () => {
|
|
273
|
-
return (_jsx(Box, { className: "twa:p-2 twa:h-full", children: _jsx(StyledColumnWizardScopeSection, { isNew: props.isNew, onChange: setStyledColumn }) }));
|
|
274
|
-
},
|
|
295
|
+
render: () => (_jsx(StyledColumnWizardScopeSection, { isNew: props.isNew, onChange: setStyledColumn })),
|
|
275
296
|
title: 'Scope',
|
|
276
297
|
},
|
|
277
298
|
...specificSteps,
|
|
@@ -9,7 +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
12
|
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
14
13
|
import AdaptableInput from '../../Components/AdaptableInput';
|
|
15
14
|
import { Box, Flex } from '../../../components/Flex';
|
|
@@ -18,6 +17,7 @@ import { StyledColumnBulletPreviewCard } from './StyledColumnWizardStyleSection/
|
|
|
18
17
|
import { SingleSelect } from '../../../components/NewSelect';
|
|
19
18
|
import { getCellFontStyleSummaryItems, StyledColumnFontStyleEditor, } from './StyledColumnSliceStyleEditors';
|
|
20
19
|
import { Card } from '../../../components/Card';
|
|
20
|
+
import { renderSummaryStringTags } from '../../Wizard/SummaryColorTag';
|
|
21
21
|
const BULLET_STYLE_FORM_SIZES = ['200px', '1fr'];
|
|
22
22
|
// ---------------------------------------------------------------------------
|
|
23
23
|
// Summary helpers
|
|
@@ -135,7 +135,7 @@ export const renderStyledColumnBulletRangesSummary = (data) => {
|
|
|
135
135
|
return _jsx(Tag, { children: "No bands defined" });
|
|
136
136
|
}
|
|
137
137
|
const tagItems = getStyledColumnBulletRangesViewValues(data);
|
|
138
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [
|
|
138
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [renderSummaryStringTags(tagItems), _jsx(BulletRangesSummaryPreview, { bulletStyle: bullet })] }));
|
|
139
139
|
};
|
|
140
140
|
export const StyledColumnBulletRangesView = ({ data }) => renderStyledColumnBulletRangesSummary(data);
|
|
141
141
|
/** Wizard / list-view summary for the Style step (target, bar, text, font). */
|
|
@@ -151,7 +151,7 @@ export const renderStyledColumnBulletStyleSummary = (data) => {
|
|
|
151
151
|
if (!items.length) {
|
|
152
152
|
return _jsx(Tag, { children: "No Style Defined" });
|
|
153
153
|
}
|
|
154
|
-
return (
|
|
154
|
+
return renderSummaryStringTags(items);
|
|
155
155
|
};
|
|
156
156
|
/** Full combined summary (ranges + style); kept for callers that expect one block. */
|
|
157
157
|
export const renderStyledColumnBulletSummary = (data) => {
|
|
@@ -373,20 +373,11 @@ export const StyledColumnWizardBulletSection = (props) => {
|
|
|
373
373
|
}, items: [
|
|
374
374
|
{ value: 'Auto', label: 'Auto' },
|
|
375
375
|
{ 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: "Choose whether to display text in the cell (and if so, then position and font))" })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: bullet.CellText?.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.CellText?.includes('PercentageValue'), onChange: (checked) => toggleCellText('PercentageValue', checked), children: "Percent Value" })] }), _jsx(FormRow, { label: "Cell Display Position:", children: _jsx(
|
|
377
|
-
|
|
378
|
-
label: '
|
|
379
|
-
|
|
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) => {
|
|
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: "Choose whether to display text in the cell (and if so, then position and font))" })] }), _jsxs(Card.Body, { children: [_jsxs(FormLayout, { sizes: [...BULLET_STYLE_FORM_SIZES], children: [_jsxs(FormRow, { label: "Cell Display:", children: [_jsx(CheckBox, { disabled: disabled, checked: bullet.CellText?.includes('CellValue'), onChange: (checked) => toggleCellText('CellValue', checked), children: "Cell Value" }), ' ', _jsx(CheckBox, { disabled: disabled, className: "twa:ml-3", checked: bullet.CellText?.includes('PercentageValue'), onChange: (checked) => toggleCellText('PercentageValue', checked), children: "Percent Value" })] }), _jsx(FormRow, { label: "Cell Display Position:", children: _jsx(Box, { className: "twa:max-w-[160px]", children: _jsx(SingleSelect, { className: "twa:w-full", disabled: cellTextDisabled, value: bullet.CellTextPosition ?? 'Below', onValueChange: (v) => handleCellTextPositionChange(v), items: [
|
|
377
|
+
{ value: 'Above', label: 'Above Bar' },
|
|
378
|
+
{ value: 'Below', label: 'Below Bar' },
|
|
379
|
+
{ value: 'Merged', label: 'Merged' },
|
|
380
|
+
] }) }) })] }), _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
381
|
if (next) {
|
|
391
382
|
update({ Font: next });
|
|
392
383
|
}
|
|
@@ -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')
|
|
@@ -125,7 +130,7 @@ export const renderStyledColumnIconMappingsSummary = (data) => {
|
|
|
125
130
|
}
|
|
126
131
|
const tagItems = getStyledColumnIconMappingsViewValues(data);
|
|
127
132
|
const previewMappings = resolveIconStyleMappingsForSummaryPreview(ic);
|
|
128
|
-
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [
|
|
133
|
+
return (_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2 twa:items-start", children: [renderSummaryStringTags(tagItems), renderMappingsPreview(previewMappings)] }));
|
|
129
134
|
};
|
|
130
135
|
export const StyledColumnIconMappingsView = ({ data }) => renderStyledColumnIconMappingsSummary(data);
|
|
131
136
|
/** Style step summary (size, text, tooltip, font / cell). */
|
|
@@ -141,7 +146,7 @@ export const renderStyledColumnIconStyleSummary = (data) => {
|
|
|
141
146
|
if (!items.length) {
|
|
142
147
|
return _jsx(Tag, { children: "No Style Defined" });
|
|
143
148
|
}
|
|
144
|
-
return (
|
|
149
|
+
return renderSummaryStringTags(items);
|
|
145
150
|
};
|
|
146
151
|
/**
|
|
147
152
|
* Combined summary for the Styled Columns list row (preview + key facts).
|
|
@@ -172,11 +177,7 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
172
177
|
const iconStyle = data.IconStyle ?? {};
|
|
173
178
|
const mappings = iconStyle.Mappings ?? [];
|
|
174
179
|
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);
|
|
180
|
+
const [autoOpenPickerIndex, setAutoOpenPickerIndex] = React.useState(null);
|
|
180
181
|
const update = (patch) => {
|
|
181
182
|
props.onChange({
|
|
182
183
|
...data,
|
|
@@ -236,9 +237,7 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
236
237
|
};
|
|
237
238
|
const removeMapping = (index) => {
|
|
238
239
|
setMappings(mappings.filter((_, i) => i !== index));
|
|
239
|
-
|
|
240
|
-
// want the wrong row to suddenly appear expanded.
|
|
241
|
-
setEditingRow(null);
|
|
240
|
+
setAutoOpenPickerIndex(null);
|
|
242
241
|
};
|
|
243
242
|
const addMapping = () => {
|
|
244
243
|
const next = [
|
|
@@ -249,8 +248,7 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
249
248
|
},
|
|
250
249
|
];
|
|
251
250
|
setMappings(next);
|
|
252
|
-
|
|
253
|
-
setEditingRow(next.length - 1);
|
|
251
|
+
setAutoOpenPickerIndex(next.length - 1);
|
|
254
252
|
};
|
|
255
253
|
// -----------------------------------------------------------------------
|
|
256
254
|
// CellText helpers
|
|
@@ -276,24 +274,24 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
276
274
|
const presetMappingsPreview = iconStyle.Preset
|
|
277
275
|
? getIconStylePresetMappings(iconStyle.Preset)
|
|
278
276
|
: [];
|
|
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, {
|
|
277
|
+
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
278
|
? 'Add any mappings that are not present in the selected preset'
|
|
281
279
|
: '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
280
|
? '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
|
|
281
|
+
: '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) => {
|
|
282
|
+
if (!open && autoOpenPickerIndex === i) {
|
|
283
|
+
setAutoOpenPickerIndex(null);
|
|
284
|
+
}
|
|
285
|
+
}, 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, {
|
|
286
|
+
Description: e.target.value || undefined,
|
|
287
|
+
}), 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: [
|
|
288
|
+
{ value: 'Exact', label: 'Exact Match Required' },
|
|
291
289
|
{ value: 'CaseInsensitive', label: 'Case-insensitive (strings)' },
|
|
292
290
|
] }) }) }), _jsx(FormRow, { label: "Fallback:", children: _jsx(Box, { className: "twa:max-w-[200px]", children: _jsx(SingleSelect, { className: "twa:w-full", value: iconStyle.Fallback ?? 'Hide', onValueChange: (v) => update({ Fallback: v }), items: [
|
|
293
291
|
{ value: 'Hide', label: 'Show No Value' },
|
|
294
292
|
{ value: 'ShowText', label: 'Show Raw Value' },
|
|
295
293
|
{ value: 'Icon', label: 'Show Fallback Icon' },
|
|
296
|
-
] }) }) }), iconStyle.Fallback === 'Icon' && (_jsx(FormRow, { label: "Fallback Icon:", children:
|
|
294
|
+
] }) }) }), iconStyle.Fallback === 'Icon' && (_jsx(FormRow, { label: "Fallback Icon:", children: _jsx(IconPickerButton, { value: iconStyle.FallbackIcon, onChange: (next) => update({ FallbackIcon: next }) }) }))] }) })] })] }));
|
|
297
295
|
}
|
|
298
296
|
// ----- Style variant (wizard step title: "Style") ------------------------
|
|
299
297
|
const cellText = iconStyle.CellText ?? [];
|
|
@@ -316,7 +314,30 @@ export const StyledColumnWizardIconSection = (props) => {
|
|
|
316
314
|
{ value: 'Below', label: 'Below' },
|
|
317
315
|
] }) }) })] }), _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
316
|
};
|
|
317
|
+
// ---------------------------------------------------------------------------
|
|
318
|
+
// Icon picker — click-to-open popover (closes on outside click or system pick)
|
|
319
|
+
// ---------------------------------------------------------------------------
|
|
320
|
+
const ICON_KIND_OPTIONS = [
|
|
321
|
+
{ value: 'Emoji', label: 'Emoji' },
|
|
322
|
+
{ value: 'System', label: 'Built-in' },
|
|
323
|
+
{ value: 'Url', label: 'Image URL' },
|
|
324
|
+
];
|
|
325
|
+
const IconPickerButton = (props) => {
|
|
326
|
+
const [open, setOpen] = React.useState(props.defaultOpen ?? false);
|
|
327
|
+
React.useEffect(() => {
|
|
328
|
+
if (props.defaultOpen) {
|
|
329
|
+
setOpen(true);
|
|
330
|
+
}
|
|
331
|
+
}, [props.defaultOpen]);
|
|
332
|
+
const handleOpenChange = (next) => {
|
|
333
|
+
setOpen(next);
|
|
334
|
+
props.onOpenChange?.(next);
|
|
335
|
+
};
|
|
336
|
+
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) }) })] }));
|
|
337
|
+
};
|
|
319
338
|
const IconSpecEditorFields = (props) => {
|
|
339
|
+
const adaptable = useAdaptable();
|
|
340
|
+
const customIcons = adaptable.api.userInterfaceApi.getCustomIcons();
|
|
320
341
|
const kind = detectIconKind(props.value);
|
|
321
342
|
const [pendingKind, setPendingKind] = React.useState(null);
|
|
322
343
|
const prevValueRef = React.useRef(props.value);
|
|
@@ -344,13 +365,10 @@ const IconSpecEditorFields = (props) => {
|
|
|
344
365
|
? props.value.name
|
|
345
366
|
: undefined;
|
|
346
367
|
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) => {
|
|
368
|
+
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
369
|
if (iconName) {
|
|
353
370
|
props.onChange({ name: iconName });
|
|
371
|
+
props.onSystemIconSelected?.();
|
|
354
372
|
}
|
|
355
373
|
} })), effectiveKind === 'Url' && (_jsx(Input, { className: "twa:w-full", value: urlSrc, onChange: (e) => props.onChange({ src: e.target.value }), placeholder: "https://\u2026" }))] }));
|
|
356
374
|
};
|