sanity 6.6.0-next.34 → 6.6.0-next.36
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/lib/_chunks-dts/ActiveWorkspaceMatcherContext.d.ts +27 -3
- package/lib/_chunks-es/ReleasesTool.js +114 -81
- package/lib/_chunks-es/ReleasesTool.js.map +1 -1
- package/lib/_chunks-es/index2.js +78 -5
- package/lib/_chunks-es/index2.js.map +1 -1
- package/lib/_chunks-es/resources3.js +8 -0
- package/lib/_chunks-es/resources3.js.map +1 -1
- package/lib/_chunks-es/version.js +2 -2
- package/lib/cli.d.ts +2 -2
- package/lib/cli.js +4 -2
- package/lib/workbench.d.ts +3 -0
- package/lib/workbench.js +8 -0
- package/lib/workbench.js.map +1 -0
- package/package.json +13 -11
|
@@ -629,6 +629,26 @@ interface AuthStoreOptions extends AuthConfig {
|
|
|
629
629
|
* @internal
|
|
630
630
|
*/
|
|
631
631
|
consumeHashToken: () => string | undefined;
|
|
632
|
+
/**
|
|
633
|
+
* Observes the session token issued by the embedding workbench "OS", if the
|
|
634
|
+
* Studio is running as a federated remote inside it. While it yields a token,
|
|
635
|
+
* that token is authoritative: it takes precedence over `loginMethod` and
|
|
636
|
+
* every other mechanism, is used in-memory only (never persisted), and the
|
|
637
|
+
* auth state tracks it over time — so an OS sign-out (`null`) transitions the
|
|
638
|
+
* Studio to unauthenticated. Returns `undefined` outside the workbench, in
|
|
639
|
+
* which case the normal auth flow runs. Defaults to a no-op.
|
|
640
|
+
* @internal
|
|
641
|
+
*/
|
|
642
|
+
observeWorkbenchToken?: () => Observable<string | null> | undefined;
|
|
643
|
+
/**
|
|
644
|
+
* Asks the workbench "OS" to reissue its session token, called when the
|
|
645
|
+
* current one is rejected (a 401 surfaced as forced logout). In the workbench
|
|
646
|
+
* this replaces tearing down the session locally, since the OS owns it — the
|
|
647
|
+
* reissued token flows back through `observeWorkbenchToken`. Defaults to a
|
|
648
|
+
* no-op.
|
|
649
|
+
* @internal
|
|
650
|
+
*/
|
|
651
|
+
refreshWorkbenchToken?: () => void;
|
|
632
652
|
}
|
|
633
653
|
/**
|
|
634
654
|
* Lets the auth store's `/users/me` probe diagnose and report the failures the
|
|
@@ -662,16 +682,19 @@ declare function _createAuthStore({
|
|
|
662
682
|
loginMethod,
|
|
663
683
|
getSessionId,
|
|
664
684
|
consumeHashToken,
|
|
685
|
+
observeWorkbenchToken,
|
|
686
|
+
refreshWorkbenchToken,
|
|
665
687
|
getRequestErrorHandler,
|
|
666
688
|
getRequestFailureDiagnostics,
|
|
667
689
|
...providerOptions
|
|
668
690
|
}: AuthStoreOptions): AuthStore;
|
|
669
691
|
/**
|
|
670
|
-
* Public options for `createAuthStore`. The `getSessionId
|
|
671
|
-
* dependencies are wired
|
|
692
|
+
* Public options for `createAuthStore`. The `getSessionId`, `consumeHashToken`,
|
|
693
|
+
* `observeWorkbenchToken` and `refreshWorkbenchToken` dependencies are wired
|
|
694
|
+
* automatically using the default implementations.
|
|
672
695
|
* @internal
|
|
673
696
|
*/
|
|
674
|
-
type CreateAuthStoreOptions = Omit<AuthStoreOptions, 'getSessionId' | 'consumeHashToken'>;
|
|
697
|
+
type CreateAuthStoreOptions = Omit<AuthStoreOptions, 'getSessionId' | 'consumeHashToken' | 'observeWorkbenchToken' | 'refreshWorkbenchToken'>;
|
|
675
698
|
/**
|
|
676
699
|
* @internal
|
|
677
700
|
*/
|
|
@@ -10741,6 +10764,7 @@ interface BundleDocument {
|
|
|
10741
10764
|
isPending?: boolean;
|
|
10742
10765
|
document: SanityDocument & {
|
|
10743
10766
|
publishedDocumentExists: boolean;
|
|
10767
|
+
draftDocumentExists?: boolean;
|
|
10744
10768
|
};
|
|
10745
10769
|
validation: DocumentValidationStatus;
|
|
10746
10770
|
}
|
|
@@ -1422,7 +1422,7 @@ function ReleaseDashboardDetails(t0) {
|
|
|
1422
1422
|
] }) }), $[56] = t13, $[57] = t14, $[58] = t15, $[59] = t16, $[60] = t17, $[61] = t18) : t18 = $[61], t18;
|
|
1423
1423
|
}
|
|
1424
1424
|
const ReleasePublishAllButton = (t0) => {
|
|
1425
|
-
const $ = c(
|
|
1425
|
+
const $ = c(99), {
|
|
1426
1426
|
release,
|
|
1427
1427
|
documents,
|
|
1428
1428
|
disabled,
|
|
@@ -1430,7 +1430,8 @@ const ReleasePublishAllButton = (t0) => {
|
|
|
1430
1430
|
onConfirmDialogOpen,
|
|
1431
1431
|
onConfirmDialogClose
|
|
1432
1432
|
} = t0, isMenuItem = t1 === void 0 ? !1 : t1, toast = useToast(), {
|
|
1433
|
-
publishRelease
|
|
1433
|
+
publishRelease,
|
|
1434
|
+
discardDrafts
|
|
1434
1435
|
} = useReleaseOperations(), {
|
|
1435
1436
|
checkWithPermissionGuard
|
|
1436
1437
|
} = useReleasePermissions(), {
|
|
@@ -1443,32 +1444,42 @@ const ReleasePublishAllButton = (t0) => {
|
|
|
1443
1444
|
drafts: t2
|
|
1444
1445
|
} = document2, {
|
|
1445
1446
|
enabled: isDraftModelEnabled
|
|
1446
|
-
} = t2, [publishBundleStatus, setPublishBundleStatus] = useState("idle"), [publishPermission, setPublishPermission] = useState(!1);
|
|
1447
|
+
} = t2, [publishBundleStatus, setPublishBundleStatus] = useState("idle"), [shouldUpdateDrafts, setShouldUpdateDrafts] = useState(!1), [publishPermission, setPublishPermission] = useState(!1);
|
|
1447
1448
|
let t3;
|
|
1448
|
-
$[0] !== documents ? (t3 = documents.
|
|
1449
|
-
const
|
|
1449
|
+
$[0] !== documents ? (t3 = documents.filter(_temp$g).map(_temp2$7), $[0] = documents, $[1] = t3) : t3 = $[1];
|
|
1450
|
+
const draftDocumentIds = t3, draftDocumentsCount = draftDocumentIds.length, showUpdateDraftsOption = isDraftModelEnabled && draftDocumentsCount > 0;
|
|
1450
1451
|
let t4;
|
|
1451
|
-
$[2] !== documents ? (t4 = documents.some(
|
|
1452
|
-
const
|
|
1452
|
+
$[2] !== documents ? (t4 = documents.some(_temp3$4), $[2] = documents, $[3] = t4) : t4 = $[3];
|
|
1453
|
+
const isValidatingDocuments = t4;
|
|
1453
1454
|
let t5;
|
|
1454
|
-
$[4] !==
|
|
1455
|
+
$[4] !== documents ? (t5 = documents.some(_temp4$1), $[4] = documents, $[5] = t5) : t5 = $[5];
|
|
1456
|
+
const hasDocumentValidationErrors = t5, isPublishButtonDisabled = disabled || isValidatingDocuments || hasDocumentValidationErrors || !publishPermission, isMounted = useRef(!1);
|
|
1457
|
+
let t6;
|
|
1458
|
+
$[6] !== checkWithPermissionGuard || $[7] !== publishRelease || $[8] !== release._id ? (t6 = () => (isMounted.current = !0, checkWithPermissionGuard(publishRelease, release._id).then((hasPermission) => {
|
|
1455
1459
|
isMounted.current && setPublishPermission(hasPermission);
|
|
1456
1460
|
}), () => {
|
|
1457
1461
|
isMounted.current = !1;
|
|
1458
|
-
}), $[
|
|
1459
|
-
let t6;
|
|
1460
|
-
$[8] !== checkWithPermissionGuard || $[9] !== publishRelease || $[10] !== release._id || $[11] !== release.metadata.intendedPublishAt ? (t6 = [checkWithPermissionGuard, publishRelease, release._id, release.metadata.intendedPublishAt], $[8] = checkWithPermissionGuard, $[9] = publishRelease, $[10] = release._id, $[11] = release.metadata.intendedPublishAt, $[12] = t6) : t6 = $[12], useEffect(t5, t6);
|
|
1462
|
+
}), $[6] = checkWithPermissionGuard, $[7] = publishRelease, $[8] = release._id, $[9] = t6) : t6 = $[9];
|
|
1461
1463
|
let t7;
|
|
1462
|
-
$[
|
|
1464
|
+
$[10] !== checkWithPermissionGuard || $[11] !== publishRelease || $[12] !== release._id || $[13] !== release.metadata.intendedPublishAt ? (t7 = [checkWithPermissionGuard, publishRelease, release._id, release.metadata.intendedPublishAt], $[10] = checkWithPermissionGuard, $[11] = publishRelease, $[12] = release._id, $[13] = release.metadata.intendedPublishAt, $[14] = t7) : t7 = $[14], useEffect(t6, t7);
|
|
1465
|
+
let t8;
|
|
1466
|
+
$[15] !== discardDrafts || $[16] !== draftDocumentIds || $[17] !== isDraftModelEnabled || $[18] !== onConfirmDialogClose || $[19] !== perspective.selectedPerspective || $[20] !== publishRelease || $[21] !== release || $[22] !== setPerspective || $[23] !== shouldUpdateDrafts || $[24] !== showUpdateDraftsOption || $[25] !== t || $[26] !== tCore || $[27] !== telemetry || $[28] !== toast ? (t8 = async () => {
|
|
1463
1467
|
if (!release)
|
|
1464
1468
|
return;
|
|
1465
1469
|
const run = async () => {
|
|
1466
|
-
setPublishBundleStatus("publishing"), await publishRelease(release._id), telemetry.log(PublishedRelease),
|
|
1470
|
+
setPublishBundleStatus("publishing"), await publishRelease(release._id), telemetry.log(PublishedRelease), showUpdateDraftsOption && shouldUpdateDrafts && await discardDrafts(draftDocumentIds).catch((updateDraftsError) => {
|
|
1471
|
+
toast.push({
|
|
1472
|
+
status: "warning",
|
|
1473
|
+
title: /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "toast.publish.update-drafts-error", values: {
|
|
1474
|
+
error: updateDraftsError.message
|
|
1475
|
+
} }) })
|
|
1476
|
+
}), console.error(updateDraftsError);
|
|
1477
|
+
}), isReleaseDocument(perspective.selectedPerspective) && perspective.selectedPerspective?._id === release._id && setPerspective(isDraftModelEnabled ? "drafts" : "published");
|
|
1467
1478
|
};
|
|
1468
1479
|
try {
|
|
1469
1480
|
await run();
|
|
1470
|
-
} catch (
|
|
1471
|
-
const publishingError =
|
|
1481
|
+
} catch (t92) {
|
|
1482
|
+
const publishingError = t92;
|
|
1472
1483
|
toast.push({
|
|
1473
1484
|
status: "error",
|
|
1474
1485
|
title: /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "toast.publish.error", values: {
|
|
@@ -1478,106 +1489,128 @@ const ReleasePublishAllButton = (t0) => {
|
|
|
1478
1489
|
}), console.error(publishingError);
|
|
1479
1490
|
}
|
|
1480
1491
|
onConfirmDialogClose?.(), setPublishBundleStatus("idle");
|
|
1481
|
-
}, $[
|
|
1482
|
-
const handleConfirmPublishAll =
|
|
1483
|
-
let
|
|
1492
|
+
}, $[15] = discardDrafts, $[16] = draftDocumentIds, $[17] = isDraftModelEnabled, $[18] = onConfirmDialogClose, $[19] = perspective.selectedPerspective, $[20] = publishRelease, $[21] = release, $[22] = setPerspective, $[23] = shouldUpdateDrafts, $[24] = showUpdateDraftsOption, $[25] = t, $[26] = tCore, $[27] = telemetry, $[28] = toast, $[29] = t8) : t8 = $[29];
|
|
1493
|
+
const handleConfirmPublishAll = t8;
|
|
1494
|
+
let t9;
|
|
1484
1495
|
bb0: {
|
|
1485
1496
|
if (publishBundleStatus === "idle") {
|
|
1486
|
-
|
|
1497
|
+
t9 = null;
|
|
1487
1498
|
break bb0;
|
|
1488
1499
|
}
|
|
1489
|
-
let t92;
|
|
1490
|
-
$[24] !== t ? (t92 = t("publish-dialog.confirm-publish.title"), $[24] = t, $[25] = t92) : t92 = $[25];
|
|
1491
1500
|
let t102;
|
|
1492
|
-
$[
|
|
1493
|
-
onConfirmDialogClose?.(), setPublishBundleStatus("idle");
|
|
1494
|
-
}, $[26] = onConfirmDialogClose, $[27] = t102) : t102 = $[27];
|
|
1501
|
+
$[30] !== t ? (t102 = t("publish-dialog.confirm-publish.title"), $[30] = t, $[31] = t102) : t102 = $[31];
|
|
1495
1502
|
let t112;
|
|
1496
|
-
$[
|
|
1497
|
-
|
|
1498
|
-
|
|
1499
|
-
|
|
1503
|
+
$[32] !== onConfirmDialogClose ? (t112 = () => {
|
|
1504
|
+
onConfirmDialogClose?.(), setPublishBundleStatus("idle");
|
|
1505
|
+
}, $[32] = onConfirmDialogClose, $[33] = t112) : t112 = $[33];
|
|
1506
|
+
let t122;
|
|
1507
|
+
$[34] !== t ? (t122 = t("action.publish-all-documents"), $[34] = t, $[35] = t122) : t122 = $[35];
|
|
1508
|
+
const t132 = publishBundleStatus === "publishing", t142 = publishBundleStatus === "publishing";
|
|
1509
|
+
let t152;
|
|
1510
|
+
$[36] !== handleConfirmPublishAll || $[37] !== t122 || $[38] !== t132 || $[39] !== t142 ? (t152 = {
|
|
1500
1511
|
confirmButton: {
|
|
1501
|
-
text:
|
|
1512
|
+
text: t122,
|
|
1502
1513
|
tone: "positive",
|
|
1503
1514
|
onClick: handleConfirmPublishAll,
|
|
1504
|
-
loading:
|
|
1505
|
-
disabled:
|
|
1515
|
+
loading: t132,
|
|
1516
|
+
disabled: t142
|
|
1506
1517
|
}
|
|
1507
|
-
}, $[
|
|
1508
|
-
let t152;
|
|
1509
|
-
$[35] !== release.metadata.title || $[36] !== tCore ? (t152 = release.metadata.title || tCore("release.placeholder-untitled-release"), $[35] = release.metadata.title, $[36] = tCore, $[37] = t152) : t152 = $[37];
|
|
1518
|
+
}, $[36] = handleConfirmPublishAll, $[37] = t122, $[38] = t132, $[39] = t142, $[40] = t152) : t152 = $[40];
|
|
1510
1519
|
let t162;
|
|
1511
|
-
$[
|
|
1512
|
-
|
|
1520
|
+
$[41] !== release.metadata.title || $[42] !== tCore ? (t162 = release.metadata.title || tCore("release.placeholder-untitled-release"), $[41] = release.metadata.title, $[42] = tCore, $[43] = t162) : t162 = $[43];
|
|
1521
|
+
let t172;
|
|
1522
|
+
$[44] !== documents.length || $[45] !== t162 ? (t172 = {
|
|
1523
|
+
title: t162,
|
|
1513
1524
|
releaseDocumentsLength: documents.length,
|
|
1514
1525
|
count: documents.length
|
|
1515
|
-
}, $[
|
|
1516
|
-
let t172;
|
|
1517
|
-
$[41] !== t || $[42] !== t162 ? (t172 = /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "publish-dialog.confirm-publish-description", values: t162 }) }), $[41] = t, $[42] = t162, $[43] = t172) : t172 = $[43];
|
|
1526
|
+
}, $[44] = documents.length, $[45] = t162, $[46] = t172) : t172 = $[46];
|
|
1518
1527
|
let t182;
|
|
1519
|
-
$[
|
|
1528
|
+
$[47] !== t || $[48] !== t172 ? (t182 = /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "publish-dialog.confirm-publish-description", values: t172 }) }), $[47] = t, $[48] = t172, $[49] = t182) : t182 = $[49];
|
|
1529
|
+
let t192;
|
|
1530
|
+
$[50] !== draftDocumentsCount || $[51] !== shouldUpdateDrafts || $[52] !== showUpdateDraftsOption || $[53] !== t ? (t192 = showUpdateDraftsOption && /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
1531
|
+
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: 3, as: "label", children: [
|
|
1532
|
+
/* @__PURE__ */ jsx(Checkbox, { checked: shouldUpdateDrafts, onChange: (event) => setShouldUpdateDrafts(event.currentTarget.checked), "data-testid": "update-drafts-checkbox" }),
|
|
1533
|
+
/* @__PURE__ */ jsx(Text, { size: 1, children: t("publish-dialog.confirm-publish.update-drafts-checkbox") })
|
|
1534
|
+
] }),
|
|
1535
|
+
/* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: t("publish-dialog.confirm-publish.update-drafts-description", {
|
|
1536
|
+
count: draftDocumentsCount,
|
|
1537
|
+
draftDocumentsLength: draftDocumentsCount
|
|
1538
|
+
}) })
|
|
1539
|
+
] }), $[50] = draftDocumentsCount, $[51] = shouldUpdateDrafts, $[52] = showUpdateDraftsOption, $[53] = t, $[54] = t192) : t192 = $[54];
|
|
1540
|
+
let t20;
|
|
1541
|
+
$[55] !== t182 || $[56] !== t192 ? (t20 = /* @__PURE__ */ jsxs(Stack, { space: 4, children: [
|
|
1542
|
+
t182,
|
|
1543
|
+
t192
|
|
1544
|
+
] }), $[55] = t182, $[56] = t192, $[57] = t20) : t20 = $[57];
|
|
1545
|
+
let t21;
|
|
1546
|
+
$[58] !== t102 || $[59] !== t112 || $[60] !== t152 || $[61] !== t20 ? (t21 = /* @__PURE__ */ jsx(Dialog, { id: "confirm-publish-dialog", "data-testid": "confirm-publish-dialog", header: t102, onClose: t112, footer: t152, children: t20 }), $[58] = t102, $[59] = t112, $[60] = t152, $[61] = t20, $[62] = t21) : t21 = $[62], t9 = t21;
|
|
1520
1547
|
}
|
|
1521
|
-
const confirmPublishDialog =
|
|
1522
|
-
let
|
|
1548
|
+
const confirmPublishDialog = t9;
|
|
1549
|
+
let t10;
|
|
1523
1550
|
bb1: {
|
|
1524
1551
|
if (!hasDocumentValidationErrors && !isValidatingDocuments && publishPermission) {
|
|
1525
|
-
|
|
1552
|
+
t10 = null;
|
|
1526
1553
|
break bb1;
|
|
1527
1554
|
}
|
|
1528
|
-
let
|
|
1529
|
-
$[
|
|
1530
|
-
const tooltipText =
|
|
1531
|
-
let t122;
|
|
1532
|
-
$[55] !== t112 ? (t122 = /* @__PURE__ */ jsx(ToneIcon, { icon: ErrorOutlineIcon, tone: t112 }), $[55] = t112, $[56] = t122) : t122 = $[56];
|
|
1555
|
+
let t112;
|
|
1556
|
+
$[63] !== documents.length || $[64] !== hasDocumentValidationErrors || $[65] !== isValidatingDocuments || $[66] !== publishPermission || $[67] !== t ? (t112 = () => documents.length === 0 ? t("publish-action.validation.no-documents") : publishPermission ? isValidatingDocuments ? t("publish-dialog.validation.loading") : hasDocumentValidationErrors ? t("publish-dialog.validation.error") : null : t("publish-dialog.validation.no-permission"), $[63] = documents.length, $[64] = hasDocumentValidationErrors, $[65] = isValidatingDocuments, $[66] = publishPermission, $[67] = t, $[68] = t112) : t112 = $[68];
|
|
1557
|
+
const tooltipText = t112, t122 = isValidatingDocuments ? "default" : "critical";
|
|
1533
1558
|
let t132;
|
|
1534
|
-
$[
|
|
1559
|
+
$[69] !== t122 ? (t132 = /* @__PURE__ */ jsx(ToneIcon, { icon: ErrorOutlineIcon, tone: t122 }), $[69] = t122, $[70] = t132) : t132 = $[70];
|
|
1535
1560
|
let t142;
|
|
1536
|
-
$[
|
|
1537
|
-
|
|
1538
|
-
|
|
1539
|
-
|
|
1561
|
+
$[71] !== tooltipText ? (t142 = tooltipText(), $[71] = tooltipText, $[72] = t142) : t142 = $[72];
|
|
1562
|
+
let t152;
|
|
1563
|
+
$[73] !== t132 || $[74] !== t142 ? (t152 = /* @__PURE__ */ jsx(Text, { muted: !0, size: 1, children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 3, padding: 1, children: [
|
|
1564
|
+
t132,
|
|
1565
|
+
t142
|
|
1566
|
+
] }) }), $[73] = t132, $[74] = t142, $[75] = t152) : t152 = $[75], t10 = t152;
|
|
1540
1567
|
}
|
|
1541
|
-
const publishTooltipContent =
|
|
1542
|
-
let
|
|
1543
|
-
$[
|
|
1544
|
-
setPublishBundleStatus("confirm"), onConfirmDialogOpen?.();
|
|
1545
|
-
}, $[
|
|
1546
|
-
const handleInitialPublish =
|
|
1547
|
-
let
|
|
1548
|
-
$[
|
|
1549
|
-
const
|
|
1550
|
-
let
|
|
1551
|
-
$[
|
|
1552
|
-
disabled:
|
|
1568
|
+
const publishTooltipContent = t10;
|
|
1569
|
+
let t11;
|
|
1570
|
+
$[76] !== onConfirmDialogOpen ? (t11 = () => {
|
|
1571
|
+
setShouldUpdateDrafts(!1), setPublishBundleStatus("confirm"), onConfirmDialogOpen?.();
|
|
1572
|
+
}, $[76] = onConfirmDialogOpen, $[77] = t11) : t11 = $[77];
|
|
1573
|
+
const handleInitialPublish = t11, t12 = isPublishButtonDisabled || publishBundleStatus === "publishing" || documents.length === 0;
|
|
1574
|
+
let t13;
|
|
1575
|
+
$[78] !== t ? (t13 = t("action.publish-all-documents"), $[78] = t, $[79] = t13) : t13 = $[79];
|
|
1576
|
+
const t14 = !isPublishButtonDisabled;
|
|
1577
|
+
let t15;
|
|
1578
|
+
$[80] !== publishTooltipContent || $[81] !== t14 ? (t15 = {
|
|
1579
|
+
disabled: t14,
|
|
1553
1580
|
content: publishTooltipContent,
|
|
1554
1581
|
placement: "bottom"
|
|
1555
|
-
}, $[
|
|
1556
|
-
const
|
|
1557
|
-
let
|
|
1558
|
-
$[
|
|
1582
|
+
}, $[80] = publishTooltipContent, $[81] = t14, $[82] = t15) : t15 = $[82];
|
|
1583
|
+
const t16 = t15;
|
|
1584
|
+
let t17;
|
|
1585
|
+
$[83] !== handleInitialPublish || $[84] !== t12 || $[85] !== t13 || $[86] !== t16 ? (t17 = {
|
|
1559
1586
|
icon: PublishIcon,
|
|
1560
|
-
disabled:
|
|
1561
|
-
text:
|
|
1587
|
+
disabled: t12,
|
|
1588
|
+
text: t13,
|
|
1562
1589
|
handleOnClick: handleInitialPublish,
|
|
1563
|
-
tooltipProps:
|
|
1564
|
-
}, $[
|
|
1565
|
-
const sharedProps =
|
|
1566
|
-
let t17;
|
|
1567
|
-
$[74] !== isMenuItem || $[75] !== publishBundleStatus || $[76] !== sharedProps.disabled || $[77] !== sharedProps.handleOnClick || $[78] !== sharedProps.icon || $[79] !== sharedProps.text || $[80] !== sharedProps.tooltipProps ? (t17 = isMenuItem ? /* @__PURE__ */ jsx(MenuItem, { tooltipProps: sharedProps.tooltipProps, icon: sharedProps.icon, disabled: sharedProps.disabled, text: sharedProps.text, onClick: sharedProps.handleOnClick, "data-testid": "publish-all-button-menu-item" }) : /* @__PURE__ */ jsx(Button, { tooltipProps: sharedProps.tooltipProps, icon: sharedProps.icon, disabled: sharedProps.disabled, text: sharedProps.text, onClick: sharedProps.handleOnClick, loading: publishBundleStatus === "publishing", "data-testid": "publish-all-button", tone: "positive" }), $[74] = isMenuItem, $[75] = publishBundleStatus, $[76] = sharedProps.disabled, $[77] = sharedProps.handleOnClick, $[78] = sharedProps.icon, $[79] = sharedProps.text, $[80] = sharedProps.tooltipProps, $[81] = t17) : t17 = $[81];
|
|
1590
|
+
tooltipProps: t16
|
|
1591
|
+
}, $[83] = handleInitialPublish, $[84] = t12, $[85] = t13, $[86] = t16, $[87] = t17) : t17 = $[87];
|
|
1592
|
+
const sharedProps = t17;
|
|
1568
1593
|
let t18;
|
|
1569
|
-
|
|
1570
|
-
|
|
1594
|
+
$[88] !== isMenuItem || $[89] !== publishBundleStatus || $[90] !== sharedProps.disabled || $[91] !== sharedProps.handleOnClick || $[92] !== sharedProps.icon || $[93] !== sharedProps.text || $[94] !== sharedProps.tooltipProps ? (t18 = isMenuItem ? /* @__PURE__ */ jsx(MenuItem, { tooltipProps: sharedProps.tooltipProps, icon: sharedProps.icon, disabled: sharedProps.disabled, text: sharedProps.text, onClick: sharedProps.handleOnClick, "data-testid": "publish-all-button-menu-item" }) : /* @__PURE__ */ jsx(Button, { tooltipProps: sharedProps.tooltipProps, icon: sharedProps.icon, disabled: sharedProps.disabled, text: sharedProps.text, onClick: sharedProps.handleOnClick, loading: publishBundleStatus === "publishing", "data-testid": "publish-all-button", tone: "positive" }), $[88] = isMenuItem, $[89] = publishBundleStatus, $[90] = sharedProps.disabled, $[91] = sharedProps.handleOnClick, $[92] = sharedProps.icon, $[93] = sharedProps.text, $[94] = sharedProps.tooltipProps, $[95] = t18) : t18 = $[95];
|
|
1595
|
+
let t19;
|
|
1596
|
+
return $[96] !== confirmPublishDialog || $[97] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
1597
|
+
t18,
|
|
1571
1598
|
confirmPublishDialog
|
|
1572
|
-
] }), $[
|
|
1599
|
+
] }), $[96] = confirmPublishDialog, $[97] = t18, $[98] = t19) : t19 = $[98], t19;
|
|
1573
1600
|
};
|
|
1574
|
-
function _temp$g(
|
|
1601
|
+
function _temp$g(releaseDocument) {
|
|
1602
|
+
return releaseDocument.document.draftDocumentExists && !isGoingToUnpublish(releaseDocument.document);
|
|
1603
|
+
}
|
|
1604
|
+
function _temp2$7(releaseDocument_0) {
|
|
1605
|
+
return releaseDocument_0.document._id;
|
|
1606
|
+
}
|
|
1607
|
+
function _temp3$4(t0) {
|
|
1575
1608
|
const {
|
|
1576
1609
|
validation
|
|
1577
1610
|
} = t0;
|
|
1578
1611
|
return validation.isValidating;
|
|
1579
1612
|
}
|
|
1580
|
-
function
|
|
1613
|
+
function _temp4$1(t0) {
|
|
1581
1614
|
const {
|
|
1582
1615
|
validation: validation_0
|
|
1583
1616
|
} = t0;
|