@base-framework/base 3.7.77 → 3.7.78

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.
@@ -43,10 +43,23 @@ export class DataResumeHelper {
43
43
  static refreshContext(component: object): void;
44
44
  /**
45
45
  * Resume path for temp components created by
46
- * `{ data: localVar }` in layouts: the fresh data
47
- * instance must win so closures stay valid; only
48
- * persisted keys missing from fresh (or all keys
49
- * when retainState is set) are merged in.
46
+ * `{ data: localVar }` in layouts.
47
+ *
48
+ * The fresh data instance must win as the *reference*
49
+ * so closures in the parent atom still point at the
50
+ * same Data object, but the persisted *values* are the
51
+ * source of truth (the user's prior interactions —
52
+ * activeFilter, scroll position, etc.). Merging the
53
+ * persisted stage onto the fresh instance preserves
54
+ * both.
55
+ *
56
+ * Policy matches `_resumeOwned`:
57
+ * - retainState: persisted wins for ALL keys (incl. null).
58
+ * - refreshState: fresh wins; only persisted keys missing
59
+ * from fresh are copied.
60
+ * - default: persisted non-null values win on changed keys;
61
+ * null/undefined persisted values are ignored so fresh
62
+ * defaults stay and async refetches can repopulate.
50
63
  *
51
64
  * @protected
52
65
  * @param {object} component
@@ -55,10 +68,13 @@ export class DataResumeHelper {
55
68
  */
56
69
  protected static _resumeExternal(component: object, persistedData: Data | null): void;
57
70
  /**
58
- * Diff persisted stage against fresh stage for external
59
- * data. When retain is true, persisted values win for
60
- * every key; otherwise only persisted keys absent from
61
- * fresh are copied (so async-added properties survive).
71
+ * Diff persisted stage against fresh stage for external data.
72
+ *
73
+ * - retain=true: persisted values win for every key.
74
+ * - refresh=true: only persisted keys missing from fresh are
75
+ * copied (so async-added properties survive).
76
+ * - default: persisted non-null values win on changed keys;
77
+ * null/undefined persisted values are ignored.
62
78
  *
63
79
  * Reference-equal values are skipped to avoid the deep
64
80
  * Publisher.publish cascade on unchanged subtrees.
@@ -67,9 +83,10 @@ export class DataResumeHelper {
67
83
  * @param {object} old
68
84
  * @param {object} freshStage
69
85
  * @param {boolean} retain
86
+ * @param {boolean} refresh
70
87
  * @returns {Object<string, *>}
71
88
  */
72
- protected static _buildExternalUpdates(old: object, freshStage: object, retain: boolean): {
89
+ protected static _buildExternalUpdates(old: object, freshStage: object, retain: boolean, refresh: boolean): {
73
90
  [x: string]: any;
74
91
  };
75
92
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@base-framework/base",
3
- "version": "3.7.77",
3
+ "version": "3.7.78",
4
4
  "description": "This is a javascript framework.",
5
5
  "main": "./dist/base.js",
6
6
  "type": "module",