sanity 6.6.0-next.37 → 6.6.0-next.38

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.
@@ -955,7 +955,8 @@ function VariantDetailMenuButton(t0) {
955
955
  ] }), $[33] = t12, $[34] = t13, $[35] = t14) : t14 = $[35], t14;
956
956
  }
957
957
  function VariantDetailFooter(t0) {
958
- const $ = c(16), {
958
+ const $ = c(24), {
959
+ openEditDialog,
959
960
  documentCount,
960
961
  documentsLoading: t1,
961
962
  variant
@@ -982,15 +983,24 @@ function VariantDetailFooter(t0) {
982
983
  ] })
983
984
  ] }) }) }), $[6] = t4, $[7] = t5, $[8] = t6) : t6 = $[8];
984
985
  let t7;
985
- $[9] !== documentCount || $[10] !== documentsLoading || $[11] !== variant ? (t7 = /* @__PURE__ */ jsx(Flex, { flex: "none", gap: 1, "data-testid": "variant-detail-footer-actions", children: /* @__PURE__ */ jsx(VariantDetailMenuButton, { documentCount, documentsLoading, variant }) }), $[9] = documentCount, $[10] = documentsLoading, $[11] = variant, $[12] = t7) : t7 = $[12];
986
+ $[9] !== t ? (t7 = t("detail.action.edit-variant"), $[9] = t, $[10] = t7) : t7 = $[10];
986
987
  let t8;
987
- return $[13] !== t6 || $[14] !== t7 ? (t8 = /* @__PURE__ */ jsxs(Card, { flex: "none", children: [
988
+ $[11] !== openEditDialog || $[12] !== t7 ? (t8 = /* @__PURE__ */ jsx(Button, { onClick: openEditDialog, text: t7 }), $[11] = openEditDialog, $[12] = t7, $[13] = t8) : t8 = $[13];
989
+ let t9;
990
+ $[14] !== documentCount || $[15] !== documentsLoading || $[16] !== variant ? (t9 = /* @__PURE__ */ jsx(VariantDetailMenuButton, { documentCount, documentsLoading, variant }), $[14] = documentCount, $[15] = documentsLoading, $[16] = variant, $[17] = t9) : t9 = $[17];
991
+ let t10;
992
+ $[18] !== t8 || $[19] !== t9 ? (t10 = /* @__PURE__ */ jsxs(Flex, { flex: "none", gap: 1, "data-testid": "variant-detail-footer-actions", children: [
993
+ t8,
994
+ t9
995
+ ] }), $[18] = t8, $[19] = t9, $[20] = t10) : t10 = $[20];
996
+ let t11;
997
+ return $[21] !== t10 || $[22] !== t6 ? (t11 = /* @__PURE__ */ jsxs(Card, { flex: "none", children: [
988
998
  t2,
989
999
  /* @__PURE__ */ jsxs(Flex, { padding: 3, children: [
990
1000
  t6,
991
- t7
1001
+ t10
992
1002
  ] })
993
- ] }), $[13] = t6, $[14] = t7, $[15] = t8) : t8 = $[15], t8;
1003
+ ] }), $[21] = t10, $[22] = t6, $[23] = t11) : t11 = $[23], t11;
994
1004
  }
