@adaptabletools/adaptable-cjs 23.0.4-canary.0 → 23.0.5-canary.0
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/agGrid.js +0 -31
- package/index.js +0 -31
- package/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +0 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +1 -9
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +3 -39
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +44 -16
- package/src/AdaptableState/Aggregations/only.js +0 -11
- package/src/AdaptableState/Aggregations/weightedAverage.js +0 -26
- package/src/AdaptableState/Common/AdaptableColumn.js +0 -1
- package/src/AdaptableState/Common/AdaptableForm.js +0 -49
- package/src/AdaptableState/Common/AdaptableFormatPresets.js +0 -13
- package/src/AdaptableState/Common/AdaptablePredicate.js +3 -125
- package/src/AdaptableState/Common/AggregationColumns.js +0 -10
- package/src/AdaptableState/Common/Enums.js +0 -3
- package/src/AdaptableState/Common/Menu.js +1 -7
- package/src/AdaptableState/Common/MenuItem.js +0 -2
- package/src/AdaptableState/Common/Types.js +2 -5
- package/src/AdaptableState/StatusBarState.js +0 -3
- package/src/AdaptableState/StyledColumns/BadgeStyle.js +0 -1
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.js +0 -4
- package/src/AdaptableState/StyledColumns/Common/CellTextOptions.js +0 -5
- package/src/AdaptableState/StyledColumns/Common/NumericStyledColumn.js +0 -8
- package/src/AdaptableState/Uuid.js +0 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +0 -4
- package/src/Api/Implementation/AlertApiImpl.js +0 -21
- package/src/Api/Implementation/ApiBase.js +0 -24
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +0 -1
- package/src/Api/Implementation/ChartingApiImpl.js +0 -3
- package/src/Api/Implementation/ColumnApiImpl.js +1 -15
- package/src/Api/Implementation/ColumnFilterApiImpl.js +0 -9
- package/src/Api/Implementation/ColumnScopeApiImpl.js +0 -21
- package/src/Api/Implementation/DashboardApiImpl.js +0 -1
- package/src/Api/Implementation/EntitlementApiImpl.js +0 -1
- package/src/Api/Implementation/ExportApiImpl.js +0 -10
- package/src/Api/Implementation/ExpressionApiImpl.js +0 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +0 -3
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -2
- package/src/Api/Implementation/GridApiImpl.js +1 -22
- package/src/Api/Implementation/GridFilterApiImpl.js +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -18
- package/src/Api/Implementation/LayoutHelpers.js +0 -16
- package/src/Api/Implementation/NamedQueryApiImpl.js +0 -1
- package/src/Api/Implementation/PredicateApiImpl.js +0 -5
- package/src/Api/Implementation/RowFormApiImpl.js +0 -2
- package/src/Api/Implementation/StateApiImpl.js +0 -7
- package/src/Api/Implementation/SystemStatusApiImpl.js +0 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +0 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -1
- package/src/Api/Internal/ActionColumnInternalApi.js +0 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +0 -2
- package/src/Api/Internal/AdaptableInternalApi.js +1 -39
- package/src/Api/Internal/AlertInternalApi.js +1 -102
- package/src/Api/Internal/CalculatedColumnInternalApi.js +0 -17
- package/src/Api/Internal/ChartingInternalApi.js +0 -1
- package/src/Api/Internal/ColumnFilterInternalApi.js +0 -52
- package/src/Api/Internal/ColumnInternalApi.js +0 -32
- package/src/Api/Internal/CustomSortInternalApi.js +0 -5
- package/src/Api/Internal/DashboardInternalApi.js +0 -23
- package/src/Api/Internal/DataImportInternalApi.js +0 -1
- package/src/Api/Internal/EventInternalApi.js +0 -2
- package/src/Api/Internal/ExportInternalApi.js +1 -16
- package/src/Api/Internal/ExpressionInternalApi.js +0 -23
- package/src/Api/Internal/Fdc3InternalApi.js +0 -9
- package/src/Api/Internal/FlashingCellInternalApi.js +0 -5
- package/src/Api/Internal/FormatColumnInternalApi.js +5 -107
- package/src/Api/Internal/FreeTextColumnInternalApi.js +0 -8
- package/src/Api/Internal/GridFilterInternalApi.js +0 -3
- package/src/Api/Internal/GridInternalApi.js +0 -37
- package/src/Api/Internal/LayoutInternalApi.js +0 -18
- package/src/Api/Internal/NamedQueryInternalApi.js +0 -9
- package/src/Api/Internal/PredicateInternalApi.js +0 -23
- package/src/Api/Internal/RowFormInternalApi.js +0 -18
- package/src/Api/Internal/StateInternalApi.js +0 -25
- package/src/Api/Internal/StyledColumnInternalApi.js +0 -62
- package/src/Api/Internal/TeamSharingInternalApi.js +0 -9
- package/src/Redux/ActionsReducers/AlertRedux.js +0 -24
- package/src/Redux/ActionsReducers/ApplicationRedux.js +0 -9
- package/src/Redux/ActionsReducers/BulkUpdateRedux.js +0 -6
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +1 -16
- package/src/Redux/ActionsReducers/ChartingRedux.js +0 -24
- package/src/Redux/ActionsReducers/CommentsRedux.js +0 -24
- package/src/Redux/ActionsReducers/CustomSortRedux.js +0 -24
- package/src/Redux/ActionsReducers/DashboardRedux.js +0 -33
- package/src/Redux/ActionsReducers/ExportRedux.js +0 -36
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +0 -24
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +0 -36
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +1 -20
- package/src/Redux/ActionsReducers/InternalRedux.js +0 -42
- package/src/Redux/ActionsReducers/LayoutRedux.js +1 -67
- package/src/Redux/ActionsReducers/NamedQueryRedux.js +0 -15
- package/src/Redux/ActionsReducers/NoteRedux.js +0 -14
- package/src/Redux/ActionsReducers/PluginsRedux.js +0 -3
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +0 -34
- package/src/Redux/ActionsReducers/PopupRedux.js +2 -6
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +0 -15
- package/src/Redux/ActionsReducers/ShortcutRedux.js +0 -24
- package/src/Redux/ActionsReducers/SmartEditRedux.js +0 -6
- package/src/Redux/ActionsReducers/StatusBarRedux.js +0 -6
- package/src/Redux/ActionsReducers/StyledColumnRedux.js +0 -27
- package/src/Redux/ActionsReducers/SystemStatusRedux.js +0 -6
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +0 -1
- package/src/Redux/ActionsReducers/ThemeRedux.js +0 -26
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +0 -22
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +0 -3
- package/src/Redux/ActionsReducers/utils.js +0 -6
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +0 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +0 -25
- package/src/Redux/Store/AdaptableStore.js +5 -301
- package/src/Strategy/AdaptableModuleBase.js +0 -35
- package/src/Strategy/AlertModule.js +0 -9
- package/src/Strategy/CellSummaryModule.js +0 -12
- package/src/Strategy/ChartingModule.js +0 -1
- package/src/Strategy/ColumnFilterModule.js +1 -11
- package/src/Strategy/CommentModule.js +0 -2
- package/src/Strategy/DashboardModule.js +0 -4
- package/src/Strategy/ExportModule.js +0 -1
- package/src/Strategy/FlashingCellModule.js +0 -8
- package/src/Strategy/FormatColumnModule.js +0 -3
- package/src/Strategy/FreeTextColumnModule.js +0 -3
- package/src/Strategy/LayoutModule.js +0 -26
- package/src/Strategy/NoteModule.js +0 -3
- package/src/Strategy/PlusMinusModule.js +0 -3
- package/src/Strategy/SettingsPanelModule.js +0 -1
- package/src/Strategy/ShortcutModule.js +0 -1
- package/src/Strategy/SmartEditModule.js +0 -5
- package/src/Strategy/StatusBarModule.js +0 -7
- package/src/Strategy/StyledColumnModule.js +1 -16
- package/src/Strategy/TeamSharingModule.js +0 -9
- package/src/Strategy/Utilities/Layout/columnsSummaryHelpers.js +0 -5
- package/src/Utilities/Constants/DocumentationLinkConstants.js +0 -1
- package/src/Utilities/Constants/GeneralConstants.js +0 -10
- package/src/Utilities/Constants/ObjectDefaultConstants.js +0 -3
- package/src/Utilities/Constants/ReduxConstants.js +4 -8
- package/src/Utilities/Emitter.js +0 -9
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +0 -8
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +0 -15
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +0 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +0 -16
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +0 -9
- package/src/Utilities/ExpressionFunctions/groupingMap.js +0 -9
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +7 -78
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +0 -9
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +2 -16
- package/src/Utilities/Extensions/ArrayExtensions.js +1 -63
- package/src/Utilities/Extensions/NumberExtensions.js +0 -27
- package/src/Utilities/Extensions/ObjectExtensions.js +0 -36
- package/src/Utilities/Extensions/StringExtensions.js +0 -27
- package/src/Utilities/Helpers/ActionColumnHelper.js +0 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +0 -8
- package/src/Utilities/Helpers/DateHelper.js +0 -10
- package/src/Utilities/Helpers/DisplayFormatHelper.js +0 -8
- package/src/Utilities/Helpers/Helper.js +3 -9
- package/src/Utilities/Helpers/PlusMinusHelper.js +0 -20
- package/src/Utilities/Helpers/QuickSearchHelper.js +0 -5
- package/src/Utilities/Helpers/Scheduling/CronExpression.js +0 -43
- package/src/Utilities/Helpers/Scheduling/ScheduledReportHelper.js +0 -4
- package/src/Utilities/Helpers/SettingsPanelHelper.js +40 -4
- package/src/Utilities/Helpers/StyleHelper.js +0 -56
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +0 -46
- package/src/Utilities/Helpers/StyledColumns/GradientStyleHelper.js +0 -38
- package/src/Utilities/Helpers/StyledColumns/IconStyleHelper.js +0 -39
- package/src/Utilities/Helpers/StyledColumns/PercentBarStyleHelper.js +0 -1
- package/src/Utilities/Helpers/StyledColumns/SparklineStyleHelper.js +0 -5
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +0 -37
- package/src/Utilities/Helpers/TimingHelper.js +0 -13
- package/src/Utilities/ObjectFactory.js +2 -4
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +0 -7
- package/src/Utilities/Services/AlertService.js +0 -1
- package/src/Utilities/Services/AnnotationsService.js +0 -22
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +0 -8
- package/src/Utilities/Services/ChartingService.js +0 -9
- package/src/Utilities/Services/DataService.js +0 -11
- package/src/Utilities/Services/Fdc3Service.js +0 -3
- package/src/Utilities/Services/FlashingCellService.js +0 -6
- package/src/Utilities/Services/ModuleService.js +0 -8
- package/src/Utilities/Services/QueryLanguageService.js +2 -25
- package/src/Utilities/Services/RowFormService.js +0 -1
- package/src/Utilities/Services/RowSummaryService.js +1 -20
- package/src/Utilities/Services/TeamSharingService.js +0 -15
- package/src/Utilities/Services/ThemeService.js +0 -7
- package/src/Utilities/Services/ValidationService.js +0 -21
- package/src/Utilities/createAgStatusPanelComponent.js +0 -3
- package/src/Utilities/getExpressionViewItems.js +0 -2
- package/src/Utilities/getObjectTagsViewItems.js +0 -1
- package/src/Utilities/getScrollbarSize.js +0 -1
- package/src/Utilities/logDeprecation.js +0 -3
- package/src/Utilities/resolveContainerElement.js +0 -21
- package/src/Utilities/runIfNotResolvedIn.js +0 -7
- package/src/Utilities/sortColumnStateForVisibleColumns.js +2 -12
- package/src/Utilities/waitForTimeout.js +0 -1
- package/src/Utilities/wizardSelection.js +0 -2
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/AdaptableView.js +1 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -23
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -2
- package/src/View/AdaptableWizardView/Wizard.js +0 -12
- package/src/View/AdaptableWizardView/helper.js +0 -11
- package/src/View/Alert/ActiveAlertsPanel.js +0 -2
- package/src/View/Alert/AlertStatusSubPanel.js +0 -8
- package/src/View/Alert/Utilities/getAlertType.js +0 -7
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +0 -5
- package/src/View/Alert/Utilities/mapAlertDefinition.js +0 -3
- package/src/View/Alert/Wizard/AlertWizard.js +0 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +0 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +0 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +0 -1
- package/src/View/CalculatedColumn/utils.d.ts +1 -1
- package/src/View/CellSummary/CellSummaryPopup.js +0 -3
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -7
- package/src/View/Charting/EditChartButton.js +1 -4
- package/src/View/Charting/ShowChartButton.js +0 -3
- package/src/View/Charting/useAgChartState.js +0 -5
- package/src/View/Charting/useChartingElements.js +0 -4
- package/src/View/Charting/useExternalChartState.js +0 -6
- package/src/View/ColumnInfo/ColumnInfo.js +7 -17
- package/src/View/Comments/CommentsEditor.js +1 -16
- package/src/View/Components/AdaptableButton/AdaptableButtonComponent.js +0 -1
- package/src/View/Components/AdaptableButton/AdaptableButtonView.js +0 -3
- package/src/View/Components/AdaptableDateInput/index.js +2 -9
- package/src/View/Components/AdaptableIconComponent/index.js +0 -4
- package/src/View/Components/AdaptableIconSelector/index.js +0 -3
- package/src/View/Components/AdaptableInput/index.js +0 -2
- package/src/View/Components/Badge/index.js +0 -8
- package/src/View/Components/Buttons/ButtonNewPage.js +1 -2
- package/src/View/Components/Buttons/EntityListActionButtons.js +0 -1
- package/src/View/Components/CellPopup/index.js +1 -2
- package/src/View/Components/ColumnFilter/AdaptableColumnFilter.js +0 -4
- package/src/View/Components/ColumnFilter/AdaptableFloatingFilter.js +0 -4
- package/src/View/Components/ColumnFilter/ColumnFilter.js +3 -46
- package/src/View/Components/ColumnFilter/ColumnFilterWindow.js +0 -2
- package/src/View/Components/ColumnFilter/FloatingFilter.js +1 -20
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -16
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +1 -4
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +0 -1
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +1 -6
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +0 -20
- package/src/View/Components/ColumnFilter/useAdaptableFilterWrapper.js +0 -5
- package/src/View/Components/ColumnFilter/utils.js +2 -9
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicateEditor.js +0 -2
- package/src/View/Components/EntityRulesEditor/EntityRulePredicatesEditor/EntityRulePredicatesEditor.js +0 -1
- package/src/View/Components/EntityRulesEditor/index.js +1 -11
- package/src/View/Components/ExternalRenderer.js +1 -3
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +1 -52
- package/src/View/Components/ModuleValueSelector/index.js +0 -2
- package/src/View/Components/Panels/PanelWithImage.js +1 -5
- package/src/View/Components/Panels/PanelWithRow.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +0 -6
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +1 -2
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +0 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +0 -3
- package/src/View/Components/Popups/AdaptableToaster.js +0 -2
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +0 -8
- package/src/View/Components/RangesComponent.js +0 -57
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +0 -3
- package/src/View/Components/Selectors/PermittedValuesSelector.js +1 -6
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -18
- package/src/View/Components/ToolPanel/ToolPanelPopupSections.js +0 -4
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -4
- package/src/View/Components/ValueSelector/index.js +0 -4
- package/src/View/Components/wizardColumnListStyles.js +0 -5
- package/src/View/Dashboard/CustomToolbar.js +1 -25
- package/src/View/Dashboard/PinnedToolbarsSelector.js +0 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.js +1 -22
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +0 -1
- package/src/View/DataImport/systemFileHandlers.js +1 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +0 -27
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +0 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +0 -7
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +0 -12
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +0 -10
- package/src/View/GridFilter/GridFilterPopup.js +0 -1
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +0 -2
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +1 -31
- package/src/View/Layout/LayoutViewPanel.js +0 -2
- package/src/View/Layout/PivotDetailsPopoup.js +0 -2
- package/src/View/Layout/TransposedPopup.js +0 -7
- package/src/View/Layout/Wizard/LayoutWizard.js +1 -6
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +0 -2
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +1 -32
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +0 -3
- package/src/View/Layout/Wizard/sections/columnLayoutHelpers.js +0 -2
- package/src/View/Layout/Wizard/sections/layoutWizardColumns.js +0 -4
- package/src/View/Note/NotePopup.js +0 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +0 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +0 -4
- package/src/View/StatusBar/StatusBarPanel.js +0 -8
- package/src/View/StatusBar/StatusBarPopup.js +0 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +0 -11
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +0 -28
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +1 -25
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +0 -26
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +0 -40
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +0 -55
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +0 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +0 -21
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.js +0 -10
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +0 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +0 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBulletPreview.js +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnChartListPreviews.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRangeBarPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnRatingPreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnSparklinePreview.js +0 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +0 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -13
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +0 -21
- package/src/View/SystemStatus/SystemStatusPopup.js +0 -1
- package/src/View/TeamSharing/SharedEntityObjectView.js +0 -1
- package/src/View/Theme/ThemeSelector.js +0 -1
- package/src/View/UIHelper.js +0 -6
- package/src/View/UIInterfaces.js +0 -1
- package/src/View/Wizard/CollapsibleWizardCard.js +1 -8
- package/src/View/Wizard/OnePageWizards.js +2 -9
- package/src/View/Wizard/SummaryColorTag.js +0 -1
- package/src/View/Wizard/useKeyboardNavigation.js +1 -3
- package/src/agGrid/Adaptable.js +0 -12
- package/src/agGrid/AdaptableAgGrid.d.ts +0 -2
- package/src/agGrid/AdaptableAgGrid.js +3 -482
- package/src/agGrid/AdaptableFilterHandler.js +0 -5
- package/src/agGrid/AdaptableLogger.js +0 -6
- package/src/agGrid/AgGridAdapter.js +3 -90
- package/src/agGrid/AgGridColumnAdapter.js +6 -168
- package/src/agGrid/AgGridExportAdapter.js +4 -106
- package/src/agGrid/AgGridFilterAdapter.js +0 -5
- package/src/agGrid/AgGridFloatingFilterAdapter.js +0 -10
- package/src/agGrid/AgGridMenuAdapter.js +0 -143
- package/src/agGrid/AgGridModulesAdapter.js +0 -2
- package/src/agGrid/AgGridOptionsService.js +0 -2
- package/src/agGrid/AgGridThemeAdapter.js +0 -7
- package/src/agGrid/agGridDataTypeDefinitions.js +0 -8
- package/src/agGrid/cellRenderers/BadgeRenderer.js +0 -10
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +1 -96
- package/src/agGrid/cellRenderers/IconRenderer.js +0 -55
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +0 -51
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +1 -50
- package/src/agGrid/cellRenderers/RatingRenderer.js +0 -40
- package/src/agGrid/editors/AdaptableDateEditor/index.js +0 -18
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +0 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +0 -11
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +0 -9
- package/src/agGrid/index.js +0 -6
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +1 -73
- package/src/components/ColorPicker/ColorPicker.js +0 -6
- package/src/components/Combobox/VirtualizedList.js +0 -5
- package/src/components/Combobox/index.js +5 -63
- package/src/components/Dashboard/Dashboard.js +1 -4
- package/src/components/Datepicker/index.js +2 -97
- package/src/components/DragAndDropContext/TabList.js +2 -6
- package/src/components/Drawer/index.js +0 -7
- package/src/components/Dropdown/index.js +0 -1
- package/src/components/DropdownButton/index.js +0 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -16
- package/src/components/ExpressionEditor/EditorButton.js +0 -1
- package/src/components/ExpressionEditor/EditorInput.js +1 -7
- package/src/components/ExpressionEditor/EditorInputWithWhereClause.js +0 -1
- package/src/components/ExpressionEditor/ExpressionPreview.js +4 -14
- package/src/components/ExpressionEditor/NamedQueryContext.js +0 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +1 -6
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +0 -12
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +0 -4
- package/src/components/ExpressionEditor/index.js +5 -14
- package/src/components/Icon/index.js +0 -2
- package/src/components/Input/NumberInput.js +0 -10
- package/src/components/Modal/Backdrop.js +0 -1
- package/src/components/OverlayTrigger/Overlay.js +0 -1
- package/src/components/OverlayTrigger/index.js +3 -15
- package/src/components/ProgressIndicator/ProgressIndicator.js +3 -16
- package/src/components/ResizeObserver/index.js +0 -7
- package/src/components/SelectableList/index.js +0 -7
- package/src/components/SimpleButton/index.js +2 -16
- package/src/components/Tabs/index.js +0 -3
- package/src/components/Tag/Tag.js +0 -1
- package/src/components/Tag/columnScopeTagHelpers.js +0 -2
- package/src/components/Textarea/index.js +1 -8
- package/src/components/Toggle/Toggle.js +1 -5
- package/src/components/Toggle/ToggleGroup.js +1 -3
- package/src/components/ToggleButton/index.js +1 -3
- package/src/components/Tree/TreeDropdown/index.js +2 -130
- package/src/components/Tree/treeUtils.js +0 -4
- package/src/components/WindowModal/WindowModal.js +1 -14
- package/src/components/WindowModal/useStacking.js +0 -7
- package/src/components/icons/bullet-chart.js +0 -4
- package/src/components/icons/icon-style.js +0 -4
- package/src/components/icons/index.js +26 -36
- package/src/components/icons/range-bar.js +0 -5
- package/src/components/icons/star.js +0 -1
- package/src/components/twUtils.js +3 -12
- package/src/components/ui/calendar.js +1 -9
- package/src/components/ui/combobox.js +0 -4
- package/src/components/utils/captureTabNavigation/getFocusableChildren.js +0 -1
- package/src/components/utils/useDraggable.js +0 -4
- package/src/components/utils/useProperty.js +0 -18
- package/src/devTools/index.js +0 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +0 -5
- package/src/layout-manager/src/destructurePivotColumnId.js +0 -19
- package/src/layout-manager/src/index.js +2 -182
- package/src/layout-manager/src/isLayoutEqual.js +0 -1
- package/src/layout-manager/src/isPivotColumnTotal.js +0 -2
- package/src/layout-manager/src/normalizeLayoutModel.js +0 -27
- package/src/layout-manager/src/simplifyLayoutModel.js +0 -11
- package/src/layout-manager/src/sortColumnIdsByOrder.js +2 -12
- package/src/lib/utils.js +0 -1
- package/src/migration/AdaptableUpgradeHelper.js +0 -2
- package/src/migration/VersionUpgrade17.js +0 -33
- package/src/migration/VersionUpgrade20.js +1 -21
- package/src/migration/VersionUpgrade21.js +0 -3
- package/src/migration/VersionUpgrade22.js +0 -11
- package/src/migration/VersionUpgrade23.js +0 -73
- package/src/parser/src/evaluator.js +0 -1
- package/src/parser/src/index.js +0 -1
- package/src/parser/src/parser.js +4 -103
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +0 -5
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +0 -2
- package/src/parser/src/tokenizer.js +0 -2
- package/src/parser/src/utils.js +0 -1
- package/src/renderReactRoot.js +0 -12
- package/src/setupDevTools.js +0 -6
- package/src/twMerge.js +0 -1
- package/src/types.d.ts +1 -1
- package/src/types.js +0 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +0 -20
- package/src/Utilities/Services/Interface/IMetamodelService.js +0 -2
- package/src/Utilities/Services/MetamodelService.d.ts +0 -17
- package/src/Utilities/Services/MetamodelService.js +0 -167
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +0 -104
- package/src/metamodel/adaptable-metamodel-model.d.ts +0 -26
- package/src/metamodel/adaptable-metamodel-model.js +0 -2
- package/src/metamodel/adaptable.metamodel.d.ts +0 -6244
- package/src/metamodel/adaptable.metamodel.js +0 -1
|
@@ -4,10 +4,6 @@ exports.getAutoContrastTextColor = exports.DEFAULT_CELL_SURFACE_COLOR = exports.
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
6
6
|
const EnumExtensions_1 = require("../Extensions/EnumExtensions");
|
|
7
|
-
/**
|
|
8
|
-
* Keys belonging to the "Font" slice (text rendering + alignment).
|
|
9
|
-
* See {@link CellFontStyle}.
|
|
10
|
-
*/
|
|
11
7
|
exports.CELL_FONT_STYLE_KEYS = [
|
|
12
8
|
'ForeColor',
|
|
13
9
|
'FontWeight',
|
|
@@ -16,10 +12,6 @@ exports.CELL_FONT_STYLE_KEYS = [
|
|
|
16
12
|
'FontSize',
|
|
17
13
|
'Alignment',
|
|
18
14
|
];
|
|
19
|
-
/**
|
|
20
|
-
* Keys belonging to the "Cell" slice (cell chrome — background and border).
|
|
21
|
-
* See {@link CellBoxStyle}.
|
|
22
|
-
*/
|
|
23
15
|
exports.CELL_BOX_STYLE_KEYS = [
|
|
24
16
|
'BackColor',
|
|
25
17
|
'BorderColor',
|
|
@@ -31,19 +23,10 @@ const hasAtLeastOneKey = (obj, keys) => {
|
|
|
31
23
|
}
|
|
32
24
|
return keys.some((k) => obj[k] !== undefined && obj[k] !== null);
|
|
33
25
|
};
|
|
34
|
-
/**
|
|
35
|
-
* Returns true when the given style has any property in the Font slice set.
|
|
36
|
-
*/
|
|
37
26
|
const hasCellFontStyle = (style) => hasAtLeastOneKey(style, exports.CELL_FONT_STYLE_KEYS);
|
|
38
27
|
exports.hasCellFontStyle = hasCellFontStyle;
|
|
39
|
-
/**
|
|
40
|
-
* Returns true when the given style has any property in the Cell (box) slice set.
|
|
41
|
-
*/
|
|
42
28
|
const hasCellBoxStyle = (style) => hasAtLeastOneKey(style, exports.CELL_BOX_STYLE_KEYS);
|
|
43
29
|
exports.hasCellBoxStyle = hasCellBoxStyle;
|
|
44
|
-
/**
|
|
45
|
-
* Returns a copy of `style` containing only Font-slice keys.
|
|
46
|
-
*/
|
|
47
30
|
const pickCellFontStyle = (style) => {
|
|
48
31
|
const out = {};
|
|
49
32
|
if (!style) {
|
|
@@ -58,9 +41,6 @@ const pickCellFontStyle = (style) => {
|
|
|
58
41
|
return out;
|
|
59
42
|
};
|
|
60
43
|
exports.pickCellFontStyle = pickCellFontStyle;
|
|
61
|
-
/**
|
|
62
|
-
* Returns a copy of `style` containing only Cell-slice (box) keys.
|
|
63
|
-
*/
|
|
64
44
|
const pickCellBoxStyle = (style) => {
|
|
65
45
|
const out = {};
|
|
66
46
|
if (!style) {
|
|
@@ -75,25 +55,18 @@ const pickCellBoxStyle = (style) => {
|
|
|
75
55
|
return out;
|
|
76
56
|
};
|
|
77
57
|
exports.pickCellBoxStyle = pickCellBoxStyle;
|
|
78
|
-
/**
|
|
79
|
-
* Returns a copy of `style` with all Font-slice keys removed.
|
|
80
|
-
*/
|
|
81
58
|
const omitCellFontStyle = (style) => {
|
|
82
59
|
const out = { ...(style ?? {}) };
|
|
83
60
|
exports.CELL_FONT_STYLE_KEYS.forEach((k) => delete out[k]);
|
|
84
61
|
return out;
|
|
85
62
|
};
|
|
86
63
|
exports.omitCellFontStyle = omitCellFontStyle;
|
|
87
|
-
/**
|
|
88
|
-
* Returns a copy of `style` with all Cell-slice (box) keys removed.
|
|
89
|
-
*/
|
|
90
64
|
const omitCellBoxStyle = (style) => {
|
|
91
65
|
const out = { ...(style ?? {}) };
|
|
92
66
|
exports.CELL_BOX_STYLE_KEYS.forEach((k) => delete out[k]);
|
|
93
67
|
return out;
|
|
94
68
|
};
|
|
95
69
|
exports.omitCellBoxStyle = omitCellBoxStyle;
|
|
96
|
-
// required for hacky fix for https://github.com/AdaptableTools/adaptable/issues/2119
|
|
97
70
|
exports.AgGridCellStyleProperties = [
|
|
98
71
|
'backgroundColor',
|
|
99
72
|
'color',
|
|
@@ -101,9 +74,6 @@ exports.AgGridCellStyleProperties = [
|
|
|
101
74
|
'fontStyle',
|
|
102
75
|
'fontSize',
|
|
103
76
|
'borderColor',
|
|
104
|
-
// needed for quick search
|
|
105
|
-
// as otherwise, the currentTextMatchStyle is not removed correctly
|
|
106
|
-
// from the cell when looping through the values, and the cell is no longer the current match
|
|
107
77
|
'--ab-dynamic-background-color',
|
|
108
78
|
'--ab-dynamic-color',
|
|
109
79
|
'--ab-dynamic-font-weight',
|
|
@@ -113,9 +83,6 @@ exports.AgGridCellStyleProperties = [
|
|
|
113
83
|
'--ab-dynamic-border-radius',
|
|
114
84
|
'--ab-dynamic-border-color',
|
|
115
85
|
];
|
|
116
|
-
// see https://github.com/AdaptableTools/adaptable/issues/2119
|
|
117
|
-
// since v29 AG Grid ignores style properties with null or undefined values
|
|
118
|
-
// Fix: pass empty string instead of null/undefined
|
|
119
86
|
const normalizeStyleForAgGrid = (style) => {
|
|
120
87
|
const normalizedStyle = { ...style };
|
|
121
88
|
exports.AgGridCellStyleProperties.forEach((cellStylePropKey) => {
|
|
@@ -126,7 +93,6 @@ const normalizeStyleForAgGrid = (style) => {
|
|
|
126
93
|
return normalizedStyle;
|
|
127
94
|
};
|
|
128
95
|
exports.normalizeStyleForAgGrid = normalizeStyleForAgGrid;
|
|
129
|
-
// the inverse of normalizeStyleForAgGrid, see comments above
|
|
130
96
|
const sanitizeStyle = (style) => {
|
|
131
97
|
const sanitizedStyle = {};
|
|
132
98
|
Object.keys(style).forEach((key) => {
|
|
@@ -190,11 +156,9 @@ const convertAdaptableStyleToCSS = (style) => {
|
|
|
190
156
|
break;
|
|
191
157
|
}
|
|
192
158
|
}
|
|
193
|
-
// assertion added to comply with the ag-Grid types
|
|
194
159
|
return result;
|
|
195
160
|
};
|
|
196
161
|
exports.convertAdaptableStyleToCSS = convertAdaptableStyleToCSS;
|
|
197
|
-
// based on http://jerekdain.com/fontconversion.html
|
|
198
162
|
const convertCSSAbsoluteFontSizeToPt = (fontSize) => {
|
|
199
163
|
switch (fontSize) {
|
|
200
164
|
case 'x-large':
|
|
@@ -232,28 +196,8 @@ const getVariableColor = (variable) => {
|
|
|
232
196
|
return getComputedStyle(document.documentElement).getPropertyValue(match[1]).trim();
|
|
233
197
|
};
|
|
234
198
|
exports.getVariableColor = getVariableColor;
|
|
235
|
-
/**
|
|
236
|
-
* Default surface colour assumed to sit *behind* a semi-transparent cell tint
|
|
237
|
-
* when computing auto-contrast text. Gradient cells paint a base colour at a
|
|
238
|
-
* value-driven alpha, so the colour the user actually perceives is that tint
|
|
239
|
-
* composited over the grid cell background (white in the default light theme).
|
|
240
|
-
*/
|
|
241
199
|
exports.DEFAULT_CELL_SURFACE_COLOR = '#ffffff';
|
|
242
|
-
/**
|
|
243
|
-
* Luminance above which a (composited, opaque) background is considered "light"
|
|
244
|
-
* enough to need dark text.
|
|
245
|
-
*/
|
|
246
200
|
const AUTO_CONTRAST_LUMINANCE_THRESHOLD = 0.45;
|
|
247
|
-
/**
|
|
248
|
-
* Picks a readable text colour (near-black or white) for a cell whose
|
|
249
|
-
* background is `baseColor` painted at `alpha` over `surfaceColor`.
|
|
250
|
-
*
|
|
251
|
-
* The tint must be composited over the surface *before* measuring luminance:
|
|
252
|
-
* `tinycolor.getLuminance()` ignores the alpha channel, so measuring the raw
|
|
253
|
-
* base colour would yield the same result for a faint cell and a fully-opaque
|
|
254
|
-
* one — making auto-contrast text identical on every row instead of adapting
|
|
255
|
-
* per cell.
|
|
256
|
-
*/
|
|
257
201
|
const getAutoContrastTextColor = (baseColor, alpha, surfaceColor = exports.DEFAULT_CELL_SURFACE_COLOR) => {
|
|
258
202
|
const composited = tinycolor2_1.default.mix(surfaceColor, baseColor, alpha * 100);
|
|
259
203
|
return composited.getLuminance() > AUTO_CONTRAST_LUMINANCE_THRESHOLD ? '#111111' : '#ffffff';
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mountBarStyleCellText = exports.formatBarStyleCellTextLayoutSummary = exports.getBarStyleCellTextSlotPresence = exports.resolveBarStyleCellTextSlots = exports.joinBarStyleCellTextLabels = exports.hasBarStyleCellTextLabels = exports.buildBarStyleCellTextLabels = exports.toggleBarStyleCellTextToken = exports.patchBarStyleCellTextPlacement = exports.setBarStyleCellTextPlacement = exports.mergeBarStyleCellTextProperties = exports.getActiveBarStyleCellTextTokens = exports.hasBarStyleCellTextConfigured = exports.resolveBarStyleCellTextLayout = void 0;
|
|
4
|
-
/** Default placement applied to a value whose Horizontal/Vertical were omitted. */
|
|
5
4
|
const DEFAULT_PLACEMENT = {
|
|
6
5
|
Horizontal: 'Left',
|
|
7
6
|
Vertical: 'Below',
|
|
@@ -10,14 +9,12 @@ const HORIZONTAL_VALUES = ['Left', 'Center', 'Right'];
|
|
|
10
9
|
const VERTICAL_VALUES = ['Above', 'Below', 'Merged'];
|
|
11
10
|
const isHorizontal = (value) => typeof value === 'string' && HORIZONTAL_VALUES.includes(value);
|
|
12
11
|
const isVertical = (value) => typeof value === 'string' && VERTICAL_VALUES.includes(value);
|
|
13
|
-
/** Normalise a placement, applying defaults for missing axes. */
|
|
14
12
|
const sanitizePlacement = (placement) => ({
|
|
15
13
|
Horizontal: isHorizontal(placement?.Horizontal)
|
|
16
14
|
? placement.Horizontal
|
|
17
15
|
: DEFAULT_PLACEMENT.Horizontal,
|
|
18
16
|
Vertical: isVertical(placement?.Vertical) ? placement.Vertical : DEFAULT_PLACEMENT.Vertical,
|
|
19
17
|
});
|
|
20
|
-
/** Returns a layout with only the values that are actually present, defaults filled in. */
|
|
21
18
|
const sanitizeCellTextLayout = (layout) => {
|
|
22
19
|
const result = {};
|
|
23
20
|
if (layout?.CellValue) {
|
|
@@ -30,13 +27,11 @@ const sanitizeCellTextLayout = (layout) => {
|
|
|
30
27
|
};
|
|
31
28
|
const resolveBarStyleCellTextLayout = (props) => sanitizeCellTextLayout(props?.CellTextLayout);
|
|
32
29
|
exports.resolveBarStyleCellTextLayout = resolveBarStyleCellTextLayout;
|
|
33
|
-
/** True when any value is configured for display. */
|
|
34
30
|
const hasBarStyleCellTextConfigured = (props) => {
|
|
35
31
|
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
36
32
|
return Boolean(layout.CellValue || layout.PercentValue);
|
|
37
33
|
};
|
|
38
34
|
exports.hasBarStyleCellTextConfigured = hasBarStyleCellTextConfigured;
|
|
39
|
-
/** Set of value tokens that currently have a placement. */
|
|
40
35
|
const getActiveBarStyleCellTextTokens = (props) => {
|
|
41
36
|
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
42
37
|
const tokens = [];
|
|
@@ -63,9 +58,6 @@ const mergeBarStyleCellTextProperties = (current, patch) => {
|
|
|
63
58
|
return merged;
|
|
64
59
|
};
|
|
65
60
|
exports.mergeBarStyleCellTextProperties = mergeBarStyleCellTextProperties;
|
|
66
|
-
/**
|
|
67
|
-
* Set or clear a value's placement. Passing `placement: undefined` removes the value.
|
|
68
|
-
*/
|
|
69
61
|
const setBarStyleCellTextPlacement = (current, token, placement) => {
|
|
70
62
|
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
71
63
|
const next = { ...layout };
|
|
@@ -79,10 +71,6 @@ const setBarStyleCellTextPlacement = (current, token, placement) => {
|
|
|
79
71
|
return (0, exports.mergeBarStyleCellTextProperties)(current, { CellTextLayout: next });
|
|
80
72
|
};
|
|
81
73
|
exports.setBarStyleCellTextPlacement = setBarStyleCellTextPlacement;
|
|
82
|
-
/**
|
|
83
|
-
* Patch a single axis of a value's placement (creating the value with defaults if
|
|
84
|
-
* needed). Used by the wizard's placement pickers.
|
|
85
|
-
*/
|
|
86
74
|
const patchBarStyleCellTextPlacement = (current, token, patch) => {
|
|
87
75
|
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
88
76
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
@@ -94,10 +82,6 @@ const patchBarStyleCellTextPlacement = (current, token, patch) => {
|
|
|
94
82
|
return (0, exports.setBarStyleCellTextPlacement)(current, token, nextPlacement);
|
|
95
83
|
};
|
|
96
84
|
exports.patchBarStyleCellTextPlacement = patchBarStyleCellTextPlacement;
|
|
97
|
-
/**
|
|
98
|
-
* Toggle whether a value is displayed. When turning on a previously-hidden
|
|
99
|
-
* value we use the default placement (Left / Below).
|
|
100
|
-
*/
|
|
101
85
|
const toggleBarStyleCellTextToken = (current, token, show) => {
|
|
102
86
|
const layout = (0, exports.resolveBarStyleCellTextLayout)(current);
|
|
103
87
|
const key = token === 'CellValue' ? 'CellValue' : 'PercentValue';
|
|
@@ -128,7 +112,6 @@ const buildBarStyleCellTextLabels = (props, cellValueLabel, percentageLabel) =>
|
|
|
128
112
|
exports.buildBarStyleCellTextLabels = buildBarStyleCellTextLabels;
|
|
129
113
|
const hasBarStyleCellTextLabels = (labels) => Boolean(labels.cellValue || labels.percentage);
|
|
130
114
|
exports.hasBarStyleCellTextLabels = hasBarStyleCellTextLabels;
|
|
131
|
-
/** Join active labels with a space, Cell Value first then Percent Value. */
|
|
132
115
|
const joinBarStyleCellTextLabels = (labels) => {
|
|
133
116
|
const parts = [];
|
|
134
117
|
if (labels.cellValue)
|
|
@@ -138,16 +121,8 @@ const joinBarStyleCellTextLabels = (labels) => {
|
|
|
138
121
|
return parts.join(' ');
|
|
139
122
|
};
|
|
140
123
|
exports.joinBarStyleCellTextLabels = joinBarStyleCellTextLabels;
|
|
141
|
-
/**
|
|
142
|
-
* Resolve which placements are populated and what text goes in each cell of
|
|
143
|
-
* the 3 × 3 grid. Empty slots are omitted. Two values landing on the same
|
|
144
|
-
* (vertical, horizontal) slot are concatenated with a single space, Cell
|
|
145
|
-
* Value before Percent Value.
|
|
146
|
-
*/
|
|
147
124
|
const resolveBarStyleCellTextSlots = (props, labels) => {
|
|
148
125
|
const layout = (0, exports.resolveBarStyleCellTextLayout)(props);
|
|
149
|
-
// Iteration order matters when both values share a slot: Cell Value first,
|
|
150
|
-
// then Percent Value (matches the legacy "joined" behaviour).
|
|
151
126
|
const candidates = [];
|
|
152
127
|
if (layout.CellValue && labels.cellValue) {
|
|
153
128
|
candidates.push({
|
|
@@ -195,9 +170,6 @@ const getBarStyleCellTextSlotPresence = (props) => {
|
|
|
195
170
|
};
|
|
196
171
|
};
|
|
197
172
|
exports.getBarStyleCellTextSlotPresence = getBarStyleCellTextSlotPresence;
|
|
198
|
-
// ---------------------------------------------------------------------------
|
|
199
|
-
// Summary formatting
|
|
200
|
-
// ---------------------------------------------------------------------------
|
|
201
173
|
const HORIZONTAL_LABEL = {
|
|
202
174
|
Left: 'Left',
|
|
203
175
|
Center: 'Center',
|
|
@@ -224,9 +196,6 @@ const formatBarStyleCellTextLayoutSummary = (layout) => {
|
|
|
224
196
|
return parts.length ? parts.join('; ') : undefined;
|
|
225
197
|
};
|
|
226
198
|
exports.formatBarStyleCellTextLayoutSummary = formatBarStyleCellTextLayoutSummary;
|
|
227
|
-
// ---------------------------------------------------------------------------
|
|
228
|
-
// DOM mount
|
|
229
|
-
// ---------------------------------------------------------------------------
|
|
230
199
|
const HORIZONTAL_FLEX_JUSTIFY = {
|
|
231
200
|
Left: 'flex-start',
|
|
232
201
|
Center: 'center',
|
|
@@ -244,10 +213,6 @@ const createCellTextRow = (slots, textClassName, compact) => {
|
|
|
244
213
|
row.style.flexDirection = 'row';
|
|
245
214
|
row.style.alignItems = 'center';
|
|
246
215
|
row.style.width = '100%';
|
|
247
|
-
// When `Above` AND `Below` are both populated, two default-size text rows
|
|
248
|
-
// would squeeze the bar to 0 on a standard ~28-40px cell, so the caller
|
|
249
|
-
// asks for a compact band (smaller font + tighter line-height).
|
|
250
|
-
// Otherwise we render at the inherited cell font for legibility.
|
|
251
216
|
if (compact) {
|
|
252
217
|
row.style.fontSize = '0.75em';
|
|
253
218
|
row.style.lineHeight = '1';
|
|
@@ -257,8 +222,6 @@ const createCellTextRow = (slots, textClassName, compact) => {
|
|
|
257
222
|
}
|
|
258
223
|
row.style.flex = '0 0 auto';
|
|
259
224
|
row.style.gap = '4px';
|
|
260
|
-
// Render fixed Left / Center / Right cells so spacing is stable even when
|
|
261
|
-
// only one or two slots are present.
|
|
262
225
|
for (const horizontal of HORIZONTAL_VALUES) {
|
|
263
226
|
const slot = slots.find((s) => s.horizontal === horizontal);
|
|
264
227
|
const cell = document.createElement('span');
|
|
@@ -273,11 +236,6 @@ const createCellTextRow = (slots, textClassName, compact) => {
|
|
|
273
236
|
}
|
|
274
237
|
row.append(cell);
|
|
275
238
|
}
|
|
276
|
-
// Suppress the dummy row in the rare case where every slot for this band is
|
|
277
|
-
// empty (e.g. the only label is empty string). `String(...)` because text
|
|
278
|
-
// may arrive as a number when `params.formatValue` is undefined for a
|
|
279
|
-
// numeric column — `(11).length` is `undefined`, which would otherwise
|
|
280
|
-
// wrongly trip the empty-row branch.
|
|
281
239
|
if (!slots.some((s) => String(s.text ?? '').length)) {
|
|
282
240
|
row.style.display = 'none';
|
|
283
241
|
}
|
|
@@ -299,10 +257,6 @@ const mountBarStyleCellText = (args) => {
|
|
|
299
257
|
Below: slots.filter((s) => s.vertical === 'Below'),
|
|
300
258
|
Merged: slots.filter((s) => s.vertical === 'Merged'),
|
|
301
259
|
};
|
|
302
|
-
// Compact when Cell Value and Percent Value have *different* verticals
|
|
303
|
-
// (i.e. the two tokens claim two separate bands of vertical space). When
|
|
304
|
-
// they share a vertical band — or when only one token is configured —
|
|
305
|
-
// we have room for the full-size font.
|
|
306
260
|
const layout = (0, exports.resolveBarStyleCellTextLayout)(cellTextProperties);
|
|
307
261
|
const compact = Boolean(layout.CellValue &&
|
|
308
262
|
layout.PercentValue &&
|
|
@@ -11,15 +11,7 @@ const tinycolor2_1 = tslib_1.__importDefault(require("tinycolor2"));
|
|
|
11
11
|
const StyleHelper_1 = require("../StyleHelper");
|
|
12
12
|
const StyleHelper_2 = require("../StyleHelper");
|
|
13
13
|
const NumberExtensions_1 = require("../../Extensions/NumberExtensions");
|
|
14
|
-
/**
|
|
15
|
-
* Default alpha at the **low** end of a Gradient range when `MinAlpha` is unset.
|
|
16
|
-
* Slightly above zero so the bottom-edge value of every range still shows its
|
|
17
|
-
* colour (rather than rendering fully transparent).
|
|
18
|
-
*/
|
|
19
14
|
exports.DEFAULT_GRADIENT_MIN_ALPHA = 0.15;
|
|
20
|
-
/**
|
|
21
|
-
* Default alpha at the **high** end of a Gradient range when `MaxAlpha` is unset.
|
|
22
|
-
*/
|
|
23
15
|
exports.DEFAULT_GRADIENT_MAX_ALPHA = 1;
|
|
24
16
|
const hasGradientRangesConfigured = (gs) => !!(gs?.ZeroCentred || gs?.CellRanges?.length || gs?.ColumnComparison);
|
|
25
17
|
exports.hasGradientRangesConfigured = hasGradientRangesConfigured;
|
|
@@ -30,12 +22,9 @@ const evenlySpacedValues = (min, max, count) => {
|
|
|
30
22
|
const step = (max - min) / (count - 1);
|
|
31
23
|
return Array.from({ length: count }, (_, i) => min + step * i);
|
|
32
24
|
};
|
|
33
|
-
/** Number of sample cells shown in Gradient / Percent Bar style previews. */
|
|
34
25
|
exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT = 6;
|
|
35
|
-
/** Illustrative zero-centred scale endpoints for preview geometry. */
|
|
36
26
|
exports.ZERO_CENTRED_PREVIEW_SCALE_MIN = -20;
|
|
37
27
|
exports.ZERO_CENTRED_PREVIEW_SCALE_MAX = 20;
|
|
38
|
-
/** @deprecated Use {@link getZeroCentredGradientPreviewValues} — kept for callers using endpoints. */
|
|
39
28
|
exports.ZERO_CENTRED_GRADIENT_PREVIEW_VALUES = evenlySpacedValues(exports.ZERO_CENTRED_PREVIEW_SCALE_MIN, exports.ZERO_CENTRED_PREVIEW_SCALE_MAX, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
|
|
40
29
|
const getZeroCentredGradientPreviewValues = () => evenlySpacedValues(exports.ZERO_CENTRED_PREVIEW_SCALE_MIN, exports.ZERO_CENTRED_PREVIEW_SCALE_MAX, exports.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
|
|
41
30
|
exports.getZeroCentredGradientPreviewValues = getZeroCentredGradientPreviewValues;
|
|
@@ -49,9 +38,6 @@ function isDivergingZeroCellRanges(ranges) {
|
|
|
49
38
|
function isZeroCentredGradientStyle(gs) {
|
|
50
39
|
return !!(gs.ZeroCentred || isDivergingZeroCellRanges(gs.CellRanges));
|
|
51
40
|
}
|
|
52
|
-
/**
|
|
53
|
-
* Sample cell values for gradient preview strips — spread across the effective scale.
|
|
54
|
-
*/
|
|
55
41
|
const getGradientPreviewSampleValues = (styledColumn, api) => {
|
|
56
42
|
const gs = styledColumn.GradientStyle;
|
|
57
43
|
if (!gs || !(0, exports.hasGradientRangesConfigured)(gs)) {
|
|
@@ -98,11 +84,6 @@ const getZeroCentredPreviewColors = (gradientStyle) => {
|
|
|
98
84
|
}
|
|
99
85
|
return null;
|
|
100
86
|
};
|
|
101
|
-
/**
|
|
102
|
-
* Zero-centred preview uses a fixed -20…20 illustrative scale so negative
|
|
103
|
-
* colours always appear — independent of whether the column currently has
|
|
104
|
-
* negative values (Col-Min may be above zero today).
|
|
105
|
-
*/
|
|
106
87
|
const getZeroCentredGradientPreviewCellStyle = (cellValue, gradientStyle) => {
|
|
107
88
|
const colors = getZeroCentredPreviewColors(gradientStyle);
|
|
108
89
|
if (!colors) {
|
|
@@ -159,9 +140,6 @@ const getZeroCentredGradientPreviewCellStyle = (cellValue, gradientStyle) => {
|
|
|
159
140
|
}
|
|
160
141
|
return style;
|
|
161
142
|
};
|
|
162
|
-
/**
|
|
163
|
-
* Cell CSS for gradient preview — mirrors `AgGridColumnAdapter.getStyledColumnStyle` gradient path.
|
|
164
|
-
*/
|
|
165
143
|
const getGradientPreviewCellStyle = (cellValue, styledColumn, api, rowNode) => {
|
|
166
144
|
const gradientStyle = styledColumn.GradientStyle;
|
|
167
145
|
if (!gradientStyle || !(0, exports.hasGradientRangesConfigured)(gradientStyle)) {
|
|
@@ -227,10 +205,6 @@ const getGradientPreviewCellStyle = (cellValue, styledColumn, api, rowNode) => {
|
|
|
227
205
|
return style;
|
|
228
206
|
};
|
|
229
207
|
exports.getGradientPreviewCellStyle = getGradientPreviewCellStyle;
|
|
230
|
-
/**
|
|
231
|
-
* Effective cell ranges for gradient rendering / range lookup.
|
|
232
|
-
* When `ZeroCentred` is set, expands to the canonical Col-Min…0 and 0…Col-Max bands.
|
|
233
|
-
*/
|
|
234
208
|
function expandGradientCellRanges(gs) {
|
|
235
209
|
if (gs.ZeroCentred) {
|
|
236
210
|
return [
|
|
@@ -240,21 +214,9 @@ function expandGradientCellRanges(gs) {
|
|
|
240
214
|
}
|
|
241
215
|
return gs.CellRanges;
|
|
242
216
|
}
|
|
243
|
-
/**
|
|
244
|
-
* Value type passed to `findRangeForColumn` / `getCellColorRangeMinValue` /
|
|
245
|
-
* `getCellColorRangeMaxValue` when resolving which gradient band a cell falls in.
|
|
246
|
-
*
|
|
247
|
-
* Zero-centred bands use numeric `0` as an **absolute** zero crossing between
|
|
248
|
-
* `Col-Min…0` and `0…Col-Max`. Under `RangeValueType: 'Percentage'`, numeric
|
|
249
|
-
* endpoints are interpreted as % positions along the column min–max span, so
|
|
250
|
-
* literal `0` wrongly becomes `Col-Min` and the negative band collapses to a
|
|
251
|
-
* single point — boundary cells (e.g. the column minimum) pick up the negative
|
|
252
|
-
* colour incorrectly. Zero-centred lookup must always use Number semantics.
|
|
253
|
-
*/
|
|
254
217
|
function gradientStyleRangeLookupValueType(gs) {
|
|
255
218
|
return gs.ZeroCentred ? 'Number' : gs.RangeValueType ?? 'Number';
|
|
256
219
|
}
|
|
257
|
-
/** The negative half of a zero-centred gradient (darker toward Col-Min). */
|
|
258
220
|
function isNegativeZeroCentredBand(range) {
|
|
259
221
|
return range.Min === 'Col-Min' && range.Max === 0;
|
|
260
222
|
}
|
|
@@ -2,10 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ICON_STYLE_PRESET_DESCRIPTIONS = exports.ICON_STYLE_PRESET_LABELS = exports.getIconStylePresetMappings = exports.ICON_STYLE_PRESETS = void 0;
|
|
4
4
|
exports.isUnsupportedColumnDataTypeForIconStyle = isUnsupportedColumnDataTypeForIconStyle;
|
|
5
|
-
/**
|
|
6
|
-
* Icon Column Style resolves one key → glyph per scalar cell value; AdapTable
|
|
7
|
-
* array column types are not supported (use Badge Style for per-element visuals).
|
|
8
|
-
*/
|
|
9
5
|
function isUnsupportedColumnDataTypeForIconStyle(dataType) {
|
|
10
6
|
switch (dataType) {
|
|
11
7
|
case 'textArray':
|
|
@@ -17,28 +13,10 @@ function isUnsupportedColumnDataTypeForIconStyle(dataType) {
|
|
|
17
13
|
return false;
|
|
18
14
|
}
|
|
19
15
|
}
|
|
20
|
-
/**
|
|
21
|
-
* Built-in {@link IconStyle} mapping presets.
|
|
22
|
-
*
|
|
23
|
-
* The wizard's "Apply preset" action seeds `IconStyle.Mappings` from one
|
|
24
|
-
* of these. Once seeded the data is just normal mappings — users can add
|
|
25
|
-
* / edit / remove rows freely.
|
|
26
|
-
*
|
|
27
|
-
* Implementation notes:
|
|
28
|
-
* - All icons here are emoji strings, so the presets cost nothing at
|
|
29
|
-
* bundle / asset level. On Windows some flag emojis fall back to
|
|
30
|
-
* regional-indicator letter pairs (e.g. "🇺🇸" → "US"), which is still
|
|
31
|
-
* a sensible visual; users who want a consistent SVG flag pack across
|
|
32
|
-
* platforms can swap individual mappings to URL icons.
|
|
33
|
-
* - Presets are deliberately *small* — the most common values for each
|
|
34
|
-
* domain. Users add the long tail by editing the mappings list.
|
|
35
|
-
*/
|
|
36
16
|
const flagEmoji = (countryCodeAlpha2) => {
|
|
37
17
|
const cc = countryCodeAlpha2.toUpperCase();
|
|
38
18
|
if (cc.length !== 2)
|
|
39
19
|
return cc;
|
|
40
|
-
// Convert ISO-3166 alpha-2 → regional indicator pair (each letter +
|
|
41
|
-
// 0x1F1A5). Browsers render this pair as the country flag.
|
|
42
20
|
const a = 0x1f1a5;
|
|
43
21
|
return String.fromCodePoint(a + cc.charCodeAt(0), a + cc.charCodeAt(1));
|
|
44
22
|
};
|
|
@@ -58,8 +36,6 @@ const FLAG_PRESET = [
|
|
|
58
36
|
{ Key: 'NL', Icon: flagEmoji('NL'), Description: 'Netherlands' },
|
|
59
37
|
{ Key: 'PT', Icon: flagEmoji('PT'), Description: 'Portugal' },
|
|
60
38
|
{ Key: 'US', Icon: flagEmoji('US'), Description: 'United States' },
|
|
61
|
-
// Friendly synonyms so the preset works against full country names too
|
|
62
|
-
// (`MatchMode: 'CaseInsensitive'` is a sensible default for this preset).
|
|
63
39
|
{ Key: 'Australia', Icon: flagEmoji('AU'), Description: 'Australia' },
|
|
64
40
|
{ Key: 'Belgium', Icon: flagEmoji('BE'), Description: 'Belgium' },
|
|
65
41
|
{ Key: 'Canada', Icon: flagEmoji('CA'), Description: 'Canada' },
|
|
@@ -72,23 +48,11 @@ const FLAG_PRESET = [
|
|
|
72
48
|
{ Key: 'United Kingdom', Icon: flagEmoji('GB'), Description: 'United Kingdom' },
|
|
73
49
|
{ Key: 'United States', Icon: flagEmoji('US'), Description: 'United States' },
|
|
74
50
|
];
|
|
75
|
-
// Currency → issuing country flag. Currency *symbols* (`$`, `¥`) are NOT
|
|
76
|
-
// unique across currencies (USD/AUD/CAD/NZD all share `$`; CNY/JPY both use
|
|
77
|
-
// `¥`), so an icon column built from symbols ends up visually ambiguous —
|
|
78
|
-
// defeating the whole point of an icon column. Flags map 1-to-1 with the
|
|
79
|
-
// issuing economy, give every currency a distinct glyph, and read instantly
|
|
80
|
-
// in financial UIs (which is where this preset is most commonly used).
|
|
81
|
-
//
|
|
82
|
-
// Pair with `Description` ("US Dollar", "Euro") so tooltips / companion
|
|
83
|
-
// text still surface the human-readable name. Anyone who prefers symbols
|
|
84
|
-
// can still build that mapping by hand in the wizard.
|
|
85
51
|
const CURRENCY_PRESET = [
|
|
86
52
|
{ Key: 'AUD', Icon: flagEmoji('AU'), Description: 'Australian Dollar' },
|
|
87
53
|
{ Key: 'CAD', Icon: flagEmoji('CA'), Description: 'Canadian Dollar' },
|
|
88
54
|
{ Key: 'CHF', Icon: flagEmoji('CH'), Description: 'Swiss Franc' },
|
|
89
55
|
{ Key: 'CNY', Icon: flagEmoji('CN'), Description: 'Chinese Yuan' },
|
|
90
|
-
// 'EU' as a regional indicator pair renders as the EU flag in modern
|
|
91
|
-
// emoji fonts; falls back to the letters "EU" otherwise — still readable.
|
|
92
56
|
{ Key: 'EUR', Icon: flagEmoji('EU'), Description: 'Euro' },
|
|
93
57
|
{ Key: 'GBP', Icon: flagEmoji('GB'), Description: 'British Pound' },
|
|
94
58
|
{ Key: 'HKD', Icon: flagEmoji('HK'), Description: 'Hong Kong Dollar' },
|
|
@@ -109,7 +73,6 @@ const TREND_PRESET = [
|
|
|
109
73
|
{ Key: 'Up', Icon: '⬆', Description: 'Up' },
|
|
110
74
|
{ Key: 'Down', Icon: '⬇', Description: 'Down' },
|
|
111
75
|
{ Key: 'Flat', Icon: '➡', Description: 'Flat' },
|
|
112
|
-
// Trading-side synonyms so the same preset works against Buy/Sell columns.
|
|
113
76
|
{ Key: 'Buy', Icon: '⬆', Description: 'Buy' },
|
|
114
77
|
{ Key: 'Sell', Icon: '⬇', Description: 'Sell' },
|
|
115
78
|
{ Key: 'Hold', Icon: '➡', Description: 'Hold' },
|
|
@@ -120,7 +83,6 @@ const STATUS_PRESET = [
|
|
|
120
83
|
{ Key: 'Pass', Icon: '🟢', Description: 'Pass' },
|
|
121
84
|
{ Key: 'Warn', Icon: '🟡', Description: 'Warn' },
|
|
122
85
|
{ Key: 'Fail', Icon: '🔴', Description: 'Fail' },
|
|
123
|
-
// Status-column synonyms (cover the `status` column in the trade demo).
|
|
124
86
|
{ Key: 'Completed', Icon: '🟢', Description: 'Completed' },
|
|
125
87
|
{ Key: 'In Progress', Icon: '🟡', Description: 'In Progress' },
|
|
126
88
|
{ Key: 'Pending', Icon: '🟡', Description: 'Pending' },
|
|
@@ -133,7 +95,6 @@ exports.ICON_STYLE_PRESETS = {
|
|
|
133
95
|
Trend: TREND_PRESET,
|
|
134
96
|
Status: STATUS_PRESET,
|
|
135
97
|
};
|
|
136
|
-
/** Returns a fresh copy of the mappings for a given preset. */
|
|
137
98
|
const getIconStylePresetMappings = (preset) => {
|
|
138
99
|
return exports.ICON_STYLE_PRESETS[preset].map((m) => ({ ...m }));
|
|
139
100
|
};
|
|
@@ -68,7 +68,6 @@ const getPreviewBarColor = (value, pb, scaleMin, scaleMax) => {
|
|
|
68
68
|
};
|
|
69
69
|
const hasPercentBarRangesConfigured = (pb) => !!(pb?.CellRanges?.length || pb?.ColumnComparison);
|
|
70
70
|
exports.hasPercentBarRangesConfigured = hasPercentBarRangesConfigured;
|
|
71
|
-
/** Illustrative scale for preview — shows negatives when origin is Auto or Zero. */
|
|
72
71
|
const getPercentBarPreviewScale = (pb) => {
|
|
73
72
|
const origin = pb.Origin ?? 'Auto';
|
|
74
73
|
if (origin === 'Zero' || origin === 'Auto') {
|
|
@@ -22,11 +22,6 @@ const resolveHighlightStyle = (style) => {
|
|
|
22
22
|
}
|
|
23
23
|
return resolved;
|
|
24
24
|
};
|
|
25
|
-
/**
|
|
26
|
-
* AG Charts sparklines do not resolve Adaptable `var(--ab-color-*)` tokens.
|
|
27
|
-
* Resolve palette / theme CSS variables to concrete colours at render time so
|
|
28
|
-
* wizard previews and grid cells match the chosen Fill / Stroke values.
|
|
29
|
-
*/
|
|
30
25
|
function resolveSparklineOptionsForRender(options) {
|
|
31
26
|
const resolved = { ...options };
|
|
32
27
|
if ('fill' in options && options.fill != null) {
|
|
@@ -25,11 +25,6 @@ const getStyledColumnRowKindDisabledReason = (styledColumn, kind) => {
|
|
|
25
25
|
return undefined;
|
|
26
26
|
};
|
|
27
27
|
exports.getStyledColumnRowKindDisabledReason = getStyledColumnRowKindDisabledReason;
|
|
28
|
-
/**
|
|
29
|
-
* Classifies the AG Grid row node into a single {@link StyledColumnRowKind}.
|
|
30
|
-
* Order matches {@link shouldRenderStyledColumnOnRow}: total before summary,
|
|
31
|
-
* summary before group.
|
|
32
|
-
*/
|
|
33
28
|
const getStyledColumnRowKindForNode = (node, api) => {
|
|
34
29
|
if (api.gridApi.isGrandTotalRowNode(node)) {
|
|
35
30
|
return 'Total';
|
|
@@ -43,11 +38,6 @@ const getStyledColumnRowKindForNode = (node, api) => {
|
|
|
43
38
|
return 'Data';
|
|
44
39
|
};
|
|
45
40
|
exports.getStyledColumnRowKindForNode = getStyledColumnRowKindForNode;
|
|
46
|
-
/**
|
|
47
|
-
* Forces `Exclude*` to `true` for row kinds that do not apply to the current
|
|
48
|
-
* Styled Column type, so persisted state cannot contradict the capability
|
|
49
|
-
* matrix. Returns `undefined` when no change is needed.
|
|
50
|
-
*/
|
|
51
41
|
const sanitizeStyledColumnRowScope = (styledColumn) => {
|
|
52
42
|
const scope = styledColumn.RowScope;
|
|
53
43
|
if (!scope) {
|
|
@@ -68,32 +58,6 @@ const sanitizeStyledColumnRowScope = (styledColumn) => {
|
|
|
68
58
|
return changed ? next : undefined;
|
|
69
59
|
};
|
|
70
60
|
exports.sanitizeStyledColumnRowScope = sanitizeStyledColumnRowScope;
|
|
71
|
-
/**
|
|
72
|
-
* Returns `true` when the Styled Column should render on the given row.
|
|
73
|
-
*
|
|
74
|
-
* Single source of truth consulted by every styled-column cell renderer
|
|
75
|
-
* (Badge / Icon / Rating / Percent Bar / Bullet Chart / Range Bar) and
|
|
76
|
-
* by `getStyledColumnStyle` (Gradient / Percent Bar cellStyle).
|
|
77
|
-
*
|
|
78
|
-
* Semantics:
|
|
79
|
-
* - **Type capabilities** first: some types never target certain row kinds
|
|
80
|
-
* (see {@link isStyledColumnRowKindSupported}). Unsupported kinds always
|
|
81
|
-
* return `false` regardless of `RowScope`.
|
|
82
|
-
* - When `StyledColumn.RowScope` is **set**, the explicit `Exclude*`
|
|
83
|
-
* flags win. Unset flags default to "include" — i.e. `RowScope: {}`
|
|
84
|
-
* means "render on every *supported* row kind".
|
|
85
|
-
* - When `StyledColumn.RowScope` is **unset**, the historical per-type
|
|
86
|
-
* default applies:
|
|
87
|
-
* - Badge: render on every row kind (that the type supports).
|
|
88
|
-
* - All other types: render on every row kind *except* group rows
|
|
89
|
-
* (matches the hardcoded "isGroupRowNode → plain text" check that
|
|
90
|
-
* every other styled-column renderer used to carry), again
|
|
91
|
-
* intersected with type capabilities (e.g. Sparkline → data only).
|
|
92
|
-
*
|
|
93
|
-
* The per-type default lets us promote `RowScope` cleanly without
|
|
94
|
-
* altering existing user-visible behaviour: state that doesn't mention
|
|
95
|
-
* `RowScope` keeps rendering exactly as before.
|
|
96
|
-
*/
|
|
97
61
|
const shouldRenderStyledColumnOnRow = (styledColumn, node, api) => {
|
|
98
62
|
const rowKind = (0, exports.getStyledColumnRowKindForNode)(node, api);
|
|
99
63
|
if (!(0, exports.isStyledColumnRowKindSupported)(styledColumn, rowKind)) {
|
|
@@ -115,7 +79,6 @@ const shouldRenderStyledColumnOnRow = (styledColumn, node, api) => {
|
|
|
115
79
|
return false;
|
|
116
80
|
return true;
|
|
117
81
|
}
|
|
118
|
-
// No explicit RowScope → fall back to historical per-type behaviour.
|
|
119
82
|
if (styledColumn.BadgeStyle) {
|
|
120
83
|
return true;
|
|
121
84
|
}
|
|
@@ -1,14 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Timing helpers for delaying / rate-limiting function calls.
|
|
4
|
-
*
|
|
5
|
-
* `debounce` and `throttle` are drop-in replacements for the equivalent
|
|
6
|
-
* lodash exports (`debounce` supports `{ leading, trailing, maxWait }`,
|
|
7
|
-
* `throttle` supports `{ leading, trailing }`).
|
|
8
|
-
*
|
|
9
|
-
* Both return an instance of `DebouncedFunction<T>` which exposes
|
|
10
|
-
* `cancel()` and `flush()` for managing pending invocations.
|
|
11
|
-
*/
|
|
12
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
3
|
exports.TimingHelper = void 0;
|
|
14
4
|
exports.debounce = debounce;
|
|
@@ -123,9 +113,6 @@ function debounce(func, wait = 0, options) {
|
|
|
123
113
|
};
|
|
124
114
|
return debounced;
|
|
125
115
|
}
|
|
126
|
-
/**
|
|
127
|
-
* Implemented in terms of `debounce` with `maxWait` (same approach as lodash).
|
|
128
|
-
*/
|
|
129
116
|
function throttle(func, wait = 0, options) {
|
|
130
117
|
return debounce(func, wait, {
|
|
131
118
|
leading: options?.leading ?? true,
|
|
@@ -61,7 +61,6 @@ function CreateEmptyCalculatedColumn(defaultSpecialColumnSettings) {
|
|
|
61
61
|
Query: {
|
|
62
62
|
ScalarExpression: GeneralConstants_1.EMPTY_STRING,
|
|
63
63
|
},
|
|
64
|
-
// need to create some defaults - which we will change later
|
|
65
64
|
CalculatedColumnSettings: {
|
|
66
65
|
...defaultSpecialColumnSettings,
|
|
67
66
|
DataType: undefined,
|
|
@@ -302,8 +301,8 @@ function CreateDefaultStyledColumnBadge() {
|
|
|
302
301
|
return {
|
|
303
302
|
Shape: 'Rounded',
|
|
304
303
|
PillStyle: {
|
|
305
|
-
BackColor: (0, UIHelper_1.getSwatchColorVar)(3),
|
|
306
|
-
ForeColor: (0, UIHelper_1.getSwatchColorVar)(1),
|
|
304
|
+
BackColor: (0, UIHelper_1.getSwatchColorVar)(3),
|
|
305
|
+
ForeColor: (0, UIHelper_1.getSwatchColorVar)(1),
|
|
307
306
|
},
|
|
308
307
|
};
|
|
309
308
|
}
|
|
@@ -377,7 +376,6 @@ function CreateToastOptions(notificationsOptions, { onClose, containerId }, over
|
|
|
377
376
|
transition: transition,
|
|
378
377
|
draggablePercent: 75,
|
|
379
378
|
onClose,
|
|
380
|
-
// progress: undefined,
|
|
381
379
|
};
|
|
382
380
|
return toastProps;
|
|
383
381
|
}
|
|
@@ -32,7 +32,6 @@ class AggregatedScalarLiveValue {
|
|
|
32
32
|
.getQueryLanguageService()
|
|
33
33
|
.evaluateAggregatedScalarExpression(source.aggregatedScalarExpression, requestingModule, getRowNodes).value
|
|
34
34
|
: source.aggregatedScalarExpressionEvaluation;
|
|
35
|
-
// currently we support only one reducer
|
|
36
35
|
this.aggregationReducerName = Object.keys(this.expressionEvaluation.aggregationParams.reducers)[0];
|
|
37
36
|
this.aggregationResult = this.computeAggregatedValue(this.expressionEvaluation);
|
|
38
37
|
}
|
|
@@ -42,7 +41,6 @@ class AggregatedScalarLiveValue {
|
|
|
42
41
|
.getQueryLanguageService()
|
|
43
42
|
.evaluateAggregatedScalarExpression(this.aggregatedScalarExpression, this.requestingModule, this.getRowNodes).value;
|
|
44
43
|
}
|
|
45
|
-
// currently we support only one reducer
|
|
46
44
|
this.aggregationReducerName = Object.keys(this.expressionEvaluation.aggregationParams.reducers)[0];
|
|
47
45
|
this.aggregationResult = this.computeAggregatedValue(this.expressionEvaluation);
|
|
48
46
|
}
|
|
@@ -79,7 +77,6 @@ class AggregatedScalarLiveValue {
|
|
|
79
77
|
}
|
|
80
78
|
getRowNodeValueForColumnId(rowNode, columnId) {
|
|
81
79
|
const rawValue = this.adaptableApi.gridApi.getRawValueFromRowNode(rowNode, columnId);
|
|
82
|
-
// we need to convert the Date object to a number, otherwise the grouping will not work (each Date instance is unique)
|
|
83
80
|
return rawValue instanceof Date ? rawValue.getTime() : rawValue;
|
|
84
81
|
}
|
|
85
82
|
computeAggregatedValue(expressionEvaluation) {
|
|
@@ -88,14 +85,11 @@ class AggregatedScalarLiveValue {
|
|
|
88
85
|
: this.adaptableApi.gridApi.getAllRowNodes({
|
|
89
86
|
filterFn: expressionEvaluation.rowFilterFn,
|
|
90
87
|
});
|
|
91
|
-
// we iterate over the RowNode list (we need this to handle complex column values (nested values, valueGetters etc)
|
|
92
|
-
// so we will map the fieldNames to RowNode.data
|
|
93
88
|
const mapReducerValueGetter = (columnId) => {
|
|
94
89
|
return (rowNode) => this.getRowNodeValueForColumnId(rowNode, columnId);
|
|
95
90
|
};
|
|
96
91
|
Object.values(expressionEvaluation.aggregationParams.reducers).forEach((aggregationReducer) => {
|
|
97
92
|
aggregationReducer.getter = mapReducerValueGetter(aggregationReducer.field);
|
|
98
|
-
// nullify the field to force the fallback on the getter fn
|
|
99
93
|
aggregationReducer.field = null;
|
|
100
94
|
});
|
|
101
95
|
const mapGroupByToKey = (columnId) => {
|
|
@@ -107,7 +101,6 @@ class AggregatedScalarLiveValue {
|
|
|
107
101
|
let aggregatedRowNodes = gridRowNodes;
|
|
108
102
|
if (expressionEvaluation.sortByColumn) {
|
|
109
103
|
const sortByColumn = expressionEvaluation.sortByColumn;
|
|
110
|
-
// currently, we support only ascending sorting
|
|
111
104
|
aggregatedRowNodes.sort((first, second) => {
|
|
112
105
|
const firstValue = this.getRowNodeValueForColumnId(first, sortByColumn);
|
|
113
106
|
const secondValue = this.getRowNodeValueForColumnId(second, sortByColumn);
|