@base-framework/base 3.7.40 → 3.7.42

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.
@@ -33,6 +33,11 @@ export class Component extends Unit {
33
33
  * @type {string|null} stateTargetId // optional override of state id
34
34
  */
35
35
  stateTargetId: string | null;
36
+ /**
37
+ * @type {boolean} _externalData - true when data is provided
38
+ * externally (e.g. temp components from { data: localVar }).
39
+ */
40
+ _externalData: boolean;
36
41
  /**
37
42
  * This will set the data.
38
43
  *
@@ -61,16 +66,15 @@ export class Component extends Unit {
61
66
  }): void;
62
67
  stateHelper: any;
63
68
  /**
64
- * This will resume the data during persistence. If setData()
65
- * returns the same object reference as the persisted data,
66
- * or returns nothing, we keep the persisted data as-is
67
- * (preserving accumulated state like list items).
69
+ * This will resume the data during persistence.
70
+ *
71
+ * For components with externally-provided data (temp components
72
+ * created by { data: localVar } in layouts), we use the fresh
73
+ * data instance from setData() so closure references stay valid.
68
74
  *
69
- * If setData() returns a different object (e.g. an atom's
70
- * closure created a new Data instance), we use that fresh
71
- * instance so closure references stay valid, and merge
72
- * any persisted properties that the fresh data does not
73
- * already define.
75
+ * For regular components, the persisted data is the source of
76
+ * truth it holds accumulated state (list items, filters, etc.)
77
+ * that should be preserved until the component fetches updates.
74
78
  *
75
79
  * @protected
76
80
  * @param {object|null} persistedData
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.7.40",
3
+ "version": "3.7.42",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",