@adaptabletools/adaptable 24.0.0-canary.1 → 24.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 +2 -3
- package/agGrid.js +2 -3
- package/aql.d.ts +132 -0
- package/aql.js +260 -0
- package/devtools.d.ts +237 -2
- package/index.css +307 -294
- package/index.d.ts +2 -3
- package/index.js +2 -3
- package/package.json +7 -6
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -4
- package/src/AdaptableOptions/ActionColumnOptions.d.ts +24 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +97 -69
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +113 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +0 -2
- package/src/AdaptableOptions/ChartingOptions.d.ts +11 -5
- package/src/AdaptableOptions/ColumnMenuOptions.d.ts +30 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +0 -2
- package/src/AdaptableOptions/CommentOptions.d.ts +12 -4
- package/src/AdaptableOptions/ContextMenuOptions.d.ts +31 -1
- package/src/AdaptableOptions/DashboardOptions.d.ts +0 -3
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +3 -2
- package/src/AdaptableOptions/DefaultAdaptableOptions.js +11 -5
- package/src/AdaptableOptions/EditOptions.d.ts +18 -2
- package/src/AdaptableOptions/ExportOptions.d.ts +23 -0
- package/src/AdaptableOptions/ExpressionOptions.d.ts +0 -3
- package/src/AdaptableOptions/Fdc3Options.d.ts +77 -3
- package/src/AdaptableOptions/FilterOptions.d.ts +13 -8
- package/src/AdaptableOptions/FlashingCellOptions.d.ts +3 -3
- package/src/AdaptableOptions/LayoutOptions.d.ts +16 -3
- package/src/AdaptableOptions/NotificationsOptions.d.ts +0 -1
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +0 -2
- package/src/AdaptableOptions/RowFormOptions.d.ts +9 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +16 -5
- package/src/AdaptableOptions/StateOptions.d.ts +37 -13
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -1
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +89 -6
- package/src/AdaptableState/AdaptableState.d.ts +99 -3
- package/src/AdaptableState/AlertState.d.ts +20 -21
- package/src/AdaptableState/ApplicationState.d.ts +5 -3
- package/src/AdaptableState/BaseState.d.ts +9 -2
- package/src/AdaptableState/CalculatedColumnState.d.ts +10 -8
- package/src/AdaptableState/ChartingState.d.ts +10 -5
- package/src/AdaptableState/CommentState.d.ts +10 -4
- package/src/AdaptableState/Common/AdaptableAlert.d.ts +21 -2
- package/src/AdaptableState/Common/AdaptableAlert.js +9 -0
- package/src/AdaptableState/Common/AdaptableButton.d.ts +3 -1
- package/src/AdaptableState/Common/AdaptableColumn.d.ts +38 -1
- package/src/AdaptableState/Common/AdaptableFilterState.d.ts +3 -1
- package/src/AdaptableState/Common/AdaptableFlashingCell.d.ts +3 -1
- package/src/AdaptableState/Common/AdaptableForm.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableFormat.d.ts +27 -1
- package/src/AdaptableState/Common/AdaptableIcon.d.ts +4 -2
- package/src/AdaptableState/Common/AdaptableObject.d.ts +9 -1
- package/src/AdaptableState/Common/AdaptableQuery.d.ts +9 -0
- package/src/AdaptableState/Common/AdaptableStyle.d.ts +6 -8
- package/src/AdaptableState/Common/AggregationColumns.d.ts +15 -6
- package/src/AdaptableState/Common/ButtonStyle.d.ts +3 -1
- package/src/AdaptableState/Common/CellDataChangedInfo.d.ts +6 -2
- package/src/AdaptableState/Common/CellHighlightInfo.d.ts +4 -2
- package/src/AdaptableState/Common/CellSummary.d.ts +33 -0
- package/src/AdaptableState/Common/ColumnFilter.d.ts +3 -1
- package/src/AdaptableState/Common/ColumnHighlightInfo.d.ts +4 -2
- package/src/AdaptableState/Common/ColumnScope.d.ts +32 -1
- package/src/AdaptableState/Common/ColumnSetupInfo.d.ts +17 -0
- package/src/AdaptableState/Common/ColumnSort.d.ts +3 -1
- package/src/AdaptableState/Common/CompactCalculatedColumnEditorInfo.d.ts +3 -0
- package/src/AdaptableState/Common/DataChangedScope.d.ts +3 -1
- package/src/AdaptableState/Common/DataUpdateConfig.d.ts +3 -1
- package/src/AdaptableState/Common/Entitlement.d.ts +4 -2
- package/src/AdaptableState/Common/Enums.d.ts +21 -0
- package/src/AdaptableState/Common/ExtendedLayout.d.ts +3 -1
- package/src/AdaptableState/Common/Fdc3Context.d.ts +9 -0
- package/src/AdaptableState/Common/Fdc3Intent.d.ts +6 -0
- package/src/AdaptableState/Common/GridFilter.d.ts +3 -1
- package/src/AdaptableState/Common/MenuItem.d.ts +9 -0
- package/src/AdaptableState/Common/RowHighlightInfo.d.ts +4 -2
- package/src/AdaptableState/Common/RowScope.d.ts +3 -1
- package/src/AdaptableState/Common/RowSummary.d.ts +14 -4
- package/src/AdaptableState/Common/RowsHighlightInfo.d.ts +5 -3
- package/src/AdaptableState/Common/Schedule.d.ts +10 -2
- package/src/AdaptableState/Common/SpecialColumnSettings.d.ts +3 -1
- package/src/AdaptableState/Common/SystemStatusMessageInfo.d.ts +4 -2
- package/src/AdaptableState/Common/TransposeConfig.d.ts +1 -1
- package/src/AdaptableState/Common/Types.d.ts +9 -0
- package/src/AdaptableState/CustomSortState.d.ts +8 -5
- package/src/AdaptableState/DashboardState.d.ts +14 -10
- package/src/AdaptableState/ExportState.d.ts +12 -4
- package/src/AdaptableState/FlashingCellState.d.ts +8 -5
- package/src/AdaptableState/FormatColumnState.d.ts +28 -8
- package/src/AdaptableState/FreeTextColumnState.d.ts +14 -8
- package/src/AdaptableState/IPushPullState.d.ts +39 -3
- package/src/AdaptableState/InitialState.d.ts +9 -9
- package/src/AdaptableState/InternalState.d.ts +183 -3
- package/src/AdaptableState/LayoutState.d.ts +64 -21
- package/src/AdaptableState/NamedQueryState.d.ts +16 -4
- package/src/AdaptableState/NoteState.d.ts +7 -3
- package/src/AdaptableState/OpenFinState.d.ts +12 -2
- package/src/AdaptableState/PlusMinusState.d.ts +8 -4
- package/src/AdaptableState/PopupState.d.ts +29 -1
- package/src/AdaptableState/QuickSearchState.d.ts +9 -3
- package/src/AdaptableState/Selection/GridCell.d.ts +5 -3
- package/src/AdaptableState/Selection/GridCellRange.d.ts +8 -7
- package/src/AdaptableState/Selection/SelectedCellInfo.d.ts +1 -1
- package/src/AdaptableState/ShortcutState.d.ts +7 -3
- package/src/AdaptableState/StatusBarState.d.ts +7 -6
- package/src/AdaptableState/StyledColumnState.d.ts +46 -14
- package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +4 -0
- package/src/AdaptableState/TeamSharingState.d.ts +46 -2
- package/src/AdaptableState/ThemeState.d.ts +24 -2
- package/src/AdaptableState/ToolPanelState.d.ts +10 -5
- package/src/AdaptableState/UserInterfaceState.d.ts +2 -2
- package/src/AdaptableState/Uuid.d.ts +6 -0
- package/src/Api/ActionColumnApi.d.ts +3 -1
- package/src/Api/AdaptableApi.d.ts +54 -50
- package/src/Api/AlertApi.d.ts +20 -12
- package/src/Api/ApplicationApi.d.ts +6 -2
- package/src/Api/BulkUpdateApi.d.ts +2 -1
- package/src/Api/CalculatedColumnApi.d.ts +4 -1
- package/src/Api/CalendarApi.d.ts +10 -0
- package/src/Api/CellSummaryApi.d.ts +9 -3
- package/src/Api/ChartingApi.d.ts +22 -7
- package/src/Api/ColumnApi.d.ts +71 -4
- package/src/Api/ColumnFilterApi.d.ts +13 -3
- package/src/Api/ColumnMenuApi.d.ts +13 -2
- package/src/Api/ColumnScopeApi.d.ts +27 -1
- package/src/Api/CommentApi.d.ts +10 -7
- package/src/Api/ContextMenuApi.d.ts +11 -1
- package/src/Api/CustomSortApi.d.ts +6 -2
- package/src/Api/DashboardApi.d.ts +30 -9
- package/src/Api/DataChangeHistoryApi.d.ts +9 -3
- package/src/Api/DataImportApi.d.ts +1 -1
- package/src/Api/EntitlementApi.d.ts +6 -1
- package/src/Api/EventApi.d.ts +67 -19
- package/src/Api/Events/AdaptableReady.d.ts +6 -2
- package/src/Api/Events/AdaptableStateChanged.d.ts +9 -5
- package/src/Api/Events/AdaptableStateReloaded.d.ts +7 -3
- package/src/Api/Events/AlertFired.d.ts +8 -2
- package/src/Api/Events/BeforeAdaptableStateChange.d.ts +6 -2
- package/src/Api/Events/CalculatedColumnChanged.d.ts +7 -3
- package/src/Api/Events/CellChanged.d.ts +6 -2
- package/src/Api/Events/CellSelectionChanged.d.ts +6 -2
- package/src/Api/Events/ChartChanged.d.ts +16 -8
- package/src/Api/Events/CommentChanged.d.ts +8 -2
- package/src/Api/Events/CustomToolbarConfigured.d.ts +6 -2
- package/src/Api/Events/DashboardChanged.d.ts +27 -6
- package/src/Api/Events/DataImported.d.ts +8 -4
- package/src/Api/Events/DataSetSelected.d.ts +6 -2
- package/src/Api/Events/Fdc3MessageInfo.d.ts +14 -4
- package/src/Api/Events/FlashingCellDisplayed.d.ts +6 -2
- package/src/Api/Events/GridFilterApplied.d.ts +11 -3
- package/src/Api/Events/GridSorted.d.ts +6 -2
- package/src/Api/Events/LayoutChanged.d.ts +41 -8
- package/src/Api/Events/LiveDataChanged.d.ts +21 -5
- package/src/Api/Events/NoteChanged.d.ts +5 -1
- package/src/Api/Events/ReportScheduleRan.d.ts +7 -3
- package/src/Api/Events/RowChanged.d.ts +6 -2
- package/src/Api/Events/RowFormSubmitted.d.ts +28 -12
- package/src/Api/Events/RowSelectionChanged.d.ts +6 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +6 -2
- package/src/Api/Events/TeamSharingEntityChanged.d.ts +6 -2
- package/src/Api/Events/ThemeSelected.d.ts +6 -2
- package/src/Api/ExportApi.d.ts +59 -32
- package/src/Api/ExpressionApi.d.ts +24 -1
- package/src/Api/Fdc3Api.d.ts +16 -3
- package/src/Api/FlashingCellApi.d.ts +6 -1
- package/src/Api/FormatColumnApi.d.ts +18 -11
- package/src/Api/FreeTextColumnApi.d.ts +4 -2
- package/src/Api/GridApi.d.ts +92 -19
- package/src/Api/IPushPullApi.d.ts +19 -2
- package/src/Api/Implementation/AlertApiImpl.d.ts +5 -5
- package/src/Api/Implementation/AlertApiImpl.js +26 -19
- package/src/Api/Implementation/ColumnScopeApiImpl.js +3 -3
- package/src/Api/Implementation/QuickSearchApiImpl.js +2 -2
- package/src/Api/Implementation/StateApiImpl.d.ts +1 -1
- package/src/Api/Implementation/StateApiImpl.js +4 -3
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +9 -15
- package/src/Api/Internal/AdaptableInternalApi.js +5 -3
- package/src/Api/Internal/AlertInternalApi.js +12 -7
- package/src/Api/Internal/CalculatedColumnInternalApi.js +1 -1
- package/src/Api/Internal/EventInternalApi.d.ts +2 -1
- package/src/Api/Internal/EventInternalApi.js +7 -0
- package/src/Api/Internal/StateInternalApi.d.ts +1 -1
- package/src/Api/Internal/StateInternalApi.js +6 -5
- package/src/Api/InteropioPluginApi.d.ts +2 -1
- package/src/Api/LayoutApi.d.ts +29 -15
- package/src/Api/NamedQueryApi.d.ts +10 -6
- package/src/Api/NoteApi.d.ts +15 -11
- package/src/Api/OpenFinApi.d.ts +8 -2
- package/src/Api/OptionsApi.d.ts +43 -1
- package/src/Api/PluginsApi.d.ts +6 -1
- package/src/Api/PlusMinusApi.d.ts +2 -1
- package/src/Api/QuickSearchApi.d.ts +6 -1
- package/src/Api/RowFormApi.d.ts +8 -7
- package/src/Api/ShortcutApi.d.ts +3 -1
- package/src/Api/SmartEditApi.d.ts +4 -1
- package/src/Api/StateApi.d.ts +32 -4
- package/src/Api/StatusBarApi.d.ts +2 -0
- package/src/Api/StyledColumnApi.d.ts +23 -12
- package/src/Api/SystemStatusApi.d.ts +18 -6
- package/src/Api/TeamSharingApi.d.ts +8 -1
- package/src/Api/ThemeApi.d.ts +17 -8
- package/src/Api/ToolPanelApi.d.ts +12 -7
- package/src/Api/UserInterfaceApi.d.ts +10 -5
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +3 -3
- package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +9 -4
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +12 -7
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.d.ts +8 -0
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +12 -12
- package/src/Redux/Store/AdaptableStore.d.ts +8 -5
- package/src/Redux/Store/AdaptableStore.js +75 -41
- package/src/Redux/Store/Interface/IAdaptableStore.d.ts +5 -5
- package/src/Redux/Store/Interface/IStorageEngine.d.ts +4 -4
- package/src/Redux/Store/StateOptionsGuards.d.ts +58 -0
- package/src/Redux/Store/StateOptionsGuards.js +112 -0
- package/src/Redux/Store/isTransientReduxAction.d.ts +5 -0
- package/src/Redux/Store/isTransientReduxAction.js +19 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +1 -0
- package/src/Utilities/Constants/ReduxConstants.d.ts +2 -2
- package/src/Utilities/Constants/ReduxConstants.js +5 -5
- package/src/Utilities/Helpers/AlertTypeHelper.d.ts +1 -1
- package/src/Utilities/Helpers/SettingsPanelHelper.d.ts +14 -0
- package/src/Utilities/Helpers/SettingsPanelHelper.js +37 -1
- package/src/Utilities/Helpers/UIHelper.d.ts +12 -14
- package/src/Utilities/Helpers/UIHelper.js +12 -35
- package/src/Utilities/ObjectFactory.js +3 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +9 -11
- package/src/View/Components/StyleComponent.js +2 -2
- package/src/View/Dashboard/Dashboard.d.ts +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/Dashboard/DashboardPopupSections.js +1 -1
- package/src/View/Filter/ColumnFilter/ColumnFilterNew.js +14 -9
- package/src/View/GridInfo/GridInfoPopup.js +62 -25
- package/src/View/QuickSearch/QuickSearchInput.js +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/Utilities/useQuickSearchDebounced.d.ts +2 -2
- package/src/View/StyledColumn/RangesComponent.js +13 -16
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +0 -2
- package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +0 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +3 -3
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +7 -11
- package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +6 -6
- package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +8 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardRangesSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +4 -4
- package/src/View/Wizard/CollapsibleWizardCard.d.ts +3 -1
- package/src/View/Wizard/CollapsibleWizardCard.js +17 -9
- package/src/agGrid/Adaptable.d.ts +0 -12
- package/src/agGrid/Adaptable.js +0 -52
- package/src/agGrid/AdaptableAgGrid.d.ts +4 -4
- package/src/agGrid/AdaptableAgGrid.js +2 -0
- package/src/agGrid/AdaptableFrameworkComponent.d.ts +12 -0
- package/src/agGrid/AdaptableLogger.d.ts +74 -1
- package/src/agGrid/AgGridColumnAdapter.d.ts +1 -1
- package/src/agGrid/AgGridColumnAdapter.js +7 -5
- package/src/agGrid/editors/AdaptableDateEditor/index.d.ts +3 -0
- package/src/agGrid/editors/AdaptableNumberEditor/index.d.ts +3 -0
- package/src/agGrid/index.d.ts +1 -6
- package/src/agGrid/index.js +1 -3
- package/src/aql/ExpressionEvaluation.d.ts +27 -0
- package/src/aql/types.d.ts +22 -0
- package/src/components/ColorField/index.d.ts +13 -0
- package/src/components/ColorField/index.js +26 -0
- package/src/components/aql/QueryBuilder/GroupEditor.js +1 -1
- package/src/components/aql/QueryBuilder/QueryBuilder.d.ts +5 -0
- package/src/components/aql/QueryBuilder/QueryBuilder.js +1 -1
- package/src/components/aql/QueryBuilder/QueryBuilderInputs.js +12 -2
- package/src/components/aql/QueryBuilder/context.d.ts +7 -0
- package/src/components/aql/QueryBuilder/context.js +3 -1
- package/src/env.js +2 -2
- package/src/layout-manager/src/normalizeLayoutModel.d.ts +1 -1
- package/src/layout-manager/src/simplifyLayoutModel.d.ts +1 -1
- package/src/migration/AdaptableUpgradeHelper.d.ts +7 -2
- package/src/migration/VersionUpgrade17.js +13 -8
- package/src/migration/VersionUpgrade24.d.ts +9 -0
- package/src/migration/VersionUpgrade24.js +27 -0
- package/src/migration/legacyAdaptableQuery.d.ts +29 -4
- package/src/setupDevTools.js +827 -111
- package/src/types.d.ts +2 -4
- package/tsconfig.esm.tsbuildinfo +1 -1
- package/upgrade.d.ts +1 -0
- package/upgrade.js +1 -0
- package/vendor/components/Button/index.d.ts +1 -1
- package/vendor/components/Button/index.d.ts.map +1 -1
- package/vendor/components/Button/index.js.map +1 -1
- package/vendor/components/CheckBox/index.d.ts +1 -1
- package/vendor/components/CheckBox/index.d.ts.map +1 -1
- package/vendor/components/CheckBox/index.js.map +1 -1
- package/vendor/components/ColorField/index.d.ts +53 -0
- package/vendor/components/ColorField/index.d.ts.map +1 -0
- package/vendor/components/ColorField/index.js +80 -0
- package/vendor/components/ColorField/index.js.map +1 -0
- package/vendor/components/ColorPicker/colorPickerTab.d.ts +4 -0
- package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -0
- package/vendor/components/ColorPicker/colorPickerTab.js +28 -0
- package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -0
- package/vendor/components/ColorPicker/index.d.ts +98 -0
- package/vendor/components/ColorPicker/index.d.ts.map +1 -0
- package/vendor/components/ColorPicker/index.js +322 -0
- package/vendor/components/ColorPicker/index.js.map +1 -0
- package/vendor/components/ColorPicker/themeColors.d.ts +94 -0
- package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -0
- package/vendor/components/ColorPicker/themeColors.js +240 -0
- package/vendor/components/ColorPicker/themeColors.js.map +1 -0
- package/vendor/components/Combobox/VirtualizedList.d.ts +1 -1
- package/vendor/components/Combobox/VirtualizedList.d.ts.map +1 -1
- package/vendor/components/Combobox/VirtualizedList.js.map +1 -1
- package/vendor/components/Combobox/index.d.ts +1 -1
- package/vendor/components/Combobox/index.d.ts.map +1 -1
- package/vendor/components/Combobox/index.js.map +1 -1
- package/vendor/components/NumberInput/index.d.ts +51 -0
- package/vendor/components/NumberInput/index.d.ts.map +1 -0
- package/vendor/components/NumberInput/index.js +82 -0
- package/vendor/components/NumberInput/index.js.map +1 -0
- package/vendor/components/index.css +286 -24
- package/vendor/components/index.d.ts +6 -0
- package/vendor/components/index.d.ts.map +1 -1
- package/vendor/components/index.js +3 -0
- package/vendor/components/index.js.map +1 -1
- package/vendor/components/ui/combobox.d.ts.map +1 -1
- package/vendor/components/ui/combobox.js +1 -1
- package/vendor/components/ui/combobox.js.map +1 -1
- package/vendor/components/ui/input-group.d.ts.map +1 -1
- package/vendor/components/ui/input-group.js +5 -4
- package/vendor/components/ui/input-group.js.map +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +0 -99
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.js +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.d.ts +0 -15
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableConfig.js +0 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +0 -19
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +0 -337
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.d.ts +0 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/Components/FormBox.js +0 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +0 -30
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +0 -162
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +0 -18
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +0 -12
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.d.ts +0 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +0 -131
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.d.ts +0 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +0 -30
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsSidebarForm.js +0 -80
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.d.ts +0 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsStatusbarForm.js +0 -100
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.d.ts +0 -11
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +0 -8
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +0 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +0 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +0 -21
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +0 -63
- package/src/View/AdaptableWizardView/Utilities/Utils.d.ts +0 -1
- package/src/View/AdaptableWizardView/Utilities/Utils.js +0 -21
- package/src/View/AdaptableWizardView/Utilities/helper.d.ts +0 -19
- package/src/View/AdaptableWizardView/Utilities/helper.js +0 -81
- package/src/View/AdaptableWizardView/Wizard.d.ts +0 -57
- package/src/View/AdaptableWizardView/Wizard.js +0 -98
- package/src/View/AdaptableWizardView/index.d.ts +0 -4
- package/src/View/AdaptableWizardView/index.js +0 -4
- package/src/components/ColorPicker/ColorPicker.d.ts +0 -12
- package/src/components/ColorPicker/ColorPicker.js +0 -48
- package/src/components/ColorPicker/OptionalColorPicker.d.ts +0 -12
- package/src/components/ColorPicker/OptionalColorPicker.js +0 -13
- package/src/components/ColorPicker/index.d.ts +0 -2
- package/src/components/ColorPicker/index.js +0 -2
|
@@ -21,28 +21,36 @@ export function renderCompactAccentTags(ids, getLabel, options) {
|
|
|
21
21
|
return (_jsxs(Flex, { alignItems: "center", className: "twa:gap-1 twa:min-w-0 twa:overflow-hidden", children: [visibleIds.map((id) => (_jsx(AccentTag, { className: "twa:shrink-0", children: getLabel(id) }, id))), remainder > 0 ? (_jsxs("span", { className: "twa:text-xs twa:opacity-70 twa:shrink-0", children: ["+", remainder] })) : null] }));
|
|
22
22
|
}
|
|
23
23
|
export const CollapsibleWizardCard = (props) => {
|
|
24
|
-
const { title, help, collapsedHelp, summary, compactSummary, compactSummaryInteractive = false, headerVisual, headerActions, children, defaultExpanded = false, compact = false, fillAvailable = false, className, bodyClassName, surface = 'popup', 'data-name': dataName, } = props;
|
|
24
|
+
const { title, help, collapsedHelp, summary, compactSummary, compactSummaryInteractive = false, headerVisual, headerActions, children, collapsible = true, defaultExpanded = false, compact = false, fillAvailable = false, className, bodyClassName, surface = 'popup', 'data-name': dataName, } = props;
|
|
25
25
|
const [expanded, setExpanded] = useProperty(props, 'expanded', defaultExpanded, {
|
|
26
26
|
onChange: props.onExpandedChange,
|
|
27
27
|
});
|
|
28
|
-
const
|
|
28
|
+
const canToggle = collapsible;
|
|
29
|
+
const isExpanded = canToggle && expanded;
|
|
30
|
+
const isCompact = canToggle && compact;
|
|
31
|
+
const showSummary = !isExpanded && !isCompact;
|
|
29
32
|
const collapsedHeaderInline = collapsedHelp === false ? undefined : collapsedHelp ?? help;
|
|
30
|
-
const headerInline =
|
|
31
|
-
const isInteractiveCompactSummary =
|
|
32
|
-
const toggleExpanded = () =>
|
|
33
|
+
const headerInline = isExpanded ? help : isCompact ? compactSummary : collapsedHeaderInline;
|
|
34
|
+
const isInteractiveCompactSummary = isCompact && compactSummaryInteractive;
|
|
35
|
+
const toggleExpanded = () => {
|
|
36
|
+
if (!canToggle) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
setExpanded(!expanded);
|
|
40
|
+
};
|
|
33
41
|
const handleTitleKeyDown = (event) => {
|
|
34
42
|
if (event.key === 'Enter' || event.key === ' ') {
|
|
35
43
|
event.preventDefault();
|
|
36
44
|
toggleExpanded();
|
|
37
45
|
}
|
|
38
46
|
};
|
|
39
|
-
return (_jsxs(Card, { shadow: false, className: cn('ab-CollapsibleWizardCard twa:border twa:transition-[border-color,background-color]',
|
|
47
|
+
return (_jsxs(Card, { shadow: false, className: cn('ab-CollapsibleWizardCard twa:border twa:transition-[border-color,background-color]', isExpanded
|
|
40
48
|
? getCollapsibleWizardCardExpandedClasses(surface)
|
|
41
|
-
: getCollapsibleWizardCardCollapsedClasses(surface),
|
|
49
|
+
: getCollapsibleWizardCardCollapsedClasses(surface), isCompact && 'ab-CollapsibleWizardCard--compact twa:p-0!', fillAvailable
|
|
42
50
|
? 'twa:flex-1 twa:min-h-0 twa:flex twa:flex-col twa:overflow-hidden'
|
|
43
|
-
: 'twa:shrink-0', className), children: [_jsx(Card.Title, { className: "twa:p-0", border: !
|
|
51
|
+
: 'twa:shrink-0', className), children: [_jsx(Card.Title, { className: "twa:p-0", border: !isCompact, children: _jsxs(Box, { className: cn('twa:flex twa:flex-row twa:items-center twa:gap-2 twa:w-full twa:px-2 twa:rounded-standard', canToggle && 'twa:cursor-pointer twa:hover:bg-primary', { 'twa:py-2': true, 'twa:mb-0.5': !isCompact && !isExpanded }, canToggle && targetOwn.focusOutline, canToggle && 'twa:focus-visible:ring-inset'), "data-name": dataName, onClick: canToggle ? toggleExpanded : undefined, onKeyDown: canToggle ? handleTitleKeyDown : undefined, tabIndex: canToggle ? 0 : undefined, "aria-expanded": canToggle ? isExpanded : undefined, role: canToggle ? 'button' : undefined, children: [_jsxs(Box, { className: cn('twa:flex twa:flex-row twa:items-center twa:gap-2 twa:shrink-0 twa:select-none', canToggle && 'twa:cursor-pointer'), children: [canToggle ? (_jsx(IconComponent, { icon: { name: isExpanded ? 'collapse' : 'expand' } })) : null, _jsx(Box, { className: "twa:font-medium", children: title })] }), headerVisual ? (_jsx(Box, { className: "twa:flex-1 twa:min-w-0 twa:flex twa:justify-end twa:items-center twa:overflow-hidden twa:pointer-events-none", children: headerVisual })) : headerInline ? (_jsx(Box, { className: cn('twa:flex-1 twa:min-w-0 twa:font-normal', isInteractiveCompactSummary
|
|
44
52
|
? 'twa:flex twa:justify-end twa:items-center twa:overflow-visible'
|
|
45
|
-
: cn('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default',
|
|
53
|
+
: cn('twa:text-xs twa:opacity-70 twa:pointer-events-none twa:cursor-default', isCompact ? 'twa:overflow-hidden' : 'twa:truncate')), children: headerInline })) : (_jsx(Box, { className: "twa:flex-1 twa:min-w-0" })), headerActions ? (_jsx(Box, { className: "twa:shrink-0 twa:gap-2 twa:flex", onClick: (event) => event.stopPropagation(), children: headerActions })) : null] }) }), isExpanded ? (_jsx(Card.Body, { className: cn('twa:p-1', bodyClassName, fillAvailable && 'twa:max-h-none! twa:flex-1 twa:min-h-0'), children: children })) : showSummary ? (_jsx(Card.Body, { className: "twa:p-1", gap: 1, children: summary })) : null] }));
|
|
46
54
|
};
|
|
47
55
|
export function useWizardCardAccordion(initialExpandedId, options) {
|
|
48
56
|
const fillExpandedCard = options?.fillExpandedCard ?? false;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { AgGridConfig } from '../AdaptableInterfaces/IAdaptable';
|
|
2
2
|
import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
3
3
|
import { AdaptableApi } from '../Api/AdaptableApi';
|
|
4
|
-
import { AdaptableNoCodeWizardOptions, IAdaptableNoCodeWizard } from '../AdaptableInterfaces/AdaptableNoCodeWizard';
|
|
5
4
|
export declare class Adaptable {
|
|
6
5
|
/**
|
|
7
6
|
* Initializer for Adaptable
|
|
@@ -12,14 +11,3 @@ export declare class Adaptable {
|
|
|
12
11
|
*/
|
|
13
12
|
static init(adaptableOptions: AdaptableOptions, agGridConfig: AgGridConfig): Promise<AdaptableApi>;
|
|
14
13
|
}
|
|
15
|
-
export declare class AdaptableNoCodeWizard implements IAdaptableNoCodeWizard {
|
|
16
|
-
private init;
|
|
17
|
-
private adaptableOptions;
|
|
18
|
-
private extraOptions;
|
|
19
|
-
private agGridModules;
|
|
20
|
-
/**
|
|
21
|
-
* @param adaptableOptions
|
|
22
|
-
*/
|
|
23
|
-
constructor(adaptableOptions: AdaptableOptions, extraOptions?: AdaptableNoCodeWizardOptions, agGridOptions?: AgGridConfig);
|
|
24
|
-
render(container?: HTMLElement | null): void;
|
|
25
|
-
}
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
1
|
import { AgGridModulesDocsLink } from '../Utilities/Constants/DocumentationLinkConstants';
|
|
3
2
|
import { AdaptableLogger } from './AdaptableLogger';
|
|
4
3
|
import { AdaptableAgGrid } from './AdaptableAgGrid';
|
|
5
|
-
import { getDefaultAdaptableOptions } from '../AdaptableOptions/DefaultAdaptableOptions';
|
|
6
|
-
import { renderReactRoot as defaultRenderReactRoot } from '../renderReactRoot';
|
|
7
|
-
import AdaptableWizardView from '../View/AdaptableWizardView';
|
|
8
|
-
import { resolveContainerElement } from '../Utilities/resolveContainerElement';
|
|
9
4
|
export class Adaptable {
|
|
10
5
|
static init(adaptableOptions, agGridConfig) {
|
|
11
6
|
if (!agGridConfig?.modules?.length) {
|
|
@@ -14,50 +9,3 @@ export class Adaptable {
|
|
|
14
9
|
return AdaptableAgGrid._initInternal({ ...agGridConfig, adaptableOptions, variant: 'vanilla' });
|
|
15
10
|
}
|
|
16
11
|
}
|
|
17
|
-
export class AdaptableNoCodeWizard {
|
|
18
|
-
init;
|
|
19
|
-
adaptableOptions;
|
|
20
|
-
extraOptions;
|
|
21
|
-
agGridModules;
|
|
22
|
-
constructor(adaptableOptions, extraOptions = {}, agGridOptions) {
|
|
23
|
-
const defaultInit = async ({ gridOptions, adaptableOptions, agGridModules, }) => {
|
|
24
|
-
return await Adaptable.init(adaptableOptions, { gridOptions, modules: agGridModules });
|
|
25
|
-
};
|
|
26
|
-
this.adaptableOptions = adaptableOptions;
|
|
27
|
-
this.init = extraOptions.onInit || defaultInit;
|
|
28
|
-
this.extraOptions = extraOptions;
|
|
29
|
-
this.agGridModules = [];
|
|
30
|
-
this.render();
|
|
31
|
-
}
|
|
32
|
-
render(container) {
|
|
33
|
-
if (!container) {
|
|
34
|
-
const initContext = {
|
|
35
|
-
adaptableId: this.adaptableOptions?.adaptableId ?? '',
|
|
36
|
-
adaptableStateKey: this.adaptableOptions?.adaptableStateKey ?? '',
|
|
37
|
-
adaptableContext: this.adaptableOptions?.adaptableContext,
|
|
38
|
-
};
|
|
39
|
-
container = resolveContainerElement(this.adaptableOptions.containerOptions?.adaptableContainer, initContext);
|
|
40
|
-
}
|
|
41
|
-
if (!container) {
|
|
42
|
-
const defaultId = getDefaultAdaptableOptions().containerOptions.adaptableContainer || 'adaptable';
|
|
43
|
-
container = document.getElementById(defaultId);
|
|
44
|
-
}
|
|
45
|
-
if (!container) {
|
|
46
|
-
throw new Error('Cannot find container in which to render Adaptable No Code Wizard');
|
|
47
|
-
}
|
|
48
|
-
container.classList.add('adaptable--in-wizard');
|
|
49
|
-
const unmount = defaultRenderReactRoot(React.createElement(AdaptableWizardView, {
|
|
50
|
-
adaptableOptions: this.adaptableOptions,
|
|
51
|
-
...this.extraOptions,
|
|
52
|
-
onInit: (adaptableOptions, gridOptions) => {
|
|
53
|
-
container.classList.remove('adaptable--in-wizard');
|
|
54
|
-
unmount();
|
|
55
|
-
this.init({
|
|
56
|
-
adaptableOptions,
|
|
57
|
-
gridOptions: gridOptions,
|
|
58
|
-
agGridModules: [...this.agGridModules],
|
|
59
|
-
});
|
|
60
|
-
},
|
|
61
|
-
}), container);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
@@ -7,7 +7,7 @@ import { EmitterCallback } from '../Utilities/Emitter';
|
|
|
7
7
|
import { AdaptablePlugin } from '../AdaptableOptions/AdaptablePlugin';
|
|
8
8
|
import { AgGridAdapter, RowNodeEvent } from './AgGridAdapter';
|
|
9
9
|
import { IDataService } from '../Utilities/Services/Interface/IDataService';
|
|
10
|
-
import {
|
|
10
|
+
import { AdaptablePersistentState } from '../AdaptableState/AdaptableState';
|
|
11
11
|
import { IAdaptableStore } from '../Redux/Store/Interface/IAdaptableStore';
|
|
12
12
|
import { ICalculatedColumnExpressionService } from '../Utilities/Services/Interface/ICalculatedColumnExpressionService';
|
|
13
13
|
import { IModuleService } from '../Utilities/Services/Interface/IModuleService';
|
|
@@ -157,9 +157,9 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
157
157
|
static _initInternal(config: AdaptableInitInternalConfig): Promise<AdaptableApi>;
|
|
158
158
|
private _initAdaptableAgGrid;
|
|
159
159
|
midwayDestroy(): void;
|
|
160
|
-
migrateLoadedAdaptableState(state:
|
|
161
|
-
buildPostLoadHook(gridOptions: NormalizeAdaptableStateOptions): (state:
|
|
162
|
-
normalizeAdaptableState(state:
|
|
160
|
+
migrateLoadedAdaptableState<T extends Partial<AdaptablePersistentState>>(state: T): T;
|
|
161
|
+
buildPostLoadHook(gridOptions: NormalizeAdaptableStateOptions): (state: Partial<AdaptablePersistentState>) => Partial<AdaptablePersistentState>;
|
|
162
|
+
normalizeAdaptableState(state: Partial<AdaptablePersistentState>, agGridOptions: NormalizeAdaptableStateOptions): Partial<AdaptablePersistentState>;
|
|
163
163
|
private normaliseLayoutState;
|
|
164
164
|
private normaliseToolPanelState;
|
|
165
165
|
private getCurrentLayoutModel;
|
|
@@ -15,6 +15,7 @@ import { AG_GRID_GRAND_TOTAL_ROW_ID, AG_GRID_GROUPED_COLUMN, AG_GRID_SELECTION_C
|
|
|
15
15
|
import { generateSelectionColumn } from '../Api/Implementation/ColumnApiImpl';
|
|
16
16
|
import { DataService } from '../Utilities/Services/DataService';
|
|
17
17
|
import { AdaptableStore } from '../Redux/Store/AdaptableStore';
|
|
18
|
+
import { validateStateOptions } from '../Redux/Store/StateOptionsGuards';
|
|
18
19
|
import { AdaptableApiImpl } from '../Api/Implementation/AdaptableApiImpl';
|
|
19
20
|
import { Fdc3Service } from '../Utilities/Services/Fdc3Service';
|
|
20
21
|
import { CommentsService } from '../Utilities/Services/CommentsService';
|
|
@@ -739,6 +740,7 @@ export class AdaptableAgGrid {
|
|
|
739
740
|
}
|
|
740
741
|
}
|
|
741
742
|
normalizeAdaptableOptions(adaptableOptions) {
|
|
743
|
+
validateStateOptions(adaptableOptions.stateOptions, this.logger);
|
|
742
744
|
if (this.hasAutogeneratedPrimaryKey) {
|
|
743
745
|
this.logger.warn(`Autogenerated primary key is enabled (adaptableOptions.autogeneratedPrimaryKey = true). This should be a last resort as it limits some Adaptable features. See: ${PrimaryKeyDocsLink}`);
|
|
744
746
|
this.adaptableOptions.primaryKey = AUTOGENERATED_PK_COLUMN;
|
|
@@ -29,7 +29,13 @@ export type ReactFrameworkComponent = ({ adaptableApi, }: {
|
|
|
29
29
|
}) => ReactElement;
|
|
30
30
|
/** AdapTable extras passed on AG Grid `menuItemParams` for custom menu items. */
|
|
31
31
|
export interface AdaptableMenuItemParams<TMenuContext = unknown> {
|
|
32
|
+
/**
|
|
33
|
+
* AdapTable API for the grid that opened the menu.
|
|
34
|
+
*/
|
|
32
35
|
adaptableApi: AdaptableApi;
|
|
36
|
+
/**
|
|
37
|
+
* Column menu or context menu context: the column, the row, and the cell the menu was opened on.
|
|
38
|
+
*/
|
|
33
39
|
menuContext: TMenuContext;
|
|
34
40
|
}
|
|
35
41
|
/**
|
|
@@ -37,7 +43,13 @@ export interface AdaptableMenuItemParams<TMenuContext = unknown> {
|
|
|
37
43
|
* `menuItemParams` (see `AgGridMenuAdapter.mapCustomMenuItemToAgGridMenuDefinition`).
|
|
38
44
|
*/
|
|
39
45
|
export interface AdaptableReactMenuItemProps<TMenuContext = unknown> {
|
|
46
|
+
/**
|
|
47
|
+
* Menu item name AG Grid passes to the component.
|
|
48
|
+
*/
|
|
40
49
|
name: string;
|
|
50
|
+
/**
|
|
51
|
+
* AdapTable extras (`adaptableApi`, `menuContext`) plus anything supplied on the menu item.
|
|
52
|
+
*/
|
|
41
53
|
menuItemParams: AdaptableMenuItemParams<TMenuContext> & Record<string, unknown>;
|
|
42
54
|
}
|
|
43
55
|
/**
|
|
@@ -2,30 +2,103 @@ import { AdaptableMessageType } from '../AdaptableState/Common/AdaptableMessageT
|
|
|
2
2
|
export declare const errorOnce: (message: string) => void;
|
|
3
3
|
export declare const warnOnce: (message: string) => void;
|
|
4
4
|
/**
|
|
5
|
-
* AdapTable
|
|
5
|
+
* Logger for one AdapTable instance.
|
|
6
|
+
*
|
|
7
|
+
* `info`, `success`, `warn` and `error` write through the debug logger (namespaced `Adaptable:<adaptableId>`).
|
|
8
|
+
* `consoleInfo`, `consoleLog`, `consoleWarn` and `consoleError` write straight to the console, with the same prefix.
|
|
6
9
|
*/
|
|
7
10
|
export declare class AdaptableLogger {
|
|
8
11
|
private adaptableId;
|
|
12
|
+
/** Root debug logger, namespaced `Adaptable:<adaptableId>`. The public methods write through this. */
|
|
9
13
|
private debugger;
|
|
14
|
+
/** Debug logger used by {@link AdaptableLogger.info}. */
|
|
10
15
|
private infoLogger;
|
|
16
|
+
/** Debug logger used by {@link AdaptableLogger.success}. */
|
|
11
17
|
private successLogger;
|
|
18
|
+
/** Debug logger used by {@link AdaptableLogger.warn}. */
|
|
12
19
|
private warnLogger;
|
|
20
|
+
/** Debug logger used by {@link AdaptableLogger.error}. */
|
|
13
21
|
private errorLogger;
|
|
22
|
+
/** Debug logger used by {@link AdaptableLogger.beginPerf}. */
|
|
14
23
|
private perfLogger;
|
|
15
24
|
static consoleErrorBase(message: string, ...optionalParams: any[]): void;
|
|
16
25
|
static consoleWarnBase(message: string, ...optionalParams: any[]): void;
|
|
17
26
|
static consoleLogBase(message: string, ...optionalParams: any[]): void;
|
|
27
|
+
/**
|
|
28
|
+
* @param adaptableId Id of the AdapTable instance, used as the log prefix
|
|
29
|
+
*/
|
|
18
30
|
constructor(adaptableId: string);
|
|
31
|
+
/**
|
|
32
|
+
* Starts a performance span. Call `end` on the returned object to log the elapsed milliseconds.
|
|
33
|
+
*
|
|
34
|
+
* @param sectionName Label included in the begin and end lines
|
|
35
|
+
* @returns An object whose `end` logs the duration
|
|
36
|
+
*/
|
|
19
37
|
beginPerf(sectionName: string): {
|
|
20
38
|
end: (additionalComment?: string) => void;
|
|
21
39
|
};
|
|
40
|
+
/**
|
|
41
|
+
* Writes an informational message to the `info` debug logger.
|
|
42
|
+
*
|
|
43
|
+
* @param message Message text
|
|
44
|
+
* @param optionalParams Extra values appended to the log
|
|
45
|
+
*/
|
|
22
46
|
info(message: string, ...optionalParams: any[]): void;
|
|
47
|
+
/**
|
|
48
|
+
* Writes a success message to the `success` debug logger.
|
|
49
|
+
*
|
|
50
|
+
* @param message Message text
|
|
51
|
+
* @param optionalParams Extra values appended to the log
|
|
52
|
+
*/
|
|
23
53
|
success(message: string, ...optionalParams: any[]): void;
|
|
54
|
+
/**
|
|
55
|
+
* Writes a warning to the `warn` debug logger.
|
|
56
|
+
*
|
|
57
|
+
* @param message Message text
|
|
58
|
+
* @param optionalParams Extra values appended to the log
|
|
59
|
+
*/
|
|
24
60
|
warn(message: string, ...optionalParams: any[]): void;
|
|
61
|
+
/**
|
|
62
|
+
* Writes an error to the `error` debug logger.
|
|
63
|
+
*
|
|
64
|
+
* @param message Message text
|
|
65
|
+
* @param optionalParams Extra values appended to the log
|
|
66
|
+
*/
|
|
25
67
|
error(message: string, ...optionalParams: any[]): void;
|
|
68
|
+
/**
|
|
69
|
+
* Writes to the console at the level of `messageType` (`Info`, `Success`, `Warning` or `Error`), prefixed with the AdapTable id.
|
|
70
|
+
*
|
|
71
|
+
* @param message Message text
|
|
72
|
+
* @param messageType Which console method to use
|
|
73
|
+
* @param optionalParams Extra values appended to the log
|
|
74
|
+
*/
|
|
26
75
|
consoleLogByMessageType(message: string, messageType: AdaptableMessageType, ...optionalParams: any[]): void;
|
|
76
|
+
/**
|
|
77
|
+
* Writes to `console.info`, prefixed with the AdapTable id.
|
|
78
|
+
*
|
|
79
|
+
* @param message Message text
|
|
80
|
+
* @param optionalParams Extra values appended to the log
|
|
81
|
+
*/
|
|
27
82
|
consoleInfo(message: string, ...optionalParams: any[]): void;
|
|
83
|
+
/**
|
|
84
|
+
* Writes to `console.log`, prefixed with the AdapTable id.
|
|
85
|
+
*
|
|
86
|
+
* @param message Message text
|
|
87
|
+
* @param optionalParams Extra values appended to the log
|
|
88
|
+
*/
|
|
28
89
|
consoleLog(message: string, ...optionalParams: any[]): void;
|
|
90
|
+
/**
|
|
91
|
+
* Writes to `console.warn`, prefixed with the AdapTable id.
|
|
92
|
+
*
|
|
93
|
+
* @param message Message text
|
|
94
|
+
* @param optionalParams Extra values appended to the log
|
|
95
|
+
*/
|
|
29
96
|
consoleWarn(message: string, ...optionalParams: any[]): void;
|
|
97
|
+
/**
|
|
98
|
+
* Writes to `console.error`, prefixed with the AdapTable id.
|
|
99
|
+
*
|
|
100
|
+
* @param message Message text
|
|
101
|
+
* @param optionalParams Extra values appended to the log
|
|
102
|
+
*/
|
|
30
103
|
consoleError(message: string, ...optionalParams: any[]): void;
|
|
31
104
|
}
|
|
@@ -88,7 +88,7 @@ export declare class AgGridColumnAdapter {
|
|
|
88
88
|
private setupColumnHeaderStyle;
|
|
89
89
|
private setupColumnCellEditor;
|
|
90
90
|
private setupColumnCellRenderer;
|
|
91
|
-
private
|
|
91
|
+
private setupColumnTooltip;
|
|
92
92
|
/**
|
|
93
93
|
* Resolves a Range Bar bound (number / column id / Col-Min / Col-Max /
|
|
94
94
|
* Col-Avg / Col-Median) into a concrete numeric value for the supplied row.
|
|
@@ -67,7 +67,7 @@ const STABLE_CALLBACK_COL_DEF_PROPERTIES = new Set([
|
|
|
67
67
|
'pivotComparator',
|
|
68
68
|
'getFindText',
|
|
69
69
|
'getQuickFilterText',
|
|
70
|
-
'
|
|
70
|
+
'tooltip',
|
|
71
71
|
'cellEditorParams',
|
|
72
72
|
'suppressNoteActions',
|
|
73
73
|
]);
|
|
@@ -333,7 +333,7 @@ export class AgGridColumnAdapter {
|
|
|
333
333
|
this.setupColumnHeaderStyle(colSetupInfo);
|
|
334
334
|
this.setupColumnHeaderClass(colSetupInfo);
|
|
335
335
|
this.setupColumnValueGetter(colSetupInfo);
|
|
336
|
-
this.
|
|
336
|
+
this.setupColumnTooltip(colSetupInfo);
|
|
337
337
|
if (!isAutoRowGroupColumn) {
|
|
338
338
|
this.setupColumnFilter(colSetupInfo);
|
|
339
339
|
this.setupColumnFloatingFilter(colSetupInfo);
|
|
@@ -676,9 +676,9 @@ export class AgGridColumnAdapter {
|
|
|
676
676
|
}
|
|
677
677
|
});
|
|
678
678
|
}
|
|
679
|
-
|
|
679
|
+
setupColumnTooltip({ col, colId, abColumn }) {
|
|
680
680
|
let hasTooptip = false;
|
|
681
|
-
this.setColDefProperty(col, '
|
|
681
|
+
this.setColDefProperty(col, 'tooltip', () => {
|
|
682
682
|
const styledColumn = this.adaptableApi.styledColumnApi.getStyledColumnForColumnId(colId);
|
|
683
683
|
if (!styledColumn || styledColumn.IsSuspended) {
|
|
684
684
|
return undefined;
|
|
@@ -928,6 +928,9 @@ export class AgGridColumnAdapter {
|
|
|
928
928
|
return this.adaptableFloatingFilterComponent;
|
|
929
929
|
}
|
|
930
930
|
setupColumnFloatingFilter({ col, colDef }) {
|
|
931
|
+
if (!this.adaptableOptions.filterOptions.useAdaptableFiltering) {
|
|
932
|
+
return;
|
|
933
|
+
}
|
|
931
934
|
const userProvidedFilterProp = this.getUserColDefProperty(col.getColId(), 'filter');
|
|
932
935
|
const hasInvalidFilterProp = typeof userProvidedFilterProp !== 'boolean' &&
|
|
933
936
|
typeof userProvidedFilterProp?.handler !== 'function' &&
|
|
@@ -938,7 +941,6 @@ export class AgGridColumnAdapter {
|
|
|
938
941
|
}
|
|
939
942
|
const isFloatingFilterDisabled = !colDef.filter ||
|
|
940
943
|
!colDef.floatingFilter ||
|
|
941
|
-
!this.adaptableOptions.filterOptions.useAdaptableFiltering ||
|
|
942
944
|
!this.adaptableApi.filterApi.columnFilterApi.isQuickFilterVisible();
|
|
943
945
|
if (this.adaptableApi.columnApi.isAutoRowGroupColumnForMulti(col.getColId())) {
|
|
944
946
|
this.setColDefProperty(col, 'floatingFilter', (original_floatingFilter) => {
|
|
@@ -5,6 +5,9 @@ import { IAdaptable } from '../../../AdaptableInterfaces/IAdaptable';
|
|
|
5
5
|
* Params used by the AdapTable Date Editor
|
|
6
6
|
*/
|
|
7
7
|
export interface AdaptableDateEditorParams extends ICellEditorParams {
|
|
8
|
+
/**
|
|
9
|
+
* AG Grid callback. The editor calls this with the selected date, or `null` when the date is cleared.
|
|
10
|
+
*/
|
|
8
11
|
onValueChange?: (value: any) => void;
|
|
9
12
|
}
|
|
10
13
|
export declare const AdaptableReactDateEditor: React.ForwardRefExoticComponent<AdaptableDateEditorParams & React.RefAttributes<unknown>>;
|
|
@@ -15,6 +15,9 @@ export interface AdaptableNumberCellEditorParams extends ICellEditorParams {
|
|
|
15
15
|
* @defaultValue '' (empty string)
|
|
16
16
|
*/
|
|
17
17
|
emptyValue: string;
|
|
18
|
+
/**
|
|
19
|
+
* AG Grid callback. The editor calls this with the value as the user edits, so the grid can commit it.
|
|
20
|
+
*/
|
|
18
21
|
onValueChange: (value: any) => void;
|
|
19
22
|
}
|
|
20
23
|
export declare const AdaptableReactNumberEditor: React.ForwardRefExoticComponent<AdaptableNumberCellEditorParams & React.RefAttributes<unknown>>;
|
package/src/agGrid/index.d.ts
CHANGED
|
@@ -1,11 +1,6 @@
|
|
|
1
|
-
import { Adaptable
|
|
1
|
+
import { Adaptable } from './Adaptable';
|
|
2
2
|
import { AdaptableLogger as ABLogger } from './AdaptableLogger';
|
|
3
|
-
export { default as AdaptableWizardView } from '../View/AdaptableWizardView';
|
|
4
3
|
export default Adaptable;
|
|
5
|
-
/**
|
|
6
|
-
* AdapTable's No Code Wizard
|
|
7
|
-
*/
|
|
8
|
-
export declare const AdaptableNoCodeWizard: typeof ABWizard;
|
|
9
4
|
/**
|
|
10
5
|
* AdapTable's Logger
|
|
11
6
|
*/
|
package/src/agGrid/index.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import { Adaptable
|
|
1
|
+
import { Adaptable } from './Adaptable';
|
|
2
2
|
import { AdaptableLogger as ABLogger } from './AdaptableLogger';
|
|
3
|
-
export { default as AdaptableWizardView } from '../View/AdaptableWizardView';
|
|
4
3
|
export default Adaptable;
|
|
5
|
-
export const AdaptableNoCodeWizard = ABWizard;
|
|
6
4
|
export const AdaptableLogger = ABLogger;
|
|
@@ -9,12 +9,27 @@ import type { CellDataChangedInfo } from '../AdaptableState/Common/CellDataChang
|
|
|
9
9
|
* throws — check `success` and read `value` / `errorMessage` accordingly.
|
|
10
10
|
*/
|
|
11
11
|
export type ExpressionEvaluationResult<T> = {
|
|
12
|
+
/**
|
|
13
|
+
* The expression evaluated. Read `value`.
|
|
14
|
+
*/
|
|
12
15
|
success: true;
|
|
16
|
+
/**
|
|
17
|
+
* Result of the expression.
|
|
18
|
+
*/
|
|
13
19
|
value: T;
|
|
14
20
|
} | {
|
|
21
|
+
/**
|
|
22
|
+
* The expression did not evaluate. Read `errorMessage`. The API does not throw for these failures.
|
|
23
|
+
*/
|
|
15
24
|
success: false;
|
|
25
|
+
/**
|
|
26
|
+
* Why evaluation failed: a syntax error, an unknown column, a missing row, or a function that is not available.
|
|
27
|
+
*/
|
|
16
28
|
errorMessage: string;
|
|
17
29
|
};
|
|
30
|
+
/**
|
|
31
|
+
* Options shared by the `expressionApi` evaluate and filter calls.
|
|
32
|
+
*/
|
|
18
33
|
export interface EvaluateExpressionOptions {
|
|
19
34
|
/**
|
|
20
35
|
* Emulate a specific feature module's filtered function pool (e.g. "would
|
|
@@ -32,7 +47,13 @@ export interface EvaluateExpressionOptions {
|
|
|
32
47
|
* When a `columnId` is both a grid column and listed here, this override wins.
|
|
33
48
|
*/
|
|
34
49
|
export interface ExternalDataColumn {
|
|
50
|
+
/**
|
|
51
|
+
* Key on the plain-object row this metadata describes. Matches a grid `colId` when the key is also a column.
|
|
52
|
+
*/
|
|
35
53
|
columnId: string;
|
|
54
|
+
/**
|
|
55
|
+
* How to treat the value. When this key is also a grid column, this type wins over the column's data type.
|
|
56
|
+
*/
|
|
36
57
|
dataType?: 'number' | 'text' | 'date' | 'boolean' | 'array';
|
|
37
58
|
}
|
|
38
59
|
/**
|
|
@@ -40,7 +61,13 @@ export interface ExternalDataColumn {
|
|
|
40
61
|
* Does not mutate grid (or data-set) data; other rows are unaffected.
|
|
41
62
|
*/
|
|
42
63
|
export interface CellValueOverride {
|
|
64
|
+
/**
|
|
65
|
+
* Column whose value is replaced for this evaluation only.
|
|
66
|
+
*/
|
|
43
67
|
columnId: string;
|
|
68
|
+
/**
|
|
69
|
+
* Value used in place of the cell's current value. The grid data is not changed.
|
|
70
|
+
*/
|
|
44
71
|
value: unknown;
|
|
45
72
|
}
|
|
46
73
|
/**
|
package/src/aql/types.d.ts
CHANGED
|
@@ -24,10 +24,22 @@ context: AdaptableExpressionContext) => any;
|
|
|
24
24
|
* Defines how an AdaptableQL Function is described in Expression Editor
|
|
25
25
|
*/
|
|
26
26
|
export type ExpressionFunctionDocBlock = {
|
|
27
|
+
/**
|
|
28
|
+
* A code sample, shown as code in the Expression Editor.
|
|
29
|
+
*/
|
|
27
30
|
type: 'code';
|
|
31
|
+
/**
|
|
32
|
+
* The sample, for example `[price] > 100`.
|
|
33
|
+
*/
|
|
28
34
|
content: string;
|
|
29
35
|
} | {
|
|
36
|
+
/**
|
|
37
|
+
* A prose description, shown as a paragraph in the Expression Editor.
|
|
38
|
+
*/
|
|
30
39
|
type: 'paragraph';
|
|
40
|
+
/**
|
|
41
|
+
* The description text.
|
|
42
|
+
*/
|
|
31
43
|
content: string;
|
|
32
44
|
};
|
|
33
45
|
/**
|
|
@@ -289,7 +301,17 @@ export type AdaptableAggregationFunctionMap<T extends string = string> = Record<
|
|
|
289
301
|
* (not Layout / Cell Summary — those are aggregation-only).
|
|
290
302
|
*/
|
|
291
303
|
export type AdaptableCustomExpressionFunction = Omit<AqlExpressionFunction<AdaptableExpressionContext> & AdaptableExpressionFunctionEnhancement, 'isAvailable' | 'returnType'> & {
|
|
304
|
+
/**
|
|
305
|
+
* Type the function returns. `boolean` makes it a predicate that can appear in the Query Builder and Column Filter when it takes one or two operands.
|
|
306
|
+
*
|
|
307
|
+
* Use an {@link ExpressionReturnType} value. `string & {}` keeps autocomplete while still accepting a widened string.
|
|
308
|
+
*/
|
|
292
309
|
returnType: ExpressionReturnType | (string & {});
|
|
310
|
+
/**
|
|
311
|
+
* Modules that may call this function, or a function of the availability context that returns whether it may be called.
|
|
312
|
+
*
|
|
313
|
+
* Omit it to allow the function in every standard-expression module. Layout and Cell Summary are aggregated-expression modules and are not in this list.
|
|
314
|
+
*/
|
|
293
315
|
isAvailable?: AdaptableStandardExpressionModule[] | ((context: ExpressionFunctionAvailabilityContext) => boolean);
|
|
294
316
|
};
|
|
295
317
|
/**
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { type ColorFieldProps as SharedColorFieldProps } from "../../../vendor/components/ColorField";
|
|
2
|
+
export type ColorFieldProps = Omit<SharedColorFieldProps, 'onChange' | 'clearable' | 'data-name' | 'filterColours'> & {
|
|
3
|
+
'data-name'?: string;
|
|
4
|
+
} & ({
|
|
5
|
+
clearable?: true;
|
|
6
|
+
onChange: (color: string | undefined) => void;
|
|
7
|
+
} | {
|
|
8
|
+
/** The colour is required, so there is no clear button and `onChange` always gets one. */
|
|
9
|
+
clearable: false;
|
|
10
|
+
onChange: (color: string) => void;
|
|
11
|
+
});
|
|
12
|
+
/** The shared colour field with AdapTable's defaults. */
|
|
13
|
+
export declare const ColorField: (props: ColorFieldProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { ColorField as SharedColorField, } from "../../../vendor/components/ColorField";
|
|
3
|
+
import { useAdaptable } from '../../View/AdaptableContext';
|
|
4
|
+
import { useOnePageAdaptableWizardContext } from '../../View/Wizard/OnePageAdaptableWizard';
|
|
5
|
+
function useEditedModule() {
|
|
6
|
+
const wizard = useOnePageAdaptableWizardContext();
|
|
7
|
+
const adaptable = useAdaptable();
|
|
8
|
+
const fromWizard = wizard.moduleInfo?.ModuleName;
|
|
9
|
+
if (fromWizard) {
|
|
10
|
+
return fromWizard;
|
|
11
|
+
}
|
|
12
|
+
const screenPopup = adaptable?.adaptableStore?.TheStore.getState().Popup.ScreenPopup;
|
|
13
|
+
return screenPopup?.ShowScreenPopup ? screenPopup.ComponentModule : undefined;
|
|
14
|
+
}
|
|
15
|
+
const DEFAULT_TABS = ['Custom', 'Palette'];
|
|
16
|
+
const showAllColours = () => undefined;
|
|
17
|
+
export const ColorField = (props) => {
|
|
18
|
+
const adaptable = useAdaptable();
|
|
19
|
+
const module = useEditedModule();
|
|
20
|
+
const paletteOptions = adaptable?.api.optionsApi.getUserInterfaceOptions().colourPickerOptions;
|
|
21
|
+
const filterColours = paletteOptions?.filterColours;
|
|
22
|
+
const { onChange, tabs, orderPaletteColours, removeDuplicates, showGroupLabels, 'data-name': dataName = 'color-field', ...rest } = props;
|
|
23
|
+
return (_jsx(SharedColorField, { ...rest, "data-name": dataName, tabs: tabs ?? paletteOptions?.tabs ?? DEFAULT_TABS, orderPaletteColours: orderPaletteColours ?? paletteOptions?.orderPaletteColours, removeDuplicates: removeDuplicates ?? paletteOptions?.removeDuplicates, showGroupLabels: showGroupLabels ?? paletteOptions?.showGroupLabels, filterColours: filterColours
|
|
24
|
+
? (colours) => filterColours({ ...colours, module })
|
|
25
|
+
: showAllColours, onChange: onChange }));
|
|
26
|
+
};
|
|
@@ -31,7 +31,7 @@ export const GroupEditor = ({ node, path, isRoot, dispatch, hideDelete, }) => {
|
|
|
31
31
|
};
|
|
32
32
|
return (_jsxs(Box, { className: cn('ab-QueryBuilder__group twa:my-1', !isRoot &&
|
|
33
33
|
'twa:pl-3 twa:border-l twa:rounded-md twa:py-1 twa:pr-1 ' +
|
|
34
|
-
'twa:bg-(--ab-cmp-query-builder-group__background)'), children: [showHeader && (_jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:my-1", children: [showCombinator && (_jsx(CombinatorSelector, { value: node.combinator, onChange: (combinator) => dispatch({ type: 'setCombinator', groupPath: path, combinator }) })), _jsx(Box, { className: "twa:flex-1" }), showGroupDelete && (_jsx(RowActions, { rail: qb.hideInlineAdd ? 'compact' : 'full', hideAdd: true, onDelete: () => dispatch({ type: 'delete', path }) }))] })), isEmpty ? (_jsx(PrimitiveEditor, { node: emptyQlPrimitive(), path: [...path, 0], dispatch: seedDispatch, hideAdd: true, hideDelete: true })) : (_jsxs(_Fragment, { children: [hideDragHandles ? (_jsx("div", { className: "ab-QueryBuilder__group-children", children: node.children.map((child, index) => (_jsx(Flex, { className: "ab-QueryBuilder__row", alignItems: "center", children: _jsx(Box, { className: "ab-QueryBuilder__row-body twa:flex-1 twa:min-w-0", children: _jsx(NodeEditor, { node: child, path: [...path, index], dispatch: dispatch }) }) }, `${listId}/${index}`))) })) : (_jsx(DragList, { dragListId: listId, orientation: "vertical", onDrop: handleDrop, onDragProxyMove: defaultDragProxyMove, children: (listDomProps) => (_jsx("div", { ...listDomProps, className: cn('ab-QueryBuilder__group-children', listDomProps.className), children: node.children.map((child, index) => {
|
|
34
|
+
'twa:bg-(--ab-cmp-query-builder-group__background)'), children: [showHeader && (_jsxs(Flex, { alignItems: "center", className: "twa:gap-2 twa:my-1 twa:w-full", children: [showCombinator && (_jsx(CombinatorSelector, { value: node.combinator, onChange: (combinator) => dispatch({ type: 'setCombinator', groupPath: path, combinator }) })), _jsx(Box, { className: "twa:flex-1" }), showGroupDelete && (_jsx(RowActions, { rail: qb.hideInlineAdd ? 'compact' : 'full', hideAdd: true, onDelete: () => dispatch({ type: 'delete', path }) })), isRoot && showCombinator && qb.rootHeaderEnd] })), isEmpty ? (_jsx(PrimitiveEditor, { node: emptyQlPrimitive(), path: [...path, 0], dispatch: seedDispatch, hideAdd: true, hideDelete: true })) : (_jsxs(_Fragment, { children: [hideDragHandles ? (_jsx("div", { className: "ab-QueryBuilder__group-children", children: node.children.map((child, index) => (_jsx(Flex, { className: "ab-QueryBuilder__row", alignItems: "center", children: _jsx(Box, { className: "ab-QueryBuilder__row-body twa:flex-1 twa:min-w-0", children: _jsx(NodeEditor, { node: child, path: [...path, index], dispatch: dispatch }) }) }, `${listId}/${index}`))) })) : (_jsx(DragList, { dragListId: listId, orientation: "vertical", onDrop: handleDrop, onDragProxyMove: defaultDragProxyMove, children: (listDomProps) => (_jsx("div", { ...listDomProps, className: cn('ab-QueryBuilder__group-children', listDomProps.className), children: node.children.map((child, index) => {
|
|
35
35
|
const childId = `${listId}/${index}`;
|
|
36
36
|
return (_jsx(DragList.DraggableItem, { id: childId, children: (itemDomProps) => {
|
|
37
37
|
const { onPointerDown, ...rest } = itemDomProps;
|
|
@@ -88,5 +88,10 @@ export interface QueryBuilderProps {
|
|
|
88
88
|
* @defaultValue 'auto'
|
|
89
89
|
*/
|
|
90
90
|
layout?: QueryBuilderLayoutMode;
|
|
91
|
+
/**
|
|
92
|
+
* Extra control on the right of the root AND/OR row, once there are
|
|
93
|
+
* two or more conditions. Hidden while the editor has a single condition.
|
|
94
|
+
*/
|
|
95
|
+
rootHeaderEnd?: React.ReactNode;
|
|
91
96
|
}
|
|
92
97
|
export declare const QueryBuilder: React.FunctionComponent<QueryBuilderProps>;
|
|
@@ -104,7 +104,7 @@ export const QueryBuilder = (props) => {
|
|
|
104
104
|
: 'query-builder2-invalid-expression', className: "twa:my-2 twa:w-full twa:max-w-full twa:text-2 twa:leading-snug twa:bg-background twa:text-foreground", children: _jsxs(Flex, { flexDirection: "column", className: "twa:gap-3", alignItems: "flex-start", children: [_jsxs(Flex, { flexDirection: "column", className: "twa:gap-2", children: [_jsx(Box, { children: primaryLine }), typeMismatchMessages.map((message) => (_jsx(Box, { children: message }, message))), _jsx(Box, { children: "Please edit the Expression in the Expression Editor." })] }), clearExpressionButton] }) }));
|
|
105
105
|
}
|
|
106
106
|
else if (!isQlPredicateError(root) && isQlGroup(root)) {
|
|
107
|
-
body = (_jsx(QueryBuilderProvider, { module: props.module, columnScope: props.columnScope, getColumns: props.getColumns, getFields: props.getFields, subject: props.subject, hideInlineAdd: props.hideInlineAdd ?? true, hideAddGroup: props.hideAddGroup, hideLockedSubject: props.hideLockedSubject, hideDragHandles: props.hideDragHandles, layout: props.layout ?? 'auto', children: props.hideDragHandles ? (_jsx(Box, { "data-name": "query-builder2-editor", className: "twa:my-2", children: _jsx(NodeEditor, { node: root, path: [], isRoot: true, dispatch: dispatch }) })) : (_jsx(DragDropProvider, { children: _jsx(Box, { "data-name": "query-builder2-editor", className: "twa:my-2", children: _jsx(NodeEditor, { node: root, path: [], isRoot: true, dispatch: dispatch }) }) })) }));
|
|
107
|
+
body = (_jsx(QueryBuilderProvider, { module: props.module, columnScope: props.columnScope, getColumns: props.getColumns, getFields: props.getFields, subject: props.subject, hideInlineAdd: props.hideInlineAdd ?? true, hideAddGroup: props.hideAddGroup, hideLockedSubject: props.hideLockedSubject, hideDragHandles: props.hideDragHandles, layout: props.layout ?? 'auto', rootHeaderEnd: props.rootHeaderEnd, children: props.hideDragHandles ? (_jsx(Box, { "data-name": "query-builder2-editor", className: "twa:my-2", children: _jsx(NodeEditor, { node: root, path: [], isRoot: true, dispatch: dispatch }) })) : (_jsx(DragDropProvider, { children: _jsx(Box, { "data-name": "query-builder2-editor", className: "twa:my-2", children: _jsx(NodeEditor, { node: root, path: [], isRoot: true, dispatch: dispatch }) }) })) }));
|
|
108
108
|
}
|
|
109
109
|
return (_jsxs(Box, { className: twMerge(QUERY_BUILDER_CLASSNAME, QUERY_BUILDER_LAYOUT_CLASS[props.layout ?? 'auto']), children: [body, !props.hideExpressionPreview && (_jsxs(Card, { shadow: false, className: "twa:mt-12", children: [_jsxs(Card.Title, { className: "twa:justify-between twa:gap-2", children: [_jsxs(Flex, { flexDirection: "column", className: "twa:min-w-0 twa:gap-0.5", children: [_jsx(Box, { className: "twa:font-medium", children: "Output Expression" }), _jsx(Box, { className: "twa:text-xs twa:opacity-70 twa:font-normal", children: cannotDisplayInQueryBuilder
|
|
110
110
|
? 'Readonly view of the current Expression'
|
|
@@ -7,6 +7,7 @@ import * as ModuleConstants from '../../../Utilities/Constants/ModuleConstants';
|
|
|
7
7
|
import { cn } from '../../../lib/utils';
|
|
8
8
|
import { useAdaptable } from '../../../View/AdaptableContext';
|
|
9
9
|
import AdaptableInput from '../../../View/Components/AdaptableInput';
|
|
10
|
+
import { AdaptableDateInlineInput } from '../../../View/Components/AdaptableInput/AdaptableDateInlineInput';
|
|
10
11
|
import { FloatingFilterValues } from '../../../View/Filter/ColumnFilter/components/FloatingFilterValues';
|
|
11
12
|
import { QueryBuilderColumnSelector } from './QueryBuilderColumnSelector';
|
|
12
13
|
import { FieldSelector } from '../../../View/Components/Selectors/FieldSelector';
|
|
@@ -96,7 +97,7 @@ export const PrimitiveColumnOrFieldSelector = (props) => {
|
|
|
96
97
|
input = (_jsx(Box, { "data-id": "query-input-row-display", "data-name": "qb2-whole-row", "data-slot": "select-trigger", className: subjectPillClassName, children: "Whole Row" }));
|
|
97
98
|
}
|
|
98
99
|
else {
|
|
99
|
-
input = (_jsx(Box, { "data-id": "query-input-scope-display", "data-slot": "select-trigger", className: subjectPillClassName, children:
|
|
100
|
+
input = (_jsx(Box, { "data-id": "query-input-scope-display", "data-slot": "select-trigger", className: subjectPillClassName, children: "Scoped Columns" }));
|
|
100
101
|
}
|
|
101
102
|
const typeOptions = [
|
|
102
103
|
{
|
|
@@ -155,8 +156,12 @@ export const PrimitiveColumnOrFieldSelector = (props) => {
|
|
|
155
156
|
};
|
|
156
157
|
export const PrimitiveValueInput = (props) => {
|
|
157
158
|
const adaptable = useAdaptable();
|
|
158
|
-
const { layout } = useQueryBuilder();
|
|
159
|
+
const { layout, module } = useQueryBuilder();
|
|
159
160
|
const isStackedLayout = layout === 'stacked';
|
|
161
|
+
const showDatePicker = adaptable.api.optionsApi.getFilterOptions().showDatePicker;
|
|
162
|
+
const useInlineDateInput = !showDatePicker &&
|
|
163
|
+
(module === ModuleConstants.ColumnFilterModuleId ||
|
|
164
|
+
module === ModuleConstants.GridFilterModuleId);
|
|
160
165
|
const allowedModes = props.allowedModes ?? DEFAULT_QUERY_BUILDER_INPUT_MODES;
|
|
161
166
|
const hasFields = React.useMemo(() => {
|
|
162
167
|
return adaptable.api.expressionApi.internalApi.getAvailableFields()?.length > 0;
|
|
@@ -218,6 +223,11 @@ export const PrimitiveValueInput = (props) => {
|
|
|
218
223
|
} }));
|
|
219
224
|
case 'date': {
|
|
220
225
|
const dateStr = typeof currentLiteralValue === 'string' ? currentLiteralValue : '';
|
|
226
|
+
if (useInlineDateInput) {
|
|
227
|
+
return (_jsx(AdaptableDateInlineInput, { ...common, value: dateStr, onChange: (value) => {
|
|
228
|
+
props.onChange(value ? literalOf('date', value) : undefined);
|
|
229
|
+
} }));
|
|
230
|
+
}
|
|
221
231
|
return (_jsx(AdaptableInput, { ...common, type: "date", value: dateStr, onChange: (event) => {
|
|
222
232
|
const raw = event.target.value;
|
|
223
233
|
props.onChange(literalOf('date', raw));
|