@malloydata/malloy-explorer 0.0.305-dev250819202105 → 0.0.305-dev251220225448

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.
@@ -2865,7 +2865,7 @@ var VisuallyHidden$1 = React__namespace.forwardRef(
2865
2865
  );
2866
2866
  VisuallyHidden$1.displayName = NAME$1;
2867
2867
  var Root$4 = VisuallyHidden$1;
2868
- var [createTooltipContext, createTooltipScope] = createContextScope$1("Tooltip", [
2868
+ var [createTooltipContext] = createContextScope$1("Tooltip", [
2869
2869
  createPopperScope
2870
2870
  ]);
2871
2871
  var usePopperScope$3 = createPopperScope();
@@ -4227,7 +4227,7 @@ function useStateMachine$1(initialState, machine) {
4227
4227
  }, initialState);
4228
4228
  }
4229
4229
  var SCROLL_AREA_NAME = "ScrollArea";
4230
- var [createScrollAreaContext, createScrollAreaScope] = createContextScope$1(SCROLL_AREA_NAME);
4230
+ var [createScrollAreaContext] = createContextScope$1(SCROLL_AREA_NAME);
4231
4231
  var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
4232
4232
  var ScrollArea = React__namespace.forwardRef(
4233
4233
  (props2, forwardedRef) => {
@@ -6725,7 +6725,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
6725
6725
  var SELECTION_KEYS$1 = [" ", "Enter"];
6726
6726
  var SELECT_NAME = "Select";
6727
6727
  var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection$1(SELECT_NAME);
6728
- var [createSelectContext, createSelectScope] = createContextScope$1(SELECT_NAME, [
6728
+ var [createSelectContext] = createContextScope$1(SELECT_NAME, [
6729
6729
  createCollectionScope$3,
6730
6730
  createPopperScope
6731
6731
  ]);
@@ -23386,7 +23386,7 @@ hooks.HTML5_FMT = {
23386
23386
  // <input type="month" />
23387
23387
  };
23388
23388
  var POPOVER_NAME = "Popover";
23389
- var [createPopoverContext, createPopoverScope] = createContextScope$1(POPOVER_NAME, [
23389
+ var [createPopoverContext] = createContextScope$1(POPOVER_NAME, [
23390
23390
  createPopperScope
23391
23391
  ]);
23392
23392
  var usePopperScope$1 = createPopperScope();
@@ -25754,7 +25754,7 @@ var Arrow2 = MenuArrow;
25754
25754
  var SubTrigger = MenuSubTrigger;
25755
25755
  var SubContent = MenuSubContent;
25756
25756
  var DROPDOWN_MENU_NAME = "DropdownMenu";
25757
- var [createDropdownMenuContext, createDropdownMenuScope] = createContextScope$1(
25757
+ var [createDropdownMenuContext] = createContextScope$1(
25758
25758
  DROPDOWN_MENU_NAME,
25759
25759
  [createMenuScope]
25760
25760
  );
@@ -26408,6 +26408,7 @@ const atomicTypeMap = {
26408
26408
  record_type: "json",
26409
26409
  sql_native_type: "sql_native",
26410
26410
  timestamp_type: "date",
26411
+ timestamptz_type: "date",
26411
26412
  filter_expression_type: "filter"
26412
26413
  };
26413
26414
  const fieldKindMap = {
@@ -26431,7 +26432,7 @@ function FieldToken({
26431
26432
  }) {
26432
26433
  const [isHovered, setIsHovered] = React__namespace.useState(false);
26433
26434
  let label = field.name;
26434
- if (field.kind === "dimension" && (field.type.kind === "timestamp_type" || field.type.kind === "date_type")) {
26435
+ if (field.kind === "dimension" && (field.type.kind === "timestamp_type" || field.type.kind === "timestamptz_type" || field.type.kind === "date_type")) {
26435
26436
  if (field.type.timeframe) {
26436
26437
  label += `.${field.type.timeframe}`;
26437
26438
  }
@@ -30476,7 +30477,7 @@ const styles$x = {
30476
30477
  }
30477
30478
  };
30478
30479
  var DIALOG_NAME = "Dialog";
30479
- var [createDialogContext, createDialogScope] = createContextScope$1(DIALOG_NAME);
30480
+ var [createDialogContext] = createContextScope$1(DIALOG_NAME);
30480
30481
  var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
30481
30482
  var Dialog = (props2) => {
30482
30483
  const {
@@ -32017,7 +32018,7 @@ const dialogStyles = {
32017
32018
  alignItems: "mly6s0dn4",
32018
32019
  borderBottomWidth: "mlyso031l",
32019
32020
  borderBottomStyle: "mly1q0q8m5",
32020
- borderButtomColor: "mly7dvq3r",
32021
+ borderBottomColor: "mlybmeysy",
32021
32022
  lineHeight: "mly1rl49lg",
32022
32023
  $$css: true
32023
32024
  },
@@ -34267,7 +34268,7 @@ const findAxisFieldByType = (fields) => {
34267
34268
  return fields.find((field) => {
34268
34269
  if (field.kind === "dimension") {
34269
34270
  const dimension = field;
34270
- if (dimension.type.kind === "date_type" || dimension.type.kind === "timestamp_type") {
34271
+ if (dimension.type.kind === "date_type" || dimension.type.kind === "timestamp_type" || dimension.type.kind === "timestamptz_type") {
34271
34272
  return true;
34272
34273
  }
34273
34274
  }
@@ -34356,7 +34357,7 @@ function addGroupBy(view, field, path) {
34356
34357
  }
34357
34358
  if (type === "date_type") {
34358
34359
  segment.addDateGroupBy(field.name, path, "day");
34359
- } else if (type === "timestamp_type") {
34360
+ } else if (type === "timestamp_type" || type === "timestamptz_type") {
34360
34361
  segment.addTimestampGroupBy(field.name, path, "second");
34361
34362
  } else {
34362
34363
  segment.addGroupBy(field.name, path, rename);
@@ -34368,7 +34369,7 @@ function recomputePartitionByAndPrimaryAxis(segment) {
34368
34369
  const primaryAxis = getPrimaryAxisFromSchema(segment.getOutputSchema());
34369
34370
  const groupBys = segment.operations.items.filter((op) => op.kind === "group_by");
34370
34371
  const movingAverages = segment.operations.items.filter((op) => op.kind === "calculate" && op.expression.kind === "moving_average");
34371
- const canSmooth = primaryAxis !== null && (primaryAxis == null ? void 0 : primaryAxis.kind) === "dimension" && (primaryAxis.type.kind === "timestamp_type" || primaryAxis.type.kind === "date_type");
34372
+ const canSmooth = primaryAxis !== null && (primaryAxis == null ? void 0 : primaryAxis.kind) === "dimension" && (primaryAxis.type.kind === "timestamp_type" || primaryAxis.type.kind === "timestamptz_type" || primaryAxis.type.kind === "date_type");
34372
34373
  if (!canSmooth) {
34373
34374
  movingAverages.forEach((operation) => {
34374
34375
  operation.delete();
@@ -34691,7 +34692,7 @@ function SortableOperation({
34691
34692
  const primaryAxis = React.useMemo(() => {
34692
34693
  return getPrimaryAxis(view);
34693
34694
  }, [view]);
34694
- const canSmooth = operation.kind === "aggregate" && primaryAxis !== null && (primaryAxis == null ? void 0 : primaryAxis.kind) === "dimension" && (primaryAxis.type.kind === "timestamp_type" || primaryAxis.type.kind === "date_type");
34695
+ const canSmooth = operation.kind === "aggregate" && primaryAxis !== null && (primaryAxis == null ? void 0 : primaryAxis.kind) === "dimension" && (primaryAxis.type.kind === "timestamp_type" || primaryAxis.type.kind === "timestamptz_type" || primaryAxis.type.kind === "date_type");
34695
34696
  const enableSmoothing = React.useCallback((operation2) => {
34696
34697
  if (!canSmooth) {
34697
34698
  return;
@@ -34875,7 +34876,7 @@ function granularityMenuItems(fieldInfo, field) {
34875
34876
  if (!field || fieldInfo.kind !== "dimension" || !(field.expression instanceof malloyQueryBuilder.ASTTimeTruncationExpression)) {
34876
34877
  return null;
34877
34878
  }
34878
- if (fieldInfo.type.kind === "timestamp_type") {
34879
+ if (fieldInfo.type.kind === "timestamp_type" || fieldInfo.type.kind === "timestamptz_type") {
34879
34880
  return {
34880
34881
  value: fieldInfo.type.timeframe ?? "second",
34881
34882
  options: TimestampGranulation.map((value) => ({
@@ -35506,7 +35507,7 @@ function AddOrderBy({
35506
35507
  search
35507
35508
  });
35508
35509
  }
35509
- const ORDERABLE_TYPES$1 = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type"];
35510
+ const ORDERABLE_TYPES$1 = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type", "timestamptz_type"];
35510
35511
  function AddGroupBy({
35511
35512
  view,
35512
35513
  search
@@ -35584,7 +35585,7 @@ function AddWhere({
35584
35585
  search
35585
35586
  });
35586
35587
  }
35587
- const FILTERABLE_TYPES$1 = /* @__PURE__ */ new Set(["string_type", "boolean_type", "number_type", "date_type", "timestamp_type"]);
35588
+ const FILTERABLE_TYPES$1 = /* @__PURE__ */ new Set(["string_type", "boolean_type", "number_type", "date_type", "timestamp_type", "timestamptz_type"]);
35588
35589
  function AddView({
35589
35590
  view,
35590
35591
  search
@@ -36997,9 +36998,15 @@ function CodeEditor({
36997
36998
  onClick: () => {
36998
36999
  if (malloy2 && malloyToQuery && validStableQuery) {
36999
37000
  const {
37000
- query
37001
+ query,
37002
+ logs
37001
37003
  } = malloyToQuery(value);
37002
- setQuery(query);
37004
+ if (logs.length) {
37005
+ console.error(logs);
37006
+ }
37007
+ if (query) {
37008
+ setQuery(query);
37009
+ }
37003
37010
  }
37004
37011
  },
37005
37012
  disabled: !validStableQuery
@@ -37358,6 +37365,15 @@ function FilterLiteralEditor({
37358
37365
  };
37359
37366
  }
37360
37367
  break;
37368
+ case "timestamptz_type": {
37369
+ const {
37370
+ parsed
37371
+ } = malloyFilter.TemporalFilterExpression.parse(value.filter_expression_value);
37372
+ filter = {
37373
+ kind: "timestamptz",
37374
+ parsed
37375
+ };
37376
+ }
37361
37377
  }
37362
37378
  const {
37363
37379
  op,
@@ -37393,6 +37409,7 @@ function FilterLiteralEditor({
37393
37409
  break;
37394
37410
  case "date":
37395
37411
  case "timestamp":
37412
+ case "timestamptz":
37396
37413
  setValue({
37397
37414
  kind: "filter_expression_literal",
37398
37415
  filter_expression_value: malloyFilter.TemporalFilterExpression.unparse(parsed.parsed)
@@ -37718,7 +37735,7 @@ const styles$7 = {
37718
37735
  }
37719
37736
  };
37720
37737
  var TABS_NAME = "Tabs";
37721
- var [createTabsContext, createTabsScope] = createContextScope$1(TABS_NAME, [
37738
+ var [createTabsContext] = createContextScope$1(TABS_NAME, [
37722
37739
  createRovingFocusGroupScope
37723
37740
  ]);
37724
37741
  var useRovingFocusGroupScope = createRovingFocusGroupScope();
@@ -38664,13 +38681,13 @@ const styles$4 = {
38664
38681
  $$css: true
38665
38682
  }
38666
38683
  };
38667
- var Tab = /* @__PURE__ */ function(Tab2) {
38684
+ var Tab = /* @__PURE__ */ (function(Tab2) {
38668
38685
  Tab2["RESULTS"] = "Results";
38669
38686
  Tab2["MALLOY"] = "Malloy";
38670
38687
  Tab2["SQL"] = "SQL";
38671
38688
  Tab2["RAW_QUERY"] = "Raw Query";
38672
38689
  return Tab2;
38673
- }(Tab || {});
38690
+ })(Tab || {});
38674
38691
  function ResultPanel({
38675
38692
  source,
38676
38693
  draftQuery,
@@ -39692,7 +39709,7 @@ var VisuallyHidden = React__namespace.forwardRef(
39692
39709
  VisuallyHidden.displayName = NAME;
39693
39710
  var PROVIDER_NAME = "ToastProvider";
39694
39711
  var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
39695
- var [createToastContext, createToastScope] = createContextScope("Toast", [createCollectionScope]);
39712
+ var [createToastContext] = createContextScope("Toast", [createCollectionScope]);
39696
39713
  var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME);
39697
39714
  var ToastProvider = (props2) => {
39698
39715
  const {
@@ -40459,8 +40476,8 @@ function useOperations(view, field, path) {
40459
40476
  orderByDisabledReason
40460
40477
  };
40461
40478
  }
40462
- const FILTERABLE_TYPES = ["string_type", "boolean_type", "number_type", "date_type", "timestamp_type"];
40463
- const ORDERABLE_TYPES = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type"];
40479
+ const FILTERABLE_TYPES = ["string_type", "boolean_type", "number_type", "date_type", "timestamp_type", "timestamptz_type"];
40480
+ const ORDERABLE_TYPES = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type", "timestamptz_type"];
40464
40481
  function FieldTokenWithActions({
40465
40482
  rootQuery,
40466
40483
  field,