@adaptabletools/adaptable 11.2.4 → 12.0.0-canary.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/base.css +568 -273
- package/bundle.cjs.js +120 -120
- package/index.css +642 -270
- package/package.json +2 -2
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +6 -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 +91 -4
- 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/AdaptableOptions/{SmartEdit.js → 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 +95 -50
- 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/Api/{DataSourceApi.js → DataSetApi.js} +0 -0
- package/src/Api/EventApi.d.ts +29 -1
- package/src/Api/Events/DataSetChanged.d.ts +5 -0
- package/src/{PredefinedConfig/DataSourceState.js → Api/Events/DataSetChanged.js} +0 -0
- package/src/Api/Events/RowFormSubmitted.d.ts +19 -0
- package/src/{PredefinedConfig/FilterState.js → Api/Events/RowFormSubmitted.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/FormatColumnApi.d.ts +6 -0
- package/src/Api/GridApi.d.ts +15 -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.d.ts +1 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +7 -2
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +45 -1
- package/src/Api/Implementation/InternalApiImpl.d.ts +7 -2
- package/src/Api/Implementation/InternalApiImpl.js +51 -10
- 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 +5 -2
- package/src/Api/Implementation/SmartEditApiImpl.js +9 -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 +7 -25
- package/src/Api/InternalApi.d.ts +6 -2
- package/src/Api/LayoutApi.d.ts +16 -0
- package/src/Api/PredicateApi.d.ts +7 -0
- package/src/Api/SmartEditApi.d.ts +14 -3
- 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/CalculatedColumnState.d.ts +5 -0
- package/src/PredefinedConfig/Common/AdaptableButton.d.ts +3 -3
- package/src/PredefinedConfig/Common/AdaptableColumn.d.ts +5 -1
- package/src/PredefinedConfig/Common/AdaptableForm.d.ts +3 -2
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +1 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +18 -1
- package/src/PredefinedConfig/Common/BaseContext.d.ts +1 -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 +4 -2
- 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 +23 -1
- 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.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +7 -8
- 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 +24 -13
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +4 -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/Interface/IRowEditService.d.ts +8 -0
- package/src/Utilities/Services/Interface/IRowEditService.js +2 -0
- package/src/Utilities/Services/ModuleService.js +1 -1
- package/src/Utilities/Services/ReportService.js +2 -3
- package/src/Utilities/Services/RowEditService.d.ts +26 -0
- package/src/Utilities/Services/RowEditService.js +197 -0
- 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/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/AlertDisplayWizardSection.js +1 -1
- package/src/View/BulkUpdate/BulkUpdatePopup.js +2 -3
- package/src/View/BulkUpdate/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +2 -3
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +13 -7
- 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/AdaptablePopup/AdaptablePopupDialog.js +2 -0
- 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/Popups/FormPopups/FormPopups.js +2 -2
- 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/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/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/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +5 -7
- package/src/View/FreeTextColumn/Wizard/FreeTextColumnSettingsWizardSection.js +4 -5
- 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 +2 -1
- package/src/View/SmartEdit/SmartEditPopup.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditPopup.js +3 -4
- package/src/View/SmartEdit/SmartEditViewPanel.d.ts +1 -1
- package/src/View/SmartEdit/SmartEditViewPanel.js +3 -4
- 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/agGrid/ActionColumnRenderer.d.ts +6 -1
- package/src/agGrid/ActionColumnRenderer.js +9 -6
- package/src/agGrid/Adaptable.d.ts +7 -2
- package/src/agGrid/Adaptable.js +213 -69
- 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 +5 -0
- package/src/agGrid/rowEditIcons.js +10 -0
- package/src/components/AdaptableFormComponent/AdaptableFormComponent.js +9 -18
- package/src/components/Dashboard/DashboardToolbar.js +2 -2
- package/src/components/Datepicker/index.js +19 -18
- 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.d.ts +2 -0
- package/src/components/WindowModal/WindowModal.js +1 -1
- 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 +226 -69
- package/src/metamodel/adaptable.metamodel.js +532 -311
- package/src/types.d.ts +18 -13
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/AdaptableOptions/FormatColumnOptions.d.ts +0 -9
- package/src/AdaptableOptions/SmartEdit.d.ts +0 -34
- 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/Components/Forms/AdaptableForm.d.ts +0 -6
- package/src/View/Components/Forms/AdaptableForm.js +0 -21
- 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;
|
|
@@ -28,6 +28,7 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
|
|
|
28
28
|
suspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
|
|
29
29
|
unSuspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
|
|
30
30
|
applyFormatColumnDisplayFormats(): void;
|
|
31
|
+
getActiveFormatColumnForColumn(column: AdaptableColumn): FormatColumn | undefined;
|
|
31
32
|
getFormatColumnForColumn(column: AdaptableColumn): FormatColumn | undefined;
|
|
32
33
|
getFormatColumnForColumnId(columnId: string): FormatColumn | undefined;
|
|
33
34
|
getFormatColumnWithStyleForColumn(column: AdaptableColumn): FormatColumn | undefined;
|
|
@@ -106,6 +106,10 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
106
106
|
applyFormatColumnDisplayFormats() {
|
|
107
107
|
throw 'This API method is deprecated - it is not needed anymore.';
|
|
108
108
|
}
|
|
109
|
+
getActiveFormatColumnForColumn(column) {
|
|
110
|
+
const formatColumns = this.getAllActiveFormatColumn();
|
|
111
|
+
return this.getAppropriateFormatColumn(formatColumns, column);
|
|
112
|
+
}
|
|
109
113
|
getFormatColumnForColumn(column) {
|
|
110
114
|
const formatColumns = this.getAllFormatColumn();
|
|
111
115
|
return this.getAppropriateFormatColumn(formatColumns, column);
|
|
@@ -277,8 +281,9 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
277
281
|
return value;
|
|
278
282
|
}
|
|
279
283
|
const adaptableOptions = this.adaptable.adaptableOptions;
|
|
280
|
-
const customFormattersFromOptions = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.
|
|
281
|
-
|
|
284
|
+
const customFormattersFromOptions = (_b = adaptableOptions === null || adaptableOptions === void 0 ? void 0 : adaptableOptions.userInterfaceOptions) === null || _b === void 0 ? void 0 : _b.customDisplayFormatters;
|
|
285
|
+
// formatters are applied in the order they are defined in the options
|
|
286
|
+
const customFormatters = customFormattersFromOptions.filter((customFormatterOption) => columnCustomFormatters.includes(customFormatterOption.id));
|
|
282
287
|
return customFormatters.reduce((acc, formatter) => {
|
|
283
288
|
if (formatter && formatter.handler) {
|
|
284
289
|
return formatter.handler(acc);
|
|
@@ -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;
|
|
@@ -103,6 +103,9 @@ export declare class GridApiImpl extends ApiBase implements GridApi {
|
|
|
103
103
|
refreshRowNode(rowNode: RowNode): void;
|
|
104
104
|
refreshRowNodes(rowNodes: RowNode[]): void;
|
|
105
105
|
areCellsEditable(gridCells: GridCell[]): boolean;
|
|
106
|
+
openEditRowForm(primaryKey: any): void;
|
|
107
|
+
openCreateRowForm(duplicatedRowNodePrimaryKey?: any): void;
|
|
108
|
+
openCloneRowForm(clonedRowNodePrimaryKey?: any): void;
|
|
106
109
|
getRowCount(): number;
|
|
107
110
|
getVisibleRowCount(): number;
|
|
108
111
|
getRowsInViewport(): RowNode[];
|
|
@@ -7,6 +7,7 @@ const GridRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/Grid
|
|
|
7
7
|
const SystemRedux_1 = require("../../Redux/ActionsReducers/SystemRedux");
|
|
8
8
|
const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/ModuleConstants"));
|
|
9
9
|
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
10
|
+
const PopupRedux_1 = require("../../Redux/ActionsReducers/PopupRedux");
|
|
10
11
|
class GridApiImpl extends ApiBase_1.ApiBase {
|
|
11
12
|
getGridState() {
|
|
12
13
|
return this.getAdaptableState().Grid;
|
|
@@ -89,7 +90,7 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
89
90
|
}
|
|
90
91
|
clearGridFiltering() {
|
|
91
92
|
// slightly round the houses but we have to call FilterAPI as it does it properly
|
|
92
|
-
this.adaptable.api.filterApi.
|
|
93
|
+
this.adaptable.api.filterApi.clearColumnFilters();
|
|
93
94
|
}
|
|
94
95
|
getAgGridInstance() {
|
|
95
96
|
return this.adaptable.adaptableOptions.gridOptions;
|
|
@@ -372,6 +373,49 @@ class GridApiImpl extends ApiBase_1.ApiBase {
|
|
|
372
373
|
}
|
|
373
374
|
return true;
|
|
374
375
|
}
|
|
376
|
+
openEditRowForm(primaryKey) {
|
|
377
|
+
const rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(primaryKey);
|
|
378
|
+
if (!rowNode) {
|
|
379
|
+
LoggingHelper_1.LogAdaptableWarning(`Can NOT edit row: rowNode not found for primaryKey ${primaryKey}`);
|
|
380
|
+
}
|
|
381
|
+
const editForm = this.adaptable.api.internalApi
|
|
382
|
+
.getRowEditService()
|
|
383
|
+
.buildRowEditForm(rowNode);
|
|
384
|
+
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
385
|
+
Id: 'edit_row_form',
|
|
386
|
+
Form: editForm,
|
|
387
|
+
// formProps are added to the formContext
|
|
388
|
+
FormProps: {
|
|
389
|
+
rowNode,
|
|
390
|
+
},
|
|
391
|
+
}));
|
|
392
|
+
}
|
|
393
|
+
openCreateRowForm(duplicatedRowNodePrimaryKey) {
|
|
394
|
+
const createForm = this.adaptable.api.internalApi
|
|
395
|
+
.getRowEditService()
|
|
396
|
+
.buildRowCreateForm();
|
|
397
|
+
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
398
|
+
Id: 'create_row_form',
|
|
399
|
+
Form: createForm,
|
|
400
|
+
}));
|
|
401
|
+
}
|
|
402
|
+
openCloneRowForm(clonedRowNodePrimaryKey) {
|
|
403
|
+
const rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(clonedRowNodePrimaryKey);
|
|
404
|
+
if (!rowNode) {
|
|
405
|
+
LoggingHelper_1.LogAdaptableWarning(`Can NOT clone row: rowNode not found for primaryKey ${clonedRowNodePrimaryKey}`);
|
|
406
|
+
}
|
|
407
|
+
const createForm = this.adaptable.api.internalApi
|
|
408
|
+
.getRowEditService()
|
|
409
|
+
.buildRowCreateForm(rowNode);
|
|
410
|
+
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
411
|
+
Id: 'create_row_form',
|
|
412
|
+
Form: createForm,
|
|
413
|
+
// formProps are added to the formContext
|
|
414
|
+
FormProps: {
|
|
415
|
+
clonedRowNode: rowNode,
|
|
416
|
+
},
|
|
417
|
+
}));
|
|
418
|
+
}
|
|
375
419
|
getRowCount() {
|
|
376
420
|
return this.adaptable.getRowCount();
|
|
377
421
|
}
|
|
@@ -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';
|
|
@@ -35,6 +35,8 @@ import { AdaptableFrameworkComponent } from '../../AdaptableOptions/AdaptableFra
|
|
|
35
35
|
import { IMetamodelService } from '../../Utilities/Services/Interface/IMetamodelService';
|
|
36
36
|
import { IModuleCollection } from '../../Strategy/Interface/IModule';
|
|
37
37
|
import { AdaptableObjectTag } from '../../PredefinedConfig/Common/AdaptableObject';
|
|
38
|
+
import { EditLookUpPermittedValues } from '../../../types';
|
|
39
|
+
import { IRowEditService } from '../../Utilities/Services/Interface/IRowEditService';
|
|
38
40
|
export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
39
41
|
getSystemState(): SystemState;
|
|
40
42
|
getAdaptableFormFromAlertForm(alertForm: string | AlertButtonForm, context: any, defaultMessageType?: AdaptableMessageType): (Omit<AdaptableForm<AlertButtonContext>, 'buttons'> & {
|
|
@@ -97,6 +99,7 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
97
99
|
getAlertService(): IAlertService;
|
|
98
100
|
getTeamSharingService(): ITeamSharingService;
|
|
99
101
|
getMetamodelService(): IMetamodelService;
|
|
102
|
+
getRowEditService(): IRowEditService;
|
|
100
103
|
getModules(): IModuleCollection;
|
|
101
104
|
getModuleFriendlyName(adaptableModule: AdaptableModule): string;
|
|
102
105
|
runModuleInAdaptableQL(adaptableQLModule: AdaptableQLModule): boolean;
|
|
@@ -111,10 +114,11 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
111
114
|
getLabelForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
112
115
|
getTooltipForButton(button: AdaptableButton<BaseContext>, context: BaseContext): string | undefined;
|
|
113
116
|
getStyleForButton(button: AdaptableButton<BaseContext>, context: BaseContext): ButtonStyle | undefined;
|
|
117
|
+
getIconForButton(button: AdaptableButton<BaseContext>, context: BaseContext): AdaptableIcon | undefined;
|
|
114
118
|
isDocumentationLinksDisplayed(): boolean;
|
|
115
119
|
getQueryPreviewData(): any;
|
|
120
|
+
getLocalTeamSharingEntities(): SharedEntity[];
|
|
116
121
|
waitForTeamSharingImportEnd(): Promise<boolean>;
|
|
117
|
-
getUserDefinedHeaderName(columnId: string): string;
|
|
118
122
|
createFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
119
123
|
destroyFrameworkComponent(containerDomNode: HTMLElement, frameworkComponent: AdaptableFrameworkComponent, componentType: 'toolPanel' | 'toolbar'): void;
|
|
120
124
|
initializeDataChangeHistory(): void;
|
|
@@ -133,4 +137,5 @@ export declare class InternalApiImpl extends ApiBase implements InternalApi {
|
|
|
133
137
|
showSettingsPanel(module: AdaptableModule, moduleParams?: ModuleParams): void;
|
|
134
138
|
getLabelForTag(adaptableObjectTag: AdaptableObjectTag): string;
|
|
135
139
|
getValueForTag(adaptableObjectTag: AdaptableObjectTag): string | number;
|
|
140
|
+
getEditLookUpValuesForColumn(editLookUpItem: EditLookUpPermittedValues, column: AdaptableColumn, gridCell?: GridCell): any[] | undefined;
|
|
136
141
|
}
|
|
@@ -288,6 +288,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
288
288
|
getMetamodelService() {
|
|
289
289
|
return this.adaptable.MetamodelService;
|
|
290
290
|
}
|
|
291
|
+
getRowEditService() {
|
|
292
|
+
return this.adaptable.RowEditService;
|
|
293
|
+
}
|
|
291
294
|
getModules() {
|
|
292
295
|
return this.adaptable.adaptableModules;
|
|
293
296
|
}
|
|
@@ -357,6 +360,17 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
357
360
|
return button.buttonStyle;
|
|
358
361
|
}
|
|
359
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
|
+
}
|
|
360
374
|
isDocumentationLinksDisplayed() {
|
|
361
375
|
return this.adaptable.adaptableOptions.userInterfaceOptions.showDocumentationLinks;
|
|
362
376
|
}
|
|
@@ -377,6 +391,9 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
377
391
|
});
|
|
378
392
|
return firstRowData;
|
|
379
393
|
}
|
|
394
|
+
getLocalTeamSharingEntities() {
|
|
395
|
+
return this.getAdaptableState().TeamSharing.SharedEntities;
|
|
396
|
+
}
|
|
380
397
|
waitForTeamSharingImportEnd() {
|
|
381
398
|
// we have no deterministic means to ensure the teamsharing import is finished (because the import actions are opaque and may have side-effects)
|
|
382
399
|
// therefore we will listen for state changes and
|
|
@@ -403,9 +420,6 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
403
420
|
});
|
|
404
421
|
});
|
|
405
422
|
}
|
|
406
|
-
getUserDefinedHeaderName(columnId) {
|
|
407
|
-
return this.adaptable.getUserDefinedHeaderName(columnId);
|
|
408
|
-
}
|
|
409
423
|
createFrameworkComponent(containerDomNode, frameworkComponent, componentType) {
|
|
410
424
|
const createComponentFn = () =>
|
|
411
425
|
// delegate the logic to framework wrapper
|
|
@@ -519,10 +533,11 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
519
533
|
}
|
|
520
534
|
if (typeof this.adaptable.adaptableOptions.userInterfaceOptions.objectTags === 'function') {
|
|
521
535
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
522
|
-
return
|
|
523
|
-
.objectTags(
|
|
524
|
-
|
|
525
|
-
|
|
536
|
+
return this.adaptable.adaptableOptions.userInterfaceOptions
|
|
537
|
+
.objectTags({
|
|
538
|
+
adaptableApi: this.adaptable.api,
|
|
539
|
+
})
|
|
540
|
+
.filter((tag) => typeof tag === 'string');
|
|
526
541
|
}
|
|
527
542
|
}
|
|
528
543
|
getLayoutTags() {
|
|
@@ -545,7 +560,7 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
545
560
|
};
|
|
546
561
|
const customGeneratedTags = this.adaptable.adaptableOptions.layoutOptions.layoutTagOptions.autoGenerateTagsForLayouts(autoGenerateTagsForLayoutsContext);
|
|
547
562
|
// sanitize the provided tags, just to be sure that the user does NOT break the UI
|
|
548
|
-
return customGeneratedTags.filter((tag) => typeof tag
|
|
563
|
+
return customGeneratedTags.filter((tag) => typeof tag === 'string');
|
|
549
564
|
}
|
|
550
565
|
}
|
|
551
566
|
// General way to get to store from inside Adaptable...
|
|
@@ -557,10 +572,36 @@ class InternalApiImpl extends ApiBase_1.ApiBase {
|
|
|
557
572
|
this.showModulePopup(module, moduleParams);
|
|
558
573
|
}
|
|
559
574
|
getLabelForTag(adaptableObjectTag) {
|
|
560
|
-
|
|
575
|
+
// not very interesting right now, but useful later when tag is not only a plain string
|
|
576
|
+
return adaptableObjectTag;
|
|
561
577
|
}
|
|
562
578
|
getValueForTag(adaptableObjectTag) {
|
|
563
|
-
|
|
579
|
+
// not very interesting right now, but useful later when tag is not only a plain string
|
|
580
|
+
return adaptableObjectTag;
|
|
581
|
+
}
|
|
582
|
+
getEditLookUpValuesForColumn(editLookUpItem, column, gridCell) {
|
|
583
|
+
if (!editLookUpItem || !column) {
|
|
584
|
+
return undefined;
|
|
585
|
+
}
|
|
586
|
+
let editLookUpValues = editLookUpItem.values;
|
|
587
|
+
// first do the function then get hardcoded items
|
|
588
|
+
if (editLookUpValues != null && typeof editLookUpValues === 'function') {
|
|
589
|
+
const editLookUpContext = {
|
|
590
|
+
adaptableApi: this.adaptable.api,
|
|
591
|
+
column: column,
|
|
592
|
+
gridCell,
|
|
593
|
+
};
|
|
594
|
+
return editLookUpValues(editLookUpContext);
|
|
595
|
+
}
|
|
596
|
+
else {
|
|
597
|
+
let arr = editLookUpValues;
|
|
598
|
+
if (arr && ArrayExtensions_1.default.IsNotNullOrEmpty(arr)) {
|
|
599
|
+
return arr;
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
// if no hard-coded values or function provided then just get the distinct values for the column
|
|
603
|
+
// this will use the columnApi method that first looks for permitted values and then distinct values
|
|
604
|
+
return this.adaptable.api.columnApi.getDistinctDisplayValuesForColumn(column.columnId);
|
|
564
605
|
}
|
|
565
606
|
}
|
|
566
607
|
exports.InternalApiImpl = InternalApiImpl;
|
|
@@ -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,12 +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
|
-
import { SmartEditOperation } from '../../AdaptableOptions/
|
|
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;
|
|
13
|
+
getSmartEditCustomOperations(): SmartEditCustomOperation[] | undefined;
|
|
14
|
+
setCustomSmartEditOperation(customOperationName: string): void;
|
|
12
15
|
}
|
|
@@ -25,5 +25,14 @@ class SmartEditApiImpl extends ApiBase_1.ApiBase {
|
|
|
25
25
|
applySmartEdit(gridCells) {
|
|
26
26
|
this.dispatchAction(SmartEditRedux.SmartEditApply(gridCells));
|
|
27
27
|
}
|
|
28
|
+
getSmartEditCustomOperations() {
|
|
29
|
+
return this.getEditOptions().smartEditCustomOperations;
|
|
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
|
+
}
|
|
28
37
|
}
|
|
29
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
|
}
|