@adaptabletools/adaptable-cjs 23.0.0-canary.6 → 23.0.0-canary.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/icons/sort-asc.svg +1 -1
- package/index.css +828 -263
- package/package.json +1 -1
- package/src/AdaptableOptions/DataSetOptions.d.ts +26 -2
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +0 -1
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +42 -10
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +7 -0
- package/src/AdaptableState/Common/AdaptableMessageType.d.ts +1 -1
- package/src/AdaptableState/Common/Enums.d.ts +1 -1
- package/src/AdaptableState/Common/Enums.js +1 -1
- package/src/AdaptableState/StyledColumnState.d.ts +8 -850
- package/src/AdaptableState/StyledColumnState.js +0 -10
- package/src/AdaptableState/StyledColumns/BadgeStyle.d.ts +143 -0
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +12 -0
- package/src/AdaptableState/StyledColumns/BulletChartStyle.d.ts +147 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.d.ts +60 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartCellText.js +7 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.d.ts +24 -0
- package/src/AdaptableState/StyledColumns/Common/BarChartMarker.js +6 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.d.ts +13 -0
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +7 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.d.ts +79 -0
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +10 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +48 -0
- package/src/AdaptableState/StyledColumns/GradientStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/IconStyle.d.ts +158 -0
- package/src/AdaptableState/StyledColumns/IconStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.d.ts +32 -0
- package/src/AdaptableState/StyledColumns/PercentBarStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.d.ts +155 -0
- package/src/AdaptableState/StyledColumns/RangeBarStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.d.ts +111 -0
- package/src/AdaptableState/StyledColumns/RatingStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.d.ts +21 -0
- package/src/AdaptableState/StyledColumns/SparklineStyle.js +2 -0
- package/src/Api/ColumnScopeApi.d.ts +1 -1
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/DataSetInternalApi.d.ts +3 -0
- package/src/Api/Internal/DataSetInternalApi.js +73 -13
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
- package/src/Redux/Store/AdaptableStore.js +6 -4
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/ColumnFilterModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +6 -2
- package/src/Strategy/FormatColumnModule.js +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/IconStylePresets.d.ts +1 -1
- package/src/Utilities/Helpers/ScheduleHelper.js +2 -0
- package/src/Utilities/Helpers/StyleHelper.d.ts +18 -0
- package/src/Utilities/Helpers/StyleHelper.js +30 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.d.ts +3 -1
- package/src/Utilities/Helpers/StyledColumnGradientHelper.js +6 -4
- package/src/Utilities/Helpers/barChartCellText.d.ts +63 -0
- package/src/Utilities/Helpers/barChartCellText.js +333 -0
- package/src/Utilities/Helpers/percentBarPreviewHelper.d.ts +2 -1
- package/src/Utilities/Helpers/percentBarPreviewHelper.js +3 -8
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +3 -0
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +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 +159 -125
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +1 -2
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -5
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +30 -7
- package/src/View/Alert/Wizard/AlertWizard.js +12 -4
- 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 +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +7 -6
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +6 -0
- package/src/View/Components/AdaptableObjectRow/index.js +2 -2
- package/src/View/Components/Buttons/ButtonBase/index.js +2 -3
- package/src/View/Components/Buttons/ButtonNew.d.ts +2 -0
- package/src/View/Components/Buttons/ButtonNew.js +1 -1
- package/src/View/Components/Buttons/EntityListActionButtons.js +3 -3
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +9 -9
- package/src/View/Components/ColumnFilter/ColumnFilter.js +15 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +2 -2
- package/src/View/Components/ColumnSelector/index.d.ts +12 -0
- package/src/View/Components/ColumnSelector/index.js +30 -6
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +2 -2
- package/src/View/Components/ModuleValueSelector/index.js +2 -1
- package/src/View/Components/NewScopeComponent.js +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 +3 -3
- 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 +4 -5
- 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/ExportSchedulesTab.js +3 -4
- package/src/View/Export/ExportViewPanel.js +2 -2
- package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +2 -1
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +2 -7
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +2 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +2 -5
- package/src/View/Filter/FilterViewPanel.js +1 -1
- 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 +130 -104
- 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 +3 -1
- 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 +143 -119
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
- 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 +76 -70
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +83 -38
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +172 -75
- 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/Components/BarChartCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextLayoutEditor.js +40 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarChartCellTextPreview.js +62 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BulletRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/RangeBarRangesSummaryPreview.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +13 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +5 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +13 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +11 -17
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.d.ts +2 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +26 -57
- 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/AgGridAdapter.js +0 -5
- package/src/agGrid/AgGridColumnAdapter.js +3 -2
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +4 -7
- package/src/agGrid/cellRenderers/BadgeRenderer.js +7 -5
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +43 -42
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +13 -11
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +24 -96
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +49 -46
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -1
- package/src/components/Card/index.js +5 -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.d.ts +80 -14
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/VersionUpgrade23.d.ts +27 -31
- package/src/migration/VersionUpgrade23.js +110 -29
- package/src/types.d.ts +13 -2
- package/tsconfig.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/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
- /package/src/{components/DropdownButton/DropdownButtonItem.js → AdaptableState/StyledColumns/BulletChartStyle.js} +0 -0
|
@@ -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;
|
|
@@ -6,8 +6,8 @@ const jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const CheckBox_1 = require("../../../../components/CheckBox");
|
|
8
8
|
const FormLayout_1 = tslib_1.__importStar(require("../../../../components/FormLayout"));
|
|
9
|
-
const Panel_1 = tslib_1.__importDefault(require("../../../../components/Panel"));
|
|
10
9
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../../components/SimpleButton"));
|
|
10
|
+
const ButtonNew_1 = require("../../../Components/Buttons/ButtonNew");
|
|
11
11
|
const Card_1 = require("../../../../components/Card");
|
|
12
12
|
const Tag_1 = require("../../../../components/Tag");
|
|
13
13
|
const RowSummary_1 = require("../../../../AdaptableState/Common/RowSummary");
|
|
@@ -23,6 +23,9 @@ const ColumnGroupTag_1 = require("../../../Components/ColumnGroupTag");
|
|
|
23
23
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../../../Utilities/Extensions/ArrayExtensions"));
|
|
24
24
|
const Flex_1 = require("../../../../components/Flex");
|
|
25
25
|
const NewSelect_1 = require("../../../../components/NewSelect");
|
|
26
|
+
const CollapsibleWizardCard_1 = require("../../../Wizard/CollapsibleWizardCard");
|
|
27
|
+
const utils_1 = require("../../../../lib/utils");
|
|
28
|
+
const objectListActionButtonStyles_1 = require("../../../Components/AdaptableObjectList/objectListActionButtonStyles");
|
|
26
29
|
const areSummaryRowsValid = (layout) => {
|
|
27
30
|
if (!layout.RowSummaries)
|
|
28
31
|
return true;
|
|
@@ -38,6 +41,7 @@ const areSummaryRowsValid = (layout) => {
|
|
|
38
41
|
return valid;
|
|
39
42
|
};
|
|
40
43
|
exports.areSummaryRowsValid = areSummaryRowsValid;
|
|
44
|
+
const rowSummaryCardId = (index) => `row-summary-${index}`;
|
|
41
45
|
const availableExpressionsForColumnTypeCache = new Map();
|
|
42
46
|
const getAvailableExpressionsForColumnType = (columnType, availableScalarExpressions) => {
|
|
43
47
|
const key = columnType;
|
|
@@ -84,9 +88,7 @@ const buildRowSummaryExpressionOptions = (column, availableScalarExpressions, la
|
|
|
84
88
|
value: expression,
|
|
85
89
|
}));
|
|
86
90
|
const aggregation = layout.TableAggregationColumns?.find((agg) => agg.ColumnId === column.columnId)?.AggFunc;
|
|
87
|
-
if (aggregation &&
|
|
88
|
-
typeof aggregation === 'object' &&
|
|
89
|
-
aggregation.weightedColumnId) {
|
|
91
|
+
if (aggregation && typeof aggregation === 'object' && aggregation.weightedColumnId) {
|
|
90
92
|
expressionOptions.push({
|
|
91
93
|
label: 'WEIGHTERD_AVG',
|
|
92
94
|
value: RowSummary_1.WEIGHTED_AVERAGE_AGGREGATED_FUNCTION,
|
|
@@ -105,19 +107,28 @@ const getDefaultRowSummaryExpression = (column, availableScalarExpressions, layo
|
|
|
105
107
|
}
|
|
106
108
|
return optionValues[0] ?? null;
|
|
107
109
|
};
|
|
110
|
+
const RowSummaryPositionTag = ({ position }) => (0, jsx_runtime_1.jsx)(Tag_1.Tag, { className: "twa:shrink-0", children: position });
|
|
111
|
+
const RowSummaryCardSummary = ({ rowSummary }) => {
|
|
112
|
+
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
113
|
+
const columnIds = Object.keys(rowSummary.ColumnsMap ?? {}).filter((colId) => colId !== 'Source' && colId !== 'Uuid');
|
|
114
|
+
if (!columnIds.length) {
|
|
115
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No columns" });
|
|
116
|
+
}
|
|
117
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: columnIds.map((colId) => ((0, jsx_runtime_1.jsxs)(Tag_1.ColumnTag, { children: [rowSummary.ColumnsMap[colId], "(", adaptable.api.columnApi.getFriendlyNameForColumnId(colId), ")"] }, colId))) }));
|
|
118
|
+
};
|
|
108
119
|
const RowSummarySectionSummary = () => {
|
|
109
120
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
110
121
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
111
122
|
return ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:flex twa:flex-col", children: layout.RowSummaries?.length ? (layout.RowSummaries.map((rowSummary, index) => {
|
|
112
|
-
return ((0, jsx_runtime_1.
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
123
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:mr-1 twa:mb-1", children: [rowSummary.Position, ":", ' ', Object.keys(rowSummary.ColumnsMap).map((colId) => {
|
|
124
|
+
if (colId === 'Source' || colId === 'Uuid')
|
|
125
|
+
return null;
|
|
126
|
+
return ((0, jsx_runtime_1.jsxs)(Tag_1.ColumnTag, { className: "twa:mr-1", children: [rowSummary.ColumnsMap[colId], "(", adaptable.api.columnApi.getFriendlyNameForColumnId(colId), ")"] }, colId));
|
|
127
|
+
})] }, index));
|
|
117
128
|
})) : ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Row Summaries" })) }));
|
|
118
129
|
};
|
|
119
130
|
exports.RowSummarySectionSummary = RowSummarySectionSummary;
|
|
120
|
-
const
|
|
131
|
+
const RowSummaryEditorForm = React.memo(({ rowSummary, onChange, availableScalarExpressions, }) => {
|
|
121
132
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
122
133
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
123
134
|
const columns = React.useMemo(() => {
|
|
@@ -133,109 +144,124 @@ const RowSummaryEditor = React.memo(({ rowSummary, onChange, availableScalarExpr
|
|
|
133
144
|
sortUnorderedItems: false,
|
|
134
145
|
}).map((colId) => adaptable.api.columnApi.getColumnWithColumnId(colId));
|
|
135
146
|
}, [rowSummary.ColumnsMap]);
|
|
136
|
-
return ((0, jsx_runtime_1.
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
}
|
|
191
|
-
const column = adaptable.api.columnApi.getColumnWithColumnId(colId);
|
|
192
|
-
newColumnsMap[colId] = column
|
|
193
|
-
? getDefaultRowSummaryExpression(column, availableScalarExpressions, layout)
|
|
194
|
-
: null;
|
|
195
|
-
});
|
|
196
|
-
onChange({
|
|
197
|
-
...rowSummary,
|
|
198
|
-
ColumnsMap: newColumnsMap,
|
|
199
|
-
});
|
|
200
|
-
} }) })] })] })] }) }));
|
|
147
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: "twa:flex twa:flex-col twa:gap-3 twa:h-full twa:min-h-0 twa:overflow-hidden", children: [(0, jsx_runtime_1.jsxs)(FormLayout_1.default, { children: [(0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "Position", children: (0, jsx_runtime_1.jsx)(NewSelect_1.SingleSelect, { items: [
|
|
148
|
+
{
|
|
149
|
+
label: 'Top',
|
|
150
|
+
value: 'Top',
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: 'Bottom',
|
|
154
|
+
value: 'Bottom',
|
|
155
|
+
},
|
|
156
|
+
], value: rowSummary.Position, onValueChange: (position) => {
|
|
157
|
+
onChange({
|
|
158
|
+
...rowSummary,
|
|
159
|
+
Position: position,
|
|
160
|
+
});
|
|
161
|
+
} }) }), (0, jsx_runtime_1.jsx)(FormLayout_1.FormRow, { label: "", children: (0, jsx_runtime_1.jsx)(CheckBox_1.CheckBox, { checked: rowSummary.IncludeOnlyFilteredRows ?? true, onChange: (IncludeOnlyFilteredRows) => {
|
|
162
|
+
onChange({
|
|
163
|
+
...rowSummary,
|
|
164
|
+
IncludeOnlyFilteredRows,
|
|
165
|
+
});
|
|
166
|
+
}, children: "Include Only Filtered Rows" }) })] }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, className: "twa:flex-1 twa:min-h-0 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) => {
|
|
167
|
+
const label = column.friendlyName ?? column.columnId;
|
|
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
|
+
}
|
|
172
|
+
const expressionOptions = buildRowSummaryExpressionOptions(column, availableScalarExpressions, layout);
|
|
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, { value: expression, items: expressionOptions, onValueChange: (expression) => {
|
|
175
|
+
onChange({
|
|
176
|
+
...rowSummary,
|
|
177
|
+
ColumnsMap: {
|
|
178
|
+
...rowSummary.ColumnsMap,
|
|
179
|
+
[column.columnId]: expression,
|
|
180
|
+
},
|
|
181
|
+
});
|
|
182
|
+
} })] }));
|
|
183
|
+
}, value: Object.keys(rowSummary.ColumnsMap), onChange: (colIds) => {
|
|
184
|
+
const newColumnsMap = {};
|
|
185
|
+
colIds.forEach((colId) => {
|
|
186
|
+
const existing = rowSummary.ColumnsMap[colId];
|
|
187
|
+
if (existing) {
|
|
188
|
+
newColumnsMap[colId] = existing;
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
const column = adaptable.api.columnApi.getColumnWithColumnId(colId);
|
|
192
|
+
newColumnsMap[colId] = column
|
|
193
|
+
? getDefaultRowSummaryExpression(column, availableScalarExpressions, layout)
|
|
194
|
+
: null;
|
|
195
|
+
});
|
|
196
|
+
onChange({
|
|
197
|
+
...rowSummary,
|
|
198
|
+
ColumnsMap: newColumnsMap,
|
|
199
|
+
});
|
|
200
|
+
} }) })] })] }));
|
|
201
201
|
});
|
|
202
202
|
const RowSummarySection = (props) => {
|
|
203
203
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
204
204
|
const { data: layout } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
205
|
+
const rowSummaries = layout.RowSummaries ?? [];
|
|
205
206
|
const availableScalarExpressions = React.useMemo(() => {
|
|
206
207
|
const sytemExpressions = adaptable.api.internalApi
|
|
207
208
|
.getQueryLanguageService()
|
|
208
209
|
.getModuleExpressionFunctionsMap(ModuleConstants_1.LayoutModuleId).aggregatedScalarFunctions;
|
|
209
210
|
return sytemExpressions;
|
|
210
211
|
}, []);
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
212
|
+
const { bindCard, hasExpandedCard, expandedFillsSpace, expandedId, setExpandedId } = (0, CollapsibleWizardCard_1.useWizardCardAccordion)(null);
|
|
213
|
+
const handleAddRowSummary = () => {
|
|
214
|
+
const newIndex = rowSummaries.length;
|
|
215
|
+
props.onChange({
|
|
216
|
+
...layout,
|
|
217
|
+
RowSummaries: [
|
|
218
|
+
...rowSummaries,
|
|
219
|
+
{
|
|
220
|
+
Position: 'Top',
|
|
221
|
+
ColumnsMap: {},
|
|
222
|
+
IncludeOnlyFilteredRows: true,
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
});
|
|
226
|
+
setExpandedId(rowSummaryCardId(newIndex));
|
|
227
|
+
};
|
|
228
|
+
const handleDeleteRowSummary = (index) => {
|
|
229
|
+
const cardId = rowSummaryCardId(index);
|
|
230
|
+
const newSummaries = [...rowSummaries];
|
|
231
|
+
newSummaries.splice(index, 1);
|
|
232
|
+
props.onChange({
|
|
233
|
+
...layout,
|
|
234
|
+
RowSummaries: newSummaries,
|
|
235
|
+
});
|
|
236
|
+
if (expandedId === cardId) {
|
|
237
|
+
setExpandedId(null);
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
if (expandedId?.startsWith('row-summary-')) {
|
|
241
|
+
const expandedIndex = Number(expandedId.replace('row-summary-', ''));
|
|
242
|
+
if (!Number.isNaN(expandedIndex) && expandedIndex > index) {
|
|
243
|
+
setExpandedId(rowSummaryCardId(expandedIndex - 1));
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
};
|
|
247
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { className: (0, utils_1.cn)((0, CollapsibleWizardCard_1.getWizardAccordionSectionClassName)(hasExpandedCard, expandedFillsSpace), 'twa:p-3'), children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:opacity-70 twa:mb-2 twa:max-w-[520px] twa:shrink-0", children: "Add summary rows at the top or bottom of the grid with aggregated column values" }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { className: "twa:justify-end twa:mb-2 twa:shrink-0", children: (0, jsx_runtime_1.jsx)(ButtonNew_1.ButtonNew, { onClick: handleAddRowSummary, children: "Add Row Summary" }) }), (0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexDirection: "column", className: "twa:gap-3 twa:min-h-0", children: rowSummaries.map((rowSummary, index) => {
|
|
248
|
+
const cardBinding = bindCard(rowSummaryCardId(index), { fillAvailable: true });
|
|
249
|
+
return ((0, jsx_runtime_1.jsx)(CollapsibleWizardCard_1.CollapsibleWizardCard, { ...cardBinding, surface: "panel", "data-name": `row-summary-${index}`, title: `Row Summary ${index + 1}`, help: "Configure position, filters, and column aggregations for this summary row", collapsedHelp: false, compactSummary: (0, jsx_runtime_1.jsx)(RowSummaryPositionTag, { position: rowSummary.Position }), headerVisual: !cardBinding.expanded ? ((0, jsx_runtime_1.jsx)(RowSummaryPositionTag, { position: rowSummary.Position })) : undefined, headerActions: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [cardBinding.expanded ? ((0, jsx_runtime_1.jsx)(SuspendToggleButton_1.SuspendToggleButton, { iconSize: 26, className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('suspend'), onSuspend: () => {
|
|
250
|
+
const newSummaries = [...rowSummaries];
|
|
251
|
+
newSummaries[index] = { ...rowSummary, IsSuspended: true };
|
|
252
|
+
props.onChange({ ...layout, RowSummaries: newSummaries });
|
|
253
|
+
}, onUnSuspend: () => {
|
|
254
|
+
const newSummaries = [...rowSummaries];
|
|
255
|
+
newSummaries[index] = { ...rowSummary, IsSuspended: false };
|
|
256
|
+
props.onChange({ ...layout, RowSummaries: newSummaries });
|
|
257
|
+
}, suspendableObject: rowSummary })) : null, (0, jsx_runtime_1.jsx)(SimpleButton_1.default, { icon: "delete", variant: "text", tooltip: "Delete row summary", className: (0, objectListActionButtonStyles_1.objectListActionButtonClassName)('delete'), onClick: () => handleDeleteRowSummary(index) })] }), summary: (0, jsx_runtime_1.jsx)(RowSummaryCardSummary, { rowSummary: rowSummary }), 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", children: (0, jsx_runtime_1.jsx)(RowSummaryEditorForm, { rowSummary: rowSummary, availableScalarExpressions: availableScalarExpressions, onChange: (nextRowSummary) => {
|
|
258
|
+
const newSummaries = [...rowSummaries];
|
|
259
|
+
newSummaries[index] = nextRowSummary;
|
|
260
|
+
props.onChange({
|
|
261
|
+
...layout,
|
|
262
|
+
RowSummaries: newSummaries,
|
|
263
|
+
});
|
|
264
|
+
} }) }, rowSummaryCardId(index)));
|
|
265
|
+
}) })] }));
|
|
240
266
|
};
|
|
241
267
|
exports.RowSummarySection = RowSummarySection;
|
|
@@ -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 {};
|