sanity 6.3.0 → 6.3.1-next.3
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 +96 -6
- package/lib/_chunks-dts/index.d.ts +7 -1
- package/lib/_chunks-es/ReleasesTool.js +4 -4
- package/lib/_chunks-es/ReleasesTool.js.map +1 -1
- package/lib/_chunks-es/VariantsTool.js +182 -101
- package/lib/_chunks-es/VariantsTool.js.map +1 -1
- package/lib/_chunks-es/index2.js +971 -774
- package/lib/_chunks-es/index2.js.map +1 -1
- package/lib/_chunks-es/resources.js +12 -0
- package/lib/_chunks-es/resources.js.map +1 -1
- package/lib/_chunks-es/resources8.js +4 -0
- package/lib/_chunks-es/resources8.js.map +1 -1
- package/lib/_chunks-es/structureTool.js +529 -318
- package/lib/_chunks-es/structureTool.js.map +1 -1
- package/lib/_chunks-es/version.js +2 -2
- package/lib/_singletons.d.ts +1 -1
- package/lib/index.d.ts +2 -2
- package/lib/index.js +10 -1
- package/package.json +10 -10
package/lib/_chunks-es/index2.js
CHANGED
|
@@ -797,6 +797,16 @@ function getReferencePaths(document2, referenceToId) {
|
|
|
797
797
|
key.startsWith("_") || traverse2(document2[key], [key]);
|
|
798
798
|
}), referencePaths;
|
|
799
799
|
}
|
|
800
|
+
function getTargetDocument({
|
|
801
|
+
bundle,
|
|
802
|
+
documentVersions,
|
|
803
|
+
variant
|
|
804
|
+
}) {
|
|
805
|
+
return documentVersions.find((version2) => {
|
|
806
|
+
const inBundle = bundle === "published" ? !version2._system.bundleId : version2._system.bundleId === bundle, inVariant = variant ? version2._system.variant?._ref === variant : !version2._system.variant;
|
|
807
|
+
return inBundle && inVariant;
|
|
808
|
+
});
|
|
809
|
+
}
|
|
800
810
|
function getGlobalScope() {
|
|
801
811
|
if (typeof globalThis < "u") return globalThis;
|
|
802
812
|
if (typeof window < "u") return window;
|
|
@@ -959,6 +969,18 @@ function useUnique(value) {
|
|
|
959
969
|
const [previous, setPrevious] = useState(value);
|
|
960
970
|
return isEqual$1(previous, value) ? previous : (setPrevious(value), value);
|
|
961
971
|
}
|
|
972
|
+
function isPublishedVersion(version2) {
|
|
973
|
+
return version2._system.group._ref === version2._id && !version2._system.variant && !version2._system.release && !version2._system.bundleId;
|
|
974
|
+
}
|
|
975
|
+
function isDraftVersion(version2) {
|
|
976
|
+
return !version2._system?.variant && !version2._system?.release && version2._system?.bundleId === "drafts";
|
|
977
|
+
}
|
|
978
|
+
function isVariantVersion(version2) {
|
|
979
|
+
return !!version2._system?.variant;
|
|
980
|
+
}
|
|
981
|
+
function isReleaseVersion(version2) {
|
|
982
|
+
return !!version2._system?.release;
|
|
983
|
+
}
|
|
962
984
|
const EMPTY_AUTH_STATES = {}, useWorkspaceAuthStates = createHookFromObservableFactory((workspaces) => workspaces.length === 0 ? of(EMPTY_AUTH_STATES) : merge(...workspaces.map((workspace) => workspace.auth.state.pipe(map((state) => [workspace.name, state])))).pipe(scan((acc, [name, state]) => ({
|
|
963
985
|
...acc,
|
|
964
986
|
[name]: state
|
|
@@ -968,7 +990,7 @@ function VisibleWorkspacesProvider(t0) {
|
|
|
968
990
|
children
|
|
969
991
|
} = t0, allWorkspaces = useWorkspaces();
|
|
970
992
|
let t1;
|
|
971
|
-
$[0] !== allWorkspaces ? (t1 = allWorkspaces.filter(_temp$
|
|
993
|
+
$[0] !== allWorkspaces ? (t1 = allWorkspaces.filter(_temp$3P), $[0] = allWorkspaces, $[1] = t1) : t1 = $[1];
|
|
972
994
|
const workspacesNeedingAuth = t1, [workspaceAuthStates] = useWorkspaceAuthStates(workspacesNeedingAuth);
|
|
973
995
|
let t2;
|
|
974
996
|
if ($[2] !== allWorkspaces || $[3] !== workspaceAuthStates) {
|
|
@@ -985,7 +1007,7 @@ function VisibleWorkspacesProvider(t0) {
|
|
|
985
1007
|
let t4;
|
|
986
1008
|
return $[10] !== children || $[11] !== value ? (t4 = /* @__PURE__ */ jsx(VisibleWorkspacesContext.Provider, { value, children }), $[10] = children, $[11] = value, $[12] = t4) : t4 = $[12], t4;
|
|
987
1009
|
}
|
|
988
|
-
function _temp$
|
|
1010
|
+
function _temp$3P(workspace) {
|
|
989
1011
|
return typeof workspace.hidden == "function";
|
|
990
1012
|
}
|
|
991
1013
|
const DEBUG_MODE$2 = !1, SPINNER_DELAY = 750, TEXT_DELAY = 2e3, StyledCard$6 = /* @__PURE__ */ styled(Card).withConfig({
|
|
@@ -2515,7 +2537,13 @@ const studioLocaleNamespace = "studio", validationLocaleNamespace = "validation"
|
|
|
2515
2537
|
"release.action.view-scheduled-drafts": "View scheduled drafts",
|
|
2516
2538
|
/** Label for banner when release is scheduled */
|
|
2517
2539
|
"release.banner.scheduled-for-publishing-on": "Scheduled to be published on {{date}}",
|
|
2540
|
+
/** Label for button to show other variants in the document perspective list */
|
|
2541
|
+
"release.chip.button.other-variants_one": "+{{count}} variant",
|
|
2542
|
+
/** Label for button to show other variants in the document perspective list */
|
|
2543
|
+
"release.chip.button.other-variants_other": "+{{count}} variants",
|
|
2544
|
+
/** Label for button to show other versions in the document perspective list*/
|
|
2518
2545
|
"release.chip.button.other-versions_one": "+{{count}} version",
|
|
2546
|
+
/** Label for button to show other versions in the document perspective list */
|
|
2519
2547
|
"release.chip.button.other-versions_other": "+{{count}} versions",
|
|
2520
2548
|
/** Label for Draft chip in document header */
|
|
2521
2549
|
"release.chip.draft": "Draft",
|
|
@@ -2537,6 +2565,8 @@ const studioLocaleNamespace = "studio", validationLocaleNamespace = "validation"
|
|
|
2537
2565
|
"release.chip.tooltip.no-edits": "No edits",
|
|
2538
2566
|
/** Label for tooltip in chip when document isn't published */
|
|
2539
2567
|
"release.chip.tooltip.not-published": "Not published",
|
|
2568
|
+
"release.chip.tooltip.other-variants_one": "One variant",
|
|
2569
|
+
"release.chip.tooltip.other-variants_other": "{{count}} variants",
|
|
2540
2570
|
"release.chip.tooltip.other-versions_one": "One additional version outside of releases",
|
|
2541
2571
|
"release.chip.tooltip.other-versions_other": "{{count}} additional versions outside of releases",
|
|
2542
2572
|
/** Label for tooltip in chip with the published date */
|
|
@@ -3477,7 +3507,7 @@ function useGetI18nText(input) {
|
|
|
3477
3507
|
let t0;
|
|
3478
3508
|
if ($[0] !== input) {
|
|
3479
3509
|
const items = Array.isArray(input) ? input : [input];
|
|
3480
|
-
t0 = JSON.stringify(items.flatMap(_temp2$
|
|
3510
|
+
t0 = JSON.stringify(items.flatMap(_temp2$1B).filter(isNonNullable$2).sort()), $[0] = input, $[1] = t0;
|
|
3481
3511
|
} else
|
|
3482
3512
|
t0 = $[1];
|
|
3483
3513
|
const stableNamespaces = t0;
|
|
@@ -3511,10 +3541,10 @@ function useGetI18nText(input) {
|
|
|
3511
3541
|
}) : node;
|
|
3512
3542
|
}, $[4] = t, $[5] = t2) : t2 = $[5], t2;
|
|
3513
3543
|
}
|
|
3514
|
-
function _temp2$
|
|
3515
|
-
return item?.i18n ? Object.values(item.i18n).map(_temp$
|
|
3544
|
+
function _temp2$1B(item) {
|
|
3545
|
+
return item?.i18n ? Object.values(item.i18n).map(_temp$3O) : [];
|
|
3516
3546
|
}
|
|
3517
|
-
function _temp$
|
|
3547
|
+
function _temp$3O(t0) {
|
|
3518
3548
|
const {
|
|
3519
3549
|
ns
|
|
3520
3550
|
} = t0;
|
|
@@ -3530,7 +3560,7 @@ function useI18nText(node) {
|
|
|
3530
3560
|
break bb0;
|
|
3531
3561
|
}
|
|
3532
3562
|
let t12;
|
|
3533
|
-
$[1] !== node.i18n ? (t12 = Array.from(new Set(Object.values(node.i18n).map(_temp$
|
|
3563
|
+
$[1] !== node.i18n ? (t12 = Array.from(new Set(Object.values(node.i18n).map(_temp$3N))).sort(), $[1] = node.i18n, $[2] = t12) : t12 = $[2], t0 = t12;
|
|
3534
3564
|
}
|
|
3535
3565
|
const namespaces = t0, {
|
|
3536
3566
|
t
|
|
@@ -3568,7 +3598,7 @@ function useI18nText(node) {
|
|
|
3568
3598
|
}
|
|
3569
3599
|
return t1;
|
|
3570
3600
|
}
|
|
3571
|
-
function _temp$
|
|
3601
|
+
function _temp$3N(t0) {
|
|
3572
3602
|
const {
|
|
3573
3603
|
ns
|
|
3574
3604
|
} = t0;
|
|
@@ -3862,7 +3892,7 @@ function useEnsureMediaLibrary(props2) {
|
|
|
3862
3892
|
bb0: {
|
|
3863
3893
|
const handleDefault = defaultIfEmpty({
|
|
3864
3894
|
status: "inactive"
|
|
3865
|
-
}), handleError = catchError$1(_temp$
|
|
3895
|
+
}), handleError = catchError$1(_temp$3M);
|
|
3866
3896
|
if (props2.from === "library") {
|
|
3867
3897
|
let t23;
|
|
3868
3898
|
$[6] !== props2.libraryId ? (t23 = (organizationId) => ({
|
|
@@ -3893,7 +3923,7 @@ function useEnsureMediaLibrary(props2) {
|
|
|
3893
3923
|
status: "loading"
|
|
3894
3924
|
}, $[10] = t2) : t2 = $[10], useObservable(observable, t2);
|
|
3895
3925
|
}
|
|
3896
|
-
function _temp$
|
|
3926
|
+
function _temp$3M(error) {
|
|
3897
3927
|
if (error instanceof ProvisionError)
|
|
3898
3928
|
return of({
|
|
3899
3929
|
status: "error",
|
|
@@ -4639,7 +4669,7 @@ function useAgentVersionDisplay(versionIds, activeBundleId) {
|
|
|
4639
4669
|
t
|
|
4640
4670
|
} = useTranslation();
|
|
4641
4671
|
let t0;
|
|
4642
|
-
$[0] !== bundles ? (t0 = new Set(bundles.map(_temp$
|
|
4672
|
+
$[0] !== bundles ? (t0 = new Set(bundles.map(_temp$3L)), $[0] = bundles, $[1] = t0) : t0 = $[1];
|
|
4643
4673
|
const myBundleIds = t0;
|
|
4644
4674
|
let t1;
|
|
4645
4675
|
if ($[2] !== activeBundleId || $[3] !== loading || $[4] !== myBundleIds || $[5] !== versionIds) {
|
|
@@ -4689,7 +4719,7 @@ function useAgentVersionDisplay(versionIds, activeBundleId) {
|
|
|
4689
4719
|
getVersionDisplay
|
|
4690
4720
|
}, $[29] = filteredVersionIds, $[30] = getVersionDisplay, $[31] = t8) : t8 = $[31], t8;
|
|
4691
4721
|
}
|
|
4692
|
-
function _temp$
|
|
4722
|
+
function _temp$3L(b) {
|
|
4693
4723
|
return b.id;
|
|
4694
4724
|
}
|
|
4695
4725
|
const hasSanityPackageInImportMap = () => !!getSanityImportMapUrl(), getSanityImportMapUrl = () => {
|
|
@@ -8438,7 +8468,7 @@ function useInitialValue(props2) {
|
|
|
8438
8468
|
}, t4 = [defaultValue2, documentId, documentStore, documentType, templateName, templateParams, context], $[8] = context, $[9] = defaultValue2, $[10] = documentId, $[11] = documentStore, $[12] = documentType, $[13] = templateName, $[14] = templateParams, $[15] = t3, $[16] = t4) : (t3 = $[15], t4 = $[16]), useEffect(t3, t4), state;
|
|
8439
8469
|
}
|
|
8440
8470
|
function useInitialValueResolverContext() {
|
|
8441
|
-
const $ = c(6), source = useSource(), schema2 = useSchema(), currentUser = useCurrentUser(), projectId = useProjectId(), dataset = useDataset(), getClient2 = source.getClient;
|
|
8471
|
+
const $ = c(6), source = useSource(), schema2 = useSchema(), currentUser = useCurrentUser(), projectId = useProjectId$1(), dataset = useDataset(), getClient2 = source.getClient;
|
|
8442
8472
|
let t0;
|
|
8443
8473
|
return $[0] !== currentUser || $[1] !== dataset || $[2] !== getClient2 || $[3] !== projectId || $[4] !== schema2 ? (t0 = {
|
|
8444
8474
|
projectId,
|
|
@@ -8658,7 +8688,7 @@ function useDocumentValuePermissions(t0) {
|
|
|
8658
8688
|
document: document2,
|
|
8659
8689
|
permission
|
|
8660
8690
|
});
|
|
8661
|
-
return subscriptionRef.current = permissions$.pipe(distinctUntilChanged$1(_temp$
|
|
8691
|
+
return subscriptionRef.current = permissions$.pipe(distinctUntilChanged$1(_temp$3K)).subscribe({
|
|
8662
8692
|
next: (value) => dispatch({
|
|
8663
8693
|
type: "value",
|
|
8664
8694
|
value
|
|
@@ -8672,7 +8702,7 @@ function useDocumentValuePermissions(t0) {
|
|
|
8672
8702
|
};
|
|
8673
8703
|
}, t2 = [grantsStore, document2, permission], $[0] = document2, $[1] = grantsStore, $[2] = permission, $[3] = t1, $[4] = t2) : (t1 = $[3], t2 = $[4]), useEffect(t1, t2), state;
|
|
8674
8704
|
}
|
|
8675
|
-
function _temp$
|
|
8705
|
+
function _temp$3K(prev, next) {
|
|
8676
8706
|
return isEqual$1(prev, next);
|
|
8677
8707
|
}
|
|
8678
8708
|
function refCountDelay(duration, scheduler = asapScheduler) {
|
|
@@ -9873,7 +9903,7 @@ function useTimelineStore(t0) {
|
|
|
9873
9903
|
$[23] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = () => timelineStateRef.current, $[23] = t10) : t10 = $[23];
|
|
9874
9904
|
let t11;
|
|
9875
9905
|
$[24] !== onError || $[25] !== timelineController$ ? (t11 = (callback) => {
|
|
9876
|
-
const subscription = timelineController$.pipe(map$1(_temp3$
|
|
9906
|
+
const subscription = timelineController$.pipe(map$1(_temp3$L), distinctUntilChanged$1(deepEquals), catchError$1((err_0) => (onError?.(err_0), of(INITIAL_TIMELINE_STATE))), tap$1((timelineState) => {
|
|
9877
9907
|
timelineStateRef.current = timelineState;
|
|
9878
9908
|
}), tap$1(callback)).subscribe();
|
|
9879
9909
|
return () => subscription.unsubscribe();
|
|
@@ -9887,8 +9917,8 @@ function useTimelineStore(t0) {
|
|
|
9887
9917
|
subscribe: t11
|
|
9888
9918
|
}, $[27] = t11, $[28] = t7, $[29] = t8, $[30] = t9, $[31] = t12) : t12 = $[31], t12;
|
|
9889
9919
|
}
|
|
9890
|
-
function _temp3$
|
|
9891
|
-
const chunks = innerController_0.timeline.mapChunks(_temp$
|
|
9920
|
+
function _temp3$L(innerController_0) {
|
|
9921
|
+
const chunks = innerController_0.timeline.mapChunks(_temp$3J), lastNonDeletedChunk = chunks.filter(_temp2$1A), hasMoreChunks = !innerController_0.timeline.reachedEarliestEntry;
|
|
9892
9922
|
hasMoreChunks && chunks.length > 16 && innerController_0.setLoadMore(!1);
|
|
9893
9923
|
const timelineReady = !["invalid", "loading"].includes(innerController_0.selectionState);
|
|
9894
9924
|
return {
|
|
@@ -9908,10 +9938,10 @@ function _temp3$M(innerController_0) {
|
|
|
9908
9938
|
timelineReady
|
|
9909
9939
|
};
|
|
9910
9940
|
}
|
|
9911
|
-
function _temp2$
|
|
9941
|
+
function _temp2$1A(chunk_1) {
|
|
9912
9942
|
return !["delete", "initial"].includes(chunk_1.type);
|
|
9913
9943
|
}
|
|
9914
|
-
function _temp$
|
|
9944
|
+
function _temp$3J(c2) {
|
|
9915
9945
|
return c2;
|
|
9916
9946
|
}
|
|
9917
9947
|
function createMemoryStorage() {
|
|
@@ -10381,11 +10411,11 @@ function createMultiKeyWeakMap() {
|
|
|
10381
10411
|
function ResourceCacheProvider(t0) {
|
|
10382
10412
|
const $ = c(3), {
|
|
10383
10413
|
children
|
|
10384
|
-
} = t0, [resourceCache] = useState(_temp$
|
|
10414
|
+
} = t0, [resourceCache] = useState(_temp$3I);
|
|
10385
10415
|
let t1;
|
|
10386
10416
|
return $[0] !== children || $[1] !== resourceCache ? (t1 = /* @__PURE__ */ jsx(ResourceCacheContext.Provider, { value: resourceCache, children }), $[0] = children, $[1] = resourceCache, $[2] = t1) : t1 = $[2], t1;
|
|
10387
10417
|
}
|
|
10388
|
-
function _temp$
|
|
10418
|
+
function _temp$3I() {
|
|
10389
10419
|
const namespaces = /* @__PURE__ */ new Map(), nullReplacer = {}, emptyDependenciesReplacer = [nullReplacer], removeNullDependencies = (dependencies) => dependencies.length ? dependencies.map((dep) => dep === null ? nullReplacer : dep) : emptyDependenciesReplacer;
|
|
10390
10420
|
return {
|
|
10391
10421
|
get: (t0) => {
|
|
@@ -11716,7 +11746,7 @@ function useEventsStore(t0) {
|
|
|
11716
11746
|
}, $[52] = events, $[53] = rev, $[54] = revisionId, $[55] = t13) : t13 = $[55];
|
|
11717
11747
|
const findRangeForSince = t13;
|
|
11718
11748
|
let t14;
|
|
11719
|
-
$[56] !== events ? (t14 = events.find(_temp$
|
|
11749
|
+
$[56] !== events ? (t14 = events.find(_temp$3H)?.id || null, $[56] = events, $[57] = t14) : t14 = $[57];
|
|
11720
11750
|
const lastNonDeletedRevId = t14;
|
|
11721
11751
|
let t15;
|
|
11722
11752
|
return $[58] !== error || $[59] !== events || $[60] !== eventsStore.handleExpandEvent || $[61] !== eventsStore.loadMoreEvents || $[62] !== findRangeForRevision || $[63] !== findRangeForSince || $[64] !== getChangesList || $[65] !== getDocumentAtRevision$12 || $[66] !== lastNonDeletedRevId || $[67] !== loading || $[68] !== nextCursor || $[69] !== revision_0 || $[70] !== sinceRevision ? (t15 = {
|
|
@@ -11735,30 +11765,30 @@ function useEventsStore(t0) {
|
|
|
11735
11765
|
lastNonDeletedRevId
|
|
11736
11766
|
}, $[58] = error, $[59] = events, $[60] = eventsStore.handleExpandEvent, $[61] = eventsStore.loadMoreEvents, $[62] = findRangeForRevision, $[63] = findRangeForSince, $[64] = getChangesList, $[65] = getDocumentAtRevision$12, $[66] = lastNonDeletedRevId, $[67] = loading, $[68] = nextCursor, $[69] = revision_0, $[70] = sinceRevision, $[71] = t15) : t15 = $[71], t15;
|
|
11737
11767
|
}
|
|
11738
|
-
function _temp$
|
|
11768
|
+
function _temp$3H(e_1) {
|
|
11739
11769
|
return !isDeleteDocumentGroupEvent(e_1) && !isDeleteDocumentVersionEvent(e_1);
|
|
11740
11770
|
}
|
|
11741
11771
|
const initial$1 = [], fallback$1 = of(initial$1);
|
|
11742
11772
|
function useDocumentPresence(documentId) {
|
|
11743
|
-
const $ = c(6), [mounted, mount] = useReducer(_temp$
|
|
11773
|
+
const $ = c(6), [mounted, mount] = useReducer(_temp$3G, !1);
|
|
11744
11774
|
let t0, t1;
|
|
11745
11775
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => startTransition(mount), t1 = [], $[0] = t0, $[1] = t1) : (t0 = $[0], t1 = $[1]), useEffect(t0, t1);
|
|
11746
11776
|
const presenceStore = usePresenceStore();
|
|
11747
11777
|
let t2;
|
|
11748
11778
|
return $[2] !== documentId || $[3] !== mounted || $[4] !== presenceStore ? (t2 = mounted ? presenceStore.documentPresence(documentId) : fallback$1, $[2] = documentId, $[3] = mounted, $[4] = presenceStore, $[5] = t2) : t2 = $[5], useObservable(t2, initial$1);
|
|
11749
11779
|
}
|
|
11750
|
-
function _temp$
|
|
11780
|
+
function _temp$3G() {
|
|
11751
11781
|
return !0;
|
|
11752
11782
|
}
|
|
11753
11783
|
const initial = [], fallback = of(initial);
|
|
11754
11784
|
function useGlobalPresence() {
|
|
11755
|
-
const $ = c(2), [mounted, mount] = useReducer(_temp$
|
|
11785
|
+
const $ = c(2), [mounted, mount] = useReducer(_temp$3F, !1);
|
|
11756
11786
|
let t0, t1;
|
|
11757
11787
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => startTransition(mount), t1 = [], $[0] = t0, $[1] = t1) : (t0 = $[0], t1 = $[1]), useEffect(t0, t1);
|
|
11758
11788
|
const presenceStore = usePresenceStore();
|
|
11759
11789
|
return useObservable(mounted ? presenceStore.globalPresence$ : fallback, initial);
|
|
11760
11790
|
}
|
|
11761
|
-
function _temp$
|
|
11791
|
+
function _temp$3F() {
|
|
11762
11792
|
return !0;
|
|
11763
11793
|
}
|
|
11764
11794
|
const AvatarSkeleton$1 = /* @__PURE__ */ styled(Skeleton).withConfig({
|
|
@@ -11877,7 +11907,7 @@ function useRelativeTime(time, t0) {
|
|
|
11877
11907
|
const $ = c(5);
|
|
11878
11908
|
let t1;
|
|
11879
11909
|
$[0] !== t0 ? (t1 = t0 === void 0 ? {} : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
11880
|
-
const options = t1, [now, updateNow] = useReducer(_temp$
|
|
11910
|
+
const options = t1, [now, updateNow] = useReducer(_temp$3E, null, _temp2$1z), resolved = useFormatRelativeTime(time, options.relativeTo || now, options);
|
|
11881
11911
|
let t2, t3;
|
|
11882
11912
|
return $[2] !== resolved.refreshInterval ? (t2 = () => {
|
|
11883
11913
|
let timerId;
|
|
@@ -11891,10 +11921,10 @@ function useRelativeTime(time, t0) {
|
|
|
11891
11921
|
};
|
|
11892
11922
|
}, t3 = [resolved.refreshInterval], $[2] = resolved.refreshInterval, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), useEffect(t2, t3), resolved.timestamp;
|
|
11893
11923
|
}
|
|
11894
|
-
function _temp2$
|
|
11924
|
+
function _temp2$1z() {
|
|
11895
11925
|
return Date.now();
|
|
11896
11926
|
}
|
|
11897
|
-
function _temp$
|
|
11927
|
+
function _temp$3E() {
|
|
11898
11928
|
return Date.now();
|
|
11899
11929
|
}
|
|
11900
11930
|
function useFormatRelativeTime(date, now, t0) {
|
|
@@ -12291,7 +12321,7 @@ const IconBox$1 = /* @__PURE__ */ styled(Flex).withConfig({
|
|
|
12291
12321
|
let t2;
|
|
12292
12322
|
$[2] !== t1 ? (t2 = /* @__PURE__ */ jsx(Box, { padding: 1, paddingBottom: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, weight: "medium", children: t1 }) }), $[2] = t1, $[3] = t2) : t2 = $[3];
|
|
12293
12323
|
let t3;
|
|
12294
|
-
$[4] !== collaborators ? (t3 = collaborators.map(_temp$
|
|
12324
|
+
$[4] !== collaborators ? (t3 = collaborators.map(_temp$3D), $[4] = collaborators, $[5] = t3) : t3 = $[5];
|
|
12295
12325
|
let t4;
|
|
12296
12326
|
return $[6] !== t2 || $[7] !== t3 ? (t4 = /* @__PURE__ */ jsxs(Stack, { paddingBottom: 1, children: [
|
|
12297
12327
|
t2,
|
|
@@ -12392,7 +12422,7 @@ function Event$1(t0) {
|
|
|
12392
12422
|
t23
|
|
12393
12423
|
] }), $[52] = t22, $[53] = t23, $[54] = t24) : t24 = $[54], t24;
|
|
12394
12424
|
}
|
|
12395
|
-
function _temp$
|
|
12425
|
+
function _temp$3D(userId) {
|
|
12396
12426
|
return /* @__PURE__ */ jsx(UserLine, { userId }, userId);
|
|
12397
12427
|
}
|
|
12398
12428
|
function DiffTooltip(props2) {
|
|
@@ -12441,7 +12471,7 @@ function DiffTooltipWithAnnotation(props2) {
|
|
|
12441
12471
|
let t2;
|
|
12442
12472
|
$[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, weight: "medium", children: t1 }), $[9] = t1, $[10] = t2) : t2 = $[10];
|
|
12443
12473
|
let t3;
|
|
12444
|
-
$[11] !== annotations ? (t3 = annotations.map(_temp$
|
|
12474
|
+
$[11] !== annotations ? (t3 = annotations.map(_temp$3C), $[11] = annotations, $[12] = t3) : t3 = $[12];
|
|
12445
12475
|
let t4;
|
|
12446
12476
|
$[13] !== t3 ? (t4 = /* @__PURE__ */ jsx(Stack, { space: 2, children: t3 }), $[13] = t3, $[14] = t4) : t4 = $[14];
|
|
12447
12477
|
let t5;
|
|
@@ -12453,7 +12483,7 @@ function DiffTooltipWithAnnotation(props2) {
|
|
|
12453
12483
|
let t6;
|
|
12454
12484
|
return $[18] !== children || $[19] !== content || $[20] !== restProps ? (t6 = /* @__PURE__ */ jsx(LegacyLayerProvider, { zOffset: "paneFooter", children: /* @__PURE__ */ jsx(Tooltip, { content, portal: !0, ...restProps, children }) }), $[18] = children, $[19] = content, $[20] = restProps, $[21] = t6) : t6 = $[21], t6;
|
|
12455
12485
|
}
|
|
12456
|
-
function _temp$
|
|
12486
|
+
function _temp$3C(annotation, idx) {
|
|
12457
12487
|
return /* @__PURE__ */ jsx(AnnotationItem, { annotation }, idx);
|
|
12458
12488
|
}
|
|
12459
12489
|
function AnnotationItem(t0) {
|
|
@@ -13333,12 +13363,12 @@ const SizeDiff = styled.div.withConfig({
|
|
|
13333
13363
|
$[2] !== fields ? (t3 = Object.entries(fields).filter((t42) => {
|
|
13334
13364
|
const [name, field] = t42;
|
|
13335
13365
|
return field.isChanged && !ignoredFields.includes(name);
|
|
13336
|
-
}).map(_temp$
|
|
13366
|
+
}).map(_temp$3B), $[2] = fields, $[3] = t3) : t3 = $[3];
|
|
13337
13367
|
const changedFields = t3, didAssetChange = changedFields.includes("asset");
|
|
13338
13368
|
let t4;
|
|
13339
13369
|
if ($[4] !== changedFields || $[5] !== schemaType.fields) {
|
|
13340
13370
|
let t52;
|
|
13341
|
-
$[7] !== changedFields ? (t52 = (field_0) => field_0.name !== "asset" && changedFields.includes(field_0.name), $[7] = changedFields, $[8] = t52) : t52 = $[8], t4 = schemaType.fields.filter(t52).map(_temp2$
|
|
13371
|
+
$[7] !== changedFields ? (t52 = (field_0) => field_0.name !== "asset" && changedFields.includes(field_0.name), $[7] = changedFields, $[8] = t52) : t52 = $[8], t4 = schemaType.fields.filter(t52).map(_temp2$1y), $[4] = changedFields, $[5] = schemaType.fields, $[6] = t4;
|
|
13342
13372
|
} else
|
|
13343
13373
|
t4 = $[6];
|
|
13344
13374
|
const nestedFields = t4, pctDiff = getSizeDiff(prev?.size, next?.size);
|
|
@@ -13392,11 +13422,11 @@ const SizeDiff = styled.div.withConfig({
|
|
|
13392
13422
|
t15
|
|
13393
13423
|
] }), $[50] = t14, $[51] = t15, $[52] = t16) : t16 = $[52], t16;
|
|
13394
13424
|
};
|
|
13395
|
-
function _temp$
|
|
13425
|
+
function _temp$3B(t0) {
|
|
13396
13426
|
const [name_0] = t0;
|
|
13397
13427
|
return name_0;
|
|
13398
13428
|
}
|
|
13399
|
-
function _temp2$
|
|
13429
|
+
function _temp2$1y(field_1) {
|
|
13400
13430
|
return field_1.name;
|
|
13401
13431
|
}
|
|
13402
13432
|
function hexToRgba(hex2, opacity) {
|
|
@@ -13609,7 +13639,7 @@ const IMAGE_META_FIELDS = ["crop", "hotspot"], BASE_IMAGE_FIELDS = ["asset", "me
|
|
|
13609
13639
|
let t4;
|
|
13610
13640
|
if ($[7] !== changedFields || $[8] !== schemaType.fields) {
|
|
13611
13641
|
let t52;
|
|
13612
|
-
$[10] !== changedFields ? (t52 = (field) => !BASE_IMAGE_FIELDS.includes(field.name) && changedFields.includes(field.name), $[10] = changedFields, $[11] = t52) : t52 = $[11], t4 = schemaType.fields.filter(t52).map(_temp$
|
|
13642
|
+
$[10] !== changedFields ? (t52 = (field) => !BASE_IMAGE_FIELDS.includes(field.name) && changedFields.includes(field.name), $[10] = changedFields, $[11] = t52) : t52 = $[11], t4 = schemaType.fields.filter(t52).map(_temp$3A), $[7] = changedFields, $[8] = schemaType.fields, $[9] = t4;
|
|
13613
13643
|
} else
|
|
13614
13644
|
t4 = $[9];
|
|
13615
13645
|
const nestedFields = t4;
|
|
@@ -13658,7 +13688,7 @@ function getChangeDescription(action, t) {
|
|
|
13658
13688
|
return "Unknown change";
|
|
13659
13689
|
}
|
|
13660
13690
|
}
|
|
13661
|
-
function _temp$
|
|
13691
|
+
function _temp$3A(field_0) {
|
|
13662
13692
|
return field_0.name;
|
|
13663
13693
|
}
|
|
13664
13694
|
const NumberWrapper = styled.div.withConfig({
|
|
@@ -14926,7 +14956,7 @@ function DiffInspectWrapper(props2) {
|
|
|
14926
14956
|
} = props2, $[0] = props2, $[1] = as, $[2] = change, $[3] = children, $[4] = restProps) : (as = $[1], change = $[2], children = $[3], restProps = $[4]);
|
|
14927
14957
|
const isHovering = useRef(!1), [isInspecting, setIsInspecting] = useState(!1);
|
|
14928
14958
|
let t0;
|
|
14929
|
-
$[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => setIsInspecting(_temp$
|
|
14959
|
+
$[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => setIsInspecting(_temp$3z), $[5] = t0) : t0 = $[5];
|
|
14930
14960
|
const toggleInspect = t0;
|
|
14931
14961
|
let t1;
|
|
14932
14962
|
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => isHovering.current = !0, $[6] = t1) : t1 = $[6];
|
|
@@ -14950,7 +14980,7 @@ function DiffInspectWrapper(props2) {
|
|
|
14950
14980
|
let t6;
|
|
14951
14981
|
return $[14] !== as || $[15] !== restProps || $[16] !== t5 ? (t6 = /* @__PURE__ */ jsx(Box, { as, onMouseEnter: handleMouseEnter, onMouseLeave: handleMouseLeave, ...restProps, children: t5 }), $[14] = as, $[15] = restProps, $[16] = t5, $[17] = t6) : t6 = $[17], t6;
|
|
14952
14982
|
}
|
|
14953
|
-
function _temp$
|
|
14983
|
+
function _temp$3z(state) {
|
|
14954
14984
|
return !state;
|
|
14955
14985
|
}
|
|
14956
14986
|
const MetaLabel = (t0) => {
|
|
@@ -15298,7 +15328,7 @@ function FieldChange(props2) {
|
|
|
15298
15328
|
}, $[17] = t7) : t7 = $[17];
|
|
15299
15329
|
const handleRevertButtonMouseLeave = t7;
|
|
15300
15330
|
let t8;
|
|
15301
|
-
$[18] !== change.parentSchema ? (t8 = change.parentSchema?.jsonType === "array" && !change.parentSchema.of.some(_temp$
|
|
15331
|
+
$[18] !== change.parentSchema ? (t8 = change.parentSchema?.jsonType === "array" && !change.parentSchema.of.some(_temp$3y), $[18] = change.parentSchema, $[19] = t8) : t8 = $[19];
|
|
15302
15332
|
const isArray2 = t8;
|
|
15303
15333
|
let t9;
|
|
15304
15334
|
$[20] !== change.path || $[21] !== isArray2 ? (t9 = isArray2 ? change.path.slice(0, -1) : change.path, $[20] = change.path, $[21] = isArray2, $[22] = t9) : t9 = $[22];
|
|
@@ -15339,7 +15369,7 @@ function FieldChange(props2) {
|
|
|
15339
15369
|
t21
|
|
15340
15370
|
] }), $[65] = t20, $[66] = t21, $[67] = t22) : t22 = $[67], t22;
|
|
15341
15371
|
}
|
|
15342
|
-
function _temp$
|
|
15372
|
+
function _temp$3y(ofType) {
|
|
15343
15373
|
return ofType.type?.name === "block";
|
|
15344
15374
|
}
|
|
15345
15375
|
const ChangeListWrapper = styled.div.withConfig({
|
|
@@ -15378,7 +15408,7 @@ function GroupChange(props2) {
|
|
|
15378
15408
|
isComparingCurrent
|
|
15379
15409
|
} = useDocumentChange(), FieldWrapper2 = t0 === void 0 ? Fragment : t0;
|
|
15380
15410
|
let t1;
|
|
15381
|
-
$[5] !== changes ? (t1 = changes.every(_temp$
|
|
15411
|
+
$[5] !== changes ? (t1 = changes.every(_temp$3x), $[5] = changes, $[6] = t1) : t1 = $[6];
|
|
15382
15412
|
const isPortableText2 = t1;
|
|
15383
15413
|
let t2;
|
|
15384
15414
|
$[7] !== diffPath || $[8] !== groupPath ? (t2 = pathsAreEqual(diffPath, groupPath), $[7] = diffPath, $[8] = groupPath, $[9] = t2) : t2 = $[9];
|
|
@@ -15422,7 +15452,7 @@ function GroupChange(props2) {
|
|
|
15422
15452
|
] }), $[20] = changes, $[21] = confirmRevertOpen, $[22] = group2.key, $[23] = group2.path.length, $[24] = handleRevertChanges, $[25] = hidden, $[26] = isComparingCurrent, $[27] = isPermissionsLoading, $[28] = isPortableText2, $[29] = isRevertButtonHovered, $[30] = permissions?.granted, $[31] = readOnly, $[32] = revertButtonElement, $[33] = t8) : t8 = $[33];
|
|
15423
15453
|
const content = t8;
|
|
15424
15454
|
let t9;
|
|
15425
|
-
$[34] !== group2.schemaType ? (t9 = group2.schemaType?.jsonType === "array" && group2.schemaType.of.some(_temp2$
|
|
15455
|
+
$[34] !== group2.schemaType ? (t9 = group2.schemaType?.jsonType === "array" && group2.schemaType.of.some(_temp2$1x), $[34] = group2.schemaType, $[35] = t9) : t9 = $[35];
|
|
15426
15456
|
const isPortableTextGroupArray = t9;
|
|
15427
15457
|
let t10;
|
|
15428
15458
|
return $[36] !== FieldWrapper2 || $[37] !== content || $[38] !== groupPath || $[39] !== hidden || $[40] !== isNestedInDiff || $[41] !== isPortableTextGroupArray || $[42] !== isRevertButtonHovered || $[43] !== restProps || $[44] !== titlePath ? (t10 = hidden ? null : /* @__PURE__ */ jsxs(Stack, { space: 1, ...restProps, children: [
|
|
@@ -15430,10 +15460,10 @@ function GroupChange(props2) {
|
|
|
15430
15460
|
isNestedInDiff || isPortableTextGroupArray ? content : /* @__PURE__ */ jsx(FieldWrapper2, { hasRevertHover: isRevertButtonHovered, path: groupPath, children: content })
|
|
15431
15461
|
] }), $[36] = FieldWrapper2, $[37] = content, $[38] = groupPath, $[39] = hidden, $[40] = isNestedInDiff, $[41] = isPortableTextGroupArray, $[42] = isRevertButtonHovered, $[43] = restProps, $[44] = titlePath, $[45] = t10) : t10 = $[45], t10;
|
|
15432
15462
|
}
|
|
15433
|
-
function _temp2$
|
|
15463
|
+
function _temp2$1x(ofType) {
|
|
15434
15464
|
return ofType.name === "block";
|
|
15435
15465
|
}
|
|
15436
|
-
function _temp$
|
|
15466
|
+
function _temp$3x(change) {
|
|
15437
15467
|
return isFieldChange(change) && isPTSchemaType(change.schemaType);
|
|
15438
15468
|
}
|
|
15439
15469
|
function useHover(node) {
|
|
@@ -15631,7 +15661,7 @@ function ChangesError(t0) {
|
|
|
15631
15661
|
$[8] !== error || $[9] !== revisionNotFoundError || $[10] !== t ? (t5 = revisionNotFoundError && /* @__PURE__ */ jsx(Box, { paddingTop: 2, children: /* @__PURE__ */ jsx(Text$1, { as: "p", size: 1, muted: !0, children: /* @__PURE__ */ jsx(Translate, { i18nKey: "changes.missing-since-document-error", t, values: {
|
|
15632
15662
|
revisionId: error.revisionId
|
|
15633
15663
|
}, components: {
|
|
15634
|
-
Break: _temp$
|
|
15664
|
+
Break: _temp$3w
|
|
15635
15665
|
} }) }) }), $[8] = error, $[9] = revisionNotFoundError, $[10] = t, $[11] = t5) : t5 = $[11];
|
|
15636
15666
|
let t6;
|
|
15637
15667
|
return $[12] !== t2 || $[13] !== t4 || $[14] !== t5 ? (t6 = /* @__PURE__ */ jsx(Card, { tone: "caution", padding: 3, children: /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
@@ -15640,7 +15670,7 @@ function ChangesError(t0) {
|
|
|
15640
15670
|
t5
|
|
15641
15671
|
] }) }), $[12] = t2, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15], t6;
|
|
15642
15672
|
}
|
|
15643
|
-
function _temp$
|
|
15673
|
+
function _temp$3w() {
|
|
15644
15674
|
return /* @__PURE__ */ jsx("br", {});
|
|
15645
15675
|
}
|
|
15646
15676
|
const RoundedCard = styled.span.withConfig({
|
|
@@ -15704,11 +15734,11 @@ function DiffString(props2) {
|
|
|
15704
15734
|
let t0;
|
|
15705
15735
|
$[0] !== diff.segments ? (t0 = diff.segments || [], $[0] = diff.segments, $[1] = t0) : t0 = $[1];
|
|
15706
15736
|
let t1;
|
|
15707
|
-
$[2] !== t0 ? (t1 = t0.map(_temp$
|
|
15737
|
+
$[2] !== t0 ? (t1 = t0.map(_temp$3v), $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
15708
15738
|
let t2;
|
|
15709
15739
|
return $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(Fragment$1, { children: t1 }), $[4] = t1, $[5] = t2) : t2 = $[5], t2;
|
|
15710
15740
|
}
|
|
15711
|
-
function _temp$
|
|
15741
|
+
function _temp$3v(segment, segmentIndex) {
|
|
15712
15742
|
return /* @__PURE__ */ jsx(DiffStringSegment, { segment }, segmentIndex);
|
|
15713
15743
|
}
|
|
15714
15744
|
const MetaText = styled(Text$1).withConfig({
|
|
@@ -15944,12 +15974,12 @@ function useChildValidation(path, t0) {
|
|
|
15944
15974
|
let t1;
|
|
15945
15975
|
if ($[0] !== inclusive || $[1] !== path || $[2] !== validation2) {
|
|
15946
15976
|
let t2;
|
|
15947
|
-
$[4] !== inclusive || $[5] !== path ? (t2 = (item) => startsWith(path, item.path) && (inclusive || !isEqual$2(path, item.path)), $[4] = inclusive, $[5] = path, $[6] = t2) : t2 = $[6], t1 = validation2.filter(t2).map(_temp$
|
|
15977
|
+
$[4] !== inclusive || $[5] !== path ? (t2 = (item) => startsWith(path, item.path) && (inclusive || !isEqual$2(path, item.path)), $[4] = inclusive, $[5] = path, $[6] = t2) : t2 = $[6], t1 = validation2.filter(t2).map(_temp$3u), $[0] = inclusive, $[1] = path, $[2] = validation2, $[3] = t1;
|
|
15948
15978
|
} else
|
|
15949
15979
|
t1 = $[3];
|
|
15950
15980
|
return t1;
|
|
15951
15981
|
}
|
|
15952
|
-
function _temp$
|
|
15982
|
+
function _temp$3u(marker) {
|
|
15953
15983
|
return {
|
|
15954
15984
|
message: marker.message,
|
|
15955
15985
|
level: marker.level,
|
|
@@ -16333,7 +16363,7 @@ const DefaultAnnotationComponent = (props2) => {
|
|
|
16333
16363
|
textElement,
|
|
16334
16364
|
validation: validation2,
|
|
16335
16365
|
value
|
|
16336
|
-
} = props2, isLink = schemaType.name === "link", hasError = validation2.some(_temp$
|
|
16366
|
+
} = props2, isLink = schemaType.name === "link", hasError = validation2.some(_temp$3t), hasWarning = validation2.some(_temp2$1w), hasMarkers = markers.length > 0, {
|
|
16337
16367
|
t
|
|
16338
16368
|
} = useTranslation(), {
|
|
16339
16369
|
register,
|
|
@@ -16376,10 +16406,10 @@ const DefaultAnnotationComponent = (props2) => {
|
|
|
16376
16406
|
let t11;
|
|
16377
16407
|
return $[21] !== t10 || $[22] !== t5 || $[23] !== t6 || $[24] !== t7 || $[25] !== t8 || $[26] !== t9 || $[27] !== textElement || $[28] !== toneKey ? (t11 = /* @__PURE__ */ jsx(Root$y, { $toneKey: toneKey, "aria-label": t5, "data-link": t6, "data-error": t7, "data-warning": t8, "data-markers": t9, onClick: t10, children: textElement }), $[21] = t10, $[22] = t5, $[23] = t6, $[24] = t7, $[25] = t8, $[26] = t9, $[27] = textElement, $[28] = toneKey, $[29] = t11) : t11 = $[29], t11;
|
|
16378
16408
|
};
|
|
16379
|
-
function _temp$
|
|
16409
|
+
function _temp$3t(v) {
|
|
16380
16410
|
return v.level === "error";
|
|
16381
16411
|
}
|
|
16382
|
-
function _temp2$
|
|
16412
|
+
function _temp2$1w(v_0) {
|
|
16383
16413
|
return v_0.level === "warning";
|
|
16384
16414
|
}
|
|
16385
16415
|
function createStore(reportedValues, publish2) {
|
|
@@ -16399,7 +16429,7 @@ function createStore(reportedValues, publish2) {
|
|
|
16399
16429
|
};
|
|
16400
16430
|
}
|
|
16401
16431
|
function useTrackerStore() {
|
|
16402
|
-
const $ = c(9), [reportedValues] = useState(_temp$
|
|
16432
|
+
const $ = c(9), [reportedValues] = useState(_temp$3s);
|
|
16403
16433
|
let t0;
|
|
16404
16434
|
$[0] !== reportedValues ? (t0 = () => Array.from(reportedValues.entries()), $[0] = reportedValues, $[1] = t0) : t0 = $[1];
|
|
16405
16435
|
let t1;
|
|
@@ -16419,7 +16449,7 @@ function useTrackerStore() {
|
|
|
16419
16449
|
snapshot: snapshot2
|
|
16420
16450
|
}, $[6] = snapshot2, $[7] = store, $[8] = t4) : t4 = $[8], t4;
|
|
16421
16451
|
}
|
|
16422
|
-
function _temp$
|
|
16452
|
+
function _temp$3s() {
|
|
16423
16453
|
return /* @__PURE__ */ new Map();
|
|
16424
16454
|
}
|
|
16425
16455
|
function useTrackerStoreReporter(store, id2, value, t0) {
|
|
@@ -16465,17 +16495,17 @@ const useChangeIndicatorsReporter = (id2, value, isEqual2) => {
|
|
|
16465
16495
|
function useHoveredChange() {
|
|
16466
16496
|
const $ = c(2), reportedValues = useChangeIndicatorsReportedValues();
|
|
16467
16497
|
let t0;
|
|
16468
|
-
$[0] !== reportedValues ? (t0 = reportedValues.filter(_temp$
|
|
16498
|
+
$[0] !== reportedValues ? (t0 = reportedValues.filter(_temp$3r).sort(_temp2$1v), $[0] = reportedValues, $[1] = t0) : t0 = $[1];
|
|
16469
16499
|
const hoveredEntry = t0[0];
|
|
16470
16500
|
if (hoveredEntry) {
|
|
16471
16501
|
const [, change_0] = hoveredEntry;
|
|
16472
16502
|
return change_0;
|
|
16473
16503
|
}
|
|
16474
16504
|
}
|
|
16475
|
-
function _temp2$
|
|
16505
|
+
function _temp2$1v(a, b) {
|
|
16476
16506
|
return b[1].path.length - a[1].path.length;
|
|
16477
16507
|
}
|
|
16478
|
-
function _temp$
|
|
16508
|
+
function _temp$3r(t0) {
|
|
16479
16509
|
const [, change] = t0;
|
|
16480
16510
|
return change.hasHover;
|
|
16481
16511
|
}
|
|
@@ -16977,8 +17007,8 @@ function useDivergenceNavigator(t0) {
|
|
|
16977
17007
|
let t102;
|
|
16978
17008
|
$[9] !== divergences ? (t102 = combineLatest({
|
|
16979
17009
|
divergences,
|
|
16980
|
-
schemaType: schemaTypeContext.pipe(filter$1(_temp$
|
|
16981
|
-
formState: formStateContext.pipe(filter$1(_temp2$
|
|
17010
|
+
schemaType: schemaTypeContext.pipe(filter$1(_temp$3q)),
|
|
17011
|
+
formState: formStateContext.pipe(filter$1(_temp2$1u), distinctUntilChanged$1(_temp3$K), map$1(_temp4$k))
|
|
16982
17012
|
}), $[9] = divergences, $[10] = t102) : t102 = $[10], t9 = t102;
|
|
16983
17013
|
}
|
|
16984
17014
|
const context = t9;
|
|
@@ -17038,13 +17068,13 @@ function useDivergenceNavigator(t0) {
|
|
|
17038
17068
|
function _temp4$k(state) {
|
|
17039
17069
|
return state && pick(state, ["groups", "_allMembers"]);
|
|
17040
17070
|
}
|
|
17041
|
-
function _temp3$
|
|
17071
|
+
function _temp3$K(previous, current) {
|
|
17042
17072
|
return previous.value?._id === current.value?._id;
|
|
17043
17073
|
}
|
|
17044
|
-
function _temp2$
|
|
17074
|
+
function _temp2$1u(value_0) {
|
|
17045
17075
|
return typeof value_0 < "u";
|
|
17046
17076
|
}
|
|
17047
|
-
function _temp$
|
|
17077
|
+
function _temp$3q(value) {
|
|
17048
17078
|
return typeof value < "u";
|
|
17049
17079
|
}
|
|
17050
17080
|
function withAddressablePaths(state) {
|
|
@@ -17824,7 +17854,7 @@ const FormGutterCustomProperties = /* @__PURE__ */ styled.div.withConfig({
|
|
|
17824
17854
|
schemaType,
|
|
17825
17855
|
formState
|
|
17826
17856
|
}, $[23] = collatedDivergences.observable, $[24] = formState, $[25] = schemaType, $[26] = t4) : t4 = $[26];
|
|
17827
|
-
const divergenceNavigator = useDivergenceNavigator(t4), [sessionId2] = useState(_temp$
|
|
17857
|
+
const divergenceNavigator = useDivergenceNavigator(t4), [sessionId2] = useState(_temp$3p);
|
|
17828
17858
|
let t5;
|
|
17829
17859
|
$[27] !== divergenceNavigator || $[28] !== sessionId2 ? (t5 = {
|
|
17830
17860
|
enabled: !0,
|
|
@@ -17910,8 +17940,8 @@ function useCollateDivergencesContext(t0) {
|
|
|
17910
17940
|
if ($[29] !== context || $[30] !== readUpstreamAtFork) {
|
|
17911
17941
|
let t14;
|
|
17912
17942
|
$[32] !== context ? (t14 = (nextContext) => context.next(nextContext), $[32] = context, $[33] = t14) : t14 = $[33], t13 = combineLatest({
|
|
17913
|
-
upstreamHead: listenUpstreamHead.pipe(filter$1(_temp2$
|
|
17914
|
-
subjectHead: listenSubjectHead.pipe(filter$1(_temp3$
|
|
17943
|
+
upstreamHead: listenUpstreamHead.pipe(filter$1(_temp2$1t)),
|
|
17944
|
+
subjectHead: listenSubjectHead.pipe(filter$1(_temp3$J)),
|
|
17915
17945
|
resolutions: listenResolutions.pipe(map$1(_temp4$j)),
|
|
17916
17946
|
upstreamAtFork: readUpstreamAtFork.pipe(filter$1(_temp5$b), map$1(_temp6$7), filter$1(_temp7$4))
|
|
17917
17947
|
}).pipe(tap$1(t14)), $[29] = context, $[30] = readUpstreamAtFork, $[31] = t13;
|
|
@@ -17934,13 +17964,13 @@ function _temp5$b(revision) {
|
|
|
17934
17964
|
function _temp4$j(nextResolutions) {
|
|
17935
17965
|
return nextResolutions ?? [];
|
|
17936
17966
|
}
|
|
17937
|
-
function _temp3$
|
|
17967
|
+
function _temp3$J(document_0) {
|
|
17938
17968
|
return typeof document_0 < "u" && document_0 !== null;
|
|
17939
17969
|
}
|
|
17940
|
-
function _temp2$
|
|
17970
|
+
function _temp2$1t(document2) {
|
|
17941
17971
|
return typeof document2 < "u" && document2 !== null;
|
|
17942
17972
|
}
|
|
17943
|
-
function _temp$
|
|
17973
|
+
function _temp$3p() {
|
|
17944
17974
|
return uuid();
|
|
17945
17975
|
}
|
|
17946
17976
|
const FormDivergenceIndicator = (props2) => {
|
|
@@ -18159,10 +18189,10 @@ function useDivergenceController(divergence, allDivergences, contextReadOnly) {
|
|
|
18159
18189
|
let t32;
|
|
18160
18190
|
$[10] !== path ? (t32 = (state) => state?.loading ? of({
|
|
18161
18191
|
isLoading: !0
|
|
18162
|
-
}) : of(state).pipe(filter$1(_temp$
|
|
18192
|
+
}) : of(state).pipe(filter$1(_temp$3o), map$1(_temp2$1s), switchMap$1((document_0) => document_0 ? of(get$1(document_0, path)).pipe(map$1((value) => ({
|
|
18163
18193
|
value,
|
|
18164
18194
|
document: document_0
|
|
18165
|
-
})), startWith$1(void 0)) : EMPTY$5), map$1(_temp3$
|
|
18195
|
+
})), startWith$1(void 0)) : EMPTY$5), map$1(_temp3$I)), $[10] = path, $[11] = t32) : t32 = $[11], t2 = getDocumentAtRevision({
|
|
18166
18196
|
client,
|
|
18167
18197
|
documentId: upstreamId,
|
|
18168
18198
|
revisionId: upstreamRevisionId
|
|
@@ -18249,19 +18279,19 @@ function _temp5$a(value_2) {
|
|
|
18249
18279
|
function _temp4$i(document_1) {
|
|
18250
18280
|
return document_1 !== null;
|
|
18251
18281
|
}
|
|
18252
|
-
function _temp3$
|
|
18282
|
+
function _temp3$I(value_0) {
|
|
18253
18283
|
return {
|
|
18254
18284
|
isLoading: !1,
|
|
18255
18285
|
value: value_0
|
|
18256
18286
|
};
|
|
18257
18287
|
}
|
|
18258
|
-
function _temp2$
|
|
18288
|
+
function _temp2$1s(t0) {
|
|
18259
18289
|
const {
|
|
18260
18290
|
document: document2
|
|
18261
18291
|
} = t0;
|
|
18262
18292
|
return document2;
|
|
18263
18293
|
}
|
|
18264
|
-
function _temp$
|
|
18294
|
+
function _temp$3o(revision) {
|
|
18265
18295
|
return revision !== null;
|
|
18266
18296
|
}
|
|
18267
18297
|
function createResolutionMarkers(document2, reachableDivergence) {
|
|
@@ -18634,7 +18664,7 @@ const FieldActionMenu = memo(function(props2) {
|
|
|
18634
18664
|
$[4] !== nodes ? (t2 = nodes.filter(renderAsButton), $[4] = nodes, $[5] = t2) : t2 = $[5];
|
|
18635
18665
|
const buttonNodes = t2;
|
|
18636
18666
|
let t3;
|
|
18637
|
-
$[6] !== nodes ? (t3 = nodes.filter(_temp$
|
|
18667
|
+
$[6] !== nodes ? (t3 = nodes.filter(_temp$3n), $[6] = nodes, $[7] = t3) : t3 = $[7];
|
|
18638
18668
|
const menuNodesProp = t3;
|
|
18639
18669
|
let t4;
|
|
18640
18670
|
bb0: {
|
|
@@ -18703,7 +18733,7 @@ function RootFieldActionMenuGroup(props2) {
|
|
|
18703
18733
|
open
|
|
18704
18734
|
} = props2, {
|
|
18705
18735
|
title
|
|
18706
|
-
} = useI18nText(node), handlePointerDown = _temp2$
|
|
18736
|
+
} = useI18nText(node), handlePointerDown = _temp2$1r, t0 = open ? void 0 : title;
|
|
18707
18737
|
let t1;
|
|
18708
18738
|
$[0] !== node.title ? (t1 = {
|
|
18709
18739
|
...STATUS_BUTTON_TOOLTIP_PROPS,
|
|
@@ -18719,10 +18749,10 @@ function RootFieldActionMenuGroup(props2) {
|
|
|
18719
18749
|
let t6;
|
|
18720
18750
|
return $[10] !== onClose || $[11] !== onOpen || $[12] !== t2 || $[13] !== t3 || $[14] !== t5 ? (t6 = /* @__PURE__ */ jsx(MenuButton, { button: t2, id: t3, menu: t5, onOpen, onClose, popover: ROOT_MENU_BUTTON_POPOVER_PROPS }), $[10] = onClose, $[11] = onOpen, $[12] = t2, $[13] = t3, $[14] = t5, $[15] = t6) : t6 = $[15], t6;
|
|
18721
18751
|
}
|
|
18722
|
-
function _temp2$
|
|
18752
|
+
function _temp2$1r(event) {
|
|
18723
18753
|
event.preventDefault();
|
|
18724
18754
|
}
|
|
18725
|
-
function _temp$
|
|
18755
|
+
function _temp$3n(node) {
|
|
18726
18756
|
return !renderAsButton(node);
|
|
18727
18757
|
}
|
|
18728
18758
|
function useHoveredField() {
|
|
@@ -18827,7 +18857,7 @@ const FieldActionsResolver = memo(function(props2) {
|
|
|
18827
18857
|
t6 = $[15];
|
|
18828
18858
|
const FieldActions = t6;
|
|
18829
18859
|
let t7;
|
|
18830
|
-
$[21] !== FieldActions ? (t7 = FieldActions.map(_temp$
|
|
18860
|
+
$[21] !== FieldActions ? (t7 = FieldActions.map(_temp$3m), $[21] = FieldActions, $[22] = t7) : t7 = $[22];
|
|
18831
18861
|
let t8;
|
|
18832
18862
|
return $[23] !== t7 ? (t8 = /* @__PURE__ */ jsx(Fragment$1, { children: t7 }), $[23] = t7, $[24] = t8) : t8 = $[24], t8;
|
|
18833
18863
|
});
|
|
@@ -18859,7 +18889,7 @@ function defineFieldActionComponent({
|
|
|
18859
18889
|
}, t2 = [node], $[1] = node, $[2] = t1, $[3] = t2) : (t1 = $[2], t2 = $[3]), useEffect(t1, t2), null;
|
|
18860
18890
|
});
|
|
18861
18891
|
}
|
|
18862
|
-
function _temp$
|
|
18892
|
+
function _temp$3m(FieldAction, key) {
|
|
18863
18893
|
return /* @__PURE__ */ jsx(FieldAction, {}, key);
|
|
18864
18894
|
}
|
|
18865
18895
|
function useFieldActions() {
|
|
@@ -18868,7 +18898,7 @@ function useFieldActions() {
|
|
|
18868
18898
|
const HoveredFieldProvider = memo(function(props2) {
|
|
18869
18899
|
const $ = c(17), {
|
|
18870
18900
|
children
|
|
18871
|
-
} = props2, [listeners] = useState(_temp$
|
|
18901
|
+
} = props2, [listeners] = useState(_temp$3l);
|
|
18872
18902
|
let t0;
|
|
18873
18903
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0];
|
|
18874
18904
|
const hoveredStackRef = useRef(t0);
|
|
@@ -18914,7 +18944,7 @@ const HoveredFieldProvider = memo(function(props2) {
|
|
|
18914
18944
|
let t7;
|
|
18915
18945
|
return $[14] !== children || $[15] !== context ? (t7 = /* @__PURE__ */ jsx(HoveredFieldContext.Provider, { value: context, children }), $[14] = children, $[15] = context, $[16] = t7) : t7 = $[16], t7;
|
|
18916
18946
|
});
|
|
18917
|
-
function _temp$
|
|
18947
|
+
function _temp$3l() {
|
|
18918
18948
|
return /* @__PURE__ */ new Set();
|
|
18919
18949
|
}
|
|
18920
18950
|
function useDidUpdate(current, didUpdate, t0) {
|
|
@@ -19040,7 +19070,7 @@ function ImageOrFileField(field) {
|
|
|
19040
19070
|
const $ = c(34), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$q), documentId = usePublishedId$1(), focused = !!field.inputProps.focused;
|
|
19041
19071
|
let t0;
|
|
19042
19072
|
if ($[0] !== field.inputProps.members || $[1] !== field.presence) {
|
|
19043
|
-
const hotspotField = field.inputProps.members.find(_temp$
|
|
19073
|
+
const hotspotField = field.inputProps.members.find(_temp$3k);
|
|
19044
19074
|
t0 = hotspotField?.open ? field.presence : field.presence.concat(hotspotField?.field.presence || EMPTY_ARRAY$q), $[0] = field.inputProps.members, $[1] = field.presence, $[2] = t0;
|
|
19045
19075
|
} else
|
|
19046
19076
|
t0 = $[2];
|
|
@@ -19057,7 +19087,7 @@ function ImageOrFileField(field) {
|
|
|
19057
19087
|
t3
|
|
19058
19088
|
] }), $[31] = t1, $[32] = t3, $[33] = t4) : t4 = $[33], t4;
|
|
19059
19089
|
}
|
|
19060
|
-
function _temp$
|
|
19090
|
+
function _temp$3k(member) {
|
|
19061
19091
|
return member.kind === "field" && member.name === "hotspot";
|
|
19062
19092
|
}
|
|
19063
19093
|
function defaultResolveFieldComponent(schemaType) {
|
|
@@ -19934,11 +19964,11 @@ function useSearchMaxFieldDepth(overrideClient) {
|
|
|
19934
19964
|
client
|
|
19935
19965
|
}).pipe(shareReplay()));
|
|
19936
19966
|
let t1;
|
|
19937
|
-
$[2] !== dataset ? (t1 = cachedSettings.get(dataset).pipe(map(_temp$
|
|
19967
|
+
$[2] !== dataset ? (t1 = cachedSettings.get(dataset).pipe(map(_temp$3j), startWith(INITIAL_LOADING_STATE$5), catchError(_temp2$1q)), $[2] = dataset, $[3] = t1) : t1 = $[3];
|
|
19938
19968
|
const maxFieldDepth = useObservable(t1, INITIAL_LOADING_STATE$5)?.settings?.partialIndexSettings?.maxFieldDepth;
|
|
19939
19969
|
return isFinite(maxFieldDepth) ? Math.min(maxFieldDepth, DEFAULT_MAX_FIELD_DEPTH) : DEFAULT_MAX_FIELD_DEPTH;
|
|
19940
19970
|
}
|
|
19941
|
-
function _temp2$
|
|
19971
|
+
function _temp2$1q(err) {
|
|
19942
19972
|
return console.error(err), of({
|
|
19943
19973
|
isLoading: !1,
|
|
19944
19974
|
enabled: !0,
|
|
@@ -19949,7 +19979,7 @@ function _temp2$1r(err) {
|
|
|
19949
19979
|
}
|
|
19950
19980
|
});
|
|
19951
19981
|
}
|
|
19952
|
-
function _temp$
|
|
19982
|
+
function _temp$3j(settings) {
|
|
19953
19983
|
return {
|
|
19954
19984
|
isLoading: !1,
|
|
19955
19985
|
settings
|
|
@@ -20097,7 +20127,7 @@ function CreateButton(props2) {
|
|
|
20097
20127
|
const currentUser = useCurrentUser(), {
|
|
20098
20128
|
t
|
|
20099
20129
|
} = useTranslation(), getI18nText = useGetI18nText(createOptions);
|
|
20100
|
-
if (!createOptions.some(_temp$
|
|
20130
|
+
if (!createOptions.some(_temp$3i)) {
|
|
20101
20131
|
let t02;
|
|
20102
20132
|
$[6] !== currentUser ? (t02 = /* @__PURE__ */ jsx(InsufficientPermissionsMessage, { currentUser, context: "create-new-reference" }), $[6] = currentUser, $[7] = t02) : t02 = $[7];
|
|
20103
20133
|
let t1;
|
|
@@ -20110,7 +20140,7 @@ function CreateButton(props2) {
|
|
|
20110
20140
|
let t0;
|
|
20111
20141
|
return $[15] !== createOptions || $[16] !== currentUser || $[17] !== getI18nText || $[18] !== id2 || $[19] !== menuRef || $[20] !== onCreate || $[21] !== props2.readOnly || $[22] !== rest || $[23] !== t ? (t0 = createOptions.length > 1 ? /* @__PURE__ */ jsx(MenuButton, { button: /* @__PURE__ */ jsx(Button$1, { ...rest, disabled: props2.readOnly, text: t("inputs.reference.action.create-new-document-select"), mode: "ghost", icon: AddIcon, size: "large" }), id: id2, menu: /* @__PURE__ */ jsx(Menu, { ref: menuRef, children: createOptions.map((createOption) => /* @__PURE__ */ jsx(Tooltip, { disabled: createOption.permission.granted, content: /* @__PURE__ */ jsx(InsufficientPermissionsMessage, { currentUser, context: "create-document-type" }), portal: !0, "data-testid": `create-new-document-select-${createOption.title.toLowerCase().replaceAll(" ", "-")}-selectTypeMenuButton`, children: /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(MenuItem, { disabled: !createOption.permission.granted, icon: createOption.icon, text: getI18nText(createOption).title, onClick: () => onCreate(createOption), "data-testid": `create-new-document-select-${createOption.title.toLowerCase().replaceAll(" ", "-")}-selectTypeMenuItem` }) }) }, createOption.id)) }), popover: POPOVER_PROPS$5 }) : /* @__PURE__ */ jsx(Button$1, { ...rest, text: t("inputs.reference.action.create-new-document"), mode: "ghost", disabled: !createOptions[0].permission.granted || props2.readOnly, onClick: () => onCreate(createOptions[0]), icon: AddIcon, size: "large", "data-testid": `create-new-document-select-${id2}` }), $[15] = createOptions, $[16] = currentUser, $[17] = getI18nText, $[18] = id2, $[19] = menuRef, $[20] = onCreate, $[21] = props2.readOnly, $[22] = rest, $[23] = t, $[24] = t0) : t0 = $[24], t0;
|
|
20112
20142
|
}
|
|
20113
|
-
function _temp$
|
|
20143
|
+
function _temp$3i(option) {
|
|
20114
20144
|
return option.permission.granted;
|
|
20115
20145
|
}
|
|
20116
20146
|
function sortReleases(releases2 = []) {
|
|
@@ -20152,7 +20182,7 @@ function useActiveReleases() {
|
|
|
20152
20182
|
dispatch
|
|
20153
20183
|
} = useReleasesStore(), state = useObservable(state$);
|
|
20154
20184
|
let t0;
|
|
20155
|
-
$[0] !== state.releases ? (t0 = sortReleases(Array.from(state.releases.values()).filter(_temp$
|
|
20185
|
+
$[0] !== state.releases ? (t0 = sortReleases(Array.from(state.releases.values()).filter(_temp$3h)).reverse(), $[0] = state.releases, $[1] = t0) : t0 = $[1];
|
|
20156
20186
|
const releasesAsArray = t0, t1 = state.error;
|
|
20157
20187
|
let t2;
|
|
20158
20188
|
$[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = ["loading", "initialising"], $[2] = t2) : t2 = $[2];
|
|
@@ -20165,7 +20195,7 @@ function useActiveReleases() {
|
|
|
20165
20195
|
loading: t3
|
|
20166
20196
|
}, $[3] = dispatch, $[4] = releasesAsArray, $[5] = state.error, $[6] = t3, $[7] = t4) : t4 = $[7], t4;
|
|
20167
20197
|
}
|
|
20168
|
-
function _temp$
|
|
20198
|
+
function _temp$3h(release) {
|
|
20169
20199
|
return !ARCHIVED_RELEASE_STATES.includes(release.state);
|
|
20170
20200
|
}
|
|
20171
20201
|
const Dot$2 = /* @__PURE__ */ styled.div.withConfig({
|
|
@@ -20256,59 +20286,236 @@ function DocumentStatusIndicator(t0) {
|
|
|
20256
20286
|
$[13] !== t11 || $[14] !== t13 || $[15] !== t5 || $[16] !== t7 || $[17] !== t9 ? (t14 = [t5, t7, t9, t11, t13], $[13] = t11, $[14] = t13, $[15] = t5, $[16] = t7, $[17] = t9, $[18] = t14) : t14 = $[18];
|
|
20257
20287
|
const indicators = t14;
|
|
20258
20288
|
let t15;
|
|
20259
|
-
return $[19] !== indicators ? (t15 = /* @__PURE__ */ jsx(Flex, { children: indicators.filter(_temp$
|
|
20289
|
+
return $[19] !== indicators ? (t15 = /* @__PURE__ */ jsx(Flex, { children: indicators.filter(_temp$3g).map(_temp2$1p) }), $[19] = indicators, $[20] = t15) : t15 = $[20], t15;
|
|
20260
20290
|
}
|
|
20261
|
-
function _temp2$
|
|
20291
|
+
function _temp2$1p(t0, index) {
|
|
20262
20292
|
const {
|
|
20263
20293
|
status
|
|
20264
20294
|
} = t0;
|
|
20265
20295
|
return /* @__PURE__ */ jsx(Dot$2, { "data-status": status, $index: index + 1 }, status);
|
|
20266
20296
|
}
|
|
20267
|
-
function _temp$
|
|
20297
|
+
function _temp$3g(t0) {
|
|
20268
20298
|
const {
|
|
20269
20299
|
show
|
|
20270
20300
|
} = t0;
|
|
20271
20301
|
return show;
|
|
20272
20302
|
}
|
|
20303
|
+
function useDataset() {
|
|
20304
|
+
return useSource().dataset;
|
|
20305
|
+
}
|
|
20306
|
+
function useProjectId$1() {
|
|
20307
|
+
return useSource().projectId;
|
|
20308
|
+
}
|
|
20309
|
+
const INCLUDE_FIELDS_QUERY = ["_id", "_rev", "_type"], INCLUDE_FIELDS = [...INCLUDE_FIELDS_QUERY, "_key"], LISTENER_RESET_DELAY = 5e3, AVAILABILITY_READABLE$2 = {
|
|
20310
|
+
available: !0,
|
|
20311
|
+
reason: "READABLE"
|
|
20312
|
+
}, AVAILABILITY_PERMISSION_DENIED$2 = {
|
|
20313
|
+
available: !1,
|
|
20314
|
+
reason: "PERMISSION_DENIED"
|
|
20315
|
+
}, AVAILABILITY_NOT_FOUND$2 = {
|
|
20316
|
+
available: !1,
|
|
20317
|
+
reason: "NOT_FOUND"
|
|
20318
|
+
}, AVAILABILITY_VERSION_DELETED = {
|
|
20319
|
+
available: !1,
|
|
20320
|
+
reason: "VERSION_DELETED"
|
|
20321
|
+
}, INVALID_PREVIEW_FALLBACK = {
|
|
20322
|
+
title: "Invalid preview config",
|
|
20323
|
+
subtitle: "Check the error log in the console",
|
|
20324
|
+
media: /* @__PURE__ */ jsx(WarningOutlineIcon, {})
|
|
20325
|
+
}, DOCUMENT_SYSTEM_FIELD = "_system", INITIAL_VALUE$1 = {
|
|
20326
|
+
data: [],
|
|
20327
|
+
versions: [],
|
|
20328
|
+
error: null,
|
|
20329
|
+
loading: !0
|
|
20330
|
+
}, observableCache = /* @__PURE__ */ new Map(), swr$1 = createSWR({
|
|
20331
|
+
maxSize: 100
|
|
20332
|
+
});
|
|
20333
|
+
function useDocumentVersions(props2) {
|
|
20334
|
+
const observable = useDocumentVersionsObservable(props2);
|
|
20335
|
+
return useObservable(observable, INITIAL_VALUE$1);
|
|
20336
|
+
}
|
|
20337
|
+
function useDocumentVersionsObservable(props2) {
|
|
20338
|
+
const $ = c(10), {
|
|
20339
|
+
documentId
|
|
20340
|
+
} = props2;
|
|
20341
|
+
let t0;
|
|
20342
|
+
$[0] !== documentId ? (t0 = getPublishedId(documentId), $[0] = documentId, $[1] = t0) : t0 = $[1];
|
|
20343
|
+
const publishedId = t0, dataset = useDataset(), projectId = useProjectId$1(), documentPreviewStore = useDocumentPreviewStore(), {
|
|
20344
|
+
data: releases2
|
|
20345
|
+
} = useActiveReleases();
|
|
20346
|
+
let t1;
|
|
20347
|
+
if ($[2] !== dataset || $[3] !== documentPreviewStore || $[4] !== projectId || $[5] !== publishedId || $[6] !== releases2) {
|
|
20348
|
+
let t2;
|
|
20349
|
+
$[8] !== releases2 ? (t2 = (result) => ({
|
|
20350
|
+
...result,
|
|
20351
|
+
versions: result.versions.map((version2) => ({
|
|
20352
|
+
...version2,
|
|
20353
|
+
[DOCUMENT_SYSTEM_FIELD]: version2._system?.group ? version2._system : {
|
|
20354
|
+
...version2._system,
|
|
20355
|
+
...temporarilyBuildDocumentSystem(version2._id, releases2)
|
|
20356
|
+
}
|
|
20357
|
+
}))
|
|
20358
|
+
}), $[8] = releases2, $[9] = t2) : t2 = $[9], t1 = getOrCreateDocumentVersionsObservable({
|
|
20359
|
+
documentPreviewStore,
|
|
20360
|
+
publishedId,
|
|
20361
|
+
projectId,
|
|
20362
|
+
dataset
|
|
20363
|
+
}).pipe(map$1(t2)), $[2] = dataset, $[3] = documentPreviewStore, $[4] = projectId, $[5] = publishedId, $[6] = releases2, $[7] = t1;
|
|
20364
|
+
} else
|
|
20365
|
+
t1 = $[7];
|
|
20366
|
+
return t1;
|
|
20367
|
+
}
|
|
20368
|
+
const temporarilyBuildDocumentSystem = (id2, releases2) => {
|
|
20369
|
+
const versionId = getVersionFromId(id2);
|
|
20370
|
+
if (versionId) {
|
|
20371
|
+
const releaseDocument = releases2.find((release) => getReleaseIdFromReleaseDocumentId(release._id) === versionId);
|
|
20372
|
+
return {
|
|
20373
|
+
bundleId: versionId,
|
|
20374
|
+
release: releaseDocument ? {
|
|
20375
|
+
_ref: releaseDocument._id,
|
|
20376
|
+
_weak: !0
|
|
20377
|
+
} : void 0,
|
|
20378
|
+
group: {
|
|
20379
|
+
_ref: getPublishedId(id2),
|
|
20380
|
+
_weak: !0
|
|
20381
|
+
},
|
|
20382
|
+
scopeId: versionId
|
|
20383
|
+
};
|
|
20384
|
+
}
|
|
20385
|
+
return {
|
|
20386
|
+
bundleId: isDraftId(id2) ? "drafts" : void 0,
|
|
20387
|
+
group: {
|
|
20388
|
+
_ref: getPublishedId(id2),
|
|
20389
|
+
_weak: !0
|
|
20390
|
+
}
|
|
20391
|
+
};
|
|
20392
|
+
}, DOCUMENT_STUB_PATHS = ["_id", "_type", "_rev", "_createdAt", "_updatedAt", "_system"];
|
|
20393
|
+
function getOrCreateDocumentVersionsObservable(options) {
|
|
20394
|
+
const {
|
|
20395
|
+
documentPreviewStore,
|
|
20396
|
+
projectId,
|
|
20397
|
+
dataset,
|
|
20398
|
+
publishedId
|
|
20399
|
+
} = options, cacheKey2 = `${projectId}-${dataset}-${publishedId}`, cachedObservable = observableCache.get(cacheKey2);
|
|
20400
|
+
if (cachedObservable)
|
|
20401
|
+
return cachedObservable;
|
|
20402
|
+
const newObservable = documentPreviewStore.unstable_observeVersionDocumentIds(publishedId).pipe(swr$1(cacheKey2), map$1(({
|
|
20403
|
+
value
|
|
20404
|
+
}) => value), switchMap$1((documentIds) => {
|
|
20405
|
+
if (documentIds.length === 0)
|
|
20406
|
+
return of({
|
|
20407
|
+
data: [],
|
|
20408
|
+
versions: [],
|
|
20409
|
+
error: null,
|
|
20410
|
+
loading: !1
|
|
20411
|
+
});
|
|
20412
|
+
const loadingState = {
|
|
20413
|
+
data: documentIds,
|
|
20414
|
+
versions: [],
|
|
20415
|
+
error: null,
|
|
20416
|
+
loading: !0
|
|
20417
|
+
};
|
|
20418
|
+
return combineLatest(documentIds.map((id2) => documentPreviewStore.observePaths({
|
|
20419
|
+
_id: id2
|
|
20420
|
+
}, DOCUMENT_STUB_PATHS).pipe(map$1((versionInfo) => isRecord$4(versionInfo) ? versionInfo : void 0), map$1((versionInfo) => ({
|
|
20421
|
+
_id: id2,
|
|
20422
|
+
_rev: versionInfo?._rev ?? "",
|
|
20423
|
+
_createdAt: versionInfo?._createdAt ?? "",
|
|
20424
|
+
_updatedAt: versionInfo?._updatedAt ?? "",
|
|
20425
|
+
[DOCUMENT_SYSTEM_FIELD]: versionInfo?.[DOCUMENT_SYSTEM_FIELD]
|
|
20426
|
+
}))))).pipe(map$1((versions) => ({
|
|
20427
|
+
data: documentIds,
|
|
20428
|
+
versions,
|
|
20429
|
+
error: null,
|
|
20430
|
+
loading: !1
|
|
20431
|
+
})), startWith$1(loadingState));
|
|
20432
|
+
}), catchError$1((error) => of({
|
|
20433
|
+
error,
|
|
20434
|
+
data: [],
|
|
20435
|
+
versions: [],
|
|
20436
|
+
loading: !1
|
|
20437
|
+
})), finalize(() => {
|
|
20438
|
+
observableCache.delete(cacheKey2);
|
|
20439
|
+
}), shareReplay$1({
|
|
20440
|
+
refCount: !0,
|
|
20441
|
+
bufferSize: 1
|
|
20442
|
+
}));
|
|
20443
|
+
return observableCache.set(cacheKey2, newObservable), newObservable;
|
|
20444
|
+
}
|
|
20445
|
+
function exists(value) {
|
|
20446
|
+
return !!value?._rev;
|
|
20447
|
+
}
|
|
20448
|
+
const EMPTY_RESULT = {
|
|
20449
|
+
draft: void 0,
|
|
20450
|
+
published: void 0,
|
|
20451
|
+
versions: {}
|
|
20452
|
+
};
|
|
20453
|
+
function getDocumentVersionInfoFromVersions(versions) {
|
|
20454
|
+
const groupId = versions[0]?._system.group._ref;
|
|
20455
|
+
if (!groupId)
|
|
20456
|
+
return EMPTY_RESULT;
|
|
20457
|
+
if (!versions.every((version2) => version2._system.group._ref === groupId))
|
|
20458
|
+
throw new Error("Some versions are not in the same group, this is not supported");
|
|
20459
|
+
const nonVariantVersions = versions.filter((version2) => !isVariantVersion(version2)), published = nonVariantVersions.find(isPublishedVersion), draft = nonVariantVersions.find(isDraftVersion), releaseVersions = {};
|
|
20460
|
+
for (const version2 of nonVariantVersions) {
|
|
20461
|
+
const releaseId = version2._system.release?._ref;
|
|
20462
|
+
releaseId && (releaseVersions[getReleaseIdFromReleaseDocumentId(releaseId)] = exists(version2) ? version2 : void 0);
|
|
20463
|
+
}
|
|
20464
|
+
return {
|
|
20465
|
+
draft: exists(draft) ? draft : void 0,
|
|
20466
|
+
published: exists(published) ? published : void 0,
|
|
20467
|
+
versions: releaseVersions
|
|
20468
|
+
};
|
|
20469
|
+
}
|
|
20273
20470
|
function ReferencePreview(props2) {
|
|
20274
|
-
const $ = c(
|
|
20471
|
+
const $ = c(33), {
|
|
20275
20472
|
id: id2,
|
|
20276
20473
|
layout,
|
|
20277
20474
|
refType,
|
|
20278
20475
|
renderPreview,
|
|
20279
20476
|
showTypeLabel
|
|
20280
|
-
} = props2, documentPresence = useDocumentPresence(id2)
|
|
20477
|
+
} = props2, documentPresence = useDocumentPresence(id2);
|
|
20281
20478
|
let t0;
|
|
20282
|
-
$[0] !== id2
|
|
20283
|
-
|
|
20284
|
-
|
|
20285
|
-
|
|
20286
|
-
|
|
20479
|
+
$[0] !== id2 ? (t0 = {
|
|
20480
|
+
documentId: id2
|
|
20481
|
+
}, $[0] = id2, $[1] = t0) : t0 = $[1];
|
|
20482
|
+
const {
|
|
20483
|
+
versions
|
|
20484
|
+
} = useDocumentVersions(t0);
|
|
20287
20485
|
let t1;
|
|
20288
|
-
$[
|
|
20486
|
+
$[2] !== versions ? (t1 = getDocumentVersionInfoFromVersions(versions), $[2] = versions, $[3] = t1) : t1 = $[3];
|
|
20487
|
+
const versionsInfo = t1;
|
|
20289
20488
|
let t2;
|
|
20290
|
-
$[
|
|
20489
|
+
$[4] !== id2 || $[5] !== refType.name ? (t2 = {
|
|
20490
|
+
_id: id2,
|
|
20491
|
+
_type: refType.name
|
|
20492
|
+
}, $[4] = id2, $[5] = refType.name, $[6] = t2) : t2 = $[6];
|
|
20493
|
+
const previewStub = t2;
|
|
20291
20494
|
let t3;
|
|
20292
|
-
$[
|
|
20495
|
+
$[7] !== refType.title || $[8] !== showTypeLabel ? (t3 = showTypeLabel && /* @__PURE__ */ jsx(Badge, { mode: "outline", children: refType.title }), $[7] = refType.title, $[8] = showTypeLabel, $[9] = t3) : t3 = $[9];
|
|
20293
20496
|
let t4;
|
|
20294
|
-
$[
|
|
20295
|
-
t1,
|
|
20296
|
-
t2,
|
|
20297
|
-
t3
|
|
20298
|
-
] }) }), $[12] = t1, $[13] = t2, $[14] = t3, $[15] = t4) : t4 = $[15];
|
|
20497
|
+
$[10] !== documentPresence ? (t4 = documentPresence && documentPresence.length > 0 && /* @__PURE__ */ jsx(DocumentPreviewPresence, { presence: documentPresence }), $[10] = documentPresence, $[11] = t4) : t4 = $[11];
|
|
20299
20498
|
let t5;
|
|
20300
|
-
$[
|
|
20499
|
+
$[12] !== versionsInfo.draft || $[13] !== versionsInfo.published || $[14] !== versionsInfo.versions ? (t5 = /* @__PURE__ */ jsx(DocumentStatusIndicator, { draft: versionsInfo.draft, published: versionsInfo.published, versions: versionsInfo.versions }), $[12] = versionsInfo.draft, $[13] = versionsInfo.published, $[14] = versionsInfo.versions, $[15] = t5) : t5 = $[15];
|
|
20301
20500
|
let t6;
|
|
20302
|
-
$[
|
|
20303
|
-
|
|
20501
|
+
$[16] !== t3 || $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsx(Box, { paddingLeft: 3, children: /* @__PURE__ */ jsxs(Inline, { space: 3, children: [
|
|
20502
|
+
t3,
|
|
20503
|
+
t4,
|
|
20504
|
+
t5
|
|
20505
|
+
] }) }), $[16] = t3, $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19];
|
|
20506
|
+
let t7;
|
|
20507
|
+
$[20] !== versionsInfo.draft || $[21] !== versionsInfo.published || $[22] !== versionsInfo.versions ? (t7 = /* @__PURE__ */ jsx(DocumentStatus, { draft: versionsInfo.draft, published: versionsInfo.published, versions: versionsInfo.versions }), $[20] = versionsInfo.draft, $[21] = versionsInfo.published, $[22] = versionsInfo.versions, $[23] = t7) : t7 = $[23];
|
|
20508
|
+
let t8;
|
|
20509
|
+
$[24] !== layout || $[25] !== previewStub || $[26] !== refType || $[27] !== t6 || $[28] !== t7 ? (t8 = {
|
|
20510
|
+
children: t6,
|
|
20304
20511
|
layout,
|
|
20305
20512
|
schemaType: refType,
|
|
20306
|
-
tooltip:
|
|
20513
|
+
tooltip: t7,
|
|
20307
20514
|
value: previewStub
|
|
20308
|
-
}, $[
|
|
20309
|
-
const previewProps =
|
|
20310
|
-
let
|
|
20311
|
-
return $[
|
|
20515
|
+
}, $[24] = layout, $[25] = previewStub, $[26] = refType, $[27] = t6, $[28] = t7, $[29] = t8) : t8 = $[29];
|
|
20516
|
+
const previewProps = t8;
|
|
20517
|
+
let t9;
|
|
20518
|
+
return $[30] !== previewProps || $[31] !== renderPreview ? (t9 = renderPreview(previewProps), $[30] = previewProps, $[31] = renderPreview, $[32] = t9) : t9 = $[32], t9;
|
|
20312
20519
|
}
|
|
20313
20520
|
function OptionPreview$2(props2) {
|
|
20314
20521
|
const $ = c(15), {
|
|
@@ -20459,7 +20666,7 @@ function PreviewReferenceValue$2(props2) {
|
|
|
20459
20666
|
if ($[13] !== value._strengthenOnPublish?.type ? (t62 = (toType) => toType.name === value?._strengthenOnPublish?.type, $[13] = value._strengthenOnPublish?.type, $[14] = t62) : t62 = $[14], refType = t12.find(t62), !refType) {
|
|
20460
20667
|
const t72 = value._ref, t82 = value._strengthenOnPublish?.type;
|
|
20461
20668
|
let t92;
|
|
20462
|
-
$[15] !== type.to ? (t92 = type.to.map(_temp$
|
|
20669
|
+
$[15] !== type.to ? (t92 = type.to.map(_temp$3f), $[15] = type.to, $[16] = t92) : t92 = $[16];
|
|
20463
20670
|
let t10;
|
|
20464
20671
|
$[17] !== t82 || $[18] !== t92 || $[19] !== value._ref ? (t10 = /* @__PURE__ */ jsx(InvalidType, { documentId: t72, actualType: t82, declaredTypes: t92 }), $[17] = t82, $[18] = t92, $[19] = value._ref, $[20] = t10) : t10 = $[20], t5 = t10;
|
|
20465
20672
|
break bb0;
|
|
@@ -20519,17 +20726,17 @@ function PreviewReferenceValue$2(props2) {
|
|
|
20519
20726
|
if (!refType_0) {
|
|
20520
20727
|
const t22 = value._ref, t3 = refTypeName || "<unknown>";
|
|
20521
20728
|
let t4;
|
|
20522
|
-
$[52] !== type.to ? (t4 = type.to.map(_temp2$
|
|
20729
|
+
$[52] !== type.to ? (t4 = type.to.map(_temp2$1o), $[52] = type.to, $[53] = t4) : t4 = $[53];
|
|
20523
20730
|
let t5;
|
|
20524
20731
|
return $[54] !== t3 || $[55] !== t4 || $[56] !== value._ref ? (t5 = /* @__PURE__ */ jsx(InvalidType, { documentId: t22, actualType: t3, declaredTypes: t4 }), $[54] = t3, $[55] = t4, $[56] = value._ref, $[57] = t5) : t5 = $[57], t5;
|
|
20525
20732
|
}
|
|
20526
20733
|
let t2;
|
|
20527
20734
|
return $[58] !== layout || $[59] !== refType_0 || $[60] !== renderPreview || $[61] !== showTypeLabel || $[62] !== value._ref ? (t2 = /* @__PURE__ */ jsx(ReferencePreview, { id: value._ref, layout, refType: refType_0, renderPreview, showTypeLabel }), $[58] = layout, $[59] = refType_0, $[60] = renderPreview, $[61] = showTypeLabel, $[62] = value._ref, $[63] = t2) : t2 = $[63], t2;
|
|
20528
20735
|
}
|
|
20529
|
-
function _temp2$
|
|
20736
|
+
function _temp2$1o(toType_2) {
|
|
20530
20737
|
return toType_2.name;
|
|
20531
20738
|
}
|
|
20532
|
-
function _temp$
|
|
20739
|
+
function _temp$3f(toType_0) {
|
|
20533
20740
|
return toType_0.name;
|
|
20534
20741
|
}
|
|
20535
20742
|
function UnavailableMessage(props2) {
|
|
@@ -20594,13 +20801,13 @@ function HumanizedList(props2) {
|
|
|
20594
20801
|
let T0, t1;
|
|
20595
20802
|
if ($[1] !== listFormat || $[2] !== props2.values) {
|
|
20596
20803
|
const parts = listFormat.formatToParts(props2.values);
|
|
20597
|
-
T0 = Fragment, t1 = parts.map(_temp3$
|
|
20804
|
+
T0 = Fragment, t1 = parts.map(_temp3$H), $[1] = listFormat, $[2] = props2.values, $[3] = T0, $[4] = t1;
|
|
20598
20805
|
} else
|
|
20599
20806
|
T0 = $[3], t1 = $[4];
|
|
20600
20807
|
let t2;
|
|
20601
20808
|
return $[5] !== T0 || $[6] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { children: t1 }), $[5] = T0, $[6] = t1, $[7] = t2) : t2 = $[7], t2;
|
|
20602
20809
|
}
|
|
20603
|
-
function _temp3$
|
|
20810
|
+
function _temp3$H(segment) {
|
|
20604
20811
|
return segment.type === "element" ? /* @__PURE__ */ jsx("code", { children: segment.value }, segment.value) : segment.value;
|
|
20605
20812
|
}
|
|
20606
20813
|
const HeaderButton = styled.button.withConfig({
|
|
@@ -20628,7 +20835,7 @@ function Details(props2) {
|
|
|
20628
20835
|
} = props2, $[0] = props2, $[1] = children, $[2] = icon, $[3] = openProp, $[4] = restProps, $[5] = t0) : (children = $[1], icon = $[2], openProp = $[3], restProps = $[4], t0 = $[5]);
|
|
20629
20836
|
const title = t0 === void 0 ? "Details" : t0, [open, setOpen] = useState(openProp || !1);
|
|
20630
20837
|
let t1;
|
|
20631
|
-
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setOpen(_temp$
|
|
20838
|
+
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setOpen(_temp$3e), $[6] = t1) : t1 = $[6];
|
|
20632
20839
|
const handleToggle = t1;
|
|
20633
20840
|
let t2, t3;
|
|
20634
20841
|
$[7] !== openProp ? (t2 = () => setOpen(openProp || !1), t3 = [openProp], $[7] = openProp, $[8] = t2, $[9] = t3) : (t2 = $[8], t3 = $[9]), useEffect(t2, t3);
|
|
@@ -20656,7 +20863,7 @@ function Details(props2) {
|
|
|
20656
20863
|
t11
|
|
20657
20864
|
] }), $[26] = restProps, $[27] = t11, $[28] = t9, $[29] = t12) : t12 = $[29], t12;
|
|
20658
20865
|
}
|
|
20659
|
-
function _temp$
|
|
20866
|
+
function _temp$3e(v) {
|
|
20660
20867
|
return !v;
|
|
20661
20868
|
}
|
|
20662
20869
|
const STATUS_TONES = {
|
|
@@ -20799,7 +21006,7 @@ const noop$4 = () => {
|
|
|
20799
21006
|
retry: noop$4
|
|
20800
21007
|
};
|
|
20801
21008
|
function useReferenceInfo$2(id2, getReferenceInfo2) {
|
|
20802
|
-
const $ = c(10), [t0] = useState(_temp$
|
|
21009
|
+
const $ = c(10), [t0] = useState(_temp$3d), [onRetry$2, onRetry2] = t0;
|
|
20803
21010
|
let t1;
|
|
20804
21011
|
if ($[0] !== getReferenceInfo2 || $[1] !== id2 || $[2] !== onRetry2 || $[3] !== onRetry$2) {
|
|
20805
21012
|
let t2;
|
|
@@ -20820,7 +21027,7 @@ function useReferenceInfo$2(id2, getReferenceInfo2) {
|
|
|
20820
21027
|
t1 = $[4];
|
|
20821
21028
|
return useObservable(t1, INITIAL_LOADING_STATE$4);
|
|
20822
21029
|
}
|
|
20823
|
-
function _temp$
|
|
21030
|
+
function _temp$3d() {
|
|
20824
21031
|
return observableCallback();
|
|
20825
21032
|
}
|
|
20826
21033
|
const READABLE = {
|
|
@@ -20946,7 +21153,7 @@ function useReferenceInput(options) {
|
|
|
20946
21153
|
let t72;
|
|
20947
21154
|
if ($[22] !== initialValueTemplateItems || $[23] !== schemaType.to) {
|
|
20948
21155
|
let t82;
|
|
20949
|
-
$[25] !== schemaType.to ? (t82 = (i) => schemaType.to.some((refType) => refType.name === i.template?.schemaType), $[25] = schemaType.to, $[26] = t82) : t82 = $[26], t72 = (initialValueTemplateItems || []).filter(t82).map(_temp$
|
|
21156
|
+
$[25] !== schemaType.to ? (t82 = (i) => schemaType.to.some((refType) => refType.name === i.template?.schemaType), $[25] = schemaType.to, $[26] = t82) : t82 = $[26], t72 = (initialValueTemplateItems || []).filter(t82).map(_temp$3c).filter(isNonNullable$2), $[22] = initialValueTemplateItems, $[23] = schemaType.to, $[24] = t72;
|
|
20950
21157
|
} else
|
|
20951
21158
|
t72 = $[24];
|
|
20952
21159
|
t6 = t72;
|
|
@@ -20965,7 +21172,7 @@ function useReferenceInput(options) {
|
|
|
20965
21172
|
getReferenceInfo: getReferenceInfo$1
|
|
20966
21173
|
}, $[31] = EditReferenceLink, $[32] = createOptions, $[33] = getReferenceInfo$1, $[34] = handleEditReference, $[35] = isCurrentDocumentLiveEdit, $[36] = selectedState, $[37] = t8) : t8 = $[37], t8;
|
|
20967
21174
|
}
|
|
20968
|
-
function _temp$
|
|
21175
|
+
function _temp$3c(item) {
|
|
20969
21176
|
return item.template?.schemaType ? {
|
|
20970
21177
|
id: item.id,
|
|
20971
21178
|
title: item.title || `${item.template.schemaType} from template ${item.template.id}`,
|
|
@@ -21026,7 +21233,7 @@ function ReferenceInputPreview(props2) {
|
|
|
21026
21233
|
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (hadFocus, hasFocus) => {
|
|
21027
21234
|
!hadFocus && hasFocus && elementRef.current && elementRef.current.focus();
|
|
21028
21235
|
}, $[6] = t2) : t2 = $[6], useDidUpdate(focused, t2);
|
|
21029
|
-
const hasErrors = props2.validation.some(_temp$
|
|
21236
|
+
const hasErrors = props2.validation.some(_temp$3b), hasWarnings = props2.validation.some(_temp2$1n), loadableReferenceInfo = useReferenceInfo$2(value?._ref, getReferenceInfo2), refTypeName = loadableReferenceInfo.result?.type || value?._strengthenOnPublish?.type;
|
|
21030
21237
|
let t3;
|
|
21031
21238
|
$[7] !== refTypeName || $[8] !== schemaType.to ? (t3 = refTypeName ? schemaType.to.find((toType) => toType.name === refTypeName) : void 0, $[7] = refTypeName, $[8] = schemaType.to, $[9] = t3) : t3 = $[9];
|
|
21032
21239
|
const refType = t3, pressed = selectedState === "pressed", selected = selectedState === "selected", hasRef = value?._ref, publishedReferenceExists = hasRef && loadableReferenceInfo.result?.isPublished;
|
|
@@ -21120,10 +21327,10 @@ function ReferenceInputPreview(props2) {
|
|
|
21120
21327
|
let t27;
|
|
21121
21328
|
return $[81] !== t26 || $[82] !== tone ? (t27 = /* @__PURE__ */ jsx(WithFocusRingCard, { border: !0, $radius: 2, padding: 1, tone, ref: setCardRef, tabIndex: -1, children: t26 }), $[81] = t26, $[82] = tone, $[83] = t27) : t27 = $[83], t27;
|
|
21122
21329
|
}
|
|
21123
|
-
function _temp2$
|
|
21330
|
+
function _temp2$1n(v_0) {
|
|
21124
21331
|
return v_0.level === "warning";
|
|
21125
21332
|
}
|
|
21126
|
-
function _temp$
|
|
21333
|
+
function _temp$3b(v) {
|
|
21127
21334
|
return v.level === "error";
|
|
21128
21335
|
}
|
|
21129
21336
|
function useReferenceItemRef() {
|
|
@@ -21169,7 +21376,7 @@ function ReferenceInput(props2) {
|
|
|
21169
21376
|
validation: validation2
|
|
21170
21377
|
} = props2;
|
|
21171
21378
|
let t0;
|
|
21172
|
-
$[0] !== validation2 ? (t0 = validation2?.find(_temp$
|
|
21379
|
+
$[0] !== validation2 ? (t0 = validation2?.find(_temp$3a)?.message, $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
21173
21380
|
const validationError = t0, {
|
|
21174
21381
|
selectedReleaseId
|
|
21175
21382
|
} = usePerspective();
|
|
@@ -21243,7 +21450,7 @@ function ReferenceInput(props2) {
|
|
|
21243
21450
|
hits: [],
|
|
21244
21451
|
searchString,
|
|
21245
21452
|
isLoading: !1
|
|
21246
|
-
})))))), scan(_temp2$
|
|
21453
|
+
})))))), scan(_temp2$1m, INITIAL_SEARCH_STATE$3), tap(setSearchState)), $[26] = id2, $[27] = onSearch, $[28] = push, $[29] = t, $[30] = t6) : t6 = $[30];
|
|
21247
21454
|
const handleQueryChange = useObservableEvent(t6);
|
|
21248
21455
|
let t7;
|
|
21249
21456
|
$[31] !== handleQueryChange ? (t7 = () => {
|
|
@@ -21274,7 +21481,7 @@ function ReferenceInput(props2) {
|
|
|
21274
21481
|
!hadFocusAtRef && hasFocusAtRef && elementProps.ref.current?.focus();
|
|
21275
21482
|
}, $[47] = elementProps, $[48] = t13) : t13 = $[48], useDidUpdate(focusPath?.[0] === "_ref", t13);
|
|
21276
21483
|
let t14;
|
|
21277
|
-
$[49] !== searchState.hits ? (t14 = searchState.hits.map(_temp3$
|
|
21484
|
+
$[49] !== searchState.hits ? (t14 = searchState.hits.map(_temp3$G), $[49] = searchState.hits, $[50] = t14) : t14 = $[50];
|
|
21278
21485
|
const hits_0 = t14, isEditing = focusPath.length === 1 && focusPath[0] === "_ref", {
|
|
21279
21486
|
menuRef,
|
|
21280
21487
|
menuButtonRef,
|
|
@@ -21319,19 +21526,19 @@ function ReferenceInput(props2) {
|
|
|
21319
21526
|
let t30;
|
|
21320
21527
|
return $[103] !== props2.elementProps.style || $[104] !== t29 ? (t30 = /* @__PURE__ */ jsx("div", { style: t17, children: t29 }), $[103] = props2.elementProps.style, $[104] = t29, $[105] = t30) : t30 = $[105], t30;
|
|
21321
21528
|
}
|
|
21322
|
-
function _temp3$
|
|
21529
|
+
function _temp3$G(hit_0) {
|
|
21323
21530
|
return {
|
|
21324
21531
|
value: hit_0.id,
|
|
21325
21532
|
hit: hit_0
|
|
21326
21533
|
};
|
|
21327
21534
|
}
|
|
21328
|
-
function _temp2$
|
|
21535
|
+
function _temp2$1m(prevState, nextState) {
|
|
21329
21536
|
return {
|
|
21330
21537
|
...prevState,
|
|
21331
21538
|
...nextState
|
|
21332
21539
|
};
|
|
21333
21540
|
}
|
|
21334
|
-
function _temp$
|
|
21541
|
+
function _temp$3a(v) {
|
|
21335
21542
|
return v.level === "error";
|
|
21336
21543
|
}
|
|
21337
21544
|
function resolveCreateTypeFilter(options) {
|
|
@@ -21445,7 +21652,7 @@ function StudioReferenceInput(props2) {
|
|
|
21445
21652
|
})(searchString, {
|
|
21446
21653
|
perspective: options.perspective,
|
|
21447
21654
|
limit: 101
|
|
21448
|
-
}).pipe(map(_temp2$
|
|
21655
|
+
}).pipe(map(_temp2$1l), switchMap((docs) => docs.length === 0 ? of([]) : combineLatest(docs.map((doc) => documentPreviewStore.observePaths({
|
|
21449
21656
|
_id: getPublishedId(doc._id)
|
|
21450
21657
|
}, ["_rev"]).pipe(map((published) => ({
|
|
21451
21658
|
id: doc._id,
|
|
@@ -21491,7 +21698,7 @@ function StudioReferenceInput(props2) {
|
|
|
21491
21698
|
schemaType,
|
|
21492
21699
|
document: documentValue,
|
|
21493
21700
|
valuePath: path
|
|
21494
|
-
}).map(_temp3$
|
|
21701
|
+
}).map(_temp3$F);
|
|
21495
21702
|
t92 = (initialValueTemplateItems || []).filter((i) => allowedTypes.includes(i.template?.schemaType ?? "")).map(_temp4$h).filter(isNonNullable$2), $[35] = documentValue, $[36] = initialValueTemplateItems, $[37] = path, $[38] = schemaType, $[39] = t92;
|
|
21496
21703
|
} else
|
|
21497
21704
|
t92 = $[39];
|
|
@@ -21521,16 +21728,16 @@ function _temp4$h(item) {
|
|
|
21521
21728
|
}
|
|
21522
21729
|
} : void 0;
|
|
21523
21730
|
}
|
|
21524
|
-
function _temp3$
|
|
21731
|
+
function _temp3$F(opt) {
|
|
21525
21732
|
return opt.type;
|
|
21526
21733
|
}
|
|
21527
|
-
function _temp2$
|
|
21734
|
+
function _temp2$1l(t0) {
|
|
21528
21735
|
const {
|
|
21529
21736
|
hits
|
|
21530
21737
|
} = t0;
|
|
21531
|
-
return hits.map(_temp$
|
|
21738
|
+
return hits.map(_temp$39);
|
|
21532
21739
|
}
|
|
21533
|
-
function _temp$
|
|
21740
|
+
function _temp$39(t0) {
|
|
21534
21741
|
const {
|
|
21535
21742
|
hit
|
|
21536
21743
|
} = t0;
|
|
@@ -21765,7 +21972,7 @@ function ArrayOfObjectsItem(props2) {
|
|
|
21765
21972
|
$[14] !== handleOpenItem || $[15] !== member.item.path || $[16] !== member.key || $[17] !== member.parentSchemaType || $[18] !== onChange || $[19] !== onPathFocus || $[20] !== resolveInitialValue2 || $[21] !== t || $[22] !== telemetryInsertSiblingsTelemetry || $[23] !== toast ? (t4 = (event_0) => {
|
|
21766
21973
|
if (event_0.items.length === 0)
|
|
21767
21974
|
throw new Error("Insert event should include at least one item");
|
|
21768
|
-
const itemsWithKeys = event_0.items.map(_temp$
|
|
21975
|
+
const itemsWithKeys = event_0.items.map(_temp$38);
|
|
21769
21976
|
onChange(PatchEvent.from([insert$1(itemsWithKeys, event_0.position, [{
|
|
21770
21977
|
_key: member.key
|
|
21771
21978
|
}])]));
|
|
@@ -21954,7 +22161,7 @@ function ArrayOfObjectsItem(props2) {
|
|
|
21954
22161
|
let t32;
|
|
21955
22162
|
return $[169] !== handleChange || $[170] !== onFieldGroupSelect || $[171] !== onPathBlur || $[172] !== onPathFocus || $[173] !== onPathOpen || $[174] !== onSetFieldSetCollapsed || $[175] !== onSetPathCollapsed || $[176] !== t31 ? (t32 = /* @__PURE__ */ jsx(FormCallbacksProvider, { onFieldGroupSelect, onChange: handleChange, onPathOpen, onSetFieldSetCollapsed, onSetPathCollapsed, onPathBlur, onPathFocus, children: t31 }), $[169] = handleChange, $[170] = onFieldGroupSelect, $[171] = onPathBlur, $[172] = onPathFocus, $[173] = onPathOpen, $[174] = onSetFieldSetCollapsed, $[175] = onSetPathCollapsed, $[176] = t31, $[177] = t32) : t32 = $[177], t32;
|
|
21956
22163
|
}
|
|
21957
|
-
function _temp$
|
|
22164
|
+
function _temp$38(item) {
|
|
21958
22165
|
return ensureKey(item);
|
|
21959
22166
|
}
|
|
21960
22167
|
function RenderInput$5({
|
|
@@ -22000,7 +22207,7 @@ function IncompatibleItemType$2(props2) {
|
|
|
22000
22207
|
const handleKeyDown = t2;
|
|
22001
22208
|
let t3;
|
|
22002
22209
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
22003
|
-
setShowDetails(_temp$
|
|
22210
|
+
setShowDetails(_temp$37);
|
|
22004
22211
|
}, $[7] = t3) : t3 = $[7];
|
|
22005
22212
|
const handleShowDetails = t3;
|
|
22006
22213
|
let t4;
|
|
@@ -22069,7 +22276,7 @@ function IncompatibleItemType$2(props2) {
|
|
|
22069
22276
|
let t24;
|
|
22070
22277
|
return $[56] !== showDetails || $[57] !== t19 || $[58] !== t23 ? (t24 = /* @__PURE__ */ jsx(Popover, { open: showDetails, ref: popoverRef, onKeyDown: handleKeyDown, portal: !0, constrainSize: !0, tone: "default", content: t19, children: t23 }), $[56] = showDetails, $[57] = t19, $[58] = t23, $[59] = t24) : t24 = $[59], t24;
|
|
22071
22278
|
}
|
|
22072
|
-
function _temp$
|
|
22279
|
+
function _temp$37(v) {
|
|
22073
22280
|
return !v;
|
|
22074
22281
|
}
|
|
22075
22282
|
function MemberItemError(props2) {
|
|
@@ -22960,7 +23167,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
22960
23167
|
let t7;
|
|
22961
23168
|
$[12] !== member.name || $[13] !== onChange ? (t7 = (event_1) => {
|
|
22962
23169
|
const patches = PatchEvent.from(event_1).patches;
|
|
22963
|
-
if (patches.some(_temp$
|
|
23170
|
+
if (patches.some(_temp$36) && (valueRef.current = applyAll(valueRef.current || [], patches), Array.isArray(valueRef.current) && !valueRef.current.length)) {
|
|
22964
23171
|
onChange(PatchEvent.from(unset([member.name])));
|
|
22965
23172
|
return;
|
|
22966
23173
|
}
|
|
@@ -23007,7 +23214,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
23007
23214
|
$[34] !== handleChange || $[35] !== handleOpenItem || $[36] !== member.field.path || $[37] !== member.field.schemaType || $[38] !== onPathFocus || $[39] !== resolveInitialValue2 || $[40] !== toast ? (t14 = (event_2) => {
|
|
23008
23215
|
if (event_2.items.length === 0)
|
|
23009
23216
|
throw new Error("Insert event should include at least one item");
|
|
23010
|
-
const itemsWithKeys = event_2.items.map(_temp2$
|
|
23217
|
+
const itemsWithKeys = event_2.items.map(_temp2$1k);
|
|
23011
23218
|
handleChange(PatchEvent.from([insert$1(itemsWithKeys, event_2.position, [event_2.referenceItem])]));
|
|
23012
23219
|
const focusItemKey = itemsWithKeys[0]._key, itemPath = [...member.field.path, {
|
|
23013
23220
|
_key: focusItemKey
|
|
@@ -23141,7 +23348,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
23141
23348
|
break bb183;
|
|
23142
23349
|
}
|
|
23143
23350
|
case "error": {
|
|
23144
|
-
event_4.files.forEach(_temp3$
|
|
23351
|
+
event_4.files.forEach(_temp3$E), toast.push({
|
|
23145
23352
|
status: "error",
|
|
23146
23353
|
description: t("asset-sources.common.uploader.upload-failed.description"),
|
|
23147
23354
|
title: t("asset-sources.common.uploader.upload-failed.title")
|
|
@@ -23231,13 +23438,13 @@ function ArrayOfObjectsField(props2) {
|
|
|
23231
23438
|
assetSourceUploadComponents
|
|
23232
23439
|
] }), $[141] = assetSourceUploadComponents, $[142] = handleChange, $[143] = onFieldGroupSelect, $[144] = onPathBlur, $[145] = onPathFocus, $[146] = onPathOpen, $[147] = onSetFieldSetCollapsed, $[148] = onSetPathCollapsed, $[149] = t33, $[150] = t34) : t34 = $[150], t34;
|
|
23233
23440
|
}
|
|
23234
|
-
function _temp3$
|
|
23441
|
+
function _temp3$E(_file) {
|
|
23235
23442
|
console.error(_file.error);
|
|
23236
23443
|
}
|
|
23237
|
-
function _temp2$
|
|
23444
|
+
function _temp2$1k(item) {
|
|
23238
23445
|
return ensureKey(item);
|
|
23239
23446
|
}
|
|
23240
|
-
function _temp$
|
|
23447
|
+
function _temp$36(patch2) {
|
|
23241
23448
|
return patch2.type === "unset" && patch2.path.length === 1;
|
|
23242
23449
|
}
|
|
23243
23450
|
function RenderInput$3({
|
|
@@ -23328,7 +23535,7 @@ function ArrayOfPrimitivesField(props2) {
|
|
|
23328
23535
|
let t3;
|
|
23329
23536
|
$[7] !== member.field.value || $[8] !== member.name || $[9] !== onChange ? (t3 = (event_1) => {
|
|
23330
23537
|
const patches = PatchEvent.from(event_1).patches;
|
|
23331
|
-
if (patches.some(_temp$
|
|
23538
|
+
if (patches.some(_temp$35)) {
|
|
23332
23539
|
const result = applyAll(member.field.value || [], patches);
|
|
23333
23540
|
if (Array.isArray(result) && !result.length) {
|
|
23334
23541
|
onChange(PatchEvent.from(unset([member.name])));
|
|
@@ -23430,7 +23637,7 @@ function ArrayOfPrimitivesField(props2) {
|
|
|
23430
23637
|
file: file_0,
|
|
23431
23638
|
schemaType: schemaType_0,
|
|
23432
23639
|
uploader
|
|
23433
|
-
} = t232, events$ = uploader.upload(client, file_0, schemaType_0).pipe(map(_temp2$
|
|
23640
|
+
} = t232, events$ = uploader.upload(client, file_0, schemaType_0).pipe(map(_temp2$1j), tap((event_4) => handleChange(event_4.patches)));
|
|
23434
23641
|
uploadSubscriptions.current && uploadSubscriptions.current.unsubscribe(), uploadSubscriptions.current = events$.subscribe();
|
|
23435
23642
|
}, $[56] = client, $[57] = handleChange, $[58] = t22) : t22 = $[58];
|
|
23436
23643
|
const handleUpload = t22, t23 = member.field.value, t24 = member.field.displayInlineChanges ?? !1;
|
|
@@ -23478,10 +23685,10 @@ function ArrayOfPrimitivesField(props2) {
|
|
|
23478
23685
|
let t29;
|
|
23479
23686
|
return $[115] !== handleChange || $[116] !== onFieldGroupSelect || $[117] !== onPathBlur || $[118] !== onPathFocus || $[119] !== onPathOpen || $[120] !== onSetFieldSetCollapsed || $[121] !== onSetPathCollapsed || $[122] !== t28 ? (t29 = /* @__PURE__ */ jsx(FormCallbacksProvider, { onFieldGroupSelect, onChange: handleChange, onPathOpen, onSetFieldSetCollapsed, onSetPathCollapsed, onPathBlur, onPathFocus, children: t28 }), $[115] = handleChange, $[116] = onFieldGroupSelect, $[117] = onPathBlur, $[118] = onPathFocus, $[119] = onPathOpen, $[120] = onSetFieldSetCollapsed, $[121] = onSetPathCollapsed, $[122] = t28, $[123] = t29) : t29 = $[123], t29;
|
|
23480
23687
|
}
|
|
23481
|
-
function _temp2$
|
|
23688
|
+
function _temp2$1j(uploadProgressEvent) {
|
|
23482
23689
|
return PatchEvent.from(uploadProgressEvent.patches || []);
|
|
23483
23690
|
}
|
|
23484
|
-
function _temp$
|
|
23691
|
+
function _temp$35(patch2) {
|
|
23485
23692
|
return patch2.type === "unset" && patch2.path.length === 1;
|
|
23486
23693
|
}
|
|
23487
23694
|
function RenderInput$2({
|
|
@@ -23756,7 +23963,7 @@ function PrimitiveField(props2) {
|
|
|
23756
23963
|
}
|
|
23757
23964
|
let t152;
|
|
23758
23965
|
if ($[37] !== member.field.path || $[38] !== member.field.validation || $[39] !== parseError) {
|
|
23759
|
-
const nonErrors = member.field.validation.filter(_temp$
|
|
23966
|
+
const nonErrors = member.field.validation.filter(_temp$34);
|
|
23760
23967
|
let t162;
|
|
23761
23968
|
$[41] !== member.field.path || $[42] !== parseError ? (t162 = {
|
|
23762
23969
|
level: "error",
|
|
@@ -23769,7 +23976,7 @@ function PrimitiveField(props2) {
|
|
|
23769
23976
|
}
|
|
23770
23977
|
const validation2 = t14;
|
|
23771
23978
|
let t15;
|
|
23772
|
-
$[44] !== validation2 ? (t15 = validation2.filter(_temp2$
|
|
23979
|
+
$[44] !== validation2 ? (t15 = validation2.filter(_temp2$1i).map(_temp3$D).join(`
|
|
23773
23980
|
`) || void 0, $[44] = validation2, $[45] = t15) : t15 = $[45];
|
|
23774
23981
|
const validationError = t15, t16 = member.field.value, t17 = member.field.schemaType, t18 = member.field.displayInlineChanges ?? !1;
|
|
23775
23982
|
let t19;
|
|
@@ -23798,13 +24005,13 @@ function PrimitiveField(props2) {
|
|
|
23798
24005
|
let t24;
|
|
23799
24006
|
return $[67] !== fieldActions || $[68] !== member.field.changed || $[69] !== member.field.id || $[70] !== member.field.level || $[71] !== member.field.path || $[72] !== member.field.presence || $[73] !== member.field.schemaType.description || $[74] !== member.field.schemaType.title || $[75] !== member.index || $[76] !== member.name || $[77] !== renderField || $[78] !== t20 || $[79] !== t21 || $[80] !== t22 || $[81] !== t23 || $[82] !== validation2 ? (t24 = /* @__PURE__ */ jsx(RenderField, { actions: fieldActions, changed: member.field.changed, description: member.field.schemaType.description, index: member.index, inputId: member.field.id, inputProps: t20, level: member.field.level, name: member.name, path: member.field.path, presence: member.field.presence, schemaType: t21, title: member.field.schemaType.title, validation: validation2, value: t22, render: renderField, children: t23 }), $[67] = fieldActions, $[68] = member.field.changed, $[69] = member.field.id, $[70] = member.field.level, $[71] = member.field.path, $[72] = member.field.presence, $[73] = member.field.schemaType.description, $[74] = member.field.schemaType.title, $[75] = member.index, $[76] = member.name, $[77] = renderField, $[78] = t20, $[79] = t21, $[80] = t22, $[81] = t23, $[82] = validation2, $[83] = t24) : t24 = $[83], t24;
|
|
23800
24007
|
}
|
|
23801
|
-
function _temp3$
|
|
24008
|
+
function _temp3$D(item_1) {
|
|
23802
24009
|
return item_1.message;
|
|
23803
24010
|
}
|
|
23804
|
-
function _temp2$
|
|
24011
|
+
function _temp2$1i(item_0) {
|
|
23805
24012
|
return item_0.level === "error";
|
|
23806
24013
|
}
|
|
23807
|
-
function _temp$
|
|
24014
|
+
function _temp$34(item) {
|
|
23808
24015
|
return item.level !== "error";
|
|
23809
24016
|
}
|
|
23810
24017
|
function RenderInput({
|
|
@@ -23984,7 +24191,7 @@ function UntypedValueInput(t0) {
|
|
|
23984
24191
|
let t6;
|
|
23985
24192
|
$[13] !== isSingleValidType || $[14] !== t ? (t6 = !isSingleValidType && /* @__PURE__ */ jsx(Text$1, { as: "p", muted: !0, size: 1, children: t("inputs.untyped-value.details.multi-type-description") }), $[13] = isSingleValidType, $[14] = t, $[15] = t6) : t6 = $[15];
|
|
23986
24193
|
let t7;
|
|
23987
|
-
$[16] !== isSingleValidType || $[17] !== validTypes ? (t7 = !isSingleValidType && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp$
|
|
24194
|
+
$[16] !== isSingleValidType || $[17] !== validTypes ? (t7 = !isSingleValidType && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp$33) }), $[16] = isSingleValidType, $[17] = validTypes, $[18] = t7) : t7 = $[18];
|
|
23988
24195
|
let t8;
|
|
23989
24196
|
$[19] !== t ? (t8 = t("inputs.untyped-value.details.json-dump-prefix"), $[19] = t, $[20] = t8) : t8 = $[20];
|
|
23990
24197
|
let t9;
|
|
@@ -24023,7 +24230,7 @@ function UntypedValueInput(t0) {
|
|
|
24023
24230
|
let t19;
|
|
24024
24231
|
return $[53] !== t18 || $[54] !== t2 ? (t19 = /* @__PURE__ */ jsx(Alert, { status: "warning", title: t2, children: t18 }), $[53] = t18, $[54] = t2, $[55] = t19) : t19 = $[55], t19;
|
|
24025
24232
|
}
|
|
24026
|
-
function _temp$
|
|
24233
|
+
function _temp$33(validType) {
|
|
24027
24234
|
return /* @__PURE__ */ jsx(Text$1, { as: "li", muted: !0, size: 1, children: /* @__PURE__ */ jsx("code", { children: validType }) }, validType);
|
|
24028
24235
|
}
|
|
24029
24236
|
function getConverters(value, actualType, validTypes) {
|
|
@@ -24040,7 +24247,7 @@ const InvalidValueInput = forwardRef((props2, ref) => {
|
|
|
24040
24247
|
validTypes,
|
|
24041
24248
|
onChange
|
|
24042
24249
|
} = props2;
|
|
24043
|
-
useImperativeHandle(ref, _temp2$
|
|
24250
|
+
useImperativeHandle(ref, _temp2$1h);
|
|
24044
24251
|
let t0;
|
|
24045
24252
|
$[0] !== onChange ? (t0 = () => {
|
|
24046
24253
|
onChange(PatchEvent.from(unset()));
|
|
@@ -24083,7 +24290,7 @@ const InvalidValueInput = forwardRef((props2, ref) => {
|
|
|
24083
24290
|
let t11;
|
|
24084
24291
|
$[32] !== t || $[33] !== validTypes.length ? (t11 = validTypes.length !== 1 && /* @__PURE__ */ jsx(Text$1, { as: "p", muted: !0, size: 1, children: t("inputs.invalid-value.details.multi-type-description") }), $[32] = t, $[33] = validTypes.length, $[34] = t11) : t11 = $[34];
|
|
24085
24292
|
let t12;
|
|
24086
|
-
$[35] !== validTypes ? (t12 = validTypes.length !== 1 && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp3$
|
|
24293
|
+
$[35] !== validTypes ? (t12 = validTypes.length !== 1 && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp3$C) }), $[35] = validTypes, $[36] = t12) : t12 = $[36];
|
|
24087
24294
|
let t13;
|
|
24088
24295
|
$[37] !== actualType ? (t13 = {
|
|
24089
24296
|
actualType
|
|
@@ -24137,14 +24344,14 @@ function ConvertButton(t0) {
|
|
|
24137
24344
|
let t3;
|
|
24138
24345
|
return $[7] !== handleClick || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Button$1, { onClick: handleClick, text: t2 }), $[7] = handleClick, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
24139
24346
|
}
|
|
24140
|
-
function _temp$
|
|
24347
|
+
function _temp$32() {
|
|
24141
24348
|
}
|
|
24142
|
-
function _temp2$
|
|
24349
|
+
function _temp2$1h() {
|
|
24143
24350
|
return {
|
|
24144
|
-
focus: _temp$
|
|
24351
|
+
focus: _temp$32
|
|
24145
24352
|
};
|
|
24146
24353
|
}
|
|
24147
|
-
function _temp3$
|
|
24354
|
+
function _temp3$C(validType) {
|
|
24148
24355
|
return /* @__PURE__ */ jsx(Text$1, { as: "li", children: /* @__PURE__ */ jsx("code", { children: validType }) }, validType);
|
|
24149
24356
|
}
|
|
24150
24357
|
const FormCell = styled.div.withConfig({
|
|
@@ -24393,11 +24600,11 @@ function FormFieldValidationStatus(props2) {
|
|
|
24393
24600
|
__unstable_showSummary: showSummary,
|
|
24394
24601
|
fontSize,
|
|
24395
24602
|
placement
|
|
24396
|
-
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$p : t0, hasErrors = validation2.some(_temp$
|
|
24603
|
+
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$p : t0, hasErrors = validation2.some(_temp$31), hasWarnings = validation2.some(_temp2$1g), status = hasErrors ? "error" : hasWarnings ? "warning" : "info";
|
|
24397
24604
|
let t1;
|
|
24398
24605
|
$[0] !== showSummary || $[1] !== validation2 ? (t1 = showSummary && /* @__PURE__ */ jsx(FormFieldValidationSummary, { validation: validation2 }), $[0] = showSummary, $[1] = validation2, $[2] = t1) : t1 = $[2];
|
|
24399
24606
|
let t2;
|
|
24400
|
-
$[3] !== showSummary || $[4] !== validation2 ? (t2 = !showSummary && /* @__PURE__ */ jsx(Fragment$1, { children: validation2.map(_temp3$
|
|
24607
|
+
$[3] !== showSummary || $[4] !== validation2 ? (t2 = !showSummary && /* @__PURE__ */ jsx(Fragment$1, { children: validation2.map(_temp3$B) }), $[3] = showSummary, $[4] = validation2, $[5] = t2) : t2 = $[5];
|
|
24401
24608
|
let t3;
|
|
24402
24609
|
$[6] !== t1 || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsxs(StyledStack, { space: 3, children: [
|
|
24403
24610
|
t1,
|
|
@@ -24412,13 +24619,13 @@ function FormFieldValidationStatus(props2) {
|
|
|
24412
24619
|
let t7;
|
|
24413
24620
|
return $[15] !== placement || $[16] !== t3 || $[17] !== t6 ? (t7 = /* @__PURE__ */ jsx(Tooltip, { content: t3, portal: !0, placement, fallbackPlacements: t4, children: t6 }), $[15] = placement, $[16] = t3, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
|
|
24414
24621
|
}
|
|
24415
|
-
function _temp3$
|
|
24622
|
+
function _temp3$B(item, itemIndex) {
|
|
24416
24623
|
return /* @__PURE__ */ jsx(FormFieldValidationStatusItem, { validation: item }, itemIndex);
|
|
24417
24624
|
}
|
|
24418
|
-
function _temp2$
|
|
24625
|
+
function _temp2$1g(v_0) {
|
|
24419
24626
|
return v_0.level === "warning";
|
|
24420
24627
|
}
|
|
24421
|
-
function _temp$
|
|
24628
|
+
function _temp$31(v) {
|
|
24422
24629
|
return v.level === "error";
|
|
24423
24630
|
}
|
|
24424
24631
|
function FormFieldValidationStatusItem(props2) {
|
|
@@ -24863,7 +25070,7 @@ function DuplicateKeysAlert(props2) {
|
|
|
24863
25070
|
} = props2;
|
|
24864
25071
|
let t0;
|
|
24865
25072
|
$[0] !== error.duplicates || $[1] !== onChange ? (t0 = () => {
|
|
24866
|
-
onChange(PatchEvent.from((error.duplicates || []).map(_temp$
|
|
25073
|
+
onChange(PatchEvent.from((error.duplicates || []).map(_temp$30)));
|
|
24867
25074
|
}, $[0] = error.duplicates, $[1] = onChange, $[2] = t0) : t0 = $[2];
|
|
24868
25075
|
const handleFixDuplicateKeys = t0, {
|
|
24869
25076
|
t
|
|
@@ -24899,7 +25106,7 @@ function DuplicateKeysAlert(props2) {
|
|
|
24899
25106
|
let t14;
|
|
24900
25107
|
return $[31] !== error.schemaType.description || $[32] !== error.schemaType.title || $[33] !== path || $[34] !== t13 ? (t14 = /* @__PURE__ */ jsx(FormField, { title: t1, description: t2, path, children: t13 }), $[31] = error.schemaType.description, $[32] = error.schemaType.title, $[33] = path, $[34] = t13, $[35] = t14) : t14 = $[35], t14;
|
|
24901
25108
|
}
|
|
24902
|
-
function _temp$
|
|
25109
|
+
function _temp$30(t0) {
|
|
24903
25110
|
const [index, key] = t0;
|
|
24904
25111
|
return set(`${key}_deduped_${index}`, [index, "_key"]);
|
|
24905
25112
|
}
|
|
@@ -24911,7 +25118,7 @@ function MissingKeysAlert(props2) {
|
|
|
24911
25118
|
} = props2;
|
|
24912
25119
|
let t0;
|
|
24913
25120
|
$[0] !== error.value || $[1] !== onChange ? (t0 = () => {
|
|
24914
|
-
onChange(PatchEvent.from((error.value || []).map(_temp$
|
|
25121
|
+
onChange(PatchEvent.from((error.value || []).map(_temp$2$)));
|
|
24915
25122
|
}, $[0] = error.value, $[1] = onChange, $[2] = t0) : t0 = $[2];
|
|
24916
25123
|
const handleFixMissingKeys = t0, {
|
|
24917
25124
|
t
|
|
@@ -24947,7 +25154,7 @@ function MissingKeysAlert(props2) {
|
|
|
24947
25154
|
let t14;
|
|
24948
25155
|
return $[31] !== error.schemaType.description || $[32] !== error.schemaType.title || $[33] !== path || $[34] !== t13 ? (t14 = /* @__PURE__ */ jsx(FormField, { title: t1, description: t2, path, children: t13 }), $[31] = error.schemaType.description, $[32] = error.schemaType.title, $[33] = path, $[34] = t13, $[35] = t14) : t14 = $[35], t14;
|
|
24949
25156
|
}
|
|
24950
|
-
function _temp$
|
|
25157
|
+
function _temp$2$(val, i) {
|
|
24951
25158
|
return setIfMissing(randomKey$1(), [i, "_key"]);
|
|
24952
25159
|
}
|
|
24953
25160
|
function MixedArrayAlert(props2) {
|
|
@@ -24958,7 +25165,7 @@ function MixedArrayAlert(props2) {
|
|
|
24958
25165
|
} = props2;
|
|
24959
25166
|
let t0;
|
|
24960
25167
|
$[0] !== error.value || $[1] !== onChange ? (t0 = () => {
|
|
24961
|
-
const patches = (error.value || []).flatMap(_temp$
|
|
25168
|
+
const patches = (error.value || []).flatMap(_temp$2_).reverse().map(_temp2$1f);
|
|
24962
25169
|
onChange(PatchEvent.from(patches));
|
|
24963
25170
|
}, $[0] = error.value, $[1] = onChange, $[2] = t0) : t0 = $[2];
|
|
24964
25171
|
const handleRemoveNonObjectValues = t0, {
|
|
@@ -24990,10 +25197,10 @@ function MixedArrayAlert(props2) {
|
|
|
24990
25197
|
let t13;
|
|
24991
25198
|
return $[28] !== error.schemaType.description || $[29] !== error.schemaType.title || $[30] !== path || $[31] !== t12 ? (t13 = /* @__PURE__ */ jsx(FormField, { title: t1, description: t2, path, children: t12 }), $[28] = error.schemaType.description, $[29] = error.schemaType.title, $[30] = path, $[31] = t12, $[32] = t13) : t13 = $[32], t13;
|
|
24992
25199
|
}
|
|
24993
|
-
function _temp2$
|
|
25200
|
+
function _temp2$1f(index_0) {
|
|
24994
25201
|
return unset([index_0]);
|
|
24995
25202
|
}
|
|
24996
|
-
function _temp$
|
|
25203
|
+
function _temp$2_(item, index) {
|
|
24997
25204
|
return isPlainObject$1(item) ? [] : [index];
|
|
24998
25205
|
}
|
|
24999
25206
|
function MemberFieldError(props2) {
|
|
@@ -25159,9 +25366,9 @@ function useReferringDocuments(id2, t0) {
|
|
|
25159
25366
|
docId: id2
|
|
25160
25367
|
}, {
|
|
25161
25368
|
tag: "use-referring-documents"
|
|
25162
|
-
}).pipe(map(_temp$
|
|
25369
|
+
}).pipe(map(_temp$2Z), startWith(INITIAL_STATE$a)), $[2] = documentStore, $[3] = id2, $[4] = projection, $[5] = t2) : t2 = $[5], useObservable(t2, INITIAL_STATE$a);
|
|
25163
25370
|
}
|
|
25164
|
-
function _temp$
|
|
25371
|
+
function _temp$2Z(docs) {
|
|
25165
25372
|
return {
|
|
25166
25373
|
referringDocuments: docs,
|
|
25167
25374
|
isLoading: !1
|
|
@@ -25189,7 +25396,7 @@ const AssetUsageList = (t0) => {
|
|
|
25189
25396
|
let t6;
|
|
25190
25397
|
$[8] !== t1 || $[9] !== t5 ? (t6 = /* @__PURE__ */ jsx(Card, { borderBottom: t1, marginTop: 2, paddingBottom: 2, marginBottom: 1, children: t5 }), $[8] = t1, $[9] = t5, $[10] = t6) : t6 = $[10];
|
|
25191
25398
|
let t7;
|
|
25192
|
-
$[11] !== referringDocuments ? (t7 = referringDocuments.map(_temp$
|
|
25399
|
+
$[11] !== referringDocuments ? (t7 = referringDocuments.map(_temp$2Y), $[11] = referringDocuments, $[12] = t7) : t7 = $[12];
|
|
25193
25400
|
let t8;
|
|
25194
25401
|
return $[13] !== t6 || $[14] !== t7 ? (t8 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
25195
25402
|
t6,
|
|
@@ -25217,7 +25424,7 @@ const AssetUsageList = (t0) => {
|
|
|
25217
25424
|
let t6;
|
|
25218
25425
|
return $[11] !== LinkComponent || $[12] !== document2._id || $[13] !== t5 ? (t6 = /* @__PURE__ */ jsx(Card, { as: LinkComponent, radius: 2, "data-as": "a", tabIndex: 0, children: t5 }, t2), $[11] = LinkComponent, $[12] = document2._id, $[13] = t5, $[14] = t6) : t6 = $[14], t6;
|
|
25219
25426
|
};
|
|
25220
|
-
function _temp$
|
|
25427
|
+
function _temp$2Y(document2) {
|
|
25221
25428
|
return /* @__PURE__ */ jsx(DocumentLink, { document: document2 }, document2._id);
|
|
25222
25429
|
}
|
|
25223
25430
|
const STYLE_ASSET_IMAGE = {
|
|
@@ -25313,7 +25520,7 @@ function AssetDeleteDialog(t0) {
|
|
|
25313
25520
|
} = useLegacyReferringDocuments(asset._id);
|
|
25314
25521
|
let t2;
|
|
25315
25522
|
if ($[0] !== referringDocuments) {
|
|
25316
|
-
const drafts = referringDocuments.reduce(_temp$
|
|
25523
|
+
const drafts = referringDocuments.reduce(_temp$2X, []);
|
|
25317
25524
|
t2 = referringDocuments.filter((doc_0) => !drafts.includes(doc_0._id)), $[0] = referringDocuments, $[1] = t2;
|
|
25318
25525
|
} else
|
|
25319
25526
|
t2 = $[1];
|
|
@@ -25354,7 +25561,7 @@ function AssetDeleteDialog(t0) {
|
|
|
25354
25561
|
let t10;
|
|
25355
25562
|
return $[26] !== isLoading || $[27] !== onClose || $[28] !== t7 || $[29] !== t8 || $[30] !== t9 ? (t10 = /* @__PURE__ */ jsx(Dialog$1, { __unstable_autoFocus: isLoading, footer: t7, header: t8, id: "asset-dialog", onClickOutside: onClose, onClose, width: 1, children: t9 }), $[26] = isLoading, $[27] = onClose, $[28] = t7, $[29] = t8, $[30] = t9, $[31] = t10) : t10 = $[31], t10;
|
|
25356
25563
|
}
|
|
25357
|
-
function _temp$
|
|
25564
|
+
function _temp$2X(acc, doc) {
|
|
25358
25565
|
return doc._id.startsWith("drafts.") ? acc.concat(doc._id.slice(7)) : acc;
|
|
25359
25566
|
}
|
|
25360
25567
|
const MENU_POPOVER_PROPS$8 = {
|
|
@@ -25410,7 +25617,7 @@ function AssetUsageDialog(t0) {
|
|
|
25410
25617
|
} = useLegacyReferringDocuments(asset._id);
|
|
25411
25618
|
let t1;
|
|
25412
25619
|
if ($[0] !== referringDocuments) {
|
|
25413
|
-
const drafts = referringDocuments.reduce(_temp$
|
|
25620
|
+
const drafts = referringDocuments.reduce(_temp$2W, []);
|
|
25414
25621
|
t1 = referringDocuments.filter((doc_0) => !drafts.includes(doc_0._id)), $[0] = referringDocuments, $[1] = t1;
|
|
25415
25622
|
} else
|
|
25416
25623
|
t1 = $[1];
|
|
@@ -25426,7 +25633,7 @@ function AssetUsageDialog(t0) {
|
|
|
25426
25633
|
let t4;
|
|
25427
25634
|
return $[10] !== onClose || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsx(Dialog$1, { __unstable_autoFocus: !0, header: t2, id: "asset-dialog", onClickOutside: onClose, onClose, width: 1, children: t3 }), $[10] = onClose, $[11] = t2, $[12] = t3, $[13] = t4) : t4 = $[13], t4;
|
|
25428
25635
|
}
|
|
25429
|
-
function _temp$
|
|
25636
|
+
function _temp$2W(acc, doc) {
|
|
25430
25637
|
return doc._id.startsWith("drafts.") ? acc.concat(doc._id.slice(7)) : acc;
|
|
25431
25638
|
}
|
|
25432
25639
|
const MIME_TYPES = {
|
|
@@ -25687,7 +25894,7 @@ const CardIconWrapper = styled.span.withConfig({
|
|
|
25687
25894
|
const handleToggleUsageDialog = t9;
|
|
25688
25895
|
let t10;
|
|
25689
25896
|
$[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = () => {
|
|
25690
|
-
setIsOpen(_temp$
|
|
25897
|
+
setIsOpen(_temp$2V);
|
|
25691
25898
|
}, $[22] = t10) : t10 = $[22];
|
|
25692
25899
|
const handleToggleOpen = t10;
|
|
25693
25900
|
let t11;
|
|
@@ -25803,7 +26010,7 @@ const CardIconWrapper = styled.span.withConfig({
|
|
|
25803
26010
|
t27
|
|
25804
26011
|
] }), $[100] = asset, $[101] = isSelected, $[102] = t26, $[103] = t27, $[104] = t28) : t28 = $[104], t28;
|
|
25805
26012
|
};
|
|
25806
|
-
function _temp$
|
|
26013
|
+
function _temp$2V(prev) {
|
|
25807
26014
|
return !prev;
|
|
25808
26015
|
}
|
|
25809
26016
|
const STYLES_FILENAME = {
|
|
@@ -26038,7 +26245,7 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
26038
26245
|
$[0] !== client ? (t0 = client.withConfig({
|
|
26039
26246
|
apiVersion: "2023-02-14"
|
|
26040
26247
|
}), $[0] = client, $[1] = t0) : t0 = $[1];
|
|
26041
|
-
const versionedClient2 = t0, [_elementId] = useState(_temp$
|
|
26248
|
+
const versionedClient2 = t0, [_elementId] = useState(_temp$2U), currentPageNumber = useRef(0), {
|
|
26042
26249
|
t
|
|
26043
26250
|
} = useTranslation(), toast = useToast(), fetch$ = useRef(void 0);
|
|
26044
26251
|
let t1;
|
|
@@ -26133,7 +26340,7 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
26133
26340
|
$[32] !== accept || $[33] !== isImageOnlyWildCard || $[34] !== isLoading || $[35] !== listFormat || $[36] !== t ? (t16 = !isImageOnlyWildCard && !isLoading && accept?.length > 0 && /* @__PURE__ */ jsx(Card, { tone: "primary", padding: 3, border: !0, radius: 2, children: /* @__PURE__ */ jsxs(Flex, { gap: 3, align: "center", children: [
|
|
26134
26341
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(InfoOutlineIcon, {}) }),
|
|
26135
26342
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "asset-source.dialog.accept-message", values: {
|
|
26136
|
-
acceptTypes: listFormat.format(accept.split(",").map(_temp2$
|
|
26343
|
+
acceptTypes: listFormat.format(accept.split(",").map(_temp2$1e))
|
|
26137
26344
|
} }) })
|
|
26138
26345
|
] }) }), $[32] = accept, $[33] = isImageOnlyWildCard, $[34] = isLoading, $[35] = listFormat, $[36] = t, $[37] = t16) : t16 = $[37];
|
|
26139
26346
|
let t17;
|
|
@@ -26152,10 +26359,10 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
26152
26359
|
let t21;
|
|
26153
26360
|
return $[63] !== _elementId || $[64] !== handleClose || $[65] !== hasResetAutoFocus || $[66] !== ref || $[67] !== t15 || $[68] !== t20 ? (t21 = /* @__PURE__ */ jsx(Dialog$1, { __unstable_autoFocus: hasResetAutoFocus, header: t15, id: _elementId, onClickOutside: handleClose, onClose: handleClose, ref, width: 2, children: t20 }), $[63] = _elementId, $[64] = handleClose, $[65] = hasResetAutoFocus, $[66] = ref, $[67] = t15, $[68] = t20, $[69] = t21) : t21 = $[69], t21;
|
|
26154
26361
|
}, SelectAssetsDialog$1 = memo(forwardRef(SelectAssetsComponent));
|
|
26155
|
-
function _temp$
|
|
26362
|
+
function _temp$2U() {
|
|
26156
26363
|
return `default-asset-source-${uniqueId()}`;
|
|
26157
26364
|
}
|
|
26158
|
-
function _temp2$
|
|
26365
|
+
function _temp2$1e(type) {
|
|
26159
26366
|
return type.trim();
|
|
26160
26367
|
}
|
|
26161
26368
|
const DatasetAssetSourceComponent = function(props2, ref) {
|
|
@@ -26526,7 +26733,7 @@ function fileTarget(Component2) {
|
|
|
26526
26733
|
$[16] !== handlePaste || $[17] !== pasteTarget ? (t5 = () => {
|
|
26527
26734
|
if (pasteTarget) {
|
|
26528
26735
|
const pasteTargetElementListener = (event_1) => {
|
|
26529
|
-
if (event_1.clipboardData?.types.some(_temp$
|
|
26736
|
+
if (event_1.clipboardData?.types.some(_temp$2T))
|
|
26530
26737
|
return;
|
|
26531
26738
|
const hasHtml = !!event_1.clipboardData?.getData("text/html"), hasText = !!event_1.clipboardData?.getData("text/plain");
|
|
26532
26739
|
if (hasHtml && hasText) {
|
|
@@ -26542,7 +26749,7 @@ function fileTarget(Component2) {
|
|
|
26542
26749
|
}, t6 = [pasteTarget, handlePaste], $[16] = handlePaste, $[17] = pasteTarget, $[18] = t5, $[19] = t6) : (t5 = $[18], t6 = $[19]), useEffect(t5, t6);
|
|
26543
26750
|
let t7;
|
|
26544
26751
|
$[20] !== emitFiles || $[21] !== onFiles || $[22] !== onFilesOut ? (t7 = (event_2) => {
|
|
26545
|
-
if (enteredElements.current = [], Array.from(event_2.dataTransfer.items).map(_temp2$
|
|
26752
|
+
if (enteredElements.current = [], Array.from(event_2.dataTransfer.items).map(_temp2$1d).some(_temp3$A))
|
|
26546
26753
|
return;
|
|
26547
26754
|
event_2.preventDefault(), event_2.stopPropagation();
|
|
26548
26755
|
const dataTransfer = event_2.nativeEvent.dataTransfer;
|
|
@@ -26604,17 +26811,17 @@ function select(el) {
|
|
|
26604
26811
|
const sel = window.getSelection();
|
|
26605
26812
|
sel?.removeAllRanges(), sel?.addRange(range2);
|
|
26606
26813
|
}
|
|
26607
|
-
function _temp$
|
|
26814
|
+
function _temp$2T(t) {
|
|
26608
26815
|
const normalized = t.replace(/^web /, "");
|
|
26609
26816
|
return normalized === "application/portable-text" || normalized === "application/x-portable-text";
|
|
26610
26817
|
}
|
|
26611
|
-
function _temp2$
|
|
26818
|
+
function _temp2$1d(item) {
|
|
26612
26819
|
return {
|
|
26613
26820
|
type: item.type,
|
|
26614
26821
|
kind: item.kind
|
|
26615
26822
|
};
|
|
26616
26823
|
}
|
|
26617
|
-
function _temp3$
|
|
26824
|
+
function _temp3$A(item_0) {
|
|
26618
26825
|
return isPortableTextItem(item_0);
|
|
26619
26826
|
}
|
|
26620
26827
|
function _temp4$f(item_1) {
|
|
@@ -26717,8 +26924,8 @@ function uploadTarget$1(Component2) {
|
|
|
26717
26924
|
} = useTranslation(), client = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS), source = useSource(), formBuilder = useFormBuilder();
|
|
26718
26925
|
let t0;
|
|
26719
26926
|
if ($[11] !== types) {
|
|
26720
|
-
const assetTypes = types.filter(_temp$
|
|
26721
|
-
t0 = assetTypes.length > 0 && assetTypes.every(_temp2$
|
|
26927
|
+
const assetTypes = types.filter(_temp$2S);
|
|
26928
|
+
t0 = assetTypes.length > 0 && assetTypes.every(_temp2$1c), $[11] = types, $[12] = t0;
|
|
26722
26929
|
} else
|
|
26723
26930
|
t0 = $[12];
|
|
26724
26931
|
const disableUpload = t0, t1 = source.title || source.name;
|
|
@@ -26745,7 +26952,7 @@ function uploadTarget$1(Component2) {
|
|
|
26745
26952
|
title: t("inputs.array.error.cannot-upload-unable-to-convert", {
|
|
26746
26953
|
count: rejected.length
|
|
26747
26954
|
}),
|
|
26748
|
-
description: rejected.map(_temp3$
|
|
26955
|
+
description: rejected.map(_temp3$z)
|
|
26749
26956
|
});
|
|
26750
26957
|
}, $[20] = pushToast, $[21] = t, $[22] = t6) : t6 = $[22];
|
|
26751
26958
|
const alertRejectedFiles = t6;
|
|
@@ -26922,13 +27129,13 @@ function getFilesAndAssetSources(options) {
|
|
|
26922
27129
|
};
|
|
26923
27130
|
});
|
|
26924
27131
|
}
|
|
26925
|
-
function _temp$
|
|
27132
|
+
function _temp$2S(type) {
|
|
26926
27133
|
return _isType(type, "image") || _isType(type, "file") || _isType(type, "sanity.video");
|
|
26927
27134
|
}
|
|
26928
|
-
function _temp2$
|
|
27135
|
+
function _temp2$1c(type_0) {
|
|
26929
27136
|
return type_0.options?.disableNew === !0;
|
|
26930
27137
|
}
|
|
26931
|
-
function _temp3$
|
|
27138
|
+
function _temp3$z(task, i) {
|
|
26932
27139
|
return /* @__PURE__ */ jsxs(Flex, { gap: 2, padding: 2, children: [
|
|
26933
27140
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { weight: "medium", children: task.file.name }) }),
|
|
26934
27141
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text$1, { size: 1, children: [
|
|
@@ -27251,7 +27458,7 @@ function ArrayOfObjectsFunctions(props2) {
|
|
|
27251
27458
|
let t6;
|
|
27252
27459
|
$[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = ["top"], $[18] = t6) : t6 = $[18];
|
|
27253
27460
|
let t7;
|
|
27254
|
-
$[19] !== props2.schemaType.options?.insertMenu?.views ? (t7 = props2.schemaType.options?.insertMenu?.views?.some(_temp$
|
|
27461
|
+
$[19] !== props2.schemaType.options?.insertMenu?.views ? (t7 = props2.schemaType.options?.insertMenu?.views?.some(_temp$2R), $[19] = props2.schemaType.options?.insertMenu?.views, $[20] = t7) : t7 = $[20];
|
|
27255
27462
|
let t8;
|
|
27256
27463
|
$[21] !== gridElement || $[22] !== popoverToggleElement || $[23] !== t7 ? (t8 = {
|
|
27257
27464
|
placement: "bottom",
|
|
@@ -27303,7 +27510,7 @@ function ArrayOfObjectsFunctions(props2) {
|
|
|
27303
27510
|
children
|
|
27304
27511
|
] }), $[48] = children, $[49] = t11, $[50] = t12) : t12 = $[50], t12;
|
|
27305
27512
|
}
|
|
27306
|
-
function _temp$
|
|
27513
|
+
function _temp$2R(view) {
|
|
27307
27514
|
return view.name === "grid";
|
|
27308
27515
|
}
|
|
27309
27516
|
const DragHandleButton = /* @__PURE__ */ styled(Button$1).withConfig({
|
|
@@ -27436,7 +27643,7 @@ function IncompatibleItemType$1(props2) {
|
|
|
27436
27643
|
const handleKeyDown = t2;
|
|
27437
27644
|
let t3;
|
|
27438
27645
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
27439
|
-
setShowDetails(_temp$
|
|
27646
|
+
setShowDetails(_temp$2Q);
|
|
27440
27647
|
}, $[7] = t3) : t3 = $[7];
|
|
27441
27648
|
const handleShowDetails = t3;
|
|
27442
27649
|
let t4;
|
|
@@ -27502,7 +27709,7 @@ function IncompatibleItemType$1(props2) {
|
|
|
27502
27709
|
let t23;
|
|
27503
27710
|
return $[51] !== showDetails || $[52] !== t17 || $[53] !== t22 ? (t23 = /* @__PURE__ */ jsx(Popover, { open: showDetails, ref: popoverRef, onKeyDown: handleKeyDown, portal: !0, constrainSize: !0, tone: "default", content: t17, children: t22 }), $[51] = showDetails, $[52] = t17, $[53] = t22, $[54] = t23) : t23 = $[54], t23;
|
|
27504
27711
|
}
|
|
27505
|
-
function _temp$
|
|
27712
|
+
function _temp$2Q(v) {
|
|
27506
27713
|
return !v;
|
|
27507
27714
|
}
|
|
27508
27715
|
const MENU_POPOVER_PROPS$7 = {
|
|
@@ -27671,20 +27878,20 @@ function useValuePreview(props2) {
|
|
|
27671
27878
|
viewOptions: {
|
|
27672
27879
|
ordering
|
|
27673
27880
|
}
|
|
27674
|
-
}).pipe(map(_temp$
|
|
27881
|
+
}).pipe(map(_temp$2P), catchError(_temp2$1b)), $[3] = chosenPerspectiveStack, $[4] = observeForPreview, $[5] = ordering, $[6] = perspectiveStack, $[7] = previewValue, $[8] = schemaType, $[9] = t3;
|
|
27675
27882
|
} else
|
|
27676
27883
|
t3 = $[9];
|
|
27677
27884
|
t2 = t3;
|
|
27678
27885
|
}
|
|
27679
27886
|
return useObservable(t2, INITIAL_STATE$9);
|
|
27680
27887
|
}
|
|
27681
|
-
function _temp2$
|
|
27888
|
+
function _temp2$1b(error) {
|
|
27682
27889
|
return of({
|
|
27683
27890
|
isLoading: !1,
|
|
27684
27891
|
error
|
|
27685
27892
|
});
|
|
27686
27893
|
}
|
|
27687
|
-
function _temp$
|
|
27894
|
+
function _temp$2P(event) {
|
|
27688
27895
|
return {
|
|
27689
27896
|
isLoading: !1,
|
|
27690
27897
|
value: event.snapshot || void 0
|
|
@@ -27917,7 +28124,7 @@ function GridItem(props2) {
|
|
|
27917
28124
|
const presence = t7, childValidation = useChildValidation(path, !0);
|
|
27918
28125
|
let t8;
|
|
27919
28126
|
$[14] !== childValidation ? (t8 = childValidation.length === 0 ? null : /* @__PURE__ */ jsx(Box, { paddingX: 1, paddingY: 3, children: /* @__PURE__ */ jsx(FormFieldValidationStatus, { validation: childValidation, __unstable_showSummary: !0 }) }), $[14] = childValidation, $[15] = t8) : t8 = $[15];
|
|
27920
|
-
const validation2 = t8, hasErrors = childValidation.some(_temp$
|
|
28127
|
+
const validation2 = t8, hasErrors = childValidation.some(_temp$2O), hasWarnings = childValidation.some(_temp2$1a), [contextMenuButtonElement, setContextMenuButtonElement] = useState(null), t9 = parentSchemaType.options?.insertMenu;
|
|
27921
28128
|
let t10;
|
|
27922
28129
|
$[16] !== contextMenuButtonElement || $[17] !== handleInsert || $[18] !== insertableTypes || $[19] !== maxReached || $[20] !== maxReachedReason || $[21] !== t9 ? (t10 = {
|
|
27923
28130
|
schemaTypes: insertableTypes,
|
|
@@ -27960,7 +28167,7 @@ function GridItem(props2) {
|
|
|
27960
28167
|
readOnly,
|
|
27961
28168
|
hasErrors,
|
|
27962
28169
|
hasWarnings
|
|
27963
|
-
}), handleMouseDown = _temp3$
|
|
28170
|
+
}), handleMouseDown = _temp3$y;
|
|
27964
28171
|
let t18;
|
|
27965
28172
|
$[53] !== onOpen ? (t18 = (event_0) => {
|
|
27966
28173
|
event_0.stopPropagation(), onOpen();
|
|
@@ -28006,13 +28213,13 @@ function GridItem(props2) {
|
|
|
28006
28213
|
t23 = $[92];
|
|
28007
28214
|
return t23;
|
|
28008
28215
|
}
|
|
28009
|
-
function _temp3$
|
|
28216
|
+
function _temp3$y(event) {
|
|
28010
28217
|
event.preventDefault();
|
|
28011
28218
|
}
|
|
28012
|
-
function _temp2$
|
|
28219
|
+
function _temp2$1a(v_0) {
|
|
28013
28220
|
return v_0.level === "warning";
|
|
28014
28221
|
}
|
|
28015
|
-
function _temp$
|
|
28222
|
+
function _temp$2O(v) {
|
|
28016
28223
|
return v.level === "error";
|
|
28017
28224
|
}
|
|
28018
28225
|
const EMPTY$4 = [];
|
|
@@ -28039,9 +28246,9 @@ function GridArrayInput(props2) {
|
|
|
28039
28246
|
value: t1
|
|
28040
28247
|
} = props2, ArrayFunctions = t0 === void 0 ? ArrayOfObjectsFunctions : t0, value = t1 === void 0 ? EMPTY$4 : t1, {
|
|
28041
28248
|
t
|
|
28042
|
-
} = useTranslation(), errorTone = validation2?.some(_temp$
|
|
28249
|
+
} = useTranslation(), errorTone = validation2?.some(_temp$2N) ? "critical" : void 0, sortable = schemaType.options?.sortable !== !1, renderItem2 = _temp2$19;
|
|
28043
28250
|
let t2;
|
|
28044
|
-
$[0] !== members ? (t2 = members.map(_temp3$
|
|
28251
|
+
$[0] !== members ? (t2 = members.map(_temp3$x), $[0] = members, $[1] = t2) : t2 = $[1];
|
|
28045
28252
|
const memberKeys = t2;
|
|
28046
28253
|
let t3;
|
|
28047
28254
|
$[2] !== errorTone || $[3] !== members.length || $[4] !== schemaType.placeholder || $[5] !== t ? (t3 = members?.length === 0 && /* @__PURE__ */ jsx(Card, { padding: 3, border: !0, radius: 2, tone: errorTone, children: /* @__PURE__ */ jsx(Text$1, { align: "center", muted: !0, size: 1, children: schemaType.placeholder || /* @__PURE__ */ jsx(Fragment$1, { children: t("inputs.array.no-items-label") }) }) }), $[2] = errorTone, $[3] = members.length, $[4] = schemaType.placeholder, $[5] = t, $[6] = t3) : t3 = $[6];
|
|
@@ -28067,13 +28274,13 @@ function GridArrayInput(props2) {
|
|
|
28067
28274
|
let t9;
|
|
28068
28275
|
return $[42] !== members.length || $[43] !== schemaType || $[44] !== t8 ? (t9 = /* @__PURE__ */ jsx(ArrayValidationProvider, { schemaType, itemCount: members.length, children: t8 }), $[42] = members.length, $[43] = schemaType, $[44] = t8, $[45] = t9) : t9 = $[45], t9;
|
|
28069
28276
|
}
|
|
28070
|
-
function _temp3$
|
|
28277
|
+
function _temp3$x(member) {
|
|
28071
28278
|
return member.key;
|
|
28072
28279
|
}
|
|
28073
|
-
function _temp2$
|
|
28280
|
+
function _temp2$19(itemProps) {
|
|
28074
28281
|
return /* @__PURE__ */ jsx(GridItem, { ...itemProps });
|
|
28075
28282
|
}
|
|
28076
|
-
function _temp$
|
|
28283
|
+
function _temp$2N(v) {
|
|
28077
28284
|
return v.level === "error";
|
|
28078
28285
|
}
|
|
28079
28286
|
function useMemoCompare(next, compare) {
|
|
@@ -28094,7 +28301,7 @@ function useVisibilityDetection(parentRef) {
|
|
|
28094
28301
|
if (wasVisible === isNowVisible)
|
|
28095
28302
|
return;
|
|
28096
28303
|
const becameVisible = !wasVisible && isNowVisible;
|
|
28097
|
-
prevVisible.current = isNowVisible, setIsVisible(isNowVisible), becameVisible && setMountKey(_temp$
|
|
28304
|
+
prevVisible.current = isNowVisible, setIsVisible(isNowVisible), becameVisible && setMountKey(_temp$2M);
|
|
28098
28305
|
});
|
|
28099
28306
|
return parentRef.current && resizeObserver.observe(parentRef.current), () => resizeObserver.disconnect();
|
|
28100
28307
|
}, t1 = [parentRef], $[0] = parentRef, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
|
|
@@ -28104,7 +28311,7 @@ function useVisibilityDetection(parentRef) {
|
|
|
28104
28311
|
mountKey
|
|
28105
28312
|
}, $[3] = isVisible, $[4] = mountKey, $[5] = t2) : t2 = $[5], t2;
|
|
28106
28313
|
}
|
|
28107
|
-
function _temp$
|
|
28314
|
+
function _temp$2M(prev) {
|
|
28108
28315
|
return prev + 1;
|
|
28109
28316
|
}
|
|
28110
28317
|
const Root$p = styled(Card).withConfig({
|
|
@@ -28185,7 +28392,7 @@ function IncompatibleItemType(props2) {
|
|
|
28185
28392
|
const handleKeyDown = t2;
|
|
28186
28393
|
let t3;
|
|
28187
28394
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
28188
|
-
setShowDetails(_temp$
|
|
28395
|
+
setShowDetails(_temp$2L);
|
|
28189
28396
|
}, $[7] = t3) : t3 = $[7];
|
|
28190
28397
|
const handleShowDetails = t3;
|
|
28191
28398
|
let t4;
|
|
@@ -28247,7 +28454,7 @@ function IncompatibleItemType(props2) {
|
|
|
28247
28454
|
let t22;
|
|
28248
28455
|
return $[50] !== showDetails || $[51] !== t17 || $[52] !== t21 ? (t22 = /* @__PURE__ */ jsx(Popover, { open: showDetails, ref: popoverRef, onKeyDown: handleKeyDown, portal: !0, constrainSize: !0, tone: "default", content: t17, children: t21 }), $[50] = showDetails, $[51] = t17, $[52] = t21, $[53] = t22) : t22 = $[53], t22;
|
|
28249
28456
|
}
|
|
28250
|
-
function _temp$
|
|
28457
|
+
function _temp$2L(v) {
|
|
28251
28458
|
return !v;
|
|
28252
28459
|
}
|
|
28253
28460
|
const MENU_POPOVER_PROPS$5 = {
|
|
@@ -28421,9 +28628,9 @@ function ListArrayInput(props2) {
|
|
|
28421
28628
|
} = useTranslation(), ItemComponent = useItemComponent();
|
|
28422
28629
|
let t2;
|
|
28423
28630
|
$[0] !== ItemComponent ? (t2 = (itemProps) => /* @__PURE__ */ jsx(ItemComponent, { ...itemProps }), $[0] = ItemComponent, $[1] = t2) : t2 = $[1];
|
|
28424
|
-
const renderItem2 = t2, errorTone = validation2?.some(_temp$
|
|
28631
|
+
const renderItem2 = t2, errorTone = validation2?.some(_temp$2K) ? "critical" : void 0, [activeDragItemIndex, setActiveDragItemIndex] = useState(null);
|
|
28425
28632
|
let t3;
|
|
28426
|
-
$[2] !== members ? (t3 = members.map(_temp2$
|
|
28633
|
+
$[2] !== members ? (t3 = members.map(_temp2$18), $[2] = members, $[3] = t3) : t3 = $[3];
|
|
28427
28634
|
const memberKeys = useMemoCompare(t3, shallowEquals), parentRef = useRef(null), {
|
|
28428
28635
|
isVisible,
|
|
28429
28636
|
mountKey
|
|
@@ -28471,10 +28678,10 @@ function ListArrayInput(props2) {
|
|
|
28471
28678
|
let t12;
|
|
28472
28679
|
return $[48] !== members.length || $[49] !== schemaType || $[50] !== t11 ? (t12 = /* @__PURE__ */ jsx(ArrayValidationProvider, { schemaType, itemCount: members.length, children: t11 }), $[48] = members.length, $[49] = schemaType, $[50] = t11, $[51] = t12) : t12 = $[51], t12;
|
|
28473
28680
|
}
|
|
28474
|
-
function _temp2$
|
|
28681
|
+
function _temp2$18(member) {
|
|
28475
28682
|
return member.key;
|
|
28476
28683
|
}
|
|
28477
|
-
function _temp$
|
|
28684
|
+
function _temp$2K(v) {
|
|
28478
28685
|
return v.level === "error";
|
|
28479
28686
|
}
|
|
28480
28687
|
function ArrayOfObjectsInput(props2) {
|
|
@@ -28519,7 +28726,7 @@ function ArrayOfObjectOptionsInput(props2) {
|
|
|
28519
28726
|
$[0] !== t0 ? (t1 = t0 === void 0 ? [] : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
28520
28727
|
const value = t1, t2 = schemaType.options?.list || EMPTY_ARRAY$k;
|
|
28521
28728
|
let t3;
|
|
28522
|
-
$[2] !== t2 ? (t3 = t2.map(_temp$
|
|
28729
|
+
$[2] !== t2 ? (t3 = t2.map(_temp$2J), $[2] = t2, $[3] = t3) : t3 = $[3];
|
|
28523
28730
|
const options = t3;
|
|
28524
28731
|
let t4;
|
|
28525
28732
|
$[4] !== onChange || $[5] !== options || $[6] !== value ? (t4 = (isChecked, changedOption) => {
|
|
@@ -28559,7 +28766,7 @@ function ArrayOfObjectOptionsInput(props2) {
|
|
|
28559
28766
|
let t9;
|
|
28560
28767
|
return $[29] !== changed || $[30] !== path || $[31] !== t8 ? (t9 = /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !1, children: t8 }), $[29] = changed, $[30] = path, $[31] = t8, $[32] = t9) : t9 = $[32], t9;
|
|
28561
28768
|
}
|
|
28562
|
-
function _temp$
|
|
28769
|
+
function _temp$2J(option, index) {
|
|
28563
28770
|
return isKeyedObject(option) ? option : {
|
|
28564
28771
|
...option,
|
|
28565
28772
|
_key: `auto-generated-${index}`
|
|
@@ -28601,7 +28808,7 @@ function ArrayOfPrimitiveOptionsInput(props2) {
|
|
|
28601
28808
|
const options = t3;
|
|
28602
28809
|
let t4;
|
|
28603
28810
|
$[6] !== onChange || $[7] !== options || $[8] !== value ? (t4 = (isChecked, changedValue) => {
|
|
28604
|
-
const nextValue = options.map(_temp$
|
|
28811
|
+
const nextValue = options.map(_temp$2I).filter((optionValue) => optionValue === changedValue ? isChecked : value.includes(optionValue));
|
|
28605
28812
|
onChange(nextValue.length > 0 ? set(nextValue) : unset());
|
|
28606
28813
|
}, $[6] = onChange, $[7] = options, $[8] = value, $[9] = t4) : t4 = $[9];
|
|
28607
28814
|
const handleChange = t4, t5 = schemaType.options?.layout === "grid" ? Math.min(options.length, 4) : 1;
|
|
@@ -28623,7 +28830,7 @@ function ArrayOfPrimitiveOptionsInput(props2) {
|
|
|
28623
28830
|
let t8;
|
|
28624
28831
|
return $[27] !== changed || $[28] !== path || $[29] !== t7 ? (t8 = /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !1, children: t7 }), $[27] = changed, $[28] = path, $[29] = t7, $[30] = t8) : t8 = $[30], t8;
|
|
28625
28832
|
}
|
|
28626
|
-
function _temp$
|
|
28833
|
+
function _temp$2I(option) {
|
|
28627
28834
|
return option.value;
|
|
28628
28835
|
}
|
|
28629
28836
|
function ArrayOfOptionsInput(props2) {
|
|
@@ -28741,14 +28948,14 @@ function uploadTarget(Component2) {
|
|
|
28741
28948
|
const tasks2 = files.map((file_0) => ({
|
|
28742
28949
|
file: file_0,
|
|
28743
28950
|
uploaderCandidates: getUploadCandidates(types, resolveUploader2, file_0)
|
|
28744
|
-
})), ready = tasks2.filter(_temp$
|
|
28951
|
+
})), ready = tasks2.filter(_temp$2H), rejected = tasks2.filter(_temp2$17);
|
|
28745
28952
|
rejected.length > 0 && pushToast({
|
|
28746
28953
|
closable: !0,
|
|
28747
28954
|
status: "warning",
|
|
28748
28955
|
title: t("inputs.array.error.cannot-upload-unable-to-convert", {
|
|
28749
28956
|
count: rejected.length
|
|
28750
28957
|
}),
|
|
28751
|
-
description: rejected.map(_temp3$
|
|
28958
|
+
description: rejected.map(_temp3$w)
|
|
28752
28959
|
}), ready.forEach((task_2) => {
|
|
28753
28960
|
uploadFile2(task_2.file, sortBy(task_2.uploaderCandidates, _temp4$d)[0]);
|
|
28754
28961
|
});
|
|
@@ -28809,13 +29016,13 @@ function DropMessage(props2) {
|
|
|
28809
29016
|
let t2;
|
|
28810
29017
|
return $[3] !== t1 ? (t2 = /* @__PURE__ */ jsx(Fragment$1, { children: t1 }), $[3] = t1, $[4] = t2) : t2 = $[4], t2;
|
|
28811
29018
|
}
|
|
28812
|
-
function _temp$
|
|
29019
|
+
function _temp$2H(task) {
|
|
28813
29020
|
return task.uploaderCandidates.length > 0;
|
|
28814
29021
|
}
|
|
28815
|
-
function _temp2$
|
|
29022
|
+
function _temp2$17(task_0) {
|
|
28816
29023
|
return task_0.uploaderCandidates.length === 0;
|
|
28817
29024
|
}
|
|
28818
|
-
function _temp3$
|
|
29025
|
+
function _temp3$w(task_1, i) {
|
|
28819
29026
|
return /* @__PURE__ */ jsxs(Flex, { gap: 2, padding: 2, children: [
|
|
28820
29027
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { weight: "medium", children: task_1.file.name }) }),
|
|
28821
29028
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text$1, { size: 1, children: [
|
|
@@ -28900,7 +29107,7 @@ const MENU_BUTTON_POPOVER_PROPS$2 = {
|
|
|
28900
29107
|
children,
|
|
28901
29108
|
presence,
|
|
28902
29109
|
schemaType
|
|
28903
|
-
} = props2, hasError = validation2.filter(_temp$
|
|
29110
|
+
} = props2, hasError = validation2.filter(_temp$2G).length > 0, hasWarning = validation2.filter(_temp2$16).length > 0;
|
|
28904
29111
|
let t0;
|
|
28905
29112
|
$[0] !== onInsert ? (t0 = (pos, insertType) => {
|
|
28906
29113
|
onInsert({
|
|
@@ -28979,10 +29186,10 @@ const MENU_BUTTON_POPOVER_PROPS$2 = {
|
|
|
28979
29186
|
let t17;
|
|
28980
29187
|
return $[68] !== menu || $[69] !== sortable || $[70] !== t11 || $[71] !== t12 || $[72] !== t13 || $[73] !== t16 || $[74] !== tone ? (t17 = /* @__PURE__ */ jsx(RowLayout, { tone, readOnly: t11, menu, dragHandle: sortable, presence: t12, validation: t13, children: t16 }), $[68] = menu, $[69] = sortable, $[70] = t11, $[71] = t12, $[72] = t13, $[73] = t16, $[74] = tone, $[75] = t17) : t17 = $[75], t17;
|
|
28981
29188
|
});
|
|
28982
|
-
function _temp$
|
|
29189
|
+
function _temp$2G(item) {
|
|
28983
29190
|
return item.level === "error";
|
|
28984
29191
|
}
|
|
28985
|
-
function _temp2$
|
|
29192
|
+
function _temp2$16(item_0) {
|
|
28986
29193
|
return item_0.level === "warning";
|
|
28987
29194
|
}
|
|
28988
29195
|
function NoItemsPlaceholder(t0) {
|
|
@@ -28991,7 +29198,7 @@ function NoItemsPlaceholder(t0) {
|
|
|
28991
29198
|
validation: validation2
|
|
28992
29199
|
} = t0, {
|
|
28993
29200
|
t
|
|
28994
|
-
} = useTranslation(), tone = validation2?.some(_temp$
|
|
29201
|
+
} = useTranslation(), tone = validation2?.some(_temp$2F) ? "critical" : void 0;
|
|
28995
29202
|
let t1;
|
|
28996
29203
|
$[0] !== schemaType.placeholder || $[1] !== t ? (t1 = schemaType.placeholder || t("inputs.array.no-items-label"), $[0] = schemaType.placeholder, $[1] = t, $[2] = t1) : t1 = $[2];
|
|
28997
29204
|
let t2;
|
|
@@ -28999,7 +29206,7 @@ function NoItemsPlaceholder(t0) {
|
|
|
28999
29206
|
let t3;
|
|
29000
29207
|
return $[5] !== t2 || $[6] !== tone ? (t3 = /* @__PURE__ */ jsx(Card, { padding: 3, border: !0, radius: 2, tone, children: t2 }), $[5] = t2, $[6] = tone, $[7] = t3) : t3 = $[7], t3;
|
|
29001
29208
|
}
|
|
29002
|
-
function _temp$
|
|
29209
|
+
function _temp$2F(v) {
|
|
29003
29210
|
return v.level === "error";
|
|
29004
29211
|
}
|
|
29005
29212
|
function nearestIndexOf(array, startIdx, searchElement) {
|
|
@@ -29178,7 +29385,7 @@ function BooleanInput(props2) {
|
|
|
29178
29385
|
elementProps,
|
|
29179
29386
|
validation: validation2,
|
|
29180
29387
|
presence
|
|
29181
|
-
} = props2, layout = schemaType.options?.layout || "switch", indeterminate = typeof value != "boolean", checked = value || !1, LayoutSpecificInput = layout === "checkbox" ? Checkbox$1 : Switch$1, tone = !readOnly && validation2?.some(_temp$
|
|
29388
|
+
} = props2, layout = schemaType.options?.layout || "switch", indeterminate = typeof value != "boolean", checked = value || !1, LayoutSpecificInput = layout === "checkbox" ? Checkbox$1 : Switch$1, tone = !readOnly && validation2?.some(_temp$2E) ? "critical" : readOnly ? "transparent" : void 0;
|
|
29182
29389
|
let t0;
|
|
29183
29390
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
29184
29391
|
paddingTop: "0.85rem"
|
|
@@ -29210,7 +29417,7 @@ function BooleanInput(props2) {
|
|
|
29210
29417
|
let t11;
|
|
29211
29418
|
return $[37] !== t10 || $[38] !== tone ? (t11 = /* @__PURE__ */ jsx(Card, { border: !0, "data-testid": "boolean-input", radius: 2, tone, children: t10 }), $[37] = t10, $[38] = tone, $[39] = t11) : t11 = $[39], t11;
|
|
29212
29419
|
}
|
|
29213
|
-
function _temp$
|
|
29420
|
+
function _temp$2E(v) {
|
|
29214
29421
|
return v.level === "error";
|
|
29215
29422
|
}
|
|
29216
29423
|
const DATE_FORMAT = {
|
|
@@ -29358,7 +29565,7 @@ const TIME_ZONE_SCOPE_TYPE = {
|
|
|
29358
29565
|
let t6;
|
|
29359
29566
|
$[22] !== allTimeZones ? (t6 = () => {
|
|
29360
29567
|
const localTzName = Intl.DateTimeFormat().resolvedOptions().timeZone, foundLocal = allTimeZones.find((tz_3) => tz_3.name === localTzName);
|
|
29361
|
-
return foundLocal || allTimeZones.find(_temp$
|
|
29568
|
+
return foundLocal || allTimeZones.find(_temp$2D) || allTimeZones[0];
|
|
29362
29569
|
}, $[22] = allTimeZones, $[23] = t6) : t6 = $[23];
|
|
29363
29570
|
const getLocalTimeZone = t6;
|
|
29364
29571
|
let t7;
|
|
@@ -29456,7 +29663,7 @@ function getErrorMessage$1(err) {
|
|
|
29456
29663
|
let message;
|
|
29457
29664
|
return isClientError$1(err) ? err.response.statusCode === 403 ? message = "Forbidden. Please check that your project has access to the feature." : message = err.message : (err instanceof Error && (message = err.message), message = String(err)), message;
|
|
29458
29665
|
}
|
|
29459
|
-
function _temp$
|
|
29666
|
+
function _temp$2D(timeZone) {
|
|
29460
29667
|
return timeZone.abbreviation === "GMT";
|
|
29461
29668
|
}
|
|
29462
29669
|
const TimeZoneCitySpan = /* @__PURE__ */ styled.span.withConfig({
|
|
@@ -29539,7 +29746,7 @@ const TimeZoneCitySpan = /* @__PURE__ */ styled.span.withConfig({
|
|
|
29539
29746
|
const handleTimeZoneUpdate = t8, isDirty = selectedTz?.name !== timeZone.name;
|
|
29540
29747
|
let t9;
|
|
29541
29748
|
$[20] !== getLocalTimeZone ? (t9 = getLocalTimeZone(), $[20] = getLocalTimeZone, $[21] = t9) : t9 = $[21];
|
|
29542
|
-
const isLocalTzSelected = selectedTz?.name === t9.name, renderOption = _temp$
|
|
29749
|
+
const isLocalTzSelected = selectedTz?.name === t9.name, renderOption = _temp$2C, renderValue = _temp2$15;
|
|
29543
29750
|
let t10;
|
|
29544
29751
|
$[22] !== showAllOptions ? (t10 = (filterQuery, option_1) => showAllOptions || filterQuery === "" ? !0 : `${option_1.city} (GMT${option_1.offset}) ${option_1.alternativeName}`.toLowerCase().includes(filterQuery.toLowerCase()), $[22] = showAllOptions, $[23] = t10) : t10 = $[23];
|
|
29545
29752
|
const filterOption = t10, t11 = !isDirty || !selectedTz;
|
|
@@ -29603,7 +29810,7 @@ const TimeZoneCitySpan = /* @__PURE__ */ styled.span.withConfig({
|
|
|
29603
29810
|
let t28;
|
|
29604
29811
|
return $[62] !== onClose || $[63] !== t12 || $[64] !== t27 ? (t28 = /* @__PURE__ */ jsx(Dialog$1, { footer: t12, header: "Select time zone", id: "time-zone", onClose, width: 1, children: t27 }), $[62] = onClose, $[63] = t12, $[64] = t27, $[65] = t28) : t28 = $[65], t28;
|
|
29605
29812
|
};
|
|
29606
|
-
function _temp$
|
|
29813
|
+
function _temp$2C(option) {
|
|
29607
29814
|
return /* @__PURE__ */ jsx(Card, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs(Text$1, { size: 1, textOverflow: "ellipsis", children: [
|
|
29608
29815
|
/* @__PURE__ */ jsx(TimeZoneCitySpan, { children: option.city }),
|
|
29609
29816
|
/* @__PURE__ */ jsxs(TimeZoneOffsetSpan, { children: [
|
|
@@ -29616,7 +29823,7 @@ function _temp$2D(option) {
|
|
|
29616
29823
|
/* @__PURE__ */ jsx(TimeZoneAlternativeNameSpan, { children: option.alternativeName })
|
|
29617
29824
|
] }) });
|
|
29618
29825
|
}
|
|
29619
|
-
function _temp2$
|
|
29826
|
+
function _temp2$15(_value, option_0) {
|
|
29620
29827
|
return option_0 ? `${option_0.alternativeName} (${option_0.namePretty})` : "";
|
|
29621
29828
|
}
|
|
29622
29829
|
function useDialogTimeZone(timeZoneScope) {
|
|
@@ -29704,9 +29911,9 @@ const DEFAULT_MONTH_NAMES = ["January", "February", "March", "April", "May", "Ju
|
|
|
29704
29911
|
weekInfo
|
|
29705
29912
|
} = useCurrentLocale();
|
|
29706
29913
|
let t0;
|
|
29707
|
-
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$2(getWeekStartsOfMonth$2(date, weekInfo.firstDay)).map(_temp$
|
|
29914
|
+
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$2(getWeekStartsOfMonth$2(date, weekInfo.firstDay)).map(_temp$2B), $[0] = date, $[1] = weekInfo.firstDay, $[2] = t0) : t0 = $[2], t0;
|
|
29708
29915
|
};
|
|
29709
|
-
function _temp$
|
|
29916
|
+
function _temp$2B(days) {
|
|
29710
29917
|
return {
|
|
29711
29918
|
number: getWeek(days[0]),
|
|
29712
29919
|
days
|
|
@@ -29732,7 +29939,7 @@ function CalendarMonth$2(props2) {
|
|
|
29732
29939
|
gridTemplateColumns: "repeat(7, minmax(44px, 46px))"
|
|
29733
29940
|
}, $[4] = t2) : t2 = $[4];
|
|
29734
29941
|
let t3;
|
|
29735
|
-
$[5] !== weekDayNames ? (t3 = weekDayNames.map(_temp$
|
|
29942
|
+
$[5] !== weekDayNames ? (t3 = weekDayNames.map(_temp$2A), $[5] = weekDayNames, $[6] = t3) : t3 = $[6];
|
|
29736
29943
|
const t4 = useWeeksOfMonth$1(props2.date);
|
|
29737
29944
|
let t5;
|
|
29738
29945
|
if ($[7] !== props2.focused || $[8] !== props2.isPastDisabled || $[9] !== props2.onSelect || $[10] !== props2.selected || $[11] !== t4) {
|
|
@@ -29751,7 +29958,7 @@ function CalendarMonth$2(props2) {
|
|
|
29751
29958
|
let t7;
|
|
29752
29959
|
return $[21] !== t1 || $[22] !== t6 ? (t7 = /* @__PURE__ */ jsx(Box, { "aria-hidden": t1, "data-ui": "CalendarMonth", children: t6 }), $[21] = t1, $[22] = t6, $[23] = t7) : t7 = $[23], t7;
|
|
29753
29960
|
}
|
|
29754
|
-
function _temp$
|
|
29961
|
+
function _temp$2A(weekday) {
|
|
29755
29962
|
return /* @__PURE__ */ jsx(Box, { paddingY: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, weight: "medium", style: {
|
|
29756
29963
|
textAlign: "center"
|
|
29757
29964
|
}, children: weekday }) }, weekday);
|
|
@@ -30063,11 +30270,11 @@ function CalendarMonthSelect$1(props2) {
|
|
|
30063
30270
|
monthNames
|
|
30064
30271
|
} = props2;
|
|
30065
30272
|
let t0;
|
|
30066
|
-
$[0] !== monthNames ? (t0 = monthNames.map(_temp$
|
|
30273
|
+
$[0] !== monthNames ? (t0 = monthNames.map(_temp$2z), $[0] = monthNames, $[1] = t0) : t0 = $[1];
|
|
30067
30274
|
let t1;
|
|
30068
30275
|
return $[2] !== onChange || $[3] !== t0 || $[4] !== value ? (t1 = /* @__PURE__ */ jsx(Flex, { flex: 1, gap: 1, children: /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Select$1, { fontSize: 1, radius: 2, value, onChange, padding: 2, children: t0 }) }) }), $[2] = onChange, $[3] = t0, $[4] = value, $[5] = t1) : t1 = $[5], t1;
|
|
30069
30276
|
}
|
|
30070
|
-
function _temp$
|
|
30277
|
+
function _temp$2z(monthName, i) {
|
|
30071
30278
|
return /* @__PURE__ */ jsx("option", { value: i, children: monthName }, i);
|
|
30072
30279
|
}
|
|
30073
30280
|
function CalendarYearSelect$1(props2) {
|
|
@@ -30720,7 +30927,7 @@ const GroupTab = forwardRef(function(props2, ref) {
|
|
|
30720
30927
|
} = useTranslation();
|
|
30721
30928
|
let t3;
|
|
30722
30929
|
$[2] !== t ? (t3 = t("inputs.object.field-group-tabs.aria-label"), $[2] = t, $[3] = t3) : t3 = $[3];
|
|
30723
|
-
const t4 = groups.find(_temp$
|
|
30930
|
+
const t4 = groups.find(_temp$2y)?.name;
|
|
30724
30931
|
let t5;
|
|
30725
30932
|
if ($[4] !== groups || $[5] !== inputId || $[6] !== path || $[7] !== t || $[8] !== validation2) {
|
|
30726
30933
|
let t62;
|
|
@@ -30754,7 +30961,7 @@ const GroupTab = forwardRef(function(props2, ref) {
|
|
|
30754
30961
|
/* @__PURE__ */ jsx(GroupSelect, { ...props2, disabled, onSelect: handleClick, validation: validation2 })
|
|
30755
30962
|
] }), $[6] = disabled, $[7] = handleClick, $[8] = props2, $[9] = validation2, $[10] = t3) : t3 = $[10], t3;
|
|
30756
30963
|
});
|
|
30757
|
-
function _temp$
|
|
30964
|
+
function _temp$2y(g) {
|
|
30758
30965
|
return g.selected;
|
|
30759
30966
|
}
|
|
30760
30967
|
const FieldGroupTabsWrapper = styled(Card).withConfig({
|
|
@@ -30930,7 +31137,7 @@ const RootStack$1 = styled(Stack).withConfig({
|
|
|
30930
31137
|
}
|
|
30931
31138
|
let t32;
|
|
30932
31139
|
if ($[5] !== schemaType.fields || $[6] !== value) {
|
|
30933
|
-
const knownFieldNames = schemaType.fields.map(_temp$
|
|
31140
|
+
const knownFieldNames = schemaType.fields.map(_temp$2x);
|
|
30934
31141
|
t32 = Object.keys(value || {}).filter((key) => !key.startsWith("_") && !knownFieldNames.includes(key)), $[5] = schemaType.fields, $[6] = value, $[7] = t32;
|
|
30935
31142
|
} else
|
|
30936
31143
|
t32 = $[7];
|
|
@@ -30944,7 +31151,7 @@ const RootStack$1 = styled(Stack).withConfig({
|
|
|
30944
31151
|
}
|
|
30945
31152
|
const renderedUnknownFields = t2;
|
|
30946
31153
|
let t3;
|
|
30947
|
-
$[13] !== groups ? (t3 = groups.find(_temp2$
|
|
31154
|
+
$[13] !== groups ? (t3 = groups.find(_temp2$14), $[13] = groups, $[14] = t3) : t3 = $[14];
|
|
30948
31155
|
const selectedGroup = t3;
|
|
30949
31156
|
let t4;
|
|
30950
31157
|
$[15] !== isFocusable || $[16] !== onPathFocus ? (t4 = (event) => {
|
|
@@ -30971,10 +31178,10 @@ const RootStack$1 = styled(Stack).withConfig({
|
|
|
30971
31178
|
renderedUnknownFields
|
|
30972
31179
|
] }), $[39] = handleFocus, $[40] = renderedUnknownFields, $[41] = t10, $[42] = t6, $[43] = t7, $[44] = t11) : t11 = $[44], t11;
|
|
30973
31180
|
});
|
|
30974
|
-
function _temp$
|
|
31181
|
+
function _temp$2x(field) {
|
|
30975
31182
|
return field.name;
|
|
30976
31183
|
}
|
|
30977
|
-
function _temp2$
|
|
31184
|
+
function _temp2$14(t0) {
|
|
30978
31185
|
const {
|
|
30979
31186
|
selected
|
|
30980
31187
|
} = t0;
|
|
@@ -31016,7 +31223,7 @@ function useAsync(fn) {
|
|
|
31016
31223
|
function useSlugContext() {
|
|
31017
31224
|
const $ = c(6), {
|
|
31018
31225
|
getClient: getClient2
|
|
31019
|
-
} = useSource(), schema2 = useSchema(), currentUser = useCurrentUser(), projectId = useProjectId(), dataset = useDataset();
|
|
31226
|
+
} = useSource(), schema2 = useSchema(), currentUser = useCurrentUser(), projectId = useProjectId$1(), dataset = useDataset();
|
|
31020
31227
|
let t0;
|
|
31021
31228
|
return $[0] !== currentUser || $[1] !== dataset || $[2] !== getClient2 || $[3] !== projectId || $[4] !== schema2 ? (t0 = {
|
|
31022
31229
|
projectId,
|
|
@@ -31050,7 +31257,7 @@ function SlugInput(props2) {
|
|
|
31050
31257
|
focusPath
|
|
31051
31258
|
} = props2, sourceField = schemaType.options?.source;
|
|
31052
31259
|
let t0;
|
|
31053
|
-
$[0] !== validation2 ? (t0 = validation2.filter(_temp$
|
|
31260
|
+
$[0] !== validation2 ? (t0 = validation2.filter(_temp$2w), $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
31054
31261
|
const errors = t0, inputRef = useRef(null), slugContext = useSlugContext(), {
|
|
31055
31262
|
t
|
|
31056
31263
|
} = useTranslation();
|
|
@@ -31116,7 +31323,7 @@ function SlugInput(props2) {
|
|
|
31116
31323
|
t13
|
|
31117
31324
|
] }) }), $[38] = t12, $[39] = t13, $[40] = t14) : t14 = $[40], t14;
|
|
31118
31325
|
}
|
|
31119
|
-
function _temp$
|
|
31326
|
+
function _temp$2w(item) {
|
|
31120
31327
|
return item.level === "error";
|
|
31121
31328
|
}
|
|
31122
31329
|
function StringInputBasic(props2) {
|
|
@@ -31342,7 +31549,7 @@ const ScrollContainerComponent = forwardRef(function(props2, forwardedRef) {
|
|
|
31342
31549
|
const As = t0 === void 0 ? "div" : t0, ref = useRef(null);
|
|
31343
31550
|
let t1;
|
|
31344
31551
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[4] = t1) : t1 = $[4], useImperativeHandle(forwardedRef, t1);
|
|
31345
|
-
const parentContext = useContext(ScrollContext), [childContext] = useState(_temp$
|
|
31552
|
+
const parentContext = useContext(ScrollContext), [childContext] = useState(_temp$2v);
|
|
31346
31553
|
let t2, t3;
|
|
31347
31554
|
$[5] !== childContext || $[6] !== onScroll ? (t2 = () => {
|
|
31348
31555
|
if (onScroll)
|
|
@@ -31372,7 +31579,7 @@ const ScrollContainerComponent = forwardRef(function(props2, forwardedRef) {
|
|
|
31372
31579
|
return $[19] !== childContext || $[20] !== t8 ? (t9 = /* @__PURE__ */ jsx(ScrollContext.Provider, { value: childContext, children: t8 }), $[19] = childContext, $[20] = t8, $[21] = t9) : t9 = $[21], t9;
|
|
31373
31580
|
}), ScrollContainer = memo(ScrollContainerComponent);
|
|
31374
31581
|
ScrollContainer.displayName = "Memo(Forwardref(ScrollContainer))";
|
|
31375
|
-
function _temp$
|
|
31582
|
+
function _temp$2v() {
|
|
31376
31583
|
return createPubSub();
|
|
31377
31584
|
}
|
|
31378
31585
|
const TEXT_LEVELS = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10], TEXT_BULLET_MARKERS = ["\u25CF", "\u25CB", "\u25A0"], TEXT_NUMBER_FORMATS = ["number", "lower-alpha", "lower-roman"], TEXT_DECORATOR_TAGS = {
|
|
@@ -32401,13 +32608,13 @@ const MENU_BUTTON_POPOVER_PROPS$1 = {
|
|
|
32401
32608
|
onMenuClose
|
|
32402
32609
|
} = props2;
|
|
32403
32610
|
let t0;
|
|
32404
|
-
$[0] !== menuOptions ? (t0 = menuOptions.map(_temp$
|
|
32611
|
+
$[0] !== menuOptions ? (t0 = menuOptions.map(_temp$2u), $[0] = menuOptions, $[1] = t0) : t0 = $[1];
|
|
32405
32612
|
let t1;
|
|
32406
32613
|
$[2] !== t0 ? (t1 = /* @__PURE__ */ jsx(Menu, { children: t0 }), $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
32407
32614
|
let t2;
|
|
32408
32615
|
return $[4] !== disableRestoreFocusOnClose || $[5] !== forwardedRef || $[6] !== menuButton || $[7] !== menuButtonProps || $[8] !== onMenuClose || $[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(MenuButton, { __unstable_disableRestoreFocusOnClose: disableRestoreFocusOnClose, id: "menu-button", ref: forwardedRef, onClose: onMenuClose, popover: MENU_BUTTON_POPOVER_PROPS$1, ...menuButtonProps, button: menuButton, menu: t1 }), $[4] = disableRestoreFocusOnClose, $[5] = forwardedRef, $[6] = menuButton, $[7] = menuButtonProps, $[8] = onMenuClose, $[9] = t1, $[10] = t2) : t2 = $[10], t2;
|
|
32409
32616
|
});
|
|
32410
|
-
function _temp$
|
|
32617
|
+
function _temp$2u(c2, index) {
|
|
32411
32618
|
const {
|
|
32412
32619
|
collapsedProps,
|
|
32413
32620
|
expandedProps,
|
|
@@ -32529,7 +32736,7 @@ const CollapseMenu = forwardRef(function(props2, ref) {
|
|
|
32529
32736
|
}, $[10] = rootEl, $[11] = t3) : t3 = $[11];
|
|
32530
32737
|
const intersectionOptions = t3;
|
|
32531
32738
|
let t4;
|
|
32532
|
-
$[12] !== menuOptions ? (t4 = menuOptions.map(_temp$
|
|
32739
|
+
$[12] !== menuOptions ? (t4 = menuOptions.map(_temp$2t), $[12] = menuOptions, $[13] = t4) : t4 = $[13];
|
|
32533
32740
|
const menuOptionKeys = t4;
|
|
32534
32741
|
let t5;
|
|
32535
32742
|
$[14] !== collapsedIntersections || $[15] !== expandedIntersections || $[16] !== menuOptionKeys ? (t5 = [...difference(menuOptionKeys, Object.keys(expandedIntersections)), ...difference(menuOptionKeys, Object.keys(collapsedIntersections))], $[14] = collapsedIntersections, $[15] = expandedIntersections, $[16] = menuOptionKeys, $[17] = t5) : t5 = $[17];
|
|
@@ -32667,7 +32874,7 @@ const CollapseMenu = forwardRef(function(props2, ref) {
|
|
|
32667
32874
|
let t1;
|
|
32668
32875
|
return $[7] !== gap || $[8] !== t0 ? (t1 = /* @__PURE__ */ jsx(RowFlex, { "data-hidden": !0, "aria-hidden": "true", gap, overflow: "hidden", children: t0 }), $[7] = gap, $[8] = t0, $[9] = t1) : t1 = $[9], t1;
|
|
32669
32876
|
});
|
|
32670
|
-
function _temp$
|
|
32877
|
+
function _temp$2t(child) {
|
|
32671
32878
|
return child.key;
|
|
32672
32879
|
}
|
|
32673
32880
|
const CollapseMenuButton = forwardRef(function(props2, ref) {
|
|
@@ -32858,9 +33065,9 @@ function useActiveActionKeys(t0) {
|
|
|
32858
33065
|
actions
|
|
32859
33066
|
} = t0, editor2 = usePortableTextEditor(), selection = usePortableTextEditorSelection();
|
|
32860
33067
|
let t1;
|
|
32861
|
-
return $[0] !== actions || $[1] !== editor2 || $[2] !== selection ? (t1 = selection ? actions.filter((a) => a.type === "annotation" ? PortableTextEditor.isAnnotationActive(editor2, a.key) : a.type === "listStyle" ? PortableTextEditor.hasListStyle(editor2, a.key) : PortableTextEditor.isMarkActive(editor2, a.key)).map(_temp$
|
|
33068
|
+
return $[0] !== actions || $[1] !== editor2 || $[2] !== selection ? (t1 = selection ? actions.filter((a) => a.type === "annotation" ? PortableTextEditor.isAnnotationActive(editor2, a.key) : a.type === "listStyle" ? PortableTextEditor.hasListStyle(editor2, a.key) : PortableTextEditor.isMarkActive(editor2, a.key)).map(_temp$2s) : [], $[0] = actions, $[1] = editor2, $[2] = selection, $[3] = t1) : t1 = $[3], useUnique(t1);
|
|
32862
33069
|
}
|
|
32863
|
-
function _temp$
|
|
33070
|
+
function _temp$2s(a_0) {
|
|
32864
33071
|
return a_0.key;
|
|
32865
33072
|
}
|
|
32866
33073
|
function useActiveStyleKeys(t0) {
|
|
@@ -32868,9 +33075,9 @@ function useActiveStyleKeys(t0) {
|
|
|
32868
33075
|
items
|
|
32869
33076
|
} = t0, editor2 = usePortableTextEditor(), focusBlock = useFocusBlock(), selection = usePortableTextEditorSelection();
|
|
32870
33077
|
let t1;
|
|
32871
|
-
return $[0] !== editor2 || $[1] !== focusBlock || $[2] !== items || $[3] !== selection ? (t1 = focusBlock && selection ? items.filter((i) => PortableTextEditor.hasBlockStyle(editor2, i.style)).map(_temp2$
|
|
33078
|
+
return $[0] !== editor2 || $[1] !== focusBlock || $[2] !== items || $[3] !== selection ? (t1 = focusBlock && selection ? items.filter((i) => PortableTextEditor.hasBlockStyle(editor2, i.style)).map(_temp2$13) : [], $[0] = editor2, $[1] = focusBlock, $[2] = items, $[3] = selection, $[4] = t1) : t1 = $[4], useUnique(t1);
|
|
32872
33079
|
}
|
|
32873
|
-
function _temp2$
|
|
33080
|
+
function _temp2$13(i_0) {
|
|
32874
33081
|
return i_0.style;
|
|
32875
33082
|
}
|
|
32876
33083
|
const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$3 = {
|
|
@@ -32884,9 +33091,9 @@ const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$3 = {
|
|
|
32884
33091
|
collapsed
|
|
32885
33092
|
} = props2, focusBlock = useFocusBlock(), legacyEditor = usePortableTextEditor(), editor2 = useEditor(), schemaTypes = usePortableTextMemberSchemaTypes(), {
|
|
32886
33093
|
t
|
|
32887
|
-
} = useTranslation(), isSelectingMultipleBlocks = useEditorSelector(editor2, _temp$
|
|
33094
|
+
} = useTranslation(), isSelectingMultipleBlocks = useEditorSelector(editor2, _temp$2r), isVoidBlock = focusBlock?._type !== schemaTypes.block.name, isEmptyTextBlock = !isVoidBlock && Array.isArray(focusBlock.children) && focusBlock.children.length === 1 && focusBlock?.children[0].text === "", disabled = disabledProp || isVoidBlock;
|
|
32888
33095
|
let t0;
|
|
32889
|
-
$[0] !== groups ? (t0 = groups.reduce(_temp3$
|
|
33096
|
+
$[0] !== groups ? (t0 = groups.reduce(_temp3$v, []), $[0] = groups, $[1] = t0) : t0 = $[1];
|
|
32890
33097
|
const actions = t0;
|
|
32891
33098
|
let t1;
|
|
32892
33099
|
$[2] !== actions ? (t1 = {
|
|
@@ -32931,18 +33138,18 @@ const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$3 = {
|
|
|
32931
33138
|
let t6;
|
|
32932
33139
|
return $[26] !== children || $[27] !== collapsed || $[28] !== handleMenuClose || $[29] !== menuButtonProps ? (t6 = /* @__PURE__ */ jsx(CollapseMenuMemo$1, { "data-testid": "action-menu-auto-collapse-menu", collapsed, disableRestoreFocusOnClose: !0, gap: 1, menuButtonProps, onMenuClose: handleMenuClose, children }), $[26] = children, $[27] = collapsed, $[28] = handleMenuClose, $[29] = menuButtonProps, $[30] = t6) : t6 = $[30], t6;
|
|
32933
33140
|
});
|
|
32934
|
-
function _temp$
|
|
33141
|
+
function _temp$2r(snapshot2) {
|
|
32935
33142
|
const startBlock = getSelectionStartBlock(snapshot2), endBlock = getSelectionEndBlock(snapshot2);
|
|
32936
33143
|
return !!startBlock && !!endBlock && !isEqual$2(startBlock.path, endBlock.path);
|
|
32937
33144
|
}
|
|
32938
|
-
function _temp2$
|
|
33145
|
+
function _temp2$12(action, actionIndex) {
|
|
32939
33146
|
return actionIndex === 0 ? {
|
|
32940
33147
|
...action,
|
|
32941
33148
|
firstInGroup: !0
|
|
32942
33149
|
} : action;
|
|
32943
33150
|
}
|
|
32944
|
-
function _temp3$
|
|
32945
|
-
return acc.concat(group2.actions.map(_temp2$
|
|
33151
|
+
function _temp3$v(acc, group2) {
|
|
33152
|
+
return acc.concat(group2.actions.map(_temp2$12));
|
|
32946
33153
|
}
|
|
32947
33154
|
const MenuButtonMemo = memo(MenuButton), StyledMenuItem = styled(MenuItem$1).withConfig({
|
|
32948
33155
|
displayName: "StyledMenuItem",
|
|
@@ -33123,12 +33330,12 @@ const MenuButtonMemo = memo(MenuButton), StyledMenuItem = styled(MenuItem$1).wit
|
|
|
33123
33330
|
onToggleFullscreen
|
|
33124
33331
|
} = t0, {
|
|
33125
33332
|
t
|
|
33126
|
-
} = useTranslation(), showActionMenu = actionGroups.reduce(_temp$
|
|
33333
|
+
} = useTranslation(), showActionMenu = actionGroups.reduce(_temp$2q, 0) > 0, showInsertMenu = insertMenuItems.length > 0, [rootElement, setRootElement] = useState(null), rootElementRect = useElementRect(rootElement), collapsed = collapsible && rootElementRect ? rootElementRect?.width < 400 : !1, showBlockStyleSelect = blockStyles.length > 1;
|
|
33127
33334
|
let t1;
|
|
33128
33335
|
$[0] !== rootElement ? (t1 = {
|
|
33129
33336
|
rootElement
|
|
33130
33337
|
}, $[0] = rootElement, $[1] = t1) : t1 = $[1], useRovingFocus(t1);
|
|
33131
|
-
const preventEditorBlurOnToolbarMouseDown = _temp2$
|
|
33338
|
+
const preventEditorBlurOnToolbarMouseDown = _temp2$11;
|
|
33132
33339
|
let t2;
|
|
33133
33340
|
$[2] !== blockStyles || $[3] !== collapsed || $[4] !== disabled || $[5] !== isFullscreen || $[6] !== rootElement || $[7] !== showBlockStyleSelect ? (t2 = showBlockStyleSelect && /* @__PURE__ */ jsx(StyleSelectFlex, { flex: collapsed ? 1 : void 0, children: /* @__PURE__ */ jsx(StyleSelectBox, { padding: isFullscreen ? 2 : 1, "data-testid": "block-style-select", children: /* @__PURE__ */ jsx(BlockStyleSelect, { disabled, items: blockStyles, boundaryElement: rootElement }) }) }), $[2] = blockStyles, $[3] = collapsed, $[4] = disabled, $[5] = isFullscreen, $[6] = rootElement, $[7] = showBlockStyleSelect, $[8] = t2) : t2 = $[8];
|
|
33134
33341
|
let t3;
|
|
@@ -33232,10 +33439,10 @@ function Toolbar(props2) {
|
|
|
33232
33439
|
let t6;
|
|
33233
33440
|
return $[22] !== actionGroups || $[23] !== blockStyles || $[24] !== collapsible || $[25] !== disabled || $[26] !== insertMenuItems || $[27] !== isFullscreen || $[28] !== onToggleFullscreen ? (t6 = /* @__PURE__ */ jsx(InnerToolbar, { actionGroups, blockStyles, collapsible, disabled, insertMenuItems, isFullscreen, onToggleFullscreen }), $[22] = actionGroups, $[23] = blockStyles, $[24] = collapsible, $[25] = disabled, $[26] = insertMenuItems, $[27] = isFullscreen, $[28] = onToggleFullscreen, $[29] = t6) : t6 = $[29], t6;
|
|
33234
33441
|
}
|
|
33235
|
-
function _temp$
|
|
33442
|
+
function _temp$2q(acc, x) {
|
|
33236
33443
|
return acc + x.actions.length;
|
|
33237
33444
|
}
|
|
33238
|
-
function _temp2$
|
|
33445
|
+
function _temp2$11(e) {
|
|
33239
33446
|
e.preventDefault();
|
|
33240
33447
|
}
|
|
33241
33448
|
const noOutlineStyle = {
|
|
@@ -33287,7 +33494,7 @@ function Editor(props2) {
|
|
|
33287
33494
|
}, $[0] = isFullscreen, $[1] = isTopLayer, $[2] = onToggleFullscreen, $[3] = t0) : t0 = $[3], useGlobalKeyDown(t0);
|
|
33288
33495
|
let t1;
|
|
33289
33496
|
$[4] !== t ? (t1 = () => /* @__PURE__ */ jsx(PlaceholderWrapper$1, { "data-testid": "pt-input-placeholder", children: t("inputs.portable-text.empty-placeholder") }), $[4] = t, $[5] = t1) : t1 = $[5];
|
|
33290
|
-
const renderPlaceholder = t1, spellCheck = useSpellCheck(), renderDecorator = _temp$
|
|
33497
|
+
const renderPlaceholder = t1, spellCheck = useSpellCheck(), renderDecorator = _temp$2p, scrollSelectionIntoView = useScrollSelectionIntoView(scrollElement);
|
|
33291
33498
|
let t2;
|
|
33292
33499
|
$[6] !== ariaDescribedBy || $[7] !== elementRef || $[8] !== hotkeys || $[9] !== initialSelection || $[10] !== onCopy || $[11] !== onPaste || $[12] !== rangeDecorations || $[13] !== renderAnnotation || $[14] !== renderPlaceholder || $[15] !== scrollSelectionIntoView || $[16] !== spellCheck ? (t2 = {
|
|
33293
33500
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -33335,7 +33542,7 @@ function Editor(props2) {
|
|
|
33335
33542
|
t13
|
|
33336
33543
|
] }), $[51] = isFullscreen, $[52] = isOneLine, $[53] = t13, $[54] = t5, $[55] = t14) : t14 = $[55], t14;
|
|
33337
33544
|
}
|
|
33338
|
-
function _temp$
|
|
33545
|
+
function _temp$2p(decoratorProps) {
|
|
33339
33546
|
return /* @__PURE__ */ jsx(Decorator, { ...decoratorProps });
|
|
33340
33547
|
}
|
|
33341
33548
|
function useHotkeys(hotkeys) {
|
|
@@ -33393,10 +33600,10 @@ function useTrackFocusPath(props2) {
|
|
|
33393
33600
|
$[3] !== boundaryElement || $[4] !== editor2 || $[5] !== elementRefs || $[6] !== focusPath || $[7] !== portableTextMemberItems ? (t2 = () => {
|
|
33394
33601
|
if (focusPath.length === 0)
|
|
33395
33602
|
return;
|
|
33396
|
-
const editorHasDomFocus = !!boundaryElement?.ownerDocument.activeElement && boundaryElement.contains(boundaryElement.ownerDocument.activeElement), currentSelection = selectionRef.current, openItem = portableTextMemberItems.find(_temp$
|
|
33603
|
+
const editorHasDomFocus = !!boundaryElement?.ownerDocument.activeElement && boundaryElement.contains(boundaryElement.ownerDocument.activeElement), currentSelection = selectionRef.current, openItem = portableTextMemberItems.find(_temp$2o), openEditingItem = portableTextMemberItems.find(_temp2$10);
|
|
33397
33604
|
if (currentSelection?.focus.path && isEqual$2(currentSelection.focus.path, focusPath.slice(0, currentSelection.focus.path.length)) && (editorHasDomFocus || openEditingItem))
|
|
33398
33605
|
return;
|
|
33399
|
-
const relatedEditorItem = portableTextMemberItems.find(_temp3$
|
|
33606
|
+
const relatedEditorItem = portableTextMemberItems.find(_temp3$u) || openItem, elementRef = relatedEditorItem ? elementRefs[relatedEditorItem.member.key] : void 0;
|
|
33400
33607
|
if (relatedEditorItem && elementRef) {
|
|
33401
33608
|
boundaryElement && (scrollIntoView$1(boundaryElement, {
|
|
33402
33609
|
scrollMode: "if-needed",
|
|
@@ -33435,13 +33642,13 @@ function useTrackFocusPath(props2) {
|
|
|
33435
33642
|
let t3;
|
|
33436
33643
|
$[9] !== boundaryElement || $[10] !== editor2 || $[11] !== elementRefs || $[12] !== focusPath || $[13] !== onItemClose || $[14] !== portableTextMemberItems ? (t3 = [boundaryElement, editor2, elementRefs, focusPath, onItemClose, portableTextMemberItems], $[9] = boundaryElement, $[10] = editor2, $[11] = elementRefs, $[12] = focusPath, $[13] = onItemClose, $[14] = portableTextMemberItems, $[15] = t3) : t3 = $[15], useLayoutEffect(t2, t3);
|
|
33437
33644
|
}
|
|
33438
|
-
function _temp3$
|
|
33645
|
+
function _temp3$u(m_1) {
|
|
33439
33646
|
return m_1.member.item.focused;
|
|
33440
33647
|
}
|
|
33441
|
-
function _temp2$
|
|
33648
|
+
function _temp2$10(m_0) {
|
|
33442
33649
|
return m_0.member.open && (m_0.kind === "annotation" || m_0.kind === "objectBlock" || m_0.kind === "inlineObject");
|
|
33443
33650
|
}
|
|
33444
|
-
function _temp$
|
|
33651
|
+
function _temp$2o(m) {
|
|
33445
33652
|
return m.member.open;
|
|
33446
33653
|
}
|
|
33447
33654
|
const POPOVER_FALLBACK_PLACEMENTS$4 = ["top", "bottom"];
|
|
@@ -34048,10 +34255,10 @@ const InlineObject = (props2) => {
|
|
|
34048
34255
|
t
|
|
34049
34256
|
} = useTranslation(), hasMarkers = markers.length > 0, popoverTitle = schemaType?.title || schemaType.name;
|
|
34050
34257
|
let t0;
|
|
34051
|
-
$[0] !== validation2 ? (t0 = validation2.filter(_temp$
|
|
34258
|
+
$[0] !== validation2 ? (t0 = validation2.filter(_temp$2n), $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
34052
34259
|
const hasError = t0.length > 0;
|
|
34053
34260
|
let t1;
|
|
34054
|
-
$[2] !== validation2 ? (t1 = validation2.filter(_temp2
|
|
34261
|
+
$[2] !== validation2 ? (t1 = validation2.filter(_temp2$$), $[2] = validation2, $[3] = t1) : t1 = $[3];
|
|
34055
34262
|
const hasWarning = t1.length > 0;
|
|
34056
34263
|
let t2;
|
|
34057
34264
|
bb0: {
|
|
@@ -34096,16 +34303,16 @@ const InlineObject = (props2) => {
|
|
|
34096
34303
|
t15
|
|
34097
34304
|
] }), $[41] = t13, $[42] = t14, $[43] = t15, $[44] = t16) : t16 = $[44], t16;
|
|
34098
34305
|
};
|
|
34099
|
-
function _temp$
|
|
34306
|
+
function _temp$2n(v) {
|
|
34100
34307
|
return v.level === "error";
|
|
34101
34308
|
}
|
|
34102
|
-
function _temp2
|
|
34309
|
+
function _temp2$$(v_0) {
|
|
34103
34310
|
return v_0.level === "warning";
|
|
34104
34311
|
}
|
|
34105
34312
|
function AnnotationObjectEditModal(props2) {
|
|
34106
34313
|
const $ = c(14), editor2 = usePortableTextEditor(), boundaryElement = useBoundaryElement().element, portableTextMemberItems = usePortableTextMemberItems(), elementRefs = usePortableTextMemberItemElementRefs();
|
|
34107
34314
|
let t0;
|
|
34108
|
-
$[0] !== portableTextMemberItems ? (t0 = portableTextMemberItems.find(_temp$
|
|
34315
|
+
$[0] !== portableTextMemberItems ? (t0 = portableTextMemberItems.find(_temp$2m), $[0] = portableTextMemberItems, $[1] = t0) : t0 = $[1];
|
|
34109
34316
|
const openAnnotation = t0;
|
|
34110
34317
|
let t1;
|
|
34111
34318
|
$[2] !== editor2 || $[3] !== openAnnotation || $[4] !== props2 ? (t1 = () => {
|
|
@@ -34121,7 +34328,7 @@ function AnnotationObjectEditModal(props2) {
|
|
|
34121
34328
|
let t3;
|
|
34122
34329
|
return $[6] !== boundaryElement || $[7] !== elementRef || $[8] !== onClose || $[9] !== openAnnotation.input || $[10] !== openAnnotation.node.schemaType || $[11] !== props2.referenceBoundary || $[12] !== t2 ? (t3 = /* @__PURE__ */ jsx(ObjectEditModal, { defaultType: "popover", floatingBoundary: boundaryElement, onClose, autoFocus: t2, referenceBoundary: props2.referenceBoundary, referenceElement: elementRef, schemaType: openAnnotation.node.schemaType, children: openAnnotation.input }), $[6] = boundaryElement, $[7] = elementRef, $[8] = onClose, $[9] = openAnnotation.input, $[10] = openAnnotation.node.schemaType, $[11] = props2.referenceBoundary, $[12] = t2, $[13] = t3) : t3 = $[13], t3;
|
|
34123
34330
|
}
|
|
34124
|
-
function _temp$
|
|
34331
|
+
function _temp$2m(m) {
|
|
34125
34332
|
return m.kind === "annotation" && m.member.open;
|
|
34126
34333
|
}
|
|
34127
34334
|
const DefaultComponent = (dProps) => {
|
|
@@ -34731,7 +34938,7 @@ function useOptimisticPortableTextDiff(t0) {
|
|
|
34731
34938
|
t22 = Object.values(optimisticRangeDecorations).concat(Object.entries(definitiveRangeDecorations).filter((t32) => {
|
|
34732
34939
|
const [blockKey] = t32;
|
|
34733
34940
|
return typeof optimisticRangeDecorations[blockKey] > "u";
|
|
34734
|
-
}).map(_temp$
|
|
34941
|
+
}).map(_temp$2l)).flat(), $[2] = definitiveValue, $[3] = optimisticValue, $[4] = perspective, $[5] = upstreamValue, $[6] = t22;
|
|
34735
34942
|
} else
|
|
34736
34943
|
t22 = $[6];
|
|
34737
34944
|
t1 = t22;
|
|
@@ -34769,7 +34976,7 @@ function useOptimisticPortableTextDiff(t0) {
|
|
|
34769
34976
|
onOptimisticChange
|
|
34770
34977
|
}, $[14] = onOptimisticChange, $[15] = rangeDecorations, $[16] = t5) : t5 = $[16], t5;
|
|
34771
34978
|
}
|
|
34772
|
-
function _temp$
|
|
34979
|
+
function _temp$2l(t0) {
|
|
34773
34980
|
const [, blockRangeDecorations] = t0;
|
|
34774
34981
|
return blockRangeDecorations;
|
|
34775
34982
|
}
|
|
@@ -34912,7 +35119,7 @@ const markdownConfig = {
|
|
|
34912
35119
|
data: blocks
|
|
34913
35120
|
};
|
|
34914
35121
|
},
|
|
34915
|
-
actions: [_temp$
|
|
35122
|
+
actions: [_temp$2k]
|
|
34916
35123
|
}), $[0] = schemaTypes.block.options?.unstable_whitespaceOnPasteMode, $[1] = t0) : t0 = $[1];
|
|
34917
35124
|
let t1;
|
|
34918
35125
|
$[2] !== t0 ? (t1 = [t0], $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
@@ -34926,7 +35133,7 @@ const markdownConfig = {
|
|
|
34926
35133
|
pasteLink: {},
|
|
34927
35134
|
typography: {
|
|
34928
35135
|
guard: createDecoratorGuard({
|
|
34929
|
-
decorators: _temp3$
|
|
35136
|
+
decorators: _temp3$t
|
|
34930
35137
|
})
|
|
34931
35138
|
}
|
|
34932
35139
|
},
|
|
@@ -35037,7 +35244,7 @@ const RenderDefault = (props2) => {
|
|
|
35037
35244
|
let t1;
|
|
35038
35245
|
return $[1] !== RenderPlugins || $[2] !== props2 ? (t1 = /* @__PURE__ */ jsx(RenderPlugins, { ...props2 }), $[1] = RenderPlugins, $[2] = props2, $[3] = t1) : t1 = $[3], t1;
|
|
35039
35246
|
};
|
|
35040
|
-
function _temp$
|
|
35247
|
+
function _temp$2k(t0, deserializeEvent) {
|
|
35041
35248
|
const {
|
|
35042
35249
|
event: event_0
|
|
35043
35250
|
} = t0;
|
|
@@ -35046,14 +35253,14 @@ function _temp$2l(t0, deserializeEvent) {
|
|
|
35046
35253
|
originEvent: event_0.originEvent
|
|
35047
35254
|
})];
|
|
35048
35255
|
}
|
|
35049
|
-
function _temp2
|
|
35256
|
+
function _temp2$_(decorator) {
|
|
35050
35257
|
return decorator.name === "code" ? [] : [decorator.name];
|
|
35051
35258
|
}
|
|
35052
|
-
function _temp3$
|
|
35259
|
+
function _temp3$t(t0) {
|
|
35053
35260
|
const {
|
|
35054
35261
|
context
|
|
35055
35262
|
} = t0;
|
|
35056
|
-
return context.schema.decorators.flatMap(_temp2
|
|
35263
|
+
return context.schema.decorators.flatMap(_temp2$_);
|
|
35057
35264
|
}
|
|
35058
35265
|
const DOT_SIZE = 6, CONTENT_BOX_VARIANTS = {
|
|
35059
35266
|
animate: {
|
|
@@ -35195,7 +35402,7 @@ function usePresenceCursorDecorations(props2) {
|
|
|
35195
35402
|
const handleRangeDecorationMoved = t2;
|
|
35196
35403
|
let t3, t4;
|
|
35197
35404
|
$[3] !== fieldPresence || $[4] !== path ? (t3 = () => {
|
|
35198
|
-
const nextPresence = fieldPresence.filter((p_0) => startsWith(path, p_0.path) && !isEqual$1(path, p_0.path)), filteredNext = nextPresence.map(_temp$
|
|
35405
|
+
const nextPresence = fieldPresence.filter((p_0) => startsWith(path, p_0.path) && !isEqual$1(path, p_0.path)), filteredNext = nextPresence.map(_temp$2j), filteredPrevious = previousPresence.current.map(_temp2$Z);
|
|
35199
35406
|
if (!isEqual$1(filteredNext, filteredPrevious)) {
|
|
35200
35407
|
const value = nextPresence.length > 0 ? nextPresence : EMPTY_ARRAY$u;
|
|
35201
35408
|
setCurrentPresence(value), previousPresence.current = value;
|
|
@@ -35227,13 +35434,13 @@ function usePresenceCursorDecorations(props2) {
|
|
|
35227
35434
|
setPresenceCursorDecorations(decorations.filter(Boolean));
|
|
35228
35435
|
}, t6 = [currentPresence, handleRangeDecorationMoved], $[7] = currentPresence, $[8] = t5, $[9] = t6) : (t5 = $[8], t6 = $[9]), useEffect(t5, t6), presenceCursorDecorations;
|
|
35229
35436
|
}
|
|
35230
|
-
function _temp2$
|
|
35437
|
+
function _temp2$Z(d_0) {
|
|
35231
35438
|
return {
|
|
35232
35439
|
...d_0.selection,
|
|
35233
35440
|
sessionId: d_0.sessionId
|
|
35234
35441
|
};
|
|
35235
35442
|
}
|
|
35236
|
-
function _temp$
|
|
35443
|
+
function _temp$2j(d) {
|
|
35237
35444
|
return {
|
|
35238
35445
|
...d.selection,
|
|
35239
35446
|
sessionId: d.sessionId
|
|
@@ -35967,12 +36174,12 @@ function useFeatureEnabled(featureKey) {
|
|
|
35967
36174
|
features: features2,
|
|
35968
36175
|
error: null
|
|
35969
36176
|
};
|
|
35970
|
-
}, $[6] = featureKey, $[7] = t2) : t2 = $[7], t1 = req.pipe(map(t2), startWith(INITIAL_LOADING_STATE$3), catchError(_temp$
|
|
36177
|
+
}, $[6] = featureKey, $[7] = t2) : t2 = $[7], t1 = req.pipe(map(t2), startWith(INITIAL_LOADING_STATE$3), catchError(_temp$2i)), $[3] = featureKey, $[4] = req, $[5] = t1;
|
|
35971
36178
|
} else
|
|
35972
36179
|
t1 = $[5];
|
|
35973
36180
|
return useObservable(t1, INITIAL_LOADING_STATE$3);
|
|
35974
36181
|
}
|
|
35975
|
-
function _temp$
|
|
36182
|
+
function _temp$2i(error) {
|
|
35976
36183
|
return of({
|
|
35977
36184
|
isLoading: !1,
|
|
35978
36185
|
enabled: !1,
|
|
@@ -35989,7 +36196,7 @@ function DisabledFeatureWarning(t0) {
|
|
|
35989
36196
|
} = useTranslation();
|
|
35990
36197
|
let t1;
|
|
35991
36198
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = {
|
|
35992
|
-
DocumentationLink: _temp$
|
|
36199
|
+
DocumentationLink: _temp$2h
|
|
35993
36200
|
}, $[0] = t1) : t1 = $[0];
|
|
35994
36201
|
let t2;
|
|
35995
36202
|
$[1] !== t ? (t2 = /* @__PURE__ */ jsx(Translate, { t, i18nKey: "inputs.reference.cross-dataset.feature-disabled-description", components: t1 }), $[1] = t, $[2] = t2) : t2 = $[2];
|
|
@@ -36026,7 +36233,7 @@ function DisabledFeatureWarning(t0) {
|
|
|
36026
36233
|
t11
|
|
36027
36234
|
] }), $[26] = t10, $[27] = t11, $[28] = t12) : t12 = $[28], t12;
|
|
36028
36235
|
}
|
|
36029
|
-
function _temp$
|
|
36236
|
+
function _temp$2h(t0) {
|
|
36030
36237
|
const {
|
|
36031
36238
|
children
|
|
36032
36239
|
} = t0;
|
|
@@ -36120,7 +36327,7 @@ function useReferenceInfo$1(doc, getReferenceInfo2) {
|
|
|
36120
36327
|
const $ = c(8), [retryAttempt, setRetryAttempt] = useState(0);
|
|
36121
36328
|
let t0;
|
|
36122
36329
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
36123
|
-
setRetryAttempt(_temp$
|
|
36330
|
+
setRetryAttempt(_temp$2g);
|
|
36124
36331
|
}, $[0] = t0) : t0 = $[0];
|
|
36125
36332
|
const retry2 = t0;
|
|
36126
36333
|
let t1;
|
|
@@ -36144,10 +36351,10 @@ function useReferenceInfo$1(doc, getReferenceInfo2) {
|
|
|
36144
36351
|
retryAttempt
|
|
36145
36352
|
})))) : of(EMPTY_STATE$1), $[4] = docInfo, $[5] = getReferenceInfo2, $[6] = retryAttempt, $[7] = t2) : t2 = $[7], useObservable(t2, INITIAL_LOADING_STATE$2);
|
|
36146
36353
|
}
|
|
36147
|
-
function _temp$
|
|
36354
|
+
function _temp$2g(current) {
|
|
36148
36355
|
return current + 1;
|
|
36149
36356
|
}
|
|
36150
|
-
function useProjectId
|
|
36357
|
+
function useProjectId() {
|
|
36151
36358
|
const $ = c(2), client = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS);
|
|
36152
36359
|
let t0;
|
|
36153
36360
|
return $[0] !== client ? (t0 = client.config(), $[0] = client, $[1] = t0) : t0 = $[1], t0.projectId;
|
|
@@ -36159,7 +36366,7 @@ function OptionPreview$1(props2) {
|
|
|
36159
36366
|
error
|
|
36160
36367
|
} = useReferenceInfo$1(props2.document, props2.getReferenceInfo), {
|
|
36161
36368
|
t
|
|
36162
|
-
} = useTranslation(), projectId = useProjectId
|
|
36369
|
+
} = useTranslation(), projectId = useProjectId();
|
|
36163
36370
|
if (isLoading) {
|
|
36164
36371
|
let t02;
|
|
36165
36372
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t02 = /* @__PURE__ */ jsx(TextSkeleton, { style: {
|
|
@@ -36216,7 +36423,7 @@ function PreviewReferenceValue$1(props2) {
|
|
|
36216
36423
|
referenceInfo
|
|
36217
36424
|
} = props2, {
|
|
36218
36425
|
t
|
|
36219
|
-
} = useTranslation(), projectId = useProjectId
|
|
36426
|
+
} = useTranslation(), projectId = useProjectId();
|
|
36220
36427
|
if (referenceInfo.isLoading || referenceInfo.error) {
|
|
36221
36428
|
let t02;
|
|
36222
36429
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t02 = {
|
|
@@ -36324,7 +36531,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36324
36531
|
} = t0, $[0] = t0, $[1] = elementProps, $[2] = forwardRef2) : (elementProps = $[1], forwardRef2 = $[2]);
|
|
36325
36532
|
const {
|
|
36326
36533
|
t
|
|
36327
|
-
} = useTranslation(), projectId = useProjectId
|
|
36534
|
+
} = useTranslation(), projectId = useProjectId(), [searchState, setSearchState] = useState(INITIAL_SEARCH_STATE$2);
|
|
36328
36535
|
let t1;
|
|
36329
36536
|
$[3] !== onChange || $[4] !== onPathFocus || $[5] !== projectId || $[6] !== schemaType.dataset || $[7] !== schemaType.name || $[8] !== schemaType.weak || $[9] !== searchState.hits || $[10] !== value?._key ? (t1 = (id2) => {
|
|
36330
36537
|
if (!id2) {
|
|
@@ -36383,7 +36590,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36383
36590
|
push
|
|
36384
36591
|
} = useToast();
|
|
36385
36592
|
let t12;
|
|
36386
|
-
$[29] !== validation2 ? (t12 = validation2.filter(_temp$
|
|
36593
|
+
$[29] !== validation2 ? (t12 = validation2.filter(_temp$2f), $[29] = validation2, $[30] = t12) : t12 = $[30];
|
|
36387
36594
|
const errors = t12;
|
|
36388
36595
|
let t13;
|
|
36389
36596
|
$[31] !== onPathFocus || $[32] !== path ? (t13 = (event_0) => {
|
|
@@ -36414,7 +36621,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36414
36621
|
id: `reference-search-fail-${inputId}`
|
|
36415
36622
|
}), console.error(error), of({
|
|
36416
36623
|
hits: []
|
|
36417
|
-
})))))), scan(_temp2$
|
|
36624
|
+
})))))), scan(_temp2$Y, INITIAL_SEARCH_STATE$2), tap(setSearchState)), $[38] = inputId, $[39] = onSearch, $[40] = push, $[41] = t16) : t16 = $[41];
|
|
36418
36625
|
const handleQueryChange = useObservableEvent(t16);
|
|
36419
36626
|
let t17;
|
|
36420
36627
|
$[42] !== handleQueryChange ? (t17 = () => {
|
|
@@ -36437,7 +36644,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36437
36644
|
let t22;
|
|
36438
36645
|
$[55] !== featureInfo.enabled || $[56] !== featureInfo.isLoading || $[57] !== handleClear || $[58] !== value ? (t22 = !featureInfo.isLoading && !featureInfo.enabled && /* @__PURE__ */ jsx(DisabledFeatureWarning, { value, onClearValue: handleClear }), $[55] = featureInfo.enabled, $[56] = featureInfo.isLoading, $[57] = handleClear, $[58] = value, $[59] = t22) : t22 = $[59];
|
|
36439
36646
|
let t23;
|
|
36440
|
-
$[60] !== actualStrength || $[61] !== autocompletePopoverReferenceElement || $[62] !== changed || $[63] !== elementProps || $[64] !== errors || $[65] !== featureInfo.enabled || $[66] !== featureInfo.isLoading || $[67] !== focused || $[68] !== handleAutocompleteFocus || $[69] !== handleAutocompleteKeyDown || $[70] !== handleAutocompleteOpenButtonClick || $[71] !== handleChange || $[72] !== handleClear || $[73] !== handleFixStrengthMismatch || $[74] !== handleFocus || $[75] !== handleQueryChange || $[76] !== handleReplace || $[77] !== inputId || $[78] !== isEditing || $[79] !== loadableReferenceInfo || $[80] !== path || $[81] !== readOnly || $[82] !== renderOption || $[83] !== schemaType || $[84] !== searchState.hits || $[85] !== searchState.isLoading || $[86] !== searchState.searchString || $[87] !== showWeakRefMismatch || $[88] !== studioUrl || $[89] !== t || $[90] !== value ? (t23 = (featureInfo.isLoading || featureInfo.enabled) && /* @__PURE__ */ jsx(Stack, { space: 1, children: isEditing ? /* @__PURE__ */ jsx(Stack, { space: 2, ref: clickOutsideBoundaryRef, children: /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !!focused, children: /* @__PURE__ */ jsx("div", { ref: setAutocompletePopoverReferenceElement, children: /* @__PURE__ */ jsx(ReferenceAutocomplete$2, { ...elementProps, "data-testid": "autocomplete", loading: searchState.isLoading, referenceElement: autocompletePopoverReferenceElement, portalRef: autocompletePortalRef, id: inputId || "", options: searchState.hits.map(_temp3$
|
|
36647
|
+
$[60] !== actualStrength || $[61] !== autocompletePopoverReferenceElement || $[62] !== changed || $[63] !== elementProps || $[64] !== errors || $[65] !== featureInfo.enabled || $[66] !== featureInfo.isLoading || $[67] !== focused || $[68] !== handleAutocompleteFocus || $[69] !== handleAutocompleteKeyDown || $[70] !== handleAutocompleteOpenButtonClick || $[71] !== handleChange || $[72] !== handleClear || $[73] !== handleFixStrengthMismatch || $[74] !== handleFocus || $[75] !== handleQueryChange || $[76] !== handleReplace || $[77] !== inputId || $[78] !== isEditing || $[79] !== loadableReferenceInfo || $[80] !== path || $[81] !== readOnly || $[82] !== renderOption || $[83] !== schemaType || $[84] !== searchState.hits || $[85] !== searchState.isLoading || $[86] !== searchState.searchString || $[87] !== showWeakRefMismatch || $[88] !== studioUrl || $[89] !== t || $[90] !== value ? (t23 = (featureInfo.isLoading || featureInfo.enabled) && /* @__PURE__ */ jsx(Stack, { space: 1, children: isEditing ? /* @__PURE__ */ jsx(Stack, { space: 2, ref: clickOutsideBoundaryRef, children: /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !!focused, children: /* @__PURE__ */ jsx("div", { ref: setAutocompletePopoverReferenceElement, children: /* @__PURE__ */ jsx(ReferenceAutocomplete$2, { ...elementProps, "data-testid": "autocomplete", loading: searchState.isLoading, referenceElement: autocompletePopoverReferenceElement, portalRef: autocompletePortalRef, id: inputId || "", options: searchState.hits.map(_temp3$s), onFocus: handleAutocompleteFocus, radius: 2, placeholder: t("inputs.reference.search-placeholder"), onKeyDown: handleAutocompleteKeyDown, readOnly, disabled: loadableReferenceInfo.isLoading, onQueryChange: handleQueryChange, searchString: searchState.searchString, onChange: handleChange, filterOption: NO_FILTER$2, renderOption, openButton: {
|
|
36441
36648
|
onClick: handleAutocompleteOpenButtonClick
|
|
36442
36649
|
}, ref: focusElementRef }) }) }) }) : /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !!focused, children: /* @__PURE__ */ jsxs(Card, { padding: 0, border: !0, flex: 1, radius: 2, tone: readOnly ? "transparent" : loadableReferenceInfo.error || errors.length > 0 ? "critical" : "default", children: [
|
|
36443
36650
|
/* @__PURE__ */ jsxs(Flex, { align: "center", padding: 1, children: [
|
|
@@ -36460,28 +36667,28 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36460
36667
|
t23
|
|
36461
36668
|
] }), $[92] = props2.elementProps.style, $[93] = t22, $[94] = t23, $[95] = t24) : t24 = $[95], t24;
|
|
36462
36669
|
}
|
|
36463
|
-
function _temp3$
|
|
36670
|
+
function _temp3$s(hit_0) {
|
|
36464
36671
|
return {
|
|
36465
36672
|
value: hit_0.id,
|
|
36466
36673
|
hit: hit_0
|
|
36467
36674
|
};
|
|
36468
36675
|
}
|
|
36469
|
-
function _temp2$
|
|
36676
|
+
function _temp2$Y(prevState, nextState) {
|
|
36470
36677
|
return {
|
|
36471
36678
|
...prevState,
|
|
36472
36679
|
...nextState
|
|
36473
36680
|
};
|
|
36474
36681
|
}
|
|
36475
|
-
function _temp$
|
|
36682
|
+
function _temp$2f(item) {
|
|
36476
36683
|
return item.level === "error";
|
|
36477
36684
|
}
|
|
36478
|
-
const REQUEST_TAG_BASE$1 = "cross-dataset-refs", AVAILABILITY_READABLE$
|
|
36685
|
+
const REQUEST_TAG_BASE$1 = "cross-dataset-refs", AVAILABILITY_READABLE$1 = {
|
|
36479
36686
|
available: !0,
|
|
36480
36687
|
reason: "READABLE"
|
|
36481
|
-
}, AVAILABILITY_PERMISSION_DENIED$
|
|
36688
|
+
}, AVAILABILITY_PERMISSION_DENIED$1 = {
|
|
36482
36689
|
available: !1,
|
|
36483
36690
|
reason: "PERMISSION_DENIED"
|
|
36484
|
-
}, AVAILABILITY_NOT_FOUND$
|
|
36691
|
+
}, AVAILABILITY_NOT_FOUND$1 = {
|
|
36485
36692
|
available: !1,
|
|
36486
36693
|
reason: "NOT_FOUND"
|
|
36487
36694
|
};
|
|
@@ -36514,7 +36721,7 @@ function createGetReferenceInfo$1(context) {
|
|
|
36514
36721
|
return combineLatest([publishedPreview$]).pipe(map(([publishedPreview]) => ({
|
|
36515
36722
|
type: resolvedDoc._type,
|
|
36516
36723
|
id: doc._id,
|
|
36517
|
-
availability: AVAILABILITY_READABLE$
|
|
36724
|
+
availability: AVAILABILITY_READABLE$1,
|
|
36518
36725
|
preview: {
|
|
36519
36726
|
published: isRecord$4(publishedPreview) ? publishedPreview : void 0
|
|
36520
36727
|
}
|
|
@@ -36533,7 +36740,7 @@ function fetchDocumentAvailability$1(client, id2) {
|
|
|
36533
36740
|
};
|
|
36534
36741
|
return client.observable.request(requestOptions).pipe(map((response) => {
|
|
36535
36742
|
const omittedEntry = keyBy(response.omitted || [], (entry) => entry.id)[id2];
|
|
36536
|
-
return omittedEntry ? omittedEntry.reason === "existence" ? AVAILABILITY_NOT_FOUND$
|
|
36743
|
+
return omittedEntry ? omittedEntry.reason === "existence" ? AVAILABILITY_NOT_FOUND$1 : omittedEntry.reason === "permission" ? AVAILABILITY_PERMISSION_DENIED$1 : null : AVAILABILITY_READABLE$1;
|
|
36537
36744
|
}));
|
|
36538
36745
|
}
|
|
36539
36746
|
function search$1(client, textTerm, type, options) {
|
|
@@ -36719,7 +36926,7 @@ function useReferenceInfo(doc, getReferenceInfo2) {
|
|
|
36719
36926
|
const $ = c(10), [retryAttempt, setRetryAttempt] = useState(0);
|
|
36720
36927
|
let t0;
|
|
36721
36928
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
36722
|
-
setRetryAttempt(_temp$
|
|
36929
|
+
setRetryAttempt(_temp$2e);
|
|
36723
36930
|
}, $[0] = t0) : t0 = $[0];
|
|
36724
36931
|
const retry2 = t0;
|
|
36725
36932
|
let t1;
|
|
@@ -36753,7 +36960,7 @@ function useReferenceInfo(doc, getReferenceInfo2) {
|
|
|
36753
36960
|
}
|
|
36754
36961
|
return useObservable(t1, INITIAL_LOADING_STATE$1);
|
|
36755
36962
|
}
|
|
36756
|
-
function _temp$
|
|
36963
|
+
function _temp$2e(current) {
|
|
36757
36964
|
return current + 1;
|
|
36758
36965
|
}
|
|
36759
36966
|
function OptionPreview(props2) {
|
|
@@ -36995,7 +37202,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
36995
37202
|
push
|
|
36996
37203
|
} = useToast();
|
|
36997
37204
|
let t11;
|
|
36998
|
-
$[31] !== validation2 ? (t11 = validation2.filter(_temp$
|
|
37205
|
+
$[31] !== validation2 ? (t11 = validation2.filter(_temp$2d), $[31] = validation2, $[32] = t11) : t11 = $[32];
|
|
36999
37206
|
const errors = t11;
|
|
37000
37207
|
let t12;
|
|
37001
37208
|
$[33] !== onPathFocus ? (t12 = (event_0) => {
|
|
@@ -37026,7 +37233,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
37026
37233
|
id: `reference-search-fail-${inputId}`
|
|
37027
37234
|
}), console.error(error), of({
|
|
37028
37235
|
hits: []
|
|
37029
|
-
})))))), scan(_temp2$
|
|
37236
|
+
})))))), scan(_temp2$X, INITIAL_SEARCH_STATE$1), tap(setSearchState)), $[39] = inputId, $[40] = onSearch, $[41] = push, $[42] = t15) : t15 = $[42];
|
|
37030
37237
|
const handleQueryChange = useObservableEvent(t15);
|
|
37031
37238
|
let t16;
|
|
37032
37239
|
$[43] !== handleQueryChange ? (t16 = () => {
|
|
@@ -37070,7 +37277,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
37070
37277
|
let t20;
|
|
37071
37278
|
$[55] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = () => [clickOutsideBoundaryRef.current, autocompletePortalRef.current], $[55] = t20) : t20 = $[55], useClickOutsideEvent(t19, t20);
|
|
37072
37279
|
let t21;
|
|
37073
|
-
return $[56] !== actualStrength || $[57] !== autocompletePopoverReferenceElement || $[58] !== changed || $[59] !== elementProps || $[60] !== errors || $[61] !== focused || $[62] !== handleAutocompleteFocus || $[63] !== handleAutocompleteKeyDown || $[64] !== handleAutocompleteOpenButtonClick || $[65] !== handleChange || $[66] !== handleClear || $[67] !== handleFixStrengthMismatch || $[68] !== handleFocus || $[69] !== handleQueryChange || $[70] !== handleReplace || $[71] !== inputId || $[72] !== isEditing || $[73] !== loadableReferenceInfo || $[74] !== path || $[75] !== readOnly || $[76] !== renderOption || $[77] !== schemaType || $[78] !== searchState.hits || $[79] !== searchState.isLoading || $[80] !== searchState.searchString || $[81] !== showWeakRefMismatch || $[82] !== studioUrl || $[83] !== t || $[84] !== value ? (t21 = /* @__PURE__ */ jsx(Stack, { space: 1, children: isEditing ? /* @__PURE__ */ jsx(Stack, { space: 2, ref: clickOutsideBoundaryRef, children: /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !!focused, children: /* @__PURE__ */ jsx("div", { ref: setAutocompletePopoverReferenceElement, children: /* @__PURE__ */ jsx(ReferenceAutocomplete$1, { ...elementProps, "data-testid": "autocomplete", loading: searchState.isLoading, referenceElement: autocompletePopoverReferenceElement, portalRef: autocompletePortalRef, id: inputId || "", options: searchState.hits.map(_temp3$
|
|
37280
|
+
return $[56] !== actualStrength || $[57] !== autocompletePopoverReferenceElement || $[58] !== changed || $[59] !== elementProps || $[60] !== errors || $[61] !== focused || $[62] !== handleAutocompleteFocus || $[63] !== handleAutocompleteKeyDown || $[64] !== handleAutocompleteOpenButtonClick || $[65] !== handleChange || $[66] !== handleClear || $[67] !== handleFixStrengthMismatch || $[68] !== handleFocus || $[69] !== handleQueryChange || $[70] !== handleReplace || $[71] !== inputId || $[72] !== isEditing || $[73] !== loadableReferenceInfo || $[74] !== path || $[75] !== readOnly || $[76] !== renderOption || $[77] !== schemaType || $[78] !== searchState.hits || $[79] !== searchState.isLoading || $[80] !== searchState.searchString || $[81] !== showWeakRefMismatch || $[82] !== studioUrl || $[83] !== t || $[84] !== value ? (t21 = /* @__PURE__ */ jsx(Stack, { space: 1, children: isEditing ? /* @__PURE__ */ jsx(Stack, { space: 2, ref: clickOutsideBoundaryRef, children: /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !!focused, children: /* @__PURE__ */ jsx("div", { ref: setAutocompletePopoverReferenceElement, children: /* @__PURE__ */ jsx(ReferenceAutocomplete$1, { ...elementProps, "data-testid": "autocomplete", loading: searchState.isLoading, referenceElement: autocompletePopoverReferenceElement, portalRef: autocompletePortalRef, id: inputId || "", options: searchState.hits.map(_temp3$r), onFocus: handleAutocompleteFocus, radius: 2, placeholder: t("inputs.reference.search-placeholder"), onKeyDown: handleAutocompleteKeyDown, readOnly, disabled: loadableReferenceInfo.isLoading, onQueryChange: handleQueryChange, searchString: searchState.searchString, onChange: handleChange, filterOption: NO_FILTER$1, renderOption, openButton: {
|
|
37074
37281
|
onClick: handleAutocompleteOpenButtonClick
|
|
37075
37282
|
}, ref: focusElementRef }) }) }) }) : /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !!focused, children: /* @__PURE__ */ jsxs(Card, { padding: 0, border: !0, flex: 1, radius: 1, tone: readOnly ? "transparent" : loadableReferenceInfo.error || errors.length > 0 ? "critical" : "default", children: [
|
|
37076
37283
|
/* @__PURE__ */ jsxs(Flex, { align: "center", padding: 1, children: [
|
|
@@ -37088,19 +37295,19 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
37088
37295
|
loadableReferenceInfo.error && /* @__PURE__ */ jsx(ReferenceMetadataLoadErrorAlertStrip, { errorMessage: loadableReferenceInfo.error.message, onHandleRetry: loadableReferenceInfo.retry })
|
|
37089
37296
|
] }) }) }), $[56] = actualStrength, $[57] = autocompletePopoverReferenceElement, $[58] = changed, $[59] = elementProps, $[60] = errors, $[61] = focused, $[62] = handleAutocompleteFocus, $[63] = handleAutocompleteKeyDown, $[64] = handleAutocompleteOpenButtonClick, $[65] = handleChange, $[66] = handleClear, $[67] = handleFixStrengthMismatch, $[68] = handleFocus, $[69] = handleQueryChange, $[70] = handleReplace, $[71] = inputId, $[72] = isEditing, $[73] = loadableReferenceInfo, $[74] = path, $[75] = readOnly, $[76] = renderOption, $[77] = schemaType, $[78] = searchState.hits, $[79] = searchState.isLoading, $[80] = searchState.searchString, $[81] = showWeakRefMismatch, $[82] = studioUrl, $[83] = t, $[84] = value, $[85] = t21) : t21 = $[85], t21;
|
|
37090
37297
|
}
|
|
37091
|
-
function _temp3$
|
|
37298
|
+
function _temp3$r(hit_0) {
|
|
37092
37299
|
return {
|
|
37093
37300
|
value: hit_0.id,
|
|
37094
37301
|
hit: hit_0
|
|
37095
37302
|
};
|
|
37096
37303
|
}
|
|
37097
|
-
function _temp2$
|
|
37304
|
+
function _temp2$X(prevState, nextState) {
|
|
37098
37305
|
return {
|
|
37099
37306
|
...prevState,
|
|
37100
37307
|
...nextState
|
|
37101
37308
|
};
|
|
37102
37309
|
}
|
|
37103
|
-
function _temp$
|
|
37310
|
+
function _temp$2d(item) {
|
|
37104
37311
|
return item.level === "error";
|
|
37105
37312
|
}
|
|
37106
37313
|
function getReferenceClient(client, schemaType) {
|
|
@@ -37198,13 +37405,13 @@ function createPathObserver(options) {
|
|
|
37198
37405
|
} = options;
|
|
37199
37406
|
return (value, paths, apiConfig, perspective) => observePaths(value, normalizePaths(paths), observeFields, apiConfig, perspective);
|
|
37200
37407
|
}
|
|
37201
|
-
const REQUEST_TAG_BASE = "gdr", AVAILABILITY_READABLE
|
|
37408
|
+
const REQUEST_TAG_BASE = "gdr", AVAILABILITY_READABLE = {
|
|
37202
37409
|
available: !0,
|
|
37203
37410
|
reason: "READABLE"
|
|
37204
|
-
}, AVAILABILITY_PERMISSION_DENIED
|
|
37411
|
+
}, AVAILABILITY_PERMISSION_DENIED = {
|
|
37205
37412
|
available: !1,
|
|
37206
37413
|
reason: "PERMISSION_DENIED"
|
|
37207
|
-
}, AVAILABILITY_NOT_FOUND
|
|
37414
|
+
}, AVAILABILITY_NOT_FOUND = {
|
|
37208
37415
|
available: !1,
|
|
37209
37416
|
reason: "NOT_FOUND"
|
|
37210
37417
|
};
|
|
@@ -37231,7 +37438,7 @@ function createGetReferenceInfo(context) {
|
|
|
37231
37438
|
return of({
|
|
37232
37439
|
id: doc._id,
|
|
37233
37440
|
type: resolvedDoc._type,
|
|
37234
|
-
availability: AVAILABILITY_READABLE
|
|
37441
|
+
availability: AVAILABILITY_READABLE,
|
|
37235
37442
|
preview: {
|
|
37236
37443
|
published: void 0
|
|
37237
37444
|
}
|
|
@@ -37250,7 +37457,7 @@ function createGetReferenceInfo(context) {
|
|
|
37250
37457
|
return combineLatest([publishedPreview$]).pipe(map(([publishedPreview]) => ({
|
|
37251
37458
|
type: resolvedDoc._type,
|
|
37252
37459
|
id: doc._id,
|
|
37253
|
-
availability: AVAILABILITY_READABLE
|
|
37460
|
+
availability: AVAILABILITY_READABLE,
|
|
37254
37461
|
preview: {
|
|
37255
37462
|
published: isRecord$4(publishedPreview) ? publishedPreview : void 0
|
|
37256
37463
|
}
|
|
@@ -37285,7 +37492,7 @@ function fetchDocumentAvailability(client, id2) {
|
|
|
37285
37492
|
};
|
|
37286
37493
|
return client.observable.request(requestOptions).pipe(map((response) => {
|
|
37287
37494
|
const omittedEntry = keyBy(response.omitted || [], (entry) => entry.id)[id2];
|
|
37288
|
-
return omittedEntry ? omittedEntry.reason === "existence" ? AVAILABILITY_NOT_FOUND
|
|
37495
|
+
return omittedEntry ? omittedEntry.reason === "existence" ? AVAILABILITY_NOT_FOUND : omittedEntry.reason === "permission" ? AVAILABILITY_PERMISSION_DENIED : null : AVAILABILITY_READABLE;
|
|
37289
37496
|
}));
|
|
37290
37497
|
}
|
|
37291
37498
|
const limit = 10;
|
|
@@ -37396,7 +37603,7 @@ const useUpsellData = (t0) => {
|
|
|
37396
37603
|
const $ = c(17), {
|
|
37397
37604
|
dataUri,
|
|
37398
37605
|
feature
|
|
37399
|
-
} = t0, [upsellData, setUpsellData] = useState(null), [hasError, setHasError] = useState(!1), telemetry = useTelemetry(), projectId = useProjectId(), client = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS), baseUrl = `https://www.sanity.${client.config().apiHost.endsWith(".sanity.work") ? "work" : "io"}`;
|
|
37606
|
+
} = t0, [upsellData, setUpsellData] = useState(null), [hasError, setHasError] = useState(!1), telemetry = useTelemetry(), projectId = useProjectId$1(), client = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS), baseUrl = `https://www.sanity.${client.config().apiHost.endsWith(".sanity.work") ? "work" : "io"}`;
|
|
37400
37607
|
let t1;
|
|
37401
37608
|
$[0] !== feature || $[1] !== telemetry ? (t1 = {
|
|
37402
37609
|
dialogSecondaryClicked: () => telemetry.log(UpsellDialogLearnMoreCtaClicked, {
|
|
@@ -37592,7 +37799,7 @@ const TRANSFORMATIONS = {
|
|
|
37592
37799
|
const controller = new AbortController(), signal = controller.signal;
|
|
37593
37800
|
return fetch(props2.icon.url, {
|
|
37594
37801
|
signal
|
|
37595
|
-
}).then(_temp$
|
|
37802
|
+
}).then(_temp$2c).then((data) => setHtml(data)).catch(_temp2$W), () => {
|
|
37596
37803
|
controller.abort();
|
|
37597
37804
|
};
|
|
37598
37805
|
}, t1 = [props2.icon.url], $[0] = props2.icon.url, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
|
|
@@ -37746,12 +37953,12 @@ function UpsellDescriptionSerializer(props2) {
|
|
|
37746
37953
|
let t2;
|
|
37747
37954
|
return $[5] !== components2 || $[6] !== value ? (t2 = /* @__PURE__ */ jsx(Card, { tone: "default", children: /* @__PURE__ */ jsx(SerializerContainer, { children: /* @__PURE__ */ jsx(PortableText$1, { value, components: components2, onMissingComponent: !1 }) }) }), $[5] = components2, $[6] = value, $[7] = t2) : t2 = $[7], t2;
|
|
37748
37955
|
}
|
|
37749
|
-
function _temp$
|
|
37956
|
+
function _temp$2c(response) {
|
|
37750
37957
|
if (!response.ok)
|
|
37751
37958
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
37752
37959
|
return response.text();
|
|
37753
37960
|
}
|
|
37754
|
-
function _temp2$
|
|
37961
|
+
function _temp2$W(error) {
|
|
37755
37962
|
error.name !== "AbortError" && console.error(error);
|
|
37756
37963
|
}
|
|
37757
37964
|
const StyledButton$3 = /* @__PURE__ */ styled(Button$1).withConfig({
|
|
@@ -38036,7 +38243,7 @@ function useAssetSourceUploader(options) {
|
|
|
38036
38243
|
break bb49;
|
|
38037
38244
|
}
|
|
38038
38245
|
case "error": {
|
|
38039
|
-
event.files.forEach(_temp$
|
|
38246
|
+
event.files.forEach(_temp$2b), push({
|
|
38040
38247
|
status: "error",
|
|
38041
38248
|
description: t("asset-sources.common.uploader.upload-failed.description"),
|
|
38042
38249
|
title: t("asset-sources.common.uploader.upload-failed.title")
|
|
@@ -38044,7 +38251,7 @@ function useAssetSourceUploader(options) {
|
|
|
38044
38251
|
break bb49;
|
|
38045
38252
|
}
|
|
38046
38253
|
case "all-complete": {
|
|
38047
|
-
onAssetLimitError && event.files && event.files.some(_temp2$
|
|
38254
|
+
onAssetLimitError && event.files && event.files.some(_temp2$V) && onAssetLimitError(), onChange(PatchEvent.from([unset([UPLOAD_STATUS_KEY])])), onAllComplete?.(), handleAssetSourceResetOnComplete();
|
|
38048
38255
|
break bb49;
|
|
38049
38256
|
}
|
|
38050
38257
|
default:
|
|
@@ -38071,10 +38278,10 @@ function useAssetSourceUploader(options) {
|
|
|
38071
38278
|
handleSelectFilesToUpload
|
|
38072
38279
|
}, $[14] = assetSourceUploader, $[15] = handleSelectFilesToUpload, $[16] = t3) : t3 = $[16], t3;
|
|
38073
38280
|
}
|
|
38074
|
-
function _temp2$
|
|
38281
|
+
function _temp2$V(file) {
|
|
38075
38282
|
return file.status === "error" && isAssetLimitError(file.error);
|
|
38076
38283
|
}
|
|
38077
|
-
function _temp$
|
|
38284
|
+
function _temp$2b(file_0) {
|
|
38078
38285
|
return console.error(file_0.error);
|
|
38079
38286
|
}
|
|
38080
38287
|
function useUploadExternalFileToDataset(options) {
|
|
@@ -39203,7 +39410,7 @@ function FilePreview$1(props2) {
|
|
|
39203
39410
|
onOpenSourceForUpload: handleOpenSourceForUpload,
|
|
39204
39411
|
onOpenSourceForUploadSingle: handleOpenSourceForUploadSingle,
|
|
39205
39412
|
onSelectFilesSingle: handleSelectFilesFromAssetSourceSingle,
|
|
39206
|
-
getSingleButtonTestId: _temp$
|
|
39413
|
+
getSingleButtonTestId: _temp$2a,
|
|
39207
39414
|
dropdownMenuTestId: "file-input-upload-drop-down-menu-button",
|
|
39208
39415
|
onCloseParentMenu: t8,
|
|
39209
39416
|
onFilePickerCancel: t9
|
|
@@ -39218,7 +39425,7 @@ function FilePreview$1(props2) {
|
|
|
39218
39425
|
let t13;
|
|
39219
39426
|
return $[64] !== asset || $[65] !== observeAsset || $[66] !== t12 ? (t13 = /* @__PURE__ */ jsx(WithReferencedAsset, { reference: asset, observeAsset, waitPlaceholder: t11, children: t12 }), $[64] = asset, $[65] = observeAsset, $[66] = t12, $[67] = t13) : t13 = $[67], t13;
|
|
39220
39427
|
}
|
|
39221
|
-
function _temp$
|
|
39428
|
+
function _temp$2a(sourceName2) {
|
|
39222
39429
|
return `file-input-upload-button-${sourceName2}`;
|
|
39223
39430
|
}
|
|
39224
39431
|
function FilePreviewContent(t0) {
|
|
@@ -39767,7 +39974,7 @@ function ImageInputAssetMenuWithReferenceAssetComponent(props2) {
|
|
|
39767
39974
|
onOpenSourceForUpload: handleOpenSourceForUpload,
|
|
39768
39975
|
onOpenSourceForUploadSingle: handleOpenSourceForUploadSingle,
|
|
39769
39976
|
onSelectFilesSingle: handleSelectFilesFromAssetSourceSingle,
|
|
39770
|
-
getSingleButtonTestId: _temp$
|
|
39977
|
+
getSingleButtonTestId: _temp$29,
|
|
39771
39978
|
onCloseParentMenu: t8,
|
|
39772
39979
|
onFilePickerCancel: t9
|
|
39773
39980
|
}, $[30] = accept, $[31] = assetSourcesWithUpload, $[32] = directUploads, $[33] = disableNew, $[34] = handleOpenSourceForUpload, $[35] = handleOpenSourceForUploadSingle, $[36] = handleSelectFilesFromAssetSource, $[37] = handleSelectFilesFromAssetSourceSingle, $[38] = readOnly, $[39] = t8, $[40] = t9, $[41] = t10) : t10 = $[41];
|
|
@@ -39797,7 +40004,7 @@ function ImageInputAssetMenuWithReferenceAssetComponent(props2) {
|
|
|
39797
40004
|
let t16;
|
|
39798
40005
|
return $[62] !== handleOpenDialog || $[63] !== isMenuOpen || $[64] !== menuButtonRef || $[65] !== setHotspotButtonElement || $[66] !== setMenuOpen || $[67] !== t11 || $[68] !== t15 ? (t16 = /* @__PURE__ */ jsx(ImageActionsMenu, { isMenuOpen, onEdit: handleOpenDialog, onMenuOpen: setMenuOpen, setHotspotButtonElement, menuButtonRef, showEdit: t11, children: t15 }), $[62] = handleOpenDialog, $[63] = isMenuOpen, $[64] = menuButtonRef, $[65] = setHotspotButtonElement, $[66] = setMenuOpen, $[67] = t11, $[68] = t15, $[69] = t16) : t16 = $[69], t16;
|
|
39799
40006
|
}
|
|
39800
|
-
function _temp$
|
|
40007
|
+
function _temp$29() {
|
|
39801
40008
|
return "file-input-upload-button";
|
|
39802
40009
|
}
|
|
39803
40010
|
const ImageInputAssetMenuWithReferenceAsset = memo(ImageInputAssetMenuWithReferenceAssetComponent), RatioBox$1 = styled(Box).withConfig({
|
|
@@ -40923,7 +41130,7 @@ function ToolSVGComponent(props2) {
|
|
|
40923
41130
|
const svgElement = svgRef.current;
|
|
40924
41131
|
if (!svgElement)
|
|
40925
41132
|
return;
|
|
40926
|
-
const handleTouchMove = _temp$
|
|
41133
|
+
const handleTouchMove = _temp$28;
|
|
40927
41134
|
return svgElement.addEventListener("touchmove", handleTouchMove, {
|
|
40928
41135
|
passive: !1
|
|
40929
41136
|
}), () => {
|
|
@@ -41195,7 +41402,7 @@ function ToolSVGComponent(props2) {
|
|
|
41195
41402
|
t90
|
|
41196
41403
|
] }) }), $[245] = handlePointerMove, $[246] = handlePointerUp, $[247] = t22, $[248] = t26, $[249] = t27, $[250] = t33, $[251] = t38, $[252] = t39, $[253] = t50, $[254] = t80, $[255] = t90, $[256] = t91) : t91 = $[256], t91;
|
|
41197
41404
|
}
|
|
41198
|
-
function _temp$
|
|
41405
|
+
function _temp$28(e) {
|
|
41199
41406
|
e.preventDefault();
|
|
41200
41407
|
}
|
|
41201
41408
|
const ToolSVG = memo(ToolSVGComponent);
|
|
@@ -41346,7 +41553,7 @@ function ImageToolInput(props2) {
|
|
|
41346
41553
|
$[8] !== onChange || $[9] !== readOnly || $[10] !== schemaType.fields ? (t7 = (finalValue) => {
|
|
41347
41554
|
if (readOnly)
|
|
41348
41555
|
return;
|
|
41349
|
-
const cropField = schemaType.fields.find(_temp$
|
|
41556
|
+
const cropField = schemaType.fields.find(_temp$27), hotspotField = schemaType.fields.find(_temp2$U), crop = cropField ? {
|
|
41350
41557
|
_type: cropField.type.name,
|
|
41351
41558
|
...finalValue.crop || DEFAULT_CROP
|
|
41352
41559
|
} : finalValue.crop, hotspot = hotspotField ? {
|
|
@@ -41370,7 +41577,7 @@ function ImageToolInput(props2) {
|
|
|
41370
41577
|
$[18] !== isSvg || $[19] !== t ? (t12 = isSvg ? /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Card, { padding: 3, marginY: 3, tone: "caution", radius: 2, children: /* @__PURE__ */ jsxs(Stack, { space: 4, children: [
|
|
41371
41578
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: t("inputs.imagetool.vector-warning.title") }),
|
|
41372
41579
|
/* @__PURE__ */ jsx(Details, { title: t("inputs.imagetool.vector-warning.expand-developer-info"), children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "inputs.imagetool.vector-warning.developer-info", components: {
|
|
41373
|
-
ImageUrlDocumentationLink: _temp3$
|
|
41580
|
+
ImageUrlDocumentationLink: _temp3$q,
|
|
41374
41581
|
ImageUrlPackageDocumentationLink: _temp4$c
|
|
41375
41582
|
} }) }) })
|
|
41376
41583
|
] }) }) }) : null, $[18] = isSvg, $[19] = t, $[20] = t12) : t12 = $[20];
|
|
@@ -41420,16 +41627,16 @@ function _temp4$c(t0) {
|
|
|
41420
41627
|
} = t0;
|
|
41421
41628
|
return /* @__PURE__ */ jsx("a", { href: "https://www.sanity.io/docs/image-urls#fm-048ba39d9e88", children: /* @__PURE__ */ jsx("code", { children: children_0 }) });
|
|
41422
41629
|
}
|
|
41423
|
-
function _temp3$
|
|
41630
|
+
function _temp3$q(t0) {
|
|
41424
41631
|
const {
|
|
41425
41632
|
children
|
|
41426
41633
|
} = t0;
|
|
41427
41634
|
return /* @__PURE__ */ jsx("a", { href: "https://www.sanity.io/docs/image-urls#fm-048ba39d9e88", children });
|
|
41428
41635
|
}
|
|
41429
|
-
function _temp2$
|
|
41636
|
+
function _temp2$U(field_0) {
|
|
41430
41637
|
return field_0.type.name !== "object" && field_0.name === "hotspot";
|
|
41431
41638
|
}
|
|
41432
|
-
function _temp$
|
|
41639
|
+
function _temp$27(field) {
|
|
41433
41640
|
return field.name === "crop" && field.type.name !== "object";
|
|
41434
41641
|
}
|
|
41435
41642
|
function ImageInputHotspotInput(props2) {
|
|
@@ -41597,7 +41804,7 @@ function useImageObjectUrl(url) {
|
|
|
41597
41804
|
let t2, t3;
|
|
41598
41805
|
return $[5] !== cacheKey2 || $[6] !== token || $[7] !== url ? (t2 = () => {
|
|
41599
41806
|
if (!cacheKey2) {
|
|
41600
|
-
setState(_temp$
|
|
41807
|
+
setState(_temp$26);
|
|
41601
41808
|
return;
|
|
41602
41809
|
}
|
|
41603
41810
|
let entry_0 = requestCache.get(cacheKey2);
|
|
@@ -41610,7 +41817,7 @@ function useImageObjectUrl(url) {
|
|
|
41610
41817
|
};
|
|
41611
41818
|
}, t3 = [cacheKey2, token, url], $[5] = cacheKey2, $[6] = token, $[7] = url, $[8] = t2, $[9] = t3) : (t2 = $[8], t3 = $[9]), useEffect(t2, t3), state;
|
|
41612
41819
|
}
|
|
41613
|
-
function _temp$
|
|
41820
|
+
function _temp$26(prev) {
|
|
41614
41821
|
return prev.objectUrl || prev.isLoading || prev.error ? IDLE_RESULT : prev;
|
|
41615
41822
|
}
|
|
41616
41823
|
function useImageUrl(params) {
|
|
@@ -41873,7 +42080,7 @@ function BaseImageInputComponent(props2) {
|
|
|
41873
42080
|
const handleClearField = t9;
|
|
41874
42081
|
let t10;
|
|
41875
42082
|
$[30] !== onChange || $[31] !== value || $[32] !== valueIsArrayElement ? (t10 = () => {
|
|
41876
|
-
const allKeys = Object.keys(value || {}), isEmpty2 = allKeys.filter(_temp$
|
|
42083
|
+
const allKeys = Object.keys(value || {}), isEmpty2 = allKeys.filter(_temp$25).length === 0, removeKeys = ["asset", "media"].concat(allKeys.filter(_temp2$T)).map(_temp3$p);
|
|
41877
42084
|
onChange(isEmpty2 && !valueIsArrayElement() ? unset() : removeKeys);
|
|
41878
42085
|
}, $[30] = onChange, $[31] = value, $[32] = valueIsArrayElement, $[33] = t10) : t10 = $[33];
|
|
41879
42086
|
const handleRemoveButtonClick = t10;
|
|
@@ -41966,13 +42173,13 @@ function BaseImageInputComponent(props2) {
|
|
|
41966
42173
|
function _temp4$b(member) {
|
|
41967
42174
|
return member.kind === "field" && member.name === "hotspot";
|
|
41968
42175
|
}
|
|
41969
|
-
function _temp3$
|
|
42176
|
+
function _temp3$p(key_1) {
|
|
41970
42177
|
return unset([key_1]);
|
|
41971
42178
|
}
|
|
41972
|
-
function _temp2$
|
|
42179
|
+
function _temp2$T(key_0) {
|
|
41973
42180
|
return ["crop", "hotspot", "_upload"].includes(key_0);
|
|
41974
42181
|
}
|
|
41975
|
-
function _temp$
|
|
42182
|
+
function _temp$25(key) {
|
|
41976
42183
|
return !["_type", "_key", "_upload", "asset", "crop", "hotspot", "media"].includes(key);
|
|
41977
42184
|
}
|
|
41978
42185
|
const BaseImageInput = memo(BaseImageInputComponent);
|
|
@@ -42266,11 +42473,11 @@ function TagsArrayInput(props2) {
|
|
|
42266
42473
|
$[0] !== t0 ? (t1 = t0 === void 0 ? [] : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
42267
42474
|
const value = t1;
|
|
42268
42475
|
let t2;
|
|
42269
|
-
$[2] !== value ? (t2 = value?.map(_temp$
|
|
42476
|
+
$[2] !== value ? (t2 = value?.map(_temp$24), $[2] = value, $[3] = t2) : t2 = $[3];
|
|
42270
42477
|
const tagInputValue = t2;
|
|
42271
42478
|
let t3;
|
|
42272
42479
|
$[4] !== onChange ? (t3 = (nextValue) => {
|
|
42273
|
-
onChange(nextValue.length === 0 ? unset() : set(nextValue.map(_temp2$
|
|
42480
|
+
onChange(nextValue.length === 0 ? unset() : set(nextValue.map(_temp2$S)));
|
|
42274
42481
|
}, $[4] = onChange, $[5] = t3) : t3 = $[5];
|
|
42275
42482
|
const handleChange = t3;
|
|
42276
42483
|
let t4;
|
|
@@ -42278,10 +42485,10 @@ function TagsArrayInput(props2) {
|
|
|
42278
42485
|
let t5;
|
|
42279
42486
|
return $[11] !== changed || $[12] !== path || $[13] !== t4 ? (t5 = /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: !1, children: t4 }), $[11] = changed, $[12] = path, $[13] = t4, $[14] = t5) : t5 = $[14], t5;
|
|
42280
42487
|
}
|
|
42281
|
-
function _temp2$
|
|
42488
|
+
function _temp2$S(v_0) {
|
|
42282
42489
|
return v_0.value;
|
|
42283
42490
|
}
|
|
42284
|
-
function _temp$
|
|
42491
|
+
function _temp$24(v) {
|
|
42285
42492
|
return {
|
|
42286
42493
|
value: v
|
|
42287
42494
|
};
|
|
@@ -42327,7 +42534,7 @@ function SelectInput(props2) {
|
|
|
42327
42534
|
changed,
|
|
42328
42535
|
focused,
|
|
42329
42536
|
elementProps
|
|
42330
|
-
} = props2, tone = validation2?.some(_temp$
|
|
42537
|
+
} = props2, tone = validation2?.some(_temp$23) ? "critical" : void 0;
|
|
42331
42538
|
let t0;
|
|
42332
42539
|
$[0] !== schemaType.options?.list ? (t0 = schemaType.options?.list || [], $[0] = schemaType.options?.list, $[1] = t0) : t0 = $[1];
|
|
42333
42540
|
let t1;
|
|
@@ -42359,14 +42566,14 @@ function SelectInput(props2) {
|
|
|
42359
42566
|
}
|
|
42360
42567
|
handleChange(nextItem_0);
|
|
42361
42568
|
}, $[12] = handleChange, $[13] = itemFromOptionValue, $[14] = t6) : t6 = $[14];
|
|
42362
|
-
const handleSelectChange = t6, content = isRadio ? /* @__PURE__ */ jsx(RadioSelect, { ...elementProps, value: currentItem, inputId, items, direction: schemaType.options?.direction || "vertical", onChange: handleChange, readOnly, tone, customValidity: validationError }) : /* @__PURE__ */ jsx(Card, { tone, radius: 2, children: /* @__PURE__ */ jsx(Select$1, { ...elementProps, customValidity: validationError, value: optionValueFromItem(currentItem), readOnly, onChange: handleSelectChange, children: [EMPTY_ITEM, ...items].map(_temp2$
|
|
42569
|
+
const handleSelectChange = t6, content = isRadio ? /* @__PURE__ */ jsx(RadioSelect, { ...elementProps, value: currentItem, inputId, items, direction: schemaType.options?.direction || "vertical", onChange: handleChange, readOnly, tone, customValidity: validationError }) : /* @__PURE__ */ jsx(Card, { tone, radius: 2, children: /* @__PURE__ */ jsx(Select$1, { ...elementProps, customValidity: validationError, value: optionValueFromItem(currentItem), readOnly, onChange: handleSelectChange, children: [EMPTY_ITEM, ...items].map(_temp2$R) }) }), t7 = !!focused;
|
|
42363
42570
|
let t8;
|
|
42364
42571
|
return $[15] !== changed || $[16] !== content || $[17] !== path || $[18] !== t7 ? (t8 = /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: t7, children: content }), $[15] = changed, $[16] = content, $[17] = path, $[18] = t7, $[19] = t8) : t8 = $[19], t8;
|
|
42365
42572
|
}
|
|
42366
|
-
function _temp2$
|
|
42573
|
+
function _temp2$R(item_1, i) {
|
|
42367
42574
|
return /* @__PURE__ */ jsx("option", { value: i - 1, children: item_1.title }, `${i - 1}`);
|
|
42368
42575
|
}
|
|
42369
|
-
function _temp$
|
|
42576
|
+
function _temp$23(v) {
|
|
42370
42577
|
return v.level === "error";
|
|
42371
42578
|
}
|
|
42372
42579
|
const RadioSelect = forwardRef(function(props2, ref) {
|
|
@@ -42531,7 +42738,7 @@ function PreviewItem(props2) {
|
|
|
42531
42738
|
const presence = t7, childValidation = useChildValidation(path, !0);
|
|
42532
42739
|
let t8;
|
|
42533
42740
|
$[14] !== childValidation ? (t8 = childValidation.length === 0 ? null : /* @__PURE__ */ jsx(Box, { paddingX: 1, paddingY: 3, children: /* @__PURE__ */ jsx(FormFieldValidationStatus, { validation: childValidation, __unstable_showSummary: !0 }) }), $[14] = childValidation, $[15] = t8) : t8 = $[15];
|
|
42534
|
-
const validation2 = t8, hasErrors = childValidation.some(_temp$
|
|
42741
|
+
const validation2 = t8, hasErrors = childValidation.some(_temp$22), hasWarnings = childValidation.some(_temp2$Q), [contextMenuButtonElement, setContextMenuButtonElement] = useState(null), t9 = parentSchemaType.options?.insertMenu;
|
|
42535
42742
|
let t10;
|
|
42536
42743
|
$[16] !== contextMenuButtonElement || $[17] !== handleInsert || $[18] !== insertableTypes || $[19] !== maxReached || $[20] !== maxReachedReason || $[21] !== t9 ? (t10 = {
|
|
42537
42744
|
schemaTypes: insertableTypes,
|
|
@@ -42574,7 +42781,7 @@ function PreviewItem(props2) {
|
|
|
42574
42781
|
readOnly,
|
|
42575
42782
|
hasErrors,
|
|
42576
42783
|
hasWarnings
|
|
42577
|
-
}), handleMouseDown = _temp3$
|
|
42784
|
+
}), handleMouseDown = _temp3$o;
|
|
42578
42785
|
let t18;
|
|
42579
42786
|
$[53] !== onOpen ? (t18 = (event_0) => {
|
|
42580
42787
|
event_0.stopPropagation(), onOpen();
|
|
@@ -42621,13 +42828,13 @@ function PreviewItem(props2) {
|
|
|
42621
42828
|
t24 = $[93];
|
|
42622
42829
|
return t24;
|
|
42623
42830
|
}
|
|
42624
|
-
function _temp3$
|
|
42831
|
+
function _temp3$o(event) {
|
|
42625
42832
|
event.preventDefault();
|
|
42626
42833
|
}
|
|
42627
|
-
function _temp2$
|
|
42834
|
+
function _temp2$Q(v_0) {
|
|
42628
42835
|
return v_0.level === "warning";
|
|
42629
42836
|
}
|
|
42630
|
-
function _temp$
|
|
42837
|
+
function _temp$22(v) {
|
|
42631
42838
|
return v.level === "error";
|
|
42632
42839
|
}
|
|
42633
42840
|
function ReferenceItemRefProvider(props2) {
|
|
@@ -42699,7 +42906,7 @@ function ReferenceItem(props2) {
|
|
|
42699
42906
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (hadFocus, hasFocus) => {
|
|
42700
42907
|
!hadFocus && hasFocus && elementRef.current && elementRef.current?.focus();
|
|
42701
42908
|
}, $[4] = t2) : t2 = $[4], useDidUpdate(focused, t2);
|
|
42702
|
-
const hasErrors = props2.validation.some(_temp$
|
|
42909
|
+
const hasErrors = props2.validation.some(_temp$21), hasWarnings = props2.validation.some(_temp2$P), resolvingInitialValue = value._resolvingInitialValue;
|
|
42703
42910
|
let t3;
|
|
42704
42911
|
$[5] !== onInsert || $[6] !== value ? (t3 = () => {
|
|
42705
42912
|
onInsert({
|
|
@@ -42834,10 +43041,10 @@ function ReferenceItem(props2) {
|
|
|
42834
43041
|
let t29;
|
|
42835
43042
|
return $[110] !== path || $[111] !== readOnly || $[112] !== t28 ? (t29 = /* @__PURE__ */ jsx(FormNodeDivergenceDetail, { path, readOnly, children: t28 }), $[110] = path, $[111] = readOnly, $[112] = t28, $[113] = t29) : t29 = $[113], t29;
|
|
42836
43043
|
}
|
|
42837
|
-
function _temp2$
|
|
43044
|
+
function _temp2$P(v_0) {
|
|
42838
43045
|
return v_0.level === "warning";
|
|
42839
43046
|
}
|
|
42840
|
-
function _temp$
|
|
43047
|
+
function _temp$21(v) {
|
|
42841
43048
|
return v.level === "error";
|
|
42842
43049
|
}
|
|
42843
43050
|
function defaultResolveItemComponent(schemaType) {
|
|
@@ -43808,7 +44015,7 @@ function DialogStackProvider(t0) {
|
|
|
43808
44015
|
return isKeySegment(segment) && isKeySegment(currentSegment) ? segment._key === currentSegment._key : segment === currentSegment;
|
|
43809
44016
|
}))
|
|
43810
44017
|
return !1;
|
|
43811
|
-
if (fullscreenPath.some(_temp$
|
|
44018
|
+
if (fullscreenPath.some(_temp$20))
|
|
43812
44019
|
return !0;
|
|
43813
44020
|
const nextSegment = currentPath[fullscreenPath.length];
|
|
43814
44021
|
return !isKeySegment(nextSegment);
|
|
@@ -43823,7 +44030,7 @@ function DialogStackProvider(t0) {
|
|
|
43823
44030
|
$[8] !== closeAll || $[9] !== findAncestorFullscreenPath || $[10] !== onPathOpen ? (t7 = (currentPath_0) => {
|
|
43824
44031
|
const ancestorPaths = findAncestorFullscreenPath(currentPath_0);
|
|
43825
44032
|
if (ancestorPaths && ancestorPaths.length > 0) {
|
|
43826
|
-
const closestParentPath = ancestorPaths.reduce(_temp2$
|
|
44033
|
+
const closestParentPath = ancestorPaths.reduce(_temp2$O), newPath = stringToPath(closestParentPath);
|
|
43827
44034
|
onPathOpen(newPath), setStack((prev_2) => prev_2.filter((entry_2) => !entry_2.path || entry_2.path.length >= newPath.length ? !1 : entry_2.path.every((segment_1, index_0) => {
|
|
43828
44035
|
const newSegment = newPath[index_0];
|
|
43829
44036
|
return isKeySegment(segment_1) && isKeySegment(newSegment) ? segment_1._key === newSegment._key : segment_1 === newSegment;
|
|
@@ -43838,7 +44045,7 @@ function DialogStackProvider(t0) {
|
|
|
43838
44045
|
if (options?.toParent && stack.length >= 2) {
|
|
43839
44046
|
const parentEntry = stack[stack.length - 2];
|
|
43840
44047
|
if (parentEntry?.path) {
|
|
43841
|
-
onPathOpen(parentEntry.path), setStack(_temp3$
|
|
44048
|
+
onPathOpen(parentEntry.path), setStack(_temp3$n);
|
|
43842
44049
|
return;
|
|
43843
44050
|
}
|
|
43844
44051
|
}
|
|
@@ -43870,13 +44077,13 @@ function DialogStackProvider(t0) {
|
|
|
43870
44077
|
let t11;
|
|
43871
44078
|
return $[25] !== children || $[26] !== value ? (t11 = /* @__PURE__ */ jsx(DialogStackContext.Provider, { value, children }), $[25] = children, $[26] = value, $[27] = t11) : t11 = $[27], t11;
|
|
43872
44079
|
}
|
|
43873
|
-
function _temp3$
|
|
44080
|
+
function _temp3$n(prev_3) {
|
|
43874
44081
|
return prev_3.slice(0, -1);
|
|
43875
44082
|
}
|
|
43876
|
-
function _temp2$
|
|
44083
|
+
function _temp2$O(longest, current) {
|
|
43877
44084
|
return current.length > longest.length ? current : longest;
|
|
43878
44085
|
}
|
|
43879
|
-
function _temp$
|
|
44086
|
+
function _temp$20(segment_0) {
|
|
43880
44087
|
return isKeySegment(segment_0);
|
|
43881
44088
|
}
|
|
43882
44089
|
function FormBuilderInputErrorBoundary(props2) {
|
|
@@ -44020,14 +44227,14 @@ function useVisibility(props2) {
|
|
|
44020
44227
|
if (!element || disabled)
|
|
44021
44228
|
return;
|
|
44022
44229
|
element && "checkVisibility" in element && setVisible(element.checkVisibility());
|
|
44023
|
-
const isDocumentVisible$ = concat(of(!document.hidden), visibilityChange$.pipe(map(_temp$
|
|
44230
|
+
const isDocumentVisible$ = concat(of(!document.hidden), visibilityChange$.pipe(map(_temp$1$))).pipe(distinctUntilChanged()), inViewport$ = intersectionObservableFor(element).pipe(map(_temp2$N)), sub2 = isDocumentVisible$.pipe(switchMap((isDocumentVisible) => isDocumentVisible ? inViewport$ : of(!1)), switchMap((isVisible) => isVisible ? of(!0) : of(!1).pipe(delay(hideDelay))), distinctUntilChanged()).subscribe(setVisible);
|
|
44024
44231
|
return () => sub2.unsubscribe();
|
|
44025
44232
|
}, t2 = [element, hideDelay, disabled], $[0] = disabled, $[1] = element, $[2] = hideDelay, $[3] = t1, $[4] = t2) : (t1 = $[3], t2 = $[4]), useLayoutEffect(t1, t2), disabled ? !1 : visible;
|
|
44026
44233
|
}
|
|
44027
|
-
function _temp2$
|
|
44234
|
+
function _temp2$N(event_0) {
|
|
44028
44235
|
return event_0.isIntersecting;
|
|
44029
44236
|
}
|
|
44030
|
-
function _temp$
|
|
44237
|
+
function _temp$1$(event) {
|
|
44031
44238
|
return event.target instanceof Document ? !event?.target?.hidden : !1;
|
|
44032
44239
|
}
|
|
44033
44240
|
const _HIDE_DELAY = 2e3;
|
|
@@ -44186,7 +44393,7 @@ function FormBuilderProvider(props2) {
|
|
|
44186
44393
|
assetSources: file.assetSources,
|
|
44187
44394
|
directUploads: t7
|
|
44188
44395
|
}, $[5] = file.assetSources, $[6] = t7, $[7] = t8) : t8 = $[7];
|
|
44189
|
-
const t9 = filterField || _temp$
|
|
44396
|
+
const t9 = filterField || _temp$1_, t10 = image?.directUploads ?? !0;
|
|
44190
44397
|
let t11;
|
|
44191
44398
|
$[8] !== image.assetSources || $[9] !== t10 ? (t11 = {
|
|
44192
44399
|
assetSources: image.assetSources,
|
|
@@ -44239,7 +44446,7 @@ function FormBuilderProvider(props2) {
|
|
|
44239
44446
|
let t19;
|
|
44240
44447
|
return $[59] !== formBuilder || $[60] !== t18 ? (t19 = /* @__PURE__ */ jsx(FormBuilderContext.Provider, { value: formBuilder, children: t18 }), $[59] = formBuilder, $[60] = t18, $[61] = t19) : t19 = $[61], t19;
|
|
44241
44448
|
}
|
|
44242
|
-
function _temp$
|
|
44449
|
+
function _temp$1_() {
|
|
44243
44450
|
return !0;
|
|
44244
44451
|
}
|
|
44245
44452
|
function FormProvider(props2) {
|
|
@@ -44403,7 +44610,7 @@ function FormBuilder(props2) {
|
|
|
44403
44610
|
}, $[44] = handleBlur, $[45] = handleFocus, $[46] = id2, $[47] = t20, $[48] = t21) : t21 = $[48];
|
|
44404
44611
|
const t22 = diffProps.__unstable_computeDiff;
|
|
44405
44612
|
let t23;
|
|
44406
|
-
$[49] !== members ? (t23 = members.some(_temp$
|
|
44613
|
+
$[49] !== members ? (t23 = members.some(_temp$1Z), $[49] = members, $[50] = t23) : t23 = $[50];
|
|
44407
44614
|
let t24;
|
|
44408
44615
|
$[51] !== compareValue || $[52] !== diffProps.__unstable_computeDiff || $[53] !== diffProps.hasUpstreamVersion || $[54] !== focusPath || $[55] !== focused || $[56] !== groups || $[57] !== handleChange || $[58] !== handleCloseField || $[59] !== handleCollapseField || $[60] !== handleCollapseFieldSet || $[61] !== handleExpandField || $[62] !== handleExpandFieldSet || $[63] !== handleOpenField || $[64] !== handleSelectFieldGroup || $[65] !== id2 || $[66] !== members || $[67] !== onPathFocus || $[68] !== readOnly || $[69] !== renderAnnotation || $[70] !== renderBlock2 || $[71] !== renderField || $[72] !== renderInlineBlock || $[73] !== renderInput || $[74] !== renderItem2 || $[75] !== renderPreview || $[76] !== schemaType || $[77] !== t21 || $[78] !== t23 || $[79] !== value ? (t24 = {
|
|
44409
44616
|
focusPath,
|
|
@@ -44453,7 +44660,7 @@ function FormBuilder(props2) {
|
|
|
44453
44660
|
let t29;
|
|
44454
44661
|
return $[95] !== autoFocus || $[96] !== changesOpen || $[97] !== collapsedFieldSets || $[98] !== collapsedPaths || $[99] !== fieldActions || $[100] !== focusPath || $[101] !== focused || $[102] !== groups || $[103] !== id2 || $[104] !== inspectOpen || $[105] !== onChange || $[106] !== onFieldGroupSelect || $[107] !== onPathBlur || $[108] !== onPathFocus || $[109] !== onPathOpen || $[110] !== onSetFieldSetCollapsed || $[111] !== onSetPathCollapsed || $[112] !== patchChannel || $[113] !== presence || $[114] !== readOnly || $[115] !== schemaType || $[116] !== t28 || $[117] !== validation2 ? (t29 = /* @__PURE__ */ jsx(FormProvider, { __internal_fieldActions: fieldActions, __internal_patchChannel: patchChannel, __internal_inspectOpen: inspectOpen, autoFocus, changesOpen, collapsedFieldSets, collapsedPaths, focusPath, focused, groups, id: id2, onChange, onPathBlur, onPathFocus, onPathOpen, onFieldGroupSelect, onSetPathCollapsed, onSetFieldSetCollapsed, presence, validation: validation2, readOnly, schemaType, children: t28 }), $[95] = autoFocus, $[96] = changesOpen, $[97] = collapsedFieldSets, $[98] = collapsedPaths, $[99] = fieldActions, $[100] = focusPath, $[101] = focused, $[102] = groups, $[103] = id2, $[104] = inspectOpen, $[105] = onChange, $[106] = onFieldGroupSelect, $[107] = onPathBlur, $[108] = onPathFocus, $[109] = onPathOpen, $[110] = onSetFieldSetCollapsed, $[111] = onSetPathCollapsed, $[112] = patchChannel, $[113] = presence, $[114] = readOnly, $[115] = schemaType, $[116] = t28, $[117] = validation2, $[118] = t29) : t29 = $[118], t29;
|
|
44455
44662
|
}
|
|
44456
|
-
function _temp$
|
|
44663
|
+
function _temp$1Z(m) {
|
|
44457
44664
|
return m.kind === "field" && m.field.changed;
|
|
44458
44665
|
}
|
|
44459
44666
|
function RootInput(props2) {
|
|
@@ -44872,7 +45079,7 @@ const DefaultBlockObjectComponent = (props2) => {
|
|
|
44872
45079
|
validation: validation2
|
|
44873
45080
|
} = props2, {
|
|
44874
45081
|
t
|
|
44875
|
-
} = useTranslation(), isImagePreview = isImage(value), hasError = validation2.filter(_temp$
|
|
45082
|
+
} = useTranslation(), isImagePreview = isImage(value), hasError = validation2.filter(_temp$1Y).length > 0, hasWarning = validation2.filter(_temp2$M).length > 0, hasMarkers = markers.length > 0, tone = selected || focused ? "primary" : "default", uploadState = value[UPLOAD_STATUS_KEY], uploadProgress = typeof uploadState?.progress == "number" ? uploadState?.progress : void 0;
|
|
44876
45083
|
let t0;
|
|
44877
45084
|
$[0] !== onOpen ? (t0 = (e) => {
|
|
44878
45085
|
e.preventDefault(), e.stopPropagation(), onOpen();
|
|
@@ -44903,10 +45110,10 @@ const DefaultBlockObjectComponent = (props2) => {
|
|
|
44903
45110
|
t14
|
|
44904
45111
|
] }), $[39] = t13, $[40] = t14, $[41] = t15) : t15 = $[41], t15;
|
|
44905
45112
|
};
|
|
44906
|
-
function _temp$
|
|
45113
|
+
function _temp$1Y(v) {
|
|
44907
45114
|
return v.level === "error";
|
|
44908
45115
|
}
|
|
44909
|
-
function _temp2$
|
|
45116
|
+
function _temp2$M(v_0) {
|
|
44910
45117
|
return v_0.level === "warning";
|
|
44911
45118
|
}
|
|
44912
45119
|
function defaultResolveBlockComponent(schemaType) {
|
|
@@ -45307,23 +45514,7 @@ const SanityDefaultPreview = memo(function(props2) {
|
|
|
45307
45514
|
return children;
|
|
45308
45515
|
});
|
|
45309
45516
|
SanityDefaultPreview.displayName = "Memo(SanityDefaultPreview)";
|
|
45310
|
-
const MAX_DOCUMENT_ID_CHUNK_SIZE = 11164
|
|
45311
|
-
available: !0,
|
|
45312
|
-
reason: "READABLE"
|
|
45313
|
-
}, AVAILABILITY_PERMISSION_DENIED = {
|
|
45314
|
-
available: !1,
|
|
45315
|
-
reason: "PERMISSION_DENIED"
|
|
45316
|
-
}, AVAILABILITY_NOT_FOUND = {
|
|
45317
|
-
available: !1,
|
|
45318
|
-
reason: "NOT_FOUND"
|
|
45319
|
-
}, AVAILABILITY_VERSION_DELETED = {
|
|
45320
|
-
available: !1,
|
|
45321
|
-
reason: "VERSION_DELETED"
|
|
45322
|
-
}, INVALID_PREVIEW_FALLBACK = {
|
|
45323
|
-
title: "Invalid preview config",
|
|
45324
|
-
subtitle: "Check the error log in the console",
|
|
45325
|
-
media: /* @__PURE__ */ jsx(WarningOutlineIcon, {})
|
|
45326
|
-
}, DOCUMENT_SYSTEM_FIELD = "_system";
|
|
45517
|
+
const MAX_DOCUMENT_ID_CHUNK_SIZE = 11164;
|
|
45327
45518
|
function debounceCollect(fn, wait) {
|
|
45328
45519
|
let timer2, queue = {}, idx = 0;
|
|
45329
45520
|
return function(...args) {
|
|
@@ -45374,7 +45565,7 @@ function debounceCollect(fn, wait) {
|
|
|
45374
45565
|
});
|
|
45375
45566
|
}
|
|
45376
45567
|
}
|
|
45377
|
-
const swr
|
|
45568
|
+
const swr = createSWR({
|
|
45378
45569
|
maxSize: 1e3
|
|
45379
45570
|
});
|
|
45380
45571
|
function chunkDocumentIds(documentIds) {
|
|
@@ -45407,11 +45598,11 @@ function createDocumentAvailabilityObserver(versionedClient2, observePaths2) {
|
|
|
45407
45598
|
return ids.map((id2) => {
|
|
45408
45599
|
const omittedEntry = omitted[id2];
|
|
45409
45600
|
if (!omittedEntry)
|
|
45410
|
-
return AVAILABILITY_READABLE;
|
|
45601
|
+
return AVAILABILITY_READABLE$2;
|
|
45411
45602
|
if (omittedEntry.reason === "existence")
|
|
45412
|
-
return AVAILABILITY_NOT_FOUND;
|
|
45603
|
+
return AVAILABILITY_NOT_FOUND$2;
|
|
45413
45604
|
if (omittedEntry.reason === "permission")
|
|
45414
|
-
return AVAILABILITY_PERMISSION_DENIED;
|
|
45605
|
+
return AVAILABILITY_PERMISSION_DENIED$2;
|
|
45415
45606
|
throw new Error(`Unexpected reason for omission: "${omittedEntry.reason}"`);
|
|
45416
45607
|
});
|
|
45417
45608
|
}));
|
|
@@ -45428,11 +45619,11 @@ function createDocumentAvailabilityObserver(versionedClient2, observePaths2) {
|
|
|
45428
45619
|
isDeleted
|
|
45429
45620
|
}) => isDeleted ? of(AVAILABILITY_VERSION_DELETED) : hasRev ? (
|
|
45430
45621
|
// short circuit: if we can read the _rev field we know it both exists and is readable
|
|
45431
|
-
of(AVAILABILITY_READABLE)
|
|
45622
|
+
of(AVAILABILITY_READABLE$2)
|
|
45432
45623
|
) : (
|
|
45433
45624
|
// we can't read the _rev field for two possible reasons: 1) the document isn't readable or 2) the document doesn't exist
|
|
45434
45625
|
fetchDocumentReadability(id2)
|
|
45435
|
-
)), swr
|
|
45626
|
+
)), swr(id2), map((ev) => ev.value));
|
|
45436
45627
|
};
|
|
45437
45628
|
}
|
|
45438
45629
|
function ensurePublished(stack) {
|
|
@@ -46188,9 +46379,9 @@ const INITIAL_STATE$7 = {
|
|
|
46188
46379
|
function useUnstableObserveDocument(documentId, apiConfig) {
|
|
46189
46380
|
const $ = c(4), documentPreviewStore = useDocumentPreviewStore();
|
|
46190
46381
|
let t0;
|
|
46191
|
-
return $[0] !== apiConfig || $[1] !== documentId || $[2] !== documentPreviewStore ? (t0 = documentPreviewStore.unstable_observeDocument(documentId, apiConfig).pipe(map(_temp$
|
|
46382
|
+
return $[0] !== apiConfig || $[1] !== documentId || $[2] !== documentPreviewStore ? (t0 = documentPreviewStore.unstable_observeDocument(documentId, apiConfig).pipe(map(_temp$1X)), $[0] = apiConfig, $[1] = documentId, $[2] = documentPreviewStore, $[3] = t0) : t0 = $[3], useObservable(t0, INITIAL_STATE$7);
|
|
46192
46383
|
}
|
|
46193
|
-
function _temp$
|
|
46384
|
+
function _temp$1X(document2) {
|
|
46194
46385
|
return {
|
|
46195
46386
|
loading: !1,
|
|
46196
46387
|
document: document2
|
|
@@ -46236,69 +46427,8 @@ function getPreviewValueWithFallback({
|
|
|
46236
46427
|
}) {
|
|
46237
46428
|
return snapshot2 || original || getMissingDocumentFallback(fallback2 || EMPTY$1);
|
|
46238
46429
|
}
|
|
46239
|
-
function useReleasesIds(releases2) {
|
|
46240
|
-
const $ = c(4);
|
|
46241
|
-
let t0;
|
|
46242
|
-
$[0] !== releases2 ? (t0 = releases2.map(_temp$1X), $[0] = releases2, $[1] = t0) : t0 = $[1];
|
|
46243
|
-
const releasesIds = t0;
|
|
46244
|
-
let t1;
|
|
46245
|
-
return $[2] !== releasesIds ? (t1 = {
|
|
46246
|
-
releasesIds
|
|
46247
|
-
}, $[2] = releasesIds, $[3] = t1) : t1 = $[3], t1;
|
|
46248
|
-
}
|
|
46249
|
-
function _temp$1X(release) {
|
|
46250
|
-
return getReleaseIdFromReleaseDocumentId(release._id);
|
|
46251
|
-
}
|
|
46252
|
-
function exists(value) {
|
|
46253
|
-
return value?._rev;
|
|
46254
|
-
}
|
|
46255
|
-
const DOCUMENT_STUB_PATHS$1 = ["_id", "_type", "_rev", "_createdAt", "_updatedAt", "_system"], NO_VERSIONS = {};
|
|
46256
|
-
function useDocumentVersionInfo(documentId) {
|
|
46257
|
-
const $ = c(13), documentPreviewStore = useDocumentPreviewStore(), releaseIds = useReleasesIds(useActiveReleases().data).releasesIds;
|
|
46258
|
-
let t0;
|
|
46259
|
-
$[0] !== documentId ? (t0 = getDraftId(documentId), $[0] = documentId, $[1] = t0) : t0 = $[1];
|
|
46260
|
-
let t1;
|
|
46261
|
-
$[2] !== documentId ? (t1 = getPublishedId(documentId), $[2] = documentId, $[3] = t1) : t1 = $[3];
|
|
46262
|
-
let t2;
|
|
46263
|
-
$[4] !== t0 || $[5] !== t1 ? (t2 = [t0, t1], $[4] = t0, $[5] = t1, $[6] = t2) : t2 = $[6];
|
|
46264
|
-
const [draftId, publishedId] = t2;
|
|
46265
|
-
let t3;
|
|
46266
|
-
if ($[7] !== documentPreviewStore || $[8] !== draftId || $[9] !== publishedId || $[10] !== releaseIds) {
|
|
46267
|
-
const releaseVersions = releaseIds.length > 0 ? combineLatest(Object.fromEntries(releaseIds.map((releaseId) => [releaseId, documentPreviewStore.observePaths({
|
|
46268
|
-
_id: getVersionId(publishedId, releaseId)
|
|
46269
|
-
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp$1W))]))) : of(NO_VERSIONS);
|
|
46270
|
-
t3 = combineLatest({
|
|
46271
|
-
isLoading: of(!1),
|
|
46272
|
-
draft: documentPreviewStore.observePaths({
|
|
46273
|
-
_id: draftId
|
|
46274
|
-
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp2$M)),
|
|
46275
|
-
published: documentPreviewStore.observePaths({
|
|
46276
|
-
_id: publishedId
|
|
46277
|
-
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp3$n)),
|
|
46278
|
-
versions: releaseVersions
|
|
46279
|
-
}), $[7] = documentPreviewStore, $[8] = draftId, $[9] = publishedId, $[10] = releaseIds, $[11] = t3;
|
|
46280
|
-
} else
|
|
46281
|
-
t3 = $[11];
|
|
46282
|
-
const observable = t3;
|
|
46283
|
-
let t4;
|
|
46284
|
-
return $[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = {
|
|
46285
|
-
isLoading: !0,
|
|
46286
|
-
versions: NO_VERSIONS,
|
|
46287
|
-
draft: void 0,
|
|
46288
|
-
published: void 0
|
|
46289
|
-
}, $[12] = t4) : t4 = $[12], useObservable(observable, t4);
|
|
46290
|
-
}
|
|
46291
|
-
function _temp3$n(value_1) {
|
|
46292
|
-
return exists(value_1) ? value_1 : void 0;
|
|
46293
|
-
}
|
|
46294
|
-
function _temp2$M(value_0) {
|
|
46295
|
-
return exists(value_0) ? value_0 : void 0;
|
|
46296
|
-
}
|
|
46297
|
-
function _temp$1W(value) {
|
|
46298
|
-
return exists(value) ? value : void 0;
|
|
46299
|
-
}
|
|
46300
46430
|
function useCopyToDrafts(options) {
|
|
46301
|
-
const $ = c(
|
|
46431
|
+
const $ = c(20), {
|
|
46302
46432
|
documentId,
|
|
46303
46433
|
fromRelease,
|
|
46304
46434
|
onNavigate
|
|
@@ -46310,9 +46440,19 @@ function useCopyToDrafts(options) {
|
|
|
46310
46440
|
const publishedId = t0;
|
|
46311
46441
|
let t1;
|
|
46312
46442
|
$[2] !== documentId || $[3] !== fromRelease ? (t1 = fromRelease === "published" ? documentId : getVersionId(documentId, fromRelease), $[2] = documentId, $[3] = fromRelease, $[4] = t1) : t1 = $[4];
|
|
46313
|
-
const sourceDocumentId = t1
|
|
46443
|
+
const sourceDocumentId = t1;
|
|
46314
46444
|
let t2;
|
|
46315
|
-
$[5] !==
|
|
46445
|
+
$[5] !== publishedId ? (t2 = {
|
|
46446
|
+
documentId: publishedId
|
|
46447
|
+
}, $[5] = publishedId, $[6] = t2) : t2 = $[6];
|
|
46448
|
+
const {
|
|
46449
|
+
versions
|
|
46450
|
+
} = useDocumentVersions(t2);
|
|
46451
|
+
let t3;
|
|
46452
|
+
$[7] !== versions ? (t3 = getDocumentVersionInfoFromVersions(versions), $[7] = versions, $[8] = t3) : t3 = $[8];
|
|
46453
|
+
const hasDraftVersion = !!t3.draft;
|
|
46454
|
+
let t4;
|
|
46455
|
+
$[9] !== client || $[10] !== hasDraftVersion || $[11] !== onNavigate || $[12] !== publishedId || $[13] !== sourceDocumentId || $[14] !== t || $[15] !== toast ? (t4 = async () => {
|
|
46316
46456
|
const run = async () => {
|
|
46317
46457
|
const sourceDoc = await client.getDocument(sourceDocumentId);
|
|
46318
46458
|
if (!sourceDoc)
|
|
@@ -46327,8 +46467,8 @@ function useCopyToDrafts(options) {
|
|
|
46327
46467
|
};
|
|
46328
46468
|
try {
|
|
46329
46469
|
await run();
|
|
46330
|
-
} catch (
|
|
46331
|
-
const err =
|
|
46470
|
+
} catch (t52) {
|
|
46471
|
+
const err = t52;
|
|
46332
46472
|
toast.push({
|
|
46333
46473
|
closable: !0,
|
|
46334
46474
|
status: "error",
|
|
@@ -46336,139 +46476,13 @@ function useCopyToDrafts(options) {
|
|
|
46336
46476
|
description: err.message
|
|
46337
46477
|
});
|
|
46338
46478
|
}
|
|
46339
|
-
}, $[
|
|
46340
|
-
const handleCopyToDrafts =
|
|
46341
|
-
let
|
|
46342
|
-
return $[
|
|
46479
|
+
}, $[9] = client, $[10] = hasDraftVersion, $[11] = onNavigate, $[12] = publishedId, $[13] = sourceDocumentId, $[14] = t, $[15] = toast, $[16] = t4) : t4 = $[16];
|
|
46480
|
+
const handleCopyToDrafts = t4;
|
|
46481
|
+
let t5;
|
|
46482
|
+
return $[17] !== handleCopyToDrafts || $[18] !== hasDraftVersion ? (t5 = {
|
|
46343
46483
|
handleCopyToDrafts,
|
|
46344
46484
|
hasDraftVersion
|
|
46345
|
-
}, $[
|
|
46346
|
-
}
|
|
46347
|
-
function useDataset() {
|
|
46348
|
-
return useSource().dataset;
|
|
46349
|
-
}
|
|
46350
|
-
function useProjectId() {
|
|
46351
|
-
return useSource().projectId;
|
|
46352
|
-
}
|
|
46353
|
-
const INITIAL_VALUE$1 = {
|
|
46354
|
-
data: [],
|
|
46355
|
-
versions: [],
|
|
46356
|
-
error: null,
|
|
46357
|
-
loading: !0
|
|
46358
|
-
}, observableCache = /* @__PURE__ */ new Map(), swr = createSWR({
|
|
46359
|
-
maxSize: 100
|
|
46360
|
-
});
|
|
46361
|
-
function useDocumentVersions(props2) {
|
|
46362
|
-
const observable = useDocumentVersionsObservable(props2);
|
|
46363
|
-
return useObservable(observable, INITIAL_VALUE$1);
|
|
46364
|
-
}
|
|
46365
|
-
function useDocumentVersionsObservable(props2) {
|
|
46366
|
-
const $ = c(10), {
|
|
46367
|
-
documentId
|
|
46368
|
-
} = props2;
|
|
46369
|
-
let t0;
|
|
46370
|
-
$[0] !== documentId ? (t0 = getPublishedId(documentId), $[0] = documentId, $[1] = t0) : t0 = $[1];
|
|
46371
|
-
const publishedId = t0, dataset = useDataset(), projectId = useProjectId(), documentPreviewStore = useDocumentPreviewStore(), {
|
|
46372
|
-
data: releases2
|
|
46373
|
-
} = useActiveReleases();
|
|
46374
|
-
let t1;
|
|
46375
|
-
if ($[2] !== dataset || $[3] !== documentPreviewStore || $[4] !== projectId || $[5] !== publishedId || $[6] !== releases2) {
|
|
46376
|
-
let t2;
|
|
46377
|
-
$[8] !== releases2 ? (t2 = (result) => ({
|
|
46378
|
-
...result,
|
|
46379
|
-
versions: result.versions.map((version2) => ({
|
|
46380
|
-
...version2,
|
|
46381
|
-
[DOCUMENT_SYSTEM_FIELD]: version2._system?.group ? version2._system : {
|
|
46382
|
-
...version2._system,
|
|
46383
|
-
...temporarilyBuildDocumentSystem(version2._id, releases2)
|
|
46384
|
-
}
|
|
46385
|
-
}))
|
|
46386
|
-
}), $[8] = releases2, $[9] = t2) : t2 = $[9], t1 = getOrCreateDocumentVersionsObservable({
|
|
46387
|
-
documentPreviewStore,
|
|
46388
|
-
publishedId,
|
|
46389
|
-
projectId,
|
|
46390
|
-
dataset
|
|
46391
|
-
}).pipe(map$1(t2)), $[2] = dataset, $[3] = documentPreviewStore, $[4] = projectId, $[5] = publishedId, $[6] = releases2, $[7] = t1;
|
|
46392
|
-
} else
|
|
46393
|
-
t1 = $[7];
|
|
46394
|
-
return t1;
|
|
46395
|
-
}
|
|
46396
|
-
const temporarilyBuildDocumentSystem = (id2, releases2) => {
|
|
46397
|
-
const versionId = getVersionFromId(id2);
|
|
46398
|
-
if (versionId) {
|
|
46399
|
-
const releaseDocument = releases2.find((release) => getReleaseIdFromReleaseDocumentId(release._id) === versionId);
|
|
46400
|
-
return {
|
|
46401
|
-
bundleId: versionId,
|
|
46402
|
-
release: releaseDocument ? {
|
|
46403
|
-
_ref: releaseDocument._id,
|
|
46404
|
-
_weak: !0
|
|
46405
|
-
} : void 0,
|
|
46406
|
-
group: {
|
|
46407
|
-
_ref: getPublishedId(id2),
|
|
46408
|
-
_weak: !0
|
|
46409
|
-
},
|
|
46410
|
-
scopeId: versionId
|
|
46411
|
-
};
|
|
46412
|
-
}
|
|
46413
|
-
return {
|
|
46414
|
-
bundleId: isDraftId(id2) ? "drafts" : void 0,
|
|
46415
|
-
group: {
|
|
46416
|
-
_ref: getPublishedId(id2),
|
|
46417
|
-
_weak: !0
|
|
46418
|
-
}
|
|
46419
|
-
};
|
|
46420
|
-
}, DOCUMENT_STUB_PATHS = ["_id", "_type", "_rev", "_createdAt", "_updatedAt", "_system"];
|
|
46421
|
-
function getOrCreateDocumentVersionsObservable(options) {
|
|
46422
|
-
const {
|
|
46423
|
-
documentPreviewStore,
|
|
46424
|
-
projectId,
|
|
46425
|
-
dataset,
|
|
46426
|
-
publishedId
|
|
46427
|
-
} = options, cacheKey2 = `${projectId}-${dataset}-${publishedId}`, cachedObservable = observableCache.get(cacheKey2);
|
|
46428
|
-
if (cachedObservable)
|
|
46429
|
-
return cachedObservable;
|
|
46430
|
-
const newObservable = documentPreviewStore.unstable_observeVersionDocumentIds(publishedId).pipe(swr(cacheKey2), map$1(({
|
|
46431
|
-
value
|
|
46432
|
-
}) => value), switchMap$1((documentIds) => {
|
|
46433
|
-
if (documentIds.length === 0)
|
|
46434
|
-
return of({
|
|
46435
|
-
data: [],
|
|
46436
|
-
versions: [],
|
|
46437
|
-
error: null,
|
|
46438
|
-
loading: !1
|
|
46439
|
-
});
|
|
46440
|
-
const loadingState = {
|
|
46441
|
-
data: documentIds,
|
|
46442
|
-
versions: [],
|
|
46443
|
-
error: null,
|
|
46444
|
-
loading: !0
|
|
46445
|
-
};
|
|
46446
|
-
return combineLatest(documentIds.map((id2) => documentPreviewStore.observePaths({
|
|
46447
|
-
_id: id2
|
|
46448
|
-
}, DOCUMENT_STUB_PATHS).pipe(map$1((versionInfo) => isRecord$4(versionInfo) ? versionInfo : void 0), map$1((versionInfo) => ({
|
|
46449
|
-
_id: id2,
|
|
46450
|
-
_rev: versionInfo?._rev ?? "",
|
|
46451
|
-
_createdAt: versionInfo?._createdAt ?? "",
|
|
46452
|
-
_updatedAt: versionInfo?._updatedAt ?? "",
|
|
46453
|
-
[DOCUMENT_SYSTEM_FIELD]: versionInfo?.[DOCUMENT_SYSTEM_FIELD]
|
|
46454
|
-
}))))).pipe(map$1((versions) => ({
|
|
46455
|
-
data: documentIds,
|
|
46456
|
-
versions,
|
|
46457
|
-
error: null,
|
|
46458
|
-
loading: !1
|
|
46459
|
-
})), startWith$1(loadingState));
|
|
46460
|
-
}), catchError$1((error) => of({
|
|
46461
|
-
error,
|
|
46462
|
-
data: [],
|
|
46463
|
-
versions: [],
|
|
46464
|
-
loading: !1
|
|
46465
|
-
})), finalize(() => {
|
|
46466
|
-
observableCache.delete(cacheKey2);
|
|
46467
|
-
}), shareReplay$1({
|
|
46468
|
-
refCount: !0,
|
|
46469
|
-
bufferSize: 1
|
|
46470
|
-
}));
|
|
46471
|
-
return observableCache.set(cacheKey2, newObservable), newObservable;
|
|
46485
|
+
}, $[17] = handleCopyToDrafts, $[18] = hasDraftVersion, $[19] = t5) : t5 = $[19], t5;
|
|
46472
46486
|
}
|
|
46473
46487
|
const orderedReleaseTypes$1 = ["asap", "scheduled", "undecided"], useDocumentVersionTypeSortedList = (t0) => {
|
|
46474
46488
|
const $ = c(9), {
|
|
@@ -46491,7 +46505,7 @@ const orderedReleaseTypes$1 = ["asap", "scheduled", "undecided"], useDocumentVer
|
|
|
46491
46505
|
_id
|
|
46492
46506
|
} = t4;
|
|
46493
46507
|
return documentVersions.some((id2) => getVersionFromId(id2) === getReleaseIdFromReleaseDocumentId(_id));
|
|
46494
|
-
}, $[5] = documentVersions, $[6] = t32) : t32 = $[6], t2 = releases2.filter(t32).sort(_temp$
|
|
46508
|
+
}, $[5] = documentVersions, $[6] = t32) : t32 = $[6], t2 = releases2.filter(t32).sort(_temp$1W), $[2] = documentVersions, $[3] = releases2, $[4] = t2;
|
|
46495
46509
|
} else
|
|
46496
46510
|
t2 = $[4];
|
|
46497
46511
|
const sortedDocumentList = t2;
|
|
@@ -46500,7 +46514,7 @@ const orderedReleaseTypes$1 = ["asap", "scheduled", "undecided"], useDocumentVer
|
|
|
46500
46514
|
sortedDocumentList
|
|
46501
46515
|
}, $[7] = sortedDocumentList, $[8] = t3) : t3 = $[8], t3;
|
|
46502
46516
|
};
|
|
46503
|
-
function _temp$
|
|
46517
|
+
function _temp$1W(releasesList, compareReleasesList) {
|
|
46504
46518
|
if (releasesList.metadata.releaseType === "scheduled" && compareReleasesList.metadata.releaseType === "scheduled") {
|
|
46505
46519
|
const aPublishAt = releasesList.publishAt || releasesList.metadata.intendedPublishAt;
|
|
46506
46520
|
if (!aPublishAt)
|
|
@@ -46542,9 +46556,9 @@ const useIsReleaseActive = () => {
|
|
|
46542
46556
|
data: documentVersions
|
|
46543
46557
|
} = useDocumentVersions(t1);
|
|
46544
46558
|
let t2;
|
|
46545
|
-
return $[2] !== documentVersions ? (t2 = documentVersions && documentVersions.length > 0 && !documentVersions.some(_temp$
|
|
46559
|
+
return $[2] !== documentVersions ? (t2 = documentVersions && documentVersions.length > 0 && !documentVersions.some(_temp$1V), $[2] = documentVersions, $[3] = t2) : t2 = $[3], t2;
|
|
46546
46560
|
};
|
|
46547
|
-
function _temp$
|
|
46561
|
+
function _temp$1V(version2) {
|
|
46548
46562
|
return !isVersionId(version2);
|
|
46549
46563
|
}
|
|
46550
46564
|
function useGetDefaultPerspective() {
|
|
@@ -46845,7 +46859,7 @@ function DiscardVersionDialog(props2) {
|
|
|
46845
46859
|
}
|
|
46846
46860
|
const RELEASE_FORM_STORAGE_KEY = "studio.release-form.recovery";
|
|
46847
46861
|
function useReleaseFormStorage() {
|
|
46848
|
-
const $ = c(1), getStoredReleaseData = _temp$
|
|
46862
|
+
const $ = c(1), getStoredReleaseData = _temp$1U, saveReleaseDataToStorage = _temp2$L, clearReleaseDataFromStorage = _temp3$m;
|
|
46849
46863
|
let t0;
|
|
46850
46864
|
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
46851
46865
|
getStoredReleaseData,
|
|
@@ -46859,7 +46873,7 @@ function _temp3$m() {
|
|
|
46859
46873
|
function _temp2$L(data) {
|
|
46860
46874
|
localStorage.setItem(RELEASE_FORM_STORAGE_KEY, JSON.stringify(data));
|
|
46861
46875
|
}
|
|
46862
|
-
function _temp$
|
|
46876
|
+
function _temp$1U() {
|
|
46863
46877
|
const stored = localStorage.getItem(RELEASE_FORM_STORAGE_KEY);
|
|
46864
46878
|
return stored ? JSON.parse(stored) : void 0;
|
|
46865
46879
|
}
|
|
@@ -47121,7 +47135,7 @@ function TitleDescriptionForm(t0) {
|
|
|
47121
47135
|
$[2] !== release ? (t2 = {
|
|
47122
47136
|
externalValue: release,
|
|
47123
47137
|
id: release._id,
|
|
47124
|
-
extractData: _temp$
|
|
47138
|
+
extractData: _temp$1T
|
|
47125
47139
|
}, $[2] = release, $[3] = t2) : t2 = $[3];
|
|
47126
47140
|
const {
|
|
47127
47141
|
localData,
|
|
@@ -47192,7 +47206,7 @@ function TitleDescriptionForm(t0) {
|
|
|
47192
47206
|
t14
|
|
47193
47207
|
] }), $[42] = t13, $[43] = t14, $[44] = t15) : t15 = $[44], t15;
|
|
47194
47208
|
}
|
|
47195
|
-
function _temp$
|
|
47209
|
+
function _temp$1T(t0) {
|
|
47196
47210
|
const {
|
|
47197
47211
|
metadata
|
|
47198
47212
|
} = t0;
|
|
@@ -47465,7 +47479,7 @@ function InsufficientPermissionsMessage(t0) {
|
|
|
47465
47479
|
}, $[0] = t1) : t1 = $[0];
|
|
47466
47480
|
const list = useListFormat(t1), roles = currentUser?.roles || EMPTY_ARRAY$g;
|
|
47467
47481
|
let t2;
|
|
47468
|
-
$[1] !== list || $[2] !== roles ? (t2 = () => /* @__PURE__ */ jsx(Fragment$1, { children: list.formatToParts(roles.map(_temp$
|
|
47482
|
+
$[1] !== list || $[2] !== roles ? (t2 = () => /* @__PURE__ */ jsx(Fragment$1, { children: list.formatToParts(roles.map(_temp$1S)).map(_temp2$K) }), $[1] = list, $[2] = roles, $[3] = t2) : t2 = $[3];
|
|
47469
47483
|
const Roles = t2;
|
|
47470
47484
|
let t3;
|
|
47471
47485
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsx(Text$1, { size: 0, children: /* @__PURE__ */ jsx(AccessDeniedIcon, {}) }), $[4] = t3) : t3 = $[4];
|
|
@@ -47494,7 +47508,7 @@ function InsufficientPermissionsMessage(t0) {
|
|
|
47494
47508
|
function _temp2$K(i, index) {
|
|
47495
47509
|
return i.type === "element" ? /* @__PURE__ */ jsx("code", { children: i.value }, `${i.value}-${index}`) : /* @__PURE__ */ jsx(Fragment, { children: i.value }, `${i.value}-${index}`);
|
|
47496
47510
|
}
|
|
47497
|
-
function _temp$
|
|
47511
|
+
function _temp$1S(role) {
|
|
47498
47512
|
return role.title || startCase(role.name);
|
|
47499
47513
|
}
|
|
47500
47514
|
const useDiscardVersionAction = (props2) => {
|
|
@@ -47587,7 +47601,7 @@ function useArchivedReleases() {
|
|
|
47587
47601
|
loading
|
|
47588
47602
|
} = useAllReleases();
|
|
47589
47603
|
let t0;
|
|
47590
|
-
$[0] !== releases2 ? (t0 = Array.from(releases2.values()).filter(_temp$
|
|
47604
|
+
$[0] !== releases2 ? (t0 = Array.from(releases2.values()).filter(_temp$1R), $[0] = releases2, $[1] = t0) : t0 = $[1];
|
|
47591
47605
|
const archivedReleases = t0;
|
|
47592
47606
|
let t1;
|
|
47593
47607
|
return $[2] !== archivedReleases || $[3] !== error || $[4] !== loading ? (t1 = {
|
|
@@ -47596,7 +47610,7 @@ function useArchivedReleases() {
|
|
|
47596
47610
|
loading
|
|
47597
47611
|
}, $[2] = archivedReleases, $[3] = error, $[4] = loading, $[5] = t1) : t1 = $[5], t1;
|
|
47598
47612
|
}
|
|
47599
|
-
function _temp$
|
|
47613
|
+
function _temp$1R(release) {
|
|
47600
47614
|
return ARCHIVED_RELEASE_STATES.includes(release.state);
|
|
47601
47615
|
}
|
|
47602
47616
|
function UnpublishVersionDialog(props2) {
|
|
@@ -47816,19 +47830,70 @@ const RELEASES_NAME = "sanity/releases", RELEASES_INTENT = "release", releases =
|
|
|
47816
47830
|
locale: "en-US",
|
|
47817
47831
|
namespace: singleDocReleaseNamespace,
|
|
47818
47832
|
resources: () => import("./resources6.js")
|
|
47833
|
+
}, publishedArchivedReleaseDocumentsCache = /* @__PURE__ */ Object.create(null), buildPublishedArchivedReleaseDocumentsObservable = ({
|
|
47834
|
+
getClient: getClient2,
|
|
47835
|
+
release
|
|
47836
|
+
}) => {
|
|
47837
|
+
const client = getClient2(RELEASES_STUDIO_CLIENT_OPTIONS), observableClient = client.observable, dataset = client.config().dataset;
|
|
47838
|
+
if (!release.finalDocumentStates?.length) return of({
|
|
47839
|
+
loading: !1,
|
|
47840
|
+
results: [],
|
|
47841
|
+
error: null
|
|
47842
|
+
});
|
|
47843
|
+
function batchRequestDocumentFromHistory(startIndex) {
|
|
47844
|
+
const finalIndex = startIndex + 10;
|
|
47845
|
+
return observableClient.request({
|
|
47846
|
+
url: `/data/history/${dataset}/documents/${release.finalDocumentStates?.slice(startIndex, finalIndex).map((d) => d.id).join(",")}?lastRevision=true`
|
|
47847
|
+
}).pipe(map(({
|
|
47848
|
+
documents
|
|
47849
|
+
}) => ({
|
|
47850
|
+
documents,
|
|
47851
|
+
finalIndex
|
|
47852
|
+
})));
|
|
47853
|
+
}
|
|
47854
|
+
return batchRequestDocumentFromHistory(0).pipe(expand((response) => release.finalDocumentStates && response.finalIndex < release.finalDocumentStates.length ? batchRequestDocumentFromHistory(response.finalIndex) : of()), reduce$2((documents, batch) => documents.concat(batch.documents), [])).pipe(map((documents) => ({
|
|
47855
|
+
loading: !1,
|
|
47856
|
+
results: documents.map((document2) => ({
|
|
47857
|
+
document: document2,
|
|
47858
|
+
memoKey: uuid(),
|
|
47859
|
+
validation: {
|
|
47860
|
+
validation: [],
|
|
47861
|
+
hasError: !1,
|
|
47862
|
+
isValidating: !1
|
|
47863
|
+
}
|
|
47864
|
+
})),
|
|
47865
|
+
error: null
|
|
47866
|
+
})), catchError((error) => of({
|
|
47867
|
+
loading: !1,
|
|
47868
|
+
results: [],
|
|
47869
|
+
error
|
|
47870
|
+
})));
|
|
47871
|
+
}, getPublishedArchivedReleaseDocumentsObservable = ({
|
|
47872
|
+
getClient: getClient2,
|
|
47873
|
+
release
|
|
47874
|
+
}) => {
|
|
47875
|
+
const cacheKey2 = `${getReleaseIdFromReleaseDocumentId(release._id)}-archived`;
|
|
47876
|
+
return publishedArchivedReleaseDocumentsCache[cacheKey2] || (publishedArchivedReleaseDocumentsCache[cacheKey2] = buildPublishedArchivedReleaseDocumentsObservable({
|
|
47877
|
+
getClient: getClient2,
|
|
47878
|
+
release
|
|
47879
|
+
}).pipe(finalize$1(() => {
|
|
47880
|
+
delete publishedArchivedReleaseDocumentsCache[cacheKey2];
|
|
47881
|
+
}), shareReplay(1))), publishedArchivedReleaseDocumentsCache[cacheKey2];
|
|
47819
47882
|
};
|
|
47820
47883
|
function schedulerYield(promise) {
|
|
47821
47884
|
return "scheduler" in window && typeof window.scheduler?.yield == "function" ? window.scheduler.yield() : promise();
|
|
47822
47885
|
}
|
|
47823
|
-
const bundleDocumentsCache = /* @__PURE__ */ Object.create(null),
|
|
47886
|
+
const bundleDocumentsCache = /* @__PURE__ */ Object.create(null), buildBundleDocumentsObservable = ({
|
|
47824
47887
|
schema: schema2,
|
|
47825
47888
|
documentPreviewStore,
|
|
47826
47889
|
i18n,
|
|
47827
47890
|
getClient: getClient2,
|
|
47828
|
-
|
|
47829
|
-
|
|
47891
|
+
currentUser,
|
|
47892
|
+
groqFilter,
|
|
47893
|
+
params,
|
|
47894
|
+
skipValidation
|
|
47830
47895
|
}) => {
|
|
47831
|
-
const
|
|
47896
|
+
const createValidationObservable = (ctx, document2) => skipValidation?.(document2) ? of({
|
|
47832
47897
|
isValidating: !1,
|
|
47833
47898
|
validation: [],
|
|
47834
47899
|
revision: document2._rev,
|
|
@@ -47858,9 +47923,7 @@ const bundleDocumentsCache = /* @__PURE__ */ Object.create(null), getActiveRelea
|
|
|
47858
47923
|
const batchDelay = groupIndex === 0 ? 0 : 100;
|
|
47859
47924
|
return of(documentIdsGroup).pipe(delay(batchDelay), mergeMapArray((id2) => processDocument(id2)));
|
|
47860
47925
|
};
|
|
47861
|
-
return documentPreviewStore.unstable_observeDocumentIdSet(groqFilter, {
|
|
47862
|
-
releaseId
|
|
47863
|
-
}, {
|
|
47926
|
+
return documentPreviewStore.unstable_observeDocumentIdSet(groqFilter, params, {
|
|
47864
47927
|
apiVersion: RELEASES_STUDIO_CLIENT_OPTIONS.apiVersion
|
|
47865
47928
|
}).pipe(map((state) => state.documentIds || []), switchMap((documentIds) => {
|
|
47866
47929
|
if (documentIds.length === 0)
|
|
@@ -47889,45 +47952,41 @@ const bundleDocumentsCache = /* @__PURE__ */ Object.create(null), getActiveRelea
|
|
|
47889
47952
|
results: [],
|
|
47890
47953
|
error
|
|
47891
47954
|
})));
|
|
47892
|
-
},
|
|
47893
|
-
|
|
47894
|
-
|
|
47895
|
-
}) => {
|
|
47896
|
-
|
|
47897
|
-
|
|
47898
|
-
|
|
47899
|
-
|
|
47900
|
-
|
|
47901
|
-
|
|
47902
|
-
|
|
47903
|
-
|
|
47904
|
-
|
|
47905
|
-
|
|
47906
|
-
|
|
47907
|
-
|
|
47908
|
-
|
|
47909
|
-
|
|
47910
|
-
|
|
47911
|
-
|
|
47912
|
-
}
|
|
47913
|
-
|
|
47914
|
-
|
|
47915
|
-
|
|
47916
|
-
|
|
47917
|
-
|
|
47918
|
-
|
|
47919
|
-
|
|
47920
|
-
|
|
47921
|
-
|
|
47922
|
-
|
|
47923
|
-
|
|
47924
|
-
|
|
47925
|
-
|
|
47926
|
-
|
|
47927
|
-
results: [],
|
|
47928
|
-
error
|
|
47929
|
-
})));
|
|
47930
|
-
}, getReleaseDocumentsObservable = ({
|
|
47955
|
+
}, getBundleDocumentsObservable = ({
|
|
47956
|
+
cacheKey: cacheKey2,
|
|
47957
|
+
...options
|
|
47958
|
+
}) => (bundleDocumentsCache[cacheKey2] || (bundleDocumentsCache[cacheKey2] = buildBundleDocumentsObservable(options).pipe(finalize$1(() => {
|
|
47959
|
+
delete bundleDocumentsCache[cacheKey2];
|
|
47960
|
+
}), shareReplay(1))), bundleDocumentsCache[cacheKey2]), BUNDLE_DOCUMENTS_INITIAL_STATE = {
|
|
47961
|
+
loading: !0,
|
|
47962
|
+
results: [],
|
|
47963
|
+
error: null
|
|
47964
|
+
};
|
|
47965
|
+
function useBundleDocuments(options) {
|
|
47966
|
+
const $ = c(10), {
|
|
47967
|
+
groqFilter,
|
|
47968
|
+
params,
|
|
47969
|
+
cacheKey: cacheKey2,
|
|
47970
|
+
skipValidation
|
|
47971
|
+
} = options, documentPreviewStore = useDocumentPreviewStore(), {
|
|
47972
|
+
getClient: getClient2,
|
|
47973
|
+
i18n,
|
|
47974
|
+
currentUser
|
|
47975
|
+
} = useSource(), schema2 = useSchema();
|
|
47976
|
+
let t0;
|
|
47977
|
+
return $[0] !== cacheKey2 || $[1] !== currentUser || $[2] !== documentPreviewStore || $[3] !== getClient2 || $[4] !== groqFilter || $[5] !== i18n || $[6] !== params || $[7] !== schema2 || $[8] !== skipValidation ? (t0 = getBundleDocumentsObservable({
|
|
47978
|
+
schema: schema2,
|
|
47979
|
+
documentPreviewStore,
|
|
47980
|
+
getClient: getClient2,
|
|
47981
|
+
i18n,
|
|
47982
|
+
currentUser,
|
|
47983
|
+
groqFilter,
|
|
47984
|
+
params,
|
|
47985
|
+
cacheKey: cacheKey2,
|
|
47986
|
+
skipValidation
|
|
47987
|
+
}), $[0] = cacheKey2, $[1] = currentUser, $[2] = documentPreviewStore, $[3] = getClient2, $[4] = groqFilter, $[5] = i18n, $[6] = params, $[7] = schema2, $[8] = skipValidation, $[9] = t0) : t0 = $[9], useObservable(t0, BUNDLE_DOCUMENTS_INITIAL_STATE);
|
|
47988
|
+
}
|
|
47989
|
+
const getReleaseDocumentsObservable = ({
|
|
47931
47990
|
schema: schema2,
|
|
47932
47991
|
documentPreviewStore,
|
|
47933
47992
|
getClient: getClient2,
|
|
@@ -47935,30 +47994,31 @@ const bundleDocumentsCache = /* @__PURE__ */ Object.create(null), getActiveRelea
|
|
|
47935
47994
|
i18n,
|
|
47936
47995
|
releasesState$,
|
|
47937
47996
|
currentUser
|
|
47938
|
-
}) =>
|
|
47997
|
+
}) => releasesState$.pipe(
|
|
47939
47998
|
map((releasesState) => releasesState.releases.get(getReleaseDocumentIdFromReleaseId(releaseId))),
|
|
47940
47999
|
filter(Boolean),
|
|
47941
48000
|
// Removes falsey values
|
|
47942
48001
|
distinctUntilChanged((prev, next) => prev.state === next.state && prev.finalDocumentStates === next.finalDocumentStates),
|
|
47943
48002
|
switchMap((release) => {
|
|
47944
|
-
|
|
47945
|
-
|
|
47946
|
-
let observable;
|
|
47947
|
-
release.state === "published" || release.state === "archived" ? observable = getPublishedArchivedReleaseDocumentsObservable({
|
|
48003
|
+
if (release.state === "published" || release.state === "archived")
|
|
48004
|
+
return getPublishedArchivedReleaseDocumentsObservable({
|
|
47948
48005
|
getClient: getClient2,
|
|
47949
48006
|
release
|
|
47950
|
-
})
|
|
47951
|
-
|
|
47952
|
-
|
|
47953
|
-
|
|
47954
|
-
|
|
47955
|
-
|
|
47956
|
-
|
|
47957
|
-
|
|
47958
|
-
|
|
47959
|
-
|
|
47960
|
-
|
|
47961
|
-
|
|
48007
|
+
});
|
|
48008
|
+
const cacheKey2 = [releaseId, release.state, release.finalDocumentStates?.flatMap((doc) => doc.id), release._rev].join("-");
|
|
48009
|
+
return getBundleDocumentsObservable({
|
|
48010
|
+
schema: schema2,
|
|
48011
|
+
documentPreviewStore,
|
|
48012
|
+
i18n,
|
|
48013
|
+
getClient: getClient2,
|
|
48014
|
+
currentUser,
|
|
48015
|
+
groqFilter: "sanity::partOfRelease($releaseId)",
|
|
48016
|
+
params: {
|
|
48017
|
+
releaseId
|
|
48018
|
+
},
|
|
48019
|
+
skipValidation: isGoingToUnpublish,
|
|
48020
|
+
cacheKey: cacheKey2
|
|
48021
|
+
});
|
|
47962
48022
|
}),
|
|
47963
48023
|
startWith({
|
|
47964
48024
|
loading: !0,
|
|
@@ -47966,8 +48026,8 @@ const bundleDocumentsCache = /* @__PURE__ */ Object.create(null), getActiveRelea
|
|
|
47966
48026
|
error: null
|
|
47967
48027
|
}),
|
|
47968
48028
|
shareReplay(1)
|
|
47969
|
-
)
|
|
47970
|
-
function
|
|
48029
|
+
);
|
|
48030
|
+
function useReleaseDocuments(releaseId) {
|
|
47971
48031
|
const $ = c(9), documentPreviewStore = useDocumentPreviewStore(), {
|
|
47972
48032
|
getClient: getClient2,
|
|
47973
48033
|
i18n,
|
|
@@ -48006,7 +48066,7 @@ function useScheduledDraftDocument(releaseDocumentId, t0) {
|
|
|
48006
48066
|
results: documents,
|
|
48007
48067
|
loading,
|
|
48008
48068
|
error
|
|
48009
|
-
} =
|
|
48069
|
+
} = useReleaseDocuments(releaseId), schema2 = useSchema(), firstDocument = documents?.[0]?.document, firstDocumentValidation = documents?.[0]?.validation.validation, documentsCount = documents?.length || 0;
|
|
48010
48070
|
let t4;
|
|
48011
48071
|
$[4] !== firstDocument || $[5] !== schema2 ? (t4 = firstDocument ? schema2.get(firstDocument._type) : null, $[4] = firstDocument, $[5] = schema2, $[6] = t4) : t4 = $[6];
|
|
48012
48072
|
const schemaType = t4, t5 = includePreview && !!firstDocument && !!schemaType, t6 = schemaType || void 0;
|
|
@@ -48201,7 +48261,7 @@ function DeleteScheduledDraftDialogContent(t0) {
|
|
|
48201
48261
|
return $[16] !== onClose || $[17] !== t1 || $[18] !== t5 || $[19] !== t6 ? (t7 = /* @__PURE__ */ jsx(Dialog$1, { id: "delete-schedule-dialog", header: t1, onClose, width: 0, padding: !1, footer: t5, children: t6 }), $[16] = onClose, $[17] = t1, $[18] = t5, $[19] = t6, $[20] = t7) : t7 = $[20], t7;
|
|
48202
48262
|
}
|
|
48203
48263
|
function DeleteScheduledDraftDialogWithCopyToDraft(t0) {
|
|
48204
|
-
const $ = c(
|
|
48264
|
+
const $ = c(39), {
|
|
48205
48265
|
documentId,
|
|
48206
48266
|
documentType,
|
|
48207
48267
|
onClose,
|
|
@@ -48219,44 +48279,52 @@ function DeleteScheduledDraftDialogWithCopyToDraft(t0) {
|
|
|
48219
48279
|
} = useScheduledDraftDocument(release._id, t1);
|
|
48220
48280
|
let t2;
|
|
48221
48281
|
$[1] !== documentId ? (t2 = getPublishedId(documentId), $[1] = documentId, $[2] = t2) : t2 = $[2];
|
|
48222
|
-
const publishedId = t2
|
|
48223
|
-
draft: draftVersionInfo
|
|
48224
|
-
} = useDocumentVersionInfo(publishedId), scheduledDraftBaseRev = firstDocument?._system?.base?.rev;
|
|
48282
|
+
const publishedId = t2;
|
|
48225
48283
|
let t3;
|
|
48226
|
-
$[3] !==
|
|
48227
|
-
|
|
48284
|
+
$[3] !== publishedId ? (t3 = {
|
|
48285
|
+
documentId: publishedId
|
|
48286
|
+
}, $[3] = publishedId, $[4] = t3) : t3 = $[4];
|
|
48287
|
+
const {
|
|
48288
|
+
versions
|
|
48289
|
+
} = useDocumentVersions(t3);
|
|
48228
48290
|
let t4;
|
|
48229
|
-
$[
|
|
48291
|
+
$[5] !== versions ? (t4 = getDocumentVersionInfoFromVersions(versions), $[5] = versions, $[6] = t4) : t4 = $[6];
|
|
48292
|
+
const versionsInfo = t4, scheduledDraftBaseRev = firstDocument?._system?.base?.rev;
|
|
48293
|
+
let t5;
|
|
48294
|
+
$[7] !== scheduledDraftBaseRev || $[8] !== versionsInfo.draft ? (t5 = getDialogDescription(versionsInfo.draft, scheduledDraftBaseRev), $[7] = scheduledDraftBaseRev, $[8] = versionsInfo.draft, $[9] = t5) : t5 = $[9];
|
|
48295
|
+
const dialogDescription = t5, [shouldCopyToDraft, setShouldCopyToDraft] = useState(dialogDescription.copy.default);
|
|
48296
|
+
let t6;
|
|
48297
|
+
$[10] !== dialogDescription.copy.default || $[11] !== dialogDescription.copy.visible || $[12] !== operations || $[13] !== publishedId || $[14] !== release._id || $[15] !== shouldCopyToDraft ? (t6 = async () => {
|
|
48230
48298
|
const shouldCopy = dialogDescription.copy.visible ? shouldCopyToDraft : dialogDescription.copy.default;
|
|
48231
48299
|
await operations.deleteScheduledDraft(release._id, shouldCopy, publishedId);
|
|
48232
|
-
}, $[
|
|
48233
|
-
const deleteOperation =
|
|
48300
|
+
}, $[10] = dialogDescription.copy.default, $[11] = dialogDescription.copy.visible, $[12] = operations, $[13] = publishedId, $[14] = release._id, $[15] = shouldCopyToDraft, $[16] = t6) : t6 = $[16];
|
|
48301
|
+
const deleteOperation = t6, {
|
|
48234
48302
|
isDeleting,
|
|
48235
48303
|
handleDeleteSchedule
|
|
48236
48304
|
} = useDeleteScheduledDraft(firstDocumentPreview, onClose, deleteOperation);
|
|
48237
|
-
let t5;
|
|
48238
|
-
$[13] !== documentType || $[14] !== schema2 ? (t5 = schema2.get(documentType), $[13] = documentType, $[14] = schema2, $[15] = t5) : t5 = $[15];
|
|
48239
|
-
const schemaType = t5;
|
|
48240
|
-
let t6;
|
|
48241
|
-
$[16] !== firstDocument || $[17] !== schemaType ? (t6 = schemaType && firstDocument ? /* @__PURE__ */ jsx(Preview$1, { value: firstDocument, schemaType }) : /* @__PURE__ */ jsx(LoadingBlock, {}), $[16] = firstDocument, $[17] = schemaType, $[18] = t6) : t6 = $[18];
|
|
48242
48305
|
let t7;
|
|
48243
|
-
$[
|
|
48306
|
+
$[17] !== documentType || $[18] !== schema2 ? (t7 = schema2.get(documentType), $[17] = documentType, $[18] = schema2, $[19] = t7) : t7 = $[19];
|
|
48307
|
+
const schemaType = t7;
|
|
48244
48308
|
let t8;
|
|
48245
|
-
$[
|
|
48309
|
+
$[20] !== firstDocument || $[21] !== schemaType ? (t8 = schemaType && firstDocument ? /* @__PURE__ */ jsx(Preview$1, { value: firstDocument, schemaType }) : /* @__PURE__ */ jsx(LoadingBlock, {}), $[20] = firstDocument, $[21] = schemaType, $[22] = t8) : t8 = $[22];
|
|
48246
48310
|
let t9;
|
|
48247
|
-
$[
|
|
48311
|
+
$[23] !== dialogDescription.bodyKey || $[24] !== t ? (t9 = t(dialogDescription.bodyKey), $[23] = dialogDescription.bodyKey, $[24] = t, $[25] = t9) : t9 = $[25];
|
|
48312
|
+
let t10;
|
|
48313
|
+
$[26] !== t9 ? (t10 = /* @__PURE__ */ jsx(Box, { paddingX: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: t9 }) }), $[26] = t9, $[27] = t10) : t10 = $[27];
|
|
48314
|
+
let t11;
|
|
48315
|
+
$[28] !== dialogDescription.copy.visible || $[29] !== shouldCopyToDraft || $[30] !== t ? (t11 = dialogDescription.copy.visible && /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
48248
48316
|
/* @__PURE__ */ jsx(Box, { paddingX: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: t("release.dialog.delete-schedule-draft.different-changes-explanation") }) }),
|
|
48249
48317
|
/* @__PURE__ */ jsx(Box, { paddingX: 2, children: /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 3, as: "label", children: [
|
|
48250
48318
|
/* @__PURE__ */ jsx(Checkbox$1, { checked: shouldCopyToDraft, onChange: (event) => setShouldCopyToDraft(event.currentTarget.checked) }),
|
|
48251
48319
|
/* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: t("release.dialog.delete-schedule-draft.copy-checkbox") })
|
|
48252
48320
|
] }) })
|
|
48253
|
-
] }), $[
|
|
48254
|
-
let
|
|
48255
|
-
return $[
|
|
48256
|
-
t6,
|
|
48321
|
+
] }), $[28] = dialogDescription.copy.visible, $[29] = shouldCopyToDraft, $[30] = t, $[31] = t11) : t11 = $[31];
|
|
48322
|
+
let t12;
|
|
48323
|
+
return $[32] !== handleDeleteSchedule || $[33] !== isDeleting || $[34] !== onClose || $[35] !== t10 || $[36] !== t11 || $[37] !== t8 ? (t12 = /* @__PURE__ */ jsxs(DeleteScheduledDraftDialogContent, { onClose, handleDeleteSchedule, isDeleting, children: [
|
|
48257
48324
|
t8,
|
|
48258
|
-
|
|
48259
|
-
|
|
48325
|
+
t10,
|
|
48326
|
+
t11
|
|
48327
|
+
] }), $[32] = handleDeleteSchedule, $[33] = isDeleting, $[34] = onClose, $[35] = t10, $[36] = t11, $[37] = t8, $[38] = t12) : t12 = $[38], t12;
|
|
48260
48328
|
}
|
|
48261
48329
|
function DeleteScheduledDraftDialogWithEmptyRelease(t0) {
|
|
48262
48330
|
const $ = c(13), {
|
|
@@ -49005,9 +49073,9 @@ const SingleDocReleaseLayout = lazy(() => import("./SingleDocReleaseLayout.js").
|
|
|
49005
49073
|
function useReleasesToolAvailable() {
|
|
49006
49074
|
const $ = c(2), workspace = useWorkspace();
|
|
49007
49075
|
let t0;
|
|
49008
|
-
return $[0] !== workspace.tools ? (t0 = workspace.tools.some(_temp$
|
|
49076
|
+
return $[0] !== workspace.tools ? (t0 = workspace.tools.some(_temp$1Q), $[0] = workspace.tools, $[1] = t0) : t0 = $[1], t0;
|
|
49009
49077
|
}
|
|
49010
|
-
function _temp$
|
|
49078
|
+
function _temp$1Q(t0) {
|
|
49011
49079
|
const {
|
|
49012
49080
|
name
|
|
49013
49081
|
} = t0;
|
|
@@ -49279,7 +49347,7 @@ function CopyToNewReleaseDialog(props2) {
|
|
|
49279
49347
|
let t7;
|
|
49280
49348
|
$[16] !== clearReleaseDataFromStorage || $[17] !== createRelease || $[18] !== createReleaseMetadata || $[19] !== handleAddVersion || $[20] !== onClose || $[21] !== release || $[22] !== releasePromise || $[23] !== setRerenderDialog || $[24] !== t || $[25] !== telemetry || $[26] !== toast ? (t7 = async () => {
|
|
49281
49349
|
if (getIsScheduledDateInPast(release)) {
|
|
49282
|
-
setRerenderDialog(_temp$
|
|
49350
|
+
setRerenderDialog(_temp$1P);
|
|
49283
49351
|
return;
|
|
49284
49352
|
}
|
|
49285
49353
|
if (setIsSubmitting(!0), !await releasePromise) {
|
|
@@ -49370,7 +49438,7 @@ function CopyToNewReleaseDialog(props2) {
|
|
|
49370
49438
|
t25
|
|
49371
49439
|
] }), $[73] = handleOnClose, $[74] = onClose, $[75] = t16, $[76] = t25, $[77] = t9, $[78] = t26) : t26 = $[78], t26;
|
|
49372
49440
|
}
|
|
49373
|
-
function _temp$
|
|
49441
|
+
function _temp$1P(cur) {
|
|
49374
49442
|
return cur + 1;
|
|
49375
49443
|
}
|
|
49376
49444
|
const VersionContextMenuDialogs = memo(function(props2) {
|
|
@@ -49655,7 +49723,7 @@ const useHasCopyToDraftOption = (documentType, fromRelease) => {
|
|
|
49655
49723
|
t
|
|
49656
49724
|
} = useTranslation(), hasCopyToDraftOption = useHasCopyToDraftOption(documentType, bundleId), isCopyToReleaseDisabled = disabled || !hasCreatePermission || isGoingToUnpublish2;
|
|
49657
49725
|
let t2;
|
|
49658
|
-
$[0] !== releases2 ? (t2 = releases2.filter(_temp$
|
|
49726
|
+
$[0] !== releases2 ? (t2 = releases2.filter(_temp$1O), $[0] = releases2, $[1] = t2) : t2 = $[1];
|
|
49659
49727
|
const copyToReleaseOptions = t2, isReleasesEnabled = !!useWorkspace().releases?.enabled, showCopyToReleaseMenuItem = isReleasesEnabled || hasCopyToDraftOption;
|
|
49660
49728
|
let t3;
|
|
49661
49729
|
$[2] !== bundleId || $[3] !== disabled || $[4] !== release || $[5] !== t ? (t3 = release && /* @__PURE__ */ jsx(IntentLink, { intent: RELEASES_INTENT, params: {
|
|
@@ -49683,7 +49751,7 @@ const useHasCopyToDraftOption = (documentType, fromRelease) => {
|
|
|
49683
49751
|
t7
|
|
49684
49752
|
] }), $[36] = t3, $[37] = t4, $[38] = t5, $[39] = t6, $[40] = t7, $[41] = t8) : t8 = $[41], t8;
|
|
49685
49753
|
});
|
|
49686
|
-
function _temp$
|
|
49754
|
+
function _temp$1O(r) {
|
|
49687
49755
|
return !isReleaseScheduledOrScheduling(r);
|
|
49688
49756
|
}
|
|
49689
49757
|
const ScheduledDraftContextMenu = memo(function(props2) {
|
|
@@ -49705,7 +49773,7 @@ const ScheduledDraftContextMenu = memo(function(props2) {
|
|
|
49705
49773
|
t
|
|
49706
49774
|
} = useTranslation(), hasCopyToDraftOption = useHasCopyToDraftOption(documentType, bundleId), isCopyToReleaseDisabled = disabled || !hasCreatePermission || isGoingToUnpublish2;
|
|
49707
49775
|
let t1;
|
|
49708
|
-
$[0] !== releases2 ? (t1 = releases2.filter(_temp$
|
|
49776
|
+
$[0] !== releases2 ? (t1 = releases2.filter(_temp$1N), $[0] = releases2, $[1] = t1) : t1 = $[1];
|
|
49709
49777
|
const copyToReleaseOptions = t1, isReleasesEnabled = !!useWorkspace().releases?.enabled, showCopyToReleaseMenuItem = isReleasesEnabled && copyToReleaseOptions.length > 0, {
|
|
49710
49778
|
actions
|
|
49711
49779
|
} = scheduledDraftMenuActions;
|
|
@@ -49744,7 +49812,7 @@ const ScheduledDraftContextMenu = memo(function(props2) {
|
|
|
49744
49812
|
t10
|
|
49745
49813
|
] }), $[30] = t10, $[31] = t2, $[32] = t3, $[33] = t7, $[34] = t9, $[35] = t11) : t11 = $[35], t11;
|
|
49746
49814
|
});
|
|
49747
|
-
function _temp$
|
|
49815
|
+
function _temp$1N(r) {
|
|
49748
49816
|
return !isReleaseScheduledOrScheduling(r);
|
|
49749
49817
|
}
|
|
49750
49818
|
const VersionContextMenu = memo(function(props2) {
|
|
@@ -49952,7 +50020,45 @@ const VersionContextMenu = memo(function(props2) {
|
|
|
49952
50020
|
t16,
|
|
49953
50021
|
t18
|
|
49954
50022
|
] }), $[68] = t15, $[69] = t16, $[70] = t18, $[71] = t19) : t19 = $[71], t19;
|
|
49955
|
-
}),
|
|
50023
|
+
}), NO_VERSIONS = {};
|
|
50024
|
+
function useDocumentVersionInfo(documentId) {
|
|
50025
|
+
const $ = c(11);
|
|
50026
|
+
let t0;
|
|
50027
|
+
$[0] !== documentId ? (t0 = getPublishedId(documentId), $[0] = documentId, $[1] = t0) : t0 = $[1];
|
|
50028
|
+
const publishedId = t0;
|
|
50029
|
+
let t1;
|
|
50030
|
+
$[2] !== publishedId ? (t1 = {
|
|
50031
|
+
documentId: publishedId
|
|
50032
|
+
}, $[2] = publishedId, $[3] = t1) : t1 = $[3];
|
|
50033
|
+
const {
|
|
50034
|
+
versions,
|
|
50035
|
+
loading
|
|
50036
|
+
} = useDocumentVersions(t1);
|
|
50037
|
+
let t2;
|
|
50038
|
+
$[4] !== versions ? (t2 = getDocumentVersionInfoFromVersions(versions), $[4] = versions, $[5] = t2) : t2 = $[5];
|
|
50039
|
+
const versionInfo = t2, t3 = loading ? NO_VERSIONS : versionInfo.versions;
|
|
50040
|
+
let t4;
|
|
50041
|
+
return $[6] !== loading || $[7] !== t3 || $[8] !== versionInfo.draft || $[9] !== versionInfo.published ? (t4 = {
|
|
50042
|
+
isLoading: loading,
|
|
50043
|
+
draft: versionInfo.draft,
|
|
50044
|
+
published: versionInfo.published,
|
|
50045
|
+
versions: t3
|
|
50046
|
+
}, $[6] = loading, $[7] = t3, $[8] = versionInfo.draft, $[9] = versionInfo.published, $[10] = t4) : t4 = $[10], t4;
|
|
50047
|
+
}
|
|
50048
|
+
function useReleasesIds(releases2) {
|
|
50049
|
+
const $ = c(4);
|
|
50050
|
+
let t0;
|
|
50051
|
+
$[0] !== releases2 ? (t0 = releases2.map(_temp$1M), $[0] = releases2, $[1] = t0) : t0 = $[1];
|
|
50052
|
+
const releasesIds = t0;
|
|
50053
|
+
let t1;
|
|
50054
|
+
return $[2] !== releasesIds ? (t1 = {
|
|
50055
|
+
releasesIds
|
|
50056
|
+
}, $[2] = releasesIds, $[3] = t1) : t1 = $[3], t1;
|
|
50057
|
+
}
|
|
50058
|
+
function _temp$1M(release) {
|
|
50059
|
+
return getReleaseIdFromReleaseDocumentId(release._id);
|
|
50060
|
+
}
|
|
50061
|
+
const PRESENCE_MENU_POPOVER_PROPS = {
|
|
49956
50062
|
portal: !0
|
|
49957
50063
|
}, AvatarStackBox = /* @__PURE__ */ styled.div.withConfig({
|
|
49958
50064
|
displayName: "AvatarStackBox",
|
|
@@ -54619,7 +54725,7 @@ const SearchResultItemPreviewBox = styled(Box).withConfig({
|
|
|
54619
54725
|
componentId: "sc-1yg22aa-0"
|
|
54620
54726
|
})`@supports (-webkit-overflow-scrolling:touch){* [data-ui='Box']{background-attachment:scroll;}}`;
|
|
54621
54727
|
function SearchResultItemPreview(t0) {
|
|
54622
|
-
const $ = c(
|
|
54728
|
+
const $ = c(41), {
|
|
54623
54729
|
documentId,
|
|
54624
54730
|
documentType,
|
|
54625
54731
|
layout,
|
|
@@ -54647,39 +54753,49 @@ function SearchResultItemPreview(t0) {
|
|
|
54647
54753
|
isLoading,
|
|
54648
54754
|
snapshot: snapshot2,
|
|
54649
54755
|
original
|
|
54650
|
-
} = useObservable(observable, t4)
|
|
54756
|
+
} = useObservable(observable, t4);
|
|
54651
54757
|
let t5;
|
|
54758
|
+
$[9] !== documentId ? (t5 = {
|
|
54759
|
+
documentId
|
|
54760
|
+
}, $[9] = documentId, $[10] = t5) : t5 = $[10];
|
|
54761
|
+
const {
|
|
54762
|
+
versions
|
|
54763
|
+
} = useDocumentVersions(t5);
|
|
54764
|
+
let t6;
|
|
54765
|
+
$[11] !== versions ? (t6 = getDocumentVersionInfoFromVersions(versions), $[11] = versions, $[12] = t6) : t6 = $[12];
|
|
54766
|
+
const versionsInfo = t6;
|
|
54767
|
+
let t7;
|
|
54652
54768
|
bb0: {
|
|
54653
54769
|
if (isLoading) {
|
|
54654
|
-
|
|
54770
|
+
t7 = null;
|
|
54655
54771
|
break bb0;
|
|
54656
54772
|
}
|
|
54657
|
-
let t62;
|
|
54658
|
-
$[9] !== presence ? (t62 = presence && presence.length > 0 && /* @__PURE__ */ jsx(DocumentPreviewPresence, { presence }), $[9] = presence, $[10] = t62) : t62 = $[10];
|
|
54659
|
-
let t72;
|
|
54660
|
-
$[11] !== schemaType.title || $[12] !== showBadge ? (t72 = showBadge && /* @__PURE__ */ jsx(Badge, { children: schemaType.title }), $[11] = schemaType.title, $[12] = showBadge, $[13] = t72) : t72 = $[13];
|
|
54661
54773
|
let t82;
|
|
54662
|
-
$[
|
|
54774
|
+
$[13] !== presence ? (t82 = presence && presence.length > 0 && /* @__PURE__ */ jsx(DocumentPreviewPresence, { presence }), $[13] = presence, $[14] = t82) : t82 = $[14];
|
|
54663
54775
|
let t92;
|
|
54664
|
-
$[
|
|
54665
|
-
|
|
54666
|
-
|
|
54667
|
-
|
|
54668
|
-
|
|
54776
|
+
$[15] !== schemaType.title || $[16] !== showBadge ? (t92 = showBadge && /* @__PURE__ */ jsx(Badge, { children: schemaType.title }), $[15] = schemaType.title, $[16] = showBadge, $[17] = t92) : t92 = $[17];
|
|
54777
|
+
let t102;
|
|
54778
|
+
$[18] !== versionsInfo.draft || $[19] !== versionsInfo.published || $[20] !== versionsInfo.versions ? (t102 = /* @__PURE__ */ jsx(DocumentStatusIndicator, { draft: versionsInfo.draft, published: versionsInfo.published, versions: versionsInfo.versions }), $[18] = versionsInfo.draft, $[19] = versionsInfo.published, $[20] = versionsInfo.versions, $[21] = t102) : t102 = $[21];
|
|
54779
|
+
let t112;
|
|
54780
|
+
$[22] !== t102 || $[23] !== t82 || $[24] !== t92 ? (t112 = /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 3, children: [
|
|
54781
|
+
t82,
|
|
54782
|
+
t92,
|
|
54783
|
+
t102
|
|
54784
|
+
] }), $[22] = t102, $[23] = t82, $[24] = t92, $[25] = t112) : t112 = $[25], t7 = t112;
|
|
54669
54785
|
}
|
|
54670
|
-
const status =
|
|
54671
|
-
let
|
|
54672
|
-
$[
|
|
54673
|
-
const tooltip =
|
|
54674
|
-
let
|
|
54675
|
-
$[
|
|
54786
|
+
const status = t7;
|
|
54787
|
+
let t8;
|
|
54788
|
+
$[26] !== versionsInfo.draft || $[27] !== versionsInfo.published || $[28] !== versionsInfo.versions ? (t8 = /* @__PURE__ */ jsx(DocumentStatus, { draft: versionsInfo.draft, published: versionsInfo.published, versions: versionsInfo.versions }), $[26] = versionsInfo.draft, $[27] = versionsInfo.published, $[28] = versionsInfo.versions, $[29] = t8) : t8 = $[29];
|
|
54789
|
+
const tooltip = t8;
|
|
54790
|
+
let t9;
|
|
54791
|
+
$[30] !== documentStub || $[31] !== original || $[32] !== snapshot2 ? (t9 = getPreviewValueWithFallback({
|
|
54676
54792
|
snapshot: snapshot2,
|
|
54677
54793
|
original,
|
|
54678
54794
|
fallback: documentStub
|
|
54679
|
-
}), $[
|
|
54680
|
-
const
|
|
54681
|
-
let
|
|
54682
|
-
return $[
|
|
54795
|
+
}), $[30] = documentStub, $[31] = original, $[32] = snapshot2, $[33] = t9) : t9 = $[33];
|
|
54796
|
+
const t10 = isLoading ?? !0, t11 = layout || "default";
|
|
54797
|
+
let t12;
|
|
54798
|
+
return $[34] !== schemaType.icon || $[35] !== status || $[36] !== t10 || $[37] !== t11 || $[38] !== t9 || $[39] !== tooltip ? (t12 = /* @__PURE__ */ jsx(SearchResultItemPreviewBox, { children: /* @__PURE__ */ jsx(SanityDefaultPreview, { ...t9, isPlaceholder: t10, layout: t11, icon: schemaType.icon, status, tooltip }) }), $[34] = schemaType.icon, $[35] = status, $[36] = t10, $[37] = t11, $[38] = t9, $[39] = tooltip, $[40] = t12) : t12 = $[40], t12;
|
|
54683
54799
|
}
|
|
54684
54800
|
function SearchResultItem(t0) {
|
|
54685
54801
|
const $ = c(68);
|
|
@@ -64729,11 +64845,21 @@ const DateWithTooltip = (props2) => {
|
|
|
64729
64845
|
return $[155] !== T6 || $[156] !== t27 || $[157] !== t28 || $[158] !== t29 || $[159] !== t30 || $[160] !== t31 || $[161] !== t59 ? (t60 = /* @__PURE__ */ jsx(T6, { padding: t27, radius: t28, shadow: t29, tone: t30, style: t31, children: t59 }), $[155] = T6, $[156] = t27, $[157] = t28, $[158] = t29, $[159] = t30, $[160] = t31, $[161] = t59, $[162] = t60) : t60 = $[162], t60;
|
|
64730
64846
|
};
|
|
64731
64847
|
function DocumentVersionsStatus(t0) {
|
|
64732
|
-
const $ = c(
|
|
64848
|
+
const $ = c(7), {
|
|
64733
64849
|
publishedDocumentId
|
|
64734
|
-
} = t0
|
|
64850
|
+
} = t0;
|
|
64735
64851
|
let t1;
|
|
64736
|
-
|
|
64852
|
+
$[0] !== publishedDocumentId ? (t1 = {
|
|
64853
|
+
documentId: publishedDocumentId
|
|
64854
|
+
}, $[0] = publishedDocumentId, $[1] = t1) : t1 = $[1];
|
|
64855
|
+
const {
|
|
64856
|
+
versions
|
|
64857
|
+
} = useDocumentVersions(t1);
|
|
64858
|
+
let t2;
|
|
64859
|
+
$[2] !== versions ? (t2 = getDocumentVersionInfoFromVersions(versions), $[2] = versions, $[3] = t2) : t2 = $[3];
|
|
64860
|
+
const versionsInfo = t2;
|
|
64861
|
+
let t3;
|
|
64862
|
+
return $[4] !== versionsInfo.draft || $[5] !== versionsInfo.published ? (t3 = /* @__PURE__ */ jsx(DocumentStatusIndicator, { draft: versionsInfo.draft, published: versionsInfo.published }), $[4] = versionsInfo.draft, $[5] = versionsInfo.published, $[6] = t3) : t3 = $[6], t3;
|
|
64737
64863
|
}
|
|
64738
64864
|
const DocumentPreview$1 = (props2) => {
|
|
64739
64865
|
const $ = c(20), {
|
|
@@ -83248,16 +83374,16 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
|
83248
83374
|
} = useActiveReleases();
|
|
83249
83375
|
let t1;
|
|
83250
83376
|
$[0] !== variant.id ? (t1 = isPublishedId(variant.id), $[0] = variant.id, $[1] = t1) : t1 = $[1];
|
|
83251
|
-
const
|
|
83377
|
+
const isPublishedVersion2 = t1;
|
|
83252
83378
|
let t2;
|
|
83253
83379
|
$[2] !== variant.id ? (t2 = isDraftId(variant.id), $[2] = variant.id, $[3] = t2) : t2 = $[3];
|
|
83254
|
-
const
|
|
83380
|
+
const isDraftVersion2 = t2;
|
|
83255
83381
|
let t3;
|
|
83256
83382
|
$[4] !== variant.id ? (t3 = isVersionId(variant.id), $[4] = variant.id, $[5] = t3) : t3 = $[5];
|
|
83257
83383
|
const isVersion = t3;
|
|
83258
83384
|
let t4;
|
|
83259
83385
|
$[6] !== variant.id ? (t4 = getPublishedId(variant.id), $[6] = variant.id, $[7] = t4) : t4 = $[7];
|
|
83260
|
-
const documentId = t4, versionName = getVersionFromId(variant.id), bundleId =
|
|
83386
|
+
const documentId = t4, versionName = getVersionFromId(variant.id), bundleId = isPublishedVersion2 ? "published" : isDraftVersion2 ? "draft" : versionName ?? "", isReadOnly = useSelector(machine, _temp14), selectedIds = useSelector(machine, _temp15), releases2 = useSelector(inventoryRef, _temp16), {
|
|
83261
83387
|
filteredReleases,
|
|
83262
83388
|
getReleaseChipState,
|
|
83263
83389
|
handleCopyToDraftsNavigate,
|
|
@@ -83265,7 +83391,7 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
|
83265
83391
|
isPublishSelected
|
|
83266
83392
|
} = perspectiveList;
|
|
83267
83393
|
let t5;
|
|
83268
|
-
$[8] !== getReleaseChipState || $[9] !== isDraftSelected || $[10] !==
|
|
83394
|
+
$[8] !== getReleaseChipState || $[9] !== isDraftSelected || $[10] !== isDraftVersion2 || $[11] !== isPublishSelected || $[12] !== isPublishedVersion2 || $[13] !== isVersion || $[14] !== variant.id ? (t5 = isPublishedVersion2 && isPublishSelected || isDraftVersion2 && isDraftSelected || isVersion && getReleaseChipState(getVersionFromId(variant.id) ?? "").selected, $[8] = getReleaseChipState, $[9] = isDraftSelected, $[10] = isDraftVersion2, $[11] = isPublishSelected, $[12] = isPublishedVersion2, $[13] = isVersion, $[14] = variant.id, $[15] = t5) : t5 = $[15];
|
|
83269
83395
|
const isSelected = t5, release = versionName ? releases2.get(getReleaseDocumentIdFromReleaseId(versionName)) : void 0;
|
|
83270
83396
|
let t6;
|
|
83271
83397
|
$[16] !== bundleId || $[17] !== documentId || $[18] !== documentType || $[19] !== isReadOnly || $[20] !== isVersion || $[21] !== release ? (t6 = {
|
|
@@ -83320,7 +83446,7 @@ const Container = /* @__PURE__ */ styled.div.withConfig({
|
|
|
83320
83446
|
" ",
|
|
83321
83447
|
t("document-group-inventory.viewing-item-label")
|
|
83322
83448
|
] }), $[45] = isSelected, $[46] = t, $[47] = t15) : t15 = $[47];
|
|
83323
|
-
const t16 = (
|
|
83449
|
+
const t16 = (isDraftVersion2 ? "drafts" : isPublishedVersion2 ? "published" : release) ?? "";
|
|
83324
83450
|
let t17;
|
|
83325
83451
|
$[48] !== t16 ? (t17 = /* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(ReleaseAvatarIcon, { release: t16 }) }), $[48] = t16, $[49] = t17) : t17 = $[49];
|
|
83326
83452
|
let t18;
|
|
@@ -86788,6 +86914,67 @@ function TasksStudioSidebar() {
|
|
|
86788
86914
|
let t0;
|
|
86789
86915
|
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(TasksStudioSidebarInner, {}), $[0] = t0) : t0 = $[0], t0;
|
|
86790
86916
|
}
|
|
86917
|
+
function isDocumentInSelectedVariant({
|
|
86918
|
+
selectedVariant,
|
|
86919
|
+
bundle,
|
|
86920
|
+
documentVersions
|
|
86921
|
+
}) {
|
|
86922
|
+
return !!getTargetDocument({
|
|
86923
|
+
bundle,
|
|
86924
|
+
variant: selectedVariant._id,
|
|
86925
|
+
documentVersions
|
|
86926
|
+
});
|
|
86927
|
+
}
|
|
86928
|
+
function variantsClient(client) {
|
|
86929
|
+
return client;
|
|
86930
|
+
}
|
|
86931
|
+
function getSupportedBundleId(selectedPerspective) {
|
|
86932
|
+
const bundleId = getBundleIdFromPerspective(selectedPerspective);
|
|
86933
|
+
if (bundleId !== "published") {
|
|
86934
|
+
if (bundleId === "drafts")
|
|
86935
|
+
return "drafts";
|
|
86936
|
+
throw new Error(`Variant document creation is not supported for bundle "${bundleId}". Only "published" and "drafts" bundles are supported.`);
|
|
86937
|
+
}
|
|
86938
|
+
}
|
|
86939
|
+
async function createVariantScopedDocument({
|
|
86940
|
+
client,
|
|
86941
|
+
document: document2,
|
|
86942
|
+
variant,
|
|
86943
|
+
selectedPerspective
|
|
86944
|
+
}) {
|
|
86945
|
+
if (!document2._id)
|
|
86946
|
+
throw new Error("Source document must have an _id");
|
|
86947
|
+
const publishedId = getPublishedId(document2._id), bundleId = getSupportedBundleId(selectedPerspective), action = {
|
|
86948
|
+
actionType: "sanity.action.document.variant.create",
|
|
86949
|
+
publishedId,
|
|
86950
|
+
variantId: getVariantId(variant._id),
|
|
86951
|
+
baseId: document2._id,
|
|
86952
|
+
...document2._rev ? {
|
|
86953
|
+
ifBaseRevisionId: document2._rev
|
|
86954
|
+
} : {},
|
|
86955
|
+
...bundleId ? {
|
|
86956
|
+
bundleId
|
|
86957
|
+
} : {}
|
|
86958
|
+
};
|
|
86959
|
+
return client.action(action, {
|
|
86960
|
+
tag: "variants.document.create"
|
|
86961
|
+
});
|
|
86962
|
+
}
|
|
86963
|
+
function useVariantDocumentOperations() {
|
|
86964
|
+
const $ = c(4), client = useClient(VARIANTS_STUDIO_CLIENT_OPTIONS);
|
|
86965
|
+
let t0;
|
|
86966
|
+
$[0] !== client ? (t0 = async (options) => {
|
|
86967
|
+
await createVariantScopedDocument({
|
|
86968
|
+
client,
|
|
86969
|
+
...options
|
|
86970
|
+
});
|
|
86971
|
+
}, $[0] = client, $[1] = t0) : t0 = $[1];
|
|
86972
|
+
const createVariantDocument = t0;
|
|
86973
|
+
let t1;
|
|
86974
|
+
return $[2] !== createVariantDocument ? (t1 = {
|
|
86975
|
+
createVariantDocument
|
|
86976
|
+
}, $[2] = createVariantDocument, $[3] = t1) : t1 = $[3], t1;
|
|
86977
|
+
}
|
|
86791
86978
|
function useSetVariant() {
|
|
86792
86979
|
const $ = c(2), router = useRouter();
|
|
86793
86980
|
let t0;
|
|
@@ -87214,10 +87401,12 @@ export {
|
|
|
87214
87401
|
getReleaseDefaults,
|
|
87215
87402
|
getReleaseDocumentIdFromReleaseId,
|
|
87216
87403
|
getReleaseIdFromReleaseDocumentId,
|
|
87404
|
+
getReleaseTitleDetails,
|
|
87217
87405
|
getReleaseTone,
|
|
87218
87406
|
getSchemaTypeTitle,
|
|
87219
87407
|
getSearchableTypes,
|
|
87220
87408
|
getSelectedVariant,
|
|
87409
|
+
getTargetDocument,
|
|
87221
87410
|
getTemplatePermissions,
|
|
87222
87411
|
getTransactionsLogs,
|
|
87223
87412
|
getValueAtPath,
|
|
@@ -87251,9 +87440,11 @@ export {
|
|
|
87251
87440
|
isDeleteDocumentGroupEvent,
|
|
87252
87441
|
isDeleteDocumentVersionEvent,
|
|
87253
87442
|
isDev,
|
|
87443
|
+
isDocumentInSelectedVariant,
|
|
87254
87444
|
isDocumentLimitError,
|
|
87255
87445
|
isDraft,
|
|
87256
87446
|
isDraftPerspective,
|
|
87447
|
+
isDraftVersion,
|
|
87257
87448
|
isEditDocumentVersionEvent,
|
|
87258
87449
|
isEmptyObject$1 as isEmptyObject,
|
|
87259
87450
|
isFieldChange,
|
|
@@ -87271,11 +87462,13 @@ export {
|
|
|
87271
87462
|
isProd,
|
|
87272
87463
|
isPublishDocumentVersionEvent,
|
|
87273
87464
|
isPublishedPerspective,
|
|
87465
|
+
isPublishedVersion,
|
|
87274
87466
|
isRecord$4 as isRecord,
|
|
87275
87467
|
isReleaseDocument,
|
|
87276
87468
|
isReleaseLimitError,
|
|
87277
87469
|
isReleasePerspective,
|
|
87278
87470
|
isReleaseScheduledOrScheduling,
|
|
87471
|
+
isReleaseVersion,
|
|
87279
87472
|
isRemovedItemDiff,
|
|
87280
87473
|
isSanityDefinedAction,
|
|
87281
87474
|
isScheduleDocumentVersionEvent,
|
|
@@ -87291,6 +87484,7 @@ export {
|
|
|
87291
87484
|
isUpdateLiveDocumentEvent,
|
|
87292
87485
|
isValidAnnouncementAudience,
|
|
87293
87486
|
isValidAnnouncementRole,
|
|
87487
|
+
isVariantVersion,
|
|
87294
87488
|
joinPath,
|
|
87295
87489
|
listenQuery,
|
|
87296
87490
|
matchWorkspace,
|
|
@@ -87453,7 +87647,7 @@ export {
|
|
|
87453
87647
|
usePreviewCard,
|
|
87454
87648
|
useProject,
|
|
87455
87649
|
useProjectDatasets,
|
|
87456
|
-
useProjectId,
|
|
87650
|
+
useProjectId$1 as useProjectId,
|
|
87457
87651
|
useProjectStore,
|
|
87458
87652
|
useProjectSubscriptions,
|
|
87459
87653
|
usePublishedId,
|
|
@@ -87461,6 +87655,7 @@ export {
|
|
|
87461
87655
|
useReferenceInputOptions,
|
|
87462
87656
|
useReferringDocuments,
|
|
87463
87657
|
useRelativeTime,
|
|
87658
|
+
useReleaseDocuments,
|
|
87464
87659
|
useReleaseOperations,
|
|
87465
87660
|
useReleasePermissions,
|
|
87466
87661
|
useReleasesIds,
|
|
@@ -87521,6 +87716,7 @@ export {
|
|
|
87521
87716
|
useValidationState,
|
|
87522
87717
|
useValidationStatus,
|
|
87523
87718
|
useValuePreview,
|
|
87719
|
+
useVariantDocumentOperations,
|
|
87524
87720
|
useVersionOperations,
|
|
87525
87721
|
useVersionRelease,
|
|
87526
87722
|
useVirtualizerScrollInstance,
|
|
@@ -87537,6 +87733,7 @@ export {
|
|
|
87537
87733
|
validateNames,
|
|
87538
87734
|
validateWorkspaces,
|
|
87539
87735
|
validation,
|
|
87736
|
+
variantsClient,
|
|
87540
87737
|
variantsLocaleNamespace,
|
|
87541
87738
|
visitDiff
|
|
87542
87739
|
};
|