@adaptabletools/adaptable-cjs 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 +1 -1
- 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 +11 -28
- 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 +17 -1
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.d.ts +1 -0
- package/src/Strategy/Utilities/Export/getExportRowsViewItems.js +5 -1
- package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.d.ts +11 -0
- package/src/Strategy/Utilities/Layout/aggregationSummaryHelpers.js +111 -0
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.d.ts +48 -0
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +177 -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 +97 -0
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +3 -5
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +48 -42
- 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 +30 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +6 -4
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +19 -0
- package/src/Utilities/getScopeViewItems.js +2 -0
- package/src/Utilities/wizardSelection.d.ts +10 -0
- package/src/Utilities/wizardSelection.js +22 -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 +1 -6
- 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 +30 -7
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +2 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -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 +29 -3
- 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 -3
- 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 +1 -2
- 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 +3 -8
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +4 -4
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +3 -2
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +38 -28
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +3 -4
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +2 -3
- package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/settingsPanelNavigationTypes.js +5 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +3 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +27 -28
- 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 -3
- 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 +30 -63
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +9 -6
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +3 -13
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +5 -80
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.d.ts +17 -0
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +81 -0
- package/src/View/Components/ValueSelector/index.d.ts +29 -0
- package/src/View/Components/ValueSelector/index.js +112 -29
- package/src/View/Components/wizardColumnListStyles.d.ts +10 -0
- package/src/View/Components/wizardColumnListStyles.js +13 -0
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +4 -6
- 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 +73 -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 +99 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +5 -3
- package/src/View/DataChangeHistory/buildActionColumnButton.js +33 -41
- package/src/View/DataChangeHistory/dataChangeHistoryHelpers.d.ts +15 -0
- package/src/View/DataChangeHistory/dataChangeHistoryHelpers.js +46 -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 +4 -5
- 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 +2 -7
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +2 -5
- package/src/View/FlashingCell/FlashingCellStyle.d.ts +4 -2
- package/src/View/FlashingCell/FlashingCellStyle.js +5 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +5 -9
- package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.d.ts +9 -0
- package/src/View/FlashingCell/Wizard/FlashingCellScopeSummary.js +10 -0
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +5 -1
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +0 -5
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +3 -8
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +101 -44
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -6
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +55 -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 -9
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +4 -9
- 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 -3
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +2 -2
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- 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 +77 -33
- package/src/View/Layout/Wizard/sections/ColumnsSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +154 -275
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +146 -143
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.d.ts +5 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +22 -10
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.d.ts +4 -1
- package/src/View/Layout/Wizard/sections/PivotRowGroupingSection.js +21 -10
- package/src/View/Layout/Wizard/sections/RowGroupingSection.d.ts +5 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +23 -12
- package/src/View/Layout/Wizard/sections/RowSelectionSection.js +7 -3
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +10 -10
- package/src/View/Layout/Wizard/sections/SortSection.d.ts +12 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +43 -18
- package/src/View/Layout/Wizard/sections/columnLayoutCards.d.ts +20 -0
- package/src/View/Layout/Wizard/sections/columnLayoutCards.js +167 -0
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.d.ts +30 -0
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +216 -0
- package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.d.ts +8 -0
- package/src/View/Layout/Wizard/sections/layoutWizardAccordionHelpers.js +72 -0
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.d.ts +11 -0
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +57 -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 -13
- 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 +11 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +2 -0
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +13 -10
- 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 +7 -13
- 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 +54 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.d.ts +2 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +28 -6
- 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 +97 -42
- 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 +31 -45
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +10 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +93 -6
- package/src/View/UIHelper.d.ts +0 -2
- package/src/View/UIHelper.js +8 -24
- package/src/View/Wizard/CollapsibleWizardCard.d.ts +68 -0
- package/src/View/Wizard/CollapsibleWizardCard.js +90 -0
- package/src/View/Wizard/OnePageWizards.js +6 -6
- package/src/View/Wizard/SummaryColorTag.d.ts +24 -0
- package/src/View/Wizard/SummaryColorTag.js +79 -0
- package/src/View/Wizard/WizardTypeSelection.d.ts +34 -0
- package/src/View/Wizard/WizardTypeSelection.js +40 -0
- package/src/View/Wizard/rowGroupSummaryTags.d.ts +18 -0
- package/src/View/Wizard/rowGroupSummaryTags.js +21 -0
- package/src/View/Wizard/scopeSummaryTags.d.ts +6 -0
- package/src/View/Wizard/scopeSummaryTags.js +38 -0
- package/src/agGrid/AdaptableAgGrid.js +1 -1
- package/src/agGrid/AgGridAdapter.js +0 -5
- package/src/agGrid/AgGridColumnAdapter.js +1 -1
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
- package/src/components/Card/index.js +5 -7
- package/src/components/CheckBox/index.js +2 -3
- package/src/components/CodeBlock/index.js +2 -3
- 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 +31 -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 +4 -1
- package/src/components/DragAndDropContext/ModuleManager.d.ts +15 -3
- package/src/components/DragAndDropContext/ModuleManager.js +43 -4
- 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 +13 -9
- package/src/components/DragAndDropContext/dragScope.d.ts +6 -0
- package/src/components/DragAndDropContext/dragScope.js +34 -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 -3
- package/src/components/ErrorBox/index.js +2 -3
- package/src/components/ExpressionEditor/BaseEditorInput.js +3 -3
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +3 -3
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +9 -9
- package/src/components/FieldWrap/index.js +2 -3
- package/src/components/Flex.js +2 -2
- package/src/components/FormLayout/index.d.ts +1 -1
- package/src/components/HelpBlock/index.js +3 -4
- package/src/components/IconSelector/IconSelector.d.ts +8 -0
- package/src/components/IconSelector/IconSelector.js +13 -8
- package/src/components/IconSelector/index.d.ts +1 -0
- package/src/components/IconSelector/index.js +3 -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 -3
- package/src/components/Tabs/index.js +4 -4
- package/src/components/Tag/Tag.d.ts +16 -0
- package/src/components/Tag/Tag.js +16 -5
- package/src/components/Tag/columnScopeTagHelpers.d.ts +8 -0
- package/src/components/Tag/columnScopeTagHelpers.js +12 -0
- package/src/components/Tag/index.d.ts +1 -1
- package/src/components/Tag/index.js +3 -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 -5
- package/src/components/Tree/TreeDropdown/index.js +3 -5
- package/src/components/WarningBox/index.js +2 -3
- 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.cjs.tsbuildinfo +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +0 -17
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +0 -295
- package/src/components/DropdownButton/DropdownButtonItem.d.ts +0 -12
- package/src/components/DropdownButton/DropdownButtonItem.js +0 -2
- package/src/components/DropdownButton/renderItem.d.ts +0 -14
- package/src/components/DropdownButton/renderItem.js +0 -14
- package/src/components/DropdownButton/useExpanded.d.ts +0 -24
- package/src/components/DropdownButton/useExpanded.js +0 -59
- package/src/components/NewDropdownButton/index.d.ts +0 -27
- package/src/components/NewDropdownButton/index.js +0 -28
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RowGroupingSection = exports.RowGroupBehaviorSection = exports.RowGroupingSectionSummary = void 0;
|
|
3
|
+
exports.RowGroupingSection = exports.RowGroupBehaviorSection = exports.RowGroupingSectionSummary = exports.getRowGroupDisplayTypeLabel = exports.getRowGroupDisplayTypeDescription = exports.getRowGroupBehaviorLabel = exports.getRowGroupBehaviorDescription = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
const layoutWizardAccordionHelpers_1 = require("./layoutWizardAccordionHelpers");
|
|
7
8
|
const Utilities_1 = require("./Utilities");
|
|
8
9
|
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
9
10
|
const Radio_1 = require("../../../../components/Radio");
|
|
@@ -14,17 +15,25 @@ const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard
|
|
|
14
15
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
15
16
|
const LayoutHelpers_1 = require("../../../../Api/Implementation/LayoutHelpers");
|
|
16
17
|
const TypeRadio_1 = require("../../../Wizard/TypeRadio");
|
|
17
|
-
const
|
|
18
|
+
const CollapsibleWizardCard_1 = require("../../../Wizard/CollapsibleWizardCard");
|
|
18
19
|
const Card_1 = require("../../../../components/Card");
|
|
19
|
-
const
|
|
20
|
+
const Flex_1 = require("../../../../components/Flex");
|
|
21
|
+
const layoutWizardColumns_1 = require("./layoutWizardColumns");
|
|
22
|
+
const rowGroupSummaryHelpers_1 = require("../../../../Strategy/Utilities/Layout/rowGroupSummaryHelpers");
|
|
23
|
+
const rowGroupSummaryTags_1 = require("../../../Wizard/rowGroupSummaryTags");
|
|
24
|
+
var rowGroupSummaryHelpers_2 = require("../../../../Strategy/Utilities/Layout/rowGroupSummaryHelpers");
|
|
25
|
+
Object.defineProperty(exports, "getRowGroupBehaviorDescription", { enumerable: true, get: function () { return rowGroupSummaryHelpers_2.getRowGroupBehaviorDescription; } });
|
|
26
|
+
Object.defineProperty(exports, "getRowGroupBehaviorLabel", { enumerable: true, get: function () { return rowGroupSummaryHelpers_2.getRowGroupBehaviorLabel; } });
|
|
27
|
+
Object.defineProperty(exports, "getRowGroupDisplayTypeDescription", { enumerable: true, get: function () { return rowGroupSummaryHelpers_2.getRowGroupDisplayTypeDescription; } });
|
|
28
|
+
Object.defineProperty(exports, "getRowGroupDisplayTypeLabel", { enumerable: true, get: function () { return rowGroupSummaryHelpers_2.getRowGroupDisplayTypeLabel; } });
|
|
29
|
+
const RowGroupingSectionSummary = (props) => {
|
|
20
30
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
21
|
-
const { data:
|
|
31
|
+
const { data: contextLayout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
32
|
+
const layout = props.layout ?? contextLayout;
|
|
22
33
|
if (adaptable.api.gridApi.isTreeDataGrid()) {
|
|
23
34
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Row Grouping is not available in Tree Grids" }) }));
|
|
24
35
|
}
|
|
25
|
-
return (
|
|
26
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mb-2 twa:mr-2", children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: adaptable.api.columnApi.getFriendlyNameForColumnId(columnId) }) }, columnId));
|
|
27
|
-
})) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Row Grouping" })) }));
|
|
36
|
+
return (0, jsx_runtime_1.jsx)(rowGroupSummaryTags_1.TableRowGroupSummaryTags, { layout: layout, api: adaptable.api });
|
|
28
37
|
};
|
|
29
38
|
exports.RowGroupingSectionSummary = RowGroupingSectionSummary;
|
|
30
39
|
const RowGroupBehaviorSection = (props) => {
|
|
@@ -41,7 +50,7 @@ const RowGroupBehaviorSection = (props) => {
|
|
|
41
50
|
newLayout.RowGroupValues.ExceptionGroupKeys = [];
|
|
42
51
|
}
|
|
43
52
|
onChange(newLayout);
|
|
44
|
-
}, children: [(0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "All Grouped Rows are always collapsed" }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "All Grouped Rows are always expanded" }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "expanded", text: "Mostly Expanded", description: "All expanded, other than those collapsed when Layout last displayed" }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "collapsed", text: "Mostly Collapsed", description: "All collapsed, other than those expanded when Layout last displayed" })] }));
|
|
53
|
+
}, children: [(0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "always-collapsed", text: "All Collapsed", description: "All Grouped Rows are always collapsed" }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "always-expanded", text: "All Expanded", description: "All Grouped Rows are always expanded" }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "expanded", text: "Mostly Expanded", description: "All Grouped Rows expanded, other than those collapsed when Layout last displayed" }), (0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: "collapsed", text: "Mostly Collapsed", description: "All Grouped Rows collapsed, other than those expanded when Layout last displayed" })] }));
|
|
45
54
|
};
|
|
46
55
|
exports.RowGroupBehaviorSection = RowGroupBehaviorSection;
|
|
47
56
|
const RowGroupDisplayTypeSection = ({ layout, onChange }) => {
|
|
@@ -66,15 +75,15 @@ const RowGroupDisplayTypeSection = ({ layout, onChange }) => {
|
|
|
66
75
|
};
|
|
67
76
|
const RowGroupingSection = (props) => {
|
|
68
77
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
69
|
-
if (adaptable.api.gridApi.isTreeDataGrid()) {
|
|
70
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Row Grouping is not available in Tree Grids" }) }));
|
|
71
|
-
}
|
|
72
78
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
73
79
|
const rowGroupsText = 'Grouped Rows ' + adaptable.api.internalApi.getCorrectEnglishVariant('Behaviour');
|
|
74
80
|
const allGroupableColumns = adaptable.api.columnApi.getGroupableColumns();
|
|
75
81
|
const sortedGroupableColumns = React.useMemo(() => {
|
|
76
82
|
return ArrayExtensions_1.default.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), layout.RowGroupedColumns ?? [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
77
83
|
}, [layout, allGroupableColumns]);
|
|
84
|
+
if (adaptable.api.gridApi.isTreeDataGrid()) {
|
|
85
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", children: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Row Grouping is not available in Tree Grids" }) }));
|
|
86
|
+
}
|
|
78
87
|
const onChange = (layout) => {
|
|
79
88
|
props.onChange((0, LayoutHelpers_1.normalizeLayout)(layout));
|
|
80
89
|
};
|
|
@@ -90,6 +99,8 @@ const RowGroupingSection = (props) => {
|
|
|
90
99
|
}
|
|
91
100
|
onChange(newLayout);
|
|
92
101
|
};
|
|
93
|
-
|
|
102
|
+
const initialExpandedCardId = (0, layoutWizardAccordionHelpers_1.getLayoutWizardInitialExpandedCardId)(props.layoutWizardMode, 'columns', (0, layoutWizardAccordionHelpers_1.isRowGroupingSectionConfigured)(layout));
|
|
103
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(initialExpandedCardId);
|
|
104
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, CollapsibleWizardCard_1.getWizardAccordionSectionClassName)(hasExpandedCard, expandedFillsSpace), children: [(0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('columns', { fillAvailable: true }), surface: "panel", "data-name": "row-grouped-columns", title: "Row Grouped Columns", help: "Select and order Columns used in Row Grouping", collapsedHelp: "", compactSummary: (0, CollapsibleWizardCard_1.renderCompactColumnTags)(layout.RowGroupedColumns ?? [], (columnId) => adaptable.api.columnApi.getFriendlyNameForColumnId(columnId), { emptyLabel: 'No columns' }), summary: layout.RowGroupedColumns?.length ? ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: layout.RowGroupedColumns.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: adaptable.api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId))) })) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No columns" })), bodyClassName: "twa:min-h-[200px] twa:max-h-[420px] twa:flex twa:flex-col twa:px-1", children: (0, jsx_runtime_1.jsx)(Card_1.Card, { shadow: false, className: "twa:h-full twa:flex twa:flex-col", children: (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { children: (0, jsx_runtime_1.jsx)(ValueSelector_1.ValueSelector, { compact: true, showFilterInput: true, filter: Utilities_1.columnFilter, filterPlaceholder: "Search Columns...", compactHeaderClassName: layoutWizardColumns_1.LAYOUT_WIZARD_COLUMN_LIST_HEADER_CLASS, compactFilterClassName: layoutWizardColumns_1.LAYOUT_WIZARD_COLUMN_LIST_SEARCH_CLASS, hideShowSelectedOnly: true, optionLayout: "label-beside-checkbox", toggleSelectionOnRowClick: true, optionClassName: layoutWizardColumns_1.LAYOUT_WIZARD_COLUMN_LIST_OPTION_CLASS, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, toListLabel: (option) => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:min-w-0", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:truncate", children: option.friendlyName ?? option.columnId }), (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: option })] })), options: sortedGroupableColumns, value: layout.RowGroupedColumns ?? [], allowReorder: true, onChange: handleColumnsChange }) }) }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('display-type'), surface: "panel", "data-name": "row-group-display-type", title: "Group Display Type", help: "Choose how Row Grouped Columns display in the grid", collapsedHelp: "How Row Grouped Columns display in the grid", compactSummary: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, rowGroupSummaryHelpers_1.getRowGroupDisplayTypeLabel)(layout) }), summary: (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, rowGroupSummaryHelpers_1.getRowGroupDisplayTypeLabel)(layout) }) }), children: (0, jsx_runtime_1.jsx)(RowGroupDisplayTypeSection, { layout: layout, onChange: onChange }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('behavior'), surface: "panel", "data-name": "row-group-behavior", title: rowGroupsText, help: "Set Grouped Rows expanded / collapsed behaviour when Layout opens", collapsedHelp: "Grouped Rows expanded / collapsed behaviour when Layout opens", compactSummary: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, rowGroupSummaryHelpers_1.getRowGroupBehaviorLabel)(layout) }), summary: (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, rowGroupSummaryHelpers_1.getRowGroupBehaviorLabel)(layout) }) }), children: (0, jsx_runtime_1.jsx)(exports.RowGroupBehaviorSection, { layout: layout, onChange: onChange }) })] }));
|
|
94
105
|
};
|
|
95
106
|
exports.RowGroupingSection = RowGroupingSection;
|
|
@@ -4,12 +4,11 @@ exports.RowSelectionSection = exports.RowSelectionSectionSummary = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
7
|
-
const Radio_1 = tslib_1.
|
|
7
|
+
const Radio_1 = tslib_1.__importDefault(require("../../../../components/Radio"));
|
|
8
8
|
const Radio_2 = require("../../../../components/Radio");
|
|
9
9
|
const Tag_1 = require("../../../../components/Tag");
|
|
10
10
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
11
11
|
const Flex_1 = require("../../../../components/Flex");
|
|
12
|
-
const twMerge_1 = require("../../../../twMerge");
|
|
13
12
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
14
13
|
const isPivotLayout_1 = require("../../../../Utilities/isPivotLayout");
|
|
15
14
|
const GeneralConstants_1 = require("../../../../Utilities/Constants/GeneralConstants");
|
|
@@ -26,6 +25,11 @@ const RowSelectionSectionSummary = () => {
|
|
|
26
25
|
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Mode: ", rs.Mode === 'multiRow' ? 'Multi Row' : 'Single Row'] }), rs.Checkboxes != null && ((0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Checkboxes: ", rs.Checkboxes ? 'Yes' : 'No'] })), rs.HeaderCheckbox != null && ((0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Header Checkbox: ", rs.HeaderCheckbox ? 'Yes' : 'No'] })), rs.EnableClickSelection != null && ((0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Click Selection: ", String(rs.EnableClickSelection)] })), rs.CheckboxInGroupColumn != null && ((0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Checkbox Location: ", rs.CheckboxInGroupColumn ? 'Group Column' : 'Selection Column'] })), rs.GroupSelectMode != null && ((0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Group Select Mode: ", rs.GroupSelectMode] })), rs.SelectAllMode != null && ((0, jsx_runtime_1.jsxs)(Tag_1.Tag, { className: "twa:mr-2", children: ["Select All Mode: ", rs.SelectAllMode] }))] }));
|
|
27
26
|
};
|
|
28
27
|
exports.RowSelectionSectionSummary = RowSelectionSectionSummary;
|
|
28
|
+
const ROW_SELECTION_MODE_OPTIONS = [
|
|
29
|
+
{ value: false, label: 'Disabled' },
|
|
30
|
+
{ value: 'singleRow', label: 'Single Row' },
|
|
31
|
+
{ value: 'multiRow', label: 'Multi Row' },
|
|
32
|
+
];
|
|
29
33
|
function getMode(layout) {
|
|
30
34
|
if (!layout.RowSelection) {
|
|
31
35
|
return false;
|
|
@@ -74,6 +78,6 @@ const RowSelectionSection = (props) => {
|
|
|
74
78
|
}
|
|
75
79
|
props.onChange(newLayout);
|
|
76
80
|
};
|
|
77
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Row Selection Mode" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether row selection is disabled, single row, or multi row" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.
|
|
81
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Row Selection Mode" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose whether row selection is disabled, single row, or multi row" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-2 twa:flex-wrap", children: (0, jsx_runtime_1.jsx)(Radio_2.RadioGroup, { orientation: "horizontal", variant: "text-only", className: Radio_2.radioGroupStyling.horizontalTextOnly, value: mode, name: "rowSelectionMode", onRadioChange: (value) => handleModeChange(value), children: ROW_SELECTION_MODE_OPTIONS.map((option) => ((0, jsx_runtime_1.jsx)(Radio_1.default, { value: option.value, "data-name": `row-selection-mode-${option.value === false ? 'disabled' : option.value}`, children: option.label }, String(option.value)))) }) }) })] }), !rowSelection && (0, jsx_runtime_1.jsx)(HelpBlock_1.default, { children: "There is no Row Selection configured for this Layout" }), rowSelection && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Row Selection Column Checkboxes" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure checkboxes in the selection column cells and header" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "row", className: "twa:gap-6", children: [(0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:flex-1", checked: rowSelection.Checkboxes ?? true, onChange: (checked) => updateRowSelection({ Checkboxes: checked }), children: "Checkboxes in Column Cells" }), mode === 'multiRow' && ((0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { className: "twa:flex-1", checked: rowSelection.HeaderCheckbox ?? true, onChange: (checked) => updateRowSelection({ HeaderCheckbox: checked }), children: "Checkbox in Column Header (to enable Select All)" }))] }) })] }), (rowSelection.Checkboxes ?? true) && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Row Grouping Selection Checkboxes" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose where selection checkboxes appear when row grouping is enabled" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.CheckboxInGroupColumn ?? false, name: "checkboxLocation", onRadioChange: (value) => updateRowSelection({ CheckboxInGroupColumn: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: false, children: "Display in dedicated Selection Column" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: true, children: "Display in Row Grouped Column" })] }) })] })), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Row Click Selection" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Configure whether users can select or deselect rows by clicking outside the checkbox" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.EnableClickSelection ?? false, name: "clickSelection", onRadioChange: (value) => updateRowSelection({ EnableClickSelection: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: false, children: "Disabled (Cannot select or deselect by clicking in Row)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: true, children: "Full (Enable selection by clicking in Row and deselection by Ctrl+clicking in Row)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'enableSelection', children: "Selection Only (Enable selection by clicking in Row)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'enableDeselection', children: "Deselection Only (Enable deselection by Ctrl+clicking in Row)" })] }) })] }), mode === 'multiRow' && !isPivot && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Grouped Row Selection Behaviour" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose how selection cascades when a grouped row is selected" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.GroupSelectMode ?? 'self', name: "groupSelectMode", onRadioChange: (value) => updateRowSelection({ GroupSelectMode: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'self', children: "Select Grouped Row Only (no cascade)" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'descendants', children: "Select Grouped Row and all descendants" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'filteredDescendants', children: "Select Grouped Row and only filtered descendants" })] }) })] })), mode === 'multiRow' && ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Select All Behaviour" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Choose which rows are selected when the header Select All checkbox is used" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsxs)(Radio_2.RadioGroup, { orientation: "vertical", value: rowSelection.SelectAllMode ?? 'all', name: "selectAllMode", onRadioChange: (value) => updateRowSelection({ SelectAllMode: value }), children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'all', children: "All rows" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'filtered', children: "Filtered rows only" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: 'currentPage', children: "Current page only" })] }) })] }))] }))] }));
|
|
78
82
|
};
|
|
79
83
|
exports.RowSelectionSection = RowSelectionSection;
|
|
@@ -8,6 +8,7 @@ const CheckBox_1 = require("../../../../components/CheckBox");
|
|
|
8
8
|
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
9
9
|
const Panel_1 = tslib_1.__importDefault(require("../../../../components/Panel"));
|
|
10
10
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/SimpleButton"));
|
|
11
|
+
const ButtonNew_1 = require("../../../Components/Buttons/ButtonNew");
|
|
11
12
|
const Card_1 = require("../../../../components/Card");
|
|
12
13
|
const Tag_1 = require("../../../../components/Tag");
|
|
13
14
|
const RowSummary_1 = require("../../../../AdaptableState/Common/RowSummary");
|
|
@@ -84,9 +85,7 @@ const buildRowSummaryExpressionOptions = (column, availableScalarExpressions, la
|
|
|
84
85
|
value: expression,
|
|
85
86
|
}));
|
|
86
87
|
const aggregation = layout.TableAggregationColumns?.find((agg) => agg.ColumnId === column.columnId)?.AggFunc;
|
|
87
|
-
if (aggregation &&
|
|
88
|
-
typeof aggregation === 'object' &&
|
|
89
|
-
aggregation.weightedColumnId) {
|
|
88
|
+
if (aggregation && typeof aggregation === 'object' && aggregation.weightedColumnId) {
|
|
90
89
|
expressionOptions.push({
|
|
91
90
|
label: 'WEIGHTERD_AVG',
|
|
92
91
|
value: RowSummary_1.WEIGHTED_AVERAGE_AGGREGATED_FUNCTION,
|
|
@@ -112,7 +111,7 @@ const RowSummarySectionSummary = () => {
|
|
|
112
111
|
return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1 twa:mb-1", children: [rowSummary.Position, ":", ' ', Object.keys(rowSummary.ColumnsMap).map((colId) => {
|
|
113
112
|
if (colId === 'Source' || colId === 'Uuid')
|
|
114
113
|
return null;
|
|
115
|
-
return ((0, jsx_runtime_1.jsxs)(Tag_1.
|
|
114
|
+
return ((0, jsx_runtime_1.jsxs)(Tag_1.ColumnTag, { className: "twa:mr-1", children: [rowSummary.ColumnsMap[colId], "(", adaptable.api.columnApi.getFriendlyNameForColumnId(colId), ")"] }, colId));
|
|
116
115
|
})] }, index) }));
|
|
117
116
|
})) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Row Summaries" })) }));
|
|
118
117
|
};
|
|
@@ -164,14 +163,15 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
|
|
|
164
163
|
...rowSummary,
|
|
165
164
|
IncludeOnlyFilteredRows,
|
|
166
165
|
});
|
|
167
|
-
}, children: "Include Only Filtered Rows" }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:h-[
|
|
166
|
+
}, children: "Include Only Filtered Rows" }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:h-[400px] twa:overflow-hidden twa:flex twa:flex-col", children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Column Aggregations" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Select columns and choose an aggregation function for each" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-0 twa:overflow-hidden twa:p-1", children: (0, jsx_runtime_1.jsx)(ValueSelector_1.ValueSelector, { style: { minHeight: 0, maxHeight: '100%' }, showFilterInput: true, toggleSelectionOnRowClick: false, filter: Utilities_1.columnFilter, toIdentifier: (column) => column.columnId, toLabel: (option) => option.friendlyName ?? option.columnId, options: columns, optionLayout: "label-beside-checkbox", toListLabel: (column) => {
|
|
168
167
|
const label = column.friendlyName ?? column.columnId;
|
|
169
|
-
|
|
170
|
-
|
|
168
|
+
const disabled = !(column.columnId in (rowSummary.ColumnsMap ?? {}));
|
|
169
|
+
if (disabled) {
|
|
170
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-2", children: [label, (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: column }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { disabled: true, items: [{ label: 'Select Aggregation', value: null }] })] }));
|
|
171
171
|
}
|
|
172
172
|
const expressionOptions = buildRowSummaryExpressionOptions(column, availableScalarExpressions, layout);
|
|
173
173
|
const expression = rowSummary.ColumnsMap[column.columnId];
|
|
174
|
-
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:mr-2", alignItems: 'center', children: [label, (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: column })] }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, {
|
|
174
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:mr-2", alignItems: 'center', children: [label, (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: column })] }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { value: expression, items: expressionOptions, onValueChange: (expression) => {
|
|
175
175
|
onChange({
|
|
176
176
|
...rowSummary,
|
|
177
177
|
ColumnsMap: {
|
|
@@ -208,7 +208,7 @@ const RowSummarySection = (props) => {
|
|
|
208
208
|
.getModuleExpressionFunctionsMap(ModuleConstants_1.LayoutModuleId).aggregatedScalarFunctions;
|
|
209
209
|
return sytemExpressions;
|
|
210
210
|
}, []);
|
|
211
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3 twa:h-full", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Row Summaries" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Add summary rows at the top or bottom of the grid with aggregated column values" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { className: "twa:p-1", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:mb-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsx)(
|
|
211
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:p-3 twa:h-full", children: (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Row Summaries" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Add summary rows at the top or bottom of the grid with aggregated column values" })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card.Body, { className: "twa:p-1", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { className: "twa:mb-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:flex-1" }), (0, jsx_runtime_1.jsx)(ButtonNew_1.ButtonNew, { onClick: () => {
|
|
212
212
|
props.onChange({
|
|
213
213
|
...layout,
|
|
214
214
|
RowSummaries: [
|
|
@@ -220,7 +220,7 @@ const RowSummarySection = (props) => {
|
|
|
220
220
|
},
|
|
221
221
|
],
|
|
222
222
|
});
|
|
223
|
-
},
|
|
223
|
+
}, children: "Add Row Summary" })] }), (layout.RowSummaries ?? []).map((rowSummary, index) => {
|
|
224
224
|
return ((0, jsx_runtime_1.jsx)(RowSummaryEditor, { onDelete: () => {
|
|
225
225
|
const newSummaries = [...layout.RowSummaries];
|
|
226
226
|
newSummaries.splice(index, 1);
|
|
@@ -1,8 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Layout } from '../../../../../types';
|
|
3
|
+
import { useAdaptable } from '../../../AdaptableContext';
|
|
4
|
+
import { type WizardCardAccordionBindCard } from '../../../Wizard/CollapsibleWizardCard';
|
|
3
5
|
export declare const SortSectionSummary: React.FunctionComponent;
|
|
4
|
-
|
|
6
|
+
export declare const buildColumnSortingSummary: (layout: Layout, adaptable: ReturnType<typeof useAdaptable>) => React.ReactNode;
|
|
7
|
+
interface ColumnSortingWizardCardProps {
|
|
8
|
+
layout: Layout;
|
|
5
9
|
onChange: (data: Layout) => void;
|
|
10
|
+
bindCard: WizardCardAccordionBindCard;
|
|
11
|
+
title?: string;
|
|
12
|
+
cardId?: string;
|
|
13
|
+
'data-name'?: string;
|
|
14
|
+
/** When expanded, grow to fill remaining section height. */
|
|
15
|
+
fillWhenExpanded?: boolean;
|
|
6
16
|
}
|
|
7
|
-
export declare const
|
|
17
|
+
export declare const ColumnSortingWizardCard: React.FunctionComponent<ColumnSortingWizardCardProps>;
|
|
8
18
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.ColumnSortingWizardCard = exports.buildColumnSortingSummary = exports.SortSectionSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
@@ -12,44 +12,68 @@ const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
|
12
12
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
13
13
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
14
14
|
const Utilities_1 = require("./Utilities");
|
|
15
|
+
const utils_1 = require("../../../../lib/utils");
|
|
16
|
+
const layoutWizardColumns_1 = require("./layoutWizardColumns");
|
|
15
17
|
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
16
18
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
17
19
|
const Flex_1 = require("../../../../components/Flex");
|
|
20
|
+
const CollapsibleWizardCard_1 = require("../../../Wizard/CollapsibleWizardCard");
|
|
18
21
|
const SortSectionSummary = () => {
|
|
19
22
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
20
23
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
21
24
|
const sortViewItems = (0, getLayoutSortViewItems_1.getLayoutSortViewItems)(layout, adaptable.api);
|
|
22
|
-
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: sortViewItems.values.length ? (sortViewItems.values.map((value) => ((0, jsx_runtime_1.jsx)(Tag_1.
|
|
25
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { children: sortViewItems.values.length ? (sortViewItems.values.map((value) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { className: "twa:mb-1 twa:mr-1", children: value }, value)))) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Sorts" })) }));
|
|
23
26
|
};
|
|
24
27
|
exports.SortSectionSummary = SortSectionSummary;
|
|
25
|
-
const
|
|
26
|
-
|
|
27
|
-
const icon =
|
|
28
|
-
|
|
28
|
+
const getColumnSortOrder = (layout, columnId) => (layout.ColumnSorts ?? []).find((sort) => sort.ColumnId === columnId)?.SortOrder;
|
|
29
|
+
const SortDirectionButton = (props) => {
|
|
30
|
+
const icon = props.sortOrder === 'Asc' ? 'sort-asc' : 'sort-desc';
|
|
31
|
+
const sortTooltip = props.sortOrder === 'Asc' ? 'Ascending (A to Z)' : 'Descending (Z to A)';
|
|
32
|
+
return ((0, jsx_runtime_1.jsx)(SimpleButton_1.default, { className: (0, utils_1.cn)('twa:flex twa:items-center twa:justify-center twa:m-1 twa:p-1', props.compact ? 'twa:min-h-7 twa:min-w-7 twa:p-0' : 'twa:shrink-0'), tooltip: sortTooltip, onClick: (event) => {
|
|
33
|
+
event.stopPropagation();
|
|
34
|
+
props.onSortChange(props.columnId, props.sortOrder === 'Asc' ? 'Desc' : 'Asc');
|
|
35
|
+
}, variant: props.compact ? 'outlined' : 'raised', tone: props.compact ? 'none' : undefined, iconSize: props.compact ? 16 : undefined, icon: icon }));
|
|
29
36
|
};
|
|
30
|
-
const
|
|
37
|
+
const SortColumnRow = (props) => {
|
|
38
|
+
const sortOrder = getColumnSortOrder(props.layout, props.column.columnId);
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-2", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: props.compact ? 'twa:truncate' : undefined, children: props.column.friendlyName ?? props.column.columnId }), sortOrder ? ((0, jsx_runtime_1.jsx)(SortDirectionButton, { compact: props.compact, columnId: props.column.columnId, sortOrder: sortOrder, onSortChange: props.onSortChange })) : null, (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: props.column })] }));
|
|
40
|
+
};
|
|
41
|
+
const SORT_VALUE_SELECTOR_OPTION_CLASS = 'twa:!py-1.5 twa:!px-2 twa:min-h-[2.5rem]';
|
|
42
|
+
const buildColumnSortingSummary = (layout, adaptable) => {
|
|
43
|
+
const sortViewItems = (0, getLayoutSortViewItems_1.getLayoutSortViewItems)(layout, adaptable.api);
|
|
44
|
+
if (!sortViewItems.values.length) {
|
|
45
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No sorts" });
|
|
46
|
+
}
|
|
47
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: sortViewItems.values.map((value) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: value }, value))) }));
|
|
48
|
+
};
|
|
49
|
+
exports.buildColumnSortingSummary = buildColumnSortingSummary;
|
|
50
|
+
const ColumnSortingWizardCard = (props) => {
|
|
51
|
+
const title = props.title ?? 'Sorting';
|
|
52
|
+
const cardId = props.cardId ?? 'sorting';
|
|
53
|
+
const dataName = props['data-name'] ?? 'column-sorting';
|
|
54
|
+
const fillWhenExpanded = props.fillWhenExpanded ?? true;
|
|
31
55
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
32
|
-
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
33
56
|
const allSortableColumns = adaptable.api.columnApi.getSortableColumns();
|
|
34
57
|
const sortedSortColumns = React.useMemo(() => {
|
|
35
|
-
return ArrayExtensions_1.default.sortArrayWithOrder(allSortableColumns.map((col) => col.columnId), (layout.ColumnSorts ?? []).map((sort) => sort.ColumnId), { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
36
|
-
}, [layout, allSortableColumns]);
|
|
58
|
+
return ArrayExtensions_1.default.sortArrayWithOrder(allSortableColumns.map((col) => col.columnId), (props.layout.ColumnSorts ?? []).map((sort) => sort.ColumnId), { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
59
|
+
}, [props.layout, allSortableColumns, adaptable]);
|
|
37
60
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
38
61
|
props.onChange({
|
|
39
|
-
...layout,
|
|
62
|
+
...props.layout,
|
|
40
63
|
ColumnSorts: (columnIds || []).map((columnId) => {
|
|
41
|
-
const SortOrder = layout.ColumnSorts?.find((sort) => sort.ColumnId === columnId)?.SortOrder ??
|
|
64
|
+
const SortOrder = props.layout.ColumnSorts?.find((sort) => sort.ColumnId === columnId)?.SortOrder ??
|
|
65
|
+
'Asc';
|
|
42
66
|
return {
|
|
43
67
|
ColumnId: columnId,
|
|
44
68
|
SortOrder: SortOrder,
|
|
45
69
|
};
|
|
46
70
|
}),
|
|
47
71
|
});
|
|
48
|
-
}, [layout]);
|
|
72
|
+
}, [props.layout, props.onChange]);
|
|
49
73
|
const handleSortChange = React.useCallback((columnId, SortOrder) => {
|
|
50
74
|
props.onChange({
|
|
51
|
-
...layout,
|
|
52
|
-
ColumnSorts: layout.ColumnSorts?.map((sort) => {
|
|
75
|
+
...props.layout,
|
|
76
|
+
ColumnSorts: props.layout.ColumnSorts?.map((sort) => {
|
|
53
77
|
if (sort.ColumnId === columnId) {
|
|
54
78
|
return {
|
|
55
79
|
...sort,
|
|
@@ -59,7 +83,8 @@ const SortSection = (props) => {
|
|
|
59
83
|
return sort;
|
|
60
84
|
}),
|
|
61
85
|
});
|
|
62
|
-
}, [layout]);
|
|
63
|
-
|
|
86
|
+
}, [props.layout, props.onChange]);
|
|
87
|
+
const sortViewItems = (0, getLayoutSortViewItems_1.getLayoutSortViewItems)(props.layout, adaptable.api);
|
|
88
|
+
return ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...props.bindCard(cardId, { fillAvailable: fillWhenExpanded }), surface: "panel", "data-name": dataName, title: title, help: "Select columns to sort and set their order. Drag to change sort priority.", collapsedHelp: "", compactSummary: sortViewItems.values.length ? ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden", children: [sortViewItems.values.slice(0, 2).map((value) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { className: "twa:shrink-0", children: value }, value))), sortViewItems.values.length > 2 ? ((0, jsx_runtime_1.jsxs)("span", { className: "twa:text-xs twa:opacity-70 twa:shrink-0", children: ["+", sortViewItems.values.length - 2] })) : null] })) : ('No sorts'), summary: (0, exports.buildColumnSortingSummary)(props.layout, adaptable), className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:max-h-[420px] twa:overflow-hidden twa:flex twa:flex-col twa:!pt-0 twa:!pb-0 twa:px-1", children: (0, jsx_runtime_1.jsx)(Card_1.Card, { shadow: false, className: "twa:h-full twa:overflow-hidden twa:flex twa:flex-col", children: (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:flex-1 twa:min-h-0 twa:overflow-hidden twa:px-1 twa:pt-0 twa:pb-0", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-1.5 twa:h-full twa:overflow-hidden twa:flex-1 twa:min-h-0", "data-name": "sorting-columns-container", children: (0, jsx_runtime_1.jsx)(ValueSelector_1.ValueSelector, { compact: true, showFilterInput: true, filter: Utilities_1.columnFilter, filterPlaceholder: "Search Columns...", compactHeaderClassName: layoutWizardColumns_1.LAYOUT_WIZARD_COLUMN_LIST_HEADER_CLASS, compactFilterClassName: layoutWizardColumns_1.LAYOUT_WIZARD_COLUMN_LIST_SEARCH_CLASS, toggleSelectionOnRowClick: true, optionClassName: SORT_VALUE_SELECTOR_OPTION_CLASS, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, optionLayout: "label-beside-checkbox", toListLabel: (column) => ((0, jsx_runtime_1.jsx)(SortColumnRow, { compact: true, column: column, layout: props.layout, onSortChange: handleSortChange })), options: sortedSortColumns, value: (props.layout.ColumnSorts ?? []).map((sort) => sort.ColumnId), allowReorder: () => true, onChange: handleColumnsSelectionChange }) }) }) }) }));
|
|
64
89
|
};
|
|
65
|
-
exports.
|
|
90
|
+
exports.ColumnSortingWizardCard = ColumnSortingWizardCard;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Layout, TableLayout } from '../../../../../types';
|
|
3
|
+
import { type WizardCardAccordionBindCard } from '../../../Wizard/CollapsibleWizardCard';
|
|
4
|
+
import type { IAdaptable } from '../../../../AdaptableInterfaces/IAdaptable';
|
|
5
|
+
import { type ColumnDefaultWidthResolver } from './columnLayoutHelpers';
|
|
6
|
+
export declare const buildColumnPinningSummary: (layout: Layout, adaptable: IAdaptable) => React.ReactNode;
|
|
7
|
+
export declare const buildColumnSizingSummary: (layout: Layout, adaptable: IAdaptable, resolveDefaultWidth: ColumnDefaultWidthResolver) => React.ReactNode;
|
|
8
|
+
interface ColumnPinningWizardCardProps {
|
|
9
|
+
layout: TableLayout;
|
|
10
|
+
onChange: (data: Layout) => void;
|
|
11
|
+
bindCard: WizardCardAccordionBindCard;
|
|
12
|
+
}
|
|
13
|
+
export declare const ColumnPinningWizardCard: React.FunctionComponent<ColumnPinningWizardCardProps>;
|
|
14
|
+
interface ColumnSizingWizardCardProps {
|
|
15
|
+
layout: TableLayout;
|
|
16
|
+
onChange: (data: Layout) => void;
|
|
17
|
+
bindCard: WizardCardAccordionBindCard;
|
|
18
|
+
}
|
|
19
|
+
export declare const ColumnSizingWizardCard: React.FunctionComponent<ColumnSizingWizardCardProps>;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ColumnSizingWizardCard = exports.ColumnPinningWizardCard = exports.buildColumnSizingSummary = exports.buildColumnPinningSummary = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const React = tslib_1.__importStar(require("react"));
|
|
7
|
+
const Input_1 = tslib_1.__importDefault(require("../../../../components/Input"));
|
|
8
|
+
const Radio_1 = tslib_1.__importStar(require("../../../../components/Radio"));
|
|
9
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
10
|
+
const CollapsibleWizardCard_1 = require("../../../Wizard/CollapsibleWizardCard");
|
|
11
|
+
const Utilities_1 = require("./Utilities");
|
|
12
|
+
const AdaptableFormControlTextClear_1 = require("../../../Components/Forms/AdaptableFormControlTextClear");
|
|
13
|
+
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
14
|
+
const Tag_1 = require("../../../../components/Tag");
|
|
15
|
+
const Flex_1 = require("../../../../components/Flex");
|
|
16
|
+
const layoutWizardColumns_1 = require("./layoutWizardColumns");
|
|
17
|
+
const utils_1 = require("../../../../lib/utils");
|
|
18
|
+
const columnLayoutHelpers_1 = require("./columnLayoutHelpers");
|
|
19
|
+
const PinningColumnRow = (props) => {
|
|
20
|
+
const columnPinning = props.layout.ColumnPinning?.[props.column.columnId];
|
|
21
|
+
const currentPin = columnPinning === 'left' || columnPinning === 'right' ? columnPinning : 'None';
|
|
22
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: (0, utils_1.cn)('ab-Layout-Wizard__ColumnListRow', 'twa:bg-primary twa:text-primary-foreground twa:rounded-standard', 'twa:gap-2 twa:py-1.5 twa:px-2 twa:min-h-[2.5rem]'), "data-name": `pinning-row-${props.column.columnId}`, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-0 twa:truncate", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [props.column.friendlyName ?? props.column.columnId, (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: props.column })] }) }), (0, jsx_runtime_1.jsx)(Radio_1.RadioGroup, { orientation: "horizontal", variant: "text-only", className: (0, utils_1.cn)(Radio_1.radioGroupStyling.horizontalTextOnly, 'twa:shrink-0'), value: currentPin, name: `pinning-${props.column.columnId}`, onRadioChange: (value) => {
|
|
23
|
+
props.onPinChange(props.column.columnId, value === 'None' ? null : value);
|
|
24
|
+
}, children: columnLayoutHelpers_1.COLUMN_PINNING_OPTIONS.map((option) => ((0, jsx_runtime_1.jsx)(Radio_1.default, { value: option.value, "data-name": `pinning-${props.column.columnId}-${option.value}`, children: option.label }, option.value))) })] }));
|
|
25
|
+
};
|
|
26
|
+
const SizingColumnRow = (props) => {
|
|
27
|
+
const sizing = props.layout.ColumnSizing?.[props.column.columnId];
|
|
28
|
+
const displayValues = (0, columnLayoutHelpers_1.getExplicitSizingDisplayValues)(props.column.columnId, sizing, props.resolveDefaultWidth);
|
|
29
|
+
const resizable = props.column.resizable !== false;
|
|
30
|
+
const parseNumberInput = (value) => {
|
|
31
|
+
const parsed = parseFloat(value);
|
|
32
|
+
return typeof parsed === 'number' && !isNaN(parsed) ? parsed : undefined;
|
|
33
|
+
};
|
|
34
|
+
const sizingLabelClass = 'twa:text-xs twa:opacity-70 twa:shrink-0';
|
|
35
|
+
const sizingInputClass = 'ab-Layout-Wizard__ColumnLayoutSizingInput ab-Layout-Wizard__ColumnPropertiesEditor__Input twa:!min-h-0 twa:text-2';
|
|
36
|
+
const sizingField = (label, inputName, value, onChange) => ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:shrink-0", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: sizingLabelClass, children: label }), (0, jsx_runtime_1.jsx)(Input_1.default, { "data-name": inputName, className: sizingInputClass, type: "number", placeholder: "\u2014", disabled: !resizable, onChange: (event) => {
|
|
37
|
+
onChange(parseNumberInput(event.target.value));
|
|
38
|
+
}, value: value ?? '' })] }));
|
|
39
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: (0, utils_1.cn)('ab-Layout-Wizard__ColumnListRow', 'twa:bg-primary twa:text-primary-foreground twa:rounded-standard', 'twa:gap-2 twa:py-1.5 twa:px-2 twa:min-h-[2.5rem] twa:min-w-0'), "data-name": `sizing-row-${props.column.columnId}`, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex-1 twa:min-w-0 twa:truncate", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", children: [props.column.friendlyName ?? props.column.columnId, (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: props.column })] }) }), (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-4 twa:flex-shrink-0", children: [sizingField('Width', `sizing-width-${props.column.columnId}`, displayValues.width, (value) => props.onColumnWidthChange(props.column.columnId, value)), sizingField('Flex', `sizing-flex-${props.column.columnId}`, displayValues.flex, (value) => props.onColumnFlexChange(props.column.columnId, value)), sizingField('Min', `sizing-min-${props.column.columnId}`, displayValues.minWidth, (value) => props.onColumnMinWidthChange(props.column.columnId, value)), sizingField('Max', `sizing-max-${props.column.columnId}`, displayValues.maxWidth, (value) => props.onColumnMaxWidthChange(props.column.columnId, value))] })] }));
|
|
40
|
+
};
|
|
41
|
+
const buildColumnPinningSummary = (layout, adaptable) => {
|
|
42
|
+
const leftPinned = (0, columnLayoutHelpers_1.getLayoutPinnedColumnIds)(layout, 'left');
|
|
43
|
+
const rightPinned = (0, columnLayoutHelpers_1.getLayoutPinnedColumnIds)(layout, 'right');
|
|
44
|
+
if (!leftPinned.length && !rightPinned.length) {
|
|
45
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None pinned" });
|
|
46
|
+
}
|
|
47
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2", children: [leftPinned.length ? ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1 twa:items-center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: "Left:" }), leftPinned.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: adaptable.api.columnApi.getFriendlyNameForColumnId(columnId, layout) }, columnId)))] })) : null, rightPinned.length ? ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1 twa:items-center", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70", children: "Right:" }), rightPinned.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: adaptable.api.columnApi.getFriendlyNameForColumnId(columnId, layout) }, columnId)))] })) : null] }));
|
|
48
|
+
};
|
|
49
|
+
exports.buildColumnPinningSummary = buildColumnPinningSummary;
|
|
50
|
+
const buildColumnSizingSummary = (layout, adaptable, resolveDefaultWidth) => {
|
|
51
|
+
const sizedColumnIds = (0, columnLayoutHelpers_1.getLayoutExplicitSizedColumnIds)(layout, resolveDefaultWidth);
|
|
52
|
+
if (!sizedColumnIds.length) {
|
|
53
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "Default sizing" });
|
|
54
|
+
}
|
|
55
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: sizedColumnIds.map((columnId) => ((0, jsx_runtime_1.jsxs)(Tag_1.ColumnTag, { children: [adaptable.api.columnApi.getFriendlyNameForColumnId(columnId, layout), " (", (0, columnLayoutHelpers_1.formatColumnSizingBrief)(columnId, layout.ColumnSizing?.[columnId], resolveDefaultWidth), ")"] }, columnId))) }));
|
|
56
|
+
};
|
|
57
|
+
exports.buildColumnSizingSummary = buildColumnSizingSummary;
|
|
58
|
+
const ColumnPinningWizardCard = (props) => {
|
|
59
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
60
|
+
const [pinningSearch, setPinningSearch] = React.useState('');
|
|
61
|
+
const layoutColumns = React.useMemo(() => (0, layoutWizardColumns_1.getLayoutWizardOrderedColumns)(adaptable, props.layout), [adaptable, props.layout]);
|
|
62
|
+
const filteredPinningColumns = pinningSearch
|
|
63
|
+
? layoutColumns.filter((col) => (0, Utilities_1.columnFilter)(col, pinningSearch))
|
|
64
|
+
: layoutColumns;
|
|
65
|
+
const handlePinChange = (columnId, pinning) => {
|
|
66
|
+
const ColumnPinning = { ...props.layout.ColumnPinning };
|
|
67
|
+
if (pinning) {
|
|
68
|
+
ColumnPinning[columnId] = pinning;
|
|
69
|
+
}
|
|
70
|
+
else {
|
|
71
|
+
delete ColumnPinning[columnId];
|
|
72
|
+
}
|
|
73
|
+
props.onChange({
|
|
74
|
+
...props.layout,
|
|
75
|
+
ColumnPinning,
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
const leftPinned = (0, columnLayoutHelpers_1.getLayoutPinnedColumnIds)(props.layout, 'left');
|
|
79
|
+
const rightPinned = (0, columnLayoutHelpers_1.getLayoutPinnedColumnIds)(props.layout, 'right');
|
|
80
|
+
const pinnedColumnIds = [...leftPinned, ...rightPinned];
|
|
81
|
+
return ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...props.bindCard('pinning', { fillAvailable: true }), surface: "panel", "data-name": "column-pinning", title: "Pinning", help: "Pin columns to the left or right of the grid", collapsedHelp: "", compactSummary: pinnedColumnIds.length ? ((0, jsx_runtime_1.jsxs)("span", { children: [pinnedColumnIds.length, " pinned", leftPinned.length && rightPinned.length
|
|
82
|
+
? ` (${leftPinned.length} left, ${rightPinned.length} right)`
|
|
83
|
+
: leftPinned.length
|
|
84
|
+
? ' (left)'
|
|
85
|
+
: ' (right)'] })) : ('None pinned'), summary: (0, exports.buildColumnPinningSummary)(props.layout, adaptable), className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:max-h-[420px] twa:overflow-hidden twa:flex twa:flex-col", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-2 twa:h-full twa:min-h-0 twa:p-1", children: [(0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: pinningSearch, OnTextChange: setPinningSearch, placeholder: "Search columns...", className: "twa:w-full" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-0.5 twa:flex-1 twa:min-h-0 twa:overflow-y-auto", children: filteredPinningColumns.map((column) => ((0, jsx_runtime_1.jsx)(PinningColumnRow, { column: column, layout: props.layout, onPinChange: handlePinChange }, column.columnId))) })] }) }));
|
|
86
|
+
};
|
|
87
|
+
exports.ColumnPinningWizardCard = ColumnPinningWizardCard;
|
|
88
|
+
const ColumnSizingWizardCard = (props) => {
|
|
89
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
90
|
+
const [sizingSearch, setSizingSearch] = React.useState('');
|
|
91
|
+
const resolveDefaultWidth = React.useCallback((columnId) => adaptable.getDefaultColumnWidthForCol(columnId), [adaptable]);
|
|
92
|
+
const layoutColumns = React.useMemo(() => (0, layoutWizardColumns_1.getLayoutWizardOrderedColumns)(adaptable, props.layout), [adaptable, props.layout]);
|
|
93
|
+
const filteredSizingColumns = sizingSearch
|
|
94
|
+
? layoutColumns.filter((col) => (0, Utilities_1.columnFilter)(col, sizingSearch))
|
|
95
|
+
: layoutColumns;
|
|
96
|
+
const updateColumnSizing = (columnId, update) => {
|
|
97
|
+
const ColumnSizing = { ...props.layout.ColumnSizing };
|
|
98
|
+
const colSizingForCol = { ...(ColumnSizing[columnId] ?? {}) };
|
|
99
|
+
const updated = update(colSizingForCol);
|
|
100
|
+
if ((0, columnLayoutHelpers_1.hasExplicitLayoutSizing)(columnId, updated, resolveDefaultWidth)) {
|
|
101
|
+
ColumnSizing[columnId] = updated;
|
|
102
|
+
}
|
|
103
|
+
else {
|
|
104
|
+
delete ColumnSizing[columnId];
|
|
105
|
+
}
|
|
106
|
+
props.onChange({
|
|
107
|
+
...props.layout,
|
|
108
|
+
ColumnSizing,
|
|
109
|
+
});
|
|
110
|
+
};
|
|
111
|
+
const handleColumnWidthChange = (columnId, width) => {
|
|
112
|
+
updateColumnSizing(columnId, (colSizing) => {
|
|
113
|
+
const next = { ...colSizing };
|
|
114
|
+
if (width == null ||
|
|
115
|
+
width === resolveDefaultWidth(columnId)) {
|
|
116
|
+
delete next.Width;
|
|
117
|
+
}
|
|
118
|
+
else {
|
|
119
|
+
delete next.Flex;
|
|
120
|
+
next.Width = width;
|
|
121
|
+
}
|
|
122
|
+
return next;
|
|
123
|
+
});
|
|
124
|
+
};
|
|
125
|
+
const handleColumnFlexChange = (columnId, flex) => {
|
|
126
|
+
updateColumnSizing(columnId, (colSizing) => {
|
|
127
|
+
const next = { ...colSizing };
|
|
128
|
+
if (flex == null) {
|
|
129
|
+
delete next.Flex;
|
|
130
|
+
}
|
|
131
|
+
else {
|
|
132
|
+
delete next.Width;
|
|
133
|
+
next.Flex = flex;
|
|
134
|
+
}
|
|
135
|
+
return next;
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
const handleColumnMinWidthChange = (columnId, minWidth) => {
|
|
139
|
+
updateColumnSizing(columnId, (colSizing) => {
|
|
140
|
+
const next = { ...colSizing };
|
|
141
|
+
if (minWidth == null) {
|
|
142
|
+
delete next.MinWidth;
|
|
143
|
+
}
|
|
144
|
+
else {
|
|
145
|
+
next.MinWidth = minWidth;
|
|
146
|
+
}
|
|
147
|
+
return next;
|
|
148
|
+
});
|
|
149
|
+
};
|
|
150
|
+
const handleColumnMaxWidthChange = (columnId, maxWidth) => {
|
|
151
|
+
updateColumnSizing(columnId, (colSizing) => {
|
|
152
|
+
const next = { ...colSizing };
|
|
153
|
+
if (maxWidth == null) {
|
|
154
|
+
delete next.MaxWidth;
|
|
155
|
+
}
|
|
156
|
+
else {
|
|
157
|
+
next.MaxWidth = maxWidth;
|
|
158
|
+
}
|
|
159
|
+
return next;
|
|
160
|
+
});
|
|
161
|
+
};
|
|
162
|
+
const sizedColumnIds = (0, columnLayoutHelpers_1.getLayoutExplicitSizedColumnIds)(props.layout, resolveDefaultWidth);
|
|
163
|
+
return ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...props.bindCard('sizing', { fillAvailable: true }), surface: "panel", "data-name": "column-sizing", title: "Sizing", help: "Set width, flex, and min/max overrides. Default column widths are not stored in the Layout.", collapsedHelp: "", compactSummary: sizedColumnIds.length
|
|
164
|
+
? `${sizedColumnIds.length} custom ${sizedColumnIds.length === 1 ? 'size' : 'sizes'}`
|
|
165
|
+
: 'Default sizing', summary: (0, exports.buildColumnSizingSummary)(props.layout, adaptable, resolveDefaultWidth), className: "twa:overflow-hidden twa:flex twa:flex-col", bodyClassName: "twa:min-h-[200px] twa:max-h-[420px] twa:overflow-hidden twa:flex twa:flex-col", children: (0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-1.5 twa:h-full twa:min-h-0 twa:p-1", children: [(0, jsx_runtime_1.jsx)(AdaptableFormControlTextClear_1.AdaptableFormControlTextClear, { value: sizingSearch, OnTextChange: setSizingSearch, placeholder: "Search columns...", className: "twa:w-full" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-0.5 twa:flex-1 twa:min-h-0 twa:overflow-y-auto", children: filteredSizingColumns.map((column) => ((0, jsx_runtime_1.jsx)(SizingColumnRow, { column: column, layout: props.layout, resolveDefaultWidth: resolveDefaultWidth, onColumnWidthChange: handleColumnWidthChange, onColumnFlexChange: handleColumnFlexChange, onColumnMinWidthChange: handleColumnMinWidthChange, onColumnMaxWidthChange: handleColumnMaxWidthChange }, column.columnId))) })] }) }));
|
|
166
|
+
};
|
|
167
|
+
exports.ColumnSizingWizardCard = ColumnSizingWizardCard;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ColumnSizingDefinition } from '../../../../AdaptableState/LayoutState';
|
|
2
|
+
import type { ColumnSort, Layout } from '../../../../../types';
|
|
3
|
+
export declare const COLUMN_PINNING_OPTIONS: {
|
|
4
|
+
value: 'left' | 'right' | 'None';
|
|
5
|
+
label: string;
|
|
6
|
+
}[];
|
|
7
|
+
export declare const COLUMN_SORT_OPTIONS: {
|
|
8
|
+
value: ColumnSort['SortOrder'] | 'None';
|
|
9
|
+
label: string;
|
|
10
|
+
}[];
|
|
11
|
+
export type ColumnDefaultWidthResolver = (columnId: string) => number;
|
|
12
|
+
export declare function getLayoutPinnedColumnIds(layout: Layout, side: 'left' | 'right'): string[];
|
|
13
|
+
/** Whether this column has sizing stored in the Layout that differs from grid defaults. */
|
|
14
|
+
export declare function hasExplicitLayoutSizing(columnId: string, sizing: ColumnSizingDefinition | undefined, resolveDefaultWidth?: ColumnDefaultWidthResolver): boolean;
|
|
15
|
+
export declare function getLayoutExplicitSizedColumnIds(layout: Layout, resolveDefaultWidth?: ColumnDefaultWidthResolver): string[];
|
|
16
|
+
export declare function formatColumnSizingBrief(columnId: string, sizing: ColumnSizingDefinition | undefined, resolveDefaultWidth?: ColumnDefaultWidthResolver): string;
|
|
17
|
+
/** Width/flex values to show in the sizing editor (default grid widths are omitted). */
|
|
18
|
+
export declare function getExplicitSizingDisplayValues(columnId: string, sizing: ColumnSizingDefinition | undefined, resolveDefaultWidth?: ColumnDefaultWidthResolver): {
|
|
19
|
+
width: number | undefined;
|
|
20
|
+
flex: number | undefined;
|
|
21
|
+
minWidth: number | undefined;
|
|
22
|
+
maxWidth: number | undefined;
|
|
23
|
+
};
|
|
24
|
+
export declare function formatColumnInspectorPinning(layout: Layout, columnId: string): string;
|
|
25
|
+
export declare function formatColumnInspectorSizing(columnId: string, sizing: ColumnSizingDefinition | undefined, resolveDefaultWidth?: ColumnDefaultWidthResolver): string;
|
|
26
|
+
export declare function formatColumnInspectorSorting(layout: Layout, columnId: string): string;
|
|
27
|
+
export declare function getColumnSortSelection(layout: Layout, columnId: string): ColumnSort['SortOrder'] | 'None';
|
|
28
|
+
export declare function applyColumnPinChange(layout: Layout, columnId: string, pinning: 'left' | 'right' | null): Layout;
|
|
29
|
+
export declare function applyColumnSortChange(layout: Layout, columnId: string, sortOrder: ColumnSort['SortOrder'] | 'None'): Layout;
|
|
30
|
+
export declare function applyColumnSizingFieldChange(layout: Layout, columnId: string, field: 'width' | 'flex' | 'minWidth' | 'maxWidth', value: number | undefined, resolveDefaultWidth: ColumnDefaultWidthResolver): Layout;
|