@trackunit/react-table 2.9.2 → 2.9.4

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,6 +576,15 @@ 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.
587
+ *
579
588
  * @param persistenceKey - Unique key used to store and retrieve the table state.
580
589
  * Must be camelCase and at most 15 characters (e.g. "userTable", "assetList").
581
590
  * @returns {UseTablePersistenceResult} An object containing:
@@ -607,6 +616,11 @@ const useTablePersistence = (persistenceKey) => {
607
616
  // query-string cap. `usePersistedState` also migrates any legacy
608
617
  // `?<key>=...` search param into the hash on first load.
609
618
  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,
610
624
  });
611
625
  // Identity that reported the state currently held in `pendingState`.
612
626
  const pendingOwnerIdRef = react.useRef(undefined);
package/index.esm.js CHANGED
@@ -575,6 +575,15 @@ 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.
586
+ *
578
587
  * @param persistenceKey - Unique key used to store and retrieve the table state.
579
588
  * Must be camelCase and at most 15 characters (e.g. "userTable", "assetList").
580
589
  * @returns {UseTablePersistenceResult} An object containing:
@@ -606,6 +615,11 @@ const useTablePersistence = (persistenceKey) => {
606
615
  // query-string cap. `usePersistedState` also migrates any legacy
607
616
  // `?<key>=...` search param into the hash on first load.
608
617
  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,
609
623
  });
610
624
  // Identity that reported the state currently held in `pendingState`.
611
625
  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.9.2",
3
+ "version": "2.9.4",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "engines": {
@@ -11,15 +11,15 @@
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.4.2",
15
- "@trackunit/react-core-hooks": "1.23.2",
16
- "@trackunit/shared-utils": "1.17.2",
17
- "@trackunit/css-class-variance-utilities": "2.1.2",
18
- "@trackunit/ui-icons": "1.15.2",
19
- "@trackunit/react-table-base-components": "2.10.2",
20
- "@trackunit/react-form-components": "2.8.2",
21
- "@trackunit/i18n-library-translation": "2.6.2",
22
- "@trackunit/iris-app-runtime-core-api": "1.19.2",
14
+ "@trackunit/react-components": "3.4.4",
15
+ "@trackunit/react-core-hooks": "1.23.3",
16
+ "@trackunit/shared-utils": "1.17.3",
17
+ "@trackunit/css-class-variance-utilities": "2.1.3",
18
+ "@trackunit/ui-icons": "1.15.3",
19
+ "@trackunit/react-table-base-components": "2.10.4",
20
+ "@trackunit/react-form-components": "2.8.4",
21
+ "@trackunit/i18n-library-translation": "2.6.3",
22
+ "@trackunit/iris-app-runtime-core-api": "1.19.3",
23
23
  "zod": "^3.25.76"
24
24
  },
25
25
  "peerDependencies": {
@@ -97,6 +97,15 @@ 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.
108
+ *
100
109
  * @param persistenceKey - Unique key used to store and retrieve the table state.
101
110
  * Must be camelCase and at most 15 characters (e.g. "userTable", "assetList").
102
111
  * @returns {UseTablePersistenceResult} An object containing: