@malloydata/malloy-explorer 0.0.264-dev250417011542 → 0.0.264-dev250418182827

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.
@@ -5113,10 +5113,10 @@ function Icon({
5113
5113
  return null;
5114
5114
  }
5115
5115
  return /* @__PURE__ */ jsxRuntime.jsx(IconComponent, {
5116
- ..._stylex.props(styles$A.main, colorVariants$3[color], SMALL_ICONS.includes(name) && styles$A.scaleUp, customStyle)
5116
+ ..._stylex.props(styles$F.main, colorVariants$3[color], SMALL_ICONS.includes(name) && styles$F.scaleUp, customStyle)
5117
5117
  });
5118
5118
  }
5119
- const styles$A = {
5119
+ const styles$F = {
5120
5120
  main: {
5121
5121
  display: "mly1rg5ohu",
5122
5122
  width: "mly1kky2od",
@@ -5189,17 +5189,17 @@ function Badge({
5189
5189
  customStyle
5190
5190
  }) {
5191
5191
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
5192
- ..._stylex.props(styles$z.main, colorVariants$2[color], customStyle),
5192
+ ..._stylex.props(styles$E.main, colorVariants$2[color], customStyle),
5193
5193
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
5194
5194
  color,
5195
5195
  name: icon
5196
5196
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
5197
- ..._stylex.props(fontStyles.badge, styles$z.label),
5197
+ ..._stylex.props(fontStyles.badge, styles$E.label),
5198
5198
  children: label
5199
5199
  })]
5200
5200
  });
5201
5201
  }
