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