@declarion/react 0.59.2 → 0.60.0

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/{AgentChatPanel.impl-DBH1Ff4G.js → AgentChatPanel.impl-BY-Ir7Sh.js} +39 -39
  2. package/dist-lib/{DetailAuditStrip-9eJM2Fml.js → DetailAuditStrip-B9p1XhjC.js} +11 -11
  3. package/dist-lib/{DraggableChildrenTable-4RZC351U.js → DraggableChildrenTable-CtL7rdT6.js} +34 -34
  4. package/dist-lib/{Grid-CQabaBLx.js → Grid-CYERLdXO.js} +1 -1
  5. package/dist-lib/{LayoutRenderer-DGKWZKpW.js → LayoutRenderer-B08IJKsZ.js} +465 -465
  6. package/dist-lib/{ListCardsBody-DfGmyNIu.js → ListCardsBody-Dje_rays.js} +26 -26
  7. package/dist-lib/{MarkdownRenderer-BDbzDv_y.js → MarkdownRenderer-N0IWjTH5.js} +1 -1
  8. package/dist-lib/{RefreshControl-Bhoib0ZA.js → RefreshControl-BEWSHtAC.js} +26 -26
  9. package/dist-lib/{SmartDetailPage.impl-DFjz29Ff.js → SmartDetailPage.impl-CYiM-ITJ.js} +470 -470
  10. package/dist-lib/SmartListPage.impl-Db_Pv9Xc.js +3051 -0
  11. package/dist-lib/SmartRecordListPage.impl-hbbLglC1.js +780 -0
  12. package/dist-lib/{SortHeaderMenu-Cijxk4cX.js → SortHeaderMenu-DKKeCGTH.js} +1 -1
  13. package/dist-lib/{action-dispatch-DY0c8U81.js → action-dispatch-DbiOpvd6.js} +187 -187
  14. package/dist-lib/api/data.d.ts +5 -1
  15. package/dist-lib/{cardProjection-Bkl2SSYz.js → cardProjection-nveYLvHR.js} +1 -1
  16. package/dist-lib/components/pages/list/filter-meta.d.ts +1 -1
  17. package/dist-lib/components/pages/list/useActiveView.d.ts +9 -2
  18. package/dist-lib/components/pages/list/useListViews.d.ts +3 -2
  19. package/dist-lib/{failure-v-uGSpbX.js → failure-BT54OLHy.js} +5 -5
  20. package/dist-lib/{format-count-DA4wmmWR.js → format-count-DLFCdtME.js} +246 -246
  21. package/dist-lib/hooks/useObject.d.ts +3 -2
  22. package/dist-lib/index.js +613 -613
  23. package/dist-lib/lib/field-classification.d.ts +10 -1
  24. package/dist-lib/{peekDraftStore-D-cTbiIr.js → peekDraftStore-DSExeoAh.js} +6 -6
  25. package/dist-lib/{registry-Cb3W-czW.js → registry-CRPxNbkk.js} +444 -438
  26. package/dist-lib/testing.js +2 -2
  27. package/dist-lib/{useAgentConversation-D97IqE-J.js → useAgentConversation-BavrHfrU.js} +14 -14
  28. package/dist-lib/{useCurrentScreen-BL5NZFCw.js → useCurrentScreen-BPq7HMF1.js} +1083 -1017
  29. package/dist-lib/{useListQuery-BG1GyKtJ.js → useListQuery-CG1WM4cv.js} +5 -5
  30. package/dist-lib/{field-classification-C28XE-_P.js → useOwnRefresh-C18iWRgr.js} +132 -158
  31. package/dist-lib/{useProperties-4Lg3odrt.js → useProperties-C35JrjwQ.js} +2 -2
  32. package/dist-lib/{useTabSearchMirror-ZVLlINBX.js → useTabSearchMirror-DKktWWLB.js} +1 -1
  33. package/package.json +1 -1
  34. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +0 -3046
  35. package/dist-lib/SmartRecordListPage.impl-C1FJLr80.js +0 -780
@@ -1,7 +1,7 @@
1
- import { D as e, Dn as t, Mt as n, Nt as r, On as i, Vt as a, a as o, kt as s, vt as c, yt as l } from "./useCurrentScreen-BL5NZFCw.js";
1
+ import { D as e, Ht as t, Ln as n, Rn as r, Ut as i, Zt as a, a as o, vt as s, yt as c, zt as l } from "./useCurrentScreen-BPq7HMF1.js";
2
2
  import { D as u, O as d, f, p, t as m } from "./useText-BFDCTUSo.js";
