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