@malloydata/malloy-explorer 0.0.285-dev250611150446 → 0.0.294-dev250630221944
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/index.cjs +1880 -1246
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +1883 -1249
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +16 -1
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +2 -1
- package/dist/types/components/QueryPanel/VizEditor/ArrayEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/BooleanEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/FieldEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/InfoHover.d.ts +4 -0
- package/dist/types/components/QueryPanel/VizEditor/NumberEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/ObjectEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/OneOfEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/StringEditor.d.ts +3 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditor.d.ts +11 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditorDialog.d.ts +12 -0
- package/dist/types/components/QueryPanel/VizEditor/VizEditorPopover.d.ts +10 -0
- package/dist/types/components/QueryPanel/VizEditor/styles.d.ts +72 -0
- package/dist/types/components/QueryPanel/VizEditor/types.d.ts +11 -0
- package/dist/types/components/QueryPanel/dialogStyles.d.ts +60 -0
- package/dist/types/components/filters/DateTimeFilterCore.d.ts +1 -1
- package/dist/types/components/primitives/ScrollableArea.d.ts +3 -0
- package/dist/types/components/utils/renderer.d.ts +0 -24
- package/package.json +8 -8
- package/dist/types/components/QueryPanel/RendererPopover.d.ts +0 -20
package/dist/esm/index.js
CHANGED
|
@@ -17,10 +17,10 @@ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
|
17
17
|
import * as React from "react";
|
|
18
18
|
import React__default, { useLayoutEffect, useEffect, useMemo, useState, useRef, createElement, useContext, useCallback, createContext, memo, useReducer } from "react";
|
|
19
19
|
import * as QB from "@malloydata/malloy-query-builder";
|
|
20
|
-
import { ASTArrowQueryDefinition, ASTArrowViewDefinition, ASTSegmentViewDefinition, ASTNestViewOperation, ASTRefinementViewDefinition, ASTFilterWithLiteralEquality, ASTOrderByViewOperation, ASTGroupByViewOperation, ASTAggregateViewOperation, ASTLimitViewOperation, ASTTimeTruncationExpression, ASTFilterWithFilterString, ASTWhereViewOperation, ASTHavingViewOperation, ASTDrillViewOperation, ASTQuery } from "@malloydata/malloy-query-builder";
|
|
20
|
+
import { ASTArrowQueryDefinition, ASTArrowViewDefinition, ASTSegmentViewDefinition, ASTNestViewOperation, ASTRefinementViewDefinition, ASTFilterWithLiteralEquality, ASTAnnotation, ASTOrderByViewOperation, ASTGroupByViewOperation, ASTAggregateViewOperation, ASTLimitViewOperation, ASTTimeTruncationExpression, ASTFilterWithFilterString, ASTWhereViewOperation, ASTHavingViewOperation, ASTDrillViewOperation, ASTQuery } from "@malloydata/malloy-query-builder";
|
|
21
21
|
import { Tag } from "@malloydata/malloy-tag";
|
|
22
|
+
import { MalloyRenderer, isCoreVizPluginInstance } from "@malloydata/render";
|
|
22
23
|
import { TemporalFilterExpression, BooleanFilterExpression, NumberFilterExpression, StringFilterExpression } from "@malloydata/malloy-filter";
|
|
23
|
-
import { MalloyRenderer } from "@malloydata/render";
|
|
24
24
|
import * as ReactDOM from "react-dom";
|
|
25
25
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from "react-dom";
|
|
26
26
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
@@ -3745,6 +3745,15 @@ const fontStyles = {
|
|
|
3745
3745
|
lineHeight: "mly1d3mw78",
|
|
3746
3746
|
letterSpacing: "mly1gu5id8",
|
|
3747
3747
|
$$css: true
|
|
3748
|
+
},
|
|
3749
|
+
tooltipText: {
|
|
3750
|
+
fontFamily: "mly1rj5sg5",
|
|
3751
|
+
color: "mly1rs82da",
|
|
3752
|
+
fontSize: "mlyif65rj",
|
|
3753
|
+
fontStyle: "mly1j61x8r",
|
|
3754
|
+
fontWeight: "mlyo1l8bm",
|
|
3755
|
+
lineHeight: "mly1fc57z9",
|
|
3756
|
+
$$css: true
|
|
3748
3757
|
}
|
|
3749
3758
|
};
|
|
3750
3759
|
const SvgChevronDown = (props2) => /* @__PURE__ */ React.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.createElement("g", { id: "cahevron_down", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.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) " })));
|
|
@@ -3895,11 +3904,11 @@ function Icon({
|
|
|
3895
3904
|
return null;
|
|
3896
3905
|
}
|
|
3897
3906
|
return /* @__PURE__ */ jsx(IconComponent, {
|
|
3898
|
-
..._stylex.props(styles$
|
|
3907
|
+
..._stylex.props(styles$Q.main, colorVariants$3[color], customStyle),
|
|
3899
3908
|
"data-testid": `icon-${color}-${name}`
|
|
3900
3909
|
});
|
|
3901
3910
|
}
|
|
3902
|
-
const styles$
|
|
3911
|
+
const styles$Q = {
|
|
3903
3912
|
main: {
|
|
3904
3913
|
display: "mly1rg5ohu",
|
|
3905
3914
|
width: "mly1kky2od",
|
|
@@ -3968,18 +3977,18 @@ function Badge({
|
|
|
3968
3977
|
customStyle
|
|
3969
3978
|
}) {
|
|
3970
3979
|
return /* @__PURE__ */ jsxs("div", {
|
|
3971
|
-
..._stylex.props(styles$
|
|
3980
|
+
..._stylex.props(styles$P.main, colorVariants$2[color], customStyle),
|
|
3972
3981
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
3973
3982
|
color,
|
|
3974
3983
|
name: icon
|
|
3975
3984
|
}), /* @__PURE__ */ jsx("div", {
|
|
3976
3985
|
"data-testid": "badge-label",
|
|
3977
|
-
..._stylex.props(fontStyles.badge, styles$
|
|
3986
|
+
..._stylex.props(fontStyles.badge, styles$P.label),
|
|
3978
3987
|
children: label
|
|
3979
3988
|
})]
|
|
3980
3989
|
});
|
|
3981
3990
|
}
|
|
3982
|
-
const styles$
|
|
3991
|
+
const styles$P = {
|
|
3983
3992
|
main: {
|
|
3984
3993
|
display: "mly3nfvp2",
|
|
3985
3994
|
height: "mly1qx5ct2",
|
|
@@ -4061,10 +4070,10 @@ function Divider({
|
|
|
4061
4070
|
customStyle
|
|
4062
4071
|
}) {
|
|
4063
4072
|
return /* @__PURE__ */ jsx("div", {
|
|
4064
|
-
..._stylex.props(styles$
|
|
4073
|
+
..._stylex.props(styles$O.main, orientationVariants[orientation], customStyle)
|
|
4065
4074
|
});
|
|
4066
4075
|
}
|
|
4067
|
-
const styles$
|
|
4076
|
+
const styles$O = {
|
|
4068
4077
|
main: {
|
|
4069
4078
|
background: "mly1xnbgy5",
|
|
4070
4079
|
backgroundAttachment: null,
|
|
@@ -4870,7 +4879,7 @@ function Button({
|
|
|
4870
4879
|
...props2
|
|
4871
4880
|
}) {
|
|
4872
4881
|
const button = /* @__PURE__ */ jsxs("button", {
|
|
4873
|
-
..._stylex.props(styles$
|
|
4882
|
+
..._stylex.props(styles$N.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
|
|
4874
4883
|
type: "button",
|
|
4875
4884
|
disabled: isDisabled,
|
|
4876
4885
|
...props2,
|
|
@@ -4880,9 +4889,9 @@ function Button({
|
|
|
4880
4889
|
},
|
|
4881
4890
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
4882
4891
|
name: icon,
|
|
4883
|
-
customStyle: styles$
|
|
4892
|
+
customStyle: styles$N.icon
|
|
4884
4893
|
}), label && /* @__PURE__ */ jsx("div", {
|
|
4885
|
-
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$
|
|
4894
|
+
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$N.label),
|
|
4886
4895
|
children: label
|
|
4887
4896
|
})]
|
|
4888
4897
|
}), isDisabled && /* @__PURE__ */ jsx("div", {
|
|
@@ -4909,7 +4918,7 @@ function Button({
|
|
|
4909
4918
|
return button;
|
|
4910
4919
|
}
|
|
4911
4920
|
}
|
|
4912
|
-
const styles$
|
|
4921
|
+
const styles$N = {
|
|
4913
4922
|
main: {
|
|
4914
4923
|
display: "mly3nfvp2",
|
|
4915
4924
|
flexDirection: "mlydt5ytf",
|
|
@@ -5160,7 +5169,7 @@ function Token({
|
|
|
5160
5169
|
}) {
|
|
5161
5170
|
const isInteractive = onClick !== void 0 || asButtonTrigger;
|
|
5162
5171
|
const token2 = /* @__PURE__ */ jsxs("div", {
|
|
5163
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$
|
|
5172
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$M.nonInteractive, customStyle),
|
|
5164
5173
|
...dragProps == null ? void 0 : dragProps.attributes,
|
|
5165
5174
|
...dragProps == null ? void 0 : dragProps.listeners,
|
|
5166
5175
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
@@ -5191,13 +5200,13 @@ function Token({
|
|
|
5191
5200
|
}), /* @__PURE__ */ jsx(Portal$4, {
|
|
5192
5201
|
children: /* @__PURE__ */ jsx(Content2$4, {
|
|
5193
5202
|
...tooltipProps,
|
|
5194
|
-
..._stylex.props(typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
|
|
5203
|
+
..._stylex.props(fontStyles.tooltipText, typeof tooltip === "string" ? tooltipStyles.default : tooltipStyles.card),
|
|
5195
5204
|
children: tooltip
|
|
5196
5205
|
})
|
|
5197
5206
|
})]
|
|
5198
5207
|
}) : token2;
|
|
5199
5208
|
}
|
|
5200
|
-
const styles$
|
|
5209
|
+
const styles$M = {
|
|
5201
5210
|
nonInteractive: {
|
|
5202
5211
|
cursor: "mlyt0e3qv",
|
|
5203
5212
|
background: "mly1np9qvj",
|
|
@@ -5221,7 +5230,7 @@ function TokenGroup({
|
|
|
5221
5230
|
}) {
|
|
5222
5231
|
const count2 = React.Children.count(children);
|
|
5223
5232
|
return /* @__PURE__ */ jsx("div", {
|
|
5224
|
-
..._stylex.props(styles$
|
|
5233
|
+
..._stylex.props(styles$L.main, customStyle),
|
|
5225
5234
|
children: React.Children.map(children, (child, index2) => /* @__PURE__ */ React.cloneElement(child, {
|
|
5226
5235
|
customStyle: {
|
|
5227
5236
|
...child.props.customStyle,
|
|
@@ -5232,16 +5241,16 @@ function TokenGroup({
|
|
|
5232
5241
|
});
|
|
5233
5242
|
}
|
|
5234
5243
|
const getChildStyle = (index2, count2) => {
|
|
5235
|
-
if (count2 === 1) return styles$
|
|
5236
|
-
if (index2 === 0) return styles$
|
|
5237
|
-
if (index2 === count2 - 1) return styles$
|
|
5238
|
-
return styles$
|
|
5244
|
+
if (count2 === 1) return styles$L.onlyChild;
|
|
5245
|
+
if (index2 === 0) return styles$L.firstChild;
|
|
5246
|
+
if (index2 === count2 - 1) return styles$L.lastChild;
|
|
5247
|
+
return styles$L.innerChild;
|
|
5239
5248
|
};
|
|
5240
5249
|
const getTokenColor = (child, groupColor) => {
|
|
5241
5250
|
const childColor = child.props.color;
|
|
5242
5251
|
return childColor === void 0 ? groupColor : childColor;
|
|
5243
5252
|
};
|
|
5244
|
-
const styles$
|
|
5253
|
+
const styles$L = {
|
|
5245
5254
|
main: {
|
|
5246
5255
|
display: "mlyrvj5dj",
|
|
5247
5256
|
gridAutoFlow: "mly1mt1orb",
|
|
@@ -5313,7 +5322,7 @@ function ErrorIcon({
|
|
|
5313
5322
|
},
|
|
5314
5323
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
5315
5324
|
name: "warning",
|
|
5316
|
-
customStyle: styles$
|
|
5325
|
+
customStyle: styles$K.errorIcon
|
|
5317
5326
|
})
|
|
5318
5327
|
})
|
|
5319
5328
|
}), /* @__PURE__ */ jsx(TooltipPortal, {
|
|
@@ -5326,7 +5335,7 @@ function ErrorIcon({
|
|
|
5326
5335
|
})]
|
|
5327
5336
|
});
|
|
5328
5337
|
}
|
|
5329
|
-
const styles$
|
|
5338
|
+
const styles$K = {
|
|
5330
5339
|
errorIcon: {
|
|
5331
5340
|
color: "mly1e2nbdu",
|
|
5332
5341
|
$$css: true
|
|
@@ -5371,22 +5380,22 @@ function EditableToken({
|
|
|
5371
5380
|
className: "mly78zum5 mly6s0dn4"
|
|
5372
5381
|
},
|
|
5373
5382
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
5374
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$
|
|
5383
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$J.focused, !!errorMessage && styles$J.hasError, customStyle),
|
|
5375
5384
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
5376
5385
|
name: icon,
|
|
5377
|
-
customStyle: styles$
|
|
5386
|
+
customStyle: styles$J.icon
|
|
5378
5387
|
}), /* @__PURE__ */ jsxs("span", {
|
|
5379
5388
|
...{
|
|
5380
5389
|
className: "mlywz0xwf"
|
|
5381
5390
|
},
|
|
5382
5391
|
children: [/* @__PURE__ */ jsx("span", {
|
|
5383
|
-
..._stylex.props(fontStyles.body, styles$
|
|
5392
|
+
..._stylex.props(fontStyles.body, styles$J.placeholder),
|
|
5384
5393
|
style: {
|
|
5385
5394
|
whiteSpaceCollapse: "preserve"
|
|
5386
5395
|
},
|
|
5387
5396
|
children: value
|
|
5388
5397
|
}), /* @__PURE__ */ jsx("input", {
|
|
5389
|
-
..._stylex.props(styles$
|
|
5398
|
+
..._stylex.props(styles$J.input, fontStyles.body),
|
|
5390
5399
|
ref: inputRef,
|
|
5391
5400
|
pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
|
|
5392
5401
|
value,
|
|
@@ -5411,7 +5420,7 @@ function EditableToken({
|
|
|
5411
5420
|
})]
|
|
5412
5421
|
});
|
|
5413
5422
|
}
|
|
5414
|
-
const styles$
|
|
5423
|
+
const styles$J = {
|
|
5415
5424
|
focused: {
|
|
5416
5425
|
background: "mlyotlr4g",
|
|
5417
5426
|
backgroundAttachment: null,
|
|
@@ -7753,12 +7762,12 @@ function TextInput({
|
|
|
7753
7762
|
}
|
|
7754
7763
|
};
|
|
7755
7764
|
return /* @__PURE__ */ jsxs("div", {
|
|
7756
|
-
..._stylex.props(styles$
|
|
7765
|
+
..._stylex.props(styles$I.main, isFocused && styles$I.focused, sizeVariants[size2], customStyle),
|
|
7757
7766
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
7758
7767
|
name: icon,
|
|
7759
7768
|
color: "secondary"
|
|
7760
7769
|
}), /* @__PURE__ */ jsx("input", {
|
|
7761
|
-
..._stylex.props(fontStyles.body, styles$
|
|
7770
|
+
..._stylex.props(fontStyles.body, styles$I.input),
|
|
7762
7771
|
value,
|
|
7763
7772
|
placeholder,
|
|
7764
7773
|
onChange: handleChange,
|
|
@@ -7766,7 +7775,7 @@ function TextInput({
|
|
|
7766
7775
|
onBlur: handleBlur,
|
|
7767
7776
|
onKeyDown
|
|
7768
7777
|
}), hasClear && /* @__PURE__ */ jsx("button", {
|
|
7769
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
7778
|
+
..._stylex.props(fontStyles.supporting, styles$I.actionButton, value === "" && styles$I.hidden),
|
|
7770
7779
|
ref: buttonRef,
|
|
7771
7780
|
onClick: () => onChange(""),
|
|
7772
7781
|
tabIndex: 0,
|
|
@@ -7774,7 +7783,7 @@ function TextInput({
|
|
|
7774
7783
|
})]
|
|
7775
7784
|
});
|
|
7776
7785
|
}
|
|
7777
|
-
const styles$
|
|
7786
|
+
const styles$I = {
|
|
7778
7787
|
main: {
|
|
7779
7788
|
display: "mly78zum5",
|
|
7780
7789
|
alignItems: "mly6s0dn4",
|
|
@@ -7983,7 +7992,7 @@ function SelectorToken({
|
|
|
7983
7992
|
onValueChange: handleValueChange,
|
|
7984
7993
|
required: true,
|
|
7985
7994
|
children: [/* @__PURE__ */ jsxs(Trigger$3, {
|
|
7986
|
-
..._stylex.props(tokenStyles.main, styles$
|
|
7995
|
+
..._stylex.props(tokenStyles.main, styles$H.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
|
|
7987
7996
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
7988
7997
|
name: icon,
|
|
7989
7998
|
customStyle: tokenStyles.icon
|
|
@@ -8012,7 +8021,7 @@ function SelectorToken({
|
|
|
8012
8021
|
size: "compact",
|
|
8013
8022
|
icon: "search",
|
|
8014
8023
|
hasClear: true,
|
|
8015
|
-
customStyle: styles$
|
|
8024
|
+
customStyle: styles$H.searchInput,
|
|
8016
8025
|
onKeyDown: (event) => {
|
|
8017
8026
|
const excludedKeys = ["ArrowUp", "ArrowDown"];
|
|
8018
8027
|
if (!excludedKeys.includes(event.key)) {
|
|
@@ -8045,21 +8054,21 @@ function SelectItem({
|
|
|
8045
8054
|
...props2
|
|
8046
8055
|
}) {
|
|
8047
8056
|
return /* @__PURE__ */ jsxs(Item$1, {
|
|
8048
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8057
|
+
..._stylex.props(fontStyles.body, styles$H.selectItem),
|
|
8049
8058
|
value,
|
|
8050
8059
|
...props2,
|
|
8051
8060
|
children: [value === selectedValue ? /* @__PURE__ */ jsx(Icon, {
|
|
8052
8061
|
name: "radioChecked",
|
|
8053
|
-
customStyle: styles$
|
|
8062
|
+
customStyle: styles$H.radioChecked
|
|
8054
8063
|
}) : /* @__PURE__ */ jsx(Icon, {
|
|
8055
8064
|
name: "radioUnchecked",
|
|
8056
|
-
customStyle: styles$
|
|
8065
|
+
customStyle: styles$H.radioUnchecked
|
|
8057
8066
|
}), /* @__PURE__ */ jsx(ItemText, {
|
|
8058
8067
|
children
|
|
8059
8068
|
})]
|
|
8060
8069
|
});
|
|
8061
8070
|
}
|
|
8062
|
-
const styles$
|
|
8071
|
+
const styles$H = {
|
|
8063
8072
|
selectTrigger: {
|
|
8064
8073
|
whiteSpace: "mlyuxw1ft",
|
|
8065
8074
|
overflow: "mlyb3r6kr",
|
|
@@ -8149,7 +8158,7 @@ function Card({
|
|
|
8149
8158
|
customStyle
|
|
8150
8159
|
}) {
|
|
8151
8160
|
return /* @__PURE__ */ jsxs("div", {
|
|
8152
|
-
..._stylex.props(styles$
|
|
8161
|
+
..._stylex.props(styles$G.container, customStyle),
|
|
8153
8162
|
children: [/* @__PURE__ */ jsx("div", {
|
|
8154
8163
|
...{
|
|
8155
8164
|
className: "mly1717udv"
|
|
@@ -8163,7 +8172,7 @@ function Card({
|
|
|
8163
8172
|
})]
|
|
8164
8173
|
});
|
|
8165
8174
|
}
|
|
8166
|
-
const styles$
|
|
8175
|
+
const styles$G = {
|
|
8167
8176
|
container: {
|
|
8168
8177
|
display: "mly78zum5",
|
|
8169
8178
|
flexDirection: "mlydt5ytf",
|
|
@@ -8256,7 +8265,7 @@ function CollapsiblePanel({
|
|
|
8256
8265
|
},
|
|
8257
8266
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
8258
8267
|
name: icon,
|
|
8259
|
-
customStyle: styles$
|
|
8268
|
+
customStyle: styles$F.icon
|
|
8260
8269
|
}), /* @__PURE__ */ jsx("div", {
|
|
8261
8270
|
...{
|
|
8262
8271
|
className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4"
|
|
@@ -8298,7 +8307,7 @@ function CollapsiblePanel({
|
|
|
8298
8307
|
})]
|
|
8299
8308
|
});
|
|
8300
8309
|
}
|
|
8301
|
-
const styles$
|
|
8310
|
+
const styles$F = {
|
|
8302
8311
|
icon: {
|
|
8303
8312
|
$$css: true
|
|
8304
8313
|
}
|
|
@@ -8330,10 +8339,10 @@ function CollapsibleListItem({
|
|
|
8330
8339
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
|
|
8331
8340
|
},
|
|
8332
8341
|
children: [/* @__PURE__ */ jsx("span", {
|
|
8333
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8342
|
+
..._stylex.props(fontStyles.body, styles$E.label),
|
|
8334
8343
|
children: label
|
|
8335
8344
|
}), sublabel && /* @__PURE__ */ jsx("span", {
|
|
8336
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
8345
|
+
..._stylex.props(fontStyles.supporting, styles$E.sublabel),
|
|
8337
8346
|
children: sublabel
|
|
8338
8347
|
})]
|
|
8339
8348
|
})]
|
|
@@ -8345,7 +8354,7 @@ function CollapsibleListItem({
|
|
|
8345
8354
|
})]
|
|
8346
8355
|
});
|
|
8347
8356
|
}
|
|
8348
|
-
const styles$
|
|
8357
|
+
const styles$E = {
|
|
8349
8358
|
label: {
|
|
8350
8359
|
flexGrow: "mly1iyjqo2",
|
|
8351
8360
|
fontWeight: "mly1xlr1w8",
|
|
@@ -19159,7 +19168,7 @@ function Spinner({
|
|
|
19159
19168
|
} = SIZES[size2];
|
|
19160
19169
|
const frameSize = diameter + border * 2;
|
|
19161
19170
|
return /* @__PURE__ */ jsx("div", {
|
|
19162
|
-
..._stylex.props(styles$
|
|
19171
|
+
..._stylex.props(styles$D.root, customStyle),
|
|
19163
19172
|
children: /* @__PURE__ */ jsx("span", {
|
|
19164
19173
|
"aria-valuetext": "Loading",
|
|
19165
19174
|
...{
|
|
@@ -19179,7 +19188,7 @@ function Spinner({
|
|
|
19179
19188
|
})
|
|
19180
19189
|
});
|
|
19181
19190
|
}
|
|
19182
|
-
const styles$
|
|
19191
|
+
const styles$D = {
|
|
19183
19192
|
root: {
|
|
19184
19193
|
alignItems: "mly6s0dn4",
|
|
19185
19194
|
display: "mly3nfvp2",
|
|
@@ -23577,7 +23586,7 @@ const Popover = ({
|
|
|
23577
23586
|
})
|
|
23578
23587
|
});
|
|
23579
23588
|
};
|
|
23580
|
-
const styles$
|
|
23589
|
+
const styles$C = {
|
|
23581
23590
|
wrapper: {
|
|
23582
23591
|
position: "mly1n2onr6",
|
|
23583
23592
|
$$css: true
|
|
@@ -23629,7 +23638,7 @@ const SelectDropdown = ({
|
|
|
23629
23638
|
setOpen(false);
|
|
23630
23639
|
};
|
|
23631
23640
|
return /* @__PURE__ */ jsxs("div", {
|
|
23632
|
-
..._stylex.props(styles$
|
|
23641
|
+
..._stylex.props(styles$C.wrapper, customStyle),
|
|
23633
23642
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
23634
23643
|
type: "button",
|
|
23635
23644
|
autoFocus,
|
|
@@ -23697,7 +23706,7 @@ function SelectList({
|
|
|
23697
23706
|
const [hoveredIndex, setHoveredIndex] = useState(null);
|
|
23698
23707
|
return /* @__PURE__ */ jsx(ScrollableArea, {
|
|
23699
23708
|
children: /* @__PURE__ */ jsx("div", {
|
|
23700
|
-
..._stylex.props(styles$
|
|
23709
|
+
..._stylex.props(styles$C.selectListDiv, customStyle),
|
|
23701
23710
|
children: options.reduce((result, option2, index2) => {
|
|
23702
23711
|
const isSelected = value !== void 0 && valueEqual(value, option2.value);
|
|
23703
23712
|
if (option2.divider) {
|
|
@@ -23729,8 +23738,8 @@ function SelectList({
|
|
|
23729
23738
|
}), /* @__PURE__ */ jsx(Icon, {
|
|
23730
23739
|
name: "checkmark",
|
|
23731
23740
|
customStyle: {
|
|
23732
|
-
...styles$
|
|
23733
|
-
...isSelected ? styles$
|
|
23741
|
+
...styles$C.checkIcon,
|
|
23742
|
+
...isSelected ? styles$C.checkIconSelected : void 0
|
|
23734
23743
|
}
|
|
23735
23744
|
}), /* @__PURE__ */ jsx("span", {
|
|
23736
23745
|
...{
|
|
@@ -23782,7 +23791,7 @@ const DateInput = ({
|
|
|
23782
23791
|
setTempValue(hooks.utc(value).format(format2));
|
|
23783
23792
|
}, [value, format2]);
|
|
23784
23793
|
return /* @__PURE__ */ jsx("input", {
|
|
23785
|
-
..._stylex.props(customStyle, isActive ? styles$
|
|
23794
|
+
..._stylex.props(customStyle, isActive ? styles$B.active : null),
|
|
23786
23795
|
type: "text",
|
|
23787
23796
|
placeholder: placeholder || format2,
|
|
23788
23797
|
value: tempValue,
|
|
@@ -23817,7 +23826,7 @@ function guessUnits(moment2, isDateTime) {
|
|
|
23817
23826
|
}
|
|
23818
23827
|
return isDateTime ? "second" : "day";
|
|
23819
23828
|
}
|
|
23820
|
-
const styles$
|
|
23829
|
+
const styles$B = {
|
|
23821
23830
|
active: {
|
|
23822
23831
|
backgroundColor: "mly1vzefiq",
|
|
23823
23832
|
$$css: true
|
|
@@ -23929,7 +23938,7 @@ function DatePicker({
|
|
|
23929
23938
|
});
|
|
23930
23939
|
};
|
|
23931
23940
|
return /* @__PURE__ */ jsxs("div", {
|
|
23932
|
-
..._stylex.props(styles$
|
|
23941
|
+
..._stylex.props(styles$A.outer, customStyle),
|
|
23933
23942
|
ref: forwardRef,
|
|
23934
23943
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23935
23944
|
...{
|
|
@@ -24245,7 +24254,7 @@ function DatePicker({
|
|
|
24245
24254
|
})]
|
|
24246
24255
|
});
|
|
24247
24256
|
}
|
|
24248
|
-
const styles$
|
|
24257
|
+
const styles$A = {
|
|
24249
24258
|
outer: {
|
|
24250
24259
|
userSelect: "mly87ps6o",
|
|
24251
24260
|
fontSize: "mlymhiqyu",
|
|
@@ -24331,7 +24340,7 @@ function Banner({
|
|
|
24331
24340
|
className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
|
|
24332
24341
|
},
|
|
24333
24342
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24334
|
-
..._stylex.props(styles$
|
|
24343
|
+
..._stylex.props(styles$z.header, variantColors[variant], children ? styles$z.headerWithContent : null),
|
|
24335
24344
|
children: [/* @__PURE__ */ jsx("div", {
|
|
24336
24345
|
...{
|
|
24337
24346
|
className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
|
|
@@ -24344,22 +24353,22 @@ function Banner({
|
|
|
24344
24353
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr"
|
|
24345
24354
|
},
|
|
24346
24355
|
children: [/* @__PURE__ */ jsx("div", {
|
|
24347
|
-
..._stylex.props(styles$
|
|
24356
|
+
..._stylex.props(styles$z.title, fontStyles.emphasized),
|
|
24348
24357
|
children: title
|
|
24349
24358
|
}), /* @__PURE__ */ jsx("div", {
|
|
24350
|
-
..._stylex.props(styles$
|
|
24359
|
+
..._stylex.props(styles$z.description, fontStyles.supporting),
|
|
24351
24360
|
children: description
|
|
24352
24361
|
})]
|
|
24353
24362
|
})]
|
|
24354
24363
|
}), children && /* @__PURE__ */ jsx("div", {
|
|
24355
|
-
..._stylex.props(styles$
|
|
24364
|
+
..._stylex.props(styles$z.content, fontStyles.body),
|
|
24356
24365
|
children: /* @__PURE__ */ jsx(ScrollableArea, {
|
|
24357
24366
|
children
|
|
24358
24367
|
})
|
|
24359
24368
|
})]
|
|
24360
24369
|
});
|
|
24361
24370
|
}
|
|
24362
|
-
const styles$
|
|
24371
|
+
const styles$z = {
|
|
24363
24372
|
header: {
|
|
24364
24373
|
borderRadius: "mly1q4ynmn",
|
|
24365
24374
|
borderStartStartRadius: null,
|
|
@@ -24501,14 +24510,14 @@ function AccordionList({
|
|
|
24501
24510
|
onExpandedItemChange: handleExpandedItemChange
|
|
24502
24511
|
},
|
|
24503
24512
|
children: /* @__PURE__ */ jsx("div", {
|
|
24504
|
-
..._stylex.props(styles$
|
|
24513
|
+
..._stylex.props(styles$y.main, customStyle),
|
|
24505
24514
|
children: React.Children.map(children, (child) => /* @__PURE__ */ jsxs(Fragment, {
|
|
24506
24515
|
children: [child, /* @__PURE__ */ jsx(Divider, {})]
|
|
24507
24516
|
}))
|
|
24508
24517
|
})
|
|
24509
24518
|
});
|
|
24510
24519
|
}
|
|
24511
|
-
const styles$
|
|
24520
|
+
const styles$y = {
|
|
24512
24521
|
main: {
|
|
24513
24522
|
display: "mly78zum5",
|
|
24514
24523
|
flexDirection: "mlydt5ytf",
|
|
@@ -24545,10 +24554,10 @@ function AccordionListItem({
|
|
|
24545
24554
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2"
|
|
24546
24555
|
},
|
|
24547
24556
|
children: [/* @__PURE__ */ jsx("span", {
|
|
24548
|
-
..._stylex.props(fontStyles.body, styles$
|
|
24557
|
+
..._stylex.props(fontStyles.body, styles$x.label),
|
|
24549
24558
|
children: label
|
|
24550
24559
|
}), sublabel && /* @__PURE__ */ jsx("span", {
|
|
24551
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
24560
|
+
..._stylex.props(fontStyles.supporting, styles$x.sublabel),
|
|
24552
24561
|
children: sublabel
|
|
24553
24562
|
})]
|
|
24554
24563
|
}), badge && badge, endIcon && endIcon]
|
|
@@ -24560,7 +24569,7 @@ function AccordionListItem({
|
|
|
24560
24569
|
})]
|
|
24561
24570
|
});
|
|
24562
24571
|
}
|
|
24563
|
-
const styles$
|
|
24572
|
+
const styles$x = {
|
|
24564
24573
|
label: {
|
|
24565
24574
|
flexGrow: "mly1iyjqo2",
|
|
24566
24575
|
fontWeight: "mly1xlr1w8",
|
|
@@ -25845,7 +25854,7 @@ function DropdownMenu({
|
|
|
25845
25854
|
children: trigger
|
|
25846
25855
|
}), /* @__PURE__ */ jsx(Portal2, {
|
|
25847
25856
|
children: /* @__PURE__ */ jsx(Content2, {
|
|
25848
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25857
|
+
..._stylex.props(fontStyles.body, styles$w.content),
|
|
25849
25858
|
side: "bottom",
|
|
25850
25859
|
align: "start",
|
|
25851
25860
|
sideOffset: 4,
|
|
@@ -25872,22 +25881,22 @@ function DropdownMenuItem({
|
|
|
25872
25881
|
disabled,
|
|
25873
25882
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
25874
25883
|
name: icon,
|
|
25875
|
-
customStyle: styles$
|
|
25884
|
+
customStyle: styles$w.icon
|
|
25876
25885
|
}), /* @__PURE__ */ jsxs("div", {
|
|
25877
25886
|
...{
|
|
25878
25887
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2"
|
|
25879
25888
|
},
|
|
25880
25889
|
children: [/* @__PURE__ */ jsx("span", {
|
|
25881
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25890
|
+
..._stylex.props(fontStyles.body, styles$w.label),
|
|
25882
25891
|
children: label
|
|
25883
25892
|
}), sublabel && /* @__PURE__ */ jsx("span", {
|
|
25884
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
25893
|
+
..._stylex.props(fontStyles.supporting, styles$w.sublabel),
|
|
25885
25894
|
children: sublabel
|
|
25886
25895
|
})]
|
|
25887
25896
|
})]
|
|
25888
25897
|
});
|
|
25889
25898
|
}
|
|
25890
|
-
const styles$
|
|
25899
|
+
const styles$w = {
|
|
25891
25900
|
content: {
|
|
25892
25901
|
display: "mly78zum5",
|
|
25893
25902
|
flexDirection: "mlydt5ytf",
|
|
@@ -25971,7 +25980,7 @@ function QueryActionBar({
|
|
|
25971
25980
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
25972
25981
|
name: "filterSliders"
|
|
25973
25982
|
}), /* @__PURE__ */ jsx("div", {
|
|
25974
|
-
..._stylex.props(fontStyles.largeBody, styles$
|
|
25983
|
+
..._stylex.props(fontStyles.largeBody, styles$v.title),
|
|
25975
25984
|
children: "Query"
|
|
25976
25985
|
})]
|
|
25977
25986
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -26016,13 +26025,13 @@ function QueryActionBar({
|
|
|
26016
26025
|
})]
|
|
26017
26026
|
});
|
|
26018
26027
|
}
|
|
26019
|
-
const styles$
|
|
26028
|
+
const styles$v = {
|
|
26020
26029
|
title: {
|
|
26021
26030
|
fontWeight: "mly1xlr1w8",
|
|
26022
26031
|
$$css: true
|
|
26023
26032
|
}
|
|
26024
26033
|
};
|
|
26025
|
-
const styles$
|
|
26034
|
+
const styles$u = {
|
|
26026
26035
|
labelWithIcon: {
|
|
26027
26036
|
display: "mly78zum5",
|
|
26028
26037
|
alignItems: "mly6s0dn4",
|
|
@@ -26179,109 +26188,6 @@ function legacyToViz(name) {
|
|
|
26179
26188
|
return name;
|
|
26180
26189
|
}
|
|
26181
26190
|
}
|
|
26182
|
-
const VISUALIZATION_OPTIONS = {
|
|
26183
|
-
table: null,
|
|
26184
|
-
bar: [{
|
|
26185
|
-
name: "title",
|
|
26186
|
-
label: "Title",
|
|
26187
|
-
type: "string",
|
|
26188
|
-
default: ""
|
|
26189
|
-
}, {
|
|
26190
|
-
name: "sub_title",
|
|
26191
|
-
label: "Subtitle",
|
|
26192
|
-
type: "string",
|
|
26193
|
-
default: ""
|
|
26194
|
-
}, {
|
|
26195
|
-
name: "stack",
|
|
26196
|
-
label: "Stack",
|
|
26197
|
-
type: "boolean",
|
|
26198
|
-
default: false
|
|
26199
|
-
}, {
|
|
26200
|
-
name: "size",
|
|
26201
|
-
label: "Size",
|
|
26202
|
-
type: "select",
|
|
26203
|
-
default: "fill",
|
|
26204
|
-
options: [{
|
|
26205
|
-
label: "Fill",
|
|
26206
|
-
value: "fill"
|
|
26207
|
-
}, {
|
|
26208
|
-
label: "Sparkline",
|
|
26209
|
-
value: "spark"
|
|
26210
|
-
}, {
|
|
26211
|
-
label: "X-Small",
|
|
26212
|
-
value: "xs"
|
|
26213
|
-
}, {
|
|
26214
|
-
label: "Small",
|
|
26215
|
-
value: "sm"
|
|
26216
|
-
}, {
|
|
26217
|
-
label: "Medium",
|
|
26218
|
-
value: "md"
|
|
26219
|
-
}, {
|
|
26220
|
-
label: "Large",
|
|
26221
|
-
value: "lg"
|
|
26222
|
-
}, {
|
|
26223
|
-
label: "X-Large",
|
|
26224
|
-
value: "xl"
|
|
26225
|
-
}, {
|
|
26226
|
-
label: "XX-Large",
|
|
26227
|
-
value: "2xl"
|
|
26228
|
-
}]
|
|
26229
|
-
}],
|
|
26230
|
-
dashboard: null,
|
|
26231
|
-
json: null,
|
|
26232
|
-
line: [{
|
|
26233
|
-
name: "title",
|
|
26234
|
-
label: "Title",
|
|
26235
|
-
type: "string",
|
|
26236
|
-
default: ""
|
|
26237
|
-
}, {
|
|
26238
|
-
name: "sub_title",
|
|
26239
|
-
label: "Subtitle",
|
|
26240
|
-
type: "string",
|
|
26241
|
-
default: ""
|
|
26242
|
-
}, {
|
|
26243
|
-
name: "zero_baseline",
|
|
26244
|
-
label: "Zero Baseline",
|
|
26245
|
-
type: "boolean",
|
|
26246
|
-
default: false
|
|
26247
|
-
}, {
|
|
26248
|
-
name: "size",
|
|
26249
|
-
label: "Size",
|
|
26250
|
-
type: "select",
|
|
26251
|
-
default: "md",
|
|
26252
|
-
options: [{
|
|
26253
|
-
label: "Fill",
|
|
26254
|
-
value: "fill"
|
|
26255
|
-
}, {
|
|
26256
|
-
label: "Sparkline",
|
|
26257
|
-
value: "spark"
|
|
26258
|
-
}, {
|
|
26259
|
-
label: "X-Small",
|
|
26260
|
-
value: "xs"
|
|
26261
|
-
}, {
|
|
26262
|
-
label: "Small",
|
|
26263
|
-
value: "sm"
|
|
26264
|
-
}, {
|
|
26265
|
-
label: "Medium",
|
|
26266
|
-
value: "md"
|
|
26267
|
-
}, {
|
|
26268
|
-
label: "Large",
|
|
26269
|
-
value: "lg"
|
|
26270
|
-
}, {
|
|
26271
|
-
label: "X-Large",
|
|
26272
|
-
value: "xl"
|
|
26273
|
-
}, {
|
|
26274
|
-
label: "XX-Large",
|
|
26275
|
-
value: "2xl"
|
|
26276
|
-
}]
|
|
26277
|
-
}],
|
|
26278
|
-
list: null,
|
|
26279
|
-
list_detail: null,
|
|
26280
|
-
point_map: null,
|
|
26281
|
-
scatter_chart: null,
|
|
26282
|
-
segment_map: null,
|
|
26283
|
-
shape_map: null
|
|
26284
|
-
};
|
|
26285
26191
|
function atomicTypeToIcon(type) {
|
|
26286
26192
|
return atomicTypeMap[type];
|
|
26287
26193
|
}
|
|
@@ -26377,7 +26283,7 @@ function DrillOperations({
|
|
|
26377
26283
|
}
|
|
26378
26284
|
return /* @__PURE__ */ jsxs("div", {
|
|
26379
26285
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26380
|
-
..._stylex.props(styles$
|
|
26286
|
+
..._stylex.props(styles$u.title),
|
|
26381
26287
|
children: "drills"
|
|
26382
26288
|
}), /* @__PURE__ */ jsx("div", {
|
|
26383
26289
|
...{
|
|
@@ -30349,288 +30255,1757 @@ function BadgeForField({
|
|
|
30349
30255
|
label: "view",
|
|
30350
30256
|
icon: "view_filled",
|
|
30351
30257
|
color: "purple",
|
|
30352
|
-
customStyle: styles$
|
|
30258
|
+
customStyle: styles$t.noBackground
|
|
30353
30259
|
});
|
|
30354
30260
|
} else if (field.kind === "dimension") {
|
|
30355
30261
|
return /* @__PURE__ */ jsx(Badge, {
|
|
30356
30262
|
label: "dimension",
|
|
30357
30263
|
icon: fieldToIcon(field),
|
|
30358
30264
|
color: "cyan",
|
|
30359
|
-
customStyle: styles$
|
|
30265
|
+
customStyle: styles$t.noBackground
|
|
30360
30266
|
});
|
|
30361
30267
|
} else if (field.kind === "measure") {
|
|
30362
30268
|
return /* @__PURE__ */ jsx(Badge, {
|
|
30363
30269
|
label: "measure",
|
|
30364
30270
|
icon: fieldToIcon(field),
|
|
30365
30271
|
color: "green",
|
|
30366
|
-
customStyle: styles$
|
|
30272
|
+
customStyle: styles$t.noBackground
|
|
30367
30273
|
});
|
|
30368
30274
|
} else if (field.kind === "join") {
|
|
30369
30275
|
return /* @__PURE__ */ jsx(Badge, {
|
|
30370
30276
|
label: "join",
|
|
30371
30277
|
icon: fieldToIcon(field),
|
|
30372
30278
|
color: "gray",
|
|
30373
|
-
customStyle: styles$
|
|
30279
|
+
customStyle: styles$t.noBackground
|
|
30374
30280
|
});
|
|
30375
30281
|
}
|
|
30376
30282
|
}
|
|
30377
|
-
const styles$
|
|
30283
|
+
const styles$t = {
|
|
30378
30284
|
noBackground: {
|
|
30379
30285
|
backgroundColor: "mlyjbqb8w",
|
|
30380
30286
|
$$css: true
|
|
30381
30287
|
}
|
|
30382
30288
|
};
|
|
30383
|
-
|
|
30384
|
-
|
|
30385
|
-
|
|
30386
|
-
|
|
30387
|
-
view,
|
|
30388
|
-
customStyle
|
|
30389
|
-
}) {
|
|
30390
|
-
const [open, setOpen] = useState(false);
|
|
30391
|
-
return /* @__PURE__ */ jsxs(Root2$2, {
|
|
30392
|
-
onOpenChange: (open2) => setOpen(open2),
|
|
30393
|
-
open,
|
|
30394
|
-
children: [/* @__PURE__ */ jsx(Trigger$2, {
|
|
30395
|
-
asChild: true,
|
|
30396
|
-
children: /* @__PURE__ */ jsx(Token, {
|
|
30397
|
-
icon: "gear",
|
|
30398
|
-
customStyle: {
|
|
30399
|
-
...customStyle,
|
|
30400
|
-
...dialogStyles$1.trigger
|
|
30401
|
-
}
|
|
30402
|
-
})
|
|
30403
|
-
}), /* @__PURE__ */ jsx(Portal$2, {
|
|
30404
|
-
children: /* @__PURE__ */ jsx(Content2$2, {
|
|
30405
|
-
align: "end",
|
|
30406
|
-
children: /* @__PURE__ */ jsx(RendererEditor, {
|
|
30407
|
-
rootQuery,
|
|
30408
|
-
view,
|
|
30409
|
-
viz,
|
|
30410
|
-
options,
|
|
30411
|
-
setOpen
|
|
30412
|
-
})
|
|
30413
|
-
})
|
|
30414
|
-
})]
|
|
30415
|
-
});
|
|
30416
|
-
}
|
|
30417
|
-
function RendererEditor({
|
|
30418
|
-
rootQuery,
|
|
30419
|
-
view,
|
|
30420
|
-
viz,
|
|
30421
|
-
options,
|
|
30422
|
-
setOpen
|
|
30423
|
-
}) {
|
|
30289
|
+
var DIALOG_NAME = "Dialog";
|
|
30290
|
+
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
30291
|
+
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
30292
|
+
var Dialog = (props2) => {
|
|
30424
30293
|
const {
|
|
30425
|
-
|
|
30426
|
-
|
|
30427
|
-
|
|
30428
|
-
|
|
30429
|
-
|
|
30430
|
-
|
|
30431
|
-
|
|
30432
|
-
|
|
30433
|
-
|
|
30434
|
-
|
|
30435
|
-
|
|
30436
|
-
|
|
30437
|
-
|
|
30294
|
+
__scopeDialog,
|
|
30295
|
+
children,
|
|
30296
|
+
open: openProp,
|
|
30297
|
+
defaultOpen,
|
|
30298
|
+
onOpenChange,
|
|
30299
|
+
modal = true
|
|
30300
|
+
} = props2;
|
|
30301
|
+
const triggerRef = React.useRef(null);
|
|
30302
|
+
const contentRef = React.useRef(null);
|
|
30303
|
+
const [open = false, setOpen] = useControllableState({
|
|
30304
|
+
prop: openProp,
|
|
30305
|
+
defaultProp: defaultOpen,
|
|
30306
|
+
onChange: onOpenChange
|
|
30307
|
+
});
|
|
30308
|
+
return /* @__PURE__ */ jsx(
|
|
30309
|
+
DialogProvider,
|
|
30310
|
+
{
|
|
30311
|
+
scope: __scopeDialog,
|
|
30312
|
+
triggerRef,
|
|
30313
|
+
contentRef,
|
|
30314
|
+
contentId: useId(),
|
|
30315
|
+
titleId: useId(),
|
|
30316
|
+
descriptionId: useId(),
|
|
30317
|
+
open,
|
|
30318
|
+
onOpenChange: setOpen,
|
|
30319
|
+
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
30320
|
+
modal,
|
|
30321
|
+
children
|
|
30322
|
+
}
|
|
30323
|
+
);
|
|
30324
|
+
};
|
|
30325
|
+
Dialog.displayName = DIALOG_NAME;
|
|
30326
|
+
var TRIGGER_NAME$1 = "DialogTrigger";
|
|
30327
|
+
var DialogTrigger = React.forwardRef(
|
|
30328
|
+
(props2, forwardedRef) => {
|
|
30329
|
+
const { __scopeDialog, ...triggerProps } = props2;
|
|
30330
|
+
const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
|
|
30331
|
+
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
30332
|
+
return /* @__PURE__ */ jsx(
|
|
30333
|
+
Primitive.button,
|
|
30334
|
+
{
|
|
30335
|
+
type: "button",
|
|
30336
|
+
"aria-haspopup": "dialog",
|
|
30337
|
+
"aria-expanded": context.open,
|
|
30338
|
+
"aria-controls": context.contentId,
|
|
30339
|
+
"data-state": getState(context.open),
|
|
30340
|
+
...triggerProps,
|
|
30341
|
+
ref: composedTriggerRef,
|
|
30342
|
+
onClick: composeEventHandlers(props2.onClick, context.onOpenToggle)
|
|
30343
|
+
}
|
|
30344
|
+
);
|
|
30438
30345
|
}
|
|
30439
|
-
|
|
30440
|
-
|
|
30441
|
-
|
|
30442
|
-
|
|
30443
|
-
|
|
30444
|
-
|
|
30445
|
-
|
|
30446
|
-
|
|
30447
|
-
|
|
30448
|
-
|
|
30449
|
-
|
|
30450
|
-
|
|
30451
|
-
|
|
30452
|
-
|
|
30453
|
-
|
|
30454
|
-
|
|
30455
|
-
|
|
30456
|
-
|
|
30457
|
-
|
|
30458
|
-
|
|
30459
|
-
|
|
30460
|
-
|
|
30461
|
-
|
|
30462
|
-
|
|
30463
|
-
|
|
30464
|
-
|
|
30465
|
-
|
|
30466
|
-
|
|
30467
|
-
|
|
30346
|
+
);
|
|
30347
|
+
DialogTrigger.displayName = TRIGGER_NAME$1;
|
|
30348
|
+
var PORTAL_NAME = "DialogPortal";
|
|
30349
|
+
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
30350
|
+
forceMount: void 0
|
|
30351
|
+
});
|
|
30352
|
+
var DialogPortal = (props2) => {
|
|
30353
|
+
const { __scopeDialog, forceMount, children, container } = props2;
|
|
30354
|
+
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
30355
|
+
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$5, { asChild: true, container, children: child }) })) });
|
|
30356
|
+
};
|
|
30357
|
+
DialogPortal.displayName = PORTAL_NAME;
|
|
30358
|
+
var OVERLAY_NAME = "DialogOverlay";
|
|
30359
|
+
var DialogOverlay = React.forwardRef(
|
|
30360
|
+
(props2, forwardedRef) => {
|
|
30361
|
+
const portalContext = usePortalContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
30362
|
+
const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
|
|
30363
|
+
const context = useDialogContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
30364
|
+
return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
30365
|
+
}
|
|
30366
|
+
);
|
|
30367
|
+
DialogOverlay.displayName = OVERLAY_NAME;
|
|
30368
|
+
var DialogOverlayImpl = React.forwardRef(
|
|
30369
|
+
(props2, forwardedRef) => {
|
|
30370
|
+
const { __scopeDialog, ...overlayProps } = props2;
|
|
30371
|
+
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
30372
|
+
return (
|
|
30373
|
+
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
30374
|
+
// ie. when `Overlay` and `Content` are siblings
|
|
30375
|
+
/* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
30376
|
+
Primitive.div,
|
|
30377
|
+
{
|
|
30378
|
+
"data-state": getState(context.open),
|
|
30379
|
+
...overlayProps,
|
|
30380
|
+
ref: forwardedRef,
|
|
30381
|
+
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
30382
|
+
}
|
|
30383
|
+
) })
|
|
30384
|
+
);
|
|
30385
|
+
}
|
|
30386
|
+
);
|
|
30387
|
+
var CONTENT_NAME$1 = "DialogContent";
|
|
30388
|
+
var DialogContent = React.forwardRef(
|
|
30389
|
+
(props2, forwardedRef) => {
|
|
30390
|
+
const portalContext = usePortalContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30391
|
+
const { forceMount = portalContext.forceMount, ...contentProps } = props2;
|
|
30392
|
+
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30393
|
+
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
30394
|
+
}
|
|
30395
|
+
);
|
|
30396
|
+
DialogContent.displayName = CONTENT_NAME$1;
|
|
30397
|
+
var DialogContentModal = React.forwardRef(
|
|
30398
|
+
(props2, forwardedRef) => {
|
|
30399
|
+
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30400
|
+
const contentRef = React.useRef(null);
|
|
30401
|
+
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
30402
|
+
React.useEffect(() => {
|
|
30403
|
+
const content = contentRef.current;
|
|
30404
|
+
if (content) return hideOthers(content);
|
|
30405
|
+
}, []);
|
|
30406
|
+
return /* @__PURE__ */ jsx(
|
|
30407
|
+
DialogContentImpl,
|
|
30408
|
+
{
|
|
30409
|
+
...props2,
|
|
30410
|
+
ref: composedRefs,
|
|
30411
|
+
trapFocus: context.open,
|
|
30412
|
+
disableOutsidePointerEvents: true,
|
|
30413
|
+
onCloseAutoFocus: composeEventHandlers(props2.onCloseAutoFocus, (event) => {
|
|
30414
|
+
var _a2;
|
|
30415
|
+
event.preventDefault();
|
|
30416
|
+
(_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
|
|
30417
|
+
}),
|
|
30418
|
+
onPointerDownOutside: composeEventHandlers(props2.onPointerDownOutside, (event) => {
|
|
30419
|
+
const originalEvent = event.detail.originalEvent;
|
|
30420
|
+
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
30421
|
+
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
30422
|
+
if (isRightClick) event.preventDefault();
|
|
30423
|
+
}),
|
|
30424
|
+
onFocusOutside: composeEventHandlers(
|
|
30425
|
+
props2.onFocusOutside,
|
|
30426
|
+
(event) => event.preventDefault()
|
|
30427
|
+
)
|
|
30428
|
+
}
|
|
30429
|
+
);
|
|
30430
|
+
}
|
|
30431
|
+
);
|
|
30432
|
+
var DialogContentNonModal = React.forwardRef(
|
|
30433
|
+
(props2, forwardedRef) => {
|
|
30434
|
+
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
30435
|
+
const hasInteractedOutsideRef = React.useRef(false);
|
|
30436
|
+
const hasPointerDownOutsideRef = React.useRef(false);
|
|
30437
|
+
return /* @__PURE__ */ jsx(
|
|
30438
|
+
DialogContentImpl,
|
|
30439
|
+
{
|
|
30440
|
+
...props2,
|
|
30441
|
+
ref: forwardedRef,
|
|
30442
|
+
trapFocus: false,
|
|
30443
|
+
disableOutsidePointerEvents: false,
|
|
30444
|
+
onCloseAutoFocus: (event) => {
|
|
30445
|
+
var _a2, _b2;
|
|
30446
|
+
(_a2 = props2.onCloseAutoFocus) == null ? void 0 : _a2.call(props2, event);
|
|
30447
|
+
if (!event.defaultPrevented) {
|
|
30448
|
+
if (!hasInteractedOutsideRef.current) (_b2 = context.triggerRef.current) == null ? void 0 : _b2.focus();
|
|
30449
|
+
event.preventDefault();
|
|
30450
|
+
}
|
|
30451
|
+
hasInteractedOutsideRef.current = false;
|
|
30452
|
+
hasPointerDownOutsideRef.current = false;
|
|
30468
30453
|
},
|
|
30469
|
-
|
|
30470
|
-
|
|
30471
|
-
|
|
30472
|
-
|
|
30473
|
-
|
|
30474
|
-
|
|
30475
|
-
|
|
30476
|
-
variant: "primary",
|
|
30477
|
-
label: "Apply",
|
|
30478
|
-
onClick: () => {
|
|
30479
|
-
if (!view.getTag(RENDERER_PREFIX).has("viz", viz)) {
|
|
30480
|
-
view.setTagProperty(["viz"], viz, RENDERER_PREFIX);
|
|
30481
|
-
}
|
|
30482
|
-
for (const option2 of options) {
|
|
30483
|
-
if (current[option2.name] !== option2.default.toString()) {
|
|
30484
|
-
view.setTagProperty(["viz", option2.name], current[option2.name], RENDERER_PREFIX);
|
|
30485
|
-
} else {
|
|
30486
|
-
view.removeTagProperty(["viz", option2.name], RENDERER_PREFIX);
|
|
30487
|
-
}
|
|
30454
|
+
onInteractOutside: (event) => {
|
|
30455
|
+
var _a2, _b2;
|
|
30456
|
+
(_a2 = props2.onInteractOutside) == null ? void 0 : _a2.call(props2, event);
|
|
30457
|
+
if (!event.defaultPrevented) {
|
|
30458
|
+
hasInteractedOutsideRef.current = true;
|
|
30459
|
+
if (event.detail.originalEvent.type === "pointerdown") {
|
|
30460
|
+
hasPointerDownOutsideRef.current = true;
|
|
30488
30461
|
}
|
|
30489
|
-
|
|
30490
|
-
|
|
30491
|
-
|
|
30492
|
-
|
|
30493
|
-
|
|
30494
|
-
|
|
30495
|
-
|
|
30496
|
-
});
|
|
30497
|
-
}
|
|
30498
|
-
function BooleanEditor({
|
|
30499
|
-
current,
|
|
30500
|
-
option: option2,
|
|
30501
|
-
setCurrent
|
|
30502
|
-
}) {
|
|
30503
|
-
return /* @__PURE__ */ jsxs(Fragment, {
|
|
30504
|
-
children: [/* @__PURE__ */ createElement("div", {
|
|
30505
|
-
...{
|
|
30506
|
-
className: "mly78zum5 mly1lvf691 mly117nqv4"
|
|
30507
|
-
},
|
|
30508
|
-
key: option2.name
|
|
30509
|
-
}, /* @__PURE__ */ jsx("input", {
|
|
30510
|
-
type: "checkbox",
|
|
30511
|
-
checked: current[option2.name] === "true",
|
|
30512
|
-
onChange: ({
|
|
30513
|
-
target: {
|
|
30514
|
-
checked
|
|
30462
|
+
}
|
|
30463
|
+
const target = event.target;
|
|
30464
|
+
const targetIsTrigger = (_b2 = context.triggerRef.current) == null ? void 0 : _b2.contains(target);
|
|
30465
|
+
if (targetIsTrigger) event.preventDefault();
|
|
30466
|
+
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
30467
|
+
event.preventDefault();
|
|
30468
|
+
}
|
|
30515
30469
|
}
|
|
30516
|
-
}) => {
|
|
30517
|
-
setCurrent({
|
|
30518
|
-
...current,
|
|
30519
|
-
[option2.name]: checked.toString()
|
|
30520
|
-
});
|
|
30521
30470
|
}
|
|
30522
|
-
|
|
30523
|
-
|
|
30524
|
-
|
|
30525
|
-
|
|
30526
|
-
|
|
30527
|
-
}
|
|
30528
|
-
|
|
30529
|
-
|
|
30530
|
-
|
|
30531
|
-
|
|
30532
|
-
|
|
30533
|
-
|
|
30534
|
-
|
|
30535
|
-
|
|
30536
|
-
|
|
30537
|
-
|
|
30538
|
-
|
|
30539
|
-
|
|
30540
|
-
|
|
30541
|
-
|
|
30542
|
-
|
|
30543
|
-
|
|
30544
|
-
|
|
30545
|
-
|
|
30471
|
+
);
|
|
30472
|
+
}
|
|
30473
|
+
);
|
|
30474
|
+
var DialogContentImpl = React.forwardRef(
|
|
30475
|
+
(props2, forwardedRef) => {
|
|
30476
|
+
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
|
|
30477
|
+
const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
|
|
30478
|
+
const contentRef = React.useRef(null);
|
|
30479
|
+
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
30480
|
+
useFocusGuards();
|
|
30481
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30482
|
+
/* @__PURE__ */ jsx(
|
|
30483
|
+
FocusScope,
|
|
30484
|
+
{
|
|
30485
|
+
asChild: true,
|
|
30486
|
+
loop: true,
|
|
30487
|
+
trapped: trapFocus,
|
|
30488
|
+
onMountAutoFocus: onOpenAutoFocus,
|
|
30489
|
+
onUnmountAutoFocus: onCloseAutoFocus,
|
|
30490
|
+
children: /* @__PURE__ */ jsx(
|
|
30491
|
+
DismissableLayer,
|
|
30492
|
+
{
|
|
30493
|
+
role: "dialog",
|
|
30494
|
+
id: context.contentId,
|
|
30495
|
+
"aria-describedby": context.descriptionId,
|
|
30496
|
+
"aria-labelledby": context.titleId,
|
|
30497
|
+
"data-state": getState(context.open),
|
|
30498
|
+
...contentProps,
|
|
30499
|
+
ref: composedRefs,
|
|
30500
|
+
onDismiss: () => context.onOpenChange(false)
|
|
30501
|
+
}
|
|
30502
|
+
)
|
|
30546
30503
|
}
|
|
30547
|
-
|
|
30548
|
-
|
|
30549
|
-
|
|
30550
|
-
|
|
30551
|
-
|
|
30552
|
-
|
|
30553
|
-
|
|
30554
|
-
|
|
30555
|
-
|
|
30556
|
-
|
|
30557
|
-
|
|
30558
|
-
|
|
30559
|
-
|
|
30560
|
-
})
|
|
30561
|
-
|
|
30562
|
-
|
|
30563
|
-
|
|
30564
|
-
|
|
30565
|
-
|
|
30566
|
-
|
|
30567
|
-
|
|
30568
|
-
|
|
30569
|
-
|
|
30570
|
-
|
|
30571
|
-
|
|
30572
|
-
|
|
30573
|
-
|
|
30574
|
-
|
|
30575
|
-
|
|
30576
|
-
|
|
30504
|
+
),
|
|
30505
|
+
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
30506
|
+
/* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
|
|
30507
|
+
/* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
30508
|
+
] })
|
|
30509
|
+
] });
|
|
30510
|
+
}
|
|
30511
|
+
);
|
|
30512
|
+
var TITLE_NAME = "DialogTitle";
|
|
30513
|
+
var DialogTitle = React.forwardRef(
|
|
30514
|
+
(props2, forwardedRef) => {
|
|
30515
|
+
const { __scopeDialog, ...titleProps } = props2;
|
|
30516
|
+
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
30517
|
+
return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
30518
|
+
}
|
|
30519
|
+
);
|
|
30520
|
+
DialogTitle.displayName = TITLE_NAME;
|
|
30521
|
+
var DESCRIPTION_NAME = "DialogDescription";
|
|
30522
|
+
var DialogDescription = React.forwardRef(
|
|
30523
|
+
(props2, forwardedRef) => {
|
|
30524
|
+
const { __scopeDialog, ...descriptionProps } = props2;
|
|
30525
|
+
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
30526
|
+
return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
30527
|
+
}
|
|
30528
|
+
);
|
|
30529
|
+
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
30530
|
+
var CLOSE_NAME = "DialogClose";
|
|
30531
|
+
var DialogClose = React.forwardRef(
|
|
30532
|
+
(props2, forwardedRef) => {
|
|
30533
|
+
const { __scopeDialog, ...closeProps } = props2;
|
|
30534
|
+
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
30535
|
+
return /* @__PURE__ */ jsx(
|
|
30536
|
+
Primitive.button,
|
|
30537
|
+
{
|
|
30538
|
+
type: "button",
|
|
30539
|
+
...closeProps,
|
|
30540
|
+
ref: forwardedRef,
|
|
30541
|
+
onClick: composeEventHandlers(props2.onClick, () => context.onOpenChange(false))
|
|
30577
30542
|
}
|
|
30578
|
-
|
|
30579
|
-
}
|
|
30543
|
+
);
|
|
30544
|
+
}
|
|
30545
|
+
);
|
|
30546
|
+
DialogClose.displayName = CLOSE_NAME;
|
|
30547
|
+
function getState(open) {
|
|
30548
|
+
return open ? "open" : "closed";
|
|
30580
30549
|
}
|
|
30581
|
-
|
|
30582
|
-
|
|
30583
|
-
|
|
30550
|
+
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
30551
|
+
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
30552
|
+
contentName: CONTENT_NAME$1,
|
|
30553
|
+
titleName: TITLE_NAME,
|
|
30554
|
+
docsSlug: "dialog"
|
|
30555
|
+
});
|
|
30556
|
+
var TitleWarning = ({ titleId }) => {
|
|
30557
|
+
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
30558
|
+
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
30559
|
+
|
|
30560
|
+
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
30561
|
+
|
|
30562
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
30563
|
+
React.useEffect(() => {
|
|
30564
|
+
if (titleId) {
|
|
30565
|
+
const hasTitle = document.getElementById(titleId);
|
|
30566
|
+
if (!hasTitle) console.error(MESSAGE);
|
|
30567
|
+
}
|
|
30568
|
+
}, [MESSAGE, titleId]);
|
|
30569
|
+
return null;
|
|
30570
|
+
};
|
|
30571
|
+
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
30572
|
+
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
30573
|
+
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
30574
|
+
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
30575
|
+
React.useEffect(() => {
|
|
30576
|
+
var _a2;
|
|
30577
|
+
const describedById = (_a2 = contentRef.current) == null ? void 0 : _a2.getAttribute("aria-describedby");
|
|
30578
|
+
if (descriptionId && describedById) {
|
|
30579
|
+
const hasDescription = document.getElementById(descriptionId);
|
|
30580
|
+
if (!hasDescription) console.warn(MESSAGE);
|
|
30581
|
+
}
|
|
30582
|
+
}, [MESSAGE, contentRef, descriptionId]);
|
|
30583
|
+
return null;
|
|
30584
|
+
};
|
|
30585
|
+
var Root = Dialog;
|
|
30586
|
+
var Portal = DialogPortal;
|
|
30587
|
+
var Overlay = DialogOverlay;
|
|
30588
|
+
var Content$1 = DialogContent;
|
|
30589
|
+
var Title = DialogTitle;
|
|
30590
|
+
var Description = DialogDescription;
|
|
30591
|
+
var Close = DialogClose;
|
|
30592
|
+
const styles$s = {
|
|
30593
|
+
left: {
|
|
30594
|
+
display: "mly78zum5",
|
|
30595
|
+
justifyContent: "mly1lvf691",
|
|
30584
30596
|
$$css: true
|
|
30585
30597
|
},
|
|
30586
|
-
|
|
30598
|
+
right: {
|
|
30599
|
+
display: "mly78zum5",
|
|
30600
|
+
justifyContent: "mly1rfj78v",
|
|
30601
|
+
$$css: true
|
|
30602
|
+
},
|
|
30603
|
+
heading: {
|
|
30604
|
+
gridColumn: "mly623te4",
|
|
30605
|
+
gridColumnStart: null,
|
|
30606
|
+
gridColumnEnd: null,
|
|
30607
|
+
fontWeight: "mly117nqv4",
|
|
30608
|
+
$$css: true
|
|
30609
|
+
},
|
|
30610
|
+
label: {
|
|
30611
|
+
whiteSpace: "mlyuxw1ft",
|
|
30612
|
+
$$css: true
|
|
30613
|
+
},
|
|
30614
|
+
divider: {
|
|
30615
|
+
gridColumn: "mly1a80n4u",
|
|
30616
|
+
gridColumnStart: null,
|
|
30617
|
+
gridColumnEnd: null,
|
|
30618
|
+
borderTop: "mlye536se",
|
|
30619
|
+
borderTopWidth: null,
|
|
30620
|
+
borderTopStyle: null,
|
|
30621
|
+
borderTopColor: null,
|
|
30622
|
+
$$css: true
|
|
30623
|
+
},
|
|
30624
|
+
editor: {
|
|
30587
30625
|
display: "mly78zum5",
|
|
30588
30626
|
flexDirection: "mlydt5ytf",
|
|
30589
|
-
boxShadow: "mly5n1uv4",
|
|
30590
|
-
backgroundColor: "mly12peec7",
|
|
30591
|
-
borderRadius: "mlyur7f20",
|
|
30592
|
-
borderStartStartRadius: null,
|
|
30593
|
-
borderStartEndRadius: null,
|
|
30594
|
-
borderEndStartRadius: null,
|
|
30595
|
-
borderEndEndRadius: null,
|
|
30596
|
-
borderTopLeftRadius: null,
|
|
30597
|
-
borderTopRightRadius: null,
|
|
30598
|
-
borderBottomLeftRadius: null,
|
|
30599
|
-
borderBottomRightRadius: null,
|
|
30600
|
-
padding: "mlye8ttls",
|
|
30601
|
-
paddingInline: null,
|
|
30602
|
-
paddingStart: null,
|
|
30603
|
-
paddingLeft: null,
|
|
30604
|
-
paddingEnd: null,
|
|
30605
|
-
paddingRight: null,
|
|
30606
|
-
paddingBlock: null,
|
|
30607
|
-
paddingTop: null,
|
|
30608
|
-
paddingBottom: null,
|
|
30609
|
-
minWidth: "mlylm99nl",
|
|
30610
|
-
maxWidth: "mly1jkqq1h",
|
|
30611
30627
|
gap: "mly167g77z",
|
|
30612
30628
|
rowGap: null,
|
|
30613
30629
|
columnGap: null,
|
|
30630
|
+
overflow: "mlyb3r6kr",
|
|
30631
|
+
overflowX: null,
|
|
30632
|
+
overflowY: null,
|
|
30614
30633
|
$$css: true
|
|
30615
30634
|
},
|
|
30616
|
-
|
|
30617
|
-
|
|
30618
|
-
|
|
30619
|
-
|
|
30635
|
+
editorGrid: {
|
|
30636
|
+
display: "mlyrvj5dj",
|
|
30637
|
+
gridTemplateColumns: "mly16kridx",
|
|
30638
|
+
gridAutoRows: "mlysd5ean",
|
|
30639
|
+
gap: "mly167g77z",
|
|
30640
|
+
rowGap: null,
|
|
30641
|
+
columnGap: null,
|
|
30642
|
+
overflowY: "mly1odjw0f",
|
|
30643
|
+
$$css: true
|
|
30644
|
+
},
|
|
30645
|
+
editorRow: {
|
|
30646
|
+
display: "mly78zum5",
|
|
30647
|
+
gap: "mly167g77z",
|
|
30648
|
+
rowGap: null,
|
|
30649
|
+
columnGap: null,
|
|
30650
|
+
$$css: true
|
|
30651
|
+
},
|
|
30652
|
+
editorCell: {
|
|
30653
|
+
flexGrow: "mly1iyjqo2",
|
|
30654
|
+
$$css: true
|
|
30655
|
+
},
|
|
30656
|
+
input: {
|
|
30657
|
+
border: "mly27xtdb",
|
|
30658
|
+
borderWidth: null,
|
|
30659
|
+
borderInlineWidth: null,
|
|
30660
|
+
borderInlineStartWidth: null,
|
|
30661
|
+
borderLeftWidth: null,
|
|
30662
|
+
borderInlineEndWidth: null,
|
|
30663
|
+
borderRightWidth: null,
|
|
30664
|
+
borderBlockWidth: null,
|
|
30665
|
+
borderTopWidth: null,
|
|
30666
|
+
borderBottomWidth: null,
|
|
30667
|
+
borderStyle: null,
|
|
30668
|
+
borderInlineStyle: null,
|
|
30669
|
+
borderInlineStartStyle: null,
|
|
30670
|
+
borderLeftStyle: null,
|
|
30671
|
+
borderInlineEndStyle: null,
|
|
30672
|
+
borderRightStyle: null,
|
|
30673
|
+
borderBlockStyle: null,
|
|
30674
|
+
borderTopStyle: null,
|
|
30675
|
+
borderBottomStyle: null,
|
|
30676
|
+
borderColor: null,
|
|
30677
|
+
borderInlineColor: null,
|
|
30678
|
+
borderInlineStartColor: null,
|
|
30679
|
+
borderLeftColor: null,
|
|
30680
|
+
borderInlineEndColor: null,
|
|
30681
|
+
borderRightColor: null,
|
|
30682
|
+
borderBlockColor: null,
|
|
30683
|
+
borderTopColor: null,
|
|
30684
|
+
borderBottomColor: null,
|
|
30685
|
+
borderRadius: "mly12oqio5",
|
|
30686
|
+
borderStartStartRadius: null,
|
|
30687
|
+
borderStartEndRadius: null,
|
|
30688
|
+
borderEndStartRadius: null,
|
|
30689
|
+
borderEndEndRadius: null,
|
|
30690
|
+
borderTopLeftRadius: null,
|
|
30691
|
+
borderTopRightRadius: null,
|
|
30692
|
+
borderBottomLeftRadius: null,
|
|
30693
|
+
borderBottomRightRadius: null,
|
|
30694
|
+
color: "mlyizdh9v",
|
|
30695
|
+
padding: "mly34lxi1",
|
|
30696
|
+
paddingInline: null,
|
|
30697
|
+
paddingStart: null,
|
|
30698
|
+
paddingLeft: null,
|
|
30699
|
+
paddingEnd: null,
|
|
30700
|
+
paddingRight: null,
|
|
30701
|
+
paddingBlock: null,
|
|
30702
|
+
paddingTop: null,
|
|
30703
|
+
paddingBottom: null,
|
|
30704
|
+
$$css: true
|
|
30705
|
+
},
|
|
30706
|
+
card: {
|
|
30707
|
+
maxWidth: "mly1dc814f",
|
|
30708
|
+
$$css: true
|
|
30709
|
+
},
|
|
30710
|
+
infoTrigger: {
|
|
30711
|
+
display: "mly3nfvp2",
|
|
30712
|
+
alignItems: "mly1071x5a",
|
|
30713
|
+
justifyContent: "mlyl56j7k",
|
|
30714
|
+
paddingRight: "mlyy13l1i",
|
|
30715
|
+
paddingInlineStart: null,
|
|
30716
|
+
paddingInlineEnd: null,
|
|
30717
|
+
paddingTop: "mly1iorvi4",
|
|
30718
|
+
$$css: true
|
|
30719
|
+
}
|
|
30720
|
+
};
|
|
30721
|
+
function HoverCard({
|
|
30722
|
+
children,
|
|
30723
|
+
customStyle
|
|
30724
|
+
}) {
|
|
30725
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30726
|
+
..._stylex.props(styles$r.container, fontStyles.body, customStyle),
|
|
30727
|
+
children
|
|
30728
|
+
});
|
|
30729
|
+
}
|
|
30730
|
+
const styles$r = {
|
|
30731
|
+
container: {
|
|
30732
|
+
boxShadow: "mly5n1uv4",
|
|
30733
|
+
backgroundColor: "mly12peec7",
|
|
30734
|
+
borderRadius: "mly4pepcl",
|
|
30735
|
+
borderStartStartRadius: null,
|
|
30736
|
+
borderStartEndRadius: null,
|
|
30737
|
+
borderEndStartRadius: null,
|
|
30738
|
+
borderEndEndRadius: null,
|
|
30739
|
+
borderTopLeftRadius: null,
|
|
30740
|
+
borderTopRightRadius: null,
|
|
30741
|
+
borderBottomLeftRadius: null,
|
|
30742
|
+
borderBottomRightRadius: null,
|
|
30743
|
+
padding: "mlyc7ga6q",
|
|
30744
|
+
paddingInline: null,
|
|
30745
|
+
paddingStart: null,
|
|
30746
|
+
paddingLeft: null,
|
|
30747
|
+
paddingEnd: null,
|
|
30748
|
+
paddingRight: null,
|
|
30749
|
+
paddingBlock: null,
|
|
30750
|
+
paddingTop: null,
|
|
30751
|
+
paddingBottom: null,
|
|
30752
|
+
display: "mly78zum5",
|
|
30753
|
+
flexDirection: "mlydt5ytf",
|
|
30754
|
+
gap: "mly167g77z",
|
|
30755
|
+
rowGap: null,
|
|
30756
|
+
columnGap: null,
|
|
30757
|
+
$$css: true
|
|
30758
|
+
}
|
|
30759
|
+
};
|
|
30760
|
+
function InfoHover({
|
|
30761
|
+
info
|
|
30762
|
+
}) {
|
|
30763
|
+
return /* @__PURE__ */ jsxs(Root3$1, {
|
|
30764
|
+
children: [/* @__PURE__ */ jsx(Trigger$4, {
|
|
30765
|
+
asChild: true,
|
|
30766
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
30767
|
+
..._stylex.props(styles$s.infoTrigger, fontStyles.body),
|
|
30768
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
30769
|
+
name: "info",
|
|
30770
|
+
color: "disabled"
|
|
30771
|
+
})
|
|
30772
|
+
})
|
|
30773
|
+
}), /* @__PURE__ */ jsx(Portal$4, {
|
|
30774
|
+
children: /* @__PURE__ */ jsx(Content2$4, {
|
|
30775
|
+
side: "right",
|
|
30776
|
+
align: "start",
|
|
30777
|
+
children: /* @__PURE__ */ jsx(HoverCard, {
|
|
30778
|
+
customStyle: styles$s.card,
|
|
30779
|
+
children: info
|
|
30780
|
+
})
|
|
30781
|
+
})
|
|
30782
|
+
})]
|
|
30783
|
+
});
|
|
30784
|
+
}
|
|
30785
|
+
function useClickOutside(refOrRefs, handler) {
|
|
30786
|
+
useEffect(() => {
|
|
30787
|
+
const refs = Array.isArray(refOrRefs) ? refOrRefs : [refOrRefs];
|
|
30788
|
+
let down = false;
|
|
30789
|
+
const isInOneElement = (ref, event) => {
|
|
30790
|
+
return !ref.current || event.target instanceof Element && ref.current.contains(event.target);
|
|
30791
|
+
};
|
|
30792
|
+
const isInElement = (event) => {
|
|
30793
|
+
return refs.some((ref) => isInOneElement(ref, event));
|
|
30794
|
+
};
|
|
30795
|
+
const onMouseUp = (event) => {
|
|
30796
|
+
if (!down || isInElement(event)) return;
|
|
30797
|
+
handler(event);
|
|
30798
|
+
down = false;
|
|
30799
|
+
};
|
|
30800
|
+
const onMouseDown = (event) => {
|
|
30801
|
+
if (isInElement(event)) return;
|
|
30802
|
+
down = true;
|
|
30803
|
+
};
|
|
30804
|
+
document.addEventListener("mouseup", onMouseUp);
|
|
30805
|
+
document.addEventListener("mousedown", onMouseDown);
|
|
30806
|
+
return () => {
|
|
30807
|
+
document.removeEventListener("mouseup", onMouseUp);
|
|
30808
|
+
document.removeEventListener("mousedown", onMouseDown);
|
|
30809
|
+
};
|
|
30810
|
+
}, [refOrRefs, handler]);
|
|
30811
|
+
}
|
|
30812
|
+
const PillInput = ({
|
|
30813
|
+
values,
|
|
30814
|
+
setValues,
|
|
30815
|
+
autoFocus,
|
|
30816
|
+
placeholder,
|
|
30817
|
+
type = "text",
|
|
30818
|
+
value: controlledValue,
|
|
30819
|
+
setValue: setControlledValue,
|
|
30820
|
+
focusElement,
|
|
30821
|
+
color = DEFAULT_TOKEN_COLOR,
|
|
30822
|
+
customStyle
|
|
30823
|
+
}) => {
|
|
30824
|
+
const [uncontrolledValue, setUncontrolledValue] = useState("");
|
|
30825
|
+
const [_focused, setFocused] = useState(false);
|
|
30826
|
+
const inp = useRef(null);
|
|
30827
|
+
const ref = useRef(null);
|
|
30828
|
+
const [selectedPill, setSelectedPill] = useState(void 0);
|
|
30829
|
+
const pillRefs = useRef([]);
|
|
30830
|
+
const value = controlledValue || uncontrolledValue;
|
|
30831
|
+
const setValue = setControlledValue || setUncontrolledValue;
|
|
30832
|
+
const deletePill = useCallback((idx) => {
|
|
30833
|
+
var _a2;
|
|
30834
|
+
const newValues = [...values];
|
|
30835
|
+
newValues.splice(idx, 1);
|
|
30836
|
+
setValues(newValues);
|
|
30837
|
+
if (selectedPill === 0) {
|
|
30838
|
+
if (values.length === 1) {
|
|
30839
|
+
setSelectedPill(void 0);
|
|
30840
|
+
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30841
|
+
} else {
|
|
30842
|
+
setSelectedPill(0);
|
|
30843
|
+
}
|
|
30844
|
+
} else {
|
|
30845
|
+
setSelectedPill(idx - 1);
|
|
30846
|
+
}
|
|
30847
|
+
}, [selectedPill, setValues, values]);
|
|
30848
|
+
const pills = useMemo(() => {
|
|
30849
|
+
pillRefs.current = new Array(values.length);
|
|
30850
|
+
return values.map((value2, index2) => /* @__PURE__ */ jsx(Pill, {
|
|
30851
|
+
color,
|
|
30852
|
+
onClick: () => {
|
|
30853
|
+
setSelectedPill(index2);
|
|
30854
|
+
},
|
|
30855
|
+
onDelete: () => deletePill(index2),
|
|
30856
|
+
forwardRef: (ref2) => {
|
|
30857
|
+
pillRefs.current[index2] = ref2;
|
|
30858
|
+
},
|
|
30859
|
+
children: value2
|
|
30860
|
+
}, value2));
|
|
30861
|
+
}, [color, deletePill, values]);
|
|
30862
|
+
useEffect(() => {
|
|
30863
|
+
var _a2;
|
|
30864
|
+
if (selectedPill !== void 0) {
|
|
30865
|
+
(_a2 = pillRefs.current[selectedPill]) == null ? void 0 : _a2.focus();
|
|
30866
|
+
}
|
|
30867
|
+
}, [pills, selectedPill]);
|
|
30868
|
+
const onKeyUp = (event) => {
|
|
30869
|
+
var _a2, _b2;
|
|
30870
|
+
if (event.key === "Backspace") {
|
|
30871
|
+
if (selectedPill !== void 0) {
|
|
30872
|
+
deletePill(selectedPill);
|
|
30873
|
+
}
|
|
30874
|
+
} else if (event.key === "ArrowRight") {
|
|
30875
|
+
if (selectedPill === values.length - 1) {
|
|
30876
|
+
setSelectedPill(void 0);
|
|
30877
|
+
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30878
|
+
} else if (selectedPill !== void 0) {
|
|
30879
|
+
setSelectedPill(selectedPill + 1);
|
|
30880
|
+
}
|
|
30881
|
+
} else if (event.key === "ArrowLeft") {
|
|
30882
|
+
if (selectedPill !== void 0 && selectedPill > 0) {
|
|
30883
|
+
setSelectedPill(selectedPill - 1);
|
|
30884
|
+
}
|
|
30885
|
+
} else {
|
|
30886
|
+
(_b2 = inp.current) == null ? void 0 : _b2.focus();
|
|
30887
|
+
}
|
|
30888
|
+
};
|
|
30889
|
+
const commitValue = () => {
|
|
30890
|
+
if (value.length > 0 && !values.includes(value)) {
|
|
30891
|
+
setValues([...values, value]);
|
|
30892
|
+
setValue("");
|
|
30893
|
+
}
|
|
30894
|
+
};
|
|
30895
|
+
useClickOutside(focusElement ? [ref, focusElement] : ref, () => {
|
|
30896
|
+
setFocused(false);
|
|
30897
|
+
commitValue();
|
|
30898
|
+
});
|
|
30899
|
+
return /* @__PURE__ */ jsx("div", {
|
|
30900
|
+
..._stylex.props(fontStyles.body, styles$q.main),
|
|
30901
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
30902
|
+
..._stylex.props(styles$q.content, customStyle),
|
|
30903
|
+
onKeyUp,
|
|
30904
|
+
onClick: () => {
|
|
30905
|
+
var _a2;
|
|
30906
|
+
return (_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
30907
|
+
},
|
|
30908
|
+
ref,
|
|
30909
|
+
children: [pills, /* @__PURE__ */ jsx("input", {
|
|
30910
|
+
...{
|
|
30911
|
+
className: "mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2"
|
|
30912
|
+
},
|
|
30913
|
+
ref: inp,
|
|
30914
|
+
type,
|
|
30915
|
+
placeholder: values.length === 0 ? placeholder : "",
|
|
30916
|
+
value,
|
|
30917
|
+
size: 1,
|
|
30918
|
+
onChange: (event) => {
|
|
30919
|
+
setValue(event.target.value);
|
|
30920
|
+
},
|
|
30921
|
+
onKeyDown: (event) => {
|
|
30922
|
+
if (event.key === "Enter") {
|
|
30923
|
+
if (value !== "") {
|
|
30924
|
+
commitValue();
|
|
30925
|
+
event.stopPropagation();
|
|
30926
|
+
event.preventDefault();
|
|
30927
|
+
}
|
|
30928
|
+
}
|
|
30929
|
+
},
|
|
30930
|
+
onKeyUp: (event) => {
|
|
30931
|
+
var _a2, _b2, _c2, _d;
|
|
30932
|
+
if (event.key === "Backspace") {
|
|
30933
|
+
if (value === "" && values.length > 0) {
|
|
30934
|
+
commitValue();
|
|
30935
|
+
(_a2 = inp.current) == null ? void 0 : _a2.blur();
|
|
30936
|
+
setSelectedPill(values.length - 1);
|
|
30937
|
+
}
|
|
30938
|
+
} else if (event.key === "ArrowLeft") {
|
|
30939
|
+
if (((_b2 = inp.current) == null ? void 0 : _b2.selectionStart) === 0 || ((_c2 = inp.current) == null ? void 0 : _c2.selectionStart) === null) {
|
|
30940
|
+
commitValue();
|
|
30941
|
+
(_d = inp.current) == null ? void 0 : _d.blur();
|
|
30942
|
+
setSelectedPill(values.length - 1);
|
|
30943
|
+
event.preventDefault();
|
|
30944
|
+
event.stopPropagation();
|
|
30945
|
+
}
|
|
30946
|
+
}
|
|
30947
|
+
},
|
|
30948
|
+
onFocus: () => {
|
|
30949
|
+
setFocused(true);
|
|
30950
|
+
setSelectedPill(void 0);
|
|
30951
|
+
},
|
|
30952
|
+
autoFocus
|
|
30953
|
+
})]
|
|
30954
|
+
})
|
|
30955
|
+
});
|
|
30956
|
+
};
|
|
30957
|
+
const Pill = ({
|
|
30958
|
+
children,
|
|
30959
|
+
color = DEFAULT_TOKEN_COLOR,
|
|
30960
|
+
forwardRef,
|
|
30961
|
+
onClick,
|
|
30962
|
+
onDelete
|
|
30963
|
+
}) => {
|
|
30964
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
30965
|
+
onClick,
|
|
30966
|
+
tabIndex: 0,
|
|
30967
|
+
ref: forwardRef,
|
|
30968
|
+
..._stylex.props(styles$q.pill, colorVariants[color]),
|
|
30969
|
+
children: [children, /* @__PURE__ */ jsx("div", {
|
|
30970
|
+
title: "Remove",
|
|
30971
|
+
...{
|
|
30972
|
+
className: "mly3nfvp2"
|
|
30973
|
+
},
|
|
30974
|
+
children: /* @__PURE__ */ jsx(SvgClear, {
|
|
30975
|
+
onClick: () => onDelete(),
|
|
30976
|
+
...{
|
|
30977
|
+
className: "mly6jxa94 mly1v9usgg"
|
|
30978
|
+
}
|
|
30979
|
+
})
|
|
30980
|
+
})]
|
|
30981
|
+
});
|
|
30982
|
+
};
|
|
30983
|
+
const styles$q = {
|
|
30984
|
+
main: {
|
|
30985
|
+
borderRadius: "mly12oqio5",
|
|
30986
|
+
borderStartStartRadius: null,
|
|
30987
|
+
borderStartEndRadius: null,
|
|
30988
|
+
borderEndStartRadius: null,
|
|
30989
|
+
borderEndEndRadius: null,
|
|
30990
|
+
borderTopLeftRadius: null,
|
|
30991
|
+
borderTopRightRadius: null,
|
|
30992
|
+
borderBottomLeftRadius: null,
|
|
30993
|
+
borderBottomRightRadius: null,
|
|
30994
|
+
border: "mlyvckdp7",
|
|
30995
|
+
borderWidth: null,
|
|
30996
|
+
borderInlineWidth: null,
|
|
30997
|
+
borderInlineStartWidth: null,
|
|
30998
|
+
borderLeftWidth: null,
|
|
30999
|
+
borderInlineEndWidth: null,
|
|
31000
|
+
borderRightWidth: null,
|
|
31001
|
+
borderBlockWidth: null,
|
|
31002
|
+
borderTopWidth: null,
|
|
31003
|
+
borderBottomWidth: null,
|
|
31004
|
+
borderStyle: null,
|
|
31005
|
+
borderInlineStyle: null,
|
|
31006
|
+
borderInlineStartStyle: null,
|
|
31007
|
+
borderLeftStyle: null,
|
|
31008
|
+
borderInlineEndStyle: null,
|
|
31009
|
+
borderRightStyle: null,
|
|
31010
|
+
borderBlockStyle: null,
|
|
31011
|
+
borderTopStyle: null,
|
|
31012
|
+
borderBottomStyle: null,
|
|
31013
|
+
borderColor: null,
|
|
31014
|
+
borderInlineColor: null,
|
|
31015
|
+
borderInlineStartColor: null,
|
|
31016
|
+
borderLeftColor: null,
|
|
31017
|
+
borderInlineEndColor: null,
|
|
31018
|
+
borderRightColor: null,
|
|
31019
|
+
borderBlockColor: null,
|
|
31020
|
+
borderTopColor: null,
|
|
31021
|
+
borderBottomColor: null,
|
|
31022
|
+
padding: "mlybsehbd",
|
|
31023
|
+
paddingInline: null,
|
|
31024
|
+
paddingStart: null,
|
|
31025
|
+
paddingLeft: null,
|
|
31026
|
+
paddingEnd: null,
|
|
31027
|
+
paddingRight: null,
|
|
31028
|
+
paddingBlock: null,
|
|
31029
|
+
paddingTop: null,
|
|
31030
|
+
paddingBottom: null,
|
|
31031
|
+
display: "mlyrvj5dj",
|
|
31032
|
+
minHeight: "mly2lwn1j",
|
|
31033
|
+
overflow: "mlyysyzu8",
|
|
31034
|
+
overflowX: null,
|
|
31035
|
+
overflowY: null,
|
|
31036
|
+
$$css: true
|
|
31037
|
+
},
|
|
31038
|
+
content: {
|
|
31039
|
+
outline: "mly1a2a7pz",
|
|
31040
|
+
outlineColor: null,
|
|
31041
|
+
outlineOffset: null,
|
|
31042
|
+
outlineStyle: null,
|
|
31043
|
+
outlineWidth: null,
|
|
31044
|
+
display: "mly78zum5",
|
|
31045
|
+
flexWrap: "mly1a02dak",
|
|
31046
|
+
gap: "mly1ed6fcf",
|
|
31047
|
+
rowGap: null,
|
|
31048
|
+
columnGap: null,
|
|
31049
|
+
borderColor: "mly1akygb0 mlyetl2wx",
|
|
31050
|
+
borderInlineColor: null,
|
|
31051
|
+
borderInlineStartColor: null,
|
|
31052
|
+
borderLeftColor: null,
|
|
31053
|
+
borderInlineEndColor: null,
|
|
31054
|
+
borderRightColor: null,
|
|
31055
|
+
borderBlockColor: null,
|
|
31056
|
+
borderTopColor: null,
|
|
31057
|
+
borderBottomColor: null,
|
|
31058
|
+
$$css: true
|
|
31059
|
+
},
|
|
31060
|
+
pill: {
|
|
31061
|
+
backgroundColor: "mlyy9rfsq",
|
|
31062
|
+
borderRadius: "mly1sxf85j",
|
|
31063
|
+
borderStartStartRadius: null,
|
|
31064
|
+
borderStartEndRadius: null,
|
|
31065
|
+
borderEndStartRadius: null,
|
|
31066
|
+
borderEndEndRadius: null,
|
|
31067
|
+
borderTopLeftRadius: null,
|
|
31068
|
+
borderTopRightRadius: null,
|
|
31069
|
+
borderBottomLeftRadius: null,
|
|
31070
|
+
borderBottomRightRadius: null,
|
|
31071
|
+
color: "mly1xre2ib",
|
|
31072
|
+
display: "mly78zum5",
|
|
31073
|
+
alignItems: "mly6s0dn4",
|
|
31074
|
+
gap: "mly1nejdyq",
|
|
31075
|
+
rowGap: null,
|
|
31076
|
+
columnGap: null,
|
|
31077
|
+
padding: "mly1e41zw8",
|
|
31078
|
+
paddingInline: null,
|
|
31079
|
+
paddingStart: null,
|
|
31080
|
+
paddingLeft: null,
|
|
31081
|
+
paddingEnd: null,
|
|
31082
|
+
paddingRight: null,
|
|
31083
|
+
paddingBlock: null,
|
|
31084
|
+
paddingTop: null,
|
|
31085
|
+
paddingBottom: null,
|
|
31086
|
+
textTransform: "mly6mezaz",
|
|
31087
|
+
cursor: "mly1ypdohk",
|
|
31088
|
+
height: "mly1qx5ct2",
|
|
31089
|
+
whiteSpace: "mlyuxw1ft",
|
|
31090
|
+
$$css: true
|
|
31091
|
+
}
|
|
31092
|
+
};
|
|
31093
|
+
const colorVariants = {
|
|
31094
|
+
default: {
|
|
31095
|
+
"--mlyvygx4q": "mly1izbou4",
|
|
31096
|
+
"--mly13n7235": "mly8bgh0r",
|
|
31097
|
+
$$css: true
|
|
31098
|
+
},
|
|
31099
|
+
purple: {
|
|
31100
|
+
"--mlyvygx4q": "mly1f8soc4",
|
|
31101
|
+
"--mly13n7235": "mly1r5zvhd",
|
|
31102
|
+
$$css: true
|
|
31103
|
+
},
|
|
31104
|
+
green: {
|
|
31105
|
+
"--mlyvygx4q": "mlyf8wvcd",
|
|
31106
|
+
"--mly13n7235": "mly1u6t2w6",
|
|
31107
|
+
$$css: true
|
|
31108
|
+
},
|
|
31109
|
+
cyan: {
|
|
31110
|
+
"--mlyvygx4q": "mlyrtwgpv",
|
|
31111
|
+
"--mly13n7235": "mlys5r2en",
|
|
31112
|
+
$$css: true
|
|
31113
|
+
}
|
|
31114
|
+
};
|
|
31115
|
+
function OneOfEditor({
|
|
31116
|
+
view,
|
|
31117
|
+
name,
|
|
31118
|
+
path,
|
|
31119
|
+
current,
|
|
31120
|
+
option: option2,
|
|
31121
|
+
updateCurrent
|
|
31122
|
+
}) {
|
|
31123
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31124
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31125
|
+
..._stylex.props(styles$s.label, styles$s.left),
|
|
31126
|
+
children: /* @__PURE__ */ jsxs("label", {
|
|
31127
|
+
children: [option2.title ?? name, ":"]
|
|
31128
|
+
})
|
|
31129
|
+
}), /* @__PURE__ */ jsx("div", {}), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31130
|
+
info: option2.description
|
|
31131
|
+
}) : /* @__PURE__ */ jsx("div", {}), option2.oneOf.map((subOption, key2) => {
|
|
31132
|
+
switch (subOption.type) {
|
|
31133
|
+
case "string":
|
|
31134
|
+
return /* @__PURE__ */ jsx(OneOfStringEditor, {
|
|
31135
|
+
view,
|
|
31136
|
+
name,
|
|
31137
|
+
path,
|
|
31138
|
+
updateCurrent,
|
|
31139
|
+
current,
|
|
31140
|
+
option: subOption
|
|
31141
|
+
}, key2);
|
|
31142
|
+
case "number":
|
|
31143
|
+
return /* @__PURE__ */ jsx(OneOfNumberEditor, {
|
|
31144
|
+
view,
|
|
31145
|
+
name,
|
|
31146
|
+
path,
|
|
31147
|
+
updateCurrent,
|
|
31148
|
+
current,
|
|
31149
|
+
option: subOption
|
|
31150
|
+
}, key2);
|
|
31151
|
+
case "array":
|
|
31152
|
+
return /* @__PURE__ */ jsx(OneOfArrayEditor, {
|
|
31153
|
+
view,
|
|
31154
|
+
name,
|
|
31155
|
+
path,
|
|
31156
|
+
updateCurrent,
|
|
31157
|
+
current,
|
|
31158
|
+
option: subOption
|
|
31159
|
+
}, key2);
|
|
31160
|
+
}
|
|
31161
|
+
return null;
|
|
31162
|
+
})]
|
|
31163
|
+
});
|
|
31164
|
+
}
|
|
31165
|
+
function OneOfStringEditor({
|
|
31166
|
+
path,
|
|
31167
|
+
current,
|
|
31168
|
+
updateCurrent,
|
|
31169
|
+
option: option2
|
|
31170
|
+
}) {
|
|
31171
|
+
const isString2 = typeof current === "string";
|
|
31172
|
+
const [value, setValue] = useState(isString2 ? current : "");
|
|
31173
|
+
if (option2.enum) {
|
|
31174
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31175
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31176
|
+
..._stylex.props(styles$s.left),
|
|
31177
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
31178
|
+
type: "radio",
|
|
31179
|
+
checked: isString2 && option2.enum.includes(current),
|
|
31180
|
+
onChange: ({
|
|
31181
|
+
target: {
|
|
31182
|
+
checked
|
|
31183
|
+
}
|
|
31184
|
+
}) => {
|
|
31185
|
+
if (checked) {
|
|
31186
|
+
updateCurrent(path, value);
|
|
31187
|
+
}
|
|
31188
|
+
}
|
|
31189
|
+
})
|
|
31190
|
+
}), option2.enum.length > 1 ? /* @__PURE__ */ jsx(SelectDropdown, {
|
|
31191
|
+
value,
|
|
31192
|
+
options: option2.enum.map((value2) => ({
|
|
31193
|
+
label: value2,
|
|
31194
|
+
value: value2
|
|
31195
|
+
})),
|
|
31196
|
+
onChange: (value2) => {
|
|
31197
|
+
setValue(value2);
|
|
31198
|
+
updateCurrent(path, value2);
|
|
31199
|
+
}
|
|
31200
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
31201
|
+
children: option2.enum[0]
|
|
31202
|
+
}), /* @__PURE__ */ jsx("div", {})]
|
|
31203
|
+
});
|
|
31204
|
+
} else {
|
|
31205
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31206
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31207
|
+
..._stylex.props(styles$s.left),
|
|
31208
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
31209
|
+
type: "radio",
|
|
31210
|
+
checked: isString2,
|
|
31211
|
+
onChange: ({
|
|
31212
|
+
target: {
|
|
31213
|
+
checked
|
|
31214
|
+
}
|
|
31215
|
+
}) => {
|
|
31216
|
+
if (checked) {
|
|
31217
|
+
updateCurrent(path, value);
|
|
31218
|
+
}
|
|
31219
|
+
}
|
|
31220
|
+
})
|
|
31221
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
31222
|
+
value,
|
|
31223
|
+
onChange: ({
|
|
31224
|
+
target: {
|
|
31225
|
+
value: value2
|
|
31226
|
+
}
|
|
31227
|
+
}) => {
|
|
31228
|
+
setValue(value2);
|
|
31229
|
+
updateCurrent(path, value2);
|
|
31230
|
+
}
|
|
31231
|
+
}), /* @__PURE__ */ jsx("div", {})]
|
|
31232
|
+
});
|
|
31233
|
+
}
|
|
31234
|
+
}
|
|
31235
|
+
function OneOfNumberEditor({
|
|
31236
|
+
path,
|
|
31237
|
+
current,
|
|
31238
|
+
updateCurrent,
|
|
31239
|
+
option: option2
|
|
31240
|
+
}) {
|
|
31241
|
+
const isNumber2 = typeof current === "number";
|
|
31242
|
+
const [value, setValue] = useState(isNumber2 ? current : option2.minimum ?? 0);
|
|
31243
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31244
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31245
|
+
..._stylex.props(styles$s.left),
|
|
31246
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
31247
|
+
type: "radio",
|
|
31248
|
+
checked: isNumber2,
|
|
31249
|
+
onChange: ({
|
|
31250
|
+
target: {
|
|
31251
|
+
checked
|
|
31252
|
+
}
|
|
31253
|
+
}) => {
|
|
31254
|
+
if (checked) {
|
|
31255
|
+
updateCurrent(path, value);
|
|
31256
|
+
}
|
|
31257
|
+
}
|
|
31258
|
+
})
|
|
31259
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
31260
|
+
type: "number",
|
|
31261
|
+
min: option2.minimum,
|
|
31262
|
+
max: option2.maximum,
|
|
31263
|
+
value,
|
|
31264
|
+
onChange: ({
|
|
31265
|
+
target: {
|
|
31266
|
+
valueAsNumber
|
|
31267
|
+
}
|
|
31268
|
+
}) => {
|
|
31269
|
+
setValue(value);
|
|
31270
|
+
updateCurrent(path, valueAsNumber);
|
|
31271
|
+
},
|
|
31272
|
+
..._stylex.props(styles$s.input)
|
|
31273
|
+
}), /* @__PURE__ */ jsx("div", {})]
|
|
31274
|
+
});
|
|
31275
|
+
}
|
|
31276
|
+
function OneOfArrayEditor({
|
|
31277
|
+
path,
|
|
31278
|
+
current,
|
|
31279
|
+
updateCurrent
|
|
31280
|
+
}) {
|
|
31281
|
+
const isArray2 = Array.isArray(current);
|
|
31282
|
+
const [value, setValue] = useState(isArray2 ? current : []);
|
|
31283
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31284
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31285
|
+
..._stylex.props(styles$s.left),
|
|
31286
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
31287
|
+
type: "radio",
|
|
31288
|
+
checked: isArray2,
|
|
31289
|
+
onChange: ({
|
|
31290
|
+
target: {
|
|
31291
|
+
checked
|
|
31292
|
+
}
|
|
31293
|
+
}) => {
|
|
31294
|
+
if (checked) {
|
|
31295
|
+
updateCurrent(path, value);
|
|
31296
|
+
}
|
|
31297
|
+
}
|
|
31298
|
+
})
|
|
31299
|
+
}), /* @__PURE__ */ jsx(PillInput, {
|
|
31300
|
+
values: value,
|
|
31301
|
+
setValues: (values) => {
|
|
31302
|
+
setValue(values);
|
|
31303
|
+
updateCurrent(path, values);
|
|
31304
|
+
}
|
|
31305
|
+
}), /* @__PURE__ */ jsx("div", {})]
|
|
31306
|
+
});
|
|
31307
|
+
}
|
|
31308
|
+
function ArrayEditor({
|
|
31309
|
+
name,
|
|
31310
|
+
path,
|
|
31311
|
+
current,
|
|
31312
|
+
option: option2,
|
|
31313
|
+
updateCurrent
|
|
31314
|
+
}) {
|
|
31315
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31316
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31317
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31318
|
+
children: /* @__PURE__ */ jsxs("label", {
|
|
31319
|
+
children: [option2.title ?? name, ":"]
|
|
31320
|
+
})
|
|
31321
|
+
}), /* @__PURE__ */ jsx(PillInput, {
|
|
31322
|
+
values: current,
|
|
31323
|
+
setValues: (values) => {
|
|
31324
|
+
updateCurrent(path, values);
|
|
31325
|
+
}
|
|
31326
|
+
}), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31327
|
+
info: option2.description
|
|
31328
|
+
}) : /* @__PURE__ */ jsx("div", {})]
|
|
31329
|
+
});
|
|
31330
|
+
}
|
|
31331
|
+
function NumberEditor$1({
|
|
31332
|
+
name,
|
|
31333
|
+
path,
|
|
31334
|
+
current,
|
|
31335
|
+
option: option2,
|
|
31336
|
+
updateCurrent
|
|
31337
|
+
}) {
|
|
31338
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31339
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31340
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31341
|
+
children: /* @__PURE__ */ jsxs("label", {
|
|
31342
|
+
children: [option2.title ?? name, ":"]
|
|
31343
|
+
})
|
|
31344
|
+
}), /* @__PURE__ */ jsx("input", {
|
|
31345
|
+
value: current,
|
|
31346
|
+
type: "number",
|
|
31347
|
+
min: option2.minimum,
|
|
31348
|
+
max: option2.maximum,
|
|
31349
|
+
onChange: ({
|
|
31350
|
+
target: {
|
|
31351
|
+
valueAsNumber
|
|
31352
|
+
}
|
|
31353
|
+
}) => {
|
|
31354
|
+
updateCurrent(path, valueAsNumber);
|
|
31355
|
+
},
|
|
31356
|
+
..._stylex.props(styles$s.input)
|
|
31357
|
+
}, name), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31358
|
+
info: option2.description
|
|
31359
|
+
}) : /* @__PURE__ */ jsx("div", {})]
|
|
31360
|
+
});
|
|
31361
|
+
}
|
|
31362
|
+
function StringEditor$1({
|
|
31363
|
+
name,
|
|
31364
|
+
path,
|
|
31365
|
+
current,
|
|
31366
|
+
option: option2,
|
|
31367
|
+
updateCurrent
|
|
31368
|
+
}) {
|
|
31369
|
+
if (option2.enum) {
|
|
31370
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31371
|
+
children: [/* @__PURE__ */ createElement("div", {
|
|
31372
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31373
|
+
key: `${name}-label`
|
|
31374
|
+
}, /* @__PURE__ */ jsxs("label", {
|
|
31375
|
+
children: [option2.title ?? name, ":"]
|
|
31376
|
+
})), /* @__PURE__ */ jsx(SelectDropdown, {
|
|
31377
|
+
value: current,
|
|
31378
|
+
options: option2.enum.map((value) => ({
|
|
31379
|
+
label: value,
|
|
31380
|
+
value
|
|
31381
|
+
})),
|
|
31382
|
+
onChange: (value) => {
|
|
31383
|
+
updateCurrent(path, value);
|
|
31384
|
+
}
|
|
31385
|
+
}, name), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31386
|
+
info: option2.description
|
|
31387
|
+
}) : /* @__PURE__ */ jsx("div", {})]
|
|
31388
|
+
});
|
|
31389
|
+
} else {
|
|
31390
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31391
|
+
children: [/* @__PURE__ */ createElement("div", {
|
|
31392
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31393
|
+
key: `${name}-label`
|
|
31394
|
+
}, /* @__PURE__ */ jsxs("label", {
|
|
31395
|
+
children: [option2.title ?? name, ":"]
|
|
31396
|
+
})), /* @__PURE__ */ jsx("input", {
|
|
31397
|
+
value: current,
|
|
31398
|
+
onChange: ({
|
|
31399
|
+
target: {
|
|
31400
|
+
value
|
|
31401
|
+
}
|
|
31402
|
+
}) => {
|
|
31403
|
+
updateCurrent(path, value);
|
|
31404
|
+
}
|
|
31405
|
+
}, name), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31406
|
+
info: option2.description
|
|
31407
|
+
}) : /* @__PURE__ */ jsx("div", {})]
|
|
31408
|
+
});
|
|
31409
|
+
}
|
|
31410
|
+
}
|
|
31411
|
+
function BooleanEditor({
|
|
31412
|
+
name,
|
|
31413
|
+
path,
|
|
31414
|
+
current,
|
|
31415
|
+
option: option2,
|
|
31416
|
+
updateCurrent
|
|
31417
|
+
}) {
|
|
31418
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31419
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31420
|
+
..._stylex.props(styles$s.left),
|
|
31421
|
+
children: /* @__PURE__ */ jsxs("label", {
|
|
31422
|
+
..._stylex.props(styles$s.label),
|
|
31423
|
+
htmlFor: `${name}-checkbox`,
|
|
31424
|
+
children: [option2.title ?? name, ":"]
|
|
31425
|
+
}, `${name}-label`)
|
|
31426
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
31427
|
+
..._stylex.props(styles$s.right),
|
|
31428
|
+
children: /* @__PURE__ */ jsx("input", {
|
|
31429
|
+
type: "checkbox",
|
|
31430
|
+
checked: current,
|
|
31431
|
+
onChange: ({
|
|
31432
|
+
target: {
|
|
31433
|
+
checked
|
|
31434
|
+
}
|
|
31435
|
+
}) => {
|
|
31436
|
+
updateCurrent(path, checked);
|
|
31437
|
+
},
|
|
31438
|
+
id: `${name}-checkbox`
|
|
31439
|
+
})
|
|
31440
|
+
}), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31441
|
+
info: option2.description
|
|
31442
|
+
}) : /* @__PURE__ */ jsx("div", {})]
|
|
31443
|
+
});
|
|
31444
|
+
}
|
|
31445
|
+
function FieldEditor({
|
|
31446
|
+
view,
|
|
31447
|
+
name,
|
|
31448
|
+
path,
|
|
31449
|
+
current,
|
|
31450
|
+
option: option2,
|
|
31451
|
+
updateCurrent
|
|
31452
|
+
}) {
|
|
31453
|
+
const [searchValue, setSearchValue] = useState("");
|
|
31454
|
+
const valueListRef = useRef(null);
|
|
31455
|
+
const jsonFields = current ?? [];
|
|
31456
|
+
const fields = jsonFields.map((field) => {
|
|
31457
|
+
try {
|
|
31458
|
+
return JSON.parse(field)[0];
|
|
31459
|
+
} catch (e) {
|
|
31460
|
+
console.warn("Failed to parse field", field, e);
|
|
31461
|
+
return "";
|
|
31462
|
+
}
|
|
31463
|
+
});
|
|
31464
|
+
const updateFields = (path2, value) => {
|
|
31465
|
+
const jsonFields2 = value.map((field) => JSON.stringify([field]));
|
|
31466
|
+
updateCurrent(path2, jsonFields2);
|
|
31467
|
+
};
|
|
31468
|
+
const lcSearch = searchValue.toLocaleLowerCase();
|
|
31469
|
+
const dimensions = view.definition.getOutputSchema().fields;
|
|
31470
|
+
const filteredFields = dimensions.filter((field) => field.name.toLocaleLowerCase().includes(lcSearch)).filter((field) => !fields.includes(field.name)).filter((field) => {
|
|
31471
|
+
var _a2;
|
|
31472
|
+
return !("fieldTypes" in option2.items) || ((_a2 = option2.items.fieldTypes) == null ? void 0 : _a2.includes(field.type.kind));
|
|
31473
|
+
});
|
|
31474
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31475
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31476
|
+
..._stylex.props(styles$s.left, styles$s.label),
|
|
31477
|
+
children: /* @__PURE__ */ jsxs("label", {
|
|
31478
|
+
children: [option2.title ?? name, ":"]
|
|
31479
|
+
})
|
|
31480
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
31481
|
+
style: {
|
|
31482
|
+
minHeight: 0,
|
|
31483
|
+
display: "grid",
|
|
31484
|
+
gap: 4
|
|
31485
|
+
},
|
|
31486
|
+
children: [/* @__PURE__ */ jsx(PillInput, {
|
|
31487
|
+
values: fields,
|
|
31488
|
+
setValues: (values) => {
|
|
31489
|
+
updateFields(path, values);
|
|
31490
|
+
},
|
|
31491
|
+
value: searchValue,
|
|
31492
|
+
setValue: setSearchValue,
|
|
31493
|
+
focusElement: valueListRef
|
|
31494
|
+
}), /* @__PURE__ */ jsx(FieldList$1, {
|
|
31495
|
+
ref: valueListRef,
|
|
31496
|
+
fields: filteredFields,
|
|
31497
|
+
search: searchValue,
|
|
31498
|
+
onClick: (value) => {
|
|
31499
|
+
updateFields(path, [...fields, value]);
|
|
31500
|
+
}
|
|
31501
|
+
})]
|
|
31502
|
+
}), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31503
|
+
info: option2.description
|
|
31504
|
+
}) : /* @__PURE__ */ jsx("div", {})]
|
|
31505
|
+
});
|
|
31506
|
+
}
|
|
31507
|
+
function FieldList$1({
|
|
31508
|
+
ref,
|
|
31509
|
+
fields,
|
|
31510
|
+
search,
|
|
31511
|
+
onClick
|
|
31512
|
+
}) {
|
|
31513
|
+
if (fields.length) {
|
|
31514
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31515
|
+
ref,
|
|
31516
|
+
...{
|
|
31517
|
+
className: "mly78zum5 mly1a02dak mly1jnr06f"
|
|
31518
|
+
},
|
|
31519
|
+
children: fields.map((field) => /* @__PURE__ */ jsx(FieldToken, {
|
|
31520
|
+
field,
|
|
31521
|
+
onClick: () => onClick(field.name),
|
|
31522
|
+
tooltip: /* @__PURE__ */ jsx(FieldHoverCard, {
|
|
31523
|
+
field,
|
|
31524
|
+
path: []
|
|
31525
|
+
}),
|
|
31526
|
+
tooltipProps: {
|
|
31527
|
+
side: "right",
|
|
31528
|
+
align: "start",
|
|
31529
|
+
sideOffset: 4,
|
|
31530
|
+
alignOffset: 24
|
|
31531
|
+
}
|
|
31532
|
+
}, field.name))
|
|
31533
|
+
});
|
|
31534
|
+
} else {
|
|
31535
|
+
if (search) {
|
|
31536
|
+
return /* @__PURE__ */ jsx("div", {
|
|
31537
|
+
...{},
|
|
31538
|
+
"data-disabled": "true",
|
|
31539
|
+
children: "No matching fields"
|
|
31540
|
+
});
|
|
31541
|
+
}
|
|
31542
|
+
}
|
|
31543
|
+
}
|
|
31544
|
+
function ObjectEditor({
|
|
31545
|
+
view,
|
|
31546
|
+
name,
|
|
31547
|
+
path,
|
|
31548
|
+
current,
|
|
31549
|
+
option: option2,
|
|
31550
|
+
updateCurrent
|
|
31551
|
+
}) {
|
|
31552
|
+
const [isExpanded, setIsExpanded] = useState(path.length === 0);
|
|
31553
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31554
|
+
children: [name ? /* @__PURE__ */ jsxs(Fragment, {
|
|
31555
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
31556
|
+
..._stylex.props(styles$s.label, styles$s.heading),
|
|
31557
|
+
children: [/* @__PURE__ */ jsx("label", {
|
|
31558
|
+
children: option2.title ?? name
|
|
31559
|
+
}), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31560
|
+
info: option2.description
|
|
31561
|
+
}) : null]
|
|
31562
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
31563
|
+
variant: "flat",
|
|
31564
|
+
size: "compact",
|
|
31565
|
+
onClick: () => setIsExpanded(!isExpanded),
|
|
31566
|
+
icon: isExpanded ? "chevronDown" : "chevronRight",
|
|
31567
|
+
tooltip: isExpanded ? "Collapse" : "Expand"
|
|
31568
|
+
})]
|
|
31569
|
+
}) : null, isExpanded ? Object.entries(option2.properties).map(([subName, subOption]) => {
|
|
31570
|
+
const key2 = [...path, name, subName].join(".");
|
|
31571
|
+
if (subOption.type === "boolean") {
|
|
31572
|
+
return /* @__PURE__ */ jsx(BooleanEditor, {
|
|
31573
|
+
view,
|
|
31574
|
+
name: subName,
|
|
31575
|
+
path: [...path, subName],
|
|
31576
|
+
option: subOption,
|
|
31577
|
+
current: current[subName],
|
|
31578
|
+
updateCurrent
|
|
31579
|
+
}, key2);
|
|
31580
|
+
} else if (subOption.type === "string") {
|
|
31581
|
+
return /* @__PURE__ */ jsx(StringEditor$1, {
|
|
31582
|
+
view,
|
|
31583
|
+
name: subName,
|
|
31584
|
+
path: [...path, subName],
|
|
31585
|
+
option: subOption,
|
|
31586
|
+
current: current[subName],
|
|
31587
|
+
updateCurrent
|
|
31588
|
+
}, key2);
|
|
31589
|
+
} else if (subOption.type === "number") {
|
|
31590
|
+
return /* @__PURE__ */ jsx(NumberEditor$1, {
|
|
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 === "object") {
|
|
31599
|
+
return /* @__PURE__ */ jsx(ObjectEditor, {
|
|
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 === "array") {
|
|
31608
|
+
if (subOption.items.type === "string") {
|
|
31609
|
+
if ("subtype" in subOption.items && subOption.items.subtype === "field") {
|
|
31610
|
+
return /* @__PURE__ */ jsx(FieldEditor, {
|
|
31611
|
+
view,
|
|
31612
|
+
name: subName,
|
|
31613
|
+
path: [...path, subName],
|
|
31614
|
+
option: subOption,
|
|
31615
|
+
current: current[subName] ?? [],
|
|
31616
|
+
updateCurrent
|
|
31617
|
+
}, key2);
|
|
31618
|
+
} else {
|
|
31619
|
+
return /* @__PURE__ */ jsx(ArrayEditor, {
|
|
31620
|
+
view,
|
|
31621
|
+
name: subName,
|
|
31622
|
+
path: [...path, subName],
|
|
31623
|
+
option: subOption,
|
|
31624
|
+
current: current[subName] ?? [],
|
|
31625
|
+
updateCurrent
|
|
31626
|
+
}, key2);
|
|
31627
|
+
}
|
|
31628
|
+
} else {
|
|
31629
|
+
console.warn("Unsupported array type", subOption.items.type);
|
|
31630
|
+
}
|
|
31631
|
+
} else if (subOption.type === "oneOf") {
|
|
31632
|
+
return /* @__PURE__ */ jsx(OneOfEditor, {
|
|
31633
|
+
view,
|
|
31634
|
+
name: subName,
|
|
31635
|
+
path: [...path, subName],
|
|
31636
|
+
option: subOption,
|
|
31637
|
+
current: current[subName],
|
|
31638
|
+
updateCurrent
|
|
31639
|
+
}, key2);
|
|
31640
|
+
}
|
|
31641
|
+
return null;
|
|
31642
|
+
}) : null, /* @__PURE__ */ jsx("div", {
|
|
31643
|
+
..._stylex.props(styles$s.divider)
|
|
31644
|
+
})]
|
|
31645
|
+
});
|
|
31646
|
+
}
|
|
31647
|
+
function VizEditor({
|
|
31648
|
+
rootQuery,
|
|
31649
|
+
view,
|
|
31650
|
+
plugin,
|
|
31651
|
+
setOpen
|
|
31652
|
+
}) {
|
|
31653
|
+
const {
|
|
31654
|
+
setQuery
|
|
31655
|
+
} = useContext(QueryEditorContext);
|
|
31656
|
+
const [current, setCurrent] = useState(plugin.getSettings());
|
|
31657
|
+
console.info("RendererEditor current settings:", current);
|
|
31658
|
+
const schema = plugin.getSchema();
|
|
31659
|
+
const updateCurrent = (path, value) => {
|
|
31660
|
+
const newCurrent = {
|
|
31661
|
+
...current
|
|
31662
|
+
};
|
|
31663
|
+
let target = newCurrent;
|
|
31664
|
+
for (let i2 = 0; i2 < path.length - 1; i2++) {
|
|
31665
|
+
if (!(path[i2] in target)) {
|
|
31666
|
+
target[path[i2]] = {};
|
|
31667
|
+
}
|
|
31668
|
+
target = target[path[i2]];
|
|
31669
|
+
}
|
|
31670
|
+
target[path[path.length - 1]] = value;
|
|
31671
|
+
setCurrent(newCurrent);
|
|
31672
|
+
};
|
|
31673
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
31674
|
+
..._stylex.props(styles$s.editor),
|
|
31675
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
31676
|
+
..._stylex.props(styles$s.editorGrid),
|
|
31677
|
+
children: /* @__PURE__ */ jsx(ObjectEditor, {
|
|
31678
|
+
view,
|
|
31679
|
+
name: "",
|
|
31680
|
+
path: [],
|
|
31681
|
+
option: schema,
|
|
31682
|
+
current,
|
|
31683
|
+
updateCurrent
|
|
31684
|
+
})
|
|
31685
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
31686
|
+
..._stylex.props(styles$s.editorRow),
|
|
31687
|
+
children: [/* @__PURE__ */ jsx(Button, {
|
|
31688
|
+
label: "Cancel",
|
|
31689
|
+
onClick: () => {
|
|
31690
|
+
setOpen(false);
|
|
31691
|
+
},
|
|
31692
|
+
customStyle: styles$s.editorCell
|
|
31693
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
31694
|
+
variant: "primary",
|
|
31695
|
+
label: "Apply",
|
|
31696
|
+
onClick: () => {
|
|
31697
|
+
const tag = plugin.settingsToTag(current);
|
|
31698
|
+
const value = tag.toString();
|
|
31699
|
+
const annotations = view.getOrAddAnnotations();
|
|
31700
|
+
const old = annotations.items.find((annotation) => annotation.value.startsWith(RENDERER_PREFIX + "viz"));
|
|
31701
|
+
if (old) {
|
|
31702
|
+
annotations.remove(old);
|
|
31703
|
+
}
|
|
31704
|
+
view.getOrAddAnnotations().add(new ASTAnnotation({
|
|
31705
|
+
value
|
|
31706
|
+
}));
|
|
31707
|
+
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
31708
|
+
setOpen(false);
|
|
31709
|
+
},
|
|
31710
|
+
customStyle: styles$s.editorCell
|
|
31711
|
+
})]
|
|
31712
|
+
})]
|
|
31713
|
+
});
|
|
31714
|
+
}
|
|
31715
|
+
const dialogStyles = {
|
|
31716
|
+
displayNone: {
|
|
31717
|
+
display: "mly1s85apg",
|
|
31718
|
+
$$css: true
|
|
31719
|
+
},
|
|
31720
|
+
overlay: {
|
|
31721
|
+
background: "mly5uxqc1",
|
|
31722
|
+
backgroundAttachment: null,
|
|
31723
|
+
backgroundClip: null,
|
|
31724
|
+
backgroundColor: null,
|
|
31725
|
+
backgroundImage: null,
|
|
31726
|
+
backgroundOrigin: null,
|
|
31727
|
+
backgroundPosition: null,
|
|
31728
|
+
backgroundPositionX: null,
|
|
31729
|
+
backgroundPositionY: null,
|
|
31730
|
+
backgroundRepeat: null,
|
|
31731
|
+
backgroundSize: null,
|
|
31732
|
+
position: "mlyixxii4",
|
|
31733
|
+
top: "mly13vifvy",
|
|
31734
|
+
left: "mlyu96u03",
|
|
31735
|
+
right: "mly3m8u43",
|
|
31736
|
+
insetInlineStart: null,
|
|
31737
|
+
insetInlineEnd: null,
|
|
31738
|
+
bottom: "mly1ey2m1c",
|
|
31739
|
+
display: "mlyrvj5dj",
|
|
31740
|
+
placeItems: "mly1ku5rj1",
|
|
31741
|
+
alignItems: null,
|
|
31742
|
+
justifyItems: null,
|
|
31743
|
+
zIndex: "mly11uqc5h",
|
|
31744
|
+
$$css: true
|
|
31745
|
+
},
|
|
31746
|
+
title: {
|
|
31747
|
+
fontSize: "mly1j61zf2",
|
|
31748
|
+
margin: "mly1ghz6dp",
|
|
31749
|
+
marginInline: null,
|
|
31750
|
+
marginInlineStart: null,
|
|
31751
|
+
marginLeft: null,
|
|
31752
|
+
marginInlineEnd: null,
|
|
31753
|
+
marginRight: null,
|
|
31754
|
+
marginBlock: null,
|
|
31755
|
+
marginTop: null,
|
|
31756
|
+
marginBottom: null,
|
|
31757
|
+
display: "mly78zum5",
|
|
31758
|
+
justifyContent: "mly1qughib",
|
|
31759
|
+
alignItems: "mly6s0dn4",
|
|
31760
|
+
borderBottom: "mlyllpv0l",
|
|
31761
|
+
borderBottomWidth: null,
|
|
31762
|
+
borderBottomStyle: null,
|
|
31763
|
+
borderBottomColor: null,
|
|
31764
|
+
lineHeight: "mly1rl49lg",
|
|
31765
|
+
$$css: true
|
|
31766
|
+
},
|
|
31767
|
+
close: {
|
|
31768
|
+
border: "mly1gs6z28",
|
|
31769
|
+
borderWidth: null,
|
|
31770
|
+
borderInlineWidth: null,
|
|
31771
|
+
borderInlineStartWidth: null,
|
|
31772
|
+
borderLeftWidth: null,
|
|
31773
|
+
borderInlineEndWidth: null,
|
|
31774
|
+
borderRightWidth: null,
|
|
31775
|
+
borderBlockWidth: null,
|
|
31776
|
+
borderTopWidth: null,
|
|
31777
|
+
borderBottomWidth: null,
|
|
31778
|
+
borderStyle: null,
|
|
31779
|
+
borderInlineStyle: null,
|
|
31780
|
+
borderInlineStartStyle: null,
|
|
31781
|
+
borderLeftStyle: null,
|
|
31782
|
+
borderInlineEndStyle: null,
|
|
31783
|
+
borderRightStyle: null,
|
|
31784
|
+
borderBlockStyle: null,
|
|
31785
|
+
borderTopStyle: null,
|
|
31786
|
+
borderBottomStyle: null,
|
|
31787
|
+
borderColor: null,
|
|
31788
|
+
borderInlineColor: null,
|
|
31789
|
+
borderInlineStartColor: null,
|
|
31790
|
+
borderLeftColor: null,
|
|
31791
|
+
borderInlineEndColor: null,
|
|
31792
|
+
borderRightColor: null,
|
|
31793
|
+
borderBlockColor: null,
|
|
31794
|
+
borderTopColor: null,
|
|
31795
|
+
borderBottomColor: null,
|
|
31796
|
+
background: "mly1md70p1 mly14hn1a8 mlywghvya",
|
|
31797
|
+
backgroundAttachment: null,
|
|
31798
|
+
backgroundClip: null,
|
|
31799
|
+
backgroundColor: null,
|
|
31800
|
+
backgroundImage: null,
|
|
31801
|
+
backgroundOrigin: null,
|
|
31802
|
+
backgroundPosition: null,
|
|
31803
|
+
backgroundPositionX: null,
|
|
31804
|
+
backgroundPositionY: null,
|
|
31805
|
+
backgroundRepeat: null,
|
|
31806
|
+
backgroundSize: null,
|
|
31807
|
+
borderRadius: "mly12oqio5",
|
|
31808
|
+
borderStartStartRadius: null,
|
|
31809
|
+
borderStartEndRadius: null,
|
|
31810
|
+
borderEndStartRadius: null,
|
|
31811
|
+
borderEndEndRadius: null,
|
|
31812
|
+
borderTopLeftRadius: null,
|
|
31813
|
+
borderTopRightRadius: null,
|
|
31814
|
+
borderBottomLeftRadius: null,
|
|
31815
|
+
borderBottomRightRadius: null,
|
|
31816
|
+
$$css: true
|
|
31817
|
+
},
|
|
31818
|
+
content: {
|
|
31819
|
+
display: "mly78zum5",
|
|
31820
|
+
flexDirection: "mlydt5ytf",
|
|
31821
|
+
boxShadow: "mly5n1uv4",
|
|
31822
|
+
backgroundColor: "mly12peec7",
|
|
31823
|
+
borderRadius: "mlyur7f20",
|
|
31824
|
+
borderStartStartRadius: null,
|
|
31825
|
+
borderStartEndRadius: null,
|
|
31826
|
+
borderEndStartRadius: null,
|
|
31827
|
+
borderEndEndRadius: null,
|
|
31828
|
+
borderTopLeftRadius: null,
|
|
31829
|
+
borderTopRightRadius: null,
|
|
31830
|
+
borderBottomLeftRadius: null,
|
|
31831
|
+
borderBottomRightRadius: null,
|
|
31832
|
+
padding: "mlye8ttls",
|
|
31833
|
+
paddingInline: null,
|
|
31834
|
+
paddingStart: null,
|
|
31835
|
+
paddingLeft: null,
|
|
31836
|
+
paddingEnd: null,
|
|
31837
|
+
paddingRight: null,
|
|
31838
|
+
paddingBlock: null,
|
|
31839
|
+
paddingTop: null,
|
|
31840
|
+
paddingBottom: null,
|
|
31841
|
+
minWidth: "mlylm99nl",
|
|
31842
|
+
maxWidth: "mly1jkqq1h",
|
|
31843
|
+
gap: "mly167g77z",
|
|
31844
|
+
rowGap: null,
|
|
31845
|
+
columnGap: null,
|
|
31846
|
+
$$css: true
|
|
31847
|
+
},
|
|
31848
|
+
editor: {
|
|
31849
|
+
width: "mlyqyf9gi",
|
|
31850
|
+
display: "mly78zum5",
|
|
31851
|
+
flexDirection: "mlydt5ytf",
|
|
31852
|
+
gap: "mly167g77z",
|
|
31853
|
+
rowGap: null,
|
|
31854
|
+
columnGap: null,
|
|
31855
|
+
$$css: true
|
|
31856
|
+
},
|
|
31857
|
+
editorRow: {
|
|
31858
|
+
display: "mly78zum5",
|
|
31859
|
+
gap: "mly167g77z",
|
|
31860
|
+
rowGap: null,
|
|
31861
|
+
columnGap: null,
|
|
31862
|
+
$$css: true
|
|
31863
|
+
},
|
|
31864
|
+
editorCell: {
|
|
31865
|
+
flexGrow: "mly1iyjqo2",
|
|
31866
|
+
$$css: true
|
|
31867
|
+
},
|
|
31868
|
+
input: {
|
|
31869
|
+
border: "mly2yh2zd",
|
|
31870
|
+
borderWidth: null,
|
|
31871
|
+
borderInlineWidth: null,
|
|
31872
|
+
borderInlineStartWidth: null,
|
|
31873
|
+
borderLeftWidth: null,
|
|
31874
|
+
borderInlineEndWidth: null,
|
|
31875
|
+
borderRightWidth: null,
|
|
31876
|
+
borderBlockWidth: null,
|
|
31877
|
+
borderTopWidth: null,
|
|
31878
|
+
borderBottomWidth: null,
|
|
31879
|
+
borderStyle: null,
|
|
31880
|
+
borderInlineStyle: null,
|
|
31881
|
+
borderInlineStartStyle: null,
|
|
31882
|
+
borderLeftStyle: null,
|
|
31883
|
+
borderInlineEndStyle: null,
|
|
31884
|
+
borderRightStyle: null,
|
|
31885
|
+
borderBlockStyle: null,
|
|
31886
|
+
borderTopStyle: null,
|
|
31887
|
+
borderBottomStyle: null,
|
|
31888
|
+
borderColor: null,
|
|
31889
|
+
borderInlineColor: null,
|
|
31890
|
+
borderInlineStartColor: null,
|
|
31891
|
+
borderLeftColor: null,
|
|
31892
|
+
borderInlineEndColor: null,
|
|
31893
|
+
borderRightColor: null,
|
|
31894
|
+
borderBlockColor: null,
|
|
31895
|
+
borderTopColor: null,
|
|
31896
|
+
borderBottomColor: null,
|
|
31897
|
+
color: "mlyizdh9v",
|
|
31898
|
+
padding: "mly9cpjcd",
|
|
31899
|
+
paddingInline: null,
|
|
31900
|
+
paddingStart: null,
|
|
31901
|
+
paddingLeft: null,
|
|
31902
|
+
paddingEnd: null,
|
|
31903
|
+
paddingRight: null,
|
|
31904
|
+
paddingBlock: null,
|
|
31905
|
+
paddingTop: null,
|
|
31906
|
+
paddingBottom: null,
|
|
31907
|
+
borderRadius: "mly1sxf85j",
|
|
31908
|
+
borderStartStartRadius: null,
|
|
31909
|
+
borderStartEndRadius: null,
|
|
31910
|
+
borderEndStartRadius: null,
|
|
31911
|
+
borderEndEndRadius: null,
|
|
31912
|
+
borderTopLeftRadius: null,
|
|
31913
|
+
borderTopRightRadius: null,
|
|
31914
|
+
borderBottomLeftRadius: null,
|
|
31915
|
+
borderBottomRightRadius: null,
|
|
31916
|
+
$$css: true
|
|
31917
|
+
}
|
|
31918
|
+
};
|
|
31919
|
+
function VizEditorDialog({
|
|
31920
|
+
rootQuery,
|
|
31921
|
+
plugin,
|
|
31922
|
+
view,
|
|
31923
|
+
customStyle,
|
|
31924
|
+
open,
|
|
31925
|
+
setOpen
|
|
31926
|
+
}) {
|
|
31927
|
+
if (!plugin || !open) {
|
|
31928
|
+
return null;
|
|
31929
|
+
}
|
|
31930
|
+
return /* @__PURE__ */ jsx(Root, {
|
|
31931
|
+
onOpenChange: (open2) => setOpen(open2),
|
|
31932
|
+
open,
|
|
31933
|
+
children: /* @__PURE__ */ jsx(Portal, {
|
|
31934
|
+
children: /* @__PURE__ */ jsx(Overlay, {
|
|
31935
|
+
..._stylex.props(dialogStyles.overlay),
|
|
31936
|
+
children: /* @__PURE__ */ jsxs(Content$1, {
|
|
31937
|
+
..._stylex.props(fontStyles.body, dialogStyles.content, styles$p.content, customStyle),
|
|
31938
|
+
children: [/* @__PURE__ */ jsxs(Title, {
|
|
31939
|
+
..._stylex.props(dialogStyles.title),
|
|
31940
|
+
children: ["Visualization Settings", /* @__PURE__ */ jsx(Close, {
|
|
31941
|
+
..._stylex.props(dialogStyles.close),
|
|
31942
|
+
children: /* @__PURE__ */ jsx(Icon, {
|
|
31943
|
+
name: "clear"
|
|
31944
|
+
})
|
|
31945
|
+
})]
|
|
31946
|
+
}), /* @__PURE__ */ jsx(Description, {
|
|
31947
|
+
..._stylex.props(dialogStyles.displayNone),
|
|
31948
|
+
children: "Edit visualization parameters"
|
|
31949
|
+
}), /* @__PURE__ */ jsx(VizEditor, {
|
|
31950
|
+
rootQuery,
|
|
31951
|
+
view,
|
|
31952
|
+
plugin,
|
|
31953
|
+
setOpen
|
|
31954
|
+
})]
|
|
31955
|
+
})
|
|
31956
|
+
})
|
|
31957
|
+
})
|
|
31958
|
+
});
|
|
31959
|
+
}
|
|
31960
|
+
const styles$p = {
|
|
31961
|
+
content: {
|
|
31962
|
+
maxWidth: "mly14zcgw3",
|
|
31963
|
+
width: "mly14rvwrp",
|
|
31964
|
+
maxHeight: "mly1l4ul0t",
|
|
31965
|
+
$$css: true
|
|
31966
|
+
}
|
|
30620
31967
|
};
|
|
30621
31968
|
function Visualization$1({
|
|
30622
31969
|
rootQuery,
|
|
30623
31970
|
view
|
|
30624
31971
|
}) {
|
|
30625
|
-
var _a2;
|
|
30626
31972
|
const {
|
|
30627
31973
|
setQuery
|
|
30628
31974
|
} = useContext(QueryEditorContext);
|
|
30629
|
-
const
|
|
30630
|
-
const
|
|
30631
|
-
const
|
|
30632
|
-
const
|
|
30633
|
-
|
|
31975
|
+
const renderer = useMemo(() => new MalloyRenderer(), []);
|
|
31976
|
+
const [currentRenderer, setCurrentRenderer] = useState("table");
|
|
31977
|
+
const [plugin, setPlugin] = useState();
|
|
31978
|
+
const [open, setOpen] = useState(false);
|
|
31979
|
+
useEffect(() => {
|
|
31980
|
+
var _a2;
|
|
31981
|
+
const viz = renderer.createViz({
|
|
31982
|
+
onError: (error) => {
|
|
31983
|
+
console.error("Malloy render error", error);
|
|
31984
|
+
}
|
|
31985
|
+
});
|
|
31986
|
+
viz.setResult({
|
|
31987
|
+
schema: view.definition.getOutputSchema(),
|
|
31988
|
+
annotations: view.getTag().toString().split("\n").map((value) => ({
|
|
31989
|
+
value
|
|
31990
|
+
})),
|
|
31991
|
+
connection_name: ""
|
|
31992
|
+
});
|
|
31993
|
+
const metadata = viz.getMetadata();
|
|
31994
|
+
if (metadata) {
|
|
31995
|
+
const plugin2 = viz.getActivePlugin(metadata.getRootField().key);
|
|
31996
|
+
if (plugin2 && isCoreVizPluginInstance(plugin2)) {
|
|
31997
|
+
setCurrentRenderer(plugin2.name);
|
|
31998
|
+
setPlugin(plugin2);
|
|
31999
|
+
}
|
|
32000
|
+
} else {
|
|
32001
|
+
const currentTag = view.getTag();
|
|
32002
|
+
const rendererTag = view.getTag(RENDERER_PREFIX);
|
|
32003
|
+
const currentRenderer2 = ((_a2 = rendererTag.tag("viz")) == null ? void 0 : _a2.text()) ?? legacyToViz(tagToRenderer(currentTag) ?? "table");
|
|
32004
|
+
setCurrentRenderer(currentRenderer2);
|
|
32005
|
+
}
|
|
32006
|
+
}, [renderer, view]);
|
|
32007
|
+
const updateViz = (renderer2) => {
|
|
32008
|
+
view.setTagProperty(["viz"], renderer2, RENDERER_PREFIX);
|
|
30634
32009
|
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
30635
32010
|
};
|
|
30636
32011
|
const items = VIZ_RENDERERS.map((viz) => ({
|
|
@@ -30639,30 +32014,41 @@ function Visualization$1({
|
|
|
30639
32014
|
}),
|
|
30640
32015
|
label: snakeToTitle(viz),
|
|
30641
32016
|
value: viz,
|
|
30642
|
-
onClick: () =>
|
|
32017
|
+
onClick: () => updateViz(viz)
|
|
30643
32018
|
}));
|
|
30644
32019
|
const tokens2 = [/* @__PURE__ */ jsx(SelectorToken, {
|
|
30645
|
-
customStyle: styles$
|
|
32020
|
+
customStyle: styles$o.first,
|
|
30646
32021
|
icon: `viz_${currentRenderer}`,
|
|
30647
32022
|
value: currentRenderer,
|
|
30648
32023
|
items,
|
|
30649
|
-
onChange: (viz) =>
|
|
32024
|
+
onChange: (viz) => updateViz(viz)
|
|
30650
32025
|
}, "first")];
|
|
30651
|
-
|
|
30652
|
-
|
|
30653
|
-
|
|
30654
|
-
|
|
30655
|
-
|
|
30656
|
-
|
|
30657
|
-
|
|
30658
|
-
}, "menu"));
|
|
32026
|
+
if (plugin) {
|
|
32027
|
+
tokens2.push(/* @__PURE__ */ jsx(Token, {
|
|
32028
|
+
icon: "gear",
|
|
32029
|
+
onClick: () => setOpen(true),
|
|
32030
|
+
customStyle: styles$o.trigger,
|
|
32031
|
+
tooltip: "Edit Settings..."
|
|
32032
|
+
}, "gear"));
|
|
30659
32033
|
}
|
|
30660
|
-
return /* @__PURE__ */
|
|
30661
|
-
|
|
30662
|
-
|
|
32034
|
+
return /* @__PURE__ */ jsxs(Fragment, {
|
|
32035
|
+
children: [/* @__PURE__ */ jsx(TokenGroup, {
|
|
32036
|
+
customStyle: styles$o.group,
|
|
32037
|
+
children: tokens2
|
|
32038
|
+
}), /* @__PURE__ */ jsx(VizEditorDialog, {
|
|
32039
|
+
open,
|
|
32040
|
+
setOpen,
|
|
32041
|
+
rootQuery,
|
|
32042
|
+
plugin,
|
|
32043
|
+
view
|
|
32044
|
+
})]
|
|
30663
32045
|
});
|
|
30664
32046
|
}
|
|
30665
|
-
const styles$
|
|
32047
|
+
const styles$o = {
|
|
32048
|
+
trigger: {
|
|
32049
|
+
height: "mly1ktj5wk",
|
|
32050
|
+
$$css: true
|
|
32051
|
+
},
|
|
30666
32052
|
group: {
|
|
30667
32053
|
width: "mlyh8yej3",
|
|
30668
32054
|
gridTemplateColumns: "mly52fmzj",
|
|
@@ -30695,7 +32081,7 @@ function ViewAttributeTable({
|
|
|
30695
32081
|
}) {
|
|
30696
32082
|
const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
|
|
30697
32083
|
return /* @__PURE__ */ jsx("div", {
|
|
30698
|
-
..._stylex.props(styles$
|
|
32084
|
+
..._stylex.props(styles$n.attributeTableContainer, style),
|
|
30699
32085
|
children: /* @__PURE__ */ jsx("table", {
|
|
30700
32086
|
...{
|
|
30701
32087
|
className: "mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d"
|
|
@@ -30733,9 +32119,9 @@ function ViewAttributeTableRow({
|
|
|
30733
32119
|
className: "mlydpxx8g"
|
|
30734
32120
|
},
|
|
30735
32121
|
children: [/* @__PURE__ */ jsx("td", {
|
|
30736
|
-
..._stylex.props(styles$
|
|
32122
|
+
..._stylex.props(styles$n.attributeTableKeyCell, fontStyles.supporting),
|
|
30737
32123
|
children: /* @__PURE__ */ jsx("div", {
|
|
30738
|
-
..._stylex.props(styles$
|
|
32124
|
+
..._stylex.props(styles$n.attributeTableKeyCellContent, fontStyles.supporting),
|
|
30739
32125
|
children: attribute
|
|
30740
32126
|
})
|
|
30741
32127
|
}), /* @__PURE__ */ jsx("td", {
|
|
@@ -30746,7 +32132,7 @@ function ViewAttributeTableRow({
|
|
|
30746
32132
|
})]
|
|
30747
32133
|
});
|
|
30748
32134
|
}
|
|
30749
|
-
const styles$
|
|
32135
|
+
const styles$n = {
|
|
30750
32136
|
attributeTableContainer: {
|
|
30751
32137
|
padding: "mlye8ttls",
|
|
30752
32138
|
paddingInline: null,
|
|
@@ -30878,12 +32264,12 @@ function RichText({
|
|
|
30878
32264
|
});
|
|
30879
32265
|
return /* @__PURE__ */ jsx("div", {
|
|
30880
32266
|
ref,
|
|
30881
|
-
..._stylex.props(multiLine && styles$
|
|
32267
|
+
..._stylex.props(multiLine && styles$m.preWrap, multiLine && styles$m.breakWord, customStyle),
|
|
30882
32268
|
...props2,
|
|
30883
32269
|
children: formatted
|
|
30884
32270
|
});
|
|
30885
32271
|
}
|
|
30886
|
-
const styles$
|
|
32272
|
+
const styles$m = {
|
|
30887
32273
|
preWrap: {
|
|
30888
32274
|
whiteSpace: "mly126k92a",
|
|
30889
32275
|
$$css: true
|
|
@@ -30912,7 +32298,7 @@ function HoverText({
|
|
|
30912
32298
|
onMouseEnter: () => setIsTriggerHovered(true),
|
|
30913
32299
|
onMouseLeave: () => setIsTriggerHovered(false),
|
|
30914
32300
|
onPointerMove: (e) => e.preventDefault(),
|
|
30915
|
-
customStyle: [fontStyles.supporting, styles$
|
|
32301
|
+
customStyle: [fontStyles.supporting, styles$l.text],
|
|
30916
32302
|
children: text2
|
|
30917
32303
|
})
|
|
30918
32304
|
}), /* @__PURE__ */ jsx(Portal$4, {
|
|
@@ -30931,7 +32317,7 @@ function HoverText({
|
|
|
30931
32317
|
})]
|
|
30932
32318
|
});
|
|
30933
32319
|
}
|
|
30934
|
-
const styles$
|
|
32320
|
+
const styles$l = {
|
|
30935
32321
|
text: {
|
|
30936
32322
|
overflow: "mlyb3r6kr",
|
|
30937
32323
|
overflowX: null,
|
|
@@ -30942,45 +32328,6 @@ const styles$n = {
|
|
|
30942
32328
|
$$css: true
|
|
30943
32329
|
}
|
|
30944
32330
|
};
|
|
30945
|
-
function HoverCard({
|
|
30946
|
-
children,
|
|
30947
|
-
customStyle
|
|
30948
|
-
}) {
|
|
30949
|
-
return /* @__PURE__ */ jsx("div", {
|
|
30950
|
-
..._stylex.props(styles$m.container, fontStyles.body, customStyle),
|
|
30951
|
-
children
|
|
30952
|
-
});
|
|
30953
|
-
}
|
|
30954
|
-
const styles$m = {
|
|
30955
|
-
container: {
|
|
30956
|
-
boxShadow: "mly5n1uv4",
|
|
30957
|
-
backgroundColor: "mly12peec7",
|
|
30958
|
-
borderRadius: "mly4pepcl",
|
|
30959
|
-
borderStartStartRadius: null,
|
|
30960
|
-
borderStartEndRadius: null,
|
|
30961
|
-
borderEndStartRadius: null,
|
|
30962
|
-
borderEndEndRadius: null,
|
|
30963
|
-
borderTopLeftRadius: null,
|
|
30964
|
-
borderTopRightRadius: null,
|
|
30965
|
-
borderBottomLeftRadius: null,
|
|
30966
|
-
borderBottomRightRadius: null,
|
|
30967
|
-
padding: "mlyc7ga6q",
|
|
30968
|
-
paddingInline: null,
|
|
30969
|
-
paddingStart: null,
|
|
30970
|
-
paddingLeft: null,
|
|
30971
|
-
paddingEnd: null,
|
|
30972
|
-
paddingRight: null,
|
|
30973
|
-
paddingBlock: null,
|
|
30974
|
-
paddingTop: null,
|
|
30975
|
-
paddingBottom: null,
|
|
30976
|
-
display: "mly78zum5",
|
|
30977
|
-
flexDirection: "mlydt5ytf",
|
|
30978
|
-
gap: "mly167g77z",
|
|
30979
|
-
rowGap: null,
|
|
30980
|
-
columnGap: null,
|
|
30981
|
-
$$css: true
|
|
30982
|
-
}
|
|
30983
|
-
};
|
|
30984
32331
|
function FieldHoverCard({
|
|
30985
32332
|
field,
|
|
30986
32333
|
path
|
|
@@ -30997,7 +32344,7 @@ function FieldHoverCard({
|
|
|
30997
32344
|
details = /* @__PURE__ */ jsx(ViewAttributeTable, {
|
|
30998
32345
|
viewInfo: field,
|
|
30999
32346
|
isCompact: true,
|
|
31000
|
-
style: styles$
|
|
32347
|
+
style: styles$k.viewAttributeTable
|
|
31001
32348
|
});
|
|
31002
32349
|
} else if (field.kind === "dimension") {
|
|
31003
32350
|
details = /* @__PURE__ */ jsx(TopValuesTable, {
|
|
@@ -31006,7 +32353,7 @@ function FieldHoverCard({
|
|
|
31006
32353
|
});
|
|
31007
32354
|
}
|
|
31008
32355
|
return /* @__PURE__ */ jsxs(HoverCard, {
|
|
31009
|
-
customStyle: styles$
|
|
32356
|
+
customStyle: styles$k.container,
|
|
31010
32357
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
31011
32358
|
ref,
|
|
31012
32359
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -31017,10 +32364,10 @@ function FieldHoverCard({
|
|
|
31017
32364
|
field
|
|
31018
32365
|
})
|
|
31019
32366
|
}), /* @__PURE__ */ jsx("div", {
|
|
31020
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
32367
|
+
..._stylex.props(fontStyles.supporting, styles$k.path),
|
|
31021
32368
|
children: pathString
|
|
31022
32369
|
}), /* @__PURE__ */ jsx("div", {
|
|
31023
|
-
..._stylex.props(fontStyles.emphasized, styles$
|
|
32370
|
+
..._stylex.props(fontStyles.emphasized, styles$k.title),
|
|
31024
32371
|
children: field.name
|
|
31025
32372
|
}), description && /* @__PURE__ */ jsx(HoverText, {
|
|
31026
32373
|
text: description,
|
|
@@ -31031,7 +32378,7 @@ function FieldHoverCard({
|
|
|
31031
32378
|
})]
|
|
31032
32379
|
});
|
|
31033
32380
|
}
|
|
31034
|
-
const styles$
|
|
32381
|
+
const styles$k = {
|
|
31035
32382
|
container: {
|
|
31036
32383
|
width: "mlybl57os",
|
|
31037
32384
|
maxHeight: "mlyq3t0pi",
|
|
@@ -31208,335 +32555,6 @@ function BooleanFilterCore({
|
|
|
31208
32555
|
})
|
|
31209
32556
|
});
|
|
31210
32557
|
}
|
|
31211
|
-
function useClickOutside(refOrRefs, handler) {
|
|
31212
|
-
useEffect(() => {
|
|
31213
|
-
const refs = Array.isArray(refOrRefs) ? refOrRefs : [refOrRefs];
|
|
31214
|
-
let down = false;
|
|
31215
|
-
const isInOneElement = (ref, event) => {
|
|
31216
|
-
return !ref.current || event.target instanceof Element && ref.current.contains(event.target);
|
|
31217
|
-
};
|
|
31218
|
-
const isInElement = (event) => {
|
|
31219
|
-
return refs.some((ref) => isInOneElement(ref, event));
|
|
31220
|
-
};
|
|
31221
|
-
const onMouseUp = (event) => {
|
|
31222
|
-
if (!down || isInElement(event)) return;
|
|
31223
|
-
handler(event);
|
|
31224
|
-
down = false;
|
|
31225
|
-
};
|
|
31226
|
-
const onMouseDown = (event) => {
|
|
31227
|
-
if (isInElement(event)) return;
|
|
31228
|
-
down = true;
|
|
31229
|
-
};
|
|
31230
|
-
document.addEventListener("mouseup", onMouseUp);
|
|
31231
|
-
document.addEventListener("mousedown", onMouseDown);
|
|
31232
|
-
return () => {
|
|
31233
|
-
document.removeEventListener("mouseup", onMouseUp);
|
|
31234
|
-
document.removeEventListener("mousedown", onMouseDown);
|
|
31235
|
-
};
|
|
31236
|
-
}, [refOrRefs, handler]);
|
|
31237
|
-
}
|
|
31238
|
-
const PillInput = ({
|
|
31239
|
-
values,
|
|
31240
|
-
setValues,
|
|
31241
|
-
autoFocus,
|
|
31242
|
-
placeholder,
|
|
31243
|
-
type = "text",
|
|
31244
|
-
value: controlledValue,
|
|
31245
|
-
setValue: setControlledValue,
|
|
31246
|
-
focusElement,
|
|
31247
|
-
color = DEFAULT_TOKEN_COLOR,
|
|
31248
|
-
customStyle
|
|
31249
|
-
}) => {
|
|
31250
|
-
const [uncontrolledValue, setUncontrolledValue] = useState("");
|
|
31251
|
-
const [_focused, setFocused] = useState(false);
|
|
31252
|
-
const inp = useRef(null);
|
|
31253
|
-
const ref = useRef(null);
|
|
31254
|
-
const [selectedPill, setSelectedPill] = useState(void 0);
|
|
31255
|
-
const pillRefs = useRef([]);
|
|
31256
|
-
const value = controlledValue || uncontrolledValue;
|
|
31257
|
-
const setValue = setControlledValue || setUncontrolledValue;
|
|
31258
|
-
const deletePill = useCallback((idx) => {
|
|
31259
|
-
var _a2;
|
|
31260
|
-
const newValues = [...values];
|
|
31261
|
-
newValues.splice(idx, 1);
|
|
31262
|
-
setValues(newValues);
|
|
31263
|
-
if (selectedPill === 0) {
|
|
31264
|
-
if (values.length === 1) {
|
|
31265
|
-
setSelectedPill(void 0);
|
|
31266
|
-
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
31267
|
-
} else {
|
|
31268
|
-
setSelectedPill(0);
|
|
31269
|
-
}
|
|
31270
|
-
} else {
|
|
31271
|
-
setSelectedPill(idx - 1);
|
|
31272
|
-
}
|
|
31273
|
-
}, [selectedPill, setValues, values]);
|
|
31274
|
-
const pills = useMemo(() => {
|
|
31275
|
-
pillRefs.current = new Array(values.length);
|
|
31276
|
-
return values.map((value2, index2) => /* @__PURE__ */ jsx(Pill, {
|
|
31277
|
-
color,
|
|
31278
|
-
onClick: () => {
|
|
31279
|
-
setSelectedPill(index2);
|
|
31280
|
-
},
|
|
31281
|
-
onDelete: () => deletePill(index2),
|
|
31282
|
-
forwardRef: (ref2) => {
|
|
31283
|
-
pillRefs.current[index2] = ref2;
|
|
31284
|
-
},
|
|
31285
|
-
children: value2
|
|
31286
|
-
}, value2));
|
|
31287
|
-
}, [color, deletePill, values]);
|
|
31288
|
-
useEffect(() => {
|
|
31289
|
-
var _a2;
|
|
31290
|
-
if (selectedPill !== void 0) {
|
|
31291
|
-
(_a2 = pillRefs.current[selectedPill]) == null ? void 0 : _a2.focus();
|
|
31292
|
-
}
|
|
31293
|
-
}, [pills, selectedPill]);
|
|
31294
|
-
const onKeyUp = (event) => {
|
|
31295
|
-
var _a2, _b2;
|
|
31296
|
-
if (event.key === "Backspace") {
|
|
31297
|
-
if (selectedPill !== void 0) {
|
|
31298
|
-
deletePill(selectedPill);
|
|
31299
|
-
}
|
|
31300
|
-
} else if (event.key === "ArrowRight") {
|
|
31301
|
-
if (selectedPill === values.length - 1) {
|
|
31302
|
-
setSelectedPill(void 0);
|
|
31303
|
-
(_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
31304
|
-
} else if (selectedPill !== void 0) {
|
|
31305
|
-
setSelectedPill(selectedPill + 1);
|
|
31306
|
-
}
|
|
31307
|
-
} else if (event.key === "ArrowLeft") {
|
|
31308
|
-
if (selectedPill !== void 0 && selectedPill > 0) {
|
|
31309
|
-
setSelectedPill(selectedPill - 1);
|
|
31310
|
-
}
|
|
31311
|
-
} else {
|
|
31312
|
-
(_b2 = inp.current) == null ? void 0 : _b2.focus();
|
|
31313
|
-
}
|
|
31314
|
-
};
|
|
31315
|
-
const commitValue = () => {
|
|
31316
|
-
if (value.length > 0 && !values.includes(value)) {
|
|
31317
|
-
setValues([...values, value]);
|
|
31318
|
-
setValue("");
|
|
31319
|
-
}
|
|
31320
|
-
};
|
|
31321
|
-
useClickOutside(focusElement ? [ref, focusElement] : ref, () => {
|
|
31322
|
-
setFocused(false);
|
|
31323
|
-
commitValue();
|
|
31324
|
-
});
|
|
31325
|
-
return /* @__PURE__ */ jsx("div", {
|
|
31326
|
-
..._stylex.props(fontStyles.body, styles$k.main),
|
|
31327
|
-
children: /* @__PURE__ */ jsx(ScrollableArea, {
|
|
31328
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
31329
|
-
..._stylex.props(styles$k.content, customStyle),
|
|
31330
|
-
onKeyUp,
|
|
31331
|
-
onClick: () => {
|
|
31332
|
-
var _a2;
|
|
31333
|
-
return (_a2 = inp.current) == null ? void 0 : _a2.focus();
|
|
31334
|
-
},
|
|
31335
|
-
ref,
|
|
31336
|
-
children: [pills, /* @__PURE__ */ jsx("input", {
|
|
31337
|
-
...{
|
|
31338
|
-
className: "mly1gs6z28 mly1a2a7pz mly6icuqf mlyif65rj mlyayvuls mly83z2og mly1onzeue mly195ery5 mly1iyjqo2"
|
|
31339
|
-
},
|
|
31340
|
-
ref: inp,
|
|
31341
|
-
type,
|
|
31342
|
-
placeholder: values.length === 0 ? placeholder : "",
|
|
31343
|
-
value,
|
|
31344
|
-
size: 1,
|
|
31345
|
-
onChange: (event) => {
|
|
31346
|
-
setValue(event.target.value);
|
|
31347
|
-
},
|
|
31348
|
-
onKeyDown: (event) => {
|
|
31349
|
-
if (event.key === "Enter") {
|
|
31350
|
-
if (value !== "") {
|
|
31351
|
-
commitValue();
|
|
31352
|
-
event.stopPropagation();
|
|
31353
|
-
event.preventDefault();
|
|
31354
|
-
}
|
|
31355
|
-
}
|
|
31356
|
-
},
|
|
31357
|
-
onKeyUp: (event) => {
|
|
31358
|
-
var _a2, _b2, _c2, _d;
|
|
31359
|
-
if (event.key === "Backspace") {
|
|
31360
|
-
if (value === "" && values.length > 0) {
|
|
31361
|
-
commitValue();
|
|
31362
|
-
(_a2 = inp.current) == null ? void 0 : _a2.blur();
|
|
31363
|
-
setSelectedPill(values.length - 1);
|
|
31364
|
-
}
|
|
31365
|
-
} else if (event.key === "ArrowLeft") {
|
|
31366
|
-
if (((_b2 = inp.current) == null ? void 0 : _b2.selectionStart) === 0 || ((_c2 = inp.current) == null ? void 0 : _c2.selectionStart) === null) {
|
|
31367
|
-
commitValue();
|
|
31368
|
-
(_d = inp.current) == null ? void 0 : _d.blur();
|
|
31369
|
-
setSelectedPill(values.length - 1);
|
|
31370
|
-
event.preventDefault();
|
|
31371
|
-
event.stopPropagation();
|
|
31372
|
-
}
|
|
31373
|
-
}
|
|
31374
|
-
},
|
|
31375
|
-
onFocus: () => {
|
|
31376
|
-
setFocused(true);
|
|
31377
|
-
setSelectedPill(void 0);
|
|
31378
|
-
},
|
|
31379
|
-
autoFocus
|
|
31380
|
-
})]
|
|
31381
|
-
})
|
|
31382
|
-
})
|
|
31383
|
-
});
|
|
31384
|
-
};
|
|
31385
|
-
const Pill = ({
|
|
31386
|
-
children,
|
|
31387
|
-
color = DEFAULT_TOKEN_COLOR,
|
|
31388
|
-
forwardRef,
|
|
31389
|
-
onClick,
|
|
31390
|
-
onDelete
|
|
31391
|
-
}) => {
|
|
31392
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
31393
|
-
onClick,
|
|
31394
|
-
tabIndex: 0,
|
|
31395
|
-
ref: forwardRef,
|
|
31396
|
-
..._stylex.props(styles$k.pill, colorVariants[color]),
|
|
31397
|
-
children: [children, /* @__PURE__ */ jsx("div", {
|
|
31398
|
-
title: "Remove",
|
|
31399
|
-
...{
|
|
31400
|
-
className: "mly3nfvp2"
|
|
31401
|
-
},
|
|
31402
|
-
children: /* @__PURE__ */ jsx(SvgClear, {
|
|
31403
|
-
onClick: () => onDelete(),
|
|
31404
|
-
...{
|
|
31405
|
-
className: "mly6jxa94 mly1v9usgg"
|
|
31406
|
-
}
|
|
31407
|
-
})
|
|
31408
|
-
})]
|
|
31409
|
-
});
|
|
31410
|
-
};
|
|
31411
|
-
const styles$k = {
|
|
31412
|
-
main: {
|
|
31413
|
-
borderRadius: "mly12oqio5",
|
|
31414
|
-
borderStartStartRadius: null,
|
|
31415
|
-
borderStartEndRadius: null,
|
|
31416
|
-
borderEndStartRadius: null,
|
|
31417
|
-
borderEndEndRadius: null,
|
|
31418
|
-
borderTopLeftRadius: null,
|
|
31419
|
-
borderTopRightRadius: null,
|
|
31420
|
-
borderBottomLeftRadius: null,
|
|
31421
|
-
borderBottomRightRadius: null,
|
|
31422
|
-
border: "mlyvckdp7",
|
|
31423
|
-
borderWidth: null,
|
|
31424
|
-
borderInlineWidth: null,
|
|
31425
|
-
borderInlineStartWidth: null,
|
|
31426
|
-
borderLeftWidth: null,
|
|
31427
|
-
borderInlineEndWidth: null,
|
|
31428
|
-
borderRightWidth: null,
|
|
31429
|
-
borderBlockWidth: null,
|
|
31430
|
-
borderTopWidth: null,
|
|
31431
|
-
borderBottomWidth: null,
|
|
31432
|
-
borderStyle: null,
|
|
31433
|
-
borderInlineStyle: null,
|
|
31434
|
-
borderInlineStartStyle: null,
|
|
31435
|
-
borderLeftStyle: null,
|
|
31436
|
-
borderInlineEndStyle: null,
|
|
31437
|
-
borderRightStyle: null,
|
|
31438
|
-
borderBlockStyle: null,
|
|
31439
|
-
borderTopStyle: null,
|
|
31440
|
-
borderBottomStyle: null,
|
|
31441
|
-
borderColor: null,
|
|
31442
|
-
borderInlineColor: null,
|
|
31443
|
-
borderInlineStartColor: null,
|
|
31444
|
-
borderLeftColor: null,
|
|
31445
|
-
borderInlineEndColor: null,
|
|
31446
|
-
borderRightColor: null,
|
|
31447
|
-
borderBlockColor: null,
|
|
31448
|
-
borderTopColor: null,
|
|
31449
|
-
borderBottomColor: null,
|
|
31450
|
-
padding: "mlybsehbd",
|
|
31451
|
-
paddingInline: null,
|
|
31452
|
-
paddingStart: null,
|
|
31453
|
-
paddingLeft: null,
|
|
31454
|
-
paddingEnd: null,
|
|
31455
|
-
paddingRight: null,
|
|
31456
|
-
paddingBlock: null,
|
|
31457
|
-
paddingTop: null,
|
|
31458
|
-
paddingBottom: null,
|
|
31459
|
-
display: "mlyrvj5dj",
|
|
31460
|
-
minHeight: "mly2lwn1j",
|
|
31461
|
-
$$css: true
|
|
31462
|
-
},
|
|
31463
|
-
content: {
|
|
31464
|
-
outline: "mly1a2a7pz",
|
|
31465
|
-
outlineColor: null,
|
|
31466
|
-
outlineOffset: null,
|
|
31467
|
-
outlineStyle: null,
|
|
31468
|
-
outlineWidth: null,
|
|
31469
|
-
display: "mly78zum5",
|
|
31470
|
-
flexWrap: "mly1a02dak",
|
|
31471
|
-
gap: "mly1ed6fcf",
|
|
31472
|
-
rowGap: null,
|
|
31473
|
-
columnGap: null,
|
|
31474
|
-
borderColor: "mly1akygb0 mlyetl2wx",
|
|
31475
|
-
borderInlineColor: null,
|
|
31476
|
-
borderInlineStartColor: null,
|
|
31477
|
-
borderLeftColor: null,
|
|
31478
|
-
borderInlineEndColor: null,
|
|
31479
|
-
borderRightColor: null,
|
|
31480
|
-
borderBlockColor: null,
|
|
31481
|
-
borderTopColor: null,
|
|
31482
|
-
borderBottomColor: null,
|
|
31483
|
-
$$css: true
|
|
31484
|
-
},
|
|
31485
|
-
pill: {
|
|
31486
|
-
backgroundColor: "mlyy9rfsq",
|
|
31487
|
-
borderRadius: "mly1sxf85j",
|
|
31488
|
-
borderStartStartRadius: null,
|
|
31489
|
-
borderStartEndRadius: null,
|
|
31490
|
-
borderEndStartRadius: null,
|
|
31491
|
-
borderEndEndRadius: null,
|
|
31492
|
-
borderTopLeftRadius: null,
|
|
31493
|
-
borderTopRightRadius: null,
|
|
31494
|
-
borderBottomLeftRadius: null,
|
|
31495
|
-
borderBottomRightRadius: null,
|
|
31496
|
-
color: "mly1xre2ib",
|
|
31497
|
-
display: "mly78zum5",
|
|
31498
|
-
alignItems: "mly6s0dn4",
|
|
31499
|
-
gap: "mly1nejdyq",
|
|
31500
|
-
rowGap: null,
|
|
31501
|
-
columnGap: null,
|
|
31502
|
-
padding: "mly1e41zw8",
|
|
31503
|
-
paddingInline: null,
|
|
31504
|
-
paddingStart: null,
|
|
31505
|
-
paddingLeft: null,
|
|
31506
|
-
paddingEnd: null,
|
|
31507
|
-
paddingRight: null,
|
|
31508
|
-
paddingBlock: null,
|
|
31509
|
-
paddingTop: null,
|
|
31510
|
-
paddingBottom: null,
|
|
31511
|
-
textTransform: "mly6mezaz",
|
|
31512
|
-
cursor: "mly1ypdohk",
|
|
31513
|
-
height: "mly1qx5ct2",
|
|
31514
|
-
whiteSpace: "mlyuxw1ft",
|
|
31515
|
-
$$css: true
|
|
31516
|
-
}
|
|
31517
|
-
};
|
|
31518
|
-
const colorVariants = {
|
|
31519
|
-
default: {
|
|
31520
|
-
"--mlyvygx4q": "mly1izbou4",
|
|
31521
|
-
"--mly13n7235": "mly8bgh0r",
|
|
31522
|
-
$$css: true
|
|
31523
|
-
},
|
|
31524
|
-
purple: {
|
|
31525
|
-
"--mlyvygx4q": "mly1f8soc4",
|
|
31526
|
-
"--mly13n7235": "mly1r5zvhd",
|
|
31527
|
-
$$css: true
|
|
31528
|
-
},
|
|
31529
|
-
green: {
|
|
31530
|
-
"--mlyvygx4q": "mlyf8wvcd",
|
|
31531
|
-
"--mly13n7235": "mly1u6t2w6",
|
|
31532
|
-
$$css: true
|
|
31533
|
-
},
|
|
31534
|
-
cyan: {
|
|
31535
|
-
"--mlyvygx4q": "mlyrtwgpv",
|
|
31536
|
-
"--mly13n7235": "mlys5r2en",
|
|
31537
|
-
$$css: true
|
|
31538
|
-
}
|
|
31539
|
-
};
|
|
31540
32558
|
function useSearch(searchTerm, fieldPath) {
|
|
31541
32559
|
const {
|
|
31542
32560
|
topValues
|
|
@@ -31578,6 +32596,7 @@ function useSearch(searchTerm, fieldPath) {
|
|
|
31578
32596
|
function ValueList({
|
|
31579
32597
|
onClick,
|
|
31580
32598
|
search,
|
|
32599
|
+
filter,
|
|
31581
32600
|
fieldPath,
|
|
31582
32601
|
ref,
|
|
31583
32602
|
customStyle,
|
|
@@ -31586,7 +32605,7 @@ function ValueList({
|
|
|
31586
32605
|
const {
|
|
31587
32606
|
searchResults
|
|
31588
32607
|
} = useSearch(search, fieldPath);
|
|
31589
|
-
const stringSearchResults = useMemo(() => searchResults && searchResults.filter((r2) => r2.fieldType === "string" && r2.fieldValue !== null).sort((a, b2) => b2.weight - a.weight).slice(0, 100), [searchResults]);
|
|
32608
|
+
const stringSearchResults = 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]);
|
|
31590
32609
|
return /* @__PURE__ */ jsx("div", {
|
|
31591
32610
|
ref,
|
|
31592
32611
|
..._stylex.props(customStyle),
|
|
@@ -31797,7 +32816,8 @@ const StringFilterCore = ({
|
|
|
31797
32816
|
}
|
|
31798
32817
|
},
|
|
31799
32818
|
customStyle: styles$i.valueList,
|
|
31800
|
-
showPath: false
|
|
32819
|
+
showPath: false,
|
|
32820
|
+
filter: (value) => !currentFilter.values.includes(value)
|
|
31801
32821
|
})
|
|
31802
32822
|
})]
|
|
31803
32823
|
}) : currentFilter.operator === "~" ? /* @__PURE__ */ jsx(StringEditor, {
|
|
@@ -32121,11 +33141,8 @@ function makeFilterWithNewType(filter, type) {
|
|
|
32121
33141
|
}
|
|
32122
33142
|
}
|
|
32123
33143
|
function typeFromFilter(filter) {
|
|
32124
|
-
if (filter.operator === "null" && filter.not) {
|
|
32125
|
-
return
|
|
32126
|
-
}
|
|
32127
|
-
if (filter.operator === "before" && filter.not) {
|
|
32128
|
-
return "not_before";
|
|
33144
|
+
if ((filter.operator === "null" || filter.operator === "after" || filter.operator === "before") && filter.not) {
|
|
33145
|
+
return `-${filter.operator}`;
|
|
32129
33146
|
}
|
|
32130
33147
|
return filter.operator;
|
|
32131
33148
|
}
|
|
@@ -32134,7 +33151,7 @@ function unitsFromFilter(filter, isDateTime) {
|
|
|
32134
33151
|
return filter.units;
|
|
32135
33152
|
} else if (filter.operator === "to") {
|
|
32136
33153
|
return guessUnits(filter.fromMoment, isDateTime);
|
|
32137
|
-
} else if (filter.operator === "before"
|
|
33154
|
+
} else if (filter.operator === "before") {
|
|
32138
33155
|
return guessUnits(filter.before, isDateTime);
|
|
32139
33156
|
} else if (filter.operator === "after") {
|
|
32140
33157
|
return guessUnits(filter.after, isDateTime);
|
|
@@ -32181,14 +33198,17 @@ const DateTimeFilterCore = ({
|
|
|
32181
33198
|
value: "next",
|
|
32182
33199
|
label: "next complete"
|
|
32183
33200
|
}, {
|
|
32184
|
-
value: "
|
|
32185
|
-
label: "
|
|
33201
|
+
value: "-before",
|
|
33202
|
+
label: "starting"
|
|
32186
33203
|
}, {
|
|
32187
33204
|
value: "after",
|
|
32188
33205
|
label: "after"
|
|
32189
33206
|
}, {
|
|
32190
33207
|
value: "before",
|
|
32191
33208
|
label: "before"
|
|
33209
|
+
}, {
|
|
33210
|
+
value: "-after",
|
|
33211
|
+
label: "through"
|
|
32192
33212
|
}, {
|
|
32193
33213
|
value: "in",
|
|
32194
33214
|
label: "is"
|
|
@@ -32505,6 +33525,11 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32505
33525
|
let n = "7";
|
|
32506
33526
|
let fromMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
|
|
32507
33527
|
let toMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
|
|
33528
|
+
let not = false;
|
|
33529
|
+
if (type.startsWith("-")) {
|
|
33530
|
+
type = type.slice(1);
|
|
33531
|
+
not = true;
|
|
33532
|
+
}
|
|
32508
33533
|
switch (filter.operator) {
|
|
32509
33534
|
case "in_last":
|
|
32510
33535
|
case "last":
|
|
@@ -32537,18 +33562,14 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32537
33562
|
case "after":
|
|
32538
33563
|
return {
|
|
32539
33564
|
operator: type,
|
|
32540
|
-
after: fromMoment
|
|
33565
|
+
after: fromMoment,
|
|
33566
|
+
not
|
|
32541
33567
|
};
|
|
32542
33568
|
case "before":
|
|
32543
33569
|
return {
|
|
32544
33570
|
operator: type,
|
|
32545
|
-
before: fromMoment
|
|
32546
|
-
};
|
|
32547
|
-
case "not_before":
|
|
32548
|
-
return {
|
|
32549
|
-
operator: "before",
|
|
32550
33571
|
before: fromMoment,
|
|
32551
|
-
not
|
|
33572
|
+
not
|
|
32552
33573
|
};
|
|
32553
33574
|
case "in":
|
|
32554
33575
|
return {
|
|
@@ -32563,12 +33584,8 @@ function dateTimeFilterChangeType(filter, type, units) {
|
|
|
32563
33584
|
};
|
|
32564
33585
|
case "null":
|
|
32565
33586
|
return {
|
|
32566
|
-
operator:
|
|
32567
|
-
|
|
32568
|
-
case "-null":
|
|
32569
|
-
return {
|
|
32570
|
-
operator: "null",
|
|
32571
|
-
not: true
|
|
33587
|
+
operator: type,
|
|
33588
|
+
not
|
|
32572
33589
|
};
|
|
32573
33590
|
}
|
|
32574
33591
|
return filter;
|
|
@@ -32820,7 +33837,7 @@ function FieldList({
|
|
|
32820
33837
|
..._stylex.props(customStyle),
|
|
32821
33838
|
children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxs("div", {
|
|
32822
33839
|
children: [/* @__PURE__ */ jsx("div", {
|
|
32823
|
-
..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
|
|
33840
|
+
..._stylex.props(addMenuStyles.item, styles$h.fieldItem, styles$h.sticky),
|
|
32824
33841
|
"data-disabled": "true",
|
|
32825
33842
|
children: group.name
|
|
32826
33843
|
}), group.fields.map((field) => isFilterOperation && (field.kind === "dimension" || field.kind === "measure") ? /* @__PURE__ */ jsx(FilterPopover, {
|
|
@@ -32886,6 +33903,17 @@ const styles$h = {
|
|
|
32886
33903
|
paddingTop: "mly1y1aw1k",
|
|
32887
33904
|
paddingBottom: "mlywib8y2",
|
|
32888
33905
|
$$css: true
|
|
33906
|
+
},
|
|
33907
|
+
sticky: {
|
|
33908
|
+
position: "mly7wzq59",
|
|
33909
|
+
top: "mly13vifvy",
|
|
33910
|
+
zIndex: "mly1vjfegm",
|
|
33911
|
+
backgroundColor: "mly9nb4jr",
|
|
33912
|
+
borderBottom: "mlyv3yj8d",
|
|
33913
|
+
borderBottomWidth: null,
|
|
33914
|
+
borderBottomStyle: null,
|
|
33915
|
+
borderBottomColor: null,
|
|
33916
|
+
$$css: true
|
|
32889
33917
|
}
|
|
32890
33918
|
};
|
|
32891
33919
|
function FieldMenu({
|
|
@@ -33085,7 +34113,7 @@ function OperationActionTitle({
|
|
|
33085
34113
|
return !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field);
|
|
33086
34114
|
};
|
|
33087
34115
|
return /* @__PURE__ */ jsxs("div", {
|
|
33088
|
-
..._stylex.props(styles$
|
|
34116
|
+
..._stylex.props(styles$u.title, hoverStyles.main),
|
|
33089
34117
|
children: [/* @__PURE__ */ jsx("div", {
|
|
33090
34118
|
children: title
|
|
33091
34119
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -33118,308 +34146,6 @@ function OperationActionTitle({
|
|
|
33118
34146
|
})]
|
|
33119
34147
|
});
|
|
33120
34148
|
}
|
|
33121
|
-
var DIALOG_NAME = "Dialog";
|
|
33122
|
-
var [createDialogContext, createDialogScope] = createContextScope(DIALOG_NAME);
|
|
33123
|
-
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
33124
|
-
var Dialog = (props2) => {
|
|
33125
|
-
const {
|
|
33126
|
-
__scopeDialog,
|
|
33127
|
-
children,
|
|
33128
|
-
open: openProp,
|
|
33129
|
-
defaultOpen,
|
|
33130
|
-
onOpenChange,
|
|
33131
|
-
modal = true
|
|
33132
|
-
} = props2;
|
|
33133
|
-
const triggerRef = React.useRef(null);
|
|
33134
|
-
const contentRef = React.useRef(null);
|
|
33135
|
-
const [open = false, setOpen] = useControllableState({
|
|
33136
|
-
prop: openProp,
|
|
33137
|
-
defaultProp: defaultOpen,
|
|
33138
|
-
onChange: onOpenChange
|
|
33139
|
-
});
|
|
33140
|
-
return /* @__PURE__ */ jsx(
|
|
33141
|
-
DialogProvider,
|
|
33142
|
-
{
|
|
33143
|
-
scope: __scopeDialog,
|
|
33144
|
-
triggerRef,
|
|
33145
|
-
contentRef,
|
|
33146
|
-
contentId: useId(),
|
|
33147
|
-
titleId: useId(),
|
|
33148
|
-
descriptionId: useId(),
|
|
33149
|
-
open,
|
|
33150
|
-
onOpenChange: setOpen,
|
|
33151
|
-
onOpenToggle: React.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
33152
|
-
modal,
|
|
33153
|
-
children
|
|
33154
|
-
}
|
|
33155
|
-
);
|
|
33156
|
-
};
|
|
33157
|
-
Dialog.displayName = DIALOG_NAME;
|
|
33158
|
-
var TRIGGER_NAME$1 = "DialogTrigger";
|
|
33159
|
-
var DialogTrigger = React.forwardRef(
|
|
33160
|
-
(props2, forwardedRef) => {
|
|
33161
|
-
const { __scopeDialog, ...triggerProps } = props2;
|
|
33162
|
-
const context = useDialogContext(TRIGGER_NAME$1, __scopeDialog);
|
|
33163
|
-
const composedTriggerRef = useComposedRefs(forwardedRef, context.triggerRef);
|
|
33164
|
-
return /* @__PURE__ */ jsx(
|
|
33165
|
-
Primitive.button,
|
|
33166
|
-
{
|
|
33167
|
-
type: "button",
|
|
33168
|
-
"aria-haspopup": "dialog",
|
|
33169
|
-
"aria-expanded": context.open,
|
|
33170
|
-
"aria-controls": context.contentId,
|
|
33171
|
-
"data-state": getState(context.open),
|
|
33172
|
-
...triggerProps,
|
|
33173
|
-
ref: composedTriggerRef,
|
|
33174
|
-
onClick: composeEventHandlers(props2.onClick, context.onOpenToggle)
|
|
33175
|
-
}
|
|
33176
|
-
);
|
|
33177
|
-
}
|
|
33178
|
-
);
|
|
33179
|
-
DialogTrigger.displayName = TRIGGER_NAME$1;
|
|
33180
|
-
var PORTAL_NAME = "DialogPortal";
|
|
33181
|
-
var [PortalProvider, usePortalContext] = createDialogContext(PORTAL_NAME, {
|
|
33182
|
-
forceMount: void 0
|
|
33183
|
-
});
|
|
33184
|
-
var DialogPortal = (props2) => {
|
|
33185
|
-
const { __scopeDialog, forceMount, children, container } = props2;
|
|
33186
|
-
const context = useDialogContext(PORTAL_NAME, __scopeDialog);
|
|
33187
|
-
return /* @__PURE__ */ jsx(PortalProvider, { scope: __scopeDialog, forceMount, children: React.Children.map(children, (child) => /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(Portal$5, { asChild: true, container, children: child }) })) });
|
|
33188
|
-
};
|
|
33189
|
-
DialogPortal.displayName = PORTAL_NAME;
|
|
33190
|
-
var OVERLAY_NAME = "DialogOverlay";
|
|
33191
|
-
var DialogOverlay = React.forwardRef(
|
|
33192
|
-
(props2, forwardedRef) => {
|
|
33193
|
-
const portalContext = usePortalContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
33194
|
-
const { forceMount = portalContext.forceMount, ...overlayProps } = props2;
|
|
33195
|
-
const context = useDialogContext(OVERLAY_NAME, props2.__scopeDialog);
|
|
33196
|
-
return context.modal ? /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(DialogOverlayImpl, { ...overlayProps, ref: forwardedRef }) }) : null;
|
|
33197
|
-
}
|
|
33198
|
-
);
|
|
33199
|
-
DialogOverlay.displayName = OVERLAY_NAME;
|
|
33200
|
-
var DialogOverlayImpl = React.forwardRef(
|
|
33201
|
-
(props2, forwardedRef) => {
|
|
33202
|
-
const { __scopeDialog, ...overlayProps } = props2;
|
|
33203
|
-
const context = useDialogContext(OVERLAY_NAME, __scopeDialog);
|
|
33204
|
-
return (
|
|
33205
|
-
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
33206
|
-
// ie. when `Overlay` and `Content` are siblings
|
|
33207
|
-
/* @__PURE__ */ jsx(ReactRemoveScroll, { as: Slot, allowPinchZoom: true, shards: [context.contentRef], children: /* @__PURE__ */ jsx(
|
|
33208
|
-
Primitive.div,
|
|
33209
|
-
{
|
|
33210
|
-
"data-state": getState(context.open),
|
|
33211
|
-
...overlayProps,
|
|
33212
|
-
ref: forwardedRef,
|
|
33213
|
-
style: { pointerEvents: "auto", ...overlayProps.style }
|
|
33214
|
-
}
|
|
33215
|
-
) })
|
|
33216
|
-
);
|
|
33217
|
-
}
|
|
33218
|
-
);
|
|
33219
|
-
var CONTENT_NAME$1 = "DialogContent";
|
|
33220
|
-
var DialogContent = React.forwardRef(
|
|
33221
|
-
(props2, forwardedRef) => {
|
|
33222
|
-
const portalContext = usePortalContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33223
|
-
const { forceMount = portalContext.forceMount, ...contentProps } = props2;
|
|
33224
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33225
|
-
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: context.modal ? /* @__PURE__ */ jsx(DialogContentModal, { ...contentProps, ref: forwardedRef }) : /* @__PURE__ */ jsx(DialogContentNonModal, { ...contentProps, ref: forwardedRef }) });
|
|
33226
|
-
}
|
|
33227
|
-
);
|
|
33228
|
-
DialogContent.displayName = CONTENT_NAME$1;
|
|
33229
|
-
var DialogContentModal = React.forwardRef(
|
|
33230
|
-
(props2, forwardedRef) => {
|
|
33231
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33232
|
-
const contentRef = React.useRef(null);
|
|
33233
|
-
const composedRefs = useComposedRefs(forwardedRef, context.contentRef, contentRef);
|
|
33234
|
-
React.useEffect(() => {
|
|
33235
|
-
const content = contentRef.current;
|
|
33236
|
-
if (content) return hideOthers(content);
|
|
33237
|
-
}, []);
|
|
33238
|
-
return /* @__PURE__ */ jsx(
|
|
33239
|
-
DialogContentImpl,
|
|
33240
|
-
{
|
|
33241
|
-
...props2,
|
|
33242
|
-
ref: composedRefs,
|
|
33243
|
-
trapFocus: context.open,
|
|
33244
|
-
disableOutsidePointerEvents: true,
|
|
33245
|
-
onCloseAutoFocus: composeEventHandlers(props2.onCloseAutoFocus, (event) => {
|
|
33246
|
-
var _a2;
|
|
33247
|
-
event.preventDefault();
|
|
33248
|
-
(_a2 = context.triggerRef.current) == null ? void 0 : _a2.focus();
|
|
33249
|
-
}),
|
|
33250
|
-
onPointerDownOutside: composeEventHandlers(props2.onPointerDownOutside, (event) => {
|
|
33251
|
-
const originalEvent = event.detail.originalEvent;
|
|
33252
|
-
const ctrlLeftClick = originalEvent.button === 0 && originalEvent.ctrlKey === true;
|
|
33253
|
-
const isRightClick = originalEvent.button === 2 || ctrlLeftClick;
|
|
33254
|
-
if (isRightClick) event.preventDefault();
|
|
33255
|
-
}),
|
|
33256
|
-
onFocusOutside: composeEventHandlers(
|
|
33257
|
-
props2.onFocusOutside,
|
|
33258
|
-
(event) => event.preventDefault()
|
|
33259
|
-
)
|
|
33260
|
-
}
|
|
33261
|
-
);
|
|
33262
|
-
}
|
|
33263
|
-
);
|
|
33264
|
-
var DialogContentNonModal = React.forwardRef(
|
|
33265
|
-
(props2, forwardedRef) => {
|
|
33266
|
-
const context = useDialogContext(CONTENT_NAME$1, props2.__scopeDialog);
|
|
33267
|
-
const hasInteractedOutsideRef = React.useRef(false);
|
|
33268
|
-
const hasPointerDownOutsideRef = React.useRef(false);
|
|
33269
|
-
return /* @__PURE__ */ jsx(
|
|
33270
|
-
DialogContentImpl,
|
|
33271
|
-
{
|
|
33272
|
-
...props2,
|
|
33273
|
-
ref: forwardedRef,
|
|
33274
|
-
trapFocus: false,
|
|
33275
|
-
disableOutsidePointerEvents: false,
|
|
33276
|
-
onCloseAutoFocus: (event) => {
|
|
33277
|
-
var _a2, _b2;
|
|
33278
|
-
(_a2 = props2.onCloseAutoFocus) == null ? void 0 : _a2.call(props2, event);
|
|
33279
|
-
if (!event.defaultPrevented) {
|
|
33280
|
-
if (!hasInteractedOutsideRef.current) (_b2 = context.triggerRef.current) == null ? void 0 : _b2.focus();
|
|
33281
|
-
event.preventDefault();
|
|
33282
|
-
}
|
|
33283
|
-
hasInteractedOutsideRef.current = false;
|
|
33284
|
-
hasPointerDownOutsideRef.current = false;
|
|
33285
|
-
},
|
|
33286
|
-
onInteractOutside: (event) => {
|
|
33287
|
-
var _a2, _b2;
|
|
33288
|
-
(_a2 = props2.onInteractOutside) == null ? void 0 : _a2.call(props2, event);
|
|
33289
|
-
if (!event.defaultPrevented) {
|
|
33290
|
-
hasInteractedOutsideRef.current = true;
|
|
33291
|
-
if (event.detail.originalEvent.type === "pointerdown") {
|
|
33292
|
-
hasPointerDownOutsideRef.current = true;
|
|
33293
|
-
}
|
|
33294
|
-
}
|
|
33295
|
-
const target = event.target;
|
|
33296
|
-
const targetIsTrigger = (_b2 = context.triggerRef.current) == null ? void 0 : _b2.contains(target);
|
|
33297
|
-
if (targetIsTrigger) event.preventDefault();
|
|
33298
|
-
if (event.detail.originalEvent.type === "focusin" && hasPointerDownOutsideRef.current) {
|
|
33299
|
-
event.preventDefault();
|
|
33300
|
-
}
|
|
33301
|
-
}
|
|
33302
|
-
}
|
|
33303
|
-
);
|
|
33304
|
-
}
|
|
33305
|
-
);
|
|
33306
|
-
var DialogContentImpl = React.forwardRef(
|
|
33307
|
-
(props2, forwardedRef) => {
|
|
33308
|
-
const { __scopeDialog, trapFocus, onOpenAutoFocus, onCloseAutoFocus, ...contentProps } = props2;
|
|
33309
|
-
const context = useDialogContext(CONTENT_NAME$1, __scopeDialog);
|
|
33310
|
-
const contentRef = React.useRef(null);
|
|
33311
|
-
const composedRefs = useComposedRefs(forwardedRef, contentRef);
|
|
33312
|
-
useFocusGuards();
|
|
33313
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33314
|
-
/* @__PURE__ */ jsx(
|
|
33315
|
-
FocusScope,
|
|
33316
|
-
{
|
|
33317
|
-
asChild: true,
|
|
33318
|
-
loop: true,
|
|
33319
|
-
trapped: trapFocus,
|
|
33320
|
-
onMountAutoFocus: onOpenAutoFocus,
|
|
33321
|
-
onUnmountAutoFocus: onCloseAutoFocus,
|
|
33322
|
-
children: /* @__PURE__ */ jsx(
|
|
33323
|
-
DismissableLayer,
|
|
33324
|
-
{
|
|
33325
|
-
role: "dialog",
|
|
33326
|
-
id: context.contentId,
|
|
33327
|
-
"aria-describedby": context.descriptionId,
|
|
33328
|
-
"aria-labelledby": context.titleId,
|
|
33329
|
-
"data-state": getState(context.open),
|
|
33330
|
-
...contentProps,
|
|
33331
|
-
ref: composedRefs,
|
|
33332
|
-
onDismiss: () => context.onOpenChange(false)
|
|
33333
|
-
}
|
|
33334
|
-
)
|
|
33335
|
-
}
|
|
33336
|
-
),
|
|
33337
|
-
/* @__PURE__ */ jsxs(Fragment, { children: [
|
|
33338
|
-
/* @__PURE__ */ jsx(TitleWarning, { titleId: context.titleId }),
|
|
33339
|
-
/* @__PURE__ */ jsx(DescriptionWarning, { contentRef, descriptionId: context.descriptionId })
|
|
33340
|
-
] })
|
|
33341
|
-
] });
|
|
33342
|
-
}
|
|
33343
|
-
);
|
|
33344
|
-
var TITLE_NAME = "DialogTitle";
|
|
33345
|
-
var DialogTitle = React.forwardRef(
|
|
33346
|
-
(props2, forwardedRef) => {
|
|
33347
|
-
const { __scopeDialog, ...titleProps } = props2;
|
|
33348
|
-
const context = useDialogContext(TITLE_NAME, __scopeDialog);
|
|
33349
|
-
return /* @__PURE__ */ jsx(Primitive.h2, { id: context.titleId, ...titleProps, ref: forwardedRef });
|
|
33350
|
-
}
|
|
33351
|
-
);
|
|
33352
|
-
DialogTitle.displayName = TITLE_NAME;
|
|
33353
|
-
var DESCRIPTION_NAME = "DialogDescription";
|
|
33354
|
-
var DialogDescription = React.forwardRef(
|
|
33355
|
-
(props2, forwardedRef) => {
|
|
33356
|
-
const { __scopeDialog, ...descriptionProps } = props2;
|
|
33357
|
-
const context = useDialogContext(DESCRIPTION_NAME, __scopeDialog);
|
|
33358
|
-
return /* @__PURE__ */ jsx(Primitive.p, { id: context.descriptionId, ...descriptionProps, ref: forwardedRef });
|
|
33359
|
-
}
|
|
33360
|
-
);
|
|
33361
|
-
DialogDescription.displayName = DESCRIPTION_NAME;
|
|
33362
|
-
var CLOSE_NAME = "DialogClose";
|
|
33363
|
-
var DialogClose = React.forwardRef(
|
|
33364
|
-
(props2, forwardedRef) => {
|
|
33365
|
-
const { __scopeDialog, ...closeProps } = props2;
|
|
33366
|
-
const context = useDialogContext(CLOSE_NAME, __scopeDialog);
|
|
33367
|
-
return /* @__PURE__ */ jsx(
|
|
33368
|
-
Primitive.button,
|
|
33369
|
-
{
|
|
33370
|
-
type: "button",
|
|
33371
|
-
...closeProps,
|
|
33372
|
-
ref: forwardedRef,
|
|
33373
|
-
onClick: composeEventHandlers(props2.onClick, () => context.onOpenChange(false))
|
|
33374
|
-
}
|
|
33375
|
-
);
|
|
33376
|
-
}
|
|
33377
|
-
);
|
|
33378
|
-
DialogClose.displayName = CLOSE_NAME;
|
|
33379
|
-
function getState(open) {
|
|
33380
|
-
return open ? "open" : "closed";
|
|
33381
|
-
}
|
|
33382
|
-
var TITLE_WARNING_NAME = "DialogTitleWarning";
|
|
33383
|
-
var [WarningProvider, useWarningContext] = createContext2(TITLE_WARNING_NAME, {
|
|
33384
|
-
contentName: CONTENT_NAME$1,
|
|
33385
|
-
titleName: TITLE_NAME,
|
|
33386
|
-
docsSlug: "dialog"
|
|
33387
|
-
});
|
|
33388
|
-
var TitleWarning = ({ titleId }) => {
|
|
33389
|
-
const titleWarningContext = useWarningContext(TITLE_WARNING_NAME);
|
|
33390
|
-
const MESSAGE = `\`${titleWarningContext.contentName}\` requires a \`${titleWarningContext.titleName}\` for the component to be accessible for screen reader users.
|
|
33391
|
-
|
|
33392
|
-
If you want to hide the \`${titleWarningContext.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
33393
|
-
|
|
33394
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${titleWarningContext.docsSlug}`;
|
|
33395
|
-
React.useEffect(() => {
|
|
33396
|
-
if (titleId) {
|
|
33397
|
-
const hasTitle = document.getElementById(titleId);
|
|
33398
|
-
if (!hasTitle) console.error(MESSAGE);
|
|
33399
|
-
}
|
|
33400
|
-
}, [MESSAGE, titleId]);
|
|
33401
|
-
return null;
|
|
33402
|
-
};
|
|
33403
|
-
var DESCRIPTION_WARNING_NAME = "DialogDescriptionWarning";
|
|
33404
|
-
var DescriptionWarning = ({ contentRef, descriptionId }) => {
|
|
33405
|
-
const descriptionWarningContext = useWarningContext(DESCRIPTION_WARNING_NAME);
|
|
33406
|
-
const MESSAGE = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${descriptionWarningContext.contentName}}.`;
|
|
33407
|
-
React.useEffect(() => {
|
|
33408
|
-
var _a2;
|
|
33409
|
-
const describedById = (_a2 = contentRef.current) == null ? void 0 : _a2.getAttribute("aria-describedby");
|
|
33410
|
-
if (descriptionId && describedById) {
|
|
33411
|
-
const hasDescription = document.getElementById(descriptionId);
|
|
33412
|
-
if (!hasDescription) console.warn(MESSAGE);
|
|
33413
|
-
}
|
|
33414
|
-
}, [MESSAGE, contentRef, descriptionId]);
|
|
33415
|
-
return null;
|
|
33416
|
-
};
|
|
33417
|
-
var Root = Dialog;
|
|
33418
|
-
var Portal = DialogPortal;
|
|
33419
|
-
var Overlay = DialogOverlay;
|
|
33420
|
-
var Content$1 = DialogContent;
|
|
33421
|
-
var Title = DialogTitle;
|
|
33422
|
-
var Description = DialogDescription;
|
|
33423
34149
|
function RenameDialog({
|
|
33424
34150
|
rootQuery,
|
|
33425
34151
|
view,
|
|
@@ -33453,29 +34179,19 @@ function RenameDialog({
|
|
|
33453
34179
|
onOpenChange: setOpen,
|
|
33454
34180
|
children: /* @__PURE__ */ jsx(Portal, {
|
|
33455
34181
|
children: /* @__PURE__ */ jsx(Overlay, {
|
|
33456
|
-
...
|
|
33457
|
-
className: "mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h"
|
|
33458
|
-
},
|
|
34182
|
+
..._stylex.props(dialogStyles.overlay),
|
|
33459
34183
|
children: /* @__PURE__ */ jsxs(Content$1, {
|
|
33460
34184
|
..._stylex.props(dialogStyles.content, fontStyles.body),
|
|
33461
34185
|
children: [/* @__PURE__ */ jsxs(Description, {
|
|
33462
|
-
...
|
|
33463
|
-
className: "mly1s85apg"
|
|
33464
|
-
},
|
|
34186
|
+
..._stylex.props(dialogStyles.displayNone),
|
|
33465
34187
|
children: ["Rename ", target.name]
|
|
33466
34188
|
}), /* @__PURE__ */ jsxs(Title, {
|
|
33467
|
-
...
|
|
33468
|
-
className: "mly1j61zf2 mly1ghz6dp"
|
|
33469
|
-
},
|
|
34189
|
+
..._stylex.props(dialogStyles.title),
|
|
33470
34190
|
children: ["Rename ", target.name]
|
|
33471
34191
|
}), /* @__PURE__ */ jsxs("div", {
|
|
33472
|
-
...
|
|
33473
|
-
className: "mlyqyf9gi mly78zum5 mlydt5ytf mly167g77z"
|
|
33474
|
-
},
|
|
34192
|
+
..._stylex.props(dialogStyles.editor),
|
|
33475
34193
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
33476
|
-
...
|
|
33477
|
-
className: "mly78zum5 mly167g77z"
|
|
33478
|
-
},
|
|
34194
|
+
..._stylex.props(dialogStyles.editorRow),
|
|
33479
34195
|
children: [/* @__PURE__ */ jsx("input", {
|
|
33480
34196
|
value: name,
|
|
33481
34197
|
onChange: (event) => setName(event.target.value),
|
|
@@ -33494,9 +34210,7 @@ function RenameDialog({
|
|
|
33494
34210
|
errorMessage: "Name already in use"
|
|
33495
34211
|
})]
|
|
33496
34212
|
}), /* @__PURE__ */ jsxs("div", {
|
|
33497
|
-
...
|
|
33498
|
-
className: "mly78zum5 mly167g77z"
|
|
33499
|
-
},
|
|
34213
|
+
..._stylex.props(dialogStyles.editorRow),
|
|
33500
34214
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
33501
34215
|
label: "Cancel",
|
|
33502
34216
|
onClick: () => setOpen(false),
|
|
@@ -33515,92 +34229,6 @@ function RenameDialog({
|
|
|
33515
34229
|
})
|
|
33516
34230
|
});
|
|
33517
34231
|
}
|
|
33518
|
-
const dialogStyles = {
|
|
33519
|
-
content: {
|
|
33520
|
-
display: "mly78zum5",
|
|
33521
|
-
flexDirection: "mlydt5ytf",
|
|
33522
|
-
boxShadow: "mly5n1uv4",
|
|
33523
|
-
backgroundColor: "mly12peec7",
|
|
33524
|
-
borderRadius: "mlyur7f20",
|
|
33525
|
-
borderStartStartRadius: null,
|
|
33526
|
-
borderStartEndRadius: null,
|
|
33527
|
-
borderEndStartRadius: null,
|
|
33528
|
-
borderEndEndRadius: null,
|
|
33529
|
-
borderTopLeftRadius: null,
|
|
33530
|
-
borderTopRightRadius: null,
|
|
33531
|
-
borderBottomLeftRadius: null,
|
|
33532
|
-
borderBottomRightRadius: null,
|
|
33533
|
-
padding: "mlye8ttls",
|
|
33534
|
-
paddingInline: null,
|
|
33535
|
-
paddingStart: null,
|
|
33536
|
-
paddingLeft: null,
|
|
33537
|
-
paddingEnd: null,
|
|
33538
|
-
paddingRight: null,
|
|
33539
|
-
paddingBlock: null,
|
|
33540
|
-
paddingTop: null,
|
|
33541
|
-
paddingBottom: null,
|
|
33542
|
-
minWidth: "mlylm99nl",
|
|
33543
|
-
maxWidth: "mly1jkqq1h",
|
|
33544
|
-
gap: "mly167g77z",
|
|
33545
|
-
rowGap: null,
|
|
33546
|
-
columnGap: null,
|
|
33547
|
-
$$css: true
|
|
33548
|
-
},
|
|
33549
|
-
editorCell: {
|
|
33550
|
-
flexGrow: "mly1iyjqo2",
|
|
33551
|
-
$$css: true
|
|
33552
|
-
},
|
|
33553
|
-
input: {
|
|
33554
|
-
border: "mly2yh2zd",
|
|
33555
|
-
borderWidth: null,
|
|
33556
|
-
borderInlineWidth: null,
|
|
33557
|
-
borderInlineStartWidth: null,
|
|
33558
|
-
borderLeftWidth: null,
|
|
33559
|
-
borderInlineEndWidth: null,
|
|
33560
|
-
borderRightWidth: null,
|
|
33561
|
-
borderBlockWidth: null,
|
|
33562
|
-
borderTopWidth: null,
|
|
33563
|
-
borderBottomWidth: null,
|
|
33564
|
-
borderStyle: null,
|
|
33565
|
-
borderInlineStyle: null,
|
|
33566
|
-
borderInlineStartStyle: null,
|
|
33567
|
-
borderLeftStyle: null,
|
|
33568
|
-
borderInlineEndStyle: null,
|
|
33569
|
-
borderRightStyle: null,
|
|
33570
|
-
borderBlockStyle: null,
|
|
33571
|
-
borderTopStyle: null,
|
|
33572
|
-
borderBottomStyle: null,
|
|
33573
|
-
borderColor: null,
|
|
33574
|
-
borderInlineColor: null,
|
|
33575
|
-
borderInlineStartColor: null,
|
|
33576
|
-
borderLeftColor: null,
|
|
33577
|
-
borderInlineEndColor: null,
|
|
33578
|
-
borderRightColor: null,
|
|
33579
|
-
borderBlockColor: null,
|
|
33580
|
-
borderTopColor: null,
|
|
33581
|
-
borderBottomColor: null,
|
|
33582
|
-
color: "mlyizdh9v",
|
|
33583
|
-
padding: "mly9cpjcd",
|
|
33584
|
-
paddingInline: null,
|
|
33585
|
-
paddingStart: null,
|
|
33586
|
-
paddingLeft: null,
|
|
33587
|
-
paddingEnd: null,
|
|
33588
|
-
paddingRight: null,
|
|
33589
|
-
paddingBlock: null,
|
|
33590
|
-
paddingTop: null,
|
|
33591
|
-
paddingBottom: null,
|
|
33592
|
-
borderRadius: "mly1sxf85j",
|
|
33593
|
-
borderStartStartRadius: null,
|
|
33594
|
-
borderStartEndRadius: null,
|
|
33595
|
-
borderEndStartRadius: null,
|
|
33596
|
-
borderEndEndRadius: null,
|
|
33597
|
-
borderTopLeftRadius: null,
|
|
33598
|
-
borderTopRightRadius: null,
|
|
33599
|
-
borderBottomLeftRadius: null,
|
|
33600
|
-
borderBottomRightRadius: null,
|
|
33601
|
-
$$css: true
|
|
33602
|
-
}
|
|
33603
|
-
};
|
|
33604
34232
|
function SortableOperations({
|
|
33605
34233
|
rootQuery,
|
|
33606
34234
|
segment,
|
|
@@ -33662,7 +34290,7 @@ function SortableOperations({
|
|
|
33662
34290
|
fields,
|
|
33663
34291
|
...props2
|
|
33664
34292
|
}), /* @__PURE__ */ jsx("div", {
|
|
33665
|
-
..._stylex.props(styles$
|
|
34293
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
33666
34294
|
children: /* @__PURE__ */ jsx(DndContext, {
|
|
33667
34295
|
sensors,
|
|
33668
34296
|
collisionDetection: closestCenter,
|
|
@@ -33994,7 +34622,7 @@ const parsedToLabels = (parsed, filterString) => {
|
|
|
33994
34622
|
const {
|
|
33995
34623
|
not
|
|
33996
34624
|
} = temporalClause;
|
|
33997
|
-
op =
|
|
34625
|
+
op = not ? "through" : "is after";
|
|
33998
34626
|
value = displayTimeFromMoment(temporalClause.after);
|
|
33999
34627
|
}
|
|
34000
34628
|
break;
|
|
@@ -34003,7 +34631,7 @@ const parsedToLabels = (parsed, filterString) => {
|
|
|
34003
34631
|
const {
|
|
34004
34632
|
not
|
|
34005
34633
|
} = temporalClause;
|
|
34006
|
-
op = not ? "
|
|
34634
|
+
op = not ? "starting" : "is before";
|
|
34007
34635
|
value = displayTimeFromMoment(temporalClause.before);
|
|
34008
34636
|
}
|
|
34009
34637
|
break;
|
|
@@ -34087,10 +34715,10 @@ function FilterOperations({
|
|
|
34087
34715
|
}
|
|
34088
34716
|
return /* @__PURE__ */ jsxs("div", {
|
|
34089
34717
|
children: [/* @__PURE__ */ jsx("div", {
|
|
34090
|
-
..._stylex.props(styles$
|
|
34718
|
+
..._stylex.props(styles$u.title),
|
|
34091
34719
|
children: "filter by"
|
|
34092
34720
|
}), /* @__PURE__ */ jsx("div", {
|
|
34093
|
-
..._stylex.props(styles$
|
|
34721
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
34094
34722
|
children: filters.map((filterOperation, key2) => {
|
|
34095
34723
|
return /* @__PURE__ */ jsx(ErrorElement, {
|
|
34096
34724
|
fallback: /* @__PURE__ */ jsxs("div", {
|
|
@@ -34180,7 +34808,7 @@ function LimitOperation({
|
|
|
34180
34808
|
}
|
|
34181
34809
|
return /* @__PURE__ */ jsxs("div", {
|
|
34182
34810
|
children: [/* @__PURE__ */ jsx("div", {
|
|
34183
|
-
..._stylex.props(styles$
|
|
34811
|
+
..._stylex.props(styles$u.title),
|
|
34184
34812
|
children: "limit"
|
|
34185
34813
|
}), /* @__PURE__ */ jsxs("div", {
|
|
34186
34814
|
..._stylex.props(hoverStyles.main),
|
|
@@ -34230,10 +34858,10 @@ function OrderByOperations({
|
|
|
34230
34858
|
}
|
|
34231
34859
|
return /* @__PURE__ */ jsxs("div", {
|
|
34232
34860
|
children: [/* @__PURE__ */ jsx("div", {
|
|
34233
|
-
..._stylex.props(styles$
|
|
34861
|
+
..._stylex.props(styles$u.title),
|
|
34234
34862
|
children: "order by"
|
|
34235
34863
|
}), /* @__PURE__ */ jsx("div", {
|
|
34236
|
-
..._stylex.props(styles$
|
|
34864
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
34237
34865
|
children: orderBys.map((orderBy) => {
|
|
34238
34866
|
const {
|
|
34239
34867
|
fieldReference
|
|
@@ -34783,7 +35411,7 @@ function NestOperations({
|
|
|
34783
35411
|
return null;
|
|
34784
35412
|
}
|
|
34785
35413
|
return /* @__PURE__ */ jsx("div", {
|
|
34786
|
-
..._stylex.props(styles$
|
|
35414
|
+
..._stylex.props(styles$u.tokenContainer),
|
|
34787
35415
|
children: nests.map((nest) => /* @__PURE__ */ jsx(NestOperation, {
|
|
34788
35416
|
rootQuery,
|
|
34789
35417
|
view,
|
|
@@ -35116,9 +35744,9 @@ function Source({
|
|
|
35116
35744
|
}) {
|
|
35117
35745
|
if (rootQuery.definition instanceof ASTArrowQueryDefinition) {
|
|
35118
35746
|
return /* @__PURE__ */ jsx("div", {
|
|
35119
|
-
..._stylex.props(styles$
|
|
35747
|
+
..._stylex.props(styles$u.queryCard, styles$b.content),
|
|
35120
35748
|
children: /* @__PURE__ */ jsxs("div", {
|
|
35121
|
-
..._stylex.props(styles$
|
|
35749
|
+
..._stylex.props(styles$u.labelWithIcon),
|
|
35122
35750
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
35123
35751
|
name: "database"
|
|
35124
35752
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -36743,7 +37371,10 @@ function FieldTokenWithActions({
|
|
|
36743
37371
|
disabled: !!filterDisabledReason,
|
|
36744
37372
|
onTooltipOpenChange: setIsTooltipOpen
|
|
36745
37373
|
}),
|
|
36746
|
-
onOpenChange: setIsFilterPopoverOpen
|
|
37374
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
37375
|
+
layoutProps: {
|
|
37376
|
+
align: "start"
|
|
37377
|
+
}
|
|
36747
37378
|
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
36748
37379
|
icon: "orderBy",
|
|
36749
37380
|
tooltip: orderByDisabledReason || "Add as order by",
|
|
@@ -36768,7 +37399,10 @@ function FieldTokenWithActions({
|
|
|
36768
37399
|
disabled: !!filterDisabledReason,
|
|
36769
37400
|
onTooltipOpenChange: setIsTooltipOpen
|
|
36770
37401
|
}),
|
|
36771
|
-
onOpenChange: setIsFilterPopoverOpen
|
|
37402
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
37403
|
+
layoutProps: {
|
|
37404
|
+
align: "start"
|
|
37405
|
+
}
|
|
36772
37406
|
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
36773
37407
|
icon: "orderBy",
|
|
36774
37408
|
tooltip: orderByDisabledReason || "Add as order by",
|