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