@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
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WizardTypeSelectionPreviewFrame = exports.WizardNameFieldSection = exports.WizardTypeSelectionSection = exports.WizardTypeSelectionCard = exports.getWizardTypeSelectionGridColumns = exports.WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
const Input_1 = tslib_1.__importDefault(require("../../components/Input"));
|
|
7
|
+
const Flex_1 = require("../../components/Flex");
|
|
8
|
+
const Card_1 = require("../../components/Card");
|
|
9
|
+
const utils_1 = require("../../lib/utils");
|
|
10
|
+
exports.WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS = 'twa:flex twa:w-full twa:min-h-[32px] twa:items-center twa:justify-center twa:overflow-hidden twa:rounded-standard twa:border twa:border-[color-mix(in_srgb,var(--ab-color-foreground)_15%,transparent)] twa:bg-[color-mix(in_srgb,var(--ab-color-primary)_35%,transparent)] twa:px-2 twa:py-1';
|
|
11
|
+
const getWizardTypeSelectionGridColumns = (choiceCount) => choiceCount === 4 ? 2 : 3;
|
|
12
|
+
exports.getWizardTypeSelectionGridColumns = getWizardTypeSelectionGridColumns;
|
|
13
|
+
const WizardTypeSelectionCard = ({ label, description, selected, disabled, disabledTooltip, dataName, minHeightClassName = 'twa:min-h-[108px]', onSelect, children, footer, }) => {
|
|
14
|
+
const handleActivate = () => {
|
|
15
|
+
if (!disabled) {
|
|
16
|
+
onSelect();
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { role: "radio", tabIndex: disabled ? -1 : 0, "aria-checked": selected, "aria-disabled": disabled, "data-name": dataName, className: (0, utils_1.cn)('ab-WizardTypeSelectionCard group twa:relative twa:h-full twa:rounded-standard twa:border twa:border-primarydark/32 twa:bg-card twa:text-card-foreground twa:outline-none twa:transition-colors twa:focus-visible:ring-2 twa:focus-visible:ring-accent', minHeightClassName, disabled
|
|
20
|
+
? 'twa:cursor-not-allowed twa:opacity-60'
|
|
21
|
+
: 'twa:cursor-pointer hover:twa:border-accent/55 hover:twa:bg-accent/5', selected &&
|
|
22
|
+
'twa:after:pointer-events-none twa:after:absolute twa:after:inset-0 twa:after:rounded-standard twa:after:border-2 twa:after:border-[var(--ab-cmp-wizard-type-selection-card__selected-border)] twa:after:bg-[var(--ab-cmp-wizard-type-selection-card__selected-overlay)]'), onClick: handleActivate, onKeyDown: (event) => {
|
|
23
|
+
if (disabled) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
if (event.key === 'Enter' || event.key === ' ') {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
onSelect();
|
|
29
|
+
}
|
|
30
|
+
}, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { "aria-hidden": true, className: (0, utils_1.cn)('twa:pointer-events-none twa:absolute twa:top-2.5 twa:right-2.5 twa:z-10 twa:size-4 twa:rounded-full twa:border-2 twa:transition-colors', selected
|
|
31
|
+
? 'twa:border-[var(--ab-cmp-wizard-type-selection-card__selected-border)] twa:bg-[var(--ab-cmp-wizard-type-selection-card__selected-border)]'
|
|
32
|
+
: 'twa:border-primarydark/35 twa:bg-base group-hover:twa:border-accent/55'), children: selected ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:absolute twa:inset-0 twa:m-auto twa:size-1.5 twa:rounded-full twa:bg-[var(--ab-cmp-wizard-type-selection-card__selected-indicator-inner)]" })) : null }), (0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, style: { backgroundColor: 'transparent' }, className: "twa:flex twa:h-full twa:flex-col twa:justify-between twa:p-3 twa:pr-7", gap: 0, children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: label }), children, description || disabledTooltip ? ((0, jsx_runtime_1.jsxs)(Flex_1.Box, { children: [description ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:text-xs twa:leading-snug twa:opacity-70", children: description })) : null, disabled && disabledTooltip ? ((0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mt-1 twa:text-1 twa:leading-snug twa:italic twa:opacity-80", children: disabledTooltip })) : null] })) : null, footer] })] }));
|
|
33
|
+
};
|
|
34
|
+
exports.WizardTypeSelectionCard = WizardTypeSelectionCard;
|
|
35
|
+
const WizardTypeSelectionSection = ({ headingId, title, intro, columns, dataName, className, children }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, gap: 1, className: (0, utils_1.cn)('twa:flex-1 twa:min-h-0', className), children: [(0, jsx_runtime_1.jsxs)(Card_1.Card.Title, { gap: 1, border: false, className: "twa:flex-col twa:items-start twa:px-1 twa:pb-1", children: [(0, jsx_runtime_1.jsx)(Flex_1.Box, { id: headingId, className: "twa:font-medium", children: title }), (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:mt-1.5 twa:text-xs twa:font-normal twa:opacity-70", children: intro })] }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:min-h-0 twa:overflow-y-auto twa:p-1 twa:pt-0", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { "data-name": dataName, className: (0, utils_1.cn)('twa:grid twa:gap-2', columns === 2 ? 'twa:grid-cols-2' : 'twa:grid-cols-3'), role: "radiogroup", "aria-labelledby": headingId, children: children }) })] }));
|
|
36
|
+
exports.WizardTypeSelectionSection = WizardTypeSelectionSection;
|
|
37
|
+
const WizardNameFieldSection = ({ value, onChange, inputDataName = 'wizard-name', placeholder = 'Enter Name', }) => ((0, jsx_runtime_1.jsxs)(Card_1.Card, { shadow: false, gap: 1, className: "twa:bg-card twa:text-card-foreground", children: [(0, jsx_runtime_1.jsx)(Card_1.Card.Title, { gap: 1, border: false, className: "twa:px-1 twa:pb-1", children: (0, jsx_runtime_1.jsx)(Flex_1.Box, { className: "twa:font-medium", children: "Name" }) }), (0, jsx_runtime_1.jsx)(Card_1.Card.Body, { className: "twa:p-1", children: (0, jsx_runtime_1.jsx)(Input_1.default, { className: "twa:w-full twa:max-w-[420px]", "data-name": inputDataName, onChange: onChange, placeholder: placeholder, value: value }) })] }));
|
|
38
|
+
exports.WizardNameFieldSection = WizardNameFieldSection;
|
|
39
|
+
const WizardTypeSelectionPreviewFrame = ({ children, }) => ((0, jsx_runtime_1.jsx)(Flex_1.Box, { "aria-hidden": true, className: exports.WIZARD_TYPE_SELECTION_PREVIEW_FRAME_CLASS, children: children }));
|
|
40
|
+
exports.WizardTypeSelectionPreviewFrame = WizardTypeSelectionPreviewFrame;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptableApi, Layout } from '../../types';
|
|
3
|
+
export declare const TableRowGroupSummaryTags: React.FC<{
|
|
4
|
+
layout: Layout;
|
|
5
|
+
api: AdaptableApi;
|
|
6
|
+
}>;
|
|
7
|
+
export declare const PivotRowGroupSummaryTags: React.FC<{
|
|
8
|
+
layout: Layout;
|
|
9
|
+
api: AdaptableApi;
|
|
10
|
+
}>;
|
|
11
|
+
export declare const TableRowGroupSummaryView: React.FC<{
|
|
12
|
+
layout: Layout;
|
|
13
|
+
api: AdaptableApi;
|
|
14
|
+
}>;
|
|
15
|
+
export declare const PivotRowGroupSummaryView: React.FC<{
|
|
16
|
+
layout: Layout;
|
|
17
|
+
api: AdaptableApi;
|
|
18
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PivotRowGroupSummaryView = exports.TableRowGroupSummaryView = exports.PivotRowGroupSummaryTags = exports.TableRowGroupSummaryTags = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const Tag_1 = require("../../components/Tag");
|
|
6
|
+
const Flex_1 = require("../../components/Flex");
|
|
7
|
+
const rowGroupSummaryHelpers_1 = require("../../Strategy/Utilities/Layout/rowGroupSummaryHelpers");
|
|
8
|
+
const TableRowGroupSummaryTags = ({ layout, api, }) => {
|
|
9
|
+
const columnIds = layout.RowGroupedColumns ?? [];
|
|
10
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [!columnIds.length ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Row Grouped Columns" })) : (columnIds.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId)))), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Display Type: ", (0, rowGroupSummaryHelpers_1.getRowGroupDisplayTypeLabel)(layout)] }), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Behaviour: ", (0, rowGroupSummaryHelpers_1.getRowGroupBehaviorLabel)(layout)] })] }));
|
|
11
|
+
};
|
|
12
|
+
exports.TableRowGroupSummaryTags = TableRowGroupSummaryTags;
|
|
13
|
+
const PivotRowGroupSummaryTags = ({ layout, api, }) => {
|
|
14
|
+
const columnIds = layout.PivotGroupedColumns ?? [];
|
|
15
|
+
return ((0, jsx_runtime_1.jsxs)(Flex_1.Flex, { flexWrap: "wrap", alignItems: "center", className: "twa:gap-1", children: [!columnIds.length ? ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "No Row Grouped Columns" })) : (columnIds.map((columnId) => ((0, jsx_runtime_1.jsx)(Tag_1.ColumnTag, { children: api.columnApi.getFriendlyNameForColumnId(columnId) }, columnId)))), (0, jsx_runtime_1.jsxs)(Tag_1.Tag, { children: ["Behaviour: ", (0, rowGroupSummaryHelpers_1.getRowGroupBehaviorLabel)(layout)] })] }));
|
|
16
|
+
};
|
|
17
|
+
exports.PivotRowGroupSummaryTags = PivotRowGroupSummaryTags;
|
|
18
|
+
const TableRowGroupSummaryView = (props) => (0, jsx_runtime_1.jsx)(exports.TableRowGroupSummaryTags, { ...props });
|
|
19
|
+
exports.TableRowGroupSummaryView = TableRowGroupSummaryView;
|
|
20
|
+
const PivotRowGroupSummaryView = (props) => (0, jsx_runtime_1.jsx)(exports.PivotRowGroupSummaryTags, { ...props });
|
|
21
|
+
exports.PivotRowGroupSummaryView = PivotRowGroupSummaryView;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ColumnScope } from '../../AdaptableState/Common/ColumnScope';
|
|
3
|
+
export { getScopeViewItemsTagVariant as getScopeSummaryTagVariant } from '../../components/Tag/columnScopeTagHelpers';
|
|
4
|
+
export declare const ScopeSummaryTags: React.FC<{
|
|
5
|
+
scope: ColumnScope;
|
|
6
|
+
}>;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScopeSummaryTags = exports.getScopeSummaryTagVariant = void 0;
|
|
4
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
const AdaptableColumn_1 = require("../../AdaptableState/Common/AdaptableColumn");
|
|
6
|
+
const Tag_1 = require("../../components/Tag");
|
|
7
|
+
const Flex_1 = require("../../components/Flex");
|
|
8
|
+
const AdaptableContext_1 = require("../AdaptableContext");
|
|
9
|
+
var columnScopeTagHelpers_1 = require("../../components/Tag/columnScopeTagHelpers");
|
|
10
|
+
Object.defineProperty(exports, "getScopeSummaryTagVariant", { enumerable: true, get: function () { return columnScopeTagHelpers_1.getScopeViewItemsTagVariant; } });
|
|
11
|
+
const ScopeSummaryTags = ({ scope }) => {
|
|
12
|
+
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
13
|
+
const scopeApi = api.columnScopeApi;
|
|
14
|
+
const columnsInScope = scopeApi.getColumnsInScope(scope);
|
|
15
|
+
if (scopeApi.scopeIsAll(scope)) {
|
|
16
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "All Columns" });
|
|
17
|
+
}
|
|
18
|
+
if ('ColumnIds' in scope) {
|
|
19
|
+
if (!columnsInScope.length) {
|
|
20
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
|
|
21
|
+
}
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(Tag_1.TagList, { tags: columnsInScope.map((c) => c.friendlyName), variant: "column" }));
|
|
23
|
+
}
|
|
24
|
+
if ('DataTypes' in scope) {
|
|
25
|
+
if (!scope.DataTypes.length) {
|
|
26
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
|
|
27
|
+
}
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: scope.DataTypes.map((dataType) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: (0, AdaptableColumn_1.getColumnTypeFriendlyName)(dataType) }, dataType))) }));
|
|
29
|
+
}
|
|
30
|
+
if ('ColumnTypes' in scope) {
|
|
31
|
+
if (!scope.ColumnTypes.length) {
|
|
32
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
|
|
33
|
+
}
|
|
34
|
+
return ((0, jsx_runtime_1.jsx)(Flex_1.Flex, { flexWrap: "wrap", className: "twa:gap-1", children: scope.ColumnTypes.map((columnType) => ((0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: columnType }, columnType))) }));
|
|
35
|
+
}
|
|
36
|
+
return (0, jsx_runtime_1.jsx)(Tag_1.Tag, { children: "None" });
|
|
37
|
+
};
|
|
38
|
+
exports.ScopeSummaryTags = ScopeSummaryTags;
|
|
@@ -590,11 +590,6 @@ class AgGridAdapter {
|
|
|
590
590
|
return 'unknown';
|
|
591
591
|
}
|
|
592
592
|
let dataType = 'unknown';
|
|
593
|
-
// get the column type if already in store (and not unknown)
|
|
594
|
-
const existingColumn = this.adaptableApi.columnApi.getColumnWithColumnId(agColumn.getId(), logWarning);
|
|
595
|
-
if (existingColumn && existingColumn.dataType !== 'unknown') {
|
|
596
|
-
return existingColumn.dataType;
|
|
597
|
-
}
|
|
598
593
|
// check for colDef dataType
|
|
599
594
|
const colDefDataType = agColumn.getColDef().cellDataType;
|
|
600
595
|
if (typeof colDefDataType === 'string' && agGridDataTypeDefinitions_1.ALL_ADAPTABLE_DATA_TYPES.includes(colDefDataType)) {
|
|
@@ -7,6 +7,7 @@ const kebabCase_1 = tslib_1.__importDefault(require("../Utilities/utils/kebabCas
|
|
|
7
7
|
const AdaptableFormatPresets_1 = require("../AdaptableState/Common/AdaptableFormatPresets");
|
|
8
8
|
const merge_1 = tslib_1.__importDefault(require("../Utilities/utils/merge"));
|
|
9
9
|
const SparklineOptionsHelper_1 = require("../Utilities/Helpers/SparklineOptionsHelper");
|
|
10
|
+
const barChartCellText_1 = require("../Utilities/Helpers/barChartCellText");
|
|
10
11
|
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
11
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Utilities/Extensions/StringExtensions"));
|
|
12
13
|
const AdaptableColumn_1 = require("../AdaptableState/Common/AdaptableColumn");
|
|
@@ -1446,11 +1447,11 @@ class AgGridColumnAdapter {
|
|
|
1446
1447
|
const bg = (0, tinycolor2_1.default)(preparedColor).setAlpha(alpha);
|
|
1447
1448
|
style.backgroundColor = bg.toRgbString();
|
|
1448
1449
|
if (gradientStyle.AutoContrastText) {
|
|
1449
|
-
style.color =
|
|
1450
|
+
style.color = (0, StyleHelper_1.getAutoContrastTextColor)(preparedColor, alpha);
|
|
1450
1451
|
}
|
|
1451
1452
|
}
|
|
1452
1453
|
}
|
|
1453
|
-
if (styledColumn.PercentBarStyle && styledColumn.PercentBarStyle.
|
|
1454
|
+
if (styledColumn.PercentBarStyle && (0, barChartCellText_1.hasBarChartCellTextConfigured)(styledColumn.PercentBarStyle.CellTextProperties)) {
|
|
1454
1455
|
style.paddingTop = 0;
|
|
1455
1456
|
style.paddingBottom = 0;
|
|
1456
1457
|
}
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ActionColumnRenderer = exports.ReactActionColumnRenderer = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const DropdownButton_1 =
|
|
6
|
+
const DropdownButton_1 = require("../../components/DropdownButton");
|
|
7
7
|
const React = tslib_1.__importStar(require("react"));
|
|
8
8
|
const Icon_1 = require("../../components/Icon");
|
|
9
9
|
const AdaptableButton_1 = require("../../View/Components/AdaptableButton");
|
|
@@ -17,10 +17,7 @@ function getActionColumnButtonProps(button, index, adaptableApi, context, rerend
|
|
|
17
17
|
}
|
|
18
18
|
const buttonLabel = adaptableApi.internalApi.getLabelForButton(button, context);
|
|
19
19
|
const buttonTooltip = adaptableApi.internalApi.getTooltipForButton(button, context);
|
|
20
|
-
const identifier = button.label ??
|
|
21
|
-
button.icon?.name ??
|
|
22
|
-
button.tooltip ??
|
|
23
|
-
`${index + 1}`;
|
|
20
|
+
const identifier = button.label ?? button.icon?.name ?? button.tooltip ?? `${index + 1}`;
|
|
24
21
|
return {
|
|
25
22
|
button,
|
|
26
23
|
buttonLabel,
|
|
@@ -56,7 +53,7 @@ const ActionColumnDropdown = (props) => {
|
|
|
56
53
|
});
|
|
57
54
|
return {
|
|
58
55
|
label: buttonLabel || buttonTooltip,
|
|
59
|
-
icon: menuIcon ? (
|
|
56
|
+
icon: menuIcon ? (0, jsx_runtime_1.jsx)(Icon_1.IconComponent, { icon: menuIcon }) : undefined,
|
|
60
57
|
disabled,
|
|
61
58
|
onClick: () => {
|
|
62
59
|
actionButton.onClick?.(actionButton, context);
|
|
@@ -68,7 +65,7 @@ const ActionColumnDropdown = (props) => {
|
|
|
68
65
|
if (!items.length) {
|
|
69
66
|
return null;
|
|
70
67
|
}
|
|
71
|
-
return ((0, jsx_runtime_1.jsx)(DropdownButton_1.
|
|
68
|
+
return ((0, jsx_runtime_1.jsx)(DropdownButton_1.NewDropdownButton, { "data-name": "action-column-dropdown", variant: "outlined", tone: "neutral", items: items, accessLevel: GeneralConstants_1.ACCESS_LEVEL_FULL, children: dropdownLabel }));
|
|
72
69
|
};
|
|
73
70
|
const ActionColumnCellContent = (props) => {
|
|
74
71
|
const { buttons, actionColumn, adaptableApi, context, rerender } = props;
|
|
@@ -87,7 +87,9 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
87
87
|
...adaptableApi.internalApi.buildBaseContext(),
|
|
88
88
|
};
|
|
89
89
|
const badge = api.styledColumnApi.internalApi.getApplicableBadge(badgeStyle, predicateDefHandlerContext);
|
|
90
|
-
const formattedValue = badge?.IconOnly
|
|
90
|
+
const formattedValue = badge?.IconProperties?.IconOnly
|
|
91
|
+
? ''
|
|
92
|
+
: params.formatValue?.(value) ?? value ?? '';
|
|
91
93
|
const isNullValue = formattedValue === '' || formattedValue === null || formattedValue === undefined;
|
|
92
94
|
if (!isNullValue) {
|
|
93
95
|
const config = { value: formattedValue };
|
|
@@ -117,7 +119,7 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
117
119
|
this.eGui.innerHTML = formattedValue;
|
|
118
120
|
return;
|
|
119
121
|
}
|
|
120
|
-
if (badge.IconOnly) {
|
|
122
|
+
if (badge.IconProperties?.IconOnly) {
|
|
121
123
|
formattedValue = '';
|
|
122
124
|
}
|
|
123
125
|
this.renderBadges([
|
|
@@ -141,11 +143,11 @@ const getBadgeRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
141
143
|
key: index,
|
|
142
144
|
pillStyle: badge.PillStyle,
|
|
143
145
|
children: value,
|
|
144
|
-
icon: badge.Icon,
|
|
145
|
-
iconPosition: badge.
|
|
146
|
+
icon: badge.IconProperties?.Icon,
|
|
147
|
+
iconPosition: badge.IconProperties?.Position ?? 'start',
|
|
146
148
|
shape: badge.Shape,
|
|
147
149
|
density: badgeStyle.Density ?? 'Normal',
|
|
148
|
-
iconGap: badge.
|
|
150
|
+
iconGap: badge.IconProperties?.Gap,
|
|
149
151
|
});
|
|
150
152
|
});
|
|
151
153
|
this.unmountReactRoot = api.internalApi
|
|
@@ -4,6 +4,7 @@ exports.getBulletChartRendererForColumn = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
6
|
const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
|
|
7
|
+
const barChartCellText_1 = require("../../Utilities/Helpers/barChartCellText");
|
|
7
8
|
const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
|
|
8
9
|
const SVG_NS = 'http://www.w3.org/2000/svg';
|
|
9
10
|
const DEFAULT_BAR_HEIGHT = 8;
|
|
@@ -56,19 +57,18 @@ const normaliseMarker = (override, base) => {
|
|
|
56
57
|
};
|
|
57
58
|
};
|
|
58
59
|
const resolveTargets = (bulletStyle, styledColumn, abColumn, rowNode, api) => {
|
|
59
|
-
|
|
60
|
+
const targetSpec = bulletStyle.TargetProperties?.Target;
|
|
61
|
+
if (targetSpec == undefined) {
|
|
60
62
|
return [];
|
|
61
63
|
}
|
|
62
|
-
const targets = Array.isArray(
|
|
63
|
-
? bulletStyle.Target
|
|
64
|
-
: [bulletStyle.Target];
|
|
64
|
+
const targets = Array.isArray(targetSpec) ? targetSpec : [targetSpec];
|
|
65
65
|
const resolved = [];
|
|
66
66
|
for (const target of targets) {
|
|
67
67
|
const value = resolveTargetValue(target, styledColumn, abColumn, rowNode, api);
|
|
68
68
|
if (value == undefined || isNaN(value)) {
|
|
69
69
|
continue;
|
|
70
70
|
}
|
|
71
|
-
const marker = normaliseMarker(isTargetDefinition(target) ? target.Marker : undefined, bulletStyle.
|
|
71
|
+
const marker = normaliseMarker(isTargetDefinition(target) ? target.Marker : undefined, bulletStyle.TargetProperties?.Marker);
|
|
72
72
|
resolved.push({
|
|
73
73
|
value,
|
|
74
74
|
marker,
|
|
@@ -156,10 +156,10 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
156
156
|
// `BarThickness` is the bar's *short* axis (height in horizontal,
|
|
157
157
|
// width in vertical). `BandThickness` is the matching short-axis
|
|
158
158
|
// size of the surrounding bands.
|
|
159
|
-
const barThickness = bulletStyle.
|
|
159
|
+
const barThickness = bulletStyle.Bar?.Height ?? DEFAULT_BAR_HEIGHT;
|
|
160
160
|
const bandThickness = Math.max(barThickness + 6, DEFAULT_BAND_HEIGHT);
|
|
161
|
-
const
|
|
162
|
-
const
|
|
161
|
+
const cellTextProperties = bulletStyle.CellTextProperties;
|
|
162
|
+
const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties);
|
|
163
163
|
// Map a 0..1 value fraction onto the long-axis viewBox (0..100).
|
|
164
164
|
// In horizontal: 0 -> left, 1 -> right.
|
|
165
165
|
// In vertical: 0 -> bottom, 1 -> top (SVG y origin is at the top so
|
|
@@ -176,7 +176,7 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
176
176
|
this.eGui.style.alignItems = isVertical ? 'center' : 'stretch';
|
|
177
177
|
this.eGui.style.justifyContent = 'center';
|
|
178
178
|
this.eGui.style.position = 'relative';
|
|
179
|
-
this.eGui.style.height =
|
|
179
|
+
this.eGui.style.height = '100%';
|
|
180
180
|
// SVG chart - we let `preserveAspectRatio="none"` stretch the long axis
|
|
181
181
|
// (viewBox 0..100) to fill the cell while the short axis stays fixed
|
|
182
182
|
// in pixels.
|
|
@@ -247,7 +247,7 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
247
247
|
const barCrossOffset = (bandThickness - barThickness) / 2;
|
|
248
248
|
const bar = document.createElementNS(SVG_NS, 'rect');
|
|
249
249
|
setRectAxes(bar, Math.min(valueCoord, originCoord), Math.abs(valueCoord - originCoord), barCrossOffset, barThickness);
|
|
250
|
-
bar.setAttribute('fill', bulletStyle.
|
|
250
|
+
bar.setAttribute('fill', bulletStyle.Bar?.Color ?? DEFAULT_BAR_COLOR);
|
|
251
251
|
bar.setAttribute('class', 'ab-BulletChart__bar');
|
|
252
252
|
svg.appendChild(bar);
|
|
253
253
|
// Target markers
|
|
@@ -259,39 +259,40 @@ const getBulletChartRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
259
259
|
svg.appendChild(marker);
|
|
260
260
|
}
|
|
261
261
|
}
|
|
262
|
-
|
|
262
|
+
// Wrap the SVG in a positioned container so a `Merged` text row can
|
|
263
|
+
// be absolute-positioned to the centre of the *bar* (matching Percent
|
|
264
|
+
// Bar's behaviour) instead of falling through to the wrapper centre,
|
|
265
|
+
// which would otherwise overlap an `Above` / `Below` band.
|
|
266
|
+
const svgContainer = document.createElement('div');
|
|
267
|
+
svgContainer.style.position = 'relative';
|
|
268
|
+
svgContainer.style.display = 'flex';
|
|
269
|
+
svgContainer.style.alignItems = 'center';
|
|
270
|
+
svgContainer.style.justifyContent = 'center';
|
|
271
|
+
// Horizontal: take the SVG's natural (bandThickness) height.
|
|
272
|
+
// Vertical: stretch to fill the wrapper so the SVG's `height: 100%`
|
|
273
|
+
// resolves against a real size.
|
|
274
|
+
if (isVertical) {
|
|
275
|
+
svgContainer.style.flex = '1 1 auto';
|
|
276
|
+
svgContainer.style.minHeight = '0';
|
|
277
|
+
}
|
|
278
|
+
else {
|
|
279
|
+
svgContainer.style.flex = '0 0 auto';
|
|
280
|
+
}
|
|
281
|
+
svgContainer.appendChild(svg);
|
|
282
|
+
this.eGui.appendChild(svgContainer);
|
|
263
283
|
if (hasCellText) {
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
const
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
case 'Above':
|
|
277
|
-
this.eGui.prepend(textEl);
|
|
278
|
-
break;
|
|
279
|
-
case 'Merged':
|
|
280
|
-
textEl.style.position = 'absolute';
|
|
281
|
-
textEl.style.top = '50%';
|
|
282
|
-
textEl.style.transform = 'translateY(-50%)';
|
|
283
|
-
textEl.style.left = '0';
|
|
284
|
-
textEl.style.right = '0';
|
|
285
|
-
textEl.style.paddingLeft = '5px';
|
|
286
|
-
textEl.style.paddingRight = '5px';
|
|
287
|
-
textEl.style.pointerEvents = 'none';
|
|
288
|
-
this.eGui.appendChild(textEl);
|
|
289
|
-
break;
|
|
290
|
-
case 'Below':
|
|
291
|
-
default:
|
|
292
|
-
this.eGui.appendChild(textEl);
|
|
293
|
-
break;
|
|
294
|
-
}
|
|
284
|
+
// See PercentBarRenderer: `params.formatValue` on a column without a
|
|
285
|
+
// `valueFormatter` returns the raw value (a number here), so coerce
|
|
286
|
+
// to string before it flows into the helpers.
|
|
287
|
+
const formattedCellValue = String(params.formatValue?.(cellValue) ?? cellValue);
|
|
288
|
+
const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, formattedCellValue, `${(valueFraction * 100).toFixed(0)}%`);
|
|
289
|
+
(0, barChartCellText_1.mountBarChartCellText)({
|
|
290
|
+
wrapperEl: this.eGui,
|
|
291
|
+
mergedOverlayEl: svgContainer,
|
|
292
|
+
textClassName: 'ab-BulletChart__text',
|
|
293
|
+
cellTextProperties,
|
|
294
|
+
labels,
|
|
295
|
+
});
|
|
295
296
|
}
|
|
296
297
|
}
|
|
297
298
|
getGui() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { StyledColumn } from '../../AdaptableState/StyledColumnState';
|
|
2
|
+
import { IconStyle, IconStyleMapping } from '../../AdaptableState/StyledColumns/IconStyle';
|
|
2
3
|
import { AdaptableApi } from '../../Api/AdaptableApi';
|
|
3
4
|
import { AdaptableColumn } from '../../AdaptableState/Common/AdaptableColumn';
|
|
4
5
|
/**
|
|
@@ -199,7 +199,9 @@ const getIconRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
199
199
|
const iconStyle = styledColumn.IconStyle;
|
|
200
200
|
const size = iconStyle.Size ?? DEFAULT_SIZE;
|
|
201
201
|
const gap = iconStyle.Gap ?? DEFAULT_GAP;
|
|
202
|
-
const
|
|
202
|
+
const cellTextProperties = iconStyle.CellTextProperties;
|
|
203
|
+
const textPosition = cellTextProperties?.CellTextPosition ?? 'After';
|
|
204
|
+
const cellTextTokens = cellTextProperties?.CellText ?? [];
|
|
203
205
|
const matchMode = iconStyle.MatchMode ?? 'Exact';
|
|
204
206
|
// Resolve once at column-setup time. Cheap; recomputed when the column
|
|
205
207
|
// is reconfigured (which is when this factory is re-invoked anyway).
|
|
@@ -236,16 +238,15 @@ const getIconRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
236
238
|
const formatted = params.formatValue?.(cellValue) ??
|
|
237
239
|
(cellValue != undefined ? String(cellValue) : '');
|
|
238
240
|
// `CellText` describes the *companion text alongside a matched icon*.
|
|
239
|
-
// `
|
|
240
|
-
// independent: when there is no match,
|
|
241
|
-
// — `CellText` does not get to override `
|
|
241
|
+
// `FallbackProperties.Mode` describes *what to do when no mapping matches*.
|
|
242
|
+
// They are independent: when there is no match, the fallback decides
|
|
243
|
+
// on its own — `CellText` does not get to override `Mode: 'Hide'`.
|
|
242
244
|
let iconSpec;
|
|
243
245
|
let text;
|
|
244
246
|
let descriptionForTooltip;
|
|
245
247
|
if (matched) {
|
|
246
248
|
iconSpec = matched.Icon;
|
|
247
249
|
descriptionForTooltip = matched.Description;
|
|
248
|
-
const cellTextTokens = iconStyle.CellText ?? [];
|
|
249
250
|
const textParts = [];
|
|
250
251
|
if (cellTextTokens.includes('CellValue') && formatted) {
|
|
251
252
|
textParts.push(formatted);
|
|
@@ -256,17 +257,18 @@ const getIconRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
256
257
|
text = textParts.length > 0 ? textParts.join(' · ') : undefined;
|
|
257
258
|
}
|
|
258
259
|
else if (!cellValueIsEmpty) {
|
|
259
|
-
// Unmatched, non-empty cell: defer entirely to
|
|
260
|
-
const
|
|
261
|
-
|
|
260
|
+
// Unmatched, non-empty cell: defer entirely to the fallback config.
|
|
261
|
+
const fallbackMode = iconStyle.FallbackProperties?.Mode ?? 'Hide';
|
|
262
|
+
const fallbackIcon = iconStyle.FallbackProperties?.Icon;
|
|
263
|
+
if (fallbackMode === 'ShowText') {
|
|
262
264
|
text = formatted || undefined;
|
|
263
265
|
}
|
|
264
|
-
else if (
|
|
265
|
-
iconSpec =
|
|
266
|
+
else if (fallbackMode === 'Icon' && fallbackIcon) {
|
|
267
|
+
iconSpec = fallbackIcon;
|
|
266
268
|
}
|
|
267
269
|
// 'Hide' (and the unsupported permutations) render nothing.
|
|
268
270
|
}
|
|
269
|
-
// else: empty cell → render nothing, regardless of
|
|
271
|
+
// else: empty cell → render nothing, regardless of fallback config.
|
|
270
272
|
// If we have nothing to draw, leave the cell empty (and skip mounting
|
|
271
273
|
// a React root for this row).
|
|
272
274
|
if (!iconSpec && !text) {
|
|
@@ -5,6 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
6
|
const clamp_1 = tslib_1.__importDefault(require("../../Utilities/utils/clamp"));
|
|
7
7
|
const shouldRenderStyledColumnOnRow_1 = require("./shouldRenderStyledColumnOnRow");
|
|
8
|
+
const barChartCellText_1 = require("../../Utilities/Helpers/barChartCellText");
|
|
8
9
|
/**
|
|
9
10
|
* Resolve the origin value (in the same numeric space as `min`/`max`) the bar
|
|
10
11
|
* should grow from.
|
|
@@ -45,58 +46,6 @@ const columnComparisonUsesCentredAxis = (origin) => {
|
|
|
45
46
|
}
|
|
46
47
|
return o === 'Zero' || o === 'Auto';
|
|
47
48
|
};
|
|
48
|
-
/**
|
|
49
|
-
* Linear (non-comparison) mode: bar grows from an interior point of the scale
|
|
50
|
-
* (so positives / negatives can diverge left and right).
|
|
51
|
-
*/
|
|
52
|
-
const linearScaleUsesCentredAxis = (percentBarStyle, cellValue, min, max) => {
|
|
53
|
-
const origin = percentBarStyle.Origin ?? 'Auto';
|
|
54
|
-
if (origin === 'Zero') {
|
|
55
|
-
return true;
|
|
56
|
-
}
|
|
57
|
-
if (origin === 'Min') {
|
|
58
|
-
return false;
|
|
59
|
-
}
|
|
60
|
-
if (typeof origin === 'number') {
|
|
61
|
-
if (max === min) {
|
|
62
|
-
return false;
|
|
63
|
-
}
|
|
64
|
-
const f = toFraction(origin, min, max);
|
|
65
|
-
return f > 0 && f < 1;
|
|
66
|
-
}
|
|
67
|
-
// Auto — same condition as resolveOrigin using 0 as the pivot.
|
|
68
|
-
return min < 0 || max < 0 || cellValue < 0;
|
|
69
|
-
};
|
|
70
|
-
const resolveCellTextAlignCss = (percentBarStyle, args) => {
|
|
71
|
-
const mode = percentBarStyle.CellTextAlignment;
|
|
72
|
-
if (mode == undefined) {
|
|
73
|
-
return undefined;
|
|
74
|
-
}
|
|
75
|
-
if (mode === 'Left') {
|
|
76
|
-
return 'left';
|
|
77
|
-
}
|
|
78
|
-
if (mode === 'Right') {
|
|
79
|
-
return 'right';
|
|
80
|
-
}
|
|
81
|
-
if (mode === 'Center') {
|
|
82
|
-
return 'center';
|
|
83
|
-
}
|
|
84
|
-
// Auto
|
|
85
|
-
const centred = args.hasColumnComparison
|
|
86
|
-
? columnComparisonUsesCentredAxis(percentBarStyle.Origin)
|
|
87
|
-
: linearScaleUsesCentredAxis(percentBarStyle, args.numericValue, args.min, args.max);
|
|
88
|
-
if (!centred) {
|
|
89
|
-
return undefined;
|
|
90
|
-
}
|
|
91
|
-
const v = args.hasColumnComparison ? args.percentageValue : args.numericValue;
|
|
92
|
-
if (v > 0) {
|
|
93
|
-
return 'right';
|
|
94
|
-
}
|
|
95
|
-
if (v < 0) {
|
|
96
|
-
return 'left';
|
|
97
|
-
}
|
|
98
|
-
return 'center';
|
|
99
|
-
};
|
|
100
49
|
const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
101
50
|
if (!styledColumn.PercentBarStyle) {
|
|
102
51
|
return;
|
|
@@ -195,11 +144,14 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
195
144
|
}
|
|
196
145
|
}
|
|
197
146
|
// ----- Build the DOM -------------------------------------------------
|
|
198
|
-
const
|
|
199
|
-
const
|
|
147
|
+
const cellTextProperties = percentBarStyle.CellTextProperties;
|
|
148
|
+
const hasCellText = (0, barChartCellText_1.hasBarChartCellTextConfigured)(cellTextProperties);
|
|
149
|
+
// Wrapper always fills the cell. The bar is the flex-grow child so it
|
|
150
|
+
// claims whatever space the (compact) text rows leave, with a small
|
|
151
|
+
// floor to stay visible even on short rows.
|
|
200
152
|
this.eGui = document.createElement('div');
|
|
201
153
|
this.eGui.className = 'ab-PercentBar__wrapper';
|
|
202
|
-
this.eGui.style.height =
|
|
154
|
+
this.eGui.style.height = '100%';
|
|
203
155
|
this.eGui.style.display = 'flex';
|
|
204
156
|
this.eGui.style.flexDirection = 'column';
|
|
205
157
|
this.eGui.style.justifyContent = 'center';
|
|
@@ -212,7 +164,10 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
212
164
|
if (percentBarStyle.BackColor) {
|
|
213
165
|
barEl.style.background = percentBarStyle.BackColor;
|
|
214
166
|
}
|
|
215
|
-
barEl.style.flex = '1';
|
|
167
|
+
barEl.style.flex = '1 1 0';
|
|
168
|
+
// Floor so the bar can't be squeezed out of existence when both
|
|
169
|
+
// `Above` and `Below` bands are populated on a short row.
|
|
170
|
+
barEl.style.minHeight = '6px';
|
|
216
171
|
// Render the inside bar whenever a colour has been resolved, even at
|
|
217
172
|
// 0% width. A zero-width div is visually identical to skipping the
|
|
218
173
|
// element but keeps the DOM consistent so tests / tooling can still
|
|
@@ -233,47 +188,20 @@ const getPercentBarRendererForColumn = (styledColumn, abColumn, api) => {
|
|
|
233
188
|
}
|
|
234
189
|
this.eGui.append(barEl);
|
|
235
190
|
if (hasCellText) {
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
percentageValue,
|
|
250
|
-
min,
|
|
251
|
-
max,
|
|
252
|
-
hasColumnComparison: !!percentBarStyle.ColumnComparison,
|
|
191
|
+
// Coerce to string: when no `valueFormatter` is set on the column,
|
|
192
|
+
// `params.formatValue` returns the raw value (a number for numeric
|
|
193
|
+
// columns), which then propagates through the helpers as a non-string
|
|
194
|
+
// and breaks string-only operations (e.g. `.length` checks).
|
|
195
|
+
const formattedCellValue = String(params.formatValue?.(rawCellValue) ?? rawCellValue);
|
|
196
|
+
const labels = (0, barChartCellText_1.buildBarChartCellTextLabels)(cellTextProperties, formattedCellValue, `${percentageValue.toFixed(0)}%`);
|
|
197
|
+
(0, barChartCellText_1.mountBarChartCellText)({
|
|
198
|
+
wrapperEl: this.eGui,
|
|
199
|
+
mergedOverlayEl: barEl,
|
|
200
|
+
textClassName: 'ab-PercentBar__text',
|
|
201
|
+
cellTextProperties,
|
|
202
|
+
labels,
|
|
203
|
+
mergedPointerEventsNone: false,
|
|
253
204
|
});
|
|
254
|
-
if (textAlignCss) {
|
|
255
|
-
textEl.style.textAlign = textAlignCss;
|
|
256
|
-
}
|
|
257
|
-
switch (percentBarStyle.CellTextPosition) {
|
|
258
|
-
case 'Above':
|
|
259
|
-
this.eGui.prepend(textEl);
|
|
260
|
-
break;
|
|
261
|
-
case 'Merged':
|
|
262
|
-
textEl.style.position = 'absolute';
|
|
263
|
-
// Centre vertically without knowing the row height
|
|
264
|
-
textEl.style.top = '50%';
|
|
265
|
-
textEl.style.transform = 'translateY(-50%)';
|
|
266
|
-
textEl.style.left = '0';
|
|
267
|
-
textEl.style.right = '0';
|
|
268
|
-
textEl.style.paddingLeft = '5px';
|
|
269
|
-
textEl.style.paddingRight = '5px';
|
|
270
|
-
barEl.append(textEl);
|
|
271
|
-
break;
|
|
272
|
-
case 'Below':
|
|
273
|
-
default:
|
|
274
|
-
this.eGui.append(textEl);
|
|
275
|
-
break;
|
|
276
|
-
}
|
|
277
205
|
}
|
|
278
206
|
}
|
|
279
207
|
getGui() {
|