@declarion/react 0.54.0 → 0.56.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/{DraggableChildrenTable-CPoUY99R.js → DraggableChildrenTable-BV5sb8Uo.js} +32 -32
- package/dist-lib/{Grid--QAEby8k.js → Grid-DWgUPuZ3.js} +45 -45
- package/dist-lib/{JsonEditor-DoNmyrYd.js → JsonEditor-Dz1PQHC8.js} +2 -2
- package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-C9AH9cXf.js} +716 -714
- package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-DXcDg536.js} +29 -29
- package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CcSFc2N3.js} +1 -1
- package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CNtN8zSl.js} +41 -41
- package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-lskCd-WG.js} +492 -492
- package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-CrGbdzyK.js} +744 -743
- package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-Bkl9aZJ8.js} +129 -129
- package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-SYSAaqQJ.js} +1 -1
- package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-CR4ajBtT.js} +179 -179
- package/dist-lib/api/auth.d.ts +1 -1
- package/dist-lib/api/batch.d.ts +1 -1
- package/dist-lib/api/data.d.ts +3 -3
- package/dist-lib/api/entities.d.ts +1 -1
- package/dist-lib/api/events.d.ts +13 -4
- package/dist-lib/api/params.d.ts +1 -1
- package/dist-lib/api/properties.d.ts +1 -1
- package/dist-lib/api/schema.d.ts +1 -1
- package/dist-lib/api/status.d.ts +1 -1
- package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-CW5RIMko.js} +24 -24
- package/dist-lib/components/actions/ActionButton.d.ts +1 -1
- package/dist-lib/components/actions/ActionDialog.d.ts +1 -1
- package/dist-lib/components/actions/ActionRunner.d.ts +1 -1
- package/dist-lib/components/actions/ObjectActionBar.d.ts +3 -3
- package/dist-lib/components/actions/PropertyGridEditor.d.ts +2 -2
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +2 -2
- package/dist-lib/components/actions/RowActionsKebab.d.ts +1 -1
- package/dist-lib/components/agents/AgentConversationDrawer.d.ts +1 -1
- package/dist-lib/components/agents/AgentPicker.d.ts +1 -1
- package/dist-lib/components/agents/transcript-runs.d.ts +1 -1
- package/dist-lib/components/chrome/AssociationTabs.d.ts +1 -1
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +1 -1
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +2 -2
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +2 -2
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +3 -3
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/FieldsBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutColumn.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +3 -3
- package/dist-lib/components/detail-layout/LayoutRow.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutTabs.d.ts +1 -1
- package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/QuickAddForm.d.ts +2 -2
- package/dist-lib/components/detail-layout/SectionBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/StatusesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/TimelineComposer.d.ts +2 -2
- package/dist-lib/components/detail-layout/blockMeta.d.ts +1 -1
- package/dist-lib/components/detail-layout/useQuickAdd.d.ts +2 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +1 -1
- package/dist-lib/components/fields/RefCombobox.d.ts +2 -2
- package/dist-lib/components/fields/cells/factories/host-icons.d.ts +1 -1
- package/dist-lib/components/fields/cells/registry.d.ts +2 -2
- package/dist-lib/components/fields/index.d.ts +3 -3
- package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +3 -3
- package/dist-lib/components/file-widgets/payload.d.ts +2 -2
- package/dist-lib/components/file-widgets/types.d.ts +1 -1
- package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +1 -1
- package/dist-lib/components/filters/FilterChips.d.ts +1 -1
- package/dist-lib/components/filters/FilterDrawer.d.ts +3 -3
- package/dist-lib/components/layout/CommandPalette.d.ts +2 -2
- package/dist-lib/components/layout/Layout.d.ts +3 -3
- package/dist-lib/components/layout/Rail.d.ts +2 -2
- package/dist-lib/components/layout/Sidebar.d.ts +1 -1
- package/dist-lib/components/layout/TabStrip.d.ts +1 -1
- package/dist-lib/components/layout/TenantChip.d.ts +1 -1
- package/dist-lib/components/layout/TopBar.d.ts +1 -1
- package/dist-lib/components/layout/tab-close.d.ts +1 -1
- package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
- package/dist-lib/components/list/PeekFieldCell.d.ts +2 -2
- package/dist-lib/components/list/QuickPeek.d.ts +3 -3
- package/dist-lib/components/list/ViewSwitcher.d.ts +1 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
- package/dist-lib/components/pages/ExportMenu.d.ts +1 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -1
- package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
- package/dist-lib/components/pages/exportRequest.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardRow.d.ts +3 -3
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +3 -3
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +3 -3
- package/dist-lib/components/pages/list/ListHeader.d.ts +3 -3
- package/dist-lib/components/pages/list/ListNoRows.d.ts +1 -1
- package/dist-lib/components/pages/list/ListTable.d.ts +2 -2
- package/dist-lib/components/pages/list/ListTableRow.d.ts +1 -1
- package/dist-lib/components/pages/list/ListToolbar.d.ts +7 -5
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +1 -1
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -1
- package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +1 -1
- package/dist-lib/components/pages/list/cardProjection.d.ts +2 -2
- package/dist-lib/components/pages/list/columns.d.ts +3 -3
- package/dist-lib/components/pages/list/filter-meta.d.ts +2 -2
- package/dist-lib/components/pages/list/sortable-header.d.ts +1 -1
- package/dist-lib/components/pages/list/table-features.d.ts +1 -1
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +4 -4
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +1 -1
- package/dist-lib/components/pages/list/useListQuery.d.ts +4 -8
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +4 -4
- package/dist-lib/components/pages/list/useListSelection.d.ts +2 -2
- package/dist-lib/components/pages/list/useListSort.d.ts +1 -1
- package/dist-lib/components/pages/list/useListViews.d.ts +3 -3
- package/dist-lib/components/pages/list/useRowMenu.d.ts +3 -3
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +1 -1
- package/dist-lib/components/params/param-editors.d.ts +1 -1
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -1
- package/dist-lib/components/shared/MarkdownRenderer.d.ts +1 -1
- package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +2 -2
- package/dist-lib/embed/screen-location.d.ts +1 -1
- package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-D6xQYn-h.js} +271 -400
- package/dist-lib/{format-count-B5SLlNOb.js → format-count-Dobmi-Ji.js} +238 -238
- package/dist-lib/hooks/useAgentConversation.d.ts +1 -1
- package/dist-lib/hooks/useAllEntityData.d.ts +1 -1
- package/dist-lib/hooks/useAssociatedData.d.ts +1 -1
- package/dist-lib/hooks/useBranding.d.ts +4 -4
- package/dist-lib/hooks/useBrandingChrome.d.ts +2 -2
- package/dist-lib/hooks/useChildrenData.d.ts +1 -1
- package/dist-lib/hooks/useCurrentScreen.d.ts +1 -1
- package/dist-lib/hooks/useCursorEntityData.d.ts +5 -5
- package/dist-lib/hooks/useEntity.d.ts +1 -1
- package/dist-lib/hooks/useEntityData.d.ts +8 -1
- package/dist-lib/hooks/useFilters.d.ts +1 -1
- package/dist-lib/hooks/useImpersonation.d.ts +1 -1
- package/dist-lib/hooks/useLiveObject.d.ts +2 -2
- package/dist-lib/hooks/useMutations.d.ts +3 -3
- package/dist-lib/hooks/useObject.d.ts +1 -1
- package/dist-lib/hooks/useParams.d.ts +2 -2
- package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
- package/dist-lib/hooks/useResponsiveMode.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +1 -2
- package/dist-lib/hooks/useScreen.d.ts +1 -1
- package/dist-lib/hooks/useTimelineData.d.ts +2 -2
- package/dist-lib/hooks/useViews.d.ts +1 -1
- package/dist-lib/index.js +811 -811
- package/dist-lib/lib/action-dispatch.d.ts +2 -2
- package/dist-lib/lib/actions.d.ts +1 -1
- package/dist-lib/lib/brand-tokens.d.ts +1 -1
- package/dist-lib/lib/branding.d.ts +1 -1
- package/dist-lib/lib/child-config.d.ts +1 -1
- package/dist-lib/lib/children-validation.d.ts +2 -2
- package/dist-lib/lib/document-templates.d.ts +1 -1
- package/dist-lib/lib/evidence-verdict.d.ts +1 -1
- package/dist-lib/lib/mass-edit.d.ts +1 -1
- package/dist-lib/lib/messages.d.ts +2 -2
- package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
- package/dist-lib/lib/realtime-reconcile.d.ts +1 -10
- package/dist-lib/lib/realtime-resync.d.ts +23 -0
- package/dist-lib/lib/rich-text.d.ts +1 -1
- package/dist-lib/lib/schema-routing.d.ts +1 -1
- package/dist-lib/lib/screen-back.d.ts +1 -1
- package/dist-lib/lib/size-value.d.ts +1 -1
- package/dist-lib/lib/toast.d.ts +2 -2
- package/dist-lib/lib/ui-actions.d.ts +1 -1
- package/dist-lib/lib/variants.d.ts +1 -1
- package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-5wQ7lq_V.js} +17 -17
- package/dist-lib/{registry-D0RhCnEL.js → registry-CjgUaF7C.js} +511 -511
- package/dist-lib/stores/auth.d.ts +1 -1
- package/dist-lib/stores/preferences.d.ts +1 -1
- package/dist-lib/stores/realtime.d.ts +86 -19
- package/dist-lib/testing.d.ts +4 -4
- package/dist-lib/testing.js +40 -40
- package/dist-lib/types/api.d.ts +1 -1
- package/dist-lib/types/schema.d.ts +2 -2
- package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-CzwzQpoW.js} +2476 -1967
- package/dist-lib/useListQuery-D7Hr5WM1.js +96 -0
- package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CqtCzFCr.js} +25 -25
- package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-C39U85cg.js} +13 -13
- package/dist-lib/{value-CQzGOI0F.js → value-Bo8C8WMU.js} +4 -4
- package/package.json +10 -10
- package/dist-lib/useListQuery-C2nq58YV.js +0 -90
|
@@ -1,139 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { useCallback as
|
|
3
|
-
import { parsePath as
|
|
4
|
-
import { useMutation as
|
|
5
|
-
import { create as
|
|
6
|
-
//#region src/api/params.ts
|
|
7
|
-
async function ae() {
|
|
8
|
-
let e = (await _("/api/params/public")).data;
|
|
9
|
-
if (Array.isArray(e)) return { parameters: e };
|
|
10
|
-
let t = e ?? {};
|
|
11
|
-
return {
|
|
12
|
-
parameters: t.parameters ?? [],
|
|
13
|
-
accents: t.accents,
|
|
14
|
-
messages: t.messages,
|
|
15
|
-
meta: t.meta
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
async function oe(e) {
|
|
19
|
-
return (await _(`/api/params/${encodeURIComponent(e)}`)).data;
|
|
20
|
-
}
|
|
21
|
-
async function se(e) {
|
|
22
|
-
return (await _(`/api/params${e === "tenant" ? "?resolution=tenant" : ""}`)).data ?? [];
|
|
23
|
-
}
|
|
24
|
-
//#endregion
|
|
25
|
-
//#region src/hooks/useParams.ts
|
|
26
|
-
var ce = "$params";
|
|
27
|
-
function le({ carrierEntityCode: e, rowId: t, enabled: n = !0, onWritten: r }) {
|
|
28
|
-
let i = C(), [a, c] = te(null), l = S({
|
|
29
|
-
queryKey: [
|
|
30
|
-
"params-carrier-detail",
|
|
31
|
-
e,
|
|
32
|
-
t
|
|
33
|
-
],
|
|
34
|
-
queryFn: () => s(e, t),
|
|
35
|
-
enabled: n && !!t,
|
|
36
|
-
staleTime: 3e4
|
|
37
|
-
}), u = l.data?.data, d = !!u && !("$params" in u), f = b(() => Array.isArray(u?.$params) ? u[ce] : [], [u]), p = b(() => new Map(f.map((e) => [e.param_code, e])), [f]), m = v(async (n) => {
|
|
38
|
-
c(null);
|
|
39
|
-
try {
|
|
40
|
-
await o(`${e}.__update`, {
|
|
41
|
-
object_ids: [t],
|
|
42
|
-
entity: e,
|
|
43
|
-
fields: { [ce]: n }
|
|
44
|
-
}), await i.invalidateQueries({ queryKey: ["params-all"] }), await i.invalidateQueries({ queryKey: [
|
|
45
|
-
"params-carrier-detail",
|
|
46
|
-
e,
|
|
47
|
-
t
|
|
48
|
-
] }), r?.();
|
|
49
|
-
} catch (e) {
|
|
50
|
-
c(e instanceof Error ? e.message : "Failed to save parameter.");
|
|
51
|
-
}
|
|
52
|
-
}, [
|
|
53
|
-
e,
|
|
54
|
-
t,
|
|
55
|
-
i,
|
|
56
|
-
r
|
|
57
|
-
]), h = v((e, t) => {
|
|
58
|
-
let n = f.filter((t) => t.param_code !== e.code);
|
|
59
|
-
return n.push({
|
|
60
|
-
param_code: e.code,
|
|
61
|
-
value: t
|
|
62
|
-
}), m(n);
|
|
63
|
-
}, [f, m]), g = v((e) => m(f.filter((t) => t.param_code !== e.code)), [f, m]), _ = v(() => c(null), []);
|
|
64
|
-
return {
|
|
65
|
-
overrides: f,
|
|
66
|
-
overrideByCode: p,
|
|
67
|
-
missingParams: d,
|
|
68
|
-
isLoading: l.isLoading,
|
|
69
|
-
error: a,
|
|
70
|
-
clearError: _,
|
|
71
|
-
save: h,
|
|
72
|
-
reset: g
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
function ue(e) {
|
|
76
|
-
return S({
|
|
77
|
-
queryKey: ["params-all", e ?? "full"],
|
|
78
|
-
queryFn: () => se(e),
|
|
79
|
-
staleTime: 3e4
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
function de() {
|
|
83
|
-
return S({
|
|
84
|
-
queryKey: ["params-public"],
|
|
85
|
-
queryFn: ae,
|
|
86
|
-
staleTime: 3e5
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
function fe(e, t = {}) {
|
|
90
|
-
let n = t.enabled ?? !0;
|
|
91
|
-
return S({
|
|
92
|
-
queryKey: ["params", e],
|
|
93
|
-
queryFn: () => oe(e),
|
|
94
|
-
enabled: !!e && n,
|
|
95
|
-
staleTime: 6e4
|
|
96
|
-
});
|
|
97
|
-
}
|
|
98
|
-
function pe(e) {
|
|
99
|
-
let t = m((e) => e.isAuthenticated), n = de(), r = fe(e, { enabled: t }), i = me(n.data?.parameters, e);
|
|
100
|
-
if (t && r.data?.found) return {
|
|
101
|
-
value: r.data.value,
|
|
102
|
-
found: !0,
|
|
103
|
-
source: r.data.source,
|
|
104
|
-
loading: !1,
|
|
105
|
-
error: null
|
|
106
|
-
};
|
|
107
|
-
let a = i !== void 0;
|
|
108
|
-
return {
|
|
109
|
-
value: i?.value,
|
|
110
|
-
found: a,
|
|
111
|
-
source: a ? "public" : void 0,
|
|
112
|
-
loading: n.isLoading || t && r.isLoading && !r.data && !r.error,
|
|
113
|
-
error: r.error ?? n.error ?? null
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function me(e, t) {
|
|
117
|
-
return e?.find((e) => e.code === t);
|
|
118
|
-
}
|
|
119
|
-
function he(e, t) {
|
|
120
|
-
let n = m((e) => e.isAuthenticated), r = S({
|
|
121
|
-
queryKey: ["params", e],
|
|
122
|
-
queryFn: () => oe(e),
|
|
123
|
-
enabled: !!e && n,
|
|
124
|
-
staleTime: 6e4
|
|
125
|
-
}), i = r.data, a = !!i?.found;
|
|
126
|
-
return {
|
|
127
|
-
value: a ? i.value : t,
|
|
128
|
-
found: a,
|
|
129
|
-
source: i?.source,
|
|
130
|
-
loading: r.isLoading,
|
|
131
|
-
error: r.error ?? null
|
|
132
|
-
};
|
|
133
|
-
}
|
|
134
|
-
//#endregion
|
|
1
|
+
import { D as e, Ft as t, Ht as n, Kt as r, Pt as i, Qt as a, Vt as o, Zt as s, a as c, an as l, dn as u, dr as d, jt as f, ln as p, un as m, ur as h } from "./useCurrentScreen-CzwzQpoW.js";
|
|
2
|
+
import { useCallback as g, useEffect as _, useMemo as ee, useRef as te, useState as ne } from "react";
|
|
3
|
+
import { parsePath as re, useLocation as ie, useNavigate as ae } from "react-router";
|
|
4
|
+
import { useMutation as v, useQueryClient as y } from "@tanstack/react-query";
|
|
5
|
+
import { create as b } from "zustand";
|
|
135
6
|
//#region src/stores/preferences.ts
|
|
136
|
-
var
|
|
7
|
+
var x = {
|
|
137
8
|
colorScheme: "light",
|
|
138
9
|
accent: "violet",
|
|
139
10
|
density: "compact",
|
|
@@ -145,22 +16,22 @@ var ge = {
|
|
|
145
16
|
zebra: !0,
|
|
146
17
|
aiSurface: "both",
|
|
147
18
|
toastPosition: "bottom-right"
|
|
148
|
-
},
|
|
19
|
+
}, oe = ["light", "dark"], se = [
|
|
149
20
|
"violet",
|
|
150
21
|
"blue",
|
|
151
22
|
"teal",
|
|
152
23
|
"amber",
|
|
153
24
|
"rose"
|
|
154
|
-
],
|
|
25
|
+
], ce = [
|
|
155
26
|
"compact",
|
|
156
27
|
"comfortable",
|
|
157
28
|
"cozy"
|
|
158
|
-
],
|
|
29
|
+
], le = ["wide", "collapsed"], ue = ["top", "bottom"], de = [
|
|
159
30
|
"command",
|
|
160
31
|
"panel",
|
|
161
32
|
"both",
|
|
162
33
|
"off"
|
|
163
|
-
],
|
|
34
|
+
], fe = [
|
|
164
35
|
"top-left",
|
|
165
36
|
"top-center",
|
|
166
37
|
"top-right",
|
|
@@ -168,37 +39,37 @@ var ge = {
|
|
|
168
39
|
"bottom-center",
|
|
169
40
|
"bottom-right"
|
|
170
41
|
];
|
|
171
|
-
function
|
|
42
|
+
function S(e, t) {
|
|
172
43
|
return typeof t == "string" && e.includes(t) ? t : void 0;
|
|
173
44
|
}
|
|
174
|
-
function
|
|
175
|
-
let t = {}, n =
|
|
45
|
+
function C(e) {
|
|
46
|
+
let t = {}, n = S(oe, e.colorScheme);
|
|
176
47
|
n && (t.colorScheme = n);
|
|
177
|
-
let r =
|
|
48
|
+
let r = S(se, e.accent);
|
|
178
49
|
r && (t.accent = r);
|
|
179
|
-
let i =
|
|
50
|
+
let i = S(ce, e.density);
|
|
180
51
|
i && (t.density = i);
|
|
181
|
-
let a =
|
|
52
|
+
let a = S(le, e.sidebar);
|
|
182
53
|
a && (t.sidebar = a);
|
|
183
|
-
let o =
|
|
54
|
+
let o = S(ue, e.tabsPosition);
|
|
184
55
|
o && (t.tabsPosition = o);
|
|
185
|
-
let s =
|
|
56
|
+
let s = S(de, e.aiSurface);
|
|
186
57
|
s && (t.aiSurface = s);
|
|
187
|
-
let c =
|
|
58
|
+
let c = S(fe, e.toastPosition);
|
|
188
59
|
return c && (t.toastPosition = c), typeof e.tabsMaxOpen == "number" && e.tabsMaxOpen > 0 && (t.tabsMaxOpen = e.tabsMaxOpen), typeof e.radius == "number" && e.radius >= 0 && e.radius <= 32 && (t.radius = e.radius), typeof e.zebra == "boolean" && (t.zebra = e.zebra), typeof e.tabsPersist == "boolean" && (t.tabsPersist = e.tabsPersist), t;
|
|
189
60
|
}
|
|
190
|
-
var
|
|
191
|
-
function
|
|
61
|
+
var pe = ["declarion-preferences", "declarion-appearance"];
|
|
62
|
+
function me() {
|
|
192
63
|
if (!(typeof window > "u")) try {
|
|
193
|
-
for (let e of
|
|
64
|
+
for (let e of pe) localStorage.removeItem(e);
|
|
194
65
|
} catch {}
|
|
195
66
|
}
|
|
196
|
-
function
|
|
67
|
+
function w(e) {
|
|
197
68
|
if (typeof document > "u") return;
|
|
198
69
|
let t = document.documentElement;
|
|
199
70
|
t.dataset.colorScheme = e.colorScheme, t.dataset.accent = e.accent, t.dataset.density = e.density, t.dataset.sidebar = e.sidebar, t.dataset.tabbar = e.tabsPosition, t.dataset.zebra = e.zebra ? "on" : "off", t.dataset.ai = e.aiSurface, t.style.setProperty("--radius-md", `${e.radius}px`), t.style.setProperty("--radius-lg", `${e.radius + 3}px`);
|
|
200
71
|
}
|
|
201
|
-
function
|
|
72
|
+
function he(e) {
|
|
202
73
|
return {
|
|
203
74
|
colorScheme: e.color_scheme,
|
|
204
75
|
accent: e.accent,
|
|
@@ -213,70 +84,70 @@ function Ee(e) {
|
|
|
213
84
|
toastPosition: e.toast_position
|
|
214
85
|
};
|
|
215
86
|
}
|
|
216
|
-
|
|
217
|
-
var
|
|
218
|
-
typeof window < "u" &&
|
|
219
|
-
var
|
|
220
|
-
...
|
|
87
|
+
me();
|
|
88
|
+
var T = /* @__PURE__ */ new Set(), ge = { ...x };
|
|
89
|
+
typeof window < "u" && w(ge);
|
|
90
|
+
var E = b((e, t) => ({
|
|
91
|
+
...ge,
|
|
221
92
|
set: (n, r) => {
|
|
222
|
-
let i =
|
|
223
|
-
i[n] !== void 0 && (
|
|
93
|
+
let i = C({ [n]: r });
|
|
94
|
+
i[n] !== void 0 && (w({
|
|
224
95
|
...t(),
|
|
225
96
|
...i
|
|
226
|
-
}),
|
|
97
|
+
}), T.add(n), e(i));
|
|
227
98
|
},
|
|
228
99
|
setMany: (n) => {
|
|
229
|
-
let r =
|
|
100
|
+
let r = C(n);
|
|
230
101
|
if (Object.keys(r).length) {
|
|
231
|
-
|
|
102
|
+
w({
|
|
232
103
|
...t(),
|
|
233
104
|
...r
|
|
234
105
|
});
|
|
235
|
-
for (let e of Object.keys(r))
|
|
106
|
+
for (let e of Object.keys(r)) T.add(e);
|
|
236
107
|
e(r);
|
|
237
108
|
}
|
|
238
109
|
},
|
|
239
110
|
hydrateFromBranding: (t) => {
|
|
240
111
|
if (!t) return;
|
|
241
|
-
let n =
|
|
242
|
-
for (let [e, t] of Object.entries(n))
|
|
243
|
-
let i =
|
|
244
|
-
Object.keys(i).length && (
|
|
245
|
-
...
|
|
112
|
+
let n = he(t), r = {};
|
|
113
|
+
for (let [e, t] of Object.entries(n)) T.has(e) || t !== void 0 && (r[e] = t);
|
|
114
|
+
let i = C(r);
|
|
115
|
+
Object.keys(i).length && (w({
|
|
116
|
+
...E.getState(),
|
|
246
117
|
...i
|
|
247
118
|
}), e(i));
|
|
248
119
|
},
|
|
249
120
|
resetToDefaults: (t) => {
|
|
250
|
-
|
|
251
|
-
let n = t ?
|
|
252
|
-
...
|
|
121
|
+
T.clear(), me();
|
|
122
|
+
let n = t ? C(he(t)) : {}, r = {
|
|
123
|
+
...x,
|
|
253
124
|
...n
|
|
254
125
|
};
|
|
255
|
-
|
|
126
|
+
w(r), e(r);
|
|
256
127
|
}
|
|
257
|
-
})),
|
|
258
|
-
function
|
|
259
|
-
return
|
|
128
|
+
})), _e = ["/login", "/signup"];
|
|
129
|
+
function ve(e) {
|
|
130
|
+
return _e.includes(e);
|
|
260
131
|
}
|
|
261
|
-
function
|
|
132
|
+
function D(e) {
|
|
262
133
|
return typeof e == "string" && e.startsWith("/") && !e.startsWith("//");
|
|
263
134
|
}
|
|
264
|
-
var
|
|
265
|
-
function
|
|
266
|
-
return typeof e == "string" && e.length <=
|
|
135
|
+
var O = 4096;
|
|
136
|
+
function k(e) {
|
|
137
|
+
return typeof e == "string" && e.length <= O;
|
|
267
138
|
}
|
|
268
|
-
function
|
|
139
|
+
function ye(e) {
|
|
269
140
|
if (e === null) return null;
|
|
270
141
|
if (e === void 0 || typeof e != "object" || Array.isArray(e)) return;
|
|
271
142
|
let t = e;
|
|
272
|
-
if (!
|
|
143
|
+
if (!D(t.pathname) || t.pathname.length > O || t.pathname.includes("?") || t.pathname.includes("#")) return;
|
|
273
144
|
let n = { pathname: t.pathname };
|
|
274
145
|
if (t.search !== void 0) {
|
|
275
|
-
if (!
|
|
146
|
+
if (!k(t.search) || t.search.startsWith("?")) return;
|
|
276
147
|
t.search && (n.search = t.search);
|
|
277
148
|
}
|
|
278
149
|
if (t.hash !== void 0) {
|
|
279
|
-
if (!
|
|
150
|
+
if (!k(t.hash) || t.hash && !t.hash.startsWith("#")) return;
|
|
280
151
|
t.hash && (n.hash = t.hash);
|
|
281
152
|
}
|
|
282
153
|
for (let e of [
|
|
@@ -285,29 +156,29 @@ function je(e) {
|
|
|
285
156
|
"icon",
|
|
286
157
|
"screen"
|
|
287
158
|
]) if (t[e] !== void 0) {
|
|
288
|
-
if (!
|
|
159
|
+
if (!k(t[e])) return;
|
|
289
160
|
t[e] && (n[e] = t[e]);
|
|
290
161
|
}
|
|
291
162
|
return n;
|
|
292
163
|
}
|
|
293
|
-
function
|
|
164
|
+
function A(e) {
|
|
294
165
|
return e.closable !== !1;
|
|
295
166
|
}
|
|
296
|
-
function
|
|
297
|
-
if (n === "all") return e.filter(
|
|
167
|
+
function be(e, t, n, r) {
|
|
168
|
+
if (n === "all") return e.filter(A).map((e) => e.id);
|
|
298
169
|
let i = r ?? t;
|
|
299
170
|
if (!i) return [];
|
|
300
171
|
let a = e.findIndex((e) => e.id === i);
|
|
301
|
-
return a === -1 ? [] : n === "current" ?
|
|
172
|
+
return a === -1 ? [] : n === "current" ? A(e[a]) ? [e[a].id] : [] : n === "others" ? e.filter((e, t) => t !== a && A(e)).map((e) => e.id) : e.slice(a + 1).filter(A).map((e) => e.id);
|
|
302
173
|
}
|
|
303
|
-
var
|
|
304
|
-
function
|
|
174
|
+
var j = null, M = null;
|
|
175
|
+
function xe(e, t) {
|
|
305
176
|
return `declarion::${e}::${t}::tabs`;
|
|
306
177
|
}
|
|
307
|
-
function
|
|
308
|
-
return !
|
|
178
|
+
function Se() {
|
|
179
|
+
return !j || !M ? null : xe(j, M);
|
|
309
180
|
}
|
|
310
|
-
function
|
|
181
|
+
function N(e) {
|
|
311
182
|
let t;
|
|
312
183
|
try {
|
|
313
184
|
t = JSON.parse(e);
|
|
@@ -318,7 +189,7 @@ function Fe(e) {
|
|
|
318
189
|
let n = t;
|
|
319
190
|
return Array.isArray(n.tabs) ? {
|
|
320
191
|
tabs: n.tabs.filter((e) => typeof e == "object" && !!e && typeof e.id == "string" && typeof e.pathname == "string").map((e) => {
|
|
321
|
-
let t =
|
|
192
|
+
let t = ye(e.returnTo);
|
|
322
193
|
if (t === void 0) {
|
|
323
194
|
let { returnTo: t, ...n } = e;
|
|
324
195
|
return n;
|
|
@@ -331,22 +202,22 @@ function Fe(e) {
|
|
|
331
202
|
activeTabId: typeof n.activeTabId == "string" ? n.activeTabId : null
|
|
332
203
|
} : null;
|
|
333
204
|
}
|
|
334
|
-
function
|
|
205
|
+
function Ce(e, t) {
|
|
335
206
|
if (typeof window > "u") return null;
|
|
336
|
-
let n = localStorage.getItem(
|
|
207
|
+
let n = localStorage.getItem(xe(e, t));
|
|
337
208
|
if (!n) return null;
|
|
338
|
-
let r =
|
|
209
|
+
let r = N(n);
|
|
339
210
|
if (!r) return null;
|
|
340
211
|
let i = r.tabs.find((e) => e.id === r.activeTabId), a = i?.pathname;
|
|
341
|
-
if (
|
|
212
|
+
if (D(a)) {
|
|
342
213
|
let e = typeof i?.search == "string" ? i.search : "", t = e.startsWith("?") ? e.slice(1) : e;
|
|
343
214
|
return t ? `${a}?${t}` : a;
|
|
344
215
|
}
|
|
345
216
|
return null;
|
|
346
217
|
}
|
|
347
|
-
function
|
|
218
|
+
function P(e, t) {
|
|
348
219
|
if (typeof window > "u") return;
|
|
349
|
-
let n =
|
|
220
|
+
let n = E.getState().tabsPersist, r = Se();
|
|
350
221
|
if (r) {
|
|
351
222
|
if (!n) {
|
|
352
223
|
try {
|
|
@@ -362,24 +233,24 @@ function F(e, t) {
|
|
|
362
233
|
} catch {}
|
|
363
234
|
}
|
|
364
235
|
}
|
|
365
|
-
function
|
|
366
|
-
if (typeof window > "u" || !
|
|
367
|
-
let e =
|
|
236
|
+
function we() {
|
|
237
|
+
if (typeof window > "u" || !E.getState().tabsPersist) return null;
|
|
238
|
+
let e = Se();
|
|
368
239
|
if (!e) return null;
|
|
369
240
|
let t = localStorage.getItem(e);
|
|
370
|
-
return t ?
|
|
241
|
+
return t ? N(t) : null;
|
|
371
242
|
}
|
|
372
|
-
var
|
|
243
|
+
var F = b((e, t) => ({
|
|
373
244
|
tabs: [],
|
|
374
245
|
activeTabId: null,
|
|
375
246
|
openTab: (n) => {
|
|
376
|
-
if (
|
|
247
|
+
if (ve(n.pathname)) return "";
|
|
377
248
|
let r = t(), i = r.tabs.find((e) => e.pathname === n.pathname);
|
|
378
|
-
if (i) return e({ activeTabId: i.id }),
|
|
249
|
+
if (i) return e({ activeTabId: i.id }), P(r.tabs, i.id), i.id;
|
|
379
250
|
let a = crypto.randomUUID(), o = {
|
|
380
251
|
...n,
|
|
381
252
|
id: a
|
|
382
|
-
}, s = [...r.tabs, o], c =
|
|
253
|
+
}, s = [...r.tabs, o], c = E.getState().tabsMaxOpen;
|
|
383
254
|
if (c > 0 && s.length > c) {
|
|
384
255
|
let e = s.findIndex((e) => e.id !== a && e.closable !== !1 && !e.dirty);
|
|
385
256
|
e !== -1 && (s = s.filter((t, n) => n !== e));
|
|
@@ -387,7 +258,7 @@ var I = w((e, t) => ({
|
|
|
387
258
|
return e({
|
|
388
259
|
tabs: s,
|
|
389
260
|
activeTabId: a
|
|
390
|
-
}),
|
|
261
|
+
}), P(s, a), a;
|
|
391
262
|
},
|
|
392
263
|
closeTab: (e) => {
|
|
393
264
|
let n = t(), r = n.tabs.findIndex((t) => t.id === e);
|
|
@@ -396,14 +267,14 @@ var I = w((e, t) => ({
|
|
|
396
267
|
closeTabs: (n) => {
|
|
397
268
|
let r = t(), i = new Set(n);
|
|
398
269
|
if (i.size === 0) return r.tabs.find((e) => e.id === r.activeTabId) ?? null;
|
|
399
|
-
let a = r.tabs.findIndex((e) => e.id === r.activeTabId), o = r.tabs.filter((e) => !(i.has(e.id) &&
|
|
270
|
+
let a = r.tabs.findIndex((e) => e.id === r.activeTabId), o = r.tabs.filter((e) => !(i.has(e.id) && A(e))), s = r.activeTabId;
|
|
400
271
|
return s && !o.some((e) => e.id === s) ? s = o.length === 0 ? null : o[Math.min(Math.max(a, 0), o.length - 1)].id : o.length === 0 && (s = null), e({
|
|
401
272
|
tabs: o,
|
|
402
273
|
activeTabId: s
|
|
403
|
-
}),
|
|
274
|
+
}), P(o, s), o.find((e) => e.id === s) ?? null;
|
|
404
275
|
},
|
|
405
276
|
switchTab: (n) => {
|
|
406
|
-
e({ activeTabId: n }),
|
|
277
|
+
e({ activeTabId: n }), P(t().tabs, n);
|
|
407
278
|
},
|
|
408
279
|
reorderTabs: (t, n) => {
|
|
409
280
|
e((e) => {
|
|
@@ -430,7 +301,7 @@ var I = w((e, t) => ({
|
|
|
430
301
|
e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
|
|
431
302
|
...e,
|
|
432
303
|
returnTo: r
|
|
433
|
-
} : e) })),
|
|
304
|
+
} : e) })), P(t().tabs, t().activeTabId);
|
|
434
305
|
},
|
|
435
306
|
commitTabNavigation: (n, r) => {
|
|
436
307
|
let i = "returnTo" in r;
|
|
@@ -441,37 +312,37 @@ var I = w((e, t) => ({
|
|
|
441
312
|
...i ? { returnTo: r.returnTo } : {}
|
|
442
313
|
} : e),
|
|
443
314
|
activeTabId: n
|
|
444
|
-
})),
|
|
315
|
+
})), P(t().tabs, t().activeTabId);
|
|
445
316
|
},
|
|
446
317
|
setDirty: (n, r) => {
|
|
447
318
|
e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
|
|
448
319
|
...e,
|
|
449
320
|
dirty: r
|
|
450
|
-
} : e) })),
|
|
321
|
+
} : e) })), P(t().tabs, t().activeTabId);
|
|
451
322
|
},
|
|
452
323
|
setMode: (n, r) => {
|
|
453
324
|
e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
|
|
454
325
|
...e,
|
|
455
326
|
mode: r
|
|
456
|
-
} : e) })),
|
|
327
|
+
} : e) })), P(t().tabs, t().activeTabId);
|
|
457
328
|
},
|
|
458
329
|
updateTab: (n, r) => {
|
|
459
330
|
e((e) => ({ tabs: e.tabs.map((e) => e.id === n ? {
|
|
460
331
|
...e,
|
|
461
332
|
...r
|
|
462
|
-
} : e) })),
|
|
333
|
+
} : e) })), P(t().tabs, t().activeTabId);
|
|
463
334
|
},
|
|
464
335
|
setScope: (e, t) => {
|
|
465
|
-
|
|
336
|
+
j = e, M = t;
|
|
466
337
|
},
|
|
467
338
|
hydrate: () => {
|
|
468
|
-
let t =
|
|
339
|
+
let t = we();
|
|
469
340
|
t && e({
|
|
470
341
|
tabs: t.tabs,
|
|
471
342
|
activeTabId: t.activeTabId
|
|
472
343
|
});
|
|
473
344
|
}
|
|
474
|
-
})),
|
|
345
|
+
})), I = b((e) => ({
|
|
475
346
|
depth: 0,
|
|
476
347
|
nextIsRoot: !1,
|
|
477
348
|
applyNavigation: (t) => e((e) => e.nextIsRoot ? {
|
|
@@ -486,25 +357,25 @@ var I = w((e, t) => ({
|
|
|
486
357
|
}));
|
|
487
358
|
//#endregion
|
|
488
359
|
//#region src/lib/screen-back.ts
|
|
489
|
-
function
|
|
360
|
+
function Te(e) {
|
|
490
361
|
return e ? e.startsWith("?") ? e.slice(1) : e : "";
|
|
491
362
|
}
|
|
492
|
-
function
|
|
363
|
+
function Ee(e) {
|
|
493
364
|
if (e) return e.startsWith("?") ? e : `?${e}`;
|
|
494
365
|
}
|
|
495
|
-
function
|
|
496
|
-
if (!
|
|
497
|
-
let r =
|
|
366
|
+
function De(e, t, n) {
|
|
367
|
+
if (!D(e.pathname) || ve(e.pathname) || e.pathname === t) return;
|
|
368
|
+
let r = Te(e.search), i = { pathname: e.pathname };
|
|
498
369
|
return r && (i.search = r), e.hash && (i.hash = e.hash), n?.id && (i.tabId = n.id), n?.title && (i.title = n.title), n?.icon && (i.icon = n.icon), n?.screen && (i.screen = n.screen), i;
|
|
499
370
|
}
|
|
500
|
-
function
|
|
371
|
+
function Oe(e, t) {
|
|
501
372
|
return t ? {
|
|
502
373
|
hasOriginBack: !1,
|
|
503
374
|
allowFallbackBack: !0
|
|
504
375
|
} : e === null ? {
|
|
505
376
|
hasOriginBack: !1,
|
|
506
377
|
allowFallbackBack: !1
|
|
507
|
-
} : e &&
|
|
378
|
+
} : e && D(e.pathname) ? {
|
|
508
379
|
hasOriginBack: !0,
|
|
509
380
|
allowFallbackBack: !0
|
|
510
381
|
} : {
|
|
@@ -512,8 +383,8 @@ function Ve(e, t) {
|
|
|
512
383
|
allowFallbackBack: !0
|
|
513
384
|
};
|
|
514
385
|
}
|
|
515
|
-
function
|
|
516
|
-
if (n || !e || !
|
|
386
|
+
function ke(e, t, n) {
|
|
387
|
+
if (n || !e || !D(e.pathname)) return null;
|
|
517
388
|
let r = (e.tabId ? t.find((t) => t.id === e.tabId) : void 0) ?? t.find((t) => t.pathname === e.pathname);
|
|
518
389
|
return {
|
|
519
390
|
kind: r ? "live" : "reopen",
|
|
@@ -528,110 +399,110 @@ function He(e, t, n) {
|
|
|
528
399
|
}
|
|
529
400
|
//#endregion
|
|
530
401
|
//#region src/hooks/useTabNavigate.ts
|
|
531
|
-
function
|
|
532
|
-
let n =
|
|
402
|
+
function Ae(e, t) {
|
|
403
|
+
let n = re(e);
|
|
533
404
|
return {
|
|
534
405
|
pathname: n.pathname ?? e,
|
|
535
|
-
search:
|
|
406
|
+
search: je(n.search) ?? je(t),
|
|
536
407
|
hash: n.hash
|
|
537
408
|
};
|
|
538
409
|
}
|
|
539
|
-
function
|
|
540
|
-
if (
|
|
541
|
-
}
|
|
542
|
-
function
|
|
543
|
-
let e =
|
|
544
|
-
return
|
|
545
|
-
let { pathname: o, search: s, hash: c } =
|
|
546
|
-
if (
|
|
547
|
-
|
|
410
|
+
function je(e) {
|
|
411
|
+
if (e && e !== "?") return e.startsWith("?") ? e : `?${e}`;
|
|
412
|
+
}
|
|
413
|
+
function Me() {
|
|
414
|
+
let e = ae(), { data: n } = m(), r = o(), i = t();
|
|
415
|
+
return g((t, a) => {
|
|
416
|
+
let { pathname: o, search: s, hash: c } = Ae(t, a?.search);
|
|
417
|
+
if (r.enabled) {
|
|
418
|
+
i(`${o}${s ?? ""}${c ?? ""}`, { replace: a?.replace });
|
|
548
419
|
return;
|
|
549
420
|
}
|
|
550
|
-
let l =
|
|
421
|
+
let l = F.getState(), u = a?.topLevel ?? !1, d = Te(s), f = u || typeof window > "u" ? void 0 : De({
|
|
551
422
|
pathname: window.location.pathname,
|
|
552
423
|
search: window.location.search,
|
|
553
424
|
hash: window.location.hash
|
|
554
|
-
}, o, l.findTabByPathname(window.location.pathname)),
|
|
555
|
-
if (
|
|
556
|
-
if (
|
|
557
|
-
let t =
|
|
558
|
-
l.commitTabNavigation(
|
|
425
|
+
}, o, l.findTabByPathname(window.location.pathname)), p = l.findTabByPathname(o);
|
|
426
|
+
if (p) {
|
|
427
|
+
if (u) {
|
|
428
|
+
let t = d || p.search;
|
|
429
|
+
l.commitTabNavigation(p.id, {
|
|
559
430
|
search: t,
|
|
560
431
|
returnTo: null
|
|
561
432
|
}), e({
|
|
562
433
|
pathname: o,
|
|
563
434
|
search: t ? `?${t}` : "",
|
|
564
435
|
hash: c
|
|
565
|
-
}, { replace:
|
|
436
|
+
}, { replace: a?.replace });
|
|
566
437
|
return;
|
|
567
438
|
}
|
|
568
|
-
|
|
569
|
-
search:
|
|
570
|
-
returnTo:
|
|
571
|
-
}) : l.commitTabNavigation(
|
|
439
|
+
f ? l.commitTabNavigation(p.id, {
|
|
440
|
+
search: d,
|
|
441
|
+
returnTo: f
|
|
442
|
+
}) : l.commitTabNavigation(p.id, { search: d }), e({
|
|
572
443
|
pathname: o,
|
|
573
444
|
search: s,
|
|
574
445
|
hash: c
|
|
575
|
-
}, { replace:
|
|
446
|
+
}, { replace: a?.replace });
|
|
576
447
|
return;
|
|
577
448
|
}
|
|
578
|
-
let
|
|
449
|
+
let m = a?.title ? void 0 : h(o, n?.screens, n?.entities), g = a?.title ?? m?.title ?? o, _ = a?.icon ?? m?.icon;
|
|
579
450
|
l.openTab({
|
|
580
451
|
pathname: o,
|
|
581
|
-
search:
|
|
452
|
+
search: d,
|
|
582
453
|
title: g,
|
|
583
454
|
icon: _,
|
|
584
455
|
closable: !0,
|
|
585
|
-
returnTo:
|
|
456
|
+
returnTo: u ? null : f
|
|
586
457
|
}), e({
|
|
587
458
|
pathname: o,
|
|
588
459
|
search: s,
|
|
589
460
|
hash: c
|
|
590
|
-
}, { replace:
|
|
461
|
+
}, { replace: a?.replace });
|
|
591
462
|
}, [
|
|
592
463
|
e,
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
464
|
+
n?.screens,
|
|
465
|
+
n?.entities,
|
|
466
|
+
r.enabled,
|
|
467
|
+
i
|
|
597
468
|
]);
|
|
598
469
|
}
|
|
599
470
|
//#endregion
|
|
600
471
|
//#region src/stores/page-state.ts
|
|
601
|
-
var
|
|
602
|
-
function
|
|
603
|
-
|
|
472
|
+
var L = 18e5, R = null;
|
|
473
|
+
function z(e) {
|
|
474
|
+
R = e;
|
|
604
475
|
}
|
|
605
|
-
function
|
|
606
|
-
if (
|
|
476
|
+
function B(e) {
|
|
477
|
+
if (e && R) for (let t of e.queryKeys) R.removeQueries({
|
|
607
478
|
queryKey: t,
|
|
608
479
|
exact: !0
|
|
609
480
|
});
|
|
610
481
|
}
|
|
611
|
-
function
|
|
482
|
+
function V(e, t) {
|
|
612
483
|
let n = e[t];
|
|
613
484
|
if (!n) return e;
|
|
614
|
-
|
|
485
|
+
B(n);
|
|
615
486
|
let r = { ...e };
|
|
616
487
|
return delete r[t], r;
|
|
617
488
|
}
|
|
618
|
-
function
|
|
489
|
+
function H(e, t) {
|
|
619
490
|
let n = e;
|
|
620
491
|
for (; Object.keys(n).length > 64;) {
|
|
621
492
|
let e = null, r = Infinity;
|
|
622
493
|
for (let [i, a] of Object.entries(n)) i !== t && a.lastActiveAt < r && (r = a.lastActiveAt, e = i);
|
|
623
494
|
if (e === null) break;
|
|
624
|
-
n =
|
|
495
|
+
n = V(n, e);
|
|
625
496
|
}
|
|
626
497
|
return n;
|
|
627
498
|
}
|
|
628
|
-
var U =
|
|
499
|
+
var U = b((e, t) => ({
|
|
629
500
|
entries: {},
|
|
630
|
-
ttlMs:
|
|
501
|
+
ttlMs: L,
|
|
631
502
|
setTtl: (n) => {
|
|
632
503
|
if (n <= 0) {
|
|
633
504
|
let { entries: r } = t();
|
|
634
|
-
for (let e of Object.keys(r))
|
|
505
|
+
for (let e of Object.keys(r)) B(r[e]);
|
|
635
506
|
e({
|
|
636
507
|
ttlMs: n,
|
|
637
508
|
entries: {}
|
|
@@ -655,7 +526,7 @@ var U = w((e, t) => ({
|
|
|
655
526
|
lastActiveAt: o,
|
|
656
527
|
queryKeys: []
|
|
657
528
|
};
|
|
658
|
-
e({ entries:
|
|
529
|
+
e({ entries: H({
|
|
659
530
|
...a.entries,
|
|
660
531
|
[n]: c
|
|
661
532
|
}, n) });
|
|
@@ -679,7 +550,7 @@ var U = w((e, t) => ({
|
|
|
679
550
|
registerQueryKey: (n, r) => {
|
|
680
551
|
let i = t();
|
|
681
552
|
if (i.ttlMs <= 0) return;
|
|
682
|
-
let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) =>
|
|
553
|
+
let a = Date.now(), o = i.entries[n], s = o?.queryKeys.some((e) => Ne(e, r));
|
|
683
554
|
if (o && s) return;
|
|
684
555
|
let c = o ? {
|
|
685
556
|
...o,
|
|
@@ -690,29 +561,29 @@ var U = w((e, t) => ({
|
|
|
690
561
|
lastActiveAt: a,
|
|
691
562
|
queryKeys: [r]
|
|
692
563
|
};
|
|
693
|
-
e({ entries:
|
|
564
|
+
e({ entries: H({
|
|
694
565
|
...i.entries,
|
|
695
566
|
[n]: c
|
|
696
567
|
}, n) });
|
|
697
568
|
},
|
|
698
569
|
kill: (n) => {
|
|
699
|
-
let r = t(), i =
|
|
570
|
+
let r = t(), i = V(r.entries, n);
|
|
700
571
|
i !== r.entries && e({ entries: i });
|
|
701
572
|
},
|
|
702
573
|
sweep: (n) => {
|
|
703
574
|
let { ttlMs: r, entries: i } = t(), a = i;
|
|
704
|
-
for (let [e, t] of Object.entries(i)) (r <= 0 || n - t.lastActiveAt > r) && (a =
|
|
575
|
+
for (let [e, t] of Object.entries(i)) (r <= 0 || n - t.lastActiveAt > r) && (a = V(a, e));
|
|
705
576
|
a !== i && e({ entries: a });
|
|
706
577
|
},
|
|
707
578
|
clear: () => {
|
|
708
579
|
let { entries: n } = t();
|
|
709
580
|
if (Object.keys(n).length !== 0) {
|
|
710
|
-
for (let e of Object.keys(n))
|
|
581
|
+
for (let e of Object.keys(n)) B(n[e]);
|
|
711
582
|
e({ entries: {} });
|
|
712
583
|
}
|
|
713
584
|
}
|
|
714
585
|
}));
|
|
715
|
-
function
|
|
586
|
+
function Ne(e, t) {
|
|
716
587
|
if (e === t) return !0;
|
|
717
588
|
try {
|
|
718
589
|
return JSON.stringify(e) === JSON.stringify(t);
|
|
@@ -722,13 +593,13 @@ function qe(e, t) {
|
|
|
722
593
|
}
|
|
723
594
|
//#endregion
|
|
724
595
|
//#region src/lib/page-inset.ts
|
|
725
|
-
function
|
|
596
|
+
function Pe(e) {
|
|
726
597
|
return {
|
|
727
598
|
paddingLeft: `calc(${e}px + var(--safe-area-left))`,
|
|
728
599
|
paddingRight: `calc(${e}px + var(--safe-area-right))`
|
|
729
600
|
};
|
|
730
601
|
}
|
|
731
|
-
var
|
|
602
|
+
var Fe = 1200, W = null, G = null;
|
|
732
603
|
function K() {
|
|
733
604
|
return !W || !G ? null : `declarion::${W}::${G}::listlayout`;
|
|
734
605
|
}
|
|
@@ -739,13 +610,13 @@ function q() {
|
|
|
739
610
|
resizeEduShown: !1
|
|
740
611
|
};
|
|
741
612
|
}
|
|
742
|
-
function
|
|
613
|
+
function Ie(e) {
|
|
743
614
|
if (typeof e != "object" || !e) return {};
|
|
744
615
|
let t = {};
|
|
745
616
|
for (let [n, r] of Object.entries(e)) typeof r == "number" && Number.isFinite(r) && r >= 60 && (t[n] = r);
|
|
746
617
|
return t;
|
|
747
618
|
}
|
|
748
|
-
function
|
|
619
|
+
function Le(e) {
|
|
749
620
|
let t;
|
|
750
621
|
try {
|
|
751
622
|
t = JSON.parse(e);
|
|
@@ -756,7 +627,7 @@ function Ze(e) {
|
|
|
756
627
|
let n = t;
|
|
757
628
|
if (n.v !== 2) return null;
|
|
758
629
|
let r = {};
|
|
759
|
-
if (n.widths && typeof n.widths == "object") for (let [e, t] of Object.entries(n.widths)) r[e] =
|
|
630
|
+
if (n.widths && typeof n.widths == "object") for (let [e, t] of Object.entries(n.widths)) r[e] = Ie(t);
|
|
760
631
|
return {
|
|
761
632
|
v: 2,
|
|
762
633
|
widths: r,
|
|
@@ -770,7 +641,7 @@ function J(e) {
|
|
|
770
641
|
localStorage.setItem(t, JSON.stringify(e));
|
|
771
642
|
} catch {}
|
|
772
643
|
}
|
|
773
|
-
function
|
|
644
|
+
function Re(e, t) {
|
|
774
645
|
return {
|
|
775
646
|
v: 2,
|
|
776
647
|
widths: {
|
|
@@ -780,10 +651,10 @@ function Qe(e, t) {
|
|
|
780
651
|
resizeEduShown: e.resizeEduShown || t.resizeEduShown
|
|
781
652
|
};
|
|
782
653
|
}
|
|
783
|
-
function
|
|
784
|
-
return Math.min(
|
|
654
|
+
function ze(e) {
|
|
655
|
+
return Math.min(Fe, Math.max(60, Math.round(e)));
|
|
785
656
|
}
|
|
786
|
-
var Y =
|
|
657
|
+
var Y = b((e) => ({
|
|
787
658
|
...q(),
|
|
788
659
|
setScope: (e, t) => {
|
|
789
660
|
W = e, G = t;
|
|
@@ -796,13 +667,13 @@ var Y = w((e) => ({
|
|
|
796
667
|
return;
|
|
797
668
|
}
|
|
798
669
|
let n = localStorage.getItem(t);
|
|
799
|
-
e((n ?
|
|
670
|
+
e((n ? Le(n) : null) ?? q());
|
|
800
671
|
},
|
|
801
672
|
setWidth: (t, n, r) => {
|
|
802
673
|
e((e) => {
|
|
803
674
|
let i = {
|
|
804
675
|
...e.widths[t] ?? {},
|
|
805
|
-
[n]:
|
|
676
|
+
[n]: ze(r)
|
|
806
677
|
}, a = {
|
|
807
678
|
...e,
|
|
808
679
|
widths: {
|
|
@@ -816,7 +687,7 @@ var Y = w((e) => ({
|
|
|
816
687
|
setWidths: (t, n) => {
|
|
817
688
|
e((e) => {
|
|
818
689
|
let r = {};
|
|
819
|
-
for (let [e, t] of Object.entries(n)) r[e] =
|
|
690
|
+
for (let [e, t] of Object.entries(n)) r[e] = ze(t);
|
|
820
691
|
let i = {
|
|
821
692
|
...e.widths[t] ?? {},
|
|
822
693
|
...r
|
|
@@ -870,30 +741,30 @@ var Y = w((e) => ({
|
|
|
870
741
|
return J(t), t;
|
|
871
742
|
});
|
|
872
743
|
}
|
|
873
|
-
})),
|
|
874
|
-
function
|
|
875
|
-
typeof window > "u" ||
|
|
744
|
+
})), Be = !1;
|
|
745
|
+
function Ve() {
|
|
746
|
+
typeof window > "u" || Be || (Be = !0, window.addEventListener("storage", (e) => {
|
|
876
747
|
let t = K();
|
|
877
748
|
if (!t || e.key !== t || e.newValue == null) return;
|
|
878
|
-
let n =
|
|
879
|
-
n && Y.setState((e) =>
|
|
749
|
+
let n = Le(e.newValue);
|
|
750
|
+
n && Y.setState((e) => Re(e, n));
|
|
880
751
|
}));
|
|
881
752
|
}
|
|
882
|
-
var
|
|
883
|
-
function
|
|
884
|
-
let t = !!e && K() !== null, n = Y((t) => e ? t.widths[e] : void 0), r = Y((e) => e.resizeEduShown === !0), i =
|
|
753
|
+
var He = {}, X = () => {};
|
|
754
|
+
function Ue(e) {
|
|
755
|
+
let t = !!e && K() !== null, n = Y((t) => e ? t.widths[e] : void 0), r = Y((e) => e.resizeEduShown === !0), i = g((n, r) => {
|
|
885
756
|
t && e && Y.getState().setWidth(e, n, r);
|
|
886
|
-
}, [t, e]), a =
|
|
757
|
+
}, [t, e]), a = g((n) => {
|
|
887
758
|
t && e && Y.getState().setWidths(e, n);
|
|
888
|
-
}, [t, e]), o =
|
|
759
|
+
}, [t, e]), o = g(() => {
|
|
889
760
|
t && e && Y.getState().resetWidths(e);
|
|
890
|
-
}, [t, e]), s =
|
|
761
|
+
}, [t, e]), s = g((n) => {
|
|
891
762
|
t && e && Y.getState().prune(e, n);
|
|
892
|
-
}, [t, e]), c =
|
|
763
|
+
}, [t, e]), c = g(() => {
|
|
893
764
|
t && Y.getState().markResizeEduShown();
|
|
894
765
|
}, [t]);
|
|
895
766
|
return {
|
|
896
|
-
widths: t ? n ??
|
|
767
|
+
widths: t ? n ?? He : He,
|
|
897
768
|
resizeEduShown: r,
|
|
898
769
|
setWidth: t ? i : X,
|
|
899
770
|
setWidths: t ? a : X,
|
|
@@ -904,29 +775,29 @@ function rt(e) {
|
|
|
904
775
|
}
|
|
905
776
|
//#endregion
|
|
906
777
|
//#region src/lib/canonical-url.ts
|
|
907
|
-
function
|
|
778
|
+
function We(e) {
|
|
908
779
|
return e.length > 1 && e.endsWith("/") ? e.replace(/\/+$/, "") || "/" : e;
|
|
909
780
|
}
|
|
910
781
|
function Z(e) {
|
|
911
|
-
let t =
|
|
912
|
-
for (let e of
|
|
913
|
-
|
|
914
|
-
let o =
|
|
782
|
+
let t = We(e.pathname), r = e.search ?? "", i = r.startsWith("?") ? r.slice(1) : r, a = new URLSearchParams(i);
|
|
783
|
+
for (let e of n) a.delete(e);
|
|
784
|
+
a.sort();
|
|
785
|
+
let o = a.toString();
|
|
915
786
|
return o ? `${t}?${o}` : t;
|
|
916
787
|
}
|
|
917
|
-
function
|
|
918
|
-
return
|
|
788
|
+
function Ge(e) {
|
|
789
|
+
return We(e.pathname);
|
|
919
790
|
}
|
|
920
791
|
//#endregion
|
|
921
792
|
//#region src/hooks/usePageStateTtl.ts
|
|
922
|
-
var
|
|
923
|
-
function
|
|
924
|
-
let { value: e } =
|
|
925
|
-
return typeof e != "number" || !Number.isFinite(e) || e < 0 ?
|
|
793
|
+
var Ke = "ui_page_state_ttl_ms";
|
|
794
|
+
function qe() {
|
|
795
|
+
let { value: e } = r(Ke, L);
|
|
796
|
+
return typeof e != "number" || !Number.isFinite(e) || e < 0 ? L : e;
|
|
926
797
|
}
|
|
927
798
|
//#endregion
|
|
928
799
|
//#region src/hooks/usePageStateRuntime.ts
|
|
929
|
-
var
|
|
800
|
+
var Je = [
|
|
930
801
|
["entity-data"],
|
|
931
802
|
["entity-count"],
|
|
932
803
|
["entity-item"],
|
|
@@ -934,27 +805,27 @@ var ct = [
|
|
|
934
805
|
["entity-data-all"],
|
|
935
806
|
["action-data"],
|
|
936
807
|
["action-data-cursor"]
|
|
937
|
-
],
|
|
938
|
-
function
|
|
939
|
-
for (let n of
|
|
940
|
-
}
|
|
941
|
-
function
|
|
942
|
-
let e =
|
|
943
|
-
r.current = n,
|
|
944
|
-
if (U.getState().setTtl(t),
|
|
945
|
-
}, [e, t]),
|
|
808
|
+
], Ye = 6e4;
|
|
809
|
+
function Xe(e, t) {
|
|
810
|
+
for (let n of Je) e.setQueryDefaults(n, { gcTime: t });
|
|
811
|
+
}
|
|
812
|
+
function Ze() {
|
|
813
|
+
let e = y(), t = qe(), n = ie(), r = te(n);
|
|
814
|
+
r.current = n, _(() => (z(e), () => z(null)), [e]), _(() => {
|
|
815
|
+
if (U.getState().setTtl(t), Xe(e, t), t <= 0) for (let t of Je) e.removeQueries({ queryKey: t });
|
|
816
|
+
}, [e, t]), _(() => {
|
|
946
817
|
if (t <= 0) return;
|
|
947
818
|
let e = setInterval(() => {
|
|
948
819
|
let e = U.getState(), t = r.current;
|
|
949
|
-
e.touch(Z(t)), e.touch(
|
|
950
|
-
},
|
|
820
|
+
e.touch(Z(t)), e.touch(Ge(t)), e.sweep(Date.now());
|
|
821
|
+
}, Ye);
|
|
951
822
|
return () => clearInterval(e);
|
|
952
823
|
}, [t]);
|
|
953
824
|
}
|
|
954
|
-
function
|
|
955
|
-
let n = Z(
|
|
956
|
-
|
|
957
|
-
|
|
825
|
+
function Qe(e, t = !0) {
|
|
826
|
+
let n = Z(ie()), r = e ? JSON.stringify(e) : "";
|
|
827
|
+
_(() => {
|
|
828
|
+
t && e && U.getState().registerQueryKey(n, e);
|
|
958
829
|
}, [
|
|
959
830
|
n,
|
|
960
831
|
r,
|
|
@@ -964,119 +835,119 @@ function ft(e, t = !0) {
|
|
|
964
835
|
//#endregion
|
|
965
836
|
//#region src/hooks/useMutations.ts
|
|
966
837
|
function Q(e) {
|
|
967
|
-
|
|
838
|
+
f.error(e.message);
|
|
968
839
|
}
|
|
969
|
-
function $(
|
|
970
|
-
|
|
840
|
+
function $(t, n, r = {}) {
|
|
841
|
+
t.invalidateQueries({ queryKey: ["entity-data", n] }), t.invalidateQueries({ queryKey: ["entity-count", n] }), r.item && t.invalidateQueries({ queryKey: ["entity-item", n] }), r.children && t.invalidateQueries({ queryKey: [e, n] }), r.objectMeta && (t.invalidateQueries({ queryKey: ["object-status", n] }), t.invalidateQueries({ queryKey: ["object-properties", n] }));
|
|
971
842
|
}
|
|
972
|
-
function
|
|
973
|
-
let t =
|
|
974
|
-
return
|
|
975
|
-
mutationFn: (t) =>
|
|
843
|
+
function $e(e) {
|
|
844
|
+
let t = y();
|
|
845
|
+
return v({
|
|
846
|
+
mutationFn: (t) => s(e, t),
|
|
976
847
|
onSuccess: () => {
|
|
977
|
-
$(t, e),
|
|
848
|
+
$(t, e), f.success("Record created");
|
|
978
849
|
},
|
|
979
850
|
onError: Q
|
|
980
851
|
});
|
|
981
852
|
}
|
|
982
|
-
function
|
|
983
|
-
let t =
|
|
984
|
-
return
|
|
985
|
-
mutationFn: ({ pkValues: t, data: n }) =>
|
|
986
|
-
onSuccess: (
|
|
987
|
-
let
|
|
853
|
+
function et(e) {
|
|
854
|
+
let t = y(), n = u((e) => e.isAuthenticated), { data: r } = m();
|
|
855
|
+
return v({
|
|
856
|
+
mutationFn: ({ pkValues: t, data: n }) => p(e, t, n),
|
|
857
|
+
onSuccess: (i, { pkValues: a }) => {
|
|
858
|
+
let o = r?.entities?.[e], s = typeof a == "string" ? o ? d(o, a) : void 0 : a, l = () => $(t, e, {
|
|
988
859
|
item: !0,
|
|
989
860
|
children: !0,
|
|
990
861
|
objectMeta: !0
|
|
991
862
|
});
|
|
992
|
-
|
|
863
|
+
s ? (c(t, n, e, [s], l), tt(t, e)) : l(), f.success("Record updated");
|
|
993
864
|
},
|
|
994
865
|
onError: Q
|
|
995
866
|
});
|
|
996
867
|
}
|
|
997
|
-
function
|
|
998
|
-
|
|
868
|
+
function tt(t, n) {
|
|
869
|
+
t.invalidateQueries({ queryKey: ["entity-item", n] }), t.invalidateQueries({ queryKey: [e, n] }), t.invalidateQueries({ queryKey: ["object-status", n] }), t.invalidateQueries({ queryKey: ["object-properties", n] });
|
|
999
870
|
}
|
|
1000
|
-
function
|
|
1001
|
-
let t =
|
|
1002
|
-
return
|
|
1003
|
-
mutationFn: (t) =>
|
|
871
|
+
function nt(e) {
|
|
872
|
+
let t = y();
|
|
873
|
+
return v({
|
|
874
|
+
mutationFn: (t) => a(e, t),
|
|
1004
875
|
onSuccess: () => {
|
|
1005
|
-
$(t, e, { item: !0 }),
|
|
876
|
+
$(t, e, { item: !0 }), f.success("Record deleted");
|
|
1006
877
|
},
|
|
1007
878
|
onError: Q
|
|
1008
879
|
});
|
|
1009
880
|
}
|
|
1010
|
-
function
|
|
1011
|
-
let t =
|
|
1012
|
-
return
|
|
1013
|
-
mutationFn: (t) =>
|
|
881
|
+
function rt(e) {
|
|
882
|
+
let t = y();
|
|
883
|
+
return v({
|
|
884
|
+
mutationFn: (t) => l(e, t),
|
|
1014
885
|
onSuccess: () => {
|
|
1015
886
|
$(t, e, {
|
|
1016
887
|
item: !0,
|
|
1017
888
|
objectMeta: !0
|
|
1018
|
-
}),
|
|
889
|
+
}), f.success("Record restored");
|
|
1019
890
|
},
|
|
1020
891
|
onError: Q
|
|
1021
892
|
});
|
|
1022
893
|
}
|
|
1023
894
|
//#endregion
|
|
1024
895
|
//#region src/hooks/useScreenBack.ts
|
|
1025
|
-
function
|
|
1026
|
-
let
|
|
896
|
+
function it(e) {
|
|
897
|
+
let t = ae(), n = o(), r = i(), a = I((e) => e.depth), { data: s } = m(), c = e?.fallback, l = F((e) => {
|
|
1027
898
|
let t = e.tabs.find((t) => t.id === e.activeTabId);
|
|
1028
899
|
return t ? t.returnTo : void 0;
|
|
1029
|
-
}), { hasOriginBack:
|
|
1030
|
-
if (
|
|
1031
|
-
|
|
900
|
+
}), { hasOriginBack: u, allowFallbackBack: d } = ee(() => Oe(l, n.enabled), [l, n.enabled]), f = g(() => {
|
|
901
|
+
if (n.enabled) {
|
|
902
|
+
I.getState().depth > 0 ? r() : c?.();
|
|
1032
903
|
return;
|
|
1033
904
|
}
|
|
1034
|
-
let e =
|
|
1035
|
-
if (!
|
|
905
|
+
let e = F.getState(), i = ke(e.tabs.find((t) => t.id === e.activeTabId)?.returnTo, e.tabs, !1);
|
|
906
|
+
if (!i) {
|
|
1036
907
|
c?.();
|
|
1037
908
|
return;
|
|
1038
909
|
}
|
|
1039
|
-
if (
|
|
1040
|
-
else if (
|
|
1041
|
-
let
|
|
910
|
+
if (i.kind === "live" && i.tabId) e.commitTabNavigation(i.tabId, { search: i.search ?? "" });
|
|
911
|
+
else if (i.kind === "reopen") {
|
|
912
|
+
let t = i.title ? void 0 : h(i.pathname, s?.screens, s?.entities);
|
|
1042
913
|
e.openTab({
|
|
1043
|
-
pathname:
|
|
1044
|
-
search:
|
|
1045
|
-
title:
|
|
1046
|
-
icon:
|
|
1047
|
-
screen:
|
|
914
|
+
pathname: i.pathname,
|
|
915
|
+
search: i.search ?? "",
|
|
916
|
+
title: i.title ?? t?.title ?? i.pathname,
|
|
917
|
+
icon: i.icon ?? t?.icon,
|
|
918
|
+
screen: i.screen,
|
|
1048
919
|
closable: !0
|
|
1049
920
|
});
|
|
1050
921
|
}
|
|
1051
|
-
|
|
1052
|
-
pathname:
|
|
1053
|
-
search:
|
|
1054
|
-
hash:
|
|
922
|
+
t({
|
|
923
|
+
pathname: i.pathname,
|
|
924
|
+
search: Ee(i.search),
|
|
925
|
+
hash: i.hash || void 0
|
|
1055
926
|
});
|
|
1056
927
|
}, [
|
|
1057
|
-
|
|
1058
|
-
a,
|
|
1059
|
-
c,
|
|
928
|
+
n.enabled,
|
|
1060
929
|
r,
|
|
930
|
+
c,
|
|
931
|
+
t,
|
|
1061
932
|
s?.screens,
|
|
1062
933
|
s?.entities
|
|
1063
934
|
]);
|
|
1064
935
|
return {
|
|
1065
|
-
canGoBack:
|
|
1066
|
-
hasOriginBack:
|
|
1067
|
-
allowFallbackBack:
|
|
1068
|
-
goBack:
|
|
936
|
+
canGoBack: n.enabled ? a > 0 || !!c : u || !!c,
|
|
937
|
+
hasOriginBack: u,
|
|
938
|
+
allowFallbackBack: d,
|
|
939
|
+
goBack: f
|
|
1069
940
|
};
|
|
1070
941
|
}
|
|
1071
942
|
//#endregion
|
|
1072
943
|
//#region src/components/shared/useOwnRefresh.ts
|
|
1073
|
-
function
|
|
1074
|
-
let [t, n] =
|
|
1075
|
-
return
|
|
944
|
+
function at(e) {
|
|
945
|
+
let [t, n] = ne(!1), r = te(!0);
|
|
946
|
+
return _(() => (r.current = !0, () => {
|
|
1076
947
|
r.current = !1;
|
|
1077
948
|
}), []), {
|
|
1078
949
|
refreshing: t,
|
|
1079
|
-
refresh:
|
|
950
|
+
refresh: g(() => {
|
|
1080
951
|
n(!0);
|
|
1081
952
|
let t = () => {
|
|
1082
953
|
r.current && n(!1);
|
|
@@ -1087,29 +958,29 @@ function yt(e) {
|
|
|
1087
958
|
}
|
|
1088
959
|
//#endregion
|
|
1089
960
|
//#region src/lib/field-classification.ts
|
|
1090
|
-
function
|
|
961
|
+
function ot(e, t) {
|
|
1091
962
|
let n = e?.field_access?.[t];
|
|
1092
963
|
return !n || n.read === "granted";
|
|
1093
964
|
}
|
|
1094
|
-
function
|
|
965
|
+
function st(e, t) {
|
|
1095
966
|
let n = e?.field_access?.[t];
|
|
1096
967
|
return !n || n.write === "granted";
|
|
1097
968
|
}
|
|
1098
|
-
function
|
|
969
|
+
function ct(e, t) {
|
|
1099
970
|
return e?.field_access?.[t]?.classification;
|
|
1100
971
|
}
|
|
1101
|
-
function
|
|
972
|
+
function lt(e, t) {
|
|
1102
973
|
return e?.field_access?.[t]?.required_permission;
|
|
1103
974
|
}
|
|
1104
|
-
function
|
|
1105
|
-
let r =
|
|
975
|
+
function ut(e, t, n) {
|
|
976
|
+
let r = ct(t, n);
|
|
1106
977
|
if (r) return e?.classifications?.[r];
|
|
1107
978
|
}
|
|
1108
|
-
function
|
|
1109
|
-
return !!
|
|
979
|
+
function dt(e, t, n) {
|
|
980
|
+
return !!ut(e, t, n)?.sod_protected;
|
|
1110
981
|
}
|
|
1111
|
-
function
|
|
982
|
+
function ft(e, t) {
|
|
1112
983
|
return e?.field_access?.[t];
|
|
1113
984
|
}
|
|
1114
985
|
//#endregion
|
|
1115
|
-
export {
|
|
986
|
+
export { Ce as A, Ue as C, U as D, L as E, F as M, w as N, Me as O, E as P, Ve as S, Pe as T, Ke as _, ot as a, Z as b, at as c, nt as d, rt as f, Qe as g, Ze as h, lt as i, be as j, I as k, it as l, Xe as m, ft as n, dt as o, et as p, ct as r, st as s, ut as t, $e as u, qe as v, Y as w, Fe as x, Ge as y };
|