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