@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.
@@ -3846,6 +3846,7 @@ const SvgInfo = (props2) => /* @__PURE__ */ React__namespace.createElement("svg"
3846
3846
  const SvgError = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z" }));
3847
3847
  const SvgRefresh = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React__namespace.createElement("g", { fill: "none", stroke: "currentColor" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42", strokeWidth: 1.1 }), /* @__PURE__ */ React__namespace.createElement("path", { d: "m9.9 2 2.89 2.89-3 3.01" })));
3848
3848
  const SvgSidebarCollapse = (props2) => /* @__PURE__ */ React__namespace.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__namespace.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__namespace.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__namespace.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__namespace.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" }));
3849
+ const SvgDownload = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { width: "24px", height: "24px", viewBox: "0 0 80 80", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("g", null, /* @__PURE__ */ React__namespace.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)" })));
3849
3850
  const SvgFilterSliders = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React__namespace.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 }));
3850
3851
  const SvgVizBarChart = (props2) => /* @__PURE__ */ React__namespace.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__namespace.createElement("g", { id: "viz_bar_chart", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "Group-3", transform: "translate(20.000000, 24.000000)", fill: "currentColor" }, /* @__PURE__ */ React__namespace.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__namespace.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__namespace.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__namespace.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__namespace.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) " })))));
3851
3852
  const SvgVizBoolean = (props2) => /* @__PURE__ */ React__namespace.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__namespace.createElement("g", { id: "viz_boolean", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "noun_switch_3350414-2", transform: "translate(20.000000, 22.000000)", fill: "currentColor", fillRule: "nonzero" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "noun_switch_3350414" }, /* @__PURE__ */ React__namespace.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__namespace.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__namespace.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__namespace.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" })))));
@@ -3888,6 +3889,7 @@ const ICON_MAP = {
3888
3889
  refresh: SvgRefresh,
3889
3890
  sidebarCollapse: SvgSidebarCollapse,
3890
3891
  filterSliders: SvgFilterSliders,
3892
+ download: SvgDownload,
3891
3893
  // Operations
3892
3894
  aggregate: SvgInsertMeasure,
3893
3895
  dimension: SvgTypeIconString,
@@ -3955,11 +3957,11 @@ function Icon({
3955
3957
  return null;
3956
3958
  }
3957
3959
  return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {
3958
- ..._stylex.props(styles$Q.main, colorVariants$3[color], customStyle),
3960
+ ..._stylex.props(styles$R.main, colorVariants$3[color], customStyle),
3959
3961
  "data-testid": `icon-${color}-${name}`
3960
3962
  });
3961
3963
  }
3962
- const styles$Q = {
3964
+ const styles$R = {
3963
3965
  main: {
3964
3966
  display: "mly1rg5ohu",
3965
3967
  width: "mly1kky2od",
@@ -4028,18 +4030,18 @@ function Badge({
4028
4030
  customStyle
4029
4031
  }) {
4030
4032
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
4031
- ..._stylex.props(styles$P.main, colorVariants$2[color], customStyle),
4033
+ ..._stylex.props(styles$Q.main, colorVariants$2[color], customStyle),
4032
4034
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
4033
4035
  color,
4034
4036
  name: icon
4035
4037
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
4036
4038
  "data-testid": "badge-label",
4037
- ..._stylex.props(fontStyles.badge, styles$P.label),
4039
+ ..._stylex.props(fontStyles.badge, styles$Q.label),
4038
4040
  children: label
4039
4041
  })]
4040
4042
  });
4041
4043
  }