995
1005
  function getDocumentPreviewTitle(document) {
996
1006
  const title = document.title || document.name;
@@ -1274,7 +1284,7 @@ function _temp$2(release) {
1274
1284
  return [release._id, release];
1275
1285
  }
1276
1286
  function VariantDetail() {
1277
- const $ = c(97), router = useRouter(), {
1287
+ const $ = c(90), router = useRouter(), {
1278
1288
  t
1279
1289
  } = useTranslation(variantsLocaleNamespace), [editDialogOpen, setEditDialogOpen] = useState(!1), variantIdRaw = typeof router.state.variantId == "string" ? router.state.variantId : void 0, variantId = decodeVariantIdFromRoute(variantIdRaw), {
1280
1290
  byId,
@@ -1290,16 +1300,16 @@ function VariantDetail() {
1290
1300
  if (loading) {
1291
1301
  let t110;
1292
1302
  $[2] !== t ? (t110 = t("detail.loading"), $[2] = t, $[3] = t110) : t110 = $[3];
1293
- let t28;
1294
- return $[4] !== t110 ? (t28 = /* @__PURE__ */ jsx(LoadingBlock, { fill: !0, title: t110 }), $[4] = t110, $[5] = t28) : t28 = $[5], t28;
1303
+ let t25;
1304
+ return $[4] !== t110 ? (t25 = /* @__PURE__ */ jsx(LoadingBlock, { fill: !0, title: t110 }), $[4] = t110, $[5] = t25) : t25 = $[5], t25;
1295
1305
  }
1296
1306
  if (!variant) {
1297
1307
  let t110;
1298
1308
  $[6] !== router ? (t110 = () => router.navigate({}), $[6] = router, $[7] = t110) : t110 = $[7];
1299
- let t28;
1300
- $[8] !== t ? (t28 = t("detail.back"), $[8] = t, $[9] = t28) : t28 = $[9];
1309
+ let t25;
1310
+ $[8] !== t ? (t25 = t("detail.back"), $[8] = t, $[9] = t25) : t25 = $[9];
1301
1311
  let t32;
1302
- $[10] !== t110 || $[11] !== t28 ? (t32 = /* @__PURE__ */ jsx(Card, { borderBottom: !0, flex: "none", padding: 3, children: /* @__PURE__ */ jsx(Button, { mode: "bleed", onClick: t110, text: t28 }) }), $[10] = t110, $[11] = t28, $[12] = t32) : t32 = $[12];
1312
+ $[10] !== t110 || $[11] !== t25 ? (t32 = /* @__PURE__ */ jsx(Card, { borderBottom: !0, flex: "none", padding: 3, children: /* @__PURE__ */ jsx(Button, { mode: "bleed", onClick: t110, text: t25 }) }), $[10] = t110, $[11] = t25, $[12] = t32) : t32 = $[12];
1303
1313
  let t42;
1304
1314
  $[13] !== t ? (t42 = t("detail.not-found.title"), $[13] = t, $[14] = t42) : t42 = $[14];
1305
1315
  let t52;
@@ -1346,61 +1356,52 @@ function VariantDetail() {
1346
1356
  let t10;
1347
1357
  $[47] !== t9 ? (t10 = /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: t9 }), $[47] = t9, $[48] = t10) : t10 = $[48];
1348
1358
  let t11;
1349
- $[49] !== t10 || $[50] !== t8 ? (t11 = /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
1359
+ $[49] !== t10 || $[50] !== t8 ? (t11 = /* @__PURE__ */ jsx(Flex, { align: "flex-start", gap: 4, justify: "space-between", children: /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
1350
1360
  t8,
1351
1361
  t10
1352
- ] }), $[49] = t10, $[50] = t8, $[51] = t11) : t11 = $[51];
1362
+ ] }) }), $[49] = t10, $[50] = t8, $[51] = t11) : t11 = $[51];
1353
1363
  let t12;
1354
- $[52] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t12 = () => setEditDialogOpen(!0), $[52] = t12) : t12 = $[52];
1364
+ $[52] !== t ? (t12 = t("dialog.create.conditions.title"), $[52] = t, $[53] = t12) : t12 = $[53];
1355
1365
  let t13;
1356
- $[53] !== t ? (t13 = t("detail.action.edit-variant"), $[53] = t, $[54] = t13) : t13 = $[54];
1366
+ $[54] !== t12 ? (t13 = /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", children: t12 }), $[54] = t12, $[55] = t13) : t13 = $[55];
1357
1367
  let t14;
1358
- $[55] !== t13 ? (t14 = /* @__PURE__ */ jsx(Button, { onClick: t12, text: t13 }), $[55] = t13, $[56] = t14) : t14 = $[56];
1368
+ $[56] !== conditionsText || $[57] !== t ? (t14 = conditionsText || t("overview.table.no-conditions"), $[56] = conditionsText, $[57] = t, $[58] = t14) : t14 = $[58];
1359
1369
  let t15;
1360
- $[57] !== t11 || $[58] !== t14 ? (t15 = /* @__PURE__ */ jsxs(Flex, { align: "flex-start", gap: 4, justify: "space-between", children: [
1361
- t11,
1362
- t14
1363
- ] }), $[57] = t11, $[58] = t14, $[59] = t15) : t15 = $[59];
1370
+ $[59] !== t14 ? (t15 = /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: t14 }), $[59] = t14, $[60] = t15) : t15 = $[60];
1364
1371
  let t16;
