@malloydata/malloy-explorer 0.0.305-dev250819202105 → 0.0.327-dev251220232354
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/esm/index.js
CHANGED
|
@@ -2848,7 +2848,7 @@ var VisuallyHidden$1 = React.forwardRef(
|
|
|
2848
2848
|
);
|
|
2849
2849
|
VisuallyHidden$1.displayName = NAME$1;
|
|
2850
2850
|
var Root$4 = VisuallyHidden$1;
|
|
2851
|
-
var [createTooltipContext
|
|
2851
|
+
var [createTooltipContext] = createContextScope$1("Tooltip", [
|
|
2852
2852
|
createPopperScope
|
|
2853
2853
|
]);
|
|
2854
2854
|
var usePopperScope$3 = createPopperScope();
|
|
@@ -4210,7 +4210,7 @@ function useStateMachine$1(initialState, machine) {
|
|
|
4210
4210
|
}, initialState);
|
|
4211
4211
|
}
|
|
4212
4212
|
var SCROLL_AREA_NAME = "ScrollArea";
|
|
4213
|
-
var [createScrollAreaContext
|
|
4213
|
+
var [createScrollAreaContext] = createContextScope$1(SCROLL_AREA_NAME);
|
|
4214
4214
|
var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
4215
4215
|
var ScrollArea = React.forwardRef(
|
|
4216
4216
|
(props2, forwardedRef) => {
|
|
@@ -6708,7 +6708,7 @@ var OPEN_KEYS = [" ", "Enter", "ArrowUp", "ArrowDown"];
|
|
|
6708
6708
|
var SELECTION_KEYS$1 = [" ", "Enter"];
|
|
6709
6709
|
var SELECT_NAME = "Select";
|
|
6710
6710
|
var [Collection$3, useCollection$3, createCollectionScope$3] = createCollection$1(SELECT_NAME);
|
|
6711
|
-
var [createSelectContext
|
|
6711
|
+
var [createSelectContext] = createContextScope$1(SELECT_NAME, [
|
|
6712
6712
|
createCollectionScope$3,
|
|
6713
6713
|
createPopperScope
|
|
6714
6714
|
]);
|
|
@@ -23369,7 +23369,7 @@ hooks.HTML5_FMT = {
|
|
|
23369
23369
|
// <input type="month" />
|
|
23370
23370
|
};
|
|
23371
23371
|
var POPOVER_NAME = "Popover";
|
|
23372
|
-
var [createPopoverContext
|
|
23372
|
+
var [createPopoverContext] = createContextScope$1(POPOVER_NAME, [
|
|
23373
23373
|
createPopperScope
|
|
23374
23374
|
]);
|
|
23375
23375
|
var usePopperScope$1 = createPopperScope();
|
|
@@ -25737,7 +25737,7 @@ var Arrow2 = MenuArrow;
|
|
|
25737
25737
|
var SubTrigger = MenuSubTrigger;
|
|
25738
25738
|
var SubContent = MenuSubContent;
|
|
25739
25739
|
var DROPDOWN_MENU_NAME = "DropdownMenu";
|
|
25740
|
-
var [createDropdownMenuContext
|
|
25740
|
+
var [createDropdownMenuContext] = createContextScope$1(
|
|
25741
25741
|
DROPDOWN_MENU_NAME,
|
|
25742
25742
|
[createMenuScope]
|
|
25743
25743
|
);
|
|
@@ -26391,6 +26391,7 @@ const atomicTypeMap = {
|
|
|
26391
26391
|
record_type: "json",
|
|
26392
26392
|
sql_native_type: "sql_native",
|
|
26393
26393
|
timestamp_type: "date",
|
|
26394
|
+
timestamptz_type: "date",
|
|
26394
26395
|
filter_expression_type: "filter"
|
|
26395
26396
|
};
|
|
26396
26397
|
const fieldKindMap = {
|
|
@@ -26414,7 +26415,7 @@ function FieldToken({
|
|
|
26414
26415
|
}) {
|
|
26415
26416
|
const [isHovered, setIsHovered] = React.useState(false);
|
|
26416
26417
|
let label = field.name;
|
|
26417
|
-
if (field.kind === "dimension" && (field.type.kind === "timestamp_type" || field.type.kind === "date_type")) {
|
|
26418
|
+
if (field.kind === "dimension" && (field.type.kind === "timestamp_type" || field.type.kind === "timestamptz_type" || field.type.kind === "date_type")) {
|
|
26418
26419
|
if (field.type.timeframe) {
|
|
26419
26420
|
label += `.${field.type.timeframe}`;
|
|
26420
26421
|
}
|
|
@@ -30459,7 +30460,7 @@ const styles$x = {
|
|
|
30459
30460
|
}
|
|
30460
30461
|
};
|
|
30461
30462
|
var DIALOG_NAME = "Dialog";
|
|
30462
|
-
var [createDialogContext
|
|
30463
|
+
var [createDialogContext] = createContextScope$1(DIALOG_NAME);
|
|
30463
30464
|
var [DialogProvider, useDialogContext] = createDialogContext(DIALOG_NAME);
|
|
30464
30465
|
var Dialog = (props2) => {
|
|
30465
30466
|
const {
|
|
@@ -32000,7 +32001,7 @@ const dialogStyles = {
|
|
|
32000
32001
|
alignItems: "mly6s0dn4",
|
|
32001
32002
|
borderBottomWidth: "mlyso031l",
|
|
32002
32003
|
borderBottomStyle: "mly1q0q8m5",
|
|
32003
|
-
|
|
32004
|
+
borderBottomColor: "mlybmeysy",
|
|
32004
32005
|
lineHeight: "mly1rl49lg",
|
|
32005
32006
|
$$css: true
|
|
32006
32007
|
},
|
|
@@ -34250,7 +34251,7 @@ const findAxisFieldByType = (fields) => {
|
|
|
34250
34251
|
return fields.find((field) => {
|
|
34251
34252
|
if (field.kind === "dimension") {
|
|
34252
34253
|
const dimension = field;
|
|
34253
|
-
if (dimension.type.kind === "date_type" || dimension.type.kind === "timestamp_type") {
|
|
34254
|
+
if (dimension.type.kind === "date_type" || dimension.type.kind === "timestamp_type" || dimension.type.kind === "timestamptz_type") {
|
|
34254
34255
|
return true;
|
|
34255
34256
|
}
|
|
34256
34257
|
}
|
|
@@ -34339,7 +34340,7 @@ function addGroupBy(view, field, path) {
|
|
|
34339
34340
|
}
|
|
34340
34341
|
if (type === "date_type") {
|
|
34341
34342
|
segment.addDateGroupBy(field.name, path, "day");
|
|
34342
|
-
} else if (type === "timestamp_type") {
|
|
34343
|
+
} else if (type === "timestamp_type" || type === "timestamptz_type") {
|
|
34343
34344
|
segment.addTimestampGroupBy(field.name, path, "second");
|
|
34344
34345
|
} else {
|
|
34345
34346
|
segment.addGroupBy(field.name, path, rename);
|
|
@@ -34351,7 +34352,7 @@ function recomputePartitionByAndPrimaryAxis(segment) {
|
|
|
34351
34352
|
const primaryAxis = getPrimaryAxisFromSchema(segment.getOutputSchema());
|
|
34352
34353
|
const groupBys = segment.operations.items.filter((op) => op.kind === "group_by");
|
|
34353
34354
|
const movingAverages = segment.operations.items.filter((op) => op.kind === "calculate" && op.expression.kind === "moving_average");
|
|
34354
|
-
const canSmooth = primaryAxis !== null && (primaryAxis == null ? void 0 : primaryAxis.kind) === "dimension" && (primaryAxis.type.kind === "timestamp_type" || primaryAxis.type.kind === "date_type");
|
|
34355
|
+
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");
|
|
34355
34356
|
if (!canSmooth) {
|
|
34356
34357
|
movingAverages.forEach((operation) => {
|
|
34357
34358
|
operation.delete();
|
|
@@ -34674,7 +34675,7 @@ function SortableOperation({
|
|
|
34674
34675
|
const primaryAxis = useMemo(() => {
|
|
34675
34676
|
return getPrimaryAxis(view);
|
|
34676
34677
|
}, [view]);
|
|
34677
|
-
const canSmooth = operation.kind === "aggregate" && primaryAxis !== null && (primaryAxis == null ? void 0 : primaryAxis.kind) === "dimension" && (primaryAxis.type.kind === "timestamp_type" || primaryAxis.type.kind === "date_type");
|
|
34678
|
+
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");
|
|
34678
34679
|
const enableSmoothing = useCallback((operation2) => {
|
|
34679
34680
|
if (!canSmooth) {
|
|
34680
34681
|
return;
|
|
@@ -34858,7 +34859,7 @@ function granularityMenuItems(fieldInfo, field) {
|
|
|
34858
34859
|
if (!field || fieldInfo.kind !== "dimension" || !(field.expression instanceof ASTTimeTruncationExpression)) {
|
|
34859
34860
|
return null;
|
|
34860
34861
|
}
|
|
34861
|
-
if (fieldInfo.type.kind === "timestamp_type") {
|
|
34862
|
+
if (fieldInfo.type.kind === "timestamp_type" || fieldInfo.type.kind === "timestamptz_type") {
|
|
34862
34863
|
return {
|
|
34863
34864
|
value: fieldInfo.type.timeframe ?? "second",
|
|
34864
34865
|
options: TimestampGranulation.map((value) => ({
|
|
@@ -35489,7 +35490,7 @@ function AddOrderBy({
|
|
|
35489
35490
|
search
|
|
35490
35491
|
});
|
|
35491
35492
|
}
|
|
35492
|
-
const ORDERABLE_TYPES$1 = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type"];
|
|
35493
|
+
const ORDERABLE_TYPES$1 = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type", "timestamptz_type"];
|
|
35493
35494
|
function AddGroupBy({
|
|
35494
35495
|
view,
|
|
35495
35496
|
search
|
|
@@ -35567,7 +35568,7 @@ function AddWhere({
|
|
|
35567
35568
|
search
|
|
35568
35569
|
});
|
|
35569
35570
|
}
|
|
35570
|
-
const FILTERABLE_TYPES$1 = /* @__PURE__ */ new Set(["string_type", "boolean_type", "number_type", "date_type", "timestamp_type"]);
|
|
35571
|
+
const FILTERABLE_TYPES$1 = /* @__PURE__ */ new Set(["string_type", "boolean_type", "number_type", "date_type", "timestamp_type", "timestamptz_type"]);
|
|
35571
35572
|
function AddView({
|
|
35572
35573
|
view,
|
|
35573
35574
|
search
|
|
@@ -36980,9 +36981,15 @@ function CodeEditor({
|
|
|
36980
36981
|
onClick: () => {
|
|
36981
36982
|
if (malloy && malloyToQuery3 && validStableQuery) {
|
|
36982
36983
|
const {
|
|
36983
|
-
query
|
|
36984
|
+
query,
|
|
36985
|
+
logs
|
|
36984
36986
|
} = malloyToQuery3(value);
|
|
36985
|
-
|
|
36987
|
+
if (logs.length) {
|
|
36988
|
+
console.error(logs);
|
|
36989
|
+
}
|
|
36990
|
+
if (query) {
|
|
36991
|
+
setQuery(query);
|
|
36992
|
+
}
|
|
36986
36993
|
}
|
|
36987
36994
|
},
|
|
36988
36995
|
disabled: !validStableQuery
|
|
@@ -37341,6 +37348,15 @@ function FilterLiteralEditor({
|
|
|
37341
37348
|
};
|
|
37342
37349
|
}
|
|
37343
37350
|
break;
|
|
37351
|
+
case "timestamptz_type": {
|
|
37352
|
+
const {
|
|
37353
|
+
parsed
|
|
37354
|
+
} = TemporalFilterExpression.parse(value.filter_expression_value);
|
|
37355
|
+
filter = {
|
|
37356
|
+
kind: "timestamptz",
|
|
37357
|
+
parsed
|
|
37358
|
+
};
|
|
37359
|
+
}
|
|
37344
37360
|
}
|
|
37345
37361
|
const {
|
|
37346
37362
|
op,
|
|
@@ -37376,6 +37392,7 @@ function FilterLiteralEditor({
|
|
|
37376
37392
|
break;
|
|
37377
37393
|
case "date":
|
|
37378
37394
|
case "timestamp":
|
|
37395
|
+
case "timestamptz":
|
|
37379
37396
|
setValue({
|
|
37380
37397
|
kind: "filter_expression_literal",
|
|
37381
37398
|
filter_expression_value: TemporalFilterExpression.unparse(parsed.parsed)
|
|
@@ -37701,7 +37718,7 @@ const styles$7 = {
|
|
|
37701
37718
|
}
|
|
37702
37719
|
};
|
|
37703
37720
|
var TABS_NAME = "Tabs";
|
|
37704
|
-
var [createTabsContext
|
|
37721
|
+
var [createTabsContext] = createContextScope$1(TABS_NAME, [
|
|
37705
37722
|
createRovingFocusGroupScope
|
|
37706
37723
|
]);
|
|
37707
37724
|
var useRovingFocusGroupScope = createRovingFocusGroupScope();
|
|
@@ -38647,13 +38664,13 @@ const styles$4 = {
|
|
|
38647
38664
|
$$css: true
|
|
38648
38665
|
}
|
|
38649
38666
|
};
|
|
38650
|
-
var Tab = /* @__PURE__ */ function(Tab2) {
|
|
38667
|
+
var Tab = /* @__PURE__ */ (function(Tab2) {
|
|
38651
38668
|
Tab2["RESULTS"] = "Results";
|
|
38652
38669
|
Tab2["MALLOY"] = "Malloy";
|
|
38653
38670
|
Tab2["SQL"] = "SQL";
|
|
38654
38671
|
Tab2["RAW_QUERY"] = "Raw Query";
|
|
38655
38672
|
return Tab2;
|
|
38656
|
-
}(Tab || {});
|
|
38673
|
+
})(Tab || {});
|
|
38657
38674
|
function ResultPanel({
|
|
38658
38675
|
source,
|
|
38659
38676
|
draftQuery,
|
|
@@ -39675,7 +39692,7 @@ var VisuallyHidden = React.forwardRef(
|
|
|
39675
39692
|
VisuallyHidden.displayName = NAME;
|
|
39676
39693
|
var PROVIDER_NAME = "ToastProvider";
|
|
39677
39694
|
var [Collection, useCollection, createCollectionScope] = createCollection("Toast");
|
|
39678
|
-
var [createToastContext
|
|
39695
|
+
var [createToastContext] = createContextScope("Toast", [createCollectionScope]);
|
|
39679
39696
|
var [ToastProviderProvider, useToastProviderContext] = createToastContext(PROVIDER_NAME);
|
|
39680
39697
|
var ToastProvider = (props2) => {
|
|
39681
39698
|
const {
|
|
@@ -40442,8 +40459,8 @@ function useOperations(view, field, path) {
|
|
|
40442
40459
|
orderByDisabledReason
|
|
40443
40460
|
};
|
|
40444
40461
|
}
|
|
40445
|
-
const FILTERABLE_TYPES = ["string_type", "boolean_type", "number_type", "date_type", "timestamp_type"];
|
|
40446
|
-
const ORDERABLE_TYPES = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type"];
|
|
40462
|
+
const FILTERABLE_TYPES = ["string_type", "boolean_type", "number_type", "date_type", "timestamp_type", "timestamptz_type"];
|
|
40463
|
+
const ORDERABLE_TYPES = ["string_type", "number_type", "boolean_type", "date_type", "timestamp_type", "timestamptz_type"];
|
|
40447
40464
|
function FieldTokenWithActions({
|
|
40448
40465
|
rootQuery,
|
|
40449
40466
|
field,
|