@sanity/vision 6.3.1-next.6 → 6.4.0-next.17
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.
|
@@ -951,7 +951,7 @@ function QueryRecall(t0) {
|
|
|
951
951
|
handleSave();
|
|
952
952
|
}, $[75] = handleSave, $[76] = t18) : t18 = $[76];
|
|
953
953
|
let t19;
|
|
954
|
-
$[77] !== saving || $[78] !== t172 || $[79] !== t18 ? (t19 = /* @__PURE__ */ jsx(Button, { label: t172, icon: AddIcon, disabled: saving, onClick: t18, mode: "bleed" }), $[77] = saving, $[78] = t172, $[79] = t18, $[80] = t19) : t19 = $[80];
|
|
954
|
+
$[77] !== saving || $[78] !== t172 || $[79] !== t18 ? (t19 = /* @__PURE__ */ jsx(Button, { "aria-label": t172, icon: AddIcon, disabled: saving, onClick: t18, mode: "bleed" }), $[77] = saving, $[78] = t172, $[79] = t18, $[80] = t19) : t19 = $[80];
|
|
955
955
|
let t20;
|
|
956
956
|
$[81] !== t162 || $[82] !== t19 ? (t20 = /* @__PURE__ */ jsxs(Flex, { padding: 3, paddingTop: 2, paddingBottom: 0, justify: "space-between", align: "center", children: [
|
|
957
957
|
t162,
|
|
@@ -995,7 +995,7 @@ function QueryRecall(t0) {
|
|
|
995
995
|
t36
|
|
996
996
|
] }), $[112] = t20, $[113] = t23, $[114] = t36, $[115] = t14) : t14 = $[115], T0 = Stack, t11 = "vision-query-recall-list", t12 = 3, t13 = filteredQueries?.map((q_5, index) => {
|
|
997
997
|
const queryObj = getStateFromUrl(q_5.url), fullQueryPreview = queryObj?.query || "", shortQueryPreview = fullQueryPreview.split("{")[0], isSelected = selectedUrl === q_5.url, canMutateQuery = !q_5.shared || q_5.isOwnedByCurrentUser, areQueriesEqual = queryObj && currentQuery === queryObj.query && isEqual(currentParams, queryObj.params), isEdited = isSelected && !areQueriesEqual && canMutateQuery;
|
|
998
|
-
return /* @__PURE__ */ jsx(Card, {
|
|
998
|
+
return /* @__PURE__ */ jsx(Card, { paddingX: compactMode ? 3 : 4, paddingY: compactMode ? 3 : 4, tone: "default", onClick: (event_0) => {
|
|
999
999
|
if (event_0.target?.closest('[data-query-actions="true"]'))
|
|
1000
1000
|
return;
|
|
1001
1001
|
setSelectedUrl(q_5.url);
|
|
@@ -1059,7 +1059,7 @@ function QueryRecall(t0) {
|
|
|
1059
1059
|
maxWidth: "420px",
|
|
1060
1060
|
maxHeight: "220px",
|
|
1061
1061
|
overflow: "auto"
|
|
1062
|
-
}, children: /* @__PURE__ */ jsx(Code, { size: 1, children: fullQueryPreview }) }), placement: "top", portal: !0, children: /* @__PURE__ */ jsx(Code, {
|
|
1062
|
+
}, children: /* @__PURE__ */ jsx(Code, { size: 1, children: fullQueryPreview }) }), placement: "top", portal: !0, children: /* @__PURE__ */ jsx(Code, { size: 1, children: shortQueryPreview }) }) : /* @__PURE__ */ jsx(Code, {}),
|
|
1063
1063
|
compactMode ? /* @__PURE__ */ jsxs(Stack, { space: 1, style: {
|
|
1064
1064
|
paddingTop: 0,
|
|
1065
1065
|
minHeight: "30px"
|
|
@@ -1112,7 +1112,7 @@ function QueryRecall(t0) {
|
|
|
1112
1112
|
/* @__PURE__ */ jsx(Text, { size: 1, muted: !0, children: "\u2022" }),
|
|
1113
1113
|
/* @__PURE__ */ jsx(Text, { size: 1, muted: !0, children: formatDate.format(new Date(q_5.savedAt || "")) })
|
|
1114
1114
|
] }),
|
|
1115
|
-
isEdited && /* @__PURE__ */ jsx(Button, { mode: "ghost", tone: "default",
|
|
1115
|
+
isEdited && /* @__PURE__ */ jsx(Button, { mode: "ghost", tone: "default", padding: 2, style: {
|
|
1116
1116
|
height: "24px",
|
|
1117
1117
|
position: "absolute",
|
|
1118
1118
|
right: "16px",
|
|
@@ -1128,7 +1128,7 @@ function QueryRecall(t0) {
|
|
|
1128
1128
|
let t15;
|
|
1129
1129
|
$[116] !== T0 || $[117] !== t11 || $[118] !== t12 || $[119] !== t13 ? (t15 = /* @__PURE__ */ jsx(T0, { id: t11, paddingY: t12, children: t13 }), $[116] = T0, $[117] = t11, $[118] = t12, $[119] = t13, $[120] = t15) : t15 = $[120];
|
|
1130
1130
|
let t16;
|
|
1131
|
-
$[121] !== handleConfirmShareQuery || $[122] !== shareDialogQuery || $[123] !== t ? (t16 = shareDialogQuery && /* @__PURE__ */ jsx(Dialog, { id: "vision-query-recall-share-dialog", width: 1, header: t("label.share"), onClose: () => setShareDialogQuery(null), footer: /* @__PURE__ */ jsxs(Flex, {
|
|
1131
|
+
$[121] !== handleConfirmShareQuery || $[122] !== shareDialogQuery || $[123] !== t ? (t16 = shareDialogQuery && /* @__PURE__ */ jsx(Dialog, { id: "vision-query-recall-share-dialog", width: 1, header: t("label.share"), onClose: () => setShareDialogQuery(null), footer: /* @__PURE__ */ jsxs(Flex, { justify: "flex-end", gap: 3, padding: 3, align: "center", children: [
|
|
1132
1132
|
/* @__PURE__ */ jsx(Button, { mode: "bleed", padding: 2, text: t("action.query-cancel"), onClick: () => setShareDialogQuery(null) }),
|
|
1133
1133
|
/* @__PURE__ */ jsx(Button, { padding: 2, tone: "primary", text: t("action.save-shared-query"), onClick: () => {
|
|
1134
1134
|
handleConfirmShareQuery();
|
|
@@ -1647,20 +1647,22 @@ const numeric = /^\d+$/;
|
|
|
1647
1647
|
function isArrayKeyOverLimit(segment, limit = 10) {
|
|
1648
1648
|
return numeric.test(segment) && parseInt(segment, 10) > limit;
|
|
1649
1649
|
}
|
|
1650
|
-
function preventSave(evt) {
|
|
1651
|
-
return evt.preventDefault();
|
|
1652
|
-
}
|
|
1653
1650
|
function SaveCsvButton(t0) {
|
|
1654
|
-
const $ = c(
|
|
1651
|
+
const $ = c(7), {
|
|
1655
1652
|
blobUrl
|
|
1656
1653
|
} = t0, {
|
|
1657
1654
|
t
|
|
1658
|
-
} = useTranslation(visionLocaleNamespace)
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1655
|
+
} = useTranslation(visionLocaleNamespace);
|
|
1656
|
+
if (!blobUrl) {
|
|
1657
|
+
let t12;
|
|
1658
|
+
$[0] !== t ? (t12 = t("result.save-result-as-csv.not-csv-encodable"), $[0] = t, $[1] = t12) : t12 = $[1];
|
|
1659
|
+
let t2;
|
|
1660
|
+
$[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx(Button, { disabled: !0, icon: DocumentSheetIcon, mode: "ghost", text: "CSV", tone: "default" }), $[2] = t2) : t2 = $[2];
|
|
1661
|
+
let t3;
|
|
1662
|
+
return $[3] !== t12 ? (t3 = /* @__PURE__ */ jsx(Tooltip, { content: t12, placement: "top", children: t2 }), $[3] = t12, $[4] = t3) : t3 = $[4], t3;
|
|
1663
|
+
}
|
|
1664
|
+
let t1;
|
|
1665
|
+
return $[5] !== blobUrl ? (t1 = /* @__PURE__ */ jsx(Button, { as: "a", download: "query-result.csv", href: blobUrl, icon: DocumentSheetIcon, mode: "ghost", text: "CSV", tone: "default" }), $[5] = blobUrl, $[6] = t1) : t1 = $[6], t1;
|
|
1664
1666
|
}
|
|
1665
1667
|
function SaveJsonButton(t0) {
|
|
1666
1668
|
const $ = c(2), {
|