@adaptabletools/adaptable 11.3.0 → 12.0.0-canary.2
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 +568 -273
- package/bundle.cjs.js +114 -114
- package/index.css +642 -270
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/AdaptableNoCodeWizard.d.ts +1 -0
- package/src/AdaptableInterfaces/IAdaptable.d.ts +4 -1
- package/src/AdaptableOptions/ActionOptions.d.ts +1 -0
- package/src/AdaptableOptions/{FormatColumnOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -10
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +5 -0
- package/src/AdaptableOptions/AlertOptions.d.ts +14 -1
- package/src/AdaptableOptions/ColumnOptions.d.ts +49 -0
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.js → ColumnOptions.js} +0 -0
- package/src/AdaptableOptions/DashboardOptions.d.ts +2 -7
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +19 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -7
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +9 -8
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/GeneralOptions.d.ts +25 -23
- package/src/AdaptableOptions/{MasterDetailAgGridPluginOptions.d.ts → MasterDetailPluginOptions.d.ts} +2 -4
- package/src/{Api/DataSourceApi.js → AdaptableOptions/MasterDetailPluginOptions.js} +0 -0
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +3 -6
- package/src/AdaptableOptions/ToolPanelOptions.d.ts +2 -49
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +88 -57
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +9 -4
- package/src/Api/ConditionalStyleApi.d.ts +10 -0
- package/src/Api/ConfigApi.d.ts +0 -12
- package/src/Api/DashboardApi.d.ts +6 -19
- package/src/Api/DataSetApi.d.ts +40 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +26 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/SearchChanged.d.ts +4 -5
- package/src/Api/ExportApi.d.ts +2 -2
- package/src/Api/FilterApi.d.ts +28 -36
- package/src/Api/GridApi.d.ts +1 -1
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/AlertApiImpl.js +5 -1
- package/src/Api/Implementation/ApiBase.d.ts +3 -0
- package/src/Api/Implementation/ApiBase.js +6 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +4 -4
- package/src/Api/Implementation/ColumnApiImpl.js +17 -16
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +8 -0
- package/src/Api/Implementation/ConfigApiImpl.d.ts +0 -4
- package/src/Api/Implementation/ConfigApiImpl.js +2 -24
- package/src/Api/Implementation/DashboardApiImpl.d.ts +3 -6
- package/src/Api/Implementation/DashboardApiImpl.js +5 -29
- package/src/Api/Implementation/DataSetApiImpl.d.ts +12 -0
- package/src/Api/Implementation/DataSetApiImpl.js +42 -0
- package/src/Api/Implementation/EventApiImpl.js +1 -0
- package/src/Api/Implementation/ExportApiImpl.d.ts +2 -2
- package/src/Api/Implementation/FilterApiImpl.d.ts +11 -11
- package/src/Api/Implementation/FilterApiImpl.js +59 -72
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -1
- package/src/Api/Implementation/GridApiImpl.js +7 -3
- package/src/Api/Implementation/InternalApiImpl.d.ts +3 -2
- package/src/Api/Implementation/InternalApiImpl.js +14 -3
- package/src/Api/Implementation/LayoutApiImpl.d.ts +3 -0
- package/src/Api/Implementation/LayoutApiImpl.js +20 -0
- package/src/Api/Implementation/PredicateApiImpl.d.ts +2 -0
- package/src/Api/Implementation/PredicateApiImpl.js +19 -1
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +3 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +6 -0
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +5 -3
- package/src/Api/Implementation/TeamSharingApiImpl.js +28 -10
- package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +1 -1
- package/src/Api/Implementation/UserInterfaceApiImpl.js +4 -4
- package/src/Api/InternalApi.d.ts +3 -2
- package/src/Api/LayoutApi.d.ts +16 -0
- package/src/Api/PredicateApi.d.ts +7 -0
- package/src/Api/SmartEditApi.d.ts +8 -2
- package/src/Api/TeamSharingApi.d.ts +18 -5
- package/src/Api/UserInterfaceApi.d.ts +4 -4
- package/src/PredefinedConfig/AdaptableState.d.ts +0 -4
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/{FilterState.d.ts → Common/ColumnFilter.d.ts} +2 -33
- package/src/PredefinedConfig/Common/ColumnFilter.js +2 -0
- package/src/PredefinedConfig/Common/Enums.d.ts +2 -2
- package/src/PredefinedConfig/Common/Enums.js +1 -1
- package/src/PredefinedConfig/Common/FormContext.d.ts +8 -0
- package/src/PredefinedConfig/Common/FormContext.js +2 -0
- package/src/PredefinedConfig/Common/Types.d.ts +6 -5
- package/src/PredefinedConfig/Common/Types.js +2 -3
- package/src/PredefinedConfig/LayoutState.d.ts +5 -0
- package/src/PredefinedConfig/PredefinedConfig.d.ts +0 -10
- package/src/PredefinedConfig/StatusBarState.d.ts +1 -2
- package/src/PredefinedConfig/SystemState.d.ts +3 -0
- package/src/Redux/ActionsReducers/LayoutRedux.d.ts +47 -0
- package/src/Redux/ActionsReducers/LayoutRedux.js +134 -1
- package/src/Redux/ActionsReducers/PopupRedux.d.ts +3 -2
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +22 -0
- package/src/Redux/ActionsReducers/SystemRedux.js +39 -1
- package/src/Redux/Store/AdaptableStore.js +37 -39
- package/src/Strategy/AdaptableModuleBase.js +1 -2
- package/src/Strategy/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/BulkUpdateModule.js +3 -4
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +29 -16
- package/src/Strategy/DataSetModule.d.ts +25 -0
- package/src/Strategy/DataSetModule.js +65 -0
- package/src/Strategy/ExportModule.js +6 -1
- package/src/Strategy/FilterModule.d.ts +7 -11
- package/src/Strategy/FilterModule.js +26 -20
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +25 -2
- package/src/Strategy/PlusMinusModule.js +1 -4
- package/src/Strategy/SmartEditModule.js +3 -3
- package/src/Strategy/StatusBarModule.js +1 -3
- package/src/Strategy/TeamSharingModule.js +1 -1
- package/src/Strategy/ToolPanelModule.js +1 -4
- package/src/Utilities/Constants/GeneralConstants.d.ts +8 -2
- package/src/Utilities/Constants/GeneralConstants.js +8 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +17 -15
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +3 -1
- package/src/Utilities/ObjectFactory.d.ts +3 -6
- package/src/Utilities/ObjectFactory.js +3 -7
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +6 -7
- package/src/Utilities/Services/EntitlementService.js +7 -1
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/RowEditService.d.ts +1 -0
- package/src/Utilities/Services/RowEditService.js +34 -2
- package/src/Utilities/Services/TeamSharingService.js +4 -4
- package/src/View/AdaptablePopover/index.d.ts +1 -0
- package/src/View/AdaptablePopover/index.js +5 -6
- package/src/View/AdaptableView.js +1 -1
- package/src/View/AdaptableViewFactory.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +8 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +3 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationForm.js +9 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.d.ts +18 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +87 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.d.ts +18 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +16 -0
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.d.ts +2 -9
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/index.js +2 -75
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.d.ts +3 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/useSelection.js +9 -4
- package/src/View/AdaptableWizardView/Utils.d.ts +1 -0
- package/src/View/AdaptableWizardView/Utils.js +24 -0
- package/src/View/AdaptableWizardView/Wizard.d.ts +54 -0
- package/src/View/AdaptableWizardView/Wizard.js +98 -0
- package/src/View/AdaptableWizardView/index.d.ts +1 -22
- package/src/View/AdaptableWizardView/index.js +2 -103
- package/src/View/Alert/ActiveAlertsPanel.d.ts +2 -0
- package/src/View/Alert/ActiveAlertsPanel.js +15 -0
- package/src/View/Alert/AlertStatusSubPanel.js +3 -8
- package/src/View/Alert/AlertViewPanel.js +2 -2
- package/src/View/Alert/Wizard/AlertBehaviourWizardSection.js +1 -1
- package/src/View/Alert/Wizard/AlertDisplayWizardSection.js +3 -3
- package/src/View/Alert/Wizard/BaseAlertRulesWizardSection.js +1 -1
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +2 -2
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -3
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +3 -4
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +5 -6
- package/src/View/CellSummary/CellSummaryDetails.js +4 -4
- package/src/View/CellSummary/CellSummaryPopover.d.ts +2 -4
- package/src/View/CellSummary/CellSummaryPopover.js +3 -6
- package/src/View/CellSummary/CellSummaryPopup.js +8 -0
- package/src/View/CellSummary/CellSummaryStatusBarSubPanelPopover.js +1 -1
- package/src/View/CellSummary/CellSummaryStatusPanel.js +2 -2
- package/src/View/CellSummary/CellSummaryViewPanel.js +1 -1
- package/src/View/Components/AdaptableObjectList/AdaptableObjectCompactList.js +18 -8
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +1 -2
- package/src/View/Components/ExternalRenderer.d.ts +3 -6
- package/src/View/Components/ExternalRenderer.js +5 -5
- package/src/View/Components/FilterForm/FilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/FilterForm.js +10 -8
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +5 -4
- package/src/View/Components/FilterForm/getDefaultColumnFilterPredicate.d.ts +1 -1
- package/src/View/Components/Popups/AdaptablePopupAlert.d.ts +0 -2
- package/src/View/Components/Popups/AdaptablePopupAlert.js +13 -11
- package/src/View/Components/Popups/AdaptableToaster.js +29 -9
- package/src/View/Components/PreviewResultsPanel.js +3 -3
- package/src/View/Components/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- package/src/View/Components/WizardSummaryPage.js +2 -2
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleRuleWizardSection.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleScopeWizardSection.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleSettingsWizardSettings.js +1 -1
- package/src/View/ConditionalStyle/Wizard/ConditionalStyleStyleWizardSection.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +2 -2
- package/src/View/CustomSort/Wizard/CustomSortValuesWizardSection.js +1 -1
- package/src/View/Dashboard/CustomDashboardButton.d.ts +11 -0
- package/src/View/Dashboard/CustomDashboardButton.js +47 -0
- package/src/View/Dashboard/CustomToolbarWrapper.d.ts +1 -0
- package/src/View/Dashboard/CustomToolbarWrapper.js +30 -11
- package/src/View/Dashboard/Dashboard.d.ts +1 -0
- package/src/View/Dashboard/Dashboard.js +8 -34
- package/src/View/DataChangeHistory/DataChangeHistoryGrid.js +19 -36
- package/src/View/DataChangeHistory/buildActionColumnButton.d.ts +3 -0
- package/src/View/DataChangeHistory/buildActionColumnButton.js +70 -0
- package/src/View/DataSet/DataSetSelector.d.ts +7 -0
- package/src/View/DataSet/DataSetSelector.js +18 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.d.ts +2 -0
- package/src/View/DataSet/DataSetStatusPanelPopover.js +19 -0
- package/src/View/DataSet/DataSetViewPanel.d.ts +19 -0
- package/src/View/DataSet/DataSetViewPanel.js +58 -0
- package/src/View/Export/Wizard/ReportColumnsWizardSection.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/ActiveFiltersPanel.js +1 -1
- package/src/View/Filter/FilterSummary.d.ts +5 -5
- package/src/View/Filter/FilterSummary.js +5 -4
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +10 -13
- package/src/View/FlashingCell/Wizard/FlashingCellRulesWizardSection.js +2 -2
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellSettingsWizardSection.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellStyleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +2 -2
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnSettingsWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +5 -6
- package/src/View/GridInfo/ColumnInfoComponent.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +1 -1
- package/src/View/Layout/LayoutStatusBarSubPanelPopover.js +6 -24
- package/src/View/Layout/Wizard/LayoutEditor/index.js +1 -1
- package/src/View/Layout/Wizard/LayoutEditorWizard.d.ts +1 -0
- package/src/View/PlusMinus/Wizard/PlusMinusRuleWizardSection.js +2 -2
- package/src/View/PlusMinus/Wizard/PlusMinusScopeWizardSection.js +1 -1
- package/src/View/PlusMinus/Wizard/PlusMinusSettingsWizardSection.js +2 -2
- package/src/View/Query/Wizard/NamedQueryExpressionWizardSection.js +1 -1
- package/src/View/Query/Wizard/NamedQuerySettingsWizardSection.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleSummary.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleScheduleWizard.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsSummary.js +1 -1
- package/src/View/Schedule/Wizard/ScheduleSettingsWizard/ScheduleSettingsWizard.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutScopeWizardSection.js +1 -1
- package/src/View/Shortcut/Wizard/ShortcutSettingsWizard.js +2 -2
- package/src/View/SmartEdit/SmartEditPopup.js +2 -2
- package/src/View/SmartEdit/SmartEditViewPanel.js +2 -2
- package/src/View/SpecialColumnSettingsWizardStep.js +1 -1
- package/src/View/StatusBar/AdaptableStatusBar.js +1 -1
- package/src/View/StatusBar/StatusBarPanel.d.ts +1 -0
- package/src/View/StatusBar/StatusBarPanel.js +5 -4
- package/src/View/Theme/ThemeStatusPanelPopover.js +5 -25
- package/src/View/UIHelper.d.ts +4 -4
- package/src/View/UIHelper.js +10 -10
- package/src/View/Wizard/Interface/IAdaptableWizard.d.ts +2 -2
- package/src/View/Wizard/ObjectTagsWizardSection.js +1 -1
- package/src/View/Wizard/OnePageAdaptableWizard.d.ts +5 -6
- package/src/View/Wizard/OnePageAdaptableWizard.js +35 -169
- package/src/View/Wizard/OnePageWizards.d.ts +37 -0
- package/src/View/Wizard/OnePageWizards.js +187 -0
- package/src/View/Wizard/useKeyboardNavigation.d.ts +1 -1
- package/src/agGrid/ActionColumnRenderer.js +3 -2
- package/src/agGrid/Adaptable.d.ts +4 -2
- package/src/agGrid/Adaptable.js +99 -58
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +7 -8
- package/src/agGrid/agGridHelper.js +68 -86
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/agGrid/rowEditIcons.d.ts +1 -0
- package/src/agGrid/rowEditIcons.js +2 -1
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +3 -2
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/InfiniteTable/index.js +1 -0
- package/src/components/List/GridList/index.js +1 -1
- package/src/components/SelectList.d.ts +10 -0
- package/src/components/SelectList.js +9 -0
- package/src/components/WindowModal/WindowModal.js +13 -7
- package/src/components/icons/{data-source.d.ts → add-row.d.ts} +0 -0
- package/src/components/icons/add-row.js +7 -0
- package/src/components/icons/data-set.d.ts +3 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +4 -2
- package/src/metamodel/adaptable.metamodel.d.ts +163 -78
- package/src/metamodel/adaptable.metamodel.js +402 -322
- package/src/types.d.ts +16 -12
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -10
- package/src/Api/DataSourceApi.d.ts +0 -58
- package/src/Api/Implementation/DataSourceApiImpl.d.ts +0 -15
- package/src/Api/Implementation/DataSourceApiImpl.js +0 -51
- package/src/PredefinedConfig/DataSourceState.d.ts +0 -34
- package/src/Redux/ActionsReducers/DataSourceRedux.d.ts +0 -42
- package/src/Redux/ActionsReducers/DataSourceRedux.js +0 -76
- package/src/Redux/ActionsReducers/FilterRedux.d.ts +0 -70
- package/src/Redux/ActionsReducers/FilterRedux.js +0 -126
- package/src/Strategy/DataSourceModule.d.ts +0 -20
- package/src/Strategy/DataSourceModule.js +0 -56
- package/src/View/DataSource/DataSourceViewPanel.d.ts +0 -19
- package/src/View/DataSource/DataSourceViewPanel.js +0 -69
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.d.ts +0 -2
- package/src/View/DataSource/Wizard/DataSourceSettingsSummary.js +0 -17
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceSettingsWizard.js +0 -42
- package/src/View/DataSource/Wizard/DataSourceWizard.d.ts +0 -8
- package/src/View/DataSource/Wizard/DataSourceWizard.js +0 -53
|
@@ -2,14 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FilterApiImpl = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
-
const
|
|
5
|
+
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
6
|
+
const LayoutRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/LayoutRedux"));
|
|
6
7
|
const ApiBase_1 = require("./ApiBase");
|
|
7
8
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
8
9
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
9
10
|
class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
-
getFilterState() {
|
|
11
|
-
return this.getAdaptableState().Filter;
|
|
12
|
-
}
|
|
13
11
|
getAllSystemFilterIds() {
|
|
14
12
|
return this.getFilterOptions().systemFilters;
|
|
15
13
|
}
|
|
@@ -30,12 +28,23 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
30
28
|
...this.adaptable.api.predicateApi.getCustomPredicateDefs(),
|
|
31
29
|
].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
|
|
32
30
|
}
|
|
33
|
-
|
|
34
|
-
|
|
31
|
+
showQuickFilterBar() {
|
|
32
|
+
this.dispatchAction(SystemRedux.SystemQuickFilterBarShow());
|
|
35
33
|
}
|
|
36
|
-
|
|
34
|
+
hideQuickFilterBar() {
|
|
35
|
+
this.dispatchAction(SystemRedux.SystemQuickFilterBarHide());
|
|
36
|
+
}
|
|
37
|
+
isQuickFilterAvailable() {
|
|
38
|
+
return this.adaptable.isQuickFilterAvailable();
|
|
39
|
+
}
|
|
40
|
+
isQuickFilterVisible() {
|
|
41
|
+
return (this.isQuickFilterAvailable() &&
|
|
42
|
+
this.adaptable.api.internalApi.getSystemState().IsQuickFilterVisible);
|
|
43
|
+
}
|
|
44
|
+
getColumnFilters() {
|
|
37
45
|
var _a;
|
|
38
|
-
|
|
46
|
+
const currentLayout = this.adaptable.api.layoutApi.getCurrentLayout();
|
|
47
|
+
return (_a = currentLayout.ColumnFilters) !== null && _a !== void 0 ? _a : [];
|
|
39
48
|
}
|
|
40
49
|
setColumnFilter(columnFilters) {
|
|
41
50
|
columnFilters.forEach((columnFilter) => {
|
|
@@ -49,11 +58,11 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
49
58
|
}
|
|
50
59
|
else {
|
|
51
60
|
this.addUidToAdaptableObject(columnFilter);
|
|
52
|
-
if (this.
|
|
53
|
-
this.dispatchAction(
|
|
61
|
+
if (this.getColumnFilters().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
62
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
|
|
54
63
|
}
|
|
55
64
|
else {
|
|
56
|
-
this.dispatchAction(
|
|
65
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
|
|
57
66
|
}
|
|
58
67
|
}
|
|
59
68
|
return columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.map((columnFilter) => this.getColumnFilterById(columnFilter.Uuid));
|
|
@@ -61,19 +70,8 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
61
70
|
});
|
|
62
71
|
return null;
|
|
63
72
|
}
|
|
64
|
-
clearAndSetColumnFilter(columnFilters) {
|
|
65
|
-
this.clearAllColumnFilter();
|
|
66
|
-
columnFilters.forEach((columnFilter) => {
|
|
67
|
-
if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
68
|
-
this.dispatchAction(FilterRedux.ColumnFilterSet(columnFilter));
|
|
69
|
-
}
|
|
70
|
-
else {
|
|
71
|
-
this.dispatchAction(FilterRedux.ColumnFilterAdd(columnFilter));
|
|
72
|
-
}
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
73
|
clearColumnFilter(columnFilter) {
|
|
76
|
-
this.dispatchAction(
|
|
74
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(columnFilter));
|
|
77
75
|
}
|
|
78
76
|
clearColumnFilterByColumns(columns) {
|
|
79
77
|
columns.forEach((c) => {
|
|
@@ -84,17 +82,28 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
84
82
|
let columnFiltersForColumn = this.getAllColumnFilterForColumn(column);
|
|
85
83
|
if (columnFiltersForColumn) {
|
|
86
84
|
columnFiltersForColumn.forEach((cf) => {
|
|
87
|
-
this.dispatchAction(
|
|
85
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClear(cf));
|
|
88
86
|
});
|
|
89
87
|
this.adaptable.clearColumnFiltering([column]);
|
|
90
88
|
}
|
|
91
89
|
}
|
|
92
|
-
|
|
93
|
-
this.dispatchAction(
|
|
90
|
+
clearColumnFilters() {
|
|
91
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterClearAll());
|
|
94
92
|
this.adaptable.clearGridFiltering();
|
|
95
93
|
}
|
|
94
|
+
clearAndSetColumnFilter(columnFilters) {
|
|
95
|
+
this.clearColumnFilters();
|
|
96
|
+
columnFilters.forEach((columnFilter) => {
|
|
97
|
+
if (this.getColumnFilters().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
98
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterSet(columnFilter));
|
|
99
|
+
}
|
|
100
|
+
else {
|
|
101
|
+
this.dispatchAction(LayoutRedux.LayoutColumnFilterAdd(columnFilter));
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
}
|
|
96
105
|
getAllColumnFilterForColumn(column) {
|
|
97
|
-
let columnFilters = this.
|
|
106
|
+
let columnFilters = this.getColumnFilters();
|
|
98
107
|
if (columnFilters) {
|
|
99
108
|
return columnFilters.filter((cf) => cf.ColumnId == column);
|
|
100
109
|
}
|
|
@@ -102,44 +111,30 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
102
111
|
return [];
|
|
103
112
|
}
|
|
104
113
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
if (primarykeyValues.length == 1) {
|
|
109
|
-
const normalisedValue = this.adaptable.api.gridApi.getCellNormalisedValue(primarykeyValues[0], columnId);
|
|
110
|
-
if (normalisedValue) {
|
|
111
|
-
cellValues.push(normalisedValue);
|
|
112
|
-
const dataType = this.adaptable.api.columnApi.getColumnDataTypeFromColumnId(columnId);
|
|
113
|
-
if (dataType) {
|
|
114
|
-
if (dataType == 'Number') {
|
|
115
|
-
predicateId = 'Equals';
|
|
116
|
-
}
|
|
117
|
-
else if (dataType == 'Date') {
|
|
118
|
-
predicateId = 'On';
|
|
119
|
-
}
|
|
120
|
-
else if (dataType == 'String') {
|
|
121
|
-
predicateId = 'Is';
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
predicateId = 'Equals';
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
}
|
|
114
|
+
createValuesColumnFilterForCells(gridCells) {
|
|
115
|
+
if (!gridCells) {
|
|
116
|
+
return null;
|
|
128
117
|
}
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
118
|
+
const filter = {
|
|
119
|
+
ColumnId: gridCells[0].column.columnId,
|
|
120
|
+
Predicate: {
|
|
121
|
+
PredicateId: 'Values',
|
|
122
|
+
Inputs: [...new Set(gridCells.map((gc) => gc.displayValue))],
|
|
123
|
+
},
|
|
124
|
+
};
|
|
125
|
+
const [savedFilter] = this.setColumnFilter([filter]) || [null];
|
|
126
|
+
return savedFilter;
|
|
127
|
+
}
|
|
128
|
+
createEqualityColumnFilterForCell(gridCell) {
|
|
129
|
+
if (!gridCell) {
|
|
130
|
+
return null;
|
|
137
131
|
}
|
|
132
|
+
const column = gridCell.column;
|
|
138
133
|
const filter = {
|
|
139
|
-
ColumnId: columnId,
|
|
134
|
+
ColumnId: column.columnId,
|
|
140
135
|
Predicate: {
|
|
141
|
-
PredicateId:
|
|
142
|
-
Inputs: [...new Set(
|
|
136
|
+
PredicateId: this.adaptable.api.predicateApi.getEqualityPredicateForDataType(column.dataType),
|
|
137
|
+
Inputs: [...new Set([gridCell.rawValue])],
|
|
143
138
|
},
|
|
144
139
|
};
|
|
145
140
|
const [savedFilter] = this.setColumnFilter([filter]) || [null];
|
|
@@ -180,17 +175,9 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
180
175
|
column,
|
|
181
176
|
}, true);
|
|
182
177
|
}
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
hideQuickFilterBar() {
|
|
187
|
-
this.dispatchAction(FilterRedux.QuickFilterBarHide());
|
|
188
|
-
}
|
|
189
|
-
isQuickFilterAvailable() {
|
|
190
|
-
return this.adaptable.isQuickFilterAvailable();
|
|
191
|
-
}
|
|
192
|
-
isQuickFilterVisible() {
|
|
193
|
-
return this.isQuickFilterAvailable() && this.getFilterState().IsQuickFilterVisible;
|
|
178
|
+
getColumnFilterById(id) {
|
|
179
|
+
var _a;
|
|
180
|
+
return (_a = this.getColumnFilters()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
|
|
194
181
|
}
|
|
195
182
|
}
|
|
196
183
|
exports.FilterApiImpl = FilterApiImpl;
|
|
@@ -275,13 +275,13 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
275
275
|
this.adaptable.api.eventApi.emit('CheckboxColumnClicked', checkboxColumnClickedInfo);
|
|
276
276
|
}
|
|
277
277
|
applyCustomFormatters(value, options) {
|
|
278
|
-
var _a, _b;
|
|
278
|
+
var _a, _b, _c;
|
|
279
279
|
const columnCustomFormatters = (_a = options === null || options === void 0 ? void 0 : options.CustomDisplayFormats) !== null && _a !== void 0 ? _a : [];
|
|
280
280
|
if (!(columnCustomFormatters === null || columnCustomFormatters === void 0 ? void 0 : columnCustomFormatters.length)) {
|
|
281
281
|
return value;
|
|
282
282
|
}
|
|
283
283
|
const adaptableOptions = this.adaptable.adaptableOptions;
|
|
284
|
-
const customFormattersFromOptions = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.
|
|
284
|
+
const customFormattersFromOptions = (_c = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.userInterfaceOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters) !== null && _c !== void 0 ? _c : [];
|
|
285
285
|
// formatters are applied in the order they are defined in the options
|
|
286
286
|
const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
|
|
287
287
|
return customFormatters.reduce((acc, formatter) => {
|
|
@@ -84,7 +84,7 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
84
84
|
isGroupRowNode(rowNode: RowNode): boolean;
|
|
85
85
|
isQuickFilterAvailable(): boolean;
|
|
86
86
|
redrawGrid(): void;
|
|
87
|
-
fireSearchChangedEvent(searchChangedTrigger: '
|
|
87
|
+
fireSearchChangedEvent(searchChangedTrigger: 'CurrentQuery' | 'Filter' | 'DataChange' | 'Sort'): void;
|
|
88
88
|
fireCellChangedEvent(cellDataChangedInfo: CellDataChangedInfo): void;
|
|
89
89
|
fireGridDataChangedEvent(dataRows: any[], rowNodes: RowNode[], rowTrigger: 'Add' | 'Edit' | 'Delete'): void;
|
|
90
90
|
jumpToRow(primaryKeyValue: any): void;
|
|
@@ -90,7 +90,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
90
90
|
}
|
|
91
91
|
clearGridFiltering() {
|
|
92
92
|
// slightly round the houses but we have to call FilterAPI as it does it properly
|
|
93
|
-
this.adaptable.api.filterApi.
|
|
93
|
+
this.adaptable.api.filterApi.clearColumnFilters();
|
|
94
94
|
}
|
|
95
95
|
getAgGridInstance() {
|
|
96
96
|
return this.adaptable.adaptableOptions.gridOptions;
|
|
@@ -378,7 +378,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
378
378
|
if (!rowNode) {
|
|
379
379
|
LoggingHelper_1.LogAdaptableWarning(`Can NOT edit row: rowNode not found for primaryKey ${primaryKey}`);
|
|
380
380
|
}
|
|
381
|
-
const editForm = this.adaptable.api.internalApi
|
|
381
|
+
const editForm = this.adaptable.api.internalApi
|
|
382
|
+
.getRowEditService()
|
|
383
|
+
.buildRowEditForm(rowNode);
|
|
382
384
|
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
383
385
|
Id: 'edit_row_form',
|
|
384
386
|
Form: editForm,
|
|
@@ -389,7 +391,9 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
389
391
|
}));
|
|
390
392
|
}
|
|
391
393
|
openCreateRowForm(duplicatedRowNodePrimaryKey) {
|
|
392
|
-
const createForm = this.adaptable.api.internalApi
|
|
394
|
+
const createForm = this.adaptable.api.internalApi
|
|
395
|
+
.getRowEditService()
|
|
396
|
+
.buildRowCreateForm();
|
|
393
397
|
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
394
398
|
Id: 'create_row_form',
|
|
395
399
|
Form: createForm,
|
|
@@ -11,7 +11,7 @@ import { SelectedRowInfo } from '../../PredefinedConfig/Selection/SelectedRowInf
|
|
|
11
11
|
import { AdaptableModule, AdaptableQLModule } from '../../PredefinedConfig/Common/Types';
|
|
12
12
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
13
13
|
import { CellDataChangedInfo } from '../../PredefinedConfig/Common/CellDataChangedInfo';
|
|
14
|
-
import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo } from '../../types';
|
|
14
|
+
import { AdaptableCellChangedAlert, AdaptableOptions, AdaptableRowChangedAlert, AdaptableState, AlertButtonContext, BaseContext, Layout, LayoutAssociatedObject, SystemStatusMessageInfo, SharedEntity, AdaptableIcon } from '../../types';
|
|
15
15
|
import { IValidationService } from '../../Utilities/Services/Interface/IValidationService';
|
|
16
16
|
import { IModuleService } from '../../Utilities/Services/Interface/IModuleService';
|
|
17
17
|
import { IReportService } from '../../Utilities/Services/Interface/IReportService';
|
|
@@ -114,10 +114,11 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
114
114
|
getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
115
115
|
getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
116
116
|
getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
|
|
117
|
+
getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
|
|
117
118
|
isDocumentationLinksDisplayed(): boolean;
|
|
118
119
|
getQueryPreviewData(): any;
|
|
120
|
+
getLocalTeamSharingEntities(): SharedEntity[];
|
|
119
121
|
waitForTeamSharingImportEnd(): Promise<boolean>;
|
|
120
|
-
getUserDefinedHeaderName(columnId: string): string;
|
|
121
122
|
createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
122
123
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
123
124
|
initializeDataChangeHistory(): void;
|
|
@@ -360,6 +360,17 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
360
360
|
return button.buttonStyle;
|
|
361
361
|
}
|
|
362
362
|
}
|
|
363
|
+
getIconForButton(button, context) {
|
|
364
|
+
if (!button.icon) {
|
|
365
|
+
return;
|
|
366
|
+
}
|
|
367
|
+
if (button.icon != null && typeof button.icon === 'function') {
|
|
368
|
+
return button.icon(button, context);
|
|
369
|
+
}
|
|
370
|
+
else {
|
|
371
|
+
return button.icon;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
363
374
|
isDocumentationLinksDisplayed() {
|
|
364
375
|
return this.adaptable.adaptableOptions.userInterfaceOptions.showDocumentationLinks;
|
|
365
376
|
}
|
|
@@ -380,6 +391,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
380
391
|
});
|
|
381
392
|
return firstRowData;
|
|
382
393
|
}
|
|
394
|
+
getLocalTeamSharingEntities() {
|
|
395
|
+
return this.getAdaptableState().TeamSharing.SharedEntities;
|
|
396
|
+
}
|
|
383
397
|
waitForTeamSharingImportEnd() {
|
|
384
398
|
// we have no deterministic means to ensure the teamsharing import is finished (because the import actions are opaque and may have side-effects)
|
|
385
399
|
// therefore we will listen for state changes and
|
|
@@ -406,9 +420,6 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
406
420
|
});
|
|
407
421
|
});
|
|
408
422
|
}
|
|
409
|
-
getUserDefinedHeaderName(columnId) {
|
|
410
|
-
return this.adaptable.getUserDefinedHeaderName(columnId);
|
|
411
|
-
}
|
|
412
423
|
createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
413
424
|
const createComponentFn = () =>
|
|
414
425
|
// delegate the logic to framework wrapper
|
|
@@ -42,4 +42,7 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
42
42
|
isCurrentLayoutDefault(): boolean;
|
|
43
43
|
areExpandedRowGroupsSavedInLayouts(): boolean;
|
|
44
44
|
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
45
|
+
removeColumnFromCurrentLayout(columnId: string): void;
|
|
46
|
+
removeColumnFromAllLayouts(columnId: string): void;
|
|
47
|
+
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
45
48
|
}
|
|
@@ -321,5 +321,25 @@ class LayoutApiImpl extends ApiBase_1.ApiBase {
|
|
|
321
321
|
? true
|
|
322
322
|
: (_a = adaptableObject.Tags) === null || _a === void 0 ? void 0 : _a.map((tag) => tag).includes(this.getCurrentLayoutName());
|
|
323
323
|
}
|
|
324
|
+
removeColumnFromCurrentLayout(columnId) {
|
|
325
|
+
this.removeColumnFromLayout(columnId, this.getCurrentLayoutName());
|
|
326
|
+
}
|
|
327
|
+
removeColumnFromAllLayouts(columnId) {
|
|
328
|
+
this.getAllLayout().forEach((layout) => {
|
|
329
|
+
this.removeColumnFromLayout(columnId, layout.Name);
|
|
330
|
+
});
|
|
331
|
+
}
|
|
332
|
+
removeColumnFromLayout(columnId, layoutName) {
|
|
333
|
+
const column = this.getAdaptableApi().columnApi.getColumnFromId(columnId);
|
|
334
|
+
if (column) {
|
|
335
|
+
const layout = this.getLayoutByName(layoutName);
|
|
336
|
+
if (layout) {
|
|
337
|
+
if (layout.Columns.includes(columnId)) {
|
|
338
|
+
this.dispatchAction(LayoutRedux.LayouRemoveColumn(layoutName, columnId));
|
|
339
|
+
this.getAdaptableApi().columnApi.hideColumn(columnId);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
324
344
|
}
|
|
325
345
|
exports.LayoutApiImpl = LayoutApiImpl;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { PredicateApi } from '../PredicateApi';
|
|
3
3
|
import { AdaptablePredicateDef, AdaptablePredicate, PredicateDefHandlerParams, ModuleScope } from '../../PredefinedConfig/Common/AdaptablePredicate';
|
|
4
|
+
import { AdaptableColumnDataType, SystemFilterPredicateId } from '../../types';
|
|
4
5
|
export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
5
6
|
getPredicateDefs(): AdaptablePredicateDef[];
|
|
6
7
|
getSystemPredicateDefs(): AdaptablePredicateDef[];
|
|
@@ -12,4 +13,5 @@ export declare class PredicateApiImpl extends ApiBase implements PredicateApi {
|
|
|
12
13
|
predicateToString(predicate: AdaptablePredicate): string | undefined;
|
|
13
14
|
isValidPredicate(predicate: AdaptablePredicate | undefined): boolean;
|
|
14
15
|
handlePredicate(predicate: AdaptablePredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
16
|
+
getEqualityPredicateForDataType(dataType: AdaptableColumnDataType): SystemFilterPredicateId;
|
|
15
17
|
}
|
|
@@ -15,7 +15,7 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
15
15
|
return AdaptablePredicate_1.SystemPredicateDefs;
|
|
16
16
|
}
|
|
17
17
|
getCustomPredicateDefs() {
|
|
18
|
-
return this.
|
|
18
|
+
return this.getAdaptableQLOptions().customPredicateDefs;
|
|
19
19
|
}
|
|
20
20
|
getPredicateDefsByModuleScope(moduleScope) {
|
|
21
21
|
return this.getPredicateDefs().filter((p) => p.moduleScope.includes(moduleScope));
|
|
@@ -78,5 +78,23 @@ class PredicateApiImpl extends ApiBase_1.ApiBase {
|
|
|
78
78
|
return false;
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
|
+
getEqualityPredicateForDataType(dataType) {
|
|
82
|
+
let predicateId;
|
|
83
|
+
switch (dataType) {
|
|
84
|
+
case 'Number':
|
|
85
|
+
predicateId = 'Equals';
|
|
86
|
+
break;
|
|
87
|
+
case 'Date':
|
|
88
|
+
predicateId = 'On';
|
|
89
|
+
break;
|
|
90
|
+
case 'String':
|
|
91
|
+
predicateId = 'Is';
|
|
92
|
+
break;
|
|
93
|
+
default:
|
|
94
|
+
predicateId = 'Equals';
|
|
95
|
+
break;
|
|
96
|
+
}
|
|
97
|
+
return predicateId;
|
|
98
|
+
}
|
|
81
99
|
}
|
|
82
100
|
exports.PredicateApiImpl = PredicateApiImpl;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
|
+
import { MathOperation } from '../../PredefinedConfig/Common/Enums';
|
|
2
3
|
import { SmartEditApi } from '../SmartEditApi';
|
|
3
4
|
import { GridCell } from '../../PredefinedConfig/Selection/GridCell';
|
|
4
5
|
import { SmartEditCustomOperation, SmartEditOperation } from '../../AdaptableOptions/EditOptions';
|
|
5
6
|
export declare class SmartEditApiImpl extends ApiBase implements SmartEditApi {
|
|
6
|
-
setSmartEditOperation(mathOperation:
|
|
7
|
+
setSmartEditOperation(mathOperation: MathOperation): void;
|
|
7
8
|
getSmartEditOperation(): SmartEditOperation;
|
|
8
9
|
setSmartEditValue(smartEditValue: number): void;
|
|
9
10
|
getSmartEditValue(): number;
|
|
10
11
|
showSmartEditPopup(): void;
|
|
11
12
|
applySmartEdit(gridCells: GridCell[]): void;
|
|
12
13
|
getSmartEditCustomOperations(): SmartEditCustomOperation[] | undefined;
|
|
14
|
+
setCustomSmartEditOperation(customOperationName: string): void;
|
|
13
15
|
}
|
|
@@ -28,5 +28,11 @@ class SmartEditApiImpl extends ApiBase_1.ApiBase {
|
|
|
28
28
|
getSmartEditCustomOperations() {
|
|
29
29
|
return this.getEditOptions().smartEditCustomOperations;
|
|
30
30
|
}
|
|
31
|
+
setCustomSmartEditOperation(customOperationName) {
|
|
32
|
+
const customOperation = this.getSmartEditCustomOperations().find((so) => so.name == customOperationName);
|
|
33
|
+
if (customOperation) {
|
|
34
|
+
this.dispatchAction(SystemRedux.SmartEditChangeOperation(customOperation));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
31
37
|
}
|
|
32
38
|
exports.SmartEditApiImpl = SmartEditApiImpl;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ApiBase } from './ApiBase';
|
|
2
2
|
import { TeamSharingApi } from '../TeamSharingApi';
|
|
3
|
-
import {
|
|
3
|
+
import { SharedEntity, AdaptableModule, AdaptableObject, SharedEntityConfig } from '../../types';
|
|
4
4
|
export declare class TeamSharingApiImpl extends ApiBase implements TeamSharingApi {
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
getSharedEntities(): Promise<SharedEntity[]>;
|
|
6
|
+
setSharedEntities(sharedEntities: SharedEntity[]): Promise<boolean>;
|
|
7
|
+
isTeamSharingAvailable(): boolean;
|
|
7
8
|
isTeamSharingActivated(): boolean;
|
|
8
9
|
hasTeamSharingFullRights(): boolean;
|
|
9
10
|
checkForUpdates(): void;
|
|
10
11
|
showTeamSharingPopup(): void;
|
|
11
12
|
fireTeamSharingEntityChangedEvent(sharedEntity: SharedEntity): void;
|
|
12
13
|
shareEntity(entity: AdaptableObject, module: AdaptableModule, sharedEntityConfig: SharedEntityConfig): void;
|
|
14
|
+
unshareEntity(entityId: string): void;
|
|
13
15
|
}
|
|
@@ -8,20 +8,31 @@ const TeamSharingRedux_1 = require("../../Redux/ActionsReducers/TeamSharingRedux
|
|
|
8
8
|
const TeamSharingRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/TeamSharingRedux"));
|
|
9
9
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
10
10
|
class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
async getSharedEntities() {
|
|
12
|
+
if (!this.isTeamSharingActivated()) {
|
|
13
|
+
LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be loaded');
|
|
14
|
+
return [];
|
|
15
|
+
}
|
|
16
|
+
return this.adaptable.adaptableOptions.teamSharingOptions.getSharedEntities(this.adaptable.adaptableOptions.adaptableId);
|
|
13
17
|
}
|
|
14
|
-
|
|
15
|
-
|
|
18
|
+
async setSharedEntities(sharedEntities) {
|
|
19
|
+
if (!this.isTeamSharingActivated()) {
|
|
20
|
+
LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be shared');
|
|
21
|
+
return false;
|
|
22
|
+
}
|
|
23
|
+
await this.adaptable.adaptableOptions.teamSharingOptions.setSharedEntities(this.adaptable.adaptableOptions.adaptableId, sharedEntities);
|
|
24
|
+
return true;
|
|
16
25
|
}
|
|
17
|
-
|
|
26
|
+
isTeamSharingAvailable() {
|
|
27
|
+
var _a, _b, _c;
|
|
18
28
|
return (!this.getAdaptableApi()
|
|
19
29
|
.internalApi.getEntitlementService()
|
|
20
|
-
.isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) &&
|
|
21
|
-
this.adaptable.adaptableOptions.teamSharingOptions &&
|
|
22
|
-
this.adaptable.adaptableOptions.teamSharingOptions.
|
|
23
|
-
|
|
24
|
-
|
|
30
|
+
.isModuleHiddenEntitlement(ModuleConstants.TeamSharingModuleId) && ((_a = this.adaptable.adaptableOptions.teamSharingOptions) === null || _a === void 0 ? void 0 : _a.enableTeamSharing) &&
|
|
31
|
+
!!((_b = this.adaptable.adaptableOptions.teamSharingOptions) === null || _b === void 0 ? void 0 : _b.getSharedEntities) &&
|
|
32
|
+
!!((_c = this.adaptable.adaptableOptions.teamSharingOptions) === null || _c === void 0 ? void 0 : _c.setSharedEntities));
|
|
33
|
+
}
|
|
34
|
+
isTeamSharingActivated() {
|
|
35
|
+
return this.isTeamSharingAvailable();
|
|
25
36
|
}
|
|
26
37
|
hasTeamSharingFullRights() {
|
|
27
38
|
return this.adaptable.api.internalApi
|
|
@@ -50,5 +61,12 @@ class TeamSharingApiImpl extends ApiBase_1.ApiBase {
|
|
|
50
61
|
}
|
|
51
62
|
this.dispatchAction(TeamSharingRedux.TeamSharingShare(entity, module, sharedEntityConfig));
|
|
52
63
|
}
|
|
64
|
+
unshareEntity(entityId) {
|
|
65
|
+
if (!this.isTeamSharingActivated()) {
|
|
66
|
+
LoggingHelper_1.ConsoleLogWarning('Team Sharing is not Activated so Entities cannot be unshared');
|
|
67
|
+
return;
|
|
68
|
+
}
|
|
69
|
+
this.dispatchAction(TeamSharingRedux.TeamSharingRemoveItem(entityId));
|
|
70
|
+
}
|
|
53
71
|
}
|
|
54
72
|
exports.TeamSharingApiImpl = TeamSharingApiImpl;
|
|
@@ -24,6 +24,6 @@ export declare class UserInterfaceApiImpl extends ApiBase implements UserInterfa
|
|
|
24
24
|
addContextMenuItem(userMenuItem: UserMenuItem<ContextMenuContext>): void;
|
|
25
25
|
getEditableCellStyle(): AdaptableStyle | undefined;
|
|
26
26
|
getReadOnlyCellStyle(): AdaptableStyle | undefined;
|
|
27
|
-
getAllActionColumn(): ActionColumn[];
|
|
28
27
|
getAdaptableObjectTags(): AdaptableObjectTag[] | undefined;
|
|
28
|
+
getAllActionColumn(): ActionColumn[];
|
|
29
29
|
}
|
|
@@ -150,10 +150,6 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
150
150
|
getReadOnlyCellStyle() {
|
|
151
151
|
return this.getUserInterfaceOptions().readOnlyCellStyle;
|
|
152
152
|
}
|
|
153
|
-
getAllActionColumn() {
|
|
154
|
-
var _a;
|
|
155
|
-
return (_a = this.getUserInterfaceOptions().actionColumns) !== null && _a !== void 0 ? _a : [];
|
|
156
|
-
}
|
|
157
153
|
getAdaptableObjectTags() {
|
|
158
154
|
const objectTags = this.getUserInterfaceOptions().objectTags;
|
|
159
155
|
if (objectTags != null && typeof objectTags === 'function') {
|
|
@@ -166,5 +162,9 @@ class UserInterfaceApiImpl extends ApiBase_1.ApiBase {
|
|
|
166
162
|
}
|
|
167
163
|
}
|
|
168
164
|
}
|
|
165
|
+
getAllActionColumn() {
|
|
166
|
+
var _a, _b;
|
|
167
|
+
return (_b = (_a = this.getUserInterfaceOptions().actionOptions) === null || _a === void 0 ? void 0 : _a.actionColumns) !== null && _b !== void 0 ? _b : [];
|
|
168
|
+
}
|
|
169
169
|
}
|
|
170
170
|
exports.UserInterfaceApiImpl = UserInterfaceApiImpl;
|
package/src/Api/InternalApi.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import { AdaptableOptions } from '../AdaptableOptions/AdaptableOptions';
|
|
|
17
17
|
import { Layout } from '../PredefinedConfig/LayoutState';
|
|
18
18
|
import { AdaptableAlert, AdaptableCellChangedAlert, AdaptableRowChangedAlert } from '../PredefinedConfig/Common/AdaptableAlert';
|
|
19
19
|
import { IDataService } from '../Utilities/Services/Interface/IDataService';
|
|
20
|
-
import { AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SystemStatusMessageInfo } from '../types';
|
|
20
|
+
import { AdaptableIcon, AdaptableMessageType, AlertDefinition, BaseContext, CellDataChangedInfo, EditLookUpPermittedValues, LayoutAssociatedObject, SharedEntity, SystemStatusMessageInfo } from '../types';
|
|
21
21
|
import { IEntitlementService } from '../Utilities/Services/Interface/IEntitlementService';
|
|
22
22
|
import { AdaptableFlashingCell } from '../PredefinedConfig/Common/AdaptableFlashingCell';
|
|
23
23
|
import { IQueryLanguageService } from '../Utilities/Services/Interface/IQueryLanguageService';
|
|
@@ -117,9 +117,10 @@ export interface InternalApi {
|
|
|
117
117
|
getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
118
118
|
getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
119
119
|
getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
|
|
120
|
+
getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
|
|
120
121
|
dispatchReduxAction(action: Action): void;
|
|
121
122
|
waitForTeamSharingImportEnd(): Promise<boolean>;
|
|
122
|
-
|
|
123
|
+
getLocalTeamSharingEntities(): SharedEntity[];
|
|
123
124
|
createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar' | string): void;
|
|
124
125
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar' | string): void;
|
|
125
126
|
initializeDataChangeHistory(): void;
|
package/src/Api/LayoutApi.d.ts
CHANGED
|
@@ -187,4 +187,20 @@ export interface LayoutApi {
|
|
|
187
187
|
* @param adaptableObject object to check
|
|
188
188
|
*/
|
|
189
189
|
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
190
|
+
/**
|
|
191
|
+
* Removes a Column from the Current Layout
|
|
192
|
+
* @param columnId Column to remove
|
|
193
|
+
*/
|
|
194
|
+
removeColumnFromCurrentLayout(columnId: string): void;
|
|
195
|
+
/**
|
|
196
|
+
* Removes a Column from all Layouts
|
|
197
|
+
* @param columnId Column to remove
|
|
198
|
+
*/
|
|
199
|
+
removeColumnFromAllLayouts(columnId: string): void;
|
|
200
|
+
/**
|
|
201
|
+
* Removes a Column from a given Layout
|
|
202
|
+
* @param columnId Column to remove
|
|
203
|
+
* @param layoutName layout from which to remove Column
|
|
204
|
+
*/
|
|
205
|
+
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
190
206
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { AdaptableColumnDataType } from '../../types';
|
|
1
2
|
import { AdaptablePredicateDef, AdaptablePredicate, PredicateDefHandlerParams, ModuleScope } from '../PredefinedConfig/Common/AdaptablePredicate';
|
|
3
|
+
import { SystemFilterPredicateId } from '../types';
|
|
2
4
|
/**
|
|
3
5
|
* Functions which manage the Predicate object in AdapTable
|
|
4
6
|
*/
|
|
@@ -52,4 +54,9 @@ export interface PredicateApi {
|
|
|
52
54
|
* @param defaultReturn Whether to return the default
|
|
53
55
|
*/
|
|
54
56
|
handlePredicate(predicate: AdaptablePredicate | undefined, params: Omit<PredicateDefHandlerParams, 'api' | 'inputs'>, defaultReturn: boolean): boolean;
|
|
57
|
+
/**
|
|
58
|
+
* Gets the correct Equality-type System Predicate for a particular DataType
|
|
59
|
+
* @param dataType DataType of Column
|
|
60
|
+
*/
|
|
61
|
+
getEqualityPredicateForDataType(dataType: AdaptableColumnDataType): SystemFilterPredicateId;
|
|
55
62
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { SmartEditOperation } from '../AdaptableOptions/EditOptions';
|
|
2
|
+
import { MathOperation } from '../PredefinedConfig/Common/Enums';
|
|
2
3
|
import { GridCell } from '../PredefinedConfig/Selection/GridCell';
|
|
3
4
|
import { SmartEditCustomOperation } from '../types';
|
|
4
5
|
/**
|
|
@@ -6,10 +7,15 @@ import { SmartEditCustomOperation } from '../types';
|
|
|
6
7
|
**/
|
|
7
8
|
export interface SmartEditApi {
|
|
8
9
|
/**
|
|
9
|
-
* Sets Smart Edit
|
|
10
|
+
* Sets (shipped) Smart Edit Operation: 'Add','Subtract','Multiply','Divide'
|
|
10
11
|
* @param operation operation to run
|
|
11
12
|
*/
|
|
12
|
-
setSmartEditOperation(operation:
|
|
13
|
+
setSmartEditOperation(operation: MathOperation): void;
|
|
14
|
+
/**
|
|
15
|
+
* Sets current Smart Edit Operation to a Custom Operation
|
|
16
|
+
* @param customOperationName name of Custom Smart Edit Operation
|
|
17
|
+
*/
|
|
18
|
+
setCustomSmartEditOperation(customOperationName: string): void;
|
|
13
19
|
/**
|
|
14
20
|
* Gets current Smart Edit Operation
|
|
15
21
|
*/
|