@declarion/react 0.87.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,19 +1,19 @@
|
|
|
1
1
|
import { coerceDisplayString as e } from "../../lib/display-value.js";
|
|
2
|
-
import { buildDetailHrefFromId as t, entityAllowsMutation as n,
|
|
3
|
-
import { useEmbed as
|
|
4
|
-
import { useFirstScreenSettled as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import { useResponsiveMode as re } from "../../hooks/useResponsiveMode.js";
|
|
2
|
+
import { buildDetailHrefFromId as t, entityAllowsMutation as n, getDisplayValue as ee, pkValuesToDetailId as r } from "../../types/schema.js";
|
|
3
|
+
import { useEmbed as i } from "../../embed/EmbedContext.js";
|
|
4
|
+
import { useFirstScreenSettled as a } from "../../lib/capabilityPrefetch.js";
|
|
5
|
+
import { usePreferencesStore as te } from "../../stores/preferences.js";
|
|
6
|
+
import { useAuthStore as ne } from "../../stores/auth.js";
|
|
7
|
+
import { useSchema as re } from "../../hooks/useSchema.js";
|
|
9
8
|
import { executeAction as ie } from "../../api/data.js";
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
9
|
+
import { useText as ae } from "../../hooks/useText.js";
|
|
10
|
+
import { useResponsiveMode as oe } from "../../hooks/useResponsiveMode.js";
|
|
11
|
+
import { useTabStore as se } from "../../stores/tabs.js";
|
|
12
|
+
import { useTabNavigate as ce } from "../../hooks/useTabNavigate.js";
|
|
13
|
+
import { filterUnavailableMutationActions as o, getScreenActions as le } from "../../lib/actions.js";
|
|
14
14
|
import { useScreenIsLive as ue } from "../../stores/realtime.js";
|
|
15
15
|
import { useDebounce as de } from "../../hooks/useDebounce.js";
|
|
16
|
-
import { FileDraftScope as
|
|
16
|
+
import { FileDraftScope as s, useFileDraftScope as fe } from "../file-widgets/draft-scope.js";
|
|
17
17
|
import { getSchemaFieldValue as pe, serializeSchemaFieldValue as me } from "../file-widgets/host.js";
|
|
18
18
|
import { buildFilesPayload as he, collectCommittedFileIds as ge } from "../file-widgets/payload.js";
|
|
19
19
|
import { resolveCellRenderer as _e } from "../fields/cells/registry.js";
|
|
@@ -55,156 +55,157 @@ import { ListFloatbar as it } from "./list/ListFloatbar.js";
|
|
|
55
55
|
import { buildListColumns as at } from "./list/columns.js";
|
|
56
56
|
import { RowContextMenu as ot } from "./list/RowContextMenu.js";
|
|
57
57
|
import { useHeaderReorder as st } from "./list/useHeaderReorder.js";
|
|
58
|
-
import { Suspense as ct, lazy as
|
|
59
|
-
import { Fragment as
|
|
60
|
-
import { useSearchParams as
|
|
61
|
-
import { useTable as
|
|
62
|
-
import { useVirtualizer as
|
|
58
|
+
import { Suspense as ct, lazy as c, useCallback as l, useEffect as u, useMemo as d, useRef as f, useState as lt } from "react";
|
|
59
|
+
import { Fragment as ut, jsx as p, jsxs as dt } from "react/jsx-runtime";
|
|
60
|
+
import { useSearchParams as ft } from "react-router";
|
|
61
|
+
import { useTable as pt } from "@tanstack/react-table";
|
|
62
|
+
import { useVirtualizer as mt } from "@tanstack/react-virtual";
|
|
63
63
|
//#region src/components/pages/SmartListPage.impl.tsx
|
|
64
|
-
var
|
|
65
|
-
function
|
|
66
|
-
return /* @__PURE__ */ p(
|
|
64
|
+
var ht = c(() => import("./list/ListCardsBody.js").then((e) => ({ default: e.ListCardsBody })));
|
|
65
|
+
function gt({ screenCode: e }) {
|
|
66
|
+
return /* @__PURE__ */ p(s, { children: /* @__PURE__ */ p(m, { screenCode: e }) });
|
|
67
67
|
}
|
|
68
|
-
var
|
|
69
|
-
function m({ screenCode:
|
|
70
|
-
let
|
|
68
|
+
var _t = [];
|
|
69
|
+
function m({ screenCode: s }) {
|
|
70
|
+
let c = ae(), gt = ae("errors"), m = ce(), [h, g] = ft(), { data: _ } = re(), [vt, v] = lt(!1), [yt, y] = lt(!1), [bt, xt] = lt(null), St = ne((e) => e.user), Ct = ne((e) => e.activeTenant), wt = fe(), b = _?.screens[s], x = b?.entity ? _?.entities[b.entity] : void 0, S = b?.entity, Tt = n(x, "create"), Et = n(x, "update"), Dt = n(x, "delete"), C = _?.actions, w = d(() => o(le(x?.actions, b?.actions, "list_toolbar", C), x), [
|
|
71
71
|
x,
|
|
72
72
|
b?.actions,
|
|
73
|
-
|
|
74
|
-
]),
|
|
73
|
+
C
|
|
74
|
+
]), T = d(() => o(le(x?.actions, void 0, "list_floatbar", C), x), [x, C]), E = d(() => {
|
|
75
75
|
let e = /* @__PURE__ */ new Map(), t = (t) => {
|
|
76
|
-
for (let n of le(x?.actions, t, "list_row",
|
|
76
|
+
for (let n of le(x?.actions, t, "list_row", C)) e.set(n.code, n);
|
|
77
77
|
};
|
|
78
78
|
t(b?.row_actions);
|
|
79
79
|
for (let e of b?.variants?.items() ?? []) e.row_actions !== void 0 && t(e.row_actions);
|
|
80
|
-
return
|
|
80
|
+
return o([...e.values()], x);
|
|
81
81
|
}, [
|
|
82
82
|
x,
|
|
83
83
|
b,
|
|
84
|
-
|
|
85
|
-
]),
|
|
86
|
-
|
|
84
|
+
C
|
|
85
|
+
]), Ot = b?.row_actions !== void 0, kt = d(() => T.length > 0 || x?.export?.enabled !== !1 && b?.export?.enabled !== !1, [
|
|
86
|
+
T,
|
|
87
87
|
x?.export?.enabled,
|
|
88
88
|
b?.export?.enabled
|
|
89
|
-
]),
|
|
89
|
+
]), At = !!x?.soft_delete, jt = At && (St?.permissions ?? []).some((e) => e === "feature:view_deleted" || e === "feature:*" || e === "*"), Mt = jt && h.get("include_deleted") === "true", Nt = i(), { openTab: Pt, updateTabSearch: Ft, findTabByPathname: It } = se();
|
|
90
90
|
Ce(b, x, h.toString()), we(b?.route);
|
|
91
|
-
let
|
|
92
|
-
if (!b?.route || !x ||
|
|
93
|
-
let t =
|
|
94
|
-
t ?
|
|
91
|
+
let Lt = l((e) => {
|
|
92
|
+
if (!b?.route || !x || Nt.enabled) return;
|
|
93
|
+
let t = It(b.route);
|
|
94
|
+
t ? Ft(t.id, e) : Pt({
|
|
95
95
|
pathname: b.route,
|
|
96
96
|
search: e,
|
|
97
|
-
title:
|
|
97
|
+
title: c(b.display?.name) || c(x.display.name_plural),
|
|
98
98
|
icon: b.display?.icon || x.display.icon,
|
|
99
99
|
closable: !0
|
|
100
100
|
});
|
|
101
101
|
}, [
|
|
102
|
-
|
|
102
|
+
c,
|
|
103
103
|
b,
|
|
104
104
|
x,
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
]),
|
|
105
|
+
Nt.enabled,
|
|
106
|
+
It,
|
|
107
|
+
Ft,
|
|
108
|
+
Pt
|
|
109
|
+
]), D = parseInt(h.get("page") ?? "1", 10), O = (() => {
|
|
110
110
|
let e = parseInt(h.get("per_page") ?? "", 10);
|
|
111
111
|
return !Number.isFinite(e) || e <= 0 || e > 1e3 ? 200 : e;
|
|
112
|
-
})(),
|
|
112
|
+
})(), Rt = h.get("search") ?? "", zt = d(() => {
|
|
113
113
|
let e = be(h);
|
|
114
|
-
return e.error === null ? null :
|
|
115
|
-
}, [
|
|
116
|
-
screenCode:
|
|
114
|
+
return e.error === null ? null : gt(e.errorCode ?? "", e.error);
|
|
115
|
+
}, [gt, h]), k = Fe({
|
|
116
|
+
screenCode: s,
|
|
117
117
|
screen: b,
|
|
118
118
|
entity: x,
|
|
119
119
|
searchParams: h,
|
|
120
120
|
setSearchParams: g,
|
|
121
|
-
userId:
|
|
122
|
-
tenantId:
|
|
123
|
-
filterError: !!
|
|
124
|
-
}), { filters:
|
|
121
|
+
userId: St?.id,
|
|
122
|
+
tenantId: Ct?.id,
|
|
123
|
+
filterError: !!zt
|
|
124
|
+
}), { filters: Bt, columns: Vt, sort: Ht } = k.defaults, { filters: Ut, setFilters: A, clearFilters: Wt } = Se({ defaults: Bt }), { visibleFilterState: Gt, filterFieldMeta: Kt, allFilterFieldMeta: qt, filterFieldName: Jt } = Le(b, x, _?.entities, Ut), j = Gt.filters, Yt = ye(j), Xt = l(() => A(_t), [A]), Zt = Be({
|
|
125
125
|
searchParams: h,
|
|
126
126
|
setSearchParams: g,
|
|
127
|
-
defaultSort:
|
|
128
|
-
commitScreenTabSearch:
|
|
129
|
-
}), { cols:
|
|
130
|
-
screenCode:
|
|
127
|
+
defaultSort: Ht,
|
|
128
|
+
commitScreenTabSearch: Lt
|
|
129
|
+
}), { cols: Qt, nullsByField: $t, value: en, forRequest: tn, tableSorting: nn, write: rn, applyColumn: an, shiftClickColumn: on, appendColumn: sn, clearColumn: cn, clearAll: ln } = Zt, un = Ue({
|
|
130
|
+
screenCode: s,
|
|
131
131
|
screen: b,
|
|
132
132
|
searchParams: h,
|
|
133
133
|
setSearchParams: g,
|
|
134
|
-
defaultColumns:
|
|
135
|
-
}), { visible:
|
|
136
|
-
screenCode:
|
|
134
|
+
defaultColumns: Vt
|
|
135
|
+
}), { visible: M, sizing: dn, setSizing: fn, apply: pn, commitResize: mn } = un, hn = Qe({
|
|
136
|
+
screenCode: s,
|
|
137
137
|
screen: b,
|
|
138
138
|
entity: x,
|
|
139
139
|
searchParams: h,
|
|
140
140
|
setSearchParams: g,
|
|
141
|
-
userId:
|
|
142
|
-
tenantId:
|
|
143
|
-
all:
|
|
144
|
-
activeId:
|
|
145
|
-
active:
|
|
146
|
-
clearedKey:
|
|
147
|
-
filters:
|
|
148
|
-
visibleColumns:
|
|
149
|
-
sort:
|
|
150
|
-
}), { active:
|
|
151
|
-
let e = b?.responsive?.[
|
|
152
|
-
return e === "table" || e === "cards" ? e :
|
|
153
|
-
}, [b?.responsive,
|
|
141
|
+
userId: St?.id,
|
|
142
|
+
tenantId: Ct?.id,
|
|
143
|
+
all: k.all,
|
|
144
|
+
activeId: k.activeId,
|
|
145
|
+
active: k.active,
|
|
146
|
+
clearedKey: k.clearedKey,
|
|
147
|
+
filters: Ut,
|
|
148
|
+
visibleColumns: M,
|
|
149
|
+
sort: en
|
|
150
|
+
}), { active: N, saveAsNew: gn, overwriteActive: _n, isSaving: vn } = hn, yn = de(Rt, 300), P = oe(), F = d(() => {
|
|
151
|
+
let e = b?.responsive?.[P.category]?.presentation;
|
|
152
|
+
return e === "table" || e === "cards" ? e : P.category === "phone" ? "cards" : "table";
|
|
153
|
+
}, [b?.responsive, P.category]), bn = d(() => Me({
|
|
154
154
|
entity: x,
|
|
155
155
|
screen: b,
|
|
156
|
-
savedViewColumns:
|
|
156
|
+
savedViewColumns: N?.columns
|
|
157
157
|
}), [
|
|
158
158
|
x,
|
|
159
159
|
b,
|
|
160
|
-
|
|
161
|
-
]),
|
|
160
|
+
N?.columns
|
|
161
|
+
]), xn = d(() => Ne({
|
|
162
162
|
entity: x,
|
|
163
163
|
screen: b,
|
|
164
|
-
presentation:
|
|
165
|
-
visibleColumns:
|
|
166
|
-
card:
|
|
167
|
-
rowActions:
|
|
168
|
-
toolbarActions:
|
|
169
|
-
bulkActions:
|
|
170
|
-
sort:
|
|
164
|
+
presentation: F,
|
|
165
|
+
visibleColumns: M,
|
|
166
|
+
card: bn,
|
|
167
|
+
rowActions: E,
|
|
168
|
+
toolbarActions: w,
|
|
169
|
+
bulkActions: T,
|
|
170
|
+
sort: Qt,
|
|
171
171
|
screens: _?.screens
|
|
172
172
|
}), [
|
|
173
173
|
x,
|
|
174
174
|
b,
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
D,
|
|
179
|
-
T,
|
|
175
|
+
F,
|
|
176
|
+
M,
|
|
177
|
+
bn,
|
|
180
178
|
E,
|
|
181
|
-
|
|
179
|
+
w,
|
|
180
|
+
T,
|
|
181
|
+
Qt,
|
|
182
182
|
_?.screens
|
|
183
|
-
]),
|
|
183
|
+
]), Sn = ze({
|
|
184
184
|
entity: x,
|
|
185
185
|
entityCode: S,
|
|
186
186
|
screen: b,
|
|
187
|
-
screenCode:
|
|
188
|
-
page:
|
|
189
|
-
perPage:
|
|
190
|
-
sortForRequest:
|
|
191
|
-
debouncedSearch:
|
|
192
|
-
filters:
|
|
193
|
-
isHeld:
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
187
|
+
screenCode: s,
|
|
188
|
+
page: D,
|
|
189
|
+
perPage: O,
|
|
190
|
+
sortForRequest: tn,
|
|
191
|
+
debouncedSearch: yn,
|
|
192
|
+
filters: j,
|
|
193
|
+
isHeld: k.isHeld,
|
|
194
|
+
prefetchWhileHeld: k.prefetchWhileHeld,
|
|
195
|
+
retryHeld: k.retryViews,
|
|
196
|
+
includeDeleted: Mt,
|
|
197
|
+
expand: xn.expandFields,
|
|
198
|
+
select: xn.selectFields,
|
|
198
199
|
runCountQuery: !0,
|
|
199
200
|
urlKey: `${S ?? ""}|${h.toString()}`
|
|
200
|
-
}), { rows:
|
|
201
|
-
|
|
202
|
-
let
|
|
203
|
-
H.current =
|
|
204
|
-
let
|
|
201
|
+
}), { rows: I, meta: Cn, refs: wn, isLoading: L, isFetching: Tn, isShowingPreviousRows: En, isError: Dn, error: On, isLoadingStale: kn, retry: An, countTotal: jn, countStrategy: Mn, countLoading: Nn, countError: Pn, totalPages: R, hasMorePages: Fn, isCursor: In, fetchNextPage: Ln, isFetchingNextPage: Rn } = Sn;
|
|
202
|
+
a(!L);
|
|
203
|
+
let zn = He(x, I, Tn), { state: Bn, setState: z, ids: B, pkValues: Vn, rows: Hn, keyOf: V } = zn, Un = ue(x?.realtime, S ?? ""), Wn = ve(S ?? ""), H = f(wn);
|
|
204
|
+
H.current = wn;
|
|
205
|
+
let Gn = d(() => {
|
|
205
206
|
let e = /* @__PURE__ */ new Map();
|
|
206
207
|
if (!x) return e;
|
|
207
|
-
for (let t of Pe(x, b,
|
|
208
|
+
for (let t of Pe(x, b, N?.columns)) {
|
|
208
209
|
if (t.startsWith("$") || x.files?.get(t)) continue;
|
|
209
210
|
let n = x.fields.get(t);
|
|
210
211
|
n && e.set(t, _e({
|
|
@@ -216,7 +217,7 @@ function m({ screenCode: o }) {
|
|
|
216
217
|
entities: _?.entities,
|
|
217
218
|
screens: _?.screens,
|
|
218
219
|
refs: () => H.current,
|
|
219
|
-
t:
|
|
220
|
+
t: c
|
|
220
221
|
}));
|
|
221
222
|
}
|
|
222
223
|
return e;
|
|
@@ -224,39 +225,39 @@ function m({ screenCode: o }) {
|
|
|
224
225
|
x,
|
|
225
226
|
S,
|
|
226
227
|
b,
|
|
227
|
-
|
|
228
|
+
N?.columns,
|
|
228
229
|
_?.entities,
|
|
229
230
|
_?.screens,
|
|
230
231
|
H,
|
|
231
|
-
|
|
232
|
-
]), { labelFor:
|
|
232
|
+
c
|
|
233
|
+
]), { labelFor: Kn, refs: qn } = tt(qt, j, wn, _?.entities), U = We({
|
|
233
234
|
entity: x,
|
|
234
235
|
screen: b,
|
|
235
236
|
screens: _?.screens,
|
|
236
237
|
entities: _?.entities,
|
|
237
238
|
searchParams: h,
|
|
238
239
|
tabNavigate: m,
|
|
239
|
-
commitScreenTabSearch:
|
|
240
|
-
isPhone:
|
|
241
|
-
canUpdate:
|
|
242
|
-
}), { peekAllowed: W, peekRow: G, setPeekRow: K, peekFields:
|
|
240
|
+
commitScreenTabSearch: Lt,
|
|
241
|
+
isPhone: P.category === "phone",
|
|
242
|
+
canUpdate: Et
|
|
243
|
+
}), { peekAllowed: W, peekRow: G, setPeekRow: K, peekFields: Jn, peekActions: Yn, peekExecute: Xn, contextMenu: q, setContextMenu: Zn } = U, J = d(() => !b || !x ? !1 : t(b, "_", x, _?.screens) !== null, [
|
|
243
244
|
b,
|
|
244
245
|
x,
|
|
245
246
|
_?.screens
|
|
246
|
-
]),
|
|
247
|
-
visibleCols:
|
|
247
|
+
]), Qn = d(() => at({
|
|
248
|
+
visibleCols: M,
|
|
248
249
|
entity: x,
|
|
249
250
|
screen: b,
|
|
250
251
|
schema: _,
|
|
251
252
|
entityCode: S,
|
|
252
|
-
rowActions:
|
|
253
|
-
hasBatchActions:
|
|
254
|
-
hasExplicitRowActions:
|
|
255
|
-
canUpdate:
|
|
256
|
-
canDelete:
|
|
253
|
+
rowActions: E,
|
|
254
|
+
hasBatchActions: kt,
|
|
255
|
+
hasExplicitRowActions: Ot,
|
|
256
|
+
canUpdate: Et,
|
|
257
|
+
canDelete: Dt,
|
|
257
258
|
peekEnabled: W,
|
|
258
259
|
hasDetailTarget: J,
|
|
259
|
-
t:
|
|
260
|
+
t: c,
|
|
260
261
|
tabNavigate: m,
|
|
261
262
|
refsRef: H,
|
|
262
263
|
rowSelectionKey: Ve,
|
|
@@ -264,132 +265,132 @@ function m({ screenCode: o }) {
|
|
|
264
265
|
}), [
|
|
265
266
|
b,
|
|
266
267
|
x,
|
|
267
|
-
|
|
268
|
+
M,
|
|
268
269
|
m,
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
270
|
+
kt,
|
|
271
|
+
E,
|
|
272
|
+
Ot,
|
|
272
273
|
S,
|
|
273
274
|
W,
|
|
274
275
|
J,
|
|
275
276
|
_,
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
277
|
+
c,
|
|
278
|
+
Et,
|
|
279
|
+
Dt,
|
|
279
280
|
H,
|
|
280
281
|
K
|
|
281
|
-
]), Y =
|
|
282
|
+
]), Y = pt({
|
|
282
283
|
features: Ie,
|
|
283
|
-
data:
|
|
284
|
-
columns:
|
|
284
|
+
data: I,
|
|
285
|
+
columns: Qn,
|
|
285
286
|
manualSorting: !0,
|
|
286
287
|
enableColumnResizing: !0,
|
|
287
288
|
columnResizeMode: "onChange",
|
|
288
|
-
onColumnSizingChange:
|
|
289
|
+
onColumnSizingChange: fn,
|
|
289
290
|
state: {
|
|
290
|
-
sorting:
|
|
291
|
-
rowSelection:
|
|
292
|
-
columnSizing:
|
|
291
|
+
sorting: nn,
|
|
292
|
+
rowSelection: Bn,
|
|
293
|
+
columnSizing: dn
|
|
293
294
|
},
|
|
294
295
|
onSortingChange: (e) => {
|
|
295
|
-
let t = (typeof e == "function" ? e(
|
|
296
|
+
let t = (typeof e == "function" ? e(nn) : e).slice(0, 5);
|
|
296
297
|
if (t.length === 0) {
|
|
297
|
-
|
|
298
|
+
rn([]);
|
|
298
299
|
return;
|
|
299
300
|
}
|
|
300
301
|
let n = t.map((e) => {
|
|
301
|
-
let t =
|
|
302
|
+
let t = $t.get(e.id);
|
|
302
303
|
return {
|
|
303
304
|
field: e.id,
|
|
304
305
|
dir: e.desc ? "desc" : "asc",
|
|
305
306
|
...t ? { nulls: t } : {}
|
|
306
307
|
};
|
|
307
308
|
});
|
|
308
|
-
|
|
309
|
+
rn(n);
|
|
309
310
|
},
|
|
310
311
|
onRowSelectionChange: z,
|
|
311
312
|
getRowId: V
|
|
312
|
-
}), X = Y.state.columnResizing.isResizingColumn,
|
|
313
|
-
|
|
314
|
-
let e =
|
|
315
|
-
|
|
313
|
+
}), X = Y.state.columnResizing.isResizingColumn, $n = f(!1);
|
|
314
|
+
u(() => {
|
|
315
|
+
let e = !!$n.current && !X;
|
|
316
|
+
$n.current = X, e && mn(Y.state.columnSizing);
|
|
316
317
|
}, [
|
|
317
318
|
X,
|
|
318
|
-
|
|
319
|
+
mn,
|
|
319
320
|
Y
|
|
320
321
|
]);
|
|
321
|
-
let
|
|
322
|
-
|
|
322
|
+
let er = Ge(Y), tr = Y.getTotalSize();
|
|
323
|
+
u(() => {
|
|
323
324
|
let e = (e) => {
|
|
324
325
|
let t = e.target?.tagName;
|
|
325
326
|
t === "INPUT" || t === "TEXTAREA" || t === "SELECT" ? e.key === "Escape" && (e.target.blur(), v(!1)) : (e.key === "/" && !e.metaKey && !e.ctrlKey && (e.preventDefault(), document.querySelector("[placeholder*=\"Search\"]")?.focus()), e.key === "f" && !e.metaKey && !e.ctrlKey && (e.preventDefault(), v((e) => !e)), e.key === "Escape" && v(!1));
|
|
326
327
|
};
|
|
327
328
|
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
328
329
|
}, []);
|
|
329
|
-
let Z =
|
|
330
|
-
visibleCols:
|
|
331
|
-
onReorder:
|
|
330
|
+
let Z = f(null), { rows: Q } = Y.getRowModel(), nr = f(null), rr = st({
|
|
331
|
+
visibleCols: M,
|
|
332
|
+
onReorder: pn,
|
|
332
333
|
scrollElRef: Z,
|
|
333
|
-
theadRef:
|
|
334
|
-
}),
|
|
334
|
+
theadRef: nr
|
|
335
|
+
}), ir = te((e) => e.density), ar = te((e) => e.zebra), or = Te(), $ = mt({
|
|
335
336
|
count: Q.length,
|
|
336
337
|
getScrollElement: () => Z.current,
|
|
337
|
-
estimateSize: () =>
|
|
338
|
+
estimateSize: () => F === "cards" ? 142 : 48,
|
|
338
339
|
overscan: 10,
|
|
339
|
-
initialOffset:
|
|
340
|
-
}),
|
|
340
|
+
initialOffset: or
|
|
341
|
+
}), sr = d(() => Q.map((e) => e.id), [Q]);
|
|
341
342
|
Ee({
|
|
342
343
|
virtualizer: $,
|
|
343
344
|
scrollElementRef: Z,
|
|
344
|
-
rowKeys:
|
|
345
|
-
}),
|
|
345
|
+
rowKeys: sr
|
|
346
|
+
}), u(() => {
|
|
346
347
|
$.measure();
|
|
347
|
-
}, [
|
|
348
|
+
}, [ir, $]), u(() => {
|
|
348
349
|
$.measure();
|
|
349
350
|
}, [
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
351
|
+
P.width,
|
|
352
|
+
P.height,
|
|
353
|
+
F,
|
|
353
354
|
$
|
|
354
355
|
]);
|
|
355
|
-
let
|
|
356
|
+
let cr = l((e) => {
|
|
356
357
|
g((t) => {
|
|
357
358
|
let n = new URLSearchParams(t);
|
|
358
359
|
return e ? n.set("search", e) : n.delete("search"), n.set("page", "1"), n;
|
|
359
360
|
});
|
|
360
|
-
}, [g]),
|
|
361
|
+
}, [g]), lr = l(() => {
|
|
361
362
|
g((e) => {
|
|
362
363
|
let t = new URLSearchParams(e);
|
|
363
364
|
return t.get("include_deleted") ? t.delete("include_deleted") : t.set("include_deleted", "true"), t.set("page", "1"), t;
|
|
364
365
|
});
|
|
365
|
-
}, [g]),
|
|
366
|
+
}, [g]), ur = l((e) => {
|
|
366
367
|
g((t) => {
|
|
367
368
|
let n = new URLSearchParams(t);
|
|
368
369
|
return n.set("page", String(e)), n;
|
|
369
370
|
});
|
|
370
371
|
}, [g]);
|
|
371
|
-
|
|
372
|
-
R !== void 0 &&
|
|
372
|
+
u(() => {
|
|
373
|
+
R !== void 0 && D > R && ur(R);
|
|
373
374
|
}, [
|
|
374
375
|
R,
|
|
375
|
-
|
|
376
|
-
|
|
376
|
+
D,
|
|
377
|
+
ur
|
|
377
378
|
]);
|
|
378
|
-
let
|
|
379
|
+
let dr = l((e) => {
|
|
379
380
|
g((t) => {
|
|
380
381
|
let n = new URLSearchParams(t);
|
|
381
382
|
return n.set("per_page", String(e)), n.set("page", "1"), n;
|
|
382
383
|
});
|
|
383
384
|
}, [g]);
|
|
384
385
|
if (!b || !x) return null;
|
|
385
|
-
let
|
|
386
|
+
let fr = x.display, pr = c(b.display?.name) || c(fr.name), mr = b.display?.icon || fr.icon, hr = c(b.display?.description) || c(fr.description), gr = P.category === "phone", _r = F === "cards", vr = Vn.map((e) => r(x, e)), yr = {
|
|
386
387
|
entity: x,
|
|
387
388
|
entityCode: S ?? "",
|
|
388
389
|
screen: b,
|
|
389
390
|
screenRoute: b.route,
|
|
390
|
-
selectedRows:
|
|
391
|
-
selectedIds:
|
|
392
|
-
t:
|
|
391
|
+
selectedRows: Hn,
|
|
392
|
+
selectedIds: vr,
|
|
393
|
+
t: c,
|
|
393
394
|
tabNavigate: (e, t) => m(e, {
|
|
394
395
|
title: t?.title,
|
|
395
396
|
icon: t?.icon,
|
|
@@ -397,7 +398,7 @@ function m({ screenCode: o }) {
|
|
|
397
398
|
}),
|
|
398
399
|
runActionApi: (e, t) => ie(e, t)
|
|
399
400
|
};
|
|
400
|
-
return /* @__PURE__ */
|
|
401
|
+
return /* @__PURE__ */ dt("div", {
|
|
401
402
|
style: {
|
|
402
403
|
display: "flex",
|
|
403
404
|
flexDirection: "column",
|
|
@@ -405,86 +406,86 @@ function m({ screenCode: o }) {
|
|
|
405
406
|
background: "var(--background)"
|
|
406
407
|
},
|
|
407
408
|
children: [
|
|
408
|
-
/* @__PURE__ */ ut
|
|
409
|
+
/* @__PURE__ */ dt(ut, { children: [
|
|
409
410
|
/* @__PURE__ */ p(rt, {
|
|
410
|
-
title:
|
|
411
|
-
description:
|
|
412
|
-
toolbarActions:
|
|
411
|
+
title: pr,
|
|
412
|
+
description: hr,
|
|
413
|
+
toolbarActions: w,
|
|
413
414
|
screenActionLayout: b.action_layout,
|
|
414
415
|
entityActionLayout: x.action_layout,
|
|
415
416
|
selectedIds: B,
|
|
416
|
-
data:
|
|
417
|
+
data: I,
|
|
417
418
|
rowKey: V,
|
|
418
419
|
onActionSuccess: () => z({}),
|
|
419
|
-
widgetContext:
|
|
420
|
+
widgetContext: yr
|
|
420
421
|
}),
|
|
421
422
|
/* @__PURE__ */ p(Xe, {
|
|
422
423
|
screen: b,
|
|
423
424
|
entity: x,
|
|
424
425
|
entityCode: S,
|
|
425
426
|
schema: _,
|
|
426
|
-
screenCode:
|
|
427
|
-
screenName:
|
|
428
|
-
isPhone:
|
|
429
|
-
isCardsPresentation:
|
|
430
|
-
sort:
|
|
431
|
-
columns:
|
|
432
|
-
views:
|
|
433
|
-
query:
|
|
434
|
-
selection:
|
|
427
|
+
screenCode: s,
|
|
428
|
+
screenName: pr,
|
|
429
|
+
isPhone: gr,
|
|
430
|
+
isCardsPresentation: _r,
|
|
431
|
+
sort: Zt,
|
|
432
|
+
columns: un,
|
|
433
|
+
views: hn,
|
|
434
|
+
query: Sn,
|
|
435
|
+
selection: zn,
|
|
435
436
|
filters: {
|
|
436
|
-
json:
|
|
437
|
-
debouncedSearch:
|
|
438
|
-
count:
|
|
437
|
+
json: j,
|
|
438
|
+
debouncedSearch: yn,
|
|
439
|
+
count: Yt,
|
|
439
440
|
onOpen: () => v(!0)
|
|
440
441
|
},
|
|
441
|
-
searchValue:
|
|
442
|
-
onSearchChange:
|
|
442
|
+
searchValue: Rt,
|
|
443
|
+
onSearchChange: cr,
|
|
443
444
|
onSaveView: () => y(!0),
|
|
444
|
-
onDeleteView:
|
|
445
|
-
page:
|
|
446
|
-
perPage:
|
|
447
|
-
includeDeleted:
|
|
448
|
-
canViewDeleted:
|
|
449
|
-
onToggleDeleted:
|
|
445
|
+
onDeleteView: xt,
|
|
446
|
+
page: D,
|
|
447
|
+
perPage: O,
|
|
448
|
+
includeDeleted: Mt,
|
|
449
|
+
canViewDeleted: jt,
|
|
450
|
+
onToggleDeleted: lr,
|
|
450
451
|
realtime: x?.realtime === !0,
|
|
451
|
-
isLive:
|
|
452
|
+
isLive: Un
|
|
452
453
|
}),
|
|
453
454
|
/* @__PURE__ */ p(et, {
|
|
454
|
-
filterError:
|
|
455
|
-
unresolvedViewId:
|
|
456
|
-
onClearFilters:
|
|
457
|
-
onClearView:
|
|
455
|
+
filterError: zt,
|
|
456
|
+
unresolvedViewId: k.isUnresolved ? k.activeId : null,
|
|
457
|
+
onClearFilters: Wt,
|
|
458
|
+
onClearView: k.clearActiveView
|
|
458
459
|
}),
|
|
459
|
-
|
|
460
|
-
|
|
460
|
+
Gt.omitted && /* @__PURE__ */ p(Re, { className: "px-5 pb-2.5" }),
|
|
461
|
+
j.length > 0 && /* @__PURE__ */ p("div", {
|
|
461
462
|
style: { padding: "0 20px 10px" },
|
|
462
463
|
children: /* @__PURE__ */ p(Oe, {
|
|
463
|
-
filters:
|
|
464
|
-
resolveValue:
|
|
465
|
-
onRemoveAtPath: (e) =>
|
|
466
|
-
onClearAll:
|
|
464
|
+
filters: j,
|
|
465
|
+
resolveValue: Kn,
|
|
466
|
+
onRemoveAtPath: (e) => A(xe(j, e)),
|
|
467
|
+
onClearAll: Xt,
|
|
467
468
|
onChipClick: () => v(!0),
|
|
468
|
-
fieldLabel:
|
|
469
|
+
fieldLabel: Jt
|
|
469
470
|
})
|
|
470
471
|
})
|
|
471
472
|
] }),
|
|
472
473
|
/* @__PURE__ */ p(Je, {
|
|
473
|
-
isLoading:
|
|
474
|
-
tableLoadingStale:
|
|
475
|
-
isError:
|
|
476
|
-
error:
|
|
477
|
-
rowCount:
|
|
474
|
+
isLoading: L,
|
|
475
|
+
tableLoadingStale: kn,
|
|
476
|
+
isError: Dn,
|
|
477
|
+
error: On,
|
|
478
|
+
rowCount: I.length,
|
|
478
479
|
entity: x,
|
|
479
480
|
screen: b,
|
|
480
|
-
screenName:
|
|
481
|
-
screenIcon:
|
|
482
|
-
isFiltered: !!
|
|
483
|
-
canCreate:
|
|
484
|
-
toolbarActions:
|
|
485
|
-
onRetry:
|
|
481
|
+
screenName: pr,
|
|
482
|
+
screenIcon: mr,
|
|
483
|
+
isFiltered: !!yn || Yt > 0,
|
|
484
|
+
canCreate: Tt,
|
|
485
|
+
toolbarActions: w,
|
|
486
|
+
onRetry: An
|
|
486
487
|
}),
|
|
487
|
-
|
|
488
|
+
L || Dn || I.length === 0 ? null : /* @__PURE__ */ p("div", {
|
|
488
489
|
style: {
|
|
489
490
|
flex: 1,
|
|
490
491
|
minHeight: 0,
|
|
@@ -492,7 +493,7 @@ function m({ screenCode: o }) {
|
|
|
492
493
|
display: "flex",
|
|
493
494
|
flexDirection: "column"
|
|
494
495
|
},
|
|
495
|
-
children: /* @__PURE__ */
|
|
496
|
+
children: /* @__PURE__ */ dt("div", {
|
|
496
497
|
style: {
|
|
497
498
|
background: "var(--surface)",
|
|
498
499
|
border: "1px solid var(--border)",
|
|
@@ -507,58 +508,58 @@ function m({ screenCode: o }) {
|
|
|
507
508
|
children: [/* @__PURE__ */ p("div", {
|
|
508
509
|
ref: Z,
|
|
509
510
|
"data-testid": "list-scroll",
|
|
510
|
-
"data-presentation":
|
|
511
|
+
"data-presentation": F,
|
|
511
512
|
style: {
|
|
512
513
|
overflow: "auto",
|
|
513
514
|
flex: 1,
|
|
514
515
|
minHeight: 0
|
|
515
516
|
},
|
|
516
|
-
children:
|
|
517
|
+
children: F === "cards" ? /* @__PURE__ */ p(ct, {
|
|
517
518
|
fallback: null,
|
|
518
|
-
children: /* @__PURE__ */ p(
|
|
519
|
+
children: /* @__PURE__ */ p(ht, {
|
|
519
520
|
rows: Q,
|
|
520
521
|
virtualizer: $,
|
|
521
522
|
entity: x,
|
|
522
523
|
screen: b,
|
|
523
524
|
entityCode: S,
|
|
524
525
|
entities: _?.entities,
|
|
525
|
-
savedViewColumns:
|
|
526
|
+
savedViewColumns: N?.columns,
|
|
526
527
|
refs: H.current,
|
|
527
|
-
renderers:
|
|
528
|
-
rowActions:
|
|
528
|
+
renderers: Gn,
|
|
529
|
+
rowActions: E,
|
|
529
530
|
tabNavigate: m,
|
|
530
531
|
interaction: U,
|
|
531
|
-
hasSoftDelete:
|
|
532
|
-
zebra:
|
|
533
|
-
hasBatchActions:
|
|
532
|
+
hasSoftDelete: At,
|
|
533
|
+
zebra: ar,
|
|
534
|
+
hasBatchActions: kt,
|
|
534
535
|
hasDetailTarget: J,
|
|
535
536
|
rowKey: V
|
|
536
537
|
})
|
|
537
538
|
}) : /* @__PURE__ */ p(Ke, {
|
|
538
|
-
showsPreviousRows:
|
|
539
|
+
showsPreviousRows: En,
|
|
539
540
|
table: Y,
|
|
540
|
-
columns:
|
|
541
|
+
columns: Qn,
|
|
541
542
|
rows: Q,
|
|
542
543
|
entity: x,
|
|
543
|
-
columnSizeVars:
|
|
544
|
-
totalColumnsWidth:
|
|
545
|
-
theadRef:
|
|
544
|
+
columnSizeVars: er,
|
|
545
|
+
totalColumnsWidth: tr,
|
|
546
|
+
theadRef: nr,
|
|
546
547
|
virtualizer: $,
|
|
547
|
-
visibleCols:
|
|
548
|
-
headerReorder:
|
|
549
|
-
sortCols:
|
|
550
|
-
sortNullsMap:
|
|
551
|
-
shiftClickColumn:
|
|
552
|
-
applyColumnSort:
|
|
553
|
-
appendColumnSort:
|
|
554
|
-
clearColumnSort:
|
|
555
|
-
clearAllSorts:
|
|
548
|
+
visibleCols: M,
|
|
549
|
+
headerReorder: rr,
|
|
550
|
+
sortCols: Qt,
|
|
551
|
+
sortNullsMap: $t,
|
|
552
|
+
shiftClickColumn: on,
|
|
553
|
+
applyColumnSort: an,
|
|
554
|
+
appendColumnSort: sn,
|
|
555
|
+
clearColumnSort: cn,
|
|
556
|
+
clearAllSorts: ln,
|
|
556
557
|
renderRow: (e, t) => /* @__PURE__ */ p(qe, {
|
|
557
558
|
row: e,
|
|
558
559
|
rowIndex: t,
|
|
559
560
|
entity: x,
|
|
560
|
-
hasSoftDelete:
|
|
561
|
-
zebra:
|
|
561
|
+
hasSoftDelete: At,
|
|
562
|
+
zebra: ar,
|
|
562
563
|
hasDetailTarget: J,
|
|
563
564
|
interaction: U,
|
|
564
565
|
measureElement: $.measureElement
|
|
@@ -566,70 +567,70 @@ function m({ screenCode: o }) {
|
|
|
566
567
|
isResizingColumn: X
|
|
567
568
|
})
|
|
568
569
|
}), /* @__PURE__ */ p(Ye, {
|
|
569
|
-
meta:
|
|
570
|
-
isCursor:
|
|
571
|
-
isPhone:
|
|
572
|
-
rowsLoaded:
|
|
570
|
+
meta: Cn,
|
|
571
|
+
isCursor: In,
|
|
572
|
+
isPhone: gr,
|
|
573
|
+
rowsLoaded: I.length,
|
|
573
574
|
selectedCount: B.length,
|
|
574
|
-
countTotal:
|
|
575
|
-
countStrategy:
|
|
576
|
-
countLoading:
|
|
577
|
-
countError:
|
|
578
|
-
page:
|
|
575
|
+
countTotal: jn,
|
|
576
|
+
countStrategy: Mn,
|
|
577
|
+
countLoading: Nn,
|
|
578
|
+
countError: Pn,
|
|
579
|
+
page: D,
|
|
579
580
|
totalPages: R,
|
|
580
|
-
goToPage:
|
|
581
|
-
perPage:
|
|
582
|
-
setPerPage:
|
|
583
|
-
hasMorePages:
|
|
584
|
-
fetchNextPage:
|
|
585
|
-
isFetchingNextPage:
|
|
581
|
+
goToPage: ur,
|
|
582
|
+
perPage: O,
|
|
583
|
+
setPerPage: dr,
|
|
584
|
+
hasMorePages: Fn,
|
|
585
|
+
fetchNextPage: Ln,
|
|
586
|
+
isFetchingNextPage: Rn
|
|
586
587
|
})]
|
|
587
588
|
})
|
|
588
589
|
}),
|
|
589
590
|
/* @__PURE__ */ p(De, {
|
|
590
|
-
open:
|
|
591
|
+
open: vt,
|
|
591
592
|
onClose: () => v(!1),
|
|
592
|
-
filters:
|
|
593
|
-
onApply:
|
|
594
|
-
availableFields:
|
|
595
|
-
allFields:
|
|
596
|
-
fieldLabel:
|
|
597
|
-
resolveValue:
|
|
593
|
+
filters: j,
|
|
594
|
+
onApply: A,
|
|
595
|
+
availableFields: Kt,
|
|
596
|
+
allFields: qt,
|
|
597
|
+
fieldLabel: Jt,
|
|
598
|
+
resolveValue: Kn,
|
|
598
599
|
defaultFilters: b?.default_filters,
|
|
599
|
-
refs:
|
|
600
|
+
refs: qn
|
|
600
601
|
}),
|
|
601
602
|
/* @__PURE__ */ p($e, {
|
|
602
|
-
view:
|
|
603
|
-
onCancel: () =>
|
|
603
|
+
view: bt,
|
|
604
|
+
onCancel: () => xt(null),
|
|
604
605
|
onConfirm: (e) => {
|
|
605
|
-
|
|
606
|
+
hn.deleteView(e).catch(() => void 0).finally(() => xt(null));
|
|
606
607
|
}
|
|
607
608
|
}),
|
|
608
609
|
/* @__PURE__ */ p(nt, {
|
|
609
|
-
open:
|
|
610
|
-
pending:
|
|
610
|
+
open: yt,
|
|
611
|
+
pending: vn,
|
|
611
612
|
onClose: () => y(!1),
|
|
612
|
-
overwriteViewName: Ze(
|
|
613
|
+
overwriteViewName: Ze(c, N),
|
|
613
614
|
onOverwrite: async () => {
|
|
614
|
-
await
|
|
615
|
+
await _n(), y(!1);
|
|
615
616
|
},
|
|
616
617
|
onSave: async (e) => {
|
|
617
|
-
await
|
|
618
|
+
await gn(e), y(!1);
|
|
618
619
|
}
|
|
619
620
|
}),
|
|
620
621
|
B.length > 0 && /* @__PURE__ */ p(it, {
|
|
621
622
|
selectedIds: B,
|
|
622
|
-
floatbarActions:
|
|
623
|
+
floatbarActions: T,
|
|
623
624
|
screenActionLayout: b.action_layout,
|
|
624
625
|
entityActionLayout: x.action_layout,
|
|
625
|
-
data:
|
|
626
|
+
data: I,
|
|
626
627
|
rowKey: V,
|
|
627
628
|
entityCode: S,
|
|
628
629
|
entity: x,
|
|
629
630
|
screen: b,
|
|
630
631
|
onClear: () => z({}),
|
|
631
632
|
onActionSuccess: () => z({}),
|
|
632
|
-
widgetContext:
|
|
633
|
+
widgetContext: yr
|
|
633
634
|
}),
|
|
634
635
|
q && x && b && /* @__PURE__ */ p(ot, {
|
|
635
636
|
x: q.x,
|
|
@@ -640,31 +641,28 @@ function m({ screenCode: o }) {
|
|
|
640
641
|
fullScreen: b,
|
|
641
642
|
entity: x,
|
|
642
643
|
entityCode: S,
|
|
643
|
-
rowActions:
|
|
644
|
+
rowActions: E,
|
|
644
645
|
tabNavigate: m,
|
|
645
646
|
peekAllowed: W,
|
|
646
647
|
hasDetailTarget: J,
|
|
647
648
|
onPeek: K,
|
|
648
|
-
onClose: () =>
|
|
649
|
+
onClose: () => Zn(null)
|
|
649
650
|
}),
|
|
650
651
|
W && G && x && /* @__PURE__ */ p(Ae, {
|
|
651
652
|
entity: x,
|
|
652
653
|
entityCode: S,
|
|
653
654
|
record: G,
|
|
654
|
-
title: (
|
|
655
|
-
let t = b.columns?.find((e) => !e.startsWith("$status.") && !e.startsWith("$property."));
|
|
656
|
-
return t ? e(G[t] ?? s(x.display.name)) : s(x.display.name);
|
|
657
|
-
})(),
|
|
655
|
+
title: ee(c, G, x) || c(x.display.name),
|
|
658
656
|
recordId: (() => {
|
|
659
657
|
let t = x.fields.names()?.find((e) => x.fields.get(e)?.primary);
|
|
660
|
-
return t ? e(G[t]) : void 0;
|
|
658
|
+
return t && x.fields.get(t)?.type !== "uuid" ? e(G[t]) : void 0;
|
|
661
659
|
})(),
|
|
662
|
-
fields:
|
|
660
|
+
fields: Jn,
|
|
663
661
|
screen: ke(x, b, G),
|
|
664
|
-
actions:
|
|
662
|
+
actions: Yn,
|
|
665
663
|
screenActionLayout: ke(x, b, G)?.action_layout,
|
|
666
664
|
entityActionLayout: x.action_layout,
|
|
667
|
-
executeAction:
|
|
665
|
+
executeAction: Xn,
|
|
668
666
|
onClose: () => {
|
|
669
667
|
if (x && G) {
|
|
670
668
|
let t = x.fields.names()?.find((e) => x.fields.get(e)?.primary);
|
|
@@ -693,11 +691,11 @@ function m({ screenCode: o }) {
|
|
|
693
691
|
});
|
|
694
692
|
if (Object.keys(i).length > 0 && (r.$files = i), Object.keys(r).length === 0) return;
|
|
695
693
|
let a = ge(i);
|
|
696
|
-
|
|
694
|
+
Wn.mutate({
|
|
697
695
|
pkValues: ee,
|
|
698
696
|
data: r
|
|
699
697
|
}, { onSuccess: () => {
|
|
700
|
-
a.forEach((e) =>
|
|
698
|
+
a.forEach((e) => wt.markCommitted(e));
|
|
701
699
|
} });
|
|
702
700
|
}
|
|
703
701
|
})
|
|
@@ -705,4 +703,4 @@ function m({ screenCode: o }) {
|
|
|
705
703
|
});
|
|
706
704
|
}
|
|
707
705
|
//#endregion
|
|
708
|
-
export {
|
|
706
|
+
export { gt as SmartListPage };
|