@malloydata/malloy-explorer 0.0.264-dev250417011542 → 0.0.266-dev250421232431
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/@flowtypes/components/QueryPanel/QueryEditor.flow.js +0 -6
- package/@flowtypes/components/SourcePanel/SourcePanel.flow.js +6 -3
- package/dist/cjs/index.cjs +982 -632
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/index.js +983 -633
- package/dist/esm/index.js.map +1 -1
- package/dist/malloy-explorer.css +9 -4
- package/dist/types/components/DateInput.d.ts +19 -0
- package/dist/types/components/QueryPanel/AddMenu/ValueList.d.ts +3 -1
- package/dist/types/components/QueryPanel/LiteralValueEditor.d.ts +1 -1
- package/dist/types/components/QueryPanel/QueryEditor.d.ts +1 -12
- package/dist/types/components/QueryPanel/operations/hover.stylex.d.ts +3 -0
- package/dist/types/components/SourcePanel/SourcePanel.d.ts +4 -1
- package/dist/types/components/filters/BooleanFilterCore.d.ts +0 -1
- package/dist/types/components/filters/DateTimeFilterCore.d.ts +4 -3
- package/dist/types/components/filters/NumberFilterCore.d.ts +3 -3
- package/dist/types/components/filters/styles.d.ts +20 -0
- package/dist/types/components/primitives/DatePicker.d.ts +5 -3
- package/dist/types/components/primitives/tokens/styles.d.ts +3 -1
- package/dist/types/components/primitives/utils/icon.d.ts +12 -0
- package/dist/types/components/utils/icon.d.ts +2 -0
- package/package.json +7 -6
- package/dist/types/components/QueryPanel/VisualizationIcon.d.ts +0 -5
package/dist/cjs/index.cjs
CHANGED
|
@@ -5010,6 +5010,8 @@ const SvgWarning = (props2) => /* @__PURE__ */ React__namespace.createElement("s
|
|
|
5010
5010
|
const SvgCheckCircle = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m424-296 282-282-56-56-226 226-114-114-56 56 170 170Zm56 216q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }));
|
|
5011
5011
|
const SvgInfo = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M440-280h80v-240h-80v240Zm40-320q17 0 28.5-11.5T520-640q0-17-11.5-28.5T480-680q-17 0-28.5 11.5T440-640q0 17 11.5 28.5T480-600Zm0 520q-83 0-156-31.5T197-197q-54-54-85.5-127T80-480q0-83 31.5-156T197-763q54-54 127-85.5T480-880q83 0 156 31.5T763-763q54 54 85.5 127T880-480q0 83-31.5 156T763-197q-54 54-127 85.5T480-80Zm0-80q134 0 227-93t93-227q0-134-93-227t-227-93q-134 0-227 93t-93 227q0 134 93 227t227 93Zm0-320Z" }));
|
|
5012
5012
|
const SvgError = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", height: "24px", viewBox: "0 -960 960 960", width: "24px", fill: "currentColor", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M480-280q17 0 28.5-11.5T520-320q0-17-11.5-28.5T480-360q-17 0-28.5 11.5T440-320q0 17 11.5 28.5T480-280Zm-40-160h80v-240h-80v240ZM330-120 120-330v-300l210-210h300l210 210v300L630-120H330Zm34-80h232l164-164v-232L596-760H364L200-596v232l164 164Zm116-280Z" }));
|
|
5013
|
+
const SvgRefresh = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { height: 20, viewBox: "0 0 20 20", width: 20, xmlns: "http://www.w3.org/2000/svg", ...props2 }, /* @__PURE__ */ React__namespace.createElement("g", { fill: "none", stroke: "currentColor" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "m17.08 11.15c.01.16.02.32.02.49 0 3.89-3.16 7.05-7.05 7.05-3.89-.01-7.05-3.16-7.05-7.06 0-3.89 3.16-7.05 7.05-7.05.85 0 1.66.15 2.41.42", strokeWidth: 1.1 }), /* @__PURE__ */ React__namespace.createElement("path", { d: "m9.9 2 2.89 2.89-3 3.01" })));
|
|
5014
|
+
const SvgSidebarCollapse = (props2) => /* @__PURE__ */ React__namespace.createElement("svg", { height: 24, viewBox: "0 0 24 24", width: 24, xmlns: "http://www.w3.org/2000/svg", fill: "currentColor", stroke: "none", ...props2 }, /* @__PURE__ */ React__namespace.createElement("path", { fill: "currentColor", stroke: "none", d: "m20 24h-16c-2.2 0-4-1.8-4-4v-16c0-2.2 1.8-4 4-4h16c2.2 0 4 1.8 4 4v16c0 2.2-1.8 4-4 4zm-16-22c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2v-16c0-1.1-.9-2-2-2z" }), /* @__PURE__ */ React__namespace.createElement("path", { fill: "currentColor", d: "m8 24c-.6 0-1-.4-1-1v-22c0-.6.4-1 1-1s1 .4 1 1v22c0 .6-.4 1-1 1z" }), /* @__PURE__ */ React__namespace.createElement("path", { fill: "currentColor", d: "m14 13c-.3 0-.5-.1-.7-.3-.4-.4-.4-1 0-1.4l3-3c.4-.4 1-.4 1.4 0s.4 1 0 1.4l-3 3c-.2.2-.4.3-.7.3z" }), /* @__PURE__ */ React__namespace.createElement("path", { fill: "currentColor", d: "m17 16c-.3 0-.5-.1-.7-.3l-3-3c-.4-.4-.4-1 0-1.4s1-.4 1.4 0l3 3c.4.4.4 1 0 1.4-.2.2-.4.3-.7.3z" }));
|
|
5013
5015
|
const SvgVizBarChart = (props2) => /* @__PURE__ */ React__namespace.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__namespace.createElement("g", { id: "viz_bar_chart", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "Group-3", transform: "translate(20.000000, 24.000000)", fill: "currentColor" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "Group-2", transform: "translate(34.500000, 31.000000) rotate(-270.000000) translate(-34.500000, -31.000000) translate(3.500000, -3.500000)" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M-26.056314,30.056314 L34.943686,30.056314 C37.152825,30.056314 38.943686,31.847175 38.943686,34.056314 L38.943686,34.943686 C38.943686,37.152825 37.152825,38.943686 34.943686,38.943686 L-26.056314,38.943686 C-28.265453,38.943686 -30.056314,37.152825 -30.056314,34.943686 L-30.056314,34.056314 C-30.056314,31.847175 -28.265453,30.056314 -26.056314,30.056314 Z", id: "Rectangle-Copy-59", transform: "translate(4.443686, 34.500000) rotate(-90.000000) translate(-4.443686, -34.500000) " }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M-0.491247385,37.8466366 L44.9281075,37.8466366 C47.1372465,37.8466366 48.9281075,39.6374976 48.9281075,41.8466366 L48.9281075,42.7340086 C48.9281075,44.9431476 47.1372465,46.7340086 44.9281075,46.7340086 L-0.491247385,46.7340086 C-2.70038638,46.7340086 -4.49124739,44.9431476 -4.49124739,42.7340086 L-4.49124739,41.8466366 C-4.49124739,39.6374976 -2.70038638,37.8466366 -0.491247385,37.8466366 Z", id: "Rectangle-Copy-62", transform: "translate(22.218430, 42.290323) rotate(-90.000000) translate(-22.218430, -42.290323) " }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M23.3837854,43.9469253 L56.6025627,43.9469253 C58.8117017,43.9469253 60.6025627,45.7377863 60.6025627,47.9469253 L60.6025627,48.8342973 C60.6025627,51.0434363 58.8117017,52.8342973 56.6025627,52.8342973 L23.3837854,52.8342973 C21.1746464,52.8342973 19.3837854,51.0434363 19.3837854,48.8342973 L19.3837854,47.9469253 C19.3837854,45.7377863 21.1746464,43.9469253 23.3837854,43.9469253 Z", id: "Rectangle-Copy-66", transform: "translate(39.993174, 48.390611) rotate(-90.000000) translate(-39.993174, -48.390611) " }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M46.7286345,49.7286345 L68.8072017,49.7286345 C71.0163407,49.7286345 72.8072017,51.5194955 72.8072017,53.7286345 L72.8072017,54.1927983 C72.8072017,56.4019373 71.0163407,58.1927983 68.8072017,58.1927983 L46.7286345,58.1927983 C44.5194955,58.1927983 42.7286345,56.4019373 42.7286345,54.1927983 L42.7286345,53.7286345 C42.7286345,51.5194955 44.5194955,49.7286345 46.7286345,49.7286345 Z", id: "Rectangle-Copy-67", transform: "translate(57.767918, 53.960716) rotate(-90.000000) translate(-57.767918, -53.960716) " })))));
|
|
5014
5016
|
const SvgVizBoolean = (props2) => /* @__PURE__ */ React__namespace.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__namespace.createElement("g", { id: "viz_boolean", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "noun_switch_3350414-2", transform: "translate(20.000000, 22.000000)", fill: "currentColor", fillRule: "nonzero" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "noun_switch_3350414" }, /* @__PURE__ */ React__namespace.createElement("path", { d: "M15.2972028,30.8 L54.7027972,30.8 C63.151209,30.8 70,23.9051851 70,15.4 C70,6.89481485 63.151209,0 54.7027972,0 L15.2972028,0 C6.84879098,0 0,6.89481485 0,15.4 C0,23.9051851 6.84879098,30.8 15.2972028,30.8 Z M15.2972028,6.16 L54.7027972,6.16 C59.7718443,6.16 63.8811189,10.2968889 63.8811189,15.4 C63.8811189,20.5031111 59.7718443,24.64 54.7027972,24.64 L15.2972028,24.64 C10.2281557,24.64 6.11888112,20.5031111 6.11888112,15.4 C6.11888112,10.2968889 10.2281557,6.16 15.2972028,6.16 Z", id: "Shape" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M19.6340542,21.9997804 C22.2930484,22.0215224 24.7022661,20.4273668 25.7348338,17.9629544 C26.7674016,15.4985421 26.2191958,12.6510518 24.3466309,10.7523518 C22.474066,8.85365189 19.6473211,8.27908795 17.1885612,9.29740315 C14.7298014,10.3157183 13.125,12.7256064 13.125,15.3998806 C13.125,19.0240523 16.0305897,21.9703156 19.6340542,21.9997804 L19.6340542,21.9997804 Z", id: "Path" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M54.7027971,35.2 L15.2972025,35.2 C6.84879081,35.2 0,42.094815 0,50.6 C0,59.105185 6.84879081,66 15.2972025,66 L54.7027971,66 C63.151209,66 70,59.1051851 70,50.6 C70,42.0948149 63.151209,35.2 54.7027971,35.2 L54.7027971,35.2 Z M54.7027971,59.84 L15.2972025,59.84 C10.2281554,59.84 6.11888082,55.7031111 6.11888082,50.6 C6.11888082,45.4968889 10.2281554,41.36 15.2972025,41.36 L54.7027971,41.36 C59.7718442,41.36 63.8811189,45.4968889 63.8811189,50.6 C63.8811189,55.7031111 59.7718442,59.84 54.7027971,59.84 L54.7027971,59.84 Z", id: "Shape" }), /* @__PURE__ */ React__namespace.createElement("path", { d: "M50.3659458,44.0002196 C47.7069516,43.9784776 45.2977339,45.5726332 44.2651662,48.0370456 C43.2325984,50.5014579 43.7808042,53.3489482 45.6533691,55.2476482 C47.525934,57.1463481 50.3526789,57.720912 52.8114388,56.7025969 C55.2701986,55.6842817 56.875,53.2743936 56.875,50.6001194 C56.875,46.9759477 53.9694103,44.0296844 50.3659458,44.0002196 Z", id: "Path" })))));
|
|
5015
5017
|
const SvgVizColumnChart = (props2) => /* @__PURE__ */ React__namespace.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__namespace.createElement("g", { id: "viz_column_chart", stroke: "none", strokeWidth: 1, fill: "none", fillRule: "evenodd" }, /* @__PURE__ */ React__namespace.createElement("g", { id: "Group", transform: "translate(23.500000, 19.500000)", fill: "currentColor" }, /* @__PURE__ */ React__namespace.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__namespace.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__namespace.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__namespace.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) " }))));
|
|
@@ -5047,6 +5049,8 @@ const ICON_MAP = {
|
|
|
5047
5049
|
check_circle: SvgCheckCircle,
|
|
5048
5050
|
info: SvgInfo,
|
|
5049
5051
|
error: SvgError,
|
|
5052
|
+
refresh: SvgRefresh,
|
|
5053
|
+
sidebarCollapse: SvgSidebarCollapse,
|
|
5050
5054
|
// Operations
|
|
5051
5055
|
aggregate: SvgInsertMeasure,
|
|
5052
5056
|
dimension: SvgTypeIconString,
|
|
@@ -5113,10 +5117,10 @@ function Icon({
|
|
|
5113
5117
|
return null;
|
|
5114
5118
|
}
|
|
5115
5119
|
return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {
|
|
5116
|
-
..._stylex.props(styles$
|
|
5120
|
+
..._stylex.props(styles$G.main, colorVariants$3[color], SMALL_ICONS.includes(name) && styles$G.scaleUp, customStyle)
|
|
5117
5121
|
});
|
|
5118
5122
|
}
|
|
5119
|
-
const styles$
|
|
5123
|
+
const styles$G = {
|
|
5120
5124
|
main: {
|
|
5121
5125
|
display: "mly1rg5ohu",
|
|
5122
5126
|
width: "mly1kky2od",
|
|
@@ -5189,17 +5193,17 @@ function Badge({
|
|
|
5189
5193
|
customStyle
|
|
5190
5194
|
}) {
|
|
5191
5195
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
5192
|
-
..._stylex.props(styles$
|
|
5196
|
+
..._stylex.props(styles$F.main, colorVariants$2[color], customStyle),
|
|
5193
5197
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
5194
5198
|
color,
|
|
5195
5199
|
name: icon
|
|
5196
5200
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
5197
|
-
..._stylex.props(fontStyles.badge, styles$
|
|
5201
|
+
..._stylex.props(fontStyles.badge, styles$F.label),
|
|
5198
5202
|
children: label
|
|
5199
5203
|
})]
|
|
5200
5204
|
});
|
|
5201
5205
|
}
|
|
5202
|
-
const styles$
|
|
5206
|
+
const styles$F = {
|
|
5203
5207
|
main: {
|
|
5204
5208
|
display: "mly3nfvp2",
|
|
5205
5209
|
height: "mly1qx5ct2",
|
|
@@ -5281,10 +5285,10 @@ function Divider({
|
|
|
5281
5285
|
customStyle
|
|
5282
5286
|
}) {
|
|
5283
5287
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
5284
|
-
..._stylex.props(styles$
|
|
5288
|
+
..._stylex.props(styles$E.main, orientationVariants[orientation], customStyle)
|
|
5285
5289
|
});
|
|
5286
5290
|
}
|
|
5287
|
-
const styles$
|
|
5291
|
+
const styles$E = {
|
|
5288
5292
|
main: {
|
|
5289
5293
|
background: "mly1xnbgy5",
|
|
5290
5294
|
backgroundAttachment: null,
|
|
@@ -5337,7 +5341,7 @@ function ListItem({
|
|
|
5337
5341
|
children: [startIcon && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5338
5342
|
children: startIcon
|
|
5339
5343
|
}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
5340
|
-
..._stylex.props(fontStyles.body, styles$
|
|
5344
|
+
..._stylex.props(fontStyles.body, styles$D.label),
|
|
5341
5345
|
children: label
|
|
5342
5346
|
}), badge && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
|
|
5343
5347
|
children: badge
|
|
@@ -5346,7 +5350,7 @@ function ListItem({
|
|
|
5346
5350
|
})]
|
|
5347
5351
|
});
|
|
5348
5352
|
}
|
|
5349
|
-
const styles$
|
|
5353
|
+
const styles$D = {
|
|
5350
5354
|
label: {
|
|
5351
5355
|
flexGrow: "mly1iyjqo2",
|
|
5352
5356
|
$$css: true
|
|
@@ -6121,7 +6125,7 @@ function Button({
|
|
|
6121
6125
|
...props2
|
|
6122
6126
|
}) {
|
|
6123
6127
|
const button = /* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
6124
|
-
..._stylex.props(styles$
|
|
6128
|
+
..._stylex.props(styles$C.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
|
|
6125
6129
|
...onClick && {
|
|
6126
6130
|
onClick: (e) => {
|
|
6127
6131
|
e.preventDefault();
|
|
@@ -6137,9 +6141,9 @@ function Button({
|
|
|
6137
6141
|
},
|
|
6138
6142
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
6139
6143
|
name: icon,
|
|
6140
|
-
customStyle: styles$
|
|
6144
|
+
customStyle: styles$C.icon
|
|
6141
6145
|
}), label && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
6142
|
-
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$
|
|
6146
|
+
..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$C.label),
|
|
6143
6147
|
children: label
|
|
6144
6148
|
})]
|
|
6145
6149
|
}), isDisabled && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -6166,7 +6170,7 @@ function Button({
|
|
|
6166
6170
|
return button;
|
|
6167
6171
|
}
|
|
6168
6172
|
}
|
|
6169
|
-
const styles$
|
|
6173
|
+
const styles$C = {
|
|
6170
6174
|
main: {
|
|
6171
6175
|
display: "mly3nfvp2",
|
|
6172
6176
|
flexDirection: "mlydt5ytf",
|
|
@@ -6288,7 +6292,8 @@ const sizeVariants$1 = {
|
|
|
6288
6292
|
};
|
|
6289
6293
|
const tokenStyles = {
|
|
6290
6294
|
main: {
|
|
6291
|
-
display: "
|
|
6295
|
+
display: "mlywz0xwf",
|
|
6296
|
+
gridAutoFlow: "mly1mt1orb",
|
|
6292
6297
|
alignItems: "mly6s0dn4",
|
|
6293
6298
|
justifyContent: "mlyl56j7k",
|
|
6294
6299
|
gap: "mly167g77z",
|
|
@@ -6345,6 +6350,7 @@ const tokenStyles = {
|
|
|
6345
6350
|
overflow: "mlyb3r6kr",
|
|
6346
6351
|
overflowX: null,
|
|
6347
6352
|
overflowY: null,
|
|
6353
|
+
whiteSpace: "mlyuxw1ft",
|
|
6348
6354
|
$$css: true
|
|
6349
6355
|
}
|
|
6350
6356
|
};
|
|
@@ -6413,7 +6419,7 @@ function Token({
|
|
|
6413
6419
|
}) {
|
|
6414
6420
|
const isInteractive = onClick !== void 0 || asButtonTrigger;
|
|
6415
6421
|
const token2 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
6416
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$
|
|
6422
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$B.nonInteractive, customStyle),
|
|
6417
6423
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
6418
6424
|
name: icon,
|
|
6419
6425
|
customStyle: tokenStyles.icon
|
|
@@ -6448,7 +6454,7 @@ function Token({
|
|
|
6448
6454
|
})]
|
|
6449
6455
|
}) : token2;
|
|
6450
6456
|
}
|
|
6451
|
-
const styles$
|
|
6457
|
+
const styles$B = {
|
|
6452
6458
|
nonInteractive: {
|
|
6453
6459
|
cursor: "mlyt0e3qv",
|
|
6454
6460
|
background: "mly1np9qvj",
|
|
@@ -6472,7 +6478,7 @@ function TokenGroup({
|
|
|
6472
6478
|
}) {
|
|
6473
6479
|
const count2 = React__namespace.Children.count(children);
|
|
6474
6480
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
6475
|
-
..._stylex.props(styles$
|
|
6481
|
+
..._stylex.props(styles$A.main, customStyle),
|
|
6476
6482
|
children: React__namespace.Children.map(children, (child, index2) => /* @__PURE__ */ React__namespace.cloneElement(child, {
|
|
6477
6483
|
customStyle: {
|
|
6478
6484
|
...child.props.customStyle,
|
|
@@ -6483,16 +6489,16 @@ function TokenGroup({
|
|
|
6483
6489
|
});
|
|
6484
6490
|
}
|
|
6485
6491
|
const getChildStyle = (index2, count2) => {
|
|
6486
|
-
if (count2 === 1) return styles$
|
|
6487
|
-
if (index2 === 0) return styles$
|
|
6488
|
-
if (index2 === count2 - 1) return styles$
|
|
6489
|
-
return styles$
|
|
6492
|
+
if (count2 === 1) return styles$A.onlyChild;
|
|
6493
|
+
if (index2 === 0) return styles$A.firstChild;
|
|
6494
|
+
if (index2 === count2 - 1) return styles$A.lastChild;
|
|
6495
|
+
return styles$A.innerChild;
|
|
6490
6496
|
};
|
|
6491
6497
|
const getTokenColor = (child, groupColor) => {
|
|
6492
6498
|
const childColor = child.props.color;
|
|
6493
6499
|
return childColor === void 0 ? groupColor : childColor;
|
|
6494
6500
|
};
|
|
6495
|
-
const styles$
|
|
6501
|
+
const styles$A = {
|
|
6496
6502
|
main: {
|
|
6497
6503
|
display: "mlyrvj5dj",
|
|
6498
6504
|
gridAutoFlow: "mly1mt1orb",
|
|
@@ -6564,7 +6570,7 @@ function ErrorIcon({
|
|
|
6564
6570
|
},
|
|
6565
6571
|
children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
6566
6572
|
name: "warning",
|
|
6567
|
-
customStyle: styles$
|
|
6573
|
+
customStyle: styles$z.errorIcon
|
|
6568
6574
|
})
|
|
6569
6575
|
})
|
|
6570
6576
|
}), /* @__PURE__ */ jsxRuntime.jsx(TooltipPortal, {
|
|
@@ -6577,7 +6583,7 @@ function ErrorIcon({
|
|
|
6577
6583
|
})]
|
|
6578
6584
|
});
|
|
6579
6585
|
}
|
|
6580
|
-
const styles$
|
|
6586
|
+
const styles$z = {
|
|
6581
6587
|
errorIcon: {
|
|
6582
6588
|
color: "mly1e2nbdu",
|
|
6583
6589
|
$$css: true
|
|
@@ -6622,28 +6628,29 @@ function EditableToken({
|
|
|
6622
6628
|
className: "mly78zum5 mly6s0dn4"
|
|
6623
6629
|
},
|
|
6624
6630
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
6625
|
-
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$
|
|
6631
|
+
..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$y.focused, !!errorMessage && styles$y.hasError, customStyle),
|
|
6626
6632
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
6627
6633
|
name: icon,
|
|
6628
|
-
customStyle: styles$
|
|
6634
|
+
customStyle: styles$y.icon
|
|
6629
6635
|
}), /* @__PURE__ */ jsxRuntime.jsxs("span", {
|
|
6630
6636
|
...{
|
|
6631
|
-
className: "mlywz0xwf
|
|
6637
|
+
className: "mlywz0xwf"
|
|
6632
6638
|
},
|
|
6633
6639
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
6634
|
-
..._stylex.props(fontStyles.body, styles$
|
|
6640
|
+
..._stylex.props(fontStyles.body, styles$y.placeholder),
|
|
6635
6641
|
style: {
|
|
6636
6642
|
whiteSpaceCollapse: "preserve"
|
|
6637
6643
|
},
|
|
6638
6644
|
children: value
|
|
6639
6645
|
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
6640
|
-
..._stylex.props(styles$
|
|
6646
|
+
..._stylex.props(styles$y.input, fontStyles.body),
|
|
6641
6647
|
ref: inputRef,
|
|
6642
6648
|
pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
|
|
6643
6649
|
value,
|
|
6644
6650
|
onChange: handleChange,
|
|
6645
6651
|
onFocus: handleFocus,
|
|
6646
|
-
onBlur: handleBlur
|
|
6652
|
+
onBlur: handleBlur,
|
|
6653
|
+
size: 1
|
|
6647
6654
|
})]
|
|
6648
6655
|
}), onRemove && isFocused && /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
6649
6656
|
...{
|
|
@@ -6661,7 +6668,7 @@ function EditableToken({
|
|
|
6661
6668
|
})]
|
|
6662
6669
|
});
|
|
6663
6670
|
}
|
|
6664
|
-
const styles$
|
|
6671
|
+
const styles$y = {
|
|
6665
6672
|
focused: {
|
|
6666
6673
|
background: "mlyotlr4g",
|
|
6667
6674
|
backgroundAttachment: null,
|
|
@@ -6733,6 +6740,7 @@ const styles$s = {
|
|
|
6733
6740
|
gridColumnStart: null,
|
|
6734
6741
|
gridColumnEnd: null,
|
|
6735
6742
|
whiteSpace: "mlyuxw1ft",
|
|
6743
|
+
minWidth: "mlygc0pbm",
|
|
6736
6744
|
$$css: true
|
|
6737
6745
|
},
|
|
6738
6746
|
input: {
|
|
@@ -6744,7 +6752,6 @@ const styles$s = {
|
|
|
6744
6752
|
gridColumn: null,
|
|
6745
6753
|
gridColumnStart: null,
|
|
6746
6754
|
gridColumnEnd: null,
|
|
6747
|
-
minWidth: "mly1mnxie6",
|
|
6748
6755
|
padding: "mly1717udv",
|
|
6749
6756
|
paddingInline: null,
|
|
6750
6757
|
paddingStart: null,
|
|
@@ -6780,6 +6787,7 @@ const styles$s = {
|
|
|
6780
6787
|
outlineStyle: null,
|
|
6781
6788
|
outlineWidth: null,
|
|
6782
6789
|
whiteSpace: "mlyuxw1ft",
|
|
6790
|
+
minWidth: "mlygc0pbm",
|
|
6783
6791
|
$$css: true
|
|
6784
6792
|
}
|
|
6785
6793
|
};
|
|
@@ -8004,12 +8012,12 @@ function TextInput({
|
|
|
8004
8012
|
}
|
|
8005
8013
|
};
|
|
8006
8014
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8007
|
-
..._stylex.props(styles$
|
|
8015
|
+
..._stylex.props(styles$x.main, isFocused && styles$x.focused, sizeVariants[size2], customStyle),
|
|
8008
8016
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8009
8017
|
name: icon,
|
|
8010
8018
|
color: "secondary"
|
|
8011
8019
|
}), /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
8012
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8020
|
+
..._stylex.props(fontStyles.body, styles$x.input),
|
|
8013
8021
|
value,
|
|
8014
8022
|
placeholder,
|
|
8015
8023
|
onChange: handleChange,
|
|
@@ -8017,7 +8025,7 @@ function TextInput({
|
|
|
8017
8025
|
onBlur: handleBlur,
|
|
8018
8026
|
onKeyDown
|
|
8019
8027
|
}), hasClear && /* @__PURE__ */ jsxRuntime.jsx("button", {
|
|
8020
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
8028
|
+
..._stylex.props(fontStyles.supporting, styles$x.actionButton, value === "" && styles$x.hidden),
|
|
8021
8029
|
ref: buttonRef,
|
|
8022
8030
|
onClick: () => onChange(""),
|
|
8023
8031
|
tabIndex: 0,
|
|
@@ -8025,7 +8033,7 @@ function TextInput({
|
|
|
8025
8033
|
})]
|
|
8026
8034
|
});
|
|
8027
8035
|
}
|
|
8028
|
-
const styles$
|
|
8036
|
+
const styles$x = {
|
|
8029
8037
|
main: {
|
|
8030
8038
|
display: "mly78zum5",
|
|
8031
8039
|
alignItems: "mly6s0dn4",
|
|
@@ -8100,6 +8108,7 @@ const styles$r = {
|
|
|
8100
8108
|
input: {
|
|
8101
8109
|
flexGrow: "mly1iyjqo2",
|
|
8102
8110
|
height: "mly1qx5ct2",
|
|
8111
|
+
minWidth: "mlygc0pbm",
|
|
8103
8112
|
padding: "mly1717udv",
|
|
8104
8113
|
paddingInline: null,
|
|
8105
8114
|
paddingStart: null,
|
|
@@ -8233,7 +8242,7 @@ function SelectorToken({
|
|
|
8233
8242
|
onValueChange: handleValueChange,
|
|
8234
8243
|
required: true,
|
|
8235
8244
|
children: [/* @__PURE__ */ jsxRuntime.jsxs(Trigger$3, {
|
|
8236
|
-
..._stylex.props(tokenStyles.main, styles$
|
|
8245
|
+
..._stylex.props(tokenStyles.main, styles$w.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
|
|
8237
8246
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8238
8247
|
name: icon,
|
|
8239
8248
|
customStyle: tokenStyles.icon
|
|
@@ -8262,7 +8271,7 @@ function SelectorToken({
|
|
|
8262
8271
|
size: "compact",
|
|
8263
8272
|
icon: "search",
|
|
8264
8273
|
hasClear: true,
|
|
8265
|
-
customStyle: styles$
|
|
8274
|
+
customStyle: styles$w.searchInput,
|
|
8266
8275
|
onKeyDown: (event) => {
|
|
8267
8276
|
const excludedKeys = ["ArrowUp", "ArrowDown"];
|
|
8268
8277
|
if (!excludedKeys.includes(event.key)) {
|
|
@@ -8295,21 +8304,21 @@ function SelectItem({
|
|
|
8295
8304
|
...props2
|
|
8296
8305
|
}) {
|
|
8297
8306
|
return /* @__PURE__ */ jsxRuntime.jsxs(Item$1, {
|
|
8298
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8307
|
+
..._stylex.props(fontStyles.body, styles$w.selectItem),
|
|
8299
8308
|
value,
|
|
8300
8309
|
...props2,
|
|
8301
8310
|
children: [value === selectedValue ? /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8302
8311
|
name: "radioChecked",
|
|
8303
|
-
customStyle: styles$
|
|
8312
|
+
customStyle: styles$w.radioChecked
|
|
8304
8313
|
}) : /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
8305
8314
|
name: "radioUnchecked",
|
|
8306
|
-
customStyle: styles$
|
|
8315
|
+
customStyle: styles$w.radioUnchecked
|
|
8307
8316
|
}), /* @__PURE__ */ jsxRuntime.jsx(ItemText, {
|
|
8308
8317
|
children
|
|
8309
8318
|
})]
|
|
8310
8319
|
});
|
|
8311
8320
|
}
|
|
8312
|
-
const styles$
|
|
8321
|
+
const styles$w = {
|
|
8313
8322
|
selectTrigger: {
|
|
8314
8323
|
whiteSpace: "mlyuxw1ft",
|
|
8315
8324
|
overflow: "mlyb3r6kr",
|
|
@@ -8399,7 +8408,7 @@ function Card({
|
|
|
8399
8408
|
customStyle
|
|
8400
8409
|
}) {
|
|
8401
8410
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
8402
|
-
..._stylex.props(styles$
|
|
8411
|
+
..._stylex.props(styles$v.container, customStyle),
|
|
8403
8412
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
8404
8413
|
...{
|
|
8405
8414
|
className: "mly1717udv"
|
|
@@ -8413,7 +8422,7 @@ function Card({
|
|
|
8413
8422
|
})]
|
|
8414
8423
|
});
|
|
8415
8424
|
}
|
|
8416
|
-
const styles$
|
|
8425
|
+
const styles$v = {
|
|
8417
8426
|
container: {
|
|
8418
8427
|
display: "mly78zum5",
|
|
8419
8428
|
flexDirection: "mlydt5ytf",
|
|
@@ -8504,10 +8513,10 @@ function CollapsibleListItem({
|
|
|
8504
8513
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
|
|
8505
8514
|
},
|
|
8506
8515
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
8507
|
-
..._stylex.props(fontStyles.body, styles$
|
|
8516
|
+
..._stylex.props(fontStyles.body, styles$u.label),
|
|
8508
8517
|
children: label
|
|
8509
8518
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
8510
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
8519
|
+
..._stylex.props(fontStyles.supporting, styles$u.sublabel),
|
|
8511
8520
|
children: sublabel
|
|
8512
8521
|
})]
|
|
8513
8522
|
})]
|
|
@@ -8519,7 +8528,7 @@ function CollapsibleListItem({
|
|
|
8519
8528
|
})]
|
|
8520
8529
|
});
|
|
8521
8530
|
}
|
|
8522
|
-
const styles$
|
|
8531
|
+
const styles$u = {
|
|
8523
8532
|
label: {
|
|
8524
8533
|
flexGrow: "mly1iyjqo2",
|
|
8525
8534
|
fontWeight: "mly1xlr1w8",
|
|
@@ -19329,7 +19338,7 @@ function Spinner({
|
|
|
19329
19338
|
} = SIZES[size2];
|
|
19330
19339
|
const frameSize = diameter + border * 2;
|
|
19331
19340
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
19332
|
-
..._stylex.props(styles$
|
|
19341
|
+
..._stylex.props(styles$t.root, customStyle),
|
|
19333
19342
|
children: /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
19334
19343
|
"aria-valuetext": "Loading",
|
|
19335
19344
|
...{
|
|
@@ -19349,7 +19358,7 @@ function Spinner({
|
|
|
19349
19358
|
})
|
|
19350
19359
|
});
|
|
19351
19360
|
}
|
|
19352
|
-
const styles$
|
|
19361
|
+
const styles$t = {
|
|
19353
19362
|
root: {
|
|
19354
19363
|
alignItems: "mly6s0dn4",
|
|
19355
19364
|
display: "mly3nfvp2",
|
|
@@ -22034,20 +22043,20 @@ function getCalendarFormat(myMoment, now2) {
|
|
|
22034
22043
|
var diff2 = myMoment.diff(now2, "days", true);
|
|
22035
22044
|
return diff2 < -6 ? "sameElse" : diff2 < -1 ? "lastWeek" : diff2 < 0 ? "lastDay" : diff2 < 1 ? "sameDay" : diff2 < 2 ? "nextDay" : diff2 < 7 ? "nextWeek" : "sameElse";
|
|
22036
22045
|
}
|
|
22037
|
-
function calendar$1(time,
|
|
22046
|
+
function calendar$1(time, formats2) {
|
|
22038
22047
|
if (arguments.length === 1) {
|
|
22039
22048
|
if (!arguments[0]) {
|
|
22040
22049
|
time = void 0;
|
|
22041
|
-
|
|
22050
|
+
formats2 = void 0;
|
|
22042
22051
|
} else if (isMomentInput(arguments[0])) {
|
|
22043
22052
|
time = arguments[0];
|
|
22044
|
-
|
|
22053
|
+
formats2 = void 0;
|
|
22045
22054
|
} else if (isCalendarSpec(arguments[0])) {
|
|
22046
|
-
|
|
22055
|
+
formats2 = arguments[0];
|
|
22047
22056
|
time = void 0;
|
|
22048
22057
|
}
|
|
22049
22058
|
}
|
|
22050
|
-
var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output =
|
|
22059
|
+
var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats2 && (isFunction(formats2[format2]) ? formats2[format2].call(this, now2) : formats2[format2]);
|
|
22051
22060
|
return this.format(
|
|
22052
22061
|
output || this.localeData().calendar(format2, this, createLocal(now2))
|
|
22053
22062
|
);
|
|
@@ -22403,7 +22412,7 @@ function valueOf() {
|
|
|
22403
22412
|
function unix() {
|
|
22404
22413
|
return Math.floor(this.valueOf() / 1e3);
|
|
22405
22414
|
}
|
|
22406
|
-
function toDate
|
|
22415
|
+
function toDate() {
|
|
22407
22416
|
return new Date(this.valueOf());
|
|
22408
22417
|
}
|
|
22409
22418
|
function toArray() {
|
|
@@ -22857,7 +22866,7 @@ proto.startOf = startOf;
|
|
|
22857
22866
|
proto.subtract = subtract;
|
|
22858
22867
|
proto.toArray = toArray;
|
|
22859
22868
|
proto.toObject = toObject;
|
|
22860
|
-
proto.toDate = toDate
|
|
22869
|
+
proto.toDate = toDate;
|
|
22861
22870
|
proto.toISOString = toISOString;
|
|
22862
22871
|
proto.inspect = inspect;
|
|
22863
22872
|
if (typeof Symbol !== "undefined" && Symbol.for != null) {
|
|
@@ -23748,7 +23757,7 @@ const Popover = ({
|
|
|
23748
23757
|
})
|
|
23749
23758
|
});
|
|
23750
23759
|
};
|
|
23751
|
-
const styles$
|
|
23760
|
+
const styles$s = {
|
|
23752
23761
|
wrapper: {
|
|
23753
23762
|
position: "mly1n2onr6",
|
|
23754
23763
|
$$css: true
|
|
@@ -23799,7 +23808,7 @@ const SelectDropdown = ({
|
|
|
23799
23808
|
setOpen(false);
|
|
23800
23809
|
};
|
|
23801
23810
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
23802
|
-
..._stylex.props(styles$
|
|
23811
|
+
..._stylex.props(styles$s.wrapper, customStyle),
|
|
23803
23812
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("button", {
|
|
23804
23813
|
type: "button",
|
|
23805
23814
|
autoFocus,
|
|
@@ -23866,7 +23875,7 @@ function SelectList({
|
|
|
23866
23875
|
}) {
|
|
23867
23876
|
const [hoveredIndex, setHoveredIndex] = React.useState(null);
|
|
23868
23877
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
23869
|
-
..._stylex.props(styles$
|
|
23878
|
+
..._stylex.props(styles$s.selectListDiv, customStyle),
|
|
23870
23879
|
children: options.reduce((result, option2, index2) => {
|
|
23871
23880
|
const isSelected = value !== void 0 && valueEqual(value, option2.value);
|
|
23872
23881
|
if (option2.divider) {
|
|
@@ -23898,8 +23907,8 @@ function SelectList({
|
|
|
23898
23907
|
}), /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
23899
23908
|
name: "checkmark",
|
|
23900
23909
|
customStyle: {
|
|
23901
|
-
...styles$
|
|
23902
|
-
...isSelected ? styles$
|
|
23910
|
+
...styles$s.checkIcon,
|
|
23911
|
+
...isSelected ? styles$s.checkIconSelected : void 0
|
|
23903
23912
|
}
|
|
23904
23913
|
}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
23905
23914
|
...{
|
|
@@ -23912,31 +23921,20 @@ function SelectList({
|
|
|
23912
23921
|
}, [])
|
|
23913
23922
|
});
|
|
23914
23923
|
}
|
|
23915
|
-
function granularityIndex(granularity) {
|
|
23916
|
-
return ["year", "quarter", "month", "week", "day", "hour", "minute", "second"].indexOf(granularity);
|
|
23917
|
-
}
|
|
23918
23924
|
function monthName(month) {
|
|
23919
23925
|
return ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][month];
|
|
23920
23926
|
}
|
|
23921
23927
|
function DatePicker({
|
|
23922
23928
|
value,
|
|
23923
23929
|
setValue,
|
|
23930
|
+
units,
|
|
23924
23931
|
maxLevel,
|
|
23925
|
-
|
|
23932
|
+
customStyle
|
|
23926
23933
|
}) {
|
|
23927
23934
|
const [date, setDate] = React.useState(value);
|
|
23928
23935
|
const calendar2 = getCalendar(date);
|
|
23929
|
-
const [pickLevel, setPickLevel] = React.useState(
|
|
23936
|
+
const [pickLevel, setPickLevel] = React.useState(units);
|
|
23930
23937
|
const yearBucket = Math.floor(hooks(date).year() / 10) * 10;
|
|
23931
|
-
React.useEffect(() => {
|
|
23932
|
-
if (granularityIndex(maxLevel) < granularityIndex(pickLevel)) {
|
|
23933
|
-
setPickLevel(maxLevel);
|
|
23934
|
-
} else if (pickLevel === "quarter" && maxLevel !== "quarter") {
|
|
23935
|
-
setPickLevel(maxLevel);
|
|
23936
|
-
} else if (pickLevel === "week" && maxLevel !== "week") {
|
|
23937
|
-
setPickLevel(maxLevel);
|
|
23938
|
-
}
|
|
23939
|
-
}, [maxLevel, pickLevel]);
|
|
23940
23938
|
React.useEffect(() => {
|
|
23941
23939
|
setDate(value);
|
|
23942
23940
|
}, [value]);
|
|
@@ -23944,13 +23942,6 @@ function DatePicker({
|
|
|
23944
23942
|
const newDate = hooks(date).year(year).toDate();
|
|
23945
23943
|
setDate(newDate);
|
|
23946
23944
|
setValue(newDate);
|
|
23947
|
-
if (maxLevel !== "year") {
|
|
23948
|
-
if (maxLevel === "quarter") {
|
|
23949
|
-
setPickLevel("quarter");
|
|
23950
|
-
} else {
|
|
23951
|
-
setPickLevel("month");
|
|
23952
|
-
}
|
|
23953
|
-
}
|
|
23954
23945
|
};
|
|
23955
23946
|
const yearButton = (offset2) => {
|
|
23956
23947
|
const click = () => setYear(yearBucket + offset2);
|
|
@@ -23980,27 +23971,14 @@ function DatePicker({
|
|
|
23980
23971
|
const newDate = hooks(date).month(month).toDate();
|
|
23981
23972
|
setDate(newDate);
|
|
23982
23973
|
setValue(newDate);
|
|
23983
|
-
if (maxLevel !== "month") {
|
|
23984
|
-
if (maxLevel === "week") {
|
|
23985
|
-
setPickLevel("week");
|
|
23986
|
-
} else {
|
|
23987
|
-
setPickLevel("day");
|
|
23988
|
-
}
|
|
23989
|
-
}
|
|
23990
23974
|
};
|
|
23991
23975
|
const setDay = (day) => {
|
|
23992
23976
|
setDate(day);
|
|
23993
23977
|
setValue(day);
|
|
23994
|
-
if (maxLevel !== "day") {
|
|
23995
|
-
setPickLevel(maxLevel);
|
|
23996
|
-
}
|
|
23997
23978
|
};
|
|
23998
23979
|
const setWeekByDay = (dateOfFirstDayOfWeek) => {
|
|
23999
23980
|
setDate(dateOfFirstDayOfWeek);
|
|
24000
23981
|
setValue(dateOfFirstDayOfWeek);
|
|
24001
|
-
if (maxLevel !== "week") {
|
|
24002
|
-
setPickLevel("day");
|
|
24003
|
-
}
|
|
24004
23982
|
};
|
|
24005
23983
|
const setQuarter = (quarter) => {
|
|
24006
23984
|
const newDate = hooks(date).quarter(quarter + 1).toDate();
|
|
@@ -24040,7 +24018,7 @@ function DatePicker({
|
|
|
24040
24018
|
});
|
|
24041
24019
|
};
|
|
24042
24020
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
24043
|
-
..._stylex.props(styles$
|
|
24021
|
+
..._stylex.props(styles$r.outer, customStyle),
|
|
24044
24022
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
24045
24023
|
...{
|
|
24046
24024
|
className: "mly78zum5 mly1q0g3np mly1qughib mly1nejdyq mlyu06os2"
|
|
@@ -24076,6 +24054,8 @@ function DatePicker({
|
|
|
24076
24054
|
setPickLevel("year");
|
|
24077
24055
|
} else if (pickLevel === "hour" || pickLevel === "minute" || pickLevel === "second") {
|
|
24078
24056
|
setPickLevel("day");
|
|
24057
|
+
} else {
|
|
24058
|
+
setPickLevel(maxLevel);
|
|
24079
24059
|
}
|
|
24080
24060
|
},
|
|
24081
24061
|
children: [(pickLevel === "day" || pickLevel === "week") && hooks(date).format("MMMM YYYY"), (pickLevel === "month" || pickLevel === "quarter") && hooks(date).format("YYYY"), pickLevel === "year" && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -24313,14 +24293,14 @@ function DatePicker({
|
|
|
24313
24293
|
setValue(hooks(date).hour(newHour24).toDate());
|
|
24314
24294
|
},
|
|
24315
24295
|
width: "40px"
|
|
24316
|
-
}), (
|
|
24296
|
+
}), (units === "minute" || units === "second") && /* @__PURE__ */ jsxRuntime.jsx(NumberInput, {
|
|
24317
24297
|
label: "Minutes",
|
|
24318
24298
|
value: hooks(date).minutes(),
|
|
24319
24299
|
setValue: (minute) => {
|
|
24320
24300
|
setValue(hooks(date).minute(minute).toDate());
|
|
24321
24301
|
},
|
|
24322
24302
|
width: "40px"
|
|
24323
|
-
}),
|
|
24303
|
+
}), units === "second" && /* @__PURE__ */ jsxRuntime.jsx(NumberInput, {
|
|
24324
24304
|
label: "Seconds",
|
|
24325
24305
|
value: hooks(date).seconds(),
|
|
24326
24306
|
setValue: (second) => {
|
|
@@ -24353,7 +24333,7 @@ function DatePicker({
|
|
|
24353
24333
|
})]
|
|
24354
24334
|
});
|
|
24355
24335
|
}
|
|
24356
|
-
const styles$
|
|
24336
|
+
const styles$r = {
|
|
24357
24337
|
outer: {
|
|
24358
24338
|
userSelect: "mly87ps6o",
|
|
24359
24339
|
fontSize: "mlymhiqyu",
|
|
@@ -24439,7 +24419,7 @@ function Banner({
|
|
|
24439
24419
|
className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
|
|
24440
24420
|
},
|
|
24441
24421
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
24442
|
-
..._stylex.props(styles$
|
|
24422
|
+
..._stylex.props(styles$q.header, variantColors[variant], children ? styles$q.headerWithContent : null),
|
|
24443
24423
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24444
24424
|
...{
|
|
24445
24425
|
className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
|
|
@@ -24452,22 +24432,22 @@ function Banner({
|
|
|
24452
24432
|
className: "mly78zum5 mlydt5ytf mlyb3r6kr"
|
|
24453
24433
|
},
|
|
24454
24434
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24455
|
-
..._stylex.props(styles$
|
|
24435
|
+
..._stylex.props(styles$q.title, fontStyles.emphasized),
|
|
24456
24436
|
children: title
|
|
24457
24437
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24458
|
-
..._stylex.props(styles$
|
|
24438
|
+
..._stylex.props(styles$q.description, fontStyles.supporting),
|
|
24459
24439
|
children: description
|
|
24460
24440
|
})]
|
|
24461
24441
|
})]
|
|
24462
24442
|
}), children && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
24463
|
-
..._stylex.props(styles$
|
|
24443
|
+
..._stylex.props(styles$q.content, fontStyles.body),
|
|
24464
24444
|
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
24465
24445
|
children
|
|
24466
24446
|
})
|
|
24467
24447
|
})]
|
|
24468
24448
|
});
|
|
24469
24449
|
}
|
|
24470
|
-
const styles$
|
|
24450
|
+
const styles$q = {
|
|
24471
24451
|
header: {
|
|
24472
24452
|
borderRadius: "mly1q4ynmn",
|
|
24473
24453
|
borderStartStartRadius: null,
|
|
@@ -25902,7 +25882,7 @@ function DropdownMenu({
|
|
|
25902
25882
|
children: trigger
|
|
25903
25883
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal2, {
|
|
25904
25884
|
children: /* @__PURE__ */ jsxRuntime.jsx(Content2, {
|
|
25905
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25885
|
+
..._stylex.props(fontStyles.body, styles$p.content),
|
|
25906
25886
|
side: "bottom",
|
|
25907
25887
|
align: "start",
|
|
25908
25888
|
sideOffset: 4,
|
|
@@ -25929,16 +25909,16 @@ function DropdownMenuItem({
|
|
|
25929
25909
|
disabled,
|
|
25930
25910
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
25931
25911
|
name: icon,
|
|
25932
|
-
customStyle: styles$
|
|
25912
|
+
customStyle: styles$p.icon
|
|
25933
25913
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
25934
25914
|
...{
|
|
25935
25915
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2"
|
|
25936
25916
|
},
|
|
25937
25917
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25938
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25918
|
+
..._stylex.props(fontStyles.body, styles$p.label),
|
|
25939
25919
|
children: label
|
|
25940
25920
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25941
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
25921
|
+
..._stylex.props(fontStyles.supporting, styles$p.sublabel),
|
|
25942
25922
|
children: sublabel
|
|
25943
25923
|
})]
|
|
25944
25924
|
})]
|
|
@@ -25959,21 +25939,21 @@ function DropdownSubMenuItem({
|
|
|
25959
25939
|
disabled,
|
|
25960
25940
|
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
25961
25941
|
name: icon,
|
|
25962
|
-
customStyle: styles$
|
|
25942
|
+
customStyle: styles$p.icon
|
|
25963
25943
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
25964
25944
|
...{
|
|
25965
25945
|
className: "mly78zum5 mlydt5ytf mly1iyjqo2"
|
|
25966
25946
|
},
|
|
25967
25947
|
children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25968
|
-
..._stylex.props(fontStyles.body, styles$
|
|
25948
|
+
..._stylex.props(fontStyles.body, styles$p.label),
|
|
25969
25949
|
children: label
|
|
25970
25950
|
}), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
25971
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
25951
|
+
..._stylex.props(fontStyles.supporting, styles$p.sublabel),
|
|
25972
25952
|
children: sublabel
|
|
25973
25953
|
})]
|
|
25974
25954
|
}), /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
25975
25955
|
name: "chevronRight",
|
|
25976
|
-
customStyle: styles$
|
|
25956
|
+
customStyle: styles$p.icon
|
|
25977
25957
|
})]
|
|
25978
25958
|
}), /* @__PURE__ */ jsxRuntime.jsx(SubContent2, {
|
|
25979
25959
|
...{
|
|
@@ -25988,11 +25968,11 @@ function DropdownMenuLabel({
|
|
|
25988
25968
|
label
|
|
25989
25969
|
}) {
|
|
25990
25970
|
return /* @__PURE__ */ jsxRuntime.jsx(Label2, {
|
|
25991
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
25971
|
+
..._stylex.props(fontStyles.supporting, styles$p.menuLabel),
|
|
25992
25972
|
children: label
|
|
25993
25973
|
});
|
|
25994
25974
|
}
|
|
25995
|
-
const styles$
|
|
25975
|
+
const styles$p = {
|
|
25996
25976
|
content: {
|
|
25997
25977
|
display: "mly78zum5",
|
|
25998
25978
|
flexDirection: "mlydt5ytf",
|
|
@@ -26081,6 +26061,7 @@ const filterStyles = {
|
|
|
26081
26061
|
paddingTop: null,
|
|
26082
26062
|
paddingBottom: null,
|
|
26083
26063
|
minWidth: "mly1jzhcrs",
|
|
26064
|
+
maxWidth: "mly1j9u4d2",
|
|
26084
26065
|
gap: "mly167g77z",
|
|
26085
26066
|
rowGap: null,
|
|
26086
26067
|
columnGap: null,
|
|
@@ -26100,37 +26081,83 @@ const filterStyles = {
|
|
|
26100
26081
|
rowGap: null,
|
|
26101
26082
|
columnGap: null,
|
|
26102
26083
|
$$css: true
|
|
26103
|
-
}
|
|
26104
|
-
};
|
|
26105
|
-
const BooleanFilterFragments = {
|
|
26106
|
-
is_true: {
|
|
26107
|
-
operator: "true"
|
|
26108
26084
|
},
|
|
26109
|
-
|
|
26110
|
-
|
|
26085
|
+
editor: {
|
|
26086
|
+
width: "mlyxsgkw5",
|
|
26087
|
+
display: "mly78zum5",
|
|
26088
|
+
flexDirection: "mlydt5ytf",
|
|
26089
|
+
gap: "mly167g77z",
|
|
26090
|
+
rowGap: null,
|
|
26091
|
+
columnGap: null,
|
|
26092
|
+
$$css: true
|
|
26111
26093
|
},
|
|
26112
|
-
|
|
26113
|
-
|
|
26094
|
+
editorRow: {
|
|
26095
|
+
display: "mly78zum5",
|
|
26096
|
+
gap: "mly167g77z",
|
|
26097
|
+
rowGap: null,
|
|
26098
|
+
columnGap: null,
|
|
26099
|
+
$$css: true
|
|
26114
26100
|
},
|
|
26115
|
-
|
|
26116
|
-
|
|
26117
|
-
|
|
26101
|
+
editorCell: {
|
|
26102
|
+
flexGrow: "mly1iyjqo2",
|
|
26103
|
+
$$css: true
|
|
26118
26104
|
},
|
|
26119
|
-
|
|
26120
|
-
|
|
26105
|
+
input: {
|
|
26106
|
+
border: "mly2yh2zd",
|
|
26107
|
+
borderWidth: null,
|
|
26108
|
+
borderInlineWidth: null,
|
|
26109
|
+
borderInlineStartWidth: null,
|
|
26110
|
+
borderLeftWidth: null,
|
|
26111
|
+
borderInlineEndWidth: null,
|
|
26112
|
+
borderRightWidth: null,
|
|
26113
|
+
borderBlockWidth: null,
|
|
26114
|
+
borderTopWidth: null,
|
|
26115
|
+
borderBottomWidth: null,
|
|
26116
|
+
borderStyle: null,
|
|
26117
|
+
borderInlineStyle: null,
|
|
26118
|
+
borderInlineStartStyle: null,
|
|
26119
|
+
borderLeftStyle: null,
|
|
26120
|
+
borderInlineEndStyle: null,
|
|
26121
|
+
borderRightStyle: null,
|
|
26122
|
+
borderBlockStyle: null,
|
|
26123
|
+
borderTopStyle: null,
|
|
26124
|
+
borderBottomStyle: null,
|
|
26125
|
+
borderColor: null,
|
|
26126
|
+
borderInlineColor: null,
|
|
26127
|
+
borderInlineStartColor: null,
|
|
26128
|
+
borderLeftColor: null,
|
|
26129
|
+
borderInlineEndColor: null,
|
|
26130
|
+
borderRightColor: null,
|
|
26131
|
+
borderBlockColor: null,
|
|
26132
|
+
borderTopColor: null,
|
|
26133
|
+
borderBottomColor: null,
|
|
26134
|
+
color: "mlyizdh9v",
|
|
26135
|
+
padding: "mly9cpjcd",
|
|
26136
|
+
paddingInline: null,
|
|
26137
|
+
paddingStart: null,
|
|
26138
|
+
paddingLeft: null,
|
|
26139
|
+
paddingEnd: null,
|
|
26140
|
+
paddingRight: null,
|
|
26141
|
+
paddingBlock: null,
|
|
26142
|
+
paddingTop: null,
|
|
26143
|
+
paddingBottom: null,
|
|
26144
|
+
borderRadius: "mly1sxf85j",
|
|
26145
|
+
borderStartStartRadius: null,
|
|
26146
|
+
borderStartEndRadius: null,
|
|
26147
|
+
borderEndStartRadius: null,
|
|
26148
|
+
borderEndEndRadius: null,
|
|
26149
|
+
borderTopLeftRadius: null,
|
|
26150
|
+
borderTopRightRadius: null,
|
|
26151
|
+
borderBottomLeftRadius: null,
|
|
26152
|
+
borderBottomRightRadius: null,
|
|
26153
|
+
$$css: true
|
|
26121
26154
|
}
|
|
26122
26155
|
};
|
|
26123
26156
|
function typeFromFilter$3(filter) {
|
|
26124
|
-
|
|
26125
|
-
|
|
26126
|
-
const value = BooleanFilterFragments[type];
|
|
26127
|
-
const filterNot = filter.not ?? false;
|
|
26128
|
-
const valueNot = value.not ?? false;
|
|
26129
|
-
if (value.operator === filter.operator && valueNot === filterNot) {
|
|
26130
|
-
return type;
|
|
26131
|
-
}
|
|
26157
|
+
if (filter.operator === "null" && filter.not) {
|
|
26158
|
+
return "-null";
|
|
26132
26159
|
}
|
|
26133
|
-
|
|
26160
|
+
return filter.operator;
|
|
26134
26161
|
}
|
|
26135
26162
|
function BooleanFilterCore({
|
|
26136
26163
|
filter,
|
|
@@ -26138,26 +26165,33 @@ function BooleanFilterCore({
|
|
|
26138
26165
|
}) {
|
|
26139
26166
|
const type = typeFromFilter$3(filter);
|
|
26140
26167
|
const onChangeType = (type2) => {
|
|
26141
|
-
|
|
26168
|
+
const filter2 = type2 === "-null" ? {
|
|
26169
|
+
operator: "null",
|
|
26170
|
+
not: true
|
|
26171
|
+
} : {
|
|
26172
|
+
operator: type2
|
|
26173
|
+
};
|
|
26174
|
+
setFilter(filter2);
|
|
26142
26175
|
};
|
|
26143
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
26176
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
26177
|
+
..._stylex.props(filterStyles.editor),
|
|
26144
26178
|
children: /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
|
|
26145
26179
|
value: type,
|
|
26146
26180
|
onChange: onChangeType,
|
|
26147
26181
|
options: [{
|
|
26148
|
-
value: "
|
|
26182
|
+
value: "true",
|
|
26149
26183
|
label: "is true"
|
|
26150
26184
|
}, {
|
|
26151
|
-
value: "
|
|
26185
|
+
value: "false",
|
|
26152
26186
|
label: "is false"
|
|
26153
26187
|
}, {
|
|
26154
|
-
value: "
|
|
26188
|
+
value: "null",
|
|
26155
26189
|
label: "is null"
|
|
26156
26190
|
}, {
|
|
26157
|
-
value: "
|
|
26191
|
+
value: "-null",
|
|
26158
26192
|
label: "is not null"
|
|
26159
26193
|
}, {
|
|
26160
|
-
value: "
|
|
26194
|
+
value: "false_or_null",
|
|
26161
26195
|
label: "is false or null"
|
|
26162
26196
|
}],
|
|
26163
26197
|
customStyle: filterStyles.filterTypeDropdown
|
|
@@ -26269,7 +26303,7 @@ const PillInput = ({
|
|
|
26269
26303
|
}
|
|
26270
26304
|
};
|
|
26271
26305
|
const commitValue = () => {
|
|
26272
|
-
if (value.length > 0) {
|
|
26306
|
+
if (value.length > 0 && !values.includes(value)) {
|
|
26273
26307
|
setValues([...values, value]);
|
|
26274
26308
|
setValue("");
|
|
26275
26309
|
}
|
|
@@ -26279,7 +26313,7 @@ const PillInput = ({
|
|
|
26279
26313
|
commitValue();
|
|
26280
26314
|
});
|
|
26281
26315
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
26282
|
-
..._stylex.props(styles$
|
|
26316
|
+
..._stylex.props(styles$o.outer, customStyle),
|
|
26283
26317
|
onKeyUp,
|
|
26284
26318
|
onClick: () => {
|
|
26285
26319
|
var _a2;
|
|
@@ -26344,7 +26378,7 @@ const Pill = ({
|
|
|
26344
26378
|
onClick,
|
|
26345
26379
|
tabIndex: 0,
|
|
26346
26380
|
ref: forwardRef,
|
|
26347
|
-
..._stylex.props(styles$
|
|
26381
|
+
..._stylex.props(styles$o.pill, colorVariants[color]),
|
|
26348
26382
|
children: [children, /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
26349
26383
|
title: "Remove",
|
|
26350
26384
|
...{
|
|
@@ -26359,7 +26393,7 @@ const Pill = ({
|
|
|
26359
26393
|
})]
|
|
26360
26394
|
});
|
|
26361
26395
|
};
|
|
26362
|
-
const styles$
|
|
26396
|
+
const styles$o = {
|
|
26363
26397
|
outer: {
|
|
26364
26398
|
fontFamily: "mly6icuqf",
|
|
26365
26399
|
fontSize: "mlyif65rj",
|
|
@@ -26413,7 +26447,7 @@ const styles$i = {
|
|
|
26413
26447
|
gap: "mly1ed6fcf",
|
|
26414
26448
|
rowGap: null,
|
|
26415
26449
|
columnGap: null,
|
|
26416
|
-
flexWrap: "
|
|
26450
|
+
flexWrap: "mly1a02dak",
|
|
26417
26451
|
borderColor: "mly1akygb0 mlyetl2wx",
|
|
26418
26452
|
borderInlineColor: null,
|
|
26419
26453
|
borderInlineStartColor: null,
|
|
@@ -26454,6 +26488,7 @@ const styles$i = {
|
|
|
26454
26488
|
textTransform: "mly6mezaz",
|
|
26455
26489
|
cursor: "mly1ypdohk",
|
|
26456
26490
|
height: "mly1qx5ct2",
|
|
26491
|
+
whiteSpace: "mlyuxw1ft",
|
|
26457
26492
|
$$css: true
|
|
26458
26493
|
}
|
|
26459
26494
|
};
|
|
@@ -26611,7 +26646,8 @@ function ValueList({
|
|
|
26611
26646
|
onClick,
|
|
26612
26647
|
search,
|
|
26613
26648
|
fieldPath,
|
|
26614
|
-
ref
|
|
26649
|
+
ref,
|
|
26650
|
+
customStyle
|
|
26615
26651
|
}) {
|
|
26616
26652
|
const {
|
|
26617
26653
|
searchResults
|
|
@@ -26619,10 +26655,11 @@ function ValueList({
|
|
|
26619
26655
|
const stringSearchResults = React.useMemo(() => searchResults && searchResults.filter((r2) => r2.fieldType === "string" && r2.fieldValue !== null).sort((a, b2) => b2.weight - a.weight).slice(0, 100), [searchResults]);
|
|
26620
26656
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
26621
26657
|
ref,
|
|
26658
|
+
..._stylex.props(customStyle),
|
|
26622
26659
|
children: (stringSearchResults == null ? void 0 : stringSearchResults.length) ? stringSearchResults.map((value) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
26623
26660
|
role: "menuitem",
|
|
26624
26661
|
tabIndex: -1,
|
|
26625
|
-
..._stylex.props(addMenuStyles.item, styles$
|
|
26662
|
+
..._stylex.props(addMenuStyles.item, styles$n.valueItem),
|
|
26626
26663
|
onClick: () => onClick(value),
|
|
26627
26664
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Value, {
|
|
26628
26665
|
value
|
|
@@ -26645,16 +26682,22 @@ function Value({
|
|
|
26645
26682
|
return /* @__PURE__ */ jsxRuntime.jsx(Token, {
|
|
26646
26683
|
label: value.fieldValue ?? "∅",
|
|
26647
26684
|
icon: "filter",
|
|
26648
|
-
color: "purple"
|
|
26685
|
+
color: "purple",
|
|
26686
|
+
customStyle: styles$n.token
|
|
26649
26687
|
});
|
|
26650
26688
|
}
|
|
26651
|
-
const styles$
|
|
26689
|
+
const styles$n = {
|
|
26652
26690
|
valueItem: {
|
|
26653
26691
|
height: "mly1qx5ct2",
|
|
26654
26692
|
paddingTop: "mly1y1aw1k",
|
|
26655
26693
|
paddingBottom: "mlywib8y2",
|
|
26656
26694
|
display: "mly78zum5",
|
|
26657
26695
|
justifyContent: "mly1qughib",
|
|
26696
|
+
cursor: "mly1ypdohk",
|
|
26697
|
+
$$css: true
|
|
26698
|
+
},
|
|
26699
|
+
token: {
|
|
26700
|
+
cursor: "mly1ypdohk",
|
|
26658
26701
|
$$css: true
|
|
26659
26702
|
}
|
|
26660
26703
|
};
|
|
@@ -26742,7 +26785,8 @@ const StringFilterCore = ({
|
|
|
26742
26785
|
setCurrentFilter(newFilter);
|
|
26743
26786
|
setFilter(newFilter);
|
|
26744
26787
|
};
|
|
26745
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
26788
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
26789
|
+
..._stylex.props(filterStyles.editor),
|
|
26746
26790
|
children: [/* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
|
|
26747
26791
|
value: type,
|
|
26748
26792
|
onChange: changeType,
|
|
@@ -26812,7 +26856,8 @@ const StringFilterCore = ({
|
|
|
26812
26856
|
});
|
|
26813
26857
|
setSearchValue("");
|
|
26814
26858
|
}
|
|
26815
|
-
}
|
|
26859
|
+
},
|
|
26860
|
+
customStyle: styles$m.valueList
|
|
26816
26861
|
})]
|
|
26817
26862
|
}) : currentFilter.operator === "~" ? /* @__PURE__ */ jsxRuntime.jsx(StringEditor, {
|
|
26818
26863
|
values: currentFilter.escaped_values,
|
|
@@ -26879,6 +26924,18 @@ function stringFilterChangeType(filter, type) {
|
|
|
26879
26924
|
};
|
|
26880
26925
|
}
|
|
26881
26926
|
}
|
|
26927
|
+
const styles$m = {
|
|
26928
|
+
valueList: {
|
|
26929
|
+
maxHeight: "mly1hkcv85",
|
|
26930
|
+
overflow: "mlyysyzu8",
|
|
26931
|
+
overflowX: null,
|
|
26932
|
+
overflowY: null,
|
|
26933
|
+
$$css: true
|
|
26934
|
+
}
|
|
26935
|
+
};
|
|
26936
|
+
const isRangeOperator = (operator) => {
|
|
26937
|
+
return operator === "range";
|
|
26938
|
+
};
|
|
26882
26939
|
const NumberFilterFragments = {
|
|
26883
26940
|
is_equal_to: {
|
|
26884
26941
|
operator: "="
|
|
@@ -26899,7 +26956,11 @@ const NumberFilterFragments = {
|
|
|
26899
26956
|
is_less_than_or_equal_to: {
|
|
26900
26957
|
operator: "<="
|
|
26901
26958
|
},
|
|
26902
|
-
|
|
26959
|
+
is_between: {
|
|
26960
|
+
operator: "range",
|
|
26961
|
+
startOperator: ">=",
|
|
26962
|
+
endOperator: "<="
|
|
26963
|
+
},
|
|
26903
26964
|
is_null: {
|
|
26904
26965
|
operator: "null"
|
|
26905
26966
|
},
|
|
@@ -26928,7 +26989,7 @@ const NumberFilterCore = ({
|
|
|
26928
26989
|
operator: "=",
|
|
26929
26990
|
values: []
|
|
26930
26991
|
});
|
|
26931
|
-
const [innerValues, setInnerValues] = React.useState(["0"]);
|
|
26992
|
+
const [innerValues, setInnerValues] = React.useState(isRangeOperator(filter.operator) ? ["0", "0"] : ["0"]);
|
|
26932
26993
|
const [errorMessage, setErrorMessage] = React.useState("");
|
|
26933
26994
|
const changeType = (type2) => {
|
|
26934
26995
|
const maybeNumberCondition = filter;
|
|
@@ -26942,19 +27003,23 @@ const NumberFilterCore = ({
|
|
|
26942
27003
|
const type = typeFromFilter$1(filter);
|
|
26943
27004
|
React.useEffect(() => {
|
|
26944
27005
|
setErrorMessage("");
|
|
26945
|
-
|
|
26946
|
-
|
|
26947
|
-
|
|
26948
|
-
if (!values || values.length === 0) {
|
|
26949
|
-
values = ["0"];
|
|
26950
|
-
}
|
|
26951
|
-
setInnerValues(values);
|
|
27006
|
+
if (isRangeOperator(filter.operator)) {
|
|
27007
|
+
const numberRange = filter;
|
|
27008
|
+
setInnerValues([numberRange.startValue, numberRange.endValue]);
|
|
26952
27009
|
} else {
|
|
26953
|
-
|
|
27010
|
+
const maybeNumberCondition = filter;
|
|
27011
|
+
if (maybeNumberCondition.values) {
|
|
27012
|
+
let values = maybeNumberCondition.values;
|
|
27013
|
+
if (!values || values.length === 0) {
|
|
27014
|
+
values = ["0"];
|
|
27015
|
+
}
|
|
27016
|
+
setInnerValues(values);
|
|
27017
|
+
} else {
|
|
27018
|
+
setInnerValues(["0"]);
|
|
27019
|
+
}
|
|
26954
27020
|
}
|
|
26955
27021
|
}, [filter]);
|
|
26956
27022
|
const validateAndUpdateValues = (values) => {
|
|
26957
|
-
const numberCondition = filter;
|
|
26958
27023
|
setInnerValues(values);
|
|
26959
27024
|
const hasInvalidValues = values.some((v2) => {
|
|
26960
27025
|
return isNaN(parseFloat(v2));
|
|
@@ -26965,10 +27030,22 @@ const NumberFilterCore = ({
|
|
|
26965
27030
|
setErrorMessage("Requires at least one numeric value.");
|
|
26966
27031
|
} else {
|
|
26967
27032
|
setErrorMessage("");
|
|
26968
|
-
|
|
26969
|
-
|
|
26970
|
-
|
|
26971
|
-
|
|
27033
|
+
if (filter.operator === "range") {
|
|
27034
|
+
const numberCondition = filter;
|
|
27035
|
+
setFilter({
|
|
27036
|
+
...numberCondition,
|
|
27037
|
+
startOperator: ">=",
|
|
27038
|
+
startValue: values[0],
|
|
27039
|
+
endOperator: "<=",
|
|
27040
|
+
endValue: values[1]
|
|
27041
|
+
});
|
|
27042
|
+
} else {
|
|
27043
|
+
const numberCondition = filter;
|
|
27044
|
+
setFilter({
|
|
27045
|
+
...numberCondition,
|
|
27046
|
+
values
|
|
27047
|
+
});
|
|
27048
|
+
}
|
|
26972
27049
|
}
|
|
26973
27050
|
};
|
|
26974
27051
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
@@ -26993,6 +27070,9 @@ const NumberFilterCore = ({
|
|
|
26993
27070
|
}, {
|
|
26994
27071
|
value: "is_less_than_or_equal_to",
|
|
26995
27072
|
label: "is less than or equal to"
|
|
27073
|
+
}, {
|
|
27074
|
+
value: "is_between",
|
|
27075
|
+
label: "between"
|
|
26996
27076
|
}, {
|
|
26997
27077
|
value: "is_null",
|
|
26998
27078
|
label: "is null"
|
|
@@ -27002,10 +27082,10 @@ const NumberFilterCore = ({
|
|
|
27002
27082
|
}]
|
|
27003
27083
|
}), errorMessage ? /* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, {
|
|
27004
27084
|
errorMessage
|
|
27005
|
-
}) : null, getEditor
|
|
27085
|
+
}) : null, getEditor(filter, innerValues, validateAndUpdateValues)]
|
|
27006
27086
|
});
|
|
27007
27087
|
};
|
|
27008
|
-
function getEditor
|
|
27088
|
+
function getEditor(filter, innerValues, validateAndUpdateValues) {
|
|
27009
27089
|
switch (filter.operator) {
|
|
27010
27090
|
case "!=":
|
|
27011
27091
|
case "=":
|
|
@@ -27023,6 +27103,23 @@ function getEditor$1(filter, innerValues, validateAndUpdateValues) {
|
|
|
27023
27103
|
setValue: (value) => validateAndUpdateValues([value]),
|
|
27024
27104
|
type: "number"
|
|
27025
27105
|
});
|
|
27106
|
+
case "range":
|
|
27107
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
27108
|
+
...{
|
|
27109
|
+
className: "mlyrvj5dj mly15396mt mly167g77z mlypqajaz"
|
|
27110
|
+
},
|
|
27111
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(SingleNumberEditor, {
|
|
27112
|
+
value: innerValues[0],
|
|
27113
|
+
setValue: (value) => validateAndUpdateValues([value, innerValues[1]]),
|
|
27114
|
+
type: "number"
|
|
27115
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("span", {
|
|
27116
|
+
children: "to"
|
|
27117
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(SingleNumberEditor, {
|
|
27118
|
+
value: innerValues[1],
|
|
27119
|
+
setValue: (value) => validateAndUpdateValues([innerValues[0], value]),
|
|
27120
|
+
type: "number"
|
|
27121
|
+
})]
|
|
27122
|
+
});
|
|
27026
27123
|
}
|
|
27027
27124
|
return null;
|
|
27028
27125
|
}
|
|
@@ -27073,43 +27170,110 @@ function makeFilterWithNewType(filter, type) {
|
|
|
27073
27170
|
return {
|
|
27074
27171
|
...NumberFilterFragments[type]
|
|
27075
27172
|
};
|
|
27173
|
+
case "is_between":
|
|
27174
|
+
return {
|
|
27175
|
+
...NumberFilterFragments[type],
|
|
27176
|
+
startValue: values.length > 0 ? values[0] : "0",
|
|
27177
|
+
endValue: values.length > 1 ? values[1] : "0"
|
|
27178
|
+
};
|
|
27076
27179
|
}
|
|
27077
27180
|
}
|
|
27078
|
-
|
|
27079
|
-
|
|
27080
|
-
|
|
27081
|
-
|
|
27082
|
-
|
|
27083
|
-
|
|
27084
|
-
|
|
27085
|
-
|
|
27086
|
-
|
|
27087
|
-
|
|
27088
|
-
|
|
27181
|
+
const formats = {
|
|
27182
|
+
second: "YYYY-MM-DD HH:mm:ss",
|
|
27183
|
+
minute: "YYYY-MM-DD HH:mm",
|
|
27184
|
+
hour: "YYYY-MM-DD HH:00",
|
|
27185
|
+
day: "YYYY-MM-DD",
|
|
27186
|
+
week: "[WK]YYYY-WW",
|
|
27187
|
+
month: "YYYY-MM",
|
|
27188
|
+
quarter: "YYYY-[Q]Q",
|
|
27189
|
+
year: "YYYY"
|
|
27190
|
+
};
|
|
27191
|
+
const regexps = {
|
|
27192
|
+
second: /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/,
|
|
27193
|
+
minute: /\d\d\d\d-\d\d-\d\d \d\d:\d\d/,
|
|
27194
|
+
hour: /\d\d\d\d-\d\d-\d\d \d\d:00/,
|
|
27195
|
+
day: /\d\d\d\d-\d\d-\d\d/,
|
|
27196
|
+
week: /WK\d\d\d\d-\d\d-\d\d/,
|
|
27197
|
+
month: /\d\d\d\d-\d\d/,
|
|
27198
|
+
quarter: /\d\d\d\d-Q\d/,
|
|
27199
|
+
year: /\d\d\d\d/
|
|
27200
|
+
};
|
|
27201
|
+
const DateInput = ({
|
|
27202
|
+
value,
|
|
27203
|
+
setValue,
|
|
27204
|
+
placeholder,
|
|
27205
|
+
autoFocus,
|
|
27206
|
+
units,
|
|
27207
|
+
onFocus,
|
|
27208
|
+
onBlur,
|
|
27209
|
+
isActive,
|
|
27210
|
+
customStyle
|
|
27211
|
+
}) => {
|
|
27212
|
+
const format2 = formats[units];
|
|
27213
|
+
const [tempValue, setTempValue] = React.useState(hooks(value).format(format2));
|
|
27214
|
+
React.useEffect(() => {
|
|
27215
|
+
setTempValue(hooks(value).format(format2));
|
|
27216
|
+
}, [value, format2]);
|
|
27217
|
+
return /* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
27218
|
+
..._stylex.props(customStyle, isActive ? styles$l.active : null),
|
|
27219
|
+
type: "text",
|
|
27220
|
+
placeholder: placeholder || format2,
|
|
27221
|
+
value: tempValue,
|
|
27222
|
+
onFocus,
|
|
27223
|
+
onBlur,
|
|
27224
|
+
onChange: (event) => {
|
|
27225
|
+
const raw2 = event.target.value;
|
|
27226
|
+
setTempValue(raw2);
|
|
27227
|
+
const regex = regexps[units];
|
|
27228
|
+
if (raw2.match(regex)) {
|
|
27229
|
+
const m = hooks(raw2, format2);
|
|
27230
|
+
if (m.isValid()) {
|
|
27231
|
+
setValue(m.toDate());
|
|
27232
|
+
}
|
|
27233
|
+
}
|
|
27234
|
+
},
|
|
27235
|
+
autoFocus
|
|
27236
|
+
});
|
|
27237
|
+
};
|
|
27238
|
+
function guessUnits(moment2, isDateTime) {
|
|
27239
|
+
if (moment2.moment === "literal") {
|
|
27240
|
+
const {
|
|
27241
|
+
literal
|
|
27242
|
+
} = moment2;
|
|
27243
|
+
for (const unit in regexps) {
|
|
27244
|
+
const temporalUnit = unit;
|
|
27245
|
+
if (literal.match(regexps[temporalUnit])) {
|
|
27246
|
+
return temporalUnit;
|
|
27247
|
+
}
|
|
27248
|
+
}
|
|
27089
27249
|
}
|
|
27090
|
-
return "
|
|
27091
|
-
}
|
|
27092
|
-
function createTemporalLiteral(date) {
|
|
27093
|
-
return {
|
|
27094
|
-
moment: "literal",
|
|
27095
|
-
literal: hooks(date).format("YYYY-MM-DD HH:mm:ss.0")
|
|
27096
|
-
};
|
|
27097
|
-
}
|
|
27098
|
-
function createNowMoment() {
|
|
27099
|
-
return {
|
|
27100
|
-
moment: "now"
|
|
27101
|
-
};
|
|
27250
|
+
return isDateTime ? "second" : "day";
|
|
27102
27251
|
}
|
|
27103
|
-
|
|
27104
|
-
|
|
27105
|
-
|
|
27252
|
+
const styles$l = {
|
|
27253
|
+
active: {
|
|
27254
|
+
backgroundColor: "mly1vzefiq",
|
|
27255
|
+
$$css: true
|
|
27106
27256
|
}
|
|
27107
|
-
|
|
27108
|
-
|
|
27109
|
-
|
|
27110
|
-
return
|
|
27257
|
+
};
|
|
27258
|
+
function typeFromFilter(filter) {
|
|
27259
|
+
if (filter.operator === "null" && filter.not) {
|
|
27260
|
+
return "-null";
|
|
27111
27261
|
}
|
|
27112
|
-
return
|
|
27262
|
+
return filter.operator;
|
|
27263
|
+
}
|
|
27264
|
+
function unitsFromFilter(filter, isDateTime) {
|
|
27265
|
+
if (filter.operator === "last" || filter.operator === "next") {
|
|
27266
|
+
return filter.units;
|
|
27267
|
+
} else if (filter.operator === "to") {
|
|
27268
|
+
return guessUnits(filter.fromMoment, isDateTime);
|
|
27269
|
+
} else if (filter.operator === "before" && filter.before.moment === "literal") {
|
|
27270
|
+
return guessUnits(filter.before, isDateTime);
|
|
27271
|
+
} else if (filter.operator === "after") {
|
|
27272
|
+
return guessUnits(filter.after, isDateTime);
|
|
27273
|
+
} else if (filter.operator === "in") {
|
|
27274
|
+
return guessUnits(filter.in, isDateTime);
|
|
27275
|
+
}
|
|
27276
|
+
return isDateTime ? "second" : "day";
|
|
27113
27277
|
}
|
|
27114
27278
|
const DateTimeFilterCore = ({
|
|
27115
27279
|
filter,
|
|
@@ -27117,298 +27281,372 @@ const DateTimeFilterCore = ({
|
|
|
27117
27281
|
isDateTime
|
|
27118
27282
|
}) => {
|
|
27119
27283
|
filter ?? (filter = {
|
|
27120
|
-
operator: "
|
|
27121
|
-
|
|
27284
|
+
operator: "last",
|
|
27285
|
+
n: "7",
|
|
27286
|
+
units: "day"
|
|
27122
27287
|
});
|
|
27288
|
+
const [units, setUnits] = React.useState(unitsFromFilter(filter, isDateTime));
|
|
27123
27289
|
const [currentFilter, setCurrentFilter] = React.useState(filter);
|
|
27124
27290
|
const changeType = (type2) => {
|
|
27125
|
-
updateFilter(dateTimeFilterChangeType(currentFilter, type2));
|
|
27291
|
+
updateFilter(dateTimeFilterChangeType(currentFilter, type2, units));
|
|
27126
27292
|
};
|
|
27127
27293
|
const updateFilter = (newFilter) => {
|
|
27128
27294
|
setCurrentFilter(newFilter);
|
|
27129
27295
|
setFilter(newFilter);
|
|
27130
27296
|
};
|
|
27131
|
-
const type = typeFromFilter(currentFilter);
|
|
27132
27297
|
const maxLevel = isDateTime ? "second" : "day";
|
|
27133
|
-
|
|
27134
|
-
|
|
27135
|
-
|
|
27136
|
-
|
|
27137
|
-
|
|
27138
|
-
|
|
27139
|
-
|
|
27140
|
-
|
|
27141
|
-
|
|
27142
|
-
|
|
27143
|
-
|
|
27144
|
-
|
|
27145
|
-
|
|
27146
|
-
|
|
27147
|
-
|
|
27148
|
-
|
|
27149
|
-
|
|
27150
|
-
|
|
27151
|
-
|
|
27152
|
-
|
|
27153
|
-
|
|
27154
|
-
|
|
27155
|
-
|
|
27156
|
-
|
|
27298
|
+
const type = typeFromFilter(currentFilter);
|
|
27299
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
27300
|
+
..._stylex.props(filterStyles.editor),
|
|
27301
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
27302
|
+
..._stylex.props(filterStyles.editorRow),
|
|
27303
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
|
|
27304
|
+
value: type,
|
|
27305
|
+
onChange: changeType,
|
|
27306
|
+
options: [{
|
|
27307
|
+
value: "last",
|
|
27308
|
+
label: "last"
|
|
27309
|
+
}, {
|
|
27310
|
+
value: "next",
|
|
27311
|
+
label: "next"
|
|
27312
|
+
}, {
|
|
27313
|
+
value: "after",
|
|
27314
|
+
label: "after"
|
|
27315
|
+
}, {
|
|
27316
|
+
value: "before",
|
|
27317
|
+
label: "before"
|
|
27318
|
+
}, {
|
|
27319
|
+
value: "in",
|
|
27320
|
+
label: "is"
|
|
27321
|
+
}, {
|
|
27322
|
+
value: "to",
|
|
27323
|
+
label: "between"
|
|
27324
|
+
}, {
|
|
27325
|
+
value: "null",
|
|
27326
|
+
label: "null"
|
|
27327
|
+
}, {
|
|
27328
|
+
value: "-null",
|
|
27329
|
+
label: "not null"
|
|
27330
|
+
}],
|
|
27331
|
+
customStyle: filterStyles.editorCell
|
|
27332
|
+
}), getTopEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel)]
|
|
27333
|
+
}), getBottomEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel)]
|
|
27157
27334
|
});
|
|
27158
27335
|
};
|
|
27159
|
-
|
|
27160
|
-
let beforeDate;
|
|
27161
|
-
let afterDate;
|
|
27162
|
-
let fromDate;
|
|
27163
|
-
let toDate;
|
|
27164
|
-
function getEditor(currentFilter, updateFilter, maxLevel) {
|
|
27336
|
+
function getTopEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel) {
|
|
27165
27337
|
switch (currentFilter.operator) {
|
|
27166
|
-
case "
|
|
27167
|
-
|
|
27168
|
-
|
|
27169
|
-
|
|
27170
|
-
|
|
27171
|
-
|
|
27172
|
-
|
|
27173
|
-
|
|
27174
|
-
in: createTemporalLiteral(newDate)
|
|
27175
|
-
});
|
|
27176
|
-
},
|
|
27177
|
-
maxLevel
|
|
27338
|
+
case "last":
|
|
27339
|
+
case "next":
|
|
27340
|
+
return /* @__PURE__ */ jsxRuntime.jsx(NUnitFilter, {
|
|
27341
|
+
currentFilter,
|
|
27342
|
+
maxLevel,
|
|
27343
|
+
updateFilter,
|
|
27344
|
+
units,
|
|
27345
|
+
setUnits
|
|
27178
27346
|
});
|
|
27179
|
-
|
|
27180
|
-
case "before":
|
|
27181
|
-
|
|
27182
|
-
|
|
27183
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
27184
|
-
|
|
27185
|
-
|
|
27186
|
-
|
|
27187
|
-
|
|
27188
|
-
|
|
27189
|
-
});
|
|
27190
|
-
},
|
|
27191
|
-
maxLevel
|
|
27347
|
+
case "after":
|
|
27348
|
+
case "before":
|
|
27349
|
+
case "to":
|
|
27350
|
+
case "in":
|
|
27351
|
+
return /* @__PURE__ */ jsxRuntime.jsx(UnitFilter, {
|
|
27352
|
+
currentFilter,
|
|
27353
|
+
maxLevel,
|
|
27354
|
+
updateFilter,
|
|
27355
|
+
units,
|
|
27356
|
+
setUnits
|
|
27192
27357
|
});
|
|
27193
|
-
|
|
27194
|
-
|
|
27195
|
-
|
|
27196
|
-
|
|
27197
|
-
|
|
27198
|
-
|
|
27199
|
-
|
|
27200
|
-
|
|
27201
|
-
|
|
27202
|
-
|
|
27203
|
-
|
|
27204
|
-
|
|
27205
|
-
|
|
27358
|
+
}
|
|
27359
|
+
return null;
|
|
27360
|
+
}
|
|
27361
|
+
function getBottomEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel) {
|
|
27362
|
+
switch (currentFilter.operator) {
|
|
27363
|
+
case "after":
|
|
27364
|
+
case "before":
|
|
27365
|
+
case "in":
|
|
27366
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SingleDateFilter, {
|
|
27367
|
+
currentFilter,
|
|
27368
|
+
maxLevel,
|
|
27369
|
+
updateFilter,
|
|
27370
|
+
units,
|
|
27371
|
+
setUnits
|
|
27206
27372
|
});
|
|
27207
|
-
|
|
27208
|
-
|
|
27209
|
-
|
|
27210
|
-
|
|
27211
|
-
|
|
27212
|
-
|
|
27213
|
-
|
|
27214
|
-
toValue: toDate,
|
|
27215
|
-
setFromValue: (newFromDate) => {
|
|
27216
|
-
updateFilter({
|
|
27217
|
-
...currentFilter,
|
|
27218
|
-
fromMoment: createTemporalLiteral(newFromDate)
|
|
27219
|
-
});
|
|
27220
|
-
},
|
|
27221
|
-
setToValue: (newToDate) => {
|
|
27222
|
-
updateFilter({
|
|
27223
|
-
...currentFilter,
|
|
27224
|
-
toMoment: createTemporalLiteral(newToDate)
|
|
27225
|
-
});
|
|
27226
|
-
},
|
|
27227
|
-
maxLevel
|
|
27373
|
+
case "to":
|
|
27374
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DoubleDateFilter, {
|
|
27375
|
+
currentFilter,
|
|
27376
|
+
maxLevel,
|
|
27377
|
+
updateFilter,
|
|
27378
|
+
units,
|
|
27379
|
+
setUnits
|
|
27228
27380
|
});
|
|
27229
|
-
}
|
|
27230
27381
|
}
|
|
27231
27382
|
return null;
|
|
27232
27383
|
}
|
|
27233
|
-
const
|
|
27234
|
-
|
|
27235
|
-
|
|
27236
|
-
|
|
27237
|
-
|
|
27238
|
-
|
|
27239
|
-
}
|
|
27240
|
-
|
|
27241
|
-
|
|
27242
|
-
|
|
27243
|
-
|
|
27244
|
-
label
|
|
27384
|
+
const DateUnits = [{
|
|
27385
|
+
value: "year",
|
|
27386
|
+
label: "years"
|
|
27387
|
+
}, {
|
|
27388
|
+
value: "quarter",
|
|
27389
|
+
label: "quarters"
|
|
27390
|
+
}, {
|
|
27391
|
+
value: "month",
|
|
27392
|
+
label: "months"
|
|
27393
|
+
}, {
|
|
27394
|
+
value: "week",
|
|
27395
|
+
label: "weeks"
|
|
27396
|
+
}, {
|
|
27397
|
+
value: "day",
|
|
27398
|
+
label: "days"
|
|
27399
|
+
}];
|
|
27400
|
+
const TimeUnits = [{
|
|
27401
|
+
value: "hour",
|
|
27402
|
+
label: "hours"
|
|
27403
|
+
}, {
|
|
27404
|
+
value: "minute",
|
|
27405
|
+
label: "minutes"
|
|
27406
|
+
}, {
|
|
27407
|
+
value: "second",
|
|
27408
|
+
label: "seconds"
|
|
27409
|
+
}];
|
|
27410
|
+
function NUnitFilter({
|
|
27411
|
+
currentFilter,
|
|
27412
|
+
updateFilter,
|
|
27413
|
+
setUnits,
|
|
27414
|
+
maxLevel
|
|
27245
27415
|
}) {
|
|
27246
|
-
const
|
|
27247
|
-
|
|
27248
|
-
|
|
27249
|
-
|
|
27250
|
-
|
|
27251
|
-
const
|
|
27252
|
-
|
|
27253
|
-
|
|
27254
|
-
|
|
27255
|
-
|
|
27256
|
-
|
|
27416
|
+
const {
|
|
27417
|
+
n,
|
|
27418
|
+
units
|
|
27419
|
+
} = currentFilter;
|
|
27420
|
+
const options = maxLevel === "day" ? DateUnits : [...DateUnits, ...TimeUnits];
|
|
27421
|
+
const updateN = (event) => {
|
|
27422
|
+
const n2 = event.target.value;
|
|
27423
|
+
updateFilter({
|
|
27424
|
+
...currentFilter,
|
|
27425
|
+
n: n2
|
|
27426
|
+
});
|
|
27427
|
+
};
|
|
27428
|
+
const updateUnits = (units2) => {
|
|
27429
|
+
setUnits(units2);
|
|
27430
|
+
updateFilter({
|
|
27431
|
+
...currentFilter,
|
|
27432
|
+
units: units2
|
|
27433
|
+
});
|
|
27434
|
+
};
|
|
27435
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
27436
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
|
|
27437
|
+
type: "number",
|
|
27438
|
+
value: n,
|
|
27439
|
+
..._stylex.props(filterStyles.input, filterStyles.editorCell),
|
|
27440
|
+
onChange: updateN
|
|
27441
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
|
|
27442
|
+
options,
|
|
27443
|
+
value: units,
|
|
27444
|
+
onChange: updateUnits,
|
|
27445
|
+
customStyle: filterStyles.editorCell
|
|
27446
|
+
})]
|
|
27447
|
+
});
|
|
27448
|
+
}
|
|
27449
|
+
function UnitFilter({
|
|
27450
|
+
units,
|
|
27451
|
+
setUnits,
|
|
27452
|
+
maxLevel
|
|
27453
|
+
}) {
|
|
27454
|
+
const options = maxLevel === "day" ? DateUnits : [...DateUnits, ...TimeUnits];
|
|
27455
|
+
return /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
|
|
27456
|
+
options,
|
|
27457
|
+
value: units,
|
|
27458
|
+
onChange: setUnits,
|
|
27459
|
+
customStyle: filterStyles.editorCell
|
|
27460
|
+
});
|
|
27461
|
+
}
|
|
27462
|
+
function SingleDateFilter({
|
|
27463
|
+
currentFilter,
|
|
27464
|
+
updateFilter,
|
|
27465
|
+
units,
|
|
27466
|
+
maxLevel
|
|
27467
|
+
}) {
|
|
27468
|
+
const moment2 = currentFilter.operator === "after" ? currentFilter.after : currentFilter.operator === "before" ? currentFilter.before : currentFilter.in;
|
|
27469
|
+
const date = extractDateFromMoment(moment2);
|
|
27470
|
+
const updateDate = (date2) => {
|
|
27471
|
+
updateFilter({
|
|
27472
|
+
...currentFilter,
|
|
27473
|
+
[currentFilter.operator]: createTemporalLiteral(date2, units)
|
|
27474
|
+
});
|
|
27475
|
+
};
|
|
27476
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
27477
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
27478
|
+
..._stylex.props(filterStyles.editorRow),
|
|
27479
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DateInput, {
|
|
27480
|
+
value: date,
|
|
27481
|
+
setValue: updateDate,
|
|
27482
|
+
units,
|
|
27483
|
+
customStyle: {
|
|
27484
|
+
...filterStyles.input,
|
|
27485
|
+
...filterStyles.editorCell
|
|
27486
|
+
}
|
|
27487
|
+
})
|
|
27488
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
27489
|
+
..._stylex.props(filterStyles.editorRow),
|
|
27490
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, {
|
|
27491
|
+
value: date,
|
|
27492
|
+
setValue: updateDate,
|
|
27493
|
+
units,
|
|
27494
|
+
maxLevel,
|
|
27495
|
+
customStyle: filterStyles.editorCell
|
|
27496
|
+
})
|
|
27497
|
+
})]
|
|
27498
|
+
});
|
|
27499
|
+
}
|
|
27500
|
+
function DoubleDateFilter({
|
|
27501
|
+
currentFilter,
|
|
27502
|
+
updateFilter,
|
|
27503
|
+
units,
|
|
27504
|
+
maxLevel
|
|
27505
|
+
}) {
|
|
27506
|
+
const {
|
|
27507
|
+
fromMoment,
|
|
27508
|
+
toMoment
|
|
27509
|
+
} = currentFilter;
|
|
27510
|
+
const fromDate = extractDateFromMoment(fromMoment);
|
|
27511
|
+
const toDate2 = extractDateFromMoment(toMoment);
|
|
27512
|
+
const [date, setDate] = React.useState(fromDate);
|
|
27513
|
+
const [focusedDate, setFocusedDate] = React.useState("from");
|
|
27514
|
+
const updateFromDate = (date2) => {
|
|
27515
|
+
updateFilter({
|
|
27516
|
+
...currentFilter,
|
|
27517
|
+
fromMoment: createTemporalLiteral(date2, units)
|
|
27518
|
+
});
|
|
27519
|
+
};
|
|
27520
|
+
const updateToDate = (date2) => {
|
|
27521
|
+
updateFilter({
|
|
27522
|
+
...currentFilter,
|
|
27523
|
+
toMoment: createTemporalLiteral(date2, units)
|
|
27524
|
+
});
|
|
27525
|
+
};
|
|
27526
|
+
const updateDate = (date2) => {
|
|
27527
|
+
if (focusedDate === "from") {
|
|
27528
|
+
updateFromDate(date2);
|
|
27257
27529
|
} else {
|
|
27258
|
-
|
|
27530
|
+
updateToDate(date2);
|
|
27259
27531
|
}
|
|
27532
|
+
setDate(date2);
|
|
27260
27533
|
};
|
|
27261
|
-
|
|
27262
|
-
|
|
27263
|
-
|
|
27264
|
-
|
|
27265
|
-
|
|
27266
|
-
|
|
27267
|
-
|
|
27268
|
-
|
|
27269
|
-
const parsedDate = new Date(innerValue);
|
|
27270
|
-
if (!isNaN(parsedDate.getTime())) {
|
|
27271
|
-
return parsedDate;
|
|
27272
|
-
}
|
|
27273
|
-
} catch (ex) {
|
|
27534
|
+
const updateFocusedDate = (focusedDate2) => {
|
|
27535
|
+
setFocusedDate(focusedDate2);
|
|
27536
|
+
if (focusedDate2 === "from") {
|
|
27537
|
+
const fromDate2 = extractDateFromMoment(fromMoment);
|
|
27538
|
+
setDate(fromDate2);
|
|
27539
|
+
} else {
|
|
27540
|
+
const toDate22 = extractDateFromMoment(toMoment);
|
|
27541
|
+
setDate(toDate22);
|
|
27274
27542
|
}
|
|
27275
|
-
return value;
|
|
27276
27543
|
};
|
|
27277
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
27278
|
-
ref,
|
|
27279
|
-
style: {
|
|
27280
|
-
position: "relative",
|
|
27281
|
-
color: "rgb(95, 99, 104)"
|
|
27282
|
-
},
|
|
27283
|
-
onFocus: () => setIsPickerOpen(true),
|
|
27284
|
-
onBlur: (e) => {
|
|
27285
|
-
if (e.relatedTarget && ref.current && !ref.current.contains(e.relatedTarget)) {
|
|
27286
|
-
setIsPickerOpen(false);
|
|
27287
|
-
checkForErrorsOrCommit(new Date(innerValue));
|
|
27288
|
-
}
|
|
27289
|
-
},
|
|
27544
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
27290
27545
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
27291
|
-
|
|
27292
|
-
|
|
27293
|
-
|
|
27294
|
-
|
|
27295
|
-
|
|
27296
|
-
|
|
27297
|
-
|
|
27546
|
+
..._stylex.props(filterStyles.editorRow),
|
|
27547
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(DateInput, {
|
|
27548
|
+
value: fromDate,
|
|
27549
|
+
setValue: updateFromDate,
|
|
27550
|
+
units,
|
|
27551
|
+
customStyle: {
|
|
27552
|
+
...filterStyles.input,
|
|
27553
|
+
...filterStyles.editorCell
|
|
27298
27554
|
},
|
|
27299
|
-
|
|
27300
|
-
|
|
27301
|
-
|
|
27302
|
-
|
|
27303
|
-
|
|
27304
|
-
|
|
27305
|
-
|
|
27306
|
-
|
|
27555
|
+
onFocus: () => updateFocusedDate("from"),
|
|
27556
|
+
isActive: focusedDate === "from"
|
|
27557
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(DateInput, {
|
|
27558
|
+
value: toDate2,
|
|
27559
|
+
setValue: updateToDate,
|
|
27560
|
+
units,
|
|
27561
|
+
customStyle: {
|
|
27562
|
+
...filterStyles.input,
|
|
27563
|
+
...filterStyles.editorCell
|
|
27564
|
+
},
|
|
27565
|
+
onFocus: () => updateFocusedDate("to"),
|
|
27566
|
+
isActive: focusedDate === "to"
|
|
27307
27567
|
})]
|
|
27308
|
-
}),
|
|
27309
|
-
|
|
27310
|
-
position: "absolute",
|
|
27311
|
-
top: "100%",
|
|
27312
|
-
left: 0,
|
|
27313
|
-
zIndex: 1e3,
|
|
27314
|
-
marginTop: "5px",
|
|
27315
|
-
padding: "10px",
|
|
27316
|
-
backgroundColor: "white",
|
|
27317
|
-
borderRadius: "5px",
|
|
27318
|
-
boxShadow: "0 2px 10px rgba(0, 0, 0, 0.1)",
|
|
27319
|
-
border: "1px solid #e0e0e0"
|
|
27320
|
-
},
|
|
27568
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
27569
|
+
..._stylex.props(filterStyles.editorRow),
|
|
27321
27570
|
children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, {
|
|
27322
|
-
value:
|
|
27323
|
-
setValue:
|
|
27324
|
-
|
|
27325
|
-
|
|
27326
|
-
|
|
27571
|
+
value: date,
|
|
27572
|
+
setValue: updateDate,
|
|
27573
|
+
units,
|
|
27574
|
+
maxLevel,
|
|
27575
|
+
customStyle: filterStyles.editorCell
|
|
27327
27576
|
})
|
|
27328
27577
|
})]
|
|
27329
27578
|
});
|
|
27330
27579
|
}
|
|
27331
|
-
function
|
|
27332
|
-
|
|
27333
|
-
|
|
27334
|
-
|
|
27335
|
-
}
|
|
27336
|
-
return /* @__PURE__ */ jsxRuntime.jsx(ClickableDateToken, {
|
|
27337
|
-
value,
|
|
27338
|
-
setValue,
|
|
27339
|
-
maxLevel
|
|
27340
|
-
});
|
|
27580
|
+
function createTemporalLiteral(date, units) {
|
|
27581
|
+
return {
|
|
27582
|
+
moment: "literal",
|
|
27583
|
+
literal: hooks(date).format(formats[units])
|
|
27584
|
+
};
|
|
27341
27585
|
}
|
|
27342
|
-
function
|
|
27343
|
-
|
|
27344
|
-
|
|
27345
|
-
|
|
27346
|
-
|
|
27347
|
-
maxLevel
|
|
27348
|
-
}) {
|
|
27349
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
27350
|
-
style: {
|
|
27351
|
-
display: "flex",
|
|
27352
|
-
gap: "10px"
|
|
27353
|
-
},
|
|
27354
|
-
children: [/* @__PURE__ */ jsxRuntime.jsx(ClickableDateToken, {
|
|
27355
|
-
value: fromValue,
|
|
27356
|
-
setValue: setFromValue,
|
|
27357
|
-
maxLevel
|
|
27358
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(ClickableDateToken, {
|
|
27359
|
-
value: toValue,
|
|
27360
|
-
setValue: setToValue,
|
|
27361
|
-
maxLevel
|
|
27362
|
-
})]
|
|
27363
|
-
});
|
|
27586
|
+
function extractDateFromMoment(momentObj) {
|
|
27587
|
+
if (momentObj && momentObj.moment === "literal") {
|
|
27588
|
+
return hooks(momentObj.literal).toDate();
|
|
27589
|
+
}
|
|
27590
|
+
return /* @__PURE__ */ new Date();
|
|
27364
27591
|
}
|
|
27365
|
-
function dateTimeFilterChangeType(filter, type) {
|
|
27366
|
-
let
|
|
27367
|
-
let
|
|
27368
|
-
|
|
27369
|
-
|
|
27370
|
-
|
|
27371
|
-
|
|
27372
|
-
|
|
27373
|
-
|
|
27374
|
-
|
|
27375
|
-
|
|
27376
|
-
|
|
27592
|
+
function dateTimeFilterChangeType(filter, type, units) {
|
|
27593
|
+
let n = "7";
|
|
27594
|
+
let fromMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
|
|
27595
|
+
let toMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
|
|
27596
|
+
switch (filter.operator) {
|
|
27597
|
+
case "last":
|
|
27598
|
+
case "next":
|
|
27599
|
+
n = filter.n;
|
|
27600
|
+
units = filter.units;
|
|
27601
|
+
break;
|
|
27602
|
+
case "after":
|
|
27603
|
+
fromMoment = filter.after;
|
|
27604
|
+
toMoment = filter.after;
|
|
27605
|
+
break;
|
|
27606
|
+
case "before":
|
|
27607
|
+
fromMoment = filter.before;
|
|
27608
|
+
toMoment = filter.before;
|
|
27609
|
+
break;
|
|
27610
|
+
case "to":
|
|
27611
|
+
fromMoment = filter.fromMoment;
|
|
27612
|
+
toMoment = filter.toMoment;
|
|
27613
|
+
break;
|
|
27377
27614
|
}
|
|
27378
27615
|
switch (type) {
|
|
27379
|
-
case "
|
|
27616
|
+
case "last":
|
|
27617
|
+
case "next":
|
|
27380
27618
|
return {
|
|
27381
|
-
operator:
|
|
27382
|
-
|
|
27619
|
+
operator: type,
|
|
27620
|
+
n,
|
|
27621
|
+
units
|
|
27383
27622
|
};
|
|
27384
|
-
case "
|
|
27623
|
+
case "after":
|
|
27385
27624
|
return {
|
|
27386
|
-
operator:
|
|
27387
|
-
|
|
27625
|
+
operator: type,
|
|
27626
|
+
after: fromMoment
|
|
27388
27627
|
};
|
|
27389
|
-
case "
|
|
27628
|
+
case "before":
|
|
27390
27629
|
return {
|
|
27391
|
-
operator:
|
|
27392
|
-
|
|
27630
|
+
operator: type,
|
|
27631
|
+
before: fromMoment
|
|
27393
27632
|
};
|
|
27394
|
-
case "
|
|
27633
|
+
case "to":
|
|
27395
27634
|
return {
|
|
27396
|
-
operator:
|
|
27397
|
-
fromMoment
|
|
27398
|
-
toMoment
|
|
27635
|
+
operator: type,
|
|
27636
|
+
fromMoment,
|
|
27637
|
+
toMoment
|
|
27399
27638
|
};
|
|
27400
|
-
case "
|
|
27639
|
+
case "null":
|
|
27401
27640
|
return {
|
|
27402
27641
|
operator: "null"
|
|
27403
27642
|
};
|
|
27404
|
-
case "
|
|
27643
|
+
case "-null":
|
|
27405
27644
|
return {
|
|
27406
27645
|
operator: "null",
|
|
27407
27646
|
not: true
|
|
27408
27647
|
};
|
|
27409
|
-
default:
|
|
27410
|
-
return filter;
|
|
27411
27648
|
}
|
|
27649
|
+
return filter;
|
|
27412
27650
|
}
|
|
27413
27651
|
function FilterDialog({
|
|
27414
27652
|
fieldInfo,
|
|
@@ -27541,21 +27779,46 @@ function useFilterModal({
|
|
|
27541
27779
|
}
|
|
27542
27780
|
setQuery == null ? void 0 : setQuery(rootQuery == null ? void 0 : rootQuery.build());
|
|
27543
27781
|
};
|
|
27544
|
-
const FilterModal = () =>
|
|
27545
|
-
|
|
27546
|
-
|
|
27547
|
-
|
|
27548
|
-
|
|
27549
|
-
|
|
27550
|
-
|
|
27551
|
-
|
|
27552
|
-
|
|
27553
|
-
|
|
27554
|
-
|
|
27555
|
-
|
|
27556
|
-
|
|
27557
|
-
|
|
27558
|
-
|
|
27782
|
+
const FilterModal = () => {
|
|
27783
|
+
const {
|
|
27784
|
+
refs,
|
|
27785
|
+
floatingStyles
|
|
27786
|
+
} = useFloating({
|
|
27787
|
+
placement: "right-start",
|
|
27788
|
+
strategy: "fixed",
|
|
27789
|
+
open,
|
|
27790
|
+
middleware: [offset$1({
|
|
27791
|
+
mainAxis: 3,
|
|
27792
|
+
crossAxis: 3
|
|
27793
|
+
}), shift({
|
|
27794
|
+
boundary: document.body,
|
|
27795
|
+
crossAxis: true,
|
|
27796
|
+
padding: 10
|
|
27797
|
+
})],
|
|
27798
|
+
whileElementsMounted: autoUpdate
|
|
27799
|
+
});
|
|
27800
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Root$2, {
|
|
27801
|
+
open,
|
|
27802
|
+
onOpenChange: setOpen,
|
|
27803
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(Portal$3, {
|
|
27804
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Overlay, {
|
|
27805
|
+
...{
|
|
27806
|
+
className: "mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h"
|
|
27807
|
+
},
|
|
27808
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
27809
|
+
style: {
|
|
27810
|
+
position: "fixed",
|
|
27811
|
+
left: x2,
|
|
27812
|
+
top: y2
|
|
27813
|
+
},
|
|
27814
|
+
ref: refs.setReference
|
|
27815
|
+
})
|
|
27816
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs(Content$1, {
|
|
27817
|
+
...{
|
|
27818
|
+
className: "mly11uqc5h"
|
|
27819
|
+
},
|
|
27820
|
+
style: floatingStyles,
|
|
27821
|
+
ref: refs.setFloating,
|
|
27559
27822
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Title, {
|
|
27560
27823
|
...{
|
|
27561
27824
|
className: "mly1s85apg"
|
|
@@ -27573,10 +27836,10 @@ function useFilterModal({
|
|
|
27573
27836
|
setFilter: (filter2) => setFilter(filter2),
|
|
27574
27837
|
setOpen
|
|
27575
27838
|
})]
|
|
27576
|
-
})
|
|
27839
|
+
})]
|
|
27577
27840
|
})
|
|
27578
|
-
})
|
|
27579
|
-
}
|
|
27841
|
+
});
|
|
27842
|
+
};
|
|
27580
27843
|
return {
|
|
27581
27844
|
openFilterModal,
|
|
27582
27845
|
FilterModal
|
|
@@ -27610,26 +27873,22 @@ function getDefaultFilter(fieldInfo) {
|
|
|
27610
27873
|
return {
|
|
27611
27874
|
kind: "date",
|
|
27612
27875
|
parsed: {
|
|
27613
|
-
operator: "
|
|
27614
|
-
|
|
27876
|
+
operator: "last",
|
|
27877
|
+
n: "7",
|
|
27878
|
+
units: "day"
|
|
27615
27879
|
}
|
|
27616
27880
|
};
|
|
27617
27881
|
} else {
|
|
27618
27882
|
return {
|
|
27619
27883
|
kind: "timestamp",
|
|
27620
27884
|
parsed: {
|
|
27621
|
-
operator: "
|
|
27622
|
-
|
|
27885
|
+
operator: "last",
|
|
27886
|
+
n: "7",
|
|
27887
|
+
units: "day"
|
|
27623
27888
|
}
|
|
27624
27889
|
};
|
|
27625
27890
|
}
|
|
27626
27891
|
}
|
|
27627
|
-
function createTemporalDefault() {
|
|
27628
|
-
return {
|
|
27629
|
-
moment: "literal",
|
|
27630
|
-
literal: hooks(/* @__PURE__ */ new Date()).format("YYYY-MM-DD HH:mm:ss.0")
|
|
27631
|
-
};
|
|
27632
|
-
}
|
|
27633
27892
|
function MalloyExplorerProvider({
|
|
27634
27893
|
source,
|
|
27635
27894
|
query,
|
|
@@ -27675,12 +27934,10 @@ function QueryActionBar({
|
|
|
27675
27934
|
};
|
|
27676
27935
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
27677
27936
|
...{
|
|
27678
|
-
className: "mly78zum5 mly1qughib mly6s0dn4
|
|
27937
|
+
className: "mly78zum5 mly1qughib mly6s0dn4 mly153ncpu"
|
|
27679
27938
|
},
|
|
27680
27939
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
27681
|
-
...
|
|
27682
|
-
className: "mly6icuqf mly117nqv4 mly1j61zf2"
|
|
27683
|
-
},
|
|
27940
|
+
..._stylex.props(fontStyles.largeBody, styles$k.title),
|
|
27684
27941
|
children: "Query"
|
|
27685
27942
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
27686
27943
|
...{
|
|
@@ -27715,7 +27972,13 @@ function QueryActionBar({
|
|
|
27715
27972
|
})]
|
|
27716
27973
|
});
|
|
27717
27974
|
}
|
|
27718
|
-
const styles$
|
|
27975
|
+
const styles$k = {
|
|
27976
|
+
title: {
|
|
27977
|
+
fontWeight: "mly1xlr1w8",
|
|
27978
|
+
$$css: true
|
|
27979
|
+
}
|
|
27980
|
+
};
|
|
27981
|
+
const styles$j = {
|
|
27719
27982
|
labelWithIcon: {
|
|
27720
27983
|
display: "mly78zum5",
|
|
27721
27984
|
alignItems: "mly6s0dn4",
|
|
@@ -27813,6 +28076,10 @@ const hoverStyles = {
|
|
|
27813
28076
|
display: "mly2b4tyj",
|
|
27814
28077
|
flexShrink: "mly2lah0s",
|
|
27815
28078
|
$$css: true
|
|
28079
|
+
},
|
|
28080
|
+
hoverOpen: {
|
|
28081
|
+
display: "mly3nfvp2",
|
|
28082
|
+
$$css: true
|
|
27816
28083
|
}
|
|
27817
28084
|
};
|
|
27818
28085
|
function ClearButton({
|
|
@@ -27890,9 +28157,6 @@ function segmentNestNo(segment, name) {
|
|
|
27890
28157
|
}
|
|
27891
28158
|
function addGroupBy(rootQuery, segment, field, path, setQuery) {
|
|
27892
28159
|
segment.addGroupBy(field.name, path);
|
|
27893
|
-
if (!segmentHasLimit(segment)) {
|
|
27894
|
-
segment.setLimit(1e3);
|
|
27895
|
-
}
|
|
27896
28160
|
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
27897
28161
|
}
|
|
27898
28162
|
function getSegmentIfPresent(parent) {
|
|
@@ -27906,6 +28170,21 @@ function getSegmentIfPresent(parent) {
|
|
|
27906
28170
|
}
|
|
27907
28171
|
return void 0;
|
|
27908
28172
|
}
|
|
28173
|
+
const QUERY_RENDERERS = ["table", "bar_chart", "dashboard", "json", "line_chart", "list", "list_detail", "point_map", "scatter_chart", "segment_map", "shape_map", "sparkline"];
|
|
28174
|
+
const ATOMIC_RENDERERS = ["number", "boolean", "currency", "image", "url", "percent", "text", "time"];
|
|
28175
|
+
const RENDERERS = [...QUERY_RENDERERS, ...ATOMIC_RENDERERS];
|
|
28176
|
+
function tagToRenderer(tag) {
|
|
28177
|
+
if (tag) {
|
|
28178
|
+
const tagProps = tag.getProperties();
|
|
28179
|
+
const tags = Object.keys(tagProps);
|
|
28180
|
+
for (const tag2 of tags) {
|
|
28181
|
+
if (RENDERERS.includes(tag2) && !tagProps[tag2].deleted) {
|
|
28182
|
+
return tag2;
|
|
28183
|
+
}
|
|
28184
|
+
}
|
|
28185
|
+
}
|
|
28186
|
+
return null;
|
|
28187
|
+
}
|
|
27909
28188
|
function atomicTypeToIcon(type) {
|
|
27910
28189
|
return atomicTypeMap[type];
|
|
27911
28190
|
}
|
|
@@ -27931,6 +28210,11 @@ function fieldToIcon(field) {
|
|
|
27931
28210
|
function relationshipToIcon(relationship) {
|
|
27932
28211
|
return relationshipMap[relationship];
|
|
27933
28212
|
}
|
|
28213
|
+
function viewToVisualizationIcon(view) {
|
|
28214
|
+
const currentTag = view.getTag();
|
|
28215
|
+
const currentRenderer = tagToRenderer(currentTag) ?? "table";
|
|
28216
|
+
return `viz_${currentRenderer}`;
|
|
28217
|
+
}
|
|
27934
28218
|
const atomicTypeMap = {
|
|
27935
28219
|
array_type: "array",
|
|
27936
28220
|
string_type: "string",
|
|
@@ -27969,16 +28253,11 @@ function FieldToken({
|
|
|
27969
28253
|
className: "mly78zum5 mly6s0dn4 mly1nhvcw1 mly1jnr06f mly1ypdohk mlym9y5t7"
|
|
27970
28254
|
}
|
|
27971
28255
|
}[!!hoverActionsVisible << 0],
|
|
27972
|
-
children: [/* @__PURE__ */ jsxRuntime.jsx(
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27976
|
-
|
|
27977
|
-
label: field.name,
|
|
27978
|
-
color: fieldKindToColor(field.kind),
|
|
27979
|
-
icon: fieldToIcon(field),
|
|
27980
|
-
...props2
|
|
27981
|
-
})
|
|
28256
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Token, {
|
|
28257
|
+
label: field.name,
|
|
28258
|
+
color: fieldKindToColor(field.kind),
|
|
28259
|
+
icon: fieldToIcon(field),
|
|
28260
|
+
...props2
|
|
27982
28261
|
}), hoverActions && /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
27983
28262
|
...{
|
|
27984
28263
|
className: "mly1vsucm1 mly2lah0s"
|
|
@@ -27995,52 +28274,37 @@ function BadgeForField({
|
|
|
27995
28274
|
label: "view",
|
|
27996
28275
|
icon: "view_filled",
|
|
27997
28276
|
color: "purple",
|
|
27998
|
-
customStyle: styles$
|
|
28277
|
+
customStyle: styles$i.noBackground
|
|
27999
28278
|
});
|
|
28000
28279
|
} else if (field.kind === "dimension") {
|
|
28001
28280
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
28002
28281
|
label: "dimension",
|
|
28003
|
-
icon:
|
|
28282
|
+
icon: fieldToIcon(field),
|
|
28004
28283
|
color: "cyan",
|
|
28005
|
-
customStyle: styles$
|
|
28284
|
+
customStyle: styles$i.noBackground
|
|
28006
28285
|
});
|
|
28007
28286
|
} else if (field.kind === "measure") {
|
|
28008
28287
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
28009
28288
|
label: "measure",
|
|
28010
|
-
icon:
|
|
28289
|
+
icon: fieldToIcon(field),
|
|
28011
28290
|
color: "green",
|
|
28012
|
-
customStyle: styles$
|
|
28291
|
+
customStyle: styles$i.noBackground
|
|
28013
28292
|
});
|
|
28014
28293
|
} else if (field.kind === "join") {
|
|
28015
28294
|
return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
|
|
28016
28295
|
label: "join",
|
|
28017
|
-
icon:
|
|
28296
|
+
icon: fieldToIcon(field),
|
|
28018
28297
|
color: "gray",
|
|
28019
|
-
customStyle: styles$
|
|
28298
|
+
customStyle: styles$i.noBackground
|
|
28020
28299
|
});
|
|
28021
28300
|
}
|
|
28022
28301
|
}
|
|
28023
|
-
const styles$
|
|
28302
|
+
const styles$i = {
|
|
28024
28303
|
noBackground: {
|
|
28025
28304
|
backgroundColor: "mlyjbqb8w",
|
|
28026
28305
|
$$css: true
|
|
28027
28306
|
}
|
|
28028
28307
|
};
|
|
28029
|
-
const QUERY_RENDERERS = ["table", "bar_chart", "dashboard", "json", "line_chart", "list", "list_detail", "point_map", "scatter_chart", "segment_map", "shape_map", "sparkline"];
|
|
28030
|
-
const ATOMIC_RENDERERS = ["number", "boolean", "currency", "image", "url", "percent", "text", "time"];
|
|
28031
|
-
const RENDERERS = [...QUERY_RENDERERS, ...ATOMIC_RENDERERS];
|
|
28032
|
-
function tagToRenderer(tag) {
|
|
28033
|
-
if (tag) {
|
|
28034
|
-
const tagProps = tag.getProperties();
|
|
28035
|
-
const tags = Object.keys(tagProps);
|
|
28036
|
-
for (const tag2 of tags) {
|
|
28037
|
-
if (RENDERERS.includes(tag2) && !tagProps[tag2].deleted) {
|
|
28038
|
-
return tag2;
|
|
28039
|
-
}
|
|
28040
|
-
}
|
|
28041
|
-
}
|
|
28042
|
-
return null;
|
|
28043
|
-
}
|
|
28044
28308
|
function Visualization$1({
|
|
28045
28309
|
rootQuery,
|
|
28046
28310
|
view
|
|
@@ -28064,7 +28328,7 @@ function Visualization$1({
|
|
|
28064
28328
|
onClick: () => setRenderer(viz)
|
|
28065
28329
|
}));
|
|
28066
28330
|
const tokens2 = [/* @__PURE__ */ jsxRuntime.jsx(SelectorToken, {
|
|
28067
|
-
customStyle: styles$
|
|
28331
|
+
customStyle: styles$h.first,
|
|
28068
28332
|
icon: `viz_${currentRenderer}`,
|
|
28069
28333
|
value: currentRenderer,
|
|
28070
28334
|
items: vizes,
|
|
@@ -28074,7 +28338,7 @@ function Visualization$1({
|
|
|
28074
28338
|
children: tokens2
|
|
28075
28339
|
});
|
|
28076
28340
|
}
|
|
28077
|
-
const styles$
|
|
28341
|
+
const styles$h = {
|
|
28078
28342
|
first: {
|
|
28079
28343
|
flexGrow: "mly1iyjqo2",
|
|
28080
28344
|
justifyContent: "mlylqzeqv",
|
|
@@ -28103,7 +28367,7 @@ function ViewAttributeTable({
|
|
|
28103
28367
|
}) {
|
|
28104
28368
|
const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
|
|
28105
28369
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28106
|
-
..._stylex.props(styles$
|
|
28370
|
+
..._stylex.props(styles$g.attributeTableContainer, style),
|
|
28107
28371
|
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
28108
28372
|
children: /* @__PURE__ */ jsxRuntime.jsx("table", {
|
|
28109
28373
|
...{
|
|
@@ -28143,9 +28407,9 @@ function ViewAttributeTableRow({
|
|
|
28143
28407
|
className: "mlydpxx8g"
|
|
28144
28408
|
},
|
|
28145
28409
|
children: [/* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
28146
|
-
..._stylex.props(styles$
|
|
28410
|
+
..._stylex.props(styles$g.attributeTableKeyCell, fontStyles.supporting),
|
|
28147
28411
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28148
|
-
..._stylex.props(styles$
|
|
28412
|
+
..._stylex.props(styles$g.attributeTableKeyCellContent, fontStyles.supporting),
|
|
28149
28413
|
children: attribute
|
|
28150
28414
|
})
|
|
28151
28415
|
}), /* @__PURE__ */ jsxRuntime.jsx("td", {
|
|
@@ -28156,7 +28420,7 @@ function ViewAttributeTableRow({
|
|
|
28156
28420
|
})]
|
|
28157
28421
|
});
|
|
28158
28422
|
}
|
|
28159
|
-
const styles$
|
|
28423
|
+
const styles$g = {
|
|
28160
28424
|
attributeTableContainer: {
|
|
28161
28425
|
padding: "mlye8ttls",
|
|
28162
28426
|
paddingInline: null,
|
|
@@ -28312,7 +28576,7 @@ function HoverText({
|
|
|
28312
28576
|
asChild: true,
|
|
28313
28577
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28314
28578
|
ref: textRef,
|
|
28315
|
-
..._stylex.props(styles$
|
|
28579
|
+
..._stylex.props(styles$f.text, fontStyles.supporting),
|
|
28316
28580
|
children: text2
|
|
28317
28581
|
})
|
|
28318
28582
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
|
|
@@ -28320,7 +28584,7 @@ function HoverText({
|
|
|
28320
28584
|
side,
|
|
28321
28585
|
align,
|
|
28322
28586
|
children: /* @__PURE__ */ jsxRuntime.jsx("pre", {
|
|
28323
|
-
..._stylex.props(styles$
|
|
28587
|
+
..._stylex.props(styles$f.hoverText, fontStyles.tooltipText),
|
|
28324
28588
|
children: text2
|
|
28325
28589
|
})
|
|
28326
28590
|
})
|
|
@@ -28329,7 +28593,7 @@ function HoverText({
|
|
|
28329
28593
|
})
|
|
28330
28594
|
});
|
|
28331
28595
|
}
|
|
28332
|
-
const styles$
|
|
28596
|
+
const styles$f = {
|
|
28333
28597
|
text: {
|
|
28334
28598
|
whiteSpace: "mlyuxw1ft",
|
|
28335
28599
|
textOverflow: "mlylyipyv",
|
|
@@ -28391,7 +28655,7 @@ function FieldHoverCard({
|
|
|
28391
28655
|
details = /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
|
|
28392
28656
|
viewInfo: field,
|
|
28393
28657
|
isCompact: true,
|
|
28394
|
-
style: styles$
|
|
28658
|
+
style: styles$e.viewAttributeTable
|
|
28395
28659
|
});
|
|
28396
28660
|
} else if (field.kind === "dimension") {
|
|
28397
28661
|
details = /* @__PURE__ */ jsxRuntime.jsx(TopValuesTable, {
|
|
@@ -28400,7 +28664,7 @@ function FieldHoverCard({
|
|
|
28400
28664
|
});
|
|
28401
28665
|
}
|
|
28402
28666
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
28403
|
-
..._stylex.props(styles$
|
|
28667
|
+
..._stylex.props(styles$e.container, fontStyles.body),
|
|
28404
28668
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
28405
28669
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28406
28670
|
...{
|
|
@@ -28410,7 +28674,7 @@ function FieldHoverCard({
|
|
|
28410
28674
|
field
|
|
28411
28675
|
})
|
|
28412
28676
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28413
|
-
..._stylex.props(fontStyles.supporting, styles$
|
|
28677
|
+
..._stylex.props(fontStyles.supporting, styles$e.path),
|
|
28414
28678
|
children: pathString
|
|
28415
28679
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28416
28680
|
..._stylex.props(fontStyles.emphasized),
|
|
@@ -28424,7 +28688,7 @@ function FieldHoverCard({
|
|
|
28424
28688
|
})]
|
|
28425
28689
|
});
|
|
28426
28690
|
}
|
|
28427
|
-
const styles$
|
|
28691
|
+
const styles$e = {
|
|
28428
28692
|
container: {
|
|
28429
28693
|
width: "mlybl57os",
|
|
28430
28694
|
maxHeight: "mly1t2cwa7",
|
|
@@ -28464,6 +28728,7 @@ const styles$b = {
|
|
|
28464
28728
|
$$css: true
|
|
28465
28729
|
}
|
|
28466
28730
|
};
|
|
28731
|
+
const isArrayOrRecord = (field) => field.kind === "dimension" && (field.type.kind === "array_type" && field.type.element_type.kind === "record_type" || field.type.kind === "record_type");
|
|
28467
28732
|
function FieldList({
|
|
28468
28733
|
view,
|
|
28469
28734
|
fields,
|
|
@@ -28475,8 +28740,9 @@ function FieldList({
|
|
|
28475
28740
|
const groups = React.useMemo(() => {
|
|
28476
28741
|
const groups2 = [];
|
|
28477
28742
|
const buildGroups = (types22, path, name, fields2) => {
|
|
28478
|
-
const filteredFields = sortFieldInfos(fields2).filter((field) => field.kind !== "join").filter((field) => field.name.includes(search) && types22.includes(field.kind)).filter((field) => filter ? filter(view, field, path) : true);
|
|
28743
|
+
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);
|
|
28479
28744
|
const joins = fields2.filter((field) => field.kind === "join");
|
|
28745
|
+
const arraysAndRecords = fields2.filter(isArrayOrRecord);
|
|
28480
28746
|
if (filteredFields.length) {
|
|
28481
28747
|
groups2.push({
|
|
28482
28748
|
path,
|
|
@@ -28484,6 +28750,19 @@ function FieldList({
|
|
|
28484
28750
|
fields: filteredFields
|
|
28485
28751
|
});
|
|
28486
28752
|
}
|
|
28753
|
+
for (const array of arraysAndRecords) {
|
|
28754
|
+
if (array.type.kind === "array_type" && array.type.element_type.kind === "record_type") {
|
|
28755
|
+
buildGroups(types22, [...path, array.name], array.name, array.type.element_type.fields.map((dimension) => ({
|
|
28756
|
+
kind: "dimension",
|
|
28757
|
+
...dimension
|
|
28758
|
+
})));
|
|
28759
|
+
} else if (array.type.kind === "record_type") {
|
|
28760
|
+
buildGroups(types22, [...path, array.name], array.name, array.type.fields.map((dimension) => ({
|
|
28761
|
+
kind: "dimension",
|
|
28762
|
+
...dimension
|
|
28763
|
+
})));
|
|
28764
|
+
}
|
|
28765
|
+
}
|
|
28487
28766
|
for (const join of joins) {
|
|
28488
28767
|
buildGroups(
|
|
28489
28768
|
types22.filter((type) => type !== "view"),
|
|
@@ -28501,14 +28780,14 @@ function FieldList({
|
|
|
28501
28780
|
children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
28502
28781
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28503
28782
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28504
|
-
..._stylex.props(addMenuStyles.item, styles$
|
|
28783
|
+
..._stylex.props(addMenuStyles.item, styles$d.fieldItem),
|
|
28505
28784
|
"data-disabled": "true",
|
|
28506
28785
|
children: group.name
|
|
28507
28786
|
})
|
|
28508
28787
|
}), group.fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28509
28788
|
role: "menuitem",
|
|
28510
28789
|
tabIndex: -1,
|
|
28511
|
-
..._stylex.props(addMenuStyles.item, styles$
|
|
28790
|
+
..._stylex.props(addMenuStyles.item, styles$d.fieldItem),
|
|
28512
28791
|
children: /* @__PURE__ */ jsxRuntime.jsx(FieldToken, {
|
|
28513
28792
|
field,
|
|
28514
28793
|
onClick: (event) => onClick(field, group.path, event),
|
|
@@ -28531,7 +28810,7 @@ function FieldList({
|
|
|
28531
28810
|
})
|
|
28532
28811
|
});
|
|
28533
28812
|
}
|
|
28534
|
-
const styles$
|
|
28813
|
+
const styles$d = {
|
|
28535
28814
|
fieldItem: {
|
|
28536
28815
|
height: "mly1qx5ct2",
|
|
28537
28816
|
paddingTop: "mly1y1aw1k",
|
|
@@ -28583,13 +28862,15 @@ function OperationActionTitle({
|
|
|
28583
28862
|
types: types2,
|
|
28584
28863
|
onClick
|
|
28585
28864
|
}) {
|
|
28865
|
+
const [isMenuOpen, setIsMenuOpen] = React__namespace.useState(false);
|
|
28586
28866
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
28587
|
-
..._stylex.props(styles$
|
|
28867
|
+
..._stylex.props(styles$j.title, hoverStyles.main),
|
|
28588
28868
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28589
28869
|
children: title
|
|
28590
28870
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28591
|
-
..._stylex.props(hoverStyles.hoverActions),
|
|
28871
|
+
..._stylex.props(hoverStyles.hoverActions, isMenuOpen ? hoverStyles.hoverOpen : void 0),
|
|
28592
28872
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Root2$2, {
|
|
28873
|
+
onOpenChange: setIsMenuOpen,
|
|
28593
28874
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$2, {
|
|
28594
28875
|
asChild: true,
|
|
28595
28876
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
@@ -28666,7 +28947,7 @@ function GroupByOperations({
|
|
|
28666
28947
|
addGroupBy(rootQuery, segment, field, path, setQuery);
|
|
28667
28948
|
}
|
|
28668
28949
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28669
|
-
..._stylex.props(styles$
|
|
28950
|
+
..._stylex.props(styles$j.tokenContainer),
|
|
28670
28951
|
children: groupBys.map((groupBy) => {
|
|
28671
28952
|
const fieldInfo = groupBy.getFieldInfo();
|
|
28672
28953
|
const path = groupBy.field.getReference().path ?? [];
|
|
@@ -28756,10 +29037,10 @@ function FilterOperations({
|
|
|
28756
29037
|
}
|
|
28757
29038
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
28758
29039
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28759
|
-
..._stylex.props(styles$
|
|
29040
|
+
..._stylex.props(styles$j.title),
|
|
28760
29041
|
children: "filter by"
|
|
28761
29042
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
28762
|
-
..._stylex.props(styles$
|
|
29043
|
+
..._stylex.props(styles$j.tokenContainer),
|
|
28763
29044
|
children: filters.map((filterOperation, key2) => {
|
|
28764
29045
|
return /* @__PURE__ */ jsxRuntime.jsx(ErrorElement, {
|
|
28765
29046
|
fallback: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
@@ -29017,7 +29298,7 @@ function LimitOperation({
|
|
|
29017
29298
|
}
|
|
29018
29299
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29019
29300
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29020
|
-
..._stylex.props(styles$
|
|
29301
|
+
..._stylex.props(styles$j.title),
|
|
29021
29302
|
children: "limit"
|
|
29022
29303
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29023
29304
|
..._stylex.props(hoverStyles.main),
|
|
@@ -29069,7 +29350,7 @@ function AggregateOperations({
|
|
|
29069
29350
|
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
29070
29351
|
}
|
|
29071
29352
|
}), " ", /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29072
|
-
..._stylex.props(styles$
|
|
29353
|
+
..._stylex.props(styles$j.tokenContainer),
|
|
29073
29354
|
children: aggregates.map((aggregate) => {
|
|
29074
29355
|
const fieldInfo = aggregate.getFieldInfo();
|
|
29075
29356
|
const path = aggregate.field.getReference().path ?? [];
|
|
@@ -29110,10 +29391,10 @@ function OrderByOperations({
|
|
|
29110
29391
|
}
|
|
29111
29392
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29112
29393
|
children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29113
|
-
..._stylex.props(styles$
|
|
29394
|
+
..._stylex.props(styles$j.title),
|
|
29114
29395
|
children: "order by"
|
|
29115
29396
|
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29116
|
-
..._stylex.props(styles$
|
|
29397
|
+
..._stylex.props(styles$j.tokenContainer),
|
|
29117
29398
|
children: orderBys.map((orderBy) => {
|
|
29118
29399
|
const {
|
|
29119
29400
|
fieldReference
|
|
@@ -29196,16 +29477,21 @@ function CollapsiblePanel({
|
|
|
29196
29477
|
},
|
|
29197
29478
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29198
29479
|
...{
|
|
29199
|
-
className: "
|
|
29480
|
+
className: "mlyrvj5dj mly1mt1orb mly52fmzj mlylqzeqv mlyfawy5m mly167g77z mly6s0dn4"
|
|
29200
29481
|
},
|
|
29201
|
-
children: [
|
|
29202
|
-
name: icon,
|
|
29203
|
-
customStyle: styles$9.icon
|
|
29204
|
-
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29482
|
+
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29205
29483
|
...{
|
|
29206
|
-
className: "
|
|
29484
|
+
className: "mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly167g77z"
|
|
29207
29485
|
},
|
|
29208
|
-
children:
|
|
29486
|
+
children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
29487
|
+
name: icon,
|
|
29488
|
+
customStyle: styles$c.icon
|
|
29489
|
+
}), /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29490
|
+
...{
|
|
29491
|
+
className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp"
|
|
29492
|
+
},
|
|
29493
|
+
children: title
|
|
29494
|
+
})]
|
|
29209
29495
|
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29210
29496
|
...{
|
|
29211
29497
|
className: "mly78zum5"
|
|
@@ -29236,7 +29522,7 @@ function CollapsiblePanel({
|
|
|
29236
29522
|
})]
|
|
29237
29523
|
});
|
|
29238
29524
|
}
|
|
29239
|
-
const styles$
|
|
29525
|
+
const styles$c = {
|
|
29240
29526
|
icon: {
|
|
29241
29527
|
$$css: true
|
|
29242
29528
|
}
|
|
@@ -29336,7 +29622,7 @@ function AddFieldItem({
|
|
|
29336
29622
|
const trigger = /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29337
29623
|
role: "menuitem",
|
|
29338
29624
|
tabIndex: -1,
|
|
29339
|
-
..._stylex.props(addMenuStyles.item, addMenuStyles.clickable),
|
|
29625
|
+
..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$b.open : null),
|
|
29340
29626
|
"data-disabled": disabled ? "true" : void 0,
|
|
29341
29627
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29342
29628
|
..._stylex.props(addMenuStyles.label),
|
|
@@ -29371,7 +29657,6 @@ function AddFieldItem({
|
|
|
29371
29657
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$2, {
|
|
29372
29658
|
asChild: true,
|
|
29373
29659
|
disabled,
|
|
29374
|
-
onMouseEnter: () => setOpen(true),
|
|
29375
29660
|
children: trigger
|
|
29376
29661
|
}), /* @__PURE__ */ jsxRuntime.jsx(Portal$1, {
|
|
29377
29662
|
children: /* @__PURE__ */ jsxRuntime.jsxs(Content2$2, {
|
|
@@ -29392,6 +29677,22 @@ function AddFieldItem({
|
|
|
29392
29677
|
})]
|
|
29393
29678
|
});
|
|
29394
29679
|
}
|
|
29680
|
+
const styles$b = {
|
|
29681
|
+
open: {
|
|
29682
|
+
background: "mly1p5yd3t",
|
|
29683
|
+
backgroundAttachment: null,
|
|
29684
|
+
backgroundClip: null,
|
|
29685
|
+
backgroundColor: null,
|
|
29686
|
+
backgroundImage: null,
|
|
29687
|
+
backgroundOrigin: null,
|
|
29688
|
+
backgroundPosition: null,
|
|
29689
|
+
backgroundPositionX: null,
|
|
29690
|
+
backgroundPositionY: null,
|
|
29691
|
+
backgroundRepeat: null,
|
|
29692
|
+
backgroundSize: null,
|
|
29693
|
+
$$css: true
|
|
29694
|
+
}
|
|
29695
|
+
};
|
|
29395
29696
|
function AddOrderBy({
|
|
29396
29697
|
rootQuery,
|
|
29397
29698
|
view
|
|
@@ -29580,9 +29881,6 @@ function AddMenu({
|
|
|
29580
29881
|
const segment = view.getOrAddDefaultSegment();
|
|
29581
29882
|
if (field.kind === "dimension") {
|
|
29582
29883
|
segment.addGroupBy(field.name, path);
|
|
29583
|
-
if (!segmentHasLimit(segment)) {
|
|
29584
|
-
segment.setLimit(1e3);
|
|
29585
|
-
}
|
|
29586
29884
|
} else if (field.kind === "measure") {
|
|
29587
29885
|
segment.addAggregate(field.name, path);
|
|
29588
29886
|
} else {
|
|
@@ -29636,15 +29934,6 @@ function AddMenu({
|
|
|
29636
29934
|
})]
|
|
29637
29935
|
});
|
|
29638
29936
|
}
|
|
29639
|
-
function VisualizationIcon({
|
|
29640
|
-
view
|
|
29641
|
-
}) {
|
|
29642
|
-
const currentTag = view.getTag();
|
|
29643
|
-
const currentRenderer = tagToRenderer(currentTag) ?? "table";
|
|
29644
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
29645
|
-
name: `viz_${currentRenderer}`
|
|
29646
|
-
});
|
|
29647
|
-
}
|
|
29648
29937
|
function NestOperations({
|
|
29649
29938
|
rootQuery,
|
|
29650
29939
|
nests
|
|
@@ -29655,41 +29944,41 @@ function NestOperations({
|
|
|
29655
29944
|
if (nests.length === 0) {
|
|
29656
29945
|
return null;
|
|
29657
29946
|
}
|
|
29947
|
+
const getControls = (nest) => /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
29948
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(DropdownMenu, {
|
|
29949
|
+
trigger: /* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
29950
|
+
variant: "flat",
|
|
29951
|
+
icon: "meatballs",
|
|
29952
|
+
size: "compact",
|
|
29953
|
+
tooltip: "More Actions"
|
|
29954
|
+
}),
|
|
29955
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, {
|
|
29956
|
+
icon: "clear",
|
|
29957
|
+
label: "Delete Query",
|
|
29958
|
+
onClick: () => {
|
|
29959
|
+
nest.delete();
|
|
29960
|
+
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
29961
|
+
}
|
|
29962
|
+
})
|
|
29963
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(AddMenu, {
|
|
29964
|
+
rootQuery,
|
|
29965
|
+
view: nest.view
|
|
29966
|
+
})]
|
|
29967
|
+
});
|
|
29658
29968
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29659
|
-
..._stylex.props(styles$
|
|
29969
|
+
..._stylex.props(styles$j.tokenContainer),
|
|
29660
29970
|
children: nests.map((nest) => {
|
|
29971
|
+
const defaultOpen = nest.view.definition.node.kind === "segment" && nest.view.definition.node.operations.length === 0;
|
|
29661
29972
|
return /* @__PURE__ */ jsxRuntime.jsx("div", {
|
|
29662
29973
|
...{
|
|
29663
29974
|
className: "mlyj3b58b mly1yf7rl7 mly1xmf6yo mlyh8yej3"
|
|
29664
29975
|
},
|
|
29665
29976
|
children: /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePanel, {
|
|
29666
29977
|
title: nest.name,
|
|
29667
|
-
icon:
|
|
29668
|
-
defaultOpen
|
|
29669
|
-
controls:
|
|
29670
|
-
|
|
29671
|
-
trigger: /* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
29672
|
-
variant: "flat",
|
|
29673
|
-
icon: "meatballs",
|
|
29674
|
-
size: "compact",
|
|
29675
|
-
tooltip: "More Actions"
|
|
29676
|
-
}),
|
|
29677
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, {
|
|
29678
|
-
icon: "clear",
|
|
29679
|
-
label: "Delete Query",
|
|
29680
|
-
onClick: () => {
|
|
29681
|
-
nest.delete();
|
|
29682
|
-
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
29683
|
-
}
|
|
29684
|
-
})
|
|
29685
|
-
}), /* @__PURE__ */ jsxRuntime.jsx(AddMenu, {
|
|
29686
|
-
rootQuery,
|
|
29687
|
-
view: nest.view
|
|
29688
|
-
})]
|
|
29689
|
-
}),
|
|
29690
|
-
collapsedControls: /* @__PURE__ */ jsxRuntime.jsx(VisualizationIcon, {
|
|
29691
|
-
view: nest.view
|
|
29692
|
-
}),
|
|
29978
|
+
icon: viewToVisualizationIcon(nest.view),
|
|
29979
|
+
defaultOpen,
|
|
29980
|
+
controls: getControls(nest),
|
|
29981
|
+
collapsedControls: getControls(nest),
|
|
29693
29982
|
children: /* @__PURE__ */ jsxRuntime.jsx(View, {
|
|
29694
29983
|
rootQuery,
|
|
29695
29984
|
view: nest.view
|
|
@@ -29826,11 +30115,11 @@ function CollapsingView({
|
|
|
29826
30115
|
})]
|
|
29827
30116
|
}), !collapsed && /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
|
|
29828
30117
|
viewInfo: viewDef.getViewInfo(),
|
|
29829
|
-
style: styles$
|
|
30118
|
+
style: styles$a.preview
|
|
29830
30119
|
})]
|
|
29831
30120
|
});
|
|
29832
30121
|
}
|
|
29833
|
-
const styles$
|
|
30122
|
+
const styles$a = {
|
|
29834
30123
|
preview: {
|
|
29835
30124
|
height: "mlyt7dq6l",
|
|
29836
30125
|
maxHeight: "mly1hkcv85",
|
|
@@ -29872,21 +30161,33 @@ function Query({
|
|
|
29872
30161
|
size: "compact",
|
|
29873
30162
|
tooltip: "More Actions"
|
|
29874
30163
|
}),
|
|
29875
|
-
children: setQuery ? /* @__PURE__ */ jsxRuntime.
|
|
29876
|
-
|
|
29877
|
-
|
|
29878
|
-
|
|
29879
|
-
|
|
29880
|
-
|
|
29881
|
-
|
|
30164
|
+
children: setQuery ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
30165
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, {
|
|
30166
|
+
icon: "clear",
|
|
30167
|
+
label: "Clear query",
|
|
30168
|
+
onClick: () => {
|
|
30169
|
+
setQuery == null ? void 0 : setQuery(void 0);
|
|
30170
|
+
},
|
|
30171
|
+
disabled: rootQuery.isEmpty()
|
|
30172
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuItem, {
|
|
30173
|
+
icon: "nest",
|
|
30174
|
+
label: "Nest query",
|
|
30175
|
+
onClick: () => {
|
|
30176
|
+
if (rootQuery.definition instanceof QB.ASTArrowQueryDefinition) {
|
|
30177
|
+
rootQuery.definition.view.convertToNest("Nest");
|
|
30178
|
+
}
|
|
30179
|
+
setQuery == null ? void 0 : setQuery(rootQuery.build());
|
|
30180
|
+
},
|
|
30181
|
+
disabled: rootQuery.isEmpty()
|
|
30182
|
+
})]
|
|
29882
30183
|
}) : /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {})
|
|
29883
30184
|
}), query.definition instanceof QB.ASTArrowQueryDefinition ? /* @__PURE__ */ jsxRuntime.jsx(AddMenu, {
|
|
29884
30185
|
rootQuery,
|
|
29885
30186
|
view: query.definition
|
|
29886
30187
|
}) : null]
|
|
29887
30188
|
}),
|
|
29888
|
-
collapsedControls: /* @__PURE__ */ jsxRuntime.jsx(
|
|
29889
|
-
|
|
30189
|
+
collapsedControls: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
30190
|
+
name: viewToVisualizationIcon(query)
|
|
29890
30191
|
}),
|
|
29891
30192
|
children: [query.definition instanceof QB.ASTArrowQueryDefinition ? /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29892
30193
|
style: {
|
|
@@ -29934,9 +30235,9 @@ function Source({
|
|
|
29934
30235
|
} = React.useContext(ExplorerPanelsContext);
|
|
29935
30236
|
if (!(isSourcePanelOpen && setIsSourcePanelOpen) && rootQuery.definition instanceof QB.ASTArrowQueryDefinition) {
|
|
29936
30237
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29937
|
-
..._stylex.props(styles$
|
|
30238
|
+
..._stylex.props(styles$j.queryCard, styles$9.flex),
|
|
29938
30239
|
children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
29939
|
-
..._stylex.props(styles$
|
|
30240
|
+
..._stylex.props(styles$j.labelWithIcon),
|
|
29940
30241
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
|
|
29941
30242
|
name: "database"
|
|
29942
30243
|
}), rootQuery.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource().name]
|
|
@@ -29949,7 +30250,7 @@ function Source({
|
|
|
29949
30250
|
}
|
|
29950
30251
|
return null;
|
|
29951
30252
|
}
|
|
29952
|
-
const styles$
|
|
30253
|
+
const styles$9 = {
|
|
29953
30254
|
flex: {
|
|
29954
30255
|
display: "mly78zum5",
|
|
29955
30256
|
justifyContent: "mly1qughib",
|
|
@@ -30013,6 +30314,12 @@ function LiteralValueEditor({
|
|
|
30013
30314
|
granularity: "second"
|
|
30014
30315
|
})
|
|
30015
30316
|
});
|
|
30317
|
+
case "filter_expression_literal":
|
|
30318
|
+
return /* @__PURE__ */ jsxRuntime.jsx(EditableToken, {
|
|
30319
|
+
value: value.filter_expression_value,
|
|
30320
|
+
onChange: (value2) => setValue(value2),
|
|
30321
|
+
customStyle
|
|
30322
|
+
});
|
|
30016
30323
|
}
|
|
30017
30324
|
}
|
|
30018
30325
|
function Parameters({
|
|
@@ -30036,6 +30343,7 @@ function Parameters({
|
|
|
30036
30343
|
children: sourceParameters.map((parameter) => {
|
|
30037
30344
|
var _a2;
|
|
30038
30345
|
return /* @__PURE__ */ jsxRuntime.jsxs(TokenGroup, {
|
|
30346
|
+
customStyle: styles$8.tokenGroup,
|
|
30039
30347
|
children: [/* @__PURE__ */ jsxRuntime.jsx(Token, {
|
|
30040
30348
|
icon: atomicTypeToIcon(parameter.type.kind),
|
|
30041
30349
|
label: parameter.name
|
|
@@ -30053,6 +30361,12 @@ function Parameters({
|
|
|
30053
30361
|
}
|
|
30054
30362
|
return null;
|
|
30055
30363
|
}
|
|
30364
|
+
const styles$8 = {
|
|
30365
|
+
tokenGroup: {
|
|
30366
|
+
display: "mly78zum5",
|
|
30367
|
+
$$css: true
|
|
30368
|
+
}
|
|
30369
|
+
};
|
|
30056
30370
|
function QueryEditor() {
|
|
30057
30371
|
const {
|
|
30058
30372
|
rootQuery,
|
|
@@ -30062,21 +30376,40 @@ function QueryEditor() {
|
|
|
30062
30376
|
console.error("Missing <MalloyExplorerProvider>");
|
|
30063
30377
|
return null;
|
|
30064
30378
|
}
|
|
30065
|
-
return /* @__PURE__ */ jsxRuntime.
|
|
30066
|
-
|
|
30067
|
-
|
|
30068
|
-
|
|
30069
|
-
|
|
30070
|
-
|
|
30071
|
-
|
|
30072
|
-
|
|
30073
|
-
|
|
30074
|
-
|
|
30075
|
-
|
|
30076
|
-
|
|
30077
|
-
})
|
|
30379
|
+
return /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
30380
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
30381
|
+
..._stylex.props(fontStyles.body, styles$7.main),
|
|
30382
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Source, {
|
|
30383
|
+
rootQuery
|
|
30384
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Parameters, {
|
|
30385
|
+
rootQuery
|
|
30386
|
+
}), /* @__PURE__ */ jsxRuntime.jsx(Query, {
|
|
30387
|
+
rootQuery,
|
|
30388
|
+
query: rootQuery,
|
|
30389
|
+
setQuery
|
|
30390
|
+
})]
|
|
30391
|
+
})
|
|
30078
30392
|
});
|
|
30079
30393
|
}
|
|
30394
|
+
const styles$7 = {
|
|
30395
|
+
main: {
|
|
30396
|
+
display: "mly78zum5",
|
|
30397
|
+
flexDirection: "mlydt5ytf",
|
|
30398
|
+
gap: "mly167g77z",
|
|
30399
|
+
rowGap: null,
|
|
30400
|
+
columnGap: null,
|
|
30401
|
+
padding: "mly1fut7tt",
|
|
30402
|
+
paddingInline: null,
|
|
30403
|
+
paddingStart: null,
|
|
30404
|
+
paddingLeft: null,
|
|
30405
|
+
paddingEnd: null,
|
|
30406
|
+
paddingRight: null,
|
|
30407
|
+
paddingBlock: null,
|
|
30408
|
+
paddingTop: null,
|
|
30409
|
+
paddingBottom: null,
|
|
30410
|
+
$$css: true
|
|
30411
|
+
}
|
|
30412
|
+
};
|
|
30080
30413
|
function QueryPanel({
|
|
30081
30414
|
runQuery
|
|
30082
30415
|
}) {
|
|
@@ -30084,20 +30417,10 @@ function QueryPanel({
|
|
|
30084
30417
|
...{
|
|
30085
30418
|
className: "mly78zum5 mlydt5ytf mly2lah0s mlyh8yej3 mly5yr21d mlyotlr4g mly1roky18"
|
|
30086
30419
|
},
|
|
30087
|
-
children: [/* @__PURE__ */ jsxRuntime.jsx(
|
|
30088
|
-
|
|
30089
|
-
className: "mly78zum5 mlydt5ytf mly153ncpu"
|
|
30090
|
-
},
|
|
30091
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(QueryActionBar, {
|
|
30092
|
-
runQuery
|
|
30093
|
-
})
|
|
30420
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(QueryActionBar, {
|
|
30421
|
+
runQuery
|
|
30094
30422
|
}), /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
|
|
30095
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
30096
|
-
...{
|
|
30097
|
-
className: "mly78zum5 mlydt5ytf mly1fut7tt mly167g77z"
|
|
30098
|
-
},
|
|
30099
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(QueryEditor, {})
|
|
30100
|
-
})
|
|
30423
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(QueryEditor, {})
|
|
30101
30424
|
})]
|
|
30102
30425
|
});
|
|
30103
30426
|
}
|
|
@@ -30890,7 +31213,22 @@ function flattenFieldsTree(fields, path = []) {
|
|
|
30890
31213
|
}];
|
|
30891
31214
|
}
|
|
30892
31215
|
case "measure":
|
|
31216
|
+
return [{
|
|
31217
|
+
path,
|
|
31218
|
+
field
|
|
31219
|
+
}];
|
|
30893
31220
|
case "dimension":
|
|
31221
|
+
if (field.type.kind === "array_type" && field.type.element_type.kind === "record_type") {
|
|
31222
|
+
return flattenFieldsTree(field.type.element_type.fields.map((dimension) => ({
|
|
31223
|
+
kind: "dimension",
|
|
31224
|
+
...dimension
|
|
31225
|
+
})), [...path, field.name]);
|
|
31226
|
+
} else if (field.type.kind === "record_type") {
|
|
31227
|
+
return flattenFieldsTree(field.type.fields.map((dimension) => ({
|
|
31228
|
+
kind: "dimension",
|
|
31229
|
+
...dimension
|
|
31230
|
+
})), [...path, field.name]);
|
|
31231
|
+
}
|
|
30894
31232
|
return [{
|
|
30895
31233
|
path,
|
|
30896
31234
|
field
|
|
@@ -31384,7 +31722,9 @@ const styles$1 = {
|
|
|
31384
31722
|
$$css: true
|
|
31385
31723
|
}
|
|
31386
31724
|
};
|
|
31387
|
-
function SourcePanel(
|
|
31725
|
+
function SourcePanel({
|
|
31726
|
+
onRefresh
|
|
31727
|
+
}) {
|
|
31388
31728
|
const {
|
|
31389
31729
|
source
|
|
31390
31730
|
} = React__namespace.useContext(QueryEditorContext);
|
|
@@ -31457,13 +31797,23 @@ function SourcePanel() {
|
|
|
31457
31797
|
variant: "flat",
|
|
31458
31798
|
size: "compact",
|
|
31459
31799
|
onClick: () => setSubpanelType(null)
|
|
31460
|
-
}),
|
|
31461
|
-
|
|
31462
|
-
|
|
31800
|
+
}), /* @__PURE__ */ jsxRuntime.jsxs("div", {
|
|
31801
|
+
...{
|
|
31802
|
+
className: "mly78zum5"
|
|
31803
|
+
},
|
|
31804
|
+
children: [/* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
31805
|
+
icon: "refresh",
|
|
31806
|
+
tooltip: "Refresh the source",
|
|
31807
|
+
onClick: onRefresh,
|
|
31808
|
+
size: "compact",
|
|
31809
|
+
variant: "flat"
|
|
31810
|
+
}), setIsSourcePanelOpen && /* @__PURE__ */ jsxRuntime.jsx(Button, {
|
|
31811
|
+
icon: "sidebarCollapse",
|
|
31463
31812
|
tooltip: "Close the source panel",
|
|
31464
31813
|
onClick: () => setIsSourcePanelOpen(false),
|
|
31465
|
-
size: "compact"
|
|
31466
|
-
|
|
31814
|
+
size: "compact",
|
|
31815
|
+
variant: "flat"
|
|
31816
|
+
})]
|
|
31467
31817
|
})]
|
|
31468
31818
|
}), /* @__PURE__ */ jsxRuntime.jsx(TextInput, {
|
|
31469
31819
|
value: searchQuery,
|