@bfrs/agentic-components 0.7.7 → 0.7.9

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