@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
|
@@ -4,27 +4,70 @@ exports.PivotAggregationsSection = exports.PivotAggregationsSectionSummary = exp
|
|
|
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 CheckBox_1 = require("../../../../components/CheckBox");
|
|
8
|
-
const DropdownButton_1 = tslib_1.__importDefault(require("../../../../components/DropdownButton"));
|
|
9
|
-
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
10
7
|
const Card_1 = require("../../../../components/Card");
|
|
11
8
|
const Tag_1 = require("../../../../components/Tag");
|
|
12
9
|
const AggregationColumns_1 = require("../../../../AdaptableState/Common/AggregationColumns");
|
|
13
10
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
14
11
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
15
12
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
13
|
+
const CollapsibleWizardCard_1 = require("../../../Wizard/CollapsibleWizardCard");
|
|
14
|
+
const TypeRadio_1 = require("../../../Wizard/TypeRadio");
|
|
15
|
+
const layoutWizardAccordionHelpers_1 = require("./layoutWizardAccordionHelpers");
|
|
16
16
|
const Utilities_1 = require("./Utilities");
|
|
17
17
|
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
18
18
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
19
|
-
const StringExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/StringExtensions"));
|
|
20
19
|
const Flex_1 = require("../../../../components/Flex");
|
|
21
20
|
const NewSelect_1 = require("../../../../components/NewSelect");
|
|
21
|
+
const Radio_1 = tslib_1.__importStar(require("../../../../components/Radio"));
|
|
22
|
+
const layoutWizardColumns_1 = require("./layoutWizardColumns");
|
|
23
|
+
const aggregationSummaryHelpers_1 = require("../../../../Strategy/Utilities/Layout/aggregationSummaryHelpers");
|
|
24
|
+
const SummaryColorTag_1 = require("../../../Wizard/SummaryColorTag");
|
|
25
|
+
const AggregationsSection_1 = require("./AggregationsSection");
|
|
26
|
+
const PIVOT_LAYOUT_TOTAL_LABELS = {
|
|
27
|
+
off: 'None',
|
|
28
|
+
before: 'Before',
|
|
29
|
+
after: 'After',
|
|
30
|
+
};
|
|
31
|
+
const PIVOT_LAYOUT_TOTAL_DESCRIPTIONS = {
|
|
32
|
+
off: 'Pivot totals are not displayed in the grid',
|
|
33
|
+
before: 'Pivot totals are displayed before the value columns',
|
|
34
|
+
after: 'Pivot totals are displayed after the value columns',
|
|
35
|
+
};
|
|
36
|
+
const PIVOT_LAYOUT_TOTAL_OPTIONS = ['off', 'before', 'after'];
|
|
37
|
+
function getPivotLayoutTotalKey(value) {
|
|
38
|
+
if (value == null || value === false) {
|
|
39
|
+
return 'off';
|
|
40
|
+
}
|
|
41
|
+
if (value === 'before') {
|
|
42
|
+
return 'before';
|
|
43
|
+
}
|
|
44
|
+
if (value === 'after') {
|
|
45
|
+
return 'after';
|
|
46
|
+
}
|
|
47
|
+
return 'off';
|
|
48
|
+
}
|
|
49
|
+
function getPivotLayoutTotalLabel(value) {
|
|
50
|
+
return PIVOT_LAYOUT_TOTAL_LABELS[getPivotLayoutTotalKey(value)];
|
|
51
|
+
}
|
|
52
|
+
function getAggregationTotalSelectValue(total) {
|
|
53
|
+
if (!total) {
|
|
54
|
+
return 'off';
|
|
55
|
+
}
|
|
56
|
+
if (total === true || total === 'before') {
|
|
57
|
+
return 'before';
|
|
58
|
+
}
|
|
59
|
+
if (total === 'after') {
|
|
60
|
+
return 'after';
|
|
61
|
+
}
|
|
62
|
+
if (Array.isArray(total)) {
|
|
63
|
+
return 'pivot-specific';
|
|
64
|
+
}
|
|
65
|
+
return 'off';
|
|
66
|
+
}
|
|
22
67
|
const PivotColumnRow = (props) => {
|
|
23
68
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
24
69
|
const aggValue = (props.layout.PivotAggregationColumns || []).find((x) => x.ColumnId === props.column.columnId)?.AggFunc;
|
|
25
|
-
|
|
26
|
-
// AG Grid aggregation functions are offered here.
|
|
27
|
-
const aggFunctionNames = props.column.availableAggregationFunctions || [];
|
|
70
|
+
const aggFunctionNames = (props.column.availableAggregationFunctions || []).filter((fnName) => !(0, AggregationColumns_1.isWeightedAverageAggFuncName)(fnName));
|
|
28
71
|
const currentAggFnName = props.aggregationColumnsMap[props.column.columnId];
|
|
29
72
|
const updateAggFunc = (fnName) => {
|
|
30
73
|
let aggCols = [...(props.layout.PivotAggregationColumns || [])];
|
|
@@ -49,52 +92,39 @@ const PivotColumnRow = (props) => {
|
|
|
49
92
|
}
|
|
50
93
|
props.onChangeAggFunction(aggCols);
|
|
51
94
|
};
|
|
52
|
-
const
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
95
|
+
const currentAggCol = props.layout.PivotAggregationColumns?.find((aggCol) => aggCol.ColumnId === props.column.columnId);
|
|
96
|
+
const currentTotalSelectValue = getAggregationTotalSelectValue(currentAggCol?.Total);
|
|
97
|
+
const handleTotalSelectChange = (totalVariant) => {
|
|
98
|
+
let aggCols = props.layout.PivotAggregationColumns;
|
|
99
|
+
if (!aggCols) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
aggCols = aggCols.map((aggCol) => {
|
|
103
|
+
if (aggCol.ColumnId === props.column.columnId) {
|
|
104
|
+
let updatedTotal = false;
|
|
105
|
+
if (totalVariant === 'before') {
|
|
106
|
+
updatedTotal = 'before';
|
|
107
|
+
}
|
|
108
|
+
else if (totalVariant === 'after') {
|
|
109
|
+
updatedTotal = 'after';
|
|
59
110
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
let updatedTotalColumn = false;
|
|
63
|
-
if (totalVariant === 'Before') {
|
|
64
|
-
updatedTotalColumn = 'before';
|
|
65
|
-
}
|
|
66
|
-
if (totalVariant === 'After') {
|
|
67
|
-
updatedTotalColumn = 'after';
|
|
68
|
-
}
|
|
69
|
-
if (totalVariant === 'Pivot Specific') {
|
|
70
|
-
updatedTotalColumn = props.layout.PivotColumns.map((pivotColId) => {
|
|
71
|
-
return {
|
|
72
|
-
PivotColumnId: pivotColId,
|
|
73
|
-
ShowTotal: true,
|
|
74
|
-
};
|
|
75
|
-
});
|
|
76
|
-
}
|
|
111
|
+
else if (totalVariant === 'pivot-specific') {
|
|
112
|
+
updatedTotal = props.layout.PivotColumns.map((pivotColId) => {
|
|
77
113
|
return {
|
|
78
|
-
|
|
79
|
-
|
|
114
|
+
PivotColumnId: pivotColId,
|
|
115
|
+
ShowTotal: true,
|
|
80
116
|
};
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
: currentAggCol.Total === 'after'
|
|
93
|
-
? 'After'
|
|
94
|
-
: Array.isArray(currentAggCol.Total)
|
|
95
|
-
? 'Pivot Specific'
|
|
96
|
-
: 'Off'
|
|
97
|
-
: 'Off';
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
...aggCol,
|
|
121
|
+
Total: updatedTotal,
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
return aggCol;
|
|
125
|
+
});
|
|
126
|
+
props.onChangeAggFunction(aggCols);
|
|
127
|
+
};
|
|
98
128
|
const hasPivotSpecificTotals = Array.isArray(currentAggCol?.Total);
|
|
99
129
|
const pivotSpecificTotals = Array.isArray(currentAggCol?.Total)
|
|
100
130
|
? currentAggCol.Total
|
|
@@ -102,7 +132,7 @@ const PivotColumnRow = (props) => {
|
|
|
102
132
|
PivotColumnId: pivotColId,
|
|
103
133
|
ShowTotal: false,
|
|
104
134
|
}));
|
|
105
|
-
const
|
|
135
|
+
const handlePivotSpecificTotalChange = (pivotColId, value) => {
|
|
106
136
|
const updatedAggCols = (props.layout.PivotAggregationColumns || []).map((aggCol) => {
|
|
107
137
|
if (aggCol.ColumnId === props.column.columnId) {
|
|
108
138
|
const updatedTotals = pivotSpecificTotals.map((total) => {
|
|
@@ -117,35 +147,38 @@ const PivotColumnRow = (props) => {
|
|
|
117
147
|
});
|
|
118
148
|
props.onChangeAggFunction(updatedAggCols);
|
|
119
149
|
};
|
|
120
|
-
const
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
150
|
+
const getPivotSpecificTotalSelectValue = (showTotal) => {
|
|
151
|
+
if (showTotal === false || showTotal == undefined) {
|
|
152
|
+
return 'off';
|
|
153
|
+
}
|
|
154
|
+
if (showTotal === 'before' || showTotal === true) {
|
|
155
|
+
return 'before';
|
|
156
|
+
}
|
|
157
|
+
if (showTotal === 'after') {
|
|
158
|
+
return 'after';
|
|
159
|
+
}
|
|
160
|
+
return 'off';
|
|
161
|
+
};
|
|
162
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "flex-start", flexDirection: "column", className: "twa:min-w-0 twa:gap-y-1 twa:gap-x-1.5", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", flexWrap: "wrap", className: "twa:min-w-0 twa:gap-x-1.5 twa:gap-y-0.5", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:truncate", children: props.column.friendlyName }), (0, jsx_runtime_1.jsx)(ColumnGroupTag_1.ColumnGroupTag, { column: props.column }), aggValue && ((0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { size: "small", stopMouseDownPropagation: true, className: "twa:min-w-[6.5rem] twa:shrink-0", value: currentAggFnName, items: aggFunctionNames.map((fnName) => ({
|
|
163
|
+
label: fnName,
|
|
164
|
+
value: fnName,
|
|
165
|
+
})), onValueChange: updateAggFunc })), aggValue && ((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: "twa:text-3", children: "Total" }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { size: "small", stopMouseDownPropagation: true, className: "twa:min-w-[6.5rem]", value: currentTotalSelectValue, items: [
|
|
166
|
+
{ label: 'Off', value: 'off' },
|
|
167
|
+
{ label: 'Before', value: 'before' },
|
|
168
|
+
{ label: 'After', value: 'after' },
|
|
169
|
+
{ label: 'Pivot Specific', value: 'pivot-specific' },
|
|
170
|
+
], onValueChange: handleTotalSelectChange })] }))] }), hasPivotSpecificTotals && ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-x-2 twa:gap-y-1 twa:pl-2", style: { borderLeft: '1px solid var(--ab-color-primary-foreground)' }, children: props.layout.PivotColumns.map((pivotColId) => {
|
|
171
|
+
const pivotTotalSetting = pivotSpecificTotals.find((t) => t.PivotColumnId === pivotColId);
|
|
172
|
+
const pivotTotalValue = getPivotSpecificTotalSelectValue(pivotTotalSetting?.ShowTotal);
|
|
173
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { alignItems: "center", className: "twa:gap-1 twa:shrink-0", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:text-3 twa:truncate", children: [adaptable.api.columnApi.getFriendlyNameForColumnId(pivotColId), ":"] }), (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { size: "small", stopMouseDownPropagation: true, className: "twa:min-w-[5.5rem]", value: pivotTotalValue, items: [
|
|
174
|
+
{ label: 'Off', value: 'off' },
|
|
175
|
+
{ label: 'Before', value: 'before' },
|
|
176
|
+
{ label: 'After', value: 'after' },
|
|
177
|
+
], onValueChange: (value) => {
|
|
178
|
+
const mappedValue = value === 'off' ? false : value;
|
|
179
|
+
handlePivotSpecificTotalChange(pivotColId, mappedValue);
|
|
180
|
+
} })] }, pivotColId));
|
|
181
|
+
}) }))] }));
|
|
149
182
|
};
|
|
150
183
|
const isPivotAggregationsSectionValid = (data) => {
|
|
151
184
|
const weightedAvg = data.PivotAggregationColumns
|
|
@@ -159,18 +192,15 @@ const isPivotAggregationsSectionValid = (data) => {
|
|
|
159
192
|
return true;
|
|
160
193
|
};
|
|
161
194
|
exports.isPivotAggregationsSectionValid = isPivotAggregationsSectionValid;
|
|
162
|
-
const PivotAggregationsSectionSummary = () => {
|
|
195
|
+
const PivotAggregationsSectionSummary = (props) => {
|
|
163
196
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
164
|
-
const { data:
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
if (
|
|
168
|
-
|
|
197
|
+
const { data: contextLayout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
198
|
+
const layout = props.layout ?? contextLayout;
|
|
199
|
+
const values = (0, aggregationSummaryHelpers_1.getPivotAggregationSummaryValues)(layout, adaptable.api);
|
|
200
|
+
if (!values.length) {
|
|
201
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Aggregations" });
|
|
169
202
|
}
|
|
170
|
-
|
|
171
|
-
content = (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Pivot Column Aggregations" });
|
|
172
|
-
}
|
|
173
|
-
return (0, jsx_runtime_1.jsx)(Flex_1.Box, { children: content });
|
|
203
|
+
return (0, SummaryColorTag_1.renderSummaryStringTags)(values);
|
|
174
204
|
};
|
|
175
205
|
exports.PivotAggregationsSectionSummary = PivotAggregationsSectionSummary;
|
|
176
206
|
const PivotAggregationsSection = (props) => {
|
|
@@ -184,11 +214,11 @@ const PivotAggregationsSection = (props) => {
|
|
|
184
214
|
const handleColumnsSelectionChange = React.useCallback((columnIds) => {
|
|
185
215
|
const currentAggColumns = layout.PivotAggregationColumns ?? [];
|
|
186
216
|
const PivotAggregationColumns = columnIds.map((colId) => {
|
|
217
|
+
const existing = currentAggColumns.find((x) => x.ColumnId === colId);
|
|
187
218
|
return {
|
|
188
219
|
ColumnId: colId,
|
|
189
|
-
AggFunc:
|
|
190
|
-
|
|
191
|
-
TotalColumn: currentAggColumns.find((x) => x.ColumnId === colId)?.Total,
|
|
220
|
+
AggFunc: existing?.AggFunc ?? adaptable.api.columnApi.getDefaultAggFunc(colId),
|
|
221
|
+
Total: existing?.Total,
|
|
192
222
|
};
|
|
193
223
|
});
|
|
194
224
|
props.onChange({
|
|
@@ -197,14 +227,14 @@ const PivotAggregationsSection = (props) => {
|
|
|
197
227
|
});
|
|
198
228
|
}, [layout]);
|
|
199
229
|
const handleAggregationChange = React.useCallback((pivotAggregationColumns) => {
|
|
200
|
-
|
|
201
|
-
// if any Aggregation Column has a Total Column, we need to disable the Pivot Group Total Column
|
|
202
|
-
delete layout['PivotColumnTotal'];
|
|
203
|
-
}
|
|
204
|
-
props.onChange({
|
|
230
|
+
const updatedLayout = {
|
|
205
231
|
...layout,
|
|
206
232
|
PivotAggregationColumns: pivotAggregationColumns,
|
|
207
|
-
}
|
|
233
|
+
};
|
|
234
|
+
if (pivotAggregationColumns.some((aggCol) => aggCol.Total !== false && aggCol.Total != null)) {
|
|
235
|
+
delete updatedLayout.PivotColumnTotal;
|
|
236
|
+
}
|
|
237
|
+
props.onChange(updatedLayout);
|
|
208
238
|
}, [layout]);
|
|
209
239
|
const aggregationColumnsMap = React.useMemo(() => {
|
|
210
240
|
const allColumnsMap = allColumns.reduce((acc, col) => {
|
|
@@ -234,7 +264,6 @@ const PivotAggregationsSection = (props) => {
|
|
|
234
264
|
});
|
|
235
265
|
};
|
|
236
266
|
const checkIfPivotColumnTotalEnabled = () => {
|
|
237
|
-
// check that all AggregationColumns have identical AggFuncs
|
|
238
267
|
const aggregationColumns = layout.PivotAggregationColumns;
|
|
239
268
|
if (!aggregationColumns || aggregationColumns.length === 0) {
|
|
240
269
|
return true;
|
|
@@ -243,7 +272,6 @@ const PivotAggregationsSection = (props) => {
|
|
|
243
272
|
if (layout.PivotAggregationColumns?.some((aggCol) => (0, AggregationColumns_1.getAggFuncName)(aggCol.AggFunc) !== firstAggFuncName)) {
|
|
244
273
|
return 'All columns must use the same aggregation function.';
|
|
245
274
|
}
|
|
246
|
-
// check that no Aggregation Total Column is enabled
|
|
247
275
|
const hasAggregationTotalColumn = aggregationColumns.some((aggCol) => aggCol.Total !== false && aggCol.Total != null);
|
|
248
276
|
if (hasAggregationTotalColumn) {
|
|
249
277
|
return 'This option is not available when an Aggregation Total Column is present.';
|
|
@@ -251,47 +279,22 @@ const PivotAggregationsSection = (props) => {
|
|
|
251
279
|
return true;
|
|
252
280
|
};
|
|
253
281
|
const isPivotColumnTotalEnabled = checkIfPivotColumnTotalEnabled();
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
...['before', 'after'].map((position) => {
|
|
272
|
-
return {
|
|
273
|
-
label: StringExtensions_1.default.CapitaliseFirstLetter(position),
|
|
274
|
-
value: position,
|
|
275
|
-
};
|
|
276
|
-
}),
|
|
277
|
-
], placeholder: "Off", value: layout.PivotGrandTotal, onValueChange: (value) => {
|
|
278
|
-
props.onChange({
|
|
279
|
-
...layout,
|
|
280
|
-
PivotGrandTotal: value,
|
|
281
|
-
});
|
|
282
|
-
} }) })] }), (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: "Pivot Column Total" }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal twa:max-w-[520px]", children: "Set position of pivot column totals" })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: isPivotColumnTotalEnabled === true ? ((0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { className: "twa:w-[180px]", items: [
|
|
283
|
-
{ label: 'Off', value: null },
|
|
284
|
-
...['before', 'after'].map((position) => {
|
|
285
|
-
return {
|
|
286
|
-
label: StringExtensions_1.default.CapitaliseFirstLetter(position),
|
|
287
|
-
value: position,
|
|
288
|
-
};
|
|
289
|
-
}),
|
|
290
|
-
], placeholder: "Off", value: layout.PivotColumnTotal, onValueChange: (value) => {
|
|
291
|
-
props.onChange({
|
|
292
|
-
...layout,
|
|
293
|
-
PivotColumnTotal: value,
|
|
294
|
-
});
|
|
295
|
-
} })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:italic", children: isPivotColumnTotalEnabled })) })] })] })] }));
|
|
282
|
+
const aggregationEntries = layout.PivotAggregationColumns || [];
|
|
283
|
+
const initialExpandedCardId = (0, layoutWizardAccordionHelpers_1.getLayoutWizardInitialExpandedCardId)(props.layoutWizardMode, 'aggregation-columns', (0, layoutWizardAccordionHelpers_1.isPivotAggregationsSectionConfigured)(layout));
|
|
284
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(initialExpandedCardId);
|
|
285
|
+
const handlePivotLayoutTotalChange = (field, key) => {
|
|
286
|
+
props.onChange({
|
|
287
|
+
...layout,
|
|
288
|
+
[field]: key === 'off' ? null : key,
|
|
289
|
+
});
|
|
290
|
+
};
|
|
291
|
+
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('aggregation-columns', { fillAvailable: true }), surface: "panel", "data-name": "aggregation-columns", title: "Aggregation Columns", help: "Select a column and an aggregation function", collapsedHelp: "", compactSummary: (0, CollapsibleWizardCard_1.renderCompactColumnTags)(aggregationEntries.map(({ ColumnId }) => ColumnId), (columnId) => adaptable.api.columnApi.getFriendlyNameForColumnId(columnId), { emptyLabel: 'No columns' }), summary: aggregationEntries.length ? ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: aggregationEntries.map(({ ColumnId, AggFunc }) => ((0, jsx_runtime_1.jsxs)(Tag_1.ColumnTag, { children: [adaptable.api.columnApi.getFriendlyNameForColumnId(ColumnId), " (", (0, AggregationsSection_1.getAggFuncSummaryLabel)(ColumnId, AggFunc, aggregationColumnsMap), ")"] }, ColumnId))) })) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No columns" })), 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: "", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:min-h-0", "data-name": "aggregation-columns-container", children: (0, jsx_runtime_1.jsx)(ValueSelector_1.ValueSelector, { style: { minHeight: 0 }, 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, 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: (column) => ((0, jsx_runtime_1.jsx)(PivotColumnRow, { onChangeAggFunction: handleAggregationChange, layout: layout, column: column, aggregationColumnsMap: aggregationColumnsMap })), options: sortedAggregableColumns, value: aggregationEntries.map((agg) => agg.ColumnId), allowReorder: () => true, onChange: handleColumnsSelectionChange }) }) }) }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('suppress-header'), surface: "panel", "data-name": "omit-aggregation-from-header", title: "Aggregation Column Header", help: "Set behaviour for aggregation function names", collapsedHelp: "Behaviour for aggregation function names", compactSummary: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: layout.SuppressAggFuncInHeader ? 'Hide Function Name' : 'Show Function Name' }), summary: (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: layout.SuppressAggFuncInHeader ? 'Hide Function Name' : 'Show Function Name' }) }), children: (0, jsx_runtime_1.jsxs)(Radio_1.RadioGroup, { orientation: "vertical", value: layout.SuppressAggFuncInHeader ?? false, onRadioChange: handleSuppressAggFuncInHeader, children: [(0, jsx_runtime_1.jsx)(Radio_1.default, { value: false, children: "Show Aggregation function names" }), (0, jsx_runtime_1.jsx)(Radio_1.default, { value: true, children: "Hide Aggregation function names" })] }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('grand-total'), surface: "panel", "data-name": "grand-total-row", title: "Grand Total Row", help: "Set position of the Grand Total Row in the grid", collapsedHelp: "Position of the Grand Total Row in the grid", compactSummary: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, AggregationsSection_1.getGrandTotalRowLabel)(layout) }), summary: (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, AggregationsSection_1.getGrandTotalRowLabel)(layout) }) }), children: (0, jsx_runtime_1.jsx)(Radio_1.RadioGroup, { orientation: "vertical", value: (0, AggregationsSection_1.getGrandTotalRowKey)(layout), onRadioChange: (key) => {
|
|
292
|
+
props.onChange({
|
|
293
|
+
...layout,
|
|
294
|
+
GrandTotalRow: key === 'off' ? null : key,
|
|
295
|
+
});
|
|
296
|
+
}, children: AggregationsSection_1.GRAND_TOTAL_ROW_OPTIONS.map((key) => ((0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: key, text: AggregationsSection_1.GRAND_TOTAL_ROW_LABELS[key], description: AggregationsSection_1.GRAND_TOTAL_ROW_DESCRIPTIONS[key] }, key))) }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('pivot-grand-total'), surface: "panel", "data-name": "pivot-grand-total", title: "Pivot Grand Total", help: "Set position of pivot grand total columns", compactSummary: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: getPivotLayoutTotalLabel(layout.PivotGrandTotal) }), summary: (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: getPivotLayoutTotalLabel(layout.PivotGrandTotal) }) }), children: (0, jsx_runtime_1.jsx)(Radio_1.RadioGroup, { orientation: "vertical", value: getPivotLayoutTotalKey(layout.PivotGrandTotal), onRadioChange: (key) => handlePivotLayoutTotalChange('PivotGrandTotal', key), children: PIVOT_LAYOUT_TOTAL_OPTIONS.map((key) => ((0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: key, text: PIVOT_LAYOUT_TOTAL_LABELS[key], description: PIVOT_LAYOUT_TOTAL_DESCRIPTIONS[key] }, key))) }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('pivot-column-total'), surface: "panel", "data-name": "pivot-column-total", title: "Pivot Column Total", help: "Set position of pivot column totals within each pivot column group", compactSummary: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: isPivotColumnTotalEnabled === true
|
|
297
|
+
? getPivotLayoutTotalLabel(layout.PivotColumnTotal)
|
|
298
|
+
: 'Not available' }), summary: isPivotColumnTotalEnabled === true ? ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: getPivotLayoutTotalLabel(layout.PivotColumnTotal) }) })) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: isPivotColumnTotalEnabled })), children: isPivotColumnTotalEnabled === true ? ((0, jsx_runtime_1.jsx)(Radio_1.RadioGroup, { orientation: "vertical", value: getPivotLayoutTotalKey(layout.PivotColumnTotal), onRadioChange: (key) => handlePivotLayoutTotalChange('PivotColumnTotal', key), children: PIVOT_LAYOUT_TOTAL_OPTIONS.map((key) => ((0, jsx_runtime_1.jsx)(TypeRadio_1.TypeRadio, { value: key, text: PIVOT_LAYOUT_TOTAL_LABELS[key], description: PIVOT_LAYOUT_TOTAL_DESCRIPTIONS[key] }, key))) })) : ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:italic", children: isPivotColumnTotalEnabled })) })] }));
|
|
296
299
|
};
|
|
297
300
|
exports.PivotAggregationsSection = PivotAggregationsSection;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PivotLayout } from '../../../../types';
|
|
3
|
-
export declare const PivotColumnsSectionSummary: React.FunctionComponent
|
|
2
|
+
import { Layout, PivotLayout } from '../../../../types';
|
|
3
|
+
export declare const PivotColumnsSectionSummary: React.FunctionComponent<{
|
|
4
|
+
layout?: Layout;
|
|
5
|
+
}>;
|
|
4
6
|
interface PivotColumnsSectionProps {
|
|
5
7
|
onChange: (data: PivotLayout) => void;
|
|
8
|
+
layoutWizardMode?: 'create' | 'edit';
|
|
6
9
|
}
|
|
7
10
|
export declare const PivotColumnsSection: React.FunctionComponent<PivotColumnsSectionProps>;
|
|
8
11
|
export {};
|
|
@@ -8,16 +8,24 @@ const Tag_1 = require("../../../../components/Tag");
|
|
|
8
8
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
9
9
|
const ValueSelector_1 = require("../../../Components/ValueSelector");
|
|
10
10
|
const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard");
|
|
11
|
+
const layoutWizardAccordionHelpers_1 = require("./layoutWizardAccordionHelpers");
|
|
11
12
|
const Utilities_1 = require("./Utilities");
|
|
13
|
+
const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
12
14
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
13
15
|
const Flex_1 = require("../../../../components/Flex");
|
|
14
16
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
15
|
-
const HelpBlock_1 = tslib_1.__importDefault(require("../../../../components/HelpBlock"));
|
|
16
17
|
const Card_1 = require("../../../../components/Card");
|
|
17
|
-
const
|
|
18
|
+
const CollapsibleWizardCard_1 = require("../../../Wizard/CollapsibleWizardCard");
|
|
19
|
+
const layoutWizardColumns_1 = require("./layoutWizardColumns");
|
|
20
|
+
const SortSection_1 = require("./SortSection");
|
|
21
|
+
const columnsSummaryHelpers_1 = require("../../../../Strategy/Utilities/Layout/columnsSummaryHelpers");
|
|
22
|
+
const SummaryColorTag_1 = require("../../../Wizard/SummaryColorTag");
|
|
23
|
+
const PivotColumnsSectionSummary = (props) => {
|
|
18
24
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
19
|
-
const { data:
|
|
20
|
-
|
|
25
|
+
const { data: contextLayout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
26
|
+
const layout = props.layout ?? contextLayout;
|
|
27
|
+
const sortValues = (0, columnsSummaryHelpers_1.getTableColumnsSortingSummaryValues)(layout, adaptable.api);
|
|
28
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3", children: [(0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:font-medium twa:mb-1", children: "Pivot Columns" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "row", flexWrap: "wrap", className: "twa:gap-1", children: layout.PivotColumns?.length ? (layout.PivotColumns.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 Pivot Columns Defined" })) })] }), sortValues.length ? ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:font-medium twa:mb-1", children: "Sorting" }), (0, SummaryColorTag_1.renderSummaryStringTags)(sortValues)] })) : null] }));
|
|
21
29
|
};
|
|
22
30
|
exports.PivotColumnsSectionSummary = PivotColumnsSectionSummary;
|
|
23
31
|
const PivotColumnsSection = (props) => {
|
|
@@ -33,11 +41,15 @@ const PivotColumnsSection = (props) => {
|
|
|
33
41
|
PivotColumns: columnIds,
|
|
34
42
|
});
|
|
35
43
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
44
|
+
const persistPivotResultOrder = !!layout.PivotResultColumnsOrder;
|
|
45
|
+
const layoutSupportedFeatures = adaptable.api.layoutApi.internalApi.getLayoutSupportedFeatures();
|
|
46
|
+
const initialExpandedCardId = (0, layoutWizardAccordionHelpers_1.getLayoutWizardInitialExpandedCardId)(props.layoutWizardMode, 'pivot-columns', (0, layoutWizardAccordionHelpers_1.isPivotColumnsSectionConfigured)(layout));
|
|
47
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(initialExpandedCardId);
|
|
48
|
+
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('pivot-columns', { fillAvailable: true }), surface: "panel", "data-name": "pivot-columns", title: "Pivot Columns", help: "Select and order the columns used as pivot columns", collapsedHelp: "", compactSummary: (0, CollapsibleWizardCard_1.renderCompactColumnTags)(layout.PivotColumns ?? [], (columnId) => adaptable.api.columnApi.getFriendlyNameForColumnId(columnId), { emptyLabel: 'No columns' }), summary: layout.PivotColumns?.length ? ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: layout.PivotColumns.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" })), 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.jsx)(Card_1.Card, { shadow: false, className: "twa:h-full", children: (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { 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": "pivot-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, 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: sortedPivotColumns, value: layout.PivotColumns ?? [], allowReorder: true, onChange: handleColumnsChange }) }) }) }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('pivot-result-columns'), surface: "panel", "data-name": "pivot-result-columns", title: "Pivot Result Columns", help: "Configure how dynamically created pivot result columns are stored in the Layout", collapsedHelp: "How dynamically created pivot result columns are stored in the Layout", compactSummary: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: persistPivotResultOrder ? 'Persist order' : 'Do not persist order' }), summary: (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: persistPivotResultOrder ? 'Persist order' : 'Do not persist order' }) }), children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: persistPivotResultOrder, onChange: (checked) => {
|
|
49
|
+
props.onChange({
|
|
50
|
+
...layout,
|
|
51
|
+
PivotResultColumnsOrder: checked,
|
|
52
|
+
});
|
|
53
|
+
}, children: "Persist order of pivot result columns" }) }), layoutSupportedFeatures.ColumnSorts ? ((0, jsx_runtime_1.jsx)(SortSection_1.ColumnSortingWizardCard, { layout: layout, onChange: props.onChange, bindCard: bindCard, title: "Column Sorting", cardId: "column-sorting", "data-name": "pivot-column-sorting" })) : null] }));
|
|
42
54
|
};
|
|
43
55
|
exports.PivotColumnsSection = PivotColumnsSection;
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PivotLayout } from '../../../../../types';
|
|
3
|
-
export declare const PivotRowGroupingSectionSummary: React.FunctionComponent
|
|
3
|
+
export declare const PivotRowGroupingSectionSummary: React.FunctionComponent<{
|
|
4
|
+
layout?: PivotLayout;
|
|
5
|
+
}>;
|
|
4
6
|
interface PivotRowGroupingSectionProps {
|
|
5
7
|
onChange: (data: PivotLayout) => void;
|
|
8
|
+
layoutWizardMode?: 'create' | 'edit';
|
|
6
9
|
}
|
|
7
10
|
export declare const PivotRowGroupingSection: React.FunctionComponent<PivotRowGroupingSectionProps>;
|
|
8
11
|
export {};
|
|
@@ -4,6 +4,7 @@ exports.PivotRowGroupingSection = exports.PivotRowGroupingSectionSummary = void
|
|
|
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 Tag_1 = require("../../../../components/Tag");
|
|
@@ -13,14 +14,16 @@ const OnePageAdaptableWizard_1 = require("../../../Wizard/OnePageAdaptableWizard
|
|
|
13
14
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
14
15
|
const LayoutHelpers_1 = require("../../../../Api/Implementation/LayoutHelpers");
|
|
15
16
|
const RowGroupingSection_1 = require("./RowGroupingSection");
|
|
17
|
+
const rowGroupSummaryTags_1 = require("../../../Wizard/rowGroupSummaryTags");
|
|
16
18
|
const Flex_1 = require("../../../../components/Flex");
|
|
17
19
|
const Card_1 = require("../../../../components/Card");
|
|
18
|
-
const
|
|
20
|
+
const CollapsibleWizardCard_1 = require("../../../Wizard/CollapsibleWizardCard");
|
|
21
|
+
const layoutWizardColumns_1 = require("./layoutWizardColumns");
|
|
22
|
+
const PivotRowGroupingSectionSummary = (props) => {
|
|
19
23
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
20
|
-
const { data:
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
})) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Pivot Row Grouping" })) }));
|
|
24
|
+
const { data: contextLayout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
25
|
+
const layout = props.layout ?? contextLayout;
|
|
26
|
+
return (0, jsx_runtime_1.jsx)(rowGroupSummaryTags_1.PivotRowGroupSummaryTags, { layout: layout, api: adaptable.api });
|
|
24
27
|
};
|
|
25
28
|
exports.PivotRowGroupingSectionSummary = PivotRowGroupingSectionSummary;
|
|
26
29
|
const PivotRowGroupingSection = (props) => {
|
|
@@ -30,16 +33,24 @@ const PivotRowGroupingSection = (props) => {
|
|
|
30
33
|
const sortedGroupableColumns = React.useMemo(() => {
|
|
31
34
|
return ArrayExtensions_1.default.sortArrayWithOrder(allGroupableColumns.map((col) => col.columnId), layout.PivotGroupedColumns ?? [], { sortUnorderedItems: false }).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
32
35
|
}, [layout, allGroupableColumns]);
|
|
33
|
-
const onChange = (
|
|
34
|
-
props.onChange((0, LayoutHelpers_1.normalizeLayout)(
|
|
36
|
+
const onChange = (nextLayout) => {
|
|
37
|
+
props.onChange((0, LayoutHelpers_1.normalizeLayout)(nextLayout));
|
|
35
38
|
};
|
|
36
39
|
const handleColumnsChange = (columnIds) => {
|
|
37
|
-
|
|
40
|
+
const newLayout = {
|
|
38
41
|
...layout,
|
|
39
42
|
PivotGroupedColumns: columnIds,
|
|
40
|
-
}
|
|
43
|
+
};
|
|
44
|
+
if (!newLayout.RowGroupValues) {
|
|
45
|
+
newLayout.RowGroupValues = {
|
|
46
|
+
RowGroupDefaultBehavior: 'always-collapsed',
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
onChange(newLayout);
|
|
41
50
|
};
|
|
42
51
|
const rowGroupsText = 'Grouped Rows ' + adaptable.api.internalApi.getCorrectEnglishVariant('Behaviour');
|
|
43
|
-
|
|
52
|
+
const initialExpandedCardId = (0, layoutWizardAccordionHelpers_1.getLayoutWizardInitialExpandedCardId)(props.layoutWizardMode, 'columns', (0, layoutWizardAccordionHelpers_1.isPivotRowGroupingSectionConfigured)(layout));
|
|
53
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(initialExpandedCardId);
|
|
54
|
+
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": "pivot-row-grouped-columns", title: "Row Grouped Columns", help: "Select and order Columns used in Row Grouping", collapsedHelp: "", compactSummary: (0, CollapsibleWizardCard_1.renderCompactColumnTags)(layout.PivotGroupedColumns ?? [], (columnId) => adaptable.api.columnApi.getFriendlyNameForColumnId(columnId), { emptyLabel: 'No columns' }), summary: layout.PivotGroupedColumns?.length ? ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: layout.PivotGroupedColumns.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" })), 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": "pivot-row-grouped-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, 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.PivotGroupedColumns ?? [], allowReorder: true, onChange: handleColumnsChange }) }) }) }) }), (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...bindCard('behavior'), surface: "panel", "data-name": "pivot-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, RowGroupingSection_1.getRowGroupBehaviorLabel)(layout) }), summary: (0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardValueSummary, { value: (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, RowGroupingSection_1.getRowGroupBehaviorLabel)(layout) }) }), children: (0, jsx_runtime_1.jsx)(RowGroupingSection_1.RowGroupBehaviorSection, { layout: layout, onChange: onChange }) })] }));
|
|
44
55
|
};
|
|
45
56
|
exports.PivotRowGroupingSection = PivotRowGroupingSection;
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Layout } from '../../../../../types';
|
|
3
|
-
export
|
|
3
|
+
export { getRowGroupBehaviorDescription, getRowGroupBehaviorLabel, getRowGroupDisplayTypeDescription, getRowGroupDisplayTypeLabel, } from '../../../../Strategy/Utilities/Layout/rowGroupSummaryHelpers';
|
|
4
|
+
export declare const RowGroupingSectionSummary: React.FunctionComponent<{
|
|
5
|
+
layout?: Layout;
|
|
6
|
+
}>;
|
|
4
7
|
interface RowGroupingSectionProps {
|
|
5
8
|
onChange: (data: Layout) => void;
|
|
9
|
+
layoutWizardMode?: 'create' | 'edit';
|
|
6
10
|
}
|
|
7
11
|
export declare const RowGroupBehaviorSection: (props: {
|
|
8
12
|
layout: Layout;
|
|
9
13
|
onChange: (data: Layout) => void;
|
|
10
14
|
}) => React.JSX.Element;
|
|
11
15
|
export declare const RowGroupingSection: React.FunctionComponent<RowGroupingSectionProps>;
|
|
12
|
-
export {};
|