@adaptabletools/adaptable 13.1.1 → 14.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/README.md +1 -1
- package/base.css +7 -2
- package/base.css.map +1 -1
- package/bundle.cjs.js +180 -177
- package/index.css +11 -2
- package/index.css.map +1 -1
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +4 -1
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -9
- package/src/AdaptableOptions/AlertOptions.d.ts +6 -1
- package/src/AdaptableOptions/ChartingOptions.d.ts +1 -1
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +1 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +1 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +8 -3
- package/src/AdaptableOptions/MasterDetailPluginOptions.d.ts +6 -4
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +1 -1
- package/src/Api/ActionApi.d.ts +14 -3
- package/src/Api/AdaptableApi.d.ts +0 -6
- package/src/Api/AlertApi.d.ts +127 -92
- package/src/Api/BulkUpdateApi.d.ts +9 -2
- package/src/Api/CalculatedColumnApi.d.ts +26 -21
- package/src/Api/CellSummaryApi.d.ts +15 -8
- package/src/Api/ChartingApi.d.ts +9 -2
- package/src/Api/ColumnApi.d.ts +153 -115
- package/src/Api/ConfigApi.d.ts +18 -18
- package/src/Api/CustomSortApi.d.ts +36 -7
- package/src/Api/DashboardApi.d.ts +12 -5
- package/src/Api/DataChangeHistoryApi.d.ts +8 -1
- package/src/Api/DataSetApi.d.ts +13 -3
- package/src/Api/EventApi.d.ts +2 -2
- package/src/Api/ExportApi.d.ts +30 -13
- package/src/Api/FilterApi.d.ts +74 -62
- package/src/Api/FlashingCellApi.d.ts +25 -9
- package/src/Api/FormatColumnApi.d.ts +76 -95
- package/src/Api/FreeTextColumnApi.d.ts +53 -21
- package/src/Api/GridApi.d.ts +57 -22
- package/src/Api/Implementation/ActionApiImpl.d.ts +9 -3
- package/src/Api/Implementation/ActionApiImpl.js +23 -11
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +5 -2
- package/src/Api/Implementation/AlertApiImpl.d.ts +57 -28
- package/src/Api/Implementation/AlertApiImpl.js +179 -197
- package/src/Api/Implementation/ApiBase.d.ts +43 -2
- package/src/Api/Implementation/ApiBase.js +129 -5
- package/src/Api/Implementation/ApplicationApiImpl.d.ts +1 -1
- package/src/Api/Implementation/BulkUpdateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/BulkUpdateApiImpl.js +4 -1
- package/src/Api/Implementation/CalculatedColumnApiImpl.d.ts +7 -2
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +28 -37
- package/src/Api/Implementation/CellSummaryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/CellSummaryApiImpl.js +6 -1
- package/src/Api/Implementation/ChartingApiImpl.d.ts +2 -2
- package/src/Api/Implementation/ChartingApiImpl.js +10 -4
- package/src/Api/Implementation/ColumnApiImpl.d.ts +22 -6
- package/src/Api/Implementation/ColumnApiImpl.js +184 -195
- package/src/Api/Implementation/ConfigApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ConfigApiImpl.js +1 -1
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +16 -1
- package/src/Api/Implementation/CustomSortApiImpl.js +33 -7
- package/src/Api/Implementation/DashboardApiImpl.d.ts +6 -1
- package/src/Api/Implementation/DashboardApiImpl.js +11 -12
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +1 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +5 -0
- package/src/Api/Implementation/DataSetApiImpl.d.ts +6 -0
- package/src/Api/Implementation/DataSetApiImpl.js +17 -8
- package/src/Api/Implementation/EntitlementApiImpl.d.ts +1 -1
- package/src/Api/Implementation/ExportApiImpl.d.ts +9 -1
- package/src/Api/Implementation/ExportApiImpl.js +34 -68
- package/src/Api/Implementation/FilterApiImpl.d.ts +10 -1
- package/src/Api/Implementation/FilterApiImpl.js +61 -157
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +8 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +23 -26
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +20 -15
- package/src/Api/Implementation/FormatColumnApiImpl.js +62 -153
- package/src/Api/Implementation/FreeTextColumnApiImpl.d.ts +13 -5
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +42 -27
- package/src/Api/Implementation/GridApiImpl.d.ts +15 -1
- package/src/Api/Implementation/GridApiImpl.js +117 -61
- package/src/Api/Implementation/LayoutApiImpl.d.ts +8 -7
- package/src/Api/Implementation/LayoutApiImpl.js +29 -112
- package/src/Api/Implementation/PluginsApiImpl.d.ts +1 -1
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -1
- package/src/Api/Implementation/PlusMinusApiImpl.js +5 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +8 -5
- package/src/Api/Implementation/PredicateApiImpl.js +33 -98
- package/src/Api/Implementation/QueryApiImpl.d.ts +7 -2
- package/src/Api/Implementation/QueryApiImpl.js +22 -44
- package/src/Api/Implementation/QueryLanguageApiImpl.d.ts +4 -0
- package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -0
- package/src/Api/Implementation/QuickSearchApiImpl.d.ts +1 -0
- package/src/Api/Implementation/QuickSearchApiImpl.js +5 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +27 -0
- package/src/Api/Implementation/ScheduleApiImpl.js +86 -17
- package/src/Api/Implementation/ScopeApiImpl.js +9 -7
- package/src/Api/Implementation/SettingsPanelApiImpl.d.ts +2 -0
- package/src/Api/Implementation/SettingsPanelApiImpl.js +9 -0
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +8 -1
- package/src/Api/Implementation/ShortcutApiImpl.js +25 -4
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +1 -0
- package/src/Api/Implementation/SmartEditApiImpl.js +5 -0
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +14 -11
- package/src/Api/Implementation/StyledColumnApiImpl.js +40 -185
- package/src/Api/Implementation/SystemStatusApiImpl.d.ts +6 -1
- package/src/Api/Implementation/SystemStatusApiImpl.js +19 -12
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +6 -5
- package/src/Api/Implementation/TeamSharingApiImpl.js +15 -25
- package/src/Api/Implementation/ThemeApiImpl.d.ts +5 -1
- package/src/Api/Implementation/ThemeApiImpl.js +23 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +2 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +13 -4
- package/src/Api/Internal/ActionInternalApi.d.ts +23 -0
- package/src/Api/Internal/ActionInternalApi.js +198 -0
- package/src/Api/{Implementation/InternalApiImpl.d.ts → Internal/AdaptableInternalApi.d.ts} +7 -57
- package/src/Api/{Implementation/InternalApiImpl.js → Internal/AdaptableInternalApi.js} +28 -306
- package/src/Api/Internal/AlertInternalApi.d.ts +148 -0
- package/src/Api/Internal/AlertInternalApi.js +484 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.d.ts +24 -0
- package/src/Api/Internal/CalculatedColumnInternalApi.js +57 -0
- package/src/Api/Internal/ColumnInternalApi.d.ts +33 -0
- package/src/Api/Internal/ColumnInternalApi.js +67 -0
- package/src/Api/Internal/CustomSortInternalApi.d.ts +6 -0
- package/src/Api/Internal/CustomSortInternalApi.js +11 -0
- package/src/Api/Internal/DashboardInternalApi.d.ts +8 -0
- package/src/Api/Internal/DashboardInternalApi.js +26 -0
- package/src/Api/Internal/DataSetInternalApi.d.ts +9 -0
- package/src/Api/Internal/DataSetInternalApi.js +20 -0
- package/src/Api/Internal/ExportInternalApi.d.ts +11 -0
- package/src/Api/Internal/ExportInternalApi.js +73 -0
- package/src/Api/Internal/FilterInternalApi.d.ts +58 -0
- package/src/Api/Internal/FilterInternalApi.js +194 -0
- package/src/Api/Internal/FlashingCellInternalApi.d.ts +12 -0
- package/src/Api/Internal/FlashingCellInternalApi.js +56 -0
- package/src/Api/Internal/FormatColumnInternalApi.d.ts +109 -0
- package/src/Api/Internal/FormatColumnInternalApi.js +225 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.d.ts +15 -0
- package/src/Api/Internal/FreeTextColumnInternalApi.js +44 -0
- package/src/Api/Internal/GridInternalApi.d.ts +82 -0
- package/src/Api/Internal/GridInternalApi.js +252 -0
- package/src/Api/Internal/LayoutInternalApi.d.ts +48 -0
- package/src/Api/Internal/LayoutInternalApi.js +163 -0
- package/src/Api/Internal/PredicateInternalApi.d.ts +37 -0
- package/src/Api/Internal/PredicateInternalApi.js +140 -0
- package/src/Api/Internal/QueryInternalApi.d.ts +17 -0
- package/src/Api/Internal/QueryInternalApi.js +57 -0
- package/src/Api/Internal/QueryLanguageInternalApi.d.ts +11 -0
- package/src/Api/Internal/QueryLanguageInternalApi.js +34 -0
- package/src/Api/Internal/StyledColumnInternalApi.d.ts +59 -0
- package/src/Api/Internal/StyledColumnInternalApi.js +249 -0
- package/src/Api/Internal/SystemStatusInternalApi.d.ts +11 -0
- package/src/Api/Internal/SystemStatusInternalApi.js +27 -0
- package/src/Api/Internal/TeamSharingInternalApi.d.ts +20 -0
- package/src/Api/Internal/TeamSharingInternalApi.js +66 -0
- package/src/Api/LayoutApi.d.ts +28 -44
- package/src/Api/PlusMinusApi.d.ts +9 -2
- package/src/Api/PredicateApi.d.ts +26 -10
- package/src/Api/QueryApi.d.ts +23 -18
- package/src/Api/QuickSearchApi.d.ts +5 -1
- package/src/Api/ScheduleApi.d.ts +97 -16
- package/src/Api/SettingsPanelApi.d.ts +12 -1
- package/src/Api/ShortcutApi.d.ts +28 -7
- package/src/Api/SmartEditApi.d.ts +8 -1
- package/src/Api/StyledColumnApi.d.ts +34 -54
- package/src/Api/SystemStatusApi.d.ts +12 -6
- package/src/Api/TeamSharingApi.d.ts +4 -17
- package/src/Api/ThemeApi.d.ts +25 -6
- package/src/Api/UserInterfaceApi.d.ts +13 -2
- package/src/PredefinedConfig/AlertState.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableColumn.js +4 -0
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +0 -5
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +10 -0
- package/src/PredefinedConfig/Common/AdaptableIcon.d.ts +1 -1
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +22 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.d.ts +3 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +5 -3
- package/src/PredefinedConfig/Common/FDC3Context.d.ts +0 -5
- package/src/PredefinedConfig/FlashingCellState.d.ts +1 -1
- package/src/PredefinedConfig/FormatColumnState.d.ts +1 -1
- package/src/PredefinedConfig/StyledColumnState.d.ts +9 -0
- package/src/PredefinedConfig/SystemState.d.ts +5 -0
- package/src/Redux/ActionsReducers/GridRedux.d.ts +18 -0
- package/src/Redux/ActionsReducers/GridRedux.js +65 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +5 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +17 -3
- package/src/Redux/Store/AdaptableStore.js +34 -26
- package/src/Strategy/AdaptableModuleBase.js +6 -6
- package/src/Strategy/AlertModule.d.ts +1 -6
- package/src/Strategy/AlertModule.js +37 -92
- package/src/Strategy/BulkUpdateModule.js +3 -3
- package/src/Strategy/CalculatedColumnModule.js +6 -6
- package/src/Strategy/ChartingModule.js +1 -1
- package/src/Strategy/CustomSortModule.js +4 -4
- package/src/Strategy/DashboardModule.js +2 -2
- package/src/Strategy/DataSetModule.js +1 -1
- package/src/Strategy/ExportModule.js +4 -4
- package/src/Strategy/FilterModule.js +7 -6
- package/src/Strategy/FlashingCellModule.d.ts +2 -0
- package/src/Strategy/FlashingCellModule.js +21 -5
- package/src/Strategy/FormatColumnModule.d.ts +1 -0
- package/src/Strategy/FormatColumnModule.js +29 -3
- package/src/Strategy/FreeTextColumnModule.js +3 -3
- package/src/Strategy/LayoutModule.js +18 -18
- package/src/Strategy/PlusMinusModule.js +2 -2
- package/src/Strategy/QueryModule.js +3 -3
- package/src/Strategy/ScheduleModule.js +10 -12
- package/src/Strategy/ShortcutModule.js +5 -5
- package/src/Strategy/SmartEditModule.js +3 -3
- package/src/Strategy/StyledColumnModule.js +9 -7
- package/src/Strategy/TeamSharingModule.js +3 -3
- package/src/Strategy/ThemeModule.js +1 -1
- package/src/Strategy/Utilities/CustomSort/getCustomSortColumnViewItems.js +1 -1
- package/src/Strategy/Utilities/Layout/getLayoutFilterViewItems.js +1 -1
- package/src/Strategy/Utilities/Layout/getLayoutSortViewItems.js +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.d.ts +1 -1
- package/src/Strategy/Utilities/getRuleViewItems.js +4 -3
- package/src/Strategy/Utilities/getScopeViewItems.js +1 -1
- package/src/Strategy/Utilities/updateSingleToMultiplePredicates.d.ts +5 -0
- package/src/Strategy/Utilities/updateSingleToMultiplePredicates.js +12 -0
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +4 -3
- package/src/Utilities/ExpressionFunctions/aggregatedBooleanExpressionFunctions.js +8 -0
- package/src/Utilities/ExpressionFunctions/aggregatedScalarExpressionFunctions.js +11 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +73 -78
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.d.ts +3 -1
- package/src/Utilities/ExpressionFunctions/expressionFunctionUtils.js +9 -5
- package/src/Utilities/ExpressionFunctions/observableExpressionFunctions.js +12 -3
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +133 -28
- package/src/Utilities/Extensions/TypeExtensions.d.ts +1 -0
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -1
- package/src/Utilities/Helpers/FormatHelper.js +13 -10
- package/src/Utilities/ObjectFactory.js +8 -6
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +1 -1
- package/src/Utilities/Services/ChartingService.js +2 -2
- package/src/Utilities/Services/DataService.js +1 -1
- package/src/Utilities/Services/Interface/IEntitlementService.d.ts +2 -1
- package/src/Utilities/Services/Interface/IRowEditService.d.ts +0 -5
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/QueryLanguageService.js +2 -2
- package/src/Utilities/Services/ReportService.js +3 -3
- package/src/Utilities/Services/RowEditService.d.ts +0 -19
- package/src/Utilities/Services/RowEditService.js +4 -161
- package/src/Utilities/Services/TeamSharingService.js +3 -3
- package/src/Utilities/Services/ValidationService.js +9 -7
- package/src/Utilities/logDeprecation.d.ts +3 -0
- package/src/Utilities/logDeprecation.js +30 -0
- package/src/View/AdaptablePopover/index.d.ts +2 -0
- package/src/View/AdaptablePopover/index.js +6 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UIOptionsActionColumnsForm.js +4 -2
- package/src/View/Alert/AlertEntityRow.js +1 -1
- package/src/View/Alert/AlertStatusSubPanel.js +1 -1
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +2 -2
- package/src/View/Alert/Wizard/AlertButtonsEditor.js +2 -2
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +3 -3
- package/src/View/Alert/Wizard/AlertWizard.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +4 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +2 -2
- package/src/View/Alert/Wizard/isValidAlertRules.js +4 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +3 -3
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +1 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +25 -4
- package/src/View/Components/Buttons/ButtonDelete.d.ts +1 -1
- package/src/View/Components/Charting/ChartingViewPanel.d.ts +2 -2
- package/src/View/Components/Charting/ChartingViewPanel.js +17 -3
- package/src/View/Components/Charting/ChartingWizard/ChartingWizard.js +2 -2
- package/src/View/Components/Charting/ChartingWizard/SettingsSection.js +1 -1
- package/src/View/Components/Charting/DeleteChartButton.d.ts +7 -0
- package/src/View/Components/Charting/DeleteChartButton.js +12 -0
- package/src/View/Components/Charting/EditChartButton.d.ts +8 -0
- package/src/View/Components/Charting/EditChartButton.js +21 -0
- package/src/View/Components/EntityRulesEditor/PredicatesEditor.d.ts +16 -0
- package/src/View/Components/EntityRulesEditor/PredicatesEditor.js +86 -0
- package/src/View/Components/EntityRulesEditor/Utilities.d.ts +6 -0
- package/src/View/Components/EntityRulesEditor/Utilities.js +21 -0
- package/src/View/Components/EntityRulesEditor/index.d.ts +4 -9
- package/src/View/Components/EntityRulesEditor/index.js +16 -90
- package/src/View/Components/ExpressionWizard.js +1 -1
- package/src/View/Components/ExternalRenderer.js +3 -1
- package/src/View/Components/FilterForm/FilterForm.js +3 -3
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -5
- package/src/View/Components/PermittedValuesSelector/PermitedValuesSelector.js +5 -6
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupBody.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/AdaptablePopupModuleView.js +2 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +1 -1
- package/src/View/Components/Popups/AdaptablePopupConfirmation.d.ts +2 -12
- package/src/View/Components/Popups/AdaptablePopupConfirmation.js +46 -39
- package/src/View/Components/PredicateEditor/PredicateEditor.js +5 -5
- package/src/View/Components/ScopeComponent.js +3 -3
- package/src/View/Components/Selectors/ColumnValueSelector.js +1 -1
- package/src/View/Components/StyleComponent.js +42 -14
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +1 -1
- package/src/View/CustomSort/CustomSortSummary.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortSummaryWizard.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/Dashboard/Dashboard.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +1 -1
- package/src/View/DataChangeHistory/DataChangeHistoryViewPanel.js +10 -1
- package/src/View/DataSet/DataSetSelector.js +1 -1
- package/src/View/DataSet/DataSetStatusPanelPopover.js +1 -1
- package/src/View/DataSet/DataSetViewPanel.js +1 -1
- package/src/View/Export/ExportSelector.js +2 -2
- package/src/View/Export/ExportViewPanel.js +2 -2
- package/src/View/Export/ReportExportDropdown.js +1 -1
- package/src/View/Export/Wizard/ReportNameWizardSection.js +1 -1
- package/src/View/Export/Wizard/ReportRowsWizardSection.js +1 -1
- package/src/View/Filter/FilterSummary.js +1 -1
- package/src/View/Filter/FilterViewPanel.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellWizard.js +4 -2
- package/src/View/FlashingCell/Wizard/isValidFlashingCellRules.js +4 -3
- package/src/View/FormatColumn/MoveFormatColumn.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +11 -5
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +8 -6
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +3 -4
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.js +5 -19
- package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +6 -6
- package/src/View/Layout/LayoutRadioSelector.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +1 -1
- package/src/View/Layout/LayoutViewPanel.js +1 -1
- package/src/View/Layout/PivotDetailsPopoup.js +1 -1
- package/src/View/Layout/SaveLayoutButton.js +1 -1
- package/src/View/Layout/Wizard/LayoutWizard.js +2 -2
- package/src/View/Layout/Wizard/sections/AggregationsSection.js +4 -4
- package/src/View/Layout/Wizard/sections/ColumnsSection.js +5 -5
- package/src/View/Layout/Wizard/sections/FilterSection.js +2 -2
- package/src/View/Layout/Wizard/sections/PivotColumnsSection.js +2 -2
- package/src/View/Layout/Wizard/sections/RowGroupingSection.js +2 -2
- package/src/View/Layout/Wizard/sections/SortSection.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.d.ts +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +2 -2
- package/src/View/Query/ExpandedQueryPopup.js +1 -1
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +2 -2
- package/src/View/Shortcut/Wizard/ShortcutWizard.js +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizard.js +9 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarColumnComparisonPreview.js +26 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.d.ts +5 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarRangesPreview.js +23 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.d.ts +8 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/Components/PercentBarStylePreview.js +25 -0
- package/src/View/StyledColumn/Wizard/{StyledColumnWizardStyleSection.d.ts → StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.d.ts} +2 -2
- package/src/View/StyledColumn/Wizard/{StyledColumnWizardStyleSection.js → StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js} +21 -19
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.d.ts +1 -0
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/index.js +4 -0
- package/src/View/TeamSharing/SharedEntityDependencies.js +1 -1
- package/src/View/Theme/ThemeStatusPanelPopover.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +1 -1
- package/src/agGrid/Adaptable.d.ts +5 -3
- package/src/agGrid/Adaptable.js +106 -121
- package/src/agGrid/FilterWrapper.js +3 -3
- package/src/agGrid/FloatingFilterWrapper.js +3 -3
- package/src/agGrid/PercentBarRenderer.js +6 -6
- package/src/agGrid/agGridHelper.js +3 -3
- package/src/agGrid/agGridMenuHelper.js +3 -3
- package/src/agGrid/weightedAverage.js +2 -2
- package/src/components/ExpressionEditor/BaseEditorInput.js +92 -7
- package/src/components/ExpressionEditor/ExpressionFunctionDocumentation.js +5 -1
- package/src/components/OverlayTrigger/index.js +6 -2
- package/src/components/OverlayTrigger/utils.d.ts +1 -1
- package/src/components/OverlayTrigger/utils.js +4 -4
- package/src/components/icons/index.js +2 -0
- package/src/components/icons/open-in-new.d.ts +3 -0
- package/src/components/icons/open-in-new.js +7 -0
- package/src/env.js +1 -3
- package/src/metamodel/adaptable.metamodel.d.ts +30 -10
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/parser.js +644 -382
- package/src/parser/src/types.d.ts +9 -0
- package/src/types.d.ts +3 -3
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Api/InternalApi.d.ts +0 -155
- package/src/Api/InternalApi.js +0 -2
|
@@ -8,8 +8,11 @@ const rebass_1 = require("rebass");
|
|
|
8
8
|
const DropdownButton_1 = tslib_1.__importDefault(require("../../../components/DropdownButton"));
|
|
9
9
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
10
10
|
const ChartingRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ChartingRedux"));
|
|
11
|
+
const AdaptableHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpers/AdaptableHelper"));
|
|
11
12
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
12
13
|
const useChartState_1 = require("./useChartState");
|
|
14
|
+
const DeleteChartButton_1 = require("./DeleteChartButton");
|
|
15
|
+
const EditChartButton_1 = require("./EditChartButton");
|
|
13
16
|
const ChartingViewPanel = (props) => {
|
|
14
17
|
var _a, _b, _c;
|
|
15
18
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -20,6 +23,7 @@ const ChartingViewPanel = (props) => {
|
|
|
20
23
|
return chartDefinitions.length > 0 ? chartDefinitions[0].Uuid : null;
|
|
21
24
|
});
|
|
22
25
|
const selectedChart = chartDefinitions.find((chart) => chart.Uuid === selectedChartId);
|
|
26
|
+
const accessLevel = AdaptableHelper_1.default.getAppropriateAccessLevel(selectedChart, props.accessLevel);
|
|
23
27
|
const [selectedContainer, setSelectedContainer] = React.useState(null);
|
|
24
28
|
const { isOpen, showChart, closeChart } = (0, useChartState_1.useChartState)(selectedChart);
|
|
25
29
|
const options = chartDefinitions.map((chartDefinition) => ({
|
|
@@ -66,16 +70,26 @@ const ChartingViewPanel = (props) => {
|
|
|
66
70
|
];
|
|
67
71
|
const chartSelector = (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], className: `ab-${elementType}__Chart__select`, items: options, disabled: !hasCharts }, content));
|
|
68
72
|
const containerSelector = Boolean(chartContainers === null || chartContainers === void 0 ? void 0 : chartContainers.length) && (React.createElement(DropdownButton_1.default, { width: "100%", columns: ['label'], items: containerOptions, disabled: !isSelectedChart }, (selectedContainer === null || selectedContainer === void 0 ? void 0 : selectedContainer.name) || 'Ag Grid Window'));
|
|
69
|
-
const chartButton = (React.createElement(SimpleButton_1.default, { onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'outlined', tone: 'neutral' }, isOpen ? 'Close' : 'Open'));
|
|
73
|
+
const chartButton = (React.createElement(SimpleButton_1.default, { mr: 1, onClick: () => (isOpen ? closeChart() : showChart(selectedContainer)), disabled: !Boolean(selectedChart), variant: 'outlined', tone: 'neutral' }, isOpen ? 'Close' : 'Open'));
|
|
74
|
+
const deleteButton = React.createElement(DeleteChartButton_1.DeleteChartButton, { chart: selectedChart, accessLevel: accessLevel });
|
|
75
|
+
const editButton = (React.createElement(EditChartButton_1.EditChartButton, { chart: selectedChart, accessLevel: accessLevel, isOpen: isOpen }));
|
|
70
76
|
if (elementType === 'DashboardToolbar') {
|
|
71
77
|
return (React.createElement(rebass_1.Flex, { width: "100%", alignItems: "center" },
|
|
72
78
|
React.createElement(rebass_1.Box, null, chartSelector),
|
|
73
79
|
containerSelector && React.createElement(rebass_1.Box, { ml: 1 }, containerSelector),
|
|
74
|
-
React.createElement(rebass_1.Box, { ml: 1 },
|
|
80
|
+
React.createElement(rebass_1.Box, { ml: 1 },
|
|
81
|
+
chartButton,
|
|
82
|
+
deleteButton,
|
|
83
|
+
editButton)));
|
|
75
84
|
}
|
|
76
85
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column", width: "100%" },
|
|
77
86
|
React.createElement(rebass_1.Box, { mb: 1 }, chartSelector),
|
|
78
87
|
containerSelector && React.createElement(rebass_1.Box, { mb: 1 }, containerSelector),
|
|
79
|
-
React.createElement(rebass_1.Box, null,
|
|
88
|
+
React.createElement(rebass_1.Box, null,
|
|
89
|
+
chartButton,
|
|
90
|
+
" ",
|
|
91
|
+
deleteButton,
|
|
92
|
+
" ",
|
|
93
|
+
editButton)));
|
|
80
94
|
};
|
|
81
95
|
exports.ChartingViewPanel = ChartingViewPanel;
|
|
@@ -21,14 +21,14 @@ const ChartingWizard = (props) => {
|
|
|
21
21
|
return (React.createElement(OnePageAdaptableWizard_1.OnePageAdaptableWizard, { defaultCurrentSectionName: props.defaultCurrentSectionName, moduleInfo: props.moduleInfo, data: chartDefinition, onHide: props.onCloseWizard, onFinish: handleFinish, sections: [
|
|
22
22
|
{
|
|
23
23
|
title: 'Settings',
|
|
24
|
-
details: 'Chart
|
|
24
|
+
details: 'Chart Settings',
|
|
25
25
|
isValid: SettingsSection_1.isSettingsValid,
|
|
26
26
|
render: () => (React.createElement(rebass_1.Box, { padding: 2 },
|
|
27
27
|
React.createElement(SettingsSection_1.SettingsSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }))),
|
|
28
28
|
},
|
|
29
29
|
{
|
|
30
30
|
title: 'Preview Chart',
|
|
31
|
-
details: 'Preview
|
|
31
|
+
details: 'Chart Preview',
|
|
32
32
|
render: () => (React.createElement(rebass_1.Box, { p: 2 },
|
|
33
33
|
React.createElement(PreviewChartSection_1.PreviewChartSection, { chartDefinition: chartDefinition, onChange: setChartDefinition }))),
|
|
34
34
|
},
|
|
@@ -11,7 +11,7 @@ const isSettingsValid = (chartDefinition, api) => {
|
|
|
11
11
|
if (!chartDefinition.Name) {
|
|
12
12
|
return 'Name is mandatory';
|
|
13
13
|
}
|
|
14
|
-
const allChartDefinitions = api.chartingApi.
|
|
14
|
+
const allChartDefinitions = api.chartingApi.getChartDefinitions();
|
|
15
15
|
if (allChartDefinitions.some((chartDefinitionLoopItem) => chartDefinitionLoopItem.Uuid !== chartDefinition.Uuid &&
|
|
16
16
|
chartDefinitionLoopItem.Name === chartDefinition.Name)) {
|
|
17
17
|
return 'There is already a chart with this name';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AccessLevel, ChartDefinition } from '../../../types';
|
|
3
|
+
export interface ButtonDeleteProps {
|
|
4
|
+
chart: ChartDefinition;
|
|
5
|
+
accessLevel: AccessLevel;
|
|
6
|
+
}
|
|
7
|
+
export declare const DeleteChartButton: React.FunctionComponent<ButtonDeleteProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeleteChartButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const ButtonDelete_1 = require("../Buttons/ButtonDelete");
|
|
7
|
+
const ChartingRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/ChartingRedux"));
|
|
8
|
+
const DeleteChartButton = (props) => {
|
|
9
|
+
var _a;
|
|
10
|
+
return (React.createElement(ButtonDelete_1.ButtonDelete, { disabled: !props.chart, ConfirmAction: ChartingRedux.ChartingDeleteChart((_a = props.chart) === null || _a === void 0 ? void 0 : _a.Name), ConfirmationMsg: `Are you sure you want to delete this Charts?`, ConfirmationTitle: 'Delete Charts', accessLevel: props.accessLevel }));
|
|
11
|
+
};
|
|
12
|
+
exports.DeleteChartButton = DeleteChartButton;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AccessLevel, ChartDefinition } from '../../../types';
|
|
3
|
+
export interface EditChartButtonProps {
|
|
4
|
+
chart: ChartDefinition;
|
|
5
|
+
accessLevel: AccessLevel;
|
|
6
|
+
isOpen: boolean;
|
|
7
|
+
}
|
|
8
|
+
export declare const EditChartButton: React.FunctionComponent<EditChartButtonProps>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.EditChartButton = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const PopupRedux = tslib_1.__importStar(require("../../../Redux/ActionsReducers/PopupRedux"));
|
|
7
|
+
const ButtonEdit_1 = require("../Buttons/ButtonEdit");
|
|
8
|
+
const ModuleConstants = tslib_1.__importStar(require("../../../Utilities/Constants/ModuleConstants"));
|
|
9
|
+
const react_redux_1 = require("react-redux");
|
|
10
|
+
const EditChartButton = (props) => {
|
|
11
|
+
const dispatch = (0, react_redux_1.useDispatch)();
|
|
12
|
+
return (React.createElement(ButtonEdit_1.ButtonEdit, { tooltip: "Edit Chart",
|
|
13
|
+
// It gets complicated when a chart is both open and opened in edit wizard
|
|
14
|
+
// There an be conflicts between the two open charts (preview and main) and the changes to the active chart may not be syncronized correctly.
|
|
15
|
+
disabled: !props.chart || props.isOpen, accessLevel: props.accessLevel, onClick: () => dispatch(PopupRedux.PopupShowScreen(ModuleConstants.ChartingModuleId, 'Chart', {
|
|
16
|
+
action: 'Edit',
|
|
17
|
+
value: props.chart,
|
|
18
|
+
source: 'Toolbar',
|
|
19
|
+
})) }));
|
|
20
|
+
};
|
|
21
|
+
exports.EditChartButton = EditChartButton;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AdaptablePredicateDef, AdaptableScope } from '../../../types';
|
|
3
|
+
import { EntityRulesEditorProps, RuleType } from './index';
|
|
4
|
+
export interface PredicatesEditorProps {
|
|
5
|
+
descriptions: EntityRulesEditorProps<any>['descriptions'];
|
|
6
|
+
data: {
|
|
7
|
+
Rule: RuleType;
|
|
8
|
+
Scope: AdaptableScope;
|
|
9
|
+
};
|
|
10
|
+
onChange: (data: {
|
|
11
|
+
Rule: RuleType;
|
|
12
|
+
Scope: AdaptableScope;
|
|
13
|
+
}) => void;
|
|
14
|
+
predicateDefs: AdaptablePredicateDef[];
|
|
15
|
+
}
|
|
16
|
+
export declare const PredicatesEditor: React.FunctionComponent<PredicatesEditorProps>;
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PredicatesEditor = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
5
|
+
const React = tslib_1.__importStar(require("react"));
|
|
6
|
+
const rebass_1 = require("rebass");
|
|
7
|
+
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
8
|
+
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
9
|
+
const ButtonInfo_1 = require("../Buttons/ButtonInfo");
|
|
10
|
+
const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
|
|
11
|
+
const PredicateEditor_1 = require("../PredicateEditor/PredicateEditor");
|
|
12
|
+
const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/SimpleButton"));
|
|
13
|
+
const Tag_1 = require("../../../components/Tag");
|
|
14
|
+
const PredicatesEditor = (props) => {
|
|
15
|
+
var _a, _b, _c, _d;
|
|
16
|
+
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
17
|
+
const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
|
|
18
|
+
const predicateDefs = props.predicateDefs
|
|
19
|
+
// filter out already used ones
|
|
20
|
+
.filter((predicateDef) => {
|
|
21
|
+
var _a, _b;
|
|
22
|
+
return !((_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.some((item) => item.PredicateId === predicateDef.id));
|
|
23
|
+
});
|
|
24
|
+
const handleAddNewPredicate = () => {
|
|
25
|
+
var _a;
|
|
26
|
+
props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
|
|
27
|
+
Predicates: [
|
|
28
|
+
...(((_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) || []),
|
|
29
|
+
{
|
|
30
|
+
PredicateId: predicateDefs[0].id,
|
|
31
|
+
Inputs: [],
|
|
32
|
+
},
|
|
33
|
+
],
|
|
34
|
+
} }));
|
|
35
|
+
};
|
|
36
|
+
return (React.createElement(React.Fragment, null,
|
|
37
|
+
React.createElement(rebass_1.Flex, { mb: 2, justifyContent: "space-between" },
|
|
38
|
+
React.createElement(rebass_1.Text, { fontSize: 2, mb: 2 }, props.descriptions.selectPredicate),
|
|
39
|
+
React.createElement(SimpleButton_1.default, { disabled: !((_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length), onClick: handleAddNewPredicate, icon: "plus", variant: "raised" }, "Add Predicate")),
|
|
40
|
+
(((_d = (_c = props.data.Rule) === null || _c === void 0 ? void 0 : _c.Predicates) === null || _d === void 0 ? void 0 : _d.length) ? props.data.Rule.Predicates : [null]).map((predicate, index) => {
|
|
41
|
+
var _a, _b;
|
|
42
|
+
const handleClear = () => {
|
|
43
|
+
var _a, _b;
|
|
44
|
+
const newPredicates = (_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.filter((prevPredicate) => prevPredicate !== predicate);
|
|
45
|
+
props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
|
|
46
|
+
Predicates: newPredicates,
|
|
47
|
+
} }));
|
|
48
|
+
};
|
|
49
|
+
const predicateDefsIncludingCurrent = [...predicateDefs];
|
|
50
|
+
const currentPredicateDef = props.predicateDefs.find((item) => item.id === (predicate === null || predicate === void 0 ? void 0 : predicate.PredicateId));
|
|
51
|
+
if (currentPredicateDef) {
|
|
52
|
+
predicateDefsIncludingCurrent.push(currentPredicateDef);
|
|
53
|
+
}
|
|
54
|
+
return (React.createElement(rebass_1.Box, { mb: 3, key: index },
|
|
55
|
+
index > 0 && React.createElement(Tag_1.Tag, { mb: 2 }, "AND"),
|
|
56
|
+
React.createElement(rebass_1.Flex, { justifyContent: "center", alignItems: "flex-start", width: "100%" },
|
|
57
|
+
React.createElement(rebass_1.Box, { flex: 1 },
|
|
58
|
+
React.createElement(PredicateEditor_1.PredicateEditor, { columnId: 'ColumnIds' in props.data.Scope ? (_b = (_a = props.data.Scope) === null || _a === void 0 ? void 0 : _a.ColumnIds) === null || _b === void 0 ? void 0 : _b[0] : null, predicateDefs: predicateDefsIncludingCurrent, predicate: predicate, onChange: (newPredicateDef) => {
|
|
59
|
+
var _a, _b;
|
|
60
|
+
let newPredicates = [];
|
|
61
|
+
if (predicate) {
|
|
62
|
+
newPredicates = (_b = (_a = props.data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.map((prevPredicate) => {
|
|
63
|
+
if (prevPredicate === predicate) {
|
|
64
|
+
return newPredicateDef;
|
|
65
|
+
}
|
|
66
|
+
return prevPredicate;
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
else {
|
|
70
|
+
// no previous predicate, e.g. it was cleared
|
|
71
|
+
newPredicates = [newPredicateDef];
|
|
72
|
+
}
|
|
73
|
+
props.onChange(Object.assign(Object.assign({}, props.data), { Rule: {
|
|
74
|
+
Predicates: newPredicates,
|
|
75
|
+
} }));
|
|
76
|
+
}, onClear: handleClear })),
|
|
77
|
+
React.createElement(SimpleButton_1.default, { disabled: !predicate, ml: 2, onClick: handleClear, icon: "delete" }))));
|
|
78
|
+
}),
|
|
79
|
+
showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
|
|
80
|
+
fontSize: 'var(--ab-font-size-3)',
|
|
81
|
+
padding: 0,
|
|
82
|
+
} },
|
|
83
|
+
React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
|
|
84
|
+
"See Predicate documentation for more details and examples"))));
|
|
85
|
+
};
|
|
86
|
+
exports.PredicatesEditor = PredicatesEditor;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AdaptableApi } from '../../../types';
|
|
2
|
+
import { OnePageAdaptableWizardContextType } from '../../Wizard/OnePageAdaptableWizard';
|
|
3
|
+
import { RuleType } from './index';
|
|
4
|
+
export declare const isRuleValid: (abObject: {
|
|
5
|
+
Rule?: RuleType;
|
|
6
|
+
}, api: AdaptableApi, context: OnePageAdaptableWizardContextType<unknown>) => true | "The Expression is not a valid Boolean Expression" | "No valid Condition is specified" | "The Predicates are not valid";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isRuleValid = void 0;
|
|
4
|
+
const isRuleValid = (abObject, api, context) => {
|
|
5
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
6
|
+
if (!((_b = (_a = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length) && !((_c = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _c === void 0 ? void 0 : _c.BooleanExpression)) {
|
|
7
|
+
return 'No valid Condition is specified';
|
|
8
|
+
}
|
|
9
|
+
if ((_e = (_d = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _d === void 0 ? void 0 : _d.Predicates) === null || _e === void 0 ? void 0 : _e.length) {
|
|
10
|
+
if (!api.predicateApi.isEveryPredicateValid((_f = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _f === void 0 ? void 0 : _f.Predicates)) {
|
|
11
|
+
return 'The Predicates are not valid';
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
if ((_g = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _g === void 0 ? void 0 : _g.BooleanExpression) {
|
|
15
|
+
if (!api.queryLanguageApi.isValidBooleanExpression((_h = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _h === void 0 ? void 0 : _h.BooleanExpression, context.moduleInfo.ModuleName)) {
|
|
16
|
+
return 'The Expression is not a valid Boolean Expression';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return true;
|
|
20
|
+
};
|
|
21
|
+
exports.isRuleValid = isRuleValid;
|
|
@@ -1,16 +1,12 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { FlexProps } from 'rebass';
|
|
3
|
-
import type {
|
|
3
|
+
import type { AdaptableModule, AdaptablePredicate, AdaptablePredicateDef, AdaptableScope } from '../../../types';
|
|
4
4
|
import type { XOR } from '../../../Utilities/Extensions/TypeExtensions';
|
|
5
5
|
import { AdaptableQuery } from '../../../PredefinedConfig/Common/AdaptableQuery';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
Predicate: AdaptablePredicate;
|
|
6
|
+
export declare type RuleType = XOR<{
|
|
7
|
+
Predicates: AdaptablePredicate[];
|
|
9
8
|
}, AdaptableQuery>;
|
|
10
|
-
export declare
|
|
11
|
-
Rule?: RuleType;
|
|
12
|
-
}, api: AdaptableApi, context: OnePageAdaptableWizardContextType<unknown>) => true | "No valid Condition is specified" | "The Predicate is not valid" | "The Expression is not a valid Boolean Expression";
|
|
13
|
-
declare type EntityRulesEditorProps<T> = {
|
|
9
|
+
export declare type EntityRulesEditorProps<T> = {
|
|
14
10
|
data: T;
|
|
15
11
|
module: AdaptableModule;
|
|
16
12
|
showNoRule?: boolean;
|
|
@@ -42,4 +38,3 @@ export declare const EntityRulesEditor: <T extends {
|
|
|
42
38
|
Rule: RuleType;
|
|
43
39
|
Scope: AdaptableScope;
|
|
44
40
|
}>(props: EntityRulesEditorProps<T>) => JSX.Element;
|
|
45
|
-
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.EntityRulesEditor = exports.EntityRulesSummary =
|
|
3
|
+
exports.EntityRulesEditor = exports.EntityRulesSummary = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const react_1 = require("react");
|
|
@@ -8,29 +8,8 @@ const rebass_1 = require("rebass");
|
|
|
8
8
|
const Tabs_1 = require("../../../components/Tabs");
|
|
9
9
|
const Radio_1 = tslib_1.__importDefault(require("../../../components/Radio"));
|
|
10
10
|
const ExpressionEditor_1 = require("../../../components/ExpressionEditor");
|
|
11
|
-
const HelpBlock_1 = tslib_1.__importDefault(require("../../../components/HelpBlock"));
|
|
12
11
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
13
|
-
const
|
|
14
|
-
const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
|
|
15
|
-
const PredicateEditor_1 = require("../PredicateEditor/PredicateEditor");
|
|
16
|
-
const isRuleValid = (abObject, api, context) => {
|
|
17
|
-
var _a, _b, _c, _d, _e, _f;
|
|
18
|
-
if (!((_a = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) && !((_b = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _b === void 0 ? void 0 : _b.BooleanExpression)) {
|
|
19
|
-
return 'No valid Condition is specified';
|
|
20
|
-
}
|
|
21
|
-
if ((_c = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _c === void 0 ? void 0 : _c.Predicate) {
|
|
22
|
-
if (!api.predicateApi.isValidPredicate((_d = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _d === void 0 ? void 0 : _d.Predicate)) {
|
|
23
|
-
return 'The Predicate is not valid';
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
if ((_e = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _e === void 0 ? void 0 : _e.BooleanExpression) {
|
|
27
|
-
if (!api.queryLanguageApi.isValidBooleanExpression((_f = abObject === null || abObject === void 0 ? void 0 : abObject.Rule) === null || _f === void 0 ? void 0 : _f.BooleanExpression, context.moduleInfo.ModuleName)) {
|
|
28
|
-
return 'The Expression is not a valid Boolean Expression';
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
return true;
|
|
32
|
-
};
|
|
33
|
-
exports.isRuleValid = isRuleValid;
|
|
12
|
+
const PredicatesEditor_1 = require("./PredicatesEditor");
|
|
34
13
|
const QueryTab = (props) => {
|
|
35
14
|
const { type, label, disabled = false } = props, tabProps = tslib_1.__rest(props, ["type", "label", "disabled"]);
|
|
36
15
|
const text = (React.createElement(rebass_1.Flex, { flexDirection: "column" },
|
|
@@ -44,13 +23,16 @@ QueryTab.defaultProps = {
|
|
|
44
23
|
isTabsTab: true,
|
|
45
24
|
};
|
|
46
25
|
const EntityRulesSummary = (props) => {
|
|
26
|
+
var _a, _b, _c;
|
|
47
27
|
const { data } = props;
|
|
48
28
|
const { api: { predicateApi, internalApi }, } = (0, AdaptableContext_1.useAdaptable)();
|
|
49
|
-
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.
|
|
29
|
+
return (React.createElement(rebass_1.Text, { fontSize: 2 }, data.Rule.Predicates ? (React.createElement(React.Fragment, null, (_c = (_b = (_a = data.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.map) === null || _c === void 0 ? void 0 : _c.call(_b, (predicate, index) => (
|
|
30
|
+
// predicate id is not unique
|
|
31
|
+
React.createElement(React.Fragment, { key: index }, props.renderPredicate(predicateApi.predicateToString(predicate))))))) : (React.createElement(React.Fragment, null, props.renderQueryExpression(internalApi.getAdaptableQueryExpressionText(data.Rule))))));
|
|
50
32
|
};
|
|
51
33
|
exports.EntityRulesSummary = EntityRulesSummary;
|
|
52
34
|
const EntityRulesEditor = (props) => {
|
|
53
|
-
var _a, _b, _c
|
|
35
|
+
var _a, _b, _c;
|
|
54
36
|
const { data, children, descriptions, predicateDefs, showNoRule = false, showPredicate = true, showObservable = true, showBoolean = true, showAggregation = true, flexProps, module, } = props;
|
|
55
37
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
56
38
|
const type = data.Rule == undefined
|
|
@@ -86,15 +68,14 @@ const EntityRulesEditor = (props) => {
|
|
|
86
68
|
}
|
|
87
69
|
else {
|
|
88
70
|
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
71
|
+
Predicates: [
|
|
72
|
+
{
|
|
73
|
+
PredicateId: props.defaultPredicateId,
|
|
74
|
+
},
|
|
75
|
+
],
|
|
92
76
|
} }));
|
|
93
77
|
}
|
|
94
78
|
};
|
|
95
|
-
const predicateId = ((_a = data.Rule) === null || _a === void 0 ? void 0 : _a.Predicate) != undefined ? (_b = data.Rule) === null || _b === void 0 ? void 0 : _b.Predicate.PredicateId : undefined;
|
|
96
|
-
const predicateInputs = predicateId ? (_d = (_c = data.Rule) === null || _c === void 0 ? void 0 : _c.Predicate.Inputs) !== null && _d !== void 0 ? _d : [] : [];
|
|
97
|
-
const currentPredicateDef = api.predicateApi.getPredicateDefById(predicateId);
|
|
98
79
|
const isValuesPredicateDef = (colDef) => colDef && ['Values', 'ExcludeValues'].includes(colDef.id);
|
|
99
80
|
const filteredPredicateDefs = predicateDefs.filter((def) => {
|
|
100
81
|
if (isValuesPredicateDef(def)) {
|
|
@@ -102,51 +83,6 @@ const EntityRulesEditor = (props) => {
|
|
|
102
83
|
}
|
|
103
84
|
return true;
|
|
104
85
|
});
|
|
105
|
-
const predicateDefsOptions = filteredPredicateDefs.map((item) => ({
|
|
106
|
-
value: item.id,
|
|
107
|
-
label: item.label,
|
|
108
|
-
onClick: () => onPredicateChange(item),
|
|
109
|
-
}));
|
|
110
|
-
const onPredicateInputChange = (e, index) => {
|
|
111
|
-
const { value } = e.target;
|
|
112
|
-
const newInputs = [...predicateInputs];
|
|
113
|
-
newInputs[index] = value;
|
|
114
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
115
|
-
Predicate: {
|
|
116
|
-
PredicateId: predicateId,
|
|
117
|
-
Inputs: newInputs,
|
|
118
|
-
},
|
|
119
|
-
} }));
|
|
120
|
-
};
|
|
121
|
-
const onPredicateValuesChange = (inputs) => {
|
|
122
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
123
|
-
Predicate: {
|
|
124
|
-
PredicateId: predicateId,
|
|
125
|
-
Inputs: inputs,
|
|
126
|
-
},
|
|
127
|
-
} }));
|
|
128
|
-
};
|
|
129
|
-
const onPredicateChange = (item) => {
|
|
130
|
-
var _a;
|
|
131
|
-
if (item) {
|
|
132
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
133
|
-
Predicate: {
|
|
134
|
-
PredicateId: item.id,
|
|
135
|
-
Inputs: ((_a = item === null || item === void 0 ? void 0 : item.inputs) !== null && _a !== void 0 ? _a : []).map((input) => { var _a; return (_a = input.defaultValue) !== null && _a !== void 0 ? _a : ''; }),
|
|
136
|
-
},
|
|
137
|
-
} }));
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
141
|
-
BooleanExpression: '',
|
|
142
|
-
} }));
|
|
143
|
-
}
|
|
144
|
-
};
|
|
145
|
-
const clearPredicate = () => {
|
|
146
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: {
|
|
147
|
-
Predicate: undefined,
|
|
148
|
-
} }));
|
|
149
|
-
};
|
|
150
86
|
const setBooleanExpression = (expression) => {
|
|
151
87
|
props.onChange(Object.assign(Object.assign({}, data), { Rule: { BooleanExpression: expression } }));
|
|
152
88
|
};
|
|
@@ -157,7 +93,6 @@ const EntityRulesEditor = (props) => {
|
|
|
157
93
|
props.onChange(Object.assign(Object.assign({}, data), { Rule: { AggregatedBooleanExpression: expression } }));
|
|
158
94
|
};
|
|
159
95
|
const initialData = (0, react_1.useMemo)(() => api.internalApi.getQueryPreviewData(), []);
|
|
160
|
-
const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
|
|
161
96
|
const baseClassName = 'ab-EntityRulesEditor';
|
|
162
97
|
return (React.createElement(rebass_1.Flex, Object.assign({ className: baseClassName, flexDirection: "column", padding: 2, pt: 0, pl: 0 }, flexProps, { style: Object.assign({ height: '100%' }, flexProps === null || flexProps === void 0 ? void 0 : flexProps.style) }),
|
|
163
98
|
children,
|
|
@@ -169,24 +104,15 @@ const EntityRulesEditor = (props) => {
|
|
|
169
104
|
showPredicate ? (React.createElement(Tabs_1.Tabs.Tab, { value: 'Predicate', style: { flex: 1 } },
|
|
170
105
|
React.createElement(Radio_1.default, { tabIndex: -1, margin: 0, checked: type === 'Predicate' }, "Predicate"))) : null,
|
|
171
106
|
showPredicate ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "Predicate", value: "Predicate" },
|
|
172
|
-
React.createElement(
|
|
173
|
-
React.createElement(PredicateEditor_1.PredicateEditor, { columnId: 'ColumnIds' in data.Scope ? (_f = (_e = data.Scope) === null || _e === void 0 ? void 0 : _e.ColumnIds) === null || _f === void 0 ? void 0 : _f[0] : null, predicateDefs: filteredPredicateDefs, predicate: (_g = data.Rule) === null || _g === void 0 ? void 0 : _g.Predicate, onChange: (predicate) => {
|
|
174
|
-
props.onChange(Object.assign(Object.assign({}, data), { Rule: Object.assign(Object.assign({}, data.Rule), { Predicate: predicate }) }));
|
|
175
|
-
}, onClear: clearPredicate }),
|
|
176
|
-
showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
|
|
177
|
-
fontSize: 'var(--ab-font-size-3)',
|
|
178
|
-
padding: 0,
|
|
179
|
-
} },
|
|
180
|
-
React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.PredicateDocsLink, '_blank') }),
|
|
181
|
-
"See Predicate documentation for more details and examples")))) : null,
|
|
107
|
+
React.createElement(PredicatesEditor_1.PredicatesEditor, { data: data, descriptions: descriptions, predicateDefs: filteredPredicateDefs, onChange: props.onChange }))) : null,
|
|
182
108
|
showBoolean ? React.createElement(QueryTab, { value: "BooleanExpression", type: type, label: "Boolean" }) : null,
|
|
183
109
|
showBoolean ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "BooleanExpression", value: 'BooleanExpression', paddingLeft: 0 },
|
|
184
|
-
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: (
|
|
110
|
+
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: module, value: (_a = data.Rule) === null || _a === void 0 ? void 0 : _a.BooleanExpression, onChange: setBooleanExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), api: api }))) : null,
|
|
185
111
|
showObservable ? (React.createElement(QueryTab, { value: "ObservableExpression", type: type, label: "Observable" })) : null,
|
|
186
112
|
showObservable ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "ObservableExpression", value: 'ObservableExpression', paddingLeft: 0 },
|
|
187
|
-
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: (
|
|
113
|
+
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'observable', module: module, value: (_b = data.Rule) === null || _b === void 0 ? void 0 : _b.ObservableExpression, onChange: setReactiveExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), api: api }))) : null,
|
|
188
114
|
showAggregation ? (React.createElement(QueryTab, { value: "AggregatedBooleanExpression", type: type, label: "Aggregated Boolean" })) : null,
|
|
189
115
|
showAggregation ? (React.createElement(Tabs_1.Tabs.Content, { "data-name": "AggregatedBooleanExpression", value: 'AggregatedBooleanExpression', paddingLeft: 0 },
|
|
190
|
-
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: (
|
|
116
|
+
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'aggregatedBoolean', module: module, value: (_c = data.Rule) === null || _c === void 0 ? void 0 : _c.AggregatedBooleanExpression, onChange: setAggregationExpression, initialData: initialData, columns: api.columnApi.getQueryableColumns(), namedQueries: api.queryApi.getNamedQueries(), api: api }))) : null)));
|
|
191
117
|
};
|
|
192
118
|
exports.EntityRulesEditor = EntityRulesEditor;
|
|
@@ -32,7 +32,7 @@ class ExpressionWizard extends React.Component {
|
|
|
32
32
|
render() {
|
|
33
33
|
const initialData = (0, react_1.useMemo)(() => this.props.api.internalApi.getQueryPreviewData(), []);
|
|
34
34
|
return (React.createElement(React.Fragment, null,
|
|
35
|
-
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.
|
|
35
|
+
React.createElement(ExpressionEditor_1.ExpressionEditor, { type: 'boolean', module: ModuleConstants_1.QueryModuleId, value: this.state.expression, onChange: this.handleCustomExpressionChange, initialData: initialData, columns: this.props.api.columnApi.getQueryableColumns(), namedQueries: this.props.api.queryApi.getNamedQueries(), api: this.props.api }),
|
|
36
36
|
' ',
|
|
37
37
|
React.createElement(rebass_1.Flex, { flexDirection: "row", padding: 1, marginBottom: 2, marginLeft: 1, alignItems: "center", "data-name": "expression-wizard-save-option" },
|
|
38
38
|
React.createElement(CheckBox_1.CheckBox, { marginLeft: 2, disabled: !this.isValidExpression(), marginBottom: 2, checked: this.state.saveToNamedQueries, onChange: (checked) => this.setState({
|
|
@@ -24,7 +24,9 @@ const ExternalRenderer = (_a) => {
|
|
|
24
24
|
render({ visible: false, element: element, adaptableApi });
|
|
25
25
|
}
|
|
26
26
|
else if (frameworkComponent) {
|
|
27
|
-
adaptableApi.internalApi.destroyFrameworkComponent(element, frameworkComponent,
|
|
27
|
+
adaptableApi.internalApi.destroyFrameworkComponent(element, frameworkComponent,
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
componentName);
|
|
28
30
|
}
|
|
29
31
|
};
|
|
30
32
|
}, []);
|
|
@@ -110,7 +110,7 @@ class FilterFormComponent extends React.Component {
|
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
async loadPermittedValues(filter = '') {
|
|
113
|
-
const { values: distinctColumnValues, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.
|
|
113
|
+
const { values: distinctColumnValues, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
|
|
114
114
|
.showDistinctFilteredValuesOnly), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
|
|
115
115
|
if (!this._isMounted) {
|
|
116
116
|
return;
|
|
@@ -137,7 +137,7 @@ class FilterFormComponent extends React.Component {
|
|
|
137
137
|
let closeButton = (React.createElement(ButtonClose_1.ButtonClose, { onClick: () => this.onCloseForm(), tooltip: null, accessLevel: 'Full' }));
|
|
138
138
|
let clearFilterButton = (React.createElement(ButtonClear_1.ButtonClear, { onClick: () => this.onClearFilter(), disabled: isEmptyFilter, tooltip: null, accessLevel: 'Full', showText: true, showIcon: false }));
|
|
139
139
|
const useAgGridStyle = !!filterOptions.useAgGridFilterFormStyle;
|
|
140
|
-
return (React.createElement("div", { className: "ab-FilterForm", "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false, useAgGridStyle: useAgGridStyle, applyFilterButtonDisabled: isEmptyFilter, onFilterApplied: () => this.onFilterApplied() }, this.state.selectedTab == Enums_1.ColumnMenuTab.Menu ? (React.createElement(ListBoxMenu_1.ListBoxMenu, { MenuItems: this.props.api.internalApi.buildStandaloneColumnHeader(this.props.currentColumn), onMenuItemClick: (menuItem) => this.onMenuItemClick(menuItem) })) : (React.createElement(React.Fragment, null,
|
|
140
|
+
return (React.createElement("div", { className: "ab-FilterForm", "data-name": "filter-form" }, StringExtensions_1.StringExtensions.IsNullOrEmpty(isFilterable) ? (React.createElement(FilterFormPanel_1.FilterFormPanel, { style: panelStyle, ColumnMenuTab: this.state.selectedTab, ColumnMenuTabChanged: (e) => this.onSelectTab(e), IsAlwaysFilter: this.props.embedColumnMenu, clearFilterButton: clearFilterButton, closeButton: closeButton, showCloseButton: this.props.showCloseButton, autoApplyFilter: filterOptions.autoApplyFilter ? true : false, useAgGridStyle: useAgGridStyle, applyFilterButtonDisabled: isEmptyFilter, onFilterApplied: () => this.onFilterApplied() }, this.state.selectedTab == Enums_1.ColumnMenuTab.Menu ? (React.createElement(ListBoxMenu_1.ListBoxMenu, { MenuItems: this.props.api.gridApi.internalApi.buildStandaloneColumnHeader(this.props.currentColumn), onMenuItemClick: (menuItem) => this.onMenuItemClick(menuItem) })) : (React.createElement(React.Fragment, null,
|
|
141
141
|
this.state.showTab && (React.createElement(React.Fragment, null,
|
|
142
142
|
React.createElement(Radio_1.default, { "data-name": "values", flex: 1, marginLeft: 1, checked: this.state.currentTab == 'values', onChange: () => this.setState({ currentTab: 'values' }) },
|
|
143
143
|
React.createElement(rebass_1.Flex, { fontSize: 'var( --ab-font-size-2)' }, "Column Values")),
|
|
@@ -210,7 +210,7 @@ class FilterFormComponent extends React.Component {
|
|
|
210
210
|
if (editedColumnFilter.Predicate === undefined ||
|
|
211
211
|
(editedColumnFilter.Predicate.PredicateId === 'Values' &&
|
|
212
212
|
editedColumnFilter.Predicate.Inputs.length === 0)) {
|
|
213
|
-
this.props.api.filterApi.
|
|
213
|
+
this.props.api.filterApi.clearColumnFilterForColumn(editedColumnFilter.ColumnId);
|
|
214
214
|
this.onCloseForm();
|
|
215
215
|
}
|
|
216
216
|
else {
|
|
@@ -32,7 +32,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
32
32
|
}
|
|
33
33
|
};
|
|
34
34
|
this.loadPermittedValues = async (filter = '') => {
|
|
35
|
-
const { values, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.
|
|
35
|
+
const { values, suppressClientSideFilter } = await (0, runIfNotResolvedIn_1.runIfNotResolvedIn)(this.props.api.gridApi.internalApi.getDistinctFilterDisplayValuesForColumn(this.props.currentColumn.columnId, filter, this.props.api.internalApi.getAdaptableOptions().filterOptions
|
|
36
36
|
.showDistinctFilteredValuesOnly), () => this._isMounted && this.setState({ isDistinctColumnValuesLoading: true }));
|
|
37
37
|
if (!this._isMounted) {
|
|
38
38
|
return;
|
|
@@ -142,7 +142,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
142
142
|
showQuickFilterInput = !hideQuickFilterInputFunction(this.props.currentColumn);
|
|
143
143
|
}
|
|
144
144
|
return (React.createElement(React.Fragment, null,
|
|
145
|
-
showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { flexDirection: "column", "data-name": "quick-filter" },
|
|
145
|
+
showQuickFilterDropdown && (React.createElement(OverlayTrigger_1.default, { className: "ab-QuickFilter", showEvent: showEvent, hideEvent: hideEvent, preventPortalEventPropagation: showEvent === 'click', targetOffset: 10, hideDelay: 300, "data-name": "quick-filter-overlay", render: () => (React.createElement(rebass_1.Flex, { className: "ab-QuickFilter__dropdown", flexDirection: "column", "data-name": "quick-filter", fontSize: 2 },
|
|
146
146
|
(filter === null || filter === void 0 ? void 0 : filter.Predicate.PredicateId) && (React.createElement(SimpleButton_1.default, { p: 2, variant: "text", onClick: () => this.clearFilter() },
|
|
147
147
|
React.createElement("span", { style: { width: 20, marginRight: 10 } },
|
|
148
148
|
React.createElement(icons_1.Icon, { name: "delete" })),
|
|
@@ -346,14 +346,14 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
346
346
|
}
|
|
347
347
|
getPredicateIdForShortcutValue(value) {
|
|
348
348
|
var _a;
|
|
349
|
-
return (_a = this.props.api.filterApi.findPredicateDefByShortcut(value, this.props.currentColumn)) === null || _a === void 0 ? void 0 : _a.id;
|
|
349
|
+
return (_a = this.props.api.filterApi.internalApi.findPredicateDefByShortcut(value, this.props.currentColumn)) === null || _a === void 0 ? void 0 : _a.id;
|
|
350
350
|
}
|
|
351
351
|
clearFilter() {
|
|
352
352
|
const { filter } = this.state;
|
|
353
|
-
this.props.api.filterApi.
|
|
353
|
+
this.props.api.filterApi.clearColumnFilterForColumn(filter.ColumnId);
|
|
354
354
|
}
|
|
355
355
|
hasValuesPredicate(predicate) {
|
|
356
|
-
return this.props.api.predicateApi.hasPredicateValues(predicate);
|
|
356
|
+
return this.props.api.predicateApi.internalApi.hasPredicateValues(predicate);
|
|
357
357
|
}
|
|
358
358
|
}
|
|
359
359
|
function mapStateToProps(state, ownProps) {
|
|
@@ -9,14 +9,13 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../../../components/Simp
|
|
|
9
9
|
const AdaptableContext_1 = require("../../AdaptableContext");
|
|
10
10
|
const ListBoxFilterForm_1 = require("../FilterForm/ListBoxFilterForm");
|
|
11
11
|
const PermitedValuesSelector = (props) => {
|
|
12
|
-
var _a;
|
|
12
|
+
var _a, _b, _c;
|
|
13
13
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
14
14
|
const columnId = props.columnId;
|
|
15
|
-
const column = adaptable.api.columnApi.
|
|
16
|
-
const distinctValues = ((_a = adaptable.api.
|
|
17
|
-
const predicateInputs = props.predicate.Inputs;
|
|
18
|
-
const isClearDisabled = predicateInputs.filter((item) => item !== undefined || item !== null || item !== '')
|
|
19
|
-
.length === 0;
|
|
15
|
+
const column = adaptable.api.columnApi.getColumnWithColumnId(columnId);
|
|
16
|
+
const distinctValues = ((_a = adaptable.api.gridApi.internalApi.getDistinctDisplayValuesForColumn(columnId)) !== null && _a !== void 0 ? _a : []).map((value) => { var _a; return ({ value: value, label: value.toString ? (_a = value.toString) === null || _a === void 0 ? void 0 : _a.call(value) : value }); });
|
|
17
|
+
const predicateInputs = (_b = props.predicate.Inputs) !== null && _b !== void 0 ? _b : [];
|
|
18
|
+
const isClearDisabled = ((_c = predicateInputs === null || predicateInputs === void 0 ? void 0 : predicateInputs.filter) === null || _c === void 0 ? void 0 : _c.call(predicateInputs, (item) => item !== undefined || item !== null || item !== '').length) === 0;
|
|
20
19
|
const popupContent = (React.createElement(rebass_1.Flex, { className: "ab-PermitedValuesSelector__PopupContent", padding: 1, flexDirection: "column" },
|
|
21
20
|
React.createElement(ListBoxFilterForm_1.ListBoxFilterForm, { currentColumn: column, columns: [], columnDistinctValues: distinctValues, dataType: column.dataType, uiSelectedColumnValues: props.predicate.Inputs, useAgGridStyle: true, onColumnValueSelectedChange: (list) => props.onPredicateValuesChange(list) })));
|
|
22
21
|
return (React.createElement(rebass_1.Box, { className: "ab-PermitedValuesSelector", mt: 2 },
|
|
@@ -23,7 +23,7 @@ const AdaptablePopupBody = (props) => {
|
|
|
23
23
|
}
|
|
24
24
|
},
|
|
25
25
|
// show share button if TeamSharing is active & user has edit rights
|
|
26
|
-
teamSharingActivated: props.api.teamSharingApi.
|
|
26
|
+
teamSharingActivated: props.api.teamSharingApi.isTeamSharingAvailable() &&
|
|
27
27
|
props.api.teamSharingApi.hasTeamSharingFullRights(),
|
|
28
28
|
modalContainer: modalContainer,
|
|
29
29
|
accessLevel: accessLevel,
|
|
@@ -16,7 +16,7 @@ const SystemRedux_1 = require("../../../../Redux/ActionsReducers/SystemRedux");
|
|
|
16
16
|
const AdaptablePopupModuleView = (props) => {
|
|
17
17
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
18
18
|
/**
|
|
19
|
-
* This triggers
|
|
19
|
+
* This triggers a render for each redux change.
|
|
20
20
|
* Not sure yet how to trigger this component to render when an item is edited.
|
|
21
21
|
*/
|
|
22
22
|
(0, react_redux_1.useSelector)((state) => state);
|
|
@@ -98,7 +98,7 @@ const AdaptablePopupModuleView = (props) => {
|
|
|
98
98
|
if (!(adaptableModule === null || adaptableModule === void 0 ? void 0 : adaptableModule.canBeAssociatedWithLayouts())) {
|
|
99
99
|
return;
|
|
100
100
|
}
|
|
101
|
-
if (!props.api.internalApi.hasLayoutSpecificObjects()) {
|
|
101
|
+
if (!props.api.layoutApi.internalApi.hasLayoutSpecificObjects()) {
|
|
102
102
|
return;
|
|
103
103
|
}
|
|
104
104
|
return (React.createElement(rebass_1.Flex, { justifyContent: "flex-start" },
|