@adaptabletools/adaptable 22.0.0-canary.1 → 22.0.0-canary.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +9 -9
- package/agGrid.js +1 -0
- package/index.css +1280 -1400
- package/index.css.map +1 -1
- package/index.d.ts +66 -0
- package/index.js +73 -0
- package/package.json +3 -3
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -6
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/AdaptablePlugin.js +6 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +2 -2
- package/src/AdaptableOptions/ContainerOptions.d.ts +55 -15
- package/src/AdaptableOptions/CustomSortOptions.d.ts +4 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -2
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +3 -0
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -2
- package/src/AdaptableState/AdaptableState.d.ts +2 -0
- package/src/AdaptableState/AlertState.d.ts +5 -2
- package/src/AdaptableState/ChartingState.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableButton.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +16 -10
- package/src/AdaptableState/Common/AdaptableColumnContext.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +2 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +20 -2
- package/src/AdaptableState/Common/AdaptableRowContext.d.ts +11 -0
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +8 -0
- package/src/AdaptableState/Common/BaseContext.d.ts +2 -0
- package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +18 -0
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +17 -0
- package/src/AdaptableState/Common/NamedObject.d.ts +10 -0
- package/src/AdaptableState/Common/NamedObject.js +1 -0
- package/src/AdaptableState/Common/RowDataChangedInfo.d.ts +3 -0
- package/src/AdaptableState/Common/RowSummary.d.ts +1 -1
- package/src/AdaptableState/Common/Schedule.d.ts +8 -5
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +2 -2
- package/src/AdaptableState/Common/TransposeConfig.d.ts +12 -10
- package/src/AdaptableState/CustomSortState.d.ts +5 -1
- package/src/AdaptableState/DashboardState.d.ts +1 -1
- package/src/AdaptableState/ExportState.d.ts +1 -1
- package/src/AdaptableState/FlashingCellState.d.ts +6 -2
- package/src/AdaptableState/FormatColumnState.d.ts +5 -9
- package/src/AdaptableState/InitialState.d.ts +10 -1
- package/src/AdaptableState/InternalState.d.ts +2 -0
- package/src/AdaptableState/LayoutState.d.ts +7 -3
- package/src/AdaptableState/NamedQueryState.d.ts +1 -1
- package/src/AdaptableState/PlusMinusState.d.ts +5 -1
- package/src/AdaptableState/Selection/GridCell.d.ts +9 -0
- package/src/AdaptableState/ShortcutState.d.ts +5 -1
- package/src/AdaptableState/StyledColumnState.d.ts +1 -1
- package/src/AdaptableState/ThemeState.d.ts +1 -1
- package/src/AdaptableState/UserInterfaceState.d.ts +14 -0
- package/src/AdaptableState/UserInterfaceState.js +1 -0
- package/src/Api/AlertApi.d.ts +6 -0
- package/src/Api/CustomSortApi.d.ts +12 -3
- package/src/Api/DataSetApi.d.ts +1 -1
- package/src/Api/FlashingCellApi.d.ts +6 -0
- package/src/Api/FormatColumnApi.d.ts +10 -4
- package/src/Api/GridApi.d.ts +27 -12
- package/src/Api/Implementation/ActionColumnApiImpl.js +1 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +52 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -0
- package/src/Api/Implementation/AlertApiImpl.js +6 -6
- package/src/Api/Implementation/ApiBase.d.ts +1 -1
- package/src/Api/Implementation/ApiBase.js +2 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ChartingApiImpl.js +6 -2
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +1 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -0
- package/src/Api/Implementation/CommentsApiImpl.js +1 -0
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +6 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +6 -2
- package/src/Api/Implementation/DashboardApiImpl.js +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +12 -15
- package/src/Api/Implementation/DataImportApiImpl.js +1 -0
- package/src/Api/Implementation/DataSetApiImpl.js +1 -0
- package/src/Api/Implementation/EntitlementApiImpl.js +1 -0
- package/src/Api/Implementation/EventApiImpl.js +16 -14
- package/src/Api/Implementation/ExportApiImpl.js +1 -0
- package/src/Api/Implementation/ExpressionApiImpl.js +1 -0
- package/src/Api/Implementation/Fdc3ApiImpl.js +1 -0
- package/src/Api/Implementation/FilterApiImpl.js +3 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +1 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +4 -0
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -5
- package/src/Api/Implementation/FormatColumnApiImpl.js +7 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +1 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +11 -10
- package/src/Api/Implementation/GridApiImpl.js +39 -21
- package/src/Api/Implementation/GridFilterApiImpl.js +1 -0
- package/src/Api/Implementation/LayoutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/LayoutApiImpl.js +5 -1
- package/src/Api/Implementation/LayoutHelpers.js +7 -0
- package/src/Api/Implementation/NamedQueryApiImpl.js +3 -2
- package/src/Api/Implementation/NoteApiImpl.js +1 -0
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PlusMinusApiImpl.js +3 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -0
- package/src/Api/Implementation/RowFormApiImpl.js +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +4 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ShortcutApiImpl.js +3 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +1 -0
- package/src/Api/Implementation/SystemStatusApiImpl.js +8 -9
- package/src/Api/Implementation/TeamSharingApiImpl.js +1 -0
- package/src/Api/Implementation/ThemeApiImpl.js +1 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +5 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +15 -1
- package/src/Api/Internal/CalculatedColumnInternalApi.js +2 -2
- package/src/Api/Internal/ColumnInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/FormatColumnInternalApi.js +1 -19
- package/src/Api/Internal/FreeTextColumnInternalApi.js +2 -2
- package/src/Api/Internal/LayoutInternalApi.js +1 -1
- package/src/Api/Internal/NamedQueryInternalApi.js +4 -4
- package/src/Api/LayoutApi.d.ts +6 -0
- package/src/Api/PlusMinusApi.d.ts +6 -0
- package/src/Api/ScheduleApi.d.ts +6 -0
- package/src/Api/ShortcutApi.d.ts +6 -0
- package/src/Api/UserInterfaceApi.d.ts +17 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.d.ts +8 -0
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.d.ts +15 -0
- package/src/Redux/ActionsReducers/InternalRedux.js +36 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +1 -1
- package/src/Redux/ActionsReducers/NoteRedux.js +1 -1
- package/src/Redux/ActionsReducers/UserInterfaceRedux.d.ts +11 -0
- package/src/Redux/ActionsReducers/UserInterfaceRedux.js +21 -0
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +6 -0
- package/src/Redux/Store/AdaptableStore.js +113 -57
- package/src/Strategy/AdaptableModuleBase.js +4 -0
- package/src/Strategy/AlertModule.js +5 -0
- package/src/Strategy/BulkUpdateModule.js +8 -8
- package/src/Strategy/CalculatedColumnModule.js +1 -0
- package/src/Strategy/CellSummaryModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +4 -0
- package/src/Strategy/DataChangeHistoryModule.js +1 -0
- package/src/Strategy/FlashingCellModule.js +6 -0
- package/src/Strategy/FormatColumnModule.js +4 -0
- package/src/Strategy/FreeTextColumnModule.js +1 -0
- package/src/Strategy/LayoutModule.js +6 -5
- package/src/Strategy/PlusMinusModule.js +7 -1
- package/src/Strategy/QuickSearchModule.js +1 -1
- package/src/Strategy/ScheduleModule.js +5 -0
- package/src/Strategy/SettingsPanelModule.js +11 -7
- package/src/Strategy/ShortcutModule.js +6 -0
- package/src/Strategy/SmartEditModule.js +10 -10
- package/src/Strategy/TeamSharingModule.js +10 -10
- package/src/Strategy/Utilities/FormatColumn/getFormatColumnSettingsViewItems.js +0 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +3 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +31 -31
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +3 -3
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +16 -0
- package/src/Utilities/Helpers/FormatHelper.js +9 -2
- package/src/Utilities/Helpers/StyleHelper.js +14 -0
- package/src/Utilities/MenuItem.js +18 -0
- package/src/Utilities/ObjectFactory.js +16 -3
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +8 -0
- package/src/Utilities/Services/AlertService.js +6 -4
- package/src/Utilities/Services/AnnotationsService.js +4 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +2 -1
- package/src/Utilities/Services/ChartingService.js +1 -0
- package/src/Utilities/Services/DataService.js +11 -3
- package/src/Utilities/Services/Fdc3Service.js +9 -7
- package/src/Utilities/Services/FlashingCellService.js +5 -0
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +2 -2
- package/src/Utilities/Services/ModuleService.js +5 -6
- package/src/Utilities/Services/QueryLanguageService.js +6 -5
- package/src/Utilities/Services/RowFormService.js +1 -0
- package/src/Utilities/Services/RowSummaryService.js +10 -7
- package/src/Utilities/Services/TeamSharingService.js +3 -1
- package/src/Utilities/Services/ThemeService.js +13 -15
- package/src/Utilities/Services/ValidationService.js +2 -1
- package/src/Utilities/createAgStatusPanelComponent.js +3 -0
- package/src/Utilities/logDeprecation.js +3 -4
- package/src/Utilities/resolveContainerElement.d.ts +23 -0
- package/src/Utilities/resolveContainerElement.js +44 -0
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/Alert/ActiveAlertsPanel.js +8 -0
- package/src/View/Alert/AlertViewPanel.js +13 -9
- package/src/View/Alert/Utilities/getAlertButtonStyle.d.ts +1 -0
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +8 -0
- package/src/View/Alert/Utilities/getDefaultAlertDefinition.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +5 -2
- package/src/View/Alert/Wizard/AlertTypeWizardSection.js +47 -12
- package/src/View/Alert/Wizard/AlertWizard.js +14 -10
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +24 -11
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +16 -17
- package/src/View/Charting/ChartingWizard/AgChargingWizard/SettingsSection.js +2 -2
- package/src/View/Charting/ChartingWizard/ExternalChartingWizard/SettingsSection.js +2 -2
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/Buttons/ButtonApply.js +1 -1
- package/src/View/Components/Buttons/ButtonBase/index.js +9 -9
- package/src/View/Components/Buttons/ButtonClear.d.ts +1 -0
- package/src/View/Components/Buttons/EntityListActionButtons.d.ts +1 -2
- package/src/View/Components/Buttons/EntityListActionButtons.js +18 -18
- package/src/View/Components/Buttons/SuspendToggleButton/SuspendToggleButton.d.ts +1 -2
- package/src/View/Components/CellPopup/index.js +1 -1
- package/src/View/Components/ColumnFilter/FloatingFilter.js +41 -3
- package/src/View/Components/ColumnFilter/components/ColumnFilterInput.js +1 -1
- package/src/View/Components/ColumnFilter/components/ColumnFilterMenu.js +54 -2
- package/src/View/Components/ColumnFilter/components/FloatingFilterValues.js +1 -1
- package/src/View/Components/EntityRulesEditor/Utilities.js +5 -5
- package/src/View/Components/NewScopeComponent.js +3 -3
- package/src/View/Components/Panels/PanelDashboard/index.js +8 -8
- package/src/View/Components/Panels/PanelToolPanel/index.js +7 -7
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +1 -8
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +1 -1
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +36 -1
- package/src/View/Components/Selectors/BulkUpdateValueSelector.js +19 -18
- package/src/View/Components/StyleComponent.d.ts +1 -0
- package/src/View/Components/StyleComponent.js +94 -24
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +2 -0
- package/src/View/Components/WizardSummaryPage.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +41 -15
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +4 -4
- package/src/View/Dashboard/CustomToolbar.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +4 -5
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -0
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +1 -1
- package/src/View/Export/ExportDestinationPicker.js +1 -1
- package/src/View/Export/ExportStatusBar.js +4 -2
- package/src/View/Export/ExportViewPanel.js +25 -18
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +34 -14
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +14 -10
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +46 -51
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +20 -9
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +3 -3
- package/src/View/GridFilter/GridFilterExpressionEditor.js +6 -1
- package/src/View/GridFilter/GridFilterViewPanel.js +33 -70
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +57 -65
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/TransposedPopup.js +144 -138
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +1 -1
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +1 -1
- package/src/View/Layout/Wizard/sections/PivotAggregationsSection.js +3 -3
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +8 -0
- package/src/View/Layout/Wizard/sections/RowSummarySection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryExpressionWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +35 -12
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +20 -15
- package/src/View/QuickSearch/QuickSearchPopup.js +4 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +14 -4
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +12 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.d.ts +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +19 -10
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.d.ts +2 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +25 -4
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +18 -14
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -0
- package/src/View/StateManagement/handleExportState.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/Theme/ThemePopup.js +13 -16
- package/src/View/UIHelper.d.ts +4 -1
- package/src/View/UIHelper.js +23 -14
- package/src/agGrid/Adaptable.js +15 -11
- package/src/agGrid/AdaptableAgGrid.d.ts +12 -8
- package/src/agGrid/AdaptableAgGrid.js +257 -111
- package/src/agGrid/AdaptableFilterHandler.js +4 -0
- package/src/agGrid/AdaptableLogger.d.ts +3 -0
- package/src/agGrid/AdaptableLogger.js +10 -0
- package/src/agGrid/AgGridAdapter.js +19 -9
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -0
- package/src/agGrid/AgGridColumnAdapter.js +20 -22
- package/src/agGrid/AgGridExportAdapter.js +15 -14
- package/src/agGrid/AgGridFilterAdapter.js +4 -0
- package/src/agGrid/AgGridFloatingFilterAdapter.js +4 -1
- package/src/agGrid/AgGridMenuAdapter.js +10 -1
- package/src/agGrid/AgGridModulesAdapter.js +2 -1
- package/src/agGrid/AgGridOptionsService.js +3 -0
- package/src/agGrid/AgGridThemeAdapter.js +4 -2
- package/src/agGrid/cellRenderers/ActionColumnRenderer.js +5 -0
- package/src/agGrid/cellRenderers/BadgeRenderer.js +2 -0
- package/src/agGrid/cellRenderers/PercentBarRenderer.js +1 -0
- package/src/agGrid/editors/AdaptableDateEditor/index.js +6 -3
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +16 -12
- package/src/agGrid/editors/AdaptablePercentageEditor/index.js +17 -13
- package/src/agGrid/index.d.ts +6 -0
- package/src/agGrid/index.js +6 -0
- package/src/components/CheckBox/index.js +1 -1
- package/src/components/ColorPicker/ColorPicker.js +5 -4
- package/src/components/Dashboard/DashboardToolbar.js +1 -1
- package/src/components/Datepicker/index.js +1 -1
- package/src/components/Dropdown/Arrows.js +1 -1
- package/src/components/ExpressionEditor/DataTableEditor.js +3 -3
- package/src/components/ExpressionEditor/EditorInput.js +19 -3
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +1 -1
- package/src/components/FormLayout/index.js +1 -1
- package/src/components/OverlayTrigger/index.js +1 -1
- package/src/components/Select/Select.js +79 -16
- package/src/components/Tree/TreeDropdown/index.js +2 -2
- package/src/components/overlayBaseZIndex.js +1 -1
- package/src/components/utils/useContainerScrollObserver/index.js +17 -14
- package/src/devTools/index.js +54 -53
- package/src/env.js +2 -2
- package/src/layout-manager/src/LMEmitter.js +11 -11
- package/src/layout-manager/src/LMLogger.js +7 -0
- package/src/layout-manager/src/LayoutManagerModel.d.ts +1 -0
- package/src/layout-manager/src/index.js +81 -58
- package/src/layout-manager/src/normalizeLayoutModel.js +3 -0
- package/src/metamodel/adaptable.metamodel.d.ts +177 -8
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/migration/AdaptableUpgradeHelper.js +8 -3
- package/src/migration/VersionUpgrade.js +1 -0
- package/src/migration/VersionUpgrade17.js +5 -6
- package/src/migration/VersionUpgrade20.js +4 -4
- package/src/migration/VersionUpgrade22.d.ts +21 -0
- package/src/migration/VersionUpgrade22.js +187 -0
- package/src/parser/src/ExpressionEvaluationError.js +1 -0
- package/src/types.d.ts +9 -7
- package/themes/dark.css +30 -30
- package/themes/light.css +4 -2
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +0 -632
- package/src/View/Alert/AlertEntityRow.d.ts +0 -11
- package/src/View/Alert/AlertEntityRow.js +0 -28
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +0 -21
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +0 -58
- package/src/View/Components/Buttons/ButtonFunction.d.ts +0 -7
- package/src/View/Components/Buttons/ButtonFunction.js +0 -8
- package/src/View/Components/Buttons/ButtonGeneral.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonGeneral.js +0 -7
- package/src/View/Components/Buttons/ButtonPreviewDelete.d.ts +0 -4
- package/src/View/Components/Buttons/ButtonPreviewDelete.js +0 -5
- package/src/View/Components/Buttons/ButtonShow.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShow.js +0 -7
- package/src/View/Components/Buttons/ButtonShowChart.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonShowChart.js +0 -7
- package/src/View/Components/Buttons/ButtonUndo.d.ts +0 -5
- package/src/View/Components/Buttons/ButtonUndo.js +0 -7
- package/src/View/Components/ExpressionWizard.d.ts +0 -24
- package/src/View/Components/ExpressionWizard.js +0 -77
- package/src/View/Components/FilterForm/Waiting.d.ts +0 -10
- package/src/View/Components/FilterForm/Waiting.js +0 -14
- package/src/View/Components/Panels/PanelFooter.d.ts +0 -10
- package/src/View/Components/Panels/PanelFooter.js +0 -9
- package/src/View/Components/Panels/PanelWithTwoButtons.d.ts +0 -12
- package/src/View/Components/Panels/PanelWithTwoButtons.js +0 -15
- package/src/View/Components/Panels/ToolPanelSettingsPanel.d.ts +0 -8
- package/src/View/Components/Panels/ToolPanelSettingsPanel.js +0 -26
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +0 -18
- package/src/View/Components/Selectors/ColumnSelectorOld.js +0 -45
- package/src/View/Components/SharedProps/WizardScopeState.d.ts +0 -4
- package/src/View/Components/WizardSummaryRow.d.ts +0 -9
- package/src/View/Components/WizardSummaryRow.js +0 -11
- package/src/View/CustomSort/CustomSortSummary.d.ts +0 -23
- package/src/View/CustomSort/CustomSortSummary.js +0 -105
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.d.ts +0 -9
- package/src/View/DataImport/DataImportWizard/sections/ImportSection.js +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportRowTypeWizard.d.ts +0 -19
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +0 -68
- package/src/View/Export/Wizard/ReportSettingsWizard.d.ts +0 -21
- package/src/View/Export/Wizard/ReportSettingsWizard.js +0 -56
- package/src/View/Export/Wizard/ReportSummaryWizard.d.ts +0 -15
- package/src/View/Export/Wizard/ReportSummaryWizard.js +0 -35
- package/src/View/Filter/FilterSummary.d.ts +0 -18
- package/src/View/Filter/FilterSummary.js +0 -48
- package/src/View/FormatColumn/FormatColumnSummary.d.ts +0 -22
- package/src/View/FormatColumn/FormatColumnSummary.js +0 -90
- package/src/View/FreeTextColumn/FreeTextColumnSummary.d.ts +0 -22
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +0 -88
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.d.ts +0 -7
- package/src/View/GridInfo/GridInfoPopup/AdaptableOptionsComponent.js +0 -94
- package/src/View/PlusMinus/PlusMinusSummary.d.ts +0 -22
- package/src/View/PlusMinus/PlusMinusSummary.js +0 -95
- package/src/View/Wizard/WizardLegend.d.ts +0 -12
- package/src/View/Wizard/WizardLegend.js +0 -23
- /package/src/{View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.d.ts → AdaptableState/Common/AdaptableRowContext.js} +0 -0
- /package/src/{View/Components/SharedProps/WizardScopeState.js → AdaptableState/Common/ColumnHighlightInfo.js} +0 -0
|
@@ -3,6 +3,11 @@ export const FLASHING_CELL_ROW_KEY = '__ROW';
|
|
|
3
3
|
* This service manages Flashing Cells
|
|
4
4
|
*/
|
|
5
5
|
export class FlashingCellService {
|
|
6
|
+
api;
|
|
7
|
+
// map of rowPrimaryKey -> ColIdOrRowId -> FlashingCellUuid
|
|
8
|
+
gridCellsCurrentlyFlashing;
|
|
9
|
+
// map of FlashingCellUuid -> FlashingCell
|
|
10
|
+
flashingCellsMapping;
|
|
6
11
|
constructor(api) {
|
|
7
12
|
this.api = api;
|
|
8
13
|
this.gridCellsCurrentlyFlashing = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{LicenseDisablePersistence as e,LicenseShowWatermark as a}from"../../../Redux/ActionsReducers/InternalRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import i from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as o}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",p=10,d=864e5;export var LicenseValidityType;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(LicenseValidityType||(LicenseValidityType={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===i},I=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===i},_=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===i};export class LicenseService{constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=n(this.licenseKey)}catch(a){e=a}E()||I()||_()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return LicenseValidityType.NO_LICENSE;if(e instanceof Error)return LicenseValidityType.INVALID_LICENSE;const t=new Date(a.publishedAt),i=new Date(e.end),s=i<new Date,o=e.trial;let n=null;return n=s?i>t?o?LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE:o?LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?LicenseValidityType.NON_PRODUCTION_VALID:LicenseValidityType.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let i=0;e instanceof Error||!e?.end||(i=Math.floor((e?.end?.getTime()-t.getTime())/d),i=s(i,0,1/0));let n="",h="";!e||e instanceof Error||!e.appName||e.appName==r||(n=e.appName,h=" for application [APP_NAME]");const E=(e,a=o,t=c,s=i,r=n)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",r).replace("[DAYS]",`${s}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(i<=p)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{l()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction(t({alertType:"generic",header:"License Error",message:e,alertDefinition:i.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(e())}destroy(){}}
|
|
1
|
+
import{LicenseDisablePersistence as e,LicenseShowWatermark as a}from"../../../Redux/ActionsReducers/InternalRedux";import{PopupShowAlert as t}from"../../../Redux/ActionsReducers/PopupRedux";import i from"../../ObjectFactory";import s from"lodash/clamp";import{LicenseDocsLink as o}from"../../Constants/DocumentationLinkConstants";import{decode as n,GENERIC_APP_NAME as r}from"../../license/decode";import{shouldLogThankYouMessage as l}from"./shouldLogThankYouMessage";const c="sales@adaptabletools.com",p=10,d=864e5;export var LicenseValidityType;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(LicenseValidityType||(LicenseValidityType={}));const h=()=>"undefined"!=typeof window?window.location.origin:"",E=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g.exec(e)||[]);return"https"===t&&"sandpack.codesandbox.io"===i},I=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.csb\.app)/g.exec(e)||[]);return"https"===t&&".csb.app"===i},_=()=>{const e=h(),[a,t,i]=Array.from(/(https):\/\/\S+(\.adaptabletools\.com)/g.exec(e)||[]);return"https"===t&&".adaptabletools.com"===i};export class LicenseService{adaptable;licenseKey;packageDetails;constructor(e,a,t){this.adaptable=e,this.licenseKey=a,this.packageDetails=t,this.adaptable=e,this.adaptable.api.eventApi.on("AdaptableReady",()=>{requestAnimationFrame(()=>{this.adaptable.isDestroyed||this.init()})})}init(){let e=null;if(this.licenseKey)try{e=n(this.licenseKey)}catch(a){e=a}E()||I()||_()||this.handleLicenseValidation(e,this.getValidityType(e,this.packageDetails))}getValidityType(e,a){if(!e)return LicenseValidityType.NO_LICENSE;if(e instanceof Error)return LicenseValidityType.INVALID_LICENSE;const t=new Date(a.publishedAt),i=new Date(e.end),s=i<new Date,o=e.trial;let n=null;return n=s?i>t?o?LicenseValidityType.NON_PRODUCTION_EXPIRED_IN_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_IN_SCOPE:o?LicenseValidityType.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:LicenseValidityType.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:o?LicenseValidityType.NON_PRODUCTION_VALID:LicenseValidityType.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){const t=new Date;t.setHours(0,0,0,0);let i=0;e instanceof Error||!e?.end||(i=Math.floor((e?.end?.getTime()-t.getTime())/d),i=s(i,0,1/0));let n="",h="";!e||e instanceof Error||!e.appName||e.appName==r||(n=e.appName,h=" for application [APP_NAME]");const E=(e,a=o,t=c,s=i,r=n)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",r).replace("[DAYS]",`${s}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(E("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(i<=p)this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{l()&&this.adaptable.logger.consoleLogByMessageType(E(`Thank you for using a valid AdapTable license${h}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(E(`This AdapTable license${h} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction(t({alertType:"generic",header:"License Error",message:e,alertDefinition:i.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction(a(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction(e())}destroy(){}}
|
|
@@ -5,9 +5,9 @@ import { AdaptableLogger } from '../../agGrid/AdaptableLogger';
|
|
|
5
5
|
import { getDefaultAdaptableOptions } from '../../AdaptableOptions/DefaultAdaptableOptions';
|
|
6
6
|
const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
|
|
7
7
|
export class MetamodelService {
|
|
8
|
+
gridInfoOptions = new Map();
|
|
9
|
+
getAdaptableOptions = () => null;
|
|
8
10
|
constructor(getAdaptableOptions, validateOptions) {
|
|
9
|
-
this.gridInfoOptions = new Map();
|
|
10
|
-
this.getAdaptableOptions = () => null;
|
|
11
11
|
this.getAdaptableOptions = getAdaptableOptions;
|
|
12
12
|
this.gridInfoOptions = this.buildGridInfoOptions();
|
|
13
13
|
if (validateOptions) {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import Helper from '../Helpers/Helper';
|
|
2
2
|
import { AgGridRequiredModulesDocsLink, HOST_URL_DOCS, } from '../Constants/DocumentationLinkConstants';
|
|
3
3
|
export class ModuleService {
|
|
4
|
+
adaptableApi;
|
|
4
5
|
constructor(adaptableApi) {
|
|
5
6
|
this.adaptableApi = adaptableApi;
|
|
6
7
|
this.adaptableApi = adaptableApi;
|
|
@@ -31,9 +32,7 @@ export class ModuleService {
|
|
|
31
32
|
const registeredAgGridModuleNames = agGridModulesAdapter.getAgGridRegisteredModuleNames();
|
|
32
33
|
const missingAgGridModuleNames = mandatoryAgGridModuleNames.filter((moduleName) => !registeredAgGridModuleNames.includes(moduleName));
|
|
33
34
|
if (missingAgGridModuleNames.length) {
|
|
34
|
-
this.adaptableApi.consoleError(`
|
|
35
|
-
|
|
36
|
-
See for more information: ${AgGridRequiredModulesDocsLink}`);
|
|
35
|
+
this.adaptableApi.consoleError(`Adaptable requires these AG Grid modules: ${missingAgGridModuleNames.join(', ')}. Please register them. See: ${AgGridRequiredModulesDocsLink}`);
|
|
37
36
|
}
|
|
38
37
|
// log optional missing AG Grid dependencies for all modules
|
|
39
38
|
this.getModuleCollection().forEach((adaptableModule) => {
|
|
@@ -113,13 +112,13 @@ export class ModuleService {
|
|
|
113
112
|
case 'CalculatedColumn':
|
|
114
113
|
return url + 'handbook-calculated-column';
|
|
115
114
|
case 'CellSummary':
|
|
116
|
-
return url + 'handbook-summarising';
|
|
115
|
+
return url + 'handbook-summarising-cells';
|
|
117
116
|
case 'Charting':
|
|
118
117
|
return url + 'handbook-charts';
|
|
119
118
|
case 'ColumnFilter':
|
|
120
119
|
return url + 'handbook-column-filter';
|
|
121
120
|
case 'ColumnInfo':
|
|
122
|
-
return url + 'dev-guide-
|
|
121
|
+
return url + 'dev-guide-columns-column-info';
|
|
123
122
|
case 'Comment':
|
|
124
123
|
return url + 'handbook-comments';
|
|
125
124
|
case 'CustomSort':
|
|
@@ -145,7 +144,7 @@ export class ModuleService {
|
|
|
145
144
|
case 'GridFilter':
|
|
146
145
|
return url + 'handbook-grid-filter';
|
|
147
146
|
case 'GridInfo':
|
|
148
|
-
return url + 'dev-guide-
|
|
147
|
+
return url + 'dev-guide-support-monitoring';
|
|
149
148
|
case 'Layout':
|
|
150
149
|
return url + 'handbook-layouts';
|
|
151
150
|
case 'NamedQuery':
|
|
@@ -9,13 +9,14 @@ import { scalarExpressionFunctions } from '../ExpressionFunctions/scalarExpressi
|
|
|
9
9
|
import { getTypedKeys } from '../Extensions/TypeExtensions';
|
|
10
10
|
import { AggregatedScalarLiveValue } from './AggregatedScalarLiveValue';
|
|
11
11
|
export class QueryLanguageService {
|
|
12
|
+
adaptableApi;
|
|
13
|
+
cacheBooleanValidation = new Map();
|
|
14
|
+
cacheObservableValidation = new Map();
|
|
15
|
+
cacheAggregatedBooleanValidation = new Map();
|
|
16
|
+
cacheAggregatedScalarValidation = new Map();
|
|
17
|
+
cacheModuleSpecificExpressionFunctions = new Map();
|
|
12
18
|
constructor(adaptableApi) {
|
|
13
19
|
this.adaptableApi = adaptableApi;
|
|
14
|
-
this.cacheBooleanValidation = new Map();
|
|
15
|
-
this.cacheObservableValidation = new Map();
|
|
16
|
-
this.cacheAggregatedBooleanValidation = new Map();
|
|
17
|
-
this.cacheAggregatedScalarValidation = new Map();
|
|
18
|
-
this.cacheModuleSpecificExpressionFunctions = new Map();
|
|
19
20
|
}
|
|
20
21
|
evaluateBooleanExpression(expression, module, rowNode, evalContext) {
|
|
21
22
|
if (expression == undefined) {
|
|
@@ -10,15 +10,12 @@ import isEqual from 'lodash/isEqual';
|
|
|
10
10
|
* The logic is extracted here to make it easier to follow
|
|
11
11
|
*/
|
|
12
12
|
export class RowSummaryService {
|
|
13
|
+
api;
|
|
14
|
+
cachedCellSummary = new Map();
|
|
15
|
+
previousRowSummaries;
|
|
16
|
+
previousLayout;
|
|
13
17
|
constructor(api) {
|
|
14
18
|
this.api = api;
|
|
15
|
-
this.cachedCellSummary = new Map();
|
|
16
|
-
this._throttleAcumulatedColumnsThatChanged = new Set();
|
|
17
|
-
/**
|
|
18
|
-
*
|
|
19
|
-
* @param colId optional to evaluate only one column
|
|
20
|
-
*/
|
|
21
|
-
this._throttledEvaluateRowSummary = throttle(this.evaluateRowSummary, 300);
|
|
22
19
|
}
|
|
23
20
|
onAdaptableReady() {
|
|
24
21
|
this.rowSummariesSubscriptions();
|
|
@@ -66,12 +63,18 @@ export class RowSummaryService {
|
|
|
66
63
|
this.throttledEvaluateRowSummary();
|
|
67
64
|
});
|
|
68
65
|
}
|
|
66
|
+
_throttleAcumulatedColumnsThatChanged = new Set();
|
|
69
67
|
throttledEvaluateRowSummary(reason) {
|
|
70
68
|
if (reason) {
|
|
71
69
|
reason.columnIds.forEach((col) => this._throttleAcumulatedColumnsThatChanged.add(col));
|
|
72
70
|
}
|
|
73
71
|
this._throttledEvaluateRowSummary(reason);
|
|
74
72
|
}
|
|
73
|
+
/**
|
|
74
|
+
*
|
|
75
|
+
* @param colId optional to evaluate only one column
|
|
76
|
+
*/
|
|
77
|
+
_throttledEvaluateRowSummary = throttle(this.evaluateRowSummary, 300);
|
|
75
78
|
evaluateRowSummary(reason) {
|
|
76
79
|
if (this._throttleAcumulatedColumnsThatChanged.size > 0) {
|
|
77
80
|
const columnIds = Array.from(this._throttleAcumulatedColumnsThatChanged.values());
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { createUuid } from '../../AdaptableState/Uuid';
|
|
2
2
|
import ObjectFactory from '../ObjectFactory';
|
|
3
3
|
export class TeamSharingService {
|
|
4
|
+
adaptableApi;
|
|
5
|
+
dismissedNotifications = [];
|
|
6
|
+
updateCheckTimerId;
|
|
4
7
|
constructor(adaptableApi) {
|
|
5
8
|
this.adaptableApi = adaptableApi;
|
|
6
|
-
this.dismissedNotifications = [];
|
|
7
9
|
const teamSharingOptions = adaptableApi.optionsApi.getTeamSharingOptions();
|
|
8
10
|
if (teamSharingOptions.updateInterval > 0) {
|
|
9
11
|
// convert minutes to millis
|
|
@@ -1,14 +1,8 @@
|
|
|
1
1
|
export class ThemeService {
|
|
2
|
+
api;
|
|
3
|
+
unsubscribe = () => { };
|
|
4
|
+
styleSheetObject;
|
|
2
5
|
constructor(api) {
|
|
3
|
-
this.unsubscribe = () => { };
|
|
4
|
-
this.onThemeChanged = () => {
|
|
5
|
-
let currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
6
|
-
currentTheme = this.mapOsTheme(currentTheme);
|
|
7
|
-
this.applyNewThemeVariables(currentTheme);
|
|
8
|
-
// this needs to be called after variables are set
|
|
9
|
-
// as it may show the warning for a custom/runtime theme
|
|
10
|
-
this.showMissingThemeFiles(currentTheme);
|
|
11
|
-
};
|
|
12
6
|
this.api = api;
|
|
13
7
|
this.subscribe();
|
|
14
8
|
if (!this.styleSheetObject) {
|
|
@@ -33,6 +27,14 @@ export class ThemeService {
|
|
|
33
27
|
prefferedColorSchemeUnsubscribe();
|
|
34
28
|
};
|
|
35
29
|
}
|
|
30
|
+
onThemeChanged = () => {
|
|
31
|
+
let currentTheme = this.api.themeApi.getCurrentThemeObject();
|
|
32
|
+
currentTheme = this.mapOsTheme(currentTheme);
|
|
33
|
+
this.applyNewThemeVariables(currentTheme);
|
|
34
|
+
// this needs to be called after variables are set
|
|
35
|
+
// as it may show the warning for a custom/runtime theme
|
|
36
|
+
this.showMissingThemeFiles(currentTheme);
|
|
37
|
+
};
|
|
36
38
|
applyNewThemeVariables(theme) {
|
|
37
39
|
const variables = theme.CSSVariables;
|
|
38
40
|
if (!variables || Object.keys(variables).length === 0) {
|
|
@@ -68,15 +70,11 @@ export class ThemeService {
|
|
|
68
70
|
return val;
|
|
69
71
|
});
|
|
70
72
|
if (abLoaded !== '777') {
|
|
71
|
-
logger.consoleError('
|
|
73
|
+
logger.consoleError('Adaptable styles not detected. Please import "@adaptabletools/adaptable/index.css".');
|
|
72
74
|
}
|
|
73
75
|
const isCustomUserTheme = !this.api.themeApi.internalApi.isSystemTheme(themeName);
|
|
74
76
|
if (!isCustomUserTheme && abThemeLoaded !== themeName) {
|
|
75
|
-
logger.consoleWarn(`Theme "${themeName}"
|
|
76
|
-
|
|
77
|
-
If it's an AdapTable system theme, try
|
|
78
|
-
|
|
79
|
-
import "@adaptabletools/adaptable/themes/${themeName}.css"`);
|
|
77
|
+
logger.consoleWarn(`Theme "${themeName}" does not appear to be loaded. Ensure the CSS file is imported, e.g.: import "@adaptabletools/adaptable/themes/${themeName}.css".`);
|
|
80
78
|
}
|
|
81
79
|
}
|
|
82
80
|
// prefers-color-scheme
|
|
@@ -4,6 +4,7 @@ import { AlertModuleId } from '../Constants/ModuleConstants';
|
|
|
4
4
|
import { SERVER_VALIDATION_HEADER, SERVER_VALIDATION_MESSAGE_TYPE, } from '../Constants/GeneralConstants';
|
|
5
5
|
import { errorOnce } from '../../agGrid/AdaptableLogger';
|
|
6
6
|
export class ValidationService {
|
|
7
|
+
adaptableApi;
|
|
7
8
|
constructor(adaptableApi) {
|
|
8
9
|
this.adaptableApi = adaptableApi;
|
|
9
10
|
this.adaptableApi = adaptableApi;
|
|
@@ -52,7 +53,7 @@ export class ValidationService {
|
|
|
52
53
|
let alert = {
|
|
53
54
|
alertType: 'cellChanged',
|
|
54
55
|
header: 'Alert',
|
|
55
|
-
message: '
|
|
56
|
+
message: 'A validation rule was triggered for this edit.',
|
|
56
57
|
alertDefinition: failedRules[0],
|
|
57
58
|
cellDataChangedInfo: cellDataChangedInfo,
|
|
58
59
|
};
|
|
@@ -11,13 +11,12 @@ const doOnce = (func, key) => {
|
|
|
11
11
|
};
|
|
12
12
|
export const logDeprecation = (logger, typeName, oldProp, newProp, message) => {
|
|
13
13
|
const newPropMsg = newProp ? `Please use '${typeName}.${newProp}()' instead. ` : '';
|
|
14
|
-
doOnce(() => logger.consoleWarn(
|
|
14
|
+
doOnce(() => logger.consoleWarn(`${typeName}.${oldProp}() is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
|
|
15
15
|
};
|
|
16
16
|
export const logDeprecationExternal = (logger, oldTypeName, oldProp, newTypeName, newProp, message) => {
|
|
17
17
|
const newPropMsg = newProp ? `Please use '${newTypeName}.${newProp}()' instead. ` : '';
|
|
18
|
-
doOnce(() => logger.consoleWarn(
|
|
18
|
+
doOnce(() => logger.consoleWarn(`${oldTypeName}.${oldProp}() is deprecated. ${newPropMsg}${message ?? ''}`), `Deprecated_${oldProp}`);
|
|
19
19
|
};
|
|
20
20
|
export const logDeprecationInternal = (logger, typeName, oldProp) => {
|
|
21
|
-
doOnce(() => logger.consoleWarn(
|
|
22
|
-
Please contact support if you need the missing functionality.`), `Deprecated_${oldProp}`);
|
|
21
|
+
doOnce(() => logger.consoleWarn(`${typeName}.${oldProp}() is deprecated and will be removed in the next major release. Contact support if you need this functionality.`), `Deprecated_${oldProp}`);
|
|
23
22
|
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { AdaptableContainerValue, ContainerContext, InitContainerContext } from '../AdaptableOptions/ContainerOptions';
|
|
2
|
+
/**
|
|
3
|
+
* The union type representing any container option value (static or function).
|
|
4
|
+
*/
|
|
5
|
+
type AnyContainerOption = AdaptableContainerValue | ((context: any) => AdaptableContainerValue);
|
|
6
|
+
/**
|
|
7
|
+
* Resolves a container option value to an `HTMLElement`.
|
|
8
|
+
*
|
|
9
|
+
* Resolution order:
|
|
10
|
+
* 1. If `container` is `null`/`undefined`, returns `null`.
|
|
11
|
+
* 2. If `container` is a function, it is called with the provided `context` and the result is resolved.
|
|
12
|
+
* 3. If the value is an `HTMLElement`, it is returned directly.
|
|
13
|
+
* 4. If the value is an `AdaptableCSSSelector` (`{ selector: string }`), `document.querySelectorAll` is used.
|
|
14
|
+
* If multiple elements match, the first is returned and a console warning is logged.
|
|
15
|
+
* 5. If the value is a `string`, it is treated as an element ID and `document.getElementById` is used.
|
|
16
|
+
*
|
|
17
|
+
* @param container - The container reference to resolve.
|
|
18
|
+
* @param context - Optional context passed to the function form of the container.
|
|
19
|
+
* @param doc - The document to query against (defaults to `globalThis.document`).
|
|
20
|
+
* @returns The resolved `HTMLElement`, or `null` if not found.
|
|
21
|
+
*/
|
|
22
|
+
export declare function resolveContainerElement(container: AnyContainerOption | undefined | null, context?: ContainerContext | InitContainerContext, doc?: Document): HTMLElement | null;
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves a container option value to an `HTMLElement`.
|
|
3
|
+
*
|
|
4
|
+
* Resolution order:
|
|
5
|
+
* 1. If `container` is `null`/`undefined`, returns `null`.
|
|
6
|
+
* 2. If `container` is a function, it is called with the provided `context` and the result is resolved.
|
|
7
|
+
* 3. If the value is an `HTMLElement`, it is returned directly.
|
|
8
|
+
* 4. If the value is an `AdaptableCSSSelector` (`{ selector: string }`), `document.querySelectorAll` is used.
|
|
9
|
+
* If multiple elements match, the first is returned and a console warning is logged.
|
|
10
|
+
* 5. If the value is a `string`, it is treated as an element ID and `document.getElementById` is used.
|
|
11
|
+
*
|
|
12
|
+
* @param container - The container reference to resolve.
|
|
13
|
+
* @param context - Optional context passed to the function form of the container.
|
|
14
|
+
* @param doc - The document to query against (defaults to `globalThis.document`).
|
|
15
|
+
* @returns The resolved `HTMLElement`, or `null` if not found.
|
|
16
|
+
*/
|
|
17
|
+
export function resolveContainerElement(container, context, doc = globalThis.document) {
|
|
18
|
+
if (container == null) {
|
|
19
|
+
return null;
|
|
20
|
+
}
|
|
21
|
+
// Unwrap function form — pass context if the container is a function
|
|
22
|
+
const value = typeof container === 'function' ? container(context) : container;
|
|
23
|
+
// Guard against null/undefined returned by a callback (e.g. document.getElementById(...))
|
|
24
|
+
if (value == null) {
|
|
25
|
+
return null;
|
|
26
|
+
}
|
|
27
|
+
// Direct HTMLElement reference
|
|
28
|
+
if (value instanceof HTMLElement) {
|
|
29
|
+
return value;
|
|
30
|
+
}
|
|
31
|
+
// CSS Selector object
|
|
32
|
+
if (typeof value === 'object' && 'selector' in value) {
|
|
33
|
+
const matches = doc.querySelectorAll(value.selector);
|
|
34
|
+
if (matches.length > 1) {
|
|
35
|
+
console.warn(`[AdapTable] CSS selector "${value.selector}" matched ${matches.length} elements. Using the first match. Consider using a more specific selector.`);
|
|
36
|
+
}
|
|
37
|
+
return matches[0] ?? null;
|
|
38
|
+
}
|
|
39
|
+
// String element ID
|
|
40
|
+
if (typeof value === 'string') {
|
|
41
|
+
return doc.getElementById(value);
|
|
42
|
+
}
|
|
43
|
+
return null;
|
|
44
|
+
}
|
|
@@ -17,6 +17,7 @@ export interface AdaptablePopoverProps extends React.ClassAttributes<React.Props
|
|
|
17
17
|
popupPadding?: 0 | 2;
|
|
18
18
|
alignPosition?: OverlayShowParams['alignPosition'];
|
|
19
19
|
visible?: boolean;
|
|
20
|
+
disabled?: boolean;
|
|
20
21
|
}
|
|
21
22
|
export declare class AdaptablePopover extends React.Component<React.PropsWithChildren<AdaptablePopoverProps>, {}> {
|
|
22
23
|
render(): React.JSX.Element;
|
|
@@ -35,7 +35,7 @@ export class AdaptablePopover extends React.Component {
|
|
|
35
35
|
// showTriangle
|
|
36
36
|
visible: this.props.visible, render: () => popoverClickRootClose, showEvent: (this.props.showEvent || 'mouseenter'), hideEvent: (this.props.hideEvent || 'mouseleave'), style: {
|
|
37
37
|
overflow: 'visible',
|
|
38
|
-
}, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
38
|
+
}, alignPosition: this.props.alignPosition }, useButton ? (React.createElement(ButtonInfo, { style: iconStyle, variant: "text", onClick: () => null, icon: showIcon && icon, tooltip: this.props.tooltipText, disabled: this.props.disabled }, this.props.children)) : (React.createElement("div", { title: this.props.tooltipText, tabIndex: 0, style: { cursor: 'pointer', display: 'inline-block' } },
|
|
39
39
|
this.props.children,
|
|
40
40
|
showIcon && React.createElement(Icon, { name: icon, style: iconStyle }))))));
|
|
41
41
|
}
|
|
@@ -7,5 +7,13 @@ export const ActiveAlertsPanel = () => {
|
|
|
7
7
|
const adaptable = useAdaptable();
|
|
8
8
|
const filterModule = adaptable.ModuleService.getModuleById(ModuleConstants.AlertModuleId);
|
|
9
9
|
const alerts = useSelector((state) => state.Internal.AdaptableAlerts);
|
|
10
|
+
// map the suspended property from the underlying AlertDefinitions
|
|
11
|
+
alerts.forEach((alert) => {
|
|
12
|
+
const liveAlertDef = adaptable.api.alertApi.getAlertDefinitionById(alert.alertDefinition.Uuid);
|
|
13
|
+
if (liveAlertDef) {
|
|
14
|
+
// @ts-ignore theoretically AdaptableAlert is not Suspendable; practically <AdaptableObjectCompactList> expects it
|
|
15
|
+
alert.IsSuspended = liveAlertDef.IsSuspended;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
10
18
|
return React.createElement(AdaptableObjectCompactList, { abObjects: alerts, module: filterModule });
|
|
11
19
|
};
|
|
@@ -2,10 +2,11 @@ import * as React from 'react';
|
|
|
2
2
|
import { connect } from 'react-redux';
|
|
3
3
|
import * as InternalRedux from '../../Redux/ActionsReducers/InternalRedux';
|
|
4
4
|
import { AdaptablePopover } from '../AdaptablePopover';
|
|
5
|
-
import UIHelper from '../UIHelper';
|
|
6
5
|
import { getAlertButtonStyle } from './Utilities/getAlertButtonStyle';
|
|
7
6
|
import { ActiveAlertsPanel } from './ActiveAlertsPanel';
|
|
8
7
|
import { Flex } from '../../components/Flex';
|
|
8
|
+
import { ButtonClear } from '../Components/Buttons/ButtonClear';
|
|
9
|
+
import clsx from 'clsx';
|
|
9
10
|
class AlertViewPanelComponent extends React.Component {
|
|
10
11
|
constructor(props) {
|
|
11
12
|
super(props);
|
|
@@ -20,7 +21,6 @@ class AlertViewPanelComponent extends React.Component {
|
|
|
20
21
|
}
|
|
21
22
|
}
|
|
22
23
|
render() {
|
|
23
|
-
const messageType = UIHelper.getMessageTypeFromAdaptableAlerts(this.props.AdaptableAlerts);
|
|
24
24
|
const { color: buttonTextColor, background: buttonBackground } = getAlertButtonStyle(this.props.AdaptableAlerts);
|
|
25
25
|
const collapsedText = this.props.AdaptableAlerts.length == 0
|
|
26
26
|
? '0 Alerts'
|
|
@@ -28,13 +28,17 @@ class AlertViewPanelComponent extends React.Component {
|
|
|
28
28
|
? '1 Alert'
|
|
29
29
|
: this.props.AdaptableAlerts.length + ' Alerts';
|
|
30
30
|
const alertsPanel = React.createElement(ActiveAlertsPanel, null);
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
const isToolbar = this.props.viewType === 'Toolbar';
|
|
32
|
+
const elementType = isToolbar ? 'DashboardToolbar' : 'ToolPanel';
|
|
33
|
+
return (React.createElement(Flex, { alignItems: "stretch", className: clsx(`ab-${elementType}__Alert__wrap twa:gap-1`, {
|
|
34
|
+
'twa:min-w-[140px] twa:w-[140px]': isToolbar,
|
|
35
|
+
[`twa:flex-1`]: !isToolbar,
|
|
36
|
+
}) },
|
|
37
|
+
React.createElement(Flex, { key: `${buttonTextColor}_${buttonBackground}_${collapsedText}`, className: `ab-${elementType}__Alert__text twa:flex-1 twa:rounded-standard twa:p-2 text-2 twa:items-center twa:justify-center twa:min-h-input`, style: { color: buttonTextColor, backgroundColor: buttonBackground } }, collapsedText),
|
|
38
|
+
this.props.AdaptableAlerts.length > 0 && (React.createElement(Flex, { className: 'twa:gap-1' },
|
|
39
|
+
React.createElement(Flex, { className: "twa:flex twa:box-border" },
|
|
40
|
+
React.createElement(ButtonClear, { "aria-label": 'Clear All Alerts', variant: 'outlined', className: `ab-${elementType}__Alert__clear`, onClick: () => this.props.onDeleteAllAlert(this.state.Alerts), tooltip: "Clear All Alerts", showText: this.props.viewType === 'ToolPanel' }, 'Clear Alerts')),
|
|
41
|
+
React.createElement(AdaptablePopover, { className: `ab-${elementType}__Alert__info`, headerText: "Alerts Details", bodyText: [alertsPanel], MessageType: 'Info', useButton: true, showEvent: 'focus', hideEvent: "blur", popoverMinWidth: 400 })))));
|
|
38
42
|
}
|
|
39
43
|
}
|
|
40
44
|
function mapStateToProps(state, ownProps) {
|
|
@@ -4,8 +4,16 @@ export const getAlertButtonStyle = (alerts) => {
|
|
|
4
4
|
const messageTypeColor = UIHelper.getColorByMessageType(messageType);
|
|
5
5
|
const buttonBackground = UIHelper.getButtonColourForAdaptableAlerts(alerts, messageTypeColor);
|
|
6
6
|
const buttonTextColor = UIHelper.getButtonTextColourForArrayandMessageType(alerts, messageType);
|
|
7
|
+
let cssClasses = '';
|
|
8
|
+
if (alerts?.length) {
|
|
9
|
+
const cssMessageType = UIHelper.getCSSColorByMessageType(messageType);
|
|
10
|
+
cssClasses = cssMessageType
|
|
11
|
+
? `twa:bg-${cssMessageType} twa:text-text-on-${cssMessageType}`
|
|
12
|
+
: '';
|
|
13
|
+
}
|
|
7
14
|
return {
|
|
8
15
|
color: buttonTextColor,
|
|
9
16
|
background: buttonBackground,
|
|
17
|
+
cssClasses,
|
|
10
18
|
};
|
|
11
19
|
};
|
|
@@ -6,6 +6,7 @@ import { AlertType } from './getAlertType';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare const getDefaultAlertDefinition: (alertDefinition: AlertDefinition, type: AlertType) => {
|
|
8
8
|
Uuid: string;
|
|
9
|
+
Name: string;
|
|
9
10
|
Scope: import("../../../types").ColumnScope;
|
|
10
11
|
Rule: import("../../../types").AlertRule;
|
|
11
12
|
MessageType: import("../../../types").AdaptableMessageType;
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AlertType } from '../Utilities/getAlertType';
|
|
3
|
+
import { AdaptableApi, AlertDefinition } from '../../../types';
|
|
4
|
+
export declare const isSettingsValid: (data: AlertDefinition, api: AdaptableApi) => true | "Name is required" | "An Alert already exists with that name";
|
|
3
5
|
export declare const renderAlertTypeSummary: (alertType: AlertType) => React.JSX.Element;
|
|
4
|
-
type
|
|
6
|
+
type AlertTypeWizardSectionProps = {
|
|
5
7
|
onAlertTypeChange: (alertType: AlertType) => void;
|
|
6
8
|
alertType: AlertType | null;
|
|
9
|
+
onChange: (data: AlertDefinition) => void;
|
|
7
10
|
};
|
|
8
|
-
export declare const AlertTypeWizardSection: (props:
|
|
11
|
+
export declare const AlertTypeWizardSection: (props: AlertTypeWizardSectionProps) => React.JSX.Element;
|
|
9
12
|
export {};
|
|
@@ -3,20 +3,55 @@ import { Tabs } from '../../../components/Tabs';
|
|
|
3
3
|
import { AlertType, getAlertTypeText } from '../Utilities/getAlertType';
|
|
4
4
|
import { TypeRadio } from '../../Wizard/TypeRadio';
|
|
5
5
|
import { Tag } from '../../../components/Tag';
|
|
6
|
-
import {
|
|
6
|
+
import { Flex } from '../../../components/Flex';
|
|
7
|
+
import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableWizard';
|
|
8
|
+
import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
9
|
+
import Input from '../../../components/Input';
|
|
10
|
+
import { SummaryText } from '../../Wizard/OnePageAdaptableWizard';
|
|
11
|
+
export const isSettingsValid = (data, api) => {
|
|
12
|
+
if (!data.Name?.trim()) {
|
|
13
|
+
return 'Name is required';
|
|
14
|
+
}
|
|
15
|
+
const allAlerts = api.alertApi.getAlertDefinitions();
|
|
16
|
+
const isDuplicateName = allAlerts.some((a) => a.Name === data.Name && a.Uuid !== data.Uuid);
|
|
17
|
+
if (isDuplicateName) {
|
|
18
|
+
return 'An Alert already exists with that name';
|
|
19
|
+
}
|
|
20
|
+
return true;
|
|
21
|
+
};
|
|
7
22
|
export const renderAlertTypeSummary = (alertType) => {
|
|
23
|
+
const { data } = useOnePageAdaptableWizardContext();
|
|
8
24
|
const text = getAlertTypeText(alertType);
|
|
9
|
-
return (React.createElement(
|
|
10
|
-
React.createElement(
|
|
25
|
+
return (React.createElement(React.Fragment, null,
|
|
26
|
+
React.createElement(SummaryText, null,
|
|
27
|
+
"Name ",
|
|
28
|
+
React.createElement(Tag, null, data.Name || 'Not specified')),
|
|
29
|
+
React.createElement(SummaryText, null,
|
|
30
|
+
"Type ",
|
|
31
|
+
React.createElement(Tag, null, text))));
|
|
11
32
|
};
|
|
12
33
|
export const AlertTypeWizardSection = (props) => {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
const { data } = useOnePageAdaptableWizardContext();
|
|
35
|
+
const handleNameChange = (event) => {
|
|
36
|
+
props.onChange({
|
|
37
|
+
...data,
|
|
38
|
+
Name: event.target.value,
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return (React.createElement(Flex, { flexDirection: "column" },
|
|
42
|
+
React.createElement(Tabs, null,
|
|
43
|
+
React.createElement(Tabs.Tab, null, "Settings"),
|
|
44
|
+
React.createElement(Tabs.Content, null,
|
|
45
|
+
React.createElement(FormLayout, null,
|
|
46
|
+
React.createElement(FormRow, { label: "Name" },
|
|
47
|
+
React.createElement(Input, { "data-name": "alert-name", className: "twa:flex-1 twa:max-w-[200px] twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' }))))),
|
|
48
|
+
React.createElement(Tabs, { className: "twa:mt-2" },
|
|
49
|
+
React.createElement(Tabs.Tab, null, "Alert Type"),
|
|
50
|
+
React.createElement(Tabs.Content, null,
|
|
51
|
+
React.createElement(Flex, { flexDirection: "column" },
|
|
52
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.DataChange), description: "A change has been made to the Grid's underlying data", checked: props.alertType === AlertType.DataChange, onClick: () => props.onAlertTypeChange(AlertType.DataChange) }),
|
|
53
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.RowChange), description: "A Row was added or removed from the data source", checked: props.alertType === AlertType.RowChange, onClick: () => props.onAlertTypeChange(AlertType.RowChange) }),
|
|
54
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Aggregation), description: "A change has been made to aggregated data (i.e. from multiple Rows)", onClick: () => props.onAlertTypeChange(AlertType.Aggregation), checked: props.alertType === AlertType.Aggregation }),
|
|
55
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Observable), description: "A specified change (or lack of change) over time has been observed in the Grid", onClick: () => props.onAlertTypeChange(AlertType.Observable), checked: props.alertType === AlertType.Observable }),
|
|
56
|
+
React.createElement(TypeRadio, { text: getAlertTypeText(AlertType.Validation), description: "A change has broken a data validation rule", checked: props.alertType === AlertType.Validation, onClick: () => props.onAlertTypeChange(AlertType.Validation) }))))));
|
|
22
57
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { useState } from 'react';
|
|
2
|
+
import { useState, useCallback } from 'react';
|
|
3
3
|
import { OnePageAdaptableWizard, OnePageWizardSummary } from '../../Wizard/OnePageAdaptableWizard';
|
|
4
4
|
import { cloneObject } from '../../../Utilities/Helpers/Helper';
|
|
5
5
|
import { AlertScopeWizardSection } from './AlertScopeWizardSection';
|
|
@@ -15,7 +15,7 @@ import { useDispatch } from 'react-redux';
|
|
|
15
15
|
import * as AlertRedux from '../../../Redux/ActionsReducers/AlertRedux';
|
|
16
16
|
import { useAdaptable } from '../../AdaptableContext';
|
|
17
17
|
import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
|
|
18
|
-
import { AlertTypeWizardSection, renderAlertTypeSummary } from './AlertTypeWizardSection';
|
|
18
|
+
import { AlertTypeWizardSection, renderAlertTypeSummary, isSettingsValid, } from './AlertTypeWizardSection';
|
|
19
19
|
import { AlertType, getAlertType } from '../Utilities/getAlertType';
|
|
20
20
|
import { mapAlertDefinition } from '../Utilities/mapAlertDefinition';
|
|
21
21
|
import { getDefaultAlertDefinition } from '../Utilities/getDefaultAlertDefinition';
|
|
@@ -25,7 +25,7 @@ export const AlertWizard = (props) => {
|
|
|
25
25
|
const { api } = useAdaptable();
|
|
26
26
|
const dispatch = useDispatch();
|
|
27
27
|
const behaviourSpelling = api.internalApi.getCorrectEnglishVariant('Behaviour');
|
|
28
|
-
const [alertDefinition,
|
|
28
|
+
const [alertDefinition, doSetAlertDefinition] = useState(() => {
|
|
29
29
|
const alertDefinition = props.data
|
|
30
30
|
? cloneObject(props.data)
|
|
31
31
|
: ObjectFactory.CreateEmptyAlertDefinition();
|
|
@@ -45,6 +45,9 @@ export const AlertWizard = (props) => {
|
|
|
45
45
|
alertDefinition.MessageType = alertDefinition.MessageType ?? ALERT_DEFAULT_MESSAGE_TYPE;
|
|
46
46
|
return alertDefinition;
|
|
47
47
|
});
|
|
48
|
+
const setAlertDefinition = useCallback((data) => {
|
|
49
|
+
doSetAlertDefinition(data);
|
|
50
|
+
}, []);
|
|
48
51
|
// Alert type is based initialy on data, but can be changed by the user
|
|
49
52
|
// the default objects do not neccesary have enough information to determine the type
|
|
50
53
|
const [alertType, setAlertType] = useState(() => {
|
|
@@ -59,22 +62,23 @@ export const AlertWizard = (props) => {
|
|
|
59
62
|
}
|
|
60
63
|
props.onCloseWizard();
|
|
61
64
|
};
|
|
62
|
-
const updateAlertDefinition = (newAlertDefinition) => {
|
|
63
|
-
|
|
64
|
-
};
|
|
65
|
+
const updateAlertDefinition = useCallback((newAlertDefinition) => {
|
|
66
|
+
doSetAlertDefinition(mapAlertDefinition(api, newAlertDefinition));
|
|
67
|
+
}, [api]);
|
|
65
68
|
const handleAlertTypeChange = (newAlertType) => {
|
|
66
69
|
setAlertType(newAlertType);
|
|
67
|
-
|
|
70
|
+
doSetAlertDefinition(getDefaultAlertDefinition(alertDefinition, newAlertType));
|
|
68
71
|
};
|
|
69
72
|
return (React.createElement(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, modal: props.modal, data: alertDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
70
73
|
{
|
|
71
|
-
title: 'Type',
|
|
74
|
+
title: 'Name & Type',
|
|
75
|
+
isValid: isSettingsValid,
|
|
72
76
|
details: (React.createElement(React.Fragment, null,
|
|
73
|
-
"
|
|
77
|
+
"Enter Name and select ",
|
|
74
78
|
React.createElement("b", null, "what"),
|
|
75
79
|
" type of change in AdapTable will cause the Alert to fire")),
|
|
76
80
|
render: () => (React.createElement(Box, { className: "twa:p-2" },
|
|
77
|
-
React.createElement(AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange }))),
|
|
81
|
+
React.createElement(AlertTypeWizardSection, { alertType: alertType, onAlertTypeChange: handleAlertTypeChange, onChange: setAlertDefinition }))),
|
|
78
82
|
renderSummary: () => renderAlertTypeSummary(alertType),
|
|
79
83
|
},
|
|
80
84
|
{
|