@adaptabletools/adaptable 22.0.0-canary.0 → 22.0.0-canary.10
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/README.md +4 -6
- 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 +10 -1
- 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 +29 -4
- 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 +10 -1
- package/src/Api/Implementation/GridApiImpl.js +36 -5
- 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 +121 -64
- 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 +18 -17
- package/src/Utilities/Constants/DocumentationLinkConstants.js +18 -17
- 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 +39 -41
- 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 +16 -3
- package/src/agGrid/AdaptableAgGrid.js +306 -103
- 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
|
@@ -5,72 +5,153 @@ import { useAdaptable } from '../AdaptableContext';
|
|
|
5
5
|
import { ColumnSelector } from '../Components/Selectors/ColumnSelector';
|
|
6
6
|
import { AdaptableAgGrid } from '../../agGrid/AdaptableAgGrid';
|
|
7
7
|
import { Box, Flex } from '../../components/Flex';
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
import { ExportModuleId } from '../../Utilities/Constants/ModuleConstants';
|
|
9
|
+
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
10
|
+
const ADAPTABLE_CONTAINER_ID = 'transposed-adaptable-container';
|
|
11
|
+
const AG_GRID_CONTAINER_ID = 'transposed-adaptable-ag-grid-container';
|
|
12
|
+
/** Field used for the first column in transposed grid (hidden, holds column id). */
|
|
13
|
+
const TRANSPOSED_FIRST_COLUMN_FIELD = '_transposed_column_value';
|
|
14
|
+
/** Header used for the first visible column in transposed grid (shows friendly name). */
|
|
15
|
+
const TRANSPOSED_FIRST_COLUMN_HEADER = '_transposed_column_header';
|
|
16
|
+
function buildTransposedAdaptableOptions({ hostOptions, transposedRowsAndColumns, currentTheme, }) {
|
|
17
|
+
return {
|
|
18
|
+
primaryKey: TRANSPOSED_FIRST_COLUMN_FIELD,
|
|
19
|
+
licenseKey: hostOptions.licenseKey,
|
|
20
|
+
userName: `${hostOptions.userName}`,
|
|
21
|
+
adaptableId: `${hostOptions.adaptableId}::TransposedView`,
|
|
22
|
+
containerOptions: {
|
|
23
|
+
adaptableContainer: ADAPTABLE_CONTAINER_ID,
|
|
24
|
+
agGridContainer: AG_GRID_CONTAINER_ID,
|
|
25
|
+
},
|
|
26
|
+
entitlementOptions: { defaultAccessLevel: 'Hidden' },
|
|
27
|
+
initialState: {
|
|
28
|
+
Layout: {
|
|
29
|
+
Revision: Date.now(),
|
|
30
|
+
CurrentLayout: 'TransposedView',
|
|
31
|
+
Layouts: [
|
|
32
|
+
{
|
|
33
|
+
Name: 'TransposedView',
|
|
34
|
+
TableColumns: [
|
|
35
|
+
TRANSPOSED_FIRST_COLUMN_HEADER,
|
|
36
|
+
...transposedRowsAndColumns.transposedColumns.map((c) => c.colId),
|
|
37
|
+
],
|
|
38
|
+
ColumnPinning: { [TRANSPOSED_FIRST_COLUMN_HEADER]: 'left' },
|
|
39
|
+
AutoSizeColumns: true,
|
|
40
|
+
},
|
|
41
|
+
],
|
|
42
|
+
},
|
|
43
|
+
Theme: { CurrentTheme: currentTheme },
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
function buildTransposedGridOptions({ transposedRowsAndColumns, elevatedColumnId, adaptableApi, }) {
|
|
48
|
+
const firstColumn = {
|
|
49
|
+
field: TRANSPOSED_FIRST_COLUMN_HEADER,
|
|
50
|
+
headerName: adaptableApi.columnApi.getFriendlyNameForColumnId(elevatedColumnId),
|
|
51
|
+
};
|
|
52
|
+
return {
|
|
53
|
+
loading: false,
|
|
54
|
+
defaultColDef: {
|
|
55
|
+
floatingFilter: false,
|
|
56
|
+
filter: false,
|
|
57
|
+
sortable: true,
|
|
58
|
+
resizable: true,
|
|
59
|
+
enableRowGroup: false,
|
|
60
|
+
editable: false,
|
|
61
|
+
enablePivot: false,
|
|
62
|
+
enableValue: false,
|
|
63
|
+
lockPinned: true,
|
|
64
|
+
menuTabs: [],
|
|
65
|
+
width: 120,
|
|
66
|
+
},
|
|
67
|
+
columnDefs: [
|
|
68
|
+
{ field: TRANSPOSED_FIRST_COLUMN_FIELD, hide: true },
|
|
69
|
+
firstColumn,
|
|
70
|
+
...transposedRowsAndColumns.transposedColumns.map((col) => ({ field: col.colId, headerName: col.header })),
|
|
71
|
+
],
|
|
72
|
+
rowData: transposedRowsAndColumns.transposedRows,
|
|
73
|
+
sideBar: false,
|
|
74
|
+
};
|
|
75
|
+
}
|
|
10
76
|
export const TransposedPopup = (props) => {
|
|
11
77
|
const adaptable = useAdaptable();
|
|
12
|
-
const { transposedColumnId, hideTransposedColumn, visibleColumns, visibleRows, autosize } = props.popupProps;
|
|
13
|
-
const rowNodes = React.useMemo(() => {
|
|
14
|
-
return props.popupProps.visibleRows
|
|
15
|
-
? adaptable.api.gridApi.getVisibleRowNodes()
|
|
16
|
-
: adaptable.api.gridApi.getAllRowNodes();
|
|
17
|
-
}, [
|
|
18
|
-
// can be later triggered by tickng data
|
|
19
|
-
]);
|
|
20
78
|
const primaryKey = adaptable.api.optionsApi.getPrimaryKey();
|
|
21
|
-
const
|
|
22
|
-
const
|
|
79
|
+
const rawConfig = (props.popupProps ?? {});
|
|
80
|
+
const transposeConfig = {
|
|
81
|
+
transposedColumnId: rawConfig.transposedColumnId ?? primaryKey,
|
|
82
|
+
hideTransposedColumn: rawConfig.hideTransposedColumn ?? true,
|
|
83
|
+
autosize: rawConfig.autosize ?? true,
|
|
84
|
+
columnsToTranspose: rawConfig.columnsToTranspose,
|
|
85
|
+
rowsToTranspose: rawConfig.rowsToTranspose,
|
|
86
|
+
};
|
|
87
|
+
const rowNodes = React.useMemo(() => {
|
|
88
|
+
let transposableRowNodes = [];
|
|
89
|
+
const rowsToTranspose = transposeConfig.rowsToTranspose;
|
|
90
|
+
if (rowsToTranspose === 'VisibleOnly') {
|
|
91
|
+
return adaptable.api.gridApi.getVisibleRowNodes();
|
|
92
|
+
}
|
|
93
|
+
if (rowsToTranspose === 'All') {
|
|
94
|
+
return adaptable.api.gridApi.getAllRowNodes();
|
|
95
|
+
}
|
|
96
|
+
if (StringExtensions.IsNotNullOrEmpty(rowsToTranspose)) {
|
|
97
|
+
adaptable.api.gridApi.getAllRowNodes().forEach((rn) => {
|
|
98
|
+
const shouldTransposeRow = adaptable.api.internalApi
|
|
99
|
+
.getQueryLanguageService()
|
|
100
|
+
.evaluateBooleanExpression(rowsToTranspose, ExportModuleId, rn);
|
|
101
|
+
if (shouldTransposeRow) {
|
|
102
|
+
transposableRowNodes.push(rn);
|
|
103
|
+
}
|
|
104
|
+
});
|
|
105
|
+
return transposableRowNodes;
|
|
106
|
+
}
|
|
107
|
+
return adaptable.api.gridApi.getAllRowNodes();
|
|
108
|
+
}, [transposeConfig.rowsToTranspose, adaptable.api]);
|
|
109
|
+
const [elevatedColumnId, setElevatedColumnIdState] = React.useState(() => transposeConfig.transposedColumnId ?? primaryKey);
|
|
110
|
+
const setElevatedColumnId = (newElevatedColumnId) => {
|
|
23
111
|
transposedAdaptableApiRef.current?.destroy({ unmount: true, destroyAgGrid: true });
|
|
24
|
-
|
|
112
|
+
setElevatedColumnIdState(newElevatedColumnId);
|
|
25
113
|
};
|
|
26
114
|
const transposedAdaptableApiRef = React.useRef(null);
|
|
27
115
|
const columns = React.useMemo(() => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
116
|
+
const allUIColumns = adaptable.api.columnApi.getUIAvailableColumns();
|
|
117
|
+
const columnsToTranspose = transposeConfig.columnsToTranspose;
|
|
118
|
+
if (!columnsToTranspose) {
|
|
119
|
+
return allUIColumns;
|
|
120
|
+
}
|
|
121
|
+
const columnIds = typeof columnsToTranspose === 'function'
|
|
122
|
+
? columnsToTranspose({
|
|
123
|
+
...adaptable.api.internalApi.buildBaseContext(),
|
|
124
|
+
columns: allUIColumns,
|
|
125
|
+
})
|
|
126
|
+
: columnsToTranspose;
|
|
127
|
+
return columnIds
|
|
128
|
+
.map((c) => adaptable.api.columnApi.getColumnWithColumnId(c))
|
|
129
|
+
.filter((col) => col != null);
|
|
130
|
+
}, [transposeConfig.columnsToTranspose, adaptable.api]);
|
|
33
131
|
/**
|
|
34
|
-
*
|
|
132
|
+
* Build transposed structure: original rows become columns (colId = primaryKey value),
|
|
133
|
+
* original columns become rows. Each transposed row has the column id/header plus
|
|
134
|
+
* one cell per original row keyed by primaryKey value.
|
|
35
135
|
*/
|
|
36
|
-
const transposedFirstColumnField = '_transposed_column_value';
|
|
37
|
-
const transposedFirstColumnHeader = '_transposed_column_header';
|
|
38
136
|
const transposedRowsAndColumns = React.useMemo(() => {
|
|
39
|
-
/**
|
|
40
|
-
* transposed column values become primaryKey of the new tarnsposed rows
|
|
41
|
-
* we build row by row, might be easer
|
|
42
|
-
*/
|
|
43
137
|
const transposedColumns = [];
|
|
44
138
|
const transposedRows = [];
|
|
45
139
|
for (const row of rowNodes) {
|
|
46
|
-
// we force the col-ids to be strings, easer to work with
|
|
47
|
-
//row[transposeByColumnId] + '';
|
|
48
140
|
const colId = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey) + '';
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
'';
|
|
52
|
-
transposedColumns.push({
|
|
53
|
-
colId,
|
|
54
|
-
header,
|
|
55
|
-
});
|
|
141
|
+
const header = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, elevatedColumnId) + '';
|
|
142
|
+
transposedColumns.push({ colId, header });
|
|
56
143
|
}
|
|
57
144
|
for (const column of columns) {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*/
|
|
61
|
-
if (hideTransposedColumn && column.columnId === syntheticTransposedByColumnId) {
|
|
145
|
+
if (transposeConfig.hideTransposedColumn &&
|
|
146
|
+
column.columnId === elevatedColumnId) {
|
|
62
147
|
continue;
|
|
63
148
|
}
|
|
64
149
|
const transposedRow = {
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
[transposedFirstColumnField]: column.columnId,
|
|
68
|
-
[transposedFirstColumnHeader]: column.friendlyName,
|
|
150
|
+
[TRANSPOSED_FIRST_COLUMN_FIELD]: column.columnId,
|
|
151
|
+
[TRANSPOSED_FIRST_COLUMN_HEADER]: column.friendlyName,
|
|
69
152
|
};
|
|
70
|
-
for (
|
|
71
|
-
// [transposed-by-column-value[n]]: [other column value[n]]
|
|
153
|
+
for (const row of rowNodes) {
|
|
72
154
|
const key = adaptable.api.gridApi.getNormalisedValueFromRowNode(row, primaryKey);
|
|
73
|
-
// row[column.field]
|
|
74
155
|
let value = adaptable.api.gridApi.getDisplayValueFromRowNode(row, column.columnId);
|
|
75
156
|
if (value instanceof Date) {
|
|
76
157
|
value = value.toLocaleString();
|
|
@@ -79,90 +160,25 @@ export const TransposedPopup = (props) => {
|
|
|
79
160
|
}
|
|
80
161
|
transposedRows.push(transposedRow);
|
|
81
162
|
}
|
|
82
|
-
return {
|
|
83
|
-
|
|
84
|
-
transposedRows,
|
|
85
|
-
};
|
|
86
|
-
}, [rowNodes, primaryKey, syntheticTransposedByColumnId]);
|
|
163
|
+
return { transposedColumns, transposedRows };
|
|
164
|
+
}, [rowNodes, primaryKey, elevatedColumnId, columns, transposeConfig.hideTransposedColumn, adaptable.api]);
|
|
87
165
|
React.useEffect(() => {
|
|
88
|
-
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
entitlementOptions: {
|
|
100
|
-
defaultAccessLevel: 'Hidden',
|
|
101
|
-
},
|
|
102
|
-
initialState: {
|
|
103
|
-
Layout: {
|
|
104
|
-
Revision: Date.now(),
|
|
105
|
-
CurrentLayout: 'TransposedView',
|
|
106
|
-
Layouts: [
|
|
107
|
-
{
|
|
108
|
-
Name: 'TransposedView',
|
|
109
|
-
TableColumns: [
|
|
110
|
-
transposedFirstColumnHeader,
|
|
111
|
-
...transposedRowsAndColumns.transposedColumns.map((c) => c.colId),
|
|
112
|
-
],
|
|
113
|
-
ColumnPinning: {
|
|
114
|
-
[transposedFirstColumnHeader]: 'left',
|
|
115
|
-
},
|
|
116
|
-
AutoSizeColumns: true,
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
},
|
|
120
|
-
Theme: {
|
|
121
|
-
CurrentTheme: adaptable.api.themeApi.getCurrentTheme(),
|
|
122
|
-
},
|
|
123
|
-
},
|
|
124
|
-
};
|
|
125
|
-
const firstColumn = {
|
|
126
|
-
field: transposedFirstColumnHeader, // use the column friendly name
|
|
127
|
-
headerName: adaptable.api.columnApi.getFriendlyNameForColumnId(syntheticTransposedByColumnId),
|
|
128
|
-
};
|
|
129
|
-
const agGridOptions = {
|
|
130
|
-
loading: false,
|
|
131
|
-
defaultColDef: {
|
|
132
|
-
floatingFilter: false,
|
|
133
|
-
filter: false,
|
|
134
|
-
sortable: true,
|
|
135
|
-
resizable: true,
|
|
136
|
-
enableRowGroup: false,
|
|
137
|
-
editable: false,
|
|
138
|
-
enablePivot: false,
|
|
139
|
-
enableValue: false,
|
|
140
|
-
lockPinned: true,
|
|
141
|
-
menuTabs: [],
|
|
142
|
-
width: 120,
|
|
143
|
-
},
|
|
144
|
-
columnDefs: [
|
|
145
|
-
{
|
|
146
|
-
field: transposedFirstColumnField,
|
|
147
|
-
hide: true,
|
|
148
|
-
},
|
|
149
|
-
firstColumn,
|
|
150
|
-
...transposedRowsAndColumns.transposedColumns.map((col) => {
|
|
151
|
-
return {
|
|
152
|
-
field: col.colId,
|
|
153
|
-
type: null,
|
|
154
|
-
headerName: col.header,
|
|
155
|
-
};
|
|
156
|
-
}),
|
|
157
|
-
],
|
|
158
|
-
rowData: transposedRowsAndColumns.transposedRows,
|
|
159
|
-
sideBar: false,
|
|
160
|
-
};
|
|
166
|
+
const hostOptions = adaptable.adaptableOptions;
|
|
167
|
+
const adaptableOptions = buildTransposedAdaptableOptions({
|
|
168
|
+
hostOptions,
|
|
169
|
+
transposedRowsAndColumns,
|
|
170
|
+
currentTheme: adaptable.api.themeApi.getCurrentTheme(),
|
|
171
|
+
});
|
|
172
|
+
const gridOptions = buildTransposedGridOptions({
|
|
173
|
+
transposedRowsAndColumns,
|
|
174
|
+
elevatedColumnId,
|
|
175
|
+
adaptableApi: adaptable.api,
|
|
176
|
+
});
|
|
161
177
|
const modules = adaptable.agGridModulesAdapter.getAgGridRegisteredModules();
|
|
162
178
|
AdaptableAgGrid._initInternal({
|
|
163
179
|
variant: 'vanilla',
|
|
164
180
|
adaptableOptions,
|
|
165
|
-
gridOptions
|
|
181
|
+
gridOptions,
|
|
166
182
|
modules,
|
|
167
183
|
}).then((adaptableApi) => {
|
|
168
184
|
transposedAdaptableApiRef.current = adaptableApi;
|
|
@@ -170,30 +186,20 @@ export const TransposedPopup = (props) => {
|
|
|
170
186
|
transposedAdaptableApiRef.current?.themeApi.loadTheme(typeof event.theme === 'object' ? event.theme.Name : event.theme);
|
|
171
187
|
});
|
|
172
188
|
});
|
|
173
|
-
}, [
|
|
189
|
+
}, [elevatedColumnId, adaptable]);
|
|
174
190
|
React.useEffect(() => {
|
|
175
|
-
// destroy when closing the popup
|
|
176
191
|
return () => {
|
|
177
192
|
requestAnimationFrame(() => {
|
|
178
193
|
transposedAdaptableApiRef.current?.destroy({ unmount: true, destroyAgGrid: true });
|
|
179
194
|
});
|
|
180
195
|
};
|
|
181
196
|
}, []);
|
|
182
|
-
/**
|
|
183
|
-
* Need to get all data, manualy pivot the grid using the primary key.
|
|
184
|
-
*
|
|
185
|
-
* 1. get the data, and pivot using the primary key
|
|
186
|
-
* 2. create the col definitios, a col definition for each row
|
|
187
|
-
* 3. create the grid
|
|
188
|
-
*/
|
|
189
197
|
return (React.createElement(Flex, { flexDirection: "column", className: "twa:w-full twa:h-full" },
|
|
190
198
|
React.createElement(Panel, null,
|
|
191
199
|
React.createElement(FormLayout, null,
|
|
192
200
|
React.createElement(FormRow, { label: "Elevated Column" },
|
|
193
|
-
React.createElement(ColumnSelector, { value:
|
|
194
|
-
setSyntheticTransposedByColumnId(colId);
|
|
195
|
-
} })))),
|
|
201
|
+
React.createElement(ColumnSelector, { value: elevatedColumnId, onChange: setElevatedColumnId })))),
|
|
196
202
|
React.createElement(Flex, { className: "twa:h-full" },
|
|
197
|
-
React.createElement(Box, { id:
|
|
198
|
-
React.createElement(Box, { className: "twa:h-full twa:w-full", id:
|
|
203
|
+
React.createElement(Box, { id: ADAPTABLE_CONTAINER_ID }),
|
|
204
|
+
React.createElement(Box, { className: "twa:h-full twa:w-full", id: AG_GRID_CONTAINER_ID }))));
|
|
199
205
|
};
|
|
@@ -19,7 +19,7 @@ export const isAggregationsSectionValid = (data) => {
|
|
|
19
19
|
AggFunc.type === 'weightedAverage')?.AggFunc
|
|
20
20
|
: null;
|
|
21
21
|
if (weightedAvg && !weightedAvg.weightedColumnId) {
|
|
22
|
-
return '
|
|
22
|
+
return 'Weighted Average requires a weight column to be selected.';
|
|
23
23
|
}
|
|
24
24
|
return true;
|
|
25
25
|
};
|
|
@@ -13,7 +13,7 @@ import { Box } from '../../../../components/Flex';
|
|
|
13
13
|
export const isColumnFiltersValid = (layout) => {
|
|
14
14
|
const invalidColumnFilters = (layout.ColumnFilters ?? [])?.filter((columnFilter) => !columnFilter?.Predicates[0]?.PredicateId);
|
|
15
15
|
if (invalidColumnFilters.length > 0) {
|
|
16
|
-
return 'Please select a
|
|
16
|
+
return 'Please select a predicate for each column filter.';
|
|
17
17
|
}
|
|
18
18
|
return true;
|
|
19
19
|
};
|
|
@@ -13,7 +13,7 @@ export const isGridFiltersValid = (layout, api) => {
|
|
|
13
13
|
return true;
|
|
14
14
|
}
|
|
15
15
|
return (api.internalApi.getQueryLanguageService().validateBoolean(expression, GridFilterModuleId)
|
|
16
|
-
.isValid || '
|
|
16
|
+
.isValid || 'The expression is not valid.');
|
|
17
17
|
};
|
|
18
18
|
export const GridFilterSectionSummary = () => {
|
|
19
19
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
@@ -216,7 +216,7 @@ export const isPivotAggregationsSectionValid = (data) => {
|
|
|
216
216
|
.find((agg) => typeof agg === 'object' && agg.type === 'weightedAverage')
|
|
217
217
|
: null;
|
|
218
218
|
if (weightedAvg && !weightedAvg.weightedColumnId) {
|
|
219
|
-
return '
|
|
219
|
+
return 'Weighted Average requires a weight column to be selected.';
|
|
220
220
|
}
|
|
221
221
|
return true;
|
|
222
222
|
};
|
|
@@ -303,12 +303,12 @@ export const PivotAggregationsSection = (props) => {
|
|
|
303
303
|
}
|
|
304
304
|
const firstAggFuncName = getAggFuncName(aggregationColumns[0].AggFunc);
|
|
305
305
|
if (layout.PivotAggregationColumns?.some((aggCol) => getAggFuncName(aggCol.AggFunc) !== firstAggFuncName)) {
|
|
306
|
-
return '
|
|
306
|
+
return 'All columns must use the same aggregation function.';
|
|
307
307
|
}
|
|
308
308
|
// check that no Aggregation Total Column is enabled
|
|
309
309
|
const hasAggregationTotalColumn = aggregationColumns.some((aggCol) => aggCol.Total !== false && aggCol.Total != null);
|
|
310
310
|
if (hasAggregationTotalColumn) {
|
|
311
|
-
return '
|
|
311
|
+
return 'This option is not available when an Aggregation Total Column is present.';
|
|
312
312
|
}
|
|
313
313
|
return true;
|
|
314
314
|
};
|
|
@@ -7,6 +7,7 @@ import { useOnePageAdaptableWizardContext } from '../../../Wizard/OnePageAdaptab
|
|
|
7
7
|
import { columnFilter } from './Utilities';
|
|
8
8
|
import ArrayExtensions from '../../../../Utilities/Extensions/ArrayExtensions';
|
|
9
9
|
import { Box } from '../../../../components/Flex';
|
|
10
|
+
import { CheckBox } from '../../../../components/CheckBox';
|
|
10
11
|
export const PivotColumnsSectionSummary = () => {
|
|
11
12
|
const adaptable = useAdaptable();
|
|
12
13
|
const { data: layout } = useOnePageAdaptableWizardContext();
|
|
@@ -28,5 +29,12 @@ export const PivotColumnsSection = (props) => {
|
|
|
28
29
|
return (React.createElement(Tabs, { className: "twa:h-full" },
|
|
29
30
|
React.createElement(Tabs.Tab, null, "Pivot Columns"),
|
|
30
31
|
React.createElement(Tabs.Content, null,
|
|
32
|
+
React.createElement(Box, { className: "twa:mb-3 twa:px-2" },
|
|
33
|
+
React.createElement(CheckBox, { checked: !!layout.PivotResultColumnsOrder, onChange: (checked) => {
|
|
34
|
+
props.onChange({
|
|
35
|
+
...layout,
|
|
36
|
+
PivotResultColumnsOrder: checked,
|
|
37
|
+
});
|
|
38
|
+
} }, "Persist Order of Pivot Result Columns")),
|
|
31
39
|
React.createElement(ValueSelector, { showFilterInput: true, filter: columnFilter, toIdentifier: (option) => `${option.columnId}`, toLabel: (option) => option.friendlyName ?? option.columnId, options: sortedPivotColumns, value: layout.PivotColumns ?? [], allowReorder: true, onChange: handleColumnsChange }))));
|
|
32
40
|
};
|
|
@@ -24,7 +24,7 @@ export const areSummaryRowsValid = (layout) => {
|
|
|
24
24
|
layout.RowSummaries?.find((rowSummary) => {
|
|
25
25
|
for (const [_, fn] of Object.entries(rowSummary.ColumnsMap ?? {})) {
|
|
26
26
|
if (!fn) {
|
|
27
|
-
valid = '
|
|
27
|
+
valid = 'Each row summary column requires an aggregation function.';
|
|
28
28
|
return true;
|
|
29
29
|
}
|
|
30
30
|
}
|
|
@@ -7,11 +7,11 @@ import { useOnePageAdaptableWizardContext } from '../../Wizard/OnePageAdaptableW
|
|
|
7
7
|
import { Box } from '../../../components/Flex';
|
|
8
8
|
export const isValidNamedQueryExpression = (data, api) => {
|
|
9
9
|
if (!data.BooleanExpression) {
|
|
10
|
-
return '
|
|
10
|
+
return 'An expression is required.';
|
|
11
11
|
}
|
|
12
12
|
const valid = api.expressionApi.isValidBooleanExpression(data.BooleanExpression, NamedQueryModuleId);
|
|
13
13
|
if (!valid) {
|
|
14
|
-
return '
|
|
14
|
+
return 'The query is not a valid Boolean expression.';
|
|
15
15
|
}
|
|
16
16
|
return valid;
|
|
17
17
|
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import Input from '../../../components/Input';
|
|
3
|
-
import Radio from '../../../components/Radio';
|
|
4
3
|
import FormLayout, { FormRow } from '../../../components/FormLayout';
|
|
5
4
|
import { Tabs } from '../../../components/Tabs';
|
|
6
5
|
import { useOnePageAdaptableWizardContext, } from '../../Wizard/OnePageAdaptableWizard';
|
|
@@ -12,15 +11,29 @@ import { Flex } from '../../../components/Flex';
|
|
|
12
11
|
export const PlusMinusSettingsSummary = (props) => {
|
|
13
12
|
const { data } = useOnePageAdaptableWizardContext();
|
|
14
13
|
return (React.createElement(React.Fragment, null,
|
|
14
|
+
React.createElement(SummaryText, null,
|
|
15
|
+
"Name ",
|
|
16
|
+
React.createElement(Tag, null, data.Name || 'Not specified')),
|
|
15
17
|
React.createElement(SummaryText, null,
|
|
16
18
|
"Nudge Value ",
|
|
17
19
|
React.createElement(Tag, null, data.NudgeValue ?? 'Not selected')),
|
|
20
|
+
React.createElement(SummaryText, null,
|
|
21
|
+
"Nudge Type ",
|
|
22
|
+
React.createElement(Tag, null, props.hasCondition ? 'Conditional' : 'Always Apply')),
|
|
18
23
|
props.hasCondition && React.createElement(PlusMinusRuleSummary, null)));
|
|
19
24
|
};
|
|
20
25
|
export const isSettingsValid = (hasCondition) => (data, api, context) => {
|
|
26
|
+
if (!data.Name?.trim()) {
|
|
27
|
+
return 'A name is required.';
|
|
28
|
+
}
|
|
29
|
+
const allPlusMinusNudges = api.plusMinusApi.getAllPlusMinus();
|
|
30
|
+
const isDuplicateName = allPlusMinusNudges.some((nudge) => nudge.Name === data.Name && nudge.Uuid !== data.Uuid);
|
|
31
|
+
if (isDuplicateName) {
|
|
32
|
+
return 'A Plus/Minus Nudge with this name already exists.';
|
|
33
|
+
}
|
|
21
34
|
if (hasCondition) {
|
|
22
35
|
if (!data?.Rule?.BooleanExpression) {
|
|
23
|
-
return '
|
|
36
|
+
return 'A valid rule is required.';
|
|
24
37
|
}
|
|
25
38
|
const ruleValidation = isAdaptableRuleValid(data, api, context);
|
|
26
39
|
if (typeof ruleValidation === 'string') {
|
|
@@ -28,15 +41,21 @@ export const isSettingsValid = (hasCondition) => (data, api, context) => {
|
|
|
28
41
|
}
|
|
29
42
|
}
|
|
30
43
|
if (typeof data.NudgeValue !== 'number') {
|
|
31
|
-
return '
|
|
44
|
+
return 'A nudge value is required.';
|
|
32
45
|
}
|
|
33
46
|
if (data.NudgeValue === 0) {
|
|
34
|
-
return 'Nudge value must be
|
|
47
|
+
return 'Nudge value must not be zero.';
|
|
35
48
|
}
|
|
36
49
|
return true;
|
|
37
50
|
};
|
|
38
51
|
export const PlusMinusSettingsWizardSection = (props) => {
|
|
39
52
|
const { data } = useOnePageAdaptableWizardContext();
|
|
53
|
+
const handleNameChange = (event) => {
|
|
54
|
+
props.onChange({
|
|
55
|
+
...data,
|
|
56
|
+
Name: event.target.value,
|
|
57
|
+
});
|
|
58
|
+
};
|
|
40
59
|
const handleNudgeValueChange = (event) => {
|
|
41
60
|
const newValue = parseFloat(event.target.value);
|
|
42
61
|
props.onChange({
|
|
@@ -45,15 +64,19 @@ export const PlusMinusSettingsWizardSection = (props) => {
|
|
|
45
64
|
});
|
|
46
65
|
};
|
|
47
66
|
return (React.createElement(Flex, { flexDirection: "column", "data-name": "plus-minus-column-settings", className: "twa:h-full" },
|
|
48
|
-
React.createElement(Tabs, {
|
|
49
|
-
React.createElement(Tabs.Tab, null, "
|
|
67
|
+
React.createElement(Tabs, { className: "twa:p-2" },
|
|
68
|
+
React.createElement(Tabs.Tab, null, "Settings"),
|
|
50
69
|
React.createElement(Tabs.Content, null,
|
|
51
70
|
React.createElement(FormLayout, null,
|
|
71
|
+
React.createElement(FormRow, { label: "Name" },
|
|
72
|
+
React.createElement(Input, { "data-name": "plus-minus-name", className: "twa:flex-1 twa:mr-3", onChange: handleNameChange, placeholder: "Enter Name", value: data.Name ?? '' })),
|
|
52
73
|
React.createElement(FormRow, { label: "Nudge Value" },
|
|
53
|
-
React.createElement(Input, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' })),
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
74
|
+
React.createElement(Input, { "data-name": "nudge-value", className: "twa:flex-1 twa:mr-3", onChange: handleNudgeValueChange, placeholder: "Enter Number", type: "number", value: data.NudgeValue ?? '' }))))),
|
|
75
|
+
React.createElement(Tabs, { className: "twa:p-2", selectedIndex: props.hasCondition ? 1 : 0, onSelectedIndexChange: (index) => props.onConditionChange(index === 1) },
|
|
76
|
+
React.createElement(Tabs.Tab, { "data-name": "nudge-type-always" }, "Always Apply"),
|
|
77
|
+
React.createElement(Tabs.Tab, { "data-name": "nudge-type-condition" }, "Conditional"),
|
|
78
|
+
React.createElement(Tabs.Content, null,
|
|
79
|
+
React.createElement(Flex, { className: "twa:text-2 twa:py-2" }, "The nudge value is always applied when using Plus/Minus")),
|
|
80
|
+
React.createElement(Tabs.Content, { className: "twa:p-0" },
|
|
81
|
+
React.createElement(PlusMinusRuleWizardSection, { defaultPredicateId: "NonBlanks", onChange: props.onChange })))));
|
|
59
82
|
};
|
|
@@ -9,7 +9,7 @@ import * as PlusMinusRedux from '../../../Redux/ActionsReducers/PlusMinusRedux';
|
|
|
9
9
|
import { ObjectTagsWizardSection, renderObjectTagsSummary, } from '../../Wizard/ObjectTagsWizardSection';
|
|
10
10
|
import { Box } from '../../../components/Flex';
|
|
11
11
|
export const PlusMinusWizard = (props) => {
|
|
12
|
-
const [plusMinus,
|
|
12
|
+
const [plusMinus, doSetPlusMinus] = React.useState(() => {
|
|
13
13
|
const newPlusMinus = {
|
|
14
14
|
...(props.data ? props.data : ObjectFactory.CreateEmptyPlusMinusNudge()),
|
|
15
15
|
Scope: props?.data?.Scope ?? { All: true },
|
|
@@ -22,19 +22,24 @@ export const PlusMinusWizard = (props) => {
|
|
|
22
22
|
}
|
|
23
23
|
return newPlusMinus;
|
|
24
24
|
});
|
|
25
|
+
const setPlusMinus = React.useCallback((data) => {
|
|
26
|
+
doSetPlusMinus(data);
|
|
27
|
+
}, []);
|
|
25
28
|
const [hasCondition, setHasCondition] = React.useState(() => {
|
|
26
29
|
// true if on edit and it has a condition
|
|
27
30
|
return Boolean(props?.data?.Rule);
|
|
28
31
|
});
|
|
29
32
|
React.useEffect(() => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
33
|
+
doSetPlusMinus((prev) => {
|
|
34
|
+
const preparedData = { ...prev };
|
|
35
|
+
if (hasCondition) {
|
|
36
|
+
preparedData.Rule = preparedData.Rule ?? { BooleanExpression: '' };
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
delete preparedData.Rule;
|
|
40
|
+
}
|
|
41
|
+
return preparedData;
|
|
42
|
+
});
|
|
38
43
|
}, [hasCondition]);
|
|
39
44
|
const dispatch = useDispatch();
|
|
40
45
|
const handleFinish = () => {
|
|
@@ -47,6 +52,12 @@ export const PlusMinusWizard = (props) => {
|
|
|
47
52
|
props.onFinishWizard(plusMinus);
|
|
48
53
|
};
|
|
49
54
|
return (React.createElement(OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: plusMinus, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
55
|
+
{
|
|
56
|
+
title: 'Settings',
|
|
57
|
+
isValid: isSettingsValid(hasCondition),
|
|
58
|
+
renderSummary: () => React.createElement(PlusMinusSettingsSummary, { hasCondition: hasCondition }),
|
|
59
|
+
render: () => (React.createElement(PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
|
|
60
|
+
},
|
|
50
61
|
{
|
|
51
62
|
title: 'Target',
|
|
52
63
|
isValid: isScopeValid,
|
|
@@ -59,12 +70,6 @@ export const PlusMinusWizard = (props) => {
|
|
|
59
70
|
render: () => (React.createElement(Box, { className: "twa:p-2" },
|
|
60
71
|
React.createElement(PlusMinusScopeWizardSection, { onChange: setPlusMinus }))),
|
|
61
72
|
},
|
|
62
|
-
{
|
|
63
|
-
title: 'Settings',
|
|
64
|
-
isValid: isSettingsValid(hasCondition),
|
|
65
|
-
renderSummary: () => React.createElement(PlusMinusSettingsSummary, { hasCondition: hasCondition }),
|
|
66
|
-
render: () => (React.createElement(PlusMinusSettingsWizardSection, { hasCondition: hasCondition, onConditionChange: setHasCondition, onChange: setPlusMinus })),
|
|
67
|
-
},
|
|
68
73
|
{
|
|
69
74
|
details: 'Select Plus/Minus Tags',
|
|
70
75
|
title: 'Tags',
|
|
@@ -35,7 +35,10 @@ const QuickSearchPopupComponent = (props) => {
|
|
|
35
35
|
React.createElement(Card, null,
|
|
36
36
|
React.createElement(Card.Title, null, "Behaviour"),
|
|
37
37
|
React.createElement(Card.Body, { className: "twa:p-1", gap: 2 },
|
|
38
|
-
React.createElement(HelpBlock, { className: "twa:text-2 twa:w-fit" },
|
|
38
|
+
React.createElement(HelpBlock, { className: "twa:text-2 twa:w-fit" },
|
|
39
|
+
"Filter Grid when searching to only show rows with matching cells; ",
|
|
40
|
+
React.createElement("b", null, "use with care"),
|
|
41
|
+
" as can cause performance issues"),
|
|
39
42
|
React.createElement(CheckBox, { "data-name": "filter-quick-search-results", value: "existing", checked: state.RunQueryAfterQuickSearch, disabled: StringExtensions.IsNotNullOrEmpty(searchText), onChange: onQuickSearchBehaviourChange }, "Filter using Quick Search Results"))),
|
|
40
43
|
React.createElement(Card.Title, { border: false, className: "twa:pt-3" }, "Cell Matching Style"),
|
|
41
44
|
React.createElement(Card, null,
|
|
@@ -1,11 +1,18 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Tabs } from '../../../../components/Tabs';
|
|
3
3
|
import FormLayout, { FormRow } from '../../../../components/FormLayout';
|
|
4
|
+
import Input from '../../../../components/Input';
|
|
4
5
|
import Radio from '../../../../components/Radio';
|
|
5
6
|
import DropdownButton from '../../../../components/DropdownButton';
|
|
6
7
|
import { FormDescriptionText } from '../../../Wizard/OnePageAdaptableWizard';
|
|
7
8
|
import { Box } from '../../../../components/Flex';
|
|
8
9
|
export const ScheduleSettingsIPushPull = (props) => {
|
|
10
|
+
const handleNameChange = (event) => {
|
|
11
|
+
props.onChange({
|
|
12
|
+
...props.iPushPull,
|
|
13
|
+
Name: event.target.value,
|
|
14
|
+
});
|
|
15
|
+
};
|
|
9
16
|
const reportOptions = props.allReports.map((report) => ({
|
|
10
17
|
label: report.Name,
|
|
11
18
|
value: report.Name,
|
|
@@ -45,9 +52,13 @@ export const ScheduleSettingsIPushPull = (props) => {
|
|
|
45
52
|
});
|
|
46
53
|
return (React.createElement(Box, { "data-name": "schedule-settings-ipushpull" },
|
|
47
54
|
React.createElement(Tabs, { autoFocus: false },
|
|
48
|
-
React.createElement(Tabs.Tab, null, "
|
|
55
|
+
React.createElement(Tabs.Tab, null, "Settings"),
|
|
49
56
|
React.createElement(Tabs.Content, null,
|
|
50
57
|
React.createElement(FormLayout, null,
|
|
58
|
+
React.createElement(FormRow, { label: "Name" },
|
|
59
|
+
React.createElement(Input, { "data-name": "schedule-name", className: "twa:w-[300px]", onChange: handleNameChange, placeholder: "Enter Schedule Name", type: "string", value: props.iPushPull?.Name ?? '' })),
|
|
60
|
+
React.createElement(FormRow, { label: "" },
|
|
61
|
+
React.createElement(Box, { className: "twa:h-2" })),
|
|
51
62
|
React.createElement(FormRow, { label: "Select Report" },
|
|
52
63
|
React.createElement(DropdownButton, { "data-name": "report-name", disabled: props.allReports.length == 0, items: reportOptions, className: "twa:w-[300px]" }, props?.iPushPull?.IPushPullReport?.ReportName || 'Select Report')),
|
|
53
64
|
React.createElement(FormRow, { label: "Select Folder" },
|