@declarion/react 0.54.0 → 0.54.1

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.
Files changed (35) hide show
  1. package/dist-lib/{DraggableChildrenTable-CPoUY99R.js → DraggableChildrenTable-Djc7QDzR.js} +32 -32
  2. package/dist-lib/{Grid--QAEby8k.js → Grid-Bd2r0_4J.js} +45 -45
  3. package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-V6nf9aa_.js} +716 -714
  4. package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-Cdsvu0Vs.js} +29 -29
  5. package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CZo5ZgM7.js} +1 -1
  6. package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CJm3vz9p.js} +40 -40
  7. package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-DoIjCzjQ.js} +492 -492
  8. package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-DnM8e14t.js} +743 -742
  9. package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-BmHGYbD9.js} +128 -128
  10. package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-CA53NerB.js} +1 -1
  11. package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-JcUrLFaW.js} +177 -177
  12. package/dist-lib/api/events.d.ts +13 -4
  13. package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-Q2kwqv8V.js} +19 -19
  14. package/dist-lib/components/pages/list/ListToolbar.d.ts +5 -3
  15. package/dist-lib/components/pages/list/useListQuery.d.ts +1 -5
  16. package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-ssZvtr8J.js} +268 -397
  17. package/dist-lib/{format-count-B5SLlNOb.js → format-count-DHuivNT7.js} +236 -236
  18. package/dist-lib/hooks/useEntityData.d.ts +7 -0
  19. package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
  20. package/dist-lib/hooks/useSSE.d.ts +0 -1
  21. package/dist-lib/index.js +806 -806
  22. package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
  23. package/dist-lib/lib/realtime-reconcile.d.ts +0 -9
  24. package/dist-lib/lib/realtime-resync.d.ts +23 -0
  25. package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-lm9ViVLA.js} +17 -17
  26. package/dist-lib/{registry-D0RhCnEL.js → registry-DsQFhEAD.js} +511 -511
  27. package/dist-lib/stores/realtime.d.ts +86 -19
  28. package/dist-lib/testing.js +40 -40
  29. package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-aHx9HH1m.js} +2472 -1963
  30. package/dist-lib/useListQuery-DZn2BAxY.js +96 -0
  31. package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CAqKmUKg.js} +25 -25
  32. package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-DYW9WoK7.js} +10 -10
  33. package/dist-lib/{value-CQzGOI0F.js → value-CzKQPJOp.js} +4 -4
  34. package/package.json +4 -4
  35. package/dist-lib/useListQuery-C2nq58YV.js +0 -90
@@ -1,139 +1,10 @@
1
- import { Ft as e, Ht as t, It as n, Kt as r, Mt as i, Ut as a, Yt as o, Zt as s, a as c, an as l, ar as u, en as d, in as f, k as p, on as m, or as h, qt as g, yn as _ } from "./useCurrentScreen-DVTXCj_K.js";
2
- import { useCallback as v, useEffect as y, useMemo as b, useRef as ee, useState as te } from "react";
3
- import { parsePath as ne, useLocation as re, useNavigate as ie } from "react-router";
4
- import { useMutation as x, useQuery as S, useQueryClient as C } from "@tanstack/react-query";
5
- import { create as w } from "zustand";
6
- //#region src/api/params.ts
7
- async function ae() {
8
- let e = (await _("/api/params/public")).data;
9
- if (Array.isArray(e)) return { parameters: e };
10
- let t = e ?? {};
11
- return {
12
- parameters: t.parameters ?? [],
13
- accents: t.accents,
14
- messages: t.messages,
15
- meta: t.meta
16
- };
17
- }
18
- async function oe(e) {
19
- return (await _(`/api/params/${encodeURIComponent(e)}`)).data;
20
- }
21
- async function se(e) {
22
- return (await _(`/api/params${e === "tenant" ? "?resolution=tenant" : ""}`)).data ?? [];
23
- }
24
- //#endregion
25
- //#region src/hooks/useParams.ts
26
- var ce = "$params";
27
- function le({ carrierEntityCode: e, rowId: t, enabled: n = !0, onWritten: r }) {
28
- let i = C(), [a, c] = te(null), l = S({
29
- queryKey: [
30
- "params-carrier-detail",
31
- e,
32
- t
33
- ],
34
- queryFn: () => s(e, t),
35
- enabled: n && !!t,
36
- staleTime: 3e4
37
- }), u = l.data?.data, d = !!u && !("$params" in u), f = b(() => Array.isArray(u?.$params) ? u[ce] : [], [u]), p = b(() => new Map(f.map((e) => [e.param_code, e])), [f]), m = v(async (n) => {
38
- c(null);
39
- try {
40
- await o(`${e}.__update`, {
41
- object_ids: [t],
42
- entity: e,
43
- fields: { [ce]: n }
44
- }), await i.invalidateQueries({ queryKey: ["params-all"] }), await i.invalidateQueries({ queryKey: [
45
- "params-carrier-detail",
46
- e,
47
- t
48
- ] }), r?.();
49
- } catch (e) {
50
- c(e instanceof Error ? e.message : "Failed to save parameter.");
51
- }
52
- }, [
53
- e,
54
- t,
55
- i,
56
- r
57
- ]), h = v((e, t) => {
58
- let n = f.filter((t) => t.param_code !== e.code);
59
- return n.push({
60
- param_code: e.code,
61
- value: t
62
- }), m(n);
63
- }, [f, m]), g = v((e) => m(f.filter((t) => t.param_code !== e.code)), [f, m]), _ = v(() => c(null), []);
64
- return {
65
- overrides: f,
66
- overrideByCode: p,
67
- missingParams: d,
68
- isLoading: l.isLoading,
69
- error: a,
70
- clearError: _,
71
- save: h,
72
- reset: g
73
- };
74
- }
75
- function ue(e) {
76
- return S({
77
- queryKey: ["params-all", e ?? "full"],
78
- queryFn: () => se(e),
79
- staleTime: 3e4
80
- });
81
- }
82
- function de() {
83
- return S({
84
- queryKey: ["params-public"],
85
- queryFn: ae,
86
- staleTime: 3e5
87
- });
88
- }
89
- function fe(e, t = {}) {
90
- let n = t.enabled ?? !0;
91
- return S({
92
- queryKey: ["params", e],
93
- queryFn: () => oe(e),
94
- enabled: !!e && n,
95
- staleTime: 6e4
96
- });
97
- }
98
- function pe(e) {
99
- let t = m((e) => e.isAuthenticated), n = de(), r = fe(e, { enabled: t }), i = me(n.data?.parameters, e);
100
- if (t && r.data?.found) return {
101
- value: r.data.value,
102
- found: !0,
103
- source: r.data.source,
104
- loading: !1,
105
- error: null
106
- };
107
- let a = i !== void 0;
108
- return {
109
- value: i?.value,
110
- found: a,
111
- source: a ? "public" : void 0,
112
- loading: n.isLoading || t && r.isLoading && !r.data && !r.error,
113
- error: r.error ?? n.error ?? null
114
- };
115
- }
116
- function me(e, t) {
117
- return e?.find((e) => e.code === t);
118
- }
119
- function he(e, t) {
120
- let n = m((e) => e.isAuthenticated), r = S({
121
- queryKey: ["params", e],
122
- queryFn: () => oe(e),
123
- enabled: !!e && n,
124
- staleTime: 6e4
125
- }), i = r.data, a = !!i?.found;
126
- return {
127
- value: a ? i.value : t,
128
- found: a,
129
- source: i?.source,
130
- loading: r.isLoading,
131
- error: r.error ?? null
132
- };
133
- }
134
- //#endregion
1
+ import { D as e, Ft as t, Ht as n, Kt as r, Pt as i, Qt as a, Vt as o, Zt as s, a as c, an as l, dn as u, dr as d, jt as f, ln as p, un as m, ur as h } from "./useCurrentScreen-aHx9HH1m.js";
2
+ import { useCallback as g, useEffect as _, useMemo as ee, useRef as te, useState as ne } from "react";
3
+ import { parsePath as re, useLocation as ie, useNavigate as ae } from "react-router";
4
+ import { useMutation as v, useQueryClient as y } from "@tanstack/react-query";
5
+ import { create as b } from "zustand";
135
6
  //#region src/stores/preferences.ts
