@declarion/react 0.54.0 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-lib/{DraggableChildrenTable-CPoUY99R.js → DraggableChildrenTable-BV5sb8Uo.js} +32 -32
- package/dist-lib/{Grid--QAEby8k.js → Grid-DWgUPuZ3.js} +45 -45
- package/dist-lib/{JsonEditor-DoNmyrYd.js → JsonEditor-Dz1PQHC8.js} +2 -2
- package/dist-lib/{LayoutRenderer-BxZ7Nd9b.js → LayoutRenderer-C9AH9cXf.js} +716 -714
- package/dist-lib/{ListCardsBody-BPV4GPrv.js → ListCardsBody-DXcDg536.js} +29 -29
- package/dist-lib/{MarkdownRenderer-CIKuh_0i.js → MarkdownRenderer-CcSFc2N3.js} +1 -1
- package/dist-lib/{RefreshControl-DMLkZP3R.js → RefreshControl-CNtN8zSl.js} +41 -41
- package/dist-lib/{SmartDetailPage.impl-SnNu6Ug-.js → SmartDetailPage.impl-lskCd-WG.js} +492 -492
- package/dist-lib/{SmartListPage.impl-C73pR7Iw.js → SmartListPage.impl-CrGbdzyK.js} +744 -743
- package/dist-lib/{SmartRecordListPage.impl-rJjQZe1V.js → SmartRecordListPage.impl-Bkl9aZJ8.js} +129 -129
- package/dist-lib/{SortHeaderMenu-DQ_KrkWk.js → SortHeaderMenu-SYSAaqQJ.js} +1 -1
- package/dist-lib/{action-dispatch-DsuUS7ae.js → action-dispatch-CR4ajBtT.js} +179 -179
- package/dist-lib/api/auth.d.ts +1 -1
- package/dist-lib/api/batch.d.ts +1 -1
- package/dist-lib/api/data.d.ts +3 -3
- package/dist-lib/api/entities.d.ts +1 -1
- package/dist-lib/api/events.d.ts +13 -4
- package/dist-lib/api/params.d.ts +1 -1
- package/dist-lib/api/properties.d.ts +1 -1
- package/dist-lib/api/schema.d.ts +1 -1
- package/dist-lib/api/status.d.ts +1 -1
- package/dist-lib/{cardProjection-BadzqyeQ.js → cardProjection-CW5RIMko.js} +24 -24
- package/dist-lib/components/actions/ActionButton.d.ts +1 -1
- package/dist-lib/components/actions/ActionDialog.d.ts +1 -1
- package/dist-lib/components/actions/ActionRunner.d.ts +1 -1
- package/dist-lib/components/actions/ObjectActionBar.d.ts +3 -3
- package/dist-lib/components/actions/PropertyGridEditor.d.ts +2 -2
- package/dist-lib/components/actions/ResponsiveActionBar.d.ts +2 -2
- package/dist-lib/components/actions/RowActionsKebab.d.ts +1 -1
- package/dist-lib/components/agents/AgentConversationDrawer.d.ts +1 -1
- package/dist-lib/components/agents/AgentPicker.d.ts +1 -1
- package/dist-lib/components/agents/transcript-runs.d.ts +1 -1
- package/dist-lib/components/chrome/AssociationTabs.d.ts +1 -1
- package/dist-lib/components/chrome/Breadcrumbs.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/AssociatedToolbar.d.ts +1 -1
- package/dist-lib/components/detail-layout/ChildrenBlock.d.ts +2 -2
- package/dist-lib/components/detail-layout/DetailAuditStrip.d.ts +2 -2
- package/dist-lib/components/detail-layout/DetailHighlights.d.ts +3 -3
- package/dist-lib/components/detail-layout/DraggableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/EditableChildrenTable.d.ts +3 -3
- package/dist-lib/components/detail-layout/EvidenceBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/FieldsBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutColumn.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutRenderer.d.ts +3 -3
- package/dist-lib/components/detail-layout/LayoutRow.d.ts +1 -1
- package/dist-lib/components/detail-layout/LayoutTabs.d.ts +1 -1
- package/dist-lib/components/detail-layout/PropertiesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/QuickAddForm.d.ts +2 -2
- package/dist-lib/components/detail-layout/SectionBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/StatusesBlock.d.ts +1 -1
- package/dist-lib/components/detail-layout/TimelineComposer.d.ts +2 -2
- package/dist-lib/components/detail-layout/blockMeta.d.ts +1 -1
- package/dist-lib/components/detail-layout/useQuickAdd.d.ts +2 -2
- package/dist-lib/components/detail-layout/widgets/WidgetHost.d.ts +1 -1
- package/dist-lib/components/fields/RefCombobox.d.ts +2 -2
- package/dist-lib/components/fields/cells/factories/host-icons.d.ts +1 -1
- package/dist-lib/components/fields/cells/registry.d.ts +2 -2
- package/dist-lib/components/fields/index.d.ts +3 -3
- package/dist-lib/components/file-widgets/helpers.d.ts +1 -1
- package/dist-lib/components/file-widgets/host.d.ts +3 -3
- package/dist-lib/components/file-widgets/payload.d.ts +2 -2
- package/dist-lib/components/file-widgets/types.d.ts +1 -1
- package/dist-lib/components/file-widgets/useEmbedFileSrc.d.ts +1 -1
- package/dist-lib/components/filters/FilterChips.d.ts +1 -1
- package/dist-lib/components/filters/FilterDrawer.d.ts +3 -3
- package/dist-lib/components/layout/CommandPalette.d.ts +2 -2
- package/dist-lib/components/layout/Layout.d.ts +3 -3
- package/dist-lib/components/layout/Rail.d.ts +2 -2
- package/dist-lib/components/layout/Sidebar.d.ts +1 -1
- package/dist-lib/components/layout/TabStrip.d.ts +1 -1
- package/dist-lib/components/layout/TenantChip.d.ts +1 -1
- package/dist-lib/components/layout/TopBar.d.ts +1 -1
- package/dist-lib/components/layout/tab-close.d.ts +1 -1
- package/dist-lib/components/list/InlineEditCell.d.ts +1 -1
- package/dist-lib/components/list/PeekFieldCell.d.ts +2 -2
- package/dist-lib/components/list/QuickPeek.d.ts +3 -3
- package/dist-lib/components/list/ViewSwitcher.d.ts +1 -1
- package/dist-lib/components/pages/DocumentsMenu.d.ts +1 -1
- package/dist-lib/components/pages/ExportMenu.d.ts +1 -1
- package/dist-lib/components/pages/RecordDocumentsPanel.d.ts +1 -1
- package/dist-lib/components/pages/auth/AuthShell.d.ts +1 -1
- package/dist-lib/components/pages/exportRequest.d.ts +1 -1
- package/dist-lib/components/pages/list/ListCardRow.d.ts +3 -3
- package/dist-lib/components/pages/list/ListCardsBody.d.ts +3 -3
- package/dist-lib/components/pages/list/ListFloatbar.d.ts +3 -3
- package/dist-lib/components/pages/list/ListHeader.d.ts +3 -3
- package/dist-lib/components/pages/list/ListNoRows.d.ts +1 -1
- package/dist-lib/components/pages/list/ListTable.d.ts +2 -2
- package/dist-lib/components/pages/list/ListTableRow.d.ts +1 -1
- package/dist-lib/components/pages/list/ListToolbar.d.ts +7 -5
- package/dist-lib/components/pages/list/RowActionsCell.d.ts +1 -1
- package/dist-lib/components/pages/list/RowContextMenu.d.ts +1 -1
- package/dist-lib/components/pages/list/SortHeaderMenu.d.ts +1 -1
- package/dist-lib/components/pages/list/cardProjection.d.ts +2 -2
- package/dist-lib/components/pages/list/columns.d.ts +3 -3
- package/dist-lib/components/pages/list/filter-meta.d.ts +2 -2
- package/dist-lib/components/pages/list/sortable-header.d.ts +1 -1
- package/dist-lib/components/pages/list/table-features.d.ts +1 -1
- package/dist-lib/components/pages/list/use-filter-value-labels.d.ts +4 -4
- package/dist-lib/components/pages/list/useListColumnLayout.d.ts +1 -1
- package/dist-lib/components/pages/list/useListQuery.d.ts +4 -8
- package/dist-lib/components/pages/list/useListRowInteraction.d.ts +4 -4
- package/dist-lib/components/pages/list/useListSelection.d.ts +2 -2
- package/dist-lib/components/pages/list/useListSort.d.ts +1 -1
- package/dist-lib/components/pages/list/useListViews.d.ts +3 -3
- package/dist-lib/components/pages/list/useRowMenu.d.ts +3 -3
- package/dist-lib/components/pages/tenant-params/TenantParamsPage.d.ts +1 -1
- package/dist-lib/components/params/param-editors.d.ts +1 -1
- package/dist-lib/components/primitives/ClassifiedFieldLocked.d.ts +1 -1
- package/dist-lib/components/shared/MarkdownRenderer.d.ts +1 -1
- package/dist-lib/components/shared/StatusGroupsDisplay.d.ts +2 -2
- package/dist-lib/embed/screen-location.d.ts +1 -1
- package/dist-lib/{field-classification-sMkkAEg9.js → field-classification-D6xQYn-h.js} +271 -400
- package/dist-lib/{format-count-B5SLlNOb.js → format-count-Dobmi-Ji.js} +238 -238
- package/dist-lib/hooks/useAgentConversation.d.ts +1 -1
- package/dist-lib/hooks/useAllEntityData.d.ts +1 -1
- package/dist-lib/hooks/useAssociatedData.d.ts +1 -1
- package/dist-lib/hooks/useBranding.d.ts +4 -4
- package/dist-lib/hooks/useBrandingChrome.d.ts +2 -2
- package/dist-lib/hooks/useChildrenData.d.ts +1 -1
- package/dist-lib/hooks/useCurrentScreen.d.ts +1 -1
- package/dist-lib/hooks/useCursorEntityData.d.ts +5 -5
- package/dist-lib/hooks/useEntity.d.ts +1 -1
- package/dist-lib/hooks/useEntityData.d.ts +8 -1
- package/dist-lib/hooks/useFilters.d.ts +1 -1
- package/dist-lib/hooks/useImpersonation.d.ts +1 -1
- package/dist-lib/hooks/useLiveObject.d.ts +2 -2
- package/dist-lib/hooks/useMutations.d.ts +3 -3
- package/dist-lib/hooks/useObject.d.ts +1 -1
- package/dist-lib/hooks/useParams.d.ts +2 -2
- package/dist-lib/hooks/useRealtimeThresholds.d.ts +1 -0
- package/dist-lib/hooks/useRegisterScreenTab.d.ts +1 -1
- package/dist-lib/hooks/useResponsiveMode.d.ts +1 -1
- package/dist-lib/hooks/useSSE.d.ts +1 -2
- package/dist-lib/hooks/useScreen.d.ts +1 -1
- package/dist-lib/hooks/useTimelineData.d.ts +2 -2
- package/dist-lib/hooks/useViews.d.ts +1 -1
- package/dist-lib/index.js +811 -811
- package/dist-lib/lib/action-dispatch.d.ts +2 -2
- package/dist-lib/lib/actions.d.ts +1 -1
- package/dist-lib/lib/brand-tokens.d.ts +1 -1
- package/dist-lib/lib/branding.d.ts +1 -1
- package/dist-lib/lib/child-config.d.ts +1 -1
- package/dist-lib/lib/children-validation.d.ts +2 -2
- package/dist-lib/lib/document-templates.d.ts +1 -1
- package/dist-lib/lib/evidence-verdict.d.ts +1 -1
- package/dist-lib/lib/mass-edit.d.ts +1 -1
- package/dist-lib/lib/messages.d.ts +2 -2
- package/dist-lib/lib/realtime-query-keys.d.ts +22 -0
- package/dist-lib/lib/realtime-reconcile.d.ts +1 -10
- package/dist-lib/lib/realtime-resync.d.ts +23 -0
- package/dist-lib/lib/rich-text.d.ts +1 -1
- package/dist-lib/lib/schema-routing.d.ts +1 -1
- package/dist-lib/lib/screen-back.d.ts +1 -1
- package/dist-lib/lib/size-value.d.ts +1 -1
- package/dist-lib/lib/toast.d.ts +2 -2
- package/dist-lib/lib/ui-actions.d.ts +1 -1
- package/dist-lib/lib/variants.d.ts +1 -1
- package/dist-lib/{peekDraftStore-CbHFwz_F.js → peekDraftStore-5wQ7lq_V.js} +17 -17
- package/dist-lib/{registry-D0RhCnEL.js → registry-CjgUaF7C.js} +511 -511
- package/dist-lib/stores/auth.d.ts +1 -1
- package/dist-lib/stores/preferences.d.ts +1 -1
- package/dist-lib/stores/realtime.d.ts +86 -19
- package/dist-lib/testing.d.ts +4 -4
- package/dist-lib/testing.js +40 -40
- package/dist-lib/types/api.d.ts +1 -1
- package/dist-lib/types/schema.d.ts +2 -2
- package/dist-lib/{useCurrentScreen-DVTXCj_K.js → useCurrentScreen-CzwzQpoW.js} +2476 -1967
- package/dist-lib/useListQuery-D7Hr5WM1.js +96 -0
- package/dist-lib/{useProperties-BcIz-MyO.js → useProperties-CqtCzFCr.js} +25 -25
- package/dist-lib/{useTabSearchMirror-UYCsopxP.js → useTabSearchMirror-C39U85cg.js} +13 -13
- package/dist-lib/{value-CQzGOI0F.js → value-Bo8C8WMU.js} +4 -4
- package/package.json +10 -10
- package/dist-lib/useListQuery-C2nq58YV.js +0 -90
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { s as e, t } from "./DynamicIcon-DW5krHuX.js";
|
|
2
|
-
import {
|
|
3
|
-
import { _ as C } from "./RefreshControl-
|
|
4
|
-
import { D as w, b as T, y as E } from "./field-classification-
|
|
5
|
-
import { c as ee, o as te, p as ne, r as re } from "./action-dispatch-
|
|
6
|
-
import { a as D, d as O, f as k, h as A, i as j, l as M, o as N, s as P, u as F } from "./useTabSearchMirror-
|
|
2
|
+
import { Br as n, Cr as r, Er as i, Fr as a, G as o, H as s, Lr as c, Mr as l, Rr as u, V as d, Vr as f, et as p, ht as m, i as h, kr as g, mr as _, nr as v, tt as y, un as b, xt as x, yr as S } from "./useCurrentScreen-CzwzQpoW.js";
|
|
3
|
+
import { _ as C } from "./RefreshControl-CNtN8zSl.js";
|
|
4
|
+
import { D as w, b as T, y as E } from "./field-classification-D6xQYn-h.js";
|
|
5
|
+
import { c as ee, o as te, p as ne, r as re } from "./action-dispatch-CR4ajBtT.js";
|
|
6
|
+
import { a as D, d as O, f as k, h as A, i as j, l as M, o as N, s as P, u as F } from "./useTabSearchMirror-C39U85cg.js";
|
|
7
7
|
import { Fragment as I, useCallback as L, useEffect as R, useMemo as z, useRef as B, useState as V } from "react";
|
|
8
8
|
import { useLocation as H, useSearchParams as ie } from "react-router";
|
|
9
9
|
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
10
10
|
//#region src/hooks/useScreen.ts
|
|
11
11
|
function K(e) {
|
|
12
|
-
let { data: t } =
|
|
13
|
-
if (
|
|
12
|
+
let { data: t } = b();
|
|
13
|
+
if (t && e) return t.screens[e];
|
|
14
14
|
}
|
|
15
15
|
//#endregion
|
|
16
16
|
//#region src/hooks/useFilters.ts
|
|
@@ -33,7 +33,7 @@ function ae() {
|
|
|
33
33
|
//#endregion
|
|
34
34
|
//#region src/hooks/useViews.ts
|
|
35
35
|
function oe(e, t) {
|
|
36
|
-
let n = K(e), { data: r } =
|
|
36
|
+
let n = K(e), { data: r } = x("view", {
|
|
37
37
|
filters: [{
|
|
38
38
|
field: "screen_code",
|
|
39
39
|
op: "eq",
|
|
@@ -65,7 +65,7 @@ function oe(e, t) {
|
|
|
65
65
|
let r = t && String(n.user_id) === t;
|
|
66
66
|
e.push({
|
|
67
67
|
id: String(n.id),
|
|
68
|
-
name: typeof n.name == "object" && n.name !== null ? n.name : { en:
|
|
68
|
+
name: typeof n.name == "object" && n.name !== null ? n.name : { en: _(n.name) },
|
|
69
69
|
icon: n.icon,
|
|
70
70
|
source: r ? "personal" : "shared",
|
|
71
71
|
is_default: n.is_default === !0,
|
|
@@ -149,13 +149,13 @@ function ce({ icon: e, title: n, description: r, action: i }) {
|
|
|
149
149
|
}
|
|
150
150
|
//#endregion
|
|
151
151
|
//#region src/components/filters/FilterDrawer.tsx
|
|
152
|
-
function le({ open: t, onClose:
|
|
153
|
-
let
|
|
152
|
+
function le({ open: t, onClose: r, filters: i, onApply: a, availableFields: o, defaultFilters: s, refs: c }) {
|
|
153
|
+
let u = l().category === "phone", [d, p] = V(i), [m, h] = V(!1);
|
|
154
154
|
if (R(() => {
|
|
155
155
|
if (t) {
|
|
156
|
-
if (
|
|
157
|
-
let e =
|
|
158
|
-
let t =
|
|
156
|
+
if (i.length === 0 && s && s.length > 0) {
|
|
157
|
+
let e = s.flatMap((e) => {
|
|
158
|
+
let t = o.find((t) => t.code === e);
|
|
159
159
|
return t ? [{
|
|
160
160
|
field: e,
|
|
161
161
|
op: t.operators[0] || "eq"
|
|
@@ -164,22 +164,22 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
164
164
|
p(e);
|
|
165
165
|
return;
|
|
166
166
|
}
|
|
167
|
-
p(
|
|
167
|
+
p(i);
|
|
168
168
|
}
|
|
169
169
|
}, [
|
|
170
170
|
t,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
171
|
+
i,
|
|
172
|
+
s,
|
|
173
|
+
o
|
|
174
174
|
]), !t) return null;
|
|
175
|
-
let g = O(
|
|
176
|
-
let t = new Set(M(e).map((e) => e.field).filter(Boolean)), n =
|
|
175
|
+
let g = O(d), _ = new Set(M(d).filter((e) => e.field).map((e) => e.field)), v = (e = d) => {
|
|
176
|
+
let t = new Set(M(e).map((e) => e.field).filter(Boolean)), n = o.find((e) => !t.has(e.code)) ?? o[0];
|
|
177
177
|
return n ? {
|
|
178
178
|
field: n.code,
|
|
179
179
|
op: n.operators[0] || "eq"
|
|
180
180
|
} : {};
|
|
181
181
|
}, y = (e) => {
|
|
182
|
-
let t =
|
|
182
|
+
let t = o.find((t) => t.code === e);
|
|
183
183
|
if (!t) return;
|
|
184
184
|
let n = t.operators[0] || "eq";
|
|
185
185
|
p((t) => [...t, {
|
|
@@ -187,7 +187,7 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
187
187
|
op: n
|
|
188
188
|
}]), h(!1);
|
|
189
189
|
}, b = () => {
|
|
190
|
-
let e =
|
|
190
|
+
let e = d.filter((e) => e.field && e.op), t = d.filter((e) => !e.field || !e.op), n = e.length === 1 ? e[0] : e.length > 1 ? { and: e } : {};
|
|
191
191
|
p([...t, { or: [n, {}] }]);
|
|
192
192
|
}, x = (e, t) => {
|
|
193
193
|
p((n) => Z(n, e, (e) => ({
|
|
@@ -197,7 +197,7 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
197
197
|
}, S = (e, t) => {
|
|
198
198
|
p((n) => Q(n, e, t));
|
|
199
199
|
}, C = (e) => {
|
|
200
|
-
p((t) =>
|
|
200
|
+
p((t) => ge(t, e));
|
|
201
201
|
}, w = (e, t) => {
|
|
202
202
|
p((n) => Z(n, e, (e) => e.or ? {
|
|
203
203
|
...e,
|
|
@@ -207,7 +207,7 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
207
207
|
and: [...e.and, t]
|
|
208
208
|
} : e));
|
|
209
209
|
}, T = (e, t) => {
|
|
210
|
-
let n = [...e, t], r = he(
|
|
210
|
+
let n = [...e, t], r = he(d, n);
|
|
211
211
|
if (!r) return;
|
|
212
212
|
let i = v();
|
|
213
213
|
r.and ? w(n, i) : r.field || r.op || r.or ? S(n, { and: [r, i] }) : S(n, i);
|
|
@@ -223,17 +223,17 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
223
223
|
path: t
|
|
224
224
|
}, t.join("-"));
|
|
225
225
|
if (!e.field || !e.op) return /* @__PURE__ */ W("div", { style: { minHeight: 4 } }, t.join("-"));
|
|
226
|
-
let n =
|
|
226
|
+
let n = o.find((t) => t.code === e.field);
|
|
227
227
|
return n ? /* @__PURE__ */ W(pe, {
|
|
228
228
|
node: e,
|
|
229
229
|
meta: n,
|
|
230
|
-
refs:
|
|
230
|
+
refs: c,
|
|
231
231
|
onUpdate: (e) => x(t, e),
|
|
232
232
|
onRemove: () => C(t)
|
|
233
233
|
}, t.join("-")) : null;
|
|
234
234
|
};
|
|
235
235
|
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("div", {
|
|
236
|
-
onClick:
|
|
236
|
+
onClick: r,
|
|
237
237
|
style: {
|
|
238
238
|
position: "fixed",
|
|
239
239
|
inset: 0,
|
|
@@ -286,9 +286,9 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
286
286
|
},
|
|
287
287
|
children: "Filters"
|
|
288
288
|
})]
|
|
289
|
-
}), /* @__PURE__ */ W(
|
|
289
|
+
}), /* @__PURE__ */ W(n, {
|
|
290
290
|
icon: /* @__PURE__ */ W(e.x, { size: 14 }),
|
|
291
|
-
onClick:
|
|
291
|
+
onClick: r,
|
|
292
292
|
title: "Close"
|
|
293
293
|
})]
|
|
294
294
|
}),
|
|
@@ -303,24 +303,24 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
303
303
|
minWidth: 0,
|
|
304
304
|
minHeight: 0
|
|
305
305
|
},
|
|
306
|
-
children: [
|
|
306
|
+
children: [d.map((e, t) => E(e, [t])), /* @__PURE__ */ W("div", {
|
|
307
307
|
style: {
|
|
308
308
|
display: "flex",
|
|
309
309
|
alignItems: "center",
|
|
310
310
|
gap: 6,
|
|
311
311
|
paddingTop: 6
|
|
312
312
|
},
|
|
313
|
-
children: m ? /* @__PURE__ */ W(
|
|
314
|
-
fields:
|
|
313
|
+
children: m ? /* @__PURE__ */ W(_e, {
|
|
314
|
+
fields: o,
|
|
315
315
|
activeFields: _,
|
|
316
|
-
compact:
|
|
316
|
+
compact: u,
|
|
317
317
|
onSelect: y,
|
|
318
318
|
onCancel: () => h(!1)
|
|
319
|
-
}) : /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(
|
|
319
|
+
}) : /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(f, {
|
|
320
320
|
icon: /* @__PURE__ */ W(e.plus, { size: 12 }),
|
|
321
321
|
onClick: () => h(!0),
|
|
322
322
|
children: "Add filter"
|
|
323
|
-
}), !g && M(
|
|
323
|
+
}), !g && M(d).length > 0 && /* @__PURE__ */ W(f, {
|
|
324
324
|
kind: "ghost",
|
|
325
325
|
icon: /* @__PURE__ */ W(e.plus, { size: 12 }),
|
|
326
326
|
onClick: b,
|
|
@@ -341,7 +341,7 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
341
341
|
paddingBottom: "calc(10px + var(--safe-area-bottom))"
|
|
342
342
|
},
|
|
343
343
|
children: [
|
|
344
|
-
/* @__PURE__ */ W(
|
|
344
|
+
/* @__PURE__ */ W(f, {
|
|
345
345
|
kind: "ghost",
|
|
346
346
|
onClick: () => {
|
|
347
347
|
p([]);
|
|
@@ -349,14 +349,14 @@ function le({ open: t, onClose: n, filters: o, onApply: s, availableFields: c, d
|
|
|
349
349
|
children: "Reset"
|
|
350
350
|
}),
|
|
351
351
|
/* @__PURE__ */ W("div", { style: { flex: 1 } }),
|
|
352
|
-
/* @__PURE__ */ W(
|
|
353
|
-
onClick:
|
|
352
|
+
/* @__PURE__ */ W(f, {
|
|
353
|
+
onClick: r,
|
|
354
354
|
children: "Cancel"
|
|
355
355
|
}),
|
|
356
|
-
/* @__PURE__ */ W(
|
|
356
|
+
/* @__PURE__ */ W(f, {
|
|
357
357
|
kind: "primary",
|
|
358
358
|
onClick: () => {
|
|
359
|
-
|
|
359
|
+
a(q(d)), r();
|
|
360
360
|
},
|
|
361
361
|
children: "Apply"
|
|
362
362
|
})
|
|
@@ -387,7 +387,7 @@ function q(e) {
|
|
|
387
387
|
});
|
|
388
388
|
continue;
|
|
389
389
|
}
|
|
390
|
-
|
|
390
|
+
n.field && n.op && (D.has(n.op) || ue(n.value)) && t.push(n);
|
|
391
391
|
}
|
|
392
392
|
return t;
|
|
393
393
|
}
|
|
@@ -400,7 +400,7 @@ function J(e) {
|
|
|
400
400
|
},
|
|
401
401
|
...e.map((e) => ({
|
|
402
402
|
value: e.code,
|
|
403
|
-
label:
|
|
403
|
+
label: v(e.label) || e.code
|
|
404
404
|
})),
|
|
405
405
|
{
|
|
406
406
|
value: "",
|
|
@@ -411,49 +411,49 @@ function J(e) {
|
|
|
411
411
|
}
|
|
412
412
|
var Y = "__custom__";
|
|
413
413
|
function de({ meta: e, value: t, onUpdate: n }) {
|
|
414
|
-
let
|
|
415
|
-
return
|
|
414
|
+
let a = e.specialValues ?? [], o = _(t), s = a.some((e) => e.code === o), [c, l] = V(!s && o !== "");
|
|
415
|
+
return c ? /* @__PURE__ */ W(i, {
|
|
416
416
|
"aria-label": `${e.label} filter value`,
|
|
417
|
-
value:
|
|
417
|
+
value: o,
|
|
418
418
|
onChange: (e) => n({ value: e }),
|
|
419
419
|
placeholder: "Value…",
|
|
420
420
|
autoFocus: !0
|
|
421
|
-
}) : /* @__PURE__ */ W(
|
|
421
|
+
}) : /* @__PURE__ */ W(r, {
|
|
422
422
|
"aria-label": `${e.label} filter value`,
|
|
423
|
-
value:
|
|
423
|
+
value: o,
|
|
424
424
|
options: [
|
|
425
425
|
{
|
|
426
426
|
value: "",
|
|
427
427
|
label: "Select…"
|
|
428
428
|
},
|
|
429
|
-
...J(
|
|
429
|
+
...J(a),
|
|
430
430
|
{
|
|
431
431
|
value: Y,
|
|
432
432
|
label: "Custom value…"
|
|
433
433
|
}
|
|
434
434
|
],
|
|
435
435
|
onChange: (e) => {
|
|
436
|
-
e === Y ? (
|
|
436
|
+
e === Y ? (l(!0), n({ value: "" })) : n({ value: e });
|
|
437
437
|
}
|
|
438
438
|
});
|
|
439
439
|
}
|
|
440
440
|
function X(e) {
|
|
441
|
-
return Array.isArray(e) ? e.map((e) =>
|
|
441
|
+
return Array.isArray(e) ? e.map((e) => _(e)) : e == null || e === "" ? [] : [_(e)];
|
|
442
442
|
}
|
|
443
443
|
function fe(e) {
|
|
444
|
-
return Array.isArray(e) ? e.length > 0 ?
|
|
444
|
+
return Array.isArray(e) ? e.length > 0 ? _(e[0]) : "" : _(e);
|
|
445
445
|
}
|
|
446
|
-
function pe({ node: t, meta:
|
|
447
|
-
let
|
|
446
|
+
function pe({ node: t, meta: a, refs: o, onUpdate: s, onRemove: c }) {
|
|
447
|
+
let l = D.has(t.op), u = j.has(t.op), d = a.operators.map((e) => ({
|
|
448
448
|
value: e,
|
|
449
449
|
label: N[e] || e
|
|
450
|
-
})),
|
|
450
|
+
})), f = (e) => {
|
|
451
451
|
let n = j.has(t.op), r = j.has(e);
|
|
452
452
|
if (r === n) {
|
|
453
|
-
|
|
453
|
+
s({ op: e });
|
|
454
454
|
return;
|
|
455
455
|
}
|
|
456
|
-
|
|
456
|
+
s({
|
|
457
457
|
op: e,
|
|
458
458
|
value: r ? X(t.value) : fe(t.value)
|
|
459
459
|
});
|
|
@@ -483,68 +483,68 @@ function pe({ node: t, meta: n, refs: r, onUpdate: a, onRemove: o }) {
|
|
|
483
483
|
whiteSpace: "nowrap",
|
|
484
484
|
minWidth: 0
|
|
485
485
|
},
|
|
486
|
-
title:
|
|
487
|
-
children:
|
|
488
|
-
}), /* @__PURE__ */ W(
|
|
486
|
+
title: a.label,
|
|
487
|
+
children: a.label
|
|
488
|
+
}), /* @__PURE__ */ W(n, {
|
|
489
489
|
size: 22,
|
|
490
490
|
icon: /* @__PURE__ */ W(e.x, { size: 12 }),
|
|
491
|
-
onClick:
|
|
491
|
+
onClick: c,
|
|
492
492
|
title: "Remove"
|
|
493
493
|
})]
|
|
494
494
|
}), /* @__PURE__ */ G("div", {
|
|
495
495
|
style: {
|
|
496
496
|
display: "grid",
|
|
497
|
-
gridTemplateColumns:
|
|
497
|
+
gridTemplateColumns: l ? "minmax(0, 1fr)" : "minmax(112px, 152px) minmax(0, 1fr)",
|
|
498
498
|
gap: 6,
|
|
499
499
|
alignItems: "start",
|
|
500
500
|
minWidth: 0
|
|
501
501
|
},
|
|
502
|
-
children: [/* @__PURE__ */ W(
|
|
503
|
-
"aria-label": `${
|
|
504
|
-
value: t.op ??
|
|
505
|
-
options:
|
|
506
|
-
onChange: (e) =>
|
|
507
|
-
}),
|
|
508
|
-
"aria-label": `${
|
|
502
|
+
children: [/* @__PURE__ */ W(r, {
|
|
503
|
+
"aria-label": `${a.label} filter operator`,
|
|
504
|
+
value: t.op ?? d[0]?.value,
|
|
505
|
+
options: d,
|
|
506
|
+
onChange: (e) => f(e)
|
|
507
|
+
}), l ? null : u && a.options ? /* @__PURE__ */ W(S, {
|
|
508
|
+
"aria-label": `${a.label} filter value`,
|
|
509
509
|
value: X(t.value),
|
|
510
|
-
options: [...J(
|
|
510
|
+
options: [...J(a.specialValues), ...a.options.map((e) => ({
|
|
511
511
|
value: e.value,
|
|
512
512
|
label: e.label
|
|
513
513
|
}))],
|
|
514
|
-
onChange: (e) =>
|
|
514
|
+
onChange: (e) => s({ value: e }),
|
|
515
515
|
placeholder: "Select…"
|
|
516
|
-
}) :
|
|
517
|
-
ref:
|
|
516
|
+
}) : a.type === "ref" && a.ref?.entity ? /* @__PURE__ */ W(m, {
|
|
517
|
+
ref: a.ref,
|
|
518
518
|
value: t.value,
|
|
519
|
-
onChange: (e) =>
|
|
520
|
-
refs:
|
|
521
|
-
ariaLabel: `${
|
|
519
|
+
onChange: (e) => s({ value: e ?? "" }),
|
|
520
|
+
refs: o,
|
|
521
|
+
ariaLabel: `${a.label} filter value`,
|
|
522
522
|
placeholder: "Select…",
|
|
523
|
-
specialValues:
|
|
524
|
-
}) :
|
|
525
|
-
"aria-label": `${
|
|
526
|
-
value:
|
|
527
|
-
options: [...J(
|
|
523
|
+
specialValues: a.specialValues
|
|
524
|
+
}) : a.options ? /* @__PURE__ */ W(r, {
|
|
525
|
+
"aria-label": `${a.label} filter value`,
|
|
526
|
+
value: _(t.value),
|
|
527
|
+
options: [...J(a.specialValues), ...a.options.map((e) => ({
|
|
528
528
|
value: e.value,
|
|
529
529
|
label: e.label
|
|
530
530
|
}))],
|
|
531
|
-
onChange: (e) =>
|
|
531
|
+
onChange: (e) => s({ value: e }),
|
|
532
532
|
placeholder: "Select…"
|
|
533
|
-
}) :
|
|
534
|
-
meta:
|
|
533
|
+
}) : a.specialValues && a.specialValues.length > 0 ? /* @__PURE__ */ W(de, {
|
|
534
|
+
meta: a,
|
|
535
535
|
value: t.value,
|
|
536
|
-
onUpdate:
|
|
537
|
-
}) : /* @__PURE__ */ W(
|
|
538
|
-
"aria-label": `${
|
|
539
|
-
value:
|
|
540
|
-
onChange: (e) =>
|
|
536
|
+
onUpdate: s
|
|
537
|
+
}) : /* @__PURE__ */ W(i, {
|
|
538
|
+
"aria-label": `${a.label} filter value`,
|
|
539
|
+
value: _(t.value),
|
|
540
|
+
onChange: (e) => s({ value: e }),
|
|
541
541
|
placeholder: "Value…"
|
|
542
542
|
})]
|
|
543
543
|
})]
|
|
544
544
|
});
|
|
545
545
|
}
|
|
546
|
-
function me({ node: t, renderNode:
|
|
547
|
-
let
|
|
546
|
+
function me({ node: t, renderNode: r, onRemoveChild: i, onAddCondition: a, onAddBranch: o, path: s }) {
|
|
547
|
+
let c = t.or ?? t.and ?? [], l = t.or !== void 0;
|
|
548
548
|
return /* @__PURE__ */ G("div", {
|
|
549
549
|
style: {
|
|
550
550
|
display: "flex",
|
|
@@ -552,9 +552,9 @@ function me({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: o, onAdd
|
|
|
552
552
|
gap: 8
|
|
553
553
|
},
|
|
554
554
|
children: [
|
|
555
|
-
|
|
556
|
-
let
|
|
557
|
-
return /* @__PURE__ */ G("div", { children: [
|
|
555
|
+
c.map((t, o) => {
|
|
556
|
+
let c = [...s, o], u = l && t.and ? t.and : [t];
|
|
557
|
+
return /* @__PURE__ */ G("div", { children: [l && o > 0 && /* @__PURE__ */ G("div", {
|
|
558
558
|
style: {
|
|
559
559
|
display: "flex",
|
|
560
560
|
alignItems: "center",
|
|
@@ -590,7 +590,7 @@ function me({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: o, onAdd
|
|
|
590
590
|
gap: 8
|
|
591
591
|
},
|
|
592
592
|
children: [
|
|
593
|
-
|
|
593
|
+
l && /* @__PURE__ */ W("div", {
|
|
594
594
|
style: {
|
|
595
595
|
fontSize: 10.5,
|
|
596
596
|
fontWeight: 600,
|
|
@@ -600,35 +600,35 @@ function me({ node: t, renderNode: n, onRemoveChild: r, onAddCondition: o, onAdd
|
|
|
600
600
|
},
|
|
601
601
|
children: "Match ALL"
|
|
602
602
|
}),
|
|
603
|
-
|
|
604
|
-
|
|
603
|
+
u.map((e, n) => r(e, l && t.and ? [...c, n] : c)),
|
|
604
|
+
l && /* @__PURE__ */ W(f, {
|
|
605
605
|
kind: "ghost",
|
|
606
606
|
size: "xs",
|
|
607
607
|
icon: /* @__PURE__ */ W(e.plus, { size: 11 }),
|
|
608
|
-
onClick: () => o
|
|
608
|
+
onClick: () => a(o),
|
|
609
609
|
children: "Add condition"
|
|
610
610
|
}),
|
|
611
|
-
|
|
611
|
+
l && /* @__PURE__ */ W(n, {
|
|
612
612
|
size: 22,
|
|
613
613
|
icon: /* @__PURE__ */ W(e.x, { size: 12 }),
|
|
614
|
-
onClick: () =>
|
|
614
|
+
onClick: () => i(c),
|
|
615
615
|
title: "Remove OR alternative"
|
|
616
616
|
})
|
|
617
617
|
]
|
|
618
|
-
})] },
|
|
618
|
+
})] }, o);
|
|
619
619
|
}),
|
|
620
|
-
!
|
|
620
|
+
!l && /* @__PURE__ */ W(f, {
|
|
621
621
|
kind: "ghost",
|
|
622
622
|
size: "xs",
|
|
623
623
|
icon: /* @__PURE__ */ W(e.plus, { size: 11 }),
|
|
624
|
-
onClick: () =>
|
|
624
|
+
onClick: () => a(),
|
|
625
625
|
children: "Add condition"
|
|
626
626
|
}),
|
|
627
|
-
|
|
627
|
+
l && /* @__PURE__ */ W(f, {
|
|
628
628
|
kind: "ghost",
|
|
629
629
|
size: "xs",
|
|
630
630
|
icon: /* @__PURE__ */ W(e.plus, { size: 11 }),
|
|
631
|
-
onClick:
|
|
631
|
+
onClick: o,
|
|
632
632
|
children: "Add OR group"
|
|
633
633
|
})
|
|
634
634
|
]
|
|
@@ -679,14 +679,14 @@ function Q(e, t, n) {
|
|
|
679
679
|
};
|
|
680
680
|
});
|
|
681
681
|
}
|
|
682
|
-
function
|
|
682
|
+
function ge(e, t) {
|
|
683
683
|
if (t.length === 0) return e;
|
|
684
684
|
let [n, ...r] = t;
|
|
685
685
|
return r.length === 0 ? e.filter((e, t) => t !== n) : e.map((e, t) => {
|
|
686
686
|
if (t !== n) return e;
|
|
687
687
|
let i = e.or ?? e.and;
|
|
688
688
|
if (!i) return e;
|
|
689
|
-
let a =
|
|
689
|
+
let a = ge(i, r);
|
|
690
690
|
return e.or ? {
|
|
691
691
|
...e,
|
|
692
692
|
or: a
|
|
@@ -696,7 +696,7 @@ function $(e, t) {
|
|
|
696
696
|
};
|
|
697
697
|
});
|
|
698
698
|
}
|
|
699
|
-
function
|
|
699
|
+
function _e({ fields: t, activeFields: n, compact: r, onSelect: a, onCancel: o }) {
|
|
700
700
|
let [s, c] = V(""), l = t.filter((e) => !n.has(e.code) && (s === "" || e.label.toLowerCase().includes(s.toLowerCase()) || e.code.toLowerCase().includes(s.toLowerCase())));
|
|
701
701
|
return /* @__PURE__ */ G("div", {
|
|
702
702
|
style: {
|
|
@@ -711,7 +711,7 @@ function ge({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: o }
|
|
|
711
711
|
boxSizing: "border-box"
|
|
712
712
|
},
|
|
713
713
|
children: [
|
|
714
|
-
/* @__PURE__ */ W(
|
|
714
|
+
/* @__PURE__ */ W(i, {
|
|
715
715
|
value: s,
|
|
716
716
|
onChange: c,
|
|
717
717
|
placeholder: "Search fields…",
|
|
@@ -727,7 +727,7 @@ function ge({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: o }
|
|
|
727
727
|
},
|
|
728
728
|
children: [l.map((e) => /* @__PURE__ */ G("button", {
|
|
729
729
|
"data-testid": `filter-field-${e.code}`,
|
|
730
|
-
onClick: () =>
|
|
730
|
+
onClick: () => a(e.code),
|
|
731
731
|
style: {
|
|
732
732
|
textAlign: "left",
|
|
733
733
|
padding: "6px 8px",
|
|
@@ -770,7 +770,7 @@ function ge({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: o }
|
|
|
770
770
|
children: "No fields available"
|
|
771
771
|
})]
|
|
772
772
|
}),
|
|
773
|
-
/* @__PURE__ */ W(
|
|
773
|
+
/* @__PURE__ */ W(f, {
|
|
774
774
|
kind: "ghost",
|
|
775
775
|
size: "xs",
|
|
776
776
|
onClick: o,
|
|
@@ -782,7 +782,7 @@ function ge({ fields: t, activeFields: n, compact: r, onSelect: i, onCancel: o }
|
|
|
782
782
|
}
|
|
783
783
|
//#endregion
|
|
784
784
|
//#region src/components/filters/FilterChips.tsx
|
|
785
|
-
function
|
|
785
|
+
function ve({ filters: t, onRemove: n, onClearAll: r, onChipClick: i, fieldLabel: a = (e) => e, resolveValue: o }) {
|
|
786
786
|
return t.length === 0 ? null : /* @__PURE__ */ G("div", {
|
|
787
787
|
style: {
|
|
788
788
|
display: "flex",
|
|
@@ -791,13 +791,13 @@ function _e({ filters: t, onRemove: n, onClearAll: r, onChipClick: i, fieldLabel
|
|
|
791
791
|
flexWrap: "wrap",
|
|
792
792
|
paddingBottom: 12
|
|
793
793
|
},
|
|
794
|
-
children: [t.map((e, t) => /* @__PURE__ */ G(I, { children: [t > 0 && /* @__PURE__ */ W(
|
|
794
|
+
children: [t.map((e, t) => /* @__PURE__ */ G(I, { children: [t > 0 && /* @__PURE__ */ W(be, { label: "AND" }), /* @__PURE__ */ W(ye, {
|
|
795
795
|
node: e,
|
|
796
|
-
fieldLabel:
|
|
797
|
-
resolveValue:
|
|
796
|
+
fieldLabel: a,
|
|
797
|
+
resolveValue: o,
|
|
798
798
|
onRemove: n,
|
|
799
799
|
onClick: i
|
|
800
|
-
})] }, t)), /* @__PURE__ */ W(
|
|
800
|
+
})] }, t)), /* @__PURE__ */ W(f, {
|
|
801
801
|
kind: "ghost",
|
|
802
802
|
size: "xs",
|
|
803
803
|
icon: /* @__PURE__ */ W(e.x, { size: 11 }),
|
|
@@ -806,8 +806,8 @@ function _e({ filters: t, onRemove: n, onClearAll: r, onChipClick: i, fieldLabel
|
|
|
806
806
|
})]
|
|
807
807
|
});
|
|
808
808
|
}
|
|
809
|
-
function
|
|
810
|
-
if (e.field && e.op) return /* @__PURE__ */ W(
|
|
809
|
+
function ye({ node: e, fieldLabel: t, resolveValue: n, onRemove: r, onClick: i }) {
|
|
810
|
+
if (e.field && e.op) return /* @__PURE__ */ W(xe, {
|
|
811
811
|
node: e,
|
|
812
812
|
fieldLabel: t,
|
|
813
813
|
resolveValue: n,
|
|
@@ -835,7 +835,7 @@ function ve({ node: e, fieldLabel: t, resolveValue: n, onRemove: r, onClick: i }
|
|
|
835
835
|
},
|
|
836
836
|
children: "("
|
|
837
837
|
}),
|
|
838
|
-
a.map((e, a) => /* @__PURE__ */ G(I, { children: [a > 0 && /* @__PURE__ */ W(
|
|
838
|
+
a.map((e, a) => /* @__PURE__ */ G(I, { children: [a > 0 && /* @__PURE__ */ W(be, { label: o }), /* @__PURE__ */ W(ye, {
|
|
839
839
|
node: e,
|
|
840
840
|
fieldLabel: t,
|
|
841
841
|
resolveValue: n,
|
|
@@ -853,7 +853,7 @@ function ve({ node: e, fieldLabel: t, resolveValue: n, onRemove: r, onClick: i }
|
|
|
853
853
|
]
|
|
854
854
|
});
|
|
855
855
|
}
|
|
856
|
-
function
|
|
856
|
+
function be({ label: e }) {
|
|
857
857
|
return /* @__PURE__ */ W("span", {
|
|
858
858
|
"aria-label": e,
|
|
859
859
|
style: {
|
|
@@ -865,30 +865,30 @@ function ye({ label: e }) {
|
|
|
865
865
|
children: e
|
|
866
866
|
});
|
|
867
867
|
}
|
|
868
|
-
function
|
|
868
|
+
function xe({ node: t, fieldLabel: n, resolveValue: r, onRemove: i, onClick: o }) {
|
|
869
869
|
let s = /* @__PURE__ */ W(e.filter, { size: 11 });
|
|
870
|
-
return /* @__PURE__ */ W(
|
|
870
|
+
return /* @__PURE__ */ W(a, {
|
|
871
871
|
tone: "slate",
|
|
872
872
|
icon: s,
|
|
873
873
|
onClick: o,
|
|
874
|
-
onRemove:
|
|
874
|
+
onRemove: i,
|
|
875
875
|
children: /* @__PURE__ */ G("span", { children: [
|
|
876
876
|
/* @__PURE__ */ W("span", {
|
|
877
877
|
style: { color: "var(--text-3)" },
|
|
878
|
-
children:
|
|
878
|
+
children: n(t.field)
|
|
879
879
|
}),
|
|
880
880
|
" ",
|
|
881
881
|
/* @__PURE__ */ W("span", {
|
|
882
882
|
style: { fontWeight: 600 },
|
|
883
|
-
children: /* @__PURE__ */ W(
|
|
883
|
+
children: /* @__PURE__ */ W(Se, {
|
|
884
884
|
node: t,
|
|
885
|
-
resolveValue:
|
|
885
|
+
resolveValue: r
|
|
886
886
|
})
|
|
887
887
|
})
|
|
888
888
|
] })
|
|
889
889
|
});
|
|
890
890
|
}
|
|
891
|
-
function
|
|
891
|
+
function Se({ node: e, resolveValue: t }) {
|
|
892
892
|
let n = e.op, r = N[n] || n;
|
|
893
893
|
if (D.has(n)) return /* @__PURE__ */ W(U, { children: r });
|
|
894
894
|
if (!t) return /* @__PURE__ */ W(U, { children: F(e) });
|
|
@@ -898,11 +898,11 @@ function xe({ node: e, resolveValue: t }) {
|
|
|
898
898
|
" ",
|
|
899
899
|
i.map((n, r) => {
|
|
900
900
|
let i = t(e.field, n);
|
|
901
|
-
return /* @__PURE__ */ G(I, { children: [r > 0 ? ", " : "", /* @__PURE__ */ W("span", { children: i.status === "loading" ? /* @__PURE__ */ W(
|
|
901
|
+
return /* @__PURE__ */ G(I, { children: [r > 0 ? ", " : "", /* @__PURE__ */ W("span", { children: i.status === "loading" ? /* @__PURE__ */ W(Ce, {}) : i.label ?? i.raw })] }, r);
|
|
902
902
|
})
|
|
903
903
|
] });
|
|
904
904
|
}
|
|
905
|
-
function
|
|
905
|
+
function Ce() {
|
|
906
906
|
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W("style", { children: "@keyframes declarion-shimmer{from{background-position:200% 0}to{background-position:-200% 0}}" }), /* @__PURE__ */ W("span", {
|
|
907
907
|
"aria-label": "loading",
|
|
908
908
|
style: {
|
|
@@ -919,8 +919,8 @@ function Se() {
|
|
|
919
919
|
}
|
|
920
920
|
//#endregion
|
|
921
921
|
//#region src/components/list/ColumnPicker.tsx
|
|
922
|
-
function
|
|
923
|
-
let
|
|
922
|
+
function we({ availableColumns: t, visibleColumns: r, onToggle: i, onMove: a, onReset: o, onShowAll: s, onResetWidths: l, columnLabel: u = (e) => e }) {
|
|
923
|
+
let d = B(null), [p, m] = V(!1), h = t.filter((e) => !r.includes(e)), _ = (e) => /* @__PURE__ */ W("div", {
|
|
924
924
|
style: {
|
|
925
925
|
padding: "6px 8px 4px",
|
|
926
926
|
fontSize: 10.5,
|
|
@@ -931,21 +931,21 @@ function Ce({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: s, on
|
|
|
931
931
|
},
|
|
932
932
|
children: e
|
|
933
933
|
});
|
|
934
|
-
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(
|
|
935
|
-
ref:
|
|
934
|
+
return /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(f, {
|
|
935
|
+
ref: d,
|
|
936
936
|
icon: /* @__PURE__ */ W(e.columns, { size: 13 }),
|
|
937
937
|
onClick: () => m((e) => !e),
|
|
938
938
|
active: p,
|
|
939
939
|
children: "Columns"
|
|
940
|
-
}), /* @__PURE__ */ G(
|
|
940
|
+
}), /* @__PURE__ */ G(c, {
|
|
941
941
|
open: p,
|
|
942
|
-
anchor:
|
|
942
|
+
anchor: d.current,
|
|
943
943
|
onClose: () => m(!1),
|
|
944
944
|
align: "end",
|
|
945
945
|
width: 240,
|
|
946
946
|
children: [
|
|
947
|
-
|
|
948
|
-
|
|
947
|
+
_("Visible columns"),
|
|
948
|
+
r.map((t, o) => /* @__PURE__ */ G("div", {
|
|
949
949
|
style: {
|
|
950
950
|
display: "flex",
|
|
951
951
|
alignItems: "center",
|
|
@@ -954,8 +954,8 @@ function Ce({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: s, on
|
|
|
954
954
|
},
|
|
955
955
|
children: [/* @__PURE__ */ G("button", {
|
|
956
956
|
type: "button",
|
|
957
|
-
onClick: () =>
|
|
958
|
-
"aria-label": `Hide ${
|
|
957
|
+
onClick: () => i(t),
|
|
958
|
+
"aria-label": `Hide ${u(t)}`,
|
|
959
959
|
style: {
|
|
960
960
|
flex: 1,
|
|
961
961
|
display: "flex",
|
|
@@ -977,44 +977,44 @@ function Ce({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: s, on
|
|
|
977
977
|
textOverflow: "ellipsis",
|
|
978
978
|
whiteSpace: "nowrap"
|
|
979
979
|
},
|
|
980
|
-
children:
|
|
980
|
+
children: u(t)
|
|
981
981
|
})]
|
|
982
|
-
}),
|
|
982
|
+
}), a && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(n, {
|
|
983
983
|
icon: /* @__PURE__ */ W(e.arrowUp, { size: 12 }),
|
|
984
|
-
title: `Move ${
|
|
984
|
+
title: `Move ${u(t)} up`,
|
|
985
985
|
size: 22,
|
|
986
|
-
disabled:
|
|
987
|
-
onClick: () =>
|
|
988
|
-
}), /* @__PURE__ */ W(
|
|
986
|
+
disabled: o === 0,
|
|
987
|
+
onClick: () => a(t, "up")
|
|
988
|
+
}), /* @__PURE__ */ W(n, {
|
|
989
989
|
icon: /* @__PURE__ */ W(e.arrowDown, { size: 12 }),
|
|
990
|
-
title: `Move ${
|
|
990
|
+
title: `Move ${u(t)} down`,
|
|
991
991
|
size: 22,
|
|
992
|
-
disabled:
|
|
993
|
-
onClick: () =>
|
|
992
|
+
disabled: o === r.length - 1,
|
|
993
|
+
onClick: () => a(t, "down")
|
|
994
994
|
})] })]
|
|
995
995
|
}, t)),
|
|
996
|
-
h.length > 0 && /* @__PURE__ */ G(U, { children: [
|
|
996
|
+
h.length > 0 && /* @__PURE__ */ G(U, { children: [_("Hidden columns"), h.map((e) => /* @__PURE__ */ W(g, {
|
|
997
997
|
icon: /* @__PURE__ */ W("span", { style: {
|
|
998
998
|
width: 12,
|
|
999
999
|
display: "inline-block"
|
|
1000
1000
|
} }),
|
|
1001
|
-
onClick: () =>
|
|
1002
|
-
children:
|
|
1001
|
+
onClick: () => i(e),
|
|
1002
|
+
children: u(e)
|
|
1003
1003
|
}, e))] }),
|
|
1004
|
-
/* @__PURE__ */ W(
|
|
1005
|
-
/* @__PURE__ */ W(
|
|
1004
|
+
/* @__PURE__ */ W(g, { divider: !0 }),
|
|
1005
|
+
/* @__PURE__ */ W(g, {
|
|
1006
1006
|
icon: /* @__PURE__ */ W(e.refresh, { size: 12 }),
|
|
1007
|
-
onClick:
|
|
1007
|
+
onClick: o,
|
|
1008
1008
|
children: "Reset columns"
|
|
1009
1009
|
}),
|
|
1010
|
-
/* @__PURE__ */ W(
|
|
1010
|
+
/* @__PURE__ */ W(g, {
|
|
1011
1011
|
icon: /* @__PURE__ */ W(e.eye, { size: 12 }),
|
|
1012
|
-
onClick:
|
|
1012
|
+
onClick: s,
|
|
1013
1013
|
children: "Show all"
|
|
1014
1014
|
}),
|
|
1015
|
-
|
|
1015
|
+
l && /* @__PURE__ */ W(g, {
|
|
1016
1016
|
icon: /* @__PURE__ */ W(e.columns, { size: 12 }),
|
|
1017
|
-
onClick:
|
|
1017
|
+
onClick: l,
|
|
1018
1018
|
children: "Reset column widths (this device)"
|
|
1019
1019
|
})
|
|
1020
1020
|
]
|
|
@@ -1022,7 +1022,7 @@ function Ce({ availableColumns: t, visibleColumns: n, onToggle: r, onMove: s, on
|
|
|
1022
1022
|
}
|
|
1023
1023
|
//#endregion
|
|
1024
1024
|
//#region src/components/list/ViewSwitcher.tsx
|
|
1025
|
-
var
|
|
1025
|
+
var Te = {
|
|
1026
1026
|
display: "flex",
|
|
1027
1027
|
alignItems: "center",
|
|
1028
1028
|
gap: 6,
|
|
@@ -1036,8 +1036,8 @@ var we = {
|
|
|
1036
1036
|
color: "var(--text-2)",
|
|
1037
1037
|
fontFamily: "inherit"
|
|
1038
1038
|
};
|
|
1039
|
-
function
|
|
1040
|
-
let
|
|
1039
|
+
function Ee({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: a, onSaveAs: o }) {
|
|
1040
|
+
let s = B(null), [l, u] = V(!1), d = t.find((e) => e.id === n), p = t.filter((e) => e.source === "system"), m = t.filter((e) => e.source === "personal"), h = t.filter((e) => e.source === "shared"), _ = d ? v(d.name) : "Default view", y = (e) => /* @__PURE__ */ W("div", {
|
|
1041
1041
|
style: {
|
|
1042
1042
|
padding: "6px 8px 4px",
|
|
1043
1043
|
fontSize: 10,
|
|
@@ -1056,10 +1056,10 @@ function Te({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: s, onS
|
|
|
1056
1056
|
},
|
|
1057
1057
|
children: [
|
|
1058
1058
|
/* @__PURE__ */ G("button", {
|
|
1059
|
-
ref:
|
|
1059
|
+
ref: s,
|
|
1060
1060
|
type: "button",
|
|
1061
|
-
onClick: () =>
|
|
1062
|
-
style:
|
|
1061
|
+
onClick: () => u((e) => !e),
|
|
1062
|
+
style: Te,
|
|
1063
1063
|
children: [
|
|
1064
1064
|
/* @__PURE__ */ W(e.star, { size: 12 }),
|
|
1065
1065
|
/* @__PURE__ */ W("span", { children: _ }),
|
|
@@ -1074,13 +1074,13 @@ function Te({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: s, onS
|
|
|
1074
1074
|
/* @__PURE__ */ W(e.down, { size: 11 })
|
|
1075
1075
|
]
|
|
1076
1076
|
}),
|
|
1077
|
-
/* @__PURE__ */ G(
|
|
1078
|
-
open:
|
|
1079
|
-
anchor:
|
|
1080
|
-
onClose: () =>
|
|
1077
|
+
/* @__PURE__ */ G(c, {
|
|
1078
|
+
open: l,
|
|
1079
|
+
anchor: s.current,
|
|
1080
|
+
onClose: () => u(!1),
|
|
1081
1081
|
width: 280,
|
|
1082
1082
|
children: [
|
|
1083
|
-
/* @__PURE__ */ W(
|
|
1083
|
+
/* @__PURE__ */ W(g, {
|
|
1084
1084
|
icon: n ? void 0 : /* @__PURE__ */ W(e.check, { size: 12 }),
|
|
1085
1085
|
active: !n,
|
|
1086
1086
|
onClick: () => {
|
|
@@ -1088,49 +1088,49 @@ function Te({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: s, onS
|
|
|
1088
1088
|
id: "",
|
|
1089
1089
|
name: { en: "Default" },
|
|
1090
1090
|
source: "system"
|
|
1091
|
-
}),
|
|
1091
|
+
}), u(!1);
|
|
1092
1092
|
},
|
|
1093
1093
|
children: "Default view"
|
|
1094
1094
|
}),
|
|
1095
|
-
|
|
1096
|
-
|
|
1095
|
+
p.length > 0 && y("Presets"),
|
|
1096
|
+
p.map((t) => /* @__PURE__ */ W(g, {
|
|
1097
1097
|
icon: n === t.id ? /* @__PURE__ */ W(e.check, { size: 12 }) : void 0,
|
|
1098
1098
|
active: n === t.id,
|
|
1099
1099
|
onClick: () => {
|
|
1100
|
-
i(t),
|
|
1100
|
+
i(t), u(!1);
|
|
1101
1101
|
},
|
|
1102
|
-
children:
|
|
1102
|
+
children: v(t.name)
|
|
1103
1103
|
}, t.id)),
|
|
1104
|
-
|
|
1105
|
-
|
|
1104
|
+
m.length > 0 && y("My Views"),
|
|
1105
|
+
m.map((t) => /* @__PURE__ */ W(g, {
|
|
1106
1106
|
icon: n === t.id ? /* @__PURE__ */ W(e.check, { size: 12 }) : t.is_default ? /* @__PURE__ */ W(e.star, { size: 12 }) : void 0,
|
|
1107
1107
|
active: n === t.id,
|
|
1108
1108
|
onClick: () => {
|
|
1109
|
-
i(t),
|
|
1109
|
+
i(t), u(!1);
|
|
1110
1110
|
},
|
|
1111
|
-
children:
|
|
1111
|
+
children: v(t.name)
|
|
1112
1112
|
}, t.id)),
|
|
1113
|
-
|
|
1114
|
-
|
|
1113
|
+
h.length > 0 && y("Shared"),
|
|
1114
|
+
h.map((t) => /* @__PURE__ */ W(g, {
|
|
1115
1115
|
icon: n === t.id ? /* @__PURE__ */ W(e.check, { size: 12 }) : /* @__PURE__ */ W(e.globe, { size: 12 }),
|
|
1116
1116
|
active: n === t.id,
|
|
1117
1117
|
onClick: () => {
|
|
1118
|
-
i(t),
|
|
1118
|
+
i(t), u(!1);
|
|
1119
1119
|
},
|
|
1120
|
-
children:
|
|
1120
|
+
children: v(t.name)
|
|
1121
1121
|
}, t.id)),
|
|
1122
|
-
|
|
1122
|
+
o && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(g, { divider: !0 }), /* @__PURE__ */ W(g, {
|
|
1123
1123
|
icon: /* @__PURE__ */ W(e.plus, { size: 12 }),
|
|
1124
1124
|
onClick: () => {
|
|
1125
|
-
|
|
1125
|
+
o(), u(!1);
|
|
1126
1126
|
},
|
|
1127
1127
|
children: "Save as new view…"
|
|
1128
1128
|
})] })
|
|
1129
1129
|
]
|
|
1130
1130
|
}),
|
|
1131
|
-
r && n &&
|
|
1131
|
+
r && n && a && /* @__PURE__ */ W(f, {
|
|
1132
1132
|
icon: /* @__PURE__ */ W(e.save, { size: 12 }),
|
|
1133
|
-
onClick:
|
|
1133
|
+
onClick: a,
|
|
1134
1134
|
children: "Save"
|
|
1135
1135
|
})
|
|
1136
1136
|
]
|
|
@@ -1138,52 +1138,52 @@ function Te({ views: t, activeViewId: n, isDirty: r, onSelect: i, onSave: s, onS
|
|
|
1138
1138
|
}
|
|
1139
1139
|
//#endregion
|
|
1140
1140
|
//#region src/components/list/PeekFieldCell.tsx
|
|
1141
|
-
var
|
|
1141
|
+
var De = /* @__PURE__ */ new Set([
|
|
1142
1142
|
"enum",
|
|
1143
1143
|
"bool",
|
|
1144
1144
|
"ref"
|
|
1145
1145
|
]);
|
|
1146
|
-
function
|
|
1146
|
+
function Oe(e) {
|
|
1147
1147
|
let t = e.display?.widget;
|
|
1148
|
-
return t &&
|
|
1148
|
+
return t && De.has(t) ? !0 : De.has(e.type);
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1151
|
-
let u =
|
|
1150
|
+
function ke({ field: t, fieldName: r, label: i, value: a, record: o, refs: s, readOnly: c, onCommit: l }) {
|
|
1151
|
+
let u = p(), [d, f] = V(!1), [m, h] = V(a), g = Oe(t);
|
|
1152
1152
|
R(() => {
|
|
1153
|
-
d ||
|
|
1153
|
+
d || h(a);
|
|
1154
1154
|
}, [a, d]);
|
|
1155
|
-
let
|
|
1156
|
-
c || (
|
|
1155
|
+
let _ = L(() => {
|
|
1156
|
+
c || (h(a), f(!0));
|
|
1157
1157
|
}, [c, a]), v = L((e) => {
|
|
1158
|
-
l(e === void 0 ?
|
|
1159
|
-
}, [l,
|
|
1160
|
-
|
|
1158
|
+
l(e === void 0 ? m : e), f(!1);
|
|
1159
|
+
}, [l, m]), b = L(() => {
|
|
1160
|
+
h(a), f(!1);
|
|
1161
1161
|
}, [a]), x = L((e) => {
|
|
1162
1162
|
if (c || d) return;
|
|
1163
1163
|
let t = e.target;
|
|
1164
|
-
t.closest("a") || t.closest("[data-peek-pencil=\"true\"]") ||
|
|
1164
|
+
t.closest("a") || t.closest("[data-peek-pencil=\"true\"]") || _();
|
|
1165
1165
|
}, [
|
|
1166
1166
|
c,
|
|
1167
1167
|
d,
|
|
1168
|
-
|
|
1168
|
+
_
|
|
1169
1169
|
]), S = L((e) => {
|
|
1170
1170
|
if (!d) {
|
|
1171
|
-
!c && (e.key === "Enter" || e.key === " ") && (e.preventDefault(),
|
|
1171
|
+
!c && (e.key === "Enter" || e.key === " ") && (e.preventDefault(), _());
|
|
1172
1172
|
return;
|
|
1173
1173
|
}
|
|
1174
|
-
|
|
1174
|
+
g || (e.key === "Enter" ? (e.preventDefault(), e.stopPropagation(), v()) : e.key === "Escape" && (e.preventDefault(), e.stopPropagation(), b()));
|
|
1175
1175
|
}, [
|
|
1176
1176
|
d,
|
|
1177
|
-
h,
|
|
1178
|
-
c,
|
|
1179
1177
|
g,
|
|
1178
|
+
c,
|
|
1179
|
+
_,
|
|
1180
1180
|
v,
|
|
1181
1181
|
b
|
|
1182
1182
|
]), C = L((e) => {
|
|
1183
|
-
|
|
1184
|
-
}, [
|
|
1183
|
+
g ? (h(e), v(e)) : h(e);
|
|
1184
|
+
}, [g, v]), w = y({
|
|
1185
1185
|
field: t,
|
|
1186
|
-
fieldName:
|
|
1186
|
+
fieldName: r,
|
|
1187
1187
|
value: a,
|
|
1188
1188
|
mode: "display",
|
|
1189
1189
|
record: o,
|
|
@@ -1191,8 +1191,8 @@ function Oe({ field: t, fieldName: n, label: r, value: a, record: o, refs: s, re
|
|
|
1191
1191
|
locale: u
|
|
1192
1192
|
}), T = d ? y({
|
|
1193
1193
|
field: t,
|
|
1194
|
-
fieldName:
|
|
1195
|
-
value:
|
|
1194
|
+
fieldName: r,
|
|
1195
|
+
value: m,
|
|
1196
1196
|
mode: "edit",
|
|
1197
1197
|
onChange: C,
|
|
1198
1198
|
record: o,
|
|
@@ -1224,7 +1224,7 @@ function Oe({ field: t, fieldName: n, label: r, value: a, record: o, refs: s, re
|
|
|
1224
1224
|
},
|
|
1225
1225
|
tabIndex: c || d ? -1 : 0,
|
|
1226
1226
|
role: c || d ? void 0 : "button",
|
|
1227
|
-
"aria-label": c || d ? void 0 : `Edit ${
|
|
1227
|
+
"aria-label": c || d ? void 0 : `Edit ${i}`,
|
|
1228
1228
|
children: d ? /* @__PURE__ */ G("div", {
|
|
1229
1229
|
style: {
|
|
1230
1230
|
display: "flex",
|
|
@@ -1239,12 +1239,12 @@ function Oe({ field: t, fieldName: n, label: r, value: a, record: o, refs: s, re
|
|
|
1239
1239
|
minWidth: 0
|
|
1240
1240
|
},
|
|
1241
1241
|
children: T
|
|
1242
|
-
}), !
|
|
1242
|
+
}), !g && /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ W(n, {
|
|
1243
1243
|
size: 24,
|
|
1244
1244
|
icon: /* @__PURE__ */ W(e.check, { size: 13 }),
|
|
1245
1245
|
onClick: () => v(),
|
|
1246
1246
|
title: "Save"
|
|
1247
|
-
}), /* @__PURE__ */ W(
|
|
1247
|
+
}), /* @__PURE__ */ W(n, {
|
|
1248
1248
|
size: 24,
|
|
1249
1249
|
icon: /* @__PURE__ */ W(e.x, { size: 13 }),
|
|
1250
1250
|
onClick: b,
|
|
@@ -1265,11 +1265,11 @@ function Oe({ field: t, fieldName: n, label: r, value: a, record: o, refs: s, re
|
|
|
1265
1265
|
transform: "translateY(-50%)"
|
|
1266
1266
|
},
|
|
1267
1267
|
className: "peek-pencil",
|
|
1268
|
-
children: /* @__PURE__ */ W(
|
|
1268
|
+
children: /* @__PURE__ */ W(n, {
|
|
1269
1269
|
size: 20,
|
|
1270
1270
|
icon: /* @__PURE__ */ W(e.edit, { size: 12 }),
|
|
1271
1271
|
onClick: (e) => {
|
|
1272
|
-
e.stopPropagation(),
|
|
1272
|
+
e.stopPropagation(), _();
|
|
1273
1273
|
},
|
|
1274
1274
|
title: "Edit"
|
|
1275
1275
|
})
|
|
@@ -1278,16 +1278,16 @@ function Oe({ field: t, fieldName: n, label: r, value: a, record: o, refs: s, re
|
|
|
1278
1278
|
}
|
|
1279
1279
|
//#endregion
|
|
1280
1280
|
//#region src/components/list/QuickPeek.tsx
|
|
1281
|
-
function
|
|
1282
|
-
let D =
|
|
1281
|
+
function Ae({ entity: t, entityCode: r, record: i, title: a, recordId: c, avatarName: l, fields: m, refs: g, screen: _, actions: y, screenActionLayout: b, entityActionLayout: x, executeAction: S, onClose: w, onOpen: T, onSave: E }) {
|
|
1282
|
+
let D = p(), [O, k] = V({ ...i }), [A, j] = V(!1), M = B(null), { run: N } = h(), P = re(t, _, O);
|
|
1283
1283
|
R(() => {
|
|
1284
|
-
k({ ...
|
|
1285
|
-
}, [
|
|
1284
|
+
k({ ...i }), j(!1);
|
|
1285
|
+
}, [i]), R(() => {
|
|
1286
1286
|
M.current?.focus();
|
|
1287
1287
|
}, []);
|
|
1288
1288
|
let F = z(() => {
|
|
1289
|
-
let e = P?.action_layout ?? b ?? x ??
|
|
1290
|
-
return
|
|
1289
|
+
let e = P?.action_layout ?? b ?? x ?? s(y, "quick_peek"), n = o(e, y, void 0, "quick_peek");
|
|
1290
|
+
return d(n, y, void 0, O, [], te(t, O));
|
|
1291
1291
|
}, [
|
|
1292
1292
|
P?.action_layout,
|
|
1293
1293
|
b,
|
|
@@ -1298,7 +1298,7 @@ function ke({ entity: t, entityCode: n, record: r, title: o, recordId: c, avatar
|
|
|
1298
1298
|
]), I = ({ code: e, action: t }) => {
|
|
1299
1299
|
N({
|
|
1300
1300
|
action: t,
|
|
1301
|
-
title:
|
|
1301
|
+
title: v(t.display?.name) || e,
|
|
1302
1302
|
row: O,
|
|
1303
1303
|
execute: (n) => S(e, t, n)
|
|
1304
1304
|
});
|
|
@@ -1349,7 +1349,7 @@ function ke({ entity: t, entityCode: n, record: r, title: o, recordId: c, avatar
|
|
|
1349
1349
|
},
|
|
1350
1350
|
children: [
|
|
1351
1351
|
/* @__PURE__ */ W(C, {
|
|
1352
|
-
name:
|
|
1352
|
+
name: l || a,
|
|
1353
1353
|
size: 28
|
|
1354
1354
|
}),
|
|
1355
1355
|
/* @__PURE__ */ G("div", {
|
|
@@ -1366,7 +1366,7 @@ function ke({ entity: t, entityCode: n, record: r, title: o, recordId: c, avatar
|
|
|
1366
1366
|
textOverflow: "ellipsis",
|
|
1367
1367
|
whiteSpace: "nowrap"
|
|
1368
1368
|
},
|
|
1369
|
-
children:
|
|
1369
|
+
children: a
|
|
1370
1370
|
}), c && /* @__PURE__ */ W("div", {
|
|
1371
1371
|
className: "mono",
|
|
1372
1372
|
style: {
|
|
@@ -1376,12 +1376,12 @@ function ke({ entity: t, entityCode: n, record: r, title: o, recordId: c, avatar
|
|
|
1376
1376
|
children: c
|
|
1377
1377
|
})]
|
|
1378
1378
|
}),
|
|
1379
|
-
/* @__PURE__ */ W(
|
|
1379
|
+
/* @__PURE__ */ W(n, {
|
|
1380
1380
|
icon: /* @__PURE__ */ W(e.external, { size: 13 }),
|
|
1381
1381
|
title: A ? "Open in tab (keeps unsaved changes)" : "Open in tab",
|
|
1382
1382
|
onClick: () => T(A ? O : null)
|
|
1383
1383
|
}),
|
|
1384
|
-
/* @__PURE__ */ W(
|
|
1384
|
+
/* @__PURE__ */ W(n, {
|
|
1385
1385
|
icon: /* @__PURE__ */ W(e.x, { size: 14 }),
|
|
1386
1386
|
title: "Close",
|
|
1387
1387
|
onClick: w
|
|
@@ -1411,30 +1411,30 @@ function ke({ entity: t, entityCode: n, record: r, title: o, recordId: c, avatar
|
|
|
1411
1411
|
children: [
|
|
1412
1412
|
/* @__PURE__ */ W(e.sparkle, { size: 12 }),
|
|
1413
1413
|
" Inline quick-edit — click any field to change.",
|
|
1414
|
-
/* @__PURE__ */ W(
|
|
1414
|
+
/* @__PURE__ */ W(u, { children: "Tab" }),
|
|
1415
1415
|
" to move, ",
|
|
1416
|
-
/* @__PURE__ */ W(
|
|
1416
|
+
/* @__PURE__ */ W(u, { children: "Esc" }),
|
|
1417
1417
|
" to close."
|
|
1418
1418
|
]
|
|
1419
|
-
}),
|
|
1419
|
+
}), m.map((e) => /* @__PURE__ */ W(je, {
|
|
1420
1420
|
label: e.label,
|
|
1421
1421
|
children: e.kind === "file" ? ne({
|
|
1422
1422
|
entity: t,
|
|
1423
|
-
entityCode:
|
|
1423
|
+
entityCode: r,
|
|
1424
1424
|
fieldName: e.key,
|
|
1425
1425
|
record: O,
|
|
1426
1426
|
mode: e.readOnly ? "display" : "edit",
|
|
1427
1427
|
onChange: (t) => L(e.key, t),
|
|
1428
|
-
refs:
|
|
1428
|
+
refs: g,
|
|
1429
1429
|
disabled: e.readOnly,
|
|
1430
1430
|
locale: D
|
|
1431
|
-
}) : /* @__PURE__ */ W(
|
|
1431
|
+
}) : /* @__PURE__ */ W(ke, {
|
|
1432
1432
|
field: e.field,
|
|
1433
1433
|
fieldName: e.key,
|
|
1434
1434
|
label: e.label,
|
|
1435
1435
|
value: O[e.key],
|
|
1436
1436
|
record: O,
|
|
1437
|
-
refs:
|
|
1437
|
+
refs: g,
|
|
1438
1438
|
readOnly: e.readOnly,
|
|
1439
1439
|
onCommit: (t) => L(e.key, t)
|
|
1440
1440
|
})
|
|
@@ -1484,7 +1484,7 @@ function ke({ entity: t, entityCode: n, record: r, title: o, recordId: c, avatar
|
|
|
1484
1484
|
ariaLabel: "Quick peek actions"
|
|
1485
1485
|
})
|
|
1486
1486
|
}),
|
|
1487
|
-
/* @__PURE__ */ W(
|
|
1487
|
+
/* @__PURE__ */ W(f, {
|
|
1488
1488
|
kind: "primary",
|
|
1489
1489
|
icon: /* @__PURE__ */ W(e.edit, { size: 13 }),
|
|
1490
1490
|
onClick: () => T(A ? O : null),
|
|
@@ -1495,7 +1495,7 @@ function ke({ entity: t, entityCode: n, record: r, title: o, recordId: c, avatar
|
|
|
1495
1495
|
]
|
|
1496
1496
|
})] });
|
|
1497
1497
|
}
|
|
1498
|
-
function
|
|
1498
|
+
function je({ label: e, children: t }) {
|
|
1499
1499
|
return /* @__PURE__ */ G("div", {
|
|
1500
1500
|
style: {
|
|
1501
1501
|
display: "grid",
|
|
@@ -1516,7 +1516,7 @@ function Ae({ label: e, children: t }) {
|
|
|
1516
1516
|
}
|
|
1517
1517
|
//#endregion
|
|
1518
1518
|
//#region src/lib/format-count.ts
|
|
1519
|
-
var
|
|
1519
|
+
var Me = [
|
|
1520
1520
|
{
|
|
1521
1521
|
value: 1e9,
|
|
1522
1522
|
suffix: "B"
|
|
@@ -1530,22 +1530,22 @@ var je = [
|
|
|
1530
1530
|
suffix: "K"
|
|
1531
1531
|
}
|
|
1532
1532
|
];
|
|
1533
|
-
function
|
|
1533
|
+
function Ne(e) {
|
|
1534
1534
|
if (!Number.isFinite(e) || e < 0) return "~0";
|
|
1535
1535
|
let t = Math.round(e);
|
|
1536
1536
|
if (t < 1e3) return `~${t}`;
|
|
1537
|
-
for (let { value: e, suffix: n } of
|
|
1537
|
+
for (let { value: e, suffix: n } of Me) {
|
|
1538
1538
|
if (t < e) continue;
|
|
1539
1539
|
let r = t / e;
|
|
1540
1540
|
return `~${(r < 10 ? r.toFixed(1) : Math.round(r).toString()).replace(/\.0$/, "")}${n}`;
|
|
1541
1541
|
}
|
|
1542
1542
|
return `~${t.toLocaleString()}`;
|
|
1543
1543
|
}
|
|
1544
|
-
function
|
|
1544
|
+
function $(e) {
|
|
1545
1545
|
return !Number.isFinite(e) || e < 0 ? "0" : Math.round(e).toLocaleString();
|
|
1546
1546
|
}
|
|
1547
1547
|
function Pe(e, t) {
|
|
1548
|
-
return t === "estimated" ?
|
|
1548
|
+
return t === "estimated" ? Ne(e) : $(e);
|
|
1549
1549
|
}
|
|
1550
1550
|
//#endregion
|
|
1551
|
-
export {
|
|
1551
|
+
export { Ae as a, ve as c, se as d, oe as f, je as i, le as l, K as m, Ne as n, Ee as o, ae as p, $ as r, we as s, Pe as t, ce as u };
|