@malloydata/malloy-explorer 0.0.285-dev250610181307 → 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 +2046 -1040
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +2048 -1042
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +18 -0
- 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/primitives/utils/icon.d.ts +18 -0
- package/dist/types/components/utils/renderer.d.ts +9 -3
- package/package.json +10 -10
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) " })));
|
|
@@ -3799,6 +3808,7 @@ const SvgRadioChecked = (props2) => /* @__PURE__ */ React__namespace.createEleme
|
|
|
3799
3808
|
const SvgRadioUnchecked = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { height: 16, viewBox: "0 0 16 16", width: 16, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React__namespace.createElement("circle", { cx: 8, cy: 8, r: 8, fill: "currentColor" }), /* @__PURE__ */ React__namespace.createElement("circle", { cx: 8, cy: 8, r: 7, fill: "#FFFFFF" }));
|
|
3800
3809
|
const SvgWarning = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m40-120 440-760 440 760H40Zm138-80h604L480-720 178-200Zm302-40q17 0 28.5-11.5T520-280q0-17-11.5-28.5T480-320q-17 0-28.5 11.5T440-280q0 17 11.5 28.5T480-240Zm-40-120h80v-200h-80v200Zm40-100Z" }));
|
|
3801
3810
|
const SvgCheckCircle = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }));
|
|
3811
|
+
const SvgGear = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { fill: "none", height: 15, viewBox: "0 0 15 15", width: 15, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React__namespace.createElement("g", { clipRule: "evenodd", fill: "#151515", fillRule: "evenodd" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m10 7.50001c0 1.38072-1.11928 2.49999-2.49999 2.49999s-2.5-1.11927-2.5-2.49999c0-1.38071 1.11929-2.5 2.5-2.5s2.49999 1.11929 2.49999 2.5zm-.99999 0c0 .82843-.67157 1.5-1.5 1.5-.82842 0-1.5-.67157-1.5-1.5 0-.82842.67158-1.5 1.5-1.5.82843 0 1.5.67158 1.5 1.5z" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "m8.92908 3.05724c-.34403-1.52302-2.5141-1.52302-2.85813 0-.07078.31333-.43034.46227-.70195.29076-1.3202-.83367-2.85467.7008-2.021 2.021.17151.27161.02257.63117-.29076.70195-1.52302.34403-1.52302 2.5141 0 2.85813.31333.07077.46227.43034.29076.70195-.83367 1.32017.7008 2.85467 2.021 2.02097.27161-.1715.63117-.0225.70195.2908.34403 1.523 2.5141 1.523 2.85813 0 .07077-.3133.43034-.4623.70195-.2908 1.32017.8337 2.85467-.7008 2.02097-2.02097-.1715-.27161-.0225-.63118.2908-.70195 1.523-.34403 1.523-2.5141 0-2.85813-.3133-.07078-.4623-.43034-.2908-.70195.8337-1.3202-.7008-2.85467-2.02097-2.021-.27161.17151-.63118.02257-.70195-.29076zm-1.8827.22034c.1092-.48347.79806-.48347.90727 0 .22296.98707 1.35568 1.45625 2.21135.91595.419-.26464.9061.22246.6415.64154-.5403.85562-.0711 1.98834.916 2.21131.4834.1092.4834.79806 0 .90727-.9871.22296-1.4563 1.35568-.916 2.21135.2646.419-.2225.9061-.6415.6415-.85567-.5403-1.98839-.0711-2.21135.916-.10921.4834-.79807.4834-.90727 0-.22297-.9871-1.35569-1.4563-2.21131-.916-.41908.2646-.90618-.2225-.64154-.6415.5403-.85567.07112-1.98839-.91595-2.21135-.48347-.10921-.48347-.79807 0-.90727.98707-.22297 1.45625-1.35569.91595-2.21131-.26464-.41908.22246-.90618.64154-.64154.85562.5403 1.98834.07112 2.21131-.91595z" })));
|
|
3802
3812
|
const SvgInfo = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }));
|
|
3803
3813
|
const SvgError = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z" }));
|
|
3804
3814
|
const SvgRefresh = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React__namespace.createElement("g", { fill: "none", stroke: "currentColor" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42", strokeWidth: 1.1 }), /* @__PURE__ */ React__namespace.createElement("path", { d: "m9.9 2 2.89 2.89-3 3.01" })));
|
|
@@ -3839,6 +3849,7 @@ const ICON_MAP = {
|
|
|
3839
3849
|
radioUnchecked: SvgRadioUnchecked,
|
|
3840
3850
|
warning: SvgWarning,
|
|
3841
3851
|
check_circle: SvgCheckCircle,
|
|
3852
|
+
gear: SvgGear,
|
|
3842
3853
|
info: SvgInfo,
|
|
3843
3854
|
error: SvgError,
|
|
3844
3855
|
refresh: SvgRefresh,
|
|
@@ -3873,6 +3884,7 @@ const ICON_MAP = {
|
|
|
3873
3884
|
one_to_one: SvgTypeIconOneToOne,
|
|
3874
3885
|
// Visualizations
|
|
3875
3886
|
viz_bar_chart: SvgVizBarChart,
|
|
3887
|
+
viz_bar: SvgVizBarChart,
|
|
3876
3888
|
viz_boolean: SvgVizBoolean,
|
|
3877
3889
|
viz_bytes: SvgVizNumber,
|
|
3878
3890
|
viz_cartesian_chart: SvgVizLine,
|
|
@@ -3882,6 +3894,7 @@ const ICON_MAP = {
|
|
|
3882
3894
|
viz_image: SvgVizImage,
|
|
3883
3895
|
viz_json: SvgVizJson,
|
|
3884
3896
|
viz_line_chart: SvgVizLine,
|
|
3897
|
+
viz_line: SvgVizLine,
|
|
3885
3898
|
viz_link: SvgVizLink,
|
|
3886
3899
|
viz_list: SvgVizList,
|
|
3887
3900
|
viz_list_detail: SvgVizListDetail,
|
|
@@ -3909,11 +3922,11 @@ function Icon({
|
|
|
3909
3922
|
return null;
|
|
3910
3923
|
}
|
|
3911
3924
|
return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {
|
|
3912
|
-
..._stylex.props(styles$
|
|
3925
|
+
..._stylex.props(styles$Q.main, colorVariants$3[color], customStyle),
|
|
3913
3926
|
"data-testid": `icon-${color}-${name}`
|
|
3914
3927
|
});
|
|
3915
3928
|
}
|
|
3916
|
-
const styles$
|
|
3929
|
+
const styles$Q = {
|
|
3917
3930
|
main: {
|
|
3918
3931
|
display: "mly1rg5ohu",
|
|
3919
3932
|
width: "mly1kky2od",
|
|
@@ -3982,18 +3995,18 @@ function Badge({
|
|
|
3982
3995
|
customStyle
|
|
3983
3996
|
}) {
|
|
3984
3997
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
3985
|
-
..._stylex.props(styles$
|
|
3998
|
+
..._stylex.props(styles$P.main, colorVariants$2[color], customStyle),
|
|
3986
3999
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
3987
4000
|
color,
|
|
3988
4001
|
name: icon
|
|
3989
4002
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
3990
4003
|
"data-testid": "badge-label",
|
|
3991
|
-
..._stylex.props(fontStyles.badge, styles$
|
|
4004
|
+
..._stylex.props(fontStyles.badge, styles$P.label),
|
|
3992
4005
|
children: label
|
|
3993
4006
|
})]
|
|
3994
4007
|
});
|
|
3995
4008
|
}
|
|
3996
|
-
const styles$
|
|
4009
|
+
const styles$P = {
|
|
3997
4010
|
main: {
|
|
3998
4011
|
display: "mly3nfvp2",
|
|
3999
4012
|
height: "mly1qx5ct2",
|
|
@@ -4075,10 +4088,10 @@ function Divider({
|
|
|
4075
4088
|
customStyle
|
|
4076
4089
|
}) {
|
|
4077
4090
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
4078
|
-
..._stylex.props(styles$
|
|
4091
|
+
..._stylex.props(styles$O.main, orientationVariants[orientation], customStyle)
|
|
4079
4092
|
});
|
|
4080
4093
|
}
|
|
4081
|
-
const styles$
|
|
4094
|
+
const styles$O = {
|
|
4082
4095
|
main: {
|
|
4083
4096
|
background: "mly1xnbgy5",
|
|
4084
4097
|
backgroundAttachment: null,
|
|
@@ -4884,7 +4897,7 @@ function Button({
|
|
|
4884
4897
|
...props2
|
|
4885
4898
|
}) {
|
|
4886
4899
|
const button = /* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
4887
|
-
..._stylex.props(styles$
|
|
4900
|
+
..._stylex.props(styles$N.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
|
|
4888
4901
|
type: "button",
|
|
4889
4902
|
disabled: isDisabled,
|
|
4890
4903
|
...props2,
|
|
@@ -4894,9 +4907,9 @@ function Button({
|
|
|
4894
4907
|
},
|
|
4895
4908
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
4896
4909
|
name: icon,
|
|
4897
|
-
customStyle: styles$
|
|
4910
|
+
customStyle: styles$N.icon
|
|
4898
4911
|
}), label && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
4899
|
-
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$
|
|
4912
|
+
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$N.label),
|
|
4900
4913
|
children: label
|
|
4901
4914
|
})]
|
|
4902
4915
|
}), isDisabled && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -4923,7 +4936,7 @@ function Button({
|
|
|
4923
4936
|
return button;
|
|
4924
4937
|
}
|
|
4925
4938
|
}
|
|
4926
|
-
const styles$
|
|
4939
|
+
const styles$N = {
|
|
4927
4940
|
main: {
|
|
4928
4941
|
display: "mly3nfvp2",
|
|
4929
4942
|
flexDirection: "mlydt5ytf",
|
|
@@ -5174,7 +5187,7 @@ function Token({
|
|
|
5174
5187
|
}) {
|
|
5175
5188
|
const isInteractive = onClick !== void 0 || asButtonTrigger;
|
|
5176
5189
|
const token2 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
5177
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$
|
|
5190
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$M.nonInteractive, customStyle),
|
|
5178
5191
|
...dragProps == null ? void 0 : dragProps.attributes,
|
|
5179
5192
|
...dragProps == null ? void 0 : dragProps.listeners,
|
|
5180
5193
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
@@ -5205,13 +5218,13 @@ function Token({
|
|
|
5205
5218
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
|
|
5206
5219
|
children: /* @__PURE__ */ jsxRuntime.jsx(Content2$4, {
|
|
5207
5220
|
...tooltipProps,
|
|
5208
|
-
..._stylex.props(typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
|
|
5221
|
+
..._stylex.props(fontStyles.tooltipText, typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
|
|
5209
5222
|
children: tooltip
|
|
5210
5223
|
})
|
|
5211
5224
|
})]
|
|
5212
5225
|
}) : token2;
|
|
5213
5226
|
}
|
|
5214
|
-
const styles$
|
|
5227
|
+
const styles$M = {
|
|
5215
5228
|
nonInteractive: {
|
|
5216
5229
|
cursor: "mlyt0e3qv",
|
|
5217
5230
|
background: "mly1np9qvj",
|
|
@@ -5235,7 +5248,7 @@ function TokenGroup({
|
|
|
5235
5248
|
}) {
|
|
5236
5249
|
const count2 = React__namespace.Children.count(children);
|
|
5237
5250
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
5238
|
-
..._stylex.props(styles$
|
|
5251
|
+
..._stylex.props(styles$L.main, customStyle),
|
|
5239
5252
|
children: React__namespace.Children.map(children, (child, index2) => /* @__PURE__ */ React__namespace.cloneElement(child, {
|
|
5240
5253
|
customStyle: {
|
|
5241
5254
|
...child.props.customStyle,
|
|
@@ -5246,16 +5259,16 @@ function TokenGroup({
|
|
|
5246
5259
|
});
|
|
5247
5260
|
}
|
|
5248
5261
|
const getChildStyle = (index2, count2) => {
|
|
5249
|
-
if (count2 === 1) return styles$
|
|
5250
|
-
if (index2 === 0) return styles$
|
|
5251
|
-
if (index2 === count2 - 1) return styles$
|
|
5252
|
-
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;
|
|
5253
5266
|
};
|
|
5254
5267
|
const getTokenColor = (child, groupColor) => {
|
|
5255
5268
|
const childColor = child.props.color;
|
|
5256
5269
|
return childColor === void 0 ? groupColor : childColor;
|
|
5257
5270
|
};
|
|
5258
|
-
const styles$
|
|
5271
|
+
const styles$L = {
|
|
5259
5272
|
main: {
|
|
5260
5273
|
display: "mlyrvj5dj",
|
|
5261
5274
|
gridAutoFlow: "mly1mt1orb",
|
|
@@ -5327,7 +5340,7 @@ function ErrorIcon({
|
|
|
5327
5340
|
},
|
|
5328
5341
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
5329
5342
|
name: "warning",
|
|
5330
|
-
customStyle: styles$
|
|
5343
|
+
customStyle: styles$K.errorIcon
|
|
5331
5344
|
})
|
|
5332
5345
|
})
|
|
5333
5346
|
}), /* @__PURE__ */ jsxRuntime.jsx(TooltipPortal, {
|
|
@@ -5340,7 +5353,7 @@ function ErrorIcon({
|
|
|
5340
5353
|
})]
|
|
5341
5354
|
});
|
|
5342
5355
|
}
|
|
5343
|
-
const styles$
|
|
5356
|
+
const styles$K = {
|
|
5344
5357
|
errorIcon: {
|
|
5345
5358
|
color: "mly1e2nbdu",
|
|
5346
5359
|
$$css: true
|
|
@@ -5385,22 +5398,22 @@ function EditableToken({
|
|
|
5385
5398
|
className: "mly78zum5 mly6s0dn4"
|
|
5386
5399
|
},
|
|
5387
5400
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
5388
|
-
..._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),
|
|
5389
5402
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
5390
5403
|
name: icon,
|
|
5391
|
-
customStyle: styles$
|
|
5404
|
+
customStyle: styles$J.icon
|
|
5392
5405
|
}), /* @__PURE__ */ jsxRuntime.jsxs("span", {
|
|
5393
5406
|
...{
|
|
5394
5407
|
className: "mlywz0xwf"
|
|
5395
5408
|
},
|
|
5396
5409
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
5397
|
-
..._stylex.props(fontStyles.body, styles$
|
|
5410
|
+
..._stylex.props(fontStyles.body, styles$J.placeholder),
|
|
5398
5411
|
style: {
|
|
5399
5412
|
whiteSpaceCollapse: "preserve"
|
|
5400
5413
|
},
|
|
5401
5414
|
children: value
|
|
5402
5415
|
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
5403
|
-
..._stylex.props(styles$
|
|
5416
|
+
..._stylex.props(styles$J.input, fontStyles.body),
|
|
5404
5417
|
ref: inputRef,
|
|
5405
5418
|
pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
|
|
5406
5419
|
value,
|
|
@@ -5425,7 +5438,7 @@ function EditableToken({
|
|
|
5425
5438
|
})]
|
|
5426
5439
|
});
|
|
5427
5440
|
}
|
|
5428
|
-
const styles$
|
|
5441
|
+
const styles$J = {
|
|
5429
5442
|
focused: {
|
|
5430
5443
|
background: "mlyotlr4g",
|
|
5431
5444
|
backgroundAttachment: null,
|
|
@@ -7767,12 +7780,12 @@ function TextInput({
|
|
|
7767
7780
|
}
|
|
7768
7781
|
};
|
|
7769
7782
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
7770
|
-
..._stylex.props(styles$
|
|
7783
|
+
..._stylex.props(styles$I.main, isFocused && styles$I.focused, sizeVariants[size2], customStyle),
|
|
7771
7784
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
7772
7785
|
name: icon,
|
|
7773
7786
|
color: "secondary"
|
|
7774
7787
|
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
7775
|
-
..._stylex.props(fontStyles.body, styles$
|
|
7788
|
+
..._stylex.props(fontStyles.body, styles$I.input),
|
|
7776
7789
|
value,
|
|
7777
7790
|
placeholder,
|
|
7778
7791
|
onChange: handleChange,
|
|
@@ -7780,7 +7793,7 @@ function TextInput({
|
|
|
7780
7793
|
onBlur: handleBlur,
|
|
7781
7794
|
onKeyDown
|
|
7782
7795
|
}), hasClear && /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
7783
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
7796
|
+
..._stylex.props(fontStyles.supporting, styles$I.actionButton, value === "" && styles$I.hidden),
|
|
7784
7797
|
ref: buttonRef,
|
|
7785
7798
|
onClick: () => onChange(""),
|
|
7786
7799
|
tabIndex: 0,
|
|
@@ -7788,7 +7801,7 @@ function TextInput({
|
|
|
7788
7801
|
})]
|
|
7789
7802
|
});
|
|
7790
7803
|
}
|
|
7791
|
-
const styles$
|
|
7804
|
+
const styles$I = {
|
|
7792
7805
|
main: {
|
|
7793
7806
|
display: "mly78zum5",
|
|
7794
7807
|
alignItems: "mly6s0dn4",
|
|
@@ -7997,7 +8010,7 @@ function SelectorToken({
|
|
|
7997
8010
|
onValueChange: handleValueChange,
|
|
7998
8011
|
required: true,
|
|
7999
8012
|
children: [/* @__PURE__ */ jsxRuntime.jsxs(Trigger$3, {
|
|
8000
|
-
..._stylex.props(tokenStyles.main, styles$
|
|
8013
|
+
..._stylex.props(tokenStyles.main, styles$H.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
|
|
8001
8014
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8002
8015
|
name: icon,
|
|
8003
8016
|
customStyle: tokenStyles.icon
|
|
@@ -8026,7 +8039,7 @@ function SelectorToken({
|
|
|
8026
8039
|
size: "compact",
|
|
8027
8040
|
icon: "search",
|
|
8028
8041
|
hasClear: true,
|
|
8029
|
-
customStyle: styles$
|
|
8042
|
+
customStyle: styles$H.searchInput,
|
|
8030
8043
|
onKeyDown: (event) => {
|
|
8031
8044
|
const excludedKeys = ["ArrowUp", "ArrowDown"];
|
|
8032
8045
|
if (!excludedKeys.includes(event.key)) {
|
|
@@ -8059,21 +8072,21 @@ function SelectItem({
|
|
|
8059
8072
|
...props2
|
|
8060
8073
|
}) {
|
|
8061
8074
|
return /* @__PURE__ */ jsxRuntime.jsxs(Item$1, {
|
|
8062
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8075
|
+
..._stylex.props(fontStyles.body, styles$H.selectItem),
|
|
8063
8076
|
value,
|
|
8064
8077
|
...props2,
|
|
8065
8078
|
children: [value === selectedValue ? /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8066
8079
|
name: "radioChecked",
|
|
8067
|
-
customStyle: styles$
|
|
8080
|
+
customStyle: styles$H.radioChecked
|
|
8068
8081
|
}) : /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8069
8082
|
name: "radioUnchecked",
|
|
8070
|
-
customStyle: styles$
|
|
8083
|
+
customStyle: styles$H.radioUnchecked
|
|
8071
8084
|
}), /* @__PURE__ */ jsxRuntime.jsx(ItemText, {
|
|
8072
8085
|
children
|
|
8073
8086
|
})]
|
|
8074
8087
|
});
|
|
8075
8088
|
}
|
|
8076
|
-
const styles$
|
|
8089
|
+
const styles$H = {
|
|
8077
8090
|
selectTrigger: {
|
|
8078
8091
|
whiteSpace: "mlyuxw1ft",
|
|
8079
8092
|
overflow: "mlyb3r6kr",
|
|
@@ -8163,7 +8176,7 @@ function Card({
|
|
|
8163
8176
|
customStyle
|
|
8164
8177
|
}) {
|
|
8165
8178
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8166
|
-
..._stylex.props(styles$
|
|
8179
|
+
..._stylex.props(styles$G.container, customStyle),
|
|
8167
8180
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
8168
8181
|
...{
|
|
8169
8182
|
className: "mly1717udv"
|
|
@@ -8177,7 +8190,7 @@ function Card({
|
|
|
8177
8190
|
})]
|
|
8178
8191
|
});
|
|
8179
8192
|
}
|
|
8180
|
-
const styles$
|
|
8193
|
+
const styles$G = {
|
|
8181
8194
|
container: {
|
|
8182
8195
|
display: "mly78zum5",
|
|
8183
8196
|
flexDirection: "mlydt5ytf",
|
|
@@ -8270,7 +8283,7 @@ function CollapsiblePanel({
|
|
|
8270
8283
|
},
|
|
8271
8284
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8272
8285
|
name: icon,
|
|
8273
|
-
customStyle: styles$
|
|
8286
|
+
customStyle: styles$F.icon
|
|
8274
8287
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
8275
8288
|
...{
|
|
8276
8289
|
className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4"
|
|
@@ -8312,7 +8325,7 @@ function CollapsiblePanel({
|
|
|
8312
8325
|
})]
|
|
8313
8326
|
});
|
|
8314
8327
|
}
|
|
8315
|
-
const styles$
|
|
8328
|
+
const styles$F = {
|
|
8316
8329
|
icon: {
|
|
8317
8330
|
$$css: true
|
|
8318
8331
|
}
|
|
@@ -8344,10 +8357,10 @@ function CollapsibleListItem({
|
|
|
8344
8357
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
|
|
8345
8358
|
},
|
|
8346
8359
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
8347
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8360
|
+
..._stylex.props(fontStyles.body, styles$E.label),
|
|
8348
8361
|
children: label
|
|
8349
8362
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
8350
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
8363
|
+
..._stylex.props(fontStyles.supporting, styles$E.sublabel),
|
|
8351
8364
|
children: sublabel
|
|
8352
8365
|
})]
|
|
8353
8366
|
})]
|
|
@@ -8359,7 +8372,7 @@ function CollapsibleListItem({
|
|
|
8359
8372
|
})]
|
|
8360
8373
|
});
|
|
8361
8374
|
}
|
|
8362
|
-
const styles$
|
|
8375
|
+
const styles$E = {
|
|
8363
8376
|
label: {
|
|
8364
8377
|
flexGrow: "mly1iyjqo2",
|
|
8365
8378
|
fontWeight: "mly1xlr1w8",
|
|
@@ -19173,7 +19186,7 @@ function Spinner({
|
|
|
19173
19186
|
} = SIZES[size2];
|
|
19174
19187
|
const frameSize = diameter + border * 2;
|
|
19175
19188
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
19176
|
-
..._stylex.props(styles$
|
|
19189
|
+
..._stylex.props(styles$D.root, customStyle),
|
|
19177
19190
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
19178
19191
|
"aria-valuetext": "Loading",
|
|
19179
19192
|
...{
|
|
@@ -19193,7 +19206,7 @@ function Spinner({
|
|
|
19193
19206
|
})
|
|
19194
19207
|
});
|
|
19195
19208
|
}
|
|
19196
|
-
const styles$
|
|
19209
|
+
const styles$D = {
|
|
19197
19210
|
root: {
|
|
19198
19211
|
alignItems: "mly6s0dn4",
|
|
19199
19212
|
display: "mly3nfvp2",
|
|
@@ -23591,7 +23604,7 @@ const Popover = ({
|
|
|
23591
23604
|
})
|
|
23592
23605
|
});
|
|
23593
23606
|
};
|
|
23594
|
-
const styles$
|
|
23607
|
+
const styles$C = {
|
|
23595
23608
|
wrapper: {
|
|
23596
23609
|
position: "mly1n2onr6",
|
|
23597
23610
|
$$css: true
|
|
@@ -23643,7 +23656,7 @@ const SelectDropdown = ({
|
|
|
23643
23656
|
setOpen(false);
|
|
23644
23657
|
};
|
|
23645
23658
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
23646
|
-
..._stylex.props(styles$
|
|
23659
|
+
..._stylex.props(styles$C.wrapper, customStyle),
|
|
23647
23660
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
23648
23661
|
type: "button",
|
|
23649
23662
|
autoFocus,
|
|
@@ -23711,7 +23724,7 @@ function SelectList({
|
|
|
23711
23724
|
const [hoveredIndex, setHoveredIndex] = React.useState(null);
|
|
23712
23725
|
return /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
23713
23726
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
23714
|
-
..._stylex.props(styles$
|
|
23727
|
+
..._stylex.props(styles$C.selectListDiv, customStyle),
|
|
23715
23728
|
children: options.reduce((result, option2, index2) => {
|
|
23716
23729
|
const isSelected = value !== void 0 && valueEqual(value, option2.value);
|
|
23717
23730
|
if (option2.divider) {
|
|
@@ -23743,8 +23756,8 @@ function SelectList({
|
|
|
23743
23756
|
}), /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
23744
23757
|
name: "checkmark",
|
|
23745
23758
|
customStyle: {
|
|
23746
|
-
...styles$
|
|
23747
|
-
...isSelected ? styles$
|
|
23759
|
+
...styles$C.checkIcon,
|
|
23760
|
+
...isSelected ? styles$C.checkIconSelected : void 0
|
|
23748
23761
|
}
|
|
23749
23762
|
}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
23750
23763
|
...{
|
|
@@ -23796,7 +23809,7 @@ const DateInput = ({
|
|
|
23796
23809
|
setTempValue(hooks.utc(value).format(format2));
|
|
23797
23810
|
}, [value, format2]);
|
|
23798
23811
|
return /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
23799
|
-
..._stylex.props(customStyle, isActive ? styles$
|
|
23812
|
+
..._stylex.props(customStyle, isActive ? styles$B.active : null),
|
|
23800
23813
|
type: "text",
|
|
23801
23814
|
placeholder: placeholder || format2,
|
|
23802
23815
|
value: tempValue,
|
|
@@ -23831,7 +23844,7 @@ function guessUnits(moment2, isDateTime) {
|
|
|
23831
23844
|
}
|
|
23832
23845
|
return isDateTime ? "second" : "day";
|
|
23833
23846
|
}
|
|
23834
|
-
const styles$
|
|
23847
|
+
const styles$B = {
|
|
23835
23848
|
active: {
|
|
23836
23849
|
backgroundColor: "mly1vzefiq",
|
|
23837
23850
|
$$css: true
|
|
@@ -23943,7 +23956,7 @@ function DatePicker({
|
|
|
23943
23956
|
});
|
|
23944
23957
|
};
|
|
23945
23958
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
23946
|
-
..._stylex.props(styles$
|
|
23959
|
+
..._stylex.props(styles$A.outer, customStyle),
|
|
23947
23960
|
ref: forwardRef,
|
|
23948
23961
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
23949
23962
|
...{
|
|
@@ -24259,7 +24272,7 @@ function DatePicker({
|
|
|
24259
24272
|
})]
|
|
24260
24273
|
});
|
|
24261
24274
|
}
|
|
24262
|
-
const styles$
|
|
24275
|
+
const styles$A = {
|
|
24263
24276
|
outer: {
|
|
24264
24277
|
userSelect: "mly87ps6o",
|
|
24265
24278
|
fontSize: "mlymhiqyu",
|
|
@@ -24345,7 +24358,7 @@ function Banner({
|
|
|
24345
24358
|
className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
|
|
24346
24359
|
},
|
|
24347
24360
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
24348
|
-
..._stylex.props(styles$
|
|
24361
|
+
..._stylex.props(styles$z.header, variantColors[variant], children ? styles$z.headerWithContent : null),
|
|
24349
24362
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24350
24363
|
...{
|
|
24351
24364
|
className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
|
|
@@ -24358,22 +24371,22 @@ function Banner({
|
|
|
24358
24371
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr"
|
|
24359
24372
|
},
|
|
24360
24373
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24361
|
-
..._stylex.props(styles$
|
|
24374
|
+
..._stylex.props(styles$z.title, fontStyles.emphasized),
|
|
24362
24375
|
children: title
|
|
24363
24376
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24364
|
-
..._stylex.props(styles$
|
|
24377
|
+
..._stylex.props(styles$z.description, fontStyles.supporting),
|
|
24365
24378
|
children: description
|
|
24366
24379
|
})]
|
|
24367
24380
|
})]
|
|
24368
24381
|
}), children && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24369
|
-
..._stylex.props(styles$
|
|
24382
|
+
..._stylex.props(styles$z.content, fontStyles.body),
|
|
24370
24383
|
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
24371
24384
|
children
|
|
24372
24385
|
})
|
|
24373
24386
|
})]
|
|
24374
24387
|
});
|
|
24375
24388
|
}
|
|
24376
|
-
const styles$
|
|
24389
|
+
const styles$z = {
|
|
24377
24390
|
header: {
|
|
24378
24391
|
borderRadius: "mly1q4ynmn",
|
|
24379
24392
|
borderStartStartRadius: null,
|
|
@@ -24515,14 +24528,14 @@ function AccordionList({
|
|
|
24515
24528
|
onExpandedItemChange: handleExpandedItemChange
|
|
24516
24529
|
},
|
|
24517
24530
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24518
|
-
..._stylex.props(styles$
|
|
24531
|
+
..._stylex.props(styles$y.main, customStyle),
|
|
24519
24532
|
children: React__namespace.Children.map(children, (child) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
24520
24533
|
children: [child, /* @__PURE__ */ jsxRuntime.jsx(Divider, {})]
|
|
24521
24534
|
}))
|
|
24522
24535
|
})
|
|
24523
24536
|
});
|
|
24524
24537
|
}
|
|
24525
|
-
const styles$
|
|
24538
|
+
const styles$y = {
|
|
24526
24539
|
main: {
|
|
24527
24540
|
display: "mly78zum5",
|
|
24528
24541
|
flexDirection: "mlydt5ytf",
|
|
@@ -24559,10 +24572,10 @@ function AccordionListItem({
|
|
|
24559
24572
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2"
|
|
24560
24573
|
},
|
|
24561
24574
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
24562
|
-
..._stylex.props(fontStyles.body, styles$
|
|
24575
|
+
..._stylex.props(fontStyles.body, styles$x.label),
|
|
24563
24576
|
children: label
|
|
24564
24577
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
24565
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
24578
|
+
..._stylex.props(fontStyles.supporting, styles$x.sublabel),
|
|
24566
24579
|
children: sublabel
|
|
24567
24580
|
})]
|
|
24568
24581
|
}), badge && badge, endIcon && endIcon]
|
|
@@ -24574,7 +24587,7 @@ function AccordionListItem({
|
|
|
24574
24587
|
})]
|
|
24575
24588
|
});
|
|
24576
24589
|
}
|
|
24577
|
-
const styles$
|
|
24590
|
+
const styles$x = {
|
|
24578
24591
|
label: {
|
|
24579
24592
|
flexGrow: "mly1iyjqo2",
|
|
24580
24593
|
fontWeight: "mly1xlr1w8",
|
|
@@ -25859,7 +25872,7 @@ function DropdownMenu({
|
|
|
25859
25872
|
children: trigger
|
|
25860
25873
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal2, {
|
|
25861
25874
|
children: /* @__PURE__ */ jsxRuntime.jsx(Content2, {
|
|
25862
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25875
|
+
..._stylex.props(fontStyles.body, styles$w.content),
|
|
25863
25876
|
side: "bottom",
|
|
25864
25877
|
align: "start",
|
|
25865
25878
|
sideOffset: 4,
|
|
@@ -25886,22 +25899,22 @@ function DropdownMenuItem({
|
|
|
25886
25899
|
disabled,
|
|
25887
25900
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
25888
25901
|
name: icon,
|
|
25889
|
-
customStyle: styles$
|
|
25902
|
+
customStyle: styles$w.icon
|
|
25890
25903
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
25891
25904
|
...{
|
|
25892
25905
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2"
|
|
25893
25906
|
},
|
|
25894
25907
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25895
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25908
|
+
..._stylex.props(fontStyles.body, styles$w.label),
|
|
25896
25909
|
children: label
|
|
25897
25910
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25898
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
25911
|
+
..._stylex.props(fontStyles.supporting, styles$w.sublabel),
|
|
25899
25912
|
children: sublabel
|
|
25900
25913
|
})]
|
|
25901
25914
|
})]
|
|
25902
25915
|
});
|
|
25903
25916
|
}
|
|
25904
|
-
const styles$
|
|
25917
|
+
const styles$w = {
|
|
25905
25918
|
content: {
|
|
25906
25919
|
display: "mly78zum5",
|
|
25907
25920
|
flexDirection: "mlydt5ytf",
|
|
@@ -25985,7 +25998,7 @@ function QueryActionBar({
|
|
|
25985
25998
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
25986
25999
|
name: "filterSliders"
|
|
25987
26000
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
25988
|
-
..._stylex.props(fontStyles.largeBody, styles$
|
|
26001
|
+
..._stylex.props(fontStyles.largeBody, styles$v.title),
|
|
25989
26002
|
children: "Query"
|
|
25990
26003
|
})]
|
|
25991
26004
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -26030,13 +26043,13 @@ function QueryActionBar({
|
|
|
26030
26043
|
})]
|
|
26031
26044
|
});
|
|
26032
26045
|
}
|
|
26033
|
-
const styles$
|
|
26046
|
+
const styles$v = {
|
|
26034
26047
|
title: {
|
|
26035
26048
|
fontWeight: "mly1xlr1w8",
|
|
26036
26049
|
$$css: true
|
|
26037
26050
|
}
|
|
26038
26051
|
};
|
|
26039
|
-
const styles$
|
|
26052
|
+
const styles$u = {
|
|
26040
26053
|
labelWithIcon: {
|
|
26041
26054
|
display: "mly78zum5",
|
|
26042
26055
|
alignItems: "mly6s0dn4",
|
|
@@ -26166,7 +26179,9 @@ function LiteralValue({
|
|
|
26166
26179
|
});
|
|
26167
26180
|
}
|
|
26168
26181
|
}
|
|
26169
|
-
const
|
|
26182
|
+
const RENDERER_PREFIX = "# ";
|
|
26183
|
+
const VIZ_RENDERERS = ["table", "bar", "dashboard", "json", "line", "list", "list_detail", "point_map", "scatter_chart", "segment_map", "shape_map"];
|
|
26184
|
+
const QUERY_RENDERERS = ["table", "bar_chart", "dashboard", "json", "line_chart", "list", "list_detail", "point_map", "scatter_chart", "segment_map", "shape_map"];
|
|
26170
26185
|
const ATOMIC_RENDERERS = ["number", "boolean", "currency", "image", "url", "percent", "text", "time"];
|
|
26171
26186
|
const RENDERERS = [...QUERY_RENDERERS, ...ATOMIC_RENDERERS];
|
|
26172
26187
|
function tagToRenderer(tag) {
|
|
@@ -26181,6 +26196,16 @@ function tagToRenderer(tag) {
|
|
|
26181
26196
|
}
|
|
26182
26197
|
return null;
|
|
26183
26198
|
}
|
|
26199
|
+
function legacyToViz(name) {
|
|
26200
|
+
switch (name) {
|
|
26201
|
+
case "bar_chart":
|
|
26202
|
+
return "bar";
|
|
26203
|
+
case "line_chart":
|
|
26204
|
+
return "line";
|
|
26205
|
+
default:
|
|
26206
|
+
return name;
|
|
26207
|
+
}
|
|
26208
|
+
}
|
|
26184
26209
|
function atomicTypeToIcon(type) {
|
|
26185
26210
|
return atomicTypeMap[type];
|
|
26186
26211
|
}
|
|
@@ -26276,7 +26301,7 @@ function DrillOperations({
|
|
|
26276
26301
|
}
|
|
26277
26302
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
26278
26303
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
26279
|
-
..._stylex.props(styles$
|
|
26304
|
+
..._stylex.props(styles$u.title),
|
|
26280
26305
|
children: "drills"
|
|
26281
26306
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
26282
26307
|
...{
|
|
@@ -30248,189 +30273,1922 @@ function BadgeForField({
|
|
|
30248
30273
|
label: "view",
|
|
30249
30274
|
icon: "view_filled",
|
|
30250
30275
|
color: "purple",
|
|
30251
|
-
customStyle: styles$
|
|
30276
|
+
customStyle: styles$t.noBackground
|
|
30252
30277
|
});
|
|
30253
30278
|
} else if (field.kind === "dimension") {
|
|
30254
30279
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
30255
30280
|
label: "dimension",
|
|
30256
30281
|
icon: fieldToIcon(field),
|
|
30257
30282
|
color: "cyan",
|
|
30258
|
-
customStyle: styles$
|
|
30283
|
+
customStyle: styles$t.noBackground
|
|
30259
30284
|
});
|
|
30260
30285
|
} else if (field.kind === "measure") {
|
|
30261
30286
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
30262
30287
|
label: "measure",
|
|
30263
30288
|
icon: fieldToIcon(field),
|
|
30264
30289
|
color: "green",
|
|
30265
|
-
customStyle: styles$
|
|
30290
|
+
customStyle: styles$t.noBackground
|
|
30266
30291
|
});
|
|
30267
30292
|
} else if (field.kind === "join") {
|
|
30268
30293
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
30269
30294
|
label: "join",
|
|
30270
30295
|
icon: fieldToIcon(field),
|
|
30271
30296
|
color: "gray",
|
|
30272
|
-
customStyle: styles$
|
|
30297
|
+
customStyle: styles$t.noBackground
|
|
30273
30298
|
});
|
|
30274
30299
|
}
|
|
30275
30300
|
}
|
|
30276
|
-
const styles$
|
|
30301
|
+
const styles$t = {
|
|
30277
30302
|
noBackground: {
|
|
30278
30303
|
backgroundColor: "mlyjbqb8w",
|
|
30279
30304
|
$$css: true
|
|
30280
30305
|
}
|
|
30281
30306
|
};
|
|
30282
|
-
|
|
30283
|
-
|
|
30284
|
-
|
|
30285
|
-
|
|
30307
|
+
var DIALOG_NAME = "Dialog";
|
|
30308
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
30309
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
30310
|
+
var Dialog = (props2) => {
|
|
30286
30311
|
const {
|
|
30287
|
-
|
|
30288
|
-
|
|
30289
|
-
|
|
30290
|
-
|
|
30291
|
-
|
|
30292
|
-
|
|
30293
|
-
|
|
30294
|
-
|
|
30295
|
-
|
|
30296
|
-
const
|
|
30297
|
-
|
|
30298
|
-
|
|
30299
|
-
|
|
30300
|
-
label: snakeToTitle(viz),
|
|
30301
|
-
value: viz,
|
|
30302
|
-
onClick: () => setRenderer(viz)
|
|
30303
|
-
}));
|
|
30304
|
-
const tokens2 = [/* @__PURE__ */ jsxRuntime.jsx(SelectorToken, {
|
|
30305
|
-
customStyle: styles$q.first,
|
|
30306
|
-
icon: `viz_${currentRenderer}`,
|
|
30307
|
-
value: currentRenderer,
|
|
30308
|
-
items: vizes,
|
|
30309
|
-
onChange: (viz) => setRenderer(viz)
|
|
30310
|
-
}, "first")];
|
|
30311
|
-
return /* @__PURE__ */ jsxRuntime.jsx(TokenGroup, {
|
|
30312
|
-
children: tokens2
|
|
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
|
|
30313
30325
|
});
|
|
30314
|
-
|
|
30315
|
-
|
|
30316
|
-
|
|
30317
|
-
|
|
30318
|
-
|
|
30319
|
-
|
|
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
|
+
);
|
|
30320
30363
|
}
|
|
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 }) })) });
|
|
30321
30374
|
};
|
|
30322
|
-
|
|
30323
|
-
|
|
30324
|
-
|
|
30325
|
-
|
|
30326
|
-
|
|
30327
|
-
}
|
|
30328
|
-
|
|
30329
|
-
|
|
30330
|
-
}
|
|
30331
|
-
|
|
30332
|
-
|
|
30333
|
-
|
|
30334
|
-
|
|
30335
|
-
|
|
30336
|
-
|
|
30337
|
-
|
|
30338
|
-
|
|
30339
|
-
|
|
30340
|
-
|
|
30341
|
-
|
|
30342
|
-
|
|
30343
|
-
|
|
30344
|
-
|
|
30345
|
-
|
|
30346
|
-
|
|
30347
|
-
|
|
30348
|
-
}
|
|
30349
|
-
|
|
30350
|
-
|
|
30351
|
-
|
|
30352
|
-
|
|
30353
|
-
|
|
30354
|
-
|
|
30355
|
-
|
|
30356
|
-
|
|
30357
|
-
|
|
30358
|
-
|
|
30359
|
-
|
|
30360
|
-
|
|
30361
|
-
|
|
30362
|
-
|
|
30363
|
-
|
|
30364
|
-
|
|
30365
|
-
|
|
30366
|
-
|
|
30367
|
-
|
|
30368
|
-
|
|
30369
|
-
|
|
30370
|
-
})
|
|
30371
|
-
|
|
30372
|
-
|
|
30373
|
-
|
|
30374
|
-
|
|
30375
|
-
|
|
30376
|
-
|
|
30377
|
-
|
|
30378
|
-
|
|
30379
|
-
|
|
30380
|
-
|
|
30381
|
-
|
|
30382
|
-
|
|
30383
|
-
|
|
30384
|
-
|
|
30385
|
-
|
|
30386
|
-
|
|
30387
|
-
|
|
30388
|
-
|
|
30389
|
-
|
|
30390
|
-
|
|
30391
|
-
|
|
30392
|
-
|
|
30393
|
-
|
|
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;
|
|
30471
|
+
},
|
|
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;
|
|
30479
|
+
}
|
|
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
|
+
}
|
|
30487
|
+
}
|
|
30488
|
+
}
|
|
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
|
+
)
|
|
30521
|
+
}
|
|
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))
|
|
30560
|
+
}
|
|
30561
|
+
);
|
|
30562
|
+
}
|
|
30563
|
+
);
|
|
30564
|
+
DialogClose.displayName = CLOSE_NAME;
|
|
30565
|
+
function getState(open) {
|
|
30566
|
+
return open ? "open" : "closed";
|
|
30394
30567
|
}
|
|
30395
|
-
|
|
30396
|
-
|
|
30397
|
-
|
|
30398
|
-
|
|
30399
|
-
|
|
30400
|
-
|
|
30401
|
-
|
|
30402
|
-
|
|
30403
|
-
|
|
30404
|
-
|
|
30405
|
-
|
|
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",
|
|
30614
|
+
$$css: true
|
|
30615
|
+
},
|
|
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: {
|
|
30643
|
+
display: "mly78zum5",
|
|
30644
|
+
flexDirection: "mlydt5ytf",
|
|
30406
30645
|
gap: "mly167g77z",
|
|
30407
30646
|
rowGap: null,
|
|
30408
30647
|
columnGap: null,
|
|
30409
|
-
|
|
30410
|
-
borderStartStartRadius: null,
|
|
30411
|
-
borderStartEndRadius: null,
|
|
30412
|
-
borderEndStartRadius: null,
|
|
30413
|
-
borderEndEndRadius: null,
|
|
30414
|
-
borderTopLeftRadius: null,
|
|
30415
|
-
borderTopRightRadius: null,
|
|
30416
|
-
borderBottomLeftRadius: null,
|
|
30417
|
-
borderBottomRightRadius: null,
|
|
30418
|
-
backgroundColor: "mly12nb83b",
|
|
30419
|
-
boxSizing: "mly9f619",
|
|
30420
|
-
width: "mlyh8yej3",
|
|
30421
|
-
height: "mly1m3v4wt",
|
|
30422
|
-
overflow: "mlyysyzu8",
|
|
30648
|
+
overflow: "mlyb3r6kr",
|
|
30423
30649
|
overflowX: null,
|
|
30424
30650
|
overflowY: null,
|
|
30425
30651
|
$$css: true
|
|
30426
30652
|
},
|
|
30427
|
-
|
|
30428
|
-
|
|
30429
|
-
|
|
30430
|
-
|
|
30653
|
+
editorGrid: {
|
|
30654
|
+
display: "mlyrvj5dj",
|
|
30655
|
+
gridTemplateColumns: "mly16kridx",
|
|
30656
|
+
gridAutoRows: "mlysd5ean",
|
|
30657
|
+
gap: "mly167g77z",
|
|
30658
|
+
rowGap: null,
|
|
30659
|
+
columnGap: null,
|
|
30660
|
+
overflowY: "mly1odjw0f",
|
|
30431
30661
|
$$css: true
|
|
30432
30662
|
},
|
|
30433
|
-
|
|
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",
|
|
31983
|
+
$$css: true
|
|
31984
|
+
}
|
|
31985
|
+
};
|
|
31986
|
+
function Visualization$1({
|
|
31987
|
+
rootQuery,
|
|
31988
|
+
view
|
|
31989
|
+
}) {
|
|
31990
|
+
const {
|
|
31991
|
+
setQuery
|
|
31992
|
+
} = React.useContext(QueryEditorContext);
|
|
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);
|
|
32027
|
+
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
32028
|
+
};
|
|
32029
|
+
const items = VIZ_RENDERERS.map((viz) => ({
|
|
32030
|
+
icon: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
32031
|
+
name: `viz_${viz}`
|
|
32032
|
+
}),
|
|
32033
|
+
label: snakeToTitle(viz),
|
|
32034
|
+
value: viz,
|
|
32035
|
+
onClick: () => updateViz(viz)
|
|
32036
|
+
}));
|
|
32037
|
+
const tokens2 = [/* @__PURE__ */ jsxRuntime.jsx(SelectorToken, {
|
|
32038
|
+
customStyle: styles$o.first,
|
|
32039
|
+
icon: `viz_${currentRenderer}`,
|
|
32040
|
+
value: currentRenderer,
|
|
32041
|
+
items,
|
|
32042
|
+
onChange: (viz) => updateViz(viz)
|
|
32043
|
+
}, "first")];
|
|
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"));
|
|
32051
|
+
}
|
|
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
|
+
})]
|
|
32063
|
+
});
|
|
32064
|
+
}
|
|
32065
|
+
const styles$o = {
|
|
32066
|
+
trigger: {
|
|
32067
|
+
height: "mly1ktj5wk",
|
|
32068
|
+
$$css: true
|
|
32069
|
+
},
|
|
32070
|
+
group: {
|
|
32071
|
+
width: "mlyh8yej3",
|
|
32072
|
+
gridTemplateColumns: "mly52fmzj",
|
|
32073
|
+
$$css: true
|
|
32074
|
+
},
|
|
32075
|
+
first: {
|
|
32076
|
+
justifyContent: "mlylqzeqv",
|
|
32077
|
+
$$css: true
|
|
32078
|
+
}
|
|
32079
|
+
};
|
|
32080
|
+
function snakeToTitle(snake) {
|
|
32081
|
+
return snake.split("_").map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(" ");
|
|
32082
|
+
}
|
|
32083
|
+
function Visualization({
|
|
32084
|
+
annotations
|
|
32085
|
+
}) {
|
|
32086
|
+
const {
|
|
32087
|
+
tag
|
|
32088
|
+
} = malloyTag.Tag.fromTagLines(annotations.map((annotation) => annotation.value));
|
|
32089
|
+
const renderer = tagToRenderer(tag) ?? "table";
|
|
32090
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Token, {
|
|
32091
|
+
label: snakeToTitle(renderer),
|
|
32092
|
+
icon: `viz_${renderer}`
|
|
32093
|
+
});
|
|
32094
|
+
}
|
|
32095
|
+
function ViewAttributeTable({
|
|
32096
|
+
viewInfo,
|
|
32097
|
+
isCompact,
|
|
32098
|
+
style
|
|
32099
|
+
}) {
|
|
32100
|
+
const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
|
|
32101
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
32102
|
+
..._stylex.props(styles$n.attributeTableContainer, style),
|
|
32103
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("table", {
|
|
32104
|
+
...{
|
|
32105
|
+
className: "mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d"
|
|
32106
|
+
},
|
|
32107
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("tbody", {
|
|
32108
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTableRow, {
|
|
32109
|
+
attribute: "chart type",
|
|
32110
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
32111
|
+
...{
|
|
32112
|
+
className: "mly1rg5ohu"
|
|
32113
|
+
},
|
|
32114
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(Visualization, {
|
|
32115
|
+
annotations: viewInfo.annotations || []
|
|
32116
|
+
})
|
|
32117
|
+
})
|
|
32118
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTableRow, {
|
|
32119
|
+
attribute: "output",
|
|
32120
|
+
children: dimensions.map((f2) => /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
32121
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(FieldToken, {
|
|
32122
|
+
field: f2,
|
|
32123
|
+
size: isCompact ? "compact" : "default"
|
|
32124
|
+
})
|
|
32125
|
+
}, `${f2.kind}::${f2.name}`))
|
|
32126
|
+
})]
|
|
32127
|
+
})
|
|
32128
|
+
})
|
|
32129
|
+
});
|
|
32130
|
+
}
|
|
32131
|
+
function ViewAttributeTableRow({
|
|
32132
|
+
attribute,
|
|
32133
|
+
children
|
|
32134
|
+
}) {
|
|
32135
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("tr", {
|
|
32136
|
+
...{
|
|
32137
|
+
className: "mlydpxx8g"
|
|
32138
|
+
},
|
|
32139
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
32140
|
+
..._stylex.props(styles$n.attributeTableKeyCell, fontStyles.supporting),
|
|
32141
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
32142
|
+
..._stylex.props(styles$n.attributeTableKeyCellContent, fontStyles.supporting),
|
|
32143
|
+
children: attribute
|
|
32144
|
+
})
|
|
32145
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
32146
|
+
...{
|
|
32147
|
+
className: "mly78zum5 mly1a02dak mly195vfkc"
|
|
32148
|
+
},
|
|
32149
|
+
children
|
|
32150
|
+
})]
|
|
32151
|
+
});
|
|
32152
|
+
}
|
|
32153
|
+
const styles$n = {
|
|
32154
|
+
attributeTableContainer: {
|
|
32155
|
+
padding: "mlye8ttls",
|
|
32156
|
+
paddingInline: null,
|
|
32157
|
+
paddingStart: null,
|
|
32158
|
+
paddingLeft: null,
|
|
32159
|
+
paddingEnd: null,
|
|
32160
|
+
paddingRight: null,
|
|
32161
|
+
paddingBlock: null,
|
|
32162
|
+
paddingTop: null,
|
|
32163
|
+
paddingBottom: null,
|
|
32164
|
+
gap: "mly167g77z",
|
|
32165
|
+
rowGap: null,
|
|
32166
|
+
columnGap: null,
|
|
32167
|
+
borderRadius: "mly1q4ynmn",
|
|
32168
|
+
borderStartStartRadius: null,
|
|
32169
|
+
borderStartEndRadius: null,
|
|
32170
|
+
borderEndStartRadius: null,
|
|
32171
|
+
borderEndEndRadius: null,
|
|
32172
|
+
borderTopLeftRadius: null,
|
|
32173
|
+
borderTopRightRadius: null,
|
|
32174
|
+
borderBottomLeftRadius: null,
|
|
32175
|
+
borderBottomRightRadius: null,
|
|
32176
|
+
backgroundColor: "mly12nb83b",
|
|
32177
|
+
boxSizing: "mly9f619",
|
|
32178
|
+
width: "mlyh8yej3",
|
|
32179
|
+
height: "mly1m3v4wt",
|
|
32180
|
+
overflow: "mlyysyzu8",
|
|
32181
|
+
overflowX: null,
|
|
32182
|
+
overflowY: null,
|
|
32183
|
+
$$css: true
|
|
32184
|
+
},
|
|
32185
|
+
attributeTableKeyCell: {
|
|
32186
|
+
whiteSpace: "mlyuxw1ft",
|
|
32187
|
+
width: "mly1f1nlb9",
|
|
32188
|
+
verticalAlign: "mly16dsc37",
|
|
32189
|
+
$$css: true
|
|
32190
|
+
},
|
|
32191
|
+
attributeTableKeyCellContent: {
|
|
30434
32192
|
height: "mly1fgtraw",
|
|
30435
32193
|
display: "mly78zum5",
|
|
30436
32194
|
alignItems: "mly6s0dn4",
|
|
@@ -30524,12 +32282,12 @@ function RichText({
|
|
|
30524
32282
|
});
|
|
30525
32283
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30526
32284
|
ref,
|
|
30527
|
-
..._stylex.props(multiLine && styles$
|
|
32285
|
+
..._stylex.props(multiLine && styles$m.preWrap, multiLine && styles$m.breakWord, customStyle),
|
|
30528
32286
|
...props2,
|
|
30529
32287
|
children: formatted
|
|
30530
32288
|
});
|
|
30531
32289
|
}
|
|
30532
|
-
const styles$
|
|
32290
|
+
const styles$m = {
|
|
30533
32291
|
preWrap: {
|
|
30534
32292
|
whiteSpace: "mly126k92a",
|
|
30535
32293
|
$$css: true
|
|
@@ -30558,7 +32316,7 @@ function HoverText({
|
|
|
30558
32316
|
onMouseEnter: () => setIsTriggerHovered(true),
|
|
30559
32317
|
onMouseLeave: () => setIsTriggerHovered(false),
|
|
30560
32318
|
onPointerMove: (e) => e.preventDefault(),
|
|
30561
|
-
customStyle: [fontStyles.supporting, styles$
|
|
32319
|
+
customStyle: [fontStyles.supporting, styles$l.text],
|
|
30562
32320
|
children: text2
|
|
30563
32321
|
})
|
|
30564
32322
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
|
|
@@ -30577,7 +32335,7 @@ function HoverText({
|
|
|
30577
32335
|
})]
|
|
30578
32336
|
});
|
|
30579
32337
|
}
|
|
30580
|
-
const styles$
|
|
32338
|
+
const styles$l = {
|
|
30581
32339
|
text: {
|
|
30582
32340
|
overflow: "mlyb3r6kr",
|
|
30583
32341
|
overflowX: null,
|
|
@@ -30588,45 +32346,6 @@ const styles$n = {
|
|
|
30588
32346
|
$$css: true
|
|
30589
32347
|
}
|
|
30590
32348
|
};
|
|
30591
|
-
function HoverCard({
|
|
30592
|
-
children,
|
|
30593
|
-
customStyle
|
|
30594
|
-
}) {
|
|
30595
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30596
|
-
..._stylex.props(styles$m.container, fontStyles.body, customStyle),
|
|
30597
|
-
children
|
|
30598
|
-
});
|
|
30599
|
-
}
|
|
30600
|
-
const styles$m = {
|
|
30601
|
-
container: {
|
|
30602
|
-
boxShadow: "mly5n1uv4",
|
|
30603
|
-
backgroundColor: "mly12peec7",
|
|
30604
|
-
borderRadius: "mly4pepcl",
|
|
30605
|
-
borderStartStartRadius: null,
|
|
30606
|
-
borderStartEndRadius: null,
|
|
30607
|
-
borderEndStartRadius: null,
|
|
30608
|
-
borderEndEndRadius: null,
|
|
30609
|
-
borderTopLeftRadius: null,
|
|
30610
|
-
borderTopRightRadius: null,
|
|
30611
|
-
borderBottomLeftRadius: null,
|
|
30612
|
-
borderBottomRightRadius: null,
|
|
30613
|
-
padding: "mlyc7ga6q",
|
|
30614
|
-
paddingInline: null,
|
|
30615
|
-
paddingStart: null,
|
|
30616
|
-
paddingLeft: null,
|
|
30617
|
-
paddingEnd: null,
|
|
30618
|
-
paddingRight: null,
|
|
30619
|
-
paddingBlock: null,
|
|
30620
|
-
paddingTop: null,
|
|
30621
|
-
paddingBottom: null,
|
|
30622
|
-
display: "mly78zum5",
|
|
30623
|
-
flexDirection: "mlydt5ytf",
|
|
30624
|
-
gap: "mly167g77z",
|
|
30625
|
-
rowGap: null,
|
|
30626
|
-
columnGap: null,
|
|
30627
|
-
$$css: true
|
|
30628
|
-
}
|
|
30629
|
-
};
|
|
30630
32349
|
function FieldHoverCard({
|
|
30631
32350
|
field,
|
|
30632
32351
|
path
|
|
@@ -30643,7 +32362,7 @@ function FieldHoverCard({
|
|
|
30643
32362
|
details = /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
|
|
30644
32363
|
viewInfo: field,
|
|
30645
32364
|
isCompact: true,
|
|
30646
|
-
style: styles$
|
|
32365
|
+
style: styles$k.viewAttributeTable
|
|
30647
32366
|
});
|
|
30648
32367
|
} else if (field.kind === "dimension") {
|
|
30649
32368
|
details = /* @__PURE__ */ jsxRuntime.jsx(TopValuesTable, {
|
|
@@ -30652,7 +32371,7 @@ function FieldHoverCard({
|
|
|
30652
32371
|
});
|
|
30653
32372
|
}
|
|
30654
32373
|
return /* @__PURE__ */ jsxRuntime.jsxs(HoverCard, {
|
|
30655
|
-
customStyle: styles$
|
|
32374
|
+
customStyle: styles$k.container,
|
|
30656
32375
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
30657
32376
|
ref,
|
|
30658
32377
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -30663,10 +32382,10 @@ function FieldHoverCard({
|
|
|
30663
32382
|
field
|
|
30664
32383
|
})
|
|
30665
32384
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30666
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
32385
|
+
..._stylex.props(fontStyles.supporting, styles$k.path),
|
|
30667
32386
|
children: pathString
|
|
30668
32387
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30669
|
-
..._stylex.props(fontStyles.emphasized, styles$
|
|
32388
|
+
..._stylex.props(fontStyles.emphasized, styles$k.title),
|
|
30670
32389
|
children: field.name
|
|
30671
32390
|
}), description && /* @__PURE__ */ jsxRuntime.jsx(HoverText, {
|
|
30672
32391
|
text: description,
|
|
@@ -30677,7 +32396,7 @@ function FieldHoverCard({
|
|
|
30677
32396
|
})]
|
|
30678
32397
|
});
|
|
30679
32398
|
}
|
|
30680
|
-
const styles$
|
|
32399
|
+
const styles$k = {
|
|
30681
32400
|
container: {
|
|
30682
32401
|
width: "mlybl57os",
|
|
30683
32402
|
maxHeight: "mlyq3t0pi",
|
|
@@ -30854,335 +32573,6 @@ function BooleanFilterCore({
|
|
|
30854
32573
|
})
|
|
30855
32574
|
});
|
|
30856
32575
|
}
|
|
30857
|
-
function useClickOutside(refOrRefs, handler) {
|
|
30858
|
-
React.useEffect(() => {
|
|
30859
|
-
const refs = Array.isArray(refOrRefs) ? refOrRefs : [refOrRefs];
|
|
30860
|
-
let down = false;
|
|
30861
|
-
const isInOneElement = (ref, event) => {
|
|
30862
|
-
return !ref.current || event.target instanceof Element && ref.current.contains(event.target);
|
|
30863
|
-
};
|
|
30864
|
-
const isInElement = (event) => {
|
|
30865
|
-
return refs.some((ref) => isInOneElement(ref, event));
|
|
30866
|
-
};
|
|
30867
|
-
const onMouseUp = (event) => {
|
|
30868
|
-
if (!down || isInElement(event)) return;
|
|
30869
|
-
handler(event);
|
|
30870
|
-
down = false;
|
|
30871
|
-
};
|
|
30872
|
-
const onMouseDown = (event) => {
|
|
30873
|
-
if (isInElement(event)) return;
|
|
30874
|
-
down = true;
|
|
30875
|
-
};
|
|
30876
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
30877
|
-
document.addEventListener("mousedown", onMouseDown);
|
|
30878
|
-
return () => {
|
|
30879
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
30880
|
-
document.removeEventListener("mousedown", onMouseDown);
|
|
30881
|
-
};
|
|
30882
|
-
}, [refOrRefs, handler]);
|
|
30883
|
-
}
|
|
30884
|
-
const PillInput = ({
|
|
30885
|
-
values,
|
|
30886
|
-
setValues,
|
|
30887
|
-
autoFocus,
|
|
30888
|
-
placeholder,
|
|
30889
|
-
type = "text",
|
|
30890
|
-
value: controlledValue,
|
|
30891
|
-
setValue: setControlledValue,
|
|
30892
|
-
focusElement,
|
|
30893
|
-
color = DEFAULT_TOKEN_COLOR,
|
|
30894
|
-
customStyle
|
|
30895
|
-
}) => {
|
|
30896
|
-
const [uncontrolledValue, setUncontrolledValue] = React.useState("");
|
|
30897
|
-
const [_focused, setFocused] = React.useState(false);
|
|
30898
|
-
const inp = React.useRef(null);
|
|
30899
|
-
const ref = React.useRef(null);
|
|
30900
|
-
const [selectedPill, setSelectedPill] = React.useState(void 0);
|
|
30901
|
-
const pillRefs = React.useRef([]);
|
|
30902
|
-
const value = controlledValue || uncontrolledValue;
|
|
30903
|
-
const setValue = setControlledValue || setUncontrolledValue;
|
|
30904
|
-
const deletePill = React.useCallback((idx) => {
|
|
30905
|
-
var _a2;
|
|
30906
|
-
const newValues = [...values];
|
|
30907
|
-
newValues.splice(idx, 1);
|
|
30908
|
-
setValues(newValues);
|
|
30909
|
-
if (selectedPill === 0) {
|
|
30910
|
-
if (values.length === 1) {
|
|
30911
|
-
setSelectedPill(void 0);
|
|
30912
|
-
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30913
|
-
} else {
|
|
30914
|
-
setSelectedPill(0);
|
|
30915
|
-
}
|
|
30916
|
-
} else {
|
|
30917
|
-
setSelectedPill(idx - 1);
|
|
30918
|
-
}
|
|
30919
|
-
}, [selectedPill, setValues, values]);
|
|
30920
|
-
const pills = React.useMemo(() => {
|
|
30921
|
-
pillRefs.current = new Array(values.length);
|
|
30922
|
-
return values.map((value2, index2) => /* @__PURE__ */ jsxRuntime.jsx(Pill, {
|
|
30923
|
-
color,
|
|
30924
|
-
onClick: () => {
|
|
30925
|
-
setSelectedPill(index2);
|
|
30926
|
-
},
|
|
30927
|
-
onDelete: () => deletePill(index2),
|
|
30928
|
-
forwardRef: (ref2) => {
|
|
30929
|
-
pillRefs.current[index2] = ref2;
|
|
30930
|
-
},
|
|
30931
|
-
children: value2
|
|
30932
|
-
}, value2));
|
|
30933
|
-
}, [color, deletePill, values]);
|
|
30934
|
-
React.useEffect(() => {
|
|
30935
|
-
var _a2;
|
|
30936
|
-
if (selectedPill !== void 0) {
|
|
30937
|
-
(_a2 = pillRefs.current[selectedPill]) == null ? void 0 : _a2.focus();
|
|
30938
|
-
}
|
|
30939
|
-
}, [pills, selectedPill]);
|
|
30940
|
-
const onKeyUp = (event) => {
|
|
30941
|
-
var _a2, _b2;
|
|
30942
|
-
if (event.key === "Backspace") {
|
|
30943
|
-
if (selectedPill !== void 0) {
|
|
30944
|
-
deletePill(selectedPill);
|
|
30945
|
-
}
|
|
30946
|
-
} else if (event.key === "ArrowRight") {
|
|
30947
|
-
if (selectedPill === values.length - 1) {
|
|
30948
|
-
setSelectedPill(void 0);
|
|
30949
|
-
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30950
|
-
} else if (selectedPill !== void 0) {
|
|
30951
|
-
setSelectedPill(selectedPill + 1);
|
|
30952
|
-
}
|
|
30953
|
-
} else if (event.key === "ArrowLeft") {
|
|
30954
|
-
if (selectedPill !== void 0 && selectedPill > 0) {
|
|
30955
|
-
setSelectedPill(selectedPill - 1);
|
|
30956
|
-
}
|
|
30957
|
-
} else {
|
|
30958
|
-
(_b2 = inp.current) == null ? void 0 : _b2.focus();
|
|
30959
|
-
}
|
|
30960
|
-
};
|
|
30961
|
-
const commitValue = () => {
|
|
30962
|
-
if (value.length > 0 && !values.includes(value)) {
|
|
30963
|
-
setValues([...values, value]);
|
|
30964
|
-
setValue("");
|
|
30965
|
-
}
|
|
30966
|
-
};
|
|
30967
|
-
useClickOutside(focusElement ? [ref, focusElement] : ref, () => {
|
|
30968
|
-
setFocused(false);
|
|
30969
|
-
commitValue();
|
|
30970
|
-
});
|
|
30971
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
30972
|
-
..._stylex.props(fontStyles.body, styles$k.main),
|
|
30973
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
30974
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
30975
|
-
..._stylex.props(styles$k.content, customStyle),
|
|
30976
|
-
onKeyUp,
|
|
30977
|
-
onClick: () => {
|
|
30978
|
-
var _a2;
|
|
30979
|
-
return (_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30980
|
-
},
|
|
30981
|
-
ref,
|
|
30982
|
-
children: [pills, /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
30983
|
-
...{
|
|
30984
|
-
className: "mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2"
|
|
30985
|
-
},
|
|
30986
|
-
ref: inp,
|
|
30987
|
-
type,
|
|
30988
|
-
placeholder: values.length === 0 ? placeholder : "",
|
|
30989
|
-
value,
|
|
30990
|
-
size: 1,
|
|
30991
|
-
onChange: (event) => {
|
|
30992
|
-
setValue(event.target.value);
|
|
30993
|
-
},
|
|
30994
|
-
onKeyDown: (event) => {
|
|
30995
|
-
if (event.key === "Enter") {
|
|
30996
|
-
if (value !== "") {
|
|
30997
|
-
commitValue();
|
|
30998
|
-
event.stopPropagation();
|
|
30999
|
-
event.preventDefault();
|
|
31000
|
-
}
|
|
31001
|
-
}
|
|
31002
|
-
},
|
|
31003
|
-
onKeyUp: (event) => {
|
|
31004
|
-
var _a2, _b2, _c2, _d;
|
|
31005
|
-
if (event.key === "Backspace") {
|
|
31006
|
-
if (value === "" && values.length > 0) {
|
|
31007
|
-
commitValue();
|
|
31008
|
-
(_a2 = inp.current) == null ? void 0 : _a2.blur();
|
|
31009
|
-
setSelectedPill(values.length - 1);
|
|
31010
|
-
}
|
|
31011
|
-
} else if (event.key === "ArrowLeft") {
|
|
31012
|
-
if (((_b2 = inp.current) == null ? void 0 : _b2.selectionStart) === 0 || ((_c2 = inp.current) == null ? void 0 : _c2.selectionStart) === null) {
|
|
31013
|
-
commitValue();
|
|
31014
|
-
(_d = inp.current) == null ? void 0 : _d.blur();
|
|
31015
|
-
setSelectedPill(values.length - 1);
|
|
31016
|
-
event.preventDefault();
|
|
31017
|
-
event.stopPropagation();
|
|
31018
|
-
}
|
|
31019
|
-
}
|
|
31020
|
-
},
|
|
31021
|
-
onFocus: () => {
|
|
31022
|
-
setFocused(true);
|
|
31023
|
-
setSelectedPill(void 0);
|
|
31024
|
-
},
|
|
31025
|
-
autoFocus
|
|
31026
|
-
})]
|
|
31027
|
-
})
|
|
31028
|
-
})
|
|
31029
|
-
});
|
|
31030
|
-
};
|
|
31031
|
-
const Pill = ({
|
|
31032
|
-
children,
|
|
31033
|
-
color = DEFAULT_TOKEN_COLOR,
|
|
31034
|
-
forwardRef,
|
|
31035
|
-
onClick,
|
|
31036
|
-
onDelete
|
|
31037
|
-
}) => {
|
|
31038
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31039
|
-
onClick,
|
|
31040
|
-
tabIndex: 0,
|
|
31041
|
-
ref: forwardRef,
|
|
31042
|
-
..._stylex.props(styles$k.pill, colorVariants[color]),
|
|
31043
|
-
children: [children, /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31044
|
-
title: "Remove",
|
|
31045
|
-
...{
|
|
31046
|
-
className: "mly3nfvp2"
|
|
31047
|
-
},
|
|
31048
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(SvgClear, {
|
|
31049
|
-
onClick: () => onDelete(),
|
|
31050
|
-
...{
|
|
31051
|
-
className: "mly6jxa94 mly1v9usgg"
|
|
31052
|
-
}
|
|
31053
|
-
})
|
|
31054
|
-
})]
|
|
31055
|
-
});
|
|
31056
|
-
};
|
|
31057
|
-
const styles$k = {
|
|
31058
|
-
main: {
|
|
31059
|
-
borderRadius: "mly12oqio5",
|
|
31060
|
-
borderStartStartRadius: null,
|
|
31061
|
-
borderStartEndRadius: null,
|
|
31062
|
-
borderEndStartRadius: null,
|
|
31063
|
-
borderEndEndRadius: null,
|
|
31064
|
-
borderTopLeftRadius: null,
|
|
31065
|
-
borderTopRightRadius: null,
|
|
31066
|
-
borderBottomLeftRadius: null,
|
|
31067
|
-
borderBottomRightRadius: null,
|
|
31068
|
-
border: "mlyvckdp7",
|
|
31069
|
-
borderWidth: null,
|
|
31070
|
-
borderInlineWidth: null,
|
|
31071
|
-
borderInlineStartWidth: null,
|
|
31072
|
-
borderLeftWidth: null,
|
|
31073
|
-
borderInlineEndWidth: null,
|
|
31074
|
-
borderRightWidth: null,
|
|
31075
|
-
borderBlockWidth: null,
|
|
31076
|
-
borderTopWidth: null,
|
|
31077
|
-
borderBottomWidth: null,
|
|
31078
|
-
borderStyle: null,
|
|
31079
|
-
borderInlineStyle: null,
|
|
31080
|
-
borderInlineStartStyle: null,
|
|
31081
|
-
borderLeftStyle: null,
|
|
31082
|
-
borderInlineEndStyle: null,
|
|
31083
|
-
borderRightStyle: null,
|
|
31084
|
-
borderBlockStyle: null,
|
|
31085
|
-
borderTopStyle: null,
|
|
31086
|
-
borderBottomStyle: null,
|
|
31087
|
-
borderColor: null,
|
|
31088
|
-
borderInlineColor: null,
|
|
31089
|
-
borderInlineStartColor: null,
|
|
31090
|
-
borderLeftColor: null,
|
|
31091
|
-
borderInlineEndColor: null,
|
|
31092
|
-
borderRightColor: null,
|
|
31093
|
-
borderBlockColor: null,
|
|
31094
|
-
borderTopColor: null,
|
|
31095
|
-
borderBottomColor: null,
|
|
31096
|
-
padding: "mlybsehbd",
|
|
31097
|
-
paddingInline: null,
|
|
31098
|
-
paddingStart: null,
|
|
31099
|
-
paddingLeft: null,
|
|
31100
|
-
paddingEnd: null,
|
|
31101
|
-
paddingRight: null,
|
|
31102
|
-
paddingBlock: null,
|
|
31103
|
-
paddingTop: null,
|
|
31104
|
-
paddingBottom: null,
|
|
31105
|
-
display: "mlyrvj5dj",
|
|
31106
|
-
minHeight: "mly2lwn1j",
|
|
31107
|
-
$$css: true
|
|
31108
|
-
},
|
|
31109
|
-
content: {
|
|
31110
|
-
outline: "mly1a2a7pz",
|
|
31111
|
-
outlineColor: null,
|
|
31112
|
-
outlineOffset: null,
|
|
31113
|
-
outlineStyle: null,
|
|
31114
|
-
outlineWidth: null,
|
|
31115
|
-
display: "mly78zum5",
|
|
31116
|
-
flexWrap: "mly1a02dak",
|
|
31117
|
-
gap: "mly1ed6fcf",
|
|
31118
|
-
rowGap: null,
|
|
31119
|
-
columnGap: null,
|
|
31120
|
-
borderColor: "mly1akygb0 mlyetl2wx",
|
|
31121
|
-
borderInlineColor: null,
|
|
31122
|
-
borderInlineStartColor: null,
|
|
31123
|
-
borderLeftColor: null,
|
|
31124
|
-
borderInlineEndColor: null,
|
|
31125
|
-
borderRightColor: null,
|
|
31126
|
-
borderBlockColor: null,
|
|
31127
|
-
borderTopColor: null,
|
|
31128
|
-
borderBottomColor: null,
|
|
31129
|
-
$$css: true
|
|
31130
|
-
},
|
|
31131
|
-
pill: {
|
|
31132
|
-
backgroundColor: "mlyy9rfsq",
|
|
31133
|
-
borderRadius: "mly1sxf85j",
|
|
31134
|
-
borderStartStartRadius: null,
|
|
31135
|
-
borderStartEndRadius: null,
|
|
31136
|
-
borderEndStartRadius: null,
|
|
31137
|
-
borderEndEndRadius: null,
|
|
31138
|
-
borderTopLeftRadius: null,
|
|
31139
|
-
borderTopRightRadius: null,
|
|
31140
|
-
borderBottomLeftRadius: null,
|
|
31141
|
-
borderBottomRightRadius: null,
|
|
31142
|
-
color: "mly1xre2ib",
|
|
31143
|
-
display: "mly78zum5",
|
|
31144
|
-
alignItems: "mly6s0dn4",
|
|
31145
|
-
gap: "mly1nejdyq",
|
|
31146
|
-
rowGap: null,
|
|
31147
|
-
columnGap: null,
|
|
31148
|
-
padding: "mly1e41zw8",
|
|
31149
|
-
paddingInline: null,
|
|
31150
|
-
paddingStart: null,
|
|
31151
|
-
paddingLeft: null,
|
|
31152
|
-
paddingEnd: null,
|
|
31153
|
-
paddingRight: null,
|
|
31154
|
-
paddingBlock: null,
|
|
31155
|
-
paddingTop: null,
|
|
31156
|
-
paddingBottom: null,
|
|
31157
|
-
textTransform: "mly6mezaz",
|
|
31158
|
-
cursor: "mly1ypdohk",
|
|
31159
|
-
height: "mly1qx5ct2",
|
|
31160
|
-
whiteSpace: "mlyuxw1ft",
|
|
31161
|
-
$$css: true
|
|
31162
|
-
}
|
|
31163
|
-
};
|
|
31164
|
-
const colorVariants = {
|
|
31165
|
-
default: {
|
|
31166
|
-
"--mlyvygx4q": "mly1izbou4",
|
|
31167
|
-
"--mly13n7235": "mly8bgh0r",
|
|
31168
|
-
$$css: true
|
|
31169
|
-
},
|
|
31170
|
-
purple: {
|
|
31171
|
-
"--mlyvygx4q": "mly1f8soc4",
|
|
31172
|
-
"--mly13n7235": "mly1r5zvhd",
|
|
31173
|
-
$$css: true
|
|
31174
|
-
},
|
|
31175
|
-
green: {
|
|
31176
|
-
"--mlyvygx4q": "mlyf8wvcd",
|
|
31177
|
-
"--mly13n7235": "mly1u6t2w6",
|
|
31178
|
-
$$css: true
|
|
31179
|
-
},
|
|
31180
|
-
cyan: {
|
|
31181
|
-
"--mlyvygx4q": "mlyrtwgpv",
|
|
31182
|
-
"--mly13n7235": "mlys5r2en",
|
|
31183
|
-
$$css: true
|
|
31184
|
-
}
|
|
31185
|
-
};
|
|
31186
32576
|
function useSearch(searchTerm, fieldPath) {
|
|
31187
32577
|
const {
|
|
31188
32578
|
topValues
|
|
@@ -31224,6 +32614,7 @@ function useSearch(searchTerm, fieldPath) {
|
|
|
31224
32614
|
function ValueList({
|
|
31225
32615
|
onClick,
|
|
31226
32616
|
search,
|
|
32617
|
+
filter,
|
|
31227
32618
|
fieldPath,
|
|
31228
32619
|
ref,
|
|
31229
32620
|
customStyle,
|
|
@@ -31232,7 +32623,7 @@ function ValueList({
|
|
|
31232
32623
|
const {
|
|
31233
32624
|
searchResults
|
|
31234
32625
|
} = useSearch(search, fieldPath);
|
|
31235
|
-
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]);
|
|
31236
32627
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
31237
32628
|
ref,
|
|
31238
32629
|
..._stylex.props(customStyle),
|
|
@@ -31443,7 +32834,8 @@ const StringFilterCore = ({
|
|
|
31443
32834
|
}
|
|
31444
32835
|
},
|
|
31445
32836
|
customStyle: styles$i.valueList,
|
|
31446
|
-
showPath: false
|
|
32837
|
+
showPath: false,
|
|
32838
|
+
filter: (value) => !currentFilter.values.includes(value)
|
|
31447
32839
|
})
|
|
31448
32840
|
})]
|
|
31449
32841
|
}) : currentFilter.operator === "~" ? /* @__PURE__ */ jsxRuntime.jsx(StringEditor, {
|
|
@@ -31767,11 +33159,8 @@ function makeFilterWithNewType(filter, type) {
|
|
|
31767
33159
|
}
|
|
31768
33160
|
}
|
|
31769
33161
|
function typeFromFilter(filter) {
|
|
31770
|
-
if (filter.operator === "null" && filter.not) {
|
|
31771
|
-
return
|
|
31772
|
-
}
|
|
31773
|
-
if (filter.operator === "before" && filter.not) {
|
|
31774
|
-
return "not_before";
|
|
33162
|
+
if ((filter.operator === "null" || filter.operator === "after" || filter.operator === "before") && filter.not) {
|
|
33163
|
+
return `-${filter.operator}`;
|
|
31775
33164
|
}
|
|
31776
33165
|
return filter.operator;
|
|
31777
33166
|
}
|
|
@@ -31780,7 +33169,7 @@ function unitsFromFilter(filter, isDateTime) {
|
|
|
31780
33169
|
return filter.units;
|
|
31781
33170
|
} else if (filter.operator === "to") {
|
|
31782
33171
|
return guessUnits(filter.fromMoment, isDateTime);
|
|
31783
|
-
} else if (filter.operator === "before"
|
|
33172
|
+
} else if (filter.operator === "before") {
|
|
31784
33173
|
return guessUnits(filter.before, isDateTime);
|
|
31785
33174
|
} else if (filter.operator === "after") {
|
|
31786
33175
|
return guessUnits(filter.after, isDateTime);
|
|
@@ -31827,14 +33216,17 @@ const DateTimeFilterCore = ({
|
|
|
31827
33216
|
value: "next",
|
|
31828
33217
|
label: "next complete"
|
|
31829
33218
|
}, {
|
|
31830
|
-
value: "
|
|
31831
|
-
label: "
|
|
33219
|
+
value: "-before",
|
|
33220
|
+
label: "starting"
|
|
31832
33221
|
}, {
|
|
31833
33222
|
value: "after",
|
|
31834
33223
|
label: "after"
|
|
31835
33224
|
}, {
|
|
31836
33225
|
value: "before",
|
|
31837
33226
|
label: "before"
|
|
33227
|
+
}, {
|
|
33228
|
+
value: "-after",
|
|
33229
|
+
label: "through"
|
|
31838
33230
|
}, {
|
|
31839
33231
|
value: "in",
|
|
31840
33232
|
label: "is"
|
|
@@ -32151,6 +33543,11 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32151
33543
|
let n = "7";
|
|
32152
33544
|
let fromMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
|
|
32153
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
|
+
}
|
|
32154
33551
|
switch (filter.operator) {
|
|
32155
33552
|
case "in_last":
|
|
32156
33553
|
case "last":
|
|
@@ -32183,18 +33580,14 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32183
33580
|
case "after":
|
|
32184
33581
|
return {
|
|
32185
33582
|
operator: type,
|
|
32186
|
-
after: fromMoment
|
|
33583
|
+
after: fromMoment,
|
|
33584
|
+
not
|
|
32187
33585
|
};
|
|
32188
33586
|
case "before":
|
|
32189
33587
|
return {
|
|
32190
33588
|
operator: type,
|
|
32191
|
-
before: fromMoment
|
|
32192
|
-
};
|
|
32193
|
-
case "not_before":
|
|
32194
|
-
return {
|
|
32195
|
-
operator: "before",
|
|
32196
33589
|
before: fromMoment,
|
|
32197
|
-
not
|
|
33590
|
+
not
|
|
32198
33591
|
};
|
|
32199
33592
|
case "in":
|
|
32200
33593
|
return {
|
|
@@ -32209,12 +33602,8 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32209
33602
|
};
|
|
32210
33603
|
case "null":
|
|
32211
33604
|
return {
|
|
32212
|
-
operator:
|
|
32213
|
-
|
|
32214
|
-
case "-null":
|
|
32215
|
-
return {
|
|
32216
|
-
operator: "null",
|
|
32217
|
-
not: true
|
|
33605
|
+
operator: type,
|
|
33606
|
+
not
|
|
32218
33607
|
};
|
|
32219
33608
|
}
|
|
32220
33609
|
return filter;
|
|
@@ -32466,7 +33855,7 @@ function FieldList({
|
|
|
32466
33855
|
..._stylex.props(customStyle),
|
|
32467
33856
|
children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
32468
33857
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
32469
|
-
..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
|
|
33858
|
+
..._stylex.props(addMenuStyles.item, styles$h.fieldItem, styles$h.sticky),
|
|
32470
33859
|
"data-disabled": "true",
|
|
32471
33860
|
children: group.name
|
|
32472
33861
|
}), group.fields.map((field) => isFilterOperation && (field.kind === "dimension" || field.kind === "measure") ? /* @__PURE__ */ jsxRuntime.jsx(FilterPopover, {
|
|
@@ -32532,6 +33921,17 @@ const styles$h = {
|
|
|
32532
33921
|
paddingTop: "mly1y1aw1k",
|
|
32533
33922
|
paddingBottom: "mlywib8y2",
|
|
32534
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
|
|
32535
33935
|
}
|
|
32536
33936
|
};
|
|
32537
33937
|
function FieldMenu({
|
|
@@ -32731,7 +34131,7 @@ function OperationActionTitle({
|
|
|
32731
34131
|
return !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field);
|
|
32732
34132
|
};
|
|
32733
34133
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
32734
|
-
..._stylex.props(styles$
|
|
34134
|
+
..._stylex.props(styles$u.title, hoverStyles.main),
|
|
32735
34135
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
32736
34136
|
children: title
|
|
32737
34137
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -32764,308 +34164,6 @@ function OperationActionTitle({
|
|
|
32764
34164
|
})]
|
|
32765
34165
|
});
|
|
32766
34166
|
}
|
|
32767
|
-
var DIALOG_NAME = "Dialog";
|
|
32768
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
32769
|
-
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
32770
|
-
var Dialog = (props2) => {
|
|
32771
|
-
const {
|
|
32772
|
-
__scopeDialog,
|
|
32773
|
-
children,
|
|
32774
|
-
open: openProp,
|
|
32775
|
-
defaultOpen,
|
|
32776
|
-
onOpenChange,
|
|
32777
|
-
modal = true
|
|
32778
|
-
} = props2;
|
|
32779
|
-
const triggerRef = React__namespace.useRef(null);
|
|
32780
|
-
const contentRef = React__namespace.useRef(null);
|
|
32781
|
-
const [open = false, setOpen] = useControllableState({
|
|
32782
|
-
prop: openProp,
|
|
32783
|
-
defaultProp: defaultOpen,
|
|
32784
|
-
onChange: onOpenChange
|
|
32785
|
-
});
|
|
32786
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32787
|
-
DialogProvider,
|
|
32788
|
-
{
|
|
32789
|
-
scope: __scopeDialog,
|
|
32790
|
-
triggerRef,
|
|
32791
|
-
contentRef,
|
|
32792
|
-
contentId: useId(),
|
|
32793
|
-
titleId: useId(),
|
|
32794
|
-
descriptionId: useId(),
|
|
32795
|
-
open,
|
|
32796
|
-
onOpenChange: setOpen,
|
|
32797
|
-
onOpenToggle: React__namespace.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
32798
|
-
modal,
|
|
32799
|
-
children
|
|
32800
|
-
}
|
|
32801
|
-
);
|
|
32802
|
-
};
|
|
32803
|
-
Dialog.displayName = DIALOG_NAME;
|
|
32804
|
-
var TRIGGER_NAME$1 = "DialogTrigger";
|
|
32805
|
-
var DialogTrigger = React__namespace.forwardRef(
|
|
32806
|
-
(props2, forwardedRef) => {
|
|
32807
|
-
const { __scopeDialog, ...triggerProps } = props2;
|
|
32808
|
-
const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
|
|
32809
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
32810
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32811
|
-
Primitive.button,
|
|
32812
|
-
{
|
|
32813
|
-
type: "button",
|
|
32814
|
-
"aria-haspopup": "dialog",
|
|
32815
|
-
"aria-expanded": context.open,
|
|
32816
|
-
"aria-controls": context.contentId,
|
|
32817
|
-
"data-state": getState(context.open),
|
|
32818
|
-
...triggerProps,
|
|
32819
|
-
ref: composedTriggerRef,
|
|
32820
|
-
onClick: composeEventHandlers(props2.onClick, context.onOpenToggle)
|
|
32821
|
-
}
|
|
32822
|
-
);
|
|
32823
|
-
}
|
|
32824
|
-
);
|
|
32825
|
-
DialogTrigger.displayName = TRIGGER_NAME$1;
|
|
32826
|
-
var PORTAL_NAME = "DialogPortal";
|
|
32827
|
-
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
32828
|
-
forceMount: void 0
|
|
32829
|
-
});
|
|
32830
|
-
var DialogPortal = (props2) => {
|
|
32831
|
-
const { __scopeDialog, forceMount, children, container } = props2;
|
|
32832
|
-
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
32833
|
-
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 }) })) });
|
|
32834
|
-
};
|
|
32835
|
-
DialogPortal.displayName = PORTAL_NAME;
|
|
32836
|
-
var OVERLAY_NAME = "DialogOverlay";
|
|
32837
|
-
var DialogOverlay = React__namespace.forwardRef(
|
|
32838
|
-
(props2, forwardedRef) => {
|
|
32839
|
-
const portalContext = usePortalContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
32840
|
-
const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
|
|
32841
|
-
const context = useDialogContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
32842
|
-
return context.modal ? /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsxRuntime.jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
32843
|
-
}
|
|
32844
|
-
);
|
|
32845
|
-
DialogOverlay.displayName = OVERLAY_NAME;
|
|
32846
|
-
var DialogOverlayImpl = React__namespace.forwardRef(
|
|
32847
|
-
(props2, forwardedRef) => {
|
|
32848
|
-
const { __scopeDialog, ...overlayProps } = props2;
|
|
32849
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
32850
|
-
return (
|
|
32851
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
32852
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
32853
|
-
/* @__PURE__ */ jsxRuntime.jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32854
|
-
Primitive.div,
|
|
32855
|
-
{
|
|
32856
|
-
"data-state": getState(context.open),
|
|
32857
|
-
...overlayProps,
|
|
32858
|
-
ref: forwardedRef,
|
|
32859
|
-
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
32860
|
-
}
|
|
32861
|
-
) })
|
|
32862
|
-
);
|
|
32863
|
-
}
|
|
32864
|
-
);
|
|
32865
|
-
var CONTENT_NAME$1 = "DialogContent";
|
|
32866
|
-
var DialogContent = React__namespace.forwardRef(
|
|
32867
|
-
(props2, forwardedRef) => {
|
|
32868
|
-
const portalContext = usePortalContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
32869
|
-
const { forceMount = portalContext.forceMount, ...contentProps } = props2;
|
|
32870
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
32871
|
-
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 }) });
|
|
32872
|
-
}
|
|
32873
|
-
);
|
|
32874
|
-
DialogContent.displayName = CONTENT_NAME$1;
|
|
32875
|
-
var DialogContentModal = React__namespace.forwardRef(
|
|
32876
|
-
(props2, forwardedRef) => {
|
|
32877
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
32878
|
-
const contentRef = React__namespace.useRef(null);
|
|
32879
|
-
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
32880
|
-
React__namespace.useEffect(() => {
|
|
32881
|
-
const content = contentRef.current;
|
|
32882
|
-
if (content) return hideOthers(content);
|
|
32883
|
-
}, []);
|
|
32884
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32885
|
-
DialogContentImpl,
|
|
32886
|
-
{
|
|
32887
|
-
...props2,
|
|
32888
|
-
ref: composedRefs,
|
|
32889
|
-
trapFocus: context.open,
|
|
32890
|
-
disableOutsidePointerEvents: true,
|
|
32891
|
-
onCloseAutoFocus: composeEventHandlers(props2.onCloseAutoFocus, (event) => {
|
|
32892
|
-
var _a2;
|
|
32893
|
-
event.preventDefault();
|
|
32894
|
-
(_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
|
|
32895
|
-
}),
|
|
32896
|
-
onPointerDownOutside: composeEventHandlers(props2.onPointerDownOutside, (event) => {
|
|
32897
|
-
const originalEvent = event.detail.originalEvent;
|
|
32898
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
32899
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
32900
|
-
if (isRightClick) event.preventDefault();
|
|
32901
|
-
}),
|
|
32902
|
-
onFocusOutside: composeEventHandlers(
|
|
32903
|
-
props2.onFocusOutside,
|
|
32904
|
-
(event) => event.preventDefault()
|
|
32905
|
-
)
|
|
32906
|
-
}
|
|
32907
|
-
);
|
|
32908
|
-
}
|
|
32909
|
-
);
|
|
32910
|
-
var DialogContentNonModal = React__namespace.forwardRef(
|
|
32911
|
-
(props2, forwardedRef) => {
|
|
32912
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
32913
|
-
const hasInteractedOutsideRef = React__namespace.useRef(false);
|
|
32914
|
-
const hasPointerDownOutsideRef = React__namespace.useRef(false);
|
|
32915
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
32916
|
-
DialogContentImpl,
|
|
32917
|
-
{
|
|
32918
|
-
...props2,
|
|
32919
|
-
ref: forwardedRef,
|
|
32920
|
-
trapFocus: false,
|
|
32921
|
-
disableOutsidePointerEvents: false,
|
|
32922
|
-
onCloseAutoFocus: (event) => {
|
|
32923
|
-
var _a2, _b2;
|
|
32924
|
-
(_a2 = props2.onCloseAutoFocus) == null ? void 0 : _a2.call(props2, event);
|
|
32925
|
-
if (!event.defaultPrevented) {
|
|
32926
|
-
if (!hasInteractedOutsideRef.current) (_b2 = context.triggerRef.current) == null ? void 0 : _b2.focus();
|
|
32927
|
-
event.preventDefault();
|
|
32928
|
-
}
|
|
32929
|
-
hasInteractedOutsideRef.current = false;
|
|
32930
|
-
hasPointerDownOutsideRef.current = false;
|
|
32931
|
-
},
|
|
32932
|
-
onInteractOutside: (event) => {
|
|
32933
|
-
var _a2, _b2;
|
|
32934
|
-
(_a2 = props2.onInteractOutside) == null ? void 0 : _a2.call(props2, event);
|
|
32935
|
-
if (!event.defaultPrevented) {
|
|
32936
|
-
hasInteractedOutsideRef.current = true;
|
|
32937
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
32938
|
-
hasPointerDownOutsideRef.current = true;
|
|
32939
|
-
}
|
|
32940
|
-
}
|
|
32941
|
-
const target = event.target;
|
|
32942
|
-
const targetIsTrigger = (_b2 = context.triggerRef.current) == null ? void 0 : _b2.contains(target);
|
|
32943
|
-
if (targetIsTrigger) event.preventDefault();
|
|
32944
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
32945
|
-
event.preventDefault();
|
|
32946
|
-
}
|
|
32947
|
-
}
|
|
32948
|
-
}
|
|
32949
|
-
);
|
|
32950
|
-
}
|
|
32951
|
-
);
|
|
32952
|
-
var DialogContentImpl = React__namespace.forwardRef(
|
|
32953
|
-
(props2, forwardedRef) => {
|
|
32954
|
-
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
|
|
32955
|
-
const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
|
|
32956
|
-
const contentRef = React__namespace.useRef(null);
|
|
32957
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
32958
|
-
useFocusGuards();
|
|
32959
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32960
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
32961
|
-
FocusScope,
|
|
32962
|
-
{
|
|
32963
|
-
asChild: true,
|
|
32964
|
-
loop: true,
|
|
32965
|
-
trapped: trapFocus,
|
|
32966
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
32967
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
32968
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
32969
|
-
DismissableLayer,
|
|
32970
|
-
{
|
|
32971
|
-
role: "dialog",
|
|
32972
|
-
id: context.contentId,
|
|
32973
|
-
"aria-describedby": context.descriptionId,
|
|
32974
|
-
"aria-labelledby": context.titleId,
|
|
32975
|
-
"data-state": getState(context.open),
|
|
32976
|
-
...contentProps,
|
|
32977
|
-
ref: composedRefs,
|
|
32978
|
-
onDismiss: () => context.onOpenChange(false)
|
|
32979
|
-
}
|
|
32980
|
-
)
|
|
32981
|
-
}
|
|
32982
|
-
),
|
|
32983
|
-
/* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
32984
|
-
/* @__PURE__ */ jsxRuntime.jsx(TitleWarning, { titleId: context.titleId }),
|
|
32985
|
-
/* @__PURE__ */ jsxRuntime.jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
32986
|
-
] })
|
|
32987
|
-
] });
|
|
32988
|
-
}
|
|
32989
|
-
);
|
|
32990
|
-
var TITLE_NAME = "DialogTitle";
|
|
32991
|
-
var DialogTitle = React__namespace.forwardRef(
|
|
32992
|
-
(props2, forwardedRef) => {
|
|
32993
|
-
const { __scopeDialog, ...titleProps } = props2;
|
|
32994
|
-
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
32995
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
32996
|
-
}
|
|
32997
|
-
);
|
|
32998
|
-
DialogTitle.displayName = TITLE_NAME;
|
|
32999
|
-
var DESCRIPTION_NAME = "DialogDescription";
|
|
33000
|
-
var DialogDescription = React__namespace.forwardRef(
|
|
33001
|
-
(props2, forwardedRef) => {
|
|
33002
|
-
const { __scopeDialog, ...descriptionProps } = props2;
|
|
33003
|
-
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
33004
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
33005
|
-
}
|
|
33006
|
-
);
|
|
33007
|
-
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
33008
|
-
var CLOSE_NAME = "DialogClose";
|
|
33009
|
-
var DialogClose = React__namespace.forwardRef(
|
|
33010
|
-
(props2, forwardedRef) => {
|
|
33011
|
-
const { __scopeDialog, ...closeProps } = props2;
|
|
33012
|
-
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
33013
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
33014
|
-
Primitive.button,
|
|
33015
|
-
{
|
|
33016
|
-
type: "button",
|
|
33017
|
-
...closeProps,
|
|
33018
|
-
ref: forwardedRef,
|
|
33019
|
-
onClick: composeEventHandlers(props2.onClick, () => context.onOpenChange(false))
|
|
33020
|
-
}
|
|
33021
|
-
);
|
|
33022
|
-
}
|
|
33023
|
-
);
|
|
33024
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
33025
|
-
function getState(open) {
|
|
33026
|
-
return open ? "open" : "closed";
|
|
33027
|
-
}
|
|
33028
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
33029
|
-
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
33030
|
-
contentName: CONTENT_NAME$1,
|
|
33031
|
-
titleName: TITLE_NAME,
|
|
33032
|
-
docsSlug: "dialog"
|
|
33033
|
-
});
|
|
33034
|
-
var TitleWarning = ({ titleId }) => {
|
|
33035
|
-
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
33036
|
-
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
33037
|
-
|
|
33038
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
33039
|
-
|
|
33040
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
33041
|
-
React__namespace.useEffect(() => {
|
|
33042
|
-
if (titleId) {
|
|
33043
|
-
const hasTitle = document.getElementById(titleId);
|
|
33044
|
-
if (!hasTitle) console.error(MESSAGE);
|
|
33045
|
-
}
|
|
33046
|
-
}, [MESSAGE, titleId]);
|
|
33047
|
-
return null;
|
|
33048
|
-
};
|
|
33049
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
33050
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
33051
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
33052
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
33053
|
-
React__namespace.useEffect(() => {
|
|
33054
|
-
var _a2;
|
|
33055
|
-
const describedById = (_a2 = contentRef.current) == null ? void 0 : _a2.getAttribute("aria-describedby");
|
|
33056
|
-
if (descriptionId && describedById) {
|
|
33057
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
33058
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
33059
|
-
}
|
|
33060
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
33061
|
-
return null;
|
|
33062
|
-
};
|
|
33063
|
-
var Root = Dialog;
|
|
33064
|
-
var Portal = DialogPortal;
|
|
33065
|
-
var Overlay = DialogOverlay;
|
|
33066
|
-
var Content$1 = DialogContent;
|
|
33067
|
-
var Title = DialogTitle;
|
|
33068
|
-
var Description = DialogDescription;
|
|
33069
34167
|
function RenameDialog({
|
|
33070
34168
|
rootQuery,
|
|
33071
34169
|
view,
|
|
@@ -33099,29 +34197,19 @@ function RenameDialog({
|
|
|
33099
34197
|
onOpenChange: setOpen,
|
|
33100
34198
|
children: /* @__PURE__ */ jsxRuntime.jsx(Portal, {
|
|
33101
34199
|
children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, {
|
|
33102
|
-
...
|
|
33103
|
-
className: "mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h"
|
|
33104
|
-
},
|
|
34200
|
+
..._stylex.props(dialogStyles.overlay),
|
|
33105
34201
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Content$1, {
|
|
33106
34202
|
..._stylex.props(dialogStyles.content, fontStyles.body),
|
|
33107
34203
|
children: [/* @__PURE__ */ jsxRuntime.jsxs(Description, {
|
|
33108
|
-
...
|
|
33109
|
-
className: "mly1s85apg"
|
|
33110
|
-
},
|
|
34204
|
+
..._stylex.props(dialogStyles.displayNone),
|
|
33111
34205
|
children: ["Rename ", target.name]
|
|
33112
34206
|
}), /* @__PURE__ */ jsxRuntime.jsxs(Title, {
|
|
33113
|
-
...
|
|
33114
|
-
className: "mly1j61zf2 mly1ghz6dp"
|
|
33115
|
-
},
|
|
34207
|
+
..._stylex.props(dialogStyles.title),
|
|
33116
34208
|
children: ["Rename ", target.name]
|
|
33117
34209
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33118
|
-
...
|
|
33119
|
-
className: "mlyqyf9gi mly78zum5 mlydt5ytf mly167g77z"
|
|
33120
|
-
},
|
|
34210
|
+
..._stylex.props(dialogStyles.editor),
|
|
33121
34211
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33122
|
-
...
|
|
33123
|
-
className: "mly78zum5 mly167g77z"
|
|
33124
|
-
},
|
|
34212
|
+
..._stylex.props(dialogStyles.editorRow),
|
|
33125
34213
|
children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
33126
34214
|
value: name,
|
|
33127
34215
|
onChange: (event) => setName(event.target.value),
|
|
@@ -33140,9 +34228,7 @@ function RenameDialog({
|
|
|
33140
34228
|
errorMessage: "Name already in use"
|
|
33141
34229
|
})]
|
|
33142
34230
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33143
|
-
...
|
|
33144
|
-
className: "mly78zum5 mly167g77z"
|
|
33145
|
-
},
|
|
34231
|
+
..._stylex.props(dialogStyles.editorRow),
|
|
33146
34232
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
33147
34233
|
label: "Cancel",
|
|
33148
34234
|
onClick: () => setOpen(false),
|
|
@@ -33161,92 +34247,6 @@ function RenameDialog({
|
|
|
33161
34247
|
})
|
|
33162
34248
|
});
|
|
33163
34249
|
}
|
|
33164
|
-
const dialogStyles = {
|
|
33165
|
-
content: {
|
|
33166
|
-
display: "mly78zum5",
|
|
33167
|
-
flexDirection: "mlydt5ytf",
|
|
33168
|
-
boxShadow: "mly5n1uv4",
|
|
33169
|
-
backgroundColor: "mly12peec7",
|
|
33170
|
-
borderRadius: "mlyur7f20",
|
|
33171
|
-
borderStartStartRadius: null,
|
|
33172
|
-
borderStartEndRadius: null,
|
|
33173
|
-
borderEndStartRadius: null,
|
|
33174
|
-
borderEndEndRadius: null,
|
|
33175
|
-
borderTopLeftRadius: null,
|
|
33176
|
-
borderTopRightRadius: null,
|
|
33177
|
-
borderBottomLeftRadius: null,
|
|
33178
|
-
borderBottomRightRadius: null,
|
|
33179
|
-
padding: "mlye8ttls",
|
|
33180
|
-
paddingInline: null,
|
|
33181
|
-
paddingStart: null,
|
|
33182
|
-
paddingLeft: null,
|
|
33183
|
-
paddingEnd: null,
|
|
33184
|
-
paddingRight: null,
|
|
33185
|
-
paddingBlock: null,
|
|
33186
|
-
paddingTop: null,
|
|
33187
|
-
paddingBottom: null,
|
|
33188
|
-
minWidth: "mlylm99nl",
|
|
33189
|
-
maxWidth: "mly1jkqq1h",
|
|
33190
|
-
gap: "mly167g77z",
|
|
33191
|
-
rowGap: null,
|
|
33192
|
-
columnGap: null,
|
|
33193
|
-
$$css: true
|
|
33194
|
-
},
|
|
33195
|
-
editorCell: {
|
|
33196
|
-
flexGrow: "mly1iyjqo2",
|
|
33197
|
-
$$css: true
|
|
33198
|
-
},
|
|
33199
|
-
input: {
|
|
33200
|
-
border: "mly2yh2zd",
|
|
33201
|
-
borderWidth: null,
|
|
33202
|
-
borderInlineWidth: null,
|
|
33203
|
-
borderInlineStartWidth: null,
|
|
33204
|
-
borderLeftWidth: null,
|
|
33205
|
-
borderInlineEndWidth: null,
|
|
33206
|
-
borderRightWidth: null,
|
|
33207
|
-
borderBlockWidth: null,
|
|
33208
|
-
borderTopWidth: null,
|
|
33209
|
-
borderBottomWidth: null,
|
|
33210
|
-
borderStyle: null,
|
|
33211
|
-
borderInlineStyle: null,
|
|
33212
|
-
borderInlineStartStyle: null,
|
|
33213
|
-
borderLeftStyle: null,
|
|
33214
|
-
borderInlineEndStyle: null,
|
|
33215
|
-
borderRightStyle: null,
|
|
33216
|
-
borderBlockStyle: null,
|
|
33217
|
-
borderTopStyle: null,
|
|
33218
|
-
borderBottomStyle: null,
|
|
33219
|
-
borderColor: null,
|
|
33220
|
-
borderInlineColor: null,
|
|
33221
|
-
borderInlineStartColor: null,
|
|
33222
|
-
borderLeftColor: null,
|
|
33223
|
-
borderInlineEndColor: null,
|
|
33224
|
-
borderRightColor: null,
|
|
33225
|
-
borderBlockColor: null,
|
|
33226
|
-
borderTopColor: null,
|
|
33227
|
-
borderBottomColor: null,
|
|
33228
|
-
color: "mlyizdh9v",
|
|
33229
|
-
padding: "mly9cpjcd",
|
|
33230
|
-
paddingInline: null,
|
|
33231
|
-
paddingStart: null,
|
|
33232
|
-
paddingLeft: null,
|
|
33233
|
-
paddingEnd: null,
|
|
33234
|
-
paddingRight: null,
|
|
33235
|
-
paddingBlock: null,
|
|
33236
|
-
paddingTop: null,
|
|
33237
|
-
paddingBottom: null,
|
|
33238
|
-
borderRadius: "mly1sxf85j",
|
|
33239
|
-
borderStartStartRadius: null,
|
|
33240
|
-
borderStartEndRadius: null,
|
|
33241
|
-
borderEndStartRadius: null,
|
|
33242
|
-
borderEndEndRadius: null,
|
|
33243
|
-
borderTopLeftRadius: null,
|
|
33244
|
-
borderTopRightRadius: null,
|
|
33245
|
-
borderBottomLeftRadius: null,
|
|
33246
|
-
borderBottomRightRadius: null,
|
|
33247
|
-
$$css: true
|
|
33248
|
-
}
|
|
33249
|
-
};
|
|
33250
34250
|
function SortableOperations({
|
|
33251
34251
|
rootQuery,
|
|
33252
34252
|
segment,
|
|
@@ -33308,7 +34308,7 @@ function SortableOperations({
|
|
|
33308
34308
|
fields,
|
|
33309
34309
|
...props2
|
|
33310
34310
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33311
|
-
..._stylex.props(styles$
|
|
34311
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
33312
34312
|
children: /* @__PURE__ */ jsxRuntime.jsx(DndContext, {
|
|
33313
34313
|
sensors,
|
|
33314
34314
|
collisionDetection: closestCenter,
|
|
@@ -33640,7 +34640,7 @@ const parsedToLabels = (parsed, filterString) => {
|
|
|
33640
34640
|
const {
|
|
33641
34641
|
not
|
|
33642
34642
|
} = temporalClause;
|
|
33643
|
-
op =
|
|
34643
|
+
op = not ? "through" : "is after";
|
|
33644
34644
|
value = displayTimeFromMoment(temporalClause.after);
|
|
33645
34645
|
}
|
|
33646
34646
|
break;
|
|
@@ -33649,7 +34649,7 @@ const parsedToLabels = (parsed, filterString) => {
|
|
|
33649
34649
|
const {
|
|
33650
34650
|
not
|
|
33651
34651
|
} = temporalClause;
|
|
33652
|
-
op = not ? "
|
|
34652
|
+
op = not ? "starting" : "is before";
|
|
33653
34653
|
value = displayTimeFromMoment(temporalClause.before);
|
|
33654
34654
|
}
|
|
33655
34655
|
break;
|
|
@@ -33733,10 +34733,10 @@ function FilterOperations({
|
|
|
33733
34733
|
}
|
|
33734
34734
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33735
34735
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33736
|
-
..._stylex.props(styles$
|
|
34736
|
+
..._stylex.props(styles$u.title),
|
|
33737
34737
|
children: "filter by"
|
|
33738
34738
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33739
|
-
..._stylex.props(styles$
|
|
34739
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
33740
34740
|
children: filters.map((filterOperation, key2) => {
|
|
33741
34741
|
return /* @__PURE__ */ jsxRuntime.jsx(ErrorElement, {
|
|
33742
34742
|
fallback: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -33826,7 +34826,7 @@ function LimitOperation({
|
|
|
33826
34826
|
}
|
|
33827
34827
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33828
34828
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33829
|
-
..._stylex.props(styles$
|
|
34829
|
+
..._stylex.props(styles$u.title),
|
|
33830
34830
|
children: "limit"
|
|
33831
34831
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33832
34832
|
..._stylex.props(hoverStyles.main),
|
|
@@ -33876,10 +34876,10 @@ function OrderByOperations({
|
|
|
33876
34876
|
}
|
|
33877
34877
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
33878
34878
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33879
|
-
..._stylex.props(styles$
|
|
34879
|
+
..._stylex.props(styles$u.title),
|
|
33880
34880
|
children: "order by"
|
|
33881
34881
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
33882
|
-
..._stylex.props(styles$
|
|
34882
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
33883
34883
|
children: orderBys.map((orderBy) => {
|
|
33884
34884
|
const {
|
|
33885
34885
|
fieldReference
|
|
@@ -34429,7 +35429,7 @@ function NestOperations({
|
|
|
34429
35429
|
return null;
|
|
34430
35430
|
}
|
|
34431
35431
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34432
|
-
..._stylex.props(styles$
|
|
35432
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
34433
35433
|
children: nests.map((nest) => /* @__PURE__ */ jsxRuntime.jsx(NestOperation, {
|
|
34434
35434
|
rootQuery,
|
|
34435
35435
|
view,
|
|
@@ -34762,9 +35762,9 @@ function Source({
|
|
|
34762
35762
|
}) {
|
|
34763
35763
|
if (rootQuery.definition instanceof QB.ASTArrowQueryDefinition) {
|
|
34764
35764
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
34765
|
-
..._stylex.props(styles$
|
|
35765
|
+
..._stylex.props(styles$u.queryCard, styles$b.content),
|
|
34766
35766
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
34767
|
-
..._stylex.props(styles$
|
|
35767
|
+
..._stylex.props(styles$u.labelWithIcon),
|
|
34768
35768
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
34769
35769
|
name: "database"
|
|
34770
35770
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -36389,7 +37389,10 @@ function FieldTokenWithActions({
|
|
|
36389
37389
|
disabled: !!filterDisabledReason,
|
|
36390
37390
|
onTooltipOpenChange: setIsTooltipOpen
|
|
36391
37391
|
}),
|
|
36392
|
-
onOpenChange: setIsFilterPopoverOpen
|
|
37392
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
37393
|
+
layoutProps: {
|
|
37394
|
+
align: "start"
|
|
37395
|
+
}
|
|
36393
37396
|
}), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
|
|
36394
37397
|
icon: "orderBy",
|
|
36395
37398
|
tooltip: orderByDisabledReason || "Add as order by",
|
|
@@ -36414,7 +37417,10 @@ function FieldTokenWithActions({
|
|
|
36414
37417
|
disabled: !!filterDisabledReason,
|
|
36415
37418
|
onTooltipOpenChange: setIsTooltipOpen
|
|
36416
37419
|
}),
|
|
36417
|
-
onOpenChange: setIsFilterPopoverOpen
|
|
37420
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
37421
|
+
layoutProps: {
|
|
37422
|
+
align: "start"
|
|
37423
|
+
}
|
|
36418
37424
|
}), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
|
|
36419
37425
|
icon: "orderBy",
|
|
36420
37426
|
tooltip: orderByDisabledReason || "Add as order by",
|