@adaptabletools/adaptable 10.0.0-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/LICENSE.md +264 -0
- package/README.md +36 -0
- package/agGrid.d.ts +58 -0
- package/agGrid.js +14 -0
- package/base.css +2512 -0
- package/fonts/glyphicons-halflings-regular.eot +0 -0
- package/fonts/glyphicons-halflings-regular.svg +288 -0
- package/fonts/glyphicons-halflings-regular.ttf +0 -0
- package/fonts/glyphicons-halflings-regular.woff +0 -0
- package/fonts/glyphicons-halflings-regular.woff2 +0 -0
- package/index.css +3375 -0
- package/package.json +67 -0
- package/publishTimestamp.d.ts +2 -0
- package/publishTimestamp.js +3 -0
- package/src/AdaptableComponents.d.ts +1 -0
- package/src/AdaptableComponents.js +5 -0
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +91 -0
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.js +2 -0
- package/src/AdaptableInterfaces/IAdaptable.d.ts +214 -0
- package/src/AdaptableInterfaces/IAdaptable.js +2 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +33 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.js +2 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +169 -0
- package/src/AdaptableOptions/AdaptableOptions.js +2 -0
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +40 -0
- package/src/AdaptableOptions/AdaptablePlugin.js +36 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +143 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ChartPluginOptions.d.ts +20 -0
- package/src/AdaptableOptions/ChartPluginOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +55 -0
- package/src/AdaptableOptions/ContainerOptions.js +2 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +98 -0
- package/src/AdaptableOptions/DashboardOptions.js +2 -0
- package/src/AdaptableOptions/DataChangeTrackingOptions.d.ts +34 -0
- package/src/AdaptableOptions/DataChangeTrackingOptions.js +21 -0
- package/src/AdaptableOptions/DateInputOptions.d.ts +78 -0
- package/src/AdaptableOptions/DateInputOptions.js +2 -0
- package/src/AdaptableOptions/EditOptions.d.ts +38 -0
- package/src/AdaptableOptions/EditOptions.js +2 -0
- package/src/AdaptableOptions/EntitlementOptions.d.ts +20 -0
- package/src/AdaptableOptions/EntitlementOptions.js +2 -0
- package/src/AdaptableOptions/ExportOptions.d.ts +108 -0
- package/src/AdaptableOptions/ExportOptions.js +2 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +66 -0
- package/src/AdaptableOptions/FinancePluginOptions.js +2 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +83 -0
- package/src/AdaptableOptions/GeneralOptions.js +2 -0
- package/src/AdaptableOptions/Glue42PluginOptions.d.ts +25 -0
- package/src/AdaptableOptions/Glue42PluginOptions.js +2 -0
- package/src/AdaptableOptions/IPushPullPluginOptions.d.ts +37 -0
- package/src/AdaptableOptions/IPushPullPluginOptions.js +2 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +41 -0
- package/src/AdaptableOptions/LayoutOptions.js +2 -0
- package/src/AdaptableOptions/MasterDetailAgGridPluginOptions.d.ts +16 -0
- package/src/AdaptableOptions/MasterDetailAgGridPluginOptions.js +2 -0
- package/src/AdaptableOptions/MenuOptions.d.ts +49 -0
- package/src/AdaptableOptions/MenuOptions.js +2 -0
- package/src/AdaptableOptions/OpenFinPluginOptions.d.ts +52 -0
- package/src/AdaptableOptions/OpenFinPluginOptions.js +2 -0
- package/src/AdaptableOptions/SearchOptions.d.ts +196 -0
- package/src/AdaptableOptions/SearchOptions.js +2 -0
- package/src/AdaptableOptions/StateOptions.d.ts +79 -0
- package/src/AdaptableOptions/StateOptions.js +2 -0
- package/src/AdaptableOptions/SystemStatusOptions.d.ts +19 -0
- package/src/AdaptableOptions/SystemStatusOptions.js +2 -0
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +39 -0
- package/src/AdaptableOptions/TeamSharingOptions.js +2 -0
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +132 -0
- package/src/AdaptableOptions/ToolPanelOptions.js +2 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +115 -0
- package/src/AdaptableOptions/UserInterfaceOptions.js +2 -0
- package/src/Api/AdaptableApi.d.ts +185 -0
- package/src/Api/AdaptableApi.js +2 -0
- package/src/Api/AlertApi.d.ts +246 -0
- package/src/Api/AlertApi.js +2 -0
- package/src/Api/ApplicationApi.d.ts +50 -0
- package/src/Api/ApplicationApi.js +2 -0
- package/src/Api/BulkUpdateApi.d.ts +19 -0
- package/src/Api/BulkUpdateApi.js +2 -0
- package/src/Api/CalculatedColumnApi.d.ts +66 -0
- package/src/Api/CalculatedColumnApi.js +2 -0
- package/src/Api/CellSummaryApi.d.ts +18 -0
- package/src/Api/CellSummaryApi.js +2 -0
- package/src/Api/ChartApi.d.ts +20 -0
- package/src/Api/ChartApi.js +2 -0
- package/src/Api/ColumnApi.d.ts +239 -0
- package/src/Api/ColumnApi.js +2 -0
- package/src/Api/ConditionalStyleApi.d.ts +96 -0
- package/src/Api/ConditionalStyleApi.js +2 -0
- package/src/Api/ConfigApi.d.ts +204 -0
- package/src/Api/ConfigApi.js +2 -0
- package/src/Api/CustomSortApi.d.ts +77 -0
- package/src/Api/CustomSortApi.js +2 -0
- package/src/Api/DashboardApi.d.ts +164 -0
- package/src/Api/DashboardApi.js +2 -0
- package/src/Api/DataSourceApi.d.ts +58 -0
- package/src/Api/DataSourceApi.js +2 -0
- package/src/Api/EventApi.d.ts +210 -0
- package/src/Api/EventApi.js +2 -0
- package/src/Api/Events/AdaptableReady.d.ts +14 -0
- package/src/Api/Events/AdaptableReady.js +2 -0
- package/src/Api/Events/AdaptableStateChanged.d.ts +39 -0
- package/src/Api/Events/AdaptableStateChanged.js +2 -0
- package/src/Api/Events/AlertFired.d.ts +10 -0
- package/src/Api/Events/AlertFired.js +2 -0
- package/src/Api/Events/CellChanged.d.ts +10 -0
- package/src/Api/Events/CellChanged.js +2 -0
- package/src/Api/Events/ChexboxColumnClicked.d.ts +22 -0
- package/src/Api/Events/ChexboxColumnClicked.js +2 -0
- package/src/Api/Events/CustomToolbarConfigured.d.ts +10 -0
- package/src/Api/Events/CustomToolbarConfigured.js +2 -0
- package/src/Api/Events/DashboardChanged.d.ts +18 -0
- package/src/Api/Events/DashboardChanged.js +2 -0
- package/src/Api/Events/FlashingAlertFired.d.ts +10 -0
- package/src/Api/Events/FlashingAlertFired.js +2 -0
- package/src/Api/Events/GridDataChanged.d.ts +14 -0
- package/src/Api/Events/GridDataChanged.js +2 -0
- package/src/Api/Events/LayoutChanged.d.ts +18 -0
- package/src/Api/Events/LayoutChanged.js +2 -0
- package/src/Api/Events/LiveDataChanged.d.ts +39 -0
- package/src/Api/Events/LiveDataChanged.js +2 -0
- package/src/Api/Events/SearchChanged.d.ts +55 -0
- package/src/Api/Events/SearchChanged.js +2 -0
- package/src/Api/Events/SelectionChanged.d.ts +15 -0
- package/src/Api/Events/SelectionChanged.js +2 -0
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +10 -0
- package/src/Api/Events/SystemStatusMessageDisplayed.js +2 -0
- package/src/Api/Events/TeamSharedEntityChanged.d.ts +10 -0
- package/src/Api/Events/TeamSharedEntityChanged.js +2 -0
- package/src/Api/Events/ThemeChanged.d.ts +10 -0
- package/src/Api/Events/ThemeChanged.js +2 -0
- package/src/Api/ExportApi.d.ts +125 -0
- package/src/Api/ExportApi.js +2 -0
- package/src/Api/FilterApi.d.ts +119 -0
- package/src/Api/FilterApi.js +2 -0
- package/src/Api/FinanceApi.d.ts +10 -0
- package/src/Api/FinanceApi.js +2 -0
- package/src/Api/FormatColumnApi.d.ts +173 -0
- package/src/Api/FormatColumnApi.js +2 -0
- package/src/Api/FreeTextColumnApi.d.ts +88 -0
- package/src/Api/FreeTextColumnApi.js +2 -0
- package/src/Api/Glue42Api.d.ts +113 -0
- package/src/Api/Glue42Api.js +2 -0
- package/src/Api/GridApi.d.ts +376 -0
- package/src/Api/GridApi.js +2 -0
- package/src/Api/IPushPullApi.d.ts +176 -0
- package/src/Api/IPushPullApi.js +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +78 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +81 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +59 -0
- package/src/Api/Implementation/AlertApiImpl.js +327 -0
- package/src/Api/Implementation/ApiBase.d.ts +62 -0
- package/src/Api/Implementation/ApiBase.js +120 -0
- package/src/Api/Implementation/ApplicationApiImpl.d.ts +13 -0
- package/src/Api/Implementation/ApplicationApiImpl.js +39 -0
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +8 -0
- package/src/Api/Implementation/BulkUpdateApiImpl.js +19 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +16 -0
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +64 -0
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +8 -0
- package/src/Api/Implementation/CellSummaryApiImpl.js +18 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +60 -0
- package/src/Api/Implementation/ColumnApiImpl.js +366 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +27 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +90 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +73 -0
- package/src/Api/Implementation/ConfigApiImpl.js +407 -0
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +18 -0
- package/src/Api/Implementation/CustomSortApiImpl.js +62 -0
- package/src/Api/Implementation/DashboardApiImpl.d.ts +46 -0
- package/src/Api/Implementation/DashboardApiImpl.js +199 -0
- package/src/Api/Implementation/DataSourceApiImpl.d.ts +15 -0
- package/src/Api/Implementation/DataSourceApiImpl.js +51 -0
- package/src/Api/Implementation/EventApiImpl.d.ts +12 -0
- package/src/Api/Implementation/EventApiImpl.js +26 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +31 -0
- package/src/Api/Implementation/ExportApiImpl.js +168 -0
- package/src/Api/Implementation/FilterApiImpl.d.ts +31 -0
- package/src/Api/Implementation/FilterApiImpl.js +195 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +45 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +267 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +26 -0
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +128 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +88 -0
- package/src/Api/Implementation/GridApiImpl.js +322 -0
- package/src/Api/Implementation/InternalApiImpl.d.ts +115 -0
- package/src/Api/Implementation/InternalApiImpl.js +390 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +30 -0
- package/src/Api/Implementation/LayoutApiImpl.js +215 -0
- package/src/Api/Implementation/PluginsApiImpl.d.ts +20 -0
- package/src/Api/Implementation/PluginsApiImpl.js +60 -0
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +18 -0
- package/src/Api/Implementation/PlusMinusApiImpl.js +57 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +15 -0
- package/src/Api/Implementation/PredicateApiImpl.js +82 -0
- package/src/Api/Implementation/QueryApiImpl.d.ts +25 -0
- package/src/Api/Implementation/QueryApiImpl.js +134 -0
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +13 -0
- package/src/Api/Implementation/QuickSearchApiImpl.js +31 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +54 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +214 -0
- package/src/Api/Implementation/ScopeApiImpl.d.ts +29 -0
- package/src/Api/Implementation/ScopeApiImpl.js +260 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +16 -0
- package/src/Api/Implementation/ShortcutApiImpl.js +50 -0
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +11 -0
- package/src/Api/Implementation/SmartEditApiImpl.js +29 -0
- package/src/Api/Implementation/SparklineColumnApiImpl.d.ts +9 -0
- package/src/Api/Implementation/SparklineColumnApiImpl.js +24 -0
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +18 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +96 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +12 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +44 -0
- package/src/Api/Implementation/ThemeApiImpl.d.ts +17 -0
- package/src/Api/Implementation/ThemeApiImpl.js +65 -0
- package/src/Api/Implementation/ToolPanelApiImpl.d.ts +20 -0
- package/src/Api/Implementation/ToolPanelApiImpl.js +61 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +24 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +192 -0
- package/src/Api/InternalApi.d.ts +117 -0
- package/src/Api/InternalApi.js +2 -0
- package/src/Api/LayoutApi.d.ts +124 -0
- package/src/Api/LayoutApi.js +2 -0
- package/src/Api/OpenFinApi.d.ts +61 -0
- package/src/Api/OpenFinApi.js +2 -0
- package/src/Api/PluginsApi.d.ts +26 -0
- package/src/Api/PluginsApi.js +2 -0
- package/src/Api/PlusMinusApi.d.ts +72 -0
- package/src/Api/PlusMinusApi.js +2 -0
- package/src/Api/PredicateApi.d.ts +55 -0
- package/src/Api/PredicateApi.js +2 -0
- package/src/Api/QueryApi.d.ts +91 -0
- package/src/Api/QueryApi.js +2 -0
- package/src/Api/QuickSearchApi.d.ts +37 -0
- package/src/Api/QuickSearchApi.js +2 -0
- package/src/Api/ScheduleApi.d.ts +253 -0
- package/src/Api/ScheduleApi.js +2 -0
- package/src/Api/ScopeApi.d.ts +129 -0
- package/src/Api/ScopeApi.js +2 -0
- package/src/Api/ShortcutApi.d.ts +62 -0
- package/src/Api/ShortcutApi.js +2 -0
- package/src/Api/SmartEditApi.d.ts +33 -0
- package/src/Api/SmartEditApi.js +2 -0
- package/src/Api/SparklineColumnApi.d.ts +23 -0
- package/src/Api/SparklineColumnApi.js +2 -0
- package/src/Api/SystemStatusApi.d.ts +43 -0
- package/src/Api/SystemStatusApi.js +2 -0
- package/src/Api/TeamSharingApi.d.ts +31 -0
- package/src/Api/TeamSharingApi.js +2 -0
- package/src/Api/ThemeApi.d.ts +59 -0
- package/src/Api/ThemeApi.js +2 -0
- package/src/Api/ToolPanelApi.d.ts +51 -0
- package/src/Api/ToolPanelApi.js +2 -0
- package/src/Api/UserInterfaceApi.d.ts +63 -0
- package/src/Api/UserInterfaceApi.js +2 -0
- package/src/PredefinedConfig/AdaptableState.d.ts +68 -0
- package/src/PredefinedConfig/AdaptableState.js +2 -0
- package/src/PredefinedConfig/AlertState.d.ts +155 -0
- package/src/PredefinedConfig/AlertState.js +2 -0
- package/src/PredefinedConfig/ApplicationState.d.ts +23 -0
- package/src/PredefinedConfig/ApplicationState.js +2 -0
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +82 -0
- package/src/PredefinedConfig/CalculatedColumnState.js +2 -0
- package/src/PredefinedConfig/ChartState.d.ts +144 -0
- package/src/PredefinedConfig/ChartState.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +23 -0
- package/src/PredefinedConfig/Common/AdaptableAlert.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +40 -0
- package/src/PredefinedConfig/Common/AdaptableButton.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +124 -0
- package/src/PredefinedConfig/Common/AdaptableColumn.js +26 -0
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +22 -0
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableFlashingAlert.d.ts +32 -0
- package/src/PredefinedConfig/Common/AdaptableFlashingAlert.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +52 -0
- package/src/PredefinedConfig/Common/AdaptableForm.js +11 -0
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +73 -0
- package/src/PredefinedConfig/Common/AdaptableFormat.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +27 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableMessageType.d.ts +20 -0
- package/src/PredefinedConfig/Common/AdaptableMessageType.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +18 -0
- package/src/PredefinedConfig/Common/AdaptableObject.js +2 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +113 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +500 -0
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +19 -0
- package/src/PredefinedConfig/Common/AdaptableQuery.js +10 -0
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +14 -0
- package/src/PredefinedConfig/Common/AdaptableScope.js +2 -0
- package/src/PredefinedConfig/Common/AdaptableStyle.d.ts +33 -0
- package/src/PredefinedConfig/Common/AdaptableStyle.js +2 -0
- package/src/PredefinedConfig/Common/AlternativeModuleName.d.ts +14 -0
- package/src/PredefinedConfig/Common/AlternativeModuleName.js +2 -0
- package/src/PredefinedConfig/Common/ButtonStyle.d.ts +19 -0
- package/src/PredefinedConfig/Common/ButtonStyle.js +2 -0
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +22 -0
- package/src/PredefinedConfig/Common/CellHighlightInfo.js +2 -0
- package/src/PredefinedConfig/Common/CellSummary.d.ts +55 -0
- package/src/PredefinedConfig/Common/CellSummary.js +2 -0
- package/src/PredefinedConfig/Common/ChartEnums.d.ts +123 -0
- package/src/PredefinedConfig/Common/ChartEnums.js +152 -0
- package/src/PredefinedConfig/Common/ColumnSort.d.ts +13 -0
- package/src/PredefinedConfig/Common/ColumnSort.js +2 -0
- package/src/PredefinedConfig/Common/DataChangedInfo.d.ts +42 -0
- package/src/PredefinedConfig/Common/DataChangedInfo.js +2 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.d.ts +13 -0
- package/src/PredefinedConfig/Common/DataUpdateConfig.js +2 -0
- package/src/PredefinedConfig/Common/Entitlement.d.ts +15 -0
- package/src/PredefinedConfig/Common/Entitlement.js +2 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +97 -0
- package/src/PredefinedConfig/Common/Enums.js +118 -0
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +65 -0
- package/src/PredefinedConfig/Common/FDC3Context.js +2 -0
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.d.ts +14 -0
- package/src/PredefinedConfig/Common/FilterActionOnDataChange.js +6 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +123 -0
- package/src/PredefinedConfig/Common/Menu.js +2 -0
- package/src/PredefinedConfig/Common/Schedule.d.ts +48 -0
- package/src/PredefinedConfig/Common/Schedule.js +16 -0
- package/src/PredefinedConfig/Common/SuspendableObject.d.ts +10 -0
- package/src/PredefinedConfig/Common/SuspendableObject.js +2 -0
- package/src/PredefinedConfig/Common/SystemStatusMessageInfo.d.ts +23 -0
- package/src/PredefinedConfig/Common/SystemStatusMessageInfo.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +27 -0
- package/src/PredefinedConfig/Common/Types.js +23 -0
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +50 -0
- package/src/PredefinedConfig/ConditionalStyleState.js +2 -0
- package/src/PredefinedConfig/ConfigState.d.ts +9 -0
- package/src/PredefinedConfig/ConfigState.js +2 -0
- package/src/PredefinedConfig/CustomSortState.d.ts +26 -0
- package/src/PredefinedConfig/CustomSortState.js +2 -0
- package/src/PredefinedConfig/DashboardState.d.ts +76 -0
- package/src/PredefinedConfig/DashboardState.js +2 -0
- package/src/PredefinedConfig/DataSourceState.d.ts +34 -0
- package/src/PredefinedConfig/DataSourceState.js +2 -0
- package/src/PredefinedConfig/DeprecatedState.d.ts +82 -0
- package/src/PredefinedConfig/DeprecatedState.js +5 -0
- package/src/PredefinedConfig/ExportState.d.ts +84 -0
- package/src/PredefinedConfig/ExportState.js +2 -0
- package/src/PredefinedConfig/FilterState.d.ts +51 -0
- package/src/PredefinedConfig/FilterState.js +2 -0
- package/src/PredefinedConfig/FormatColumnState.d.ts +134 -0
- package/src/PredefinedConfig/FormatColumnState.js +2 -0
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +55 -0
- package/src/PredefinedConfig/FreeTextColumnState.js +2 -0
- package/src/PredefinedConfig/Glue42State.d.ts +46 -0
- package/src/PredefinedConfig/Glue42State.js +2 -0
- package/src/PredefinedConfig/GridState.d.ts +23 -0
- package/src/PredefinedConfig/GridState.js +2 -0
- package/src/PredefinedConfig/IPushPullState.d.ts +54 -0
- package/src/PredefinedConfig/IPushPullState.js +2 -0
- package/src/PredefinedConfig/InternalState.d.ts +10 -0
- package/src/PredefinedConfig/InternalState.js +2 -0
- package/src/PredefinedConfig/LayoutState.d.ts +81 -0
- package/src/PredefinedConfig/LayoutState.js +2 -0
- package/src/PredefinedConfig/OpenFinState.d.ts +32 -0
- package/src/PredefinedConfig/OpenFinState.js +2 -0
- package/src/PredefinedConfig/PlusMinusState.d.ts +30 -0
- package/src/PredefinedConfig/PlusMinusState.js +2 -0
- package/src/PredefinedConfig/PopupState.d.ts +12 -0
- package/src/PredefinedConfig/PopupState.js +2 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +150 -0
- package/src/PredefinedConfig/PredefinedConfig.js +2 -0
- package/src/PredefinedConfig/QueryState.d.ts +29 -0
- package/src/PredefinedConfig/QueryState.js +2 -0
- package/src/PredefinedConfig/QuickSearchState.d.ts +15 -0
- package/src/PredefinedConfig/QuickSearchState.js +2 -0
- package/src/PredefinedConfig/ScheduleState.d.ts +57 -0
- package/src/PredefinedConfig/ScheduleState.js +2 -0
- package/src/PredefinedConfig/Selection/GridCell.d.ts +30 -0
- package/src/PredefinedConfig/Selection/GridCell.js +2 -0
- package/src/PredefinedConfig/Selection/GridCellRange.d.ts +5 -0
- package/src/PredefinedConfig/Selection/GridCellRange.js +2 -0
- package/src/PredefinedConfig/Selection/GridRow.d.ts +43 -0
- package/src/PredefinedConfig/Selection/GridRow.js +2 -0
- package/src/PredefinedConfig/Selection/SelectedCellInfo.d.ts +15 -0
- package/src/PredefinedConfig/Selection/SelectedCellInfo.js +2 -0
- package/src/PredefinedConfig/Selection/SelectedRowInfo.d.ts +10 -0
- package/src/PredefinedConfig/Selection/SelectedRowInfo.js +2 -0
- package/src/PredefinedConfig/ShortcutState.d.ts +33 -0
- package/src/PredefinedConfig/ShortcutState.js +2 -0
- package/src/PredefinedConfig/SparklineColumnState.d.ts +40 -0
- package/src/PredefinedConfig/SparklineColumnState.js +2 -0
- package/src/PredefinedConfig/SystemState.d.ts +59 -0
- package/src/PredefinedConfig/SystemState.js +2 -0
- package/src/PredefinedConfig/TeamSharingState.d.ts +88 -0
- package/src/PredefinedConfig/TeamSharingState.js +2 -0
- package/src/PredefinedConfig/ThemeState.d.ts +36 -0
- package/src/PredefinedConfig/ThemeState.js +2 -0
- package/src/PredefinedConfig/ToolPanelState.d.ts +32 -0
- package/src/PredefinedConfig/ToolPanelState.js +2 -0
- package/src/PredefinedConfig/Uuid.d.ts +2 -0
- package/src/PredefinedConfig/Uuid.js +5 -0
- package/src/Redux/ActionsReducers/AlertRedux.d.ts +88 -0
- package/src/Redux/ActionsReducers/AlertRedux.js +157 -0
- package/src/Redux/ActionsReducers/ApplicationRedux.d.ts +27 -0
- package/src/Redux/ActionsReducers/ApplicationRedux.js +56 -0
- package/src/Redux/ActionsReducers/BulkUpdateRedux.d.ts +25 -0
- package/src/Redux/ActionsReducers/BulkUpdateRedux.js +26 -0
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.d.ts +35 -0
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +72 -0
- package/src/Redux/ActionsReducers/CellSummaryRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/CellSummaryRedux.js +7 -0
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +88 -0
- package/src/Redux/ActionsReducers/CustomSortRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/CustomSortRedux.js +86 -0
- package/src/Redux/ActionsReducers/DashboardRedux.d.ts +116 -0
- package/src/Redux/ActionsReducers/DashboardRedux.js +173 -0
- package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +42 -0
- package/src/Redux/ActionsReducers/DataSourceRedux.js +76 -0
- package/src/Redux/ActionsReducers/ExportRedux.d.ts +61 -0
- package/src/Redux/ActionsReducers/ExportRedux.js +97 -0
- package/src/Redux/ActionsReducers/FilterRedux.d.ts +70 -0
- package/src/Redux/ActionsReducers/FilterRedux.js +126 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +85 -0
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +94 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +171 -0
- package/src/Redux/ActionsReducers/GridRedux.js +227 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +57 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +89 -0
- package/src/Redux/ActionsReducers/PluginsRedux.d.ts +188 -0
- package/src/Redux/ActionsReducers/PluginsRedux.js +194 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.d.ts +58 -0
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +97 -0
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +73 -0
- package/src/Redux/ActionsReducers/PopupRedux.js +238 -0
- package/src/Redux/ActionsReducers/QueryRedux.d.ts +44 -0
- package/src/Redux/ActionsReducers/QueryRedux.js +76 -0
- package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +28 -0
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +47 -0
- package/src/Redux/ActionsReducers/ScheduleRedux.d.ts +216 -0
- package/src/Redux/ActionsReducers/ScheduleRedux.js +345 -0
- package/src/Redux/ActionsReducers/ShortcutRedux.d.ts +49 -0
- package/src/Redux/ActionsReducers/ShortcutRedux.js +86 -0
- package/src/Redux/ActionsReducers/SmartEditRedux.d.ts +25 -0
- package/src/Redux/ActionsReducers/SmartEditRedux.js +26 -0
- package/src/Redux/ActionsReducers/SparklineColumnRedux.d.ts +35 -0
- package/src/Redux/ActionsReducers/SparklineColumnRedux.js +70 -0
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +227 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +470 -0
- package/src/Redux/ActionsReducers/SystemStatusRedux.d.ts +17 -0
- package/src/Redux/ActionsReducers/SystemStatusRedux.js +18 -0
- package/src/Redux/ActionsReducers/TeamSharingRedux.d.ts +55 -0
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +100 -0
- package/src/Redux/ActionsReducers/ThemeRedux.d.ts +35 -0
- package/src/Redux/ActionsReducers/ThemeRedux.js +57 -0
- package/src/Redux/ActionsReducers/ToolPanelRedux.d.ts +60 -0
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +110 -0
- package/src/Redux/ActionsReducers/utils.d.ts +8 -0
- package/src/Redux/ActionsReducers/utils.js +18 -0
- package/src/Redux/DeadRedux.d.ts +25 -0
- package/src/Redux/DeadRedux.js +59 -0
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +12 -0
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +104 -0
- package/src/Redux/Store/AdaptableReduxMerger.d.ts +13 -0
- package/src/Redux/Store/AdaptableReduxMerger.js +118 -0
- package/src/Redux/Store/AdaptableStore.d.ts +46 -0
- package/src/Redux/Store/AdaptableStore.js +1258 -0
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +14 -0
- package/src/Redux/Store/Interface/IAdaptableStore.js +2 -0
- package/src/Redux/Store/Interface/IStorageEngine.d.ts +9 -0
- package/src/Redux/Store/Interface/IStorageEngine.js +2 -0
- package/src/Strategy/AdaptableModuleBase.d.ts +55 -0
- package/src/Strategy/AdaptableModuleBase.js +254 -0
- package/src/Strategy/AlertModule.d.ts +27 -0
- package/src/Strategy/AlertModule.js +367 -0
- package/src/Strategy/BulkUpdateModule.d.ts +12 -0
- package/src/Strategy/BulkUpdateModule.js +148 -0
- package/src/Strategy/CalculatedColumnModule.d.ts +17 -0
- package/src/Strategy/CalculatedColumnModule.js +63 -0
- package/src/Strategy/CellSummaryModule.d.ts +13 -0
- package/src/Strategy/CellSummaryModule.js +97 -0
- package/src/Strategy/ChangeHistoryModule.d.ts +8 -0
- package/src/Strategy/ChangeHistoryModule.js +24 -0
- package/src/Strategy/ConditionalStyleModule.d.ts +22 -0
- package/src/Strategy/ConditionalStyleModule.js +184 -0
- package/src/Strategy/CustomSortModule.d.ts +16 -0
- package/src/Strategy/CustomSortModule.js +50 -0
- package/src/Strategy/DashboardModule.d.ts +13 -0
- package/src/Strategy/DashboardModule.js +76 -0
- package/src/Strategy/DataSourceModule.d.ts +12 -0
- package/src/Strategy/DataSourceModule.js +26 -0
- package/src/Strategy/ExportModule.d.ts +29 -0
- package/src/Strategy/ExportModule.js +193 -0
- package/src/Strategy/FilterModule.d.ts +18 -0
- package/src/Strategy/FilterModule.js +80 -0
- package/src/Strategy/FormatColumnModule.d.ts +18 -0
- package/src/Strategy/FormatColumnModule.js +213 -0
- package/src/Strategy/FreeTextColumnModule.d.ts +16 -0
- package/src/Strategy/FreeTextColumnModule.js +47 -0
- package/src/Strategy/GridInfoModule.d.ts +12 -0
- package/src/Strategy/GridInfoModule.js +78 -0
- package/src/Strategy/Interface/IBulkUpdateModule.d.ts +13 -0
- package/src/Strategy/Interface/IBulkUpdateModule.js +2 -0
- package/src/Strategy/Interface/ICellSummaryModule.d.ts +6 -0
- package/src/Strategy/Interface/ICellSummaryModule.js +2 -0
- package/src/Strategy/Interface/IConditionalStyleModule.d.ts +6 -0
- package/src/Strategy/Interface/IConditionalStyleModule.js +2 -0
- package/src/Strategy/Interface/IExportModule.d.ts +6 -0
- package/src/Strategy/Interface/IExportModule.js +2 -0
- package/src/Strategy/Interface/IModule.d.ts +54 -0
- package/src/Strategy/Interface/IModule.js +2 -0
- package/src/Strategy/Interface/IModuleActionReturn.d.ts +5 -0
- package/src/Strategy/Interface/IModuleActionReturn.js +2 -0
- package/src/Strategy/Interface/IPlusMinusModule.d.ts +7 -0
- package/src/Strategy/Interface/IPlusMinusModule.js +2 -0
- package/src/Strategy/Interface/IScheduleModule.d.ts +4 -0
- package/src/Strategy/Interface/IScheduleModule.js +2 -0
- package/src/Strategy/Interface/IShortcutModule.d.ts +4 -0
- package/src/Strategy/Interface/IShortcutModule.js +2 -0
- package/src/Strategy/Interface/ISmartEditModule.d.ts +10 -0
- package/src/Strategy/Interface/ISmartEditModule.js +2 -0
- package/src/Strategy/LayoutModule.d.ts +19 -0
- package/src/Strategy/LayoutModule.js +112 -0
- package/src/Strategy/PlusMinusModule.d.ts +26 -0
- package/src/Strategy/PlusMinusModule.js +183 -0
- package/src/Strategy/QueryModule.d.ts +13 -0
- package/src/Strategy/QueryModule.js +29 -0
- package/src/Strategy/QuickSearchModule.d.ts +6 -0
- package/src/Strategy/QuickSearchModule.js +12 -0
- package/src/Strategy/ScheduleModule.d.ts +13 -0
- package/src/Strategy/ScheduleModule.js +120 -0
- package/src/Strategy/ShortcutModule.d.ts +18 -0
- package/src/Strategy/ShortcutModule.js +72 -0
- package/src/Strategy/SmartEditModule.d.ts +17 -0
- package/src/Strategy/SmartEditModule.js +168 -0
- package/src/Strategy/StateManagementModule.d.ts +6 -0
- package/src/Strategy/StateManagementModule.js +12 -0
- package/src/Strategy/SystemStatusModule.d.ts +10 -0
- package/src/Strategy/SystemStatusModule.js +34 -0
- package/src/Strategy/TeamSharingModule.d.ts +11 -0
- package/src/Strategy/TeamSharingModule.js +73 -0
- package/src/Strategy/ThemeModule.d.ts +9 -0
- package/src/Strategy/ThemeModule.js +18 -0
- package/src/Strategy/ToolPanelModule.d.ts +8 -0
- package/src/Strategy/ToolPanelModule.js +43 -0
- package/src/Utilities/Cancelable.d.ts +4 -0
- package/src/Utilities/Cancelable.js +2 -0
- package/src/Utilities/Constants/ConfigConstants.d.ts +10 -0
- package/src/Utilities/Constants/ConfigConstants.js +14 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +9 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +12 -0
- package/src/Utilities/Constants/GeneralConstants.d.ts +66 -0
- package/src/Utilities/Constants/GeneralConstants.js +92 -0
- package/src/Utilities/Constants/ModuleConstants.d.ts +32 -0
- package/src/Utilities/Constants/ModuleConstants.js +34 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.d.ts +2 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +213 -0
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.d.ts +2 -0
- package/src/Utilities/Defaults/DefaultCategoryChartProperties.js +56 -0
- package/src/Utilities/Defaults/DefaultPieChartProperties.d.ts +2 -0
- package/src/Utilities/Defaults/DefaultPieChartProperties.js +13 -0
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.d.ts +2 -0
- package/src/Utilities/Defaults/DefaultSparklinesChartProperties.js +25 -0
- package/src/Utilities/Emitter.d.ts +21 -0
- package/src/Utilities/Emitter.js +232 -0
- package/src/Utilities/ExpressionFunctions/ExpressionEvaluationError.d.ts +4 -0
- package/src/Utilities/ExpressionFunctions/ExpressionEvaluationError.js +11 -0
- package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.d.ts +6 -0
- package/src/Utilities/ExpressionFunctions/aggregationExpressionFunctions.js +211 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +53 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +601 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +6 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +421 -0
- package/src/Utilities/ExpressionFunctions/reactiveExpressionFunctionUtils.d.ts +12 -0
- package/src/Utilities/ExpressionFunctions/reactiveExpressionFunctionUtils.js +87 -0
- package/src/Utilities/ExpressionFunctions/types.d.ts +7 -0
- package/src/Utilities/ExpressionFunctions/types.js +2 -0
- package/src/Utilities/Extensions/ArrayExtensions.d.ts +67 -0
- package/src/Utilities/Extensions/ArrayExtensions.js +313 -0
- package/src/Utilities/Extensions/EnumExtensions.d.ts +11 -0
- package/src/Utilities/Extensions/EnumExtensions.js +41 -0
- package/src/Utilities/Extensions/NumberExtensions.d.ts +5 -0
- package/src/Utilities/Extensions/NumberExtensions.js +24 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +39 -0
- package/src/Utilities/Extensions/StringExtensions.js +111 -0
- package/src/Utilities/Extensions/TypeExtensions.d.ts +44 -0
- package/src/Utilities/Extensions/TypeExtensions.js +2 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +25 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +156 -0
- package/src/Utilities/Helpers/CalendarHelper.d.ts +25 -0
- package/src/Utilities/Helpers/CalendarHelper.js +174 -0
- package/src/Utilities/Helpers/DateHelper.d.ts +4 -0
- package/src/Utilities/Helpers/DateHelper.js +38 -0
- package/src/Utilities/Helpers/FormatHelper.d.ts +11 -0
- package/src/Utilities/Helpers/FormatHelper.js +107 -0
- package/src/Utilities/Helpers/Helper.d.ts +38 -0
- package/src/Utilities/Helpers/Helper.js +264 -0
- package/src/Utilities/Helpers/LoggingHelper.d.ts +15 -0
- package/src/Utilities/Helpers/LoggingHelper.js +110 -0
- package/src/Utilities/Helpers/PreviewHelper.d.ts +11 -0
- package/src/Utilities/Helpers/PreviewHelper.js +73 -0
- package/src/Utilities/Helpers/StyleHelper.d.ts +5 -0
- package/src/Utilities/Helpers/StyleHelper.js +44 -0
- package/src/Utilities/Interface/AdaptableToolPanelContext.d.ts +4 -0
- package/src/Utilities/Interface/AdaptableToolPanelContext.js +2 -0
- package/src/Utilities/Interface/ColumnFilterContext.d.ts +7 -0
- package/src/Utilities/Interface/ColumnFilterContext.js +2 -0
- package/src/Utilities/Interface/IPPStyle.d.ts +31 -0
- package/src/Utilities/Interface/IPPStyle.js +2 -0
- package/src/Utilities/Interface/KeyValuePair.d.ts +7 -0
- package/src/Utilities/Interface/KeyValuePair.js +2 -0
- package/src/Utilities/Interface/MessagePopups.d.ts +59 -0
- package/src/Utilities/Interface/MessagePopups.js +2 -0
- package/src/Utilities/Interface/Preview.d.ts +17 -0
- package/src/Utilities/Interface/Preview.js +2 -0
- package/src/Utilities/Interface/ProgressIndicator.d.ts +4 -0
- package/src/Utilities/Interface/ProgressIndicator.js +2 -0
- package/src/Utilities/MenuItem.d.ts +28 -0
- package/src/Utilities/MenuItem.js +37 -0
- package/src/Utilities/ObjectFactory.d.ts +116 -0
- package/src/Utilities/ObjectFactory.js +491 -0
- package/src/Utilities/Services/AlertService.d.ts +15 -0
- package/src/Utilities/Services/AlertService.js +70 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +11 -0
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +67 -0
- package/src/Utilities/Services/DataService.d.ts +27 -0
- package/src/Utilities/Services/DataService.js +96 -0
- package/src/Utilities/Services/EntitlementService.d.ts +14 -0
- package/src/Utilities/Services/EntitlementService.js +51 -0
- package/src/Utilities/Services/ExpressionService.d.ts +34 -0
- package/src/Utilities/Services/ExpressionService.js +195 -0
- package/src/Utilities/Services/Interface/IAdaptableService.d.ts +3 -0
- package/src/Utilities/Services/Interface/IAdaptableService.js +2 -0
- package/src/Utilities/Services/Interface/IAlertService.d.ts +16 -0
- package/src/Utilities/Services/Interface/IAlertService.js +2 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +7 -0
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.js +2 -0
- package/src/Utilities/Services/Interface/IDataService.d.ts +12 -0
- package/src/Utilities/Services/Interface/IDataService.js +2 -0
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +10 -0
- package/src/Utilities/Services/Interface/IEntitlementService.js +2 -0
- package/src/Utilities/Services/Interface/IExpressionService.d.ts +26 -0
- package/src/Utilities/Services/Interface/IExpressionService.js +2 -0
- package/src/Utilities/Services/Interface/ILicenseService.d.ts +2 -0
- package/src/Utilities/Services/Interface/ILicenseService.js +2 -0
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +14 -0
- package/src/Utilities/Services/Interface/IMetamodelService.js +2 -0
- package/src/Utilities/Services/Interface/IModuleService.d.ts +16 -0
- package/src/Utilities/Services/Interface/IModuleService.js +2 -0
- package/src/Utilities/Services/Interface/IReportService.d.ts +22 -0
- package/src/Utilities/Services/Interface/IReportService.js +2 -0
- package/src/Utilities/Services/Interface/ITeamSharingService.d.ts +14 -0
- package/src/Utilities/Services/Interface/ITeamSharingService.js +2 -0
- package/src/Utilities/Services/Interface/IValidationService.d.ts +12 -0
- package/src/Utilities/Services/Interface/IValidationService.js +2 -0
- package/src/Utilities/Services/LicenseService.d.ts +27 -0
- package/src/Utilities/Services/LicenseService.js +145 -0
- package/src/Utilities/Services/MetamodelService.d.ts +11 -0
- package/src/Utilities/Services/MetamodelService.js +70 -0
- package/src/Utilities/Services/ModuleService.d.ts +20 -0
- package/src/Utilities/Services/ModuleService.js +147 -0
- package/src/Utilities/Services/ReportService.d.ts +30 -0
- package/src/Utilities/Services/ReportService.js +353 -0
- package/src/Utilities/Services/TeamSharingService.d.ts +22 -0
- package/src/Utilities/Services/TeamSharingService.js +183 -0
- package/src/Utilities/Services/ValidationService.d.ts +17 -0
- package/src/Utilities/Services/ValidationService.js +112 -0
- package/src/Utilities/getScrollbarSize.d.ts +2 -0
- package/src/Utilities/getScrollbarSize.js +30 -0
- package/src/Utilities/isAdaptableObject.d.ts +2 -0
- package/src/Utilities/isAdaptableObject.js +7 -0
- package/src/Utilities/isMacLike.d.ts +1 -0
- package/src/Utilities/isMacLike.js +7 -0
- package/src/Utilities/license/LicenseDetails.d.ts +10 -0
- package/src/Utilities/license/LicenseDetails.js +2 -0
- package/src/Utilities/license/crc32.d.ts +1 -0
- package/src/Utilities/license/crc32.js +47 -0
- package/src/Utilities/license/decode.d.ts +6 -0
- package/src/Utilities/license/decode.js +67 -0
- package/src/Utilities/reorder.d.ts +1 -0
- package/src/Utilities/reorder.js +16 -0
- package/src/Utilities/sortWithOrder.d.ts +11 -0
- package/src/Utilities/sortWithOrder.js +54 -0
- package/src/Utilities/waitForCondition.d.ts +1 -0
- package/src/Utilities/waitForCondition.js +28 -0
- package/src/View/AdaptableContext.d.ts +5 -0
- package/src/View/AdaptableContext.js +10 -0
- package/src/View/AdaptablePopover/index.d.ts +17 -0
- package/src/View/AdaptablePopover/index.js +37 -0
- package/src/View/AdaptableView.d.ts +5 -0
- package/src/View/AdaptableView.js +60 -0
- package/src/View/AdaptableViewFactory.d.ts +7 -0
- package/src/View/AdaptableViewFactory.js +89 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +12 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +274 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.d.ts +8 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +124 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +9 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +74 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +19 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +57 -0
- package/src/View/AdaptableWizardView/helper.d.ts +19 -0
- package/src/View/AdaptableWizardView/helper.js +91 -0
- package/src/View/AdaptableWizardView/index.d.ts +25 -0
- package/src/View/AdaptableWizardView/index.js +111 -0
- package/src/View/Alert/AlertEntityRow.d.ts +11 -0
- package/src/View/Alert/AlertEntityRow.js +33 -0
- package/src/View/Alert/AlertPopup.d.ts +42 -0
- package/src/View/Alert/AlertPopup.js +205 -0
- package/src/View/Alert/AlertSharedEntity.d.ts +5 -0
- package/src/View/Alert/AlertSharedEntity.js +19 -0
- package/src/View/Alert/AlertViewPanel.d.ts +22 -0
- package/src/View/Alert/AlertViewPanel.js +57 -0
- package/src/View/Alert/AlertsPanel.d.ts +14 -0
- package/src/View/Alert/AlertsPanel.js +43 -0
- package/src/View/Alert/FlashingAlertEntityRow.d.ts +7 -0
- package/src/View/Alert/FlashingAlertEntityRow.js +22 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +8 -0
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +67 -0
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +13 -0
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +142 -0
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +8 -0
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +93 -0
- package/src/View/Alert/Wizard/AlertRulesWizardSection.d.ts +8 -0
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +24 -0
- package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +7 -0
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +9 -0
- package/src/View/Alert/Wizard/AlertSelectQueryWizard.d.ts +19 -0
- package/src/View/Alert/Wizard/AlertSelectQueryWizard.js +59 -0
- package/src/View/Alert/Wizard/AlertWizard.d.ts +6 -0
- package/src/View/Alert/Wizard/AlertWizard.js +75 -0
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.d.ts +7 -0
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +26 -0
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.d.ts +8 -0
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +56 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertDurationWizardSection.d.ts +10 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertDurationWizardSection.js +60 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertRulesWizardSection.d.ts +7 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertRulesWizardSection.js +57 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertScopeWizardSection.d.ts +7 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertScopeWizardSection.js +9 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertStyleWizardSection.d.ts +10 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertStyleWizardSection.js +48 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertWizard.d.ts +6 -0
- package/src/View/Alert/Wizard/FlashingAlertWizard/FlashingAlertWizard.js +89 -0
- package/src/View/Alert/Wizard/isValidAlertRules.d.ts +4 -0
- package/src/View/Alert/Wizard/isValidAlertRules.js +44 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.d.ts +31 -0
- package/src/View/BulkUpdate/BulkUpdatePopup.js +112 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.d.ts +29 -0
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +107 -0
- package/src/View/CalculatedColumn/CalculatedColumnEntityRow.d.ts +9 -0
- package/src/View/CalculatedColumn/CalculatedColumnEntityRow.js +28 -0
- package/src/View/CalculatedColumn/CalculatedColumnPopup.d.ts +25 -0
- package/src/View/CalculatedColumn/CalculatedColumnPopup.js +117 -0
- package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.d.ts +5 -0
- package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +20 -0
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +19 -0
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +72 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +9 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +49 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +9 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +143 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +6 -0
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +45 -0
- package/src/View/CellSummary/CellSummaryDetails.d.ts +9 -0
- package/src/View/CellSummary/CellSummaryDetails.js +35 -0
- package/src/View/CellSummary/CellSummaryPopover.d.ts +8 -0
- package/src/View/CellSummary/CellSummaryPopover.js +12 -0
- package/src/View/CellSummary/CellSummaryPopup.d.ts +15 -0
- package/src/View/CellSummary/CellSummaryPopup.js +29 -0
- package/src/View/CellSummary/CellSummaryViewPanel.d.ts +25 -0
- package/src/View/CellSummary/CellSummaryViewPanel.js +112 -0
- package/src/View/ChangeHistory/ChangeHistoryGrid.d.ts +9 -0
- package/src/View/ChangeHistory/ChangeHistoryGrid.js +306 -0
- package/src/View/ChangeHistory/ChangeHistoryPopup.d.ts +12 -0
- package/src/View/ChangeHistory/ChangeHistoryPopup.js +40 -0
- package/src/View/ColorPicker.d.ts +8 -0
- package/src/View/ColorPicker.js +22 -0
- package/src/View/Components/AdaptableDateInput/index.d.ts +5 -0
- package/src/View/Components/AdaptableDateInput/index.js +37 -0
- package/src/View/Components/AdaptableInput/index.d.ts +5 -0
- package/src/View/Components/AdaptableInput/index.js +20 -0
- package/src/View/Components/AdaptableObjectCollection/index.d.ts +12 -0
- package/src/View/Components/AdaptableObjectCollection/index.js +16 -0
- package/src/View/Components/AdaptableObjectRow/index.d.ts +12 -0
- package/src/View/Components/AdaptableObjectRow/index.js +24 -0
- package/src/View/Components/Buttons/ButtonApply.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonApply.js +12 -0
- package/src/View/Components/Buttons/ButtonBase/index.d.ts +23 -0
- package/src/View/Components/Buttons/ButtonBase/index.js +74 -0
- package/src/View/Components/Buttons/ButtonClear.d.ts +9 -0
- package/src/View/Components/Buttons/ButtonClear.js +12 -0
- package/src/View/Components/Buttons/ButtonClone.d.ts +3 -0
- package/src/View/Components/Buttons/ButtonClone.js +9 -0
- package/src/View/Components/Buttons/ButtonClose.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonClose.js +12 -0
- package/src/View/Components/Buttons/ButtonConfigure.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonConfigure.js +12 -0
- package/src/View/Components/Buttons/ButtonDelete.d.ts +18 -0
- package/src/View/Components/Buttons/ButtonDelete.js +45 -0
- package/src/View/Components/Buttons/ButtonEdit.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonEdit.js +12 -0
- package/src/View/Components/Buttons/ButtonExpand.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonExpand.js +12 -0
- package/src/View/Components/Buttons/ButtonExport.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonExport.js +12 -0
- package/src/View/Components/Buttons/ButtonFunction.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonFunction.js +12 -0
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonGeneral.js +12 -0
- package/src/View/Components/Buttons/ButtonInfo.d.ts +9 -0
- package/src/View/Components/Buttons/ButtonInfo.js +12 -0
- package/src/View/Components/Buttons/ButtonInvalid.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonInvalid.js +12 -0
- package/src/View/Components/Buttons/ButtonLogin.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonLogin.js +12 -0
- package/src/View/Components/Buttons/ButtonLogout.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonLogout.js +12 -0
- package/src/View/Components/Buttons/ButtonMaximise.d.ts +8 -0
- package/src/View/Components/Buttons/ButtonMaximise.js +12 -0
- package/src/View/Components/Buttons/ButtonMinimise.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonMinimise.js +12 -0
- package/src/View/Components/Buttons/ButtonNew.d.ts +3 -0
- package/src/View/Components/Buttons/ButtonNew.js +9 -0
- package/src/View/Components/Buttons/ButtonNewPage.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonNewPage.js +13 -0
- package/src/View/Components/Buttons/ButtonPause.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonPause.js +12 -0
- package/src/View/Components/Buttons/ButtonPlay.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonPlay.js +13 -0
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +4 -0
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +8 -0
- package/src/View/Components/Buttons/ButtonSave.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonSave.js +12 -0
- package/src/View/Components/Buttons/ButtonSchedule.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonSchedule.js +12 -0
- package/src/View/Components/Buttons/ButtonShare.d.ts +15 -0
- package/src/View/Components/Buttons/ButtonShare.js +23 -0
- package/src/View/Components/Buttons/ButtonShow.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonShow.js +12 -0
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonShowChart.js +12 -0
- package/src/View/Components/Buttons/ButtonStop.d.ts +7 -0
- package/src/View/Components/Buttons/ButtonStop.js +12 -0
- package/src/View/Components/Buttons/ButtonUndo.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonUndo.js +12 -0
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +39 -0
- package/src/View/Components/Buttons/EntityListActionButtons.js +79 -0
- package/src/View/Components/Buttons/SuspendToggleButton.d.ts +12 -0
- package/src/View/Components/Buttons/SuspendToggleButton.js +17 -0
- package/src/View/Components/ColumnSelector/index.d.ts +17 -0
- package/src/View/Components/ColumnSelector/index.js +28 -0
- package/src/View/Components/EntityRowItem.d.ts +7 -0
- package/src/View/Components/EntityRowItem.js +13 -0
- package/src/View/Components/EntityRulesEditor/index.d.ts +42 -0
- package/src/View/Components/EntityRulesEditor/index.js +174 -0
- package/src/View/Components/ExpressionWizard.d.ts +24 -0
- package/src/View/Components/ExpressionWizard.js +79 -0
- package/src/View/Components/FilterForm/FilterForm.d.ts +63 -0
- package/src/View/Components/FilterForm/FilterForm.js +262 -0
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +17 -0
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +68 -0
- package/src/View/Components/FilterForm/ListBoxMenu.d.ts +14 -0
- package/src/View/Components/FilterForm/ListBoxMenu.js +33 -0
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +50 -0
- package/src/View/Components/FilterForm/QuickFilterForm.js +283 -0
- package/src/View/Components/FilterForm/Waiting.d.ts +8 -0
- package/src/View/Components/FilterForm/Waiting.js +18 -0
- package/src/View/Components/Forms/AdaptableForm.d.ts +6 -0
- package/src/View/Components/Forms/AdaptableForm.js +21 -0
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +10 -0
- package/src/View/Components/Forms/AdaptableFormControlTextClear.js +39 -0
- package/src/View/Components/ListBox/DualListBoxEditor.d.ts +22 -0
- package/src/View/Components/ListBox/DualListBoxEditor.js +519 -0
- package/src/View/Components/ListBox/ListBoxFilterSortComponent.d.ts +13 -0
- package/src/View/Components/ListBox/ListBoxFilterSortComponent.js +31 -0
- package/src/View/Components/ModuleProfile.d.ts +8 -0
- package/src/View/Components/ModuleProfile.js +18 -0
- package/src/View/Components/ModuleSummary/ModuleDetail.d.ts +23 -0
- package/src/View/Components/ModuleSummary/ModuleDetail.js +19 -0
- package/src/View/Components/ModuleSummary/ModuleHeader.d.ts +15 -0
- package/src/View/Components/ModuleSummary/ModuleHeader.js +20 -0
- package/src/View/Components/ModuleSummary/SummaryRowItem.d.ts +7 -0
- package/src/View/Components/ModuleSummary/SummaryRowItem.js +17 -0
- package/src/View/Components/ModuleValueSelector/index.d.ts +5 -0
- package/src/View/Components/ModuleValueSelector/index.js +34 -0
- package/src/View/Components/NewScopeComponent.d.ts +24 -0
- package/src/View/Components/NewScopeComponent.js +146 -0
- package/src/View/Components/Panels/FilterFormPanel.d.ts +22 -0
- package/src/View/Components/Panels/FilterFormPanel.js +41 -0
- package/src/View/Components/Panels/PanelDashboard/index.d.ts +15 -0
- package/src/View/Components/Panels/PanelDashboard/index.js +21 -0
- package/src/View/Components/Panels/PanelToolPanel/index.d.ts +14 -0
- package/src/View/Components/Panels/PanelToolPanel/index.js +31 -0
- package/src/View/Components/Panels/PanelWithButton.d.ts +22 -0
- package/src/View/Components/Panels/PanelWithButton.js +36 -0
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.d.ts +11 -0
- package/src/View/Components/Panels/PanelWithIImageThreeButtons.js +28 -0
- package/src/View/Components/Panels/PanelWithImage.d.ts +21 -0
- package/src/View/Components/Panels/PanelWithImage.js +40 -0
- package/src/View/Components/Panels/PanelWithRow.d.ts +10 -0
- package/src/View/Components/Panels/PanelWithRow.js +21 -0
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +12 -0
- package/src/View/Components/Panels/PanelWithTwoButtons.js +20 -0
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +8 -0
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +31 -0
- package/src/View/Components/Popups/AdaptableChart.d.ts +18 -0
- package/src/View/Components/Popups/AdaptableChart.js +40 -0
- package/src/View/Components/Popups/AdaptableLoadingScreen.d.ts +8 -0
- package/src/View/Components/Popups/AdaptableLoadingScreen.js +18 -0
- package/src/View/Components/Popups/AdaptablePopup.d.ts +23 -0
- package/src/View/Components/Popups/AdaptablePopup.js +59 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +10 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.js +73 -0
- package/src/View/Components/Popups/AdaptablePopupConfirmation.d.ts +29 -0
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +56 -0
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +18 -0
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +47 -0
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.d.ts +9 -0
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +46 -0
- package/src/View/Components/Popups/AdaptableToaster.d.ts +7 -0
- package/src/View/Components/Popups/AdaptableToaster.js +33 -0
- package/src/View/Components/Popups/PopupContext.d.ts +7 -0
- package/src/View/Components/Popups/PopupContext.js +12 -0
- package/src/View/Components/PreviewResultsPanel.d.ts +16 -0
- package/src/View/Components/PreviewResultsPanel.js +61 -0
- package/src/View/Components/RangesComponent.d.ts +34 -0
- package/src/View/Components/RangesComponent.js +186 -0
- package/src/View/Components/ScopeComponent.d.ts +24 -0
- package/src/View/Components/ScopeComponent.js +135 -0
- package/src/View/Components/Selectors/ColumnSelector.d.ts +17 -0
- package/src/View/Components/Selectors/ColumnSelector.js +54 -0
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +31 -0
- package/src/View/Components/Selectors/ColumnValueSelector.js +106 -0
- package/src/View/Components/SharedProps/BaseProps.d.ts +8 -0
- package/src/View/Components/SharedProps/BaseProps.js +2 -0
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.d.ts +7 -0
- package/src/View/Components/SharedProps/ChartDisplayPopupPropsBase.js +2 -0
- package/src/View/Components/SharedProps/ConfigEntityRowProps.d.ts +30 -0
- package/src/View/Components/SharedProps/ConfigEntityRowProps.js +2 -0
- package/src/View/Components/SharedProps/EditableConfigEntityState.d.ts +14 -0
- package/src/View/Components/SharedProps/EditableConfigEntityState.js +10 -0
- package/src/View/Components/SharedProps/ModuleSummaryProps.d.ts +9 -0
- package/src/View/Components/SharedProps/ModuleSummaryProps.js +2 -0
- package/src/View/Components/SharedProps/ModuleViewPopupProps.d.ts +25 -0
- package/src/View/Components/SharedProps/ModuleViewPopupProps.js +2 -0
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.d.ts +13 -0
- package/src/View/Components/SharedProps/ToolPanelModuleViewPopupProps.js +2 -0
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.d.ts +14 -0
- package/src/View/Components/SharedProps/ToolbarModuleViewPopupProps.js +2 -0
- package/src/View/Components/SharedProps/ViewPanelProps.d.ts +9 -0
- package/src/View/Components/SharedProps/ViewPanelProps.js +2 -0
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +4 -0
- package/src/View/Components/SharedProps/WizardScopeState.js +2 -0
- package/src/View/Components/StyleComponent.d.ts +32 -0
- package/src/View/Components/StyleComponent.js +153 -0
- package/src/View/Components/StyleVisualItem.d.ts +9 -0
- package/src/View/Components/StyleVisualItem.js +45 -0
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +43 -0
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +296 -0
- package/src/View/Components/ToolPanel/CustomToolPanelContent.d.ts +6 -0
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +71 -0
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +27 -0
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +110 -0
- package/src/View/Components/ToolPanel/ToolPanelWrapper.d.ts +14 -0
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +61 -0
- package/src/View/Components/ValueSelector/index.d.ts +38 -0
- package/src/View/Components/ValueSelector/index.js +203 -0
- package/src/View/Components/WizardSummaryPage.d.ts +7 -0
- package/src/View/Components/WizardSummaryPage.js +23 -0
- package/src/View/Components/WizardSummaryRow.d.ts +9 -0
- package/src/View/Components/WizardSummaryRow.js +16 -0
- package/src/View/ConditionalStyle/ConditionalStyleEntityRow.d.ts +5 -0
- package/src/View/ConditionalStyle/ConditionalStyleEntityRow.js +26 -0
- package/src/View/ConditionalStyle/ConditionalStylePopup.d.ts +30 -0
- package/src/View/ConditionalStyle/ConditionalStylePopup.js +144 -0
- package/src/View/ConditionalStyle/ConditionalStyleSharedEntity.d.ts +5 -0
- package/src/View/ConditionalStyle/ConditionalStyleSharedEntity.js +23 -0
- package/src/View/ConditionalStyle/ConditionalStyleSummary.d.ts +25 -0
- package/src/View/ConditionalStyle/ConditionalStyleSummary.js +107 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.d.ts +9 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +42 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +42 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +22 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.d.ts +6 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +78 -0
- package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.d.ts +1 -0
- package/src/View/ConditionalStyle/Wizard/DEFAULT_PREDICATE_ID_FOR_CONDITIONAL_STYLE.js +4 -0
- package/src/View/CustomSort/CustomSortEntityRow.d.ts +10 -0
- package/src/View/CustomSort/CustomSortEntityRow.js +32 -0
- package/src/View/CustomSort/CustomSortPopup.d.ts +27 -0
- package/src/View/CustomSort/CustomSortPopup.js +138 -0
- package/src/View/CustomSort/CustomSortSharedEntity.d.ts +6 -0
- package/src/View/CustomSort/CustomSortSharedEntity.js +24 -0
- package/src/View/CustomSort/CustomSortSummary.d.ts +21 -0
- package/src/View/CustomSort/CustomSortSummary.js +110 -0
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +9 -0
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +51 -0
- package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.d.ts +15 -0
- package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.js +36 -0
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.d.ts +8 -0
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +53 -0
- package/src/View/CustomSort/Wizard/CustomSortWizard.d.ts +7 -0
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +45 -0
- package/src/View/Dashboard/CustomToolbarWrapper.d.ts +7 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +67 -0
- package/src/View/Dashboard/Dashboard.d.ts +27 -0
- package/src/View/Dashboard/Dashboard.js +251 -0
- package/src/View/Dashboard/DashboardPopup.d.ts +27 -0
- package/src/View/Dashboard/DashboardPopup.js +101 -0
- package/src/View/Dashboard/DashboardViewPanel.d.ts +17 -0
- package/src/View/Dashboard/DashboardViewPanel.js +39 -0
- package/src/View/Dashboard/ModuleToolbarWrapper.d.ts +9 -0
- package/src/View/Dashboard/ModuleToolbarWrapper.js +16 -0
- package/src/View/DataSource/DataSourceEntityRow.d.ts +12 -0
- package/src/View/DataSource/DataSourceEntityRow.js +29 -0
- package/src/View/DataSource/DataSourcePopup.d.ts +28 -0
- package/src/View/DataSource/DataSourcePopup.js +97 -0
- package/src/View/DataSource/DataSourceViewPanel.d.ts +19 -0
- package/src/View/DataSource/DataSourceViewPanel.js +67 -0
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +2 -0
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +17 -0
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +8 -0
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +42 -0
- package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +9 -0
- package/src/View/DataSource/Wizard/DataSourceWizard.js +28 -0
- package/src/View/Export/ExportCustomDestinationDialog.d.ts +11 -0
- package/src/View/Export/ExportCustomDestinationDialog.js +47 -0
- package/src/View/Export/ExportCustomDestinationFormPopups.d.ts +5 -0
- package/src/View/Export/ExportCustomDestinationFormPopups.js +15 -0
- package/src/View/Export/ExportPopup.d.ts +34 -0
- package/src/View/Export/ExportPopup.js +139 -0
- package/src/View/Export/ExportSharedEntity.d.ts +5 -0
- package/src/View/Export/ExportSharedEntity.js +16 -0
- package/src/View/Export/ExportViewPanel.d.ts +31 -0
- package/src/View/Export/ExportViewPanel.js +159 -0
- package/src/View/Export/ProgressIndicator.d.ts +6 -0
- package/src/View/Export/ProgressIndicator.js +25 -0
- package/src/View/Export/ReportEntityRow.d.ts +10 -0
- package/src/View/Export/ReportEntityRow.js +49 -0
- package/src/View/Export/Wizard/NewReportWizard.d.ts +6 -0
- package/src/View/Export/Wizard/NewReportWizard.js +48 -0
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +20 -0
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +72 -0
- package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +8 -0
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +70 -0
- package/src/View/Export/Wizard/ReportNameWizardSection.d.ts +9 -0
- package/src/View/Export/Wizard/ReportNameWizardSection.js +44 -0
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +20 -0
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +72 -0
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +8 -0
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +71 -0
- package/src/View/Export/Wizard/ReportScopeWizard.d.ts +17 -0
- package/src/View/Export/Wizard/ReportScopeWizard.js +52 -0
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +21 -0
- package/src/View/Export/Wizard/ReportSettingsWizard.js +62 -0
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +15 -0
- package/src/View/Export/Wizard/ReportSummaryWizard.js +44 -0
- package/src/View/Export/Wizard/ReportWizard.d.ts +7 -0
- package/src/View/Export/Wizard/ReportWizard.js +50 -0
- package/src/View/Filter/ActiveFiltersPanel.d.ts +16 -0
- package/src/View/Filter/ActiveFiltersPanel.js +37 -0
- package/src/View/Filter/FilterEntityRow.d.ts +12 -0
- package/src/View/Filter/FilterEntityRow.js +20 -0
- package/src/View/Filter/FilterPopup.d.ts +20 -0
- package/src/View/Filter/FilterPopup.js +50 -0
- package/src/View/Filter/FilterSharedEntity.d.ts +5 -0
- package/src/View/Filter/FilterSharedEntity.js +15 -0
- package/src/View/Filter/FilterSummary.d.ts +15 -0
- package/src/View/Filter/FilterSummary.js +52 -0
- package/src/View/Filter/FilterViewPanel.d.ts +25 -0
- package/src/View/Filter/FilterViewPanel.js +53 -0
- package/src/View/FormatColumn/FormatColumnEntityRow.d.ts +9 -0
- package/src/View/FormatColumn/FormatColumnEntityRow.js +103 -0
- package/src/View/FormatColumn/FormatColumnPopup.d.ts +27 -0
- package/src/View/FormatColumn/FormatColumnPopup.js +133 -0
- package/src/View/FormatColumn/FormatColumnSharedEntity.d.ts +5 -0
- package/src/View/FormatColumn/FormatColumnSharedEntity.js +18 -0
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +20 -0
- package/src/View/FormatColumn/FormatColumnSummary.js +95 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +15 -0
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +349 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +23 -0
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.d.ts +8 -0
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +78 -0
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +10 -0
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +317 -0
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.d.ts +6 -0
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +130 -0
- package/src/View/FreeTextColumn/FreeTextColumnEntityRow.d.ts +5 -0
- package/src/View/FreeTextColumn/FreeTextColumnEntityRow.js +31 -0
- package/src/View/FreeTextColumn/FreeTextColumnPopup.d.ts +25 -0
- package/src/View/FreeTextColumn/FreeTextColumnPopup.js +116 -0
- package/src/View/FreeTextColumn/FreeTextColumnSharedEntity.d.ts +5 -0
- package/src/View/FreeTextColumn/FreeTextColumnSharedEntity.js +24 -0
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +20 -0
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +93 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +18 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +131 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.d.ts +6 -0
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +38 -0
- package/src/View/GridInfo/AdaptableOptionsComponent.d.ts +7 -0
- package/src/View/GridInfo/AdaptableOptionsComponent.js +99 -0
- package/src/View/GridInfo/ColumnInfoComponent.d.ts +20 -0
- package/src/View/GridInfo/ColumnInfoComponent.js +168 -0
- package/src/View/GridInfo/GridInfoPopup.d.ts +16 -0
- package/src/View/GridInfo/GridInfoPopup.js +96 -0
- package/src/View/GridInfo/GridOptionsComponent.d.ts +17 -0
- package/src/View/GridInfo/GridOptionsComponent.js +37 -0
- package/src/View/KeyHint.d.ts +3 -0
- package/src/View/KeyHint.js +9 -0
- package/src/View/Layout/LayoutEntityRow.d.ts +13 -0
- package/src/View/Layout/LayoutEntityRow.js +23 -0
- package/src/View/Layout/LayoutPopup.d.ts +32 -0
- package/src/View/Layout/LayoutPopup.js +176 -0
- package/src/View/Layout/LayoutSharedEntity.d.ts +5 -0
- package/src/View/Layout/LayoutSharedEntity.js +15 -0
- package/src/View/Layout/LayoutViewPanel.d.ts +22 -0
- package/src/View/Layout/LayoutViewPanel.js +83 -0
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.d.ts +27 -0
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +83 -0
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.d.ts +16 -0
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +88 -0
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.d.ts +15 -0
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +69 -0
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.d.ts +15 -0
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +69 -0
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.d.ts +7 -0
- package/src/View/Layout/Wizard/LayoutEditor/droppableIds.js +11 -0
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.d.ts +6 -0
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +25 -0
- package/src/View/Layout/Wizard/LayoutEditor/index.d.ts +9 -0
- package/src/View/Layout/Wizard/LayoutEditor/index.js +428 -0
- package/src/View/Layout/Wizard/LayoutEditor/reducer.d.ts +28 -0
- package/src/View/Layout/Wizard/LayoutEditor/reducer.js +44 -0
- package/src/View/Layout/Wizard/LayoutEditor/utils.d.ts +10 -0
- package/src/View/Layout/Wizard/LayoutEditor/utils.js +13 -0
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +52 -0
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +92 -0
- package/src/View/Layout/Wizard/LayoutWizard.d.ts +9 -0
- package/src/View/Layout/Wizard/LayoutWizard.js +20 -0
- package/src/View/License/LicenseWatermark.d.ts +2 -0
- package/src/View/License/LicenseWatermark.js +58 -0
- package/src/View/License/index.d.ts +1 -0
- package/src/View/License/index.js +5 -0
- package/src/View/PlusMinus/PlusMinusEntityRow.d.ts +9 -0
- package/src/View/PlusMinus/PlusMinusEntityRow.js +24 -0
- package/src/View/PlusMinus/PlusMinusPopup.d.ts +30 -0
- package/src/View/PlusMinus/PlusMinusPopup.js +124 -0
- package/src/View/PlusMinus/PlusMinusSharedEntity.d.ts +5 -0
- package/src/View/PlusMinus/PlusMinusSharedEntity.js +21 -0
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +20 -0
- package/src/View/PlusMinus/PlusMinusSummary.js +101 -0
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.d.ts +9 -0
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +47 -0
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.d.ts +7 -0
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +22 -0
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +13 -0
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +57 -0
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.d.ts +7 -0
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +59 -0
- package/src/View/Query/ExpandedQueryPopup.d.ts +19 -0
- package/src/View/Query/ExpandedQueryPopup.js +62 -0
- package/src/View/Query/NamedQueryEntityRow.d.ts +8 -0
- package/src/View/Query/NamedQueryEntityRow.js +21 -0
- package/src/View/Query/NamedQuerySharedEntity.d.ts +5 -0
- package/src/View/Query/NamedQuerySharedEntity.js +19 -0
- package/src/View/Query/QueryPopup.d.ts +28 -0
- package/src/View/Query/QueryPopup.js +114 -0
- package/src/View/Query/QueryViewPanel.d.ts +31 -0
- package/src/View/Query/QueryViewPanel.js +162 -0
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.d.ts +9 -0
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +34 -0
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.d.ts +9 -0
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +41 -0
- package/src/View/Query/Wizard/NamedQueryWizard.d.ts +6 -0
- package/src/View/Query/Wizard/NamedQueryWizard.js +44 -0
- package/src/View/QuickSearch/QuickSearchPopup.d.ts +12 -0
- package/src/View/QuickSearch/QuickSearchPopup.js +58 -0
- package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +8 -0
- package/src/View/QuickSearch/QuickSearchViewPanel.js +25 -0
- package/src/View/QuickSearch/useQuickSearchDebounced.d.ts +7 -0
- package/src/View/QuickSearch/useQuickSearchDebounced.js +21 -0
- package/src/View/Schedule/ScheduleEntityRow.d.ts +5 -0
- package/src/View/Schedule/ScheduleEntityRow.js +58 -0
- package/src/View/Schedule/SchedulePopup.d.ts +58 -0
- package/src/View/Schedule/SchedulePopup.js +317 -0
- package/src/View/Schedule/Wizard/ScheduleScheduleSummary.d.ts +2 -0
- package/src/View/Schedule/Wizard/ScheduleScheduleSummary.js +14 -0
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.d.ts +10 -0
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +113 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.d.ts +9 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +24 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.d.ts +11 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +46 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.d.ts +9 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +24 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.d.ts +8 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +46 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +11 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +35 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.d.ts +2 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +70 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.d.ts +7 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +37 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/index.d.ts +3 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/index.js +9 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -0
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +55 -0
- package/src/View/Schedule/Wizard/ScheduleWizard.d.ts +7 -0
- package/src/View/Schedule/Wizard/ScheduleWizard.js +39 -0
- package/src/View/Shortcut/ShortcutEntityRow.d.ts +17 -0
- package/src/View/Shortcut/ShortcutEntityRow.js +47 -0
- package/src/View/Shortcut/ShortcutPopup.d.ts +30 -0
- package/src/View/Shortcut/ShortcutPopup.js +121 -0
- package/src/View/Shortcut/ShortcutSharedEntity.d.ts +5 -0
- package/src/View/Shortcut/ShortcutSharedEntity.js +19 -0
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.d.ts +7 -0
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +22 -0
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +10 -0
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +80 -0
- package/src/View/Shortcut/Wizard/ShortcutWizard.d.ts +8 -0
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +55 -0
- package/src/View/Shortcut/shortcutKeys.d.ts +1 -0
- package/src/View/Shortcut/shortcutKeys.js +31 -0
- package/src/View/Shortcut/shortcutOperations.d.ts +2 -0
- package/src/View/Shortcut/shortcutOperations.js +10 -0
- package/src/View/SmartEdit/SmartEditPopup.d.ts +26 -0
- package/src/View/SmartEdit/SmartEditPopup.js +102 -0
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +35 -0
- package/src/View/SmartEdit/SmartEditViewPanel.js +121 -0
- package/src/View/StateManagement/StateManagementPopup.d.ts +16 -0
- package/src/View/StateManagement/StateManagementPopup.js +122 -0
- package/src/View/SystemStatus/SystemStatusEntityRow.d.ts +7 -0
- package/src/View/SystemStatus/SystemStatusEntityRow.js +32 -0
- package/src/View/SystemStatus/SystemStatusPopup.d.ts +18 -0
- package/src/View/SystemStatus/SystemStatusPopup.js +49 -0
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +12 -0
- package/src/View/SystemStatus/SystemStatusViewPanel.js +34 -0
- package/src/View/TeamSharing/TeamSharingPopup.d.ts +23 -0
- package/src/View/TeamSharing/TeamSharingPopup.js +163 -0
- package/src/View/Theme/ThemePopup.d.ts +16 -0
- package/src/View/Theme/ThemePopup.js +61 -0
- package/src/View/Theme/ThemeViewPanel.d.ts +16 -0
- package/src/View/Theme/ThemeViewPanel.js +58 -0
- package/src/View/UIHelper.d.ts +85 -0
- package/src/View/UIHelper.js +495 -0
- package/src/View/UIInterfaces.d.ts +5 -0
- package/src/View/UIInterfaces.js +3 -0
- package/src/View/Wizard/AdaptableWizard.d.ts +56 -0
- package/src/View/Wizard/AdaptableWizard.js +159 -0
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +42 -0
- package/src/View/Wizard/Interface/IAdaptableWizard.js +2 -0
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +41 -0
- package/src/View/Wizard/OnePageAdaptableWizard.js +214 -0
- package/src/View/Wizard/WizardLegend.d.ts +12 -0
- package/src/View/Wizard/WizardLegend.js +29 -0
- package/src/View/Wizard/useKeyboardNavigation.d.ts +2 -0
- package/src/View/Wizard/useKeyboardNavigation.js +35 -0
- package/src/View/renderWithAdaptableContext.d.ts +3 -0
- package/src/View/renderWithAdaptableContext.js +14 -0
- package/src/agGrid/ActionColumnRenderer.d.ts +14 -0
- package/src/agGrid/ActionColumnRenderer.js +93 -0
- package/src/agGrid/Adaptable.d.ts +332 -0
- package/src/agGrid/Adaptable.js +3894 -0
- package/src/agGrid/CheckboxRenderer.d.ts +3 -0
- package/src/agGrid/CheckboxRenderer.js +35 -0
- package/src/agGrid/ColumnSetupInfo.d.ts +8 -0
- package/src/agGrid/ColumnSetupInfo.js +2 -0
- package/src/agGrid/FilterWrapper.d.ts +2 -0
- package/src/agGrid/FilterWrapper.js +54 -0
- package/src/agGrid/FloatingFilterWrapper.d.ts +2 -0
- package/src/agGrid/FloatingFilterWrapper.js +43 -0
- package/src/agGrid/GroupCellRenderer.d.ts +5 -0
- package/src/agGrid/GroupCellRenderer.js +82 -0
- package/src/agGrid/agGridHelper.d.ts +54 -0
- package/src/agGrid/agGridHelper.js +644 -0
- package/src/agGrid/agGridMenuHelper.d.ts +29 -0
- package/src/agGrid/agGridMenuHelper.js +371 -0
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +13 -0
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.js +61 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +40 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +113 -0
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.d.ts +23 -0
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.js +74 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +54 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +94 -0
- package/src/agGrid/index.d.ts +4 -0
- package/src/agGrid/index.js +12 -0
- package/src/bundle-dependencies/bundles/react-day-picker/DayPicker.d.ts +88 -0
- package/src/bundle-dependencies/bundles/react-day-picker/DayPicker.test.d.ts +0 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Button/Button.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Button/Button.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Button/ButtonProps.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Button/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Caption/Caption.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Caption/Caption.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Caption/CaptionProps.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Caption/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/CaptionLabel/CaptionLabel.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/CaptionLabel/CaptionLabel.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/CaptionLabel/CaptionLabelProps.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/CaptionLabel/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Day/Day.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Day/Day.test.d.ts +0 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Day/DayProps.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Day/hooks/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Day/hooks/useDay.d.ts +51 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Day/hooks/useDayFocus.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Day/index.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/DayContent/DayContent.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/DayContent/DayContent.test.d.ts +0 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/DayContent/DayContentProps.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/DayContent/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Dropdown/Dropdown.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Dropdown/Dropdown.test.d.ts +0 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Dropdown/DropdownProps.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Dropdown/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Footer/Footer.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Footer/Footer.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Footer/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Head/Head.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Head/Head.test.d.ts +0 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Head/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Head/utils/getWeekdays.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Head/utils/getWeekdays.test.d.ts +0 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Head/utils/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconDropdown/IconDropdown.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconDropdown/IconDropdown.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconDropdown/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconNext/IconNext.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconNext/IconNext.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconNext/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconPrevious/IconPrevious.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconPrevious/IconPrevious.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/IconPrevious/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/MonthsDropdown/MonthsDropdown.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/MonthsDropdown/MonthsDropdownProps.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/MonthsDropdown/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Navigation/Navigation.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Navigation/NavigationProps.d.ts +18 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Navigation/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Root/Root.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Root/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Row/Row.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Row/RowProps.d.ts +11 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Row/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Table/Table.d.ts +12 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Table/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Table/utils/getOutsideEndDays.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Table/utils/getOutsideStartDays.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/Table/utils/getWeeks.d.ts +15 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/WeekNumber/WeekNumber.d.ts +15 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/WeekNumber/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/YearsDropdown/YearsDropdown.d.ts +16 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/YearsDropdown/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/components/index.d.ts +18 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/ContextProvider.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/DayPickerContext.d.ts +78 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/DayPickerContextValue.d.ts +20 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/DayPickerProvider.d.ts +12 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/defaultClassNames.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/formatters/formatCaption.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/formatters/formatDay.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/formatters/formatMonthCaption.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/formatters/formatWeekNumber.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/formatters/formatWeekdayName.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/formatters/formatYearCaption.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/formatters/index.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/index.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/labelDay.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/labelMonthDropdown.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/labelNext.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/labelPrevious.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/labelWeekNumber.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/labelWeekday.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/labels/labelYearDropdown.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/useDayPicker.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/utils/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/utils/parseFromToProps.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/DayPickerContext/utils/parseModifierProps.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/FocusContext/FocusContext.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/FocusContext/FocusContextValue.d.ts +19 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/FocusContext/FocusProvider.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/FocusContext/index.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/FocusContext/useFocus.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/NavigationContext.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/NavigationContextValue.d.ts +13 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/NavigationProvider.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/index.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/useNavigation.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/useNavigationState.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/utils/getDisplayMonths.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/utils/getInitialMonth.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/utils/getInitialMonth.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/utils/getNextMonth.d.ts +18 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/utils/getNextMonth.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/utils/getPreviousMonth.d.ts +19 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/NavigationContext/utils/getPreviousMonth.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectMultipleContext/SelectMultipleContext.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectMultipleContext/SelectMultipleContextValue.d.ts +13 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectMultipleContext/SelectMultipleModifiers.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectMultipleContext/SelectMultipleProvider.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectMultipleContext/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectMultipleContext/useSelectMultiple.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectRangeContext/SelectRangeContext.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectRangeContext/SelectRangeContextValue.d.ts +13 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectRangeContext/SelectRangeModifiers.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectRangeContext/SelectRangeProvider.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectRangeContext/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectRangeContext/useSelectRange.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectRangeContext/utils/addToRange.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectSingleContext/SelectSingleContext.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectSingleContext/SelectSingleContextValue.d.ts +11 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectSingleContext/SelectSingleModifiers.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectSingleContext/SelectSingleProvider.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectSingleContext/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/SelectSingleContext/useSelectSingle.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/contexts/index.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/types/UseInput.d.ts +12 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/types/UseInputDayPickerProps.d.ts +14 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/types/UseInputFieldProps.d.ts +12 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/types/UseInputOptions.d.ts +35 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/types/index.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/useInput.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useInput/utils/isValidDate.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useModifiers/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useModifiers/types/UseModifiers.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useModifiers/types/index.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useModifiers/useModifiers.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useModifiers/utils/getModifierStatus.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useModifiers/utils/isDateInRange.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/hooks/useModifiers/utils/isMatch.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/index.js +1 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/CaptionLayout.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/ClassNames.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/Components.d.ts +33 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/CustomModifiers.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DateAfter.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DateBefore.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DateFormatter.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DateInterval.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DateRange.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayClickEventHandler.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayFocusEventHandler.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayKeyboardEventHandler.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayLabelFormatter.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayMouseEventHandler.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayOfWeekMatcher.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayPickerBase.d.ts +239 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayPickerMultiple.d.ts +15 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayPickerProps.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayPickerRange.d.ts +16 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayPickerSingle.d.ts +13 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayPickerUncontrolled.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/DayTouchEventHandler.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/Formatters.d.ts +19 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/InternalModifier.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/Labels.d.ts +17 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/Matcher.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/Modifier.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/ModifierClassNames.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/ModifierStatus.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/ModifierStyles.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/Modifiers.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/MonthChangeEventHandler.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/NavButtonLabelFormatter.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/SelectMultipleEventHandler.d.ts +12 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/SelectRangeEventHandler.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/SelectSingleEventHandler.d.ts +12 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/StyledComponentProps.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/StyledElement.d.ts +76 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/Styles.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/WeekNumberClickEventHandler.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/WeekNumberFormatter.d.ts +6 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/WeekNumberLabelFormatter.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/WeekdayLabelFormatter.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/index.d.ts +54 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isArrayOfDates.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDateAfterType.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDateBeforeType.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDateInterval.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDateRange.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDateType.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDayOfWeekType.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDayPickerMultiple.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDayPickerRange.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDayPickerSingle.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-day-picker/types/isDayPickerUncontrolled.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/CloseButton.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/ProgressBar.d.ts +55 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/Toast.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/ToastContainer.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/Transitions.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-toastify/components/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-toastify/core/eventManager.d.ts +39 -0
- package/src/bundle-dependencies/bundles/react-toastify/core/index.d.ts +2 -0
- package/src/bundle-dependencies/bundles/react-toastify/core/toast.d.ts +55 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/index.d.ts +3 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/toastContainerReducer.d.ts +15 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useKeeper.d.ts +7 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToast.d.ts +10 -0
- package/src/bundle-dependencies/bundles/react-toastify/hooks/useToastContainer.d.ts +16 -0
- package/src/bundle-dependencies/bundles/react-toastify/index.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-toastify/index.js +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/inject-style.d.ts +8 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/components/CloseButton.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/components/ProgressBar.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/components/Toast.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/components/ToastContainer.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/core/eventManager.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/core/toast.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/helpers.d.ts +9 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/utils/collapseToast.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/utils/cssTransition.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/test/utils/propValidator.test.d.ts +1 -0
- package/src/bundle-dependencies/bundles/react-toastify/types/index.d.ts +240 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/collapseToast.d.ts +5 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/constant.d.ts +20 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/cssTransition.d.ts +42 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/index.d.ts +4 -0
- package/src/bundle-dependencies/bundles/react-toastify/utils/propValidator.d.ts +10 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +24 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +97 -0
- package/src/components/AdaptableFormComponent/index.d.ts +1 -0
- package/src/components/AdaptableFormComponent/index.js +4 -0
- package/src/components/ChartContainer/index.d.ts +15 -0
- package/src/components/ChartContainer/index.js +22 -0
- package/src/components/CheckBox/index.d.ts +24 -0
- package/src/components/CheckBox/index.js +61 -0
- package/src/components/CodeBlock/index.d.ts +4 -0
- package/src/components/CodeBlock/index.js +11 -0
- package/src/components/ContainerProps.d.ts +30 -0
- package/src/components/ContainerProps.js +2 -0
- package/src/components/Dashboard/Dashboard.d.ts +30 -0
- package/src/components/Dashboard/Dashboard.js +79 -0
- package/src/components/Dashboard/DashboardManager.d.ts +15 -0
- package/src/components/Dashboard/DashboardManager.js +165 -0
- package/src/components/Dashboard/DashboardTab.d.ts +6 -0
- package/src/components/Dashboard/DashboardTab.js +7 -0
- package/src/components/Dashboard/DashboardToolbar.d.ts +14 -0
- package/src/components/Dashboard/DashboardToolbar.js +18 -0
- package/src/components/Dashboard/index.d.ts +3 -0
- package/src/components/Dashboard/index.js +6 -0
- package/src/components/Datepicker/Caption.d.ts +7 -0
- package/src/components/Datepicker/Caption.js +50 -0
- package/src/components/Datepicker/CaptionLabel.d.ts +8 -0
- package/src/components/Datepicker/CaptionLabel.js +28 -0
- package/src/components/Datepicker/DatepickerContext.d.ts +11 -0
- package/src/components/Datepicker/DatepickerContext.js +12 -0
- package/src/components/Datepicker/index.d.ts +18 -0
- package/src/components/Datepicker/index.js +106 -0
- package/src/components/Dialog/index.d.ts +22 -0
- package/src/components/Dialog/index.js +118 -0
- package/src/components/Dialog/useIsOpen.d.ts +6 -0
- package/src/components/Dialog/useIsOpen.js +13 -0
- package/src/components/Dropdown/Arrows.d.ts +3 -0
- package/src/components/Dropdown/Arrows.js +21 -0
- package/src/components/Dropdown/index.d.ts +30 -0
- package/src/components/Dropdown/index.js +98 -0
- package/src/components/DropdownButton/DropdownButtonItem.d.ts +12 -0
- package/src/components/DropdownButton/DropdownButtonItem.js +2 -0
- package/src/components/DropdownButton/index.d.ts +28 -0
- package/src/components/DropdownButton/index.js +153 -0
- package/src/components/DropdownButton/renderItem.d.ts +14 -0
- package/src/components/DropdownButton/renderItem.js +15 -0
- package/src/components/DropdownButton/useExpanded.d.ts +24 -0
- package/src/components/DropdownButton/useExpanded.js +59 -0
- package/src/components/EllipsisContainer/index.d.ts +13 -0
- package/src/components/EllipsisContainer/index.js +106 -0
- package/src/components/EmptyContent/index.d.ts +5 -0
- package/src/components/EmptyContent/index.js +15 -0
- package/src/components/ErrorBox/index.d.ts +5 -0
- package/src/components/ErrorBox/index.js +12 -0
- package/src/components/ExpressionEditor/BaseEditorInput.d.ts +25 -0
- package/src/components/ExpressionEditor/BaseEditorInput.js +119 -0
- package/src/components/ExpressionEditor/EditorButton.d.ts +7 -0
- package/src/components/ExpressionEditor/EditorButton.js +43 -0
- package/src/components/ExpressionEditor/EditorContext.d.ts +12 -0
- package/src/components/ExpressionEditor/EditorContext.js +12 -0
- package/src/components/ExpressionEditor/EditorInput.d.ts +12 -0
- package/src/components/ExpressionEditor/EditorInput.js +16 -0
- package/src/components/ExpressionEditor/EditorInputReactive.d.ts +12 -0
- package/src/components/ExpressionEditor/EditorInputReactive.js +54 -0
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.d.ts +7 -0
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +18 -0
- package/src/components/ExpressionEditor/NamedQueryContext.d.ts +11 -0
- package/src/components/ExpressionEditor/NamedQueryContext.js +11 -0
- package/src/components/ExpressionEditor/editorButtonsReactive.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsReactive.js +80 -0
- package/src/components/ExpressionEditor/editorButtonsSearch.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsSearch.js +77 -0
- package/src/components/ExpressionEditor/index.d.ts +19 -0
- package/src/components/ExpressionEditor/index.js +184 -0
- package/src/components/FieldWrap/index.d.ts +10 -0
- package/src/components/FieldWrap/index.js +14 -0
- package/src/components/FileDroppable/FileDroppableState.d.ts +5 -0
- package/src/components/FileDroppable/FileDroppableState.js +2 -0
- package/src/components/FileDroppable/index.d.ts +21 -0
- package/src/components/FileDroppable/index.js +127 -0
- package/src/components/FileDroppable/reducer.d.ts +14 -0
- package/src/components/FileDroppable/reducer.js +26 -0
- package/src/components/FlexWithFooter.d.ts +8 -0
- package/src/components/FlexWithFooter.js +19 -0
- package/src/components/FormLayout/index.d.ts +30 -0
- package/src/components/FormLayout/index.js +82 -0
- package/src/components/HelpBlock/index.d.ts +5 -0
- package/src/components/HelpBlock/index.js +12 -0
- package/src/components/InfiniteTable/index.d.ts +3 -0
- package/src/components/InfiniteTable/index.js +13 -0
- package/src/components/Input/index.d.ts +12 -0
- package/src/components/Input/index.js +20 -0
- package/src/components/List/GridList/index.d.ts +9 -0
- package/src/components/List/GridList/index.js +27 -0
- package/src/components/List/ListGroup/index.d.ts +6 -0
- package/src/components/List/ListGroup/index.js +12 -0
- package/src/components/List/ListGroupItem/index.d.ts +12 -0
- package/src/components/List/ListGroupItem/index.js +19 -0
- package/src/components/Logo/index.d.ts +6 -0
- package/src/components/Logo/index.js +12 -0
- package/src/components/Modal/Backdrop.d.ts +19 -0
- package/src/components/Modal/Backdrop.js +51 -0
- package/src/components/Modal/index.d.ts +9 -0
- package/src/components/Modal/index.js +40 -0
- package/src/components/NotifyResize/index.d.ts +9 -0
- package/src/components/NotifyResize/index.js +37 -0
- package/src/components/OverlayTrigger/Overlay.d.ts +12 -0
- package/src/components/OverlayTrigger/Overlay.js +109 -0
- package/src/components/OverlayTrigger/getOverlayStyle.d.ts +13 -0
- package/src/components/OverlayTrigger/getOverlayStyle.js +56 -0
- package/src/components/OverlayTrigger/index.d.ts +30 -0
- package/src/components/OverlayTrigger/index.js +187 -0
- package/src/components/OverlayTrigger/useVendorClassName.d.ts +2 -0
- package/src/components/OverlayTrigger/useVendorClassName.js +14 -0
- package/src/components/OverlayTrigger/utils.d.ts +4 -0
- package/src/components/OverlayTrigger/utils.js +41 -0
- package/src/components/Panel/index.d.ts +16 -0
- package/src/components/Panel/index.js +40 -0
- package/src/components/PopupWithFooter.d.ts +14 -0
- package/src/components/PopupWithFooter.js +21 -0
- package/src/components/Radio/index.d.ts +28 -0
- package/src/components/Radio/index.js +66 -0
- package/src/components/ResizeObserver/getResizeObserverObject.d.ts +1 -0
- package/src/components/ResizeObserver/getResizeObserverObject.js +7 -0
- package/src/components/ResizeObserver/index.d.ts +37 -0
- package/src/components/ResizeObserver/index.js +104 -0
- package/src/components/SelectableList/index.d.ts +14 -0
- package/src/components/SelectableList/index.js +100 -0
- package/src/components/SimpleButton/index.d.ts +22 -0
- package/src/components/SimpleButton/index.js +73 -0
- package/src/components/SizedContainer/index.d.ts +14 -0
- package/src/components/SizedContainer/index.js +19 -0
- package/src/components/Table/index.d.ts +3 -0
- package/src/components/Table/index.js +9 -0
- package/src/components/Tabs/index.d.ts +47 -0
- package/src/components/Tabs/index.js +131 -0
- package/src/components/Textarea/index.d.ts +11 -0
- package/src/components/Textarea/index.js +20 -0
- package/src/components/Toastify/index.d.ts +3 -0
- package/src/components/Toastify/index.js +10 -0
- package/src/components/ToggleButton/index.d.ts +10 -0
- package/src/components/ToggleButton/index.js +17 -0
- package/src/components/Tooltip/index.d.ts +8 -0
- package/src/components/Tooltip/index.js +9 -0
- package/src/components/WizardPanel/index.d.ts +4 -0
- package/src/components/WizardPanel/index.js +10 -0
- package/src/components/icons/DefaultIcon.d.ts +12 -0
- package/src/components/icons/DefaultIcon.js +14 -0
- package/src/components/icons/alert.d.ts +3 -0
- package/src/components/icons/alert.js +7 -0
- package/src/components/icons/align-justify.d.ts +3 -0
- package/src/components/icons/align-justify.js +7 -0
- package/src/components/icons/application.d.ts +3 -0
- package/src/components/icons/application.js +7 -0
- package/src/components/icons/arrow-down.d.ts +3 -0
- package/src/components/icons/arrow-down.js +7 -0
- package/src/components/icons/arrow-expand.d.ts +3 -0
- package/src/components/icons/arrow-expand.js +7 -0
- package/src/components/icons/arrow-left.d.ts +3 -0
- package/src/components/icons/arrow-left.js +8 -0
- package/src/components/icons/arrow-right.d.ts +3 -0
- package/src/components/icons/arrow-right.js +7 -0
- package/src/components/icons/arrow-up.d.ts +3 -0
- package/src/components/icons/arrow-up.js +7 -0
- package/src/components/icons/attach-file.d.ts +3 -0
- package/src/components/icons/attach-file.js +8 -0
- package/src/components/icons/blanks.d.ts +3 -0
- package/src/components/icons/blanks.js +7 -0
- package/src/components/icons/boolean-list.d.ts +3 -0
- package/src/components/icons/boolean-list.js +7 -0
- package/src/components/icons/build.d.ts +3 -0
- package/src/components/icons/build.js +8 -0
- package/src/components/icons/bulk-update.d.ts +3 -0
- package/src/components/icons/bulk-update.js +11 -0
- package/src/components/icons/calculated-column.d.ts +3 -0
- package/src/components/icons/calculated-column.js +7 -0
- package/src/components/icons/calendar.d.ts +3 -0
- package/src/components/icons/calendar.js +7 -0
- package/src/components/icons/campaign.d.ts +3 -0
- package/src/components/icons/campaign.js +7 -0
- package/src/components/icons/cell-summary.d.ts +3 -0
- package/src/components/icons/cell-summary.js +7 -0
- package/src/components/icons/cell-validation.d.ts +3 -0
- package/src/components/icons/cell-validation.js +7 -0
- package/src/components/icons/chart.d.ts +3 -0
- package/src/components/icons/chart.js +7 -0
- package/src/components/icons/check-box-outline.d.ts +3 -0
- package/src/components/icons/check-box-outline.js +7 -0
- package/src/components/icons/check-box.d.ts +3 -0
- package/src/components/icons/check-box.js +7 -0
- package/src/components/icons/check-circle.d.ts +3 -0
- package/src/components/icons/check-circle.js +7 -0
- package/src/components/icons/check.d.ts +3 -0
- package/src/components/icons/check.js +7 -0
- package/src/components/icons/clear.d.ts +3 -0
- package/src/components/icons/clear.js +7 -0
- package/src/components/icons/clone.d.ts +3 -0
- package/src/components/icons/clone.js +7 -0
- package/src/components/icons/close.d.ts +3 -0
- package/src/components/icons/close.js +7 -0
- package/src/components/icons/cloud-upload.d.ts +3 -0
- package/src/components/icons/cloud-upload.js +7 -0
- package/src/components/icons/collapse.d.ts +3 -0
- package/src/components/icons/collapse.js +7 -0
- package/src/components/icons/color-drop.d.ts +3 -0
- package/src/components/icons/color-drop.js +7 -0
- package/src/components/icons/column-chooser.d.ts +3 -0
- package/src/components/icons/column-chooser.js +7 -0
- package/src/components/icons/column-filter.d.ts +3 -0
- package/src/components/icons/column-filter.js +7 -0
- package/src/components/icons/column-info.d.ts +3 -0
- package/src/components/icons/column-info.js +7 -0
- package/src/components/icons/comment.d.ts +3 -0
- package/src/components/icons/comment.js +7 -0
- package/src/components/icons/conditional-style.d.ts +3 -0
- package/src/components/icons/conditional-style.js +7 -0
- package/src/components/icons/contains.d.ts +3 -0
- package/src/components/icons/contains.js +7 -0
- package/src/components/icons/custom-sort.d.ts +3 -0
- package/src/components/icons/custom-sort.js +7 -0
- package/src/components/icons/dashboard.d.ts +3 -0
- package/src/components/icons/dashboard.js +7 -0
- package/src/components/icons/data-source.d.ts +3 -0
- package/src/components/icons/data-source.js +7 -0
- package/src/components/icons/date-range.d.ts +3 -0
- package/src/components/icons/date-range.js +8 -0
- package/src/components/icons/delete.d.ts +3 -0
- package/src/components/icons/delete.js +7 -0
- package/src/components/icons/division.d.ts +3 -0
- package/src/components/icons/division.js +7 -0
- package/src/components/icons/dock.d.ts +3 -0
- package/src/components/icons/dock.js +7 -0
- package/src/components/icons/drag.d.ts +3 -0
- package/src/components/icons/drag.js +7 -0
- package/src/components/icons/edit.d.ts +3 -0
- package/src/components/icons/edit.js +7 -0
- package/src/components/icons/equal.d.ts +3 -0
- package/src/components/icons/equal.js +7 -0
- package/src/components/icons/equation.d.ts +3 -0
- package/src/components/icons/equation.js +7 -0
- package/src/components/icons/error.d.ts +3 -0
- package/src/components/icons/error.js +7 -0
- package/src/components/icons/expand.d.ts +3 -0
- package/src/components/icons/expand.js +7 -0
- package/src/components/icons/exponent.d.ts +3 -0
- package/src/components/icons/exponent.js +7 -0
- package/src/components/icons/export.d.ts +3 -0
- package/src/components/icons/export.js +7 -0
- package/src/components/icons/fast-backward.d.ts +3 -0
- package/src/components/icons/fast-backward.js +7 -0
- package/src/components/icons/fast-forward.d.ts +3 -0
- package/src/components/icons/fast-forward.js +7 -0
- package/src/components/icons/filter-outline.d.ts +3 -0
- package/src/components/icons/filter-outline.js +7 -0
- package/src/components/icons/flashing-cell.d.ts +3 -0
- package/src/components/icons/flashing-cell.js +7 -0
- package/src/components/icons/folder-open.d.ts +3 -0
- package/src/components/icons/folder-open.js +7 -0
- package/src/components/icons/folder-shared.d.ts +3 -0
- package/src/components/icons/folder-shared.js +7 -0
- package/src/components/icons/folder.d.ts +3 -0
- package/src/components/icons/folder.js +7 -0
- package/src/components/icons/format-column.d.ts +3 -0
- package/src/components/icons/format-column.js +7 -0
- package/src/components/icons/format-letter-ends-with.d.ts +3 -0
- package/src/components/icons/format-letter-ends-with.js +7 -0
- package/src/components/icons/format-letter-starts-with.d.ts +3 -0
- package/src/components/icons/format-letter-starts-with.js +7 -0
- package/src/components/icons/freetext-column.d.ts +3 -0
- package/src/components/icons/freetext-column.js +11 -0
- package/src/components/icons/function.d.ts +3 -0
- package/src/components/icons/function.js +7 -0
- package/src/components/icons/gradient-column.d.ts +3 -0
- package/src/components/icons/gradient-column.js +7 -0
- package/src/components/icons/greater-than-or-equal.d.ts +3 -0
- package/src/components/icons/greater-than-or-equal.js +7 -0
- package/src/components/icons/greater-than.d.ts +3 -0
- package/src/components/icons/greater-than.js +7 -0
- package/src/components/icons/hide-column.d.ts +3 -0
- package/src/components/icons/hide-column.js +8 -0
- package/src/components/icons/history.d.ts +3 -0
- package/src/components/icons/history.js +7 -0
- package/src/components/icons/home.d.ts +3 -0
- package/src/components/icons/home.js +7 -0
- package/src/components/icons/import-export.d.ts +3 -0
- package/src/components/icons/import-export.js +7 -0
- package/src/components/icons/index.d.ts +14 -0
- package/src/components/icons/index.js +277 -0
- package/src/components/icons/info.d.ts +3 -0
- package/src/components/icons/info.js +7 -0
- package/src/components/icons/invalid.d.ts +3 -0
- package/src/components/icons/invalid.js +8 -0
- package/src/components/icons/ipushpull.d.ts +3 -0
- package/src/components/icons/ipushpull.js +8 -0
- package/src/components/icons/justify.d.ts +3 -0
- package/src/components/icons/justify.js +7 -0
- package/src/components/icons/layout.d.ts +3 -0
- package/src/components/icons/layout.js +7 -0
- package/src/components/icons/less-than-or-equal.d.ts +3 -0
- package/src/components/icons/less-than-or-equal.js +7 -0
- package/src/components/icons/less-than.d.ts +3 -0
- package/src/components/icons/less-than.js +7 -0
- package/src/components/icons/list.d.ts +3 -0
- package/src/components/icons/list.js +7 -0
- package/src/components/icons/login.d.ts +3 -0
- package/src/components/icons/login.js +7 -0
- package/src/components/icons/logout copy.d.ts +3 -0
- package/src/components/icons/logout copy.js +8 -0
- package/src/components/icons/logout.d.ts +3 -0
- package/src/components/icons/logout.js +8 -0
- package/src/components/icons/minus.d.ts +3 -0
- package/src/components/icons/minus.js +7 -0
- package/src/components/icons/multiplication.d.ts +3 -0
- package/src/components/icons/multiplication.js +7 -0
- package/src/components/icons/newpage.d.ts +3 -0
- package/src/components/icons/newpage.js +8 -0
- package/src/components/icons/non-blanks.d.ts +3 -0
- package/src/components/icons/non-blanks.js +7 -0
- package/src/components/icons/not-contains.d.ts +3 -0
- package/src/components/icons/not-contains.js +7 -0
- package/src/components/icons/not-equal.d.ts +3 -0
- package/src/components/icons/not-equal.js +7 -0
- package/src/components/icons/pause.d.ts +3 -0
- package/src/components/icons/pause.js +7 -0
- package/src/components/icons/percent-bar.d.ts +3 -0
- package/src/components/icons/percent-bar.js +12 -0
- package/src/components/icons/percent.d.ts +3 -0
- package/src/components/icons/percent.js +7 -0
- package/src/components/icons/pie-chart.d.ts +3 -0
- package/src/components/icons/pie-chart.js +7 -0
- package/src/components/icons/play.d.ts +3 -0
- package/src/components/icons/play.js +8 -0
- package/src/components/icons/plus-minus.d.ts +3 -0
- package/src/components/icons/plus-minus.js +7 -0
- package/src/components/icons/plus.d.ts +3 -0
- package/src/components/icons/plus.js +7 -0
- package/src/components/icons/query.d.ts +3 -0
- package/src/components/icons/query.js +7 -0
- package/src/components/icons/quick-search.d.ts +3 -0
- package/src/components/icons/quick-search.js +7 -0
- package/src/components/icons/refresh.d.ts +3 -0
- package/src/components/icons/refresh.js +7 -0
- package/src/components/icons/regex.d.ts +3 -0
- package/src/components/icons/regex.js +7 -0
- package/src/components/icons/reminder.d.ts +3 -0
- package/src/components/icons/reminder.js +7 -0
- package/src/components/icons/save.d.ts +3 -0
- package/src/components/icons/save.js +7 -0
- package/src/components/icons/schedule.d.ts +3 -0
- package/src/components/icons/schedule.js +10 -0
- package/src/components/icons/settings.d.ts +3 -0
- package/src/components/icons/settings.js +7 -0
- package/src/components/icons/shortcut.d.ts +3 -0
- package/src/components/icons/shortcut.js +7 -0
- package/src/components/icons/show-column.d.ts +3 -0
- package/src/components/icons/show-column.js +8 -0
- package/src/components/icons/smart-edit.d.ts +3 -0
- package/src/components/icons/smart-edit.js +7 -0
- package/src/components/icons/sort-asc.d.ts +3 -0
- package/src/components/icons/sort-asc.js +10 -0
- package/src/components/icons/sort-desc.d.ts +3 -0
- package/src/components/icons/sort-desc.js +10 -0
- package/src/components/icons/spark-line.d.ts +3 -0
- package/src/components/icons/spark-line.js +7 -0
- package/src/components/icons/state-management.d.ts +3 -0
- package/src/components/icons/state-management.js +7 -0
- package/src/components/icons/stop.d.ts +3 -0
- package/src/components/icons/stop.js +8 -0
- package/src/components/icons/system-status.d.ts +3 -0
- package/src/components/icons/system-status.js +7 -0
- package/src/components/icons/tab-unselected.d.ts +3 -0
- package/src/components/icons/tab-unselected.js +7 -0
- package/src/components/icons/table-arrow-right.d.ts +3 -0
- package/src/components/icons/table-arrow-right.js +7 -0
- package/src/components/icons/team-share.d.ts +3 -0
- package/src/components/icons/team-share.js +7 -0
- package/src/components/icons/theme.d.ts +3 -0
- package/src/components/icons/theme.js +8 -0
- package/src/components/icons/track-changes.d.ts +3 -0
- package/src/components/icons/track-changes.js +8 -0
- package/src/components/icons/triangle-down.d.ts +3 -0
- package/src/components/icons/triangle-down.js +7 -0
- package/src/components/icons/triangle-up.d.ts +3 -0
- package/src/components/icons/triangle-up.js +7 -0
- package/src/components/icons/unchecked.d.ts +3 -0
- package/src/components/icons/unchecked.js +7 -0
- package/src/components/icons/undo.d.ts +3 -0
- package/src/components/icons/undo.js +7 -0
- package/src/components/icons/updated-row.d.ts +3 -0
- package/src/components/icons/updated-row.js +7 -0
- package/src/components/icons/user-filter.d.ts +3 -0
- package/src/components/icons/user-filter.js +7 -0
- package/src/components/icons/warning.d.ts +3 -0
- package/src/components/icons/warning.js +7 -0
- package/src/components/utils/batchUpdate.d.ts +9 -0
- package/src/components/utils/batchUpdate.js +27 -0
- package/src/components/utils/captureTabNavigation/getFocusableChildren.d.ts +2 -0
- package/src/components/utils/captureTabNavigation/getFocusableChildren.js +16 -0
- package/src/components/utils/captureTabNavigation/index.d.ts +2 -0
- package/src/components/utils/captureTabNavigation/index.js +29 -0
- package/src/components/utils/contains.d.ts +1 -0
- package/src/components/utils/contains.js +14 -0
- package/src/components/utils/getAvailableSizeInfo.d.ts +21 -0
- package/src/components/utils/getAvailableSizeInfo.js +37 -0
- package/src/components/utils/join.d.ts +2 -0
- package/src/components/utils/join.js +4 -0
- package/src/components/utils/selectParent/index.d.ts +2 -0
- package/src/components/utils/selectParent/index.js +15 -0
- package/src/components/utils/selectParent/matches.d.ts +2 -0
- package/src/components/utils/selectParent/matches.js +9 -0
- package/src/components/utils/useAutoFocus.d.ts +12 -0
- package/src/components/utils/useAutoFocus.js +19 -0
- package/src/components/utils/useContainerScrollObserver/index.d.ts +6 -0
- package/src/components/utils/useContainerScrollObserver/index.js +80 -0
- package/src/components/utils/useDraggable.d.ts +9 -0
- package/src/components/utils/useDraggable.js +84 -0
- package/src/components/utils/useGlobalEvent.d.ts +1 -0
- package/src/components/utils/useGlobalEvent.js +11 -0
- package/src/components/utils/useLatest.d.ts +1 -0
- package/src/components/utils/useLatest.js +9 -0
- package/src/components/utils/usePrevious.d.ts +2 -0
- package/src/components/utils/usePrevious.js +11 -0
- package/src/components/utils/usePropState.d.ts +2 -0
- package/src/components/utils/usePropState.js +11 -0
- package/src/components/utils/useProperty.d.ts +22 -0
- package/src/components/utils/useProperty.js +49 -0
- package/src/components/utils/useRerender.d.ts +1 -0
- package/src/components/utils/useRerender.js +10 -0
- package/src/components/utils/useSelectionRange.d.ts +5 -0
- package/src/components/utils/useSelectionRange.js +24 -0
- package/src/components/utils/useTheme.d.ts +32 -0
- package/src/components/utils/useTheme.js +5 -0
- package/src/components/utils/uuid.d.ts +2 -0
- package/src/components/utils/uuid.js +5 -0
- package/src/env.d.ts +4 -0
- package/src/env.js +7 -0
- package/src/metamodel/adaptable-metamodel-model.d.ts +19 -0
- package/src/metamodel/adaptable-metamodel-model.js +2 -0
- package/src/metamodel/adaptable.metamodel.d.ts +3313 -0
- package/src/metamodel/adaptable.metamodel.js +10638 -0
- package/src/parser/src/evaluator.d.ts +2 -0
- package/src/parser/src/evaluator.js +25 -0
- package/src/parser/src/index.d.ts +8 -0
- package/src/parser/src/index.js +30 -0
- package/src/parser/src/parser.js +1653 -0
- package/src/parser/src/tokenizer.d.ts +2 -0
- package/src/parser/src/tokenizer.js +21 -0
- package/src/parser/src/types.d.ts +94 -0
- package/src/parser/src/types.js +2 -0
- package/src/parser/src/utils.d.ts +4 -0
- package/src/parser/src/utils.js +34 -0
- package/src/theme.d.ts +32 -0
- package/src/theme.js +51 -0
- package/src/themes/index.d.ts +2 -0
- package/src/themes/index.js +14 -0
- package/src/types.d.ts +142 -0
- package/src/types.js +5 -0
- package/themes/dark.css +16 -0
- package/themes/light.css +2 -0
- package/types.d.ts +1 -0
- package/types.js +4 -0
- package/version.d.ts +2 -0
- package/version.js +3 -0
|
@@ -0,0 +1,3894 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bindAdaptableAgGrid = exports.AdaptableNoCodeWizard = exports.Adaptable = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const all_modules_1 = require("@ag-grid-community/all-modules");
|
|
6
|
+
const debounce_1 = tslib_1.__importDefault(require("lodash-es/debounce"));
|
|
7
|
+
const isEqual_1 = tslib_1.__importDefault(require("lodash-es/isEqual"));
|
|
8
|
+
const throttle_1 = tslib_1.__importDefault(require("lodash-es/throttle"));
|
|
9
|
+
const uniqBy_1 = tslib_1.__importDefault(require("lodash-es/uniqBy"));
|
|
10
|
+
const React = tslib_1.__importStar(require("react"));
|
|
11
|
+
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
12
|
+
const clamp_1 = tslib_1.__importDefault(require("lodash-es/clamp"));
|
|
13
|
+
const AdaptableApiImpl_1 = require("../Api/Implementation/AdaptableApiImpl");
|
|
14
|
+
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
15
|
+
const Uuid_1 = require("../PredefinedConfig/Uuid");
|
|
16
|
+
const AdaptableStore_1 = require("../Redux/Store/AdaptableStore");
|
|
17
|
+
const GeneralConstants = tslib_1.__importStar(require("../Utilities/Constants/GeneralConstants"));
|
|
18
|
+
const GeneralConstants_1 = require("../Utilities/Constants/GeneralConstants");
|
|
19
|
+
const ModuleConstants = tslib_1.__importStar(require("../Utilities/Constants/ModuleConstants"));
|
|
20
|
+
const DefaultAdaptableOptions_1 = require("../Utilities/Defaults/DefaultAdaptableOptions");
|
|
21
|
+
const Emitter_1 = tslib_1.__importDefault(require("../Utilities/Emitter"));
|
|
22
|
+
const ArrayExtensions_1 = require("../Utilities/Extensions/ArrayExtensions");
|
|
23
|
+
const StringExtensions_1 = require("../Utilities/Extensions/StringExtensions");
|
|
24
|
+
const getScrollbarSize_1 = tslib_1.__importDefault(require("../Utilities/getScrollbarSize"));
|
|
25
|
+
const AdaptableHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/AdaptableHelper"));
|
|
26
|
+
const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/FormatHelper"));
|
|
27
|
+
const Helper_1 = require("../Utilities/Helpers/Helper");
|
|
28
|
+
const LoggingHelper_1 = require("../Utilities/Helpers/LoggingHelper");
|
|
29
|
+
const ObjectFactory_1 = tslib_1.__importStar(require("../Utilities/ObjectFactory"));
|
|
30
|
+
// services
|
|
31
|
+
const CalculatedColumnExpressionService_1 = require("../Utilities/Services/CalculatedColumnExpressionService");
|
|
32
|
+
const DataService_1 = require("../Utilities/Services/DataService");
|
|
33
|
+
const LicenseService_1 = require("../Utilities/Services/LicenseService");
|
|
34
|
+
const TeamSharingService_1 = require("../Utilities/Services/TeamSharingService");
|
|
35
|
+
const ReportService_1 = require("../Utilities/Services/ReportService");
|
|
36
|
+
const ModuleService_1 = require("../Utilities/Services/ModuleService");
|
|
37
|
+
const ValidationService_1 = require("../Utilities/Services/ValidationService");
|
|
38
|
+
const EntitlementService_1 = require("../Utilities/Services/EntitlementService");
|
|
39
|
+
const ExpressionService_1 = require("../Utilities/Services/ExpressionService");
|
|
40
|
+
const AlertService_1 = require("../Utilities/Services/AlertService");
|
|
41
|
+
const AdaptableView_1 = require("../View/AdaptableView");
|
|
42
|
+
const AdaptableWizardView_1 = tslib_1.__importDefault(require("../View/AdaptableWizardView"));
|
|
43
|
+
const AdaptableToolPanel_1 = require("../View/Components/ToolPanel/AdaptableToolPanel");
|
|
44
|
+
const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
|
|
45
|
+
const ActionColumnRenderer_1 = require("./ActionColumnRenderer");
|
|
46
|
+
const agGridHelper_1 = require("./agGridHelper");
|
|
47
|
+
const agGridMenuHelper_1 = require("./agGridMenuHelper");
|
|
48
|
+
// components
|
|
49
|
+
const FilterWrapper_1 = require("./FilterWrapper");
|
|
50
|
+
const FloatingFilterWrapper_1 = require("./FloatingFilterWrapper");
|
|
51
|
+
const StyleHelper_1 = require("../Utilities/Helpers/StyleHelper");
|
|
52
|
+
const AdaptableNumberEditor_1 = require("./editors/AdaptableNumberEditor");
|
|
53
|
+
const AdaptableDateEditor_1 = require("./editors/AdaptableDateEditor");
|
|
54
|
+
const core_1 = require("@grid-utils/core");
|
|
55
|
+
const waitForCondition_1 = require("../Utilities/waitForCondition");
|
|
56
|
+
const publishTimestamp_1 = tslib_1.__importDefault(require("../../publishTimestamp"));
|
|
57
|
+
const MetamodelService_1 = require("../Utilities/Services/MetamodelService");
|
|
58
|
+
const DocumentationLinkConstants_1 = require("../Utilities/Constants/DocumentationLinkConstants");
|
|
59
|
+
const isAlive = new core_1.CoreUtils().isAlive();
|
|
60
|
+
const tinycolor = require('tinycolor2');
|
|
61
|
+
all_modules_1.ModuleRegistry.registerModules(all_modules_1.AllCommunityModules);
|
|
62
|
+
const GROUP_PATH_SEPARATOR = '/';
|
|
63
|
+
// IMPORTANT - we need colId to be set in order for safeSetColDefs to work correctly
|
|
64
|
+
const assignColId = (colDef) => {
|
|
65
|
+
if (!colDef) {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
if (colDef.field && !colDef.colId) {
|
|
69
|
+
colDef.colId = colDef.field;
|
|
70
|
+
}
|
|
71
|
+
if (colDef.children) {
|
|
72
|
+
colDef.children.forEach(assignColId);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
if (!colDef.colId) {
|
|
76
|
+
LoggingHelper_1.LogAdaptableWarning('A column is missing the colId - please check ', colDef, 'Either pass a "field" property or a "colId" property.');
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const RowNodeProto = all_modules_1.RowNode.prototype;
|
|
81
|
+
const RowNode_dispatchLocalEvent = RowNodeProto.dispatchLocalEvent;
|
|
82
|
+
const GridApi_setColumnDefs = all_modules_1.GridApi.prototype.setColumnDefs;
|
|
83
|
+
/**
|
|
84
|
+
* Since column definitions can be nested and have groups
|
|
85
|
+
* we use this forEachColumn function to call the passed-in `fn`
|
|
86
|
+
* which will be called with just ColDef (not ColGroupDef), so just column definitions, not group definitions
|
|
87
|
+
*/
|
|
88
|
+
const forEachColumn = (cols, fn, parentColGroup) => {
|
|
89
|
+
cols.forEach((col, i, arr) => {
|
|
90
|
+
if (col.children) {
|
|
91
|
+
forEachColumn(col.children, fn, col);
|
|
92
|
+
}
|
|
93
|
+
else {
|
|
94
|
+
fn(col, i, arr, parentColGroup);
|
|
95
|
+
}
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
const adaptableInstances = {};
|
|
99
|
+
class Adaptable {
|
|
100
|
+
constructor() {
|
|
101
|
+
this.colDefPropertyCache = new Map();
|
|
102
|
+
this.gridOptionsPropertyCache = new Map();
|
|
103
|
+
// only for our private / internal events used within Adaptable
|
|
104
|
+
// public events are emitted through the EventApi
|
|
105
|
+
this._on = (eventName, callback) => {
|
|
106
|
+
if (!this.emitter) {
|
|
107
|
+
return () => { };
|
|
108
|
+
}
|
|
109
|
+
return this.emitter.on(eventName, callback);
|
|
110
|
+
};
|
|
111
|
+
this._onIncludeFired = (eventName, callback) => {
|
|
112
|
+
if (!this.emitter) {
|
|
113
|
+
return () => { };
|
|
114
|
+
}
|
|
115
|
+
return this.emitter.onIncludeFired(eventName, callback);
|
|
116
|
+
};
|
|
117
|
+
this._emit = (eventName, data) => {
|
|
118
|
+
if (this.emitter) {
|
|
119
|
+
return this.emitter.emit(eventName, data);
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
this._emitSync = (eventName, data) => {
|
|
123
|
+
if (this.emitter) {
|
|
124
|
+
return this.emitter.emitSync(eventName, data);
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
this._adaptableReady = false;
|
|
128
|
+
this.agGridModules = [];
|
|
129
|
+
this.isPluginLoaded = (pluginId) => {
|
|
130
|
+
const plugins = this.adaptableOptions.plugins || [];
|
|
131
|
+
for (let i = 0, len = plugins.length; i < len; i++) {
|
|
132
|
+
const plugin = plugins[i];
|
|
133
|
+
if (plugin.pluginId === pluginId) {
|
|
134
|
+
return true;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return false;
|
|
138
|
+
};
|
|
139
|
+
this.isAgGridReady = () => {
|
|
140
|
+
var _a, _b;
|
|
141
|
+
const waitTimeout = (_b = (_a = this.adaptableOptions.containerOptions) === null || _a === void 0 ? void 0 : _a.vendorContainerWaitTimeout) !== null && _b !== void 0 ? _b : 60000;
|
|
142
|
+
return waitForCondition_1.waitForCondition(() => !!this.gridOptions.api, waitTimeout);
|
|
143
|
+
};
|
|
144
|
+
// debounced methods
|
|
145
|
+
this.debouncedSetColumnIntoStore = debounce_1.default(() => {
|
|
146
|
+
if (!this.gridOptions.api) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.updateColumnsIntoStore();
|
|
150
|
+
}, GeneralConstants_1.HALF_SECOND);
|
|
151
|
+
this.debouncedSaveGridLayout = debounce_1.default(() => {
|
|
152
|
+
if (!this.gridOptions.api) {
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
this.updateLayoutFromGrid();
|
|
156
|
+
}, GeneralConstants_1.HALF_SECOND);
|
|
157
|
+
this.debouncedSetSelectedCells = debounce_1.default(() => {
|
|
158
|
+
if (!this.gridOptions.api) {
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
this.setSelectedCells();
|
|
162
|
+
}, 250);
|
|
163
|
+
this.debouncedSetSelectedRows = debounce_1.default(() => {
|
|
164
|
+
if (!this.gridOptions.api) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
this.setSelectedRows();
|
|
168
|
+
}, GeneralConstants_1.HALF_SECOND);
|
|
169
|
+
this.debouncedFilterGrid = debounce_1.default((callback = () => { }) => {
|
|
170
|
+
if (!this.gridOptions.api) {
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
this.applyGridFiltering();
|
|
174
|
+
if (callback) {
|
|
175
|
+
callback();
|
|
176
|
+
}
|
|
177
|
+
}, GeneralConstants_1.HALF_SECOND);
|
|
178
|
+
/**
|
|
179
|
+
* This creates a clone of the current column definitions. If config.removeEmpty is true, will also remove empty column groups
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
182
|
+
this.mapColumnDefs = (colDefs, fn, config) => {
|
|
183
|
+
config = config || { removeEmpty: false };
|
|
184
|
+
colDefs = colDefs || this.getGroupAndColumnDefs();
|
|
185
|
+
forEachColumn(colDefs, (columnDef, i, colDefs, parentColGroup) => {
|
|
186
|
+
const result = fn(columnDef, i, colDefs);
|
|
187
|
+
const parentArray = parentColGroup ? parentColGroup.children : colDefs;
|
|
188
|
+
parentArray[i] = result;
|
|
189
|
+
if (i === colDefs.length - 1 && config.removeEmpty) {
|
|
190
|
+
if (parentColGroup) {
|
|
191
|
+
parentColGroup.children = parentArray.filter((x) => !!x);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
});
|
|
195
|
+
if (config.removeEmpty) {
|
|
196
|
+
colDefs = colDefs.filter((x) => !!x);
|
|
197
|
+
}
|
|
198
|
+
return colDefs;
|
|
199
|
+
};
|
|
200
|
+
this.getGroupAndColumnDefs = () => {
|
|
201
|
+
const colDefs = [].concat(this.currentColumnDefs || this.gridOptions.columnDefs);
|
|
202
|
+
return colDefs;
|
|
203
|
+
// return this.gridOptions.columnApi.getAllColumns().map((c) => c.getColDef());
|
|
204
|
+
};
|
|
205
|
+
this.getColumnDefsWithCorrectVisibility = () => {
|
|
206
|
+
const visibleColIds = this.api.layoutApi.getCurrentVisibleColumnIdsMap();
|
|
207
|
+
return this.gridOptions.columnApi.getAllColumns().map((c) => {
|
|
208
|
+
const colDef = c.getColDef();
|
|
209
|
+
const colId = c.getColId();
|
|
210
|
+
colDef.colId = colId;
|
|
211
|
+
colDef.hide = !visibleColIds[colId];
|
|
212
|
+
return colDef;
|
|
213
|
+
});
|
|
214
|
+
};
|
|
215
|
+
// TODO continue here
|
|
216
|
+
// - group case branches in adaptablestore
|
|
217
|
+
// - safeSetColDefs
|
|
218
|
+
// - test custom sort in row groups !!!
|
|
219
|
+
// - test edit lookup columns
|
|
220
|
+
//TODO use the list above to return a better typed object
|
|
221
|
+
this.getPreviousColDefInfo = (colDef) => {
|
|
222
|
+
const def = colDef;
|
|
223
|
+
return def.__ab || {};
|
|
224
|
+
};
|
|
225
|
+
// (global as any).adaptable = this;
|
|
226
|
+
}
|
|
227
|
+
static init(adaptableOptions) {
|
|
228
|
+
return Adaptable.initInternal(adaptableOptions);
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* Lazy static constructor for Adaptable
|
|
232
|
+
* Receives an AdaptableOptions object
|
|
233
|
+
* Returns a Promise containing the api object in order to enable run-time access to AdapTable's properties and functions
|
|
234
|
+
* @param adaptableOptions an instance of AdaptableOptions
|
|
235
|
+
*/
|
|
236
|
+
static async initInternal(adaptableOptions, runtimeConfig) {
|
|
237
|
+
const extraOptions = {
|
|
238
|
+
renderGrid: undefined,
|
|
239
|
+
runtimeConfig: null,
|
|
240
|
+
};
|
|
241
|
+
let promise = null;
|
|
242
|
+
if (Array.isArray(adaptableOptions.plugins)) {
|
|
243
|
+
// do this
|
|
244
|
+
for (let plugin of adaptableOptions.plugins) {
|
|
245
|
+
promise =
|
|
246
|
+
promise && promise.then
|
|
247
|
+
? promise.then(() => {
|
|
248
|
+
return plugin.beforeInit(adaptableOptions);
|
|
249
|
+
})
|
|
250
|
+
: plugin.beforeInit(adaptableOptions);
|
|
251
|
+
}
|
|
252
|
+
// instead of
|
|
253
|
+
// if (Array.isArray(adaptableOptions.plugins)) {
|
|
254
|
+
// for await (let plugin of adaptableOptions.plugins) {
|
|
255
|
+
// await plugin.beforeInit(adaptableOptions);
|
|
256
|
+
// }
|
|
257
|
+
// }
|
|
258
|
+
// because this await for of introduces too much delay
|
|
259
|
+
}
|
|
260
|
+
const doInit = (ab) => ab.init(adaptableOptions, runtimeConfig, true).then((api) => {
|
|
261
|
+
if (Array.isArray(adaptableOptions.plugins)) {
|
|
262
|
+
adaptableOptions.plugins.forEach((plugin) => {
|
|
263
|
+
plugin.afterInit(ab);
|
|
264
|
+
});
|
|
265
|
+
}
|
|
266
|
+
return api;
|
|
267
|
+
});
|
|
268
|
+
if (promise && promise.then) {
|
|
269
|
+
return promise.then(() => {
|
|
270
|
+
const ab = new Adaptable();
|
|
271
|
+
return doInit(ab);
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
else {
|
|
275
|
+
const ab = new Adaptable();
|
|
276
|
+
return doInit(ab);
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
static collectInstance(adaptable) {
|
|
280
|
+
adaptable._id = adaptable.adaptableOptions.adaptableId || Uuid_1.createUuid();
|
|
281
|
+
adaptableInstances[adaptable._id] = adaptable;
|
|
282
|
+
}
|
|
283
|
+
static forEachAdaptable(fn) {
|
|
284
|
+
Object.keys(adaptableInstances).forEach((key) => {
|
|
285
|
+
fn(adaptableInstances[key]);
|
|
286
|
+
});
|
|
287
|
+
}
|
|
288
|
+
static dismissInstance(adaptable) {
|
|
289
|
+
delete adaptableInstances[adaptable._id];
|
|
290
|
+
}
|
|
291
|
+
// the 'old' constructor which takes an Adaptable adaptable object
|
|
292
|
+
// this is still used internally but should not be used externally as a preference
|
|
293
|
+
async init(adaptableOptions, runtimeConfig, _staticInit) {
|
|
294
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
295
|
+
if (!_staticInit) {
|
|
296
|
+
LoggingHelper_1.ConsoleLogWarning(`
|
|
297
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
298
|
+
!!!!!!! You should not use the "Adaptable" constructor directly, as it was deprecated in v6 and removed in v7!
|
|
299
|
+
!!!!!!!
|
|
300
|
+
!!!!!!! Use const api = await Adaptable.init(adaptableOptions) instead.
|
|
301
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!`);
|
|
302
|
+
}
|
|
303
|
+
this.emitter = new Emitter_1.default();
|
|
304
|
+
// we create AdaptableOptions by merging the values provided by the user with the defaults (where no value has been set)
|
|
305
|
+
this.adaptableOptions = AdaptableHelper_1.default.assignadaptableOptions(adaptableOptions);
|
|
306
|
+
if (this.hasAutogeneratedPrimaryKey()) {
|
|
307
|
+
LoggingHelper_1.LogAdaptableWarning(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
|
|
308
|
+
when no unique column is available, as it limits some Adaptable functionalities!
|
|
309
|
+
|
|
310
|
+
For more details see: ${DocumentationLinkConstants_1.PrimaryKeyDocsLink}`);
|
|
311
|
+
this.adaptableOptions.primaryKey = GeneralConstants_1.AUTOGENERATED_PK_COLUMN;
|
|
312
|
+
}
|
|
313
|
+
Adaptable.collectInstance(this);
|
|
314
|
+
AdaptableHelper_1.default.checkAdaptableOptions(this.adaptableOptions);
|
|
315
|
+
this.runtimeConfig = runtimeConfig || {};
|
|
316
|
+
this.agGridModules = this.runtimeConfig.modules || [];
|
|
317
|
+
this.gridOptions = this.adaptableOptions.vendorGrid;
|
|
318
|
+
if (this.hasAutogeneratedPrimaryKey() && !this.gridOptions.getRowNodeId) {
|
|
319
|
+
this.gridOptions.getRowNodeId = (rowData) => {
|
|
320
|
+
var _a;
|
|
321
|
+
rowData[GeneralConstants_1.AUTOGENERATED_PK_COLUMN] = (_a = rowData[GeneralConstants_1.AUTOGENERATED_PK_COLUMN]) !== null && _a !== void 0 ? _a : Uuid_1.createUuid();
|
|
322
|
+
return rowData[GeneralConstants_1.AUTOGENERATED_PK_COLUMN];
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
if (this.gridOptions.allowContextMenuWithControlKey === undefined) {
|
|
326
|
+
this.gridOptions.allowContextMenuWithControlKey = true;
|
|
327
|
+
}
|
|
328
|
+
this.isInitialised = false;
|
|
329
|
+
this.useRowNodeLookUp = false; // we will set later in instantiate if possible to be true
|
|
330
|
+
this.forPlugins((plugin) => plugin.afterInitOptions(this, this.adaptableOptions));
|
|
331
|
+
// get the api ready
|
|
332
|
+
this.api = new AdaptableApiImpl_1.AdaptableApiImpl(this);
|
|
333
|
+
this.forPlugins((plugin) => plugin.afterInitApi(this, this.api));
|
|
334
|
+
// data source needs to be created early
|
|
335
|
+
this.DataService = new DataService_1.DataService(this);
|
|
336
|
+
// set up the ag Grid helper and menu helper
|
|
337
|
+
this.agGridHelper = new agGridHelper_1.agGridHelper(this, this.gridOptions);
|
|
338
|
+
this.agGridMenuHelper = new agGridMenuHelper_1.agGridMenuHelper(this, this.gridOptions);
|
|
339
|
+
// Build the default group sort comparator - will get custom sort values (but not functions) in real time
|
|
340
|
+
// TODO: if a custom 'aggFunc' property is defined (see setupColumnAggFunc()), it won't be evaluated
|
|
341
|
+
if (!this.getDefaultGroupOrderComparator(this.gridOptions) &&
|
|
342
|
+
this.adaptableOptions.generalOptions.autoOrderGroupedColumns) {
|
|
343
|
+
this.gridOptions.defaultGroupOrderComparator = this.agGridHelper.runAdaptableGroupComparerFunction();
|
|
344
|
+
}
|
|
345
|
+
// we prefer the grid to be NOT instantiated so that we can do it
|
|
346
|
+
// perhaps in future we will force instantiation only?
|
|
347
|
+
// create the store
|
|
348
|
+
this.initStore();
|
|
349
|
+
// create the services
|
|
350
|
+
this.LicenseService = this.initLicenseService();
|
|
351
|
+
this.ValidationService = new ValidationService_1.ValidationService(this);
|
|
352
|
+
this.ReportService = new ReportService_1.ReportService(this);
|
|
353
|
+
this.ModuleService = new ModuleService_1.ModuleService(this);
|
|
354
|
+
this.CalculatedColumnExpressionService = new CalculatedColumnExpressionService_1.CalculatedColumnExpressionService(this);
|
|
355
|
+
this.EntitlementService = new EntitlementService_1.EntitlementService(this);
|
|
356
|
+
this.ExpressionService = new ExpressionService_1.ExpressionService(this);
|
|
357
|
+
this.AlertService = new AlertService_1.AlertService(this);
|
|
358
|
+
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this);
|
|
359
|
+
this.MetamodelService = new MetamodelService_1.MetamodelService(this);
|
|
360
|
+
this.forPlugins((plugin) => plugin.afterInitServices(this));
|
|
361
|
+
// Set up Modules - we set up all the Modules suitable for the vendor grid
|
|
362
|
+
// But users can make some hidden or readonly in their entitlements
|
|
363
|
+
this.modules = this.agGridHelper.setUpModules();
|
|
364
|
+
this.forPlugins((plugin) => plugin.afterInitModules(this, this.modules));
|
|
365
|
+
// also try to set it early, here, if the grid is initialized - needed for AdapTable tool panel
|
|
366
|
+
if (this.gridOptions.api) {
|
|
367
|
+
this.gridOptions.api.__adaptable = this;
|
|
368
|
+
}
|
|
369
|
+
this.gridOptions.columnTypes = this.gridOptions.columnTypes || {};
|
|
370
|
+
Object.assign(this.gridOptions.columnTypes, {
|
|
371
|
+
[GeneralConstants_1.AB_SPECIAL_COLUMN]: {},
|
|
372
|
+
abColDefNumber: (_a = this.gridOptions.columnTypes.abColDefNumber) !== null && _a !== void 0 ? _a : {},
|
|
373
|
+
abColDefString: (_b = this.gridOptions.columnTypes.abColDefString) !== null && _b !== void 0 ? _b : {},
|
|
374
|
+
abColDefBoolean: (_c = this.gridOptions.columnTypes.abColDefBoolean) !== null && _c !== void 0 ? _c : {},
|
|
375
|
+
abColDefDate: (_d = this.gridOptions.columnTypes.abColDefDate) !== null && _d !== void 0 ? _d : {},
|
|
376
|
+
abColDefObject: (_e = this.gridOptions.columnTypes.abColDefObject) !== null && _e !== void 0 ? _e : {},
|
|
377
|
+
abColDefCustom: (_f = this.gridOptions.columnTypes.abColDefCustom) !== null && _f !== void 0 ? _f : {},
|
|
378
|
+
abColDefNumberArray: (_g = this.gridOptions.columnTypes.abColDefNumberArray) !== null && _g !== void 0 ? _g : {},
|
|
379
|
+
});
|
|
380
|
+
if (this.gridOptions.columnTypes.abColDefNumber.cellEditor === undefined) {
|
|
381
|
+
this.gridOptions.columnTypes.abColDefNumber.cellEditor = AdaptableNumberEditor_1.AdaptableNumberEditor;
|
|
382
|
+
}
|
|
383
|
+
if (this.gridOptions.columnTypes.abColDefDate.cellEditor === undefined) {
|
|
384
|
+
this.gridOptions.columnTypes.abColDefDate.cellEditor = AdaptableDateEditor_1.AdaptableDateEditor;
|
|
385
|
+
}
|
|
386
|
+
return this.initializeAgGrid().then((initialized) => {
|
|
387
|
+
if (!initialized) {
|
|
388
|
+
// we have no grid, we can't do anything
|
|
389
|
+
LoggingHelper_1.ConsoleLogError('Unable to set up AG Grid');
|
|
390
|
+
return this.api;
|
|
391
|
+
}
|
|
392
|
+
let self = this;
|
|
393
|
+
// add our adaptable object to the grid options api object
|
|
394
|
+
// this is VERY useful for when we need to access Adaptable inside of agGrid only functions
|
|
395
|
+
if (this.gridOptions.api) {
|
|
396
|
+
this.gridOptions.api.__adaptable = this;
|
|
397
|
+
// we need to monkey patch the grid api
|
|
398
|
+
// we only do this for this instance, not on the prototype
|
|
399
|
+
this.gridOptions.api.setColumnDefs = function (columnDefs) {
|
|
400
|
+
self.currentColumnDefs = [].concat(columnDefs);
|
|
401
|
+
const result = GridApi_setColumnDefs.apply(this, arguments);
|
|
402
|
+
self.setupColumns();
|
|
403
|
+
return result;
|
|
404
|
+
};
|
|
405
|
+
}
|
|
406
|
+
// Load the store
|
|
407
|
+
this.adaptableStore.Load.then(() => {
|
|
408
|
+
this.initInternalGridLogic();
|
|
409
|
+
AdaptableHelper_1.default.checkValidPrimaryKey(this);
|
|
410
|
+
}, (e) => {
|
|
411
|
+
LoggingHelper_1.ConsoleLogError('Failed to Init Modules : ', e);
|
|
412
|
+
// for now we initiliaze the grid even if initialising Modules has failed (perhaps revisit this?)
|
|
413
|
+
this.initInternalGridLogic();
|
|
414
|
+
this.api.internalApi.hideLoadingScreen(); // doesnt really help but at least clears the screen
|
|
415
|
+
}).then(async () => {
|
|
416
|
+
this.api.internalApi.hideLoadingScreen();
|
|
417
|
+
this.isInitialised = true;
|
|
418
|
+
});
|
|
419
|
+
if (this.abContainerElement == null) {
|
|
420
|
+
this.abContainerElement = this.getadaptableContainerElement();
|
|
421
|
+
}
|
|
422
|
+
if (this.abContainerElement != null) {
|
|
423
|
+
this.abContainerElement.innerHTML = '';
|
|
424
|
+
ReactDOM.render(AdaptableView_1.AdaptableApp({ Adaptable: this }), this.abContainerElement);
|
|
425
|
+
}
|
|
426
|
+
// create debounce methods that take a time based on user settings
|
|
427
|
+
this.throttleFilterOnEditDataChange = throttle_1.default(this.gridOptions.api.onFilterChanged, this.adaptableOptions.searchOptions.filterActionOnUserDataChange.throttleDelay);
|
|
428
|
+
this.throttleFilterOnTickingDataChange = throttle_1.default(this.gridOptions.api.onFilterChanged, this.adaptableOptions.searchOptions.filterActionOnExternalDataChange.throttleDelay);
|
|
429
|
+
return this.api;
|
|
430
|
+
});
|
|
431
|
+
}
|
|
432
|
+
forPlugins(callback) {
|
|
433
|
+
if (Array.isArray(this.adaptableOptions.plugins)) {
|
|
434
|
+
this.adaptableOptions.plugins.forEach((plugin) => {
|
|
435
|
+
callback(plugin);
|
|
436
|
+
});
|
|
437
|
+
}
|
|
438
|
+
}
|
|
439
|
+
getPlugin(pluginId) {
|
|
440
|
+
const plugins = this.adaptableOptions.plugins || [];
|
|
441
|
+
const thePlugin = plugins.filter((p) => p.pluginId === pluginId)[0];
|
|
442
|
+
if (!thePlugin) {
|
|
443
|
+
throw `Cannot find plugin "${pluginId}". Make sure you spelled it right!`;
|
|
444
|
+
}
|
|
445
|
+
return thePlugin;
|
|
446
|
+
}
|
|
447
|
+
getPluginProperty(pluginId, propertyName, ...args) {
|
|
448
|
+
const plugins = this.adaptableOptions.plugins || [];
|
|
449
|
+
const thePlugin = plugins.filter((p) => p.pluginId === pluginId)[0];
|
|
450
|
+
if (!thePlugin) {
|
|
451
|
+
throw `Cannot find plugin "${pluginId}". Make sure you spelled it right!`;
|
|
452
|
+
}
|
|
453
|
+
if (thePlugin && thePlugin.hasProperty(propertyName)) {
|
|
454
|
+
return thePlugin.getProperty(propertyName)(...args);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
lookupPlugins(propertyName, ...args) {
|
|
458
|
+
const plugins = this.adaptableOptions.plugins || [];
|
|
459
|
+
for (let i = 0, len = plugins.length; i < len; i++) {
|
|
460
|
+
const plugin = plugins[i];
|
|
461
|
+
if (plugin.hasProperty(propertyName)) {
|
|
462
|
+
return plugin.getProperty(propertyName)(...args);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
return undefined;
|
|
466
|
+
}
|
|
467
|
+
initStore() {
|
|
468
|
+
LoggingHelper_1.LogAdaptableInfo(`Initialising AdaptableStore`);
|
|
469
|
+
this.adaptableStore = new AdaptableStore_1.AdaptableStore(this, this.isAgGridReady());
|
|
470
|
+
this.adaptableStore.onAny((eventName, data) => {
|
|
471
|
+
this.performAudit(data.action, data.state, data.newState);
|
|
472
|
+
this.forPlugins((plugin) => plugin.onStoreEvent(eventName, data, this.adaptableStore));
|
|
473
|
+
if (eventName == AdaptableStore_1.INIT_STATE) {
|
|
474
|
+
this._adaptableReady = true;
|
|
475
|
+
LoggingHelper_1.LogAdaptableInfo(`Updating obsolete configuration/state`);
|
|
476
|
+
this.modules.forEach((m) => m.updateOldConfig());
|
|
477
|
+
// call stuff here
|
|
478
|
+
// and reset state also?
|
|
479
|
+
this.forPlugins((plugin) => plugin.onAdaptableReady(this, this.adaptableOptions));
|
|
480
|
+
this.api.eventApi.emit('AdaptableReady', {
|
|
481
|
+
adaptableApi: this.api,
|
|
482
|
+
vendorGrid: this.adaptableOptions.vendorGrid,
|
|
483
|
+
});
|
|
484
|
+
}
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
performAudit(action, oldState, newState) {
|
|
488
|
+
const adaptableStateChangedInfo = {
|
|
489
|
+
actionName: action.type,
|
|
490
|
+
clientTimestamp: new Date(),
|
|
491
|
+
userName: this.adaptableOptions.userName,
|
|
492
|
+
adaptableId: this.adaptableOptions.adaptableId,
|
|
493
|
+
adaptableStateKey: this.adaptableOptions.adaptableStateKey,
|
|
494
|
+
action: action,
|
|
495
|
+
oldState: oldState,
|
|
496
|
+
newState: newState,
|
|
497
|
+
};
|
|
498
|
+
this.api.eventApi.emit('AdaptableStateChanged', adaptableStateChangedInfo);
|
|
499
|
+
}
|
|
500
|
+
initializeAgGrid() {
|
|
501
|
+
var _a;
|
|
502
|
+
LoggingHelper_1.LogAdaptableInfo(`Initializing AgGrid...`);
|
|
503
|
+
// set up whether we use the getRowNode method or loop when finding a rowNode (former is preferable)
|
|
504
|
+
// can only do that here as the gridOptions not yet set up
|
|
505
|
+
this.useRowNodeLookUp = this.agGridHelper.TrySetUpNodeIds();
|
|
506
|
+
if (Array.isArray(this.gridOptions.columnDefs)) {
|
|
507
|
+
this.gridOptions.columnDefs.forEach(assignColId);
|
|
508
|
+
}
|
|
509
|
+
if ((_a = this.adaptableOptions.generalOptions) === null || _a === void 0 ? void 0 : _a.hideEmptyGroupRows) {
|
|
510
|
+
LoggingHelper_1.LogAdaptableWarning(`DEPRECATED: 'GeneralOptions.hideEmptyGroupRows' is deprecated and will no longer be evaluated!`);
|
|
511
|
+
// disabled due to showstopper starting with AG Grid v26
|
|
512
|
+
// the internal implementation of AG Grids GroupCellRenderer has changed A LOT!
|
|
513
|
+
// this.gridOptions.components = this.gridOptions.components || {};
|
|
514
|
+
//
|
|
515
|
+
// this.gridOptions.autoGroupColumnDef = this.gridOptions.autoGroupColumnDef || {};
|
|
516
|
+
// if (!this.gridOptions.autoGroupColumnDef.cellRenderer) {
|
|
517
|
+
// this.gridOptions.autoGroupColumnDef.cellRenderer = '__adaptableGroupCellRenderer';
|
|
518
|
+
// this.gridOptions.components.__adaptableGroupCellRenderer = AdaptableGroupCellRenderer;
|
|
519
|
+
// }
|
|
520
|
+
}
|
|
521
|
+
// Create Adaptable adaptable Tool Panel
|
|
522
|
+
if (this.adaptableOptions.toolPanelOptions.showAdaptableToolPanel) {
|
|
523
|
+
if (this.gridOptions.sideBar) {
|
|
524
|
+
this.gridOptions.sideBar = this.gridOptions.sideBar || {};
|
|
525
|
+
this.gridOptions.components = this.gridOptions.components || {};
|
|
526
|
+
// https://www.ag-grid.com/javascript-grid/side-bar/
|
|
527
|
+
const sidebar = this.gridOptions.sideBar;
|
|
528
|
+
if (sidebar === true) {
|
|
529
|
+
// Possibility 1: Sidebar is true - meaning that they want the default filter and columns, so create both:
|
|
530
|
+
this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(true, true);
|
|
531
|
+
}
|
|
532
|
+
else if (sidebar === 'columns') {
|
|
533
|
+
// Possibility 2: Sidebar is 'columns' (string) - meaning column only so create just that
|
|
534
|
+
this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(false, true);
|
|
535
|
+
}
|
|
536
|
+
else if (sidebar === 'filters') {
|
|
537
|
+
// Possibility 3: Sidebar is 'filters' (string) - meaning filters only so create just that
|
|
538
|
+
this.gridOptions.sideBar = this.agGridHelper.createAdaptableSideBarDefs(true, false);
|
|
539
|
+
}
|
|
540
|
+
else {
|
|
541
|
+
// Possibilty 4: either no sidebar or they created their own; in either case, should add adaptable Tool panel
|
|
542
|
+
const sidebarDef = this.gridOptions.sideBar;
|
|
543
|
+
if (sidebarDef) {
|
|
544
|
+
sidebarDef.toolPanels = sidebarDef.toolPanels || [];
|
|
545
|
+
sidebarDef.toolPanels.push(this.agGridHelper.createAdaptableToolPanel());
|
|
546
|
+
this.agGridHelper.orderToolPanels(sidebarDef.toolPanels);
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
this.gridOptions.components.AdaptableToolPanel = AdaptableToolPanel_1.getAdaptableToolPanelAgGridComponent(this);
|
|
550
|
+
if (this.gridOptions.api) {
|
|
551
|
+
this.gridOptions.api.setSideBar(this.gridOptions.sideBar);
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
const checkVendorContainer = () => {
|
|
556
|
+
let vendorContainer = this.getGridContainerElement();
|
|
557
|
+
if (!vendorContainer) {
|
|
558
|
+
vendorContainer = this.initVendorContainerFromInitializedAgGrid();
|
|
559
|
+
if (!vendorContainer) {
|
|
560
|
+
LoggingHelper_1.ConsoleLogError('You must provide an element id in `containerOptions.vendorContainer`');
|
|
561
|
+
return false;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
return true;
|
|
565
|
+
};
|
|
566
|
+
const isGridInstantiated = this.gridOptions.api && typeof this.gridOptions.api.getValue === 'function';
|
|
567
|
+
if (isGridInstantiated) {
|
|
568
|
+
if (!checkVendorContainer()) {
|
|
569
|
+
return Promise.resolve(false);
|
|
570
|
+
}
|
|
571
|
+
return Promise.resolve(true);
|
|
572
|
+
}
|
|
573
|
+
if (this.runtimeConfig.waitForAgGrid) {
|
|
574
|
+
return this.isAgGridReady().then(() => {
|
|
575
|
+
this.initVendorContainerFromInitializedAgGrid();
|
|
576
|
+
return Promise.resolve(true);
|
|
577
|
+
}, () => {
|
|
578
|
+
LoggingHelper_1.ConsoleLogError(`Could not find any agGrid instance rendered. Could not find reference to ag-grid api. Make sure you pass the same gridOptions object reference both to Adaptable and AgGrid`);
|
|
579
|
+
return Promise.reject(false);
|
|
580
|
+
});
|
|
581
|
+
}
|
|
582
|
+
else {
|
|
583
|
+
if (!checkVendorContainer()) {
|
|
584
|
+
return Promise.resolve(false);
|
|
585
|
+
}
|
|
586
|
+
}
|
|
587
|
+
// now create the grid itself - it is done this way as previously when we instantiated the Grid 'properly' it got created as J.Grid
|
|
588
|
+
let grid;
|
|
589
|
+
const modules = (this.adaptableOptions.vendorGrid || {}).modules || [];
|
|
590
|
+
this.agGridModules = [...this.agGridModules, ...modules];
|
|
591
|
+
const vendorContainer = this.getGridContainerElement();
|
|
592
|
+
if (this.gridOptions.modules) {
|
|
593
|
+
delete this.gridOptions.modules;
|
|
594
|
+
}
|
|
595
|
+
grid = new all_modules_1.Grid(vendorContainer, this.gridOptions, { modules });
|
|
596
|
+
// add our adaptable object to the grid options api object
|
|
597
|
+
// this is VERY useful for when we need to access Adaptable inside of agGrid only functions
|
|
598
|
+
if (this.gridOptions.api) {
|
|
599
|
+
this.gridOptions.api.__adaptable = this;
|
|
600
|
+
}
|
|
601
|
+
return Promise.resolve(grid != null);
|
|
602
|
+
}
|
|
603
|
+
initVendorContainerFromInitializedAgGrid() {
|
|
604
|
+
if (this.getGridContainerElement()) {
|
|
605
|
+
return;
|
|
606
|
+
}
|
|
607
|
+
const layoutElements = this.gridOptions.api
|
|
608
|
+
? this.gridOptions.api.gridOptionsWrapper
|
|
609
|
+
? this.gridOptions.api.gridOptionsWrapper.layoutElements || []
|
|
610
|
+
: []
|
|
611
|
+
: [];
|
|
612
|
+
if (!layoutElements.length) {
|
|
613
|
+
// aggrid 25.3.0 doesn't have layoutElements anymore, so we try to retrieve this element
|
|
614
|
+
layoutElements.push(this.gridOptions.api.gridBodyCon.eGridBody);
|
|
615
|
+
}
|
|
616
|
+
let vendorContainer;
|
|
617
|
+
for (let i = 0, len = layoutElements.length; i < len; i++) {
|
|
618
|
+
const element = layoutElements[i];
|
|
619
|
+
if (element && element.matches('.ag-root-wrapper, .ag-root')) {
|
|
620
|
+
const gridContainer = element.closest('[class*="ag-theme"]');
|
|
621
|
+
if (gridContainer) {
|
|
622
|
+
vendorContainer = gridContainer;
|
|
623
|
+
break;
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
if (!vendorContainer) {
|
|
628
|
+
LoggingHelper_1.ConsoleLogError(`Could not find the agGrid vendor container. This will probably break some AdapTable functionality.`);
|
|
629
|
+
}
|
|
630
|
+
return (this.adaptableOptions.containerOptions.vendorContainer = vendorContainer);
|
|
631
|
+
}
|
|
632
|
+
filterOnEditDataChange() {
|
|
633
|
+
if (this.adaptableOptions.searchOptions.filterActionOnUserDataChange.applyFilter ==
|
|
634
|
+
Enums_1.FilterOnDataChangeOptions.Always) {
|
|
635
|
+
this.gridOptions.api.onFilterChanged();
|
|
636
|
+
}
|
|
637
|
+
else if (this.adaptableOptions.searchOptions.filterActionOnUserDataChange.applyFilter ==
|
|
638
|
+
Enums_1.FilterOnDataChangeOptions.Throttle) {
|
|
639
|
+
this.throttleFilterOnEditDataChange();
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
filterOnTickingDataChange() {
|
|
643
|
+
if (this.adaptableOptions.searchOptions.filterActionOnExternalDataChange.applyFilter ==
|
|
644
|
+
Enums_1.FilterOnDataChangeOptions.Always) {
|
|
645
|
+
this.gridOptions.api.onFilterChanged();
|
|
646
|
+
}
|
|
647
|
+
else if (this.adaptableOptions.searchOptions.filterActionOnExternalDataChange.applyFilter ==
|
|
648
|
+
Enums_1.FilterOnDataChangeOptions.Throttle) {
|
|
649
|
+
this.throttleFilterOnTickingDataChange();
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
applyGridFiltering() {
|
|
653
|
+
if (this.api.filterApi.isQuickFilterAvailable()) {
|
|
654
|
+
if (this.api.filterApi.isQuickFilterVisible()) {
|
|
655
|
+
this.showQuickFilter();
|
|
656
|
+
}
|
|
657
|
+
else {
|
|
658
|
+
this.hideQuickFilter();
|
|
659
|
+
}
|
|
660
|
+
}
|
|
661
|
+
this.gridOptions.api.onFilterChanged();
|
|
662
|
+
this._emit('GridFiltered');
|
|
663
|
+
this.setSelectedCells();
|
|
664
|
+
this.setSelectedRows();
|
|
665
|
+
}
|
|
666
|
+
isGroupRowNode(rowNode) {
|
|
667
|
+
if (!rowNode) {
|
|
668
|
+
return false;
|
|
669
|
+
}
|
|
670
|
+
if (rowNode.isEmptyRowGroupNode()) {
|
|
671
|
+
return true;
|
|
672
|
+
}
|
|
673
|
+
if (rowNode.group && rowNode.group === true) {
|
|
674
|
+
return true;
|
|
675
|
+
}
|
|
676
|
+
if (rowNode.leafGroup && rowNode.leafGroup === true) {
|
|
677
|
+
return true;
|
|
678
|
+
}
|
|
679
|
+
return false;
|
|
680
|
+
}
|
|
681
|
+
isVisibleNode(rowNode) {
|
|
682
|
+
const foundNode = this.gridOptions.api
|
|
683
|
+
.getRenderedNodes()
|
|
684
|
+
.find((n) => n.id == rowNode.id);
|
|
685
|
+
return foundNode != null;
|
|
686
|
+
}
|
|
687
|
+
isPinnedRowNode(rowNode) {
|
|
688
|
+
if (!rowNode) {
|
|
689
|
+
return false;
|
|
690
|
+
}
|
|
691
|
+
if (rowNode.isRowPinned()) {
|
|
692
|
+
return true;
|
|
693
|
+
}
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
clearGridFiltering() {
|
|
697
|
+
this.gridOptions.columnApi.getAllColumns().forEach((c) => {
|
|
698
|
+
this.gridOptions.api.destroyFilter(c);
|
|
699
|
+
});
|
|
700
|
+
}
|
|
701
|
+
clearColumnFiltering(columnIds) {
|
|
702
|
+
columnIds.forEach((c) => {
|
|
703
|
+
const column = this.gridOptions.columnApi
|
|
704
|
+
.getAllColumns()
|
|
705
|
+
.find((col) => col.getColId() == c);
|
|
706
|
+
if (column) {
|
|
707
|
+
this.gridOptions.api.destroyFilter(column);
|
|
708
|
+
}
|
|
709
|
+
});
|
|
710
|
+
}
|
|
711
|
+
hideFilterForm() {
|
|
712
|
+
if (this.hideFilterFormPopup) {
|
|
713
|
+
this.hideFilterFormPopup();
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
updateColumnsIntoStore() {
|
|
717
|
+
// if pivoting and we have 'special' columns as a result then do nothing ...
|
|
718
|
+
// if (this.gridOptions.columnApi!.isPivotMode()) {
|
|
719
|
+
// if (ArrayExtensions.IsNotNullOrEmpty(this.gridOptions.columnApi!.getPivotColumns())) {
|
|
720
|
+
// return;
|
|
721
|
+
// }
|
|
722
|
+
// }
|
|
723
|
+
const allColumns = [];
|
|
724
|
+
const vendorCols = this.gridOptions.columnApi.getAllColumns();
|
|
725
|
+
const columnGroupChildren = this.gridOptions.columnApi.getAllDisplayedColumnGroups();
|
|
726
|
+
const groupsCount = {};
|
|
727
|
+
const colsToGroups = columnGroupChildren.reduce((acc, columnGroup) => {
|
|
728
|
+
var _a, _b, _c;
|
|
729
|
+
if (!((_b = (_a = columnGroup.getOriginalColumnGroup) === null || _a === void 0 ? void 0 : _a.call(columnGroup)) === null || _b === void 0 ? void 0 : _b.getColGroupDef())) {
|
|
730
|
+
return acc;
|
|
731
|
+
}
|
|
732
|
+
const ColumnGroupId = columnGroup.getGroupId();
|
|
733
|
+
const AllowGroupSplit = !columnGroup.getOriginalColumnGroup().getColGroupDef().marryChildren;
|
|
734
|
+
const FriendlyName = (_c = columnGroup.getOriginalColumnGroup().getColGroupDef().headerName) !== null && _c !== void 0 ? _c : ColumnGroupId;
|
|
735
|
+
const columnsInGroup = columnGroup.getLeafColumns();
|
|
736
|
+
columnsInGroup.forEach((col) => {
|
|
737
|
+
const group = {
|
|
738
|
+
ColumnGroupId: ColumnGroupId,
|
|
739
|
+
FriendlyName,
|
|
740
|
+
AllowGroupSplit: AllowGroupSplit,
|
|
741
|
+
GroupCount: 0,
|
|
742
|
+
};
|
|
743
|
+
groupsCount[group.ColumnGroupId] = groupsCount[group.ColumnGroupId] || 0;
|
|
744
|
+
groupsCount[group.ColumnGroupId] += columnsInGroup.length;
|
|
745
|
+
acc[col.getColId()] = group;
|
|
746
|
+
});
|
|
747
|
+
return acc;
|
|
748
|
+
}, {});
|
|
749
|
+
Object.keys(colsToGroups).forEach((colId) => {
|
|
750
|
+
colsToGroups[colId].GroupCount = groupsCount[colsToGroups[colId].ColumnGroupId];
|
|
751
|
+
});
|
|
752
|
+
// TODO sort the visible columns by layout order
|
|
753
|
+
vendorCols.forEach((vendorColumn) => {
|
|
754
|
+
const colId = vendorColumn.getColId();
|
|
755
|
+
if (!this.api.columnApi.isRowGroupColumn(colId)) {
|
|
756
|
+
allColumns.push(this.createAdaptableColumn(vendorColumn, colsToGroups));
|
|
757
|
+
}
|
|
758
|
+
});
|
|
759
|
+
this.api.internalApi.setColumns(allColumns);
|
|
760
|
+
}
|
|
761
|
+
createAdaptableColumn(vendorColumn, colsToGroups) {
|
|
762
|
+
const abColumn = this.agGridHelper.createAdaptableColumnFromVendorColumn(vendorColumn, colsToGroups);
|
|
763
|
+
return abColumn;
|
|
764
|
+
}
|
|
765
|
+
safeSetColDefs(colDefs) {
|
|
766
|
+
// we need to do this because when doing gridOptions.api.setColumnDefs
|
|
767
|
+
// internally aggrid checks for column equality, and uses colId for that
|
|
768
|
+
// and since part of the column we set are basically the same old columns
|
|
769
|
+
// those that dont have a colId are detected as new columns, but since the old colIds/field
|
|
770
|
+
// are already in an aggrid cache, new ones with _1 are used, so basically all columns
|
|
771
|
+
// end up as new columns - really weird
|
|
772
|
+
colDefs = this.mapColumnDefs(colDefs, (colDef) => {
|
|
773
|
+
if (colDef.field && colDef.colId == null) {
|
|
774
|
+
colDef.colId = colDef.field;
|
|
775
|
+
}
|
|
776
|
+
return colDef;
|
|
777
|
+
});
|
|
778
|
+
this.gridOptions.api.setColumnDefs(colDefs);
|
|
779
|
+
this.updateColumnsIntoStore(); // todo remove this from here!!!
|
|
780
|
+
}
|
|
781
|
+
getFormatColumnCellStyle(formatColumn, params) {
|
|
782
|
+
if (!formatColumn.IncludeGroupedRows && this.isGroupRowNode(params.node)) {
|
|
783
|
+
return;
|
|
784
|
+
}
|
|
785
|
+
if (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) {
|
|
786
|
+
return;
|
|
787
|
+
}
|
|
788
|
+
let style = {};
|
|
789
|
+
const columnStyle = formatColumn.ColumnStyle;
|
|
790
|
+
if (columnStyle) {
|
|
791
|
+
const gradientStyle = columnStyle === null || columnStyle === void 0 ? void 0 : columnStyle.GradientStyle;
|
|
792
|
+
if (gradientStyle) {
|
|
793
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(columnStyle, params.node, params.value);
|
|
794
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(columnStyle, params.node, params.value);
|
|
795
|
+
const clampedValue = clamp_1.default(params.value, min, max);
|
|
796
|
+
let cellBackColor;
|
|
797
|
+
let reverseGradient = false;
|
|
798
|
+
if (gradientStyle.ColumnComparison) {
|
|
799
|
+
cellBackColor = gradientStyle.ColumnComparison.Color;
|
|
800
|
+
}
|
|
801
|
+
else {
|
|
802
|
+
const matchingRange = gradientStyle.CellRanges.find((r) => r.Min <= clampedValue && r.Max >= clampedValue);
|
|
803
|
+
if (matchingRange) {
|
|
804
|
+
cellBackColor = matchingRange.Color;
|
|
805
|
+
reverseGradient = matchingRange.ReverseGradient;
|
|
806
|
+
}
|
|
807
|
+
}
|
|
808
|
+
const increase = Math.abs(max - min);
|
|
809
|
+
const percentage = ((params.value - min) / increase) * 100;
|
|
810
|
+
let alpha = Number((percentage / 100).toPrecision(2));
|
|
811
|
+
if (reverseGradient) {
|
|
812
|
+
alpha = 1 - alpha;
|
|
813
|
+
}
|
|
814
|
+
style.backgroundColor = tinycolor(cellBackColor).setAlpha(alpha).toRgbString();
|
|
815
|
+
}
|
|
816
|
+
}
|
|
817
|
+
else if (formatColumn.Style) {
|
|
818
|
+
style = this.convertAdaptableStyleToCSS(formatColumn.Style);
|
|
819
|
+
}
|
|
820
|
+
if (formatColumn.CellAlignment) {
|
|
821
|
+
switch (formatColumn.CellAlignment) {
|
|
822
|
+
case 'Left':
|
|
823
|
+
style.textAlign = 'left';
|
|
824
|
+
break;
|
|
825
|
+
case 'Right':
|
|
826
|
+
style.textAlign = 'right';
|
|
827
|
+
break;
|
|
828
|
+
case 'Center':
|
|
829
|
+
style.textAlign = 'center';
|
|
830
|
+
break;
|
|
831
|
+
}
|
|
832
|
+
}
|
|
833
|
+
return style;
|
|
834
|
+
}
|
|
835
|
+
getAlertCellStyle(col, params) {
|
|
836
|
+
const activeAlerts = this.api.internalApi
|
|
837
|
+
.getAdaptableAlerts()
|
|
838
|
+
.filter((aa) => {
|
|
839
|
+
var _a;
|
|
840
|
+
return ((_a = aa.alertDefinition.AlertProperties) === null || _a === void 0 ? void 0 : _a.HighlightCell) &&
|
|
841
|
+
aa.dataChangedInfo &&
|
|
842
|
+
aa.dataChangedInfo.columnId === col.ColumnId &&
|
|
843
|
+
aa.dataChangedInfo.rowNode === params.node;
|
|
844
|
+
});
|
|
845
|
+
const alert = activeAlerts[0];
|
|
846
|
+
if (alert) {
|
|
847
|
+
return {
|
|
848
|
+
backgroundColor: UIHelper_1.default.getColorByMessageType(alert.alertDefinition.MessageType),
|
|
849
|
+
};
|
|
850
|
+
}
|
|
851
|
+
}
|
|
852
|
+
getFlashingAlertRowStyle(params) {
|
|
853
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
854
|
+
return this.getFlashingAlertStyleFor(primaryKeyValue);
|
|
855
|
+
}
|
|
856
|
+
getFlashingAlertStyleFor(primaryKey, colId) {
|
|
857
|
+
var _a;
|
|
858
|
+
const flashingAlert = this.api.internalApi.getAdaptableFlashingAlertFor(primaryKey, colId);
|
|
859
|
+
if (!flashingAlert) {
|
|
860
|
+
return {};
|
|
861
|
+
}
|
|
862
|
+
return this.convertAdaptableStyleToCSS((_a = (flashingAlert.direction === 'up'
|
|
863
|
+
? flashingAlert.flashingAlertDefinition.UpChangeStyle
|
|
864
|
+
: flashingAlert.direction === 'down'
|
|
865
|
+
? flashingAlert.flashingAlertDefinition.DownChangeStyle
|
|
866
|
+
: flashingAlert.flashingAlertDefinition.NeutralChangeStyle)) !== null && _a !== void 0 ? _a : {});
|
|
867
|
+
}
|
|
868
|
+
getFlashingAlertCellStyle(col, params) {
|
|
869
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
870
|
+
return this.getFlashingAlertStyleFor(primaryKeyValue, col.ColumnId);
|
|
871
|
+
}
|
|
872
|
+
getCellHighlightStyle(col, params) {
|
|
873
|
+
var _a;
|
|
874
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
875
|
+
const cellHightlight = this.api.internalApi
|
|
876
|
+
.getSystemState()
|
|
877
|
+
.HighlightedCells.find((cellHighlightInfo) => {
|
|
878
|
+
return (col.ColumnId === cellHighlightInfo.columnId &&
|
|
879
|
+
cellHighlightInfo.primaryKeyValue === primaryKeyValue);
|
|
880
|
+
});
|
|
881
|
+
if (cellHightlight) {
|
|
882
|
+
const highhlightType = (_a = cellHightlight.highlightType) !== null && _a !== void 0 ? _a : 'Info';
|
|
883
|
+
switch (highhlightType) {
|
|
884
|
+
case 'Error':
|
|
885
|
+
return { backgroundColor: 'var(--ab-color-error)' };
|
|
886
|
+
case 'Info':
|
|
887
|
+
return { backgroundColor: 'var(--ab-color-info)' };
|
|
888
|
+
case 'Success':
|
|
889
|
+
return { backgroundColor: 'var(--ab-color-success)' };
|
|
890
|
+
case 'Warning':
|
|
891
|
+
return { backgroundColor: 'var(--ab-color-warn)' };
|
|
892
|
+
}
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
getQuickSearchCellStyle() {
|
|
896
|
+
const quickSearchStyle = this.api.quickSearchApi.getQuickSearchStyle();
|
|
897
|
+
if (!quickSearchStyle || StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyle.ClassName)) {
|
|
898
|
+
return undefined;
|
|
899
|
+
}
|
|
900
|
+
return this.convertAdaptableStyleToCSS(quickSearchStyle);
|
|
901
|
+
}
|
|
902
|
+
getEditableCellStyle(abColumn, params) {
|
|
903
|
+
const editableCellStyle = this.api.userInterfaceApi.getEditableCellStyle();
|
|
904
|
+
if (!editableCellStyle) {
|
|
905
|
+
return undefined;
|
|
906
|
+
}
|
|
907
|
+
const gridCell = this.getGridCellFromRowNode(params.node, abColumn.ColumnId);
|
|
908
|
+
if (gridCell) {
|
|
909
|
+
if (this.api.gridApi.areCellsEditable([gridCell])) {
|
|
910
|
+
return this.convertAdaptableStyleToCSS(editableCellStyle);
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
return undefined;
|
|
914
|
+
}
|
|
915
|
+
getReadOnlyCellStyle(abColumn, params) {
|
|
916
|
+
const editableCellStyle = this.api.userInterfaceApi.getReadOnlyCellStyle();
|
|
917
|
+
if (!editableCellStyle) {
|
|
918
|
+
return undefined;
|
|
919
|
+
}
|
|
920
|
+
const gridCell = this.getGridCellFromRowNode(params.node, abColumn.ColumnId);
|
|
921
|
+
if (gridCell) {
|
|
922
|
+
if (!this.api.gridApi.areCellsEditable([gridCell])) {
|
|
923
|
+
return this.convertAdaptableStyleToCSS(editableCellStyle);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
return undefined;
|
|
927
|
+
}
|
|
928
|
+
getConditionalStyleCellStyle(conditionalStyles = [], abColumn, params) {
|
|
929
|
+
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
930
|
+
const result = conditionalStyles.reduce((result, conditionalStyle) => {
|
|
931
|
+
if (module.isConditionalStyleActiveForColumn(conditionalStyle, abColumn, params)) {
|
|
932
|
+
return Object.assign(Object.assign({}, result), conditionalStyle.Style);
|
|
933
|
+
}
|
|
934
|
+
else {
|
|
935
|
+
return result;
|
|
936
|
+
}
|
|
937
|
+
}, {});
|
|
938
|
+
return this.convertAdaptableStyleToCSS(result);
|
|
939
|
+
}
|
|
940
|
+
getConditionalStyleCellClass(conditionalStyles = [], abColumn, params) {
|
|
941
|
+
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
942
|
+
let classNames = conditionalStyles
|
|
943
|
+
.map((conditionalStyle) => {
|
|
944
|
+
var _a, _b;
|
|
945
|
+
if (((_a = conditionalStyle.Style) === null || _a === void 0 ? void 0 : _a.ClassName) &&
|
|
946
|
+
module.isConditionalStyleActiveForColumn(conditionalStyle, abColumn, params)) {
|
|
947
|
+
return (_b = conditionalStyle.Style) === null || _b === void 0 ? void 0 : _b.ClassName;
|
|
948
|
+
}
|
|
949
|
+
})
|
|
950
|
+
.filter((x) => !!x)
|
|
951
|
+
.join(' ');
|
|
952
|
+
return classNames;
|
|
953
|
+
}
|
|
954
|
+
isQuickSearchActive(abColumn, params) {
|
|
955
|
+
if (abColumn.IsExcludedFromQuickSearch) {
|
|
956
|
+
return false;
|
|
957
|
+
}
|
|
958
|
+
if (!params.node || params.node.group) {
|
|
959
|
+
return false;
|
|
960
|
+
}
|
|
961
|
+
let quickSearchValue = this.api.quickSearchApi.getQuickSearchValue();
|
|
962
|
+
if (StringExtensions_1.StringExtensions.IsNullOrEmpty(quickSearchValue)) {
|
|
963
|
+
return false;
|
|
964
|
+
}
|
|
965
|
+
const columnFilter = ObjectFactory_1.default.CreateColumnFilter(abColumn.ColumnId, 'Contains', [quickSearchValue]);
|
|
966
|
+
return this.api.filterApi.evaluateColumnFilter(columnFilter, params.node);
|
|
967
|
+
}
|
|
968
|
+
getPrimaryKeyValueFromRowNode(rowNode) {
|
|
969
|
+
var _a;
|
|
970
|
+
let gridApi = this.getGridOptionsApi();
|
|
971
|
+
let result;
|
|
972
|
+
if (gridApi && !this.hasAutogeneratedPrimaryKey()) {
|
|
973
|
+
result = gridApi.getValue(this.adaptableOptions.primaryKey, rowNode);
|
|
974
|
+
}
|
|
975
|
+
if ((result === null || result == undefined) && rowNode && rowNode.data) {
|
|
976
|
+
result = (_a = rowNode.data[this.adaptableOptions.primaryKey]) !== null && _a !== void 0 ? _a : null;
|
|
977
|
+
}
|
|
978
|
+
return result;
|
|
979
|
+
}
|
|
980
|
+
getSortedColumnStateForVisibleColumns(visibleColumnList, columnState) {
|
|
981
|
+
columnState = columnState || this.gridOptions.columnApi.getColumnState();
|
|
982
|
+
const NewVisibleColumnIdsMap = visibleColumnList.reduce((acc, colId, index) => {
|
|
983
|
+
acc[colId] = index;
|
|
984
|
+
return acc;
|
|
985
|
+
}, {});
|
|
986
|
+
const columnsStateIndexes = columnState.reduce((acc, colState, index) => {
|
|
987
|
+
acc[colState.colId] = index;
|
|
988
|
+
return acc;
|
|
989
|
+
}, {});
|
|
990
|
+
const newVisibleColumnsMap = visibleColumnList.reduce((acc, colId, index) => {
|
|
991
|
+
acc[colId] = index;
|
|
992
|
+
return acc;
|
|
993
|
+
}, {});
|
|
994
|
+
const result = [...columnState]
|
|
995
|
+
.sort((colState1, colState2) => {
|
|
996
|
+
const colId1 = colState1.colId;
|
|
997
|
+
const colId2 = colState2.colId;
|
|
998
|
+
const originalIndex1 = columnsStateIndexes[colId1];
|
|
999
|
+
const originalIndex2 = columnsStateIndexes[colId2];
|
|
1000
|
+
const isRowGroup1 = this.api.columnApi.isRowGroupColumn(colId1);
|
|
1001
|
+
const isRowGroup2 = this.api.columnApi.isRowGroupColumn(colId2);
|
|
1002
|
+
if (isRowGroup1 && isRowGroup2) {
|
|
1003
|
+
return 1;
|
|
1004
|
+
}
|
|
1005
|
+
if (isRowGroup1) {
|
|
1006
|
+
return -1;
|
|
1007
|
+
}
|
|
1008
|
+
if (isRowGroup2) {
|
|
1009
|
+
return 1;
|
|
1010
|
+
}
|
|
1011
|
+
if (newVisibleColumnsMap[colId1] != null && newVisibleColumnsMap[colId2] == null) {
|
|
1012
|
+
return -1;
|
|
1013
|
+
}
|
|
1014
|
+
if (newVisibleColumnsMap[colId1] == null && newVisibleColumnsMap[colId2] != null) {
|
|
1015
|
+
return 1;
|
|
1016
|
+
}
|
|
1017
|
+
if (newVisibleColumnsMap[colId1] == null && newVisibleColumnsMap[colId2] == null) {
|
|
1018
|
+
return originalIndex1 - originalIndex2;
|
|
1019
|
+
}
|
|
1020
|
+
return newVisibleColumnsMap[colState1.colId] - newVisibleColumnsMap[colState2.colId];
|
|
1021
|
+
})
|
|
1022
|
+
.map((colState) => (Object.assign(Object.assign({}, colState), { hide: NewVisibleColumnIdsMap[colState.colId] == null })));
|
|
1023
|
+
return result;
|
|
1024
|
+
}
|
|
1025
|
+
setColumnOrder(VisibleColumnList) {
|
|
1026
|
+
const newColumnState = this.getSortedColumnStateForVisibleColumns(VisibleColumnList);
|
|
1027
|
+
this.gridOptions.columnApi.setColumnState(newColumnState);
|
|
1028
|
+
this.updateColumnsIntoStore();
|
|
1029
|
+
}
|
|
1030
|
+
persistLayout(layout) {
|
|
1031
|
+
if (this.api.layoutApi.shouldAutoSaveLayout(layout)) {
|
|
1032
|
+
this.api.layoutApi.saveLayout(layout);
|
|
1033
|
+
}
|
|
1034
|
+
else {
|
|
1035
|
+
this.api.internalApi.updateCurrentDraftLayout(layout);
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
setLayout(layout) {
|
|
1039
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1040
|
+
if (!layout) {
|
|
1041
|
+
layout = this.api.layoutApi.getCurrentLayout();
|
|
1042
|
+
}
|
|
1043
|
+
layout.Columns = layout.Columns || [];
|
|
1044
|
+
const layoutColumnsMap = layout.Columns.reduce((acc, colId) => {
|
|
1045
|
+
acc[colId] = true;
|
|
1046
|
+
return acc;
|
|
1047
|
+
}, {});
|
|
1048
|
+
const columnsState = this.gridOptions.columnApi.getColumnState();
|
|
1049
|
+
const columnsStateIndexes = {};
|
|
1050
|
+
const columnsStateMap = columnsState.reduce((acc, colState, index) => {
|
|
1051
|
+
columnsStateIndexes[colState.colId] = index;
|
|
1052
|
+
acc[colState.colId] = colState;
|
|
1053
|
+
return acc;
|
|
1054
|
+
}, {});
|
|
1055
|
+
let sortIndex = 0;
|
|
1056
|
+
const sortModelMap = ((_a = layout.ColumnSorts) !== null && _a !== void 0 ? _a : []).reduce((acc, customSort) => {
|
|
1057
|
+
const colId = customSort.ColumnId;
|
|
1058
|
+
if (!layoutColumnsMap[colId]) {
|
|
1059
|
+
return acc;
|
|
1060
|
+
}
|
|
1061
|
+
acc[colId] = {
|
|
1062
|
+
colId,
|
|
1063
|
+
sort: customSort.SortOrder === 'Asc' ? 'asc' : 'desc',
|
|
1064
|
+
sortIndex,
|
|
1065
|
+
};
|
|
1066
|
+
sortIndex++;
|
|
1067
|
+
return acc;
|
|
1068
|
+
}, {});
|
|
1069
|
+
const groupedColumnsIndexesMap = (layout.RowGroupedColumns || []).reduce((acc, colId, index) => {
|
|
1070
|
+
acc[colId] = index;
|
|
1071
|
+
return acc;
|
|
1072
|
+
}, {});
|
|
1073
|
+
let pivotedColumnsIndexesMap = {};
|
|
1074
|
+
const aggregationFunctionsColumnsMap = layout.AggregationColumns || {};
|
|
1075
|
+
const columnsInPivot = [
|
|
1076
|
+
...(layout.PivotColumns || []),
|
|
1077
|
+
...Object.keys(layout.AggregationColumns || {}),
|
|
1078
|
+
];
|
|
1079
|
+
const columnsToShow = !layout.EnablePivot ? layout.Columns : columnsInPivot || [];
|
|
1080
|
+
if (columnsInPivot.length && layout.RowGroupedColumns) {
|
|
1081
|
+
columnsInPivot.push(...layout.RowGroupedColumns);
|
|
1082
|
+
}
|
|
1083
|
+
let isChanged = false;
|
|
1084
|
+
const colsToAutoSize = {};
|
|
1085
|
+
let newColState = this.getSortedColumnStateForVisibleColumns(columnsToShow, columnsState);
|
|
1086
|
+
newColState = newColState
|
|
1087
|
+
.map((colState) => {
|
|
1088
|
+
var _a, _b, _c, _d;
|
|
1089
|
+
const { colId } = colState;
|
|
1090
|
+
const oldColState = columnsStateMap[colId];
|
|
1091
|
+
const hide = !layoutColumnsMap[colId];
|
|
1092
|
+
const newColState = Object.assign(Object.assign({}, oldColState), { hide });
|
|
1093
|
+
if (layout.ColumnWidthMap && layout.ColumnWidthMap[colId] != null) {
|
|
1094
|
+
newColState.width = layout.ColumnWidthMap[colId];
|
|
1095
|
+
}
|
|
1096
|
+
else {
|
|
1097
|
+
colsToAutoSize[colId] = true;
|
|
1098
|
+
}
|
|
1099
|
+
newColState.rowGroupIndex =
|
|
1100
|
+
groupedColumnsIndexesMap[colId] != null ? groupedColumnsIndexesMap[colId] : null;
|
|
1101
|
+
// if (newColState.rowGroupIndex == null) {
|
|
1102
|
+
newColState.rowGroup = newColState.rowGroupIndex != null;
|
|
1103
|
+
// }
|
|
1104
|
+
const normalizePinned = (pinnedValue) => {
|
|
1105
|
+
if (typeof pinnedValue === 'string') {
|
|
1106
|
+
return pinnedValue;
|
|
1107
|
+
}
|
|
1108
|
+
return pinnedValue == true ? 'left' : !!pinnedValue;
|
|
1109
|
+
};
|
|
1110
|
+
const newValuePinned = normalizePinned(layout.PinnedColumnsMap ? layout.PinnedColumnsMap[colId] : false);
|
|
1111
|
+
const stateValuePinned = normalizePinned(newColState.pinned);
|
|
1112
|
+
if (newValuePinned !== stateValuePinned) {
|
|
1113
|
+
newColState.pinned = newValuePinned;
|
|
1114
|
+
}
|
|
1115
|
+
newColState.pivotIndex = null;
|
|
1116
|
+
if (pivotedColumnsIndexesMap[colId] != null) {
|
|
1117
|
+
newColState.pivotIndex = pivotedColumnsIndexesMap[colId];
|
|
1118
|
+
}
|
|
1119
|
+
newColState.aggFunc = null;
|
|
1120
|
+
if (aggregationFunctionsColumnsMap[colId] != null) {
|
|
1121
|
+
const colDef = (_b = (_a = this.gridOptions) === null || _a === void 0 ? void 0 : _a.api) === null || _b === void 0 ? void 0 : _b.getColumnDef(colId);
|
|
1122
|
+
newColState.aggFunc =
|
|
1123
|
+
aggregationFunctionsColumnsMap[colId] === true
|
|
1124
|
+
? // if we have true, it means - take the default aggFunc from colDef
|
|
1125
|
+
(_d = (_c =
|
|
1126
|
+
// NOTE: colState gives us the current aggFunc, which can be null,
|
|
1127
|
+
// while the colDef gives us the initially configured aggFunc for that column
|
|
1128
|
+
colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d : 'sum' : aggregationFunctionsColumnsMap[colId];
|
|
1129
|
+
}
|
|
1130
|
+
if (sortModelMap[colId]) {
|
|
1131
|
+
newColState.sort = sortModelMap[colId].sort;
|
|
1132
|
+
newColState.sortIndex = sortModelMap[colId].sortIndex;
|
|
1133
|
+
}
|
|
1134
|
+
else {
|
|
1135
|
+
newColState.sort = null;
|
|
1136
|
+
newColState.sortIndex = null;
|
|
1137
|
+
}
|
|
1138
|
+
isChanged = isChanged || !isEqual_1.default(newColState, oldColState);
|
|
1139
|
+
return newColState;
|
|
1140
|
+
})
|
|
1141
|
+
.filter((x) => !!x);
|
|
1142
|
+
if (!isChanged) {
|
|
1143
|
+
// order changed
|
|
1144
|
+
const toString = (c) => `${c.colId}-${c.rowGroupIndex}-${c.pivotIndex}-${c.aggFunc}-${c.pinned}-${c.width}-${c.hide}`;
|
|
1145
|
+
const oldColStateString = columnsState.map(toString).join(',');
|
|
1146
|
+
const newColStateString = newColState.map(toString).join(',');
|
|
1147
|
+
isChanged = newColStateString != oldColStateString;
|
|
1148
|
+
}
|
|
1149
|
+
const pivoted = !!layout.EnablePivot;
|
|
1150
|
+
const shouldUpdatePivoted = this.gridOptions.columnApi.isPivotMode() !== pivoted;
|
|
1151
|
+
isChanged = isChanged || shouldUpdatePivoted;
|
|
1152
|
+
let shouldUpdateHeaders = false;
|
|
1153
|
+
shouldUpdateHeaders = this.setupColumnHeaderAggregations(layout);
|
|
1154
|
+
// update the header name for all columns
|
|
1155
|
+
// there should be a simpler solution for this, once the Layout Management is refactored
|
|
1156
|
+
this.gridOptions.columnApi.getAllColumns().forEach((col) => {
|
|
1157
|
+
const colDef = col.getColDef();
|
|
1158
|
+
const colId = col.getColId();
|
|
1159
|
+
const abColumn = this.api.columnApi.getColumnFromId(colId);
|
|
1160
|
+
const colSetupInfo = {
|
|
1161
|
+
col,
|
|
1162
|
+
colDef,
|
|
1163
|
+
colId,
|
|
1164
|
+
abColumn,
|
|
1165
|
+
};
|
|
1166
|
+
shouldUpdateHeaders = this.setupColumnHeader(colSetupInfo) || shouldUpdateHeaders;
|
|
1167
|
+
});
|
|
1168
|
+
isChanged = isChanged || shouldUpdateHeaders;
|
|
1169
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(layout.ExpandedRowGroupValues) &&
|
|
1170
|
+
this.adaptableOptions.layoutOptions.includeExpandedRowGroups) {
|
|
1171
|
+
this.expandRowGroupsForValues(layout.ExpandedRowGroupValues);
|
|
1172
|
+
}
|
|
1173
|
+
if (isChanged) {
|
|
1174
|
+
// it's important we set pivot mode
|
|
1175
|
+
// before we set column state
|
|
1176
|
+
// as otherwise column order is not preserved properly when
|
|
1177
|
+
// going from pivoted to unpivoted layout
|
|
1178
|
+
if (shouldUpdatePivoted) {
|
|
1179
|
+
this.gridOptions.columnApi.setPivotMode(pivoted);
|
|
1180
|
+
}
|
|
1181
|
+
this.gridOptions.columnApi.setColumnState(newColState);
|
|
1182
|
+
this.api.gridApi.setColumnSorts(layout.ColumnSorts);
|
|
1183
|
+
this.gridOptions.columnApi.setPivotColumns(layout.PivotColumns || []);
|
|
1184
|
+
// aggrid 25.1.0 introduced a bug such that a layout that has a grouped column, if the column has enableRowGroup: true but not rowGroup: true
|
|
1185
|
+
// the group column is not possitioned correctly at the start of the layout
|
|
1186
|
+
// see the test in layout/layout-switch/"should be able to switch from grouped to non-grouped and back"
|
|
1187
|
+
// so we figured out the following line fixes the issue
|
|
1188
|
+
// this.gridOptions.api.setColumnDefs(this.gridOptions.api.getColumnDefs()); //TODO find a solution for weighted averages - column floating filters are not showing
|
|
1189
|
+
GridApi_setColumnDefs.call(this.gridOptions.api, this.gridOptions.api.getColumnDefs());
|
|
1190
|
+
// this.updateColumnsIntoStore();// no longer needed
|
|
1191
|
+
}
|
|
1192
|
+
const colsToAutoSizeArray = Object.keys(colsToAutoSize);
|
|
1193
|
+
if (pivoted && ((_c = (_b = this.adaptableOptions) === null || _b === void 0 ? void 0 : _b.layoutOptions) === null || _c === void 0 ? void 0 : _c.autoSizeColumnsInPivotLayout)) {
|
|
1194
|
+
// when a pivoted layout loads, autosize all cols
|
|
1195
|
+
requestAnimationFrame(() => {
|
|
1196
|
+
this.gridOptions.columnApi.autoSizeAllColumns();
|
|
1197
|
+
});
|
|
1198
|
+
//but if it's also the first time the grid is loading
|
|
1199
|
+
//it's not timely enough the above call, so we keep trying... I know it's ugly, we need to find a better way
|
|
1200
|
+
setTimeout(() => {
|
|
1201
|
+
var _a;
|
|
1202
|
+
(_a = this.gridOptions.columnApi) === null || _a === void 0 ? void 0 : _a.autoSizeAllColumns();
|
|
1203
|
+
setTimeout(() => {
|
|
1204
|
+
var _a;
|
|
1205
|
+
(_a = this.gridOptions.columnApi) === null || _a === void 0 ? void 0 : _a.autoSizeAllColumns();
|
|
1206
|
+
}, 200);
|
|
1207
|
+
}, 100);
|
|
1208
|
+
return;
|
|
1209
|
+
}
|
|
1210
|
+
if (((_e = (_d = this.adaptableOptions) === null || _d === void 0 ? void 0 : _d.layoutOptions) === null || _e === void 0 ? void 0 : _e.autoSizeColumnsInLayout) &&
|
|
1211
|
+
colsToAutoSizeArray.length) {
|
|
1212
|
+
(_f = this.gridOptions.columnApi) === null || _f === void 0 ? void 0 : _f.autoSizeColumns(colsToAutoSizeArray);
|
|
1213
|
+
}
|
|
1214
|
+
this.forPlugins((plugin) => {
|
|
1215
|
+
if (plugin.afterSetLayout) {
|
|
1216
|
+
plugin.afterSetLayout(this, layout);
|
|
1217
|
+
}
|
|
1218
|
+
});
|
|
1219
|
+
// this.api.layoutApi.fireLayoutUpdatedEvent(layout, 'UpdatedLayout');
|
|
1220
|
+
}
|
|
1221
|
+
/*
|
|
1222
|
+
* This is the opposite of setLayout
|
|
1223
|
+
*/
|
|
1224
|
+
updateLayoutFromGrid() {
|
|
1225
|
+
const currentLayout = this.api.layoutApi.getCurrentLayout();
|
|
1226
|
+
const layout = Object.assign({}, currentLayout);
|
|
1227
|
+
const columnOrder = [];
|
|
1228
|
+
const columnFlexes = {};
|
|
1229
|
+
const pinnedColumns = {};
|
|
1230
|
+
const columnSorts = [];
|
|
1231
|
+
const columnState = this.gridOptions.columnApi.getColumnState();
|
|
1232
|
+
let groupedColumns = [...new Array(columnState.length)];
|
|
1233
|
+
let pivotedColumns = [...new Array(columnState.length)];
|
|
1234
|
+
const pivotColumns = [];
|
|
1235
|
+
const aggregatedColumns = {};
|
|
1236
|
+
const columnWidths = columnState.reduce((acc, colState) => {
|
|
1237
|
+
const { colId } = colState;
|
|
1238
|
+
if (colState.sort && colState.sortIndex != null) {
|
|
1239
|
+
columnSorts.push({
|
|
1240
|
+
ColumnId: colId,
|
|
1241
|
+
SortOrder: colState.sort === 'asc' ? 'Asc' : 'Desc',
|
|
1242
|
+
SortIndex: colState.sortIndex,
|
|
1243
|
+
});
|
|
1244
|
+
}
|
|
1245
|
+
if (colState.width != null) {
|
|
1246
|
+
acc[colId] = colState.width;
|
|
1247
|
+
}
|
|
1248
|
+
if (colState.flex != null) {
|
|
1249
|
+
columnFlexes[colId] = colState.flex;
|
|
1250
|
+
}
|
|
1251
|
+
if (colState.pinned === 'left') {
|
|
1252
|
+
pinnedColumns[colId] = 'left';
|
|
1253
|
+
}
|
|
1254
|
+
if (colState.pinned === 'right') {
|
|
1255
|
+
pinnedColumns[colId] = 'right';
|
|
1256
|
+
}
|
|
1257
|
+
if (!colState.hide) {
|
|
1258
|
+
columnOrder.push(colId);
|
|
1259
|
+
}
|
|
1260
|
+
if (colState.rowGroupIndex != null) {
|
|
1261
|
+
groupedColumns[colState.rowGroupIndex] = colId;
|
|
1262
|
+
}
|
|
1263
|
+
if (colState.pivotIndex != null) {
|
|
1264
|
+
pivotedColumns[colState.pivotIndex] = colId;
|
|
1265
|
+
}
|
|
1266
|
+
if (colState.aggFunc && typeof colState.aggFunc === 'string') {
|
|
1267
|
+
aggregatedColumns[colId] = colState.aggFunc;
|
|
1268
|
+
}
|
|
1269
|
+
return acc;
|
|
1270
|
+
}, {});
|
|
1271
|
+
columnSorts.sort((a, b) => a.SortIndex - b.SortIndex);
|
|
1272
|
+
this.gridOptions.columnApi.getPivotColumns().forEach((col) => {
|
|
1273
|
+
pivotColumns.push(col.getColId());
|
|
1274
|
+
});
|
|
1275
|
+
groupedColumns = groupedColumns.filter((x) => !!x);
|
|
1276
|
+
pivotedColumns = pivotedColumns.filter((x) => !!x);
|
|
1277
|
+
layout.ColumnWidthMap = columnWidths;
|
|
1278
|
+
// layout.ColumnFlexMap = columnFlexes;
|
|
1279
|
+
layout.PinnedColumnsMap = pinnedColumns;
|
|
1280
|
+
layout.Columns = columnOrder;
|
|
1281
|
+
layout.ColumnSorts = columnSorts;
|
|
1282
|
+
layout.RowGroupedColumns = groupedColumns;
|
|
1283
|
+
if (Object.keys(aggregatedColumns).length) {
|
|
1284
|
+
layout.AggregationColumns = aggregatedColumns;
|
|
1285
|
+
}
|
|
1286
|
+
layout.EnablePivot = this.gridOptions.columnApi.isPivotMode();
|
|
1287
|
+
layout.PivotColumns = pivotColumns;
|
|
1288
|
+
if (this.adaptableOptions.layoutOptions.includeExpandedRowGroups) {
|
|
1289
|
+
layout.ExpandedRowGroupValues = this.getExpandRowGroupsKeys();
|
|
1290
|
+
}
|
|
1291
|
+
// this.api.layoutApi.fireLayoutUpdatedEvent(layout, 'UpdatedLayout');
|
|
1292
|
+
this.persistLayout(layout);
|
|
1293
|
+
}
|
|
1294
|
+
// This method returns selected cells ONLY (if selection mode is cells or multiple cells).
|
|
1295
|
+
// If the selection mode is row it will returns nothing - use the setSelectedRows() method
|
|
1296
|
+
setSelectedCells() {
|
|
1297
|
+
if (!this.isGridSelectable()) {
|
|
1298
|
+
return undefined;
|
|
1299
|
+
}
|
|
1300
|
+
const selected = this.gridOptions.api.getCellRanges();
|
|
1301
|
+
const columns = [];
|
|
1302
|
+
const selectedCells = [];
|
|
1303
|
+
if (this.api.internalApi.isGridInPivotMode()) {
|
|
1304
|
+
return undefined;
|
|
1305
|
+
}
|
|
1306
|
+
if (selected) {
|
|
1307
|
+
// we iterate for each ranges
|
|
1308
|
+
selected.forEach((rangeSelection) => {
|
|
1309
|
+
let shouldIncludeRange = true;
|
|
1310
|
+
if (rangeSelection.startRow && rangeSelection.endRow) {
|
|
1311
|
+
let isStartRowPin = rangeSelection.startRow.rowPinned != null;
|
|
1312
|
+
let isEndRowPin = rangeSelection.endRow.rowPinned != null;
|
|
1313
|
+
// Warn user if trying to select pinned rows
|
|
1314
|
+
// If only selecting pinned rows then stop
|
|
1315
|
+
if (isStartRowPin) {
|
|
1316
|
+
if (isEndRowPin) {
|
|
1317
|
+
shouldIncludeRange = false;
|
|
1318
|
+
}
|
|
1319
|
+
LoggingHelper_1.ConsoleLogWarning('Cannot select pinned rows in AG Grid.');
|
|
1320
|
+
}
|
|
1321
|
+
if (shouldIncludeRange) {
|
|
1322
|
+
const y1 = Math.min(rangeSelection.startRow.rowIndex, rangeSelection.endRow.rowIndex);
|
|
1323
|
+
const y2 = Math.max(rangeSelection.startRow.rowIndex, rangeSelection.endRow.rowIndex);
|
|
1324
|
+
for (const column of rangeSelection.columns) {
|
|
1325
|
+
if (column != null) {
|
|
1326
|
+
const colId = column.getColId();
|
|
1327
|
+
const selectedColumn = this.api.columnApi.getColumnFromId(colId);
|
|
1328
|
+
if (selectedColumn &&
|
|
1329
|
+
columns.find((c) => c.ColumnId == selectedColumn.ColumnId) == null) {
|
|
1330
|
+
columns.push(selectedColumn);
|
|
1331
|
+
}
|
|
1332
|
+
for (let rowIndex = y1; rowIndex <= y2; rowIndex++) {
|
|
1333
|
+
const rowNode = this.gridOptions.api.getModel().getRow(rowIndex);
|
|
1334
|
+
// we used NOT to return grouped rows but I think that was wrong - if someone wants to return them then that is up to them...
|
|
1335
|
+
// we definitely dont return pinned rows as they cannot be selected
|
|
1336
|
+
if (rowNode && !this.isPinnedRowNode(rowNode)) {
|
|
1337
|
+
const selectedCell = this.getGridCellFromRowNode(rowNode, colId);
|
|
1338
|
+
selectedCells.push(selectedCell);
|
|
1339
|
+
}
|
|
1340
|
+
}
|
|
1341
|
+
}
|
|
1342
|
+
}
|
|
1343
|
+
}
|
|
1344
|
+
}
|
|
1345
|
+
});
|
|
1346
|
+
}
|
|
1347
|
+
const selectedCellInfo = { columns: columns, gridCells: selectedCells };
|
|
1348
|
+
this.api.internalApi.setSelectedCells(selectedCellInfo);
|
|
1349
|
+
this._emit('CellsSelected');
|
|
1350
|
+
this.agGridHelper.fireSelectionChangedEvent();
|
|
1351
|
+
return selectedCellInfo;
|
|
1352
|
+
}
|
|
1353
|
+
setSelectedRows() {
|
|
1354
|
+
if (!this.isGridSelectable()) {
|
|
1355
|
+
return undefined;
|
|
1356
|
+
}
|
|
1357
|
+
const nodes = this.gridOptions.api.getSelectedNodes();
|
|
1358
|
+
const selectedRows = [];
|
|
1359
|
+
if (this.gridOptions.columnApi.isPivotMode()) {
|
|
1360
|
+
// dont perform row selection in pivot mode
|
|
1361
|
+
return undefined;
|
|
1362
|
+
}
|
|
1363
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(nodes)) {
|
|
1364
|
+
nodes.forEach((node) => {
|
|
1365
|
+
const rowInfo = {
|
|
1366
|
+
isMaster: !!(node.master != null && node.master == true),
|
|
1367
|
+
isExpanded: !!(node.expanded != null && node.expanded == true),
|
|
1368
|
+
isGroup: !!(node.group != null && node.group == true),
|
|
1369
|
+
level: node.level,
|
|
1370
|
+
};
|
|
1371
|
+
const gridRow = {
|
|
1372
|
+
primaryKeyValue: this.getPrimaryKeyValueFromRowNode(node),
|
|
1373
|
+
rowData: node.data,
|
|
1374
|
+
rowNode: node,
|
|
1375
|
+
rowInfo,
|
|
1376
|
+
};
|
|
1377
|
+
selectedRows.push(gridRow);
|
|
1378
|
+
});
|
|
1379
|
+
}
|
|
1380
|
+
const selectedRowInfo = { gridRows: selectedRows };
|
|
1381
|
+
this.api.internalApi.setSelectedRows(selectedRowInfo);
|
|
1382
|
+
this.agGridHelper.fireSelectionChangedEvent();
|
|
1383
|
+
return selectedRowInfo;
|
|
1384
|
+
}
|
|
1385
|
+
setValue(dataChangedInfo) {
|
|
1386
|
+
// note: because we use rownode set data value this will cause Validation to fire
|
|
1387
|
+
let newValue;
|
|
1388
|
+
let dataType = this.api.columnApi.getColumnDataTypeFromColumnId(dataChangedInfo.columnId);
|
|
1389
|
+
newValue =
|
|
1390
|
+
dataType == Enums_1.DataType.Number ? Number(dataChangedInfo.newValue) : dataChangedInfo.newValue;
|
|
1391
|
+
if (dataType == undefined) {
|
|
1392
|
+
return; // no point continuing as probably a wrong column
|
|
1393
|
+
}
|
|
1394
|
+
if (dataChangedInfo.rowNode) {
|
|
1395
|
+
dataChangedInfo.rowNode.setDataValue(dataChangedInfo.columnId, newValue);
|
|
1396
|
+
}
|
|
1397
|
+
else {
|
|
1398
|
+
if (this.useRowNodeLookUp) {
|
|
1399
|
+
const rowNode = this.gridOptions.api.getRowNode(dataChangedInfo.primaryKeyValue);
|
|
1400
|
+
if (rowNode != null) {
|
|
1401
|
+
rowNode.setDataValue(dataChangedInfo.columnId, newValue);
|
|
1402
|
+
dataChangedInfo.rowNode = rowNode;
|
|
1403
|
+
}
|
|
1404
|
+
}
|
|
1405
|
+
else {
|
|
1406
|
+
let isUpdated = false;
|
|
1407
|
+
// prefer not to use this method but if we do then at least we can prevent further lookups once we find
|
|
1408
|
+
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1409
|
+
if (!isUpdated) {
|
|
1410
|
+
if (dataChangedInfo.primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
|
|
1411
|
+
rowNode.setDataValue(dataChangedInfo.columnId, newValue);
|
|
1412
|
+
dataChangedInfo.rowNode = rowNode;
|
|
1413
|
+
isUpdated = true;
|
|
1414
|
+
}
|
|
1415
|
+
}
|
|
1416
|
+
});
|
|
1417
|
+
}
|
|
1418
|
+
}
|
|
1419
|
+
}
|
|
1420
|
+
cancelEdit() {
|
|
1421
|
+
this.gridOptions.api.stopEditing(true);
|
|
1422
|
+
}
|
|
1423
|
+
getDistinctValuesForColumn(column, visibleRowsOnly, skipRowNode) {
|
|
1424
|
+
let returnValues = [];
|
|
1425
|
+
// this function does NOT look up for server values but actually it should...
|
|
1426
|
+
// that is currently commented out in the column api function (previously in filter form)
|
|
1427
|
+
const permittedValues = this.api.userInterfaceApi.getPermittedValuesForColumn(column);
|
|
1428
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNull(permittedValues)) {
|
|
1429
|
+
returnValues = permittedValues.map((pv) => {
|
|
1430
|
+
return {
|
|
1431
|
+
rawValue: pv,
|
|
1432
|
+
displayValue: pv,
|
|
1433
|
+
normalisedValue: pv,
|
|
1434
|
+
columnId: column.ColumnId,
|
|
1435
|
+
rowNode: undefined,
|
|
1436
|
+
};
|
|
1437
|
+
});
|
|
1438
|
+
}
|
|
1439
|
+
else {
|
|
1440
|
+
if (visibleRowsOnly) {
|
|
1441
|
+
this.gridOptions.api.forEachNodeAfterFilter((rowNode) => {
|
|
1442
|
+
const gridCell = this.addDistinctColumnValue(rowNode, column.ColumnId);
|
|
1443
|
+
if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
|
|
1444
|
+
returnValues.push(gridCell);
|
|
1445
|
+
}
|
|
1446
|
+
});
|
|
1447
|
+
}
|
|
1448
|
+
else {
|
|
1449
|
+
this.gridOptions.api.forEachNode((rowNode) => {
|
|
1450
|
+
const gridCell = this.addDistinctColumnValue(rowNode, column.ColumnId);
|
|
1451
|
+
if (gridCell && gridCell.rawValue != undefined && gridCell.rowNode !== skipRowNode) {
|
|
1452
|
+
returnValues.push(gridCell);
|
|
1453
|
+
}
|
|
1454
|
+
});
|
|
1455
|
+
}
|
|
1456
|
+
}
|
|
1457
|
+
const uniqueVals = uniqBy_1.default(returnValues, 'displayValue');
|
|
1458
|
+
return uniqueVals.slice(0, this.adaptableOptions.searchOptions.maxColumnValueItemsDisplayed);
|
|
1459
|
+
}
|
|
1460
|
+
getColumnValueDisplayValuePairList(columnId, visibleRowsOnly, onlyIncludeIds) {
|
|
1461
|
+
const returnArray = [];
|
|
1462
|
+
let permittedMap = new Map();
|
|
1463
|
+
// check if there are permitted column values for that column
|
|
1464
|
+
// NB. this currently contains a small bug as we dont check for visibility so if using permitted values then ALL are returned :(
|
|
1465
|
+
const abColumn = this.api.columnApi.getColumnFromId(columnId);
|
|
1466
|
+
const permittedValuesForColumn = this.api.userInterfaceApi.getPermittedValuesForColumn(abColumn);
|
|
1467
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(permittedValuesForColumn)) {
|
|
1468
|
+
permittedValuesForColumn.forEach((pv) => {
|
|
1469
|
+
permittedMap.set(pv, {
|
|
1470
|
+
rawValue: pv,
|
|
1471
|
+
displayValue: pv,
|
|
1472
|
+
normalisedValue: pv,
|
|
1473
|
+
columnId: columnId,
|
|
1474
|
+
rowNode: undefined,
|
|
1475
|
+
});
|
|
1476
|
+
});
|
|
1477
|
+
}
|
|
1478
|
+
else {
|
|
1479
|
+
permittedMap = null;
|
|
1480
|
+
}
|
|
1481
|
+
const useRawValue = this.shouldUseRawValueForColumn(abColumn);
|
|
1482
|
+
const eachFn = (rowNode, columnId, useRawValue) => {
|
|
1483
|
+
if (rowNode && !this.isGroupRowNode(rowNode)) {
|
|
1484
|
+
const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
|
|
1485
|
+
let allowed = !permittedMap || permittedMap.has(gridCell.displayValue);
|
|
1486
|
+
if (allowed && onlyIncludeIds) {
|
|
1487
|
+
let id = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
1488
|
+
allowed = !!onlyIncludeIds[id];
|
|
1489
|
+
}
|
|
1490
|
+
if (allowed) {
|
|
1491
|
+
returnArray.push(gridCell);
|
|
1492
|
+
}
|
|
1493
|
+
}
|
|
1494
|
+
};
|
|
1495
|
+
if (visibleRowsOnly) {
|
|
1496
|
+
this.gridOptions.api.forEachNodeAfterFilter((rowNode) => {
|
|
1497
|
+
eachFn(rowNode, columnId, useRawValue);
|
|
1498
|
+
});
|
|
1499
|
+
}
|
|
1500
|
+
else {
|
|
1501
|
+
this.gridOptions.api.forEachNode((rowNode) => {
|
|
1502
|
+
eachFn(rowNode, columnId, useRawValue);
|
|
1503
|
+
});
|
|
1504
|
+
}
|
|
1505
|
+
return returnArray.slice(0, this.adaptableOptions.searchOptions.maxColumnValueItemsDisplayed);
|
|
1506
|
+
}
|
|
1507
|
+
addDistinctColumnValue(rowNode, columnId) {
|
|
1508
|
+
// we do not return the values of the aggregates when in grouping mode
|
|
1509
|
+
// otherwise they would appear in the filter dropdown etc....
|
|
1510
|
+
if (rowNode && !this.isGroupRowNode(rowNode)) {
|
|
1511
|
+
const returnValue = this.getGridCellFromRowNode(rowNode, columnId);
|
|
1512
|
+
if (Helper_1.Helper.objectExists(returnValue)) {
|
|
1513
|
+
return returnValue;
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
else {
|
|
1517
|
+
return undefined;
|
|
1518
|
+
}
|
|
1519
|
+
}
|
|
1520
|
+
shouldUseRawValueForColumn(column) {
|
|
1521
|
+
// we need to return false if the column has a cell rendeerer i think...
|
|
1522
|
+
const colDef = this.gridOptions.api.getColumnDef(column.ColumnId);
|
|
1523
|
+
if (colDef && colDef.cellRenderer != null) {
|
|
1524
|
+
return true;
|
|
1525
|
+
}
|
|
1526
|
+
if (this.api.columnApi.isFormatNumericStyleColumn(column)) {
|
|
1527
|
+
return true;
|
|
1528
|
+
}
|
|
1529
|
+
return false;
|
|
1530
|
+
}
|
|
1531
|
+
getDisplayValue(id, columnId) {
|
|
1532
|
+
let returnValue;
|
|
1533
|
+
if (this.useRowNodeLookUp) {
|
|
1534
|
+
const rowNode = this.gridOptions.api.getRowNode(id);
|
|
1535
|
+
const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
|
|
1536
|
+
if (gridCell) {
|
|
1537
|
+
returnValue = gridCell.displayValue;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
else {
|
|
1541
|
+
let foundRow = false;
|
|
1542
|
+
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1543
|
+
if (!foundRow) {
|
|
1544
|
+
const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
|
|
1545
|
+
if (gridCell && id == gridCell.primaryKeyValue) {
|
|
1546
|
+
returnValue = gridCell.displayValue;
|
|
1547
|
+
}
|
|
1548
|
+
foundRow = true;
|
|
1549
|
+
}
|
|
1550
|
+
});
|
|
1551
|
+
}
|
|
1552
|
+
return returnValue;
|
|
1553
|
+
}
|
|
1554
|
+
getGridCellFromRowNode(rowNode, columnId) {
|
|
1555
|
+
if (rowNode == null) {
|
|
1556
|
+
return undefined;
|
|
1557
|
+
}
|
|
1558
|
+
const pkValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
1559
|
+
const rawValue = this.getRawValueFromRowNode(rowNode, columnId);
|
|
1560
|
+
const displayValue = this.getDisplayValueFromRawValue(columnId, rawValue);
|
|
1561
|
+
const normalisedvalue = this.getNormalisedValueFromRowValue(rawValue, columnId);
|
|
1562
|
+
const abColumn = this.api.columnApi.getColumnFromId(columnId);
|
|
1563
|
+
return {
|
|
1564
|
+
rawValue: rawValue,
|
|
1565
|
+
displayValue: displayValue,
|
|
1566
|
+
normalisedValue: normalisedvalue,
|
|
1567
|
+
columnId: columnId,
|
|
1568
|
+
primaryKeyValue: pkValue,
|
|
1569
|
+
rowNode: rowNode,
|
|
1570
|
+
};
|
|
1571
|
+
}
|
|
1572
|
+
getDisplayValueFromRowNode(row, columnId) {
|
|
1573
|
+
const gridCell = this.getGridCellFromRowNode(row, columnId);
|
|
1574
|
+
return gridCell ? gridCell.displayValue : undefined;
|
|
1575
|
+
}
|
|
1576
|
+
// same as getDisplayValueFromRawValue(), but without evaluating cell renderers (only valueGetters & valueFormatters)
|
|
1577
|
+
getFormattedValueFromRawValue(rawValue, columnId) {
|
|
1578
|
+
return this.getDisplayValueFromRawValue(columnId, rawValue, true);
|
|
1579
|
+
}
|
|
1580
|
+
getDisplayValueFromRawValue(columnId, rawValue, skipCellRenderers = false) {
|
|
1581
|
+
const abColumn = this.api.columnApi.getColumnFromId(columnId);
|
|
1582
|
+
const isRenderedColumn = this.api.columnApi.isFormatNumericStyleColumn(abColumn);
|
|
1583
|
+
if (isRenderedColumn) {
|
|
1584
|
+
const colDef = this.gridOptions.api.getColumnDef(columnId);
|
|
1585
|
+
if (typeof colDef.valueFormatter == 'function') {
|
|
1586
|
+
return this.getFormattedValue(rawValue, columnId, colDef, colDef.valueFormatter);
|
|
1587
|
+
}
|
|
1588
|
+
return this.agGridHelper.getCleanValue(rawValue);
|
|
1589
|
+
}
|
|
1590
|
+
const isActionColumn = this.api.columnApi.isActionColumn(columnId);
|
|
1591
|
+
if (isActionColumn) {
|
|
1592
|
+
return this.agGridHelper.getCleanValue(rawValue);
|
|
1593
|
+
}
|
|
1594
|
+
const colDef = this.gridOptions.api.getColumnDef(columnId);
|
|
1595
|
+
if (colDef) {
|
|
1596
|
+
if (typeof colDef.valueFormatter == 'function') {
|
|
1597
|
+
const formattedValue = this.getFormattedValue(rawValue, columnId, colDef, colDef.valueFormatter);
|
|
1598
|
+
if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1599
|
+
return this.agGridHelper.getRenderedValue(colDef, formattedValue);
|
|
1600
|
+
}
|
|
1601
|
+
return formattedValue || '';
|
|
1602
|
+
}
|
|
1603
|
+
if (colDef.cellRenderer && !skipCellRenderers) {
|
|
1604
|
+
return this.agGridHelper.getRenderedValue(colDef, rawValue);
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
return this.agGridHelper.getCleanValue(rawValue);
|
|
1608
|
+
}
|
|
1609
|
+
getFormattedValue(rawValue, columnId, colDef, formatterFn) {
|
|
1610
|
+
const column = this.gridOptions.columnApi
|
|
1611
|
+
.getAllColumns()
|
|
1612
|
+
.find((c) => c.getColId() == columnId);
|
|
1613
|
+
const params = {
|
|
1614
|
+
value: rawValue,
|
|
1615
|
+
node: null,
|
|
1616
|
+
data: null,
|
|
1617
|
+
colDef,
|
|
1618
|
+
column,
|
|
1619
|
+
api: this.gridOptions.api,
|
|
1620
|
+
columnApi: this.gridOptions.columnApi,
|
|
1621
|
+
context: this.gridOptions.context,
|
|
1622
|
+
};
|
|
1623
|
+
return formatterFn(params);
|
|
1624
|
+
}
|
|
1625
|
+
getNormalisedValueFromRowValue(rawValue, columnId) {
|
|
1626
|
+
if (rawValue === undefined || rawValue === null) {
|
|
1627
|
+
return rawValue;
|
|
1628
|
+
}
|
|
1629
|
+
const dataType = this.api.columnApi.getColumnDataTypeFromColumnId(columnId);
|
|
1630
|
+
if (dataType === 'String') {
|
|
1631
|
+
return typeof rawValue !== 'string' ? String(rawValue) : rawValue;
|
|
1632
|
+
}
|
|
1633
|
+
if (dataType === 'Number') {
|
|
1634
|
+
return typeof rawValue !== 'number' ? Number(rawValue) : rawValue;
|
|
1635
|
+
}
|
|
1636
|
+
if (dataType === 'Boolean') {
|
|
1637
|
+
return typeof rawValue !== 'boolean' ? Boolean(rawValue) : rawValue;
|
|
1638
|
+
}
|
|
1639
|
+
if (dataType === 'Date') {
|
|
1640
|
+
return rawValue instanceof Date ? rawValue : new Date(rawValue);
|
|
1641
|
+
}
|
|
1642
|
+
return rawValue;
|
|
1643
|
+
}
|
|
1644
|
+
getRawValueFromRowNode(rowNode, columnId) {
|
|
1645
|
+
return this.gridOptions.api.getValue(columnId, rowNode);
|
|
1646
|
+
}
|
|
1647
|
+
getDataRowFromRowNode(rowNode) {
|
|
1648
|
+
return rowNode != null && rowNode != undefined ? rowNode.data : undefined;
|
|
1649
|
+
}
|
|
1650
|
+
getRowNodeForPrimaryKey(primaryKeyValue) {
|
|
1651
|
+
if (this.useRowNodeLookUp) {
|
|
1652
|
+
return this.gridOptions.api.getRowNode(primaryKeyValue);
|
|
1653
|
+
}
|
|
1654
|
+
else {
|
|
1655
|
+
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1656
|
+
if (primaryKeyValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
|
|
1657
|
+
return rowNode;
|
|
1658
|
+
}
|
|
1659
|
+
});
|
|
1660
|
+
}
|
|
1661
|
+
}
|
|
1662
|
+
getRowNodesForPrimaryKeys(primaryKeyValues) {
|
|
1663
|
+
let rowNodes = [];
|
|
1664
|
+
if (this.useRowNodeLookUp) {
|
|
1665
|
+
primaryKeyValues.forEach((pkValue) => {
|
|
1666
|
+
const rowNode = this.gridOptions.api.getRowNode(pkValue);
|
|
1667
|
+
if (rowNode) {
|
|
1668
|
+
rowNodes.push(rowNode);
|
|
1669
|
+
}
|
|
1670
|
+
});
|
|
1671
|
+
}
|
|
1672
|
+
else {
|
|
1673
|
+
primaryKeyValues.forEach((pkValue) => {
|
|
1674
|
+
let foundRow = false;
|
|
1675
|
+
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1676
|
+
if (!foundRow && pkValue == this.getPrimaryKeyValueFromRowNode(rowNode)) {
|
|
1677
|
+
rowNodes.push(rowNode);
|
|
1678
|
+
foundRow = true;
|
|
1679
|
+
}
|
|
1680
|
+
});
|
|
1681
|
+
});
|
|
1682
|
+
}
|
|
1683
|
+
return rowNodes;
|
|
1684
|
+
}
|
|
1685
|
+
forAllRowNodesDo(func) {
|
|
1686
|
+
this.gridOptions.api.getModel().forEachNode((rowNode) => {
|
|
1687
|
+
func(rowNode);
|
|
1688
|
+
});
|
|
1689
|
+
}
|
|
1690
|
+
forAllVisibleRowNodesDo(func) {
|
|
1691
|
+
this.gridOptions.api.forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
|
|
1692
|
+
func(rowNode, rowIndex);
|
|
1693
|
+
});
|
|
1694
|
+
}
|
|
1695
|
+
getVisibleRowNodes() {
|
|
1696
|
+
let rowNodes = [];
|
|
1697
|
+
this.gridOptions.api.forEachNodeAfterFilterAndSort((rowNode, rowIndex) => {
|
|
1698
|
+
rowNodes.push(rowNode);
|
|
1699
|
+
});
|
|
1700
|
+
return rowNodes;
|
|
1701
|
+
}
|
|
1702
|
+
selectNodes(rowNodes, clearSelection) {
|
|
1703
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(rowNodes)) {
|
|
1704
|
+
rowNodes.forEach((node) => this.selectNode(node, clearSelection));
|
|
1705
|
+
}
|
|
1706
|
+
}
|
|
1707
|
+
deSelectNodes(rowNodes, clearSelection) {
|
|
1708
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(rowNodes)) {
|
|
1709
|
+
rowNodes.forEach((node) => this.deSelectNode(node, clearSelection));
|
|
1710
|
+
}
|
|
1711
|
+
}
|
|
1712
|
+
selectNode(rowNode, clearSelection) {
|
|
1713
|
+
if (!rowNode) {
|
|
1714
|
+
LoggingHelper_1.LogAdaptableError('No node to select');
|
|
1715
|
+
return;
|
|
1716
|
+
}
|
|
1717
|
+
rowNode.setSelected(true, clearSelection);
|
|
1718
|
+
}
|
|
1719
|
+
deSelectNode(rowNode, clearSelection) {
|
|
1720
|
+
if (!rowNode) {
|
|
1721
|
+
LoggingHelper_1.LogAdaptableError('No node to deselect');
|
|
1722
|
+
return;
|
|
1723
|
+
}
|
|
1724
|
+
rowNode.setSelected(false, clearSelection);
|
|
1725
|
+
}
|
|
1726
|
+
selectCells(columnIds, startNode, endNode) {
|
|
1727
|
+
const cellRangeParams = {
|
|
1728
|
+
rowStartIndex: startNode.rowIndex,
|
|
1729
|
+
rowEndIndex: endNode.rowIndex,
|
|
1730
|
+
columns: columnIds,
|
|
1731
|
+
};
|
|
1732
|
+
this.gridOptions.api.addCellRange(cellRangeParams);
|
|
1733
|
+
}
|
|
1734
|
+
isRowNodeVisible(rowNode) {
|
|
1735
|
+
// sure this can be done better!
|
|
1736
|
+
let isVisible = false;
|
|
1737
|
+
this.gridOptions.api.forEachNodeAfterFilter((rd) => {
|
|
1738
|
+
if (rd == rowNode) {
|
|
1739
|
+
isVisible = true;
|
|
1740
|
+
}
|
|
1741
|
+
});
|
|
1742
|
+
return isVisible;
|
|
1743
|
+
}
|
|
1744
|
+
redrawBody() {
|
|
1745
|
+
this.gridOptions.api.redrawRows();
|
|
1746
|
+
this._emit('GridRefreshed');
|
|
1747
|
+
}
|
|
1748
|
+
redrawHeader() {
|
|
1749
|
+
this.gridOptions.api.refreshHeader();
|
|
1750
|
+
}
|
|
1751
|
+
redrawRow(rowNode) {
|
|
1752
|
+
// in order to get a fresh reference to rowNode
|
|
1753
|
+
// rowNode = this.getRowNodeForPrimaryKey(this.getPrimaryKeyValueFromRowNode(rowNode));
|
|
1754
|
+
// if (!rowNode) {
|
|
1755
|
+
// return;
|
|
1756
|
+
// }
|
|
1757
|
+
const redrawRowsParams = {
|
|
1758
|
+
rowNodes: [rowNode],
|
|
1759
|
+
};
|
|
1760
|
+
try {
|
|
1761
|
+
this.gridOptions.api.redrawRows(redrawRowsParams);
|
|
1762
|
+
}
|
|
1763
|
+
catch (ex) {
|
|
1764
|
+
LoggingHelper_1.ConsoleLogError('ag-grid redrawRows was unable to find some row nodes. Tried to redraw row node: ', rowNode, ex);
|
|
1765
|
+
}
|
|
1766
|
+
}
|
|
1767
|
+
refreshCells(rowNodes, columns, forceUpdate) {
|
|
1768
|
+
const api = this.gridOptions.api;
|
|
1769
|
+
// in order to get a fresh reference to rowNodes
|
|
1770
|
+
// rowNodes = this.getRowNodesForPrimaryKeys(
|
|
1771
|
+
// rowNodes.map((rowNode) => this.getPrimaryKeyValueFromRowNode(rowNode))
|
|
1772
|
+
// );
|
|
1773
|
+
const refreshCellParams = {
|
|
1774
|
+
rowNodes,
|
|
1775
|
+
columns: columns,
|
|
1776
|
+
force: forceUpdate,
|
|
1777
|
+
};
|
|
1778
|
+
api.refreshCells(refreshCellParams);
|
|
1779
|
+
}
|
|
1780
|
+
jumpToRow(rowNode) {
|
|
1781
|
+
this.gridOptions.api.ensureNodeVisible(rowNode, 'middle');
|
|
1782
|
+
}
|
|
1783
|
+
jumpToColumn(columnId) {
|
|
1784
|
+
this.gridOptions.api.ensureColumnVisible(columnId);
|
|
1785
|
+
}
|
|
1786
|
+
jumpToCell(columnId, rowNode) {
|
|
1787
|
+
this.jumpToRow(rowNode);
|
|
1788
|
+
this.jumpToColumn(columnId);
|
|
1789
|
+
}
|
|
1790
|
+
getColDefsForSpecialColumns() {
|
|
1791
|
+
return [
|
|
1792
|
+
...this.getColDefsForCalculatedColumns(),
|
|
1793
|
+
...this.getColDefsForActionColumns(),
|
|
1794
|
+
...this.getColDefsForFreeTextColumns(),
|
|
1795
|
+
];
|
|
1796
|
+
}
|
|
1797
|
+
getColDefsForFreeTextColumns() {
|
|
1798
|
+
let filterable = this.api.internalApi.getAdaptableOptions().searchOptions
|
|
1799
|
+
.enableFilterOnSpecialColumns;
|
|
1800
|
+
return this.api.freeTextColumnApi.getAllFreeTextColumn().map((freeTextColumn) => {
|
|
1801
|
+
const dataTypeEditor = freeTextColumn.DataType === 'Number'
|
|
1802
|
+
? AdaptableNumberEditor_1.AdaptableNumberEditor
|
|
1803
|
+
: freeTextColumn.DataType === 'Date'
|
|
1804
|
+
? AdaptableDateEditor_1.AdaptableDateEditor
|
|
1805
|
+
: null;
|
|
1806
|
+
LoggingHelper_1.LogAdaptableInfo('Setting up FreeText Column: ' + freeTextColumn.ColumnId);
|
|
1807
|
+
return {
|
|
1808
|
+
headerName: freeTextColumn.FriendlyName || freeTextColumn.ColumnId,
|
|
1809
|
+
colId: freeTextColumn.ColumnId,
|
|
1810
|
+
editable: true,
|
|
1811
|
+
hide: true,
|
|
1812
|
+
filter: filterable,
|
|
1813
|
+
sortable: true,
|
|
1814
|
+
resizable: true,
|
|
1815
|
+
enableRowGroup: true,
|
|
1816
|
+
cellEditor: dataTypeEditor !== null && dataTypeEditor !== void 0 ? dataTypeEditor : (freeTextColumn.TextEditor && freeTextColumn.TextEditor == 'Large'
|
|
1817
|
+
? 'agLargeTextCellEditor'
|
|
1818
|
+
: 'agTextCellEditor'),
|
|
1819
|
+
type: [
|
|
1820
|
+
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
1821
|
+
this.agGridHelper.getAgGridDataType(freeTextColumn.DataType),
|
|
1822
|
+
],
|
|
1823
|
+
valueSetter: (params) => {
|
|
1824
|
+
return (params.data[freeTextColumn.ColumnId] = params.newValue);
|
|
1825
|
+
},
|
|
1826
|
+
cellRenderer: freeTextColumn.DataType && freeTextColumn.DataType == 'Boolean'
|
|
1827
|
+
? this.agGridHelper.createCheckboxRendererComp(freeTextColumn.ColumnId, false)
|
|
1828
|
+
: undefined,
|
|
1829
|
+
valueGetter: (params) => this.api.freeTextColumnApi.getFreeTextColumnValueFromRowNode(freeTextColumn, params.node),
|
|
1830
|
+
};
|
|
1831
|
+
});
|
|
1832
|
+
}
|
|
1833
|
+
setupColumnValueGetter({ col }) {
|
|
1834
|
+
// need this here if we want plugins to intercept
|
|
1835
|
+
this.setColDefProperty(col, 'valueGetter', (userValue) => {
|
|
1836
|
+
return userValue;
|
|
1837
|
+
});
|
|
1838
|
+
}
|
|
1839
|
+
setupColumnAggFunc({ col }) {
|
|
1840
|
+
// need this here if we want plugins to intercept
|
|
1841
|
+
const financeApi = this.api.pluginsApi.getFinancePluginApi();
|
|
1842
|
+
// the 'aggFunc' slows significantly the init process, so we evaluate it only if it is really necessary: iff we have a weighted average defined
|
|
1843
|
+
if (financeApi && !!financeApi.getPluginOptions().weightedAverageColumns) {
|
|
1844
|
+
this.setColDefProperty(col, 'aggFunc', (userValue) => {
|
|
1845
|
+
return userValue;
|
|
1846
|
+
});
|
|
1847
|
+
}
|
|
1848
|
+
}
|
|
1849
|
+
getColDefsForActionColumns() {
|
|
1850
|
+
return this.api.userInterfaceApi.getAllActionColumn().map((actionColumn) => {
|
|
1851
|
+
const newColDef = {
|
|
1852
|
+
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
1853
|
+
colId: actionColumn.columnId,
|
|
1854
|
+
editable: false,
|
|
1855
|
+
hide: false,
|
|
1856
|
+
filter: false,
|
|
1857
|
+
sortable: false,
|
|
1858
|
+
resizable: true,
|
|
1859
|
+
enableRowGroup: false,
|
|
1860
|
+
cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
|
|
1861
|
+
type: [GeneralConstants_1.AB_SPECIAL_COLUMN, 'abColDefObject'],
|
|
1862
|
+
};
|
|
1863
|
+
LoggingHelper_1.LogAdaptableInfo('Setting up Action Column: ' + actionColumn.columnId);
|
|
1864
|
+
return newColDef;
|
|
1865
|
+
});
|
|
1866
|
+
}
|
|
1867
|
+
updateColDefsForSpecialColumns() {
|
|
1868
|
+
const specialColDefs = this.getColDefsForSpecialColumns();
|
|
1869
|
+
const isUserColDef = (colDef) => {
|
|
1870
|
+
const { type } = colDef;
|
|
1871
|
+
if (type === GeneralConstants_1.AB_SPECIAL_COLUMN || (Array.isArray(type) && type.includes(GeneralConstants_1.AB_SPECIAL_COLUMN))) {
|
|
1872
|
+
return false;
|
|
1873
|
+
}
|
|
1874
|
+
return true;
|
|
1875
|
+
};
|
|
1876
|
+
// const userColDefs = this.gridOptions.columnApi
|
|
1877
|
+
// .getAllColumns()
|
|
1878
|
+
// .map((col) => col.getColDef())
|
|
1879
|
+
const userColDefs = this.getGroupAndColumnDefs().filter(isUserColDef);
|
|
1880
|
+
const allDefs = [...userColDefs, ...specialColDefs];
|
|
1881
|
+
this.safeSetColDefs(allDefs);
|
|
1882
|
+
this.setLayout();
|
|
1883
|
+
}
|
|
1884
|
+
getColDefsForCalculatedColumns() {
|
|
1885
|
+
return this.api.calculatedColumnApi.getAllCalculatedColumn().map((calculatedColumn) => {
|
|
1886
|
+
var _a;
|
|
1887
|
+
if (!calculatedColumn.CalculatedColumnSettings) {
|
|
1888
|
+
let filterable = this.adaptableOptions.searchOptions.enableFilterOnSpecialColumns
|
|
1889
|
+
? this.adaptableOptions.searchOptions.enableFilterOnSpecialColumns
|
|
1890
|
+
: true;
|
|
1891
|
+
calculatedColumn.CalculatedColumnSettings = ObjectFactory_1.CreateEmptyCalculatedColumn(filterable).CalculatedColumnSettings;
|
|
1892
|
+
}
|
|
1893
|
+
if (!calculatedColumn.CalculatedColumnSettings.DataType) {
|
|
1894
|
+
calculatedColumn.CalculatedColumnSettings.DataType = this.CalculatedColumnExpressionService.GetCalculatedColumnDataType((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression);
|
|
1895
|
+
}
|
|
1896
|
+
const newColDef = {
|
|
1897
|
+
headerName: calculatedColumn.FriendlyName
|
|
1898
|
+
? calculatedColumn.FriendlyName
|
|
1899
|
+
: calculatedColumn.ColumnId,
|
|
1900
|
+
colId: calculatedColumn.ColumnId,
|
|
1901
|
+
hide: true,
|
|
1902
|
+
editable: false,
|
|
1903
|
+
width: calculatedColumn.CalculatedColumnSettings.Width,
|
|
1904
|
+
enableValue: calculatedColumn.CalculatedColumnSettings.Aggregatable,
|
|
1905
|
+
filter: calculatedColumn.CalculatedColumnSettings.Filterable,
|
|
1906
|
+
floatingFilter: calculatedColumn.CalculatedColumnSettings.Filterable,
|
|
1907
|
+
resizable: calculatedColumn.CalculatedColumnSettings.Resizable,
|
|
1908
|
+
enableRowGroup: calculatedColumn.CalculatedColumnSettings.Groupable,
|
|
1909
|
+
sortable: calculatedColumn.CalculatedColumnSettings.Sortable,
|
|
1910
|
+
enablePivot: calculatedColumn.CalculatedColumnSettings.Pivotable,
|
|
1911
|
+
type: [
|
|
1912
|
+
GeneralConstants_1.AB_SPECIAL_COLUMN,
|
|
1913
|
+
this.agGridHelper.getAgGridDataType(calculatedColumn.CalculatedColumnSettings.DataType),
|
|
1914
|
+
],
|
|
1915
|
+
valueGetter: (params) => {
|
|
1916
|
+
var _a;
|
|
1917
|
+
return this.CalculatedColumnExpressionService.ComputeExpressionValue((_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression, params.node);
|
|
1918
|
+
},
|
|
1919
|
+
};
|
|
1920
|
+
if (calculatedColumn.CalculatedColumnSettings.ShowToolTip != null &&
|
|
1921
|
+
calculatedColumn.CalculatedColumnSettings.ShowToolTip == true) {
|
|
1922
|
+
newColDef.tooltipValueGetter = () => {
|
|
1923
|
+
var _a;
|
|
1924
|
+
return (_a = calculatedColumn.Query) === null || _a === void 0 ? void 0 : _a.ScalarExpression;
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1927
|
+
LoggingHelper_1.LogAdaptableInfo('Setting up Calculated Column: ' + calculatedColumn.ColumnId);
|
|
1928
|
+
return newColDef;
|
|
1929
|
+
});
|
|
1930
|
+
}
|
|
1931
|
+
isRegularColDef(colDef) {
|
|
1932
|
+
return colDef.children === undefined;
|
|
1933
|
+
}
|
|
1934
|
+
isGroupColDef(colDef) {
|
|
1935
|
+
return colDef.children !== undefined;
|
|
1936
|
+
}
|
|
1937
|
+
getColDefs() {
|
|
1938
|
+
let allColDefs = this.getGroupAndColumnDefs();
|
|
1939
|
+
let justColDefs = [];
|
|
1940
|
+
allColDefs.forEach((cd) => {
|
|
1941
|
+
if (this.isRegularColDef(cd)) {
|
|
1942
|
+
justColDefs.push(cd);
|
|
1943
|
+
}
|
|
1944
|
+
});
|
|
1945
|
+
return justColDefs;
|
|
1946
|
+
}
|
|
1947
|
+
getGroupedColDefs() {
|
|
1948
|
+
let allColDefs = this.getGroupAndColumnDefs();
|
|
1949
|
+
let justGroupColDefs = [];
|
|
1950
|
+
allColDefs.forEach((cd) => {
|
|
1951
|
+
if (this.isGroupColDef(cd)) {
|
|
1952
|
+
justGroupColDefs.push(cd);
|
|
1953
|
+
}
|
|
1954
|
+
});
|
|
1955
|
+
return justGroupColDefs;
|
|
1956
|
+
}
|
|
1957
|
+
getFirstRowNode() {
|
|
1958
|
+
// Probably a better way but its only used by Calccolumn on creation so not urgent
|
|
1959
|
+
let rowNode;
|
|
1960
|
+
let foundNode = false;
|
|
1961
|
+
this.gridOptions.api.forEachNode((node) => {
|
|
1962
|
+
if (!foundNode) {
|
|
1963
|
+
if (!node.group) {
|
|
1964
|
+
rowNode = node;
|
|
1965
|
+
}
|
|
1966
|
+
}
|
|
1967
|
+
});
|
|
1968
|
+
return rowNode;
|
|
1969
|
+
}
|
|
1970
|
+
destroy(config) {
|
|
1971
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1972
|
+
if (this.gridOptions && this.gridOptions.api) {
|
|
1973
|
+
this.gridOptions.api.__adaptable = null;
|
|
1974
|
+
this.gridOptions.api.setColumnDefs = GridApi_setColumnDefs;
|
|
1975
|
+
this.gridOptions.getRowStyle = null;
|
|
1976
|
+
if (config && config.destroyApi === false) {
|
|
1977
|
+
}
|
|
1978
|
+
else {
|
|
1979
|
+
this.gridOptions.api.destroy();
|
|
1980
|
+
}
|
|
1981
|
+
}
|
|
1982
|
+
this.colDefPropertyCache = null;
|
|
1983
|
+
this.gridOptionsPropertyCache = null;
|
|
1984
|
+
this.currentColumnDefs = null;
|
|
1985
|
+
this.rowListeners = null;
|
|
1986
|
+
this.emitter.clearListeners();
|
|
1987
|
+
this.emitter = null;
|
|
1988
|
+
this._adaptableReady = false;
|
|
1989
|
+
Adaptable.dismissInstance(this);
|
|
1990
|
+
const abContainerElement = this.getadaptableContainerElement();
|
|
1991
|
+
if (config && !config.unmount) {
|
|
1992
|
+
return;
|
|
1993
|
+
}
|
|
1994
|
+
if (abContainerElement != null) {
|
|
1995
|
+
ReactDOM.unmountComponentAtNode(abContainerElement);
|
|
1996
|
+
}
|
|
1997
|
+
(_a = this.CalculatedColumnExpressionService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
1998
|
+
(_b = this.DataService) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
1999
|
+
(_c = this.EntitlementService) === null || _c === void 0 ? void 0 : _c.destroy();
|
|
2000
|
+
(_d = this.ReportService) === null || _d === void 0 ? void 0 : _d.destroy();
|
|
2001
|
+
(_e = this.ModuleService) === null || _e === void 0 ? void 0 : _e.destroy();
|
|
2002
|
+
(_f = this.ValidationService) === null || _f === void 0 ? void 0 : _f.destroy();
|
|
2003
|
+
}
|
|
2004
|
+
// really really need to do this properly but as a temp fix lets create a default style for when no data
|
|
2005
|
+
getDefaultIPPStyle() {
|
|
2006
|
+
return {
|
|
2007
|
+
Header: {
|
|
2008
|
+
headerColor: '#000000',
|
|
2009
|
+
headerBackColor: '#f5f7f7',
|
|
2010
|
+
headerFontFamily: 'sans-serif',
|
|
2011
|
+
headerFontSize: '12px',
|
|
2012
|
+
headerFontStyle: 'normal',
|
|
2013
|
+
headerFontWeight: '400',
|
|
2014
|
+
height: 65,
|
|
2015
|
+
Columns: this.api.columnApi.getColumns().map((col) => {
|
|
2016
|
+
return {
|
|
2017
|
+
columnFriendlyName: col.FriendlyName,
|
|
2018
|
+
width: 200,
|
|
2019
|
+
textAlign: 'start',
|
|
2020
|
+
};
|
|
2021
|
+
}),
|
|
2022
|
+
},
|
|
2023
|
+
Row: {
|
|
2024
|
+
color: '#000000',
|
|
2025
|
+
backColor: '#ffffff',
|
|
2026
|
+
altBackColor: '#fcfdfe',
|
|
2027
|
+
fontFamily: 'sans-serif',
|
|
2028
|
+
fontSize: '12px',
|
|
2029
|
+
fontStyle: 'normal',
|
|
2030
|
+
fontWeight: '400',
|
|
2031
|
+
height: 30,
|
|
2032
|
+
Columns: this.api.columnApi.getColumns().map((col) => {
|
|
2033
|
+
return {
|
|
2034
|
+
columnFriendlyName: col.FriendlyName,
|
|
2035
|
+
width: 200,
|
|
2036
|
+
textAlign: 'start',
|
|
2037
|
+
};
|
|
2038
|
+
}),
|
|
2039
|
+
},
|
|
2040
|
+
};
|
|
2041
|
+
}
|
|
2042
|
+
// This horrible method is used to get the grid style for when we export to ipushpull
|
|
2043
|
+
// We need to find a better implementation
|
|
2044
|
+
getCurrentIPPStyle() {
|
|
2045
|
+
return this.agGridHelper.getCurrentIPPStyle();
|
|
2046
|
+
}
|
|
2047
|
+
getadaptableContainerElement() {
|
|
2048
|
+
if (!this.abContainerElement) {
|
|
2049
|
+
let containerOptionsContainer = this.adaptableOptions.containerOptions.adaptableContainer;
|
|
2050
|
+
this.abContainerElement =
|
|
2051
|
+
typeof containerOptionsContainer === 'string'
|
|
2052
|
+
? document.getElementById(containerOptionsContainer)
|
|
2053
|
+
: containerOptionsContainer;
|
|
2054
|
+
if (!this.abContainerElement) {
|
|
2055
|
+
let oldContainer = document.getElementById('adaptableBlotter');
|
|
2056
|
+
if (oldContainer) {
|
|
2057
|
+
LoggingHelper_1.LogAdaptableWarning(`
|
|
2058
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
2059
|
+
!!!!! The old default container element for Adaptable was "#adaptableBlotter", configured via 'containerOptions.adaptableContainer="adaptableBlotter"'.
|
|
2060
|
+
!!!!! Seems like you haven't updated your html container selector, so we're falling back to using that one.
|
|
2061
|
+
!!!!!
|
|
2062
|
+
!!!!! To make this warning go away, update your html structure and make sure you have an element with id="adaptable" in your app!
|
|
2063
|
+
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
|
2064
|
+
`);
|
|
2065
|
+
this.abContainerElement = oldContainer;
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
}
|
|
2069
|
+
return this.abContainerElement;
|
|
2070
|
+
}
|
|
2071
|
+
getGridContainerElement() {
|
|
2072
|
+
if (!this.gridContainerElement) {
|
|
2073
|
+
this.gridContainerElement =
|
|
2074
|
+
typeof this.adaptableOptions.containerOptions.vendorContainer === 'string'
|
|
2075
|
+
? document.getElementById(this.adaptableOptions.containerOptions.vendorContainer)
|
|
2076
|
+
: this.adaptableOptions.containerOptions.vendorContainer;
|
|
2077
|
+
}
|
|
2078
|
+
return this.gridContainerElement;
|
|
2079
|
+
}
|
|
2080
|
+
initInternalGridLogic() {
|
|
2081
|
+
LoggingHelper_1.LogAdaptableInfo(`Initializing InternalGridLogic...`);
|
|
2082
|
+
if (this.abContainerElement == null) {
|
|
2083
|
+
this.abContainerElement = this.getadaptableContainerElement();
|
|
2084
|
+
}
|
|
2085
|
+
if (this.abContainerElement == null) {
|
|
2086
|
+
if (typeof this.adaptableOptions.containerOptions.adaptableContainer === 'string') {
|
|
2087
|
+
LoggingHelper_1.ConsoleLogError(`There is no DIV with id="${this.adaptableOptions.containerOptions.adaptableContainer}" so cannot render Adaptable`);
|
|
2088
|
+
}
|
|
2089
|
+
else {
|
|
2090
|
+
LoggingHelper_1.ConsoleLogError(`No valid adaptableContainer found to render Adaptable`, this.adaptableOptions.containerOptions.adaptableContainer);
|
|
2091
|
+
}
|
|
2092
|
+
return;
|
|
2093
|
+
}
|
|
2094
|
+
const gridContainerElement = this.getGridContainerElement();
|
|
2095
|
+
if (gridContainerElement) {
|
|
2096
|
+
gridContainerElement.addEventListener('keydown', (event) => this._emit('KeyDown', event));
|
|
2097
|
+
}
|
|
2098
|
+
/*********************
|
|
2099
|
+
* AG Grid EVENTS
|
|
2100
|
+
* AG Grid provide a numer of events - we listen to many of them and react accordingly
|
|
2101
|
+
* We often group many of these events together where we wish the grid to behave identically for all changes
|
|
2102
|
+
* for each set - please provide a reason and use case
|
|
2103
|
+
**********************/
|
|
2104
|
+
/**
|
|
2105
|
+
* Use Case: AG Grid columns have changed
|
|
2106
|
+
* Action: Set Columns in store and filter grid
|
|
2107
|
+
*/
|
|
2108
|
+
const columnEventsThatTriggersStateChange = [
|
|
2109
|
+
all_modules_1.Events.EVENT_COLUMN_MOVED,
|
|
2110
|
+
all_modules_1.Events.EVENT_GRID_COLUMNS_CHANGED,
|
|
2111
|
+
all_modules_1.Events.EVENT_COLUMN_EVERYTHING_CHANGED,
|
|
2112
|
+
all_modules_1.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,
|
|
2113
|
+
all_modules_1.Events.EVENT_COLUMN_VISIBLE,
|
|
2114
|
+
all_modules_1.Events.EVENT_NEW_COLUMNS_LOADED,
|
|
2115
|
+
];
|
|
2116
|
+
this.gridOptions.api.addGlobalListener((type) => {
|
|
2117
|
+
if (columnEventsThatTriggersStateChange.indexOf(type) > -1) {
|
|
2118
|
+
this.debouncedSetColumnIntoStore();
|
|
2119
|
+
this.debouncedFilterGrid();
|
|
2120
|
+
}
|
|
2121
|
+
});
|
|
2122
|
+
/**
|
|
2123
|
+
* Use Case: initial data has been displayed in grid
|
|
2124
|
+
* Action1: Set the Layout
|
|
2125
|
+
* Action2: Ensure that we have set column data types
|
|
2126
|
+
* Note: Deals with scenario where the data is provided to AdapTable after grid has been setup
|
|
2127
|
+
*/
|
|
2128
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_FIRST_DATA_RENDERED, () => {
|
|
2129
|
+
this.checkColumnsDataTypeSet();
|
|
2130
|
+
this.setLayout();
|
|
2131
|
+
});
|
|
2132
|
+
/**
|
|
2133
|
+
* Use Case: User has started to edit a readonly cell
|
|
2134
|
+
* Action1: Stop editing immediately
|
|
2135
|
+
* Note: Deals only with user edits and not ticking data (not a problem)
|
|
2136
|
+
*/
|
|
2137
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_CELL_EDITING_STARTED, (params) => {
|
|
2138
|
+
if (this.gridOptions.columnApi.isPivotMode()) {
|
|
2139
|
+
return;
|
|
2140
|
+
}
|
|
2141
|
+
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
2142
|
+
if (cellEditableFn) {
|
|
2143
|
+
let gridCell = this.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
2144
|
+
let isEditable = cellEditableFn(gridCell, params.node);
|
|
2145
|
+
if (!isEditable) {
|
|
2146
|
+
this.gridOptions.api.stopEditing();
|
|
2147
|
+
}
|
|
2148
|
+
}
|
|
2149
|
+
});
|
|
2150
|
+
/**
|
|
2151
|
+
* Use Case: Entered or Left Pivot Mode
|
|
2152
|
+
* Action 1: Autosize pivot columns when entering pivot mode (if autosize pivot in Layout is true)
|
|
2153
|
+
* Action 2: Set pivot mode on / off in api as necessary
|
|
2154
|
+
*/
|
|
2155
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED, (params) => {
|
|
2156
|
+
if (params.type == 'columnPivotModeChanged' &&
|
|
2157
|
+
params.columnApi != null &&
|
|
2158
|
+
params.columnApi.columnController != null &&
|
|
2159
|
+
params.columnApi.columnController.pivotMode == true) {
|
|
2160
|
+
if (this.adaptableOptions.layoutOptions.autoSizeColumnsInPivotLayout == true) {
|
|
2161
|
+
this.gridOptions.columnApi.autoSizeAllColumns();
|
|
2162
|
+
}
|
|
2163
|
+
this.api.internalApi.setPivotModeOn();
|
|
2164
|
+
}
|
|
2165
|
+
else {
|
|
2166
|
+
this.api.internalApi.setPivotModeOff();
|
|
2167
|
+
}
|
|
2168
|
+
});
|
|
2169
|
+
/**
|
|
2170
|
+
* Use Case: A pivot column has changed
|
|
2171
|
+
* Action: Autosize pivot columns (if autosize pivot in Layout is true)
|
|
2172
|
+
*/
|
|
2173
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED, (params) => {
|
|
2174
|
+
if (params.type == 'columnPivotChanged' &&
|
|
2175
|
+
params.columnApi != null &&
|
|
2176
|
+
params.columnApi.columnController != null &&
|
|
2177
|
+
params.columnApi.columnController.pivotMode == true) {
|
|
2178
|
+
if (this.adaptableOptions.layoutOptions.autoSizeColumnsInPivotLayout == true) {
|
|
2179
|
+
this.gridOptions.columnApi.autoSizeAllColumns();
|
|
2180
|
+
}
|
|
2181
|
+
}
|
|
2182
|
+
});
|
|
2183
|
+
/**
|
|
2184
|
+
* Use Case: Things have changed in the grid that require the Layout to be saved
|
|
2185
|
+
* Action: Save the Layout (on a debounce)
|
|
2186
|
+
*/
|
|
2187
|
+
const columnEventsThatTriggersAutoLayoutSave = [
|
|
2188
|
+
all_modules_1.Events.EVENT_COLUMN_PINNED,
|
|
2189
|
+
all_modules_1.Events.EVENT_COLUMN_PIVOT_CHANGED,
|
|
2190
|
+
all_modules_1.Events.EVENT_COLUMN_PIVOT_MODE_CHANGED,
|
|
2191
|
+
all_modules_1.Events.EVENT_DISPLAYED_COLUMNS_CHANGED,
|
|
2192
|
+
all_modules_1.Events.EVENT_SORT_CHANGED,
|
|
2193
|
+
all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED,
|
|
2194
|
+
all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
|
|
2195
|
+
all_modules_1.Events.EVENT_COLUMN_VALUE_CHANGED,
|
|
2196
|
+
];
|
|
2197
|
+
this.gridOptions.api.addGlobalListener((type) => {
|
|
2198
|
+
if (columnEventsThatTriggersAutoLayoutSave.indexOf(type) > -1) {
|
|
2199
|
+
this.debouncedSaveGridLayout();
|
|
2200
|
+
}
|
|
2201
|
+
});
|
|
2202
|
+
/**
|
|
2203
|
+
* Use Case: A visible Column has become row grouped and 'hideColumnWhenGrouped' is true
|
|
2204
|
+
* Action: Make the column invisible
|
|
2205
|
+
*/
|
|
2206
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_ROW_GROUP_CHANGED, (params) => {
|
|
2207
|
+
if (this.api.internalApi.isGridInPivotMode()) {
|
|
2208
|
+
return;
|
|
2209
|
+
}
|
|
2210
|
+
if (this.adaptableOptions.generalOptions.hideColumnWhenGrouped === true &&
|
|
2211
|
+
params.source !== 'api') {
|
|
2212
|
+
params.columns.forEach((col) => {
|
|
2213
|
+
if (col.isVisible()) {
|
|
2214
|
+
this.api.columnApi.hideColumn(col.getColId());
|
|
2215
|
+
}
|
|
2216
|
+
});
|
|
2217
|
+
}
|
|
2218
|
+
});
|
|
2219
|
+
/**
|
|
2220
|
+
* Use Case: A Column has finished being resized
|
|
2221
|
+
* Action 1: Save the Layout (on a debounce)
|
|
2222
|
+
* Action 2: Emit the internal ColumnResized event - used by Sparkline Column (in Charts)
|
|
2223
|
+
*/
|
|
2224
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_COLUMN_RESIZED, (params) => {
|
|
2225
|
+
if (params.finished == true && params.type == 'columnResized' && params.column) {
|
|
2226
|
+
this._emit('ColumnResized', params.column.getColId());
|
|
2227
|
+
this.debouncedSaveGridLayout();
|
|
2228
|
+
}
|
|
2229
|
+
});
|
|
2230
|
+
/**
|
|
2231
|
+
* Use Case: Row Selection has changed
|
|
2232
|
+
* Action: Set Selected Rows (on a debeounce)
|
|
2233
|
+
*/
|
|
2234
|
+
const columnEventsThatTriggerSetRowSelection = [
|
|
2235
|
+
all_modules_1.Events.EVENT_ROW_GROUP_OPENED,
|
|
2236
|
+
all_modules_1.Events.EVENT_SELECTION_CHANGED,
|
|
2237
|
+
all_modules_1.Events.EVENT_ROW_SELECTED,
|
|
2238
|
+
];
|
|
2239
|
+
this.gridOptions.api.addGlobalListener((type) => {
|
|
2240
|
+
if (ArrayExtensions_1.ArrayExtensions.ContainsItem(columnEventsThatTriggerSetRowSelection, type)) {
|
|
2241
|
+
this.debouncedSetSelectedRows();
|
|
2242
|
+
}
|
|
2243
|
+
});
|
|
2244
|
+
/**
|
|
2245
|
+
* Use Case: User has selected a range of cells
|
|
2246
|
+
* Action: Set Selected Cells (on a debounce)
|
|
2247
|
+
*/
|
|
2248
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_RANGE_SELECTION_CHANGED, (params) => {
|
|
2249
|
+
if (params.finished == true) {
|
|
2250
|
+
this.debouncedSetSelectedCells();
|
|
2251
|
+
}
|
|
2252
|
+
});
|
|
2253
|
+
/**
|
|
2254
|
+
* Use Case: Sort has changed in the Grid
|
|
2255
|
+
* Action1: Update AdapTable Sort Info
|
|
2256
|
+
* Action2: Set Selected Cells (on a debounce)
|
|
2257
|
+
*/
|
|
2258
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_SORT_CHANGED, (params) => {
|
|
2259
|
+
this.onSortChanged();
|
|
2260
|
+
this.debouncedSetSelectedCells();
|
|
2261
|
+
});
|
|
2262
|
+
const showGroupingTotalsAsHeader = this.adaptableOptions.generalOptions
|
|
2263
|
+
.showGroupingTotalsAsHeader;
|
|
2264
|
+
/**
|
|
2265
|
+
* Use Case: Model has updated
|
|
2266
|
+
* Action: If user has set to see grouping totals as header create a pinned row (bit of a hack)
|
|
2267
|
+
*/
|
|
2268
|
+
this.gridOptions.api.addEventListener(all_modules_1.Events.EVENT_MODEL_UPDATED, (params) => {
|
|
2269
|
+
if (showGroupingTotalsAsHeader) {
|
|
2270
|
+
if (params && params.api) {
|
|
2271
|
+
const pinnedData = params.api.getPinnedTopRow(0);
|
|
2272
|
+
const model = params.api.getModel();
|
|
2273
|
+
const rootNode = model.getRootNode();
|
|
2274
|
+
if (!pinnedData) {
|
|
2275
|
+
params.api.setPinnedTopRowData([rootNode.aggData]);
|
|
2276
|
+
}
|
|
2277
|
+
else {
|
|
2278
|
+
pinnedData.updateData(rootNode.aggData);
|
|
2279
|
+
}
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
});
|
|
2283
|
+
/**
|
|
2284
|
+
* Row and Cell listeners created in 2020
|
|
2285
|
+
* These have supplanted many of the events we previously had and simplified things
|
|
2286
|
+
*/
|
|
2287
|
+
this.rowListeners = {
|
|
2288
|
+
dataChanged: (event) => {
|
|
2289
|
+
this.onRowDataChanged({
|
|
2290
|
+
rowNode: event.node,
|
|
2291
|
+
oldData: event.oldData,
|
|
2292
|
+
newData: event.newData,
|
|
2293
|
+
});
|
|
2294
|
+
},
|
|
2295
|
+
cellChanged: (event) => {
|
|
2296
|
+
if (event.column) {
|
|
2297
|
+
this.onCellDataChanged({
|
|
2298
|
+
rowNode: event.node,
|
|
2299
|
+
oldValue: event.oldValue,
|
|
2300
|
+
newValue: event.newValue,
|
|
2301
|
+
colId: event.column.colId,
|
|
2302
|
+
});
|
|
2303
|
+
}
|
|
2304
|
+
},
|
|
2305
|
+
};
|
|
2306
|
+
/**
|
|
2307
|
+
* AgGrid does not expose Events.EVENT_ROW_DATA_CHANGED
|
|
2308
|
+
* so we have to override `dispatchLocalEvent`
|
|
2309
|
+
* and hook our own functionality into it
|
|
2310
|
+
*/
|
|
2311
|
+
RowNodeProto.dispatchLocalEvent = function (event) {
|
|
2312
|
+
const node = event.node;
|
|
2313
|
+
const result = RowNode_dispatchLocalEvent.apply(this, arguments);
|
|
2314
|
+
// we don't know from which instance of aggrid this is coming,
|
|
2315
|
+
// as this fn is shared by all instances
|
|
2316
|
+
if (node) {
|
|
2317
|
+
Adaptable.forEachAdaptable((adaptable) => {
|
|
2318
|
+
if (node.gridApi !== adaptable.gridOptions.api) {
|
|
2319
|
+
// the event is coming from another aggrid instance
|
|
2320
|
+
// so IGNORE IT
|
|
2321
|
+
return;
|
|
2322
|
+
}
|
|
2323
|
+
// we're on the correct instance, so do this
|
|
2324
|
+
const fn = adaptable.rowListeners ? adaptable.rowListeners[event.type] : null;
|
|
2325
|
+
if (fn) {
|
|
2326
|
+
fn(event);
|
|
2327
|
+
}
|
|
2328
|
+
});
|
|
2329
|
+
}
|
|
2330
|
+
return result;
|
|
2331
|
+
};
|
|
2332
|
+
// We plug our filter mechanism and if there is already something like external widgets... we save ref to the function
|
|
2333
|
+
const originalisExternalFilterPresent = this.gridOptions.isExternalFilterPresent;
|
|
2334
|
+
this.gridOptions.isExternalFilterPresent = () => {
|
|
2335
|
+
const columnFilters = this.api.filterApi.getAllColumnFilter();
|
|
2336
|
+
const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnFilters);
|
|
2337
|
+
if (isFilterActive) {
|
|
2338
|
+
// used in particular at init time to show the filter icon correctly
|
|
2339
|
+
for (const colFilter of columnFilters) {
|
|
2340
|
+
const agGridCol = this.gridOptions.columnApi.getColumn(colFilter.ColumnId);
|
|
2341
|
+
if (agGridCol && !agGridCol.isFilterActive()) {
|
|
2342
|
+
agGridCol.setFilterActive(true);
|
|
2343
|
+
}
|
|
2344
|
+
}
|
|
2345
|
+
}
|
|
2346
|
+
else {
|
|
2347
|
+
(this.gridOptions.columnApi.getAllColumns() || []).forEach((col) => {
|
|
2348
|
+
if (col.isFilterActive()) {
|
|
2349
|
+
col.setFilterActive(false);
|
|
2350
|
+
}
|
|
2351
|
+
});
|
|
2352
|
+
}
|
|
2353
|
+
const isQueryActive = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(this.api.queryApi.getCurrentQuery());
|
|
2354
|
+
// it means that originaldoesExternalFilterPass will be called so we reinit that collection
|
|
2355
|
+
return (isFilterActive ||
|
|
2356
|
+
isQueryActive ||
|
|
2357
|
+
(originalisExternalFilterPresent ? originalisExternalFilterPresent() : false));
|
|
2358
|
+
};
|
|
2359
|
+
const originaldoesExternalFilterPass = this.gridOptions.doesExternalFilterPass;
|
|
2360
|
+
const evaluateQueryOnClient = !this.api.internalApi.isServerSearchOptionSet('Query');
|
|
2361
|
+
const evaluateFilterOnClient = !this.api.internalApi.isServerSearchOptionSet('Filter');
|
|
2362
|
+
this.gridOptions.doesExternalFilterPass = (node) => {
|
|
2363
|
+
// first we assess Query (if its running locally)
|
|
2364
|
+
if (evaluateQueryOnClient && !this.isGroupRowNode(node)) {
|
|
2365
|
+
const currentQuery = this.api.queryApi.getCurrentQuery();
|
|
2366
|
+
if (currentQuery) {
|
|
2367
|
+
const isCurrentQueryValid = this.api.queryApi.isValidBooleanQuery(currentQuery, `Invalid CurrentQuery '${currentQuery}'`);
|
|
2368
|
+
if (!isCurrentQueryValid ||
|
|
2369
|
+
!this.api.internalApi
|
|
2370
|
+
.getExpressionService()
|
|
2371
|
+
.evaluateBooleanExpression(currentQuery, node)) {
|
|
2372
|
+
return false;
|
|
2373
|
+
}
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
try {
|
|
2377
|
+
// we then assess filters (if running locally)
|
|
2378
|
+
if (evaluateFilterOnClient) {
|
|
2379
|
+
const columnFilters = this.api.filterApi.getAllColumnFilter();
|
|
2380
|
+
if (columnFilters.length > 0) {
|
|
2381
|
+
for (const columnFilter of columnFilters) {
|
|
2382
|
+
if (!this.api.filterApi.evaluateColumnFilter(columnFilter, node)) {
|
|
2383
|
+
return false;
|
|
2384
|
+
}
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
catch (ex) {
|
|
2390
|
+
LoggingHelper_1.LogAdaptableError(ex);
|
|
2391
|
+
return false;
|
|
2392
|
+
}
|
|
2393
|
+
return originaldoesExternalFilterPass ? originaldoesExternalFilterPass(node) : true;
|
|
2394
|
+
};
|
|
2395
|
+
// Build the COLUMN HEADER MENU. Note that we do this EACH time the menu is opened (as items can change)
|
|
2396
|
+
const originalgetMainMenuItems = this.gridOptions.getMainMenuItems;
|
|
2397
|
+
this.gridOptions.getMainMenuItems = (params) => {
|
|
2398
|
+
// couldnt find a way to listen for menu close. There is a Menu Item Select, but you can also close menu from filter and clicking outside menu....
|
|
2399
|
+
return this.agGridMenuHelper.buildColumnMenu(params, originalgetMainMenuItems);
|
|
2400
|
+
};
|
|
2401
|
+
// Build the CONTEXT MENU. Again we do this each time a cell is right clicked as its context-sensitive
|
|
2402
|
+
const originalgetContextMenuItems = this.gridOptions.getContextMenuItems;
|
|
2403
|
+
this.gridOptions.getContextMenuItems = (params) => {
|
|
2404
|
+
return this.agGridMenuHelper.buildContextMenu(params, originalgetContextMenuItems);
|
|
2405
|
+
};
|
|
2406
|
+
this.prepareGrid();
|
|
2407
|
+
}
|
|
2408
|
+
buildStandaloneColumnHeader(adaptableColumn) {
|
|
2409
|
+
return this.agGridMenuHelper.buildStandaloneColumnHeader(adaptableColumn);
|
|
2410
|
+
}
|
|
2411
|
+
prepareGrid() {
|
|
2412
|
+
LoggingHelper_1.LogAdaptableInfo('Preparing grid...');
|
|
2413
|
+
// add any special renderers, display formats, custom sorts and apply the theme
|
|
2414
|
+
// then do any final rendering required, filter the grid and - to be on the safe set - redraw
|
|
2415
|
+
try {
|
|
2416
|
+
this.updateColDefsForSpecialColumns();
|
|
2417
|
+
this.applyCurrentTheme();
|
|
2418
|
+
this.applyFinalRendering();
|
|
2419
|
+
this.applyGridFiltering();
|
|
2420
|
+
}
|
|
2421
|
+
catch (ex) {
|
|
2422
|
+
LoggingHelper_1.ConsoleLogError('AgGrid setup failed');
|
|
2423
|
+
LoggingHelper_1.ConsoleLogError(ex);
|
|
2424
|
+
}
|
|
2425
|
+
}
|
|
2426
|
+
setupColumns() {
|
|
2427
|
+
const cols = this.gridOptions.columnApi.getAllColumns();
|
|
2428
|
+
cols.map((c) => c.getColDef()).forEach(assignColId);
|
|
2429
|
+
// this needs to be here, before the other setup below
|
|
2430
|
+
// so the setup methods below reference the correct columns in adaptable store
|
|
2431
|
+
this.updateColumnsIntoStore();
|
|
2432
|
+
cols.forEach((col) => {
|
|
2433
|
+
const colDef = col.getColDef();
|
|
2434
|
+
const colId = col.getColId();
|
|
2435
|
+
const abColumn = this.api.columnApi.getColumnFromId(colId);
|
|
2436
|
+
const colSetupInfo = {
|
|
2437
|
+
col,
|
|
2438
|
+
colDef,
|
|
2439
|
+
colId,
|
|
2440
|
+
abColumn,
|
|
2441
|
+
};
|
|
2442
|
+
this.setupColumnCellRenderer(colSetupInfo);
|
|
2443
|
+
this.setupColumnCellStyle(colSetupInfo);
|
|
2444
|
+
this.setupColumnCellClass(colSetupInfo);
|
|
2445
|
+
this.setupColumnTooltipValueGetter(colSetupInfo);
|
|
2446
|
+
this.setupColumnTooltipField(colSetupInfo);
|
|
2447
|
+
this.setupColumnValueGetter(colSetupInfo);
|
|
2448
|
+
this.setupColumnAggFunc(colSetupInfo);
|
|
2449
|
+
this.setupColumnFilter(colSetupInfo);
|
|
2450
|
+
this.setupColumnFloatingFilter(colSetupInfo);
|
|
2451
|
+
this.setupColumnValueFormatter(colSetupInfo);
|
|
2452
|
+
this.setupColumnValueSetter(colSetupInfo);
|
|
2453
|
+
this.setupColumnComparator(colSetupInfo);
|
|
2454
|
+
this.setupColumnCellEditor(colSetupInfo);
|
|
2455
|
+
this.setupColumnHeader(colSetupInfo);
|
|
2456
|
+
});
|
|
2457
|
+
this.setupRowStyling();
|
|
2458
|
+
// setupAggregationColumnHeaders() is executed on every setLayout()
|
|
2459
|
+
// this is safe because setLayout() is guaranteed to run at startup
|
|
2460
|
+
// this is required because every setLayout() may override the property
|
|
2461
|
+
//this.setupAggregationColumnHeaders();
|
|
2462
|
+
this.redrawBody();
|
|
2463
|
+
this.redrawHeader();
|
|
2464
|
+
}
|
|
2465
|
+
setGridOptionsProperty(propertyName, propertyGetter) {
|
|
2466
|
+
const userKey = `user.${propertyName}`;
|
|
2467
|
+
const adaptableKey = `adaptable.${propertyName}`;
|
|
2468
|
+
const value = this.gridOptions[propertyName];
|
|
2469
|
+
const isUserDefined = value !== this.gridOptionsPropertyCache.get(adaptableKey);
|
|
2470
|
+
if (isUserDefined) {
|
|
2471
|
+
this.gridOptionsPropertyCache.set(userKey, value);
|
|
2472
|
+
}
|
|
2473
|
+
const userValue = this.gridOptionsPropertyCache.get(userKey);
|
|
2474
|
+
const adaptableValue = propertyGetter(userValue);
|
|
2475
|
+
if (adaptableValue != null) {
|
|
2476
|
+
this.gridOptionsPropertyCache.set(adaptableKey, adaptableValue);
|
|
2477
|
+
}
|
|
2478
|
+
this.gridOptions[propertyName] = adaptableValue !== null && adaptableValue !== void 0 ? adaptableValue : userValue;
|
|
2479
|
+
}
|
|
2480
|
+
setColDefProperty(col, propertyName, propertyGetter) {
|
|
2481
|
+
const colId = col.getColId();
|
|
2482
|
+
const colDef = col.getColDef();
|
|
2483
|
+
const colSetupInfo = {
|
|
2484
|
+
col,
|
|
2485
|
+
colDef,
|
|
2486
|
+
colId,
|
|
2487
|
+
};
|
|
2488
|
+
const userKey = `user.${colId}.${propertyName}`;
|
|
2489
|
+
const adaptableKey = `adaptable.${colId}.${propertyName}`;
|
|
2490
|
+
const value = colDef[propertyName];
|
|
2491
|
+
const isUserDefined = value !== this.colDefPropertyCache.get(adaptableKey);
|
|
2492
|
+
if (isUserDefined) {
|
|
2493
|
+
this.colDefPropertyCache.set(userKey, value);
|
|
2494
|
+
}
|
|
2495
|
+
const userValue = this.colDefPropertyCache.get(userKey);
|
|
2496
|
+
const adaptableValue = propertyGetter(userValue);
|
|
2497
|
+
if (adaptableValue != null) {
|
|
2498
|
+
this.colDefPropertyCache.set(adaptableKey, adaptableValue);
|
|
2499
|
+
}
|
|
2500
|
+
let theValue = adaptableValue !== null && adaptableValue !== void 0 ? adaptableValue : userValue;
|
|
2501
|
+
this.forPlugins((plugin) => {
|
|
2502
|
+
if (plugin.interceptSetupColumnProperty) {
|
|
2503
|
+
theValue = plugin.interceptSetupColumnProperty(colSetupInfo, propertyName, theValue, this.api);
|
|
2504
|
+
}
|
|
2505
|
+
});
|
|
2506
|
+
if (propertyName === 'aggFunc') {
|
|
2507
|
+
if (colDef[propertyName] !== (theValue !== null && theValue !== void 0 ? theValue : null)) {
|
|
2508
|
+
this.gridOptions.columnApi.setColumnAggFunc(colId, theValue !== null && theValue !== void 0 ? theValue : null);
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
if (theValue === undefined && colDef[propertyName] === undefined) {
|
|
2512
|
+
// already undefined, so don't set an own property to the same undefined value
|
|
2513
|
+
return;
|
|
2514
|
+
}
|
|
2515
|
+
colDef[propertyName] = theValue;
|
|
2516
|
+
}
|
|
2517
|
+
getUserColDefProperty(columnId, propertyName) {
|
|
2518
|
+
const userKey = `user.${columnId}.${propertyName}`;
|
|
2519
|
+
return this.colDefPropertyCache.get(userKey);
|
|
2520
|
+
}
|
|
2521
|
+
setupColumnCellStyle({ col, colId, abColumn }) {
|
|
2522
|
+
this.setColDefProperty(col, 'cellStyle', (userCellStyle) => {
|
|
2523
|
+
const defaultCellStyle = {
|
|
2524
|
+
backgroundColor: null,
|
|
2525
|
+
color: null,
|
|
2526
|
+
fontWeight: null,
|
|
2527
|
+
fontStyle: null,
|
|
2528
|
+
fontSize: null,
|
|
2529
|
+
borderColor: null,
|
|
2530
|
+
};
|
|
2531
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(abColumn);
|
|
2532
|
+
const conditionalStyles = this.api.conditionalStyleApi.getConditionalStylesForColumn(abColumn);
|
|
2533
|
+
const quickSearchStyle = this.getQuickSearchCellStyle();
|
|
2534
|
+
const hasQuickSearchStyle = quickSearchStyle != undefined;
|
|
2535
|
+
const cellStyle = (params) => {
|
|
2536
|
+
const formatColumnCellStyle = formatColumn
|
|
2537
|
+
? this.getFormatColumnCellStyle(formatColumn, params)
|
|
2538
|
+
: undefined;
|
|
2539
|
+
const isQuickSearchActive = hasQuickSearchStyle && this.isQuickSearchActive(abColumn, params);
|
|
2540
|
+
const result = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, defaultCellStyle), this.getReadOnlyCellStyle(abColumn, params)), this.getEditableCellStyle(abColumn, params)), (typeof userCellStyle === 'function' ? userCellStyle(params) : userCellStyle)), formatColumnCellStyle), this.getConditionalStyleCellStyle(conditionalStyles, abColumn, params)), (isQuickSearchActive ? quickSearchStyle : undefined)), this.getAlertCellStyle(abColumn, params)), this.getFlashingAlertCellStyle(abColumn, params)), this.getCellHighlightStyle(abColumn, params));
|
|
2541
|
+
return result;
|
|
2542
|
+
};
|
|
2543
|
+
return cellStyle;
|
|
2544
|
+
});
|
|
2545
|
+
}
|
|
2546
|
+
setupColumnCellClass({ col, colId, abColumn }) {
|
|
2547
|
+
this.setColDefProperty(col, 'cellClass', (userCellClass) => {
|
|
2548
|
+
var _a;
|
|
2549
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnWithStyleClassNameForColumn(abColumn);
|
|
2550
|
+
const formatColumnStyleClassName = formatColumn && !formatColumn.IsSuspended ? (_a = formatColumn.Style) === null || _a === void 0 ? void 0 : _a.ClassName : null;
|
|
2551
|
+
const conditionalStyles = this.api.conditionalStyleApi
|
|
2552
|
+
.getConditionalStylesForColumn(abColumn)
|
|
2553
|
+
.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName));
|
|
2554
|
+
const hasConditionalStylesWithClassNames = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles);
|
|
2555
|
+
const quickSearchStyleClassName = this.api.quickSearchApi.getQuickSearchStyle().ClassName;
|
|
2556
|
+
const hasQuickSearchStyleClassName = StringExtensions_1.StringExtensions.IsNotNullOrEmpty(quickSearchStyleClassName);
|
|
2557
|
+
const cellClass = (params) => {
|
|
2558
|
+
const isQuickSearchActive = hasQuickSearchStyleClassName && this.isQuickSearchActive(abColumn, params);
|
|
2559
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
2560
|
+
let returnValue = [
|
|
2561
|
+
this.getExcelClassNameForCell(colId, primaryKeyValue),
|
|
2562
|
+
typeof userCellClass === 'function' ? userCellClass(params) : userCellClass,
|
|
2563
|
+
formatColumnStyleClassName,
|
|
2564
|
+
hasConditionalStylesWithClassNames
|
|
2565
|
+
? this.getConditionalStyleCellClass(conditionalStyles, abColumn, params)
|
|
2566
|
+
: null,
|
|
2567
|
+
isQuickSearchActive ? quickSearchStyleClassName : null,
|
|
2568
|
+
]
|
|
2569
|
+
.filter((x) => !!x)
|
|
2570
|
+
.join(' ');
|
|
2571
|
+
return StringExtensions_1.StringExtensions.IsNotNullOrEmpty(returnValue) ? returnValue : undefined;
|
|
2572
|
+
};
|
|
2573
|
+
return cellClass;
|
|
2574
|
+
});
|
|
2575
|
+
}
|
|
2576
|
+
getExcelClassNameForCell(colId, primaryKeyValue) {
|
|
2577
|
+
return `--excel-cell-${colId}-${primaryKeyValue}`;
|
|
2578
|
+
}
|
|
2579
|
+
setupColumnCellEditor({ colId, col }) {
|
|
2580
|
+
const editLookUpItem = this.api.userInterfaceApi.getEditLookUpItemForColumn(colId);
|
|
2581
|
+
this.setColDefProperty(col, 'cellEditor', () => {
|
|
2582
|
+
if (editLookUpItem) {
|
|
2583
|
+
return this.isModulePresent('rich-select')
|
|
2584
|
+
? 'agRichSelectCellEditor'
|
|
2585
|
+
: 'agSelectCellEditor';
|
|
2586
|
+
}
|
|
2587
|
+
});
|
|
2588
|
+
this.setColDefProperty(col, 'cellEditorParams', () => {
|
|
2589
|
+
if (editLookUpItem) {
|
|
2590
|
+
return {
|
|
2591
|
+
values: this.api.userInterfaceApi.getEditLookUpValuesForEditLookUpItem(editLookUpItem, colId),
|
|
2592
|
+
};
|
|
2593
|
+
}
|
|
2594
|
+
});
|
|
2595
|
+
}
|
|
2596
|
+
setupColumnCellRenderer({ col, colId, abColumn }) {
|
|
2597
|
+
this.setColDefProperty(col, 'cellRenderer', () => {
|
|
2598
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumn(abColumn);
|
|
2599
|
+
if (!(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) && formatColumn && formatColumn.ColumnStyle) {
|
|
2600
|
+
if (formatColumn.ColumnStyle.PercentBarStyle) {
|
|
2601
|
+
return this.agGridHelper.createNumericStyleRendererFunc(formatColumn);
|
|
2602
|
+
}
|
|
2603
|
+
if (formatColumn.ColumnStyle.CheckBoxStyle) {
|
|
2604
|
+
return this.agGridHelper.createCheckboxRendererComp(abColumn.ColumnId, abColumn.ReadOnly);
|
|
2605
|
+
}
|
|
2606
|
+
}
|
|
2607
|
+
const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
|
|
2608
|
+
if (sparkline) {
|
|
2609
|
+
return this.agGridHelper.createSparklineCellRendererComp(sparkline);
|
|
2610
|
+
}
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
setupColumnTooltipValueGetter({ col, colId }) {
|
|
2614
|
+
this.setColDefProperty(col, 'tooltipValueGetter', () => {
|
|
2615
|
+
var _a;
|
|
2616
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(colId);
|
|
2617
|
+
if (formatColumn &&
|
|
2618
|
+
!formatColumn.IsSuspended &&
|
|
2619
|
+
formatColumn.ColumnStyle &&
|
|
2620
|
+
formatColumn.ColumnStyle.PercentBarStyle &&
|
|
2621
|
+
formatColumn.ColumnStyle.PercentBarStyle.ToolTipText) {
|
|
2622
|
+
if ((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle) {
|
|
2623
|
+
return (params) => {
|
|
2624
|
+
const min = this.api.formatColumnApi.getNumericStyleMinValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, params.node, params.value);
|
|
2625
|
+
const max = this.api.formatColumnApi.getNumericStyleMaxValue(formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle, params.node, params.value);
|
|
2626
|
+
const textOptions = formatColumn.ColumnStyle.PercentBarStyle.ToolTipText;
|
|
2627
|
+
let returnValue = '';
|
|
2628
|
+
if (textOptions.includes('CellValue')) {
|
|
2629
|
+
if (formatColumn.DisplayFormat) {
|
|
2630
|
+
const options = formatColumn.DisplayFormat
|
|
2631
|
+
.Options;
|
|
2632
|
+
returnValue = options
|
|
2633
|
+
? FormatHelper_1.default.NumberFormatter(params.value, options)
|
|
2634
|
+
: params.value;
|
|
2635
|
+
}
|
|
2636
|
+
else {
|
|
2637
|
+
returnValue = params.value;
|
|
2638
|
+
}
|
|
2639
|
+
}
|
|
2640
|
+
if (textOptions.includes('PercentageValue')) {
|
|
2641
|
+
const clampedValue = Helper_1.Helper.clamp(params.value, min, max);
|
|
2642
|
+
const percentageValue = ((clampedValue - min) / (max - min)) * 100;
|
|
2643
|
+
returnValue += ' ' + `(${percentageValue.toFixed(0)}%)`;
|
|
2644
|
+
}
|
|
2645
|
+
return returnValue ? returnValue : params.value;
|
|
2646
|
+
};
|
|
2647
|
+
}
|
|
2648
|
+
}
|
|
2649
|
+
});
|
|
2650
|
+
}
|
|
2651
|
+
setupColumnTooltipField({ col, colId, colDef }) {
|
|
2652
|
+
this.setColDefProperty(col, 'tooltipField', () => {
|
|
2653
|
+
const sparkline = this.api.sparklineColumnApi.getSparklineByColumn(colId);
|
|
2654
|
+
if (sparkline) {
|
|
2655
|
+
return sparkline.ShowToolTip ? colDef.field : '';
|
|
2656
|
+
}
|
|
2657
|
+
});
|
|
2658
|
+
}
|
|
2659
|
+
setupColumnHeader({ col, abColumn }) {
|
|
2660
|
+
var _a, _b;
|
|
2661
|
+
const previousColumnHeader = (_a = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _a === void 0 ? void 0 : _a.headerName;
|
|
2662
|
+
this.setColDefProperty(col, 'headerName', (userHeaderName) => {
|
|
2663
|
+
var _a;
|
|
2664
|
+
// set the default to the AG Grid provided values
|
|
2665
|
+
// from https://github.com/ag-grid/ag-grid/blob/v26.1.0/community-modules/core/src/ts/columns/columnModel.ts#L2515
|
|
2666
|
+
let resultHeaderName = userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(col.getColDef().field);
|
|
2667
|
+
const layoutCustomHeader = (_a = this.api.layoutApi.getCurrentLayout()
|
|
2668
|
+
.ColumnHeadersMap) === null || _a === void 0 ? void 0 : _a[col.getColId()];
|
|
2669
|
+
if (layoutCustomHeader) {
|
|
2670
|
+
resultHeaderName = layoutCustomHeader;
|
|
2671
|
+
}
|
|
2672
|
+
// check if the deprecated formatColumn header is used
|
|
2673
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnForColumnId(abColumn.ColumnId);
|
|
2674
|
+
if (!layoutCustomHeader && (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.HeaderName) && !formatColumn.IsSuspended) {
|
|
2675
|
+
// fallback to the formatColumn property if no Layout custom header is provided
|
|
2676
|
+
resultHeaderName = formatColumn.HeaderName;
|
|
2677
|
+
}
|
|
2678
|
+
// required here for the initial layout rendering
|
|
2679
|
+
abColumn.FriendlyName = resultHeaderName;
|
|
2680
|
+
return resultHeaderName;
|
|
2681
|
+
});
|
|
2682
|
+
const newColumnHeader = (_b = col === null || col === void 0 ? void 0 : col.getColDef()) === null || _b === void 0 ? void 0 : _b.headerName;
|
|
2683
|
+
return previousColumnHeader !== newColumnHeader;
|
|
2684
|
+
}
|
|
2685
|
+
getUserDefinedHeaderName(columnId) {
|
|
2686
|
+
const column = this.gridOptions.columnApi.getColumn(columnId);
|
|
2687
|
+
if (!column) {
|
|
2688
|
+
return columnId;
|
|
2689
|
+
}
|
|
2690
|
+
const userHeaderName = this.getUserColDefProperty(column.getColId(), 'headerName');
|
|
2691
|
+
return userHeaderName !== null && userHeaderName !== void 0 ? userHeaderName : StringExtensions_1.StringExtensions.CamelCaseToHumanText(column.getColDef().field);
|
|
2692
|
+
}
|
|
2693
|
+
setupColumnFilter({ col, colDef }) {
|
|
2694
|
+
this.setColDefProperty(col, 'filter', () => {
|
|
2695
|
+
if (!colDef.filter) {
|
|
2696
|
+
return;
|
|
2697
|
+
}
|
|
2698
|
+
if (!this.api.columnApi.usesAdaptableFilterForm(col.getColId())) {
|
|
2699
|
+
return;
|
|
2700
|
+
}
|
|
2701
|
+
this.gridOptions.api.destroyFilter(col);
|
|
2702
|
+
return FilterWrapper_1.FilterWrapperFactory(this);
|
|
2703
|
+
});
|
|
2704
|
+
}
|
|
2705
|
+
setupColumnFloatingFilter({ col, colDef }) {
|
|
2706
|
+
const isFloatingFilterDisabled = !colDef.floatingFilter || !this.api.columnApi.usesAdaptableQuickFilter(col.getColId());
|
|
2707
|
+
this.setColDefProperty(col, 'floatingFilterComponent', () => {
|
|
2708
|
+
if (isFloatingFilterDisabled) {
|
|
2709
|
+
return;
|
|
2710
|
+
}
|
|
2711
|
+
return FloatingFilterWrapper_1.FloatingFilterWrapperFactory(this);
|
|
2712
|
+
});
|
|
2713
|
+
this.setColDefProperty(col, 'floatingFilterComponentParams', () => {
|
|
2714
|
+
if (isFloatingFilterDisabled) {
|
|
2715
|
+
return;
|
|
2716
|
+
}
|
|
2717
|
+
return {
|
|
2718
|
+
suppressFilterButton: true,
|
|
2719
|
+
};
|
|
2720
|
+
});
|
|
2721
|
+
}
|
|
2722
|
+
setupColumnValueFormatter({ col, abColumn }) {
|
|
2723
|
+
this.setColDefProperty(col, 'valueFormatter', () => {
|
|
2724
|
+
const formatColumn = this.api.formatColumnApi.getFormatColumnWithDisplayFormatForColumn(abColumn);
|
|
2725
|
+
if (!formatColumn) {
|
|
2726
|
+
return;
|
|
2727
|
+
}
|
|
2728
|
+
if (formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.IsSuspended) {
|
|
2729
|
+
return;
|
|
2730
|
+
}
|
|
2731
|
+
if (formatColumn.DisplayFormat) {
|
|
2732
|
+
let valueFormatter;
|
|
2733
|
+
if (formatColumn.DisplayFormat.Formatter === 'NumberFormatter') {
|
|
2734
|
+
// change the Number format - if the scope allows it
|
|
2735
|
+
if (this.api.scopeApi.isColumnInNumericScope(abColumn, formatColumn.Scope)) {
|
|
2736
|
+
const options = formatColumn.DisplayFormat.Options;
|
|
2737
|
+
valueFormatter = (params) => FormatHelper_1.default.NumberFormatter(params.value, options);
|
|
2738
|
+
}
|
|
2739
|
+
}
|
|
2740
|
+
if (formatColumn.DisplayFormat.Formatter === 'DateFormatter') {
|
|
2741
|
+
// change the Date format - if the scope allows it
|
|
2742
|
+
if (this.api.scopeApi.isColumnInDateScope(abColumn, formatColumn.Scope)) {
|
|
2743
|
+
const options = formatColumn.DisplayFormat.Options;
|
|
2744
|
+
valueFormatter = (params) => FormatHelper_1.default.DateFormatter(params.value, options);
|
|
2745
|
+
}
|
|
2746
|
+
}
|
|
2747
|
+
if (formatColumn.DisplayFormat.Formatter === 'StringFormatter') {
|
|
2748
|
+
// change the Date format - if the scope allows it
|
|
2749
|
+
if (this.api.scopeApi.isColumnInStringsScope(abColumn, formatColumn.Scope)) {
|
|
2750
|
+
const options = formatColumn.DisplayFormat.Options;
|
|
2751
|
+
valueFormatter = (params) => FormatHelper_1.default.StringFormatter(params.value, options);
|
|
2752
|
+
}
|
|
2753
|
+
}
|
|
2754
|
+
return valueFormatter;
|
|
2755
|
+
}
|
|
2756
|
+
});
|
|
2757
|
+
}
|
|
2758
|
+
setupColumnValueSetter({ col, colId, abColumn }) {
|
|
2759
|
+
this.setColDefProperty(col, 'valueSetter', (userValueSetter) => {
|
|
2760
|
+
var _a;
|
|
2761
|
+
const preventEditAlertsForColumn = this.api.alertApi
|
|
2762
|
+
.getAlertDefinitionsWithPreventEdit()
|
|
2763
|
+
.filter((alertDefinition) => {
|
|
2764
|
+
return this.api.scopeApi.isColumnInScope(abColumn, alertDefinition.Scope);
|
|
2765
|
+
});
|
|
2766
|
+
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
2767
|
+
const noValidations = !preventEditAlertsForColumn.length && !((_a = this.adaptableOptions.editOptions) === null || _a === void 0 ? void 0 : _a.validateOnServer);
|
|
2768
|
+
if (noValidations && !cellEditableFn) {
|
|
2769
|
+
return;
|
|
2770
|
+
}
|
|
2771
|
+
const valueSetter = (params) => {
|
|
2772
|
+
var _a;
|
|
2773
|
+
if (cellEditableFn) {
|
|
2774
|
+
let gridCell = this.getGridCellFromRowNode(params.node, params.column.getColId());
|
|
2775
|
+
let isEditable = cellEditableFn(gridCell, params.node);
|
|
2776
|
+
if (!isEditable) {
|
|
2777
|
+
return false;
|
|
2778
|
+
}
|
|
2779
|
+
}
|
|
2780
|
+
const field = params.column.getColDef().field;
|
|
2781
|
+
if (noValidations) {
|
|
2782
|
+
//TODO also consider the case when userValueSetter is a string
|
|
2783
|
+
if (typeof userValueSetter === 'function') {
|
|
2784
|
+
return userValueSetter(params);
|
|
2785
|
+
}
|
|
2786
|
+
// we allowed it go reach this point
|
|
2787
|
+
// just to run isCellEditable
|
|
2788
|
+
// and since this has already run and we have no other valitaions
|
|
2789
|
+
// just assign the new value and exit
|
|
2790
|
+
if (field) {
|
|
2791
|
+
params.data[field] = params.newValue;
|
|
2792
|
+
}
|
|
2793
|
+
return true;
|
|
2794
|
+
}
|
|
2795
|
+
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
2796
|
+
oldValue: params.oldValue,
|
|
2797
|
+
newValue: params.newValue,
|
|
2798
|
+
columnId: params.column.getColId(),
|
|
2799
|
+
primaryKeyValue: this.getPrimaryKeyValueFromRowNode(params.node),
|
|
2800
|
+
rowNode: params.node,
|
|
2801
|
+
trigger: 'edit',
|
|
2802
|
+
});
|
|
2803
|
+
// just Prevent Edit Alerts below
|
|
2804
|
+
if (!preventEditAlertsForColumn.length) {
|
|
2805
|
+
return true;
|
|
2806
|
+
}
|
|
2807
|
+
if (dataChangedInfo.oldValue === dataChangedInfo.newValue) {
|
|
2808
|
+
return true;
|
|
2809
|
+
}
|
|
2810
|
+
if (!this.ValidationService.performValidation(dataChangedInfo)) {
|
|
2811
|
+
return false;
|
|
2812
|
+
}
|
|
2813
|
+
const onServerValidationCompleted = () => { };
|
|
2814
|
+
if ((_a = this.adaptableOptions.editOptions) === null || _a === void 0 ? void 0 : _a.validateOnServer) {
|
|
2815
|
+
this.ValidationService.performServerValidation(dataChangedInfo, {
|
|
2816
|
+
onServerValidationCompleted,
|
|
2817
|
+
})();
|
|
2818
|
+
}
|
|
2819
|
+
//TODO also consider the case when userValueSetter is a string
|
|
2820
|
+
if (typeof userValueSetter === 'function') {
|
|
2821
|
+
return userValueSetter(params);
|
|
2822
|
+
}
|
|
2823
|
+
if (field) {
|
|
2824
|
+
params.data[field] = params.newValue;
|
|
2825
|
+
}
|
|
2826
|
+
else {
|
|
2827
|
+
throw `Cannot edit a column without a field - column id was ${colId}`;
|
|
2828
|
+
}
|
|
2829
|
+
return true;
|
|
2830
|
+
};
|
|
2831
|
+
return valueSetter;
|
|
2832
|
+
});
|
|
2833
|
+
}
|
|
2834
|
+
setupColumnComparator({ col, colId, abColumn }) {
|
|
2835
|
+
const customSort = this.api.customSortApi.getCustomSortByColumn(colId);
|
|
2836
|
+
const columnSortComparer = this.api.internalApi.getCustomSortComparer(abColumn);
|
|
2837
|
+
const comparatorGetter = (propName) => {
|
|
2838
|
+
return () => {
|
|
2839
|
+
return this.getActiveColumnComparator(colId, customSort, columnSortComparer);
|
|
2840
|
+
};
|
|
2841
|
+
};
|
|
2842
|
+
this.setColDefProperty(col, 'comparator', comparatorGetter('comparator'));
|
|
2843
|
+
this.setColDefProperty(col, 'pivotComparator', comparatorGetter('pivotComparator'));
|
|
2844
|
+
}
|
|
2845
|
+
applyCurrentTheme() {
|
|
2846
|
+
this.api.themeApi.applyCurrentTheme();
|
|
2847
|
+
}
|
|
2848
|
+
getDefaultGroupOrderComparator(gridOptions) {
|
|
2849
|
+
var _a;
|
|
2850
|
+
// fallback to deprecated form (since AG-Grid v26.0.0)
|
|
2851
|
+
return (_a = gridOptions.defaultGroupOrderComparator) !== null && _a !== void 0 ? _a : gridOptions.defaultGroupSortComparator;
|
|
2852
|
+
}
|
|
2853
|
+
applyFinalRendering() {
|
|
2854
|
+
this.embedColumnMenu = this.isModulePresent('menu');
|
|
2855
|
+
if (this.gridOptions.treeData && this.gridOptions.treeData == true) {
|
|
2856
|
+
this.api.internalApi.setTreeModeOn();
|
|
2857
|
+
}
|
|
2858
|
+
else {
|
|
2859
|
+
this.api.internalApi.setTreeModeOff();
|
|
2860
|
+
}
|
|
2861
|
+
this.agGridHelper.checkShouldClearExistingFiltersOrSearches();
|
|
2862
|
+
}
|
|
2863
|
+
isModulePresent(moduleName) {
|
|
2864
|
+
const registeredModules = all_modules_1.ModuleRegistry.getRegisteredModules();
|
|
2865
|
+
let modules = registeredModules.concat(this.agGridModules);
|
|
2866
|
+
let moduleNames = modules.map((m) => m.moduleName);
|
|
2867
|
+
return ArrayExtensions_1.ArrayExtensions.ContainsAnyItem(moduleNames, [
|
|
2868
|
+
`@ag-grid-enterprise/${moduleName}`,
|
|
2869
|
+
'@ag-grid-enterprise/all-modules',
|
|
2870
|
+
]);
|
|
2871
|
+
}
|
|
2872
|
+
onRowDataChanged({ rowNode, oldData, newData, }) {
|
|
2873
|
+
if (oldData == null || oldData == undefined) {
|
|
2874
|
+
return;
|
|
2875
|
+
}
|
|
2876
|
+
if (oldData == newData) {
|
|
2877
|
+
return;
|
|
2878
|
+
}
|
|
2879
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
2880
|
+
if (!primaryKeyValue) {
|
|
2881
|
+
return;
|
|
2882
|
+
}
|
|
2883
|
+
// rowNode = this.getRowNodeForPrimaryKey(primaryKeyValue);
|
|
2884
|
+
let dataChangedInfos = [];
|
|
2885
|
+
Object.keys(oldData).forEach((key) => {
|
|
2886
|
+
if (this.api.columnApi.doesColumnExist(key)) {
|
|
2887
|
+
const oldValue = oldData[key];
|
|
2888
|
+
const newValue = newData[key];
|
|
2889
|
+
if (oldValue != newValue) {
|
|
2890
|
+
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
2891
|
+
oldValue: oldValue,
|
|
2892
|
+
newValue: newValue,
|
|
2893
|
+
columnId: key,
|
|
2894
|
+
primaryKeyValue: primaryKeyValue,
|
|
2895
|
+
rowNode: rowNode,
|
|
2896
|
+
trigger: 'tick',
|
|
2897
|
+
});
|
|
2898
|
+
if (this.isUndoChange(dataChangedInfo)) {
|
|
2899
|
+
dataChangedInfo.trigger = 'undo';
|
|
2900
|
+
}
|
|
2901
|
+
dataChangedInfos.push(dataChangedInfo);
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
});
|
|
2905
|
+
this.performPostEditChecks(dataChangedInfos);
|
|
2906
|
+
}
|
|
2907
|
+
onCellDataChanged({ rowNode, oldValue, newValue, colId, }) {
|
|
2908
|
+
if (oldValue == newValue) {
|
|
2909
|
+
return;
|
|
2910
|
+
}
|
|
2911
|
+
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(rowNode);
|
|
2912
|
+
if (!primaryKeyValue) {
|
|
2913
|
+
return;
|
|
2914
|
+
}
|
|
2915
|
+
if (!this.api.columnApi.doesColumnExist(colId)) {
|
|
2916
|
+
return;
|
|
2917
|
+
}
|
|
2918
|
+
const dataChangedInfo = this.api.internalApi.buildDataChangedInfo({
|
|
2919
|
+
oldValue: oldValue,
|
|
2920
|
+
newValue: newValue,
|
|
2921
|
+
columnId: colId,
|
|
2922
|
+
primaryKeyValue: primaryKeyValue,
|
|
2923
|
+
rowNode: rowNode,
|
|
2924
|
+
trigger: 'edit',
|
|
2925
|
+
});
|
|
2926
|
+
if (this.isUndoChange(dataChangedInfo)) {
|
|
2927
|
+
dataChangedInfo.trigger = 'undo';
|
|
2928
|
+
}
|
|
2929
|
+
this.performPostEditChecks([dataChangedInfo]);
|
|
2930
|
+
}
|
|
2931
|
+
isUndoChange(dataChange) {
|
|
2932
|
+
// check if this is not a reverted change
|
|
2933
|
+
const undoChange = this.api.internalApi.getDataService().extractUndoChange(dataChange);
|
|
2934
|
+
return !!undoChange;
|
|
2935
|
+
}
|
|
2936
|
+
/**
|
|
2937
|
+
* There are a few things that we need to do AFTER we edit a cell and it makes sense to put them in one place
|
|
2938
|
+
*/
|
|
2939
|
+
performPostEditChecks(dataChangedInfos) {
|
|
2940
|
+
const firstInfo = dataChangedInfos[0];
|
|
2941
|
+
if (!firstInfo || !firstInfo.rowNode) {
|
|
2942
|
+
return;
|
|
2943
|
+
}
|
|
2944
|
+
dataChangedInfos.forEach((dataChangedInfo) => {
|
|
2945
|
+
if (dataChangedInfo.trigger === 'undo') {
|
|
2946
|
+
LoggingHelper_1.LogAdaptableInfo(`Undo data change: PK(${dataChangedInfo.primaryKeyValue}) Col(${dataChangedInfo.columnId}) RevertedValue(${dataChangedInfo.oldValue}) OriginalValue(${dataChangedInfo.newValue})`);
|
|
2947
|
+
}
|
|
2948
|
+
if (dataChangedInfo.trigger === 'edit' || dataChangedInfo.trigger === 'undo') {
|
|
2949
|
+
this.checkChangedCellCurrentlySelected(dataChangedInfo);
|
|
2950
|
+
this.api.freeTextColumnApi.checkFreeTextColumnForDataChange(dataChangedInfo);
|
|
2951
|
+
}
|
|
2952
|
+
this.DataService.CreateDataChangedEvent(dataChangedInfo);
|
|
2953
|
+
});
|
|
2954
|
+
// if node is visible then check if need to refresh other columns / whole row if the updating column is:
|
|
2955
|
+
// 1. referenced in Conditional Styles that have Expressions (refreshing whole row if Scope is All)
|
|
2956
|
+
// 2. referenced in Format Column styles that use Column Comparisons (which might also be calculated columns)
|
|
2957
|
+
if (this.isVisibleNode(firstInfo.rowNode)) {
|
|
2958
|
+
let dataChangedScope = {
|
|
2959
|
+
wholeRow: false,
|
|
2960
|
+
columnIds: new Set(),
|
|
2961
|
+
};
|
|
2962
|
+
this.getExpressionStylesChanges(dataChangedScope, dataChangedInfos);
|
|
2963
|
+
if (dataChangedScope.wholeRow) {
|
|
2964
|
+
this.redrawRow(firstInfo.rowNode);
|
|
2965
|
+
}
|
|
2966
|
+
else {
|
|
2967
|
+
this.getFormatColumnComparisonChanges(dataChangedScope, dataChangedInfos);
|
|
2968
|
+
if (dataChangedScope.columnIds.size > 0) {
|
|
2969
|
+
this.refreshCells([firstInfo.rowNode], Array.from(dataChangedScope.columnIds.values()), true);
|
|
2970
|
+
}
|
|
2971
|
+
}
|
|
2972
|
+
}
|
|
2973
|
+
firstInfo.trigger == 'tick' ? this.filterOnTickingDataChange() : this.filterOnEditDataChange();
|
|
2974
|
+
}
|
|
2975
|
+
getExpressionStylesChanges(dataChangedScope, dataChangedInfos) {
|
|
2976
|
+
const stylesWithExpression = this.api.conditionalStyleApi.getConditionalStylesWithExpression();
|
|
2977
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(stylesWithExpression)) {
|
|
2978
|
+
return;
|
|
2979
|
+
}
|
|
2980
|
+
dataChangedInfos.forEach((dataChangedInfo) => {
|
|
2981
|
+
if (!dataChangedScope.wholeRow) {
|
|
2982
|
+
stylesWithExpression.forEach((conditionalStyle) => {
|
|
2983
|
+
if (!dataChangedScope.wholeRow) {
|
|
2984
|
+
const columnIds = this.api.queryApi.getColumnsFromExpression(conditionalStyle.Rule.BooleanExpression);
|
|
2985
|
+
if (columnIds.includes(dataChangedInfo.columnId)) {
|
|
2986
|
+
if (this.api.scopeApi.scopeIsAll(conditionalStyle.Scope)) {
|
|
2987
|
+
dataChangedScope.wholeRow = true;
|
|
2988
|
+
return;
|
|
2989
|
+
}
|
|
2990
|
+
else {
|
|
2991
|
+
this.api.scopeApi
|
|
2992
|
+
.getColumnsForScope(conditionalStyle.Scope)
|
|
2993
|
+
.map((c) => c.ColumnId)
|
|
2994
|
+
.forEach((colId) => {
|
|
2995
|
+
dataChangedScope.columnIds.add(colId);
|
|
2996
|
+
});
|
|
2997
|
+
}
|
|
2998
|
+
}
|
|
2999
|
+
}
|
|
3000
|
+
});
|
|
3001
|
+
}
|
|
3002
|
+
});
|
|
3003
|
+
}
|
|
3004
|
+
getFormatColumnComparisonChanges(dataChangedScope, dataChangedInfos) {
|
|
3005
|
+
this.api.formatColumnApi.getAllFormatColumn().forEach((fc) => {
|
|
3006
|
+
let columnComparision = this.api.formatColumnApi.getColumnComparisonForFormatColumn(fc);
|
|
3007
|
+
if (columnComparision) {
|
|
3008
|
+
let affectedColumnIds = this.api.formatColumnApi.getColumnIdsFromColumnComparison(columnComparision);
|
|
3009
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(affectedColumnIds)) {
|
|
3010
|
+
dataChangedInfos.forEach((dataChangedInfo) => {
|
|
3011
|
+
if (affectedColumnIds.includes(dataChangedInfo.columnId)) {
|
|
3012
|
+
this.api.scopeApi
|
|
3013
|
+
.getColumnsForScope(fc.Scope)
|
|
3014
|
+
.map((c) => c.ColumnId)
|
|
3015
|
+
.forEach((colId) => {
|
|
3016
|
+
dataChangedScope.columnIds.add(colId);
|
|
3017
|
+
});
|
|
3018
|
+
}
|
|
3019
|
+
});
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
});
|
|
3023
|
+
}
|
|
3024
|
+
checkChangedCellCurrentlySelected(dataChangedInfo) {
|
|
3025
|
+
let selectedCellInfo = this.api.gridApi.getSelectedCellInfo();
|
|
3026
|
+
if (selectedCellInfo && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(selectedCellInfo.gridCells)) {
|
|
3027
|
+
let matchingCell = selectedCellInfo.gridCells.find((gc) => gc.primaryKeyValue == dataChangedInfo.primaryKeyValue &&
|
|
3028
|
+
gc.columnId == dataChangedInfo.columnId);
|
|
3029
|
+
if (matchingCell) {
|
|
3030
|
+
this.setSelectedCells();
|
|
3031
|
+
}
|
|
3032
|
+
}
|
|
3033
|
+
let selectedRowInfo = this.api.gridApi.getSelectedRowInfo();
|
|
3034
|
+
if (selectedRowInfo && ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(selectedRowInfo.gridRows)) {
|
|
3035
|
+
let matchingRow = selectedRowInfo.gridRows.find((gr) => gr.primaryKeyValue == dataChangedInfo.primaryKeyValue);
|
|
3036
|
+
if (matchingRow) {
|
|
3037
|
+
this.setSelectedRows();
|
|
3038
|
+
}
|
|
3039
|
+
}
|
|
3040
|
+
}
|
|
3041
|
+
getColumnSorts() {
|
|
3042
|
+
const columnSorts = [];
|
|
3043
|
+
const columnState = this.gridOptions.columnApi.getColumnState();
|
|
3044
|
+
columnState.forEach((colState) => {
|
|
3045
|
+
const { colId } = colState;
|
|
3046
|
+
if (colState.sort && colState.sortIndex != null) {
|
|
3047
|
+
columnSorts.push({
|
|
3048
|
+
ColumnId: colId,
|
|
3049
|
+
SortOrder: colState.sort === 'asc' ? 'Asc' : 'Desc',
|
|
3050
|
+
SortIndex: colState.sortIndex,
|
|
3051
|
+
});
|
|
3052
|
+
}
|
|
3053
|
+
});
|
|
3054
|
+
columnSorts.sort((a, b) => a.SortIndex - b.SortIndex);
|
|
3055
|
+
return columnSorts.map((c) => {
|
|
3056
|
+
return {
|
|
3057
|
+
ColumnId: c.ColumnId,
|
|
3058
|
+
SortOrder: c.SortOrder,
|
|
3059
|
+
};
|
|
3060
|
+
});
|
|
3061
|
+
}
|
|
3062
|
+
onSortChanged() {
|
|
3063
|
+
const columnSorts = this.getColumnSorts();
|
|
3064
|
+
this.api.gridApi.setColumnSorts(columnSorts);
|
|
3065
|
+
this._emit('SortChanged', columnSorts);
|
|
3066
|
+
}
|
|
3067
|
+
expandAllRowGroups() {
|
|
3068
|
+
this.gridOptions.api.forEachNode((node) => {
|
|
3069
|
+
if (node.group) {
|
|
3070
|
+
node.expanded = true;
|
|
3071
|
+
}
|
|
3072
|
+
});
|
|
3073
|
+
this.gridOptions.api.onGroupExpandedOrCollapsed();
|
|
3074
|
+
}
|
|
3075
|
+
closeAllRowGroups() {
|
|
3076
|
+
this.gridOptions.api.forEachNode((node) => {
|
|
3077
|
+
if (node.group) {
|
|
3078
|
+
node.expanded = false;
|
|
3079
|
+
}
|
|
3080
|
+
});
|
|
3081
|
+
this.gridOptions.api.onGroupExpandedOrCollapsed();
|
|
3082
|
+
}
|
|
3083
|
+
expandRowGroupsForValues(columnValues) {
|
|
3084
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(columnValues)) {
|
|
3085
|
+
const expandedKeys = columnValues.reduce((acc, key) => {
|
|
3086
|
+
acc[key] = true;
|
|
3087
|
+
return acc;
|
|
3088
|
+
}, {});
|
|
3089
|
+
this.gridOptions.api.forEachNode((node) => {
|
|
3090
|
+
if (node.group && !node.expanded) {
|
|
3091
|
+
const nodePath = [];
|
|
3092
|
+
let current = node;
|
|
3093
|
+
while (current) {
|
|
3094
|
+
nodePath.push(current.key);
|
|
3095
|
+
current = current.parent;
|
|
3096
|
+
}
|
|
3097
|
+
const nodeKey = nodePath
|
|
3098
|
+
.filter((x) => !!x)
|
|
3099
|
+
.reverse()
|
|
3100
|
+
.join(GROUP_PATH_SEPARATOR);
|
|
3101
|
+
if (expandedKeys[nodeKey]) {
|
|
3102
|
+
node.setExpanded(true);
|
|
3103
|
+
}
|
|
3104
|
+
}
|
|
3105
|
+
});
|
|
3106
|
+
this.gridOptions.api.onGroupExpandedOrCollapsed();
|
|
3107
|
+
}
|
|
3108
|
+
}
|
|
3109
|
+
getVendorGridColumnFieldForColumn(abColumn) {
|
|
3110
|
+
const agGridColumn = this.gridOptions.columnApi
|
|
3111
|
+
.getAllColumns()
|
|
3112
|
+
.find((c) => c.getColId() === abColumn.ColumnId);
|
|
3113
|
+
return agGridColumn.getColDef().field || '';
|
|
3114
|
+
}
|
|
3115
|
+
setRowGroupColumns(columnIds) {
|
|
3116
|
+
this.gridOptions.columnApi.setRowGroupColumns(columnIds);
|
|
3117
|
+
}
|
|
3118
|
+
clearRowGroupColumns() {
|
|
3119
|
+
this.gridOptions.columnApi.removeRowGroupColumns(this.gridOptions.columnApi.getRowGroupColumns());
|
|
3120
|
+
}
|
|
3121
|
+
getExpandRowGroupsKeys() {
|
|
3122
|
+
let returnValues = [];
|
|
3123
|
+
if (this.adaptableOptions.layoutOptions.includeExpandedRowGroups) {
|
|
3124
|
+
this.gridOptions.api.forEachNode((node) => {
|
|
3125
|
+
if (node.group && node.expanded) {
|
|
3126
|
+
let current = node;
|
|
3127
|
+
const path = [];
|
|
3128
|
+
while (current) {
|
|
3129
|
+
path.push(current.key);
|
|
3130
|
+
current = current.parent;
|
|
3131
|
+
}
|
|
3132
|
+
returnValues.push(path
|
|
3133
|
+
.filter((x) => !!x)
|
|
3134
|
+
.reverse()
|
|
3135
|
+
.join(GROUP_PATH_SEPARATOR));
|
|
3136
|
+
}
|
|
3137
|
+
});
|
|
3138
|
+
}
|
|
3139
|
+
return returnValues;
|
|
3140
|
+
}
|
|
3141
|
+
getRowCount() {
|
|
3142
|
+
return this.gridOptions.rowData
|
|
3143
|
+
? this.gridOptions.rowData.length
|
|
3144
|
+
: this.gridOptions.api.getDisplayedRowCount();
|
|
3145
|
+
}
|
|
3146
|
+
getColumnCount() {
|
|
3147
|
+
return this.gridOptions.columnApi.getAllColumns().length;
|
|
3148
|
+
}
|
|
3149
|
+
getVisibleRowCount() {
|
|
3150
|
+
return this.gridOptions.api.getDisplayedRowCount();
|
|
3151
|
+
}
|
|
3152
|
+
getVisibleColumnCount() {
|
|
3153
|
+
return this.gridOptions.columnApi.getAllColumns().filter((c) => c.isVisible()).length;
|
|
3154
|
+
}
|
|
3155
|
+
selectColumns(columnIds) {
|
|
3156
|
+
columnIds.forEach((colId) => this.selectColumn(colId));
|
|
3157
|
+
}
|
|
3158
|
+
selectColumn(columnId) {
|
|
3159
|
+
this.gridOptions.api.clearRangeSelection();
|
|
3160
|
+
const cellRangeParams = {
|
|
3161
|
+
rowStartIndex: 0,
|
|
3162
|
+
rowEndIndex: this.gridOptions.api.getDisplayedRowCount(),
|
|
3163
|
+
columnStart: columnId,
|
|
3164
|
+
columnEnd: columnId,
|
|
3165
|
+
};
|
|
3166
|
+
this.gridOptions.api.addCellRange(cellRangeParams);
|
|
3167
|
+
}
|
|
3168
|
+
selectAll() {
|
|
3169
|
+
this.gridOptions.api.selectAll();
|
|
3170
|
+
}
|
|
3171
|
+
deselectAll() {
|
|
3172
|
+
// need to do both as first just clears selected rows and second clears ranges
|
|
3173
|
+
this.gridOptions.api.deselectAll();
|
|
3174
|
+
this.gridOptions.api.clearRangeSelection();
|
|
3175
|
+
}
|
|
3176
|
+
hideColumn(columnId) {
|
|
3177
|
+
let vendorCol = this.gridOptions.columnApi.getColumn(columnId);
|
|
3178
|
+
if (vendorCol) {
|
|
3179
|
+
this.gridOptions.columnApi.setColumnVisible(columnId, false);
|
|
3180
|
+
this.updateColumnsIntoStore();
|
|
3181
|
+
}
|
|
3182
|
+
}
|
|
3183
|
+
showColumn(columnId) {
|
|
3184
|
+
let vendorCol = this.gridOptions.columnApi.getColumn(columnId);
|
|
3185
|
+
if (vendorCol) {
|
|
3186
|
+
this.gridOptions.columnApi.setColumnVisible(columnId, true);
|
|
3187
|
+
this.updateColumnsIntoStore();
|
|
3188
|
+
}
|
|
3189
|
+
}
|
|
3190
|
+
autoSizeColumn(columnId) {
|
|
3191
|
+
var _a;
|
|
3192
|
+
(_a = this.gridOptions.columnApi) === null || _a === void 0 ? void 0 : _a.autoSizeColumn(columnId);
|
|
3193
|
+
}
|
|
3194
|
+
autoSizeColumns(columnIds) {
|
|
3195
|
+
var _a;
|
|
3196
|
+
(_a = this.gridOptions.columnApi) === null || _a === void 0 ? void 0 : _a.autoSizeColumns(columnIds);
|
|
3197
|
+
}
|
|
3198
|
+
autoSizeAllColumns() {
|
|
3199
|
+
var _a;
|
|
3200
|
+
(_a = this.gridOptions.columnApi) === null || _a === void 0 ? void 0 : _a.autoSizeAllColumns();
|
|
3201
|
+
}
|
|
3202
|
+
setColumnSort(columnSorts) {
|
|
3203
|
+
const columnSortsMap = columnSorts === null || columnSorts === void 0 ? void 0 : columnSorts.reduce((acc, columnSort, index) => {
|
|
3204
|
+
acc[columnSort.ColumnId] = Object.assign(Object.assign({}, columnSort), { SortIndex: index });
|
|
3205
|
+
return acc;
|
|
3206
|
+
}, {});
|
|
3207
|
+
if (!this.gridOptions.api) {
|
|
3208
|
+
return;
|
|
3209
|
+
}
|
|
3210
|
+
const newColumnState = this.gridOptions.columnApi.getColumnState().map((colState) => {
|
|
3211
|
+
const { colId } = colState;
|
|
3212
|
+
const state = Object.assign({}, colState);
|
|
3213
|
+
const colSort = columnSortsMap ? columnSortsMap[colId] : undefined;
|
|
3214
|
+
if (colSort) {
|
|
3215
|
+
state.sort = colSort.SortOrder === 'Asc' ? 'asc' : 'desc';
|
|
3216
|
+
state.sortIndex = colSort.SortIndex;
|
|
3217
|
+
}
|
|
3218
|
+
else {
|
|
3219
|
+
state.sort = null;
|
|
3220
|
+
state.sortIndex = null;
|
|
3221
|
+
}
|
|
3222
|
+
return state;
|
|
3223
|
+
});
|
|
3224
|
+
this.gridOptions.columnApi.setColumnState(newColumnState);
|
|
3225
|
+
this.gridOptions.api.onSortChanged();
|
|
3226
|
+
}
|
|
3227
|
+
clearColumnSort() {
|
|
3228
|
+
this.setColumnSort(null);
|
|
3229
|
+
}
|
|
3230
|
+
setDataSource(dataSource) {
|
|
3231
|
+
if (!this.gridOptions.api) {
|
|
3232
|
+
return;
|
|
3233
|
+
}
|
|
3234
|
+
if (this.hasAutogeneratedPrimaryKey()) {
|
|
3235
|
+
this.addSyntheticPrimaryKey(dataSource);
|
|
3236
|
+
}
|
|
3237
|
+
this.gridOptions.api.setRowData(dataSource);
|
|
3238
|
+
}
|
|
3239
|
+
loadDataSource(dataSource) {
|
|
3240
|
+
if (this.hasAutogeneratedPrimaryKey()) {
|
|
3241
|
+
this.addSyntheticPrimaryKey(dataSource);
|
|
3242
|
+
}
|
|
3243
|
+
this.setDataSource(dataSource);
|
|
3244
|
+
}
|
|
3245
|
+
updateRows(dataRows, dataUpdateConfig) {
|
|
3246
|
+
if (this.hasAutogeneratedPrimaryKey()) {
|
|
3247
|
+
this.addSyntheticPrimaryKeyIfMissing(dataRows);
|
|
3248
|
+
}
|
|
3249
|
+
dataUpdateConfig = dataUpdateConfig || {};
|
|
3250
|
+
if (dataUpdateConfig.runAsync) {
|
|
3251
|
+
this.gridOptions.api.applyTransactionAsync({ update: dataRows }, dataUpdateConfig.callback);
|
|
3252
|
+
}
|
|
3253
|
+
else {
|
|
3254
|
+
this.gridOptions.api.applyTransaction({ update: dataRows });
|
|
3255
|
+
}
|
|
3256
|
+
}
|
|
3257
|
+
addRows(dataRows, dataUpdateConfig) {
|
|
3258
|
+
if (this.hasAutogeneratedPrimaryKey()) {
|
|
3259
|
+
this.addSyntheticPrimaryKey(dataRows);
|
|
3260
|
+
}
|
|
3261
|
+
dataUpdateConfig = dataUpdateConfig || {};
|
|
3262
|
+
if (dataUpdateConfig.runAsync) {
|
|
3263
|
+
this.gridOptions.api.applyTransactionAsync({ add: dataRows }, dataUpdateConfig.callback);
|
|
3264
|
+
}
|
|
3265
|
+
else {
|
|
3266
|
+
this.gridOptions.api.applyTransaction({ add: dataRows });
|
|
3267
|
+
}
|
|
3268
|
+
}
|
|
3269
|
+
deleteRows(dataRows, dataUpdateConfig) {
|
|
3270
|
+
dataUpdateConfig = dataUpdateConfig || {};
|
|
3271
|
+
if (dataUpdateConfig.runAsync) {
|
|
3272
|
+
this.gridOptions.api.applyTransactionAsync({ remove: dataRows }, dataUpdateConfig.callback);
|
|
3273
|
+
}
|
|
3274
|
+
else {
|
|
3275
|
+
this.gridOptions.api.applyTransaction({ remove: dataRows });
|
|
3276
|
+
}
|
|
3277
|
+
}
|
|
3278
|
+
getFirstGroupedColumn() {
|
|
3279
|
+
let groupedColumns = this.gridOptions.columnApi.getRowGroupColumns();
|
|
3280
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(groupedColumns)) {
|
|
3281
|
+
let groupedColumn = groupedColumns[0];
|
|
3282
|
+
return this.api.columnApi.getColumnFromId(groupedColumn.getColId());
|
|
3283
|
+
}
|
|
3284
|
+
}
|
|
3285
|
+
checkColumnsDataTypeSet() {
|
|
3286
|
+
// check that we have no unknown columns - if we do then ok
|
|
3287
|
+
const firstCol = this.api.columnApi.getColumns()[0];
|
|
3288
|
+
if (firstCol && firstCol.DataType == Enums_1.DataType.Unknown) {
|
|
3289
|
+
this.updateColumnsIntoStore();
|
|
3290
|
+
}
|
|
3291
|
+
}
|
|
3292
|
+
runAdaptableComparerFunction(columnId, columnValues) {
|
|
3293
|
+
let adaptable = this;
|
|
3294
|
+
return function compareItemsOfCustomSort(valueA, valueB, nodeA, nodeB) {
|
|
3295
|
+
var _a, _b;
|
|
3296
|
+
let firstElementValueString = (_a = (nodeA && adaptable.getDisplayValueFromRowNode(nodeA, columnId))) !== null && _a !== void 0 ? _a : valueA;
|
|
3297
|
+
let secondElementValueString = (_b = (nodeB && adaptable.getDisplayValueFromRowNode(nodeB, columnId))) !== null && _b !== void 0 ? _b : valueB;
|
|
3298
|
+
let indexFirstElement = columnValues.indexOf(firstElementValueString);
|
|
3299
|
+
let containsFirstElement = indexFirstElement >= 0;
|
|
3300
|
+
let indexSecondElement = columnValues.indexOf(secondElementValueString);
|
|
3301
|
+
let containsSecondElement = indexSecondElement >= 0;
|
|
3302
|
+
//if none of the element are in the list we jsut return normal compare
|
|
3303
|
+
if (!containsFirstElement && !containsSecondElement) {
|
|
3304
|
+
if (valueA == valueB) {
|
|
3305
|
+
return 0;
|
|
3306
|
+
}
|
|
3307
|
+
return valueA < valueB ? -1 : 1;
|
|
3308
|
+
}
|
|
3309
|
+
//if first item not in the list make sure we put it after the second item
|
|
3310
|
+
if (!containsFirstElement) {
|
|
3311
|
+
return 1;
|
|
3312
|
+
}
|
|
3313
|
+
//if second item not in the list make sure we put it after the first item
|
|
3314
|
+
if (!containsSecondElement) {
|
|
3315
|
+
return -1;
|
|
3316
|
+
}
|
|
3317
|
+
//return the comparison from the list if the two items are in the list
|
|
3318
|
+
return indexFirstElement - indexSecondElement;
|
|
3319
|
+
};
|
|
3320
|
+
}
|
|
3321
|
+
// do we want to do this each time or check once at startup and then set a flag?
|
|
3322
|
+
isGridSelectable() {
|
|
3323
|
+
let isRangeSelectionModuleRegistered = this.isModulePresent('range-selection');
|
|
3324
|
+
if (isRangeSelectionModuleRegistered &&
|
|
3325
|
+
this.gridOptions.enableRangeSelection != null &&
|
|
3326
|
+
this.gridOptions.enableRangeSelection) {
|
|
3327
|
+
return true;
|
|
3328
|
+
}
|
|
3329
|
+
return false;
|
|
3330
|
+
}
|
|
3331
|
+
isGridGroupable() {
|
|
3332
|
+
const isTreeLayout = this.api.internalApi.isGridInTreeMode();
|
|
3333
|
+
return !isTreeLayout;
|
|
3334
|
+
}
|
|
3335
|
+
isGridGroupingActive() {
|
|
3336
|
+
let isGroupedActive = false;
|
|
3337
|
+
this.gridOptions.api.forEachNode((node) => {
|
|
3338
|
+
if (!isGroupedActive) {
|
|
3339
|
+
if (node.group) {
|
|
3340
|
+
isGroupedActive = true;
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
});
|
|
3344
|
+
return isGroupedActive;
|
|
3345
|
+
}
|
|
3346
|
+
isGridPivotable() {
|
|
3347
|
+
const isTreeLayout = this.api.internalApi.isGridInTreeMode();
|
|
3348
|
+
return !isTreeLayout;
|
|
3349
|
+
}
|
|
3350
|
+
isQuickFilterAvailable() {
|
|
3351
|
+
return this.hasFloatingFilterOnAtLeastOneColumn() === true;
|
|
3352
|
+
}
|
|
3353
|
+
hasFloatingFilterOnAtLeastOneColumn(defs = this.gridOptions.columnDefs) {
|
|
3354
|
+
if (this.gridOptions.defaultColDef && this.gridOptions.defaultColDef.floatingFilter) {
|
|
3355
|
+
return true;
|
|
3356
|
+
}
|
|
3357
|
+
let col;
|
|
3358
|
+
for (col of defs) {
|
|
3359
|
+
if (col.floatingFilter) {
|
|
3360
|
+
return true;
|
|
3361
|
+
}
|
|
3362
|
+
if (col.children) {
|
|
3363
|
+
if (this.hasFloatingFilterOnAtLeastOneColumn(col.children)) {
|
|
3364
|
+
return true;
|
|
3365
|
+
}
|
|
3366
|
+
}
|
|
3367
|
+
}
|
|
3368
|
+
return false;
|
|
3369
|
+
}
|
|
3370
|
+
showQuickFilter() {
|
|
3371
|
+
this.gridOptions.api.setFloatingFiltersHeight(null);
|
|
3372
|
+
}
|
|
3373
|
+
hideQuickFilter() {
|
|
3374
|
+
this.gridOptions.api.setFloatingFiltersHeight(0);
|
|
3375
|
+
}
|
|
3376
|
+
getVendorColumnType(columnId) {
|
|
3377
|
+
var _a;
|
|
3378
|
+
const { type } = (_a = this.gridOptions.api.getColumnDef(columnId)) !== null && _a !== void 0 ? _a : {};
|
|
3379
|
+
return type || '';
|
|
3380
|
+
}
|
|
3381
|
+
getActiveColumnComparator(columnId, customSort, customSortComparer) {
|
|
3382
|
+
if ((!customSort || (customSort === null || customSort === void 0 ? void 0 : customSort.IsSuspended)) && !customSortComparer) {
|
|
3383
|
+
// defaults to AG-Grid column definition comparator if no CustomSort is defined&active
|
|
3384
|
+
const colDefComparator = this.getUserColDefProperty(columnId, 'comparator');
|
|
3385
|
+
return colDefComparator;
|
|
3386
|
+
}
|
|
3387
|
+
// CustomSort Comparer function takes precedence over CustomSort SortedValues
|
|
3388
|
+
const comparerFunction = customSortComparer
|
|
3389
|
+
? customSortComparer.comparer
|
|
3390
|
+
: this.runAdaptableComparerFunction(customSort.ColumnId, customSort.SortedValues);
|
|
3391
|
+
return comparerFunction;
|
|
3392
|
+
}
|
|
3393
|
+
getVendorGridLightThemeName() {
|
|
3394
|
+
const container = this.getGridContainerElement();
|
|
3395
|
+
if (container && container.classList) {
|
|
3396
|
+
// we detect the ag theme class
|
|
3397
|
+
const classList = container.classList;
|
|
3398
|
+
for (let i = 0, len = classList.length; i < len; i++) {
|
|
3399
|
+
const cls = classList[i];
|
|
3400
|
+
if (cls.indexOf('ag-theme-') === 0) {
|
|
3401
|
+
// even if dark theme is included, we compute the light theme name out of it
|
|
3402
|
+
return cls.replace('-dark', '');
|
|
3403
|
+
}
|
|
3404
|
+
}
|
|
3405
|
+
}
|
|
3406
|
+
return this.agGridHelper.getVendorLightThemeName();
|
|
3407
|
+
}
|
|
3408
|
+
getVendorGridCurrentThemeName() {
|
|
3409
|
+
const container = this.getGridContainerElement();
|
|
3410
|
+
if (container && container.classList) {
|
|
3411
|
+
// we detect the ag theme class
|
|
3412
|
+
const classList = container.classList;
|
|
3413
|
+
for (let i = 0, len = classList.length; i < len; i++) {
|
|
3414
|
+
const cls = classList[i];
|
|
3415
|
+
if (cls.indexOf('ag-theme-') === 0) {
|
|
3416
|
+
return cls;
|
|
3417
|
+
}
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
return this.getVendorGridLightThemeName();
|
|
3421
|
+
}
|
|
3422
|
+
applyAdaptableTheme(theme) {
|
|
3423
|
+
const themeName = typeof theme === 'string' ? theme : theme.Name;
|
|
3424
|
+
const themeClassNamesToRemove = [];
|
|
3425
|
+
const themesToRemove = [];
|
|
3426
|
+
const allThemes = this.api.themeApi.getAllTheme().map((t) => {
|
|
3427
|
+
// we mutate the theme later,
|
|
3428
|
+
// and since we don't want the mutation to end up in state
|
|
3429
|
+
// we better clone it here
|
|
3430
|
+
return Object.assign({}, t);
|
|
3431
|
+
});
|
|
3432
|
+
const allThemesMap = allThemes.reduce((acc, theme) => {
|
|
3433
|
+
acc[theme.Name] = theme;
|
|
3434
|
+
return acc;
|
|
3435
|
+
}, {});
|
|
3436
|
+
// const themePrefix = 'ab--theme-'
|
|
3437
|
+
const el = document.documentElement;
|
|
3438
|
+
el.classList.forEach((cssClassName) => {
|
|
3439
|
+
const index = cssClassName.indexOf(GeneralConstants.THEME_STYLE);
|
|
3440
|
+
if (index === 0) {
|
|
3441
|
+
themeClassNamesToRemove.push(cssClassName);
|
|
3442
|
+
const themeName = cssClassName.substring(GeneralConstants.THEME_STYLE.length);
|
|
3443
|
+
if (allThemesMap[themeName]) {
|
|
3444
|
+
themesToRemove.push(allThemesMap[themeName]);
|
|
3445
|
+
}
|
|
3446
|
+
}
|
|
3447
|
+
});
|
|
3448
|
+
themeClassNamesToRemove.forEach((cssClassName) => el.classList.remove(cssClassName));
|
|
3449
|
+
// remove infinite table classnames
|
|
3450
|
+
themesToRemove.forEach((theme) => {
|
|
3451
|
+
el.classList.remove(`it--theme-${theme.Name}`);
|
|
3452
|
+
});
|
|
3453
|
+
if (this.adaptableOptions.userInterfaceOptions &&
|
|
3454
|
+
this.adaptableOptions.userInterfaceOptions.useCustomMacLikeScrollbars &&
|
|
3455
|
+
getScrollbarSize_1.default() > 0) {
|
|
3456
|
+
el.classList.add('ab--custom-mac-like-scrollbars');
|
|
3457
|
+
}
|
|
3458
|
+
else {
|
|
3459
|
+
el.classList.remove('ab--custom-mac-like-scrollbars');
|
|
3460
|
+
}
|
|
3461
|
+
const newTheme = allThemesMap[themeName];
|
|
3462
|
+
const newThemeClassName = GeneralConstants.THEME_STYLE + themeName;
|
|
3463
|
+
el.classList.add(newThemeClassName);
|
|
3464
|
+
// add infinite table classname for theme
|
|
3465
|
+
el.classList.add(`it--theme-${themeName}`);
|
|
3466
|
+
const computedDocumentStyle = getComputedStyle(el);
|
|
3467
|
+
const [abLoaded, abThemeLoaded] = ['--ab-loaded', '--ab-theme-loaded'].map((variable) => {
|
|
3468
|
+
let val = computedDocumentStyle.getPropertyValue(variable);
|
|
3469
|
+
if (typeof val === 'string' && val.trim) {
|
|
3470
|
+
val = val.trim();
|
|
3471
|
+
}
|
|
3472
|
+
return val;
|
|
3473
|
+
});
|
|
3474
|
+
const systemThemes = this.api.themeApi.getAllSystemTheme();
|
|
3475
|
+
const isSystemTheme = !!systemThemes.filter((t) => t.Name === themeName)[0];
|
|
3476
|
+
const container = this.getGridContainerElement();
|
|
3477
|
+
const getVendorLightThemeName = () => this.getVendorGridLightThemeName();
|
|
3478
|
+
const getVendorDarkThemeName = () => getVendorLightThemeName() + '-dark';
|
|
3479
|
+
if (newTheme && isSystemTheme) {
|
|
3480
|
+
if (themeName === GeneralConstants_1.LIGHT_THEME) {
|
|
3481
|
+
newTheme.VendorGridClassName = newTheme.VendorGridClassName || getVendorLightThemeName();
|
|
3482
|
+
}
|
|
3483
|
+
if (themeName === GeneralConstants_1.DARK_THEME) {
|
|
3484
|
+
newTheme.VendorGridClassName = newTheme.VendorGridClassName || getVendorDarkThemeName();
|
|
3485
|
+
}
|
|
3486
|
+
}
|
|
3487
|
+
if (!newTheme.VendorGridClassName) {
|
|
3488
|
+
// default the vendor grid to the light theme
|
|
3489
|
+
newTheme.VendorGridClassName = getVendorLightThemeName();
|
|
3490
|
+
}
|
|
3491
|
+
if (container != null) {
|
|
3492
|
+
if (themesToRemove.length) {
|
|
3493
|
+
themesToRemove.forEach((theme) => {
|
|
3494
|
+
if (theme.VendorGridClassName) {
|
|
3495
|
+
container.classList.remove(theme.VendorGridClassName);
|
|
3496
|
+
}
|
|
3497
|
+
});
|
|
3498
|
+
}
|
|
3499
|
+
// also remove all vendor theme class names
|
|
3500
|
+
const vendorClassNamesToRemove = [];
|
|
3501
|
+
container.classList.forEach((x) => {
|
|
3502
|
+
if (x && x.indexOf('ag-theme-') === 0) {
|
|
3503
|
+
vendorClassNamesToRemove.push(x);
|
|
3504
|
+
}
|
|
3505
|
+
});
|
|
3506
|
+
vendorClassNamesToRemove.forEach((x) => container.classList.remove(x));
|
|
3507
|
+
if (newTheme && newTheme.VendorGridClassName) {
|
|
3508
|
+
container.classList.add(newTheme.VendorGridClassName);
|
|
3509
|
+
}
|
|
3510
|
+
container.classList.add('ab-Grid');
|
|
3511
|
+
if (this.adaptableOptions.searchOptions.indicateFilteredColumns) {
|
|
3512
|
+
container.classList.add('ab-Grid--indicate-filtered-columns');
|
|
3513
|
+
}
|
|
3514
|
+
}
|
|
3515
|
+
if (abLoaded !== '777') {
|
|
3516
|
+
LoggingHelper_1.ConsoleLogError('Please import Adaptable styles from "@adaptabletools/adaptable/index.css"');
|
|
3517
|
+
}
|
|
3518
|
+
// every theme should define a custom css variable: --ab-theme-loaded: <themeName> defined on the document element.
|
|
3519
|
+
if (abThemeLoaded !== themeName) {
|
|
3520
|
+
LoggingHelper_1.ConsoleLogWarning(`Theme "${themeName}" doesn't seem to be loaded! Make sure you import the css file for the "${themeName}" theme!
|
|
3521
|
+
|
|
3522
|
+
If it's a default theme, try
|
|
3523
|
+
|
|
3524
|
+
import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
3525
|
+
}
|
|
3526
|
+
}
|
|
3527
|
+
setupRowStyling() {
|
|
3528
|
+
// first get the conditional style state
|
|
3529
|
+
const conditionalStyles = this.api.conditionalStyleApi.getRowConditionalStyles();
|
|
3530
|
+
// Set any Row Styles (i.e. items without a classname)
|
|
3531
|
+
this.setGridOptionsProperty('getRowStyle', (userGetRowStyle) => {
|
|
3532
|
+
return (params) => {
|
|
3533
|
+
const result = Object.assign(Object.assign({}, userGetRowStyle === null || userGetRowStyle === void 0 ? void 0 : userGetRowStyle(params)), this.getConditionalStyleRowStyle(conditionalStyles, params));
|
|
3534
|
+
return result;
|
|
3535
|
+
};
|
|
3536
|
+
});
|
|
3537
|
+
// Now set up Row Classes
|
|
3538
|
+
this.setGridOptionsProperty('getRowClass', (userGetRowClass) => {
|
|
3539
|
+
return (params) => {
|
|
3540
|
+
let returnValue = [
|
|
3541
|
+
typeof userGetRowClass === 'function' ? userGetRowClass(params) : userGetRowClass,
|
|
3542
|
+
this.getConditionalStyleRowClass(conditionalStyles.filter((cs) => StringExtensions_1.StringExtensions.IsNotNullOrEmpty(cs.Style.ClassName)), params),
|
|
3543
|
+
]
|
|
3544
|
+
.filter((x) => !!x)
|
|
3545
|
+
.join(' ');
|
|
3546
|
+
return StringExtensions_1.StringExtensions.IsNotNullOrEmpty(returnValue) ? returnValue : undefined;
|
|
3547
|
+
};
|
|
3548
|
+
});
|
|
3549
|
+
}
|
|
3550
|
+
setupColumnHeaderAggregations(currentLayout) {
|
|
3551
|
+
const previousValue = this.gridOptions.suppressAggFuncInHeader;
|
|
3552
|
+
this.setGridOptionsProperty('suppressAggFuncInHeader', (userSuppressAggFuncInHeader) => {
|
|
3553
|
+
if (currentLayout.SuppressAggFuncInHeader !== userSuppressAggFuncInHeader) {
|
|
3554
|
+
return currentLayout.SuppressAggFuncInHeader;
|
|
3555
|
+
}
|
|
3556
|
+
});
|
|
3557
|
+
const newValue = this.gridOptions.suppressAggFuncInHeader;
|
|
3558
|
+
return previousValue !== newValue;
|
|
3559
|
+
}
|
|
3560
|
+
getConditionalStyleRowClass(conditionalStyles, params) {
|
|
3561
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles)) {
|
|
3562
|
+
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
3563
|
+
let classNames = conditionalStyles
|
|
3564
|
+
.map((conditionalStyle) => {
|
|
3565
|
+
var _a;
|
|
3566
|
+
if (module.isConditionalStyleActiveForRow(conditionalStyle, params)) {
|
|
3567
|
+
return (_a = conditionalStyle.Style) === null || _a === void 0 ? void 0 : _a.ClassName;
|
|
3568
|
+
}
|
|
3569
|
+
})
|
|
3570
|
+
.filter((x) => !!x)
|
|
3571
|
+
.join(' ');
|
|
3572
|
+
return classNames;
|
|
3573
|
+
}
|
|
3574
|
+
}
|
|
3575
|
+
getConditionalStyleRowStyle(conditionalStyles, params) {
|
|
3576
|
+
if (ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(conditionalStyles)) {
|
|
3577
|
+
const module = this.ModuleService.getModuleById(ModuleConstants.ConditionalStyleModuleId);
|
|
3578
|
+
const cs = conditionalStyles.find((cs) => module.isConditionalStyleActiveForRow(cs, params));
|
|
3579
|
+
if (cs) {
|
|
3580
|
+
return this.convertAdaptableStyleToCSS(cs.Style);
|
|
3581
|
+
}
|
|
3582
|
+
}
|
|
3583
|
+
}
|
|
3584
|
+
getGridOptionsApi() {
|
|
3585
|
+
if (!this.gridOptions.api) {
|
|
3586
|
+
LoggingHelper_1.ConsoleLogError('There is a problem with your instance of AG Grid - it has no gridApi object. Please contact Support.');
|
|
3587
|
+
return;
|
|
3588
|
+
}
|
|
3589
|
+
return this.gridOptions.api;
|
|
3590
|
+
}
|
|
3591
|
+
canExportToExcel() {
|
|
3592
|
+
return this.isModulePresent('excel-export');
|
|
3593
|
+
}
|
|
3594
|
+
exportToExcel(reportData, fileName) {
|
|
3595
|
+
const columnDefs = reportData.columns.map((column) => ({
|
|
3596
|
+
field: column.ColumnId,
|
|
3597
|
+
headerName: column.FriendlyName,
|
|
3598
|
+
}));
|
|
3599
|
+
const NESTED_COL_SEPARATOR = '.';
|
|
3600
|
+
const nestedColumns = reportData.columns.filter((column) => column.ColumnId.includes(NESTED_COL_SEPARATOR));
|
|
3601
|
+
if (nestedColumns.length) {
|
|
3602
|
+
// the rowData of nested fields (containing dots) was flattened during the report data extraction and we need to un-flatten it back
|
|
3603
|
+
// ex.
|
|
3604
|
+
// current state: { field: 'outerKey.innerKey', value: 2}
|
|
3605
|
+
// original (desired) state: { field: 'outerKey.innerKey', value: {outerKey: {innerKey: 2}}}
|
|
3606
|
+
reportData.rows.forEach((rowDataEntry) => nestedColumns.forEach((nestedColumn) => {
|
|
3607
|
+
const cellExportValue = rowDataEntry[nestedColumn.ColumnId];
|
|
3608
|
+
let intermediaryValue = rowDataEntry;
|
|
3609
|
+
// augment the rowDataEntry with the new object
|
|
3610
|
+
nestedColumn.ColumnId.split(NESTED_COL_SEPARATOR).forEach((nestedKey, index, nestedCols) => {
|
|
3611
|
+
// we reached the leaf node, so we set the cell value and break
|
|
3612
|
+
if (index === nestedCols.length - 1) {
|
|
3613
|
+
intermediaryValue[nestedKey] = cellExportValue;
|
|
3614
|
+
return;
|
|
3615
|
+
}
|
|
3616
|
+
if (intermediaryValue[nestedKey] == undefined) {
|
|
3617
|
+
intermediaryValue[nestedKey] = {};
|
|
3618
|
+
} // else means that the object already has a property with this key
|
|
3619
|
+
intermediaryValue = intermediaryValue[nestedKey];
|
|
3620
|
+
});
|
|
3621
|
+
// delete the obsolete flattened property
|
|
3622
|
+
delete rowDataEntry[nestedColumn.ColumnId];
|
|
3623
|
+
}));
|
|
3624
|
+
}
|
|
3625
|
+
const gridOptions = {
|
|
3626
|
+
columnDefs,
|
|
3627
|
+
rowData: reportData.rows,
|
|
3628
|
+
};
|
|
3629
|
+
const grid = new all_modules_1.Grid(document.createElement('div'), gridOptions);
|
|
3630
|
+
gridOptions.api.exportDataAsExcel({
|
|
3631
|
+
sheetName: 'Sheet 1',
|
|
3632
|
+
fileName: fileName,
|
|
3633
|
+
});
|
|
3634
|
+
grid.destroy();
|
|
3635
|
+
}
|
|
3636
|
+
setExcelStylesForExport() {
|
|
3637
|
+
this.setGridOptionsProperty('excelStyles', (userExcelStyles = []) => {
|
|
3638
|
+
const adaptableExcelStyles = [];
|
|
3639
|
+
const displayedColumns = this.gridOptions.columnApi.getAllDisplayedColumns();
|
|
3640
|
+
const colDefs = displayedColumns.map((column) => {
|
|
3641
|
+
return column.getColDef();
|
|
3642
|
+
});
|
|
3643
|
+
this.forAllVisibleRowNodesDo((node, rowIndex) => {
|
|
3644
|
+
const rowParams = {
|
|
3645
|
+
node,
|
|
3646
|
+
data: node.data,
|
|
3647
|
+
rowIndex,
|
|
3648
|
+
$scope: {},
|
|
3649
|
+
api: this.gridOptions.api,
|
|
3650
|
+
columnApi: this.gridOptions.columnApi,
|
|
3651
|
+
context: {},
|
|
3652
|
+
};
|
|
3653
|
+
const rowStyle = this.gridOptions.getRowStyle(rowParams);
|
|
3654
|
+
displayedColumns.forEach((column, columnIndex) => {
|
|
3655
|
+
const colDef = colDefs[columnIndex];
|
|
3656
|
+
const cellParams = {
|
|
3657
|
+
colDef,
|
|
3658
|
+
node,
|
|
3659
|
+
data: node.data,
|
|
3660
|
+
value: this.getRawValueFromRowNode(node, column.getId()),
|
|
3661
|
+
rowIndex,
|
|
3662
|
+
$scope: {},
|
|
3663
|
+
api: this.gridOptions.api,
|
|
3664
|
+
columnApi: this.gridOptions.columnApi,
|
|
3665
|
+
context: {},
|
|
3666
|
+
};
|
|
3667
|
+
const cellStyle = typeof colDef.cellStyle === 'function' ? colDef.cellStyle(cellParams) : {};
|
|
3668
|
+
const excelStyles = [];
|
|
3669
|
+
// add user defined excel styles
|
|
3670
|
+
const userDefinedCellClass = this.getUserColDefProperty(column.getColId(), 'cellClass');
|
|
3671
|
+
const userDefinedExcelStyle = userDefinedCellClass &&
|
|
3672
|
+
userExcelStyles.find((excelStyle) => excelStyle.id === userDefinedCellClass);
|
|
3673
|
+
if (userDefinedExcelStyle) {
|
|
3674
|
+
excelStyles.push(userDefinedExcelStyle);
|
|
3675
|
+
}
|
|
3676
|
+
// add adaptable derived styles (format column, conditional style etc.)
|
|
3677
|
+
const adaptableStyle = Object.assign(Object.assign({}, rowStyle), Object.keys(cellStyle).reduce((result, key) => {
|
|
3678
|
+
if (cellStyle[key] !== null) {
|
|
3679
|
+
result[key] = cellStyle[key];
|
|
3680
|
+
}
|
|
3681
|
+
return result;
|
|
3682
|
+
}, {}));
|
|
3683
|
+
if (Object.values(adaptableStyle).some((style) => style != null)) {
|
|
3684
|
+
excelStyles.push(this.convertCSSToExcelStyle(adaptableStyle));
|
|
3685
|
+
}
|
|
3686
|
+
// don't add the cell style if it has no adaptable custom styles or user defined styles
|
|
3687
|
+
if (!excelStyles.length) {
|
|
3688
|
+
return;
|
|
3689
|
+
}
|
|
3690
|
+
const cellClassId = typeof colDef.cellClass === 'function'
|
|
3691
|
+
? colDef.cellClass(cellParams)
|
|
3692
|
+
: this.getExcelClassNameForCell(column.getId(), this.getPrimaryKeyValueFromRowNode(node));
|
|
3693
|
+
const finalCellExcelStyle = Object.assign({}, ...excelStyles, {
|
|
3694
|
+
id: cellClassId,
|
|
3695
|
+
});
|
|
3696
|
+
adaptableExcelStyles.push(finalCellExcelStyle);
|
|
3697
|
+
});
|
|
3698
|
+
});
|
|
3699
|
+
return adaptableExcelStyles;
|
|
3700
|
+
});
|
|
3701
|
+
}
|
|
3702
|
+
exportVisualDataToExcel() {
|
|
3703
|
+
// add adaptable style props to user defined props
|
|
3704
|
+
this.setExcelStylesForExport();
|
|
3705
|
+
this.gridOptions.api.exportDataAsExcel({
|
|
3706
|
+
sheetName: 'Sheet 1',
|
|
3707
|
+
fileName: this.ReportService.getReportFileName(this.adaptableOptions.adaptableId),
|
|
3708
|
+
// delegate the cell value processing to Adaptable
|
|
3709
|
+
processCellCallback: (params) => {
|
|
3710
|
+
var _a;
|
|
3711
|
+
if ((_a = params.node) === null || _a === void 0 ? void 0 : _a.group) {
|
|
3712
|
+
// skip processing of row groups, this was already handled in processRowGroupCallback()
|
|
3713
|
+
return params.value;
|
|
3714
|
+
}
|
|
3715
|
+
return this.processCellForExcelExport(params.node, params.column.getColId());
|
|
3716
|
+
},
|
|
3717
|
+
processRowGroupCallback: (params) => {
|
|
3718
|
+
var _a;
|
|
3719
|
+
// recreating the standard AG Grid styling for row groups: 'Parent -> Child'
|
|
3720
|
+
// additionally the values are formatted
|
|
3721
|
+
let rowGroupNode = params.node;
|
|
3722
|
+
const rowGroupSummary = [(_a = this.processRowGroupForExcelExport(rowGroupNode)) !== null && _a !== void 0 ? _a : ''];
|
|
3723
|
+
while (rowGroupNode.parent) {
|
|
3724
|
+
rowGroupNode = rowGroupNode.parent;
|
|
3725
|
+
const formattedParentNode = this.processRowGroupForExcelExport(rowGroupNode);
|
|
3726
|
+
if (formattedParentNode) {
|
|
3727
|
+
rowGroupSummary.push(formattedParentNode);
|
|
3728
|
+
}
|
|
3729
|
+
}
|
|
3730
|
+
return rowGroupSummary.reverse().join(' -> ');
|
|
3731
|
+
},
|
|
3732
|
+
});
|
|
3733
|
+
// keep only the user defined props
|
|
3734
|
+
this.setGridOptionsProperty('excelStyles', (userExcelStyles) => {
|
|
3735
|
+
return userExcelStyles;
|
|
3736
|
+
});
|
|
3737
|
+
}
|
|
3738
|
+
convertAdaptableStyleToCSS(style) {
|
|
3739
|
+
return StyleHelper_1.convertAdaptableStyleToCSS(style);
|
|
3740
|
+
}
|
|
3741
|
+
convertCSSToExcelStyle(style) {
|
|
3742
|
+
const getHexColor = (color) => {
|
|
3743
|
+
const t = tinycolor(color);
|
|
3744
|
+
const a = t.getAlpha();
|
|
3745
|
+
return tinycolor.mix(tinycolor('white'), t, a * 100).toHexString();
|
|
3746
|
+
};
|
|
3747
|
+
let result = {};
|
|
3748
|
+
if (style.backgroundColor != null) {
|
|
3749
|
+
result.interior = {
|
|
3750
|
+
color: getHexColor(style.backgroundColor),
|
|
3751
|
+
pattern: 'Solid',
|
|
3752
|
+
};
|
|
3753
|
+
}
|
|
3754
|
+
if (style.borderColor != null) {
|
|
3755
|
+
const excelBorder = {
|
|
3756
|
+
color: style.borderColor,
|
|
3757
|
+
lineStyle: 'Continuous',
|
|
3758
|
+
weight: 1,
|
|
3759
|
+
};
|
|
3760
|
+
result.borders = {
|
|
3761
|
+
borderBottom: excelBorder,
|
|
3762
|
+
borderLeft: excelBorder,
|
|
3763
|
+
borderRight: excelBorder,
|
|
3764
|
+
borderTop: excelBorder,
|
|
3765
|
+
};
|
|
3766
|
+
}
|
|
3767
|
+
if (style.textAlign) {
|
|
3768
|
+
result.alignment = {
|
|
3769
|
+
horizontal: StringExtensions_1.StringExtensions.CapitaliseFirstLetter(style.textAlign),
|
|
3770
|
+
};
|
|
3771
|
+
}
|
|
3772
|
+
if (style.color != null) {
|
|
3773
|
+
if (!result.font) {
|
|
3774
|
+
result.font = {};
|
|
3775
|
+
}
|
|
3776
|
+
result.font = {
|
|
3777
|
+
color: getHexColor(style.color),
|
|
3778
|
+
};
|
|
3779
|
+
}
|
|
3780
|
+
if (style.fontStyle === 'italic') {
|
|
3781
|
+
if (!result.font) {
|
|
3782
|
+
result.font = {};
|
|
3783
|
+
}
|
|
3784
|
+
result.font.italic = true;
|
|
3785
|
+
}
|
|
3786
|
+
if (style.fontWeight != null &&
|
|
3787
|
+
(style.fontWeight === 'bold' || Number(style.fontWeight) >= 600)) {
|
|
3788
|
+
if (!result.font) {
|
|
3789
|
+
result.font = {};
|
|
3790
|
+
}
|
|
3791
|
+
result.font.bold = true;
|
|
3792
|
+
}
|
|
3793
|
+
if (style.fontSize != null) {
|
|
3794
|
+
if (!result.font) {
|
|
3795
|
+
result.font = {};
|
|
3796
|
+
}
|
|
3797
|
+
result.font.size = StyleHelper_1.convertCSSAbsoluteFontSizeToPt(style.fontSize);
|
|
3798
|
+
}
|
|
3799
|
+
return result;
|
|
3800
|
+
}
|
|
3801
|
+
processCellForExcelExport(rowNode, columnId) {
|
|
3802
|
+
return this.ReportService.getCellExportValueFromRowNode(rowNode, columnId);
|
|
3803
|
+
}
|
|
3804
|
+
processRowGroupForExcelExport(rowNode) {
|
|
3805
|
+
if (!rowNode.field || !rowNode.key) {
|
|
3806
|
+
return;
|
|
3807
|
+
}
|
|
3808
|
+
const columnId = rowNode.field;
|
|
3809
|
+
let rawValue = rowNode.key;
|
|
3810
|
+
if (this.api.columnApi.getColumnDataTypeFromColumnId(columnId) === 'Date' &&
|
|
3811
|
+
typeof rawValue === 'string') {
|
|
3812
|
+
// AG-Grid converts the value to string, we have to reconvert it back
|
|
3813
|
+
const numericRawValue = parseInt(rawValue);
|
|
3814
|
+
if (!isNaN(numericRawValue)) {
|
|
3815
|
+
rawValue = numericRawValue;
|
|
3816
|
+
}
|
|
3817
|
+
}
|
|
3818
|
+
return this.ReportService.getCellExportValueFromRawValue(rawValue, columnId);
|
|
3819
|
+
}
|
|
3820
|
+
hasAutogeneratedPrimaryKey() {
|
|
3821
|
+
return this.adaptableOptions.autogeneratePrimaryKey;
|
|
3822
|
+
}
|
|
3823
|
+
addSyntheticPrimaryKey(rowData = []) {
|
|
3824
|
+
for (let i = 0; i < rowData.length; i++) {
|
|
3825
|
+
rowData[i][GeneralConstants_1.AUTOGENERATED_PK_COLUMN] = Uuid_1.createUuid();
|
|
3826
|
+
}
|
|
3827
|
+
}
|
|
3828
|
+
// add a synthetic PK only if missing (useful in case of updating row data)
|
|
3829
|
+
addSyntheticPrimaryKeyIfMissing(rowData = []) {
|
|
3830
|
+
this.adaptableOptions.primaryKey = GeneralConstants_1.AUTOGENERATED_PK_COLUMN;
|
|
3831
|
+
for (let i = 0; i < rowData.length; i++) {
|
|
3832
|
+
if (!rowData[i][GeneralConstants_1.AUTOGENERATED_PK_COLUMN]) {
|
|
3833
|
+
rowData[i][GeneralConstants_1.AUTOGENERATED_PK_COLUMN] = Uuid_1.createUuid();
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
}
|
|
3837
|
+
initLicenseService() {
|
|
3838
|
+
const globalObject = typeof globalThis !== 'undefined' ? globalThis : window;
|
|
3839
|
+
const licenseKey = globalObject.ADAPTABLE_LICENSE_KEY ||
|
|
3840
|
+
this.api.internalApi.getAdaptableOptions().licenseKey;
|
|
3841
|
+
return new LicenseService_1.LicenseService(this, licenseKey, { publishedAt: publishTimestamp_1.default });
|
|
3842
|
+
}
|
|
3843
|
+
}
|
|
3844
|
+
exports.Adaptable = Adaptable;
|
|
3845
|
+
class AdaptableNoCodeWizard {
|
|
3846
|
+
/**
|
|
3847
|
+
* @param adaptableOptions
|
|
3848
|
+
*/
|
|
3849
|
+
constructor(adaptableOptions, extraOptions = {}) {
|
|
3850
|
+
const defaultInit = async ({ gridOptions, adaptableOptions }) => {
|
|
3851
|
+
adaptableOptions.vendorGrid = gridOptions;
|
|
3852
|
+
return await Adaptable.init(adaptableOptions);
|
|
3853
|
+
};
|
|
3854
|
+
this.adaptableOptions = adaptableOptions;
|
|
3855
|
+
this.init = extraOptions.onInit || defaultInit;
|
|
3856
|
+
this.extraOptions = extraOptions;
|
|
3857
|
+
this.render();
|
|
3858
|
+
}
|
|
3859
|
+
render(container) {
|
|
3860
|
+
var _a;
|
|
3861
|
+
let id = DefaultAdaptableOptions_1.DefaultAdaptableOptions.containerOptions.adaptableContainer || 'adaptable';
|
|
3862
|
+
if (!container) {
|
|
3863
|
+
let containerOptionsContainer = (_a = this.adaptableOptions.containerOptions) === null || _a === void 0 ? void 0 : _a.adaptableContainer;
|
|
3864
|
+
if (containerOptionsContainer) {
|
|
3865
|
+
if (typeof containerOptionsContainer === 'string') {
|
|
3866
|
+
id = containerOptionsContainer !== null && containerOptionsContainer !== void 0 ? containerOptionsContainer : id;
|
|
3867
|
+
}
|
|
3868
|
+
else {
|
|
3869
|
+
container = containerOptionsContainer;
|
|
3870
|
+
}
|
|
3871
|
+
}
|
|
3872
|
+
}
|
|
3873
|
+
container = container || document.getElementById(id);
|
|
3874
|
+
if (!container) {
|
|
3875
|
+
throw new Error('Cannot find container in which to render Adaptable No Code Wizard');
|
|
3876
|
+
}
|
|
3877
|
+
// this allows people to customize the wizard dimensions & styling
|
|
3878
|
+
// when it's visible
|
|
3879
|
+
container.classList.add('adaptable--in-wizard');
|
|
3880
|
+
ReactDOM.render(React.createElement(AdaptableWizardView_1.default, Object.assign(Object.assign({ adaptableOptions: this.adaptableOptions }, this.extraOptions), { onInit: (adaptableOptions) => {
|
|
3881
|
+
container.classList.remove('adaptable--in-wizard');
|
|
3882
|
+
ReactDOM.unmountComponentAtNode(container);
|
|
3883
|
+
this.init({
|
|
3884
|
+
adaptableOptions,
|
|
3885
|
+
gridOptions: adaptableOptions.vendorGrid,
|
|
3886
|
+
});
|
|
3887
|
+
} })), container);
|
|
3888
|
+
}
|
|
3889
|
+
}
|
|
3890
|
+
exports.AdaptableNoCodeWizard = AdaptableNoCodeWizard;
|
|
3891
|
+
exports.bindAdaptableAgGrid = (gridReadyEvent, gridOptions) => {
|
|
3892
|
+
gridOptions.api = gridReadyEvent.api;
|
|
3893
|
+
gridOptions.columnApi = gridReadyEvent.columnApi;
|
|
3894
|
+
};
|