4042
- const styles$P = {
4044
+ const styles$Q = {
4043
4045
  main: {
4044
4046
  display: "mly3nfvp2",
4045
4047
  height: "mly1qx5ct2",
@@ -4121,10 +4123,10 @@ function Divider({
4121
4123
  customStyle
4122
4124
  }) {
4123
4125
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
4124
- ..._stylex.props(styles$O.main, orientationVariants[orientation], customStyle)
4126
+ ..._stylex.props(styles$P.main, orientationVariants[orientation], customStyle)
4125
4127
  });
4126
4128
  }
4127
- const styles$O = {
4129
+ const styles$P = {
4128
4130
  main: {
4129
4131
  background: "mly1xnbgy5",
4130
4132
  backgroundAttachment: null,
@@ -4930,7 +4932,7 @@ function Button({
4930
4932
  ...props2
4931
4933
  }) {
4932
4934
  const button = /* @__PURE__ */ jsxRuntime.jsxs("button", {
4933
- ..._stylex.props(styles$N.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
4935
+ ..._stylex.props(styles$O.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
4934
4936
  type: "button",
4935
4937
  disabled: isDisabled,
4936
4938
  ...props2,
@@ -4940,9 +4942,9 @@ function Button({
4940
4942
  },
4941
4943
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
4942
4944
  name: icon,
4943
- customStyle: styles$N.icon
4945
+ customStyle: styles$O.icon
4944
4946
  }), label && /* @__PURE__ */ jsxRuntime.jsx("div", {
4945
- ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$N.label),
4947
+ ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$O.label),
4946
4948
  children: label
4947
4949
  })]
4948
4950
  }), isDisabled && /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -4969,7 +4971,7 @@ function Button({
4969
4971
  return button;
4970
4972
  }
4971
4973
  }
4972
- const styles$N = {
4974
+ const styles$O = {
4973
4975
  main: {
4974
4976
  display: "mly3nfvp2",
4975
4977
  flexDirection: "mlydt5ytf",
@@ -5220,7 +5222,7 @@ function Token({
5220
5222
  }) {
5221
5223
  const isInteractive = onClick !== void 0 || asButtonTrigger;
5222
5224
  const token2 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
5223
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$M.nonInteractive, customStyle),
5225
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$N.nonInteractive, customStyle),
5224
5226
  ...dragProps == null ? void 0 : dragProps.attributes,
5225
5227
  ...dragProps == null ? void 0 : dragProps.listeners,
5226
5228
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
@@ -5257,7 +5259,7 @@ function Token({
5257
5259
  })]
5258
5260
  }) : token2;
5259
5261
  }
5260
- const styles$M = {
5262
+ const styles$N = {
5261
5263
  nonInteractive: {
5262
5264
  cursor: "mlyt0e3qv",
5263
5265
  background: "mly1np9qvj",
@@ -5281,7 +5283,7 @@ function TokenGroup({
5281
5283
  }) {
5282
5284
  const count2 = React__namespace.Children.count(children);
5283
5285
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
5284
- ..._stylex.props(styles$L.main, customStyle),
5286
+ ..._stylex.props(styles$M.main, customStyle),
5285
5287
  children: React__namespace.Children.map(children, (child, index2) => /* @__PURE__ */ React__namespace.cloneElement(child, {
5286
5288
  customStyle: {
5287
5289
  ...child.props.customStyle,
@@ -5292,16 +5294,16 @@ function TokenGroup({
5292
5294
  });
5293
5295
  }
5294
5296
  const getChildStyle = (index2, count2) => {
5295
- if (count2 === 1) return styles$L.onlyChild;
5296
- if (index2 === 0) return styles$L.firstChild;
5297
- if (index2 === count2 - 1) return styles$L.lastChild;
5298
- return styles$L.innerChild;
5297
+ if (count2 === 1) return styles$M.onlyChild;
5298
+ if (index2 === 0) return styles$M.firstChild;
5299
+ if (index2 === count2 - 1) return styles$M.lastChild;
5300
+ return styles$M.innerChild;
5299
5301
  };
5300
5302
  const getTokenColor = (child, groupColor) => {
5301
5303
  const childColor = child.props.color;
5302
5304
  return childColor === void 0 ? groupColor : childColor;
5303
5305
  };
5304
- const styles$L = {
5306
+ const styles$M = {
5305
5307
  main: {
5306
5308
  display: "mlyrvj5dj",
5307
5309
  gridAutoFlow: "mly1mt1orb",
@@ -5373,7 +5375,7 @@ function ErrorIcon({
5373
5375
  },
5374
5376
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
5375
5377
  name: "warning",
5376
- customStyle: styles$K.errorIcon
5378
+ customStyle: styles$L.errorIcon
5377
5379
  })
5378
5380
  })
5379
5381
  }), /* @__PURE__ */ jsxRuntime.jsx(TooltipPortal, {
@@ -5386,7 +5388,7 @@ function ErrorIcon({
5386
5388
  })]
5387
5389
  });
5388
5390
  }
5389
- const styles$K = {
5391
+ const styles$L = {
5390
5392
  errorIcon: {
5391
5393
  color: "mly1e2nbdu",
5392
5394
  $$css: true
@@ -5431,22 +5433,22 @@ function EditableToken({
5431
5433
  className: "mly78zum5 mly6s0dn4"
5432
5434
  },
5433
5435
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
5434
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$J.focused, !!errorMessage && styles$J.hasError, customStyle),
5436
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$K.focused, !!errorMessage && styles$K.hasError, customStyle),
5435
5437
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
5436
5438
  name: icon,
5437
- customStyle: styles$J.icon
5439
+ customStyle: styles$K.icon
5438
5440
  }), /* @__PURE__ */ jsxRuntime.jsxs("span", {
5439
5441
  ...{
5440
5442
  className: "mlywz0xwf"
5441
5443
  },
5442
5444
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
5443
- ..._stylex.props(fontStyles.body, styles$J.placeholder),
5445
+ ..._stylex.props(fontStyles.body, styles$K.placeholder),
5444
5446
  style: {
5445
5447
  whiteSpaceCollapse: "preserve"
5446
5448
  },
5447
5449
  children: value
5448
5450
  }), /* @__PURE__ */ jsxRuntime.jsx("input", {
5449
- ..._stylex.props(styles$J.input, fontStyles.body),
5451
+ ..._stylex.props(styles$K.input, fontStyles.body),
5450
5452
  ref: inputRef,
5451
5453
  pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
5452
5454
  value,
@@ -5471,7 +5473,7 @@ function EditableToken({
5471
5473
  })]
5472
5474
  });
5473
5475
  }
5474
- const styles$J = {
5476
+ const styles$K = {
5475
5477
  focused: {
5476
5478
  background: "mlyotlr4g",
5477
5479
  backgroundAttachment: null,
@@ -7813,12 +7815,12 @@ function TextInput({
7813
7815
  }
7814
7816
  };
7815
7817
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
7816
- ..._stylex.props(styles$I.main, isFocused && styles$I.focused, sizeVariants[size2], customStyle),
7818
+ ..._stylex.props(styles$J.main, isFocused && styles$J.focused, sizeVariants[size2], customStyle),
7817
7819
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
7818
7820
  name: icon,
7819
7821
  color: "secondary"
7820
7822
  }), /* @__PURE__ */ jsxRuntime.jsx("input", {
7821
- ..._stylex.props(fontStyles.body, styles$I.input),
7823
+ ..._stylex.props(fontStyles.body, styles$J.input),
7822
7824
  value,
7823
7825
  placeholder,
7824
7826
  onChange: handleChange,
@@ -7826,7 +7828,7 @@ function TextInput({
7826
7828
  onBlur: handleBlur,
7827
7829
  onKeyDown
7828
7830
  }), hasClear && /* @__PURE__ */ jsxRuntime.jsx("button", {
7829
- ..._stylex.props(fontStyles.supporting, styles$I.actionButton, value === "" && styles$I.hidden),
7831
+ ..._stylex.props(fontStyles.supporting, styles$J.actionButton, value === "" && styles$J.hidden),
7830
7832
  ref: buttonRef,
7831
7833
  onClick: () => onChange(""),
7832
7834
  tabIndex: 0,
@@ -7834,7 +7836,7 @@ function TextInput({
7834
7836
  })]
7835
7837
  });
7836
7838
  }
7837
- const styles$I = {
7839
+ const styles$J = {
7838
7840
  main: {
7839
7841
  display: "mly78zum5",
7840
7842
  alignItems: "mly6s0dn4",
@@ -8043,7 +8045,7 @@ function SelectorToken({
8043
8045
  onValueChange: handleValueChange,
8044
8046
  required: true,
8045
8047
  children: [/* @__PURE__ */ jsxRuntime.jsxs(Trigger$3, {
8046
- ..._stylex.props(tokenStyles.main, styles$H.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], customStyle),
8048
+ ..._stylex.props(tokenStyles.main, styles$I.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], customStyle),
8047
8049
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8048
8050
  name: icon,
8049
8051
  customStyle: tokenStyles.icon
@@ -8070,7 +8072,7 @@ function SelectorToken({
8070
8072
  size: "compact",
8071
8073
  icon: "search",
8072
8074
  hasClear: true,
8073
- customStyle: styles$H.searchInput,
8075
+ customStyle: styles$I.searchInput,
8074
8076
  onKeyDown: (event) => {
8075
8077
  const excludedKeys = ["ArrowUp", "ArrowDown"];
8076
8078
  if (!excludedKeys.includes(event.key)) {
@@ -8101,21 +8103,21 @@ function SelectItem({
8101
8103
  ...props2
8102
8104
  }) {
8103
8105
  return /* @__PURE__ */ jsxRuntime.jsxs(Item$1, {
8104
- ..._stylex.props(fontStyles.body, styles$H.selectItem),
8106
+ ..._stylex.props(fontStyles.body, styles$I.selectItem),
8105
8107
  value,
8106
8108
  ...props2,
8107
8109
  children: [value === selectedValue ? /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8108
8110
  name: "radioChecked",
8109
- customStyle: styles$H.radioChecked
8111
+ customStyle: styles$I.radioChecked
8110
8112
  }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8111
8113
  name: "radioUnchecked",
8112
- customStyle: styles$H.radioUnchecked
8114
+ customStyle: styles$I.radioUnchecked
8113
8115
  }), /* @__PURE__ */ jsxRuntime.jsx(ItemText, {
8114
8116
  children
8115
8117
  })]
8116
8118
  });
8117
8119
  }
8118
- const styles$H = {
8120
+ const styles$I = {
8119
8121
  selectTrigger: {
8120
8122
  whiteSpace: "mlyuxw1ft",
8121
8123
  overflow: "mlyb3r6kr",
@@ -8205,7 +8207,7 @@ function Card({
8205
8207
  customStyle
8206
8208
  }) {
8207
8209
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
8208
- ..._stylex.props(styles$G.container, customStyle),
8210
+ ..._stylex.props(styles$H.container, customStyle),
8209
8211
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
8210
8212
  ...{
8211
8213
  className: "mly1717udv"
@@ -8219,7 +8221,7 @@ function Card({
8219
8221
  })]
8220
8222
  });
8221
8223
  }
8222
- const styles$G = {
8224
+ const styles$H = {
8223
8225
  container: {
8224
8226
  display: "mly78zum5",
8225
8227
  flexDirection: "mlydt5ytf",
@@ -8312,7 +8314,7 @@ function CollapsiblePanel({
8312
8314
  },
8313
8315
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8314
8316
  name: icon,
8315
- customStyle: styles$F.icon
8317
+ customStyle: styles$G.icon
8316
8318
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
8317
8319
  ...{
8318
8320
  className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp mly117nqv4"
@@ -8354,7 +8356,7 @@ function CollapsiblePanel({
8354
8356
  })]
8355
8357
  });
8356
8358
  }
8357
- const styles$F = {
8359
+ const styles$G = {
8358
8360
  icon: {
8359
8361
  $$css: true
8360
8362
  }
@@ -8386,10 +8388,10 @@ function CollapsibleListItem({
8386
8388
  className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
8387
8389
  },
8388
8390
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
8389
- ..._stylex.props(fontStyles.body, styles$E.label),
8391
+ ..._stylex.props(fontStyles.body, styles$F.label),
8390
8392
  children: label
8391
8393
  }), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
8392
- ..._stylex.props(fontStyles.supporting, styles$E.sublabel),
8394
+ ..._stylex.props(fontStyles.supporting, styles$F.sublabel),
8393
8395
  children: sublabel
8394
8396
  })]
8395
8397
  })]
@@ -8401,7 +8403,7 @@ function CollapsibleListItem({
8401
8403
  })]
8402
8404
  });
8403
8405
  }
8404
- const styles$E = {
8406
+ const styles$F = {
8405
8407
  label: {
8406
8408
  flexGrow: "mly1iyjqo2",
8407
8409
  fontWeight: "mly1xlr1w8",
@@ -19215,7 +19217,7 @@ function Spinner({
19215
19217
  } = SIZES[size2];
19216
19218
  const frameSize = diameter + border * 2;
19217
19219
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
19218
- ..._stylex.props(styles$D.root, customStyle),
19220
+ ..._stylex.props(styles$E.root, customStyle),
19219
19221
  children: /* @__PURE__ */ jsxRuntime.jsx("span", {
19220
19222
  "aria-valuetext": "Loading",
19221
19223
  ...{
@@ -19235,7 +19237,7 @@ function Spinner({
19235
19237
  })
19236
19238
  });
19237
19239
  }
19238
- const styles$D = {
19240
+ const styles$E = {
19239
19241
  root: {
19240
19242
  alignItems: "mly6s0dn4",
19241
19243
  display: "mly3nfvp2",
@@ -22304,7 +22306,7 @@ function toArray() {
22304
22306
  m.millisecond()
22305
22307
  ];
22306
22308
  }
22307
- function toObject() {
22309
+ function toObject$1() {
22308
22310
  var m = this;
22309
22311
  return {
22310
22312
  years: m.year(),
@@ -22742,7 +22744,7 @@ proto.set = stringSet;
22742
22744
  proto.startOf = startOf;
22743
22745
  proto.subtract = subtract$1;
22744
22746
  proto.toArray = toArray;
22745
- proto.toObject = toObject;
22747
+ proto.toObject = toObject$1;
22746
22748
  proto.toDate = toDate;
22747
22749
  proto.toISOString = toISOString;
22748
22750
  proto.inspect = inspect;
@@ -23633,7 +23635,7 @@ const Popover = ({
23633
23635
  })
23634
23636
  });
23635
23637
  };
23636
- const styles$C = {
23638
+ const styles$D = {
23637
23639
  wrapper: {
23638
23640
  position: "mly1n2onr6",
23639
23641
  $$css: true
@@ -23685,7 +23687,7 @@ const SelectDropdown = ({
23685
23687
  setOpen(false);
23686
23688
  };
23687
23689
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
23688
- ..._stylex.props(styles$C.wrapper, customStyle),
23690
+ ..._stylex.props(styles$D.wrapper, customStyle),
23689
23691
  children: [/* @__PURE__ */ jsxRuntime.jsxs("button", {
23690
23692
  type: "button",
23691
23693
  autoFocus,
@@ -23753,7 +23755,7 @@ function SelectList({
23753
23755
  const [hoveredIndex, setHoveredIndex] = React.useState(null);
23754
23756
  return /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
23755
23757
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
23756
- ..._stylex.props(styles$C.selectListDiv, customStyle),
23758
+ ..._stylex.props(styles$D.selectListDiv, customStyle),
23757
23759
  children: options.reduce((result, option2, index2) => {
23758
23760
  const isSelected = value !== void 0 && valueEqual(value, option2.value);
23759
23761
  if (option2.divider) {
@@ -23785,8 +23787,8 @@ function SelectList({
23785
23787
  }), /* @__PURE__ */ jsxRuntime.jsx(Icon, {
23786
23788
  name: "checkmark",
23787
23789
  customStyle: {
23788
- ...styles$C.checkIcon,
23789
- ...isSelected ? styles$C.checkIconSelected : void 0
23790
+ ...styles$D.checkIcon,
23791
+ ...isSelected ? styles$D.checkIconSelected : void 0
23790
23792
  }
23791
23793
  }), /* @__PURE__ */ jsxRuntime.jsx("span", {
23792
23794
  ...{
@@ -23838,7 +23840,7 @@ const DateInput = ({
23838
23840
  setTempValue(hooks.utc(value).format(format2));
23839
23841
  }, [value, format2]);
23840
23842
  return /* @__PURE__ */ jsxRuntime.jsx("input", {
23841
- ..._stylex.props(customStyle, isActive ? styles$B.active : null),
23843
+ ..._stylex.props(customStyle, isActive ? styles$C.active : null),
23842
23844
  type: "text",
23843
23845
  placeholder: placeholder || format2,
23844
23846
  value: tempValue,
@@ -23873,7 +23875,7 @@ function guessUnits(moment2, isDateTime) {
23873
23875
  }
23874
23876
  return isDateTime ? "second" : "day";
23875
23877
  }
23876
- const styles$B = {
23878
+ const styles$C = {
23877
23879
  active: {
23878
23880
  backgroundColor: "mly1vzefiq",
23879
23881
  $$css: true
@@ -23985,7 +23987,7 @@ function DatePicker({
23985
23987
  });
23986
23988
  };
23987
23989
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
23988
- ..._stylex.props(styles$A.outer, customStyle),
23990
+ ..._stylex.props(styles$B.outer, customStyle),
23989
23991
  ref: forwardRef,
23990
23992
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
23991
23993
  ...{
@@ -24301,7 +24303,7 @@ function DatePicker({
24301
24303
  })]
24302
24304
  });
24303
24305
  }
24304
- const styles$A = {
24306
+ const styles$B = {
24305
24307
  outer: {
24306
24308
  userSelect: "mly87ps6o",
24307
24309
  fontSize: "mlymhiqyu",
@@ -24387,7 +24389,7 @@ function Banner({
24387
24389
  className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
24388
24390
  },
24389
24391
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
24390
- ..._stylex.props(styles$z.header, variantColors[variant], children ? styles$z.headerWithContent : null),
24392
+ ..._stylex.props(styles$A.header, variantColors[variant], children ? styles$A.headerWithContent : null),
24391
24393
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
24392
24394
  ...{
24393
24395
  className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
@@ -24400,22 +24402,22 @@ function Banner({
24400
24402
  className: "mly78zum5 mlydt5ytf mlyb3r6kr"
24401
24403
  },
24402
24404
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
24403
- ..._stylex.props(styles$z.title, fontStyles.emphasized),
24405
+ ..._stylex.props(styles$A.title, fontStyles.emphasized),
24404
24406
  children: title
24405
24407
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
24406
- ..._stylex.props(styles$z.description, fontStyles.supporting),
24408
+ ..._stylex.props(styles$A.description, fontStyles.supporting),
24407
24409
  children: description
24408
24410
  })]
24409
24411
  })]
24410
24412
  }), children && /* @__PURE__ */ jsxRuntime.jsx("div", {
24411
- ..._stylex.props(styles$z.content, fontStyles.body),
24413
+ ..._stylex.props(styles$A.content, fontStyles.body),
24412
24414
  children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
24413
24415
  children
24414
24416
  })
24415
24417
  })]
24416
24418
  });
24417
24419
  }
24418
- const styles$z = {
24420
+ const styles$A = {
24419
24421
  header: {
24420
24422
  borderRadius: "mly1q4ynmn",
24421
24423
  borderStartStartRadius: null,
@@ -24557,14 +24559,14 @@ function AccordionList({
24557
24559
  onExpandedItemChange: handleExpandedItemChange
24558
24560
  },
24559
24561
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
24560
- ..._stylex.props(styles$y.main, customStyle),
24562
+ ..._stylex.props(styles$z.main, customStyle),
24561
24563
  children: React__namespace.Children.map(children, (child) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
24562
24564
  children: [child, /* @__PURE__ */ jsxRuntime.jsx(Divider, {})]
24563
24565
  }))
24564
24566
  })
24565
24567
  });
24566
24568
  }
24567
- const styles$y = {
24569
+ const styles$z = {
24568
24570
  main: {
24569
24571
  display: "mly78zum5",
24570
24572
  flexDirection: "mlydt5ytf",
@@ -24601,10 +24603,10 @@ function AccordionListItem({
24601
24603
  className: "mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2"
24602
24604
  },
24603
24605
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
24604
- ..._stylex.props(fontStyles.body, styles$x.label),
24606
+ ..._stylex.props(fontStyles.body, styles$y.label),
24605
24607
  children: label
24606
24608
  }), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
24607
- ..._stylex.props(fontStyles.supporting, styles$x.sublabel),
24609
+ ..._stylex.props(fontStyles.supporting, styles$y.sublabel),
24608
24610
  children: sublabel
24609
24611
  })]
24610
24612
  }), badge && badge, endIcon && endIcon]
@@ -24616,7 +24618,7 @@ function AccordionListItem({
24616
24618
  })]
24617
24619
  });
24618
24620
  }
24619
- const styles$x = {
24621
+ const styles$y = {
24620
24622
  label: {
24621
24623
  flexGrow: "mly1iyjqo2",
24622
24624
  fontWeight: "mly1xlr1w8",
@@ -25901,7 +25903,7 @@ function DropdownMenu({
25901
25903
  children: trigger
25902
25904
  }), /* @__PURE__ */ jsxRuntime.jsx(Portal2, {
25903
25905
  children: /* @__PURE__ */ jsxRuntime.jsx(Content2, {
25904
- ..._stylex.props(fontStyles.body, styles$w.content),
25906
+ ..._stylex.props(fontStyles.body, styles$x.content),
25905
25907
  side: "bottom",
25906
25908
  align: "start",
25907
25909
  sideOffset: 4,
@@ -25928,22 +25930,22 @@ function DropdownMenuItem({
25928
25930
  disabled,
25929
25931
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
25930
25932
  name: icon,
25931
- customStyle: styles$w.icon
25933
+ customStyle: styles$x.icon
25932
25934
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
25933
25935
  ...{
25934
25936
  className: "mly78zum5 mlydt5ytf mly1iyjqo2"
25935
25937
  },
25936
25938
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
25937
- ..._stylex.props(fontStyles.body, styles$w.label),
25939
+ ..._stylex.props(fontStyles.body, styles$x.label),
25938
25940
  children: label
25939
25941
  }), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
25940
- ..._stylex.props(fontStyles.supporting, styles$w.sublabel),
25942
+ ..._stylex.props(fontStyles.supporting, styles$x.sublabel),
25941
25943
  children: sublabel
25942
25944
  })]
25943
25945
  })]
25944
25946
  });
25945
25947
  }
25946
- const styles$w = {
25948
+ const styles$x = {
25947
25949
  content: {
25948
25950
  display: "mly78zum5",
25949
25951
  flexDirection: "mlydt5ytf",
@@ -26027,7 +26029,7 @@ function QueryActionBar({
26027
26029
  children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
26028
26030
  name: "filterSliders"
26029
26031
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
26030
- ..._stylex.props(fontStyles.largeBody, styles$v.title),
26032
+ ..._stylex.props(fontStyles.largeBody, styles$w.title),
26031
26033
  children: "Query"
26032
26034
  })]
26033
26035
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -26072,13 +26074,13 @@ function QueryActionBar({
26072
26074
  })]
26073
26075
  });
26074
26076
  }
26075
- const styles$v = {
26077
+ const styles$w = {
26076
26078
  title: {
26077
26079
  fontWeight: "mly1xlr1w8",
26078
26080
  $$css: true
26079
26081
  }
26080
26082
  };
26081
- const styles$u = {
26083
+ const styles$v = {
26082
26084
  labelWithIcon: {
26083
26085
  display: "mly78zum5",
26084
26086
  alignItems: "mly6s0dn4",
@@ -26296,27 +26298,31 @@ function FieldToken({
26296
26298
  hoverActionsVisible,
26297
26299
  ...props2
26298
26300
  }) {
26301
+ const [isHovered, setIsHovered] = React__namespace.useState(false);
26299
26302
  let label = field.name;
26300
26303
  if (field.kind === "dimension" && (field.type.kind === "timestamp_type" || field.type.kind === "date_type")) {
26301
26304
  if (field.type.timeframe) {
26302
26305
  label += `.${field.type.timeframe}`;
26303
26306
  }
26304
26307
  }
26308
+ const showHover = (isHovered || hoverActionsVisible) && !!hoverActions;
26305
26309
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
26310
+ onMouseEnter: () => setIsHovered(true),
26311
+ onMouseLeave: () => setIsHovered(false),
26306
26312
  ...{
26307
26313
  0: {
26308
- className: "mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mly28fmrt mly1x0xcia"
26314
+ className: "mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f"
26309
26315
  },
26310
26316
  1: {
26311
26317
  className: "mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mlym9y5t7"
26312
26318
  }
26313
- }[!!hoverActionsVisible << 0],
26319
+ }[!!showHover << 0],
26314
26320
  children: [/* @__PURE__ */ jsxRuntime.jsx(Token, {
26315
26321
  label,
26316
26322
  color: fieldKindToColor(field.kind),
26317
26323
  icon: fieldToIcon(field),
26318
26324
  ...props2
26319
- }), additionalSiblings, hoverActions && /* @__PURE__ */ jsxRuntime.jsx("div", {
26325
+ }), additionalSiblings, showHover && /* @__PURE__ */ jsxRuntime.jsx("div", {
26320
26326
  ...{
26321
26327
  className: "mly1vsucm1 mly2lah0s"
26322
26328
  },
@@ -26332,7 +26338,7 @@ function DrillOperations({
26332
26338
  }
26333
26339
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
26334
26340
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
26335
- ..._stylex.props(styles$u.title),
26341
+ ..._stylex.props(styles$v.title),
26336
26342
  children: "drills"
26337
26343
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
26338
26344
  ...{
@@ -30307,32 +30313,32 @@ function BadgeForField({
30307
30313
  label: "view",
30308
30314
  icon: "view_filled",
30309
30315
  color: "purple",
30310
- customStyle: styles$t.noBackground
30316
+ customStyle: styles$u.noBackground
30311
30317
  });
30312
30318
  } else if (field.kind === "dimension") {
30313
30319
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
30314
30320
  label: "dimension",
30315
30321
  icon: fieldToIcon(field),
30316
30322
  color: "cyan",
30317
- customStyle: styles$t.noBackground
30323
+ customStyle: styles$u.noBackground
30318
30324
  });
30319
30325
  } else if (field.kind === "measure") {
30320
30326
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
30321
30327
  label: "measure",
30322
30328
  icon: fieldToIcon(field),
30323
30329
  color: "green",
30324
- customStyle: styles$t.noBackground
30330
+ customStyle: styles$u.noBackground
30325
30331
  });
30326
30332
  } else if (field.kind === "join") {
30327
30333
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
30328
30334
  label: "join",
30329
30335
  icon: fieldToIcon(field),
30330
30336
  color: "gray",
30331
- customStyle: styles$t.noBackground
30337
+ customStyle: styles$u.noBackground
30332
30338
  });
30333
30339
  }
30334
30340
  }
30335
- const styles$t = {
30341
+ const styles$u = {
30336
30342
  noBackground: {
30337
30343
  backgroundColor: "mlyjbqb8w",
30338
30344
  $$css: true
@@ -30641,7 +30647,7 @@ var Content$1 = DialogContent;
30641
30647
  var Title = DialogTitle;
30642
30648
  var Description = DialogDescription;
30643
30649
  var Close = DialogClose;
30644
- const styles$s = {
30650
+ const styles$t = {
30645
30651
  left: {
30646
30652
  display: "mly78zum5",
30647
30653
  justifyContent: "mly1lvf691",
@@ -30781,11 +30787,11 @@ function HoverCard({
30781
30787
  customStyle
30782
30788
  }) {
30783
30789
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
30784
- ..._stylex.props(styles$r.container, fontStyles.body, customStyle),
30790
+ ..._stylex.props(styles$s.container, fontStyles.body, customStyle),
30785
30791
  children
30786
30792
  });
30787
30793
  }
30788
- const styles$r = {
30794
+ const styles$s = {
30789
30795
  container: {
30790
30796
  boxShadow: "mly5n1uv4",
30791
30797
  backgroundColor: "mly12peec7",
@@ -30822,7 +30828,7 @@ function InfoHover({
30822
30828
  children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$4, {
30823
30829
  asChild: true,
30824
30830
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
30825
- ..._stylex.props(styles$s.infoTrigger, fontStyles.body),
30831
+ ..._stylex.props(styles$t.infoTrigger, fontStyles.body),
30826
30832
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
30827
30833
  name: "info",
30828
30834
  color: "disabled"
@@ -30833,7 +30839,7 @@ function InfoHover({
30833
30839
  side: "right",
30834
30840
  align: "start",
30835
30841
  children: /* @__PURE__ */ jsxRuntime.jsx(HoverCard, {
30836
- customStyle: styles$s.card,
30842
+ customStyle: styles$t.card,
30837
30843
  children: info
30838
30844
  })
30839
30845
  })
@@ -30955,9 +30961,9 @@ const PillInput = ({
30955
30961
  commitValue();
30956
30962
  });
30957
30963
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
30958
- ..._stylex.props(fontStyles.body, styles$q.main),
30964
+ ..._stylex.props(fontStyles.body, styles$r.main),
30959
30965
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
30960
- ..._stylex.props(styles$q.content, customStyle),
30966
+ ..._stylex.props(styles$r.content, customStyle),
30961
30967
  onKeyUp,
30962
30968
  onClick: () => {
30963
30969
  var _a2;
@@ -31023,7 +31029,7 @@ const Pill = ({
31023
31029
  onClick,
31024
31030
  tabIndex: 0,
31025
31031
  ref: forwardRef,
31026
- ..._stylex.props(styles$q.pill, colorVariants[color]),
31032
+ ..._stylex.props(styles$r.pill, colorVariants[color]),
31027
31033
  children: [children, /* @__PURE__ */ jsxRuntime.jsx("div", {
31028
31034
  title: "Remove",
31029
31035
  ...{
@@ -31038,7 +31044,7 @@ const Pill = ({
31038
31044
  })]
31039
31045
  });
31040
31046
  };
31041
- const styles$q = {
31047
+ const styles$r = {
31042
31048
  main: {
31043
31049
  borderRadius: "mly12oqio5",
31044
31050
  borderStartStartRadius: null,
@@ -31194,7 +31200,7 @@ function OneOfEditor({
31194
31200
  }) {
31195
31201
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31196
31202
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31197
- ..._stylex.props(styles$s.label, styles$s.left),
31203
+ ..._stylex.props(styles$t.label, styles$t.left),
31198
31204
  children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
31199
31205
  children: [option2.title ?? name, ":"]
31200
31206
  })
@@ -31254,7 +31260,7 @@ function OneOfStringEditor({
31254
31260
  if (option2.enum) {
31255
31261
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31256
31262
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31257
- ..._stylex.props(styles$s.left),
31263
+ ..._stylex.props(styles$t.left),
31258
31264
  children: /* @__PURE__ */ jsxRuntime.jsx("input", {
31259
31265
  type: "radio",
31260
31266
  checked: isString2 && option2.enum.includes(current),
@@ -31285,7 +31291,7 @@ function OneOfStringEditor({
31285
31291
  } else {
31286
31292
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31287
31293
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31288
- ..._stylex.props(styles$s.left),
31294
+ ..._stylex.props(styles$t.left),
31289
31295
  children: /* @__PURE__ */ jsxRuntime.jsx("input", {
31290
31296
  type: "radio",
31291
31297
  checked: isString2,
@@ -31323,7 +31329,7 @@ function OneOfNumberEditor({
31323
31329
  const [value, setValue] = React.useState(isNumber2 ? current : option2.minimum ?? 0);
31324
31330
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31325
31331
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31326
- ..._stylex.props(styles$s.left),
31332
+ ..._stylex.props(styles$t.left),
31327
31333
  children: /* @__PURE__ */ jsxRuntime.jsx("input", {
31328
31334
  type: "radio",
31329
31335
  checked: isNumber2,
@@ -31350,7 +31356,7 @@ function OneOfNumberEditor({
31350
31356
  setValue(valueAsNumber);
31351
31357
  updateCurrent(path, valueAsNumber);
31352
31358
  },
31353
- ..._stylex.props(styles$s.input)
31359
+ ..._stylex.props(styles$t.input)
31354
31360
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {})]
31355
31361
  });
31356
31362
  }
@@ -31363,7 +31369,7 @@ function OneOfArrayEditor({
31363
31369
  const [value, setValue] = React.useState(isArray2 ? current : []);
31364
31370
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31365
31371
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31366
- ..._stylex.props(styles$s.left),
31372
+ ..._stylex.props(styles$t.left),
31367
31373
  children: /* @__PURE__ */ jsxRuntime.jsx("input", {
31368
31374
  type: "radio",
31369
31375
  checked: isArray2,
@@ -31397,7 +31403,7 @@ function OneOfObjectEditor({
31397
31403
  const [objectValue, setObjectValue] = React.useState(isObject2 ? current : {});
31398
31404
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31399
31405
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31400
- ..._stylex.props(styles$s.left),
31406
+ ..._stylex.props(styles$t.left),
31401
31407
  children: /* @__PURE__ */ jsxRuntime.jsx("input", {
31402
31408
  type: "radio",
31403
31409
  checked: isObject2,
@@ -31412,7 +31418,7 @@ function OneOfObjectEditor({
31412
31418
  }
31413
31419
  })
31414
31420
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
31415
- ..._stylex.props(styles$s.nest, styles$s.editorGrid),
31421
+ ..._stylex.props(styles$t.nest, styles$t.editorGrid),
31416
31422
  children: /* @__PURE__ */ jsxRuntime.jsx(ObjectEditor, {
31417
31423
  current: objectValue,
31418
31424
  updateCurrent: (path2, value) => {
@@ -31437,7 +31443,7 @@ function ArrayEditor({
31437
31443
  }) {
31438
31444
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31439
31445
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31440
- ..._stylex.props(styles$s.left, styles$s.label),
31446
+ ..._stylex.props(styles$t.left, styles$t.label),
31441
31447
  children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
31442
31448
  children: [option2.title ?? name, ":"]
31443
31449
  })
@@ -31461,7 +31467,7 @@ function NumberEditor$1({
31461
31467
  const [value, setValue] = React__namespace.useState(current ?? option2.minimum);
31462
31468
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31463
31469
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31464
- ..._stylex.props(styles$s.left, styles$s.label),
31470
+ ..._stylex.props(styles$t.left, styles$t.label),
31465
31471
  children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
31466
31472
  children: [option2.title ?? name, ":"]
31467
31473
  })
@@ -31478,7 +31484,7 @@ function NumberEditor$1({
31478
31484
  setValue(valueAsNumber);
31479
31485
  updateCurrent(path, valueAsNumber);
31480
31486
  },
31481
- ..._stylex.props(styles$s.input)
31487
+ ..._stylex.props(styles$t.input)
31482
31488
  }, name), option2.description ? /* @__PURE__ */ jsxRuntime.jsx(InfoHover, {
31483
31489
  info: option2.description
31484
31490
  }) : /* @__PURE__ */ jsxRuntime.jsx("div", {})]
@@ -31494,7 +31500,7 @@ function StringEditor$1({
31494
31500
  if (option2.enum) {
31495
31501
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31496
31502
  children: [/* @__PURE__ */ React.createElement("div", {
31497
- ..._stylex.props(styles$s.left, styles$s.label),
31503
+ ..._stylex.props(styles$t.left, styles$t.label),
31498
31504
  key: `${name}-label`
31499
31505
  }, /* @__PURE__ */ jsxRuntime.jsxs("label", {
31500
31506
  children: [option2.title ?? name, ":"]
@@ -31514,7 +31520,7 @@ function StringEditor$1({
31514
31520
  } else {
31515
31521
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31516
31522
  children: [/* @__PURE__ */ React.createElement("div", {
31517
- ..._stylex.props(styles$s.left, styles$s.label),
31523
+ ..._stylex.props(styles$t.left, styles$t.label),
31518
31524
  key: `${name}-label`
31519
31525
  }, /* @__PURE__ */ jsxRuntime.jsxs("label", {
31520
31526
  children: [option2.title ?? name, ":"]
@@ -31542,14 +31548,14 @@ function BooleanEditor({
31542
31548
  }) {
31543
31549
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31544
31550
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31545
- ..._stylex.props(styles$s.left),
31551
+ ..._stylex.props(styles$t.left),
31546
31552
  children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
31547
- ..._stylex.props(styles$s.label),
31553
+ ..._stylex.props(styles$t.label),
31548
31554
  htmlFor: `${name}-checkbox`,
31549
31555
  children: [option2.title ?? name, ":"]
31550
31556
  }, `${name}-label`)
31551
31557
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
31552
- ..._stylex.props(styles$s.right),
31558
+ ..._stylex.props(styles$t.right),
31553
31559
  children: /* @__PURE__ */ jsxRuntime.jsx("input", {
31554
31560
  type: "checkbox",
31555
31561
  checked: current,
@@ -31598,7 +31604,7 @@ function FieldEditor({
31598
31604
  });
31599
31605
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31600
31606
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31601
- ..._stylex.props(styles$s.left, styles$s.label),
31607
+ ..._stylex.props(styles$t.left, styles$t.label),
31602
31608
  children: /* @__PURE__ */ jsxRuntime.jsxs("label", {
31603
31609
  children: [option2.title ?? name, ":"]
31604
31610
  })
@@ -31678,7 +31684,7 @@ function ObjectEditor({
31678
31684
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31679
31685
  children: [name ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
31680
31686
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
31681
- ..._stylex.props(styles$s.label, styles$s.heading),
31687
+ ..._stylex.props(styles$t.label, styles$t.heading),
31682
31688
  onClick: () => setIsExpanded(!isExpanded),
31683
31689
  children: [/* @__PURE__ */ jsxRuntime.jsx("label", {
31684
31690
  children: option2.title ?? name
@@ -31766,7 +31772,7 @@ function ObjectEditor({
31766
31772
  }
31767
31773
  return null;
31768
31774
  }) : null, /* @__PURE__ */ jsxRuntime.jsx("div", {
31769
- ..._stylex.props(styles$s.divider)
31775
+ ..._stylex.props(styles$t.divider)
31770
31776
  })]
31771
31777
  });
31772
31778
  }
@@ -31786,9 +31792,9 @@ function VizEditor({
31786
31792
  console.info("RendererEditor current settings:", current);
31787
31793
  }, [current]);
31788
31794
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
31789
- ..._stylex.props(styles$s.editor),
31795
+ ..._stylex.props(styles$t.editor),
31790
31796
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
31791
- ..._stylex.props(styles$s.editorGrid),
31797
+ ..._stylex.props(styles$t.editorGrid),
31792
31798
  children: /* @__PURE__ */ jsxRuntime.jsx(ObjectEditor, {
31793
31799
  view,
31794
31800
  name: "",
@@ -31798,13 +31804,13 @@ function VizEditor({
31798
31804
  updateCurrent
31799
31805
  })
31800
31806
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
31801
- ..._stylex.props(styles$s.editorRow),
31807
+ ..._stylex.props(styles$t.editorRow),
31802
31808
  children: [/* @__PURE__ */ jsxRuntime.jsx(Button, {
31803
31809
  label: "Cancel",
31804
31810
  onClick: () => {
31805
31811
  setOpen(false);
31806
31812
  },
31807
- customStyle: styles$s.editorCell
31813
+ customStyle: styles$t.editorCell
31808
31814
  }), /* @__PURE__ */ jsxRuntime.jsx(Button, {
31809
31815
  variant: "primary",
31810
31816
  label: "Apply",
@@ -31822,7 +31828,7 @@ function VizEditor({
31822
31828
  updateQuery();
31823
31829
  setOpen(false);
31824
31830
  },
31825
- customStyle: styles$s.editorCell
31831
+ customStyle: styles$t.editorCell
31826
31832
  })]
31827
31833
  })]
31828
31834
  });
@@ -32048,7 +32054,7 @@ function VizEditorDialog({
32048
32054
  children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, {
32049
32055
  ..._stylex.props(dialogStyles.overlay),
32050
32056
  children: /* @__PURE__ */ jsxRuntime.jsxs(Content$1, {
32051
- ..._stylex.props(fontStyles.body, dialogStyles.content, styles$p.content, customStyle),
32057
+ ..._stylex.props(fontStyles.body, dialogStyles.content, styles$q.content, customStyle),
32052
32058
  children: [/* @__PURE__ */ jsxRuntime.jsxs(Title, {
32053
32059
  ..._stylex.props(dialogStyles.title),
32054
32060
  children: ["Visualization Settings", /* @__PURE__ */ jsxRuntime.jsx(Close, {
@@ -32070,7 +32076,7 @@ function VizEditorDialog({
32070
32076
  })
32071
32077
  });
32072
32078
  }
32073
- const styles$p = {
32079
+ const styles$q = {
32074
32080
  content: {
32075
32081
  maxWidth: "mly14zcgw3",
32076
32082
  width: "mly14rvwrp",
@@ -32137,7 +32143,7 @@ function Visualization$1({
32137
32143
  onClick: () => updateViz(viz)
32138
32144
  }));
32139
32145
  const tokens2 = [/* @__PURE__ */ jsxRuntime.jsx(SelectorToken, {
32140
- customStyle: styles$o.first,
32146
+ customStyle: styles$p.first,
32141
32147
  icon: `viz_${currentRenderer}`,
32142
32148
  value: currentRenderer,
32143
32149
  items,
@@ -32147,7 +32153,7 @@ function Visualization$1({
32147
32153
  tokens2.push(/* @__PURE__ */ jsxRuntime.jsx(Token, {
32148
32154
  icon: "gear",
32149
32155
  onClick: () => setOpen(true),
32150
- customStyle: styles$o.trigger,
32156
+ customStyle: styles$p.trigger,
32151
32157
  tooltip: "Edit Settings..."
32152
32158
  }, "gear"));
32153
32159
  }
@@ -32155,12 +32161,12 @@ function Visualization$1({
32155
32161
  tokens2.push(/* @__PURE__ */ jsxRuntime.jsx(Token, {
32156
32162
  icon: "warning",
32157
32163
  tooltip: error,
32158
- customStyle: styles$o.trigger
32164
+ customStyle: styles$p.trigger
32159
32165
  }));
32160
32166
  }
32161
32167
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
32162
32168
  children: [/* @__PURE__ */ jsxRuntime.jsx(TokenGroup, {
32163
- customStyle: styles$o.group,
32169
+ customStyle: styles$p.group,
32164
32170
  children: tokens2
32165
32171
  }), /* @__PURE__ */ jsxRuntime.jsx(VizEditorDialog, {
32166
32172
  open,
@@ -32170,7 +32176,7 @@ function Visualization$1({
32170
32176
  })]
32171
32177
  });
32172
32178
  }
32173
- const styles$o = {
32179
+ const styles$p = {
32174
32180
  trigger: {
32175
32181
  height: "mly1ktj5wk",
32176
32182
  $$css: true
@@ -32207,7 +32213,7 @@ function ViewAttributeTable({
32207
32213
  }) {
32208
32214
  const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
32209
32215
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
32210
- ..._stylex.props(styles$n.attributeTableContainer, style),
32216
+ ..._stylex.props(styles$o.attributeTableContainer, style),
32211
32217
  children: /* @__PURE__ */ jsxRuntime.jsx("table", {
32212
32218
  ...{
32213
32219
  className: "mly1mwwwfo mly9f619 mlyh8yej3 mly5yr21d"
@@ -32245,9 +32251,9 @@ function ViewAttributeTableRow({
32245
32251
  className: "mlydpxx8g"
32246
32252
  },
32247
32253
  children: [/* @__PURE__ */ jsxRuntime.jsx("td", {
32248
- ..._stylex.props(styles$n.attributeTableKeyCell, fontStyles.supporting),
32254
+ ..._stylex.props(styles$o.attributeTableKeyCell, fontStyles.supporting),
32249
32255
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
32250
- ..._stylex.props(styles$n.attributeTableKeyCellContent, fontStyles.supporting),
32256
+ ..._stylex.props(styles$o.attributeTableKeyCellContent, fontStyles.supporting),
32251
32257
  children: attribute
32252
32258
  })
32253
32259
  }), /* @__PURE__ */ jsxRuntime.jsx("td", {
@@ -32258,7 +32264,7 @@ function ViewAttributeTableRow({
32258
32264
  })]
32259
32265
  });
32260
32266
  }
32261
- const styles$n = {
32267
+ const styles$o = {
32262
32268
  attributeTableContainer: {
32263
32269
  padding: "mlye8ttls",
32264
32270
  paddingInline: null,
@@ -32388,12 +32394,12 @@ function RichText({
32388
32394
  });
32389
32395
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
32390
32396
  ref,
32391
- ..._stylex.props(multiLine && styles$m.preWrap, multiLine && styles$m.breakWord, customStyle),
32397
+ ..._stylex.props(multiLine && styles$n.preWrap, multiLine && styles$n.breakWord, customStyle),
32392
32398
  ...props2,
32393
32399
  children: formatted
32394
32400
  });
32395
32401
  }
32396
- const styles$m = {
32402
+ const styles$n = {
32397
32403
  preWrap: {
32398
32404
  whiteSpace: "mly126k92a",
32399
32405
  $$css: true
@@ -32422,7 +32428,7 @@ function HoverText({
32422
32428
  onMouseEnter: () => setIsTriggerHovered(true),
32423
32429
  onMouseLeave: () => setIsTriggerHovered(false),
32424
32430
  onPointerMove: (e) => e.preventDefault(),
32425
- customStyle: [fontStyles.supporting, styles$l.text],
32431
+ customStyle: [fontStyles.supporting, styles$m.text],
32426
32432
  children: text2
32427
32433
  })
32428
32434
  }), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
@@ -32441,7 +32447,7 @@ function HoverText({
32441
32447
  })]
32442
32448
  });
32443
32449
  }
32444
- const styles$l = {
32450
+ const styles$m = {
32445
32451
  text: {
32446
32452
  overflow: "mlyb3r6kr",
32447
32453
  overflowX: null,
@@ -32468,7 +32474,7 @@ function FieldHoverCard({
32468
32474
  details = /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
32469
32475
  viewInfo: field,
32470
32476
  isCompact: true,
32471
- style: styles$k.viewAttributeTable
32477
+ style: styles$l.viewAttributeTable
32472
32478
  });
32473
32479
  } else if (field.kind === "dimension") {
32474
32480
  details = /* @__PURE__ */ jsxRuntime.jsx(TopValuesTable, {
@@ -32477,7 +32483,7 @@ function FieldHoverCard({
32477
32483
  });
32478
32484
  }
32479
32485
  return /* @__PURE__ */ jsxRuntime.jsxs(HoverCard, {
32480
- customStyle: styles$k.container,
32486
+ customStyle: styles$l.container,
32481
32487
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
32482
32488
  ref,
32483
32489
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -32488,10 +32494,10 @@ function FieldHoverCard({
32488
32494
  field
32489
32495
  })
32490
32496
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
32491
- ..._stylex.props(fontStyles.supporting, styles$k.path),
32497
+ ..._stylex.props(fontStyles.supporting, styles$l.path),
32492
32498
  children: pathString
32493
32499
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
32494
- ..._stylex.props(fontStyles.emphasized, styles$k.title),
32500
+ ..._stylex.props(fontStyles.emphasized, styles$l.title),
32495
32501
  children: field.name
32496
32502
  }), description && /* @__PURE__ */ jsxRuntime.jsx(HoverText, {
32497
32503
  text: description,
@@ -32502,7 +32508,7 @@ function FieldHoverCard({
32502
32508
  })]
32503
32509
  });
32504
32510
  }
32505
- const styles$k = {
32511
+ const styles$l = {
32506
32512
  container: {
32507
32513
  width: "mlybl57os",
32508
32514
  maxHeight: "mlyq3t0pi",
@@ -32735,7 +32741,7 @@ function ValueList({
32735
32741
  children: (stringSearchResults == null ? void 0 : stringSearchResults.length) ? stringSearchResults.map((value) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
32736
32742
  role: "menuitem",
32737
32743
  tabIndex: -1,
32738
- ..._stylex.props(addMenuStyles.item, styles$j.valueItem),
32744
+ ..._stylex.props(addMenuStyles.item, styles$k.valueItem),
32739
32745
  onClick: () => onClick(value),
32740
32746
  children: [/* @__PURE__ */ jsxRuntime.jsx(Value, {
32741
32747
  value
@@ -32759,10 +32765,10 @@ function Value({
32759
32765
  label: value.fieldValue ?? "∅",
32760
32766
  icon: "filter",
32761
32767
  color: "purple",
32762
- customStyle: styles$j.token
32768
+ customStyle: styles$k.token
32763
32769
  });
32764
32770
  }
32765
- const styles$j = {
32771
+ const styles$k = {
32766
32772
  valueItem: {
32767
32773
  height: "mly1qx5ct2",
32768
32774
  paddingTop: "mly1y1aw1k",
@@ -32938,7 +32944,7 @@ const StringFilterCore = ({
32938
32944
  setSearchValue("");
32939
32945
  }
32940
32946
  },
32941
- customStyle: styles$i.valueList,
32947
+ customStyle: styles$j.valueList,
32942
32948
  showPath: false,
32943
32949
  filter: (value) => !currentFilter.values.includes(value),
32944
32950
  hideNoMatchMessage: true
@@ -33009,7 +33015,7 @@ function stringFilterChangeType(filter, type) {
33009
33015
  };
33010
33016
  }
33011
33017
  }
33012
- const styles$i = {
33018
+ const styles$j = {
33013
33019
  valueList: {
33014
33020
  maxHeight: "mly3d5gib",
33015
33021
  width: "mly1hfn5x7",
@@ -33961,7 +33967,7 @@ function FieldList({
33961
33967
  ..._stylex.props(customStyle),
33962
33968
  children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
33963
33969
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
33964
- ..._stylex.props(addMenuStyles.item, styles$h.fieldItem, styles$h.sticky),
33970
+ ..._stylex.props(addMenuStyles.item, styles$i.fieldItem, styles$i.sticky),
33965
33971
  "data-disabled": "true",
33966
33972
  children: group.name
33967
33973
  }), group.fields.map((field) => isFilterOperation && (field.kind === "dimension" || field.kind === "measure") ? /* @__PURE__ */ jsxRuntime.jsx(FilterPopover, {
@@ -33971,7 +33977,7 @@ function FieldList({
33971
33977
  anchor: /* @__PURE__ */ jsxRuntime.jsx("div", {
33972
33978
  role: "menuitem",
33973
33979
  tabIndex: -1,
33974
- ..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
33980
+ ..._stylex.props(addMenuStyles.item, styles$i.fieldItem),
33975
33981
  children: /* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, {
33976
33982
  asChild: true,
33977
33983
  children: /* @__PURE__ */ jsxRuntime.jsx(FieldToken, {
@@ -33998,7 +34004,7 @@ function FieldList({
33998
34004
  }, group.name + ":" + field.name) : /* @__PURE__ */ jsxRuntime.jsx("div", {
33999
34005
  role: "menuitem",
34000
34006
  tabIndex: -1,
34001
- ..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
34007
+ ..._stylex.props(addMenuStyles.item, styles$i.fieldItem),
34002
34008
  children: /* @__PURE__ */ jsxRuntime.jsx(FieldToken, {
34003
34009
  field,
34004
34010
  onClick: () => onAddOperation(field, group.path),
@@ -34021,7 +34027,7 @@ function FieldList({
34021
34027
  })
34022
34028
  });
34023
34029
  }
34024
- const styles$h = {
34030
+ const styles$i = {
34025
34031
  fieldItem: {
34026
34032
  height: "mly1qx5ct2",
34027
34033
  paddingTop: "mly1y1aw1k",
@@ -34050,7 +34056,7 @@ function FieldMenu({
34050
34056
  }) {
34051
34057
  const [search, setSearch] = React.useState("");
34052
34058
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
34053
- ..._stylex.props(addMenuStyles.content, styles$g.content),
34059
+ ..._stylex.props(addMenuStyles.content, styles$h.content),
34054
34060
  role: "menu",
34055
34061
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
34056
34062
  ..._stylex.props(addMenuStyles.item),
@@ -34076,7 +34082,7 @@ function FieldMenu({
34076
34082
  })]
34077
34083
  });
34078
34084
  }
34079
- const styles$g = {
34085
+ const styles$h = {
34080
34086
  content: {
34081
34087
  maxHeight: "mly3d5gib",
34082
34088
  $$css: true
@@ -34301,7 +34307,7 @@ function OperationActionTitle({
34301
34307
  return !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field);
34302
34308
  };
34303
34309
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
34304
- ..._stylex.props(styles$u.title, hoverStyles.main),
34310
+ ..._stylex.props(styles$v.title, hoverStyles.main),
34305
34311
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
34306
34312
  children: title
34307
34313
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -34472,7 +34478,7 @@ function SortableOperations({
34472
34478
  fields,
34473
34479
  ...props2
34474
34480
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
34475
- ..._stylex.props(styles$u.tokenContainer),
34481
+ ..._stylex.props(styles$v.tokenContainer),
34476
34482
  children: /* @__PURE__ */ jsxRuntime.jsx(DndContext, {
34477
34483
  sensors,
34478
34484
  collisionDetection: closestCenter,
@@ -34990,10 +34996,10 @@ function FilterOperations({
34990
34996
  }
34991
34997
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
34992
34998
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
34993
- ..._stylex.props(styles$u.title),
34999
+ ..._stylex.props(styles$v.title),
34994
35000
  children: "filter by"
34995
35001
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
34996
- ..._stylex.props(styles$u.tokenContainer),
35002
+ ..._stylex.props(styles$v.tokenContainer),
34997
35003
  children: filters.map((filterOperation, key2) => {
34998
35004
  return /* @__PURE__ */ jsxRuntime.jsx(ErrorElement, {
34999
35005
  fallback: /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -35080,7 +35086,7 @@ function LimitOperation({
35080
35086
  }
35081
35087
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
35082
35088
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
35083
- ..._stylex.props(styles$u.title),
35089
+ ..._stylex.props(styles$v.title),
35084
35090
  children: "limit"
35085
35091
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
35086
35092
  ..._stylex.props(hoverStyles.main),
@@ -35125,10 +35131,10 @@ function OrderByOperations({
35125
35131
  }
35126
35132
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
35127
35133
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
35128
- ..._stylex.props(styles$u.title),
35134
+ ..._stylex.props(styles$v.title),
35129
35135
  children: "order by"
35130
35136
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
35131
- ..._stylex.props(styles$u.tokenContainer),
35137
+ ..._stylex.props(styles$v.tokenContainer),
35132
35138
  children: orderBys.map((orderBy) => {
35133
35139
  const {
35134
35140
  fieldReference
@@ -35211,7 +35217,7 @@ function AddItem({
35211
35217
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
35212
35218
  role: "menuitem",
35213
35219
  tabIndex: -1,
35214
- ..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$f.open : null),
35220
+ ..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$g.open : null),
35215
35221
  onClick: doOnClick,
35216
35222
  "data-disabled": disabled ? "true" : void 0,
35217
35223
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -35235,7 +35241,7 @@ function AddItem({
35235
35241
  }) : null]
35236
35242
  });
35237
35243
  }
35238
- const styles$f = {
35244
+ const styles$g = {
35239
35245
  open: {
35240
35246
  background: "mly16o7sp0",
35241
35247
  backgroundAttachment: null,
@@ -35304,10 +35310,10 @@ function AddFieldItem({
35304
35310
  onAddOperation,
35305
35311
  isFilterOperation,
35306
35312
  search,
35307
- customStyle: styles$e.list
35313
+ customStyle: styles$f.list
35308
35314
  });
35309
35315
  }
35310
- const styles$e = {
35316
+ const styles$f = {
35311
35317
  list: {
35312
35318
  minWidth: "mly2ixbly",
35313
35319
  maxWidth: "mly1j9u4d2",
@@ -35492,7 +35498,7 @@ function AddMenu({
35492
35498
  value: search,
35493
35499
  onChange: setSearch,
35494
35500
  placeholder: "Search...",
35495
- customStyle: styles$d.search
35501
+ customStyle: styles$e.search
35496
35502
  })
35497
35503
  }), /* @__PURE__ */ jsxRuntime.jsx(Divider, {}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
35498
35504
  ...{
@@ -35606,7 +35612,7 @@ function AddMenu({
35606
35612
  })]
35607
35613
  });
35608
35614
  }
35609
- const styles$d = {
35615
+ const styles$e = {
35610
35616
  search: {
35611
35617
  width: "mlyh8yej3",
35612
35618
  $$css: true
@@ -35649,7 +35655,7 @@ function NestOperations({
35649
35655
  return null;
35650
35656
  }
35651
35657
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
35652
- ..._stylex.props(styles$u.tokenContainer),
35658
+ ..._stylex.props(styles$v.tokenContainer),
35653
35659
  children: nests.map((nest) => /* @__PURE__ */ jsxRuntime.jsx(NestOperation, {
35654
35660
  view,
35655
35661
  nest
@@ -35840,11 +35846,11 @@ function CollapsingView({
35840
35846
  })]
35841
35847
  }), !collapsed && /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
35842
35848
  viewInfo: viewDef.getViewInfo(),
35843
- style: styles$c.preview
35849
+ style: styles$d.preview
35844
35850
  })]
35845
35851
  });
35846
35852
  }
35847
- const styles$c = {
35853
+ const styles$d = {
35848
35854
  preview: {
35849
35855
  height: "mlyt7dq6l",
35850
35856
  maxHeight: "mly1hkcv85",
@@ -35965,9 +35971,9 @@ function Source({
35965
35971
  }) {
35966
35972
  if (definition instanceof malloyQueryBuilder.ASTArrowQueryDefinition) {
35967
35973
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
35968
- ..._stylex.props(styles$u.queryCard, styles$b.content),
35974
+ ..._stylex.props(styles$v.queryCard, styles$c.content),
35969
35975
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
35970
- ..._stylex.props(styles$u.labelWithIcon),
35976
+ ..._stylex.props(styles$v.labelWithIcon),
35971
35977
  children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
35972
35978
  name: "database"
35973
35979
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -35981,7 +35987,7 @@ function Source({
35981
35987
  }
35982
35988
  return null;
35983
35989
  }
35984
- const styles$b = {
35990
+ const styles$c = {
35985
35991
  content: {
35986
35992
  display: "mlyrvj5dj",
35987
35993
  gridAutoFlow: "mly1mt1orb",
@@ -36032,15 +36038,15 @@ function DateLiteralEditor({
36032
36038
  children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$2, {
36033
36039
  asChild: true,
36034
36040
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
36035
- ..._stylex.props(tokenStyles.main, styles$a.wrapper, customStyle),
36041
+ ..._stylex.props(tokenStyles.main, styles$b.wrapper, customStyle),
36036
36042
  children: /* @__PURE__ */ jsxRuntime.jsx(DateInput, {
36037
36043
  value: hooks.utc(date).toDate(),
36038
36044
  setValue: onSetValue,
36039
36045
  units,
36040
36046
  onFocus: () => setOpen(true),
36041
36047
  customStyle: {
36042
- ...styles$a.input,
36043
- ...isDate2 ? styles$a.dateInput : styles$a.timestampInput
36048
+ ...styles$b.input,
36049
+ ...isDate2 ? styles$b.dateInput : styles$b.timestampInput
36044
36050
  },
36045
36051
  forwardRef: input
36046
36052
  })
@@ -36056,14 +36062,14 @@ function DateLiteralEditor({
36056
36062
  setValue: onSetValue,
36057
36063
  units,
36058
36064
  maxLevel: units,
36059
- customStyle: styles$a.datePicker,
36065
+ customStyle: styles$b.datePicker,
36060
36066
  forwardRef: picker
36061
36067
  })
36062
36068
  })
36063
36069
  })]
36064
36070
  });
36065
36071
  }
36066
- const styles$a = {
36072
+ const styles$b = {
36067
36073
  input: {
36068
36074
  border: "mly1gs6z28",
36069
36075
  borderWidth: null,
@@ -36331,7 +36337,7 @@ function Parameters({
36331
36337
  children: sourceParameters.map((parameter) => {
36332
36338
  var _a2;
36333
36339
  return /* @__PURE__ */ jsxRuntime.jsxs(TokenGroup, {
36334
- customStyle: styles$9.tokenGroup,
36340
+ customStyle: styles$a.tokenGroup,
36335
36341
  children: [/* @__PURE__ */ jsxRuntime.jsx(Token, {
36336
36342
  icon: atomicTypeToIcon(parameter.type.kind),
36337
36343
  label: parameter.name
@@ -36350,7 +36356,7 @@ function Parameters({
36350
36356
  }
36351
36357
  return null;
36352
36358
  }
36353
- const styles$9 = {
36359
+ const styles$a = {
36354
36360
  tokenGroup: {
36355
36361
  display: "mly78zum5",
36356
36362
  $$css: true
@@ -36368,7 +36374,7 @@ function QueryEditor() {
36368
36374
  definition
36369
36375
  } = rootQuery;
36370
36376
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
36371
- ..._stylex.props(fontStyles.body, styles$8.main),
36377
+ ..._stylex.props(fontStyles.body, styles$9.main),
36372
36378
  children: [/* @__PURE__ */ jsxRuntime.jsx(Source, {
36373
36379
  definition
36374
36380
  }), /* @__PURE__ */ jsxRuntime.jsx(Parameters, {
@@ -36378,7 +36384,7 @@ function QueryEditor() {
36378
36384
  })]
36379
36385
  });
36380
36386
  }
36381
- const styles$8 = {
36387
+ const styles$9 = {
36382
36388
  main: {
36383
36389
  display: "mly78zum5",
36384
36390
  flexDirection: "mlydt5ytf",
@@ -36428,7 +36434,7 @@ function BookmarkedView({
36428
36434
  label: "view",
36429
36435
  icon: "view_filled",
36430
36436
  color: "purple",
36431
- customStyle: styles$7.viewBadge
36437
+ customStyle: styles$8.viewBadge
36432
36438
  }), /* @__PURE__ */ jsxRuntime.jsx(Button, {
36433
36439
  variant: "default",
36434
36440
  size: "compact",
@@ -36444,14 +36450,14 @@ function BookmarkedView({
36444
36450
  })]
36445
36451
  })]
36446
36452
  }),
36447
- customStyle: styles$7.card,
36453
+ customStyle: styles$8.card,
36448
36454
  children: /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
36449
36455
  viewInfo
36450
36456
  })
36451
36457
  })
36452
36458
  });
36453
36459
  }
36454
- const styles$7 = {
36460
+ const styles$8 = {
36455
36461
  viewBadge: {
36456
36462
  backgroundColor: "mlyjbqb8w",
36457
36463
  $$css: true
@@ -36474,7 +36480,7 @@ function EmptyQueryDisplay({
36474
36480
  className: "mly1bpp3o7 mly78zum5 mlydt5ytf mlyl56j7k mly6s0dn4"
36475
36481
  },
36476
36482
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
36477
- ..._stylex.props(styles$6.header, fontStyles.emphasized),
36483
+ ..._stylex.props(styles$7.header, fontStyles.emphasized),
36478
36484
  children: "Start with a Bookmarked View"
36479
36485
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
36480
36486
  ...{
@@ -36490,7 +36496,7 @@ function EmptyQueryDisplay({
36490
36496
  })
36491
36497
  });
36492
36498
  }
36493
- const styles$6 = {
36499
+ const styles$7 = {
36494
36500
  header: {
36495
36501
  paddingBottom: "mly1l90r2v",
36496
36502
  $$css: true
@@ -36684,7 +36690,7 @@ function RunInfoHover({
36684
36690
  children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$4, {
36685
36691
  asChild: true,
36686
36692
  children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
36687
- ..._stylex.props(styles$5.triggerContentContainer, fontStyles.body),
36693
+ ..._stylex.props(styles$6.triggerContentContainer, fontStyles.body),
36688
36694
  children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
36689
36695
  name: "info",
36690
36696
  color: "disabled"
@@ -36695,7 +36701,7 @@ function RunInfoHover({
36695
36701
  side: HOVER_SIDE,
36696
36702
  align: HOVER_ALIGN,
36697
36703
  children: /* @__PURE__ */ jsxRuntime.jsx(HoverCard, {
36698
- customStyle: styles$5.card,
36704
+ customStyle: styles$6.card,
36699
36705
  children: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
36700
36706
  children: [runInfo.customContent, (runInfo == null ? void 0 : runInfo.performanceAspects) && Object.entries(runInfo.performanceAspects).map(([aspect, properties2]) => {
36701
36707
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -36713,7 +36719,7 @@ function RunInfoHover({
36713
36719
  href: runInfo.queryLink.href,
36714
36720
  target: "_blank",
36715
36721
  rel: "noreferrer",
36716
- ..._stylex.props(styles$5.link, fontStyles.link),
36722
+ ..._stylex.props(styles$6.link, fontStyles.link),
36717
36723
  children: runInfo.queryLink.linkText
36718
36724
  })]
36719
36725
  })
@@ -36722,7 +36728,7 @@ function RunInfoHover({
36722
36728
  })]
36723
36729
  });
36724
36730
  }
36725
- const styles$5 = {
36731
+ const styles$6 = {
36726
36732
  card: {
36727
36733
  maxWidth: "mly1dc814f",
36728
36734
  $$css: true
@@ -36973,7 +36979,7 @@ function LoadingDisplay({
36973
36979
  },
36974
36980
  children: [/* @__PURE__ */ jsxRuntime.jsx(Spinner, {
36975
36981
  size: "large",
36976
- customStyle: styles$4.spinner
36982
+ customStyle: styles$5.spinner
36977
36983
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
36978
36984
  ..._stylex.props(fontStyles.emphasized),
36979
36985
  children: `${EXECUTION_STATES[executionState]} query...`
@@ -36997,7 +37003,7 @@ function useTimeElapsedMillis(queryResolutionStartMillis) {
36997
37003
  }, [queryResolutionStartMillis]);
36998
37004
  return time;
36999
37005
  }
37000
- const styles$4 = {
37006
+ const styles$5 = {
37001
37007
  spinner: {
37002
37008
  marginBottom: "mly1e56ztr",
37003
37009
  $$css: true
@@ -37066,6 +37072,383 @@ function CopyToClipboard({
37066
37072
  }
37067
37073
  });
37068
37074
  }
37075
+ class DataWriter {
37076
+ constructor(stream, result) {
37077
+ this.stream = stream;
37078
+ this.result = result;
37079
+ }
37080
+ }
37081
+ class JSONWriter extends DataWriter {
37082
+ async process(data) {
37083
+ this.stream.write("[\n");
37084
+ let first = true;
37085
+ for await (const row of data) {
37086
+ if (first) {
37087
+ first = false;
37088
+ } else {
37089
+ this.stream.write(",\n");
37090
+ }
37091
+ const json2 = JSON.stringify(toObject(this.result.schema.fields.filter((field) => field.kind === "dimension"), row.record_value), null, 2);
37092
+ const jsonLines = json2.split("\n");
37093
+ for (let i2 = 0; i2 < jsonLines.length; i2++) {
37094
+ const line = jsonLines[i2];
37095
+ this.stream.write(` ${line}`);
37096
+ if (i2 < jsonLines.length - 1) {
37097
+ this.stream.write("\n");
37098
+ }
37099
+ }
37100
+ }
37101
+ this.stream.write("\n]\n");
37102
+ this.stream.close();
37103
+ }
37104
+ }
37105
+ class CSVWriter extends DataWriter {
37106
+ constructor() {
37107
+ super(...arguments);
37108
+ this.columnSeparator = ",";
37109
+ this.rowSeparator = "\n";
37110
+ this.quoteCharacter = '"';
37111
+ this.includeHeader = true;
37112
+ this.emptyCell = "";
37113
+ }
37114
+ escape(value) {
37115
+ const hasInnerQuote = value.includes(this.quoteCharacter);
37116
+ const hasInnerCommas = value.includes(this.columnSeparator);
37117
+ const hasNewline = value.includes(this.rowSeparator);
37118
+ const needsQuoting = hasInnerCommas || hasInnerQuote || hasNewline;
37119
+ if (hasInnerQuote) {
37120
+ value = value.replace(new RegExp(this.quoteCharacter, "g"), this.quoteCharacter + this.quoteCharacter);
37121
+ }
37122
+ if (needsQuoting) {
37123
+ value = this.quoteCharacter + value + this.quoteCharacter;
37124
+ }
37125
+ return value;
37126
+ }
37127
+ // Re-using the old stringify method for sanity.
37128
+ stringify(value) {
37129
+ switch (value.kind) {
37130
+ case "string_cell":
37131
+ return this.escape(value.string_value);
37132
+ case "boolean_cell":
37133
+ return JSON.stringify(value.boolean_value);
37134
+ case "number_cell":
37135
+ return JSON.stringify(value.number_value);
37136
+ case "date_cell":
37137
+ return value.date_value;
37138
+ case "timestamp_cell":
37139
+ return value.timestamp_value;
37140
+ case "json_cell":
37141
+ return this.escape(value.json_value);
37142
+ case "null_cell":
37143
+ return this.emptyCell;
37144
+ case "sql_native_cell":
37145
+ return this.escape(value.sql_native_value);
37146
+ }
37147
+ return "";
37148
+ }
37149
+ // Extra weight to be added because of nested tables inside the cells.
37150
+ getColWeight(fields) {
37151
+ let numKeys = 0;
37152
+ for (const field of fields) {
37153
+ numKeys = numKeys + 1;
37154
+ if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
37155
+ const weight = this.getColWeight(field.type.element_type.fields) - 1;
37156
+ numKeys = numKeys + weight;
37157
+ }
37158
+ }
37159
+ return numKeys;
37160
+ }
37161
+ // Get header row along with extra empty spaces for nested children.
37162
+ getHeaderRow(fields) {
37163
+ const csv = [];
37164
+ let width = 0;
37165
+ for (const field of fields) {
37166
+ csv.push(this.escape(field.name));
37167
+ width++;
37168
+ if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
37169
+ const numKeys = this.getColWeight(field.type.element_type.fields) - 1;
37170
+ width = width + numKeys;
37171
+ for (let i2 = 0; i2 < numKeys; i2++) {
37172
+ csv.push(this.emptyCell);
37173
+ }
37174
+ }
37175
+ }
37176
+ return {
37177
+ rows: [csv.join(this.columnSeparator)],
37178
+ length: 1,
37179
+ width
37180
+ };
37181
+ }
37182
+ // Merge the child matrices i.e. merge the columns into one bigger matrix i.e. CSV.
37183
+ mergeMatrices(matrices) {
37184
+ const maxLength = Math.max(...matrices.map((matrix) => matrix.length));
37185
+ const matrixWidth = matrices.reduce((sum, matrix) => sum + matrix.width, 0);
37186
+ const csvMatrix = [];
37187
+ for (let i2 = 0; i2 < maxLength; i2++) {
37188
+ const csvRow = [];
37189
+ for (const matrix of matrices) {
37190
+ if (i2 < matrix.length) {
37191
+ csvRow.push(matrix.rows[i2]);
37192
+ } else {
37193
+ const emptyCells = Array(matrix.width).fill(this.emptyCell);
37194
+ csvRow.push(...emptyCells);
37195
+ }
37196
+ }
37197
+ csvMatrix.push(csvRow.join(this.columnSeparator));
37198
+ }
37199
+ return {
37200
+ rows: csvMatrix,
37201
+ length: maxLength,
37202
+ width: matrixWidth
37203
+ };
37204
+ }
37205
+ // Gets CSV for a data cell that has nested data.
37206
+ getChildMatrix(fields, value) {
37207
+ if (value.kind !== "array_cell") {
37208
+ return {
37209
+ rows: ["Invalid data found, value is not an array"],
37210
+ length: 1,
37211
+ width: 1
37212
+ };
37213
+ } else if (value.array_value.length === 0) {
37214
+ return {
37215
+ rows: [""],
37216
+ length: 1,
37217
+ width: 1
37218
+ };
37219
+ }
37220
+ const csvMatrix = [];
37221
+ const header = this.getHeaderRow(fields);
37222
+ csvMatrix.push(...header.rows);
37223
+ const width = header.width;
37224
+ let rowCount = 1;
37225
+ for (const row of value.array_value) {
37226
+ if (row.kind === "record_cell") {
37227
+ const rowMatrix = this.getRowMatrix(fields, row.record_value);
37228
+ rowCount = rowCount + rowMatrix.length;
37229
+ csvMatrix.push(...rowMatrix.rows);
37230
+ }
37231
+ }
37232
+ return {
37233
+ rows: csvMatrix,
37234
+ length: rowCount,
37235
+ width
37236
+ };
37237
+ }
37238
+ // Creates CSV content for one row of data.
37239
+ getRowMatrix(fields, row) {
37240
+ const matrices = [];
37241
+ for (let idx = 0; idx < fields.length; idx++) {
37242
+ const field = fields[idx];
37243
+ const val = row[idx];
37244
+ if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
37245
+ const cell = this.getChildMatrix(field.type.element_type.fields, val);
37246
+ matrices.push(cell);
37247
+ } else {
37248
+ const cell = {
37249
+ rows: [this.stringify(val)],
37250
+ length: 1,
37251
+ width: 1
37252
+ };
37253
+ matrices.push(cell);
37254
+ }
37255
+ }
37256
+ return this.mergeMatrices(matrices);
37257
+ }
37258
+ async process(data) {
37259
+ let headerDefined = false;
37260
+ for await (const row of data) {
37261
+ const fields = this.result.schema.fields.filter((field) => field.kind === "dimension");
37262
+ if (!headerDefined && this.includeHeader) {
37263
+ const header = this.getHeaderRow(fields);
37264
+ this.stream.write(header.rows[0]);
37265
+ this.stream.write(this.rowSeparator);
37266
+ headerDefined = true;
37267
+ }
37268
+ const rowCsv = this.getRowMatrix(fields, row.record_value);
37269
+ for (const line of rowCsv.rows) {
37270
+ this.stream.write(line);
37271
+ this.stream.write(this.rowSeparator);
37272
+ }
37273
+ }
37274
+ this.stream.close();
37275
+ }
37276
+ }
37277
+ function toObject(fields, data) {
37278
+ const result = {};
37279
+ for (let idx = 0; idx < fields.length; idx++) {
37280
+ const field = fields[idx];
37281
+ const value = data[idx];
37282
+ switch (value.kind) {
37283
+ case "string_cell":
37284
+ result[field.name] = value.string_value;
37285
+ break;
37286
+ case "boolean_cell":
37287
+ result[field.name] = value.boolean_value;
37288
+ break;
37289
+ case "date_cell":
37290
+ result[field.name] = value.date_value;
37291
+ break;
37292
+ case "timestamp_cell":
37293
+ result[field.name] = value.timestamp_value;
37294
+ break;
37295
+ case "number_cell":
37296
+ result[field.name] = value.number_value;
37297
+ break;
37298
+ case "json_cell":
37299
+ result[field.name] = value.json_value;
37300
+ break;
37301
+ case "record_cell":
37302
+ result[field.name] = toObject(fields, value.record_value);
37303
+ break;
37304
+ case "array_cell":
37305
+ if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
37306
+ const ary = [];
37307
+ for (const cell of value.array_value) {
37308
+ if (cell.kind === "record_cell") {
37309
+ ary.push(toObject(field.type.element_type.fields, cell.record_value));
37310
+ }
37311
+ }
37312
+ result[field.name] = ary;
37313
+ }
37314
+ break;
37315
+ case "null_cell":
37316
+ result[field.name] = null;
37317
+ break;
37318
+ case "sql_native_cell":
37319
+ result[field.name] = value.sql_native_value;
37320
+ break;
37321
+ }
37322
+ }
37323
+ return result;
37324
+ }
37325
+ async function* dataIterator(result) {
37326
+ var _a2;
37327
+ if (((_a2 = result.data) == null ? void 0 : _a2.kind) === "array_cell") {
37328
+ for (const row of result.data.array_value) {
37329
+ if (row.kind === "record_cell") {
37330
+ yield row;
37331
+ }
37332
+ }
37333
+ }
37334
+ }
37335
+ function DownloadButton({
37336
+ name = "malloy",
37337
+ result
37338
+ }) {
37339
+ const [href, setHref] = React.useState("");
37340
+ const [fileName, setFileName] = React.useState("");
37341
+ const [format2, _setFormat] = React.useState("csv");
37342
+ React.useEffect(() => {
37343
+ const createBlob = async () => {
37344
+ if (!result) {
37345
+ setHref("");
37346
+ return;
37347
+ }
37348
+ const writeStream = new MemoryWriteStream();
37349
+ let writer;
37350
+ let type;
37351
+ let fileName2;
37352
+ if (format2 === "json") {
37353
+ writer = new JSONWriter(writeStream, result);
37354
+ type = "text/json";
37355
+ fileName2 = `${name}.json`;
37356
+ } else {
37357
+ writer = new CSVWriter(writeStream, result);
37358
+ type = "text/csv";
37359
+ fileName2 = `${name}.csv`;
37360
+ }
37361
+ const rowStream = dataIterator(result);
37362
+ await writer.process(rowStream);
37363
+ writeStream.close();
37364
+ const data = writeStream.data;
37365
+ const blob = new Blob([data], {
37366
+ type
37367
+ });
37368
+ setHref(window.URL.createObjectURL(blob));
37369
+ setFileName(fileName2);
37370
+ };
37371
+ void createBlob();
37372
+ }, [name, format2, result]);
37373
+ React.useEffect(() => {
37374
+ return () => {
37375
+ if (href) {
37376
+ window.URL.revokeObjectURL(href);
37377
+ }
37378
+ };
37379
+ }, [href]);
37380
+ if (href) {
37381
+ return /* @__PURE__ */ jsxRuntime.jsxs("a", {
37382
+ href,
37383
+ download: fileName,
37384
+ ...props(styles$4.link, fontStyles.body),
37385
+ children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
37386
+ name: "download"
37387
+ }), /* @__PURE__ */ jsxRuntime.jsx("div", {
37388
+ children: "Download CSV"
37389
+ })]
37390
+ });
37391
+ } else {
37392
+ return null;
37393
+ }
37394
+ }
37395
+ class MemoryWriteStream {
37396
+ constructor() {
37397
+ this._data = [];
37398
+ }
37399
+ write(data) {
37400
+ this._data.push(data);
37401
+ }
37402
+ close() {
37403
+ }
37404
+ get data() {
37405
+ return this._data.join("");
37406
+ }
37407
+ }
37408
+ const styles$4 = {
37409
+ link: {
37410
+ display: "mly78zum5",
37411
+ alignContent: "mlyc26acl",
37412
+ gap: "mly167g77z",
37413
+ rowGap: null,
37414
+ columnGap: null,
37415
+ textDecoration: "mly1hl2dhg",
37416
+ textDecorationColor: null,
37417
+ textDecorationLine: null,
37418
+ textDecorationStyle: null,
37419
+ textDecorationThickness: null,
37420
+ background: "mly1md70p1 mly14hn1a8 mlywghvya",
37421
+ backgroundAttachment: null,
37422
+ backgroundClip: null,
37423
+ backgroundColor: null,
37424
+ backgroundImage: null,
37425
+ backgroundOrigin: null,
37426
+ backgroundPosition: null,
37427
+ backgroundPositionX: null,
37428
+ backgroundPositionY: null,
37429
+ backgroundRepeat: null,
37430
+ backgroundSize: null,
37431
+ borderRadius: "mlyur7f20",
37432
+ borderStartStartRadius: null,
37433
+ borderStartEndRadius: null,
37434
+ borderEndStartRadius: null,
37435
+ borderEndEndRadius: null,
37436
+ borderTopLeftRadius: null,
37437
+ borderTopRightRadius: null,
37438
+ borderBottomLeftRadius: null,
37439
+ borderBottomRightRadius: null,
37440
+ padding: "mlyfawy5m",
37441
+ paddingInline: null,
37442
+ paddingStart: null,
37443
+ paddingLeft: null,
37444
+ paddingEnd: null,
37445
+ paddingRight: null,
37446
+ paddingBlock: null,
37447
+ paddingTop: null,
37448
+ paddingBottom: null,
37449
+ $$css: true
37450
+ }
37451
+ };
37069
37452
  var Tab = /* @__PURE__ */ function(Tab2) {
37070
37453
  Tab2["RESULTS"] = "Results";
37071
37454
  Tab2["MALLOY"] = "Malloy";
@@ -37080,7 +37463,7 @@ function ResultPanel({
37080
37463
  submittedQuery,
37081
37464
  options
37082
37465
  }) {
37083
- var _a2, _b2, _c2;
37466
+ var _a2, _b2, _c2, _d;
37084
37467
  const [tab, setTab] = React.useState(Tab.MALLOY);
37085
37468
  const malloyText = (_a2 = useQueryBuilder(source, draftQuery)) == null ? void 0 : _a2.toMalloy();
37086
37469
  const views = source.schema.fields.filter((f2) => f2.kind === "view");
@@ -37138,6 +37521,8 @@ function ResultPanel({
37138
37521
  }), tab !== Tab.RESULTS && clipboardText && /* @__PURE__ */ jsxRuntime.jsx(CopyToClipboard, {
37139
37522
  text: clipboardText,
37140
37523
  label: "Copy Code"
37524
+ }), tab === Tab.RESULTS && /* @__PURE__ */ jsxRuntime.jsx(DownloadButton, {
37525
+ result: (_b2 = submittedQuery == null ? void 0 : submittedQuery.response) == null ? void 0 : _b2.result
37141
37526
  })]
37142
37527
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
37143
37528
  ...{
@@ -37187,7 +37572,7 @@ function ResultPanel({
37187
37572
  ...{
37188
37573
  className: "mlywp4ipm mlyh8yej3 mly5yr21d mly9f619"
37189
37574
  },
37190
- children: ((_c2 = (_b2 = submittedQuery == null ? void 0 : submittedQuery.response) == null ? void 0 : _b2.result) == null ? void 0 : _c2.sql) && /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, {
37575
+ children: ((_d = (_c2 = submittedQuery == null ? void 0 : submittedQuery.response) == null ? void 0 : _c2.result) == null ? void 0 : _d.sql) && /* @__PURE__ */ jsxRuntime.jsx(CodeBlock, {
37191
37576
  code: submittedQuery.response.result.sql,
37192
37577
  language: "sql"
37193
37578
  })
@@ -37443,7 +37828,7 @@ function useOperations(view, field, path) {
37443
37828
  const groupByDisabledReason = React.useMemo(() => {
37444
37829
  const segment = getSegmentIfPresent(view);
37445
37830
  if ((matchingFieldItem == null ? void 0 : matchingFieldItem.field.kind) !== "dimension") {
37446
- return "Grouping is only available on a dimenion.";
37831
+ return "Grouping is only available on a dimension.";
37447
37832
  }
37448
37833
  if (segment == null ? void 0 : segment.hasField(field.name, path)) {
37449
37834
  return "Cannot group by a field already in the view.";
@@ -37512,125 +37897,30 @@ function FieldTokenWithActions({
37512
37897
  path,
37513
37898
  viewDef
37514
37899
  }) {
37515
- const updateQuery = useUpdateQuery();
37516
37900
  const {
37517
37901
  focusedNestView
37518
37902
  } = useQueryFocus();
37903
+ const updateQuery = useUpdateQuery();
37519
37904
  const view = focusedNestView ?? viewDef;
37520
- const {
37521
- groupByDisabledReason,
37522
- aggregateDisabledReason,
37523
- filterDisabledReason,
37524
- orderByDisabledReason
37525
- } = useOperations(view, field, path);
37526
- const [isFilterPopoverOpen, setIsFilterPopoverOpen] = React.useState();
37905
+ const [isFilterPopoverOpen, setIsFilterPopoverOpen] = React.useState(false);
37527
37906
  const [isTooltipOpen, setIsTooltipOpen] = React.useState(false);
37528
- const handleAddOperationAction = (operation, filter) => {
37529
- if (field.kind === "dimension" || field.kind === "measure") {
37530
- if (operation === "groupBy" && !groupByDisabledReason) {
37531
- addGroupBy(view, field, path);
37532
- } else if (operation === "aggregate" && !aggregateDisabledReason) {
37533
- addAggregate(view, field, path);
37534
- } else if (operation === "orderBy" && !orderByDisabledReason) {
37535
- addOrderByFromSource(view, path, field.name);
37536
- } else if (operation === "filter" && !filterDisabledReason && filter) {
37537
- addFilter(view, field, path, filter);
37538
- }
37539
- updateQuery();
37540
- }
37541
- };
37542
- const handleSetView = () => {
37543
- if (field.kind === "view" && rootQuery.isEmpty()) {
37544
- rootQuery.setView(field.name);
37545
- updateQuery();
37546
- }
37547
- };
37548
- const handleAddView = () => {
37549
- if (field.kind === "view") {
37550
- addNest(view, field);
37551
- updateQuery();
37552
- }
37553
- };
37907
+ const showHover = isFilterPopoverOpen || isTooltipOpen;
37554
37908
  return /* @__PURE__ */ jsxRuntime.jsx(FieldToken, {
37555
37909
  field,
37556
- hoverActions: field.kind === "view" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
37557
- children: [/* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37558
- icon: "insert",
37559
- disabled: !rootQuery.isEmpty(),
37560
- onClick: handleSetView,
37561
- tooltip: !rootQuery.isEmpty() ? "Can only add a view to an empty query." : "Add view",
37562
- onTooltipOpenChange: setIsTooltipOpen
37563
- }), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37564
- icon: "nest",
37565
- onClick: handleAddView,
37566
- tooltip: "Add as new nested query",
37567
- onTooltipOpenChange: setIsTooltipOpen
37568
- })]
37569
- }) : field.kind === "measure" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
37570
- children: [/* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37571
- icon: "aggregate",
37572
- tooltip: aggregateDisabledReason || "Add as aggregate",
37573
- disabled: !!aggregateDisabledReason,
37574
- onClick: () => handleAddOperationAction("aggregate"),
37575
- onTooltipOpenChange: setIsTooltipOpen
37576
- }), /* @__PURE__ */ jsxRuntime.jsx(FilterPopover, {
37577
- fieldInfo: field,
37578
- path,
37579
- setFilter: (filter) => handleAddOperationAction("filter", filter),
37580
- trigger: /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37581
- icon: "filter",
37582
- tooltip: filterDisabledReason || "Add as filter",
37583
- disabled: !!filterDisabledReason,
37584
- onTooltipOpenChange: setIsTooltipOpen
37585
- }),
37586
- onOpenChange: setIsFilterPopoverOpen,
37587
- layoutProps: {
37588
- align: "start"
37589
- }
37590
- }), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37591
- icon: "orderBy",
37592
- tooltip: orderByDisabledReason || "Add as order by",
37593
- disabled: !!orderByDisabledReason,
37594
- onClick: () => handleAddOperationAction("orderBy"),
37595
- onTooltipOpenChange: setIsTooltipOpen
37596
- })]
37597
- }) : field.kind === "dimension" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
37598
- children: [/* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37599
- icon: "groupBy",
37600
- tooltip: groupByDisabledReason || "Add as group by",
37601
- disabled: !!groupByDisabledReason,
37602
- onClick: () => handleAddOperationAction("groupBy"),
37603
- onTooltipOpenChange: setIsTooltipOpen
37604
- }), /* @__PURE__ */ jsxRuntime.jsx(FilterPopover, {
37605
- fieldInfo: field,
37606
- path,
37607
- setFilter: (filter) => handleAddOperationAction("filter", filter),
37608
- trigger: /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37609
- icon: "filter",
37610
- tooltip: filterDisabledReason || "Add as filter",
37611
- disabled: !!filterDisabledReason,
37612
- onTooltipOpenChange: setIsTooltipOpen
37613
- }),
37614
- onOpenChange: setIsFilterPopoverOpen,
37615
- layoutProps: {
37616
- align: "start"
37617
- }
37618
- }), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
37619
- icon: "orderBy",
37620
- tooltip: orderByDisabledReason || "Add as order by",
37621
- disabled: !!orderByDisabledReason,
37622
- onClick: () => handleAddOperationAction("orderBy"),
37623
- onTooltipOpenChange: setIsTooltipOpen
37624
- })]
37625
- }) : null,
37626
- onClick: field.kind === "dimension" && !groupByDisabledReason ? () => handleAddOperationAction("groupBy") : field.kind === "measure" && !aggregateDisabledReason ? () => handleAddOperationAction("aggregate") : field.kind === "view" ? () => {
37627
- if (rootQuery.isEmpty()) {
37628
- handleSetView();
37629
- } else {
37630
- handleAddView();
37910
+ hoverActions: /* @__PURE__ */ jsxRuntime.jsx(QueryEditorActions, {
37911
+ rootQuery,
37912
+ field,
37913
+ view,
37914
+ path,
37915
+ setIsFilterPopoverOpen,
37916
+ setIsTooltipOpen
37917
+ }),
37918
+ onClick: () => {
37919
+ if (queryEditorClick(rootQuery, view, field, path)) {
37920
+ updateQuery();
37631
37921
  }
37632
- } : void 0,
37633
- hoverActionsVisible: isFilterPopoverOpen || isTooltipOpen,
37922
+ },
37923
+ hoverActionsVisible: showHover,
37634
37924
  tooltip: /* @__PURE__ */ jsxRuntime.jsx(FieldHoverCard, {
37635
37925
  field,
37636
37926
  path
@@ -37666,6 +37956,143 @@ function ActionButton({
37666
37956
  })]
37667
37957
  });
37668
37958
  }
37959
+ function QueryEditorActions({
37960
+ rootQuery,
37961
+ view,
37962
+ field,
37963
+ path,
37964
+ setIsTooltipOpen,
37965
+ setIsFilterPopoverOpen
37966
+ }) {
37967
+ const updateQuery = useUpdateQuery();
37968
+ const {
37969
+ groupByDisabledReason,
37970
+ aggregateDisabledReason,
37971
+ filterDisabledReason,
37972
+ orderByDisabledReason
37973
+ } = useOperations(view, field, path);
37974
+ const handleAddOperationAction = (operation, filter) => {
37975
+ if (field.kind === "dimension" || field.kind === "measure") {
37976
+ if (operation === "groupBy" && !groupByDisabledReason) {
37977
+ addGroupBy(view, field, path);
37978
+ } else if (operation === "aggregate" && !aggregateDisabledReason) {
37979
+ addAggregate(view, field, path);
37980
+ } else if (operation === "orderBy" && !orderByDisabledReason) {
37981
+ addOrderByFromSource(view, path, field.name);
37982
+ } else if (operation === "filter" && !filterDisabledReason && filter) {
37983
+ addFilter(view, field, path, filter);
37984
+ }
37985
+ updateQuery();
37986
+ }
37987
+ };
37988
+ const handleSetView = () => {
37989
+ if (field.kind === "view" && rootQuery.isEmpty()) {
37990
+ rootQuery.setView(field.name);
37991
+ updateQuery();
37992
+ }
37993
+ };
37994
+ const handleAddView = () => {
37995
+ if (field.kind === "view") {
37996
+ addNest(view, field);
37997
+ updateQuery();
37998
+ }
37999
+ };
38000
+ return field.kind === "view" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
38001
+ children: [/* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38002
+ icon: "insert",
38003
+ disabled: !rootQuery.isEmpty(),
38004
+ onClick: handleSetView,
38005
+ tooltip: !rootQuery.isEmpty() ? "Can only add a view to an empty query." : "Add view",
38006
+ onTooltipOpenChange: setIsTooltipOpen
38007
+ }), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38008
+ icon: "nest",
38009
+ onClick: handleAddView,
38010
+ tooltip: "Add as new nested query",
38011
+ onTooltipOpenChange: setIsTooltipOpen
38012
+ })]
38013
+ }) : field.kind === "measure" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
38014
+ children: [/* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38015
+ icon: "aggregate",
38016
+ tooltip: aggregateDisabledReason || "Add as aggregate",
38017
+ disabled: !!aggregateDisabledReason,
38018
+ onClick: () => handleAddOperationAction("aggregate"),
38019
+ onTooltipOpenChange: setIsTooltipOpen
38020
+ }), /* @__PURE__ */ jsxRuntime.jsx(FilterPopover, {
38021
+ fieldInfo: field,
38022
+ path,
38023
+ setFilter: (filter) => handleAddOperationAction("filter", filter),
38024
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38025
+ icon: "filter",
38026
+ tooltip: filterDisabledReason || "Add as filter",
38027
+ disabled: !!filterDisabledReason,
38028
+ onTooltipOpenChange: setIsTooltipOpen
38029
+ }),
38030
+ onOpenChange: setIsFilterPopoverOpen,
38031
+ layoutProps: {
38032
+ align: "start"
38033
+ }
38034
+ }), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38035
+ icon: "orderBy",
38036
+ tooltip: orderByDisabledReason || "Add as order by",
38037
+ disabled: !!orderByDisabledReason,
38038
+ onClick: () => handleAddOperationAction("orderBy"),
38039
+ onTooltipOpenChange: setIsTooltipOpen
38040
+ })]
38041
+ }) : field.kind === "dimension" ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
38042
+ children: [/* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38043
+ icon: "groupBy",
38044
+ tooltip: groupByDisabledReason || "Add as group by",
38045
+ disabled: !!groupByDisabledReason,
38046
+ onClick: () => handleAddOperationAction("groupBy"),
38047
+ onTooltipOpenChange: setIsTooltipOpen
38048
+ }), /* @__PURE__ */ jsxRuntime.jsx(FilterPopover, {
38049
+ fieldInfo: field,
38050
+ path,
38051
+ setFilter: (filter) => handleAddOperationAction("filter", filter),
38052
+ trigger: /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38053
+ icon: "filter",
38054
+ tooltip: filterDisabledReason || "Add as filter",
38055
+ disabled: !!filterDisabledReason,
38056
+ onTooltipOpenChange: setIsTooltipOpen
38057
+ }),
38058
+ onOpenChange: setIsFilterPopoverOpen,
38059
+ layoutProps: {
38060
+ align: "start"
38061
+ }
38062
+ }), /* @__PURE__ */ jsxRuntime.jsx(ActionButton, {
38063
+ icon: "orderBy",
38064
+ tooltip: orderByDisabledReason || "Add as order by",
38065
+ disabled: !!orderByDisabledReason,
38066
+ onClick: () => handleAddOperationAction("orderBy"),
38067
+ onTooltipOpenChange: setIsTooltipOpen
38068
+ })]
38069
+ }) : null;
38070
+ }
38071
+ function queryEditorClick(rootQuery, view, field, path) {
38072
+ const segment = getSegmentIfPresent(view);
38073
+ if (field.kind === "dimension") {
38074
+ if (!(segment == null ? void 0 : segment.hasField(field.name, path))) {
38075
+ addGroupBy(view, field, path);
38076
+ } else {
38077
+ return false;
38078
+ }
38079
+ } else if (field.kind === "measure") {
38080
+ if (!(segment == null ? void 0 : segment.hasField(field.name, path))) {
38081
+ addAggregate(view, field, path);
38082
+ } else {
38083
+ return false;
38084
+ }
38085
+ } else if (field.kind === "view") {
38086
+ if (rootQuery.isEmpty()) {
38087
+ rootQuery.setView(field.name);
38088
+ } else {
38089
+ addNest(view, field);
38090
+ }
38091
+ } else {
38092
+ return false;
38093
+ }
38094
+ return true;
38095
+ }
37669
38096
  const FIELD_KIND_ORDER = ["dimension", "measure", "view"];
37670
38097
  function SearchResultList({
37671
38098
  rootQuery,