@declarion/react 0.86.0 → 0.88.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/dist-lib/app.js +28 -28
- package/dist-lib/components/actions/ActionButton.js +86 -85
- package/dist-lib/components/actions/ActionResultDialog.impl.js +47 -47
- package/dist-lib/components/actions/ActionRunner.js +47 -47
- package/dist-lib/components/actions/ObjectActionBar.js +9 -9
- package/dist-lib/components/actions/RowActionsKebab.js +19 -19
- package/dist-lib/components/agents/AgentChatPanel.impl.js +53 -53
- package/dist-lib/components/chrome/AssociationTabs.js +21 -21
- package/dist-lib/components/chrome/RecordHeader.js +33 -40
- package/dist-lib/components/detail-layout/AssociatedBlock.js +387 -381
- package/dist-lib/components/detail-layout/ChildrenBlock.js +12 -13
- package/dist-lib/components/detail-layout/ChildrenTimeline.js +198 -198
- package/dist-lib/components/detail-layout/DraggableChildrenTable.js +114 -114
- package/dist-lib/components/detail-layout/EditableChildrenTable.js +160 -160
- package/dist-lib/components/detail-layout/EvidenceBlock.js +20 -21
- package/dist-lib/components/detail-layout/PropertiesBlock.js +45 -39
- package/dist-lib/components/detail-layout/QuickAddForm.js +9 -9
- package/dist-lib/components/detail-layout/TimelineComposer.js +87 -89
- package/dist-lib/components/detail-layout/widgets/EntityScorecardWidget.js +100 -99
- package/dist-lib/components/fields/FileReferenceField.js +9 -9
- package/dist-lib/components/fields/StructureField.js +57 -47
- package/dist-lib/components/fields/TimestampField.js +59 -54
- package/dist-lib/components/fields/cells/factories/money.js +14 -23
- package/dist-lib/components/fields/cells/factories/nextRun.js +1 -1
- package/dist-lib/components/fields/cells/factories/text.js +18 -3
- package/dist-lib/components/fields/cells/factories/timestamp.js +24 -12
- package/dist-lib/components/file-widgets/DocumentCard.js +108 -106
- package/dist-lib/components/layout/Layout.js +306 -361
- package/dist-lib/components/layout/Rail.js +42 -41
- package/dist-lib/components/layout/Sidebar.js +132 -117
- package/dist-lib/components/layout/TabStrip.js +116 -115
- package/dist-lib/components/layout/TenantChip.js +47 -54
- package/dist-lib/components/layout/TopBar.js +108 -105
- package/dist-lib/components/list/InlineEditCell.js +23 -23
- package/dist-lib/components/list/QuickPeek.js +65 -66
- package/dist-lib/components/pages/DocumentsMenu.js +42 -42
- package/dist-lib/components/pages/ExportMenu.js +25 -25
- package/dist-lib/components/pages/RecordDocumentsPanel.js +35 -35
- package/dist-lib/components/pages/RecordNotesPanel.js +94 -93
- package/dist-lib/components/pages/SmartDetailPage.impl.js +421 -417
- package/dist-lib/components/pages/SmartListPage.impl.js +293 -295
- package/dist-lib/components/pages/SmartRecordListPage.impl.js +310 -310
- package/dist-lib/components/pages/auth/AuthShell.js +73 -73
- package/dist-lib/components/pages/auth/SignIn.js +32 -32
- package/dist-lib/components/pages/auth/SignUp.impl.js +3 -3
- package/dist-lib/components/pages/auth/SignUpCode.js +9 -9
- package/dist-lib/components/pages/list/ListFloatbar.js +12 -12
- package/dist-lib/components/pages/list/ListHeader.js +19 -19
- package/dist-lib/components/pages/list/ListNoRows.js +15 -15
- package/dist-lib/components/pages/list/ListToolbar.js +145 -145
- package/dist-lib/components/pages/list/useActiveView.js +14 -5
- package/dist-lib/components/pages/list/useListQuery.js +121 -81
- package/dist-lib/components/pages/list/useListRowInteraction.js +70 -70
- package/dist-lib/components/pages/list/useRowMenu.js +7 -7
- package/dist-lib/components/pages/profile/Preferences.impl.js +81 -78
- package/dist-lib/components/pages/profile/Profile.impl.js +191 -189
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.impl.js +166 -158
- package/dist-lib/components/shared/ChangePasswordDialog.impl.js +23 -23
- package/dist-lib/components/shared/MarkdownRenderer.js +9 -9
- package/dist-lib/hooks/useAuth.js +11 -11
- package/dist-lib/hooks/useBranding.js +4 -4
- package/dist-lib/hooks/useDisplayTimeZone.js +8 -0
- package/dist-lib/hooks/useFollowAgentOpen.js +24 -24
- package/dist-lib/hooks/useImpersonation.js +6 -6
- package/dist-lib/hooks/useMutations.js +23 -23
- package/dist-lib/hooks/useObjectStatus.js +5 -5
- package/dist-lib/hooks/useParams.js +59 -51
- package/dist-lib/hooks/useProperties.js +8 -8
- package/dist-lib/hooks/useRowTenant.js +18 -6
- package/dist-lib/hooks/useText.js +9 -7
- package/dist-lib/hooks/useUiPreferences.js +71 -0
- package/dist-lib/index.d.ts +22 -6
- package/dist-lib/index.js +127 -126
- package/dist-lib/lib/actions.js +116 -84
- package/dist-lib/lib/child-config.js +10 -1
- package/dist-lib/lib/format-count.js +16 -1
- package/dist-lib/lib/language.js +23 -21
- package/dist-lib/lib/money-text.js +29 -0
- package/dist-lib/lib/profile.js +4 -0
- package/dist-lib/lib/role-label.js +8 -0
- package/dist-lib/lib/schema-routing.js +34 -14
- package/dist-lib/lib/shortcut.js +10 -0
- package/dist-lib/lib/timestamp.js +93 -31
- package/dist-lib/stores/auth.js +9 -8
- package/dist-lib/stores/preferences.js +56 -17
- package/dist-lib/testing.d.ts +1 -1
- package/dist-lib/testing.js +25 -28
- package/dist-lib/types/schema.js +33 -27
- package/dist-lib/{useResponsiveMode-D3SKz5z4.d.ts → useResponsiveMode-9_eJT18k.d.ts} +5 -5
- package/package.json +1 -1
|
@@ -1,126 +1,134 @@
|
|
|
1
1
|
import { loginPathForRedirectPath as e } from "../../api/auth-redirect.js";
|
|
2
2
|
import { useEmbed as t } from "../../embed/EmbedContext.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
3
|
+
import { UI_PREFERENCES_PARAM_CODE as n, usePreferencesStore as r } from "../../stores/preferences.js";
|
|
4
|
+
import { useAuthStore as i } from "../../stores/auth.js";
|
|
5
|
+
import { useSchema as a } from "../../hooks/useSchema.js";
|
|
6
|
+
import { Icon as o } from "../primitives/Icons.js";
|
|
7
|
+
import { IconBtn as s } from "../primitives/IconBtn.js";
|
|
8
|
+
import { useText as c } from "../../hooks/useText.js";
|
|
9
|
+
import { useResponsiveMode as l } from "../../hooks/useResponsiveMode.js";
|
|
10
|
+
import { useEffectiveParam as u } from "../../hooks/useParams.js";
|
|
11
|
+
import { useUiPreferences as d } from "../../hooks/useUiPreferences.js";
|
|
12
|
+
import { Rail as f } from "./Rail.js";
|
|
13
|
+
import { useBrandingIdentity as p } from "../../hooks/useBranding.js";
|
|
14
|
+
import { useTabStore as m } from "../../stores/tabs.js";
|
|
15
|
+
import { EmbedResizeReporter as h } from "../../embed/EmbedResizeReporter.js";
|
|
14
16
|
import { EmbedDirtyReporter as ee } from "../../embed/EmbedDirtyReporter.js";
|
|
15
|
-
import { EmbedHistoryTracker as
|
|
16
|
-
import { useGlobalLinkInterceptor as
|
|
17
|
-
import { EmbedLocationReporter as
|
|
18
|
-
import { EmbedUnsavedGuard as
|
|
19
|
-
import { useTabNavigate as
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
17
|
+
import { EmbedHistoryTracker as te } from "../../embed/EmbedHistoryTracker.js";
|
|
18
|
+
import { useGlobalLinkInterceptor as ne } from "../../embed/useGlobalLinkInterceptor.js";
|
|
19
|
+
import { EmbedLocationReporter as re } from "../../embed/EmbedLocationReporter.js";
|
|
20
|
+
import { EmbedUnsavedGuard as ie } from "../../embed/EmbedUnsavedGuard.js";
|
|
21
|
+
import { useTabNavigate as ae } from "../../hooks/useTabNavigate.js";
|
|
22
|
+
import { areaRoute as oe, findNavMatch as se } from "../../lib/schema-routing.js";
|
|
23
|
+
import { Sidebar as ce, buildSections as g } from "./Sidebar.js";
|
|
24
|
+
import { useImpersonation as le } from "../../hooks/useImpersonation.js";
|
|
25
|
+
import { TopBar as ue } from "./TopBar.js";
|
|
26
|
+
import { builtInPageTitle as _, useTabTitle as v } from "../../hooks/useTabTitle.js";
|
|
27
|
+
import { TabStrip as de } from "./TabStrip.js";
|
|
28
|
+
import { DirtyTabsCloseDialog as fe } from "./DirtyTabsCloseDialog.js";
|
|
29
|
+
import { ImpersonationBanner as pe } from "./ImpersonationBanner.js";
|
|
30
|
+
import { ImpersonationFrame as me } from "./ImpersonationFrame.js";
|
|
31
|
+
import { buildPendingTabClose as he, tabCloseRoute as ge } from "./tab-close.js";
|
|
32
|
+
import { CommandPalette as _e } from "./CommandPalette.js";
|
|
33
|
+
import { AgentChatPanel as ve } from "../agents/AgentChatPanel.js";
|
|
34
|
+
import { useSSE as ye } from "../../hooks/useSSE.js";
|
|
35
|
+
import { ActionRunnerProvider as be } from "../actions/ActionRunner.js";
|
|
36
|
+
import { startListLayoutCrossTabSync as xe, useListLayoutStore as Se } from "../../stores/list-layout.js";
|
|
37
|
+
import { usePageStateRuntime as Ce } from "../../hooks/usePageStateRuntime.js";
|
|
38
|
+
import { AgentOpenFollower as we } from "../agents/AgentOpenFollower.js";
|
|
39
|
+
import { useCurrentLocation as Te } from "../../hooks/useCurrentLocation.js";
|
|
40
|
+
import { useBrandingShell as Ee } from "../../hooks/useBrandingChrome.js";
|
|
41
|
+
import { useActiveTabFollowsRoute as De } from "../../hooks/useActiveTabFollowsRoute.js";
|
|
42
|
+
import { useDocumentTitle as Oe } from "../../hooks/useDocumentTitle.js";
|
|
43
|
+
import { useCallback as y, useEffect as b, useMemo as ke, useRef as x, useState as S } from "react";
|
|
44
|
+
import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
|
|
45
|
+
import { Outlet as Ae, useLocation as je, useNavigate as Me } from "react-router";
|
|
43
46
|
//#region src/components/layout/Layout.tsx
|
|
44
|
-
var
|
|
45
|
-
function
|
|
46
|
-
let
|
|
47
|
-
|
|
48
|
-
let { isAuthenticated:
|
|
49
|
-
|
|
50
|
-
}, [
|
|
47
|
+
var E = "default";
|
|
48
|
+
function D() {
|
|
49
|
+
let o = c();
|
|
50
|
+
ne(), Ce();
|
|
51
|
+
let { isAuthenticated: s, isLoading: g, user: _, activeTenant: v } = i(), C = t(), D = Me(), O = ae(), k = y((e) => O(e, { topLevel: !0 }), [O]), A = je(), { data: j } = a(), Re = l(), M = r((e) => e.sidebar), ze = r((e) => e.tabsPosition), N = r((e) => e.aiSurface), Be = r((e) => e.colorScheme), { set: P } = d(), Ve = r((e) => e.hydrateFromParameter), F = u(n), He = F.source && F.source !== "public" ? _?.id : void 0, I = Ee(), L = m((e) => e.tabs), Ue = m((e) => e.activeTabId), We = m((e) => e.closeTabs), Ge = m((e) => e.switchTab), [R, z] = S(E), [Ke, B] = S(!1), [qe, Je] = S("default"), [V, H] = S(!1), [Ye, U] = S(), [Xe, W] = S(!1), [Ze, G] = S(!1), Qe = x(null), $e = x(null), [K, q] = S(null), J = N !== "off" && I.isVisible("show_command_palette"), Y = N === "panel" || N === "both", et = N === "command" || N === "both", tt = p(), nt = tt?.ai_name?.trim() ?? "", X = Re.category === "phone" || Re.category === "tablet", rt = I.isVisible("show_topbar"), it = !X && I.isVisible("show_rail"), at = !X && I.isVisible("show_sidebar"), ot = !X && I.isVisible("show_tabs"), st = X && I.isVisible("show_sidebar"), ct = X && I.isVisible("show_tabs"), lt = Ne(!X && Y && V), ut = I.isVisible("show_tenant_switcher"), dt = I.isVisible("show_breadcrumbs"), ft = I.isVisible("show_theme_toggle"), Z = y((e = "default") => {
|
|
52
|
+
J && (Je(e), B(!0));
|
|
53
|
+
}, [J]), Q = y((e) => {
|
|
51
54
|
if (e.length === 0) return;
|
|
52
|
-
let t =
|
|
55
|
+
let t = m.getState(), n = !t.activeTabId || e.includes(t.activeTabId), r = We(e);
|
|
53
56
|
if (!n) return;
|
|
54
|
-
let i =
|
|
55
|
-
|
|
57
|
+
let i = ge(r);
|
|
58
|
+
D({
|
|
56
59
|
pathname: i.pathname,
|
|
57
60
|
search: i.search
|
|
58
61
|
}, { replace: i.replace });
|
|
59
|
-
}, [
|
|
60
|
-
let n =
|
|
61
|
-
r && (r.dirtyTabs.length > 0 ?
|
|
62
|
-
}, [
|
|
63
|
-
|
|
64
|
-
}, []),
|
|
65
|
-
|
|
66
|
-
}, [
|
|
67
|
-
|
|
68
|
-
}, [
|
|
69
|
-
|
|
70
|
-
let
|
|
71
|
-
|
|
72
|
-
|
|
62
|
+
}, [We, D]), $ = y((e, t) => {
|
|
63
|
+
let n = m.getState(), r = he(n.tabs, n.activeTabId, e, t);
|
|
64
|
+
r && (r.dirtyTabs.length > 0 ? q(r) : Q(r.ids));
|
|
65
|
+
}, [Q]), pt = y(() => {
|
|
66
|
+
q(null);
|
|
67
|
+
}, []), mt = y(() => {
|
|
68
|
+
K && (q(null), Q(K.cleanIds));
|
|
69
|
+
}, [K, Q]), ht = y(() => {
|
|
70
|
+
K && (q(null), Q(K.ids));
|
|
71
|
+
}, [K, Q]);
|
|
72
|
+
ye();
|
|
73
|
+
let gt = Te(), { isImpersonating: _t } = le();
|
|
74
|
+
b(() => {
|
|
75
|
+
C.enabled || !g && !s && D(e(`${A.pathname}${A.search}${A.hash}`), { replace: !0 });
|
|
73
76
|
}, [
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
]),
|
|
82
|
-
let e =
|
|
83
|
-
|
|
84
|
-
}, [
|
|
85
|
-
|
|
86
|
-
}, [
|
|
87
|
-
|
|
88
|
-
|
|
77
|
+
C.enabled,
|
|
78
|
+
g,
|
|
79
|
+
s,
|
|
80
|
+
D,
|
|
81
|
+
A.hash,
|
|
82
|
+
A.pathname,
|
|
83
|
+
A.search
|
|
84
|
+
]), b(() => {
|
|
85
|
+
let e = _?.id || null, t = v?.id || null;
|
|
86
|
+
m.getState().setScope(t, e), Se.getState().setScope(t, e), e && t && (m.getState().hydrate(), Se.getState().hydrate(), xe());
|
|
87
|
+
}, [_?.id, v?.id]), De(), Oe(), b(() => {
|
|
88
|
+
Ve(F.value, He);
|
|
89
|
+
}, [
|
|
90
|
+
F.value,
|
|
91
|
+
He,
|
|
92
|
+
_?.id,
|
|
93
|
+
Ve
|
|
94
|
+
]), b(() => {
|
|
95
|
+
if (!j) return;
|
|
96
|
+
let e = se(j.navigation, j.screens, A.pathname)?.area;
|
|
89
97
|
if (e) {
|
|
90
|
-
|
|
98
|
+
z(e);
|
|
91
99
|
return;
|
|
92
100
|
}
|
|
93
|
-
let t =
|
|
94
|
-
if ((
|
|
95
|
-
let n = (
|
|
96
|
-
n !== t &&
|
|
101
|
+
let t = R;
|
|
102
|
+
if ((j.navigation ?? []).some((e) => (e.area || E) === t)) return;
|
|
103
|
+
let n = (j.navigation ?? [])[0]?.area || E;
|
|
104
|
+
n !== t && z(n);
|
|
97
105
|
}, [
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
]),
|
|
102
|
-
|
|
103
|
-
}, [
|
|
106
|
+
j,
|
|
107
|
+
A.pathname,
|
|
108
|
+
R
|
|
109
|
+
]), b(() => {
|
|
110
|
+
W(!1), G(!1);
|
|
111
|
+
}, [A.pathname, A.search]), b(() => {
|
|
104
112
|
let e = (e) => {
|
|
105
113
|
let t = document.activeElement, n = !!t && (t.tagName === "INPUT" || t.tagName === "TEXTAREA" || t.isContentEditable), r = e.metaKey || e.ctrlKey;
|
|
106
|
-
r && e.key.toLowerCase() === "k" ? (e.preventDefault(),
|
|
114
|
+
r && e.key.toLowerCase() === "k" ? (e.preventDefault(), Z("default")) : r && e.key.toLowerCase() === "t" ? (e.preventDefault(), Z("new")) : r && e.key.toLowerCase() === "b" ? (e.preventDefault(), P("sidebar", M === "collapsed" ? "wide" : "collapsed")) : r && e.key.toLowerCase() === "w" ? (e.preventDefault(), $("current")) : r && e.key === "/" ? (e.preventDefault(), Y && H((e) => !e)) : e.key === "/" && !n ? (e.preventDefault(), Z("default")) : e.key === "Escape" && B(!1);
|
|
107
115
|
};
|
|
108
116
|
return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
|
|
109
117
|
}, [
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
118
|
+
Z,
|
|
119
|
+
$,
|
|
120
|
+
P,
|
|
121
|
+
M,
|
|
122
|
+
Y
|
|
115
123
|
]);
|
|
116
|
-
let
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
124
|
+
let vt = ke(() => j ? Le(o, j.navigation, j.screens, A.pathname, L, k) : [], [
|
|
125
|
+
o,
|
|
126
|
+
j,
|
|
127
|
+
A.pathname,
|
|
128
|
+
L,
|
|
129
|
+
k
|
|
122
130
|
]);
|
|
123
|
-
if (
|
|
131
|
+
if (g) return /* @__PURE__ */ w("div", {
|
|
124
132
|
style: {
|
|
125
133
|
display: "flex",
|
|
126
134
|
height: "var(--app-height)",
|
|
@@ -129,94 +137,94 @@ function E() {
|
|
|
129
137
|
background: "var(--background)",
|
|
130
138
|
color: "var(--text-3)"
|
|
131
139
|
},
|
|
132
|
-
children:
|
|
140
|
+
children: o("shell.loading", "Loading…")
|
|
133
141
|
});
|
|
134
|
-
if (!
|
|
135
|
-
let
|
|
136
|
-
|
|
137
|
-
let t =
|
|
138
|
-
t &&
|
|
139
|
-
},
|
|
142
|
+
if (!s) return null;
|
|
143
|
+
let yt = (e) => {
|
|
144
|
+
z(e);
|
|
145
|
+
let t = j ? oe(j, e) ?? void 0 : void 0;
|
|
146
|
+
t && k(t);
|
|
147
|
+
}, bt = (e) => {
|
|
140
148
|
switch (e.type) {
|
|
141
149
|
case "nav":
|
|
142
|
-
e.route &&
|
|
150
|
+
e.route && k(e.route);
|
|
143
151
|
break;
|
|
144
152
|
case "new":
|
|
145
|
-
e.route &&
|
|
153
|
+
e.route && k(e.route + "/new");
|
|
146
154
|
break;
|
|
147
155
|
case "open":
|
|
148
|
-
e.route &&
|
|
156
|
+
e.route && k(e.route);
|
|
149
157
|
break;
|
|
150
158
|
case "ai":
|
|
151
|
-
|
|
159
|
+
Y && (U(e.q), H(!0));
|
|
152
160
|
break;
|
|
153
161
|
case "ai-panel":
|
|
154
|
-
|
|
162
|
+
Y && (U(void 0), H(!0));
|
|
155
163
|
break;
|
|
156
164
|
case "theme":
|
|
157
|
-
|
|
165
|
+
P("colorScheme", Be === "dark" ? "light" : "dark");
|
|
158
166
|
break;
|
|
159
|
-
case "tab-close": e.tabCloseScope &&
|
|
167
|
+
case "tab-close": e.tabCloseScope && $(e.tabCloseScope);
|
|
160
168
|
}
|
|
161
169
|
};
|
|
162
|
-
return
|
|
163
|
-
/* @__PURE__ */
|
|
164
|
-
/* @__PURE__ */
|
|
165
|
-
/* @__PURE__ */
|
|
166
|
-
/* @__PURE__ */
|
|
167
|
-
/* @__PURE__ */
|
|
168
|
-
/* @__PURE__ */
|
|
170
|
+
return C.enabled ? /* @__PURE__ */ T(be, { children: [
|
|
171
|
+
/* @__PURE__ */ w(re, {}),
|
|
172
|
+
/* @__PURE__ */ w(te, {}),
|
|
173
|
+
/* @__PURE__ */ w(ie, {}),
|
|
174
|
+
/* @__PURE__ */ w(ee, {}),
|
|
175
|
+
/* @__PURE__ */ w(h, {}),
|
|
176
|
+
/* @__PURE__ */ w("div", {
|
|
169
177
|
id: "app-embed",
|
|
170
178
|
className: "flex min-h-0 flex-col overflow-auto",
|
|
171
179
|
style: { height: "var(--app-height)" },
|
|
172
|
-
children: /* @__PURE__ */
|
|
180
|
+
children: /* @__PURE__ */ w(Ae, {})
|
|
173
181
|
})
|
|
174
|
-
] }) : /* @__PURE__ */
|
|
182
|
+
] }) : /* @__PURE__ */ w(be, { children: /* @__PURE__ */ T("div", {
|
|
175
183
|
id: "app",
|
|
176
|
-
"data-sidebar":
|
|
177
|
-
"data-mobile-shell":
|
|
178
|
-
style:
|
|
179
|
-
mobileShell:
|
|
180
|
-
showBanner:
|
|
181
|
-
showTopbar:
|
|
182
|
-
showRail:
|
|
183
|
-
showSidebar:
|
|
184
|
-
sidebarMode:
|
|
185
|
-
showAssistant:
|
|
184
|
+
"data-sidebar": M,
|
|
185
|
+
"data-mobile-shell": X ? "true" : void 0,
|
|
186
|
+
style: Pe({
|
|
187
|
+
mobileShell: X,
|
|
188
|
+
showBanner: _t,
|
|
189
|
+
showTopbar: rt,
|
|
190
|
+
showRail: it,
|
|
191
|
+
showSidebar: at,
|
|
192
|
+
sidebarMode: M,
|
|
193
|
+
showAssistant: lt
|
|
186
194
|
}),
|
|
187
195
|
children: [
|
|
188
|
-
|
|
189
|
-
/* @__PURE__ */
|
|
190
|
-
|
|
191
|
-
breadcrumbs:
|
|
196
|
+
_t && /* @__PURE__ */ w(pe, {}),
|
|
197
|
+
/* @__PURE__ */ w(me, {}),
|
|
198
|
+
rt && /* @__PURE__ */ w(ue, {
|
|
199
|
+
breadcrumbs: vt,
|
|
192
200
|
onCrumbClick: (e) => e.onClick && e.onClick(),
|
|
193
|
-
showNavButton:
|
|
194
|
-
navButtonRef:
|
|
195
|
-
onOpenNav: () =>
|
|
196
|
-
showTabsButton:
|
|
197
|
-
tabsButtonRef:
|
|
198
|
-
onOpenTabs: () =>
|
|
199
|
-
mobileTabCount:
|
|
200
|
-
onCmdK: () =>
|
|
201
|
-
onToggleAI: () =>
|
|
202
|
-
aiOpen:
|
|
203
|
-
onOpenProfile: () =>
|
|
204
|
-
onOpenPrefs: () =>
|
|
205
|
-
showTenantSwitcher:
|
|
206
|
-
showBreadcrumbs:
|
|
207
|
-
showThemeToggle:
|
|
201
|
+
showNavButton: st,
|
|
202
|
+
navButtonRef: Qe,
|
|
203
|
+
onOpenNav: () => W(!0),
|
|
204
|
+
showTabsButton: ct,
|
|
205
|
+
tabsButtonRef: $e,
|
|
206
|
+
onOpenTabs: () => G(!0),
|
|
207
|
+
mobileTabCount: L.length,
|
|
208
|
+
onCmdK: () => Z("default"),
|
|
209
|
+
onToggleAI: () => Y && H((e) => !e),
|
|
210
|
+
aiOpen: V,
|
|
211
|
+
onOpenProfile: () => k("/profile"),
|
|
212
|
+
onOpenPrefs: () => k("/preferences"),
|
|
213
|
+
showTenantSwitcher: ut,
|
|
214
|
+
showBreadcrumbs: dt,
|
|
215
|
+
showThemeToggle: ft
|
|
208
216
|
}),
|
|
209
|
-
|
|
210
|
-
activeArea:
|
|
211
|
-
onPick:
|
|
212
|
-
onToggleAI: () =>
|
|
213
|
-
aiOpen:
|
|
214
|
-
onCmdK: () =>
|
|
215
|
-
areas:
|
|
216
|
-
branding:
|
|
217
|
+
it && /* @__PURE__ */ w(f, {
|
|
218
|
+
activeArea: R,
|
|
219
|
+
onPick: yt,
|
|
220
|
+
onToggleAI: () => Y && H((e) => !e),
|
|
221
|
+
aiOpen: V,
|
|
222
|
+
onCmdK: () => Z("default"),
|
|
223
|
+
areas: j?.areas,
|
|
224
|
+
branding: tt
|
|
217
225
|
}),
|
|
218
|
-
|
|
219
|
-
/* @__PURE__ */
|
|
226
|
+
at && /* @__PURE__ */ w(ce, { activeArea: R }),
|
|
227
|
+
/* @__PURE__ */ T("main", {
|
|
220
228
|
style: {
|
|
221
229
|
gridArea: "main",
|
|
222
230
|
overflow: "hidden",
|
|
@@ -225,11 +233,11 @@ function E() {
|
|
|
225
233
|
minWidth: 0
|
|
226
234
|
},
|
|
227
235
|
children: [
|
|
228
|
-
|
|
229
|
-
onNew: () =>
|
|
230
|
-
onCloseRequest:
|
|
236
|
+
ot && ze === "top" && /* @__PURE__ */ w(de, {
|
|
237
|
+
onNew: () => Z("new"),
|
|
238
|
+
onCloseRequest: $
|
|
231
239
|
}),
|
|
232
|
-
/* @__PURE__ */
|
|
240
|
+
/* @__PURE__ */ w("div", {
|
|
233
241
|
style: {
|
|
234
242
|
flex: 1,
|
|
235
243
|
overflow: "auto",
|
|
@@ -237,74 +245,74 @@ function E() {
|
|
|
237
245
|
display: "flex",
|
|
238
246
|
flexDirection: "column"
|
|
239
247
|
},
|
|
240
|
-
children: /* @__PURE__ */
|
|
248
|
+
children: /* @__PURE__ */ w(Ae, {})
|
|
241
249
|
}),
|
|
242
|
-
|
|
243
|
-
onNew: () =>
|
|
244
|
-
onCloseRequest:
|
|
250
|
+
ot && ze === "bottom" && /* @__PURE__ */ w(de, {
|
|
251
|
+
onNew: () => Z("new"),
|
|
252
|
+
onCloseRequest: $
|
|
245
253
|
})
|
|
246
254
|
]
|
|
247
255
|
}),
|
|
248
|
-
|
|
249
|
-
open:
|
|
250
|
-
mode:
|
|
251
|
-
onClose: () =>
|
|
252
|
-
onAction: (e) =>
|
|
253
|
-
schema:
|
|
254
|
-
includeAI:
|
|
255
|
-
aiName:
|
|
256
|
+
J && /* @__PURE__ */ w(_e, {
|
|
257
|
+
open: Ke,
|
|
258
|
+
mode: qe,
|
|
259
|
+
onClose: () => B(!1),
|
|
260
|
+
onAction: (e) => bt(e),
|
|
261
|
+
schema: j,
|
|
262
|
+
includeAI: et,
|
|
263
|
+
aiName: nt
|
|
256
264
|
}),
|
|
257
|
-
/* @__PURE__ */
|
|
258
|
-
|
|
259
|
-
open:
|
|
260
|
-
docked:
|
|
265
|
+
/* @__PURE__ */ w(we, {}),
|
|
266
|
+
Y && V && /* @__PURE__ */ w(ve, {
|
|
267
|
+
open: V,
|
|
268
|
+
docked: lt,
|
|
261
269
|
onClose: () => {
|
|
262
|
-
|
|
270
|
+
H(!1), U(void 0);
|
|
263
271
|
},
|
|
264
|
-
title:
|
|
265
|
-
askOnOpen:
|
|
266
|
-
context:
|
|
272
|
+
title: nt,
|
|
273
|
+
askOnOpen: Ye,
|
|
274
|
+
context: gt ?? void 0
|
|
267
275
|
}),
|
|
268
|
-
|
|
269
|
-
open: Ye,
|
|
270
|
-
activeArea: I,
|
|
271
|
-
schema: A,
|
|
272
|
-
returnFocusRef: Ze,
|
|
273
|
-
onClose: () => H(!1),
|
|
274
|
-
onNavigate: O
|
|
275
|
-
}),
|
|
276
|
-
ot && /* @__PURE__ */ C(Ne, {
|
|
276
|
+
st && /* @__PURE__ */ w(Fe, {
|
|
277
277
|
open: Xe,
|
|
278
|
-
|
|
279
|
-
|
|
278
|
+
activeArea: R,
|
|
279
|
+
schema: j,
|
|
280
280
|
returnFocusRef: Qe,
|
|
281
|
-
onClose: () =>
|
|
281
|
+
onClose: () => W(!1),
|
|
282
|
+
onNavigate: k
|
|
283
|
+
}),
|
|
284
|
+
ct && /* @__PURE__ */ w(Ie, {
|
|
285
|
+
open: Ze,
|
|
286
|
+
tabs: L,
|
|
287
|
+
activeTabId: Ue,
|
|
288
|
+
returnFocusRef: $e,
|
|
289
|
+
onClose: () => G(!1),
|
|
282
290
|
onSwitch: (e) => {
|
|
283
|
-
|
|
291
|
+
Ge(e.id), D({
|
|
284
292
|
pathname: e.pathname,
|
|
285
293
|
search: e.search
|
|
286
|
-
}, { replace: !1 }),
|
|
294
|
+
}, { replace: !1 }), G(!1);
|
|
287
295
|
},
|
|
288
|
-
onCloseTab: (e) =>
|
|
296
|
+
onCloseTab: (e) => $("current", e)
|
|
289
297
|
}),
|
|
290
|
-
/* @__PURE__ */
|
|
291
|
-
pending:
|
|
292
|
-
onCancel:
|
|
293
|
-
onCloseClean:
|
|
294
|
-
onDiscardAll:
|
|
298
|
+
/* @__PURE__ */ w(fe, {
|
|
299
|
+
pending: K,
|
|
300
|
+
onCancel: pt,
|
|
301
|
+
onCloseClean: mt,
|
|
302
|
+
onDiscardAll: ht
|
|
295
303
|
})
|
|
296
304
|
]
|
|
297
305
|
}) });
|
|
298
306
|
}
|
|
299
|
-
function
|
|
300
|
-
return
|
|
307
|
+
function Ne(e) {
|
|
308
|
+
return b(() => {
|
|
301
309
|
let t = document.documentElement.style;
|
|
302
310
|
return t.setProperty("--assistant-open-w", e ? "var(--assistant-w)" : "0px"), () => {
|
|
303
311
|
t.removeProperty("--assistant-open-w");
|
|
304
312
|
};
|
|
305
313
|
}, [e]), e;
|
|
306
314
|
}
|
|
307
|
-
function
|
|
315
|
+
function Pe({ mobileShell: e, showBanner: t, showTopbar: n, showRail: r, showSidebar: i, sidebarMode: a, showAssistant: o }) {
|
|
308
316
|
let s = [
|
|
309
317
|
...t ? ["auto"] : [],
|
|
310
318
|
...n ? ["var(--topbar-h)"] : [],
|
|
@@ -335,7 +343,7 @@ function je({ mobileShell: e, showBanner: t, showTopbar: n, showRail: r, showSid
|
|
|
335
343
|
overflow: "hidden"
|
|
336
344
|
};
|
|
337
345
|
}
|
|
338
|
-
var
|
|
346
|
+
var O = [
|
|
339
347
|
"a[href]",
|
|
340
348
|
"button:not([disabled])",
|
|
341
349
|
"input:not([disabled])",
|
|
@@ -343,14 +351,14 @@ var D = [
|
|
|
343
351
|
"textarea:not([disabled])",
|
|
344
352
|
"[tabindex]:not([tabindex='-1'])"
|
|
345
353
|
].join(",");
|
|
346
|
-
function O(e) {
|
|
347
|
-
return e ? Array.from(e.querySelectorAll(D)).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-hidden") !== "true") : [];
|
|
348
|
-
}
|
|
349
354
|
function k(e) {
|
|
350
|
-
O(e)[
|
|
355
|
+
return e ? Array.from(e.querySelectorAll(O)).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-hidden") !== "true") : [];
|
|
356
|
+
}
|
|
357
|
+
function A(e) {
|
|
358
|
+
k(e)[0]?.focus();
|
|
351
359
|
}
|
|
352
|
-
function
|
|
353
|
-
let n =
|
|
360
|
+
function j(e, t) {
|
|
361
|
+
let n = k(e);
|
|
354
362
|
if (n.length === 0) {
|
|
355
363
|
t.preventDefault();
|
|
356
364
|
return;
|
|
@@ -358,42 +366,42 @@ function A(e, t) {
|
|
|
358
366
|
let r = n[0], i = n[n.length - 1], a = document.activeElement;
|
|
359
367
|
t.shiftKey && a === r ? (t.preventDefault(), i.focus()) : !t.shiftKey && a === i && (t.preventDefault(), r.focus());
|
|
360
368
|
}
|
|
361
|
-
function
|
|
362
|
-
let l =
|
|
363
|
-
if (
|
|
369
|
+
function Fe({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: i, onNavigate: a }) {
|
|
370
|
+
let l = c(), [u, d] = S(t), f = x(null);
|
|
371
|
+
if (b(() => {
|
|
364
372
|
e && d(t);
|
|
365
|
-
}, [e, t]),
|
|
373
|
+
}, [e, t]), b(() => {
|
|
366
374
|
if (!e) return;
|
|
367
375
|
let t = document.activeElement instanceof HTMLElement ? document.activeElement : null, n = r.current;
|
|
368
|
-
requestAnimationFrame(() =>
|
|
369
|
-
let
|
|
370
|
-
e.key === "Escape" ? (e.preventDefault(),
|
|
376
|
+
requestAnimationFrame(() => A(f.current));
|
|
377
|
+
let a = (e) => {
|
|
378
|
+
e.key === "Escape" ? (e.preventDefault(), i()) : e.key === "Tab" && j(f.current, e);
|
|
371
379
|
};
|
|
372
|
-
return window.addEventListener("keydown",
|
|
373
|
-
window.removeEventListener("keydown",
|
|
380
|
+
return window.addEventListener("keydown", a), () => {
|
|
381
|
+
window.removeEventListener("keydown", a), (n ?? t)?.focus();
|
|
374
382
|
};
|
|
375
383
|
}, [
|
|
376
384
|
e,
|
|
377
|
-
|
|
385
|
+
i,
|
|
378
386
|
r
|
|
379
387
|
]), !e || !n) return null;
|
|
380
|
-
let p = Array.from(new Set((n.navigation ?? []).map((e) => e.area ||
|
|
381
|
-
p.length === 0 && p.push(
|
|
382
|
-
let
|
|
388
|
+
let p = Array.from(new Set((n.navigation ?? []).map((e) => e.area || E)));
|
|
389
|
+
p.length === 0 && p.push(E);
|
|
390
|
+
let m = (e) => {
|
|
383
391
|
let t = n.areas?.find((t) => t.code === e);
|
|
384
|
-
return l(t?.name) || (e ===
|
|
385
|
-
},
|
|
386
|
-
let r = e.screen ? n.screens[e.screen] : void 0,
|
|
387
|
-
return /* @__PURE__ */
|
|
392
|
+
return l(t?.name) || (e === E ? l("shell.nav.title", "Navigation") : e);
|
|
393
|
+
}, h = (e, t) => {
|
|
394
|
+
let r = e.screen ? n.screens[e.screen] : void 0, o = [...e.items ?? [], ...e.children ?? []], s = l(e.name) || (r ? l(r.display?.name) : "");
|
|
395
|
+
return /* @__PURE__ */ T("div", {
|
|
388
396
|
style: {
|
|
389
397
|
display: "flex",
|
|
390
398
|
flexDirection: "column",
|
|
391
399
|
gap: 2
|
|
392
400
|
},
|
|
393
|
-
children: [r?.route ? /* @__PURE__ */
|
|
401
|
+
children: [r?.route ? /* @__PURE__ */ T("button", {
|
|
394
402
|
type: "button",
|
|
395
403
|
onClick: () => {
|
|
396
|
-
|
|
404
|
+
a(r.route), i();
|
|
397
405
|
},
|
|
398
406
|
style: {
|
|
399
407
|
minHeight: 40,
|
|
@@ -409,16 +417,16 @@ function Me({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: s,
|
|
|
409
417
|
textAlign: "left",
|
|
410
418
|
cursor: "pointer"
|
|
411
419
|
},
|
|
412
|
-
children: [/* @__PURE__ */
|
|
420
|
+
children: [/* @__PURE__ */ w("span", { style: { width: 12 } }), /* @__PURE__ */ w("span", {
|
|
413
421
|
style: {
|
|
414
422
|
minWidth: 0,
|
|
415
423
|
overflow: "hidden",
|
|
416
424
|
textOverflow: "ellipsis",
|
|
417
425
|
whiteSpace: "nowrap"
|
|
418
426
|
},
|
|
419
|
-
children:
|
|
427
|
+
children: s || r.route
|
|
420
428
|
})]
|
|
421
|
-
}) :
|
|
429
|
+
}) : s ? /* @__PURE__ */ w("div", {
|
|
422
430
|
style: {
|
|
423
431
|
padding: `7px 10px 5px ${10 + t * 14}px`,
|
|
424
432
|
color: "var(--text-3)",
|
|
@@ -427,20 +435,20 @@ function Me({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: s,
|
|
|
427
435
|
letterSpacing: "0.08em",
|
|
428
436
|
textTransform: "uppercase"
|
|
429
437
|
},
|
|
430
|
-
children:
|
|
431
|
-
}) : null,
|
|
432
|
-
}, `${t}-${e.screen ??
|
|
438
|
+
children: s
|
|
439
|
+
}) : null, o.map((e) => h(e, t + 1))]
|
|
440
|
+
}, `${t}-${e.screen ?? s}`);
|
|
433
441
|
};
|
|
434
|
-
return /* @__PURE__ */
|
|
442
|
+
return /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
435
443
|
"data-testid": "mobile-nav-backdrop",
|
|
436
|
-
onClick:
|
|
444
|
+
onClick: i,
|
|
437
445
|
style: {
|
|
438
446
|
position: "fixed",
|
|
439
447
|
inset: 0,
|
|
440
448
|
background: "var(--scrim-lite)",
|
|
441
449
|
zIndex: 120
|
|
442
450
|
}
|
|
443
|
-
}), /* @__PURE__ */
|
|
451
|
+
}), /* @__PURE__ */ T("aside", {
|
|
444
452
|
ref: f,
|
|
445
453
|
role: "dialog",
|
|
446
454
|
"aria-modal": "true",
|
|
@@ -464,7 +472,7 @@ function Me({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: s,
|
|
|
464
472
|
boxSizing: "border-box",
|
|
465
473
|
overflow: "hidden"
|
|
466
474
|
},
|
|
467
|
-
children: [/* @__PURE__ */
|
|
475
|
+
children: [/* @__PURE__ */ T("div", {
|
|
468
476
|
style: {
|
|
469
477
|
display: "flex",
|
|
470
478
|
alignItems: "center",
|
|
@@ -472,18 +480,18 @@ function Me({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: s,
|
|
|
472
480
|
minHeight: 36,
|
|
473
481
|
padding: "0 2px 8px"
|
|
474
482
|
},
|
|
475
|
-
children: [/* @__PURE__ */
|
|
483
|
+
children: [/* @__PURE__ */ w("strong", {
|
|
476
484
|
style: {
|
|
477
485
|
fontSize: 13,
|
|
478
486
|
flex: 1
|
|
479
487
|
},
|
|
480
488
|
children: l("shell.nav.title", "Navigation")
|
|
481
|
-
}), /* @__PURE__ */
|
|
482
|
-
icon: /* @__PURE__ */
|
|
489
|
+
}), /* @__PURE__ */ w(s, {
|
|
490
|
+
icon: /* @__PURE__ */ w(o.x, { size: 15 }),
|
|
483
491
|
title: l("shell.nav.close", "Close navigation"),
|
|
484
|
-
onClick:
|
|
492
|
+
onClick: i
|
|
485
493
|
})]
|
|
486
|
-
}), /* @__PURE__ */
|
|
494
|
+
}), /* @__PURE__ */ w("nav", {
|
|
487
495
|
style: {
|
|
488
496
|
overflowY: "auto",
|
|
489
497
|
overscrollBehavior: "contain",
|
|
@@ -492,8 +500,8 @@ function Me({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: s,
|
|
|
492
500
|
gap: 6
|
|
493
501
|
},
|
|
494
502
|
children: p.map((e) => {
|
|
495
|
-
let r = u === e,
|
|
496
|
-
return /* @__PURE__ */
|
|
503
|
+
let r = u === e, i = g(l, n.navigation ?? [], e);
|
|
504
|
+
return /* @__PURE__ */ T("section", { children: [/* @__PURE__ */ T("button", {
|
|
497
505
|
type: "button",
|
|
498
506
|
onClick: () => d(r ? "" : e),
|
|
499
507
|
style: {
|
|
@@ -512,16 +520,16 @@ function Me({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: s,
|
|
|
512
520
|
cursor: "pointer"
|
|
513
521
|
},
|
|
514
522
|
"aria-expanded": r,
|
|
515
|
-
children: [/* @__PURE__ */
|
|
523
|
+
children: [/* @__PURE__ */ w("span", {
|
|
516
524
|
style: {
|
|
517
525
|
flex: 1,
|
|
518
526
|
textAlign: "left"
|
|
519
527
|
},
|
|
520
|
-
children:
|
|
521
|
-
}),
|
|
522
|
-
}), r && /* @__PURE__ */
|
|
528
|
+
children: m(e)
|
|
529
|
+
}), w(r ? o.down : o.right, { size: 13 })]
|
|
530
|
+
}), r && /* @__PURE__ */ w("div", {
|
|
523
531
|
style: { padding: "6px 0 4px" },
|
|
524
|
-
children:
|
|
532
|
+
children: i.flatMap((t) => [t.title ? /* @__PURE__ */ w("div", {
|
|
525
533
|
style: {
|
|
526
534
|
padding: "8px 10px 4px",
|
|
527
535
|
color: "var(--text-3)",
|
|
@@ -531,38 +539,38 @@ function Me({ open: e, activeArea: t, schema: n, returnFocusRef: r, onClose: s,
|
|
|
531
539
|
textTransform: "uppercase"
|
|
532
540
|
},
|
|
533
541
|
children: t.title
|
|
534
|
-
}, `${e}-${t.title}`) : null, ...t.items.map((e) =>
|
|
542
|
+
}, `${e}-${t.title}`) : null, ...t.items.map((e) => h(e, 0))])
|
|
535
543
|
})] }, e);
|
|
536
544
|
})
|
|
537
545
|
})]
|
|
538
546
|
})] });
|
|
539
547
|
}
|
|
540
|
-
function
|
|
541
|
-
let u =
|
|
542
|
-
return
|
|
548
|
+
function Ie({ open: e, tabs: t, activeTabId: n, returnFocusRef: r, onClose: i, onSwitch: a, onCloseTab: l }) {
|
|
549
|
+
let u = c(), d = v(), f = x(null);
|
|
550
|
+
return b(() => {
|
|
543
551
|
if (!e) return;
|
|
544
552
|
let t = document.activeElement instanceof HTMLElement ? document.activeElement : null, n = r.current;
|
|
545
|
-
requestAnimationFrame(() =>
|
|
546
|
-
let
|
|
547
|
-
e.key === "Escape" ? (e.preventDefault(),
|
|
553
|
+
requestAnimationFrame(() => A(f.current));
|
|
554
|
+
let a = (e) => {
|
|
555
|
+
e.key === "Escape" ? (e.preventDefault(), i()) : e.key === "Tab" && j(f.current, e);
|
|
548
556
|
};
|
|
549
|
-
return window.addEventListener("keydown",
|
|
550
|
-
window.removeEventListener("keydown",
|
|
557
|
+
return window.addEventListener("keydown", a), () => {
|
|
558
|
+
window.removeEventListener("keydown", a), (n ?? t)?.focus();
|
|
551
559
|
};
|
|
552
560
|
}, [
|
|
553
561
|
e,
|
|
554
|
-
|
|
562
|
+
i,
|
|
555
563
|
r
|
|
556
|
-
]), e ? /* @__PURE__ */
|
|
564
|
+
]), e ? /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
|
|
557
565
|
"data-testid": "mobile-tabs-backdrop",
|
|
558
|
-
onClick:
|
|
566
|
+
onClick: i,
|
|
559
567
|
style: {
|
|
560
568
|
position: "fixed",
|
|
561
569
|
inset: 0,
|
|
562
570
|
background: "var(--scrim-lite)",
|
|
563
571
|
zIndex: 122
|
|
564
572
|
}
|
|
565
|
-
}), /* @__PURE__ */
|
|
573
|
+
}), /* @__PURE__ */ T("section", {
|
|
566
574
|
ref: f,
|
|
567
575
|
role: "dialog",
|
|
568
576
|
"aria-modal": "true",
|
|
@@ -585,32 +593,32 @@ function Ne({ open: e, tabs: t, activeTabId: n, returnFocusRef: r, onClose: s, o
|
|
|
585
593
|
padding: 6,
|
|
586
594
|
boxSizing: "border-box"
|
|
587
595
|
},
|
|
588
|
-
children: [/* @__PURE__ */
|
|
596
|
+
children: [/* @__PURE__ */ T("div", {
|
|
589
597
|
style: {
|
|
590
598
|
display: "flex",
|
|
591
599
|
alignItems: "center",
|
|
592
600
|
gap: 8,
|
|
593
601
|
padding: "4px 4px 8px"
|
|
594
602
|
},
|
|
595
|
-
children: [/* @__PURE__ */
|
|
603
|
+
children: [/* @__PURE__ */ w("strong", {
|
|
596
604
|
style: {
|
|
597
605
|
flex: 1,
|
|
598
606
|
fontSize: 13
|
|
599
607
|
},
|
|
600
608
|
children: u("shell.tabs.open_tabs", "Open tabs")
|
|
601
|
-
}), /* @__PURE__ */
|
|
602
|
-
icon: /* @__PURE__ */
|
|
609
|
+
}), /* @__PURE__ */ w(s, {
|
|
610
|
+
icon: /* @__PURE__ */ w(o.x, { size: 14 }),
|
|
603
611
|
title: u("shell.tabs.close_menu", "Close tabs menu"),
|
|
604
|
-
onClick:
|
|
612
|
+
onClick: i
|
|
605
613
|
})]
|
|
606
|
-
}), t.length === 0 ? /* @__PURE__ */
|
|
614
|
+
}), t.length === 0 ? /* @__PURE__ */ w("div", {
|
|
607
615
|
style: {
|
|
608
616
|
padding: 10,
|
|
609
617
|
color: "var(--text-3)",
|
|
610
618
|
fontSize: 12
|
|
611
619
|
},
|
|
612
620
|
children: u("shell.tabs.none_open", "No open tabs")
|
|
613
|
-
}) : t.map((e) => /* @__PURE__ */
|
|
621
|
+
}) : t.map((e) => /* @__PURE__ */ T("div", {
|
|
614
622
|
style: {
|
|
615
623
|
display: "grid",
|
|
616
624
|
gridTemplateColumns: "minmax(0, 1fr) auto",
|
|
@@ -619,9 +627,9 @@ function Ne({ open: e, tabs: t, activeTabId: n, returnFocusRef: r, onClose: s, o
|
|
|
619
627
|
borderRadius: "var(--radius-md)",
|
|
620
628
|
background: e.id === n ? "var(--surface-3)" : "transparent"
|
|
621
629
|
},
|
|
622
|
-
children: [/* @__PURE__ */
|
|
630
|
+
children: [/* @__PURE__ */ T("button", {
|
|
623
631
|
type: "button",
|
|
624
|
-
onClick: () =>
|
|
632
|
+
onClick: () => a(e),
|
|
625
633
|
style: {
|
|
626
634
|
minHeight: 38,
|
|
627
635
|
border: 0,
|
|
@@ -635,7 +643,7 @@ function Ne({ open: e, tabs: t, activeTabId: n, returnFocusRef: r, onClose: s, o
|
|
|
635
643
|
textAlign: "left",
|
|
636
644
|
cursor: "pointer"
|
|
637
645
|
},
|
|
638
|
-
children: [/* @__PURE__ */
|
|
646
|
+
children: [/* @__PURE__ */ w(o.layers, { size: 13 }), /* @__PURE__ */ w("span", {
|
|
639
647
|
style: {
|
|
640
648
|
overflow: "hidden",
|
|
641
649
|
textOverflow: "ellipsis",
|
|
@@ -643,114 +651,51 @@ function Ne({ open: e, tabs: t, activeTabId: n, returnFocusRef: r, onClose: s, o
|
|
|
643
651
|
},
|
|
644
652
|
children: d(e)
|
|
645
653
|
})]
|
|
646
|
-
}), e.closable && /* @__PURE__ */
|
|
647
|
-
icon: /* @__PURE__ */
|
|
654
|
+
}), e.closable && /* @__PURE__ */ w(s, {
|
|
655
|
+
icon: /* @__PURE__ */ w(o.x, { size: 12 }),
|
|
648
656
|
title: u("shell.tabs.close_named", "Close {title}", { title: d(e) }),
|
|
649
657
|
onClick: () => l(e.id)
|
|
650
658
|
})]
|
|
651
659
|
}, e.id))]
|
|
652
660
|
})] }) : null;
|
|
653
661
|
}
|
|
654
|
-
function
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
if (n?.home_screen) {
|
|
658
|
-
let e = t.screens[n.home_screen];
|
|
659
|
-
if (e?.route) return e.route;
|
|
660
|
-
}
|
|
661
|
-
let r = (e) => {
|
|
662
|
-
if (e.screen) {
|
|
663
|
-
let n = t.screens[e.screen];
|
|
664
|
-
if (n?.route) return n.route;
|
|
665
|
-
}
|
|
666
|
-
for (let t of e.items || []) {
|
|
667
|
-
let e = r(t);
|
|
668
|
-
if (e) return e;
|
|
669
|
-
}
|
|
670
|
-
for (let t of e.children || []) {
|
|
671
|
-
let e = r(t);
|
|
672
|
-
if (e) return e;
|
|
673
|
-
}
|
|
674
|
-
};
|
|
675
|
-
for (let n of t.navigation ?? []) {
|
|
676
|
-
if ((n.area || T) !== e) continue;
|
|
677
|
-
let t = r(n);
|
|
678
|
-
if (t) return t;
|
|
679
|
-
}
|
|
680
|
-
}
|
|
681
|
-
function Fe(e, t, n) {
|
|
682
|
-
let r = (e) => {
|
|
683
|
-
if (!e.screen) return !1;
|
|
684
|
-
let r = t[e.screen];
|
|
685
|
-
return !!r && (r.route === n || n.startsWith(r.route + "/"));
|
|
686
|
-
}, i = (e, t) => {
|
|
687
|
-
if (r(e)) return t;
|
|
688
|
-
for (let n of e.items || []) {
|
|
689
|
-
let e = i(n, t);
|
|
690
|
-
if (e) return e;
|
|
691
|
-
}
|
|
692
|
-
for (let n of e.children || []) {
|
|
693
|
-
let e = i(n, t);
|
|
694
|
-
if (e) return e;
|
|
695
|
-
}
|
|
696
|
-
};
|
|
697
|
-
for (let t of e ?? []) {
|
|
698
|
-
let e = i(t, t.area || T);
|
|
699
|
-
if (e) return e;
|
|
700
|
-
}
|
|
701
|
-
}
|
|
702
|
-
function Ie(e, t, n, r, i, a) {
|
|
703
|
-
let o = (e, t) => {
|
|
704
|
-
if (e.screen) {
|
|
705
|
-
let i = n[e.screen];
|
|
706
|
-
if (i && (i.route === r || r.startsWith(i.route + "/"))) return [...t, e];
|
|
707
|
-
}
|
|
708
|
-
for (let n of e.items || []) {
|
|
709
|
-
let r = o(n, [...t, e]);
|
|
710
|
-
if (r) return r;
|
|
711
|
-
}
|
|
712
|
-
for (let n of e.children || []) {
|
|
713
|
-
let r = o(n, [...t, e]);
|
|
714
|
-
if (r) return r;
|
|
715
|
-
}
|
|
716
|
-
return null;
|
|
717
|
-
}, s = null;
|
|
718
|
-
for (let e of t ?? []) if (s = o(e, []), s) break;
|
|
719
|
-
if (!s || s.length === 0) {
|
|
662
|
+
function Le(e, t, n, r, i, a) {
|
|
663
|
+
let o = se(t, n, r)?.chain;
|
|
664
|
+
if (!o || o.length === 0) {
|
|
720
665
|
let t = Object.values(n).find((e) => e.route === r);
|
|
721
666
|
if (t?.display?.name) return [{
|
|
722
667
|
label: e(t.display.name),
|
|
723
668
|
icon: t.display.icon,
|
|
724
669
|
isLast: !0
|
|
725
670
|
}];
|
|
726
|
-
let i =
|
|
671
|
+
let i = _(e, r);
|
|
727
672
|
return i ? [{
|
|
728
673
|
label: i,
|
|
729
674
|
isLast: !0
|
|
730
675
|
}] : [];
|
|
731
676
|
}
|
|
732
|
-
let
|
|
733
|
-
for (let t = 0; t <
|
|
734
|
-
let i =
|
|
735
|
-
|
|
677
|
+
let s = [];
|
|
678
|
+
for (let t = 0; t < o.length; t++) {
|
|
679
|
+
let i = o[t], c = t === o.length - 1, l = i.screen ? n[i.screen] : void 0;
|
|
680
|
+
s.push({
|
|
736
681
|
label: e(i.name) || i.screen || "",
|
|
737
682
|
icon: i.icon,
|
|
738
683
|
onClick: l ? () => {
|
|
739
684
|
a(l.route);
|
|
740
685
|
} : void 0,
|
|
741
|
-
isLast:
|
|
686
|
+
isLast: c && (!l || l.route === r)
|
|
742
687
|
});
|
|
743
688
|
}
|
|
744
|
-
let
|
|
745
|
-
if (
|
|
689
|
+
let c = o[o.length - 1], l = c.screen ? n[c.screen] : void 0;
|
|
690
|
+
if (l && r !== l.route && r.startsWith(l.route + "/")) {
|
|
746
691
|
let t = i.find((e) => e.pathname === r);
|
|
747
|
-
|
|
692
|
+
s.push({
|
|
748
693
|
label: t?.title || e("shell.crumbs.record", "Record"),
|
|
749
694
|
icon: "file",
|
|
750
695
|
isLast: !0
|
|
751
696
|
});
|
|
752
697
|
}
|
|
753
|
-
return
|
|
698
|
+
return s;
|
|
754
699
|
}
|
|
755
700
|
//#endregion
|
|
756
|
-
export {
|
|
701
|
+
export { D as Layout, Le as buildCrumbs };
|