@adaptabletools/adaptable 13.0.1 → 13.0.3
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 +149 -143
- package/package.json +1 -1
- package/publishTimestamp.d.ts +1 -1
- package/publishTimestamp.js +1 -1
- package/src/AdaptableInterfaces/IAdaptable.d.ts +1 -0
- package/src/AdaptableOptions/ActionOptions.d.ts +15 -1
- package/src/AdaptableOptions/AdaptableOptions.d.ts +1 -0
- package/src/AdaptableOptions/AdaptableQLOptions.d.ts +1 -0
- package/src/AdaptableOptions/FilterOptions.d.ts +6 -0
- package/src/AdaptableOptions/GeneralOptions.d.ts +2 -0
- package/src/AdaptableOptions/LayoutOptions.d.ts +1 -0
- package/src/AdaptableOptions/NotificationsOptions.d.ts +2 -1
- package/src/Api/EventApi.d.ts +13 -22
- package/src/Api/Implementation/StyledColumnApiImpl.d.ts +1 -0
- package/src/Api/Implementation/StyledColumnApiImpl.js +17 -0
- package/src/Api/StyledColumnApi.d.ts +5 -0
- package/src/PredefinedConfig/LayoutState.d.ts +1 -1
- package/src/Strategy/FilterModule.js +1 -1
- package/src/Strategy/LayoutModule.js +7 -1
- package/src/Utilities/Defaults/DefaultAdaptableOptions.js +1 -0
- package/src/Utilities/Extensions/StringExtensions.d.ts +2 -0
- package/src/Utilities/Extensions/StringExtensions.js +21 -1
- package/src/Utilities/Services/CalculatedColumnExpressionService.js +1 -1
- package/src/Utilities/Services/Interface/IMetamodelService.d.ts +1 -0
- package/src/Utilities/Services/MetamodelService.js +6 -4
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.d.ts +3 -5
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/AdaptableOptionsForm.js +103 -92
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.d.ts +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ColumnsList.js +2 -2
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizard.js +4 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/ConfigurationWizardColumnsStep.js +8 -3
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/EntitlementsForm.js +7 -34
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/FinanceForm/FinanceForm.js +7 -7
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/GridOptionsForm.js +2 -1
- package/src/View/AdaptableWizardView/AdaptableConfigurationDialog/UIOptions/UiOptionsForm.js +2 -1
- package/src/View/Components/FilterForm/QuickFilterForm.js +2 -2
- package/src/agGrid/ActionColumnRenderer.js +2 -0
- package/src/agGrid/Adaptable.d.ts +2 -0
- package/src/agGrid/Adaptable.js +76 -52
- package/src/metamodel/adaptable.metamodel.d.ts +87 -0
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +2 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adaptabletools/adaptable",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.3",
|
|
4
4
|
"description": "Powerful data-agnostic HTML5 datagrid add-on that sits on top of an underlying grid component and provides all the rich functionality that advanced users expect from their DataGrids and Data Tables",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"web-components",
|
package/publishTimestamp.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default:
|
|
1
|
+
declare const _default: 1665998146027;
|
|
2
2
|
export default _default;
|
package/publishTimestamp.js
CHANGED
|
@@ -129,6 +129,7 @@ export interface IAdaptable {
|
|
|
129
129
|
redrawRow(rowNode: RowNode): void;
|
|
130
130
|
redrawRows(rowNodes: RowNode[]): void;
|
|
131
131
|
refreshCells(rowNodes: RowNode[], columns: (string | any)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
132
|
+
refreshColumns(columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
132
133
|
setSelectedCells(): SelectedCellInfo | undefined;
|
|
133
134
|
setSelectedRows(): SelectedRowInfo | undefined;
|
|
134
135
|
jumpToRow(rowNode: RowNode): void;
|
|
@@ -13,7 +13,13 @@ export interface ActionOptions {
|
|
|
13
13
|
*
|
|
14
14
|
* @defaultValue undefined
|
|
15
15
|
*/
|
|
16
|
-
actionRowButtons?:
|
|
16
|
+
actionRowButtons?: ActionRowButtonType[];
|
|
17
|
+
/**
|
|
18
|
+
* Optional custom configuration that, when specified, merges with the built-in action row button and overrides the default configuration
|
|
19
|
+
*
|
|
20
|
+
* @defaultValue undefined
|
|
21
|
+
*/
|
|
22
|
+
actionRowButtonCustomConfiguration?: (context: ActionRowButtonCustomConfigurationContext) => Partial<AdaptableButton<ActionColumnContext>>;
|
|
17
23
|
/**
|
|
18
24
|
* Position of supplied Action Buttons
|
|
19
25
|
*
|
|
@@ -84,6 +90,10 @@ export interface ActionColumnContext extends BaseContext {
|
|
|
84
90
|
* Current AG Grid Row Node
|
|
85
91
|
*/
|
|
86
92
|
rowNode: RowNode;
|
|
93
|
+
/**
|
|
94
|
+
* The row's data
|
|
95
|
+
*/
|
|
96
|
+
data: any;
|
|
87
97
|
}
|
|
88
98
|
/**
|
|
89
99
|
* Set of optional properties that define an Action Columns behaviour
|
|
@@ -179,3 +189,7 @@ export interface FormFieldLabelContext extends BaseContext {
|
|
|
179
189
|
column: AdaptableColumn;
|
|
180
190
|
rowNode?: RowNode;
|
|
181
191
|
}
|
|
192
|
+
export declare type ActionRowButtonType = 'create' | 'clone' | 'edit' | 'delete';
|
|
193
|
+
export interface ActionRowButtonCustomConfigurationContext extends BaseContext {
|
|
194
|
+
actionRowButtonType: ActionRowButtonType;
|
|
195
|
+
}
|
|
@@ -23,6 +23,7 @@ export interface FilterOptions {
|
|
|
23
23
|
*
|
|
24
24
|
* @defaultValue 2,000
|
|
25
25
|
* @gridInfoItem
|
|
26
|
+
* @noCodeItem
|
|
26
27
|
*/
|
|
27
28
|
maxFilterValuesToDisplay?: number;
|
|
28
29
|
/**
|
|
@@ -30,12 +31,14 @@ export interface FilterOptions {
|
|
|
30
31
|
*
|
|
31
32
|
* @defaultValue true
|
|
32
33
|
* @gridInfoItem
|
|
34
|
+
* @noCodeItem
|
|
33
35
|
*/
|
|
34
36
|
indicateFilteredColumns?: boolean;
|
|
35
37
|
/**
|
|
36
38
|
* Uses Adaptable's Filter Form in Column Menu for all columns if 'true' (the default) or those listed, in preference to AG Grid's Filter Form
|
|
37
39
|
*
|
|
38
40
|
* @defaultValue true
|
|
41
|
+
* @noCodeItem
|
|
39
42
|
*/
|
|
40
43
|
useAdaptableFilterForm?: boolean | string[];
|
|
41
44
|
/**
|
|
@@ -43,6 +46,7 @@ export interface FilterOptions {
|
|
|
43
46
|
*
|
|
44
47
|
* @defaultValue true
|
|
45
48
|
* @gridInfoItem
|
|
49
|
+
* @noCodeItem
|
|
46
50
|
*/
|
|
47
51
|
useAgGridFilterFormStyle?: boolean;
|
|
48
52
|
/**
|
|
@@ -50,6 +54,7 @@ export interface FilterOptions {
|
|
|
50
54
|
*
|
|
51
55
|
* @defaultValue true
|
|
52
56
|
* @gridInfoItem
|
|
57
|
+
* @noCodeItem
|
|
53
58
|
*/
|
|
54
59
|
useAdaptableQuickFilter?: boolean | string[];
|
|
55
60
|
/**
|
|
@@ -90,6 +95,7 @@ export interface FilterOptions {
|
|
|
90
95
|
*
|
|
91
96
|
* @defaultValue true
|
|
92
97
|
* @gridInfoItem
|
|
98
|
+
* @noCodeItem
|
|
93
99
|
*/
|
|
94
100
|
autoApplyFilter?: boolean;
|
|
95
101
|
/**
|
|
@@ -52,7 +52,7 @@ export interface NotificationsOptions {
|
|
|
52
52
|
*/
|
|
53
53
|
isDraggable?: boolean;
|
|
54
54
|
/**
|
|
55
|
-
* How Notification will appear:
|
|
55
|
+
* How Notification will appear: Bounce, Slide, Zoom or Flip
|
|
56
56
|
*
|
|
57
57
|
* @defaultValue 'Slide'
|
|
58
58
|
* @gridInfoItem
|
|
@@ -70,6 +70,7 @@ export interface NotificationsOptions {
|
|
|
70
70
|
*
|
|
71
71
|
* @defaultValue 100
|
|
72
72
|
* @gridInfoItem
|
|
73
|
+
* @transition
|
|
73
74
|
*/
|
|
74
75
|
maxSystemMessagesInStore?: number;
|
|
75
76
|
/**
|
package/src/Api/EventApi.d.ts
CHANGED
|
@@ -1,25 +1,4 @@
|
|
|
1
|
-
import { SelectionChangedInfo } from '
|
|
2
|
-
import { LiveDataChangedInfo } from './Events/LiveDataChanged';
|
|
3
|
-
import { DashboardChangedInfo } from './Events/DashboardChanged';
|
|
4
|
-
import { ThemeChangedInfo } from './Events/ThemeChanged';
|
|
5
|
-
import { AlertFiredInfo } from './Events/AlertFired';
|
|
6
|
-
import { LayoutChangedInfo } from './Events/LayoutChanged';
|
|
7
|
-
import { SearchChangedInfo } from './Events/SearchChanged';
|
|
8
|
-
import { AdaptableReadyInfo } from './Events/AdaptableReady';
|
|
9
|
-
import { CustomToolbarConfiguredInfo } from './Events/CustomToolbarConfigured';
|
|
10
|
-
import { CellChangedInfo } from './Events/CellChanged';
|
|
11
|
-
import { SystemStatusMessageDisplayedInfo } from './Events/SystemStatusMessageDisplayed';
|
|
12
|
-
import { CheckboxColumnClickedInfo } from './Events/ChexboxColumnClicked';
|
|
13
|
-
import { AdaptableStateChangedInfo } from './Events/AdaptableStateChanged';
|
|
14
|
-
import { FlashingCellDisplayedInfo } from './Events/FlashingCellDisplayed';
|
|
15
|
-
import { GridDataChangedInfo } from './Events/GridDataChanged';
|
|
16
|
-
import { TeamSharingEntityChangedInfo } from './Events/TeamSharingEntityChanged';
|
|
17
|
-
import { ActionRowSubmittedInfo } from './Events/ActionRowSubmitted';
|
|
18
|
-
import { DataSetSelectedInfo } from './Events/DataSetSelected';
|
|
19
|
-
import { AdaptableStateReloadedInfo } from './Events/AdaptableStateReloaded';
|
|
20
|
-
import { GridSortedInfo } from './Events/GridSorted';
|
|
21
|
-
import { QueryRunInfo } from './Events/QueryRun';
|
|
22
|
-
import { FilterAppliedInfo } from './Events/FilterApplied';
|
|
1
|
+
import { AdaptableFDC3EventInfo, SelectionChangedInfo, LiveDataChangedInfo, DashboardChangedInfo, ThemeChangedInfo, AlertFiredInfo, LayoutChangedInfo, SearchChangedInfo, AdaptableReadyInfo, CustomToolbarConfiguredInfo, CellChangedInfo, SystemStatusMessageDisplayedInfo, CheckboxColumnClickedInfo, AdaptableStateChangedInfo, FlashingCellDisplayedInfo, GridDataChangedInfo, TeamSharingEntityChangedInfo, ActionRowSubmittedInfo, DataSetSelectedInfo, AdaptableStateReloadedInfo, GridSortedInfo, QueryRunInfo, FilterAppliedInfo } from '../types';
|
|
23
2
|
/**
|
|
24
3
|
* Responsible for publishing the many Events that AdapTable fires
|
|
25
4
|
*/
|
|
@@ -298,6 +277,18 @@ export interface EventApi {
|
|
|
298
277
|
* Unsubscribe from AdaptableReady
|
|
299
278
|
*/
|
|
300
279
|
off(eventName: 'AdaptableReady', callback: (adaptableReadyInfo: AdaptableReadyInfo) => void): void;
|
|
280
|
+
/**
|
|
281
|
+
* Fired when an FDC3Message is sent
|
|
282
|
+
* @param eventName - FDC3MessageSent
|
|
283
|
+
* @param callback - A callback for listening to `FDC3MessageSent`
|
|
284
|
+
* @returns the unsubscribe function
|
|
285
|
+
*
|
|
286
|
+
*/
|
|
287
|
+
on(eventName: 'FDC3MessageSent', callback: (eventInfo: AdaptableFDC3EventInfo) => void): VoidFunction;
|
|
288
|
+
/**
|
|
289
|
+
* Unsubscribe from FDC3MessageSent
|
|
290
|
+
*/
|
|
291
|
+
off(eventName: 'FDC3MessageSent', callback: (eventInfo: AdaptableFDC3EventInfo) => void): void;
|
|
301
292
|
emitSync(eventName: 'DashboardChanged', data?: any): any[];
|
|
302
293
|
emitSync(eventName: 'FlashingCellDisplayed', data?: any): any[];
|
|
303
294
|
emitSync(eventName: 'AdaptableDestroy'): any[];
|
|
@@ -17,6 +17,7 @@ export declare class StyledColumnApiImpl extends ApiBase implements StyledColumn
|
|
|
17
17
|
getCellColorRangeMinValue(range: CellColorRange, column: AdaptableColumn): number | undefined;
|
|
18
18
|
getCellColorRangeMaxValue(range: CellColorRange, column: AdaptableColumn): number | undefined;
|
|
19
19
|
getColumnComparisonForStyledColumn(styledColumn: StyledColumn): ColumnComparison | undefined;
|
|
20
|
+
hasStyledColumnRelativeCellRange(styledColumn: StyledColumn): boolean;
|
|
20
21
|
getColumnIdsFromColumnComparison(columnComparison: ColumnComparison): string[];
|
|
21
22
|
getCheckBoxStyleStyledColumn(column: AdaptableColumn): StyledColumn | undefined;
|
|
22
23
|
isCheckBoxStyleStyledColumn(column: AdaptableColumn): boolean;
|
|
@@ -146,6 +146,23 @@ class StyledColumnApiImpl extends ApiBase_1.ApiBase {
|
|
|
146
146
|
}
|
|
147
147
|
return undefined;
|
|
148
148
|
}
|
|
149
|
+
hasStyledColumnRelativeCellRange(styledColumn) {
|
|
150
|
+
var _a, _b, _c;
|
|
151
|
+
let cellColorRange = null;
|
|
152
|
+
if (styledColumn.GradientStyle) {
|
|
153
|
+
if ((_a = styledColumn.GradientStyle) === null || _a === void 0 ? void 0 : _a.CellRanges) {
|
|
154
|
+
cellColorRange = styledColumn.GradientStyle.CellRanges;
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
if (styledColumn.PercentBarStyle) {
|
|
158
|
+
if ((_b = styledColumn.PercentBarStyle) === null || _b === void 0 ? void 0 : _b.CellRanges) {
|
|
159
|
+
cellColorRange = styledColumn.PercentBarStyle.CellRanges;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
return ((_c = cellColorRange === null || cellColorRange === void 0 ? void 0 : cellColorRange.some((cellColorRange) => {
|
|
163
|
+
return cellColorRange.Min == 'Col-Min' || cellColorRange.Max == 'Col-Max';
|
|
164
|
+
})) !== null && _c !== void 0 ? _c : false);
|
|
165
|
+
}
|
|
149
166
|
getColumnIdsFromColumnComparison(columnComparison) {
|
|
150
167
|
let returnValues = [];
|
|
151
168
|
if (typeof columnComparison.MinValue === 'string') {
|
|
@@ -84,6 +84,11 @@ export interface StyledColumnApi {
|
|
|
84
84
|
* @param columnComparision Column Comparison to check
|
|
85
85
|
*/
|
|
86
86
|
getColumnIdsFromColumnComparison(columnComparision: ColumnComparison): string[];
|
|
87
|
+
/**
|
|
88
|
+
* Checks if the styled column has a range with a relative value
|
|
89
|
+
* @param styledColumn Styled Column to Add
|
|
90
|
+
*/
|
|
91
|
+
hasStyledColumnRelativeCellRange(styledCOlumn: StyledColumn): boolean;
|
|
87
92
|
/**
|
|
88
93
|
* Returns first Styled Column that contains checkbox style
|
|
89
94
|
* @param columnId column to check
|
|
@@ -51,7 +51,7 @@ export interface Layout extends AdaptableObject {
|
|
|
51
51
|
*/
|
|
52
52
|
ExpandedRowGroupValues?: any[];
|
|
53
53
|
/**
|
|
54
|
-
* Columns showing aggregated values in grouped rows;
|
|
54
|
+
* Columns showing aggregated values in grouped rows; 1st value in record is Column name, 2nd is either aggfunc (e.g. sum, avg etc.) or 'true' (to use default aggfunc)
|
|
55
55
|
*/
|
|
56
56
|
AggregationColumns?: AggregationColumns;
|
|
57
57
|
/**
|
|
@@ -58,7 +58,7 @@ class FilterModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
58
58
|
if (column && this.api.gridApi.isQuickFilterAvailable()) {
|
|
59
59
|
const isFilterVisible = this.api.filterApi.isQuickFilterVisible();
|
|
60
60
|
if (this.isModuleEditable() && this.api.columnApi.usesAdaptableQuickFilter(column.columnId)) {
|
|
61
|
-
baseMenuItems.push(this.createColumnMenuItemReduxAction(isFilterVisible ? 'Hide
|
|
61
|
+
baseMenuItems.push(this.createColumnMenuItemReduxAction(isFilterVisible ? 'Hide Filter Bar' : 'Show Filter Bar', isFilterVisible ? 'unchecked' : 'check', isFilterVisible
|
|
62
62
|
? SystemRedux.SystemQuickFilterBarHide()
|
|
63
63
|
: SystemRedux.SystemQuickFilterBarShow()));
|
|
64
64
|
}
|
|
@@ -227,7 +227,13 @@ class LayoutModule extends AdaptableModuleBase_1.AdaptableModuleBase {
|
|
|
227
227
|
name: 'Layout Grid Type',
|
|
228
228
|
values: [(layout === null || layout === void 0 ? void 0 : layout.EnablePivot) ? 'Pivot' : 'Table'],
|
|
229
229
|
},
|
|
230
|
-
|
|
230
|
+
/**
|
|
231
|
+
* Hide pivot columns.
|
|
232
|
+
*
|
|
233
|
+
* The generated pivot columns cannot be prevented from beeing on the layout object.
|
|
234
|
+
* When they are removed/not added, they no longer apear in the grid.
|
|
235
|
+
*/
|
|
236
|
+
!layout.EnablePivot && {
|
|
231
237
|
name: 'Columns',
|
|
232
238
|
values: columns,
|
|
233
239
|
},
|
|
@@ -94,6 +94,7 @@ exports.DefaultAdaptableOptions = {
|
|
|
94
94
|
actionOptions: {
|
|
95
95
|
actionColumns: undefined,
|
|
96
96
|
actionRowButtons: undefined,
|
|
97
|
+
actionRowButtonCustomConfiguration: undefined,
|
|
97
98
|
actionRowButtonsPosition: 'pinnedLeft',
|
|
98
99
|
autoHandleActionRowButtons: false,
|
|
99
100
|
setPrimaryKeyValue: undefined,
|
|
@@ -16,6 +16,7 @@ export declare function CapitaliseFirstLetter(str: string): string;
|
|
|
16
16
|
export declare function Humanize(str: string): string;
|
|
17
17
|
export declare function ReplaceEmptySpacesWithUnderscore(str?: string): string;
|
|
18
18
|
export declare function IsNumeric(str: string): boolean;
|
|
19
|
+
export declare function UnescapeHtmlEntities(str: string): string;
|
|
19
20
|
export declare const StringExtensions: {
|
|
20
21
|
IsNull: typeof IsNull;
|
|
21
22
|
IsNotNull: typeof IsNotNull;
|
|
@@ -35,5 +36,6 @@ export declare const StringExtensions: {
|
|
|
35
36
|
Humanize: typeof Humanize;
|
|
36
37
|
ReplaceEmptySpacesWithUnderscore: typeof ReplaceEmptySpacesWithUnderscore;
|
|
37
38
|
IsNumeric: typeof IsNumeric;
|
|
39
|
+
UnescapeHtmlEntities: typeof UnescapeHtmlEntities;
|
|
38
40
|
};
|
|
39
41
|
export default StringExtensions;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.StringExtensions = exports.IsNumeric = exports.ReplaceEmptySpacesWithUnderscore = exports.Humanize = exports.CapitaliseFirstLetter = exports.AbbreviateString = exports.NotIncludes = exports.Includes = exports.ToLowerCase = exports.RemoveTrailingComma = exports.CamelCaseToHumanText = exports.IsNotNullOrEmptyOrWhiteSpace = exports.IsNullOrEmptyOrWhiteSpace = exports.IsNotNullOrEmpty = exports.IsNullOrEmpty = exports.IsNotEmpty = exports.IsEmpty = exports.IsNotNull = exports.IsNull = void 0;
|
|
3
|
+
exports.StringExtensions = exports.UnescapeHtmlEntities = exports.IsNumeric = exports.ReplaceEmptySpacesWithUnderscore = exports.Humanize = exports.CapitaliseFirstLetter = exports.AbbreviateString = exports.NotIncludes = exports.Includes = exports.ToLowerCase = exports.RemoveTrailingComma = exports.CamelCaseToHumanText = exports.IsNotNullOrEmptyOrWhiteSpace = exports.IsNullOrEmptyOrWhiteSpace = exports.IsNotNullOrEmpty = exports.IsNullOrEmpty = exports.IsNotEmpty = exports.IsEmpty = exports.IsNotNull = exports.IsNull = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const startCase_1 = tslib_1.__importDefault(require("lodash/startCase"));
|
|
6
6
|
function IsNull(stringToCheck) {
|
|
@@ -88,6 +88,25 @@ function IsNumeric(str) {
|
|
|
88
88
|
return !isNaN(parseFloat(str));
|
|
89
89
|
}
|
|
90
90
|
exports.IsNumeric = IsNumeric;
|
|
91
|
+
function UnescapeHtmlEntities(str) {
|
|
92
|
+
if (!str || typeof str !== 'string') {
|
|
93
|
+
return str;
|
|
94
|
+
}
|
|
95
|
+
let preparedStr = str;
|
|
96
|
+
const map = [
|
|
97
|
+
{ target: /'|'/gi, replacement: "'" },
|
|
98
|
+
{ target: /"|"/gi, replacement: '"' },
|
|
99
|
+
{ target: /&|&/gi, replacement: '&' },
|
|
100
|
+
{ target: /<|</gi, replacement: '<' },
|
|
101
|
+
{ target: />|>/gi, replacement: '>' },
|
|
102
|
+
{ target: / | /gi, replacement: ' ' },
|
|
103
|
+
];
|
|
104
|
+
for (const transform of map) {
|
|
105
|
+
preparedStr = preparedStr.replace(transform.target, transform.replacement);
|
|
106
|
+
}
|
|
107
|
+
return preparedStr;
|
|
108
|
+
}
|
|
109
|
+
exports.UnescapeHtmlEntities = UnescapeHtmlEntities;
|
|
91
110
|
exports.StringExtensions = {
|
|
92
111
|
IsNull,
|
|
93
112
|
IsNotNull,
|
|
@@ -107,5 +126,6 @@ exports.StringExtensions = {
|
|
|
107
126
|
Humanize,
|
|
108
127
|
ReplaceEmptySpacesWithUnderscore,
|
|
109
128
|
IsNumeric,
|
|
129
|
+
UnescapeHtmlEntities,
|
|
110
130
|
};
|
|
111
131
|
exports.default = exports.StringExtensions;
|
|
@@ -133,7 +133,7 @@ class CalculatedColumnExpressionService {
|
|
|
133
133
|
this.aggregatedScalarLiveValuesMap.set(calculatedColumn.Uuid, aggregatedScalarLiveValue);
|
|
134
134
|
}
|
|
135
135
|
catch (e) {
|
|
136
|
-
(0, LoggingHelper_1.LogAdaptableError)(`Creating CalculatedColumn ('${(_c = calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.AggregatedScalarExpression}') failed
|
|
136
|
+
(0, LoggingHelper_1.LogAdaptableError)(`Creating CalculatedColumn ('${(_c = calculatedColumn.Query) === null || _c === void 0 ? void 0 : _c.AggregatedScalarExpression}') failed!`, e.message);
|
|
137
137
|
}
|
|
138
138
|
}
|
|
139
139
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MetamodelService = void 0;
|
|
4
|
+
const tslib_1 = require("tslib");
|
|
4
5
|
const adaptable_metamodel_1 = require("../../metamodel/adaptable.metamodel");
|
|
5
6
|
const DefaultAdaptableOptions_1 = require("../Defaults/DefaultAdaptableOptions");
|
|
6
7
|
const LoggingHelper_1 = require("../Helpers/LoggingHelper");
|
|
7
8
|
const DocumentationLinkConstants_1 = require("../Constants/DocumentationLinkConstants");
|
|
9
|
+
const StringExtensions_1 = tslib_1.__importDefault(require("../Extensions/StringExtensions"));
|
|
8
10
|
const supportedMetamodelTypes = [
|
|
9
11
|
'string',
|
|
10
12
|
'number',
|
|
@@ -99,7 +101,7 @@ class MetamodelService {
|
|
|
99
101
|
return gridInfoOptions;
|
|
100
102
|
}
|
|
101
103
|
// root-level properties are grouped in a synthetic 'Base Options' container
|
|
102
|
-
const baseOptionsItems = this.mapGridInfoContainerItems(adaptableOptionsMetamodel, adaptableOptionsValues, adaptableOptionsDefaultValues);
|
|
104
|
+
const baseOptionsItems = this.mapGridInfoContainerItems(adaptableOptionsMetamodel, adaptableOptionsValues, adaptableOptionsDefaultValues, filterItemProperty);
|
|
103
105
|
gridInfoOptions.set('baseOptions', {
|
|
104
106
|
containerLabel: 'Base Options',
|
|
105
107
|
items: baseOptionsItems,
|
|
@@ -130,14 +132,14 @@ class MetamodelService {
|
|
|
130
132
|
return gridInfoOptions;
|
|
131
133
|
}
|
|
132
134
|
mapGridInfoContainerItems(optionItemContainer, adaptableOptionsValues, defaultAdaptableOptionsValues, filter = (itemProperty) => itemProperty.gridInfo === 'item') {
|
|
133
|
-
|
|
134
|
-
return (_a = optionItemContainer.properties) === null || _a === void 0 ? void 0 : _a.filter(filter).map((itemProperty) => {
|
|
135
|
+
return optionItemContainer.properties.filter(filter).map((itemProperty) => {
|
|
135
136
|
return {
|
|
136
137
|
name: itemProperty.name,
|
|
137
138
|
value: adaptableOptionsValues === null || adaptableOptionsValues === void 0 ? void 0 : adaptableOptionsValues[itemProperty.name],
|
|
138
139
|
defaultValue: defaultAdaptableOptionsValues[itemProperty.name],
|
|
139
140
|
kind: itemProperty.kind,
|
|
140
|
-
description: itemProperty.description,
|
|
141
|
+
description: StringExtensions_1.default.UnescapeHtmlEntities(itemProperty.description),
|
|
142
|
+
uiLabel: itemProperty.uiLabel,
|
|
141
143
|
};
|
|
142
144
|
});
|
|
143
145
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { AdaptableOptions } from '../../../types';
|
|
3
|
-
|
|
3
|
+
export declare const AdaptableOptionsForm: React.FunctionComponent<{
|
|
4
4
|
adaptableOptions: AdaptableOptions;
|
|
5
5
|
onChangeadAptableOptions: (adaptableOptions: AdaptableOptions) => void;
|
|
6
|
-
}
|
|
7
|
-
declare const AdaptableOptionsForm: (props: AdaptableOptionsFormOptions) => JSX.Element;
|
|
8
|
-
export default AdaptableOptionsForm;
|
|
6
|
+
}>;
|