@malloydata/malloy-explorer 0.0.299-dev250804170242 → 0.0.299-dev250808170326
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 +727 -300
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +728 -301
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +1 -2
- package/dist/types/components/ResultPanel/DownloadButton.d.ts +6 -0
- package/dist/types/components/primitives/utils/icon.d.ts +6 -0
- package/dist/types/components/utils/download.d.ts +44 -0
- package/dist/types/components/utils/download.spec.d.ts +1 -0
- package/package.json +1 -1
- package/.editorconfig +0 -8
- package/.github/workflows/prerelease.yaml +0 -28
- package/.github/workflows/test.yaml +0 -26
- package/.gitmodules +0 -3
- package/.node-version +0 -1
- package/.prettierrc.js +0 -8
- package/.vscode/extensions.json +0 -6
- package/babel.config.cjs +0 -49
- package/eslint.config.mjs +0 -150
- package/index.html +0 -19
- package/jest.config.ts +0 -27
- package/postcss.config.mjs +0 -20
- package/vite.config.mts +0 -69
package/dist/esm/index.js
CHANGED
|
@@ -16,7 +16,7 @@ var _a, _b, _captureMap, _compiled, _pattern, _nameMap, _strategy, __EmulatedReg
|
|
|
16
16
|
import { jsx, Fragment, jsxs } from "react/jsx-runtime";
|
|
17
17
|
import * as React from "react";
|
|
18
18
|
import React__default, { useLayoutEffect, useEffect, useMemo, createContext, useContext, useCallback, useState, useRef, createElement, memo, useReducer } from "react";
|
|
19
|
-
import { ASTQuery, ASTArrowQueryDefinition, ASTArrowViewDefinition, ASTSegmentViewDefinition, ASTNestViewOperation, ASTRefinementViewDefinition, ASTFilterWithLiteralEquality, ASTAnnotation, ASTOrderByViewOperation, ASTGroupByViewOperation, ASTAggregateViewOperation,
|
|
19
|
+
import { ASTQuery, ASTArrowQueryDefinition, ASTArrowViewDefinition, ASTSegmentViewDefinition, ASTNestViewOperation, ASTRefinementViewDefinition, ASTFilterWithLiteralEquality, ASTAnnotation, ASTLimitViewOperation, ASTOrderByViewOperation, ASTGroupByViewOperation, ASTAggregateViewOperation, ASTCalculateViewOperation, ASTTimeTruncationExpression, ASTFilterWithFilterString, ASTReferenceExpression, ASTWhereViewOperation, ASTHavingViewOperation, ASTDrillViewOperation, ASTReferenceQueryArrowSource } from "@malloydata/malloy-query-builder";
|
|
20
20
|
import { Tag } from "@malloydata/malloy-tag";
|
|
21
21
|
import { MalloyRenderer, isCoreVizPluginInstance } from "@malloydata/render";
|
|
22
22
|
import { TemporalFilterExpression, BooleanFilterExpression, NumberFilterExpression, StringFilterExpression } from "@malloydata/malloy-filter";
|
|
@@ -3828,6 +3828,7 @@ const SvgInfo = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns:
|
|
|
3828
3828
|
const SvgError = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z" }));
|
|
3829
3829
|
const SvgRefresh = (props2) => /* @__PURE__ */ React.createElement("svg", { height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React.createElement("g", { fill: "none", stroke: "currentColor" }, /* @__PURE__ */ React.createElement("path", { d: "m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42", strokeWidth: 1.1 }), /* @__PURE__ */ React.createElement("path", { d: "m9.9 2 2.89 2.89-3 3.01" })));
|
|
3830
3830
|
const SvgSidebarCollapse = (props2) => /* @__PURE__ */ React.createElement("svg", { height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", stroke: "none", ...props2 }, /* @__PURE__ */ React.createElement("path", { fill: "currentColor", stroke: "none", d: "m20 24h-16c-2.2 0-4-1.8-4-4v-16c0-2.2 1.8-4 4-4h16c2.2 0 4 1.8 4 4v16c0 2.2-1.8 4-4 4zm-16-22c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2z" }), /* @__PURE__ */ React.createElement("path", { fill: "currentColor", d: "m8 24c-.6 0-1-.4-1-1v-22c0-.6.4-1 1-1s1 .4 1 1v22c0 .6-.4 1-1 1z" }), /* @__PURE__ */ React.createElement("path", { fill: "currentColor", d: "m14 13c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l3-3c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-3 3c-.2.2-.4.3-.7.3z" }), /* @__PURE__ */ React.createElement("path", { fill: "currentColor", d: "m17 16c-.3 0-.5-.1-.7-.3l-3-3c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l3 3c.4.4.4 1 0 1.4-.2.2-.4.3-.7.3z" }));
|
|
3831
|
+
const SvgDownload = (props2) => /* @__PURE__ */ React.createElement("svg", { width: "24px", height: "24px", viewBox: "0 0 80 80", fill: "currentColor", ...props2 }, /* @__PURE__ */ React.createElement("g", null, /* @__PURE__ */ React.createElement("path", { d: "M19.5833333,78.3333333 L74.4166667,78.3333333 L74.4166667,70.5 L19.5833333,70.5 L19.5833333,78.3333333 Z M74.4166667,35.25 L58.75,35.25 L58.75,11.75 L35.25,11.75 L35.25,35.25 L19.5833333,35.25 L47,62.6666667 L74.4166667,35.25 Z", fillRule: "nonzero", fill: "var(--vscode-icon-foreground)" })));
|
|
3831
3832
|
const SvgFilterSliders = (props2) => /* @__PURE__ */ React.createElement("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "m11 8h10m-10 0c0 1.65685-1.34315 3-3 3s-3-1.34315-3-3m6 0c0-1.65685-1.34315-3-3-3s-3 1.34315-3 3m0 0h-2m10 8h-10m10 0c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-6 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3m0 0h2", stroke: "currentColor", strokeWidth: 1.5 }));
|
|
3832
3833
|
const SvgVizBarChart = (props2) => /* @__PURE__ */ React.createElement("svg", { width: "110px", height: "110px", 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: "viz_bar_chart", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("g", { id: "Group-3", transform: "translate(20.000000, 24.000000)", fill: "currentColor" }, /* @__PURE__ */ React.createElement("g", { id: "Group-2", transform: "translate(34.500000, 31.000000) rotate(-270.000000) translate(-34.500000, -31.000000) translate(3.500000, -3.500000)" }, /* @__PURE__ */ React.createElement("path", { d: "M-26.056314,30.056314 L34.943686,30.056314 C37.152825,30.056314 38.943686,31.847175 38.943686,34.056314 L38.943686,34.943686 C38.943686,37.152825 37.152825,38.943686 34.943686,38.943686 L-26.056314,38.943686 C-28.265453,38.943686 -30.056314,37.152825 -30.056314,34.943686 L-30.056314,34.056314 C-30.056314,31.847175 -28.265453,30.056314 -26.056314,30.056314 Z", id: "Rectangle-Copy-59", transform: "translate(4.443686, 34.500000) rotate(-90.000000) translate(-4.443686, -34.500000) " }), /* @__PURE__ */ React.createElement("path", { d: "M-0.491247385,37.8466366 L44.9281075,37.8466366 C47.1372465,37.8466366 48.9281075,39.6374976 48.9281075,41.8466366 L48.9281075,42.7340086 C48.9281075,44.9431476 47.1372465,46.7340086 44.9281075,46.7340086 L-0.491247385,46.7340086 C-2.70038638,46.7340086 -4.49124739,44.9431476 -4.49124739,42.7340086 L-4.49124739,41.8466366 C-4.49124739,39.6374976 -2.70038638,37.8466366 -0.491247385,37.8466366 Z", id: "Rectangle-Copy-62", transform: "translate(22.218430, 42.290323) rotate(-90.000000) translate(-22.218430, -42.290323) " }), /* @__PURE__ */ React.createElement("path", { d: "M23.3837854,43.9469253 L56.6025627,43.9469253 C58.8117017,43.9469253 60.6025627,45.7377863 60.6025627,47.9469253 L60.6025627,48.8342973 C60.6025627,51.0434363 58.8117017,52.8342973 56.6025627,52.8342973 L23.3837854,52.8342973 C21.1746464,52.8342973 19.3837854,51.0434363 19.3837854,48.8342973 L19.3837854,47.9469253 C19.3837854,45.7377863 21.1746464,43.9469253 23.3837854,43.9469253 Z", id: "Rectangle-Copy-66", transform: "translate(39.993174, 48.390611) rotate(-90.000000) translate(-39.993174, -48.390611) " }), /* @__PURE__ */ React.createElement("path", { d: "M46.7286345,49.7286345 L68.8072017,49.7286345 C71.0163407,49.7286345 72.8072017,51.5194955 72.8072017,53.7286345 L72.8072017,54.1927983 C72.8072017,56.4019373 71.0163407,58.1927983 68.8072017,58.1927983 L46.7286345,58.1927983 C44.5194955,58.1927983 42.7286345,56.4019373 42.7286345,54.1927983 L42.7286345,53.7286345 C42.7286345,51.5194955 44.5194955,49.7286345 46.7286345,49.7286345 Z", id: "Rectangle-Copy-67", transform: "translate(57.767918, 53.960716) rotate(-90.000000) translate(-57.767918, -53.960716) " })))));
|
|
3833
3834
|
const SvgVizBoolean = (props2) => /* @__PURE__ */ React.createElement("svg", { width: "110px", height: "110px", 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: "viz_boolean", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("g", { id: "noun_switch_3350414-2", transform: "translate(20.000000, 22.000000)", fill: "currentColor", fillRule: "nonzero" }, /* @__PURE__ */ React.createElement("g", { id: "noun_switch_3350414" }, /* @__PURE__ */ React.createElement("path", { d: "M15.2972028,30.8 L54.7027972,30.8 C63.151209,30.8 70,23.9051851 70,15.4 C70,6.89481485 63.151209,0 54.7027972,0 L15.2972028,0 C6.84879098,0 0,6.89481485 0,15.4 C0,23.9051851 6.84879098,30.8 15.2972028,30.8 Z M15.2972028,6.16 L54.7027972,6.16 C59.7718443,6.16 63.8811189,10.2968889 63.8811189,15.4 C63.8811189,20.5031111 59.7718443,24.64 54.7027972,24.64 L15.2972028,24.64 C10.2281557,24.64 6.11888112,20.5031111 6.11888112,15.4 C6.11888112,10.2968889 10.2281557,6.16 15.2972028,6.16 Z", id: "Shape" }), /* @__PURE__ */ React.createElement("path", { d: "M19.6340542,21.9997804 C22.2930484,22.0215224 24.7022661,20.4273668 25.7348338,17.9629544 C26.7674016,15.4985421 26.2191958,12.6510518 24.3466309,10.7523518 C22.474066,8.85365189 19.6473211,8.27908795 17.1885612,9.29740315 C14.7298014,10.3157183 13.125,12.7256064 13.125,15.3998806 C13.125,19.0240523 16.0305897,21.9703156 19.6340542,21.9997804 L19.6340542,21.9997804 Z", id: "Path" }), /* @__PURE__ */ React.createElement("path", { d: "M54.7027971,35.2 L15.2972025,35.2 C6.84879081,35.2 0,42.094815 0,50.6 C0,59.105185 6.84879081,66 15.2972025,66 L54.7027971,66 C63.151209,66 70,59.1051851 70,50.6 C70,42.0948149 63.151209,35.2 54.7027971,35.2 L54.7027971,35.2 Z M54.7027971,59.84 L15.2972025,59.84 C10.2281554,59.84 6.11888082,55.7031111 6.11888082,50.6 C6.11888082,45.4968889 10.2281554,41.36 15.2972025,41.36 L54.7027971,41.36 C59.7718442,41.36 63.8811189,45.4968889 63.8811189,50.6 C63.8811189,55.7031111 59.7718442,59.84 54.7027971,59.84 L54.7027971,59.84 Z", id: "Shape" }), /* @__PURE__ */ React.createElement("path", { d: "M50.3659458,44.0002196 C47.7069516,43.9784776 45.2977339,45.5726332 44.2651662,48.0370456 C43.2325984,50.5014579 43.7808042,53.3489482 45.6533691,55.2476482 C47.525934,57.1463481 50.3526789,57.720912 52.8114388,56.7025969 C55.2701986,55.6842817 56.875,53.2743936 56.875,50.6001194 C56.875,46.9759477 53.9694103,44.0296844 50.3659458,44.0002196 Z", id: "Path" })))));
|
|
@@ -3870,6 +3871,7 @@ const ICON_MAP = {
|
|
|
3870
3871
|
refresh: SvgRefresh,
|
|
3871
3872
|
sidebarCollapse: SvgSidebarCollapse,
|
|
3872
3873
|
filterSliders: SvgFilterSliders,
|
|
3874
|
+
download: SvgDownload,
|
|
3873
3875
|
// Operations
|
|
3874
3876
|
aggregate: SvgInsertMeasure,
|
|
3875
3877
|
dimension: SvgTypeIconString,
|
|
@@ -3937,11 +3939,11 @@ function Icon({
|
|
|
3937
3939
|
return null;
|
|
3938
3940
|
}
|
|
3939
3941
|
return /* @__PURE__ */ jsx(IconComponent, {
|
|
3940
|
-
..._stylex.props(styles$
|
|
3942
|
+
..._stylex.props(styles$R.main, colorVariants$3[color], customStyle),
|
|
3941
3943
|
"data-testid": `icon-${color}-${name}`
|
|
3942
3944
|
});
|
|
3943
3945
|
}
|
|
3944
|
-
const styles$
|
|
3946
|
+
const styles$R = {
|
|
3945
3947
|
main: {
|
|
3946
3948
|
display: "mly1rg5ohu",
|
|
3947
3949
|
width: "mly1kky2od",
|
|
@@ -4010,18 +4012,18 @@ function Badge({
|
|
|
4010
4012
|
customStyle
|
|
4011
4013
|
}) {
|
|
4012
4014
|
return /* @__PURE__ */ jsxs("div", {
|
|
4013
|
-
..._stylex.props(styles$
|
|
4015
|
+
..._stylex.props(styles$Q.main, colorVariants$2[color], customStyle),
|
|
4014
4016
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
4015
4017
|
color,
|
|
4016
4018
|
name: icon
|
|
4017
4019
|
}), /* @__PURE__ */ jsx("div", {
|
|
4018
4020
|
"data-testid": "badge-label",
|
|
4019
|
-
..._stylex.props(fontStyles.badge, styles$
|
|
4021
|
+
..._stylex.props(fontStyles.badge, styles$Q.label),
|
|
4020
4022
|
children: label
|
|
4021
4023
|
})]
|
|
4022
4024
|
});
|
|
4023
4025
|
}
|
|
4024
|
-
const styles$
|
|
4026
|
+
const styles$Q = {
|
|
4025
4027
|
main: {
|
|
4026
4028
|
display: "mly3nfvp2",
|
|
4027
4029
|
height: "mly1qx5ct2",
|
|
@@ -4103,10 +4105,10 @@ function Divider({
|
|
|
4103
4105
|
customStyle
|
|
4104
4106
|
}) {
|
|
4105
4107
|
return /* @__PURE__ */ jsx("div", {
|
|
4106
|
-
..._stylex.props(styles$
|
|
4108
|
+
..._stylex.props(styles$P.main, orientationVariants[orientation], customStyle)
|
|
4107
4109
|
});
|
|
4108
4110
|
}
|
|
4109
|
-
const styles$
|
|
4111
|
+
const styles$P = {
|
|
4110
4112
|
main: {
|
|
4111
4113
|
background: "mly1xnbgy5",
|
|
4112
4114
|
backgroundAttachment: null,
|
|
@@ -4912,7 +4914,7 @@ function Button({
|
|
|
4912
4914
|
...props2
|
|
4913
4915
|
}) {
|
|
4914
4916
|
const button = /* @__PURE__ */ jsxs("button", {
|
|
4915
|
-
..._stylex.props(styles$
|
|
4917
|
+
..._stylex.props(styles$O.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
|
|
4916
4918
|
type: "button",
|
|
4917
4919
|
disabled: isDisabled,
|
|
4918
4920
|
...props2,
|
|
@@ -4922,9 +4924,9 @@ function Button({
|
|
|
4922
4924
|
},
|
|
4923
4925
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
4924
4926
|
name: icon,
|
|
4925
|
-
customStyle: styles$
|
|
4927
|
+
customStyle: styles$O.icon
|
|
4926
4928
|
}), label && /* @__PURE__ */ jsx("div", {
|
|
4927
|
-
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$
|
|
4929
|
+
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$O.label),
|
|
4928
4930
|
children: label
|
|
4929
4931
|
})]
|
|
4930
4932
|
}), isDisabled && /* @__PURE__ */ jsx("div", {
|
|
@@ -4951,7 +4953,7 @@ function Button({
|
|
|
4951
4953
|
return button;
|
|
4952
4954
|
}
|
|
4953
4955
|
}
|
|
4954
|
-
const styles$
|
|
4956
|
+
const styles$O = {
|
|
4955
4957
|
main: {
|
|
4956
4958
|
display: "mly3nfvp2",
|
|
4957
4959
|
flexDirection: "mlydt5ytf",
|
|
@@ -5202,7 +5204,7 @@ function Token({
|
|
|
5202
5204
|
}) {
|
|
5203
5205
|
const isInteractive = onClick !== void 0 || asButtonTrigger;
|
|
5204
5206
|
const token2 = /* @__PURE__ */ jsxs("div", {
|
|
5205
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$
|
|
5207
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$N.nonInteractive, customStyle),
|
|
5206
5208
|
...dragProps == null ? void 0 : dragProps.attributes,
|
|
5207
5209
|
...dragProps == null ? void 0 : dragProps.listeners,
|
|
5208
5210
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
@@ -5239,7 +5241,7 @@ function Token({
|
|
|
5239
5241
|
})]
|
|
5240
5242
|
}) : token2;
|
|
5241
5243
|
}
|
|
5242
|
-
const styles$
|
|
5244
|
+
const styles$N = {
|
|
5243
5245
|
nonInteractive: {
|
|
5244
5246
|
cursor: "mlyt0e3qv",
|
|
5245
5247
|
background: "mly1np9qvj",
|
|
@@ -5263,7 +5265,7 @@ function TokenGroup({
|
|
|
5263
5265
|
}) {
|
|
5264
5266
|
const count2 = React.Children.count(children);
|
|
5265
5267
|
return /* @__PURE__ */ jsx("div", {
|
|
5266
|
-
..._stylex.props(styles$
|
|
5268
|
+
..._stylex.props(styles$M.main, customStyle),
|
|
5267
5269
|
children: React.Children.map(children, (child, index2) => /* @__PURE__ */ React.cloneElement(child, {
|
|
5268
5270
|
customStyle: {
|
|
5269
5271
|
...child.props.customStyle,
|
|
@@ -5274,16 +5276,16 @@ function TokenGroup({
|
|
|
5274
5276
|
});
|
|
5275
5277
|
}
|
|
5276
5278
|
const getChildStyle = (index2, count2) => {
|
|
5277
|
-
if (count2 === 1) return styles$
|
|
5278
|
-
if (index2 === 0) return styles$
|
|
5279
|
-
if (index2 === count2 - 1) return styles$
|
|
5280
|
-
return styles$
|
|
5279
|
+
if (count2 === 1) return styles$M.onlyChild;
|
|
5280
|
+
if (index2 === 0) return styles$M.firstChild;
|
|
5281
|
+
if (index2 === count2 - 1) return styles$M.lastChild;
|
|
5282
|
+
return styles$M.innerChild;
|
|
5281
5283
|
};
|
|
5282
5284
|
const getTokenColor = (child, groupColor) => {
|
|
5283
5285
|
const childColor = child.props.color;
|
|
5284
5286
|
return childColor === void 0 ? groupColor : childColor;
|
|
5285
5287
|
};
|
|
5286
|
-
const styles$
|
|
5288
|
+
const styles$M = {
|
|
5287
5289
|
main: {
|
|
5288
5290
|
display: "mlyrvj5dj",
|
|
5289
5291
|
gridAutoFlow: "mly1mt1orb",
|
|
@@ -5355,7 +5357,7 @@ function ErrorIcon({
|
|
|
5355
5357
|
},
|
|
5356
5358
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
5357
5359
|
name: "warning",
|
|
5358
|
-
customStyle: styles$
|
|
5360
|
+
customStyle: styles$L.errorIcon
|
|
5359
5361
|
})
|
|
5360
5362
|
})
|
|
5361
5363
|
}), /* @__PURE__ */ jsx(TooltipPortal, {
|
|
@@ -5368,7 +5370,7 @@ function ErrorIcon({
|
|
|
5368
5370
|
})]
|
|
5369
5371
|
});
|
|
5370
5372
|
}
|
|
5371
|
-
const styles$
|
|
5373
|
+
const styles$L = {
|
|
5372
5374
|
errorIcon: {
|
|
5373
5375
|
color: "mly1e2nbdu",
|
|
5374
5376
|
$$css: true
|
|
@@ -5413,22 +5415,22 @@ function EditableToken({
|
|
|
5413
5415
|
className: "mly78zum5 mly6s0dn4"
|
|
5414
5416
|
},
|
|
5415
5417
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
5416
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$
|
|
5418
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$K.focused, !!errorMessage && styles$K.hasError, customStyle),
|
|
5417
5419
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
5418
5420
|
name: icon,
|
|
5419
|
-
customStyle: styles$
|
|
5421
|
+
customStyle: styles$K.icon
|
|
5420
5422
|
}), /* @__PURE__ */ jsxs("span", {
|
|
5421
5423
|
...{
|
|
5422
5424
|
className: "mlywz0xwf"
|
|
5423
5425
|
},
|
|
5424
5426
|
children: [/* @__PURE__ */ jsx("span", {
|
|
5425
|
-
..._stylex.props(fontStyles.body, styles$
|
|
5427
|
+
..._stylex.props(fontStyles.body, styles$K.placeholder),
|
|
5426
5428
|
style: {
|
|
5427
5429
|
whiteSpaceCollapse: "preserve"
|
|
5428
5430
|
},
|
|
5429
5431
|
children: value
|
|
5430
5432
|
}), /* @__PURE__ */ jsx("input", {
|
|
5431
|
-
..._stylex.props(styles$
|
|
5433
|
+
..._stylex.props(styles$K.input, fontStyles.body),
|
|
5432
5434
|
ref: inputRef,
|
|
5433
5435
|
pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
|
|
5434
5436
|
value,
|
|
@@ -5453,7 +5455,7 @@ function EditableToken({
|
|
|
5453
5455
|
})]
|
|
5454
5456
|
});
|
|
5455
5457
|
}
|
|
5456
|
-
const styles$
|
|
5458
|
+
const styles$K = {
|
|
5457
5459
|
focused: {
|
|
5458
5460
|
background: "mlyotlr4g",
|
|
5459
5461
|
backgroundAttachment: null,
|
|
@@ -7795,12 +7797,12 @@ function TextInput({
|
|
|
7795
7797
|
}
|
|
7796
7798
|
};
|
|
7797
7799
|
return /* @__PURE__ */ jsxs("div", {
|
|
7798
|
-
..._stylex.props(styles$
|
|
7800
|
+
..._stylex.props(styles$J.main, isFocused && styles$J.focused, sizeVariants[size2], customStyle),
|
|
7799
7801
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
7800
7802
|
name: icon,
|
|
7801
7803
|
color: "secondary"
|
|
7802
7804
|
}), /* @__PURE__ */ jsx("input", {
|
|
7803
|
-
..._stylex.props(fontStyles.body, styles$
|
|
7805
|
+
..._stylex.props(fontStyles.body, styles$J.input),
|
|
7804
7806
|
value,
|
|
7805
7807
|
placeholder,
|
|
7806
7808
|
onChange: handleChange,
|
|
@@ -7808,7 +7810,7 @@ function TextInput({
|
|
|
7808
7810
|
onBlur: handleBlur,
|
|
7809
7811
|
onKeyDown
|
|
7810
7812
|
}), hasClear && /* @__PURE__ */ jsx("button", {
|
|
7811
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
7813
|
+
..._stylex.props(fontStyles.supporting, styles$J.actionButton, value === "" && styles$J.hidden),
|
|
7812
7814
|
ref: buttonRef,
|
|
7813
7815
|
onClick: () => onChange(""),
|
|
7814
7816
|
tabIndex: 0,
|
|
@@ -7816,7 +7818,7 @@ function TextInput({
|
|
|
7816
7818
|
})]
|
|
7817
7819
|
});
|
|
7818
7820
|
}
|
|
7819
|
-
const styles$
|
|
7821
|
+
const styles$J = {
|
|
7820
7822
|
main: {
|
|
7821
7823
|
display: "mly78zum5",
|
|
7822
7824
|
alignItems: "mly6s0dn4",
|
|
@@ -8025,7 +8027,7 @@ function SelectorToken({
|
|
|
8025
8027
|
onValueChange: handleValueChange,
|
|
8026
8028
|
required: true,
|
|
8027
8029
|
children: [/* @__PURE__ */ jsxs(Trigger$3, {
|
|
8028
|
-
..._stylex.props(tokenStyles.main, styles$
|
|
8030
|
+
..._stylex.props(tokenStyles.main, styles$I.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], customStyle),
|
|
8029
8031
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
8030
8032
|
name: icon,
|
|
8031
8033
|
customStyle: tokenStyles.icon
|
|
@@ -8052,7 +8054,7 @@ function SelectorToken({
|
|
|
8052
8054
|
size: "compact",
|
|
8053
8055
|
icon: "search",
|
|
8054
8056
|
hasClear: true,
|
|
8055
|
-
customStyle: styles$
|
|
8057
|
+
customStyle: styles$I.searchInput,
|
|
8056
8058
|
onKeyDown: (event) => {
|
|
8057
8059
|
const excludedKeys = ["ArrowUp", "ArrowDown"];
|
|
8058
8060
|
if (!excludedKeys.includes(event.key)) {
|
|
@@ -8083,21 +8085,21 @@ function SelectItem({
|
|
|
8083
8085
|
...props2
|
|
8084
8086
|
}) {
|
|
8085
8087
|
return /* @__PURE__ */ jsxs(Item$1, {
|
|
8086
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8088
|
+
..._stylex.props(fontStyles.body, styles$I.selectItem),
|
|
8087
8089
|
value,
|
|
8088
8090
|
...props2,
|
|
8089
8091
|
children: [value === selectedValue ? /* @__PURE__ */ jsx(Icon, {
|
|
8090
8092
|
name: "radioChecked",
|
|
8091
|
-
customStyle: styles$
|
|
8093
|
+
customStyle: styles$I.radioChecked
|
|
8092
8094
|
}) : /* @__PURE__ */ jsx(Icon, {
|
|
8093
8095
|
name: "radioUnchecked",
|
|
8094
|
-
customStyle: styles$
|
|
8096
|
+
customStyle: styles$I.radioUnchecked
|
|
8095
8097
|
}), /* @__PURE__ */ jsx(ItemText, {
|
|
8096
8098
|
children
|
|
8097
8099
|
})]
|
|
8098
8100
|
});
|
|
8099
8101
|
}
|
|
8100
|
-
const styles$
|
|
8102
|
+
const styles$I = {
|
|
8101
8103
|
selectTrigger: {
|
|
8102
8104
|
whiteSpace: "mlyuxw1ft",
|
|
8103
8105
|
overflow: "mlyb3r6kr",
|
|
@@ -8187,7 +8189,7 @@ function Card({
|
|
|
8187
8189
|
customStyle
|
|
8188
8190
|
}) {
|
|
8189
8191
|
return /* @__PURE__ */ jsxs("div", {
|
|
8190
|
-
..._stylex.props(styles$
|
|
8192
|
+
..._stylex.props(styles$H.container, customStyle),
|
|
8191
8193
|
children: [/* @__PURE__ */ jsx("div", {
|
|
8192
8194
|
...{
|
|
8193
8195
|
className: "mly1717udv"
|
|
@@ -8201,7 +8203,7 @@ function Card({
|
|
|
8201
8203
|
})]
|
|
8202
8204
|
});
|
|
8203
8205
|
}
|
|
8204
|
-
const styles$
|
|
8206
|
+
const styles$H = {
|
|
8205
8207
|
container: {
|
|
8206
8208
|
display: "mly78zum5",
|
|
8207
8209
|
flexDirection: "mlydt5ytf",
|
|
@@ -8294,7 +8296,7 @@ function CollapsiblePanel({
|
|
|
8294
8296
|
},
|
|
8295
8297
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
8296
8298
|
name: icon,
|
|
8297
|
-
customStyle: styles$
|
|
8299
|
+
customStyle: styles$G.icon
|
|
8298
8300
|
}), /* @__PURE__ */ jsx("div", {
|
|
8299
8301
|
...{
|
|
8300
8302
|
className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4"
|
|
@@ -8336,7 +8338,7 @@ function CollapsiblePanel({
|
|
|
8336
8338
|
})]
|
|
8337
8339
|
});
|
|
8338
8340
|
}
|
|
8339
|
-
const styles$
|
|
8341
|
+
const styles$G = {
|
|
8340
8342
|
icon: {
|
|
8341
8343
|
$$css: true
|
|
8342
8344
|
}
|
|
@@ -8368,10 +8370,10 @@ function CollapsibleListItem({
|
|
|
8368
8370
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
|
|
8369
8371
|
},
|
|
8370
8372
|
children: [/* @__PURE__ */ jsx("span", {
|
|
8371
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8373
|
+
..._stylex.props(fontStyles.body, styles$F.label),
|
|
8372
8374
|
children: label
|
|
8373
8375
|
}), sublabel && /* @__PURE__ */ jsx("span", {
|
|
8374
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
8376
|
+
..._stylex.props(fontStyles.supporting, styles$F.sublabel),
|
|
8375
8377
|
children: sublabel
|
|
8376
8378
|
})]
|
|
8377
8379
|
})]
|
|
@@ -8383,7 +8385,7 @@ function CollapsibleListItem({
|
|
|
8383
8385
|
})]
|
|
8384
8386
|
});
|
|
8385
8387
|
}
|
|
8386
|
-
const styles$
|
|
8388
|
+
const styles$F = {
|
|
8387
8389
|
label: {
|
|
8388
8390
|
flexGrow: "mly1iyjqo2",
|
|
8389
8391
|
fontWeight: "mly1xlr1w8",
|
|
@@ -19197,7 +19199,7 @@ function Spinner({
|
|
|
19197
19199
|
} = SIZES[size2];
|
|
19198
19200
|
const frameSize = diameter + border * 2;
|
|
19199
19201
|
return /* @__PURE__ */ jsx("div", {
|
|
19200
|
-
..._stylex.props(styles$
|
|
19202
|
+
..._stylex.props(styles$E.root, customStyle),
|
|
19201
19203
|
children: /* @__PURE__ */ jsx("span", {
|
|
19202
19204
|
"aria-valuetext": "Loading",
|
|
19203
19205
|
...{
|
|
@@ -19217,7 +19219,7 @@ function Spinner({
|
|
|
19217
19219
|
})
|
|
19218
19220
|
});
|
|
19219
19221
|
}
|
|
19220
|
-
const styles$
|
|
19222
|
+
const styles$E = {
|
|
19221
19223
|
root: {
|
|
19222
19224
|
alignItems: "mly6s0dn4",
|
|
19223
19225
|
display: "mly3nfvp2",
|
|
@@ -22286,7 +22288,7 @@ function toArray() {
|
|
|
22286
22288
|
m.millisecond()
|
|
22287
22289
|
];
|
|
22288
22290
|
}
|
|
22289
|
-
function toObject() {
|
|
22291
|
+
function toObject$1() {
|
|
22290
22292
|
var m = this;
|
|
22291
22293
|
return {
|
|
22292
22294
|
years: m.year(),
|
|
@@ -22724,7 +22726,7 @@ proto.set = stringSet;
|
|
|
22724
22726
|
proto.startOf = startOf;
|
|
22725
22727
|
proto.subtract = subtract$1;
|
|
22726
22728
|
proto.toArray = toArray;
|
|
22727
|
-
proto.toObject = toObject;
|
|
22729
|
+
proto.toObject = toObject$1;
|
|
22728
22730
|
proto.toDate = toDate;
|
|
22729
22731
|
proto.toISOString = toISOString;
|
|
22730
22732
|
proto.inspect = inspect;
|
|
@@ -23615,7 +23617,7 @@ const Popover = ({
|
|
|
23615
23617
|
})
|
|
23616
23618
|
});
|
|
23617
23619
|
};
|
|
23618
|
-
const styles$
|
|
23620
|
+
const styles$D = {
|
|
23619
23621
|
wrapper: {
|
|
23620
23622
|
position: "mly1n2onr6",
|
|
23621
23623
|
$$css: true
|
|
@@ -23667,7 +23669,7 @@ const SelectDropdown = ({
|
|
|
23667
23669
|
setOpen(false);
|
|
23668
23670
|
};
|
|
23669
23671
|
return /* @__PURE__ */ jsxs("div", {
|
|
23670
|
-
..._stylex.props(styles$
|
|
23672
|
+
..._stylex.props(styles$D.wrapper, customStyle),
|
|
23671
23673
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
23672
23674
|
type: "button",
|
|
23673
23675
|
autoFocus,
|
|
@@ -23735,7 +23737,7 @@ function SelectList({
|
|
|
23735
23737
|
const [hoveredIndex, setHoveredIndex] = useState(null);
|
|
23736
23738
|
return /* @__PURE__ */ jsx(ScrollableArea, {
|
|
23737
23739
|
children: /* @__PURE__ */ jsx("div", {
|
|
23738
|
-
..._stylex.props(styles$
|
|
23740
|
+
..._stylex.props(styles$D.selectListDiv, customStyle),
|
|
23739
23741
|
children: options.reduce((result, option2, index2) => {
|
|
23740
23742
|
const isSelected = value !== void 0 && valueEqual(value, option2.value);
|
|
23741
23743
|
if (option2.divider) {
|
|
@@ -23767,8 +23769,8 @@ function SelectList({
|
|
|
23767
23769
|
}), /* @__PURE__ */ jsx(Icon, {
|
|
23768
23770
|
name: "checkmark",
|
|
23769
23771
|
customStyle: {
|
|
23770
|
-
...styles$
|
|
23771
|
-
...isSelected ? styles$
|
|
23772
|
+
...styles$D.checkIcon,
|
|
23773
|
+
...isSelected ? styles$D.checkIconSelected : void 0
|
|
23772
23774
|
}
|
|
23773
23775
|
}), /* @__PURE__ */ jsx("span", {
|
|
23774
23776
|
...{
|
|
@@ -23820,7 +23822,7 @@ const DateInput = ({
|
|
|
23820
23822
|
setTempValue(hooks.utc(value).format(format2));
|
|
23821
23823
|
}, [value, format2]);
|
|
23822
23824
|
return /* @__PURE__ */ jsx("input", {
|
|
23823
|
-
..._stylex.props(customStyle, isActive ? styles$
|
|
23825
|
+
..._stylex.props(customStyle, isActive ? styles$C.active : null),
|
|
23824
23826
|
type: "text",
|
|
23825
23827
|
placeholder: placeholder || format2,
|
|
23826
23828
|
value: tempValue,
|
|
@@ -23855,7 +23857,7 @@ function guessUnits(moment2, isDateTime) {
|
|
|
23855
23857
|
}
|
|
23856
23858
|
return isDateTime ? "second" : "day";
|
|
23857
23859
|
}
|
|
23858
|
-
const styles$
|
|
23860
|
+
const styles$C = {
|
|
23859
23861
|
active: {
|
|
23860
23862
|
backgroundColor: "mly1vzefiq",
|
|
23861
23863
|
$$css: true
|
|
@@ -23967,7 +23969,7 @@ function DatePicker({
|
|
|
23967
23969
|
});
|
|
23968
23970
|
};
|
|
23969
23971
|
return /* @__PURE__ */ jsxs("div", {
|
|
23970
|
-
..._stylex.props(styles$
|
|
23972
|
+
..._stylex.props(styles$B.outer, customStyle),
|
|
23971
23973
|
ref: forwardRef,
|
|
23972
23974
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23973
23975
|
...{
|
|
@@ -24283,7 +24285,7 @@ function DatePicker({
|
|
|
24283
24285
|
})]
|
|
24284
24286
|
});
|
|
24285
24287
|
}
|
|
24286
|
-
const styles$
|
|
24288
|
+
const styles$B = {
|
|
24287
24289
|
outer: {
|
|
24288
24290
|
userSelect: "mly87ps6o",
|
|
24289
24291
|
fontSize: "mlymhiqyu",
|
|
@@ -24369,7 +24371,7 @@ function Banner({
|
|
|
24369
24371
|
className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
|
|
24370
24372
|
},
|
|
24371
24373
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24372
|
-
..._stylex.props(styles$
|
|
24374
|
+
..._stylex.props(styles$A.header, variantColors[variant], children ? styles$A.headerWithContent : null),
|
|
24373
24375
|
children: [/* @__PURE__ */ jsx("div", {
|
|
24374
24376
|
...{
|
|
24375
24377
|
className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
|
|
@@ -24382,22 +24384,22 @@ function Banner({
|
|
|
24382
24384
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr"
|
|
24383
24385
|
},
|
|
24384
24386
|
children: [/* @__PURE__ */ jsx("div", {
|
|
24385
|
-
..._stylex.props(styles$
|
|
24387
|
+
..._stylex.props(styles$A.title, fontStyles.emphasized),
|
|
24386
24388
|
children: title
|
|
24387
24389
|
}), /* @__PURE__ */ jsx("div", {
|
|
24388
|
-
..._stylex.props(styles$
|
|
24390
|
+
..._stylex.props(styles$A.description, fontStyles.supporting),
|
|
24389
24391
|
children: description
|
|
24390
24392
|
})]
|
|
24391
24393
|
})]
|
|
24392
24394
|
}), children && /* @__PURE__ */ jsx("div", {
|
|
24393
|
-
..._stylex.props(styles$
|
|
24395
|
+
..._stylex.props(styles$A.content, fontStyles.body),
|
|
24394
24396
|
children: /* @__PURE__ */ jsx(ScrollableArea, {
|
|
24395
24397
|
children
|
|
24396
24398
|
})
|
|
24397
24399
|
})]
|
|
24398
24400
|
});
|
|
24399
24401
|
}
|
|
24400
|
-
const styles$
|
|
24402
|
+
const styles$A = {
|
|
24401
24403
|
header: {
|
|
24402
24404
|
borderRadius: "mly1q4ynmn",
|
|
24403
24405
|
borderStartStartRadius: null,
|
|
@@ -24539,14 +24541,14 @@ function AccordionList({
|
|
|
24539
24541
|
onExpandedItemChange: handleExpandedItemChange
|
|
24540
24542
|
},
|
|
24541
24543
|
children: /* @__PURE__ */ jsx("div", {
|
|
24542
|
-
..._stylex.props(styles$
|
|
24544
|
+
..._stylex.props(styles$z.main, customStyle),
|
|
24543
24545
|
children: React.Children.map(children, (child) => /* @__PURE__ */ jsxs(Fragment, {
|
|
24544
24546
|
children: [child, /* @__PURE__ */ jsx(Divider, {})]
|
|
24545
24547
|
}))
|
|
24546
24548
|
})
|
|
24547
24549
|
});
|
|
24548
24550
|
}
|
|
24549
|
-
const styles$
|
|
24551
|
+
const styles$z = {
|
|
24550
24552
|
main: {
|
|
24551
24553
|
display: "mly78zum5",
|
|
24552
24554
|
flexDirection: "mlydt5ytf",
|
|
@@ -24583,10 +24585,10 @@ function AccordionListItem({
|
|
|
24583
24585
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2"
|
|
24584
24586
|
},
|
|
24585
24587
|
children: [/* @__PURE__ */ jsx("span", {
|
|
24586
|
-
..._stylex.props(fontStyles.body, styles$
|
|
24588
|
+
..._stylex.props(fontStyles.body, styles$y.label),
|
|
24587
24589
|
children: label
|
|
24588
24590
|
}), sublabel && /* @__PURE__ */ jsx("span", {
|
|
24589
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
24591
|
+
..._stylex.props(fontStyles.supporting, styles$y.sublabel),
|
|
24590
24592
|
children: sublabel
|
|
24591
24593
|
})]
|
|
24592
24594
|
}), badge && badge, endIcon && endIcon]
|
|
@@ -24598,7 +24600,7 @@ function AccordionListItem({
|
|
|
24598
24600
|
})]
|
|
24599
24601
|
});
|
|
24600
24602
|
}
|
|
24601
|
-
const styles$
|
|
24603
|
+
const styles$y = {
|
|
24602
24604
|
label: {
|
|
24603
24605
|
flexGrow: "mly1iyjqo2",
|
|
24604
24606
|
fontWeight: "mly1xlr1w8",
|
|
@@ -25883,7 +25885,7 @@ function DropdownMenu({
|
|
|
25883
25885
|
children: trigger
|
|
25884
25886
|
}), /* @__PURE__ */ jsx(Portal2, {
|
|
25885
25887
|
children: /* @__PURE__ */ jsx(Content2, {
|
|
25886
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25888
|
+
..._stylex.props(fontStyles.body, styles$x.content),
|
|
25887
25889
|
side: "bottom",
|
|
25888
25890
|
align: "start",
|
|
25889
25891
|
sideOffset: 4,
|
|
@@ -25910,22 +25912,22 @@ function DropdownMenuItem({
|
|
|
25910
25912
|
disabled,
|
|
25911
25913
|
children: [icon && /* @__PURE__ */ jsx(Icon, {
|
|
25912
25914
|
name: icon,
|
|
25913
|
-
customStyle: styles$
|
|
25915
|
+
customStyle: styles$x.icon
|
|
25914
25916
|
}), /* @__PURE__ */ jsxs("div", {
|
|
25915
25917
|
...{
|
|
25916
25918
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2"
|
|
25917
25919
|
},
|
|
25918
25920
|
children: [/* @__PURE__ */ jsx("span", {
|
|
25919
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25921
|
+
..._stylex.props(fontStyles.body, styles$x.label),
|
|
25920
25922
|
children: label
|
|
25921
25923
|
}), sublabel && /* @__PURE__ */ jsx("span", {
|
|
25922
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
25924
|
+
..._stylex.props(fontStyles.supporting, styles$x.sublabel),
|
|
25923
25925
|
children: sublabel
|
|
25924
25926
|
})]
|
|
25925
25927
|
})]
|
|
25926
25928
|
});
|
|
25927
25929
|
}
|
|
25928
|
-
const styles$
|
|
25930
|
+
const styles$x = {
|
|
25929
25931
|
content: {
|
|
25930
25932
|
display: "mly78zum5",
|
|
25931
25933
|
flexDirection: "mlydt5ytf",
|
|
@@ -26009,7 +26011,7 @@ function QueryActionBar({
|
|
|
26009
26011
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
26010
26012
|
name: "filterSliders"
|
|
26011
26013
|
}), /* @__PURE__ */ jsx("div", {
|
|
26012
|
-
..._stylex.props(fontStyles.largeBody, styles$
|
|
26014
|
+
..._stylex.props(fontStyles.largeBody, styles$w.title),
|
|
26013
26015
|
children: "Query"
|
|
26014
26016
|
})]
|
|
26015
26017
|
}), /* @__PURE__ */ jsxs("div", {
|
|
@@ -26054,13 +26056,13 @@ function QueryActionBar({
|
|
|
26054
26056
|
})]
|
|
26055
26057
|
});
|
|
26056
26058
|
}
|
|
26057
|
-
const styles$
|
|
26059
|
+
const styles$w = {
|
|
26058
26060
|
title: {
|
|
26059
26061
|
fontWeight: "mly1xlr1w8",
|
|
26060
26062
|
$$css: true
|
|
26061
26063
|
}
|
|
26062
26064
|
};
|
|
26063
|
-
const styles$
|
|
26065
|
+
const styles$v = {
|
|
26064
26066
|
labelWithIcon: {
|
|
26065
26067
|
display: "mly78zum5",
|
|
26066
26068
|
alignItems: "mly6s0dn4",
|
|
@@ -26278,27 +26280,31 @@ function FieldToken({
|
|
|
26278
26280
|
hoverActionsVisible,
|
|
26279
26281
|
...props2
|
|
26280
26282
|
}) {
|
|
26283
|
+
const [isHovered, setIsHovered] = React.useState(false);
|
|
26281
26284
|
let label = field.name;
|
|
26282
26285
|
if (field.kind === "dimension" && (field.type.kind === "timestamp_type" || field.type.kind === "date_type")) {
|
|
26283
26286
|
if (field.type.timeframe) {
|
|
26284
26287
|
label += `.${field.type.timeframe}`;
|
|
26285
26288
|
}
|
|
26286
26289
|
}
|
|
26290
|
+
const showHover = (isHovered || hoverActionsVisible) && !!hoverActions;
|
|
26287
26291
|
return /* @__PURE__ */ jsxs("div", {
|
|
26292
|
+
onMouseEnter: () => setIsHovered(true),
|
|
26293
|
+
onMouseLeave: () => setIsHovered(false),
|
|
26288
26294
|
...{
|
|
26289
26295
|
0: {
|
|
26290
|
-
className: "mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f
|
|
26296
|
+
className: "mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f"
|
|
26291
26297
|
},
|
|
26292
26298
|
1: {
|
|
26293
26299
|
className: "mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mlym9y5t7"
|
|
26294
26300
|
}
|
|
26295
|
-
}[!!
|
|
26301
|
+
}[!!showHover << 0],
|
|
26296
26302
|
children: [/* @__PURE__ */ jsx(Token, {
|
|
26297
26303
|
label,
|
|
26298
26304
|
color: fieldKindToColor(field.kind),
|
|
26299
26305
|
icon: fieldToIcon(field),
|
|
26300
26306
|
...props2
|
|
26301
|
-
}), additionalSiblings,
|
|
26307
|
+
}), additionalSiblings, showHover && /* @__PURE__ */ jsx("div", {
|
|
26302
26308
|
...{
|
|
26303
26309
|
className: "mly1vsucm1 mly2lah0s"
|
|
26304
26310
|
},
|
|
@@ -26314,7 +26320,7 @@ function DrillOperations({
|
|
|
26314
26320
|
}
|
|
26315
26321
|
return /* @__PURE__ */ jsxs("div", {
|
|
26316
26322
|
children: [/* @__PURE__ */ jsx("div", {
|
|
26317
|
-
..._stylex.props(styles$
|
|
26323
|
+
..._stylex.props(styles$v.title),
|
|
26318
26324
|
children: "drills"
|
|
26319
26325
|
}), /* @__PURE__ */ jsx("div", {
|
|
26320
26326
|
...{
|
|
@@ -30289,32 +30295,32 @@ function BadgeForField({
|
|
|
30289
30295
|
label: "view",
|
|
30290
30296
|
icon: "view_filled",
|
|
30291
30297
|
color: "purple",
|
|
30292
|
-
customStyle: styles$
|
|
30298
|
+
customStyle: styles$u.noBackground
|
|
30293
30299
|
});
|
|
30294
30300
|
} else if (field.kind === "dimension") {
|
|
30295
30301
|
return /* @__PURE__ */ jsx(Badge, {
|
|
30296
30302
|
label: "dimension",
|
|
30297
30303
|
icon: fieldToIcon(field),
|
|
30298
30304
|
color: "cyan",
|
|
30299
|
-
customStyle: styles$
|
|
30305
|
+
customStyle: styles$u.noBackground
|
|
30300
30306
|
});
|
|
30301
30307
|
} else if (field.kind === "measure") {
|
|
30302
30308
|
return /* @__PURE__ */ jsx(Badge, {
|
|
30303
30309
|
label: "measure",
|
|
30304
30310
|
icon: fieldToIcon(field),
|
|
30305
30311
|
color: "green",
|
|
30306
|
-
customStyle: styles$
|
|
30312
|
+
customStyle: styles$u.noBackground
|
|
30307
30313
|
});
|
|
30308
30314
|
} else if (field.kind === "join") {
|
|
30309
30315
|
return /* @__PURE__ */ jsx(Badge, {
|
|
30310
30316
|
label: "join",
|
|
30311
30317
|
icon: fieldToIcon(field),
|
|
30312
30318
|
color: "gray",
|
|
30313
|
-
customStyle: styles$
|
|
30319
|
+
customStyle: styles$u.noBackground
|
|
30314
30320
|
});
|
|
30315
30321
|
}
|
|
30316
30322
|
}
|
|
30317
|
-
const styles$
|
|
30323
|
+
const styles$u = {
|
|
30318
30324
|
noBackground: {
|
|
30319
30325
|
backgroundColor: "mlyjbqb8w",
|
|
30320
30326
|
$$css: true
|
|
@@ -30623,7 +30629,7 @@ var Content$1 = DialogContent;
|
|
|
30623
30629
|
var Title = DialogTitle;
|
|
30624
30630
|
var Description = DialogDescription;
|
|
30625
30631
|
var Close = DialogClose;
|
|
30626
|
-
const styles$
|
|
30632
|
+
const styles$t = {
|
|
30627
30633
|
left: {
|
|
30628
30634
|
display: "mly78zum5",
|
|
30629
30635
|
justifyContent: "mly1lvf691",
|
|
@@ -30763,11 +30769,11 @@ function HoverCard({
|
|
|
30763
30769
|
customStyle
|
|
30764
30770
|
}) {
|
|
30765
30771
|
return /* @__PURE__ */ jsx("div", {
|
|
30766
|
-
..._stylex.props(styles$
|
|
30772
|
+
..._stylex.props(styles$s.container, fontStyles.body, customStyle),
|
|
30767
30773
|
children
|
|
30768
30774
|
});
|
|
30769
30775
|
}
|
|
30770
|
-
const styles$
|
|
30776
|
+
const styles$s = {
|
|
30771
30777
|
container: {
|
|
30772
30778
|
boxShadow: "mly5n1uv4",
|
|
30773
30779
|
backgroundColor: "mly12peec7",
|
|
@@ -30804,7 +30810,7 @@ function InfoHover({
|
|
|
30804
30810
|
children: [/* @__PURE__ */ jsx(Trigger$4, {
|
|
30805
30811
|
asChild: true,
|
|
30806
30812
|
children: /* @__PURE__ */ jsx("div", {
|
|
30807
|
-
..._stylex.props(styles$
|
|
30813
|
+
..._stylex.props(styles$t.infoTrigger, fontStyles.body),
|
|
30808
30814
|
children: /* @__PURE__ */ jsx(Icon, {
|
|
30809
30815
|
name: "info",
|
|
30810
30816
|
color: "disabled"
|
|
@@ -30815,7 +30821,7 @@ function InfoHover({
|
|
|
30815
30821
|
side: "right",
|
|
30816
30822
|
align: "start",
|
|
30817
30823
|
children: /* @__PURE__ */ jsx(HoverCard, {
|
|
30818
|
-
customStyle: styles$
|
|
30824
|
+
customStyle: styles$t.card,
|
|
30819
30825
|
children: info
|
|
30820
30826
|
})
|
|
30821
30827
|
})
|
|
@@ -30937,9 +30943,9 @@ const PillInput = ({
|
|
|
30937
30943
|
commitValue();
|
|
30938
30944
|
});
|
|
30939
30945
|
return /* @__PURE__ */ jsx("div", {
|
|
30940
|
-
..._stylex.props(fontStyles.body, styles$
|
|
30946
|
+
..._stylex.props(fontStyles.body, styles$r.main),
|
|
30941
30947
|
children: /* @__PURE__ */ jsxs("div", {
|
|
30942
|
-
..._stylex.props(styles$
|
|
30948
|
+
..._stylex.props(styles$r.content, customStyle),
|
|
30943
30949
|
onKeyUp,
|
|
30944
30950
|
onClick: () => {
|
|
30945
30951
|
var _a2;
|
|
@@ -31005,7 +31011,7 @@ const Pill = ({
|
|
|
31005
31011
|
onClick,
|
|
31006
31012
|
tabIndex: 0,
|
|
31007
31013
|
ref: forwardRef,
|
|
31008
|
-
..._stylex.props(styles$
|
|
31014
|
+
..._stylex.props(styles$r.pill, colorVariants[color]),
|
|
31009
31015
|
children: [children, /* @__PURE__ */ jsx("div", {
|
|
31010
31016
|
title: "Remove",
|
|
31011
31017
|
...{
|
|
@@ -31020,7 +31026,7 @@ const Pill = ({
|
|
|
31020
31026
|
})]
|
|
31021
31027
|
});
|
|
31022
31028
|
};
|
|
31023
|
-
const styles$
|
|
31029
|
+
const styles$r = {
|
|
31024
31030
|
main: {
|
|
31025
31031
|
borderRadius: "mly12oqio5",
|
|
31026
31032
|
borderStartStartRadius: null,
|
|
@@ -31176,7 +31182,7 @@ function OneOfEditor({
|
|
|
31176
31182
|
}) {
|
|
31177
31183
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31178
31184
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31179
|
-
..._stylex.props(styles$
|
|
31185
|
+
..._stylex.props(styles$t.label, styles$t.left),
|
|
31180
31186
|
children: /* @__PURE__ */ jsxs("label", {
|
|
31181
31187
|
children: [option2.title ?? name, ":"]
|
|
31182
31188
|
})
|
|
@@ -31236,7 +31242,7 @@ function OneOfStringEditor({
|
|
|
31236
31242
|
if (option2.enum) {
|
|
31237
31243
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31238
31244
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31239
|
-
..._stylex.props(styles$
|
|
31245
|
+
..._stylex.props(styles$t.left),
|
|
31240
31246
|
children: /* @__PURE__ */ jsx("input", {
|
|
31241
31247
|
type: "radio",
|
|
31242
31248
|
checked: isString2 && option2.enum.includes(current),
|
|
@@ -31267,7 +31273,7 @@ function OneOfStringEditor({
|
|
|
31267
31273
|
} else {
|
|
31268
31274
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31269
31275
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31270
|
-
..._stylex.props(styles$
|
|
31276
|
+
..._stylex.props(styles$t.left),
|
|
31271
31277
|
children: /* @__PURE__ */ jsx("input", {
|
|
31272
31278
|
type: "radio",
|
|
31273
31279
|
checked: isString2,
|
|
@@ -31305,7 +31311,7 @@ function OneOfNumberEditor({
|
|
|
31305
31311
|
const [value, setValue] = useState(isNumber2 ? current : option2.minimum ?? 0);
|
|
31306
31312
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31307
31313
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31308
|
-
..._stylex.props(styles$
|
|
31314
|
+
..._stylex.props(styles$t.left),
|
|
31309
31315
|
children: /* @__PURE__ */ jsx("input", {
|
|
31310
31316
|
type: "radio",
|
|
31311
31317
|
checked: isNumber2,
|
|
@@ -31332,7 +31338,7 @@ function OneOfNumberEditor({
|
|
|
31332
31338
|
setValue(valueAsNumber);
|
|
31333
31339
|
updateCurrent(path, valueAsNumber);
|
|
31334
31340
|
},
|
|
31335
|
-
..._stylex.props(styles$
|
|
31341
|
+
..._stylex.props(styles$t.input)
|
|
31336
31342
|
}), /* @__PURE__ */ jsx("div", {})]
|
|
31337
31343
|
});
|
|
31338
31344
|
}
|
|
@@ -31345,7 +31351,7 @@ function OneOfArrayEditor({
|
|
|
31345
31351
|
const [value, setValue] = useState(isArray2 ? current : []);
|
|
31346
31352
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31347
31353
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31348
|
-
..._stylex.props(styles$
|
|
31354
|
+
..._stylex.props(styles$t.left),
|
|
31349
31355
|
children: /* @__PURE__ */ jsx("input", {
|
|
31350
31356
|
type: "radio",
|
|
31351
31357
|
checked: isArray2,
|
|
@@ -31379,7 +31385,7 @@ function OneOfObjectEditor({
|
|
|
31379
31385
|
const [objectValue, setObjectValue] = useState(isObject2 ? current : {});
|
|
31380
31386
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31381
31387
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31382
|
-
..._stylex.props(styles$
|
|
31388
|
+
..._stylex.props(styles$t.left),
|
|
31383
31389
|
children: /* @__PURE__ */ jsx("input", {
|
|
31384
31390
|
type: "radio",
|
|
31385
31391
|
checked: isObject2,
|
|
@@ -31394,7 +31400,7 @@ function OneOfObjectEditor({
|
|
|
31394
31400
|
}
|
|
31395
31401
|
})
|
|
31396
31402
|
}), /* @__PURE__ */ jsx("div", {
|
|
31397
|
-
..._stylex.props(styles$
|
|
31403
|
+
..._stylex.props(styles$t.nest, styles$t.editorGrid),
|
|
31398
31404
|
children: /* @__PURE__ */ jsx(ObjectEditor, {
|
|
31399
31405
|
current: objectValue,
|
|
31400
31406
|
updateCurrent: (path2, value) => {
|
|
@@ -31419,7 +31425,7 @@ function ArrayEditor({
|
|
|
31419
31425
|
}) {
|
|
31420
31426
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31421
31427
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31422
|
-
..._stylex.props(styles$
|
|
31428
|
+
..._stylex.props(styles$t.left, styles$t.label),
|
|
31423
31429
|
children: /* @__PURE__ */ jsxs("label", {
|
|
31424
31430
|
children: [option2.title ?? name, ":"]
|
|
31425
31431
|
})
|
|
@@ -31443,7 +31449,7 @@ function NumberEditor$1({
|
|
|
31443
31449
|
const [value, setValue] = React.useState(current ?? option2.minimum);
|
|
31444
31450
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31445
31451
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31446
|
-
..._stylex.props(styles$
|
|
31452
|
+
..._stylex.props(styles$t.left, styles$t.label),
|
|
31447
31453
|
children: /* @__PURE__ */ jsxs("label", {
|
|
31448
31454
|
children: [option2.title ?? name, ":"]
|
|
31449
31455
|
})
|
|
@@ -31460,7 +31466,7 @@ function NumberEditor$1({
|
|
|
31460
31466
|
setValue(valueAsNumber);
|
|
31461
31467
|
updateCurrent(path, valueAsNumber);
|
|
31462
31468
|
},
|
|
31463
|
-
..._stylex.props(styles$
|
|
31469
|
+
..._stylex.props(styles$t.input)
|
|
31464
31470
|
}, name), option2.description ? /* @__PURE__ */ jsx(InfoHover, {
|
|
31465
31471
|
info: option2.description
|
|
31466
31472
|
}) : /* @__PURE__ */ jsx("div", {})]
|
|
@@ -31476,7 +31482,7 @@ function StringEditor$1({
|
|
|
31476
31482
|
if (option2.enum) {
|
|
31477
31483
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31478
31484
|
children: [/* @__PURE__ */ createElement("div", {
|
|
31479
|
-
..._stylex.props(styles$
|
|
31485
|
+
..._stylex.props(styles$t.left, styles$t.label),
|
|
31480
31486
|
key: `${name}-label`
|
|
31481
31487
|
}, /* @__PURE__ */ jsxs("label", {
|
|
31482
31488
|
children: [option2.title ?? name, ":"]
|
|
@@ -31496,7 +31502,7 @@ function StringEditor$1({
|
|
|
31496
31502
|
} else {
|
|
31497
31503
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31498
31504
|
children: [/* @__PURE__ */ createElement("div", {
|
|
31499
|
-
..._stylex.props(styles$
|
|
31505
|
+
..._stylex.props(styles$t.left, styles$t.label),
|
|
31500
31506
|
key: `${name}-label`
|
|
31501
31507
|
}, /* @__PURE__ */ jsxs("label", {
|
|
31502
31508
|
children: [option2.title ?? name, ":"]
|
|
@@ -31524,14 +31530,14 @@ function BooleanEditor({
|
|
|
31524
31530
|
}) {
|
|
31525
31531
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31526
31532
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31527
|
-
..._stylex.props(styles$
|
|
31533
|
+
..._stylex.props(styles$t.left),
|
|
31528
31534
|
children: /* @__PURE__ */ jsxs("label", {
|
|
31529
|
-
..._stylex.props(styles$
|
|
31535
|
+
..._stylex.props(styles$t.label),
|
|
31530
31536
|
htmlFor: `${name}-checkbox`,
|
|
31531
31537
|
children: [option2.title ?? name, ":"]
|
|
31532
31538
|
}, `${name}-label`)
|
|
31533
31539
|
}), /* @__PURE__ */ jsx("div", {
|
|
31534
|
-
..._stylex.props(styles$
|
|
31540
|
+
..._stylex.props(styles$t.right),
|
|
31535
31541
|
children: /* @__PURE__ */ jsx("input", {
|
|
31536
31542
|
type: "checkbox",
|
|
31537
31543
|
checked: current,
|
|
@@ -31580,7 +31586,7 @@ function FieldEditor({
|
|
|
31580
31586
|
});
|
|
31581
31587
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31582
31588
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31583
|
-
..._stylex.props(styles$
|
|
31589
|
+
..._stylex.props(styles$t.left, styles$t.label),
|
|
31584
31590
|
children: /* @__PURE__ */ jsxs("label", {
|
|
31585
31591
|
children: [option2.title ?? name, ":"]
|
|
31586
31592
|
})
|
|
@@ -31660,7 +31666,7 @@ function ObjectEditor({
|
|
|
31660
31666
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
31661
31667
|
children: [name ? /* @__PURE__ */ jsxs(Fragment, {
|
|
31662
31668
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
31663
|
-
..._stylex.props(styles$
|
|
31669
|
+
..._stylex.props(styles$t.label, styles$t.heading),
|
|
31664
31670
|
onClick: () => setIsExpanded(!isExpanded),
|
|
31665
31671
|
children: [/* @__PURE__ */ jsx("label", {
|
|
31666
31672
|
children: option2.title ?? name
|
|
@@ -31748,7 +31754,7 @@ function ObjectEditor({
|
|
|
31748
31754
|
}
|
|
31749
31755
|
return null;
|
|
31750
31756
|
}) : null, /* @__PURE__ */ jsx("div", {
|
|
31751
|
-
..._stylex.props(styles$
|
|
31757
|
+
..._stylex.props(styles$t.divider)
|
|
31752
31758
|
})]
|
|
31753
31759
|
});
|
|
31754
31760
|
}
|
|
@@ -31768,9 +31774,9 @@ function VizEditor({
|
|
|
31768
31774
|
console.info("RendererEditor current settings:", current);
|
|
31769
31775
|
}, [current]);
|
|
31770
31776
|
return /* @__PURE__ */ jsxs("div", {
|
|
31771
|
-
..._stylex.props(styles$
|
|
31777
|
+
..._stylex.props(styles$t.editor),
|
|
31772
31778
|
children: [/* @__PURE__ */ jsx("div", {
|
|
31773
|
-
..._stylex.props(styles$
|
|
31779
|
+
..._stylex.props(styles$t.editorGrid),
|
|
31774
31780
|
children: /* @__PURE__ */ jsx(ObjectEditor, {
|
|
31775
31781
|
view,
|
|
31776
31782
|
name: "",
|
|
@@ -31780,13 +31786,13 @@ function VizEditor({
|
|
|
31780
31786
|
updateCurrent
|
|
31781
31787
|
})
|
|
31782
31788
|
}), /* @__PURE__ */ jsxs("div", {
|
|
31783
|
-
..._stylex.props(styles$
|
|
31789
|
+
..._stylex.props(styles$t.editorRow),
|
|
31784
31790
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
31785
31791
|
label: "Cancel",
|
|
31786
31792
|
onClick: () => {
|
|
31787
31793
|
setOpen(false);
|
|
31788
31794
|
},
|
|
31789
|
-
customStyle: styles$
|
|
31795
|
+
customStyle: styles$t.editorCell
|
|
31790
31796
|
}), /* @__PURE__ */ jsx(Button, {
|
|
31791
31797
|
variant: "primary",
|
|
31792
31798
|
label: "Apply",
|
|
@@ -31804,7 +31810,7 @@ function VizEditor({
|
|
|
31804
31810
|
updateQuery();
|
|
31805
31811
|
setOpen(false);
|
|
31806
31812
|
},
|
|
31807
|
-
customStyle: styles$
|
|
31813
|
+
customStyle: styles$t.editorCell
|
|
31808
31814
|
})]
|
|
31809
31815
|
})]
|
|
31810
31816
|
});
|
|
@@ -32030,7 +32036,7 @@ function VizEditorDialog({
|
|
|
32030
32036
|
children: /* @__PURE__ */ jsx(Overlay, {
|
|
32031
32037
|
..._stylex.props(dialogStyles.overlay),
|
|
32032
32038
|
children: /* @__PURE__ */ jsxs(Content$1, {
|
|
32033
|
-
..._stylex.props(fontStyles.body, dialogStyles.content, styles$
|
|
32039
|
+
..._stylex.props(fontStyles.body, dialogStyles.content, styles$q.content, customStyle),
|
|
32034
32040
|
children: [/* @__PURE__ */ jsxs(Title, {
|
|
32035
32041
|
..._stylex.props(dialogStyles.title),
|
|
32036
32042
|
children: ["Visualization Settings", /* @__PURE__ */ jsx(Close, {
|
|
@@ -32052,7 +32058,7 @@ function VizEditorDialog({
|
|
|
32052
32058
|
})
|
|
32053
32059
|
});
|
|
32054
32060
|
}
|
|
32055
|
-
const styles$
|
|
32061
|
+
const styles$q = {
|
|
32056
32062
|
content: {
|
|
32057
32063
|
maxWidth: "mly14zcgw3",
|
|
32058
32064
|
width: "mly14rvwrp",
|
|
@@ -32119,7 +32125,7 @@ function Visualization$1({
|
|
|
32119
32125
|
onClick: () => updateViz(viz)
|
|
32120
32126
|
}));
|
|
32121
32127
|
const tokens2 = [/* @__PURE__ */ jsx(SelectorToken, {
|
|
32122
|
-
customStyle: styles$
|
|
32128
|
+
customStyle: styles$p.first,
|
|
32123
32129
|
icon: `viz_${currentRenderer}`,
|
|
32124
32130
|
value: currentRenderer,
|
|
32125
32131
|
items,
|
|
@@ -32129,7 +32135,7 @@ function Visualization$1({
|
|
|
32129
32135
|
tokens2.push(/* @__PURE__ */ jsx(Token, {
|
|
32130
32136
|
icon: "gear",
|
|
32131
32137
|
onClick: () => setOpen(true),
|
|
32132
|
-
customStyle: styles$
|
|
32138
|
+
customStyle: styles$p.trigger,
|
|
32133
32139
|
tooltip: "Edit Settings..."
|
|
32134
32140
|
}, "gear"));
|
|
32135
32141
|
}
|
|
@@ -32137,12 +32143,12 @@ function Visualization$1({
|
|
|
32137
32143
|
tokens2.push(/* @__PURE__ */ jsx(Token, {
|
|
32138
32144
|
icon: "warning",
|
|
32139
32145
|
tooltip: error,
|
|
32140
|
-
customStyle: styles$
|
|
32146
|
+
customStyle: styles$p.trigger
|
|
32141
32147
|
}));
|
|
32142
32148
|
}
|
|
32143
32149
|
return /* @__PURE__ */ jsxs(Fragment, {
|
|
32144
32150
|
children: [/* @__PURE__ */ jsx(TokenGroup, {
|
|
32145
|
-
customStyle: styles$
|
|
32151
|
+
customStyle: styles$p.group,
|
|
32146
32152
|
children: tokens2
|
|
32147
32153
|
}), /* @__PURE__ */ jsx(VizEditorDialog, {
|
|
32148
32154
|
open,
|
|
@@ -32152,7 +32158,7 @@ function Visualization$1({
|
|
|
32152
32158
|
})]
|
|
32153
32159
|
});
|
|
32154
32160
|
}
|
|
32155
|
-
const styles$
|
|
32161
|
+
const styles$p = {
|
|
32156
32162
|
trigger: {
|
|
32157
32163
|
height: "mly1ktj5wk",
|
|
32158
32164
|
$$css: true
|
|
@@ -32189,7 +32195,7 @@ function ViewAttributeTable({
|
|
|
32189
32195
|
}) {
|
|
32190
32196
|
const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
|
|
32191
32197
|
return /* @__PURE__ */ jsx("div", {
|
|
32192
|
-
..._stylex.props(styles$
|
|
32198
|
+
..._stylex.props(styles$o.attributeTableContainer, style),
|
|
32193
32199
|
children: /* @__PURE__ */ jsx("table", {
|
|
32194
32200
|
...{
|
|
32195
32201
|
className: "mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d"
|
|
@@ -32227,9 +32233,9 @@ function ViewAttributeTableRow({
|
|
|
32227
32233
|
className: "mlydpxx8g"
|
|
32228
32234
|
},
|
|
32229
32235
|
children: [/* @__PURE__ */ jsx("td", {
|
|
32230
|
-
..._stylex.props(styles$
|
|
32236
|
+
..._stylex.props(styles$o.attributeTableKeyCell, fontStyles.supporting),
|
|
32231
32237
|
children: /* @__PURE__ */ jsx("div", {
|
|
32232
|
-
..._stylex.props(styles$
|
|
32238
|
+
..._stylex.props(styles$o.attributeTableKeyCellContent, fontStyles.supporting),
|
|
32233
32239
|
children: attribute
|
|
32234
32240
|
})
|
|
32235
32241
|
}), /* @__PURE__ */ jsx("td", {
|
|
@@ -32240,7 +32246,7 @@ function ViewAttributeTableRow({
|
|
|
32240
32246
|
})]
|
|
32241
32247
|
});
|
|
32242
32248
|
}
|
|
32243
|
-
const styles$
|
|
32249
|
+
const styles$o = {
|
|
32244
32250
|
attributeTableContainer: {
|
|
32245
32251
|
padding: "mlye8ttls",
|
|
32246
32252
|
paddingInline: null,
|
|
@@ -32370,12 +32376,12 @@ function RichText({
|
|
|
32370
32376
|
});
|
|
32371
32377
|
return /* @__PURE__ */ jsx("div", {
|
|
32372
32378
|
ref,
|
|
32373
|
-
..._stylex.props(multiLine && styles$
|
|
32379
|
+
..._stylex.props(multiLine && styles$n.preWrap, multiLine && styles$n.breakWord, customStyle),
|
|
32374
32380
|
...props2,
|
|
32375
32381
|
children: formatted
|
|
32376
32382
|
});
|
|
32377
32383
|
}
|
|
32378
|
-
const styles$
|
|
32384
|
+
const styles$n = {
|
|
32379
32385
|
preWrap: {
|
|
32380
32386
|
whiteSpace: "mly126k92a",
|
|
32381
32387
|
$$css: true
|
|
@@ -32404,7 +32410,7 @@ function HoverText({
|
|
|
32404
32410
|
onMouseEnter: () => setIsTriggerHovered(true),
|
|
32405
32411
|
onMouseLeave: () => setIsTriggerHovered(false),
|
|
32406
32412
|
onPointerMove: (e) => e.preventDefault(),
|
|
32407
|
-
customStyle: [fontStyles.supporting, styles$
|
|
32413
|
+
customStyle: [fontStyles.supporting, styles$m.text],
|
|
32408
32414
|
children: text2
|
|
32409
32415
|
})
|
|
32410
32416
|
}), /* @__PURE__ */ jsx(Portal$4, {
|
|
@@ -32423,7 +32429,7 @@ function HoverText({
|
|
|
32423
32429
|
})]
|
|
32424
32430
|
});
|
|
32425
32431
|
}
|
|
32426
|
-
const styles$
|
|
32432
|
+
const styles$m = {
|
|
32427
32433
|
text: {
|
|
32428
32434
|
overflow: "mlyb3r6kr",
|
|
32429
32435
|
overflowX: null,
|
|
@@ -32450,7 +32456,7 @@ function FieldHoverCard({
|
|
|
32450
32456
|
details = /* @__PURE__ */ jsx(ViewAttributeTable, {
|
|
32451
32457
|
viewInfo: field,
|
|
32452
32458
|
isCompact: true,
|
|
32453
|
-
style: styles$
|
|
32459
|
+
style: styles$l.viewAttributeTable
|
|
32454
32460
|
});
|
|
32455
32461
|
} else if (field.kind === "dimension") {
|
|
32456
32462
|
details = /* @__PURE__ */ jsx(TopValuesTable, {
|
|
@@ -32459,7 +32465,7 @@ function FieldHoverCard({
|
|
|
32459
32465
|
});
|
|
32460
32466
|
}
|
|
32461
32467
|
return /* @__PURE__ */ jsxs(HoverCard, {
|
|
32462
|
-
customStyle: styles$
|
|
32468
|
+
customStyle: styles$l.container,
|
|
32463
32469
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
32464
32470
|
ref,
|
|
32465
32471
|
children: [/* @__PURE__ */ jsx("div", {
|
|
@@ -32470,10 +32476,10 @@ function FieldHoverCard({
|
|
|
32470
32476
|
field
|
|
32471
32477
|
})
|
|
32472
32478
|
}), /* @__PURE__ */ jsx("div", {
|
|
32473
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
32479
|
+
..._stylex.props(fontStyles.supporting, styles$l.path),
|
|
32474
32480
|
children: pathString
|
|
32475
32481
|
}), /* @__PURE__ */ jsx("div", {
|
|
32476
|
-
..._stylex.props(fontStyles.emphasized, styles$
|
|
32482
|
+
..._stylex.props(fontStyles.emphasized, styles$l.title),
|
|
32477
32483
|
children: field.name
|
|
32478
32484
|
}), description && /* @__PURE__ */ jsx(HoverText, {
|
|
32479
32485
|
text: description,
|
|
@@ -32484,7 +32490,7 @@ function FieldHoverCard({
|
|
|
32484
32490
|
})]
|
|
32485
32491
|
});
|
|
32486
32492
|
}
|
|
32487
|
-
const styles$
|
|
32493
|
+
const styles$l = {
|
|
32488
32494
|
container: {
|
|
32489
32495
|
width: "mlybl57os",
|
|
32490
32496
|
maxHeight: "mlyq3t0pi",
|
|
@@ -32717,7 +32723,7 @@ function ValueList({
|
|
|
32717
32723
|
children: (stringSearchResults == null ? void 0 : stringSearchResults.length) ? stringSearchResults.map((value) => /* @__PURE__ */ jsxs("div", {
|
|
32718
32724
|
role: "menuitem",
|
|
32719
32725
|
tabIndex: -1,
|
|
32720
|
-
..._stylex.props(addMenuStyles.item, styles$
|
|
32726
|
+
..._stylex.props(addMenuStyles.item, styles$k.valueItem),
|
|
32721
32727
|
onClick: () => onClick(value),
|
|
32722
32728
|
children: [/* @__PURE__ */ jsx(Value, {
|
|
32723
32729
|
value
|
|
@@ -32741,10 +32747,10 @@ function Value({
|
|
|
32741
32747
|
label: value.fieldValue ?? "∅",
|
|
32742
32748
|
icon: "filter",
|
|
32743
32749
|
color: "purple",
|
|
32744
|
-
customStyle: styles$
|
|
32750
|
+
customStyle: styles$k.token
|
|
32745
32751
|
});
|
|
32746
32752
|
}
|
|
32747
|
-
const styles$
|
|
32753
|
+
const styles$k = {
|
|
32748
32754
|
valueItem: {
|
|
32749
32755
|
height: "mly1qx5ct2",
|
|
32750
32756
|
paddingTop: "mly1y1aw1k",
|
|
@@ -32920,7 +32926,7 @@ const StringFilterCore = ({
|
|
|
32920
32926
|
setSearchValue("");
|
|
32921
32927
|
}
|
|
32922
32928
|
},
|
|
32923
|
-
customStyle: styles$
|
|
32929
|
+
customStyle: styles$j.valueList,
|
|
32924
32930
|
showPath: false,
|
|
32925
32931
|
filter: (value) => !currentFilter.values.includes(value),
|
|
32926
32932
|
hideNoMatchMessage: true
|
|
@@ -32991,7 +32997,7 @@ function stringFilterChangeType(filter, type) {
|
|
|
32991
32997
|
};
|
|
32992
32998
|
}
|
|
32993
32999
|
}
|
|
32994
|
-
const styles$
|
|
33000
|
+
const styles$j = {
|
|
32995
33001
|
valueList: {
|
|
32996
33002
|
maxHeight: "mly3d5gib",
|
|
32997
33003
|
width: "mly1hfn5x7",
|
|
@@ -33943,7 +33949,7 @@ function FieldList({
|
|
|
33943
33949
|
..._stylex.props(customStyle),
|
|
33944
33950
|
children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxs("div", {
|
|
33945
33951
|
children: [/* @__PURE__ */ jsx("div", {
|
|
33946
|
-
..._stylex.props(addMenuStyles.item, styles$
|
|
33952
|
+
..._stylex.props(addMenuStyles.item, styles$i.fieldItem, styles$i.sticky),
|
|
33947
33953
|
"data-disabled": "true",
|
|
33948
33954
|
children: group.name
|
|
33949
33955
|
}), group.fields.map((field) => isFilterOperation && (field.kind === "dimension" || field.kind === "measure") ? /* @__PURE__ */ jsx(FilterPopover, {
|
|
@@ -33953,7 +33959,7 @@ function FieldList({
|
|
|
33953
33959
|
anchor: /* @__PURE__ */ jsx("div", {
|
|
33954
33960
|
role: "menuitem",
|
|
33955
33961
|
tabIndex: -1,
|
|
33956
|
-
..._stylex.props(addMenuStyles.item, styles$
|
|
33962
|
+
..._stylex.props(addMenuStyles.item, styles$i.fieldItem),
|
|
33957
33963
|
children: /* @__PURE__ */ jsx(PopoverTrigger, {
|
|
33958
33964
|
asChild: true,
|
|
33959
33965
|
children: /* @__PURE__ */ jsx(FieldToken, {
|
|
@@ -33980,7 +33986,7 @@ function FieldList({
|
|
|
33980
33986
|
}, group.name + ":" + field.name) : /* @__PURE__ */ jsx("div", {
|
|
33981
33987
|
role: "menuitem",
|
|
33982
33988
|
tabIndex: -1,
|
|
33983
|
-
..._stylex.props(addMenuStyles.item, styles$
|
|
33989
|
+
..._stylex.props(addMenuStyles.item, styles$i.fieldItem),
|
|
33984
33990
|
children: /* @__PURE__ */ jsx(FieldToken, {
|
|
33985
33991
|
field,
|
|
33986
33992
|
onClick: () => onAddOperation(field, group.path),
|
|
@@ -34003,7 +34009,7 @@ function FieldList({
|
|
|
34003
34009
|
})
|
|
34004
34010
|
});
|
|
34005
34011
|
}
|
|
34006
|
-
const styles$
|
|
34012
|
+
const styles$i = {
|
|
34007
34013
|
fieldItem: {
|
|
34008
34014
|
height: "mly1qx5ct2",
|
|
34009
34015
|
paddingTop: "mly1y1aw1k",
|
|
@@ -34032,7 +34038,7 @@ function FieldMenu({
|
|
|
34032
34038
|
}) {
|
|
34033
34039
|
const [search, setSearch] = useState("");
|
|
34034
34040
|
return /* @__PURE__ */ jsxs("div", {
|
|
34035
|
-
..._stylex.props(addMenuStyles.content, styles$
|
|
34041
|
+
..._stylex.props(addMenuStyles.content, styles$h.content),
|
|
34036
34042
|
role: "menu",
|
|
34037
34043
|
children: [/* @__PURE__ */ jsx("div", {
|
|
34038
34044
|
..._stylex.props(addMenuStyles.item),
|
|
@@ -34058,7 +34064,7 @@ function FieldMenu({
|
|
|
34058
34064
|
})]
|
|
34059
34065
|
});
|
|
34060
34066
|
}
|
|
34061
|
-
const styles$
|
|
34067
|
+
const styles$h = {
|
|
34062
34068
|
content: {
|
|
34063
34069
|
maxHeight: "mly3d5gib",
|
|
34064
34070
|
$$css: true
|
|
@@ -34283,7 +34289,7 @@ function OperationActionTitle({
|
|
|
34283
34289
|
return !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field);
|
|
34284
34290
|
};
|
|
34285
34291
|
return /* @__PURE__ */ jsxs("div", {
|
|
34286
|
-
..._stylex.props(styles$
|
|
34292
|
+
..._stylex.props(styles$v.title, hoverStyles.main),
|
|
34287
34293
|
children: [/* @__PURE__ */ jsx("div", {
|
|
34288
34294
|
children: title
|
|
34289
34295
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -34454,7 +34460,7 @@ function SortableOperations({
|
|
|
34454
34460
|
fields,
|
|
34455
34461
|
...props2
|
|
34456
34462
|
}), /* @__PURE__ */ jsx("div", {
|
|
34457
|
-
..._stylex.props(styles$
|
|
34463
|
+
..._stylex.props(styles$v.tokenContainer),
|
|
34458
34464
|
children: /* @__PURE__ */ jsx(DndContext, {
|
|
34459
34465
|
sensors,
|
|
34460
34466
|
collisionDetection: closestCenter,
|
|
@@ -34972,10 +34978,10 @@ function FilterOperations({
|
|
|
34972
34978
|
}
|
|
34973
34979
|
return /* @__PURE__ */ jsxs("div", {
|
|
34974
34980
|
children: [/* @__PURE__ */ jsx("div", {
|
|
34975
|
-
..._stylex.props(styles$
|
|
34981
|
+
..._stylex.props(styles$v.title),
|
|
34976
34982
|
children: "filter by"
|
|
34977
34983
|
}), /* @__PURE__ */ jsx("div", {
|
|
34978
|
-
..._stylex.props(styles$
|
|
34984
|
+
..._stylex.props(styles$v.tokenContainer),
|
|
34979
34985
|
children: filters.map((filterOperation, key2) => {
|
|
34980
34986
|
return /* @__PURE__ */ jsx(ErrorElement, {
|
|
34981
34987
|
fallback: /* @__PURE__ */ jsxs("div", {
|
|
@@ -35062,7 +35068,7 @@ function LimitOperation({
|
|
|
35062
35068
|
}
|
|
35063
35069
|
return /* @__PURE__ */ jsxs("div", {
|
|
35064
35070
|
children: [/* @__PURE__ */ jsx("div", {
|
|
35065
|
-
..._stylex.props(styles$
|
|
35071
|
+
..._stylex.props(styles$v.title),
|
|
35066
35072
|
children: "limit"
|
|
35067
35073
|
}), /* @__PURE__ */ jsxs("div", {
|
|
35068
35074
|
..._stylex.props(hoverStyles.main),
|
|
@@ -35107,10 +35113,10 @@ function OrderByOperations({
|
|
|
35107
35113
|
}
|
|
35108
35114
|
return /* @__PURE__ */ jsxs("div", {
|
|
35109
35115
|
children: [/* @__PURE__ */ jsx("div", {
|
|
35110
|
-
..._stylex.props(styles$
|
|
35116
|
+
..._stylex.props(styles$v.title),
|
|
35111
35117
|
children: "order by"
|
|
35112
35118
|
}), /* @__PURE__ */ jsx("div", {
|
|
35113
|
-
..._stylex.props(styles$
|
|
35119
|
+
..._stylex.props(styles$v.tokenContainer),
|
|
35114
35120
|
children: orderBys.map((orderBy) => {
|
|
35115
35121
|
const {
|
|
35116
35122
|
fieldReference
|
|
@@ -35193,7 +35199,7 @@ function AddItem({
|
|
|
35193
35199
|
children: /* @__PURE__ */ jsxs("div", {
|
|
35194
35200
|
role: "menuitem",
|
|
35195
35201
|
tabIndex: -1,
|
|
35196
|
-
..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$
|
|
35202
|
+
..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$g.open : null),
|
|
35197
35203
|
onClick: doOnClick,
|
|
35198
35204
|
"data-disabled": disabled ? "true" : void 0,
|
|
35199
35205
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
@@ -35217,7 +35223,7 @@ function AddItem({
|
|
|
35217
35223
|
}) : null]
|
|
35218
35224
|
});
|
|
35219
35225
|
}
|
|
35220
|
-
const styles$
|
|
35226
|
+
const styles$g = {
|
|
35221
35227
|
open: {
|
|
35222
35228
|
background: "mly16o7sp0",
|
|
35223
35229
|
backgroundAttachment: null,
|
|
@@ -35286,10 +35292,10 @@ function AddFieldItem({
|
|
|
35286
35292
|
onAddOperation,
|
|
35287
35293
|
isFilterOperation,
|
|
35288
35294
|
search,
|
|
35289
|
-
customStyle: styles$
|
|
35295
|
+
customStyle: styles$f.list
|
|
35290
35296
|
});
|
|
35291
35297
|
}
|
|
35292
|
-
const styles$
|
|
35298
|
+
const styles$f = {
|
|
35293
35299
|
list: {
|
|
35294
35300
|
minWidth: "mly2ixbly",
|
|
35295
35301
|
maxWidth: "mly1j9u4d2",
|
|
@@ -35474,7 +35480,7 @@ function AddMenu({
|
|
|
35474
35480
|
value: search,
|
|
35475
35481
|
onChange: setSearch,
|
|
35476
35482
|
placeholder: "Search...",
|
|
35477
|
-
customStyle: styles$
|
|
35483
|
+
customStyle: styles$e.search
|
|
35478
35484
|
})
|
|
35479
35485
|
}), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsxs("div", {
|
|
35480
35486
|
...{
|
|
@@ -35588,7 +35594,7 @@ function AddMenu({
|
|
|
35588
35594
|
})]
|
|
35589
35595
|
});
|
|
35590
35596
|
}
|
|
35591
|
-
const styles$
|
|
35597
|
+
const styles$e = {
|
|
35592
35598
|
search: {
|
|
35593
35599
|
width: "mlyh8yej3",
|
|
35594
35600
|
$$css: true
|
|
@@ -35631,7 +35637,7 @@ function NestOperations({
|
|
|
35631
35637
|
return null;
|
|
35632
35638
|
}
|
|
35633
35639
|
return /* @__PURE__ */ jsx("div", {
|
|
35634
|
-
..._stylex.props(styles$
|
|
35640
|
+
..._stylex.props(styles$v.tokenContainer),
|
|
35635
35641
|
children: nests.map((nest) => /* @__PURE__ */ jsx(NestOperation, {
|
|
35636
35642
|
view,
|
|
35637
35643
|
nest
|
|
@@ -35822,11 +35828,11 @@ function CollapsingView({
|
|
|
35822
35828
|
})]
|
|
35823
35829
|
}), !collapsed && /* @__PURE__ */ jsx(ViewAttributeTable, {
|
|
35824
35830
|
viewInfo: viewDef.getViewInfo(),
|
|
35825
|
-
style: styles$
|
|
35831
|
+
style: styles$d.preview
|
|
35826
35832
|
})]
|
|
35827
35833
|
});
|
|
35828
35834
|
}
|
|
35829
|
-
const styles$
|
|
35835
|
+
const styles$d = {
|
|
35830
35836
|
preview: {
|
|
35831
35837
|
height: "mlyt7dq6l",
|
|
35832
35838
|
maxHeight: "mly1hkcv85",
|
|
@@ -35947,9 +35953,9 @@ function Source({
|
|
|
35947
35953
|
}) {
|
|
35948
35954
|
if (definition instanceof ASTArrowQueryDefinition) {
|
|
35949
35955
|
return /* @__PURE__ */ jsx("div", {
|
|
35950
|
-
..._stylex.props(styles$
|
|
35956
|
+
..._stylex.props(styles$v.queryCard, styles$c.content),
|
|
35951
35957
|
children: /* @__PURE__ */ jsxs("div", {
|
|
35952
|
-
..._stylex.props(styles$
|
|
35958
|
+
..._stylex.props(styles$v.labelWithIcon),
|
|
35953
35959
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
35954
35960
|
name: "database"
|
|
35955
35961
|
}), /* @__PURE__ */ jsx("div", {
|
|
@@ -35963,7 +35969,7 @@ function Source({
|
|
|
35963
35969
|
}
|
|
35964
35970
|
return null;
|
|
35965
35971
|
}
|
|
35966
|
-
const styles$
|
|
35972
|
+
const styles$c = {
|
|
35967
35973
|
content: {
|
|
35968
35974
|
display: "mlyrvj5dj",
|
|
35969
35975
|
gridAutoFlow: "mly1mt1orb",
|
|
@@ -36014,15 +36020,15 @@ function DateLiteralEditor({
|
|
|
36014
36020
|
children: [/* @__PURE__ */ jsx(Trigger$2, {
|
|
36015
36021
|
asChild: true,
|
|
36016
36022
|
children: /* @__PURE__ */ jsx("div", {
|
|
36017
|
-
..._stylex.props(tokenStyles.main, styles$
|
|
36023
|
+
..._stylex.props(tokenStyles.main, styles$b.wrapper, customStyle),
|
|
36018
36024
|
children: /* @__PURE__ */ jsx(DateInput, {
|
|
36019
36025
|
value: hooks.utc(date).toDate(),
|
|
36020
36026
|
setValue: onSetValue,
|
|
36021
36027
|
units,
|
|
36022
36028
|
onFocus: () => setOpen(true),
|
|
36023
36029
|
customStyle: {
|
|
36024
|
-
...styles$
|
|
36025
|
-
...isDate2 ? styles$
|
|
36030
|
+
...styles$b.input,
|
|
36031
|
+
...isDate2 ? styles$b.dateInput : styles$b.timestampInput
|
|
36026
36032
|
},
|
|
36027
36033
|
forwardRef: input
|
|
36028
36034
|
})
|
|
@@ -36038,14 +36044,14 @@ function DateLiteralEditor({
|
|
|
36038
36044
|
setValue: onSetValue,
|
|
36039
36045
|
units,
|
|
36040
36046
|
maxLevel: units,
|
|
36041
|
-
customStyle: styles$
|
|
36047
|
+
customStyle: styles$b.datePicker,
|
|
36042
36048
|
forwardRef: picker
|
|
36043
36049
|
})
|
|
36044
36050
|
})
|
|
36045
36051
|
})]
|
|
36046
36052
|
});
|
|
36047
36053
|
}
|
|
36048
|
-
const styles$
|
|
36054
|
+
const styles$b = {
|
|
36049
36055
|
input: {
|
|
36050
36056
|
border: "mly1gs6z28",
|
|
36051
36057
|
borderWidth: null,
|
|
@@ -36313,7 +36319,7 @@ function Parameters({
|
|
|
36313
36319
|
children: sourceParameters.map((parameter) => {
|
|
36314
36320
|
var _a2;
|
|
36315
36321
|
return /* @__PURE__ */ jsxs(TokenGroup, {
|
|
36316
|
-
customStyle: styles$
|
|
36322
|
+
customStyle: styles$a.tokenGroup,
|
|
36317
36323
|
children: [/* @__PURE__ */ jsx(Token, {
|
|
36318
36324
|
icon: atomicTypeToIcon(parameter.type.kind),
|
|
36319
36325
|
label: parameter.name
|
|
@@ -36332,7 +36338,7 @@ function Parameters({
|
|
|
36332
36338
|
}
|
|
36333
36339
|
return null;
|
|
36334
36340
|
}
|
|
36335
|
-
const styles$
|
|
36341
|
+
const styles$a = {
|
|
36336
36342
|
tokenGroup: {
|
|
36337
36343
|
display: "mly78zum5",
|
|
36338
36344
|
$$css: true
|
|
@@ -36350,7 +36356,7 @@ function QueryEditor() {
|
|
|
36350
36356
|
definition
|
|
36351
36357
|
} = rootQuery;
|
|
36352
36358
|
return /* @__PURE__ */ jsxs("div", {
|
|
36353
|
-
..._stylex.props(fontStyles.body, styles$
|
|
36359
|
+
..._stylex.props(fontStyles.body, styles$9.main),
|
|
36354
36360
|
children: [/* @__PURE__ */ jsx(Source, {
|
|
36355
36361
|
definition
|
|
36356
36362
|
}), /* @__PURE__ */ jsx(Parameters, {
|
|
@@ -36360,7 +36366,7 @@ function QueryEditor() {
|
|
|
36360
36366
|
})]
|
|
36361
36367
|
});
|
|
36362
36368
|
}
|
|
36363
|
-
const styles$
|
|
36369
|
+
const styles$9 = {
|
|
36364
36370
|
main: {
|
|
36365
36371
|
display: "mly78zum5",
|
|
36366
36372
|
flexDirection: "mlydt5ytf",
|
|
@@ -36410,7 +36416,7 @@ function BookmarkedView({
|
|
|
36410
36416
|
label: "view",
|
|
36411
36417
|
icon: "view_filled",
|
|
36412
36418
|
color: "purple",
|
|
36413
|
-
customStyle: styles$
|
|
36419
|
+
customStyle: styles$8.viewBadge
|
|
36414
36420
|
}), /* @__PURE__ */ jsx(Button, {
|
|
36415
36421
|
variant: "default",
|
|
36416
36422
|
size: "compact",
|
|
@@ -36426,14 +36432,14 @@ function BookmarkedView({
|
|
|
36426
36432
|
})]
|
|
36427
36433
|
})]
|
|
36428
36434
|
}),
|
|
36429
|
-
customStyle: styles$
|
|
36435
|
+
customStyle: styles$8.card,
|
|
36430
36436
|
children: /* @__PURE__ */ jsx(ViewAttributeTable, {
|
|
36431
36437
|
viewInfo
|
|
36432
36438
|
})
|
|
36433
36439
|
})
|
|
36434
36440
|
});
|
|
36435
36441
|
}
|
|
36436
|
-
const styles$
|
|
36442
|
+
const styles$8 = {
|
|
36437
36443
|
viewBadge: {
|
|
36438
36444
|
backgroundColor: "mlyjbqb8w",
|
|
36439
36445
|
$$css: true
|
|
@@ -36456,7 +36462,7 @@ function EmptyQueryDisplay({
|
|
|
36456
36462
|
className: "mly1bpp3o7 mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4"
|
|
36457
36463
|
},
|
|
36458
36464
|
children: [/* @__PURE__ */ jsx("div", {
|
|
36459
|
-
..._stylex.props(styles$
|
|
36465
|
+
..._stylex.props(styles$7.header, fontStyles.emphasized),
|
|
36460
36466
|
children: "Start with a Bookmarked View"
|
|
36461
36467
|
}), /* @__PURE__ */ jsx("div", {
|
|
36462
36468
|
...{
|
|
@@ -36472,7 +36478,7 @@ function EmptyQueryDisplay({
|
|
|
36472
36478
|
})
|
|
36473
36479
|
});
|
|
36474
36480
|
}
|
|
36475
|
-
const styles$
|
|
36481
|
+
const styles$7 = {
|
|
36476
36482
|
header: {
|
|
36477
36483
|
paddingBottom: "mly1l90r2v",
|
|
36478
36484
|
$$css: true
|
|
@@ -36666,7 +36672,7 @@ function RunInfoHover({
|
|
|
36666
36672
|
children: [/* @__PURE__ */ jsx(Trigger$4, {
|
|
36667
36673
|
asChild: true,
|
|
36668
36674
|
children: /* @__PURE__ */ jsxs("div", {
|
|
36669
|
-
..._stylex.props(styles$
|
|
36675
|
+
..._stylex.props(styles$6.triggerContentContainer, fontStyles.body),
|
|
36670
36676
|
children: [/* @__PURE__ */ jsx(Icon, {
|
|
36671
36677
|
name: "info",
|
|
36672
36678
|
color: "disabled"
|
|
@@ -36677,7 +36683,7 @@ function RunInfoHover({
|
|
|
36677
36683
|
side: HOVER_SIDE,
|
|
36678
36684
|
align: HOVER_ALIGN,
|
|
36679
36685
|
children: /* @__PURE__ */ jsx(HoverCard, {
|
|
36680
|
-
customStyle: styles$
|
|
36686
|
+
customStyle: styles$6.card,
|
|
36681
36687
|
children: /* @__PURE__ */ jsxs(Fragment, {
|
|
36682
36688
|
children: [runInfo.customContent, (runInfo == null ? void 0 : runInfo.performanceAspects) && Object.entries(runInfo.performanceAspects).map(([aspect, properties2]) => {
|
|
36683
36689
|
return /* @__PURE__ */ jsx("div", {
|
|
@@ -36695,7 +36701,7 @@ function RunInfoHover({
|
|
|
36695
36701
|
href: runInfo.queryLink.href,
|
|
36696
36702
|
target: "_blank",
|
|
36697
36703
|
rel: "noreferrer",
|
|
36698
|
-
..._stylex.props(styles$
|
|
36704
|
+
..._stylex.props(styles$6.link, fontStyles.link),
|
|
36699
36705
|
children: runInfo.queryLink.linkText
|
|
36700
36706
|
})]
|
|
36701
36707
|
})
|
|
@@ -36704,7 +36710,7 @@ function RunInfoHover({
|
|
|
36704
36710
|
})]
|
|
36705
36711
|
});
|
|
36706
36712
|
}
|
|
36707
|
-
const styles$
|
|
36713
|
+
const styles$6 = {
|
|
36708
36714
|
card: {
|
|
36709
36715
|
maxWidth: "mly1dc814f",
|
|
36710
36716
|
$$css: true
|
|
@@ -36955,7 +36961,7 @@ function LoadingDisplay({
|
|
|
36955
36961
|
},
|
|
36956
36962
|
children: [/* @__PURE__ */ jsx(Spinner, {
|
|
36957
36963
|
size: "large",
|
|
36958
|
-
customStyle: styles$
|
|
36964
|
+
customStyle: styles$5.spinner
|
|
36959
36965
|
}), /* @__PURE__ */ jsx("div", {
|
|
36960
36966
|
..._stylex.props(fontStyles.emphasized),
|
|
36961
36967
|
children: `${EXECUTION_STATES[executionState]} query...`
|
|
@@ -36979,7 +36985,7 @@ function useTimeElapsedMillis(queryResolutionStartMillis) {
|
|
|
36979
36985
|
}, [queryResolutionStartMillis]);
|
|
36980
36986
|
return time;
|
|
36981
36987
|
}
|
|
36982
|
-
const styles$
|
|
36988
|
+
const styles$5 = {
|
|
36983
36989
|
spinner: {
|
|
36984
36990
|
marginBottom: "mly1e56ztr",
|
|
36985
36991
|
$$css: true
|
|
@@ -37048,6 +37054,383 @@ function CopyToClipboard({
|
|
|
37048
37054
|
}
|
|
37049
37055
|
});
|
|
37050
37056
|
}
|
|
37057
|
+
class DataWriter {
|
|
37058
|
+
constructor(stream, result) {
|
|
37059
|
+
this.stream = stream;
|
|
37060
|
+
this.result = result;
|
|
37061
|
+
}
|
|
37062
|
+
}
|
|
37063
|
+
class JSONWriter extends DataWriter {
|
|
37064
|
+
async process(data) {
|
|
37065
|
+
this.stream.write("[\n");
|
|
37066
|
+
let first = true;
|
|
37067
|
+
for await (const row of data) {
|
|
37068
|
+
if (first) {
|
|
37069
|
+
first = false;
|
|
37070
|
+
} else {
|
|
37071
|
+
this.stream.write(",\n");
|
|
37072
|
+
}
|
|
37073
|
+
const json2 = JSON.stringify(toObject(this.result.schema.fields.filter((field) => field.kind === "dimension"), row.record_value), null, 2);
|
|
37074
|
+
const jsonLines = json2.split("\n");
|
|
37075
|
+
for (let i2 = 0; i2 < jsonLines.length; i2++) {
|
|
37076
|
+
const line = jsonLines[i2];
|
|
37077
|
+
this.stream.write(` ${line}`);
|
|
37078
|
+
if (i2 < jsonLines.length - 1) {
|
|
37079
|
+
this.stream.write("\n");
|
|
37080
|
+
}
|
|
37081
|
+
}
|
|
37082
|
+
}
|
|
37083
|
+
this.stream.write("\n]\n");
|
|
37084
|
+
this.stream.close();
|
|
37085
|
+
}
|
|
37086
|
+
}
|
|
37087
|
+
class CSVWriter extends DataWriter {
|
|
37088
|
+
constructor() {
|
|
37089
|
+
super(...arguments);
|
|
37090
|
+
this.columnSeparator = ",";
|
|
37091
|
+
this.rowSeparator = "\n";
|
|
37092
|
+
this.quoteCharacter = '"';
|
|
37093
|
+
this.includeHeader = true;
|
|
37094
|
+
this.emptyCell = "";
|
|
37095
|
+
}
|
|
37096
|
+
escape(value) {
|
|
37097
|
+
const hasInnerQuote = value.includes(this.quoteCharacter);
|
|
37098
|
+
const hasInnerCommas = value.includes(this.columnSeparator);
|
|
37099
|
+
const hasNewline = value.includes(this.rowSeparator);
|
|
37100
|
+
const needsQuoting = hasInnerCommas || hasInnerQuote || hasNewline;
|
|
37101
|
+
if (hasInnerQuote) {
|
|
37102
|
+
value = value.replace(new RegExp(this.quoteCharacter, "g"), this.quoteCharacter + this.quoteCharacter);
|
|
37103
|
+
}
|
|
37104
|
+
if (needsQuoting) {
|
|
37105
|
+
value = this.quoteCharacter + value + this.quoteCharacter;
|
|
37106
|
+
}
|
|
37107
|
+
return value;
|
|
37108
|
+
}
|
|
37109
|
+
// Re-using the old stringify method for sanity.
|
|
37110
|
+
stringify(value) {
|
|
37111
|
+
switch (value.kind) {
|
|
37112
|
+
case "string_cell":
|
|
37113
|
+
return this.escape(value.string_value);
|
|
37114
|
+
case "boolean_cell":
|
|
37115
|
+
return JSON.stringify(value.boolean_value);
|
|
37116
|
+
case "number_cell":
|
|
37117
|
+
return JSON.stringify(value.number_value);
|
|
37118
|
+
case "date_cell":
|
|
37119
|
+
return value.date_value;
|
|
37120
|
+
case "timestamp_cell":
|
|
37121
|
+
return value.timestamp_value;
|
|
37122
|
+
case "json_cell":
|
|
37123
|
+
return this.escape(value.json_value);
|
|
37124
|
+
case "null_cell":
|
|
37125
|
+
return this.emptyCell;
|
|
37126
|
+
case "sql_native_cell":
|
|
37127
|
+
return this.escape(value.sql_native_value);
|
|
37128
|
+
}
|
|
37129
|
+
return "";
|
|
37130
|
+
}
|
|
37131
|
+
// Extra weight to be added because of nested tables inside the cells.
|
|
37132
|
+
getColWeight(fields) {
|
|
37133
|
+
let numKeys = 0;
|
|
37134
|
+
for (const field of fields) {
|
|
37135
|
+
numKeys = numKeys + 1;
|
|
37136
|
+
if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
|
|
37137
|
+
const weight = this.getColWeight(field.type.element_type.fields) - 1;
|
|
37138
|
+
numKeys = numKeys + weight;
|
|
37139
|
+
}
|
|
37140
|
+
}
|
|
37141
|
+
return numKeys;
|
|
37142
|
+
}
|
|
37143
|
+
// Get header row along with extra empty spaces for nested children.
|
|
37144
|
+
getHeaderRow(fields) {
|
|
37145
|
+
const csv = [];
|
|
37146
|
+
let width = 0;
|
|
37147
|
+
for (const field of fields) {
|
|
37148
|
+
csv.push(this.escape(field.name));
|
|
37149
|
+
width++;
|
|
37150
|
+
if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
|
|
37151
|
+
const numKeys = this.getColWeight(field.type.element_type.fields) - 1;
|
|
37152
|
+
width = width + numKeys;
|
|
37153
|
+
for (let i2 = 0; i2 < numKeys; i2++) {
|
|
37154
|
+
csv.push(this.emptyCell);
|
|
37155
|
+
}
|
|
37156
|
+
}
|
|
37157
|
+
}
|
|
37158
|
+
return {
|
|
37159
|
+
rows: [csv.join(this.columnSeparator)],
|
|
37160
|
+
length: 1,
|
|
37161
|
+
width
|
|
37162
|
+
};
|
|
37163
|
+
}
|
|
37164
|
+
// Merge the child matrices i.e. merge the columns into one bigger matrix i.e. CSV.
|
|
37165
|
+
mergeMatrices(matrices) {
|
|
37166
|
+
const maxLength = Math.max(...matrices.map((matrix) => matrix.length));
|
|
37167
|
+
const matrixWidth = matrices.reduce((sum, matrix) => sum + matrix.width, 0);
|
|
37168
|
+
const csvMatrix = [];
|
|
37169
|
+
for (let i2 = 0; i2 < maxLength; i2++) {
|
|
37170
|
+
const csvRow = [];
|
|
37171
|
+
for (const matrix of matrices) {
|
|
37172
|
+
if (i2 < matrix.length) {
|
|
37173
|
+
csvRow.push(matrix.rows[i2]);
|
|
37174
|
+
} else {
|
|
37175
|
+
const emptyCells = Array(matrix.width).fill(this.emptyCell);
|
|
37176
|
+
csvRow.push(...emptyCells);
|
|
37177
|
+
}
|
|
37178
|
+
}
|
|
37179
|
+
csvMatrix.push(csvRow.join(this.columnSeparator));
|
|
37180
|
+
}
|
|
37181
|
+
return {
|
|
37182
|
+
rows: csvMatrix,
|
|
37183
|
+
length: maxLength,
|
|
37184
|
+
width: matrixWidth
|
|
37185
|
+
};
|
|
37186
|
+
}
|
|
37187
|
+
// Gets CSV for a data cell that has nested data.
|
|
37188
|
+
getChildMatrix(fields, value) {
|
|
37189
|
+
if (value.kind !== "array_cell") {
|
|
37190
|
+
return {
|
|
37191
|
+
rows: ["Invalid data found, value is not an array"],
|
|
37192
|
+
length: 1,
|
|
37193
|
+
width: 1
|
|
37194
|
+
};
|
|
37195
|
+
} else if (value.array_value.length === 0) {
|
|
37196
|
+
return {
|
|
37197
|
+
rows: [""],
|
|
37198
|
+
length: 1,
|
|
37199
|
+
width: 1
|
|
37200
|
+
};
|
|
37201
|
+
}
|
|
37202
|
+
const csvMatrix = [];
|
|
37203
|
+
const header = this.getHeaderRow(fields);
|
|
37204
|
+
csvMatrix.push(...header.rows);
|
|
37205
|
+
const width = header.width;
|
|
37206
|
+
let rowCount = 1;
|
|
37207
|
+
for (const row of value.array_value) {
|
|
37208
|
+
if (row.kind === "record_cell") {
|
|
37209
|
+
const rowMatrix = this.getRowMatrix(fields, row.record_value);
|
|
37210
|
+
rowCount = rowCount + rowMatrix.length;
|
|
37211
|
+
csvMatrix.push(...rowMatrix.rows);
|
|
37212
|
+
}
|
|
37213
|
+
}
|
|
37214
|
+
return {
|
|
37215
|
+
rows: csvMatrix,
|
|
37216
|
+
length: rowCount,
|
|
37217
|
+
width
|
|
37218
|
+
};
|
|
37219
|
+
}
|
|
37220
|
+
// Creates CSV content for one row of data.
|
|
37221
|
+
getRowMatrix(fields, row) {
|
|
37222
|
+
const matrices = [];
|
|
37223
|
+
for (let idx = 0; idx < fields.length; idx++) {
|
|
37224
|
+
const field = fields[idx];
|
|
37225
|
+
const val = row[idx];
|
|
37226
|
+
if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
|
|
37227
|
+
const cell = this.getChildMatrix(field.type.element_type.fields, val);
|
|
37228
|
+
matrices.push(cell);
|
|
37229
|
+
} else {
|
|
37230
|
+
const cell = {
|
|
37231
|
+
rows: [this.stringify(val)],
|
|
37232
|
+
length: 1,
|
|
37233
|
+
width: 1
|
|
37234
|
+
};
|
|
37235
|
+
matrices.push(cell);
|
|
37236
|
+
}
|
|
37237
|
+
}
|
|
37238
|
+
return this.mergeMatrices(matrices);
|
|
37239
|
+
}
|
|
37240
|
+
async process(data) {
|
|
37241
|
+
let headerDefined = false;
|
|
37242
|
+
for await (const row of data) {
|
|
37243
|
+
const fields = this.result.schema.fields.filter((field) => field.kind === "dimension");
|
|
37244
|
+
if (!headerDefined && this.includeHeader) {
|
|
37245
|
+
const header = this.getHeaderRow(fields);
|
|
37246
|
+
this.stream.write(header.rows[0]);
|
|
37247
|
+
this.stream.write(this.rowSeparator);
|
|
37248
|
+
headerDefined = true;
|
|
37249
|
+
}
|
|
37250
|
+
const rowCsv = this.getRowMatrix(fields, row.record_value);
|
|
37251
|
+
for (const line of rowCsv.rows) {
|
|
37252
|
+
this.stream.write(line);
|
|
37253
|
+
this.stream.write(this.rowSeparator);
|
|
37254
|
+
}
|
|
37255
|
+
}
|
|
37256
|
+
this.stream.close();
|
|
37257
|
+
}
|
|
37258
|
+
}
|
|
37259
|
+
function toObject(fields, data) {
|
|
37260
|
+
const result = {};
|
|
37261
|
+
for (let idx = 0; idx < fields.length; idx++) {
|
|
37262
|
+
const field = fields[idx];
|
|
37263
|
+
const value = data[idx];
|
|
37264
|
+
switch (value.kind) {
|
|
37265
|
+
case "string_cell":
|
|
37266
|
+
result[field.name] = value.string_value;
|
|
37267
|
+
break;
|
|
37268
|
+
case "boolean_cell":
|
|
37269
|
+
result[field.name] = value.boolean_value;
|
|
37270
|
+
break;
|
|
37271
|
+
case "date_cell":
|
|
37272
|
+
result[field.name] = value.date_value;
|
|
37273
|
+
break;
|
|
37274
|
+
case "timestamp_cell":
|
|
37275
|
+
result[field.name] = value.timestamp_value;
|
|
37276
|
+
break;
|
|
37277
|
+
case "number_cell":
|
|
37278
|
+
result[field.name] = value.number_value;
|
|
37279
|
+
break;
|
|
37280
|
+
case "json_cell":
|
|
37281
|
+
result[field.name] = value.json_value;
|
|
37282
|
+
break;
|
|
37283
|
+
case "record_cell":
|
|
37284
|
+
result[field.name] = toObject(fields, value.record_value);
|
|
37285
|
+
break;
|
|
37286
|
+
case "array_cell":
|
|
37287
|
+
if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
|
|
37288
|
+
const ary = [];
|
|
37289
|
+
for (const cell of value.array_value) {
|
|
37290
|
+
if (cell.kind === "record_cell") {
|
|
37291
|
+
ary.push(toObject(field.type.element_type.fields, cell.record_value));
|
|
37292
|
+
}
|
|
37293
|
+
}
|
|
37294
|
+
result[field.name] = ary;
|
|
37295
|
+
}
|
|
37296
|
+
break;
|
|
37297
|
+
case "null_cell":
|
|
37298
|
+
result[field.name] = null;
|
|
37299
|
+
break;
|
|
37300
|
+
case "sql_native_cell":
|
|
37301
|
+
result[field.name] = value.sql_native_value;
|
|
37302
|
+
break;
|
|
37303
|
+
}
|
|
37304
|
+
}
|
|
37305
|
+
return result;
|
|
37306
|
+
}
|
|
37307
|
+
async function* dataIterator(result) {
|
|
37308
|
+
var _a2;
|
|
37309
|
+
if (((_a2 = result.data) == null ? void 0 : _a2.kind) === "array_cell") {
|
|
37310
|
+
for (const row of result.data.array_value) {
|
|
37311
|
+
if (row.kind === "record_cell") {
|
|
37312
|
+
yield row;
|
|
37313
|
+
}
|
|
37314
|
+
}
|
|
37315
|
+
}
|
|
37316
|
+
}
|
|
37317
|
+
function DownloadButton({
|
|
37318
|
+
name = "malloy",
|
|
37319
|
+
result
|
|
37320
|
+
}) {
|
|
37321
|
+
const [href, setHref] = useState("");
|
|
37322
|
+
const [fileName, setFileName] = useState("");
|
|
37323
|
+
const [format2, _setFormat] = useState("csv");
|
|
37324
|
+
useEffect(() => {
|
|
37325
|
+
const createBlob = async () => {
|
|
37326
|
+
if (!result) {
|
|
37327
|
+
setHref("");
|
|
37328
|
+
return;
|
|
37329
|
+
}
|
|
37330
|
+
const writeStream = new MemoryWriteStream();
|
|
37331
|
+
let writer;
|
|
37332
|
+
let type;
|
|
37333
|
+
let fileName2;
|
|
37334
|
+
if (format2 === "json") {
|
|
37335
|
+
writer = new JSONWriter(writeStream, result);
|
|
37336
|
+
type = "text/json";
|
|
37337
|
+
fileName2 = `${name}.json`;
|
|
37338
|
+
} else {
|
|
37339
|
+
writer = new CSVWriter(writeStream, result);
|
|
37340
|
+
type = "text/csv";
|
|
37341
|
+
fileName2 = `${name}.csv`;
|
|
37342
|
+
}
|
|
37343
|
+
const rowStream = dataIterator(result);
|
|
37344
|
+
await writer.process(rowStream);
|
|
37345
|
+
writeStream.close();
|
|
37346
|
+
const data = writeStream.data;
|
|
37347
|
+
const blob = new Blob([data], {
|
|
37348
|
+
type
|
|
37349
|
+
});
|
|
37350
|
+
setHref(window.URL.createObjectURL(blob));
|
|
37351
|
+
setFileName(fileName2);
|
|
37352
|
+
};
|
|
37353
|
+
void createBlob();
|
|
37354
|
+
}, [name, format2, result]);
|
|
37355
|
+
useEffect(() => {
|
|
37356
|
+
return () => {
|
|
37357
|
+
if (href) {
|
|
37358
|
+
window.URL.revokeObjectURL(href);
|
|
37359
|
+
}
|
|
37360
|
+
};
|
|
37361
|
+
}, [href]);
|
|
37362
|
+
if (href) {
|
|
37363
|
+
return /* @__PURE__ */ jsxs("a", {
|
|
37364
|
+
href,
|
|
37365
|
+
download: fileName,
|
|
37366
|
+
...props(styles$4.link, fontStyles.body),
|
|
37367
|
+
children: [/* @__PURE__ */ jsx(Icon, {
|
|
37368
|
+
name: "download"
|
|
37369
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
37370
|
+
children: "Download CSV"
|
|
37371
|
+
})]
|
|
37372
|
+
});
|
|
37373
|
+
} else {
|
|
37374
|
+
return null;
|
|
37375
|
+
}
|
|
37376
|
+
}
|
|
37377
|
+
class MemoryWriteStream {
|
|
37378
|
+
constructor() {
|
|
37379
|
+
this._data = [];
|
|
37380
|
+
}
|
|
37381
|
+
write(data) {
|
|
37382
|
+
this._data.push(data);
|
|
37383
|
+
}
|
|
37384
|
+
close() {
|
|
37385
|
+
}
|
|
37386
|
+
get data() {
|
|
37387
|
+
return this._data.join("");
|
|
37388
|
+
}
|
|
37389
|
+
}
|
|
37390
|
+
const styles$4 = {
|
|
37391
|
+
link: {
|
|
37392
|
+
display: "mly78zum5",
|
|
37393
|
+
alignContent: "mlyc26acl",
|
|
37394
|
+
gap: "mly167g77z",
|
|
37395
|
+
rowGap: null,
|
|
37396
|
+
columnGap: null,
|
|
37397
|
+
textDecoration: "mly1hl2dhg",
|
|
37398
|
+
textDecorationColor: null,
|
|
37399
|
+
textDecorationLine: null,
|
|
37400
|
+
textDecorationStyle: null,
|
|
37401
|
+
textDecorationThickness: null,
|
|
37402
|
+
background: "mly1md70p1 mly14hn1a8 mlywghvya",
|
|
37403
|
+
backgroundAttachment: null,
|
|
37404
|
+
backgroundClip: null,
|
|
37405
|
+
backgroundColor: null,
|
|
37406
|
+
backgroundImage: null,
|
|
37407
|
+
backgroundOrigin: null,
|
|
37408
|
+
backgroundPosition: null,
|
|
37409
|
+
backgroundPositionX: null,
|
|
37410
|
+
backgroundPositionY: null,
|
|
37411
|
+
backgroundRepeat: null,
|
|
37412
|
+
backgroundSize: null,
|
|
37413
|
+
borderRadius: "mlyur7f20",
|
|
37414
|
+
borderStartStartRadius: null,
|
|
37415
|
+
borderStartEndRadius: null,
|
|
37416
|
+
borderEndStartRadius: null,
|
|
37417
|
+
borderEndEndRadius: null,
|
|
37418
|
+
borderTopLeftRadius: null,
|
|
37419
|
+
borderTopRightRadius: null,
|
|
37420
|
+
borderBottomLeftRadius: null,
|
|
37421
|
+
borderBottomRightRadius: null,
|
|
37422
|
+
padding: "mlyfawy5m",
|
|
37423
|
+
paddingInline: null,
|
|
37424
|
+
paddingStart: null,
|
|
37425
|
+
paddingLeft: null,
|
|
37426
|
+
paddingEnd: null,
|
|
37427
|
+
paddingRight: null,
|
|
37428
|
+
paddingBlock: null,
|
|
37429
|
+
paddingTop: null,
|
|
37430
|
+
paddingBottom: null,
|
|
37431
|
+
$$css: true
|
|
37432
|
+
}
|
|
37433
|
+
};
|
|
37051
37434
|
var Tab = /* @__PURE__ */ function(Tab2) {
|
|
37052
37435
|
Tab2["RESULTS"] = "Results";
|
|
37053
37436
|
Tab2["MALLOY"] = "Malloy";
|
|
@@ -37062,7 +37445,7 @@ function ResultPanel({
|
|
|
37062
37445
|
submittedQuery,
|
|
37063
37446
|
options
|
|
37064
37447
|
}) {
|
|
37065
|
-
var _a2, _b2, _c2;
|
|
37448
|
+
var _a2, _b2, _c2, _d;
|
|
37066
37449
|
const [tab, setTab] = useState(Tab.MALLOY);
|
|
37067
37450
|
const malloyText = (_a2 = useQueryBuilder(source, draftQuery)) == null ? void 0 : _a2.toMalloy();
|
|
37068
37451
|
const views = source.schema.fields.filter((f2) => f2.kind === "view");
|
|
@@ -37120,6 +37503,8 @@ function ResultPanel({
|
|
|
37120
37503
|
}), tab !== Tab.RESULTS && clipboardText && /* @__PURE__ */ jsx(CopyToClipboard, {
|
|
37121
37504
|
text: clipboardText,
|
|
37122
37505
|
label: "Copy Code"
|
|
37506
|
+
}), tab === Tab.RESULTS && /* @__PURE__ */ jsx(DownloadButton, {
|
|
37507
|
+
result: (_b2 = submittedQuery == null ? void 0 : submittedQuery.response) == null ? void 0 : _b2.result
|
|
37123
37508
|
})]
|
|
37124
37509
|
}), /* @__PURE__ */ jsxs("div", {
|
|
37125
37510
|
...{
|
|
@@ -37169,7 +37554,7 @@ function ResultPanel({
|
|
|
37169
37554
|
...{
|
|
37170
37555
|
className: "mlywp4ipm mlyh8yej3 mly5yr21d mly9f619"
|
|
37171
37556
|
},
|
|
37172
|
-
children: ((
|
|
37557
|
+
children: ((_d = (_c2 = submittedQuery == null ? void 0 : submittedQuery.response) == null ? void 0 : _c2.result) == null ? void 0 : _d.sql) && /* @__PURE__ */ jsx(CodeBlock, {
|
|
37173
37558
|
code: submittedQuery.response.result.sql,
|
|
37174
37559
|
language: "sql"
|
|
37175
37560
|
})
|
|
@@ -37425,7 +37810,7 @@ function useOperations(view, field, path) {
|
|
|
37425
37810
|
const groupByDisabledReason = useMemo(() => {
|
|
37426
37811
|
const segment = getSegmentIfPresent(view);
|
|
37427
37812
|
if ((matchingFieldItem == null ? void 0 : matchingFieldItem.field.kind) !== "dimension") {
|
|
37428
|
-
return "Grouping is only available on a
|
|
37813
|
+
return "Grouping is only available on a dimension.";
|
|
37429
37814
|
}
|
|
37430
37815
|
if (segment == null ? void 0 : segment.hasField(field.name, path)) {
|
|
37431
37816
|
return "Cannot group by a field already in the view.";
|
|
@@ -37494,125 +37879,30 @@ function FieldTokenWithActions({
|
|
|
37494
37879
|
path,
|
|
37495
37880
|
viewDef
|
|
37496
37881
|
}) {
|
|
37497
|
-
const updateQuery = useUpdateQuery();
|
|
37498
37882
|
const {
|
|
37499
37883
|
focusedNestView
|
|
37500
37884
|
} = useQueryFocus();
|
|
37885
|
+
const updateQuery = useUpdateQuery();
|
|
37501
37886
|
const view = focusedNestView ?? viewDef;
|
|
37502
|
-
const
|
|
37503
|
-
groupByDisabledReason,
|
|
37504
|
-
aggregateDisabledReason,
|
|
37505
|
-
filterDisabledReason,
|
|
37506
|
-
orderByDisabledReason
|
|
37507
|
-
} = useOperations(view, field, path);
|
|
37508
|
-
const [isFilterPopoverOpen, setIsFilterPopoverOpen] = useState();
|
|
37887
|
+
const [isFilterPopoverOpen, setIsFilterPopoverOpen] = useState(false);
|
|
37509
37888
|
const [isTooltipOpen, setIsTooltipOpen] = useState(false);
|
|
37510
|
-
const
|
|
37511
|
-
if (field.kind === "dimension" || field.kind === "measure") {
|
|
37512
|
-
if (operation === "groupBy" && !groupByDisabledReason) {
|
|
37513
|
-
addGroupBy(view, field, path);
|
|
37514
|
-
} else if (operation === "aggregate" && !aggregateDisabledReason) {
|
|
37515
|
-
addAggregate(view, field, path);
|
|
37516
|
-
} else if (operation === "orderBy" && !orderByDisabledReason) {
|
|
37517
|
-
addOrderByFromSource(view, path, field.name);
|
|
37518
|
-
} else if (operation === "filter" && !filterDisabledReason && filter) {
|
|
37519
|
-
addFilter(view, field, path, filter);
|
|
37520
|
-
}
|
|
37521
|
-
updateQuery();
|
|
37522
|
-
}
|
|
37523
|
-
};
|
|
37524
|
-
const handleSetView = () => {
|
|
37525
|
-
if (field.kind === "view" && rootQuery.isEmpty()) {
|
|
37526
|
-
rootQuery.setView(field.name);
|
|
37527
|
-
updateQuery();
|
|
37528
|
-
}
|
|
37529
|
-
};
|
|
37530
|
-
const handleAddView = () => {
|
|
37531
|
-
if (field.kind === "view") {
|
|
37532
|
-
addNest(view, field);
|
|
37533
|
-
updateQuery();
|
|
37534
|
-
}
|
|
37535
|
-
};
|
|
37889
|
+
const showHover = isFilterPopoverOpen || isTooltipOpen;
|
|
37536
37890
|
return /* @__PURE__ */ jsx(FieldToken, {
|
|
37537
37891
|
field,
|
|
37538
|
-
hoverActions:
|
|
37539
|
-
|
|
37540
|
-
|
|
37541
|
-
|
|
37542
|
-
|
|
37543
|
-
|
|
37544
|
-
|
|
37545
|
-
|
|
37546
|
-
|
|
37547
|
-
|
|
37548
|
-
|
|
37549
|
-
onTooltipOpenChange: setIsTooltipOpen
|
|
37550
|
-
})]
|
|
37551
|
-
}) : field.kind === "measure" ? /* @__PURE__ */ jsxs(Fragment, {
|
|
37552
|
-
children: [/* @__PURE__ */ jsx(ActionButton, {
|
|
37553
|
-
icon: "aggregate",
|
|
37554
|
-
tooltip: aggregateDisabledReason || "Add as aggregate",
|
|
37555
|
-
disabled: !!aggregateDisabledReason,
|
|
37556
|
-
onClick: () => handleAddOperationAction("aggregate"),
|
|
37557
|
-
onTooltipOpenChange: setIsTooltipOpen
|
|
37558
|
-
}), /* @__PURE__ */ jsx(FilterPopover, {
|
|
37559
|
-
fieldInfo: field,
|
|
37560
|
-
path,
|
|
37561
|
-
setFilter: (filter) => handleAddOperationAction("filter", filter),
|
|
37562
|
-
trigger: /* @__PURE__ */ jsx(ActionButton, {
|
|
37563
|
-
icon: "filter",
|
|
37564
|
-
tooltip: filterDisabledReason || "Add as filter",
|
|
37565
|
-
disabled: !!filterDisabledReason,
|
|
37566
|
-
onTooltipOpenChange: setIsTooltipOpen
|
|
37567
|
-
}),
|
|
37568
|
-
onOpenChange: setIsFilterPopoverOpen,
|
|
37569
|
-
layoutProps: {
|
|
37570
|
-
align: "start"
|
|
37571
|
-
}
|
|
37572
|
-
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
37573
|
-
icon: "orderBy",
|
|
37574
|
-
tooltip: orderByDisabledReason || "Add as order by",
|
|
37575
|
-
disabled: !!orderByDisabledReason,
|
|
37576
|
-
onClick: () => handleAddOperationAction("orderBy"),
|
|
37577
|
-
onTooltipOpenChange: setIsTooltipOpen
|
|
37578
|
-
})]
|
|
37579
|
-
}) : field.kind === "dimension" ? /* @__PURE__ */ jsxs(Fragment, {
|
|
37580
|
-
children: [/* @__PURE__ */ jsx(ActionButton, {
|
|
37581
|
-
icon: "groupBy",
|
|
37582
|
-
tooltip: groupByDisabledReason || "Add as group by",
|
|
37583
|
-
disabled: !!groupByDisabledReason,
|
|
37584
|
-
onClick: () => handleAddOperationAction("groupBy"),
|
|
37585
|
-
onTooltipOpenChange: setIsTooltipOpen
|
|
37586
|
-
}), /* @__PURE__ */ jsx(FilterPopover, {
|
|
37587
|
-
fieldInfo: field,
|
|
37588
|
-
path,
|
|
37589
|
-
setFilter: (filter) => handleAddOperationAction("filter", filter),
|
|
37590
|
-
trigger: /* @__PURE__ */ jsx(ActionButton, {
|
|
37591
|
-
icon: "filter",
|
|
37592
|
-
tooltip: filterDisabledReason || "Add as filter",
|
|
37593
|
-
disabled: !!filterDisabledReason,
|
|
37594
|
-
onTooltipOpenChange: setIsTooltipOpen
|
|
37595
|
-
}),
|
|
37596
|
-
onOpenChange: setIsFilterPopoverOpen,
|
|
37597
|
-
layoutProps: {
|
|
37598
|
-
align: "start"
|
|
37599
|
-
}
|
|
37600
|
-
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
37601
|
-
icon: "orderBy",
|
|
37602
|
-
tooltip: orderByDisabledReason || "Add as order by",
|
|
37603
|
-
disabled: !!orderByDisabledReason,
|
|
37604
|
-
onClick: () => handleAddOperationAction("orderBy"),
|
|
37605
|
-
onTooltipOpenChange: setIsTooltipOpen
|
|
37606
|
-
})]
|
|
37607
|
-
}) : null,
|
|
37608
|
-
onClick: field.kind === "dimension" && !groupByDisabledReason ? () => handleAddOperationAction("groupBy") : field.kind === "measure" && !aggregateDisabledReason ? () => handleAddOperationAction("aggregate") : field.kind === "view" ? () => {
|
|
37609
|
-
if (rootQuery.isEmpty()) {
|
|
37610
|
-
handleSetView();
|
|
37611
|
-
} else {
|
|
37612
|
-
handleAddView();
|
|
37892
|
+
hoverActions: /* @__PURE__ */ jsx(QueryEditorActions, {
|
|
37893
|
+
rootQuery,
|
|
37894
|
+
field,
|
|
37895
|
+
view,
|
|
37896
|
+
path,
|
|
37897
|
+
setIsFilterPopoverOpen,
|
|
37898
|
+
setIsTooltipOpen
|
|
37899
|
+
}),
|
|
37900
|
+
onClick: () => {
|
|
37901
|
+
if (queryEditorClick(rootQuery, view, field, path)) {
|
|
37902
|
+
updateQuery();
|
|
37613
37903
|
}
|
|
37614
|
-
}
|
|
37615
|
-
hoverActionsVisible:
|
|
37904
|
+
},
|
|
37905
|
+
hoverActionsVisible: showHover,
|
|
37616
37906
|
tooltip: /* @__PURE__ */ jsx(FieldHoverCard, {
|
|
37617
37907
|
field,
|
|
37618
37908
|
path
|
|
@@ -37648,6 +37938,143 @@ function ActionButton({
|
|
|
37648
37938
|
})]
|
|
37649
37939
|
});
|
|
37650
37940
|
}
|
|
37941
|
+
function QueryEditorActions({
|
|
37942
|
+
rootQuery,
|
|
37943
|
+
view,
|
|
37944
|
+
field,
|
|
37945
|
+
path,
|
|
37946
|
+
setIsTooltipOpen,
|
|
37947
|
+
setIsFilterPopoverOpen
|
|
37948
|
+
}) {
|
|
37949
|
+
const updateQuery = useUpdateQuery();
|
|
37950
|
+
const {
|
|
37951
|
+
groupByDisabledReason,
|
|
37952
|
+
aggregateDisabledReason,
|
|
37953
|
+
filterDisabledReason,
|
|
37954
|
+
orderByDisabledReason
|
|
37955
|
+
} = useOperations(view, field, path);
|
|
37956
|
+
const handleAddOperationAction = (operation, filter) => {
|
|
37957
|
+
if (field.kind === "dimension" || field.kind === "measure") {
|
|
37958
|
+
if (operation === "groupBy" && !groupByDisabledReason) {
|
|
37959
|
+
addGroupBy(view, field, path);
|
|
37960
|
+
} else if (operation === "aggregate" && !aggregateDisabledReason) {
|
|
37961
|
+
addAggregate(view, field, path);
|
|
37962
|
+
} else if (operation === "orderBy" && !orderByDisabledReason) {
|
|
37963
|
+
addOrderByFromSource(view, path, field.name);
|
|
37964
|
+
} else if (operation === "filter" && !filterDisabledReason && filter) {
|
|
37965
|
+
addFilter(view, field, path, filter);
|
|
37966
|
+
}
|
|
37967
|
+
updateQuery();
|
|
37968
|
+
}
|
|
37969
|
+
};
|
|
37970
|
+
const handleSetView = () => {
|
|
37971
|
+
if (field.kind === "view" && rootQuery.isEmpty()) {
|
|
37972
|
+
rootQuery.setView(field.name);
|
|
37973
|
+
updateQuery();
|
|
37974
|
+
}
|
|
37975
|
+
};
|
|
37976
|
+
const handleAddView = () => {
|
|
37977
|
+
if (field.kind === "view") {
|
|
37978
|
+
addNest(view, field);
|
|
37979
|
+
updateQuery();
|
|
37980
|
+
}
|
|
37981
|
+
};
|
|
37982
|
+
return field.kind === "view" ? /* @__PURE__ */ jsxs(Fragment, {
|
|
37983
|
+
children: [/* @__PURE__ */ jsx(ActionButton, {
|
|
37984
|
+
icon: "insert",
|
|
37985
|
+
disabled: !rootQuery.isEmpty(),
|
|
37986
|
+
onClick: handleSetView,
|
|
37987
|
+
tooltip: !rootQuery.isEmpty() ? "Can only add a view to an empty query." : "Add view",
|
|
37988
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
37989
|
+
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
37990
|
+
icon: "nest",
|
|
37991
|
+
onClick: handleAddView,
|
|
37992
|
+
tooltip: "Add as new nested query",
|
|
37993
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
37994
|
+
})]
|
|
37995
|
+
}) : field.kind === "measure" ? /* @__PURE__ */ jsxs(Fragment, {
|
|
37996
|
+
children: [/* @__PURE__ */ jsx(ActionButton, {
|
|
37997
|
+
icon: "aggregate",
|
|
37998
|
+
tooltip: aggregateDisabledReason || "Add as aggregate",
|
|
37999
|
+
disabled: !!aggregateDisabledReason,
|
|
38000
|
+
onClick: () => handleAddOperationAction("aggregate"),
|
|
38001
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
38002
|
+
}), /* @__PURE__ */ jsx(FilterPopover, {
|
|
38003
|
+
fieldInfo: field,
|
|
38004
|
+
path,
|
|
38005
|
+
setFilter: (filter) => handleAddOperationAction("filter", filter),
|
|
38006
|
+
trigger: /* @__PURE__ */ jsx(ActionButton, {
|
|
38007
|
+
icon: "filter",
|
|
38008
|
+
tooltip: filterDisabledReason || "Add as filter",
|
|
38009
|
+
disabled: !!filterDisabledReason,
|
|
38010
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
38011
|
+
}),
|
|
38012
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
38013
|
+
layoutProps: {
|
|
38014
|
+
align: "start"
|
|
38015
|
+
}
|
|
38016
|
+
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
38017
|
+
icon: "orderBy",
|
|
38018
|
+
tooltip: orderByDisabledReason || "Add as order by",
|
|
38019
|
+
disabled: !!orderByDisabledReason,
|
|
38020
|
+
onClick: () => handleAddOperationAction("orderBy"),
|
|
38021
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
38022
|
+
})]
|
|
38023
|
+
}) : field.kind === "dimension" ? /* @__PURE__ */ jsxs(Fragment, {
|
|
38024
|
+
children: [/* @__PURE__ */ jsx(ActionButton, {
|
|
38025
|
+
icon: "groupBy",
|
|
38026
|
+
tooltip: groupByDisabledReason || "Add as group by",
|
|
38027
|
+
disabled: !!groupByDisabledReason,
|
|
38028
|
+
onClick: () => handleAddOperationAction("groupBy"),
|
|
38029
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
38030
|
+
}), /* @__PURE__ */ jsx(FilterPopover, {
|
|
38031
|
+
fieldInfo: field,
|
|
38032
|
+
path,
|
|
38033
|
+
setFilter: (filter) => handleAddOperationAction("filter", filter),
|
|
38034
|
+
trigger: /* @__PURE__ */ jsx(ActionButton, {
|
|
38035
|
+
icon: "filter",
|
|
38036
|
+
tooltip: filterDisabledReason || "Add as filter",
|
|
38037
|
+
disabled: !!filterDisabledReason,
|
|
38038
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
38039
|
+
}),
|
|
38040
|
+
onOpenChange: setIsFilterPopoverOpen,
|
|
38041
|
+
layoutProps: {
|
|
38042
|
+
align: "start"
|
|
38043
|
+
}
|
|
38044
|
+
}), /* @__PURE__ */ jsx(ActionButton, {
|
|
38045
|
+
icon: "orderBy",
|
|
38046
|
+
tooltip: orderByDisabledReason || "Add as order by",
|
|
38047
|
+
disabled: !!orderByDisabledReason,
|
|
38048
|
+
onClick: () => handleAddOperationAction("orderBy"),
|
|
38049
|
+
onTooltipOpenChange: setIsTooltipOpen
|
|
38050
|
+
})]
|
|
38051
|
+
}) : null;
|
|
38052
|
+
}
|
|
38053
|
+
function queryEditorClick(rootQuery, view, field, path) {
|
|
38054
|
+
const segment = getSegmentIfPresent(view);
|
|
38055
|
+
if (field.kind === "dimension") {
|
|
38056
|
+
if (!(segment == null ? void 0 : segment.hasField(field.name, path))) {
|
|
38057
|
+
addGroupBy(view, field, path);
|
|
38058
|
+
} else {
|
|
38059
|
+
return false;
|
|
38060
|
+
}
|
|
38061
|
+
} else if (field.kind === "measure") {
|
|
38062
|
+
if (!(segment == null ? void 0 : segment.hasField(field.name, path))) {
|
|
38063
|
+
addAggregate(view, field, path);
|
|
38064
|
+
} else {
|
|
38065
|
+
return false;
|
|
38066
|
+
}
|
|
38067
|
+
} else if (field.kind === "view") {
|
|
38068
|
+
if (rootQuery.isEmpty()) {
|
|
38069
|
+
rootQuery.setView(field.name);
|
|
38070
|
+
} else {
|
|
38071
|
+
addNest(view, field);
|
|
38072
|
+
}
|
|
38073
|
+
} else {
|
|
38074
|
+
return false;
|
|
38075
|
+
}
|
|
38076
|
+
return true;
|
|
38077
|
+
}
|
|
37651
38078
|
const FIELD_KIND_ORDER = ["dimension", "measure", "view"];
|
|
37652
38079
|
function SearchResultList({
|
|
37653
38080
|
rootQuery,
|