@adaptabletools/adaptable 12.0.0-canary.1 → 12.0.0-canary.4
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/base.css +41 -14
- package/bundle.cjs.js +156 -142
- package/index.css +49 -14
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -0
- package/src/AdaptableOptions/ActionOptions.d.ts +181 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +5 -9
- package/src/AdaptableOptions/DashboardOptions.d.ts +1 -5
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +17 -4
- package/src/AdaptableOptions/EditOptions.d.ts +2 -62
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +3 -3
- package/src/AdaptableOptions/GeneralOptions.d.ts +7 -0
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +1 -5
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +2 -112
- package/src/Api/ActionApi.d.ts +24 -0
- package/src/Api/{Events/RowFormSubmitted.js → ActionApi.js} +0 -0
- package/src/Api/AdaptableApi.d.ts +5 -0
- package/src/Api/AlertApi.d.ts +3 -3
- package/src/Api/ConfigApi.d.ts +1 -1
- package/src/Api/EventApi.d.ts +9 -9
- package/src/Api/Events/ActionRowSubmitted.d.ts +34 -0
- package/src/Api/Events/ActionRowSubmitted.js +2 -0
- package/src/Api/GridApi.d.ts +0 -14
- package/src/Api/Implementation/ActionApiImpl.d.ts +8 -0
- package/src/Api/Implementation/ActionApiImpl.js +56 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +3 -3
- package/src/Api/Implementation/ApiBase.d.ts +2 -1
- package/src/Api/Implementation/ApiBase.js +3 -0
- package/src/Api/Implementation/ColumnApiImpl.js +2 -2
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -3
- package/src/Api/Implementation/GridApiImpl.js +0 -44
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -3
- package/src/Api/Implementation/StatusBarApiImpl.d.ts +4 -3
- package/src/Api/Implementation/StatusBarApiImpl.js +2 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +2 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -2
- package/src/Api/Implementation/UserInterfaceApiImpl.js +0 -4
- package/src/Api/StatusBarApi.d.ts +10 -3
- package/src/Api/UserInterfaceApi.d.ts +1 -5
- package/src/PredefinedConfig/AlertState.d.ts +4 -4
- package/src/PredefinedConfig/Common/AdaptableAlert.js +4 -2
- package/src/PredefinedConfig/Common/AdaptableColumn.js +2 -1
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +24 -18
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +2 -4
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +33 -31
- package/src/PredefinedConfig/Common/AdaptableQuery.js +2 -1
- package/src/PredefinedConfig/Common/FormContext.d.ts +3 -0
- package/src/PredefinedConfig/Common/Menu.d.ts +3 -3
- package/src/PredefinedConfig/Common/Types.d.ts +1 -1
- package/src/PredefinedConfig/StatusBarState.d.ts +5 -2
- package/src/PredefinedConfig/Uuid.js +2 -1
- package/src/Redux/ActionsReducers/AlertRedux.js +16 -8
- package/src/Redux/ActionsReducers/ApplicationRedux.js +8 -4
- package/src/Redux/ActionsReducers/BulkUpdateRedux.js +6 -3
- package/src/Redux/ActionsReducers/CalculatedColumnRedux.js +10 -5
- package/src/Redux/ActionsReducers/CellSummaryRedux.js +2 -1
- package/src/Redux/ActionsReducers/ConditionalStyleRedux.js +14 -7
- package/src/Redux/ActionsReducers/CustomSortRedux.js +14 -7
- package/src/Redux/ActionsReducers/DashboardRedux.js +24 -12
- package/src/Redux/ActionsReducers/ExportRedux.js +16 -8
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +16 -8
- package/src/Redux/ActionsReducers/FormatColumnRedux.js +14 -7
- package/src/Redux/ActionsReducers/FreeTextColumnRedux.js +14 -7
- package/src/Redux/ActionsReducers/GridRedux.js +38 -19
- package/src/Redux/ActionsReducers/LayoutRedux.js +30 -15
- package/src/Redux/ActionsReducers/PluginsRedux.js +4 -2
- package/src/Redux/ActionsReducers/PlusMinusRedux.js +16 -8
- package/src/Redux/ActionsReducers/PopupRedux.js +37 -19
- package/src/Redux/ActionsReducers/QueryRedux.js +12 -6
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +8 -4
- package/src/Redux/ActionsReducers/ScheduleRedux.js +58 -29
- package/src/Redux/ActionsReducers/ShortcutRedux.js +14 -7
- package/src/Redux/ActionsReducers/SmartEditRedux.js +6 -3
- package/src/Redux/ActionsReducers/StatusBarRedux.js +10 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +103 -51
- package/src/Redux/ActionsReducers/SystemStatusRedux.js +4 -2
- package/src/Redux/ActionsReducers/TeamSharingRedux.js +22 -11
- package/src/Redux/ActionsReducers/ThemeRedux.js +10 -5
- package/src/Redux/ActionsReducers/ToolPanelRedux.js +16 -8
- package/src/Redux/DeadRedux.js +16 -8
- package/src/Redux/Store/AdaptableReduxMerger.js +2 -1
- package/src/Redux/Store/AdaptableStore.js +10 -2
- package/src/Strategy/AlertModule.d.ts +2 -18
- package/src/Strategy/AlertModule.js +2 -1
- package/src/Strategy/ConditionalStyleModule.d.ts +2 -10
- package/src/Strategy/DashboardModule.js +3 -1
- package/src/Strategy/DataChangeHistoryModule.d.ts +2 -8
- package/src/Strategy/DataSetModule.d.ts +2 -13
- package/src/Strategy/ExportModule.d.ts +2 -13
- package/src/Strategy/ExportModule.js +1 -1
- package/src/Strategy/FilterModule.d.ts +2 -14
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/FlashingCellModule.d.ts +2 -9
- package/src/Strategy/GridInfoModule.js +6 -2
- package/src/Strategy/LayoutModule.d.ts +2 -17
- package/src/Strategy/LayoutModule.js +6 -3
- package/src/Strategy/PlusMinusModule.d.ts +2 -9
- package/src/Strategy/QuickSearchModule.d.ts +2 -7
- package/src/Strategy/ScheduleModule.d.ts +2 -13
- package/src/Strategy/ShortcutModule.d.ts +2 -9
- package/src/Strategy/StatusBarModule.js +2 -2
- package/src/Strategy/SystemStatusModule.d.ts +2 -7
- package/src/Strategy/ThemeModule.d.ts +2 -8
- package/src/Strategy/Utilities/getAlertBehaviourViewItems.js +2 -1
- package/src/Strategy/Utilities/getAlertPreviewViewItems.js +2 -1
- package/src/Strategy/Utilities/getCustomSortColumnViewItems.js +2 -1
- package/src/Strategy/Utilities/getCustomSortSortOrderViewItems.js +2 -1
- package/src/Strategy/Utilities/getExportColumnsViewItems.js +2 -1
- package/src/Strategy/Utilities/getExportRowsViewItems.js +2 -1
- package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
- package/src/Strategy/Utilities/getFlashingCellDurationViewItems.js +2 -1
- package/src/Strategy/Utilities/getFlashingCellStyleViewItems.d.ts +2 -6
- package/src/Strategy/Utilities/getFlashingCellStyleViewItems.js +2 -1
- package/src/Strategy/Utilities/getFlashingTargetViewItems.js +2 -1
- package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +2 -1
- package/src/Strategy/Utilities/getFormatColumnStyleViewItems.js +2 -1
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +2 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +2 -1
- package/src/Strategy/Utilities/getScopeViewItems.js +2 -1
- package/src/Strategy/Utilities/getShortcutSettingsViewItems.js +2 -1
- package/src/Strategy/Utilities/getStyleViewItems.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +13 -13
- package/src/Utilities/ExpressionFunctions/dateUtils.js +2 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +20 -10
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -3
- package/src/Utilities/Helpers/DateHelper.js +10 -5
- package/src/Utilities/Helpers/Helper.js +2 -1
- package/src/Utilities/Helpers/LoggingHelper.js +2 -1
- package/src/Utilities/Helpers/StyleHelper.js +8 -4
- package/src/Utilities/MenuItem.d.ts +4 -3
- package/src/Utilities/MenuItem.js +9 -3
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +3 -3
- package/src/Utilities/Services/ModuleService.js +3 -1
- package/src/Utilities/Services/RowEditService.d.ts +6 -6
- package/src/Utilities/Services/RowEditService.js +24 -25
- package/src/Utilities/isAdaptableObject.js +2 -1
- package/src/Utilities/isMacLike.js +2 -1
- package/src/Utilities/license/decode.js +1 -1
- package/src/Utilities/reorder.js +2 -1
- package/src/Utilities/runIfNotResolvedIn.js +2 -1
- package/src/Utilities/waitForCondition.d.ts +1 -1
- package/src/Utilities/waitForCondition.js +2 -1
- package/src/View/AdaptableContext.js +2 -1
- package/src/View/AdaptableView.js +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +8 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +3 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +30 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +88 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +18 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +17 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +2 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +2 -75
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +3 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +9 -4
- package/src/View/AdaptableWizardView/Utils.d.ts +1 -0
- package/src/View/AdaptableWizardView/Utils.js +25 -0
- package/src/View/AdaptableWizardView/Wizard.d.ts +54 -0
- package/src/View/AdaptableWizardView/Wizard.js +100 -0
- package/src/View/AdaptableWizardView/helper.js +6 -3
- package/src/View/AdaptableWizardView/index.d.ts +1 -22
- package/src/View/AdaptableWizardView/index.js +2 -103
- package/src/View/Alert/ActiveAlertsPanel.js +2 -1
- package/src/View/Alert/AlertEmptyView.js +2 -1
- package/src/View/Alert/AlertStatusSubPanel.js +2 -1
- package/src/View/Alert/Utilities/getAlertButtonStyle.js +2 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +5 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +3 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +8 -5
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +4 -2
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +2 -1
- package/src/View/Alert/Wizard/AlertWizard.js +2 -1
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +3 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +6 -4
- package/src/View/Alert/Wizard/isValidAlertRules.js +2 -1
- package/src/View/CalculatedColumn/CalculatedColumnSummary.d.ts +1 -1
- package/src/View/CalculatedColumn/Utilities/getCalculatedColumnSettingTags.js +2 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +7 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +7 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -1
- package/src/View/CellSummary/CellSummaryPopover.js +2 -1
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +2 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -1
- package/src/View/ColorPicker.d.ts +5 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableDateInput/index.js +10 -10
- package/src/View/Components/AdaptableInput/index.d.ts +2 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +4 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +4 -2
- package/src/View/Components/Buttons/ButtonClone.js +2 -1
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonEdit.js +2 -1
- package/src/View/Components/Buttons/ButtonNew.js +2 -1
- package/src/View/Components/ColumnSelector/index.js +2 -1
- package/src/View/Components/EntityRulesEditor/index.js +6 -3
- package/src/View/Components/ExpressionWizard.js +2 -1
- package/src/View/Components/ExternalRenderer.js +2 -1
- package/src/View/Components/FilterForm/FilterForm.js +2 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +2 -1
- package/src/View/Components/FilterForm/ListBoxMenu.js +2 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -3
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.js +2 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -2
- package/src/View/Components/ListBox/DualListBoxEditor.js +2 -1
- package/src/View/Components/ModuleValueSelector/index.js +2 -1
- package/src/View/Components/NewScopeComponent.js +6 -3
- package/src/View/Components/Panels/PanelFooter.js +2 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +1 -429
- package/src/View/Components/Panels/PanelWithImage.js +2 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/CustomSettingsPanelView.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -5
- package/src/View/Components/Popups/AdaptablePopup/PopupContext.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/PopupPanel.js +2 -1
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +6 -5
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.js +4 -4
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +2 -1
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +2 -1
- package/src/View/Components/Popups/AdaptableToaster.js +2 -1
- package/src/View/Components/Popups/FormPopups/FormPopups.js +4 -2
- package/src/View/Components/Popups/Utilities.js +8 -4
- package/src/View/Components/Popups/WindowPopups/WindowPopups.js +2 -1
- package/src/View/Components/Selectors/ColumnSelector.js +2 -1
- package/src/View/Components/TagValueSelector/index.js +4 -2
- package/src/View/Components/ToolPanel/AdaptableToolPanel.d.ts +1 -1
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +5 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +2 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.d.ts +1 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +1 -1
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +2 -1
- package/src/View/Components/WizardSummaryPage.js +2 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +3 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +5 -3
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +3 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +8 -5
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +7 -4
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +2 -1
- package/src/View/Dashboard/CustomDashboardButton.js +2 -1
- package/src/View/Dashboard/CustomToolbarWrapper.js +2 -1
- package/src/View/Dashboard/Dashboard.d.ts +1 -1
- package/src/View/Dashboard/Dashboard.js +4 -3
- package/src/View/Dashboard/DashboardPopup.js +1 -1
- package/src/View/Dashboard/ModuleToolbarWrapper.js +2 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.d.ts +7 -0
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +6 -6
- package/src/View/DataChangeHistory/DataChangeHistoryStatusBarContent.js +2 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +2 -1
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +2 -2
- package/src/View/DataChangeHistory/buildActionColumnButton.js +13 -9
- package/src/View/DataSet/DataSetSelector.js +2 -1
- package/src/View/DataSet/DataSetStatusPanelPopover.js +2 -1
- package/src/View/DataSet/DataSetViewPanel.d.ts +1 -1
- package/src/View/Export/ExportSelector.js +2 -1
- package/src/View/Export/ExportViewPanel.d.ts +1 -1
- package/src/View/Export/ReportExportDropdown.js +2 -1
- package/src/View/Export/Wizard/NewReportWizard.js +4 -2
- package/src/View/Export/Wizard/ReportColumnsWizardSection.js +7 -4
- package/src/View/Export/Wizard/ReportNameWizardSection.js +7 -4
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +7 -4
- package/src/View/Filter/ActiveFiltersPanel.js +2 -1
- package/src/View/Filter/FilterStatusBarSubPanelPopover.js +2 -1
- package/src/View/Filter/FilterSummary.d.ts +1 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -1
- package/src/View/FlashingCell/FlashingCellStyle.js +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +6 -4
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +3 -2
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +11 -6
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +7 -4
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +2 -1
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +2 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +9 -5
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +5 -3
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +5 -3
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +5 -3
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -4
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnWizard.js +2 -1
- package/src/View/GridInfo/AdaptableObjectsSummary.js +2 -1
- package/src/View/GridInfo/AdaptableOptionsComponent.js +2 -1
- package/src/View/GridInfo/GridInfoPopup.js +5 -5
- package/src/View/KeyHint.js +2 -1
- package/src/View/Layout/EditCurrentLayoutButton.js +2 -1
- package/src/View/Layout/LayoutCloneButton.js +2 -1
- package/src/View/Layout/LayoutEditorStandalonePopup.js +2 -1
- package/src/View/Layout/LayoutPopup.d.ts +1 -1
- package/src/View/Layout/LayoutRadioSelector.js +2 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +2 -1
- package/src/View/Layout/LayoutViewPanel.d.ts +1 -1
- package/src/View/Layout/Wizard/LayoutEditor/ColumnLabels.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/ColumnList.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/ColumnSortList.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/PivotList.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/RowGroupsList.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/getItemStyle.js +2 -1
- package/src/View/Layout/Wizard/LayoutEditor/reducer.js +4 -2
- package/src/View/Layout/Wizard/LayoutEditor/utils.js +2 -1
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +3 -2
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +8 -5
- package/src/View/PlusMinus/Wizard/PlusMinusWizard.js +2 -1
- package/src/View/Query/EditCurrentQueryButton.js +2 -1
- package/src/View/Query/ExpandedQueryPopup.js +2 -1
- package/src/View/Query/QueryViewPanel.d.ts +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +7 -4
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +7 -4
- package/src/View/QuickSearch/QuickSearchStatusBarContent.js +2 -1
- package/src/View/QuickSearch/QuickSearchViewPanel.d.ts +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.js +2 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleSummary.js +3 -2
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +5 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsGlue42.js +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsIPushPull.js +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsOpenFin.js +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +2 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +5 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +3 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/isSettingsValid.js +2 -1
- package/src/View/Schedule/Wizard/ScheduleWizard.js +2 -1
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +3 -2
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +8 -5
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +2 -1
- package/src/View/SpecialColumnSettingsWizardStep.js +2 -1
- package/src/View/StateManagement/StateManagementPopup.js +2 -1
- package/src/View/StateManagement/StateManagementViewPanel.js +2 -1
- package/src/View/StateManagement/components/ClearButton.js +2 -1
- package/src/View/StateManagement/components/ExportDropdown.js +2 -1
- package/src/View/StateManagement/components/LoadButton.js +2 -1
- package/src/View/StateManagement/handleExportState.js +2 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +2 -1
- package/src/View/StatusBar/StatusBarPanel.js +2 -1
- package/src/View/StatusBar/StatusBarPopup.js +5 -4
- package/src/View/SystemStatus/SystemStatusStatusBarContent.js +2 -1
- package/src/View/SystemStatus/SystemStatusViewPanel.d.ts +1 -1
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +2 -1
- package/src/View/Theme/ThemeStatusPanelPopover.js +2 -1
- package/src/View/UIHelper.d.ts +2 -0
- package/src/View/UIHelper.js +12 -11
- package/src/View/Wizard/AdaptableWizard.js +2 -1
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -2
- package/src/View/Wizard/ObjectTagsWizardSection.js +5 -3
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +5 -6
- package/src/View/Wizard/OnePageAdaptableWizard.js +45 -174
- package/src/View/Wizard/OnePageWizards.d.ts +37 -0
- package/src/View/Wizard/OnePageWizards.js +191 -0
- package/src/View/Wizard/useKeyboardNavigation.d.ts +1 -1
- package/src/View/Wizard/useKeyboardNavigation.js +2 -1
- package/src/View/renderWithAdaptableContext.js +2 -1
- package/src/agGrid/ActionColumnRenderer.d.ts +1 -1
- package/src/agGrid/ActionColumnRenderer.js +1 -1
- package/src/agGrid/Adaptable.js +28 -26
- package/src/agGrid/CheckboxRenderer.js +2 -1
- package/src/agGrid/FilterWrapper.js +2 -1
- package/src/agGrid/FloatingFilterWrapper.js +2 -1
- package/src/agGrid/PercentBarRenderer.js +2 -1
- package/src/agGrid/agGridHelper.js +3 -1
- package/src/agGrid/agGridMenuHelper.js +13 -10
- package/src/agGrid/createAgStatusPanelComponent.js +2 -1
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +8 -5
- package/src/components/AdaptableIconComponent/index.d.ts +10 -0
- package/src/components/AdaptableIconComponent/index.js +40 -0
- package/src/components/CheckBox/index.js +2 -1
- package/src/components/CodeBlock/index.js +2 -1
- package/src/components/Dashboard/DashboardManager.js +1 -1
- package/src/components/Datepicker/Caption.js +1 -1
- package/src/components/Datepicker/DatepickerContext.js +2 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/DragAndDropContext/ModuleManager.d.ts +1 -0
- package/src/components/DragAndDropContext/ModuleManager.js +5 -4
- package/src/components/DragAndDropContext/UnusedPanel.d.ts +3 -2
- package/src/components/DragAndDropContext/UnusedPanel.js +14 -12
- package/src/components/EllipsisContainer/index.js +4 -2
- package/src/components/ExpressionEditor/EditorContext.js +2 -1
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +2 -1
- package/src/components/ExpressionEditor/NamedQueryContext.js +3 -1
- package/src/components/FileDroppable/index.js +2 -1
- package/src/components/FormLayout/index.js +2 -1
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +2 -4
- package/src/components/Loader/Loader.js +4 -2
- package/src/components/Logo/index.js +2 -1
- package/src/components/Modal/Backdrop.js +2 -1
- package/src/components/Modal/index.js +2 -1
- package/src/components/OverlayTrigger/Overlay.js +2 -1
- package/src/components/OverlayTrigger/index.js +2 -1
- package/src/components/OverlayTrigger/utils.js +6 -3
- package/src/components/PopupWithFooter.d.ts +1 -1
- package/src/components/ProgressIndicator/ProgressIndicator.js +2 -1
- package/src/components/Radio/index.js +4 -2
- package/src/components/ResizeObserver/getResizeObserverObject.js +2 -1
- package/src/components/ResizeObserver/index.js +6 -3
- package/src/components/SelectList.js +2 -1
- package/src/components/SelectableList/index.js +2 -1
- package/src/components/SimpleButton/index.d.ts +2 -1
- package/src/components/SimpleButton/index.js +19 -6
- package/src/components/StylePreview.js +2 -1
- package/src/components/Tabs/index.js +6 -3
- package/src/components/Textarea/index.d.ts +5 -1
- package/src/components/ToggleButton/index.js +2 -1
- package/src/components/WindowModal/WindowModal.js +15 -8
- package/src/components/WindowModal/useStacking.js +2 -1
- package/src/components/icons/DefaultIcon.js +2 -1
- package/src/components/icons/index.d.ts +3 -1
- package/src/components/icons/index.js +10 -2
- package/src/components/utils/useContainerScrollObserver/index.js +2 -1
- package/src/components/utils/useGlobalEvent.js +2 -1
- package/src/components/utils/useLatest.js +2 -1
- package/src/components/utils/useRerender.js +2 -1
- package/src/components/utils/uuid.js +2 -1
- package/src/metamodel/adaptable.metamodel.d.ts +208 -90
- package/src/metamodel/adaptable.metamodel.js +263 -156
- package/src/types.d.ts +7 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Api/Events/RowFormSubmitted.d.ts +0 -19
- package/src/components/ApplicationIcon.d.ts +0 -6
- package/src/components/ApplicationIcon.js +0 -13
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const SelectList_1 = require("../../components/SelectList");
|
|
7
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
|
-
|
|
8
|
+
const ThemeStatusPanelPopover = () => {
|
|
9
9
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
10
10
|
const themes = adaptable.api.themeApi.getAllTheme();
|
|
11
11
|
const handleThemeChange = React.useCallback((option) => {
|
|
@@ -14,3 +14,4 @@ exports.ThemeStatusPanelPopover = () => {
|
|
|
14
14
|
const options = themes.map((theme) => ({ label: theme.Name, value: theme.Uuid }));
|
|
15
15
|
return React.createElement(SelectList_1.SelectList, { options: options, onChange: handleThemeChange });
|
|
16
16
|
};
|
|
17
|
+
exports.ThemeStatusPanelPopover = ThemeStatusPanelPopover;
|
package/src/View/UIHelper.d.ts
CHANGED
|
@@ -50,6 +50,7 @@ export declare function getButtonColourForAdaptableAlerts(adaptableAlerts: Adapt
|
|
|
50
50
|
export declare function getButtonTextColourForArrayandMessageType(adaptableAlerts: AdaptableAlert[], messageType: AdaptableMessageType): string;
|
|
51
51
|
export declare function getButtonTextColourForMessageType(messageType: AdaptableMessageType): string;
|
|
52
52
|
export declare function getAdaptableToolPanelWidth(): number;
|
|
53
|
+
export declare function getSimpleButtonPaddingWidth(): number;
|
|
53
54
|
export declare function getCSSVariableValue(cssVariable: string): string | undefined;
|
|
54
55
|
export declare function setCSSVariableValue(cssVariable: string, value: string): void;
|
|
55
56
|
export declare function isBrowserDocumentAvailable(): boolean;
|
|
@@ -81,5 +82,6 @@ export declare const UIHelper: {
|
|
|
81
82
|
setCSSVariableValue: typeof setCSSVariableValue;
|
|
82
83
|
getAdaptableToolPanelWidth: typeof getAdaptableToolPanelWidth;
|
|
83
84
|
isBrowserDocumentAvailable: typeof isBrowserDocumentAvailable;
|
|
85
|
+
getSimpleButtonPaddingWidth: typeof getSimpleButtonPaddingWidth;
|
|
84
86
|
};
|
|
85
87
|
export default UIHelper;
|
package/src/View/UIHelper.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.getModalContainer = exports.getPlaceholderForDataType = exports.getDescriptionForDataType = exports.getEmptyConfigState = exports.getDefaultColors = exports.getHexForName = exports.ORANGE = exports.LIGHT_RED = exports.RED = exports.DARK_RED = exports.PURPLE = exports.MAGENTA = exports.CYAN = exports.LIGHT_BLUE = exports.BLUE = exports.DARK_BLUE = exports.LIGHT_YELLOW = exports.YELLOW = exports.LIME_GREEN = exports.GREEN = exports.DARK_GREEN = exports.BROWN = exports.GRAY = exports.LIGHT_GRAY = exports.WHITE = exports.BLACK = void 0;
|
|
3
|
+
exports.UIHelper = exports.isBrowserDocumentAvailable = exports.setCSSVariableValue = exports.getCSSVariableValue = exports.getSimpleButtonPaddingWidth = exports.getAdaptableToolPanelWidth = exports.getButtonTextColourForMessageType = exports.getButtonTextColourForArrayandMessageType = exports.getButtonColourForAdaptableAlerts = exports.getMessageTypeFromAdaptableAlerts = exports.getWeekDayByIndex = exports.getScheduleDescription = exports.getButtonToneForMessageType = exports.getGlyphForMessageType = exports.getGlyphForStatusColour = exports.getStyleForMessageType = exports.getStyleForStatusColour = exports.getColorByMessageType = exports.getGlyphByMessageType = exports.getButtonToneByMessageType = exports.getMessageTypeByStatusColour = exports.IsNotEmptyStyle = exports.IsEmptyStyle = exports.getModalContainer = exports.getPlaceholderForDataType = exports.getDescriptionForDataType = exports.getEmptyConfigState = exports.getDefaultColors = exports.getHexForName = exports.ORANGE = exports.LIGHT_RED = exports.RED = exports.DARK_RED = exports.PURPLE = exports.MAGENTA = exports.CYAN = exports.LIGHT_BLUE = exports.BLUE = exports.DARK_BLUE = exports.LIGHT_YELLOW = exports.YELLOW = exports.LIME_GREEN = exports.GREEN = exports.DARK_GREEN = exports.BROWN = exports.GRAY = exports.LIGHT_GRAY = exports.WHITE = exports.BLACK = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const EditableConfigEntityState_1 = require("./Components/SharedProps/EditableConfigEntityState");
|
|
6
6
|
const Enums_1 = require("../PredefinedConfig/Common/Enums");
|
|
@@ -428,19 +428,19 @@ function getButtonTextColourForMessageType(messageType) {
|
|
|
428
428
|
}
|
|
429
429
|
}
|
|
430
430
|
exports.getButtonTextColourForMessageType = getButtonTextColourForMessageType;
|
|
431
|
-
function
|
|
431
|
+
function getNumericCSSVariableValue(stringValue, defaultValue) {
|
|
432
432
|
var _a;
|
|
433
|
-
const
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
// default
|
|
441
|
-
return 200;
|
|
433
|
+
const numericValue = typeof stringValue === 'string' ? +((_a = stringValue.match(/\d/g)) === null || _a === void 0 ? void 0 : _a.join('')) : stringValue;
|
|
434
|
+
return typeof numericValue === 'number' ? numericValue : defaultValue;
|
|
435
|
+
}
|
|
436
|
+
function getAdaptableToolPanelWidth() {
|
|
437
|
+
return getNumericCSSVariableValue(getCSSVariableValue('--ab-cmp-toolpanel__width'), 200);
|
|
442
438
|
}
|
|
443
439
|
exports.getAdaptableToolPanelWidth = getAdaptableToolPanelWidth;
|
|
440
|
+
function getSimpleButtonPaddingWidth() {
|
|
441
|
+
return getNumericCSSVariableValue(getCSSVariableValue('--ab-space-1'), 4);
|
|
442
|
+
}
|
|
443
|
+
exports.getSimpleButtonPaddingWidth = getSimpleButtonPaddingWidth;
|
|
444
444
|
function getCSSVariableValue(cssVariable) {
|
|
445
445
|
if (!isBrowserDocumentAvailable()) {
|
|
446
446
|
// possible during static/server-side rendering (should happen only in test cases)
|
|
@@ -489,5 +489,6 @@ exports.UIHelper = {
|
|
|
489
489
|
setCSSVariableValue,
|
|
490
490
|
getAdaptableToolPanelWidth,
|
|
491
491
|
isBrowserDocumentAvailable,
|
|
492
|
+
getSimpleButtonPaddingWidth,
|
|
492
493
|
};
|
|
493
494
|
exports.default = exports.UIHelper;
|
|
@@ -16,9 +16,10 @@ exports.AdaptableWizardContext = React.createContext({
|
|
|
16
16
|
onRender: (ActiveStep) => { },
|
|
17
17
|
api: null,
|
|
18
18
|
});
|
|
19
|
-
|
|
19
|
+
const useWizardContext = () => {
|
|
20
20
|
return React.useContext(exports.AdaptableWizardContext);
|
|
21
21
|
};
|
|
22
|
+
exports.useWizardContext = useWizardContext;
|
|
22
23
|
class DummyActiveStep {
|
|
23
24
|
canNext() {
|
|
24
25
|
return false;
|
|
@@ -34,9 +34,9 @@ export interface AdaptableObjectAdaptableWizardProps<View> extends AdaptableWiza
|
|
|
34
34
|
api: AdaptableApi;
|
|
35
35
|
}
|
|
36
36
|
export interface AdaptableOnePageWizardProps<T extends AdaptableObject> {
|
|
37
|
-
moduleInfo
|
|
37
|
+
moduleInfo?: ModuleInfo;
|
|
38
38
|
data: T;
|
|
39
|
-
configEntities
|
|
39
|
+
configEntities?: T[];
|
|
40
40
|
wizardStartIndex?: number;
|
|
41
41
|
onCloseWizard: VoidFunction;
|
|
42
42
|
onFinishWizard: (data: T) => void;
|
|
@@ -7,16 +7,18 @@ const Tabs_1 = require("../../components/Tabs");
|
|
|
7
7
|
const TagValueSelector_1 = require("../Components/TagValueSelector");
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("./OnePageAdaptableWizard");
|
|
9
9
|
const rebass_1 = require("rebass");
|
|
10
|
-
|
|
10
|
+
const ObjectTagsWizardSection = (props) => {
|
|
11
11
|
const { onChange } = props;
|
|
12
|
-
const { data } = OnePageAdaptableWizard_1.
|
|
12
|
+
const { data } = OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext();
|
|
13
13
|
return (React.createElement(Tabs_1.Tabs, { style: { height: '100%' } },
|
|
14
14
|
React.createElement(Tabs_1.Tabs.Tab, null, "Tags"),
|
|
15
15
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
16
16
|
React.createElement(TagValueSelector_1.TagValueSelector, { selectedTags: data.Tags, onChange: (selectedTags) => onChange(Object.assign(Object.assign({}, data), { Tags: selectedTags })) }))));
|
|
17
17
|
};
|
|
18
|
-
exports.
|
|
18
|
+
exports.ObjectTagsWizardSection = ObjectTagsWizardSection;
|
|
19
|
+
const renderObjectTagsSummary = (data) => {
|
|
19
20
|
var _a;
|
|
20
21
|
return ((_a = data.Tags) === null || _a === void 0 ? void 0 : _a.length) ? (React.createElement(rebass_1.Text, { fontSize: 2 },
|
|
21
22
|
React.createElement(TagValueSelector_1.TagValueOptionsTags, { tags: data.Tags }))) : null;
|
|
22
23
|
};
|
|
24
|
+
exports.renderObjectTagsSummary = renderObjectTagsSummary;
|
|
@@ -6,29 +6,28 @@ import { ModuleInfo } from '../../Strategy/Interface/IModule';
|
|
|
6
6
|
import { ExpressionEditorNamedQuery } from '../../components/ExpressionEditor/NamedQueryContext';
|
|
7
7
|
export declare type OnePageAdaptableWizardContextType<T> = {
|
|
8
8
|
data: T;
|
|
9
|
-
sections: (
|
|
9
|
+
sections: (OnePageAdaptableWizardSection<T> | '-')[];
|
|
10
10
|
moduleInfo: ModuleInfo;
|
|
11
11
|
api: AdaptableApi;
|
|
12
|
-
setCurrentSection: (index: number) => void;
|
|
13
12
|
namedQuery: ExpressionEditorNamedQuery;
|
|
14
13
|
};
|
|
15
14
|
export declare const SummaryTag: React.FunctionComponent<TextProps>;
|
|
16
15
|
export declare const SummaryText: React.FunctionComponent<TextProps>;
|
|
17
16
|
export declare const FormDescriptionText: React.FunctionComponent<TextProps>;
|
|
18
17
|
export declare const OnePageAdaptableWizardContext: React.Context<OnePageAdaptableWizardContextType<any>>;
|
|
19
|
-
export declare function
|
|
20
|
-
export
|
|
18
|
+
export declare function useOnePageAdaptableWizardContext<ENTITY>(): OnePageAdaptableWizardContextType<ENTITY>;
|
|
19
|
+
export interface OnePageAdaptableWizardSection<ENTITY> {
|
|
21
20
|
title: string;
|
|
22
21
|
details?: React.ReactNode;
|
|
23
22
|
isValid?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => true | string;
|
|
24
23
|
isVisible?: (data: ENTITY, api: AdaptableApi, context: OnePageAdaptableWizardContextType<ENTITY>) => boolean;
|
|
25
24
|
render: (data: ENTITY, index: number) => React.ReactNode;
|
|
26
25
|
renderSummary?: (data: ENTITY, api: AdaptableApi) => React.ReactNode;
|
|
27
|
-
}
|
|
26
|
+
}
|
|
28
27
|
export interface OnePageAdaptableWizardProps<ENTITY> {
|
|
29
28
|
moduleInfo: ModuleInfo;
|
|
30
29
|
data: ENTITY;
|
|
31
|
-
sections: (
|
|
30
|
+
sections: (OnePageAdaptableWizardSection<ENTITY> | '-')[];
|
|
32
31
|
currentIndex?: number;
|
|
33
32
|
defaultCurrentIndex?: number;
|
|
34
33
|
defaultCurrentSectionName?: string;
|
|
@@ -1,212 +1,82 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OnePageWizardSummary = exports.OnePageAdaptableWizard = exports.
|
|
3
|
+
exports.OnePageWizardSummary = exports.OnePageAdaptableWizard = exports.useOnePageAdaptableWizardContext = exports.OnePageAdaptableWizardContext = exports.FormDescriptionText = exports.SummaryText = exports.SummaryTag = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
7
7
|
const react_redux_1 = require("react-redux");
|
|
8
8
|
const rebass_1 = require("rebass");
|
|
9
9
|
const QueryRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QueryRedux"));
|
|
10
|
-
const Dialog_1 = tslib_1.__importDefault(require("../../components/Dialog"));
|
|
11
10
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
12
|
-
const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
|
|
13
|
-
const useProperty_1 = tslib_1.__importDefault(require("../../components/utils/useProperty"));
|
|
14
11
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
15
|
-
const isMacLike_1 = require("../../Utilities/isMacLike");
|
|
16
12
|
const Tabs_1 = require("../../components/Tabs");
|
|
17
|
-
const KeyHint_1 = require("../KeyHint");
|
|
18
|
-
const icons_1 = require("../../components/icons");
|
|
19
|
-
const ResizeObserver_1 = require("../../components/ResizeObserver");
|
|
20
13
|
const NamedQueryContext_1 = require("../../components/ExpressionEditor/NamedQueryContext");
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
exports.
|
|
14
|
+
const OnePageWizards_1 = require("./OnePageWizards");
|
|
15
|
+
const kebabCase_1 = tslib_1.__importDefault(require("lodash/kebabCase"));
|
|
16
|
+
const SummaryTag = (props) => React.createElement(rebass_1.Text, Object.assign({}, props));
|
|
17
|
+
exports.SummaryTag = SummaryTag;
|
|
18
|
+
const SummaryText = (props) => (React.createElement(rebass_1.Text, Object.assign({ fontSize: 2, mb: 3 }, props)));
|
|
19
|
+
exports.SummaryText = SummaryText;
|
|
20
|
+
const FormDescriptionText = (props) => (React.createElement(rebass_1.Text, Object.assign({ fontSize: 2, mt: 1 }, props)));
|
|
21
|
+
exports.FormDescriptionText = FormDescriptionText;
|
|
25
22
|
exports.OnePageAdaptableWizardContext = React.createContext({
|
|
26
23
|
data: null,
|
|
27
24
|
sections: [],
|
|
28
25
|
moduleInfo: null,
|
|
29
|
-
setCurrentSection: (index) => { },
|
|
30
26
|
api: null,
|
|
31
27
|
namedQuery: false,
|
|
32
28
|
});
|
|
33
|
-
function
|
|
29
|
+
function useOnePageAdaptableWizardContext() {
|
|
34
30
|
return React.useContext(exports.OnePageAdaptableWizardContext);
|
|
35
31
|
}
|
|
36
|
-
exports.
|
|
37
|
-
|
|
38
|
-
var _a, _b;
|
|
32
|
+
exports.useOnePageAdaptableWizardContext = useOnePageAdaptableWizardContext;
|
|
33
|
+
const OnePageAdaptableWizard = (props) => {
|
|
39
34
|
const { api } = AdaptableContext_1.useAdaptable();
|
|
40
35
|
const dispatch = react_redux_1.useDispatch();
|
|
41
36
|
const saveNamedQuery = React.useCallback((namedQuery) => dispatch(QueryRedux.NamedQueryAdd(namedQuery)), []);
|
|
42
|
-
let defaultCurrentIndex = 0;
|
|
43
|
-
if (props.defaultCurrentSectionName) {
|
|
44
|
-
const candidate = props.sections.findIndex((section) => section !== '-' && section.title === props.defaultCurrentSectionName);
|
|
45
|
-
if (candidate >= 0) {
|
|
46
|
-
defaultCurrentIndex = candidate;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
const [currentSection, setCurrentSection] = useProperty_1.default(props, 'currentIndex', defaultCurrentIndex, {
|
|
50
|
-
onChange: (index) => {
|
|
51
|
-
var _a;
|
|
52
|
-
(_a = props.onSectionChange) === null || _a === void 0 ? void 0 : _a.call(props, index);
|
|
53
|
-
},
|
|
54
|
-
});
|
|
55
37
|
const [namedQuery, setNamedQuery] = react_1.useState(false);
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
saveNamedQuery(namedQuery);
|
|
61
|
-
}
|
|
62
|
-
(_a = props.onFinish) === null || _a === void 0 ? void 0 : _a.call(props, props.data);
|
|
63
|
-
};
|
|
64
|
-
const renderSection = (index) => {
|
|
65
|
-
const section = visibleSections[index];
|
|
66
|
-
if (section === '-') {
|
|
67
|
-
return React.createElement(React.Fragment, { key: index });
|
|
68
|
-
}
|
|
69
|
-
return (React.createElement(rebass_1.Flex, { flexDirection: "column", key: index, "data-name": `section-${index}`, style: { minHeight: '100%' }, mr: 2 },
|
|
70
|
-
React.createElement(rebass_1.Box, { py: 3, paddingLeft: 2, fontSize: 4, className: "ab-OnePageWizard__details" }, section.details),
|
|
71
|
-
React.createElement(rebass_1.Box, { flex: 1, className: "ab-OnePageWizard__section" }, section.render(props.data, index))));
|
|
72
|
-
};
|
|
73
|
-
const selectedNodeRef = react_1.useRef(null);
|
|
74
|
-
const selectedFeedback = (React.createElement("div", { ref: selectedNodeRef, className: "ab-OnePageWizard__selected-title-overlay", style: {
|
|
75
|
-
position: 'absolute',
|
|
76
|
-
background: 'var(--ab-cmp-one-page-wizard-selected-title__background)',
|
|
77
|
-
pointerEvents: 'none',
|
|
78
|
-
borderRadius: 'var(--ab__border-radius)',
|
|
79
|
-
transition: 'top 0.2s',
|
|
80
|
-
} }));
|
|
81
|
-
const sizeOwnerRef = react_1.useRef(null);
|
|
82
|
-
const [width, setWidth] = react_1.useState(0);
|
|
83
|
-
ResizeObserver_1.useResizeObserver(sizeOwnerRef, ({ width }) => {
|
|
84
|
-
setWidth(width);
|
|
85
|
-
});
|
|
86
|
-
React.useEffect(() => {
|
|
87
|
-
const node = selectedNodeRef.current;
|
|
88
|
-
const parent = node.parentNode;
|
|
89
|
-
const activeElement = parent.children[currentSection];
|
|
90
|
-
node.style.top = `${activeElement.offsetTop}px`;
|
|
91
|
-
node.style.left = `${activeElement.offsetLeft}px`;
|
|
92
|
-
node.style.height = `${activeElement.offsetHeight}px`;
|
|
93
|
-
node.style.width = `${activeElement.offsetWidth}px`;
|
|
94
|
-
}, [currentSection, width]);
|
|
95
|
-
let navIndex = 0;
|
|
96
|
-
const dialogRef = react_1.useRef(null);
|
|
97
|
-
let invalidCount = 0;
|
|
98
|
-
let firstErrorMessage = null;
|
|
99
|
-
const contextValue = {
|
|
38
|
+
const name = props.moduleInfo.FriendlyName
|
|
39
|
+
? `${kebabCase_1.default(props.moduleInfo.FriendlyName)}-wizard`
|
|
40
|
+
: '';
|
|
41
|
+
const extraContext = {
|
|
100
42
|
data: props.data,
|
|
101
43
|
api,
|
|
102
|
-
//visible sections is updated below, as this is a chicken-egg problem
|
|
103
|
-
sections: props.sections,
|
|
104
|
-
setCurrentSection,
|
|
105
44
|
namedQuery,
|
|
106
45
|
moduleInfo: props.moduleInfo,
|
|
46
|
+
sections: props.sections,
|
|
107
47
|
};
|
|
108
|
-
const
|
|
109
|
-
return props.sections.filter((section) => section === '-' ||
|
|
110
|
-
section.isVisible == undefined ||
|
|
111
|
-
section.isVisible(props.data, api, contextValue));
|
|
112
|
-
}, [props.sections]);
|
|
113
|
-
contextValue.sections = visibleSections;
|
|
114
|
-
const validSectionsMap = visibleSections.reduce((acc, section, index) => {
|
|
48
|
+
const sections = props.sections.map((section) => {
|
|
115
49
|
if (section === '-') {
|
|
116
|
-
|
|
117
|
-
return acc;
|
|
50
|
+
return '-';
|
|
118
51
|
}
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
52
|
+
const isValid = typeof section.isValid === 'function'
|
|
53
|
+
? (data, innerContext) => {
|
|
54
|
+
return section.isValid(data, api, Object.assign(Object.assign({}, innerContext), extraContext));
|
|
55
|
+
}
|
|
56
|
+
: void 0;
|
|
57
|
+
const isVisible = typeof section.isVisible === 'function'
|
|
58
|
+
? (data, innerContext) => {
|
|
59
|
+
return section.isVisible(data, api, Object.assign(Object.assign({}, innerContext), extraContext));
|
|
124
60
|
}
|
|
61
|
+
: void 0;
|
|
62
|
+
return Object.assign(Object.assign({}, section), { isValid,
|
|
63
|
+
isVisible });
|
|
64
|
+
});
|
|
65
|
+
const handleClickFinish = () => {
|
|
66
|
+
var _a;
|
|
67
|
+
if (namedQuery && namedQuery.Name) {
|
|
68
|
+
saveNamedQuery(namedQuery);
|
|
125
69
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
return (React.createElement(NamedQueryContext_1.NamedQueryContext.Provider, { value: { namedQuery, setNamedQuery } },
|
|
132
|
-
React.createElement(exports.OnePageAdaptableWizardContext.Provider, { value: contextValue },
|
|
133
|
-
React.createElement(Dialog_1.default, { modal: true, isOpen: true, showCloseButton: false, focusOnBrowserVisible: true, style: {
|
|
134
|
-
borderRadius: 'var(--ab__border-radius)',
|
|
135
|
-
overflow: 'hidden',
|
|
136
|
-
height: '80vh',
|
|
137
|
-
}, ref: dialogRef, onDismiss: () => { var _a; return (_a = props.onHide) === null || _a === void 0 ? void 0 : _a.call(props); }, onKeyDown: (event) => {
|
|
138
|
-
if (event.metaKey || event.ctrlKey) {
|
|
139
|
-
const { key } = event;
|
|
140
|
-
if (!isNaN(Number(key))) {
|
|
141
|
-
const num = Number(key);
|
|
142
|
-
if (navIndexMap.has(num)) {
|
|
143
|
-
const index = navIndexMap.get(num);
|
|
144
|
-
setCurrentSection(index);
|
|
145
|
-
event.preventDefault();
|
|
146
|
-
event.stopPropagation();
|
|
147
|
-
requestAnimationFrame(() => {
|
|
148
|
-
var _a;
|
|
149
|
-
(_a = dialogRef === null || dialogRef === void 0 ? void 0 : dialogRef.current) === null || _a === void 0 ? void 0 : _a.bringToFront();
|
|
150
|
-
});
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
}
|
|
154
|
-
} },
|
|
155
|
-
React.createElement(rebass_1.Flex, { className: "ab-OnePageWizard", flexDirection: "column", "data-name": props.moduleInfo.FriendlyName
|
|
156
|
-
? `${kebabCase_1.default(props.moduleInfo.FriendlyName)}-wizard`
|
|
157
|
-
: '', style: Object.assign({ height: '100%', width: '90vw', maxWidth: 1000 }, props.style) },
|
|
158
|
-
React.createElement(rebass_1.Flex, { flexDirection: "row", alignItems: "stretch", flex: 1, style: { overflow: 'auto' } },
|
|
159
|
-
React.createElement(rebass_1.Flex, { flexDirection: "column", padding: 3, className: "ab-OnePageWizard__section-title-container", ref: sizeOwnerRef, style: { overflow: 'auto', position: 'relative', flex: 'none' } },
|
|
160
|
-
visibleSections.map((section, index) => {
|
|
161
|
-
if (section === '-') {
|
|
162
|
-
return (React.createElement(rebass_1.Box, { as: "hr", mt: 2, className: "ab-OnePageWizard__section-separator", key: `${index}-`, style: {
|
|
163
|
-
width: '100%',
|
|
164
|
-
border: 'none',
|
|
165
|
-
borderTop: `1px solid var(--ab-color-inputborder)`,
|
|
166
|
-
} }));
|
|
167
|
-
}
|
|
168
|
-
navIndex++;
|
|
169
|
-
navIndexMap.set(navIndex, index);
|
|
170
|
-
const active = index === currentSection;
|
|
171
|
-
const disabled = false; //!active && !currentSectionValid;
|
|
172
|
-
return (React.createElement(rebass_1.Flex, { className: "ab-OnePageWizard__section-title", "data-name": section.title, flexDirection: "row", style: {
|
|
173
|
-
cursor: disabled ? 'auto' : 'pointer',
|
|
174
|
-
zIndex: 10,
|
|
175
|
-
transition: 'color 0.2s',
|
|
176
|
-
opacity: disabled ? 0.5 : 1,
|
|
177
|
-
}, key: section.title, color: active ? 'var(--ab-cmp-one-page-wizard-section-title__color)' : '', px: 2, py: 1, mt: index ? 2 : 0, onClick: () => {
|
|
178
|
-
if (disabled) {
|
|
179
|
-
return;
|
|
180
|
-
}
|
|
181
|
-
setCurrentSection(index);
|
|
182
|
-
} },
|
|
183
|
-
React.createElement(KeyHint_1.KeyHint, { mr: 2, style: { display: 'inline-block' } }, navIndex),
|
|
184
|
-
React.createElement("div", { style: { flex: 1 } }, section.title),
|
|
185
|
-
React.createElement(icons_1.Icon, { name: "error", style: {
|
|
186
|
-
marginLeft: 'var(--ab-space-2)',
|
|
187
|
-
visibility: validSectionsMap.get(index) !== true ? 'visible' : 'hidden',
|
|
188
|
-
} })));
|
|
189
|
-
}),
|
|
190
|
-
selectedFeedback,
|
|
191
|
-
React.createElement(rebass_1.Box, { flex: 1 }),
|
|
192
|
-
React.createElement(KeyHint_1.KeyHint, { style: { lineHeight: 1.5 }, className: "ab-OnePageWizard__key-hint" },
|
|
193
|
-
isMacLike_1.isMacLike() ? 'Cmd' : 'Ctrl',
|
|
194
|
-
" + #",
|
|
195
|
-
React.createElement("br", null),
|
|
196
|
-
"to navigate")),
|
|
197
|
-
React.createElement(rebass_1.Flex, { flex: 1, flexDirection: "column", className: "ab-OnePageWizard__section-container" }, renderSection(currentSection))),
|
|
198
|
-
React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 2, alignItems: "center", className: "ab-WizardDialog__footer ab-OnePageWizard__footer" },
|
|
199
|
-
React.createElement(SimpleButton_1.default, { tone: "neutral", variant: "text", "data-name": "close", onClick: () => { var _a; return (_a = props.onHide) === null || _a === void 0 ? void 0 : _a.call(props); }, tooltip: (_a = props.closeTooltip) !== null && _a !== void 0 ? _a : 'Close wizard', accessLevel: 'Full' }, (_b = props.closeText) !== null && _b !== void 0 ? _b : 'CLOSE'),
|
|
200
|
-
React.createElement(KeyHint_1.KeyHint, { ml: 2 }, "Esc"),
|
|
201
|
-
React.createElement(rebass_1.Text, { fontSize: 2, mr: 3, className: "ab-OnePageWizard__error", style: {
|
|
202
|
-
flex: 1,
|
|
203
|
-
color: 'var(--ab-color-error)',
|
|
204
|
-
textAlign: 'end',
|
|
205
|
-
} }, firstErrorMessage),
|
|
206
|
-
React.createElement(SimpleButton_1.default, { tone: "accent", "data-name": "finish", variant: "raised", disabled: canFinish !== true, onClick: () => handleClickFinish(), icon: 'check', accessLevel: 'Full' }, "Finish")))))));
|
|
70
|
+
(_a = props.onFinish) === null || _a === void 0 ? void 0 : _a.call(props, props.data);
|
|
71
|
+
};
|
|
72
|
+
return (React.createElement(exports.OnePageAdaptableWizardContext.Provider, { value: extraContext },
|
|
73
|
+
React.createElement(NamedQueryContext_1.NamedQueryContext.Provider, { value: { namedQuery, setNamedQuery } },
|
|
74
|
+
React.createElement(OnePageWizards_1.OnePageWizard, Object.assign({}, props, { name: name, sections: sections, onFinish: handleClickFinish })))));
|
|
207
75
|
};
|
|
208
|
-
exports.
|
|
209
|
-
|
|
76
|
+
exports.OnePageAdaptableWizard = OnePageAdaptableWizard;
|
|
77
|
+
const OnePageWizardSummary = () => {
|
|
78
|
+
const { setCurrentSection } = OnePageWizards_1.useOnePageWizardContext();
|
|
79
|
+
const { sections, data, api } = useOnePageAdaptableWizardContext();
|
|
210
80
|
const renderEdit = (index) => (React.createElement(SimpleButton_1.default, { px: 1, variant: "text", style: {
|
|
211
81
|
textDecoration: 'underline',
|
|
212
82
|
display: 'inline-block',
|
|
@@ -231,3 +101,4 @@ exports.OnePageWizardSummary = () => {
|
|
|
231
101
|
})
|
|
232
102
|
.filter(Boolean)));
|
|
233
103
|
};
|
|
104
|
+
exports.OnePageWizardSummary = OnePageWizardSummary;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
3
|
+
import { TextProps } from 'rebass';
|
|
4
|
+
export declare type OnePageWizardContextType<T> = {
|
|
5
|
+
data: T;
|
|
6
|
+
sections: (OnePageWizardSection<T> | '-')[];
|
|
7
|
+
setCurrentSection: (index: number) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const SummaryTag: React.FunctionComponent<TextProps>;
|
|
10
|
+
export declare const SummaryText: React.FunctionComponent<TextProps>;
|
|
11
|
+
export declare const FormDescriptionText: React.FunctionComponent<TextProps>;
|
|
12
|
+
export declare const OnePageWizardContext: React.Context<OnePageWizardContextType<any>>;
|
|
13
|
+
export declare function useOnePageWizardContext<ENTITY>(): OnePageWizardContextType<ENTITY>;
|
|
14
|
+
export declare type OnePageWizardSection<ENTITY> = {
|
|
15
|
+
title: string;
|
|
16
|
+
details?: React.ReactNode;
|
|
17
|
+
isValid?: (data: ENTITY, context: OnePageWizardContextType<ENTITY>) => true | string;
|
|
18
|
+
isVisible?: (data: ENTITY, context: OnePageWizardContextType<ENTITY>) => boolean;
|
|
19
|
+
render: (data: ENTITY, index: number) => React.ReactNode;
|
|
20
|
+
renderSummary?: (data: ENTITY) => React.ReactNode;
|
|
21
|
+
};
|
|
22
|
+
export interface OnePageWizardProps<ENTITY> {
|
|
23
|
+
data: ENTITY;
|
|
24
|
+
name: string;
|
|
25
|
+
sections: (OnePageWizardSection<ENTITY> | '-')[];
|
|
26
|
+
currentIndex?: number;
|
|
27
|
+
defaultCurrentIndex?: number;
|
|
28
|
+
defaultCurrentSectionName?: string;
|
|
29
|
+
onSectionChange?: (index: number) => void;
|
|
30
|
+
onHide?: VoidFunction;
|
|
31
|
+
onFinish?: (data: ENTITY) => any;
|
|
32
|
+
children?: React.ReactNode;
|
|
33
|
+
style?: CSSProperties;
|
|
34
|
+
closeText?: React.ReactNode;
|
|
35
|
+
closeTooltip?: string;
|
|
36
|
+
}
|
|
37
|
+
export declare const OnePageWizard: <ENTITY extends unknown>(props: OnePageWizardProps<ENTITY>) => JSX.Element;
|