@sanity/vision 6.11.1-next.6 → 6.12.0-next.25
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.
|
@@ -2133,123 +2133,119 @@ function SaveJsonButton(t0) {
|
|
|
2133
2133
|
}), $[0] = blobUrl, $[1] = t1), t1;
|
|
2134
2134
|
}
|
|
2135
2135
|
function VisionGuiResult(t0) {
|
|
2136
|
-
let $ = c(
|
|
2137
|
-
$[0]
|
|
2138
|
-
let
|
|
2139
|
-
$[
|
|
2140
|
-
let csvUrl = t3, t4 = error ? "critical" : "default", t5 = !!error, t6;
|
|
2141
|
-
$[6] === t ? t6 = $[7] : (t6 = t("result.label"), $[6] = t, $[7] = t6);
|
|
2142
|
-
let t7;
|
|
2143
|
-
$[8] === t6 ? t7 = $[9] : (t7 = /* @__PURE__ */ jsx(InputBackgroundContainer, { children: /* @__PURE__ */ jsx(Box, {
|
|
2136
|
+
let $ = c(77), { error, queryInProgress, queryResult, listenInProgress, listenMutations, dataset, queryTime, e2eTime, compactFooter: t1 } = t0, compactFooter = t1 !== void 0 && t1, { t } = useTranslation(visionLocaleNamespace), hasResult = !error && !queryInProgress && queryResult !== void 0, t2 = error ? "critical" : "default", t3 = !!error, t4;
|
|
2137
|
+
$[0] === t ? t4 = $[1] : (t4 = t("result.label"), $[0] = t, $[1] = t4);
|
|
2138
|
+
let t5;
|
|
2139
|
+
$[2] === t4 ? t5 = $[3] : (t5 = /* @__PURE__ */ jsx(InputBackgroundContainer, { children: /* @__PURE__ */ jsx(Box, {
|
|
2144
2140
|
marginLeft: 3,
|
|
2145
2141
|
children: /* @__PURE__ */ jsx(StyledLabel, {
|
|
2146
2142
|
muted: !0,
|
|
2147
|
-
children:
|
|
2143
|
+
children: t4
|
|
2148
2144
|
})
|
|
2149
|
-
}) }), $[
|
|
2150
|
-
let
|
|
2151
|
-
$[
|
|
2145
|
+
}) }), $[2] = t4, $[3] = t5);
|
|
2146
|
+
let t6;
|
|
2147
|
+
$[4] !== listenInProgress || $[5] !== listenMutations || $[6] !== queryInProgress ? (t6 = (queryInProgress || listenInProgress && listenMutations.length === 0) && /* @__PURE__ */ jsx(Box, {
|
|
2152
2148
|
marginTop: 3,
|
|
2153
2149
|
children: /* @__PURE__ */ jsx(DelayedSpinner, {})
|
|
2154
|
-
}), $[
|
|
2155
|
-
let
|
|
2156
|
-
$[
|
|
2157
|
-
let
|
|
2158
|
-
$[
|
|
2150
|
+
}), $[4] = listenInProgress, $[5] = listenMutations, $[6] = queryInProgress, $[7] = t6) : t6 = $[7];
|
|
2151
|
+
let t7;
|
|
2152
|
+
$[8] === error ? t7 = $[9] : (t7 = error && /* @__PURE__ */ jsx(QueryErrorDialog, { error }), $[8] = error, $[9] = t7);
|
|
2153
|
+
let t8;
|
|
2154
|
+
$[10] !== dataset || $[11] !== hasResult || $[12] !== queryResult ? (t8 = hasResult && /* @__PURE__ */ jsx(ResultView, {
|
|
2159
2155
|
data: queryResult,
|
|
2160
2156
|
datasetName: dataset
|
|
2161
|
-
}), $[
|
|
2162
|
-
let
|
|
2163
|
-
$[
|
|
2157
|
+
}), $[10] = dataset, $[11] = hasResult, $[12] = queryResult, $[13] = t8) : t8 = $[13];
|
|
2158
|
+
let t9;
|
|
2159
|
+
$[14] !== dataset || $[15] !== listenInProgress || $[16] !== listenMutations ? (t9 = listenInProgress && listenMutations.length > 0 && /* @__PURE__ */ jsx(ResultView, {
|
|
2164
2160
|
data: listenMutations,
|
|
2165
2161
|
datasetName: dataset
|
|
2166
|
-
}), $[
|
|
2167
|
-
let
|
|
2168
|
-
$[
|
|
2162
|
+
}), $[14] = dataset, $[15] = listenInProgress, $[16] = listenMutations, $[17] = t9) : t9 = $[17];
|
|
2163
|
+
let t10;
|
|
2164
|
+
$[18] !== t6 || $[19] !== t7 || $[20] !== t8 || $[21] !== t9 ? (t10 = /* @__PURE__ */ jsxs(Box, {
|
|
2169
2165
|
padding: 3,
|
|
2170
2166
|
paddingTop: 5,
|
|
2171
2167
|
children: [
|
|
2168
|
+
t6,
|
|
2169
|
+
t7,
|
|
2172
2170
|
t8,
|
|
2173
|
-
t9
|
|
2174
|
-
t10,
|
|
2175
|
-
t11
|
|
2171
|
+
t9
|
|
2176
2172
|
]
|
|
2177
|
-
}), $[
|
|
2178
|
-
let
|
|
2179
|
-
$[
|
|
2173
|
+
}), $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9, $[22] = t10) : t10 = $[22];
|
|
2174
|
+
let t11;
|
|
2175
|
+
$[23] !== t10 || $[24] !== t5 ? (t11 = /* @__PURE__ */ jsxs(Result, {
|
|
2180
2176
|
overflow: "auto",
|
|
2181
|
-
children: [
|
|
2182
|
-
}), $[
|
|
2183
|
-
let
|
|
2184
|
-
$[
|
|
2177
|
+
children: [t5, t10]
|
|
2178
|
+
}), $[23] = t10, $[24] = t5, $[25] = t11) : t11 = $[25];
|
|
2179
|
+
let t12;
|
|
2180
|
+
$[26] !== t11 || $[27] !== t2 || $[28] !== t3 ? (t12 = /* @__PURE__ */ jsx(ResultInnerContainer, {
|
|
2185
2181
|
flexBasis: "0%",
|
|
2186
2182
|
flexGrow: 1,
|
|
2187
2183
|
children: /* @__PURE__ */ jsx(ResultContainer, {
|
|
2188
2184
|
flex: 1,
|
|
2189
2185
|
overflow: "hidden",
|
|
2190
|
-
tone:
|
|
2191
|
-
isInvalid:
|
|
2192
|
-
children:
|
|
2186
|
+
tone: t2,
|
|
2187
|
+
isInvalid: t3,
|
|
2188
|
+
children: t11
|
|
2193
2189
|
})
|
|
2194
|
-
}), $[
|
|
2195
|
-
let
|
|
2196
|
-
$[
|
|
2190
|
+
}), $[26] = t11, $[27] = t2, $[28] = t3, $[29] = t12) : t12 = $[29];
|
|
2191
|
+
let t13 = compactFooter ? "flex-start" : "space-between", t14 = compactFooter ? "stretch" : void 0, t15;
|
|
2192
|
+
$[30] === compactFooter ? t15 = $[31] : (t15 = compactFooter ? "column" : [
|
|
2197
2193
|
"column",
|
|
2198
2194
|
"column",
|
|
2199
2195
|
"row"
|
|
2200
|
-
], $[
|
|
2201
|
-
let
|
|
2202
|
-
$[
|
|
2203
|
-
let
|
|
2204
|
-
$[
|
|
2205
|
-
let
|
|
2206
|
-
$[
|
|
2207
|
-
let
|
|
2208
|
-
$[
|
|
2196
|
+
], $[30] = compactFooter, $[31] = t15);
|
|
2197
|
+
let t16 = compactFooter ? 3 : 4, t17 = compactFooter ? 2 : 3, t18;
|
|
2198
|
+
$[32] === compactFooter ? t18 = $[33] : (t18 = compactFooter ? { width: "100%" } : { minWidth: 0 }, $[32] = compactFooter, $[33] = t18);
|
|
2199
|
+
let t19 = compactFooter ? 1 : 2, t20;
|
|
2200
|
+
$[34] === t ? t20 = $[35] : (t20 = t("result.execution-time-label"), $[34] = t, $[35] = t20);
|
|
2201
|
+
let t21;
|
|
2202
|
+
$[36] !== queryTime || $[37] !== t ? (t21 = typeof queryTime == "number" ? `${queryTime}ms` : t("result.timing-not-applicable"), $[36] = queryTime, $[37] = t, $[38] = t21) : t21 = $[38];
|
|
2203
|
+
let t22;
|
|
2204
|
+
$[39] !== t19 || $[40] !== t20 || $[41] !== t21 ? (t22 = /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text, {
|
|
2209
2205
|
muted: !0,
|
|
2210
|
-
size:
|
|
2206
|
+
size: t19,
|
|
2211
2207
|
children: [
|
|
2212
|
-
|
|
2208
|
+
t20,
|
|
2213
2209
|
":",
|
|
2214
2210
|
" ",
|
|
2215
|
-
|
|
2211
|
+
t21
|
|
2216
2212
|
]
|
|
2217
|
-
}) }), $[
|
|
2218
|
-
let
|
|
2219
|
-
$[
|
|
2220
|
-
let
|
|
2221
|
-
$[
|
|
2222
|
-
let
|
|
2223
|
-
$[
|
|
2213
|
+
}) }), $[39] = t19, $[40] = t20, $[41] = t21, $[42] = t22) : t22 = $[42];
|
|
2214
|
+
let t23 = compactFooter ? 3 : 4, t24 = compactFooter ? 1 : 2, t25;
|
|
2215
|
+
$[43] === t ? t25 = $[44] : (t25 = t("result.end-to-end-time-label"), $[43] = t, $[44] = t25);
|
|
2216
|
+
let t26;
|
|
2217
|
+
$[45] !== e2eTime || $[46] !== t ? (t26 = typeof e2eTime == "number" ? `${e2eTime}ms` : t("result.timing-not-applicable"), $[45] = e2eTime, $[46] = t, $[47] = t26) : t26 = $[47];
|
|
2218
|
+
let t27;
|
|
2219
|
+
$[48] !== t24 || $[49] !== t25 || $[50] !== t26 ? (t27 = /* @__PURE__ */ jsxs(Text, {
|
|
2224
2220
|
muted: !0,
|
|
2225
|
-
size:
|
|
2221
|
+
size: t24,
|
|
2226
2222
|
children: [
|
|
2227
|
-
|
|
2223
|
+
t25,
|
|
2228
2224
|
":",
|
|
2229
2225
|
" ",
|
|
2230
|
-
|
|
2226
|
+
t26
|
|
2231
2227
|
]
|
|
2232
|
-
}), $[
|
|
2228
|
+
}), $[48] = t24, $[49] = t25, $[50] = t26, $[51] = t27) : t27 = $[51];
|
|
2229
|
+
let t28;
|
|
2230
|
+
$[52] !== t23 || $[53] !== t27 ? (t28 = /* @__PURE__ */ jsx(Box, {
|
|
2231
|
+
marginLeft: t23,
|
|
2232
|
+
children: t27
|
|
2233
|
+
}), $[52] = t23, $[53] = t27, $[54] = t28) : t28 = $[54];
|
|
2234
|
+
let t29;
|
|
2235
|
+
$[55] !== t22 || $[56] !== t28 ? (t29 = /* @__PURE__ */ jsxs(TimingsTextContainer, {
|
|
2236
|
+
align: "center",
|
|
2237
|
+
children: [t22, t28]
|
|
2238
|
+
}), $[55] = t22, $[56] = t28, $[57] = t29) : t29 = $[57];
|
|
2233
2239
|
let t30;
|
|
2234
|
-
$[58] !==
|
|
2235
|
-
|
|
2240
|
+
$[58] !== t16 || $[59] !== t17 || $[60] !== t18 || $[61] !== t29 ? (t30 = /* @__PURE__ */ jsx(TimingsCard, {
|
|
2241
|
+
paddingX: t16,
|
|
2242
|
+
paddingY: t17,
|
|
2243
|
+
sizing: "border",
|
|
2244
|
+
style: t18,
|
|
2236
2245
|
children: t29
|
|
2237
|
-
}), $[58] =
|
|
2246
|
+
}), $[58] = t16, $[59] = t17, $[60] = t18, $[61] = t29, $[62] = t30) : t30 = $[62];
|
|
2238
2247
|
let t31;
|
|
2239
|
-
$[
|
|
2240
|
-
align: "center",
|
|
2241
|
-
children: [t24, t30]
|
|
2242
|
-
}), $[61] = t24, $[62] = t30, $[63] = t31) : t31 = $[63];
|
|
2243
|
-
let t32;
|
|
2244
|
-
$[64] !== t18 || $[65] !== t19 || $[66] !== t20 || $[67] !== t31 ? (t32 = /* @__PURE__ */ jsx(TimingsCard, {
|
|
2245
|
-
paddingX: t18,
|
|
2246
|
-
paddingY: t19,
|
|
2247
|
-
sizing: "border",
|
|
2248
|
-
style: t20,
|
|
2249
|
-
children: t31
|
|
2250
|
-
}), $[64] = t18, $[65] = t19, $[66] = t20, $[67] = t31, $[68] = t32) : t32 = $[68];
|
|
2251
|
-
let t33;
|
|
2252
|
-
$[69] !== compactFooter || $[70] !== csvUrl || $[71] !== hasResult || $[72] !== jsonUrl || $[73] !== t ? (t33 = hasResult && /* @__PURE__ */ jsx(DownloadsCard, {
|
|
2248
|
+
$[63] !== compactFooter || $[64] !== hasResult || $[65] !== queryResult || $[66] !== t ? (t31 = hasResult && /* @__PURE__ */ jsx(DownloadsCard, {
|
|
2253
2249
|
paddingX: compactFooter ? 3 : 4,
|
|
2254
2250
|
paddingY: compactFooter ? 2 : 3,
|
|
2255
2251
|
sizing: "border",
|
|
@@ -2261,25 +2257,38 @@ function VisionGuiResult(t0) {
|
|
|
2261
2257
|
muted: !0,
|
|
2262
2258
|
size: compactFooter ? 1 : 2,
|
|
2263
2259
|
children: /* @__PURE__ */ jsx(Translate, {
|
|
2264
|
-
components: { SaveResultButtons
|
|
2260
|
+
components: { SaveResultButtons },
|
|
2261
|
+
componentProps: { queryResult },
|
|
2265
2262
|
i18nKey: "result.save-result-as-format",
|
|
2266
2263
|
t
|
|
2267
2264
|
})
|
|
2268
2265
|
})
|
|
2269
|
-
}), $[
|
|
2270
|
-
let
|
|
2271
|
-
$[
|
|
2272
|
-
justify:
|
|
2273
|
-
align:
|
|
2274
|
-
direction:
|
|
2275
|
-
children: [
|
|
2276
|
-
}), $[
|
|
2277
|
-
let
|
|
2278
|
-
return $[
|
|
2266
|
+
}), $[63] = compactFooter, $[64] = hasResult, $[65] = queryResult, $[66] = t, $[67] = t31) : t31 = $[67];
|
|
2267
|
+
let t32;
|
|
2268
|
+
$[68] !== t13 || $[69] !== t14 || $[70] !== t15 || $[71] !== t30 || $[72] !== t31 ? (t32 = /* @__PURE__ */ jsxs(ResultFooter, {
|
|
2269
|
+
justify: t13,
|
|
2270
|
+
align: t14,
|
|
2271
|
+
direction: t15,
|
|
2272
|
+
children: [t30, t31]
|
|
2273
|
+
}), $[68] = t13, $[69] = t14, $[70] = t15, $[71] = t30, $[72] = t31, $[73] = t32) : t32 = $[73];
|
|
2274
|
+
let t33;
|
|
2275
|
+
return $[74] !== t12 || $[75] !== t32 ? (t33 = /* @__PURE__ */ jsxs(ResultOuterContainer, {
|
|
2279
2276
|
direction: "column",
|
|
2280
2277
|
"data-testid": "vision-result",
|
|
2281
|
-
children: [
|
|
2282
|
-
}), $[
|
|
2278
|
+
children: [t12, t32]
|
|
2279
|
+
}), $[74] = t12, $[75] = t32, $[76] = t33) : t33 = $[76], t33;
|
|
2280
|
+
}
|
|
2281
|
+
function SaveResultButtons(t0) {
|
|
2282
|
+
let $ = c(11), { queryResult } = t0, t1;
|
|
2283
|
+
$[0] === queryResult ? t1 = $[1] : (t1 = getJsonBlobUrl(queryResult), $[0] = queryResult, $[1] = t1);
|
|
2284
|
+
let jsonUrl = t1, t2;
|
|
2285
|
+
$[2] === queryResult ? t2 = $[3] : (t2 = getCsvBlobUrl(queryResult), $[2] = queryResult, $[3] = t2);
|
|
2286
|
+
let csvUrl = t2, t3;
|
|
2287
|
+
$[4] === jsonUrl ? t3 = $[5] : (t3 = /* @__PURE__ */ jsx(SaveJsonButton, { blobUrl: jsonUrl }), $[4] = jsonUrl, $[5] = t3);
|
|
2288
|
+
let t4;
|
|
2289
|
+
$[6] === csvUrl ? t4 = $[7] : (t4 = /* @__PURE__ */ jsx(SaveCsvButton, { blobUrl: csvUrl }), $[6] = csvUrl, $[7] = t4);
|
|
2290
|
+
let t5;
|
|
2291
|
+
return $[8] !== t3 || $[9] !== t4 ? (t5 = /* @__PURE__ */ jsxs(Fragment$1, { children: [t3, t4] }), $[8] = t3, $[9] = t4, $[10] = t5) : t5 = $[10], t5;
|
|
2283
2292
|
}
|
|
2284
2293
|
function nodeContains(node, other) {
|
|
2285
2294
|
return !node || !other ? !1 : node === other || !!(node.compareDocumentPosition(other) & 16);
|
|
@@ -2870,4 +2879,4 @@ function SanityVision(props) {
|
|
|
2870
2879
|
}
|
|
2871
2880
|
export { SanityVision as default };
|
|
2872
2881
|
|
|
2873
|
-
//# sourceMappingURL=SanityVision-
|
|
2882
|
+
//# sourceMappingURL=SanityVision-DQ63H4kn.js.map
|