3
- import { h, o as g, s as ee, t as te, y as ne } from "./failure-v-uGSpbX.js";
4
- import { d as re, f as ie, u as ae } from "./action-dispatch-DY0c8U81.js";
3
+ import { h, o as g, s as ee, t as te, y as ne } from "./failure-BT54OLHy.js";
4
+ import { d as re, f as ie, u as ae } from "./action-dispatch-DbiOpvd6.js";
5
5
  import { useCallback as _, useEffect as v, useMemo as oe, useRef as se, useState as ce } from "react";
6
6
  import { parsePath as le, useLocation as ue, useNavigate as de } from "react-router";
7
7
  import { useMutation as y, useQueryClient as b } from "@tanstack/react-query";
@@ -175,14 +175,14 @@ function ke(e, t, n, r) {
175
175
  let a = e.findIndex((e) => e.id === i);
176
176
  return a === -1 ? [] : n === "current" ? j(e[a]) ? [e[a].id] : [] : n === "others" ? e.filter((e, t) => t !== a && j(e)).map((e) => e.id) : e.slice(a + 1).filter(j).map((e) => e.id);
177
177
  }
178
- var M = null, N = null;
179
- function Ae(e, t) {
178
+ var Ae = null, je = null;
179
+ function Me(e, t) {
180
180
  return `declarion::${e}::${t}::tabs`;
181
181
  }
182
- function je() {
183
- return !M || !N ? null : Ae(M, N);
182
+ function Ne() {
183
+ return !Ae || !je ? null : Me(Ae, je);
184
184
  }
185
- function Me(e) {
185
+ function Pe(e) {
186
186
  let t;
187
187
  try {
188
188
  t = JSON.parse(e);
@@ -206,11 +206,11 @@ function Me(e) {
206
206
  activeTabId: typeof n.activeTabId == "string" ? n.activeTabId : null
207
207
  } : null;
208
208
  }
209
- function Ne(e, t) {
209
+ function Fe(e, t) {
210
210
  if (typeof window > "u") return null;
211
- let n = localStorage.getItem(Ae(e, t));
211
+ let n = localStorage.getItem(Me(e, t));
212
212
  if (!n) return null;
213
- let r = Me(n);
213
+ let r = Pe(n);
214
214
  if (!r) return null;
215
215
  let i = r.tabs.find((e) => e.id === r.activeTabId), a = i?.pathname;
216
216
  if (k(a)) {
@@ -219,9 +219,9 @@ function Ne(e, t) {
219
219
  }
220
220
  return null;
221
221
  }
222
- function P(e, t) {
222
+ function M(e, t) {
223
223
  if (typeof window > "u") return;
224
- let n = O.getState().tabsPersist, r = je();
224
+ let n = O.getState().tabsPersist, r = Ne();
225
225
  if (r) {
226
226
  if (!n) {
227
227
  try {
@@ -237,20 +237,20 @@ function P(e, t) {
237
237
  } catch {}
238
238
  }
239
239
  }
240
- function Pe() {
240
+ function Ie() {
241
241
  if (typeof window > "u" || !O.getState().tabsPersist) return null;
242
- let e = je();
242
+ let e = Ne();
243
243
  if (!e) return null;
244
244
  let t = localStorage.getItem(e);
245
- return t ? Me(t) : null;
245
+ return t ? Pe(t) : null;
246
246
  }
247
- var F = C((e, t) => ({
247
+ var N = C((e, t) => ({
248
248
  tabs: [],
249
249
  activeTabId: null,
250
250
  openTab: (n) => {
251
251
  if (Ee(n.pathname)) return "";
252
252
  let r = t(), i = r.tabs.find((e) => e.pathname === n.pathname);
253
- if (i) return e({ activeTabId: i.id }), P(r.tabs, i.id), i.id;
253
+ if (i) return e({ activeTabId: i.id }), M(r.tabs, i.id), i.id;
254
254
  let a = crypto.randomUUID(), o = {
255
255
  ...n,
256
256
  id: a
@@ -262,7 +262,7 @@ var F = C((e, t) => ({
262
262
  return e({
263
263
  tabs: s,
264
264
  activeTabId: a
265
- }), P(s, a), a;
265
+ }), M(s, a), a;
266
266
  },
267
267
  closeTab: (e) => {
268
268
  let n = t(), r = n.tabs.findIndex((t) => t.id === e);
@@ -275,10 +275,10 @@ var F = C((e, t) => ({
275
275
  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({
276
276
  tabs: o,
277
277
  activeTabId: s
278
- }), P(o, s), o.find((e) => e.id === s) ?? null;
278
+ }), M(o, s), o.find((e) => e.id === s) ?? null;
279
279
  },
280
280
  switchTab: (n) => {
281
- e({ activeTabId: n }), P(t().tabs, n);
281
+ e({ activeTabId: n }), M(t().tabs, n);
282
282
  },
283
283
  reorderTabs: (t, n) => {
284
284
  e((e) => {
@@ -306,7 +306,7 @@ var F = C((e, t) => ({
306
306
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
307
307
  ...e,
308
308
  returnTo: r
309
- } : e) })), P(t().tabs, t().activeTabId);
309
+ } : e) })), M(t().tabs, t().activeTabId);
310
310
  },
311
311
  commitTabNavigation: (n, r) => {
312
312
  let i = "returnTo" in r;
@@ -317,37 +317,37 @@ var F = C((e, t) => ({
317
317
  ...i ? { returnTo: r.returnTo } : {}
318
318
  } : e),
319
319
  activeTabId: n
320
- })), P(t().tabs, t().activeTabId);
320
+ })), M(t().tabs, t().activeTabId);
321
321
  },
322
322
  setDirty: (n, r) => {
323
323
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
324
324
  ...e,
325
325
  dirty: r
326
- } : e) })), P(t().tabs, t().activeTabId);
326
+ } : e) })), M(t().tabs, t().activeTabId);
327
327
  },
