@trackunit/react-table 2.10.2 → 2.10.3

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/index.cjs.js CHANGED
@@ -576,14 +576,11 @@ const isOwnedByCurrentUser = (ownerId, clientSideUserId) => ownerId === undefine
576
576
  * the URL is unaffected — it renders for anyone and only becomes the reader's
577
577
  * persisted layout once they change the table themselves.
578
578
  *
579
- * The hash is stamped with the identity that wrote it. A hash left behind by
580
- * a *different* account that also uses this browser is ignored in favour of
581
- * the current user's localStorage (and replaced with it), so accounts sharing
582
- * a PC do not overwrite each other's layouts. A hash stamped by an identity
583
- * with no state here (a link shared from another device) still renders. An
584
- * unstamped hash written before stamping existed renders only when the
585
- * current user has nothing saved; otherwise their localStorage wins and the
586
- * hash is restamped.
579
+ * The hash always wins on load so a link or bookmark renders the same layout
580
+ * for whoever opens it. Each hash write is stamped with the identity that
581
+ * wrote it; the stamp is read only by the login redirect, which drops a hash
582
+ * left behind by a *different* account that also uses this browser so
583
+ * accounts sharing a PC do not hand their layouts to each other (GLU-2396).
587
584
  *
588
585
  * @param persistenceKey - Unique key used to store and retrieve the table state.
589
586
  * Must be camelCase and at most 15 characters (e.g. "userTable", "assetList").
@@ -616,11 +613,11 @@ const useTablePersistence = (persistenceKey) => {
616
613
  // query-string cap. `usePersistedState` also migrates any legacy
617
614
  // `?<key>=...` search param into the hash on first load.
618
615
  urlLocation: "hash",
619
- // The hash outlives the session that wrote it (history, login redirects)
620
- // and is shared by every account on the same browser. Stamp it with the
621
- // writing identity so another account's layout left in the address bar
622
- // does not replace this user's saved layout (GLU-2396).
623
- scopeUrlToIdentity: true,
616
+ // The hash outlives the session that wrote it and is carried through the
617
+ // login redirect to the next account on the same browser. Stamp it with
618
+ // the writing identity so the redirect can drop another account's layout
619
+ // (GLU-2396). Reads are unaffected: the URL still wins for everyone.
620
+ stampUrlWithIdentity: true,
624
621
  });
625
622
  // Identity that reported the state currently held in `pendingState`.
626
623
  const pendingOwnerIdRef = react.useRef(undefined);
package/index.esm.js CHANGED
@@ -575,14 +575,11 @@ const isOwnedByCurrentUser = (ownerId, clientSideUserId) => ownerId === undefine
575
575
  * the URL is unaffected — it renders for anyone and only becomes the reader's
576
576
  * persisted layout once they change the table themselves.
577
577
  *
578
- * The hash is stamped with the identity that wrote it. A hash left behind by
579
- * a *different* account that also uses this browser is ignored in favour of
580
- * the current user's localStorage (and replaced with it), so accounts sharing
581
- * a PC do not overwrite each other's layouts. A hash stamped by an identity
582
- * with no state here (a link shared from another device) still renders. An
583
- * unstamped hash written before stamping existed renders only when the
584
- * current user has nothing saved; otherwise their localStorage wins and the
585
- * hash is restamped.
578
+ * The hash always wins on load so a link or bookmark renders the same layout
579
+ * for whoever opens it. Each hash write is stamped with the identity that
580
+ * wrote it; the stamp is read only by the login redirect, which drops a hash
581
+ * left behind by a *different* account that also uses this browser so
582
+ * accounts sharing a PC do not hand their layouts to each other (GLU-2396).
586
583
  *
587
584
  * @param persistenceKey - Unique key used to store and retrieve the table state.
588
585
  * Must be camelCase and at most 15 characters (e.g. "userTable", "assetList").
@@ -615,11 +612,11 @@ const useTablePersistence = (persistenceKey) => {
615
612
  // query-string cap. `usePersistedState` also migrates any legacy
616
613
  // `?<key>=...` search param into the hash on first load.
617
614
  urlLocation: "hash",
618
- // The hash outlives the session that wrote it (history, login redirects)
619
- // and is shared by every account on the same browser. Stamp it with the
620
- // writing identity so another account's layout left in the address bar
621
- // does not replace this user's saved layout (GLU-2396).
622
- scopeUrlToIdentity: true,
615
+ // The hash outlives the session that wrote it and is carried through the
616
+ // login redirect to the next account on the same browser. Stamp it with
617
+ // the writing identity so the redirect can drop another account's layout
618
+ // (GLU-2396). Reads are unaffected: the URL still wins for everyone.
619
+ stampUrlWithIdentity: true,
623
620
  });
624
621
  // Identity that reported the state currently held in `pendingState`.
625
622
  const pendingOwnerIdRef = useRef(undefined);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entry.js","sourceRoot":"","sources":["../../../../../libs/react/table/migrations/entry.ts"],"names":[],"mappings":"","sourcesContent":["export {};\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trackunit/react-table",
3
- "version": "2.10.2",
3
+ "version": "2.10.3",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -11,13 +11,13 @@
11
11
  "react-dnd": "16.0.1",
12
12
  "react-dnd-html5-backend": "16.0.1",
13
13
  "tailwind-merge": "^2.0.0",
14
- "@trackunit/react-components": "3.5.2",
14
+ "@trackunit/react-components": "3.5.3",
15
15
  "@trackunit/react-core-hooks": "1.24.2",
16
16
  "@trackunit/shared-utils": "1.18.2",
17
17
  "@trackunit/css-class-variance-utilities": "2.2.2",
18
18
  "@trackunit/ui-icons": "1.16.2",
19
- "@trackunit/react-table-base-components": "2.11.2",
20
- "@trackunit/react-form-components": "2.9.2",
19
+ "@trackunit/react-table-base-components": "2.11.3",
20
+ "@trackunit/react-form-components": "2.9.3",
21
21
  "@trackunit/i18n-library-translation": "2.7.2",
22
22
  "@trackunit/iris-app-runtime-core-api": "1.20.2",
23
23
  "zod": "^3.25.76"
@@ -97,14 +97,11 @@ type UseTablePersistenceResult = {
97
97
  * the URL is unaffected — it renders for anyone and only becomes the reader's
98
98
  * persisted layout once they change the table themselves.
99
99
  *
100
- * The hash is stamped with the identity that wrote it. A hash left behind by
101
- * a *different* account that also uses this browser is ignored in favour of
102
- * the current user's localStorage (and replaced with it), so accounts sharing
103
- * a PC do not overwrite each other's layouts. A hash stamped by an identity
104
- * with no state here (a link shared from another device) still renders. An
105
- * unstamped hash written before stamping existed renders only when the
106
- * current user has nothing saved; otherwise their localStorage wins and the
107
- * hash is restamped.
100
+ * The hash always wins on load so a link or bookmark renders the same layout
101
+ * for whoever opens it. Each hash write is stamped with the identity that
102
+ * wrote it; the stamp is read only by the login redirect, which drops a hash
103
+ * left behind by a *different* account that also uses this browser so
104
+ * accounts sharing a PC do not hand their layouts to each other (GLU-2396).
108
105
  *
109
106
  * @param persistenceKey - Unique key used to store and retrieve the table state.
110
107
  * Must be camelCase and at most 15 characters (e.g. "userTable", "assetList").