@malloydata/malloy-explorer 0.0.266-dev250425232629 → 0.0.269-dev250430213122

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.
Files changed (39) hide show
  1. package/@flowtypes/components/ResizableCollapsiblePanel.flow.js +14 -0
  2. package/@flowtypes/components/ResultPanel/SubmittedQuery.flow.js +1 -0
  3. package/@flowtypes/index.flow.js +1 -1
  4. package/dist/cjs/index.cjs +732 -524
  5. package/dist/cjs/index.cjs.map +1 -1
  6. package/dist/esm/index.js +733 -525
  7. package/dist/esm/index.js.map +1 -1
  8. package/dist/malloy-explorer.css +13 -5
  9. package/dist/types/components/CollapsedPagePanel.d.ts +8 -0
  10. package/dist/types/components/QueryPanel/AddMenu/AddAggregate.d.ts +2 -1
  11. package/dist/types/components/QueryPanel/AddMenu/AddFieldItem.d.ts +2 -1
  12. package/dist/types/components/QueryPanel/AddMenu/AddGroupBy.d.ts +2 -1
  13. package/dist/types/components/QueryPanel/AddMenu/AddItem.d.ts +2 -1
  14. package/dist/types/components/QueryPanel/AddMenu/AddOrderBy.d.ts +2 -1
  15. package/dist/types/components/QueryPanel/AddMenu/AddView.d.ts +2 -1
  16. package/dist/types/components/QueryPanel/AddMenu/AddWhere.d.ts +2 -1
  17. package/dist/types/components/QueryPanel/AddMenu/FieldList.d.ts +4 -2
  18. package/dist/types/components/QueryPanel/AddMenu/colors.stylex.d.ts +2 -0
  19. package/dist/types/components/QueryPanel/AddMenu/styles.d.ts +1 -0
  20. package/dist/types/components/QueryPanel/operations/NestOperation.d.ts +6 -0
  21. package/dist/types/components/ResizableCollapsiblePanel.d.ts +30 -0
  22. package/dist/types/components/ResultPanel/SubmittedQuery.d.ts +1 -0
  23. package/dist/types/components/SourcePanel/FieldGroupList.d.ts +4 -4
  24. package/dist/types/components/primitives/index.d.ts +5 -3
  25. package/dist/types/components/primitives/lists/AccordionList.d.ts +20 -0
  26. package/dist/types/components/primitives/lists/AccordionListContext.d.ts +7 -0
  27. package/dist/types/components/primitives/lists/AccordionListItem.d.ts +32 -0
  28. package/dist/types/components/primitives/utils/icon.d.ts +6 -0
  29. package/dist/types/components/styles.d.ts +1 -0
  30. package/dist/types/components/utils/fields.d.ts +1 -1
  31. package/dist/types/contexts/ResizableCollapsiblePanelContext.d.ts +16 -0
  32. package/dist/types/index.d.ts +1 -1
  33. package/package.json +6 -6
  34. package/scripts/gen_flow.ts +1 -1
  35. package/@flowtypes/contexts/ExplorerPanelsContext.flow.js +0 -6
  36. package/dist/types/contexts/ExplorerPanelsContext.d.ts +0 -11
  37. /package/dist/types/components/primitives/{CollapsibleListItem.d.ts → lists/CollapsibleListItem.d.ts} +0 -0
  38. /package/dist/types/components/primitives/{List.d.ts → lists/List.d.ts} +0 -0
  39. /package/dist/types/components/primitives/{ListItem.d.ts → lists/ListItem.d.ts} +0 -0
package/dist/esm/index.js CHANGED
@@ -13,11 +13,11 @@ var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "
13
13
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
14
14
  var __superGet = (cls, obj, key2) => __reflectGet(__getProtoOf(cls), key2, obj);
15
15
  var _a, _b, _captureMap, _compiled, _pattern, _nameMap, _strategy, __EmulatedRegExp_instances, execCore_fn, _c;
16
+ import { jsx, Fragment, jsxs } from "react/jsx-runtime";
16
17
  import * as React from "react";
17
18
  import React__default, { useLayoutEffect, useEffect, useMemo, useState, useRef, createElement, useContext, useCallback, createContext, memo, useReducer } from "react";
18
- import { jsx, Fragment, jsxs } from "react/jsx-runtime";
19
19
  import * as QB from "@malloydata/malloy-query-builder";
20
- import { ASTArrowQueryDefinition, ASTSegmentViewDefinition, ASTRefinementViewDefinition, ASTLimitViewOperation, ASTOrderByViewOperation, ASTNestViewOperation, ASTAggregateViewOperation, ASTGroupByViewOperation, ASTWhereViewOperation, ASTHavingViewOperation, ASTArrowViewDefinition } from "@malloydata/malloy-query-builder";
20
+ import { ASTArrowQueryDefinition, ASTSegmentViewDefinition, ASTRefinementViewDefinition, ASTLimitViewOperation, ASTNestViewOperation, ASTOrderByViewOperation, ASTAggregateViewOperation, ASTGroupByViewOperation, ASTWhereViewOperation, ASTHavingViewOperation, ASTArrowViewDefinition } from "@malloydata/malloy-query-builder";
21
21
  import { Tag } from "@malloydata/malloy-tag";
22
22
  import * as render from "@malloydata/render";
23
23
  import "@malloydata/render/webcomponent";
@@ -3710,6 +3710,7 @@ const SvgInfo = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns:
3710
3710
  const SvgError = (props2) => /* @__PURE__ */ React.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z" }));
