@bfrs/agentic-components 0.7.6 → 0.7.8
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/BFRS_AGENTIC_COMPONENTS.md +4 -2
- package/dist/components/data-display/DataTable/DataTable.js +6 -0
- package/dist/components/data-display/DataTable/DataTable.js.map +1 -1
- package/dist/components/data-display/DataTable/DataTable.types.d.ts +7 -0
- package/dist/components/data-display/DataTable/TableSaveView.js +158 -138
- package/dist/components/data-display/DataTable/TableSaveView.js.map +1 -1
- package/dist/components/data-display/DataTable/TableSkeleton.js +3 -1
- package/dist/components/data-display/DataTable/TableSkeleton.js.map +1 -1
- package/dist/components/data-display/DataTable/TableViewSelector.d.ts +1 -2
- package/dist/components/data-display/DataTable/TableViewSelector.js +290 -264
- package/dist/components/data-display/DataTable/TableViewSelector.js.map +1 -1
- package/dist/components/data-display/DataTable/saveViewApi.d.ts +13 -4
- package/dist/components/data-display/DataTable/saveViewApi.js +161 -146
- package/dist/components/data-display/DataTable/saveViewApi.js.map +1 -1
- package/dist/components/data-display/DataTable/useSavedViews.d.ts +8 -8
- package/dist/components/data-display/DataTable/useSavedViews.js +33 -51
- package/dist/components/data-display/DataTable/useSavedViews.js.map +1 -1
- package/dist/components/data-display/DataTable/viewCache.d.ts +75 -0
- package/dist/components/data-display/DataTable/viewCache.js +83 -0
- package/dist/components/data-display/DataTable/viewCache.js.map +1 -0
- package/dist/components/data-display/DataTable/viewStore.d.ts +14 -4
- package/dist/components/data-display/DataTable/viewStore.js +191 -188
- package/dist/components/data-display/DataTable/viewStore.js.map +1 -1
- package/dist/custom-elements.js +11080 -10972
- package/dist/custom-elements.js.map +1 -1
- package/package.json +1 -1
- package/dist/node_modules/@phosphor-icons/react/dist/csr/ArrowCounterClockwise.es.js +0 -11
- package/dist/node_modules/@phosphor-icons/react/dist/csr/ArrowCounterClockwise.es.js.map +0 -1
- package/dist/node_modules/@phosphor-icons/react/dist/defs/ArrowCounterClockwise.es.js +0 -31
- package/dist/node_modules/@phosphor-icons/react/dist/defs/ArrowCounterClockwise.es.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Root as
|
|
3
|
-
import { useId as
|
|
4
|
-
import
|
|
5
|
-
import { kfOverlayIn as
|
|
6
|
-
import { Button as
|
|
7
|
-
import { isReservedViewName as
|
|
8
|
-
import { BfrsPortalScope as
|
|
9
|
-
const
|
|
1
|
+
import { jsxs as c, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Root as Vt, Trigger as kt, Portal as At, Overlay as zt, Content as Ht, Title as Ct, Description as Dt } from "../../../node_modules/@radix-ui/react-dialog/dist/index.js";
|
|
3
|
+
import { useId as It, useState as y, useMemo as R, useEffect as Wt } from "react";
|
|
4
|
+
import r from "@emotion/styled";
|
|
5
|
+
import { kfOverlayIn as Rt, kfModalContentIn as Bt, twTransform as Ft, twRing as Q } from "../../../lib/emotionTw.js";
|
|
6
|
+
import { Button as B } from "../../primitives/Button/Button.js";
|
|
7
|
+
import { isReservedViewName as X, createTableViewSelectorStore as Lt } from "./viewStore.js";
|
|
8
|
+
import { BfrsPortalScope as Pt } from "../../ui/providers/BfrsProvider/BfrsProvider.js";
|
|
9
|
+
const jt = /* @__PURE__ */ r(zt, {
|
|
10
10
|
label: "AgenticTableSaveView-overlay"
|
|
11
11
|
})({
|
|
12
12
|
position: "fixed",
|
|
@@ -16,9 +16,9 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
16
16
|
left: 0,
|
|
17
17
|
zIndex: 50,
|
|
18
18
|
backgroundColor: "hsl(var(--bfrs-color-text-primary) / .45)",
|
|
19
|
-
...
|
|
19
|
+
...Rt,
|
|
20
20
|
animation: "bfrs-bfrs-overlay-in var(--bfrs-motion-fast) var(--bfrs-ease-out)"
|
|
21
|
-
}),
|
|
21
|
+
}), Ot = /* @__PURE__ */ r(Ht, {
|
|
22
22
|
label: "AgenticTableSaveView-content"
|
|
23
23
|
})({
|
|
24
24
|
position: "fixed",
|
|
@@ -28,7 +28,7 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
28
28
|
maxHeight: "calc(100dvh - 2rem)",
|
|
29
29
|
width: "calc(100% - 2rem)",
|
|
30
30
|
maxWidth: "420px",
|
|
31
|
-
...
|
|
31
|
+
...Ft({ "--tw-translate-x": "-50%", "--tw-translate-y": "-50%" }),
|
|
32
32
|
overflow: "auto",
|
|
33
33
|
borderRadius: "var(--bfrs-radius-lg)",
|
|
34
34
|
borderWidth: "1px",
|
|
@@ -44,17 +44,17 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
44
44
|
boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)",
|
|
45
45
|
outline: "2px solid transparent",
|
|
46
46
|
outlineOffset: "2px",
|
|
47
|
-
...
|
|
47
|
+
...Bt,
|
|
48
48
|
animation: "bfrs-bfrs-modal-content-in var(--bfrs-motion-normal) var(--bfrs-ease-out)",
|
|
49
49
|
"@media (min-width:640px)": {
|
|
50
50
|
padding: "1.25rem"
|
|
51
51
|
}
|
|
52
|
-
}),
|
|
52
|
+
}), Gt = /* @__PURE__ */ r("form", {
|
|
53
53
|
label: "AgenticTableSaveView-form"
|
|
54
54
|
})({
|
|
55
55
|
display: "flex",
|
|
56
56
|
flexDirection: "column"
|
|
57
|
-
}),
|
|
57
|
+
}), Mt = /* @__PURE__ */ r(Ct, {
|
|
58
58
|
label: "AgenticTableSaveView-title"
|
|
59
59
|
})({
|
|
60
60
|
fontSize: "1.125rem",
|
|
@@ -62,7 +62,7 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
62
62
|
lineHeight: "1.5rem",
|
|
63
63
|
"--tw-text-opacity": "1",
|
|
64
64
|
color: "hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))"
|
|
65
|
-
}),
|
|
65
|
+
}), $t = /* @__PURE__ */ r(Dt, {
|
|
66
66
|
label: "AgenticTableSaveView-description"
|
|
67
67
|
})({
|
|
68
68
|
marginTop: ".25rem",
|
|
@@ -70,11 +70,11 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
70
70
|
lineHeight: "1.25rem",
|
|
71
71
|
"--tw-text-opacity": "1",
|
|
72
72
|
color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
|
|
73
|
-
}),
|
|
73
|
+
}), Et = /* @__PURE__ */ r("div", {
|
|
74
74
|
label: "AgenticTableSaveView-field"
|
|
75
75
|
})({
|
|
76
76
|
marginTop: "1.25rem"
|
|
77
|
-
}),
|
|
77
|
+
}), Kt = /* @__PURE__ */ r("label", {
|
|
78
78
|
label: "AgenticTableSaveView-label"
|
|
79
79
|
})({
|
|
80
80
|
display: "block",
|
|
@@ -83,7 +83,7 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
83
83
|
lineHeight: "1.25rem",
|
|
84
84
|
"--tw-text-opacity": "1",
|
|
85
85
|
color: "hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))"
|
|
86
|
-
}),
|
|
86
|
+
}), Ut = /* @__PURE__ */ r("input", {
|
|
87
87
|
label: "AgenticTableSaveView-input"
|
|
88
88
|
})({
|
|
89
89
|
marginTop: ".375rem",
|
|
@@ -116,11 +116,11 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
116
116
|
color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
|
|
117
117
|
},
|
|
118
118
|
"&:focus": {
|
|
119
|
-
...
|
|
119
|
+
...Q("2px", "hsl(var(--bfrs-color-primary-soft) / var(--tw-ring-opacity, 1))"),
|
|
120
120
|
"--tw-ring-opacity": "1"
|
|
121
121
|
},
|
|
122
122
|
"&:focus-visible": {
|
|
123
|
-
...
|
|
123
|
+
...Q("2px", "hsl(var(--bfrs-color-primary-soft) / var(--tw-ring-opacity, 1))"),
|
|
124
124
|
"--tw-ring-opacity": "1"
|
|
125
125
|
},
|
|
126
126
|
"&:disabled": {
|
|
@@ -130,7 +130,7 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
130
130
|
"--tw-text-opacity": "1",
|
|
131
131
|
color: "hsl(var(--bfrs-color-text-disabled) / var(--tw-text-opacity, 1))"
|
|
132
132
|
}
|
|
133
|
-
}),
|
|
133
|
+
}), Y = /* @__PURE__ */ r("p", {
|
|
134
134
|
label: "AgenticTableSaveView-fieldError"
|
|
135
135
|
})({
|
|
136
136
|
marginTop: ".375rem",
|
|
@@ -138,11 +138,11 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
138
138
|
lineHeight: "1rem",
|
|
139
139
|
"--tw-text-opacity": "1",
|
|
140
140
|
color: "hsl(var(--bfrs-color-danger) / var(--tw-text-opacity, 1))"
|
|
141
|
-
}),
|
|
141
|
+
}), _t = /* @__PURE__ */ r("section", {
|
|
142
142
|
label: "AgenticTableSaveView-section"
|
|
143
143
|
})({
|
|
144
144
|
marginTop: "1.25rem"
|
|
145
|
-
}),
|
|
145
|
+
}), qt = /* @__PURE__ */ r("div", {
|
|
146
146
|
label: "AgenticTableSaveView-sectionTitle"
|
|
147
147
|
})({
|
|
148
148
|
fontSize: "11px",
|
|
@@ -151,14 +151,14 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
151
151
|
letterSpacing: ".12em",
|
|
152
152
|
"--tw-text-opacity": "1",
|
|
153
153
|
color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
|
|
154
|
-
}),
|
|
154
|
+
}), Jt = /* @__PURE__ */ r("div", {
|
|
155
155
|
label: "AgenticTableSaveView-chips"
|
|
156
156
|
})({
|
|
157
157
|
marginTop: ".5rem",
|
|
158
158
|
display: "flex",
|
|
159
159
|
flexWrap: "wrap",
|
|
160
160
|
gap: ".5rem"
|
|
161
|
-
}),
|
|
161
|
+
}), Z = /* @__PURE__ */ r("span", {
|
|
162
162
|
label: "AgenticTableSaveView-chip",
|
|
163
163
|
shouldForwardProp: (o) => o !== "ownerState"
|
|
164
164
|
})(({ ownerState: o }) => [
|
|
@@ -184,7 +184,7 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
184
184
|
"--tw-text-opacity": "1",
|
|
185
185
|
color: "hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))"
|
|
186
186
|
}
|
|
187
|
-
]),
|
|
187
|
+
]), Nt = /* @__PURE__ */ r("div", {
|
|
188
188
|
label: "AgenticTableSaveView-footer"
|
|
189
189
|
})({
|
|
190
190
|
marginTop: "1.5rem",
|
|
@@ -194,7 +194,7 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
194
194
|
"@media (min-width:640px)": {
|
|
195
195
|
gridTemplateColumns: "repeat(2,minmax(0,1fr))"
|
|
196
196
|
}
|
|
197
|
-
}),
|
|
197
|
+
}), Qt = /* @__PURE__ */ r(B, {
|
|
198
198
|
label: "AgenticTableSaveView-cancelButton"
|
|
199
199
|
})({
|
|
200
200
|
"&&": {
|
|
@@ -219,7 +219,7 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
219
219
|
backgroundColor: "hsl(var(--bfrs-color-surface-muted) / var(--tw-bg-opacity, 1))"
|
|
220
220
|
}
|
|
221
221
|
}
|
|
222
|
-
}),
|
|
222
|
+
}), Xt = /* @__PURE__ */ r(B, {
|
|
223
223
|
label: "AgenticTableSaveView-submitButton"
|
|
224
224
|
})({
|
|
225
225
|
"&&": {
|
|
@@ -241,162 +241,182 @@ const Ft = /* @__PURE__ */ e(Tt, {
|
|
|
241
241
|
"--tw-bg-opacity": "1",
|
|
242
242
|
backgroundColor: "hsl(var(--bfrs-color-primary-active) / var(--tw-bg-opacity, 1))"
|
|
243
243
|
},
|
|
244
|
-
// Disabled (empty name / loading) stays muted grey so the two states read
|
|
244
|
+
// Disabled (empty name / loading) stays muted grey so the two states read
|
|
245
|
+
// differently. Text uses text-muted, not text-disabled: paired with
|
|
246
|
+
// surface-muted, text-disabled is only ~1.1:1 contrast in light mode
|
|
247
|
+
// (91% vs 85% lightness — nearly invisible) since that token was tuned
|
|
248
|
+
// for a much darker surface elsewhere. text-muted keeps the same "muted"
|
|
249
|
+
// look at a real ~4.1:1 — but only if opacity is 1: the base Button
|
|
250
|
+
// primitive's own `&:disabled` sets opacity:.55 (this rule doesn't touch
|
|
251
|
+
// opacity, so that base rule still applies underneath), which blends
|
|
252
|
+
// both colors toward the modal's white backdrop and drags the effective
|
|
253
|
+
// contrast back down to ~2:1. Pin it to 1 to keep the fix intact.
|
|
245
254
|
"&:disabled": {
|
|
246
255
|
cursor: "not-allowed",
|
|
256
|
+
opacity: 1,
|
|
247
257
|
"--tw-bg-opacity": "1",
|
|
248
258
|
backgroundColor: "hsl(var(--bfrs-color-surface-muted) / var(--tw-bg-opacity, 1))",
|
|
249
259
|
"--tw-text-opacity": "1",
|
|
250
|
-
color: "hsl(var(--bfrs-color-text-
|
|
260
|
+
color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
|
|
251
261
|
}
|
|
252
262
|
}
|
|
253
|
-
}),
|
|
254
|
-
if (!o || !
|
|
255
|
-
const d = new Set(
|
|
263
|
+
}), Yt = (o) => !!o && typeof o.then == "function", Zt = (o, m) => {
|
|
264
|
+
if (!o || !m) return 0;
|
|
265
|
+
const d = new Set(m);
|
|
256
266
|
return o.filter((p) => !d.has(p.id)).length;
|
|
257
267
|
};
|
|
258
|
-
function
|
|
268
|
+
function se({
|
|
259
269
|
open: o,
|
|
260
|
-
defaultOpen:
|
|
270
|
+
defaultOpen: m,
|
|
261
271
|
onOpenChange: d,
|
|
262
272
|
onClose: p,
|
|
263
273
|
trigger: F,
|
|
264
|
-
triggerLabel:
|
|
265
|
-
title:
|
|
266
|
-
description:
|
|
267
|
-
viewName:
|
|
268
|
-
defaultViewName:
|
|
269
|
-
onViewNameChange:
|
|
270
|
-
viewNameLabel:
|
|
271
|
-
viewNamePlaceholder:
|
|
272
|
-
appliedLabel:
|
|
273
|
-
appliedSettings:
|
|
274
|
-
appliedSettingLabels:
|
|
275
|
-
columns:
|
|
276
|
-
visibleColumnIds:
|
|
277
|
-
hiddenColumnCount:
|
|
278
|
-
filtersCount:
|
|
279
|
-
viewType:
|
|
280
|
-
filters:
|
|
281
|
-
priority:
|
|
282
|
-
screenName:
|
|
274
|
+
triggerLabel: tt = "Save",
|
|
275
|
+
title: et = "Save this view",
|
|
276
|
+
description: L = "Give your custom view a name to save it for later",
|
|
277
|
+
viewName: w,
|
|
278
|
+
defaultViewName: x = "",
|
|
279
|
+
onViewNameChange: S,
|
|
280
|
+
viewNameLabel: rt = "View Name",
|
|
281
|
+
viewNamePlaceholder: ot = "e.g. High Priority Orders",
|
|
282
|
+
appliedLabel: T = "APPLIED FILTERS & SETTINGS",
|
|
283
|
+
appliedSettings: it,
|
|
284
|
+
appliedSettingLabels: at,
|
|
285
|
+
columns: P,
|
|
286
|
+
visibleColumnIds: j = [],
|
|
287
|
+
hiddenColumnCount: lt,
|
|
288
|
+
filtersCount: V = 0,
|
|
289
|
+
viewType: ct,
|
|
290
|
+
filters: nt,
|
|
291
|
+
priority: st = 0,
|
|
292
|
+
screenName: k,
|
|
283
293
|
saveApi: b,
|
|
284
|
-
cancelLabel:
|
|
285
|
-
saveLabel:
|
|
286
|
-
onCancel:
|
|
287
|
-
onSave:
|
|
294
|
+
cancelLabel: dt = "Cancel",
|
|
295
|
+
saveLabel: pt = "Save view",
|
|
296
|
+
onCancel: A,
|
|
297
|
+
onSave: O,
|
|
288
298
|
onSaved: n,
|
|
289
299
|
onError: s,
|
|
290
|
-
loading:
|
|
291
|
-
disabled:
|
|
292
|
-
closeOnSave:
|
|
293
|
-
closeOnOverlayClick:
|
|
294
|
-
closeOnEscape:
|
|
295
|
-
preventClose:
|
|
296
|
-
className:
|
|
297
|
-
triggerClassName:
|
|
300
|
+
loading: bt,
|
|
301
|
+
disabled: G,
|
|
302
|
+
closeOnSave: M = !0,
|
|
303
|
+
closeOnOverlayClick: ft = !0,
|
|
304
|
+
closeOnEscape: vt = !0,
|
|
305
|
+
preventClose: z = !1,
|
|
306
|
+
className: mt,
|
|
307
|
+
triggerClassName: wt
|
|
298
308
|
}) {
|
|
299
|
-
const
|
|
309
|
+
const $ = It(), [ut, ht] = y(m ?? !1), [gt, E] = y(x), [yt, K] = y(!1), [U, f] = y(null), u = o ?? ut, v = w ?? gt, h = !!(bt || yt), H = lt ?? Zt(P, j), C = X(v), _ = G || h || v.trim().length === 0 || C, D = R(
|
|
300
310
|
() => b ? { ...b, saveEndpoint: b.saveEndpoint ?? b.endpoint ?? "api/v1/saveview" } : void 0,
|
|
301
311
|
[b]
|
|
302
|
-
),
|
|
303
|
-
() =>
|
|
304
|
-
[
|
|
305
|
-
),
|
|
312
|
+
), I = R(
|
|
313
|
+
() => k ? Lt(k, D ? { saveApi: D } : void 0) : void 0,
|
|
314
|
+
[D, k]
|
|
315
|
+
), xt = R(() => {
|
|
306
316
|
const t = [];
|
|
307
|
-
return
|
|
308
|
-
}, [
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
}, [
|
|
312
|
-
const
|
|
313
|
-
!t &&
|
|
314
|
-
},
|
|
315
|
-
|
|
316
|
-
},
|
|
317
|
-
|
|
317
|
+
return H > 0 && t.push(`Columns hidden (${H})`), V > 0 && t.push(`Filters applied (${V})`), t;
|
|
318
|
+
}, [H, V]), q = at ?? xt;
|
|
319
|
+
Wt(() => {
|
|
320
|
+
u && w === void 0 && E(x), u && f(null);
|
|
321
|
+
}, [u, x, w]);
|
|
322
|
+
const g = (t) => {
|
|
323
|
+
!t && z || (o === void 0 && ht(t), d == null || d(t), t || p == null || p());
|
|
324
|
+
}, St = (t) => {
|
|
325
|
+
w === void 0 && E(t), S == null || S(t), f(null);
|
|
326
|
+
}, Tt = () => {
|
|
327
|
+
A == null || A(), g(!1);
|
|
318
328
|
};
|
|
319
|
-
return /* @__PURE__ */
|
|
320
|
-
F !== null && /* @__PURE__ */
|
|
321
|
-
/* @__PURE__ */
|
|
322
|
-
/* @__PURE__ */
|
|
323
|
-
/* @__PURE__ */
|
|
324
|
-
|
|
329
|
+
return /* @__PURE__ */ c(Vt, { open: u, onOpenChange: g, children: [
|
|
330
|
+
F !== null && /* @__PURE__ */ e(kt, { asChild: !0, children: F ?? /* @__PURE__ */ e(B, { size: "sm", className: wt, children: tt }) }),
|
|
331
|
+
/* @__PURE__ */ e(At, { children: /* @__PURE__ */ c(Pt, { children: [
|
|
332
|
+
/* @__PURE__ */ e(jt, {}),
|
|
333
|
+
/* @__PURE__ */ e(
|
|
334
|
+
Ot,
|
|
325
335
|
{
|
|
326
|
-
className:
|
|
336
|
+
className: mt,
|
|
327
337
|
onPointerDownOutside: (t) => {
|
|
328
|
-
(!
|
|
338
|
+
(!ft || z) && t.preventDefault();
|
|
329
339
|
},
|
|
330
340
|
onEscapeKeyDown: (t) => {
|
|
331
|
-
(!
|
|
341
|
+
(!vt || z) && t.preventDefault();
|
|
332
342
|
},
|
|
333
|
-
children: /* @__PURE__ */
|
|
343
|
+
children: /* @__PURE__ */ c(Gt, { onSubmit: (t) => {
|
|
334
344
|
t.preventDefault();
|
|
335
|
-
const
|
|
336
|
-
if (!
|
|
337
|
-
const
|
|
338
|
-
view_type:
|
|
339
|
-
name:
|
|
340
|
-
columns: (
|
|
341
|
-
key:
|
|
342
|
-
order:
|
|
343
|
-
visible:
|
|
345
|
+
const W = v.trim();
|
|
346
|
+
if (!W || _ || X(W)) return;
|
|
347
|
+
const J = {
|
|
348
|
+
view_type: ct ?? "orders",
|
|
349
|
+
name: W,
|
|
350
|
+
columns: (P ?? []).map((i, a) => ({
|
|
351
|
+
key: i.id,
|
|
352
|
+
order: a,
|
|
353
|
+
visible: j.includes(i.id)
|
|
344
354
|
})),
|
|
345
|
-
filters:
|
|
346
|
-
priority:
|
|
355
|
+
filters: nt ?? [],
|
|
356
|
+
priority: st
|
|
347
357
|
};
|
|
358
|
+
f(null);
|
|
359
|
+
const N = (i) => !!(i.alreadyExists && i.message);
|
|
348
360
|
let l;
|
|
349
361
|
try {
|
|
350
|
-
l =
|
|
351
|
-
} catch (
|
|
352
|
-
s == null || s(
|
|
362
|
+
l = O ? O(J) : I == null ? void 0 : I.save(J);
|
|
363
|
+
} catch (i) {
|
|
364
|
+
s == null || s(i);
|
|
353
365
|
return;
|
|
354
366
|
}
|
|
355
|
-
if (
|
|
367
|
+
if (Yt(l)) {
|
|
356
368
|
K(!0);
|
|
357
|
-
let
|
|
358
|
-
l.then((
|
|
359
|
-
|
|
360
|
-
}).catch((
|
|
361
|
-
s == null || s(
|
|
369
|
+
let i = !1;
|
|
370
|
+
l.then((a) => {
|
|
371
|
+
i = !0, a && typeof a == "object" && "view" in a && (N(a) ? (i = !1, f(a.message ?? null)) : n == null || n(a));
|
|
372
|
+
}).catch((a) => {
|
|
373
|
+
s == null || s(a);
|
|
362
374
|
}).finally(() => {
|
|
363
|
-
K(!1),
|
|
375
|
+
K(!1), M && i && g(!1);
|
|
364
376
|
});
|
|
365
377
|
return;
|
|
366
378
|
}
|
|
367
|
-
typeof l == "object" && l !== null && "view" in l
|
|
379
|
+
if (typeof l == "object" && l !== null && "view" in l) {
|
|
380
|
+
if (N(l)) {
|
|
381
|
+
f(l.message ?? null);
|
|
382
|
+
return;
|
|
383
|
+
}
|
|
384
|
+
n == null || n(l);
|
|
385
|
+
}
|
|
386
|
+
M && g(!1);
|
|
368
387
|
}, children: [
|
|
369
|
-
/* @__PURE__ */
|
|
370
|
-
/* @__PURE__ */
|
|
371
|
-
|
|
388
|
+
/* @__PURE__ */ c("header", { children: [
|
|
389
|
+
/* @__PURE__ */ e(Mt, { children: et }),
|
|
390
|
+
L && /* @__PURE__ */ e($t, { children: L })
|
|
372
391
|
] }),
|
|
373
|
-
/* @__PURE__ */
|
|
374
|
-
/* @__PURE__ */
|
|
375
|
-
/* @__PURE__ */
|
|
376
|
-
|
|
392
|
+
/* @__PURE__ */ c(Et, { children: [
|
|
393
|
+
/* @__PURE__ */ e(Kt, { htmlFor: $, children: rt }),
|
|
394
|
+
/* @__PURE__ */ e(
|
|
395
|
+
Ut,
|
|
377
396
|
{
|
|
378
|
-
id:
|
|
397
|
+
id: $,
|
|
379
398
|
autoFocus: !0,
|
|
380
|
-
value:
|
|
381
|
-
placeholder:
|
|
382
|
-
disabled:
|
|
383
|
-
onChange: (t) =>
|
|
384
|
-
"aria-invalid":
|
|
399
|
+
value: v,
|
|
400
|
+
placeholder: ot,
|
|
401
|
+
disabled: G || h,
|
|
402
|
+
onChange: (t) => St(t.target.value),
|
|
403
|
+
"aria-invalid": C
|
|
385
404
|
}
|
|
386
405
|
),
|
|
387
|
-
|
|
406
|
+
C ? /* @__PURE__ */ c(Y, { children: [
|
|
388
407
|
"“",
|
|
389
|
-
|
|
408
|
+
v.trim(),
|
|
390
409
|
"” is reserved. Choose a different name."
|
|
391
|
-
] }) : null
|
|
410
|
+
] }) : null,
|
|
411
|
+
U ? /* @__PURE__ */ e(Y, { children: U }) : null
|
|
392
412
|
] }),
|
|
393
|
-
/* @__PURE__ */
|
|
394
|
-
/* @__PURE__ */
|
|
395
|
-
/* @__PURE__ */
|
|
413
|
+
/* @__PURE__ */ c(_t, { "aria-label": typeof T == "string" ? T : "Applied filters and settings", children: [
|
|
414
|
+
/* @__PURE__ */ e(qt, { children: T }),
|
|
415
|
+
/* @__PURE__ */ e(Jt, { children: it ?? (q.length > 0 ? q.map((t) => /* @__PURE__ */ e(Z, { ownerState: {}, children: t }, t)) : /* @__PURE__ */ e(Z, { ownerState: { muted: !0 }, children: "No changes applied" })) })
|
|
396
416
|
] }),
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
/* @__PURE__ */
|
|
399
|
-
/* @__PURE__ */
|
|
417
|
+
/* @__PURE__ */ c(Nt, { children: [
|
|
418
|
+
/* @__PURE__ */ e(Qt, { type: "button", variant: "secondary", disabled: h, onClick: Tt, children: dt }),
|
|
419
|
+
/* @__PURE__ */ e(Xt, { type: "submit", loading: h, disabled: _, children: pt })
|
|
400
420
|
] })
|
|
401
421
|
] })
|
|
402
422
|
}
|
|
@@ -405,6 +425,6 @@ function le({
|
|
|
405
425
|
] });
|
|
406
426
|
}
|
|
407
427
|
export {
|
|
408
|
-
|
|
428
|
+
se as TableSaveView
|
|
409
429
|
};
|
|
410
430
|
//# sourceMappingURL=TableSaveView.js.map
|