@bfrs/agentic-components 0.8.1 → 0.8.3

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.
@@ -1,50 +1,47 @@
1
- import { jsxs as s, jsx as r, Fragment as _e } from "react/jsx-runtime";
2
- import { Root as Re, Portal as Ce, Overlay as Tt, Content as _t, Title as Rt, Description as Ct } from "../../../node_modules/@radix-ui/react-dialog/dist/index.js";
3
- import { Root as kt, Trigger as At, Portal as zt, Content as Vt } from "../../../node_modules/@radix-ui/react-popover/dist/index.js";
4
- import { BookmarkSimple as ke } from "../../../node_modules/@phosphor-icons/react/dist/csr/BookmarkSimple.es.js";
5
- import { CaretDown as It } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretDown.es.js";
6
- import { DotsThreeVertical as Wt } from "../../../node_modules/@phosphor-icons/react/dist/csr/DotsThreeVertical.es.js";
7
- import { Info as Ht } from "../../../node_modules/@phosphor-icons/react/dist/csr/Info.es.js";
8
- import { PencilSimple as Ot } from "../../../node_modules/@phosphor-icons/react/dist/csr/PencilSimple.es.js";
9
- import { Star as se } from "../../../node_modules/@phosphor-icons/react/dist/csr/Star.es.js";
10
- import { Trash as Bt } from "../../../node_modules/@phosphor-icons/react/dist/csr/Trash.es.js";
11
- import { useRef as k, useMemo as ae, useState as m, useId as Ft, useEffect as j, useCallback as N } from "react";
12
- import n from "@emotion/styled";
13
- import { IconButton as Lt, Button as M } from "../../primitives/Button/Button.js";
14
- import { twRing as K, twTransform as Fe, kfContentIn as Dt, kfOverlayIn as Pt, kfModalContentIn as Et } from "../../../lib/emotionTw.js";
15
- import { floatingCollisionPadding as jt } from "../../ui/overlays/overlayPositioning.js";
16
- import { createTableViewSelectorStore as Nt, isReservedViewName as Ae } from "./viewStore.js";
17
- import { BfrsPortalScope as le } from "../../ui/providers/BfrsProvider/BfrsProvider.js";
18
- import { Tooltip as Mt } from "../../ui/overlays/Tooltip/Tooltip.js";
19
- import { ActionMenu as $t } from "../../navigation/ActionMenu/ActionMenu.js";
20
- const A = {
1
+ import { jsxs as c, jsx as t, Fragment as Ie } from "react/jsx-runtime";
2
+ import { Root as De, Portal as Ve, Overlay as It, Content as Dt, Title as Vt, Description as Wt } from "../../../node_modules/@radix-ui/react-dialog/dist/index.js";
3
+ import { Root as Bt, Trigger as Ot, Portal as Ht, Content as Lt } from "../../../node_modules/@radix-ui/react-popover/dist/index.js";
4
+ import { BookmarkSimple as Et } from "../../../node_modules/@phosphor-icons/react/dist/csr/BookmarkSimple.es.js";
5
+ import { CaretDown as Pt } from "../../../node_modules/@phosphor-icons/react/dist/csr/CaretDown.es.js";
6
+ import { DotsThreeVertical as We } from "../../../node_modules/@phosphor-icons/react/dist/csr/DotsThreeVertical.es.js";
7
+ import { Info as Ft } from "../../../node_modules/@phosphor-icons/react/dist/csr/Info.es.js";
8
+ import { PencilSimple as jt } from "../../../node_modules/@phosphor-icons/react/dist/csr/PencilSimple.es.js";
9
+ import { Star as M } from "../../../node_modules/@phosphor-icons/react/dist/csr/Star.es.js";
10
+ import { Trash as Nt } from "../../../node_modules/@phosphor-icons/react/dist/csr/Trash.es.js";
11
+ import { useRef as A, useMemo as le, useState as p, useId as $t, useEffect as $, useCallback as K } from "react";
12
+ import i from "@emotion/styled";
13
+ import { IconButton as Be, Button as q } from "../../primitives/Button/Button.js";
14
+ import { twRing as ue, twTransform as Me, kfContentIn as Kt, kfOverlayIn as Mt, kfModalContentIn as qt } from "../../../lib/emotionTw.js";
15
+ import { floatingCollisionPadding as Yt } from "../../ui/overlays/overlayPositioning.js";
16
+ import { createTableViewSelectorStore as Gt, isReservedViewName as Oe } from "./viewStore.js";
17
+ import { BfrsPortalScope as ce } from "../../ui/providers/BfrsProvider/BfrsProvider.js";
18
+ import { Tooltip as Jt } from "../../ui/overlays/Tooltip/Tooltip.js";
19
+ import { ActionMenu as He } from "../../navigation/ActionMenu/ActionMenu.js";
20
+ const D = {
21
21
  "--tw-text-opacity": "1",
22
22
  color: "hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))"
23
- }, Kt = {
24
- "--tw-text-opacity": "1",
25
- color: "hsl(var(--bfrs-color-text-secondary) / var(--tw-text-opacity, 1))"
26
- }, z = {
23
+ }, V = {
27
24
  "--tw-text-opacity": "1",
28
25
  color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
29
- }, ce = {
26
+ }, me = {
30
27
  "--tw-bg-opacity": "1",
31
28
  backgroundColor: "hsl(var(--bfrs-color-surface-card) / var(--tw-bg-opacity, 1))"
32
- }, $ = {
29
+ }, de = {
33
30
  "--tw-bg-opacity": "1",
34
31
  backgroundColor: "hsl(var(--bfrs-color-primary-soft) / var(--tw-bg-opacity, 1))"
35
- }, qt = {
32
+ }, Qt = {
36
33
  backgroundColor: "var(--bfrs-sidenav-row-active-hover-bg, var(--bfrs-dcl-color-accent-light))"
37
- }, Ut = {
34
+ }, Xt = {
38
35
  backgroundColor: "#F6F9F6"
39
- }, de = {
36
+ }, fe = {
40
37
  "--tw-border-opacity": "1",
41
38
  borderColor: "hsl(var(--bfrs-color-border) / var(--tw-border-opacity, 1))"
42
- }, Yt = /* @__PURE__ */ n("div", {
39
+ }, Zt = /* @__PURE__ */ i("div", {
43
40
  label: "AgenticTableViewSelector-root"
44
41
  })({
45
42
  display: "inline-flex",
46
43
  minWidth: "0px"
47
- }), Gt = /* @__PURE__ */ n("button", {
44
+ }), Ut = /* @__PURE__ */ i("button", {
48
45
  label: "AgenticTableViewSelector-trigger",
49
46
  shouldForwardProp: (o) => o !== "ownerState"
50
47
  })(({ ownerState: o }) => [
@@ -57,20 +54,20 @@ const A = {
57
54
  gap: ".5rem",
58
55
  borderRadius: "7px",
59
56
  borderWidth: "1px",
60
- ...Ut,
57
+ ...Xt,
61
58
  paddingLeft: ".75rem",
62
59
  paddingRight: ".75rem",
63
60
  fontSize: "12px",
64
61
  lineHeight: "normal",
65
62
  fontWeight: 400,
66
- ...A,
63
+ ...D,
67
64
  outline: "2px solid transparent",
68
65
  outlineOffset: "2px",
69
66
  transitionProperty: "color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter",
70
67
  transitionTimingFunction: "cubic-bezier(0,0,.2,1)",
71
68
  transitionDuration: ".15s",
72
- "&:hover": $,
73
- "&:focus-visible": K("2px", "hsl(var(--bfrs-color-border-focus) / .25)"),
69
+ "&:hover": de,
70
+ "&:focus-visible": ue("2px", "hsl(var(--bfrs-color-border-focus) / .25)"),
74
71
  "&:disabled": {
75
72
  pointerEvents: "none",
76
73
  opacity: ".55"
@@ -87,9 +84,11 @@ const A = {
87
84
  o.open || o.filled || o.defaultSelected ? {
88
85
  "--tw-border-opacity": "1",
89
86
  borderColor: "hsl(var(--bfrs-color-border-focus) / var(--tw-border-opacity, 1))"
90
- } : de,
91
- o.empty && z
92
- ]), Jt = /* @__PURE__ */ n("span", {
87
+ } : fe,
88
+ // Default is a selected, built-in view. It must use the same primary text
89
+ // colour as a selected saved view; only a genuinely empty trigger is muted.
90
+ o.empty && !o.defaultSelected && V
91
+ ]), er = /* @__PURE__ */ i("span", {
93
92
  label: "AgenticTableViewSelector-triggerLabel"
94
93
  })({
95
94
  minWidth: "0px",
@@ -97,25 +96,25 @@ const A = {
97
96
  overflow: "hidden",
98
97
  textOverflow: "ellipsis",
99
98
  whiteSpace: "nowrap"
100
- }), ze = /* @__PURE__ */ n(se, {
99
+ }), se = /* @__PURE__ */ i(M, {
101
100
  label: "AgenticTableViewSelector-primaryStar"
102
101
  })({
103
102
  flexShrink: 0,
104
103
  "--tw-text-opacity": "1",
105
104
  color: "hsl(var(--bfrs-color-warning) / var(--tw-text-opacity, 1))"
106
- }), Qt = /* @__PURE__ */ n(It, {
105
+ }), tr = /* @__PURE__ */ i(Pt, {
107
106
  label: "AgenticTableViewSelector-caret",
108
107
  shouldForwardProp: (o) => o !== "ownerState"
109
108
  })(({ ownerState: o }) => [
110
109
  {
111
110
  flexShrink: 0,
112
- ...z,
111
+ ...V,
113
112
  transitionProperty: "transform",
114
113
  transitionTimingFunction: "cubic-bezier(.4,0,.2,1)",
115
114
  transitionDuration: ".15s"
116
115
  },
117
- o.open && Fe({ "--tw-rotate": "180deg" })
118
- ]), Xt = /* @__PURE__ */ n(Vt, {
116
+ o.open && Me({ "--tw-rotate": "180deg" })
117
+ ]), rr = /* @__PURE__ */ i(Lt, {
119
118
  label: "AgenticTableViewSelector-content"
120
119
  })({
121
120
  zIndex: 1e3,
@@ -123,16 +122,16 @@ const A = {
123
122
  overflow: "hidden",
124
123
  borderRadius: "var(--bfrs-radius-lg)",
125
124
  borderWidth: "1px",
126
- ...de,
127
- ...ce,
125
+ ...fe,
126
+ ...me,
128
127
  "--tw-shadow": "var(--bfrs-shadow-elevated)",
129
128
  "--tw-shadow-colored": "var(--bfrs-shadow-elevated)",
130
129
  boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)",
131
130
  outline: "2px solid transparent",
132
131
  outlineOffset: "2px",
133
- ...Dt,
132
+ ...Kt,
134
133
  animation: "bfrs-bfrs-content-in var(--bfrs-motion-normal) var(--bfrs-ease-out)"
135
- }), Zt = /* @__PURE__ */ n("div", {
134
+ }), or = /* @__PURE__ */ i("div", {
136
135
  label: "AgenticTableViewSelector-header"
137
136
  })({
138
137
  display: "flex",
@@ -147,8 +146,8 @@ const A = {
147
146
  fontWeight: 700,
148
147
  letterSpacing: ".08em",
149
148
  textTransform: "uppercase",
150
- ...z
151
- }), er = /* @__PURE__ */ n("span", {
149
+ ...V
150
+ }), ir = /* @__PURE__ */ i("span", {
152
151
  label: "AgenticTableViewSelector-headerInfo"
153
152
  })({
154
153
  display: "inline-flex",
@@ -162,12 +161,12 @@ const A = {
162
161
  // either or it renders offset from the cap height.
163
162
  letterSpacing: "normal",
164
163
  cursor: "default",
165
- ...z,
164
+ ...V,
166
165
  "&:hover": {
167
166
  "--tw-text-opacity": "1",
168
167
  color: "hsl(var(--bfrs-color-text-primary) / var(--tw-text-opacity, 1))"
169
168
  }
170
- }), tr = /* @__PURE__ */ n("div", {
169
+ }), nr = /* @__PURE__ */ i("div", {
171
170
  label: "AgenticTableViewSelector-list"
172
171
  })({
173
172
  display: "flex",
@@ -175,7 +174,7 @@ const A = {
175
174
  flexDirection: "column",
176
175
  overflowY: "auto",
177
176
  paddingBottom: ".25rem"
178
- }), rr = /* @__PURE__ */ n("div", {
177
+ }), qe = /* @__PURE__ */ i("div", {
179
178
  label: "AgenticTableViewSelector-row"
180
179
  })({
181
180
  display: "flex",
@@ -184,7 +183,27 @@ const A = {
184
183
  gap: ".375rem",
185
184
  paddingLeft: ".5rem",
186
185
  paddingRight: ".625rem"
187
- }), or = /* @__PURE__ */ n("button", {
186
+ }), ar = /* @__PURE__ */ i(qe, {
187
+ label: "AgenticTableViewSelector-defaultRow"
188
+ })({
189
+ marginLeft: ".5rem",
190
+ marginRight: ".5rem",
191
+ marginBottom: ".25rem",
192
+ borderRadius: "var(--bfrs-radius-sm)",
193
+ backgroundColor: "hsl(var(--bfrs-color-primary-soft) / .55)",
194
+ paddingLeft: ".125rem",
195
+ paddingRight: ".125rem"
196
+ }), lr = /* @__PURE__ */ i("div", {
197
+ label: "AgenticTableViewSelector-defaultDivider"
198
+ })({
199
+ height: "1px",
200
+ flexShrink: 0,
201
+ marginLeft: ".75rem",
202
+ marginRight: ".75rem",
203
+ marginBottom: ".25rem",
204
+ "--tw-bg-opacity": "1",
205
+ backgroundColor: "hsl(var(--bfrs-color-border-strong) / var(--tw-bg-opacity, 1))"
206
+ }), Le = /* @__PURE__ */ i("button", {
188
207
  label: "AgenticTableViewSelector-viewButton",
189
208
  shouldForwardProp: (o) => o !== "ownerState"
190
209
  })(({ ownerState: o }) => [
@@ -204,18 +223,18 @@ const A = {
204
223
  fontSize: "12px",
205
224
  lineHeight: "1rem",
206
225
  fontWeight: 500,
207
- ...A,
226
+ ...D,
208
227
  outline: "2px solid transparent",
209
228
  outlineOffset: "2px",
210
- "&:hover": $,
211
- "&:focus-visible": K("2px", "hsl(var(--bfrs-color-border-focus) / .25)")
229
+ "&:hover": de,
230
+ "&:focus-visible": ue("2px", "hsl(var(--bfrs-color-border-focus) / .25)")
212
231
  },
213
232
  o.selected && {
214
- ...$,
233
+ ...de,
215
234
  fontWeight: 700,
216
- "&:hover": qt
235
+ "&:hover": Qt
217
236
  }
218
- ]), nr = /* @__PURE__ */ n("span", {
237
+ ]), Ee = /* @__PURE__ */ i("span", {
219
238
  label: "AgenticTableViewSelector-name"
220
239
  })({
221
240
  minWidth: "0px",
@@ -223,31 +242,7 @@ const A = {
223
242
  overflow: "hidden",
224
243
  textOverflow: "ellipsis",
225
244
  whiteSpace: "nowrap"
226
- }), ir = /* @__PURE__ */ n("div", {
227
- label: "AgenticTableViewSelector-divider"
228
- })({
229
- height: "1px",
230
- "--tw-bg-opacity": "1",
231
- backgroundColor: "hsl(var(--bfrs-color-border-light) / var(--tw-bg-opacity, 1))"
232
- }), ar = /* @__PURE__ */ n("button", {
233
- label: "AgenticTableViewSelector-resetButton"
234
- })({
235
- display: "flex",
236
- width: "100%",
237
- minHeight: "2.25rem",
238
- alignItems: "center",
239
- gap: ".5rem",
240
- paddingLeft: ".75rem",
241
- paddingRight: "1rem",
242
- fontSize: ".75rem",
243
- lineHeight: "1rem",
244
- fontWeight: 500,
245
- ...Kt,
246
- outline: "2px solid transparent",
247
- outlineOffset: "2px",
248
- "&:hover": $,
249
- "&:focus-visible": K("2px", "hsl(var(--bfrs-color-border-focus) / .25)")
250
- }), Ve = /* @__PURE__ */ n("div", {
245
+ }), Pe = /* @__PURE__ */ i("div", {
251
246
  label: "AgenticTableViewSelector-empty"
252
247
  })({
253
248
  paddingLeft: ".75rem",
@@ -256,17 +251,17 @@ const A = {
256
251
  paddingBottom: ".75rem",
257
252
  fontSize: ".75rem",
258
253
  lineHeight: "1rem",
259
- ...z
260
- }), Ie = /* @__PURE__ */ n(Tt, {
254
+ ...V
255
+ }), Fe = /* @__PURE__ */ i(It, {
261
256
  label: "AgenticTableViewSelector-renameOverlay"
262
257
  })({
263
258
  position: "fixed",
264
259
  inset: 0,
265
260
  zIndex: 1050,
266
261
  backgroundColor: "hsl(var(--bfrs-color-text-primary) / .45)",
267
- ...Pt,
262
+ ...Mt,
268
263
  animation: "bfrs-bfrs-overlay-in var(--bfrs-motion-fast) var(--bfrs-ease-out)"
269
- }), We = /* @__PURE__ */ n(_t, {
264
+ }), je = /* @__PURE__ */ i(Dt, {
270
265
  label: "AgenticTableViewSelector-renameContent"
271
266
  })({
272
267
  position: "fixed",
@@ -279,33 +274,33 @@ const A = {
279
274
  overflow: "auto",
280
275
  borderRadius: "var(--bfrs-radius-lg)",
281
276
  borderWidth: "1px",
282
- ...de,
283
- ...ce,
277
+ ...fe,
278
+ ...me,
284
279
  padding: "1.25rem",
285
- ...A,
280
+ ...D,
286
281
  "--tw-shadow": "var(--bfrs-shadow-overlay)",
287
282
  "--tw-shadow-colored": "var(--bfrs-shadow-overlay)",
288
283
  boxShadow: "var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)",
289
284
  outline: "2px solid transparent",
290
285
  outlineOffset: "2px",
291
- ...Fe({ "--tw-translate-x": "-50%", "--tw-translate-y": "-50%" }),
292
- ...Et,
286
+ ...Me({ "--tw-translate-x": "-50%", "--tw-translate-y": "-50%" }),
287
+ ...qt,
293
288
  animation: "bfrs-bfrs-modal-content-in var(--bfrs-motion-normal) var(--bfrs-ease-out)"
294
- }), He = /* @__PURE__ */ n(Rt, {
289
+ }), Ne = /* @__PURE__ */ i(Vt, {
295
290
  label: "AgenticTableViewSelector-renameTitle"
296
291
  })({
297
292
  fontSize: "1.125rem",
298
293
  lineHeight: "1.5rem",
299
294
  fontWeight: 700,
300
- ...A
301
- }), Oe = /* @__PURE__ */ n(Ct, {
295
+ ...D
296
+ }), $e = /* @__PURE__ */ i(Wt, {
302
297
  label: "AgenticTableViewSelector-renameDescription"
303
298
  })({
304
299
  marginTop: ".25rem",
305
300
  fontSize: ".75rem",
306
301
  lineHeight: "1.25rem",
307
- ...z
308
- }), lr = /* @__PURE__ */ n("label", {
302
+ ...V
303
+ }), cr = /* @__PURE__ */ i("label", {
309
304
  label: "AgenticTableViewSelector-renameLabel"
310
305
  })({
311
306
  display: "block",
@@ -313,8 +308,8 @@ const A = {
313
308
  fontSize: ".75rem",
314
309
  lineHeight: "1rem",
315
310
  fontWeight: 700,
316
- ...A
317
- }), sr = /* @__PURE__ */ n("input", {
311
+ ...D
312
+ }), sr = /* @__PURE__ */ i("input", {
318
313
  label: "AgenticTableViewSelector-renameInput"
319
314
  })({
320
315
  marginTop: ".5rem",
@@ -324,24 +319,24 @@ const A = {
324
319
  borderWidth: "1.5px",
325
320
  "--tw-border-opacity": "1",
326
321
  borderColor: "hsl(var(--bfrs-color-border-focus) / var(--tw-border-opacity, 1))",
327
- ...ce,
322
+ ...me,
328
323
  paddingLeft: ".75rem",
329
324
  paddingRight: ".75rem",
330
325
  fontSize: ".875rem",
331
326
  lineHeight: "1.25rem",
332
327
  fontWeight: 500,
333
- ...A,
328
+ ...D,
334
329
  outline: "2px solid transparent",
335
330
  outlineOffset: "2px",
336
- "&:focus-visible": K("2px", "hsl(var(--bfrs-color-border-focus) / .25)")
337
- }), Be = /* @__PURE__ */ n("div", {
331
+ "&:focus-visible": ue("2px", "hsl(var(--bfrs-color-border-focus) / .25)")
332
+ }), Ke = /* @__PURE__ */ i("div", {
338
333
  label: "AgenticTableViewSelector-renameFooter"
339
334
  })({
340
335
  marginTop: "1.5rem",
341
336
  display: "flex",
342
337
  justifyContent: "flex-end",
343
338
  gap: ".625rem"
344
- }), cr = /* @__PURE__ */ n(M, {
339
+ }), dr = /* @__PURE__ */ i(q, {
345
340
  label: "AgenticTableViewSelector-renameSubmitButton"
346
341
  })({
347
342
  "&&:disabled": {
@@ -352,7 +347,7 @@ const A = {
352
347
  "--tw-text-opacity": "1",
353
348
  color: "hsl(var(--bfrs-color-text-muted) / var(--tw-text-opacity, 1))"
354
349
  }
355
- }), dr = /* @__PURE__ */ n("p", {
350
+ }), ur = /* @__PURE__ */ i("p", {
356
351
  label: "AgenticTableViewSelector-renameFieldError"
357
352
  })({
358
353
  marginTop: ".375rem",
@@ -361,364 +356,401 @@ const A = {
361
356
  "--tw-text-opacity": "1",
362
357
  color: "hsl(var(--bfrs-color-danger) / var(--tw-text-opacity, 1))"
363
358
  });
364
- function O(o, i) {
365
- return i ? o.find((t) => t.view_id === i) ?? null : null;
359
+ function I(o, n) {
360
+ return n ? o.find((r) => r.view_id === n) ?? null : null;
366
361
  }
367
- function ur(o, i, t) {
368
- var p;
369
- const w = [], y = /* @__PURE__ */ new Set(), x = i ?? ((p = o.find((c) => c.is_default)) == null ? void 0 : p.view_id) ?? null, f = (c) => {
370
- if (!c || y.has(c)) return;
371
- const b = O(o, c);
372
- b && (w.push(b), y.add(b.view_id));
362
+ function mr(o, n, r) {
363
+ var h;
364
+ const S = [], x = /* @__PURE__ */ new Set(), T = n ?? ((h = o.find((s) => s.is_default)) == null ? void 0 : h.view_id) ?? null, b = (s) => {
365
+ if (!s || x.has(s)) return;
366
+ const u = I(o, s);
367
+ u && (S.push(u), x.add(u.view_id));
373
368
  };
374
- f(x), f(t);
375
- for (const c of o)
376
- y.has(c.view_id) || (w.push(c), y.add(c.view_id));
377
- return w;
369
+ b(T), b(r);
370
+ for (const s of o)
371
+ x.has(s.view_id) || (S.push(s), x.add(s.view_id));
372
+ return S;
378
373
  }
379
- function mr(o) {
374
+ function fr(o) {
380
375
  return o ? [
381
376
  "api",
382
377
  o.viewType && o.tab ? "scoped" : "local",
383
378
  o.saveEndpoint || o.endpoint ? "remote-save" : "local-save"
384
379
  ].join(":") : "none";
385
380
  }
386
- function fr(o) {
387
- const i = () => o.current;
381
+ function pr(o) {
382
+ const n = () => o.current;
388
383
  return {
389
384
  get baseUrl() {
390
- var t;
391
- return (t = i()) == null ? void 0 : t.baseUrl;
385
+ var r;
386
+ return (r = n()) == null ? void 0 : r.baseUrl;
392
387
  },
393
388
  get endpoint() {
394
- var t;
395
- return (t = i()) == null ? void 0 : t.endpoint;
389
+ var r;
390
+ return (r = n()) == null ? void 0 : r.endpoint;
396
391
  },
397
392
  get saveEndpoint() {
398
- var t;
399
- return (t = i()) == null ? void 0 : t.saveEndpoint;
393
+ var r;
394
+ return (r = n()) == null ? void 0 : r.saveEndpoint;
400
395
  },
401
396
  get listEndpoint() {
402
- var t;
403
- return (t = i()) == null ? void 0 : t.listEndpoint;
397
+ var r;
398
+ return (r = n()) == null ? void 0 : r.listEndpoint;
404
399
  },
405
400
  get updateEndpoint() {
406
- var t;
407
- return (t = i()) == null ? void 0 : t.updateEndpoint;
401
+ var r;
402
+ return (r = n()) == null ? void 0 : r.updateEndpoint;
408
403
  },
409
404
  get deleteEndpoint() {
410
- var t;
411
- return (t = i()) == null ? void 0 : t.deleteEndpoint;
405
+ var r;
406
+ return (r = n()) == null ? void 0 : r.deleteEndpoint;
412
407
  },
413
408
  get viewType() {
414
- var t;
415
- return (t = i()) == null ? void 0 : t.viewType;
409
+ var r;
410
+ return (r = n()) == null ? void 0 : r.viewType;
416
411
  },
417
412
  get tab() {
418
- var t;
419
- return (t = i()) == null ? void 0 : t.tab;
413
+ var r;
414
+ return (r = n()) == null ? void 0 : r.tab;
420
415
  },
421
416
  get token() {
422
- var t;
423
- return (t = i()) == null ? void 0 : t.token;
417
+ var r;
418
+ return (r = n()) == null ? void 0 : r.token;
424
419
  },
425
420
  get headers() {
426
- var t;
427
- return (t = i()) == null ? void 0 : t.headers;
421
+ var r;
422
+ return (r = n()) == null ? void 0 : r.headers;
428
423
  },
429
424
  get credentials() {
430
- var t;
431
- return (t = i()) == null ? void 0 : t.credentials;
425
+ var r;
426
+ return (r = n()) == null ? void 0 : r.credentials;
432
427
  },
433
428
  get fetcher() {
434
- var t;
435
- return (t = i()) == null ? void 0 : t.fetcher;
429
+ var r;
430
+ return (r = n()) == null ? void 0 : r.fetcher;
436
431
  }
437
432
  };
438
433
  }
439
- function Hr({
434
+ function Br({
440
435
  screenName: o,
441
- store: i,
442
- saveApi: t,
443
- value: w,
444
- defaultValue: y,
445
- selectPrimaryByDefault: x = !0,
446
- onValueChange: f,
447
- onViewSelect: p,
448
- onPrimaryViewChange: c,
449
- onUnsetPrimaryView: b,
450
- onRenameView: q,
451
- onDeleteView: U,
452
- onResetSavedFilters: Y,
453
- onError: B,
454
- triggerLabel: Le,
455
- placeholder: De = "Views",
456
- viewsLabel: Pe = "VIEWS",
457
- primaryHintLabel: ue = "Set a view as primary to load it automatically. With no primary view, the table opens in its default state.",
458
- emptyLabel: Ee = "No saved views",
459
- loadingLabel: je = "Loading views",
460
- defaultViewLabel: Ne = "Default",
461
- setPrimaryLabel: Me = "Set as Primary View",
462
- unsetPrimaryLabel: $e = "Unset as Primary",
463
- renameLabel: Ke = "Rename",
464
- deleteLabel: qe = "Delete",
465
- renameTitle: Ue = "Rename view",
466
- renameDescription: me = "Update the saved view name.",
467
- renameInputLabel: Ye = "View name",
468
- renameCancelLabel: Ge = "Cancel",
469
- renameSaveLabel: Je = "Save",
470
- deleteTitle: Qe = "Delete view",
471
- deleteDescription: Xe,
472
- deleteCancelLabel: Ze = "Cancel",
473
- deleteConfirmLabel: et = "Delete",
474
- size: tt = "sm",
475
- disabled: rt = !1,
476
- className: ot,
477
- triggerClassName: nt,
478
- contentClassName: it,
479
- actionMenuClassName: at
436
+ store: n,
437
+ saveApi: r,
438
+ value: S,
439
+ defaultValue: x,
440
+ selectPrimaryByDefault: T = !0,
441
+ onValueChange: b,
442
+ onViewSelect: h,
443
+ onPrimaryViewChange: s,
444
+ onUnsetPrimaryView: u,
445
+ onRenameView: Y,
446
+ onDeleteView: G,
447
+ onResetSavedFilters: _,
448
+ onError: L,
449
+ triggerLabel: Ye,
450
+ placeholder: Ge = "Views",
451
+ viewsLabel: Je = "VIEWS",
452
+ primaryHintLabel: pe = "Set a view as primary to load it automatically. With no primary view, the table opens in its default state.",
453
+ emptyLabel: Qe = "No saved views",
454
+ loadingLabel: Xe = "Loading views",
455
+ defaultViewLabel: be = "Default",
456
+ setPrimaryLabel: he = "Set as Primary View",
457
+ unsetPrimaryLabel: Ze = "Unset as Primary",
458
+ renameLabel: Ue = "Rename",
459
+ deleteLabel: et = "Delete",
460
+ renameTitle: tt = "Rename view",
461
+ renameDescription: ge = "Update the saved view name.",
462
+ renameInputLabel: rt = "View name",
463
+ renameCancelLabel: ot = "Cancel",
464
+ renameSaveLabel: it = "Save",
465
+ deleteTitle: nt = "Delete view",
466
+ deleteDescription: at,
467
+ deleteCancelLabel: lt = "Cancel",
468
+ deleteConfirmLabel: ct = "Delete",
469
+ size: st = "sm",
470
+ disabled: dt = !1,
471
+ className: ut,
472
+ triggerClassName: mt,
473
+ contentClassName: ft,
474
+ actionMenuClassName: ve
480
475
  }) {
481
- const fe = k(t);
482
- fe.current = t;
483
- const pe = mr(t), G = ae(
484
- () => pe === "none" ? void 0 : fr(fe),
485
- [pe]
486
- ), u = ae(
487
- () => i ?? Nt(o, G ? { saveApi: G } : void 0),
488
- [o, i, G]
489
- ), F = w !== void 0, [J, Q] = m(!1), [V, lt] = m([]), [L, st] = m(null), [ct, be] = m(y ?? null), [he, ge] = m(!1), [D, ve] = m(null), [I, X] = m(""), [h, we] = m(null), W = w ?? ct, H = k(W), P = k(F), Z = k(!1), g = k(!1), S = k(null), ye = Ft();
490
- j(() => {
491
- H.current = W, W && (g.current = !1);
492
- }, [W]), j(() => {
493
- P.current = F;
494
- }, [F]), j(() => {
495
- S.current = null, Z.current = !1, g.current = !1;
496
- }, [u, o]);
497
- const T = N(
476
+ const we = A(r);
477
+ we.current = r;
478
+ const ye = fr(r), J = le(
479
+ () => ye === "none" ? void 0 : pr(we),
480
+ [ye]
481
+ ), m = le(
482
+ () => n ?? Gt(o, J ? { saveApi: J } : void 0),
483
+ [o, n, J]
484
+ ), E = S !== void 0, [Q, X] = p(!1), [R, pt] = p([]), [W, bt] = p(null), [ht, Se] = p(x ?? null), [xe, Te] = p(!1), [P, _e] = p(null), [B, Z] = p(""), [g, Re] = p(null), O = S ?? ht, H = A(O), F = A(E), U = A(!1), v = A(!1), C = A(null), Ce = $t();
485
+ $(() => {
486
+ H.current = O, O && (v.current = !1);
487
+ }, [O]), $(() => {
488
+ F.current = E;
489
+ }, [E]), $(() => {
490
+ C.current = null, U.current = !1, v.current = !1;
491
+ }, [m, o]);
492
+ const w = K(
498
493
  (e) => {
499
- B == null || B(e);
494
+ L == null || L(e);
500
495
  },
501
- [B]
502
- ), v = N(
496
+ [L]
497
+ ), f = K(
503
498
  (e) => {
504
- e && (g.current = !1), P.current || be((e == null ? void 0 : e.view_id) ?? null), f == null || f((e == null ? void 0 : e.view_id) ?? null, e), e && (p == null || p(e));
499
+ e && (v.current = !1), F.current || Se((e == null ? void 0 : e.view_id) ?? null), b == null || b((e == null ? void 0 : e.view_id) ?? null, e), e && (h == null || h(e));
505
500
  },
506
- [f, p]
507
- ), ee = N(
501
+ [b, h]
502
+ ), ee = K(
508
503
  (e) => {
509
- v(e);
504
+ f(e);
510
505
  },
511
- [v]
512
- ), _ = N(
506
+ [f]
507
+ ), y = K(
513
508
  async (e) => {
514
- var Se;
515
- const l = e === void 0 ? "__default__" : e ?? "__none__";
516
- if (((Se = S.current) == null ? void 0 : Se.key) === l) return S.current.promise;
517
- const d = { key: l, promise: Promise.resolve(null) };
518
- return S.current = d, d.promise = (async () => {
519
- ge(!0);
509
+ var ze;
510
+ const a = e === void 0 ? "__default__" : e ?? "__none__";
511
+ if (((ze = C.current) == null ? void 0 : ze.key) === a) return C.current.promise;
512
+ const d = { key: a, promise: Promise.resolve(null) };
513
+ return C.current = d, d.promise = (async () => {
514
+ Te(!0);
520
515
  try {
521
- const R = await u.list(), C = R.find((St) => St.is_default) ?? null, yt = e !== void 0 ? e : H.current, Te = O(R, yt), xt = !g.current && (e !== void 0 || x || !P.current), ie = Te || !xt ? null : O(R, C == null ? void 0 : C.view_id), E = Te ?? ie ?? null;
522
- return lt(R), st((C == null ? void 0 : C.view_id) ?? null), P.current || be((E == null ? void 0 : E.view_id) ?? null), x && ie && e === void 0 && !H.current && !Z.current && (Z.current = !0, ee(ie)), E;
523
- } catch (R) {
524
- return T(R), null;
516
+ const k = await m.list(), z = k.find((At) => At.is_default) ?? null, kt = e !== void 0 ? e : H.current, Ae = I(k, kt), zt = !v.current && (e !== void 0 || T || !F.current), ae = Ae || !zt ? null : I(k, z == null ? void 0 : z.view_id), N = Ae ?? ae ?? null;
517
+ return pt(k), bt((z == null ? void 0 : z.view_id) ?? null), F.current || Se((N == null ? void 0 : N.view_id) ?? null), T && ae && e === void 0 && !H.current && !U.current && (U.current = !0, ee(ae)), N;
518
+ } catch (k) {
519
+ return w(k), null;
525
520
  } finally {
526
- ge(!1), S.current === d && (S.current = null);
521
+ Te(!1), C.current === d && (C.current = null);
527
522
  }
528
523
  })(), d.promise;
529
524
  },
530
- [ee, T, u, x, v]
525
+ [ee, w, m, T, f]
531
526
  );
532
- j(() => {
527
+ $(() => {
533
528
  const e = () => {
534
- _();
529
+ y();
535
530
  };
536
- return e(), u.subscribe(e);
537
- }, [_, u]);
538
- const a = O(V, W) ?? (!g.current && (x || !F) ? O(V, L) : null), dt = ae(
539
- () => ur(V, L, a == null ? void 0 : a.view_id),
540
- [L, a == null ? void 0 : a.view_id, V]
541
- ), xe = !a && (g.current || !L), ut = Le ?? (a == null ? void 0 : a.name) ?? (xe ? Ne : De), te = V.length > 0, mt = (e) => {
542
- Q(!1), ee(e);
543
- }, ft = (e) => {
544
- u.setPrimary(e.view_id).then(async (l) => {
545
- const d = await _(e.view_id);
546
- v(d ?? l), c == null || c(l);
547
- }).catch(T);
548
- }, pt = (e) => {
549
- u.unsetPrimary(e.view_id).then(async (l) => {
550
- const d = await _(e.view_id);
551
- v(d ?? l), b == null || b(l);
552
- }).catch(T);
553
- }, re = () => we(null), bt = (e) => {
554
- const l = H.current === e.view_id;
555
- u.remove(e.view_id).then(async () => {
556
- const d = await _(l ? null : H.current);
557
- l && v(d), U == null || U(e.view_id);
558
- }).catch(T).finally(re);
559
- }, ht = () => {
560
- h && bt(h);
561
- }, gt = () => {
562
- g.current = !0, v(null), Y == null || Y(), Q(!1);
563
- }, vt = (e) => {
564
- ve(e), X(e.name);
565
- }, oe = () => {
566
- ve(null), X("");
567
- }, wt = (e) => {
531
+ return e(), m.subscribe(e);
532
+ }, [y, m]);
533
+ const l = I(R, O) ?? (!v.current && (T || !E) ? I(R, W) : null), gt = le(
534
+ () => mr(R, W, l == null ? void 0 : l.view_id),
535
+ [W, l == null ? void 0 : l.view_id, R]
536
+ ), j = !l, te = W === null, vt = Ye ?? (l == null ? void 0 : l.name) ?? (j ? be : Ge), re = R.length > 0, wt = (e) => {
537
+ X(!1), ee(e);
538
+ }, yt = (e) => {
539
+ m.setPrimary(e.view_id).then(async (a) => {
540
+ const d = await y(e.view_id);
541
+ f(d ?? a), s == null || s(a);
542
+ }).catch(w);
543
+ }, St = (e) => {
544
+ m.unsetPrimary(e.view_id).then(async (a) => {
545
+ const d = await y(e.view_id);
546
+ f(d ?? a), u == null || u(a);
547
+ }).catch(w);
548
+ }, oe = () => Re(null), xt = (e) => {
549
+ const a = H.current === e.view_id;
550
+ m.remove(e.view_id).then(async () => {
551
+ const d = await y(a ? null : H.current);
552
+ a && f(d), G == null || G(e.view_id);
553
+ }).catch(w).finally(oe);
554
+ }, Tt = () => {
555
+ g && xt(g);
556
+ }, ke = () => {
557
+ v.current = !0, f(null), _ == null || _(), X(!1);
558
+ }, _t = () => {
559
+ const e = I(R, W);
560
+ if (!e) {
561
+ ke();
562
+ return;
563
+ }
564
+ m.unsetPrimary(e.view_id).then(async (a) => {
565
+ v.current = !0, await y(null), f(null), _ == null || _(), u == null || u(a);
566
+ }).catch(w);
567
+ }, Rt = (e) => {
568
+ _e(e), Z(e.name);
569
+ }, ie = () => {
570
+ _e(null), Z("");
571
+ }, Ct = (e) => {
568
572
  e.preventDefault();
569
- const l = I.trim();
570
- !D || !l || Ae(l) || u.rename(D.view_id, l).then(async (d) => {
571
- await _(D.view_id), q == null || q(d), oe();
572
- }).catch(T);
573
- }, ne = Ae(I);
574
- return te ? /* @__PURE__ */ s(Yt, { className: ot, children: [
575
- /* @__PURE__ */ s(kt, { open: J, onOpenChange: Q, children: [
576
- /* @__PURE__ */ r(At, { asChild: !0, children: /* @__PURE__ */ s(
577
- Gt,
573
+ const a = B.trim();
574
+ !P || !a || Oe(a) || m.rename(P.view_id, a).then(async (d) => {
575
+ await y(P.view_id), Y == null || Y(d), ie();
576
+ }).catch(w);
577
+ }, ne = Oe(B);
578
+ return re ? /* @__PURE__ */ c(Zt, { className: ut, children: [
579
+ /* @__PURE__ */ c(Bt, { open: Q, onOpenChange: X, children: [
580
+ /* @__PURE__ */ t(Ot, { asChild: !0, children: /* @__PURE__ */ c(
581
+ Ut,
578
582
  {
579
583
  type: "button",
580
584
  "aria-label": "Saved views",
581
- className: nt,
582
- disabled: rt,
583
- "data-filled": a ? "" : void 0,
584
- ownerState: { open: J, empty: !a, filled: !!a, defaultSelected: xe, size: tt },
585
+ className: mt,
586
+ disabled: dt,
587
+ "data-filled": l ? "" : void 0,
588
+ ownerState: { open: Q, empty: !l, filled: !!l, defaultSelected: j, size: st },
585
589
  children: [
586
- /* @__PURE__ */ r(ke, { size: 13 }),
587
- /* @__PURE__ */ r(Jt, { children: ut }),
588
- a != null && a.is_default ? /* @__PURE__ */ r(ze, { size: 13, "aria-hidden": "true", "data-primary-view-indicator": "outline" }) : null,
589
- /* @__PURE__ */ r(Qt, { size: 13, ownerState: { open: J } })
590
+ /* @__PURE__ */ t(Et, { size: 13 }),
591
+ /* @__PURE__ */ t(er, { children: vt }),
592
+ l != null && l.is_default || j && te ? /* @__PURE__ */ t(se, { size: 13, "aria-hidden": "true", "data-primary-view-indicator": "outline" }) : null,
593
+ /* @__PURE__ */ t(tr, { size: 13, ownerState: { open: Q } })
590
594
  ]
591
595
  }
592
596
  ) }),
593
- /* @__PURE__ */ r(zt, { children: /* @__PURE__ */ r(le, { children: /* @__PURE__ */ s(
594
- Xt,
597
+ /* @__PURE__ */ t(Ht, { children: /* @__PURE__ */ t(ce, { children: /* @__PURE__ */ c(
598
+ rr,
595
599
  {
596
600
  align: "start",
597
601
  sideOffset: 8,
598
- collisionPadding: jt,
599
- className: it,
602
+ collisionPadding: Yt,
603
+ className: ft,
600
604
  children: [
601
- /* @__PURE__ */ s(Zt, { children: [
602
- Pe,
603
- ue ? /* @__PURE__ */ r(Mt, { content: ue, side: "right", variant: "white", children: /* @__PURE__ */ r(er, { role: "img", "aria-label": "About primary views", children: /* @__PURE__ */ r(Ht, { size: 13, weight: "fill", "aria-hidden": "true" }) }) }) : null
605
+ /* @__PURE__ */ c(or, { children: [
606
+ Je,
607
+ pe ? /* @__PURE__ */ t(Jt, { content: pe, side: "right", variant: "white", children: /* @__PURE__ */ t(ir, { role: "img", "aria-label": "About primary views", children: /* @__PURE__ */ t(Ft, { size: 13, weight: "fill", "aria-hidden": "true" }) }) }) : null
604
608
  ] }),
605
- /* @__PURE__ */ s(tr, { children: [
606
- he && !te ? /* @__PURE__ */ r(Ve, { children: je }) : null,
607
- !he && !te ? /* @__PURE__ */ r(Ve, { children: Ee }) : null,
608
- dt.map((e) => {
609
- const l = (a == null ? void 0 : a.view_id) === e.view_id;
610
- return /* @__PURE__ */ s(rr, { children: [
611
- /* @__PURE__ */ s(or, { type: "button", ownerState: { selected: l }, onClick: () => mt(e), children: [
612
- /* @__PURE__ */ r(nr, { children: e.name }),
613
- e.is_default ? /* @__PURE__ */ r(ze, { size: 13, "aria-hidden": "true", "data-primary-view-indicator": "outline" }) : null
609
+ /* @__PURE__ */ c(nr, { children: [
610
+ xe && !re ? /* @__PURE__ */ t(Pe, { children: Xe }) : null,
611
+ !xe && !re ? /* @__PURE__ */ t(Pe, { children: Qe }) : null,
612
+ /* @__PURE__ */ c(ar, { "data-default-view-surface": !0, children: [
613
+ /* @__PURE__ */ c(Le, { type: "button", ownerState: { selected: j }, onClick: ke, children: [
614
+ /* @__PURE__ */ t(Ee, { children: be }),
615
+ te ? /* @__PURE__ */ t(se, { size: 13, "aria-hidden": "true", "data-primary-view-indicator": "outline" }) : null
616
+ ] }),
617
+ /* @__PURE__ */ t(
618
+ He,
619
+ {
620
+ align: "start",
621
+ side: "right",
622
+ size: "sm",
623
+ className: ve,
624
+ trigger: /* @__PURE__ */ t(
625
+ Be,
626
+ {
627
+ variant: "secondary",
628
+ size: "sm",
629
+ icon: /* @__PURE__ */ t(We, { size: 14, weight: "bold" }),
630
+ "aria-label": "View actions for Default"
631
+ }
632
+ ),
633
+ items: [
634
+ {
635
+ label: he,
636
+ icon: /* @__PURE__ */ t(M, { size: 16 }),
637
+ disabled: te,
638
+ onSelect: _t
639
+ }
640
+ ]
641
+ }
642
+ )
643
+ ] }),
644
+ /* @__PURE__ */ t(lr, { role: "separator", "data-default-view-divider": !0 }),
645
+ gt.map((e) => {
646
+ const a = (l == null ? void 0 : l.view_id) === e.view_id;
647
+ return /* @__PURE__ */ c(qe, { children: [
648
+ /* @__PURE__ */ c(Le, { type: "button", ownerState: { selected: a }, onClick: () => wt(e), children: [
649
+ /* @__PURE__ */ t(Ee, { children: e.name }),
650
+ e.is_default ? /* @__PURE__ */ t(se, { size: 13, "aria-hidden": "true", "data-primary-view-indicator": "outline" }) : null
614
651
  ] }),
615
- /* @__PURE__ */ r(
616
- $t,
652
+ /* @__PURE__ */ t(
653
+ He,
617
654
  {
618
655
  align: "start",
619
656
  side: "right",
620
657
  size: "sm",
621
- className: at,
622
- trigger: /* @__PURE__ */ r(
623
- Lt,
658
+ className: ve,
659
+ trigger: /* @__PURE__ */ t(
660
+ Be,
624
661
  {
625
662
  variant: "secondary",
626
663
  size: "sm",
627
- icon: /* @__PURE__ */ r(Wt, { size: 14, weight: "bold" }),
664
+ icon: /* @__PURE__ */ t(We, { size: 14, weight: "bold" }),
628
665
  "aria-label": `View actions for ${e.name}`
629
666
  }
630
667
  ),
631
668
  items: [
632
669
  ...e.is_system_defined ? [] : [
633
670
  e.is_default ? {
634
- label: $e,
635
- icon: /* @__PURE__ */ r(se, { size: 16 }),
636
- onSelect: () => pt(e)
671
+ label: Ze,
672
+ icon: /* @__PURE__ */ t(M, { size: 16 }),
673
+ onSelect: () => St(e)
637
674
  } : {
638
- label: Me,
639
- icon: /* @__PURE__ */ r(se, { size: 16 }),
640
- onSelect: () => ft(e)
675
+ label: he,
676
+ icon: /* @__PURE__ */ t(M, { size: 16 }),
677
+ onSelect: () => yt(e)
641
678
  }
642
679
  ],
643
680
  {
644
- label: Ke,
645
- icon: /* @__PURE__ */ r(Ot, { size: 16 }),
646
- onSelect: () => vt(e)
681
+ label: Ue,
682
+ icon: /* @__PURE__ */ t(jt, { size: 16 }),
683
+ onSelect: () => Rt(e)
647
684
  },
648
685
  {
649
- label: qe,
650
- icon: /* @__PURE__ */ r(Bt, { size: 16 }),
686
+ label: et,
687
+ icon: /* @__PURE__ */ t(Nt, { size: 16 }),
651
688
  destructive: !0,
652
- onSelect: () => we(e)
689
+ onSelect: () => Re(e)
653
690
  }
654
691
  ]
655
692
  }
656
693
  )
657
694
  ] }, e.view_id);
658
695
  })
659
- ] }),
660
- /* @__PURE__ */ r(ir, {}),
661
- /* @__PURE__ */ s(ar, { type: "button", onClick: gt, children: [
662
- /* @__PURE__ */ r(ke, { size: 16 }),
663
- /* @__PURE__ */ r("span", { children: "Switch to default" })
664
696
  ] })
665
697
  ]
666
698
  }
667
699
  ) }) })
668
700
  ] }),
669
- /* @__PURE__ */ r(Re, { open: !!D, onOpenChange: (e) => {
670
- e || oe();
671
- }, children: /* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ s(le, { children: [
672
- /* @__PURE__ */ r(Ie, {}),
673
- /* @__PURE__ */ r(We, { children: /* @__PURE__ */ s("form", { onSubmit: wt, children: [
674
- /* @__PURE__ */ r(He, { children: Ue }),
675
- me ? /* @__PURE__ */ r(Oe, { children: me }) : null,
676
- /* @__PURE__ */ r(lr, { htmlFor: ye, children: Ye }),
677
- /* @__PURE__ */ r(
701
+ /* @__PURE__ */ t(De, { open: !!P, onOpenChange: (e) => {
702
+ e || ie();
703
+ }, children: /* @__PURE__ */ t(Ve, { children: /* @__PURE__ */ c(ce, { children: [
704
+ /* @__PURE__ */ t(Fe, {}),
705
+ /* @__PURE__ */ t(je, { children: /* @__PURE__ */ c("form", { onSubmit: Ct, children: [
706
+ /* @__PURE__ */ t(Ne, { children: tt }),
707
+ ge ? /* @__PURE__ */ t($e, { children: ge }) : null,
708
+ /* @__PURE__ */ t(cr, { htmlFor: Ce, children: rt }),
709
+ /* @__PURE__ */ t(
678
710
  sr,
679
711
  {
680
- id: ye,
712
+ id: Ce,
681
713
  autoFocus: !0,
682
- value: I,
683
- onChange: (e) => X(e.currentTarget.value),
714
+ value: B,
715
+ onChange: (e) => Z(e.currentTarget.value),
684
716
  "aria-invalid": ne
685
717
  }
686
718
  ),
687
- ne ? /* @__PURE__ */ s(dr, { children: [
719
+ ne ? /* @__PURE__ */ c(ur, { children: [
688
720
  "“",
689
- I.trim(),
721
+ B.trim(),
690
722
  "” is reserved. Choose a different name."
691
723
  ] }) : null,
692
- /* @__PURE__ */ s(Be, { children: [
693
- /* @__PURE__ */ r(M, { type: "button", variant: "secondary", onClick: oe, children: Ge }),
694
- /* @__PURE__ */ r(cr, { type: "submit", disabled: I.trim().length === 0 || ne, children: Je })
724
+ /* @__PURE__ */ c(Ke, { children: [
725
+ /* @__PURE__ */ t(q, { type: "button", variant: "secondary", onClick: ie, children: ot }),
726
+ /* @__PURE__ */ t(dr, { type: "submit", disabled: B.trim().length === 0 || ne, children: it })
695
727
  ] })
696
728
  ] }) })
697
729
  ] }) }) }),
698
- /* @__PURE__ */ r(Re, { open: !!h, onOpenChange: (e) => {
699
- e || re();
700
- }, children: /* @__PURE__ */ r(Ce, { children: /* @__PURE__ */ s(le, { children: [
701
- /* @__PURE__ */ r(Ie, {}),
702
- /* @__PURE__ */ s(We, { children: [
703
- /* @__PURE__ */ r(He, { children: Qe }),
704
- /* @__PURE__ */ r(Oe, { children: Xe ?? /* @__PURE__ */ s(_e, { children: [
730
+ /* @__PURE__ */ t(De, { open: !!g, onOpenChange: (e) => {
731
+ e || oe();
732
+ }, children: /* @__PURE__ */ t(Ve, { children: /* @__PURE__ */ c(ce, { children: [
733
+ /* @__PURE__ */ t(Fe, {}),
734
+ /* @__PURE__ */ c(je, { children: [
735
+ /* @__PURE__ */ t(Ne, { children: nt }),
736
+ /* @__PURE__ */ t($e, { children: at ?? /* @__PURE__ */ c(Ie, { children: [
705
737
  "Are you sure you want to delete",
706
- h != null && h.name ? /* @__PURE__ */ s(_e, { children: [
738
+ g != null && g.name ? /* @__PURE__ */ c(Ie, { children: [
707
739
  " “",
708
- /* @__PURE__ */ r("strong", { children: h.name }),
740
+ /* @__PURE__ */ t("strong", { children: g.name }),
709
741
  "”"
710
742
  ] }) : " this view",
711
743
  "? This can’t be undone."
712
744
  ] }) }),
713
- /* @__PURE__ */ s(Be, { children: [
714
- /* @__PURE__ */ r(M, { type: "button", variant: "secondary", onClick: re, children: Ze }),
715
- /* @__PURE__ */ r(M, { type: "button", variant: "danger", onClick: ht, children: et })
745
+ /* @__PURE__ */ c(Ke, { children: [
746
+ /* @__PURE__ */ t(q, { type: "button", variant: "secondary", onClick: oe, children: lt }),
747
+ /* @__PURE__ */ t(q, { type: "button", variant: "danger", onClick: Tt, children: ct })
716
748
  ] })
717
749
  ] })
718
750
  ] }) }) })
719
751
  ] }) : null;
720
752
  }
721
753
  export {
722
- Hr as TableViewSelector
754
+ Br as TableViewSelector
723
755
  };
724
756
  //# sourceMappingURL=TableViewSelector.js.map