@adaptabletools/adaptable-cjs 18.1.8 → 18.1.9
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/package.json +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/DataChangeHistoryOptions.d.ts +4 -0
- package/src/Api/DataChangeHistoryApi.d.ts +6 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.d.ts +2 -0
- package/src/Api/Implementation/DataChangeHistoryApiImpl.js +23 -2
- package/src/Api/Internal/GridInternalApi.js +12 -6
- package/src/PredefinedConfig/Common/AdaptableFormat.d.ts +9 -9
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +9 -8
- package/src/Redux/ActionsReducers/SystemRedux.js +11 -11
- package/src/Strategy/DataChangeHistoryModule.js +1 -2
- package/src/Utilities/Constants/DocumentationLinkConstants.d.ts +1 -0
- package/src/Utilities/Constants/DocumentationLinkConstants.js +2 -1
- package/src/Utilities/Helpers/FormatContentHelper.d.ts +22 -0
- package/src/Utilities/Helpers/FormatContentHelper.js +39 -0
- package/src/Utilities/Helpers/FormatHelper.d.ts +0 -18
- package/src/Utilities/Helpers/FormatHelper.js +5 -38
- package/src/View/Alert/Wizard/AlertMessageWizardSection.js +4 -3
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +32 -13
- package/src/agGrid/AdaptableAgGrid.d.ts +1 -0
- package/src/agGrid/AdaptableAgGrid.js +21 -0
- package/src/agGrid/AgGridMenuAdapter.js +15 -1
- package/src/agGrid/defaultAdaptableOptions.js +1 -0
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.d.ts +8 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -22,6 +22,8 @@ const FormatHelper_1 = tslib_1.__importDefault(require("../../../Utilities/Helpe
|
|
|
22
22
|
const Toggle_1 = require("../../../components/Toggle");
|
|
23
23
|
const GeneralConstants_1 = require("../../../Utilities/Constants/GeneralConstants");
|
|
24
24
|
const Textarea_1 = tslib_1.__importDefault(require("../../../components/Textarea"));
|
|
25
|
+
const ButtonInfo_1 = require("../../Components/Buttons/ButtonInfo");
|
|
26
|
+
const DocumentationLinkConstants_1 = require("../../../Utilities/Constants/DocumentationLinkConstants");
|
|
25
27
|
const DOLLAR_OPTIONS = {
|
|
26
28
|
FractionDigits: 2,
|
|
27
29
|
FractionSeparator: '.',
|
|
@@ -209,8 +211,8 @@ const renderDateFormat = (data, _onChange, setFormatOption, scopedCustomFormatte
|
|
|
209
211
|
},
|
|
210
212
|
] })))))));
|
|
211
213
|
};
|
|
212
|
-
const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatters,
|
|
213
|
-
var _a, _b, _c, _d, _e;
|
|
214
|
+
const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatters, api) => {
|
|
215
|
+
var _a, _b, _c, _d, _e, _f;
|
|
214
216
|
if (data.DisplayFormat.Formatter !== 'NumberFormatter') {
|
|
215
217
|
return null;
|
|
216
218
|
}
|
|
@@ -262,6 +264,7 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
262
264
|
data.DisplayFormat.Options.Multiplier === MILLION_OPTIONS.Multiplier; //isEqual(data.DisplayFormat.Options, MILLION_OPTIONS);
|
|
263
265
|
const IS_DOLLAR = data.DisplayFormat.Options.Prefix === '$'; //isEqual(data.DisplayFormat.Options, DOLLAR_OPTIONS);
|
|
264
266
|
const IS_STERLING = data.DisplayFormat.Options.Prefix === '£'; //isEqual(data.DisplayFormat, STERLING_OPTIONS);
|
|
267
|
+
const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
|
|
265
268
|
return (React.createElement(rebass_1.Box, { "data-name": 'format-column-display-format', padding: 2 },
|
|
266
269
|
React.createElement(Tabs_1.Tabs, null,
|
|
267
270
|
React.createElement(Tabs_1.Tabs.Tab, null, "Format"),
|
|
@@ -269,7 +272,8 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
269
272
|
React.createElement(rebass_1.Flex, { flexDirection: "row" },
|
|
270
273
|
React.createElement(FormLayout_1.default, { mr: 3 },
|
|
271
274
|
React.createElement(FormLayout_1.FormRow, { label: "Fraction Separator" },
|
|
272
|
-
React.createElement(Input_1.default, { "data-name": "fraction-separator", value: (_a = data.DisplayFormat.Options.FractionSeparator) !== null && _a !== void 0 ? _a : '', onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) })
|
|
275
|
+
React.createElement(Input_1.default, { "data-name": "fraction-separator", value: (_a = data.DisplayFormat.Options.FractionSeparator) !== null && _a !== void 0 ? _a : '', onChange: (e) => setFormatOption('FractionSeparator', e.currentTarget.value) }),
|
|
276
|
+
' '),
|
|
273
277
|
React.createElement(FormLayout_1.FormRow, { label: "Integer Separator" },
|
|
274
278
|
React.createElement(Input_1.default, { "data-name": "integer-separator", value: (_b = data.DisplayFormat.Options.IntegerSeparator) !== null && _b !== void 0 ? _b : '', onChange: (e) => setFormatOption('IntegerSeparator', e.currentTarget.value) })),
|
|
275
279
|
React.createElement(FormLayout_1.FormRow, { label: "Prefix" },
|
|
@@ -299,9 +303,6 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
299
303
|
React.createElement(FormLayout_1.FormRow, { label: "Multiplier" },
|
|
300
304
|
React.createElement(Input_1.default, { "data-name": "multiplier", type: "number", value: data.DisplayFormat.Options.Multiplier, onChange: (e) => setFormatOption('Multiplier', Number(e.currentTarget.value)) })),
|
|
301
305
|
' ',
|
|
302
|
-
React.createElement(FormLayout_1.FormRow, { label: "Content" },
|
|
303
|
-
React.createElement(Input_1.default, { "data-name": "content", value: (_e = data.DisplayFormat.Options.Content) !== null && _e !== void 0 ? _e : '', onChange: (e) => setFormatOption('Content', e.currentTarget.value) })),
|
|
304
|
-
' ',
|
|
305
306
|
React.createElement(FormLayout_1.FormRow, { label: "Parentheses" },
|
|
306
307
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "parentheses-checkbox", checked: data.DisplayFormat.Options.Parentheses, onChange: (checked) => setFormatOption('Parentheses', checked) })),
|
|
307
308
|
React.createElement(FormLayout_1.FormRow, { label: "Floor" },
|
|
@@ -325,6 +326,20 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
325
326
|
React.createElement(Radio_1.default, { "data-name": "preset-million", marginLeft: 3, checked: IS_MILLION, onChange: () => setDivideMillionPreset() }, "M (Million)"),
|
|
326
327
|
React.createElement(Radio_1.default, { "data-name": "preset-dollar", marginLeft: 3, checked: IS_DOLLAR, onChange: () => setDollarPreset() }, "Dollar"),
|
|
327
328
|
React.createElement(Radio_1.default, { "data-name": "preset-sterling", marginLeft: 3, checked: IS_STERLING, onChange: () => setSterlingPreset() }, "Sterling")))))),
|
|
329
|
+
React.createElement(Tabs_1.Tabs, { marginTop: 2, autoFocus: false, keyboardNavigation: false },
|
|
330
|
+
React.createElement(Tabs_1.Tabs.Tab, null, "Dynamic Content"),
|
|
331
|
+
React.createElement(Tabs_1.Tabs.Content, null,
|
|
332
|
+
React.createElement(rebass_1.Text, { padding: 2, fontSize: 2 }, "Provide dynamic content through the use of Placeholders"),
|
|
333
|
+
React.createElement(FormLayout_1.default, { margin: 2 },
|
|
334
|
+
React.createElement(FormLayout_1.FormRow, { label: "" },
|
|
335
|
+
React.createElement(Textarea_1.default, { minWidth: 300, rows: 3, placeholder: "", marginTop: 2, type: 'text', autoFocus: false, value: (_f = (_e = data.DisplayFormat.Options.Content) === null || _e === void 0 ? void 0 : _e.toString()) !== null && _f !== void 0 ? _f : '', onChange: (e) => setFormatOption('Content', e.currentTarget.value) }),
|
|
336
|
+
showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
|
|
337
|
+
fontSize: 'var(--ab-font-size-3)',
|
|
338
|
+
padding: 0,
|
|
339
|
+
} },
|
|
340
|
+
React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.FormatColumnPlaceholderDocsLink, '_blank') }),
|
|
341
|
+
"Learn more about using placeholders"))),
|
|
342
|
+
' '))),
|
|
328
343
|
React.createElement(Tabs_1.Tabs, { marginTop: 2, autoFocus: false, keyboardNavigation: false },
|
|
329
344
|
React.createElement(Tabs_1.Tabs.Tab, null, "Examples"),
|
|
330
345
|
React.createElement(Tabs_1.Tabs.Content, null,
|
|
@@ -354,11 +369,12 @@ const renderNumberFormat = (data, onChange, setFormatOption, scopedCustomFormatt
|
|
|
354
369
|
},
|
|
355
370
|
] })))));
|
|
356
371
|
};
|
|
357
|
-
const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormatters,
|
|
372
|
+
const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormatters, api) => {
|
|
358
373
|
var _a, _b, _c;
|
|
359
374
|
if (data.DisplayFormat.Formatter !== 'StringFormatter') {
|
|
360
375
|
return null;
|
|
361
376
|
}
|
|
377
|
+
const showDocumentationLinks = api.internalApi.isDocumentationLinksDisplayed();
|
|
362
378
|
return (React.createElement(rebass_1.Box, { "data-name": 'format-column-display-format', padding: 2 },
|
|
363
379
|
React.createElement(Tabs_1.Tabs, null,
|
|
364
380
|
React.createElement(Tabs_1.Tabs.Tab, null, "Format"),
|
|
@@ -377,10 +393,13 @@ const renderStringFormat = (data, _onChange, setFormatOption, scopedCustomFormat
|
|
|
377
393
|
React.createElement(FormLayout_1.FormRow, { label: "Suffix" },
|
|
378
394
|
React.createElement(Input_1.default, { "data-name": "suffix", value: (_b = data.DisplayFormat.Options.Suffix) !== null && _b !== void 0 ? _b : '', onChange: (e) => setFormatOption('Suffix', e.currentTarget.value) })),
|
|
379
395
|
React.createElement(FormLayout_1.FormRow, { label: "Content" },
|
|
380
|
-
React.createElement(Textarea_1.default, { minWidth: 300, rows: 3, placeholder: "
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
396
|
+
React.createElement(Textarea_1.default, { minWidth: 300, rows: 3, placeholder: "", marginTop: 2, type: 'text', autoFocus: false, value: (_c = data.DisplayFormat.Options.Content) !== null && _c !== void 0 ? _c : '', onChange: (e) => setFormatOption('Content', e.currentTarget.value) }),
|
|
397
|
+
showDocumentationLinks && (React.createElement(HelpBlock_1.default, { "data-name": "query-documentation", mt: 3, mb: 2, style: {
|
|
398
|
+
fontSize: 'var(--ab-font-size-3)',
|
|
399
|
+
padding: 0,
|
|
400
|
+
} },
|
|
401
|
+
React.createElement(ButtonInfo_1.ButtonInfo, { mr: 2, onClick: () => window.open(DocumentationLinkConstants_1.FormatColumnPlaceholderDocsLink, '_blank') }),
|
|
402
|
+
"See how to create dynamic Display Format using placeholders"))),
|
|
384
403
|
React.createElement(FormLayout_1.FormRow, { label: "Empty" },
|
|
385
404
|
React.createElement(CheckBox_1.CheckBox, { "data-name": "empty-checkbox", checked: data.DisplayFormat.Options.Empty, onChange: (checked) => setFormatOption('Empty', checked) })))))),
|
|
386
405
|
scopedCustomFormatters.length > 0 && (React.createElement(Tabs_1.Tabs, { marginTop: 2, keyboardNavigation: false },
|
|
@@ -423,13 +442,13 @@ const FormatColumnFormatWizardSection = (props) => {
|
|
|
423
442
|
const Type = data.DisplayFormat && data.DisplayFormat.Formatter;
|
|
424
443
|
const customScopedFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.columnScopeApi.isScopeInScope(data.Scope, displayFormatter.scope));
|
|
425
444
|
if (Type === 'NumberFormatter') {
|
|
426
|
-
return renderNumberFormat(data, update, setFormatOption, customScopedFormatters,
|
|
445
|
+
return renderNumberFormat(data, update, setFormatOption, customScopedFormatters, adaptable.api);
|
|
427
446
|
}
|
|
428
447
|
if (Type === 'DateFormatter') {
|
|
429
448
|
return renderDateFormat(data, update, setFormatOption, customScopedFormatters);
|
|
430
449
|
}
|
|
431
450
|
if (Type === 'StringFormatter') {
|
|
432
|
-
return renderStringFormat(data, update, setFormatOption, customScopedFormatters,
|
|
451
|
+
return renderStringFormat(data, update, setFormatOption, customScopedFormatters, adaptable.api);
|
|
433
452
|
}
|
|
434
453
|
return (React.createElement(HelpBlock_1.default, { margin: 3 },
|
|
435
454
|
"Setting a Display Format is only possible if ",
|
|
@@ -244,6 +244,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
244
244
|
private addDistinctColumnValue;
|
|
245
245
|
private getUniqueGridCells;
|
|
246
246
|
getGridCellsForColumn(columnId: string, onlyVisibleRows?: boolean): GridCell[] | undefined;
|
|
247
|
+
getGridCellsForColumnTemp(columnId: string, onlyVisibleRows: boolean): GridCell[] | undefined;
|
|
247
248
|
getRowNodesForPrimaryKeys(primaryKeyValues: any[]): any[];
|
|
248
249
|
getRowNodeByIndex(index: number): IRowNode;
|
|
249
250
|
getAgGridStatusPanels(): import("@ag-grid-community/core").StatusPanelDef[];
|
|
@@ -2383,6 +2383,27 @@ class AdaptableAgGrid {
|
|
|
2383
2383
|
}
|
|
2384
2384
|
return returnValues;
|
|
2385
2385
|
}
|
|
2386
|
+
// This horrible method is temporary until we can get rid of having predicates inside values which is coming soon
|
|
2387
|
+
// We need it in case Blanks is requested
|
|
2388
|
+
// once we go to the new multi predicate screen then we wont show blanks any more - which we should never have done
|
|
2389
|
+
getGridCellsForColumnTemp(columnId, onlyVisibleRows) {
|
|
2390
|
+
let returnValues = [];
|
|
2391
|
+
const handler = (rowNode) => {
|
|
2392
|
+
if (!this.isGroupRowNode(rowNode)) {
|
|
2393
|
+
const gridCell = this.getGridCellFromRowNode(rowNode, columnId);
|
|
2394
|
+
if (gridCell) {
|
|
2395
|
+
returnValues.push(gridCell);
|
|
2396
|
+
}
|
|
2397
|
+
}
|
|
2398
|
+
};
|
|
2399
|
+
if (onlyVisibleRows) {
|
|
2400
|
+
this.agGridAdapter.getAgGridApi().forEachNodeAfterFilter(handler);
|
|
2401
|
+
}
|
|
2402
|
+
else {
|
|
2403
|
+
this.agGridAdapter.getAgGridApi().forEachNode(handler);
|
|
2404
|
+
}
|
|
2405
|
+
return returnValues;
|
|
2406
|
+
}
|
|
2386
2407
|
getRowNodesForPrimaryKeys(primaryKeyValues) {
|
|
2387
2408
|
let rowNodes = [];
|
|
2388
2409
|
if (this.useRowNodeLookUp) {
|
|
@@ -474,6 +474,20 @@ class AgGridMenuAdapter {
|
|
|
474
474
|
...gridInfoMenuItems,
|
|
475
475
|
],
|
|
476
476
|
};
|
|
477
|
+
/*
|
|
478
|
+
const calculatedColumnMenuItem: AdaptableMenuItem = {
|
|
479
|
+
name: 'calculated-column-group',
|
|
480
|
+
label: 'Calculated Column',
|
|
481
|
+
module: 'CalculatedColumn',
|
|
482
|
+
isVisible: true,
|
|
483
|
+
icon: {
|
|
484
|
+
name: 'columns',
|
|
485
|
+
},
|
|
486
|
+
subItems: [
|
|
487
|
+
...calculatedColumnMenuItems,
|
|
488
|
+
],
|
|
489
|
+
};
|
|
490
|
+
*/
|
|
477
491
|
const columnMenuItem = {
|
|
478
492
|
name: 'column-group',
|
|
479
493
|
label: 'Column',
|
|
@@ -484,7 +498,6 @@ class AgGridMenuAdapter {
|
|
|
484
498
|
},
|
|
485
499
|
subItems: [
|
|
486
500
|
...columnActionGroup,
|
|
487
|
-
...calculatedColumnMenuItems,
|
|
488
501
|
...freeTextColumnMenuItems,
|
|
489
502
|
...customSortMenuItems,
|
|
490
503
|
...plusMinusMenuItems,
|
|
@@ -503,6 +516,7 @@ class AgGridMenuAdapter {
|
|
|
503
516
|
subItems: [...formatColumnMenuItems, ...styledColumnMenuItems, ...flashingCellMenuItems],
|
|
504
517
|
};
|
|
505
518
|
return this.removeConsecutiveSeparators([
|
|
519
|
+
...calculatedColumnMenuItems,
|
|
506
520
|
...settingsPanelMenuItems,
|
|
507
521
|
...dashboardMenuItems,
|
|
508
522
|
...columnFilterGroup,
|
package/src/env.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.default = {
|
|
4
4
|
INFINITE_TABLE_LICENSE_KEY: "StartDate=2021-06-29|EndDate=2030-01-01|Owner=Adaptable|Type=distribution|TS=1624971462479|C=137829811,1004007071,2756196225,1839832928,3994409405,636616862" || '',
|
|
5
|
-
PUBLISH_TIMESTAMP:
|
|
6
|
-
VERSION: "18.1.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1721129487775 || Date.now(),
|
|
6
|
+
VERSION: "18.1.9" || '--current-version--',
|
|
7
7
|
};
|
|
@@ -2751,6 +2751,14 @@ export declare const ADAPTABLE_METAMODEL: {
|
|
|
2751
2751
|
gridInfo: string;
|
|
2752
2752
|
defVal: string;
|
|
2753
2753
|
noCode?: undefined;
|
|
2754
|
+
} | {
|
|
2755
|
+
name: string;
|
|
2756
|
+
kind: string;
|
|
2757
|
+
desc: string;
|
|
2758
|
+
isOpt: boolean;
|
|
2759
|
+
gridInfo?: undefined;
|
|
2760
|
+
noCode?: undefined;
|
|
2761
|
+
defVal?: undefined;
|
|
2754
2762
|
})[];
|
|
2755
2763
|
};
|
|
2756
2764
|
DataFormatDataType: {
|