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