@adaptabletools/adaptable 11.0.0-canary.3 → 11.0.0-canary.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/agGrid.d.ts +5 -4
- package/agGrid.js +9 -7
- package/base.css +135 -69
- package/bundle.cjs.js +104 -99
- package/index.css +136 -69
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +7 -5
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +1 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +14 -7
- package/src/AdaptableOptions/{QueryLanguageOptions.d.ts → AdaptableQLOptions.d.ts} +34 -9
- package/src/AdaptableOptions/{QueryLanguageOptions.js → AdaptableQLOptions.js} +0 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +82 -0
- package/src/AdaptableOptions/AlertOptions.js +2 -0
- package/src/AdaptableOptions/ContainerOptions.d.ts +2 -2
- package/src/AdaptableOptions/FilterOptions.d.ts +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +0 -7
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -78
- package/src/AdaptableOptions/SearchOptions.d.ts +0 -9
- package/src/AdaptableOptions/StateOptions.d.ts +9 -8
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +2 -2
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +0 -2
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +3 -3
- package/src/Api/AdaptableApi.d.ts +6 -0
- package/src/Api/AlertApi.d.ts +2 -3
- package/src/Api/CalculatedColumnApi.d.ts +2 -9
- package/src/Api/ColumnApi.d.ts +0 -4
- package/src/Api/EventApi.d.ts +8 -3
- package/src/Api/Events/GridDataChanged.d.ts +4 -2
- package/src/Api/Events/SystemStatusMessageDisplayed.d.ts +1 -1
- package/src/Api/FreeTextColumnApi.d.ts +0 -12
- package/src/Api/GridApi.d.ts +13 -2
- package/src/Api/IPushPullApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -1
- package/src/Api/Implementation/AdaptableApiImpl.js +2 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +1 -2
- package/src/Api/Implementation/AlertApiImpl.js +19 -10
- package/src/Api/Implementation/ApiBase.d.ts +5 -2
- package/src/Api/Implementation/ApiBase.js +8 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +3 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ColumnApiImpl.js +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +0 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +0 -9
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +27 -4
- package/src/Api/Implementation/InternalApiImpl.d.ts +2 -3
- package/src/Api/Implementation/InternalApiImpl.js +7 -6
- package/src/Api/Implementation/LayoutApiImpl.d.ts +2 -0
- package/src/Api/Implementation/LayoutApiImpl.js +11 -0
- package/src/Api/Implementation/QueryApiImpl.js +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +4 -1
- package/src/Api/Implementation/QueryLanguageApiImpl.js +20 -8
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +7 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +15 -0
- package/src/Api/InternalApi.d.ts +2 -3
- package/src/Api/LayoutApi.d.ts +7 -0
- package/src/Api/OpenFinApi.d.ts +5 -0
- package/src/Api/PluginsApi.d.ts +29 -0
- package/src/Api/QueryApi.d.ts +2 -2
- package/src/Api/QueryLanguageApi.d.ts +23 -10
- package/src/Api/SettingsPanelApi.d.ts +16 -0
- package/src/Api/SettingsPanelApi.js +2 -0
- package/src/Api/UserInterfaceApi.d.ts +5 -2
- package/src/PredefinedConfig/AlertState.d.ts +8 -6
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +8 -4
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +7 -5
- package/src/PredefinedConfig/Common/AdaptableQuery.js +2 -6
- package/src/PredefinedConfig/Common/CellHighlightInfo.d.ts +1 -12
- package/src/PredefinedConfig/Common/Enums.d.ts +0 -1
- package/src/PredefinedConfig/Common/Enums.js +0 -2
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +4 -12
- package/src/PredefinedConfig/Common/RowHighlightInfo.d.ts +15 -0
- package/src/PredefinedConfig/Common/RowHighlightInfo.js +2 -0
- package/src/PredefinedConfig/Common/SpecialColumnSettings.d.ts +1 -1
- package/src/PredefinedConfig/Common/Types.d.ts +3 -1
- package/src/PredefinedConfig/Common/Types.js +1 -0
- package/src/PredefinedConfig/CustomSortState.d.ts +0 -1
- package/src/PredefinedConfig/FlashingCellState.d.ts +3 -1
- package/src/PredefinedConfig/FreeTextColumnState.d.ts +1 -1
- package/src/PredefinedConfig/LayoutState.d.ts +0 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +5 -2
- package/src/PredefinedConfig/Selection/GridCellRange.d.ts +3 -1
- package/src/PredefinedConfig/SystemState.d.ts +2 -1
- package/src/Redux/ActionsReducers/ApplicationRedux.js +9 -3
- package/src/Redux/ActionsReducers/FlashingCellRedux.js +4 -8
- package/src/Redux/ActionsReducers/GridRedux.js +3 -1
- package/src/Redux/ActionsReducers/PopupRedux.js +13 -3
- package/src/Redux/ActionsReducers/QuickSearchRedux.js +3 -1
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +6 -5
- package/src/Redux/ActionsReducers/SystemRedux.js +16 -14
- package/src/Redux/ActionsReducers/ThemeRedux.js +3 -1
- package/src/Redux/Store/AdaptableReduxMerger.js +1 -1
- package/src/Redux/Store/AdaptableStore.js +34 -8
- package/src/Strategy/AlertModule.js +16 -6
- package/src/Strategy/CalculatedColumnModule.js +4 -4
- package/src/Strategy/ChartingModule.d.ts +3 -3
- package/src/Strategy/ChartingModule.js +2 -2
- package/src/Strategy/ConditionalStyleModule.js +4 -0
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FreeTextColumnModule.d.ts +2 -2
- package/src/Strategy/FreeTextColumnModule.js +11 -0
- package/src/Strategy/LayoutModule.js +1 -6
- package/src/Strategy/{SetingsPanelModule.d.ts → SettingsPanelModule.d.ts} +0 -0
- package/src/Strategy/{SetingsPanelModule.js → SettingsPanelModule.js} +0 -0
- package/src/Strategy/ToolPanelModule.js +5 -3
- package/src/Strategy/Utilities/getAlertPreviewViewItems.js +1 -1
- package/src/Strategy/Utilities/getExpressionViewItems.d.ts +2 -2
- package/src/Strategy/Utilities/getExpressionViewItems.js +2 -1
- package/src/Strategy/Utilities/getFormatColumnSettingsViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +0 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +1 -3
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +2 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.js +3 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +23 -17
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.d.ts → aggregatedBooleanExpressionFunctions.d.ts} +1 -1
- package/src/Utilities/ExpressionFunctions/{aggregationExpressionFunctions.js → aggregatedBooleanExpressionFunctions.js} +4 -4
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +24 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +339 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +13 -0
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +35 -0
- package/src/Utilities/ExpressionFunctions/deepMap.js +283 -0
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +2 -2
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +8 -8
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +35 -0
- package/src/Utilities/ExpressionFunctions/groupingMap.js +105 -0
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +2 -2
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +33 -0
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.js +154 -0
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +13 -4
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
- package/src/Utilities/Helpers/CalendarHelper.js +220 -55
- package/src/Utilities/Interface/MessagePopups.d.ts +6 -2
- package/src/Utilities/ObjectFactory.js +1 -0
- package/src/Utilities/Services/AlertService.js +8 -4
- package/src/Utilities/Services/CalculatedColumnExpressionService.d.ts +7 -3
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +143 -18
- package/src/Utilities/Services/DataService.js +6 -1
- package/src/Utilities/Services/Interface/IAdaptableService.d.ts +1 -1
- package/src/Utilities/Services/Interface/ICalculatedColumnExpressionService.d.ts +6 -3
- package/src/Utilities/Services/Interface/IQueryLanguageService.d.ts +9 -3
- package/src/Utilities/Services/LicenseService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.d.ts +11 -4
- package/src/Utilities/Services/QueryLanguageService.js +92 -28
- package/src/Utilities/Services/ReportService.js +6 -2
- package/src/Utilities/Services/TeamSharingService.js +5 -3
- package/src/View/AdaptablePopover/index.js +6 -1
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +5 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +10 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +4 -1
- package/src/View/AdaptableWizardView/helper.js +5 -3
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +5 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.d.ts +1 -0
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertWizard.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +3 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +3 -3
- package/src/View/CalculatedColumn/CalculatedColumnSharedEntity.js +3 -3
- package/src/View/CalculatedColumn/CalculatedColumnSummary.js +2 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +43 -12
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +1 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -2
- package/src/View/ColorPicker.d.ts +1 -1
- package/src/View/Components/AdaptableDateInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +5 -2
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.js +11 -12
- package/src/View/Components/FilterForm/FilterForm.js +0 -2
- package/src/View/Components/FilterForm/QuickFilterForm.js +6 -5
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
- package/src/View/Components/Panels/PanelWithImage.d.ts +2 -2
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.d.ts +0 -3
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopup.js +45 -88
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.d.ts +11 -0
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupDialog.js +78 -0
- package/src/View/Components/Popups/AdaptablePopup/Navigation.d.ts +1 -3
- package/src/View/Components/Popups/AdaptablePopup/Navigation.js +5 -13
- package/src/View/Components/Popups/AdaptablePopup/TopBar.js +5 -4
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.d.ts +2 -0
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +44 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +1 -0
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +3 -1
- package/src/View/Components/Popups/AdaptablePopupPrompt.d.ts +5 -12
- package/src/View/Components/Popups/AdaptablePopupPrompt.js +38 -37
- package/src/View/Components/Popups/AdaptablePopupTeamSharing.js +4 -1
- package/src/View/Components/ScopeComponent.js +4 -1
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +5 -1
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +3 -1
- package/src/View/Components/ToolPanel/ToolPanelWrapper.js +1 -1
- package/src/View/Components/ValueSelector/index.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.d.ts +8 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +27 -0
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleWizard.js +7 -0
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +3 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/Dashboard/CustomToolbarWrapper.js +5 -1
- package/src/View/Dashboard/Dashboard.js +2 -3
- package/src/View/Dashboard/DashboardPopup.js +3 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +2 -1
- package/src/View/Export/Wizard/ReportColumnTypeWizard.js +3 -1
- package/src/View/Export/Wizard/ReportRowTypeWizard.js +3 -1
- package/src/View/Filter/FilterViewPanel.d.ts +1 -4
- package/src/View/Filter/FilterViewPanel.js +1 -3
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +1 -1
- package/src/View/FreeTextColumn/FreeTextColumnSummary.js +1 -2
- package/src/View/GridInfo/AdaptableOptionsComponent.js +4 -1
- package/src/View/Layout/Wizard/LayoutEditor/index.js +6 -2
- package/src/View/Layout/Wizard/LayoutEditorWizard.js +7 -1
- package/src/View/License/LicenseWatermark.js +1 -1
- package/src/View/Query/ExpandedQueryPopup.js +9 -2
- package/src/View/Query/QueryViewPanel.js +3 -1
- package/src/View/Query/Wizard/NamedQueryWizard.js +3 -3
- package/src/View/QuickSearch/QuickSearchPopup.js +3 -3
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +12 -2
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -2
- package/src/View/UIHelper.js +4 -1
- package/src/View/Wizard/AdaptableWizard.js +12 -3
- package/src/View/Wizard/OnePageAdaptableWizard.js +5 -1
- package/src/agGrid/Adaptable.d.ts +3 -3
- package/src/agGrid/Adaptable.js +117 -77
- package/src/agGrid/agGridHelper.js +4 -9
- package/src/agGrid/agGridMenuHelper.js +4 -8
- package/src/agGrid/editors/AdaptableDateEditor/index.js +1 -1
- package/src/agGrid/editors/AdaptableNumberEditor/index.js +1 -1
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.d.ts +4 -2
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +4 -4
- package/src/components/ApplicationIcon.d.ts +1 -0
- package/src/components/ApplicationIcon.js +2 -2
- package/src/components/Dashboard/Dashboard.js +4 -1
- package/src/components/Datepicker/index.d.ts +1 -1
- package/src/components/Dropdown/index.js +8 -1
- package/src/components/ExpressionEditor/EditorInput.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInput.js +5 -2
- package/src/components/ExpressionEditor/EditorInputReactive.d.ts +1 -1
- package/src/components/ExpressionEditor/EditorInputReactive.js +4 -2
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +5 -2
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.d.ts +2 -0
- package/src/components/ExpressionEditor/editorButtonsAggregatedScalar.js +45 -0
- package/src/components/ExpressionEditor/editorButtonsReactive.js +8 -13
- package/src/components/ExpressionEditor/index.d.ts +2 -1
- package/src/components/ExpressionEditor/index.js +20 -6
- package/src/components/Input/index.d.ts +1 -1
- package/src/components/List/ListGroupItem/index.d.ts +1 -1
- package/src/components/Logo/index.js +8 -7
- package/src/components/PopupWithFooter.d.ts +1 -1
- package/src/components/SizedContainer/index.js +7 -1
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/components/WindowModal/WindowModal.js +4 -1
- package/src/metamodel/adaptable.metamodel.d.ts +114 -59
- package/src/metamodel/adaptable.metamodel.js +373 -242
- package/src/types.d.ts +9 -6
- package/themes/dark.css +4 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -14,5 +14,5 @@ declare class ButtonDeleteComponent extends React.Component<DeleteButtonProps, {
|
|
|
14
14
|
render(): JSX.Element;
|
|
15
15
|
onClick(): void;
|
|
16
16
|
}
|
|
17
|
-
export declare let ButtonDelete: import("react-redux").ConnectedComponent<typeof ButtonDeleteComponent, Pick<React.ClassAttributes<ButtonDeleteComponent> & DeleteButtonProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "m" | "color" | "content" | "size" | "flex" | "wrap" | "icon" | "tooltip" | "border" | "padding" | "multiple" | "alignSelf" | "backgroundColor" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "fontSize" | "fontWeight" | "height" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "margin" | "ref" | "children" | "key" | "list" | "step" | "contextMenu" | "type" | "min" | "rows" | "download" | "value" | "checked" | "onClick" | "
|
|
17
|
+
export declare let ButtonDelete: import("react-redux").ConnectedComponent<typeof ButtonDeleteComponent, Pick<React.ClassAttributes<ButtonDeleteComponent> & DeleteButtonProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "m" | "color" | "content" | "size" | "flex" | "wrap" | "icon" | "tooltip" | "border" | "padding" | "multiple" | "alignSelf" | "backgroundColor" | "borderBottomColor" | "borderBottomLeftRadius" | "borderBottomRightRadius" | "borderBottomStyle" | "borderBottomWidth" | "borderLeftColor" | "borderLeftStyle" | "borderLeftWidth" | "borderRightColor" | "borderRightStyle" | "borderRightWidth" | "borderTopColor" | "borderTopLeftRadius" | "borderTopRightRadius" | "borderTopStyle" | "borderTopWidth" | "fontSize" | "fontWeight" | "height" | "marginBottom" | "marginLeft" | "marginRight" | "marginTop" | "opacity" | "order" | "paddingBottom" | "paddingLeft" | "paddingRight" | "paddingTop" | "translate" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderStyle" | "borderTop" | "borderWidth" | "margin" | "ref" | "children" | "key" | "list" | "step" | "contextMenu" | "type" | "min" | "rows" | "download" | "value" | "checked" | "onClick" | "name" | "colSpan" | "rowSpan" | "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" | "onKeyDown" | "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" | "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" | "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" | "maxLength" | "minLength" | "readOnly" | "htmlFor" | "httpEquiv" | "optimum" | "reversed" | "selected" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "headers" | "scope" | "cols" | "poster" | "challenge" | "keyType" | "keyParams" | "mt" | "mb" | "ml" | "mr" | "my" | "marginY" | "mx" | "marginX" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "bg" | "borderX" | "borderY" | "variant" | "tone" | "iconSize" | "iconPosition" | "accessLevel" | "tooltipAnchor" | "onConfirmWarning" | "ConfirmAction" | "ConfirmationMsg" | "ConfirmationTitle" | "onClickAction"> & DeleteButtonProps>;
|
|
18
18
|
export {};
|
|
@@ -10,7 +10,6 @@ const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/Dr
|
|
|
10
10
|
const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
|
|
11
11
|
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
12
12
|
const AdaptableInput_1 = tslib_1.__importDefault(require("../AdaptableInput"));
|
|
13
|
-
const AdaptableQuery_1 = require("../../../PredefinedConfig/Common/AdaptableQuery");
|
|
14
13
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
15
14
|
const ButtonInfo_1 = require("../Buttons/ButtonInfo");
|
|
16
15
|
const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
|
|
@@ -45,8 +44,8 @@ QueryTab.defaultProps = {
|
|
|
45
44
|
};
|
|
46
45
|
exports.EntityRulesSummary = (props) => {
|
|
47
46
|
const { data } = props;
|
|
48
|
-
const { api: { predicateApi }, } = AdaptableContext_1.useAdaptable();
|
|
49
|
-
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicate ? (React.createElement(React.Fragment, null, props.renderPredicate(predicateApi.predicateToString(data.Rule.Predicate)))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(
|
|
47
|
+
const { api: { predicateApi, queryLanguageApi }, } = AdaptableContext_1.useAdaptable();
|
|
48
|
+
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicate ? (React.createElement(React.Fragment, null, props.renderPredicate(predicateApi.predicateToString(data.Rule.Predicate)))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(queryLanguageApi.getAdaptableQueryExpression(data.Rule))))));
|
|
50
49
|
};
|
|
51
50
|
exports.EntityRulesEditor = (props) => {
|
|
52
51
|
var _a, _b;
|
|
@@ -56,8 +55,8 @@ exports.EntityRulesEditor = (props) => {
|
|
|
56
55
|
? 'BooleanExpression'
|
|
57
56
|
: data.Rule.ObservableExpression != undefined && showObservable
|
|
58
57
|
? 'ObservableExpression'
|
|
59
|
-
: data.Rule.
|
|
60
|
-
? '
|
|
58
|
+
: data.Rule.AggregatedBooleanExpression != undefined && showAggregation
|
|
59
|
+
? 'AggregatedBooleanExpression'
|
|
61
60
|
: 'Predicate';
|
|
62
61
|
const [selectedTab, setSelectedTab] = React.useState(type);
|
|
63
62
|
const setType = (type) => {
|
|
@@ -72,9 +71,9 @@ exports.EntityRulesEditor = (props) => {
|
|
|
72
71
|
ObservableExpression: '',
|
|
73
72
|
} }));
|
|
74
73
|
}
|
|
75
|
-
else if (type === '
|
|
74
|
+
else if (type === 'AggregatedBooleanExpression' && showAggregation) {
|
|
76
75
|
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
77
|
-
|
|
76
|
+
AggregatedBooleanExpression: '',
|
|
78
77
|
} }));
|
|
79
78
|
}
|
|
80
79
|
else {
|
|
@@ -127,7 +126,7 @@ exports.EntityRulesEditor = (props) => {
|
|
|
127
126
|
props.onChange(Object.assign(Object.assign({}, data), { Rule: { ObservableExpression: expression } }));
|
|
128
127
|
};
|
|
129
128
|
const setAggregationExpression = (expression) => {
|
|
130
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
129
|
+
props.onChange(Object.assign(Object.assign({}, data), { Rule: { AggregatedBooleanExpression: expression } }));
|
|
131
130
|
};
|
|
132
131
|
const initialData = api.internalApi.getQueryPreviewData();
|
|
133
132
|
const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
|
|
@@ -162,13 +161,13 @@ exports.EntityRulesEditor = (props) => {
|
|
|
162
161
|
background: 'var(--ab-color-action-add)',
|
|
163
162
|
}, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
|
|
164
163
|
"See Predicate documentation for more details and examples")))) : null,
|
|
165
|
-
showBoolean ?
|
|
164
|
+
showBoolean ? React.createElement(QueryTab, { value: "BooleanExpression", type: type, label: "Boolean" }) : null,
|
|
166
165
|
showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { value: 'BooleanExpression', paddingLeft: 0 },
|
|
167
166
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: data.Rule.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
|
|
168
167
|
showObservable ? (React.createElement(QueryTab, { value: "ObservableExpression", type: type, label: "Observable" })) : null,
|
|
169
168
|
showObservable ? (React.createElement(Tabs_1.Tabs.Content, { value: 'ObservableExpression', paddingLeft: 0 },
|
|
170
169
|
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: data.Rule.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null,
|
|
171
|
-
showAggregation ? (React.createElement(QueryTab, { value: "
|
|
172
|
-
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { value: '
|
|
173
|
-
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: '
|
|
170
|
+
showAggregation ? (React.createElement(QueryTab, { value: "AggregatedBooleanExpression", type: type, label: "AggregatedBoolean" })) : null,
|
|
171
|
+
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { value: 'AggregatedBooleanExpression', paddingLeft: 0 },
|
|
172
|
+
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: data.Rule.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getAllNamedQuery(), api: api }))) : null)));
|
|
174
173
|
};
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const FilterRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/FilterRedux"));
|
|
8
|
-
const PopupRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PopupRedux"));
|
|
9
8
|
const Enums_1 = require("../../../PredefinedConfig/Common/Enums");
|
|
10
9
|
const ListBoxFilterForm_1 = require("./ListBoxFilterForm");
|
|
11
10
|
const ButtonClose_1 = require("../Buttons/ButtonClose");
|
|
@@ -276,7 +275,6 @@ function mapDispatchToProps(dispatch) {
|
|
|
276
275
|
onAddColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterAdd(columnFilter)),
|
|
277
276
|
onEditColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterEdit(columnFilter)),
|
|
278
277
|
onSetColumnFilter: (columnFilter) => dispatch(FilterRedux.ColumnFilterSet(columnFilter)),
|
|
279
|
-
onShowPrompt: (prompt) => dispatch(PopupRedux.PopupShowPrompt(prompt)),
|
|
280
278
|
onHideFilterForm: () => dispatch(FilterRedux.FilterFormHide()),
|
|
281
279
|
};
|
|
282
280
|
}
|
|
@@ -106,14 +106,12 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
106
106
|
hideEvent = 'blur';
|
|
107
107
|
}
|
|
108
108
|
let showQuickFilterDropdown = true;
|
|
109
|
-
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
110
|
-
.filterOptions.hideQuickFilterDropdown;
|
|
109
|
+
let hideQuickFilterDropdownFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterDropdown;
|
|
111
110
|
if (hideQuickFilterDropdownFunction) {
|
|
112
111
|
showQuickFilterDropdown = !hideQuickFilterDropdownFunction(this.props.currentColumn);
|
|
113
112
|
}
|
|
114
113
|
let showQuickFilterInput = true;
|
|
115
|
-
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions()
|
|
116
|
-
.filterOptions.hideQuickFilterInput;
|
|
114
|
+
let hideQuickFilterInputFunction = this.props.api.internalApi.getAdaptableOptions().filterOptions.hideQuickFilterInput;
|
|
117
115
|
if (hideQuickFilterInputFunction) {
|
|
118
116
|
showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
|
|
119
117
|
}
|
|
@@ -132,7 +130,10 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
132
130
|
predicateDefs.map((p) => (React.createElement(SimpleButton_1.default, { key: p.id, p: 2, variant: "text", tone: (filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) === p.id ? 'info' : 'none', onClick: () => this.selectColumnPredicate(p.id) },
|
|
133
131
|
React.createElement("span", { style: { width: 20, marginRight: 10 } }, this.renderPredicateIcon(p)),
|
|
134
132
|
p.label))))) },
|
|
135
|
-
React.createElement(SimpleButton_1.default, { style: {
|
|
133
|
+
React.createElement(SimpleButton_1.default, { style: {
|
|
134
|
+
borderRadius: 0,
|
|
135
|
+
borderColor: 'var(--ab-color-primarydark)',
|
|
136
|
+
} }, this.renderPredicateIcon(activePredicateDef)))),
|
|
136
137
|
showQuickFilterInput && this.renderLabel(filter, activePredicateDef),
|
|
137
138
|
showQuickFilterInput && this.renderPredicateInput(activePredicateDef, filter)));
|
|
138
139
|
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { AdaptableColumn } from '../../../PredefinedConfig/Common/AdaptableColumn';
|
|
2
2
|
import { SystemFilterPredicateId } from '../../../PredefinedConfig/FilterState';
|
|
3
|
-
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "
|
|
3
|
+
export declare const getDefaultColumnFilterPredicate: (column: AdaptableColumn, defaultColumnFilter: "Before" | "After" | "Today" | "Yesterday" | "Tomorrow" | "Values" | "Blanks" | "NonBlanks" | "GreaterThan" | "LessThan" | "Positive" | "Negative" | "Zero" | "Equals" | "NotEquals" | "Between" | "NotBetween" | "Is" | "IsNot" | "Contains" | "NotContains" | "StartsWith" | "EndsWith" | "Regex" | "ThisWeek" | "ThisMonth" | "ThisQuarter" | "ThisYear" | "InPast" | "InFuture" | "On" | "NotOn" | "NextWorkDay" | "LastWorkDay" | "InRange" | "True" | "False" | "BooleanToggle" | ((column: AdaptableColumn) => SystemFilterPredicateId)) => SystemFilterPredicateId;
|
|
@@ -7,4 +7,4 @@ export declare type AdaptableFormControlTextClearProps = {
|
|
|
7
7
|
autoFocus?: boolean;
|
|
8
8
|
inputStyle?: CSSProperties;
|
|
9
9
|
} & InputProps;
|
|
10
|
-
export declare const AdaptableFormControlTextClear: React.ForwardRefExoticComponent<Pick<AdaptableFormControlTextClearProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "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" | "contextMenu" | "type" | "min" | "rows" | "download" | "value" | "checked" | "onClick" | "
|
|
10
|
+
export declare const AdaptableFormControlTextClear: React.ForwardRefExoticComponent<Pick<AdaptableFormControlTextClearProps, "max" | "required" | "default" | "high" | "low" | "disabled" | "start" | "open" | "media" | "hidden" | "cite" | "data" | "dir" | "form" | "label" | "p" | "slot" | "span" | "style" | "summary" | "title" | "pattern" | "async" | "defer" | "manifest" | "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" | "contextMenu" | "type" | "min" | "rows" | "download" | "value" | "checked" | "onClick" | "name" | "colSpan" | "rowSpan" | "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" | "onKeyDown" | "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" | "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" | "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" | "maxLength" | "minLength" | "readOnly" | "htmlFor" | "httpEquiv" | "optimum" | "reversed" | "selected" | "nonce" | "scoped" | "cellPadding" | "cellSpacing" | "headers" | "scope" | "cols" | "poster" | "challenge" | "keyType" | "keyParams" | "mt" | "mb" | "ml" | "mr" | "my" | "marginY" | "mx" | "marginX" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "css" | "bg" | "focusOnClear" | "placehoder" | "OnTextChange" | "inputStyle"> & React.RefAttributes<any>>;
|
|
@@ -93,9 +93,9 @@ export declare const PanelWithImage: React.ForwardRefExoticComponent<{
|
|
|
93
93
|
value?: string | number | readonly string[];
|
|
94
94
|
checked?: boolean;
|
|
95
95
|
onClick?: ((event: React.MouseEvent<HTMLElement, MouseEvent>) => void) & ((event: React.MouseEvent<HTMLDivElement, MouseEvent>) => void);
|
|
96
|
+
name?: string;
|
|
96
97
|
colSpan?: number;
|
|
97
98
|
rowSpan?: number;
|
|
98
|
-
name?: string;
|
|
99
99
|
className?: string;
|
|
100
100
|
id?: string;
|
|
101
101
|
lang?: string;
|
|
@@ -148,7 +148,7 @@ export declare const PanelWithImage: React.ForwardRefExoticComponent<{
|
|
|
148
148
|
'aria-rowspan'?: number;
|
|
149
149
|
'aria-selected'?: boolean | "false" | "true";
|
|
150
150
|
'aria-setsize'?: number;
|
|
151
|
-
'aria-sort'?: "none" | "
|
|
151
|
+
'aria-sort'?: "none" | "other" | "ascending" | "descending";
|
|
152
152
|
'aria-valuemax'?: number;
|
|
153
153
|
'aria-valuemin'?: number;
|
|
154
154
|
'aria-valuenow'?: number;
|
|
@@ -3,9 +3,6 @@ import * as PopupRedux from '../../../../Redux/ActionsReducers/PopupRedux';
|
|
|
3
3
|
import { ModuleParams } from '../../SharedProps/ModuleViewPopupProps';
|
|
4
4
|
import { AdaptableModule } from '../../../../PredefinedConfig/Common/Types';
|
|
5
5
|
import { AdaptableApi } from '../../../../Api/AdaptableApi';
|
|
6
|
-
/**
|
|
7
|
-
* This is the main popup that we use - so all Module popups will appear here.
|
|
8
|
-
*/
|
|
9
6
|
export interface AdaptablePopupProps {
|
|
10
7
|
componentName?: string;
|
|
11
8
|
componentModule: AdaptableModule;
|
|
@@ -4,101 +4,65 @@ exports.AdaptablePopup = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const rebass_1 = require("rebass");
|
|
7
|
-
const react_redux_1 = require("react-redux");
|
|
8
|
-
const PopupRedux = tslib_1.__importStar(require("../../../../Redux/ActionsReducers/PopupRedux"));
|
|
9
7
|
const GeneralConstants = tslib_1.__importStar(require("../../../../Utilities/Constants/GeneralConstants"));
|
|
10
8
|
const TopBar_1 = tslib_1.__importDefault(require("./TopBar"));
|
|
11
9
|
const join_1 = tslib_1.__importDefault(require("../../../../components/utils/join"));
|
|
12
10
|
const Navigation_1 = require("./Navigation");
|
|
13
11
|
const PopupContext_1 = tslib_1.__importDefault(require("./PopupContext"));
|
|
14
12
|
const AdaptablePopupBody_1 = require("./AdaptablePopupBody");
|
|
15
|
-
const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
|
|
16
|
-
const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
|
|
17
|
-
const Utilities_1 = require("./Utilities");
|
|
18
13
|
const DefaultSettingsPanel_1 = require("../../../../Utilities/Defaults/DefaultSettingsPanel");
|
|
19
14
|
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
20
15
|
const CustomSettingsPanelView_1 = require("./CustomSettingsPanelView");
|
|
16
|
+
const useMenuItems_1 = require("./useMenuItems");
|
|
17
|
+
const AdaptablePopupDialog_1 = require("./AdaptablePopupDialog");
|
|
21
18
|
exports.AdaptablePopup = (props) => {
|
|
22
|
-
var _a, _b
|
|
19
|
+
var _a, _b;
|
|
23
20
|
const adaptable = AdaptableContext_1.useAdaptable();
|
|
24
|
-
const dispatch = react_redux_1.useDispatch();
|
|
25
21
|
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
26
22
|
const settingsPanelTitle = adaptable.api.internalApi.getModuleFriendlyName('SettingsPanel');
|
|
27
|
-
|
|
28
|
-
const allMenuItems = react_redux_1.useSelector((state) => { var _a; return (_a = state === null || state === void 0 ? void 0 : state.Grid) === null || _a === void 0 ? void 0 : _a.ModuleDropdownMenuItems; });
|
|
29
|
-
const menuItems = React.useMemo(() => {
|
|
30
|
-
var _a;
|
|
31
|
-
let navigationItems = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.navigation) === null || _a === void 0 ? void 0 : _a.items;
|
|
32
|
-
if (!navigationItems) {
|
|
33
|
-
navigationItems = [...DefaultSettingsPanel_1.DEFAULT_NAVIGATION_ITEMS];
|
|
34
|
-
if (settingsPanelOptions.customSettingsPanels) {
|
|
35
|
-
navigationItems.push(...settingsPanelOptions.customSettingsPanels.map((panel) => panel.name));
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
const visibleItems = allMenuItems.filter((item) => item.module !== 'General' && !DefaultSettingsPanel_1.ACTION_POPUPS.includes(item.module) && item.isVisible);
|
|
39
|
-
return navigationItems
|
|
40
|
-
.map((moduleName) => {
|
|
41
|
-
var _a, _b;
|
|
42
|
-
if (moduleName === '-') {
|
|
43
|
-
return moduleName;
|
|
44
|
-
}
|
|
45
|
-
const customSettingsPanel = (_b = (_a = settingsPanelOptions === null || settingsPanelOptions === void 0 ? void 0 : settingsPanelOptions.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (panel) => panel.name === moduleName);
|
|
46
|
-
let customPanelMenuItem = null;
|
|
47
|
-
if (customSettingsPanel) {
|
|
48
|
-
customPanelMenuItem = {
|
|
49
|
-
label: customSettingsPanel.name,
|
|
50
|
-
isVisible: true,
|
|
51
|
-
reduxAction: PopupRedux.PopupShowScreen(null, customSettingsPanel.name, null, {
|
|
52
|
-
isCustomSettingsPanel: true,
|
|
53
|
-
}),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
return customPanelMenuItem || visibleItems.find((item) => item.module === moduleName);
|
|
57
|
-
})
|
|
58
|
-
.filter(Boolean);
|
|
59
|
-
}, [allMenuItems]);
|
|
60
|
-
const isCustomSettingsPanel = (_a = props.moduleProps) === null || _a === void 0 ? void 0 : _a.isCustomSettingsPanel;
|
|
61
|
-
const customSettingsPanel = isCustomSettingsPanel &&
|
|
62
|
-
settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === props.componentName);
|
|
63
|
-
let componentModule = props.componentModule;
|
|
64
|
-
// When it is opened without specifying a module
|
|
65
|
-
const firstMenuItem = (_b = menuItems.find((menuItem) => menuItem !== '-')) === null || _b === void 0 ? void 0 : _b.module;
|
|
66
|
-
if (!customSettingsPanel && !props.componentModule && firstMenuItem !== 'General') {
|
|
67
|
-
componentModule = firstMenuItem;
|
|
68
|
-
}
|
|
69
|
-
const accessLevel = props.api.internalApi
|
|
70
|
-
.getEntitlementService()
|
|
71
|
-
.getEntitlementAccessLevelForModule(componentModule);
|
|
72
|
-
const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
|
|
73
|
-
const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
|
|
74
|
-
// action popups + non-primary module popups
|
|
75
|
-
const isActionModule = moduleInfo &&
|
|
76
|
-
(DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
|
|
77
|
-
(props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
|
|
78
|
-
const baseClassName = 'ab-Adaptable-Popup';
|
|
79
|
-
const className = join_1.default(baseClassName, `${baseClassName}--${(_c = settingsPanelOptions.popupType) !== null && _c !== void 0 ? _c : 'window'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
|
|
23
|
+
const menuItems = useMenuItems_1.useMenuItems();
|
|
80
24
|
const isWindowModal = settingsPanelOptions.popupType === 'window';
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
25
|
+
const modalContainer = (_b = (_a = adaptable.adaptableOptions) === null || _a === void 0 ? void 0 : _a.containerOptions) === null || _b === void 0 ? void 0 : _b.modalContainer;
|
|
26
|
+
let friendlyName = null;
|
|
27
|
+
let isActionModule = false;
|
|
28
|
+
let moduleViewContent = null;
|
|
29
|
+
let activeItem = null;
|
|
30
|
+
let accessLevel = 'Full';
|
|
31
|
+
const firstMenuItem = menuItems.find((menuItem) => menuItem !== '-');
|
|
32
|
+
const firstMenuModule = firstMenuItem === null || firstMenuItem === void 0 ? void 0 : firstMenuItem.module;
|
|
33
|
+
let componentModule = props.componentModule;
|
|
34
|
+
let componentName = props.componentName;
|
|
35
|
+
// ts forces to check for General, there is no menu item General
|
|
36
|
+
const useFirstItem = !props.componentModule;
|
|
37
|
+
if (useFirstItem && firstMenuModule !== 'General') {
|
|
38
|
+
componentModule = firstMenuModule;
|
|
84
39
|
}
|
|
85
|
-
|
|
86
|
-
|
|
40
|
+
const isCustomSettingsPanel = componentModule === 'CustomSettingsPanelModule';
|
|
41
|
+
if (isCustomSettingsPanel) {
|
|
42
|
+
if (useFirstItem) {
|
|
43
|
+
componentName = firstMenuItem.label;
|
|
44
|
+
}
|
|
45
|
+
const customSettingsPanel = settingsPanelOptions.customSettingsPanels.find((settingsPanel) => settingsPanel.name === componentName);
|
|
46
|
+
friendlyName = customSettingsPanel.name;
|
|
47
|
+
activeItem = customSettingsPanel.name;
|
|
48
|
+
moduleViewContent = React.createElement(CustomSettingsPanelView_1.CustomSettingsPanelView, { settingsPanel: customSettingsPanel });
|
|
87
49
|
}
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
50
|
+
else {
|
|
51
|
+
const module = props.api.internalApi.getModuleService().getModuleById(componentModule);
|
|
52
|
+
const moduleInfo = module === null || module === void 0 ? void 0 : module.moduleInfo;
|
|
53
|
+
accessLevel = props.api.internalApi
|
|
54
|
+
.getEntitlementService()
|
|
55
|
+
.getEntitlementAccessLevelForModule(componentModule);
|
|
56
|
+
friendlyName = moduleInfo.FriendlyName;
|
|
57
|
+
isActionModule =
|
|
58
|
+
moduleInfo &&
|
|
59
|
+
(DefaultSettingsPanel_1.ACTION_POPUPS.includes(moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.ModuleName) ||
|
|
60
|
+
(props.componentName && props.componentName !== (moduleInfo === null || moduleInfo === void 0 ? void 0 : moduleInfo.Popup)));
|
|
61
|
+
activeItem = moduleInfo.ModuleName;
|
|
62
|
+
moduleViewContent = (React.createElement(AdaptablePopupBody_1.AdaptablePopupBody, { api: props.api, module: module, componentName: props.componentName, moduleParams: props.moduleParams, onClearParams: props.onClearParams, onHide: props.onHide }));
|
|
98
63
|
}
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
};
|
|
64
|
+
const baseClassName = 'ab-Adaptable-Popup';
|
|
65
|
+
const className = join_1.default(baseClassName, `${baseClassName}--${isWindowModal ? 'window' : 'modal'}`, isActionModule ? `${baseClassName}--action-popup` : `${baseClassName}--settings-popup`);
|
|
102
66
|
return (React.createElement(PopupContext_1.default.Provider, { value: {
|
|
103
67
|
hidePopup: () => {
|
|
104
68
|
if (props.onHide) {
|
|
@@ -106,16 +70,9 @@ exports.AdaptablePopup = (props) => {
|
|
|
106
70
|
}
|
|
107
71
|
},
|
|
108
72
|
} },
|
|
109
|
-
React.createElement(
|
|
110
|
-
handleSelector: isActionModule
|
|
111
|
-
? `.${baseClassName} .ab-Panel__header`
|
|
112
|
-
: '.ab-Adaptable-Popup__TopBar',
|
|
113
|
-
size: popupSettings.size,
|
|
114
|
-
position: popupSettings.position,
|
|
115
|
-
onChange: handleWindowSettings,
|
|
116
|
-
}, style: style, padding: 0, height: isWindowModal ? null : '90vh', width: isWindowModal ? null : '90vw', className: className, onDismiss: props.onHide, isOpen: true, showCloseButton: true }, props.moduleProps),
|
|
73
|
+
React.createElement(AdaptablePopupDialog_1.AdaptablePopupDialog, { baseClassName: baseClassName, className: className, friendlyName: friendlyName, isActionModule: isActionModule, isWindowModal: isWindowModal, onHide: props.onHide, modalContainer: modalContainer },
|
|
117
74
|
!isActionModule && React.createElement(TopBar_1.default, { icon: settingsPanelOptions.icon }, settingsPanelTitle),
|
|
118
75
|
React.createElement(rebass_1.Flex, { "data-name": props.componentName, flexDirection: "row", flex: "1 1 0", style: { minHeight: 0 }, className: accessLevel == 'ReadOnly' ? GeneralConstants.READ_ONLY_STYLE : '' },
|
|
119
|
-
!isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api,
|
|
120
|
-
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" },
|
|
76
|
+
!isActionModule && (React.createElement(Navigation_1.Navigation, { menuItems: menuItems, api: props.api, activeItem: activeItem, customSettingsPanels: settingsPanelOptions.customSettingsPanels })),
|
|
77
|
+
React.createElement(rebass_1.Flex, { flex: 1, className: "ab-Adaptable-Popup__Body" }, moduleViewContent)))));
|
|
121
78
|
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
export declare const AdaptablePopupDialog: React.FunctionComponent<{
|
|
3
|
+
baseClassName: string;
|
|
4
|
+
className: string;
|
|
5
|
+
friendlyName: string;
|
|
6
|
+
isActionModule: boolean;
|
|
7
|
+
isWindowModal: boolean;
|
|
8
|
+
onHide: () => void;
|
|
9
|
+
style?: React.CSSProperties;
|
|
10
|
+
modalContainer?: string | HTMLElement;
|
|
11
|
+
}>;
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AdaptablePopupDialog = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const react_dom_1 = require("react-dom");
|
|
7
|
+
const react_redux_1 = require("react-redux");
|
|
8
|
+
const Dialog_1 = tslib_1.__importDefault(require("../../../../components/Dialog"));
|
|
9
|
+
const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
|
|
10
|
+
const AdaptableContext_1 = require("../../../AdaptableContext");
|
|
11
|
+
const Utilities_1 = require("./Utilities");
|
|
12
|
+
const WindowDialog = (props) => {
|
|
13
|
+
var _a, _b;
|
|
14
|
+
const { onChange, style, baseClassName, className, isActionModule, settingsPanelOptionsKey, onHide } = props, dialogProps = tslib_1.__rest(props, ["onChange", "style", "baseClassName", "className", "isActionModule", "settingsPanelOptionsKey", "onHide"]);
|
|
15
|
+
const adaptable = AdaptableContext_1.useAdaptable();
|
|
16
|
+
const dispatch = react_redux_1.useDispatch();
|
|
17
|
+
const settingsPanelOptions = adaptable.adaptableOptions.settingsPanelOptions;
|
|
18
|
+
let popupSettings = react_redux_1.useSelector((state) => { var _a, _b; return (_b = (_a = state === null || state === void 0 ? void 0 : state.System) === null || _a === void 0 ? void 0 : _a.SettingsPanel) === null || _b === void 0 ? void 0 : _b[settingsPanelOptionsKey]; });
|
|
19
|
+
const handleWindowSettings = (settings) => {
|
|
20
|
+
dispatch(SystemRedux_1.SystemSettingsPanelSet(settingsPanelOptionsKey, settings));
|
|
21
|
+
};
|
|
22
|
+
if (!popupSettings) {
|
|
23
|
+
const size = isActionModule
|
|
24
|
+
? Utilities_1.getActionPanelSize()
|
|
25
|
+
: (_a = settingsPanelOptions.size) !== null && _a !== void 0 ? _a : Utilities_1.getSettingsPanelSize();
|
|
26
|
+
popupSettings = {
|
|
27
|
+
size: size,
|
|
28
|
+
position: (_b = settingsPanelOptions.position) !== null && _b !== void 0 ? _b : Utilities_1.getMiddlePosition(size),
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
const windowModalProps = {
|
|
32
|
+
handleSelector: isActionModule
|
|
33
|
+
? `.${baseClassName} .ab-Panel__header`
|
|
34
|
+
: '.ab-Adaptable-Popup__TopBar',
|
|
35
|
+
size: popupSettings.size,
|
|
36
|
+
position: popupSettings.position,
|
|
37
|
+
onChange: handleWindowSettings,
|
|
38
|
+
};
|
|
39
|
+
return (React.createElement(Dialog_1.default, Object.assign({ windowModal: true, fixed: false, windowModalProps: windowModalProps, style: Object.assign(Object.assign({}, props.style), { height: '100%' }), padding: 0, className: className, onDismiss: onHide, isOpen: true, showCloseButton: true }, dialogProps)));
|
|
40
|
+
};
|
|
41
|
+
const PopupDialog = (props) => {
|
|
42
|
+
const { style, className, onHide, children } = props, dialogProps = tslib_1.__rest(props, ["style", "className", "onHide", "children"]);
|
|
43
|
+
return (React.createElement(Dialog_1.default, Object.assign({ fixed: false, style: props.style, padding: 0, height: '90vh', width: '90vw', className: className, onDismiss: onHide, isOpen: true, showCloseButton: true }, dialogProps), children));
|
|
44
|
+
};
|
|
45
|
+
exports.AdaptablePopupDialog = (props) => {
|
|
46
|
+
const { isActionModule, style, friendlyName, baseClassName, className, children, onHide, isWindowModal, modalContainer, } = props;
|
|
47
|
+
const elementRef = React.useMemo(() => {
|
|
48
|
+
if (!modalContainer) {
|
|
49
|
+
return null;
|
|
50
|
+
}
|
|
51
|
+
let ref = null;
|
|
52
|
+
if (typeof modalContainer === 'string') {
|
|
53
|
+
ref = globalThis.document.querySelector(modalContainer);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
ref = modalContainer;
|
|
57
|
+
}
|
|
58
|
+
return ref;
|
|
59
|
+
}, [modalContainer]);
|
|
60
|
+
if (modalContainer) {
|
|
61
|
+
let ref = null;
|
|
62
|
+
if (typeof modalContainer === 'string') {
|
|
63
|
+
ref = globalThis.document.querySelector(modalContainer);
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
ref = modalContainer;
|
|
67
|
+
}
|
|
68
|
+
return react_dom_1.createPortal(React.createElement(Dialog_1.default, { modal: false, fixed: false, onDismiss: onHide, className: className }, children), ref);
|
|
69
|
+
}
|
|
70
|
+
if (isWindowModal) {
|
|
71
|
+
const settingsPanelOptionsKey = isActionModule ? `action-${friendlyName}` : 'settings';
|
|
72
|
+
return (React.createElement(WindowDialog, { settingsPanelOptionsKey: settingsPanelOptionsKey, isActionModule: isActionModule, onHide: onHide, style: style, baseClassName: baseClassName, className: className }, children));
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
const modalStyle = Object.assign(Object.assign({}, style), (isActionModule ? { maxWidth: 800, maxHeight: 600 } : { maxWidth: 1200, maxHeight: 1000 }));
|
|
76
|
+
return (React.createElement(PopupDialog, { onHide: onHide, style: modalStyle, className: className }, children));
|
|
77
|
+
}
|
|
78
|
+
};
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { AdaptableApi, AdaptableMenuItem } from '../../../../../types';
|
|
3
3
|
import { CustomSettingsPanel } from '../../../../AdaptableOptions/SettingsPanelOptions';
|
|
4
|
-
import { ModuleInfo } from '../../../../Strategy/Interface/IModule';
|
|
5
4
|
interface NavigationProps {
|
|
6
5
|
api: AdaptableApi;
|
|
7
6
|
menuItems: (AdaptableMenuItem | '-')[];
|
|
8
|
-
|
|
9
|
-
activeCustomSettingPanel?: CustomSettingsPanel;
|
|
7
|
+
activeItem: string;
|
|
10
8
|
customSettingsPanels?: CustomSettingsPanel[];
|
|
11
9
|
}
|
|
12
10
|
export declare const Navigation: React.FunctionComponent<NavigationProps>;
|
|
@@ -9,19 +9,12 @@ const icons_1 = require("../../../../components/icons");
|
|
|
9
9
|
const join_1 = tslib_1.__importDefault(require("../../../../components/utils/join"));
|
|
10
10
|
const useGlobalEvent_1 = require("../../../../components/utils/useGlobalEvent");
|
|
11
11
|
exports.Navigation = (props) => {
|
|
12
|
-
var _a;
|
|
13
12
|
const dispatch = react_redux_1.useDispatch();
|
|
14
13
|
const handleKeyPress = React.useCallback((event) => {
|
|
15
14
|
if ((event.ctrlKey || event.metaKey) &&
|
|
16
15
|
(event.code === 'ArrowUp' || event.code === 'ArrowDown')) {
|
|
17
16
|
const isKeyUp = event.code === 'ArrowUp';
|
|
18
|
-
const currentIndex = props.menuItems.findIndex((item) =>
|
|
19
|
-
var _a, _b;
|
|
20
|
-
return item !== '-' &&
|
|
21
|
-
(item.module === ((_a = props === null || props === void 0 ? void 0 : props.moduleInfo) === null || _a === void 0 ? void 0 : _a.ModuleName) ||
|
|
22
|
-
// in case of custom panel
|
|
23
|
-
item.label === ((_b = props === null || props === void 0 ? void 0 : props.activeCustomSettingPanel) === null || _b === void 0 ? void 0 : _b.name));
|
|
24
|
-
});
|
|
17
|
+
const currentIndex = props.menuItems.findIndex((item) => item !== '-' && (item.module === props.activeItem || item.label === props.activeItem));
|
|
25
18
|
let nextMenuItem = null;
|
|
26
19
|
if (isKeyUp) {
|
|
27
20
|
let candidate = props.menuItems[currentIndex - 1] !== '-'
|
|
@@ -39,19 +32,18 @@ exports.Navigation = (props) => {
|
|
|
39
32
|
dispatch(nextMenuItem.reduxAction);
|
|
40
33
|
}
|
|
41
34
|
}
|
|
42
|
-
}, [
|
|
35
|
+
}, [props.activeItem, props.menuItems]);
|
|
43
36
|
useGlobalEvent_1.useGlobalEvent('keydown', handleKeyPress);
|
|
44
37
|
return (React.createElement("nav", { className: "ab-Adaptable-Popup__Navigation" },
|
|
45
38
|
React.createElement("ul", { className: "ab-Adaptable-Popup__Navigation__List" }, props.menuItems.map((menuItem, index) => {
|
|
46
|
-
var _a, _b, _c, _d
|
|
39
|
+
var _a, _b, _c, _d;
|
|
47
40
|
const baseClassName = 'ab-Adaptable-Popup__Navigation__List__Item';
|
|
48
41
|
if (menuItem === '-') {
|
|
49
42
|
return React.createElement("li", { key: `separator-${index}`, className: `${baseClassName}__Separator` });
|
|
50
43
|
}
|
|
51
|
-
const isActive =
|
|
52
|
-
menuItem.label === ((_b = props === null || props === void 0 ? void 0 : props.activeCustomSettingPanel) === null || _b === void 0 ? void 0 : _b.name);
|
|
44
|
+
const isActive = props.activeItem === menuItem.module || menuItem.label === props.activeItem;
|
|
53
45
|
const className = join_1.default(baseClassName, isActive && `${baseClassName}--active`);
|
|
54
|
-
let customIcon = (
|
|
46
|
+
let customIcon = (_d = (_c = (_b = (_a = props.customSettingsPanels) === null || _a === void 0 ? void 0 : _a.find) === null || _b === void 0 ? void 0 : _b.call(_a, (customSettingPanel) => customSettingPanel.name === menuItem.label)) === null || _c === void 0 ? void 0 : _c.icon) !== null && _d !== void 0 ? _d : null;
|
|
55
47
|
return (React.createElement("li", { className: className, key: menuItem.label },
|
|
56
48
|
React.createElement("button", { type: "button", className: `${baseClassName}__Button`, onClick: () => {
|
|
57
49
|
dispatch(menuItem.reduxAction);
|