@declarion/react 0.57.0 → 0.59.2
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-9eJM2Fml.js +288 -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-DFjz29Ff.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/chrome/headerActionZone.d.ts +27 -0
- 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 -5803
- 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,71 +1,42 @@
|
|
|
1
1
|
import { s as e } from "./DynamicIcon-DW5krHuX.js";
|
|
2
|
-
import {
|
|
3
|
-
import { D as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
function S({ name: e, size: t = 22, color: n }) {
|
|
10
|
-
let r = e.split(/\s+/).map((e) => e[0]).slice(0, 2).join("").toUpperCase(), i = e.split("").reduce((e, t) => e + t.charCodeAt(0), 0), a = [
|
|
11
|
-
"#DCE4F6",
|
|
12
|
-
"#E4DCF6",
|
|
13
|
-
"#F6DCE4",
|
|
14
|
-
"#F6E4DC",
|
|
15
|
-
"#DCF6E4",
|
|
16
|
-
"#DCF6F1",
|
|
17
|
-
"#F1F6DC",
|
|
18
|
-
"#F6DCF1"
|
|
19
|
-
], o = n || a[i % a.length];
|
|
20
|
-
return /* @__PURE__ */ y("span", {
|
|
21
|
-
style: {
|
|
22
|
-
display: "inline-flex",
|
|
23
|
-
alignItems: "center",
|
|
24
|
-
justifyContent: "center",
|
|
25
|
-
width: t,
|
|
26
|
-
height: t,
|
|
27
|
-
borderRadius: 999,
|
|
28
|
-
background: o,
|
|
29
|
-
color: "#1E2A4A",
|
|
30
|
-
fontSize: t < 20 ? 9.5 : 10.5,
|
|
31
|
-
fontWeight: 600,
|
|
32
|
-
flexShrink: 0
|
|
33
|
-
},
|
|
34
|
-
children: r
|
|
35
|
-
});
|
|
36
|
-
}
|
|
37
|
-
//#endregion
|
|
2
|
+
import { Bt as t, In as n, Ln as r, nn as i, on as a, sn as o } from "./useCurrentScreen-BL5NZFCw.js";
|
|
3
|
+
import { D as s, t as c } from "./useText-BFDCTUSo.js";
|
|
4
|
+
import { C as l, M as u, c as d } from "./field-classification-C28XE-_P.js";
|
|
5
|
+
import { useCallback as f, useEffect as p, useId as m, useMemo as h, useRef as g, useState as _ } from "react";
|
|
6
|
+
import { useLocation as v } from "react-router";
|
|
7
|
+
import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
|
|
8
|
+
import { createPortal as S } from "react-dom";
|
|
38
9
|
//#region src/components/primitives/Tooltip.tsx
|
|
39
|
-
var
|
|
40
|
-
function
|
|
41
|
-
let [n, r] =
|
|
10
|
+
var C = 350, w = 80, T = 260, E = 6, D = 4;
|
|
11
|
+
function O(e, t) {
|
|
12
|
+
let [n, r] = _(!1), [i, a] = _(null), o = g(null), s = g(null), c = g(null), l = m(), u = f(() => {
|
|
42
13
|
s.current && clearTimeout(s.current), c.current && clearTimeout(c.current), s.current = null, c.current = null;
|
|
43
|
-
}, []),
|
|
14
|
+
}, []), d = f(() => {
|
|
44
15
|
let t = e.current;
|
|
45
16
|
if (!t) return;
|
|
46
|
-
let n = t.getBoundingClientRect(), r = o.current, i = r?.offsetWidth ??
|
|
47
|
-
c = Math.max(
|
|
48
|
-
let l = n.top -
|
|
17
|
+
let n = t.getBoundingClientRect(), r = o.current, i = r?.offsetWidth ?? T, s = r?.offsetHeight ?? 0, c = n.left + n.width / 2 - i / 2;
|
|
18
|
+
c = Math.max(D, Math.min(c, window.innerWidth - i - D));
|
|
19
|
+
let l = n.top - E - s < D ? n.bottom + E : n.top - E - s;
|
|
49
20
|
a({
|
|
50
21
|
left: c,
|
|
51
22
|
top: l
|
|
52
23
|
});
|
|
53
|
-
}, [e]),
|
|
54
|
-
t && (u(), e ? r(!0) : s.current = setTimeout(() => r(!0),
|
|
55
|
-
}, [u, t]), v =
|
|
56
|
-
u(), c.current = setTimeout(() => r(!1),
|
|
24
|
+
}, [e]), h = f((e) => {
|
|
25
|
+
t && (u(), e ? r(!0) : s.current = setTimeout(() => r(!0), C));
|
|
26
|
+
}, [u, t]), v = f(() => {
|
|
27
|
+
u(), c.current = setTimeout(() => r(!1), w);
|
|
57
28
|
}, [u]);
|
|
58
|
-
|
|
29
|
+
p(() => {
|
|
59
30
|
if (!n) {
|
|
60
31
|
a(null);
|
|
61
32
|
return;
|
|
62
33
|
}
|
|
63
|
-
|
|
64
|
-
let e = () =>
|
|
34
|
+
d();
|
|
35
|
+
let e = () => d();
|
|
65
36
|
return window.addEventListener("scroll", e, !0), window.addEventListener("resize", e), () => {
|
|
66
37
|
window.removeEventListener("scroll", e, !0), window.removeEventListener("resize", e);
|
|
67
38
|
};
|
|
68
|
-
}, [n,
|
|
39
|
+
}, [n, d]), p(() => u, [u]), p(() => {
|
|
69
40
|
if (!n) return;
|
|
70
41
|
let t = (t) => {
|
|
71
42
|
let n = e.current;
|
|
@@ -73,12 +44,12 @@ function D(e, t) {
|
|
|
73
44
|
};
|
|
74
45
|
return document.addEventListener("pointerdown", t, !0), () => document.removeEventListener("pointerdown", t, !0);
|
|
75
46
|
}, [n, e]);
|
|
76
|
-
let
|
|
47
|
+
let y = {
|
|
77
48
|
position: "fixed",
|
|
78
49
|
left: i?.left ?? 0,
|
|
79
50
|
top: i?.top ?? 0,
|
|
80
51
|
zIndex: 1e3,
|
|
81
|
-
maxWidth:
|
|
52
|
+
maxWidth: T,
|
|
82
53
|
padding: "5px 8px",
|
|
83
54
|
borderRadius: 6,
|
|
84
55
|
background: "var(--surface-inverse, #1f2430)",
|
|
@@ -89,31 +60,31 @@ function D(e, t) {
|
|
|
89
60
|
pointerEvents: "none",
|
|
90
61
|
visibility: i ? "visible" : "hidden",
|
|
91
62
|
whiteSpace: "normal"
|
|
92
|
-
},
|
|
63
|
+
}, x = n && t ? S(/* @__PURE__ */ b("div", {
|
|
93
64
|
ref: o,
|
|
94
65
|
id: l,
|
|
95
66
|
role: "tooltip",
|
|
96
|
-
style:
|
|
67
|
+
style: y,
|
|
97
68
|
children: t
|
|
98
69
|
}), document.body) : null;
|
|
99
70
|
return {
|
|
100
71
|
open: n,
|
|
101
72
|
triggerHandlers: {
|
|
102
|
-
onMouseEnter: () =>
|
|
73
|
+
onMouseEnter: () => h(!1),
|
|
103
74
|
onMouseLeave: v,
|
|
104
|
-
onFocus: () =>
|
|
75
|
+
onFocus: () => h(!0),
|
|
105
76
|
onBlur: v,
|
|
106
77
|
onPointerUp: (e) => {
|
|
107
78
|
e.pointerType !== "mouse" && t && (u(), r((e) => !e));
|
|
108
79
|
}
|
|
109
80
|
},
|
|
110
81
|
describedBy: n && t ? l : void 0,
|
|
111
|
-
portal:
|
|
82
|
+
portal: x
|
|
112
83
|
};
|
|
113
84
|
}
|
|
114
|
-
function
|
|
115
|
-
let r =
|
|
116
|
-
return e ? /* @__PURE__ */
|
|
85
|
+
function k({ content: e, children: t, triggerProps: n }) {
|
|
86
|
+
let r = g(null), { triggerHandlers: i, describedBy: a, portal: o } = O(r, e);
|
|
87
|
+
return e ? /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
|
|
117
88
|
...n,
|
|
118
89
|
ref: r,
|
|
119
90
|
"aria-describedby": a,
|
|
@@ -124,12 +95,12 @@ function O({ content: e, children: t, triggerProps: n }) {
|
|
|
124
95
|
},
|
|
125
96
|
...i,
|
|
126
97
|
children: t
|
|
127
|
-
}), o] }) : /* @__PURE__ */ y
|
|
98
|
+
}), o] }) : /* @__PURE__ */ b(y, { children: t });
|
|
128
99
|
}
|
|
129
|
-
function
|
|
130
|
-
return /* @__PURE__ */
|
|
100
|
+
function A({ label: t, size: n = 14, ...r }) {
|
|
101
|
+
return /* @__PURE__ */ b(k, {
|
|
131
102
|
content: t,
|
|
132
|
-
children: /* @__PURE__ */
|
|
103
|
+
children: /* @__PURE__ */ b("span", {
|
|
133
104
|
tabIndex: 0,
|
|
134
105
|
role: "note",
|
|
135
106
|
"aria-label": t,
|
|
@@ -140,61 +111,61 @@ function k({ label: t, size: n = 14, ...r }) {
|
|
|
140
111
|
color: "var(--text-3)",
|
|
141
112
|
cursor: "help"
|
|
142
113
|
},
|
|
143
|
-
children: /* @__PURE__ */
|
|
114
|
+
children: /* @__PURE__ */ b(e.info, { size: n })
|
|
144
115
|
})
|
|
145
116
|
});
|
|
146
117
|
}
|
|
147
118
|
//#endregion
|
|
148
119
|
//#region src/lib/branding.ts
|
|
149
|
-
var
|
|
150
|
-
function
|
|
120
|
+
var j = "branding";
|
|
121
|
+
function M(e, t) {
|
|
151
122
|
return e?.parameters.find((e) => e.code === t)?.value;
|
|
152
123
|
}
|
|
153
|
-
function M(e) {
|
|
154
|
-
return N(j(e, A));
|
|
155
|
-
}
|
|
156
124
|
function N(e) {
|
|
157
|
-
|
|
125
|
+
return P(M(e, j));
|
|
158
126
|
}
|
|
159
127
|
function P(e) {
|
|
160
|
-
|
|
161
|
-
return F(t) ? t : void 0;
|
|
128
|
+
if (I(e)) return e;
|
|
162
129
|
}
|
|
163
130
|
function F(e) {
|
|
164
|
-
|
|
131
|
+
let t = N(e)?.identity;
|
|
132
|
+
return I(t) ? t : void 0;
|
|
165
133
|
}
|
|
166
134
|
function I(e) {
|
|
135
|
+
return !!e && typeof e == "object" && !Array.isArray(e);
|
|
136
|
+
}
|
|
137
|
+
function L(e) {
|
|
167
138
|
if (!e) return !1;
|
|
168
139
|
let t = e.trim();
|
|
169
140
|
return t ? t.startsWith("/") || t.startsWith("http://") || t.startsWith("https://") || t.startsWith("data:image/") : !1;
|
|
170
141
|
}
|
|
171
142
|
//#endregion
|
|
172
143
|
//#region src/hooks/useBranding.ts
|
|
173
|
-
function
|
|
174
|
-
let e =
|
|
144
|
+
function R() {
|
|
145
|
+
let e = t(j);
|
|
175
146
|
return {
|
|
176
|
-
branding:
|
|
147
|
+
branding: P(e.value),
|
|
177
148
|
isLoading: e.loading
|
|
178
149
|
};
|
|
179
150
|
}
|
|
180
|
-
function R() {
|
|
181
|
-
return L().branding?.identity;
|
|
182
|
-
}
|
|
183
151
|
function z() {
|
|
184
|
-
return
|
|
152
|
+
return R().branding?.identity;
|
|
153
|
+
}
|
|
154
|
+
function B() {
|
|
155
|
+
return R().branding?.chrome;
|
|
185
156
|
}
|
|
186
157
|
//#endregion
|
|
187
158
|
//#region src/hooks/useBrandingChrome.ts
|
|
188
|
-
function
|
|
189
|
-
let e =
|
|
159
|
+
function V() {
|
|
160
|
+
let e = s(), t = B();
|
|
190
161
|
return (e.enabled ? t?.embed?.viewport : t?.full?.viewport) ?? "auto";
|
|
191
162
|
}
|
|
192
|
-
function
|
|
163
|
+
function H(e, t) {
|
|
193
164
|
return typeof e == "number" && Number.isFinite(e) && e > 0 ? e : t;
|
|
194
165
|
}
|
|
195
|
-
function
|
|
196
|
-
let e =
|
|
197
|
-
return
|
|
166
|
+
function U() {
|
|
167
|
+
let e = s(), t = B(), n = e.enabled ? t?.embed?.breakpoints : t?.full?.breakpoints, r = n?.phone_max, i = n?.tablet_max, a = n?.landscape_phone_max_height;
|
|
168
|
+
return h(() => W({
|
|
198
169
|
phone_max: r,
|
|
199
170
|
tablet_max: i,
|
|
200
171
|
landscape_phone_max_height: a
|
|
@@ -204,17 +175,17 @@ function H() {
|
|
|
204
175
|
a
|
|
205
176
|
]);
|
|
206
177
|
}
|
|
207
|
-
function
|
|
208
|
-
let t =
|
|
178
|
+
function W(e) {
|
|
179
|
+
let t = H(e?.phone_max, o.phoneMax), n = H(e?.tablet_max, o.tabletMax), r = t < n;
|
|
209
180
|
return r || console.error(`branding.chrome breakpoints: phone_max (${t}) must be below tablet_max (${n}), or no viewport can ever resolve to the tablet class. Both bounds fall back to the SDK defaults.`), {
|
|
210
|
-
phoneMax: r ? t :
|
|
211
|
-
tabletMax: r ? n :
|
|
212
|
-
landscapePhoneMaxHeight:
|
|
181
|
+
phoneMax: r ? t : o.phoneMax,
|
|
182
|
+
tabletMax: r ? n : o.tabletMax,
|
|
183
|
+
landscapePhoneMaxHeight: H(e?.landscape_phone_max_height, o.landscapePhoneMaxHeight)
|
|
213
184
|
};
|
|
214
185
|
}
|
|
215
|
-
function
|
|
216
|
-
let t =
|
|
217
|
-
return
|
|
186
|
+
function G(e) {
|
|
187
|
+
let t = s(), n = B();
|
|
188
|
+
return h(() => {
|
|
218
189
|
let r = { ...t.enabled ? n?.embed?.surfaces?.[e] : n?.full?.surfaces?.[e] };
|
|
219
190
|
return {
|
|
220
191
|
...r,
|
|
@@ -226,9 +197,9 @@ function W(e) {
|
|
|
226
197
|
e
|
|
227
198
|
]);
|
|
228
199
|
}
|
|
229
|
-
function
|
|
230
|
-
let e =
|
|
231
|
-
return
|
|
200
|
+
function K() {
|
|
201
|
+
let e = B();
|
|
202
|
+
return h(() => {
|
|
232
203
|
let t = { ...e?.full?.shell };
|
|
233
204
|
return {
|
|
234
205
|
...t,
|
|
@@ -238,11 +209,11 @@ function G() {
|
|
|
238
209
|
}
|
|
239
210
|
//#endregion
|
|
240
211
|
//#region src/lib/scroll-restoration.ts
|
|
241
|
-
var
|
|
242
|
-
function
|
|
212
|
+
var q = "scroll", J = 120, Y = 24, X = 600;
|
|
213
|
+
function Z(e, t) {
|
|
243
214
|
return Number.isFinite(e) ? Math.max(0, Math.min(e, Number.isFinite(t) && t > 0 ? t : 0)) : 0;
|
|
244
215
|
}
|
|
245
|
-
function
|
|
216
|
+
function Q(e, t, n) {
|
|
246
217
|
let r = Number.isFinite(e) ? e : 0;
|
|
247
218
|
if (t) {
|
|
248
219
|
let e = n[t.index];
|
|
@@ -258,21 +229,21 @@ function Z(e, t, n) {
|
|
|
258
229
|
offset: r
|
|
259
230
|
};
|
|
260
231
|
}
|
|
261
|
-
function
|
|
232
|
+
function ee(e, t, n, r) {
|
|
262
233
|
if (!e) return null;
|
|
263
234
|
if (e.key) {
|
|
264
235
|
let i = t.indexOf(e.key);
|
|
265
236
|
if (i >= 0) {
|
|
266
237
|
let t = n(i);
|
|
267
|
-
if (t !== void 0) return
|
|
238
|
+
if (t !== void 0) return Z(t + e.delta, r);
|
|
268
239
|
}
|
|
269
240
|
}
|
|
270
|
-
return
|
|
241
|
+
return Z(e.offset, r);
|
|
271
242
|
}
|
|
272
|
-
function te(e =
|
|
273
|
-
let t =
|
|
243
|
+
function te(e = q) {
|
|
244
|
+
let t = v(), n = g(null);
|
|
274
245
|
if (n.current === null) {
|
|
275
|
-
let r = l(t), i =
|
|
246
|
+
let r = l(t), i = u.getState().read(r, e);
|
|
276
247
|
n.current = i && Number.isFinite(i.offset) ? Math.max(0, i.offset) : 0;
|
|
277
248
|
}
|
|
278
249
|
return n.current;
|
|
@@ -284,7 +255,7 @@ function ne(e) {
|
|
|
284
255
|
return {
|
|
285
256
|
trigger() {
|
|
286
257
|
let e = Date.now() - t;
|
|
287
|
-
e >=
|
|
258
|
+
e >= J ? r() : n === null && (n = setTimeout(r, J - e));
|
|
288
259
|
},
|
|
289
260
|
flush() {
|
|
290
261
|
n !== null && (clearTimeout(n), n = null), e();
|
|
@@ -295,33 +266,33 @@ function ne(e) {
|
|
|
295
266
|
};
|
|
296
267
|
}
|
|
297
268
|
function re(e) {
|
|
298
|
-
let { virtualizer: t, scrollElementRef: n, rowKeys: r } = e, i = e.stateKey ?? "scroll", a = e.enabled ?? !0, o =
|
|
299
|
-
|
|
300
|
-
let d =
|
|
269
|
+
let { virtualizer: t, scrollElementRef: n, rowKeys: r } = e, i = e.stateKey ?? "scroll", a = e.enabled ?? !0, o = v(), s = l(o), c = g(t);
|
|
270
|
+
c.current = t;
|
|
271
|
+
let d = g(r);
|
|
301
272
|
d.current = r;
|
|
302
|
-
let
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
}, [s]),
|
|
273
|
+
let f = g(null);
|
|
274
|
+
p(() => {
|
|
275
|
+
f.current !== s && (f.current = null);
|
|
276
|
+
}, [s]), p(() => {
|
|
306
277
|
if (!a) return;
|
|
307
|
-
let e =
|
|
278
|
+
let e = c.current;
|
|
308
279
|
if (!e || r.length === 0) return;
|
|
309
|
-
let t =
|
|
310
|
-
if (
|
|
280
|
+
let t = u.getState().read(s, i), n = f.current !== s;
|
|
281
|
+
if (f.current = s, !t) {
|
|
311
282
|
n && e.scrollToOffset(0, {
|
|
312
283
|
align: "start",
|
|
313
284
|
behavior: "auto"
|
|
314
285
|
});
|
|
315
286
|
return;
|
|
316
287
|
}
|
|
317
|
-
let o = 0, l = 0,
|
|
318
|
-
let e =
|
|
288
|
+
let o = 0, l = 0, p = NaN, m = () => {
|
|
289
|
+
let e = c.current;
|
|
319
290
|
if (!e) return;
|
|
320
|
-
let n =
|
|
321
|
-
n !== null && (Number.isNaN(
|
|
291
|
+
let n = ee(t, d.current, (t) => e.getOffsetForIndex(t, "start")?.[0], e.getTotalSize());
|
|
292
|
+
n !== null && (Number.isNaN(p) || Math.abs(n - p) > 1) && (e.scrollToOffset(n, {
|
|
322
293
|
align: "start",
|
|
323
294
|
behavior: "auto"
|
|
324
|
-
}),
|
|
295
|
+
}), p = n, l++ < Y && (o = requestAnimationFrame(m)));
|
|
325
296
|
};
|
|
326
297
|
return m(), () => {
|
|
327
298
|
o && cancelAnimationFrame(o);
|
|
@@ -332,29 +303,29 @@ function re(e) {
|
|
|
332
303
|
r,
|
|
333
304
|
i
|
|
334
305
|
]), $(n, a, s, i, (e) => {
|
|
335
|
-
let t =
|
|
306
|
+
let t = c.current;
|
|
336
307
|
if (!t) return null;
|
|
337
308
|
let n = e.scrollTop, r = n > 0 ? n : t.scrollOffset ?? 0;
|
|
338
|
-
return
|
|
309
|
+
return Q(r, t.getVirtualItemForOffset(r), d.current);
|
|
339
310
|
});
|
|
340
311
|
}
|
|
341
312
|
function $(e, t, n, r, i) {
|
|
342
|
-
let a =
|
|
343
|
-
a.current = i,
|
|
313
|
+
let a = g(i);
|
|
314
|
+
a.current = i, p(() => {
|
|
344
315
|
if (!t) return;
|
|
345
|
-
let i = 0, o =
|
|
316
|
+
let i = 0, o = X, s = null, c = null, l = (e) => {
|
|
346
317
|
let t = a.current(e);
|
|
347
|
-
t &&
|
|
348
|
-
}, d = () =>
|
|
318
|
+
t && u.getState().set(n, r, t);
|
|
319
|
+
}, d = () => c?.trigger(), f = () => {
|
|
349
320
|
let t = e.current;
|
|
350
321
|
if (!t) {
|
|
351
322
|
o-- > 0 && (i = requestAnimationFrame(f));
|
|
352
323
|
return;
|
|
353
324
|
}
|
|
354
|
-
s = t,
|
|
325
|
+
s = t, c = ne(() => l(t)), t.addEventListener("scroll", d, { passive: !0 });
|
|
355
326
|
};
|
|
356
327
|
return f(), () => {
|
|
357
|
-
i && cancelAnimationFrame(i), s && s.removeEventListener("scroll", d),
|
|
328
|
+
i && cancelAnimationFrame(i), s && s.removeEventListener("scroll", d), c?.flush();
|
|
358
329
|
};
|
|
359
330
|
}, [
|
|
360
331
|
t,
|
|
@@ -364,18 +335,18 @@ function $(e, t, n, r, i) {
|
|
|
364
335
|
]);
|
|
365
336
|
}
|
|
366
337
|
function ie(e) {
|
|
367
|
-
let { scrollElementRef: t } = e, n = e.stateKey ?? "scroll", r = e.enabled ?? !0, i =
|
|
368
|
-
|
|
338
|
+
let { scrollElementRef: t } = e, n = e.stateKey ?? "scroll", r = e.enabled ?? !0, i = v(), a = l(i), o = g(null);
|
|
339
|
+
p(() => {
|
|
369
340
|
if (!r || o.current === a) return;
|
|
370
|
-
let e = 0, i =
|
|
341
|
+
let e = 0, i = X, s = () => {
|
|
371
342
|
let r = t.current;
|
|
372
343
|
if (!r) {
|
|
373
344
|
i-- > 0 && (e = requestAnimationFrame(s));
|
|
374
345
|
return;
|
|
375
346
|
}
|
|
376
347
|
o.current = a;
|
|
377
|
-
let
|
|
378
|
-
|
|
348
|
+
let c = u.getState().read(a, n);
|
|
349
|
+
c && (r.scrollTop = Number.isFinite(c.offset) ? Math.max(0, c.offset) : 0);
|
|
379
350
|
};
|
|
380
351
|
return s(), () => {
|
|
381
352
|
e && cancelAnimationFrame(e);
|
|
@@ -393,36 +364,36 @@ function ie(e) {
|
|
|
393
364
|
}
|
|
394
365
|
//#endregion
|
|
395
366
|
//#region src/components/shared/RefreshControl.tsx
|
|
396
|
-
function ae({ liveObject:
|
|
397
|
-
let { isPhone:
|
|
398
|
-
return /* @__PURE__ */
|
|
367
|
+
function ae({ liveObject: t, realtime: o = !0 }) {
|
|
368
|
+
let s = c(), { isPhone: l } = a(), { refreshing: u, refresh: f } = d(t.refetch), p = t.isLive ? s("control.refresh.live", "Live") : s("control.refresh.paused", "Updates paused"), m = t.isLive && l ? void 0 : p;
|
|
369
|
+
return /* @__PURE__ */ x("span", {
|
|
399
370
|
style: {
|
|
400
371
|
display: "inline-flex",
|
|
401
372
|
alignItems: "center",
|
|
402
373
|
gap: 8
|
|
403
374
|
},
|
|
404
|
-
children: [/* @__PURE__ */
|
|
405
|
-
icon:
|
|
375
|
+
children: [/* @__PURE__ */ b(r, {
|
|
376
|
+
icon: u ? /* @__PURE__ */ b("span", {
|
|
406
377
|
"data-testid": "refresh-spinner",
|
|
407
378
|
style: { display: "inline-flex" },
|
|
408
|
-
children: /* @__PURE__ */
|
|
409
|
-
}) : /* @__PURE__ */
|
|
410
|
-
title: "Refresh",
|
|
411
|
-
disabled:
|
|
412
|
-
onClick:
|
|
413
|
-
}),
|
|
379
|
+
children: /* @__PURE__ */ b(i, { size: 14 })
|
|
380
|
+
}) : /* @__PURE__ */ b(e.refresh, { size: 14 }),
|
|
381
|
+
title: s("control.refresh.title", "Refresh"),
|
|
382
|
+
disabled: t.isLoading || u,
|
|
383
|
+
onClick: f
|
|
384
|
+
}), o && /* @__PURE__ */ b("span", {
|
|
414
385
|
"data-testid": "live-indicator",
|
|
415
386
|
role: "status",
|
|
416
|
-
"aria-label":
|
|
417
|
-
title:
|
|
418
|
-
children: /* @__PURE__ */
|
|
419
|
-
tone:
|
|
387
|
+
"aria-label": p,
|
|
388
|
+
title: t.isLive ? s("control.refresh.live_hint", "This view updates automatically in realtime.") : s("control.refresh.paused_hint", "Realtime updates are paused. Refresh manually to load the latest data."),
|
|
389
|
+
children: /* @__PURE__ */ b(n, {
|
|
390
|
+
tone: t.isLive ? "emerald" : "amber",
|
|
420
391
|
size: "xs",
|
|
421
392
|
dot: !0,
|
|
422
|
-
children:
|
|
393
|
+
children: m
|
|
423
394
|
})
|
|
424
395
|
})]
|
|
425
396
|
});
|
|
426
397
|
}
|
|
427
398
|
//#endregion
|
|
428
|
-
export {
|
|
399
|
+
export { O as _, re as a, K as c, z as d, j as f, k as g, A as h, te as i, V as l, L as m, q as n, U as o, F as p, ie as r, G as s, ae as t, R as u };
|