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