@adaptabletools/adaptable 12.0.0-canary.3 → 12.0.0-canary.6
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 +26 -0
- package/bundle.cjs.js +102 -99
- package/index.css +34 -0
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +181 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +5 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +4 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +17 -2
- package/src/AdaptableOptions/EditOptions.d.ts +7 -80
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +3 -3
- package/src/AdaptableOptions/LayoutOptions.d.ts +11 -6
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +2 -0
- package/src/AdaptableOptions/StateOptions.d.ts +10 -0
- 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/ConfigApi.d.ts +1 -1
- package/src/Api/EventApi.d.ts +9 -9
- package/src/Api/Events/ActionRowSubmitted.d.ts +58 -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 +2 -4
- package/src/Api/Implementation/AlertApiImpl.js +2 -3
- package/src/Api/Implementation/ApiBase.d.ts +13 -1
- package/src/Api/Implementation/ApiBase.js +10 -0
- package/src/Api/Implementation/ColumnApiImpl.js +2 -2
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -4
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +2 -3
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -4
- package/src/Api/Implementation/CustomSortApiImpl.js +2 -3
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -3
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +0 -3
- package/src/Api/Implementation/GridApiImpl.js +0 -44
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
- package/src/Api/Implementation/InternalApiImpl.js +5 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -6
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -4
- package/src/Api/Implementation/PlusMinusApiImpl.js +2 -3
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +6 -16
- package/src/Api/Implementation/ScheduleApiImpl.js +10 -16
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -4
- package/src/Api/Implementation/ShortcutApiImpl.js +2 -3
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +2 -1
- 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/InternalApi.d.ts +1 -1
- package/src/Api/LayoutApi.d.ts +1 -6
- package/src/Api/SmartEditApi.d.ts +1 -1
- package/src/Api/StatusBarApi.d.ts +10 -3
- package/src/Api/UserInterfaceApi.d.ts +1 -5
- 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 +38 -36
- package/src/PredefinedConfig/Common/AdaptableQuery.js +2 -1
- 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 +7 -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/Interface/IModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.d.ts +3 -17
- package/src/Strategy/LayoutModule.js +57 -4
- 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/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Constants/GeneralConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +21 -13
- package/src/Utilities/ExpressionFunctions/dateUtils.js +2 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +20 -10
- package/src/Utilities/Extensions/TypeExtensions.d.ts +30 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +6 -16
- package/src/Utilities/Helpers/DateHelper.d.ts +27 -0
- package/src/Utilities/Helpers/DateHelper.js +43 -6
- 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/IMetamodelService.d.ts +1 -0
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +3 -3
- package/src/Utilities/Services/MetamodelService.d.ts +7 -1
- package/src/Utilities/Services/MetamodelService.js +82 -6
- 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/ConfigurationWizard.js +12 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +2 -1
- package/src/View/AdaptableWizardView/Utils.js +2 -1
- package/src/View/AdaptableWizardView/Wizard.js +4 -2
- package/src/View/AdaptableWizardView/helper.js +6 -3
- 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 +4 -2
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +6 -3
- 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 +2 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +4 -2
- 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 +6 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +6 -3
- 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 +11 -11
- 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/ConditionalStyleScopeWizardSection.js +2 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +4 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +2 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +2 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +6 -3
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +6 -3
- 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.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 +6 -3
- package/src/View/Export/Wizard/ReportNameWizardSection.js +6 -3
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +6 -3
- 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 +4 -2
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +10 -5
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +6 -3
- 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 +8 -4
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +4 -2
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +4 -2
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +4 -2
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +6 -3
- 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 +6 -4
- 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/PlusMinusScopeWizardSection.js +2 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +6 -3
- 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 +6 -3
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +6 -3
- 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 +2 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +4 -2
- 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 +4 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -1
- 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 +2 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +6 -3
- 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/ObjectTagsWizardSection.js +4 -2
- package/src/View/Wizard/OnePageAdaptableWizard.js +10 -5
- package/src/View/Wizard/OnePageWizards.js +8 -4
- 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 +31 -28
- 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/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 +2 -1
- 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-model.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +219 -112
- package/src/metamodel/adaptable.metamodel.js +1 -12958
- package/src/types.d.ts +8 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Api/Events/RowFormSubmitted.d.ts +0 -34
- package/src/components/ApplicationIcon.d.ts +0 -6
- package/src/components/ApplicationIcon.js +0 -13
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -345,7 +345,7 @@ class Adaptable {
|
|
|
345
345
|
}
|
|
346
346
|
this.emitter = new Emitter_1.default();
|
|
347
347
|
// we create AdaptableOptions by merging the values provided by the user with the defaults (where no value has been set)
|
|
348
|
-
this.adaptableOptions = AdaptableHelper_1.default.
|
|
348
|
+
this.adaptableOptions = AdaptableHelper_1.default.assignAdaptableOptions(adaptableOptions);
|
|
349
349
|
if (this.hasAutogeneratedPrimaryKey()) {
|
|
350
350
|
LoggingHelper_1.LogAdaptableWarning(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
|
|
351
351
|
when no unique column is available, as it limits some Adaptable functionalities!
|
|
@@ -354,7 +354,6 @@ class Adaptable {
|
|
|
354
354
|
this.adaptableOptions.primaryKey = GeneralConstants_1.AUTOGENERATED_PK_COLUMN;
|
|
355
355
|
}
|
|
356
356
|
Adaptable.collectInstance(this);
|
|
357
|
-
AdaptableHelper_1.default.checkAdaptableOptions(this.adaptableOptions);
|
|
358
357
|
this.runtimeConfig = runtimeConfig || {};
|
|
359
358
|
this.agGridModules = this.runtimeConfig.modules || [];
|
|
360
359
|
this.gridOptions = this.adaptableOptions.gridOptions;
|
|
@@ -420,6 +419,8 @@ class Adaptable {
|
|
|
420
419
|
if (this.gridOptions.columnTypes.abColDefDate.cellEditor === undefined) {
|
|
421
420
|
this.gridOptions.columnTypes.abColDefDate.cellEditor = AdaptableDateEditor_1.AdaptableDateEditor;
|
|
422
421
|
}
|
|
422
|
+
// validate the provided AdaptableOptions
|
|
423
|
+
this.MetamodelService.validateAdaptableOptionsValues();
|
|
423
424
|
return this.initializeAgGrid().then((initialized) => {
|
|
424
425
|
if (!initialized) {
|
|
425
426
|
// we have no grid, we can't do anything
|
|
@@ -976,14 +977,16 @@ class Adaptable {
|
|
|
976
977
|
const alert = this.getActiveAlertWithHighlightCell(col, params);
|
|
977
978
|
const highlightCell = (_b = (_a = alert === null || alert === void 0 ? void 0 : alert.alertDefinition) === null || _a === void 0 ? void 0 : _a.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightCell;
|
|
978
979
|
return typeof highlightCell === 'object' && (highlightCell === null || highlightCell === void 0 ? void 0 : highlightCell.ClassName)
|
|
979
|
-
? highlightCell === null || highlightCell === void 0 ? void 0 : highlightCell.ClassName
|
|
980
|
+
? highlightCell === null || highlightCell === void 0 ? void 0 : highlightCell.ClassName
|
|
981
|
+
: null;
|
|
980
982
|
}
|
|
981
983
|
getAlertRowClass(params) {
|
|
982
984
|
var _a, _b;
|
|
983
985
|
const alert = this.getActiveAlertWithHighlightRow(params);
|
|
984
986
|
const highlightRow = (_b = (_a = alert === null || alert === void 0 ? void 0 : alert.alertDefinition) === null || _a === void 0 ? void 0 : _a.AlertProperties) === null || _b === void 0 ? void 0 : _b.HighlightRow;
|
|
985
987
|
return typeof highlightRow === 'object' && (highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName)
|
|
986
|
-
? highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName
|
|
988
|
+
? highlightRow === null || highlightRow === void 0 ? void 0 : highlightRow.ClassName
|
|
989
|
+
: null;
|
|
987
990
|
}
|
|
988
991
|
getAlertRowStyle(params) {
|
|
989
992
|
var _a, _b;
|
|
@@ -1023,9 +1026,12 @@ class Adaptable {
|
|
|
1023
1026
|
return;
|
|
1024
1027
|
}
|
|
1025
1028
|
return flashingCell.direction === 'up'
|
|
1026
|
-
? (_a = flashingCell.flashingCellDefinition.UpChangeStyle) === null || _a === void 0 ? void 0 : _a.ClassName
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
+
? (_a = flashingCell.flashingCellDefinition.UpChangeStyle) === null || _a === void 0 ? void 0 : _a.ClassName
|
|
1030
|
+
: flashingCell.direction === 'down'
|
|
1031
|
+
? (_b = flashingCell.flashingCellDefinition.DownChangeStyle) === null || _b === void 0 ? void 0 : _b.ClassName
|
|
1032
|
+
: flashingCell.direction === 'neutral'
|
|
1033
|
+
? (_c = flashingCell.flashingCellDefinition.NeutralChangeStyle) === null || _c === void 0 ? void 0 : _c.ClassName
|
|
1034
|
+
: undefined;
|
|
1029
1035
|
}
|
|
1030
1036
|
getCellHighlightStyle(col, params) {
|
|
1031
1037
|
const primaryKeyValue = this.getPrimaryKeyValueFromRowNode(params.node);
|
|
@@ -1325,16 +1331,12 @@ class Adaptable {
|
|
|
1325
1331
|
newColState.aggFunc =
|
|
1326
1332
|
aggregationFunctionsColumnsMap[colId] === true
|
|
1327
1333
|
? // if we have true, it means - take the default aggFunc from colDef
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
// @ts-ignore available only wth ag-Grid v27.3.x
|
|
1335
|
-
colDef === void 0 ? void 0 :
|
|
1336
|
-
// @ts-ignore available only wth ag-Grid v27.3.x
|
|
1337
|
-
colDef.defaultAggFunc) !== null && _e !== void 0 ? _e : 'sum' : aggregationFunctionsColumnsMap[colId];
|
|
1334
|
+
// NOTE: colState gives us the current aggFunc, which can be null,
|
|
1335
|
+
// while the colDef gives us the initially configured aggFunc for that column
|
|
1336
|
+
(_e = (_d = (_c = colState.aggFunc) !== null && _c !== void 0 ? _c : colDef === null || colDef === void 0 ? void 0 : colDef.aggFunc) !== null && _d !== void 0 ? _d :
|
|
1337
|
+
// @ts-ignore available only wth ag-Grid v27.3.x
|
|
1338
|
+
colDef === null || colDef === void 0 ? void 0 : colDef.defaultAggFunc) !== null && _e !== void 0 ? _e : 'sum'
|
|
1339
|
+
: aggregationFunctionsColumnsMap[colId];
|
|
1338
1340
|
}
|
|
1339
1341
|
if (sortModelMap[colId]) {
|
|
1340
1342
|
newColState.sort = sortModelMap[colId].sort;
|
|
@@ -1667,7 +1669,8 @@ class Adaptable {
|
|
|
1667
1669
|
let returnValues = [];
|
|
1668
1670
|
// this function does NOT look up for server values but actually it should...
|
|
1669
1671
|
// that is currently commented out in the column api function (previously in filter form)
|
|
1670
|
-
permittedValues =
|
|
1672
|
+
permittedValues =
|
|
1673
|
+
permittedValues !== null && permittedValues !== void 0 ? permittedValues : this.api.userInterfaceApi.getPermittedValuesForColumn(column);
|
|
1671
1674
|
if (ArrayExtensions_1.ArrayExtensions.IsNotNull(permittedValues)) {
|
|
1672
1675
|
returnValues = permittedValues.map((pv) => {
|
|
1673
1676
|
return {
|
|
@@ -2184,7 +2187,7 @@ class Adaptable {
|
|
|
2184
2187
|
}
|
|
2185
2188
|
}
|
|
2186
2189
|
getColDefsForRowEditColumns() {
|
|
2187
|
-
const actionRowButtons = this.adaptableOptions.
|
|
2190
|
+
const actionRowButtons = this.adaptableOptions.actionOptions.actionRowButtons;
|
|
2188
2191
|
if (!(actionRowButtons === null || actionRowButtons === void 0 ? void 0 : actionRowButtons.length)) {
|
|
2189
2192
|
return [];
|
|
2190
2193
|
}
|
|
@@ -2197,7 +2200,7 @@ class Adaptable {
|
|
|
2197
2200
|
label,
|
|
2198
2201
|
tooltip: 'Create',
|
|
2199
2202
|
onClick: () => {
|
|
2200
|
-
this.api.
|
|
2203
|
+
this.api.actionApi.displayCreateActionRow();
|
|
2201
2204
|
},
|
|
2202
2205
|
};
|
|
2203
2206
|
}
|
|
@@ -2208,7 +2211,7 @@ class Adaptable {
|
|
|
2208
2211
|
label,
|
|
2209
2212
|
tooltip: 'Edit',
|
|
2210
2213
|
onClick: (button, context) => {
|
|
2211
|
-
this.api.
|
|
2214
|
+
this.api.actionApi.displayEditActionRow(context.primaryKeyValue);
|
|
2212
2215
|
},
|
|
2213
2216
|
};
|
|
2214
2217
|
}
|
|
@@ -2219,7 +2222,7 @@ class Adaptable {
|
|
|
2219
2222
|
label,
|
|
2220
2223
|
tooltip: 'Clone',
|
|
2221
2224
|
onClick: (button, context) => {
|
|
2222
|
-
this.api.
|
|
2225
|
+
this.api.actionApi.displayCloneActionRow(context.primaryKeyValue);
|
|
2223
2226
|
},
|
|
2224
2227
|
};
|
|
2225
2228
|
}
|
|
@@ -2236,8 +2239,8 @@ class Adaptable {
|
|
|
2236
2239
|
rowNode: context.rowNode,
|
|
2237
2240
|
adaptableApi: context.adaptableApi,
|
|
2238
2241
|
};
|
|
2239
|
-
this.api.eventApi.emit('
|
|
2240
|
-
(_b = (_a = this.adaptableOptions.
|
|
2242
|
+
this.api.eventApi.emit('ActionRowSubmitted', eventInfo);
|
|
2243
|
+
(_b = (_a = this.adaptableOptions.actionOptions.actionRowFormOptions).onFormSubmit) === null || _b === void 0 ? void 0 : _b.call(_a, eventInfo);
|
|
2241
2244
|
},
|
|
2242
2245
|
};
|
|
2243
2246
|
}
|
|
@@ -2256,7 +2259,8 @@ class Adaptable {
|
|
|
2256
2259
|
colId: GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS,
|
|
2257
2260
|
hide: false,
|
|
2258
2261
|
editable: false,
|
|
2259
|
-
|
|
2262
|
+
// 17px is the icon widht + left&right padding
|
|
2263
|
+
width: editButtons.length * (UIHelper_1.default.getSimpleButtonPaddingWidth() * 2 + 17) + 3,
|
|
2260
2264
|
resizable: false,
|
|
2261
2265
|
lockVisible: true,
|
|
2262
2266
|
suppressColumnsToolPanel: true,
|
|
@@ -2266,8 +2270,7 @@ class Adaptable {
|
|
|
2266
2270
|
filter: false,
|
|
2267
2271
|
sortable: false,
|
|
2268
2272
|
enableRowGroup: false,
|
|
2269
|
-
pinned: this.adaptableOptions.
|
|
2270
|
-
'pinnedRight'
|
|
2273
|
+
pinned: this.adaptableOptions.actionOptions.actionRowButtonsPosition === 'pinnedRight'
|
|
2271
2274
|
? 'right'
|
|
2272
2275
|
: 'left',
|
|
2273
2276
|
cellRenderer: ActionColumnRenderer_1.ActionColumnRenderer,
|
|
@@ -2285,7 +2288,7 @@ class Adaptable {
|
|
|
2285
2288
|
suppressMenu: false,
|
|
2286
2289
|
suppressMovable: false,
|
|
2287
2290
|
};
|
|
2288
|
-
return this.api.
|
|
2291
|
+
return this.api.actionApi.getAllActionColumn().map((actionColumn) => {
|
|
2289
2292
|
const actionColumnSettings = Object.assign(Object.assign({}, defaultActionColumnSettings), actionColumn.actionColumnSettings);
|
|
2290
2293
|
const newColDef = {
|
|
2291
2294
|
headerName: actionColumn.friendlyName ? actionColumn.friendlyName : actionColumn.columnId,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CheckboxEditor = exports.getCheckboxRendererForColumn = void 0;
|
|
4
|
-
|
|
4
|
+
const getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
|
|
5
5
|
const CheckboxRenderer = function () {
|
|
6
6
|
return '';
|
|
7
7
|
};
|
|
@@ -54,6 +54,7 @@ exports.getCheckboxRendererForColumn = (columnId, isColumnReadOnly, api) => {
|
|
|
54
54
|
};
|
|
55
55
|
return CheckboxRenderer;
|
|
56
56
|
};
|
|
57
|
+
exports.getCheckboxRendererForColumn = getCheckboxRendererForColumn;
|
|
57
58
|
// this is just a stub editor instance, we just need the `isCancelBeforeStart()` hook
|
|
58
59
|
class CheckboxEditor {
|
|
59
60
|
isCancelBeforeStart() {
|
|
@@ -4,7 +4,7 @@ exports.FilterWrapperFactory = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
6
6
|
const FilterForm_1 = require("../View/Components/FilterForm/FilterForm");
|
|
7
|
-
|
|
7
|
+
let FilterWrapperFactory = (adaptable) => {
|
|
8
8
|
return class FilterWrapper {
|
|
9
9
|
init(params) {
|
|
10
10
|
this.params = params;
|
|
@@ -52,3 +52,4 @@ exports.FilterWrapperFactory = (adaptable) => {
|
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
+
exports.FilterWrapperFactory = FilterWrapperFactory;
|
|
@@ -4,7 +4,7 @@ exports.FloatingFilterWrapperFactory = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
6
6
|
const QuickFilterForm_1 = require("../View/Components/FilterForm/QuickFilterForm");
|
|
7
|
-
|
|
7
|
+
const FloatingFilterWrapperFactory = (adaptable) => class FloatingFilterWrapper {
|
|
8
8
|
onParentModelChanged(parentModel, filterChangedEvent) {
|
|
9
9
|
// todo?
|
|
10
10
|
}
|
|
@@ -41,3 +41,4 @@ exports.FloatingFilterWrapperFactory = (adaptable) => class FloatingFilterWrappe
|
|
|
41
41
|
this.filterContainer = null;
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
|
+
exports.FloatingFilterWrapperFactory = FloatingFilterWrapperFactory;
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
|
|
6
6
|
const clamp_1 = tslib_1.__importDefault(require("lodash/clamp"));
|
|
7
7
|
const FormatHelper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/FormatHelper"));
|
|
8
|
-
|
|
8
|
+
const getPercentBarRendererForColumn = (formatColumn, api) => {
|
|
9
9
|
var _a;
|
|
10
10
|
if (!((_a = formatColumn === null || formatColumn === void 0 ? void 0 : formatColumn.ColumnStyle) === null || _a === void 0 ? void 0 : _a.PercentBarStyle)) {
|
|
11
11
|
return;
|
|
@@ -82,3 +82,4 @@ exports.getPercentBarRendererForColumn = (formatColumn, api) => {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
};
|
|
85
|
+
exports.getPercentBarRendererForColumn = getPercentBarRendererForColumn;
|
|
@@ -162,7 +162,8 @@ class agGridHelper {
|
|
|
162
162
|
const customFriendlyName = typeof columnFriendlyName === 'function'
|
|
163
163
|
? columnFriendlyName({ colId: colId, agColumn: agGridColumn })
|
|
164
164
|
: null;
|
|
165
|
-
const FriendlyName = (customFriendlyName !== null && customFriendlyName !== void 0 ? customFriendlyName : isActionRowButtonColumn)
|
|
165
|
+
const FriendlyName = (customFriendlyName !== null && customFriendlyName !== void 0 ? customFriendlyName : isActionRowButtonColumn)
|
|
166
|
+
? GeneralConstants_1.ADAPTABLE_ROW_ACTION_BUTTONS_FRIENDLY_NAME
|
|
166
167
|
: this.gridOptions.columnApi.getDisplayNameForColumn(agGridColumn, 'header');
|
|
167
168
|
if (!this.initialAgGridColDefs[colId]) {
|
|
168
169
|
this.initialAgGridColDefs[colId] = Object.assign({}, agGridColumn.getUserProvidedColDef());
|
|
@@ -220,6 +221,7 @@ class agGridHelper {
|
|
|
220
221
|
iconKey: 'menu',
|
|
221
222
|
width: UIHelper_1.default.getAdaptableToolPanelWidth(),
|
|
222
223
|
minWidth: UIHelper_1.default.getAdaptableToolPanelWidth(),
|
|
224
|
+
// maxWidth = undefined,
|
|
223
225
|
};
|
|
224
226
|
}
|
|
225
227
|
isSideBarDefObject(sidebarDef) {
|
|
@@ -107,9 +107,7 @@ class agGridMenuHelper {
|
|
|
107
107
|
? x.onClick
|
|
108
108
|
: () => this.adaptable.api.internalApi.dispatchReduxAction(x.reduxAction),
|
|
109
109
|
icon: icons_1.iconToString(x.icon, {
|
|
110
|
-
|
|
111
|
-
fill: 'var(--ab-color-text-on-primary)',
|
|
112
|
-
},
|
|
110
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
113
111
|
}),
|
|
114
112
|
};
|
|
115
113
|
}
|
|
@@ -127,9 +125,7 @@ class agGridMenuHelper {
|
|
|
127
125
|
? () => this.adaptable.api.internalApi.dispatchReduxAction(adaptableMenuItem.reduxAction)
|
|
128
126
|
: undefined,
|
|
129
127
|
icon: icons_1.iconToString(adaptableMenuItem.icon, {
|
|
130
|
-
|
|
131
|
-
fill: 'var(--ab-color-text-on-primary)',
|
|
132
|
-
},
|
|
128
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
133
129
|
}),
|
|
134
130
|
subMenu: subMenuItems,
|
|
135
131
|
};
|
|
@@ -140,7 +136,9 @@ class agGridMenuHelper {
|
|
|
140
136
|
return {
|
|
141
137
|
name: this.getLabelFromUserColumnMenuItem(menuItem, menuContext),
|
|
142
138
|
action: () => (fn ? fn(menuContext) : null),
|
|
143
|
-
icon: menuItem.icon,
|
|
139
|
+
icon: icons_1.iconToString(menuItem.icon, {
|
|
140
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
141
|
+
}),
|
|
144
142
|
disabled: disabled,
|
|
145
143
|
subMenu: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(menuItem.subMenuItems)
|
|
146
144
|
? undefined
|
|
@@ -155,7 +153,9 @@ class agGridMenuHelper {
|
|
|
155
153
|
return {
|
|
156
154
|
name: this.getLabelFromUserContextMenuItem(menuItem, menuContext),
|
|
157
155
|
action: () => (fn ? fn(menuContext) : null),
|
|
158
|
-
icon: menuItem.icon,
|
|
156
|
+
icon: icons_1.iconToString(menuItem.icon, {
|
|
157
|
+
fill: 'var(--ab-color-text-on-primary)',
|
|
158
|
+
}),
|
|
159
159
|
disabled: disabled,
|
|
160
160
|
subMenu: ArrayExtensions_1.ArrayExtensions.IsNullOrEmpty(menuItem.subMenuItems)
|
|
161
161
|
? undefined
|
|
@@ -188,7 +188,9 @@ class agGridMenuHelper {
|
|
|
188
188
|
label: groupedCols.length == 1 ? 'Ungroup Column' : 'Ungroup All',
|
|
189
189
|
onClick: () => this.gridOptions.columnApi.setRowGroupColumns([]),
|
|
190
190
|
isVisible: true,
|
|
191
|
-
icon:
|
|
191
|
+
icon: {
|
|
192
|
+
name: 'undo',
|
|
193
|
+
},
|
|
192
194
|
};
|
|
193
195
|
let menuItem = this.createAgGridMenuDefFromAdaptableMenu(ungroupMenuItem);
|
|
194
196
|
return menuItem;
|
|
@@ -367,7 +369,8 @@ class agGridMenuHelper {
|
|
|
367
369
|
});
|
|
368
370
|
}
|
|
369
371
|
buildStandaloneColumnHeader(adaptableColumn) {
|
|
370
|
-
|
|
372
|
+
const agGridColumn = this.adaptable.api.columnApi.getAgGridColumnForAdaptableColumn(adaptableColumn.columnId);
|
|
373
|
+
let menuContext = this.createColumnMenuContextObject(adaptableColumn, agGridColumn);
|
|
371
374
|
let returnMenuItems = [];
|
|
372
375
|
returnMenuItems.push(...this.getAdaptableMenuItemsColumnHeader(adaptableColumn, menuContext));
|
|
373
376
|
let userColumnMenuItems = this.getUserMenuItemsColumnHeader(menuContext);
|
|
@@ -5,7 +5,7 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const ReactDOM = tslib_1.__importStar(require("react-dom"));
|
|
7
7
|
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
8
|
-
|
|
8
|
+
const createAgStatusPanelComponent = (component, adaptable, context) => {
|
|
9
9
|
return class StatusBarRenderer {
|
|
10
10
|
init(params) {
|
|
11
11
|
this.params = params;
|
|
@@ -30,3 +30,4 @@ exports.createAgStatusPanelComponent = (component, adaptable, context) => {
|
|
|
30
30
|
}
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
+
exports.createAgStatusPanelComponent = createAgStatusPanelComponent;
|
|
@@ -39,11 +39,14 @@ function AdaptableFormComponent({ formDef, data, onChange, onButtonClick, displa
|
|
|
39
39
|
const newData = Object.assign(Object.assign({}, data), { [key]: value });
|
|
40
40
|
onChange(newData);
|
|
41
41
|
};
|
|
42
|
-
const disabledButtons = react_1.useMemo(() => {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
const disabledButtons = react_1.useMemo(() => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
return (_b = (_a = formDef.buttons) === null || _a === void 0 ? void 0 : _a.map((button) => {
|
|
45
|
+
// defensive programming: conventionally context should ALWAYS be present for validating buttons
|
|
46
|
+
const isValid = !!button.disabled && !!context ? !button.disabled(button, context) : true;
|
|
47
|
+
return !isValid;
|
|
48
|
+
})) !== null && _b !== void 0 ? _b : [];
|
|
49
|
+
}, [data]);
|
|
47
50
|
const renderLabel = (field) => {
|
|
48
51
|
return (React.createElement(rebass_1.Box, { className: 'ab-FormLayout_column--label', style: { textAlign: 'end' } }, field.label));
|
|
49
52
|
};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { AdaptableExternalIcon, AdaptableIcon, AdaptableInternalIcon } from '../../PredefinedConfig/Common/AdaptableIcon';
|
|
3
|
+
export interface AdaptableIconComponentProps {
|
|
4
|
+
icon: AdaptableIcon;
|
|
5
|
+
iconClassName?: string;
|
|
6
|
+
}
|
|
7
|
+
export declare const AdaptableIconComponent: (props: AdaptableIconComponentProps) => JSX.Element;
|
|
8
|
+
export declare const isAdaptableInternalIcon: (icon: unknown) => icon is AdaptableInternalIcon;
|
|
9
|
+
export declare const isAdaptableExternalIcon: (icon: unknown) => icon is AdaptableExternalIcon;
|
|
10
|
+
export declare const isAdaptableIcon: (icon: unknown) => icon is AdaptableIcon;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isAdaptableIcon = exports.isAdaptableExternalIcon = exports.isAdaptableInternalIcon = exports.AdaptableIconComponent = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const icons_1 = require("../icons");
|
|
7
|
+
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
8
|
+
const AdaptableIconComponent = (props) => {
|
|
9
|
+
var _a, _b, _c, _d, _e;
|
|
10
|
+
const { icon, iconClassName } = props;
|
|
11
|
+
if (!icon) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const className = join_1.default(icon.className, iconClassName);
|
|
15
|
+
if (exports.isAdaptableInternalIcon(icon)) {
|
|
16
|
+
return React.createElement(icons_1.Icon, { name: icon.name, size: icon.size, style: icon.style, className: className });
|
|
17
|
+
}
|
|
18
|
+
if (exports.isAdaptableExternalIcon(icon)) {
|
|
19
|
+
let width = (_b = (_a = icon.style) === null || _a === void 0 ? void 0 : _a.width) !== null && _b !== void 0 ? _b : 'var(--ab-cmp-icon__width)';
|
|
20
|
+
let height = (_d = (_c = icon.style) === null || _c === void 0 ? void 0 : _c.height) !== null && _d !== void 0 ? _d : 'var(--ab-cmp-icon__height)';
|
|
21
|
+
const iconStyle = (_e = icon.style) !== null && _e !== void 0 ? _e : {};
|
|
22
|
+
return React.createElement("img", { src: icon.src, className: className, style: Object.assign({ height, width }, iconStyle) });
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
exports.AdaptableIconComponent = AdaptableIconComponent;
|
|
27
|
+
const isAdaptableInternalIcon = (icon) => {
|
|
28
|
+
var _a;
|
|
29
|
+
return typeof ((_a = icon) === null || _a === void 0 ? void 0 : _a.name) === 'string';
|
|
30
|
+
};
|
|
31
|
+
exports.isAdaptableInternalIcon = isAdaptableInternalIcon;
|
|
32
|
+
const isAdaptableExternalIcon = (icon) => {
|
|
33
|
+
var _a;
|
|
34
|
+
return typeof ((_a = icon) === null || _a === void 0 ? void 0 : _a.src) === 'string';
|
|
35
|
+
};
|
|
36
|
+
exports.isAdaptableExternalIcon = isAdaptableExternalIcon;
|
|
37
|
+
const isAdaptableIcon = (icon) => {
|
|
38
|
+
return exports.isAdaptableInternalIcon(icon) || exports.isAdaptableExternalIcon(icon);
|
|
39
|
+
};
|
|
40
|
+
exports.isAdaptableIcon = isAdaptableIcon;
|
|
@@ -55,7 +55,8 @@ const CheckBox = (_a) => {
|
|
|
55
55
|
after));
|
|
56
56
|
};
|
|
57
57
|
exports.CheckBox = CheckBox;
|
|
58
|
-
|
|
58
|
+
const CheckBoxGroup = (props) => {
|
|
59
59
|
const { orientation } = props, flexProps = tslib_1.__rest(props, ["orientation"]);
|
|
60
60
|
return (React.createElement(rebass_1.Flex, Object.assign({ className: "ab-CheckBoxGroup", flexDirection: orientation == 'horizontal' ? 'row' : 'column', alignItems: orientation == 'horizontal' ? 'center' : 'flex=start' }, flexProps)));
|
|
61
61
|
};
|
|
62
|
+
exports.CheckBoxGroup = CheckBoxGroup;
|
|
@@ -6,6 +6,7 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
7
|
const join_1 = tslib_1.__importDefault(require("../utils/join"));
|
|
8
8
|
exports.baseClassName = 'ab-CodeBlock';
|
|
9
|
-
|
|
9
|
+
const CodeBlock = (props) => {
|
|
10
10
|
return React.createElement(rebass_1.Box, Object.assign({ as: "code" }, props, { className: join_1.default(props.className, exports.baseClassName) }));
|
|
11
11
|
};
|
|
12
|
+
exports.CodeBlock = CodeBlock;
|
|
@@ -13,6 +13,6 @@ const DashboardManager = ({ tabs, onTabsChange, availableToolbars, api, disabled
|
|
|
13
13
|
const preparedTabs = tabs.map((tab) => (Object.assign(Object.assign({}, tab), { Toolbars: tab.Items })));
|
|
14
14
|
onTabsChange(preparedTabs);
|
|
15
15
|
}, []);
|
|
16
|
-
return (React.createElement(ModuleManager_1.ModuleManager, { availableItems: availableToolbars, disabled: disabled, onTabsChange: handleTabsChange, tabs: preparedTabs, tabsTitle: moduleInfo.FriendlyName + ' Tabs', unusedPanelTitle: 'Available Toolbars' }));
|
|
16
|
+
return (React.createElement(ModuleManager_1.ModuleManager, { availableItems: availableToolbars, disabled: disabled, onTabsChange: handleTabsChange, tabs: preparedTabs, tabsTitle: moduleInfo.FriendlyName + ' Tabs', unusedPanelTitle: 'Available Toolbars', dragItemText: "Drag into a Tab below" }));
|
|
17
17
|
};
|
|
18
18
|
exports.default = DashboardManager;
|
|
@@ -7,6 +7,7 @@ exports.DatepickerContext = React.createContext({
|
|
|
7
7
|
onShow: () => { },
|
|
8
8
|
onHide: () => { },
|
|
9
9
|
});
|
|
10
|
-
|
|
10
|
+
const useDatepickerContext = () => {
|
|
11
11
|
return React.useContext(exports.DatepickerContext);
|
|
12
12
|
};
|
|
13
|
+
exports.useDatepickerContext = useDatepickerContext;
|
|
@@ -15,4 +15,4 @@ export declare type DatepickerProps = Omit<BoxProps, 'value' | 'onChange' | 'def
|
|
|
15
15
|
showWeekNumber?: boolean;
|
|
16
16
|
showOutsideDays?: boolean;
|
|
17
17
|
};
|
|
18
|
-
export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "default" | "high" | "low" | "
|
|
18
|
+
export declare const Datepicker: React.ForwardRefExoticComponent<Pick<DatepickerProps, "max" | "required" | "default" | "high" | "low" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "disabled" | "m" | "color" | "content" | "size" | "flex" | "wrap" | "padding" | "multiple" | "alignSelf" | "backgroundColor" | "fontSize" | "height" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "width" | "margin" | "children" | "key" | "list" | "step" | "type" | "min" | "contextMenu" | "value" | "onKeyDown" | "rows" | "name" | "className" | "id" | "lang" | "method" | "target" | "role" | "tabIndex" | "crossOrigin" | "href" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-busy" | "aria-checked" | "aria-colcount" | "aria-colindex" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-describedby" | "aria-details" | "aria-disabled" | "aria-dropeffect" | "aria-errormessage" | "aria-expanded" | "aria-flowto" | "aria-grabbed" | "aria-haspopup" | "aria-hidden" | "aria-invalid" | "aria-keyshortcuts" | "aria-label" | "aria-labelledby" | "aria-level" | "aria-live" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowspan" | "aria-selected" | "aria-setsize" | "aria-sort" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "classID" | "useMap" | "wmode" | "defaultChecked" | "defaultValue" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "accessKey" | "contentEditable" | "draggable" | "placeholder" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "prefix" | "property" | "resource" | "typeof" | "vocab" | "autoCapitalize" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "inputMode" | "is" | "as" | "hrefLang" | "integrity" | "rel" | "sizes" | "charSet" | "kind" | "src" | "srcLang" | "download" | "alt" | "coords" | "shape" | "autoPlay" | "controls" | "loop" | "mediaGroup" | "muted" | "playsInline" | "preload" | "autoFocus" | "formAction" | "formEncType" | "formMethod" | "formNoValidate" | "formTarget" | "dateTime" | "acceptCharset" | "action" | "autoComplete" | "encType" | "noValidate" | "allowFullScreen" | "allowTransparency" | "frameBorder" | "marginHeight" | "marginWidth" | "sandbox" | "scrolling" | "seamless" | "srcDoc" | "srcSet" | "accept" | "capture" | "checked" | "maxLength" | "minLength" | "readOnly" | "htmlFor" | "httpEquiv" | "optimum" | "reversed" | "selected" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "colSpan" | "headers" | "rowSpan" | "scope" | "cols" | "poster" | "challenge" | "keyType" | "keyParams" | "mt" | "mb" | "ml" | "mr" | "my" | "marginY" | "mx" | "marginX" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "bg" | "showClearButton" | "showOutsideDays" | "showWeekNumber" | "onHide" | "datepickerButtons" | "dateProps"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -9,8 +9,8 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../SimpleButton"));
|
|
|
9
9
|
const DragAndDropContext_1 = require("./DragAndDropContext");
|
|
10
10
|
const TabList_1 = require("./TabList");
|
|
11
11
|
const UnusedPanel_1 = require("./UnusedPanel");
|
|
12
|
-
|
|
13
|
-
const { availableItems, tabs, onTabsChange, tabsTitle, disabled, unusedPanelTitle, permittedActions, } = props;
|
|
12
|
+
const ModuleManager = (props) => {
|
|
13
|
+
const { availableItems, tabs, onTabsChange, tabsTitle, disabled, unusedPanelTitle, dragItemText, permittedActions, } = props;
|
|
14
14
|
const contextValue = React.useMemo(() => {
|
|
15
15
|
const preparedPermittedAction = Object.assign({ createTab: true, editTabName: true, dragAndDropTab: true, deleteTab: true }, permittedActions);
|
|
16
16
|
return {
|
|
@@ -18,7 +18,7 @@ exports.ModuleManager = (props) => {
|
|
|
18
18
|
availableItems: props.availableItems,
|
|
19
19
|
};
|
|
20
20
|
}, [props.availableItems, props.permittedActions]);
|
|
21
|
-
const
|
|
21
|
+
const unusedItems = React.useMemo(() => availableItems
|
|
22
22
|
.map((t) => t.Id)
|
|
23
23
|
.filter((item) => {
|
|
24
24
|
return !tabs.some((tab) => tab.Items.includes(item));
|
|
@@ -74,8 +74,9 @@ exports.ModuleManager = (props) => {
|
|
|
74
74
|
} },
|
|
75
75
|
React.createElement(DragAndDropContext_1.DragAndDropContext.Provider, { value: contextValue },
|
|
76
76
|
React.createElement("div", { style: { display: 'flex', flexDirection: 'column' } },
|
|
77
|
-
React.createElement(UnusedPanel_1.UnusedPanel, { title: unusedPanelTitle, disabled: disabled,
|
|
77
|
+
React.createElement(UnusedPanel_1.UnusedPanel, { title: unusedPanelTitle, disabled: disabled, items: unusedItems, dragItemText: dragItemText }),
|
|
78
78
|
React.createElement(PanelWithButton_1.PanelWithButton, { headerText: tabsTitle, button: contextValue.permittedActions.createTab && (React.createElement(SimpleButton_1.default, { disabled: disabled, onClick: handleTabAdd }, "Add Tab")) },
|
|
79
79
|
React.createElement("div", { style: { display: 'flex', flex: 1 } },
|
|
80
80
|
React.createElement(TabList_1.TabList, { disabled: disabled, tabs: tabs, onRemoveTab: handleRemoveTab, onRemoveToolbar: handleRemoveToolbar, onChangeTabName: handleChangeTabName })))))));
|
|
81
81
|
};
|
|
82
|
+
exports.ModuleManager = ModuleManager;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
export declare function UnusedPanel({
|
|
2
|
+
export declare function UnusedPanel({ items, disabled, title, dragItemText, }: {
|
|
3
3
|
title: string;
|
|
4
|
-
|
|
4
|
+
items: string[];
|
|
5
5
|
disabled: boolean;
|
|
6
|
+
dragItemText: string;
|
|
6
7
|
}): JSX.Element;
|
|
@@ -5,8 +5,8 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_beautiful_dnd_1 = require("react-beautiful-dnd");
|
|
7
7
|
const DragAndDropContext_1 = require("./DragAndDropContext");
|
|
8
|
-
function UnusedPanel({
|
|
9
|
-
return (React.createElement("div", { "data-name": "
|
|
8
|
+
function UnusedPanel({ items, disabled, title, dragItemText, }) {
|
|
9
|
+
return (React.createElement("div", { "data-name": "unusedpanel-items", style: {
|
|
10
10
|
border: '1px solid var(--ab-color-primarydark)',
|
|
11
11
|
borderRadius: 'var(--ab__border-radius)',
|
|
12
12
|
marginBottom: 'var(--ab-space-2)',
|
|
@@ -15,31 +15,33 @@ function UnusedPanel({ toolbars, disabled, title, }) {
|
|
|
15
15
|
} },
|
|
16
16
|
React.createElement("div", { style: { padding: 'var(--ab-space-2)' } },
|
|
17
17
|
React.createElement("b", null, title),
|
|
18
|
-
" (
|
|
19
|
-
|
|
18
|
+
" (",
|
|
19
|
+
dragItemText,
|
|
20
|
+
")"),
|
|
21
|
+
React.createElement(UnusedItemList, { disabled: disabled, items: items })));
|
|
20
22
|
}
|
|
21
23
|
exports.UnusedPanel = UnusedPanel;
|
|
22
|
-
function
|
|
23
|
-
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "UNUSED", type: "TOOLBAR", isDropDisabled: true, direction: "horizontal" }, (provided) => (React.createElement("div", Object.assign({ ref: provided.innerRef, "data-name": "
|
|
24
|
+
function UnusedItemList({ items, disabled }) {
|
|
25
|
+
return (React.createElement(react_beautiful_dnd_1.Droppable, { droppableId: "UNUSED", type: "TOOLBAR", isDropDisabled: true, direction: "horizontal" }, (provided) => (React.createElement("div", Object.assign({ ref: provided.innerRef, "data-name": "unusedpanel-items-list" }, provided.droppableProps, { style: {
|
|
24
26
|
display: 'flex',
|
|
25
27
|
flexDirection: 'row',
|
|
26
28
|
flexWrap: 'wrap',
|
|
27
29
|
paddingLeft: 'var(--ab-space-2)',
|
|
28
30
|
paddingRight: 'var(--ab-space-2)',
|
|
29
31
|
} }),
|
|
30
|
-
|
|
32
|
+
items.map((unusedItem, unusedItemIndex) => (React.createElement(UnusedItem, { disabled: disabled, key: unusedItem, unusedItem: unusedItem, unusedItemIndex: unusedItemIndex }))),
|
|
31
33
|
provided.placeholder))));
|
|
32
34
|
}
|
|
33
|
-
function
|
|
35
|
+
function UnusedItem({ unusedItem, unusedItemIndex, disabled, }) {
|
|
34
36
|
const { availableItems } = React.useContext(DragAndDropContext_1.DragAndDropContext);
|
|
35
|
-
let currentItem = availableItems.find((t) => t.Id ===
|
|
36
|
-
const title = currentItem ? currentItem.Title :
|
|
37
|
-
return (React.createElement(react_beautiful_dnd_1.Draggable, { isDragDisabled: disabled, draggableId:
|
|
37
|
+
let currentItem = availableItems.find((t) => t.Id === unusedItem);
|
|
38
|
+
const title = currentItem ? currentItem.Title : unusedItem;
|
|
39
|
+
return (React.createElement(react_beautiful_dnd_1.Draggable, { isDragDisabled: disabled, draggableId: unusedItem, index: unusedItemIndex }, (provided, snapshot) => {
|
|
38
40
|
const eventHandlers = disabled
|
|
39
41
|
? {}
|
|
40
42
|
: Object.assign(Object.assign({}, provided.draggableProps), provided.dragHandleProps);
|
|
41
43
|
const dragStyle = disabled ? {} : provided.draggableProps.style;
|
|
42
|
-
return (React.createElement("div", Object.assign({ "data-name": "
|
|
44
|
+
return (React.createElement("div", Object.assign({ "data-name": "unused-item", ref: provided.innerRef }, eventHandlers, { style: Object.assign(Object.assign({}, dragStyle), { border: '1px solid var(--ab-color-primary)', backgroundColor: snapshot.isDragging
|
|
43
45
|
? 'var(--ab-dashboard-toolbar-drag__background)'
|
|
44
46
|
: 'var(--ab-color-primarylight)', padding: 'var(--ab-space-1) var(--ab-space-2)', marginRight: 'var(--ab-space-1)', marginBottom: 'var(--ab-space-1)' }) }), title));
|
|
45
47
|
}));
|