@malloydata/malloy-explorer 0.0.285-dev250611150446 → 0.0.294-dev250630221944
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1880 -1246
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1883 -1249
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +16 -1
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +2 -1
- package/dist/types/components/QueryPanel/VizEditor/ArrayEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/BooleanEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/FieldEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/InfoHover.d.ts +4 -0
- package/dist/types/components/QueryPanel/VizEditor/NumberEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/ObjectEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/OneOfEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/StringEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditor.d.ts +11 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditorDialog.d.ts +12 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditorPopover.d.ts +10 -0
- package/dist/types/components/QueryPanel/VizEditor/styles.d.ts +72 -0
- package/dist/types/components/QueryPanel/VizEditor/types.d.ts +11 -0
- package/dist/types/components/QueryPanel/dialogStyles.d.ts +60 -0
- package/dist/types/components/filters/DateTimeFilterCore.d.ts +1 -1
- package/dist/types/components/primitives/ScrollableArea.d.ts +3 -0
- package/dist/types/components/utils/renderer.d.ts +0 -24
- package/package.json +8 -8
- package/dist/types/components/QueryPanel/RendererPopover.d.ts +0 -20
package/dist/cjs/index.cjs
CHANGED
|
@@ -19,8 +19,8 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
19
19
|
const React = require("react");
|
|
20
20
|
const QB = require("@malloydata/malloy-query-builder");
|
|
21
21
|
const malloyTag = require("@malloydata/malloy-tag");
|
|
22
|
-
const malloyFilter = require("@malloydata/malloy-filter");
|
|
23
22
|
const render = require("@malloydata/render");
|
|
23
|
+
const malloyFilter = require("@malloydata/malloy-filter");
|
|
24
24
|
const ReactDOM = require("react-dom");
|
|
25
25
|
function _interopNamespaceDefault(e) {
|
|
26
26
|
const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
|
|
@@ -3763,6 +3763,15 @@ const fontStyles = {
|
|
|
3763
3763
|
lineHeight: "mly1d3mw78",
|
|
3764
3764
|
letterSpacing: "mly1gu5id8",
|
|
3765
3765
|
$$css: true
|
|
3766
|
+
},
|
|
3767
|
+
tooltipText: {
|
|
3768
|
+
fontFamily: "mly1rj5sg5",
|
|
3769
|
+
color: "mly1rs82da",
|
|
3770
|
+
fontSize: "mlyif65rj",
|
|
3771
|
+
fontStyle: "mly1j61x8r",
|
|
3772
|
+
fontWeight: "mlyo1l8bm",
|
|
3773
|
+
lineHeight: "mly1fc57z9",
|
|
3774
|
+
$$css: true
|
|
3766
3775
|
}
|
|
3767
3776
|
};
|
|
3768
3777
|
const SvgChevronDown = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { width: 110, height: 110, viewBox: "15 15 80 80", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", ...props2 }, /* @__PURE__ */ React__namespace.createElement("g", { id: "cahevron_down", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M52.9466923,41.3127809 C54.0529774,40.2742275 55.7502198,40.2309545 56.9057514,41.1829617 L57.0533077,41.3127809 L81.5533077,64.3127809 C82.7612755,65.4467914 82.8212296,67.34534 81.6872191,68.5533077 C80.5968243,69.7148152 78.7995712,69.8149195 77.5890551,68.8127704 L77.4466923,68.6872191 L54.9999906,47.615 L32.5533077,68.6872191 C31.3918003,69.7776139 29.5918121,69.7641211 28.4469384,68.6875913 L28.3127809,68.5533077 C27.2223861,67.3918003 27.2358789,65.5918121 28.3124087,64.4469384 L28.4466923,64.3127809 L52.9466923,41.3127809 Z", id: "Path", fill: "currentColor", fillRule: "nonzero", transform: "translate(55.000000, 55.000005) rotate(-180.000000) translate(-55.000000, -55.000005) " })));
|
|
@@ -3913,11 +3922,11 @@ function Icon({
|
|
|
3913
3922
|
return null;
|
|
3914
3923
|
}
|
|
3915
3924
|
return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {
|
|
3916
|
-
..._stylex.props(styles$
|
|
3925
|
+
..._stylex.props(styles$Q.main, colorVariants$3[color], customStyle),
|
|
3917
3926
|
"data-testid": `icon-${color}-${name}`
|
|
3918
3927
|
});
|
|
3919
3928
|
}
|
|
3920
|
-
const styles$
|
|
3929
|
+
const styles$Q = {
|
|
3921
3930
|
main: {
|
|
3922
3931
|
display: "mly1rg5ohu",
|
|
3923
3932
|
width: "mly1kky2od",
|
|
@@ -3986,18 +3995,18 @@ function Badge({
|
|
|
3986
3995
|
customStyle
|
|
3987
3996
|
}) {
|
|
3988
3997
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
3989
|
-
..._stylex.props(styles$
|
|
3998
|
+
..._stylex.props(styles$P.main, colorVariants$2[color], customStyle),
|
|
3990
3999
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
3991
4000
|
color,
|
|
3992
4001
|
name: icon
|
|
3993
4002
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
3994
4003
|
"data-testid": "badge-label",
|
|
3995
|
-
..._stylex.props(fontStyles.badge, styles$
|
|
4004
|
+
..._stylex.props(fontStyles.badge, styles$P.label),
|
|
3996
4005
|
children: label
|
|
3997
4006
|
})]
|
|
3998
4007
|
});
|
|
3999
4008
|
}
|
|
4000
|
-
const styles$
|
|
4009
|
+
const styles$P = {
|
|
4001
4010
|
main: {
|
|
4002
4011
|
display: "mly3nfvp2",
|
|
4003
4012
|
height: "mly1qx5ct2",
|
|
@@ -4079,10 +4088,10 @@ function Divider({
|
|
|
4079
4088
|
customStyle
|
|
4080
4089
|
}) {
|
|
4081
4090
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
4082
|
-
..._stylex.props(styles$
|
|
4091
|
+
..._stylex.props(styles$O.main, orientationVariants[orientation], customStyle)
|
|
4083
4092
|
});
|
|
4084
4093
|
}
|
|
4085
|
-
const styles$
|
|
4094
|
+
const styles$O = {
|
|
4086
4095
|
main: {
|
|
4087
4096
|
background: "mly1xnbgy5",
|
|
4088
4097
|
backgroundAttachment: null,
|
|
@@ -4888,7 +4897,7 @@ function Button({
|
|
|
4888
4897
|
...props2
|
|
4889
4898
|
}) {
|
|
4890
4899
|
const button = /* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
4891
|
-
..._stylex.props(styles$
|
|
4900
|
+
..._stylex.props(styles$N.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
|
|
4892
4901
|
type: "button",
|
|
4893
4902
|
disabled: isDisabled,
|
|
4894
4903
|
...props2,
|
|
@@ -4898,9 +4907,9 @@ function Button({
|
|
|
4898
4907
|
},
|
|
4899
4908
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
4900
4909
|
name: icon,
|
|
4901
|
-
customStyle: styles$
|
|
4910
|
+
customStyle: styles$N.icon
|
|
4902
4911
|
}), label && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
4903
|
-
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$
|
|
4912
|
+
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$N.label),
|
|
4904
4913
|
children: label
|
|
4905
4914
|
})]
|
|
4906
4915
|
}), isDisabled && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -4927,7 +4936,7 @@ function Button({
|
|
|
4927
4936
|
return button;
|
|
4928
4937
|
}
|
|
4929
4938
|
}
|
|
4930
|
-
const styles$
|
|
4939
|
+
const styles$N = {
|
|
4931
4940
|
main: {
|
|
4932
4941
|
display: "mly3nfvp2",
|
|
4933
4942
|
flexDirection: "mlydt5ytf",
|
|
@@ -5178,7 +5187,7 @@ function Token({
|
|
|
5178
5187
|
}) {
|
|
5179
5188
|
const isInteractive = onClick !== void 0 || asButtonTrigger;
|
|
5180
5189
|
const token2 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
5181
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$
|
|
5190
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$M.nonInteractive, customStyle),
|
|
5182
5191
|
...dragProps == null ? void 0 : dragProps.attributes,
|
|
5183
5192
|
...dragProps == null ? void 0 : dragProps.listeners,
|
|
5184
5193
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
@@ -5209,13 +5218,13 @@ function Token({
|
|
|
5209
5218
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
|
|
5210
5219
|
children: /* @__PURE__ */ jsxRuntime.jsx(Content2$4, {
|
|
5211
5220
|
...tooltipProps,
|
|
5212
|
-
..._stylex.props(typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
|
|
5221
|
+
..._stylex.props(fontStyles.tooltipText, typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
|
|
5213
5222
|
children: tooltip
|
|
5214
5223
|
})
|
|
5215
5224
|
})]
|
|
5216
5225
|
}) : token2;
|
|
5217
5226
|
}
|
|
5218
|
-
const styles$
|
|
5227
|
+
const styles$M = {
|
|
5219
5228
|
nonInteractive: {
|
|
5220
5229
|
cursor: "mlyt0e3qv",
|
|
5221
5230
|
background: "mly1np9qvj",
|
|
@@ -5239,7 +5248,7 @@ function TokenGroup({
|
|
|
5239
5248
|
}) {
|
|
5240
5249
|
const count2 = React__namespace.Children.count(children);
|
|
5241
5250
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
5242
|
-
..._stylex.props(styles$
|
|
5251
|
+
..._stylex.props(styles$L.main, customStyle),
|
|
5243
5252
|
children: React__namespace.Children.map(children, (child, index2) => /* @__PURE__ */ React__namespace.cloneElement(child, {
|
|
5244
5253
|
customStyle: {
|
|
5245
5254
|
...child.props.customStyle,
|
|
@@ -5250,16 +5259,16 @@ function TokenGroup({
|
|
|
5250
5259
|
});
|
|
5251
5260
|
}
|
|
5252
5261
|
const getChildStyle = (index2, count2) => {
|
|
5253
|
-
if (count2 === 1) return styles$
|
|
5254
|
-
if (index2 === 0) return styles$
|
|
5255
|
-
if (index2 === count2 - 1) return styles$
|
|
5256
|
-
return styles$
|
|
5262
|
+
if (count2 === 1) return styles$L.onlyChild;
|
|
5263
|
+
if (index2 === 0) return styles$L.firstChild;
|
|
5264
|
+
if (index2 === count2 - 1) return styles$L.lastChild;
|
|
5265
|
+
return styles$L.innerChild;
|
|
5257
5266
|
};
|
|
5258
5267
|
const getTokenColor = (child, groupColor) => {
|
|
5259
5268
|
const childColor = child.props.color;
|
|
5260
5269
|
return childColor === void 0 ? groupColor : childColor;
|
|
5261
5270
|
};
|
|
5262
|
-
const styles$
|
|
5271
|
+
const styles$L = {
|
|
5263
5272
|
main: {
|
|
5264
5273
|
display: "mlyrvj5dj",
|
|
5265
5274
|
gridAutoFlow: "mly1mt1orb",
|
|
@@ -5331,7 +5340,7 @@ function ErrorIcon({
|
|
|
5331
5340
|
},
|
|
5332
5341
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
5333
5342
|
name: "warning",
|
|
5334
|
-
customStyle: styles$
|
|
5343
|
+
customStyle: styles$K.errorIcon
|
|
5335
5344
|
})
|
|
5336
5345
|
})
|
|
5337
5346
|
}), /* @__PURE__ */ jsxRuntime.jsx(TooltipPortal, {
|
|
@@ -5344,7 +5353,7 @@ function ErrorIcon({
|
|
|
5344
5353
|
})]
|
|
5345
5354
|
});
|
|
5346
5355
|
}
|
|
5347
|
-
const styles$
|
|
5356
|
+
const styles$K = {
|
|
5348
5357
|
errorIcon: {
|
|
5349
5358
|
color: "mly1e2nbdu",
|
|
5350
5359
|
$$css: true
|
|
@@ -5389,22 +5398,22 @@ function EditableToken({
|
|
|
5389
5398
|
className: "mly78zum5 mly6s0dn4"
|
|
5390
5399
|
},
|
|
5391
5400
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
5392
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$
|
|
5401
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$J.focused, !!errorMessage && styles$J.hasError, customStyle),
|
|
5393
5402
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
5394
5403
|
name: icon,
|
|
5395
|
-
customStyle: styles$
|
|
5404
|
+
customStyle: styles$J.icon
|
|
5396
5405
|
}), /* @__PURE__ */ jsxRuntime.jsxs("span", {
|
|
5397
5406
|
...{
|
|
5398
5407
|
className: "mlywz0xwf"
|
|
5399
5408
|
},
|
|
5400
5409
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
5401
|
-
..._stylex.props(fontStyles.body, styles$
|
|
5410
|
+
..._stylex.props(fontStyles.body, styles$J.placeholder),
|
|
5402
5411
|
style: {
|
|
5403
5412
|
whiteSpaceCollapse: "preserve"
|
|
5404
5413
|
},
|
|
5405
5414
|
children: value
|
|
5406
5415
|
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
5407
|
-
..._stylex.props(styles$
|
|
5416
|
+
..._stylex.props(styles$J.input, fontStyles.body),
|
|
5408
5417
|
ref: inputRef,
|
|
5409
5418
|
pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
|
|
5410
5419
|
value,
|
|
@@ -5429,7 +5438,7 @@ function EditableToken({
|
|
|
5429
5438
|
})]
|
|
5430
5439
|
});
|
|
5431
5440
|
}
|
|
5432
|
-
const styles$
|
|
5441
|
+
const styles$J = {
|
|
5433
5442
|
focused: {
|
|
5434
5443
|
background: "mlyotlr4g",
|
|
5435
5444
|
backgroundAttachment: null,
|
|
@@ -7771,12 +7780,12 @@ function TextInput({
|
|
|
7771
7780
|
}
|
|
7772
7781
|
};
|
|
7773
7782
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
7774
|
-
..._stylex.props(styles$
|
|
7783
|
+
..._stylex.props(styles$I.main, isFocused && styles$I.focused, sizeVariants[size2], customStyle),
|
|
7775
7784
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
7776
7785
|
name: icon,
|
|
7777
7786
|
color: "secondary"
|
|
7778
7787
|
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
7779
|
-
..._stylex.props(fontStyles.body, styles$
|
|
7788
|
+
..._stylex.props(fontStyles.body, styles$I.input),
|
|
7780
7789
|
value,
|
|
7781
7790
|
placeholder,
|
|
7782
7791
|
onChange: handleChange,
|
|
@@ -7784,7 +7793,7 @@ function TextInput({
|
|
|
7784
7793
|
onBlur: handleBlur,
|
|
7785
7794
|
onKeyDown
|
|
7786
7795
|
}), hasClear && /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
7787
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
7796
|
+
..._stylex.props(fontStyles.supporting, styles$I.actionButton, value === "" && styles$I.hidden),
|
|
7788
7797
|
ref: buttonRef,
|
|
7789
7798
|
onClick: () => onChange(""),
|
|
7790
7799
|
tabIndex: 0,
|
|
@@ -7792,7 +7801,7 @@ function TextInput({
|
|
|
7792
7801
|
})]
|
|
7793
7802
|
});
|
|
7794
7803
|
}
|
|
7795
|
-
const styles$
|
|
7804
|
+
const styles$I = {
|
|
7796
7805
|
main: {
|
|
7797
7806
|
display: "mly78zum5",
|
|
7798
7807
|
alignItems: "mly6s0dn4",
|
|
@@ -8001,7 +8010,7 @@ function SelectorToken({
|
|
|
8001
8010
|
onValueChange: handleValueChange,
|
|
8002
8011
|
required: true,
|
|
8003
8012
|
children: [/* @__PURE__ */ jsxRuntime.jsxs(Trigger$3, {
|
|
8004
|
-
..._stylex.props(tokenStyles.main, styles$
|
|
8013
|
+
..._stylex.props(tokenStyles.main, styles$H.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
|
|
8005
8014
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8006
8015
|
name: icon,
|
|
8007
8016
|
customStyle: tokenStyles.icon
|
|
@@ -8030,7 +8039,7 @@ function SelectorToken({
|
|
|
8030
8039
|
size: "compact",
|
|
8031
8040
|
icon: "search",
|
|
8032
8041
|
hasClear: true,
|
|
8033
|
-
customStyle: styles$
|
|
8042
|
+
customStyle: styles$H.searchInput,
|
|
8034
8043
|
onKeyDown: (event) => {
|
|
8035
8044
|
const excludedKeys = ["ArrowUp", "ArrowDown"];
|
|
8036
8045
|
if (!excludedKeys.includes(event.key)) {
|
|
@@ -8063,21 +8072,21 @@ function SelectItem({
|
|
|
8063
8072
|
...props2
|
|
8064
8073
|
}) {
|
|
8065
8074
|
return /* @__PURE__ */ jsxRuntime.jsxs(Item$1, {
|
|
8066
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8075
|
+
..._stylex.props(fontStyles.body, styles$H.selectItem),
|
|
8067
8076
|
value,
|
|
8068
8077
|
...props2,
|
|
8069
8078
|
children: [value === selectedValue ? /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8070
8079
|
name: "radioChecked",
|
|
8071
|
-
customStyle: styles$
|
|
8080
|
+
customStyle: styles$H.radioChecked
|
|
8072
8081
|
}) : /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8073
8082
|
name: "radioUnchecked",
|
|
8074
|
-
customStyle: styles$
|
|
8083
|
+
customStyle: styles$H.radioUnchecked
|
|
8075
8084
|
}), /* @__PURE__ */ jsxRuntime.jsx(ItemText, {
|
|
8076
8085
|
children
|
|
8077
8086
|
})]
|
|
8078
8087
|
});
|
|
8079
8088
|
}
|
|
8080
|
-
const styles$
|
|
8089
|
+
const styles$H = {
|
|
8081
8090
|
selectTrigger: {
|
|
8082
8091
|
whiteSpace: "mlyuxw1ft",
|
|
8083
8092
|
overflow: "mlyb3r6kr",
|
|
@@ -8167,7 +8176,7 @@ function Card({
|
|
|
8167
8176
|
customStyle
|
|
8168
8177
|
}) {
|
|
8169
8178
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8170
|
-
..._stylex.props(styles$
|
|
8179
|
+
..._stylex.props(styles$G.container, customStyle),
|
|
8171
8180
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
8172
8181
|
...{
|
|
8173
8182
|
className: "mly1717udv"
|
|
@@ -8181,7 +8190,7 @@ function Card({
|
|
|
8181
8190
|
})]
|
|
8182
8191
|
});
|
|
8183
8192
|
}
|
|
8184
|
-
const styles$
|
|
8193
|
+
const styles$G = {
|
|
8185
8194
|
container: {
|
|
8186
8195
|
display: "mly78zum5",
|
|
8187
8196
|
flexDirection: "mlydt5ytf",
|
|
@@ -8274,7 +8283,7 @@ function CollapsiblePanel({
|
|
|
8274
8283
|
},
|
|
8275
8284
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8276
8285
|
name: icon,
|
|
8277
|
-
customStyle: styles$
|
|
8286
|
+
customStyle: styles$F.icon
|
|
8278
8287
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
8279
8288
|
...{
|
|
8280
8289
|
className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4"
|
|
@@ -8316,7 +8325,7 @@ function CollapsiblePanel({
|
|
|
8316
8325
|
})]
|
|
8317
8326
|
});
|
|
8318
8327
|
}
|
|
8319
|
-
const styles$
|
|
8328
|
+
const styles$F = {
|
|
8320
8329
|
icon: {
|
|
8321
8330
|
$$css: true
|
|
8322
8331
|
}
|
|
@@ -8348,10 +8357,10 @@ function CollapsibleListItem({
|
|
|
8348
8357
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
|
|
8349
8358
|
},
|
|
8350
8359
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
8351
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8360
|
+
..._stylex.props(fontStyles.body, styles$E.label),
|
|
8352
8361
|
children: label
|
|
8353
8362
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
8354
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
8363
|
+
..._stylex.props(fontStyles.supporting, styles$E.sublabel),
|
|
8355
8364
|
children: sublabel
|
|
8356
8365
|
})]
|
|
8357
8366
|
})]
|
|
@@ -8363,7 +8372,7 @@ function CollapsibleListItem({
|
|
|
8363
8372
|
})]
|
|
8364
8373
|
});
|
|
8365
8374
|
}
|
|
8366
|
-
const styles$
|
|
8375
|
+
const styles$E = {
|
|
8367
8376
|
label: {
|
|
8368
8377
|
flexGrow: "mly1iyjqo2",
|
|
8369
8378
|
fontWeight: "mly1xlr1w8",
|
|
@@ -19177,7 +19186,7 @@ function Spinner({
|
|
|
19177
19186
|
} = SIZES[size2];
|
|
19178
19187
|
const frameSize = diameter + border * 2;
|
|
19179
19188
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
19180
|
-
..._stylex.props(styles$
|
|
19189
|
+
..._stylex.props(styles$D.root, customStyle),
|
|
19181
19190
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
19182
19191
|
"aria-valuetext": "Loading",
|
|
19183
19192
|
...{
|
|
@@ -19197,7 +19206,7 @@ function Spinner({
|
|
|
19197
19206
|
})
|
|
19198
19207
|
});
|
|
19199
19208
|
}
|
|
19200
|
-
const styles$
|
|
19209
|
+
const styles$D = {
|
|
19201
19210
|
root: {
|
|
19202
19211
|
alignItems: "mly6s0dn4",
|
|
19203
19212
|
display: "mly3nfvp2",
|
|
@@ -23595,7 +23604,7 @@ const Popover = ({
|
|
|
23595
23604
|
})
|
|
23596
23605
|
});
|
|
23597
23606
|
};
|
|
23598
|
-
const styles$
|
|
23607
|
+
const styles$C = {
|
|
23599
23608
|
wrapper: {
|
|
23600
23609
|
position: "mly1n2onr6",
|
|
23601
23610
|
$$css: true
|
|
@@ -23647,7 +23656,7 @@ const SelectDropdown = ({
|
|
|
23647
23656
|
setOpen(false);
|
|
23648
23657
|
};
|
|
23649
23658
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
23650
|
-
..._stylex.props(styles$
|
|
23659
|
+
..._stylex.props(styles$C.wrapper, customStyle),
|
|
23651
23660
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
23652
23661
|
type: "button",
|
|
23653
23662
|
autoFocus,
|
|
@@ -23715,7 +23724,7 @@ function SelectList({
|
|
|
23715
23724
|
const [hoveredIndex, setHoveredIndex] = React.useState(null);
|
|
23716
23725
|
return /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
23717
23726
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
23718
|
-
..._stylex.props(styles$
|
|
23727
|
+
..._stylex.props(styles$C.selectListDiv, customStyle),
|
|
23719
23728
|
children: options.reduce((result, option2, index2) => {
|
|
23720
23729
|
const isSelected = value !== void 0 && valueEqual(value, option2.value);
|
|
23721
23730
|
if (option2.divider) {
|
|
@@ -23747,8 +23756,8 @@ function SelectList({
|
|
|
23747
23756
|
}), /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
23748
23757
|
name: "checkmark",
|
|
23749
23758
|
customStyle: {
|
|
23750
|
-
...styles$
|
|
23751
|
-
...isSelected ? styles$
|
|
23759
|
+
...styles$C.checkIcon,
|
|
23760
|
+
...isSelected ? styles$C.checkIconSelected : void 0
|
|
23752
23761
|
}
|
|
23753
23762
|
}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
23754
23763
|
...{
|
|
@@ -23800,7 +23809,7 @@ const DateInput = ({
|
|
|
23800
23809
|
setTempValue(hooks.utc(value).format(format2));
|
|
23801
23810
|
}, [value, format2]);
|
|
23802
23811
|
return /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
23803
|
-
..._stylex.props(customStyle, isActive ? styles$
|
|
23812
|
+
..._stylex.props(customStyle, isActive ? styles$B.active : null),
|
|
23804
23813
|
type: "text",
|
|
23805
23814
|
placeholder: placeholder || format2,
|
|
23806
23815
|
value: tempValue,
|
|
@@ -23835,7 +23844,7 @@ function guessUnits(moment2, isDateTime) {
|
|
|
23835
23844
|
}
|
|
23836
23845
|
return isDateTime ? "second" : "day";
|
|
23837
23846
|
}
|
|
23838
|
-
const styles$
|
|
23847
|
+
const styles$B = {
|
|
23839
23848
|
active: {
|
|
23840
23849
|
backgroundColor: "mly1vzefiq",
|
|
23841
23850
|
$$css: true
|
|
@@ -23947,7 +23956,7 @@ function DatePicker({
|
|
|
23947
23956
|
});
|
|
23948
23957
|
};
|
|
23949
23958
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
23950
|
-
..._stylex.props(styles$
|
|
23959
|
+
..._stylex.props(styles$A.outer, customStyle),
|
|
23951
23960
|
ref: forwardRef,
|
|
23952
23961
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
23953
23962
|
...{
|
|
@@ -24263,7 +24272,7 @@ function DatePicker({
|
|
|
24263
24272
|
})]
|
|
24264
24273
|
});
|
|
24265
24274
|
}
|
|
24266
|
-
const styles$
|
|
24275
|
+
const styles$A = {
|
|
24267
24276
|
outer: {
|
|
24268
24277
|
userSelect: "mly87ps6o",
|
|
24269
24278
|
fontSize: "mlymhiqyu",
|
|
@@ -24349,7 +24358,7 @@ function Banner({
|
|
|
24349
24358
|
className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
|
|
24350
24359
|
},
|
|
24351
24360
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
24352
|
-
..._stylex.props(styles$
|
|
24361
|
+
..._stylex.props(styles$z.header, variantColors[variant], children ? styles$z.headerWithContent : null),
|
|
24353
24362
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24354
24363
|
...{
|
|
24355
24364
|
className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
|
|
@@ -24362,22 +24371,22 @@ function Banner({
|
|
|
24362
24371
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr"
|
|
24363
24372
|
},
|
|
24364
24373
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24365
|
-
..._stylex.props(styles$
|
|
24374
|
+
..._stylex.props(styles$z.title, fontStyles.emphasized),
|
|
24366
24375
|
children: title
|
|
24367
24376
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24368
|
-
..._stylex.props(styles$
|
|
24377
|
+
..._stylex.props(styles$z.description, fontStyles.supporting),
|
|
24369
24378
|
children: description
|
|
24370
24379
|
})]
|
|
24371
24380
|
})]
|
|
24372
24381
|
}), children && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24373
|
-
..._stylex.props(styles$
|
|
24382
|
+
..._stylex.props(styles$z.content, fontStyles.body),
|
|
24374
24383
|
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
24375
24384
|
children
|
|
24376
24385
|
})
|
|
24377
24386
|
})]
|
|
24378
24387
|
});
|
|
24379
24388
|
}
|
|
24380
|
-
const styles$
|
|
24389
|
+
const styles$z = {
|
|
24381
24390
|
header: {
|
|
24382
24391
|
borderRadius: "mly1q4ynmn",
|
|
24383
24392
|
borderStartStartRadius: null,
|
|
@@ -24519,14 +24528,14 @@ function AccordionList({
|
|
|
24519
24528
|
onExpandedItemChange: handleExpandedItemChange
|
|
24520
24529
|
},
|
|
24521
24530
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24522
|
-
..._stylex.props(styles$
|
|
24531
|
+
..._stylex.props(styles$y.main, customStyle),
|
|
24523
24532
|
children: React__namespace.Children.map(children, (child) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
24524
24533
|
children: [child, /* @__PURE__ */ jsxRuntime.jsx(Divider, {})]
|
|
24525
24534
|
}))
|
|
24526
24535
|
})
|
|
24527
24536
|
});
|
|
24528
24537
|
}
|
|
24529
|
-
const styles$
|
|
24538
|
+
const styles$y = {
|
|
24530
24539
|
main: {
|
|
24531
24540
|
display: "mly78zum5",
|
|
24532
24541
|
flexDirection: "mlydt5ytf",
|
|
@@ -24563,10 +24572,10 @@ function AccordionListItem({
|
|
|
24563
24572
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2"
|
|
24564
24573
|
},
|
|
24565
24574
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
24566
|
-
..._stylex.props(fontStyles.body, styles$
|
|
24575
|
+
..._stylex.props(fontStyles.body, styles$x.label),
|
|
24567
24576
|
children: label
|
|
24568
24577
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
24569
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
24578
|
+
..._stylex.props(fontStyles.supporting, styles$x.sublabel),
|
|
24570
24579
|
children: sublabel
|
|
24571
24580
|
})]
|
|
24572
24581
|
}), badge && badge, endIcon && endIcon]
|
|
@@ -24578,7 +24587,7 @@ function AccordionListItem({
|
|
|
24578
24587
|
})]
|
|
24579
24588
|
});
|
|
24580
24589
|
}
|
|
24581
|
-
const styles$
|
|
24590
|
+
const styles$x = {
|
|
24582
24591
|
label: {
|
|
24583
24592
|
flexGrow: "mly1iyjqo2",
|
|
24584
24593
|
fontWeight: "mly1xlr1w8",
|
|
@@ -25863,7 +25872,7 @@ function DropdownMenu({
|
|
|
25863
25872
|
children: trigger
|
|
25864
25873
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal2, {
|
|
25865
25874
|
children: /* @__PURE__ */ jsxRuntime.jsx(Content2, {
|
|
25866
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25875
|
+
..._stylex.props(fontStyles.body, styles$w.content),
|
|
25867
25876
|
side: "bottom",
|
|
25868
25877
|
align: "start",
|
|
25869
25878
|
sideOffset: 4,
|
|
@@ -25890,22 +25899,22 @@ function DropdownMenuItem({
|
|
|
25890
25899
|
disabled,
|
|
25891
25900
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
25892
25901
|
name: icon,
|
|
25893
|
-
customStyle: styles$
|
|
25902
|
+
customStyle: styles$w.icon
|
|
25894
25903
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
25895
25904
|
...{
|
|
25896
25905
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2"
|
|
25897
25906
|
},
|
|
25898
25907
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25899
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25908
|
+
..._stylex.props(fontStyles.body, styles$w.label),
|
|
25900
25909
|
children: label
|
|
25901
25910
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25902
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
25911
|
+
..._stylex.props(fontStyles.supporting, styles$w.sublabel),
|
|
25903
25912
|
children: sublabel
|
|
25904
25913
|
})]
|
|
25905
25914
|
})]
|
|
25906
25915
|
});
|
|
25907
25916
|
}
|
|
25908
|
-
const styles$
|
|
25917
|
+
const styles$w = {
|
|
25909
25918
|
content: {
|
|
25910
25919
|
display: "mly78zum5",
|
|
25911
25920
|
flexDirection: "mlydt5ytf",
|
|
@@ -25989,7 +25998,7 @@ function QueryActionBar({
|
|
|
25989
25998
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
25990
25999
|
name: "filterSliders"
|
|
25991
26000
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
25992
|
-
..._stylex.props(fontStyles.largeBody, styles$
|
|
26001
|
+
..._stylex.props(fontStyles.largeBody, styles$v.title),
|
|
25993
26002
|
children: "Query"
|
|
25994
26003
|
})]
|
|
25995
26004
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -26034,13 +26043,13 @@ function QueryActionBar({
|
|
|
26034
26043
|
})]
|
|
26035
26044
|
});
|
|
26036
26045
|
}
|
|
26037
|
-
const styles$
|
|
26046
|
+
const styles$v = {
|
|
26038
26047
|
title: {
|
|
26039
26048
|
fontWeight: "mly1xlr1w8",
|
|
26040
26049
|
$$css: true
|
|
26041
26050
|
}
|
|
26042
26051
|
};
|
|
26043
|
-
const styles$
|
|
26052
|
+
const styles$u = {
|
|
26044
26053
|
labelWithIcon: {
|
|
26045
26054
|
display: "mly78zum5",
|
|
26046
26055
|
alignItems: "mly6s0dn4",
|
|
@@ -26197,109 +26206,6 @@ function legacyToViz(name) {
|
|
|
26197
26206
|
return name;
|
|
26198
26207
|
}
|
|
26199
26208
|
}
|
|
26200
|
-
const VISUALIZATION_OPTIONS = {
|
|
26201
|
-
table: null,
|
|
26202
|
-
bar: [{
|
|
26203
|
-
name: "title",
|
|
26204
|
-
label: "Title",
|
|
26205
|
-
type: "string",
|
|
26206
|
-
default: ""
|
|
26207
|
-
}, {
|
|
26208
|
-
name: "sub_title",
|
|
26209
|
-
label: "Subtitle",
|
|
26210
|
-
type: "string",
|
|
26211
|
-
default: ""
|
|
26212
|
-
}, {
|
|
26213
|
-
name: "stack",
|
|
26214
|
-
label: "Stack",
|
|
26215
|
-
type: "boolean",
|
|
26216
|
-
default: false
|
|
26217
|
-
}, {
|
|
26218
|
-
name: "size",
|
|
26219
|
-
label: "Size",
|
|
26220
|
-
type: "select",
|
|
26221
|
-
default: "fill",
|
|
26222
|
-
options: [{
|
|
26223
|
-
label: "Fill",
|
|
26224
|
-
value: "fill"
|
|
26225
|
-
}, {
|
|
26226
|
-
label: "Sparkline",
|
|
26227
|
-
value: "spark"
|
|
26228
|
-
}, {
|
|
26229
|
-
label: "X-Small",
|
|
26230
|
-
value: "xs"
|
|
26231
|
-
}, {
|
|
26232
|
-
label: "Small",
|
|
26233
|
-
value: "sm"
|
|
26234
|
-
}, {
|
|
26235
|
-
label: "Medium",
|
|
26236
|
-
value: "md"
|
|
26237
|
-
}, {
|
|
26238
|
-
label: "Large",
|
|
26239
|
-
value: "lg"
|
|
26240
|
-
}, {
|
|
26241
|
-
label: "X-Large",
|
|
26242
|
-
value: "xl"
|
|
26243
|
-
}, {
|
|
26244
|
-
label: "XX-Large",
|
|
26245
|
-
value: "2xl"
|
|
26246
|
-
}]
|
|
26247
|
-
}],
|
|
26248
|
-
dashboard: null,
|
|
26249
|
-
json: null,
|
|
26250
|
-
line: [{
|
|
26251
|
-
name: "title",
|
|
26252
|
-
label: "Title",
|
|
26253
|
-
type: "string",
|
|
26254
|
-
default: ""
|
|
26255
|
-
}, {
|
|
26256
|
-
name: "sub_title",
|
|
26257
|
-
label: "Subtitle",
|
|
26258
|
-
type: "string",
|
|
26259
|
-
default: ""
|
|
26260
|
-
}, {
|
|
26261
|
-
name: "zero_baseline",
|
|
26262
|
-
label: "Zero Baseline",
|
|
26263
|
-
type: "boolean",
|
|
26264
|
-
default: false
|
|
26265
|
-
}, {
|
|
26266
|
-
name: "size",
|
|
26267
|
-
label: "Size",
|
|
26268
|
-
type: "select",
|
|
26269
|
-
default: "md",
|
|
26270
|
-
options: [{
|
|
26271
|
-
label: "Fill",
|
|
26272
|
-
value: "fill"
|
|
26273
|
-
}, {
|
|
26274
|
-
label: "Sparkline",
|
|
26275
|
-
value: "spark"
|
|
26276
|
-
}, {
|
|
26277
|
-
label: "X-Small",
|
|
26278
|
-
value: "xs"
|
|
26279
|
-
}, {
|
|
26280
|
-
label: "Small",
|
|
26281
|
-
value: "sm"
|
|
26282
|
-
}, {
|
|
26283
|
-
label: "Medium",
|
|
26284
|
-
value: "md"
|
|
26285
|
-
}, {
|
|
26286
|
-
label: "Large",
|
|
26287
|
-
value: "lg"
|
|
26288
|
-
}, {
|
|
26289
|
-
label: "X-Large",
|
|
26290
|
-
value: "xl"
|
|
26291
|
-
}, {
|
|
26292
|
-
label: "XX-Large",
|
|
26293
|
-
value: "2xl"
|
|
26294
|
-
}]
|
|
26295
|
-
}],
|
|
26296
|
-
list: null,
|
|
26297
|
-
list_detail: null,
|
|
26298
|
-
point_map: null,
|
|
26299
|
-
scatter_chart: null,
|
|
26300
|
-
segment_map: null,
|
|
26301
|
-
shape_map: null
|
|
26302
|
-
};
|
|
26303
26209
|
function atomicTypeToIcon(type) {
|
|
26304
26210
|
return atomicTypeMap[type];
|
|
26305
26211
|
}
|
|
@@ -26395,7 +26301,7 @@ function DrillOperations({
|
|
|
26395
26301
|
}
|
|
26396
26302
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
26397
26303
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
26398
|
-
..._stylex.props(styles$
|
|
26304
|
+
..._stylex.props(styles$u.title),
|
|
26399
26305
|
children: "drills"
|
|
26400
26306
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
26401
26307
|
...{
|
|
@@ -30367,272 +30273,1713 @@ function BadgeForField({
|
|
|
30367
30273
|
label: "view",
|
|
30368
30274
|
icon: "view_filled",
|
|
30369
30275
|
color: "purple",
|
|
30370
|
-
customStyle: styles$
|
|
30276
|
+
customStyle: styles$t.noBackground
|
|
30371
30277
|
});
|
|
30372
30278
|
} else if (field.kind === "dimension") {
|
|
30373
30279
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
30374
30280
|
label: "dimension",
|
|
30375
30281
|
icon: fieldToIcon(field),
|
|
30376
30282
|
color: "cyan",
|
|
30377
|
-
customStyle: styles$
|
|
30283
|
+
customStyle: styles$t.noBackground
|
|
30378
30284
|
});
|
|
30379
30285
|
} else if (field.kind === "measure") {
|
|
30380
30286
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
30381
30287
|
label: "measure",
|
|
30382
30288
|
icon: fieldToIcon(field),
|
|
30383
30289
|
color: "green",
|
|
30384
|
-
customStyle: styles$
|
|
30290
|
+
customStyle: styles$t.noBackground
|
|
30385
30291
|
});
|
|
30386
30292
|
} else if (field.kind === "join") {
|
|
30387
30293
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
30388
30294
|
label: "join",
|
|
30389
30295
|
icon: fieldToIcon(field),
|
|
30390
30296
|
color: "gray",
|
|
30391
|
-
customStyle: styles$
|
|
30297
|
+
customStyle: styles$t.noBackground
|
|
30392
30298
|
});
|
|
30393
30299
|
}
|
|
30394
30300
|
}
|
|
30395
|
-
const styles$
|
|
30301
|
+
const styles$t = {
|
|
30396
30302
|
noBackground: {
|
|
30397
30303
|
backgroundColor: "mlyjbqb8w",
|
|
30398
30304
|
$$css: true
|
|
30399
30305
|
}
|
|
30400
30306
|
};
|
|
30401
|
-
|
|
30402
|
-
|
|
30403
|
-
|
|
30404
|
-
|
|
30405
|
-
view,
|
|
30406
|
-
customStyle
|
|
30407
|
-
}) {
|
|
30408
|
-
const [open, setOpen] = React.useState(false);
|
|
30409
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Root2$2, {
|
|
30410
|
-
onOpenChange: (open2) => setOpen(open2),
|
|
30411
|
-
open,
|
|
30412
|
-
children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$2, {
|
|
30413
|
-
asChild: true,
|
|
30414
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Token, {
|
|
30415
|
-
icon: "gear",
|
|
30416
|
-
customStyle: {
|
|
30417
|
-
...customStyle,
|
|
30418
|
-
...dialogStyles$1.trigger
|
|
30419
|
-
}
|
|
30420
|
-
})
|
|
30421
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$2, {
|
|
30422
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(Content2$2, {
|
|
30423
|
-
align: "end",
|
|
30424
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(RendererEditor, {
|
|
30425
|
-
rootQuery,
|
|
30426
|
-
view,
|
|
30427
|
-
viz,
|
|
30428
|
-
options,
|
|
30429
|
-
setOpen
|
|
30430
|
-
})
|
|
30431
|
-
})
|
|
30432
|
-
})]
|
|
30433
|
-
});
|
|
30434
|
-
}
|
|
30435
|
-
function RendererEditor({
|
|
30436
|
-
rootQuery,
|
|
30437
|
-
view,
|
|
30438
|
-
viz,
|
|
30439
|
-
options,
|
|
30440
|
-
setOpen
|
|
30441
|
-
}) {
|
|
30307
|
+
var DIALOG_NAME = "Dialog";
|
|
30308
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
30309
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
30310
|
+
var Dialog = (props2) => {
|
|
30442
30311
|
const {
|
|
30443
|
-
|
|
30444
|
-
|
|
30445
|
-
|
|
30446
|
-
|
|
30447
|
-
|
|
30448
|
-
|
|
30449
|
-
|
|
30450
|
-
|
|
30451
|
-
|
|
30452
|
-
|
|
30453
|
-
|
|
30454
|
-
|
|
30455
|
-
|
|
30312
|
+
__scopeDialog,
|
|
30313
|
+
children,
|
|
30314
|
+
open: openProp,
|
|
30315
|
+
defaultOpen,
|
|
30316
|
+
onOpenChange,
|
|
30317
|
+
modal = true
|
|
30318
|
+
} = props2;
|
|
30319
|
+
const triggerRef = React__namespace.useRef(null);
|
|
30320
|
+
const contentRef = React__namespace.useRef(null);
|
|
30321
|
+
const [open = false, setOpen] = useControllableState({
|
|
30322
|
+
prop: openProp,
|
|
30323
|
+
defaultProp: defaultOpen,
|
|
30324
|
+
onChange: onOpenChange
|
|
30325
|
+
});
|
|
30326
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30327
|
+
DialogProvider,
|
|
30328
|
+
{
|
|
30329
|
+
scope: __scopeDialog,
|
|
30330
|
+
triggerRef,
|
|
30331
|
+
contentRef,
|
|
30332
|
+
contentId: useId(),
|
|
30333
|
+
titleId: useId(),
|
|
30334
|
+
descriptionId: useId(),
|
|
30335
|
+
open,
|
|
30336
|
+
onOpenChange: setOpen,
|
|
30337
|
+
onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
30338
|
+
modal,
|
|
30339
|
+
children
|
|
30340
|
+
}
|
|
30341
|
+
);
|
|
30342
|
+
};
|
|
30343
|
+
Dialog.displayName = DIALOG_NAME;
|
|
30344
|
+
var TRIGGER_NAME$1 = "DialogTrigger";
|
|
30345
|
+
var DialogTrigger = React__namespace.forwardRef(
|
|
30346
|
+
(props2, forwardedRef) => {
|
|
30347
|
+
const { __scopeDialog, ...triggerProps } = props2;
|
|
30348
|
+
const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
|
|
30349
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
30350
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30351
|
+
Primitive.button,
|
|
30352
|
+
{
|
|
30353
|
+
type: "button",
|
|
30354
|
+
"aria-haspopup": "dialog",
|
|
30355
|
+
"aria-expanded": context.open,
|
|
30356
|
+
"aria-controls": context.contentId,
|
|
30357
|
+
"data-state": getState(context.open),
|
|
30358
|
+
...triggerProps,
|
|
30359
|
+
ref: composedTriggerRef,
|
|
30360
|
+
onClick: composeEventHandlers(props2.onClick, context.onOpenToggle)
|
|
30361
|
+
}
|
|
30362
|
+
);
|
|
30456
30363
|
}
|
|
30457
|
-
|
|
30458
|
-
|
|
30459
|
-
|
|
30460
|
-
|
|
30461
|
-
|
|
30462
|
-
|
|
30463
|
-
|
|
30464
|
-
|
|
30465
|
-
|
|
30466
|
-
|
|
30467
|
-
|
|
30468
|
-
|
|
30469
|
-
|
|
30470
|
-
|
|
30471
|
-
|
|
30472
|
-
|
|
30473
|
-
|
|
30474
|
-
|
|
30475
|
-
|
|
30476
|
-
|
|
30477
|
-
|
|
30478
|
-
|
|
30479
|
-
|
|
30480
|
-
|
|
30481
|
-
|
|
30482
|
-
|
|
30483
|
-
|
|
30484
|
-
|
|
30485
|
-
|
|
30364
|
+
);
|
|
30365
|
+
DialogTrigger.displayName = TRIGGER_NAME$1;
|
|
30366
|
+
var PORTAL_NAME = "DialogPortal";
|
|
30367
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
30368
|
+
forceMount: void 0
|
|
30369
|
+
});
|
|
30370
|
+
var DialogPortal = (props2) => {
|
|
30371
|
+
const { __scopeDialog, forceMount, children, container } = props2;
|
|
30372
|
+
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
30373
|
+
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React__namespace.Children.map(children, (child) => /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$5, { asChild: true, container, children: child }) })) });
|
|
30374
|
+
};
|
|
30375
|
+
DialogPortal.displayName = PORTAL_NAME;
|
|
30376
|
+
var OVERLAY_NAME = "DialogOverlay";
|
|
30377
|
+
var DialogOverlay = React__namespace.forwardRef(
|
|
30378
|
+
(props2, forwardedRef) => {
|
|
30379
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
30380
|
+
const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
|
|
30381
|
+
const context = useDialogContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
30382
|
+
return context.modal ? /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
30383
|
+
}
|
|
30384
|
+
);
|
|
30385
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
|
30386
|
+
var DialogOverlayImpl = React__namespace.forwardRef(
|
|
30387
|
+
(props2, forwardedRef) => {
|
|
30388
|
+
const { __scopeDialog, ...overlayProps } = props2;
|
|
30389
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
30390
|
+
return (
|
|
30391
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
30392
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
30393
|
+
/* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30394
|
+
Primitive.div,
|
|
30395
|
+
{
|
|
30396
|
+
"data-state": getState(context.open),
|
|
30397
|
+
...overlayProps,
|
|
30398
|
+
ref: forwardedRef,
|
|
30399
|
+
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
30400
|
+
}
|
|
30401
|
+
) })
|
|
30402
|
+
);
|
|
30403
|
+
}
|
|
30404
|
+
);
|
|
30405
|
+
var CONTENT_NAME$1 = "DialogContent";
|
|
30406
|
+
var DialogContent = React__namespace.forwardRef(
|
|
30407
|
+
(props2, forwardedRef) => {
|
|
30408
|
+
const portalContext = usePortalContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30409
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props2;
|
|
30410
|
+
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30411
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsxRuntime.jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
30412
|
+
}
|
|
30413
|
+
);
|
|
30414
|
+
DialogContent.displayName = CONTENT_NAME$1;
|
|
30415
|
+
var DialogContentModal = React__namespace.forwardRef(
|
|
30416
|
+
(props2, forwardedRef) => {
|
|
30417
|
+
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30418
|
+
const contentRef = React__namespace.useRef(null);
|
|
30419
|
+
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
30420
|
+
React__namespace.useEffect(() => {
|
|
30421
|
+
const content = contentRef.current;
|
|
30422
|
+
if (content) return hideOthers(content);
|
|
30423
|
+
}, []);
|
|
30424
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30425
|
+
DialogContentImpl,
|
|
30426
|
+
{
|
|
30427
|
+
...props2,
|
|
30428
|
+
ref: composedRefs,
|
|
30429
|
+
trapFocus: context.open,
|
|
30430
|
+
disableOutsidePointerEvents: true,
|
|
30431
|
+
onCloseAutoFocus: composeEventHandlers(props2.onCloseAutoFocus, (event) => {
|
|
30432
|
+
var _a2;
|
|
30433
|
+
event.preventDefault();
|
|
30434
|
+
(_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
|
|
30435
|
+
}),
|
|
30436
|
+
onPointerDownOutside: composeEventHandlers(props2.onPointerDownOutside, (event) => {
|
|
30437
|
+
const originalEvent = event.detail.originalEvent;
|
|
30438
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
30439
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
30440
|
+
if (isRightClick) event.preventDefault();
|
|
30441
|
+
}),
|
|
30442
|
+
onFocusOutside: composeEventHandlers(
|
|
30443
|
+
props2.onFocusOutside,
|
|
30444
|
+
(event) => event.preventDefault()
|
|
30445
|
+
)
|
|
30446
|
+
}
|
|
30447
|
+
);
|
|
30448
|
+
}
|
|
30449
|
+
);
|
|
30450
|
+
var DialogContentNonModal = React__namespace.forwardRef(
|
|
30451
|
+
(props2, forwardedRef) => {
|
|
30452
|
+
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30453
|
+
const hasInteractedOutsideRef = React__namespace.useRef(false);
|
|
30454
|
+
const hasPointerDownOutsideRef = React__namespace.useRef(false);
|
|
30455
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30456
|
+
DialogContentImpl,
|
|
30457
|
+
{
|
|
30458
|
+
...props2,
|
|
30459
|
+
ref: forwardedRef,
|
|
30460
|
+
trapFocus: false,
|
|
30461
|
+
disableOutsidePointerEvents: false,
|
|
30462
|
+
onCloseAutoFocus: (event) => {
|
|
30463
|
+
var _a2, _b2;
|
|
30464
|
+
(_a2 = props2.onCloseAutoFocus) == null ? void 0 : _a2.call(props2, event);
|
|
30465
|
+
if (!event.defaultPrevented) {
|
|
30466
|
+
if (!hasInteractedOutsideRef.current) (_b2 = context.triggerRef.current) == null ? void 0 : _b2.focus();
|
|
30467
|
+
event.preventDefault();
|
|
30468
|
+
}
|
|
30469
|
+
hasInteractedOutsideRef.current = false;
|
|
30470
|
+
hasPointerDownOutsideRef.current = false;
|
|
30486
30471
|
},
|
|
30487
|
-
|
|
30488
|
-
|
|
30489
|
-
|
|
30490
|
-
|
|
30491
|
-
|
|
30492
|
-
|
|
30493
|
-
|
|
30494
|
-
variant: "primary",
|
|
30495
|
-
label: "Apply",
|
|
30496
|
-
onClick: () => {
|
|
30497
|
-
if (!view.getTag(RENDERER_PREFIX).has("viz", viz)) {
|
|
30498
|
-
view.setTagProperty(["viz"], viz, RENDERER_PREFIX);
|
|
30499
|
-
}
|
|
30500
|
-
for (const option2 of options) {
|
|
30501
|
-
if (current[option2.name] !== option2.default.toString()) {
|
|
30502
|
-
view.setTagProperty(["viz", option2.name], current[option2.name], RENDERER_PREFIX);
|
|
30503
|
-
} else {
|
|
30504
|
-
view.removeTagProperty(["viz", option2.name], RENDERER_PREFIX);
|
|
30505
|
-
}
|
|
30472
|
+
onInteractOutside: (event) => {
|
|
30473
|
+
var _a2, _b2;
|
|
30474
|
+
(_a2 = props2.onInteractOutside) == null ? void 0 : _a2.call(props2, event);
|
|
30475
|
+
if (!event.defaultPrevented) {
|
|
30476
|
+
hasInteractedOutsideRef.current = true;
|
|
30477
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
|
30478
|
+
hasPointerDownOutsideRef.current = true;
|
|
30506
30479
|
}
|
|
30507
|
-
|
|
30508
|
-
|
|
30509
|
-
|
|
30510
|
-
|
|
30511
|
-
|
|
30512
|
-
|
|
30513
|
-
|
|
30514
|
-
});
|
|
30515
|
-
}
|
|
30516
|
-
function BooleanEditor({
|
|
30517
|
-
current,
|
|
30518
|
-
option: option2,
|
|
30519
|
-
setCurrent
|
|
30520
|
-
}) {
|
|
30521
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
30522
|
-
children: [/* @__PURE__ */ React.createElement("div", {
|
|
30523
|
-
...{
|
|
30524
|
-
className: "mly78zum5 mly1lvf691 mly117nqv4"
|
|
30525
|
-
},
|
|
30526
|
-
key: option2.name
|
|
30527
|
-
}, /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
30528
|
-
type: "checkbox",
|
|
30529
|
-
checked: current[option2.name] === "true",
|
|
30530
|
-
onChange: ({
|
|
30531
|
-
target: {
|
|
30532
|
-
checked
|
|
30480
|
+
}
|
|
30481
|
+
const target = event.target;
|
|
30482
|
+
const targetIsTrigger = (_b2 = context.triggerRef.current) == null ? void 0 : _b2.contains(target);
|
|
30483
|
+
if (targetIsTrigger) event.preventDefault();
|
|
30484
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
30485
|
+
event.preventDefault();
|
|
30486
|
+
}
|
|
30533
30487
|
}
|
|
30534
|
-
}) => {
|
|
30535
|
-
setCurrent({
|
|
30536
|
-
...current,
|
|
30537
|
-
[option2.name]: checked.toString()
|
|
30538
|
-
});
|
|
30539
30488
|
}
|
|
30540
|
-
|
|
30541
|
-
|
|
30542
|
-
|
|
30543
|
-
|
|
30544
|
-
|
|
30545
|
-
}
|
|
30546
|
-
|
|
30547
|
-
|
|
30548
|
-
|
|
30549
|
-
|
|
30550
|
-
|
|
30551
|
-
|
|
30552
|
-
|
|
30553
|
-
|
|
30554
|
-
|
|
30555
|
-
|
|
30556
|
-
|
|
30557
|
-
|
|
30558
|
-
|
|
30559
|
-
|
|
30560
|
-
|
|
30561
|
-
|
|
30562
|
-
|
|
30563
|
-
|
|
30489
|
+
);
|
|
30490
|
+
}
|
|
30491
|
+
);
|
|
30492
|
+
var DialogContentImpl = React__namespace.forwardRef(
|
|
30493
|
+
(props2, forwardedRef) => {
|
|
30494
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
|
|
30495
|
+
const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
|
|
30496
|
+
const contentRef = React__namespace.useRef(null);
|
|
30497
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
30498
|
+
useFocusGuards();
|
|
30499
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30500
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30501
|
+
FocusScope,
|
|
30502
|
+
{
|
|
30503
|
+
asChild: true,
|
|
30504
|
+
loop: true,
|
|
30505
|
+
trapped: trapFocus,
|
|
30506
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
30507
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
30508
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30509
|
+
DismissableLayer,
|
|
30510
|
+
{
|
|
30511
|
+
role: "dialog",
|
|
30512
|
+
id: context.contentId,
|
|
30513
|
+
"aria-describedby": context.descriptionId,
|
|
30514
|
+
"aria-labelledby": context.titleId,
|
|
30515
|
+
"data-state": getState(context.open),
|
|
30516
|
+
...contentProps,
|
|
30517
|
+
ref: composedRefs,
|
|
30518
|
+
onDismiss: () => context.onOpenChange(false)
|
|
30519
|
+
}
|
|
30520
|
+
)
|
|
30564
30521
|
}
|
|
30565
|
-
|
|
30566
|
-
|
|
30567
|
-
|
|
30568
|
-
|
|
30569
|
-
|
|
30570
|
-
|
|
30571
|
-
|
|
30572
|
-
|
|
30573
|
-
|
|
30574
|
-
|
|
30575
|
-
|
|
30576
|
-
|
|
30577
|
-
|
|
30578
|
-
})
|
|
30579
|
-
|
|
30580
|
-
|
|
30581
|
-
|
|
30582
|
-
|
|
30583
|
-
|
|
30584
|
-
|
|
30585
|
-
|
|
30586
|
-
|
|
30587
|
-
|
|
30588
|
-
|
|
30589
|
-
|
|
30590
|
-
|
|
30591
|
-
|
|
30592
|
-
|
|
30593
|
-
|
|
30594
|
-
|
|
30522
|
+
),
|
|
30523
|
+
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
30524
|
+
/* @__PURE__ */ jsxRuntime.jsx(TitleWarning, { titleId: context.titleId }),
|
|
30525
|
+
/* @__PURE__ */ jsxRuntime.jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
30526
|
+
] })
|
|
30527
|
+
] });
|
|
30528
|
+
}
|
|
30529
|
+
);
|
|
30530
|
+
var TITLE_NAME = "DialogTitle";
|
|
30531
|
+
var DialogTitle = React__namespace.forwardRef(
|
|
30532
|
+
(props2, forwardedRef) => {
|
|
30533
|
+
const { __scopeDialog, ...titleProps } = props2;
|
|
30534
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
30535
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
30536
|
+
}
|
|
30537
|
+
);
|
|
30538
|
+
DialogTitle.displayName = TITLE_NAME;
|
|
30539
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
|
30540
|
+
var DialogDescription = React__namespace.forwardRef(
|
|
30541
|
+
(props2, forwardedRef) => {
|
|
30542
|
+
const { __scopeDialog, ...descriptionProps } = props2;
|
|
30543
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
30544
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
30545
|
+
}
|
|
30546
|
+
);
|
|
30547
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
30548
|
+
var CLOSE_NAME = "DialogClose";
|
|
30549
|
+
var DialogClose = React__namespace.forwardRef(
|
|
30550
|
+
(props2, forwardedRef) => {
|
|
30551
|
+
const { __scopeDialog, ...closeProps } = props2;
|
|
30552
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
30553
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
30554
|
+
Primitive.button,
|
|
30555
|
+
{
|
|
30556
|
+
type: "button",
|
|
30557
|
+
...closeProps,
|
|
30558
|
+
ref: forwardedRef,
|
|
30559
|
+
onClick: composeEventHandlers(props2.onClick, () => context.onOpenChange(false))
|
|
30595
30560
|
}
|
|
30596
|
-
|
|
30597
|
-
}
|
|
30561
|
+
);
|
|
30562
|
+
}
|
|
30563
|
+
);
|
|
30564
|
+
DialogClose.displayName = CLOSE_NAME;
|
|
30565
|
+
function getState(open) {
|
|
30566
|
+
return open ? "open" : "closed";
|
|
30598
30567
|
}
|
|
30599
|
-
|
|
30600
|
-
|
|
30601
|
-
|
|
30568
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
30569
|
+
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
30570
|
+
contentName: CONTENT_NAME$1,
|
|
30571
|
+
titleName: TITLE_NAME,
|
|
30572
|
+
docsSlug: "dialog"
|
|
30573
|
+
});
|
|
30574
|
+
var TitleWarning = ({ titleId }) => {
|
|
30575
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
30576
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
30577
|
+
|
|
30578
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
30579
|
+
|
|
30580
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
30581
|
+
React__namespace.useEffect(() => {
|
|
30582
|
+
if (titleId) {
|
|
30583
|
+
const hasTitle = document.getElementById(titleId);
|
|
30584
|
+
if (!hasTitle) console.error(MESSAGE);
|
|
30585
|
+
}
|
|
30586
|
+
}, [MESSAGE, titleId]);
|
|
30587
|
+
return null;
|
|
30588
|
+
};
|
|
30589
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
30590
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
30591
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
30592
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
30593
|
+
React__namespace.useEffect(() => {
|
|
30594
|
+
var _a2;
|
|
30595
|
+
const describedById = (_a2 = contentRef.current) == null ? void 0 : _a2.getAttribute("aria-describedby");
|
|
30596
|
+
if (descriptionId && describedById) {
|
|
30597
|
+
const hasDescription = document.getElementById(descriptionId);
|
|
30598
|
+
if (!hasDescription) console.warn(MESSAGE);
|
|
30599
|
+
}
|
|
30600
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
|
30601
|
+
return null;
|
|
30602
|
+
};
|
|
30603
|
+
var Root = Dialog;
|
|
30604
|
+
var Portal = DialogPortal;
|
|
30605
|
+
var Overlay = DialogOverlay;
|
|
30606
|
+
var Content$1 = DialogContent;
|
|
30607
|
+
var Title = DialogTitle;
|
|
30608
|
+
var Description = DialogDescription;
|
|
30609
|
+
var Close = DialogClose;
|
|
30610
|
+
const styles$s = {
|
|
30611
|
+
left: {
|
|
30612
|
+
display: "mly78zum5",
|
|
30613
|
+
justifyContent: "mly1lvf691",
|
|
30602
30614
|
$$css: true
|
|
30603
30615
|
},
|
|
30604
|
-
|
|
30616
|
+
right: {
|
|
30617
|
+
display: "mly78zum5",
|
|
30618
|
+
justifyContent: "mly1rfj78v",
|
|
30619
|
+
$$css: true
|
|
30620
|
+
},
|
|
30621
|
+
heading: {
|
|
30622
|
+
gridColumn: "mly623te4",
|
|
30623
|
+
gridColumnStart: null,
|
|
30624
|
+
gridColumnEnd: null,
|
|
30625
|
+
fontWeight: "mly117nqv4",
|
|
30626
|
+
$$css: true
|
|
30627
|
+
},
|
|
30628
|
+
label: {
|
|
30629
|
+
whiteSpace: "mlyuxw1ft",
|
|
30630
|
+
$$css: true
|
|
30631
|
+
},
|
|
30632
|
+
divider: {
|
|
30633
|
+
gridColumn: "mly1a80n4u",
|
|
30634
|
+
gridColumnStart: null,
|
|
30635
|
+
gridColumnEnd: null,
|
|
30636
|
+
borderTop: "mlye536se",
|
|
30637
|
+
borderTopWidth: null,
|
|
30638
|
+
borderTopStyle: null,
|
|
30639
|
+
borderTopColor: null,
|
|
30640
|
+
$$css: true
|
|
30641
|
+
},
|
|
30642
|
+
editor: {
|
|
30605
30643
|
display: "mly78zum5",
|
|
30606
30644
|
flexDirection: "mlydt5ytf",
|
|
30607
|
-
boxShadow: "mly5n1uv4",
|
|
30608
|
-
backgroundColor: "mly12peec7",
|
|
30609
|
-
borderRadius: "mlyur7f20",
|
|
30610
|
-
borderStartStartRadius: null,
|
|
30611
|
-
borderStartEndRadius: null,
|
|
30612
|
-
borderEndStartRadius: null,
|
|
30613
|
-
borderEndEndRadius: null,
|
|
30614
|
-
borderTopLeftRadius: null,
|
|
30615
|
-
borderTopRightRadius: null,
|
|
30616
|
-
borderBottomLeftRadius: null,
|
|
30617
|
-
borderBottomRightRadius: null,
|
|
30618
|
-
padding: "mlye8ttls",
|
|
30619
|
-
paddingInline: null,
|
|
30620
|
-
paddingStart: null,
|
|
30621
|
-
paddingLeft: null,
|
|
30622
|
-
paddingEnd: null,
|
|
30623
|
-
paddingRight: null,
|
|
30624
|
-
paddingBlock: null,
|
|
30625
|
-
paddingTop: null,
|
|
30626
|
-
paddingBottom: null,
|
|
30627
|
-
minWidth: "mlylm99nl",
|
|
30628
|
-
maxWidth: "mly1jkqq1h",
|
|
30629
30645
|
gap: "mly167g77z",
|
|
30630
30646
|
rowGap: null,
|
|
30631
30647
|
columnGap: null,
|
|
30648
|
+
overflow: "mlyb3r6kr",
|
|
30649
|
+
overflowX: null,
|
|
30650
|
+
overflowY: null,
|
|
30632
30651
|
$$css: true
|
|
30633
30652
|
},
|
|
30634
|
-
|
|
30635
|
-
|
|
30653
|
+
editorGrid: {
|
|
30654
|
+
display: "mlyrvj5dj",
|
|
30655
|
+
gridTemplateColumns: "mly16kridx",
|
|
30656
|
+
gridAutoRows: "mlysd5ean",
|
|
30657
|
+
gap: "mly167g77z",
|
|
30658
|
+
rowGap: null,
|
|
30659
|
+
columnGap: null,
|
|
30660
|
+
overflowY: "mly1odjw0f",
|
|
30661
|
+
$$css: true
|
|
30662
|
+
},
|
|
30663
|
+
editorRow: {
|
|
30664
|
+
display: "mly78zum5",
|
|
30665
|
+
gap: "mly167g77z",
|
|
30666
|
+
rowGap: null,
|
|
30667
|
+
columnGap: null,
|
|
30668
|
+
$$css: true
|
|
30669
|
+
},
|
|
30670
|
+
editorCell: {
|
|
30671
|
+
flexGrow: "mly1iyjqo2",
|
|
30672
|
+
$$css: true
|
|
30673
|
+
},
|
|
30674
|
+
input: {
|
|
30675
|
+
border: "mly27xtdb",
|
|
30676
|
+
borderWidth: null,
|
|
30677
|
+
borderInlineWidth: null,
|
|
30678
|
+
borderInlineStartWidth: null,
|
|
30679
|
+
borderLeftWidth: null,
|
|
30680
|
+
borderInlineEndWidth: null,
|
|
30681
|
+
borderRightWidth: null,
|
|
30682
|
+
borderBlockWidth: null,
|
|
30683
|
+
borderTopWidth: null,
|
|
30684
|
+
borderBottomWidth: null,
|
|
30685
|
+
borderStyle: null,
|
|
30686
|
+
borderInlineStyle: null,
|
|
30687
|
+
borderInlineStartStyle: null,
|
|
30688
|
+
borderLeftStyle: null,
|
|
30689
|
+
borderInlineEndStyle: null,
|
|
30690
|
+
borderRightStyle: null,
|
|
30691
|
+
borderBlockStyle: null,
|
|
30692
|
+
borderTopStyle: null,
|
|
30693
|
+
borderBottomStyle: null,
|
|
30694
|
+
borderColor: null,
|
|
30695
|
+
borderInlineColor: null,
|
|
30696
|
+
borderInlineStartColor: null,
|
|
30697
|
+
borderLeftColor: null,
|
|
30698
|
+
borderInlineEndColor: null,
|
|
30699
|
+
borderRightColor: null,
|
|
30700
|
+
borderBlockColor: null,
|
|
30701
|
+
borderTopColor: null,
|
|
30702
|
+
borderBottomColor: null,
|
|
30703
|
+
borderRadius: "mly12oqio5",
|
|
30704
|
+
borderStartStartRadius: null,
|
|
30705
|
+
borderStartEndRadius: null,
|
|
30706
|
+
borderEndStartRadius: null,
|
|
30707
|
+
borderEndEndRadius: null,
|
|
30708
|
+
borderTopLeftRadius: null,
|
|
30709
|
+
borderTopRightRadius: null,
|
|
30710
|
+
borderBottomLeftRadius: null,
|
|
30711
|
+
borderBottomRightRadius: null,
|
|
30712
|
+
color: "mlyizdh9v",
|
|
30713
|
+
padding: "mly34lxi1",
|
|
30714
|
+
paddingInline: null,
|
|
30715
|
+
paddingStart: null,
|
|
30716
|
+
paddingLeft: null,
|
|
30717
|
+
paddingEnd: null,
|
|
30718
|
+
paddingRight: null,
|
|
30719
|
+
paddingBlock: null,
|
|
30720
|
+
paddingTop: null,
|
|
30721
|
+
paddingBottom: null,
|
|
30722
|
+
$$css: true
|
|
30723
|
+
},
|
|
30724
|
+
card: {
|
|
30725
|
+
maxWidth: "mly1dc814f",
|
|
30726
|
+
$$css: true
|
|
30727
|
+
},
|
|
30728
|
+
infoTrigger: {
|
|
30729
|
+
display: "mly3nfvp2",
|
|
30730
|
+
alignItems: "mly1071x5a",
|
|
30731
|
+
justifyContent: "mlyl56j7k",
|
|
30732
|
+
paddingRight: "mlyy13l1i",
|
|
30733
|
+
paddingInlineStart: null,
|
|
30734
|
+
paddingInlineEnd: null,
|
|
30735
|
+
paddingTop: "mly1iorvi4",
|
|
30736
|
+
$$css: true
|
|
30737
|
+
}
|
|
30738
|
+
};
|
|
30739
|
+
function HoverCard({
|
|
30740
|
+
children,
|
|
30741
|
+
customStyle
|
|
30742
|
+
}) {
|
|
30743
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30744
|
+
..._stylex.props(styles$r.container, fontStyles.body, customStyle),
|
|
30745
|
+
children
|
|
30746
|
+
});
|
|
30747
|
+
}
|
|
30748
|
+
const styles$r = {
|
|
30749
|
+
container: {
|
|
30750
|
+
boxShadow: "mly5n1uv4",
|
|
30751
|
+
backgroundColor: "mly12peec7",
|
|
30752
|
+
borderRadius: "mly4pepcl",
|
|
30753
|
+
borderStartStartRadius: null,
|
|
30754
|
+
borderStartEndRadius: null,
|
|
30755
|
+
borderEndStartRadius: null,
|
|
30756
|
+
borderEndEndRadius: null,
|
|
30757
|
+
borderTopLeftRadius: null,
|
|
30758
|
+
borderTopRightRadius: null,
|
|
30759
|
+
borderBottomLeftRadius: null,
|
|
30760
|
+
borderBottomRightRadius: null,
|
|
30761
|
+
padding: "mlyc7ga6q",
|
|
30762
|
+
paddingInline: null,
|
|
30763
|
+
paddingStart: null,
|
|
30764
|
+
paddingLeft: null,
|
|
30765
|
+
paddingEnd: null,
|
|
30766
|
+
paddingRight: null,
|
|
30767
|
+
paddingBlock: null,
|
|
30768
|
+
paddingTop: null,
|
|
30769
|
+
paddingBottom: null,
|
|
30770
|
+
display: "mly78zum5",
|
|
30771
|
+
flexDirection: "mlydt5ytf",
|
|
30772
|
+
gap: "mly167g77z",
|
|
30773
|
+
rowGap: null,
|
|
30774
|
+
columnGap: null,
|
|
30775
|
+
$$css: true
|
|
30776
|
+
}
|
|
30777
|
+
};
|
|
30778
|
+
function InfoHover({
|
|
30779
|
+
info
|
|
30780
|
+
}) {
|
|
30781
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(Root3$1, {
|
|
30782
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$4, {
|
|
30783
|
+
asChild: true,
|
|
30784
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30785
|
+
..._stylex.props(styles$s.infoTrigger, fontStyles.body),
|
|
30786
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
30787
|
+
name: "info",
|
|
30788
|
+
color: "disabled"
|
|
30789
|
+
})
|
|
30790
|
+
})
|
|
30791
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
|
|
30792
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Content2$4, {
|
|
30793
|
+
side: "right",
|
|
30794
|
+
align: "start",
|
|
30795
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(HoverCard, {
|
|
30796
|
+
customStyle: styles$s.card,
|
|
30797
|
+
children: info
|
|
30798
|
+
})
|
|
30799
|
+
})
|
|
30800
|
+
})]
|
|
30801
|
+
});
|
|
30802
|
+
}
|
|
30803
|
+
function useClickOutside(refOrRefs, handler) {
|
|
30804
|
+
React.useEffect(() => {
|
|
30805
|
+
const refs = Array.isArray(refOrRefs) ? refOrRefs : [refOrRefs];
|
|
30806
|
+
let down = false;
|
|
30807
|
+
const isInOneElement = (ref, event) => {
|
|
30808
|
+
return !ref.current || event.target instanceof Element && ref.current.contains(event.target);
|
|
30809
|
+
};
|
|
30810
|
+
const isInElement = (event) => {
|
|
30811
|
+
return refs.some((ref) => isInOneElement(ref, event));
|
|
30812
|
+
};
|
|
30813
|
+
const onMouseUp = (event) => {
|
|
30814
|
+
if (!down || isInElement(event)) return;
|
|
30815
|
+
handler(event);
|
|
30816
|
+
down = false;
|
|
30817
|
+
};
|
|
30818
|
+
const onMouseDown = (event) => {
|
|
30819
|
+
if (isInElement(event)) return;
|
|
30820
|
+
down = true;
|
|
30821
|
+
};
|
|
30822
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
30823
|
+
document.addEventListener("mousedown", onMouseDown);
|
|
30824
|
+
return () => {
|
|
30825
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
30826
|
+
document.removeEventListener("mousedown", onMouseDown);
|
|
30827
|
+
};
|
|
30828
|
+
}, [refOrRefs, handler]);
|
|
30829
|
+
}
|
|
30830
|
+
const PillInput = ({
|
|
30831
|
+
values,
|
|
30832
|
+
setValues,
|
|
30833
|
+
autoFocus,
|
|
30834
|
+
placeholder,
|
|
30835
|
+
type = "text",
|
|
30836
|
+
value: controlledValue,
|
|
30837
|
+
setValue: setControlledValue,
|
|
30838
|
+
focusElement,
|
|
30839
|
+
color = DEFAULT_TOKEN_COLOR,
|
|
30840
|
+
customStyle
|
|
30841
|
+
}) => {
|
|
30842
|
+
const [uncontrolledValue, setUncontrolledValue] = React.useState("");
|
|
30843
|
+
const [_focused, setFocused] = React.useState(false);
|
|
30844
|
+
const inp = React.useRef(null);
|
|
30845
|
+
const ref = React.useRef(null);
|
|
30846
|
+
const [selectedPill, setSelectedPill] = React.useState(void 0);
|
|
30847
|
+
const pillRefs = React.useRef([]);
|
|
30848
|
+
const value = controlledValue || uncontrolledValue;
|
|
30849
|
+
const setValue = setControlledValue || setUncontrolledValue;
|
|
30850
|
+
const deletePill = React.useCallback((idx) => {
|
|
30851
|
+
var _a2;
|
|
30852
|
+
const newValues = [...values];
|
|
30853
|
+
newValues.splice(idx, 1);
|
|
30854
|
+
setValues(newValues);
|
|
30855
|
+
if (selectedPill === 0) {
|
|
30856
|
+
if (values.length === 1) {
|
|
30857
|
+
setSelectedPill(void 0);
|
|
30858
|
+
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30859
|
+
} else {
|
|
30860
|
+
setSelectedPill(0);
|
|
30861
|
+
}
|
|
30862
|
+
} else {
|
|
30863
|
+
setSelectedPill(idx - 1);
|
|
30864
|
+
}
|
|
30865
|
+
}, [selectedPill, setValues, values]);
|
|
30866
|
+
const pills = React.useMemo(() => {
|
|
30867
|
+
pillRefs.current = new Array(values.length);
|
|
30868
|
+
return values.map((value2, index2) => /* @__PURE__ */ jsxRuntime.jsx(Pill, {
|
|
30869
|
+
color,
|
|
30870
|
+
onClick: () => {
|
|
30871
|
+
setSelectedPill(index2);
|
|
30872
|
+
},
|
|
30873
|
+
onDelete: () => deletePill(index2),
|
|
30874
|
+
forwardRef: (ref2) => {
|
|
30875
|
+
pillRefs.current[index2] = ref2;
|
|
30876
|
+
},
|
|
30877
|
+
children: value2
|
|
30878
|
+
}, value2));
|
|
30879
|
+
}, [color, deletePill, values]);
|
|
30880
|
+
React.useEffect(() => {
|
|
30881
|
+
var _a2;
|
|
30882
|
+
if (selectedPill !== void 0) {
|
|
30883
|
+
(_a2 = pillRefs.current[selectedPill]) == null ? void 0 : _a2.focus();
|
|
30884
|
+
}
|
|
30885
|
+
}, [pills, selectedPill]);
|
|
30886
|
+
const onKeyUp = (event) => {
|
|
30887
|
+
var _a2, _b2;
|
|
30888
|
+
if (event.key === "Backspace") {
|
|
30889
|
+
if (selectedPill !== void 0) {
|
|
30890
|
+
deletePill(selectedPill);
|
|
30891
|
+
}
|
|
30892
|
+
} else if (event.key === "ArrowRight") {
|
|
30893
|
+
if (selectedPill === values.length - 1) {
|
|
30894
|
+
setSelectedPill(void 0);
|
|
30895
|
+
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30896
|
+
} else if (selectedPill !== void 0) {
|
|
30897
|
+
setSelectedPill(selectedPill + 1);
|
|
30898
|
+
}
|
|
30899
|
+
} else if (event.key === "ArrowLeft") {
|
|
30900
|
+
if (selectedPill !== void 0 && selectedPill > 0) {
|
|
30901
|
+
setSelectedPill(selectedPill - 1);
|
|
30902
|
+
}
|
|
30903
|
+
} else {
|
|
30904
|
+
(_b2 = inp.current) == null ? void 0 : _b2.focus();
|
|
30905
|
+
}
|
|
30906
|
+
};
|
|
30907
|
+
const commitValue = () => {
|
|
30908
|
+
if (value.length > 0 && !values.includes(value)) {
|
|
30909
|
+
setValues([...values, value]);
|
|
30910
|
+
setValue("");
|
|
30911
|
+
}
|
|
30912
|
+
};
|
|
30913
|
+
useClickOutside(focusElement ? [ref, focusElement] : ref, () => {
|
|
30914
|
+
setFocused(false);
|
|
30915
|
+
commitValue();
|
|
30916
|
+
});
|
|
30917
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30918
|
+
..._stylex.props(fontStyles.body, styles$q.main),
|
|
30919
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
30920
|
+
..._stylex.props(styles$q.content, customStyle),
|
|
30921
|
+
onKeyUp,
|
|
30922
|
+
onClick: () => {
|
|
30923
|
+
var _a2;
|
|
30924
|
+
return (_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30925
|
+
},
|
|
30926
|
+
ref,
|
|
30927
|
+
children: [pills, /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
30928
|
+
...{
|
|
30929
|
+
className: "mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2"
|
|
30930
|
+
},
|
|
30931
|
+
ref: inp,
|
|
30932
|
+
type,
|
|
30933
|
+
placeholder: values.length === 0 ? placeholder : "",
|
|
30934
|
+
value,
|
|
30935
|
+
size: 1,
|
|
30936
|
+
onChange: (event) => {
|
|
30937
|
+
setValue(event.target.value);
|
|
30938
|
+
},
|
|
30939
|
+
onKeyDown: (event) => {
|
|
30940
|
+
if (event.key === "Enter") {
|
|
30941
|
+
if (value !== "") {
|
|
30942
|
+
commitValue();
|
|
30943
|
+
event.stopPropagation();
|
|
30944
|
+
event.preventDefault();
|
|
30945
|
+
}
|
|
30946
|
+
}
|
|
30947
|
+
},
|
|
30948
|
+
onKeyUp: (event) => {
|
|
30949
|
+
var _a2, _b2, _c2, _d;
|
|
30950
|
+
if (event.key === "Backspace") {
|
|
30951
|
+
if (value === "" && values.length > 0) {
|
|
30952
|
+
commitValue();
|
|
30953
|
+
(_a2 = inp.current) == null ? void 0 : _a2.blur();
|
|
30954
|
+
setSelectedPill(values.length - 1);
|
|
30955
|
+
}
|
|
30956
|
+
} else if (event.key === "ArrowLeft") {
|
|
30957
|
+
if (((_b2 = inp.current) == null ? void 0 : _b2.selectionStart) === 0 || ((_c2 = inp.current) == null ? void 0 : _c2.selectionStart) === null) {
|
|
30958
|
+
commitValue();
|
|
30959
|
+
(_d = inp.current) == null ? void 0 : _d.blur();
|
|
30960
|
+
setSelectedPill(values.length - 1);
|
|
30961
|
+
event.preventDefault();
|
|
30962
|
+
event.stopPropagation();
|
|
30963
|
+
}
|
|
30964
|
+
}
|
|
30965
|
+
},
|
|
30966
|
+
onFocus: () => {
|
|
30967
|
+
setFocused(true);
|
|
30968
|
+
setSelectedPill(void 0);
|
|
30969
|
+
},
|
|
30970
|
+
autoFocus
|
|
30971
|
+
})]
|
|
30972
|
+
})
|
|
30973
|
+
});
|
|
30974
|
+
};
|
|
30975
|
+
const Pill = ({
|
|
30976
|
+
children,
|
|
30977
|
+
color = DEFAULT_TOKEN_COLOR,
|
|
30978
|
+
forwardRef,
|
|
30979
|
+
onClick,
|
|
30980
|
+
onDelete
|
|
30981
|
+
}) => {
|
|
30982
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
30983
|
+
onClick,
|
|
30984
|
+
tabIndex: 0,
|
|
30985
|
+
ref: forwardRef,
|
|
30986
|
+
..._stylex.props(styles$q.pill, colorVariants[color]),
|
|
30987
|
+
children: [children, /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30988
|
+
title: "Remove",
|
|
30989
|
+
...{
|
|
30990
|
+
className: "mly3nfvp2"
|
|
30991
|
+
},
|
|
30992
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(SvgClear, {
|
|
30993
|
+
onClick: () => onDelete(),
|
|
30994
|
+
...{
|
|
30995
|
+
className: "mly6jxa94 mly1v9usgg"
|
|
30996
|
+
}
|
|
30997
|
+
})
|
|
30998
|
+
})]
|
|
30999
|
+
});
|
|
31000
|
+
};
|
|
31001
|
+
const styles$q = {
|
|
31002
|
+
main: {
|
|
31003
|
+
borderRadius: "mly12oqio5",
|
|
31004
|
+
borderStartStartRadius: null,
|
|
31005
|
+
borderStartEndRadius: null,
|
|
31006
|
+
borderEndStartRadius: null,
|
|
31007
|
+
borderEndEndRadius: null,
|
|
31008
|
+
borderTopLeftRadius: null,
|
|
31009
|
+
borderTopRightRadius: null,
|
|
31010
|
+
borderBottomLeftRadius: null,
|
|
31011
|
+
borderBottomRightRadius: null,
|
|
31012
|
+
border: "mlyvckdp7",
|
|
31013
|
+
borderWidth: null,
|
|
31014
|
+
borderInlineWidth: null,
|
|
31015
|
+
borderInlineStartWidth: null,
|
|
31016
|
+
borderLeftWidth: null,
|
|
31017
|
+
borderInlineEndWidth: null,
|
|
31018
|
+
borderRightWidth: null,
|
|
31019
|
+
borderBlockWidth: null,
|
|
31020
|
+
borderTopWidth: null,
|
|
31021
|
+
borderBottomWidth: null,
|
|
31022
|
+
borderStyle: null,
|
|
31023
|
+
borderInlineStyle: null,
|
|
31024
|
+
borderInlineStartStyle: null,
|
|
31025
|
+
borderLeftStyle: null,
|
|
31026
|
+
borderInlineEndStyle: null,
|
|
31027
|
+
borderRightStyle: null,
|
|
31028
|
+
borderBlockStyle: null,
|
|
31029
|
+
borderTopStyle: null,
|
|
31030
|
+
borderBottomStyle: null,
|
|
31031
|
+
borderColor: null,
|
|
31032
|
+
borderInlineColor: null,
|
|
31033
|
+
borderInlineStartColor: null,
|
|
31034
|
+
borderLeftColor: null,
|
|
31035
|
+
borderInlineEndColor: null,
|
|
31036
|
+
borderRightColor: null,
|
|
31037
|
+
borderBlockColor: null,
|
|
31038
|
+
borderTopColor: null,
|
|
31039
|
+
borderBottomColor: null,
|
|
31040
|
+
padding: "mlybsehbd",
|
|
31041
|
+
paddingInline: null,
|
|
31042
|
+
paddingStart: null,
|
|
31043
|
+
paddingLeft: null,
|
|
31044
|
+
paddingEnd: null,
|
|
31045
|
+
paddingRight: null,
|
|
31046
|
+
paddingBlock: null,
|
|
31047
|
+
paddingTop: null,
|
|
31048
|
+
paddingBottom: null,
|
|
31049
|
+
display: "mlyrvj5dj",
|
|
31050
|
+
minHeight: "mly2lwn1j",
|
|
31051
|
+
overflow: "mlyysyzu8",
|
|
31052
|
+
overflowX: null,
|
|
31053
|
+
overflowY: null,
|
|
31054
|
+
$$css: true
|
|
31055
|
+
},
|
|
31056
|
+
content: {
|
|
31057
|
+
outline: "mly1a2a7pz",
|
|
31058
|
+
outlineColor: null,
|
|
31059
|
+
outlineOffset: null,
|
|
31060
|
+
outlineStyle: null,
|
|
31061
|
+
outlineWidth: null,
|
|
31062
|
+
display: "mly78zum5",
|
|
31063
|
+
flexWrap: "mly1a02dak",
|
|
31064
|
+
gap: "mly1ed6fcf",
|
|
31065
|
+
rowGap: null,
|
|
31066
|
+
columnGap: null,
|
|
31067
|
+
borderColor: "mly1akygb0 mlyetl2wx",
|
|
31068
|
+
borderInlineColor: null,
|
|
31069
|
+
borderInlineStartColor: null,
|
|
31070
|
+
borderLeftColor: null,
|
|
31071
|
+
borderInlineEndColor: null,
|
|
31072
|
+
borderRightColor: null,
|
|
31073
|
+
borderBlockColor: null,
|
|
31074
|
+
borderTopColor: null,
|
|
31075
|
+
borderBottomColor: null,
|
|
31076
|
+
$$css: true
|
|
31077
|
+
},
|
|
31078
|
+
pill: {
|
|
31079
|
+
backgroundColor: "mlyy9rfsq",
|
|
31080
|
+
borderRadius: "mly1sxf85j",
|
|
31081
|
+
borderStartStartRadius: null,
|
|
31082
|
+
borderStartEndRadius: null,
|
|
31083
|
+
borderEndStartRadius: null,
|
|
31084
|
+
borderEndEndRadius: null,
|
|
31085
|
+
borderTopLeftRadius: null,
|
|
31086
|
+
borderTopRightRadius: null,
|
|
31087
|
+
borderBottomLeftRadius: null,
|
|
31088
|
+
borderBottomRightRadius: null,
|
|
31089
|
+
color: "mly1xre2ib",
|
|
31090
|
+
display: "mly78zum5",
|
|
31091
|
+
alignItems: "mly6s0dn4",
|
|
31092
|
+
gap: "mly1nejdyq",
|
|
31093
|
+
rowGap: null,
|
|
31094
|
+
columnGap: null,
|
|
31095
|
+
padding: "mly1e41zw8",
|
|
31096
|
+
paddingInline: null,
|
|
31097
|
+
paddingStart: null,
|
|
31098
|
+
paddingLeft: null,
|
|
31099
|
+
paddingEnd: null,
|
|
31100
|
+
paddingRight: null,
|
|
31101
|
+
paddingBlock: null,
|
|
31102
|
+
paddingTop: null,
|
|
31103
|
+
paddingBottom: null,
|
|
31104
|
+
textTransform: "mly6mezaz",
|
|
31105
|
+
cursor: "mly1ypdohk",
|
|
31106
|
+
height: "mly1qx5ct2",
|
|
31107
|
+
whiteSpace: "mlyuxw1ft",
|
|
31108
|
+
$$css: true
|
|
31109
|
+
}
|
|
31110
|
+
};
|
|
31111
|
+
const colorVariants = {
|
|
31112
|
+
default: {
|
|
31113
|
+
"--mlyvygx4q": "mly1izbou4",
|
|
31114
|
+
"--mly13n7235": "mly8bgh0r",
|
|
31115
|
+
$$css: true
|
|
31116
|
+
},
|
|
31117
|
+
purple: {
|
|
31118
|
+
"--mlyvygx4q": "mly1f8soc4",
|
|
31119
|
+
"--mly13n7235": "mly1r5zvhd",
|
|
31120
|
+
$$css: true
|
|
31121
|
+
},
|
|
31122
|
+
green: {
|
|
31123
|
+
"--mlyvygx4q": "mlyf8wvcd",
|
|
31124
|
+
"--mly13n7235": "mly1u6t2w6",
|
|
31125
|
+
$$css: true
|
|
31126
|
+
},
|
|
31127
|
+
cyan: {
|
|
31128
|
+
"--mlyvygx4q": "mlyrtwgpv",
|
|
31129
|
+
"--mly13n7235": "mlys5r2en",
|
|
31130
|
+
$$css: true
|
|
31131
|
+
}
|
|
31132
|
+
};
|
|
31133
|
+
function OneOfEditor({
|
|
31134
|
+
view,
|
|
31135
|
+
name,
|
|
31136
|
+
path,
|
|
31137
|
+
current,
|
|
31138
|
+
option: option2,
|
|
31139
|
+
updateCurrent
|
|
31140
|
+
}) {
|
|
31141
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31142
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31143
|
+
..._stylex.props(styles$s.label, styles$s.left),
|
|
31144
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
31145
|
+
children: [option2.title ?? name, ":"]
|
|
31146
|
+
})
|
|
31147
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {}), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31148
|
+
info: option2.description
|
|
31149
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {}), option2.oneOf.map((subOption, key2) => {
|
|
31150
|
+
switch (subOption.type) {
|
|
31151
|
+
case "string":
|
|
31152
|
+
return /* @__PURE__ */ jsxRuntime.jsx(OneOfStringEditor, {
|
|
31153
|
+
view,
|
|
31154
|
+
name,
|
|
31155
|
+
path,
|
|
31156
|
+
updateCurrent,
|
|
31157
|
+
current,
|
|
31158
|
+
option: subOption
|
|
31159
|
+
}, key2);
|
|
31160
|
+
case "number":
|
|
31161
|
+
return /* @__PURE__ */ jsxRuntime.jsx(OneOfNumberEditor, {
|
|
31162
|
+
view,
|
|
31163
|
+
name,
|
|
31164
|
+
path,
|
|
31165
|
+
updateCurrent,
|
|
31166
|
+
current,
|
|
31167
|
+
option: subOption
|
|
31168
|
+
}, key2);
|
|
31169
|
+
case "array":
|
|
31170
|
+
return /* @__PURE__ */ jsxRuntime.jsx(OneOfArrayEditor, {
|
|
31171
|
+
view,
|
|
31172
|
+
name,
|
|
31173
|
+
path,
|
|
31174
|
+
updateCurrent,
|
|
31175
|
+
current,
|
|
31176
|
+
option: subOption
|
|
31177
|
+
}, key2);
|
|
31178
|
+
}
|
|
31179
|
+
return null;
|
|
31180
|
+
})]
|
|
31181
|
+
});
|
|
31182
|
+
}
|
|
31183
|
+
function OneOfStringEditor({
|
|
31184
|
+
path,
|
|
31185
|
+
current,
|
|
31186
|
+
updateCurrent,
|
|
31187
|
+
option: option2
|
|
31188
|
+
}) {
|
|
31189
|
+
const isString2 = typeof current === "string";
|
|
31190
|
+
const [value, setValue] = React.useState(isString2 ? current : "");
|
|
31191
|
+
if (option2.enum) {
|
|
31192
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31193
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31194
|
+
..._stylex.props(styles$s.left),
|
|
31195
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31196
|
+
type: "radio",
|
|
31197
|
+
checked: isString2 && option2.enum.includes(current),
|
|
31198
|
+
onChange: ({
|
|
31199
|
+
target: {
|
|
31200
|
+
checked
|
|
31201
|
+
}
|
|
31202
|
+
}) => {
|
|
31203
|
+
if (checked) {
|
|
31204
|
+
updateCurrent(path, value);
|
|
31205
|
+
}
|
|
31206
|
+
}
|
|
31207
|
+
})
|
|
31208
|
+
}), option2.enum.length > 1 ? /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
|
|
31209
|
+
value,
|
|
31210
|
+
options: option2.enum.map((value2) => ({
|
|
31211
|
+
label: value2,
|
|
31212
|
+
value: value2
|
|
31213
|
+
})),
|
|
31214
|
+
onChange: (value2) => {
|
|
31215
|
+
setValue(value2);
|
|
31216
|
+
updateCurrent(path, value2);
|
|
31217
|
+
}
|
|
31218
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31219
|
+
children: option2.enum[0]
|
|
31220
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31221
|
+
});
|
|
31222
|
+
} else {
|
|
31223
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31224
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31225
|
+
..._stylex.props(styles$s.left),
|
|
31226
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31227
|
+
type: "radio",
|
|
31228
|
+
checked: isString2,
|
|
31229
|
+
onChange: ({
|
|
31230
|
+
target: {
|
|
31231
|
+
checked
|
|
31232
|
+
}
|
|
31233
|
+
}) => {
|
|
31234
|
+
if (checked) {
|
|
31235
|
+
updateCurrent(path, value);
|
|
31236
|
+
}
|
|
31237
|
+
}
|
|
31238
|
+
})
|
|
31239
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31240
|
+
value,
|
|
31241
|
+
onChange: ({
|
|
31242
|
+
target: {
|
|
31243
|
+
value: value2
|
|
31244
|
+
}
|
|
31245
|
+
}) => {
|
|
31246
|
+
setValue(value2);
|
|
31247
|
+
updateCurrent(path, value2);
|
|
31248
|
+
}
|
|
31249
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31250
|
+
});
|
|
31251
|
+
}
|
|
31252
|
+
}
|
|
31253
|
+
function OneOfNumberEditor({
|
|
31254
|
+
path,
|
|
31255
|
+
current,
|
|
31256
|
+
updateCurrent,
|
|
31257
|
+
option: option2
|
|
31258
|
+
}) {
|
|
31259
|
+
const isNumber2 = typeof current === "number";
|
|
31260
|
+
const [value, setValue] = React.useState(isNumber2 ? current : option2.minimum ?? 0);
|
|
31261
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31262
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31263
|
+
..._stylex.props(styles$s.left),
|
|
31264
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31265
|
+
type: "radio",
|
|
31266
|
+
checked: isNumber2,
|
|
31267
|
+
onChange: ({
|
|
31268
|
+
target: {
|
|
31269
|
+
checked
|
|
31270
|
+
}
|
|
31271
|
+
}) => {
|
|
31272
|
+
if (checked) {
|
|
31273
|
+
updateCurrent(path, value);
|
|
31274
|
+
}
|
|
31275
|
+
}
|
|
31276
|
+
})
|
|
31277
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31278
|
+
type: "number",
|
|
31279
|
+
min: option2.minimum,
|
|
31280
|
+
max: option2.maximum,
|
|
31281
|
+
value,
|
|
31282
|
+
onChange: ({
|
|
31283
|
+
target: {
|
|
31284
|
+
valueAsNumber
|
|
31285
|
+
}
|
|
31286
|
+
}) => {
|
|
31287
|
+
setValue(value);
|
|
31288
|
+
updateCurrent(path, valueAsNumber);
|
|
31289
|
+
},
|
|
31290
|
+
..._stylex.props(styles$s.input)
|
|
31291
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31292
|
+
});
|
|
31293
|
+
}
|
|
31294
|
+
function OneOfArrayEditor({
|
|
31295
|
+
path,
|
|
31296
|
+
current,
|
|
31297
|
+
updateCurrent
|
|
31298
|
+
}) {
|
|
31299
|
+
const isArray2 = Array.isArray(current);
|
|
31300
|
+
const [value, setValue] = React.useState(isArray2 ? current : []);
|
|
31301
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31302
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31303
|
+
..._stylex.props(styles$s.left),
|
|
31304
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31305
|
+
type: "radio",
|
|
31306
|
+
checked: isArray2,
|
|
31307
|
+
onChange: ({
|
|
31308
|
+
target: {
|
|
31309
|
+
checked
|
|
31310
|
+
}
|
|
31311
|
+
}) => {
|
|
31312
|
+
if (checked) {
|
|
31313
|
+
updateCurrent(path, value);
|
|
31314
|
+
}
|
|
31315
|
+
}
|
|
31316
|
+
})
|
|
31317
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(PillInput, {
|
|
31318
|
+
values: value,
|
|
31319
|
+
setValues: (values) => {
|
|
31320
|
+
setValue(values);
|
|
31321
|
+
updateCurrent(path, values);
|
|
31322
|
+
}
|
|
31323
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31324
|
+
});
|
|
31325
|
+
}
|
|
31326
|
+
function ArrayEditor({
|
|
31327
|
+
name,
|
|
31328
|
+
path,
|
|
31329
|
+
current,
|
|
31330
|
+
option: option2,
|
|
31331
|
+
updateCurrent
|
|
31332
|
+
}) {
|
|
31333
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31334
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31335
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31336
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
31337
|
+
children: [option2.title ?? name, ":"]
|
|
31338
|
+
})
|
|
31339
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(PillInput, {
|
|
31340
|
+
values: current,
|
|
31341
|
+
setValues: (values) => {
|
|
31342
|
+
updateCurrent(path, values);
|
|
31343
|
+
}
|
|
31344
|
+
}), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31345
|
+
info: option2.description
|
|
31346
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31347
|
+
});
|
|
31348
|
+
}
|
|
31349
|
+
function NumberEditor$1({
|
|
31350
|
+
name,
|
|
31351
|
+
path,
|
|
31352
|
+
current,
|
|
31353
|
+
option: option2,
|
|
31354
|
+
updateCurrent
|
|
31355
|
+
}) {
|
|
31356
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31357
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31358
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31359
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
31360
|
+
children: [option2.title ?? name, ":"]
|
|
31361
|
+
})
|
|
31362
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31363
|
+
value: current,
|
|
31364
|
+
type: "number",
|
|
31365
|
+
min: option2.minimum,
|
|
31366
|
+
max: option2.maximum,
|
|
31367
|
+
onChange: ({
|
|
31368
|
+
target: {
|
|
31369
|
+
valueAsNumber
|
|
31370
|
+
}
|
|
31371
|
+
}) => {
|
|
31372
|
+
updateCurrent(path, valueAsNumber);
|
|
31373
|
+
},
|
|
31374
|
+
..._stylex.props(styles$s.input)
|
|
31375
|
+
}, name), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31376
|
+
info: option2.description
|
|
31377
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31378
|
+
});
|
|
31379
|
+
}
|
|
31380
|
+
function StringEditor$1({
|
|
31381
|
+
name,
|
|
31382
|
+
path,
|
|
31383
|
+
current,
|
|
31384
|
+
option: option2,
|
|
31385
|
+
updateCurrent
|
|
31386
|
+
}) {
|
|
31387
|
+
if (option2.enum) {
|
|
31388
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31389
|
+
children: [/* @__PURE__ */ React.createElement("div", {
|
|
31390
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31391
|
+
key: `${name}-label`
|
|
31392
|
+
}, /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
31393
|
+
children: [option2.title ?? name, ":"]
|
|
31394
|
+
})), /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
|
|
31395
|
+
value: current,
|
|
31396
|
+
options: option2.enum.map((value) => ({
|
|
31397
|
+
label: value,
|
|
31398
|
+
value
|
|
31399
|
+
})),
|
|
31400
|
+
onChange: (value) => {
|
|
31401
|
+
updateCurrent(path, value);
|
|
31402
|
+
}
|
|
31403
|
+
}, name), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31404
|
+
info: option2.description
|
|
31405
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31406
|
+
});
|
|
31407
|
+
} else {
|
|
31408
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31409
|
+
children: [/* @__PURE__ */ React.createElement("div", {
|
|
31410
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31411
|
+
key: `${name}-label`
|
|
31412
|
+
}, /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
31413
|
+
children: [option2.title ?? name, ":"]
|
|
31414
|
+
})), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31415
|
+
value: current,
|
|
31416
|
+
onChange: ({
|
|
31417
|
+
target: {
|
|
31418
|
+
value
|
|
31419
|
+
}
|
|
31420
|
+
}) => {
|
|
31421
|
+
updateCurrent(path, value);
|
|
31422
|
+
}
|
|
31423
|
+
}, name), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31424
|
+
info: option2.description
|
|
31425
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31426
|
+
});
|
|
31427
|
+
}
|
|
31428
|
+
}
|
|
31429
|
+
function BooleanEditor({
|
|
31430
|
+
name,
|
|
31431
|
+
path,
|
|
31432
|
+
current,
|
|
31433
|
+
option: option2,
|
|
31434
|
+
updateCurrent
|
|
31435
|
+
}) {
|
|
31436
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31437
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31438
|
+
..._stylex.props(styles$s.left),
|
|
31439
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
31440
|
+
..._stylex.props(styles$s.label),
|
|
31441
|
+
htmlFor: `${name}-checkbox`,
|
|
31442
|
+
children: [option2.title ?? name, ":"]
|
|
31443
|
+
}, `${name}-label`)
|
|
31444
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31445
|
+
..._stylex.props(styles$s.right),
|
|
31446
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31447
|
+
type: "checkbox",
|
|
31448
|
+
checked: current,
|
|
31449
|
+
onChange: ({
|
|
31450
|
+
target: {
|
|
31451
|
+
checked
|
|
31452
|
+
}
|
|
31453
|
+
}) => {
|
|
31454
|
+
updateCurrent(path, checked);
|
|
31455
|
+
},
|
|
31456
|
+
id: `${name}-checkbox`
|
|
31457
|
+
})
|
|
31458
|
+
}), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31459
|
+
info: option2.description
|
|
31460
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31461
|
+
});
|
|
31462
|
+
}
|
|
31463
|
+
function FieldEditor({
|
|
31464
|
+
view,
|
|
31465
|
+
name,
|
|
31466
|
+
path,
|
|
31467
|
+
current,
|
|
31468
|
+
option: option2,
|
|
31469
|
+
updateCurrent
|
|
31470
|
+
}) {
|
|
31471
|
+
const [searchValue, setSearchValue] = React.useState("");
|
|
31472
|
+
const valueListRef = React.useRef(null);
|
|
31473
|
+
const jsonFields = current ?? [];
|
|
31474
|
+
const fields = jsonFields.map((field) => {
|
|
31475
|
+
try {
|
|
31476
|
+
return JSON.parse(field)[0];
|
|
31477
|
+
} catch (e) {
|
|
31478
|
+
console.warn("Failed to parse field", field, e);
|
|
31479
|
+
return "";
|
|
31480
|
+
}
|
|
31481
|
+
});
|
|
31482
|
+
const updateFields = (path2, value) => {
|
|
31483
|
+
const jsonFields2 = value.map((field) => JSON.stringify([field]));
|
|
31484
|
+
updateCurrent(path2, jsonFields2);
|
|
31485
|
+
};
|
|
31486
|
+
const lcSearch = searchValue.toLocaleLowerCase();
|
|
31487
|
+
const dimensions = view.definition.getOutputSchema().fields;
|
|
31488
|
+
const filteredFields = dimensions.filter((field) => field.name.toLocaleLowerCase().includes(lcSearch)).filter((field) => !fields.includes(field.name)).filter((field) => {
|
|
31489
|
+
var _a2;
|
|
31490
|
+
return !("fieldTypes" in option2.items) || ((_a2 = option2.items.fieldTypes) == null ? void 0 : _a2.includes(field.type.kind));
|
|
31491
|
+
});
|
|
31492
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31493
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31494
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31495
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
|
|
31496
|
+
children: [option2.title ?? name, ":"]
|
|
31497
|
+
})
|
|
31498
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31499
|
+
style: {
|
|
31500
|
+
minHeight: 0,
|
|
31501
|
+
display: "grid",
|
|
31502
|
+
gap: 4
|
|
31503
|
+
},
|
|
31504
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(PillInput, {
|
|
31505
|
+
values: fields,
|
|
31506
|
+
setValues: (values) => {
|
|
31507
|
+
updateFields(path, values);
|
|
31508
|
+
},
|
|
31509
|
+
value: searchValue,
|
|
31510
|
+
setValue: setSearchValue,
|
|
31511
|
+
focusElement: valueListRef
|
|
31512
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(FieldList$1, {
|
|
31513
|
+
ref: valueListRef,
|
|
31514
|
+
fields: filteredFields,
|
|
31515
|
+
search: searchValue,
|
|
31516
|
+
onClick: (value) => {
|
|
31517
|
+
updateFields(path, [...fields, value]);
|
|
31518
|
+
}
|
|
31519
|
+
})]
|
|
31520
|
+
}), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31521
|
+
info: option2.description
|
|
31522
|
+
}) : /* @__PURE__ */ jsxRuntime.jsx("div", {})]
|
|
31523
|
+
});
|
|
31524
|
+
}
|
|
31525
|
+
function FieldList$1({
|
|
31526
|
+
ref,
|
|
31527
|
+
fields,
|
|
31528
|
+
search,
|
|
31529
|
+
onClick
|
|
31530
|
+
}) {
|
|
31531
|
+
if (fields.length) {
|
|
31532
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31533
|
+
ref,
|
|
31534
|
+
...{
|
|
31535
|
+
className: "mly78zum5 mly1a02dak mly1jnr06f"
|
|
31536
|
+
},
|
|
31537
|
+
children: fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx(FieldToken, {
|
|
31538
|
+
field,
|
|
31539
|
+
onClick: () => onClick(field.name),
|
|
31540
|
+
tooltip: /* @__PURE__ */ jsxRuntime.jsx(FieldHoverCard, {
|
|
31541
|
+
field,
|
|
31542
|
+
path: []
|
|
31543
|
+
}),
|
|
31544
|
+
tooltipProps: {
|
|
31545
|
+
side: "right",
|
|
31546
|
+
align: "start",
|
|
31547
|
+
sideOffset: 4,
|
|
31548
|
+
alignOffset: 24
|
|
31549
|
+
}
|
|
31550
|
+
}, field.name))
|
|
31551
|
+
});
|
|
31552
|
+
} else {
|
|
31553
|
+
if (search) {
|
|
31554
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31555
|
+
...{},
|
|
31556
|
+
"data-disabled": "true",
|
|
31557
|
+
children: "No matching fields"
|
|
31558
|
+
});
|
|
31559
|
+
}
|
|
31560
|
+
}
|
|
31561
|
+
}
|
|
31562
|
+
function ObjectEditor({
|
|
31563
|
+
view,
|
|
31564
|
+
name,
|
|
31565
|
+
path,
|
|
31566
|
+
current,
|
|
31567
|
+
option: option2,
|
|
31568
|
+
updateCurrent
|
|
31569
|
+
}) {
|
|
31570
|
+
const [isExpanded, setIsExpanded] = React.useState(path.length === 0);
|
|
31571
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31572
|
+
children: [name ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
31573
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31574
|
+
..._stylex.props(styles$s.label, styles$s.heading),
|
|
31575
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("label", {
|
|
31576
|
+
children: option2.title ?? name
|
|
31577
|
+
}), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
|
|
31578
|
+
info: option2.description
|
|
31579
|
+
}) : null]
|
|
31580
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
31581
|
+
variant: "flat",
|
|
31582
|
+
size: "compact",
|
|
31583
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
31584
|
+
icon: isExpanded ? "chevronDown" : "chevronRight",
|
|
31585
|
+
tooltip: isExpanded ? "Collapse" : "Expand"
|
|
31586
|
+
})]
|
|
31587
|
+
}) : null, isExpanded ? Object.entries(option2.properties).map(([subName, subOption]) => {
|
|
31588
|
+
const key2 = [...path, name, subName].join(".");
|
|
31589
|
+
if (subOption.type === "boolean") {
|
|
31590
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BooleanEditor, {
|
|
31591
|
+
view,
|
|
31592
|
+
name: subName,
|
|
31593
|
+
path: [...path, subName],
|
|
31594
|
+
option: subOption,
|
|
31595
|
+
current: current[subName],
|
|
31596
|
+
updateCurrent
|
|
31597
|
+
}, key2);
|
|
31598
|
+
} else if (subOption.type === "string") {
|
|
31599
|
+
return /* @__PURE__ */ jsxRuntime.jsx(StringEditor$1, {
|
|
31600
|
+
view,
|
|
31601
|
+
name: subName,
|
|
31602
|
+
path: [...path, subName],
|
|
31603
|
+
option: subOption,
|
|
31604
|
+
current: current[subName],
|
|
31605
|
+
updateCurrent
|
|
31606
|
+
}, key2);
|
|
31607
|
+
} else if (subOption.type === "number") {
|
|
31608
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NumberEditor$1, {
|
|
31609
|
+
view,
|
|
31610
|
+
name: subName,
|
|
31611
|
+
path: [...path, subName],
|
|
31612
|
+
option: subOption,
|
|
31613
|
+
current: current[subName],
|
|
31614
|
+
updateCurrent
|
|
31615
|
+
}, key2);
|
|
31616
|
+
} else if (subOption.type === "object") {
|
|
31617
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ObjectEditor, {
|
|
31618
|
+
view,
|
|
31619
|
+
name: subName,
|
|
31620
|
+
path: [...path, subName],
|
|
31621
|
+
option: subOption,
|
|
31622
|
+
current: current[subName] ?? {},
|
|
31623
|
+
updateCurrent
|
|
31624
|
+
}, key2);
|
|
31625
|
+
} else if (subOption.type === "array") {
|
|
31626
|
+
if (subOption.items.type === "string") {
|
|
31627
|
+
if ("subtype" in subOption.items && subOption.items.subtype === "field") {
|
|
31628
|
+
return /* @__PURE__ */ jsxRuntime.jsx(FieldEditor, {
|
|
31629
|
+
view,
|
|
31630
|
+
name: subName,
|
|
31631
|
+
path: [...path, subName],
|
|
31632
|
+
option: subOption,
|
|
31633
|
+
current: current[subName] ?? [],
|
|
31634
|
+
updateCurrent
|
|
31635
|
+
}, key2);
|
|
31636
|
+
} else {
|
|
31637
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ArrayEditor, {
|
|
31638
|
+
view,
|
|
31639
|
+
name: subName,
|
|
31640
|
+
path: [...path, subName],
|
|
31641
|
+
option: subOption,
|
|
31642
|
+
current: current[subName] ?? [],
|
|
31643
|
+
updateCurrent
|
|
31644
|
+
}, key2);
|
|
31645
|
+
}
|
|
31646
|
+
} else {
|
|
31647
|
+
console.warn("Unsupported array type", subOption.items.type);
|
|
31648
|
+
}
|
|
31649
|
+
} else if (subOption.type === "oneOf") {
|
|
31650
|
+
return /* @__PURE__ */ jsxRuntime.jsx(OneOfEditor, {
|
|
31651
|
+
view,
|
|
31652
|
+
name: subName,
|
|
31653
|
+
path: [...path, subName],
|
|
31654
|
+
option: subOption,
|
|
31655
|
+
current: current[subName],
|
|
31656
|
+
updateCurrent
|
|
31657
|
+
}, key2);
|
|
31658
|
+
}
|
|
31659
|
+
return null;
|
|
31660
|
+
}) : null, /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31661
|
+
..._stylex.props(styles$s.divider)
|
|
31662
|
+
})]
|
|
31663
|
+
});
|
|
31664
|
+
}
|
|
31665
|
+
function VizEditor({
|
|
31666
|
+
rootQuery,
|
|
31667
|
+
view,
|
|
31668
|
+
plugin,
|
|
31669
|
+
setOpen
|
|
31670
|
+
}) {
|
|
31671
|
+
const {
|
|
31672
|
+
setQuery
|
|
31673
|
+
} = React.useContext(QueryEditorContext);
|
|
31674
|
+
const [current, setCurrent] = React.useState(plugin.getSettings());
|
|
31675
|
+
console.info("RendererEditor current settings:", current);
|
|
31676
|
+
const schema = plugin.getSchema();
|
|
31677
|
+
const updateCurrent = (path, value) => {
|
|
31678
|
+
const newCurrent = {
|
|
31679
|
+
...current
|
|
31680
|
+
};
|
|
31681
|
+
let target = newCurrent;
|
|
31682
|
+
for (let i2 = 0; i2 < path.length - 1; i2++) {
|
|
31683
|
+
if (!(path[i2] in target)) {
|
|
31684
|
+
target[path[i2]] = {};
|
|
31685
|
+
}
|
|
31686
|
+
target = target[path[i2]];
|
|
31687
|
+
}
|
|
31688
|
+
target[path[path.length - 1]] = value;
|
|
31689
|
+
setCurrent(newCurrent);
|
|
31690
|
+
};
|
|
31691
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31692
|
+
..._stylex.props(styles$s.editor),
|
|
31693
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31694
|
+
..._stylex.props(styles$s.editorGrid),
|
|
31695
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ObjectEditor, {
|
|
31696
|
+
view,
|
|
31697
|
+
name: "",
|
|
31698
|
+
path: [],
|
|
31699
|
+
option: schema,
|
|
31700
|
+
current,
|
|
31701
|
+
updateCurrent
|
|
31702
|
+
})
|
|
31703
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31704
|
+
..._stylex.props(styles$s.editorRow),
|
|
31705
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
31706
|
+
label: "Cancel",
|
|
31707
|
+
onClick: () => {
|
|
31708
|
+
setOpen(false);
|
|
31709
|
+
},
|
|
31710
|
+
customStyle: styles$s.editorCell
|
|
31711
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
31712
|
+
variant: "primary",
|
|
31713
|
+
label: "Apply",
|
|
31714
|
+
onClick: () => {
|
|
31715
|
+
const tag = plugin.settingsToTag(current);
|
|
31716
|
+
const value = tag.toString();
|
|
31717
|
+
const annotations = view.getOrAddAnnotations();
|
|
31718
|
+
const old = annotations.items.find((annotation) => annotation.value.startsWith(RENDERER_PREFIX + "viz"));
|
|
31719
|
+
if (old) {
|
|
31720
|
+
annotations.remove(old);
|
|
31721
|
+
}
|
|
31722
|
+
view.getOrAddAnnotations().add(new QB.ASTAnnotation({
|
|
31723
|
+
value
|
|
31724
|
+
}));
|
|
31725
|
+
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
31726
|
+
setOpen(false);
|
|
31727
|
+
},
|
|
31728
|
+
customStyle: styles$s.editorCell
|
|
31729
|
+
})]
|
|
31730
|
+
})]
|
|
31731
|
+
});
|
|
31732
|
+
}
|
|
31733
|
+
const dialogStyles = {
|
|
31734
|
+
displayNone: {
|
|
31735
|
+
display: "mly1s85apg",
|
|
31736
|
+
$$css: true
|
|
31737
|
+
},
|
|
31738
|
+
overlay: {
|
|
31739
|
+
background: "mly5uxqc1",
|
|
31740
|
+
backgroundAttachment: null,
|
|
31741
|
+
backgroundClip: null,
|
|
31742
|
+
backgroundColor: null,
|
|
31743
|
+
backgroundImage: null,
|
|
31744
|
+
backgroundOrigin: null,
|
|
31745
|
+
backgroundPosition: null,
|
|
31746
|
+
backgroundPositionX: null,
|
|
31747
|
+
backgroundPositionY: null,
|
|
31748
|
+
backgroundRepeat: null,
|
|
31749
|
+
backgroundSize: null,
|
|
31750
|
+
position: "mlyixxii4",
|
|
31751
|
+
top: "mly13vifvy",
|
|
31752
|
+
left: "mlyu96u03",
|
|
31753
|
+
right: "mly3m8u43",
|
|
31754
|
+
insetInlineStart: null,
|
|
31755
|
+
insetInlineEnd: null,
|
|
31756
|
+
bottom: "mly1ey2m1c",
|
|
31757
|
+
display: "mlyrvj5dj",
|
|
31758
|
+
placeItems: "mly1ku5rj1",
|
|
31759
|
+
alignItems: null,
|
|
31760
|
+
justifyItems: null,
|
|
31761
|
+
zIndex: "mly11uqc5h",
|
|
31762
|
+
$$css: true
|
|
31763
|
+
},
|
|
31764
|
+
title: {
|
|
31765
|
+
fontSize: "mly1j61zf2",
|
|
31766
|
+
margin: "mly1ghz6dp",
|
|
31767
|
+
marginInline: null,
|
|
31768
|
+
marginInlineStart: null,
|
|
31769
|
+
marginLeft: null,
|
|
31770
|
+
marginInlineEnd: null,
|
|
31771
|
+
marginRight: null,
|
|
31772
|
+
marginBlock: null,
|
|
31773
|
+
marginTop: null,
|
|
31774
|
+
marginBottom: null,
|
|
31775
|
+
display: "mly78zum5",
|
|
31776
|
+
justifyContent: "mly1qughib",
|
|
31777
|
+
alignItems: "mly6s0dn4",
|
|
31778
|
+
borderBottom: "mlyllpv0l",
|
|
31779
|
+
borderBottomWidth: null,
|
|
31780
|
+
borderBottomStyle: null,
|
|
31781
|
+
borderBottomColor: null,
|
|
31782
|
+
lineHeight: "mly1rl49lg",
|
|
31783
|
+
$$css: true
|
|
31784
|
+
},
|
|
31785
|
+
close: {
|
|
31786
|
+
border: "mly1gs6z28",
|
|
31787
|
+
borderWidth: null,
|
|
31788
|
+
borderInlineWidth: null,
|
|
31789
|
+
borderInlineStartWidth: null,
|
|
31790
|
+
borderLeftWidth: null,
|
|
31791
|
+
borderInlineEndWidth: null,
|
|
31792
|
+
borderRightWidth: null,
|
|
31793
|
+
borderBlockWidth: null,
|
|
31794
|
+
borderTopWidth: null,
|
|
31795
|
+
borderBottomWidth: null,
|
|
31796
|
+
borderStyle: null,
|
|
31797
|
+
borderInlineStyle: null,
|
|
31798
|
+
borderInlineStartStyle: null,
|
|
31799
|
+
borderLeftStyle: null,
|
|
31800
|
+
borderInlineEndStyle: null,
|
|
31801
|
+
borderRightStyle: null,
|
|
31802
|
+
borderBlockStyle: null,
|
|
31803
|
+
borderTopStyle: null,
|
|
31804
|
+
borderBottomStyle: null,
|
|
31805
|
+
borderColor: null,
|
|
31806
|
+
borderInlineColor: null,
|
|
31807
|
+
borderInlineStartColor: null,
|
|
31808
|
+
borderLeftColor: null,
|
|
31809
|
+
borderInlineEndColor: null,
|
|
31810
|
+
borderRightColor: null,
|
|
31811
|
+
borderBlockColor: null,
|
|
31812
|
+
borderTopColor: null,
|
|
31813
|
+
borderBottomColor: null,
|
|
31814
|
+
background: "mly1md70p1 mly14hn1a8 mlywghvya",
|
|
31815
|
+
backgroundAttachment: null,
|
|
31816
|
+
backgroundClip: null,
|
|
31817
|
+
backgroundColor: null,
|
|
31818
|
+
backgroundImage: null,
|
|
31819
|
+
backgroundOrigin: null,
|
|
31820
|
+
backgroundPosition: null,
|
|
31821
|
+
backgroundPositionX: null,
|
|
31822
|
+
backgroundPositionY: null,
|
|
31823
|
+
backgroundRepeat: null,
|
|
31824
|
+
backgroundSize: null,
|
|
31825
|
+
borderRadius: "mly12oqio5",
|
|
31826
|
+
borderStartStartRadius: null,
|
|
31827
|
+
borderStartEndRadius: null,
|
|
31828
|
+
borderEndStartRadius: null,
|
|
31829
|
+
borderEndEndRadius: null,
|
|
31830
|
+
borderTopLeftRadius: null,
|
|
31831
|
+
borderTopRightRadius: null,
|
|
31832
|
+
borderBottomLeftRadius: null,
|
|
31833
|
+
borderBottomRightRadius: null,
|
|
31834
|
+
$$css: true
|
|
31835
|
+
},
|
|
31836
|
+
content: {
|
|
31837
|
+
display: "mly78zum5",
|
|
31838
|
+
flexDirection: "mlydt5ytf",
|
|
31839
|
+
boxShadow: "mly5n1uv4",
|
|
31840
|
+
backgroundColor: "mly12peec7",
|
|
31841
|
+
borderRadius: "mlyur7f20",
|
|
31842
|
+
borderStartStartRadius: null,
|
|
31843
|
+
borderStartEndRadius: null,
|
|
31844
|
+
borderEndStartRadius: null,
|
|
31845
|
+
borderEndEndRadius: null,
|
|
31846
|
+
borderTopLeftRadius: null,
|
|
31847
|
+
borderTopRightRadius: null,
|
|
31848
|
+
borderBottomLeftRadius: null,
|
|
31849
|
+
borderBottomRightRadius: null,
|
|
31850
|
+
padding: "mlye8ttls",
|
|
31851
|
+
paddingInline: null,
|
|
31852
|
+
paddingStart: null,
|
|
31853
|
+
paddingLeft: null,
|
|
31854
|
+
paddingEnd: null,
|
|
31855
|
+
paddingRight: null,
|
|
31856
|
+
paddingBlock: null,
|
|
31857
|
+
paddingTop: null,
|
|
31858
|
+
paddingBottom: null,
|
|
31859
|
+
minWidth: "mlylm99nl",
|
|
31860
|
+
maxWidth: "mly1jkqq1h",
|
|
31861
|
+
gap: "mly167g77z",
|
|
31862
|
+
rowGap: null,
|
|
31863
|
+
columnGap: null,
|
|
31864
|
+
$$css: true
|
|
31865
|
+
},
|
|
31866
|
+
editor: {
|
|
31867
|
+
width: "mlyqyf9gi",
|
|
31868
|
+
display: "mly78zum5",
|
|
31869
|
+
flexDirection: "mlydt5ytf",
|
|
31870
|
+
gap: "mly167g77z",
|
|
31871
|
+
rowGap: null,
|
|
31872
|
+
columnGap: null,
|
|
31873
|
+
$$css: true
|
|
31874
|
+
},
|
|
31875
|
+
editorRow: {
|
|
31876
|
+
display: "mly78zum5",
|
|
31877
|
+
gap: "mly167g77z",
|
|
31878
|
+
rowGap: null,
|
|
31879
|
+
columnGap: null,
|
|
31880
|
+
$$css: true
|
|
31881
|
+
},
|
|
31882
|
+
editorCell: {
|
|
31883
|
+
flexGrow: "mly1iyjqo2",
|
|
31884
|
+
$$css: true
|
|
31885
|
+
},
|
|
31886
|
+
input: {
|
|
31887
|
+
border: "mly2yh2zd",
|
|
31888
|
+
borderWidth: null,
|
|
31889
|
+
borderInlineWidth: null,
|
|
31890
|
+
borderInlineStartWidth: null,
|
|
31891
|
+
borderLeftWidth: null,
|
|
31892
|
+
borderInlineEndWidth: null,
|
|
31893
|
+
borderRightWidth: null,
|
|
31894
|
+
borderBlockWidth: null,
|
|
31895
|
+
borderTopWidth: null,
|
|
31896
|
+
borderBottomWidth: null,
|
|
31897
|
+
borderStyle: null,
|
|
31898
|
+
borderInlineStyle: null,
|
|
31899
|
+
borderInlineStartStyle: null,
|
|
31900
|
+
borderLeftStyle: null,
|
|
31901
|
+
borderInlineEndStyle: null,
|
|
31902
|
+
borderRightStyle: null,
|
|
31903
|
+
borderBlockStyle: null,
|
|
31904
|
+
borderTopStyle: null,
|
|
31905
|
+
borderBottomStyle: null,
|
|
31906
|
+
borderColor: null,
|
|
31907
|
+
borderInlineColor: null,
|
|
31908
|
+
borderInlineStartColor: null,
|
|
31909
|
+
borderLeftColor: null,
|
|
31910
|
+
borderInlineEndColor: null,
|
|
31911
|
+
borderRightColor: null,
|
|
31912
|
+
borderBlockColor: null,
|
|
31913
|
+
borderTopColor: null,
|
|
31914
|
+
borderBottomColor: null,
|
|
31915
|
+
color: "mlyizdh9v",
|
|
31916
|
+
padding: "mly9cpjcd",
|
|
31917
|
+
paddingInline: null,
|
|
31918
|
+
paddingStart: null,
|
|
31919
|
+
paddingLeft: null,
|
|
31920
|
+
paddingEnd: null,
|
|
31921
|
+
paddingRight: null,
|
|
31922
|
+
paddingBlock: null,
|
|
31923
|
+
paddingTop: null,
|
|
31924
|
+
paddingBottom: null,
|
|
31925
|
+
borderRadius: "mly1sxf85j",
|
|
31926
|
+
borderStartStartRadius: null,
|
|
31927
|
+
borderStartEndRadius: null,
|
|
31928
|
+
borderEndStartRadius: null,
|
|
31929
|
+
borderEndEndRadius: null,
|
|
31930
|
+
borderTopLeftRadius: null,
|
|
31931
|
+
borderTopRightRadius: null,
|
|
31932
|
+
borderBottomLeftRadius: null,
|
|
31933
|
+
borderBottomRightRadius: null,
|
|
31934
|
+
$$css: true
|
|
31935
|
+
}
|
|
31936
|
+
};
|
|
31937
|
+
function VizEditorDialog({
|
|
31938
|
+
rootQuery,
|
|
31939
|
+
plugin,
|
|
31940
|
+
view,
|
|
31941
|
+
customStyle,
|
|
31942
|
+
open,
|
|
31943
|
+
setOpen
|
|
31944
|
+
}) {
|
|
31945
|
+
if (!plugin || !open) {
|
|
31946
|
+
return null;
|
|
31947
|
+
}
|
|
31948
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root, {
|
|
31949
|
+
onOpenChange: (open2) => setOpen(open2),
|
|
31950
|
+
open,
|
|
31951
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Portal, {
|
|
31952
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, {
|
|
31953
|
+
..._stylex.props(dialogStyles.overlay),
|
|
31954
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Content$1, {
|
|
31955
|
+
..._stylex.props(fontStyles.body, dialogStyles.content, styles$p.content, customStyle),
|
|
31956
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs(Title, {
|
|
31957
|
+
..._stylex.props(dialogStyles.title),
|
|
31958
|
+
children: ["Visualization Settings", /* @__PURE__ */ jsxRuntime.jsx(Close, {
|
|
31959
|
+
..._stylex.props(dialogStyles.close),
|
|
31960
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
31961
|
+
name: "clear"
|
|
31962
|
+
})
|
|
31963
|
+
})]
|
|
31964
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Description, {
|
|
31965
|
+
..._stylex.props(dialogStyles.displayNone),
|
|
31966
|
+
children: "Edit visualization parameters"
|
|
31967
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(VizEditor, {
|
|
31968
|
+
rootQuery,
|
|
31969
|
+
view,
|
|
31970
|
+
plugin,
|
|
31971
|
+
setOpen
|
|
31972
|
+
})]
|
|
31973
|
+
})
|
|
31974
|
+
})
|
|
31975
|
+
})
|
|
31976
|
+
});
|
|
31977
|
+
}
|
|
31978
|
+
const styles$p = {
|
|
31979
|
+
content: {
|
|
31980
|
+
maxWidth: "mly14zcgw3",
|
|
31981
|
+
width: "mly14rvwrp",
|
|
31982
|
+
maxHeight: "mly1l4ul0t",
|
|
30636
31983
|
$$css: true
|
|
30637
31984
|
}
|
|
30638
31985
|
};
|
|
@@ -30640,15 +31987,43 @@ function Visualization$1({
|
|
|
30640
31987
|
rootQuery,
|
|
30641
31988
|
view
|
|
30642
31989
|
}) {
|
|
30643
|
-
var _a2;
|
|
30644
31990
|
const {
|
|
30645
31991
|
setQuery
|
|
30646
31992
|
} = React.useContext(QueryEditorContext);
|
|
30647
|
-
const
|
|
30648
|
-
const
|
|
30649
|
-
const
|
|
30650
|
-
const
|
|
30651
|
-
|
|
31993
|
+
const renderer = React.useMemo(() => new render.MalloyRenderer(), []);
|
|
31994
|
+
const [currentRenderer, setCurrentRenderer] = React.useState("table");
|
|
31995
|
+
const [plugin, setPlugin] = React.useState();
|
|
31996
|
+
const [open, setOpen] = React.useState(false);
|
|
31997
|
+
React.useEffect(() => {
|
|
31998
|
+
var _a2;
|
|
31999
|
+
const viz = renderer.createViz({
|
|
32000
|
+
onError: (error) => {
|
|
32001
|
+
console.error("Malloy render error", error);
|
|
32002
|
+
}
|
|
32003
|
+
});
|
|
32004
|
+
viz.setResult({
|
|
32005
|
+
schema: view.definition.getOutputSchema(),
|
|
32006
|
+
annotations: view.getTag().toString().split("\n").map((value) => ({
|
|
32007
|
+
value
|
|
32008
|
+
})),
|
|
32009
|
+
connection_name: ""
|
|
32010
|
+
});
|
|
32011
|
+
const metadata = viz.getMetadata();
|
|
32012
|
+
if (metadata) {
|
|
32013
|
+
const plugin2 = viz.getActivePlugin(metadata.getRootField().key);
|
|
32014
|
+
if (plugin2 && render.isCoreVizPluginInstance(plugin2)) {
|
|
32015
|
+
setCurrentRenderer(plugin2.name);
|
|
32016
|
+
setPlugin(plugin2);
|
|
32017
|
+
}
|
|
32018
|
+
} else {
|
|
32019
|
+
const currentTag = view.getTag();
|
|
32020
|
+
const rendererTag = view.getTag(RENDERER_PREFIX);
|
|
32021
|
+
const currentRenderer2 = ((_a2 = rendererTag.tag("viz")) == null ? void 0 : _a2.text()) ?? legacyToViz(tagToRenderer(currentTag) ?? "table");
|
|
32022
|
+
setCurrentRenderer(currentRenderer2);
|
|
32023
|
+
}
|
|
32024
|
+
}, [renderer, view]);
|
|
32025
|
+
const updateViz = (renderer2) => {
|
|
32026
|
+
view.setTagProperty(["viz"], renderer2, RENDERER_PREFIX);
|
|
30652
32027
|
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
30653
32028
|
};
|
|
30654
32029
|
const items = VIZ_RENDERERS.map((viz) => ({
|
|
@@ -30657,30 +32032,41 @@ function Visualization$1({
|
|
|
30657
32032
|
}),
|
|
30658
32033
|
label: snakeToTitle(viz),
|
|
30659
32034
|
value: viz,
|
|
30660
|
-
onClick: () =>
|
|
32035
|
+
onClick: () => updateViz(viz)
|
|
30661
32036
|
}));
|
|
30662
32037
|
const tokens2 = [/* @__PURE__ */ jsxRuntime.jsx(SelectorToken, {
|
|
30663
|
-
customStyle: styles$
|
|
32038
|
+
customStyle: styles$o.first,
|
|
30664
32039
|
icon: `viz_${currentRenderer}`,
|
|
30665
32040
|
value: currentRenderer,
|
|
30666
32041
|
items,
|
|
30667
|
-
onChange: (viz) =>
|
|
32042
|
+
onChange: (viz) => updateViz(viz)
|
|
30668
32043
|
}, "first")];
|
|
30669
|
-
|
|
30670
|
-
|
|
30671
|
-
|
|
30672
|
-
|
|
30673
|
-
|
|
30674
|
-
|
|
30675
|
-
|
|
30676
|
-
}, "menu"));
|
|
32044
|
+
if (plugin) {
|
|
32045
|
+
tokens2.push(/* @__PURE__ */ jsxRuntime.jsx(Token, {
|
|
32046
|
+
icon: "gear",
|
|
32047
|
+
onClick: () => setOpen(true),
|
|
32048
|
+
customStyle: styles$o.trigger,
|
|
32049
|
+
tooltip: "Edit Settings..."
|
|
32050
|
+
}, "gear"));
|
|
30677
32051
|
}
|
|
30678
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
30679
|
-
|
|
30680
|
-
|
|
32052
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
32053
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(TokenGroup, {
|
|
32054
|
+
customStyle: styles$o.group,
|
|
32055
|
+
children: tokens2
|
|
32056
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(VizEditorDialog, {
|
|
32057
|
+
open,
|
|
32058
|
+
setOpen,
|
|
32059
|
+
rootQuery,
|
|
32060
|
+
plugin,
|
|
32061
|
+
view
|
|
32062
|
+
})]
|
|
30681
32063
|
});
|
|
30682
32064
|
}
|
|
30683
|
-
const styles$
|
|
32065
|
+
const styles$o = {
|
|
32066
|
+
trigger: {
|
|
32067
|
+
height: "mly1ktj5wk",
|
|
32068
|
+
$$css: true
|
|
32069
|
+
},
|
|
30684
32070
|
group: {
|
|
30685
32071
|
width: "mlyh8yej3",
|
|
30686
32072
|
gridTemplateColumns: "mly52fmzj",
|
|
@@ -30713,7 +32099,7 @@ function ViewAttributeTable({
|
|
|
30713
32099
|
}) {
|
|
30714
32100
|
const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
|
|
30715
32101
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30716
|
-
..._stylex.props(styles$
|
|
32102
|
+
..._stylex.props(styles$n.attributeTableContainer, style),
|
|
30717
32103
|
children: /* @__PURE__ */ jsxRuntime.jsx("table", {
|
|
30718
32104
|
...{
|
|
30719
32105
|
className: "mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d"
|
|
@@ -30751,9 +32137,9 @@ function ViewAttributeTableRow({
|
|
|
30751
32137
|
className: "mlydpxx8g"
|
|
30752
32138
|
},
|
|
30753
32139
|
children: [/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
30754
|
-
..._stylex.props(styles$
|
|
32140
|
+
..._stylex.props(styles$n.attributeTableKeyCell, fontStyles.supporting),
|
|
30755
32141
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30756
|
-
..._stylex.props(styles$
|
|
32142
|
+
..._stylex.props(styles$n.attributeTableKeyCellContent, fontStyles.supporting),
|
|
30757
32143
|
children: attribute
|
|
30758
32144
|
})
|
|
30759
32145
|
}), /* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
@@ -30764,7 +32150,7 @@ function ViewAttributeTableRow({
|
|
|
30764
32150
|
})]
|
|
30765
32151
|
});
|
|
30766
32152
|
}
|
|
30767
|
-
const styles$
|
|
32153
|
+
const styles$n = {
|
|
30768
32154
|
attributeTableContainer: {
|
|
30769
32155
|
padding: "mlye8ttls",
|
|
30770
32156
|
paddingInline: null,
|
|
@@ -30896,12 +32282,12 @@ function RichText({
|
|
|
30896
32282
|
});
|
|
30897
32283
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30898
32284
|
ref,
|
|
30899
|
-
..._stylex.props(multiLine && styles$
|
|
32285
|
+
..._stylex.props(multiLine && styles$m.preWrap, multiLine && styles$m.breakWord, customStyle),
|
|
30900
32286
|
...props2,
|
|
30901
32287
|
children: formatted
|
|
30902
32288
|
});
|
|
30903
32289
|
}
|
|
30904
|
-
const styles$
|
|
32290
|
+
const styles$m = {
|
|
30905
32291
|
preWrap: {
|
|
30906
32292
|
whiteSpace: "mly126k92a",
|
|
30907
32293
|
$$css: true
|
|
@@ -30930,7 +32316,7 @@ function HoverText({
|
|
|
30930
32316
|
onMouseEnter: () => setIsTriggerHovered(true),
|
|
30931
32317
|
onMouseLeave: () => setIsTriggerHovered(false),
|
|
30932
32318
|
onPointerMove: (e) => e.preventDefault(),
|
|
30933
|
-
customStyle: [fontStyles.supporting, styles$
|
|
32319
|
+
customStyle: [fontStyles.supporting, styles$l.text],
|
|
30934
32320
|
children: text2
|
|
30935
32321
|
})
|
|
30936
32322
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
|
|
@@ -30949,7 +32335,7 @@ function HoverText({
|
|
|
30949
32335
|
})]
|
|
30950
32336
|
});
|
|
30951
32337
|
}
|
|
30952
|
-
const styles$
|
|
32338
|
+
const styles$l = {
|
|
30953
32339
|
text: {
|
|
30954
32340
|
overflow: "mlyb3r6kr",
|
|
30955
32341
|
overflowX: null,
|
|
@@ -30960,45 +32346,6 @@ const styles$n = {
|
|
|
30960
32346
|
$$css: true
|
|
30961
32347
|
}
|
|
30962
32348
|
};
|
|
30963
|
-
function HoverCard({
|
|
30964
|
-
children,
|
|
30965
|
-
customStyle
|
|
30966
|
-
}) {
|
|
30967
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30968
|
-
..._stylex.props(styles$m.container, fontStyles.body, customStyle),
|
|
30969
|
-
children
|
|
30970
|
-
});
|
|
30971
|
-
}
|
|
30972
|
-
const styles$m = {
|
|
30973
|
-
container: {
|
|
30974
|
-
boxShadow: "mly5n1uv4",
|
|
30975
|
-
backgroundColor: "mly12peec7",
|
|
30976
|
-
borderRadius: "mly4pepcl",
|
|
30977
|
-
borderStartStartRadius: null,
|
|
30978
|
-
borderStartEndRadius: null,
|
|
30979
|
-
borderEndStartRadius: null,
|
|
30980
|
-
borderEndEndRadius: null,
|
|
30981
|
-
borderTopLeftRadius: null,
|
|
30982
|
-
borderTopRightRadius: null,
|
|
30983
|
-
borderBottomLeftRadius: null,
|
|
30984
|
-
borderBottomRightRadius: null,
|
|
30985
|
-
padding: "mlyc7ga6q",
|
|
30986
|
-
paddingInline: null,
|
|
30987
|
-
paddingStart: null,
|
|
30988
|
-
paddingLeft: null,
|
|
30989
|
-
paddingEnd: null,
|
|
30990
|
-
paddingRight: null,
|
|
30991
|
-
paddingBlock: null,
|
|
30992
|
-
paddingTop: null,
|
|
30993
|
-
paddingBottom: null,
|
|
30994
|
-
display: "mly78zum5",
|
|
30995
|
-
flexDirection: "mlydt5ytf",
|
|
30996
|
-
gap: "mly167g77z",
|
|
30997
|
-
rowGap: null,
|
|
30998
|
-
columnGap: null,
|
|
30999
|
-
$$css: true
|
|
31000
|
-
}
|
|
31001
|
-
};
|
|
31002
32349
|
function FieldHoverCard({
|
|
31003
32350
|
field,
|
|
31004
32351
|
path
|
|
@@ -31015,7 +32362,7 @@ function FieldHoverCard({
|
|
|
31015
32362
|
details = /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
|
|
31016
32363
|
viewInfo: field,
|
|
31017
32364
|
isCompact: true,
|
|
31018
|
-
style: styles$
|
|
32365
|
+
style: styles$k.viewAttributeTable
|
|
31019
32366
|
});
|
|
31020
32367
|
} else if (field.kind === "dimension") {
|
|
31021
32368
|
details = /* @__PURE__ */ jsxRuntime.jsx(TopValuesTable, {
|
|
@@ -31024,7 +32371,7 @@ function FieldHoverCard({
|
|
|
31024
32371
|
});
|
|
31025
32372
|
}
|
|
31026
32373
|
return /* @__PURE__ */ jsxRuntime.jsxs(HoverCard, {
|
|
31027
|
-
customStyle: styles$
|
|
32374
|
+
customStyle: styles$k.container,
|
|
31028
32375
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31029
32376
|
ref,
|
|
31030
32377
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -31035,10 +32382,10 @@ function FieldHoverCard({
|
|
|
31035
32382
|
field
|
|
31036
32383
|
})
|
|
31037
32384
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31038
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
32385
|
+
..._stylex.props(fontStyles.supporting, styles$k.path),
|
|
31039
32386
|
children: pathString
|
|
31040
32387
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31041
|
-
..._stylex.props(fontStyles.emphasized, styles$
|
|
32388
|
+
..._stylex.props(fontStyles.emphasized, styles$k.title),
|
|
31042
32389
|
children: field.name
|
|
31043
32390
|
}), description && /* @__PURE__ */ jsxRuntime.jsx(HoverText, {
|
|
31044
32391
|
text: description,
|
|
@@ -31049,7 +32396,7 @@ function FieldHoverCard({
|
|
|
31049
32396
|
})]
|
|
31050
32397
|
});
|
|
31051
32398
|
}
|
|
31052
|
-
const styles$
|
|
32399
|
+
const styles$k = {
|
|
31053
32400
|
container: {
|
|
31054
32401
|
width: "mlybl57os",
|
|
31055
32402
|
maxHeight: "mlyq3t0pi",
|
|
@@ -31226,335 +32573,6 @@ function BooleanFilterCore({
|
|
|
31226
32573
|
})
|
|
31227
32574
|
});
|
|
31228
32575
|
}
|
|
31229
|
-
function useClickOutside(refOrRefs, handler) {
|
|
31230
|
-
React.useEffect(() => {
|
|
31231
|
-
const refs = Array.isArray(refOrRefs) ? refOrRefs : [refOrRefs];
|
|
31232
|
-
let down = false;
|
|
31233
|
-
const isInOneElement = (ref, event) => {
|
|
31234
|
-
return !ref.current || event.target instanceof Element && ref.current.contains(event.target);
|
|
31235
|
-
};
|
|
31236
|
-
const isInElement = (event) => {
|
|
31237
|
-
return refs.some((ref) => isInOneElement(ref, event));
|
|
31238
|
-
};
|
|
31239
|
-
const onMouseUp = (event) => {
|
|
31240
|
-
if (!down || isInElement(event)) return;
|
|
31241
|
-
handler(event);
|
|
31242
|
-
down = false;
|
|
31243
|
-
};
|
|
31244
|
-
const onMouseDown = (event) => {
|
|
31245
|
-
if (isInElement(event)) return;
|
|
31246
|
-
down = true;
|
|
31247
|
-
};
|
|
31248
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
31249
|
-
document.addEventListener("mousedown", onMouseDown);
|
|
31250
|
-
return () => {
|
|
31251
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
31252
|
-
document.removeEventListener("mousedown", onMouseDown);
|
|
31253
|
-
};
|
|
31254
|
-
}, [refOrRefs, handler]);
|
|
31255
|
-
}
|
|
31256
|
-
const PillInput = ({
|
|
31257
|
-
values,
|
|
31258
|
-
setValues,
|
|
31259
|
-
autoFocus,
|
|
31260
|
-
placeholder,
|
|
31261
|
-
type = "text",
|
|
31262
|
-
value: controlledValue,
|
|
31263
|
-
setValue: setControlledValue,
|
|
31264
|
-
focusElement,
|
|
31265
|
-
color = DEFAULT_TOKEN_COLOR,
|
|
31266
|
-
customStyle
|
|
31267
|
-
}) => {
|
|
31268
|
-
const [uncontrolledValue, setUncontrolledValue] = React.useState("");
|
|
31269
|
-
const [_focused, setFocused] = React.useState(false);
|
|
31270
|
-
const inp = React.useRef(null);
|
|
31271
|
-
const ref = React.useRef(null);
|
|
31272
|
-
const [selectedPill, setSelectedPill] = React.useState(void 0);
|
|
31273
|
-
const pillRefs = React.useRef([]);
|
|
31274
|
-
const value = controlledValue || uncontrolledValue;
|
|
31275
|
-
const setValue = setControlledValue || setUncontrolledValue;
|
|
31276
|
-
const deletePill = React.useCallback((idx) => {
|
|
31277
|
-
var _a2;
|
|
31278
|
-
const newValues = [...values];
|
|
31279
|
-
newValues.splice(idx, 1);
|
|
31280
|
-
setValues(newValues);
|
|
31281
|
-
if (selectedPill === 0) {
|
|
31282
|
-
if (values.length === 1) {
|
|
31283
|
-
setSelectedPill(void 0);
|
|
31284
|
-
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
31285
|
-
} else {
|
|
31286
|
-
setSelectedPill(0);
|
|
31287
|
-
}
|
|
31288
|
-
} else {
|
|
31289
|
-
setSelectedPill(idx - 1);
|
|
31290
|
-
}
|
|
31291
|
-
}, [selectedPill, setValues, values]);
|
|
31292
|
-
const pills = React.useMemo(() => {
|
|
31293
|
-
pillRefs.current = new Array(values.length);
|
|
31294
|
-
return values.map((value2, index2) => /* @__PURE__ */ jsxRuntime.jsx(Pill, {
|
|
31295
|
-
color,
|
|
31296
|
-
onClick: () => {
|
|
31297
|
-
setSelectedPill(index2);
|
|
31298
|
-
},
|
|
31299
|
-
onDelete: () => deletePill(index2),
|
|
31300
|
-
forwardRef: (ref2) => {
|
|
31301
|
-
pillRefs.current[index2] = ref2;
|
|
31302
|
-
},
|
|
31303
|
-
children: value2
|
|
31304
|
-
}, value2));
|
|
31305
|
-
}, [color, deletePill, values]);
|
|
31306
|
-
React.useEffect(() => {
|
|
31307
|
-
var _a2;
|
|
31308
|
-
if (selectedPill !== void 0) {
|
|
31309
|
-
(_a2 = pillRefs.current[selectedPill]) == null ? void 0 : _a2.focus();
|
|
31310
|
-
}
|
|
31311
|
-
}, [pills, selectedPill]);
|
|
31312
|
-
const onKeyUp = (event) => {
|
|
31313
|
-
var _a2, _b2;
|
|
31314
|
-
if (event.key === "Backspace") {
|
|
31315
|
-
if (selectedPill !== void 0) {
|
|
31316
|
-
deletePill(selectedPill);
|
|
31317
|
-
}
|
|
31318
|
-
} else if (event.key === "ArrowRight") {
|
|
31319
|
-
if (selectedPill === values.length - 1) {
|
|
31320
|
-
setSelectedPill(void 0);
|
|
31321
|
-
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
31322
|
-
} else if (selectedPill !== void 0) {
|
|
31323
|
-
setSelectedPill(selectedPill + 1);
|
|
31324
|
-
}
|
|
31325
|
-
} else if (event.key === "ArrowLeft") {
|
|
31326
|
-
if (selectedPill !== void 0 && selectedPill > 0) {
|
|
31327
|
-
setSelectedPill(selectedPill - 1);
|
|
31328
|
-
}
|
|
31329
|
-
} else {
|
|
31330
|
-
(_b2 = inp.current) == null ? void 0 : _b2.focus();
|
|
31331
|
-
}
|
|
31332
|
-
};
|
|
31333
|
-
const commitValue = () => {
|
|
31334
|
-
if (value.length > 0 && !values.includes(value)) {
|
|
31335
|
-
setValues([...values, value]);
|
|
31336
|
-
setValue("");
|
|
31337
|
-
}
|
|
31338
|
-
};
|
|
31339
|
-
useClickOutside(focusElement ? [ref, focusElement] : ref, () => {
|
|
31340
|
-
setFocused(false);
|
|
31341
|
-
commitValue();
|
|
31342
|
-
});
|
|
31343
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31344
|
-
..._stylex.props(fontStyles.body, styles$k.main),
|
|
31345
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
31346
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31347
|
-
..._stylex.props(styles$k.content, customStyle),
|
|
31348
|
-
onKeyUp,
|
|
31349
|
-
onClick: () => {
|
|
31350
|
-
var _a2;
|
|
31351
|
-
return (_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
31352
|
-
},
|
|
31353
|
-
ref,
|
|
31354
|
-
children: [pills, /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
31355
|
-
...{
|
|
31356
|
-
className: "mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2"
|
|
31357
|
-
},
|
|
31358
|
-
ref: inp,
|
|
31359
|
-
type,
|
|
31360
|
-
placeholder: values.length === 0 ? placeholder : "",
|
|
31361
|
-
value,
|
|
31362
|
-
size: 1,
|
|
31363
|
-
onChange: (event) => {
|
|
31364
|
-
setValue(event.target.value);
|
|
31365
|
-
},
|
|
31366
|
-
onKeyDown: (event) => {
|
|
31367
|
-
if (event.key === "Enter") {
|
|
31368
|
-
if (value !== "") {
|
|
31369
|
-
commitValue();
|
|
31370
|
-
event.stopPropagation();
|
|
31371
|
-
event.preventDefault();
|
|
31372
|
-
}
|
|
31373
|
-
}
|
|
31374
|
-
},
|
|
31375
|
-
onKeyUp: (event) => {
|
|
31376
|
-
var _a2, _b2, _c2, _d;
|
|
31377
|
-
if (event.key === "Backspace") {
|
|
31378
|
-
if (value === "" && values.length > 0) {
|
|
31379
|
-
commitValue();
|
|
31380
|
-
(_a2 = inp.current) == null ? void 0 : _a2.blur();
|
|
31381
|
-
setSelectedPill(values.length - 1);
|
|
31382
|
-
}
|
|
31383
|
-
} else if (event.key === "ArrowLeft") {
|
|
31384
|
-
if (((_b2 = inp.current) == null ? void 0 : _b2.selectionStart) === 0 || ((_c2 = inp.current) == null ? void 0 : _c2.selectionStart) === null) {
|
|
31385
|
-
commitValue();
|
|
31386
|
-
(_d = inp.current) == null ? void 0 : _d.blur();
|
|
31387
|
-
setSelectedPill(values.length - 1);
|
|
31388
|
-
event.preventDefault();
|
|
31389
|
-
event.stopPropagation();
|
|
31390
|
-
}
|
|
31391
|
-
}
|
|
31392
|
-
},
|
|
31393
|
-
onFocus: () => {
|
|
31394
|
-
setFocused(true);
|
|
31395
|
-
setSelectedPill(void 0);
|
|
31396
|
-
},
|
|
31397
|
-
autoFocus
|
|
31398
|
-
})]
|
|
31399
|
-
})
|
|
31400
|
-
})
|
|
31401
|
-
});
|
|
31402
|
-
};
|
|
31403
|
-
const Pill = ({
|
|
31404
|
-
children,
|
|
31405
|
-
color = DEFAULT_TOKEN_COLOR,
|
|
31406
|
-
forwardRef,
|
|
31407
|
-
onClick,
|
|
31408
|
-
onDelete
|
|
31409
|
-
}) => {
|
|
31410
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31411
|
-
onClick,
|
|
31412
|
-
tabIndex: 0,
|
|
31413
|
-
ref: forwardRef,
|
|
31414
|
-
..._stylex.props(styles$k.pill, colorVariants[color]),
|
|
31415
|
-
children: [children, /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31416
|
-
title: "Remove",
|
|
31417
|
-
...{
|
|
31418
|
-
className: "mly3nfvp2"
|
|
31419
|
-
},
|
|
31420
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(SvgClear, {
|
|
31421
|
-
onClick: () => onDelete(),
|
|
31422
|
-
...{
|
|
31423
|
-
className: "mly6jxa94 mly1v9usgg"
|
|
31424
|
-
}
|
|
31425
|
-
})
|
|
31426
|
-
})]
|
|
31427
|
-
});
|
|
31428
|
-
};
|
|
31429
|
-
const styles$k = {
|
|
31430
|
-
main: {
|
|
31431
|
-
borderRadius: "mly12oqio5",
|
|
31432
|
-
borderStartStartRadius: null,
|
|
31433
|
-
borderStartEndRadius: null,
|
|
31434
|
-
borderEndStartRadius: null,
|
|
31435
|
-
borderEndEndRadius: null,
|
|
31436
|
-
borderTopLeftRadius: null,
|
|
31437
|
-
borderTopRightRadius: null,
|
|
31438
|
-
borderBottomLeftRadius: null,
|
|
31439
|
-
borderBottomRightRadius: null,
|
|
31440
|
-
border: "mlyvckdp7",
|
|
31441
|
-
borderWidth: null,
|
|
31442
|
-
borderInlineWidth: null,
|
|
31443
|
-
borderInlineStartWidth: null,
|
|
31444
|
-
borderLeftWidth: null,
|
|
31445
|
-
borderInlineEndWidth: null,
|
|
31446
|
-
borderRightWidth: null,
|
|
31447
|
-
borderBlockWidth: null,
|
|
31448
|
-
borderTopWidth: null,
|
|
31449
|
-
borderBottomWidth: null,
|
|
31450
|
-
borderStyle: null,
|
|
31451
|
-
borderInlineStyle: null,
|
|
31452
|
-
borderInlineStartStyle: null,
|
|
31453
|
-
borderLeftStyle: null,
|
|
31454
|
-
borderInlineEndStyle: null,
|
|
31455
|
-
borderRightStyle: null,
|
|
31456
|
-
borderBlockStyle: null,
|
|
31457
|
-
borderTopStyle: null,
|
|
31458
|
-
borderBottomStyle: null,
|
|
31459
|
-
borderColor: null,
|
|
31460
|
-
borderInlineColor: null,
|
|
31461
|
-
borderInlineStartColor: null,
|
|
31462
|
-
borderLeftColor: null,
|
|
31463
|
-
borderInlineEndColor: null,
|
|
31464
|
-
borderRightColor: null,
|
|
31465
|
-
borderBlockColor: null,
|
|
31466
|
-
borderTopColor: null,
|
|
31467
|
-
borderBottomColor: null,
|
|
31468
|
-
padding: "mlybsehbd",
|
|
31469
|
-
paddingInline: null,
|
|
31470
|
-
paddingStart: null,
|
|
31471
|
-
paddingLeft: null,
|
|
31472
|
-
paddingEnd: null,
|
|
31473
|
-
paddingRight: null,
|
|
31474
|
-
paddingBlock: null,
|
|
31475
|
-
paddingTop: null,
|
|
31476
|
-
paddingBottom: null,
|
|
31477
|
-
display: "mlyrvj5dj",
|
|
31478
|
-
minHeight: "mly2lwn1j",
|
|
31479
|
-
$$css: true
|
|
31480
|
-
},
|
|
31481
|
-
content: {
|
|
31482
|
-
outline: "mly1a2a7pz",
|
|
31483
|
-
outlineColor: null,
|
|
31484
|
-
outlineOffset: null,
|
|
31485
|
-
outlineStyle: null,
|
|
31486
|
-
outlineWidth: null,
|
|
31487
|
-
display: "mly78zum5",
|
|
31488
|
-
flexWrap: "mly1a02dak",
|
|
31489
|
-
gap: "mly1ed6fcf",
|
|
31490
|
-
rowGap: null,
|
|
31491
|
-
columnGap: null,
|
|
31492
|
-
borderColor: "mly1akygb0 mlyetl2wx",
|
|
31493
|
-
borderInlineColor: null,
|
|
31494
|
-
borderInlineStartColor: null,
|
|
31495
|
-
borderLeftColor: null,
|
|
31496
|
-
borderInlineEndColor: null,
|
|
31497
|
-
borderRightColor: null,
|
|
31498
|
-
borderBlockColor: null,
|
|
31499
|
-
borderTopColor: null,
|
|
31500
|
-
borderBottomColor: null,
|
|
31501
|
-
$$css: true
|
|
31502
|
-
},
|
|
31503
|
-
pill: {
|
|
31504
|
-
backgroundColor: "mlyy9rfsq",
|
|
31505
|
-
borderRadius: "mly1sxf85j",
|
|
31506
|
-
borderStartStartRadius: null,
|
|
31507
|
-
borderStartEndRadius: null,
|
|
31508
|
-
borderEndStartRadius: null,
|
|
31509
|
-
borderEndEndRadius: null,
|
|
31510
|
-
borderTopLeftRadius: null,
|
|
31511
|
-
borderTopRightRadius: null,
|
|
31512
|
-
borderBottomLeftRadius: null,
|
|
31513
|
-
borderBottomRightRadius: null,
|
|
31514
|
-
color: "mly1xre2ib",
|
|
31515
|
-
display: "mly78zum5",
|
|
31516
|
-
alignItems: "mly6s0dn4",
|
|
31517
|
-
gap: "mly1nejdyq",
|
|
31518
|
-
rowGap: null,
|
|
31519
|
-
columnGap: null,
|
|
31520
|
-
padding: "mly1e41zw8",
|
|
31521
|
-
paddingInline: null,
|
|
31522
|
-
paddingStart: null,
|
|
31523
|
-
paddingLeft: null,
|
|
31524
|
-
paddingEnd: null,
|
|
31525
|
-
paddingRight: null,
|
|
31526
|
-
paddingBlock: null,
|
|
31527
|
-
paddingTop: null,
|
|
31528
|
-
paddingBottom: null,
|
|
31529
|
-
textTransform: "mly6mezaz",
|
|
31530
|
-
cursor: "mly1ypdohk",
|
|
31531
|
-
height: "mly1qx5ct2",
|
|
31532
|
-
whiteSpace: "mlyuxw1ft",
|
|
31533
|
-
$$css: true
|
|
31534
|
-
}
|
|
31535
|
-
};
|
|
31536
|
-
const colorVariants = {
|
|
31537
|
-
default: {
|
|
31538
|
-
"--mlyvygx4q": "mly1izbou4",
|
|
31539
|
-
"--mly13n7235": "mly8bgh0r",
|
|
31540
|
-
$$css: true
|
|
31541
|
-
},
|
|
31542
|
-
purple: {
|
|
31543
|
-
"--mlyvygx4q": "mly1f8soc4",
|
|
31544
|
-
"--mly13n7235": "mly1r5zvhd",
|
|
31545
|
-
$$css: true
|
|
31546
|
-
},
|
|
31547
|
-
green: {
|
|
31548
|
-
"--mlyvygx4q": "mlyf8wvcd",
|
|
31549
|
-
"--mly13n7235": "mly1u6t2w6",
|
|
31550
|
-
$$css: true
|
|
31551
|
-
},
|
|
31552
|
-
cyan: {
|
|
31553
|
-
"--mlyvygx4q": "mlyrtwgpv",
|
|
31554
|
-
"--mly13n7235": "mlys5r2en",
|
|
31555
|
-
$$css: true
|
|
31556
|
-
}
|
|
31557
|
-
};
|
|
31558
32576
|
function useSearch(searchTerm, fieldPath) {
|
|
31559
32577
|
const {
|
|
31560
32578
|
topValues
|
|
@@ -31596,6 +32614,7 @@ function useSearch(searchTerm, fieldPath) {
|
|
|
31596
32614
|
function ValueList({
|
|
31597
32615
|
onClick,
|
|
31598
32616
|
search,
|
|
32617
|
+
filter,
|
|
31599
32618
|
fieldPath,
|
|
31600
32619
|
ref,
|
|
31601
32620
|
customStyle,
|
|
@@ -31604,7 +32623,7 @@ function ValueList({
|
|
|
31604
32623
|
const {
|
|
31605
32624
|
searchResults
|
|
31606
32625
|
} = useSearch(search, fieldPath);
|
|
31607
|
-
const stringSearchResults = React.useMemo(() => searchResults && searchResults.filter((r2) => r2.fieldType === "string" && r2.fieldValue !== null).sort((a, b2) => b2.weight - a.weight).slice(0, 100), [searchResults]);
|
|
32626
|
+
const stringSearchResults = React.useMemo(() => searchResults && searchResults.filter((r2) => r2.fieldType === "string" && r2.fieldValue !== null).filter((r2) => filter ? filter(r2.fieldValue ?? "") : true).sort((a, b2) => b2.weight - a.weight).slice(0, 100), [searchResults, filter]);
|
|
31608
32627
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31609
32628
|
ref,
|
|
31610
32629
|
..._stylex.props(customStyle),
|
|
@@ -31815,7 +32834,8 @@ const StringFilterCore = ({
|
|
|
31815
32834
|
}
|
|
31816
32835
|
},
|
|
31817
32836
|
customStyle: styles$i.valueList,
|
|
31818
|
-
showPath: false
|
|
32837
|
+
showPath: false,
|
|
32838
|
+
filter: (value) => !currentFilter.values.includes(value)
|
|
31819
32839
|
})
|
|
31820
32840
|
})]
|
|
31821
32841
|
}) : currentFilter.operator === "~" ? /* @__PURE__ */ jsxRuntime.jsx(StringEditor, {
|
|
@@ -32139,11 +33159,8 @@ function makeFilterWithNewType(filter, type) {
|
|
|
32139
33159
|
}
|
|
32140
33160
|
}
|
|
32141
33161
|
function typeFromFilter(filter) {
|
|
32142
|
-
if (filter.operator === "null" && filter.not) {
|
|
32143
|
-
return
|
|
32144
|
-
}
|
|
32145
|
-
if (filter.operator === "before" && filter.not) {
|
|
32146
|
-
return "not_before";
|
|
33162
|
+
if ((filter.operator === "null" || filter.operator === "after" || filter.operator === "before") && filter.not) {
|
|
33163
|
+
return `-${filter.operator}`;
|
|
32147
33164
|
}
|
|
32148
33165
|
return filter.operator;
|
|
32149
33166
|
}
|
|
@@ -32152,7 +33169,7 @@ function unitsFromFilter(filter, isDateTime) {
|
|
|
32152
33169
|
return filter.units;
|
|
32153
33170
|
} else if (filter.operator === "to") {
|
|
32154
33171
|
return guessUnits(filter.fromMoment, isDateTime);
|
|
32155
|
-
} else if (filter.operator === "before"
|
|
33172
|
+
} else if (filter.operator === "before") {
|
|
32156
33173
|
return guessUnits(filter.before, isDateTime);
|
|
32157
33174
|
} else if (filter.operator === "after") {
|
|
32158
33175
|
return guessUnits(filter.after, isDateTime);
|
|
@@ -32199,14 +33216,17 @@ const DateTimeFilterCore = ({
|
|
|
32199
33216
|
value: "next",
|
|
32200
33217
|
label: "next complete"
|
|
32201
33218
|
}, {
|
|
32202
|
-
value: "
|
|
32203
|
-
label: "
|
|
33219
|
+
value: "-before",
|
|
33220
|
+
label: "starting"
|
|
32204
33221
|
}, {
|
|
32205
33222
|
value: "after",
|
|
32206
33223
|
label: "after"
|
|
32207
33224
|
}, {
|
|
32208
33225
|
value: "before",
|
|
32209
33226
|
label: "before"
|
|
33227
|
+
}, {
|
|
33228
|
+
value: "-after",
|
|
33229
|
+
label: "through"
|
|
32210
33230
|
}, {
|
|
32211
33231
|
value: "in",
|
|
32212
33232
|
label: "is"
|
|
@@ -32523,6 +33543,11 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32523
33543
|
let n = "7";
|
|
32524
33544
|
let fromMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
|
|
32525
33545
|
let toMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
|
|
33546
|
+
let not = false;
|
|
33547
|
+
if (type.startsWith("-")) {
|
|
33548
|
+
type = type.slice(1);
|
|
33549
|
+
not = true;
|
|
33550
|
+
}
|
|
32526
33551
|
switch (filter.operator) {
|
|
32527
33552
|
case "in_last":
|
|
32528
33553
|
case "last":
|
|
@@ -32555,18 +33580,14 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32555
33580
|
case "after":
|
|
32556
33581
|
return {
|
|
32557
33582
|
operator: type,
|
|
32558
|
-
after: fromMoment
|
|
33583
|
+
after: fromMoment,
|
|
33584
|
+
not
|
|
32559
33585
|
};
|
|
32560
33586
|
case "before":
|
|
32561
33587
|
return {
|
|
32562
33588
|
operator: type,
|
|
32563
|
-
before: fromMoment
|
|
32564
|
-
};
|
|
32565
|
-
case "not_before":
|
|
32566
|
-
return {
|
|
32567
|
-
operator: "before",
|
|
32568
33589
|
before: fromMoment,
|
|
32569
|
-
not
|
|
33590
|
+
not
|
|
32570
33591
|
};
|
|
32571
33592
|
case "in":
|
|
32572
33593
|
return {
|
|
@@ -32581,12 +33602,8 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32581
33602
|
};
|
|
32582
33603
|
case "null":
|
|
32583
33604
|
return {
|
|
32584
|
-
operator:
|
|
32585
|
-
|
|
32586
|
-
case "-null":
|
|
32587
|
-
return {
|
|
32588
|
-
operator: "null",
|
|
32589
|
-
not: true
|
|
33605
|
+
operator: type,
|
|
33606
|
+
not
|
|
32590
33607
|
};
|
|
32591
33608
|
}
|
|
32592
33609
|
return filter;
|
|
@@ -32838,7 +33855,7 @@ function FieldList({
|
|
|
32838
33855
|
..._stylex.props(customStyle),
|
|
32839
33856
|
children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
32840
33857
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
32841
|
-
..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
|
|
33858
|
+
..._stylex.props(addMenuStyles.item, styles$h.fieldItem, styles$h.sticky),
|
|
32842
33859
|
"data-disabled": "true",
|
|
32843
33860
|
children: group.name
|
|
32844
33861
|
}), group.fields.map((field) => isFilterOperation && (field.kind === "dimension" || field.kind === "measure") ? /* @__PURE__ */ jsxRuntime.jsx(FilterPopover, {
|
|
@@ -32904,6 +33921,17 @@ const styles$h = {
|
|
|
32904
33921
|
paddingTop: "mly1y1aw1k",
|
|
32905
33922
|
paddingBottom: "mlywib8y2",
|
|
32906
33923
|
$$css: true
|
|
33924
|
+
},
|
|
33925
|
+
sticky: {
|
|
33926
|
+
position: "mly7wzq59",
|
|
33927
|
+
top: "mly13vifvy",
|
|
33928
|
+
zIndex: "mly1vjfegm",
|
|
33929
|
+
backgroundColor: "mly9nb4jr",
|
|
33930
|
+
borderBottom: "mlyv3yj8d",
|
|
33931
|
+
borderBottomWidth: null,
|
|
33932
|
+
borderBottomStyle: null,
|
|
33933
|
+
borderBottomColor: null,
|
|
33934
|
+
$$css: true
|
|
32907
33935
|
}
|
|
32908
33936
|
};
|
|
32909
33937
|
function FieldMenu({
|
|
@@ -33103,7 +34131,7 @@ function OperationActionTitle({
|
|
|
33103
34131
|
return !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field);
|
|
33104
34132
|
};
|
|
33105
34133
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33106
|
-
..._stylex.props(styles$
|
|
34134
|
+
..._stylex.props(styles$u.title, hoverStyles.main),
|
|
33107
34135
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33108
34136
|
children: title
|
|
33109
34137
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -33136,308 +34164,6 @@ function OperationActionTitle({
|
|
|
33136
34164
|
})]
|
|
33137
34165
|
});
|
|
33138
34166
|
}
|
|
33139
|
-
var DIALOG_NAME = "Dialog";
|
|
33140
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
33141
|
-
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
33142
|
-
var Dialog = (props2) => {
|
|
33143
|
-
const {
|
|
33144
|
-
__scopeDialog,
|
|
33145
|
-
children,
|
|
33146
|
-
open: openProp,
|
|
33147
|
-
defaultOpen,
|
|
33148
|
-
onOpenChange,
|
|
33149
|
-
modal = true
|
|
33150
|
-
} = props2;
|
|
33151
|
-
const triggerRef = React__namespace.useRef(null);
|
|
33152
|
-
const contentRef = React__namespace.useRef(null);
|
|
33153
|
-
const [open = false, setOpen] = useControllableState({
|
|
33154
|
-
prop: openProp,
|
|
33155
|
-
defaultProp: defaultOpen,
|
|
33156
|
-
onChange: onOpenChange
|
|
33157
|
-
});
|
|
33158
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33159
|
-
DialogProvider,
|
|
33160
|
-
{
|
|
33161
|
-
scope: __scopeDialog,
|
|
33162
|
-
triggerRef,
|
|
33163
|
-
contentRef,
|
|
33164
|
-
contentId: useId(),
|
|
33165
|
-
titleId: useId(),
|
|
33166
|
-
descriptionId: useId(),
|
|
33167
|
-
open,
|
|
33168
|
-
onOpenChange: setOpen,
|
|
33169
|
-
onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
33170
|
-
modal,
|
|
33171
|
-
children
|
|
33172
|
-
}
|
|
33173
|
-
);
|
|
33174
|
-
};
|
|
33175
|
-
Dialog.displayName = DIALOG_NAME;
|
|
33176
|
-
var TRIGGER_NAME$1 = "DialogTrigger";
|
|
33177
|
-
var DialogTrigger = React__namespace.forwardRef(
|
|
33178
|
-
(props2, forwardedRef) => {
|
|
33179
|
-
const { __scopeDialog, ...triggerProps } = props2;
|
|
33180
|
-
const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
|
|
33181
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
33182
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33183
|
-
Primitive.button,
|
|
33184
|
-
{
|
|
33185
|
-
type: "button",
|
|
33186
|
-
"aria-haspopup": "dialog",
|
|
33187
|
-
"aria-expanded": context.open,
|
|
33188
|
-
"aria-controls": context.contentId,
|
|
33189
|
-
"data-state": getState(context.open),
|
|
33190
|
-
...triggerProps,
|
|
33191
|
-
ref: composedTriggerRef,
|
|
33192
|
-
onClick: composeEventHandlers(props2.onClick, context.onOpenToggle)
|
|
33193
|
-
}
|
|
33194
|
-
);
|
|
33195
|
-
}
|
|
33196
|
-
);
|
|
33197
|
-
DialogTrigger.displayName = TRIGGER_NAME$1;
|
|
33198
|
-
var PORTAL_NAME = "DialogPortal";
|
|
33199
|
-
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
33200
|
-
forceMount: void 0
|
|
33201
|
-
});
|
|
33202
|
-
var DialogPortal = (props2) => {
|
|
33203
|
-
const { __scopeDialog, forceMount, children, container } = props2;
|
|
33204
|
-
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
33205
|
-
return /* @__PURE__ */ jsxRuntime.jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React__namespace.Children.map(children, (child) => /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(Portal$5, { asChild: true, container, children: child }) })) });
|
|
33206
|
-
};
|
|
33207
|
-
DialogPortal.displayName = PORTAL_NAME;
|
|
33208
|
-
var OVERLAY_NAME = "DialogOverlay";
|
|
33209
|
-
var DialogOverlay = React__namespace.forwardRef(
|
|
33210
|
-
(props2, forwardedRef) => {
|
|
33211
|
-
const portalContext = usePortalContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
33212
|
-
const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
|
|
33213
|
-
const context = useDialogContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
33214
|
-
return context.modal ? /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
33215
|
-
}
|
|
33216
|
-
);
|
|
33217
|
-
DialogOverlay.displayName = OVERLAY_NAME;
|
|
33218
|
-
var DialogOverlayImpl = React__namespace.forwardRef(
|
|
33219
|
-
(props2, forwardedRef) => {
|
|
33220
|
-
const { __scopeDialog, ...overlayProps } = props2;
|
|
33221
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
33222
|
-
return (
|
|
33223
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
33224
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
33225
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33226
|
-
Primitive.div,
|
|
33227
|
-
{
|
|
33228
|
-
"data-state": getState(context.open),
|
|
33229
|
-
...overlayProps,
|
|
33230
|
-
ref: forwardedRef,
|
|
33231
|
-
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
33232
|
-
}
|
|
33233
|
-
) })
|
|
33234
|
-
);
|
|
33235
|
-
}
|
|
33236
|
-
);
|
|
33237
|
-
var CONTENT_NAME$1 = "DialogContent";
|
|
33238
|
-
var DialogContent = React__namespace.forwardRef(
|
|
33239
|
-
(props2, forwardedRef) => {
|
|
33240
|
-
const portalContext = usePortalContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33241
|
-
const { forceMount = portalContext.forceMount, ...contentProps } = props2;
|
|
33242
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33243
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsxRuntime.jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsxRuntime.jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
33244
|
-
}
|
|
33245
|
-
);
|
|
33246
|
-
DialogContent.displayName = CONTENT_NAME$1;
|
|
33247
|
-
var DialogContentModal = React__namespace.forwardRef(
|
|
33248
|
-
(props2, forwardedRef) => {
|
|
33249
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33250
|
-
const contentRef = React__namespace.useRef(null);
|
|
33251
|
-
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
33252
|
-
React__namespace.useEffect(() => {
|
|
33253
|
-
const content = contentRef.current;
|
|
33254
|
-
if (content) return hideOthers(content);
|
|
33255
|
-
}, []);
|
|
33256
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33257
|
-
DialogContentImpl,
|
|
33258
|
-
{
|
|
33259
|
-
...props2,
|
|
33260
|
-
ref: composedRefs,
|
|
33261
|
-
trapFocus: context.open,
|
|
33262
|
-
disableOutsidePointerEvents: true,
|
|
33263
|
-
onCloseAutoFocus: composeEventHandlers(props2.onCloseAutoFocus, (event) => {
|
|
33264
|
-
var _a2;
|
|
33265
|
-
event.preventDefault();
|
|
33266
|
-
(_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
|
|
33267
|
-
}),
|
|
33268
|
-
onPointerDownOutside: composeEventHandlers(props2.onPointerDownOutside, (event) => {
|
|
33269
|
-
const originalEvent = event.detail.originalEvent;
|
|
33270
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
33271
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
33272
|
-
if (isRightClick) event.preventDefault();
|
|
33273
|
-
}),
|
|
33274
|
-
onFocusOutside: composeEventHandlers(
|
|
33275
|
-
props2.onFocusOutside,
|
|
33276
|
-
(event) => event.preventDefault()
|
|
33277
|
-
)
|
|
33278
|
-
}
|
|
33279
|
-
);
|
|
33280
|
-
}
|
|
33281
|
-
);
|
|
33282
|
-
var DialogContentNonModal = React__namespace.forwardRef(
|
|
33283
|
-
(props2, forwardedRef) => {
|
|
33284
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33285
|
-
const hasInteractedOutsideRef = React__namespace.useRef(false);
|
|
33286
|
-
const hasPointerDownOutsideRef = React__namespace.useRef(false);
|
|
33287
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33288
|
-
DialogContentImpl,
|
|
33289
|
-
{
|
|
33290
|
-
...props2,
|
|
33291
|
-
ref: forwardedRef,
|
|
33292
|
-
trapFocus: false,
|
|
33293
|
-
disableOutsidePointerEvents: false,
|
|
33294
|
-
onCloseAutoFocus: (event) => {
|
|
33295
|
-
var _a2, _b2;
|
|
33296
|
-
(_a2 = props2.onCloseAutoFocus) == null ? void 0 : _a2.call(props2, event);
|
|
33297
|
-
if (!event.defaultPrevented) {
|
|
33298
|
-
if (!hasInteractedOutsideRef.current) (_b2 = context.triggerRef.current) == null ? void 0 : _b2.focus();
|
|
33299
|
-
event.preventDefault();
|
|
33300
|
-
}
|
|
33301
|
-
hasInteractedOutsideRef.current = false;
|
|
33302
|
-
hasPointerDownOutsideRef.current = false;
|
|
33303
|
-
},
|
|
33304
|
-
onInteractOutside: (event) => {
|
|
33305
|
-
var _a2, _b2;
|
|
33306
|
-
(_a2 = props2.onInteractOutside) == null ? void 0 : _a2.call(props2, event);
|
|
33307
|
-
if (!event.defaultPrevented) {
|
|
33308
|
-
hasInteractedOutsideRef.current = true;
|
|
33309
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
33310
|
-
hasPointerDownOutsideRef.current = true;
|
|
33311
|
-
}
|
|
33312
|
-
}
|
|
33313
|
-
const target = event.target;
|
|
33314
|
-
const targetIsTrigger = (_b2 = context.triggerRef.current) == null ? void 0 : _b2.contains(target);
|
|
33315
|
-
if (targetIsTrigger) event.preventDefault();
|
|
33316
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
33317
|
-
event.preventDefault();
|
|
33318
|
-
}
|
|
33319
|
-
}
|
|
33320
|
-
}
|
|
33321
|
-
);
|
|
33322
|
-
}
|
|
33323
|
-
);
|
|
33324
|
-
var DialogContentImpl = React__namespace.forwardRef(
|
|
33325
|
-
(props2, forwardedRef) => {
|
|
33326
|
-
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
|
|
33327
|
-
const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
|
|
33328
|
-
const contentRef = React__namespace.useRef(null);
|
|
33329
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
33330
|
-
useFocusGuards();
|
|
33331
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33332
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
33333
|
-
FocusScope,
|
|
33334
|
-
{
|
|
33335
|
-
asChild: true,
|
|
33336
|
-
loop: true,
|
|
33337
|
-
trapped: trapFocus,
|
|
33338
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
33339
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
33340
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
33341
|
-
DismissableLayer,
|
|
33342
|
-
{
|
|
33343
|
-
role: "dialog",
|
|
33344
|
-
id: context.contentId,
|
|
33345
|
-
"aria-describedby": context.descriptionId,
|
|
33346
|
-
"aria-labelledby": context.titleId,
|
|
33347
|
-
"data-state": getState(context.open),
|
|
33348
|
-
...contentProps,
|
|
33349
|
-
ref: composedRefs,
|
|
33350
|
-
onDismiss: () => context.onOpenChange(false)
|
|
33351
|
-
}
|
|
33352
|
-
)
|
|
33353
|
-
}
|
|
33354
|
-
),
|
|
33355
|
-
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
33356
|
-
/* @__PURE__ */ jsxRuntime.jsx(TitleWarning, { titleId: context.titleId }),
|
|
33357
|
-
/* @__PURE__ */ jsxRuntime.jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
33358
|
-
] })
|
|
33359
|
-
] });
|
|
33360
|
-
}
|
|
33361
|
-
);
|
|
33362
|
-
var TITLE_NAME = "DialogTitle";
|
|
33363
|
-
var DialogTitle = React__namespace.forwardRef(
|
|
33364
|
-
(props2, forwardedRef) => {
|
|
33365
|
-
const { __scopeDialog, ...titleProps } = props2;
|
|
33366
|
-
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
33367
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
33368
|
-
}
|
|
33369
|
-
);
|
|
33370
|
-
DialogTitle.displayName = TITLE_NAME;
|
|
33371
|
-
var DESCRIPTION_NAME = "DialogDescription";
|
|
33372
|
-
var DialogDescription = React__namespace.forwardRef(
|
|
33373
|
-
(props2, forwardedRef) => {
|
|
33374
|
-
const { __scopeDialog, ...descriptionProps } = props2;
|
|
33375
|
-
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
33376
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
33377
|
-
}
|
|
33378
|
-
);
|
|
33379
|
-
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
33380
|
-
var CLOSE_NAME = "DialogClose";
|
|
33381
|
-
var DialogClose = React__namespace.forwardRef(
|
|
33382
|
-
(props2, forwardedRef) => {
|
|
33383
|
-
const { __scopeDialog, ...closeProps } = props2;
|
|
33384
|
-
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
33385
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33386
|
-
Primitive.button,
|
|
33387
|
-
{
|
|
33388
|
-
type: "button",
|
|
33389
|
-
...closeProps,
|
|
33390
|
-
ref: forwardedRef,
|
|
33391
|
-
onClick: composeEventHandlers(props2.onClick, () => context.onOpenChange(false))
|
|
33392
|
-
}
|
|
33393
|
-
);
|
|
33394
|
-
}
|
|
33395
|
-
);
|
|
33396
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
33397
|
-
function getState(open) {
|
|
33398
|
-
return open ? "open" : "closed";
|
|
33399
|
-
}
|
|
33400
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
33401
|
-
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
33402
|
-
contentName: CONTENT_NAME$1,
|
|
33403
|
-
titleName: TITLE_NAME,
|
|
33404
|
-
docsSlug: "dialog"
|
|
33405
|
-
});
|
|
33406
|
-
var TitleWarning = ({ titleId }) => {
|
|
33407
|
-
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
33408
|
-
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
33409
|
-
|
|
33410
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
33411
|
-
|
|
33412
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
33413
|
-
React__namespace.useEffect(() => {
|
|
33414
|
-
if (titleId) {
|
|
33415
|
-
const hasTitle = document.getElementById(titleId);
|
|
33416
|
-
if (!hasTitle) console.error(MESSAGE);
|
|
33417
|
-
}
|
|
33418
|
-
}, [MESSAGE, titleId]);
|
|
33419
|
-
return null;
|
|
33420
|
-
};
|
|
33421
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
33422
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
33423
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
33424
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
33425
|
-
React__namespace.useEffect(() => {
|
|
33426
|
-
var _a2;
|
|
33427
|
-
const describedById = (_a2 = contentRef.current) == null ? void 0 : _a2.getAttribute("aria-describedby");
|
|
33428
|
-
if (descriptionId && describedById) {
|
|
33429
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
33430
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
33431
|
-
}
|
|
33432
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
33433
|
-
return null;
|
|
33434
|
-
};
|
|
33435
|
-
var Root = Dialog;
|
|
33436
|
-
var Portal = DialogPortal;
|
|
33437
|
-
var Overlay = DialogOverlay;
|
|
33438
|
-
var Content$1 = DialogContent;
|
|
33439
|
-
var Title = DialogTitle;
|
|
33440
|
-
var Description = DialogDescription;
|
|
33441
34167
|
function RenameDialog({
|
|
33442
34168
|
rootQuery,
|
|
33443
34169
|
view,
|
|
@@ -33471,29 +34197,19 @@ function RenameDialog({
|
|
|
33471
34197
|
onOpenChange: setOpen,
|
|
33472
34198
|
children: /* @__PURE__ */ jsxRuntime.jsx(Portal, {
|
|
33473
34199
|
children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, {
|
|
33474
|
-
...
|
|
33475
|
-
className: "mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h"
|
|
33476
|
-
},
|
|
34200
|
+
..._stylex.props(dialogStyles.overlay),
|
|
33477
34201
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Content$1, {
|
|
33478
34202
|
..._stylex.props(dialogStyles.content, fontStyles.body),
|
|
33479
34203
|
children: [/* @__PURE__ */ jsxRuntime.jsxs(Description, {
|
|
33480
|
-
...
|
|
33481
|
-
className: "mly1s85apg"
|
|
33482
|
-
},
|
|
34204
|
+
..._stylex.props(dialogStyles.displayNone),
|
|
33483
34205
|
children: ["Rename ", target.name]
|
|
33484
34206
|
}), /* @__PURE__ */ jsxRuntime.jsxs(Title, {
|
|
33485
|
-
...
|
|
33486
|
-
className: "mly1j61zf2 mly1ghz6dp"
|
|
33487
|
-
},
|
|
34207
|
+
..._stylex.props(dialogStyles.title),
|
|
33488
34208
|
children: ["Rename ", target.name]
|
|
33489
34209
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33490
|
-
...
|
|
33491
|
-
className: "mlyqyf9gi mly78zum5 mlydt5ytf mly167g77z"
|
|
33492
|
-
},
|
|
34210
|
+
..._stylex.props(dialogStyles.editor),
|
|
33493
34211
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33494
|
-
...
|
|
33495
|
-
className: "mly78zum5 mly167g77z"
|
|
33496
|
-
},
|
|
34212
|
+
..._stylex.props(dialogStyles.editorRow),
|
|
33497
34213
|
children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
33498
34214
|
value: name,
|
|
33499
34215
|
onChange: (event) => setName(event.target.value),
|
|
@@ -33512,9 +34228,7 @@ function RenameDialog({
|
|
|
33512
34228
|
errorMessage: "Name already in use"
|
|
33513
34229
|
})]
|
|
33514
34230
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33515
|
-
...
|
|
33516
|
-
className: "mly78zum5 mly167g77z"
|
|
33517
|
-
},
|
|
34231
|
+
..._stylex.props(dialogStyles.editorRow),
|
|
33518
34232
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
33519
34233
|
label: "Cancel",
|
|
33520
34234
|
onClick: () => setOpen(false),
|
|
@@ -33533,92 +34247,6 @@ function RenameDialog({
|
|
|
33533
34247
|
})
|
|
33534
34248
|
});
|
|
33535
34249
|
}
|
|
33536
|
-
const dialogStyles = {
|
|
33537
|
-
content: {
|
|
33538
|
-
display: "mly78zum5",
|
|
33539
|
-
flexDirection: "mlydt5ytf",
|
|
33540
|
-
boxShadow: "mly5n1uv4",
|
|
33541
|
-
backgroundColor: "mly12peec7",
|
|
33542
|
-
borderRadius: "mlyur7f20",
|
|
33543
|
-
borderStartStartRadius: null,
|
|
33544
|
-
borderStartEndRadius: null,
|
|
33545
|
-
borderEndStartRadius: null,
|
|
33546
|
-
borderEndEndRadius: null,
|
|
33547
|
-
borderTopLeftRadius: null,
|
|
33548
|
-
borderTopRightRadius: null,
|
|
33549
|
-
borderBottomLeftRadius: null,
|
|
33550
|
-
borderBottomRightRadius: null,
|
|
33551
|
-
padding: "mlye8ttls",
|
|
33552
|
-
paddingInline: null,
|
|
33553
|
-
paddingStart: null,
|
|
33554
|
-
paddingLeft: null,
|
|
33555
|
-
paddingEnd: null,
|
|
33556
|
-
paddingRight: null,
|
|
33557
|
-
paddingBlock: null,
|
|
33558
|
-
paddingTop: null,
|
|
33559
|
-
paddingBottom: null,
|
|
33560
|
-
minWidth: "mlylm99nl",
|
|
33561
|
-
maxWidth: "mly1jkqq1h",
|
|
33562
|
-
gap: "mly167g77z",
|
|
33563
|
-
rowGap: null,
|
|
33564
|
-
columnGap: null,
|
|
33565
|
-
$$css: true
|
|
33566
|
-
},
|
|
33567
|
-
editorCell: {
|
|
33568
|
-
flexGrow: "mly1iyjqo2",
|
|
33569
|
-
$$css: true
|
|
33570
|
-
},
|
|
33571
|
-
input: {
|
|
33572
|
-
border: "mly2yh2zd",
|
|
33573
|
-
borderWidth: null,
|
|
33574
|
-
borderInlineWidth: null,
|
|
33575
|
-
borderInlineStartWidth: null,
|
|
33576
|
-
borderLeftWidth: null,
|
|
33577
|
-
borderInlineEndWidth: null,
|
|
33578
|
-
borderRightWidth: null,
|
|
33579
|
-
borderBlockWidth: null,
|
|
33580
|
-
borderTopWidth: null,
|
|
33581
|
-
borderBottomWidth: null,
|
|
33582
|
-
borderStyle: null,
|
|
33583
|
-
borderInlineStyle: null,
|
|
33584
|
-
borderInlineStartStyle: null,
|
|
33585
|
-
borderLeftStyle: null,
|
|
33586
|
-
borderInlineEndStyle: null,
|
|
33587
|
-
borderRightStyle: null,
|
|
33588
|
-
borderBlockStyle: null,
|
|
33589
|
-
borderTopStyle: null,
|
|
33590
|
-
borderBottomStyle: null,
|
|
33591
|
-
borderColor: null,
|
|
33592
|
-
borderInlineColor: null,
|
|
33593
|
-
borderInlineStartColor: null,
|
|
33594
|
-
borderLeftColor: null,
|
|
33595
|
-
borderInlineEndColor: null,
|
|
33596
|
-
borderRightColor: null,
|
|
33597
|
-
borderBlockColor: null,
|
|
33598
|
-
borderTopColor: null,
|
|
33599
|
-
borderBottomColor: null,
|
|
33600
|
-
color: "mlyizdh9v",
|
|
33601
|
-
padding: "mly9cpjcd",
|
|
33602
|
-
paddingInline: null,
|
|
33603
|
-
paddingStart: null,
|
|
33604
|
-
paddingLeft: null,
|
|
33605
|
-
paddingEnd: null,
|
|
33606
|
-
paddingRight: null,
|
|
33607
|
-
paddingBlock: null,
|
|
33608
|
-
paddingTop: null,
|
|
33609
|
-
paddingBottom: null,
|
|
33610
|
-
borderRadius: "mly1sxf85j",
|
|
33611
|
-
borderStartStartRadius: null,
|
|
33612
|
-
borderStartEndRadius: null,
|
|
33613
|
-
borderEndStartRadius: null,
|
|
33614
|
-
borderEndEndRadius: null,
|
|
33615
|
-
borderTopLeftRadius: null,
|
|
33616
|
-
borderTopRightRadius: null,
|
|
33617
|
-
borderBottomLeftRadius: null,
|
|
33618
|
-
borderBottomRightRadius: null,
|
|
33619
|
-
$$css: true
|
|
33620
|
-
}
|
|
33621
|
-
};
|
|
33622
34250
|
function SortableOperations({
|
|
33623
34251
|
rootQuery,
|
|
33624
34252
|
segment,
|
|
@@ -33680,7 +34308,7 @@ function SortableOperations({
|
|
|
33680
34308
|
fields,
|
|
33681
34309
|
...props2
|
|
33682
34310
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33683
|
-
..._stylex.props(styles$
|
|
34311
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
33684
34312
|
children: /* @__PURE__ */ jsxRuntime.jsx(DndContext, {
|
|
33685
34313
|
sensors,
|
|
33686
34314
|
collisionDetection: closestCenter,
|
|
@@ -34012,7 +34640,7 @@ const parsedToLabels = (parsed, filterString) => {
|
|
|
34012
34640
|
const {
|
|
34013
34641
|
not
|
|
34014
34642
|
} = temporalClause;
|
|
34015
|
-
op =
|
|
34643
|
+
op = not ? "through" : "is after";
|
|
34016
34644
|
value = displayTimeFromMoment(temporalClause.after);
|
|
34017
34645
|
}
|
|
34018
34646
|
break;
|
|
@@ -34021,7 +34649,7 @@ const parsedToLabels = (parsed, filterString) => {
|
|
|
34021
34649
|
const {
|
|
34022
34650
|
not
|
|
34023
34651
|
} = temporalClause;
|
|
34024
|
-
op = not ? "
|
|
34652
|
+
op = not ? "starting" : "is before";
|
|
34025
34653
|
value = displayTimeFromMoment(temporalClause.before);
|
|
34026
34654
|
}
|
|
34027
34655
|
break;
|
|
@@ -34105,10 +34733,10 @@ function FilterOperations({
|
|
|
34105
34733
|
}
|
|
34106
34734
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
34107
34735
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34108
|
-
..._stylex.props(styles$
|
|
34736
|
+
..._stylex.props(styles$u.title),
|
|
34109
34737
|
children: "filter by"
|
|
34110
34738
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34111
|
-
..._stylex.props(styles$
|
|
34739
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
34112
34740
|
children: filters.map((filterOperation, key2) => {
|
|
34113
34741
|
return /* @__PURE__ */ jsxRuntime.jsx(ErrorElement, {
|
|
34114
34742
|
fallback: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -34198,7 +34826,7 @@ function LimitOperation({
|
|
|
34198
34826
|
}
|
|
34199
34827
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
34200
34828
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34201
|
-
..._stylex.props(styles$
|
|
34829
|
+
..._stylex.props(styles$u.title),
|
|
34202
34830
|
children: "limit"
|
|
34203
34831
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
34204
34832
|
..._stylex.props(hoverStyles.main),
|
|
@@ -34248,10 +34876,10 @@ function OrderByOperations({
|
|
|
34248
34876
|
}
|
|
34249
34877
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
34250
34878
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34251
|
-
..._stylex.props(styles$
|
|
34879
|
+
..._stylex.props(styles$u.title),
|
|
34252
34880
|
children: "order by"
|
|
34253
34881
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34254
|
-
..._stylex.props(styles$
|
|
34882
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
34255
34883
|
children: orderBys.map((orderBy) => {
|
|
34256
34884
|
const {
|
|
34257
34885
|
fieldReference
|
|
@@ -34801,7 +35429,7 @@ function NestOperations({
|
|
|
34801
35429
|
return null;
|
|
34802
35430
|
}
|
|
34803
35431
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34804
|
-
..._stylex.props(styles$
|
|
35432
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
34805
35433
|
children: nests.map((nest) => /* @__PURE__ */ jsxRuntime.jsx(NestOperation, {
|
|
34806
35434
|
rootQuery,
|
|
34807
35435
|
view,
|
|
@@ -35134,9 +35762,9 @@ function Source({
|
|
|
35134
35762
|
}) {
|
|
35135
35763
|
if (rootQuery.definition instanceof QB.ASTArrowQueryDefinition) {
|
|
35136
35764
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
35137
|
-
..._stylex.props(styles$
|
|
35765
|
+
..._stylex.props(styles$u.queryCard, styles$b.content),
|
|
35138
35766
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
35139
|
-
..._stylex.props(styles$
|
|
35767
|
+
..._stylex.props(styles$u.labelWithIcon),
|
|
35140
35768
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
35141
35769
|
name: "database"
|
|
35142
35770
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -36761,7 +37389,10 @@ function FieldTokenWithActions({
|
|
|
36761
37389
|
disabled: !!filterDisabledReason,
|
|
36762
37390
|
onTooltipOpenChange: setIsTooltipOpen
|
|
36763
37391
|
}),
|
|
36764
|
-
onOpenChange: setIsFilterPopoverOpen
|
|
37392
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
37393
|
+
layoutProps: {
|
|
37394
|
+
align: "start"
|
|
37395
|
+
}
|
|
36765
37396
|
}), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
|
|
36766
37397
|
icon: "orderBy",
|
|
36767
37398
|
tooltip: orderByDisabledReason || "Add as order by",
|
|
@@ -36786,7 +37417,10 @@ function FieldTokenWithActions({
|
|
|
36786
37417
|
disabled: !!filterDisabledReason,
|
|
36787
37418
|
onTooltipOpenChange: setIsTooltipOpen
|
|
36788
37419
|
}),
|
|
36789
|
-
onOpenChange: setIsFilterPopoverOpen
|
|
37420
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
37421
|
+
layoutProps: {
|
|
37422
|
+
align: "start"
|
|
37423
|
+
}
|
|
36790
37424
|
}), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
|
|
36791
37425
|
icon: "orderBy",
|
|
36792
37426
|
tooltip: orderByDisabledReason || "Add as order by",
|