@adaptabletools/adaptable 12.0.0-canary.4 → 12.0.0-canary.7
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/bundle.cjs.js +133 -130
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableOptions/AdaptableFrameworkComponent.d.ts +3 -0
- package/src/AdaptableOptions/ColumnOptions.d.ts +4 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +2 -0
- package/src/AdaptableOptions/EditOptions.d.ts +6 -0
- package/src/AdaptableOptions/FinancePluginOptions.d.ts +1 -1
- package/src/AdaptableOptions/LayoutOptions.d.ts +11 -6
- package/src/AdaptableOptions/SettingsPanelOptions.d.ts +2 -0
- package/src/AdaptableOptions/StateOptions.d.ts +10 -0
- package/src/Api/Events/ActionRowSubmitted.d.ts +24 -0
- package/src/Api/FilterApi.d.ts +7 -0
- package/src/Api/Implementation/AlertApiImpl.d.ts +2 -4
- package/src/Api/Implementation/AlertApiImpl.js +2 -3
- package/src/Api/Implementation/ApiBase.d.ts +12 -1
- package/src/Api/Implementation/ApiBase.js +7 -0
- package/src/Api/Implementation/ConditionalStyleApiImpl.d.ts +2 -4
- package/src/Api/Implementation/ConditionalStyleApiImpl.js +2 -3
- package/src/Api/Implementation/CustomSortApiImpl.d.ts +2 -4
- package/src/Api/Implementation/CustomSortApiImpl.js +2 -3
- package/src/Api/Implementation/FilterApiImpl.d.ts +8 -0
- package/src/Api/Implementation/FilterApiImpl.js +25 -0
- package/src/Api/Implementation/FlashingCellApiImpl.d.ts +2 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +2 -3
- package/src/Api/Implementation/FormatColumnApiImpl.d.ts +2 -4
- package/src/Api/Implementation/FormatColumnApiImpl.js +2 -3
- package/src/Api/Implementation/InternalApiImpl.d.ts +1 -1
- package/src/Api/Implementation/InternalApiImpl.js +5 -4
- package/src/Api/Implementation/LayoutApiImpl.d.ts +0 -2
- package/src/Api/Implementation/LayoutApiImpl.js +0 -6
- package/src/Api/Implementation/PlusMinusApiImpl.d.ts +2 -4
- package/src/Api/Implementation/PlusMinusApiImpl.js +2 -3
- package/src/Api/Implementation/PredicateApiImpl.d.ts +1 -0
- package/src/Api/Implementation/PredicateApiImpl.js +3 -0
- package/src/Api/Implementation/ScheduleApiImpl.d.ts +6 -16
- package/src/Api/Implementation/ScheduleApiImpl.js +10 -16
- package/src/Api/Implementation/ShortcutApiImpl.d.ts +2 -4
- package/src/Api/Implementation/ShortcutApiImpl.js +2 -3
- package/src/Api/Implementation/SmartEditApiImpl.d.ts +1 -1
- package/src/Api/Implementation/SmartEditApiImpl.js +2 -1
- package/src/Api/Implementation/TeamSharingApiImpl.d.ts +4 -0
- package/src/Api/Implementation/TeamSharingApiImpl.js +12 -0
- package/src/Api/InternalApi.d.ts +1 -1
- package/src/Api/LayoutApi.d.ts +1 -6
- package/src/Api/PredicateApi.d.ts +6 -0
- package/src/Api/SmartEditApi.d.ts +1 -1
- package/src/Api/TeamSharingApi.d.ts +15 -0
- package/src/PredefinedConfig/Common/AdaptablePredicate.js +5 -5
- package/src/Redux/Store/AdaptableStore.js +3 -0
- package/src/Strategy/Interface/IModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.d.ts +2 -1
- package/src/Strategy/LayoutModule.js +51 -1
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +8 -0
- package/src/Utilities/Extensions/TypeExtensions.d.ts +30 -0
- package/src/Utilities/Helpers/AdaptableHelper.d.ts +1 -3
- package/src/Utilities/Helpers/AdaptableHelper.js +2 -13
- package/src/Utilities/Helpers/DateHelper.d.ts +27 -0
- package/src/Utilities/Helpers/DateHelper.js +33 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -0
- package/src/Utilities/Services/MetamodelService.d.ts +7 -1
- package/src/Utilities/Services/MetamodelService.js +82 -6
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +10 -8
- package/src/View/Components/AdaptableDateInput/index.js +1 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +1 -1
- package/src/View/GridInfo/GridInfoPopup.js +3 -1
- package/src/View/StatusBar/StatusBarPopup.js +1 -1
- package/src/agGrid/Adaptable.js +7 -4
- package/src/components/Dashboard/Dashboard.js +2 -1
- package/src/metamodel/adaptable-metamodel-model.d.ts +1 -1
- package/src/metamodel/adaptable.metamodel.d.ts +91 -13
- package/src/metamodel/adaptable.metamodel.js +1 -12981
- package/src/types.d.ts +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseDateValue = exports.parseToISO = exports.dateToISO = exports.isValueValidDate = exports.isValidDate = void 0;
|
|
3
|
+
exports.parseFilterValueDate = exports.parseFilterInputDate = exports.utcDateToSameDateInLocale = exports.parseDateValue = exports.parseToISO = exports.dateToISO = exports.isValueValidDate = exports.isValidDate = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const parseISO_1 = tslib_1.__importDefault(require("date-fns/parseISO"));
|
|
6
6
|
const parse_1 = tslib_1.__importDefault(require("date-fns/parse"));
|
|
@@ -63,3 +63,35 @@ const parseDateValue = (dateValue, dateFormat) => {
|
|
|
63
63
|
return dateInstance;
|
|
64
64
|
};
|
|
65
65
|
exports.parseDateValue = parseDateValue;
|
|
66
|
+
/**
|
|
67
|
+
* Creates a date with the same day/month/year/hour with the current timezone.
|
|
68
|
+
* '2022-06-01T17:00:00.000Z' => '2022-06-01T17:00:00.000+03:00' // RO time
|
|
69
|
+
*
|
|
70
|
+
* new Date() always creates the date using the current timezone.
|
|
71
|
+
* To compare two dates, they need to be in the same timezone.
|
|
72
|
+
*
|
|
73
|
+
* @param date Date
|
|
74
|
+
*/
|
|
75
|
+
const utcDateToSameDateInLocale = (date) => {
|
|
76
|
+
return new Date(date.getTime() + date.getTimezoneOffset() * 60 * 1000);
|
|
77
|
+
};
|
|
78
|
+
exports.utcDateToSameDateInLocale = utcDateToSameDateInLocale;
|
|
79
|
+
/**
|
|
80
|
+
* To make sure selected/input date is correct and in the current time-zone.
|
|
81
|
+
|
|
82
|
+
*
|
|
83
|
+
* '2022-06-14' is considered to be '2022-06-13 00:00:00.
|
|
84
|
+
* And when date object is created it uses the current timezone.
|
|
85
|
+
*
|
|
86
|
+
* '2022-06-14' => Mon Jun 13 2022 20:00:00 GMT-0400 (Eastern Daylight Time)
|
|
87
|
+
*
|
|
88
|
+
* @param stringDate date string
|
|
89
|
+
*/
|
|
90
|
+
const parseFilterInputDate = (stringDate) => exports.utcDateToSameDateInLocale(new Date(stringDate));
|
|
91
|
+
exports.parseFilterInputDate = parseFilterInputDate;
|
|
92
|
+
/**
|
|
93
|
+
* Used to parse the date from rowDate inside date predicates.
|
|
94
|
+
* The date is parsed in moved to local timezone.
|
|
95
|
+
*/
|
|
96
|
+
const parseFilterValueDate = (value) => exports.utcDateToSameDateInLocale(exports.parseDateValue(value));
|
|
97
|
+
exports.parseFilterValueDate = parseFilterValueDate;
|
|
@@ -5,7 +5,13 @@ export declare class MetamodelService implements IMetamodelService {
|
|
|
5
5
|
private gridInfoOptions;
|
|
6
6
|
constructor(adaptableApi: AdaptableApi);
|
|
7
7
|
getGridInfoOptions(): GridInfoOptions;
|
|
8
|
+
validateAdaptableOptionsValues(): void;
|
|
9
|
+
private validateOptionsObject;
|
|
10
|
+
private getExpectedOptionsValueType;
|
|
8
11
|
private buildGridInfoOptions;
|
|
9
12
|
private mapGridInfoContainerItems;
|
|
10
|
-
|
|
13
|
+
private getAdaptableOptionsDefaultValues;
|
|
14
|
+
private getAdaptableMetamodel;
|
|
15
|
+
private getAdaptableOptionsMetamodel;
|
|
16
|
+
private getAdaptableOptions;
|
|
11
17
|
}
|
|
@@ -3,6 +3,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.MetamodelService = void 0;
|
|
4
4
|
const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
|
|
5
5
|
const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
|
|
6
|
+
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
7
|
+
const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
|
|
8
|
+
const supportedMetamodelTypes = [
|
|
9
|
+
'string',
|
|
10
|
+
'number',
|
|
11
|
+
'boolean',
|
|
12
|
+
'array',
|
|
13
|
+
'function',
|
|
14
|
+
'REFERENCE',
|
|
15
|
+
];
|
|
6
16
|
class MetamodelService {
|
|
7
17
|
constructor(adaptableApi) {
|
|
8
18
|
this.adaptableApi = adaptableApi;
|
|
@@ -13,17 +23,72 @@ class MetamodelService {
|
|
|
13
23
|
getGridInfoOptions() {
|
|
14
24
|
return this.gridInfoOptions;
|
|
15
25
|
}
|
|
26
|
+
validateAdaptableOptionsValues() {
|
|
27
|
+
var _a;
|
|
28
|
+
LoggingHelper_1.LogAdaptableInfo('Validating Adaptable Options...');
|
|
29
|
+
const adaptableOptionsValues = this.getAdaptableOptions();
|
|
30
|
+
const adaptableOptionsMetamodel = this.getAdaptableOptionsMetamodel();
|
|
31
|
+
const adaptableOptionsDefaultValues = this.getAdaptableOptionsDefaultValues();
|
|
32
|
+
if ((_a = adaptableOptionsValues.adaptableId) === null || _a === void 0 ? void 0 : _a.includes('.')) {
|
|
33
|
+
LoggingHelper_1.ConsoleLogWarning("The 'AdaptableOptions.adaptableId' property should NOT include a '.' character. We strongly recommend to remove it to avoid unexpected AdapTable behavior.");
|
|
34
|
+
}
|
|
35
|
+
const validationErrors = [];
|
|
36
|
+
this.validateOptionsObject(validationErrors, 'AdaptableOptions', adaptableOptionsValues, adaptableOptionsMetamodel, adaptableOptionsDefaultValues);
|
|
37
|
+
if (validationErrors.length) {
|
|
38
|
+
LoggingHelper_1.LogAdaptableWarning([
|
|
39
|
+
'AdaptableOptions validation errors:',
|
|
40
|
+
'\n',
|
|
41
|
+
...validationErrors,
|
|
42
|
+
'\n',
|
|
43
|
+
`See AdaptableOptions documentation at ${DocumentationLinkConstants_1.AdaptableOptionsDocsLink} for details`,
|
|
44
|
+
].join('\n'));
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
validateOptionsObject(validationErrors, optionsObjectName, optionsObject, optionsObjectMetamodel, optionsObjectDefaultValues) {
|
|
48
|
+
Object.entries(optionsObject).forEach(([optionKey, optionValue]) => {
|
|
49
|
+
const optionMetamodel = optionsObjectMetamodel.properties.find((metamodelProperty) => metamodelProperty.name === optionKey);
|
|
50
|
+
if (!optionMetamodel) {
|
|
51
|
+
validationErrors.push(`${optionsObjectName}.${optionKey} (value=${optionValue}) :: unknown/unsupported property, will be ignored`);
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
// let's try to validate the type of the provided value
|
|
55
|
+
const expectedOptionsValueType = this.getExpectedOptionsValueType(optionMetamodel);
|
|
56
|
+
const providedOptionsValueType = Array.isArray(optionValue) ? 'array' : typeof optionValue;
|
|
57
|
+
if (!expectedOptionsValueType) {
|
|
58
|
+
return;
|
|
59
|
+
}
|
|
60
|
+
// if it's a REFERENCE, we try to go (recursively) deeper
|
|
61
|
+
if (expectedOptionsValueType === 'REFERENCE') {
|
|
62
|
+
const referenceObjectName = optionMetamodel.reference;
|
|
63
|
+
const referenceObject = optionsObject[optionKey];
|
|
64
|
+
const referenceObjectMetamodel = this.getAdaptableMetamodel()[referenceObjectName];
|
|
65
|
+
if (referenceObject && (referenceObjectMetamodel === null || referenceObjectMetamodel === void 0 ? void 0 : referenceObjectMetamodel.kind) === 'Interface') {
|
|
66
|
+
this.validateOptionsObject(validationErrors, referenceObjectName, referenceObject, referenceObjectMetamodel, optionsObjectDefaultValues === null || optionsObjectDefaultValues === void 0 ? void 0 : optionsObjectDefaultValues[optionKey]);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
else if (supportedMetamodelTypes.includes(providedOptionsValueType) &&
|
|
70
|
+
providedOptionsValueType !== expectedOptionsValueType) {
|
|
71
|
+
validationErrors.push(`${optionsObjectName}.${optionKey} (value=${optionValue}) :: wrong type (${providedOptionsValueType}), expected ${expectedOptionsValueType}`);
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
getExpectedOptionsValueType(metamodelProperty) {
|
|
76
|
+
const metamodelPropertyKind = metamodelProperty.kind;
|
|
77
|
+
if (supportedMetamodelTypes.includes(metamodelPropertyKind)) {
|
|
78
|
+
return metamodelPropertyKind;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
16
81
|
buildGridInfoOptions() {
|
|
17
82
|
const gridInfoOptions = new Map();
|
|
18
|
-
const adaptableMetamodel =
|
|
19
|
-
const adaptableOptionsMetamodel =
|
|
20
|
-
const adaptableOptionsValues = this.
|
|
21
|
-
const adaptableOptionsDefaultValues =
|
|
83
|
+
const adaptableMetamodel = this.getAdaptableMetamodel();
|
|
84
|
+
const adaptableOptionsMetamodel = this.getAdaptableOptionsMetamodel();
|
|
85
|
+
const adaptableOptionsValues = this.getAdaptableOptions();
|
|
86
|
+
const adaptableOptionsDefaultValues = this.getAdaptableOptionsDefaultValues();
|
|
22
87
|
if (!adaptableOptionsMetamodel) {
|
|
23
88
|
// should never happen
|
|
24
89
|
return gridInfoOptions;
|
|
25
90
|
}
|
|
26
|
-
// root-level properties are grouped in a
|
|
91
|
+
// root-level properties are grouped in a synthetic 'Base Options' container
|
|
27
92
|
const baseOptionsItems = this.mapGridInfoContainerItems(adaptableOptionsMetamodel, adaptableOptionsValues, adaptableOptionsDefaultValues);
|
|
28
93
|
gridInfoOptions.set('baseOptions', {
|
|
29
94
|
containerLabel: 'Base Options',
|
|
@@ -65,6 +130,17 @@ class MetamodelService {
|
|
|
65
130
|
};
|
|
66
131
|
});
|
|
67
132
|
}
|
|
68
|
-
|
|
133
|
+
getAdaptableOptionsDefaultValues() {
|
|
134
|
+
return DefaultAdaptableOptions_1.DefaultAdaptableOptions;
|
|
135
|
+
}
|
|
136
|
+
getAdaptableMetamodel() {
|
|
137
|
+
return adaptable_metamodel_1.ADAPTABLE_METAMODEL;
|
|
138
|
+
}
|
|
139
|
+
getAdaptableOptionsMetamodel() {
|
|
140
|
+
return this.getAdaptableMetamodel()['AdaptableOptions'];
|
|
141
|
+
}
|
|
142
|
+
getAdaptableOptions() {
|
|
143
|
+
return this.adaptableApi.internalApi.getAdaptableOptions();
|
|
144
|
+
}
|
|
69
145
|
}
|
|
70
146
|
exports.MetamodelService = MetamodelService;
|
|
@@ -21,14 +21,16 @@ const ConfigurationWizard = (props) => {
|
|
|
21
21
|
const handleFinish = () => {
|
|
22
22
|
const newAdaptableOptions = Object.assign({}, adaptableOptions);
|
|
23
23
|
newAdaptableOptions.gridOptions = Object.assign({}, adaptableOptions.gridOptions);
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
24
|
+
if (columnsHandle.current) {
|
|
25
|
+
newAdaptableOptions.gridOptions.columnDefs = columnsHandle
|
|
26
|
+
.current.getColumns()
|
|
27
|
+
.map((column) => {
|
|
28
|
+
const newColumn = Object.assign(Object.assign({}, column), { headerName: column.caption || StringExtensions_1.default.Humanize(column.field) });
|
|
29
|
+
delete newColumn.caption;
|
|
30
|
+
return newColumn;
|
|
31
|
+
});
|
|
32
|
+
newAdaptableOptions.primaryKey = columnsHandle.current.getPrimaryKey();
|
|
33
|
+
}
|
|
32
34
|
setAdaptableOptions(newAdaptableOptions);
|
|
33
35
|
props.onFinish(newAdaptableOptions);
|
|
34
36
|
};
|
|
@@ -21,7 +21,7 @@ const AdaptableDateInput = React.forwardRef((props, ref) => {
|
|
|
21
21
|
});
|
|
22
22
|
},
|
|
23
23
|
});
|
|
24
|
-
const dateValue =
|
|
24
|
+
const dateValue = DateHelper_1.parseFilterInputDate(value);
|
|
25
25
|
const datepickerProps = Object.assign({
|
|
26
26
|
// this is OK as long as we do not support range datepicker
|
|
27
27
|
value: dateValue, onChange: (dateValue) => { var _a;
|
|
@@ -325,7 +325,7 @@ class QuickFilterFormComponent extends React.Component {
|
|
|
325
325
|
this.props.api.filterApi.clearColumnFilterByColumn(filter.ColumnId);
|
|
326
326
|
}
|
|
327
327
|
hasValuesPredicate(predicate) {
|
|
328
|
-
return
|
|
328
|
+
return this.props.api.predicateApi.hasPredicateValues(predicate);
|
|
329
329
|
}
|
|
330
330
|
}
|
|
331
331
|
function mapStateToProps(state, ownProps) {
|
|
@@ -52,7 +52,9 @@ const GridInfoPopup = (props) => {
|
|
|
52
52
|
const calcColumns = props.api.calculatedColumnApi
|
|
53
53
|
.getAllCalculatedColumn()
|
|
54
54
|
.map((c) => c.ColumnId);
|
|
55
|
-
const actionColumns = props.api.actionApi
|
|
55
|
+
const actionColumns = props.api.actionApi
|
|
56
|
+
.getAllActionColumn()
|
|
57
|
+
.map((ac) => ac.columnId);
|
|
56
58
|
const freeTextColumns = props.api.freeTextColumnApi
|
|
57
59
|
.getAllFreeTextColumn()
|
|
58
60
|
.map((c) => c.ColumnId);
|
|
@@ -39,6 +39,6 @@ const StatusBarPopup = (props) => {
|
|
|
39
39
|
dragAndDropTab: false,
|
|
40
40
|
deleteTab: false,
|
|
41
41
|
editTabName: false,
|
|
42
|
-
}, onTabsChange: handleTabChange, disabled: disabled, tabs: tabs, availableItems: availableItems, tabsTitle: 'Status Bar Panels', unusedPanelTitle: "Available Status Panels", dragItemText: "Drag into a Status Bar Panel below" })) : (React.createElement(EmptyContent_1.default, null, "To enable this feature add to Grid Options statusPanels the Adaptable Status Panel."))));
|
|
42
|
+
}, onTabsChange: handleTabChange, disabled: disabled, tabs: tabs, availableItems: availableItems, tabsTitle: 'AdapTable Status Bar Panels', unusedPanelTitle: "Available Module Status Panels", dragItemText: "Drag into a Status Bar Panel below" })) : (React.createElement(EmptyContent_1.default, null, "To enable this feature add to Grid Options statusPanels the Adaptable Status Panel."))));
|
|
43
43
|
};
|
|
44
44
|
exports.StatusBarPopup = StatusBarPopup;
|
package/src/agGrid/Adaptable.js
CHANGED
|
@@ -345,7 +345,7 @@ class Adaptable {
|
|
|
345
345
|
}
|
|
346
346
|
this.emitter = new Emitter_1.default();
|
|
347
347
|
// we create AdaptableOptions by merging the values provided by the user with the defaults (where no value has been set)
|
|
348
|
-
this.adaptableOptions = AdaptableHelper_1.default.
|
|
348
|
+
this.adaptableOptions = AdaptableHelper_1.default.assignAdaptableOptions(adaptableOptions);
|
|
349
349
|
if (this.hasAutogeneratedPrimaryKey()) {
|
|
350
350
|
LoggingHelper_1.LogAdaptableWarning(`Autogenerated primary key (adaptableOptions.autogeneratedPrimaryKey = TRUE) should be used only as a last resort,
|
|
351
351
|
when no unique column is available, as it limits some Adaptable functionalities!
|
|
@@ -354,7 +354,6 @@ class Adaptable {
|
|
|
354
354
|
this.adaptableOptions.primaryKey = GeneralConstants_1.AUTOGENERATED_PK_COLUMN;
|
|
355
355
|
}
|
|
356
356
|
Adaptable.collectInstance(this);
|
|
357
|
-
AdaptableHelper_1.default.checkAdaptableOptions(this.adaptableOptions);
|
|
358
357
|
this.runtimeConfig = runtimeConfig || {};
|
|
359
358
|
this.agGridModules = this.runtimeConfig.modules || [];
|
|
360
359
|
this.gridOptions = this.adaptableOptions.gridOptions;
|
|
@@ -420,6 +419,8 @@ class Adaptable {
|
|
|
420
419
|
if (this.gridOptions.columnTypes.abColDefDate.cellEditor === undefined) {
|
|
421
420
|
this.gridOptions.columnTypes.abColDefDate.cellEditor = AdaptableDateEditor_1.AdaptableDateEditor;
|
|
422
421
|
}
|
|
422
|
+
// validate the provided AdaptableOptions
|
|
423
|
+
this.MetamodelService.validateAdaptableOptionsValues();
|
|
423
424
|
return this.initializeAgGrid().then((initialized) => {
|
|
424
425
|
if (!initialized) {
|
|
425
426
|
// we have no grid, we can't do anything
|
|
@@ -2934,12 +2935,14 @@ class Adaptable {
|
|
|
2934
2935
|
this.prepareGrid();
|
|
2935
2936
|
}
|
|
2936
2937
|
updateColumnFilterActiveState() {
|
|
2938
|
+
var _a;
|
|
2937
2939
|
const columnFilters = this.api.filterApi.getColumnFilters();
|
|
2938
|
-
const
|
|
2940
|
+
const activeFilters = (_a = columnFilters === null || columnFilters === void 0 ? void 0 : columnFilters.filter) === null || _a === void 0 ? void 0 : _a.call(columnFilters, (columnFilter) => this.api.filterApi.isFilterActive(columnFilter));
|
|
2941
|
+
const isFilterActive = ArrayExtensions_1.ArrayExtensions.IsNotNullOrEmpty(activeFilters);
|
|
2939
2942
|
const columnsWithActiveFilters = {};
|
|
2940
2943
|
if (isFilterActive) {
|
|
2941
2944
|
// used in particular at init time to show the filter icon correctly
|
|
2942
|
-
for (const colFilter of
|
|
2945
|
+
for (const colFilter of activeFilters) {
|
|
2943
2946
|
const agGridCol = this.gridOptions.columnApi.getColumn(colFilter.ColumnId);
|
|
2944
2947
|
if (agGridCol) {
|
|
2945
2948
|
columnsWithActiveFilters[agGridCol.getColId()] = true;
|
|
@@ -43,7 +43,7 @@ function Dashboard(props) {
|
|
|
43
43
|
} }, child.props.title)))));
|
|
44
44
|
const renderTabsDropdown = () => {
|
|
45
45
|
var _a, _b, _c;
|
|
46
|
-
if (children && children.length
|
|
46
|
+
if (children && children.length < 2) {
|
|
47
47
|
return null;
|
|
48
48
|
}
|
|
49
49
|
const activeTabTitle = (_c = (_b = (_a = children === null || children === void 0 ? void 0 : children[activeTabIndex]) === null || _a === void 0 ? void 0 : _a.props) === null || _b === void 0 ? void 0 : _b.title) !== null && _c !== void 0 ? _c : 'Select Toolbar';
|
|
@@ -72,6 +72,7 @@ function Dashboard(props) {
|
|
|
72
72
|
const renderHomeToolbar = () => (React.createElement(DashboardToolbar_1.DashboardToolbar, { onConfigure: onShowDashboardPopup, className: "ab-Dashboard__home-toolbar", title: title, tooltip: `Configure Dashboard`, showConfigure: true, showClose: false, accessLevel: 'Full' },
|
|
73
73
|
left,
|
|
74
74
|
right,
|
|
75
|
+
children && children.length > 1,
|
|
75
76
|
renderTabsDropdown()));
|
|
76
77
|
return (React.createElement("div", {
|
|
77
78
|
// @ts-ignore
|
|
@@ -16,4 +16,4 @@ export interface MetamodelItemProperty {
|
|
|
16
16
|
gridInfo?: 'item' | 'container';
|
|
17
17
|
noCode?: 'item' | 'container';
|
|
18
18
|
}
|
|
19
|
-
export declare type MetamodelItemPropertyKind = 'REFERENCE' | 'number' | 'string' | 'boolean' | 'date' | 'function' | 'indexType' | 'unknown';
|
|
19
|
+
export declare type MetamodelItemPropertyKind = 'REFERENCE' | 'number' | 'string' | 'boolean' | 'date' | 'function' | 'array' | 'indexType' | 'unknown';
|
|
@@ -296,6 +296,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
296
296
|
kind: string;
|
|
297
297
|
description: string;
|
|
298
298
|
};
|
|
299
|
+
AdaptableDataChangeHistoryAction: {
|
|
300
|
+
name: string;
|
|
301
|
+
kind: string;
|
|
302
|
+
description: string;
|
|
303
|
+
};
|
|
299
304
|
AdaptableExternalIcon: {
|
|
300
305
|
name: string;
|
|
301
306
|
kind: string;
|
|
@@ -1403,8 +1408,8 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1403
1408
|
description: string;
|
|
1404
1409
|
uiLabel: string;
|
|
1405
1410
|
isOptional: boolean;
|
|
1411
|
+
defaultValue: string;
|
|
1406
1412
|
gridInfo?: undefined;
|
|
1407
|
-
defaultValue?: undefined;
|
|
1408
1413
|
})[];
|
|
1409
1414
|
};
|
|
1410
1415
|
ColumnSort: {
|
|
@@ -1693,6 +1698,28 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1693
1698
|
name: string;
|
|
1694
1699
|
kind: string;
|
|
1695
1700
|
description: string;
|
|
1701
|
+
properties: ({
|
|
1702
|
+
name: string;
|
|
1703
|
+
kind: string;
|
|
1704
|
+
description: string;
|
|
1705
|
+
uiLabel: string;
|
|
1706
|
+
isOptional: boolean;
|
|
1707
|
+
reference: string;
|
|
1708
|
+
} | {
|
|
1709
|
+
name: string;
|
|
1710
|
+
kind: string;
|
|
1711
|
+
description: string;
|
|
1712
|
+
uiLabel: string;
|
|
1713
|
+
reference: string;
|
|
1714
|
+
isOptional?: undefined;
|
|
1715
|
+
} | {
|
|
1716
|
+
name: string;
|
|
1717
|
+
kind: string;
|
|
1718
|
+
description: string;
|
|
1719
|
+
uiLabel: string;
|
|
1720
|
+
isOptional?: undefined;
|
|
1721
|
+
reference?: undefined;
|
|
1722
|
+
})[];
|
|
1696
1723
|
};
|
|
1697
1724
|
CustomDestination: {
|
|
1698
1725
|
name: string;
|
|
@@ -1728,6 +1755,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
1728
1755
|
kind: string;
|
|
1729
1756
|
description: string;
|
|
1730
1757
|
};
|
|
1758
|
+
CustomRenderContext: {
|
|
1759
|
+
name: string;
|
|
1760
|
+
kind: string;
|
|
1761
|
+
description: string;
|
|
1762
|
+
};
|
|
1731
1763
|
CustomReport: {
|
|
1732
1764
|
name: string;
|
|
1733
1765
|
kind: string;
|
|
@@ -2021,6 +2053,29 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2021
2053
|
uiLabel: string;
|
|
2022
2054
|
}[];
|
|
2023
2055
|
};
|
|
2056
|
+
DataChangeHistoryButton: {
|
|
2057
|
+
name: string;
|
|
2058
|
+
kind: string;
|
|
2059
|
+
description: string;
|
|
2060
|
+
};
|
|
2061
|
+
DataChangeHistoryContext: {
|
|
2062
|
+
name: string;
|
|
2063
|
+
kind: string;
|
|
2064
|
+
description: string;
|
|
2065
|
+
properties: ({
|
|
2066
|
+
name: string;
|
|
2067
|
+
kind: string;
|
|
2068
|
+
description: string;
|
|
2069
|
+
uiLabel: string;
|
|
2070
|
+
reference: string;
|
|
2071
|
+
} | {
|
|
2072
|
+
name: string;
|
|
2073
|
+
kind: string;
|
|
2074
|
+
description: string;
|
|
2075
|
+
uiLabel: string;
|
|
2076
|
+
reference?: undefined;
|
|
2077
|
+
})[];
|
|
2078
|
+
};
|
|
2024
2079
|
DataChangeHistoryOptions: {
|
|
2025
2080
|
name: string;
|
|
2026
2081
|
kind: string;
|
|
@@ -2039,8 +2094,8 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2039
2094
|
description: string;
|
|
2040
2095
|
uiLabel: string;
|
|
2041
2096
|
isOptional: boolean;
|
|
2097
|
+
defaultValue: string;
|
|
2042
2098
|
gridInfo?: undefined;
|
|
2043
|
-
defaultValue?: undefined;
|
|
2044
2099
|
})[];
|
|
2045
2100
|
};
|
|
2046
2101
|
DataSet: {
|
|
@@ -2125,6 +2180,19 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2125
2180
|
name: string;
|
|
2126
2181
|
kind: string;
|
|
2127
2182
|
description: string;
|
|
2183
|
+
properties: ({
|
|
2184
|
+
name: string;
|
|
2185
|
+
kind: string;
|
|
2186
|
+
description: string;
|
|
2187
|
+
uiLabel: string;
|
|
2188
|
+
reference: string;
|
|
2189
|
+
} | {
|
|
2190
|
+
name: string;
|
|
2191
|
+
kind: string;
|
|
2192
|
+
description: string;
|
|
2193
|
+
uiLabel: string;
|
|
2194
|
+
reference?: undefined;
|
|
2195
|
+
})[];
|
|
2128
2196
|
};
|
|
2129
2197
|
EditActionRowContext: {
|
|
2130
2198
|
name: string;
|
|
@@ -2148,6 +2216,19 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2148
2216
|
name: string;
|
|
2149
2217
|
kind: string;
|
|
2150
2218
|
description: string;
|
|
2219
|
+
properties: ({
|
|
2220
|
+
name: string;
|
|
2221
|
+
kind: string;
|
|
2222
|
+
description: string;
|
|
2223
|
+
uiLabel: string;
|
|
2224
|
+
reference: string;
|
|
2225
|
+
} | {
|
|
2226
|
+
name: string;
|
|
2227
|
+
kind: string;
|
|
2228
|
+
description: string;
|
|
2229
|
+
uiLabel: string;
|
|
2230
|
+
reference?: undefined;
|
|
2231
|
+
})[];
|
|
2151
2232
|
};
|
|
2152
2233
|
EditLookUpPermittedValues: {
|
|
2153
2234
|
name: string;
|
|
@@ -2172,8 +2253,8 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2172
2253
|
description: string;
|
|
2173
2254
|
uiLabel: string;
|
|
2174
2255
|
isOptional: boolean;
|
|
2256
|
+
defaultValue: string;
|
|
2175
2257
|
gridInfo?: undefined;
|
|
2176
|
-
defaultValue?: undefined;
|
|
2177
2258
|
})[];
|
|
2178
2259
|
};
|
|
2179
2260
|
EntitlementOptions: {
|
|
@@ -3129,6 +3210,11 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
3129
3210
|
kind: string;
|
|
3130
3211
|
description: string;
|
|
3131
3212
|
};
|
|
3213
|
+
LayoutAssociatedObjectLoadConfig: {
|
|
3214
|
+
name: string;
|
|
3215
|
+
kind: string;
|
|
3216
|
+
description: string;
|
|
3217
|
+
};
|
|
3132
3218
|
LayoutAvailableContext: {
|
|
3133
3219
|
name: string;
|
|
3134
3220
|
kind: string;
|
|
@@ -4084,16 +4170,8 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4084
4170
|
description: string;
|
|
4085
4171
|
uiLabel: string;
|
|
4086
4172
|
isOptional: boolean;
|
|
4173
|
+
defaultValue: string;
|
|
4087
4174
|
reference?: undefined;
|
|
4088
|
-
defaultValue?: undefined;
|
|
4089
|
-
} | {
|
|
4090
|
-
name: string;
|
|
4091
|
-
kind: string;
|
|
4092
|
-
description: string;
|
|
4093
|
-
uiLabel: string;
|
|
4094
|
-
isOptional: boolean;
|
|
4095
|
-
reference: string;
|
|
4096
|
-
defaultValue?: undefined;
|
|
4097
4175
|
} | {
|
|
4098
4176
|
name: string;
|
|
4099
4177
|
kind: string;
|
|
@@ -4101,7 +4179,7 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
4101
4179
|
uiLabel: string;
|
|
4102
4180
|
isOptional: boolean;
|
|
4103
4181
|
defaultValue: string;
|
|
4104
|
-
reference
|
|
4182
|
+
reference: string;
|
|
4105
4183
|
})[];
|
|
4106
4184
|
};
|
|
4107
4185
|
StatusBarState: {
|