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