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