@adaptabletools/adaptable 15.0.2 → 15.1.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/bundle.cjs.js +185 -181
- package/package.json +3 -3
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +3 -1
- package/src/AdaptableOptions/FilterOptions.d.ts +7 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +4 -0
- package/src/AdaptableOptions/SearchOptions.d.ts +8 -0
- package/src/AdaptableOptions/TeamSharingOptions.d.ts +7 -0
- package/src/AdaptableOptions/UserInterfaceOptions.d.ts +5 -5
- package/src/Api/GridApi.d.ts +14 -6
- package/src/Api/Implementation/ActionApiImpl.js +3 -4
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +4 -0
- package/src/Api/Implementation/AdaptableApiImpl.js +12 -0
- package/src/Api/Implementation/AlertApiImpl.js +23 -24
- package/src/Api/Implementation/ApiBase.d.ts +4 -0
- package/src/Api/Implementation/ApiBase.js +14 -3
- package/src/Api/Implementation/CalculatedColumnApiImpl.js +8 -9
- package/src/Api/Implementation/CellSummaryApiImpl.js +1 -1
- package/src/Api/Implementation/ChartingApiImpl.js +1 -1
- package/src/Api/Implementation/ColumnApiImpl.js +31 -32
- package/src/Api/Implementation/CustomSortApiImpl.js +5 -6
- package/src/Api/Implementation/DashboardApiImpl.js +3 -3
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +1 -1
- package/src/Api/Implementation/DataSetApiImpl.js +3 -3
- package/src/Api/Implementation/ExportApiImpl.js +7 -8
- package/src/Api/Implementation/FilterApiImpl.js +15 -16
- package/src/Api/Implementation/FlashingCellApiImpl.js +3 -3
- package/src/Api/Implementation/FormatColumnApiImpl.js +18 -18
- package/src/Api/Implementation/FreeTextColumnApiImpl.js +9 -10
- package/src/Api/Implementation/GridApiImpl.d.ts +7 -2
- package/src/Api/Implementation/GridApiImpl.js +52 -13
- package/src/Api/Implementation/LayoutApiImpl.js +11 -12
- package/src/Api/Implementation/PlusMinusApiImpl.js +1 -1
- package/src/Api/Implementation/PredicateApiImpl.js +8 -9
- package/src/Api/Implementation/QueryApiImpl.js +5 -5
- package/src/Api/Implementation/QueryLanguageApiImpl.js +5 -6
- package/src/Api/Implementation/QuickSearchApiImpl.js +1 -1
- package/src/Api/Implementation/ScheduleApiImpl.js +17 -17
- package/src/Api/Implementation/SettingsPanelApiImpl.js +3 -4
- package/src/Api/Implementation/ShortcutApiImpl.js +5 -5
- package/src/Api/Implementation/SmartEditApiImpl.js +1 -1
- package/src/Api/Implementation/StyledColumnApiImpl.js +4 -4
- package/src/Api/Implementation/SystemStatusApiImpl.js +2 -2
- package/src/Api/Implementation/TeamSharingApiImpl.js +11 -12
- package/src/Api/Implementation/ThemeApiImpl.js +4 -4
- package/src/Api/Implementation/UserInterfaceApiImpl.js +2 -2
- package/src/Api/Internal/AdaptableInternalApi.js +1 -2
- package/src/Api/Internal/ChartingInternalApi.js +1 -2
- package/src/Api/Internal/GridInternalApi.js +11 -1
- package/src/Api/Internal/QueryInternalApi.js +1 -2
- package/src/Redux/Store/AdaptableReduxLocalStorageEngine.js +4 -4
- package/src/Redux/Store/AdaptableReduxMerger.js +1 -2
- package/src/Redux/Store/AdaptableStore.js +16 -15
- package/src/Strategy/AlertModule.js +1 -0
- package/src/Strategy/CalculatedColumnModule.js +2 -3
- package/src/Strategy/CustomSortModule.d.ts +1 -0
- package/src/Strategy/CustomSortModule.js +1 -0
- package/src/Strategy/DashboardModule.js +1 -2
- package/src/Strategy/DataChangeHistoryModule.js +1 -2
- package/src/Strategy/FilterModule.js +1 -2
- package/src/Strategy/FlashingCellModule.js +1 -0
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/Interface/IModule.d.ts +6 -0
- package/src/Strategy/PlusMinusModule.js +1 -0
- package/src/Strategy/ScheduleModule.js +21 -0
- package/src/Strategy/ShortcutModule.js +1 -0
- package/src/Strategy/StyledColumnModule.js +2 -2
- package/src/Strategy/ToolPanelModule.js +2 -3
- package/src/Strategy/Utilities/Alert/getAlertBehaviourViewItems.d.ts +3 -8
- package/src/Strategy/Utilities/getObjectTagsViewItems.js +27 -2
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +3 -0
- package/src/Utilities/ExpressionFunctions/booleanExpressionFunctions.js +2 -2
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.d.ts +1 -1
- package/src/Utilities/ExpressionFunctions/scalarExpressionFunctions.js +104 -42
- package/src/Utilities/Extensions/NumberExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/NumberExtensions.js +6 -1
- package/src/Utilities/Helpers/AdaptableHelper.js +1 -2
- package/src/Utilities/Helpers/DateHelper.js +2 -2
- package/src/Utilities/Helpers/Helper.js +3 -3
- package/src/Utilities/Services/AggregatedScalarLiveValue.js +3 -4
- package/src/Utilities/Services/AlertService.js +1 -2
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +3 -4
- package/src/Utilities/Services/DataService.js +1 -2
- package/src/Utilities/Services/LicenseService/index.js +1 -1
- package/src/Utilities/Services/MetamodelService.js +3 -4
- package/src/Utilities/Services/QueryLanguageService.js +1 -2
- package/src/Utilities/logDeprecation.d.ts +4 -3
- package/src/Utilities/logDeprecation.js +6 -7
- package/src/View/Charting/useChartState.js +1 -2
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.d.ts +1 -0
- package/src/View/Components/AdaptableObjectList/AdaptableObjectList.js +9 -2
- package/src/View/Dashboard/Dashboard.js +1 -2
- package/src/View/Layout/Wizard/sections/FilterSection.js +1 -1
- package/src/View/StateManagement/handleExportState.js +1 -2
- package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +1 -2
- package/src/View/TeamSharing/SharedEntityObjectView.d.ts +3 -0
- package/src/View/Theme/ThemePopup.d.ts +1 -1
- package/src/View/Theme/ThemePopup.js +17 -3
- package/src/agGrid/Adaptable.d.ts +3 -1
- package/src/agGrid/Adaptable.js +94 -50
- package/src/agGrid/AdaptableLogger.d.ts +26 -0
- package/src/agGrid/AdaptableLogger.js +148 -0
- package/src/agGrid/agGridHelper.js +7 -8
- package/src/components/ExpressionEditor/BaseEditorInput.js +1 -2
- package/src/components/OverlayTrigger/index.js +1 -2
- package/src/components/SelectableList/index.js +0 -2
- package/src/components/icons/index.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/parser/src/evaluator.js +3 -1
- package/src/parser/src/parser.js +496 -453
- package/src/parser/src/types.d.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/src/Utilities/Helpers/LoggingHelper.d.ts +0 -15
- package/src/Utilities/Helpers/LoggingHelper.js +0 -111
|
@@ -21,6 +21,14 @@ const dateUtils_1 = require("./dateUtils");
|
|
|
21
21
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
22
22
|
const TypeExtensions_1 = require("../Extensions/TypeExtensions");
|
|
23
23
|
const src_1 = require("../../parser/src");
|
|
24
|
+
// useful for unary operators which expect a list of arguments
|
|
25
|
+
// we extract the provided array elements into a list
|
|
26
|
+
const flattenArguments = (values) => {
|
|
27
|
+
if (!Array.isArray(values)) {
|
|
28
|
+
return values;
|
|
29
|
+
}
|
|
30
|
+
return values.flat(Infinity);
|
|
31
|
+
};
|
|
24
32
|
const sanitizeArguments = (values, allowNaN) => {
|
|
25
33
|
return values.filter((value) => value != undefined && value != null && value !== '' && (allowNaN || !isNaN(value)));
|
|
26
34
|
};
|
|
@@ -113,7 +121,7 @@ exports.scalarExpressionFunctions = {
|
|
|
113
121
|
},
|
|
114
122
|
COALESCE: {
|
|
115
123
|
handler(args) {
|
|
116
|
-
return args.find((arg) => !(arg === null || arg === undefined));
|
|
124
|
+
return flattenArguments(args).find((arg) => !(arg === null || arg === undefined));
|
|
117
125
|
},
|
|
118
126
|
description: 'Returns the first argument which is not null',
|
|
119
127
|
signatures: ['COALESCE(value, value, ...value)'],
|
|
@@ -121,6 +129,16 @@ exports.scalarExpressionFunctions = {
|
|
|
121
129
|
category: 'special',
|
|
122
130
|
returnType: 'string',
|
|
123
131
|
},
|
|
132
|
+
NULL: {
|
|
133
|
+
handler: () => {
|
|
134
|
+
return null;
|
|
135
|
+
},
|
|
136
|
+
description: 'Returns the NULL literal which represents the intentional absence of any object value',
|
|
137
|
+
category: 'special',
|
|
138
|
+
returnType: 'null',
|
|
139
|
+
signatures: ['NULL'],
|
|
140
|
+
examples: ['[status] = "accepted" ? 100 : NULL'],
|
|
141
|
+
},
|
|
124
142
|
IS_BLANK: {
|
|
125
143
|
handler(args) {
|
|
126
144
|
return args[0] === undefined || args[0] === null || args[0] === '';
|
|
@@ -131,6 +149,85 @@ exports.scalarExpressionFunctions = {
|
|
|
131
149
|
examples: ['IS_BLANK([col1])'],
|
|
132
150
|
returnType: 'boolean',
|
|
133
151
|
},
|
|
152
|
+
ABS: {
|
|
153
|
+
handler(args) {
|
|
154
|
+
return sanitizeNumericResult(Math.abs(args[0]));
|
|
155
|
+
},
|
|
156
|
+
isHiddenFromMenu: true,
|
|
157
|
+
description: 'Returns the absolute value of the given number',
|
|
158
|
+
signatures: ['ABS(a: number)'],
|
|
159
|
+
examples: ['ABS([columnName])'],
|
|
160
|
+
category: 'maths',
|
|
161
|
+
returnType: 'number',
|
|
162
|
+
},
|
|
163
|
+
CEILING: {
|
|
164
|
+
handler(args) {
|
|
165
|
+
return sanitizeNumericResult(Math.ceil(args[0]));
|
|
166
|
+
},
|
|
167
|
+
isHiddenFromMenu: true,
|
|
168
|
+
description: 'Returns the smaller integer greater than or equal to the given number',
|
|
169
|
+
signatures: ['CEILING(a: number)'],
|
|
170
|
+
examples: ['CEILING([columnName])'],
|
|
171
|
+
category: 'maths',
|
|
172
|
+
returnType: 'number',
|
|
173
|
+
},
|
|
174
|
+
FLOOR: {
|
|
175
|
+
handler(args) {
|
|
176
|
+
return sanitizeNumericResult(Math.floor(args[0]));
|
|
177
|
+
},
|
|
178
|
+
isHiddenFromMenu: true,
|
|
179
|
+
description: 'Returns the largest integer less than or equal to the given number',
|
|
180
|
+
signatures: ['FLOOR(a: number)'],
|
|
181
|
+
examples: ['FLOOR([columnName])'],
|
|
182
|
+
category: 'maths',
|
|
183
|
+
returnType: 'number',
|
|
184
|
+
},
|
|
185
|
+
ROUND: {
|
|
186
|
+
handler(args) {
|
|
187
|
+
return sanitizeNumericResult(Math.round(args[0]));
|
|
188
|
+
},
|
|
189
|
+
isHiddenFromMenu: true,
|
|
190
|
+
description: 'Returns the value of the given number rounded to the nearest integer',
|
|
191
|
+
signatures: ['ROUND(a: number)'],
|
|
192
|
+
examples: ['ROUND([columnName])'],
|
|
193
|
+
category: 'maths',
|
|
194
|
+
returnType: 'number',
|
|
195
|
+
},
|
|
196
|
+
MIN: {
|
|
197
|
+
handler(args) {
|
|
198
|
+
return Math.min(...sanitizeArguments(flattenArguments(args)));
|
|
199
|
+
},
|
|
200
|
+
description: 'Returns the smallest of given numbers',
|
|
201
|
+
signatures: ['MIN(number, number, ...number)'],
|
|
202
|
+
examples: ['MIN([col1], 5)'],
|
|
203
|
+
category: 'maths',
|
|
204
|
+
returnType: 'number',
|
|
205
|
+
},
|
|
206
|
+
MAX: {
|
|
207
|
+
handler(args) {
|
|
208
|
+
return Math.max(...sanitizeArguments(flattenArguments(args)));
|
|
209
|
+
},
|
|
210
|
+
description: 'Returns the highest of given numbers',
|
|
211
|
+
signatures: ['MAX(number, number, ...number)'],
|
|
212
|
+
examples: ['MAX([col1], 5)'],
|
|
213
|
+
category: 'maths',
|
|
214
|
+
returnType: 'number',
|
|
215
|
+
},
|
|
216
|
+
AVG: {
|
|
217
|
+
handler(args) {
|
|
218
|
+
const sanitizedArguments = sanitizeArguments(flattenArguments(args));
|
|
219
|
+
if (args.length && !sanitizedArguments.length) {
|
|
220
|
+
// expression is syntactically valid, but operates with incompatible values
|
|
221
|
+
return;
|
|
222
|
+
}
|
|
223
|
+
return sanitizedArguments.reduce((a, b) => a + b) / args.length;
|
|
224
|
+
},
|
|
225
|
+
description: 'Returns the average of inputted numbers',
|
|
226
|
+
signatures: ['AVG(number, number, ...number)'],
|
|
227
|
+
examples: ['AVG([col1], 5)'],
|
|
228
|
+
category: 'maths',
|
|
229
|
+
returnType: 'number',
|
|
230
|
+
},
|
|
134
231
|
ADD: {
|
|
135
232
|
handler(args) {
|
|
136
233
|
const sanitizedArguments = sanitizeArguments(args, true);
|
|
@@ -196,17 +293,6 @@ exports.scalarExpressionFunctions = {
|
|
|
196
293
|
category: 'maths',
|
|
197
294
|
returnType: 'number',
|
|
198
295
|
},
|
|
199
|
-
POW: {
|
|
200
|
-
handler(args) {
|
|
201
|
-
return sanitizeNumericResult(Math.pow(args[0], args[1]));
|
|
202
|
-
},
|
|
203
|
-
isHiddenFromMenu: true,
|
|
204
|
-
description: 'Returns the pow of 2 numbers',
|
|
205
|
-
signatures: ['number ^ number', 'POW(a: number, b: number)'],
|
|
206
|
-
examples: ['[col1] ^ 5', 'POW([col1], 5)'],
|
|
207
|
-
category: 'maths',
|
|
208
|
-
returnType: 'number',
|
|
209
|
-
},
|
|
210
296
|
IF: {
|
|
211
297
|
handler(args) {
|
|
212
298
|
return args[0] ? args[1] : args[2];
|
|
@@ -255,38 +341,14 @@ exports.scalarExpressionFunctions = {
|
|
|
255
341
|
category: 'conditional',
|
|
256
342
|
returnType: 'any',
|
|
257
343
|
},
|
|
258
|
-
|
|
259
|
-
handler(args) {
|
|
260
|
-
return Math.min(...sanitizeArguments(args));
|
|
261
|
-
},
|
|
262
|
-
description: 'Returns the smallest of inputted numbers',
|
|
263
|
-
signatures: ['MIN(number, number, ...number)'],
|
|
264
|
-
examples: ['MIN([col1], 5)'],
|
|
265
|
-
category: 'maths',
|
|
266
|
-
returnType: 'number',
|
|
267
|
-
},
|
|
268
|
-
MAX: {
|
|
269
|
-
handler(args) {
|
|
270
|
-
return Math.max(...sanitizeArguments(args));
|
|
271
|
-
},
|
|
272
|
-
description: 'Returns the highest of inputted numbers',
|
|
273
|
-
signatures: ['MAX(number, number, ...number)'],
|
|
274
|
-
examples: ['MAX([col1], 5)'],
|
|
275
|
-
category: 'maths',
|
|
276
|
-
returnType: 'number',
|
|
277
|
-
},
|
|
278
|
-
AVG: {
|
|
344
|
+
POW: {
|
|
279
345
|
handler(args) {
|
|
280
|
-
|
|
281
|
-
if (args.length && !sanitizedArguments.length) {
|
|
282
|
-
// expression is syntactically valid, but operates with incompatible values
|
|
283
|
-
return;
|
|
284
|
-
}
|
|
285
|
-
return sanitizedArguments.reduce((a, b) => a + b) / args.length;
|
|
346
|
+
return sanitizeNumericResult(Math.pow(args[0], args[1]));
|
|
286
347
|
},
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
348
|
+
isHiddenFromMenu: true,
|
|
349
|
+
description: 'Returns the pow of 2 numbers',
|
|
350
|
+
signatures: ['number ^ number', 'POW(a: number, b: number)'],
|
|
351
|
+
examples: ['[col1] ^ 5', 'POW([col1], 5)'],
|
|
290
352
|
category: 'maths',
|
|
291
353
|
returnType: 'number',
|
|
292
354
|
},
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export declare function abbreviateNumber(numberToAbbreviate: number): string;
|
|
2
|
+
export declare function WrapInParentheses(numberToWrap: number): string;
|
|
2
3
|
export declare const NumberExtensions: {
|
|
3
4
|
abbreviateNumber: typeof abbreviateNumber;
|
|
5
|
+
WrapInParentheses: typeof WrapInParentheses;
|
|
4
6
|
};
|
|
5
7
|
export default NumberExtensions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.NumberExtensions = exports.abbreviateNumber = void 0;
|
|
3
|
+
exports.NumberExtensions = exports.WrapInParentheses = exports.abbreviateNumber = void 0;
|
|
4
4
|
function abbreviateNumber(numberToAbbreviate) {
|
|
5
5
|
let str = '';
|
|
6
6
|
if (numberToAbbreviate >= 1000000000) {
|
|
@@ -18,7 +18,12 @@ function abbreviateNumber(numberToAbbreviate) {
|
|
|
18
18
|
return str;
|
|
19
19
|
}
|
|
20
20
|
exports.abbreviateNumber = abbreviateNumber;
|
|
21
|
+
function WrapInParentheses(numberToWrap) {
|
|
22
|
+
return ' (' + numberToWrap + ')';
|
|
23
|
+
}
|
|
24
|
+
exports.WrapInParentheses = WrapInParentheses;
|
|
21
25
|
exports.NumberExtensions = {
|
|
22
26
|
abbreviateNumber,
|
|
27
|
+
WrapInParentheses,
|
|
23
28
|
};
|
|
24
29
|
exports.default = exports.NumberExtensions;
|
|
@@ -4,7 +4,6 @@ exports.AdaptableHelper = exports.addAdaptableObjectUuidAndSource = exports.runA
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const cloneDeepWith_1 = tslib_1.__importDefault(require("lodash/cloneDeepWith"));
|
|
6
6
|
const isPlainObject_1 = tslib_1.__importDefault(require("lodash/isPlainObject"));
|
|
7
|
-
const LoggingHelper_1 = require("./LoggingHelper");
|
|
8
7
|
const Uuid_1 = require("../../PredefinedConfig/Uuid");
|
|
9
8
|
const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
|
|
10
9
|
function assignAdaptableOptions(adaptableOptions) {
|
|
@@ -75,7 +74,7 @@ function checkValidPrimaryKey(adaptable) {
|
|
|
75
74
|
}
|
|
76
75
|
else {
|
|
77
76
|
if (adaptable.adaptableOptions.columnOptions.showMissingColumnsWarning == true) {
|
|
78
|
-
|
|
77
|
+
adaptable.logger.consoleError(errorMessage);
|
|
79
78
|
}
|
|
80
79
|
}
|
|
81
80
|
return false;
|
|
@@ -4,8 +4,8 @@ exports.parseFilterInputDate = exports.parseDateValue = exports.parseToISO = exp
|
|
|
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"));
|
|
7
|
-
const LoggingHelper_1 = require("./LoggingHelper");
|
|
8
7
|
const FormatHelper_1 = require("./FormatHelper");
|
|
8
|
+
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
9
9
|
const isValidDate = (date) => {
|
|
10
10
|
return date instanceof Date && !isNaN(date.getTime());
|
|
11
11
|
};
|
|
@@ -57,7 +57,7 @@ const parseDateValue = (dateValue, dateFormat) => {
|
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
59
|
if (!(0, exports.isValidDate)(dateInstance)) {
|
|
60
|
-
|
|
60
|
+
AdaptableLogger_1.AdaptableLogger.consoleWarnBase(`Invalid date value "${dateValue}" - cannot be converted to a Date instance. Please make sure you specify adaptableOptions.userInterfaceOptions.dateInputOptions.dateFormat correctly.`);
|
|
61
61
|
dateInstance = undefined;
|
|
62
62
|
}
|
|
63
63
|
return dateInstance;
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Helper = exports.clamp = exports.modeNumberArray = exports.medianNumberArray = exports.meanNumberArray = exports.sumNumberArray = exports.RoundNumberTo4dp = exports.RoundNumber = exports.IsInputNotNullOrEmpty = exports.IsInputNullOrEmpty = exports.ReturnItemCount = exports.copyToClipboard = exports.createDownloadedFile = exports.convertArrayToCsv = exports.arrayToKeyMap = exports.cloneObject = exports.getStringRepresentionFromKey = exports.objectNotExists = exports.objectExists = void 0;
|
|
4
4
|
const StringExtensions_1 = require("../Extensions/StringExtensions");
|
|
5
|
-
const
|
|
5
|
+
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
6
6
|
function objectExists(item) {
|
|
7
7
|
return item != null && item != undefined;
|
|
8
8
|
}
|
|
@@ -104,14 +104,14 @@ function copyToClipboard(text) {
|
|
|
104
104
|
return document.execCommand('copy'); // Security exception may be thrown by some browsers.
|
|
105
105
|
}
|
|
106
106
|
catch (ex) {
|
|
107
|
-
|
|
107
|
+
AdaptableLogger_1.AdaptableLogger.consoleErrorBase('Copy to clipboard failed.', ex);
|
|
108
108
|
return false;
|
|
109
109
|
}
|
|
110
110
|
finally {
|
|
111
111
|
document.body.removeChild(textarea);
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
|
-
|
|
114
|
+
AdaptableLogger_1.AdaptableLogger.consoleWarnBase('Copy not available on this computer.');
|
|
115
115
|
}
|
|
116
116
|
exports.copyToClipboard = copyToClipboard;
|
|
117
117
|
function ReturnItemCount(items, itemName) {
|
|
@@ -2,13 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AggregatedScalarLiveValue = void 0;
|
|
4
4
|
const scalarAggregationHelper_1 = require("../ExpressionFunctions/scalarAggregationHelper");
|
|
5
|
-
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
6
5
|
const doOnceFlags = {};
|
|
7
|
-
const logOnce = (message) => {
|
|
6
|
+
const logOnce = (message, loggingFn) => {
|
|
8
7
|
if (doOnceFlags[message]) {
|
|
9
8
|
return;
|
|
10
9
|
}
|
|
11
|
-
(
|
|
10
|
+
loggingFn(message);
|
|
12
11
|
doOnceFlags[message] = true;
|
|
13
12
|
};
|
|
14
13
|
class AggregatedScalarLiveValue {
|
|
@@ -42,7 +41,7 @@ class AggregatedScalarLiveValue {
|
|
|
42
41
|
getAggregatedValueForRow(rowNode) {
|
|
43
42
|
const aggregationValue = this.getAggregationValue(rowNode);
|
|
44
43
|
if (aggregationValue == undefined) {
|
|
45
|
-
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available
|
|
44
|
+
logOnce(`${this.aggregatedScalarExpression} :: aggregation value is NOT available!`, this.adaptableApi.logWarn);
|
|
46
45
|
return;
|
|
47
46
|
}
|
|
48
47
|
if (this.expressionEvaluation.rowValueGetter) {
|
|
@@ -4,7 +4,6 @@ exports.AlertService = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Emitter_1 = tslib_1.__importDefault(require("../Emitter"));
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
|
-
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
8
7
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
9
8
|
class AlertService {
|
|
10
9
|
constructor(adaptableApi) {
|
|
@@ -30,7 +29,7 @@ class AlertService {
|
|
|
30
29
|
}
|
|
31
30
|
const isValidExpression = this.adaptableApi.queryLanguageApi.isValidObservableExpression(alertDefinition.Rule.ObservableExpression, ModuleConstants_1.AlertModuleId, `Invalid Alert rule with observable expression `);
|
|
32
31
|
if (!isValidExpression) {
|
|
33
|
-
|
|
32
|
+
this.adaptableApi.logWarn(`Could NOT create reactive alert due to invalid Rule definition!`, alertDefinition.Rule);
|
|
34
33
|
return;
|
|
35
34
|
}
|
|
36
35
|
const reactiveExpressionObservable = this.evaluateReactiveExpression(alertDefinition.Rule);
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.CalculatedColumnExpressionService = void 0;
|
|
4
|
-
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
5
4
|
const ModuleConstants_1 = require("../Constants/ModuleConstants");
|
|
6
5
|
const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
|
|
7
6
|
class CalculatedColumnExpressionService {
|
|
@@ -74,7 +73,7 @@ class CalculatedColumnExpressionService {
|
|
|
74
73
|
}
|
|
75
74
|
}
|
|
76
75
|
catch (e) {
|
|
77
|
-
|
|
76
|
+
this.adaptableApi.logError(`Invalid CalculatedColumn expression ${this.adaptableApi.queryLanguageApi.getAdaptableQueryExpression(calculatedColumnQuery)} :: ${e}`);
|
|
78
77
|
return 'Number';
|
|
79
78
|
}
|
|
80
79
|
}
|
|
@@ -118,7 +117,7 @@ class CalculatedColumnExpressionService {
|
|
|
118
117
|
}
|
|
119
118
|
}
|
|
120
119
|
catch (error) {
|
|
121
|
-
|
|
120
|
+
this.adaptableApi.logError(`Invalid CalculatedColumn expression ${(_d = (_c = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.ScalarExpression) !== null && _d !== void 0 ? _d : (_e = calculatedColumn === null || calculatedColumn === void 0 ? void 0 : calculatedColumn.Query) === null || _e === void 0 ? void 0 : _e.AggregatedScalarExpression} :: ${error}`);
|
|
122
121
|
return null;
|
|
123
122
|
}
|
|
124
123
|
}
|
|
@@ -134,7 +133,7 @@ class CalculatedColumnExpressionService {
|
|
|
134
133
|
this.aggregatedScalarLiveValuesMap.set(calculatedColumn.Uuid, aggregatedScalarLiveValue);
|
|
135
134
|
}
|
|
136
135
|
catch (e) {
|
|
137
|
-
|
|
136
|
+
this.adaptableApi.logError(`Creating CalculatedColumn ('${(_c = calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.AggregatedScalarExpression}') failed!`, e.message);
|
|
138
137
|
}
|
|
139
138
|
}
|
|
140
139
|
}
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Emitter_1 = tslib_1.__importDefault(require("../../Utilities/Emitter"));
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
7
|
const Helper_1 = tslib_1.__importDefault(require("../Helpers/Helper"));
|
|
8
|
-
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
9
8
|
// ~ 8 hours
|
|
10
9
|
const MAX_TIMEFRAME_SIZE = 86400000;
|
|
11
10
|
class DataService {
|
|
@@ -50,7 +49,7 @@ class DataService {
|
|
|
50
49
|
// why 2 and not 3 or 1? no good reason, only seems like a reasonable waiting time :)
|
|
51
50
|
const UNDO_WAIT = 2000;
|
|
52
51
|
const timeoutId = setTimeout(() => {
|
|
53
|
-
|
|
52
|
+
this.adaptable.logger.warn(`Undo change was NOT handled, this should NOT happen: PK(${change.primaryKeyValue}) Col(${change.column}) RevertedValue(${change.newValue}) NewValue(${change.oldValue})`);
|
|
54
53
|
this.extractUndoChange(change);
|
|
55
54
|
}, UNDO_WAIT);
|
|
56
55
|
this.undoChangeTimers.set(undoChangeKey, timeoutId);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LicenseService=exports.LicenseValidityType=void 0;const e=require("tslib"),a=require("../../../Redux/ActionsReducers/SystemRedux"),t=require("../../../Redux/ActionsReducers/PopupRedux"),s=e.__importDefault(require("../../ObjectFactory")),o=e.__importDefault(require("lodash/clamp")),i=require("../../Constants/DocumentationLinkConstants"),n=require("../../license/decode"),r=require("./shouldLogThankYouMessage"),l="sales@adaptabletools.com",c=10,d=864e5;var p;!function(e){e.INVALID_LICENSE="INVALID_LICENSE",e.NO_LICENSE="NO_LICENSE",e.NON_PRODUCTION_VALID="NON_PRODUCTION_VALID",e.NON_PRODUCTION_EXPIRED_IN_SCOPE="NON_PRODUCTION_EXPIRED_IN_SCOPE",e.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE="NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE",e.COMMERCIAL_VALID="COMMERCIAL_VALID",e.COMMERCIAL_EXPIRED_IN_SCOPE="COMMERCIAL_EXPIRED_IN_SCOPE",e.COMMERCIAL_EXPIRED_OUT_OF_SCOPE="COMMERCIAL_EXPIRED_OUT_OF_SCOPE"}(p=exports.LicenseValidityType||(exports.LicenseValidityType={}));const E=/(https):\/\/\d+\-\d+\-\d+\-(sandpack\.codesandbox\.io)/g,_=/(https):\/\/\S+(\.csb\.app)/g,h=/(https):\/\/\S+(\.adaptabletools\.com)/g,I="undefined"!=typeof window?window.location.origin:"",O=()=>{const[e,a,t]=Array.from(E.exec(I)||[]);return"https"===a&&"sandpack.codesandbox.io"===t},u=()=>{const[e,a,t]=Array.from(_.exec(I)||[]);return"https"===a&&".csb.app"===t},A=()=>{const[e,a,t]=Array.from(h.exec(I)||[]);return"https"===a&&".adaptabletools.com"===t};class N{constructor(e,a,t){this.adaptable=e,this.adaptable=e;let s=null;if(a)try{s=(0,n.decode)(a)}catch(e){s=e}O()||u()||A()||this.handleLicenseValidation(s,this.getValidityType(s,t))}getValidityType(e,a){if(!e)return p.NO_LICENSE;if(e instanceof Error)return p.INVALID_LICENSE;const t=new Date(a.publishedAt),s=new Date(e.end),o=s<new Date,i=e.trial;let n=null;return n=o?s>t?i?p.NON_PRODUCTION_EXPIRED_IN_SCOPE:p.COMMERCIAL_EXPIRED_IN_SCOPE:i?p.NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE:p.COMMERCIAL_EXPIRED_OUT_OF_SCOPE:i?p.NON_PRODUCTION_VALID:p.COMMERCIAL_VALID,n}handleLicenseValidation(e,a){var t;const s=new Date;s.setHours(0,0,0,0);let p=0;e instanceof Error||!(null==e?void 0:e.end)||(p=Math.floor(((null===(t=null==e?void 0:e.end)||void 0===t?void 0:t.getTime())-s.getTime())/d),p=(0,o.default)(p,0,1/0));let E="",_="";!e||e instanceof Error||!e.appName||e.appName==n.GENERIC_APP_NAME||(E=e.appName,_=" for application [APP_NAME]");const h=(e,a=i.LicenseDocsLink,t=l,s=p,o=E)=>e.replace("[LINK]",a).replace("[EMAIL]",t).replace("[APP_NAME]",o).replace("[DAYS]",`${s}`);switch(a){case"NO_LICENSE":case"NON_PRODUCTION_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(h("This instance of AdapTable does not have a license, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("No AdapTable License found."),this.showWatermark("This instance of AdapTable does not have a license, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"INVALID_LICENSE":this.adaptable.logger.consoleLogByMessageType(h("This instance of AdapTable seems to use a corrupted License, and some functionality has therefore been removed. In order to use a fully-featured version of AdapTable, please contact [EMAIL]. You can learn more about the different AdapTable license options at [LINK]."),"Error"),this.showNotification("Corrupted AdapTable License found."),this.showWatermark("This instance of AdapTable has a corrupted License, and some functionality has therefore been removed."),this.disableStatePersistence();break;case"NON_PRODUCTION_VALID":this.adaptable.logger.consoleLogByMessageType(h("This AdapTable trial license expires in [DAYS] days. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Info");break;case"NON_PRODUCTION_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(h("This AdapTable trial license has now expired. Please contact [EMAIL] to upgrade to a commercial version of AdapTable. You can learn more about the different AdapTable license options at [LINK]."),"Warning"),this.showWatermark("AdapTable License has expired");break;case"COMMERCIAL_VALID":if(p<=c)this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${_} expires in [DAYS] days. Please contact [EMAIL] to renew (giving you access to Support and Updates)`),"Info");else try{(0,r.shouldLogThankYouMessage)()&&this.adaptable.logger.consoleLogByMessageType(h(`Thank you for using a valid AdapTable license${_}. Your license will expire in [DAYS] days.`),"Info")}catch(e){}break;case"COMMERCIAL_EXPIRED_IN_SCOPE":this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${_} has expired. Please contact [EMAIL] if you wish to renew (giving you access to Support and Updates)`),"Warning");break;case"COMMERCIAL_EXPIRED_OUT_OF_SCOPE":this.adaptable.logger.consoleLogByMessageType(h(`This AdapTable license${_} has expired. Adaptable version was published after the license expired. Please contact [EMAIL] if you wish to renew your license.`),"Error"),this.showNotification("Adaptable License has expired"),this.showWatermark("Adaptable License has expired")}}showNotification(e){this.adaptable.api.internalApi.dispatchReduxAction((0,t.PopupShowAlert)({alertType:"generic",header:"License Error",message:e,alertDefinition:s.default.CreateInternalAlertDefinitionForMessages("Error")}))}showWatermark(e){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseShowWatermark)(e))}disableStatePersistence(){this.adaptable.api.internalApi.dispatchReduxAction((0,a.SystemLicenseDisablePersistence)())}destroy(){}}exports.LicenseService=N;
|
|
@@ -4,9 +4,9 @@ exports.MetamodelService = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
|
|
6
6
|
const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
|
|
7
|
-
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
8
7
|
const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
|
|
9
8
|
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
9
|
+
const AdaptableLogger_1 = require("../../agGrid/AdaptableLogger");
|
|
10
10
|
const supportedMetamodelTypes = ['s', 'n', 'b', 'a', 'f', 'R'];
|
|
11
11
|
class MetamodelService {
|
|
12
12
|
constructor(getAdaptableOptions) {
|
|
@@ -28,17 +28,16 @@ class MetamodelService {
|
|
|
28
28
|
}
|
|
29
29
|
validateAdaptableOptionsValues() {
|
|
30
30
|
var _a;
|
|
31
|
-
(0, LoggingHelper_1.LogAdaptableInfo)('Validating Adaptable Options...');
|
|
32
31
|
const adaptableOptionsValues = this.getAdaptableOptions();
|
|
33
32
|
const adaptableOptionsMetamodel = this.getAdaptableOptionsMetamodel();
|
|
34
33
|
const adaptableOptionsDefaultValues = this.getAdaptableOptionsDefaultValues();
|
|
35
34
|
if ((_a = adaptableOptionsValues.adaptableId) === null || _a === void 0 ? void 0 : _a.includes('.')) {
|
|
36
|
-
|
|
35
|
+
AdaptableLogger_1.AdaptableLogger.consoleWarnBase("The 'AdaptableOptions.adaptableId' property should NOT include a '.' character. We strongly recommend to remove it to avoid unexpected AdapTable behavior.");
|
|
37
36
|
}
|
|
38
37
|
const validationErrors = [];
|
|
39
38
|
this.validateOptionsObject(validationErrors, 'AdaptableOptions', adaptableOptionsValues, adaptableOptionsMetamodel, adaptableOptionsDefaultValues);
|
|
40
39
|
if (validationErrors.length) {
|
|
41
|
-
|
|
40
|
+
AdaptableLogger_1.AdaptableLogger.consoleWarnBase([
|
|
42
41
|
'AdaptableOptions validation errors:',
|
|
43
42
|
'\n',
|
|
44
43
|
...validationErrors,
|
|
@@ -4,7 +4,6 @@ exports.QueryLanguageService = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const parser = tslib_1.__importStar(require("../../parser/src"));
|
|
6
6
|
const rxjs_1 = require("rxjs");
|
|
7
|
-
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
8
7
|
const aggregatedScalarExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedScalarExpressionFunctions");
|
|
9
8
|
const aggregatedBooleanExpressionFunctions_1 = require("../ExpressionFunctions/aggregatedBooleanExpressionFunctions");
|
|
10
9
|
const AggregatedScalarLiveValue_1 = require("./AggregatedScalarLiveValue");
|
|
@@ -289,7 +288,7 @@ class QueryLanguageService {
|
|
|
289
288
|
const generalAggregatedBooleanExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedBooleanExpressionFunctions_1.aggregatedBooleanExpressionFunctions, expressionOptions.systemAggregatedBooleanFunctions);
|
|
290
289
|
const generalAggregatedScalarExpressionFunctions = this.extractMappedExpressionFunctions(aggregatedScalarExpressionFunctions_1.aggregatedScalarExpressionFunctions, expressionOptions.systemAggregatedScalarFunctions);
|
|
291
290
|
if (!module) {
|
|
292
|
-
|
|
291
|
+
this.adaptableApi.logWarn(`QueryLanguageService.getModuleExpressionFunctions() was called with an undefined 'module' param, this should never happen`);
|
|
293
292
|
return {
|
|
294
293
|
booleanFunctions: generalBooleanExpressionFunctions,
|
|
295
294
|
scalarFunctions: generalScalarExpressionFunctions,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const
|
|
3
|
-
export declare const
|
|
1
|
+
import { AdaptableLogger } from '../agGrid/AdaptableLogger';
|
|
2
|
+
export declare const logDeprecation: <T>(logger: AdaptableLogger, typeName: string, oldProp: keyof T, newProp?: keyof T, message?: string) => void;
|
|
3
|
+
export declare const logDeprecationExternal: <OLD_TYPE, NEW_TYPE>(logger: AdaptableLogger, oldTypeName: string, oldProp: keyof OLD_TYPE, newTypeName: string, newProp: keyof NEW_TYPE, message?: string) => void;
|
|
4
|
+
export declare const logDeprecationInternal: <T>(logger: AdaptableLogger, typeName: string, oldProp: keyof T) => void;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.logDeprecationInternal = exports.logDeprecationExternal = exports.logDeprecation = void 0;
|
|
4
|
-
const LoggingHelper_1 = require("./Helpers/LoggingHelper");
|
|
5
4
|
const doOnceFlags = {};
|
|
6
5
|
/**
|
|
7
6
|
* If the key was passed before, then do NOT execute the func
|
|
@@ -13,18 +12,18 @@ const doOnce = (func, key) => {
|
|
|
13
12
|
func();
|
|
14
13
|
doOnceFlags[key] = true;
|
|
15
14
|
};
|
|
16
|
-
const logDeprecation = (typeName, oldProp, newProp, message) => {
|
|
15
|
+
const logDeprecation = (logger, typeName, oldProp, newProp, message) => {
|
|
17
16
|
const newPropMsg = newProp ? `Please use '${typeName}.${newProp}()' instead. ` : '';
|
|
18
|
-
doOnce(() =>
|
|
17
|
+
doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. ${newPropMsg}${message !== null && message !== void 0 ? message : ''}`), `Deprecated_${oldProp}`);
|
|
19
18
|
};
|
|
20
19
|
exports.logDeprecation = logDeprecation;
|
|
21
|
-
const logDeprecationExternal = (oldTypeName, oldProp, newTypeName, newProp, message) => {
|
|
20
|
+
const logDeprecationExternal = (logger, oldTypeName, oldProp, newTypeName, newProp, message) => {
|
|
22
21
|
const newPropMsg = newProp ? `Please use '${newTypeName}.${newProp}()' instead. ` : '';
|
|
23
|
-
doOnce(() =>
|
|
22
|
+
doOnce(() => logger.consoleWarn(`'${oldTypeName}.${oldProp}()' is deprecated. ${newPropMsg}${message !== null && message !== void 0 ? message : ''}`), `Deprecated_${oldProp}`);
|
|
24
23
|
};
|
|
25
24
|
exports.logDeprecationExternal = logDeprecationExternal;
|
|
26
|
-
const logDeprecationInternal = (typeName, oldProp) => {
|
|
27
|
-
doOnce(() =>
|
|
25
|
+
const logDeprecationInternal = (logger, typeName, oldProp) => {
|
|
26
|
+
doOnce(() => logger.consoleWarn(`'${typeName}.${oldProp}()' is deprecated. The method will be removed in the next major release.
|
|
28
27
|
Please contact support if you need the missing functionality.`), `Deprecated_${oldProp}`);
|
|
29
28
|
};
|
|
30
29
|
exports.logDeprecationInternal = logDeprecationInternal;
|
|
@@ -6,7 +6,6 @@ const React = tslib_1.__importStar(require("react"));
|
|
|
6
6
|
const react_redux_1 = require("react-redux");
|
|
7
7
|
const AdaptableContext_1 = require("../AdaptableContext");
|
|
8
8
|
const SystemRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/SystemRedux"));
|
|
9
|
-
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
10
9
|
const useChartState = (chartDefinition) => {
|
|
11
10
|
const [chartRef, setChartRef] = React.useState(null);
|
|
12
11
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
@@ -40,7 +39,7 @@ const useChartState = (chartDefinition) => {
|
|
|
40
39
|
? document.querySelector(chartContainer.element)
|
|
41
40
|
: chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element;
|
|
42
41
|
if (!element && typeof (chartContainer === null || chartContainer === void 0 ? void 0 : chartContainer.element) === 'string') {
|
|
43
|
-
|
|
42
|
+
adaptable.logger.consoleLogByMessageType(`Chart container element not found: ${chartContainer.element}`, 'Error');
|
|
44
43
|
return;
|
|
45
44
|
}
|
|
46
45
|
const chartRef = adaptable.api.chartingApi.getChartRef(chartDefinition.Model.chartId);
|
|
@@ -25,6 +25,7 @@ export declare const AdaptableObjectListItemView: React.FunctionComponent<{
|
|
|
25
25
|
suspendedEnabled?: boolean;
|
|
26
26
|
teamSharingActivated?: boolean;
|
|
27
27
|
disableDeleteConfirmation?: boolean;
|
|
28
|
+
module: IModule;
|
|
28
29
|
}>;
|
|
29
30
|
interface AdaptableObjectListItemProps {
|
|
30
31
|
data: AdaptableObjectView;
|
|
@@ -56,9 +56,16 @@ const AdaptableObjectListItemView = (props) => {
|
|
|
56
56
|
typeof tag.view === 'function'
|
|
57
57
|
? React.createElement(tag.view, {
|
|
58
58
|
data: props.abObject,
|
|
59
|
+
module: props.module,
|
|
59
60
|
})
|
|
60
61
|
: tag.view,
|
|
61
|
-
Boolean((tag === null || tag === void 0 ? void 0 : tag.values) && ((_a = tag === null || tag === void 0 ? void 0 : tag.values) === null || _a === void 0 ? void 0 : _a.length)) && (React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: tag.values, value: tag.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) }))
|
|
62
|
+
Boolean((tag === null || tag === void 0 ? void 0 : tag.values) && ((_a = tag === null || tag === void 0 ? void 0 : tag.values) === null || _a === void 0 ? void 0 : _a.length)) && (React.createElement(ValueSelector_1.ValueOptionsTags, { style: { marginRight: 0 }, readOnly: true, options: tag.values, value: tag.values, allowWrap: true, toIdentifier: (c) => c, toLabel: (c) => React.createElement(React.Fragment, null, c) })),
|
|
63
|
+
typeof tag.viewAfter === 'function'
|
|
64
|
+
? React.createElement(tag.viewAfter, {
|
|
65
|
+
data: props.abObject,
|
|
66
|
+
module: props.module,
|
|
67
|
+
})
|
|
68
|
+
: tag.viewAfter)));
|
|
62
69
|
})),
|
|
63
70
|
props.showActions && (React.createElement(rebass_1.Flex, { flexDirection: "column", className: `${baseClassName}__buttons` },
|
|
64
71
|
React.createElement(rebass_1.Flex, { justifyContent: "end" },
|
|
@@ -121,7 +128,7 @@ const AdaptableObjectListItem = (props) => {
|
|
|
121
128
|
const disableDeleteConfirmationState = (0, react_redux_1.useSelector)((adaptableState) => SystemRedux.SystemDisableDeleteConfirmationSelector(adaptableState.System));
|
|
122
129
|
const disableDeleteConfirmation = disableDeleteConfirmationState || ((_h = adaptableOpttions === null || adaptableOpttions === void 0 ? void 0 : adaptableOpttions.generalOptions) === null || _h === void 0 ? void 0 : _h.disableDeleteConfirmation);
|
|
123
130
|
return (React.createElement(React.Fragment, null,
|
|
124
|
-
React.createElement(exports.AdaptableObjectListItemView, { disableDeleteConfirmation: disableDeleteConfirmation, abObject: props.data.abObject, accessLevel: accessLevel, actions: actions, className: itemClassName, handleOnEdit: handleOnEdit, items: props.data.items, showActions: showActions, showEditButton: showEditButton, style: props.data.style, teamSharingActivated: teamSharingActivated, onShare: (config) => adaptable.api.teamSharingApi.shareEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config), entityType: entityType, deleteAction: deleteAction, deleteDisabled: props.deleteDisabled, deleteTooltip: props.deleteTooltip, editDisabled: isEditDisabled, suspendedEnabled: hasSuspend, onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)) }),
|
|
131
|
+
React.createElement(exports.AdaptableObjectListItemView, { module: props.module, disableDeleteConfirmation: disableDeleteConfirmation, abObject: props.data.abObject, accessLevel: accessLevel, actions: actions, className: itemClassName, handleOnEdit: handleOnEdit, items: props.data.items, showActions: showActions, showEditButton: showEditButton, style: props.data.style, teamSharingActivated: teamSharingActivated, onShare: (config) => adaptable.api.teamSharingApi.shareEntity(props.data.abObject, props.module.moduleInfo.ModuleName, config), entityType: entityType, deleteAction: deleteAction, deleteDisabled: props.deleteDisabled, deleteTooltip: props.deleteTooltip, editDisabled: isEditDisabled, suspendedEnabled: hasSuspend, onSuspend: () => dispatch(viewOptions.getSuspendAction(props.data.abObject)), onUnSuspend: () => dispatch(viewOptions.getUnSuspendAction(props.data.abObject)) }),
|
|
125
132
|
isEditWizardVisible && EditWizard && (React.createElement(EditWizard, { defaultCurrentSectionName: wizardStepName, moduleInfo: props.module.moduleInfo, data: props.data.abObject, configEntities: null, onCloseWizard: handleCloseWizard, onFinishWizard: handleCloseWizard }))));
|
|
126
133
|
};
|
|
127
134
|
exports.AdaptableObjectListItem = AdaptableObjectListItem;
|
|
@@ -10,7 +10,6 @@ const ModuleConstants_1 = require("../../Utilities/Constants/ModuleConstants");
|
|
|
10
10
|
const DashboardRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/DashboardRedux"));
|
|
11
11
|
const PopupRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/PopupRedux"));
|
|
12
12
|
const QuickSearchRedux = tslib_1.__importStar(require("../../Redux/ActionsReducers/QuickSearchRedux"));
|
|
13
|
-
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
14
13
|
const SimpleButton_1 = tslib_1.__importDefault(require("../../components/SimpleButton"));
|
|
15
14
|
const rebass_1 = require("rebass");
|
|
16
15
|
const Dashboard_1 = require("../../components/Dashboard");
|
|
@@ -60,7 +59,7 @@ const DashboardComponent = (props) => {
|
|
|
60
59
|
React.createElement(ModuleToolbarWrapper_1.ModuleToolbarWrapper, { moduleInfo: moduleInfo, accessLevel: dashboardAccessLevel }, moduleToolbarElement)));
|
|
61
60
|
}
|
|
62
61
|
else {
|
|
63
|
-
|
|
62
|
+
props.api.logError('Cannot find Dashboard Control for ' + visibleToolbarName);
|
|
64
63
|
}
|
|
65
64
|
}
|
|
66
65
|
}
|
|
@@ -78,7 +78,7 @@ const FilterSection = (props) => {
|
|
|
78
78
|
view: (React.createElement(PredicateEditor_1.PredicateEditor, { columnId: columnFilter.ColumnId, predicate: columnFilter.Predicate, predicateDefs: predicateDefs, onChange: (predicate) => handlePredicateEdit(predicate, columnFilter), onClear: () => handlePredicateEdit(null, columnFilter) })),
|
|
79
79
|
},
|
|
80
80
|
];
|
|
81
|
-
return (React.createElement(AdaptableObjectList_1.AdaptableObjectListItemView, { abObject: columnFilter, entityType: "Filter", showActions: true, showEditButton: false, items: items, onDelete: () => handleDelete(columnFilter), key: columnFilter.ColumnId }));
|
|
81
|
+
return (React.createElement(AdaptableObjectList_1.AdaptableObjectListItemView, { module: filterModule, abObject: columnFilter, entityType: "Filter", showActions: true, showEditButton: false, items: items, onDelete: () => handleDelete(columnFilter), key: columnFilter.ColumnId }));
|
|
82
82
|
}))))));
|
|
83
83
|
};
|
|
84
84
|
exports.FilterSection = FilterSection;
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.handleExportState = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const Helper_1 = tslib_1.__importDefault(require("../../Utilities/Helpers/Helper"));
|
|
6
|
-
const LoggingHelper_1 = require("../../Utilities/Helpers/LoggingHelper");
|
|
7
6
|
const handleExportState = (type, name, state) => {
|
|
8
7
|
switch (type) {
|
|
9
8
|
case 'Clipboard':
|
|
@@ -11,7 +10,7 @@ const handleExportState = (type, name, state) => {
|
|
|
11
10
|
Helper_1.default.copyToClipboard(stringifiedState);
|
|
12
11
|
break;
|
|
13
12
|
case 'Console':
|
|
14
|
-
(
|
|
13
|
+
console.log('Adaptable State: ', state);
|
|
15
14
|
break;
|
|
16
15
|
case 'JSON':
|
|
17
16
|
const jsonFileName = name + '.json';
|