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