@adaptabletools/adaptable-cjs 23.0.0-canary.7 → 23.0.0-canary.9
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/index.css +98 -17
- package/package.json +1 -1
- package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.js +2 -3
- package/src/AdaptableState/Common/Enums.d.ts +0 -12
- package/src/AdaptableState/Common/Enums.js +1 -16
- package/src/{Utilities → AdaptableState/Common}/MenuItem.d.ts +4 -4
- package/src/{Utilities → AdaptableState/Common}/MenuItem.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/BulletChartStyle.js +2 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.d.ts +84 -0
- package/src/AdaptableState/StyledColumns/Common/BarStyleProperties.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/AlertApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +5 -5
- package/src/Api/Implementation/ColumnScopeApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.js +1 -1
- package/src/Api/Implementation/LayoutHelpers.js +2 -3
- package/src/Api/Implementation/QuickSearchApiImpl.js +4 -4
- package/src/Api/Implementation/ThemeApiImpl.js +2 -2
- package/src/Api/Internal/ActionColumnInternalApi.js +2 -2
- package/src/Api/Internal/AlertInternalApi.js +1 -1
- package/src/Api/Internal/ChartingInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +2 -2
- package/src/Api/Internal/EventInternalApi.js +3 -4
- package/src/Api/Internal/ExportInternalApi.js +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +4 -4
- package/src/Api/Internal/GridInternalApi.js +1 -1
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +3 -1
- package/src/Api/Internal/StyledColumnInternalApi.js +6 -6
- package/src/Redux/ActionsReducers/ExportRedux.js +1 -1
- package/src/Redux/ActionsReducers/InternalRedux.js +1 -1
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +2 -3
- package/src/Redux/Store/AdaptableReduxMerger.js +7 -9
- package/src/Redux/Store/AdaptableStore.js +5 -5
- package/src/Strategy/AdaptableModuleBase.d.ts +1 -1
- package/src/Strategy/AdaptableModuleBase.js +1 -1
- package/src/Strategy/AlertModule.d.ts +1 -1
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/BulkUpdateModule.d.ts +1 -1
- package/src/Strategy/CalculatedColumnModule.d.ts +2 -2
- package/src/Strategy/CellSummaryModule.d.ts +2 -2
- package/src/Strategy/ChartingModule.d.ts +1 -1
- package/src/Strategy/ChartingModule.js +4 -4
- package/src/Strategy/ColumnInfoModule.d.ts +2 -2
- package/src/Strategy/CommentModule.d.ts +1 -1
- package/src/Strategy/CustomSortModule.d.ts +1 -1
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FreeTextColumnModule.d.ts +1 -1
- package/src/Strategy/GridInfoModule.d.ts +2 -2
- package/src/Strategy/LayoutModule.js +2 -2
- package/src/Strategy/NoteModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.d.ts +1 -1
- package/src/Strategy/PlusMinusModule.js +8 -8
- package/src/Strategy/SettingsPanelModule.d.ts +2 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SystemStatusModule.d.ts +2 -2
- package/src/Strategy/TeamSharingModule.js +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +2 -3
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +2 -2
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -3
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +32 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +54 -1
- package/src/Utilities/Extensions/NumberExtensions.d.ts +21 -0
- package/src/Utilities/Extensions/NumberExtensions.js +78 -0
- package/src/Utilities/Extensions/ObjectExtensions.d.ts +44 -0
- package/src/Utilities/Extensions/ObjectExtensions.js +277 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +26 -0
- package/src/Utilities/Extensions/StringExtensions.js +49 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +7 -7
- package/src/Utilities/Helpers/{alertFormHelper.js → AlertHelper.js} +1 -1
- package/src/Utilities/Helpers/DateHelper.js +2 -2
- package/src/Utilities/Helpers/{FormatHelper.js → DisplayFormatHelper.js} +5 -5
- package/src/Utilities/Helpers/Helper.d.ts +0 -6
- package/src/Utilities/Helpers/Helper.js +0 -38
- package/src/Utilities/Helpers/{QuickSearchStyleHelper.js → QuickSearchHelper.js} +2 -3
- package/src/Utilities/Helpers/{ScheduleHelper.d.ts → Scheduling/ScheduleHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleHelper.js → Scheduling/ScheduleHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobManager.d.ts → Scheduling/ScheduleJobManager.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduleJobRunner.d.ts → Scheduling/ScheduleJobRunner.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.d.ts → Scheduling/ScheduledAlertHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledAlertHelper.js → Scheduling/ScheduledAlertHelper.js} +4 -4
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.d.ts → Scheduling/ScheduledJobsMiddlewareHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledJobsMiddlewareHelper.js → Scheduling/ScheduledJobsMiddlewareHelper.js} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.d.ts → Scheduling/ScheduledReportHelper.d.ts} +1 -1
- package/src/Utilities/Helpers/{ScheduledReportHelper.js → Scheduling/ScheduledReportHelper.js} +1 -1
- package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +5 -0
- package/src/Utilities/{Defaults/DefaultSettingsPanel.js → Helpers/SettingsPanelHelper.js} +16 -1
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.d.ts +63 -0
- package/src/Utilities/Helpers/StyledColumns/BarStylesHelper.js +334 -0
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.d.ts → StyledColumns/GradientStyleHelper.d.ts} +4 -2
- package/src/Utilities/Helpers/{StyledColumnGradientHelper.js → StyledColumns/GradientStyleHelper.js} +9 -9
- package/src/Utilities/Helpers/{IconStylePresets.d.ts → StyledColumns/IconStyleHelper.d.ts} +6 -1
- package/src/Utilities/Helpers/{IconStylePresets.js → StyledColumns/IconStyleHelper.js} +16 -0
- package/src/Utilities/Helpers/{percentBarPreviewHelper.d.ts → StyledColumns/PercentBarStyleHelper.d.ts} +2 -1
- package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js} +11 -17
- package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js} +1 -1
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.d.ts +52 -0
- package/src/Utilities/Helpers/StyledColumns/StyledColumnHelper.js +124 -0
- package/src/Utilities/Helpers/TimingHelper.d.ts +34 -0
- package/src/Utilities/{utils/debounce.js → Helpers/TimingHelper.js} +25 -9
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +2 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +118 -2
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/RowSummaryService.d.ts +1 -1
- package/src/Utilities/Services/RowSummaryService.js +6 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/Alert/Utilities/getAlertType.js +1 -1
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.js +1 -1
- package/src/View/Alert/Utilities/mapAlertDefinition.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +159 -126
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +4 -4
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScheduledWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +10 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/Charting/ChartingWizard/AgChargingWizard/PreviewChartSection.js +2 -2
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Comments/CommentsEditor.js +2 -2
- package/src/View/Comments/CommentsPopup.js +2 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +3 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +3 -2
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.d.ts +2 -0
- package/src/View/Components/AdaptableObjectList/objectListActionButtonStyles.js +6 -0
- package/src/View/Components/Buttons/EntityListActionButtons.js +1 -1
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -0
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.js +8 -8
- package/src/View/Components/ColumnFilter/ColumnFilter.js +14 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +2 -2
- package/src/View/Components/ColumnFilter/components/ColumnFilterInputList.js +2 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterInputList.js +2 -2
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +2 -2
- package/src/View/Components/Popups/Utilities.js +5 -5
- package/src/View/Components/RangesComponent.d.ts +4 -3
- package/src/View/Components/RangesComponent.js +5 -9
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -3
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -3
- package/src/View/Dashboard/CustomDashboardButton.js +2 -3
- package/src/View/Dashboard/Dashboard.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryPopup.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryTable.js +2 -2
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -2
- package/src/View/DataImport/DataImportWizard/sections/DataPreview.js +2 -2
- package/src/View/Export/ExportSchedulesTab.js +3 -4
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +13 -13
- package/src/View/FormatColumn/Wizard/FormatColumnPreview.js +4 -4
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +2 -2
- package/src/View/Layout/LayoutViewPanel.js +2 -2
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +128 -102
- package/src/View/Note/NoteEditor.js +2 -2
- package/src/View/Note/NotePopup.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +7 -7
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -4
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -3
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +2 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +36 -30
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +1 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +79 -68
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +8 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +42 -15
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +92 -52
- package/src/View/StyledColumn/Wizard/StyledColumnWizardScopeSection.js +14 -14
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.d.ts +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextLayoutEditor.js +37 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.d.ts +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/BarStyleCellTextPreview.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 +3 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/GradientSummaryPreview.js +7 -9
- 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/StyledColumnGradientPreview.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnIconPreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnPercentBarPreview.js +24 -15
- 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/Components/StyledColumnSparklinePreview.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +20 -60
- package/src/View/UIHelper.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.js +2 -2
- package/src/View/Wizard/OnePageWizards.js +3 -1
- package/src/agGrid/AdaptableAgGrid.js +11 -11
- package/src/agGrid/AgGridColumnAdapter.js +30 -28
- package/src/agGrid/AgGridExportAdapter.js +3 -3
- package/src/agGrid/AgGridMenuAdapter.js +129 -4
- package/src/agGrid/cellRenderers/BadgeRenderer.js +9 -7
- package/src/agGrid/cellRenderers/BulletChartRenderer.js +47 -46
- package/src/agGrid/cellRenderers/IconRenderer.d.ts +2 -1
- package/src/agGrid/cellRenderers/IconRenderer.js +20 -19
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +29 -101
- package/src/agGrid/cellRenderers/RangeBarRenderer.js +54 -52
- package/src/agGrid/cellRenderers/RatingRenderer.js +6 -6
- package/src/agGrid/editors/AdaptableDateEditor/index.js +3 -3
- package/src/components/ColorPicker/ColorPicker.js +2 -2
- package/src/components/Datepicker/index.js +2 -2
- package/src/components/FormLayout/index.js +2 -2
- package/src/components/OverlayTrigger/index.js +2 -2
- package/src/env.js +2 -2
- package/src/layout-manager/src/isLayoutEqual.js +4 -5
- package/src/metamodel/adaptable.metamodel.d.ts +118 -19
- 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 +12 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +0 -3
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.d.ts +0 -5
- package/src/Utilities/Helpers/iconStyledColumnColumnSupport.js +0 -18
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.d.ts +0 -3
- package/src/Utilities/Helpers/resolveSettingsPanelNavigation.js +0 -19
- package/src/Utilities/Helpers/styledColumnRowKindSupport.d.ts +0 -25
- package/src/Utilities/Helpers/styledColumnRowKindSupport.js +0 -70
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.d.ts +0 -4
- package/src/Utilities/Services/CalculatedColumnSyntheticChange.js +0 -120
- package/src/Utilities/utils/chunk.d.ts +0 -6
- package/src/Utilities/utils/chunk.js +0 -20
- package/src/Utilities/utils/clamp.d.ts +0 -5
- package/src/Utilities/utils/clamp.js +0 -10
- package/src/Utilities/utils/cloneDeepWith.d.ts +0 -9
- package/src/Utilities/utils/cloneDeepWith.js +0 -70
- package/src/Utilities/utils/debounce.d.ts +0 -20
- package/src/Utilities/utils/flatten.d.ts +0 -5
- package/src/Utilities/utils/flatten.js +0 -10
- package/src/Utilities/utils/flattenDeep.d.ts +0 -5
- package/src/Utilities/utils/flattenDeep.js +0 -10
- package/src/Utilities/utils/get.d.ts +0 -6
- package/src/Utilities/utils/get.js +0 -38
- package/src/Utilities/utils/index.d.ts +0 -22
- package/src/Utilities/utils/index.js +0 -48
- package/src/Utilities/utils/isArray.d.ts +0 -6
- package/src/Utilities/utils/isArray.js +0 -8
- package/src/Utilities/utils/isEqual.d.ts +0 -5
- package/src/Utilities/utils/isEqual.js +0 -127
- package/src/Utilities/utils/isObject.d.ts +0 -6
- package/src/Utilities/utils/isObject.js +0 -12
- package/src/Utilities/utils/isPlainObject.d.ts +0 -6
- package/src/Utilities/utils/isPlainObject.js +0 -20
- package/src/Utilities/utils/kebabCase.d.ts +0 -5
- package/src/Utilities/utils/kebabCase.js +0 -12
- package/src/Utilities/utils/merge.d.ts +0 -11
- package/src/Utilities/utils/merge.js +0 -44
- package/src/Utilities/utils/mergeWith.d.ts +0 -7
- package/src/Utilities/utils/mergeWith.js +0 -50
- package/src/Utilities/utils/orderBy.d.ts +0 -8
- package/src/Utilities/utils/orderBy.js +0 -33
- package/src/Utilities/utils/parseInt.d.ts +0 -6
- package/src/Utilities/utils/parseInt.js +0 -12
- package/src/Utilities/utils/sentenceCase.d.ts +0 -6
- package/src/Utilities/utils/sentenceCase.js +0 -19
- package/src/Utilities/utils/startCase.d.ts +0 -5
- package/src/Utilities/utils/startCase.js +0 -15
- package/src/Utilities/utils/throttle.d.ts +0 -17
- package/src/Utilities/utils/throttle.js +0 -23
- package/src/Utilities/utils/toNumber.d.ts +0 -5
- package/src/Utilities/utils/toNumber.js +0 -42
- package/src/Utilities/utils/uniq.d.ts +0 -7
- package/src/Utilities/utils/uniq.js +0 -12
- package/src/Utilities/utils/uniqBy.d.ts +0 -8
- package/src/Utilities/utils/uniqBy.js +0 -25
- package/src/Utilities/utils/words.d.ts +0 -7
- package/src/Utilities/utils/words.js +0 -13
- package/src/agGrid/buildValueAggregationMenuItem.d.ts +0 -19
- package/src/agGrid/buildValueAggregationMenuItem.js +0 -114
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.d.ts +0 -30
- package/src/agGrid/cellRenderers/shouldRenderStyledColumnOnRow.js +0 -58
- package/src/agGrid/createAgGridIcon.d.ts +0 -10
- package/src/agGrid/createAgGridIcon.js +0 -19
- /package/src/{Utilities → AdaptableState/Aggregations}/only.d.ts +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/only.js +0 -0
- /package/src/{Utilities → AdaptableState/Aggregations}/weightedAverage.d.ts +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.d.ts → ActionColumnHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ActionColumnWidthHelper.js → ActionColumnHelper.js} +0 -0
- /package/src/Utilities/Helpers/{alertFormHelper.d.ts → AlertHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.d.ts → ChartHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{chartingHelper.js → ChartHelper.js} +0 -0
- /package/src/Utilities/Helpers/{FormatHelper.d.ts → DisplayFormatHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.d.ts → PlusMinusHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{plusMinusTriggerKeys.js → PlusMinusHelper.js} +0 -0
- /package/src/Utilities/Helpers/{QuickSearchStyleHelper.d.ts → QuickSearchHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobManager.js → Scheduling/ScheduleJobManager.js} +0 -0
- /package/src/Utilities/Helpers/{ScheduleJobRunner.js → Scheduling/ScheduleJobRunner.js} +0 -0
- /package/src/Utilities/Helpers/{SparklineOptionsHelper.d.ts → StyledColumns/SparklineStyleHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.d.ts → ThemeHelper.d.ts} +0 -0
- /package/src/Utilities/Helpers/{ThemeHelpers.js → ThemeHelper.js} +0 -0
package/src/Utilities/Helpers/{percentBarPreviewHelper.js → StyledColumns/PercentBarStyleHelper.js}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.hasPercentBarStylePreview = exports.getPercentBarPreviewResolvedBarColor = exports.getPercentBarPreviewTrackColor = exports.formatPercentBarPreviewCellText = exports.getPercentBarPreviewGeometry = exports.getPercentBarPreviewSampleValues = exports.getPercentBarPreviewScale = exports.hasPercentBarRangesConfigured = void 0;
|
|
4
|
-
const
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
const
|
|
4
|
+
const StyleHelper_1 = require("../StyleHelper");
|
|
5
|
+
const NumberExtensions_1 = require("../../Extensions/NumberExtensions");
|
|
6
|
+
const GradientStyleHelper_1 = require("./GradientStyleHelper");
|
|
7
|
+
const BarStylesHelper_1 = require("./BarStylesHelper");
|
|
8
8
|
const evenlySpacedValues = (min, max, count) => {
|
|
9
9
|
if (count <= 1) {
|
|
10
10
|
return [min];
|
|
@@ -16,7 +16,7 @@ const toFraction = (value, min, max) => {
|
|
|
16
16
|
if (max === min) {
|
|
17
17
|
return 0;
|
|
18
18
|
}
|
|
19
|
-
return (0,
|
|
19
|
+
return (0, NumberExtensions_1.clamp)((value - min) / (max - min), 0, 1);
|
|
20
20
|
};
|
|
21
21
|
const resolveOrigin = (percentBarStyle, cellValue, min, max) => {
|
|
22
22
|
const origin = percentBarStyle.Origin ?? 'Auto';
|
|
@@ -72,14 +72,14 @@ exports.hasPercentBarRangesConfigured = hasPercentBarRangesConfigured;
|
|
|
72
72
|
const getPercentBarPreviewScale = (pb) => {
|
|
73
73
|
const origin = pb.Origin ?? 'Auto';
|
|
74
74
|
if (origin === 'Zero' || origin === 'Auto') {
|
|
75
|
-
return { min:
|
|
75
|
+
return { min: GradientStyleHelper_1.ZERO_CENTRED_PREVIEW_SCALE_MIN, max: GradientStyleHelper_1.ZERO_CENTRED_PREVIEW_SCALE_MAX };
|
|
76
76
|
}
|
|
77
77
|
return { min: 0, max: 100 };
|
|
78
78
|
};
|
|
79
79
|
exports.getPercentBarPreviewScale = getPercentBarPreviewScale;
|
|
80
80
|
const getPercentBarPreviewSampleValues = (pb) => {
|
|
81
81
|
const { min, max } = (0, exports.getPercentBarPreviewScale)(pb);
|
|
82
|
-
return evenlySpacedValues(min, max,
|
|
82
|
+
return evenlySpacedValues(min, max, GradientStyleHelper_1.STYLED_COLUMN_PREVIEW_SAMPLE_COUNT);
|
|
83
83
|
};
|
|
84
84
|
exports.getPercentBarPreviewSampleValues = getPercentBarPreviewSampleValues;
|
|
85
85
|
const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
|
|
@@ -114,7 +114,7 @@ const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
|
|
|
114
114
|
barWidthPercent = 0;
|
|
115
115
|
}
|
|
116
116
|
else {
|
|
117
|
-
percentageValue = (((0,
|
|
117
|
+
percentageValue = (((0, NumberExtensions_1.clamp)(numericValue, min, max) - min) / (max - min)) * 100;
|
|
118
118
|
const origin = resolveOrigin(pb, numericValue, min, max);
|
|
119
119
|
const valueFrac = toFraction(numericValue, min, max);
|
|
120
120
|
const originFrac = toFraction(origin, min, max);
|
|
@@ -132,14 +132,8 @@ const getPercentBarPreviewGeometry = (numericValue, pb, min, max) => {
|
|
|
132
132
|
};
|
|
133
133
|
exports.getPercentBarPreviewGeometry = getPercentBarPreviewGeometry;
|
|
134
134
|
const formatPercentBarPreviewCellText = (numericValue, percentageValue, pb) => {
|
|
135
|
-
const
|
|
136
|
-
|
|
137
|
-
parts.push(Number.isInteger(numericValue) ? String(numericValue) : numericValue.toFixed(1));
|
|
138
|
-
}
|
|
139
|
-
if (pb.CellText?.includes('PercentageValue')) {
|
|
140
|
-
parts.push(`${percentageValue.toFixed(0)}%`);
|
|
141
|
-
}
|
|
142
|
-
return parts.join(' ');
|
|
135
|
+
const labels = (0, BarStylesHelper_1.buildBarStyleCellTextLabels)(pb.CellTextProperties, Number.isInteger(numericValue) ? String(numericValue) : numericValue.toFixed(1), `${percentageValue.toFixed(0)}%`);
|
|
136
|
+
return (0, BarStylesHelper_1.joinBarStyleCellTextLabels)(labels);
|
|
143
137
|
};
|
|
144
138
|
exports.formatPercentBarPreviewCellText = formatPercentBarPreviewCellText;
|
|
145
139
|
const getPercentBarPreviewTrackColor = (pb) => {
|
|
@@ -149,7 +143,7 @@ const getPercentBarPreviewTrackColor = (pb) => {
|
|
|
149
143
|
return pb.BackColor ?? undefined;
|
|
150
144
|
};
|
|
151
145
|
exports.getPercentBarPreviewTrackColor = getPercentBarPreviewTrackColor;
|
|
152
|
-
const getPercentBarPreviewResolvedBarColor = (color) => color ? (0, StyleHelper_1.getVariableColor)(color) : undefined;
|
|
146
|
+
const getPercentBarPreviewResolvedBarColor = (color) => (color ? (0, StyleHelper_1.getVariableColor)(color) : undefined);
|
|
153
147
|
exports.getPercentBarPreviewResolvedBarColor = getPercentBarPreviewResolvedBarColor;
|
|
154
148
|
const hasPercentBarStylePreview = (styledColumn) => (0, exports.hasPercentBarRangesConfigured)(styledColumn.PercentBarStyle);
|
|
155
149
|
exports.hasPercentBarStylePreview = hasPercentBarStylePreview;
|
package/src/Utilities/Helpers/{SparklineOptionsHelper.js → StyledColumns/SparklineStyleHelper.js}
RENAMED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.resolveSparklineOptionsForRender = resolveSparklineOptionsForRender;
|
|
4
|
-
const StyleHelper_1 = require("
|
|
4
|
+
const StyleHelper_1 = require("../StyleHelper");
|
|
5
5
|
const resolveCssColor = (color) => {
|
|
6
6
|
if (color == null || color === '') {
|
|
7
7
|
return color;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { IRowNode } from 'ag-grid-enterprise';
|
|
2
|
+
import type { AdaptableApi } from '../../../Api/AdaptableApi';
|
|
3
|
+
import type { StyledColumn } from '../../../AdaptableState/StyledColumnState';
|
|
4
|
+
import type { RowScope } from '../../../AdaptableState/Common/RowScope';
|
|
5
|
+
/**
|
|
6
|
+
* Row kinds used by {@link RowScope} and the Styled Column Scope wizard.
|
|
7
|
+
* All are available to all Styled Columns with exception of Sparkline (which is data rows only)
|
|
8
|
+
*/
|
|
9
|
+
export type StyledColumnRowKind = 'Data' | 'Group' | 'Summary' | 'Total';
|
|
10
|
+
export declare const STYLED_COLUMN_ROW_KINDS: StyledColumnRowKind[];
|
|
11
|
+
export declare const STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY: Record<StyledColumnRowKind, keyof RowScope>;
|
|
12
|
+
export declare const isStyledColumnRowKindSupported: (styledColumn: StyledColumn, kind: StyledColumnRowKind) => boolean;
|
|
13
|
+
export declare const getStyledColumnRowKindDisabledReason: (styledColumn: StyledColumn, kind: StyledColumnRowKind) => string | undefined;
|
|
14
|
+
/**
|
|
15
|
+
* Classifies the AG Grid row node into a single {@link StyledColumnRowKind}.
|
|
16
|
+
* Order matches {@link shouldRenderStyledColumnOnRow}: total before summary,
|
|
17
|
+
* summary before group.
|
|
18
|
+
*/
|
|
19
|
+
export declare const getStyledColumnRowKindForNode: (node: IRowNode, api: AdaptableApi) => StyledColumnRowKind;
|
|
20
|
+
/**
|
|
21
|
+
* Forces `Exclude*` to `true` for row kinds that do not apply to the current
|
|
22
|
+
* Styled Column type, so persisted state cannot contradict the capability
|
|
23
|
+
* matrix. Returns `undefined` when no change is needed.
|
|
24
|
+
*/
|
|
25
|
+
export declare const sanitizeStyledColumnRowScope: (styledColumn: StyledColumn) => RowScope | undefined;
|
|
26
|
+
/**
|
|
27
|
+
* Returns `true` when the Styled Column should render on the given row.
|
|
28
|
+
*
|
|
29
|
+
* Single source of truth consulted by every styled-column cell renderer
|
|
30
|
+
* (Badge / Icon / Rating / Percent Bar / Bullet Chart / Range Bar) and
|
|
31
|
+
* by `getStyledColumnStyle` (Gradient / Percent Bar cellStyle).
|
|
32
|
+
*
|
|
33
|
+
* Semantics:
|
|
34
|
+
* - **Type capabilities** first: some types never target certain row kinds
|
|
35
|
+
* (see {@link isStyledColumnRowKindSupported}). Unsupported kinds always
|
|
36
|
+
* return `false` regardless of `RowScope`.
|
|
37
|
+
* - When `StyledColumn.RowScope` is **set**, the explicit `Exclude*`
|
|
38
|
+
* flags win. Unset flags default to "include" — i.e. `RowScope: {}`
|
|
39
|
+
* means "render on every *supported* row kind".
|
|
40
|
+
* - When `StyledColumn.RowScope` is **unset**, the historical per-type
|
|
41
|
+
* default applies:
|
|
42
|
+
* - Badge: render on every row kind (that the type supports).
|
|
43
|
+
* - All other types: render on every row kind *except* group rows
|
|
44
|
+
* (matches the hardcoded "isGroupRowNode → plain text" check that
|
|
45
|
+
* every other styled-column renderer used to carry), again
|
|
46
|
+
* intersected with type capabilities (e.g. Sparkline → data only).
|
|
47
|
+
*
|
|
48
|
+
* The per-type default lets us promote `RowScope` cleanly without
|
|
49
|
+
* altering existing user-visible behaviour: state that doesn't mention
|
|
50
|
+
* `RowScope` keeps rendering exactly as before.
|
|
51
|
+
*/
|
|
52
|
+
export declare const shouldRenderStyledColumnOnRow: (styledColumn: StyledColumn, node: IRowNode, api: AdaptableApi) => boolean;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.shouldRenderStyledColumnOnRow = exports.sanitizeStyledColumnRowScope = exports.getStyledColumnRowKindForNode = exports.getStyledColumnRowKindDisabledReason = exports.isStyledColumnRowKindSupported = exports.STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY = exports.STYLED_COLUMN_ROW_KINDS = void 0;
|
|
4
|
+
exports.STYLED_COLUMN_ROW_KINDS = ['Data', 'Group', 'Summary', 'Total'];
|
|
5
|
+
exports.STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY = {
|
|
6
|
+
Data: 'ExcludeDataRows',
|
|
7
|
+
Group: 'ExcludeGroupRows',
|
|
8
|
+
Summary: 'ExcludeSummaryRows',
|
|
9
|
+
Total: 'ExcludeTotalRows',
|
|
10
|
+
};
|
|
11
|
+
const isStyledColumnRowKindSupported = (styledColumn, kind) => {
|
|
12
|
+
if (styledColumn.SparklineStyle) {
|
|
13
|
+
return kind === 'Data';
|
|
14
|
+
}
|
|
15
|
+
return true;
|
|
16
|
+
};
|
|
17
|
+
exports.isStyledColumnRowKindSupported = isStyledColumnRowKindSupported;
|
|
18
|
+
const getStyledColumnRowKindDisabledReason = (styledColumn, kind) => {
|
|
19
|
+
if ((0, exports.isStyledColumnRowKindSupported)(styledColumn, kind)) {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
if (styledColumn.SparklineStyle) {
|
|
23
|
+
return 'Sparklines only apply to leaf data rows (cells with a numeric array of points).';
|
|
24
|
+
}
|
|
25
|
+
return undefined;
|
|
26
|
+
};
|
|
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
|
+
const getStyledColumnRowKindForNode = (node, api) => {
|
|
34
|
+
if (api.gridApi.isGrandTotalRowNode(node)) {
|
|
35
|
+
return 'Total';
|
|
36
|
+
}
|
|
37
|
+
if (api.gridApi.isSummaryNode(node)) {
|
|
38
|
+
return 'Summary';
|
|
39
|
+
}
|
|
40
|
+
if (api.gridApi.isGroupRowNode(node)) {
|
|
41
|
+
return 'Group';
|
|
42
|
+
}
|
|
43
|
+
return 'Data';
|
|
44
|
+
};
|
|
45
|
+
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
|
+
const sanitizeStyledColumnRowScope = (styledColumn) => {
|
|
52
|
+
const scope = styledColumn.RowScope;
|
|
53
|
+
if (!scope) {
|
|
54
|
+
return undefined;
|
|
55
|
+
}
|
|
56
|
+
let next = { ...scope };
|
|
57
|
+
let changed = false;
|
|
58
|
+
for (const kind of exports.STYLED_COLUMN_ROW_KINDS) {
|
|
59
|
+
if ((0, exports.isStyledColumnRowKindSupported)(styledColumn, kind)) {
|
|
60
|
+
continue;
|
|
61
|
+
}
|
|
62
|
+
const key = exports.STYLED_COLUMN_ROW_KIND_EXCLUDE_KEY[kind];
|
|
63
|
+
if (next[key] !== true) {
|
|
64
|
+
next = { ...next, [key]: true };
|
|
65
|
+
changed = true;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return changed ? next : undefined;
|
|
69
|
+
};
|
|
70
|
+
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
|
+
const shouldRenderStyledColumnOnRow = (styledColumn, node, api) => {
|
|
98
|
+
const rowKind = (0, exports.getStyledColumnRowKindForNode)(node, api);
|
|
99
|
+
if (!(0, exports.isStyledColumnRowKindSupported)(styledColumn, rowKind)) {
|
|
100
|
+
return false;
|
|
101
|
+
}
|
|
102
|
+
const isGroup = api.gridApi.isGroupRowNode(node);
|
|
103
|
+
const isTotal = api.gridApi.isGrandTotalRowNode(node);
|
|
104
|
+
const isSummary = !isTotal && api.gridApi.isSummaryNode(node);
|
|
105
|
+
const isLeaf = !isGroup && !isSummary && !isTotal;
|
|
106
|
+
const scope = styledColumn.RowScope;
|
|
107
|
+
if (scope) {
|
|
108
|
+
if (isLeaf && scope.ExcludeDataRows)
|
|
109
|
+
return false;
|
|
110
|
+
if (isGroup && scope.ExcludeGroupRows)
|
|
111
|
+
return false;
|
|
112
|
+
if (isSummary && scope.ExcludeSummaryRows)
|
|
113
|
+
return false;
|
|
114
|
+
if (isTotal && scope.ExcludeTotalRows)
|
|
115
|
+
return false;
|
|
116
|
+
return true;
|
|
117
|
+
}
|
|
118
|
+
// No explicit RowScope → fall back to historical per-type behaviour.
|
|
119
|
+
if (styledColumn.BadgeStyle) {
|
|
120
|
+
return true;
|
|
121
|
+
}
|
|
122
|
+
return !isGroup;
|
|
123
|
+
};
|
|
124
|
+
exports.shouldRenderStyledColumnOnRow = shouldRenderStyledColumnOnRow;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timing helpers for delaying / rate-limiting function calls.
|
|
3
|
+
*
|
|
4
|
+
* `debounce` and `throttle` are drop-in replacements for the equivalent
|
|
5
|
+
* lodash exports (`debounce` supports `{ leading, trailing, maxWait }`,
|
|
6
|
+
* `throttle` supports `{ leading, trailing }`).
|
|
7
|
+
*
|
|
8
|
+
* Both return an instance of `DebouncedFunction<T>` which exposes
|
|
9
|
+
* `cancel()` and `flush()` for managing pending invocations.
|
|
10
|
+
*/
|
|
11
|
+
export interface DebounceOptions {
|
|
12
|
+
leading?: boolean;
|
|
13
|
+
trailing?: boolean;
|
|
14
|
+
maxWait?: number;
|
|
15
|
+
}
|
|
16
|
+
export interface DebouncedFunction<T extends (...args: any[]) => any> {
|
|
17
|
+
(...args: Parameters<T>): ReturnType<T> | undefined;
|
|
18
|
+
cancel(): void;
|
|
19
|
+
flush(): ReturnType<T> | undefined;
|
|
20
|
+
}
|
|
21
|
+
export declare function debounce<T extends (...args: any[]) => any>(func: T, wait?: number, options?: DebounceOptions): DebouncedFunction<T>;
|
|
22
|
+
export interface ThrottleOptions {
|
|
23
|
+
leading?: boolean;
|
|
24
|
+
trailing?: boolean;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Implemented in terms of `debounce` with `maxWait` (same approach as lodash).
|
|
28
|
+
*/
|
|
29
|
+
export declare function throttle<T extends (...args: any[]) => any>(func: T, wait?: number, options?: ThrottleOptions): DebouncedFunction<T>;
|
|
30
|
+
export declare const TimingHelper: {
|
|
31
|
+
debounce: typeof debounce;
|
|
32
|
+
throttle: typeof throttle;
|
|
33
|
+
};
|
|
34
|
+
export default TimingHelper;
|
|
@@ -1,15 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
4
|
-
* milliseconds have elapsed since the last time the debounced function was
|
|
5
|
-
* invoked. The debounced function comes with a cancel method to cancel
|
|
6
|
-
* delayed func invocations and a flush method to immediately invoke them.
|
|
3
|
+
* Timing helpers for delaying / rate-limiting function calls.
|
|
7
4
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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.
|
|
10
11
|
*/
|
|
11
12
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.
|
|
13
|
+
exports.TimingHelper = void 0;
|
|
14
|
+
exports.debounce = debounce;
|
|
15
|
+
exports.throttle = throttle;
|
|
13
16
|
function debounce(func, wait = 0, options) {
|
|
14
17
|
let lastArgs;
|
|
15
18
|
let lastThis;
|
|
@@ -62,7 +65,6 @@ function debounce(func, wait = 0, options) {
|
|
|
62
65
|
trailingEdge(time);
|
|
63
66
|
return;
|
|
64
67
|
}
|
|
65
|
-
// Restart the timer
|
|
66
68
|
startTimer(timerExpired, remainingWait(time));
|
|
67
69
|
}
|
|
68
70
|
function trailingEdge(time) {
|
|
@@ -94,7 +96,6 @@ function debounce(func, wait = 0, options) {
|
|
|
94
96
|
return result;
|
|
95
97
|
}
|
|
96
98
|
if (maxing) {
|
|
97
|
-
// Handle invocations in a tight loop with maxWait
|
|
98
99
|
cancelTimer();
|
|
99
100
|
startTimer(timerExpired, wait);
|
|
100
101
|
invokeFunc(time);
|
|
@@ -122,3 +123,18 @@ function debounce(func, wait = 0, options) {
|
|
|
122
123
|
};
|
|
123
124
|
return debounced;
|
|
124
125
|
}
|
|
126
|
+
/**
|
|
127
|
+
* Implemented in terms of `debounce` with `maxWait` (same approach as lodash).
|
|
128
|
+
*/
|
|
129
|
+
function throttle(func, wait = 0, options) {
|
|
130
|
+
return debounce(func, wait, {
|
|
131
|
+
leading: options?.leading ?? true,
|
|
132
|
+
trailing: options?.trailing ?? true,
|
|
133
|
+
maxWait: wait,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
exports.TimingHelper = {
|
|
137
|
+
debounce,
|
|
138
|
+
throttle,
|
|
139
|
+
};
|
|
140
|
+
exports.default = exports.TimingHelper;
|
|
@@ -33,7 +33,7 @@ exports.CreateToastOptions = CreateToastOptions;
|
|
|
33
33
|
exports.CreateDefaultSchedule = CreateDefaultSchedule;
|
|
34
34
|
const Enums_1 = require("../AdaptableState/Common/Enums");
|
|
35
35
|
const Uuid_1 = require("../AdaptableState/Uuid");
|
|
36
|
-
const ScheduleHelper_1 = require("./Helpers/ScheduleHelper");
|
|
36
|
+
const ScheduleHelper_1 = require("./Helpers/Scheduling/ScheduleHelper");
|
|
37
37
|
const GeneralConstants_1 = require("./Constants/GeneralConstants");
|
|
38
38
|
const ObjectDefaultConstants_1 = require("./Constants/ObjectDefaultConstants");
|
|
39
39
|
const Toastify_1 = require("../components/Toastify");
|
|
@@ -18,3 +18,5 @@ export declare class CalculatedColumnExpressionService implements ICalculatedCol
|
|
|
18
18
|
createAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
|
|
19
19
|
destroyAggregatedScalarLiveValue(calculatedColumn: CalculatedColumn): void;
|
|
20
20
|
}
|
|
21
|
+
export declare function buildSyntheticCellDataChangedInfosForCalcColumns(adaptableApi: AdaptableApi, info: CellDataChangedInfo): CellDataChangedInfo[];
|
|
22
|
+
export declare function expandCellDataChangedInfosWithCalculatedColumns(adaptableApi: AdaptableApi, cellDataChangedInfos: CellDataChangedInfo[]): CellDataChangedInfo[];
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculatedColumnExpressionService = void 0;
|
|
4
|
+
exports.buildSyntheticCellDataChangedInfosForCalcColumns = buildSyntheticCellDataChangedInfosForCalcColumns;
|
|
5
|
+
exports.expandCellDataChangedInfosWithCalculatedColumns = expandCellDataChangedInfosWithCalculatedColumns;
|
|
6
|
+
const tslib_1 = require("tslib");
|
|
4
7
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
5
8
|
const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
|
|
6
|
-
const
|
|
9
|
+
const parser = tslib_1.__importStar(require("../../parser/src"));
|
|
10
|
+
const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
|
|
7
11
|
class CalculatedColumnExpressionService {
|
|
8
12
|
adaptableApi;
|
|
9
13
|
aggregatedScalarLiveValuesMap = new Map();
|
|
@@ -12,7 +16,7 @@ class CalculatedColumnExpressionService {
|
|
|
12
16
|
this.adaptableApi = adaptableApi;
|
|
13
17
|
}
|
|
14
18
|
buildSyntheticCellDataChangedInfosForCalcColumns(cellDataChangedInfo) {
|
|
15
|
-
return
|
|
19
|
+
return buildSyntheticCellDataChangedInfosForCalcColumns(this.adaptableApi, cellDataChangedInfo);
|
|
16
20
|
}
|
|
17
21
|
listentoCellDataChange(cellDataChangedInfo) {
|
|
18
22
|
if (cellDataChangedInfo.trigger === 'calculatedColumnChange') {
|
|
@@ -143,3 +147,115 @@ class CalculatedColumnExpressionService {
|
|
|
143
147
|
}
|
|
144
148
|
}
|
|
145
149
|
exports.CalculatedColumnExpressionService = CalculatedColumnExpressionService;
|
|
150
|
+
function isScalarCalculatedColumn(calculatedColumn) {
|
|
151
|
+
return !!calculatedColumn.Query?.ScalarExpression;
|
|
152
|
+
}
|
|
153
|
+
function collectDependentScalarCalculatedColumns(adaptableApi, rootColumnId) {
|
|
154
|
+
const collected = [];
|
|
155
|
+
const seenCalcColumnIds = new Set();
|
|
156
|
+
const queue = [rootColumnId];
|
|
157
|
+
while (queue.length > 0) {
|
|
158
|
+
const columnId = queue.shift();
|
|
159
|
+
const adaptableColumn = adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
160
|
+
if (!adaptableColumn) {
|
|
161
|
+
continue;
|
|
162
|
+
}
|
|
163
|
+
const dependentColumnIds = adaptableApi.calculatedColumnApi.internalApi.getCalculatedColumnsDependentOnColumn(adaptableColumn);
|
|
164
|
+
dependentColumnIds.forEach((dependentColumnId) => {
|
|
165
|
+
if (seenCalcColumnIds.has(dependentColumnId)) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
const calculatedColumn = adaptableApi.calculatedColumnApi.getCalculatedColumnForColumnId(dependentColumnId);
|
|
169
|
+
if (!calculatedColumn || !isScalarCalculatedColumn(calculatedColumn)) {
|
|
170
|
+
return;
|
|
171
|
+
}
|
|
172
|
+
seenCalcColumnIds.add(dependentColumnId);
|
|
173
|
+
collected.push(calculatedColumn);
|
|
174
|
+
queue.push(dependentColumnId);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
return collected;
|
|
178
|
+
}
|
|
179
|
+
function buildShadowRowData(adaptableApi, info) {
|
|
180
|
+
const shadowData = Helper_1.default.cloneObject(info.rowNode?.data ?? info.rowData ?? {});
|
|
181
|
+
const fieldName = info.column.field ?? info.column.columnId;
|
|
182
|
+
adaptableApi.internalApi.setValueUsingField(shadowData, fieldName, info.oldValue);
|
|
183
|
+
return shadowData;
|
|
184
|
+
}
|
|
185
|
+
function evaluateScalarExpressionWithShadowData(adaptableApi, calculatedColumn, rowNode, shadowData) {
|
|
186
|
+
const internalApi = adaptableApi.internalApi;
|
|
187
|
+
const moduleFns = internalApi
|
|
188
|
+
.getQueryLanguageService()
|
|
189
|
+
.getModuleExpressionFunctionsMap(ModuleConstants_1.CalculatedColumnModuleId);
|
|
190
|
+
const baseFunctions = { ...moduleFns.booleanFunctions, ...moduleFns.scalarFunctions };
|
|
191
|
+
const resolveColumnValue = (columnId) => {
|
|
192
|
+
const childCalculatedColumn = adaptableApi.calculatedColumnApi.getCalculatedColumnForColumnId(columnId);
|
|
193
|
+
if (childCalculatedColumn?.Query?.ScalarExpression) {
|
|
194
|
+
return evaluateScalarExpressionWithShadowData(adaptableApi, childCalculatedColumn, rowNode, shadowData);
|
|
195
|
+
}
|
|
196
|
+
const adaptableColumn = adaptableApi.columnApi.getColumnWithColumnId(columnId);
|
|
197
|
+
return internalApi.getValueUsingField(shadowData, adaptableColumn?.field ?? columnId);
|
|
198
|
+
};
|
|
199
|
+
const customFunctions = {
|
|
200
|
+
...baseFunctions,
|
|
201
|
+
COL: {
|
|
202
|
+
...baseFunctions.COL,
|
|
203
|
+
handler: (args) => resolveColumnValue(args[0]),
|
|
204
|
+
},
|
|
205
|
+
FIELD: {
|
|
206
|
+
...baseFunctions.FIELD,
|
|
207
|
+
handler: (args) => internalApi.getValueUsingField(shadowData, args[0]),
|
|
208
|
+
},
|
|
209
|
+
};
|
|
210
|
+
return parser.evaluate(calculatedColumn.Query.ScalarExpression, {
|
|
211
|
+
node: { ...rowNode, data: shadowData },
|
|
212
|
+
functions: customFunctions,
|
|
213
|
+
...internalApi.buildBaseContext(),
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
function buildSyntheticCellDataChangedInfosForCalcColumns(adaptableApi, info) {
|
|
217
|
+
if (!info.rowNode ||
|
|
218
|
+
info.preventEdit ||
|
|
219
|
+
info.trigger === 'undo' ||
|
|
220
|
+
info.trigger === 'aggChange' ||
|
|
221
|
+
info.trigger === 'calculatedColumnChange') {
|
|
222
|
+
return [];
|
|
223
|
+
}
|
|
224
|
+
const calculatedColumns = collectDependentScalarCalculatedColumns(adaptableApi, info.column.columnId);
|
|
225
|
+
if (!calculatedColumns.length) {
|
|
226
|
+
return [];
|
|
227
|
+
}
|
|
228
|
+
const shadowData = buildShadowRowData(adaptableApi, info);
|
|
229
|
+
const expressionService = adaptableApi.internalApi.getCalculatedColumnExpressionService();
|
|
230
|
+
const syntheticEvents = [];
|
|
231
|
+
calculatedColumns.forEach((calculatedColumn) => {
|
|
232
|
+
const oldValue = evaluateScalarExpressionWithShadowData(adaptableApi, calculatedColumn, info.rowNode, shadowData);
|
|
233
|
+
const newValue = expressionService.evaluateCalculatedColumnQuery(calculatedColumn, info.rowNode);
|
|
234
|
+
if (oldValue == newValue) {
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
237
|
+
const column = adaptableApi.columnApi.getColumnWithColumnId(calculatedColumn.ColumnId);
|
|
238
|
+
if (!column) {
|
|
239
|
+
return;
|
|
240
|
+
}
|
|
241
|
+
syntheticEvents.push(adaptableApi.internalApi.buildCellDataChangedInfo({
|
|
242
|
+
oldValue,
|
|
243
|
+
newValue,
|
|
244
|
+
column,
|
|
245
|
+
primaryKeyValue: info.primaryKeyValue,
|
|
246
|
+
rowNode: info.rowNode,
|
|
247
|
+
trigger: 'calculatedColumnChange',
|
|
248
|
+
}));
|
|
249
|
+
});
|
|
250
|
+
return syntheticEvents;
|
|
251
|
+
}
|
|
252
|
+
function expandCellDataChangedInfosWithCalculatedColumns(adaptableApi, cellDataChangedInfos) {
|
|
253
|
+
if (!cellDataChangedInfos.length) {
|
|
254
|
+
return cellDataChangedInfos;
|
|
255
|
+
}
|
|
256
|
+
const syntheticEvents = cellDataChangedInfos.flatMap((info) => buildSyntheticCellDataChangedInfosForCalcColumns(adaptableApi, info));
|
|
257
|
+
if (!syntheticEvents.length) {
|
|
258
|
+
return cellDataChangedInfos;
|
|
259
|
+
}
|
|
260
|
+
return [...cellDataChangedInfos, ...syntheticEvents];
|
|
261
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/InternalRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),i=require("../../Extensions/NumberExtensions"),o=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p||(exports.LicenseValidityType=p={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===s},I=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===s},_=()=>{const e=h(),[a,t,s]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===s};class O{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=(0,n.decode)(this.licenseKey)}catch(a){e=a}E()||I()||_()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),i=s<new Date,o=e.trial;let n=null;return n=i?s>t?o?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:o?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let s=0;e instanceof Error||!e?.end||(s=Math.floor((e?.end?.getTime()-t.getTime())/d),s=(0,i.clamp)(s,0,1/0));let p="",h="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(p=e.appName,h=" for application [APP_NAME]");const E=(e,a=o.LicenseDocsLink,t=l,i=s,n=p)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",n).replace("[DAYS]",`${i}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(s<=c)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.LicenseDisablePersistence)())}destroy(){}}exports.LicenseService=O;
|
|
@@ -19,7 +19,7 @@ export declare class RowSummaryService {
|
|
|
19
19
|
*
|
|
20
20
|
* @param colId optional to evaluate only one column
|
|
21
21
|
*/
|
|
22
|
-
_throttledEvaluateRowSummary: import("../
|
|
22
|
+
_throttledEvaluateRowSummary: import("../Helpers/TimingHelper").DebouncedFunction<(reason?: {
|
|
23
23
|
columnIds: string[];
|
|
24
24
|
}) => void>;
|
|
25
25
|
private evaluateRowSummary;
|
|
@@ -5,11 +5,11 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const RowSummary_1 = require("../../AdaptableState/Common/RowSummary");
|
|
6
6
|
const InternalRedux_1 = require("../../Redux/ActionsReducers/InternalRedux");
|
|
7
7
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
8
|
-
const
|
|
8
|
+
const NumberExtensions_1 = require("../Extensions/NumberExtensions");
|
|
9
9
|
const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
|
|
10
10
|
const ObjectExtensions_1 = require("../Extensions/ObjectExtensions");
|
|
11
|
-
const
|
|
12
|
-
const
|
|
11
|
+
const TimingHelper_1 = require("../Helpers/TimingHelper");
|
|
12
|
+
const ObjectExtensions_2 = require("../Extensions/ObjectExtensions");
|
|
13
13
|
/**
|
|
14
14
|
* The logic is extracted here to make it easier to follow
|
|
15
15
|
*/
|
|
@@ -78,7 +78,7 @@ class RowSummaryService {
|
|
|
78
78
|
*
|
|
79
79
|
* @param colId optional to evaluate only one column
|
|
80
80
|
*/
|
|
81
|
-
_throttledEvaluateRowSummary = (0,
|
|
81
|
+
_throttledEvaluateRowSummary = (0, TimingHelper_1.throttle)(this.evaluateRowSummary, 300);
|
|
82
82
|
evaluateRowSummary(reason) {
|
|
83
83
|
if (this._throttleAcumulatedColumnsThatChanged.size > 0) {
|
|
84
84
|
const columnIds = Array.from(this._throttleAcumulatedColumnsThatChanged.values());
|
|
@@ -159,7 +159,7 @@ class RowSummaryService {
|
|
|
159
159
|
if (expressionLiveValue) {
|
|
160
160
|
value = expressionLiveValue.getGlobalAggregatedValue();
|
|
161
161
|
if (typeof value === 'number' && !isNaN(value)) {
|
|
162
|
-
value =
|
|
162
|
+
value = (0, NumberExtensions_1.roundNumber)(value, 2);
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
165
|
const column = this.api.columnApi.getColumnWithColumnId(columnId);
|
|
@@ -171,7 +171,7 @@ class RowSummaryService {
|
|
|
171
171
|
}),
|
|
172
172
|
};
|
|
173
173
|
});
|
|
174
|
-
if (this.previousRowSummaries && (0,
|
|
174
|
+
if (this.previousRowSummaries && (0, ObjectExtensions_2.isEqual)(rowSummariesResults, this.previousRowSummaries)) {
|
|
175
175
|
return;
|
|
176
176
|
}
|
|
177
177
|
this.api.internalApi.dispatchReduxAction((0, InternalRedux_1.RowSummarySet)(rowSummariesResults));
|
|
@@ -12,7 +12,7 @@ const react_1 = require("react");
|
|
|
12
12
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../../Utilities/Extensions/StringExtensions"));
|
|
13
13
|
const InfiniteTable_1 = require("../../../components/InfiniteTable");
|
|
14
14
|
const Flex_1 = require("../../../components/Flex");
|
|
15
|
-
const
|
|
15
|
+
const TimingHelper_1 = require("../../../Utilities/Helpers/TimingHelper");
|
|
16
16
|
const twMerge_1 = require("../../../twMerge");
|
|
17
17
|
const dataTypes = [
|
|
18
18
|
{
|
|
@@ -42,7 +42,7 @@ const useForceRender = () => {
|
|
|
42
42
|
};
|
|
43
43
|
const ThrottledInput = React.memo((props) => {
|
|
44
44
|
const [stateValue, setStateValue] = (0, react_1.useState)(props.value);
|
|
45
|
-
const throttleOnChange = React.useRef((0,
|
|
45
|
+
const throttleOnChange = React.useRef((0, TimingHelper_1.throttle)(props.onChange, 600, { leading: false }));
|
|
46
46
|
const handleChange = React.useCallback((event) => {
|
|
47
47
|
const newValue = event.target.value;
|
|
48
48
|
setStateValue(newValue);
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.getAlertTypeText = exports.getAlertType = exports.AlertType = void 0;
|
|
4
4
|
const GeneralConstants_1 = require("./../../../Utilities/Constants/GeneralConstants");
|
|
5
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
5
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
6
6
|
var AlertType;
|
|
7
7
|
(function (AlertType) {
|
|
8
8
|
AlertType["DataChange"] = "DataChange";
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getDefaultAlertDefinition = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ObjectFactory_1 = tslib_1.__importDefault(require("../../../Utilities/ObjectFactory"));
|
|
6
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
6
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
7
7
|
const getAlertType_1 = require("./getAlertType");
|
|
8
8
|
/**
|
|
9
9
|
* This logic should be moved into Object factory once we have types on alert definitions
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.mapAlertDefinition = void 0;
|
|
4
|
-
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/ScheduledAlertHelper");
|
|
4
|
+
const ScheduledAlertHelper_1 = require("../../../Utilities/Helpers/Scheduling/ScheduledAlertHelper");
|
|
5
5
|
const mapAlertDefinition = (api, alertDefinition) => {
|
|
6
6
|
if (!(0, ScheduledAlertHelper_1.isRuleBasedAlertDefinition)(alertDefinition)) {
|
|
7
7
|
return alertDefinition;
|