@declarion/react 0.56.0 → 0.59.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 (167) hide show
  1. package/README.md +0 -2
  2. package/dist-lib/AgentChatPanel.impl-DBH1Ff4G.js +1200 -0
  3. package/dist-lib/DetailAuditStrip-GNRA_eP5.js +289 -0
  4. package/dist-lib/{DraggableChildrenTable-BV5sb8Uo.js → DraggableChildrenTable-4RZC351U.js} +87 -86
  5. package/dist-lib/Grid-CQabaBLx.js +405 -0
  6. package/dist-lib/{LayoutRenderer-C9AH9cXf.js → LayoutRenderer-DGKWZKpW.js} +1000 -1114
  7. package/dist-lib/{ListCardsBody-DXcDg536.js → ListCardsBody-DfGmyNIu.js} +84 -84
  8. package/dist-lib/MarkdownRenderer-BDbzDv_y.js +87 -0
  9. package/dist-lib/{RefreshControl-CNtN8zSl.js → RefreshControl-Bhoib0ZA.js} +126 -155
  10. package/dist-lib/SmartDetailPage.impl-Ds2RGg6K.js +1565 -0
  11. package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +3046 -0
  12. package/dist-lib/{SmartRecordListPage.impl-Bkl9aZJ8.js → SmartRecordListPage.impl-C1FJLr80.js} +281 -280
  13. package/dist-lib/SortHeaderMenu-Cijxk4cX.js +107 -0
  14. package/dist-lib/action-dispatch-DY0c8U81.js +1967 -0
  15. package/dist-lib/api/client.d.ts +5 -0
  16. package/dist-lib/api/data.d.ts +2 -4
  17. package/dist-lib/api/entities.d.ts +8 -15
  18. package/dist-lib/api/events.d.ts +3 -3
  19. package/dist-lib/cardProjection-Bkl2SSYz.js +499 -0
  20. package/dist-lib/components/actions/ResponsiveActionBar.d.ts +17 -16
  21. package/dist-lib/components/agents/AgentChatPanel.d.ts +3 -13
  22. package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +14 -0
  23. package/dist-lib/components/agents/AgentPicker.d.ts +1 -2
  24. package/dist-lib/components/chrome/PageShell.d.ts +7 -0
  25. package/dist-lib/components/chrome/RecordHeader.d.ts +1 -2
  26. package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +1 -1
  27. package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -2
  28. package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -2
  29. package/dist-lib/components/detail-layout/blockMeta.d.ts +2 -1
  30. package/dist-lib/components/fields/BoolField.d.ts +1 -1
  31. package/dist-lib/components/fields/EnumField.d.ts +1 -1
  32. package/dist-lib/components/fields/IntArrayField.d.ts +1 -1
  33. package/dist-lib/components/fields/MultilangArrayField.d.ts +2 -0
  34. package/dist-lib/components/fields/MultilangField.d.ts +1 -1
  35. package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
  36. package/dist-lib/components/fields/NumberField.d.ts +1 -1
  37. package/dist-lib/components/fields/PasswordField.d.ts +1 -1
  38. package/dist-lib/components/fields/RefCombobox.d.ts +1 -1
  39. package/dist-lib/components/fields/SecretField.d.ts +1 -1
  40. package/dist-lib/components/fields/StringArrayField.d.ts +1 -1
  41. package/dist-lib/components/fields/TimestampField.d.ts +1 -1
  42. package/dist-lib/components/fields/cells/registry.d.ts +2 -1
  43. package/dist-lib/components/fields/index.d.ts +2 -1
  44. package/dist-lib/components/fields/langMap.d.ts +2 -0
  45. package/dist-lib/components/fields/secretValue.d.ts +2 -0
  46. package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +3 -0
  47. package/dist-lib/components/file-widgets/UploadFailureText.d.ts +4 -0
  48. package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
  49. package/dist-lib/components/file-widgets/host.d.ts +4 -3
  50. package/dist-lib/components/file-widgets/types.d.ts +1 -0
  51. package/dist-lib/components/file-widgets/upload.d.ts +18 -3
  52. package/dist-lib/components/filters/filter-op-label.d.ts +3 -0
  53. package/dist-lib/components/layout/ImpersonationBanner.d.ts +1 -1
  54. package/dist-lib/components/layout/ImpersonationFrame.d.ts +1 -1
  55. package/dist-lib/components/layout/Layout.d.ts +2 -1
  56. package/dist-lib/components/layout/Sidebar.d.ts +2 -1
  57. package/dist-lib/components/layout/TenantChip.d.ts +1 -1
  58. package/dist-lib/components/list/ViewSwitcher.d.ts +4 -2
  59. package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -2
  60. package/dist-lib/components/pages/ExportMenu.d.ts +3 -5
  61. package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -2
  62. package/dist-lib/components/pages/auth/AuthShell.d.ts +4 -31
  63. package/dist-lib/components/pages/exportRequest.d.ts +4 -6
  64. package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +8 -0
  65. package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -2
  66. package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -1
  67. package/dist-lib/components/pages/list/ListFloatbar.d.ts +2 -2
  68. package/dist-lib/components/pages/list/ListHeader.d.ts +2 -2
  69. package/dist-lib/components/pages/list/ListNoRows.d.ts +4 -5
  70. package/dist-lib/components/pages/list/ListToolbar.d.ts +3 -2
  71. package/dist-lib/components/pages/list/ListUrlBanner.d.ts +10 -0
  72. package/dist-lib/components/pages/list/RowActionsCell.d.ts +2 -4
  73. package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -2
  74. package/dist-lib/components/pages/list/columns.d.ts +2 -1
  75. package/dist-lib/components/pages/list/filter-meta.d.ts +2 -1
  76. package/dist-lib/components/pages/list/useActiveView.d.ts +38 -0
  77. package/dist-lib/components/pages/list/useListColumnLayout.d.ts +6 -5
  78. package/dist-lib/components/pages/list/useListQuery.d.ts +4 -4
  79. package/dist-lib/components/pages/list/useListSort.d.ts +5 -4
  80. package/dist-lib/components/pages/list/useListViews.d.ts +18 -8
  81. package/dist-lib/components/pages/list/useRowMenu.d.ts +2 -3
  82. package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
  83. package/dist-lib/components/params/ParamsBlock.d.ts +1 -13
  84. package/dist-lib/components/params/param-editors.d.ts +3 -11
  85. package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -2
  86. package/dist-lib/components/shared/DynamicIcon.d.ts +2 -2
  87. package/dist-lib/components/shared/ErrorBoundary.d.ts +1 -1
  88. package/dist-lib/components/shared/LoadingSkeleton.d.ts +1 -0
  89. package/dist-lib/components/shared/LucideIcon.d.ts +1 -1
  90. package/dist-lib/components/shared/useOwnRefresh.d.ts +1 -1
  91. package/dist-lib/declarion-react.css +1 -1
  92. package/dist-lib/embed/theme.d.ts +1 -1
  93. package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
  94. package/dist-lib/failure-v-uGSpbX.js +158 -0
  95. package/dist-lib/{field-classification-D6xQYn-h.js → field-classification-C28XE-_P.js} +514 -307
  96. package/dist-lib/format-count-DA4wmmWR.js +1771 -0
  97. package/dist-lib/hooks/useEntityData.d.ts +1 -1
  98. package/dist-lib/hooks/useFilters.d.ts +7 -5
  99. package/dist-lib/hooks/useLanguage.d.ts +4 -0
  100. package/dist-lib/hooks/useParams.d.ts +4 -51
  101. package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
  102. package/dist-lib/hooks/useSSE.d.ts +3 -3
  103. package/dist-lib/hooks/useTabTitle.d.ts +2 -0
  104. package/dist-lib/hooks/useText.d.ts +3 -3
  105. package/dist-lib/hooks/useVersionWatcher.d.ts +1 -1
  106. package/dist-lib/hooks/useViews.d.ts +20 -0
  107. package/dist-lib/index.d.ts +8 -7
  108. package/dist-lib/index.js +2716 -5795
  109. package/dist-lib/lib/action-dispatch.d.ts +2 -1
  110. package/dist-lib/lib/actions.d.ts +30 -42
  111. package/dist-lib/lib/anchor.d.ts +3 -4
  112. package/dist-lib/lib/decimal-text.d.ts +1 -0
  113. package/dist-lib/lib/document-templates.d.ts +1 -2
  114. package/dist-lib/lib/download.d.ts +2 -1
  115. package/dist-lib/lib/evidence-verdict.d.ts +2 -1
  116. package/dist-lib/lib/failure.d.ts +2 -0
  117. package/dist-lib/lib/field-classification.d.ts +3 -3
  118. package/dist-lib/lib/filters.d.ts +18 -2
  119. package/dist-lib/lib/format-count.d.ts +8 -7
  120. package/dist-lib/lib/language.d.ts +19 -0
  121. package/dist-lib/lib/mass-edit.d.ts +2 -1
  122. package/dist-lib/lib/realtime-query-keys.d.ts +1 -1
  123. package/dist-lib/lib/realtime-reconcile.d.ts +3 -4
  124. package/dist-lib/lib/screen-back.d.ts +4 -6
  125. package/dist-lib/lib/sort.d.ts +9 -9
  126. package/dist-lib/lib/timestamp.d.ts +5 -7
  127. package/dist-lib/lib/ui-actions.d.ts +2 -1
  128. package/dist-lib/peekDraftStore-D-cTbiIr.js +199 -0
  129. package/dist-lib/registry-Cb3W-czW.js +1950 -0
  130. package/dist-lib/safe-url-oSJw5pzO.js +34 -0
  131. package/dist-lib/stores/icon-registry.d.ts +2 -2
  132. package/dist-lib/stores/list-layout.d.ts +3 -4
  133. package/dist-lib/stores/realtime.d.ts +1 -1
  134. package/dist-lib/stores/tabs.d.ts +3 -2
  135. package/dist-lib/testing.d.ts +6 -0
  136. package/dist-lib/testing.js +98 -76
  137. package/dist-lib/types/api.d.ts +7 -8
  138. package/dist-lib/types/fieldType.d.ts +1 -1
  139. package/dist-lib/types/files.d.ts +4 -4
  140. package/dist-lib/types/schema.d.ts +44 -50
  141. package/dist-lib/useAgentConversation-D97IqE-J.js +623 -0
  142. package/dist-lib/{useCurrentScreen-CzwzQpoW.js → useCurrentScreen-BL5NZFCw.js} +2777 -3768
  143. package/dist-lib/useListQuery-BG1GyKtJ.js +103 -0
  144. package/dist-lib/useProperties-4Lg3odrt.js +83 -0
  145. package/dist-lib/{useTabSearchMirror-C39U85cg.js → useTabSearchMirror-ZVLlINBX.js} +49 -51
  146. package/dist-lib/useText-BFDCTUSo.js +952 -0
  147. package/dist-lib/{value-Bo8C8WMU.js → value-By1-WJ8J.js} +74 -76
  148. package/dist-lib/vite/fingerprint-plugin.d.ts +2 -3
  149. package/package.json +13 -12
  150. package/dist-lib/Grid-DWgUPuZ3.js +0 -404
  151. package/dist-lib/MarkdownRenderer-CcSFc2N3.js +0 -85
  152. package/dist-lib/RecordIdBadge-CGxPR-8q.js +0 -24
  153. package/dist-lib/SmartDetailPage.impl-lskCd-WG.js +0 -1846
  154. package/dist-lib/SmartListPage.impl-CrGbdzyK.js +0 -2854
  155. package/dist-lib/SortHeaderMenu-SYSAaqQJ.js +0 -106
  156. package/dist-lib/action-dispatch-CR4ajBtT.js +0 -1985
  157. package/dist-lib/cardProjection-CW5RIMko.js +0 -699
  158. package/dist-lib/components/pages/home/HomeStub.d.ts +0 -6
  159. package/dist-lib/components/pages/jobs/Jobs.d.ts +0 -1
  160. package/dist-lib/components/pages/pipeline/Pipeline.d.ts +0 -1
  161. package/dist-lib/format-count-Dobmi-Ji.js +0 -1551
  162. package/dist-lib/hooks/useUserLocale.d.ts +0 -1
  163. package/dist-lib/lib/messages.d.ts +0 -12
  164. package/dist-lib/peekDraftStore-5wQ7lq_V.js +0 -194
  165. package/dist-lib/registry-CjgUaF7C.js +0 -1768
  166. package/dist-lib/useListQuery-D7Hr5WM1.js +0 -96
  167. package/dist-lib/useProperties-CqtCzFCr.js +0 -81