5202
- const styles$z = {
5202
+ const styles$E = {
5203
5203
  main: {
5204
5204
  display: "mly3nfvp2",
5205
5205
  height: "mly1qx5ct2",
@@ -5281,10 +5281,10 @@ function Divider({
5281
5281
  customStyle
5282
5282
  }) {
5283
5283
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
5284
- ..._stylex.props(styles$y.main, orientationVariants[orientation], customStyle)
5284
+ ..._stylex.props(styles$D.main, orientationVariants[orientation], customStyle)
5285
5285
  });
5286
5286
  }
5287
- const styles$y = {
5287
+ const styles$D = {
5288
5288
  main: {
5289
5289
  background: "mly1xnbgy5",
5290
5290
  backgroundAttachment: null,
@@ -5337,7 +5337,7 @@ function ListItem({
5337
5337
  children: [startIcon && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
5338
5338
  children: startIcon
5339
5339
  }), /* @__PURE__ */ jsxRuntime.jsx("span", {
5340
- ..._stylex.props(fontStyles.body, styles$x.label),
5340
+ ..._stylex.props(fontStyles.body, styles$C.label),
5341
5341
  children: label
5342
5342
  }), badge && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
5343
5343
  children: badge
@@ -5346,7 +5346,7 @@ function ListItem({
5346
5346
  })]
5347
5347
  });
5348
5348
  }
5349
- const styles$x = {
5349
+ const styles$C = {
5350
5350
  label: {
5351
5351
  flexGrow: "mly1iyjqo2",
5352
5352
  $$css: true
@@ -6121,7 +6121,7 @@ function Button({
6121
6121
  ...props2
6122
6122
  }) {
6123
6123
  const button = /* @__PURE__ */ jsxRuntime.jsxs("button", {
6124
- ..._stylex.props(styles$w.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
6124
+ ..._stylex.props(styles$B.main, colorVariants$1[variant], sizeVariants$1[size2], customStyle),
6125
6125
  ...onClick && {
6126
6126
  onClick: (e) => {
6127
6127
  e.preventDefault();
@@ -6137,9 +6137,9 @@ function Button({
6137
6137
  },
6138
6138
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
6139
6139
  name: icon,
6140
- customStyle: styles$w.icon
6140
+ customStyle: styles$B.icon
6141
6141
  }), label && /* @__PURE__ */ jsxRuntime.jsx("div", {
6142
- ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$w.label),
6142
+ ..._stylex.props(variant === "primary" ? fontStyles.emphasized : fontStyles.body, styles$B.label),
6143
6143
  children: label
6144
6144
  })]
6145
6145
  }), isDisabled && /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -6166,7 +6166,7 @@ function Button({
6166
6166
  return button;
6167
6167
  }
6168
6168
  }
6169
- const styles$w = {
6169
+ const styles$B = {
6170
6170
  main: {
6171
6171
  display: "mly3nfvp2",
6172
6172
  flexDirection: "mlydt5ytf",
@@ -6413,7 +6413,7 @@ function Token({
6413
6413
  }) {
6414
6414
  const isInteractive = onClick !== void 0 || asButtonTrigger;
6415
6415
  const token2 = /* @__PURE__ */ jsxRuntime.jsxs("div", {
6416
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$v.nonInteractive, customStyle),
6416
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], !isInteractive && styles$A.nonInteractive, customStyle),
6417
6417
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
6418
6418
  name: icon,
6419
6419
  customStyle: tokenStyles.icon
@@ -6448,7 +6448,7 @@ function Token({
6448
6448
  })]
6449
6449
  }) : token2;
6450
6450
  }
6451
- const styles$v = {
6451
+ const styles$A = {
6452
6452
  nonInteractive: {
6453
6453
  cursor: "mlyt0e3qv",
6454
6454
  background: "mly1np9qvj",
@@ -6472,7 +6472,7 @@ function TokenGroup({
6472
6472
  }) {
6473
6473
  const count2 = React__namespace.Children.count(children);
6474
6474
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
6475
- ..._stylex.props(styles$u.main, customStyle),
6475
+ ..._stylex.props(styles$z.main, customStyle),
6476
6476
  children: React__namespace.Children.map(children, (child, index2) => /* @__PURE__ */ React__namespace.cloneElement(child, {
6477
6477
  customStyle: {
6478
6478
  ...child.props.customStyle,
@@ -6483,16 +6483,16 @@ function TokenGroup({
6483
6483
  });
6484
6484
  }
6485
6485
  const getChildStyle = (index2, count2) => {
6486
- if (count2 === 1) return styles$u.onlyChild;
6487
- if (index2 === 0) return styles$u.firstChild;
6488
- if (index2 === count2 - 1) return styles$u.lastChild;
6489
- return styles$u.innerChild;
6486
+ if (count2 === 1) return styles$z.onlyChild;
6487
+ if (index2 === 0) return styles$z.firstChild;
6488
+ if (index2 === count2 - 1) return styles$z.lastChild;
6489
+ return styles$z.innerChild;
6490
6490
  };
6491
6491
  const getTokenColor = (child, groupColor) => {
6492
6492
  const childColor = child.props.color;
6493
6493
  return childColor === void 0 ? groupColor : childColor;
6494
6494
  };
6495
- const styles$u = {
6495
+ const styles$z = {
6496
6496
  main: {
6497
6497
  display: "mlyrvj5dj",
6498
6498
  gridAutoFlow: "mly1mt1orb",
@@ -6564,7 +6564,7 @@ function ErrorIcon({
6564
6564
  },
6565
6565
  children: /* @__PURE__ */ jsxRuntime.jsx(Icon, {
6566
6566
  name: "warning",
6567
- customStyle: styles$t.errorIcon
6567
+ customStyle: styles$y.errorIcon
6568
6568
  })
6569
6569
  })
6570
6570
  }), /* @__PURE__ */ jsxRuntime.jsx(TooltipPortal, {
@@ -6577,7 +6577,7 @@ function ErrorIcon({
6577
6577
  })]
6578
6578
  });
6579
6579
  }
6580
- const styles$t = {
6580
+ const styles$y = {
6581
6581
  errorIcon: {
6582
6582
  color: "mly1e2nbdu",
6583
6583
  $$css: true
@@ -6622,28 +6622,29 @@ function EditableToken({
6622
6622
  className: "mly78zum5 mly6s0dn4"
6623
6623
  },
6624
6624
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
6625
- ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$s.focused, !!errorMessage && styles$s.hasError, customStyle),
6625
+ ..._stylex.props(tokenStyles.main, tokenColorVariants[color], tokenSizeVariants[size2], isFocused && styles$x.focused, !!errorMessage && styles$x.hasError, customStyle),
6626
6626
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
6627
6627
  name: icon,
6628
- customStyle: styles$s.icon
6628
+ customStyle: styles$x.icon
6629
6629
  }), /* @__PURE__ */ jsxRuntime.jsxs("span", {
6630
6630
  ...{
6631
- className: "mlywz0xwf mlynq0rdo"
6631
+ className: "mlywz0xwf"
6632
6632
  },
6633
6633
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
6634
- ..._stylex.props(fontStyles.body, styles$s.placeholder),
6634
+ ..._stylex.props(fontStyles.body, styles$x.placeholder),
6635
6635
  style: {
6636
6636
  whiteSpaceCollapse: "preserve"
6637
6637
  },
6638
6638
  children: value
6639
6639
  }), /* @__PURE__ */ jsxRuntime.jsx("input", {
6640
- ..._stylex.props(styles$s.input, fontStyles.body),
6640
+ ..._stylex.props(styles$x.input, fontStyles.body),
6641
6641
  ref: inputRef,
6642
6642
  pattern: type === "number" ? "^-?[0-9.]*$" : void 0,
6643
6643
  value,
6644
6644
  onChange: handleChange,
6645
6645
  onFocus: handleFocus,
6646
- onBlur: handleBlur
6646
+ onBlur: handleBlur,
6647
+ size: 1
6647
6648
  })]
6648
6649
  }), onRemove && isFocused && /* @__PURE__ */ jsxRuntime.jsx("button", {
6649
6650
  ...{
@@ -6661,7 +6662,7 @@ function EditableToken({
6661
6662
  })]
6662
6663
  });
6663
6664
  }
6664
- const styles$s = {
6665
+ const styles$x = {
6665
6666
  focused: {
6666
6667
  background: "mlyotlr4g",
6667
6668
  backgroundAttachment: null,
@@ -6733,6 +6734,7 @@ const styles$s = {
6733
6734
  gridColumnStart: null,
6734
6735
  gridColumnEnd: null,
6735
6736
  whiteSpace: "mlyuxw1ft",
6737
+ minWidth: "mlygc0pbm",
6736
6738
  $$css: true
6737
6739
  },
6738
6740
  input: {
@@ -6744,7 +6746,6 @@ const styles$s = {
6744
6746
  gridColumn: null,
6745
6747
  gridColumnStart: null,
6746
6748
  gridColumnEnd: null,
6747
- minWidth: "mly1mnxie6",
6748
6749
  padding: "mly1717udv",
6749
6750
  paddingInline: null,
6750
6751
  paddingStart: null,
@@ -6780,6 +6781,7 @@ const styles$s = {
6780
6781
  outlineStyle: null,
6781
6782
  outlineWidth: null,
6782
6783
  whiteSpace: "mlyuxw1ft",
6784
+ minWidth: "mlygc0pbm",
6783
6785
  $$css: true
6784
6786
  }
6785
6787
  };
@@ -8004,12 +8006,12 @@ function TextInput({
8004
8006
  }
8005
8007
  };
8006
8008
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
8007
- ..._stylex.props(styles$r.main, isFocused && styles$r.focused, sizeVariants[size2], customStyle),
8009
+ ..._stylex.props(styles$w.main, isFocused && styles$w.focused, sizeVariants[size2], customStyle),
8008
8010
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8009
8011
  name: icon,
8010
8012
  color: "secondary"
8011
8013
  }), /* @__PURE__ */ jsxRuntime.jsx("input", {
8012
- ..._stylex.props(fontStyles.body, styles$r.input),
8014
+ ..._stylex.props(fontStyles.body, styles$w.input),
8013
8015
  value,
8014
8016
  placeholder,
8015
8017
  onChange: handleChange,
@@ -8017,7 +8019,7 @@ function TextInput({
8017
8019
  onBlur: handleBlur,
8018
8020
  onKeyDown
8019
8021
  }), hasClear && /* @__PURE__ */ jsxRuntime.jsx("button", {
8020
- ..._stylex.props(fontStyles.supporting, styles$r.actionButton, value === "" && styles$r.hidden),
8022
+ ..._stylex.props(fontStyles.supporting, styles$w.actionButton, value === "" && styles$w.hidden),
8021
8023
  ref: buttonRef,
8022
8024
  onClick: () => onChange(""),
8023
8025
  tabIndex: 0,
@@ -8025,7 +8027,7 @@ function TextInput({
8025
8027
  })]
8026
8028
  });
8027
8029
  }
8028
- const styles$r = {
8030
+ const styles$w = {
8029
8031
  main: {
8030
8032
  display: "mly78zum5",
8031
8033
  alignItems: "mly6s0dn4",
@@ -8100,6 +8102,7 @@ const styles$r = {
8100
8102
  input: {
8101
8103
  flexGrow: "mly1iyjqo2",
8102
8104
  height: "mly1qx5ct2",
8105
+ minWidth: "mlygc0pbm",
8103
8106
  padding: "mly1717udv",
8104
8107
  paddingInline: null,
8105
8108
  paddingStart: null,
@@ -8233,7 +8236,7 @@ function SelectorToken({
8233
8236
  onValueChange: handleValueChange,
8234
8237
  required: true,
8235
8238
  children: [/* @__PURE__ */ jsxRuntime.jsxs(Trigger$3, {
8236
- ..._stylex.props(tokenStyles.main, styles$q.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
8239
+ ..._stylex.props(tokenStyles.main, styles$v.selectTrigger, tokenColorVariants[color], tokenSizeVariants[size2], fontStyles.body, tokenStyles.label, customStyle),
8237
8240
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8238
8241
  name: icon,
8239
8242
  customStyle: tokenStyles.icon
@@ -8262,7 +8265,7 @@ function SelectorToken({
8262
8265
  size: "compact",
8263
8266
  icon: "search",
8264
8267
  hasClear: true,
8265
- customStyle: styles$q.searchInput,
8268
+ customStyle: styles$v.searchInput,
8266
8269
  onKeyDown: (event) => {
8267
8270
  const excludedKeys = ["ArrowUp", "ArrowDown"];
8268
8271
  if (!excludedKeys.includes(event.key)) {
@@ -8295,21 +8298,21 @@ function SelectItem({
8295
8298
  ...props2
8296
8299
  }) {
8297
8300
  return /* @__PURE__ */ jsxRuntime.jsxs(Item$1, {
8298
- ..._stylex.props(fontStyles.body, styles$q.selectItem),
8301
+ ..._stylex.props(fontStyles.body, styles$v.selectItem),
8299
8302
  value,
8300
8303
  ...props2,
8301
8304
  children: [value === selectedValue ? /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8302
8305
  name: "radioChecked",
8303
- customStyle: styles$q.radioChecked
8306
+ customStyle: styles$v.radioChecked
8304
8307
  }) : /* @__PURE__ */ jsxRuntime.jsx(Icon, {
8305
8308
  name: "radioUnchecked",
8306
- customStyle: styles$q.radioUnchecked
8309
+ customStyle: styles$v.radioUnchecked
8307
8310
  }), /* @__PURE__ */ jsxRuntime.jsx(ItemText, {
8308
8311
  children
8309
8312
  })]
8310
8313
  });
8311
8314
  }
8312
- const styles$q = {
8315
+ const styles$v = {
8313
8316
  selectTrigger: {
8314
8317
  whiteSpace: "mlyuxw1ft",
8315
8318
  overflow: "mlyb3r6kr",
@@ -8399,7 +8402,7 @@ function Card({
8399
8402
  customStyle
8400
8403
  }) {
8401
8404
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
8402
- ..._stylex.props(styles$p.container, customStyle),
8405
+ ..._stylex.props(styles$u.container, customStyle),
8403
8406
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
8404
8407
  ...{
8405
8408
  className: "mly1717udv"
@@ -8413,7 +8416,7 @@ function Card({
8413
8416
  })]
8414
8417
  });
8415
8418
  }
8416
- const styles$p = {
8419
+ const styles$u = {
8417
8420
  container: {
8418
8421
  display: "mly78zum5",
8419
8422
  flexDirection: "mlydt5ytf",
@@ -8504,10 +8507,10 @@ function CollapsibleListItem({
8504
8507
  className: "mly78zum5 mlydt5ytf mly1iyjqo2 mlyb3r6kr"
8505
8508
  },
8506
8509
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
8507
- ..._stylex.props(fontStyles.body, styles$o.label),
8510
+ ..._stylex.props(fontStyles.body, styles$t.label),
8508
8511
  children: label
8509
8512
  }), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
8510
- ..._stylex.props(fontStyles.supporting, styles$o.sublabel),
8513
+ ..._stylex.props(fontStyles.supporting, styles$t.sublabel),
8511
8514
  children: sublabel
8512
8515
  })]
8513
8516
  })]
@@ -8519,7 +8522,7 @@ function CollapsibleListItem({
8519
8522
  })]
8520
8523
  });
8521
8524
  }
8522
- const styles$o = {
8525
+ const styles$t = {
8523
8526
  label: {
8524
8527
  flexGrow: "mly1iyjqo2",
8525
8528
  fontWeight: "mly1xlr1w8",
@@ -19329,7 +19332,7 @@ function Spinner({
19329
19332
  } = SIZES[size2];
19330
19333
  const frameSize = diameter + border * 2;
19331
19334
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
19332
- ..._stylex.props(styles$n.root, customStyle),
19335
+ ..._stylex.props(styles$s.root, customStyle),
19333
19336
  children: /* @__PURE__ */ jsxRuntime.jsx("span", {
19334
19337
  "aria-valuetext": "Loading",
19335
19338
  ...{
@@ -19349,7 +19352,7 @@ function Spinner({
19349
19352
  })
19350
19353
  });
19351
19354
  }
19352
- const styles$n = {
19355
+ const styles$s = {
19353
19356
  root: {
19354
19357
  alignItems: "mly6s0dn4",
19355
19358
  display: "mly3nfvp2",
@@ -22034,20 +22037,20 @@ function getCalendarFormat(myMoment, now2) {
22034
22037
  var diff2 = myMoment.diff(now2, "days", true);
22035
22038
  return diff2 < -6 ? "sameElse" : diff2 < -1 ? "lastWeek" : diff2 < 0 ? "lastDay" : diff2 < 1 ? "sameDay" : diff2 < 2 ? "nextDay" : diff2 < 7 ? "nextWeek" : "sameElse";
22036
22039
  }
22037
- function calendar$1(time, formats) {
22040
+ function calendar$1(time, formats2) {
22038
22041
  if (arguments.length === 1) {
22039
22042
  if (!arguments[0]) {
22040
22043
  time = void 0;
22041
- formats = void 0;
22044
+ formats2 = void 0;
22042
22045
  } else if (isMomentInput(arguments[0])) {
22043
22046
  time = arguments[0];
22044
- formats = void 0;
22047
+ formats2 = void 0;
22045
22048
  } else if (isCalendarSpec(arguments[0])) {
22046
- formats = arguments[0];
22049
+ formats2 = arguments[0];
22047
22050
  time = void 0;
22048
22051
  }
22049
22052
  }
22050
- var now2 = time || createLocal(), sod = cloneWithOffset(now2, this).startOf("day"), format2 = hooks.calendarFormat(this, sod) || "sameElse", output = formats && (isFunction(formats[format2]) ? formats[format2].call(this, now2) : formats[format2]);
22053
+ 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
22054
  return this.format(
22052
22055
  output || this.localeData().calendar(format2, this, createLocal(now2))
22053
22056
  );
@@ -22403,7 +22406,7 @@ function valueOf() {
22403
22406
  function unix() {
22404
22407
  return Math.floor(this.valueOf() / 1e3);
22405
22408
  }
22406
- function toDate$1() {
22409
+ function toDate() {
22407
22410
  return new Date(this.valueOf());
22408
22411
  }
22409
22412
  function toArray() {
@@ -22857,7 +22860,7 @@ proto.startOf = startOf;
22857
22860
  proto.subtract = subtract;
22858
22861
  proto.toArray = toArray;
22859
22862
  proto.toObject = toObject;
22860
- proto.toDate = toDate$1;
22863
+ proto.toDate = toDate;
22861
22864
  proto.toISOString = toISOString;
22862
22865
  proto.inspect = inspect;
22863
22866
  if (typeof Symbol !== "undefined" && Symbol.for != null) {
@@ -23748,7 +23751,7 @@ const Popover = ({
23748
23751
  })
23749
23752
  });
23750
23753
  };
23751
- const styles$m = {
23754
+ const styles$r = {
23752
23755
  wrapper: {
23753
23756
  position: "mly1n2onr6",
23754
23757
  $$css: true
@@ -23799,7 +23802,7 @@ const SelectDropdown = ({
23799
23802
  setOpen(false);
23800
23803
  };
23801
23804
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
23802
- ..._stylex.props(styles$m.wrapper, customStyle),
23805
+ ..._stylex.props(styles$r.wrapper, customStyle),
23803
23806
  children: [/* @__PURE__ */ jsxRuntime.jsxs("button", {
23804
23807
  type: "button",
23805
23808
  autoFocus,
@@ -23866,7 +23869,7 @@ function SelectList({
23866
23869
  }) {
23867
23870
  const [hoveredIndex, setHoveredIndex] = React.useState(null);
23868
23871
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
23869
- ..._stylex.props(styles$m.selectListDiv, customStyle),
23872
+ ..._stylex.props(styles$r.selectListDiv, customStyle),
23870
23873
  children: options.reduce((result, option2, index2) => {
23871
23874
  const isSelected = value !== void 0 && valueEqual(value, option2.value);
23872
23875
  if (option2.divider) {
@@ -23898,8 +23901,8 @@ function SelectList({
23898
23901
  }), /* @__PURE__ */ jsxRuntime.jsx(Icon, {
23899
23902
  name: "checkmark",
23900
23903
  customStyle: {
23901
- ...styles$m.checkIcon,
23902
- ...isSelected ? styles$m.checkIconSelected : void 0
23904
+ ...styles$r.checkIcon,
23905
+ ...isSelected ? styles$r.checkIconSelected : void 0
23903
23906
  }
23904
23907
  }), /* @__PURE__ */ jsxRuntime.jsx("span", {
23905
23908
  ...{
@@ -23912,31 +23915,20 @@ function SelectList({
23912
23915
  }, [])
23913
23916
  });
23914
23917
  }
23915
- function granularityIndex(granularity) {
23916
- return ["year", "quarter", "month", "week", "day", "hour", "minute", "second"].indexOf(granularity);
23917
- }
23918
23918
  function monthName(month) {
23919
23919
  return ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"][month];
23920
23920
  }
23921
23921
  function DatePicker({
23922
23922
  value,
23923
23923
  setValue,
23924
+ units,
23924
23925
  maxLevel,
23925
- style
23926
+ customStyle
23926
23927
  }) {
23927
23928
  const [date, setDate] = React.useState(value);
23928
23929
  const calendar2 = getCalendar(date);
23929
- const [pickLevel, setPickLevel] = React.useState(maxLevel);
23930
+ const [pickLevel, setPickLevel] = React.useState(units);
23930
23931
  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
23932
  React.useEffect(() => {
23941
23933
  setDate(value);
23942
23934
  }, [value]);
@@ -23944,13 +23936,6 @@ function DatePicker({
23944
23936
  const newDate = hooks(date).year(year).toDate();
23945
23937
  setDate(newDate);
23946
23938
  setValue(newDate);
23947
- if (maxLevel !== "year") {
23948
- if (maxLevel === "quarter") {
23949
- setPickLevel("quarter");
23950
- } else {
23951
- setPickLevel("month");
23952
- }
23953
- }
23954
23939
  };
23955
23940
  const yearButton = (offset2) => {
23956
23941
  const click = () => setYear(yearBucket + offset2);
@@ -23980,27 +23965,14 @@ function DatePicker({
23980
23965
  const newDate = hooks(date).month(month).toDate();
23981
23966
  setDate(newDate);
23982
23967
  setValue(newDate);
23983
- if (maxLevel !== "month") {
23984
- if (maxLevel === "week") {
23985
- setPickLevel("week");
23986
- } else {
23987
- setPickLevel("day");
23988
- }
23989
- }
23990
23968
  };
23991
23969
  const setDay = (day) => {
23992
23970
  setDate(day);
23993
23971
  setValue(day);
23994
- if (maxLevel !== "day") {
23995
- setPickLevel(maxLevel);
23996
- }
23997
23972
  };
23998
23973
  const setWeekByDay = (dateOfFirstDayOfWeek) => {
23999
23974
  setDate(dateOfFirstDayOfWeek);
24000
23975
  setValue(dateOfFirstDayOfWeek);
24001
- if (maxLevel !== "week") {
24002
- setPickLevel("day");
24003
- }
24004
23976
  };
24005
23977
  const setQuarter = (quarter) => {
24006
23978
  const newDate = hooks(date).quarter(quarter + 1).toDate();
@@ -24040,7 +24012,7 @@ function DatePicker({
24040
24012
  });
24041
24013
  };
24042
24014
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
24043
- ..._stylex.props(styles$l.outer, style),
24015
+ ..._stylex.props(styles$q.outer, customStyle),
24044
24016
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
24045
24017
  ...{
24046
24018
  className: "mly78zum5 mly1q0g3np mly1qughib mly1nejdyq mlyu06os2"
@@ -24076,6 +24048,8 @@ function DatePicker({
24076
24048
  setPickLevel("year");
24077
24049
  } else if (pickLevel === "hour" || pickLevel === "minute" || pickLevel === "second") {
24078
24050
  setPickLevel("day");
24051
+ } else {
24052
+ setPickLevel(maxLevel);
24079
24053
  }
24080
24054
  },
24081
24055
  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 +24287,14 @@ function DatePicker({
24313
24287
  setValue(hooks(date).hour(newHour24).toDate());
24314
24288
  },
24315
24289
  width: "40px"
24316
- }), (maxLevel === "minute" || maxLevel === "second") && /* @__PURE__ */ jsxRuntime.jsx(NumberInput, {
24290
+ }), (units === "minute" || units === "second") && /* @__PURE__ */ jsxRuntime.jsx(NumberInput, {
24317
24291
  label: "Minutes",
24318
24292
  value: hooks(date).minutes(),
24319
24293
  setValue: (minute) => {
24320
24294
  setValue(hooks(date).minute(minute).toDate());
24321
24295
  },
24322
24296
  width: "40px"
24323
- }), maxLevel === "second" && /* @__PURE__ */ jsxRuntime.jsx(NumberInput, {
24297
+ }), units === "second" && /* @__PURE__ */ jsxRuntime.jsx(NumberInput, {
24324
24298
  label: "Seconds",
24325
24299
  value: hooks(date).seconds(),
24326
24300
  setValue: (second) => {
@@ -24353,7 +24327,7 @@ function DatePicker({
24353
24327
  })]
24354
24328
  });
24355
24329
  }
24356
- const styles$l = {
24330
+ const styles$q = {
24357
24331
  outer: {
24358
24332
  userSelect: "mly87ps6o",
24359
24333
  fontSize: "mlymhiqyu",
@@ -24439,7 +24413,7 @@ function Banner({
24439
24413
  className: "mly1q4ynmn mlyh8yej3 mly5yr21d mly78zum5 mlydt5ytf mly1kmqopl mly16zck5j"
24440
24414
  },
24441
24415
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
24442
- ..._stylex.props(styles$k.header, variantColors[variant], children ? styles$k.headerWithContent : null),
24416
+ ..._stylex.props(styles$p.header, variantColors[variant], children ? styles$p.headerWithContent : null),
24443
24417
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
24444
24418
  ...{
24445
24419
  className: "mly1qx5ct2 mly78zum5 mlyl56j7k mly6s0dn4"
@@ -24452,22 +24426,22 @@ function Banner({
24452
24426
  className: "mly78zum5 mlydt5ytf mlyb3r6kr"
24453
24427
  },
24454
24428
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
24455
- ..._stylex.props(styles$k.title, fontStyles.emphasized),
24429
+ ..._stylex.props(styles$p.title, fontStyles.emphasized),
24456
24430
  children: title
24457
24431
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
24458
- ..._stylex.props(styles$k.description, fontStyles.supporting),
24432
+ ..._stylex.props(styles$p.description, fontStyles.supporting),
24459
24433
  children: description
24460
24434
  })]
24461
24435
  })]
24462
24436
  }), children && /* @__PURE__ */ jsxRuntime.jsx("div", {
24463
- ..._stylex.props(styles$k.content, fontStyles.body),
24437
+ ..._stylex.props(styles$p.content, fontStyles.body),
24464
24438
  children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
24465
24439
  children
24466
24440
  })
24467
24441
  })]
24468
24442
  });
24469
24443
  }
24470
- const styles$k = {
24444
+ const styles$p = {
24471
24445
  header: {
24472
24446
  borderRadius: "mly1q4ynmn",
24473
24447
  borderStartStartRadius: null,
@@ -25902,7 +25876,7 @@ function DropdownMenu({
25902
25876
  children: trigger
25903
25877
  }), /* @__PURE__ */ jsxRuntime.jsx(Portal2, {
25904
25878
  children: /* @__PURE__ */ jsxRuntime.jsx(Content2, {
25905
- ..._stylex.props(fontStyles.body, styles$j.content),
25879
+ ..._stylex.props(fontStyles.body, styles$o.content),
25906
25880
  side: "bottom",
25907
25881
  align: "start",
25908
25882
  sideOffset: 4,
@@ -25929,16 +25903,16 @@ function DropdownMenuItem({
25929
25903
  disabled,
25930
25904
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
25931
25905
  name: icon,
25932
- customStyle: styles$j.icon
25906
+ customStyle: styles$o.icon
25933
25907
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
25934
25908
  ...{
25935
25909
  className: "mly78zum5 mlydt5ytf mly1iyjqo2"
25936
25910
  },
25937
25911
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
25938
- ..._stylex.props(fontStyles.body, styles$j.label),
25912
+ ..._stylex.props(fontStyles.body, styles$o.label),
25939
25913
  children: label
25940
25914
  }), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
25941
- ..._stylex.props(fontStyles.supporting, styles$j.sublabel),
25915
+ ..._stylex.props(fontStyles.supporting, styles$o.sublabel),
25942
25916
  children: sublabel
25943
25917
  })]
25944
25918
  })]
@@ -25959,21 +25933,21 @@ function DropdownSubMenuItem({
25959
25933
  disabled,
25960
25934
  children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
25961
25935
  name: icon,
25962
- customStyle: styles$j.icon
25936
+ customStyle: styles$o.icon
25963
25937
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
25964
25938
  ...{
25965
25939
  className: "mly78zum5 mlydt5ytf mly1iyjqo2"
25966
25940
  },
25967
25941
  children: [/* @__PURE__ */ jsxRuntime.jsx("span", {
25968
- ..._stylex.props(fontStyles.body, styles$j.label),
25942
+ ..._stylex.props(fontStyles.body, styles$o.label),
25969
25943
  children: label
25970
25944
  }), sublabel && /* @__PURE__ */ jsxRuntime.jsx("span", {
25971
- ..._stylex.props(fontStyles.supporting, styles$j.sublabel),
25945
+ ..._stylex.props(fontStyles.supporting, styles$o.sublabel),
25972
25946
  children: sublabel
25973
25947
  })]
25974
25948
  }), /* @__PURE__ */ jsxRuntime.jsx(Icon, {
25975
25949
  name: "chevronRight",
25976
- customStyle: styles$j.icon
25950
+ customStyle: styles$o.icon
25977
25951
  })]
25978
25952
  }), /* @__PURE__ */ jsxRuntime.jsx(SubContent2, {
25979
25953
  ...{
@@ -25988,11 +25962,11 @@ function DropdownMenuLabel({
25988
25962
  label
25989
25963
  }) {
25990
25964
  return /* @__PURE__ */ jsxRuntime.jsx(Label2, {
25991
- ..._stylex.props(fontStyles.supporting, styles$j.menuLabel),
25965
+ ..._stylex.props(fontStyles.supporting, styles$o.menuLabel),
25992
25966
  children: label
25993
25967
  });
25994
25968
  }
25995
- const styles$j = {
25969
+ const styles$o = {
25996
25970
  content: {
25997
25971
  display: "mly78zum5",
25998
25972
  flexDirection: "mlydt5ytf",
@@ -26081,6 +26055,7 @@ const filterStyles = {
26081
26055
  paddingTop: null,
26082
26056
  paddingBottom: null,
26083
26057
  minWidth: "mly1jzhcrs",
26058
+ maxWidth: "mly1j9u4d2",
26084
26059
  gap: "mly167g77z",
26085
26060
  rowGap: null,
26086
26061
  columnGap: null,
@@ -26102,35 +26077,11 @@ const filterStyles = {
26102
26077
  $$css: true
26103
26078
  }
26104
26079
  };
26105
- const BooleanFilterFragments = {
26106
- is_true: {
26107
- operator: "true"
26108
- },
26109
- is_false: {
26110
- operator: "false"
26111
- },
26112
- is_null: {
26113
- operator: "null"
26114
- },
26115
- is_not_null: {
26116
- operator: "null",
26117
- not: true
26118
- },
26119
- is_false_or_null: {
26120
- operator: "false_or_null"
26121
- }
26122
- };
26123
26080
  function typeFromFilter$3(filter) {
26124
- for (const key2 in BooleanFilterFragments) {
26125
- const type = key2;
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
- }
26081
+ if (filter.operator === "null" && filter.not) {
26082
+ return "-null";
26132
26083
  }
26133
- throw new Error(`Unhandled boolean filter type ${filter.operator}`);
26084
+ return filter.operator;
26134
26085
  }
26135
26086
  function BooleanFilterCore({
26136
26087
  filter,
@@ -26138,26 +26089,32 @@ function BooleanFilterCore({
26138
26089
  }) {
26139
26090
  const type = typeFromFilter$3(filter);
26140
26091
  const onChangeType = (type2) => {
26141
- setFilter(BooleanFilterFragments[type2]);
26092
+ const filter2 = type2 === "-null" ? {
26093
+ operator: "null",
26094
+ not: true
26095
+ } : {
26096
+ operator: type2
26097
+ };
26098
+ setFilter(filter2);
26142
26099
  };
26143
26100
  return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, {
26144
26101
  children: /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
26145
26102
  value: type,
26146
26103
  onChange: onChangeType,
26147
26104
  options: [{
26148
- value: "is_true",
26105
+ value: "true",
26149
26106
  label: "is true"
26150
26107
  }, {
26151
- value: "is_false",
26108
+ value: "false",
26152
26109
  label: "is false"
26153
26110
  }, {
26154
- value: "is_null",
26111
+ value: "null",
26155
26112
  label: "is null"
26156
26113
  }, {
26157
- value: "is_not_null",
26114
+ value: "-null",
26158
26115
  label: "is not null"
26159
26116
  }, {
26160
- value: "is_false_or_null",
26117
+ value: "false_or_null",
26161
26118
  label: "is false or null"
26162
26119
  }],
26163
26120
  customStyle: filterStyles.filterTypeDropdown
@@ -26279,7 +26236,7 @@ const PillInput = ({
26279
26236
  commitValue();
26280
26237
  });
26281
26238
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
26282
- ..._stylex.props(styles$i.outer, customStyle),
26239
+ ..._stylex.props(styles$n.outer, customStyle),
26283
26240
  onKeyUp,
26284
26241
  onClick: () => {
26285
26242
  var _a2;
@@ -26344,7 +26301,7 @@ const Pill = ({
26344
26301
  onClick,
26345
26302
  tabIndex: 0,
26346
26303
  ref: forwardRef,
26347
- ..._stylex.props(styles$i.pill, colorVariants[color]),
26304
+ ..._stylex.props(styles$n.pill, colorVariants[color]),
26348
26305
  children: [children, /* @__PURE__ */ jsxRuntime.jsx("div", {
26349
26306
  title: "Remove",
26350
26307
  ...{
@@ -26359,7 +26316,7 @@ const Pill = ({
26359
26316
  })]
26360
26317
  });
26361
26318
  };
26362
- const styles$i = {
26319
+ const styles$n = {
26363
26320
  outer: {
26364
26321
  fontFamily: "mly6icuqf",
26365
26322
  fontSize: "mlyif65rj",
@@ -26413,7 +26370,7 @@ const styles$i = {
26413
26370
  gap: "mly1ed6fcf",
26414
26371
  rowGap: null,
26415
26372
  columnGap: null,
26416
- flexWrap: "mlyozqiw3",
26373
+ flexWrap: "mly1a02dak",
26417
26374
  borderColor: "mly1akygb0 mlyetl2wx",
26418
26375
  borderInlineColor: null,
26419
26376
  borderInlineStartColor: null,
@@ -26454,6 +26411,7 @@ const styles$i = {
26454
26411
  textTransform: "mly6mezaz",
26455
26412
  cursor: "mly1ypdohk",
26456
26413
  height: "mly1qx5ct2",
26414
+ whiteSpace: "mlyuxw1ft",
26457
26415
  $$css: true
26458
26416
  }
26459
26417
  };
@@ -26611,7 +26569,8 @@ function ValueList({
26611
26569
  onClick,
26612
26570
  search,
26613
26571
  fieldPath,
26614
- ref
26572
+ ref,
26573
+ customStyle
26615
26574
  }) {
26616
26575
  const {
26617
26576
  searchResults
@@ -26619,10 +26578,11 @@ function ValueList({
26619
26578
  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
26579
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
26621
26580
  ref,
26581
+ ..._stylex.props(customStyle),
26622
26582
  children: (stringSearchResults == null ? void 0 : stringSearchResults.length) ? stringSearchResults.map((value) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
26623
26583
  role: "menuitem",
26624
26584
  tabIndex: -1,
26625
- ..._stylex.props(addMenuStyles.item, styles$h.valueItem),
26585
+ ..._stylex.props(addMenuStyles.item, styles$m.valueItem),
26626
26586
  onClick: () => onClick(value),
26627
26587
  children: [/* @__PURE__ */ jsxRuntime.jsx(Value, {
26628
26588
  value
@@ -26645,16 +26605,22 @@ function Value({
26645
26605
  return /* @__PURE__ */ jsxRuntime.jsx(Token, {
26646
26606
  label: value.fieldValue ?? "∅",
26647
26607
  icon: "filter",
26648
- color: "purple"
26608
+ color: "purple",
26609
+ customStyle: styles$m.token
26649
26610
  });
26650
26611
  }
26651
- const styles$h = {
26612
+ const styles$m = {
26652
26613
  valueItem: {
26653
26614
  height: "mly1qx5ct2",
26654
26615
  paddingTop: "mly1y1aw1k",
26655
26616
  paddingBottom: "mlywib8y2",
26656
26617
  display: "mly78zum5",
26657
26618
  justifyContent: "mly1qughib",
26619
+ cursor: "mly1ypdohk",
26620
+ $$css: true
26621
+ },
26622
+ token: {
26623
+ cursor: "mly1ypdohk",
26658
26624
  $$css: true
26659
26625
  }
26660
26626
  };
@@ -26812,7 +26778,8 @@ const StringFilterCore = ({
26812
26778
  });
26813
26779
  setSearchValue("");
26814
26780
  }
26815
- }
26781
+ },
26782
+ customStyle: styles$l.valueList
26816
26783
  })]
26817
26784
  }) : currentFilter.operator === "~" ? /* @__PURE__ */ jsxRuntime.jsx(StringEditor, {
26818
26785
  values: currentFilter.escaped_values,
@@ -26879,6 +26846,15 @@ function stringFilterChangeType(filter, type) {
26879
26846
  };
26880
26847
  }
26881
26848
  }
26849
+ const styles$l = {
26850
+ valueList: {
26851
+ maxHeight: "mly1hkcv85",
26852
+ overflow: "mlyysyzu8",
26853
+ overflowX: null,
26854
+ overflowY: null,
26855
+ $$css: true
26856
+ }
26857
+ };
26882
26858
  const NumberFilterFragments = {
26883
26859
  is_equal_to: {
26884
26860
  operator: "="
@@ -27002,10 +26978,10 @@ const NumberFilterCore = ({
27002
26978
  }]
27003
26979
  }), errorMessage ? /* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, {
27004
26980
  errorMessage
27005
- }) : null, getEditor$1(filter, innerValues, validateAndUpdateValues)]
26981
+ }) : null, getEditor(filter, innerValues, validateAndUpdateValues)]
27006
26982
  });
27007
26983
  };
27008
- function getEditor$1(filter, innerValues, validateAndUpdateValues) {
26984
+ function getEditor(filter, innerValues, validateAndUpdateValues) {
27009
26985
  switch (filter.operator) {
27010
26986
  case "!=":
27011
26987
  case "=":
@@ -27075,41 +27051,102 @@ function makeFilterWithNewType(filter, type) {
27075
27051
  };
27076
27052
  }
27077
27053
  }
27078
- function typeFromFilter(filter) {
27079
- if (filter.operator === "null") {
27080
- return filter.not ? "is_not_null" : "is_null";
27081
- } else if (filter.operator === "in") {
27082
- return "is_equal_to";
27083
- } else if (filter.operator === "before") {
27084
- return "is_before";
27085
- } else if (filter.operator === "after") {
27086
- return "is_after";
27087
- } else if (filter.operator === "to") {
27088
- return "is_between";
27054
+ const formats = {
27055
+ second: "YYYY-MM-DD HH:mm:ss",
27056
+ minute: "YYYY-MM-DD HH:mm",
27057
+ hour: "YYYY-MM-DD HH:00",
27058
+ day: "YYYY-MM-DD",
27059
+ week: "[WK]YYYY-WW",
27060
+ month: "YYYY-MM",
27061
+ quarter: "YYYY-[Q]Q",
27062
+ year: "YYYY"
27063
+ };
27064
+ const regexps = {
27065
+ second: /\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/,
27066
+ minute: /\d\d\d\d-\d\d-\d\d \d\d:\d\d/,
27067
+ hour: /\d\d\d\d-\d\d-\d\d \d\d:00/,
27068
+ day: /\d\d\d\d-\d\d-\d\d/,
27069
+ week: /WK\d\d\d\d-\d\d-\d\d/,
27070
+ month: /\d\d\d\d-\d\d/,
27071
+ quarter: /\d\d\d\d-Q\d/,
27072
+ year: /\d\d\d\d/
27073
+ };
27074
+ const DateInput = ({
27075
+ value,
27076
+ setValue,
27077
+ placeholder,
27078
+ autoFocus,
27079
+ units,
27080
+ onFocus,
27081
+ onBlur,
27082
+ isActive,
27083
+ customStyle
27084
+ }) => {
27085
+ const format2 = formats[units];
27086
+ const [tempValue, setTempValue] = React.useState(hooks(value).format(format2));
27087
+ React.useEffect(() => {
27088
+ setTempValue(hooks(value).format(format2));
27089
+ }, [value, format2]);
27090
+ return /* @__PURE__ */ jsxRuntime.jsx("input", {
27091
+ ..._stylex.props(customStyle, isActive ? styles$k.active : null),
27092
+ type: "text",
27093
+ placeholder: placeholder || format2,
27094
+ value: tempValue,
27095
+ onFocus,
27096
+ onBlur,
27097
+ onChange: (event) => {
27098
+ const raw2 = event.target.value;
27099
+ setTempValue(raw2);
27100
+ const regex = regexps[units];
27101
+ if (raw2.match(regex)) {
27102
+ const m = hooks(raw2, format2);
27103
+ if (m.isValid()) {
27104
+ setValue(m.toDate());
27105
+ }
27106
+ }
27107
+ },
27108
+ autoFocus
27109
+ });
27110
+ };
27111
+ function guessUnits(moment2, isDateTime) {
27112
+ if (moment2.moment === "literal") {
27113
+ const {
27114
+ literal
27115
+ } = moment2;
27116
+ for (const unit in regexps) {
27117
+ const temporalUnit = unit;
27118
+ if (literal.match(regexps[temporalUnit])) {
27119
+ return temporalUnit;
27120
+ }
27121
+ }
27089
27122
  }
27090
- return "is_equal_to";
27123
+ return isDateTime ? "second" : "day";
27091
27124
  }
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
- };
27102
- }
27103
- function extractDateFromMoment(momentObj) {
27104
- if (!momentObj) {
27105
- return /* @__PURE__ */ new Date();
27125
+ const styles$k = {
27126
+ active: {
27127
+ backgroundColor: "mly1vzefiq",
27128
+ $$css: true
27106
27129
  }
27107
- if (momentObj.moment === "literal") {
27108
- return new Date(momentObj.literal);
27109
- } else if (momentObj.moment === "now") {
27110
- return /* @__PURE__ */ new Date();
27130
+ };
27131
+ function typeFromFilter(filter) {
27132
+ if (filter.operator === "null" && filter.not) {
27133
+ return "-null";
27111
27134
  }
27112
- return /* @__PURE__ */ new Date();
27135
+ return filter.operator;
27136
+ }
27137
+ function unitsFromFilter(filter, isDateTime) {
27138
+ if (filter.operator === "last" || filter.operator === "next") {
27139
+ return filter.units;
27140
+ } else if (filter.operator === "to") {
27141
+ return guessUnits(filter.fromMoment, isDateTime);
27142
+ } else if (filter.operator === "before" && filter.before.moment === "literal") {
27143
+ return guessUnits(filter.before, isDateTime);
27144
+ } else if (filter.operator === "after") {
27145
+ return guessUnits(filter.after, isDateTime);
27146
+ } else if (filter.operator === "in") {
27147
+ return guessUnits(filter.in, isDateTime);
27148
+ }
27149
+ return isDateTime ? "second" : "day";
27113
27150
  }
27114
27151
  const DateTimeFilterCore = ({
27115
27152
  filter,
@@ -27117,299 +27154,443 @@ const DateTimeFilterCore = ({
27117
27154
  isDateTime
27118
27155
  }) => {
27119
27156
  filter ?? (filter = {
27120
- operator: "in",
27121
- in: createNowMoment()
27157
+ operator: "last",
27158
+ n: "7",
27159
+ units: "day"
27122
27160
  });
27161
+ const [units, setUnits] = React.useState(unitsFromFilter(filter, isDateTime));
27123
27162
  const [currentFilter, setCurrentFilter] = React.useState(filter);
27124
27163
  const changeType = (type2) => {
27125
- updateFilter(dateTimeFilterChangeType(currentFilter, type2));
27164
+ updateFilter(dateTimeFilterChangeType(currentFilter, type2, units));
27126
27165
  };
27127
27166
  const updateFilter = (newFilter) => {
27128
27167
  setCurrentFilter(newFilter);
27129
27168
  setFilter(newFilter);
27130
27169
  };
27131
- const type = typeFromFilter(currentFilter);
27132
27170
  const maxLevel = isDateTime ? "second" : "day";
27133
- return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
27134
- children: [/* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
27135
- value: type,
27136
- onChange: changeType,
27137
- options: [{
27138
- value: "is_equal_to",
27139
- label: "is"
27140
- }, {
27141
- value: "is_before",
27142
- label: "is before"
27143
- }, {
27144
- value: "is_after",
27145
- label: "is after"
27146
- }, {
27147
- value: "is_between",
27148
- label: "is between"
27149
- }, {
27150
- value: "is_null",
27151
- label: "is null"
27152
- }, {
27153
- value: "is_not_null",
27154
- label: "is not null"
27155
- }]
27156
- }), getEditor(currentFilter, updateFilter, maxLevel)]
27171
+ const type = typeFromFilter(currentFilter);
27172
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", {
27173
+ ...{
27174
+ className: "mlyxsgkw5 mly78zum5 mlydt5ytf mly167g77z"
27175
+ },
27176
+ children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
27177
+ ...{
27178
+ className: "mly78zum5 mly167g77z"
27179
+ },
27180
+ children: [/* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
27181
+ value: type,
27182
+ onChange: changeType,
27183
+ options: [{
27184
+ value: "last",
27185
+ label: "last"
27186
+ }, {
27187
+ value: "next",
27188
+ label: "next"
27189
+ }, {
27190
+ value: "after",
27191
+ label: "after"
27192
+ }, {
27193
+ value: "before",
27194
+ label: "before"
27195
+ }, {
27196
+ value: "in",
27197
+ label: "is"
27198
+ }, {
27199
+ value: "to",
27200
+ label: "between"
27201
+ }, {
27202
+ value: "null",
27203
+ label: "null"
27204
+ }, {
27205
+ value: "-null",
27206
+ label: "not null"
27207
+ }],
27208
+ customStyle: styles$j.editorCell
27209
+ }), getTopEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel)]
27210
+ }), getBottomEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel)]
27157
27211
  });
27158
27212
  };
27159
- let inDate;
27160
- let beforeDate;
27161
- let afterDate;
27162
- let fromDate;
27163
- let toDate;
27164
- function getEditor(currentFilter, updateFilter, maxLevel) {
27213
+ function getTopEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel) {
27165
27214
  switch (currentFilter.operator) {
27166
- case "in": {
27167
- const inMoment = currentFilter;
27168
- inDate = extractDateFromMoment(inMoment.in);
27169
- return /* @__PURE__ */ jsxRuntime.jsx(DateTimeEditor, {
27170
- value: inDate,
27171
- setValue: (newDate) => {
27172
- updateFilter({
27173
- ...currentFilter,
27174
- in: createTemporalLiteral(newDate)
27175
- });
27176
- },
27177
- maxLevel
27215
+ case "last":
27216
+ case "next":
27217
+ return /* @__PURE__ */ jsxRuntime.jsx(NUnitFilter, {
27218
+ currentFilter,
27219
+ maxLevel,
27220
+ updateFilter,
27221
+ units,
27222
+ setUnits
27178
27223
  });
27179
- }
27180
- case "before": {
27181
- const beforeMoment = currentFilter;
27182
- beforeDate = extractDateFromMoment(beforeMoment.before);
27183
- return /* @__PURE__ */ jsxRuntime.jsx(DateTimeEditor, {
27184
- value: beforeDate,
27185
- setValue: (newDate) => {
27186
- updateFilter({
27187
- ...currentFilter,
27188
- before: createTemporalLiteral(newDate)
27189
- });
27190
- },
27191
- maxLevel
27224
+ case "after":
27225
+ case "before":
27226
+ case "to":
27227
+ case "in":
27228
+ return /* @__PURE__ */ jsxRuntime.jsx(UnitFilter, {
27229
+ currentFilter,
27230
+ maxLevel,
27231
+ updateFilter,
27232
+ units,
27233
+ setUnits
27192
27234
  });
27193
- }
27194
- case "after": {
27195
- const afterMoment = currentFilter;
27196
- afterDate = extractDateFromMoment(afterMoment.after);
27197
- return /* @__PURE__ */ jsxRuntime.jsx(DateTimeEditor, {
27198
- value: afterDate,
27199
- setValue: (newDate) => {
27200
- updateFilter({
27201
- ...currentFilter,
27202
- after: createTemporalLiteral(newDate)
27203
- });
27204
- },
27205
- maxLevel
27235
+ }
27236
+ return null;
27237
+ }
27238
+ function getBottomEditorRow(currentFilter, updateFilter, units, setUnits, maxLevel) {
27239
+ switch (currentFilter.operator) {
27240
+ case "after":
27241
+ case "before":
27242
+ case "in":
27243
+ return /* @__PURE__ */ jsxRuntime.jsx(SingleDateFilter, {
27244
+ currentFilter,
27245
+ maxLevel,
27246
+ updateFilter,
27247
+ units,
27248
+ setUnits
27206
27249
  });
27207
- }
27208
- case "to": {
27209
- const toMoment = currentFilter;
27210
- fromDate = extractDateFromMoment(toMoment.fromMoment);
27211
- toDate = extractDateFromMoment(toMoment.toMoment);
27212
- return /* @__PURE__ */ jsxRuntime.jsx(DateTimeRangeEditor, {
27213
- fromValue: fromDate,
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
27250
+ case "to":
27251
+ return /* @__PURE__ */ jsxRuntime.jsx(DoubleDateFilter, {
27252
+ currentFilter,
27253
+ maxLevel,
27254
+ updateFilter,
27255
+ units,
27256
+ setUnits
27228
27257
  });
27229
- }
27230
27258
  }
27231
27259
  return null;
27232
27260
  }
27233
- const formatDate = (date, maxLevel) => {
27234
- if (maxLevel === "day") {
27235
- return hooks(date).format("YYYY-MM-DD");
27236
- } else {
27237
- return hooks(date).format("YYYY-MM-DD hh:mm:ss");
27238
- }
27239
- };
27240
- function ClickableDateToken({
27241
- value,
27242
- setValue,
27243
- maxLevel,
27244
- label
27261
+ const DateUnits = [{
27262
+ value: "year",
27263
+ label: "years"
27264
+ }, {
27265
+ value: "quarter",
27266
+ label: "quarters"
27267
+ }, {
27268
+ value: "month",
27269
+ label: "months"
27270
+ }, {
27271
+ value: "week",
27272
+ label: "weeks"
27273
+ }, {
27274
+ value: "day",
27275
+ label: "days"
27276
+ }];
27277
+ const TimeUnits = [{
27278
+ value: "hour",
27279
+ label: "hours"
27280
+ }, {
27281
+ value: "minute",
27282
+ label: "minutes"
27283
+ }, {
27284
+ value: "second",
27285
+ label: "seconds"
27286
+ }];
27287
+ function NUnitFilter({
27288
+ currentFilter,
27289
+ updateFilter,
27290
+ setUnits,
27291
+ maxLevel
27245
27292
  }) {
27246
- const [innerValue, setInnerValue] = React.useState(formatDate(value, maxLevel));
27247
- const [errorMessage, setErrorMessage] = React.useState("");
27248
- React__namespace.useEffect(() => {
27249
- setInnerValue(formatDate(value, maxLevel));
27250
- }, [maxLevel, value]);
27251
- const [isPickerOpen, setIsPickerOpen] = React.useState(false);
27252
- const ref = React__namespace.useRef(null);
27253
- const checkForErrorsOrCommit = (date) => {
27254
- if (date && !isNaN(date.getTime()) && date.getFullYear() < 1e4) {
27255
- setErrorMessage("");
27256
- setValue(date);
27293
+ const {
27294
+ n,
27295
+ units
27296
+ } = currentFilter;
27297
+ const options = maxLevel === "day" ? DateUnits : [...DateUnits, ...TimeUnits];
27298
+ const updateN = (event) => {
27299
+ const n2 = event.target.value;
27300
+ updateFilter({
27301
+ ...currentFilter,
27302
+ n: n2
27303
+ });
27304
+ };
27305
+ const updateUnits = (units2) => {
27306
+ setUnits(units2);
27307
+ updateFilter({
27308
+ ...currentFilter,
27309
+ units: units2
27310
+ });
27311
+ };
27312
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
27313
+ children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
27314
+ type: "number",
27315
+ value: n,
27316
+ ...{
27317
+ className: "mly2yh2zd mlyizdh9v mly9cpjcd mly1sxf85j mly1iyjqo2"
27318
+ },
27319
+ onChange: updateN
27320
+ }), /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
27321
+ options,
27322
+ value: units,
27323
+ onChange: updateUnits,
27324
+ customStyle: styles$j.editorCell
27325
+ })]
27326
+ });
27327
+ }
27328
+ function UnitFilter({
27329
+ units,
27330
+ setUnits,
27331
+ maxLevel
27332
+ }) {
27333
+ const options = maxLevel === "day" ? DateUnits : [...DateUnits, ...TimeUnits];
27334
+ return /* @__PURE__ */ jsxRuntime.jsx(SelectDropdown, {
27335
+ options,
27336
+ value: units,
27337
+ onChange: setUnits,
27338
+ customStyle: styles$j.editorCell
27339
+ });
27340
+ }
27341
+ function SingleDateFilter({
27342
+ currentFilter,
27343
+ updateFilter,
27344
+ units,
27345
+ maxLevel
27346
+ }) {
27347
+ const moment2 = currentFilter.operator === "after" ? currentFilter.after : currentFilter.operator === "before" ? currentFilter.before : currentFilter.in;
27348
+ const date = extractDateFromMoment(moment2);
27349
+ const updateDate = (date2) => {
27350
+ updateFilter({
27351
+ ...currentFilter,
27352
+ [currentFilter.operator]: createTemporalLiteral(date2, units)
27353
+ });
27354
+ };
27355
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
27356
+ children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
27357
+ ...{
27358
+ className: "mly78zum5 mly167g77z"
27359
+ },
27360
+ children: /* @__PURE__ */ jsxRuntime.jsx(DateInput, {
27361
+ value: date,
27362
+ setValue: updateDate,
27363
+ units,
27364
+ customStyle: {
27365
+ ...styles$j.input,
27366
+ ...styles$j.editorCell
27367
+ }
27368
+ })
27369
+ }), /* @__PURE__ */ jsxRuntime.jsx("div", {
27370
+ ...{
27371
+ className: "mly78zum5 mly167g77z"
27372
+ },
27373
+ children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, {
27374
+ value: date,
27375
+ setValue: updateDate,
27376
+ units,
27377
+ maxLevel,
27378
+ customStyle: styles$j.editorCell
27379
+ })
27380
+ })]
27381
+ });
27382
+ }
27383
+ function DoubleDateFilter({
27384
+ currentFilter,
27385
+ updateFilter,
27386
+ units,
27387
+ maxLevel
27388
+ }) {
27389
+ const {
27390
+ fromMoment,
27391
+ toMoment
27392
+ } = currentFilter;
27393
+ const fromDate = extractDateFromMoment(fromMoment);
27394
+ const toDate2 = extractDateFromMoment(toMoment);
27395
+ const [date, setDate] = React.useState(fromDate);
27396
+ const [focusedDate, setFocusedDate] = React.useState("from");
27397
+ const updateFromDate = (date2) => {
27398
+ updateFilter({
27399
+ ...currentFilter,
27400
+ fromMoment: createTemporalLiteral(date2, units)
27401
+ });
27402
+ };
27403
+ const updateToDate = (date2) => {
27404
+ updateFilter({
27405
+ ...currentFilter,
27406
+ toMoment: createTemporalLiteral(date2, units)
27407
+ });
27408
+ };
27409
+ const updateDate = (date2) => {
27410
+ if (focusedDate === "from") {
27411
+ updateFromDate(date2);
27257
27412
  } else {
27258
- setErrorMessage(`Date must be in YYYY-MM-DD${maxLevel !== "day" && " hh:mm:ss"} format.`);
27413
+ updateToDate(date2);
27259
27414
  }
27415
+ setDate(date2);
27260
27416
  };
27261
- useClickOutside(ref, () => {
27262
- if (isPickerOpen) {
27263
- setIsPickerOpen(false);
27264
- checkForErrorsOrCommit(new Date(innerValue));
27265
- }
27266
- });
27267
- const getDateForDatePicker = () => {
27268
- try {
27269
- const parsedDate = new Date(innerValue);
27270
- if (!isNaN(parsedDate.getTime())) {
27271
- return parsedDate;
27272
- }
27273
- } catch (ex) {
27417
+ const updateFocusedDate = (focusedDate2) => {
27418
+ setFocusedDate(focusedDate2);
27419
+ if (focusedDate2 === "from") {
27420
+ const fromDate2 = extractDateFromMoment(fromMoment);
27421
+ setDate(fromDate2);
27422
+ } else {
27423
+ const toDate22 = extractDateFromMoment(toMoment);
27424
+ setDate(toDate22);
27274
27425
  }
27275
- return value;
27276
27426
  };
27277
- return /* @__PURE__ */ jsxRuntime.jsxs("div", {
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
- },
27427
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
27290
27428
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
27291
- style: {
27292
- display: "flex"
27429
+ ...{
27430
+ className: "mly78zum5 mly167g77z"
27293
27431
  },
27294
- children: [/* @__PURE__ */ jsxRuntime.jsx("input", {
27295
- value: label ? `${label}: ${innerValue}` : innerValue,
27296
- onChange: (event) => {
27297
- setInnerValue(event.target.value);
27432
+ children: [/* @__PURE__ */ jsxRuntime.jsx(DateInput, {
27433
+ value: fromDate,
27434
+ setValue: updateFromDate,
27435
+ units,
27436
+ customStyle: {
27437
+ ...styles$j.input,
27438
+ ...styles$j.editorCell
27298
27439
  },
27299
- style: {
27300
- border: "1px solid #e0e0e0",
27301
- color: "rgb(95, 99, 104)",
27302
- padding: "4px 8px 4px 8px",
27303
- borderRadius: 5
27304
- }
27305
- }), errorMessage && /* @__PURE__ */ jsxRuntime.jsx(ErrorIcon, {
27306
- errorMessage
27440
+ onFocus: () => updateFocusedDate("from"),
27441
+ isActive: focusedDate === "from"
27442
+ }), /* @__PURE__ */ jsxRuntime.jsx(DateInput, {
27443
+ value: toDate2,
27444
+ setValue: updateToDate,
27445
+ units,
27446
+ customStyle: {
27447
+ ...styles$j.input,
27448
+ ...styles$j.editorCell
27449
+ },
27450
+ onFocus: () => updateFocusedDate("to"),
27451
+ isActive: focusedDate === "to"
27307
27452
  })]
27308
- }), isPickerOpen && /* @__PURE__ */ jsxRuntime.jsx("div", {
27309
- style: {
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"
27453
+ }), /* @__PURE__ */ jsxRuntime.jsx("div", {
27454
+ ...{
27455
+ className: "mly78zum5 mly167g77z"
27320
27456
  },
27321
27457
  children: /* @__PURE__ */ jsxRuntime.jsx(DatePicker, {
27322
- value: getDateForDatePicker(),
27323
- setValue: (newValue) => {
27324
- checkForErrorsOrCommit(newValue);
27325
- },
27326
- maxLevel
27458
+ value: date,
27459
+ setValue: updateDate,
27460
+ units,
27461
+ maxLevel,
27462
+ customStyle: styles$j.editorCell
27327
27463
  })
27328
27464
  })]
27329
27465
  });
27330
27466
  }
27331
- function DateTimeEditor({
27332
- value,
27333
- setValue,
27334
- maxLevel
27335
- }) {
27336
- return /* @__PURE__ */ jsxRuntime.jsx(ClickableDateToken, {
27337
- value,
27338
- setValue,
27339
- maxLevel
27340
- });
27467
+ function createTemporalLiteral(date, units) {
27468
+ return {
27469
+ moment: "literal",
27470
+ literal: hooks(date).format(formats[units])
27471
+ };
27341
27472
  }
27342
- function DateTimeRangeEditor({
27343
- fromValue,
27344
- toValue,
27345
- setFromValue,
27346
- setToValue,
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
- });
27473
+ function extractDateFromMoment(momentObj) {
27474
+ if (momentObj && momentObj.moment === "literal") {
27475
+ return hooks(momentObj.literal).toDate();
27476
+ }
27477
+ return /* @__PURE__ */ new Date();
27364
27478
  }
27365
- function dateTimeFilterChangeType(filter, type) {
27366
- let currentDate = /* @__PURE__ */ new Date();
27367
- let endDate = hooks(currentDate).add(1, "day").toDate();
27368
- if (filter.operator === "in") {
27369
- currentDate = extractDateFromMoment(filter.in);
27370
- } else if (filter.operator === "before") {
27371
- currentDate = extractDateFromMoment(filter.before);
27372
- } else if (filter.operator === "after") {
27373
- currentDate = extractDateFromMoment(filter.after);
27374
- } else if (filter.operator === "to") {
27375
- currentDate = extractDateFromMoment(filter.fromMoment);
27376
- endDate = extractDateFromMoment(filter.toMoment);
27479
+ function dateTimeFilterChangeType(filter, type, units) {
27480
+ let n = "7";
27481
+ let fromMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
27482
+ let toMoment = createTemporalLiteral(/* @__PURE__ */ new Date(), units);
27483
+ switch (filter.operator) {
27484
+ case "last":
27485
+ case "next":
27486
+ n = filter.n;
27487
+ units = filter.units;
27488
+ break;
27489
+ case "after":
27490
+ fromMoment = filter.after;
27491
+ toMoment = filter.after;
27492
+ break;
27493
+ case "before":
27494
+ fromMoment = filter.before;
27495
+ toMoment = filter.before;
27496
+ break;
27497
+ case "to":
27498
+ fromMoment = filter.fromMoment;
27499
+ toMoment = filter.toMoment;
27500
+ break;
27377
27501
  }
27378
27502
  switch (type) {
27379
- case "is_equal_to":
27503
+ case "last":
27504
+ case "next":
27380
27505
  return {
27381
- operator: "in",
27382
- in: createTemporalLiteral(currentDate)
27506
+ operator: type,
27507
+ n,
27508
+ units
27383
27509
  };
27384
- case "is_before":
27510
+ case "after":
27385
27511
  return {
27386
- operator: "before",
27387
- before: createTemporalLiteral(currentDate)
27512
+ operator: type,
27513
+ after: fromMoment
27388
27514
  };
27389
- case "is_after":
27515
+ case "before":
27390
27516
  return {
27391
- operator: "after",
27392
- after: createTemporalLiteral(currentDate)
27517
+ operator: type,
27518
+ before: fromMoment
27393
27519
  };
27394
- case "is_between":
27520
+ case "to":
27395
27521
  return {
27396
- operator: "to",
27397
- fromMoment: createTemporalLiteral(currentDate),
27398
- toMoment: createTemporalLiteral(endDate)
27522
+ operator: type,
27523
+ fromMoment,
27524
+ toMoment
27399
27525
  };
27400
- case "is_null":
27526
+ case "null":
27401
27527
  return {
27402
27528
  operator: "null"
27403
27529
  };
27404
- case "is_not_null":
27530
+ case "-null":
27405
27531
  return {
27406
27532
  operator: "null",
27407
27533
  not: true
27408
27534
  };
27409
- default:
27410
- return filter;
27411
27535
  }
27536
+ return filter;
27412
27537
  }
27538
+ const styles$j = {
27539
+ editorCell: {
27540
+ flexGrow: "mly1iyjqo2",
27541
+ $$css: true
27542
+ },
27543
+ input: {
27544
+ border: "mly2yh2zd",
27545
+ borderWidth: null,
27546
+ borderInlineWidth: null,
27547
+ borderInlineStartWidth: null,
27548
+ borderLeftWidth: null,
27549
+ borderInlineEndWidth: null,
27550
+ borderRightWidth: null,
27551
+ borderBlockWidth: null,
27552
+ borderTopWidth: null,
27553
+ borderBottomWidth: null,
27554
+ borderStyle: null,
27555
+ borderInlineStyle: null,
27556
+ borderInlineStartStyle: null,
27557
+ borderLeftStyle: null,
27558
+ borderInlineEndStyle: null,
27559
+ borderRightStyle: null,
27560
+ borderBlockStyle: null,
27561
+ borderTopStyle: null,
27562
+ borderBottomStyle: null,
27563
+ borderColor: null,
27564
+ borderInlineColor: null,
27565
+ borderInlineStartColor: null,
27566
+ borderLeftColor: null,
27567
+ borderInlineEndColor: null,
27568
+ borderRightColor: null,
27569
+ borderBlockColor: null,
27570
+ borderTopColor: null,
27571
+ borderBottomColor: null,
27572
+ color: "mlyizdh9v",
27573
+ padding: "mly9cpjcd",
27574
+ paddingInline: null,
27575
+ paddingStart: null,
27576
+ paddingLeft: null,
27577
+ paddingEnd: null,
27578
+ paddingRight: null,
27579
+ paddingBlock: null,
27580
+ paddingTop: null,
27581
+ paddingBottom: null,
27582
+ borderRadius: "mly1sxf85j",
27583
+ borderStartStartRadius: null,
27584
+ borderStartEndRadius: null,
27585
+ borderEndStartRadius: null,
27586
+ borderEndEndRadius: null,
27587
+ borderTopLeftRadius: null,
27588
+ borderTopRightRadius: null,
27589
+ borderBottomLeftRadius: null,
27590
+ borderBottomRightRadius: null,
27591
+ $$css: true
27592
+ }
27593
+ };
27413
27594
  function FilterDialog({
27414
27595
  fieldInfo,
27415
27596
  path,
@@ -27541,21 +27722,43 @@ function useFilterModal({
27541
27722
  }
27542
27723
  setQuery == null ? void 0 : setQuery(rootQuery == null ? void 0 : rootQuery.build());
27543
27724
  };
27544
- const FilterModal = () => /* @__PURE__ */ jsxRuntime.jsx(Root$2, {
27545
- open,
27546
- onOpenChange: setOpen,
27547
- children: /* @__PURE__ */ jsxRuntime.jsx(Portal$3, {
27548
- children: /* @__PURE__ */ jsxRuntime.jsx(Overlay, {
27549
- ...{
27550
- className: "mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h"
27551
- },
27552
- children: /* @__PURE__ */ jsxRuntime.jsxs(Content$1, {
27553
- ...{},
27554
- style: x2 && y2 ? {
27555
- position: "fixed",
27556
- top: y2,
27557
- left: x2
27558
- } : {},
27725
+ const FilterModal = () => {
27726
+ const {
27727
+ refs,
27728
+ floatingStyles
27729
+ } = useFloating({
27730
+ placement: "right-start",
27731
+ strategy: "fixed",
27732
+ open,
27733
+ middleware: [offset$1({
27734
+ mainAxis: 3,
27735
+ crossAxis: 3
27736
+ }), flip({
27737
+ boundary: document.body
27738
+ })]
27739
+ });
27740
+ return /* @__PURE__ */ jsxRuntime.jsx(Root$2, {
27741
+ open,
27742
+ onOpenChange: setOpen,
27743
+ children: /* @__PURE__ */ jsxRuntime.jsxs(Portal$3, {
27744
+ children: [/* @__PURE__ */ jsxRuntime.jsx(Overlay, {
27745
+ ...{
27746
+ className: "mly5uxqc1 mlyixxii4 mly13vifvy mlyu96u03 mly3m8u43 mly1ey2m1c mlyrvj5dj mly1ku5rj1 mly11uqc5h"
27747
+ },
27748
+ children: /* @__PURE__ */ jsxRuntime.jsx("div", {
27749
+ style: {
27750
+ position: "fixed",
27751
+ left: x2,
27752
+ top: y2
27753
+ },
27754
+ ref: refs.setReference
27755
+ })
27756
+ }), /* @__PURE__ */ jsxRuntime.jsxs(Content$1, {
27757
+ ...{
27758
+ className: "mly11uqc5h"
27759
+ },
27760
+ style: floatingStyles,
27761
+ ref: refs.setFloating,
27559
27762
  children: [/* @__PURE__ */ jsxRuntime.jsx(Title, {
27560
27763
  ...{
27561
27764
  className: "mly1s85apg"
@@ -27573,10 +27776,10 @@ function useFilterModal({
27573
27776
  setFilter: (filter2) => setFilter(filter2),
27574
27777
  setOpen
27575
27778
  })]
27576
- })
27779
+ })]
27577
27780
  })
27578
- })
27579
- });
27781
+ });
27782
+ };
27580
27783
  return {
27581
27784
  openFilterModal,
27582
27785
  FilterModal
@@ -27610,26 +27813,22 @@ function getDefaultFilter(fieldInfo) {
27610
27813
  return {
27611
27814
  kind: "date",
27612
27815
  parsed: {
27613
- operator: "after",
27614
- after: createTemporalDefault()
27816
+ operator: "last",
27817
+ n: "7",
27818
+ units: "day"
27615
27819
  }
27616
27820
  };
27617
27821
  } else {
27618
27822
  return {
27619
27823
  kind: "timestamp",
27620
27824
  parsed: {
27621
- operator: "after",
27622
- after: createTemporalDefault()
27825
+ operator: "last",
27826
+ n: "7",
27827
+ units: "day"
27623
27828
  }
27624
27829
  };
27625
27830
  }
27626
27831
  }
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
27832
  function MalloyExplorerProvider({
27634
27833
  source,
27635
27834
  query,
@@ -27715,7 +27914,7 @@ function QueryActionBar({
27715
27914
  })]
27716
27915
  });
27717
27916
  }
27718
- const styles$g = {
27917
+ const styles$i = {
27719
27918
  labelWithIcon: {
27720
27919
  display: "mly78zum5",
27721
27920
  alignItems: "mly6s0dn4",
@@ -27813,6 +28012,10 @@ const hoverStyles = {
27813
28012
  display: "mly2b4tyj",
27814
28013
  flexShrink: "mly2lah0s",
27815
28014
  $$css: true
28015
+ },
28016
+ hoverOpen: {
28017
+ display: "mly3nfvp2",
28018
+ $$css: true
27816
28019
  }
27817
28020
  };
27818
28021
  function ClearButton({
@@ -27890,9 +28093,6 @@ function segmentNestNo(segment, name) {
27890
28093
  }
27891
28094
  function addGroupBy(rootQuery, segment, field, path, setQuery) {
27892
28095
  segment.addGroupBy(field.name, path);
27893
- if (!segmentHasLimit(segment)) {
27894
- segment.setLimit(1e3);
27895
- }
27896
28096
  setQuery == null ? void 0 : setQuery(rootQuery.build());
27897
28097
  }
27898
28098
  function getSegmentIfPresent(parent) {
@@ -27995,32 +28195,32 @@ function BadgeForField({
27995
28195
  label: "view",
27996
28196
  icon: "view_filled",
27997
28197
  color: "purple",
27998
- customStyle: styles$f.noBackground
28198
+ customStyle: styles$h.noBackground
27999
28199
  });
28000
28200
  } else if (field.kind === "dimension") {
28001
28201
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
28002
28202
  label: "dimension",
28003
28203
  icon: "dimension",
28004
28204
  color: "cyan",
28005
- customStyle: styles$f.noBackground
28205
+ customStyle: styles$h.noBackground
28006
28206
  });
28007
28207
  } else if (field.kind === "measure") {
28008
28208
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
28009
28209
  label: "measure",
28010
28210
  icon: "measure",
28011
28211
  color: "green",
28012
- customStyle: styles$f.noBackground
28212
+ customStyle: styles$h.noBackground
28013
28213
  });
28014
28214
  } else if (field.kind === "join") {
28015
28215
  return /* @__PURE__ */ jsxRuntime.jsx(Badge, {
28016
28216
  label: "join",
28017
28217
  icon: "many_to_one",
28018
28218
  color: "gray",
28019
- customStyle: styles$f.noBackground
28219
+ customStyle: styles$h.noBackground
28020
28220
  });
28021
28221
  }
28022
28222
  }
28023
- const styles$f = {
28223
+ const styles$h = {
28024
28224
  noBackground: {
28025
28225
  backgroundColor: "mlyjbqb8w",
28026
28226
  $$css: true
@@ -28064,7 +28264,7 @@ function Visualization$1({
28064
28264
  onClick: () => setRenderer(viz)
28065
28265
  }));
28066
28266
  const tokens2 = [/* @__PURE__ */ jsxRuntime.jsx(SelectorToken, {
28067
- customStyle: styles$e.first,
28267
+ customStyle: styles$g.first,
28068
28268
  icon: `viz_${currentRenderer}`,
28069
28269
  value: currentRenderer,
28070
28270
  items: vizes,
@@ -28074,7 +28274,7 @@ function Visualization$1({
28074
28274
  children: tokens2
28075
28275
  });
28076
28276
  }
28077
- const styles$e = {
28277
+ const styles$g = {
28078
28278
  first: {
28079
28279
  flexGrow: "mly1iyjqo2",
28080
28280
  justifyContent: "mlylqzeqv",
@@ -28103,7 +28303,7 @@ function ViewAttributeTable({
28103
28303
  }) {
28104
28304
  const dimensions = viewInfo.schema.fields.filter((f2) => f2.kind === "dimension");
28105
28305
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
28106
- ..._stylex.props(styles$d.attributeTableContainer, style),
28306
+ ..._stylex.props(styles$f.attributeTableContainer, style),
28107
28307
  children: /* @__PURE__ */ jsxRuntime.jsx(ScrollableArea, {
28108
28308
  children: /* @__PURE__ */ jsxRuntime.jsx("table", {
28109
28309
  ...{
@@ -28143,9 +28343,9 @@ function ViewAttributeTableRow({
28143
28343
  className: "mlydpxx8g"
28144
28344
  },
28145
28345
  children: [/* @__PURE__ */ jsxRuntime.jsx("td", {
28146
- ..._stylex.props(styles$d.attributeTableKeyCell, fontStyles.supporting),
28346
+ ..._stylex.props(styles$f.attributeTableKeyCell, fontStyles.supporting),
28147
28347
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
28148
- ..._stylex.props(styles$d.attributeTableKeyCellContent, fontStyles.supporting),
28348
+ ..._stylex.props(styles$f.attributeTableKeyCellContent, fontStyles.supporting),
28149
28349
  children: attribute
28150
28350
  })
28151
28351
  }), /* @__PURE__ */ jsxRuntime.jsx("td", {
@@ -28156,7 +28356,7 @@ function ViewAttributeTableRow({
28156
28356
  })]
28157
28357
  });
28158
28358
  }
28159
- const styles$d = {
28359
+ const styles$f = {
28160
28360
  attributeTableContainer: {
28161
28361
  padding: "mlye8ttls",
28162
28362
  paddingInline: null,
@@ -28312,7 +28512,7 @@ function HoverText({
28312
28512
  asChild: true,
28313
28513
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
28314
28514
  ref: textRef,
28315
- ..._stylex.props(styles$c.text, fontStyles.supporting),
28515
+ ..._stylex.props(styles$e.text, fontStyles.supporting),
28316
28516
  children: text2
28317
28517
  })
28318
28518
  }), /* @__PURE__ */ jsxRuntime.jsx(Portal$4, {
@@ -28320,7 +28520,7 @@ function HoverText({
28320
28520
  side,
28321
28521
  align,
28322
28522
  children: /* @__PURE__ */ jsxRuntime.jsx("pre", {
28323
- ..._stylex.props(styles$c.hoverText, fontStyles.tooltipText),
28523
+ ..._stylex.props(styles$e.hoverText, fontStyles.tooltipText),
28324
28524
  children: text2
28325
28525
  })
28326
28526
  })
@@ -28329,7 +28529,7 @@ function HoverText({
28329
28529
  })
28330
28530
  });
28331
28531
  }
28332
- const styles$c = {
28532
+ const styles$e = {
28333
28533
  text: {
28334
28534
  whiteSpace: "mlyuxw1ft",
28335
28535
  textOverflow: "mlylyipyv",
@@ -28391,7 +28591,7 @@ function FieldHoverCard({
28391
28591
  details = /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
28392
28592
  viewInfo: field,
28393
28593
  isCompact: true,
28394
- style: styles$b.viewAttributeTable
28594
+ style: styles$d.viewAttributeTable
28395
28595
  });
28396
28596
  } else if (field.kind === "dimension") {
28397
28597
  details = /* @__PURE__ */ jsxRuntime.jsx(TopValuesTable, {
@@ -28400,7 +28600,7 @@ function FieldHoverCard({
28400
28600
  });
28401
28601
  }
28402
28602
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
28403
- ..._stylex.props(styles$b.container, fontStyles.body),
28603
+ ..._stylex.props(styles$d.container, fontStyles.body),
28404
28604
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
28405
28605
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
28406
28606
  ...{
@@ -28410,7 +28610,7 @@ function FieldHoverCard({
28410
28610
  field
28411
28611
  })
28412
28612
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
28413
- ..._stylex.props(fontStyles.supporting, styles$b.path),
28613
+ ..._stylex.props(fontStyles.supporting, styles$d.path),
28414
28614
  children: pathString
28415
28615
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
28416
28616
  ..._stylex.props(fontStyles.emphasized),
@@ -28424,7 +28624,7 @@ function FieldHoverCard({
28424
28624
  })]
28425
28625
  });
28426
28626
  }
28427
- const styles$b = {
28627
+ const styles$d = {
28428
28628
  container: {
28429
28629
  width: "mlybl57os",
28430
28630
  maxHeight: "mly1t2cwa7",
@@ -28501,14 +28701,14 @@ function FieldList({
28501
28701
  children: groups.length ? groups.map((group) => /* @__PURE__ */ jsxRuntime.jsxs("div", {
28502
28702
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
28503
28703
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
28504
- ..._stylex.props(addMenuStyles.item, styles$a.fieldItem),
28704
+ ..._stylex.props(addMenuStyles.item, styles$c.fieldItem),
28505
28705
  "data-disabled": "true",
28506
28706
  children: group.name
28507
28707
  })
28508
28708
  }), group.fields.map((field) => /* @__PURE__ */ jsxRuntime.jsx("div", {
28509
28709
  role: "menuitem",
28510
28710
  tabIndex: -1,
28511
- ..._stylex.props(addMenuStyles.item, styles$a.fieldItem),
28711
+ ..._stylex.props(addMenuStyles.item, styles$c.fieldItem),
28512
28712
  children: /* @__PURE__ */ jsxRuntime.jsx(FieldToken, {
28513
28713
  field,
28514
28714
  onClick: (event) => onClick(field, group.path, event),
@@ -28531,7 +28731,7 @@ function FieldList({
28531
28731
  })
28532
28732
  });
28533
28733
  }
28534
- const styles$a = {
28734
+ const styles$c = {
28535
28735
  fieldItem: {
28536
28736
  height: "mly1qx5ct2",
28537
28737
  paddingTop: "mly1y1aw1k",
@@ -28583,13 +28783,15 @@ function OperationActionTitle({
28583
28783
  types: types2,
28584
28784
  onClick
28585
28785
  }) {
28786
+ const [isMenuOpen, setIsMenuOpen] = React__namespace.useState(false);
28586
28787
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
28587
- ..._stylex.props(styles$g.title, hoverStyles.main),
28788
+ ..._stylex.props(styles$i.title, hoverStyles.main),
28588
28789
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
28589
28790
  children: title
28590
28791
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
28591
- ..._stylex.props(hoverStyles.hoverActions),
28792
+ ..._stylex.props(hoverStyles.hoverActions, isMenuOpen ? hoverStyles.hoverOpen : void 0),
28592
28793
  children: /* @__PURE__ */ jsxRuntime.jsxs(Root2$2, {
28794
+ onOpenChange: setIsMenuOpen,
28593
28795
  children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$2, {
28594
28796
  asChild: true,
28595
28797
  children: /* @__PURE__ */ jsxRuntime.jsx("div", {
@@ -28666,7 +28868,7 @@ function GroupByOperations({
28666
28868
  addGroupBy(rootQuery, segment, field, path, setQuery);
28667
28869
  }
28668
28870
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
28669
- ..._stylex.props(styles$g.tokenContainer),
28871
+ ..._stylex.props(styles$i.tokenContainer),
28670
28872
  children: groupBys.map((groupBy) => {
28671
28873
  const fieldInfo = groupBy.getFieldInfo();
28672
28874
  const path = groupBy.field.getReference().path ?? [];
@@ -28756,10 +28958,10 @@ function FilterOperations({
28756
28958
  }
28757
28959
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
28758
28960
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
28759
- ..._stylex.props(styles$g.title),
28961
+ ..._stylex.props(styles$i.title),
28760
28962
  children: "filter by"
28761
28963
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
28762
- ..._stylex.props(styles$g.tokenContainer),
28964
+ ..._stylex.props(styles$i.tokenContainer),
28763
28965
  children: filters.map((filterOperation, key2) => {
28764
28966
  return /* @__PURE__ */ jsxRuntime.jsx(ErrorElement, {
28765
28967
  fallback: /* @__PURE__ */ jsxRuntime.jsxs("div", {
@@ -29017,7 +29219,7 @@ function LimitOperation({
29017
29219
  }
29018
29220
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
29019
29221
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
29020
- ..._stylex.props(styles$g.title),
29222
+ ..._stylex.props(styles$i.title),
29021
29223
  children: "limit"
29022
29224
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
29023
29225
  ..._stylex.props(hoverStyles.main),
@@ -29069,7 +29271,7 @@ function AggregateOperations({
29069
29271
  setQuery == null ? void 0 : setQuery(rootQuery.build());
29070
29272
  }
29071
29273
  }), " ", /* @__PURE__ */ jsxRuntime.jsx("div", {
29072
- ..._stylex.props(styles$g.tokenContainer),
29274
+ ..._stylex.props(styles$i.tokenContainer),
29073
29275
  children: aggregates.map((aggregate) => {
29074
29276
  const fieldInfo = aggregate.getFieldInfo();
29075
29277
  const path = aggregate.field.getReference().path ?? [];
@@ -29110,10 +29312,10 @@ function OrderByOperations({
29110
29312
  }
29111
29313
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
29112
29314
  children: [/* @__PURE__ */ jsxRuntime.jsx("div", {
29113
- ..._stylex.props(styles$g.title),
29315
+ ..._stylex.props(styles$i.title),
29114
29316
  children: "order by"
29115
29317
  }), /* @__PURE__ */ jsxRuntime.jsx("div", {
29116
- ..._stylex.props(styles$g.tokenContainer),
29318
+ ..._stylex.props(styles$i.tokenContainer),
29117
29319
  children: orderBys.map((orderBy) => {
29118
29320
  const {
29119
29321
  fieldReference
@@ -29196,16 +29398,21 @@ function CollapsiblePanel({
29196
29398
  },
29197
29399
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
29198
29400
  ...{
29199
- className: "mly78zum5 mly1qughib mlyfawy5m mly167g77z mly6s0dn4"
29401
+ className: "mlyrvj5dj mly1mt1orb mly52fmzj mlylqzeqv mlyfawy5m mly167g77z mly6s0dn4"
29200
29402
  },
29201
- children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
29202
- name: icon,
29203
- customStyle: styles$9.icon
29204
- }), /* @__PURE__ */ jsxRuntime.jsx("div", {
29403
+ children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
29205
29404
  ...{
29206
- className: "mlyuxw1ft mlyehqz9p mly1ghz6dp mly1iyjqo2"
29405
+ className: "mlyrvj5dj mly1mt1orb mlylqzeqv mly6s0dn4 mly167g77z"
29207
29406
  },
29208
- children: title
29407
+ children: [icon && /* @__PURE__ */ jsxRuntime.jsx(Icon, {
29408
+ name: icon,
29409
+ customStyle: styles$b.icon
29410
+ }), /* @__PURE__ */ jsxRuntime.jsx("div", {
29411
+ ...{
29412
+ className: "mlyuxw1ft mlyb3r6kr mlylyipyv mlyehqz9p mly1ghz6dp"
29413
+ },
29414
+ children: title
29415
+ })]
29209
29416
  }), /* @__PURE__ */ jsxRuntime.jsxs("div", {
29210
29417
  ...{
29211
29418
  className: "mly78zum5"
@@ -29236,7 +29443,7 @@ function CollapsiblePanel({
29236
29443
  })]
29237
29444
  });
29238
29445
  }
29239
- const styles$9 = {
29446
+ const styles$b = {
29240
29447
  icon: {
29241
29448
  $$css: true
29242
29449
  }
@@ -29336,7 +29543,7 @@ function AddFieldItem({
29336
29543
  const trigger = /* @__PURE__ */ jsxRuntime.jsxs("div", {
29337
29544
  role: "menuitem",
29338
29545
  tabIndex: -1,
29339
- ..._stylex.props(addMenuStyles.item, addMenuStyles.clickable),
29546
+ ..._stylex.props(addMenuStyles.item, addMenuStyles.clickable, open ? styles$a.open : null),
29340
29547
  "data-disabled": disabled ? "true" : void 0,
29341
29548
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
29342
29549
  ..._stylex.props(addMenuStyles.label),
@@ -29371,7 +29578,6 @@ function AddFieldItem({
29371
29578
  children: [/* @__PURE__ */ jsxRuntime.jsx(Trigger$2, {
29372
29579
  asChild: true,
29373
29580
  disabled,
29374
- onMouseEnter: () => setOpen(true),
29375
29581
  children: trigger
29376
29582
  }), /* @__PURE__ */ jsxRuntime.jsx(Portal$1, {
29377
29583
  children: /* @__PURE__ */ jsxRuntime.jsxs(Content2$2, {
@@ -29392,6 +29598,22 @@ function AddFieldItem({
29392
29598
  })]
29393
29599
  });
29394
29600
  }
29601
+ const styles$a = {
29602
+ open: {
29603
+ background: "mly1p5yd3t",
29604
+ backgroundAttachment: null,
29605
+ backgroundClip: null,
29606
+ backgroundColor: null,
29607
+ backgroundImage: null,
29608
+ backgroundOrigin: null,
29609
+ backgroundPosition: null,
29610
+ backgroundPositionX: null,
29611
+ backgroundPositionY: null,
29612
+ backgroundRepeat: null,
29613
+ backgroundSize: null,
29614
+ $$css: true
29615
+ }
29616
+ };
29395
29617
  function AddOrderBy({
29396
29618
  rootQuery,
29397
29619
  view
@@ -29580,9 +29802,6 @@ function AddMenu({
29580
29802
  const segment = view.getOrAddDefaultSegment();
29581
29803
  if (field.kind === "dimension") {
29582
29804
  segment.addGroupBy(field.name, path);
29583
- if (!segmentHasLimit(segment)) {
29584
- segment.setLimit(1e3);
29585
- }
29586
29805
  } else if (field.kind === "measure") {
29587
29806
  segment.addAggregate(field.name, path);
29588
29807
  } else {
@@ -29656,8 +29875,9 @@ function NestOperations({
29656
29875
  return null;
29657
29876
  }
29658
29877
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
29659
- ..._stylex.props(styles$g.tokenContainer),
29878
+ ..._stylex.props(styles$i.tokenContainer),
29660
29879
  children: nests.map((nest) => {
29880
+ const defaultOpen = nest.view.definition.node.kind === "segment" && nest.view.definition.node.operations.length === 0;
29661
29881
  return /* @__PURE__ */ jsxRuntime.jsx("div", {
29662
29882
  ...{
29663
29883
  className: "mlyj3b58b mly1yf7rl7 mly1xmf6yo mlyh8yej3"
@@ -29665,7 +29885,7 @@ function NestOperations({
29665
29885
  children: /* @__PURE__ */ jsxRuntime.jsx(CollapsiblePanel, {
29666
29886
  title: nest.name,
29667
29887
  icon: "nest",
29668
- defaultOpen: false,
29888
+ defaultOpen,
29669
29889
  controls: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, {
29670
29890
  children: [/* @__PURE__ */ jsxRuntime.jsx(DropdownMenu, {
29671
29891
  trigger: /* @__PURE__ */ jsxRuntime.jsx(Button, {
@@ -29826,11 +30046,11 @@ function CollapsingView({
29826
30046
  })]
29827
30047
  }), !collapsed && /* @__PURE__ */ jsxRuntime.jsx(ViewAttributeTable, {
29828
30048
  viewInfo: viewDef.getViewInfo(),
29829
- style: styles$8.preview
30049
+ style: styles$9.preview
29830
30050
  })]
29831
30051
  });
29832
30052
  }
29833
- const styles$8 = {
30053
+ const styles$9 = {
29834
30054
  preview: {
29835
30055
  height: "mlyt7dq6l",
29836
30056
  maxHeight: "mly1hkcv85",
@@ -29934,9 +30154,9 @@ function Source({
29934
30154
  } = React.useContext(ExplorerPanelsContext);
29935
30155
  if (!(isSourcePanelOpen && setIsSourcePanelOpen) && rootQuery.definition instanceof QB.ASTArrowQueryDefinition) {
29936
30156
  return /* @__PURE__ */ jsxRuntime.jsxs("div", {
29937
- ..._stylex.props(styles$g.queryCard, styles$7.flex),
30157
+ ..._stylex.props(styles$i.queryCard, styles$8.flex),
29938
30158
  children: [/* @__PURE__ */ jsxRuntime.jsxs("div", {
29939
- ..._stylex.props(styles$g.labelWithIcon),
30159
+ ..._stylex.props(styles$i.labelWithIcon),
29940
30160
  children: [/* @__PURE__ */ jsxRuntime.jsx(Icon, {
29941
30161
  name: "database"
29942
30162
  }), rootQuery.definition.as.ArrowQueryDefinition().source.as.ReferenceQueryArrowSource().name]
@@ -29949,7 +30169,7 @@ function Source({
29949
30169
  }
29950
30170
  return null;
29951
30171
  }
29952
- const styles$7 = {
30172
+ const styles$8 = {
29953
30173
  flex: {
29954
30174
  display: "mly78zum5",
29955
30175
  justifyContent: "mly1qughib",
@@ -30013,6 +30233,12 @@ function LiteralValueEditor({
30013
30233
  granularity: "second"
30014
30234
  })
30015
30235
  });
30236
+ case "filter_expression_literal":
30237
+ return /* @__PURE__ */ jsxRuntime.jsx(EditableToken, {
30238
+ value: value.filter_expression_value,
30239
+ onChange: (value2) => setValue(value2),
30240
+ customStyle
30241
+ });
30016
30242
  }
30017
30243
  }
30018
30244
  function Parameters({
@@ -30036,6 +30262,7 @@ function Parameters({
30036
30262
  children: sourceParameters.map((parameter) => {
30037
30263
  var _a2;
30038
30264
  return /* @__PURE__ */ jsxRuntime.jsxs(TokenGroup, {
30265
+ customStyle: styles$7.tokenGroup,
30039
30266
  children: [/* @__PURE__ */ jsxRuntime.jsx(Token, {
30040
30267
  icon: atomicTypeToIcon(parameter.type.kind),
30041
30268
  label: parameter.name
@@ -30053,6 +30280,12 @@ function Parameters({
30053
30280
  }
30054
30281
  return null;
30055
30282
  }
30283
+ const styles$7 = {
30284
+ tokenGroup: {
30285
+ display: "mly78zum5",
30286
+ $$css: true
30287
+ }
30288
+ };
30056
30289
  function QueryEditor() {
30057
30290
  const {
30058
30291
  rootQuery,