@genesislcap/pbc-reporting-ui 15.19.2-FUI-2610.2 → 15.19.2-canary.2

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.
@@ -4395,6 +4395,31 @@
4395
4395
  }
4396
4396
  ]
4397
4397
  },
4398
+ {
4399
+ "kind": "javascript-module",
4400
+ "path": "src/old/utils/row-selection.ts",
4401
+ "declarations": [
4402
+ {
4403
+ "kind": "variable",
4404
+ "name": "USER_TOGGLE_MARKER",
4405
+ "type": {
4406
+ "text": "string"
4407
+ },
4408
+ "default": "'__reportingUserCheckboxToggle'",
4409
+ "description": "Set on the row node for the duration of a user checkbox click. @internal"
4410
+ }
4411
+ ],
4412
+ "exports": [
4413
+ {
4414
+ "kind": "js",
4415
+ "name": "USER_TOGGLE_MARKER",
4416
+ "declaration": {
4417
+ "name": "USER_TOGGLE_MARKER",
4418
+ "module": "src/old/utils/row-selection.ts"
4419
+ }
4420
+ }
4421
+ ]
4422
+ },
4398
4423
  {
4399
4424
  "kind": "javascript-module",
4400
4425
  "path": "src/new/components/clone-report-config-modal/clone-report-config-modal.styles.ts",
@@ -1 +1 @@
1
- {"version":3,"file":"col-filters-grid.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/new/main/edit-config/col-filters/col-filters-grid.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAQ3D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAG,IAAI,CAqBvF"}
1
+ {"version":3,"file":"col-filters-grid.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/new/main/edit-config/col-filters/col-filters-grid.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAS3D,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,gBAAgB,CAAC,aAAa,CAAC,GAAG,IAAI,CAwBvF"}
@@ -1 +1 @@
1
- {"version":3,"file":"col-rename-alias-grid.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,eAAe,EACf,WAAW,EAIZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,wBAAwB,GAAG,wBAAwB,CAU3F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,CAAC,SAAS,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC,EACpF,kBAAkB,EAAE,SAAS,EAAE,gBAAgB,GAAE,SAAc,IACvD,QAAQ,eAAe,CAAC,CAAC,CAAC,KAAG,SAAS,CAM/C;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,GAAG,MACpD,OAAO,MAAM,EAAE,QAAQ,mBAAmB,CAAC,wBAAwB,CAAC,SAc7E,CAAC;AAEF;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,GAChD,IAAI,CAiBN"}
1
+ {"version":3,"file":"col-rename-alias-grid.helpers.d.ts","sourceRoot":"","sources":["../../../../../../src/new/main/edit-config/col-rename-alias/col-rename-alias-grid.helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EACf,SAAS,EACT,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EACL,eAAe,EACf,WAAW,EAIZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAEzE;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,wBAAwB,GAAG,wBAAwB,CAU3F;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAClC,CAAC,SAAS,IAAI,CAAC,WAAW,EAAE,eAAe,CAAC,UAAU,GAAG,eAAe,CAAC,UAAU,CAAC,EACpF,kBAAkB,EAAE,SAAS,EAAE,gBAAgB,GAAE,SAAc,IACvD,QAAQ,eAAe,CAAC,CAAC,CAAC,KAAG,SAAS,CAM/C;AAED;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,GAAG,MACpD,OAAO,MAAM,EAAE,QAAQ,mBAAmB,CAAC,wBAAwB,CAAC,SAc7E,CAAC;AAEF;;GAEG;AACH,wBAAgB,gCAAgC,CAC9C,KAAK,EAAE,gBAAgB,CAAC,wBAAwB,CAAC,GAChD,IAAI,CAsBN"}
@@ -1 +1 @@
1
- {"version":3,"file":"row-select.renderer.d.ts","sourceRoot":"","sources":["../../../../../src/old/components/renderers/row-select.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAuB,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAyB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAEjF;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,iBAAkB,YAAW,iBAAiB;IAE5E,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,CAAC;IAG3D,OAAO,EAAE,OAAO,CAAC;IAEV,UAAU,CAAC,IAAI,KAAA,GAAG,OAAO;IAWzB,IAAI,CAAC,MAAM,EAAE,mBAAmB;IAShC,kBAAkB;IAMlB,aAAa,CAAC,CAAC,KAAA;IAKf,MAAM,IAAI,WAAW;IAIrB,OAAO;IAOP,OAAO,CAAC,MAAM,EAAE,mBAAmB;IAK1C,QAAQ;IAIR,mBAAmB;CAGpB;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,iDAsCrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,GAAI,qBAAsB,2EAYpE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;4BAIxC,CAAC"}
1
+ {"version":3,"file":"row-select.renderer.d.ts","sourceRoot":"","sources":["../../../../../src/old/components/renderers/row-select.renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAuB,MAAM,uCAAuC,CAAC;AACnG,OAAO,EAAyB,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAGjF;;;;GAIG;AACH,qBAAa,iBAAkB,SAAQ,iBAAkB,YAAW,iBAAiB;IAE5E,MAAM,EAAE,mBAAmB,GAAG,qBAAqB,CAAC;IAG3D,OAAO,EAAE,OAAO,CAAC;IAEV,UAAU,CAAC,IAAI,KAAA,GAAG,OAAO;IAWzB,IAAI,CAAC,MAAM,EAAE,mBAAmB;IAShC,kBAAkB;IAMlB,aAAa,CAAC,CAAC,KAAA;IAgBf,MAAM,IAAI,WAAW;IAIrB,OAAO;IAOP,OAAO,CAAC,MAAM,EAAE,mBAAmB;IAK1C,QAAQ;IAIR,mBAAmB;CAGpB;AAED;;;GAGG;AACH,eAAO,MAAM,yBAAyB,iDAsCrC,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,8BAA8B,GAAI,qBAAsB,2EAYpE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,6BAA6B;;;;;;;;4BAIxC,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { RowSelectedEvent } from '@ag-grid-community/core';
2
+ /** Set on the row node for the duration of a user checkbox click. @internal */
3
+ export declare const USER_TOGGLE_MARKER = "__reportingUserCheckboxToggle";
4
+ /**
5
+ * True while `RowSelectRenderer` is applying a user checkbox click.
6
+ * @remarks
7
+ * This relies on AG Grid dispatching `rowSelected` synchronously from inside `setSelected()`, while
8
+ * the marker is still on the node. That holds on both versions in use (v36 `selectRowNode` and v29
9
+ * `selectThisNode` both set `__selected` and dispatch inline), but a future version that batches
10
+ * selection events would make the marker silently dead - and no unit test can catch that, because
11
+ * the test's own `setSelected` stub *is* the synchronous dispatch.
12
+ * @internal
13
+ */
14
+ export declare function isUserCheckboxToggle(node: unknown): boolean;
15
+ /**
16
+ * True when a selection change came from the user rather than from a programmatic
17
+ * `setSelected()`, which defaults to source `'api'`.
18
+ * @internal
19
+ */
20
+ export declare function isUserSelectionEvent(event: RowSelectedEvent): boolean;
21
+ //# sourceMappingURL=row-selection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"row-selection.d.ts","sourceRoot":"","sources":["../../../../src/old/utils/row-selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAE3D,+EAA+E;AAC/E,eAAO,MAAM,kBAAkB,kCAAkC,CAAC;AAkBlE;;;;;;;;;GASG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,GAAG,OAAO,CAM3D;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,OAAO,CAErE"}
@@ -1,3 +1,4 @@
1
+ import { isUserSelectionEvent } from '../../../../old/utils/row-selection';
1
2
  import { actions, selectors } from '../../../store';
2
3
  import { GridColumnNames, datasourceNameFromDisplay, lookupColumnIsIncluded, shouldDisableColumn, } from '../shared';
3
4
  /**
@@ -7,6 +8,9 @@ export function rowSelectionChangedHandler(event) {
7
8
  var _a, _b;
8
9
  if (!event.data)
9
10
  return;
11
+ // Ignore programmatic re-selection (`setSelected()` defaults to source `'api'`).
12
+ if (!isUserSelectionEvent(event))
13
+ return;
10
14
  // gate event listener to only trigger if the data is actually changed by the user
11
15
  // (return if setting the same value as in the store, e.g. when first loading
12
16
  // the grid data)
@@ -1,4 +1,5 @@
1
1
  import { capitalCase } from 'change-case';
2
+ import { isUserSelectionEvent } from '../../../../old/utils/row-selection';
2
3
  import { actions, selectors } from '../../../store';
3
4
  import { GridColumnNames, datasourceNameFromDisplay, lookupColumnIsRenamed, shouldDisableColumn, } from '../shared';
4
5
  /**
@@ -48,6 +49,11 @@ export function renameRowSelectionChangedHandler(event) {
48
49
  var _a, _b;
49
50
  if (!event.data)
50
51
  return;
52
+ // Ignore programmatic re-selection: `onRowDataUpdated` re-syncs through a bare `setSelected()`
53
+ // (source `'api'`), and AG Grid re-applies its own selection when the stepper step is revisited.
54
+ // Neither is a user edit, so neither may write back to `COLUMN_RENAMES`.
55
+ if (!isUserSelectionEvent(event))
56
+ return;
51
57
  // gate event listener to only trigger if the data is actually changed by the user
52
58
  // (return if setting the same value as in the store, e.g. when first loading
53
59
  // the grid data)
@@ -1,6 +1,7 @@
1
1
  import { __decorate } from "tslib";
2
2
  import { EDITED_COLUMN_FIELD } from '@genesislcap/foundation-zero-grid-pro';
3
3
  import { css, html, observable, FoundationElement } from '@genesislcap/web-core';
4
+ import { USER_TOGGLE_MARKER } from '../../utils/row-selection';
4
5
  /**
5
6
  * The AG Row Select Renderer element.
6
7
  * @public
@@ -35,8 +36,23 @@ export class RowSelectRenderer extends FoundationElement {
35
36
  }
36
37
  }
37
38
  changeHandler(e) {
39
+ var _a, _b;
38
40
  this.checked = e.target.checked;
39
- this.params.node.setSelected(this.checked);
41
+ const node = (_a = this.params) === null || _a === void 0 ? void 0 : _a.node;
42
+ if (!node)
43
+ return;
44
+ // FAST re-emits `change` for programmatic `checked` writes, so only treat this as a user
45
+ // toggle when the checkbox and the node actually disagree.
46
+ if (this.checked === ((_b = node.isSelected()) !== null && _b !== void 0 ? _b : false))
47
+ return;
48
+ const marked = node;
49
+ marked[USER_TOGGLE_MARKER] = true;
50
+ try {
51
+ node.setSelected(this.checked);
52
+ }
53
+ finally {
54
+ delete marked[USER_TOGGLE_MARKER];
55
+ }
40
56
  }
41
57
  getGui() {
42
58
  return this;
@@ -0,0 +1,40 @@
1
+ /** Set on the row node for the duration of a user checkbox click. @internal */
2
+ export const USER_TOGGLE_MARKER = '__reportingUserCheckboxToggle';
3
+ /**
4
+ * AG Grid's own UI selection sources. The row checkbox is a custom renderer that reports as
5
+ * `'api'`, so it is recognised through the node marker instead.
6
+ * @internal
7
+ */
8
+ const USER_SELECTION_SOURCES = new Set([
9
+ 'uiSelectAll',
10
+ 'uiSelectAllFiltered',
11
+ 'uiSelectAllCurrentPage',
12
+ 'checkboxSelected',
13
+ 'rowClicked',
14
+ 'spaceKey',
15
+ 'spacePressed', // v29 name for 'spaceKey'
16
+ 'keyboardSelectAll', // v36 Ctrl+A; absent from v29's source union
17
+ ]);
18
+ /**
19
+ * True while `RowSelectRenderer` is applying a user checkbox click.
20
+ * @remarks
21
+ * This relies on AG Grid dispatching `rowSelected` synchronously from inside `setSelected()`, while
22
+ * the marker is still on the node. That holds on both versions in use (v36 `selectRowNode` and v29
23
+ * `selectThisNode` both set `__selected` and dispatch inline), but a future version that batches
24
+ * selection events would make the marker silently dead - and no unit test can catch that, because
25
+ * the test's own `setSelected` stub *is* the synchronous dispatch.
26
+ * @internal
27
+ */
28
+ export function isUserCheckboxToggle(node) {
29
+ return (typeof node === 'object' &&
30
+ node !== null &&
31
+ node[USER_TOGGLE_MARKER] === true);
32
+ }
33
+ /**
34
+ * True when a selection change came from the user rather than from a programmatic
35
+ * `setSelected()`, which defaults to source `'api'`.
36
+ * @internal
37
+ */
38
+ export function isUserSelectionEvent(event) {
39
+ return USER_SELECTION_SOURCES.has(event.source) || isUserCheckboxToggle(event.node);
40
+ }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/pbc-reporting-ui",
3
3
  "description": "Genesis PBC Reporting UI",
4
- "version": "15.19.2-FUI-2610.2",
4
+ "version": "15.19.2-canary.2",
5
5
  "license": "SEE LICENSE IN license.txt",
6
6
  "main": "dist/esm/index.js",
7
7
  "types": "dist/dts/index.d.ts",
@@ -86,32 +86,32 @@
86
86
  "@ag-grid-community/core": "29.2.0"
87
87
  },
88
88
  "dependencies": {
89
- "@genesislcap/foundation-comms": "15.19.2-FUI-2610.2",
90
- "@genesislcap/foundation-entity-management": "15.19.2-FUI-2610.2",
91
- "@genesislcap/foundation-events": "15.19.2-FUI-2610.2",
92
- "@genesislcap/foundation-forms": "15.19.2-FUI-2610.2",
93
- "@genesislcap/foundation-logger": "15.19.2-FUI-2610.2",
94
- "@genesislcap/foundation-notifications": "15.19.2-FUI-2610.2",
95
- "@genesislcap/foundation-ui": "15.19.2-FUI-2610.2",
96
- "@genesislcap/foundation-user": "15.19.2-FUI-2610.2",
97
- "@genesislcap/foundation-utils": "15.19.2-FUI-2610.2",
98
- "@genesislcap/foundation-zero": "15.19.2-FUI-2610.2",
99
- "@genesislcap/foundation-zero-grid-pro": "15.19.2-FUI-2610.2",
100
- "@genesislcap/grid-pro": "15.19.2-FUI-2610.2",
101
- "@genesislcap/rapid-design-system": "15.19.2-FUI-2610.2",
102
- "@genesislcap/rapid-grid-pro": "15.19.2-FUI-2610.2",
103
- "@genesislcap/web-core": "15.19.2-FUI-2610.2",
89
+ "@genesislcap/foundation-comms": "15.19.2-canary.2",
90
+ "@genesislcap/foundation-entity-management": "15.19.2-canary.2",
91
+ "@genesislcap/foundation-events": "15.19.2-canary.2",
92
+ "@genesislcap/foundation-forms": "15.19.2-canary.2",
93
+ "@genesislcap/foundation-logger": "15.19.2-canary.2",
94
+ "@genesislcap/foundation-notifications": "15.19.2-canary.2",
95
+ "@genesislcap/foundation-ui": "15.19.2-canary.2",
96
+ "@genesislcap/foundation-user": "15.19.2-canary.2",
97
+ "@genesislcap/foundation-utils": "15.19.2-canary.2",
98
+ "@genesislcap/foundation-zero": "15.19.2-canary.2",
99
+ "@genesislcap/foundation-zero-grid-pro": "15.19.2-canary.2",
100
+ "@genesislcap/grid-pro": "15.19.2-canary.2",
101
+ "@genesislcap/rapid-design-system": "15.19.2-canary.2",
102
+ "@genesislcap/rapid-grid-pro": "15.19.2-canary.2",
103
+ "@genesislcap/web-core": "15.19.2-canary.2",
104
104
  "@reduxjs/toolkit": "^2.2.5",
105
105
  "@types/node": "^22.10.2",
106
106
  "change-case": "^5.4.3",
107
107
  "lodash": "^4.17.21"
108
108
  },
109
109
  "devDependencies": {
110
- "@genesislcap/eslint-config": "15.19.2-FUI-2610.2",
111
- "@genesislcap/foundation-testing": "15.19.2-FUI-2610.2",
112
- "@genesislcap/genx": "15.19.2-FUI-2610.2",
113
- "@genesislcap/prettier-config": "15.19.2-FUI-2610.2",
114
- "@genesislcap/stylelint-config": "15.19.2-FUI-2610.2",
110
+ "@genesislcap/eslint-config": "15.19.2-canary.2",
111
+ "@genesislcap/foundation-testing": "15.19.2-canary.2",
112
+ "@genesislcap/genx": "15.19.2-canary.2",
113
+ "@genesislcap/prettier-config": "15.19.2-canary.2",
114
+ "@genesislcap/stylelint-config": "15.19.2-canary.2",
115
115
  "@types/json-schema": "^7.0.11",
116
116
  "playwright-lighthouse": "^4.0.0",
117
117
  "rimraf": "^5.0.0"