@@ -1,20 +1,21 @@
1
- import { er as e, mr as t, nr as n, zr as r } from "./useCurrentScreen-CzwzQpoW.js";
1
+ import { In as e, jn as t, vn as n } from "./useCurrentScreen-BL5NZFCw.js";
2
+ import { t as r } from "./useText-BFDCTUSo.js";
2
3
  import { t as i } from "./Check-DAfMbQIw.js";
3
- import { f as a, m as o, p as s, r as c } from "./action-dispatch-CR4ajBtT.js";
4
- import { t as l } from "./cardProjection-CW5RIMko.js";
5
- import { t as u } from "./SmartListPage.impl-CrGbdzyK.js";
4
+ import { f as a, m as o, p as s, r as c } from "./action-dispatch-DY0c8U81.js";
5
+ import { t as l } from "./cardProjection-Bkl2SSYz.js";
6
+ import { t as u } from "./SmartListPage.impl-BrZLE_Gb.js";
6
7
  import { jsx as d, jsxs as f } from "react/jsx-runtime";
7
8
  //#region src/components/pages/list/ListCardRow.tsx
8
- function p(e, t, r) {
9
- if (e.startsWith("$status.")) {
10
- let r = e.slice(8), i = t.status_groups?.[r];
11
- return i ? n(i.name) || r : e;
9
+ function p(e, t, n, r) {
10
+ if (t.startsWith("$status.")) {
11
+ let r = t.slice(8), i = n.status_groups?.[r];
12
+ return i ? e(i.name) || r : t;
12
13
  }
13
- if (e.startsWith("$property.")) {
14
- let r = e.slice(10), i = t.properties?.[r];
15
- return i ? n(i.name) || r : e;
14
+ if (t.startsWith("$property.")) {
15
+ let r = t.slice(10), i = n.properties?.[r];
16
+ return i ? e(i.name) || r : t;
16
17
  }
17
- return o(t, e, r);
18
+ return o(e, n, t, r);
18
19
  }
19
20
  function m(e, n, r) {
20
21
  if (e.startsWith("$status.")) {
@@ -28,62 +29,62 @@ function m(e, n, r) {
28
29
  let i = a(r, n, e);
29
30
  return i != null && t(i) !== "";
30
31
  }
31
- function h(e, i, a) {
32
- let { entity: o, entityCode: c, refs: l, locale: u, renderers: f } = a;
33
- if (e.startsWith("$status.")) {
34
- let t = e.slice(8), a = o.status_groups?.[t], s = i.$statuses, c = Array.isArray(s) ? s.find((e) => e.group_code === t) : void 0;
35
- if (!a || !c) return /* @__PURE__ */ d("span", {
32
+ function h(n, r, i) {
33
+ let { entity: a, entityCode: o, refs: c, t: l, renderers: u } = i;
34
+ if (n.startsWith("$status.")) {
35
+ let t = n.slice(8), i = a.status_groups?.[t], o = r.$statuses, s = Array.isArray(o) ? o.find((e) => e.group_code === t) : void 0;
36
+ if (!i || !s) return /* @__PURE__ */ d("span", {
36
37
  style: { color: "var(--text-3)" },
37
38
  children: "-"
38
39
  });
39
- let l = a.statuses.find((e) => e.code === c.status_code);
40
- return /* @__PURE__ */ d(r, {
41
- tone: l?.color ?? "slate",
40
+ let c = i.statuses.find((e) => e.code === s.status_code);
41
+ return /* @__PURE__ */ d(e, {
42
+ tone: c?.color ?? "slate",
42
43
  size: "xs",
43
- children: n(l?.name) || c.status_code
44
+ children: l(c?.name) || s.status_code
44
45
  });
45
46
  }
46
- if (e.startsWith("$property.")) {
47
- let n = e.slice(10), r = i.$properties, a = Array.isArray(r) ? r.find((e) => e.property_code === n) : void 0;
47
+ if (n.startsWith("$property.")) {
48
+ let e = n.slice(10), i = r.$properties, a = Array.isArray(i) ? i.find((t) => t.property_code === e) : void 0;
48
49
  return !a || a.value == null ? /* @__PURE__ */ d("span", {
49
50
  style: { color: "var(--text-3)" },
50
51
  children: "-"
51
52
  }) : /* @__PURE__ */ d("span", { children: t(a.value) });
52
53
  }
53
- if (o.files?.get(e)) return s({
54
- entity: o,
55
- entityCode: c,
56
- fieldName: e,
57
- record: i,
54
+ if (a.files?.get(n)) return s({
55
+ entity: a,
56
+ entityCode: o,
57
+ fieldName: n,
58
+ record: r,
58
59
  mode: "display",
59
60
  surface: "list",
60
- refs: l,
61
- locale: u
61
+ refs: c,
62
+ t: l
62
63
  });
63
- let p = f.get(e);
64
- if (!p) {
65
- let n = i[e];
66
- return t(n) || /* @__PURE__ */ d("span", {
64
+ let f = u.get(n);
65
+ if (!f) {
66
+ let e = r[n];
67
+ return t(e) || /* @__PURE__ */ d("span", {
67
68
  style: { color: "var(--text-3)" },
68
69
  children: "-"
69
70
  });
70
71
  }
71
- return p(i[e], i);
72
+ return f(r[n], r);
72
73
  }
73
- function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities: s, savedViewColumns: g, refs: _, locale: v, renderers: y, rowActions: b, tabNavigate: x, interaction: S, hasSoftDelete: C, zebra: w, hasBatchActions: T, hasDetailTarget: E, rowKey: D, measureElement: O }) {
74
- let k = {
75
- entity: r,
76
- entityCode: o,
77
- refs: _,
78
- locale: v,
74
+ function g({ row: e, rowIndex: t, entity: a, screen: o, entityCode: s, entities: g, savedViewColumns: _, refs: v, renderers: y, rowActions: b, tabNavigate: x, interaction: S, hasSoftDelete: C, zebra: w, hasBatchActions: T, hasDetailTarget: E, rowKey: D, measureElement: O }) {
75
+ let k = r(), A = {
76
+ entity: a,
77
+ entityCode: s,
78
+ refs: v,
79
+ t: k,
79
80
  renderers: y
80
- }, A = t.original, j = c(r, a, A), M = l({
81
- entity: r,
82
- screen: j,
83
- savedViewColumns: g
84
- }), N = C && A[r.soft_delete] != null, P = t.getIsSelected(), F = w && n % 2 == 1, I = E || S.peekAllowed, L = (M.titleUsesDisplay ? e(A, r) ?? (M.titleField ? null : D(A)) : null) || (M.titleField ? h(M.titleField, A, k) : D(A)), R = M.badgeFields.filter((e) => !M.hideEmptyFields || m(e, A, r)), z = M.bodyFields.filter((e) => !M.hideEmptyFields || m(e, A, r)), B = M.metaFields.filter((e) => !M.hideEmptyFields || m(e, A, r));
81
+ }, j = e.original, M = c(a, o, j), N = l({
82
+ entity: a,
83
+ screen: M,
84
+ savedViewColumns: _
85
+ }), P = C && j[a.soft_delete] != null, F = e.getIsSelected(), I = w && t % 2 == 1, L = E || S.peekAllowed, R = (N.titleUsesDisplay ? n(k, j, a) ?? (N.titleField ? null : D(j)) : null) || (N.titleField ? h(N.titleField, j, A) : D(j)), z = N.badgeFields.filter((e) => !N.hideEmptyFields || m(e, j, a)), B = N.bodyFields.filter((e) => !N.hideEmptyFields || m(e, j, a)), V = N.metaFields.filter((e) => !N.hideEmptyFields || m(e, j, a));
85
86
  return /* @__PURE__ */ d("div", {
86
- "data-index": n,
87
+ "data-index": t,
87
88
  "data-testid": "list-card",
88
89
  ref: (e) => O(e),
89
90
  style: {
@@ -92,8 +93,8 @@ function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities:
92
93
  },
93
94
  children: /* @__PURE__ */ f("div", {
94
95
  className: "sl-list-card-surface",
95
- "data-row-stripe": F ? "" : void 0,
96
- "aria-selected": P,
96
+ "data-row-stripe": I ? "" : void 0,
97
+ "aria-selected": F,
97
98
  style: {
98
99
  display: "grid",
99
100
  gridTemplateColumns: T ? "28px minmax(0, 1fr) auto" : "minmax(0, 1fr) auto",
@@ -102,40 +103,40 @@ function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities:
102
103
  width: "100%",
103
104
  boxSizing: "border-box",
104
105
  borderRadius: 8,
105
- opacity: N ? .56 : 1,
106
- fontStyle: N ? "italic" : "normal",
106
+ opacity: P ? .56 : 1,
107
+ fontStyle: P ? "italic" : "normal",
107
108
  padding: "12px",
108
- cursor: I ? "pointer" : "default"
109
+ cursor: L ? "pointer" : "default"
109
110
  },
110
- tabIndex: I ? 0 : void 0,
111
- onClick: I ? (e) => S.onRowClick(e, A) : void 0,
112
- onKeyDown: I ? (e) => {
111
+ tabIndex: L ? 0 : void 0,
112
+ onClick: L ? (e) => S.onRowClick(e, j) : void 0,
113
+ onKeyDown: L ? (e) => {
113
114
  if (e.key === "Enter") {
114
115
  if (e.preventDefault(), S.peekAllowed) {
115
- S.setPeekRow(A);
116
+ S.setPeekRow(j);
116
117
  return;
117
118
  }
118
- S.navigateToDetail(A);
119
+ S.navigateToDetail(j);
119
120
  }
120
121
  } : void 0,
121
122
  onContextMenu: (e) => {
122
123
  e.preventDefault(), S.setContextMenu({
123
124
  x: e.clientX,
124
125
  y: e.clientY,
125
- row: A
126
+ row: j
126
127
  });
127
128
  },
128
129
  ...S.longPress.handlers,
129
130
  onPointerDown: (e) => {
130
- S.pressedRow.current = A, S.longPress.handlers.onPointerDown(e);
131
+ S.pressedRow.current = j, S.longPress.handlers.onPointerDown(e);
131
132
  },
132
133
  children: [
133
134
  T && /* @__PURE__ */ d("span", {
134
135
  "data-testid": "row-select-checkbox",
135
136
  style: { paddingTop: 2 },
136
137
  children: /* @__PURE__ */ d(i, {
137
- checked: P,
138
- onChange: () => t.toggleSelected()
138
+ checked: F,
139
+ onChange: () => e.toggleSelected()
139
140
  })
140
141
  }),
141
142
  /* @__PURE__ */ f("div", {
@@ -161,8 +162,8 @@ function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities:
161
162
  color: "var(--text)",
162
163
  overflowWrap: "anywhere"
163
164
  },
164
- children: L
165
- }), M.subtitleField && /* @__PURE__ */ d("div", {
165
+ children: R
166
+ }), N.subtitleField && /* @__PURE__ */ d("div", {
166
167
  style: {
167
168
  marginTop: 3,
168
169
  fontSize: 12.5,
@@ -170,26 +171,26 @@ function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities:
170
171
  color: "var(--text-3)",
171
172
  overflowWrap: "anywhere"
172
173
  },
173
- children: h(M.subtitleField, A, k)
174
+ children: h(N.subtitleField, j, A)
174
175
  })]
175
176
  })
176
177
  }),
177
- R.length > 0 && /* @__PURE__ */ d("div", {
178
+ z.length > 0 && /* @__PURE__ */ d("div", {
178
179
  style: {
179
180
  display: "flex",
180
181
  flexWrap: "wrap",
181
182
  gap: 6,
182
183
  marginTop: 10
183
184
  },
184
- children: R.map((e) => /* @__PURE__ */ d("span", {
185
+ children: z.map((e) => /* @__PURE__ */ d("span", {
185
186
  style: {
186
187
  display: "inline-flex",
187
188
  minWidth: 0
188
189
  },
189
- children: h(e, A, k)
190
+ children: h(e, j, A)
190
191
  }, e))
191
192
  }),
192
- z.length > 0 && /* @__PURE__ */ d("dl", {
193
+ B.length > 0 && /* @__PURE__ */ d("dl", {
193
194
  style: {
194
195
  display: "grid",
195
196
  gridTemplateColumns: "minmax(84px, max-content) minmax(0, 1fr)",
@@ -198,11 +199,11 @@ function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities:
198
199
  fontSize: 12.5,
199
200
  lineHeight: 1.35
200
201
  },
201
- children: z.map((e) => /* @__PURE__ */ f("div", {
202
+ children: B.map((e) => /* @__PURE__ */ f("div", {
202
203
  style: { display: "contents" },
203
204
  children: [/* @__PURE__ */ d("dt", {
204
205
  style: { color: "var(--text-3)" },
205
- children: p(e, r, s)
206
+ children: p(k, e, a, g)
206
207
  }), /* @__PURE__ */ d("dd", {
207
208
  style: {
208
209
  margin: 0,
@@ -210,11 +211,11 @@ function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities:
210
211
  minWidth: 0,
211
212
  overflowWrap: "anywhere"
212
213
  },
213
- children: h(e, A, k)
214
+ children: h(e, j, A)
214
215
  })]
215
216
  }, e))
216
217
  }),
217
- B.length > 0 && /* @__PURE__ */ d("div", {
218
+ V.length > 0 && /* @__PURE__ */ d("div", {
218
219
  style: {
219
220
  display: "flex",
220
221
  flexWrap: "wrap",
@@ -223,37 +224,36 @@ function g({ row: t, rowIndex: n, entity: r, screen: a, entityCode: o, entities:
223
224
  color: "var(--text-3)",
224
225
  fontSize: 11.5
225
226
  },
226
- children: B.map((e) => /* @__PURE__ */ f("span", {
227
+ children: V.map((e) => /* @__PURE__ */ f("span", {
227
228
  style: {
228
229
  minWidth: 0,
229
230
  overflowWrap: "anywhere"
230
231
  },
231
232
  children: [
232
- p(e, r, s),
233
+ p(k, e, a, g),
233
234
  ": ",
234
- h(e, A, k)
235
+ h(e, j, A)
235
236
  ]
236
237
  }, e))
237
238
  })
238
239
  ]
239
240
  }),
240
241
  /* @__PURE__ */ d(u, {
241
- row: A,
242
- rowId: D(A),
243
- screen: a,
244
- fullScreen: a,
245
- entity: r,
246
- entityCode: o,
242
+ row: j,
243
+ rowId: D(j),
244
+ screen: o,
245
+ fullScreen: o,
246
+ entity: a,
247
+ entityCode: s,
247
248
  rowActions: b,
248
249
  tabNavigate: x,
249
250
  peekAllowed: S.peekAllowed,
250
251
  hasDetailTarget: E,
251
- onPeek: S.setPeekRow,
252
- locale: v
252
+ onPeek: S.setPeekRow
253
253
  })
254
254
  ]
255
255
  })
256
- }, t.id);
256
+ }, e.id);
257
257
  }
258
258
  //#endregion
259
259
  //#region src/components/pages/list/ListCardsBody.tsx
@@ -0,0 +1,87 @@
1
+ import { _t as e } from "./useCurrentScreen-BL5NZFCw.js";
2
+ import { t } from "./useText-BFDCTUSo.js";
3
+ import { t as n } from "./safe-url-oSJw5pzO.js";
4
+ import { jsx as r } from "react/jsx-runtime";
5
+ import i, { defaultUrlTransform as a } from "react-markdown";
6
+ import o from "remark-breaks";
7
+ import s from "remark-gfm";
8
+ //#region src/components/shared/MarkdownRenderer.tsx
9
+ var c = "prose prose-sm dark:prose-invert max-w-none break-words overflow-hidden", l = [o], u = [s];
10
+ function d(e) {
11
+ return e.startsWith("declarion://file/") ? e : a(e);
12
+ }
13
+ function f(e) {
14
+ return e.startsWith("/") || e.startsWith("https://") || e.startsWith("http://") ? e : null;
15
+ }
16
+ function p({ href: e, children: t }) {
17
+ return n(e) ? /* @__PURE__ */ r("a", {
18
+ href: e,
19
+ target: "_blank",
20
+ rel: "noopener noreferrer",
21
+ children: t
22
+ }) : /* @__PURE__ */ r("a", {
23
+ href: e,
24
+ children: t
25
+ });
26
+ }
27
+ function m(t, n) {
28
+ return {
29
+ img({ src: i, alt: a }) {
30
+ let o = e(i);
31
+ if (!o) return /* @__PURE__ */ r("img", {
32
+ src: i,
33
+ alt: a ?? ""
34
+ });
35
+ let s = n[o], c = s?.presigned_url ?? s?.url, l = c ? f(c) : null;
36
+ return l ? /* @__PURE__ */ r("img", {
37
+ src: l,
38
+ alt: a ?? s.filename ?? ""
39
+ }) : /* @__PURE__ */ r("span", {
40
+ style: {
41
+ color: "var(--warn)",
42
+ fontSize: 12
43
+ },
44
+ children: t("control.markdown.missing_image", "Missing image {id}", { id: o })
45
+ });
46
+ },
47
+ a({ href: i, children: a }) {
48
+ let o = e(i);
49
+ if (!o) return /* @__PURE__ */ r(p, {
50
+ href: i,
51
+ children: a
52
+ });
53
+ let s = n[o], c = s?.presigned_url ?? s?.url, l = c ? f(c) : null;
54
+ return l ? /* @__PURE__ */ r("a", {
55
+ href: l,
56
+ target: "_blank",
57
+ rel: "noreferrer",
58
+ children: a
59
+ }) : /* @__PURE__ */ r("span", {
60
+ style: {
61
+ color: "var(--warn)",
62
+ fontSize: 12
63
+ },
64
+ children: t("control.markdown.missing_file", "Missing file {id}", { id: o })
65
+ });
66
+ }
67
+ };
68
+ }
69
+ function h({ content: e, plugins: n = "breaks", files: a, components: o, skipHtml: s = !0, prose: f = !0 }) {
70
+ let h = t(), g = n === "gfm" ? u : l, _ = {
71
+ a: p,
72
+ ...a ? m(h, a) : {},
73
+ ...o
74
+ }, v = /* @__PURE__ */ r(i, {
75
+ skipHtml: s,
76
+ remarkPlugins: g,
77
+ components: _,
78
+ urlTransform: a ? d : void 0,
79
+ children: e
80
+ });
81
+ return f ? /* @__PURE__ */ r("div", {
82
+ className: c,
83
+ children: v
84
+ }) : v;
85
+ }
86
+ //#endregion
87
+ export { h as MarkdownRenderer };