@adaptabletools/adaptable 11.2.4-canary.0 → 12.0.0-canary.0
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 +22 -4
- package/bundle.cjs.js +111 -111
- package/index.css +26 -4
- package/package.json +1 -1
- 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/{MasterDetailAgGridPluginOptions.js → ActionOptions.js} +0 -0
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +5 -0
- package/src/AdaptableOptions/AdaptableOptions.d.ts +3 -3
- 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/{SmartEdit.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 +92 -4
- package/src/AdaptableOptions/EntitlementOptions.d.ts +7 -1
- package/src/AdaptableOptions/ExportOptions.d.ts +5 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -1
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +33 -3
- package/src/AdaptableOptions/GeneralOptions.d.ts +22 -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 +81 -54
- package/src/Api/AdaptableApi.d.ts +6 -3
- package/src/Api/ColumnApi.d.ts +6 -3
- 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 +18 -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/RowFormSubmitted.d.ts +19 -0
- package/src/Api/Events/RowFormSubmitted.js +2 -0
- package/src/Api/Events/SearchChanged.d.ts +3 -4
- package/src/Api/FilterApi.d.ts +1 -77
- package/src/Api/FinanceApi.d.ts +3 -2
- package/src/Api/FormatColumnApi.d.ts +28 -1
- 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 +2 -2
- package/src/Api/Implementation/ColumnApiImpl.js +6 -3
- 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/FilterApiImpl.d.ts +1 -16
- package/src/Api/Implementation/FilterApiImpl.js +5 -164
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +6 -0
- package/src/Api/Implementation/FormatColumnApiImpl.js +34 -0
- package/src/Api/Implementation/GridApiImpl.d.ts +4 -1
- package/src/Api/Implementation/GridApiImpl.js +41 -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 +18 -1
- package/src/Api/Implementation/LayoutApiImpl.js +172 -0
- package/src/Api/Implementation/PredicateApiImpl.js +1 -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 +88 -1
- 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 +6 -3
- package/src/PredefinedConfig/Common/AdaptableObject.d.ts +2 -11
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +35 -2
- 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/FDC3Context.d.ts +5 -1
- 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 +135 -1
- 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/AlertModule.d.ts +11 -0
- package/src/Strategy/AlertModule.js +14 -0
- package/src/Strategy/CellSummaryModule.d.ts +3 -0
- package/src/Strategy/CellSummaryModule.js +28 -14
- 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 +24 -15
- package/src/Strategy/FlashingCellModule.d.ts +1 -1
- package/src/Strategy/FlashingCellModule.js +2 -2
- package/src/Strategy/FormatColumnModule.js +1 -1
- package/src/Strategy/Interface/IModule.d.ts +3 -1
- package/src/Strategy/LayoutModule.js +24 -2
- package/src/Strategy/SmartEditModule.d.ts +1 -1
- package/src/Strategy/SmartEditModule.js +5 -6
- 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 +6 -2
- package/src/Utilities/Constants/GeneralConstants.js +6 -2
- package/src/Utilities/Constants/ModuleConstants.d.ts +1 -1
- package/src/Utilities/Constants/ModuleConstants.js +2 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +22 -13
- package/src/Utilities/Defaults/DefaultSettingsPanel.js +1 -1
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -4
- 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/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 +25 -0
- package/src/Utilities/Services/RowEditService.js +165 -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/BulkUpdateViewPanel.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnExpressionWizardSection.js +1 -1
- package/src/View/CalculatedColumn/Wizard/CalculatedColumnSettingsWizardSection.js +9 -2
- package/src/View/CellSummary/CellSummaryDetails.js +2 -2
- 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 +5 -2
- package/src/View/Components/FilterForm/FilterForm.js +9 -7
- package/src/View/Components/FilterForm/ListBoxFilterForm.d.ts +4 -1
- package/src/View/Components/FilterForm/ListBoxFilterForm.js +7 -7
- package/src/View/Components/FilterForm/QuickFilterForm.d.ts +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +21 -7
- 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/ToolPanel/AdaptableToolPanel.js +3 -2
- package/src/View/Components/ToolPanel/CustomToolPanelContent.js +11 -9
- 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 +6 -5
- package/src/View/Filter/FilterViewPanel.d.ts +4 -4
- package/src/View/Filter/FilterViewPanel.js +11 -14
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.d.ts +3 -2
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +51 -22
- package/src/View/FormatColumn/Wizard/FormatColumnWizard.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 +4 -4
- 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 +217 -87
- package/src/agGrid/FilterWrapper.js +1 -1
- package/src/agGrid/agGridHelper.d.ts +6 -6
- package/src/agGrid/agGridHelper.js +34 -56
- package/src/agGrid/agGridMenuHelper.js +4 -1
- package/src/agGrid/rowEditIcons.d.ts +4 -0
- package/src/agGrid/rowEditIcons.js +9 -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/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 → data-set.d.ts} +0 -0
- package/src/components/icons/{data-source.js → data-set.js} +0 -0
- package/src/components/icons/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +242 -70
- package/src/metamodel/adaptable.metamodel.js +620 -376
- package/src/types.d.ts +19 -15
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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,9 @@
|
|
|
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
6
|
const ApiBase_1 = require("./ApiBase");
|
|
7
|
-
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
8
|
-
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
9
7
|
class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
10
|
-
getFilterState() {
|
|
11
|
-
return this.getAdaptableState().Filter;
|
|
12
|
-
}
|
|
13
8
|
getAllSystemFilterIds() {
|
|
14
9
|
return this.getFilterOptions().systemFilters;
|
|
15
10
|
}
|
|
@@ -30,172 +25,18 @@ class FilterApiImpl extends ApiBase_1.ApiBase {
|
|
|
30
25
|
...this.adaptable.api.predicateApi.getCustomPredicateDefs(),
|
|
31
26
|
].filter((predicateDef) => predicateDef.moduleScope.includes('filter'));
|
|
32
27
|
}
|
|
33
|
-
getAllColumnFilter() {
|
|
34
|
-
return this.getFilterState().ColumnFilters;
|
|
35
|
-
}
|
|
36
|
-
getColumnFilterById(id) {
|
|
37
|
-
var _a;
|
|
38
|
-
return (_a = this.getAllColumnFilter()) === null || _a === void 0 ? void 0 : _a.find((columnFilter) => columnFilter.Uuid === id);
|
|
39
|
-
}
|
|
40
|
-
setColumnFilter(columnFilters) {
|
|
41
|
-
columnFilters.forEach((columnFilter) => {
|
|
42
|
-
if (!columnFilter.Predicate) {
|
|
43
|
-
LoggingHelper_1.LogAdaptableWarning('Column Filter has no Predicate', columnFilter);
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
const isValidPredicate = this.adaptable.api.predicateApi.isValidPredicate(columnFilter.Predicate);
|
|
47
|
-
if (!isValidPredicate) {
|
|
48
|
-
LoggingHelper_1.LogAdaptableWarning('Column Filter Predicate is not valid', columnFilter);
|
|
49
|
-
}
|
|
50
|
-
else {
|
|
51
|
-
this.addUidToAdaptableObject(columnFilter);
|
|
52
|
-
if (this.getAllColumnFilter().find((cf) => cf.ColumnId == columnFilter.ColumnId)) {
|
|
53
|
-
this.dispatchAction(FilterRedux.ColumnFilterSet(columnFilter));
|
|
54
|
-
}
|
|
55
|
-
else {
|
|
56
|
-
this.dispatchAction(FilterRedux.ColumnFilterAdd(columnFilter));
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
return columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.map((columnFilter) => this.getColumnFilterById(columnFilter.Uuid));
|
|
60
|
-
}
|
|
61
|
-
});
|
|
62
|
-
return null;
|
|
63
|
-
}
|
|
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
|
-
clearColumnFilter(columnFilter) {
|
|
76
|
-
this.dispatchAction(FilterRedux.ColumnFilterClear(columnFilter));
|
|
77
|
-
}
|
|
78
|
-
clearColumnFilterByColumns(columns) {
|
|
79
|
-
columns.forEach((c) => {
|
|
80
|
-
this.clearColumnFilterByColumn(c);
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
clearColumnFilterByColumn(column) {
|
|
84
|
-
let columnFiltersForColumn = this.getAllColumnFilterForColumn(column);
|
|
85
|
-
if (columnFiltersForColumn) {
|
|
86
|
-
columnFiltersForColumn.forEach((cf) => {
|
|
87
|
-
this.dispatchAction(FilterRedux.ColumnFilterClear(cf));
|
|
88
|
-
});
|
|
89
|
-
this.adaptable.clearColumnFiltering([column]);
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
clearAllColumnFilter() {
|
|
93
|
-
this.dispatchAction(FilterRedux.ColumnFilterClearAll());
|
|
94
|
-
this.adaptable.clearGridFiltering();
|
|
95
|
-
}
|
|
96
|
-
getAllColumnFilterForColumn(column) {
|
|
97
|
-
let columnFilters = this.getAllColumnFilter();
|
|
98
|
-
if (columnFilters) {
|
|
99
|
-
return columnFilters.filter((cf) => cf.ColumnId == column);
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
return [];
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
createColumnFilterForCell(columnId, primarykeyValues) {
|
|
106
|
-
let cellValues = [];
|
|
107
|
-
let predicateId;
|
|
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
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
primarykeyValues.forEach((pk) => {
|
|
131
|
-
const displayValue = this.adaptable.api.gridApi.getCellDisplayValue(pk, columnId);
|
|
132
|
-
if (displayValue && !cellValues.includes(displayValue)) {
|
|
133
|
-
cellValues.push(displayValue);
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
predicateId = 'Values';
|
|
137
|
-
}
|
|
138
|
-
const filter = {
|
|
139
|
-
ColumnId: columnId,
|
|
140
|
-
Predicate: {
|
|
141
|
-
PredicateId: predicateId,
|
|
142
|
-
Inputs: [...new Set(cellValues)],
|
|
143
|
-
},
|
|
144
|
-
};
|
|
145
|
-
const [savedFilter] = this.setColumnFilter([filter]) || [null];
|
|
146
|
-
return savedFilter;
|
|
147
|
-
}
|
|
148
|
-
columnFilterToString(columnFilter) {
|
|
149
|
-
const friendlyName = this.adaptable.api.columnApi.getFriendlyNameFromColumnId(columnFilter.ColumnId);
|
|
150
|
-
return ('[' +
|
|
151
|
-
friendlyName +
|
|
152
|
-
'] ' +
|
|
153
|
-
this.adaptable.api.predicateApi.predicateToString(columnFilter.Predicate));
|
|
154
|
-
}
|
|
155
|
-
columnFiltersToString(columnFilters) {
|
|
156
|
-
return columnFilters.map((cf) => this.columnFilterToString(cf)).join(', ');
|
|
157
|
-
}
|
|
158
|
-
evaluateColumnFilter(columnFilter, node) {
|
|
159
|
-
var _a, _b;
|
|
160
|
-
if (!columnFilter.Predicate) {
|
|
161
|
-
return true;
|
|
162
|
-
}
|
|
163
|
-
if ((_a = columnFilter.Predicate.Inputs) === null || _a === void 0 ? void 0 : _a.some((input) => StringExtensions_1.default.IsNullOrEmpty(input))) {
|
|
164
|
-
return true;
|
|
165
|
-
}
|
|
166
|
-
const column = this.adaptable.api.columnApi.getColumnFromId(columnFilter.ColumnId);
|
|
167
|
-
if (!column) {
|
|
168
|
-
return true;
|
|
169
|
-
}
|
|
170
|
-
const gridCell = this.adaptable.api.gridApi.getGridCellFromRowNode(node, columnFilter.ColumnId);
|
|
171
|
-
if (!gridCell) {
|
|
172
|
-
return true;
|
|
173
|
-
}
|
|
174
|
-
let value = gridCell.normalisedValue;
|
|
175
|
-
if (((_b = columnFilter.Predicate) === null || _b === void 0 ? void 0 : _b.PredicateId) === 'Contains' && column.dataType === 'Date') {
|
|
176
|
-
// although 'Contains' Predicate is NOT relevant for Date columns, we have to handle the special case of QuickSearching
|
|
177
|
-
// in that case, we have to evaluate the displayedValue of the cell, not the normalisedValue (it's a textual search after all)
|
|
178
|
-
value = gridCell.displayValue;
|
|
179
|
-
}
|
|
180
|
-
return this.adaptable.api.predicateApi.handlePredicate(columnFilter.Predicate, {
|
|
181
|
-
value: value,
|
|
182
|
-
oldValue: null,
|
|
183
|
-
displayValue: gridCell.normalisedValue,
|
|
184
|
-
node,
|
|
185
|
-
column,
|
|
186
|
-
}, true);
|
|
187
|
-
}
|
|
188
28
|
showQuickFilterBar() {
|
|
189
|
-
this.dispatchAction(
|
|
29
|
+
this.dispatchAction(SystemRedux.SystemQuickFilterBarShow());
|
|
190
30
|
}
|
|
191
31
|
hideQuickFilterBar() {
|
|
192
|
-
this.dispatchAction(
|
|
32
|
+
this.dispatchAction(SystemRedux.SystemQuickFilterBarHide());
|
|
193
33
|
}
|
|
194
34
|
isQuickFilterAvailable() {
|
|
195
35
|
return this.adaptable.isQuickFilterAvailable();
|
|
196
36
|
}
|
|
197
37
|
isQuickFilterVisible() {
|
|
198
|
-
return this.isQuickFilterAvailable() &&
|
|
38
|
+
return (this.isQuickFilterAvailable() &&
|
|
39
|
+
this.adaptable.api.internalApi.getSystemState().IsQuickFilterVisible);
|
|
199
40
|
}
|
|
200
41
|
}
|
|
201
42
|
exports.FilterApiImpl = FilterApiImpl;
|
|
@@ -4,6 +4,7 @@ import { FormatColumnApi } from '../FormatColumnApi';
|
|
|
4
4
|
import { FormatColumnState, FormatColumn, ColumnStyle, ColumnComparison } from '../../PredefinedConfig/FormatColumnState';
|
|
5
5
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
6
6
|
import { RowNode } from '@ag-grid-community/all-modules';
|
|
7
|
+
import { AdaptableFormat } from '../../types';
|
|
7
8
|
export declare class FormatColumnApiImpl extends ApiBase implements FormatColumnApi {
|
|
8
9
|
getFormatColumnState(): FormatColumnState;
|
|
9
10
|
getAllFormatColumn(config?: {
|
|
@@ -27,6 +28,7 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
|
|
|
27
28
|
suspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
|
|
28
29
|
unSuspendFormatColumn(formatColumn: FormatColumn): FormatColumn;
|
|
29
30
|
applyFormatColumnDisplayFormats(): void;
|
|
31
|
+
getActiveFormatColumnForColumn(column: AdaptableColumn): FormatColumn | undefined;
|
|
30
32
|
getFormatColumnForColumn(column: AdaptableColumn): FormatColumn | undefined;
|
|
31
33
|
getFormatColumnForColumnId(columnId: string): FormatColumn | undefined;
|
|
32
34
|
getFormatColumnWithStyleForColumn(column: AdaptableColumn): FormatColumn | undefined;
|
|
@@ -44,4 +46,8 @@ export declare class FormatColumnApiImpl extends ApiBase implements FormatColumn
|
|
|
44
46
|
getCheckBoxStyleFormatColumn(column: AdaptableColumn): FormatColumn | undefined;
|
|
45
47
|
isCheckBoxStyleFormatColumn(column: AdaptableColumn): boolean;
|
|
46
48
|
fireCheckboxColumnClickedEvent(columnId: string, rowData: any, primaryKeyValue: any, isChecked: boolean): void;
|
|
49
|
+
private applyCustomFormatters;
|
|
50
|
+
getNumberFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
51
|
+
getStringFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
52
|
+
getDateFormattedValue(value: any, options: AdaptableFormat['Options']): string;
|
|
47
53
|
}
|
|
@@ -8,6 +8,7 @@ const ModuleConstants = tslib_1.__importStar(require("../../Utilities/Constants/
|
|
|
8
8
|
const ArrayExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/ArrayExtensions"));
|
|
9
9
|
const StringExtensions_1 = tslib_1.__importDefault(require("../../Utilities/Extensions/StringExtensions"));
|
|
10
10
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
11
|
+
const FormatHelper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/FormatHelper"));
|
|
11
12
|
class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
12
13
|
getFormatColumnState() {
|
|
13
14
|
return this.getAdaptableState().FormatColumn;
|
|
@@ -105,6 +106,10 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
105
106
|
applyFormatColumnDisplayFormats() {
|
|
106
107
|
throw 'This API method is deprecated - it is not needed anymore.';
|
|
107
108
|
}
|
|
109
|
+
getActiveFormatColumnForColumn(column) {
|
|
110
|
+
const formatColumns = this.getAllActiveFormatColumn();
|
|
111
|
+
return this.getAppropriateFormatColumn(formatColumns, column);
|
|
112
|
+
}
|
|
108
113
|
getFormatColumnForColumn(column) {
|
|
109
114
|
const formatColumns = this.getAllFormatColumn();
|
|
110
115
|
return this.getAppropriateFormatColumn(formatColumns, column);
|
|
@@ -269,5 +274,34 @@ class FormatColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
269
274
|
};
|
|
270
275
|
this.adaptable.api.eventApi.emit('CheckboxColumnClicked', checkboxColumnClickedInfo);
|
|
271
276
|
}
|
|
277
|
+
applyCustomFormatters(value, options) {
|
|
278
|
+
var _a, _b;
|
|
279
|
+
const columnCustomFormatters = (_a = options === null || options === void 0 ? void 0 : options.CustomDisplayFormats) !== null && _a !== void 0 ? _a : [];
|
|
280
|
+
if (!(columnCustomFormatters === null || columnCustomFormatters === void 0 ? void 0 : columnCustomFormatters.length)) {
|
|
281
|
+
return value;
|
|
282
|
+
}
|
|
283
|
+
const adaptableOptions = this.adaptable.adaptableOptions;
|
|
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));
|
|
287
|
+
return customFormatters.reduce((acc, formatter) => {
|
|
288
|
+
if (formatter && formatter.handler) {
|
|
289
|
+
return formatter.handler(acc);
|
|
290
|
+
}
|
|
291
|
+
return acc;
|
|
292
|
+
}, value);
|
|
293
|
+
}
|
|
294
|
+
getNumberFormattedValue(value, options) {
|
|
295
|
+
let preparedValue = this.applyCustomFormatters(value, options);
|
|
296
|
+
return FormatHelper_1.default.NumberFormatter(preparedValue, options);
|
|
297
|
+
}
|
|
298
|
+
getStringFormattedValue(value, options) {
|
|
299
|
+
let preparedValue = this.applyCustomFormatters(value, options);
|
|
300
|
+
return FormatHelper_1.default.StringFormatter(preparedValue, options);
|
|
301
|
+
}
|
|
302
|
+
getDateFormattedValue(value, options) {
|
|
303
|
+
let preparedValue = this.applyCustomFormatters(value, options);
|
|
304
|
+
return FormatHelper_1.default.DateFormatter(preparedValue, options);
|
|
305
|
+
}
|
|
272
306
|
}
|
|
273
307
|
exports.FormatColumnApiImpl = FormatColumnApiImpl;
|
|
@@ -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.
|
|
93
|
+
this.adaptable.api.layoutApi.clearAllColumnFilter();
|
|
93
94
|
}
|
|
94
95
|
getAgGridInstance() {
|
|
95
96
|
return this.adaptable.adaptableOptions.gridOptions;
|
|
@@ -372,6 +373,45 @@ 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.getRowEditService().buildRowEditForm(rowNode);
|
|
382
|
+
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
383
|
+
Id: 'edit_row_form',
|
|
384
|
+
Form: editForm,
|
|
385
|
+
// formProps are added to the formContext
|
|
386
|
+
FormProps: {
|
|
387
|
+
rowNode,
|
|
388
|
+
},
|
|
389
|
+
}));
|
|
390
|
+
}
|
|
391
|
+
openCreateRowForm(duplicatedRowNodePrimaryKey) {
|
|
392
|
+
const createForm = this.adaptable.api.internalApi.getRowEditService().buildRowCreateForm();
|
|
393
|
+
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
394
|
+
Id: 'create_row_form',
|
|
395
|
+
Form: createForm,
|
|
396
|
+
}));
|
|
397
|
+
}
|
|
398
|
+
openCloneRowForm(clonedRowNodePrimaryKey) {
|
|
399
|
+
const rowNode = this.adaptable.api.gridApi.getRowNodeForPrimaryKey(clonedRowNodePrimaryKey);
|
|
400
|
+
if (!rowNode) {
|
|
401
|
+
LoggingHelper_1.LogAdaptableWarning(`Can NOT clone row: rowNode not found for primaryKey ${clonedRowNodePrimaryKey}`);
|
|
402
|
+
}
|
|
403
|
+
const createForm = this.adaptable.api.internalApi
|
|
404
|
+
.getRowEditService()
|
|
405
|
+
.buildRowCreateForm(rowNode);
|
|
406
|
+
this.dispatchAction(PopupRedux_1.PopupShowForm({
|
|
407
|
+
Id: 'create_row_form',
|
|
408
|
+
Form: createForm,
|
|
409
|
+
// formProps are added to the formContext
|
|
410
|
+
FormProps: {
|
|
411
|
+
clonedRowNode: rowNode,
|
|
412
|
+
},
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
375
415
|
getRowCount() {
|
|
376
416
|
return this.adaptable.getRowCount();
|
|
377
417
|
}
|
|
@@ -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;
|
|
@@ -3,7 +3,8 @@ import { LayoutApi } from '../LayoutApi';
|
|
|
3
3
|
import { LayoutState, Layout } from '../../PredefinedConfig/LayoutState';
|
|
4
4
|
import { AdaptableColumn } from '../../PredefinedConfig/Common/AdaptableColumn';
|
|
5
5
|
import { ColumnSort } from '../../PredefinedConfig/Common/ColumnSort';
|
|
6
|
-
import { LayoutAssociatedObject } from '../../types';
|
|
6
|
+
import { ColumnFilter, LayoutAssociatedObject } from '../../types';
|
|
7
|
+
import { RowNode } from '@ag-grid-community/all-modules';
|
|
7
8
|
export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
8
9
|
getLayoutState(): LayoutState;
|
|
9
10
|
shouldAutoSaveLayout: (layout?: Layout) => boolean;
|
|
@@ -42,4 +43,20 @@ export declare class LayoutApiImpl extends ApiBase implements LayoutApi {
|
|
|
42
43
|
isCurrentLayoutDefault(): boolean;
|
|
43
44
|
areExpandedRowGroupsSavedInLayouts(): boolean;
|
|
44
45
|
isObjectAvailableInCurrentLayout(adaptableObject: LayoutAssociatedObject): boolean;
|
|
46
|
+
getAllColumnFilter(): ColumnFilter[];
|
|
47
|
+
getColumnFilterById(id: ColumnFilter['Uuid']): ColumnFilter;
|
|
48
|
+
setColumnFilter(columnFilters: ColumnFilter[]): ColumnFilter[] | null;
|
|
49
|
+
clearColumnFilter(columnFilter: ColumnFilter): void;
|
|
50
|
+
clearColumnFilterByColumns(columns: string[]): void;
|
|
51
|
+
clearColumnFilterByColumn(column: string): void;
|
|
52
|
+
clearAllColumnFilter(): void;
|
|
53
|
+
clearAndSetColumnFilter(columnFilters: ColumnFilter[]): void;
|
|
54
|
+
getAllColumnFilterForColumn(column: string): ColumnFilter[];
|
|
55
|
+
createColumnFilterForCell(columnId: string, primarykeyValues: any[]): ColumnFilter | null;
|
|
56
|
+
columnFilterToString(columnFilter: ColumnFilter): string;
|
|
57
|
+
columnFiltersToString(columnFilters: ColumnFilter[]): string;
|
|
58
|
+
evaluateColumnFilter(columnFilter: ColumnFilter, node: RowNode): boolean;
|
|
59
|
+
removeColumnFromCurrentLayout(columnId: string): void;
|
|
60
|
+
removeColumnFromAllLayouts(columnId: string): void;
|
|
61
|
+
removeColumnFromLayout(columnId: string, layoutName: string): void;
|
|
45
62
|
}
|