1365
- $[60] !== t ? (t16 = t("dialog.create.conditions.title"), $[60] = t, $[61] = t16) : t16 = $[61];
1372
+ $[61] !== t13 || $[62] !== t15 ? (t16 = /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsxs(Stack, { space: 2, children: [
1373
+ t13,
1374
+ t15
1375
+ ] }) }), $[61] = t13, $[62] = t15, $[63] = t16) : t16 = $[63];
1366
1376
  let t17;
1367
- $[62] !== t16 ? (t17 = /* @__PURE__ */ jsx(Text, { size: 1, weight: "medium", children: t16 }), $[62] = t16, $[63] = t17) : t17 = $[63];
1377
+ $[64] !== t11 || $[65] !== t16 ? (t17 = /* @__PURE__ */ jsx(Container, { flex: "none", width: 3, children: /* @__PURE__ */ jsx(Flex, { direction: "column", paddingX: 3, children: /* @__PURE__ */ jsxs(Card, { paddingY: 5, children: [
1378
+ t11,
1379
+ t16
1380
+ ] }) }) }), $[64] = t11, $[65] = t16, $[66] = t17) : t17 = $[66];
1368
1381
  let t18;
1369
- $[64] !== conditionsText || $[65] !== t ? (t18 = conditionsText || t("overview.table.no-conditions"), $[64] = conditionsText, $[65] = t, $[66] = t18) : t18 = $[66];
1382
+ $[67] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t18 = {
1383
+ minHeight: 0
1384
+ }, $[67] = t18) : t18 = $[67];
1370
1385
  let t19;
1371
- $[67] !== t18 ? (t19 = /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: t18 }), $[67] = t18, $[68] = t19) : t19 = $[68];
1386
+ $[68] !== documentsLoading || $[69] !== t || $[70] !== tableRows || $[71] !== variant || $[72] !== variantDocumentsError ? (t19 = /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, overflow: "hidden", style: t18, children: variantDocumentsError ? /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: t("detail.documents.error") }) }) : /* @__PURE__ */ jsx(VariantDocumentsTable, { loading: documentsLoading, rows: tableRows, variantId: getVariantId(variant._id) }) }), $[68] = documentsLoading, $[69] = t, $[70] = tableRows, $[71] = variant, $[72] = variantDocumentsError, $[73] = t19) : t19 = $[73];
1372
1387
  let t20;
1373
- $[69] !== t17 || $[70] !== t19 ? (t20 = /* @__PURE__ */ jsx(Box, { paddingTop: 4, children: /* @__PURE__ */ jsxs(Stack, { space: 2, children: [
1388
+ $[74] !== t17 || $[75] !== t19 ? (t20 = /* @__PURE__ */ jsxs(Flex, { direction: "column", flex: 1, height: "fill", overflow: "hidden", style: t4, children: [
1374
1389
  t17,
1375
1390
  t19
1376
- ] }) }), $[69] = t17, $[70] = t19, $[71] = t20) : t20 = $[71];
1391
+ ] }), $[74] = t17, $[75] = t19, $[76] = t20) : t20 = $[76];
1377
1392
  let t21;
1378
- $[72] !== t15 || $[73] !== t20 ? (t21 = /* @__PURE__ */ jsx(Container, { flex: "none", width: 3, children: /* @__PURE__ */ jsx(Flex, { direction: "column", paddingX: 3, children: /* @__PURE__ */ jsxs(Card, { paddingY: 5, children: [
1379
- t15,
1380
- t20
1381
- ] }) }) }), $[72] = t15, $[73] = t20, $[74] = t21) : t21 = $[74];
1393
+ $[77] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t21 = () => setEditDialogOpen(!0), $[77] = t21) : t21 = $[77];
1382
1394
  let t22;
