@adaptabletools/adaptable 17.0.0-canary.0 → 17.0.0-canary.1
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 +1203 -1207
- package/base.css.map +1 -1
- package/index.css +28 -1989
- package/index.css.map +1 -1
- package/package.json +10 -108
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +2 -2
- package/src/AdaptableInterfaces/IAdaptable.d.ts +16 -11
- package/src/AdaptableOptions/ActionRowOptions.d.ts +25 -3
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -3
- package/src/AdaptableOptions/AdaptableOptions.d.ts +10 -1
- package/src/AdaptableOptions/AdaptablePlugin.d.ts +1 -1
- package/src/AdaptableOptions/AlertOptions.d.ts +2 -2
- package/src/AdaptableOptions/ColumnFilterOptions.d.ts +110 -91
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/DateInputOptions.d.ts +1 -1
- package/src/AdaptableOptions/EditOptions.d.ts +2 -2
- package/src/AdaptableOptions/ExportOptions.d.ts +3 -3
- package/src/AdaptableOptions/ExpressionOptions.d.ts +2 -2
- package/src/AdaptableOptions/Fdc3Options.d.ts +10 -4
- package/src/AdaptableOptions/GridFilterOptions.d.ts +18 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -1
- package/src/AdaptableOptions/MenuOptions.d.ts +10 -4
- package/src/AdaptableOptions/NotificationsOptions.d.ts +1 -1
- package/src/AdaptableOptions/QuickSearchOptions.d.ts +4 -4
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -16
- package/src/Api/ColumnApi.d.ts +4 -0
- package/src/Api/ColumnFilterApi.d.ts +2 -5
- package/src/Api/DashboardApi.d.ts +0 -11
- package/src/Api/EventApi.d.ts +2 -30
- package/src/Api/Events/ActionRowSubmitted.d.ts +1 -5
- package/src/Api/Events/AdaptableSearchState.d.ts +2 -7
- package/src/Api/Events/Fdc3MessageInfo.d.ts +1 -1
- package/src/Api/Events/GridFilterApplied.d.ts +2 -1
- package/src/Api/ExportApi.d.ts +0 -4
- package/src/Api/GridFilterApi.d.ts +26 -8
- package/src/Api/Implementation/ColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/ColumnApiImpl.js +4 -0
- package/src/Api/Implementation/ColumnFilterApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ColumnFilterApiImpl.js +3 -3
- package/src/Api/Implementation/ConfigApiImpl.js +1 -2
- package/src/Api/Implementation/DashboardApiImpl.d.ts +0 -2
- package/src/Api/Implementation/DashboardApiImpl.js +0 -14
- package/src/Api/Implementation/ExportApiImpl.d.ts +0 -1
- package/src/Api/Implementation/ExportApiImpl.js +0 -3
- package/src/Api/Implementation/GridApiImpl.js +2 -2
- package/src/Api/Implementation/GridFilterApiImpl.d.ts +6 -1
- package/src/Api/Implementation/GridFilterApiImpl.js +22 -3
- package/src/Api/Implementation/NamedQueryApiImpl.d.ts +2 -5
- package/src/Api/Implementation/NamedQueryApiImpl.js +2 -2
- package/src/Api/Implementation/OptionsApiImpl.d.ts +2 -1
- package/src/Api/Implementation/OptionsApiImpl.js +3 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
- package/src/Api/Internal/ActionRowInternalApi.d.ts +1 -0
- package/src/Api/Internal/ActionRowInternalApi.js +17 -3
- package/src/Api/Internal/AlertInternalApi.d.ts +1 -7
- package/src/Api/Internal/ColumnFilterInternalApi.d.ts +2 -2
- package/src/Api/Internal/ColumnFilterInternalApi.js +9 -9
- package/src/Api/Internal/ColumnInternalApi.d.ts +0 -10
- package/src/Api/Internal/ColumnInternalApi.js +0 -28
- package/src/Api/Internal/Fdc3InternalApi.d.ts +2 -2
- package/src/Api/Internal/FormatColumnInternalApi.js +6 -6
- package/src/Api/Internal/GridFilterInternalApi.d.ts +1 -1
- package/src/Api/Internal/GridFilterInternalApi.js +5 -5
- package/src/Api/Internal/GridInternalApi.js +31 -9
- package/src/Api/Internal/LayoutInternalApi.js +8 -0
- package/src/Api/Internal/PredicateInternalApi.js +3 -3
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +0 -3
- package/src/Api/Internal/StyledColumnInternalApi.js +0 -27
- package/src/Api/NamedQueryApi.d.ts +6 -5
- package/src/Api/OptionsApi.d.ts +5 -1
- package/src/PredefinedConfig/AlertState.d.ts +6 -6
- package/src/PredefinedConfig/CalculatedColumnState.d.ts +1 -1
- package/src/PredefinedConfig/ChartingState.d.ts +4 -1
- package/src/PredefinedConfig/Common/AdaptableAlert.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableComparerFunction.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +2 -2
- package/src/PredefinedConfig/Common/AdaptableMessageType.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +45 -58
- package/src/PredefinedConfig/Common/AdaptableQuery.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableScope.d.ts +5 -5
- package/src/PredefinedConfig/Common/AggregationColumns.d.ts +1 -1
- package/src/PredefinedConfig/Common/ColumnFilter.d.ts +2 -2
- package/src/PredefinedConfig/Common/Entitlement.d.ts +1 -1
- package/src/PredefinedConfig/Common/Fdc3Context.d.ts +133 -37
- package/src/PredefinedConfig/Common/Fdc3Intent.d.ts +4 -4
- package/src/PredefinedConfig/Common/Schedule.d.ts +2 -2
- package/src/PredefinedConfig/Common/Types.d.ts +15 -15
- package/src/PredefinedConfig/ExportState.d.ts +4 -4
- package/src/PredefinedConfig/FlashingCellState.d.ts +4 -4
- package/src/PredefinedConfig/FormatColumnState.d.ts +4 -27
- package/src/PredefinedConfig/NotesState.d.ts +2 -2
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -5
- package/src/PredefinedConfig/ShortcutState.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +8 -13
- package/src/PredefinedConfig/SystemState.d.ts +3 -3
- package/src/PredefinedConfig/TeamSharingState.d.ts +3 -3
- package/src/PredefinedConfig/ToolPanelState.d.ts +1 -1
- package/src/PredefinedConfig/Uuid.d.ts +1 -1
- package/src/Redux/ActionsReducers/GridRedux.d.ts +6 -1
- package/src/Redux/ActionsReducers/GridRedux.js +18 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +37 -16
- package/src/Redux/ActionsReducers/LayoutRedux.js +69 -16
- package/src/Redux/Store/AdaptableReduxMerger.d.ts +1 -1
- package/src/Redux/Store/AdaptableStore.d.ts +2 -2
- package/src/Redux/Store/AdaptableStore.js +46 -19
- package/src/Strategy/AdaptableModuleBase.d.ts +0 -1
- package/src/Strategy/AdaptableModuleBase.js +0 -30
- package/src/Strategy/AlertModule.js +1 -1
- package/src/Strategy/ChartingModule.js +8 -5
- package/src/Strategy/ColumnFilterModule.d.ts +2 -0
- package/src/Strategy/ColumnFilterModule.js +78 -40
- package/src/Strategy/CustomSortModule.js +1 -1
- package/src/Strategy/FlashingCellModule.js +1 -1
- package/src/Strategy/Interface/IModule.d.ts +3 -3
- package/src/Strategy/LayoutModule.js +5 -0
- package/src/Strategy/StyledColumnModule.js +2 -53
- package/src/Utilities/Constants/GeneralConstants.d.ts +3 -0
- package/src/Utilities/Constants/GeneralConstants.js +3 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +31 -23
- package/src/Utilities/Defaults/DefaultSettingsPanel.d.ts +1 -1
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +2 -2
- package/src/Utilities/Emitter.d.ts +2 -2
- package/src/Utilities/Emitter.js +2 -2
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.d.ts +3 -3
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.d.ts +3 -3
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +55 -5
- package/src/Utilities/ExpressionFunctions/dateUtils.d.ts +1 -0
- package/src/Utilities/ExpressionFunctions/dateUtils.js +9 -0
- package/src/Utilities/ExpressionFunctions/deepMap.d.ts +3 -3
- package/src/Utilities/ExpressionFunctions/deepMap.js +7 -7
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/groupingMap.d.ts +7 -7
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarAggregationHelper.d.ts +7 -7
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +11 -1
- package/src/Utilities/Extensions/TypeExtensions.d.ts +8 -8
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -0
- package/src/Utilities/ObjectFactory.js +1 -1
- package/src/Utilities/Services/EntitlementService.d.ts +0 -1
- package/src/Utilities/Services/EntitlementService.js +0 -8
- package/src/Utilities/Services/Interface/IAlertService.d.ts +3 -3
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +0 -6
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -1
- package/src/Utilities/Services/LicenseService/index.js +181 -1
- package/src/Utilities/Services/MetamodelService.js +1 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/license/LicenseDetails.d.ts +1 -1
- package/src/Utilities/license/decode.js +65 -1
- package/src/Utilities/license/hashing.js +43 -1
- package/src/Utilities/logDeprecation.d.ts +5 -3
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +1 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +1 -1
- package/src/View/Alert/AlertEmptyView.js +1 -1
- package/src/View/Alert/Utilities/getAvailablePredicates.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +20 -4
- package/src/View/Alert/Wizard/AlertButtonsEditor.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +21 -24
- package/src/View/Alert/Wizard/AlertMessageWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertNotificationWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertTypeWizardSection.d.ts +1 -1
- package/src/View/Alert/Wizard/AlertWizard.js +1 -1
- package/src/View/Alert/Wizard/isValidAlertRules.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +3 -9
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +2 -2
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnDefinitionWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -18
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnTypeSection.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.d.ts +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnWizard.js +2 -2
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +5 -1
- package/src/View/CellSummary/CellSummaryViewPanel.js +5 -5
- package/src/View/ColumnInfo/ColumnInfo.js +7 -8
- package/src/View/Components/AdaptableDateInput/index.d.ts +2 -2
- package/src/View/Components/AdaptableInput/index.d.ts +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +2 -2
- package/src/View/Components/Buttons/ButtonBase/index.d.ts +1 -1
- package/src/View/Components/Buttons/ButtonOpen.d.ts +5 -0
- package/src/View/Components/Buttons/ButtonOpen.js +7 -0
- package/src/View/Components/Buttons/ButtonUnsuspend.d.ts +8 -0
- package/src/View/Components/Buttons/ButtonUnsuspend.js +17 -0
- package/src/View/Components/CellPopup/index.d.ts +1 -1
- package/src/View/Components/ColumnSelector/index.d.ts +1 -1
- package/src/View/Components/EntityRulesEditor/index.d.ts +2 -2
- package/src/View/Components/EntityRulesEditor/index.js +11 -3
- package/src/View/Components/ExternalRenderer.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +24 -24
- package/src/View/Components/FilterForm/QuickFilterForm.js +3 -3
- package/src/View/Components/FilterForm/QuickFilterValues.d.ts +2 -2
- package/src/View/Components/FilterForm/QuickFilterValues.js +2 -2
- package/src/View/Components/FilterForm/Waiting.d.ts +1 -1
- package/src/View/Components/Forms/AdaptableFormControlTextClear.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/useMenuItems.js +2 -2
- package/src/View/Components/PredicateEditor/PredicateEditor.js +10 -10
- package/src/View/Components/RangesComponent.js +11 -8
- package/src/View/Components/Selectors/ColumnSelector.d.ts +12 -17
- package/src/View/Components/Selectors/ColumnSelector.js +23 -42
- package/src/View/Components/Selectors/ColumnSelectorOld.d.ts +18 -0
- package/src/View/Components/Selectors/ColumnSelectorOld.js +46 -0
- package/src/View/Components/Selectors/ColumnValueSelector.d.ts +4 -23
- package/src/View/Components/Selectors/ColumnValueSelector.js +34 -126
- package/src/View/Components/Selectors/PermittedValuesSelector.d.ts +13 -0
- package/src/View/Components/Selectors/PermittedValuesSelector.js +46 -0
- package/src/View/Components/StyleComponent.d.ts +2 -3
- package/src/View/Components/StyleComponent.js +37 -40
- package/src/View/Components/ToolPanel/ToolPanelPopup.js +2 -2
- package/src/View/Components/ToolPanel/ToolPanelWrapper.d.ts +1 -1
- package/src/View/Components/ValueSelector/index.d.ts +2 -2
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.d.ts +1 -1
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.d.ts +1 -1
- package/src/View/CustomSort/Wizard/CustomSortWizard.js +1 -1
- package/src/View/Dashboard/DashboardPopup.js +4 -4
- package/src/View/Dashboard/DashboardToolbarFactory.js +0 -1
- package/src/View/Dashboard/PinnedDashboard.js +6 -3
- package/src/View/Dashboard/PinnedToolbarsSelector.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +3 -1
- package/src/View/DataImport/DataImportPopup.js +1 -1
- package/src/View/DataImport/DataImportWizard/DataImportWizard.d.ts +1 -1
- package/src/View/DataImport/DataImportWizard/sections/UploadSection/UploadSection.d.ts +1 -1
- package/src/View/DataSet/DataSetViewPanel.js +3 -2
- package/src/View/Export/ExportViewPanel.js +12 -9
- package/src/View/Export/Wizard/ReportColumnsWizardSection.d.ts +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.d.ts +1 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.d.ts +1 -1
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.d.ts +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +8 -8
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +10 -9
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.d.ts +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +3 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.d.ts +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +7 -17
- package/src/View/GridFilter/GridFilterExpressionEditor.js +62 -9
- package/src/View/GridFilter/GridFilterPopup.js +36 -6
- package/src/View/GridFilter/GridFilterStatusbar.js +0 -1
- package/src/View/GridFilter/GridFilterViewPanel.d.ts +2 -26
- package/src/View/GridFilter/GridFilterViewPanel.js +49 -150
- package/src/View/GridFilter/NamedQuerySelector.d.ts +16 -0
- package/src/View/GridFilter/NamedQuerySelector.js +50 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.d.ts +24 -0
- package/src/View/GridFilter/useGridFilterExpressionEditor.js +123 -0
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.d.ts +4 -0
- package/src/View/GridFilter/useGridFilterOptionsForExpressionEditor.js +27 -0
- package/src/View/GridInfo/GridInfoPopup/GridInfoPopup.js +5 -3
- package/src/View/Layout/LayoutViewPanel.js +4 -3
- package/src/View/Layout/SaveLayoutButton.js +2 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +10 -0
- package/src/View/Layout/Wizard/sections/FilterSection.js +15 -17
- package/src/View/Layout/Wizard/sections/GridFilterSection.d.ts +9 -0
- package/src/View/Layout/Wizard/sections/GridFilterSection.js +37 -0
- package/src/View/License/LicenseWatermark.js +61 -1
- package/src/View/NamedQuery/EditCurrentQueryButton.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/NamedQuery/Wizard/NamedQueryWizard.js +2 -2
- package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
- package/src/View/QuickSearch/useQuickSearchDebounced.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReminder.js +5 -2
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.d.ts +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsReport.js +6 -5
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +6 -7
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +4 -3
- package/src/View/SmartEdit/SmartEditViewPanel.js +7 -5
- package/src/View/SpecialColumnSettingsWizardStep.js +4 -1
- package/src/View/StateManagement/StateManagementPopup.js +6 -6
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +16 -8
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +20 -23
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +2 -3
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +7 -5
- package/src/View/StyledColumn/Wizard/StyledColumnWizardSettingsSection.d.ts +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/StyledColumnBadgePreview.js +4 -4
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +0 -8
- package/src/View/StyledColumn/Wizard/StyledColumnWizardTypeSection.js +2 -9
- package/src/View/SystemStatus/SystemStatusViewPanel.js +1 -1
- package/src/View/SystemStatus/Utilities/getStatusItemStyle.js +1 -1
- package/src/View/Theme/ThemeEditor.d.ts +1 -1
- package/src/View/Theme/ThemeViewPanel.js +4 -3
- package/src/View/UIHelper.d.ts +1 -1
- package/src/View/Wizard/ObjectTagsWizardSection.d.ts +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +1 -1
- package/src/View/Wizard/OnePageWizards.d.ts +2 -2
- package/src/agGrid/Adaptable.d.ts +20 -17
- package/src/agGrid/Adaptable.js +192 -189
- package/src/agGrid/AdaptableLogger.js +14 -14
- package/src/agGrid/CheckboxRenderer.d.ts +5 -0
- package/src/agGrid/CheckboxRenderer.js +5 -1
- package/src/agGrid/ColumnSetupInfo.d.ts +1 -1
- package/src/agGrid/agGridHelper.d.ts +0 -1
- package/src/agGrid/agGridHelper.js +15 -13
- package/src/agGrid/editors/AdaptableDateEditor/InternalAdaptableDateEditor.d.ts +2 -2
- package/src/agGrid/editors/AdaptableNumberEditor/InternalAdaptableNumberEditor.d.ts +2 -2
- package/src/components/CheckBox/index.d.ts +1 -1
- package/src/components/ColorPicker/ColorPicker.d.ts +2 -2
- package/src/components/ContainerProps.d.ts +2 -2
- package/src/components/Dashboard/Dashboard.d.ts +2 -2
- package/src/components/Dashboard/DashboardTab.d.ts +1 -1
- package/src/components/Dashboard/DashboardToolbar.d.ts +1 -1
- package/src/components/Datepicker/index.d.ts +2 -2
- package/src/components/Dialog/index.d.ts +2 -2
- package/src/components/Dropdown/index.d.ts +2 -2
- package/src/components/DropdownButton/DropdownButtonItem.d.ts +1 -1
- package/src/components/DropdownButton/index.d.ts +1 -1
- package/src/components/DropdownButton/renderItem.d.ts +1 -1
- package/src/components/DropdownButton/useExpanded.d.ts +1 -1
- package/src/components/EllipsisContainer/index.d.ts +1 -1
- package/src/components/EmptyContent/index.d.ts +1 -1
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -1
- package/src/components/ExpressionEditor/NamedQueryContext.d.ts +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilder.js +45 -15
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.d.ts +7 -2
- package/src/components/ExpressionEditor/QueryBuilder/QueryBuilderInputs.js +48 -33
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.d.ts +1 -1
- package/src/components/ExpressionEditor/QueryBuilder/QueryPredicateBuilder.js +6 -6
- package/src/components/ExpressionEditor/QueryBuilder/booleanExpressions.js +2 -0
- package/src/components/ExpressionEditor/QueryBuilder/utils.d.ts +2 -1
- package/src/components/ExpressionEditor/QueryBuilder/utils.js +30 -0
- package/src/components/ExpressionEditor/index.d.ts +2 -1
- package/src/components/ExpressionEditor/index.js +81 -59
- package/src/components/FormLayout/index.d.ts +4 -4
- package/src/components/Input/NumberInput.d.ts +1 -1
- package/src/components/Input/index.d.ts +2 -2
- package/src/components/List/ListGroupItem/index.d.ts +2 -2
- package/src/components/Modal/Backdrop.d.ts +2 -2
- package/src/components/OverlayTrigger/index.d.ts +1 -1
- package/src/components/Panel/index.d.ts +1 -1
- package/src/components/Radio/index.d.ts +1 -1
- package/src/components/ResizeObserver/index.d.ts +1 -1
- package/src/components/Select/Select.d.ts +30 -0
- package/src/components/Select/Select.js +128 -0
- package/src/components/Select/index.d.ts +1 -0
- package/src/components/Select/index.js +1 -0
- package/src/components/SelectableList/index.d.ts +1 -1
- package/src/components/Tabs/index.d.ts +3 -3
- package/src/components/Textarea/index.d.ts +1 -1
- package/src/components/Toggle/Toggle.d.ts +1 -1
- package/src/components/WarningBox/index.d.ts +4 -0
- package/src/components/WarningBox/index.js +7 -0
- package/src/components/WindowModal/WindowModal.d.ts +2 -2
- package/src/components/icons/DefaultIcon.d.ts +1 -1
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/resume.d.ts +3 -0
- package/src/components/icons/resume.js +4 -0
- package/src/components/utils/useContainerScrollObserver/index.d.ts +1 -1
- package/src/components/utils/uuid.d.ts +1 -1
- package/src/metamodel/adaptable-metamodel-model.d.ts +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +330 -27
- package/src/metamodel/adaptable.metamodel.js +9435 -1
- package/src/parser/src/predicate/mapExpressionToQlPredicate.js +1 -1
- package/src/parser/src/predicate/mapQlPredicateToExpression.js +3 -0
- package/src/parser/src/predicate/types.d.ts +2 -2
- package/src/parser/src/types.d.ts +23 -11
- package/src/renderReactRoot.d.ts +2 -4
- package/src/renderReactRoot.js +5 -46
- package/src/types.d.ts +6 -6
- package/themes/dark.css +1 -1
- package/themes/dark.css.map +1 -1
- package/themes/light.css +1 -1
- package/themes/light.css.map +1 -1
- package/tsconfig.esm.tsbuildinfo +1 -0
- package/publishTimestamp.d.ts +0 -2
- package/publishTimestamp.js +0 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +0 -216
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +0 -6
- package/src/AdaptableOptions/FinancePluginOptions.js +0 -1
- package/src/Api/Events/ChexboxColumnClicked.d.ts +0 -24
- package/src/Api/Events/ChexboxColumnClicked.js +0 -1
- package/src/Api/Events/QueryRun.d.ts +0 -15
- package/src/Api/Events/QueryRun.js +0 -1
- package/src/PredefinedConfig/ConditionalStyleState.d.ts +0 -41
- package/src/PredefinedConfig/ConditionalStyleState.js +0 -1
- package/version.d.ts +0 -2
- package/version.js +0 -1
- /package/src/AdaptableOptions/{FilterOptions.js → GridFilterOptions.js} +0 -0
|
@@ -1,13 +1,16 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useDispatch } from 'react-redux';
|
|
3
|
-
import {
|
|
3
|
+
import { Box, Flex } from 'rebass';
|
|
4
4
|
import { ExpressionEditor } from '../../components/ExpressionEditor';
|
|
5
5
|
import { NamedQueryContext, } from '../../components/ExpressionEditor/NamedQueryContext';
|
|
6
6
|
import SimpleButton from '../../components/SimpleButton';
|
|
7
7
|
import * as QueryRedux from '../../Redux/ActionsReducers/NamedQueryRedux';
|
|
8
|
+
import { PopupShowForm } from '../../Redux/ActionsReducers/PopupRedux';
|
|
8
9
|
import { GridFilterModuleId } from '../../Utilities/Constants/ModuleConstants';
|
|
9
10
|
import { IsNotNullOrEmpty, IsNullOrEmpty } from '../../Utilities/Extensions/StringExtensions';
|
|
11
|
+
import Helper from '../../Utilities/Helpers/Helper';
|
|
10
12
|
import { useAdaptable } from '../AdaptableContext';
|
|
13
|
+
import { useGridFilterOptionsForExpressionEditorProps } from './useGridFilterOptionsForExpressionEditor';
|
|
11
14
|
export const GridFilterExpressionEditor = (props) => {
|
|
12
15
|
const dispatch = useDispatch();
|
|
13
16
|
const { api } = useAdaptable();
|
|
@@ -16,15 +19,68 @@ export const GridFilterExpressionEditor = (props) => {
|
|
|
16
19
|
const isExpressionValid = api.internalApi
|
|
17
20
|
.getQueryLanguageService()
|
|
18
21
|
.validateBoolean(expression, GridFilterModuleId).isValid;
|
|
22
|
+
const isExistingNamedQuery = Helper.objectExists(api.namedQueryApi.getNamedQueries().find((q) => q.BooleanExpression == expression));
|
|
19
23
|
const initialData = React.useMemo(() => api.internalApi.getQueryPreviewData(), []);
|
|
20
24
|
const namedQueryValidationError = namedQuery
|
|
21
|
-
? api.namedQueryApi.
|
|
25
|
+
? api.namedQueryApi.isValidNamedQuery(namedQuery).message
|
|
22
26
|
: '';
|
|
23
27
|
const hasNamedQueryError = IsNotNullOrEmpty(namedQueryValidationError);
|
|
24
28
|
const onRunQuery = (expression) => {
|
|
25
29
|
api.gridFilterApi.setGridFilterExpression(expression);
|
|
26
30
|
};
|
|
27
31
|
const onAddNamedQuery = (namedQuery) => dispatch(QueryRedux.NamedQueryAdd(namedQuery));
|
|
32
|
+
const handleSaveQuery = () => {
|
|
33
|
+
dispatch(PopupShowForm({
|
|
34
|
+
Id: 'save_query_form',
|
|
35
|
+
Form: {
|
|
36
|
+
title: 'Save as Named Query',
|
|
37
|
+
fields: [
|
|
38
|
+
{
|
|
39
|
+
name: 'name',
|
|
40
|
+
label: 'Name',
|
|
41
|
+
fieldType: 'text',
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
buttons: [
|
|
45
|
+
{
|
|
46
|
+
label: 'Cancel',
|
|
47
|
+
buttonStyle: {
|
|
48
|
+
variant: 'text',
|
|
49
|
+
tone: 'none',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
label: 'Save',
|
|
54
|
+
buttonStyle: {
|
|
55
|
+
variant: 'raised',
|
|
56
|
+
tone: 'accent',
|
|
57
|
+
},
|
|
58
|
+
disabled: (button, context) => {
|
|
59
|
+
if (context.formData.name === '') {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
const testQuery = {
|
|
63
|
+
Name: context.formData.name,
|
|
64
|
+
BooleanExpression: expression,
|
|
65
|
+
};
|
|
66
|
+
const namedQueryValidationResult = api.namedQueryApi.isValidNamedQuery(testQuery);
|
|
67
|
+
if (!namedQueryValidationResult.valid) {
|
|
68
|
+
return true;
|
|
69
|
+
}
|
|
70
|
+
},
|
|
71
|
+
onClick: (button, context) => {
|
|
72
|
+
onAddNamedQuery({
|
|
73
|
+
Name: context.formData.name,
|
|
74
|
+
BooleanExpression: expression,
|
|
75
|
+
});
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
},
|
|
80
|
+
}));
|
|
81
|
+
};
|
|
82
|
+
const expressionEditorProps = useGridFilterOptionsForExpressionEditorProps();
|
|
83
|
+
const actionsDisabled = !isExpressionValid || IsNullOrEmpty(expression) || hasNamedQueryError || isExistingNamedQuery;
|
|
28
84
|
return (React.createElement(NamedQueryContext.Provider, { value: {
|
|
29
85
|
namedQuery: namedQuery,
|
|
30
86
|
setNamedQuery: (newQuery) => {
|
|
@@ -32,16 +88,13 @@ export const GridFilterExpressionEditor = (props) => {
|
|
|
32
88
|
},
|
|
33
89
|
} },
|
|
34
90
|
React.createElement(Flex, { height: "100%", flexDirection: "column" },
|
|
35
|
-
React.createElement(ExpressionEditor, {
|
|
91
|
+
React.createElement(ExpressionEditor, Object.assign({}, expressionEditorProps, { type: 'boolean', module: GridFilterModuleId, value: expression, onChange: (expression) => setExpression(expression), initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.namedQueryApi.getNamedQueries(), api: api })),
|
|
36
92
|
React.createElement(Flex, { flexDirection: "row", padding: 1, alignItems: "center" },
|
|
37
93
|
props.onDismiss && (React.createElement(SimpleButton, { margin: 1, variant: "text", "data-name": "action-close", onClick: () => {
|
|
38
94
|
props.onDismiss();
|
|
39
95
|
} }, "CLOSE")),
|
|
40
|
-
React.createElement(
|
|
41
|
-
|
|
42
|
-
color: 'var(--ab-color-error)',
|
|
43
|
-
textAlign: 'end',
|
|
44
|
-
} }, namedQueryValidationError),
|
|
96
|
+
React.createElement(Box, { flex: 1 }),
|
|
97
|
+
React.createElement(SimpleButton, { disabled: actionsDisabled, onClick: handleSaveQuery, icon: "save" }, "Save Query"),
|
|
45
98
|
React.createElement(SimpleButton, { variant: "raised", tone: "accent", "data-name": "action-run", margin: 1, onClick: () => {
|
|
46
99
|
var _a;
|
|
47
100
|
if (namedQuery) {
|
|
@@ -52,5 +105,5 @@ export const GridFilterExpressionEditor = (props) => {
|
|
|
52
105
|
}
|
|
53
106
|
onRunQuery(expression);
|
|
54
107
|
(_a = props === null || props === void 0 ? void 0 : props.onDismiss) === null || _a === void 0 ? void 0 : _a.call(props);
|
|
55
|
-
}, disabled:
|
|
108
|
+
}, disabled: actionsDisabled }, "Apply Grid Filter")))));
|
|
56
109
|
};
|
|
@@ -1,12 +1,42 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
+
import { Flex } from 'rebass';
|
|
3
|
+
import DropdownButton from '../../components/DropdownButton';
|
|
4
|
+
import FieldWrap from '../../components/FieldWrap';
|
|
5
|
+
import FormLayout, { FormRow } from '../../components/FormLayout';
|
|
6
|
+
import Input from '../../components/Input';
|
|
2
7
|
import Panel from '../../components/Panel';
|
|
3
|
-
import {
|
|
8
|
+
import { ButtonClear } from '../Components/Buttons/ButtonClear';
|
|
9
|
+
import { ButtonExpand } from '../Components/Buttons/ButtonExpand';
|
|
10
|
+
import { ButtonInvalid } from '../Components/Buttons/ButtonInvalid';
|
|
11
|
+
import { ButtonPause } from '../Components/Buttons/ButtonPause';
|
|
12
|
+
import { ButtonPlay } from '../Components/Buttons/ButtonPlay';
|
|
13
|
+
import { ButtonSave } from '../Components/Buttons/ButtonSave';
|
|
14
|
+
import { ButtonUnsuspend } from '../Components/Buttons/ButtonUnsuspend';
|
|
4
15
|
import { PopupPanel } from '../Components/Popups/AdaptablePopup/PopupPanel';
|
|
5
|
-
import {
|
|
16
|
+
import { NamedQuerySelector } from './NamedQuerySelector';
|
|
17
|
+
import { useGridFilterExpressionEditor } from './useGridFilterExpressionEditor';
|
|
6
18
|
export const GridFilterPopup = () => {
|
|
7
|
-
const
|
|
8
|
-
const
|
|
19
|
+
const { cachedQueries, expression, setExpression, isExpressionNamedQuery, isExpressionValid, isSuspended, gridFilter, namedQueries, availableColumns, runQuery, onExpand, clearQuery, namedQueryModuleAccessLevel, saveQuery, suspendGridFilter, unSuspendGridFilter, setGridFilterExpression, gridFilterAccessLevel, } = useGridFilterExpressionEditor();
|
|
20
|
+
const handleEnter = (e) => {
|
|
21
|
+
if (e.key === 'Enter') {
|
|
22
|
+
runQuery();
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const disabled = isSuspended || gridFilterAccessLevel === 'ReadOnly';
|
|
9
26
|
return (React.createElement(PopupPanel, { className: "ab-GridFilter", headerText: "Grid Filter", glyphicon: "grid-filter" },
|
|
10
|
-
React.createElement(Panel, {
|
|
11
|
-
React.createElement(
|
|
27
|
+
React.createElement(Panel, { bodyProps: { height: '100%' }, height: "100%" },
|
|
28
|
+
React.createElement(FormLayout, null,
|
|
29
|
+
React.createElement(FormRow, { label: "Expression" },
|
|
30
|
+
React.createElement(FieldWrap, { marginRight: 1, width: "100%" },
|
|
31
|
+
React.createElement(ButtonExpand, { disabled: disabled, variant: "text", tone: "neutral", onClick: onExpand, tooltip: "Open Expression Editor", marginLeft: 1 }),
|
|
32
|
+
React.createElement(Input, { onKeyDown: handleEnter, disabled: disabled, type: "text", "data-name": "grid-filter-input", placeholder: "Grid Filter", spellCheck: false, value: expression, onChange: (x) => setExpression(x.target.value), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
33
|
+
isExpressionValid ? (React.createElement(ButtonPlay, { onClick: () => runQuery(), tooltip: '', accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: isSuspended || expression == '' || expression == (gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression), marginRight: 1 })) : (React.createElement(ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Grid Filter", marginRight: 1 })),
|
|
34
|
+
' ',
|
|
35
|
+
(gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression) !== '' && (React.createElement(ButtonClear, { onClick: () => clearQuery(), tooltip: "Clear Grid Filter", accessLevel: gridFilterAccessLevel })))),
|
|
36
|
+
React.createElement(FormRow, { label: "" },
|
|
37
|
+
React.createElement(Flex, { justifyContent: "space-around" },
|
|
38
|
+
React.createElement(ButtonSave, { onClick: () => saveQuery(), tooltip: "Save as Named Query", accessLevel: namedQueryModuleAccessLevel, disabled: !isExpressionValid || isExpressionNamedQuery || expression == '', variant: "text", tone: "neutral", marginRight: 1 }, "Save"),
|
|
39
|
+
isSuspended ? (React.createElement(ButtonUnsuspend, { onClick: () => unSuspendGridFilter(), tooltip: "Unsuspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }, "Resume")) : (React.createElement(ButtonPause, { onClick: () => suspendGridFilter(), tooltip: "Suspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: isSuspended || !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }, "Suspend")),
|
|
40
|
+
React.createElement(DropdownButton, { disabled: disabled, variant: "text", items: availableColumns, marginRight: 1, tooltip: "Pick Columns", icon: "list", iconPosition: "start" }, "Columns"),
|
|
41
|
+
React.createElement(NamedQuerySelector, { disabled: disabled, namedQueries: namedQueries, cachedQueries: cachedQueries, currentQuery: gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression, onSelect: (query) => runQuery(query), setGridFilterExpression: (query) => setGridFilterExpression(query) }, "Named Queries")))))));
|
|
12
42
|
};
|
|
@@ -6,7 +6,6 @@ export const GridFilterStatusbar = (props) => {
|
|
|
6
6
|
const currentLayoutName = useSelector((state) => state.Layout.CurrentLayout);
|
|
7
7
|
const currentLayout = useSelector((state) => state.Layout.Layouts).find((layout) => layout.Name === currentLayoutName);
|
|
8
8
|
const query = (_b = (_a = currentLayout === null || currentLayout === void 0 ? void 0 : currentLayout.GridFilter) === null || _a === void 0 ? void 0 : _a.Expression) !== null && _b !== void 0 ? _b : '';
|
|
9
|
-
console.log('currentLayout', currentLayout);
|
|
10
9
|
let text = query;
|
|
11
10
|
let popover = null;
|
|
12
11
|
if (query.length > queryMaxLength) {
|
|
@@ -1,29 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { CachedQuery } from '../../PredefinedConfig/NamedQueryState';
|
|
3
|
-
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
4
|
-
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
5
|
-
import { NamedQuery } from '../../types';
|
|
1
|
+
/// <reference types="react" />
|
|
6
2
|
import { ViewPanelProps } from '../Components/SharedProps/ViewPanelProps';
|
|
7
3
|
export interface QueryViewPanelComponentProps extends ViewPanelProps {
|
|
8
|
-
CurrentQuery: string;
|
|
9
|
-
NamedQueries: NamedQuery[];
|
|
10
|
-
CachedQueries: CachedQuery[];
|
|
11
|
-
onAddCachedQuery: (cachedQuery: CachedQuery) => SystemRedux.SystemCachedQueryAddAction;
|
|
12
|
-
onShowNamedQueries: (value: string, popup: string) => PopupRedux.PopupShowScreenAction;
|
|
13
4
|
}
|
|
14
|
-
|
|
15
|
-
isAdaptableReady: boolean;
|
|
16
|
-
expression: string;
|
|
17
|
-
}
|
|
18
|
-
declare class QueryViewPanelComponent extends React.Component<QueryViewPanelComponentProps, QueryViewPanelComponentState> {
|
|
19
|
-
constructor(props: QueryViewPanelComponentProps);
|
|
20
|
-
componentDidMount(): void;
|
|
21
|
-
componentDidUpdate(prevProps: QueryViewPanelComponentProps): void;
|
|
22
|
-
render(): JSX.Element;
|
|
23
|
-
private clearQuery;
|
|
24
|
-
saveQuery(): void;
|
|
25
|
-
onSelectedQueryChanged(queryName: string): void;
|
|
26
|
-
runQuery(expression?: string): void;
|
|
27
|
-
}
|
|
28
|
-
export declare let GridFilterPanelControl: import("react-redux").ConnectedComponent<typeof QueryViewPanelComponent, import("react-redux").Omit<JSX.LibraryManagedAttributes<C, import("react-redux").GetProps<C>>, keyof QueryViewPanelComponentProps>>;
|
|
29
|
-
export {};
|
|
5
|
+
export declare const GridFilterPanelControl: (props: QueryViewPanelComponentProps) => JSX.Element;
|
|
@@ -1,165 +1,64 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { connect } from 'react-redux';
|
|
3
2
|
import { Flex } from 'rebass';
|
|
4
3
|
import DropdownButton from '../../components/DropdownButton';
|
|
5
4
|
import FieldWrap from '../../components/FieldWrap';
|
|
6
5
|
import { Icon } from '../../components/icons';
|
|
7
6
|
import Input from '../../components/Input';
|
|
8
|
-
import { SortOrder } from '../../PredefinedConfig/Common/Enums';
|
|
9
|
-
import * as PopupRedux from '../../Redux/ActionsReducers/PopupRedux';
|
|
10
|
-
import * as SystemRedux from '../../Redux/ActionsReducers/SystemRedux';
|
|
11
|
-
import * as ModuleConstants from '../../Utilities/Constants/ModuleConstants';
|
|
12
|
-
import { NamedQueryModuleId } from '../../Utilities/Constants/ModuleConstants';
|
|
13
|
-
import { ArrayExtensions } from '../../Utilities/Extensions/ArrayExtensions';
|
|
14
|
-
import StringExtensions from '../../Utilities/Extensions/StringExtensions';
|
|
15
7
|
import { ButtonClear } from '../Components/Buttons/ButtonClear';
|
|
16
8
|
import { ButtonExpand } from '../Components/Buttons/ButtonExpand';
|
|
17
9
|
import { ButtonInvalid } from '../Components/Buttons/ButtonInvalid';
|
|
10
|
+
import { ButtonPause } from '../Components/Buttons/ButtonPause';
|
|
18
11
|
import { ButtonPlay } from '../Components/Buttons/ButtonPlay';
|
|
19
12
|
import { ButtonSave } from '../Components/Buttons/ButtonSave';
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
13
|
+
import { ButtonUnsuspend } from '../Components/Buttons/ButtonUnsuspend';
|
|
14
|
+
import { NamedQuerySelector } from './NamedQuerySelector';
|
|
15
|
+
import { useGridFilterExpressionEditor } from './useGridFilterExpressionEditor';
|
|
16
|
+
const QueryViewPanelComponent = (props) => {
|
|
17
|
+
const { cachedQueries, expression, setExpression, isExpressionNamedQuery, isExpressionValid, isSuspended, gridFilter, isAdaptableReady, namedQueries, availableColumns, runQuery, onExpand, clearQuery, namedQueryModuleAccessLevel, saveQuery, suspendGridFilter, unSuspendGridFilter, setGridFilterExpression, gridFilterAccessLevel, } = useGridFilterExpressionEditor();
|
|
18
|
+
if (!isAdaptableReady) {
|
|
19
|
+
return null;
|
|
27
20
|
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}
|
|
33
|
-
componentDidUpdate(prevProps) {
|
|
34
|
-
if (prevProps.CurrentQuery !== this.props.CurrentQuery) {
|
|
35
|
-
this.setState({
|
|
36
|
-
expression: this.props.CurrentQuery,
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
render() {
|
|
41
|
-
if (this.state.isAdaptableReady === false) {
|
|
42
|
-
return null;
|
|
43
|
-
}
|
|
44
|
-
const isExpressionValid = this.state.expression == '' ||
|
|
45
|
-
this.props.api.internalApi
|
|
46
|
-
.getQueryLanguageService()
|
|
47
|
-
.validateBoolean(this.state.expression, NamedQueryModuleId).isValid;
|
|
48
|
-
const isExpressionNamedQuery = this.props.NamedQueries.find((sq) => sq.BooleanExpression == this.state.expression) != null;
|
|
49
|
-
let sortedNamedQueries = ArrayExtensions.sortArrayWithProperty(SortOrder.Asc, this.props.NamedQueries, 'Name');
|
|
50
|
-
let availableSearches = [
|
|
51
|
-
...sortedNamedQueries.map((expression) => {
|
|
52
|
-
return {
|
|
53
|
-
label: expression.Name,
|
|
54
|
-
icon: expression.BooleanExpression === this.props.CurrentQuery ? (React.createElement(Icon, { name: 'check' })) : null,
|
|
55
|
-
onClick: () => this.runQuery(expression.BooleanExpression),
|
|
56
|
-
};
|
|
57
|
-
}),
|
|
58
|
-
...(ArrayExtensions.IsNotNullOrEmpty(this.props.CachedQueries) ? [{ separator: true }] : []),
|
|
59
|
-
...(ArrayExtensions.IsNotNullOrEmpty(this.props.CachedQueries)
|
|
60
|
-
? this.props.CachedQueries.slice(-5)
|
|
61
|
-
.reverse()
|
|
62
|
-
.map((item) => ({
|
|
63
|
-
label: `Grid Filter at ${item.time.toLocaleTimeString('en-US')}`,
|
|
64
|
-
icon: React.createElement(Icon, { name: 'history' }),
|
|
65
|
-
onClick: () => this.props.api.gridFilterApi.setGridFilterExpression(item.expression),
|
|
66
|
-
}))
|
|
67
|
-
: []),
|
|
68
|
-
];
|
|
69
|
-
let availableColumns = this.props.api.columnApi.getColumns().map((col) => {
|
|
70
|
-
return {
|
|
71
|
-
label: col.friendlyName,
|
|
72
|
-
onClick: () => this.setState({
|
|
73
|
-
expression: this.state.expression + `[${col.columnId}]`,
|
|
74
|
-
}),
|
|
75
|
-
};
|
|
76
|
-
});
|
|
77
|
-
const elementType = this.props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
78
|
-
const handleEnter = (e) => {
|
|
79
|
-
if (e.key === 'Enter') {
|
|
80
|
-
this.runQuery();
|
|
81
|
-
}
|
|
82
|
-
};
|
|
83
|
-
const renderTextInput = () => {
|
|
84
|
-
return this.props.viewType === 'Toolbar' ? (React.createElement(FieldWrap, { marginRight: 1, width: 500 },
|
|
85
|
-
React.createElement(ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.api.gridFilterApi.expandGridFilterEditor(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
86
|
-
React.createElement(Input, { type: "text", "data-name": "grid-filter-input", placeholder: "Grid Filter", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
87
|
-
isExpressionValid ? (React.createElement(ButtonPlay, { onClick: () => this.runQuery(), tooltip: '', accessLevel: 'Full', variant: "text", tone: "neutral", disabled: this.state.expression == '' || this.state.expression == this.props.CurrentQuery, marginRight: 1 })) : (React.createElement(ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Grid Filter", marginRight: 1 })),
|
|
88
|
-
' ',
|
|
89
|
-
this.props.CurrentQuery !== '' && (React.createElement(ButtonClear, { onClick: () => this.clearQuery(), tooltip: "Clear Grid Filter", accessLevel: 'Full' })))) : (React.createElement(Input, { type: "text", placeholder: "Grid Filter", spellCheck: false, value: this.state.expression, onChange: (x) => this.setState({ expression: x.target.value }), style: { width: '100%' } }));
|
|
90
|
-
};
|
|
91
|
-
const queryModuleAccessLevel = this.props.api.internalApi
|
|
92
|
-
.getEntitlementService()
|
|
93
|
-
.getEntitlementAccessLevelForModule(NamedQueryModuleId);
|
|
94
|
-
const saveButton = (React.createElement(ButtonSave, { onClick: () => this.saveQuery(), tooltip: "Save as Named Query", accessLevel: queryModuleAccessLevel, disabled: !isExpressionValid || isExpressionNamedQuery || this.state.expression == '', variant: "text", tone: "neutral", marginRight: 1 }));
|
|
95
|
-
const renderButtons = () => {
|
|
96
|
-
return this.props.viewType === 'Toolbar' ? (React.createElement(React.Fragment, null,
|
|
97
|
-
saveButton,
|
|
98
|
-
React.createElement(DropdownButton, { variant: "text", items: availableColumns, marginRight: 1, tooltip: "Pick Columns" },
|
|
99
|
-
React.createElement(Icon, { name: 'list' })),
|
|
100
|
-
React.createElement(DropdownButton, { disabled: ArrayExtensions.IsNullOrEmpty(availableSearches), variant: "text", items: availableSearches, marginRight: 1, tooltip: "Load Named Query", icon: "folder-open" }),
|
|
101
|
-
' ')) : (React.createElement(React.Fragment, null,
|
|
102
|
-
saveButton,
|
|
103
|
-
React.createElement(ButtonExpand, { variant: "text", tone: "neutral", onClick: () => this.props.api.gridFilterApi.expandGridFilterEditor(this.state.expression), tooltip: "Expand", marginLeft: 1 }),
|
|
104
|
-
React.createElement(ButtonClear, { onClick: () => this.clearQuery(), tooltip: "Clear Grid Filter", accessLevel: 'Full', disabled: this.state.expression == '' }),
|
|
105
|
-
React.createElement(ButtonPlay, { onClick: () => this.runQuery(), tooltip: "Run Grid Filter", accessLevel: 'Full', variant: "text", tone: "neutral", disabled: !isExpressionValid ||
|
|
106
|
-
this.state.expression == '' ||
|
|
107
|
-
this.state.expression == this.props.CurrentQuery, marginRight: 1 }),
|
|
108
|
-
React.createElement(DropdownButton, { variant: "text", disabled: ArrayExtensions.IsNullOrEmpty(availableSearches), items: availableSearches, marginRight: 1, tooltip: "Load Named Query", icon: "folder-open" })));
|
|
109
|
-
};
|
|
110
|
-
return (React.createElement(Flex, { onKeyDown: handleEnter, flexDirection: "row", className: `ab-${elementType}__Query__wrap`, flexWrap: this.props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
111
|
-
React.createElement(Flex, null, renderTextInput()),
|
|
112
|
-
React.createElement(Flex, null, renderButtons())));
|
|
113
|
-
}
|
|
114
|
-
clearQuery() {
|
|
115
|
-
this.props.api.gridFilterApi.setGridFilterExpression('');
|
|
116
|
-
}
|
|
117
|
-
saveQuery() {
|
|
118
|
-
this.props.onShowNamedQueries(this.state.expression, this.props.moduleInfo.Popup);
|
|
119
|
-
}
|
|
120
|
-
onSelectedQueryChanged(queryName) {
|
|
121
|
-
this.props.api.gridFilterApi.setGridFilterExpression(queryName);
|
|
122
|
-
}
|
|
123
|
-
runQuery(expression = this.state.expression) {
|
|
124
|
-
if (StringExtensions.IsNullOrEmpty(expression) &&
|
|
125
|
-
StringExtensions.IsNotNullOrEmpty(this.props.CurrentQuery)) {
|
|
126
|
-
// user pressed enter key with an empty input => clear existing current query
|
|
127
|
-
this.props.api.gridFilterApi.setGridFilterExpression('');
|
|
128
|
-
return;
|
|
129
|
-
}
|
|
130
|
-
if (!this.props.api.internalApi
|
|
131
|
-
.getQueryLanguageService()
|
|
132
|
-
.validateBoolean(expression, NamedQueryModuleId).isValid) {
|
|
133
|
-
return;
|
|
21
|
+
const elementType = props.viewType === 'Toolbar' ? 'DashboardToolbar' : 'ToolPanel';
|
|
22
|
+
const handleEnter = (e) => {
|
|
23
|
+
if (e.key === 'Enter') {
|
|
24
|
+
runQuery();
|
|
134
25
|
}
|
|
135
|
-
if (StringExtensions.IsNotNullOrEmpty(this.state.expression)) {
|
|
136
|
-
let cachedQuery = {
|
|
137
|
-
expression: this.state.expression,
|
|
138
|
-
time: new Date(),
|
|
139
|
-
};
|
|
140
|
-
if (cachedQuery) {
|
|
141
|
-
this.props.onAddCachedQuery(cachedQuery);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
this.props.api.gridFilterApi.setGridFilterExpression(expression);
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
function mapStateToProps(state) {
|
|
148
|
-
var _a, _b, _c;
|
|
149
|
-
return {
|
|
150
|
-
CurrentQuery: (_c = (_b = (_a = state.Layout.Layouts.find((l) => l.Name == state.Layout.CurrentLayout)) === null || _a === void 0 ? void 0 : _a.GridFilter) === null || _b === void 0 ? void 0 : _b.Expression) !== null && _c !== void 0 ? _c : '',
|
|
151
|
-
NamedQueries: state.NamedQuery.NamedQueries,
|
|
152
|
-
CachedQueries: state.System.CachedQueries,
|
|
153
26
|
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
27
|
+
const buttonExpand = (React.createElement(ButtonExpand, { disabled: isSuspended, accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", onClick: onExpand, tooltip: "Open Expression Editor", marginLeft: 1 }));
|
|
28
|
+
const renderTextInput = () => {
|
|
29
|
+
return props.viewType === 'Toolbar' ? (React.createElement(FieldWrap, { marginRight: 1, width: 500 },
|
|
30
|
+
buttonExpand,
|
|
31
|
+
React.createElement(Input, { disabled: isSuspended || gridFilterAccessLevel == 'ReadOnly', type: "text", "data-name": "grid-filter-input", placeholder: "Grid Filter", spellCheck: false, value: expression, onChange: (x) => setExpression(x.target.value), style: { fontFamily: 'monospace', fontSize: 12 } }),
|
|
32
|
+
isExpressionValid ? (React.createElement(ButtonPlay, { onClick: () => runQuery(), tooltip: '', accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: isSuspended || expression == '' || expression == (gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression), marginRight: 1 })) : (React.createElement(ButtonInvalid, { variant: "text", tone: "neutral", tooltip: "Invalid Grid Filter", marginRight: 1 })),
|
|
33
|
+
' ',
|
|
34
|
+
(gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression) !== '' && (React.createElement(ButtonClear, { onClick: () => clearQuery(), tooltip: "Clear Grid Filter", accessLevel: gridFilterAccessLevel })))) : (React.createElement(FieldWrap, null,
|
|
35
|
+
' ',
|
|
36
|
+
buttonExpand,
|
|
37
|
+
React.createElement(Input, { disabled: isSuspended || gridFilterAccessLevel == 'ReadOnly', type: "text", "data-name": "grid-filter-input", placeholder: "Grid Filter", spellCheck: false, value: expression, onChange: (x) => setExpression(x.target.value), style: { width: '100%' } })));
|
|
38
|
+
};
|
|
39
|
+
const saveButton = (React.createElement(ButtonSave, { onClick: () => saveQuery(), tooltip: "Save as Named Query", accessLevel: namedQueryModuleAccessLevel, disabled: isSuspended || !isExpressionValid || isExpressionNamedQuery || expression == '', variant: "text", tone: "neutral", marginRight: 1 }));
|
|
40
|
+
const suspendButton = (React.createElement(ButtonPause, { onClick: () => suspendGridFilter(), tooltip: "Suspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }));
|
|
41
|
+
const unSuspendButton = (React.createElement(ButtonUnsuspend, { onClick: () => unSuspendGridFilter(), tooltip: "Unsuspend Grid Filter", accessLevel: gridFilterAccessLevel, disabled: !isExpressionValid, variant: "text", tone: "neutral", marginRight: 1 }));
|
|
42
|
+
const namedQuerySelector = (React.createElement(NamedQuerySelector, { namedQueries: namedQueries, cachedQueries: cachedQueries, currentQuery: gridFilter === null || gridFilter === void 0 ? void 0 : gridFilter.Expression, onSelect: (query) => runQuery(query), setGridFilterExpression: (query) => setGridFilterExpression(query) }));
|
|
43
|
+
const columnsDropdown = (React.createElement(DropdownButton, { disabled: isSuspended, accessLevel: gridFilterAccessLevel, variant: "text", items: availableColumns, marginRight: 1, tooltip: "Pick Columns" },
|
|
44
|
+
React.createElement(Icon, { name: 'list' })));
|
|
45
|
+
const renderButtons = () => {
|
|
46
|
+
return props.viewType === 'Toolbar' ? (React.createElement(React.Fragment, null,
|
|
47
|
+
saveButton,
|
|
48
|
+
isSuspended ? unSuspendButton : suspendButton,
|
|
49
|
+
columnsDropdown,
|
|
50
|
+
namedQuerySelector,
|
|
51
|
+
' ')) : (React.createElement(React.Fragment, null,
|
|
52
|
+
React.createElement(ButtonPlay, { onClick: () => runQuery(), tooltip: "Run Grid Filter", accessLevel: gridFilterAccessLevel, variant: "text", tone: "neutral", disabled: isSuspended || !isExpressionValid || expression == '' || expression == gridFilter, marginRight: 1 }),
|
|
53
|
+
' ',
|
|
54
|
+
React.createElement(ButtonClear, { onClick: () => clearQuery(), tooltip: "Clear Grid Filter", accessLevel: gridFilterAccessLevel, disabled: expression == '' }),
|
|
55
|
+
' ',
|
|
56
|
+
saveButton,
|
|
57
|
+
isSuspended ? unSuspendButton : suspendButton,
|
|
58
|
+
namedQuerySelector));
|
|
163
59
|
};
|
|
164
|
-
}
|
|
165
|
-
|
|
60
|
+
return (React.createElement(Flex, { onKeyDown: handleEnter, flexDirection: "row", className: `ab-${elementType}__Query__wrap`, flexWrap: props.viewType === 'ToolPanel' ? 'wrap' : 'nowrap' },
|
|
61
|
+
React.createElement(Flex, null, renderTextInput()),
|
|
62
|
+
React.createElement(Flex, null, renderButtons())));
|
|
63
|
+
};
|
|
64
|
+
export const GridFilterPanelControl = QueryViewPanelComponent;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { CachedQuery } from '../../PredefinedConfig/NamedQueryState';
|
|
3
|
+
import { NamedQuery } from '../../types';
|
|
4
|
+
export declare const AvailableSearchLabel: (props: {
|
|
5
|
+
label: string;
|
|
6
|
+
expression: string;
|
|
7
|
+
}) => JSX.Element;
|
|
8
|
+
export declare const NamedQuerySelector: (props: {
|
|
9
|
+
namedQueries: NamedQuery[];
|
|
10
|
+
cachedQueries: CachedQuery[];
|
|
11
|
+
currentQuery: string;
|
|
12
|
+
onSelect: (query: string) => void;
|
|
13
|
+
setGridFilterExpression: (query: string) => void;
|
|
14
|
+
children?: any;
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
}) => JSX.Element;
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Box, Flex } from 'rebass';
|
|
3
|
+
import { Icon } from '../../components/icons';
|
|
4
|
+
import Panel from '../../components/Panel';
|
|
5
|
+
import SimpleButton from '../../components/SimpleButton';
|
|
6
|
+
import { Tag } from '../../components/Tag';
|
|
7
|
+
import { SortOrder } from '../../PredefinedConfig/Common/Enums';
|
|
8
|
+
import ArrayExtensions from '../../Utilities/Extensions/ArrayExtensions';
|
|
9
|
+
import { AdaptablePopover } from '../AdaptablePopover';
|
|
10
|
+
import { ButtonOpen } from '../Components/Buttons/ButtonOpen';
|
|
11
|
+
export const AvailableSearchLabel = (props) => {
|
|
12
|
+
return (React.createElement(Flex, { flexDirection: "column", textAlign: "start", width: "100%", justifyContent: "space-around" },
|
|
13
|
+
React.createElement(Box, { mb: 2, flex: 1 }, props.label),
|
|
14
|
+
React.createElement(Tag, null, props.expression)));
|
|
15
|
+
};
|
|
16
|
+
export const NamedQuerySelector = (props) => {
|
|
17
|
+
var _a;
|
|
18
|
+
const sortedNamedQueries = (_a = ArrayExtensions.sortArrayWithProperty(SortOrder.Asc, props.namedQueries, 'Name')) !== null && _a !== void 0 ? _a : [];
|
|
19
|
+
const availableSearches = sortedNamedQueries.map((expression) => {
|
|
20
|
+
return {
|
|
21
|
+
label: (React.createElement(AvailableSearchLabel, { label: expression.Name, expression: expression.BooleanExpression })),
|
|
22
|
+
icon: expression.BooleanExpression === props.currentQuery ? React.createElement(Icon, { name: 'check' }) : null,
|
|
23
|
+
onClick: () => props.onSelect(expression.BooleanExpression),
|
|
24
|
+
};
|
|
25
|
+
});
|
|
26
|
+
const cachedQueries = ArrayExtensions.IsNotNullOrEmpty(props.cachedQueries)
|
|
27
|
+
? props.cachedQueries
|
|
28
|
+
.slice(-3)
|
|
29
|
+
.reverse()
|
|
30
|
+
.map((item) => ({
|
|
31
|
+
label: (React.createElement(AvailableSearchLabel, { label: `Grid Filter at ${item.time.toLocaleTimeString('en-US')}`, expression: item.expression })),
|
|
32
|
+
icon: React.createElement(Icon, { name: 'history' }),
|
|
33
|
+
onClick: () => props.setGridFilterExpression(item.expression),
|
|
34
|
+
}))
|
|
35
|
+
: null;
|
|
36
|
+
return ArrayExtensions.IsNotNullOrEmpty(cachedQueries) ||
|
|
37
|
+
ArrayExtensions.IsNotNullOrEmpty(availableSearches) ? (React.createElement(AdaptablePopover, { tooltipText: "Load Named Query", showIcon: false, popoverMinWidth: 300, bodyText: [
|
|
38
|
+
React.createElement(Flex, { justifyContent: "stretch", flexDirection: "column" },
|
|
39
|
+
React.createElement(Panel, { header: "Named Queries" },
|
|
40
|
+
React.createElement(Flex, { flexDirection: "column" }, availableSearches.map((item, index) => {
|
|
41
|
+
return (React.createElement(SimpleButton, { mb: 2, variant: "text", key: index, onClick: item.onClick }, item.label));
|
|
42
|
+
}))),
|
|
43
|
+
cachedQueries ? (React.createElement(React.Fragment, null,
|
|
44
|
+
React.createElement(Panel, { mt: 2, header: "Recent Grid Filters" },
|
|
45
|
+
React.createElement(Flex, { flexDirection: "column" }, cachedQueries.map((cachedQuery, index) => {
|
|
46
|
+
return (React.createElement(SimpleButton, { mb: 2, variant: "text", key: index, onClick: cachedQuery.onClick }, cachedQuery.label));
|
|
47
|
+
}))))) : null),
|
|
48
|
+
] },
|
|
49
|
+
React.createElement(SimpleButton, { disabled: props.disabled, variant: "text", icon: "folder-open" }, props.children))) : (React.createElement(ButtonOpen, { tooltip: "Load Named Query", disabled: true }));
|
|
50
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { CachedQuery } from '../../PredefinedConfig/NamedQueryState';
|
|
3
|
+
export declare const useGridFilterExpressionEditor: () => {
|
|
4
|
+
namedQueryModuleAccessLevel: import("../../types").AccessLevel;
|
|
5
|
+
cachedQueries: CachedQuery[];
|
|
6
|
+
expression: string;
|
|
7
|
+
setExpression: React.Dispatch<React.SetStateAction<string>>;
|
|
8
|
+
isExpressionNamedQuery: boolean;
|
|
9
|
+
isExpressionValid: boolean;
|
|
10
|
+
isSuspended: boolean;
|
|
11
|
+
gridFilter: import("../../types").GridFilter;
|
|
12
|
+
isAdaptableReady: boolean;
|
|
13
|
+
namedQueries: import("../../types").NamedQuery[];
|
|
14
|
+
onAddCachedQuery: (cachedQuery: CachedQuery) => void;
|
|
15
|
+
availableColumns: any[];
|
|
16
|
+
runQuery: (newExpression?: string) => void;
|
|
17
|
+
clearQuery: () => void;
|
|
18
|
+
onExpand: () => void;
|
|
19
|
+
saveQuery: () => void;
|
|
20
|
+
suspendGridFilter: () => void;
|
|
21
|
+
unSuspendGridFilter: () => void;
|
|
22
|
+
setGridFilterExpression: (expression: string) => void;
|
|
23
|
+
gridFilterAccessLevel: import("../../types").AccessLevel;
|
|
24
|
+
};
|