@adaptabletools/adaptable 23.0.0-canary.6 → 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 +755 -256
- 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/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/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
|
@@ -6,11 +6,16 @@ import { CheckBox } from '../../components/CheckBox';
|
|
|
6
6
|
import FormLayout, { FormRow } from '../../components/FormLayout';
|
|
7
7
|
import { NumberInput } from '../../components/Input/NumberInput';
|
|
8
8
|
import SimpleButton from '../../components/SimpleButton';
|
|
9
|
+
import { ButtonNew } from './Buttons/ButtonNew';
|
|
9
10
|
import { getGraySwatchColor } from '../UIHelper';
|
|
10
11
|
import { ColumnSelector } from './Selectors/ColumnSelector';
|
|
11
12
|
import { Tabs } from '../../components/Tabs';
|
|
12
13
|
import Radio from '../../components/Radio';
|
|
13
14
|
import { Box, Flex } from '../../components/Flex';
|
|
15
|
+
import { SingleSelect } from '../../components/NewSelect';
|
|
16
|
+
import { InputGroup } from '../../components/InputGroup';
|
|
17
|
+
import { Icon } from '../../components/icons';
|
|
18
|
+
import HelpBlock from '../../components/HelpBlock';
|
|
14
19
|
const DEFAULT_ZERO_CENTRED_COLORS = {
|
|
15
20
|
NegativeColor: 'rgba(220, 53, 69, 0.55)',
|
|
16
21
|
PositiveColor: 'rgba(40, 167, 69, 0.55)',
|
|
@@ -38,32 +43,53 @@ function deriveInitialRangesType(props) {
|
|
|
38
43
|
}
|
|
39
44
|
return props.rangeValueType === 'Percentage' ? 'PercentageRange' : 'NumberRange';
|
|
40
45
|
}
|
|
46
|
+
/**
|
|
47
|
+
* A single Column Comparison bound (Min or Max). The user picks whether the
|
|
48
|
+
* bound is a fixed `Value` (a number applied to every row) or a `Column`
|
|
49
|
+
* (read from another column and evaluated per row). The underlying
|
|
50
|
+
* `ColumnComparison.MinValue`/`MaxValue` stays a `number | string` — number =>
|
|
51
|
+
* fixed value, non-numeric string => columnId — so the type is derived from the
|
|
52
|
+
* stored value via `isNaN`, mirroring how the runtime resolver discriminates it.
|
|
53
|
+
*/
|
|
54
|
+
const ColumnComparisonBoundInput = ({ value, disabled, onChange }) => {
|
|
55
|
+
const [type, setType] = React.useState(value != null && value !== '' && isNaN(Number(value)) ? 'column' : 'value');
|
|
56
|
+
const typeOptions = [
|
|
57
|
+
{
|
|
58
|
+
value: 'value',
|
|
59
|
+
label: (_jsxs(Flex, { alignItems: "center", children: [_jsx(Icon, { name: "edit" }), _jsx(Box, { className: "twa:ml-2", children: "Value" })] })),
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
value: 'column',
|
|
63
|
+
label: (_jsxs(Flex, { alignItems: "center", children: [_jsx(Icon, { name: "columns" }), _jsx(Box, { className: "twa:ml-2", children: "Column" })] })),
|
|
64
|
+
},
|
|
65
|
+
];
|
|
66
|
+
const editor = type === 'value' ? (_jsx(NumberInput, { className: "twa:w-full", disabled: disabled, type: "number", value: value != null && !isNaN(Number(value)) ? Number(value) : '', onChange: (v) => onChange(v) })) : (_jsx(ColumnSelector, { disabled: disabled, type: "number", value: value != null && isNaN(Number(value)) ? String(value) : undefined, onChange: (columnId) => onChange(columnId || undefined) }));
|
|
67
|
+
// The select trigger, the `NumberInput` (`.ab-Input`) and the `ColumnSelector`
|
|
68
|
+
// (a Combobox that does NOT forward `className`, rendering its border on a
|
|
69
|
+
// `[data-slot="input-group"]` wrapper) all hard-code `rounded-input`, so the
|
|
70
|
+
// InputGroup CSS-variable joining has no effect. We flatten the touching
|
|
71
|
+
// corners directly (important, to beat `rounded-input`) and overlap the shared
|
|
72
|
+
// border via `-ml-px` so the two controls read as a single block. The editor
|
|
73
|
+
// side targets both inner border elements through descendant arbitrary
|
|
74
|
+
// variants and forces them to fill the flex item.
|
|
75
|
+
const editorWrapperClassName = [
|
|
76
|
+
'twa:flex-1 twa:basis-0 twa:min-w-0 twa:-ml-px',
|
|
77
|
+
'twa:[&_.ab-Input]:w-full twa:[&_.ab-Input]:rounded-l-none!',
|
|
78
|
+
'twa:[&_[data-slot=input-group]]:w-full! twa:[&_[data-slot=input-group]]:rounded-l-none!',
|
|
79
|
+
].join(' ');
|
|
80
|
+
return (_jsxs(InputGroup, { Component: Flex, className: "twa:items-stretch twa:max-w-[20rem]", children: [_jsx(SingleSelect, { className: "twa:w-[120px] twa:max-w-none twa:shrink-0 twa:box-border twa:rounded-r-none!", disabled: disabled, value: type, items: typeOptions, onValueChange: (next) => {
|
|
81
|
+
// Switching type clears the stale bound so a fixed number can never
|
|
82
|
+
// be misread as a columnId (or vice versa).
|
|
83
|
+
onChange(undefined);
|
|
84
|
+
setType(next);
|
|
85
|
+
} }), _jsx(Box, { className: editorWrapperClassName, children: editor })] }));
|
|
86
|
+
};
|
|
41
87
|
export class RangesComponent extends React.Component {
|
|
42
88
|
constructor(props) {
|
|
43
89
|
super(props);
|
|
44
90
|
this.state = { rangesType: deriveInitialRangesType(props) };
|
|
45
91
|
}
|
|
46
92
|
render() {
|
|
47
|
-
let comparisonMinValueNumber = this.props.columnComparison != null &&
|
|
48
|
-
this.props.columnComparison.MinValue != null &&
|
|
49
|
-
!isNaN(Number(this.props.columnComparison.MinValue))
|
|
50
|
-
? Number(this.props.columnComparison.MinValue)
|
|
51
|
-
: '';
|
|
52
|
-
let comparisonMaxValueNumber = this.props.columnComparison != null &&
|
|
53
|
-
this.props.columnComparison.MaxValue != null &&
|
|
54
|
-
!isNaN(Number(this.props.columnComparison.MaxValue))
|
|
55
|
-
? Number(this.props.columnComparison.MaxValue)
|
|
56
|
-
: '';
|
|
57
|
-
let comparisonMinValueColumnId = this.props.columnComparison != null &&
|
|
58
|
-
this.props.columnComparison.MinValue != null &&
|
|
59
|
-
isNaN(Number(this.props.columnComparison.MinValue))
|
|
60
|
-
? String(this.props.columnComparison.MinValue)
|
|
61
|
-
: undefined;
|
|
62
|
-
let comparisonMaxValueColumnId = this.props.columnComparison != null &&
|
|
63
|
-
this.props.columnComparison.MaxValue != null &&
|
|
64
|
-
isNaN(Number(this.props.columnComparison.MaxValue))
|
|
65
|
-
? String(this.props.columnComparison.MaxValue)
|
|
66
|
-
: undefined;
|
|
67
93
|
let comparisonColor = this.props.columnComparison != null && this.props.columnComparison.Color != null
|
|
68
94
|
? this.props.columnComparison.Color
|
|
69
95
|
: undefined;
|
|
@@ -72,34 +98,54 @@ export class RangesComponent extends React.Component {
|
|
|
72
98
|
// is shared between the two range tabs and parameterised on this flag.
|
|
73
99
|
const isRangeValueTypeNumber = this.state.rangesType === 'NumberRange';
|
|
74
100
|
const renderNoneContent = () => (_jsx(Box, { className: "twa:text-2 twa:opacity-70 twa:py-2 twa:max-w-[520px]", children: "No coloured bands configured" }));
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
101
|
+
// Columns: Min, Max, Colour, [Reverse Gradient], Delete. Using one shared
|
|
102
|
+
// grid (rows are `display: contents`) keeps every band's cells aligned and
|
|
103
|
+
// spacing uniform via grid gaps, even with a single row.
|
|
104
|
+
const rangeGridTemplateColumns = [
|
|
105
|
+
'max-content',
|
|
106
|
+
'max-content',
|
|
107
|
+
'max-content',
|
|
108
|
+
...(this.props.showRangeDirection ? ['max-content'] : []),
|
|
109
|
+
'max-content',
|
|
110
|
+
].join(' ');
|
|
111
|
+
const renderRangesContent = () => (_jsxs(_Fragment, { children: [isRangeValueTypeNumber ? (_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsx(Box, { children: "Define value bands from low to high, each with its own colour." }), _jsxs(Box, { children: ["Tick ", _jsx("strong", { children: "Use column min" }), " or ", _jsx("strong", { children: "Use column max" }), " to anchor the first and last band to the column's actual lowest and highest values."] })] })) : (_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsx(Box, { children: "Define bands as percentages (0\u2013100) of the column's value range." }), _jsxs(Box, { children: [_jsx("strong", { children: "0%" }), " is the column's lowest value and ", _jsx("strong", { children: "100%" }), " its highest; each band gets its own colour."] })] })), _jsx(Box, { className: "twa:grid twa:items-end twa:gap-x-2 twa:gap-y-3 twa:mb-3 twa:w-fit", style: { gridTemplateColumns: rangeGridTemplateColumns }, children: this.props.ranges?.map((range, index, list) => (_jsxs(Box, { className: "twa:contents", "data-name": "percent-bar-range", children: [_jsxs(Flex, { flexDirection: "column", children: [isRangeValueTypeNumber && index === 0 && (_jsx(CheckBox, { onClick: () => this.setRangeColMin(range), checked: range.Min === 'Col-Min', className: "twa:mt-0 twa:mb-1 twa:text-3", disabled: this.props.disabled, children: "Use column min" })), _jsx(NumberInput, { disabled: this.props.disabled ||
|
|
112
|
+
range.Min === 'Col-Min' ||
|
|
113
|
+
(index === 0 && !isRangeValueTypeNumber), value: range.Min === 'Col-Min'
|
|
114
|
+
? this.props.minMaxRangeValues?.min ?? ''
|
|
115
|
+
: range.Min, onChange: (value) => {
|
|
116
|
+
this.changeRangeMin(index, value);
|
|
117
|
+
} })] }), _jsxs(Flex, { flexDirection: "column", children: [isRangeValueTypeNumber && index === list.length - 1 && (_jsx(CheckBox, { className: "twa:mt-0 twa:mb-1 twa:text-3", onClick: () => this.setRangeColMax(range), checked: range.Max === 'Col-Max', disabled: this.props.disabled, children: "Use column max" })), _jsx(NumberInput, { value: range.Max === 'Col-Max'
|
|
118
|
+
? this.props.minMaxRangeValues?.max ?? ''
|
|
119
|
+
: range.Max, disabled: this.props.disabled ||
|
|
120
|
+
range.Max === 'Col-Max' ||
|
|
121
|
+
(index === list.length - 1 && !isRangeValueTypeNumber), onChange: (value) => {
|
|
122
|
+
this.changeRangeMax(index, value);
|
|
123
|
+
} })] }), _jsx(ColorPicker, { api: this.props.api, value: range.Color, onChange: (color) => {
|
|
84
124
|
this.changeRangeColor(index, color);
|
|
85
|
-
}, className: "twa:
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
125
|
+
}, className: "twa:h-[33px] twa:pl-2" }), this.props.showRangeDirection && (_jsx(CheckBox, { disabled: this.props.disabled, checked: !!range.ReverseGradient, onChange: (checked) => this.changeRangeDirectionUp(index, checked), children: "Reverse Gradient" })), _jsx(SimpleButton, { icon: "delete", disabled: this.props.disabled ||
|
|
126
|
+
(!this.props.allowEmptyRanges &&
|
|
127
|
+
!!this.props.ranges &&
|
|
128
|
+
this.props.ranges.length === 1), onClick: () => this.removeRange(index) })] }, index))) }), _jsx("div", { children: _jsx(ButtonNew, { disabled: this.props.disabled, dataName: "add-range", onClick: () => this.addRange(), children: "Add Range" }) })] }));
|
|
89
129
|
const renderZeroCentredContent = () => {
|
|
90
130
|
const zc = this.props.zeroCentred ?? DEFAULT_ZERO_CENTRED_COLORS;
|
|
91
131
|
const apply = (next) => this.props.onApplyZeroCentred?.(next);
|
|
92
|
-
|
|
132
|
+
const minLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.min : 'column min';
|
|
133
|
+
const maxLabel = this.props.minMaxRangeValues != null ? this.props.minMaxRangeValues.max : 'column max';
|
|
134
|
+
return (_jsxs(Flex, { flexDirection: "column", "data-name": "zero-centred-ranges", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsx(Box, { children: "Colour cells on a diverging scale centred at zero." }), _jsx(Box, { children: "Negative values shade toward the column minimum, positive values toward the maximum \u2014 deeper as they move away from 0." })] }), _jsxs(FormLayout, { columns: ['label', 'colour'], sizes: ['200px', '1fr'], className: "twa:ml-2", children: [_jsx(FormRow, { label: `Negative (${minLabel} → 0):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.NegativeColor, onChange: (color) => apply({ ...zc, NegativeColor: color }) }) }) }), _jsx(FormRow, { label: `Positive (0 → ${maxLabel}):`, children: _jsx(Flex, { alignItems: "center", className: "twa:ml-2", children: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: zc.PositiveColor, onChange: (color) => apply({ ...zc, PositiveColor: color }) }) }) })] })] }));
|
|
93
135
|
};
|
|
94
|
-
const
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
136
|
+
const describeBound = (bound) => {
|
|
137
|
+
if (bound == null || bound === '') {
|
|
138
|
+
return _jsx("em", { children: "not set" });
|
|
139
|
+
}
|
|
140
|
+
if (!isNaN(Number(bound))) {
|
|
141
|
+
return (_jsxs(_Fragment, { children: [_jsx("strong", { children: Number(bound) }), " ", _jsx("span", { className: "twa:opacity-60", children: "(fixed)" })] }));
|
|
142
|
+
}
|
|
143
|
+
const friendlyName = this.props.api.columnApi.getFriendlyNameForColumnId(String(bound));
|
|
144
|
+
return (_jsxs(_Fragment, { children: [_jsx("strong", { children: friendlyName }), " ", _jsx("span", { className: "twa:opacity-60", children: "(per row)" })] }));
|
|
145
|
+
};
|
|
146
|
+
const renderColumnComparisonContent = () => (_jsxs(Flex, { flexDirection: "column", "data-name": "percent-bar-column-comparison", children: [_jsxs(HelpBlock, { className: "twa:my-2 twa:text-3", children: [_jsxs(Box, { children: ["Scale each cell's bar between a ", _jsx("strong", { children: "Minimum" }), " and a", ' ', _jsx("strong", { children: "Maximum" }), "."] }), _jsxs(Box, { children: ["Set each to a fixed ", _jsx("strong", { children: "Value" }), " (same for all rows) or a", ' ', _jsx("strong", { children: "Column" }), " (read from that column on each row)."] })] }), _jsxs(FormLayout, { columns: ['label', 'first'], sizes: ['auto', '1fr'], children: [_jsx(FormRow, { label: "Minimum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MinValue, onChange: (value) => this.setColumnComparisonMin(value) }) }), _jsx(FormRow, { label: "Maximum:", first: _jsx(ColumnComparisonBoundInput, { disabled: this.props.disabled, value: this.props.columnComparison?.MaxValue, onChange: (value) => this.setColumnComparisonMax(value) }) }), _jsx(FormRow, { label: `Bar ${this.props.api.internalApi.getCorrectEnglishVariant('Colour')}`, first: _jsx(ColorPicker, { disabled: this.props.disabled, api: this.props.api, value: comparisonColor, onChange: (color) => {
|
|
101
147
|
this.changeColumnComparisonColor(color);
|
|
102
|
-
} }) })] })] }, 'cc'));
|
|
148
|
+
} }) })] }), _jsxs(Box, { className: "twa:mt-2 twa:p-2 twa:text-3 twa:opacity-80", "data-name": "cc-summary", children: ["Each row's bar runs from ", describeBound(this.props.columnComparison?.MinValue), " to", ' ', describeBound(this.props.columnComparison?.MaxValue), "."] })] }, 'cc'));
|
|
103
149
|
const tabFlex = { flex: 1 };
|
|
104
150
|
const radioCls = 'twa:m-0 twa:align-baseline';
|
|
105
151
|
const renderTabRadio = (label, value) => (_jsx(Radio, { tabIndex: -1, className: radioCls, checked: this.state.rangesType === value, children: label }));
|
|
@@ -124,8 +170,7 @@ export class RangesComponent extends React.Component {
|
|
|
124
170
|
// tab — keep the active tab in sync. We deliberately do NOT react when the
|
|
125
171
|
// user is on Zero Centred / Column Comparison tabs (parent code can still
|
|
126
172
|
// set RangeValueType: 'Number' as part of those flows).
|
|
127
|
-
if ((this.state.rangesType === 'NumberRange' ||
|
|
128
|
-
this.state.rangesType === 'PercentageRange') &&
|
|
173
|
+
if ((this.state.rangesType === 'NumberRange' || this.state.rangesType === 'PercentageRange') &&
|
|
129
174
|
prevProps.rangeValueType !== this.props.rangeValueType) {
|
|
130
175
|
this.setState({
|
|
131
176
|
rangesType: this.props.rangeValueType === 'Percentage' ? 'PercentageRange' : 'NumberRange',
|
|
@@ -223,9 +268,7 @@ export class RangesComponent extends React.Component {
|
|
|
223
268
|
setRangeColMin(range) {
|
|
224
269
|
const newRanges = this.props.ranges.map((rangeItem) => {
|
|
225
270
|
if (rangeItem === range) {
|
|
226
|
-
let newMin = rangeItem.Min === 'Col-Min'
|
|
227
|
-
? (this.props.minMaxRangeValues?.min ?? 0)
|
|
228
|
-
: 'Col-Min';
|
|
271
|
+
let newMin = rangeItem.Min === 'Col-Min' ? this.props.minMaxRangeValues?.min ?? 0 : 'Col-Min';
|
|
229
272
|
return {
|
|
230
273
|
...rangeItem,
|
|
231
274
|
Min: newMin,
|
|
@@ -251,7 +294,7 @@ export class RangesComponent extends React.Component {
|
|
|
251
294
|
addRange() {
|
|
252
295
|
// Most callers seed `ranges` with at least one entry, but Range Bar
|
|
253
296
|
// legitimately leaves `CellRanges` undefined (bands are optional). Handle
|
|
254
|
-
// both cases so the "Add
|
|
297
|
+
// both cases so the "Add Range" button always works.
|
|
255
298
|
//
|
|
256
299
|
// When starting from empty we seed TWO bands split at the midpoint — a
|
|
257
300
|
// single full-width band would just look like a back colour and wouldn't
|
|
@@ -343,25 +386,11 @@ export class RangesComponent extends React.Component {
|
|
|
343
386
|
{ Min: mid, Max: 'Col-Max', Color: getGraySwatchColor() },
|
|
344
387
|
];
|
|
345
388
|
}
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
columnComparison.MinValue = value;
|
|
349
|
-
this.props.updateColumnComparison(columnComparison);
|
|
350
|
-
}
|
|
351
|
-
onMinColumnSelectedChanged(columnId) {
|
|
352
|
-
const { columnComparison } = this.props;
|
|
353
|
-
columnComparison.MinValue = columnId || undefined;
|
|
354
|
-
this.props.updateColumnComparison(columnComparison);
|
|
389
|
+
setColumnComparisonMin(value) {
|
|
390
|
+
this.props.updateColumnComparison({ ...this.props.columnComparison, MinValue: value });
|
|
355
391
|
}
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
columnComparison.MaxValue = value;
|
|
359
|
-
this.props.updateColumnComparison(columnComparison);
|
|
360
|
-
}
|
|
361
|
-
onMaxColumnSelectedChanged(columnId) {
|
|
362
|
-
const { columnComparison } = this.props;
|
|
363
|
-
columnComparison.MaxValue = columnId || undefined;
|
|
364
|
-
this.props.updateColumnComparison(columnComparison);
|
|
392
|
+
setColumnComparisonMax(value) {
|
|
393
|
+
this.props.updateColumnComparison({ ...this.props.columnComparison, MaxValue: value });
|
|
365
394
|
}
|
|
366
395
|
changeColumnComparisonColor(value) {
|
|
367
396
|
const { columnComparison } = this.props;
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { defaultDragProxyMove, DragDropProvider, DragList } from '../../../components/dnd';
|
|
3
3
|
import { Icon } from '../../../components/icons';
|
|
4
4
|
import { Box, Flex } from '../../../components/Flex';
|
|
5
|
-
import
|
|
5
|
+
import { cn } from '../../../lib/utils';
|
|
6
6
|
export function ReorderDraggable(props) {
|
|
7
7
|
const { onChange, order, toIdentifier, isOptionDraggable, disabled } = props;
|
|
8
8
|
const baseClassName = 'ab-ReorderDraggable';
|
|
@@ -15,7 +15,7 @@ export function ReorderDraggable(props) {
|
|
|
15
15
|
const reorderable = isOptionDraggable ? isOptionDraggable(option) : true;
|
|
16
16
|
return (_jsx(DragList.DraggableItem, { id: `${identifier}`, children: (itemDomProps, itemContext) => {
|
|
17
17
|
const { onPointerDown, ...restDomProps } = itemDomProps;
|
|
18
|
-
return (_jsx(Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className:
|
|
18
|
+
return (_jsx(Flex, { alignItems: "center", "data-index": index, "data-id": identifier, "data-name": "option", ...restDomProps, className: cn(`${baseClassName}__option`, 'ab-DraggableListItem', index ? 'twa:mt-0.5' : 'twa:mt-0', 'twa:py-1 twa:px-1.5', itemContext.active ? 'twa:shadow-md' : '', restDomProps.className, props.optionClassName?.(option)), onClick: (e) => props.onOptionClick?.(option, e), children: _jsxs(Flex, { className: "twa:flex-1", flexDirection: "row", alignItems: "center", children: [reorderable && !disabled ? (_jsx(Box, { onPointerDown: onPointerDown, className: "twa:mr-2", children: _jsx(Icon, { name: "drag", style: { cursor: 'grab' } }) })) : (_jsx(Box, { className: "twa:mr-2", children: _jsx(Icon, { name: "drag", style: { cursor: 'not-allowed', opacity: 0.3 } }) })), props.renderOption(option, index)] }) }));
|
|
19
19
|
} }, identifier));
|
|
20
20
|
}) })) }) }) }) }));
|
|
21
21
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AdaptableColumn } from '../../../AdaptableState/Common/AdaptableColumn';
|
|
3
|
-
import { DropdownButtonProps } from '../../../components/DropdownButton';
|
|
4
3
|
import { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
5
4
|
import { GridCell } from '../../../types';
|
|
6
5
|
export interface BulkUpdateValueSelectorProps {
|
|
@@ -12,7 +11,6 @@ export interface BulkUpdateValueSelectorProps {
|
|
|
12
11
|
style?: React.CSSProperties;
|
|
13
12
|
newLabel?: string;
|
|
14
13
|
existingLabel?: string;
|
|
15
|
-
dropdownButtonProps?: DropdownButtonProps;
|
|
16
14
|
selectedGridCells: GridCell[];
|
|
17
15
|
disabled?: boolean;
|
|
18
16
|
className?: string;
|
|
@@ -5,11 +5,11 @@ import UIHelper from '../../UIHelper';
|
|
|
5
5
|
import AdaptableInput from '../AdaptableInput';
|
|
6
6
|
import { PermittedValuesSelector } from './PermittedValuesSelector';
|
|
7
7
|
import { useAdaptable } from '../../AdaptableContext';
|
|
8
|
-
import clsx from 'clsx';
|
|
9
8
|
import { Box, Flex } from '../../../components/Flex';
|
|
10
9
|
import { Icon } from '../../../components/icons';
|
|
11
10
|
import { InputGroup } from '../../../components/InputGroup';
|
|
12
|
-
import { NewDropdownButton } from '../../../components/
|
|
11
|
+
import { NewDropdownButton } from '../../../components/DropdownButton';
|
|
12
|
+
import { cn } from '../../../lib/utils';
|
|
13
13
|
export const BulkUpdateValueSelector = (props) => {
|
|
14
14
|
const [valueType, setValueType] = React.useState('existing');
|
|
15
15
|
const adaptable = useAdaptable();
|
|
@@ -42,7 +42,7 @@ export const BulkUpdateValueSelector = (props) => {
|
|
|
42
42
|
: 'Enter Value', autoFocus: true, disabled: props.disabled, className: "twa:w-full", value: props.selectedColumnValue, onChange: (e) => {
|
|
43
43
|
props.onColumnValueChange(e.target.value);
|
|
44
44
|
} }));
|
|
45
|
-
return (_jsx(Flex, { className:
|
|
45
|
+
return (_jsx(Flex, { className: cn('twa:overflow-visible twa:max-w-full', props.className), style: props.style, children: isDateType ? (_jsx(_Fragment, { children: _jsxs(InputGroup, { Component: Flex, "data-id": "bulk-update-input-wrapper", className: "twa:w-full twa:gap-0.5", children: [_jsx(NewDropdownButton, { "aria-label": "Bulk Update Value Selector", "data-id": "bulk-update-value-type-selector", "data-value": valueType, variant: "outlined", items: [
|
|
46
46
|
{ label: 'New', icon: _jsx(Icon, { name: "edit" }), onClick: () => setValueType('new') },
|
|
47
47
|
{
|
|
48
48
|
label: 'Existing',
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
-
import
|
|
4
|
-
import { CheckBox } from '../../components/CheckBox';
|
|
5
|
-
import { ColorPicker } from '../../components/ColorPicker';
|
|
3
|
+
import { OptionalColorPicker } from '../../components/ColorPicker';
|
|
6
4
|
import HelpBlock from '../../components/HelpBlock';
|
|
7
5
|
import Panel from '../../components/Panel';
|
|
8
6
|
import { Tabs } from '../../components/Tabs';
|
|
@@ -14,9 +12,9 @@ import { EnumExtensions } from '../../Utilities/Extensions/EnumExtensions';
|
|
|
14
12
|
import { StringExtensions } from '../../Utilities/Extensions/StringExtensions';
|
|
15
13
|
import AdaptableInput from './AdaptableInput';
|
|
16
14
|
import { Box, Flex } from '../../components/Flex';
|
|
17
|
-
import { twMerge } from '../../twMerge';
|
|
18
15
|
import { Card } from '../../components/Card';
|
|
19
16
|
import { SingleSelect } from '../../components/NewSelect';
|
|
17
|
+
import { cn } from '../../lib/utils';
|
|
20
18
|
export const StyleComponent = (props) => {
|
|
21
19
|
const [showClassName, setShowClassName] = useState(StringExtensions.IsNotNullOrEmpty(props.Style.ClassName));
|
|
22
20
|
const componentStyle = props.Style;
|
|
@@ -40,51 +38,36 @@ export const StyleComponent = (props) => {
|
|
|
40
38
|
newStyle.ClassName = value == 'select' ? '' : value;
|
|
41
39
|
setComponentStyle(newStyle);
|
|
42
40
|
};
|
|
43
|
-
const
|
|
41
|
+
const onBackColorChange = (color) => {
|
|
44
42
|
const newStyle = { ...componentStyle };
|
|
45
|
-
if (
|
|
46
|
-
newStyle.BackColor =
|
|
43
|
+
if (color) {
|
|
44
|
+
newStyle.BackColor = color;
|
|
47
45
|
}
|
|
48
46
|
else {
|
|
49
47
|
delete newStyle.BackColor;
|
|
50
48
|
}
|
|
51
49
|
setComponentStyle(newStyle);
|
|
52
50
|
};
|
|
53
|
-
const
|
|
51
|
+
const onForeColorChange = (color) => {
|
|
54
52
|
const newStyle = { ...componentStyle };
|
|
55
|
-
if (
|
|
56
|
-
newStyle.ForeColor =
|
|
53
|
+
if (color) {
|
|
54
|
+
newStyle.ForeColor = color;
|
|
57
55
|
}
|
|
58
56
|
else {
|
|
59
57
|
delete newStyle.ForeColor;
|
|
60
58
|
}
|
|
61
59
|
setComponentStyle(newStyle);
|
|
62
60
|
};
|
|
63
|
-
const
|
|
61
|
+
const onBorderColorChange = (color) => {
|
|
64
62
|
const newStyle = { ...componentStyle };
|
|
65
|
-
if (
|
|
66
|
-
newStyle.BorderColor =
|
|
63
|
+
if (color) {
|
|
64
|
+
newStyle.BorderColor = color;
|
|
67
65
|
}
|
|
68
66
|
else {
|
|
69
67
|
delete newStyle.BorderColor;
|
|
70
68
|
}
|
|
71
69
|
setComponentStyle(newStyle);
|
|
72
70
|
};
|
|
73
|
-
const onBackColorSelectChange = (color) => {
|
|
74
|
-
const newStyle = { ...componentStyle };
|
|
75
|
-
newStyle.BackColor = color;
|
|
76
|
-
setComponentStyle(newStyle);
|
|
77
|
-
};
|
|
78
|
-
const onForeColorSelectChange = (color) => {
|
|
79
|
-
const newStyle = { ...componentStyle };
|
|
80
|
-
newStyle.ForeColor = color;
|
|
81
|
-
setComponentStyle(newStyle);
|
|
82
|
-
};
|
|
83
|
-
const onBorderColorSelectChange = (color) => {
|
|
84
|
-
const newStyle = { ...componentStyle };
|
|
85
|
-
newStyle.BorderColor = color;
|
|
86
|
-
setComponentStyle(newStyle);
|
|
87
|
-
};
|
|
88
71
|
const onFontWeightChange = (checked) => {
|
|
89
72
|
const newStyle = { ...componentStyle };
|
|
90
73
|
if (checked) {
|
|
@@ -148,44 +131,28 @@ export const StyleComponent = (props) => {
|
|
|
148
131
|
const styleClassNames = props.api.userInterfaceApi.getStyleClassNames();
|
|
149
132
|
const colourSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('Colour');
|
|
150
133
|
const coloursSpellingVariant = props.api.internalApi.getCorrectEnglishVariant('colours');
|
|
151
|
-
|
|
134
|
+
const styleEditorGrid = (_jsxs(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1", children: [_jsxs(Card.Title, { className: "twa:col-span-2 twa:self-stretch", children: [_jsxs(Box, { className: "twa:font-medium", children: [colourSpellingVariant, " & Border Properties"] }), _jsxs(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: ["Select ", coloursSpellingVariant, " and radius"] })] }), _jsxs("span", { children: ["Back ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { api: props.api, value: componentStyle.BackColor, defaultColor: "#ffffff", onChange: onBackColorChange }), _jsxs("span", { className: "twa:row-start-3", children: ["Fore ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { className: "twa:row-start-3", api: props.api, value: componentStyle.ForeColor, defaultColor: "#000000", onChange: onForeColorChange }), _jsxs("span", { className: "twa:row-start-4", children: ["Border ", colourSpellingVariant] }), _jsx(OptionalColorPicker, { className: "twa:row-start-4", api: props.api, value: componentStyle.BorderColor, defaultColor: "#000000", onChange: onBorderColorChange }), _jsx("span", { className: "twa:row-start-5", children: "Border Radius" }), _jsx(AdaptableInput, { className: "twa:w-[100px] twa:row-start-5", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
|
|
135
|
+
const number = Number(event.target.value);
|
|
136
|
+
if (isNaN(number)) {
|
|
137
|
+
onBorderRadiusChange(0);
|
|
138
|
+
}
|
|
139
|
+
else {
|
|
140
|
+
onBorderRadiusChange(number);
|
|
141
|
+
}
|
|
142
|
+
} }), _jsxs(Card.Title, { className: "twa:col-span-2 twa:col-start-3 twa:row-start-1 twa:self-stretch", children: [_jsx(Box, { className: "twa:font-medium", children: "Font Properties" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set font properties for the Style" })] }), _jsx("span", { className: "twa:col-start-3 twa:row-start-2", children: "Font Style" }), _jsx(Box, { className: "twa:col-start-4 twa:row-start-2", children: _jsxs(Flex, { alignItems: "center", className: "twa:gap-2", children: [_jsx(Toggle, { standalone: true, pressed: componentStyle.FontStyle == FontStyle.Italic, onPressedChange: (checked) => onFontStyleChange(checked), icon: "italic" }), _jsx(Toggle, { standalone: true, pressed: componentStyle.FontWeight == FontWeight.Bold, onPressedChange: (checked) => onFontWeightChange(checked), icon: "bold" })] }) }), _jsx("span", { className: "twa:col-start-3 twa:row-start-3", children: "Text Decoration" }), _jsx(Box, { className: "twa:col-start-4 twa:row-start-3", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "underline", pressed: componentStyle.TextDecoration === 'Underline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Underline' : 'None') }), _jsx(Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }), _jsx(Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })] }) }), _jsx("span", { className: "twa:col-start-3 twa:row-start-4", children: "Font Size" }), _jsx(Flex, { flexDirection: "row", alignItems: "center", className: "twa:col-start-4 twa:row-start-4", children: _jsx(SingleSelect, { placeholder: "Default", items: [
|
|
143
|
+
{
|
|
144
|
+
label: 'Default',
|
|
145
|
+
value: '',
|
|
146
|
+
},
|
|
147
|
+
...EnumExtensions.getNames(FontSize).map((enumName) => ({
|
|
148
|
+
label: enumName,
|
|
149
|
+
value: enumName,
|
|
150
|
+
})),
|
|
151
|
+
], value: componentStyle.FontSize?.toString() ?? '', onValueChange: (value) => onFontSizeChange(value) }) }), _jsx("span", { className: "twa:col-start-3 twa:row-start-5", children: "Alignment" }), _jsx(Box, { className: "twa:col-start-4 twa:row-start-5", children: _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }), _jsx(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }), _jsx(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })] }) })] }));
|
|
152
|
+
return (_jsxs(Cmp, { ...cmpProps, className: cn('ab-StyleComponent twa:text-3', props.className), children: [ArrayExtensions.IsNotNullOrEmpty(styleClassNames) ? (_jsxs(Tabs, { value: showClassName ? 'classname' : 'createstyle', onValueChange: (value) => onShowClassNameChanged(value === 'classname'), children: [_jsx(Tabs.Tab, { "data-name": "show-class-name", value: "classname", children: "Use Style Class Name" }), _jsx(Tabs.Tab, { "data-name": "create-style", value: "createstyle", children: "Create Style" }), _jsx(Tabs.Content, { value: "classname", children: _jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: "CSS Class Name" }), _jsxs(Card.Body, { gap: 2, className: "twa:p-1", children: [_jsx(HelpBlock, { children: "Select a CSS Class Name" }), _jsx(Box, { className: "twa:max-w-[15rem]", children: _jsx(SingleSelect, { items: ArrayExtensions.IsNullOrEmpty(styleClassNames)
|
|
152
153
|
? []
|
|
153
154
|
: styleClassNames.map((item) => ({
|
|
154
155
|
label: item,
|
|
155
156
|
value: item,
|
|
156
|
-
})), value: componentStyle.ClassName, onValueChange: (value) => onStyleClassNameChanged(value) }) }), _jsx(Box, { className: "twa:m-2 twa:flex-2 twa:text-warn", children: 'Please ensure that the styles listed are in the current stylesheet' })] })] }) }), _jsx(Tabs.Content, { value: "createstyle", children: _jsx(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row", children: _jsx(Card, { shadow: false, className: "twa:flex-1", children:
|
|
157
|
-
const number = Number(event.target.value);
|
|
158
|
-
if (isNaN(number)) {
|
|
159
|
-
onBorderRadiusChange(0);
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
onBorderRadiusChange(number);
|
|
163
|
-
}
|
|
164
|
-
} }), _jsx(Card.Title, { className: "twa:col-span-2 twa:col-start-3 twa:row-start-1", children: "Font Properties" }), _jsx(HelpBlock, { className: "twa:self-stretch twa:col-span-2 twa:col-start-3 twa:row-start-2", children: "Set the font properties of the Style" }), _jsx("span", { children: "Font Style" }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: componentStyle.FontStyle == FontStyle.Italic, onPressedChange: (checked) => onFontStyleChange(checked), icon: "italic" }), _jsx(Toggle, { pressed: componentStyle.FontWeight == FontWeight.Bold, onPressedChange: (checked) => onFontWeightChange(checked), icon: "bold" })] }), _jsx("span", { children: "Text Decoration" }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "underline", pressed: componentStyle.TextDecoration === 'Underline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Underline' : 'None') }), _jsx(Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }), _jsx(Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })] }), _jsx("span", { children: "Font Size" }), _jsx(Flex, { flexDirection: "row", alignItems: "center", children: _jsx(SingleSelect, { placeholder: "Default", items: [
|
|
165
|
-
{
|
|
166
|
-
label: 'Default',
|
|
167
|
-
value: '',
|
|
168
|
-
},
|
|
169
|
-
...EnumExtensions.getNames(FontSize).map((enumName) => ({
|
|
170
|
-
label: enumName,
|
|
171
|
-
value: enumName,
|
|
172
|
-
})),
|
|
173
|
-
], value: componentStyle.FontSize?.toString() ?? '', onValueChange: (value) => onFontSizeChange(value) }) }), _jsx("span", { children: "Alignment" }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }), _jsx(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }), _jsx(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })] })] }) }) }) })] })) : (_jsx(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row", children: _jsx(Card, { shadow: false, className: "twa:flex-1", children: _jsxs(Card.Body, { gap: 2, className: "twa:grid twa:grid-cols-[auto_1fr_auto_1fr] twa:items-center twa:p-1", children: [_jsxs(Card.Title, { className: "twa:col-span-2", children: [colourSpellingVariant, " & Border Properties"] }), _jsxs(HelpBlock, { className: "twa:col-span-2", children: ["Set ", coloursSpellingVariant, " by ticking a checkbox and selecting from the dropdown"] }), _jsxs(CheckBox, { "data-name": "set-background-color", value: "existing", checked: !!componentStyle.BackColor, onChange: (checked) => onUseBackColorCheckChange(checked), children: ["Back ", colourSpellingVariant] }), _jsx(ColorPicker, { disabled: componentStyle.BackColor == null, api: props.api, value: componentStyle.BackColor || '#ffffff', onChange: (x) => onBackColorSelectChange(x) }), _jsxs(CheckBox, { "data-name": "set-foreground-color", value: "existing", className: "twa:row-start-4", checked: componentStyle.ForeColor ? true : false, onChange: (checked) => onUseForeColorCheckChange(checked), children: ["Fore ", colourSpellingVariant] }), _jsx(ColorPicker, { className: "twa:row-start-4 twa:col-start-2", disabled: componentStyle.ForeColor == null, api: props.api, value: componentStyle.ForeColor || '#ffffff', onChange: (x) => onForeColorSelectChange(x) }), _jsxs(CheckBox, { "data-name": "set-border-color", value: "existing", className: "twa:row-start-5 twa:col-start-1", checked: componentStyle.BorderColor ? true : false, onChange: (checked) => onUseBorderColorCheckChange(checked), children: ["Border ", colourSpellingVariant] }), _jsx(ColorPicker, { disabled: componentStyle.BorderColor == null, api: props.api, className: "twa:row-start-5 twa:col-start-2", value: componentStyle.BorderColor || '#ffffff', onChange: (x) => onBorderColorSelectChange(x) }), _jsx("span", { className: "twa:row-start-6", children: "Border Radius" }), _jsx(AdaptableInput, { className: "twa:w-[100px] twa:row-start-6", type: "number", min: "0", value: componentStyle.BorderRadius, onChange: (event) => {
|
|
174
|
-
const number = Number(event.target.value);
|
|
175
|
-
if (isNaN(number)) {
|
|
176
|
-
onBorderRadiusChange(0);
|
|
177
|
-
}
|
|
178
|
-
else {
|
|
179
|
-
onBorderRadiusChange(number);
|
|
180
|
-
}
|
|
181
|
-
} }), _jsx(Card.Title, { className: "twa:col-span-2 twa:col-start-3 twa:row-start-1", children: "Font Properties" }), _jsx(HelpBlock, { className: "twa:self-stretch twa:col-span-2 twa:col-start-3 twa:row-start-2", children: "Set the font properties of the Style" }), _jsx("span", { children: "Font Style" }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { pressed: componentStyle.FontStyle == FontStyle.Italic, onPressedChange: (checked) => onFontStyleChange(checked), icon: "italic" }), _jsx(Toggle, { pressed: componentStyle.FontWeight == FontWeight.Bold, onPressedChange: (checked) => onFontWeightChange(checked), icon: "bold" })] }), _jsx("span", { children: "Text Decoration" }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "underline", pressed: componentStyle.TextDecoration === 'Underline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Underline' : 'None') }), _jsx(Toggle, { icon: "strikethrough", pressed: componentStyle.TextDecoration === 'LineThrough', onPressedChange: (checked) => onTextDecorationChange(checked ? 'LineThrough' : 'None') }), _jsx(Toggle, { icon: "overline", pressed: componentStyle.TextDecoration === 'Overline', onPressedChange: (checked) => onTextDecorationChange(checked ? 'Overline' : 'None') })] }), _jsx("span", { children: "Font Size" }), _jsx(Flex, { flexDirection: "row", alignItems: "center", children: _jsx(SingleSelect, { placeholder: "Default", items: [
|
|
182
|
-
{
|
|
183
|
-
label: 'Default',
|
|
184
|
-
value: '',
|
|
185
|
-
},
|
|
186
|
-
...EnumExtensions.getNames(FontSize).map((enumName) => ({
|
|
187
|
-
label: enumName,
|
|
188
|
-
value: enumName,
|
|
189
|
-
})),
|
|
190
|
-
], value: componentStyle.FontSize?.toString() ?? '', onValueChange: (value) => onFontSizeChange(value) }) }), _jsx("span", { children: "Alignment" }), _jsxs(ToggleGroup, { children: [_jsx(Toggle, { icon: "align-left", pressed: componentStyle.Alignment === 'Left', onPressedChange: (pressed) => pressed ? onAlignmentChange('Left') : onAlignmentChange('Default') }), _jsx(Toggle, { icon: "align-center", pressed: componentStyle.Alignment === 'Center', onPressedChange: (pressed) => pressed ? onAlignmentChange('Center') : onAlignmentChange('Default') }), _jsx(Toggle, { icon: "align-right", pressed: componentStyle.Alignment === 'Right', onPressedChange: (pressed) => pressed ? onAlignmentChange('Right') : onAlignmentChange('Default') })] })] }) }) })), !props.hidePreview && (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: "Preview" }), _jsx(Card.Body, { className: "twa:grid twa:place-items-center", children: _jsx(Box, { className: "twa:p-2 twa:inline-block", children: _jsx(StylePreview, { className: "twa:mt-0", styleObject: componentStyle, children: props.previewText }) }) })] }))] }));
|
|
157
|
+
})), value: componentStyle.ClassName, onValueChange: (value) => onStyleClassNameChanged(value) }) }), _jsx(Box, { className: "twa:m-2 twa:flex-2 twa:text-warn", children: 'Please ensure that the styles listed are in the current stylesheet' })] })] }) }), _jsx(Tabs.Content, { value: "createstyle", children: _jsx(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row", children: _jsx(Card, { shadow: false, className: "twa:flex-1", children: styleEditorGrid }) }) })] })) : (_jsx(Flex, { className: "twa:flex-1 twa:flex twa:flex-col twa:gap-2 twa:lg:flex-row", children: _jsx(Card, { shadow: false, className: "twa:flex-1", children: styleEditorGrid }) })), !props.hidePreview && (_jsxs(Card, { shadow: false, children: [_jsx(Card.Title, { children: "Preview" }), _jsx(Card.Body, { className: "twa:grid twa:place-items-center", children: _jsx(Box, { className: "twa:p-2 twa:inline-block", children: _jsx(StylePreview, { className: "twa:mt-0", styleObject: componentStyle, children: props.previewText }) }) })] }))] }));
|
|
191
158
|
};
|
|
@@ -3,11 +3,11 @@ import kebabCase from '../../../Utilities/utils/kebabCase';
|
|
|
3
3
|
import { ACCESS_LEVEL_FULL } from '../../../Utilities/Constants/GeneralConstants';
|
|
4
4
|
import * as ToolPanelRedux from '../../../Redux/ActionsReducers/ToolPanelRedux';
|
|
5
5
|
import { connect } from 'react-redux';
|
|
6
|
-
import { ADAPTABLE_BUTTON_SURFACE_DEFAULTS, AdaptableButtonView
|
|
6
|
+
import { ADAPTABLE_BUTTON_SURFACE_DEFAULTS, AdaptableButtonView } from '../AdaptableButton';
|
|
7
7
|
import ArrayExtensions from '../../../Utilities/Extensions/ArrayExtensions';
|
|
8
8
|
import { Icon } from '../../../components/icons';
|
|
9
9
|
import { CheckBox } from '../../../components/CheckBox';
|
|
10
|
-
import
|
|
10
|
+
import { NewDropdownButton } from '../../../components/DropdownButton';
|
|
11
11
|
import { ALL_TOOL_PANELS, } from '../../../AdaptableState/Common/Types';
|
|
12
12
|
import SimpleButton from '../../../components/SimpleButton';
|
|
13
13
|
import { ButtonConfigure } from '../Buttons/ButtonConfigure';
|
|
@@ -78,18 +78,21 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
78
78
|
}
|
|
79
79
|
let toolpanelItems = [
|
|
80
80
|
{
|
|
81
|
-
|
|
82
|
-
|
|
81
|
+
closeOnClick: false,
|
|
82
|
+
tooltip: 'Tool Panels',
|
|
83
|
+
label: (_jsxs("div", { children: [_jsx("span", { className: "twa:font-bold", children: 'Tool Panels' }), renderToolPanelConfigureButton(ToolPanelConfigView.ToolPanels)] }, "toolPanelTitle")),
|
|
83
84
|
},
|
|
84
85
|
];
|
|
85
86
|
const isItemVisible = (panelItem) => visibleToolPanels.includes(panelItem);
|
|
86
87
|
const buildDropdownButtonItem = (toolPanel, label, isVisible) => {
|
|
87
88
|
return {
|
|
88
|
-
|
|
89
|
+
dataName: String(toolPanel),
|
|
90
|
+
closeOnClick: false,
|
|
89
91
|
onClick: () => {
|
|
90
92
|
onSetToolPanelVisibility(toolPanel, !isVisible);
|
|
91
93
|
},
|
|
92
|
-
|
|
94
|
+
tooltip: label,
|
|
95
|
+
label: (_jsx(CheckBox, { className: "ab-dd-checkbox twa:my-0", value: toolPanel, checked: isVisible, onMouseDown: preventDefault, children: toolPanel }, toolPanel)),
|
|
93
96
|
};
|
|
94
97
|
};
|
|
95
98
|
// 1. process custom tool panels
|
|
@@ -112,7 +115,7 @@ const AdaptableToolPanelComponent = (props) => {
|
|
|
112
115
|
}
|
|
113
116
|
return 0;
|
|
114
117
|
});
|
|
115
|
-
return (_jsx(
|
|
118
|
+
return (_jsx(NewDropdownButton, { variant: "text", tone: "none", id: 'dropdown-toolpanels', className: "ab-ToolPanel__toolbars", items: toolpanelItems, tooltip: "Manage Tool Panels", extraWidthChars: 5, children: toolPanelsGlyph }, 'dropdown-toolpanels'));
|
|
116
119
|
};
|
|
117
120
|
const renderToolPanelButtons = () => {
|
|
118
121
|
const toolPanelButtons = [];
|
|
@@ -3,28 +3,18 @@ import * as ToolPanelRedux from '../../../Redux/ActionsReducers/ToolPanelRedux';
|
|
|
3
3
|
import { ModuleViewPopupProps } from '../SharedProps/ModuleViewPopupProps';
|
|
4
4
|
import { InternalState } from '../../../AdaptableState/InternalState';
|
|
5
5
|
import { AdaptableToolPanelDefinition, ToolPanelState } from '../../../AdaptableState/ToolPanelState';
|
|
6
|
-
import { AdaptableModuleButtons
|
|
6
|
+
import { AdaptableModuleButtons } from '../../../AdaptableState/Common/Types';
|
|
7
7
|
interface ToolPanelPopupComponentProps extends ModuleViewPopupProps<ToolPanelPopupComponent> {
|
|
8
8
|
ToolPanelState: ToolPanelState;
|
|
9
9
|
InternalState: InternalState;
|
|
10
10
|
onToolPanelSetModuleButtons: (moduleButtons: AdaptableModuleButtons) => ToolPanelRedux.ToolPanelSetModuleButtonsAction;
|
|
11
11
|
onToolPanelSetToolPanels: (toolPanels: AdaptableToolPanelDefinition[]) => ToolPanelRedux.ToolPanelSetToolPanelsAction;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
14
|
-
|
|
15
|
-
ToolPanels = "ToolPanels"
|
|
16
|
-
}
|
|
17
|
-
export interface ToolPanelPopupState {
|
|
18
|
-
ToolPanelConfigView: ToolPanelConfigView;
|
|
19
|
-
}
|
|
20
|
-
declare class ToolPanelPopupComponent extends React.Component<ToolPanelPopupComponentProps, ToolPanelPopupState> {
|
|
21
|
-
constructor(props: ToolPanelPopupComponentProps);
|
|
13
|
+
export { ToolPanelConfigView } from './ToolPanelPopupSections';
|
|
14
|
+
declare class ToolPanelPopupComponent extends React.Component<ToolPanelPopupComponentProps> {
|
|
22
15
|
render(): React.JSX.Element;
|
|
23
|
-
onShowGridPropertiesChanged(event: React.FormEvent<any>): void;
|
|
24
|
-
onToolPanelToolPanelsChanged(selectedValues: AdaptableToolPanels): void;
|
|
25
16
|
}
|
|
26
17
|
export declare let ToolPanelPopup: import("react-redux").ConnectedComponent<typeof ToolPanelPopupComponent, {
|
|
27
18
|
context?: React.Context<import("react-redux").ReactReduxContextValue<any, import("redux").UnknownAction>>;
|
|
28
19
|
store?: import("redux").Store;
|
|
29
20
|
}>;
|
|
30
|
-
export {};
|