1383
- $[75] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t22 = {
1384
- minHeight: 0
1385
- }, $[75] = t22) : t22 = $[75];
1395
+ $[78] !== documentsLoading || $[79] !== tableRows.length || $[80] !== variant ? (t22 = /* @__PURE__ */ jsx(VariantDetailFooter, { openEditDialog: t21, documentCount: tableRows.length, documentsLoading, variant }), $[78] = documentsLoading, $[79] = tableRows.length, $[80] = variant, $[81] = t22) : t22 = $[81];
1386
1396
  let t23;
1387
- $[76] !== documentsLoading || $[77] !== t || $[78] !== tableRows || $[79] !== variant || $[80] !== variantDocumentsError ? (t23 = /* @__PURE__ */ jsx(Flex, { direction: "column", flex: 1, overflow: "hidden", style: t22, children: variantDocumentsError ? /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: t("detail.documents.error") }) }) : /* @__PURE__ */ jsx(VariantDocumentsTable, { loading: documentsLoading, rows: tableRows, variantId: getVariantId(variant._id) }) }), $[76] = documentsLoading, $[77] = t, $[78] = tableRows, $[79] = variant, $[80] = variantDocumentsError, $[81] = t23) : t23 = $[81];
1397
+ $[82] !== editDialogOpen || $[83] !== variant ? (t23 = editDialogOpen && /* @__PURE__ */ jsx(EditVariantDialog, { onCancel: () => setEditDialogOpen(!1), onSubmit: () => setEditDialogOpen(!1), variant }), $[82] = editDialogOpen, $[83] = variant, $[84] = t23) : t23 = $[84];
1388
1398
  let t24;
1389
- $[82] !== t21 || $[83] !== t23 ? (t24 = /* @__PURE__ */ jsxs(Flex, { direction: "column", flex: 1, height: "fill", overflow: "hidden", style: t4, children: [
1390
- t21,
1391
- t23
1392
- ] }), $[82] = t21, $[83] = t23, $[84] = t24) : t24 = $[84];
1393
- let t25;
1394
- $[85] !== documentsLoading || $[86] !== tableRows.length || $[87] !== variant ? (t25 = /* @__PURE__ */ jsx(VariantDetailFooter, { documentCount: tableRows.length, documentsLoading, variant }), $[85] = documentsLoading, $[86] = tableRows.length, $[87] = variant, $[88] = t25) : t25 = $[88];
1395
- let t26;
1396
- $[89] !== editDialogOpen || $[90] !== variant ? (t26 = editDialogOpen && /* @__PURE__ */ jsx(EditVariantDialog, { onCancel: () => setEditDialogOpen(!1), onSubmit: () => setEditDialogOpen(!1), variant }), $[89] = editDialogOpen, $[90] = variant, $[91] = t26) : t26 = $[91];
1397
- let t27;
1398
- return $[92] !== t24 || $[93] !== t25 || $[94] !== t26 || $[95] !== t3 ? (t27 = /* @__PURE__ */ jsxs(Flex, { direction: "column", flex: 1, height: "fill", overflow: "hidden", children: [
1399
+ return $[85] !== t20 || $[86] !== t22 || $[87] !== t23 || $[88] !== t3 ? (t24 = /* @__PURE__ */ jsxs(Flex, { direction: "column", flex: 1, height: "fill", overflow: "hidden", children: [
1399
1400
  t3,
1400
- t24,
1401
- t25,
1402
- t26
1403
- ] }), $[92] = t24, $[93] = t25, $[94] = t26, $[95] = t3, $[96] = t27) : t27 = $[96], t27;
1401
+ t20,
1402
+ t22,
1403
+ t23
1404
+ ] }), $[85] = t20, $[86] = t22, $[87] = t23, $[88] = t3, $[89] = t24) : t24 = $[89], t24;
1404
1405
  }
1405
1406
  function CreateVariantDialog(props) {
1406
1407
  const $ = c(16), {