3711
3711
  const SvgRefresh = (props2) => /* @__PURE__ */ React.createElement("svg", { height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React.createElement("g", { fill: "none", stroke: "currentColor" }, /* @__PURE__ */ React.createElement("path", { d: "m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42", strokeWidth: 1.1 }), /* @__PURE__ */ React.createElement("path", { d: "m9.9 2 2.89 2.89-3 3.01" })));
3712
3712
  const SvgSidebarCollapse = (props2) => /* @__PURE__ */ React.createElement("svg", { height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", stroke: "none", ...props2 }, /* @__PURE__ */ React.createElement("path", { fill: "currentColor", stroke: "none", d: "m20 24h-16c-2.2 0-4-1.8-4-4v-16c0-2.2 1.8-4 4-4h16c2.2 0 4 1.8 4 4v16c0 2.2-1.8 4-4 4zm-16-22c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2z" }), /* @__PURE__ */ React.createElement("path", { fill: "currentColor", d: "m8 24c-.6 0-1-.4-1-1v-22c0-.6.4-1 1-1s1 .4 1 1v22c0 .6-.4 1-1 1z" }), /* @__PURE__ */ React.createElement("path", { fill: "currentColor", d: "m14 13c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l3-3c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-3 3c-.2.2-.4.3-.7.3z" }), /* @__PURE__ */ React.createElement("path", { fill: "currentColor", d: "m17 16c-.3 0-.5-.1-.7-.3l-3-3c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l3 3c.4.4.4 1 0 1.4-.2.2-.4.3-.7.3z" }));
3713
+ const SvgFilterSliders = (props2) => /* @__PURE__ */ React.createElement("svg", { fill: "none", height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React.createElement("path", { d: "m11 8h10m-10 0c0 1.65685-1.34315 3-3 3s-3-1.34315-3-3m6 0c0-1.65685-1.34315-3-3-3s-3 1.34315-3 3m0 0h-2m10 8h-10m10 0c0-1.6569 1.3431-3 3-3s3 1.3431 3 3m-6 0c0 1.6569 1.3431 3 3 3s3-1.3431 3-3m0 0h2", stroke: "currentColor", strokeWidth: 1.5 }));
3713
3714
  const SvgVizBarChart = (props2) => /* @__PURE__ */ React.createElement("svg", { width: "110px", height: "110px", viewBox: "0 0 110 110", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", ...props2 }, /* @__PURE__ */ React.createElement("g", { id: "viz_bar_chart", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("g", { id: "Group-3", transform: "translate(20.000000, 24.000000)", fill: "currentColor" }, /* @__PURE__ */ React.createElement("g", { id: "Group-2", transform: "translate(34.500000, 31.000000) rotate(-270.000000) translate(-34.500000, -31.000000) translate(3.500000, -3.500000)" }, /* @__PURE__ */ React.createElement("path", { d: "M-26.056314,30.056314 L34.943686,30.056314 C37.152825,30.056314 38.943686,31.847175 38.943686,34.056314 L38.943686,34.943686 C38.943686,37.152825 37.152825,38.943686 34.943686,38.943686 L-26.056314,38.943686 C-28.265453,38.943686 -30.056314,37.152825 -30.056314,34.943686 L-30.056314,34.056314 C-30.056314,31.847175 -28.265453,30.056314 -26.056314,30.056314 Z", id: "Rectangle-Copy-59", transform: "translate(4.443686, 34.500000) rotate(-90.000000) translate(-4.443686, -34.500000) " }), /* @__PURE__ */ React.createElement("path", { d: "M-0.491247385,37.8466366 L44.9281075,37.8466366 C47.1372465,37.8466366 48.9281075,39.6374976 48.9281075,41.8466366 L48.9281075,42.7340086 C48.9281075,44.9431476 47.1372465,46.7340086 44.9281075,46.7340086 L-0.491247385,46.7340086 C-2.70038638,46.7340086 -4.49124739,44.9431476 -4.49124739,42.7340086 L-4.49124739,41.8466366 C-4.49124739,39.6374976 -2.70038638,37.8466366 -0.491247385,37.8466366 Z", id: "Rectangle-Copy-62", transform: "translate(22.218430, 42.290323) rotate(-90.000000) translate(-22.218430, -42.290323) " }), /* @__PURE__ */ React.createElement("path", { d: "M23.3837854,43.9469253 L56.6025627,43.9469253 C58.8117017,43.9469253 60.6025627,45.7377863 60.6025627,47.9469253 L60.6025627,48.8342973 C60.6025627,51.0434363 58.8117017,52.8342973 56.6025627,52.8342973 L23.3837854,52.8342973 C21.1746464,52.8342973 19.3837854,51.0434363 19.3837854,48.8342973 L19.3837854,47.9469253 C19.3837854,45.7377863 21.1746464,43.9469253 23.3837854,43.9469253 Z", id: "Rectangle-Copy-66", transform: "translate(39.993174, 48.390611) rotate(-90.000000) translate(-39.993174, -48.390611) " }), /* @__PURE__ */ React.createElement("path", { d: "M46.7286345,49.7286345 L68.8072017,49.7286345 C71.0163407,49.7286345 72.8072017,51.5194955 72.8072017,53.7286345 L72.8072017,54.1927983 C72.8072017,56.4019373 71.0163407,58.1927983 68.8072017,58.1927983 L46.7286345,58.1927983 C44.5194955,58.1927983 42.7286345,56.4019373 42.7286345,54.1927983 L42.7286345,53.7286345 C42.7286345,51.5194955 44.5194955,49.7286345 46.7286345,49.7286345 Z", id: "Rectangle-Copy-67", transform: "translate(57.767918, 53.960716) rotate(-90.000000) translate(-57.767918, -53.960716) " })))));
3714
3715
  const SvgVizBoolean = (props2) => /* @__PURE__ */ React.createElement("svg", { width: "110px", height: "110px", viewBox: "0 0 110 110", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", ...props2 }, /* @__PURE__ */ React.createElement("g", { id: "viz_boolean", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("g", { id: "noun_switch_3350414-2", transform: "translate(20.000000, 22.000000)", fill: "currentColor", fillRule: "nonzero" }, /* @__PURE__ */ React.createElement("g", { id: "noun_switch_3350414" }, /* @__PURE__ */ React.createElement("path", { d: "M15.2972028,30.8 L54.7027972,30.8 C63.151209,30.8 70,23.9051851 70,15.4 C70,6.89481485 63.151209,0 54.7027972,0 L15.2972028,0 C6.84879098,0 0,6.89481485 0,15.4 C0,23.9051851 6.84879098,30.8 15.2972028,30.8 Z M15.2972028,6.16 L54.7027972,6.16 C59.7718443,6.16 63.8811189,10.2968889 63.8811189,15.4 C63.8811189,20.5031111 59.7718443,24.64 54.7027972,24.64 L15.2972028,24.64 C10.2281557,24.64 6.11888112,20.5031111 6.11888112,15.4 C6.11888112,10.2968889 10.2281557,6.16 15.2972028,6.16 Z", id: "Shape" }), /* @__PURE__ */ React.createElement("path", { d: "M19.6340542,21.9997804 C22.2930484,22.0215224 24.7022661,20.4273668 25.7348338,17.9629544 C26.7674016,15.4985421 26.2191958,12.6510518 24.3466309,10.7523518 C22.474066,8.85365189 19.6473211,8.27908795 17.1885612,9.29740315 C14.7298014,10.3157183 13.125,12.7256064 13.125,15.3998806 C13.125,19.0240523 16.0305897,21.9703156 19.6340542,21.9997804 L19.6340542,21.9997804 Z", id: "Path" }), /* @__PURE__ */ React.createElement("path", { d: "M54.7027971,35.2 L15.2972025,35.2 C6.84879081,35.2 0,42.094815 0,50.6 C0,59.105185 6.84879081,66 15.2972025,66 L54.7027971,66 C63.151209,66 70,59.1051851 70,50.6 C70,42.0948149 63.151209,35.2 54.7027971,35.2 L54.7027971,35.2 Z M54.7027971,59.84 L15.2972025,59.84 C10.2281554,59.84 6.11888082,55.7031111 6.11888082,50.6 C6.11888082,45.4968889 10.2281554,41.36 15.2972025,41.36 L54.7027971,41.36 C59.7718442,41.36 63.8811189,45.4968889 63.8811189,50.6 C63.8811189,55.7031111 59.7718442,59.84 54.7027971,59.84 L54.7027971,59.84 Z", id: "Shape" }), /* @__PURE__ */ React.createElement("path", { d: "M50.3659458,44.0002196 C47.7069516,43.9784776 45.2977339,45.5726332 44.2651662,48.0370456 C43.2325984,50.5014579 43.7808042,53.3489482 45.6533691,55.2476482 C47.525934,57.1463481 50.3526789,57.720912 52.8114388,56.7025969 C55.2701986,55.6842817 56.875,53.2743936 56.875,50.6001194 C56.875,46.9759477 53.9694103,44.0296844 50.3659458,44.0002196 Z", id: "Path" })))));
3715
3716
  const SvgVizColumnChart = (props2) => /* @__PURE__ */ React.createElement("svg", { width: "110px", height: "110px", viewBox: "0 0 110 110", xmlns: "http://www.w3.org/2000/svg", xmlnsXlink: "http://www.w3.org/1999/xlink", ...props2 }, /* @__PURE__ */ React.createElement("g", { id: "viz_column_chart", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React.createElement("g", { id: "Group", transform: "translate(23.500000, 19.500000)", fill: "currentColor" }, /* @__PURE__ */ React.createElement("path", { d: "M-26.5,30.5 L35.5,30.5 C37.709139,30.5 39.5,32.290861 39.5,34.5 L39.5,35.5 C39.5,37.709139 37.709139,39.5 35.5,39.5 L-26.5,39.5 C-28.709139,39.5 -30.5,37.709139 -30.5,35.5 L-30.5,34.5 C-30.5,32.290861 -28.709139,30.5 -26.5,30.5 Z", id: "Rectangle-Copy-59", transform: "translate(4.500000, 35.000000) rotate(-90.000000) translate(-4.500000, -35.000000) " }), /* @__PURE__ */ React.createElement("path", { d: "M-0.5,38.5 L45.5,38.5 C47.709139,38.5 49.5,40.290861 49.5,42.5 L49.5,43.5 C49.5,45.709139 47.709139,47.5 45.5,47.5 L-0.5,47.5 C-2.709139,47.5 -4.5,45.709139 -4.5,43.5 L-4.5,42.5 C-4.5,40.290861 -2.709139,38.5 -0.5,38.5 Z", id: "Rectangle-Copy-62", transform: "translate(22.500000, 43.000000) rotate(-90.000000) translate(-22.500000, -43.000000) " }), /* @__PURE__ */ React.createElement("path", { d: "M23.5,45.5 L57.5,45.5 C59.709139,45.5 61.5,47.290861 61.5,49.5 L61.5,50.5 C61.5,52.709139 59.709139,54.5 57.5,54.5 L23.5,54.5 C21.290861,54.5 19.5,52.709139 19.5,50.5 L19.5,49.5 C19.5,47.290861 21.290861,45.5 23.5,45.5 Z", id: "Rectangle-Copy-66", transform: "translate(40.500000, 50.000000) rotate(-90.000000) translate(-40.500000, -50.000000) " }), /* @__PURE__ */ React.createElement("path", { d: "M47.5,50.5 L70.5,50.5 C72.709139,50.5 74.5,52.290861 74.5,54.5 L74.5,55.5 C74.5,57.709139 72.709139,59.5 70.5,59.5 L47.5,59.5 C45.290861,59.5 43.5,57.709139 43.5,55.5 L43.5,54.5 C43.5,52.290861 45.290861,50.5 47.5,50.5 Z", id: "Rectangle-Copy-67", transform: "translate(59.000000, 55.000000) rotate(-90.000000) translate(-59.000000, -55.000000) " }))));
@@ -3749,6 +3750,7 @@ const ICON_MAP = {
3749
3750
  error: SvgError,
3750
3751
  refresh: SvgRefresh,
3751
3752
  sidebarCollapse: SvgSidebarCollapse,
3753
+ filterSliders: SvgFilterSliders,
3752
3754
  // Operations
3753
3755
  aggregate: SvgInsertMeasure,
3754
3756
  dimension: SvgTypeIconString,
@@ -3815,10 +3817,10 @@ function Icon({
3815
3817
  return null;
3816
3818
  }
3817
3819
  return /* @__PURE__ */ jsx(IconComponent, {
3818
- ..._stylex.props(styles$I.main, colorVariants$3[color], SMALL_ICONS.includes(name) && styles$I.scaleUp, customStyle)
3820
+ ..._stylex.props(styles$M.main, colorVariants$3[color], SMALL_ICONS.includes(name) && styles$M.scaleUp, customStyle)
3819
3821
  });
3820
3822
  }
3821
- const styles$I = {
3823
+ const styles$M = {
3822
3824
  main: {
3823
3825
  display: "mly1rg5ohu",
3824
3826
  width: "mly1kky2od",
@@ -3891,17 +3893,17 @@ function Badge({
3891
3893
  customStyle
3892
3894
  }) {
3893
3895
  return /* @__PURE__ */ jsxs("div", {
3894
- ..._stylex.props(styles$H.main, colorVariants$2[color], customStyle),
3896
+ ..._stylex.props(styles$L.main, colorVariants$2[color], customStyle),
3895
3897
  children: [icon && /* @__PURE__ */ jsx(Icon, {
3896
3898
  color,
3897
3899
  name: icon
3898
3900
  }), /* @__PURE__ */ jsx("div", {
3899
- ..._stylex.props(fontStyles.badge, styles$H.label),
3901
+ ..._stylex.props(fontStyles.badge, styles$L.label),
3900
3902
  children: label
3901
3903
  })]
3902
3904
  });
3903
3905
  }
3904
- const styles$H = {
3906
+ const styles$L = {
3905
3907
  main: {
3906
3908
  display: "mly3nfvp2",
3907
3909
  height: "mly1qx5ct2",
@@ -3983,10 +3985,10 @@ function Divider({
3983
3985
  customStyle
3984
3986
  }) {
3985
3987
  return /* @__PURE__ */ jsx("div", {
3986
- ..._stylex.props(styles$G.main, orientationVariants[orientation], customStyle)
3988
+ ..._stylex.props(styles$K.main, orientationVariants[orientation], customStyle)
3987
3989
  });
3988
3990
  }
3989
- const styles$G = {
3991
+ const styles$K = {
3990
3992
  main: {
3991
3993
  background: "mly1xnbgy5",
3992
3994
  backgroundAttachment: null,
@@ -4024,36 +4026,6 @@ function List$1({
4024
4026
  children: React.Children.map(children, (child) => child)
4025
4027
  });
4026
4028
  }
4027
- function ListItem({
4028
- label,
4029
- startIcon,
4030
- badge,
4031
- endIcon,
4032
- onClick
4033
- }) {
4034
- return /* @__PURE__ */ jsxs("div", {
4035
- ...{
4036
- className: "mly78zum5 mly6s0dn4 mlyl56j7k mlye8ttls mly167g77z mlyur7f20 mly1ypdohk mly1haqvef"
4037
- },
4038
- onClick,
4039
- children: [startIcon && /* @__PURE__ */ jsx(Fragment, {
4040
- children: startIcon
4041
- }), /* @__PURE__ */ jsx("span", {
4042
- ..._stylex.props(fontStyles.body, styles$F.label),
4043
- children: label
4044
- }), badge && /* @__PURE__ */ jsx(Fragment, {
4045
- children: badge
4046
- }), endIcon && /* @__PURE__ */ jsx(Fragment, {
4047
- children: endIcon
4048
- })]
4049
- });
4050
- }
4051
- const styles$F = {
4052
- label: {
4053
- flexGrow: "mly1iyjqo2",
4054
- $$css: true
4055
- }
4056
- };
4057
4029
  var DirectionContext = React.createContext(void 0);
4058
4030
  function useDirection(localDir) {
4059
4031
  const globalDir = React.useContext(DirectionContext);
@@ -4823,7 +4795,7 @@ function Button({
4823
4795
  ...props2
4824
4796
  }) {
4825
4797
  const button = /* @__PURE__ */ jsxs("button", {
4826
- ..._stylex.props(styles$E.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
4798
+ ..._stylex.props(styles$J.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
4827
4799
  ...onClick && {
4828
4800
  onClick: (e) => {
4829
4801
  e.preventDefault();
@@ -4839,9 +4811,9 @@ function Button({
4839
4811
  },
4840
4812
  children: [icon && /* @__PURE__ */ jsx(Icon, {
4841
4813
  name: icon,
4842
- customStyle: styles$E.icon
4814
+ customStyle: styles$J.icon
4843
4815
  }), label && /* @__PURE__ */ jsx("div", {
4844
- ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$E.label),
4816
+ ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$J.label),
4845
4817
  children: label
4846
4818
  })]
4847
4819
  }), isDisabled && /* @__PURE__ */ jsx("div", {
@@ -4868,7 +4840,7 @@ function Button({
4868
4840
  return button;
4869
4841
  }
4870
4842
  }
4871
- const styles$E = {
4843
+ const styles$J = {
4872
4844
  main: {
4873
4845
  display: "mly3nfvp2",
4874
4846
  flexDirection: "mlydt5ytf",
@@ -5119,7 +5091,7 @@ function Token({
5119
5091
  }) {
5120
5092
  const isInteractive = onClick !== void 0 || asButtonTrigger;
5121
5093
  const token2 = /* @__PURE__ */ jsxs("div", {
5122
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$D.nonInteractive, customStyle),
5094
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$I.nonInteractive, customStyle),
5123
5095
  ...dragProps == null ? void 0 : dragProps.attributes,
5124
5096
  ...dragProps == null ? void 0 : dragProps.listeners,
5125
5097
  children: [icon && /* @__PURE__ */ jsx(Icon, {
@@ -5156,7 +5128,7 @@ function Token({
5156
5128
  })]
5157
5129
  }) : token2;
5158
5130
  }
5159
- const styles$D = {
5131
+ const styles$I = {
5160
5132
  nonInteractive: {
5161
5133
  cursor: "mlyt0e3qv",
5162
5134
  background: "mly1np9qvj",
@@ -5180,7 +5152,7 @@ function TokenGroup({
5180
5152
  }) {
5181
5153
  const count2 = React.Children.count(children);
5182
5154
  return /* @__PURE__ */ jsx("div", {
5183
- ..._stylex.props(styles$C.main, customStyle),
5155
+ ..._stylex.props(styles$H.main, customStyle),
5184
5156
  children: React.Children.map(children, (child, index2) => /* @__PURE__ */ React.cloneElement(child, {
5185
5157
  customStyle: {
5186
5158
  ...child.props.customStyle,
@@ -5191,16 +5163,16 @@ function TokenGroup({
5191
5163
  });
5192
5164
  }
5193
5165
  const getChildStyle = (index2, count2) => {
5194
- if (count2 === 1) return styles$C.onlyChild;
5195
- if (index2 === 0) return styles$C.firstChild;
5196
- if (index2 === count2 - 1) return styles$C.lastChild;
5197
- return styles$C.innerChild;
5166
+ if (count2 === 1) return styles$H.onlyChild;
5167
+ if (index2 === 0) return styles$H.firstChild;
5168
+ if (index2 === count2 - 1) return styles$H.lastChild;
5169
+ return styles$H.innerChild;
5198
5170
  };
5199
5171
  const getTokenColor = (child, groupColor) => {
5200
5172
  const childColor = child.props.color;
5201
5173
  return childColor === void 0 ? groupColor : childColor;
5202
5174
  };
5203
- const styles$C = {
5175
+ const styles$H = {
5204
5176
  main: {
5205
5177
  display: "mlyrvj5dj",
5206
5178
  gridAutoFlow: "mly1mt1orb",
@@ -5272,7 +5244,7 @@ function ErrorIcon({
5272
5244
  },
5273
5245
  children: /* @__PURE__ */ jsx(Icon, {
5274
5246
  name: "warning",
5275
- customStyle: styles$B.errorIcon
5247
+ customStyle: styles$G.errorIcon
5276
5248
  })
5277
5249
  })
5278
5250
  }), /* @__PURE__ */ jsx(TooltipPortal, {
@@ -5285,7 +5257,7 @@ function ErrorIcon({
5285
5257
  })]
5286
5258
  });
5287
5259
  }
5288
- const styles$B = {
5260
+ const styles$G = {
5289
5261
  errorIcon: {
5290
5262
  color: "mly1e2nbdu",
5291
5263
  $$css: true
@@ -5330,22 +5302,22 @@ function EditableToken({
5330
5302
  className: "mly78zum5 mly6s0dn4"
5331
5303
  },
5332
5304
  children: [/* @__PURE__ */ jsxs("div", {
5333
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$A.focused, !!errorMessage && styles$A.hasError, customStyle),
5305
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$F.focused, !!errorMessage && styles$F.hasError, customStyle),
5334
5306
  children: [icon && /* @__PURE__ */ jsx(Icon, {
5335
5307
  name: icon,
5336
- customStyle: styles$A.icon
5308
+ customStyle: styles$F.icon
5337
5309
  }), /* @__PURE__ */ jsxs("span", {
5338
5310
  ...{
5339
5311
  className: "mlywz0xwf"
5340
5312
  },
5341
5313
  children: [/* @__PURE__ */ jsx("span", {
5342
- ..._stylex.props(fontStyles.body, styles$A.placeholder),
5314
+ ..._stylex.props(fontStyles.body, styles$F.placeholder),
5343
5315
  style: {
5344
5316
  whiteSpaceCollapse: "preserve"
5345
5317
  },
5346
5318
  children: value
5347
5319
  }), /* @__PURE__ */ jsx("input", {
5348
- ..._stylex.props(styles$A.input, fontStyles.body),
5320
+ ..._stylex.props(styles$F.input, fontStyles.body),
5349
5321
  ref: inputRef,
5350
5322
  pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
5351
5323
  value,
@@ -5370,7 +5342,7 @@ function EditableToken({
5370
5342
  })]
5371
5343
  });
5372
5344
  }
5373
- const styles$A = {
5345
+ const styles$F = {
5374
5346
  focused: {
5375
5347
  background: "mlyotlr4g",
5376
5348
  backgroundAttachment: null,
@@ -7712,12 +7684,12 @@ function TextInput({
7712
7684
  }
7713
7685
  };
7714
7686
  return /* @__PURE__ */ jsxs("div", {
7715
- ..._stylex.props(styles$z.main, isFocused && styles$z.focused, sizeVariants[size2], customStyle),
7687
+ ..._stylex.props(styles$E.main, isFocused && styles$E.focused, sizeVariants[size2], customStyle),
7716
7688
  children: [icon && /* @__PURE__ */ jsx(Icon, {
7717
7689
  name: icon,
7718
7690
  color: "secondary"
7719
7691
  }), /* @__PURE__ */ jsx("input", {
7720
- ..._stylex.props(fontStyles.body, styles$z.input),
7692
+ ..._stylex.props(fontStyles.body, styles$E.input),
7721
7693
  value,
7722
7694
  placeholder,
7723
7695
  onChange: handleChange,
@@ -7725,7 +7697,7 @@ function TextInput({
7725
7697
  onBlur: handleBlur,
7726
7698
  onKeyDown
7727
7699
  }), hasClear && /* @__PURE__ */ jsx("button", {
7728
- ..._stylex.props(fontStyles.supporting, styles$z.actionButton, value === "" && styles$z.hidden),
7700
+ ..._stylex.props(fontStyles.supporting, styles$E.actionButton, value === "" && styles$E.hidden),
7729
7701
  ref: buttonRef,
7730
7702
  onClick: () => onChange(""),
7731
7703
  tabIndex: 0,
@@ -7733,7 +7705,7 @@ function TextInput({
7733
7705
  })]
7734
7706
  });
7735
7707
  }
7736
- const styles$z = {
7708
+ const styles$E = {
7737
7709
  main: {
7738
7710
  display: "mly78zum5",
7739
7711
  alignItems: "mly6s0dn4",
@@ -7942,7 +7914,7 @@ function SelectorToken({
7942
7914
  onValueChange: handleValueChange,
7943
7915
  required: true,
7944
7916
  children: [/* @__PURE__ */ jsxs(Trigger$3, {
7945
- ..._stylex.props(tokenStyles.main, styles$y.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
7917
+ ..._stylex.props(tokenStyles.main, styles$D.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
7946
7918
  children: [icon && /* @__PURE__ */ jsx(Icon, {
7947
7919
  name: icon,
7948
7920
  customStyle: tokenStyles.icon
@@ -7971,7 +7943,7 @@ function SelectorToken({
7971
7943
  size: "compact",
7972
7944
  icon: "search",
7973
7945
  hasClear: true,
7974
- customStyle: styles$y.searchInput,
7946
+ customStyle: styles$D.searchInput,
7975
7947
  onKeyDown: (event) => {
7976
7948
  const excludedKeys = ["ArrowUp", "ArrowDown"];
7977
7949
  if (!excludedKeys.includes(event.key)) {
@@ -8004,21 +7976,21 @@ function SelectItem({
8004
7976
  ...props2
8005
7977
  }) {
8006
7978
  return /* @__PURE__ */ jsxs(Item$1, {
8007
- ..._stylex.props(fontStyles.body, styles$y.selectItem),
7979
+ ..._stylex.props(fontStyles.body, styles$D.selectItem),
8008
7980
  value,
8009
7981
  ...props2,
8010
7982
  children: [value === selectedValue ? /* @__PURE__ */ jsx(Icon, {
8011
7983
  name: "radioChecked",
8012
- customStyle: styles$y.radioChecked
7984
+ customStyle: styles$D.radioChecked
8013
7985
  }) : /* @__PURE__ */ jsx(Icon, {
8014
7986
  name: "radioUnchecked",
8015
- customStyle: styles$y.radioUnchecked
7987
+ customStyle: styles$D.radioUnchecked
8016
7988
  }), /* @__PURE__ */ jsx(ItemText, {
8017
7989
  children
8018
7990
  })]
8019
7991
  });
8020
7992
  }
8021
- const styles$y = {
7993
+ const styles$D = {
8022
7994
  selectTrigger: {
8023
7995
  whiteSpace: "mlyuxw1ft",
8024
7996
  overflow: "mlyb3r6kr",
@@ -8108,7 +8080,7 @@ function Card({
8108
8080
  customStyle
8109
8081
  }) {
8110
8082
  return /* @__PURE__ */ jsxs("div", {
8111
- ..._stylex.props(styles$x.container, customStyle),
8083
+ ..._stylex.props(styles$C.container, customStyle),
8112
8084
  children: [/* @__PURE__ */ jsx("div", {
8113
8085
  ...{
8114
8086
  className: "mly1717udv"
@@ -8122,7 +8094,7 @@ function Card({
8122
8094
  })]
8123
8095
  });
8124
8096
  }
8125
- const styles$x = {
8097
+ const styles$C = {
8126
8098
  container: {
8127
8099
  display: "mly78zum5",
8128
8100
  flexDirection: "mlydt5ytf",
@@ -8213,10 +8185,10 @@ function CollapsibleListItem({
8213
8185
  className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
8214
8186
  },
8215
8187
  children: [/* @__PURE__ */ jsx("span", {
8216
- ..._stylex.props(fontStyles.body, styles$w.label),
8188
+ ..._stylex.props(fontStyles.body, styles$B.label),
8217
8189
  children: label
8218
8190
  }), sublabel && /* @__PURE__ */ jsx("span", {
8219
- ..._stylex.props(fontStyles.supporting, styles$w.sublabel),
8191
+ ..._stylex.props(fontStyles.supporting, styles$B.sublabel),
8220
8192
  children: sublabel
8221
8193
  })]
8222
8194
  })]
@@ -8228,7 +8200,7 @@ function CollapsibleListItem({
8228
8200
  })]
8229
8201
  });
8230
8202
  }
8231
- const styles$w = {
8203
+ const styles$B = {
8232
8204
  label: {
8233
8205
  flexGrow: "mly1iyjqo2",
8234
8206
  fontWeight: "mly1xlr1w8",
@@ -19042,7 +19014,7 @@ function Spinner({
19042
19014
  } = SIZES[size2];
19043
19015
  const frameSize = diameter + border * 2;
19044
19016
  return /* @__PURE__ */ jsx("div", {
19045
- ..._stylex.props(styles$v.root, customStyle),
19017
+ ..._stylex.props(styles$A.root, customStyle),
19046
19018
  children: /* @__PURE__ */ jsx("span", {
19047
19019
  "aria-valuetext": "Loading",
19048
19020
  ...{
@@ -19062,7 +19034,7 @@ function Spinner({
19062
19034
  })
19063
19035
  });
19064
19036
  }
19065
- const styles$v = {
19037
+ const styles$A = {
19066
19038
  root: {
19067
19039
  alignItems: "mly6s0dn4",
19068
19040
  display: "mly3nfvp2",
@@ -23382,7 +23354,6 @@ var Anchor2$1 = PopoverAnchor;
23382
23354
  var Trigger$2 = PopoverTrigger;
23383
23355
  var Portal$2 = PopoverPortal;
23384
23356
  var Content2$2 = PopoverContent;
23385
- var Arrow2$1 = PopoverArrow;
23386
23357
  const styleX = {
23387
23358
  wrapper: {
23388
23359
  position: "mly1n2onr6",
@@ -23461,7 +23432,7 @@ const Popover = ({
23461
23432
  })
23462
23433
  });
23463
23434
  };
23464
- const styles$u = {
23435
+ const styles$z = {
23465
23436
  wrapper: {
23466
23437
  position: "mly1n2onr6",
23467
23438
  $$css: true
@@ -23513,7 +23484,7 @@ const SelectDropdown = ({
23513
23484
  setOpen(false);
23514
23485
  };
23515
23486
  return /* @__PURE__ */ jsxs("div", {
23516
- ..._stylex.props(styles$u.wrapper, customStyle),
23487
+ ..._stylex.props(styles$z.wrapper, customStyle),
23517
23488
  children: [/* @__PURE__ */ jsxs("button", {
23518
23489
  type: "button",
23519
23490
  autoFocus,
@@ -23581,7 +23552,7 @@ function SelectList({
23581
23552
  const [hoveredIndex, setHoveredIndex] = useState(null);
23582
23553
  return /* @__PURE__ */ jsx(ScrollableArea, {
23583
23554
  children: /* @__PURE__ */ jsx("div", {
23584
- ..._stylex.props(styles$u.selectListDiv, customStyle),
23555
+ ..._stylex.props(styles$z.selectListDiv, customStyle),
23585
23556
  children: options.reduce((result, option2, index2) => {
23586
23557
  const isSelected = value !== void 0 && valueEqual(value, option2.value);
23587
23558
  if (option2.divider) {
@@ -23613,8 +23584,8 @@ function SelectList({
23613
23584
  }), /* @__PURE__ */ jsx(Icon, {
23614
23585
  name: "checkmark",
23615
23586
  customStyle: {
23616
- ...styles$u.checkIcon,
23617
- ...isSelected ? styles$u.checkIconSelected : void 0
23587
+ ...styles$z.checkIcon,
23588
+ ...isSelected ? styles$z.checkIconSelected : void 0
23618
23589
  }
23619
23590
  }), /* @__PURE__ */ jsx("span", {
23620
23591
  ...{
@@ -23725,7 +23696,7 @@ function DatePicker({
23725
23696
  });
23726
23697
  };
23727
23698
  return /* @__PURE__ */ jsxs("div", {
23728
- ..._stylex.props(styles$t.outer, customStyle),
23699
+ ..._stylex.props(styles$y.outer, customStyle),
23729
23700
  children: [/* @__PURE__ */ jsxs("div", {
23730
23701
  ...{
23731
23702
  className: "mly78zum5 mly1q0g3np mly1qughib mly1nejdyq mlyu06os2"
@@ -24040,7 +24011,7 @@ function DatePicker({
24040
24011
  })]
24041
24012
  });
24042
24013
  }
24043
- const styles$t = {
24014
+ const styles$y = {
24044
24015
  outer: {
24045
24016
  userSelect: "mly87ps6o",
24046
24017
  fontSize: "mlymhiqyu",
@@ -24126,7 +24097,7 @@ function Banner({
24126
24097
  className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
24127
24098
  },
24128
24099
  children: [/* @__PURE__ */ jsxs("div", {
24129
- ..._stylex.props(styles$s.header, variantColors[variant], children ? styles$s.headerWithContent : null),
24100
+ ..._stylex.props(styles$x.header, variantColors[variant], children ? styles$x.headerWithContent : null),
24130
24101
  children: [/* @__PURE__ */ jsx("div", {
24131
24102
  ...{
24132
24103
  className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
@@ -24139,22 +24110,22 @@ function Banner({
24139
24110
  className: "mly78zum5 mlydt5ytf mlyb3r6kr"
24140
24111
  },
24141
24112
  children: [/* @__PURE__ */ jsx("div", {
24142
- ..._stylex.props(styles$s.title, fontStyles.emphasized),
24113
+ ..._stylex.props(styles$x.title, fontStyles.emphasized),
24143
24114
  children: title
24144
24115
  }), /* @__PURE__ */ jsx("div", {
24145
- ..._stylex.props(styles$s.description, fontStyles.supporting),
24116
+ ..._stylex.props(styles$x.description, fontStyles.supporting),
24146
24117
  children: description
24147
24118
  })]
24148
24119
  })]
24149
24120
  }), children && /* @__PURE__ */ jsx("div", {
24150
- ..._stylex.props(styles$s.content, fontStyles.body),
24121
+ ..._stylex.props(styles$x.content, fontStyles.body),
24151
24122
  children: /* @__PURE__ */ jsx(ScrollableArea, {
24152
24123
  children
24153
24124
  })
24154
24125
  })]
24155
24126
  });
24156
24127
  }
24157
- const styles$s = {
24128
+ const styles$x = {
24158
24129
  header: {
24159
24130
  borderRadius: "mly1q4ynmn",
24160
24131
  borderStartStartRadius: null,
@@ -24275,6 +24246,106 @@ const variantColors = {
24275
24246
  $$css: true
24276
24247
  }
24277
24248
  };
24249
+ const AccordionListContext = /* @__PURE__ */ React.createContext({});
24250
+ function AccordionList({
24251
+ defaultExpandedItemId,
24252
+ children,
24253
+ customStyle
24254
+ }) {
24255
+ const [expandedItemId, setExpandedItemId] = React.useState(defaultExpandedItemId);
24256
+ const handleExpandedItemChange = (currentItemId) => {
24257
+ setExpandedItemId((prev) => {
24258
+ if (prev === currentItemId) {
24259
+ return void 0;
24260
+ }
24261
+ return currentItemId;
24262
+ });
24263
+ };
24264
+ return /* @__PURE__ */ jsx(AccordionListContext.Provider, {
24265
+ value: {
24266
+ expandedItemId,
24267
+ onExpandedItemChange: handleExpandedItemChange
24268
+ },
24269
+ children: /* @__PURE__ */ jsx("div", {
24270
+ ..._stylex.props(styles$w.main, customStyle),
24271
+ children: React.Children.map(children, (child) => /* @__PURE__ */ jsxs(Fragment, {
24272
+ children: [child, /* @__PURE__ */ jsx(Divider, {})]
24273
+ }))
24274
+ })
24275
+ });
24276
+ }
24277
+ const styles$w = {
24278
+ main: {
24279
+ display: "mly78zum5",
24280
+ flexDirection: "mlydt5ytf",
24281
+ overflow: "mlyb3r6kr",
24282
+ overflowX: null,
24283
+ overflowY: null,
24284
+ flexGrow: "mly1iyjqo2",
24285
+ $$css: true
24286
+ }
24287
+ };
24288
+ function AccordionListItem({
24289
+ id,
24290
+ label,
24291
+ sublabel,
24292
+ startIcon,
24293
+ badge,
24294
+ endIcon,
24295
+ children
24296
+ }) {
24297
+ const {
24298
+ expandedItemId,
24299
+ onExpandedItemChange
24300
+ } = React.useContext(AccordionListContext);
24301
+ return /* @__PURE__ */ jsxs(Fragment, {
24302
+ children: [/* @__PURE__ */ jsxs("div", {
24303
+ ...{
24304
+ className: "mly78zum5 mly6s0dn4 mlylqzeqv mlye8ttls mly167g77z mly1ypdohk"
24305
+ },
24306
+ onClick: () => onExpandedItemChange == null ? void 0 : onExpandedItemChange(id),
24307
+ children: [startIcon && /* @__PURE__ */ jsx(Fragment, {
24308
+ children: startIcon
24309
+ }), /* @__PURE__ */ jsxs("div", {
24310
+ ...{
24311
+ className: "mly78zum5 mlydt5ytf mlyb3r6kr mly1iyjqo2"
24312
+ },
24313
+ children: [/* @__PURE__ */ jsx("span", {
24314
+ ..._stylex.props(fontStyles.body, styles$v.label),
24315
+ children: label
24316
+ }), sublabel && /* @__PURE__ */ jsx("span", {
24317
+ ..._stylex.props(fontStyles.supporting, styles$v.sublabel),
24318
+ children: sublabel
24319
+ })]
24320
+ }), badge && badge, endIcon && endIcon]
24321
+ }), id === expandedItemId && /* @__PURE__ */ jsx("div", {
24322
+ ...{
24323
+ className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlytdwleo mly1jnr06f mly10cdfl8 mlyysyzu8"
24324
+ },
24325
+ children: React.Children.map(children, (child) => child)
24326
+ })]
24327
+ });
24328
+ }
24329
+ const styles$v = {
24330
+ label: {
24331
+ flexGrow: "mly1iyjqo2",
24332
+ fontWeight: "mly1xlr1w8",
24333
+ overflow: "mlyb3r6kr",
24334
+ overflowX: null,
24335
+ overflowY: null,
24336
+ textOverflow: "mlylyipyv",
24337
+ $$css: true
24338
+ },
24339
+ sublabel: {
24340
+ flexGrow: "mly1iyjqo2",
24341
+ color: "mly9dwj6z",
24342
+ overflow: "mlyb3r6kr",
24343
+ overflowX: null,
24344
+ overflowY: null,
24345
+ textOverflow: "mlylyipyv",
24346
+ $$css: true
24347
+ }
24348
+ };
24278
24349
  var ENTRY_FOCUS = "rovingFocusGroup.onEntryFocus";
24279
24350
  var EVENT_OPTIONS = { bubbles: false, cancelable: true };
24280
24351
  var GROUP_NAME$2 = "RovingFocusGroup";
@@ -25589,7 +25660,7 @@ function DropdownMenu({
25589
25660
  children: trigger
25590
25661
  }), /* @__PURE__ */ jsx(Portal2, {
25591
25662
  children: /* @__PURE__ */ jsx(Content2, {
25592
- ..._stylex.props(fontStyles.body, styles$r.content),
25663
+ ..._stylex.props(fontStyles.body, styles$u.content),
25593
25664
  side: "bottom",
25594
25665
  align: "start",
25595
25666
  sideOffset: 4,
@@ -25616,16 +25687,16 @@ function DropdownMenuItem({
25616
25687
  disabled,
25617
25688
  children: [icon && /* @__PURE__ */ jsx(Icon, {
25618
25689
  name: icon,
25619
- customStyle: styles$r.icon
25690
+ customStyle: styles$u.icon
25620
25691
  }), /* @__PURE__ */ jsxs("div", {
25621
25692
  ...{
25622
25693
  className: "mly78zum5 mlydt5ytf mly1iyjqo2"
25623
25694
  },
25624
25695
  children: [/* @__PURE__ */ jsx("span", {
25625
- ..._stylex.props(fontStyles.body, styles$r.label),
25696
+ ..._stylex.props(fontStyles.body, styles$u.label),
25626
25697
  children: label
25627
25698
  }), sublabel && /* @__PURE__ */ jsx("span", {
25628
- ..._stylex.props(fontStyles.supporting, styles$r.sublabel),
25699
+ ..._stylex.props(fontStyles.supporting, styles$u.sublabel),
25629
25700
  children: sublabel
25630
25701
  })]
25631
25702
  })]
@@ -25655,21 +25726,21 @@ function DropdownSubMenuItem({
25655
25726
  },
25656
25727
  children: [icon && /* @__PURE__ */ jsx(Icon, {
25657
25728
  name: icon,
25658
- customStyle: styles$r.icon
25729
+ customStyle: styles$u.icon
25659
25730
  }), /* @__PURE__ */ jsxs("div", {
25660
25731
  ...{
25661
25732
  className: "mly78zum5 mlydt5ytf mly1iyjqo2"
25662
25733
  },
25663
25734
  children: [/* @__PURE__ */ jsx("span", {
25664
- ..._stylex.props(fontStyles.body, styles$r.label),
25735
+ ..._stylex.props(fontStyles.body, styles$u.label),
25665
25736
  children: label
25666
25737
  }), sublabel && /* @__PURE__ */ jsx("span", {
25667
- ..._stylex.props(fontStyles.supporting, styles$r.sublabel),
25738
+ ..._stylex.props(fontStyles.supporting, styles$u.sublabel),
25668
25739
  children: sublabel
25669
25740
  })]
25670
25741
  }), !isControlled && /* @__PURE__ */ jsx(Icon, {
25671
25742
  name: "chevronRight",
25672
- customStyle: styles$r.icon
25743
+ customStyle: styles$u.icon
25673
25744
  })]
25674
25745
  }), /* @__PURE__ */ jsx(SubContent2, {
25675
25746
  ...{
@@ -25684,11 +25755,11 @@ function DropdownMenuLabel({
25684
25755
  label
25685
25756
  }) {
25686
25757
  return /* @__PURE__ */ jsx(Label2, {
25687
- ..._stylex.props(fontStyles.supporting, styles$r.menuLabel),
25758
+ ..._stylex.props(fontStyles.supporting, styles$u.menuLabel),
25688
25759
  children: label
25689
25760
  });
25690
25761
  }
25691
- const styles$r = {
25762
+ const styles$u = {
25692
25763
  content: {
25693
25764
  display: "mly78zum5",
25694
25765
  flexDirection: "mlydt5ytf",
@@ -25752,6 +25823,7 @@ const styles$r = {
25752
25823
  $$css: true
25753
25824
  }
25754
25825
  };
25826
+ const ResizableCollapsiblePanelContext = /* @__PURE__ */ React.createContext({});
25755
25827
  function QueryActionBar({
25756
25828
  runQuery
25757
25829
  }) {
@@ -25760,6 +25832,9 @@ function QueryActionBar({
25760
25832
  setQuery,
25761
25833
  source
25762
25834
  } = useContext(QueryEditorContext);
25835
+ const {
25836
+ onCollapse
25837
+ } = useContext(ResizableCollapsiblePanelContext);
25763
25838
  const isQueryEmpty = !rootQuery || rootQuery.isEmpty();
25764
25839
  const isRunEnabled = rootQuery == null ? void 0 : rootQuery.isRunnable();
25765
25840
  const onRunQuery = () => {
@@ -25769,11 +25844,18 @@ function QueryActionBar({
25769
25844
  };
25770
25845
  return /* @__PURE__ */ jsxs("div", {
25771
25846
  ...{
25772
- className: "mly78zum5 mly1qughib mly6s0dn4 mly153ncpu"
25847
+ className: "mly78zum5 mly1qughib mly6s0dn4 mlye8ttls"
25773
25848
  },
25774
- children: [/* @__PURE__ */ jsx("div", {
25775
- ..._stylex.props(fontStyles.largeBody, styles$q.title),
25776
- children: "Query"
25849
+ children: [/* @__PURE__ */ jsxs("div", {
25850
+ ...{
25851
+ className: "mly78zum5 mly167g77z mly6s0dn4 mlydqdrvq"
25852
+ },
25853
+ children: [/* @__PURE__ */ jsx(Icon, {
25854
+ name: "filterSliders"
25855
+ }), /* @__PURE__ */ jsx("div", {
25856
+ ..._stylex.props(fontStyles.largeBody, styles$t.title),
25857
+ children: "Query"
25858
+ })]
25777
25859
  }), /* @__PURE__ */ jsxs("div", {
25778
25860
  ...{
25779
25861
  className: "mly78zum5 mly167g77z"
@@ -25803,17 +25885,23 @@ function QueryActionBar({
25803
25885
  })
25804
25886
  })
25805
25887
  })]
25888
+ }), onCollapse && /* @__PURE__ */ jsx(Button, {
25889
+ icon: "sidebarCollapse",
25890
+ tooltip: "Close the source panel",
25891
+ onClick: onCollapse,
25892
+ size: "compact",
25893
+ variant: "flat"
25806
25894
  })]
25807
25895
  })]
25808
25896
  });
25809
25897
  }
25810
- const styles$q = {
25898
+ const styles$t = {
25811
25899
  title: {
25812
25900
  fontWeight: "mly1xlr1w8",
25813
25901
  $$css: true
25814
25902
  }
25815
25903
  };
25816
- const styles$p = {
25904
+ const styles$s = {
25817
25905
  labelWithIcon: {
25818
25906
  display: "mly78zum5",
25819
25907
  alignItems: "mly6s0dn4",
@@ -25821,6 +25909,9 @@ const styles$p = {
25821
25909
  gap: "mly167g77z",
25822
25910
  rowGap: null,
25823
25911
  columnGap: null,
25912
+ overflow: "mlyb3r6kr",
25913
+ overflowX: null,
25914
+ overflowY: null,
25824
25915
  $$css: true
25825
25916
  },
25826
25917
  queryCard: {
@@ -29711,6 +29802,7 @@ const addMenuStyles = {
29711
29802
  marginBlock: null,
29712
29803
  marginTop: null,
29713
29804
  marginBottom: null,
29805
+ maxHeight: "mly3d5gib",
29714
29806
  display: "mly78zum5",
29715
29807
  flexDirection: "mlydt5ytf",
29716
29808
  $$css: true
@@ -29804,7 +29896,20 @@ function getInputSchemaFromViewParent(parent) {
29804
29896
  function isNotAnnotatedFilteredField(field) {
29805
29897
  return !hasExplorerFilterFieldAnnotation(field.annotations ?? []);
29806
29898
  }
29807
- function findUniqueFieldName(fields, rename) {
29899
+ function findUniqueFieldName(fields, rename, path = []) {
29900
+ if (!fields.find((field) => field.name === rename)) {
29901
+ return rename;
29902
+ }
29903
+ if (path.length) {
29904
+ const parts = [...path];
29905
+ while (parts.length) {
29906
+ const part = parts.pop();
29907
+ rename = `${part} ${rename}`;
29908
+ if (!fields.find((field) => field.name === rename)) {
29909
+ return rename;
29910
+ }
29911
+ }
29912
+ }
29808
29913
  let idx = 2;
29809
29914
  while (fields.find((field) => field.name === `${rename} ${idx}`)) {
29810
29915
  idx++;
@@ -29915,32 +30020,32 @@ function BadgeForField({
29915
30020
  label: "view",
29916
30021
  icon: "view_filled",
29917
30022
  color: "purple",
29918
- customStyle: styles$o.noBackground
30023
+ customStyle: styles$r.noBackground
29919
30024
  });
29920
30025
  } else if (field.kind === "dimension") {
29921
30026
  return /* @__PURE__ */ jsx(Badge, {
29922
30027
  label: "dimension",
29923
30028
  icon: fieldToIcon(field),
29924
30029
  color: "cyan",
29925
- customStyle: styles$o.noBackground
30030
+ customStyle: styles$r.noBackground
29926
30031
  });
29927
30032
  } else if (field.kind === "measure") {
29928
30033
  return /* @__PURE__ */ jsx(Badge, {
29929
30034
  label: "measure",
29930
30035
  icon: fieldToIcon(field),
29931
30036
  color: "green",
29932
- customStyle: styles$o.noBackground
30037
+ customStyle: styles$r.noBackground
29933
30038
  });
29934
30039
  } else if (field.kind === "join") {
29935
30040
  return /* @__PURE__ */ jsx(Badge, {
29936
30041
  label: "join",
29937
30042
  icon: fieldToIcon(field),
29938
30043
  color: "gray",
29939
- customStyle: styles$o.noBackground
30044
+ customStyle: styles$r.noBackground
29940
30045
  });
29941
30046
  }
29942
30047
  }
29943
- const styles$o = {
30048
+ const styles$r = {
29944
30049
  noBackground: {
29945
30050
  backgroundColor: "mlyjbqb8w",
29946
30051
  $$css: true
@@ -29969,7 +30074,7 @@ function Visualization$1({
29969
30074
  onClick: () => setRenderer(viz)
29970
30075
  }));
29971
30076
  const tokens2 = [/* @__PURE__ */ jsx(SelectorToken, {
29972
- customStyle: styles$n.first,
30077
+ customStyle: styles$q.first,
29973
30078
  icon: `viz_${currentRenderer}`,
29974
30079
  value: currentRenderer,
29975
30080
  items: vizes,
@@ -29979,7 +30084,7 @@ function Visualization$1({
29979
30084
  children: tokens2
29980
30085
  });
29981
30086
  }
29982
- const styles$n = {
30087
+ const styles$q = {
29983
30088
  first: {
29984
30089
  flexGrow: "mly1iyjqo2",
29985
30090
  justifyContent: "mlylqzeqv",
@@ -30008,7 +30113,7 @@ function ViewAttributeTable({
30008
30113
  }) {
30009
30114
  const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
30010
30115
  return /* @__PURE__ */ jsx("div", {
30011
- ..._stylex.props(styles$m.attributeTableContainer, style),
30116
+ ..._stylex.props(styles$p.attributeTableContainer, style),
30012
30117
  children: /* @__PURE__ */ jsx(ScrollableArea, {
30013
30118
  children: /* @__PURE__ */ jsx("table", {
30014
30119
  ...{
@@ -30048,9 +30153,9 @@ function ViewAttributeTableRow({
30048
30153
  className: "mlydpxx8g"
30049
30154
  },
30050
30155
  children: [/* @__PURE__ */ jsx("td", {
30051
- ..._stylex.props(styles$m.attributeTableKeyCell, fontStyles.supporting),
30156
+ ..._stylex.props(styles$p.attributeTableKeyCell, fontStyles.supporting),
30052
30157
  children: /* @__PURE__ */ jsx("div", {
30053
- ..._stylex.props(styles$m.attributeTableKeyCellContent, fontStyles.supporting),
30158
+ ..._stylex.props(styles$p.attributeTableKeyCellContent, fontStyles.supporting),
30054
30159
  children: attribute
30055
30160
  })
30056
30161
  }), /* @__PURE__ */ jsx("td", {
@@ -30061,7 +30166,7 @@ function ViewAttributeTableRow({
30061
30166
  })]
30062
30167
  });
30063
30168
  }
30064
- const styles$m = {
30169
+ const styles$p = {
30065
30170
  attributeTableContainer: {
30066
30171
  padding: "mlye8ttls",
30067
30172
  paddingInline: null,
@@ -30209,7 +30314,7 @@ function HoverText({
30209
30314
  asChild: true,
30210
30315
  children: /* @__PURE__ */ jsx("div", {
30211
30316
  ref: textRef,
30212
- ..._stylex.props(styles$l.text, fontStyles.supporting),
30317
+ ..._stylex.props(styles$o.text, fontStyles.supporting),
30213
30318
  children: text2
30214
30319
  })
30215
30320
  }), /* @__PURE__ */ jsx(Portal$4, {
@@ -30217,7 +30322,7 @@ function HoverText({
30217
30322
  side,
30218
30323
  align,
30219
30324
  children: /* @__PURE__ */ jsx("pre", {
30220
- ..._stylex.props(styles$l.hoverText, fontStyles.tooltipText),
30325
+ ..._stylex.props(styles$o.hoverText, fontStyles.tooltipText),
30221
30326
  children: text2
30222
30327
  })
30223
30328
  })
@@ -30226,7 +30331,7 @@ function HoverText({
30226
30331
  })
30227
30332
  });
30228
30333
  }
30229
- const styles$l = {
30334
+ const styles$o = {
30230
30335
  text: {
30231
30336
  overflow: "mlyb3r6kr",
30232
30337
  overflowX: null,
@@ -30279,11 +30384,11 @@ function HoverCard({
30279
30384
  customStyle
30280
30385
  }) {
30281
30386
  return /* @__PURE__ */ jsx("div", {
30282
- ..._stylex.props(styles$k.container, fontStyles.body, customStyle),
30387
+ ..._stylex.props(styles$n.container, fontStyles.body, customStyle),
30283
30388
  children
30284
30389
  });
30285
30390
  }
30286
- const styles$k = {
30391
+ const styles$n = {
30287
30392
  container: {
30288
30393
  boxShadow: "mly5n1uv4",
30289
30394
  backgroundColor: "mly12peec7",
@@ -30328,7 +30433,7 @@ function FieldHoverCard({
30328
30433
  details = /* @__PURE__ */ jsx(ViewAttributeTable, {
30329
30434
  viewInfo: field,
30330
30435
  isCompact: true,
30331
- style: styles$j.viewAttributeTable
30436
+ style: styles$m.viewAttributeTable
30332
30437
  });
30333
30438
  } else if (field.kind === "dimension") {
30334
30439
  details = /* @__PURE__ */ jsx(TopValuesTable, {
@@ -30337,7 +30442,7 @@ function FieldHoverCard({
30337
30442
  });
30338
30443
  }
30339
30444
  return /* @__PURE__ */ jsxs(HoverCard, {
30340
- customStyle: styles$j.container,
30445
+ customStyle: styles$m.container,
30341
30446
  children: [/* @__PURE__ */ jsxs("div", {
30342
30447
  children: [/* @__PURE__ */ jsx("div", {
30343
30448
  ...{
@@ -30347,10 +30452,10 @@ function FieldHoverCard({
30347
30452
  field
30348
30453
  })
30349
30454
  }), /* @__PURE__ */ jsx("div", {
30350
- ..._stylex.props(fontStyles.supporting, styles$j.path),
30455
+ ..._stylex.props(fontStyles.supporting, styles$m.path),
30351
30456
  children: pathString
30352
30457
  }), /* @__PURE__ */ jsx("div", {
30353
- ..._stylex.props(fontStyles.emphasized, styles$j.title),
30458
+ ..._stylex.props(fontStyles.emphasized, styles$m.title),
30354
30459
  children: field.name
30355
30460
  }), description && /* @__PURE__ */ jsx(HoverText, {
30356
30461
  text: description
@@ -30360,7 +30465,7 @@ function FieldHoverCard({
30360
30465
  })]
30361
30466
  });
30362
30467
  }
30363
- const styles$j = {
30468
+ const styles$m = {
30364
30469
  container: {
30365
30470
  width: "mlybl57os",
30366
30471
  maxHeight: "mlyq3t0pi",
@@ -30652,10 +30757,10 @@ const PillInput = ({
30652
30757
  commitValue();
30653
30758
  });
30654
30759
  return /* @__PURE__ */ jsx("div", {
30655
- ..._stylex.props(fontStyles.body, styles$i.main),
30760
+ ..._stylex.props(fontStyles.body, styles$l.main),
30656
30761
  children: /* @__PURE__ */ jsx(ScrollableArea, {
30657
30762
  children: /* @__PURE__ */ jsxs("div", {
30658
- ..._stylex.props(styles$i.content, customStyle),
30763
+ ..._stylex.props(styles$l.content, customStyle),
30659
30764
  onKeyUp,
30660
30765
  onClick: () => {
30661
30766
  var _a2;
@@ -30722,7 +30827,7 @@ const Pill = ({
30722
30827
  onClick,
30723
30828
  tabIndex: 0,
30724
30829
  ref: forwardRef,
30725
- ..._stylex.props(styles$i.pill, colorVariants[color]),
30830
+ ..._stylex.props(styles$l.pill, colorVariants[color]),
30726
30831
  children: [children, /* @__PURE__ */ jsx("div", {
30727
30832
  title: "Remove",
30728
30833
  ...{
@@ -30737,7 +30842,7 @@ const Pill = ({
30737
30842
  })]
30738
30843
  });
30739
30844
  };
30740
- const styles$i = {
30845
+ const styles$l = {
30741
30846
  main: {
30742
30847
  borderRadius: "mly12oqio5",
30743
30848
  borderStartStartRadius: null,
@@ -30921,7 +31026,7 @@ function ValueList({
30921
31026
  children: (stringSearchResults == null ? void 0 : stringSearchResults.length) ? stringSearchResults.map((value) => /* @__PURE__ */ jsxs("div", {
30922
31027
  role: "menuitem",
30923
31028
  tabIndex: -1,
30924
- ..._stylex.props(addMenuStyles.item, styles$h.valueItem),
31029
+ ..._stylex.props(addMenuStyles.item, styles$k.valueItem),
30925
31030
  onClick: () => onClick(value),
30926
31031
  children: [/* @__PURE__ */ jsx(Value, {
30927
31032
  value
@@ -30945,10 +31050,10 @@ function Value({
30945
31050
  label: value.fieldValue ?? "∅",
30946
31051
  icon: "filter",
30947
31052
  color: "purple",
30948
- customStyle: styles$h.token
31053
+ customStyle: styles$k.token
30949
31054
  });
30950
31055
  }
30951
- const styles$h = {
31056
+ const styles$k = {
30952
31057
  valueItem: {
30953
31058
  height: "mly1qx5ct2",
30954
31059
  paddingTop: "mly1y1aw1k",
@@ -31111,22 +31216,20 @@ const StringFilterCore = ({
31111
31216
  minHeight: 0,
31112
31217
  display: "grid"
31113
31218
  },
31114
- children: /* @__PURE__ */ jsx(ScrollableArea, {
31115
- children: /* @__PURE__ */ jsx(ValueList, {
31116
- ref: valueListRef,
31117
- search: searchValue,
31118
- fieldPath: [...path, field.name].join("."),
31119
- onClick: (value) => {
31120
- if (value.fieldValue) {
31121
- updateFilter({
31122
- ...currentFilter,
31123
- values: [...currentFilter.values, value.fieldValue]
31124
- });
31125
- setSearchValue("");
31126
- }
31127
- },
31128
- customStyle: styles$g.valueList
31129
- })
31219
+ children: /* @__PURE__ */ jsx(ValueList, {
31220
+ ref: valueListRef,
31221
+ search: searchValue,
31222
+ fieldPath: [...path, field.name].join("."),
31223
+ onClick: (value) => {
31224
+ if (value.fieldValue) {
31225
+ updateFilter({
31226
+ ...currentFilter,
31227
+ values: [...currentFilter.values, value.fieldValue]
31228
+ });
31229
+ setSearchValue("");
31230
+ }
31231
+ },
31232
+ customStyle: styles$j.valueList
31130
31233
  })
31131
31234
  })]
31132
31235
  }) : currentFilter.operator === "~" ? /* @__PURE__ */ jsx(StringEditor, {
@@ -31194,8 +31297,13 @@ function stringFilterChangeType(filter, type) {
31194
31297
  };
31195
31298
  }
31196
31299
  }
31197
- const styles$g = {
31300
+ const styles$j = {
31198
31301
  valueList: {
31302
+ maxHeight: "mly3d5gib",
31303
+ width: "mly1hfn5x7",
31304
+ overflow: "mlyysyzu8",
31305
+ overflowX: null,
31306
+ overflowY: null,
31199
31307
  $$css: true
31200
31308
  }
31201
31309
  };
@@ -31481,7 +31589,7 @@ const DateInput = ({
31481
31589
  setTempValue(hooks(value).format(format2));
31482
31590
  }, [value, format2]);
31483
31591
  return /* @__PURE__ */ jsx("input", {
31484
- ..._stylex.props(customStyle, isActive ? styles$f.active : null),
31592
+ ..._stylex.props(customStyle, isActive ? styles$i.active : null),
31485
31593
  type: "text",
31486
31594
  placeholder: placeholder || format2,
31487
31595
  value: tempValue,
@@ -31515,7 +31623,7 @@ function guessUnits(moment2, isDateTime) {
31515
31623
  }
31516
31624
  return isDateTime ? "second" : "day";
31517
31625
  }
31518
- const styles$f = {
31626
+ const styles$i = {
31519
31627
  active: {
31520
31628
  backgroundColor: "mly1vzefiq",
31521
31629
  $$css: true
@@ -32099,15 +32207,17 @@ function FieldList({
32099
32207
  view,
32100
32208
  fields,
32101
32209
  onAddOperation,
32102
- search,
32210
+ search = "",
32103
32211
  types: types2,
32104
32212
  filter,
32105
- isFilterOperation
32213
+ isFilterOperation,
32214
+ customStyle
32106
32215
  }) {
32107
32216
  const groups = useMemo(() => {
32108
32217
  const groups2 = [];
32218
+ const lcSearch = search.toLocaleLowerCase();
32109
32219
  const buildGroups = (types22, path, name, fields2) => {
32110
- const filteredFields = sortFieldInfos(fields2).filter((field) => field.kind !== "join").filter((field) => !isArrayOrRecord(field)).filter((field) => field.name.includes(search) && types22.includes(field.kind)).filter((field) => filter ? filter(view, field, path) : true);
32220
+ const filteredFields = sortFieldInfos(fields2).filter((field) => field.kind !== "join").filter((field) => !isArrayOrRecord(field)).filter((field) => field.name.toLocaleLowerCase().includes(lcSearch) && types22.includes(field.kind)).filter((field) => filter ? filter(view, field, path) : true);
32111
32221
  const joins = fields2.filter((field) => field.kind === "join");
32112
32222
  const arraysAndRecords = fields2.filter(isArrayOrRecord);
32113
32223
  if (filteredFields.length) {
@@ -32144,16 +32254,12 @@ function FieldList({
32144
32254
  return groups2;
32145
32255
  }, [fields, filter, search, view, types2]);
32146
32256
  return /* @__PURE__ */ jsx("div", {
32147
- ...{
32148
- className: "mly3d5gib"
32149
- },
32257
+ ..._stylex.props(customStyle),
32150
32258
  children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxs("div", {
32151
32259
  children: [/* @__PURE__ */ jsx("div", {
32152
- children: /* @__PURE__ */ jsx("div", {
32153
- ..._stylex.props(addMenuStyles.item, styles$e.fieldItem),
32154
- "data-disabled": "true",
32155
- children: group.name
32156
- })
32260
+ ..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
32261
+ "data-disabled": "true",
32262
+ children: group.name
32157
32263
  }), group.fields.map((field) => isFilterOperation && (field.kind === "dimension" || field.kind === "measure") ? /* @__PURE__ */ jsx(FilterPopover, {
32158
32264
  fieldInfo: field,
32159
32265
  path: group.path,
@@ -32161,7 +32267,7 @@ function FieldList({
32161
32267
  anchor: /* @__PURE__ */ jsx("div", {
32162
32268
  role: "menuitem",
32163
32269
  tabIndex: -1,
32164
- ..._stylex.props(addMenuStyles.item, styles$e.fieldItem),
32270
+ ..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
32165
32271
  children: /* @__PURE__ */ jsx(PopoverTrigger, {
32166
32272
  asChild: true,
32167
32273
  children: /* @__PURE__ */ jsx(FieldToken, {
@@ -32188,7 +32294,7 @@ function FieldList({
32188
32294
  }, group.name + ":" + field.name) : /* @__PURE__ */ jsx("div", {
32189
32295
  role: "menuitem",
32190
32296
  tabIndex: -1,
32191
- ..._stylex.props(addMenuStyles.item, styles$e.fieldItem),
32297
+ ..._stylex.props(addMenuStyles.item, styles$h.fieldItem),
32192
32298
  children: /* @__PURE__ */ jsx(FieldToken, {
32193
32299
  field,
32194
32300
  onClick: () => onAddOperation(field, group.path),
@@ -32211,7 +32317,7 @@ function FieldList({
32211
32317
  })
32212
32318
  });
32213
32319
  }
32214
- const styles$e = {
32320
+ const styles$h = {
32215
32321
  fieldItem: {
32216
32322
  height: "mly1qx5ct2",
32217
32323
  paddingTop: "mly1y1aw1k",
@@ -32229,7 +32335,7 @@ function FieldMenu({
32229
32335
  }) {
32230
32336
  const [search, setSearch] = useState("");
32231
32337
  return /* @__PURE__ */ jsxs("div", {
32232
- ..._stylex.props(addMenuStyles.content),
32338
+ ..._stylex.props(addMenuStyles.content, styles$g.content),
32233
32339
  role: "menu",
32234
32340
  children: [/* @__PURE__ */ jsx("div", {
32235
32341
  ..._stylex.props(addMenuStyles.item),
@@ -32239,7 +32345,10 @@ function FieldMenu({
32239
32345
  onChange: setSearch,
32240
32346
  placeholder: "Search..."
32241
32347
  })
32242
- }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(ScrollableArea, {
32348
+ }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx("div", {
32349
+ ...{
32350
+ className: "mly1odjw0f"
32351
+ },
32243
32352
  children: /* @__PURE__ */ jsx(FieldList, {
32244
32353
  view,
32245
32354
  fields,
@@ -32252,6 +32361,12 @@ function FieldMenu({
32252
32361
  })]
32253
32362
  });
32254
32363
  }
32364
+ const styles$g = {
32365
+ content: {
32366
+ maxHeight: "mly3d5gib",
32367
+ $$css: true
32368
+ }
32369
+ };
32255
32370
  function segmentHasLimit(segment) {
32256
32371
  return segment.operations.items.find((operation) => operation instanceof ASTLimitViewOperation) !== void 0;
32257
32372
  }
@@ -32281,7 +32396,7 @@ function addGroupBy(view, field, path) {
32281
32396
  } = view.getOutputSchema();
32282
32397
  let rename;
32283
32398
  if (fields.find((f2) => f2.name === field.name)) {
32284
- rename = findUniqueFieldName(fields, field.name);
32399
+ rename = findUniqueFieldName(fields, field.name, path);
32285
32400
  }
32286
32401
  segment.addGroupBy(field.name, path, rename);
32287
32402
  }
@@ -32292,7 +32407,7 @@ function addAggregate(view, field, path) {
32292
32407
  } = view.getOutputSchema();
32293
32408
  let rename;
32294
32409
  if (fields.find((f2) => f2.name === field.name)) {
32295
- rename = findUniqueFieldName(fields, field.name);
32410
+ rename = findUniqueFieldName(fields, field.name, path);
32296
32411
  }
32297
32412
  segment.addAggregate(field.name, path, rename);
32298
32413
  }
@@ -32332,7 +32447,7 @@ function OperationActionTitle({
32332
32447
  return !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field);
32333
32448
  };
32334
32449
  return /* @__PURE__ */ jsxs("div", {
32335
- ..._stylex.props(styles$p.title, hoverStyles.main),
32450
+ ..._stylex.props(styles$s.title, hoverStyles.main),
32336
32451
  children: [/* @__PURE__ */ jsx("div", {
32337
32452
  children: title
32338
32453
  }), /* @__PURE__ */ jsx("div", {
@@ -32902,7 +33017,7 @@ function SortableOperations({
32902
33017
  fields,
32903
33018
  ...props2
32904
33019
  }), /* @__PURE__ */ jsx("div", {
32905
- ..._stylex.props(styles$p.tokenContainer),
33020
+ ..._stylex.props(styles$s.tokenContainer),
32906
33021
  children: /* @__PURE__ */ jsx(DndContext, {
32907
33022
  sensors,
32908
33023
  collisionDetection: closestCenter,
@@ -33052,10 +33167,10 @@ function FilterOperations({
33052
33167
  }
33053
33168
  return /* @__PURE__ */ jsxs("div", {
33054
33169
  children: [/* @__PURE__ */ jsx("div", {
33055
- ..._stylex.props(styles$p.title),
33170
+ ..._stylex.props(styles$s.title),
33056
33171
  children: "filter by"
33057
33172
  }), /* @__PURE__ */ jsx("div", {
33058
- ..._stylex.props(styles$p.tokenContainer),
33173
+ ..._stylex.props(styles$s.tokenContainer),
33059
33174
  children: filters.map((filterOperation, key2) => {
33060
33175
  return /* @__PURE__ */ jsx(ErrorElement, {
33061
33176
  fallback: /* @__PURE__ */ jsxs("div", {
@@ -33319,7 +33434,7 @@ function LimitOperation({
33319
33434
  }
33320
33435
  return /* @__PURE__ */ jsxs("div", {
33321
33436
  children: [/* @__PURE__ */ jsx("div", {
33322
- ..._stylex.props(styles$p.title),
33437
+ ..._stylex.props(styles$s.title),
33323
33438
  children: "limit"
33324
33439
  }), /* @__PURE__ */ jsxs("div", {
33325
33440
  ..._stylex.props(hoverStyles.main),
@@ -33369,10 +33484,10 @@ function OrderByOperations({
33369
33484
  }
33370
33485
  return /* @__PURE__ */ jsxs("div", {
33371
33486
  children: [/* @__PURE__ */ jsx("div", {
33372
- ..._stylex.props(styles$p.title),
33487
+ ..._stylex.props(styles$s.title),
33373
33488
  children: "order by"
33374
33489
  }), /* @__PURE__ */ jsx("div", {
33375
- ..._stylex.props(styles$p.tokenContainer),
33490
+ ..._stylex.props(styles$s.tokenContainer),
33376
33491
  children: orderBys.map((orderBy) => {
33377
33492
  const {
33378
33493
  fieldReference
@@ -33463,7 +33578,7 @@ function CollapsiblePanel({
33463
33578
  },
33464
33579
  children: [icon && /* @__PURE__ */ jsx(Icon, {
33465
33580
  name: icon,
33466
- customStyle: styles$d.icon
33581
+ customStyle: styles$f.icon
33467
33582
  }), /* @__PURE__ */ jsx("div", {
33468
33583
  ...{
33469
33584
  className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp"
@@ -33500,7 +33615,7 @@ function CollapsiblePanel({
33500
33615
  })]
33501
33616
  });
33502
33617
  }
33503
- const styles$d = {
33618
+ const styles$f = {
33504
33619
  icon: {
33505
33620
  $$css: true
33506
33621
  }
@@ -33510,39 +33625,59 @@ function AddItem({
33510
33625
  label,
33511
33626
  detail,
33512
33627
  disable,
33513
- onClick
33628
+ onClick,
33629
+ open
33514
33630
  }) {
33515
33631
  const disabled = disable == null ? void 0 : disable();
33516
33632
  const doOnClick = () => {
33517
33633
  if (!(disable == null ? void 0 : disable())) onClick == null ? void 0 : onClick();
33518
33634
  };
33519
- return /* @__PURE__ */ jsx("div", {
33520
- role: "menuitem",
33521
- tabIndex: -1,
33522
- ..._stylex.props(addMenuStyles.item, addMenuStyles.clickable),
33523
- onClick: doOnClick,
33524
- "data-disabled": disabled ? "true" : void 0,
33525
- children: /* @__PURE__ */ jsxs(Root3$1, {
33526
- children: [/* @__PURE__ */ jsx(Trigger$4, {
33527
- asChild: true,
33528
- children: /* @__PURE__ */ jsxs("div", {
33635
+ return /* @__PURE__ */ jsxs(Root3$1, {
33636
+ children: [/* @__PURE__ */ jsx(Trigger$4, {
33637
+ asChild: true,
33638
+ children: /* @__PURE__ */ jsxs("div", {
33639
+ role: "menuitem",
33640
+ tabIndex: -1,
33641
+ ..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$e.open : null),
33642
+ onClick: doOnClick,
33643
+ "data-disabled": disabled ? "true" : void 0,
33644
+ children: [/* @__PURE__ */ jsxs("div", {
33529
33645
  ..._stylex.props(addMenuStyles.label),
33530
33646
  children: [icon, /* @__PURE__ */ jsx("div", {
33531
33647
  children: label
33532
33648
  })]
33533
- })
33534
- }), detail ? /* @__PURE__ */ jsx(Portal$4, {
33535
- children: /* @__PURE__ */ jsx(Content2$4, {
33536
- ..._stylex.props(addMenuStyles.tooltip),
33537
- side: "right",
33538
- align: "start",
33539
- alignOffset: -16,
33540
- children: detail
33541
- })
33542
- }) : null]
33543
- })
33649
+ }), open !== void 0 && /* @__PURE__ */ jsx(Icon, {
33650
+ name: "chevronRight",
33651
+ color: "gray"
33652
+ })]
33653
+ })
33654
+ }), detail ? /* @__PURE__ */ jsx(Portal$4, {
33655
+ children: /* @__PURE__ */ jsx(Content2$4, {
33656
+ ..._stylex.props(addMenuStyles.tooltip),
33657
+ side: "right",
33658
+ align: "start",
33659
+ alignOffset: -16,
33660
+ children: detail
33661
+ })
33662
+ }) : null]
33544
33663
  });
33545
33664
  }
33665
+ const styles$e = {
33666
+ open: {
33667
+ background: "mly16o7sp0",
33668
+ backgroundAttachment: null,
33669
+ backgroundClip: null,
33670
+ backgroundColor: null,
33671
+ backgroundImage: null,
33672
+ backgroundOrigin: null,
33673
+ backgroundPosition: null,
33674
+ backgroundPositionX: null,
33675
+ backgroundPositionY: null,
33676
+ backgroundRepeat: null,
33677
+ backgroundSize: null,
33678
+ $$css: true
33679
+ }
33680
+ };
33546
33681
  function AddLimit({
33547
33682
  rootQuery,
33548
33683
  view
@@ -33588,95 +33723,33 @@ function AddEmptyNest({
33588
33723
  function AddFieldItem({
33589
33724
  view,
33590
33725
  fields,
33591
- icon,
33592
- label,
33593
33726
  onAddOperation,
33594
33727
  types: types2,
33595
33728
  filter,
33596
- disabledMessage,
33597
- isFilterOperation
33729
+ isFilterOperation,
33730
+ search
33598
33731
  }) {
33599
- const disabled = fields.length === 0;
33600
- const [open, setOpen] = useState(false);
33601
- const trigger = /* @__PURE__ */ jsxs("div", {
33602
- role: "menuitem",
33603
- tabIndex: -1,
33604
- ..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$c.open : null),
33605
- "data-disabled": disabled ? "true" : void 0,
33606
- children: [/* @__PURE__ */ jsxs("div", {
33607
- ..._stylex.props(addMenuStyles.label),
33608
- children: [/* @__PURE__ */ jsx(Icon, {
33609
- name: icon
33610
- }), /* @__PURE__ */ jsx("div", {
33611
- children: label
33612
- })]
33613
- }), /* @__PURE__ */ jsx(Icon, {
33614
- name: "chevronRight",
33615
- color: "gray"
33616
- })]
33617
- });
33618
- if (disabled && disabledMessage) {
33619
- return /* @__PURE__ */ jsxs(Tooltip, {
33620
- children: [/* @__PURE__ */ jsx(TooltipTrigger, {
33621
- asChild: true,
33622
- children: trigger
33623
- }), /* @__PURE__ */ jsx(TooltipPortal, {
33624
- children: /* @__PURE__ */ jsx(TooltipContent, {
33625
- children: /* @__PURE__ */ jsx("div", {
33626
- ..._stylex.props(fontStyles.supporting, tooltipStyles.default),
33627
- children: disabledMessage
33628
- })
33629
- })
33630
- })]
33631
- });
33632
- }
33633
- return /* @__PURE__ */ jsxs(Root2$2, {
33634
- open,
33635
- onOpenChange: setOpen,
33636
- children: [/* @__PURE__ */ jsx(Trigger$2, {
33637
- asChild: true,
33638
- disabled,
33639
- children: trigger
33640
- }), /* @__PURE__ */ jsx(Portal$2, {
33641
- children: /* @__PURE__ */ jsxs(Content2$2, {
33642
- side: "right",
33643
- align: "start",
33644
- alignOffset: -8,
33645
- sideOffset: -6,
33646
- children: [/* @__PURE__ */ jsx(Arrow2$1, {
33647
- width: 0,
33648
- height: 0
33649
- }), /* @__PURE__ */ jsx(FieldMenu, {
33650
- types: types2,
33651
- filter,
33652
- view,
33653
- fields,
33654
- onAddOperation,
33655
- isFilterOperation
33656
- })]
33657
- })
33658
- })]
33732
+ return /* @__PURE__ */ jsx(FieldList, {
33733
+ types: types2,
33734
+ filter,
33735
+ view,
33736
+ fields,
33737
+ onAddOperation,
33738
+ isFilterOperation,
33739
+ search,
33740
+ customStyle: styles$d.list
33659
33741
  });
33660
33742
  }
33661
- const styles$c = {
33662
- open: {
33663
- background: "mly1p5yd3t",
33664
- backgroundAttachment: null,
33665
- backgroundClip: null,
33666
- backgroundColor: null,
33667
- backgroundImage: null,
33668
- backgroundOrigin: null,
33669
- backgroundPosition: null,
33670
- backgroundPositionX: null,
33671
- backgroundPositionY: null,
33672
- backgroundRepeat: null,
33673
- backgroundSize: null,
33743
+ const styles$d = {
33744
+ list: {
33745
+ width: "mlyqyf9gi",
33674
33746
  $$css: true
33675
33747
  }
33676
33748
  };
33677
33749
  function AddOrderBy({
33678
33750
  rootQuery,
33679
- view
33751
+ view,
33752
+ search
33680
33753
  }) {
33681
33754
  const {
33682
33755
  setQuery
@@ -33695,13 +33768,15 @@ function AddOrderBy({
33695
33768
  segment2.addOrderBy(field.name, "asc");
33696
33769
  setQuery == null ? void 0 : setQuery(rootQuery.build());
33697
33770
  },
33698
- disabledMessage: "There must be at least one field in the output to order by."
33771
+ disabledMessage: "There must be at least one field in the output to order by.",
33772
+ search
33699
33773
  });
33700
33774
  }
33701
33775
  const ORDERABLE_TYPES$1 = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type"];
33702
33776
  function AddGroupBy({
33703
33777
  rootQuery,
33704
- view
33778
+ view,
33779
+ search
33705
33780
  }) {
33706
33781
  const {
33707
33782
  setQuery
@@ -33723,12 +33798,14 @@ function AddGroupBy({
33723
33798
  onAddOperation: (field, path) => {
33724
33799
  addGroupBy(view, field, path);
33725
33800
  setQuery == null ? void 0 : setQuery(rootQuery.build());
33726
- }
33801
+ },
33802
+ search
33727
33803
  });
33728
33804
  }
33729
33805
  function AddAggregate({
33730
33806
  rootQuery,
33731
- view
33807
+ view,
33808
+ search
33732
33809
  }) {
33733
33810
  const {
33734
33811
  setQuery
@@ -33750,11 +33827,13 @@ function AddAggregate({
33750
33827
  onAddOperation: (field, path) => {
33751
33828
  addAggregate(view, field, path);
33752
33829
  setQuery == null ? void 0 : setQuery(rootQuery.build());
33753
- }
33830
+ },
33831
+ search
33754
33832
  });
33755
33833
  }
33756
33834
  function AddWhere({
33757
- view
33835
+ view,
33836
+ search
33758
33837
  }) {
33759
33838
  const {
33760
33839
  rootQuery,
@@ -33782,14 +33861,16 @@ function AddWhere({
33782
33861
  setQuery == null ? void 0 : setQuery(rootQuery == null ? void 0 : rootQuery.build());
33783
33862
  }
33784
33863
  },
33785
- isFilterOperation: true
33864
+ isFilterOperation: true,
33865
+ search
33786
33866
  })
33787
33867
  });
33788
33868
  }
33789
33869
  const FILTERABLE_TYPES$1 = /* @__PURE__ */ new Set(["string_type", "boolean_type", "number_type", "date_type", "timestamp_type"]);
33790
33870
  function AddView({
33791
33871
  rootQuery,
33792
- view
33872
+ view,
33873
+ search
33793
33874
  }) {
33794
33875
  const {
33795
33876
  setQuery
@@ -33810,7 +33891,8 @@ function AddView({
33810
33891
  addNest(view, field);
33811
33892
  }
33812
33893
  setQuery == null ? void 0 : setQuery(rootQuery.build());
33813
- }
33894
+ },
33895
+ search
33814
33896
  });
33815
33897
  }
33816
33898
  function AddMenu({
@@ -33818,11 +33900,19 @@ function AddMenu({
33818
33900
  view
33819
33901
  }) {
33820
33902
  const [open, setOpen] = useState(false);
33903
+ const [active, setActive] = useState("");
33821
33904
  const {
33822
33905
  setQuery
33823
33906
  } = useContext(QueryEditorContext);
33824
33907
  const [search, setSearch] = useState("");
33825
33908
  const segment = getSegmentIfPresent(view);
33909
+ const toggleActive = (toggle) => {
33910
+ if (toggle === active) {
33911
+ setActive("");
33912
+ } else {
33913
+ setActive(toggle);
33914
+ }
33915
+ };
33826
33916
  return /* @__PURE__ */ jsxs(Root2$2, {
33827
33917
  open,
33828
33918
  onOpenChange: (open2) => {
@@ -33853,87 +33943,162 @@ function AddMenu({
33853
33943
  icon: "search",
33854
33944
  value: search,
33855
33945
  onChange: setSearch,
33856
- placeholder: "Search..."
33946
+ placeholder: "Search...",
33947
+ customStyle: styles$c.search
33857
33948
  })
33858
- }), /* @__PURE__ */ jsx(Divider, {}), search ? /* @__PURE__ */ jsxs("div", {
33859
- style: {
33860
- overflow: "auto",
33861
- overflowY: "scroll",
33862
- flex: 1
33949
+ }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsxs("div", {
33950
+ ...{
33951
+ className: "mly78zum5 mly1odjw0f mlywib8y2 mly1xyq3li"
33863
33952
  },
33864
- children: [/* @__PURE__ */ jsx(FieldList, {
33865
- view,
33866
- fields: getInputSchemaFromViewParent(view).fields,
33867
- filter: (_2, field, path) => !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field),
33868
- types: ["dimension", "measure", "view"],
33869
- onAddOperation: function(field, path) {
33870
- if (field.kind === "dimension") {
33871
- addGroupBy(view, field, path);
33872
- } else if (field.kind === "measure") {
33873
- addAggregate(view, field, path);
33874
- } else {
33875
- addNest(view, field);
33876
- }
33877
- setQuery == null ? void 0 : setQuery(rootQuery.build());
33953
+ children: [search && !active ? /* @__PURE__ */ jsxs("div", {
33954
+ ...{
33955
+ className: "mly1odjw0f"
33878
33956
  },
33879
- search
33880
- }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(ValueList, {
33881
- search,
33882
- onClick: (value) => {
33883
- const path = value.fieldName.split(".");
33884
- const name = path.pop();
33885
- const segment2 = view.getOrAddDefaultSegment();
33886
- segment2.addWhere(name, path, {
33887
- kind: "string",
33888
- parsed: {
33889
- operator: "=",
33890
- values: [value.fieldValue ?? "∅"]
33957
+ children: [/* @__PURE__ */ jsx(FieldList, {
33958
+ view,
33959
+ fields: getInputSchemaFromViewParent(view).fields,
33960
+ filter: (_2, field, path) => !(segment == null ? void 0 : segment.hasField(field.name, path)) && isNotAnnotatedFilteredField(field),
33961
+ types: ["dimension", "measure", "view"],
33962
+ onAddOperation: function(field, path) {
33963
+ if (field.kind === "dimension") {
33964
+ addGroupBy(view, field, path);
33965
+ } else if (field.kind === "measure") {
33966
+ addAggregate(view, field, path);
33967
+ } else {
33968
+ addNest(view, field);
33891
33969
  }
33892
- });
33893
- setQuery == null ? void 0 : setQuery(rootQuery.build());
33894
- }
33895
- })]
33896
- }) : /* @__PURE__ */ jsxs(Fragment, {
33897
- children: [/* @__PURE__ */ jsx(AddGroupBy, {
33898
- rootQuery,
33899
- view
33900
- }), /* @__PURE__ */ jsx(AddAggregate, {
33901
- rootQuery,
33902
- view
33903
- }), /* @__PURE__ */ jsx(AddWhere, {
33904
- rootQuery,
33905
- view
33906
- }), /* @__PURE__ */ jsx(AddView, {
33907
- rootQuery,
33908
- view
33909
- }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(AddLimit, {
33910
- rootQuery,
33911
- view
33912
- }), /* @__PURE__ */ jsx(AddOrderBy, {
33913
- rootQuery,
33914
- view
33915
- }), /* @__PURE__ */ jsx(AddEmptyNest, {
33916
- rootQuery,
33917
- view
33970
+ setQuery == null ? void 0 : setQuery(rootQuery.build());
33971
+ },
33972
+ search
33973
+ }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(ValueList, {
33974
+ search,
33975
+ onClick: (value) => {
33976
+ const path = value.fieldName.split(".");
33977
+ const name = path.pop();
33978
+ const segment2 = view.getOrAddDefaultSegment();
33979
+ segment2.addWhere(name, path, {
33980
+ kind: "string",
33981
+ parsed: {
33982
+ operator: "=",
33983
+ values: [value.fieldValue ?? "∅"]
33984
+ }
33985
+ });
33986
+ setQuery == null ? void 0 : setQuery(rootQuery.build());
33987
+ }
33988
+ })]
33989
+ }) : /* @__PURE__ */ jsxs("div", {
33990
+ "data-testid": "add-menu-operations",
33991
+ ...{
33992
+ className: "mly18kybhu"
33993
+ },
33994
+ children: [/* @__PURE__ */ jsx(AddItem, {
33995
+ icon: /* @__PURE__ */ jsx(Icon, {
33996
+ name: "groupBy"
33997
+ }),
33998
+ label: "Add group by",
33999
+ onClick: () => toggleActive("group_by"),
34000
+ open: active === "group_by"
34001
+ }), /* @__PURE__ */ jsx(AddItem, {
34002
+ icon: /* @__PURE__ */ jsx(Icon, {
34003
+ name: "aggregate"
34004
+ }),
34005
+ label: "Add aggregate",
34006
+ onClick: () => toggleActive("aggregate"),
34007
+ open: active === "aggregate"
34008
+ }), /* @__PURE__ */ jsx(AddItem, {
34009
+ icon: /* @__PURE__ */ jsx(Icon, {
34010
+ name: "filter"
34011
+ }),
34012
+ label: "Add filter",
34013
+ onClick: () => toggleActive("where"),
34014
+ open: active === "where"
34015
+ }), /* @__PURE__ */ jsx(AddItem, {
34016
+ icon: /* @__PURE__ */ jsx(Icon, {
34017
+ name: "view"
34018
+ }),
34019
+ label: "Add view",
34020
+ onClick: () => toggleActive("view"),
34021
+ open: active === "view"
34022
+ }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(AddLimit, {
34023
+ rootQuery,
34024
+ view
34025
+ }), /* @__PURE__ */ jsx(AddItem, {
34026
+ icon: /* @__PURE__ */ jsx(Icon, {
34027
+ name: "orderBy"
34028
+ }),
34029
+ label: "Order by",
34030
+ onClick: () => toggleActive("order_by"),
34031
+ open: active === "order_by"
34032
+ }), /* @__PURE__ */ jsx(AddEmptyNest, {
34033
+ rootQuery,
34034
+ view
34035
+ })]
34036
+ }), /* @__PURE__ */ jsxs("div", {
34037
+ "data-testid": "add-menu-right-column",
34038
+ style: {
34039
+ overflowY: "auto"
34040
+ },
34041
+ children: [active === "group_by" && /* @__PURE__ */ jsx(AddGroupBy, {
34042
+ rootQuery,
34043
+ view,
34044
+ search
34045
+ }), active === "aggregate" && /* @__PURE__ */ jsx(AddAggregate, {
34046
+ rootQuery,
34047
+ view,
34048
+ search
34049
+ }), active === "where" && /* @__PURE__ */ jsx(AddWhere, {
34050
+ rootQuery,
34051
+ view,
34052
+ search
34053
+ }), active === "view" && /* @__PURE__ */ jsx(AddView, {
34054
+ rootQuery,
34055
+ view,
34056
+ search
34057
+ }), active === "order_by" && /* @__PURE__ */ jsx(AddOrderBy, {
34058
+ rootQuery,
34059
+ view,
34060
+ search
34061
+ })]
33918
34062
  })]
33919
34063
  })]
33920
34064
  })
33921
34065
  })]
33922
34066
  });
33923
34067
  }
34068
+ const styles$c = {
34069
+ search: {
34070
+ width: "mlyh8yej3",
34071
+ $$css: true
34072
+ }
34073
+ };
33924
34074
  function NestOperations({
33925
34075
  rootQuery,
33926
34076
  view,
33927
34077
  nests
34078
+ }) {
34079
+ if (nests.length === 0) {
34080
+ return null;
34081
+ }
34082
+ return /* @__PURE__ */ jsx("div", {
34083
+ ..._stylex.props(styles$s.tokenContainer),
34084
+ children: nests.map((nest) => /* @__PURE__ */ jsx(NestOperation, {
34085
+ rootQuery,
34086
+ view,
34087
+ nest
34088
+ }, nest.name))
34089
+ });
34090
+ }
34091
+ function NestOperation({
34092
+ rootQuery,
34093
+ view,
34094
+ nest
33928
34095
  }) {
33929
34096
  const {
33930
34097
  setQuery
33931
34098
  } = useContext(QueryEditorContext);
33932
34099
  const [renameOpen, setRenameOpen] = useState(false);
33933
- if (nests.length === 0) {
33934
- return null;
33935
- }
33936
- const getControls = (nest) => /* @__PURE__ */ jsxs(Fragment, {
34100
+ const defaultOpen = nest.view.definition.node.kind === "segment" && nest.view.definition.node.operations.length === 0;
34101
+ const getControls = (nest2) => /* @__PURE__ */ jsxs(Fragment, {
33937
34102
  children: [/* @__PURE__ */ jsxs(DropdownMenu, {
33938
34103
  trigger: /* @__PURE__ */ jsx(Button, {
33939
34104
  variant: "flat",
@@ -33945,7 +34110,7 @@ function NestOperations({
33945
34110
  icon: "clear",
33946
34111
  label: "Delete Query",
33947
34112
  onClick: () => {
33948
- nest.delete();
34113
+ nest2.delete();
33949
34114
  setQuery == null ? void 0 : setQuery(rootQuery.build());
33950
34115
  }
33951
34116
  }), /* @__PURE__ */ jsx(DropdownMenuItem, {
@@ -33956,37 +34121,31 @@ function NestOperations({
33956
34121
  })]
33957
34122
  }), /* @__PURE__ */ jsx(AddMenu, {
33958
34123
  rootQuery,
33959
- view: nest.view
34124
+ view: nest2.view
33960
34125
  })]
33961
34126
  });
33962
- return /* @__PURE__ */ jsx("div", {
33963
- ..._stylex.props(styles$p.tokenContainer),
33964
- children: nests.map((nest) => {
33965
- const defaultOpen = nest.view.definition.node.kind === "segment" && nest.view.definition.node.operations.length === 0;
33966
- return /* @__PURE__ */ jsxs("div", {
33967
- ...{
33968
- className: "mlyj3b58b mly1yf7rl7 mly1xmf6yo mlyh8yej3"
33969
- },
33970
- children: [/* @__PURE__ */ jsx(CollapsiblePanel, {
33971
- title: nest.name,
33972
- icon: viewToVisualizationIcon(nest.view),
33973
- defaultOpen,
33974
- controls: getControls(nest),
33975
- collapsedControls: getControls(nest),
33976
- children: /* @__PURE__ */ jsx(View, {
33977
- rootQuery,
33978
- view: nest.view
33979
- })
33980
- }), /* @__PURE__ */ jsx(RenameDialog, {
33981
- rootQuery,
33982
- view,
33983
- target: nest,
33984
- open: renameOpen,
33985
- setOpen: setRenameOpen
33986
- })]
33987
- }, nest.name);
33988
- })
33989
- });
34127
+ return /* @__PURE__ */ jsxs("div", {
34128
+ ...{
34129
+ className: "mlyj3b58b mly1yf7rl7 mly1xmf6yo mlyh8yej3"
34130
+ },
34131
+ children: [/* @__PURE__ */ jsx(CollapsiblePanel, {
34132
+ title: nest.name,
34133
+ icon: viewToVisualizationIcon(nest.view),
34134
+ defaultOpen,
34135
+ controls: getControls(nest),
34136
+ collapsedControls: getControls(nest),
34137
+ children: /* @__PURE__ */ jsx(View, {
34138
+ rootQuery,
34139
+ view: nest.view
34140
+ })
34141
+ }), /* @__PURE__ */ jsx(RenameDialog, {
34142
+ rootQuery,
34143
+ view,
34144
+ target: nest,
34145
+ open: renameOpen,
34146
+ setOpen: setRenameOpen
34147
+ })]
34148
+ }, nest.name);
33990
34149
  }
33991
34150
  function Operations({
33992
34151
  rootQuery,
@@ -34225,30 +34384,23 @@ function Query({
34225
34384
  }) : null]
34226
34385
  });
34227
34386
  }
34228
- const ExplorerPanelsContext = /* @__PURE__ */ React.createContext({
34229
- isSourcePanelOpen: true,
34230
- setIsSourcePanelOpen: void 0
34231
- });
34232
34387
  function Source({
34233
34388
  rootQuery
34234
34389
  }) {
34235
- const {
34236
- isSourcePanelOpen,
34237
- setIsSourcePanelOpen
34238
- } = useContext(ExplorerPanelsContext);
34239
- if (!(isSourcePanelOpen && setIsSourcePanelOpen) && rootQuery.definition instanceof ASTArrowQueryDefinition) {
34240
- return /* @__PURE__ */ jsxs("div", {
34241
- ..._stylex.props(styles$p.queryCard, styles$a.content),
34242
- children: [/* @__PURE__ */ jsxs("div", {
34243
- ..._stylex.props(styles$p.labelWithIcon),
34390
+ if (rootQuery.definition instanceof ASTArrowQueryDefinition) {
34391
+ return /* @__PURE__ */ jsx("div", {
34392
+ ..._stylex.props(styles$s.queryCard, styles$a.content),
34393
+ children: /* @__PURE__ */ jsxs("div", {
34394
+ ..._stylex.props(styles$s.labelWithIcon),
34244
34395
  children: [/* @__PURE__ */ jsx(Icon, {
34245
34396
  name: "database"
34246
- }), rootQuery.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource().name]
34247
- }), setIsSourcePanelOpen && /* @__PURE__ */ jsx(Button, {
34248
- variant: "flat",
34249
- onClick: () => setIsSourcePanelOpen(true),
34250
- label: "Open data panel"
34251
- })]
34397
+ }), /* @__PURE__ */ jsx("div", {
34398
+ ...{
34399
+ className: "mlyb3r6kr mlylyipyv"
34400
+ },
34401
+ children: rootQuery.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource().name
34402
+ })]
34403
+ })
34252
34404
  });
34253
34405
  }
34254
34406
  return null;
@@ -34257,7 +34409,7 @@ const styles$a = {
34257
34409
  content: {
34258
34410
  display: "mlyrvj5dj",
34259
34411
  gridAutoFlow: "mly1mt1orb",
34260
- gridTemplateColumns: "mly52fmzj",
34412
+ gridTemplateColumns: "mlybyjr8",
34261
34413
  gap: "mly1jnr06f",
34262
34414
  rowGap: null,
34263
34415
  columnGap: null,
@@ -34745,7 +34897,7 @@ function RunInfoHover({
34745
34897
  children: /* @__PURE__ */ jsx(HoverCard, {
34746
34898
  customStyle: styles$5.card,
34747
34899
  children: /* @__PURE__ */ jsxs(Fragment, {
34748
- children: [(runInfo == null ? void 0 : runInfo.performanceAspects) && Object.entries(runInfo.performanceAspects).map(([aspect, properties2]) => {
34900
+ children: [runInfo.customContent, (runInfo == null ? void 0 : runInfo.performanceAspects) && Object.entries(runInfo.performanceAspects).map(([aspect, properties2]) => {
34749
34901
  return /* @__PURE__ */ jsx("div", {
34750
34902
  children: Object.entries(properties2).map(([k2, v2]) => /* @__PURE__ */ jsxs("div", {
34751
34903
  children: [/* @__PURE__ */ jsxs("span", {
@@ -34759,6 +34911,8 @@ function RunInfoHover({
34759
34911
  }, aspect);
34760
34912
  }), runInfo.queryLink && /* @__PURE__ */ jsx("a", {
34761
34913
  href: runInfo.queryLink.href,
34914
+ target: "_blank",
34915
+ rel: "noreferrer",
34762
34916
  ..._stylex.props(styles$5.link, fontStyles.link),
34763
34917
  children: runInfo.queryLink.linkText
34764
34918
  })]
@@ -35816,7 +35970,7 @@ function FieldTokenWithActions({
35816
35970
  }
35817
35971
  });
35818
35972
  }
35819
- const FIELD_KIND_ORDER = ["view", "dimension", "measure"];
35973
+ const FIELD_KIND_ORDER = ["dimension", "measure", "view"];
35820
35974
  function SearchResultList({
35821
35975
  source,
35822
35976
  items
@@ -35829,7 +35983,7 @@ function SearchResultList({
35829
35983
  }, [source, items]);
35830
35984
  return /* @__PURE__ */ jsxs("div", {
35831
35985
  ...{
35832
- className: "mly78zum5 mlydt5ytf mly1cy8zhl mlyou54vl mlye8ttls"
35986
+ className: "mly78zum5 mlydt5ytf mly1cy8zhl mlyou54vl mlye8ttls mly10cdfl8"
35833
35987
  },
35834
35988
  children: [/* @__PURE__ */ jsx("div", {
35835
35989
  ..._stylex.props(fontStyles.body, styles$2.heading),
@@ -35886,17 +36040,29 @@ const getSublabelFromPath = (source, path) => {
35886
36040
  };
35887
36041
  function FieldGroupList({
35888
36042
  source,
35889
- title,
35890
- items
36043
+ fieldItems,
36044
+ fieldGroupType
35891
36045
  }) {
35892
- return /* @__PURE__ */ jsxs("div", {
36046
+ const fieldGroupsByKindByPath = React.useMemo(() => {
36047
+ if (source) {
36048
+ return groupFieldItemsByKind(fieldItems).map((group) => ({
36049
+ ...group,
36050
+ items: groupFieldItemsByPath(source, group.items)
36051
+ }));
36052
+ }
36053
+ return [];
36054
+ }, [source, fieldItems]);
36055
+ const items = React.useMemo(() => {
36056
+ var _a2;
36057
+ return ((_a2 = fieldGroupsByKindByPath.find(({
36058
+ group
36059
+ }) => group === fieldGroupType)) == null ? void 0 : _a2.items) ?? [];
36060
+ }, [fieldGroupsByKindByPath, fieldGroupType]);
36061
+ return /* @__PURE__ */ jsx("div", {
35893
36062
  ...{
35894
36063
  className: "mly78zum5 mlydt5ytf mly167g77z"
35895
36064
  },
35896
- children: [/* @__PURE__ */ jsx("div", {
35897
- ..._stylex.props(fontStyles.body, styles$1.title),
35898
- children: title
35899
- }), /* @__PURE__ */ jsx(List$1, {
36065
+ children: /* @__PURE__ */ jsx(List$1, {
35900
36066
  children: items.map((item, index2) => /* @__PURE__ */ jsx(CollapsibleListItem, {
35901
36067
  label: getLabelFromPath(source, item.groupPath),
35902
36068
  sublabel: getSublabelFromPath(source, item.groupPath),
@@ -35909,36 +36075,19 @@ function FieldGroupList({
35909
36075
  path
35910
36076
  }, [...path, field.name].join(".")))
35911
36077
  }, item.groupPath.join(".")))
35912
- })]
36078
+ })
35913
36079
  });
35914
36080
  }
35915
- const styles$1 = {
35916
- title: {
35917
- padding: "mlye8ttls",
35918
- paddingInline: null,
35919
- paddingStart: null,
35920
- paddingLeft: null,
35921
- paddingEnd: null,
35922
- paddingRight: null,
35923
- paddingBlock: null,
35924
- paddingTop: null,
35925
- paddingBottom: null,
35926
- fontWeight: "mly1xlr1w8",
35927
- $$css: true
35928
- }
35929
- };
35930
36081
  function SourcePanel({
35931
36082
  onRefresh
35932
36083
  }) {
35933
36084
  const {
35934
36085
  source
35935
36086
  } = React.useContext(QueryEditorContext);
35936
- const [subpanelType, setSubpanelType] = React.useState(null);
35937
36087
  const [searchQuery, setSearchQuery] = React.useState("");
35938
36088
  const {
35939
- isSourcePanelOpen,
35940
- setIsSourcePanelOpen
35941
- } = useContext(ExplorerPanelsContext);
36089
+ onCollapse
36090
+ } = useContext(ResizableCollapsiblePanelContext);
35942
36091
  const fieldItems = React.useMemo(() => {
35943
36092
  if (source) {
35944
36093
  return sourceToFieldItems(source).filter((fi) => !hasExplorerFilterFieldAnnotation(fi.field.annotations ?? []));
@@ -35950,40 +36099,26 @@ function SourcePanel({
35950
36099
  const dimensions = fieldItems.filter((item) => item.field.kind === "dimension");
35951
36100
  const searchResultItems = React.useMemo(() => {
35952
36101
  if (searchQuery) {
35953
- return fieldItems.filter((item) => item.field.name.includes(searchQuery));
36102
+ const lcSearch = searchQuery.toLocaleLowerCase();
36103
+ return fieldItems.filter((item) => item.field.name.toLocaleLowerCase().includes(lcSearch));
35954
36104
  }
35955
36105
  return [];
35956
36106
  }, [fieldItems, searchQuery]);
35957
- const fieldGroupsByKindByPath = React.useMemo(() => {
35958
- if (source) {
35959
- return groupFieldItemsByKind(fieldItems).map((group) => ({
35960
- ...group,
35961
- items: groupFieldItemsByPath(source, group.items)
35962
- }));
35963
- }
35964
- return [];
35965
- }, [source, fieldItems]);
35966
- const fieldGroupList = React.useMemo(() => {
35967
- var _a2;
35968
- return ((_a2 = fieldGroupsByKindByPath.find(({
35969
- group
35970
- }) => group === subpanelType)) == null ? void 0 : _a2.items) ?? [];
35971
- }, [fieldGroupsByKindByPath, subpanelType]);
35972
36107
  const isSearchActive = !!searchQuery;
35973
- if (!isSourcePanelOpen || !source) {
36108
+ if (!source) {
35974
36109
  return null;
35975
36110
  }
35976
36111
  return /* @__PURE__ */ jsxs("div", {
35977
36112
  ...{
35978
- className: "mly78zum5 mlydt5ytf mly2lah0s mlyh8yej3 mly5yr21d mly1dr8pv1 mlyy8678h"
36113
+ className: "mly78zum5 mlydt5ytf mly5yr21d mly1gzqxud mlyfuqftd"
35979
36114
  },
35980
36115
  children: [/* @__PURE__ */ jsxs("div", {
35981
- ..._stylex.props(fontStyles.body, styles.header),
36116
+ ..._stylex.props(fontStyles.body, styles$1.header),
35982
36117
  children: [/* @__PURE__ */ jsxs("div", {
35983
36118
  ...{
35984
36119
  className: "mly78zum5 mly1qughib"
35985
36120
  },
35986
- children: [subpanelType == null ? /* @__PURE__ */ jsxs("div", {
36121
+ children: [/* @__PURE__ */ jsxs("div", {
35987
36122
  ...{
35988
36123
  className: "mly78zum5 mly6s0dn4 mly167g77z mlydqdrvq mlyb3r6kr"
35989
36124
  },
@@ -35991,17 +36126,9 @@ function SourcePanel({
35991
36126
  name: "database",
35992
36127
  color: "gray"
35993
36128
  }), /* @__PURE__ */ jsx("div", {
35994
- ...{
35995
- className: "mlyb3r6kr mlylyipyv"
35996
- },
36129
+ ..._stylex.props(fontStyles.largeBody, styles$1.title),
35997
36130
  children: source.name
35998
36131
  })]
35999
- }) : /* @__PURE__ */ jsx(Button, {
36000
- icon: "chevronLeft",
36001
- label: "Back",
36002
- variant: "flat",
36003
- size: "compact",
36004
- onClick: () => setSubpanelType(null)
36005
36132
  }), /* @__PURE__ */ jsxs("div", {
36006
36133
  ...{
36007
36134
  className: "mly78zum5"
@@ -36012,10 +36139,10 @@ function SourcePanel({
36012
36139
  onClick: onRefresh,
36013
36140
  size: "compact",
36014
36141
  variant: "flat"
36015
- }), setIsSourcePanelOpen && /* @__PURE__ */ jsx(Button, {
36142
+ }), onCollapse && /* @__PURE__ */ jsx(Button, {
36016
36143
  icon: "sidebarCollapse",
36017
36144
  tooltip: "Close the source panel",
36018
- onClick: () => setIsSourcePanelOpen(false),
36145
+ onClick: onCollapse,
36019
36146
  size: "compact",
36020
36147
  variant: "flat"
36021
36148
  })]
@@ -36028,71 +36155,69 @@ function SourcePanel({
36028
36155
  icon: "search",
36029
36156
  hasClear: true
36030
36157
  })]
36031
- }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx(ScrollableArea, {
36032
- children: /* @__PURE__ */ jsx("div", {
36033
- ...{
36034
- className: "mly78zum5 mlydt5ytf mlye8ttls"
36035
- },
36036
- children: isSearchActive ? /* @__PURE__ */ jsx(SearchResultList, {
36037
- source,
36038
- items: searchResultItems
36039
- }) : subpanelType == null ? /* @__PURE__ */ jsxs(List$1, {
36040
- children: [/* @__PURE__ */ jsx(ListItem, {
36041
- label: "Views",
36042
- startIcon: /* @__PURE__ */ jsx(Icon, {
36043
- name: "view",
36044
- color: "purple"
36045
- }),
36046
- badge: /* @__PURE__ */ jsx(Badge, {
36047
- label: views.length.toString(),
36048
- color: "purple"
36049
- }),
36050
- endIcon: /* @__PURE__ */ jsx(Icon, {
36051
- name: "chevronRight",
36052
- color: "secondary"
36053
- }),
36054
- onClick: () => setSubpanelType("view")
36055
- }, "views"), /* @__PURE__ */ jsx(ListItem, {
36056
- label: "Dimensions",
36057
- startIcon: /* @__PURE__ */ jsx(Icon, {
36058
- name: "dimension",
36059
- color: "cyan"
36060
- }),
36061
- badge: /* @__PURE__ */ jsx(Badge, {
36062
- label: dimensions.length.toString(),
36063
- color: "cyan"
36064
- }),
36065
- endIcon: /* @__PURE__ */ jsx(Icon, {
36066
- name: "chevronRight",
36067
- color: "secondary"
36068
- }),
36069
- onClick: () => setSubpanelType("dimension")
36070
- }, "dimensions"), /* @__PURE__ */ jsx(ListItem, {
36071
- label: "Measures",
36072
- startIcon: /* @__PURE__ */ jsx(Icon, {
36073
- name: "measure",
36074
- color: "green"
36075
- }),
36076
- badge: /* @__PURE__ */ jsx(Badge, {
36077
- label: measures.length.toString(),
36078
- color: "green"
36079
- }),
36080
- endIcon: /* @__PURE__ */ jsx(Icon, {
36081
- name: "chevronRight",
36082
- color: "secondary"
36083
- }),
36084
- onClick: () => setSubpanelType("measure")
36085
- }, "measures")]
36086
- }) : /* @__PURE__ */ jsx(FieldGroupList, {
36087
- source,
36088
- title: FIELD_KIND_TO_TITLE[subpanelType],
36089
- items: fieldGroupList
36090
- })
36158
+ }), /* @__PURE__ */ jsx(Divider, {}), /* @__PURE__ */ jsx("div", {
36159
+ ...{
36160
+ className: "mly78zum5 mlydt5ytf mlyysyzu8 mly1iyjqo2"
36161
+ },
36162
+ children: isSearchActive ? /* @__PURE__ */ jsx(SearchResultList, {
36163
+ source,
36164
+ items: searchResultItems
36165
+ }) : /* @__PURE__ */ jsxs(AccordionList, {
36166
+ defaultExpandedItemId: "views",
36167
+ children: [/* @__PURE__ */ jsx(AccordionListItem, {
36168
+ id: "dimensions",
36169
+ label: "Dimensions",
36170
+ startIcon: /* @__PURE__ */ jsx(Icon, {
36171
+ name: "dimension",
36172
+ color: "cyan"
36173
+ }),
36174
+ badge: /* @__PURE__ */ jsx(Badge, {
36175
+ label: dimensions.length.toString(),
36176
+ color: "cyan"
36177
+ }),
36178
+ children: /* @__PURE__ */ jsx(FieldGroupList, {
36179
+ source,
36180
+ fieldItems,
36181
+ fieldGroupType: "dimension"
36182
+ })
36183
+ }, "dimensions"), /* @__PURE__ */ jsx(AccordionListItem, {
36184
+ id: "measures",
36185
+ label: "Measures",
36186
+ startIcon: /* @__PURE__ */ jsx(Icon, {
36187
+ name: "measure",
36188
+ color: "green"
36189
+ }),
36190
+ badge: /* @__PURE__ */ jsx(Badge, {
36191
+ label: measures.length.toString(),
36192
+ color: "green"
36193
+ }),
36194
+ children: /* @__PURE__ */ jsx(FieldGroupList, {
36195
+ source,
36196
+ fieldItems,
36197
+ fieldGroupType: "measure"
36198
+ })
36199
+ }, "measures"), /* @__PURE__ */ jsx(AccordionListItem, {
36200
+ id: "views",
36201
+ label: "Views",
36202
+ startIcon: /* @__PURE__ */ jsx(Icon, {
36203
+ name: "view",
36204
+ color: "purple"
36205
+ }),
36206
+ badge: /* @__PURE__ */ jsx(Badge, {
36207
+ label: views.length.toString(),
36208
+ color: "purple"
36209
+ }),
36210
+ children: /* @__PURE__ */ jsx(FieldGroupList, {
36211
+ source,
36212
+ fieldItems,
36213
+ fieldGroupType: "view"
36214
+ })
36215
+ }, "views")]
36091
36216
  })
36092
36217
  })]
36093
36218
  });
36094
36219
  }
36095
- const styles = {
36220
+ const styles$1 = {
36096
36221
  header: {
36097
36222
  display: "mly78zum5",
36098
36223
  flexDirection: "mlydt5ytf",
@@ -36105,20 +36230,103 @@ const styles = {
36105
36230
  paddingBlock: null,
36106
36231
  paddingTop: null,
36107
36232
  paddingBottom: null,
36108
- color: "mly1ue28sr",
36109
- fontWeight: "mly1xlr1w8",
36110
36233
  gap: "mly167g77z",
36111
36234
  rowGap: null,
36112
36235
  columnGap: null,
36113
36236
  $$css: true
36237
+ },
36238
+ title: {
36239
+ overflow: "mlyb3r6kr",
36240
+ overflowX: null,
36241
+ overflowY: null,
36242
+ textOverflow: "mlylyipyv",
36243
+ fontWeight: "mly1xlr1w8",
36244
+ color: "mly1ue28sr",
36245
+ $$css: true
36246
+ }
36247
+ };
36248
+ function CollapsedPagePanel({
36249
+ icon,
36250
+ title,
36251
+ tooltip
36252
+ }) {
36253
+ const {
36254
+ onExpand
36255
+ } = React.useContext(ResizableCollapsiblePanelContext);
36256
+ return /* @__PURE__ */ jsx("div", {
36257
+ ...{
36258
+ className: "mly78zum5 mlydt5ytf mly7a106z mlylqzeqv mly5yr21d mly1gzqxud mlyfuqftd"
36259
+ },
36260
+ children: /* @__PURE__ */ jsxs("div", {
36261
+ ...{
36262
+ className: "mly78zum5 mlydt5ytf mly6s0dn4 mlyl56j7k mly167g77z mlye8ttls"
36263
+ },
36264
+ children: [/* @__PURE__ */ jsx(Button, {
36265
+ icon,
36266
+ variant: "flat",
36267
+ size: "compact",
36268
+ tooltip,
36269
+ onClick: onExpand
36270
+ }), title && /* @__PURE__ */ jsx("div", {
36271
+ ..._stylex.props(fontStyles.body, styles.title),
36272
+ children: title
36273
+ })]
36274
+ })
36275
+ });
36276
+ }
36277
+ const styles = {
36278
+ title: {
36279
+ fontWeight: "mly1xlr1w8",
36280
+ cursor: "mlyt0e3qv",
36281
+ "writing-mode": "mly35i7",
36282
+ $$css: true
36114
36283
  }
36115
36284
  };
36285
+ function ResizableCollapsiblePanel({
36286
+ isInitiallyExpanded = true,
36287
+ initialWidth,
36288
+ minWidth,
36289
+ icon,
36290
+ title,
36291
+ children
36292
+ }) {
36293
+ const [isExpanded, setIsExpanded] = React.useState(isInitiallyExpanded);
36294
+ const [width, setWidth] = React.useState(initialWidth);
36295
+ const isCollapsed = !isExpanded;
36296
+ return /* @__PURE__ */ jsxs(ResizableCollapsiblePanelContext.Provider, {
36297
+ value: {
36298
+ onExpand: () => setIsExpanded(true),
36299
+ onCollapse: () => setIsExpanded(false)
36300
+ },
36301
+ children: [/* @__PURE__ */ jsxs("div", {
36302
+ ...{
36303
+ 0: {
36304
+ className: "mly1n2onr6 mly5yr21d mly3psx0u"
36305
+ },
36306
+ 1: {
36307
+ className: "mly1n2onr6 mly5yr21d mly3psx0u mly1s85apg"
36308
+ }
36309
+ }[!!isCollapsed << 0],
36310
+ style: {
36311
+ width: `${width}px`
36312
+ },
36313
+ children: [children, /* @__PURE__ */ jsx(ResizeBar, {
36314
+ width: initialWidth,
36315
+ minWidth,
36316
+ onWidthChange: setWidth
36317
+ })]
36318
+ }), isCollapsed && /* @__PURE__ */ jsx(CollapsedPagePanel, {
36319
+ icon,
36320
+ title
36321
+ })]
36322
+ });
36323
+ }
36116
36324
  export {
36117
- ExplorerPanelsContext,
36118
36325
  MalloyExplorerProvider,
36119
36326
  QueryActionBar,
36120
36327
  QueryEditor,
36121
36328
  QueryPanel,
36329
+ ResizableCollapsiblePanel,
36122
36330
  ResizeBar,
36123
36331
  ResultPanel,
36124
36332
  SourcePanel