328
328
  setMode: (n, r) => {
329
329
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
330
330
  ...e,
331
331
  mode: r
332
- } : e) })), P(t().tabs, t().activeTabId);
332
+ } : e) })), M(t().tabs, t().activeTabId);
333
333
  },
334
334
  updateTab: (n, r) => {
335
335
  e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
336
336
  ...e,
337
337
  ...r
338
- } : e) })), P(t().tabs, t().activeTabId);
338
+ } : e) })), M(t().tabs, t().activeTabId);
339
339
  },
340
340
  setScope: (e, t) => {
341
- M = e, N = t;
341
+ Ae = e, je = t;
342
342
  },
343
343
  hydrate: () => {
344
- let t = Pe();
344
+ let t = Ie();
345
345
  t && e({
346
346
  tabs: t.tabs,
347
347
  activeTabId: t.activeTabId
348
348
  });
349
349
  }
350
- })), I = C((e) => ({
350
+ })), P = C((e) => ({
351
351
  depth: 0,
352
352
  nextIsRoot: !1,
353
353
  applyNavigation: (t) => e((e) => e.nextIsRoot ? {
@@ -362,18 +362,18 @@ var F = C((e, t) => ({
362
362
  }));
363
363
  //#endregion
364
364
  //#region src/lib/screen-back.ts
365
- function Fe(e) {
365
+ function Le(e) {
366
366
  return e ? e.startsWith("?") ? e.slice(1) : e : "";
367
367
  }
368
- function Ie(e) {
368
+ function Re(e) {
369
369
  if (e) return e.startsWith("?") ? e : `?${e}`;
370
370
  }
371
- function Le(e, t, n) {
371
+ function ze(e, t, n) {
372
372
  if (!k(e.pathname) || Ee(e.pathname) || e.pathname === t) return;
373
- let r = Fe(e.search), i = { pathname: e.pathname };
373
+ let r = Le(e.search), i = { pathname: e.pathname };
374
374
  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;
375
375
  }
376
- function Re(e, t) {
376
+ function Be(e, t) {
377
377
  return t ? {
378
378
  hasOriginBack: !1,
379
379
  allowFallbackBack: !0
@@ -388,7 +388,7 @@ function Re(e, t) {
388
388
  allowFallbackBack: !0
389
389
  };
390
390
  }
391
- function ze(e, t, n) {
391
+ function Ve(e, t, n) {
392
392
  if (n || !e || !k(e.pathname)) return null;
393
393
  let r = (e.tabId ? t.find((t) => t.id === e.tabId) : void 0) ?? t.find((t) => t.pathname === e.pathname);
394
394
  return {
@@ -404,26 +404,26 @@ function ze(e, t, n) {
404
404
  }
405
405
  //#endregion
406
406
  //#region src/hooks/useTabNavigate.ts
407
- function Be(e, t) {
407
+ function He(e, t) {
408
408
  let n = le(e);
409
409
  return {
410
410
  pathname: n.pathname ?? e,
411
- search: Ve(n.search) ?? Ve(t),
411
+ search: Ue(n.search) ?? Ue(t),
412
412
  hash: n.hash
413
413
  };
414
414
  }
415
- function Ve(e) {
415
+ function Ue(e) {
416
416
  if (e && e !== "?") return e.startsWith("?") ? e : `?${e}`;
417
417
  }
418
- function He() {
419
- let e = m(), n = de(), { data: i } = f(), a = u(), o = r();
420
- return _((r, s) => {
421
- let { pathname: c, search: l, hash: u } = Be(r, s?.search);
418
+ function We() {
419
+ let e = m(), t = de(), { data: r } = f(), a = u(), o = i();
420
+ return _((i, s) => {
421
+ let { pathname: c, search: l, hash: u } = He(i, s?.search);
422
422
  if (a.enabled) {
423
423
  o(`${c}${l ?? ""}${u ?? ""}`, { replace: s?.replace });
424
424
  return;
425
425
  }
426
- let d = F.getState(), f = s?.topLevel ?? !1, p = Fe(l), m = f || typeof window > "u" ? void 0 : Le({
426
+ let d = N.getState(), f = s?.topLevel ?? !1, p = Le(l), m = f || typeof window > "u" ? void 0 : ze({
427
427
  pathname: window.location.pathname,
428
428
  search: window.location.search,
429
429
  hash: window.location.hash
@@ -434,7 +434,7 @@ function He() {
434
434
  d.commitTabNavigation(h.id, {
435
435
  search: e,
436
436
  returnTo: null
437
- }), n({
437
+ }), t({
438
438
  pathname: c,
439
439
  search: e ? `?${e}` : "",
440
440
  hash: u
@@ -444,14 +444,14 @@ function He() {
444
444
  m ? d.commitTabNavigation(h.id, {
445
445
  search: p,
446
446
  returnTo: m
447
- }) : d.commitTabNavigation(h.id, { search: p }), n({
447
+ }) : d.commitTabNavigation(h.id, { search: p }), t({
448
448
  pathname: c,
449
449
  search: l,
450
450
  hash: u
451
451
  }, { replace: s?.replace });
452
452
  return;
453
453
  }
454
- let g = s?.title ? void 0 : t(e, c, i?.screens, i?.entities), ee = s?.title ?? g?.title ?? c, te = s?.icon ?? g?.icon;
454
+ let g = s?.title ? void 0 : n(e, c, r?.screens, r?.entities), ee = s?.title ?? g?.title ?? c, te = s?.icon ?? g?.icon;
455
455
  d.openTab({
456
456
  pathname: c,
457
457
  search: p,
@@ -460,56 +460,56 @@ function He() {
460
460
  icon: te,
461
461
  closable: !0,
462
462
  returnTo: f ? null : m
463
- }), n({
463
+ }), t({
464
464
  pathname: c,
465
465
  search: l,
466
466
  hash: u
467
467
  }, { replace: s?.replace });
468
468
  }, [
469
469
  e,
470
- n,
471
- i?.screens,
472
- i?.entities,
470
+ t,
471
+ r?.screens,
472
+ r?.entities,
473
473
  a.enabled,
474
474
  o
475
475
  ]);
476
476
  }
477
477
  //#endregion
478
478
  //#region src/stores/page-state.ts
479
- var L = 18e5, R = null;
480
- function Ue(e) {
481
- R = e;
479
+ var F = 18e5, I = null;
480
+ function Ge(e) {
481
+ I = e;
482
482
  }
483
- function z(e) {
484
- if (e && R) for (let t of e.queryKeys) R.removeQueries({
483
+ function L(e) {
484
+ if (e && I) for (let t of e.queryKeys) I.removeQueries({
485
485
  queryKey: t,
486
486
  exact: !0
487
487
  });
488
488
  }
489
- function B(e, t) {
489
+ function R(e, t) {
490
490
  let n = e[t];
491
491
  if (!n) return e;
492
- z(n);
492
+ L(n);
493
493
  let r = { ...e };
494
494
  return delete r[t], r;
495
495
  }
496
- function We(e, t) {
496
+ function Ke(e, t) {
497
497
  let n = e;
498
498
  for (; Object.keys(n).length > 64;) {
499
499
  let e = null, r = Infinity;
500
500
  for (let [i, a] of Object.entries(n)) i !== t && a.lastActiveAt < r && (r = a.lastActiveAt, e = i);
501
501
  if (e === null) break;
502
- n = B(n, e);
502
+ n = R(n, e);
503
503
  }
504
504
  return n;
505
505
  }
506
- var V = C((e, t) => ({
506
+ var z = C((e, t) => ({
507
507
  entries: {},
508
- ttlMs: L,
508
+ ttlMs: F,
509
509
  setTtl: (n) => {
510
510
  if (n <= 0) {
511
511
  let { entries: r } = t();
512
- for (let e of Object.keys(r)) z(r[e]);
512
+ for (let e of Object.keys(r)) L(r[e]);
513
513
  e({
514
514
  ttlMs: n,
515
515
  entries: {}
@@ -533,7 +533,7 @@ var V = C((e, t) => ({
533
533
  lastActiveAt: o,
534
534
  queryKeys: []
535
535
  };
536
- e({ entries: We({
536
+ e({ entries: Ke({
537
537
  ...a.entries,
538
538
  [n]: c
539
539
  }, n) });
@@ -557,7 +557,7 @@ var V = C((e, t) => ({
557
557
  registerQueryKey: (n, r) => {
558
558
  let i = t();
559
559
  if (i.ttlMs <= 0) return;
560
- let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) => Ge(e, r));
560
+ let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) => qe(e, r));
561
561
  if (o && s) return;
562
562
  let c = o ? {
563
563
  ...o,
@@ -568,29 +568,29 @@ var V = C((e, t) => ({
568
568
  lastActiveAt: a,
569
569
  queryKeys: [r]
570
570
  };
571
- e({ entries: We({
571
+ e({ entries: Ke({
572
572
  ...i.entries,
573
573
  [n]: c
574
574
  }, n) });
575
575
  },
576
576
  kill: (n) => {
577
- let r = t(), i = B(r.entries, n);
577
+ let r = t(), i = R(r.entries, n);
578
578
  i !== r.entries && e({ entries: i });
579
579
  },
580
580
  sweep: (n) => {
581
581
  let { ttlMs: r, entries: i } = t(), a = i;
582
- for (let [e, t] of Object.entries(i)) (r <= 0 || n - t.lastActiveAt > r) && (a = B(a, e));
582
+ for (let [e, t] of Object.entries(i)) (r <= 0 || n - t.lastActiveAt > r) && (a = R(a, e));
583
583
  a !== i && e({ entries: a });
584
584
  },
585
585
  clear: () => {
586
586
  let { entries: n } = t();
587
587
  if (Object.keys(n).length !== 0) {
588
- for (let e of Object.keys(n)) z(n[e]);
588
+ for (let e of Object.keys(n)) L(n[e]);
589
589
  e({ entries: {} });
590
590
  }
591
591
  }
592
592
  }));
593
- function Ge(e, t) {
593
+ function qe(e, t) {
594
594
  if (e === t) return !0;
595
595
  try {
596
596
  return JSON.stringify(e) === JSON.stringify(t);
@@ -600,7 +600,7 @@ function Ge(e, t) {
600
600
  }
601
601
  //#endregion
602
602
  //#region src/lib/page-inset.ts
603
- function Ke(e) {
603
+ function Je(e) {
604
604
  return {
605
605
  paddingLeft: `calc(${e}px + var(--safe-area-left))`,
606
606
  paddingRight: `calc(${e}px + var(--safe-area-right))`
@@ -608,90 +608,90 @@ function Ke(e) {
608
608
  }
609
609
  //#endregion
610
610
  //#region src/components/file-widgets/payload.ts
611
- function H(e) {
611
+ function B(e) {
612
612
  return !e || Array.isArray(e) ? null : e;
613
613
  }
614
- function U(e) {
614
+ function V(e) {
615
615
  return Array.isArray(e) ? e : [];
616
616
  }
617
- function W(e) {
617
+ function H(e) {
618
618
  return !e || Array.isArray(e) || typeof e != "object" ? {} : e;
619
619
  }
620
- function qe(e, t) {
621
- return e.mode === "array" ? U(t) : e.mode === "named_map" ? W(t) : H(t);
620
+ function Ye(e, t) {
621
+ return e.mode === "array" ? V(t) : e.mode === "named_map" ? H(t) : B(t);
622
622
  }
623
- function G(e, t, n, r) {
623
+ function U(e, t, n, r) {
624
624
  let i = {
625
625
  file_id: e.id,
626
626
  filename: e.filename
627
627
  };
628
628
  return r && (i.slot = r), n && (i.position = t), e.metadata !== void 0 && (i.metadata = e.metadata), i;
629
629
  }
630
- function Je(e, t) {
630
+ function W(e, t) {
631
631
  if (e.mode === "array") {
632
- let e = U(t);
633
- return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => G(e, t, !0)) };
632
+ let e = V(t);
633
+ return e.length === 0 ? { clear: !0 } : { set: e.map((e, t) => U(e, t, !0)) };
634
634
  }
635
635
  if (e.mode === "named_map") {
636
- let e = W(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => G(t, 0, !1, e));
636
+ let e = H(t), n = Object.entries(e).filter(([, e]) => e != null).map(([e, t]) => U(t, 0, !1, e));
637
637
  return n.length === 0 ? { clear: !0 } : { set: n };
638
638
  }
639
- let n = H(t);
640
- return n ? { set: [G(n, 0, !0)] } : { clear: !0 };
639
+ let n = B(t);
640
+ return n ? { set: [U(n, 0, !0)] } : { clear: !0 };
641
641
  }
642
- function K(e) {
642
+ function G(e) {
643
643
  return JSON.stringify(e);
644
644
  }
645
- function Ye(e) {
645
+ function Xe(e) {
646
646
  let { entity: t, formData: n, record: r, isNew: i } = e, a = {};
647
647
  for (let e of t.files?.names() ?? []) {
648
648
  if (!Object.prototype.hasOwnProperty.call(n, e)) continue;
649
649
  let o = ae(t, e);
650
650
  if (!o) continue;
651
- let s = qe(o, n[e]);
651
+ let s = Ye(o, n[e]);
652
652
  if (i) {
653
- if (o.mode === "array" ? U(s).length === 0 : o.mode === "named_map" ? Object.values(W(s)).every((e) => e == null) : H(s) == null) continue;
654
- a[e] = Je(o, s);
653
+ if (o.mode === "array" ? V(s).length === 0 : o.mode === "named_map" ? Object.values(H(s)).every((e) => e == null) : B(s) == null) continue;
654
+ a[e] = W(o, s);
655
655
  continue;
656
656
  }
657
- let c = qe(o, r ? re(r, e) : null), l = Je(o, s), u = Je(o, c);
658
- K(l) !== K(u) && (a[e] = l);
657
+ let c = Ye(o, r ? re(r, e) : null), l = W(o, s), u = W(o, c);
658
+ G(l) !== G(u) && (a[e] = l);
659
659
  }
660
660
  let o = t.fields;
661
661
  if (!o) return a;
662
662
  for (let e of o.names()) {
663
663
  let s = o.get(e)?.files;
664
664
  if (!s || s.mode !== "rich_text_inline" || !Object.prototype.hasOwnProperty.call(n, e)) continue;
665
- let c = Ze(s, n[e]);
665
+ let c = Qe(s, n[e]);
666
666
  if (i) {
667
667
  if (c.clear) continue;
668
668
  a[e] = c;
669
669
  continue;
670
670
  }
671
- let l = Ze(s, r ? ie({
671
+ let l = Qe(s, r ? ie({
672
672
  ...t,
673
673
  fields: o
674
674
  }, r, e) : null);
675
- K(c) !== K(l) && (a[e] = c);
675
+ G(c) !== G(l) && (a[e] = c);
676
676
  }
677
677
  return a;
678
678
  }
679
- function Xe(e) {
679
+ function Ze(e) {
680
680
  let t = [];
681
681
  for (let n of Object.values(e)) for (let e of n.set ?? []) t.push(e.file_id);
682
682
  return t;
683
683
  }
684
- function Ze(e, t) {
684
+ function Qe(e, t) {
685
685
  if (e.mode !== "rich_text_inline") return { clear: !0 };
686
- let n = c(l(t));
686
+ let n = s(c(t));
687
687
  return n.length === 0 ? { clear: !0 } : { set: n.map((e, t) => ({
688
688
  file_id: e,
689
689
  position: t
690
690
  })) };
691
691
  }
692
- var Qe = 1200, $e = null, et = null;
692
+ var $e = 1200, K = null, et = null;
693
693
  function q() {
694
- return !$e || !et ? null : `declarion::${$e}::${et}::listlayout`;
694
+ return !K || !et ? null : `declarion::${K}::${et}::listlayout`;
695
695
  }
696
696
  function tt() {
697
697
  return {
@@ -742,12 +742,12 @@ function it(e, t) {
742
742
  };
743
743
  }
744
744
  function at(e) {
745
- return Math.min(Qe, Math.max(60, Math.round(e)));
745
+ return Math.min($e, Math.max(60, Math.round(e)));
746
746
  }
747
747
  var Y = C((e) => ({
748
748
  ...tt(),
749
749
  setScope: (e, t) => {
750
- $e = e, et = t;
750
+ K = e, et = t;
751
751
  },
752
752
  hydrate: () => {
753
753
  if (typeof window > "u") return;
@@ -882,8 +882,8 @@ function ft(e) {
882
882
  //#region src/hooks/usePageStateTtl.ts
883
883
  var pt = "ui_page_state_ttl_ms";
884
884
  function mt() {
885
- let { value: e } = a(pt, L);
886
- return typeof e != "number" || !Number.isFinite(e) || e < 0 ? L : e;
885
+ let { value: e } = a(pt, F);
886
+ return typeof e != "number" || !Number.isFinite(e) || e < 0 ? F : e;
887
887
  }
888
888
  //#endregion
889
889
  //#region src/hooks/usePageStateRuntime.ts
@@ -901,12 +901,12 @@ function _t(e, t) {
901
901
  }
902
902
  function vt() {
903
903
  let e = b(), t = mt(), n = ue(), r = se(n);
904
- r.current = n, v(() => (Ue(e), () => Ue(null)), [e]), v(() => {
905
- if (V.getState().setTtl(t), _t(e, t), t <= 0) for (let t of ht) e.removeQueries({ queryKey: t });
904
+ r.current = n, v(() => (Ge(e), () => Ge(null)), [e]), v(() => {
905
+ if (z.getState().setTtl(t), _t(e, t), t <= 0) for (let t of ht) e.removeQueries({ queryKey: t });
906
906
  }, [e, t]), v(() => {
907
907
  if (t <= 0) return;
908
908
  let e = setInterval(() => {
909
- let e = V.getState(), t = r.current;
909
+ let e = z.getState(), t = r.current;
910
910
  e.touch(dt(t)), e.touch(ft(t)), e.sweep(Date.now());
911
911
  }, gt);
912
912
  return () => clearInterval(e);
@@ -915,7 +915,7 @@ function vt() {
915
915
  function yt(e, t = !0) {
916
916
  let n = dt(ue()), r = e ? JSON.stringify(e) : "";
917
917
  v(() => {
918
- t && e && V.getState().registerQueryKey(n, e);
918
+ t && e && z.getState().registerQueryKey(n, e);
919
919
  }, [
920
920
  n,
921
921
  r,
@@ -925,36 +925,36 @@ function yt(e, t = !0) {
925
925
  //#endregion
926
926
  //#region src/hooks/useScreenBack.ts
927
927
  function bt(e) {
928
- let r = m(), i = de(), a = u(), o = n(), s = I((e) => e.depth), { data: c } = f(), l = e?.fallback, d = F((e) => {
928
+ let r = m(), i = de(), a = u(), o = t(), s = P((e) => e.depth), { data: c } = f(), l = e?.fallback, d = N((e) => {
929
929
  let t = e.tabs.find((t) => t.id === e.activeTabId);
930
930
  return t ? t.returnTo : void 0;
931
- }), { hasOriginBack: p, allowFallbackBack: h } = oe(() => Re(d, a.enabled), [d, a.enabled]), g = _(() => {
931
+ }), { hasOriginBack: p, allowFallbackBack: h } = oe(() => Be(d, a.enabled), [d, a.enabled]), g = _(() => {
932
932
  if (a.enabled) {
933
- I.getState().depth > 0 ? o() : l?.();
933
+ P.getState().depth > 0 ? o() : l?.();
934
934
  return;
935
935
  }
936
- let e = F.getState(), n = ze(e.tabs.find((t) => t.id === e.activeTabId)?.returnTo, e.tabs, !1);
937
- if (!n) {
936
+ let e = N.getState(), t = Ve(e.tabs.find((t) => t.id === e.activeTabId)?.returnTo, e.tabs, !1);
937
+ if (!t) {
938
938
  l?.();
939
939
  return;
940
940
  }
941
- if (n.kind === "live" && n.tabId) e.commitTabNavigation(n.tabId, { search: n.search ?? "" });
942
- else if (n.kind === "reopen") {
943
- let i = n.title ? void 0 : t(r, n.pathname, c?.screens, c?.entities);
941
+ if (t.kind === "live" && t.tabId) e.commitTabNavigation(t.tabId, { search: t.search ?? "" });
942
+ else if (t.kind === "reopen") {
943
+ let i = t.title ? void 0 : n(r, t.pathname, c?.screens, c?.entities);
944
944
  e.openTab({
945
- pathname: n.pathname,
946
- search: n.search ?? "",
947
- title: n.title ?? i?.title ?? n.pathname,
948
- derivedTitle: !n.title,
949
- icon: n.icon ?? i?.icon,
950
- screen: n.screen,
945
+ pathname: t.pathname,
946
+ search: t.search ?? "",
947
+ title: t.title ?? i?.title ?? t.pathname,
948
+ derivedTitle: !t.title,
949
+ icon: t.icon ?? i?.icon,
950
+ screen: t.screen,
951
951
  closable: !0
952
952
  });
953
953
  }
954
954
  i({
955
- pathname: n.pathname,
956
- search: Ie(n.search),
957
- hash: n.hash || void 0
955
+ pathname: t.pathname,
956
+ search: Re(t.search),
957
+ hash: t.hash || void 0
958
958
  });
959
959
  }, [
960
960
  r,
@@ -975,7 +975,7 @@ function bt(e) {
975
975
  //#endregion
976
976
  //#region src/hooks/useMutations.ts
977
977
  function Z(e) {
978
- return (t) => s.error(te(e, t));
978
+ return (t) => l.error(te(e, t));
979
979
  }
980
980
  function Q(t, n, r = {}) {
981
981
  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] }));
@@ -985,24 +985,24 @@ function xt(e) {
985
985
  return y({
986
986
  mutationFn: (t) => g(e, t),
987
987
  onSuccess: () => {
988
- Q(t, e), s.success(n("toast.record.created", "Record created"));
988
+ Q(t, e), l.success(n("toast.record.created", "Record created"));
989
989
  },
990
990
  onError: Z(r)
991
991
  });
992
992
  }
993
993
  function St(e) {
994
- let t = b(), n = m(), r = m("errors"), a = p((e) => e.isAuthenticated), { data: c } = f();
994
+ let t = b(), n = m(), i = m("errors"), a = p((e) => e.isAuthenticated), { data: s } = f();
995
995
  return y({
996
996
  mutationFn: ({ pkValues: t, data: n }) => ne(e, t, n),
997
- onSuccess: (r, { pkValues: l }) => {
998
- let u = c?.entities?.[e], d = typeof l == "string" ? u ? i(u, l) : void 0 : l, f = () => Q(t, e, {
997
+ onSuccess: (i, { pkValues: c }) => {
998
+ let u = s?.entities?.[e], d = typeof c == "string" ? u ? r(u, c) : void 0 : c, f = () => Q(t, e, {
999
999
  item: !0,
1000
1000
  children: !0,
1001
1001
  objectMeta: !0
1002
1002
  });
1003
- d ? (o(t, a, e, [d], f), Ct(t, e)) : f(), s.success(n("toast.record.updated", "Record updated"));
1003
+ d ? (o(t, a, e, [d], f), Ct(t, e)) : f(), l.success(n("toast.record.updated", "Record updated"));
1004
1004
  },
1005
- onError: Z(r)
1005
+ onError: Z(i)
1006
1006
  });
1007
1007
  }
1008
1008
  function Ct(t, n) {
@@ -1013,7 +1013,7 @@ function wt(e) {
1013
1013
  return y({
1014
1014
  mutationFn: (t) => ee(e, t),
1015
1015
  onSuccess: () => {
1016
- Q(t, e, { item: !0 }), s.success(n("toast.record.deleted", "Record deleted"));
1016
+ Q(t, e, { item: !0 }), l.success(n("toast.record.deleted", "Record deleted"));
1017
1017
  },
1018
1018
  onError: Z(r)
1019
1019
  });
@@ -1026,7 +1026,7 @@ function Tt(e) {
1026
1026
  Q(t, e, {
1027
1027
  item: !0,
1028
1028
  objectMeta: !0
1029
- }), s.success(n("toast.record.restored", "Record restored"));
1029
+ }), l.success(n("toast.record.restored", "Record restored"));
1030
1030
  },
1031
1031
  onError: Z(r)
1032
1032
  });
@@ -1164,30 +1164,4 @@ function At(e) {
1164
1164
  };
1165
1165
  }
1166
1166
  //#endregion
1167
- //#region src/lib/field-classification.ts
1168
- function jt(e, t) {
1169
- let n = e?.field_access?.[t];
1170
- return !n || n.read === "granted";
1171
- }
1172
- function Mt(e, t) {
1173
- let n = e?.field_access?.[t];
1174
- return !n || n.write === "granted";
1175
- }
1176
- function Nt(e, t) {
1177
- return e?.field_access?.[t]?.classification;
1178
- }
1179
- function Pt(e, t) {
1180
- return e?.field_access?.[t]?.required_permission;
1181
- }
1182
- function Ft(e, t, n) {
1183
- let r = Nt(t, n);
1184
- if (r) return e?.classifications?.[r];
1185
- }
1186
- function It(e, t, n) {
1187
- return !!Ft(e, t, n)?.sod_protected;
1188
- }
1189
- function Lt(e, t) {
1190
- return e?.field_access?.[t];
1191
- }
1192
- //#endregion
1193
- export { Ke as A, dt as C, Y as D, lt as E, Ne as F, ke as I, F as L, V as M, He as N, Ye as O, I as P, E as R, ft as S, st as T, _t as _, jt as a, pt as b, At as c, Ot as d, xt as f, bt as g, St as h, Pt as i, L as j, Xe as k, kt as l, Tt as m, Lt as n, It as o, wt as p, Nt as r, Mt as s, Ft as t, Et as u, vt as v, Qe as w, mt as x, yt as y, O as z };
1167
+ export { N as A, Je as C, P as D, We as E, O as M, Fe as O, Ze as S, z as T, $e as _, xt as a, Y as b, St as c, vt as d, yt as f, dt as g, ft as h, Ot as i, E as j, ke as k, bt as l, mt as m, kt as n, wt as o, pt as p, Et as r, Tt as s, At as t, _t as u, st as v, F as w, Xe as x, lt as y };