@adaptabletools/adaptable-cjs 18.0.0-canary.31 → 18.0.0-canary.32
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/Api/AdaptableApi.d.ts +2 -2
- package/src/Api/{ScopeApi.d.ts → ColumnScopeApi.d.ts} +2 -2
- package/src/Api/GridApi.d.ts +5 -0
- package/src/Api/Implementation/AdaptableApiImpl.d.ts +2 -2
- package/src/Api/Implementation/AdaptableApiImpl.js +3 -3
- package/src/Api/Implementation/AlertApiImpl.js +3 -3
- package/src/Api/Implementation/ApiBase.d.ts +2 -2
- package/src/Api/Implementation/ApiBase.js +2 -2
- package/src/Api/Implementation/ColumnFilterApiImpl.js +1 -1
- package/src/Api/Implementation/{ScopeApiImpl.d.ts → ColumnScopeApiImpl.d.ts} +2 -2
- package/src/Api/Implementation/{ScopeApiImpl.js → ColumnScopeApiImpl.js} +4 -4
- package/src/Api/Implementation/FlashingCellApiImpl.js +1 -1
- package/src/Api/Implementation/FormatColumnApiImpl.js +3 -3
- package/src/Api/Implementation/GridApiImpl.d.ts +1 -0
- package/src/Api/Implementation/GridApiImpl.js +5 -0
- package/src/Api/Implementation/UserInterfaceApiImpl.js +3 -3
- package/src/Api/Internal/AdaptableInternalApi.js +1 -1
- package/src/Api/Internal/AlertInternalApi.js +3 -3
- package/src/Api/Internal/CustomSortInternalApi.js +1 -1
- package/src/Api/Internal/ExportInternalApi.js +1 -1
- package/src/Api/Internal/ExpressionInternalApi.js +1 -1
- package/src/Api/Internal/FormatColumnInternalApi.js +12 -13
- package/src/Api/Internal/StyledColumnInternalApi.js +1 -1
- package/src/Strategy/AlertModule.js +2 -2
- package/src/Strategy/ExportModule.js +2 -2
- package/src/Strategy/FlashingCellModule.js +4 -4
- package/src/Strategy/FormatColumnModule.js +2 -2
- package/src/Strategy/PlusMinusModule.js +3 -3
- package/src/Strategy/ShortcutModule.js +1 -1
- package/src/Strategy/StyledColumnModule.js +3 -3
- package/src/Utilities/Services/ReportService.js +2 -2
- package/src/Utilities/Services/ValidationService.js +2 -2
- package/src/View/Alert/AlertEntityRow.js +1 -1
- package/src/View/Alert/Wizard/AlertScopeWizardSection.js +2 -2
- package/src/View/Alert/Wizard/BaseAlertScopeWizardSection.js +1 -1
- package/src/View/ColumnInfo/ColumnInfo.js +1 -1
- package/src/View/Components/NewScopeComponent.js +2 -2
- package/src/View/Components/RangesComponent.js +1 -1
- package/src/View/CustomSort/Wizard/CustomSortColumnWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnFormatWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnRuleWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnScopeWizardSection.js +1 -1
- package/src/View/FormatColumn/Wizard/FormatColumnStyleWizardSection.js +1 -1
- package/src/View/PlusMinus/PlusMinusSummary.js +2 -2
- package/src/View/StyledColumn/Wizard/StyledColumnWizardColumnSection.js +1 -1
- package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +1 -1
- package/src/agGrid/ActionColumnRenderer.js +10 -11
- package/src/agGrid/AdaptableAgGrid.js +2 -3
- package/src/agGrid/AgGridColumnAdapter.js +8 -8
- package/src/agGrid/BadgeRenderer.js +6 -7
- package/src/env.js +2 -2
- package/src/metamodel/adaptable.metamodel.js +1 -1
- package/src/types.d.ts +1 -1
- package/tsconfig.cjs.tsbuildinfo +1 -1
- /package/src/Api/{ScopeApi.js → ColumnScopeApi.js} +0 -0
|
@@ -19,7 +19,7 @@ class ValidationService {
|
|
|
19
19
|
}
|
|
20
20
|
let editingRules = this.adaptableApi.alertApi.internalApi
|
|
21
21
|
.getAlertDefinitionsWithPreventEdit()
|
|
22
|
-
.filter((v) => this.adaptableApi.
|
|
22
|
+
.filter((v) => this.adaptableApi.columnScopeApi.isColumnInScope(cellDataChangedInfo.column, v.Scope));
|
|
23
23
|
let failedValidations = [];
|
|
24
24
|
if (ArrayExtensions_1.ArrayExtensions.IsNotEmpty(editingRules)) {
|
|
25
25
|
editingRules.forEach((alertDefinition) => {
|
|
@@ -131,7 +131,7 @@ class ValidationService {
|
|
|
131
131
|
}
|
|
132
132
|
createValidationDescription(alertDefinition) {
|
|
133
133
|
var _a, _b;
|
|
134
|
-
return (this.adaptableApi.
|
|
134
|
+
return (this.adaptableApi.columnScopeApi.getScopeDescription(alertDefinition.Scope) +
|
|
135
135
|
' ' +
|
|
136
136
|
((_b = (_a = alertDefinition.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.map((predicate) => this.adaptableApi.predicateApi.predicateToString(predicate)).join(' AND ')));
|
|
137
137
|
}
|
|
@@ -13,7 +13,7 @@ class AlertEntityRow extends React.Component {
|
|
|
13
13
|
let alertDefinition = this.props.adaptableObject;
|
|
14
14
|
let messageTypes = ['Info', 'Success', 'Warning', 'Error'];
|
|
15
15
|
let colItems = (0, Helper_1.cloneObject)(this.props.colItems);
|
|
16
|
-
colItems[0].Content = (React.createElement(EntityRowItem_1.EntityRowItem, { Content: this.props.api.
|
|
16
|
+
colItems[0].Content = (React.createElement(EntityRowItem_1.EntityRowItem, { Content: this.props.api.columnScopeApi.getScopeToString(alertDefinition.Scope) }));
|
|
17
17
|
colItems[1].Content = (React.createElement(EntityRowItem_1.EntityRowItem, { Content: this.props.api.alertApi.internalApi.getAlertRuleDescription(alertDefinition) }));
|
|
18
18
|
colItems[2].Content = (React.createElement("div", null,
|
|
19
19
|
React.createElement(DropdownButton_1.default, { showClearButton: false, items: messageTypes.map((item) => ({
|
|
@@ -28,7 +28,7 @@ const AlertScopeWizardSection = (props) => {
|
|
|
28
28
|
Predicates: [{ PredicateId: 'AnyChange' }],
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
if (newData.Rule.ObservableExpression !== undefined && !api.
|
|
31
|
+
if (newData.Rule.ObservableExpression !== undefined && !api.columnScopeApi.scopeIsAll(Scope)) {
|
|
32
32
|
// if it had observable expression and the scope is changed to partial
|
|
33
33
|
// we need to reset to not be an observable expression, as observable is not supported
|
|
34
34
|
// for partial scope
|
|
@@ -36,7 +36,7 @@ const AlertScopeWizardSection = (props) => {
|
|
|
36
36
|
newData.Rule.BooleanExpression = '';
|
|
37
37
|
}
|
|
38
38
|
if (newData.Rule.AggregatedBooleanExpression !== undefined &&
|
|
39
|
-
!api.
|
|
39
|
+
!api.columnScopeApi.scopeIsAll(Scope)) {
|
|
40
40
|
// if it had aggregation expression and the scope is changed to partial
|
|
41
41
|
// we need to reset to not be an aggregation expression, as aggregation is not supported
|
|
42
42
|
// for partial scope
|
|
@@ -7,7 +7,7 @@ const rebass_1 = require("rebass");
|
|
|
7
7
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
8
8
|
const ValueSelector_1 = require("../../Components/ValueSelector");
|
|
9
9
|
const renderScopeSummary = (data) => {
|
|
10
|
-
const { api: { scopeApi }, } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
10
|
+
const { api: { columnScopeApi: scopeApi }, } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
11
11
|
const columnsInScope = scopeApi.getColumnsForScope(data.Scope);
|
|
12
12
|
return (React.createElement(React.Fragment, null,
|
|
13
13
|
React.createElement(rebass_1.Box, null,
|
|
@@ -136,7 +136,7 @@ const ModuleView = (props) => {
|
|
|
136
136
|
var _a;
|
|
137
137
|
if ('Scope' in item.abObject) {
|
|
138
138
|
const abColumn = adaptable.api.columnApi.getColumnWithColumnId(props.selectedColumnId);
|
|
139
|
-
return adaptable.api.
|
|
139
|
+
return adaptable.api.columnScopeApi.isColumnInScope(abColumn, item.abObject.Scope);
|
|
140
140
|
}
|
|
141
141
|
if ('ColumnId' in item.abObject) {
|
|
142
142
|
return ((_a = item.abObject) === null || _a === void 0 ? void 0 : _a.ColumnId) === props.selectedColumnId;
|
|
@@ -47,7 +47,7 @@ const DATA_TYPES_MAP = {
|
|
|
47
47
|
};
|
|
48
48
|
const renderScopeSummary = (scope, labels) => {
|
|
49
49
|
const adaptable = (0, AdaptableContext_1.useAdaptable)();
|
|
50
|
-
const scopeApi = adaptable.api.
|
|
50
|
+
const scopeApi = adaptable.api.columnScopeApi;
|
|
51
51
|
const columnsInScope = scopeApi.getColumnsForScope(scope);
|
|
52
52
|
return (React.createElement(React.Fragment, null,
|
|
53
53
|
React.createElement(rebass_1.Box, null,
|
|
@@ -64,7 +64,7 @@ const DATA_TYPES_OPTIONS = Object.values(DATA_TYPES_MAP);
|
|
|
64
64
|
const NewScopeComponent = (props) => {
|
|
65
65
|
var _a, _b;
|
|
66
66
|
const { api } = (0, AdaptableContext_1.useAdaptable)();
|
|
67
|
-
const { scopeApi, columnApi } = api;
|
|
67
|
+
const { columnScopeApi: scopeApi, columnApi } = api;
|
|
68
68
|
const [columnsSearchText, setColumnsSearchText] = (0, react_1.useState)('');
|
|
69
69
|
const scopeColumns = React.useMemo(() => {
|
|
70
70
|
const allColumns = props.scopeColumns || columnApi.getColumns();
|
|
@@ -118,7 +118,7 @@ class RangesComponent extends React.Component {
|
|
|
118
118
|
this.props.updateColumnComparison(columnComparison);
|
|
119
119
|
}
|
|
120
120
|
else {
|
|
121
|
-
const ranges = this.props.api.
|
|
121
|
+
const ranges = this.props.api.columnScopeApi.createCellColorRangesForScope(this.props.scope);
|
|
122
122
|
this.setState({
|
|
123
123
|
rangesType: 'Standard',
|
|
124
124
|
});
|
|
@@ -30,7 +30,7 @@ const CustomSortColumnWizardSection = (props) => {
|
|
|
30
30
|
const columnSortComparers = api.optionsApi.getCustomSortOptions().customSortComparers || [];
|
|
31
31
|
const usedColumnIds = [
|
|
32
32
|
...customSorts.map((customSort) => customSort.ColumnId),
|
|
33
|
-
...columnSortComparers.map((comparer) => api.
|
|
33
|
+
...columnSortComparers.map((comparer) => api.columnScopeApi.getColumnIdsInScope(comparer.scope)),
|
|
34
34
|
];
|
|
35
35
|
// filter out used colum ids, but include the current one
|
|
36
36
|
return sortableColumns.filter((column) => {
|
|
@@ -417,7 +417,7 @@ const FormatColumnFormatWizardSection = (props) => {
|
|
|
417
417
|
update({ DisplayFormat });
|
|
418
418
|
};
|
|
419
419
|
const Type = data.DisplayFormat && data.DisplayFormat.Formatter;
|
|
420
|
-
const customScopedFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.
|
|
420
|
+
const customScopedFormatters = customDisplayFormatters.filter((displayFormatter) => adaptable.api.columnScopeApi.isScopeInScope(data.Scope, displayFormatter.scope));
|
|
421
421
|
if (Type === 'NumberFormatter') {
|
|
422
422
|
return renderNumberFormat(data, update, setFormatOption, customScopedFormatters, formatColumnApi);
|
|
423
423
|
}
|
|
@@ -9,7 +9,7 @@ function FormatColumnRuleWizardSection(props) {
|
|
|
9
9
|
const { data, api, moduleInfo } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
10
10
|
return (React.createElement(EntityRulesEditor_1.EntityRulesEditor, { module: moduleInfo.ModuleName, defaultPredicateId: props.defaultPredicateId,
|
|
11
11
|
// TODO see what is this
|
|
12
|
-
predicateDefs: api.formatColumnApi.internalApi.getFormatColumnDefsForScope(data.Scope), getPredicateDefsForColId: (colId) => api.formatColumnApi.internalApi.getFormatColumnDefsForScope({ ColumnIds: [colId] }), showNoRule: true, showBoolean: true, showAggregation: false, showObservable: false, showPredicate: !api.
|
|
12
|
+
predicateDefs: api.formatColumnApi.internalApi.getFormatColumnDefsForScope(data.Scope), getPredicateDefsForColId: (colId) => api.formatColumnApi.internalApi.getFormatColumnDefsForScope({ ColumnIds: [colId] }), showNoRule: true, showBoolean: true, showAggregation: false, showObservable: false, showPredicate: !api.columnScopeApi.scopeIsAll(data.Scope), data: data, onChange: (formatColumn) => props.onChange(formatColumn), descriptions: {
|
|
13
13
|
selectPredicate: 'Create a Format Column Rule - to be applied when data changes',
|
|
14
14
|
useBooleanQuery: (React.createElement(React.Fragment, null,
|
|
15
15
|
"Use an BooleanQuery if ",
|
|
@@ -22,7 +22,7 @@ const FormatColumnScopeWizardSection = (props) => {
|
|
|
22
22
|
}, scope: data.Scope, updateScope: (Scope) => {
|
|
23
23
|
var _a, _b;
|
|
24
24
|
const newData = Object.assign(Object.assign({}, data), { Scope });
|
|
25
|
-
const wholeRow = api.
|
|
25
|
+
const wholeRow = api.columnScopeApi.scopeIsAll(Scope);
|
|
26
26
|
if ((_b = (_a = newData.Rule) === null || _a === void 0 ? void 0 : _a.Predicates) === null || _b === void 0 ? void 0 : _b.length) {
|
|
27
27
|
if (wholeRow) {
|
|
28
28
|
// if scope is whole row, a predicate cannot be present, so we set the rule
|
|
@@ -13,7 +13,7 @@ const isFormatColumnStyleValid = (data, api) => {
|
|
|
13
13
|
UIHelper_1.default.IsEmptyStyle(data.Style) &&
|
|
14
14
|
data.DisplayFormat === undefined &&
|
|
15
15
|
data.CellAlignment === undefined &&
|
|
16
|
-
!api.
|
|
16
|
+
!api.columnScopeApi.isSingleBooleanColumnScope(data.Scope)) {
|
|
17
17
|
return 'No format applied';
|
|
18
18
|
}
|
|
19
19
|
return true;
|
|
@@ -23,12 +23,12 @@ class PlusMinusSummaryComponent extends React.Component {
|
|
|
23
23
|
render() {
|
|
24
24
|
let moduleSummaries = [];
|
|
25
25
|
// title row
|
|
26
|
-
let titleRow = (React.createElement(ModuleHeader_1.ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: Helper_1.Helper.returnItemCount(this.props.PlusMinusNudges.filter((item) => this.props.api.
|
|
26
|
+
let titleRow = (React.createElement(ModuleHeader_1.ModuleHeader, { key: this.props.moduleInfo.FriendlyName, moduleInfo: this.props.moduleInfo, moduleSummary: Helper_1.Helper.returnItemCount(this.props.PlusMinusNudges.filter((item) => this.props.api.columnScopeApi.isColumnInScopeColumns(this.props.summarisedColumn, item.Scope)), this.props.moduleInfo.FriendlyName), onNew: () => this.onNew(), newButtonTooltip: 'Plus / Minus Rule', accessLevel: this.props.accessLevel }));
|
|
27
27
|
moduleSummaries.push(titleRow);
|
|
28
28
|
// existing items
|
|
29
29
|
this.props.PlusMinusNudges.map((item, index) => {
|
|
30
30
|
var _a;
|
|
31
|
-
if (this.props.api.
|
|
31
|
+
if (this.props.api.columnScopeApi.isColumnInScopeColumns(this.props.summarisedColumn, item.Scope)) {
|
|
32
32
|
let detailRow = (React.createElement(ModuleDetail_1.ModuleDetail, { key: 'PM' + index, item1: 'Nudge Value: ' + item.NudgeValue, item2: ((_a = item.Rule) === null || _a === void 0 ? void 0 : _a.BooleanExpression) ? item.Rule.BooleanExpression : 'Always', configEnity: item, showShare: this.props.teamSharingActivated, moduleInfo: this.props.moduleInfo, onEdit: () => this.onEdit(item), onShare: (config) => this.props.onShare(item, config), onDelete: PlusMinusRedux.PlusMinusNudgeDelete(item), accessLevel: this.props.accessLevel }));
|
|
33
33
|
moduleSummaries.push(detailRow);
|
|
34
34
|
}
|
|
@@ -61,7 +61,7 @@ const StyledColumnWizardColumnSection = (props) => {
|
|
|
61
61
|
}, [data]);
|
|
62
62
|
const handleColumnsChange = (columnIds) => {
|
|
63
63
|
const columnId = columnIds[0];
|
|
64
|
-
const emptyRanges = api.
|
|
64
|
+
const emptyRanges = api.columnScopeApi.createCellColorRangesForScope({
|
|
65
65
|
ColumnIds: [columnId],
|
|
66
66
|
});
|
|
67
67
|
const newStyledColumn = Object.assign(Object.assign({}, data), { ColumnId: columnId });
|
|
@@ -210,7 +210,7 @@ const StyledColumnWizardStyleSection = (props) => {
|
|
|
210
210
|
};
|
|
211
211
|
const handleRangeValueTypeChange = React.useCallback((rangeValueType) => {
|
|
212
212
|
const ranges = rangeValueType === 'Number'
|
|
213
|
-
? api.
|
|
213
|
+
? api.columnScopeApi.createCellColorRangesForScope(scope)
|
|
214
214
|
: [
|
|
215
215
|
{
|
|
216
216
|
Min: 0,
|
|
@@ -6,7 +6,6 @@ const SimpleButton_1 = tslib_1.__importDefault(require("../components/SimpleButt
|
|
|
6
6
|
const React = tslib_1.__importStar(require("react"));
|
|
7
7
|
const useRerender_1 = require("../components/utils/useRerender");
|
|
8
8
|
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
9
|
-
const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
|
|
10
9
|
const ActionButtons = (props) => {
|
|
11
10
|
const { buttons, adaptableApi, context, rerender } = props;
|
|
12
11
|
return (React.createElement(React.Fragment, null, buttons.map((button, index) => {
|
|
@@ -37,7 +36,7 @@ const ActionButtons = (props) => {
|
|
|
37
36
|
})));
|
|
38
37
|
};
|
|
39
38
|
const ReactActionColumnRenderer = (props) => {
|
|
40
|
-
var _a, _b, _c
|
|
39
|
+
var _a, _b, _c;
|
|
41
40
|
const rerender = (0, useRerender_1.useRerender)();
|
|
42
41
|
const adaptable = props.context.__adaptable;
|
|
43
42
|
const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(props.colDef);
|
|
@@ -45,20 +44,20 @@ const ReactActionColumnRenderer = (props) => {
|
|
|
45
44
|
return null;
|
|
46
45
|
}
|
|
47
46
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(props.node);
|
|
48
|
-
const isSummaryRow = (
|
|
47
|
+
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(props.node);
|
|
49
48
|
let shouldRender = true;
|
|
50
49
|
if (isGroupedRow) {
|
|
51
|
-
if ((
|
|
50
|
+
if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupedRows) {
|
|
52
51
|
shouldRender = false;
|
|
53
52
|
}
|
|
54
53
|
}
|
|
55
54
|
else if (isSummaryRow) {
|
|
56
|
-
if ((
|
|
55
|
+
if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
|
|
57
56
|
shouldRender = false;
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
else {
|
|
61
|
-
if ((
|
|
60
|
+
if ((_c = actionColumn.rowScope) === null || _c === void 0 ? void 0 : _c.ExcludeDataRows) {
|
|
62
61
|
shouldRender = false;
|
|
63
62
|
}
|
|
64
63
|
}
|
|
@@ -82,7 +81,7 @@ exports.ReactActionColumnRenderer = ReactActionColumnRenderer;
|
|
|
82
81
|
class ActionColumnRenderer {
|
|
83
82
|
// gets called once before the renderer is used
|
|
84
83
|
init(params) {
|
|
85
|
-
var _a, _b, _c
|
|
84
|
+
var _a, _b, _c;
|
|
86
85
|
const adaptable = params.context.__adaptable;
|
|
87
86
|
const { actionButtons, actionColumn } = adaptable.api.internalApi.getActionButtonsAndActionColumn(params.colDef);
|
|
88
87
|
if (!actionColumn || !actionButtons.length) {
|
|
@@ -92,20 +91,20 @@ class ActionColumnRenderer {
|
|
|
92
91
|
this.eGui = document.createElement('div');
|
|
93
92
|
this.eGui.className = 'ab-ActionColumn';
|
|
94
93
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(params.node);
|
|
95
|
-
const isSummaryRow = (
|
|
94
|
+
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(params.node);
|
|
96
95
|
let shouldRender = true;
|
|
97
96
|
if (isGroupedRow) {
|
|
98
|
-
if ((
|
|
97
|
+
if ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupedRows) {
|
|
99
98
|
shouldRender = false;
|
|
100
99
|
}
|
|
101
100
|
}
|
|
102
101
|
else if (isSummaryRow) {
|
|
103
|
-
if ((
|
|
102
|
+
if ((_b = actionColumn.rowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
|
|
104
103
|
shouldRender = false;
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
else {
|
|
108
|
-
if ((
|
|
107
|
+
if ((_c = actionColumn.rowScope) === null || _c === void 0 ? void 0 : _c.ExcludeDataRows) {
|
|
109
108
|
shouldRender = false;
|
|
110
109
|
}
|
|
111
110
|
}
|
|
@@ -398,7 +398,6 @@ class AdaptableAgGrid {
|
|
|
398
398
|
adaptableApi: this.api,
|
|
399
399
|
agGridApi: this.agGridAdapter.getAgGridApi(),
|
|
400
400
|
});
|
|
401
|
-
this.api.userInterfaceApi.hideLoadingScreen();
|
|
402
401
|
perfInitAdaptableAgGrid.end();
|
|
403
402
|
return Promise.resolve(this.api);
|
|
404
403
|
}
|
|
@@ -3574,12 +3573,12 @@ class AdaptableAgGrid {
|
|
|
3574
3573
|
if (!dataChangedScope.wholeRow) {
|
|
3575
3574
|
const columnIds = this.api.expressionApi.getColumnsFromExpression(styleModule.Rule.BooleanExpression);
|
|
3576
3575
|
if (columnIds.includes(cellDataChangedInfo.column.columnId)) {
|
|
3577
|
-
if (this.api.
|
|
3576
|
+
if (this.api.columnScopeApi.scopeIsAll(styleModule.Scope)) {
|
|
3578
3577
|
dataChangedScope.wholeRow = true;
|
|
3579
3578
|
return;
|
|
3580
3579
|
}
|
|
3581
3580
|
else {
|
|
3582
|
-
this.api.
|
|
3581
|
+
this.api.columnScopeApi
|
|
3583
3582
|
.getColumnsForScope(styleModule.Scope)
|
|
3584
3583
|
.map((c) => c.columnId)
|
|
3585
3584
|
.forEach((colId) => {
|
|
@@ -14,7 +14,6 @@ const UIHelper_1 = tslib_1.__importDefault(require("../View/UIHelper"));
|
|
|
14
14
|
const PercentBarRenderer_1 = require("./PercentBarRenderer");
|
|
15
15
|
const BadgeRenderer_1 = require("./BadgeRenderer");
|
|
16
16
|
const Helper_1 = tslib_1.__importDefault(require("../Utilities/Helpers/Helper"));
|
|
17
|
-
const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
|
|
18
17
|
class AgGridColumnAdapter {
|
|
19
18
|
constructor(adaptableInstance) {
|
|
20
19
|
this.adaptableInstance = adaptableInstance;
|
|
@@ -353,19 +352,19 @@ class AgGridColumnAdapter {
|
|
|
353
352
|
const options = mostRelevantFormatColumn.DisplayFormat.Options;
|
|
354
353
|
if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'NumberFormatter') {
|
|
355
354
|
// change the Number format - if the scope allows it
|
|
356
|
-
if (this.adaptableApi.
|
|
355
|
+
if (this.adaptableApi.columnScopeApi.isColumnInNumericScope(abColumn, mostRelevantFormatColumn.Scope)) {
|
|
357
356
|
return this.adaptableApi.formatColumnApi.internalApi.getNumberFormattedValue(params.value, params.node, abColumn, options);
|
|
358
357
|
}
|
|
359
358
|
}
|
|
360
359
|
if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'DateFormatter') {
|
|
361
360
|
// change the Date format - if the scope allows it
|
|
362
|
-
if (this.adaptableApi.
|
|
361
|
+
if (this.adaptableApi.columnScopeApi.isColumnInDateScope(abColumn, mostRelevantFormatColumn.Scope)) {
|
|
363
362
|
return this.adaptableApi.formatColumnApi.internalApi.getDateFormattedValue(params.value, params.node, abColumn, options);
|
|
364
363
|
}
|
|
365
364
|
}
|
|
366
365
|
if (mostRelevantFormatColumn.DisplayFormat.Formatter === 'StringFormatter') {
|
|
367
366
|
// change the String format - if the scope allows it
|
|
368
|
-
if (this.adaptableApi.
|
|
367
|
+
if (this.adaptableApi.columnScopeApi.isColumnInStringsScope(abColumn, mostRelevantFormatColumn.Scope)) {
|
|
369
368
|
return this.adaptableApi.formatColumnApi.internalApi.getStringFormattedValue(params.value, params.node, abColumn, options);
|
|
370
369
|
}
|
|
371
370
|
}
|
|
@@ -383,7 +382,8 @@ class AgGridColumnAdapter {
|
|
|
383
382
|
const cellEditableFn = this.adaptableOptions.editOptions.isCellEditable;
|
|
384
383
|
const editableCallback = (params) => {
|
|
385
384
|
// Adaptable Row Summarie rows are not editable
|
|
386
|
-
if (params.node.data[
|
|
385
|
+
// if (params.node.data[ROW_SUMMARY_ROW_ID]) {
|
|
386
|
+
if (this.adaptableApi.gridApi.isSummaryNode(params.node)) {
|
|
387
387
|
return false;
|
|
388
388
|
}
|
|
389
389
|
if (!cellEditableFn) {
|
|
@@ -407,7 +407,7 @@ class AgGridColumnAdapter {
|
|
|
407
407
|
const preventEditAlertsForColumn = this.adaptableApi.alertApi.internalApi
|
|
408
408
|
.getAlertDefinitionsWithPreventEdit()
|
|
409
409
|
.filter((alertDefinition) => {
|
|
410
|
-
return this.adaptableApi.
|
|
410
|
+
return this.adaptableApi.columnScopeApi.isColumnInScope(abColumn, alertDefinition.Scope);
|
|
411
411
|
});
|
|
412
412
|
const noValidations = !preventEditAlertsForColumn.length && !((_a = this.adaptableOptions.editOptions) === null || _a === void 0 ? void 0 : _a.validateOnServer);
|
|
413
413
|
if (noValidations) {
|
|
@@ -668,7 +668,7 @@ class AgGridColumnAdapter {
|
|
|
668
668
|
return Object.assign(Object.assign({}, this.getFormatColumnCellStyle(gridCell.column, activeFormatColumnsWithStyle, params)), styledColumnStyle);
|
|
669
669
|
}
|
|
670
670
|
getStyledColumnStyle(styledColumn, abColumn, params) {
|
|
671
|
-
var _a
|
|
671
|
+
var _a;
|
|
672
672
|
let style = {};
|
|
673
673
|
const gradientStyle = styledColumn === null || styledColumn === void 0 ? void 0 : styledColumn.GradientStyle;
|
|
674
674
|
if (params.value === undefined) {
|
|
@@ -693,7 +693,7 @@ class AgGridColumnAdapter {
|
|
|
693
693
|
}
|
|
694
694
|
if (styledColumn.BadgeStyle &&
|
|
695
695
|
!((_a = styledColumn.BadgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeSummaryRows) &&
|
|
696
|
-
(
|
|
696
|
+
this.adaptableApi.gridApi.isSummaryNode(params === null || params === void 0 ? void 0 : params.node)) {
|
|
697
697
|
return style;
|
|
698
698
|
}
|
|
699
699
|
if (gradientStyle) {
|
|
@@ -5,7 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const Badge_1 = require("../View/Components/Badge");
|
|
6
6
|
const renderWithAdaptableContext_1 = require("../View/renderWithAdaptableContext");
|
|
7
7
|
const React = tslib_1.__importStar(require("react"));
|
|
8
|
-
const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
|
|
9
8
|
const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
10
9
|
return class BadgetRenderer {
|
|
11
10
|
getAdaptableInstance(params) {
|
|
@@ -13,31 +12,31 @@ const getBadgeRendererForColumn = (badgeStyle, abColumn, api) => {
|
|
|
13
12
|
return adaptable;
|
|
14
13
|
}
|
|
15
14
|
init(params) {
|
|
16
|
-
var _a, _b, _c, _d, _e, _f
|
|
15
|
+
var _a, _b, _c, _d, _e, _f;
|
|
17
16
|
const adaptable = this.getAdaptableInstance(params);
|
|
18
17
|
const adapatableApi = adaptable.api;
|
|
19
18
|
this.eGui = document.createElement('div');
|
|
20
19
|
this.eGui.className = 'ab-Badge__wrapper';
|
|
21
20
|
const isGroupedRow = params.node.group;
|
|
22
|
-
const isSummaryRow = (
|
|
21
|
+
const isSummaryRow = adapatableApi.gridApi.isSummaryNode(params.node);
|
|
23
22
|
let shouldRender = true;
|
|
24
23
|
if (isGroupedRow) {
|
|
25
|
-
if ((
|
|
24
|
+
if ((_a = badgeStyle.RowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupedRows) {
|
|
26
25
|
shouldRender = false;
|
|
27
26
|
}
|
|
28
27
|
}
|
|
29
28
|
else if (isSummaryRow) {
|
|
30
|
-
if ((
|
|
29
|
+
if ((_b = badgeStyle.RowScope) === null || _b === void 0 ? void 0 : _b.ExcludeSummaryRows) {
|
|
31
30
|
shouldRender = false;
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
else {
|
|
35
|
-
if ((
|
|
34
|
+
if ((_c = badgeStyle.RowScope) === null || _c === void 0 ? void 0 : _c.ExcludeDataRows) {
|
|
36
35
|
shouldRender = false;
|
|
37
36
|
}
|
|
38
37
|
}
|
|
39
38
|
if (!shouldRender) {
|
|
40
|
-
const formattedValue = (
|
|
39
|
+
const formattedValue = (_f = (_e = (_d = params.formatValue) === null || _d === void 0 ? void 0 : _d.call(params, params.value)) !== null && _e !== void 0 ? _e : params.value) !== null && _f !== void 0 ? _f : '';
|
|
41
40
|
this.eGui.innerHTML = formattedValue;
|
|
42
41
|
return;
|
|
43
42
|
}
|
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.0.0-canary.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1712828155565 || Date.now(),
|
|
6
|
+
VERSION: "18.0.0-canary.32" || '--current-version--',
|
|
7
7
|
};
|