136
- var ge = {
7
+ var x = {
137
8
  colorScheme: "light",
138
9
  accent: "violet",
139
10
  density: "compact",
@@ -145,22 +16,22 @@ var ge = {
145
16
  zebra: !0,
146
17
  aiSurface: "both",
147
18
  toastPosition: "bottom-right"
148
- }, _e = ["light", "dark"], ve = [
19
+ }, oe = ["light", "dark"], se = [
149
20
  "violet",
150
21
  "blue",
151
22
  "teal",
152
23
  "amber",
153
24
  "rose"
154
- ], ye = [
25
+ ], ce = [
155
26
  "compact",
156
27
  "comfortable",
157
28
  "cozy"
158
- ], be = ["wide", "collapsed"], xe = ["top", "bottom"], Se = [
29
+ ], le = ["wide", "collapsed"], ue = ["top", "bottom"], de = [
159
30
  "command",
160
31
  "panel",
161
32
  "both",
162
33
  "off"
163
- ], Ce = [
34
+ ], fe = [
164
35
  "top-left",
165
36
  "top-center",
166
37
  "top-right",
@@ -168,37 +39,37 @@ var ge = {
168
39
  "bottom-center",
169
40
  "bottom-right"
170
41
  ];
171
- function T(e, t) {
42
+ function S(e, t) {
172
43
  return typeof t == "string" && e.includes(t) ? t : void 0;
173
44
  }
174
- function E(e) {
175
- let t = {}, n = T(_e, e.colorScheme);
45
+ function C(e) {
46
+ let t = {}, n = S(oe, e.colorScheme);
176
47
  n && (t.colorScheme = n);
177
- let r = T(ve, e.accent);
48
+ let r = S(se, e.accent);
178
49
  r && (t.accent = r);
179
- let i = T(ye, e.density);
50
+ let i = S(ce, e.density);
180
51
  i && (t.density = i);
181
- let a = T(be, e.sidebar);
52
+ let a = S(le, e.sidebar);
182
53
  a && (t.sidebar = a);
183
- let o = T(xe, e.tabsPosition);
54
+ let o = S(ue, e.tabsPosition);
184
55
  o && (t.tabsPosition = o);
185
- let s = T(Se, e.aiSurface);
56
+ let s = S(de, e.aiSurface);
186
57
  s && (t.aiSurface = s);
187
- let c = T(Ce, e.toastPosition);
58
+ let c = S(fe, e.toastPosition);
188
59
  return c && (t.toastPosition = c), typeof e.tabsMaxOpen == "number" && e.tabsMaxOpen > 0 && (t.tabsMaxOpen = e.tabsMaxOpen), typeof e.radius == "number" && e.radius >= 0 && e.radius <= 32 && (t.radius = e.radius), typeof e.zebra == "boolean" && (t.zebra = e.zebra), typeof e.tabsPersist == "boolean" && (t.tabsPersist = e.tabsPersist), t;
189
60
  }
190
- var we = ["declarion-preferences", "declarion-appearance"];
191
- function Te() {
61
+ var pe = ["declarion-preferences", "declarion-appearance"];
62
+ function me() {
192
63
  if (!(typeof window > "u")) try {
193
- for (let e of we) localStorage.removeItem(e);
64
+ for (let e of pe) localStorage.removeItem(e);
194
65
  } catch {}
195
66
  }
196
- function D(e) {
67
+ function w(e) {
197
68
  if (typeof document > "u") return;
198
69
  let t = document.documentElement;
199
70
  t.dataset.colorScheme = e.colorScheme, t.dataset.accent = e.accent, t.dataset.density = e.density, t.dataset.sidebar = e.sidebar, t.dataset.tabbar = e.tabsPosition, t.dataset.zebra = e.zebra ? "on" : "off", t.dataset.ai = e.aiSurface, t.style.setProperty("--radius-md", `${e.radius}px`), t.style.setProperty("--radius-lg", `${e.radius + 3}px`);
200
71
  }
201
- function Ee(e) {
72
+ function he(e) {
202
73
  return {
203
74
  colorScheme: e.color_scheme,
204
75
  accent: e.accent,
@@ -213,70 +84,70 @@ function Ee(e) {
213
84
  toastPosition: e.toast_position
214
85
  };
215
86
  }
216
- Te();
217
- var O = /* @__PURE__ */ new Set(), De = { ...ge };
218
- typeof window < "u" && D(De);
219
- var k = w((e, t) => ({
220
- ...De,
87
+ me();
88
+ var T = /* @__PURE__ */ new Set(), ge = { ...x };
89
+ typeof window < "u" && w(ge);
90
+ var E = b((e, t) => ({
91
+ ...ge,
221
92
  set: (n, r) => {
222
- let i = E({ [n]: r });
223
- i[n] !== void 0 && (D({
93
+ let i = C({ [n]: r });
94
+ i[n] !== void 0 && (w({
224
95
  ...t(),
225
96
  ...i
226
- }), O.add(n), e(i));
97
+ }), T.add(n), e(i));
227
98
  },
228
99
  setMany: (n) => {
229
- let r = E(n);
100
+ let r = C(n);
230
101
  if (Object.keys(r).length) {
231
- D({
102
+ w({
232
103
  ...t(),
233
104
  ...r
234
105
  });
235
- for (let e of Object.keys(r)) O.add(e);
106
+ for (let e of Object.keys(r)) T.add(e);
236
107
  e(r);
237
108
  }
238
109
  },
239
110
  hydrateFromBranding: (t) => {
240
111
  if (!t) return;
241
- let n = Ee(t), r = {};
242
- for (let [e, t] of Object.entries(n)) O.has(e) || t !== void 0 && (r[e] = t);
243
- let i = E(r);
244
- Object.keys(i).length && (D({
245
- ...k.getState(),
112
+ let n = he(t), r = {};
113
+ for (let [e, t] of Object.entries(n)) T.has(e) || t !== void 0 && (r[e] = t);
114
+ let i = C(r);
115
+ Object.keys(i).length && (w({
116
+ ...E.getState(),
246
117
  ...i
247
118
  }), e(i));
248
119
  },
249
120
  resetToDefaults: (t) => {
250
- O.clear(), Te();
251
- let n = t ? E(Ee(t)) : {}, r = {
252
- ...ge,
121
+ T.clear(), me();
122
+ let n = t ? C(he(t)) : {}, r = {
123
+ ...x,
253
124
  ...n
254
125
  };
255
- D(r), e(r);
126
+ w(r), e(r);
256
127
  }
257
- })), Oe = ["/login", "/signup"];
258
- function ke(e) {
259
- return Oe.includes(e);
128
+ })), _e = ["/login", "/signup"];
129
+ function ve(e) {
130
+ return _e.includes(e);
260
131
  }
261
- function A(e) {
132
+ function D(e) {
262
133
  return typeof e == "string" && e.startsWith("/") && !e.startsWith("//");
263
134
  }
264
- var Ae = 4096;
265
- function j(e) {
266
- return typeof e == "string" && e.length <= Ae;
135
+ var O = 4096;
136
+ function k(e) {
137
+ return typeof e == "string" && e.length <= O;
267
138
  }
268
- function je(e) {
139
+ function ye(e) {
269
140
  if (e === null) return null;
270
141
  if (e === void 0 || typeof e != "object" || Array.isArray(e)) return;
271
142
  let t = e;
272
- if (!A(t.pathname) || t.pathname.length > Ae || t.pathname.includes("?") || t.pathname.includes("#")) return;
143
+ if (!D(t.pathname) || t.pathname.length > O || t.pathname.includes("?") || t.pathname.includes("#")) return;
273
144
  let n = { pathname: t.pathname };
274
145
  if (t.search !== void 0) {
275
- if (!j(t.search) || t.search.startsWith("?")) return;
146
+ if (!k(t.search) || t.search.startsWith("?")) return;
276
147
  t.search && (n.search = t.search);
277
148
  }
278
149
  if (t.hash !== void 0) {
279
- if (!j(t.hash) || t.hash && !t.hash.startsWith("#")) return;
150
+ if (!k(t.hash) || t.hash && !t.hash.startsWith("#")) return;
280
151
  t.hash && (n.hash = t.hash);
281
152
  }
282
153
  for (let e of [
@@ -285,29 +156,29 @@ function je(e) {
285
156
  "icon",
286
157
  "screen"
287
158
  ]) if (t[e] !== void 0) {
288
- if (!j(t[e])) return;
159
+ if (!k(t[e])) return;
289
160
  t[e] && (n[e] = t[e]);
290
161
  }
291
162
  return n;
292
163
  }
293
- function M(e) {
164
+ function A(e) {
294
165
  return e.closable !== !1;
295
166
  }
296
- function Me(e, t, n, r) {
297
- if (n === "all") return e.filter(M).map((e) => e.id);
167
+ function be(e, t, n, r) {
168
+ if (n === "all") return e.filter(A).map((e) => e.id);
298
169
  let i = r ?? t;
299
170
  if (!i) return [];
300
171
  let a = e.findIndex((e) => e.id === i);
301
- return a === -1 ? [] : n === "current" ? M(e[a]) ? [e[a].id] : [] : n === "others" ? e.filter((e, t) => t !== a && M(e)).map((e) => e.id) : e.slice(a + 1).filter(M).map((e) => e.id);
172
+ return a === -1 ? [] : n === "current" ? A(e[a]) ? [e[a].id] : [] : n === "others" ? e.filter((e, t) => t !== a && A(e)).map((e) => e.id) : e.slice(a + 1).filter(A).map((e) => e.id);
302
173
  }
303
- var N = null, P = null;
304
- function Ne(e, t) {
174
+ var j = null, M = null;
175
+ function xe(e, t) {
305
176
  return `declarion::${e}::${t}::tabs`;
306
177
  }
307
- function Pe() {
308
- return !N || !P ? null : Ne(N, P);
178
+ function Se() {
179
+ return !j || !M ? null : xe(j, M);
309
180
  }
310
- function Fe(e) {
181
+ function N(e) {
311
182
  let t;
312
183
  try {
313
184
  t = JSON.parse(e);
@@ -318,7 +189,7 @@ function Fe(e) {
318
189
  let n = t;
319
190
  return Array.isArray(n.tabs) ? {
320
191
  tabs: n.tabs.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.pathname == "string").map((e) => {
321
- let t = je(e.returnTo);
192
+ let t = ye(e.returnTo);
322
193
  if (t === void 0) {
323
194
  let { returnTo: t, ...n } = e;
324
195
  return n;
@@ -331,22 +202,22 @@ function Fe(e) {
331
202
  activeTabId: typeof n.activeTabId == "string" ? n.activeTabId : null
332
203
  } : null;
333
204
  }
334
- function Ie(e, t) {
205
+ function Ce(e, t) {
335
206
  if (typeof window > "u") return null;
336
- let n = localStorage.getItem(Ne(e, t));
207
+ let n = localStorage.getItem(xe(e, t));
337
208
  if (!n) return null;
338
- let r = Fe(n);
209
+ let r = N(n);
339
210
  if (!r) return null;
340
211
  let i = r.tabs.find((e) => e.id === r.activeTabId), a = i?.pathname;
341
- if (A(a)) {
212
+ if (D(a)) {
342
213
  let e = typeof i?.search == "string" ? i.search : "", t = e.startsWith("?") ? e.slice(1) : e;
343
214
  return t ? `${a}?${t}` : a;
344
215
  }
345
216
  return null;
346
217
  }
347
- function F(e, t) {
218
+ function P(e, t) {
348
219
  if (typeof window > "u") return;
349
- let n = k.getState().tabsPersist, r = Pe();
220
+ let n = E.getState().tabsPersist, r = Se();
350
221
  if (r) {
351
222
  if (!n) {
352
223
  try {
@@ -362,24 +233,24 @@ function F(e, t) {
362
233
  } catch {}
363
234
  }
364
235
  }
365
- function Le() {
366
- if (typeof window > "u" || !k.getState().tabsPersist) return null;
367
- let e = Pe();
236
+ function we() {
237
+ if (typeof window > "u" || !E.getState().tabsPersist) return null;
238
+ let e = Se();
368
239
  if (!e) return null;
369
240
  let t = localStorage.getItem(e);
370
- return t ? Fe(t) : null;
241
+ return t ? N(t) : null;
371
242
  }
372
- var I = w((e, t) => ({
243
+ var F = b((e, t) => ({
373
244
  tabs: [],
374
245
  activeTabId: null,
375
246
  openTab: (n) => {
376
- if (ke(n.pathname)) return "";
247
+ if (ve(n.pathname)) return "";
377
248
  let r = t(), i = r.tabs.find((e) => e.pathname === n.pathname);
378
- if (i) return e({ activeTabId: i.id }), F(r.tabs, i.id), i.id;
249
+ if (i) return e({ activeTabId: i.id }), P(r.tabs, i.id), i.id;
379
250
  let a = crypto.randomUUID(), o = {
380
251
  ...n,
381
252
  id: a
382
- }, s = [...r.tabs, o], c = k.getState().tabsMaxOpen;
253
+ }, s = [...r.tabs, o], c = E.getState().tabsMaxOpen;
383
254
  if (c > 0 && s.length > c) {
384
255
  let e = s.findIndex((e) => e.id !== a && e.closable !== !1 && !e.dirty);
385
256
  e !== -1 && (s = s.filter((t, n) => n !== e));
@@ -387,7 +258,7 @@ var I = w((e, t) => ({
387
258
  return e({
388
259
  tabs: s,
389
260
  activeTabId: a
390
- }), F(s, a), a;
261
+ }), P(s, a), a;
391
262
  },
392
263
  closeTab: (e) => {
393
264
  let n = t(), r = n.tabs.findIndex((t) => t.id === e);
@@ -396,14 +267,14 @@ var I = w((e, t) => ({
396
267
  closeTabs: (n) => {
397
268
  let r = t(), i = new Set(n);
398
269
  if (i.size === 0) return r.tabs.find((e) => e.id === r.activeTabId) ?? null;
399
- let a = r.tabs.findIndex((e) => e.id === r.activeTabId), o = r.tabs.filter((e) => !(i.has(e.id) && M(e))), s = r.activeTabId;
270
+ let a = r.tabs.findIndex((e) => e.id === r.activeTabId), o = r.tabs.filter((e) => !(i.has(e.id) && A(e))), s = r.activeTabId;
400
271
  return s && !o.some((e) => e.id === s) ? s = o.length === 0 ? null : o[Math.min(Math.max(a, 0), o.length - 1)].id : o.length === 0 && (s = null), e({
401
272
  tabs: o,
402
273
  activeTabId: s
403
- }), F(o, s), o.find((e) => e.id === s) ?? null;
274
+ }), P(o, s), o.find((e) => e.id === s) ?? null;
404
275
  },
405
276
  switchTab: (n) => {
406
- e({ activeTabId: n }), F(t().tabs, n);
277
+ e({ activeTabId: n }), P(t().tabs, n);
407
278
  },
408
279
  reorderTabs: (t, n) => {
409
280
  e((e) => {
@@ -430,7 +301,7 @@ var I = w((e, t) => ({
430
301
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
431
302
  ...e,
432
303
  returnTo: r
433
- } : e) })), F(t().tabs, t().activeTabId);
304
+ } : e) })), P(t().tabs, t().activeTabId);
434
305
  },
435
306
  commitTabNavigation: (n, r) => {
436
307
  let i = "returnTo" in r;
@@ -441,37 +312,37 @@ var I = w((e, t) => ({
441
312
  ...i ? { returnTo: r.returnTo } : {}
442
313
  } : e),
443
314
  activeTabId: n
444
- })), F(t().tabs, t().activeTabId);
315
+ })), P(t().tabs, t().activeTabId);
445
316
  },
446
317
  setDirty: (n, r) => {
447
318
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
448
319
  ...e,
449
320
  dirty: r
450
- } : e) })), F(t().tabs, t().activeTabId);
321
+ } : e) })), P(t().tabs, t().activeTabId);
451
322
  },
452
323
  setMode: (n, r) => {
453
324
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
454
325
  ...e,
455
326
  mode: r
456
- } : e) })), F(t().tabs, t().activeTabId);
327
+ } : e) })), P(t().tabs, t().activeTabId);
457
328
  },
458
329
  updateTab: (n, r) => {
459
330
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
460
331
  ...e,
461
332
  ...r
462
- } : e) })), F(t().tabs, t().activeTabId);
333
+ } : e) })), P(t().tabs, t().activeTabId);
463
334
  },
464
335
  setScope: (e, t) => {
465
- N = e, P = t;
336
+ j = e, M = t;
466
337
  },
467
338
  hydrate: () => {
468
- let t = Le();
339
+ let t = we();
469
340
  t && e({
470
341
  tabs: t.tabs,
471
342
  activeTabId: t.activeTabId
472
343
  });
473
344
  }
474
- })), L = w((e) => ({
345
+ })), I = b((e) => ({
475
346
  depth: 0,
476
347
  nextIsRoot: !1,
477
348
  applyNavigation: (t) => e((e) => e.nextIsRoot ? {
@@ -486,25 +357,25 @@ var I = w((e, t) => ({
486
357
  }));
487
358
  //#endregion
488
359
  //#region src/lib/screen-back.ts
489
- function Re(e) {
360
+ function Te(e) {
490
361
  return e ? e.startsWith("?") ? e.slice(1) : e : "";
491
362
  }
492
- function ze(e) {
363
+ function Ee(e) {
493
364
  if (e) return e.startsWith("?") ? e : `?${e}`;
494
365
  }
495
- function Be(e, t, n) {
496
- if (!A(e.pathname) || ke(e.pathname) || e.pathname === t) return;
497
- let r = Re(e.search), i = { pathname: e.pathname };
366
+ function De(e, t, n) {
367
+ if (!D(e.pathname) || ve(e.pathname) || e.pathname === t) return;
368
+ let r = Te(e.search), i = { pathname: e.pathname };
498
369
  return r && (i.search = r), e.hash && (i.hash = e.hash), n?.id && (i.tabId = n.id), n?.title && (i.title = n.title), n?.icon && (i.icon = n.icon), n?.screen && (i.screen = n.screen), i;
499
370
  }
500
- function Ve(e, t) {
371
+ function Oe(e, t) {
501
372
  return t ? {
502
373
  hasOriginBack: !1,
503
374
  allowFallbackBack: !0
504
375
  } : e === null ? {
505
376
  hasOriginBack: !1,
506
377
  allowFallbackBack: !1
507
- } : e && A(e.pathname) ? {
378
+ } : e && D(e.pathname) ? {
508
379
  hasOriginBack: !0,
509
380
  allowFallbackBack: !0
510
381
  } : {
@@ -512,8 +383,8 @@ function Ve(e, t) {
512
383
  allowFallbackBack: !0
513
384
  };
514
385
  }
515
- function He(e, t, n) {
516
- if (n || !e || !A(e.pathname)) return null;
386
+ function ke(e, t, n) {
387
+ if (n || !e || !D(e.pathname)) return null;
517
388
  let r = (e.tabId ? t.find((t) => t.id === e.tabId) : void 0) ?? t.find((t) => t.pathname === e.pathname);
518
389
  return {
519
390
  kind: r ? "live" : "reopen",
@@ -528,110 +399,110 @@ function He(e, t, n) {
528
399
  }
529
400
  //#endregion
530
401
  //#region src/hooks/useTabNavigate.ts
531
- function Ue(e, t) {
532
- let n = ne(e);
402
+ function Ae(e, t) {
403
+ let n = re(e);
533
404
  return {
534
405
  pathname: n.pathname ?? e,
535
- search: R(n.search) ?? R(t),
406
+ search: je(n.search) ?? je(t),
536
407
  hash: n.hash
537
408
  };
538
409
  }
539
- function R(e) {
410
+ function je(e) {
540
411
  if (!(!e || e === "?")) return e.startsWith("?") ? e : `?${e}`;
541
412
  }
542
- function We() {
543
- let e = ie(), { data: r } = l(), i = t(), a = n();
544
- return v((t, n) => {
545
- let { pathname: o, search: s, hash: c } = Ue(t, n?.search);
546
- if (i.enabled) {
547
- a(`${o}${s ?? ""}${c ?? ""}`, { replace: n?.replace });
413
+ function Me() {
414
+ let e = ae(), { data: n } = m(), r = o(), i = t();
415
+ return g((t, a) => {
416
+ let { pathname: o, search: s, hash: c } = Ae(t, a?.search);
417
+ if (r.enabled) {
418
+ i(`${o}${s ?? ""}${c ?? ""}`, { replace: a?.replace });
548
419
  return;
549
420
  }
550
- let l = I.getState(), d = n?.topLevel ?? !1, f = Re(s), p = d || typeof window > "u" ? void 0 : Be({
421
+ let l = F.getState(), u = a?.topLevel ?? !1, d = Te(s), f = u || typeof window > "u" ? void 0 : De({
551
422
  pathname: window.location.pathname,
552
423
  search: window.location.search,
553
424
  hash: window.location.hash
554
- }, o, l.findTabByPathname(window.location.pathname)), m = l.findTabByPathname(o);
555
- if (m) {
556
- if (d) {
557
- let t = f || m.search;
558
- l.commitTabNavigation(m.id, {
425
+ }, o, l.findTabByPathname(window.location.pathname)), p = l.findTabByPathname(o);
426
+ if (p) {
427
+ if (u) {
428
+ let t = d || p.search;
429
+ l.commitTabNavigation(p.id, {
559
430
  search: t,
560
431
  returnTo: null
561
432
  }), e({
562
433
  pathname: o,
563
434
  search: t ? `?${t}` : "",
564
435
  hash: c
565
- }, { replace: n?.replace });
436
+ }, { replace: a?.replace });
566
437
  return;
567
438
  }
568
- p ? l.commitTabNavigation(m.id, {
569
- search: f,
570
- returnTo: p
571
- }) : l.commitTabNavigation(m.id, { search: f }), e({
439
+ f ? l.commitTabNavigation(p.id, {
440
+ search: d,
441
+ returnTo: f
442
+ }) : l.commitTabNavigation(p.id, { search: d }), e({
572
443
  pathname: o,
573
444
  search: s,
574
445
  hash: c
575
- }, { replace: n?.replace });
446
+ }, { replace: a?.replace });
576
447
  return;
577
448
  }
578
- let h = n?.title ? void 0 : u(o, r?.screens, r?.entities), g = n?.title ?? h?.title ?? o, _ = n?.icon ?? h?.icon;
449
+ let m = a?.title ? void 0 : h(o, n?.screens, n?.entities), g = a?.title ?? m?.title ?? o, _ = a?.icon ?? m?.icon;
579
450
  l.openTab({
580
451
  pathname: o,
581
- search: f,
452
+ search: d,
582
453
  title: g,
583
454
  icon: _,
584
455
  closable: !0,
585
- returnTo: d ? null : p
456
+ returnTo: u ? null : f
586
457
  }), e({
587
458
  pathname: o,
588
459
  search: s,
589
460
  hash: c
590
- }, { replace: n?.replace });
461
+ }, { replace: a?.replace });
591
462
  }, [
592
463
  e,
593
- r?.screens,
594
- r?.entities,
595
- i.enabled,
596
- a
464
+ n?.screens,
465
+ n?.entities,
466
+ r.enabled,
467
+ i
597
468
  ]);
598
469
  }
599
470
  //#endregion
600
471
  //#region src/stores/page-state.ts
601
- var z = 18e5, B = null;
602
- function Ge(e) {
603
- B = e;
472
+ var L = 18e5, R = null;
473
+ function z(e) {
474
+ R = e;
604
475
  }
605
- function V(e) {
606
- if (!(!e || !B)) for (let t of e.queryKeys) B.removeQueries({
476
+ function B(e) {
477
+ if (!(!e || !R)) for (let t of e.queryKeys) R.removeQueries({
607
478
  queryKey: t,
608
479
  exact: !0
609
480
  });
610
481
  }
611
- function H(e, t) {
482
+ function V(e, t) {
612
483
  let n = e[t];
613
484
  if (!n) return e;
614
- V(n);
485
+ B(n);
615
486
  let r = { ...e };
616
487
  return delete r[t], r;
617
488
  }
618
- function Ke(e, t) {
489
+ function H(e, t) {
619
490
  let n = e;
620
491
  for (; Object.keys(n).length > 64;) {
621
492
  let e = null, r = Infinity;
622
493
  for (let [i, a] of Object.entries(n)) i !== t && a.lastActiveAt < r && (r = a.lastActiveAt, e = i);
623
494
  if (e === null) break;
624
- n = H(n, e);
495
+ n = V(n, e);
625
496
  }
626
497
  return n;
627
498
  }
628
- var U = w((e, t) => ({
499
+ var U = b((e, t) => ({
629
500
  entries: {},
630
- ttlMs: z,
501
+ ttlMs: L,
631
502
  setTtl: (n) => {
632
503
  if (n <= 0) {
633
504
  let { entries: r } = t();
634
- for (let e of Object.keys(r)) V(r[e]);
505
+ for (let e of Object.keys(r)) B(r[e]);
635
506
  e({
636
507
  ttlMs: n,
637
508
  entries: {}
@@ -655,7 +526,7 @@ var U = w((e, t) => ({
655
526
  lastActiveAt: o,
656
527
  queryKeys: []
657
528
  };
658
- e({ entries: Ke({
529
+ e({ entries: H({
659
530
  ...a.entries,
660
531
  [n]: c
661
532
  }, n) });
@@ -679,7 +550,7 @@ var U = w((e, t) => ({
679
550
  registerQueryKey: (n, r) => {
680
551
  let i = t();
681
552
  if (i.ttlMs <= 0) return;
682
- let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) => qe(e, r));
553
+ let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) => Ne(e, r));
683
554
  if (o && s) return;
684
555
  let c = o ? {
685
556
  ...o,
@@ -690,29 +561,29 @@ var U = w((e, t) => ({
690
561
  lastActiveAt: a,
691
562
  queryKeys: [r]
692
563
  };
693
- e({ entries: Ke({
564
+ e({ entries: H({
694
565
  ...i.entries,
695
566
  [n]: c
696
567
  }, n) });
697
568
  },
698
569
  kill: (n) => {
699
- let r = t(), i = H(r.entries, n);
570
+ let r = t(), i = V(r.entries, n);
700
571
  i !== r.entries && e({ entries: i });
701
572
  },
702
573
  sweep: (n) => {
703
574
  let { ttlMs: r, entries: i } = t(), a = i;
704
- for (let [e, t] of Object.entries(i)) (r <= 0 || n - t.lastActiveAt > r) && (a = H(a, e));
575
+ for (let [e, t] of Object.entries(i)) (r <= 0 || n - t.lastActiveAt > r) && (a = V(a, e));
705
576
  a !== i && e({ entries: a });
706
577
  },
707
578
  clear: () => {
708
579
  let { entries: n } = t();
709
580
  if (Object.keys(n).length !== 0) {
710
- for (let e of Object.keys(n)) V(n[e]);
581
+ for (let e of Object.keys(n)) B(n[e]);
711
582
  e({ entries: {} });
712
583
  }
713
584
  }
714
585
  }));
715
- function qe(e, t) {
586
+ function Ne(e, t) {
716
587
  if (e === t) return !0;
717
588
  try {
718
589
  return JSON.stringify(e) === JSON.stringify(t);
@@ -722,13 +593,13 @@ function qe(e, t) {
722
593
  }
723
594
  //#endregion
724
595
  //#region src/lib/page-inset.ts
725
- function Je(e) {
596
+ function Pe(e) {
726
597
  return {
727
598
  paddingLeft: `calc(${e}px + var(--safe-area-left))`,
728
599
  paddingRight: `calc(${e}px + var(--safe-area-right))`
729
600
  };
730
601
  }
731
- var Ye = 1200, W = null, G = null;
602
+ var Fe = 1200, W = null, G = null;
732
603
  function K() {
733
604
  return !W || !G ? null : `declarion::${W}::${G}::listlayout`;
734
605
  }
@@ -739,13 +610,13 @@ function q() {
739
610
  resizeEduShown: !1
740
611
  };
741
612
  }
742
- function Xe(e) {
613
+ function Ie(e) {
743
614
  if (typeof e != "object" || !e) return {};
744
615
  let t = {};
745
616
  for (let [n, r] of Object.entries(e)) typeof r == "number" && Number.isFinite(r) && r >= 60 && (t[n] = r);
746
617
  return t;
747
618
  }
748
- function Ze(e) {
619
+ function Le(e) {
749
620
  let t;
750
621
  try {
751
622
  t = JSON.parse(e);
@@ -756,7 +627,7 @@ function Ze(e) {
756
627
  let n = t;
757
628
  if (n.v !== 2) return null;
758
629
  let r = {};
759
- if (n.widths && typeof n.widths == "object") for (let [e, t] of Object.entries(n.widths)) r[e] = Xe(t);
630
+ if (n.widths && typeof n.widths == "object") for (let [e, t] of Object.entries(n.widths)) r[e] = Ie(t);
760
631
  return {
761
632
  v: 2,
762
633
  widths: r,
@@ -770,7 +641,7 @@ function J(e) {
770
641
  localStorage.setItem(t, JSON.stringify(e));
771
642
  } catch {}
772
643
  }
773
- function Qe(e, t) {
644
+ function Re(e, t) {
774
645
  return {
775
646
  v: 2,
776
647
  widths: {
@@ -780,10 +651,10 @@ function Qe(e, t) {
780
651
  resizeEduShown: e.resizeEduShown || t.resizeEduShown
781
652
  };
782
653
  }
783
- function $e(e) {
784
- return Math.min(Ye, Math.max(60, Math.round(e)));
654
+ function ze(e) {
655
+ return Math.min(Fe, Math.max(60, Math.round(e)));
785
656
  }
786
- var Y = w((e) => ({
657
+ var Y = b((e) => ({
787
658
  ...q(),
788
659
  setScope: (e, t) => {
789
660
  W = e, G = t;
@@ -796,13 +667,13 @@ var Y = w((e) => ({
796
667
  return;
797
668
  }
798
669
  let n = localStorage.getItem(t);
799
- e((n ? Ze(n) : null) ?? q());
670
+ e((n ? Le(n) : null) ?? q());
800
671
  },
801
672
  setWidth: (t, n, r) => {
802
673
  e((e) => {
803
674
  let i = {
804
675
  ...e.widths[t] ?? {},
805
- [n]: $e(r)
676
+ [n]: ze(r)
806
677
  }, a = {
807
678
  ...e,
808
679
  widths: {
@@ -816,7 +687,7 @@ var Y = w((e) => ({
816
687
  setWidths: (t, n) => {
817
688
  e((e) => {
818
689
  let r = {};
819
- for (let [e, t] of Object.entries(n)) r[e] = $e(t);
690
+ for (let [e, t] of Object.entries(n)) r[e] = ze(t);
820
691
  let i = {
821
692
  ...e.widths[t] ?? {},
822
693
  ...r
@@ -870,30 +741,30 @@ var Y = w((e) => ({
870
741
  return J(t), t;
871
742
  });
872
743
  }
873
- })), et = !1;
874
- function tt() {
875
- typeof window > "u" || et || (et = !0, window.addEventListener("storage", (e) => {
744
+ })), Be = !1;
745
+ function Ve() {
746
+ typeof window > "u" || Be || (Be = !0, window.addEventListener("storage", (e) => {
876
747
  let t = K();
877
748
  if (!t || e.key !== t || e.newValue == null) return;
878
- let n = Ze(e.newValue);
879
- n && Y.setState((e) => Qe(e, n));
749
+ let n = Le(e.newValue);
750
+ n && Y.setState((e) => Re(e, n));
880
751
  }));
881
752
  }
882
- var nt = {}, X = () => {};
883
- function rt(e) {
884
- let t = !!e && K() !== null, n = Y((t) => e ? t.widths[e] : void 0), r = Y((e) => e.resizeEduShown === !0), i = v((n, r) => {
753
+ var He = {}, X = () => {};
754
+ function Ue(e) {
755
+ let t = !!e && K() !== null, n = Y((t) => e ? t.widths[e] : void 0), r = Y((e) => e.resizeEduShown === !0), i = g((n, r) => {
885
756
  t && e && Y.getState().setWidth(e, n, r);
886
- }, [t, e]), a = v((n) => {
757
+ }, [t, e]), a = g((n) => {
887
758
  t && e && Y.getState().setWidths(e, n);
888
- }, [t, e]), o = v(() => {
759
+ }, [t, e]), o = g(() => {
889
760
  t && e && Y.getState().resetWidths(e);
890
- }, [t, e]), s = v((n) => {
761
+ }, [t, e]), s = g((n) => {
891
762
  t && e && Y.getState().prune(e, n);
892
- }, [t, e]), c = v(() => {
763
+ }, [t, e]), c = g(() => {
893
764
  t && Y.getState().markResizeEduShown();
894
765
  }, [t]);
895
766
  return {
896
- widths: t ? n ?? nt : nt,
767
+ widths: t ? n ?? He : He,
897
768
  resizeEduShown: r,
898
769
  setWidth: t ? i : X,
899
770
  setWidths: t ? a : X,
@@ -904,29 +775,29 @@ function rt(e) {
904
775
  }
905
776
  //#endregion
906
777
  //#region src/lib/canonical-url.ts
907
- function it(e) {
778
+ function We(e) {
908
779
  return e.length > 1 && e.endsWith("/") ? e.replace(/\/+$/, "") || "/" : e;
909
780
  }
910
781
  function Z(e) {
911
- let t = it(e.pathname), n = e.search ?? "", r = n.startsWith("?") ? n.slice(1) : n, i = new URLSearchParams(r);
912
- for (let e of a) i.delete(e);
913
- i.sort();
914
- let o = i.toString();
782
+ let t = We(e.pathname), r = e.search ?? "", i = r.startsWith("?") ? r.slice(1) : r, a = new URLSearchParams(i);
783
+ for (let e of n) a.delete(e);
784
+ a.sort();
785
+ let o = a.toString();
915
786
  return o ? `${t}?${o}` : t;
916
787
  }
917
- function at(e) {
918
- return it(e.pathname);
788
+ function Ge(e) {
789
+ return We(e.pathname);
919
790
  }
920
791
  //#endregion
921
792
  //#region src/hooks/usePageStateTtl.ts
922
- var ot = "ui_page_state_ttl_ms";
923
- function st() {
924
- let { value: e } = he(ot, z);
925
- return typeof e != "number" || !Number.isFinite(e) || e < 0 ? z : e;
793
+ var Ke = "ui_page_state_ttl_ms";
794
+ function qe() {
795
+ let { value: e } = r(Ke, L);
796
+ return typeof e != "number" || !Number.isFinite(e) || e < 0 ? L : e;
926
797
  }
927
798
  //#endregion
928
799
  //#region src/hooks/usePageStateRuntime.ts
929
- var ct = [
800
+ var Je = [
930
801
  ["entity-data"],
931
802
  ["entity-count"],
932
803
  ["entity-item"],
@@ -934,26 +805,26 @@ var ct = [
934
805
  ["entity-data-all"],
935
806
  ["action-data"],
936
807
  ["action-data-cursor"]
937
- ], lt = 6e4;
938
- function ut(e, t) {
939
- for (let n of ct) e.setQueryDefaults(n, { gcTime: t });
940
- }
941
- function dt() {
942
- let e = C(), t = st(), n = re(), r = ee(n);
943
- r.current = n, y(() => (Ge(e), () => Ge(null)), [e]), y(() => {
944
- if (U.getState().setTtl(t), ut(e, t), t <= 0) for (let t of ct) e.removeQueries({ queryKey: t });
945
- }, [e, t]), y(() => {
808
+ ], Ye = 6e4;
809
+ function Xe(e, t) {
810
+ for (let n of Je) e.setQueryDefaults(n, { gcTime: t });
811
+ }
812
+ function Ze() {
813
+ let e = y(), t = qe(), n = ie(), r = te(n);
814
+ r.current = n, _(() => (z(e), () => z(null)), [e]), _(() => {
815
+ if (U.getState().setTtl(t), Xe(e, t), t <= 0) for (let t of Je) e.removeQueries({ queryKey: t });
816
+ }, [e, t]), _(() => {
946
817
  if (t <= 0) return;
947
818
  let e = setInterval(() => {
948
819
  let e = U.getState(), t = r.current;
949
- e.touch(Z(t)), e.touch(at(t)), e.sweep(Date.now());
950
- }, lt);
820
+ e.touch(Z(t)), e.touch(Ge(t)), e.sweep(Date.now());
821
+ }, Ye);
951
822
  return () => clearInterval(e);
952
823
  }, [t]);
953
824
  }
954
- function ft(e, t = !0) {
955
- let n = Z(re()), r = e ? JSON.stringify(e) : "";
956
- y(() => {
825
+ function Qe(e, t = !0) {
826
+ let n = Z(ie()), r = e ? JSON.stringify(e) : "";
827
+ _(() => {
957
828
  !t || !e || U.getState().registerQueryKey(n, e);
958
829
  }, [
959
830
  n,
@@ -964,119 +835,119 @@ function ft(e, t = !0) {
964
835
  //#endregion
965
836
  //#region src/hooks/useMutations.ts
966
837
  function Q(e) {
967
- i.error(e.message);
838
+ f.error(e.message);
968
839
  }
969
- function $(e, t, n = {}) {
970
- e.invalidateQueries({ queryKey: ["entity-data", t] }), e.invalidateQueries({ queryKey: ["entity-count", t] }), n.item && e.invalidateQueries({ queryKey: ["entity-item", t] }), n.children && e.invalidateQueries({ queryKey: [p, t] }), n.objectMeta && (e.invalidateQueries({ queryKey: ["object-status", t] }), e.invalidateQueries({ queryKey: ["object-properties", t] }));
840
+ function $(t, n, r = {}) {
841
+ t.invalidateQueries({ queryKey: ["entity-data", n] }), t.invalidateQueries({ queryKey: ["entity-count", n] }), r.item && t.invalidateQueries({ queryKey: ["entity-item", n] }), r.children && t.invalidateQueries({ queryKey: [e, n] }), r.objectMeta && (t.invalidateQueries({ queryKey: ["object-status", n] }), t.invalidateQueries({ queryKey: ["object-properties", n] }));
971
842
  }
972
- function pt(e) {
973
- let t = C();
974
- return x({
975
- mutationFn: (t) => r(e, t),
843
+ function $e(e) {
844
+ let t = y();
845
+ return v({
846
+ mutationFn: (t) => s(e, t),
976
847
  onSuccess: () => {
977
- $(t, e), i.success("Record created");
848
+ $(t, e), f.success("Record created");
978
849
  },
979
850
  onError: Q
980
851
  });
981
852
  }
982
- function mt(e) {
983
- let t = C(), n = m((e) => e.isAuthenticated), { data: r } = l();
984
- return x({
985
- mutationFn: ({ pkValues: t, data: n }) => f(e, t, n),
986
- onSuccess: (a, { pkValues: o }) => {
987
- let s = r?.entities?.[e], l = typeof o == "string" ? s ? h(s, o) : void 0 : o, u = () => $(t, e, {
853
+ function et(e) {
854
+ let t = y(), n = u((e) => e.isAuthenticated), { data: r } = m();
855
+ return v({
856
+ mutationFn: ({ pkValues: t, data: n }) => p(e, t, n),
857
+ onSuccess: (i, { pkValues: a }) => {
858
+ let o = r?.entities?.[e], s = typeof a == "string" ? o ? d(o, a) : void 0 : a, l = () => $(t, e, {
988
859
  item: !0,
989
860
  children: !0,
990
861
  objectMeta: !0
991
862
  });
992
- l ? (c(t, n, e, [l], u), ht(t, e)) : u(), i.success("Record updated");
863
+ s ? (c(t, n, e, [s], l), tt(t, e)) : l(), f.success("Record updated");
993
864
  },
994
865
  onError: Q
995
866
  });
996
867
  }
997
- function ht(e, t) {
998
- e.invalidateQueries({ queryKey: ["entity-item", t] }), e.invalidateQueries({ queryKey: [p, t] }), e.invalidateQueries({ queryKey: ["object-status", t] }), e.invalidateQueries({ queryKey: ["object-properties", t] });
868
+ function tt(t, n) {
869
+ t.invalidateQueries({ queryKey: ["entity-item", n] }), t.invalidateQueries({ queryKey: [e, n] }), t.invalidateQueries({ queryKey: ["object-status", n] }), t.invalidateQueries({ queryKey: ["object-properties", n] });
999
870
  }
1000
- function gt(e) {
1001
- let t = C();
1002
- return x({
1003
- mutationFn: (t) => g(e, t),
871
+ function nt(e) {
872
+ let t = y();
873
+ return v({
874
+ mutationFn: (t) => a(e, t),
1004
875
  onSuccess: () => {
1005
- $(t, e, { item: !0 }), i.success("Record deleted");
876
+ $(t, e, { item: !0 }), f.success("Record deleted");
1006
877
  },
1007
878
  onError: Q
1008
879
  });
1009
880
  }
1010
- function _t(e) {
1011
- let t = C();
1012
- return x({
1013
- mutationFn: (t) => d(e, t),
881
+ function rt(e) {
882
+ let t = y();
883
+ return v({
884
+ mutationFn: (t) => l(e, t),
1014
885
  onSuccess: () => {
1015
886
  $(t, e, {
1016
887
  item: !0,
1017
888
  objectMeta: !0
1018
- }), i.success("Record restored");
889
+ }), f.success("Record restored");
1019
890
  },
1020
891
  onError: Q
1021
892
  });
1022
893
  }
1023
894
  //#endregion
1024
895
  //#region src/hooks/useScreenBack.ts
1025
- function vt(n) {
1026
- let r = ie(), i = t(), a = e(), o = L((e) => e.depth), { data: s } = l(), c = n?.fallback, d = I((e) => {
896
+ function it(e) {
897
+ let t = ae(), n = o(), r = i(), a = I((e) => e.depth), { data: s } = m(), c = e?.fallback, l = F((e) => {
1027
898
  let t = e.tabs.find((t) => t.id === e.activeTabId);
1028
899
  return t ? t.returnTo : void 0;
1029
- }), { hasOriginBack: f, allowFallbackBack: p } = b(() => Ve(d, i.enabled), [d, i.enabled]), m = v(() => {
1030
- if (i.enabled) {
1031
- L.getState().depth > 0 ? a() : c?.();
900
+ }), { hasOriginBack: u, allowFallbackBack: d } = ee(() => Oe(l, n.enabled), [l, n.enabled]), f = g(() => {
901
+ if (n.enabled) {
902
+ I.getState().depth > 0 ? r() : c?.();
1032
903
  return;
1033
904
  }
1034
- let e = I.getState(), t = He(e.tabs.find((t) => t.id === e.activeTabId)?.returnTo, e.tabs, !1);
1035
- if (!t) {
905
+ let e = F.getState(), i = ke(e.tabs.find((t) => t.id === e.activeTabId)?.returnTo, e.tabs, !1);
906
+ if (!i) {
1036
907
  c?.();
1037
908
  return;
1038
909
  }
1039
- if (t.kind === "live" && t.tabId) e.commitTabNavigation(t.tabId, { search: t.search ?? "" });
1040
- else if (t.kind === "reopen") {
1041
- let n = t.title ? void 0 : u(t.pathname, s?.screens, s?.entities);
910
+ if (i.kind === "live" && i.tabId) e.commitTabNavigation(i.tabId, { search: i.search ?? "" });
911
+ else if (i.kind === "reopen") {
912
+ let t = i.title ? void 0 : h(i.pathname, s?.screens, s?.entities);
1042
913
  e.openTab({
1043
- pathname: t.pathname,
1044
- search: t.search ?? "",
1045
- title: t.title ?? n?.title ?? t.pathname,
1046
- icon: t.icon ?? n?.icon,
1047
- screen: t.screen,
914
+ pathname: i.pathname,
915
+ search: i.search ?? "",
916
+ title: i.title ?? t?.title ?? i.pathname,
917
+ icon: i.icon ?? t?.icon,
918
+ screen: i.screen,
1048
919
  closable: !0
1049
920
  });
1050
921
  }
1051
- r({
1052
- pathname: t.pathname,
1053
- search: ze(t.search),
1054
- hash: t.hash || void 0
922
+ t({
923
+ pathname: i.pathname,
924
+ search: Ee(i.search),
925
+ hash: i.hash || void 0
1055
926
  });
1056
927
  }, [
1057
- i.enabled,
1058
- a,
1059
- c,
928
+ n.enabled,
1060
929
  r,
930
+ c,
931
+ t,
1061
932
  s?.screens,
1062
933
  s?.entities
1063
934
  ]);
1064
935
  return {
1065
- canGoBack: i.enabled ? o > 0 || !!c : f || !!c,
1066
- hasOriginBack: f,
1067
- allowFallbackBack: p,
1068
- goBack: m
936
+ canGoBack: n.enabled ? a > 0 || !!c : u || !!c,
937
+ hasOriginBack: u,
938
+ allowFallbackBack: d,
939
+ goBack: f
1069
940
  };
1070
941
  }
1071
942
  //#endregion
1072
943
  //#region src/components/shared/useOwnRefresh.ts
1073
- function yt(e) {
1074
- let [t, n] = te(!1), r = ee(!0);
1075
- return y(() => (r.current = !0, () => {
944
+ function at(e) {
945
+ let [t, n] = ne(!1), r = te(!0);
946
+ return _(() => (r.current = !0, () => {
1076
947
  r.current = !1;
1077
948
  }), []), {
1078
949
  refreshing: t,
1079
- refresh: v(() => {
950
+ refresh: g(() => {
1080
951
  n(!0);
1081
952
  let t = () => {
1082
953
  r.current && n(!1);
@@ -1087,29 +958,29 @@ function yt(e) {
1087
958
  }
1088
959
  //#endregion
1089
960
  //#region src/lib/field-classification.ts
1090
- function bt(e, t) {
961
+ function ot(e, t) {
1091
962
  let n = e?.field_access?.[t];
1092
963
  return !n || n.read === "granted";
1093
964
  }
1094
- function xt(e, t) {
965
+ function st(e, t) {
1095
966
  let n = e?.field_access?.[t];
1096
967
  return !n || n.write === "granted";
1097
968
  }
1098
- function St(e, t) {
969
+ function ct(e, t) {
1099
970
  return e?.field_access?.[t]?.classification;
1100
971
  }
1101
- function Ct(e, t) {
972
+ function lt(e, t) {
1102
973
  return e?.field_access?.[t]?.required_permission;
1103
974
  }
1104
- function wt(e, t, n) {
1105
- let r = St(t, n);
975
+ function ut(e, t, n) {
976
+ let r = ct(t, n);
1106
977
  if (r) return e?.classifications?.[r];
1107
978
  }
1108
- function Tt(e, t, n) {
1109
- return !!wt(e, t, n)?.sod_protected;
979
+ function dt(e, t, n) {
980
+ return !!ut(e, t, n)?.sod_protected;
1110
981
  }
1111
- function Et(e, t) {
982
+ function ft(e, t) {
1112
983
  return e?.field_access?.[t];
1113
984
  }
1114
985
  //#endregion
1115
- export { Ie as A, fe as B, rt as C, U as D, z as E, ue as F, le as I, pe as L, I as M, D as N, We as O, k as P, he as R, tt as S, Je as T, ot as _, bt as a, Z as b, yt as c, gt as d, _t as f, ft as g, dt as h, Ct as i, Me as j, L as k, vt as l, ut as m, Et as n, Tt as o, mt as p, St as r, xt as s, wt as t, pt as u, st as v, Y as w, Ye as x, at as y, de as z };
986
+ export { Ce as A, Ue as C, U as D, L as E, F as M, w as N, Me as O, E as P, Ve as S, Pe as T, Ke as _, ot as a, Z as b, at as c, nt as d, rt as f, Qe as g, Ze as h, lt as i, be as j, I as k, it as l, Xe as m, ft as n, dt as o, et as p, ct as r, st as s, ut as t, $e as u, qe as v, Y as w, Fe as x, Ge as y };