@adaptabletools/adaptable-cjs 19.0.5 → 19.0.6
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 +3 -0
- package/src/Api/ColumnApi.d.ts +9 -0
- package/src/Api/Implementation/ColumnApiImpl.d.ts +2 -0
- package/src/Api/Implementation/ColumnApiImpl.js +11 -3
- package/src/Api/Implementation/ConfigApiImpl.js +1 -0
- package/src/Api/Implementation/FlashingCellApiImpl.js +8 -6
- package/src/Api/Internal/ActionRowInternalApi.js +1 -1
- package/src/Api/Internal/AdaptableInternalApi.d.ts +2 -0
- package/src/Api/Internal/AdaptableInternalApi.js +4 -1
- package/src/Api/Internal/ColumnInternalApi.d.ts +0 -1
- package/src/Api/Internal/ColumnInternalApi.js +0 -3
- package/src/Api/Internal/FlashingCellInternalApi.js +5 -3
- package/src/PredefinedConfig/SystemState.d.ts +0 -6
- package/src/Redux/ActionsReducers/SystemRedux.d.ts +1 -17
- package/src/Redux/ActionsReducers/SystemRedux.js +3 -65
- package/src/Redux/Store/AdaptableStore.js +1 -19
- package/src/Strategy/FlashingCellModule.d.ts +2 -3
- package/src/Strategy/FlashingCellModule.js +6 -3
- package/src/Utilities/Services/FlashingCellService.d.ts +21 -0
- package/src/Utilities/Services/FlashingCellService.js +69 -0
- package/src/View/Components/NewScopeComponent.js +1 -1
- package/src/View/Components/Popups/AdaptablePopup/CustomSettingsPanelView.js +1 -1
- package/src/View/FlashingCell/Wizard/FlashingCellScopeWizardSection.js +2 -1
- package/src/agGrid/ActionColumnRenderer.js +2 -2
- package/src/agGrid/AdaptableAgGrid.d.ts +4 -1
- package/src/agGrid/AdaptableAgGrid.js +17 -8
- package/src/agGrid/AgGridAdapter.js +1 -1
- package/src/env.js +2 -2
- package/tsconfig.cjs.tsbuildinfo +1 -1
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.FlashingCellService = exports.FLASHING_CELL_ROW_KEY = void 0;
|
|
4
|
+
exports.FLASHING_CELL_ROW_KEY = '__ROW';
|
|
5
|
+
/**
|
|
6
|
+
* This service controls the interaction between notes and comments
|
|
7
|
+
*/
|
|
8
|
+
class FlashingCellService {
|
|
9
|
+
constructor(api) {
|
|
10
|
+
this.api = api;
|
|
11
|
+
this.adaptable = api.internalApi.getAdaptableInstance();
|
|
12
|
+
this.gridCellsCurrentlyFlashing = {};
|
|
13
|
+
this.flashingCellsMapping = {};
|
|
14
|
+
}
|
|
15
|
+
destroy() {
|
|
16
|
+
this.gridCellsCurrentlyFlashing = {};
|
|
17
|
+
this.flashingCellsMapping = {};
|
|
18
|
+
}
|
|
19
|
+
addGridCellFlash(flashingCell) {
|
|
20
|
+
const { rowPrimaryKey } = flashingCell;
|
|
21
|
+
this.gridCellsCurrentlyFlashing[rowPrimaryKey] =
|
|
22
|
+
this.gridCellsCurrentlyFlashing[rowPrimaryKey] || {};
|
|
23
|
+
const columnIds = Object.keys(flashingCell.flashColumnIds);
|
|
24
|
+
if (flashingCell.flashTarget === 'row' || flashingCell.flashTarget.includes('row')) {
|
|
25
|
+
columnIds.push(exports.FLASHING_CELL_ROW_KEY);
|
|
26
|
+
}
|
|
27
|
+
columnIds.forEach((colId) => {
|
|
28
|
+
this.gridCellsCurrentlyFlashing[rowPrimaryKey][colId] = flashingCell.Uuid;
|
|
29
|
+
});
|
|
30
|
+
this.flashingCellsMapping[flashingCell.Uuid] = flashingCell;
|
|
31
|
+
this.refreshGridCells(flashingCell);
|
|
32
|
+
}
|
|
33
|
+
clearGridCellFlash(flashingCell) {
|
|
34
|
+
const { rowPrimaryKey } = flashingCell;
|
|
35
|
+
const columnIds = Object.keys(flashingCell.flashColumnIds);
|
|
36
|
+
if (flashingCell.flashTarget === 'row' || flashingCell.flashTarget.includes('row')) {
|
|
37
|
+
columnIds.push(exports.FLASHING_CELL_ROW_KEY);
|
|
38
|
+
}
|
|
39
|
+
// for high frequency rates, we might have multiple flashes for the same cell
|
|
40
|
+
if (this.gridCellsCurrentlyFlashing[rowPrimaryKey]) {
|
|
41
|
+
columnIds.forEach((colId) => {
|
|
42
|
+
if (this.gridCellsCurrentlyFlashing[rowPrimaryKey][colId] === flashingCell.Uuid) {
|
|
43
|
+
delete this.gridCellsCurrentlyFlashing[rowPrimaryKey][colId];
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
if (!Object.keys(this.gridCellsCurrentlyFlashing[rowPrimaryKey]).length) {
|
|
47
|
+
delete this.gridCellsCurrentlyFlashing[rowPrimaryKey];
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
delete this.flashingCellsMapping[flashingCell.Uuid];
|
|
51
|
+
this.refreshGridCells(flashingCell);
|
|
52
|
+
}
|
|
53
|
+
clearAllGridCellFlashes() {
|
|
54
|
+
this.gridCellsCurrentlyFlashing = {};
|
|
55
|
+
this.flashingCellsMapping = {};
|
|
56
|
+
this.adaptable.refreshAllCells(true);
|
|
57
|
+
}
|
|
58
|
+
isAnyFlashingCellActive() {
|
|
59
|
+
return Object.keys(this.gridCellsCurrentlyFlashing).length > 0;
|
|
60
|
+
}
|
|
61
|
+
refreshGridCells(flashingCell) {
|
|
62
|
+
const { cellDataChangedInfo } = flashingCell;
|
|
63
|
+
if (!cellDataChangedInfo) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
this.adaptable.refreshCells([cellDataChangedInfo.rowNode], Object.keys(flashingCell.flashColumnIds), true);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
exports.FlashingCellService = FlashingCellService;
|
|
@@ -67,7 +67,7 @@ const NewScopeComponent = (props) => {
|
|
|
67
67
|
const { columnScopeApi: scopeApi, columnApi } = api;
|
|
68
68
|
const [columnsSearchText, setColumnsSearchText] = (0, react_1.useState)('');
|
|
69
69
|
const scopeColumns = React.useMemo(() => {
|
|
70
|
-
const allColumns = props.scopeColumns || columnApi.
|
|
70
|
+
const allColumns = props.scopeColumns || columnApi.getStandardColumns();
|
|
71
71
|
if (typeof props.isColumnAvailable === 'function') {
|
|
72
72
|
return allColumns.filter((c) => props.isColumnAvailable(c));
|
|
73
73
|
}
|
|
@@ -5,6 +5,6 @@ const tslib_1 = require("tslib");
|
|
|
5
5
|
const React = tslib_1.__importStar(require("react"));
|
|
6
6
|
const ExternalRenderer_1 = require("../../ExternalRenderer");
|
|
7
7
|
const CustomSettingsPanelView = (props) => {
|
|
8
|
-
return (React.createElement(ExternalRenderer_1.ExternalRenderer, { render: props.settingsPanel.render, componentName: props.settingsPanel.name, frameworkComponent: props.settingsPanel.frameworkComponent }));
|
|
8
|
+
return (React.createElement(ExternalRenderer_1.ExternalRenderer, { key: props.settingsPanel.name, render: props.settingsPanel.render, componentName: props.settingsPanel.name, frameworkComponent: props.settingsPanel.frameworkComponent }));
|
|
9
9
|
};
|
|
10
10
|
exports.CustomSettingsPanelView = CustomSettingsPanelView;
|
|
@@ -8,11 +8,12 @@ const NewScopeComponent_1 = require("../../Components/NewScopeComponent");
|
|
|
8
8
|
const OnePageAdaptableWizard_1 = require("../../Wizard/OnePageAdaptableWizard");
|
|
9
9
|
const FlashingAlertScopeWizardSection = (props) => {
|
|
10
10
|
const { data, api } = (0, OnePageAdaptableWizard_1.useOnePageAdaptableWizardContext)();
|
|
11
|
+
const availableColumns = React.useMemo(() => api.columnApi.getNonSpecialColumns(), []);
|
|
11
12
|
return (React.createElement(rebass_1.Flex, { flexDirection: "column", style: { height: '100%' }, padding: 2 },
|
|
12
13
|
React.createElement(NewScopeComponent_1.NewScopeComponent, { descriptions: {
|
|
13
14
|
rowScope: 'Changes anywhere in the row will trigger an Flashing Cell',
|
|
14
15
|
columnScope: 'Changes in selected columns will trigger an Flashing Cell',
|
|
15
|
-
}, scope: data.Scope, updateScope: (Scope) => {
|
|
16
|
+
}, scopeColumns: availableColumns, scope: data.Scope, updateScope: (Scope) => {
|
|
16
17
|
const newData = Object.assign(Object.assign({}, data), { Scope });
|
|
17
18
|
if (newData.Rule.Predicates) {
|
|
18
19
|
// when scope is changed, reset the rule to predicate of AnyChange
|
|
@@ -51,7 +51,7 @@ const ReactActionColumnRenderer = (props) => {
|
|
|
51
51
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(props.node);
|
|
52
52
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(props.node);
|
|
53
53
|
let shouldRender = true;
|
|
54
|
-
const isActionRowColumn = adaptable.api.columnApi.
|
|
54
|
+
const isActionRowColumn = adaptable.api.columnApi.isActionRowButtonColumn(props.colDef.colId);
|
|
55
55
|
if (isGroupedRow) {
|
|
56
56
|
if (isActionRowColumn || ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows)) {
|
|
57
57
|
shouldRender = false;
|
|
@@ -110,7 +110,7 @@ class ActionColumnRenderer {
|
|
|
110
110
|
const isGroupedRow = adaptable.api.gridApi.isGroupRowNode(params.node);
|
|
111
111
|
const isSummaryRow = adaptable.api.gridApi.isSummaryNode(params.node);
|
|
112
112
|
let shouldRender = true;
|
|
113
|
-
const isActionRowColumn = adaptable.api.columnApi.
|
|
113
|
+
const isActionRowColumn = adaptable.api.columnApi.isActionRowButtonColumn(params.colDef.colId);
|
|
114
114
|
if (isGroupedRow) {
|
|
115
115
|
if (isActionRowColumn || ((_a = actionColumn.rowScope) === null || _a === void 0 ? void 0 : _a.ExcludeGroupRows)) {
|
|
116
116
|
shouldRender = false;
|
|
@@ -26,6 +26,7 @@ import { RenderReactRootFn } from '../renderReactRoot';
|
|
|
26
26
|
import { AgGridOptionsService } from './AgGridOptionsService';
|
|
27
27
|
import { AgGridColumnAdapter } from './AgGridColumnAdapter';
|
|
28
28
|
import { RowEditService } from '../Utilities/Services/RowEditService';
|
|
29
|
+
import { FlashingCellService } from '../Utilities/Services/FlashingCellService';
|
|
29
30
|
export type AdaptableLifecycleState = 'initial' | 'preprocessOptions' | 'initAdaptableState' | 'setupAgGrid' | 'initAgGrid' | 'agGridReady' | 'available' | 'ready' | 'preDestroyed';
|
|
30
31
|
type RenderAgGridFrameworkComponentResult = false | GridApi;
|
|
31
32
|
interface AdaptableInitInternalConfig<TData = any> {
|
|
@@ -83,6 +84,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
83
84
|
RowEditService: RowEditService;
|
|
84
85
|
Fdc3Service: Fdc3Service;
|
|
85
86
|
CellPopupService: CellPopupService;
|
|
87
|
+
FlashingCellService: FlashingCellService;
|
|
86
88
|
private LicenseService;
|
|
87
89
|
private ChartingService;
|
|
88
90
|
private ThemeService;
|
|
@@ -162,7 +164,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
162
164
|
private enhanceColDefsWithSpecialColumns;
|
|
163
165
|
useRowNodeLookUp(): boolean;
|
|
164
166
|
getAgGridContainerElement(): HTMLElement | null;
|
|
165
|
-
getAdaptableContainerElement(): HTMLElement
|
|
167
|
+
getAdaptableContainerElement(): HTMLElement;
|
|
166
168
|
refreshSelectedCellsState(): SelectedCellInfo | undefined;
|
|
167
169
|
refreshSelectedRowsState(): SelectedRowInfo | undefined;
|
|
168
170
|
isGridRowSelectable(): boolean;
|
|
@@ -204,6 +206,7 @@ export declare class AdaptableAgGrid implements IAdaptable {
|
|
|
204
206
|
redrawRows(rowNodes?: IRowNode[]): void;
|
|
205
207
|
redrawRow(rowNode: IRowNode): void;
|
|
206
208
|
refreshCells(rowNodes: IRowNode[], columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
209
|
+
refreshAllCells(forceUpdate?: boolean): void;
|
|
207
210
|
refreshColumns(columns: (string | Column)[], forceUpdate: boolean, suppressFlash?: boolean): void;
|
|
208
211
|
jumpToRow(rowNode: IRowNode): void;
|
|
209
212
|
jumpToColumn(columnId: string): void;
|
|
@@ -97,6 +97,7 @@ const react_1 = require("react");
|
|
|
97
97
|
const AdaptableHelper_1 = require("../Utilities/Helpers/AdaptableHelper");
|
|
98
98
|
const buildSortedColumnStateForLayout_1 = require("./buildSortedColumnStateForLayout");
|
|
99
99
|
const RowSummary_1 = require("../PredefinedConfig/Common/RowSummary");
|
|
100
|
+
const FlashingCellService_1 = require("../Utilities/Services/FlashingCellService");
|
|
100
101
|
const LocalEventService_Prototype = core_1.LocalEventService.prototype;
|
|
101
102
|
const LocalEventService_dispatchEvent = LocalEventService_Prototype.dispatchEvent;
|
|
102
103
|
const GridOptionsService_updateGridOptions = core_1.GridOptionsService.prototype.updateGridOptions;
|
|
@@ -1197,20 +1198,22 @@ class AdaptableAgGrid {
|
|
|
1197
1198
|
return this.agGridAdapter.getAgGridApi().getGridOption('getRowId') != undefined;
|
|
1198
1199
|
}
|
|
1199
1200
|
getAgGridContainerElement() {
|
|
1201
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1200
1202
|
if (!this.DANGER_USE_GETTER_agGridContainerElement) {
|
|
1201
1203
|
this.DANGER_USE_GETTER_agGridContainerElement =
|
|
1202
|
-
typeof this.adaptableOptions.containerOptions.agGridContainer === 'string'
|
|
1203
|
-
? document.getElementById(this.adaptableOptions.containerOptions.agGridContainer)
|
|
1204
|
-
: this.adaptableOptions.containerOptions.agGridContainer;
|
|
1204
|
+
typeof ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.containerOptions) === null || _b === void 0 ? void 0 : _b.agGridContainer) === 'string'
|
|
1205
|
+
? document.getElementById((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.containerOptions) === null || _d === void 0 ? void 0 : _d.agGridContainer)
|
|
1206
|
+
: (_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.containerOptions) === null || _f === void 0 ? void 0 : _f.agGridContainer;
|
|
1205
1207
|
}
|
|
1206
1208
|
return this.DANGER_USE_GETTER_agGridContainerElement;
|
|
1207
1209
|
}
|
|
1208
1210
|
getAdaptableContainerElement() {
|
|
1211
|
+
var _a, _b, _c, _d, _e, _f;
|
|
1209
1212
|
if (!this.DANGER_USE_GETTER_adaptableContainerElement) {
|
|
1210
1213
|
this.DANGER_USE_GETTER_adaptableContainerElement =
|
|
1211
|
-
typeof this.adaptableOptions.containerOptions.adaptableContainer === 'string'
|
|
1212
|
-
? document.getElementById(this.adaptableOptions.containerOptions.adaptableContainer)
|
|
1213
|
-
: this.adaptableOptions.containerOptions.adaptableContainer;
|
|
1214
|
+
typeof ((_b = (_a = this.adaptableOptions) === null || _a === void 0 ? void 0 : _a.containerOptions) === null || _b === void 0 ? void 0 : _b.adaptableContainer) === 'string'
|
|
1215
|
+
? document.getElementById((_d = (_c = this.adaptableOptions) === null || _c === void 0 ? void 0 : _c.containerOptions) === null || _d === void 0 ? void 0 : _d.adaptableContainer)
|
|
1216
|
+
: (_f = (_e = this.adaptableOptions) === null || _e === void 0 ? void 0 : _e.containerOptions) === null || _f === void 0 ? void 0 : _f.adaptableContainer;
|
|
1214
1217
|
}
|
|
1215
1218
|
return this.DANGER_USE_GETTER_adaptableContainerElement;
|
|
1216
1219
|
}
|
|
@@ -1669,6 +1672,7 @@ class AdaptableAgGrid {
|
|
|
1669
1672
|
this.TeamSharingService = new TeamSharingService_1.TeamSharingService(this.api);
|
|
1670
1673
|
this.Fdc3Service = new Fdc3Service_1.Fdc3Service(this.api);
|
|
1671
1674
|
this.CellPopupService = new CellPopupService_1.CellPopupService(this.api);
|
|
1675
|
+
this.FlashingCellService = new FlashingCellService_1.FlashingCellService(this.api);
|
|
1672
1676
|
this.RowEditService = new RowEditService_1.RowEditService(this.api);
|
|
1673
1677
|
this.MetamodelService = new MetamodelService_1.MetamodelService(() => this.api.optionsApi.getAdaptableOptions(), true);
|
|
1674
1678
|
}
|
|
@@ -1992,6 +1996,9 @@ class AdaptableAgGrid {
|
|
|
1992
1996
|
};
|
|
1993
1997
|
this.agGridAdapter.getAgGridApi().refreshCells(refreshCellParams);
|
|
1994
1998
|
}
|
|
1999
|
+
refreshAllCells(forceUpdate) {
|
|
2000
|
+
this.agGridAdapter.getAgGridApi().refreshCells({ force: forceUpdate });
|
|
2001
|
+
}
|
|
1995
2002
|
refreshColumns(columns, forceUpdate, suppressFlash) {
|
|
1996
2003
|
this.refreshCells(null, columns, forceUpdate, suppressFlash);
|
|
1997
2004
|
}
|
|
@@ -2968,7 +2975,7 @@ class AdaptableAgGrid {
|
|
|
2968
2975
|
return this.agGridAdapter.getRegisteredModules();
|
|
2969
2976
|
}
|
|
2970
2977
|
destroy(config) {
|
|
2971
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6;
|
|
2978
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8;
|
|
2972
2979
|
if (((_a = this.agGridAdapter) === null || _a === void 0 ? void 0 : _a.getAgGridApi()) && !this.agGridAdapter.getAgGridApi().isDestroyed()) {
|
|
2973
2980
|
this.agGridAdapter
|
|
2974
2981
|
.getAgGridApi()
|
|
@@ -3082,10 +3089,10 @@ class AdaptableAgGrid {
|
|
|
3082
3089
|
AdaptableAgGrid.dismissInstance(this);
|
|
3083
3090
|
(_g = this.unmountLoadingScreen) === null || _g === void 0 ? void 0 : _g.call(this);
|
|
3084
3091
|
this.unmountLoadingScreen = null;
|
|
3085
|
-
const abContainerElement = this.getAdaptableContainerElement();
|
|
3086
3092
|
if (config && !config.unmount) {
|
|
3087
3093
|
return;
|
|
3088
3094
|
}
|
|
3095
|
+
const abContainerElement = this.getAdaptableContainerElement();
|
|
3089
3096
|
if (abContainerElement != null) {
|
|
3090
3097
|
(_h = this.unmountReactRoot) === null || _h === void 0 ? void 0 : _h.call(this);
|
|
3091
3098
|
}
|
|
@@ -3118,6 +3125,8 @@ class AdaptableAgGrid {
|
|
|
3118
3125
|
this.MetamodelService = null;
|
|
3119
3126
|
(_6 = (_5 = this.LicenseService) === null || _5 === void 0 ? void 0 : _5.destroy) === null || _6 === void 0 ? void 0 : _6.call(_5);
|
|
3120
3127
|
this.LicenseService = null;
|
|
3128
|
+
(_8 = (_7 = this.FlashingCellService) === null || _7 === void 0 ? void 0 : _7.destroy) === null || _8 === void 0 ? void 0 : _8.call(_7);
|
|
3129
|
+
this.FlashingCellService = null;
|
|
3121
3130
|
}
|
|
3122
3131
|
canExportToExcel() {
|
|
3123
3132
|
return this.agGridAdapter.isModulePresent(core_1.ModuleNames.ExcelExportModule);
|
|
@@ -222,7 +222,7 @@ class AgGridAdapter {
|
|
|
222
222
|
const isRealColumnGroup = ColumnGroup
|
|
223
223
|
? ColumnGroup.columnGroupId !== ColumnGroup.friendlyName
|
|
224
224
|
: false;
|
|
225
|
-
const isActionRowButtonColumn = this.adaptableInstance.api.columnApi.
|
|
225
|
+
const isActionRowButtonColumn = this.adaptableInstance.api.columnApi.isActionRowButtonColumn(colId);
|
|
226
226
|
const isFdc3MainActionColumn = this.adaptableInstance.api.fdc3Api.internalApi.isFdc3MainActionColumn(colId);
|
|
227
227
|
let friendlyName;
|
|
228
228
|
const colExists = this.adaptableInstance.api.columnApi.doesColumnExist(ColumnId);
|
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: "19.0.
|
|
5
|
+
PUBLISH_TIMESTAMP: 1729787621918 || Date.now(),
|
|
6
|
+
VERSION: "19.0.6" || '--current-version--',
|
|
7
7
|
};
|