@declarion/react 0.57.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.
- package/README.md +0 -2
- package/dist-lib/AgentChatPanel.impl-DBH1Ff4G.js +1200 -0
- package/dist-lib/DetailAuditStrip-GNRA_eP5.js +289 -0
- package/dist-lib/{DraggableChildrenTable-BV5sb8Uo.js → DraggableChildrenTable-4RZC351U.js} +87 -86
- package/dist-lib/Grid-CQabaBLx.js +405 -0
- package/dist-lib/{LayoutRenderer-C9AH9cXf.js → LayoutRenderer-DGKWZKpW.js} +1000 -1114
- package/dist-lib/{ListCardsBody-DXcDg536.js → ListCardsBody-DfGmyNIu.js} +84 -84
- package/dist-lib/MarkdownRenderer-BDbzDv_y.js +87 -0
- package/dist-lib/{RefreshControl-CNtN8zSl.js → RefreshControl-Bhoib0ZA.js} +126 -155
- package/dist-lib/SmartDetailPage.impl-Ds2RGg6K.js +1565 -0
- package/dist-lib/SmartListPage.impl-BrZLE_Gb.js +3046 -0
- package/dist-lib/{SmartRecordListPage.impl-Bkl9aZJ8.js → SmartRecordListPage.impl-C1FJLr80.js} +281 -280
- package/dist-lib/SortHeaderMenu-Cijxk4cX.js +107 -0
- package/dist-lib/action-dispatch-DY0c8U81.js +1967 -0
- package/dist-lib/api/client.d.ts +5 -0
- package/dist-lib/api/data.d.ts +2 -4
- package/dist-lib/api/entities.d.ts +8 -15
- package/dist-lib/api/events.d.ts +3 -3
- package/dist-lib/cardProjection-Bkl2SSYz.js +499 -0
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +17 -16
- package/dist-lib/components/agents/AgentChatPanel.d.ts +3 -13
- package/dist-lib/components/agents/AgentChatPanel.impl.d.ts +14 -0
- package/dist-lib/components/agents/AgentPicker.d.ts +1 -2
- package/dist-lib/components/chrome/PageShell.d.ts +7 -0
- package/dist-lib/components/chrome/RecordHeader.d.ts +1 -2
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +1 -2
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +1 -2
- package/dist-lib/components/detail-layout/blockMeta.d.ts +2 -1
- package/dist-lib/components/fields/BoolField.d.ts +1 -1
- package/dist-lib/components/fields/EnumField.d.ts +1 -1
- package/dist-lib/components/fields/IntArrayField.d.ts +1 -1
- package/dist-lib/components/fields/MultilangArrayField.d.ts +2 -0
- package/dist-lib/components/fields/MultilangField.d.ts +1 -1
- package/dist-lib/components/fields/MultilangTextField.d.ts +1 -1
- package/dist-lib/components/fields/NumberField.d.ts +1 -1
- package/dist-lib/components/fields/PasswordField.d.ts +1 -1
- package/dist-lib/components/fields/RefCombobox.d.ts +1 -1
- package/dist-lib/components/fields/SecretField.d.ts +1 -1
- package/dist-lib/components/fields/StringArrayField.d.ts +1 -1
- package/dist-lib/components/fields/TimestampField.d.ts +1 -1
- package/dist-lib/components/fields/cells/registry.d.ts +2 -1
- package/dist-lib/components/fields/index.d.ts +2 -1
- package/dist-lib/components/fields/langMap.d.ts +2 -0
- package/dist-lib/components/fields/secretValue.d.ts +2 -0
- package/dist-lib/components/file-widgets/UnknownFileWidget.d.ts +3 -0
- package/dist-lib/components/file-widgets/UploadFailureText.d.ts +4 -0
- package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +4 -3
- package/dist-lib/components/file-widgets/types.d.ts +1 -0
- package/dist-lib/components/file-widgets/upload.d.ts +18 -3
- package/dist-lib/components/filters/filter-op-label.d.ts +3 -0
- package/dist-lib/components/layout/ImpersonationBanner.d.ts +1 -1
- package/dist-lib/components/layout/ImpersonationFrame.d.ts +1 -1
- package/dist-lib/components/layout/Layout.d.ts +2 -1
- package/dist-lib/components/layout/Sidebar.d.ts +2 -1
- package/dist-lib/components/layout/TenantChip.d.ts +1 -1
- package/dist-lib/components/list/ViewSwitcher.d.ts +4 -2
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -2
- package/dist-lib/components/pages/ExportMenu.d.ts +3 -5
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -2
- package/dist-lib/components/pages/auth/AuthShell.d.ts +4 -31
- package/dist-lib/components/pages/exportRequest.d.ts +4 -6
- package/dist-lib/components/pages/list/DeleteViewDialog.d.ts +8 -0
- package/dist-lib/components/pages/list/ListCardRow.d.ts +1 -2
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +0 -1
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +2 -2
- package/dist-lib/components/pages/list/ListHeader.d.ts +2 -2
- package/dist-lib/components/pages/list/ListNoRows.d.ts +4 -5
- package/dist-lib/components/pages/list/ListToolbar.d.ts +3 -2
- package/dist-lib/components/pages/list/ListUrlBanner.d.ts +10 -0
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +2 -4
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -2
- package/dist-lib/components/pages/list/columns.d.ts +2 -1
- package/dist-lib/components/pages/list/filter-meta.d.ts +2 -1
- package/dist-lib/components/pages/list/useActiveView.d.ts +38 -0
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +6 -5
- package/dist-lib/components/pages/list/useListQuery.d.ts +4 -4
- package/dist-lib/components/pages/list/useListSort.d.ts +5 -4
- package/dist-lib/components/pages/list/useListViews.d.ts +18 -8
- package/dist-lib/components/pages/list/useRowMenu.d.ts +2 -3
- package/dist-lib/components/pages/profile/Profile.d.ts +3 -0
- package/dist-lib/components/params/ParamsBlock.d.ts +1 -13
- package/dist-lib/components/params/param-editors.d.ts +3 -11
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -2
- package/dist-lib/components/shared/DynamicIcon.d.ts +2 -2
- package/dist-lib/components/shared/LoadingSkeleton.d.ts +1 -0
- package/dist-lib/components/shared/LucideIcon.d.ts +1 -1
- package/dist-lib/components/shared/useOwnRefresh.d.ts +1 -1
- package/dist-lib/declarion-react.css +1 -1
- package/dist-lib/embed/theme.d.ts +1 -1
- package/dist-lib/embed/useEmbedNavigate.d.ts +1 -1
- package/dist-lib/failure-v-uGSpbX.js +158 -0
- package/dist-lib/{field-classification-D6xQYn-h.js → field-classification-C28XE-_P.js} +514 -307
- package/dist-lib/format-count-DA4wmmWR.js +1771 -0
- package/dist-lib/hooks/useEntityData.d.ts +1 -1
- package/dist-lib/hooks/useFilters.d.ts +7 -5
- package/dist-lib/hooks/useLanguage.d.ts +4 -0
- package/dist-lib/hooks/useParams.d.ts +4 -51
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +3 -3
- package/dist-lib/hooks/useTabTitle.d.ts +2 -0
- package/dist-lib/hooks/useText.d.ts +3 -3
- package/dist-lib/hooks/useVersionWatcher.d.ts +1 -1
- package/dist-lib/hooks/useViews.d.ts +20 -0
- package/dist-lib/index.d.ts +8 -7
- package/dist-lib/index.js +2716 -5795
- package/dist-lib/lib/action-dispatch.d.ts +2 -1
- package/dist-lib/lib/actions.d.ts +30 -42
- package/dist-lib/lib/anchor.d.ts +3 -4
- package/dist-lib/lib/decimal-text.d.ts +1 -0
- package/dist-lib/lib/document-templates.d.ts +1 -2
- package/dist-lib/lib/download.d.ts +2 -1
- package/dist-lib/lib/evidence-verdict.d.ts +2 -1
- package/dist-lib/lib/failure.d.ts +2 -0
- package/dist-lib/lib/field-classification.d.ts +3 -3
- package/dist-lib/lib/filters.d.ts +18 -2
- package/dist-lib/lib/format-count.d.ts +8 -7
- package/dist-lib/lib/language.d.ts +19 -0
- package/dist-lib/lib/mass-edit.d.ts +2 -1
- package/dist-lib/lib/realtime-query-keys.d.ts +1 -1
- package/dist-lib/lib/realtime-reconcile.d.ts +3 -4
- package/dist-lib/lib/screen-back.d.ts +4 -6
- package/dist-lib/lib/sort.d.ts +9 -9
- package/dist-lib/lib/timestamp.d.ts +5 -7
- package/dist-lib/lib/ui-actions.d.ts +2 -1
- package/dist-lib/peekDraftStore-D-cTbiIr.js +199 -0
- package/dist-lib/registry-Cb3W-czW.js +1950 -0
- package/dist-lib/safe-url-oSJw5pzO.js +34 -0
- package/dist-lib/stores/icon-registry.d.ts +2 -2
- package/dist-lib/stores/list-layout.d.ts +3 -4
- package/dist-lib/stores/realtime.d.ts +1 -1
- package/dist-lib/stores/tabs.d.ts +3 -2
- package/dist-lib/testing.d.ts +6 -0
- package/dist-lib/testing.js +98 -76
- package/dist-lib/types/api.d.ts +7 -8
- package/dist-lib/types/fieldType.d.ts +1 -1
- package/dist-lib/types/files.d.ts +4 -4
- package/dist-lib/types/schema.d.ts +44 -50
- package/dist-lib/useAgentConversation-D97IqE-J.js +623 -0
- package/dist-lib/{useCurrentScreen-CzwzQpoW.js → useCurrentScreen-BL5NZFCw.js} +2777 -3768
- package/dist-lib/useListQuery-BG1GyKtJ.js +103 -0
- package/dist-lib/useProperties-4Lg3odrt.js +83 -0
- package/dist-lib/{useTabSearchMirror-C39U85cg.js → useTabSearchMirror-ZVLlINBX.js} +49 -51
- package/dist-lib/useText-BFDCTUSo.js +952 -0
- package/dist-lib/{value-Bo8C8WMU.js → value-By1-WJ8J.js} +74 -76
- package/dist-lib/vite/fingerprint-plugin.d.ts +2 -3
- package/package.json +9 -9
- package/dist-lib/Grid-DWgUPuZ3.js +0 -404
- package/dist-lib/MarkdownRenderer-CcSFc2N3.js +0 -85
- package/dist-lib/RecordIdBadge-CGxPR-8q.js +0 -24
- package/dist-lib/SmartDetailPage.impl-lskCd-WG.js +0 -1846
- package/dist-lib/SmartListPage.impl-CrGbdzyK.js +0 -2854
- package/dist-lib/SortHeaderMenu-SYSAaqQJ.js +0 -106
- package/dist-lib/action-dispatch-CR4ajBtT.js +0 -1985
- package/dist-lib/cardProjection-CW5RIMko.js +0 -699
- package/dist-lib/components/pages/home/HomeStub.d.ts +0 -6
- package/dist-lib/components/pages/jobs/Jobs.d.ts +0 -1
- package/dist-lib/components/pages/pipeline/Pipeline.d.ts +0 -1
- package/dist-lib/format-count-Dobmi-Ji.js +0 -1551
- package/dist-lib/hooks/useUserLocale.d.ts +0 -1
- package/dist-lib/lib/messages.d.ts +0 -12
- package/dist-lib/peekDraftStore-5wQ7lq_V.js +0 -194
- package/dist-lib/registry-CjgUaF7C.js +0 -1768
- package/dist-lib/useListQuery-D7Hr5WM1.js +0 -96
- package/dist-lib/useProperties-CqtCzFCr.js +0 -81
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import {
|
|
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-
|
|
4
|
-
import { t as l } from "./cardProjection-
|
|
5
|
-
import { t as u } from "./SmartListPage.impl-
|
|
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 (
|
|
10
|
-
let r =
|
|
11
|
-
return i ?
|
|
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 (
|
|
14
|
-
let r =
|
|
15
|
-
return i ?
|
|
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(
|
|
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(
|
|
32
|
-
let { entity:
|
|
33
|
-
if (
|
|
34
|
-
let t =
|
|
35
|
-
if (!
|
|
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
|
|
40
|
-
return /* @__PURE__ */ d(
|
|
41
|
-
tone:
|
|
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:
|
|
44
|
+
children: l(c?.name) || s.status_code
|
|
44
45
|
});
|
|
45
46
|
}
|
|
46
|
-
if (
|
|
47
|
-
let
|
|
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 (
|
|
54
|
-
entity:
|
|
55
|
-
entityCode:
|
|
56
|
-
fieldName:
|
|
57
|
-
record:
|
|
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:
|
|
61
|
-
|
|
61
|
+
refs: c,
|
|
62
|
+
t: l
|
|
62
63
|
});
|
|
63
|
-
let
|
|
64
|
-
if (!
|
|
65
|
-
let
|
|
66
|
-
return t(
|
|
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
|
|
72
|
+
return f(r[n], r);
|
|
72
73
|
}
|
|
73
|
-
function g({ row:
|
|
74
|
-
let k = {
|
|
75
|
-
entity:
|
|
76
|
-
entityCode:
|
|
77
|
-
refs:
|
|
78
|
-
|
|
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
|
-
},
|
|
81
|
-
entity:
|
|
82
|
-
screen:
|
|
83
|
-
savedViewColumns:
|
|
84
|
-
}),
|
|
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":
|
|
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":
|
|
96
|
-
"aria-selected":
|
|
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:
|
|
106
|
-
fontStyle:
|
|
106
|
+
opacity: P ? .56 : 1,
|
|
107
|
+
fontStyle: P ? "italic" : "normal",
|
|
107
108
|
padding: "12px",
|
|
108
|
-
cursor:
|
|
109
|
+
cursor: L ? "pointer" : "default"
|
|
109
110
|
},
|
|
110
|
-
tabIndex:
|
|
111
|
-
onClick:
|
|
112
|
-
onKeyDown:
|
|
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(
|
|
116
|
+
S.setPeekRow(j);
|
|
116
117
|
return;
|
|
117
118
|
}
|
|
118
|
-
S.navigateToDetail(
|
|
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:
|
|
126
|
+
row: j
|
|
126
127
|
});
|
|
127
128
|
},
|
|
128
129
|
...S.longPress.handlers,
|
|
129
130
|
onPointerDown: (e) => {
|
|
130
|
-
S.pressedRow.current =
|
|
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:
|
|
138
|
-
onChange: () =>
|
|
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:
|
|
165
|
-
}),
|
|
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(
|
|
174
|
+
children: h(N.subtitleField, j, A)
|
|
174
175
|
})]
|
|
175
176
|
})
|
|
176
177
|
}),
|
|
177
|
-
|
|
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:
|
|
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,
|
|
190
|
+
children: h(e, j, A)
|
|
190
191
|
}, e))
|
|
191
192
|
}),
|
|
192
|
-
|
|
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:
|
|
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,
|
|
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,
|
|
214
|
+
children: h(e, j, A)
|
|
214
215
|
})]
|
|
215
216
|
}, e))
|
|
216
217
|
}),
|
|
217
|
-
|
|
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:
|
|
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,
|
|
233
|
+
p(k, e, a, g),
|
|
233
234
|
": ",
|
|
234
|
-
h(e,
|
|
235
|
+
h(e, j, A)
|
|
235
236
|
]
|
|
236
237
|
}, e))
|
|
237
238
|
})
|
|
238
239
|
]
|
|
239
240
|
}),
|
|
240
241
|
/* @__PURE__ */ d(u, {
|
|
241
|
-
row:
|
|
242
|
-
rowId: D(
|
|
243
|
-
screen:
|
|
244
|
-
fullScreen:
|
|
245
|
-
entity:
|
|
246
|
-
entityCode:
|
|
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
|
-
},
|
|
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 };
|