@nongt/visql 0.7.0 → 0.9.0
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/README.md +23 -359
- package/dist/{MuiTimePicker-BjywwrRm.js → MuiTimePicker-DRqT6ByZ.js} +1 -1
- package/dist/PipelineEditor-C10lng6j.js +10544 -0
- package/dist/core.js +336 -78
- package/dist/explain.js +165 -0
- package/dist/fixtures.js +1 -1
- package/dist/index.js +114 -98
- package/dist/issueLocation-BOSdd1JX.js +1106 -0
- package/dist/mui-date-pickers-host.js +1 -1
- package/dist/mui-date-pickers.js +1 -1
- package/dist/mui.js +95 -84
- package/dist/params-MMOdKWnW.js +2217 -0
- package/dist/{schema-DFC26AhZ.js → schema-dP_ISylQ.js} +270 -242
- package/dist/sql-import.js +613 -627
- package/dist/sqlGen-B7-2-i9V.js +903 -0
- package/dist/style.css +1 -1
- package/dist/tokens-DV5rTGMj.js +171 -0
- package/dist/types/core/ast.d.ts +1 -1
- package/dist/types/core/components/flow/NodeActionFrame.d.ts +20 -0
- package/dist/types/core/components/flow/useNodeActions.d.ts +18 -0
- package/dist/types/core/i18n/defaultMessages.d.ts +15 -0
- package/dist/types/core/i18n/messages.d.ts +11 -0
- package/dist/types/core/params.d.ts +10 -0
- package/dist/types/core/planFindings.d.ts +27 -0
- package/dist/types/core/queryHelpers.d.ts +1 -1
- package/dist/types/core/schema.d.ts +35 -20
- package/dist/types/core/scopeQuery.d.ts +2 -2
- package/dist/types/core/sqlGen.d.ts +10 -0
- package/dist/types/core/theme/appearance.d.ts +27 -0
- package/dist/types/core/theme/looks.d.ts +14 -0
- package/dist/types/core/theme/tokens.d.ts +9 -1
- package/dist/types/core-api.d.ts +3 -2
- package/dist/types/explain/explainQuery.d.ts +53 -0
- package/dist/types/explain/postgresPlan.d.ts +12 -0
- package/dist/types/explain.d.ts +2 -0
- package/dist/types/features/queryEditor/CanvasBackground.d.ts +2 -0
- package/dist/types/features/queryEditor/ExplainButton.d.ts +13 -0
- package/dist/types/features/queryEditor/IssuesButton.d.ts +14 -6
- package/dist/types/features/queryEditor/PipelineEditor.d.ts +15 -0
- package/dist/types/features/queryEditor/planText.d.ts +8 -0
- package/dist/types/index.d.ts +2 -0
- package/package.json +14 -1
- package/dist/PipelineEditor-9-9xOJcB.js +0 -10214
- package/dist/core-api-BsEMnDQ1.js +0 -1141
- package/dist/issueLocation-732-e0B8.js +0 -3281
- package/dist/tokens-BTaVMSOx.js +0 -95
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as o, a as s, b as a } from "./MuiTimePicker-
|
|
1
|
+
import { M as o, a as s, b as a } from "./MuiTimePicker-DRqT6ByZ.js";
|
|
2
2
|
import { jsx as n } from "react/jsx-runtime";
|
|
3
3
|
import { useContext as m } from "react";
|
|
4
4
|
import { MuiPickersAdapterContext as c } from "@mui/x-date-pickers/LocalizationProvider";
|
package/dist/mui-date-pickers.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { M as m, a as n, b as s } from "./MuiTimePicker-
|
|
1
|
+
import { M as m, a as n, b as s } from "./MuiTimePicker-DRqT6ByZ.js";
|
|
2
2
|
import { jsx as a } from "react/jsx-runtime";
|
|
3
3
|
import { useContext as c } from "react";
|
|
4
4
|
import { AdapterDateFns as p } from "@mui/x-date-pickers/AdapterDateFns";
|
package/dist/mui.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { jsx as n, Fragment as ee, jsxs as
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import { P as ie } from "./PipelineEditor-
|
|
1
|
+
import { jsx as n, Fragment as ee, jsxs as P } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as N, useContext as te, createContext as oe, useMemo as H, useState as L, useRef as re, useLayoutEffect as ne } from "react";
|
|
3
|
+
import { P as ie } from "./PipelineEditor-C10lng6j.js";
|
|
4
4
|
import le from "@emotion/cache";
|
|
5
5
|
import { CacheProvider as D, __unsafe_useEmotionCache as ue } from "@emotion/react";
|
|
6
|
-
import { TextField as C, Menu as
|
|
7
|
-
import { createTheme as xe, alpha as
|
|
6
|
+
import { TextField as C, Menu as ce, ListSubheader as A, MenuItem as G, Box as g, createFilterOptions as se, Autocomplete as K, Select as ae, InputBase as de, Button as pe, IconButton as me, Tooltip as fe, Chip as he } from "@mui/material";
|
|
7
|
+
import { createTheme as xe, alpha as _, ThemeProvider as Q, useTheme as be } from "@mui/material/styles";
|
|
8
8
|
import Me from "clsx";
|
|
9
9
|
import { Plus as Ie } from "iconoir-react";
|
|
10
|
-
import { t as R } from "./tokens-
|
|
10
|
+
import { t as R } from "./tokens-DV5rTGMj.js";
|
|
11
11
|
import { i as ye, f as ge } from "./calendarDate-CYlr9TvX.js";
|
|
12
12
|
function ve(e, t) {
|
|
13
13
|
return xe({
|
|
@@ -15,7 +15,13 @@ function ve(e, t) {
|
|
|
15
15
|
primary: { main: e.accent },
|
|
16
16
|
secondary: { main: e.secondary },
|
|
17
17
|
error: { main: e.danger },
|
|
18
|
-
warning: { main: e.warning }
|
|
18
|
+
warning: { main: e.warning },
|
|
19
|
+
// Menus and popovers in the field cards' colours, which are light or
|
|
20
|
+
// dark with the theme.
|
|
21
|
+
text: { primary: e.fieldText, secondary: e.fieldTextMuted },
|
|
22
|
+
action: { active: e.fieldTextMuted },
|
|
23
|
+
background: { paper: e.fieldBg },
|
|
24
|
+
divider: e.fieldBorder
|
|
19
25
|
},
|
|
20
26
|
typography: {
|
|
21
27
|
// The editor's `fontFamily` when set — this also reaches popovers and
|
|
@@ -60,7 +66,7 @@ function ve(e, t) {
|
|
|
60
66
|
// Preserve the button's own color at 25% when disabled,
|
|
61
67
|
// instead of MUI's default flat gray.
|
|
62
68
|
"&.MuiIconButton-colorSecondary.Mui-disabled": {
|
|
63
|
-
color:
|
|
69
|
+
color: _(e.secondary, 0.25)
|
|
64
70
|
}
|
|
65
71
|
}
|
|
66
72
|
}
|
|
@@ -75,38 +81,38 @@ const U = {
|
|
|
75
81
|
height: 38
|
|
76
82
|
}
|
|
77
83
|
};
|
|
78
|
-
let
|
|
84
|
+
let F;
|
|
79
85
|
function Se() {
|
|
80
|
-
if (!
|
|
86
|
+
if (!F) {
|
|
81
87
|
const e = le({ key: "qb" }), t = e.insert.bind(e);
|
|
82
|
-
e.insert = (o, u,
|
|
88
|
+
e.insert = (o, u, c, s) => t(
|
|
83
89
|
o,
|
|
84
90
|
u.styles.startsWith("@layer") ? u : { ...u, styles: `@layer qb-mui {${u.styles}}` },
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
),
|
|
91
|
+
c,
|
|
92
|
+
s
|
|
93
|
+
), F = e;
|
|
88
94
|
}
|
|
89
|
-
return
|
|
95
|
+
return F;
|
|
90
96
|
}
|
|
91
|
-
const J = oe(void 0),
|
|
92
|
-
const u =
|
|
97
|
+
const J = oe(void 0), Te = ({ tokens: e, fontFamily: t, children: o }) => {
|
|
98
|
+
const u = H(() => ve(e, t), [e, t]), c = ue(), s = be(), i = H(() => ({ cache: c, theme: s }), [c, s]);
|
|
93
99
|
return /* @__PURE__ */ n(J.Provider, { value: i, children: /* @__PURE__ */ n(D, { value: Se(), children: /* @__PURE__ */ n(Q, { theme: u, children: o }) }) });
|
|
94
|
-
},
|
|
100
|
+
}, Be = ({ children: e }) => {
|
|
95
101
|
const t = te(J);
|
|
96
102
|
if (!t) return /* @__PURE__ */ n(ee, { children: e });
|
|
97
103
|
const o = /* @__PURE__ */ n(Q, { theme: t.theme, children: e });
|
|
98
104
|
return t.cache ? /* @__PURE__ */ n(D, { value: t.cache, children: o }) : o;
|
|
99
|
-
},
|
|
105
|
+
}, Pe = ({ children: e, ...t }) => /* @__PURE__ */ n(fe, { disableInteractive: !0, ...t, children: e }), we = N(
|
|
100
106
|
({ children: e, ...t }, o) => /* @__PURE__ */ n(me, { ref: o, ...t, children: e })
|
|
101
|
-
), Oe =
|
|
107
|
+
), Oe = N(
|
|
102
108
|
({ children: e, ...t }, o) => /* @__PURE__ */ n(pe, { ref: o, ...t, children: e })
|
|
103
109
|
), Le = ({
|
|
104
110
|
value: e,
|
|
105
111
|
onChange: t,
|
|
106
112
|
onBlur: o,
|
|
107
113
|
type: u,
|
|
108
|
-
placeholder:
|
|
109
|
-
className:
|
|
114
|
+
placeholder: c,
|
|
115
|
+
className: s,
|
|
110
116
|
inputClassName: i,
|
|
111
117
|
grouped: p,
|
|
112
118
|
disabled: a,
|
|
@@ -119,11 +125,11 @@ const J = oe(void 0), Pe = ({ tokens: e, fontFamily: t, children: o }) => {
|
|
|
119
125
|
de,
|
|
120
126
|
{
|
|
121
127
|
disabled: a,
|
|
122
|
-
className:
|
|
128
|
+
className: s,
|
|
123
129
|
value: e,
|
|
124
130
|
onChange: t && ((f) => t(f.currentTarget.value)),
|
|
125
131
|
onBlur: o,
|
|
126
|
-
placeholder:
|
|
132
|
+
placeholder: c,
|
|
127
133
|
sx: { font: "inherit", color: "inherit" },
|
|
128
134
|
slotProps: { input: { className: i, readOnly: b, maxLength: v } }
|
|
129
135
|
}
|
|
@@ -132,13 +138,13 @@ const J = oe(void 0), Pe = ({ tokens: e, fontFamily: t, children: o }) => {
|
|
|
132
138
|
C,
|
|
133
139
|
{
|
|
134
140
|
disabled: a,
|
|
135
|
-
className:
|
|
141
|
+
className: s,
|
|
136
142
|
sx: p ? U : void 0,
|
|
137
143
|
value: e,
|
|
138
144
|
onChange: t && ((f) => t(f.currentTarget.value)),
|
|
139
145
|
onBlur: o,
|
|
140
146
|
type: u,
|
|
141
|
-
placeholder:
|
|
147
|
+
placeholder: c,
|
|
142
148
|
slotProps: {
|
|
143
149
|
htmlInput: {
|
|
144
150
|
className: i,
|
|
@@ -153,21 +159,21 @@ const J = oe(void 0), Pe = ({ tokens: e, fontFamily: t, children: o }) => {
|
|
|
153
159
|
options: t,
|
|
154
160
|
onChange: o,
|
|
155
161
|
density: u = "normal",
|
|
156
|
-
className:
|
|
157
|
-
grouped:
|
|
162
|
+
className: c,
|
|
163
|
+
grouped: s,
|
|
158
164
|
disabled: i
|
|
159
165
|
}) => {
|
|
160
166
|
const p = u === "compact";
|
|
161
167
|
return /* @__PURE__ */ n(
|
|
162
168
|
ae,
|
|
163
169
|
{
|
|
164
|
-
className:
|
|
170
|
+
className: c,
|
|
165
171
|
disabled: i,
|
|
166
172
|
value: e,
|
|
167
173
|
size: p ? "small" : void 0,
|
|
168
174
|
onChange: (a) => o(a.target.value),
|
|
169
175
|
sx: {
|
|
170
|
-
...
|
|
176
|
+
...s ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0, height: 38 } : {},
|
|
171
177
|
...p ? { fontSize: "0.75rem", height: 26, ".MuiSelect-select": { py: 0.25 } } : {}
|
|
172
178
|
},
|
|
173
179
|
children: t.map((a) => /* @__PURE__ */ n(
|
|
@@ -187,18 +193,18 @@ const J = oe(void 0), Pe = ({ tokens: e, fontFamily: t, children: o }) => {
|
|
|
187
193
|
onChange: t,
|
|
188
194
|
className: o,
|
|
189
195
|
grouped: u,
|
|
190
|
-
disabled:
|
|
196
|
+
disabled: c
|
|
191
197
|
}) => /* @__PURE__ */ n(
|
|
192
198
|
C,
|
|
193
199
|
{
|
|
194
200
|
type: "date",
|
|
195
|
-
disabled:
|
|
201
|
+
disabled: c,
|
|
196
202
|
className: o,
|
|
197
203
|
sx: u ? U : void 0,
|
|
198
204
|
value: e ? ye(e) : "",
|
|
199
|
-
onChange: (
|
|
205
|
+
onChange: (s) => t == null ? void 0 : t(ge(s.currentTarget.value))
|
|
200
206
|
}
|
|
201
|
-
),
|
|
207
|
+
), We = { input: "input", clear: "clear" }, Ee = {
|
|
202
208
|
paper: { className: "w-fit" },
|
|
203
209
|
popper: { sx: { minWidth: "max-content" } }
|
|
204
210
|
}, X = {
|
|
@@ -206,19 +212,19 @@ const J = oe(void 0), Pe = ({ tokens: e, fontFamily: t, children: o }) => {
|
|
|
206
212
|
lineHeight: "32px",
|
|
207
213
|
borderTop: 1,
|
|
208
214
|
borderBottom: 1,
|
|
209
|
-
borderColor: ({ palette: e }) =>
|
|
215
|
+
borderColor: ({ palette: e }) => _(e.text.primary, 0.07),
|
|
210
216
|
boxShadow: "0 3px 4px -3px rgba(0, 0, 0, 0.18)",
|
|
211
217
|
bgcolor: "background.paper",
|
|
212
218
|
backgroundImage: ({ palette: e }) => {
|
|
213
|
-
const t =
|
|
219
|
+
const t = _(e.text.primary, 0.04);
|
|
214
220
|
return `linear-gradient(${t}, ${t})`;
|
|
215
221
|
}
|
|
216
|
-
},
|
|
222
|
+
}, Fe = { ...X, top: -8, whiteSpace: "nowrap" }, ze = {
|
|
217
223
|
fontSize: "0.7rem",
|
|
218
224
|
color: "text.secondary",
|
|
219
225
|
whiteSpace: "normal",
|
|
220
226
|
maxWidth: 320
|
|
221
|
-
},
|
|
227
|
+
}, He = {
|
|
222
228
|
borderTop: 1,
|
|
223
229
|
borderColor: "divider",
|
|
224
230
|
color: "primary.main",
|
|
@@ -226,13 +232,13 @@ const J = oe(void 0), Pe = ({ tokens: e, fontFamily: t, children: o }) => {
|
|
|
226
232
|
gap: 1,
|
|
227
233
|
whiteSpace: "nowrap"
|
|
228
234
|
};
|
|
229
|
-
function
|
|
235
|
+
function _e({
|
|
230
236
|
options: e,
|
|
231
237
|
value: t,
|
|
232
238
|
onChange: o,
|
|
233
239
|
inputValue: u,
|
|
234
|
-
onInputChange:
|
|
235
|
-
getOptionLabel:
|
|
240
|
+
onInputChange: c,
|
|
241
|
+
getOptionLabel: s,
|
|
236
242
|
getOptionKey: i,
|
|
237
243
|
getOptionDetail: p,
|
|
238
244
|
renderOption: a,
|
|
@@ -243,26 +249,26 @@ function He({
|
|
|
243
249
|
freeSolo: S,
|
|
244
250
|
isAction: M,
|
|
245
251
|
label: I,
|
|
246
|
-
placeholder:
|
|
252
|
+
placeholder: W,
|
|
247
253
|
noOptionsText: w,
|
|
248
254
|
maxLength: O,
|
|
249
|
-
className:
|
|
255
|
+
className: k,
|
|
250
256
|
inputClassName: l,
|
|
251
257
|
grouped: d,
|
|
252
258
|
appearance: y = "light",
|
|
253
|
-
disabled:
|
|
259
|
+
disabled: E,
|
|
254
260
|
autoFocus: V
|
|
255
261
|
}) {
|
|
256
|
-
const
|
|
262
|
+
const T = (r) => typeof r == "string" || !s ? String(r) : s(r), Y = (r) => typeof r == "string" || !i ? T(r) : i(r), $ = (r) => p == null ? void 0 : p(r), j = y === "dark", Z = se(x ? { stringify: x } : {});
|
|
257
263
|
return /* @__PURE__ */ n(
|
|
258
264
|
K,
|
|
259
265
|
{
|
|
260
266
|
filterOptions: (r, m) => {
|
|
261
|
-
const h = b && m.inputValue ? r.filter((
|
|
262
|
-
return M ? r.filter((
|
|
267
|
+
const h = b && m.inputValue ? r.filter((B) => b(B, m.inputValue)) : Z(r, m), q = r.some((B) => T(B).toLowerCase() === m.inputValue.toLowerCase()) ? r : h;
|
|
268
|
+
return M ? r.filter((B) => M(B) || q.includes(B)) : q;
|
|
263
269
|
},
|
|
264
|
-
className:
|
|
265
|
-
disabled:
|
|
270
|
+
className: k,
|
|
271
|
+
disabled: E,
|
|
266
272
|
openOnFocus: V,
|
|
267
273
|
freeSolo: S,
|
|
268
274
|
...w === void 0 ? {} : { noOptionsText: w },
|
|
@@ -271,17 +277,17 @@ function He({
|
|
|
271
277
|
value: t,
|
|
272
278
|
onChange: o && ((r, m) => o(m)),
|
|
273
279
|
inputValue: u,
|
|
274
|
-
onInputChange:
|
|
275
|
-
getOptionLabel:
|
|
280
|
+
onInputChange: c && ((r, m, h) => c(m, We[h] ?? "reset")),
|
|
281
|
+
getOptionLabel: T,
|
|
276
282
|
getOptionKey: Y,
|
|
277
283
|
groupBy: v,
|
|
278
|
-
renderGroup: (r) => /* @__PURE__ */
|
|
284
|
+
renderGroup: (r) => /* @__PURE__ */ P("li", { children: [
|
|
279
285
|
r.group !== "" && /* @__PURE__ */ n(
|
|
280
286
|
A,
|
|
281
287
|
{
|
|
282
288
|
component: "div",
|
|
283
289
|
sx: {
|
|
284
|
-
...
|
|
290
|
+
...Fe,
|
|
285
291
|
...(f == null ? void 0 : f(r.group)) === "accent" ? { color: "primary.main" } : {}
|
|
286
292
|
},
|
|
287
293
|
children: r.group
|
|
@@ -289,14 +295,14 @@ function He({
|
|
|
289
295
|
),
|
|
290
296
|
/* @__PURE__ */ n(g, { component: "ul", sx: { p: 0 }, children: r.children })
|
|
291
297
|
] }, r.key),
|
|
292
|
-
renderOption: ({ key: r, ...m }, h) => M != null && M(h) ? /* @__PURE__ */
|
|
298
|
+
renderOption: ({ key: r, ...m }, h) => M != null && M(h) ? /* @__PURE__ */ P(g, { component: "li", ...m, sx: He, children: [
|
|
293
299
|
/* @__PURE__ */ n(Ie, { width: 14, height: 14, strokeWidth: 2.2 }),
|
|
294
|
-
|
|
295
|
-
] }, r) : /* @__PURE__ */ n("li", { ...m, className: Me(m.className, "text-nowrap"), children: (a == null ? void 0 : a(h)) ?? ($(h) ? /* @__PURE__ */
|
|
296
|
-
|
|
297
|
-
/* @__PURE__ */ n(g, { component: "span", sx:
|
|
298
|
-
] }) :
|
|
299
|
-
slotProps:
|
|
300
|
+
T(h)
|
|
301
|
+
] }, r) : /* @__PURE__ */ n("li", { ...m, className: Me(m.className, "text-nowrap"), children: (a == null ? void 0 : a(h)) ?? ($(h) ? /* @__PURE__ */ P(g, { component: "span", sx: { display: "flex", flexDirection: "column" }, children: [
|
|
302
|
+
T(h),
|
|
303
|
+
/* @__PURE__ */ n(g, { component: "span", sx: ze, children: $(h) })
|
|
304
|
+
] }) : T(h)) }, r),
|
|
305
|
+
slotProps: Ee,
|
|
300
306
|
sx: {
|
|
301
307
|
...d ? {
|
|
302
308
|
"& .MuiOutlinedInput-root": { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 }
|
|
@@ -311,7 +317,7 @@ function He({
|
|
|
311
317
|
{
|
|
312
318
|
...r,
|
|
313
319
|
label: I,
|
|
314
|
-
placeholder:
|
|
320
|
+
placeholder: W,
|
|
315
321
|
autoFocus: V,
|
|
316
322
|
slotProps: {
|
|
317
323
|
input: r.InputProps,
|
|
@@ -330,6 +336,11 @@ function He({
|
|
|
330
336
|
...I ? {
|
|
331
337
|
"& .MuiInputLabel-root.Mui-focused": {
|
|
332
338
|
transform: "translate(15px, -6px) scale(0.75)"
|
|
339
|
+
},
|
|
340
|
+
// Clear of the arrow: MUI leaves only 24px, for a field with
|
|
341
|
+
// no end adornment, so a long label ran under it.
|
|
342
|
+
"& .MuiInputLabel-root:not(.MuiInputLabel-shrink)": {
|
|
343
|
+
maxWidth: "calc(100% - 56px)"
|
|
333
344
|
}
|
|
334
345
|
} : {},
|
|
335
346
|
...j ? {
|
|
@@ -345,14 +356,14 @@ function He({
|
|
|
345
356
|
}
|
|
346
357
|
);
|
|
347
358
|
}
|
|
348
|
-
const
|
|
359
|
+
const Ne = { danger: "error.main", warning: "warning.main" }, ke = { ...X, top: 0 }, Ve = ({
|
|
349
360
|
anchorEl: e,
|
|
350
361
|
open: t,
|
|
351
362
|
onClose: o,
|
|
352
363
|
sections: u
|
|
353
|
-
}) => /* @__PURE__ */ n(
|
|
354
|
-
...
|
|
355
|
-
...
|
|
364
|
+
}) => /* @__PURE__ */ n(ce, { anchorEl: e, open: t, onClose: o, children: u.flatMap((c, s) => [
|
|
365
|
+
...c.title ? [/* @__PURE__ */ n(A, { sx: ke, children: c.title }, `section-${s}`)] : [],
|
|
366
|
+
...c.items.map((i) => /* @__PURE__ */ P(
|
|
356
367
|
G,
|
|
357
368
|
{
|
|
358
369
|
dense: !0,
|
|
@@ -368,12 +379,12 @@ const _e = { danger: "error.main", warning: "warning.main" }, Ne = { ...X, top:
|
|
|
368
379
|
sx: {
|
|
369
380
|
display: "flex",
|
|
370
381
|
pt: "2px",
|
|
371
|
-
color: i.tone &&
|
|
382
|
+
color: i.tone && Ne[i.tone]
|
|
372
383
|
},
|
|
373
384
|
children: i.icon
|
|
374
385
|
}
|
|
375
386
|
),
|
|
376
|
-
/* @__PURE__ */
|
|
387
|
+
/* @__PURE__ */ P(g, { component: "span", sx: { display: "flex", flexDirection: "column" }, children: [
|
|
377
388
|
i.label,
|
|
378
389
|
i.detail && /* @__PURE__ */ n(g, { component: "span", sx: { fontSize: "0.7rem", color: "text.secondary" }, children: i.detail })
|
|
379
390
|
] })
|
|
@@ -381,26 +392,26 @@ const _e = { danger: "error.main", warning: "warning.main" }, Ne = { ...X, top:
|
|
|
381
392
|
},
|
|
382
393
|
i.key
|
|
383
394
|
))
|
|
384
|
-
]) }),
|
|
395
|
+
]) }), z = 38;
|
|
385
396
|
function $e({
|
|
386
397
|
items: e,
|
|
387
398
|
options: t,
|
|
388
399
|
onChange: o,
|
|
389
400
|
canAdd: u,
|
|
390
|
-
placeholder:
|
|
391
|
-
maxLength:
|
|
401
|
+
placeholder: c,
|
|
402
|
+
maxLength: s,
|
|
392
403
|
className: i,
|
|
393
404
|
grouped: p,
|
|
394
405
|
disabled: a
|
|
395
406
|
}) {
|
|
396
|
-
const [b, x] = L(""), [v, f] = L(!1), [S, M] = L(!1), [I,
|
|
407
|
+
const [b, x] = L(""), [v, f] = L(!1), [S, M] = L(!1), [I, W] = L(0), w = re(null);
|
|
397
408
|
ne(() => {
|
|
398
409
|
var y;
|
|
399
410
|
const l = [...w.current.querySelectorAll(".MuiAutocomplete-tag")], d = ((y = l[0]) == null ? void 0 : y.offsetTop) ?? 0;
|
|
400
|
-
|
|
411
|
+
W(S ? 0 : l.filter((E) => E.offsetTop > d + 4).length);
|
|
401
412
|
}, [e, S, I]);
|
|
402
413
|
const O = (l) => u && !u(l) ? !1 : (x(""), o == null || o([...e, l]), !0);
|
|
403
|
-
return /* @__PURE__ */
|
|
414
|
+
return /* @__PURE__ */ P(
|
|
404
415
|
g,
|
|
405
416
|
{
|
|
406
417
|
ref: w,
|
|
@@ -449,7 +460,7 @@ function $e({
|
|
|
449
460
|
maxWidth: 360,
|
|
450
461
|
// (As specific as MUI's own small-field padding, to replace it.)
|
|
451
462
|
"& .MuiOutlinedInput-root.MuiInputBase-sizeSmall": {
|
|
452
|
-
minHeight:
|
|
463
|
+
minHeight: z,
|
|
453
464
|
// A row of chips (24px, 2px margins) fills the 38px exactly.
|
|
454
465
|
py: "5px",
|
|
455
466
|
...p ? { borderTopLeftRadius: 0, borderBottomLeftRadius: 0 } : {},
|
|
@@ -458,7 +469,7 @@ function $e({
|
|
|
458
469
|
// focusing the input (rows down) scrolls it — left that way once
|
|
459
470
|
// collapsed again.
|
|
460
471
|
...S ? {} : {
|
|
461
|
-
maxHeight:
|
|
472
|
+
maxHeight: z,
|
|
462
473
|
overflow: "clip",
|
|
463
474
|
...I > 0 ? {
|
|
464
475
|
pr: "44px",
|
|
@@ -476,10 +487,10 @@ function $e({
|
|
|
476
487
|
{
|
|
477
488
|
...l,
|
|
478
489
|
error: v,
|
|
479
|
-
placeholder: e.length ? void 0 :
|
|
490
|
+
placeholder: e.length ? void 0 : c,
|
|
480
491
|
slotProps: {
|
|
481
492
|
input: l.InputProps,
|
|
482
|
-
htmlInput: { ...l.inputProps, maxLength:
|
|
493
|
+
htmlInput: { ...l.inputProps, maxLength: s }
|
|
483
494
|
}
|
|
484
495
|
}
|
|
485
496
|
)
|
|
@@ -494,7 +505,7 @@ function $e({
|
|
|
494
505
|
sx: {
|
|
495
506
|
position: "absolute",
|
|
496
507
|
right: 8,
|
|
497
|
-
top: (
|
|
508
|
+
top: (z - 24) / 2,
|
|
498
509
|
pointerEvents: "none"
|
|
499
510
|
}
|
|
500
511
|
}
|
|
@@ -504,13 +515,13 @@ function $e({
|
|
|
504
515
|
);
|
|
505
516
|
}
|
|
506
517
|
const je = {
|
|
507
|
-
Provider:
|
|
508
|
-
Tooltip:
|
|
518
|
+
Provider: Te,
|
|
519
|
+
Tooltip: Pe,
|
|
509
520
|
IconButton: we,
|
|
510
521
|
Button: Oe,
|
|
511
522
|
TextField: Le,
|
|
512
523
|
Select: Re,
|
|
513
|
-
Combobox:
|
|
524
|
+
Combobox: _e,
|
|
514
525
|
Menu: Ve,
|
|
515
526
|
// A light native-date field; the MUI X picker is an opt-in (MuiDatePicker,
|
|
516
527
|
// `@nongt/visql/mui-date-pickers`) so this kit doesn't need MUI X/date-fns.
|
|
@@ -518,10 +529,10 @@ const je = {
|
|
|
518
529
|
// IN's values: an Autocomplete of chips (plain @mui/material).
|
|
519
530
|
ListInput: $e,
|
|
520
531
|
// The host's own UI inside the editor, in the host's cache and theme.
|
|
521
|
-
HostContent:
|
|
522
|
-
}, et =
|
|
532
|
+
HostContent: Be
|
|
533
|
+
}, et = N(
|
|
523
534
|
({ components: e, ...t }, o) => {
|
|
524
|
-
const u =
|
|
535
|
+
const u = H(
|
|
525
536
|
() => ({ ...je, ...e }),
|
|
526
537
|
[e]
|
|
527
538
|
);
|