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