sanity 6.2.0 → 6.2.1-next.10
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 +14 -1
- package/lib/_chunks-es/index2.js +681 -675
- package/lib/_chunks-es/index2.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 +2 -1
- package/package.json +10 -10
package/lib/_chunks-es/index2.js
CHANGED
|
@@ -11,7 +11,7 @@ import throttle from "lodash-es/throttle.js";
|
|
|
11
11
|
import { styled, css, useTheme as useTheme$1, keyframes, createGlobalStyle } from "styled-components";
|
|
12
12
|
import { EllipsisHorizontalIcon, ErrorOutlineIcon, ArrowLeftIcon, WarningOutlineIcon, CircleIcon, CalendarIcon, UnpublishIcon, PublishIcon, EditIcon, CloseIcon, TrashIcon, AddCircleIcon, TimelineIcon, ChevronRightIcon, ArrowRightIcon, ArrowDownIcon, DocumentIcon, ImageIcon, ChevronDownIcon, RevertIcon, InfoOutlineIcon, CheckmarkIcon, AddIcon, HelpCircleIcon, AccessDeniedIcon, ToggleArrowRightIcon, SyncIcon, LaunchIcon, BulbOutlineIcon, UnknownIcon, LinkIcon, ChevronUpIcon, DownloadIcon, DocumentsIcon, UploadIcon, DragHandleIcon, InsertAboveIcon, InsertBelowIcon, CopyIcon, AddDocumentIcon, SearchIcon, ChevronLeftIcon, EarthGlobeIcon, EarthAmericasIcon, UlistIcon, OlistIcon, CodeIcon, UnderlineIcon, StrikethroughIcon, ItalicIcon, BoldIcon, BlockElementIcon, InlineElementIcon, CollapseIcon, ExpandIcon, ResetIcon, Icon, ReadOnlyIcon, BinaryDocumentIcon, LockIcon, CropIcon, EyeOpenIcon, ClockIcon, DotIcon, BoltIcon, ComposeSparklesIcon, UnlockIcon, ClipboardIcon, CheckmarkCircleIcon, StringIcon, NumberIcon, BlockContentIcon, UndoIcon, UnlinkIcon, LinkRemovedIcon, CommentIcon, TaskIcon, DesktopIcon, MoonIcon, SunIcon, SpinnerIcon, ControlsIcon, SortIcon, SparkleIcon, EyeClosedIcon, DoubleChevronRightIcon, AddUserIcon, CogIcon, LeaveIcon, UsersIcon, FaceHappyIcon, FaceIndifferentIcon, FaceSadIcon, FeedbackIcon, GithubIcon, RefreshIcon, MenuIcon, UserIcon } from "@sanity/icons";
|
|
13
13
|
import { createMemoryHistory, createBrowserHistory } from "history";
|
|
14
|
-
import { of, concat, defer, EMPTY as EMPTY$5, map as map$1, merge, defaultIfEmpty, catchError as catchError$1, switchMap as switchMap$1, take, concatMap, from, Observable, BehaviorSubject, fromEvent, skip, ReplaySubject, timer, firstValueFrom, throwError, NEVER, Subject, tap as tap$1, finalize, share as share$1, combineLatest, asyncScheduler, bufferTime, mergeMap as mergeMap$1, filter as filter$1, lastValueFrom, partition as partition$1, distinctUntilChanged as distinctUntilChanged$1, asapScheduler, using,
|
|
14
|
+
import { of, concat, defer, EMPTY as EMPTY$5, map as map$1, merge, defaultIfEmpty, catchError as catchError$1, switchMap as switchMap$1, take, concatMap, from, Observable, BehaviorSubject, fromEvent, skip, ReplaySubject, timer, firstValueFrom, throwError, NEVER, Subject, tap as tap$1, finalize, share as share$1, combineLatest, asyncScheduler, bufferTime, mergeMap as mergeMap$1, filter as filter$1, lastValueFrom, partition as partition$1, distinctUntilChanged as distinctUntilChanged$1, asapScheduler, using, repeat, scan as scan$1, shareReplay as shareReplay$1, pipe, iif, startWith as startWith$1, concatWith, count, toArray as toArray$2, reduce as reduce$1, switchScan, delayWhen, first as first$1, zipWith, takeWhile, debounceTime as debounceTime$1, find, zip, isObservable, retry, debounce as debounce$1, delay as delay$1, timeout as timeout$1, connect, forkJoin } from "rxjs";
|
|
15
15
|
import { catchError, tap, switchMap, map, scan, distinctUntilChanged, startWith, shareReplay, mergeMap, filter, share, mergeMapTo, takeUntil, take as take$1, publishReplay, refCount, withLatestFrom, concatMap as concatMap$1, groupBy as groupBy$1, throttleTime, last, mergeAll, toArray as toArray$1, distinct, skip as skip$1, first, debounceTime, auditTime, switchMapTo, delay, reduce as reduce$2, finalize as finalize$1, expand, mapTo, debounce as debounce$2, retry as retry$1, timeout } from "rxjs/operators";
|
|
16
16
|
import { useObservable, useObservableEvent } from "react-rx";
|
|
17
17
|
import { getVersionId, getDraftId, getPublishedId, isPublishedId, isDraftId, getVersionFromId, isVersionId, DRAFTS_FOLDER } from "@sanity/client/csm";
|
|
@@ -46,7 +46,7 @@ import { isHotkey } from "is-hotkey-esm";
|
|
|
46
46
|
import FocusLock from "react-focus-lock";
|
|
47
47
|
import { defineEvent, createSessionId, createBatchedStore } from "@sanity/telemetry";
|
|
48
48
|
import { isDraftId as isDraftId$1, isVersionId as isVersionId$1, getVersionNameFromId } from "@sanity/id-utils";
|
|
49
|
-
import { usePortableTextEditor, PortableTextEditor, usePortableTextEditorSelection, PortableTextEditable, EditorProvider,
|
|
49
|
+
import { usePortableTextEditor, PortableTextEditor, usePortableTextEditorSelection, useEditor, useEditorSelector, PortableTextEditable, EditorProvider, defineSchema, keyGenerator as keyGenerator$1 } from "@portabletext/editor";
|
|
50
50
|
import { nanoid, customAlphabet } from "nanoid";
|
|
51
51
|
import { useTelemetry, TelemetryProvider, DeferredTelemetryProvider } from "@sanity/telemetry/react";
|
|
52
52
|
import { cleanupEfficiency, makeDiff, DIFF_INSERT, DIFF_DELETE, DIFF_EQUAL, applyPatches, parsePatch, makePatches } from "@sanity/diff-match-patch";
|
|
@@ -142,7 +142,7 @@ import last$1 from "lodash-es/last.js";
|
|
|
142
142
|
import getSlug from "speakingurl";
|
|
143
143
|
import { PortableText as PortableText$1, toPlainText as toPlainText$1 } from "@portabletext/react";
|
|
144
144
|
import { BehaviorPlugin, EventListenerPlugin } from "@portabletext/editor/plugins";
|
|
145
|
-
import { getValue as getValue$1 } from "@portabletext/editor/selectors";
|
|
145
|
+
import { getSelectionStartBlock, getSelectionEndBlock, getValue as getValue$1 } from "@portabletext/editor/selectors";
|
|
146
146
|
import { OneLinePlugin } from "@portabletext/plugin-one-line";
|
|
147
147
|
import { defineBehavior, raise, forward } from "@portabletext/editor/behaviors";
|
|
148
148
|
import { isPortableTextBlock, toPlainText } from "@portabletext/toolkit";
|
|
@@ -966,7 +966,7 @@ function VisibleWorkspacesProvider(t0) {
|
|
|
966
966
|
children
|
|
967
967
|
} = t0, allWorkspaces = useWorkspaces();
|
|
968
968
|
let t1;
|
|
969
|
-
$[0] !== allWorkspaces ? (t1 = allWorkspaces.filter(_temp$
|
|
969
|
+
$[0] !== allWorkspaces ? (t1 = allWorkspaces.filter(_temp$3Q), $[0] = allWorkspaces, $[1] = t1) : t1 = $[1];
|
|
970
970
|
const workspacesNeedingAuth = t1, [workspaceAuthStates] = useWorkspaceAuthStates(workspacesNeedingAuth);
|
|
971
971
|
let t2;
|
|
972
972
|
if ($[2] !== allWorkspaces || $[3] !== workspaceAuthStates) {
|
|
@@ -983,7 +983,7 @@ function VisibleWorkspacesProvider(t0) {
|
|
|
983
983
|
let t4;
|
|
984
984
|
return $[10] !== children || $[11] !== value ? (t4 = /* @__PURE__ */ jsx(VisibleWorkspacesContext.Provider, { value, children }), $[10] = children, $[11] = value, $[12] = t4) : t4 = $[12], t4;
|
|
985
985
|
}
|
|
986
|
-
function _temp$
|
|
986
|
+
function _temp$3Q(workspace) {
|
|
987
987
|
return typeof workspace.hidden == "function";
|
|
988
988
|
}
|
|
989
989
|
const DEBUG_MODE$2 = !1, SPINNER_DELAY = 750, TEXT_DELAY = 2e3, StyledCard$6 = /* @__PURE__ */ styled(Card).withConfig({
|
|
@@ -3473,7 +3473,7 @@ function useGetI18nText(input) {
|
|
|
3473
3473
|
let t0;
|
|
3474
3474
|
if ($[0] !== input) {
|
|
3475
3475
|
const items = Array.isArray(input) ? input : [input];
|
|
3476
|
-
t0 = JSON.stringify(items.flatMap(_temp2$
|
|
3476
|
+
t0 = JSON.stringify(items.flatMap(_temp2$1D).filter(isNonNullable$2).sort()), $[0] = input, $[1] = t0;
|
|
3477
3477
|
} else
|
|
3478
3478
|
t0 = $[1];
|
|
3479
3479
|
const stableNamespaces = t0;
|
|
@@ -3507,10 +3507,10 @@ function useGetI18nText(input) {
|
|
|
3507
3507
|
}) : node;
|
|
3508
3508
|
}, $[4] = t, $[5] = t2) : t2 = $[5], t2;
|
|
3509
3509
|
}
|
|
3510
|
-
function _temp2$
|
|
3511
|
-
return item?.i18n ? Object.values(item.i18n).map(_temp$
|
|
3510
|
+
function _temp2$1D(item) {
|
|
3511
|
+
return item?.i18n ? Object.values(item.i18n).map(_temp$3P) : [];
|
|
3512
3512
|
}
|
|
3513
|
-
function _temp$
|
|
3513
|
+
function _temp$3P(t0) {
|
|
3514
3514
|
const {
|
|
3515
3515
|
ns
|
|
3516
3516
|
} = t0;
|
|
@@ -3526,7 +3526,7 @@ function useI18nText(node) {
|
|
|
3526
3526
|
break bb0;
|
|
3527
3527
|
}
|
|
3528
3528
|
let t12;
|
|
3529
|
-
$[1] !== node.i18n ? (t12 = Array.from(new Set(Object.values(node.i18n).map(_temp$
|
|
3529
|
+
$[1] !== node.i18n ? (t12 = Array.from(new Set(Object.values(node.i18n).map(_temp$3O))).sort(), $[1] = node.i18n, $[2] = t12) : t12 = $[2], t0 = t12;
|
|
3530
3530
|
}
|
|
3531
3531
|
const namespaces = t0, {
|
|
3532
3532
|
t
|
|
@@ -3564,7 +3564,7 @@ function useI18nText(node) {
|
|
|
3564
3564
|
}
|
|
3565
3565
|
return t1;
|
|
3566
3566
|
}
|
|
3567
|
-
function _temp$
|
|
3567
|
+
function _temp$3O(t0) {
|
|
3568
3568
|
const {
|
|
3569
3569
|
ns
|
|
3570
3570
|
} = t0;
|
|
@@ -3858,7 +3858,7 @@ function useEnsureMediaLibrary(props2) {
|
|
|
3858
3858
|
bb0: {
|
|
3859
3859
|
const handleDefault = defaultIfEmpty({
|
|
3860
3860
|
status: "inactive"
|
|
3861
|
-
}), handleError = catchError$1(_temp$
|
|
3861
|
+
}), handleError = catchError$1(_temp$3N);
|
|
3862
3862
|
if (props2.from === "library") {
|
|
3863
3863
|
let t23;
|
|
3864
3864
|
$[6] !== props2.libraryId ? (t23 = (organizationId) => ({
|
|
@@ -3889,7 +3889,7 @@ function useEnsureMediaLibrary(props2) {
|
|
|
3889
3889
|
status: "loading"
|
|
3890
3890
|
}, $[10] = t2) : t2 = $[10], useObservable(observable, t2);
|
|
3891
3891
|
}
|
|
3892
|
-
function _temp$
|
|
3892
|
+
function _temp$3N(error) {
|
|
3893
3893
|
if (error instanceof ProvisionError)
|
|
3894
3894
|
return of({
|
|
3895
3895
|
status: "error",
|
|
@@ -4635,7 +4635,7 @@ function useAgentVersionDisplay(versionIds, activeBundleId) {
|
|
|
4635
4635
|
t
|
|
4636
4636
|
} = useTranslation();
|
|
4637
4637
|
let t0;
|
|
4638
|
-
$[0] !== bundles ? (t0 = new Set(bundles.map(_temp$
|
|
4638
|
+
$[0] !== bundles ? (t0 = new Set(bundles.map(_temp$3M)), $[0] = bundles, $[1] = t0) : t0 = $[1];
|
|
4639
4639
|
const myBundleIds = t0;
|
|
4640
4640
|
let t1;
|
|
4641
4641
|
if ($[2] !== activeBundleId || $[3] !== loading || $[4] !== myBundleIds || $[5] !== versionIds) {
|
|
@@ -4685,7 +4685,7 @@ function useAgentVersionDisplay(versionIds, activeBundleId) {
|
|
|
4685
4685
|
getVersionDisplay
|
|
4686
4686
|
}, $[29] = filteredVersionIds, $[30] = getVersionDisplay, $[31] = t8) : t8 = $[31], t8;
|
|
4687
4687
|
}
|
|
4688
|
-
function _temp$
|
|
4688
|
+
function _temp$3M(b) {
|
|
4689
4689
|
return b.id;
|
|
4690
4690
|
}
|
|
4691
4691
|
const hasSanityPackageInImportMap = () => !!getSanityImportMapUrl(), getSanityImportMapUrl = () => {
|
|
@@ -8654,7 +8654,7 @@ function useDocumentValuePermissions(t0) {
|
|
|
8654
8654
|
document: document2,
|
|
8655
8655
|
permission
|
|
8656
8656
|
});
|
|
8657
|
-
return subscriptionRef.current = permissions$.pipe(distinctUntilChanged$1(_temp$
|
|
8657
|
+
return subscriptionRef.current = permissions$.pipe(distinctUntilChanged$1(_temp$3L)).subscribe({
|
|
8658
8658
|
next: (value) => dispatch({
|
|
8659
8659
|
type: "value",
|
|
8660
8660
|
value
|
|
@@ -8668,7 +8668,7 @@ function useDocumentValuePermissions(t0) {
|
|
|
8668
8668
|
};
|
|
8669
8669
|
}, t2 = [grantsStore, document2, permission], $[0] = document2, $[1] = grantsStore, $[2] = permission, $[3] = t1, $[4] = t2) : (t1 = $[3], t2 = $[4]), useEffect(t1, t2), state;
|
|
8670
8670
|
}
|
|
8671
|
-
function _temp$
|
|
8671
|
+
function _temp$3L(prev, next) {
|
|
8672
8672
|
return isEqual$1(prev, next);
|
|
8673
8673
|
}
|
|
8674
8674
|
function refCountDelay(duration, scheduler = asapScheduler) {
|
|
@@ -9884,7 +9884,7 @@ function useTimelineStore(t0) {
|
|
|
9884
9884
|
}, $[27] = t11, $[28] = t7, $[29] = t8, $[30] = t9, $[31] = t12) : t12 = $[31], t12;
|
|
9885
9885
|
}
|
|
9886
9886
|
function _temp3$N(innerController_0) {
|
|
9887
|
-
const chunks = innerController_0.timeline.mapChunks(_temp$
|
|
9887
|
+
const chunks = innerController_0.timeline.mapChunks(_temp$3K), lastNonDeletedChunk = chunks.filter(_temp2$1C), hasMoreChunks = !innerController_0.timeline.reachedEarliestEntry;
|
|
9888
9888
|
hasMoreChunks && chunks.length > 16 && innerController_0.setLoadMore(!1);
|
|
9889
9889
|
const timelineReady = !["invalid", "loading"].includes(innerController_0.selectionState);
|
|
9890
9890
|
return {
|
|
@@ -9904,10 +9904,10 @@ function _temp3$N(innerController_0) {
|
|
|
9904
9904
|
timelineReady
|
|
9905
9905
|
};
|
|
9906
9906
|
}
|
|
9907
|
-
function _temp2$
|
|
9907
|
+
function _temp2$1C(chunk_1) {
|
|
9908
9908
|
return !["delete", "initial"].includes(chunk_1.type);
|
|
9909
9909
|
}
|
|
9910
|
-
function _temp$
|
|
9910
|
+
function _temp$3K(c2) {
|
|
9911
9911
|
return c2;
|
|
9912
9912
|
}
|
|
9913
9913
|
function createMemoryStorage() {
|
|
@@ -10227,7 +10227,10 @@ const REFETCH_INTERVAL = 300 * 1e3, getProjectOrg = memoize((client) => client.o
|
|
|
10227
10227
|
// during React effect setup and teardown due to rapidly changing deps
|
|
10228
10228
|
resetOnRefCountZero: () => timer(1e3)
|
|
10229
10229
|
})
|
|
10230
|
-
), (client) => `${client.config().projectId}-${client.config().dataset}`)
|
|
10230
|
+
), (client) => `${client.config().projectId}-${client.config().dataset}`), getProjectGrants = memoize((client) => client.observable.request({
|
|
10231
|
+
url: `/projects/${client.config().projectId}/grants`,
|
|
10232
|
+
tag: "get-grants"
|
|
10233
|
+
}).pipe(shareReplay$1(1)), (client) => `${client.config().projectId}-${client.config().dataset}`);
|
|
10231
10234
|
function createProjectStore(context) {
|
|
10232
10235
|
const {
|
|
10233
10236
|
client
|
|
@@ -10246,14 +10249,11 @@ function createProjectStore(context) {
|
|
|
10246
10249
|
tag: "get-datasets"
|
|
10247
10250
|
});
|
|
10248
10251
|
}
|
|
10249
|
-
const
|
|
10250
|
-
url: `/projects/${projectId}/grants`,
|
|
10251
|
-
tag: "get-grants"
|
|
10252
|
-
}).pipe(shareReplay$1(1)), projectOrgData$ = getProjectOrg(versionedClient2);
|
|
10252
|
+
const projectOrgData$ = getProjectOrg(versionedClient2);
|
|
10253
10253
|
return {
|
|
10254
10254
|
get: get2,
|
|
10255
10255
|
getDatasets,
|
|
10256
|
-
getGrants: () =>
|
|
10256
|
+
getGrants: () => getProjectGrants(versionedClient2),
|
|
10257
10257
|
getOrganizationData: () => projectOrgData$.pipe(map$1((res) => res?.organization ?? null)),
|
|
10258
10258
|
getOrganizationId: () => projectOrgData$.pipe(map$1((res) => res?.organizationId ?? null))
|
|
10259
10259
|
};
|
|
@@ -10377,11 +10377,11 @@ function createMultiKeyWeakMap() {
|
|
|
10377
10377
|
function ResourceCacheProvider(t0) {
|
|
10378
10378
|
const $ = c(3), {
|
|
10379
10379
|
children
|
|
10380
|
-
} = t0, [resourceCache] = useState(_temp$
|
|
10380
|
+
} = t0, [resourceCache] = useState(_temp$3J);
|
|
10381
10381
|
let t1;
|
|
10382
10382
|
return $[0] !== children || $[1] !== resourceCache ? (t1 = /* @__PURE__ */ jsx(ResourceCacheContext.Provider, { value: resourceCache, children }), $[0] = children, $[1] = resourceCache, $[2] = t1) : t1 = $[2], t1;
|
|
10383
10383
|
}
|
|
10384
|
-
function _temp$
|
|
10384
|
+
function _temp$3J() {
|
|
10385
10385
|
const namespaces = /* @__PURE__ */ new Map(), nullReplacer = {}, emptyDependenciesReplacer = [nullReplacer], removeNullDependencies = (dependencies) => dependencies.length ? dependencies.map((dep) => dep === null ? nullReplacer : dep) : emptyDependenciesReplacer;
|
|
10386
10386
|
return {
|
|
10387
10387
|
get: (t0) => {
|
|
@@ -11712,7 +11712,7 @@ function useEventsStore(t0) {
|
|
|
11712
11712
|
}, $[52] = events, $[53] = rev, $[54] = revisionId, $[55] = t13) : t13 = $[55];
|
|
11713
11713
|
const findRangeForSince = t13;
|
|
11714
11714
|
let t14;
|
|
11715
|
-
$[56] !== events ? (t14 = events.find(_temp$
|
|
11715
|
+
$[56] !== events ? (t14 = events.find(_temp$3I)?.id || null, $[56] = events, $[57] = t14) : t14 = $[57];
|
|
11716
11716
|
const lastNonDeletedRevId = t14;
|
|
11717
11717
|
let t15;
|
|
11718
11718
|
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 = {
|
|
@@ -11731,30 +11731,30 @@ function useEventsStore(t0) {
|
|
|
11731
11731
|
lastNonDeletedRevId
|
|
11732
11732
|
}, $[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;
|
|
11733
11733
|
}
|
|
11734
|
-
function _temp$
|
|
11734
|
+
function _temp$3I(e_1) {
|
|
11735
11735
|
return !isDeleteDocumentGroupEvent(e_1) && !isDeleteDocumentVersionEvent(e_1);
|
|
11736
11736
|
}
|
|
11737
11737
|
const initial$1 = [], fallback$1 = of(initial$1);
|
|
11738
11738
|
function useDocumentPresence(documentId) {
|
|
11739
|
-
const $ = c(6), [mounted, mount] = useReducer(_temp$
|
|
11739
|
+
const $ = c(6), [mounted, mount] = useReducer(_temp$3H, !1);
|
|
11740
11740
|
let t0, t1;
|
|
11741
11741
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => startTransition(mount), t1 = [], $[0] = t0, $[1] = t1) : (t0 = $[0], t1 = $[1]), useEffect(t0, t1);
|
|
11742
11742
|
const presenceStore = usePresenceStore();
|
|
11743
11743
|
let t2;
|
|
11744
11744
|
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);
|
|
11745
11745
|
}
|
|
11746
|
-
function _temp$
|
|
11746
|
+
function _temp$3H() {
|
|
11747
11747
|
return !0;
|
|
11748
11748
|
}
|
|
11749
11749
|
const initial = [], fallback = of(initial);
|
|
11750
11750
|
function useGlobalPresence() {
|
|
11751
|
-
const $ = c(2), [mounted, mount] = useReducer(_temp$
|
|
11751
|
+
const $ = c(2), [mounted, mount] = useReducer(_temp$3G, !1);
|
|
11752
11752
|
let t0, t1;
|
|
11753
11753
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => startTransition(mount), t1 = [], $[0] = t0, $[1] = t1) : (t0 = $[0], t1 = $[1]), useEffect(t0, t1);
|
|
11754
11754
|
const presenceStore = usePresenceStore();
|
|
11755
11755
|
return useObservable(mounted ? presenceStore.globalPresence$ : fallback, initial);
|
|
11756
11756
|
}
|
|
11757
|
-
function _temp$
|
|
11757
|
+
function _temp$3G() {
|
|
11758
11758
|
return !0;
|
|
11759
11759
|
}
|
|
11760
11760
|
const AvatarSkeleton$1 = /* @__PURE__ */ styled(Skeleton).withConfig({
|
|
@@ -11873,7 +11873,7 @@ function useRelativeTime(time, t0) {
|
|
|
11873
11873
|
const $ = c(5);
|
|
11874
11874
|
let t1;
|
|
11875
11875
|
$[0] !== t0 ? (t1 = t0 === void 0 ? {} : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
11876
|
-
const options = t1, [now, updateNow] = useReducer(_temp$
|
|
11876
|
+
const options = t1, [now, updateNow] = useReducer(_temp$3F, null, _temp2$1B), resolved = useFormatRelativeTime(time, options.relativeTo || now, options);
|
|
11877
11877
|
let t2, t3;
|
|
11878
11878
|
return $[2] !== resolved.refreshInterval ? (t2 = () => {
|
|
11879
11879
|
let timerId;
|
|
@@ -11887,10 +11887,10 @@ function useRelativeTime(time, t0) {
|
|
|
11887
11887
|
};
|
|
11888
11888
|
}, t3 = [resolved.refreshInterval], $[2] = resolved.refreshInterval, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), useEffect(t2, t3), resolved.timestamp;
|
|
11889
11889
|
}
|
|
11890
|
-
function _temp2$
|
|
11890
|
+
function _temp2$1B() {
|
|
11891
11891
|
return Date.now();
|
|
11892
11892
|
}
|
|
11893
|
-
function _temp$
|
|
11893
|
+
function _temp$3F() {
|
|
11894
11894
|
return Date.now();
|
|
11895
11895
|
}
|
|
11896
11896
|
function useFormatRelativeTime(date, now, t0) {
|
|
@@ -12287,7 +12287,7 @@ const IconBox$1 = /* @__PURE__ */ styled(Flex).withConfig({
|
|
|
12287
12287
|
let t2;
|
|
12288
12288
|
$[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];
|
|
12289
12289
|
let t3;
|
|
12290
|
-
$[4] !== collaborators ? (t3 = collaborators.map(_temp$
|
|
12290
|
+
$[4] !== collaborators ? (t3 = collaborators.map(_temp$3E), $[4] = collaborators, $[5] = t3) : t3 = $[5];
|
|
12291
12291
|
let t4;
|
|
12292
12292
|
return $[6] !== t2 || $[7] !== t3 ? (t4 = /* @__PURE__ */ jsxs(Stack, { paddingBottom: 1, children: [
|
|
12293
12293
|
t2,
|
|
@@ -12388,7 +12388,7 @@ function Event$1(t0) {
|
|
|
12388
12388
|
t23
|
|
12389
12389
|
] }), $[52] = t22, $[53] = t23, $[54] = t24) : t24 = $[54], t24;
|
|
12390
12390
|
}
|
|
12391
|
-
function _temp$
|
|
12391
|
+
function _temp$3E(userId) {
|
|
12392
12392
|
return /* @__PURE__ */ jsx(UserLine, { userId }, userId);
|
|
12393
12393
|
}
|
|
12394
12394
|
function DiffTooltip(props2) {
|
|
@@ -12437,7 +12437,7 @@ function DiffTooltipWithAnnotation(props2) {
|
|
|
12437
12437
|
let t2;
|
|
12438
12438
|
$[9] !== t1 ? (t2 = /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, weight: "medium", children: t1 }), $[9] = t1, $[10] = t2) : t2 = $[10];
|
|
12439
12439
|
let t3;
|
|
12440
|
-
$[11] !== annotations ? (t3 = annotations.map(_temp$
|
|
12440
|
+
$[11] !== annotations ? (t3 = annotations.map(_temp$3D), $[11] = annotations, $[12] = t3) : t3 = $[12];
|
|
12441
12441
|
let t4;
|
|
12442
12442
|
$[13] !== t3 ? (t4 = /* @__PURE__ */ jsx(Stack, { space: 2, children: t3 }), $[13] = t3, $[14] = t4) : t4 = $[14];
|
|
12443
12443
|
let t5;
|
|
@@ -12449,7 +12449,7 @@ function DiffTooltipWithAnnotation(props2) {
|
|
|
12449
12449
|
let t6;
|
|
12450
12450
|
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;
|
|
12451
12451
|
}
|
|
12452
|
-
function _temp$
|
|
12452
|
+
function _temp$3D(annotation, idx) {
|
|
12453
12453
|
return /* @__PURE__ */ jsx(AnnotationItem, { annotation }, idx);
|
|
12454
12454
|
}
|
|
12455
12455
|
function AnnotationItem(t0) {
|
|
@@ -13329,12 +13329,12 @@ const SizeDiff = styled.div.withConfig({
|
|
|
13329
13329
|
$[2] !== fields ? (t3 = Object.entries(fields).filter((t42) => {
|
|
13330
13330
|
const [name, field] = t42;
|
|
13331
13331
|
return field.isChanged && !ignoredFields.includes(name);
|
|
13332
|
-
}).map(_temp$
|
|
13332
|
+
}).map(_temp$3C), $[2] = fields, $[3] = t3) : t3 = $[3];
|
|
13333
13333
|
const changedFields = t3, didAssetChange = changedFields.includes("asset");
|
|
13334
13334
|
let t4;
|
|
13335
13335
|
if ($[4] !== changedFields || $[5] !== schemaType.fields) {
|
|
13336
13336
|
let t52;
|
|
13337
|
-
$[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$
|
|
13337
|
+
$[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$1A), $[4] = changedFields, $[5] = schemaType.fields, $[6] = t4;
|
|
13338
13338
|
} else
|
|
13339
13339
|
t4 = $[6];
|
|
13340
13340
|
const nestedFields = t4, pctDiff = getSizeDiff(prev?.size, next?.size);
|
|
@@ -13388,11 +13388,11 @@ const SizeDiff = styled.div.withConfig({
|
|
|
13388
13388
|
t15
|
|
13389
13389
|
] }), $[50] = t14, $[51] = t15, $[52] = t16) : t16 = $[52], t16;
|
|
13390
13390
|
};
|
|
13391
|
-
function _temp$
|
|
13391
|
+
function _temp$3C(t0) {
|
|
13392
13392
|
const [name_0] = t0;
|
|
13393
13393
|
return name_0;
|
|
13394
13394
|
}
|
|
13395
|
-
function _temp2$
|
|
13395
|
+
function _temp2$1A(field_1) {
|
|
13396
13396
|
return field_1.name;
|
|
13397
13397
|
}
|
|
13398
13398
|
function hexToRgba(hex2, opacity) {
|
|
@@ -13605,7 +13605,7 @@ const IMAGE_META_FIELDS = ["crop", "hotspot"], BASE_IMAGE_FIELDS = ["asset", "me
|
|
|
13605
13605
|
let t4;
|
|
13606
13606
|
if ($[7] !== changedFields || $[8] !== schemaType.fields) {
|
|
13607
13607
|
let t52;
|
|
13608
|
-
$[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$
|
|
13608
|
+
$[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$3B), $[7] = changedFields, $[8] = schemaType.fields, $[9] = t4;
|
|
13609
13609
|
} else
|
|
13610
13610
|
t4 = $[9];
|
|
13611
13611
|
const nestedFields = t4;
|
|
@@ -13654,7 +13654,7 @@ function getChangeDescription(action, t) {
|
|
|
13654
13654
|
return "Unknown change";
|
|
13655
13655
|
}
|
|
13656
13656
|
}
|
|
13657
|
-
function _temp$
|
|
13657
|
+
function _temp$3B(field_0) {
|
|
13658
13658
|
return field_0.name;
|
|
13659
13659
|
}
|
|
13660
13660
|
const NumberWrapper = styled.div.withConfig({
|
|
@@ -14922,7 +14922,7 @@ function DiffInspectWrapper(props2) {
|
|
|
14922
14922
|
} = props2, $[0] = props2, $[1] = as, $[2] = change, $[3] = children, $[4] = restProps) : (as = $[1], change = $[2], children = $[3], restProps = $[4]);
|
|
14923
14923
|
const isHovering = useRef(!1), [isInspecting, setIsInspecting] = useState(!1);
|
|
14924
14924
|
let t0;
|
|
14925
|
-
$[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => setIsInspecting(_temp$
|
|
14925
|
+
$[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => setIsInspecting(_temp$3A), $[5] = t0) : t0 = $[5];
|
|
14926
14926
|
const toggleInspect = t0;
|
|
14927
14927
|
let t1;
|
|
14928
14928
|
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => isHovering.current = !0, $[6] = t1) : t1 = $[6];
|
|
@@ -14946,7 +14946,7 @@ function DiffInspectWrapper(props2) {
|
|
|
14946
14946
|
let t6;
|
|
14947
14947
|
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;
|
|
14948
14948
|
}
|
|
14949
|
-
function _temp$
|
|
14949
|
+
function _temp$3A(state) {
|
|
14950
14950
|
return !state;
|
|
14951
14951
|
}
|
|
14952
14952
|
const MetaLabel = (t0) => {
|
|
@@ -15294,7 +15294,7 @@ function FieldChange(props2) {
|
|
|
15294
15294
|
}, $[17] = t7) : t7 = $[17];
|
|
15295
15295
|
const handleRevertButtonMouseLeave = t7;
|
|
15296
15296
|
let t8;
|
|
15297
|
-
$[18] !== change.parentSchema ? (t8 = change.parentSchema?.jsonType === "array" && !change.parentSchema.of.some(_temp$
|
|
15297
|
+
$[18] !== change.parentSchema ? (t8 = change.parentSchema?.jsonType === "array" && !change.parentSchema.of.some(_temp$3z), $[18] = change.parentSchema, $[19] = t8) : t8 = $[19];
|
|
15298
15298
|
const isArray2 = t8;
|
|
15299
15299
|
let t9;
|
|
15300
15300
|
$[20] !== change.path || $[21] !== isArray2 ? (t9 = isArray2 ? change.path.slice(0, -1) : change.path, $[20] = change.path, $[21] = isArray2, $[22] = t9) : t9 = $[22];
|
|
@@ -15335,7 +15335,7 @@ function FieldChange(props2) {
|
|
|
15335
15335
|
t21
|
|
15336
15336
|
] }), $[65] = t20, $[66] = t21, $[67] = t22) : t22 = $[67], t22;
|
|
15337
15337
|
}
|
|
15338
|
-
function _temp$
|
|
15338
|
+
function _temp$3z(ofType) {
|
|
15339
15339
|
return ofType.type?.name === "block";
|
|
15340
15340
|
}
|
|
15341
15341
|
const ChangeListWrapper = styled.div.withConfig({
|
|
@@ -15374,7 +15374,7 @@ function GroupChange(props2) {
|
|
|
15374
15374
|
isComparingCurrent
|
|
15375
15375
|
} = useDocumentChange(), FieldWrapper2 = t0 === void 0 ? Fragment : t0;
|
|
15376
15376
|
let t1;
|
|
15377
|
-
$[5] !== changes ? (t1 = changes.every(_temp$
|
|
15377
|
+
$[5] !== changes ? (t1 = changes.every(_temp$3y), $[5] = changes, $[6] = t1) : t1 = $[6];
|
|
15378
15378
|
const isPortableText2 = t1;
|
|
15379
15379
|
let t2;
|
|
15380
15380
|
$[7] !== diffPath || $[8] !== groupPath ? (t2 = pathsAreEqual(diffPath, groupPath), $[7] = diffPath, $[8] = groupPath, $[9] = t2) : t2 = $[9];
|
|
@@ -15418,7 +15418,7 @@ function GroupChange(props2) {
|
|
|
15418
15418
|
] }), $[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];
|
|
15419
15419
|
const content = t8;
|
|
15420
15420
|
let t9;
|
|
15421
|
-
$[34] !== group2.schemaType ? (t9 = group2.schemaType?.jsonType === "array" && group2.schemaType.of.some(_temp2$
|
|
15421
|
+
$[34] !== group2.schemaType ? (t9 = group2.schemaType?.jsonType === "array" && group2.schemaType.of.some(_temp2$1z), $[34] = group2.schemaType, $[35] = t9) : t9 = $[35];
|
|
15422
15422
|
const isPortableTextGroupArray = t9;
|
|
15423
15423
|
let t10;
|
|
15424
15424
|
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: [
|
|
@@ -15426,10 +15426,10 @@ function GroupChange(props2) {
|
|
|
15426
15426
|
isNestedInDiff || isPortableTextGroupArray ? content : /* @__PURE__ */ jsx(FieldWrapper2, { hasRevertHover: isRevertButtonHovered, path: groupPath, children: content })
|
|
15427
15427
|
] }), $[36] = FieldWrapper2, $[37] = content, $[38] = groupPath, $[39] = hidden, $[40] = isNestedInDiff, $[41] = isPortableTextGroupArray, $[42] = isRevertButtonHovered, $[43] = restProps, $[44] = titlePath, $[45] = t10) : t10 = $[45], t10;
|
|
15428
15428
|
}
|
|
15429
|
-
function _temp2$
|
|
15429
|
+
function _temp2$1z(ofType) {
|
|
15430
15430
|
return ofType.name === "block";
|
|
15431
15431
|
}
|
|
15432
|
-
function _temp$
|
|
15432
|
+
function _temp$3y(change) {
|
|
15433
15433
|
return isFieldChange(change) && isPTSchemaType(change.schemaType);
|
|
15434
15434
|
}
|
|
15435
15435
|
function useHover(node) {
|
|
@@ -15627,7 +15627,7 @@ function ChangesError(t0) {
|
|
|
15627
15627
|
$[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: {
|
|
15628
15628
|
revisionId: error.revisionId
|
|
15629
15629
|
}, components: {
|
|
15630
|
-
Break: _temp$
|
|
15630
|
+
Break: _temp$3x
|
|
15631
15631
|
} }) }) }), $[8] = error, $[9] = revisionNotFoundError, $[10] = t, $[11] = t5) : t5 = $[11];
|
|
15632
15632
|
let t6;
|
|
15633
15633
|
return $[12] !== t2 || $[13] !== t4 || $[14] !== t5 ? (t6 = /* @__PURE__ */ jsx(Card, { tone: "caution", padding: 3, children: /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
@@ -15636,7 +15636,7 @@ function ChangesError(t0) {
|
|
|
15636
15636
|
t5
|
|
15637
15637
|
] }) }), $[12] = t2, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15], t6;
|
|
15638
15638
|
}
|
|
15639
|
-
function _temp$
|
|
15639
|
+
function _temp$3x() {
|
|
15640
15640
|
return /* @__PURE__ */ jsx("br", {});
|
|
15641
15641
|
}
|
|
15642
15642
|
const RoundedCard = styled.span.withConfig({
|
|
@@ -15700,11 +15700,11 @@ function DiffString(props2) {
|
|
|
15700
15700
|
let t0;
|
|
15701
15701
|
$[0] !== diff.segments ? (t0 = diff.segments || [], $[0] = diff.segments, $[1] = t0) : t0 = $[1];
|
|
15702
15702
|
let t1;
|
|
15703
|
-
$[2] !== t0 ? (t1 = t0.map(_temp$
|
|
15703
|
+
$[2] !== t0 ? (t1 = t0.map(_temp$3w), $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
15704
15704
|
let t2;
|
|
15705
15705
|
return $[4] !== t1 ? (t2 = /* @__PURE__ */ jsx(Fragment$1, { children: t1 }), $[4] = t1, $[5] = t2) : t2 = $[5], t2;
|
|
15706
15706
|
}
|
|
15707
|
-
function _temp$
|
|
15707
|
+
function _temp$3w(segment, segmentIndex) {
|
|
15708
15708
|
return /* @__PURE__ */ jsx(DiffStringSegment, { segment }, segmentIndex);
|
|
15709
15709
|
}
|
|
15710
15710
|
const MetaText = styled(Text$1).withConfig({
|
|
@@ -15940,12 +15940,12 @@ function useChildValidation(path, t0) {
|
|
|
15940
15940
|
let t1;
|
|
15941
15941
|
if ($[0] !== inclusive || $[1] !== path || $[2] !== validation2) {
|
|
15942
15942
|
let t2;
|
|
15943
|
-
$[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$
|
|
15943
|
+
$[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$3v), $[0] = inclusive, $[1] = path, $[2] = validation2, $[3] = t1;
|
|
15944
15944
|
} else
|
|
15945
15945
|
t1 = $[3];
|
|
15946
15946
|
return t1;
|
|
15947
15947
|
}
|
|
15948
|
-
function _temp$
|
|
15948
|
+
function _temp$3v(marker) {
|
|
15949
15949
|
return {
|
|
15950
15950
|
message: marker.message,
|
|
15951
15951
|
level: marker.level,
|
|
@@ -16329,7 +16329,7 @@ const DefaultAnnotationComponent = (props2) => {
|
|
|
16329
16329
|
textElement,
|
|
16330
16330
|
validation: validation2,
|
|
16331
16331
|
value
|
|
16332
|
-
} = props2, isLink = schemaType.name === "link", hasError = validation2.some(_temp$
|
|
16332
|
+
} = props2, isLink = schemaType.name === "link", hasError = validation2.some(_temp$3u), hasWarning = validation2.some(_temp2$1y), hasMarkers = markers.length > 0, {
|
|
16333
16333
|
t
|
|
16334
16334
|
} = useTranslation(), {
|
|
16335
16335
|
register,
|
|
@@ -16372,10 +16372,10 @@ const DefaultAnnotationComponent = (props2) => {
|
|
|
16372
16372
|
let t11;
|
|
16373
16373
|
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;
|
|
16374
16374
|
};
|
|
16375
|
-
function _temp$
|
|
16375
|
+
function _temp$3u(v) {
|
|
16376
16376
|
return v.level === "error";
|
|
16377
16377
|
}
|
|
16378
|
-
function _temp2$
|
|
16378
|
+
function _temp2$1y(v_0) {
|
|
16379
16379
|
return v_0.level === "warning";
|
|
16380
16380
|
}
|
|
16381
16381
|
function createStore(reportedValues, publish2) {
|
|
@@ -16395,7 +16395,7 @@ function createStore(reportedValues, publish2) {
|
|
|
16395
16395
|
};
|
|
16396
16396
|
}
|
|
16397
16397
|
function useTrackerStore() {
|
|
16398
|
-
const $ = c(9), [reportedValues] = useState(_temp$
|
|
16398
|
+
const $ = c(9), [reportedValues] = useState(_temp$3t);
|
|
16399
16399
|
let t0;
|
|
16400
16400
|
$[0] !== reportedValues ? (t0 = () => Array.from(reportedValues.entries()), $[0] = reportedValues, $[1] = t0) : t0 = $[1];
|
|
16401
16401
|
let t1;
|
|
@@ -16415,7 +16415,7 @@ function useTrackerStore() {
|
|
|
16415
16415
|
snapshot: snapshot2
|
|
16416
16416
|
}, $[6] = snapshot2, $[7] = store, $[8] = t4) : t4 = $[8], t4;
|
|
16417
16417
|
}
|
|
16418
|
-
function _temp$
|
|
16418
|
+
function _temp$3t() {
|
|
16419
16419
|
return /* @__PURE__ */ new Map();
|
|
16420
16420
|
}
|
|
16421
16421
|
function useTrackerStoreReporter(store, id2, value, t0) {
|
|
@@ -16461,17 +16461,17 @@ const useChangeIndicatorsReporter = (id2, value, isEqual2) => {
|
|
|
16461
16461
|
function useHoveredChange() {
|
|
16462
16462
|
const $ = c(2), reportedValues = useChangeIndicatorsReportedValues();
|
|
16463
16463
|
let t0;
|
|
16464
|
-
$[0] !== reportedValues ? (t0 = reportedValues.filter(_temp$
|
|
16464
|
+
$[0] !== reportedValues ? (t0 = reportedValues.filter(_temp$3s).sort(_temp2$1x), $[0] = reportedValues, $[1] = t0) : t0 = $[1];
|
|
16465
16465
|
const hoveredEntry = t0[0];
|
|
16466
16466
|
if (hoveredEntry) {
|
|
16467
16467
|
const [, change_0] = hoveredEntry;
|
|
16468
16468
|
return change_0;
|
|
16469
16469
|
}
|
|
16470
16470
|
}
|
|
16471
|
-
function _temp2$
|
|
16471
|
+
function _temp2$1x(a, b) {
|
|
16472
16472
|
return b[1].path.length - a[1].path.length;
|
|
16473
16473
|
}
|
|
16474
|
-
function _temp$
|
|
16474
|
+
function _temp$3s(t0) {
|
|
16475
16475
|
const [, change] = t0;
|
|
16476
16476
|
return change.hasHover;
|
|
16477
16477
|
}
|
|
@@ -16973,8 +16973,8 @@ function useDivergenceNavigator(t0) {
|
|
|
16973
16973
|
let t102;
|
|
16974
16974
|
$[9] !== divergences ? (t102 = combineLatest({
|
|
16975
16975
|
divergences,
|
|
16976
|
-
schemaType: schemaTypeContext.pipe(filter$1(_temp$
|
|
16977
|
-
formState: formStateContext.pipe(filter$1(_temp2$
|
|
16976
|
+
schemaType: schemaTypeContext.pipe(filter$1(_temp$3r)),
|
|
16977
|
+
formState: formStateContext.pipe(filter$1(_temp2$1w), distinctUntilChanged$1(_temp3$M), map$1(_temp4$k))
|
|
16978
16978
|
}), $[9] = divergences, $[10] = t102) : t102 = $[10], t9 = t102;
|
|
16979
16979
|
}
|
|
16980
16980
|
const context = t9;
|
|
@@ -17037,10 +17037,10 @@ function _temp4$k(state) {
|
|
|
17037
17037
|
function _temp3$M(previous, current) {
|
|
17038
17038
|
return previous.value?._id === current.value?._id;
|
|
17039
17039
|
}
|
|
17040
|
-
function _temp2$
|
|
17040
|
+
function _temp2$1w(value_0) {
|
|
17041
17041
|
return typeof value_0 < "u";
|
|
17042
17042
|
}
|
|
17043
|
-
function _temp$
|
|
17043
|
+
function _temp$3r(value) {
|
|
17044
17044
|
return typeof value < "u";
|
|
17045
17045
|
}
|
|
17046
17046
|
function withAddressablePaths(state) {
|
|
@@ -17820,7 +17820,7 @@ const FormGutterCustomProperties = /* @__PURE__ */ styled.div.withConfig({
|
|
|
17820
17820
|
schemaType,
|
|
17821
17821
|
formState
|
|
17822
17822
|
}, $[23] = collatedDivergences.observable, $[24] = formState, $[25] = schemaType, $[26] = t4) : t4 = $[26];
|
|
17823
|
-
const divergenceNavigator = useDivergenceNavigator(t4), [sessionId2] = useState(_temp$
|
|
17823
|
+
const divergenceNavigator = useDivergenceNavigator(t4), [sessionId2] = useState(_temp$3q);
|
|
17824
17824
|
let t5;
|
|
17825
17825
|
$[27] !== divergenceNavigator || $[28] !== sessionId2 ? (t5 = {
|
|
17826
17826
|
enabled: !0,
|
|
@@ -17906,7 +17906,7 @@ function useCollateDivergencesContext(t0) {
|
|
|
17906
17906
|
if ($[29] !== context || $[30] !== readUpstreamAtFork) {
|
|
17907
17907
|
let t14;
|
|
17908
17908
|
$[32] !== context ? (t14 = (nextContext) => context.next(nextContext), $[32] = context, $[33] = t14) : t14 = $[33], t13 = combineLatest({
|
|
17909
|
-
upstreamHead: listenUpstreamHead.pipe(filter$1(_temp2$
|
|
17909
|
+
upstreamHead: listenUpstreamHead.pipe(filter$1(_temp2$1v)),
|
|
17910
17910
|
subjectHead: listenSubjectHead.pipe(filter$1(_temp3$L)),
|
|
17911
17911
|
resolutions: listenResolutions.pipe(map$1(_temp4$j)),
|
|
17912
17912
|
upstreamAtFork: readUpstreamAtFork.pipe(filter$1(_temp5$b), map$1(_temp6$7), filter$1(_temp7$4))
|
|
@@ -17933,10 +17933,10 @@ function _temp4$j(nextResolutions) {
|
|
|
17933
17933
|
function _temp3$L(document_0) {
|
|
17934
17934
|
return typeof document_0 < "u" && document_0 !== null;
|
|
17935
17935
|
}
|
|
17936
|
-
function _temp2$
|
|
17936
|
+
function _temp2$1v(document2) {
|
|
17937
17937
|
return typeof document2 < "u" && document2 !== null;
|
|
17938
17938
|
}
|
|
17939
|
-
function _temp$
|
|
17939
|
+
function _temp$3q() {
|
|
17940
17940
|
return uuid();
|
|
17941
17941
|
}
|
|
17942
17942
|
const FormDivergenceIndicator = (props2) => {
|
|
@@ -18155,7 +18155,7 @@ function useDivergenceController(divergence, allDivergences, contextReadOnly) {
|
|
|
18155
18155
|
let t32;
|
|
18156
18156
|
$[10] !== path ? (t32 = (state) => state?.loading ? of({
|
|
18157
18157
|
isLoading: !0
|
|
18158
|
-
}) : of(state).pipe(filter$1(_temp$
|
|
18158
|
+
}) : of(state).pipe(filter$1(_temp$3p), map$1(_temp2$1u), switchMap$1((document_0) => document_0 ? of(get$1(document_0, path)).pipe(map$1((value) => ({
|
|
18159
18159
|
value,
|
|
18160
18160
|
document: document_0
|
|
18161
18161
|
})), startWith$1(void 0)) : EMPTY$5), map$1(_temp3$K)), $[10] = path, $[11] = t32) : t32 = $[11], t2 = getDocumentAtRevision({
|
|
@@ -18251,13 +18251,13 @@ function _temp3$K(value_0) {
|
|
|
18251
18251
|
value: value_0
|
|
18252
18252
|
};
|
|
18253
18253
|
}
|
|
18254
|
-
function _temp2$
|
|
18254
|
+
function _temp2$1u(t0) {
|
|
18255
18255
|
const {
|
|
18256
18256
|
document: document2
|
|
18257
18257
|
} = t0;
|
|
18258
18258
|
return document2;
|
|
18259
18259
|
}
|
|
18260
|
-
function _temp$
|
|
18260
|
+
function _temp$3p(revision) {
|
|
18261
18261
|
return revision !== null;
|
|
18262
18262
|
}
|
|
18263
18263
|
function createResolutionMarkers(document2, reachableDivergence) {
|
|
@@ -18630,7 +18630,7 @@ const FieldActionMenu = memo(function(props2) {
|
|
|
18630
18630
|
$[4] !== nodes ? (t2 = nodes.filter(renderAsButton), $[4] = nodes, $[5] = t2) : t2 = $[5];
|
|
18631
18631
|
const buttonNodes = t2;
|
|
18632
18632
|
let t3;
|
|
18633
|
-
$[6] !== nodes ? (t3 = nodes.filter(_temp$
|
|
18633
|
+
$[6] !== nodes ? (t3 = nodes.filter(_temp$3o), $[6] = nodes, $[7] = t3) : t3 = $[7];
|
|
18634
18634
|
const menuNodesProp = t3;
|
|
18635
18635
|
let t4;
|
|
18636
18636
|
bb0: {
|
|
@@ -18699,7 +18699,7 @@ function RootFieldActionMenuGroup(props2) {
|
|
|
18699
18699
|
open
|
|
18700
18700
|
} = props2, {
|
|
18701
18701
|
title
|
|
18702
|
-
} = useI18nText(node), handlePointerDown = _temp2$
|
|
18702
|
+
} = useI18nText(node), handlePointerDown = _temp2$1t, t0 = open ? void 0 : title;
|
|
18703
18703
|
let t1;
|
|
18704
18704
|
$[0] !== node.title ? (t1 = {
|
|
18705
18705
|
...STATUS_BUTTON_TOOLTIP_PROPS,
|
|
@@ -18715,10 +18715,10 @@ function RootFieldActionMenuGroup(props2) {
|
|
|
18715
18715
|
let t6;
|
|
18716
18716
|
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;
|
|
18717
18717
|
}
|
|
18718
|
-
function _temp2$
|
|
18718
|
+
function _temp2$1t(event) {
|
|
18719
18719
|
event.preventDefault();
|
|
18720
18720
|
}
|
|
18721
|
-
function _temp$
|
|
18721
|
+
function _temp$3o(node) {
|
|
18722
18722
|
return !renderAsButton(node);
|
|
18723
18723
|
}
|
|
18724
18724
|
function useHoveredField() {
|
|
@@ -18823,7 +18823,7 @@ const FieldActionsResolver = memo(function(props2) {
|
|
|
18823
18823
|
t6 = $[15];
|
|
18824
18824
|
const FieldActions = t6;
|
|
18825
18825
|
let t7;
|
|
18826
|
-
$[21] !== FieldActions ? (t7 = FieldActions.map(_temp$
|
|
18826
|
+
$[21] !== FieldActions ? (t7 = FieldActions.map(_temp$3n), $[21] = FieldActions, $[22] = t7) : t7 = $[22];
|
|
18827
18827
|
let t8;
|
|
18828
18828
|
return $[23] !== t7 ? (t8 = /* @__PURE__ */ jsx(Fragment$1, { children: t7 }), $[23] = t7, $[24] = t8) : t8 = $[24], t8;
|
|
18829
18829
|
});
|
|
@@ -18855,7 +18855,7 @@ function defineFieldActionComponent({
|
|
|
18855
18855
|
}, t2 = [node], $[1] = node, $[2] = t1, $[3] = t2) : (t1 = $[2], t2 = $[3]), useEffect(t1, t2), null;
|
|
18856
18856
|
});
|
|
18857
18857
|
}
|
|
18858
|
-
function _temp$
|
|
18858
|
+
function _temp$3n(FieldAction, key) {
|
|
18859
18859
|
return /* @__PURE__ */ jsx(FieldAction, {}, key);
|
|
18860
18860
|
}
|
|
18861
18861
|
function useFieldActions() {
|
|
@@ -18864,7 +18864,7 @@ function useFieldActions() {
|
|
|
18864
18864
|
const HoveredFieldProvider = memo(function(props2) {
|
|
18865
18865
|
const $ = c(17), {
|
|
18866
18866
|
children
|
|
18867
|
-
} = props2, [listeners] = useState(_temp$
|
|
18867
|
+
} = props2, [listeners] = useState(_temp$3m);
|
|
18868
18868
|
let t0;
|
|
18869
18869
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0];
|
|
18870
18870
|
const hoveredStackRef = useRef(t0);
|
|
@@ -18910,7 +18910,7 @@ const HoveredFieldProvider = memo(function(props2) {
|
|
|
18910
18910
|
let t7;
|
|
18911
18911
|
return $[14] !== children || $[15] !== context ? (t7 = /* @__PURE__ */ jsx(HoveredFieldContext.Provider, { value: context, children }), $[14] = children, $[15] = context, $[16] = t7) : t7 = $[16], t7;
|
|
18912
18912
|
});
|
|
18913
|
-
function _temp$
|
|
18913
|
+
function _temp$3m() {
|
|
18914
18914
|
return /* @__PURE__ */ new Set();
|
|
18915
18915
|
}
|
|
18916
18916
|
function useDidUpdate(current, didUpdate, t0) {
|
|
@@ -19036,7 +19036,7 @@ function ImageOrFileField(field) {
|
|
|
19036
19036
|
const $ = c(34), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$q), documentId = usePublishedId$1(), focused = !!field.inputProps.focused;
|
|
19037
19037
|
let t0;
|
|
19038
19038
|
if ($[0] !== field.inputProps.members || $[1] !== field.presence) {
|
|
19039
|
-
const hotspotField = field.inputProps.members.find(_temp$
|
|
19039
|
+
const hotspotField = field.inputProps.members.find(_temp$3l);
|
|
19040
19040
|
t0 = hotspotField?.open ? field.presence : field.presence.concat(hotspotField?.field.presence || EMPTY_ARRAY$q), $[0] = field.inputProps.members, $[1] = field.presence, $[2] = t0;
|
|
19041
19041
|
} else
|
|
19042
19042
|
t0 = $[2];
|
|
@@ -19053,7 +19053,7 @@ function ImageOrFileField(field) {
|
|
|
19053
19053
|
t3
|
|
19054
19054
|
] }), $[31] = t1, $[32] = t3, $[33] = t4) : t4 = $[33], t4;
|
|
19055
19055
|
}
|
|
19056
|
-
function _temp$
|
|
19056
|
+
function _temp$3l(member) {
|
|
19057
19057
|
return member.kind === "field" && member.name === "hotspot";
|
|
19058
19058
|
}
|
|
19059
19059
|
function defaultResolveFieldComponent(schemaType) {
|
|
@@ -19930,11 +19930,11 @@ function useSearchMaxFieldDepth(overrideClient) {
|
|
|
19930
19930
|
client
|
|
19931
19931
|
}).pipe(shareReplay()));
|
|
19932
19932
|
let t1;
|
|
19933
|
-
$[2] !== dataset ? (t1 = cachedSettings.get(dataset).pipe(map(_temp$
|
|
19933
|
+
$[2] !== dataset ? (t1 = cachedSettings.get(dataset).pipe(map(_temp$3k), startWith(INITIAL_LOADING_STATE$5), catchError(_temp2$1s)), $[2] = dataset, $[3] = t1) : t1 = $[3];
|
|
19934
19934
|
const maxFieldDepth = useObservable(t1, INITIAL_LOADING_STATE$5)?.settings?.partialIndexSettings?.maxFieldDepth;
|
|
19935
19935
|
return isFinite(maxFieldDepth) ? Math.min(maxFieldDepth, DEFAULT_MAX_FIELD_DEPTH) : DEFAULT_MAX_FIELD_DEPTH;
|
|
19936
19936
|
}
|
|
19937
|
-
function _temp2$
|
|
19937
|
+
function _temp2$1s(err) {
|
|
19938
19938
|
return console.error(err), of({
|
|
19939
19939
|
isLoading: !1,
|
|
19940
19940
|
enabled: !0,
|
|
@@ -19945,7 +19945,7 @@ function _temp2$1t(err) {
|
|
|
19945
19945
|
}
|
|
19946
19946
|
});
|
|
19947
19947
|
}
|
|
19948
|
-
function _temp$
|
|
19948
|
+
function _temp$3k(settings) {
|
|
19949
19949
|
return {
|
|
19950
19950
|
isLoading: !1,
|
|
19951
19951
|
settings
|
|
@@ -20093,7 +20093,7 @@ function CreateButton(props2) {
|
|
|
20093
20093
|
const currentUser = useCurrentUser(), {
|
|
20094
20094
|
t
|
|
20095
20095
|
} = useTranslation(), getI18nText = useGetI18nText(createOptions);
|
|
20096
|
-
if (!createOptions.some(_temp$
|
|
20096
|
+
if (!createOptions.some(_temp$3j)) {
|
|
20097
20097
|
let t02;
|
|
20098
20098
|
$[6] !== currentUser ? (t02 = /* @__PURE__ */ jsx(InsufficientPermissionsMessage, { currentUser, context: "create-new-reference" }), $[6] = currentUser, $[7] = t02) : t02 = $[7];
|
|
20099
20099
|
let t1;
|
|
@@ -20106,7 +20106,7 @@ function CreateButton(props2) {
|
|
|
20106
20106
|
let t0;
|
|
20107
20107
|
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;
|
|
20108
20108
|
}
|
|
20109
|
-
function _temp$
|
|
20109
|
+
function _temp$3j(option) {
|
|
20110
20110
|
return option.permission.granted;
|
|
20111
20111
|
}
|
|
20112
20112
|
function sortReleases(releases2 = []) {
|
|
@@ -20148,7 +20148,7 @@ function useActiveReleases() {
|
|
|
20148
20148
|
dispatch
|
|
20149
20149
|
} = useReleasesStore(), state = useObservable(state$);
|
|
20150
20150
|
let t0;
|
|
20151
|
-
$[0] !== state.releases ? (t0 = sortReleases(Array.from(state.releases.values()).filter(_temp$
|
|
20151
|
+
$[0] !== state.releases ? (t0 = sortReleases(Array.from(state.releases.values()).filter(_temp$3i)).reverse(), $[0] = state.releases, $[1] = t0) : t0 = $[1];
|
|
20152
20152
|
const releasesAsArray = t0, t1 = state.error;
|
|
20153
20153
|
let t2;
|
|
20154
20154
|
$[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = ["loading", "initialising"], $[2] = t2) : t2 = $[2];
|
|
@@ -20161,7 +20161,7 @@ function useActiveReleases() {
|
|
|
20161
20161
|
loading: t3
|
|
20162
20162
|
}, $[3] = dispatch, $[4] = releasesAsArray, $[5] = state.error, $[6] = t3, $[7] = t4) : t4 = $[7], t4;
|
|
20163
20163
|
}
|
|
20164
|
-
function _temp$
|
|
20164
|
+
function _temp$3i(release) {
|
|
20165
20165
|
return !ARCHIVED_RELEASE_STATES.includes(release.state);
|
|
20166
20166
|
}
|
|
20167
20167
|
const Dot$2 = /* @__PURE__ */ styled.div.withConfig({
|
|
@@ -20252,15 +20252,15 @@ function DocumentStatusIndicator(t0) {
|
|
|
20252
20252
|
$[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];
|
|
20253
20253
|
const indicators = t14;
|
|
20254
20254
|
let t15;
|
|
20255
|
-
return $[19] !== indicators ? (t15 = /* @__PURE__ */ jsx(Flex, { children: indicators.filter(_temp$
|
|
20255
|
+
return $[19] !== indicators ? (t15 = /* @__PURE__ */ jsx(Flex, { children: indicators.filter(_temp$3h).map(_temp2$1r) }), $[19] = indicators, $[20] = t15) : t15 = $[20], t15;
|
|
20256
20256
|
}
|
|
20257
|
-
function _temp2$
|
|
20257
|
+
function _temp2$1r(t0, index) {
|
|
20258
20258
|
const {
|
|
20259
20259
|
status
|
|
20260
20260
|
} = t0;
|
|
20261
20261
|
return /* @__PURE__ */ jsx(Dot$2, { "data-status": status, $index: index + 1 }, status);
|
|
20262
20262
|
}
|
|
20263
|
-
function _temp$
|
|
20263
|
+
function _temp$3h(t0) {
|
|
20264
20264
|
const {
|
|
20265
20265
|
show
|
|
20266
20266
|
} = t0;
|
|
@@ -20455,7 +20455,7 @@ function PreviewReferenceValue$2(props2) {
|
|
|
20455
20455
|
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) {
|
|
20456
20456
|
const t72 = value._ref, t82 = value._strengthenOnPublish?.type;
|
|
20457
20457
|
let t92;
|
|
20458
|
-
$[15] !== type.to ? (t92 = type.to.map(_temp$
|
|
20458
|
+
$[15] !== type.to ? (t92 = type.to.map(_temp$3g), $[15] = type.to, $[16] = t92) : t92 = $[16];
|
|
20459
20459
|
let t10;
|
|
20460
20460
|
$[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;
|
|
20461
20461
|
break bb0;
|
|
@@ -20515,17 +20515,17 @@ function PreviewReferenceValue$2(props2) {
|
|
|
20515
20515
|
if (!refType_0) {
|
|
20516
20516
|
const t22 = value._ref, t3 = refTypeName || "<unknown>";
|
|
20517
20517
|
let t4;
|
|
20518
|
-
$[52] !== type.to ? (t4 = type.to.map(_temp2$
|
|
20518
|
+
$[52] !== type.to ? (t4 = type.to.map(_temp2$1q), $[52] = type.to, $[53] = t4) : t4 = $[53];
|
|
20519
20519
|
let t5;
|
|
20520
20520
|
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;
|
|
20521
20521
|
}
|
|
20522
20522
|
let t2;
|
|
20523
20523
|
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;
|
|
20524
20524
|
}
|
|
20525
|
-
function _temp2$
|
|
20525
|
+
function _temp2$1q(toType_2) {
|
|
20526
20526
|
return toType_2.name;
|
|
20527
20527
|
}
|
|
20528
|
-
function _temp$
|
|
20528
|
+
function _temp$3g(toType_0) {
|
|
20529
20529
|
return toType_0.name;
|
|
20530
20530
|
}
|
|
20531
20531
|
function UnavailableMessage(props2) {
|
|
@@ -20624,7 +20624,7 @@ function Details(props2) {
|
|
|
20624
20624
|
} = props2, $[0] = props2, $[1] = children, $[2] = icon, $[3] = openProp, $[4] = restProps, $[5] = t0) : (children = $[1], icon = $[2], openProp = $[3], restProps = $[4], t0 = $[5]);
|
|
20625
20625
|
const title = t0 === void 0 ? "Details" : t0, [open, setOpen] = useState(openProp || !1);
|
|
20626
20626
|
let t1;
|
|
20627
|
-
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setOpen(_temp$
|
|
20627
|
+
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => setOpen(_temp$3f), $[6] = t1) : t1 = $[6];
|
|
20628
20628
|
const handleToggle = t1;
|
|
20629
20629
|
let t2, t3;
|
|
20630
20630
|
$[7] !== openProp ? (t2 = () => setOpen(openProp || !1), t3 = [openProp], $[7] = openProp, $[8] = t2, $[9] = t3) : (t2 = $[8], t3 = $[9]), useEffect(t2, t3);
|
|
@@ -20652,7 +20652,7 @@ function Details(props2) {
|
|
|
20652
20652
|
t11
|
|
20653
20653
|
] }), $[26] = restProps, $[27] = t11, $[28] = t9, $[29] = t12) : t12 = $[29], t12;
|
|
20654
20654
|
}
|
|
20655
|
-
function _temp$
|
|
20655
|
+
function _temp$3f(v) {
|
|
20656
20656
|
return !v;
|
|
20657
20657
|
}
|
|
20658
20658
|
const STATUS_TONES = {
|
|
@@ -20795,7 +20795,7 @@ const noop$5 = () => {
|
|
|
20795
20795
|
retry: noop$5
|
|
20796
20796
|
};
|
|
20797
20797
|
function useReferenceInfo$2(id2, getReferenceInfo2) {
|
|
20798
|
-
const $ = c(10), [t0] = useState(_temp$
|
|
20798
|
+
const $ = c(10), [t0] = useState(_temp$3e), [onRetry$2, onRetry2] = t0;
|
|
20799
20799
|
let t1;
|
|
20800
20800
|
if ($[0] !== getReferenceInfo2 || $[1] !== id2 || $[2] !== onRetry2 || $[3] !== onRetry$2) {
|
|
20801
20801
|
let t2;
|
|
@@ -20816,7 +20816,7 @@ function useReferenceInfo$2(id2, getReferenceInfo2) {
|
|
|
20816
20816
|
t1 = $[4];
|
|
20817
20817
|
return useObservable(t1, INITIAL_LOADING_STATE$4);
|
|
20818
20818
|
}
|
|
20819
|
-
function _temp$
|
|
20819
|
+
function _temp$3e() {
|
|
20820
20820
|
return observableCallback();
|
|
20821
20821
|
}
|
|
20822
20822
|
const READABLE = {
|
|
@@ -20942,7 +20942,7 @@ function useReferenceInput(options) {
|
|
|
20942
20942
|
let t72;
|
|
20943
20943
|
if ($[22] !== initialValueTemplateItems || $[23] !== schemaType.to) {
|
|
20944
20944
|
let t82;
|
|
20945
|
-
$[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$
|
|
20945
|
+
$[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$3d).filter(isNonNullable$2), $[22] = initialValueTemplateItems, $[23] = schemaType.to, $[24] = t72;
|
|
20946
20946
|
} else
|
|
20947
20947
|
t72 = $[24];
|
|
20948
20948
|
t6 = t72;
|
|
@@ -20961,7 +20961,7 @@ function useReferenceInput(options) {
|
|
|
20961
20961
|
getReferenceInfo: getReferenceInfo$1
|
|
20962
20962
|
}, $[31] = EditReferenceLink, $[32] = createOptions, $[33] = getReferenceInfo$1, $[34] = handleEditReference, $[35] = isCurrentDocumentLiveEdit, $[36] = selectedState, $[37] = t8) : t8 = $[37], t8;
|
|
20963
20963
|
}
|
|
20964
|
-
function _temp$
|
|
20964
|
+
function _temp$3d(item) {
|
|
20965
20965
|
return item.template?.schemaType ? {
|
|
20966
20966
|
id: item.id,
|
|
20967
20967
|
title: item.title || `${item.template.schemaType} from template ${item.template.id}`,
|
|
@@ -21022,7 +21022,7 @@ function ReferenceInputPreview(props2) {
|
|
|
21022
21022
|
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (hadFocus, hasFocus) => {
|
|
21023
21023
|
!hadFocus && hasFocus && elementRef.current && elementRef.current.focus();
|
|
21024
21024
|
}, $[6] = t2) : t2 = $[6], useDidUpdate(focused, t2);
|
|
21025
|
-
const hasErrors = props2.validation.some(_temp$
|
|
21025
|
+
const hasErrors = props2.validation.some(_temp$3c), hasWarnings = props2.validation.some(_temp2$1p), loadableReferenceInfo = useReferenceInfo$2(value?._ref, getReferenceInfo2), refTypeName = loadableReferenceInfo.result?.type || value?._strengthenOnPublish?.type;
|
|
21026
21026
|
let t3;
|
|
21027
21027
|
$[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];
|
|
21028
21028
|
const refType = t3, pressed = selectedState === "pressed", selected = selectedState === "selected", hasRef = value?._ref, publishedReferenceExists = hasRef && loadableReferenceInfo.result?.isPublished;
|
|
@@ -21116,10 +21116,10 @@ function ReferenceInputPreview(props2) {
|
|
|
21116
21116
|
let t27;
|
|
21117
21117
|
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;
|
|
21118
21118
|
}
|
|
21119
|
-
function _temp2$
|
|
21119
|
+
function _temp2$1p(v_0) {
|
|
21120
21120
|
return v_0.level === "warning";
|
|
21121
21121
|
}
|
|
21122
|
-
function _temp$
|
|
21122
|
+
function _temp$3c(v) {
|
|
21123
21123
|
return v.level === "error";
|
|
21124
21124
|
}
|
|
21125
21125
|
function useReferenceItemRef() {
|
|
@@ -21165,7 +21165,7 @@ function ReferenceInput(props2) {
|
|
|
21165
21165
|
validation: validation2
|
|
21166
21166
|
} = props2;
|
|
21167
21167
|
let t0;
|
|
21168
|
-
$[0] !== validation2 ? (t0 = validation2?.find(_temp$
|
|
21168
|
+
$[0] !== validation2 ? (t0 = validation2?.find(_temp$3b)?.message, $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
21169
21169
|
const validationError = t0, {
|
|
21170
21170
|
selectedReleaseId
|
|
21171
21171
|
} = usePerspective();
|
|
@@ -21239,7 +21239,7 @@ function ReferenceInput(props2) {
|
|
|
21239
21239
|
hits: [],
|
|
21240
21240
|
searchString,
|
|
21241
21241
|
isLoading: !1
|
|
21242
|
-
})))))), scan(_temp2$
|
|
21242
|
+
})))))), scan(_temp2$1o, INITIAL_SEARCH_STATE$3), tap(setSearchState)), $[26] = id2, $[27] = onSearch, $[28] = push, $[29] = t, $[30] = t6) : t6 = $[30];
|
|
21243
21243
|
const handleQueryChange = useObservableEvent(t6);
|
|
21244
21244
|
let t7;
|
|
21245
21245
|
$[31] !== handleQueryChange ? (t7 = () => {
|
|
@@ -21321,13 +21321,13 @@ function _temp3$I(hit_0) {
|
|
|
21321
21321
|
hit: hit_0
|
|
21322
21322
|
};
|
|
21323
21323
|
}
|
|
21324
|
-
function _temp2$
|
|
21324
|
+
function _temp2$1o(prevState, nextState) {
|
|
21325
21325
|
return {
|
|
21326
21326
|
...prevState,
|
|
21327
21327
|
...nextState
|
|
21328
21328
|
};
|
|
21329
21329
|
}
|
|
21330
|
-
function _temp$
|
|
21330
|
+
function _temp$3b(v) {
|
|
21331
21331
|
return v.level === "error";
|
|
21332
21332
|
}
|
|
21333
21333
|
function resolveCreateTypeFilter(options) {
|
|
@@ -21441,7 +21441,7 @@ function StudioReferenceInput(props2) {
|
|
|
21441
21441
|
})(searchString, {
|
|
21442
21442
|
perspective: options.perspective,
|
|
21443
21443
|
limit: 101
|
|
21444
|
-
}).pipe(map(_temp2$
|
|
21444
|
+
}).pipe(map(_temp2$1n), switchMap((docs) => docs.length === 0 ? of([]) : combineLatest(docs.map((doc) => documentPreviewStore.observePaths({
|
|
21445
21445
|
_id: getPublishedId(doc._id)
|
|
21446
21446
|
}, ["_rev"]).pipe(map((published) => ({
|
|
21447
21447
|
id: doc._id,
|
|
@@ -21520,13 +21520,13 @@ function _temp4$h(item) {
|
|
|
21520
21520
|
function _temp3$H(opt) {
|
|
21521
21521
|
return opt.type;
|
|
21522
21522
|
}
|
|
21523
|
-
function _temp2$
|
|
21523
|
+
function _temp2$1n(t0) {
|
|
21524
21524
|
const {
|
|
21525
21525
|
hits
|
|
21526
21526
|
} = t0;
|
|
21527
|
-
return hits.map(_temp$
|
|
21527
|
+
return hits.map(_temp$3a);
|
|
21528
21528
|
}
|
|
21529
|
-
function _temp$
|
|
21529
|
+
function _temp$3a(t0) {
|
|
21530
21530
|
const {
|
|
21531
21531
|
hit
|
|
21532
21532
|
} = t0;
|
|
@@ -21761,7 +21761,7 @@ function ArrayOfObjectsItem(props2) {
|
|
|
21761
21761
|
$[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) => {
|
|
21762
21762
|
if (event_0.items.length === 0)
|
|
21763
21763
|
throw new Error("Insert event should include at least one item");
|
|
21764
|
-
const itemsWithKeys = event_0.items.map(_temp$
|
|
21764
|
+
const itemsWithKeys = event_0.items.map(_temp$39);
|
|
21765
21765
|
onChange(PatchEvent.from([insert$1(itemsWithKeys, event_0.position, [{
|
|
21766
21766
|
_key: member.key
|
|
21767
21767
|
}])]));
|
|
@@ -21950,7 +21950,7 @@ function ArrayOfObjectsItem(props2) {
|
|
|
21950
21950
|
let t32;
|
|
21951
21951
|
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;
|
|
21952
21952
|
}
|
|
21953
|
-
function _temp$
|
|
21953
|
+
function _temp$39(item) {
|
|
21954
21954
|
return ensureKey(item);
|
|
21955
21955
|
}
|
|
21956
21956
|
function RenderInput$5({
|
|
@@ -21996,7 +21996,7 @@ function IncompatibleItemType$2(props2) {
|
|
|
21996
21996
|
const handleKeyDown = t2;
|
|
21997
21997
|
let t3;
|
|
21998
21998
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
21999
|
-
setShowDetails(_temp$
|
|
21999
|
+
setShowDetails(_temp$38);
|
|
22000
22000
|
}, $[7] = t3) : t3 = $[7];
|
|
22001
22001
|
const handleShowDetails = t3;
|
|
22002
22002
|
let t4;
|
|
@@ -22065,7 +22065,7 @@ function IncompatibleItemType$2(props2) {
|
|
|
22065
22065
|
let t24;
|
|
22066
22066
|
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;
|
|
22067
22067
|
}
|
|
22068
|
-
function _temp$
|
|
22068
|
+
function _temp$38(v) {
|
|
22069
22069
|
return !v;
|
|
22070
22070
|
}
|
|
22071
22071
|
function MemberItemError(props2) {
|
|
@@ -22956,7 +22956,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
22956
22956
|
let t7;
|
|
22957
22957
|
$[12] !== member.name || $[13] !== onChange ? (t7 = (event_1) => {
|
|
22958
22958
|
const patches = PatchEvent.from(event_1).patches;
|
|
22959
|
-
if (patches.some(_temp$
|
|
22959
|
+
if (patches.some(_temp$37) && (valueRef.current = applyAll(valueRef.current || [], patches), Array.isArray(valueRef.current) && !valueRef.current.length)) {
|
|
22960
22960
|
onChange(PatchEvent.from(unset([member.name])));
|
|
22961
22961
|
return;
|
|
22962
22962
|
}
|
|
@@ -23003,7 +23003,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
23003
23003
|
$[34] !== handleChange || $[35] !== handleOpenItem || $[36] !== member.field.path || $[37] !== member.field.schemaType || $[38] !== onPathFocus || $[39] !== resolveInitialValue2 || $[40] !== toast ? (t14 = (event_2) => {
|
|
23004
23004
|
if (event_2.items.length === 0)
|
|
23005
23005
|
throw new Error("Insert event should include at least one item");
|
|
23006
|
-
const itemsWithKeys = event_2.items.map(_temp2$
|
|
23006
|
+
const itemsWithKeys = event_2.items.map(_temp2$1m);
|
|
23007
23007
|
handleChange(PatchEvent.from([insert$1(itemsWithKeys, event_2.position, [event_2.referenceItem])]));
|
|
23008
23008
|
const focusItemKey = itemsWithKeys[0]._key, itemPath = [...member.field.path, {
|
|
23009
23009
|
_key: focusItemKey
|
|
@@ -23230,10 +23230,10 @@ function ArrayOfObjectsField(props2) {
|
|
|
23230
23230
|
function _temp3$G(_file) {
|
|
23231
23231
|
console.error(_file.error);
|
|
23232
23232
|
}
|
|
23233
|
-
function _temp2$
|
|
23233
|
+
function _temp2$1m(item) {
|
|
23234
23234
|
return ensureKey(item);
|
|
23235
23235
|
}
|
|
23236
|
-
function _temp$
|
|
23236
|
+
function _temp$37(patch2) {
|
|
23237
23237
|
return patch2.type === "unset" && patch2.path.length === 1;
|
|
23238
23238
|
}
|
|
23239
23239
|
function RenderInput$3({
|
|
@@ -23324,7 +23324,7 @@ function ArrayOfPrimitivesField(props2) {
|
|
|
23324
23324
|
let t3;
|
|
23325
23325
|
$[7] !== member.field.value || $[8] !== member.name || $[9] !== onChange ? (t3 = (event_1) => {
|
|
23326
23326
|
const patches = PatchEvent.from(event_1).patches;
|
|
23327
|
-
if (patches.some(_temp$
|
|
23327
|
+
if (patches.some(_temp$36)) {
|
|
23328
23328
|
const result = applyAll(member.field.value || [], patches);
|
|
23329
23329
|
if (Array.isArray(result) && !result.length) {
|
|
23330
23330
|
onChange(PatchEvent.from(unset([member.name])));
|
|
@@ -23426,7 +23426,7 @@ function ArrayOfPrimitivesField(props2) {
|
|
|
23426
23426
|
file: file_0,
|
|
23427
23427
|
schemaType: schemaType_0,
|
|
23428
23428
|
uploader
|
|
23429
|
-
} = t232, events$ = uploader.upload(client, file_0, schemaType_0).pipe(map(_temp2$
|
|
23429
|
+
} = t232, events$ = uploader.upload(client, file_0, schemaType_0).pipe(map(_temp2$1l), tap((event_4) => handleChange(event_4.patches)));
|
|
23430
23430
|
uploadSubscriptions.current && uploadSubscriptions.current.unsubscribe(), uploadSubscriptions.current = events$.subscribe();
|
|
23431
23431
|
}, $[56] = client, $[57] = handleChange, $[58] = t22) : t22 = $[58];
|
|
23432
23432
|
const handleUpload = t22, t23 = member.field.value, t24 = member.field.displayInlineChanges ?? !1;
|
|
@@ -23474,10 +23474,10 @@ function ArrayOfPrimitivesField(props2) {
|
|
|
23474
23474
|
let t29;
|
|
23475
23475
|
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;
|
|
23476
23476
|
}
|
|
23477
|
-
function _temp2$
|
|
23477
|
+
function _temp2$1l(uploadProgressEvent) {
|
|
23478
23478
|
return PatchEvent.from(uploadProgressEvent.patches || []);
|
|
23479
23479
|
}
|
|
23480
|
-
function _temp$
|
|
23480
|
+
function _temp$36(patch2) {
|
|
23481
23481
|
return patch2.type === "unset" && patch2.path.length === 1;
|
|
23482
23482
|
}
|
|
23483
23483
|
function RenderInput$2({
|
|
@@ -23752,7 +23752,7 @@ function PrimitiveField(props2) {
|
|
|
23752
23752
|
}
|
|
23753
23753
|
let t152;
|
|
23754
23754
|
if ($[37] !== member.field.path || $[38] !== member.field.validation || $[39] !== parseError) {
|
|
23755
|
-
const nonErrors = member.field.validation.filter(_temp$
|
|
23755
|
+
const nonErrors = member.field.validation.filter(_temp$35);
|
|
23756
23756
|
let t162;
|
|
23757
23757
|
$[41] !== member.field.path || $[42] !== parseError ? (t162 = {
|
|
23758
23758
|
level: "error",
|
|
@@ -23765,7 +23765,7 @@ function PrimitiveField(props2) {
|
|
|
23765
23765
|
}
|
|
23766
23766
|
const validation2 = t14;
|
|
23767
23767
|
let t15;
|
|
23768
|
-
$[44] !== validation2 ? (t15 = validation2.filter(_temp2$
|
|
23768
|
+
$[44] !== validation2 ? (t15 = validation2.filter(_temp2$1k).map(_temp3$F).join(`
|
|
23769
23769
|
`) || void 0, $[44] = validation2, $[45] = t15) : t15 = $[45];
|
|
23770
23770
|
const validationError = t15, t16 = member.field.value, t17 = member.field.schemaType, t18 = member.field.displayInlineChanges ?? !1;
|
|
23771
23771
|
let t19;
|
|
@@ -23797,10 +23797,10 @@ function PrimitiveField(props2) {
|
|
|
23797
23797
|
function _temp3$F(item_1) {
|
|
23798
23798
|
return item_1.message;
|
|
23799
23799
|
}
|
|
23800
|
-
function _temp2$
|
|
23800
|
+
function _temp2$1k(item_0) {
|
|
23801
23801
|
return item_0.level === "error";
|
|
23802
23802
|
}
|
|
23803
|
-
function _temp$
|
|
23803
|
+
function _temp$35(item) {
|
|
23804
23804
|
return item.level !== "error";
|
|
23805
23805
|
}
|
|
23806
23806
|
function RenderInput({
|
|
@@ -23980,7 +23980,7 @@ function UntypedValueInput(t0) {
|
|
|
23980
23980
|
let t6;
|
|
23981
23981
|
$[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];
|
|
23982
23982
|
let t7;
|
|
23983
|
-
$[16] !== isSingleValidType || $[17] !== validTypes ? (t7 = !isSingleValidType && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp$
|
|
23983
|
+
$[16] !== isSingleValidType || $[17] !== validTypes ? (t7 = !isSingleValidType && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp$34) }), $[16] = isSingleValidType, $[17] = validTypes, $[18] = t7) : t7 = $[18];
|
|
23984
23984
|
let t8;
|
|
23985
23985
|
$[19] !== t ? (t8 = t("inputs.untyped-value.details.json-dump-prefix"), $[19] = t, $[20] = t8) : t8 = $[20];
|
|
23986
23986
|
let t9;
|
|
@@ -24019,7 +24019,7 @@ function UntypedValueInput(t0) {
|
|
|
24019
24019
|
let t19;
|
|
24020
24020
|
return $[53] !== t18 || $[54] !== t2 ? (t19 = /* @__PURE__ */ jsx(Alert, { status: "warning", title: t2, children: t18 }), $[53] = t18, $[54] = t2, $[55] = t19) : t19 = $[55], t19;
|
|
24021
24021
|
}
|
|
24022
|
-
function _temp$
|
|
24022
|
+
function _temp$34(validType) {
|
|
24023
24023
|
return /* @__PURE__ */ jsx(Text$1, { as: "li", muted: !0, size: 1, children: /* @__PURE__ */ jsx("code", { children: validType }) }, validType);
|
|
24024
24024
|
}
|
|
24025
24025
|
function getConverters(value, actualType, validTypes) {
|
|
@@ -24036,7 +24036,7 @@ const InvalidValueInput = forwardRef((props2, ref) => {
|
|
|
24036
24036
|
validTypes,
|
|
24037
24037
|
onChange
|
|
24038
24038
|
} = props2;
|
|
24039
|
-
useImperativeHandle(ref, _temp2$
|
|
24039
|
+
useImperativeHandle(ref, _temp2$1j);
|
|
24040
24040
|
let t0;
|
|
24041
24041
|
$[0] !== onChange ? (t0 = () => {
|
|
24042
24042
|
onChange(PatchEvent.from(unset()));
|
|
@@ -24133,11 +24133,11 @@ function ConvertButton(t0) {
|
|
|
24133
24133
|
let t3;
|
|
24134
24134
|
return $[7] !== handleClick || $[8] !== t2 ? (t3 = /* @__PURE__ */ jsx(Button$1, { onClick: handleClick, text: t2 }), $[7] = handleClick, $[8] = t2, $[9] = t3) : t3 = $[9], t3;
|
|
24135
24135
|
}
|
|
24136
|
-
function _temp$
|
|
24136
|
+
function _temp$33() {
|
|
24137
24137
|
}
|
|
24138
|
-
function _temp2$
|
|
24138
|
+
function _temp2$1j() {
|
|
24139
24139
|
return {
|
|
24140
|
-
focus: _temp$
|
|
24140
|
+
focus: _temp$33
|
|
24141
24141
|
};
|
|
24142
24142
|
}
|
|
24143
24143
|
function _temp3$E(validType) {
|
|
@@ -24389,7 +24389,7 @@ function FormFieldValidationStatus(props2) {
|
|
|
24389
24389
|
__unstable_showSummary: showSummary,
|
|
24390
24390
|
fontSize,
|
|
24391
24391
|
placement
|
|
24392
|
-
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$p : t0, hasErrors = validation2.some(_temp$
|
|
24392
|
+
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$p : t0, hasErrors = validation2.some(_temp$32), hasWarnings = validation2.some(_temp2$1i), status = hasErrors ? "error" : hasWarnings ? "warning" : "info";
|
|
24393
24393
|
let t1;
|
|
24394
24394
|
$[0] !== showSummary || $[1] !== validation2 ? (t1 = showSummary && /* @__PURE__ */ jsx(FormFieldValidationSummary, { validation: validation2 }), $[0] = showSummary, $[1] = validation2, $[2] = t1) : t1 = $[2];
|
|
24395
24395
|
let t2;
|
|
@@ -24411,10 +24411,10 @@ function FormFieldValidationStatus(props2) {
|
|
|
24411
24411
|
function _temp3$D(item, itemIndex) {
|
|
24412
24412
|
return /* @__PURE__ */ jsx(FormFieldValidationStatusItem, { validation: item }, itemIndex);
|
|
24413
24413
|
}
|
|
24414
|
-
function _temp2$
|
|
24414
|
+
function _temp2$1i(v_0) {
|
|
24415
24415
|
return v_0.level === "warning";
|
|
24416
24416
|
}
|
|
24417
|
-
function _temp$
|
|
24417
|
+
function _temp$32(v) {
|
|
24418
24418
|
return v.level === "error";
|
|
24419
24419
|
}
|
|
24420
24420
|
function FormFieldValidationStatusItem(props2) {
|
|
@@ -24859,7 +24859,7 @@ function DuplicateKeysAlert(props2) {
|
|
|
24859
24859
|
} = props2;
|
|
24860
24860
|
let t0;
|
|
24861
24861
|
$[0] !== error.duplicates || $[1] !== onChange ? (t0 = () => {
|
|
24862
|
-
onChange(PatchEvent.from((error.duplicates || []).map(_temp$
|
|
24862
|
+
onChange(PatchEvent.from((error.duplicates || []).map(_temp$31)));
|
|
24863
24863
|
}, $[0] = error.duplicates, $[1] = onChange, $[2] = t0) : t0 = $[2];
|
|
24864
24864
|
const handleFixDuplicateKeys = t0, {
|
|
24865
24865
|
t
|
|
@@ -24895,7 +24895,7 @@ function DuplicateKeysAlert(props2) {
|
|
|
24895
24895
|
let t14;
|
|
24896
24896
|
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;
|
|
24897
24897
|
}
|
|
24898
|
-
function _temp$
|
|
24898
|
+
function _temp$31(t0) {
|
|
24899
24899
|
const [index, key] = t0;
|
|
24900
24900
|
return set(`${key}_deduped_${index}`, [index, "_key"]);
|
|
24901
24901
|
}
|
|
@@ -24907,7 +24907,7 @@ function MissingKeysAlert(props2) {
|
|
|
24907
24907
|
} = props2;
|
|
24908
24908
|
let t0;
|
|
24909
24909
|
$[0] !== error.value || $[1] !== onChange ? (t0 = () => {
|
|
24910
|
-
onChange(PatchEvent.from((error.value || []).map(_temp$
|
|
24910
|
+
onChange(PatchEvent.from((error.value || []).map(_temp$30)));
|
|
24911
24911
|
}, $[0] = error.value, $[1] = onChange, $[2] = t0) : t0 = $[2];
|
|
24912
24912
|
const handleFixMissingKeys = t0, {
|
|
24913
24913
|
t
|
|
@@ -24943,7 +24943,7 @@ function MissingKeysAlert(props2) {
|
|
|
24943
24943
|
let t14;
|
|
24944
24944
|
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;
|
|
24945
24945
|
}
|
|
24946
|
-
function _temp$
|
|
24946
|
+
function _temp$30(val, i) {
|
|
24947
24947
|
return setIfMissing(randomKey$1(), [i, "_key"]);
|
|
24948
24948
|
}
|
|
24949
24949
|
function MixedArrayAlert(props2) {
|
|
@@ -24954,7 +24954,7 @@ function MixedArrayAlert(props2) {
|
|
|
24954
24954
|
} = props2;
|
|
24955
24955
|
let t0;
|
|
24956
24956
|
$[0] !== error.value || $[1] !== onChange ? (t0 = () => {
|
|
24957
|
-
const patches = (error.value || []).flatMap(_temp$
|
|
24957
|
+
const patches = (error.value || []).flatMap(_temp$2$).reverse().map(_temp2$1h);
|
|
24958
24958
|
onChange(PatchEvent.from(patches));
|
|
24959
24959
|
}, $[0] = error.value, $[1] = onChange, $[2] = t0) : t0 = $[2];
|
|
24960
24960
|
const handleRemoveNonObjectValues = t0, {
|
|
@@ -24986,10 +24986,10 @@ function MixedArrayAlert(props2) {
|
|
|
24986
24986
|
let t13;
|
|
24987
24987
|
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;
|
|
24988
24988
|
}
|
|
24989
|
-
function _temp2$
|
|
24989
|
+
function _temp2$1h(index_0) {
|
|
24990
24990
|
return unset([index_0]);
|
|
24991
24991
|
}
|
|
24992
|
-
function _temp$
|
|
24992
|
+
function _temp$2$(item, index) {
|
|
24993
24993
|
return isPlainObject$1(item) ? [] : [index];
|
|
24994
24994
|
}
|
|
24995
24995
|
function MemberFieldError(props2) {
|
|
@@ -25155,9 +25155,9 @@ function useReferringDocuments(id2, t0) {
|
|
|
25155
25155
|
docId: id2
|
|
25156
25156
|
}, {
|
|
25157
25157
|
tag: "use-referring-documents"
|
|
25158
|
-
}).pipe(map(_temp$
|
|
25158
|
+
}).pipe(map(_temp$2_), startWith(INITIAL_STATE$a)), $[2] = documentStore, $[3] = id2, $[4] = projection, $[5] = t2) : t2 = $[5], useObservable(t2, INITIAL_STATE$a);
|
|
25159
25159
|
}
|
|
25160
|
-
function _temp$
|
|
25160
|
+
function _temp$2_(docs) {
|
|
25161
25161
|
return {
|
|
25162
25162
|
referringDocuments: docs,
|
|
25163
25163
|
isLoading: !1
|
|
@@ -25185,7 +25185,7 @@ const AssetUsageList = (t0) => {
|
|
|
25185
25185
|
let t6;
|
|
25186
25186
|
$[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];
|
|
25187
25187
|
let t7;
|
|
25188
|
-
$[11] !== referringDocuments ? (t7 = referringDocuments.map(_temp$
|
|
25188
|
+
$[11] !== referringDocuments ? (t7 = referringDocuments.map(_temp$2Z), $[11] = referringDocuments, $[12] = t7) : t7 = $[12];
|
|
25189
25189
|
let t8;
|
|
25190
25190
|
return $[13] !== t6 || $[14] !== t7 ? (t8 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
25191
25191
|
t6,
|
|
@@ -25213,7 +25213,7 @@ const AssetUsageList = (t0) => {
|
|
|
25213
25213
|
let t6;
|
|
25214
25214
|
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;
|
|
25215
25215
|
};
|
|
25216
|
-
function _temp$
|
|
25216
|
+
function _temp$2Z(document2) {
|
|
25217
25217
|
return /* @__PURE__ */ jsx(DocumentLink, { document: document2 }, document2._id);
|
|
25218
25218
|
}
|
|
25219
25219
|
const STYLE_ASSET_IMAGE = {
|
|
@@ -25309,7 +25309,7 @@ function AssetDeleteDialog(t0) {
|
|
|
25309
25309
|
} = useLegacyReferringDocuments(asset._id);
|
|
25310
25310
|
let t2;
|
|
25311
25311
|
if ($[0] !== referringDocuments) {
|
|
25312
|
-
const drafts = referringDocuments.reduce(_temp$
|
|
25312
|
+
const drafts = referringDocuments.reduce(_temp$2Y, []);
|
|
25313
25313
|
t2 = referringDocuments.filter((doc_0) => !drafts.includes(doc_0._id)), $[0] = referringDocuments, $[1] = t2;
|
|
25314
25314
|
} else
|
|
25315
25315
|
t2 = $[1];
|
|
@@ -25350,7 +25350,7 @@ function AssetDeleteDialog(t0) {
|
|
|
25350
25350
|
let t10;
|
|
25351
25351
|
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;
|
|
25352
25352
|
}
|
|
25353
|
-
function _temp$
|
|
25353
|
+
function _temp$2Y(acc, doc) {
|
|
25354
25354
|
return doc._id.startsWith("drafts.") ? acc.concat(doc._id.slice(7)) : acc;
|
|
25355
25355
|
}
|
|
25356
25356
|
const MENU_POPOVER_PROPS$8 = {
|
|
@@ -25406,7 +25406,7 @@ function AssetUsageDialog(t0) {
|
|
|
25406
25406
|
} = useLegacyReferringDocuments(asset._id);
|
|
25407
25407
|
let t1;
|
|
25408
25408
|
if ($[0] !== referringDocuments) {
|
|
25409
|
-
const drafts = referringDocuments.reduce(_temp$
|
|
25409
|
+
const drafts = referringDocuments.reduce(_temp$2X, []);
|
|
25410
25410
|
t1 = referringDocuments.filter((doc_0) => !drafts.includes(doc_0._id)), $[0] = referringDocuments, $[1] = t1;
|
|
25411
25411
|
} else
|
|
25412
25412
|
t1 = $[1];
|
|
@@ -25422,7 +25422,7 @@ function AssetUsageDialog(t0) {
|
|
|
25422
25422
|
let t4;
|
|
25423
25423
|
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;
|
|
25424
25424
|
}
|
|
25425
|
-
function _temp$
|
|
25425
|
+
function _temp$2X(acc, doc) {
|
|
25426
25426
|
return doc._id.startsWith("drafts.") ? acc.concat(doc._id.slice(7)) : acc;
|
|
25427
25427
|
}
|
|
25428
25428
|
const MIME_TYPES = {
|
|
@@ -25683,7 +25683,7 @@ const CardIconWrapper = styled.span.withConfig({
|
|
|
25683
25683
|
const handleToggleUsageDialog = t9;
|
|
25684
25684
|
let t10;
|
|
25685
25685
|
$[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = () => {
|
|
25686
|
-
setIsOpen(_temp$
|
|
25686
|
+
setIsOpen(_temp$2W);
|
|
25687
25687
|
}, $[22] = t10) : t10 = $[22];
|
|
25688
25688
|
const handleToggleOpen = t10;
|
|
25689
25689
|
let t11;
|
|
@@ -25799,7 +25799,7 @@ const CardIconWrapper = styled.span.withConfig({
|
|
|
25799
25799
|
t27
|
|
25800
25800
|
] }), $[100] = asset, $[101] = isSelected, $[102] = t26, $[103] = t27, $[104] = t28) : t28 = $[104], t28;
|
|
25801
25801
|
};
|
|
25802
|
-
function _temp$
|
|
25802
|
+
function _temp$2W(prev) {
|
|
25803
25803
|
return !prev;
|
|
25804
25804
|
}
|
|
25805
25805
|
const STYLES_FILENAME = {
|
|
@@ -26034,7 +26034,7 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
26034
26034
|
$[0] !== client ? (t0 = client.withConfig({
|
|
26035
26035
|
apiVersion: "2023-02-14"
|
|
26036
26036
|
}), $[0] = client, $[1] = t0) : t0 = $[1];
|
|
26037
|
-
const versionedClient2 = t0, [_elementId] = useState(_temp$
|
|
26037
|
+
const versionedClient2 = t0, [_elementId] = useState(_temp$2V), currentPageNumber = useRef(0), {
|
|
26038
26038
|
t
|
|
26039
26039
|
} = useTranslation(), fetch$ = useRef(void 0);
|
|
26040
26040
|
let t1;
|
|
@@ -26121,7 +26121,7 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
26121
26121
|
$[30] !== accept || $[31] !== isImageOnlyWildCard || $[32] !== isLoading || $[33] !== listFormat || $[34] !== 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: [
|
|
26122
26122
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(InfoOutlineIcon, {}) }),
|
|
26123
26123
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "asset-source.dialog.accept-message", values: {
|
|
26124
|
-
acceptTypes: listFormat.format(accept.split(",").map(_temp2$
|
|
26124
|
+
acceptTypes: listFormat.format(accept.split(",").map(_temp2$1g))
|
|
26125
26125
|
} }) })
|
|
26126
26126
|
] }) }), $[30] = accept, $[31] = isImageOnlyWildCard, $[32] = isLoading, $[33] = listFormat, $[34] = t, $[35] = t16) : t16 = $[35];
|
|
26127
26127
|
let t17;
|
|
@@ -26140,10 +26140,10 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
26140
26140
|
let t21;
|
|
26141
26141
|
return $[61] !== _elementId || $[62] !== handleClose || $[63] !== hasResetAutoFocus || $[64] !== ref || $[65] !== t15 || $[66] !== t20 ? (t21 = /* @__PURE__ */ jsx(Dialog$1, { __unstable_autoFocus: hasResetAutoFocus, header: t15, id: _elementId, onClickOutside: handleClose, onClose: handleClose, ref, width: 2, children: t20 }), $[61] = _elementId, $[62] = handleClose, $[63] = hasResetAutoFocus, $[64] = ref, $[65] = t15, $[66] = t20, $[67] = t21) : t21 = $[67], t21;
|
|
26142
26142
|
}, SelectAssetsDialog$1 = memo(forwardRef(SelectAssetsComponent));
|
|
26143
|
-
function _temp$
|
|
26143
|
+
function _temp$2V() {
|
|
26144
26144
|
return `default-asset-source-${uniqueId()}`;
|
|
26145
26145
|
}
|
|
26146
|
-
function _temp2$
|
|
26146
|
+
function _temp2$1g(type) {
|
|
26147
26147
|
return type.trim();
|
|
26148
26148
|
}
|
|
26149
26149
|
const DatasetAssetSourceComponent = function(props2, ref) {
|
|
@@ -26514,7 +26514,7 @@ function fileTarget(Component2) {
|
|
|
26514
26514
|
$[16] !== handlePaste || $[17] !== pasteTarget ? (t5 = () => {
|
|
26515
26515
|
if (pasteTarget) {
|
|
26516
26516
|
const pasteTargetElementListener = (event_1) => {
|
|
26517
|
-
if (event_1.clipboardData?.types.some(_temp$
|
|
26517
|
+
if (event_1.clipboardData?.types.some(_temp$2U))
|
|
26518
26518
|
return;
|
|
26519
26519
|
const hasHtml = !!event_1.clipboardData?.getData("text/html"), hasText = !!event_1.clipboardData?.getData("text/plain");
|
|
26520
26520
|
if (hasHtml && hasText) {
|
|
@@ -26530,7 +26530,7 @@ function fileTarget(Component2) {
|
|
|
26530
26530
|
}, t6 = [pasteTarget, handlePaste], $[16] = handlePaste, $[17] = pasteTarget, $[18] = t5, $[19] = t6) : (t5 = $[18], t6 = $[19]), useEffect(t5, t6);
|
|
26531
26531
|
let t7;
|
|
26532
26532
|
$[20] !== emitFiles || $[21] !== onFiles || $[22] !== onFilesOut ? (t7 = (event_2) => {
|
|
26533
|
-
if (enteredElements.current = [], Array.from(event_2.dataTransfer.items).map(_temp2$
|
|
26533
|
+
if (enteredElements.current = [], Array.from(event_2.dataTransfer.items).map(_temp2$1f).some(_temp3$C))
|
|
26534
26534
|
return;
|
|
26535
26535
|
event_2.preventDefault(), event_2.stopPropagation();
|
|
26536
26536
|
const dataTransfer = event_2.nativeEvent.dataTransfer;
|
|
@@ -26592,11 +26592,11 @@ function select(el) {
|
|
|
26592
26592
|
const sel = window.getSelection();
|
|
26593
26593
|
sel?.removeAllRanges(), sel?.addRange(range2);
|
|
26594
26594
|
}
|
|
26595
|
-
function _temp$
|
|
26595
|
+
function _temp$2U(t) {
|
|
26596
26596
|
const normalized = t.replace(/^web /, "");
|
|
26597
26597
|
return normalized === "application/portable-text" || normalized === "application/x-portable-text";
|
|
26598
26598
|
}
|
|
26599
|
-
function _temp2$
|
|
26599
|
+
function _temp2$1f(item) {
|
|
26600
26600
|
return {
|
|
26601
26601
|
type: item.type,
|
|
26602
26602
|
kind: item.kind
|
|
@@ -26705,8 +26705,8 @@ function uploadTarget$1(Component2) {
|
|
|
26705
26705
|
} = useTranslation(), client = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS), source = useSource(), formBuilder = useFormBuilder();
|
|
26706
26706
|
let t0;
|
|
26707
26707
|
if ($[11] !== types) {
|
|
26708
|
-
const assetTypes = types.filter(_temp$
|
|
26709
|
-
t0 = assetTypes.length > 0 && assetTypes.every(_temp2$
|
|
26708
|
+
const assetTypes = types.filter(_temp$2T);
|
|
26709
|
+
t0 = assetTypes.length > 0 && assetTypes.every(_temp2$1e), $[11] = types, $[12] = t0;
|
|
26710
26710
|
} else
|
|
26711
26711
|
t0 = $[12];
|
|
26712
26712
|
const disableUpload = t0, t1 = source.title || source.name;
|
|
@@ -26910,10 +26910,10 @@ function getFilesAndAssetSources(options) {
|
|
|
26910
26910
|
};
|
|
26911
26911
|
});
|
|
26912
26912
|
}
|
|
26913
|
-
function _temp$
|
|
26913
|
+
function _temp$2T(type) {
|
|
26914
26914
|
return _isType(type, "image") || _isType(type, "file") || _isType(type, "sanity.video");
|
|
26915
26915
|
}
|
|
26916
|
-
function _temp2$
|
|
26916
|
+
function _temp2$1e(type_0) {
|
|
26917
26917
|
return type_0.options?.disableNew === !0;
|
|
26918
26918
|
}
|
|
26919
26919
|
function _temp3$B(task, i) {
|
|
@@ -27239,7 +27239,7 @@ function ArrayOfObjectsFunctions(props2) {
|
|
|
27239
27239
|
let t6;
|
|
27240
27240
|
$[18] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = ["top"], $[18] = t6) : t6 = $[18];
|
|
27241
27241
|
let t7;
|
|
27242
|
-
$[19] !== props2.schemaType.options?.insertMenu?.views ? (t7 = props2.schemaType.options?.insertMenu?.views?.some(_temp$
|
|
27242
|
+
$[19] !== props2.schemaType.options?.insertMenu?.views ? (t7 = props2.schemaType.options?.insertMenu?.views?.some(_temp$2S), $[19] = props2.schemaType.options?.insertMenu?.views, $[20] = t7) : t7 = $[20];
|
|
27243
27243
|
let t8;
|
|
27244
27244
|
$[21] !== gridElement || $[22] !== popoverToggleElement || $[23] !== t7 ? (t8 = {
|
|
27245
27245
|
placement: "bottom",
|
|
@@ -27291,7 +27291,7 @@ function ArrayOfObjectsFunctions(props2) {
|
|
|
27291
27291
|
children
|
|
27292
27292
|
] }), $[48] = children, $[49] = t11, $[50] = t12) : t12 = $[50], t12;
|
|
27293
27293
|
}
|
|
27294
|
-
function _temp$
|
|
27294
|
+
function _temp$2S(view) {
|
|
27295
27295
|
return view.name === "grid";
|
|
27296
27296
|
}
|
|
27297
27297
|
const DragHandleButton = /* @__PURE__ */ styled(Button$1).withConfig({
|
|
@@ -27424,7 +27424,7 @@ function IncompatibleItemType$1(props2) {
|
|
|
27424
27424
|
const handleKeyDown = t2;
|
|
27425
27425
|
let t3;
|
|
27426
27426
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
27427
|
-
setShowDetails(_temp$
|
|
27427
|
+
setShowDetails(_temp$2R);
|
|
27428
27428
|
}, $[7] = t3) : t3 = $[7];
|
|
27429
27429
|
const handleShowDetails = t3;
|
|
27430
27430
|
let t4;
|
|
@@ -27490,7 +27490,7 @@ function IncompatibleItemType$1(props2) {
|
|
|
27490
27490
|
let t23;
|
|
27491
27491
|
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;
|
|
27492
27492
|
}
|
|
27493
|
-
function _temp$
|
|
27493
|
+
function _temp$2R(v) {
|
|
27494
27494
|
return !v;
|
|
27495
27495
|
}
|
|
27496
27496
|
const MENU_POPOVER_PROPS$7 = {
|
|
@@ -27662,20 +27662,20 @@ function useValuePreview(props2) {
|
|
|
27662
27662
|
viewOptions: {
|
|
27663
27663
|
ordering
|
|
27664
27664
|
}
|
|
27665
|
-
}).pipe(map(_temp$
|
|
27665
|
+
}).pipe(map(_temp$2Q), catchError(_temp2$1d)), $[3] = chosenPerspectiveStack, $[4] = observeForPreview, $[5] = ordering, $[6] = perspectiveStack, $[7] = previewValue, $[8] = schemaType, $[9] = t3;
|
|
27666
27666
|
} else
|
|
27667
27667
|
t3 = $[9];
|
|
27668
27668
|
t2 = t3;
|
|
27669
27669
|
}
|
|
27670
27670
|
return useObservable(t2, INITIAL_STATE$9);
|
|
27671
27671
|
}
|
|
27672
|
-
function _temp2$
|
|
27672
|
+
function _temp2$1d(error) {
|
|
27673
27673
|
return of({
|
|
27674
27674
|
isLoading: !1,
|
|
27675
27675
|
error
|
|
27676
27676
|
});
|
|
27677
27677
|
}
|
|
27678
|
-
function _temp$
|
|
27678
|
+
function _temp$2Q(event) {
|
|
27679
27679
|
return {
|
|
27680
27680
|
isLoading: !1,
|
|
27681
27681
|
value: event.snapshot || void 0
|
|
@@ -27908,7 +27908,7 @@ function GridItem(props2) {
|
|
|
27908
27908
|
const presence = t7, childValidation = useChildValidation(path, !0);
|
|
27909
27909
|
let t8;
|
|
27910
27910
|
$[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];
|
|
27911
|
-
const validation2 = t8, hasErrors = childValidation.some(_temp$
|
|
27911
|
+
const validation2 = t8, hasErrors = childValidation.some(_temp$2P), hasWarnings = childValidation.some(_temp2$1c), [contextMenuButtonElement, setContextMenuButtonElement] = useState(null), t9 = parentSchemaType.options?.insertMenu;
|
|
27912
27912
|
let t10;
|
|
27913
27913
|
$[16] !== contextMenuButtonElement || $[17] !== handleInsert || $[18] !== insertableTypes || $[19] !== maxReached || $[20] !== maxReachedReason || $[21] !== t9 ? (t10 = {
|
|
27914
27914
|
schemaTypes: insertableTypes,
|
|
@@ -28000,10 +28000,10 @@ function GridItem(props2) {
|
|
|
28000
28000
|
function _temp3$A(event) {
|
|
28001
28001
|
event.preventDefault();
|
|
28002
28002
|
}
|
|
28003
|
-
function _temp2$
|
|
28003
|
+
function _temp2$1c(v_0) {
|
|
28004
28004
|
return v_0.level === "warning";
|
|
28005
28005
|
}
|
|
28006
|
-
function _temp$
|
|
28006
|
+
function _temp$2P(v) {
|
|
28007
28007
|
return v.level === "error";
|
|
28008
28008
|
}
|
|
28009
28009
|
const EMPTY$4 = [];
|
|
@@ -28030,7 +28030,7 @@ function GridArrayInput(props2) {
|
|
|
28030
28030
|
value: t1
|
|
28031
28031
|
} = props2, ArrayFunctions = t0 === void 0 ? ArrayOfObjectsFunctions : t0, value = t1 === void 0 ? EMPTY$4 : t1, {
|
|
28032
28032
|
t
|
|
28033
|
-
} = useTranslation(), errorTone = validation2?.some(_temp$
|
|
28033
|
+
} = useTranslation(), errorTone = validation2?.some(_temp$2O) ? "critical" : void 0, sortable = schemaType.options?.sortable !== !1, renderItem2 = _temp2$1b;
|
|
28034
28034
|
let t2;
|
|
28035
28035
|
$[0] !== members ? (t2 = members.map(_temp3$z), $[0] = members, $[1] = t2) : t2 = $[1];
|
|
28036
28036
|
const memberKeys = t2;
|
|
@@ -28061,10 +28061,10 @@ function GridArrayInput(props2) {
|
|
|
28061
28061
|
function _temp3$z(member) {
|
|
28062
28062
|
return member.key;
|
|
28063
28063
|
}
|
|
28064
|
-
function _temp2$
|
|
28064
|
+
function _temp2$1b(itemProps) {
|
|
28065
28065
|
return /* @__PURE__ */ jsx(GridItem, { ...itemProps });
|
|
28066
28066
|
}
|
|
28067
|
-
function _temp$
|
|
28067
|
+
function _temp$2O(v) {
|
|
28068
28068
|
return v.level === "error";
|
|
28069
28069
|
}
|
|
28070
28070
|
function useMemoCompare(next, compare2) {
|
|
@@ -28085,7 +28085,7 @@ function useVisibilityDetection(parentRef) {
|
|
|
28085
28085
|
if (wasVisible === isNowVisible)
|
|
28086
28086
|
return;
|
|
28087
28087
|
const becameVisible = !wasVisible && isNowVisible;
|
|
28088
|
-
prevVisible.current = isNowVisible, setIsVisible(isNowVisible), becameVisible && setMountKey(_temp$
|
|
28088
|
+
prevVisible.current = isNowVisible, setIsVisible(isNowVisible), becameVisible && setMountKey(_temp$2N);
|
|
28089
28089
|
});
|
|
28090
28090
|
return parentRef.current && resizeObserver.observe(parentRef.current), () => resizeObserver.disconnect();
|
|
28091
28091
|
}, t1 = [parentRef], $[0] = parentRef, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
|
|
@@ -28095,7 +28095,7 @@ function useVisibilityDetection(parentRef) {
|
|
|
28095
28095
|
mountKey
|
|
28096
28096
|
}, $[3] = isVisible2, $[4] = mountKey, $[5] = t2) : t2 = $[5], t2;
|
|
28097
28097
|
}
|
|
28098
|
-
function _temp$
|
|
28098
|
+
function _temp$2N(prev) {
|
|
28099
28099
|
return prev + 1;
|
|
28100
28100
|
}
|
|
28101
28101
|
const Root$p = styled(Card).withConfig({
|
|
@@ -28176,7 +28176,7 @@ function IncompatibleItemType(props2) {
|
|
|
28176
28176
|
const handleKeyDown = t2;
|
|
28177
28177
|
let t3;
|
|
28178
28178
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
28179
|
-
setShowDetails(_temp$
|
|
28179
|
+
setShowDetails(_temp$2M);
|
|
28180
28180
|
}, $[7] = t3) : t3 = $[7];
|
|
28181
28181
|
const handleShowDetails = t3;
|
|
28182
28182
|
let t4;
|
|
@@ -28238,7 +28238,7 @@ function IncompatibleItemType(props2) {
|
|
|
28238
28238
|
let t22;
|
|
28239
28239
|
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;
|
|
28240
28240
|
}
|
|
28241
|
-
function _temp$
|
|
28241
|
+
function _temp$2M(v) {
|
|
28242
28242
|
return !v;
|
|
28243
28243
|
}
|
|
28244
28244
|
const MENU_POPOVER_PROPS$5 = {
|
|
@@ -28412,9 +28412,9 @@ function ListArrayInput(props2) {
|
|
|
28412
28412
|
} = useTranslation(), ItemComponent = useItemComponent();
|
|
28413
28413
|
let t2;
|
|
28414
28414
|
$[0] !== ItemComponent ? (t2 = (itemProps) => /* @__PURE__ */ jsx(ItemComponent, { ...itemProps }), $[0] = ItemComponent, $[1] = t2) : t2 = $[1];
|
|
28415
|
-
const renderItem2 = t2, errorTone = validation2?.some(_temp$
|
|
28415
|
+
const renderItem2 = t2, errorTone = validation2?.some(_temp$2L) ? "critical" : void 0, [activeDragItemIndex, setActiveDragItemIndex] = useState(null);
|
|
28416
28416
|
let t3;
|
|
28417
|
-
$[2] !== members ? (t3 = members.map(_temp2$
|
|
28417
|
+
$[2] !== members ? (t3 = members.map(_temp2$1a), $[2] = members, $[3] = t3) : t3 = $[3];
|
|
28418
28418
|
const memberKeys = useMemoCompare(t3, shallowEquals), parentRef = useRef(null), {
|
|
28419
28419
|
isVisible: isVisible2,
|
|
28420
28420
|
mountKey
|
|
@@ -28462,10 +28462,10 @@ function ListArrayInput(props2) {
|
|
|
28462
28462
|
let t12;
|
|
28463
28463
|
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;
|
|
28464
28464
|
}
|
|
28465
|
-
function _temp2$
|
|
28465
|
+
function _temp2$1a(member) {
|
|
28466
28466
|
return member.key;
|
|
28467
28467
|
}
|
|
28468
|
-
function _temp$
|
|
28468
|
+
function _temp$2L(v) {
|
|
28469
28469
|
return v.level === "error";
|
|
28470
28470
|
}
|
|
28471
28471
|
function ArrayOfObjectsInput(props2) {
|
|
@@ -28510,7 +28510,7 @@ function ArrayOfObjectOptionsInput(props2) {
|
|
|
28510
28510
|
$[0] !== t0 ? (t1 = t0 === void 0 ? [] : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
28511
28511
|
const value = t1, t2 = schemaType.options?.list || EMPTY_ARRAY$k;
|
|
28512
28512
|
let t3;
|
|
28513
|
-
$[2] !== t2 ? (t3 = t2.map(_temp$
|
|
28513
|
+
$[2] !== t2 ? (t3 = t2.map(_temp$2K), $[2] = t2, $[3] = t3) : t3 = $[3];
|
|
28514
28514
|
const options = t3;
|
|
28515
28515
|
let t4;
|
|
28516
28516
|
$[4] !== onChange || $[5] !== options || $[6] !== value ? (t4 = (isChecked, changedOption) => {
|
|
@@ -28550,7 +28550,7 @@ function ArrayOfObjectOptionsInput(props2) {
|
|
|
28550
28550
|
let t9;
|
|
28551
28551
|
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;
|
|
28552
28552
|
}
|
|
28553
|
-
function _temp$
|
|
28553
|
+
function _temp$2K(option, index) {
|
|
28554
28554
|
return isKeyedObject(option) ? option : {
|
|
28555
28555
|
...option,
|
|
28556
28556
|
_key: `auto-generated-${index}`
|
|
@@ -28592,7 +28592,7 @@ function ArrayOfPrimitiveOptionsInput(props2) {
|
|
|
28592
28592
|
const options = t3;
|
|
28593
28593
|
let t4;
|
|
28594
28594
|
$[6] !== onChange || $[7] !== options || $[8] !== value ? (t4 = (isChecked, changedValue) => {
|
|
28595
|
-
const nextValue = options.map(_temp$
|
|
28595
|
+
const nextValue = options.map(_temp$2J).filter((optionValue) => optionValue === changedValue ? isChecked : value.includes(optionValue));
|
|
28596
28596
|
onChange(nextValue.length > 0 ? set(nextValue) : unset());
|
|
28597
28597
|
}, $[6] = onChange, $[7] = options, $[8] = value, $[9] = t4) : t4 = $[9];
|
|
28598
28598
|
const handleChange = t4, t5 = schemaType.options?.layout === "grid" ? Math.min(options.length, 4) : 1;
|
|
@@ -28614,7 +28614,7 @@ function ArrayOfPrimitiveOptionsInput(props2) {
|
|
|
28614
28614
|
let t8;
|
|
28615
28615
|
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;
|
|
28616
28616
|
}
|
|
28617
|
-
function _temp$
|
|
28617
|
+
function _temp$2J(option) {
|
|
28618
28618
|
return option.value;
|
|
28619
28619
|
}
|
|
28620
28620
|
function ArrayOfOptionsInput(props2) {
|
|
@@ -28732,7 +28732,7 @@ function uploadTarget(Component2) {
|
|
|
28732
28732
|
const tasks2 = files.map((file_0) => ({
|
|
28733
28733
|
file: file_0,
|
|
28734
28734
|
uploaderCandidates: getUploadCandidates(types, resolveUploader2, file_0)
|
|
28735
|
-
})), ready = tasks2.filter(_temp$
|
|
28735
|
+
})), ready = tasks2.filter(_temp$2I), rejected = tasks2.filter(_temp2$19);
|
|
28736
28736
|
rejected.length > 0 && pushToast({
|
|
28737
28737
|
closable: !0,
|
|
28738
28738
|
status: "warning",
|
|
@@ -28800,10 +28800,10 @@ function DropMessage(props2) {
|
|
|
28800
28800
|
let t2;
|
|
28801
28801
|
return $[3] !== t1 ? (t2 = /* @__PURE__ */ jsx(Fragment$1, { children: t1 }), $[3] = t1, $[4] = t2) : t2 = $[4], t2;
|
|
28802
28802
|
}
|
|
28803
|
-
function _temp$
|
|
28803
|
+
function _temp$2I(task) {
|
|
28804
28804
|
return task.uploaderCandidates.length > 0;
|
|
28805
28805
|
}
|
|
28806
|
-
function _temp2$
|
|
28806
|
+
function _temp2$19(task_0) {
|
|
28807
28807
|
return task_0.uploaderCandidates.length === 0;
|
|
28808
28808
|
}
|
|
28809
28809
|
function _temp3$y(task_1, i) {
|
|
@@ -28891,7 +28891,7 @@ const MENU_BUTTON_POPOVER_PROPS$2 = {
|
|
|
28891
28891
|
children,
|
|
28892
28892
|
presence,
|
|
28893
28893
|
schemaType
|
|
28894
|
-
} = props2, hasError = validation2.filter(_temp$
|
|
28894
|
+
} = props2, hasError = validation2.filter(_temp$2H).length > 0, hasWarning = validation2.filter(_temp2$18).length > 0;
|
|
28895
28895
|
let t0;
|
|
28896
28896
|
$[0] !== onInsert ? (t0 = (pos, insertType) => {
|
|
28897
28897
|
onInsert({
|
|
@@ -28970,10 +28970,10 @@ const MENU_BUTTON_POPOVER_PROPS$2 = {
|
|
|
28970
28970
|
let t17;
|
|
28971
28971
|
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;
|
|
28972
28972
|
});
|
|
28973
|
-
function _temp$
|
|
28973
|
+
function _temp$2H(item) {
|
|
28974
28974
|
return item.level === "error";
|
|
28975
28975
|
}
|
|
28976
|
-
function _temp2$
|
|
28976
|
+
function _temp2$18(item_0) {
|
|
28977
28977
|
return item_0.level === "warning";
|
|
28978
28978
|
}
|
|
28979
28979
|
function NoItemsPlaceholder(t0) {
|
|
@@ -28982,7 +28982,7 @@ function NoItemsPlaceholder(t0) {
|
|
|
28982
28982
|
validation: validation2
|
|
28983
28983
|
} = t0, {
|
|
28984
28984
|
t
|
|
28985
|
-
} = useTranslation(), tone = validation2?.some(_temp$
|
|
28985
|
+
} = useTranslation(), tone = validation2?.some(_temp$2G) ? "critical" : void 0;
|
|
28986
28986
|
let t1;
|
|
28987
28987
|
$[0] !== schemaType.placeholder || $[1] !== t ? (t1 = schemaType.placeholder || t("inputs.array.no-items-label"), $[0] = schemaType.placeholder, $[1] = t, $[2] = t1) : t1 = $[2];
|
|
28988
28988
|
let t2;
|
|
@@ -28990,7 +28990,7 @@ function NoItemsPlaceholder(t0) {
|
|
|
28990
28990
|
let t3;
|
|
28991
28991
|
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;
|
|
28992
28992
|
}
|
|
28993
|
-
function _temp$
|
|
28993
|
+
function _temp$2G(v) {
|
|
28994
28994
|
return v.level === "error";
|
|
28995
28995
|
}
|
|
28996
28996
|
function nearestIndexOf(array, startIdx, searchElement) {
|
|
@@ -29169,7 +29169,7 @@ function BooleanInput(props2) {
|
|
|
29169
29169
|
elementProps,
|
|
29170
29170
|
validation: validation2,
|
|
29171
29171
|
presence
|
|
29172
|
-
} = 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$
|
|
29172
|
+
} = 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$2F) ? "critical" : readOnly ? "transparent" : void 0;
|
|
29173
29173
|
let t0;
|
|
29174
29174
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
29175
29175
|
paddingTop: "0.85rem"
|
|
@@ -29201,7 +29201,7 @@ function BooleanInput(props2) {
|
|
|
29201
29201
|
let t11;
|
|
29202
29202
|
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;
|
|
29203
29203
|
}
|
|
29204
|
-
function _temp$
|
|
29204
|
+
function _temp$2F(v) {
|
|
29205
29205
|
return v.level === "error";
|
|
29206
29206
|
}
|
|
29207
29207
|
const DATE_FORMAT = {
|
|
@@ -29349,7 +29349,7 @@ const TIME_ZONE_SCOPE_TYPE = {
|
|
|
29349
29349
|
let t6;
|
|
29350
29350
|
$[22] !== allTimeZones ? (t6 = () => {
|
|
29351
29351
|
const localTzName = Intl.DateTimeFormat().resolvedOptions().timeZone, foundLocal = allTimeZones.find((tz_3) => tz_3.name === localTzName);
|
|
29352
|
-
return foundLocal || allTimeZones.find(_temp$
|
|
29352
|
+
return foundLocal || allTimeZones.find(_temp$2E) || allTimeZones[0];
|
|
29353
29353
|
}, $[22] = allTimeZones, $[23] = t6) : t6 = $[23];
|
|
29354
29354
|
const getLocalTimeZone = t6;
|
|
29355
29355
|
let t7;
|
|
@@ -29447,7 +29447,7 @@ function getErrorMessage$1(err) {
|
|
|
29447
29447
|
let message;
|
|
29448
29448
|
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;
|
|
29449
29449
|
}
|
|
29450
|
-
function _temp$
|
|
29450
|
+
function _temp$2E(timeZone) {
|
|
29451
29451
|
return timeZone.abbreviation === "GMT";
|
|
29452
29452
|
}
|
|
29453
29453
|
const TimeZoneCitySpan = /* @__PURE__ */ styled.span.withConfig({
|
|
@@ -29530,7 +29530,7 @@ const TimeZoneCitySpan = /* @__PURE__ */ styled.span.withConfig({
|
|
|
29530
29530
|
const handleTimeZoneUpdate = t8, isDirty = selectedTz?.name !== timeZone.name;
|
|
29531
29531
|
let t9;
|
|
29532
29532
|
$[20] !== getLocalTimeZone ? (t9 = getLocalTimeZone(), $[20] = getLocalTimeZone, $[21] = t9) : t9 = $[21];
|
|
29533
|
-
const isLocalTzSelected = selectedTz?.name === t9.name, renderOption = _temp$
|
|
29533
|
+
const isLocalTzSelected = selectedTz?.name === t9.name, renderOption = _temp$2D, renderValue = _temp2$17;
|
|
29534
29534
|
let t10;
|
|
29535
29535
|
$[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];
|
|
29536
29536
|
const filterOption = t10, t11 = !isDirty || !selectedTz;
|
|
@@ -29594,7 +29594,7 @@ const TimeZoneCitySpan = /* @__PURE__ */ styled.span.withConfig({
|
|
|
29594
29594
|
let t28;
|
|
29595
29595
|
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;
|
|
29596
29596
|
};
|
|
29597
|
-
function _temp$
|
|
29597
|
+
function _temp$2D(option) {
|
|
29598
29598
|
return /* @__PURE__ */ jsx(Card, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs(Text$1, { size: 1, textOverflow: "ellipsis", children: [
|
|
29599
29599
|
/* @__PURE__ */ jsx(TimeZoneCitySpan, { children: option.city }),
|
|
29600
29600
|
/* @__PURE__ */ jsxs(TimeZoneOffsetSpan, { children: [
|
|
@@ -29607,7 +29607,7 @@ function _temp$2E(option) {
|
|
|
29607
29607
|
/* @__PURE__ */ jsx(TimeZoneAlternativeNameSpan, { children: option.alternativeName })
|
|
29608
29608
|
] }) });
|
|
29609
29609
|
}
|
|
29610
|
-
function _temp2$
|
|
29610
|
+
function _temp2$17(_value, option_0) {
|
|
29611
29611
|
return option_0 ? `${option_0.alternativeName} (${option_0.namePretty})` : "";
|
|
29612
29612
|
}
|
|
29613
29613
|
function useDialogTimeZone(timeZoneScope) {
|
|
@@ -29695,9 +29695,9 @@ const DEFAULT_MONTH_NAMES = ["January", "February", "March", "April", "May", "Ju
|
|
|
29695
29695
|
weekInfo
|
|
29696
29696
|
} = useCurrentLocale();
|
|
29697
29697
|
let t0;
|
|
29698
|
-
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$2(getWeekStartsOfMonth$2(date, weekInfo.firstDay)).map(_temp$
|
|
29698
|
+
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$2(getWeekStartsOfMonth$2(date, weekInfo.firstDay)).map(_temp$2C), $[0] = date, $[1] = weekInfo.firstDay, $[2] = t0) : t0 = $[2], t0;
|
|
29699
29699
|
};
|
|
29700
|
-
function _temp$
|
|
29700
|
+
function _temp$2C(days) {
|
|
29701
29701
|
return {
|
|
29702
29702
|
number: getWeek(days[0]),
|
|
29703
29703
|
days
|
|
@@ -29723,7 +29723,7 @@ function CalendarMonth$2(props2) {
|
|
|
29723
29723
|
gridTemplateColumns: "repeat(7, minmax(44px, 46px))"
|
|
29724
29724
|
}, $[4] = t2) : t2 = $[4];
|
|
29725
29725
|
let t3;
|
|
29726
|
-
$[5] !== weekDayNames ? (t3 = weekDayNames.map(_temp$
|
|
29726
|
+
$[5] !== weekDayNames ? (t3 = weekDayNames.map(_temp$2B), $[5] = weekDayNames, $[6] = t3) : t3 = $[6];
|
|
29727
29727
|
const t4 = useWeeksOfMonth$1(props2.date);
|
|
29728
29728
|
let t5;
|
|
29729
29729
|
if ($[7] !== props2.focused || $[8] !== props2.isPastDisabled || $[9] !== props2.onSelect || $[10] !== props2.selected || $[11] !== t4) {
|
|
@@ -29742,7 +29742,7 @@ function CalendarMonth$2(props2) {
|
|
|
29742
29742
|
let t7;
|
|
29743
29743
|
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;
|
|
29744
29744
|
}
|
|
29745
|
-
function _temp$
|
|
29745
|
+
function _temp$2B(weekday) {
|
|
29746
29746
|
return /* @__PURE__ */ jsx(Box, { paddingY: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, weight: "medium", style: {
|
|
29747
29747
|
textAlign: "center"
|
|
29748
29748
|
}, children: weekday }) }, weekday);
|
|
@@ -30054,11 +30054,11 @@ function CalendarMonthSelect$1(props2) {
|
|
|
30054
30054
|
monthNames
|
|
30055
30055
|
} = props2;
|
|
30056
30056
|
let t0;
|
|
30057
|
-
$[0] !== monthNames ? (t0 = monthNames.map(_temp$
|
|
30057
|
+
$[0] !== monthNames ? (t0 = monthNames.map(_temp$2A), $[0] = monthNames, $[1] = t0) : t0 = $[1];
|
|
30058
30058
|
let t1;
|
|
30059
30059
|
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;
|
|
30060
30060
|
}
|
|
30061
|
-
function _temp$
|
|
30061
|
+
function _temp$2A(monthName, i) {
|
|
30062
30062
|
return /* @__PURE__ */ jsx("option", { value: i, children: monthName }, i);
|
|
30063
30063
|
}
|
|
30064
30064
|
function CalendarYearSelect$1(props2) {
|
|
@@ -30711,7 +30711,7 @@ const GroupTab = forwardRef(function(props2, ref) {
|
|
|
30711
30711
|
} = useTranslation();
|
|
30712
30712
|
let t3;
|
|
30713
30713
|
$[2] !== t ? (t3 = t("inputs.object.field-group-tabs.aria-label"), $[2] = t, $[3] = t3) : t3 = $[3];
|
|
30714
|
-
const t4 = groups.find(_temp$
|
|
30714
|
+
const t4 = groups.find(_temp$2z)?.name;
|
|
30715
30715
|
let t5;
|
|
30716
30716
|
if ($[4] !== groups || $[5] !== inputId || $[6] !== path || $[7] !== t || $[8] !== validation2) {
|
|
30717
30717
|
let t62;
|
|
@@ -30745,7 +30745,7 @@ const GroupTab = forwardRef(function(props2, ref) {
|
|
|
30745
30745
|
/* @__PURE__ */ jsx(GroupSelect, { ...props2, disabled, onSelect: handleClick, validation: validation2 })
|
|
30746
30746
|
] }), $[6] = disabled, $[7] = handleClick, $[8] = props2, $[9] = validation2, $[10] = t3) : t3 = $[10], t3;
|
|
30747
30747
|
});
|
|
30748
|
-
function _temp$
|
|
30748
|
+
function _temp$2z(g) {
|
|
30749
30749
|
return g.selected;
|
|
30750
30750
|
}
|
|
30751
30751
|
const FieldGroupTabsWrapper = styled(Card).withConfig({
|
|
@@ -30921,7 +30921,7 @@ const RootStack$1 = styled(Stack).withConfig({
|
|
|
30921
30921
|
}
|
|
30922
30922
|
let t32;
|
|
30923
30923
|
if ($[5] !== schemaType.fields || $[6] !== value) {
|
|
30924
|
-
const knownFieldNames = schemaType.fields.map(_temp$
|
|
30924
|
+
const knownFieldNames = schemaType.fields.map(_temp$2y);
|
|
30925
30925
|
t32 = Object.keys(value || {}).filter((key) => !key.startsWith("_") && !knownFieldNames.includes(key)), $[5] = schemaType.fields, $[6] = value, $[7] = t32;
|
|
30926
30926
|
} else
|
|
30927
30927
|
t32 = $[7];
|
|
@@ -30935,7 +30935,7 @@ const RootStack$1 = styled(Stack).withConfig({
|
|
|
30935
30935
|
}
|
|
30936
30936
|
const renderedUnknownFields = t2;
|
|
30937
30937
|
let t3;
|
|
30938
|
-
$[13] !== groups ? (t3 = groups.find(_temp2$
|
|
30938
|
+
$[13] !== groups ? (t3 = groups.find(_temp2$16), $[13] = groups, $[14] = t3) : t3 = $[14];
|
|
30939
30939
|
const selectedGroup = t3;
|
|
30940
30940
|
let t4;
|
|
30941
30941
|
$[15] !== isFocusable || $[16] !== onPathFocus ? (t4 = (event) => {
|
|
@@ -30962,10 +30962,10 @@ const RootStack$1 = styled(Stack).withConfig({
|
|
|
30962
30962
|
renderedUnknownFields
|
|
30963
30963
|
] }), $[39] = handleFocus, $[40] = renderedUnknownFields, $[41] = t10, $[42] = t6, $[43] = t7, $[44] = t11) : t11 = $[44], t11;
|
|
30964
30964
|
});
|
|
30965
|
-
function _temp$
|
|
30965
|
+
function _temp$2y(field) {
|
|
30966
30966
|
return field.name;
|
|
30967
30967
|
}
|
|
30968
|
-
function _temp2$
|
|
30968
|
+
function _temp2$16(t0) {
|
|
30969
30969
|
const {
|
|
30970
30970
|
selected
|
|
30971
30971
|
} = t0;
|
|
@@ -31041,7 +31041,7 @@ function SlugInput(props2) {
|
|
|
31041
31041
|
focusPath
|
|
31042
31042
|
} = props2, sourceField = schemaType.options?.source;
|
|
31043
31043
|
let t0;
|
|
31044
|
-
$[0] !== validation2 ? (t0 = validation2.filter(_temp$
|
|
31044
|
+
$[0] !== validation2 ? (t0 = validation2.filter(_temp$2x), $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
31045
31045
|
const errors = t0, inputRef = useRef(null), slugContext = useSlugContext(), {
|
|
31046
31046
|
t
|
|
31047
31047
|
} = useTranslation();
|
|
@@ -31107,7 +31107,7 @@ function SlugInput(props2) {
|
|
|
31107
31107
|
t13
|
|
31108
31108
|
] }) }), $[38] = t12, $[39] = t13, $[40] = t14) : t14 = $[40], t14;
|
|
31109
31109
|
}
|
|
31110
|
-
function _temp$
|
|
31110
|
+
function _temp$2x(item) {
|
|
31111
31111
|
return item.level === "error";
|
|
31112
31112
|
}
|
|
31113
31113
|
function StringInputBasic(props2) {
|
|
@@ -31333,7 +31333,7 @@ const ScrollContainerComponent = forwardRef(function(props2, forwardedRef) {
|
|
|
31333
31333
|
const As = t0 === void 0 ? "div" : t0, ref = useRef(null);
|
|
31334
31334
|
let t1;
|
|
31335
31335
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[4] = t1) : t1 = $[4], useImperativeHandle(forwardedRef, t1);
|
|
31336
|
-
const parentContext = useContext(ScrollContext), [childContext] = useState(_temp$
|
|
31336
|
+
const parentContext = useContext(ScrollContext), [childContext] = useState(_temp$2w);
|
|
31337
31337
|
let t2, t3;
|
|
31338
31338
|
$[5] !== childContext || $[6] !== onScroll ? (t2 = () => {
|
|
31339
31339
|
if (onScroll)
|
|
@@ -31363,7 +31363,7 @@ const ScrollContainerComponent = forwardRef(function(props2, forwardedRef) {
|
|
|
31363
31363
|
return $[19] !== childContext || $[20] !== t8 ? (t9 = /* @__PURE__ */ jsx(ScrollContext.Provider, { value: childContext, children: t8 }), $[19] = childContext, $[20] = t8, $[21] = t9) : t9 = $[21], t9;
|
|
31364
31364
|
}), ScrollContainer = memo(ScrollContainerComponent);
|
|
31365
31365
|
ScrollContainer.displayName = "Memo(Forwardref(ScrollContainer))";
|
|
31366
|
-
function _temp$
|
|
31366
|
+
function _temp$2w() {
|
|
31367
31367
|
return createPubSub();
|
|
31368
31368
|
}
|
|
31369
31369
|
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 = {
|
|
@@ -32456,13 +32456,13 @@ const MENU_BUTTON_POPOVER_PROPS$1 = {
|
|
|
32456
32456
|
onMenuClose
|
|
32457
32457
|
} = props2;
|
|
32458
32458
|
let t0;
|
|
32459
|
-
$[0] !== menuOptions ? (t0 = menuOptions.map(_temp$
|
|
32459
|
+
$[0] !== menuOptions ? (t0 = menuOptions.map(_temp$2v), $[0] = menuOptions, $[1] = t0) : t0 = $[1];
|
|
32460
32460
|
let t1;
|
|
32461
32461
|
$[2] !== t0 ? (t1 = /* @__PURE__ */ jsx(Menu, { children: t0 }), $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
32462
32462
|
let t2;
|
|
32463
32463
|
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;
|
|
32464
32464
|
});
|
|
32465
|
-
function _temp$
|
|
32465
|
+
function _temp$2v(c2, index) {
|
|
32466
32466
|
const {
|
|
32467
32467
|
collapsedProps,
|
|
32468
32468
|
expandedProps,
|
|
@@ -32584,7 +32584,7 @@ const CollapseMenu = forwardRef(function(props2, ref) {
|
|
|
32584
32584
|
}, $[10] = rootEl, $[11] = t3) : t3 = $[11];
|
|
32585
32585
|
const intersectionOptions = t3;
|
|
32586
32586
|
let t4;
|
|
32587
|
-
$[12] !== menuOptions ? (t4 = menuOptions.map(_temp$
|
|
32587
|
+
$[12] !== menuOptions ? (t4 = menuOptions.map(_temp$2u), $[12] = menuOptions, $[13] = t4) : t4 = $[13];
|
|
32588
32588
|
const menuOptionKeys = t4;
|
|
32589
32589
|
let t5;
|
|
32590
32590
|
$[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];
|
|
@@ -32722,7 +32722,7 @@ const CollapseMenu = forwardRef(function(props2, ref) {
|
|
|
32722
32722
|
let t1;
|
|
32723
32723
|
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;
|
|
32724
32724
|
});
|
|
32725
|
-
function _temp$
|
|
32725
|
+
function _temp$2u(child) {
|
|
32726
32726
|
return child.key;
|
|
32727
32727
|
}
|
|
32728
32728
|
const CollapseMenuButton = forwardRef(function(props2, ref) {
|
|
@@ -32913,9 +32913,9 @@ function useActiveActionKeys(t0) {
|
|
|
32913
32913
|
actions
|
|
32914
32914
|
} = t0, editor2 = usePortableTextEditor(), selection = usePortableTextEditorSelection();
|
|
32915
32915
|
let t1;
|
|
32916
|
-
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$
|
|
32916
|
+
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$2t) : [], $[0] = actions, $[1] = editor2, $[2] = selection, $[3] = t1) : t1 = $[3], useUnique(t1);
|
|
32917
32917
|
}
|
|
32918
|
-
function _temp$
|
|
32918
|
+
function _temp$2t(a_0) {
|
|
32919
32919
|
return a_0.key;
|
|
32920
32920
|
}
|
|
32921
32921
|
function useActiveStyleKeys(t0) {
|
|
@@ -32923,43 +32923,40 @@ function useActiveStyleKeys(t0) {
|
|
|
32923
32923
|
items
|
|
32924
32924
|
} = t0, editor2 = usePortableTextEditor(), focusBlock = useFocusBlock(), selection = usePortableTextEditorSelection();
|
|
32925
32925
|
let t1;
|
|
32926
|
-
return $[0] !== editor2 || $[1] !== focusBlock || $[2] !== items || $[3] !== selection ? (t1 = focusBlock && selection ? items.filter((i) => PortableTextEditor.hasBlockStyle(editor2, i.style)).map(_temp2$
|
|
32926
|
+
return $[0] !== editor2 || $[1] !== focusBlock || $[2] !== items || $[3] !== selection ? (t1 = focusBlock && selection ? items.filter((i) => PortableTextEditor.hasBlockStyle(editor2, i.style)).map(_temp2$15) : [], $[0] = editor2, $[1] = focusBlock, $[2] = items, $[3] = selection, $[4] = t1) : t1 = $[4], useUnique(t1);
|
|
32927
32927
|
}
|
|
32928
|
-
function _temp2$
|
|
32928
|
+
function _temp2$15(i_0) {
|
|
32929
32929
|
return i_0.style;
|
|
32930
32930
|
}
|
|
32931
32931
|
const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$3 = {
|
|
32932
32932
|
constrainSize: !0,
|
|
32933
32933
|
portal: !0
|
|
32934
32934
|
}, ActionMenu = memo(function(props2) {
|
|
32935
|
-
const $ = c(
|
|
32935
|
+
const $ = c(31), {
|
|
32936
32936
|
disabled: disabledProp,
|
|
32937
32937
|
groups,
|
|
32938
32938
|
isFullscreen,
|
|
32939
32939
|
collapsed
|
|
32940
|
-
} = props2, focusBlock = useFocusBlock(),
|
|
32940
|
+
} = props2, focusBlock = useFocusBlock(), legacyEditor = usePortableTextEditor(), editor2 = useEditor(), schemaTypes = usePortableTextMemberSchemaTypes(), {
|
|
32941
32941
|
t
|
|
32942
|
-
} = useTranslation();
|
|
32942
|
+
} = useTranslation(), isSelectingMultipleBlocks = useEditorSelector(editor2, _temp$2s), isVoidBlock = focusBlock?._type !== schemaTypes.block.name, isEmptyTextBlock = !isVoidBlock && Array.isArray(focusBlock.children) && focusBlock.children.length === 1 && focusBlock?.children[0].text === "", disabled = disabledProp || isVoidBlock;
|
|
32943
32943
|
let t0;
|
|
32944
|
-
$[0] !==
|
|
32945
|
-
const
|
|
32944
|
+
$[0] !== groups ? (t0 = groups.reduce(_temp3$x, []), $[0] = groups, $[1] = t0) : t0 = $[1];
|
|
32945
|
+
const actions = t0;
|
|
32946
32946
|
let t1;
|
|
32947
|
-
$[2] !==
|
|
32948
|
-
const actions = t1;
|
|
32949
|
-
let t2;
|
|
32950
|
-
$[4] !== actions ? (t2 = {
|
|
32947
|
+
$[2] !== actions ? (t1 = {
|
|
32951
32948
|
actions
|
|
32952
|
-
}, $[
|
|
32953
|
-
const activeKeys = useActiveActionKeys(
|
|
32949
|
+
}, $[2] = actions, $[3] = t1) : t1 = $[3];
|
|
32950
|
+
const activeKeys = useActiveActionKeys(t1);
|
|
32951
|
+
let t2;
|
|
32952
|
+
$[4] !== legacyEditor ? (t2 = () => {
|
|
32953
|
+
PortableTextEditor.focus(legacyEditor);
|
|
32954
|
+
}, $[4] = legacyEditor, $[5] = t2) : t2 = $[5];
|
|
32955
|
+
const handleMenuClose = t2, tooltipPlacement = isFullscreen ? "bottom" : "top";
|
|
32954
32956
|
let t3;
|
|
32955
|
-
$[6] !==
|
|
32956
|
-
|
|
32957
|
-
|
|
32958
|
-
const handleMenuClose = t3, tooltipPlacement = isFullscreen ? "bottom" : "top";
|
|
32959
|
-
let t4;
|
|
32960
|
-
if ($[8] !== actions || $[9] !== activeKeys || $[10] !== disabled || $[11] !== isEmptyTextBlock || $[12] !== isSelectingMultipleBlocks || $[13] !== t || $[14] !== tooltipPlacement) {
|
|
32961
|
-
let t52;
|
|
32962
|
-
$[16] !== activeKeys || $[17] !== disabled || $[18] !== isEmptyTextBlock || $[19] !== isSelectingMultipleBlocks || $[20] !== t || $[21] !== tooltipPlacement ? (t52 = (action_0) => {
|
|
32957
|
+
if ($[6] !== actions || $[7] !== activeKeys || $[8] !== disabled || $[9] !== isEmptyTextBlock || $[10] !== isSelectingMultipleBlocks || $[11] !== t || $[12] !== tooltipPlacement) {
|
|
32958
|
+
let t42;
|
|
32959
|
+
$[14] !== activeKeys || $[15] !== disabled || $[16] !== isEmptyTextBlock || $[17] !== isSelectingMultipleBlocks || $[18] !== t || $[19] !== tooltipPlacement ? (t42 = (action_0) => {
|
|
32963
32960
|
const annotationDisabled = action_0.type === "annotation" && (isEmptyTextBlock || isSelectingMultipleBlocks), annotationDisabledText = isEmptyTextBlock ? t("user-menu.action.portable-text.annotation-disabled_empty-block", {
|
|
32964
32961
|
name: action_0.title || action_0.key
|
|
32965
32962
|
}) : t("user-menu.action.portable-text.annotation-disabled_multiple-blocks", {
|
|
@@ -32972,31 +32969,35 @@ const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$3 = {
|
|
|
32972
32969
|
placement: tooltipPlacement,
|
|
32973
32970
|
portal: "default"
|
|
32974
32971
|
} }, action_0.key);
|
|
32975
|
-
}, $[
|
|
32972
|
+
}, $[14] = activeKeys, $[15] = disabled, $[16] = isEmptyTextBlock, $[17] = isSelectingMultipleBlocks, $[18] = t, $[19] = tooltipPlacement, $[20] = t42) : t42 = $[20], t3 = actions.map(t42), $[6] = actions, $[7] = activeKeys, $[8] = disabled, $[9] = isEmptyTextBlock, $[10] = isSelectingMultipleBlocks, $[11] = t, $[12] = tooltipPlacement, $[13] = t3;
|
|
32976
32973
|
} else
|
|
32977
|
-
|
|
32978
|
-
const children =
|
|
32979
|
-
let
|
|
32980
|
-
$[
|
|
32974
|
+
t3 = $[13];
|
|
32975
|
+
const children = t3;
|
|
32976
|
+
let t4;
|
|
32977
|
+
$[21] !== tooltipPlacement ? (t4 = {
|
|
32981
32978
|
placement: tooltipPlacement
|
|
32982
|
-
}, $[
|
|
32983
|
-
let
|
|
32984
|
-
$[
|
|
32985
|
-
button: /* @__PURE__ */ jsx(ContextMenuButton, { "data-testid": "action-menu-button", disabled, tooltipProps:
|
|
32979
|
+
}, $[21] = tooltipPlacement, $[22] = t4) : t4 = $[22];
|
|
32980
|
+
let t5;
|
|
32981
|
+
$[23] !== disabled || $[24] !== t4 ? (t5 = {
|
|
32982
|
+
button: /* @__PURE__ */ jsx(ContextMenuButton, { "data-testid": "action-menu-button", disabled, tooltipProps: t4 }),
|
|
32986
32983
|
popover: MENU_POPOVER_PROPS$3
|
|
32987
|
-
}, $[
|
|
32988
|
-
const menuButtonProps =
|
|
32989
|
-
let
|
|
32990
|
-
return $[
|
|
32984
|
+
}, $[23] = disabled, $[24] = t4, $[25] = t5) : t5 = $[25];
|
|
32985
|
+
const menuButtonProps = t5;
|
|
32986
|
+
let t6;
|
|
32987
|
+
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;
|
|
32991
32988
|
});
|
|
32992
|
-
function _temp$
|
|
32989
|
+
function _temp$2s(snapshot2) {
|
|
32990
|
+
const startBlock = getSelectionStartBlock(snapshot2), endBlock = getSelectionEndBlock(snapshot2);
|
|
32991
|
+
return !!startBlock && !!endBlock && !isEqual$2(startBlock.path, endBlock.path);
|
|
32992
|
+
}
|
|
32993
|
+
function _temp2$14(action, actionIndex) {
|
|
32993
32994
|
return actionIndex === 0 ? {
|
|
32994
32995
|
...action,
|
|
32995
32996
|
firstInGroup: !0
|
|
32996
32997
|
} : action;
|
|
32997
32998
|
}
|
|
32998
|
-
function
|
|
32999
|
-
return acc.concat(group2.actions.map(
|
|
32999
|
+
function _temp3$x(acc, group2) {
|
|
33000
|
+
return acc.concat(group2.actions.map(_temp2$14));
|
|
33000
33001
|
}
|
|
33001
33002
|
const MenuButtonMemo = memo(MenuButton), StyledMenuItem = styled(MenuItem$1).withConfig({
|
|
33002
33003
|
displayName: "StyledMenuItem",
|
|
@@ -33177,12 +33178,12 @@ const MenuButtonMemo = memo(MenuButton), StyledMenuItem = styled(MenuItem$1).wit
|
|
|
33177
33178
|
onToggleFullscreen
|
|
33178
33179
|
} = t0, {
|
|
33179
33180
|
t
|
|
33180
|
-
} = useTranslation(), showActionMenu = actionGroups.reduce(_temp$
|
|
33181
|
+
} = useTranslation(), showActionMenu = actionGroups.reduce(_temp$2r, 0) > 0, showInsertMenu = insertMenuItems.length > 0, [rootElement, setRootElement] = useState(null), rootElementRect = useElementRect(rootElement), collapsed = collapsible && rootElementRect ? rootElementRect?.width < 400 : !1, showBlockStyleSelect = blockStyles.length > 1;
|
|
33181
33182
|
let t1;
|
|
33182
33183
|
$[0] !== rootElement ? (t1 = {
|
|
33183
33184
|
rootElement
|
|
33184
33185
|
}, $[0] = rootElement, $[1] = t1) : t1 = $[1], useRovingFocus(t1);
|
|
33185
|
-
const preventEditorBlurOnToolbarMouseDown = _temp2$
|
|
33186
|
+
const preventEditorBlurOnToolbarMouseDown = _temp2$13;
|
|
33186
33187
|
let t2;
|
|
33187
33188
|
$[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];
|
|
33188
33189
|
let t3;
|
|
@@ -33286,10 +33287,10 @@ function Toolbar(props2) {
|
|
|
33286
33287
|
let t6;
|
|
33287
33288
|
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;
|
|
33288
33289
|
}
|
|
33289
|
-
function _temp$
|
|
33290
|
+
function _temp$2r(acc, x) {
|
|
33290
33291
|
return acc + x.actions.length;
|
|
33291
33292
|
}
|
|
33292
|
-
function _temp2$
|
|
33293
|
+
function _temp2$13(e) {
|
|
33293
33294
|
e.preventDefault();
|
|
33294
33295
|
}
|
|
33295
33296
|
const noOutlineStyle = {
|
|
@@ -33343,7 +33344,7 @@ function Editor(props2) {
|
|
|
33343
33344
|
}, $[0] = isFullscreen, $[1] = isTopLayer, $[2] = onToggleFullscreen, $[3] = t0) : t0 = $[3], useGlobalKeyDown(t0);
|
|
33344
33345
|
let t1;
|
|
33345
33346
|
$[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];
|
|
33346
|
-
const renderPlaceholder = t1, spellCheck = useSpellCheck(), renderDecorator = _temp$
|
|
33347
|
+
const renderPlaceholder = t1, spellCheck = useSpellCheck(), renderDecorator = _temp$2q, renderStyle = _temp2$12, renderListItem = _temp3$w, scrollSelectionIntoView = useScrollSelectionIntoView(scrollElement);
|
|
33347
33348
|
let t2;
|
|
33348
33349
|
$[6] !== ariaDescribedBy || $[7] !== elementRef || $[8] !== hotkeys || $[9] !== initialSelection || $[10] !== onCopy || $[11] !== onPaste || $[12] !== rangeDecorations || $[13] !== renderAnnotation || $[14] !== renderBlock2 || $[15] !== renderChild2 || $[16] !== renderPlaceholder || $[17] !== scrollSelectionIntoView || $[18] !== spellCheck ? (t2 = {
|
|
33349
33350
|
"aria-describedby": ariaDescribedBy,
|
|
@@ -33395,13 +33396,13 @@ function Editor(props2) {
|
|
|
33395
33396
|
t13
|
|
33396
33397
|
] }), $[53] = isFullscreen, $[54] = isOneLine, $[55] = t13, $[56] = t5, $[57] = t14) : t14 = $[57], t14;
|
|
33397
33398
|
}
|
|
33398
|
-
function _temp3$
|
|
33399
|
+
function _temp3$w(listItemProps) {
|
|
33399
33400
|
return /* @__PURE__ */ jsx(ListItem$1, { ...listItemProps });
|
|
33400
33401
|
}
|
|
33401
|
-
function _temp2$
|
|
33402
|
+
function _temp2$12(styleProps) {
|
|
33402
33403
|
return /* @__PURE__ */ jsx(Style, { ...styleProps });
|
|
33403
33404
|
}
|
|
33404
|
-
function _temp$
|
|
33405
|
+
function _temp$2q(decoratorProps) {
|
|
33405
33406
|
return /* @__PURE__ */ jsx(Decorator, { ...decoratorProps });
|
|
33406
33407
|
}
|
|
33407
33408
|
function useHotkeys(hotkeys) {
|
|
@@ -33459,10 +33460,10 @@ function useTrackFocusPath(props2) {
|
|
|
33459
33460
|
$[3] !== boundaryElement || $[4] !== editor2 || $[5] !== elementRefs || $[6] !== focusPath || $[7] !== portableTextMemberItems ? (t2 = () => {
|
|
33460
33461
|
if (focusPath.length === 0)
|
|
33461
33462
|
return;
|
|
33462
|
-
const editorHasDomFocus = !!boundaryElement?.ownerDocument.activeElement && boundaryElement.contains(boundaryElement.ownerDocument.activeElement), currentSelection = selectionRef.current, openItem = portableTextMemberItems.find(_temp$
|
|
33463
|
+
const editorHasDomFocus = !!boundaryElement?.ownerDocument.activeElement && boundaryElement.contains(boundaryElement.ownerDocument.activeElement), currentSelection = selectionRef.current, openItem = portableTextMemberItems.find(_temp$2p), openEditingItem = portableTextMemberItems.find(_temp2$11);
|
|
33463
33464
|
if (currentSelection?.focus.path && isEqual$2(currentSelection.focus.path, focusPath.slice(0, currentSelection.focus.path.length)) && (editorHasDomFocus || openEditingItem))
|
|
33464
33465
|
return;
|
|
33465
|
-
const relatedEditorItem = portableTextMemberItems.find(_temp3$
|
|
33466
|
+
const relatedEditorItem = portableTextMemberItems.find(_temp3$v) || openItem, elementRef = relatedEditorItem ? elementRefs[relatedEditorItem.member.key] : void 0;
|
|
33466
33467
|
if (relatedEditorItem && elementRef) {
|
|
33467
33468
|
boundaryElement && (scrollIntoView$1(boundaryElement, {
|
|
33468
33469
|
scrollMode: "if-needed",
|
|
@@ -33501,13 +33502,13 @@ function useTrackFocusPath(props2) {
|
|
|
33501
33502
|
let t3;
|
|
33502
33503
|
$[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);
|
|
33503
33504
|
}
|
|
33504
|
-
function _temp3$
|
|
33505
|
+
function _temp3$v(m_1) {
|
|
33505
33506
|
return m_1.member.item.focused;
|
|
33506
33507
|
}
|
|
33507
|
-
function _temp2$
|
|
33508
|
+
function _temp2$11(m_0) {
|
|
33508
33509
|
return m_0.member.open && (m_0.kind === "annotation" || m_0.kind === "objectBlock" || m_0.kind === "inlineObject");
|
|
33509
33510
|
}
|
|
33510
|
-
function _temp$
|
|
33511
|
+
function _temp$2p(m) {
|
|
33511
33512
|
return m.member.open;
|
|
33512
33513
|
}
|
|
33513
33514
|
const POPOVER_FALLBACK_PLACEMENTS$4 = ["top", "bottom"];
|
|
@@ -34114,10 +34115,10 @@ const InlineObject = (props2) => {
|
|
|
34114
34115
|
t
|
|
34115
34116
|
} = useTranslation(), hasMarkers = markers.length > 0, popoverTitle = schemaType?.title || schemaType.name;
|
|
34116
34117
|
let t0;
|
|
34117
|
-
$[0] !== validation2 ? (t0 = validation2.filter(_temp$
|
|
34118
|
+
$[0] !== validation2 ? (t0 = validation2.filter(_temp$2o), $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
34118
34119
|
const hasError = t0.length > 0;
|
|
34119
34120
|
let t1;
|
|
34120
|
-
$[2] !== validation2 ? (t1 = validation2.filter(_temp2$
|
|
34121
|
+
$[2] !== validation2 ? (t1 = validation2.filter(_temp2$10), $[2] = validation2, $[3] = t1) : t1 = $[3];
|
|
34121
34122
|
const hasWarning = t1.length > 0;
|
|
34122
34123
|
let t2;
|
|
34123
34124
|
bb0: {
|
|
@@ -34162,16 +34163,16 @@ const InlineObject = (props2) => {
|
|
|
34162
34163
|
t15
|
|
34163
34164
|
] }), $[41] = t13, $[42] = t14, $[43] = t15, $[44] = t16) : t16 = $[44], t16;
|
|
34164
34165
|
};
|
|
34165
|
-
function _temp$
|
|
34166
|
+
function _temp$2o(v) {
|
|
34166
34167
|
return v.level === "error";
|
|
34167
34168
|
}
|
|
34168
|
-
function _temp2$
|
|
34169
|
+
function _temp2$10(v_0) {
|
|
34169
34170
|
return v_0.level === "warning";
|
|
34170
34171
|
}
|
|
34171
34172
|
function AnnotationObjectEditModal(props2) {
|
|
34172
34173
|
const $ = c(14), editor2 = usePortableTextEditor(), boundaryElement = useBoundaryElement().element, portableTextMemberItems = usePortableTextMemberItems(), elementRefs = usePortableTextMemberItemElementRefs();
|
|
34173
34174
|
let t0;
|
|
34174
|
-
$[0] !== portableTextMemberItems ? (t0 = portableTextMemberItems.find(_temp$
|
|
34175
|
+
$[0] !== portableTextMemberItems ? (t0 = portableTextMemberItems.find(_temp$2n), $[0] = portableTextMemberItems, $[1] = t0) : t0 = $[1];
|
|
34175
34176
|
const openAnnotation = t0;
|
|
34176
34177
|
let t1;
|
|
34177
34178
|
$[2] !== editor2 || $[3] !== openAnnotation || $[4] !== props2 ? (t1 = () => {
|
|
@@ -34187,7 +34188,7 @@ function AnnotationObjectEditModal(props2) {
|
|
|
34187
34188
|
let t3;
|
|
34188
34189
|
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;
|
|
34189
34190
|
}
|
|
34190
|
-
function _temp$
|
|
34191
|
+
function _temp$2n(m) {
|
|
34191
34192
|
return m.kind === "annotation" && m.member.open;
|
|
34192
34193
|
}
|
|
34193
34194
|
function Compositor(props2) {
|
|
@@ -34658,7 +34659,7 @@ function useOptimisticPortableTextDiff(t0) {
|
|
|
34658
34659
|
t22 = Object.values(optimisticRangeDecorations).concat(Object.entries(definitiveRangeDecorations).filter((t32) => {
|
|
34659
34660
|
const [blockKey] = t32;
|
|
34660
34661
|
return typeof optimisticRangeDecorations[blockKey] > "u";
|
|
34661
|
-
}).map(_temp$
|
|
34662
|
+
}).map(_temp$2m)).flat(), $[2] = definitiveValue, $[3] = optimisticValue, $[4] = perspective, $[5] = upstreamValue, $[6] = t22;
|
|
34662
34663
|
} else
|
|
34663
34664
|
t22 = $[6];
|
|
34664
34665
|
t1 = t22;
|
|
@@ -34696,7 +34697,7 @@ function useOptimisticPortableTextDiff(t0) {
|
|
|
34696
34697
|
onOptimisticChange
|
|
34697
34698
|
}, $[14] = onOptimisticChange, $[15] = rangeDecorations, $[16] = t5) : t5 = $[16], t5;
|
|
34698
34699
|
}
|
|
34699
|
-
function _temp$
|
|
34700
|
+
function _temp$2m(t0) {
|
|
34700
34701
|
const [, blockRangeDecorations] = t0;
|
|
34701
34702
|
return blockRangeDecorations;
|
|
34702
34703
|
}
|
|
@@ -34839,7 +34840,7 @@ const markdownConfig = {
|
|
|
34839
34840
|
data: blocks
|
|
34840
34841
|
};
|
|
34841
34842
|
},
|
|
34842
|
-
actions: [_temp$
|
|
34843
|
+
actions: [_temp$2l]
|
|
34843
34844
|
}), $[0] = schemaTypes.block.options?.unstable_whitespaceOnPasteMode, $[1] = t0) : t0 = $[1];
|
|
34844
34845
|
let t1;
|
|
34845
34846
|
$[2] !== t0 ? (t1 = [t0], $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
@@ -34853,7 +34854,7 @@ const markdownConfig = {
|
|
|
34853
34854
|
pasteLink: {},
|
|
34854
34855
|
typography: {
|
|
34855
34856
|
guard: createDecoratorGuard({
|
|
34856
|
-
decorators: _temp3$
|
|
34857
|
+
decorators: _temp3$u
|
|
34857
34858
|
})
|
|
34858
34859
|
}
|
|
34859
34860
|
},
|
|
@@ -34964,7 +34965,7 @@ const RenderDefault = (props2) => {
|
|
|
34964
34965
|
let t1;
|
|
34965
34966
|
return $[1] !== RenderPlugins || $[2] !== props2 ? (t1 = /* @__PURE__ */ jsx(RenderPlugins, { ...props2 }), $[1] = RenderPlugins, $[2] = props2, $[3] = t1) : t1 = $[3], t1;
|
|
34966
34967
|
};
|
|
34967
|
-
function _temp$
|
|
34968
|
+
function _temp$2l(t0, deserializeEvent) {
|
|
34968
34969
|
const {
|
|
34969
34970
|
event: event_0
|
|
34970
34971
|
} = t0;
|
|
@@ -34973,14 +34974,14 @@ function _temp$2m(t0, deserializeEvent) {
|
|
|
34973
34974
|
originEvent: event_0.originEvent
|
|
34974
34975
|
})];
|
|
34975
34976
|
}
|
|
34976
|
-
function _temp2
|
|
34977
|
+
function _temp2$$(decorator) {
|
|
34977
34978
|
return decorator.name === "code" ? [] : [decorator.name];
|
|
34978
34979
|
}
|
|
34979
|
-
function _temp3$
|
|
34980
|
+
function _temp3$u(t0) {
|
|
34980
34981
|
const {
|
|
34981
34982
|
context
|
|
34982
34983
|
} = t0;
|
|
34983
|
-
return context.schema.decorators.flatMap(_temp2
|
|
34984
|
+
return context.schema.decorators.flatMap(_temp2$$);
|
|
34984
34985
|
}
|
|
34985
34986
|
const DOT_SIZE = 6, CONTENT_BOX_VARIANTS = {
|
|
34986
34987
|
animate: {
|
|
@@ -35122,7 +35123,7 @@ function usePresenceCursorDecorations(props2) {
|
|
|
35122
35123
|
const handleRangeDecorationMoved = t2;
|
|
35123
35124
|
let t3, t4;
|
|
35124
35125
|
$[3] !== fieldPresence || $[4] !== path ? (t3 = () => {
|
|
35125
|
-
const nextPresence = fieldPresence.filter((p_0) => startsWith(path, p_0.path) && !isEqual$1(path, p_0.path)), filteredNext = nextPresence.map(_temp$
|
|
35126
|
+
const nextPresence = fieldPresence.filter((p_0) => startsWith(path, p_0.path) && !isEqual$1(path, p_0.path)), filteredNext = nextPresence.map(_temp$2k), filteredPrevious = previousPresence.current.map(_temp2$_);
|
|
35126
35127
|
if (!isEqual$1(filteredNext, filteredPrevious)) {
|
|
35127
35128
|
const value = nextPresence.length > 0 ? nextPresence : EMPTY_ARRAY$u;
|
|
35128
35129
|
setCurrentPresence(value), previousPresence.current = value;
|
|
@@ -35154,13 +35155,13 @@ function usePresenceCursorDecorations(props2) {
|
|
|
35154
35155
|
setPresenceCursorDecorations(decorations.filter(Boolean));
|
|
35155
35156
|
}, t6 = [currentPresence, handleRangeDecorationMoved], $[7] = currentPresence, $[8] = t5, $[9] = t6) : (t5 = $[8], t6 = $[9]), useEffect(t5, t6), presenceCursorDecorations;
|
|
35156
35157
|
}
|
|
35157
|
-
function _temp2
|
|
35158
|
+
function _temp2$_(d_0) {
|
|
35158
35159
|
return {
|
|
35159
35160
|
...d_0.selection,
|
|
35160
35161
|
sessionId: d_0.sessionId
|
|
35161
35162
|
};
|
|
35162
35163
|
}
|
|
35163
|
-
function _temp$
|
|
35164
|
+
function _temp$2k(d) {
|
|
35164
35165
|
return {
|
|
35165
35166
|
...d.selection,
|
|
35166
35167
|
sessionId: d.sessionId
|
|
@@ -35894,12 +35895,12 @@ function useFeatureEnabled(featureKey) {
|
|
|
35894
35895
|
features: features2,
|
|
35895
35896
|
error: null
|
|
35896
35897
|
};
|
|
35897
|
-
}, $[6] = featureKey, $[7] = t2) : t2 = $[7], t1 = req.pipe(map(t2), startWith(INITIAL_LOADING_STATE$3), catchError(_temp$
|
|
35898
|
+
}, $[6] = featureKey, $[7] = t2) : t2 = $[7], t1 = req.pipe(map(t2), startWith(INITIAL_LOADING_STATE$3), catchError(_temp$2j)), $[3] = featureKey, $[4] = req, $[5] = t1;
|
|
35898
35899
|
} else
|
|
35899
35900
|
t1 = $[5];
|
|
35900
35901
|
return useObservable(t1, INITIAL_LOADING_STATE$3);
|
|
35901
35902
|
}
|
|
35902
|
-
function _temp$
|
|
35903
|
+
function _temp$2j(error) {
|
|
35903
35904
|
return of({
|
|
35904
35905
|
isLoading: !1,
|
|
35905
35906
|
enabled: !1,
|
|
@@ -35916,7 +35917,7 @@ function DisabledFeatureWarning(t0) {
|
|
|
35916
35917
|
} = useTranslation();
|
|
35917
35918
|
let t1;
|
|
35918
35919
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = {
|
|
35919
|
-
DocumentationLink: _temp$
|
|
35920
|
+
DocumentationLink: _temp$2i
|
|
35920
35921
|
}, $[0] = t1) : t1 = $[0];
|
|
35921
35922
|
let t2;
|
|
35922
35923
|
$[1] !== t ? (t2 = /* @__PURE__ */ jsx(Translate, { t, i18nKey: "inputs.reference.cross-dataset.feature-disabled-description", components: t1 }), $[1] = t, $[2] = t2) : t2 = $[2];
|
|
@@ -35953,7 +35954,7 @@ function DisabledFeatureWarning(t0) {
|
|
|
35953
35954
|
t11
|
|
35954
35955
|
] }), $[26] = t10, $[27] = t11, $[28] = t12) : t12 = $[28], t12;
|
|
35955
35956
|
}
|
|
35956
|
-
function _temp$
|
|
35957
|
+
function _temp$2i(t0) {
|
|
35957
35958
|
const {
|
|
35958
35959
|
children
|
|
35959
35960
|
} = t0;
|
|
@@ -36047,7 +36048,7 @@ function useReferenceInfo$1(doc, getReferenceInfo2) {
|
|
|
36047
36048
|
const $ = c(8), [retryAttempt, setRetryAttempt] = useState(0);
|
|
36048
36049
|
let t0;
|
|
36049
36050
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
36050
|
-
setRetryAttempt(_temp$
|
|
36051
|
+
setRetryAttempt(_temp$2h);
|
|
36051
36052
|
}, $[0] = t0) : t0 = $[0];
|
|
36052
36053
|
const retry2 = t0;
|
|
36053
36054
|
let t1;
|
|
@@ -36071,7 +36072,7 @@ function useReferenceInfo$1(doc, getReferenceInfo2) {
|
|
|
36071
36072
|
retryAttempt
|
|
36072
36073
|
})))) : of(EMPTY_STATE$1), $[4] = docInfo, $[5] = getReferenceInfo2, $[6] = retryAttempt, $[7] = t2) : t2 = $[7], useObservable(t2, INITIAL_LOADING_STATE$2);
|
|
36073
36074
|
}
|
|
36074
|
-
function _temp$
|
|
36075
|
+
function _temp$2h(current) {
|
|
36075
36076
|
return current + 1;
|
|
36076
36077
|
}
|
|
36077
36078
|
function useProjectId$1() {
|
|
@@ -36310,7 +36311,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36310
36311
|
push
|
|
36311
36312
|
} = useToast();
|
|
36312
36313
|
let t12;
|
|
36313
|
-
$[29] !== validation2 ? (t12 = validation2.filter(_temp$
|
|
36314
|
+
$[29] !== validation2 ? (t12 = validation2.filter(_temp$2g), $[29] = validation2, $[30] = t12) : t12 = $[30];
|
|
36314
36315
|
const errors = t12;
|
|
36315
36316
|
let t13;
|
|
36316
36317
|
$[31] !== onPathFocus || $[32] !== path ? (t13 = (event_0) => {
|
|
@@ -36341,7 +36342,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36341
36342
|
id: `reference-search-fail-${inputId}`
|
|
36342
36343
|
}), console.error(error), of({
|
|
36343
36344
|
hits: []
|
|
36344
|
-
})))))), scan(_temp2$
|
|
36345
|
+
})))))), scan(_temp2$Z, INITIAL_SEARCH_STATE$2), tap(setSearchState)), $[38] = inputId, $[39] = onSearch, $[40] = push, $[41] = t16) : t16 = $[41];
|
|
36345
36346
|
const handleQueryChange = useObservableEvent(t16);
|
|
36346
36347
|
let t17;
|
|
36347
36348
|
$[42] !== handleQueryChange ? (t17 = () => {
|
|
@@ -36364,7 +36365,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36364
36365
|
let t22;
|
|
36365
36366
|
$[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];
|
|
36366
36367
|
let t23;
|
|
36367
|
-
$[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$
|
|
36368
|
+
$[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$t), 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: {
|
|
36368
36369
|
onClick: handleAutocompleteOpenButtonClick
|
|
36369
36370
|
}, 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: [
|
|
36370
36371
|
/* @__PURE__ */ jsxs(Flex, { align: "center", padding: 1, children: [
|
|
@@ -36387,19 +36388,19 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
36387
36388
|
t23
|
|
36388
36389
|
] }), $[92] = props2.elementProps.style, $[93] = t22, $[94] = t23, $[95] = t24) : t24 = $[95], t24;
|
|
36389
36390
|
}
|
|
36390
|
-
function _temp3$
|
|
36391
|
+
function _temp3$t(hit_0) {
|
|
36391
36392
|
return {
|
|
36392
36393
|
value: hit_0.id,
|
|
36393
36394
|
hit: hit_0
|
|
36394
36395
|
};
|
|
36395
36396
|
}
|
|
36396
|
-
function _temp2$
|
|
36397
|
+
function _temp2$Z(prevState, nextState) {
|
|
36397
36398
|
return {
|
|
36398
36399
|
...prevState,
|
|
36399
36400
|
...nextState
|
|
36400
36401
|
};
|
|
36401
36402
|
}
|
|
36402
|
-
function _temp$
|
|
36403
|
+
function _temp$2g(item) {
|
|
36403
36404
|
return item.level === "error";
|
|
36404
36405
|
}
|
|
36405
36406
|
const REQUEST_TAG_BASE$1 = "cross-dataset-refs", AVAILABILITY_READABLE$2 = {
|
|
@@ -36646,7 +36647,7 @@ function useReferenceInfo(doc, getReferenceInfo2) {
|
|
|
36646
36647
|
const $ = c(10), [retryAttempt, setRetryAttempt] = useState(0);
|
|
36647
36648
|
let t0;
|
|
36648
36649
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
36649
|
-
setRetryAttempt(_temp$
|
|
36650
|
+
setRetryAttempt(_temp$2f);
|
|
36650
36651
|
}, $[0] = t0) : t0 = $[0];
|
|
36651
36652
|
const retry2 = t0;
|
|
36652
36653
|
let t1;
|
|
@@ -36680,7 +36681,7 @@ function useReferenceInfo(doc, getReferenceInfo2) {
|
|
|
36680
36681
|
}
|
|
36681
36682
|
return useObservable(t1, INITIAL_LOADING_STATE$1);
|
|
36682
36683
|
}
|
|
36683
|
-
function _temp$
|
|
36684
|
+
function _temp$2f(current) {
|
|
36684
36685
|
return current + 1;
|
|
36685
36686
|
}
|
|
36686
36687
|
function OptionPreview(props2) {
|
|
@@ -36922,7 +36923,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
36922
36923
|
push
|
|
36923
36924
|
} = useToast();
|
|
36924
36925
|
let t11;
|
|
36925
|
-
$[31] !== validation2 ? (t11 = validation2.filter(_temp$
|
|
36926
|
+
$[31] !== validation2 ? (t11 = validation2.filter(_temp$2e), $[31] = validation2, $[32] = t11) : t11 = $[32];
|
|
36926
36927
|
const errors = t11;
|
|
36927
36928
|
let t12;
|
|
36928
36929
|
$[33] !== onPathFocus ? (t12 = (event_0) => {
|
|
@@ -36953,7 +36954,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
36953
36954
|
id: `reference-search-fail-${inputId}`
|
|
36954
36955
|
}), console.error(error), of({
|
|
36955
36956
|
hits: []
|
|
36956
|
-
})))))), scan(_temp2$
|
|
36957
|
+
})))))), scan(_temp2$Y, INITIAL_SEARCH_STATE$1), tap(setSearchState)), $[39] = inputId, $[40] = onSearch, $[41] = push, $[42] = t15) : t15 = $[42];
|
|
36957
36958
|
const handleQueryChange = useObservableEvent(t15);
|
|
36958
36959
|
let t16;
|
|
36959
36960
|
$[43] !== handleQueryChange ? (t16 = () => {
|
|
@@ -36997,7 +36998,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
36997
36998
|
let t20;
|
|
36998
36999
|
$[55] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = () => [clickOutsideBoundaryRef.current, autocompletePortalRef.current], $[55] = t20) : t20 = $[55], useClickOutsideEvent(t19, t20);
|
|
36999
37000
|
let t21;
|
|
37000
|
-
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$
|
|
37001
|
+
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$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$1, renderOption, openButton: {
|
|
37001
37002
|
onClick: handleAutocompleteOpenButtonClick
|
|
37002
37003
|
}, 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: [
|
|
37003
37004
|
/* @__PURE__ */ jsxs(Flex, { align: "center", padding: 1, children: [
|
|
@@ -37015,19 +37016,19 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
37015
37016
|
loadableReferenceInfo.error && /* @__PURE__ */ jsx(ReferenceMetadataLoadErrorAlertStrip, { errorMessage: loadableReferenceInfo.error.message, onHandleRetry: loadableReferenceInfo.retry })
|
|
37016
37017
|
] }) }) }), $[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;
|
|
37017
37018
|
}
|
|
37018
|
-
function _temp3$
|
|
37019
|
+
function _temp3$s(hit_0) {
|
|
37019
37020
|
return {
|
|
37020
37021
|
value: hit_0.id,
|
|
37021
37022
|
hit: hit_0
|
|
37022
37023
|
};
|
|
37023
37024
|
}
|
|
37024
|
-
function _temp2$
|
|
37025
|
+
function _temp2$Y(prevState, nextState) {
|
|
37025
37026
|
return {
|
|
37026
37027
|
...prevState,
|
|
37027
37028
|
...nextState
|
|
37028
37029
|
};
|
|
37029
37030
|
}
|
|
37030
|
-
function _temp$
|
|
37031
|
+
function _temp$2e(item) {
|
|
37031
37032
|
return item.level === "error";
|
|
37032
37033
|
}
|
|
37033
37034
|
function getReferenceClient(client, schemaType) {
|
|
@@ -37519,7 +37520,7 @@ const TRANSFORMATIONS = {
|
|
|
37519
37520
|
const controller = new AbortController(), signal = controller.signal;
|
|
37520
37521
|
return fetch(props2.icon.url, {
|
|
37521
37522
|
signal
|
|
37522
|
-
}).then(_temp$
|
|
37523
|
+
}).then(_temp$2d).then((data) => setHtml(data)).catch(_temp2$X), () => {
|
|
37523
37524
|
controller.abort();
|
|
37524
37525
|
};
|
|
37525
37526
|
}, t1 = [props2.icon.url], $[0] = props2.icon.url, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
|
|
@@ -37673,12 +37674,12 @@ function UpsellDescriptionSerializer(props2) {
|
|
|
37673
37674
|
let t2;
|
|
37674
37675
|
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;
|
|
37675
37676
|
}
|
|
37676
|
-
function _temp$
|
|
37677
|
+
function _temp$2d(response) {
|
|
37677
37678
|
if (!response.ok)
|
|
37678
37679
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
37679
37680
|
return response.text();
|
|
37680
37681
|
}
|
|
37681
|
-
function _temp2$
|
|
37682
|
+
function _temp2$X(error) {
|
|
37682
37683
|
error.name !== "AbortError" && console.error(error);
|
|
37683
37684
|
}
|
|
37684
37685
|
const StyledButton$3 = /* @__PURE__ */ styled(Button$1).withConfig({
|
|
@@ -37963,7 +37964,7 @@ function useAssetSourceUploader(options) {
|
|
|
37963
37964
|
break bb49;
|
|
37964
37965
|
}
|
|
37965
37966
|
case "error": {
|
|
37966
|
-
event.files.forEach(_temp$
|
|
37967
|
+
event.files.forEach(_temp$2c), push({
|
|
37967
37968
|
status: "error",
|
|
37968
37969
|
description: t("asset-sources.common.uploader.upload-failed.description"),
|
|
37969
37970
|
title: t("asset-sources.common.uploader.upload-failed.title")
|
|
@@ -37971,7 +37972,7 @@ function useAssetSourceUploader(options) {
|
|
|
37971
37972
|
break bb49;
|
|
37972
37973
|
}
|
|
37973
37974
|
case "all-complete": {
|
|
37974
|
-
onAssetLimitError && event.files && event.files.some(_temp2$
|
|
37975
|
+
onAssetLimitError && event.files && event.files.some(_temp2$W) && onAssetLimitError(), onChange(PatchEvent.from([unset([UPLOAD_STATUS_KEY])])), onAllComplete?.(), handleAssetSourceResetOnComplete();
|
|
37975
37976
|
break bb49;
|
|
37976
37977
|
}
|
|
37977
37978
|
default:
|
|
@@ -37998,10 +37999,10 @@ function useAssetSourceUploader(options) {
|
|
|
37998
37999
|
handleSelectFilesToUpload
|
|
37999
38000
|
}, $[14] = assetSourceUploader, $[15] = handleSelectFilesToUpload, $[16] = t3) : t3 = $[16], t3;
|
|
38000
38001
|
}
|
|
38001
|
-
function _temp2$
|
|
38002
|
+
function _temp2$W(file) {
|
|
38002
38003
|
return file.status === "error" && isAssetLimitError(file.error);
|
|
38003
38004
|
}
|
|
38004
|
-
function _temp$
|
|
38005
|
+
function _temp$2c(file_0) {
|
|
38005
38006
|
return console.error(file_0.error);
|
|
38006
38007
|
}
|
|
38007
38008
|
function useUploadExternalFileToDataset(options) {
|
|
@@ -39650,7 +39651,7 @@ function FilePreview$1(props2) {
|
|
|
39650
39651
|
onOpenSourceForUpload: handleOpenSourceForUpload,
|
|
39651
39652
|
onOpenSourceForUploadSingle: handleOpenSourceForUploadSingle,
|
|
39652
39653
|
onSelectFilesSingle: handleSelectFilesFromAssetSourceSingle,
|
|
39653
|
-
getSingleButtonTestId: _temp$
|
|
39654
|
+
getSingleButtonTestId: _temp$2b,
|
|
39654
39655
|
dropdownMenuTestId: "file-input-upload-drop-down-menu-button",
|
|
39655
39656
|
onCloseParentMenu: t8,
|
|
39656
39657
|
onFilePickerCancel: t9
|
|
@@ -39665,7 +39666,7 @@ function FilePreview$1(props2) {
|
|
|
39665
39666
|
let t13;
|
|
39666
39667
|
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;
|
|
39667
39668
|
}
|
|
39668
|
-
function _temp$
|
|
39669
|
+
function _temp$2b(sourceName2) {
|
|
39669
39670
|
return `file-input-upload-button-${sourceName2}`;
|
|
39670
39671
|
}
|
|
39671
39672
|
function FilePreviewContent(t0) {
|
|
@@ -40214,7 +40215,7 @@ function ImageInputAssetMenuWithReferenceAssetComponent(props2) {
|
|
|
40214
40215
|
onOpenSourceForUpload: handleOpenSourceForUpload,
|
|
40215
40216
|
onOpenSourceForUploadSingle: handleOpenSourceForUploadSingle,
|
|
40216
40217
|
onSelectFilesSingle: handleSelectFilesFromAssetSourceSingle,
|
|
40217
|
-
getSingleButtonTestId: _temp$
|
|
40218
|
+
getSingleButtonTestId: _temp$2a,
|
|
40218
40219
|
onCloseParentMenu: t8,
|
|
40219
40220
|
onFilePickerCancel: t9
|
|
40220
40221
|
}, $[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];
|
|
@@ -40244,7 +40245,7 @@ function ImageInputAssetMenuWithReferenceAssetComponent(props2) {
|
|
|
40244
40245
|
let t16;
|
|
40245
40246
|
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;
|
|
40246
40247
|
}
|
|
40247
|
-
function _temp$
|
|
40248
|
+
function _temp$2a() {
|
|
40248
40249
|
return "file-input-upload-button";
|
|
40249
40250
|
}
|
|
40250
40251
|
const ImageInputAssetMenuWithReferenceAsset = memo(ImageInputAssetMenuWithReferenceAssetComponent), RatioBox$1 = styled(Box).withConfig({
|
|
@@ -41370,7 +41371,7 @@ function ToolSVGComponent(props2) {
|
|
|
41370
41371
|
const svgElement = svgRef.current;
|
|
41371
41372
|
if (!svgElement)
|
|
41372
41373
|
return;
|
|
41373
|
-
const handleTouchMove = _temp$
|
|
41374
|
+
const handleTouchMove = _temp$29;
|
|
41374
41375
|
return svgElement.addEventListener("touchmove", handleTouchMove, {
|
|
41375
41376
|
passive: !1
|
|
41376
41377
|
}), () => {
|
|
@@ -41642,7 +41643,7 @@ function ToolSVGComponent(props2) {
|
|
|
41642
41643
|
t90
|
|
41643
41644
|
] }) }), $[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;
|
|
41644
41645
|
}
|
|
41645
|
-
function _temp$
|
|
41646
|
+
function _temp$29(e) {
|
|
41646
41647
|
e.preventDefault();
|
|
41647
41648
|
}
|
|
41648
41649
|
const ToolSVG = memo(ToolSVGComponent);
|
|
@@ -41793,7 +41794,7 @@ function ImageToolInput(props2) {
|
|
|
41793
41794
|
$[8] !== onChange || $[9] !== readOnly || $[10] !== schemaType.fields ? (t7 = (finalValue) => {
|
|
41794
41795
|
if (readOnly)
|
|
41795
41796
|
return;
|
|
41796
|
-
const cropField = schemaType.fields.find(_temp$
|
|
41797
|
+
const cropField = schemaType.fields.find(_temp$28), hotspotField = schemaType.fields.find(_temp2$V), crop = cropField ? {
|
|
41797
41798
|
_type: cropField.type.name,
|
|
41798
41799
|
...finalValue.crop || DEFAULT_CROP
|
|
41799
41800
|
} : finalValue.crop, hotspot = hotspotField ? {
|
|
@@ -41817,7 +41818,7 @@ function ImageToolInput(props2) {
|
|
|
41817
41818
|
$[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: [
|
|
41818
41819
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: t("inputs.imagetool.vector-warning.title") }),
|
|
41819
41820
|
/* @__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: {
|
|
41820
|
-
ImageUrlDocumentationLink: _temp3$
|
|
41821
|
+
ImageUrlDocumentationLink: _temp3$r,
|
|
41821
41822
|
ImageUrlPackageDocumentationLink: _temp4$c
|
|
41822
41823
|
} }) }) })
|
|
41823
41824
|
] }) }) }) : null, $[18] = isSvg, $[19] = t, $[20] = t12) : t12 = $[20];
|
|
@@ -41867,16 +41868,16 @@ function _temp4$c(t0) {
|
|
|
41867
41868
|
} = t0;
|
|
41868
41869
|
return /* @__PURE__ */ jsx("a", { href: "https://www.sanity.io/docs/image-urls#fm-048ba39d9e88", children: /* @__PURE__ */ jsx("code", { children: children_0 }) });
|
|
41869
41870
|
}
|
|
41870
|
-
function _temp3$
|
|
41871
|
+
function _temp3$r(t0) {
|
|
41871
41872
|
const {
|
|
41872
41873
|
children
|
|
41873
41874
|
} = t0;
|
|
41874
41875
|
return /* @__PURE__ */ jsx("a", { href: "https://www.sanity.io/docs/image-urls#fm-048ba39d9e88", children });
|
|
41875
41876
|
}
|
|
41876
|
-
function _temp2$
|
|
41877
|
+
function _temp2$V(field_0) {
|
|
41877
41878
|
return field_0.type.name !== "object" && field_0.name === "hotspot";
|
|
41878
41879
|
}
|
|
41879
|
-
function _temp$
|
|
41880
|
+
function _temp$28(field) {
|
|
41880
41881
|
return field.name === "crop" && field.type.name !== "object";
|
|
41881
41882
|
}
|
|
41882
41883
|
function ImageInputHotspotInput(props2) {
|
|
@@ -42044,7 +42045,7 @@ function useImageObjectUrl(url) {
|
|
|
42044
42045
|
let t2, t3;
|
|
42045
42046
|
return $[5] !== cacheKey2 || $[6] !== token || $[7] !== url ? (t2 = () => {
|
|
42046
42047
|
if (!cacheKey2) {
|
|
42047
|
-
setState(_temp$
|
|
42048
|
+
setState(_temp$27);
|
|
42048
42049
|
return;
|
|
42049
42050
|
}
|
|
42050
42051
|
let entry_0 = requestCache.get(cacheKey2);
|
|
@@ -42057,7 +42058,7 @@ function useImageObjectUrl(url) {
|
|
|
42057
42058
|
};
|
|
42058
42059
|
}, t3 = [cacheKey2, token, url], $[5] = cacheKey2, $[6] = token, $[7] = url, $[8] = t2, $[9] = t3) : (t2 = $[8], t3 = $[9]), useEffect(t2, t3), state;
|
|
42059
42060
|
}
|
|
42060
|
-
function _temp$
|
|
42061
|
+
function _temp$27(prev) {
|
|
42061
42062
|
return prev.objectUrl || prev.isLoading || prev.error ? IDLE_RESULT : prev;
|
|
42062
42063
|
}
|
|
42063
42064
|
function useImageUrl(params) {
|
|
@@ -42320,7 +42321,7 @@ function BaseImageInputComponent(props2) {
|
|
|
42320
42321
|
const handleClearField = t9;
|
|
42321
42322
|
let t10;
|
|
42322
42323
|
$[30] !== onChange || $[31] !== value || $[32] !== valueIsArrayElement ? (t10 = () => {
|
|
42323
|
-
const allKeys = Object.keys(value || {}), isEmpty2 = allKeys.filter(_temp$
|
|
42324
|
+
const allKeys = Object.keys(value || {}), isEmpty2 = allKeys.filter(_temp$26).length === 0, removeKeys = ["asset", "media"].concat(allKeys.filter(_temp2$U)).map(_temp3$q);
|
|
42324
42325
|
onChange(isEmpty2 && !valueIsArrayElement() ? unset() : removeKeys);
|
|
42325
42326
|
}, $[30] = onChange, $[31] = value, $[32] = valueIsArrayElement, $[33] = t10) : t10 = $[33];
|
|
42326
42327
|
const handleRemoveButtonClick = t10;
|
|
@@ -42413,13 +42414,13 @@ function BaseImageInputComponent(props2) {
|
|
|
42413
42414
|
function _temp4$b(member) {
|
|
42414
42415
|
return member.kind === "field" && member.name === "hotspot";
|
|
42415
42416
|
}
|
|
42416
|
-
function _temp3$
|
|
42417
|
+
function _temp3$q(key_1) {
|
|
42417
42418
|
return unset([key_1]);
|
|
42418
42419
|
}
|
|
42419
|
-
function _temp2$
|
|
42420
|
+
function _temp2$U(key_0) {
|
|
42420
42421
|
return ["crop", "hotspot", "_upload"].includes(key_0);
|
|
42421
42422
|
}
|
|
42422
|
-
function _temp$
|
|
42423
|
+
function _temp$26(key) {
|
|
42423
42424
|
return !["_type", "_key", "_upload", "asset", "crop", "hotspot", "media"].includes(key);
|
|
42424
42425
|
}
|
|
42425
42426
|
const BaseImageInput = memo(BaseImageInputComponent);
|
|
@@ -42713,11 +42714,11 @@ function TagsArrayInput(props2) {
|
|
|
42713
42714
|
$[0] !== t0 ? (t1 = t0 === void 0 ? [] : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
42714
42715
|
const value = t1;
|
|
42715
42716
|
let t2;
|
|
42716
|
-
$[2] !== value ? (t2 = value?.map(_temp$
|
|
42717
|
+
$[2] !== value ? (t2 = value?.map(_temp$25), $[2] = value, $[3] = t2) : t2 = $[3];
|
|
42717
42718
|
const tagInputValue = t2;
|
|
42718
42719
|
let t3;
|
|
42719
42720
|
$[4] !== onChange ? (t3 = (nextValue) => {
|
|
42720
|
-
onChange(nextValue.length === 0 ? unset() : set(nextValue.map(_temp2$
|
|
42721
|
+
onChange(nextValue.length === 0 ? unset() : set(nextValue.map(_temp2$T)));
|
|
42721
42722
|
}, $[4] = onChange, $[5] = t3) : t3 = $[5];
|
|
42722
42723
|
const handleChange = t3;
|
|
42723
42724
|
let t4;
|
|
@@ -42725,10 +42726,10 @@ function TagsArrayInput(props2) {
|
|
|
42725
42726
|
let t5;
|
|
42726
42727
|
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;
|
|
42727
42728
|
}
|
|
42728
|
-
function _temp2$
|
|
42729
|
+
function _temp2$T(v_0) {
|
|
42729
42730
|
return v_0.value;
|
|
42730
42731
|
}
|
|
42731
|
-
function _temp$
|
|
42732
|
+
function _temp$25(v) {
|
|
42732
42733
|
return {
|
|
42733
42734
|
value: v
|
|
42734
42735
|
};
|
|
@@ -42774,7 +42775,7 @@ function SelectInput(props2) {
|
|
|
42774
42775
|
changed,
|
|
42775
42776
|
focused,
|
|
42776
42777
|
elementProps
|
|
42777
|
-
} = props2, tone = validation2?.some(_temp$
|
|
42778
|
+
} = props2, tone = validation2?.some(_temp$24) ? "critical" : void 0;
|
|
42778
42779
|
let t0;
|
|
42779
42780
|
$[0] !== schemaType.options?.list ? (t0 = schemaType.options?.list || [], $[0] = schemaType.options?.list, $[1] = t0) : t0 = $[1];
|
|
42780
42781
|
let t1;
|
|
@@ -42806,14 +42807,14 @@ function SelectInput(props2) {
|
|
|
42806
42807
|
}
|
|
42807
42808
|
handleChange(nextItem_0);
|
|
42808
42809
|
}, $[12] = handleChange, $[13] = itemFromOptionValue, $[14] = t6) : t6 = $[14];
|
|
42809
|
-
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$
|
|
42810
|
+
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$S) }) }), t7 = !!focused;
|
|
42810
42811
|
let t8;
|
|
42811
42812
|
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;
|
|
42812
42813
|
}
|
|
42813
|
-
function _temp2$
|
|
42814
|
+
function _temp2$S(item_1, i) {
|
|
42814
42815
|
return /* @__PURE__ */ jsx("option", { value: i - 1, children: item_1.title }, `${i - 1}`);
|
|
42815
42816
|
}
|
|
42816
|
-
function _temp$
|
|
42817
|
+
function _temp$24(v) {
|
|
42817
42818
|
return v.level === "error";
|
|
42818
42819
|
}
|
|
42819
42820
|
const RadioSelect = forwardRef(function(props2, ref) {
|
|
@@ -42978,7 +42979,7 @@ function PreviewItem(props2) {
|
|
|
42978
42979
|
const presence = t7, childValidation = useChildValidation(path, !0);
|
|
42979
42980
|
let t8;
|
|
42980
42981
|
$[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];
|
|
42981
|
-
const validation2 = t8, hasErrors = childValidation.some(_temp$
|
|
42982
|
+
const validation2 = t8, hasErrors = childValidation.some(_temp$23), hasWarnings = childValidation.some(_temp2$R), [contextMenuButtonElement, setContextMenuButtonElement] = useState(null), t9 = parentSchemaType.options?.insertMenu;
|
|
42982
42983
|
let t10;
|
|
42983
42984
|
$[16] !== contextMenuButtonElement || $[17] !== handleInsert || $[18] !== insertableTypes || $[19] !== maxReached || $[20] !== maxReachedReason || $[21] !== t9 ? (t10 = {
|
|
42984
42985
|
schemaTypes: insertableTypes,
|
|
@@ -43021,7 +43022,7 @@ function PreviewItem(props2) {
|
|
|
43021
43022
|
readOnly,
|
|
43022
43023
|
hasErrors,
|
|
43023
43024
|
hasWarnings
|
|
43024
|
-
}), handleMouseDown = _temp3$
|
|
43025
|
+
}), handleMouseDown = _temp3$p;
|
|
43025
43026
|
let t18;
|
|
43026
43027
|
$[53] !== onOpen ? (t18 = (event_0) => {
|
|
43027
43028
|
event_0.stopPropagation(), onOpen();
|
|
@@ -43068,13 +43069,13 @@ function PreviewItem(props2) {
|
|
|
43068
43069
|
t24 = $[93];
|
|
43069
43070
|
return t24;
|
|
43070
43071
|
}
|
|
43071
|
-
function _temp3$
|
|
43072
|
+
function _temp3$p(event) {
|
|
43072
43073
|
event.preventDefault();
|
|
43073
43074
|
}
|
|
43074
|
-
function _temp2$
|
|
43075
|
+
function _temp2$R(v_0) {
|
|
43075
43076
|
return v_0.level === "warning";
|
|
43076
43077
|
}
|
|
43077
|
-
function _temp$
|
|
43078
|
+
function _temp$23(v) {
|
|
43078
43079
|
return v.level === "error";
|
|
43079
43080
|
}
|
|
43080
43081
|
function ReferenceItemRefProvider(props2) {
|
|
@@ -43146,7 +43147,7 @@ function ReferenceItem(props2) {
|
|
|
43146
43147
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (hadFocus, hasFocus) => {
|
|
43147
43148
|
!hadFocus && hasFocus && elementRef.current && elementRef.current?.focus();
|
|
43148
43149
|
}, $[4] = t2) : t2 = $[4], useDidUpdate(focused, t2);
|
|
43149
|
-
const hasErrors = props2.validation.some(_temp$
|
|
43150
|
+
const hasErrors = props2.validation.some(_temp$22), hasWarnings = props2.validation.some(_temp2$Q), resolvingInitialValue = value._resolvingInitialValue;
|
|
43150
43151
|
let t3;
|
|
43151
43152
|
$[5] !== onInsert || $[6] !== value ? (t3 = () => {
|
|
43152
43153
|
onInsert({
|
|
@@ -43281,10 +43282,10 @@ function ReferenceItem(props2) {
|
|
|
43281
43282
|
let t29;
|
|
43282
43283
|
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;
|
|
43283
43284
|
}
|
|
43284
|
-
function _temp2$
|
|
43285
|
+
function _temp2$Q(v_0) {
|
|
43285
43286
|
return v_0.level === "warning";
|
|
43286
43287
|
}
|
|
43287
|
-
function _temp$
|
|
43288
|
+
function _temp$22(v) {
|
|
43288
43289
|
return v.level === "error";
|
|
43289
43290
|
}
|
|
43290
43291
|
function defaultResolveItemComponent(schemaType) {
|
|
@@ -44255,7 +44256,7 @@ function DialogStackProvider(t0) {
|
|
|
44255
44256
|
return isKeySegment(segment) && isKeySegment(currentSegment) ? segment._key === currentSegment._key : segment === currentSegment;
|
|
44256
44257
|
}))
|
|
44257
44258
|
return !1;
|
|
44258
|
-
if (fullscreenPath.some(_temp$
|
|
44259
|
+
if (fullscreenPath.some(_temp$21))
|
|
44259
44260
|
return !0;
|
|
44260
44261
|
const nextSegment = currentPath[fullscreenPath.length];
|
|
44261
44262
|
return !isKeySegment(nextSegment);
|
|
@@ -44270,7 +44271,7 @@ function DialogStackProvider(t0) {
|
|
|
44270
44271
|
$[8] !== closeAll || $[9] !== findAncestorFullscreenPath || $[10] !== onPathOpen ? (t7 = (currentPath_0) => {
|
|
44271
44272
|
const ancestorPaths = findAncestorFullscreenPath(currentPath_0);
|
|
44272
44273
|
if (ancestorPaths && ancestorPaths.length > 0) {
|
|
44273
|
-
const closestParentPath = ancestorPaths.reduce(_temp2$
|
|
44274
|
+
const closestParentPath = ancestorPaths.reduce(_temp2$P), newPath = stringToPath(closestParentPath);
|
|
44274
44275
|
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) => {
|
|
44275
44276
|
const newSegment = newPath[index_0];
|
|
44276
44277
|
return isKeySegment(segment_1) && isKeySegment(newSegment) ? segment_1._key === newSegment._key : segment_1 === newSegment;
|
|
@@ -44285,7 +44286,7 @@ function DialogStackProvider(t0) {
|
|
|
44285
44286
|
if (options?.toParent && stack.length >= 2) {
|
|
44286
44287
|
const parentEntry = stack[stack.length - 2];
|
|
44287
44288
|
if (parentEntry?.path) {
|
|
44288
|
-
onPathOpen(parentEntry.path), setStack(_temp3$
|
|
44289
|
+
onPathOpen(parentEntry.path), setStack(_temp3$o);
|
|
44289
44290
|
return;
|
|
44290
44291
|
}
|
|
44291
44292
|
}
|
|
@@ -44317,13 +44318,13 @@ function DialogStackProvider(t0) {
|
|
|
44317
44318
|
let t11;
|
|
44318
44319
|
return $[25] !== children || $[26] !== value ? (t11 = /* @__PURE__ */ jsx(DialogStackContext.Provider, { value, children }), $[25] = children, $[26] = value, $[27] = t11) : t11 = $[27], t11;
|
|
44319
44320
|
}
|
|
44320
|
-
function _temp3$
|
|
44321
|
+
function _temp3$o(prev_3) {
|
|
44321
44322
|
return prev_3.slice(0, -1);
|
|
44322
44323
|
}
|
|
44323
|
-
function _temp2$
|
|
44324
|
+
function _temp2$P(longest, current) {
|
|
44324
44325
|
return current.length > longest.length ? current : longest;
|
|
44325
44326
|
}
|
|
44326
|
-
function _temp$
|
|
44327
|
+
function _temp$21(segment_0) {
|
|
44327
44328
|
return isKeySegment(segment_0);
|
|
44328
44329
|
}
|
|
44329
44330
|
function FormBuilderInputErrorBoundary(props2) {
|
|
@@ -44467,14 +44468,14 @@ function useVisibility(props2) {
|
|
|
44467
44468
|
if (!element || disabled)
|
|
44468
44469
|
return;
|
|
44469
44470
|
element && "checkVisibility" in element && setVisible(element.checkVisibility());
|
|
44470
|
-
const isDocumentVisible$ = concat(of(!document.hidden), visibilityChange$.pipe(map(_temp$
|
|
44471
|
+
const isDocumentVisible$ = concat(of(!document.hidden), visibilityChange$.pipe(map(_temp$20))).pipe(distinctUntilChanged()), inViewport$ = intersectionObservableFor(element).pipe(map(_temp2$O)), sub2 = isDocumentVisible$.pipe(switchMap((isDocumentVisible) => isDocumentVisible ? inViewport$ : of(!1)), switchMap((isVisible2) => isVisible2 ? of(!0) : of(!1).pipe(delay(hideDelay))), distinctUntilChanged()).subscribe(setVisible);
|
|
44471
44472
|
return () => sub2.unsubscribe();
|
|
44472
44473
|
}, t2 = [element, hideDelay, disabled], $[0] = disabled, $[1] = element, $[2] = hideDelay, $[3] = t1, $[4] = t2) : (t1 = $[3], t2 = $[4]), useLayoutEffect(t1, t2), disabled ? !1 : visible;
|
|
44473
44474
|
}
|
|
44474
|
-
function _temp2$
|
|
44475
|
+
function _temp2$O(event_0) {
|
|
44475
44476
|
return event_0.isIntersecting;
|
|
44476
44477
|
}
|
|
44477
|
-
function _temp$
|
|
44478
|
+
function _temp$20(event) {
|
|
44478
44479
|
return event.target instanceof Document ? !event?.target?.hidden : !1;
|
|
44479
44480
|
}
|
|
44480
44481
|
const _HIDE_DELAY = 2e3;
|
|
@@ -44633,7 +44634,7 @@ function FormBuilderProvider(props2) {
|
|
|
44633
44634
|
assetSources: file.assetSources,
|
|
44634
44635
|
directUploads: t7
|
|
44635
44636
|
}, $[5] = file.assetSources, $[6] = t7, $[7] = t8) : t8 = $[7];
|
|
44636
|
-
const t9 = filterField || _temp$
|
|
44637
|
+
const t9 = filterField || _temp$1$, t10 = image?.directUploads ?? !0;
|
|
44637
44638
|
let t11;
|
|
44638
44639
|
$[8] !== image.assetSources || $[9] !== t10 ? (t11 = {
|
|
44639
44640
|
assetSources: image.assetSources,
|
|
@@ -44686,7 +44687,7 @@ function FormBuilderProvider(props2) {
|
|
|
44686
44687
|
let t19;
|
|
44687
44688
|
return $[59] !== formBuilder || $[60] !== t18 ? (t19 = /* @__PURE__ */ jsx(FormBuilderContext.Provider, { value: formBuilder, children: t18 }), $[59] = formBuilder, $[60] = t18, $[61] = t19) : t19 = $[61], t19;
|
|
44688
44689
|
}
|
|
44689
|
-
function _temp$
|
|
44690
|
+
function _temp$1$() {
|
|
44690
44691
|
return !0;
|
|
44691
44692
|
}
|
|
44692
44693
|
function FormProvider(props2) {
|
|
@@ -44850,7 +44851,7 @@ function FormBuilder(props2) {
|
|
|
44850
44851
|
}, $[44] = handleBlur, $[45] = handleFocus, $[46] = id2, $[47] = t20, $[48] = t21) : t21 = $[48];
|
|
44851
44852
|
const t22 = diffProps.__unstable_computeDiff;
|
|
44852
44853
|
let t23;
|
|
44853
|
-
$[49] !== members ? (t23 = members.some(_temp$
|
|
44854
|
+
$[49] !== members ? (t23 = members.some(_temp$1_), $[49] = members, $[50] = t23) : t23 = $[50];
|
|
44854
44855
|
let t24;
|
|
44855
44856
|
$[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 = {
|
|
44856
44857
|
focusPath,
|
|
@@ -44900,7 +44901,7 @@ function FormBuilder(props2) {
|
|
|
44900
44901
|
let t29;
|
|
44901
44902
|
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;
|
|
44902
44903
|
}
|
|
44903
|
-
function _temp$
|
|
44904
|
+
function _temp$1_(m) {
|
|
44904
44905
|
return m.kind === "field" && m.field.changed;
|
|
44905
44906
|
}
|
|
44906
44907
|
function RootInput(props2) {
|
|
@@ -45312,7 +45313,7 @@ const DefaultBlockObjectComponent = (props2) => {
|
|
|
45312
45313
|
validation: validation2
|
|
45313
45314
|
} = props2, {
|
|
45314
45315
|
t
|
|
45315
|
-
} = useTranslation(), isImagePreview = isImage(value), hasError = validation2.filter(_temp$
|
|
45316
|
+
} = useTranslation(), isImagePreview = isImage(value), hasError = validation2.filter(_temp$1Z).length > 0, hasWarning = validation2.filter(_temp2$N).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;
|
|
45316
45317
|
let t0;
|
|
45317
45318
|
$[0] !== onOpen ? (t0 = (e) => {
|
|
45318
45319
|
e.preventDefault(), e.stopPropagation(), onOpen();
|
|
@@ -45343,10 +45344,10 @@ const DefaultBlockObjectComponent = (props2) => {
|
|
|
45343
45344
|
t14
|
|
45344
45345
|
] }), $[39] = t13, $[40] = t14, $[41] = t15) : t15 = $[41], t15;
|
|
45345
45346
|
};
|
|
45346
|
-
function _temp$
|
|
45347
|
+
function _temp$1Z(v) {
|
|
45347
45348
|
return v.level === "error";
|
|
45348
45349
|
}
|
|
45349
|
-
function _temp2$
|
|
45350
|
+
function _temp2$N(v_0) {
|
|
45350
45351
|
return v_0.level === "warning";
|
|
45351
45352
|
}
|
|
45352
45353
|
function defaultResolveBlockComponent(schemaType) {
|
|
@@ -46562,9 +46563,9 @@ const INITIAL_STATE$7 = {
|
|
|
46562
46563
|
function useUnstableObserveDocument(documentId, apiConfig) {
|
|
46563
46564
|
const $ = c(4), documentPreviewStore = useDocumentPreviewStore();
|
|
46564
46565
|
let t0;
|
|
46565
|
-
return $[0] !== apiConfig || $[1] !== documentId || $[2] !== documentPreviewStore ? (t0 = documentPreviewStore.unstable_observeDocument(documentId, apiConfig).pipe(map(_temp$
|
|
46566
|
+
return $[0] !== apiConfig || $[1] !== documentId || $[2] !== documentPreviewStore ? (t0 = documentPreviewStore.unstable_observeDocument(documentId, apiConfig).pipe(map(_temp$1Y)), $[0] = apiConfig, $[1] = documentId, $[2] = documentPreviewStore, $[3] = t0) : t0 = $[3], useObservable(t0, INITIAL_STATE$7);
|
|
46566
46567
|
}
|
|
46567
|
-
function _temp$
|
|
46568
|
+
function _temp$1Y(document2) {
|
|
46568
46569
|
return {
|
|
46569
46570
|
loading: !1,
|
|
46570
46571
|
document: document2
|
|
@@ -46611,14 +46612,14 @@ function getPreviewValueWithFallback({
|
|
|
46611
46612
|
function useReleasesIds(releases2) {
|
|
46612
46613
|
const $ = c(4);
|
|
46613
46614
|
let t0;
|
|
46614
|
-
$[0] !== releases2 ? (t0 = releases2.map(_temp$
|
|
46615
|
+
$[0] !== releases2 ? (t0 = releases2.map(_temp$1X), $[0] = releases2, $[1] = t0) : t0 = $[1];
|
|
46615
46616
|
const releasesIds = t0;
|
|
46616
46617
|
let t1;
|
|
46617
46618
|
return $[2] !== releasesIds ? (t1 = {
|
|
46618
46619
|
releasesIds
|
|
46619
46620
|
}, $[2] = releasesIds, $[3] = t1) : t1 = $[3], t1;
|
|
46620
46621
|
}
|
|
46621
|
-
function _temp$
|
|
46622
|
+
function _temp$1X(release) {
|
|
46622
46623
|
return getReleaseIdFromReleaseDocumentId(release._id);
|
|
46623
46624
|
}
|
|
46624
46625
|
function exists(value) {
|
|
@@ -46638,15 +46639,15 @@ function useDocumentVersionInfo(documentId) {
|
|
|
46638
46639
|
if ($[7] !== documentPreviewStore || $[8] !== draftId || $[9] !== publishedId || $[10] !== releaseIds) {
|
|
46639
46640
|
const releaseVersions = releaseIds.length > 0 ? combineLatest(Object.fromEntries(releaseIds.map((releaseId) => [releaseId, documentPreviewStore.observePaths({
|
|
46640
46641
|
_id: getVersionId(publishedId, releaseId)
|
|
46641
|
-
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp$
|
|
46642
|
+
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp$1W))]))) : of(NO_VERSIONS);
|
|
46642
46643
|
t3 = combineLatest({
|
|
46643
46644
|
isLoading: of(!1),
|
|
46644
46645
|
draft: documentPreviewStore.observePaths({
|
|
46645
46646
|
_id: draftId
|
|
46646
|
-
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp2$
|
|
46647
|
+
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp2$M)),
|
|
46647
46648
|
published: documentPreviewStore.observePaths({
|
|
46648
46649
|
_id: publishedId
|
|
46649
|
-
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp3$
|
|
46650
|
+
}, DOCUMENT_STUB_PATHS$1).pipe(map(_temp3$n)),
|
|
46650
46651
|
versions: releaseVersions
|
|
46651
46652
|
}), $[7] = documentPreviewStore, $[8] = draftId, $[9] = publishedId, $[10] = releaseIds, $[11] = t3;
|
|
46652
46653
|
} else
|
|
@@ -46660,13 +46661,13 @@ function useDocumentVersionInfo(documentId) {
|
|
|
46660
46661
|
published: void 0
|
|
46661
46662
|
}, $[12] = t4) : t4 = $[12], useObservable(observable, t4);
|
|
46662
46663
|
}
|
|
46663
|
-
function _temp3$
|
|
46664
|
+
function _temp3$n(value_1) {
|
|
46664
46665
|
return exists(value_1) ? value_1 : void 0;
|
|
46665
46666
|
}
|
|
46666
|
-
function _temp2$
|
|
46667
|
+
function _temp2$M(value_0) {
|
|
46667
46668
|
return exists(value_0) ? value_0 : void 0;
|
|
46668
46669
|
}
|
|
46669
|
-
function _temp$
|
|
46670
|
+
function _temp$1W(value) {
|
|
46670
46671
|
return exists(value) ? value : void 0;
|
|
46671
46672
|
}
|
|
46672
46673
|
function useCopyToDrafts(options) {
|
|
@@ -46866,7 +46867,7 @@ const orderedReleaseTypes$1 = ["asap", "scheduled", "undecided"], useDocumentVer
|
|
|
46866
46867
|
_id
|
|
46867
46868
|
} = t4;
|
|
46868
46869
|
return documentVersions.some((id2) => getVersionFromId(id2) === getReleaseIdFromReleaseDocumentId(_id));
|
|
46869
|
-
}, $[5] = documentVersions, $[6] = t32) : t32 = $[6], t2 = releases2.filter(t32).sort(_temp$
|
|
46870
|
+
}, $[5] = documentVersions, $[6] = t32) : t32 = $[6], t2 = releases2.filter(t32).sort(_temp$1V), $[2] = documentVersions, $[3] = releases2, $[4] = t2;
|
|
46870
46871
|
} else
|
|
46871
46872
|
t2 = $[4];
|
|
46872
46873
|
const sortedDocumentList = t2;
|
|
@@ -46875,7 +46876,7 @@ const orderedReleaseTypes$1 = ["asap", "scheduled", "undecided"], useDocumentVer
|
|
|
46875
46876
|
sortedDocumentList
|
|
46876
46877
|
}, $[7] = sortedDocumentList, $[8] = t3) : t3 = $[8], t3;
|
|
46877
46878
|
};
|
|
46878
|
-
function _temp$
|
|
46879
|
+
function _temp$1V(releasesList, compareReleasesList) {
|
|
46879
46880
|
if (releasesList.metadata.releaseType === "scheduled" && compareReleasesList.metadata.releaseType === "scheduled") {
|
|
46880
46881
|
const aPublishAt = releasesList.publishAt || releasesList.metadata.intendedPublishAt;
|
|
46881
46882
|
if (!aPublishAt)
|
|
@@ -46917,9 +46918,9 @@ const useIsReleaseActive = () => {
|
|
|
46917
46918
|
data: documentVersions
|
|
46918
46919
|
} = useDocumentVersions(t1);
|
|
46919
46920
|
let t2;
|
|
46920
|
-
return $[2] !== documentVersions ? (t2 = documentVersions && documentVersions.length > 0 && !documentVersions.some(_temp$
|
|
46921
|
+
return $[2] !== documentVersions ? (t2 = documentVersions && documentVersions.length > 0 && !documentVersions.some(_temp$1U), $[2] = documentVersions, $[3] = t2) : t2 = $[3], t2;
|
|
46921
46922
|
};
|
|
46922
|
-
function _temp$
|
|
46923
|
+
function _temp$1U(version2) {
|
|
46923
46924
|
return !isVersionId(version2);
|
|
46924
46925
|
}
|
|
46925
46926
|
function useGetDefaultPerspective() {
|
|
@@ -47119,7 +47120,7 @@ const releasesLocaleNamespace = "releases", releasesUsEnglishLocaleBundle = {
|
|
|
47119
47120
|
resources: () => import("./resources3.js")
|
|
47120
47121
|
};
|
|
47121
47122
|
function DiscardVersionDialog(props2) {
|
|
47122
|
-
const $ = c(
|
|
47123
|
+
const $ = c(58), {
|
|
47123
47124
|
onClose,
|
|
47124
47125
|
documentId,
|
|
47125
47126
|
documentType,
|
|
@@ -47196,31 +47197,31 @@ function DiscardVersionDialog(props2) {
|
|
|
47196
47197
|
confirmButton: t12
|
|
47197
47198
|
}, $[34] = t12, $[35] = t9, $[36] = t13) : t13 = $[36];
|
|
47198
47199
|
let t14;
|
|
47199
|
-
$[37] !== currentRelease || $[38] !==
|
|
47200
|
+
$[37] !== currentRelease || $[38] !== discardType || $[39] !== documentId || $[40] !== isGoingToUnpublish2 || $[41] !== schemaType ? (t14 = schemaType ? /* @__PURE__ */ jsx(Preview$1, { value: {
|
|
47200
47201
|
_id: isGoingToUnpublish2 ? getPublishedId(documentId) : documentId
|
|
47201
|
-
}, schemaType, perspectiveStack: isGoingToUnpublish2 ? [] : [currentRelease] }) : /* @__PURE__ */ jsx(LoadingBlock, {}), $[37] = currentRelease, $[38] =
|
|
47202
|
+
}, schemaType, perspectiveStack: isGoingToUnpublish2 ? [] : discardType === "draft" ? ["drafts"] : [currentRelease] }) : /* @__PURE__ */ jsx(LoadingBlock, {}), $[37] = currentRelease, $[38] = discardType, $[39] = documentId, $[40] = isGoingToUnpublish2, $[41] = schemaType, $[42] = t14) : t14 = $[42];
|
|
47202
47203
|
let t15;
|
|
47203
|
-
$[
|
|
47204
|
+
$[43] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t15 = {
|
|
47204
47205
|
maxWidth: "400px"
|
|
47205
|
-
}, $[
|
|
47206
|
+
}, $[43] = t15) : t15 = $[43];
|
|
47206
47207
|
const t16 = `discard-version-dialog.description-${discardType}`;
|
|
47207
47208
|
let t17;
|
|
47208
|
-
$[
|
|
47209
|
+
$[44] !== releaseName ? (t17 = {
|
|
47209
47210
|
releaseTitle: releaseName
|
|
47210
|
-
}, $[
|
|
47211
|
+
}, $[44] = releaseName, $[45] = t17) : t17 = $[45];
|
|
47211
47212
|
let t18;
|
|
47212
|
-
$[
|
|
47213
|
+
$[46] !== t || $[47] !== t16 || $[48] !== t17 ? (t18 = /* @__PURE__ */ jsx(Box, { paddingX: 2, style: t15, children: /* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: t16, values: t17 }) }) }), $[46] = t, $[47] = t16, $[48] = t17, $[49] = t18) : t18 = $[49];
|
|
47213
47214
|
let t19;
|
|
47214
|
-
$[
|
|
47215
|
+
$[50] !== t14 || $[51] !== t18 ? (t19 = /* @__PURE__ */ jsxs(Stack, { space: 3, paddingX: 3, marginBottom: 2, children: [
|
|
47215
47216
|
t14,
|
|
47216
47217
|
t18
|
|
47217
|
-
] }), $[
|
|
47218
|
+
] }), $[50] = t14, $[51] = t18, $[52] = t19) : t19 = $[52];
|
|
47218
47219
|
let t20;
|
|
47219
|
-
return $[
|
|
47220
|
+
return $[53] !== onClose || $[54] !== t13 || $[55] !== t19 || $[56] !== t8 ? (t20 = /* @__PURE__ */ jsx(Dialog$1, { id: "discard-version-dialog", header: t8, onClose, width: 0, padding: !1, footer: t13, children: t19 }), $[53] = onClose, $[54] = t13, $[55] = t19, $[56] = t8, $[57] = t20) : t20 = $[57], t20;
|
|
47220
47221
|
}
|
|
47221
47222
|
const RELEASE_FORM_STORAGE_KEY = "studio.release-form.recovery";
|
|
47222
47223
|
function useReleaseFormStorage() {
|
|
47223
|
-
const $ = c(1), getStoredReleaseData = _temp$
|
|
47224
|
+
const $ = c(1), getStoredReleaseData = _temp$1T, saveReleaseDataToStorage = _temp2$L, clearReleaseDataFromStorage = _temp3$m;
|
|
47224
47225
|
let t0;
|
|
47225
47226
|
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
47226
47227
|
getStoredReleaseData,
|
|
@@ -47228,13 +47229,13 @@ function useReleaseFormStorage() {
|
|
|
47228
47229
|
clearReleaseDataFromStorage
|
|
47229
47230
|
}, $[0] = t0) : t0 = $[0], t0;
|
|
47230
47231
|
}
|
|
47231
|
-
function _temp3$
|
|
47232
|
+
function _temp3$m() {
|
|
47232
47233
|
localStorage.removeItem(RELEASE_FORM_STORAGE_KEY);
|
|
47233
47234
|
}
|
|
47234
|
-
function _temp2$
|
|
47235
|
+
function _temp2$L(data) {
|
|
47235
47236
|
localStorage.setItem(RELEASE_FORM_STORAGE_KEY, JSON.stringify(data));
|
|
47236
47237
|
}
|
|
47237
|
-
function _temp$
|
|
47238
|
+
function _temp$1T() {
|
|
47238
47239
|
const stored = localStorage.getItem(RELEASE_FORM_STORAGE_KEY);
|
|
47239
47240
|
return stored ? JSON.parse(stored) : void 0;
|
|
47240
47241
|
}
|
|
@@ -47493,7 +47494,7 @@ function TitleDescriptionForm(t0) {
|
|
|
47493
47494
|
$[2] !== release ? (t2 = {
|
|
47494
47495
|
externalValue: release,
|
|
47495
47496
|
id: release._id,
|
|
47496
|
-
extractData: _temp$
|
|
47497
|
+
extractData: _temp$1S
|
|
47497
47498
|
}, $[2] = release, $[3] = t2) : t2 = $[3];
|
|
47498
47499
|
const {
|
|
47499
47500
|
localData,
|
|
@@ -47561,7 +47562,7 @@ function TitleDescriptionForm(t0) {
|
|
|
47561
47562
|
t14
|
|
47562
47563
|
] }), $[41] = t13, $[42] = t14, $[43] = t15) : t15 = $[43], t15;
|
|
47563
47564
|
}
|
|
47564
|
-
function _temp$
|
|
47565
|
+
function _temp$1S(t0) {
|
|
47565
47566
|
const {
|
|
47566
47567
|
metadata
|
|
47567
47568
|
} = t0;
|
|
@@ -47834,7 +47835,7 @@ function InsufficientPermissionsMessage(t0) {
|
|
|
47834
47835
|
}, $[0] = t1) : t1 = $[0];
|
|
47835
47836
|
const list = useListFormat(t1), roles = currentUser?.roles || EMPTY_ARRAY$g;
|
|
47836
47837
|
let t2;
|
|
47837
|
-
$[1] !== list || $[2] !== roles ? (t2 = () => /* @__PURE__ */ jsx(Fragment$1, { children: list.formatToParts(roles.map(_temp$
|
|
47838
|
+
$[1] !== list || $[2] !== roles ? (t2 = () => /* @__PURE__ */ jsx(Fragment$1, { children: list.formatToParts(roles.map(_temp$1R)).map(_temp2$K) }), $[1] = list, $[2] = roles, $[3] = t2) : t2 = $[3];
|
|
47838
47839
|
const Roles = t2;
|
|
47839
47840
|
let t3;
|
|
47840
47841
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsx(Text$1, { size: 0, children: /* @__PURE__ */ jsx(AccessDeniedIcon, {}) }), $[4] = t3) : t3 = $[4];
|
|
@@ -47860,10 +47861,10 @@ function InsufficientPermissionsMessage(t0) {
|
|
|
47860
47861
|
t8
|
|
47861
47862
|
] }), $[17] = t5, $[18] = t6, $[19] = t8, $[20] = t9) : t9 = $[20], t9;
|
|
47862
47863
|
}
|
|
47863
|
-
function _temp2$
|
|
47864
|
+
function _temp2$K(i, index) {
|
|
47864
47865
|
return i.type === "element" ? /* @__PURE__ */ jsx("code", { children: i.value }, `${i.value}-${index}`) : /* @__PURE__ */ jsx(Fragment, { children: i.value }, `${i.value}-${index}`);
|
|
47865
47866
|
}
|
|
47866
|
-
function _temp$
|
|
47867
|
+
function _temp$1R(role) {
|
|
47867
47868
|
return role.title || startCase(role.name);
|
|
47868
47869
|
}
|
|
47869
47870
|
const useDiscardVersionAction = (props2) => {
|
|
@@ -47956,7 +47957,7 @@ function useArchivedReleases() {
|
|
|
47956
47957
|
loading
|
|
47957
47958
|
} = useAllReleases();
|
|
47958
47959
|
let t0;
|
|
47959
|
-
$[0] !== releases2 ? (t0 = Array.from(releases2.values()).filter(_temp$
|
|
47960
|
+
$[0] !== releases2 ? (t0 = Array.from(releases2.values()).filter(_temp$1Q), $[0] = releases2, $[1] = t0) : t0 = $[1];
|
|
47960
47961
|
const archivedReleases = t0;
|
|
47961
47962
|
let t1;
|
|
47962
47963
|
return $[2] !== archivedReleases || $[3] !== error || $[4] !== loading ? (t1 = {
|
|
@@ -47965,7 +47966,7 @@ function useArchivedReleases() {
|
|
|
47965
47966
|
loading
|
|
47966
47967
|
}, $[2] = archivedReleases, $[3] = error, $[4] = loading, $[5] = t1) : t1 = $[5], t1;
|
|
47967
47968
|
}
|
|
47968
|
-
function _temp$
|
|
47969
|
+
function _temp$1Q(release) {
|
|
47969
47970
|
return ARCHIVED_RELEASE_STATES.includes(release.state);
|
|
47970
47971
|
}
|
|
47971
47972
|
function UnpublishVersionDialog(props2) {
|
|
@@ -49374,9 +49375,9 @@ const SingleDocReleaseLayout = lazy(() => import("./SingleDocReleaseLayout.js").
|
|
|
49374
49375
|
function useReleasesToolAvailable() {
|
|
49375
49376
|
const $ = c(2), workspace = useWorkspace();
|
|
49376
49377
|
let t0;
|
|
49377
|
-
return $[0] !== workspace.tools ? (t0 = workspace.tools.some(_temp$
|
|
49378
|
+
return $[0] !== workspace.tools ? (t0 = workspace.tools.some(_temp$1P), $[0] = workspace.tools, $[1] = t0) : t0 = $[1], t0;
|
|
49378
49379
|
}
|
|
49379
|
-
function _temp$
|
|
49380
|
+
function _temp$1P(t0) {
|
|
49380
49381
|
const {
|
|
49381
49382
|
name
|
|
49382
49383
|
} = t0;
|
|
@@ -49648,7 +49649,7 @@ function CopyToNewReleaseDialog(props2) {
|
|
|
49648
49649
|
let t7;
|
|
49649
49650
|
$[16] !== clearReleaseDataFromStorage || $[17] !== createRelease || $[18] !== createReleaseMetadata || $[19] !== handleAddVersion || $[20] !== onClose || $[21] !== release || $[22] !== releasePromise || $[23] !== setRerenderDialog || $[24] !== t || $[25] !== telemetry || $[26] !== toast ? (t7 = async () => {
|
|
49650
49651
|
if (getIsScheduledDateInPast(release)) {
|
|
49651
|
-
setRerenderDialog(_temp$
|
|
49652
|
+
setRerenderDialog(_temp$1O);
|
|
49652
49653
|
return;
|
|
49653
49654
|
}
|
|
49654
49655
|
if (setIsSubmitting(!0), !await releasePromise) {
|
|
@@ -49739,7 +49740,7 @@ function CopyToNewReleaseDialog(props2) {
|
|
|
49739
49740
|
t25
|
|
49740
49741
|
] }), $[73] = handleOnClose, $[74] = onClose, $[75] = t16, $[76] = t25, $[77] = t9, $[78] = t26) : t26 = $[78], t26;
|
|
49741
49742
|
}
|
|
49742
|
-
function _temp$
|
|
49743
|
+
function _temp$1O(cur) {
|
|
49743
49744
|
return cur + 1;
|
|
49744
49745
|
}
|
|
49745
49746
|
const VersionContextMenuDialogs = memo(function(props2) {
|
|
@@ -50024,7 +50025,7 @@ const useHasCopyToDraftOption = (documentType, fromRelease) => {
|
|
|
50024
50025
|
t
|
|
50025
50026
|
} = useTranslation(), hasCopyToDraftOption = useHasCopyToDraftOption(documentType, bundleId), isCopyToReleaseDisabled = disabled || !hasCreatePermission || isGoingToUnpublish2;
|
|
50026
50027
|
let t2;
|
|
50027
|
-
$[0] !== releases2 ? (t2 = releases2.filter(_temp$
|
|
50028
|
+
$[0] !== releases2 ? (t2 = releases2.filter(_temp$1N), $[0] = releases2, $[1] = t2) : t2 = $[1];
|
|
50028
50029
|
const copyToReleaseOptions = t2, isReleasesEnabled = !!useWorkspace().releases?.enabled, showCopyToReleaseMenuItem = isReleasesEnabled || hasCopyToDraftOption;
|
|
50029
50030
|
let t3;
|
|
50030
50031
|
$[2] !== bundleId || $[3] !== disabled || $[4] !== release || $[5] !== t ? (t3 = release && /* @__PURE__ */ jsx(IntentLink, { intent: RELEASES_INTENT, params: {
|
|
@@ -50052,7 +50053,7 @@ const useHasCopyToDraftOption = (documentType, fromRelease) => {
|
|
|
50052
50053
|
t7
|
|
50053
50054
|
] }), $[36] = t3, $[37] = t4, $[38] = t5, $[39] = t6, $[40] = t7, $[41] = t8) : t8 = $[41], t8;
|
|
50054
50055
|
});
|
|
50055
|
-
function _temp$
|
|
50056
|
+
function _temp$1N(r) {
|
|
50056
50057
|
return !isReleaseScheduledOrScheduling(r);
|
|
50057
50058
|
}
|
|
50058
50059
|
const ScheduledDraftContextMenu = memo(function(props2) {
|
|
@@ -50074,7 +50075,7 @@ const ScheduledDraftContextMenu = memo(function(props2) {
|
|
|
50074
50075
|
t
|
|
50075
50076
|
} = useTranslation(), hasCopyToDraftOption = useHasCopyToDraftOption(documentType, bundleId), isCopyToReleaseDisabled = disabled || !hasCreatePermission || isGoingToUnpublish2;
|
|
50076
50077
|
let t1;
|
|
50077
|
-
$[0] !== releases2 ? (t1 = releases2.filter(_temp$
|
|
50078
|
+
$[0] !== releases2 ? (t1 = releases2.filter(_temp$1M), $[0] = releases2, $[1] = t1) : t1 = $[1];
|
|
50078
50079
|
const copyToReleaseOptions = t1, isReleasesEnabled = !!useWorkspace().releases?.enabled, showCopyToReleaseMenuItem = isReleasesEnabled && copyToReleaseOptions.length > 0, {
|
|
50079
50080
|
actions
|
|
50080
50081
|
} = scheduledDraftMenuActions;
|
|
@@ -50113,7 +50114,7 @@ const ScheduledDraftContextMenu = memo(function(props2) {
|
|
|
50113
50114
|
t10
|
|
50114
50115
|
] }), $[30] = t10, $[31] = t2, $[32] = t3, $[33] = t7, $[34] = t9, $[35] = t11) : t11 = $[35], t11;
|
|
50115
50116
|
});
|
|
50116
|
-
function _temp$
|
|
50117
|
+
function _temp$1M(r) {
|
|
50117
50118
|
return !isReleaseScheduledOrScheduling(r);
|
|
50118
50119
|
}
|
|
50119
50120
|
const VersionContextMenu = memo(function(props2) {
|
|
@@ -50343,7 +50344,7 @@ function DocumentPreviewPresence(props2) {
|
|
|
50343
50344
|
data: releases2
|
|
50344
50345
|
} = useActiveReleases();
|
|
50345
50346
|
let t0;
|
|
50346
|
-
$[0] !== presence ? (t0 = Array.from(new Set(presence.map(_temp$
|
|
50347
|
+
$[0] !== presence ? (t0 = Array.from(new Set(presence.map(_temp$1L))), $[0] = presence, $[1] = t0) : t0 = $[1];
|
|
50347
50348
|
let t1;
|
|
50348
50349
|
$[2] !== presence || $[3] !== t0 ? (t1 = t0.map((id2) => presence.find((a_0) => a_0.user.id === id2)).filter(isNonNullable$2), $[2] = presence, $[3] = t0, $[4] = t1) : t1 = $[4];
|
|
50349
50350
|
const uniquePresence = t1;
|
|
@@ -50374,16 +50375,16 @@ function DocumentPreviewPresence(props2) {
|
|
|
50374
50375
|
}
|
|
50375
50376
|
const tooltipContent = t2;
|
|
50376
50377
|
let t3;
|
|
50377
|
-
$[13] !== uniquePresence ? (t3 = uniquePresence.map(_temp2$
|
|
50378
|
+
$[13] !== uniquePresence ? (t3 = uniquePresence.map(_temp2$J), $[13] = uniquePresence, $[14] = t3) : t3 = $[14];
|
|
50378
50379
|
let t4;
|
|
50379
50380
|
$[15] !== t3 || $[16] !== tooltipContent ? (t4 = /* @__PURE__ */ jsx(AvatarStackBox, { children: /* @__PURE__ */ jsx(AvatarStack, { maxLength: 2, "aria-label": tooltipContent, size: 0, children: t3 }) }), $[15] = t3, $[16] = tooltipContent, $[17] = t4) : t4 = $[17];
|
|
50380
50381
|
let t5;
|
|
50381
50382
|
return $[18] !== t4 || $[19] !== tooltipContent ? (t5 = /* @__PURE__ */ jsx(Tooltip, { content: tooltipContent, ...PRESENCE_MENU_POPOVER_PROPS, children: t4 }), $[18] = t4, $[19] = tooltipContent, $[20] = t5) : t5 = $[20], t5;
|
|
50382
50383
|
}
|
|
50383
|
-
function _temp2$
|
|
50384
|
+
function _temp2$J(item) {
|
|
50384
50385
|
return /* @__PURE__ */ jsx(UserAvatar, { size: 0, user: item.user }, item.user.id);
|
|
50385
50386
|
}
|
|
50386
|
-
function _temp$
|
|
50387
|
+
function _temp$1L(a) {
|
|
50387
50388
|
return a.user.id;
|
|
50388
50389
|
}
|
|
50389
50390
|
const FlexWrapper = styled(Flex).withConfig({
|
|
@@ -50420,14 +50421,14 @@ function PresenceTooltip(props2) {
|
|
|
50420
50421
|
items
|
|
50421
50422
|
} = props2;
|
|
50422
50423
|
let t0;
|
|
50423
|
-
$[0] !== items ? (t0 = items.map(_temp$
|
|
50424
|
+
$[0] !== items ? (t0 = items.map(_temp$1K), $[0] = items, $[1] = t0) : t0 = $[1];
|
|
50424
50425
|
let t1;
|
|
50425
50426
|
$[2] !== t0 ? (t1 = /* @__PURE__ */ jsx(Stack, { sizing: "border", children: t0 }), $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
50426
50427
|
const content = t1;
|
|
50427
50428
|
let t2;
|
|
50428
50429
|
return $[4] !== children || $[5] !== content ? (t2 = /* @__PURE__ */ jsx(Tooltip, { content, placement: "top", portal: "documentScrollElement", children }), $[4] = children, $[5] = content, $[6] = t2) : t2 = $[6], t2;
|
|
50429
50430
|
}
|
|
50430
|
-
function _temp$
|
|
50431
|
+
function _temp$1K(item) {
|
|
50431
50432
|
return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, children: [
|
|
50432
50433
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UserAvatar, { user: item.user, status: "online" }) }),
|
|
50433
50434
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: item.user.displayName })
|
|
@@ -50443,7 +50444,7 @@ const FieldPresenceInner = memo(function(t0) {
|
|
|
50443
50444
|
} = t0, position = t1 === void 0 ? "inside" : t1, animateArrowFrom = t2 === void 0 ? "inside" : t2, maxAvatars = t3 === void 0 ? DEFAULT_MAX_AVATARS_FIELDS : t3, stack = t4 === void 0 ? !0 : t4;
|
|
50444
50445
|
let t5;
|
|
50445
50446
|
if ($[0] !== animateArrowFrom || $[1] !== maxAvatars || $[2] !== position || $[3] !== presence || $[4] !== stack) {
|
|
50446
|
-
const uniquePresence = uniqBy(presence || [], _temp$
|
|
50447
|
+
const uniquePresence = uniqBy(presence || [], _temp$1J), sorted = sortBy(uniquePresence, _temp2$I), [hidden, visible] = stack ? splitRight(sorted, maxAvatars) : [[], sorted];
|
|
50447
50448
|
let t62;
|
|
50448
50449
|
$[6] !== animateArrowFrom || $[7] !== position ? (t62 = (_visible) => ({
|
|
50449
50450
|
key: _visible.user.id,
|
|
@@ -50460,7 +50461,7 @@ const FieldPresenceInner = memo(function(t0) {
|
|
|
50460
50461
|
let t7;
|
|
50461
50462
|
return $[10] !== avatars ? (t7 = /* @__PURE__ */ jsxs(FlexWrapper, { children: [
|
|
50462
50463
|
t6,
|
|
50463
|
-
/* @__PURE__ */ jsx(InnerBox, { direction: "row-reverse", children: avatars.map(_temp3$
|
|
50464
|
+
/* @__PURE__ */ jsx(InnerBox, { direction: "row-reverse", children: avatars.map(_temp3$l) })
|
|
50464
50465
|
] }), $[10] = avatars, $[11] = t7) : t7 = $[11], t7;
|
|
50465
50466
|
});
|
|
50466
50467
|
function FieldPresence(props2) {
|
|
@@ -50491,13 +50492,13 @@ function _temp4$a(item) {
|
|
|
50491
50492
|
return item.user.id;
|
|
50492
50493
|
}
|
|
50493
50494
|
const FieldPresenceWithOverlay = FieldPresence;
|
|
50494
|
-
function _temp$
|
|
50495
|
+
function _temp$1J(item) {
|
|
50495
50496
|
return item.user.id;
|
|
50496
50497
|
}
|
|
50497
|
-
function _temp2$
|
|
50498
|
+
function _temp2$I(_presence) {
|
|
50498
50499
|
return _presence.lastActiveAt;
|
|
50499
50500
|
}
|
|
50500
|
-
function _temp3$
|
|
50501
|
+
function _temp3$l(av, i) {
|
|
50501
50502
|
return av && /* @__PURE__ */ jsx("div", { style: {
|
|
50502
50503
|
position: "absolute",
|
|
50503
50504
|
transform: `translate3d(${-i * (AVATAR_SIZE + AVATAR_DISTANCE)}px, 0px, 0px)`,
|
|
@@ -50636,7 +50637,7 @@ const createIntersectionObserver = (options) => {
|
|
|
50636
50637
|
}, t8 = [], $[11] = t7, $[12] = t8) : (t7 = $[11], t8 = $[12]), useLayoutEffect(t7, t8);
|
|
50637
50638
|
const top = intersections["::top"], bottom2 = intersections["::bottom"];
|
|
50638
50639
|
let t9;
|
|
50639
|
-
$[13] !== bottom2 || $[14] !== intersections || $[15] !== regions || $[16] !== top ? (t9 = top && bottom2 ? regions.filter(_temp$
|
|
50640
|
+
$[13] !== bottom2 || $[14] !== intersections || $[15] !== regions || $[16] !== top ? (t9 = top && bottom2 ? regions.filter(_temp$1I).map((region_0) => {
|
|
50640
50641
|
const intersection2 = intersections[region_0.id];
|
|
50641
50642
|
if (!intersection2)
|
|
50642
50643
|
return null;
|
|
@@ -50685,7 +50686,7 @@ const createIntersectionObserver = (options) => {
|
|
|
50685
50686
|
t15
|
|
50686
50687
|
] }), $[36] = ref, $[37] = t10, $[38] = t11, $[39] = t13, $[40] = t14, $[41] = t15, $[42] = t16) : t16 = $[42], t16;
|
|
50687
50688
|
});
|
|
50688
|
-
function _temp$
|
|
50689
|
+
function _temp$1I(region) {
|
|
50689
50690
|
return region.presence?.length > 0;
|
|
50690
50691
|
}
|
|
50691
50692
|
const ITEM_TRANSITION = {
|
|
@@ -50771,7 +50772,7 @@ function StickyOverlay(props2) {
|
|
|
50771
50772
|
const regions = t1;
|
|
50772
50773
|
let t2;
|
|
50773
50774
|
$[3] !== margins ? (t2 = (regionsWithIntersectionDetails, containerWidth) => {
|
|
50774
|
-
const grouped = group(regionsWithIntersectionDetails.filter(_temp$
|
|
50775
|
+
const grouped = group(regionsWithIntersectionDetails.filter(_temp$1H)), topSpacing = sum(grouped.top.map(_temp2$H)), bottomSpacing = sum([...grouped.inside, ...grouped.bottom].map(_temp3$k)), counts = grouped.inside.reduce(_temp4$9, {
|
|
50775
50776
|
nearTop: 0,
|
|
50776
50777
|
nearBottom: 0
|
|
50777
50778
|
});
|
|
@@ -50797,13 +50798,13 @@ function _temp4$9(_counts, withIntersection) {
|
|
|
50797
50798
|
nearBottom: _counts.nearBottom + (nearBottom ? withIntersection.region.presence.length : 0)
|
|
50798
50799
|
};
|
|
50799
50800
|
}
|
|
50800
|
-
function _temp3$
|
|
50801
|
+
function _temp3$k(n_0) {
|
|
50801
50802
|
return n_0.region.rect.height + n_0.spacerHeight;
|
|
50802
50803
|
}
|
|
50803
|
-
function _temp2$
|
|
50804
|
+
function _temp2$H(n) {
|
|
50804
50805
|
return n.region.rect.height + n.spacerHeight;
|
|
50805
50806
|
}
|
|
50806
|
-
function _temp$
|
|
50807
|
+
function _temp$1H(item) {
|
|
50807
50808
|
return item.region.presence.length > 0;
|
|
50808
50809
|
}
|
|
50809
50810
|
const EMPTY_ARRAY$e = [], PresenceDock = memo(function(props2) {
|
|
@@ -51711,7 +51712,7 @@ function FormInputInner(props2) {
|
|
|
51711
51712
|
if ($[58] !== absolutePath || $[59] !== props2.members || $[60] !== props2.path || $[61] !== t) {
|
|
51712
51713
|
t6 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
51713
51714
|
bb1: {
|
|
51714
|
-
const childPath_0 = trimLeft(props2.path, absolutePath), fieldMember = props2.members.find((member_0) => member_0.kind == "field" && childPath_0[0] === member_0.name), fieldSetMember = props2.members.filter(_temp$
|
|
51715
|
+
const childPath_0 = trimLeft(props2.path, absolutePath), fieldMember = props2.members.find((member_0) => member_0.kind == "field" && childPath_0[0] === member_0.name), fieldSetMember = props2.members.filter(_temp$1G).flatMap(_temp2$G).find((m) => m.kind === "field" && m.name === childPath_0[0]);
|
|
51715
51716
|
if (member_3 = fieldMember || fieldSetMember, !member_3) {
|
|
51716
51717
|
const fieldName = typeof childPath_0[0] == "string" ? childPath_0[0] : JSON.stringify(childPath_0[0]);
|
|
51717
51718
|
t6 = /* @__PURE__ */ jsx("div", { children: t("form.error.field-not-found", {
|
|
@@ -51730,10 +51731,10 @@ function FormInputInner(props2) {
|
|
|
51730
51731
|
}
|
|
51731
51732
|
throw new Error("FormInput can only be used with arrays or objects");
|
|
51732
51733
|
}
|
|
51733
|
-
function _temp2$
|
|
51734
|
+
function _temp2$G(member_2) {
|
|
51734
51735
|
return member_2.kind === "fieldSet" && member_2.fieldSet?.members || [];
|
|
51735
51736
|
}
|
|
51736
|
-
function _temp$
|
|
51737
|
+
function _temp$1G(member_1) {
|
|
51737
51738
|
return member_1.kind === "fieldSet";
|
|
51738
51739
|
}
|
|
51739
51740
|
function NullRender() {
|
|
@@ -51934,7 +51935,7 @@ function useFormState(t0) {
|
|
|
51934
51935
|
perspective,
|
|
51935
51936
|
hasUpstreamVersion,
|
|
51936
51937
|
displayInlineChanges
|
|
51937
|
-
} = t0, currentUser = useCurrentUser(), [prepareHiddenState] = useState(_temp$
|
|
51938
|
+
} = t0, currentUser = useCurrentUser(), [prepareHiddenState] = useState(_temp$1F), [prepareReadOnlyState] = useState(_temp2$F), [prepareFormState] = useState(_temp3$j), [reconcileFieldGroupState] = useState(_temp4$8);
|
|
51938
51939
|
let t1;
|
|
51939
51940
|
$[0] !== fieldGroupState || $[1] !== reconcileFieldGroupState ? (t1 = reconcileFieldGroupState(fieldGroupState), $[0] = fieldGroupState, $[1] = reconcileFieldGroupState, $[2] = t1) : t1 = $[2];
|
|
51940
51941
|
const reconciledFieldGroupState = t1, [reconcileCollapsedPaths] = useState(_temp5$5);
|
|
@@ -52008,15 +52009,15 @@ function _temp4$8() {
|
|
|
52008
52009
|
return last2 = result, result;
|
|
52009
52010
|
};
|
|
52010
52011
|
}
|
|
52011
|
-
function _temp3$
|
|
52012
|
+
function _temp3$j() {
|
|
52012
52013
|
return createPrepareFormState();
|
|
52013
52014
|
}
|
|
52014
|
-
function _temp2$
|
|
52015
|
+
function _temp2$F() {
|
|
52015
52016
|
return createCallbackResolver({
|
|
52016
52017
|
property: "readOnly"
|
|
52017
52018
|
});
|
|
52018
52019
|
}
|
|
52019
|
-
function _temp$
|
|
52020
|
+
function _temp$1F() {
|
|
52020
52021
|
return createCallbackResolver({
|
|
52021
52022
|
property: "hidden"
|
|
52022
52023
|
});
|
|
@@ -52117,15 +52118,15 @@ const useCanvasCompanionDoc = (documentId) => {
|
|
|
52117
52118
|
function useConnectionState(publishedDocId, docTypeName, version2) {
|
|
52118
52119
|
const $ = c(5), documentStore = useDocumentStore();
|
|
52119
52120
|
let t0;
|
|
52120
|
-
return $[0] !== docTypeName || $[1] !== documentStore.pair || $[2] !== publishedDocId || $[3] !== version2 ? (t0 = documentStore.pair.documentEvents(publishedDocId, docTypeName, version2).pipe(map(_temp$
|
|
52121
|
+
return $[0] !== docTypeName || $[1] !== documentStore.pair || $[2] !== publishedDocId || $[3] !== version2 ? (t0 = documentStore.pair.documentEvents(publishedDocId, docTypeName, version2).pipe(map(_temp$1E), map(_temp2$E), switchMap(_temp3$i), startWith(INITIAL$1), distinctUntilChanged()), $[0] = docTypeName, $[1] = documentStore.pair, $[2] = publishedDocId, $[3] = version2, $[4] = t0) : t0 = $[4], useObservable(t0, INITIAL$1);
|
|
52121
52122
|
}
|
|
52122
|
-
function _temp3$
|
|
52123
|
+
function _temp3$i(isConnected) {
|
|
52123
52124
|
return isConnected ? of("connected") : timer(200).pipe(mapTo("reconnecting"));
|
|
52124
52125
|
}
|
|
52125
|
-
function _temp2$
|
|
52126
|
+
function _temp2$E(eventType) {
|
|
52126
52127
|
return eventType !== "reconnect";
|
|
52127
52128
|
}
|
|
52128
|
-
function _temp$
|
|
52129
|
+
function _temp$1E(ev) {
|
|
52129
52130
|
return ev.type;
|
|
52130
52131
|
}
|
|
52131
52132
|
function useFilteredReleases(t0) {
|
|
@@ -52161,7 +52162,7 @@ function useFilteredReleases(t0) {
|
|
|
52161
52162
|
break bb0;
|
|
52162
52163
|
}
|
|
52163
52164
|
if ($[13] !== archivedReleases || $[14] !== displayed || $[15] !== documentVersions || $[16] !== historyVersion || $[17] !== isCreatingDocument || $[18] !== releases2 || $[19] !== selectedReleaseId || $[20] !== strict) {
|
|
52164
|
-
const releasesIds = documentVersions.map(_temp$
|
|
52165
|
+
const releasesIds = documentVersions.map(_temp$1D);
|
|
52165
52166
|
if (activeReleases = releases2.reduce((acc, release) => {
|
|
52166
52167
|
const versionDocExists = releasesIds.includes(getReleaseIdFromReleaseDocumentId(release._id)), releaseId = getReleaseIdFromReleaseDocumentId(release._id);
|
|
52167
52168
|
return isCreatingDocument && releaseId === getVersionFromId(displayed._id || "") && releaseId === selectedReleaseId ? acc.inCreation = release : versionDocExists ? strict ? (getDocumentIsInPerspective(displayed?._id ?? "", getReleaseIdFromReleaseDocumentId(release._id)) || release.metadata.releaseType === "scheduled") && acc.currentReleases.push(release) : acc.currentReleases.push(release) : acc.notCurrentReleases.push(release), acc;
|
|
@@ -52183,7 +52184,7 @@ function useFilteredReleases(t0) {
|
|
|
52183
52184
|
activeReleases = $[11], t3 = $[12];
|
|
52184
52185
|
return t3 !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel") ? t3 : activeReleases;
|
|
52185
52186
|
}
|
|
52186
|
-
function _temp$
|
|
52187
|
+
function _temp$1D(id2) {
|
|
52187
52188
|
return getVersionFromId(id2);
|
|
52188
52189
|
}
|
|
52189
52190
|
function useDocumentIdStack(t0) {
|
|
@@ -52215,7 +52216,7 @@ function useDocumentIdStack(t0) {
|
|
|
52215
52216
|
let t72;
|
|
52216
52217
|
$[15] !== editState2 ? (t72 = (release) => editState2?.id && getVersionId(editState2.id, getReleaseIdFromReleaseDocumentId(release._id)), $[15] = editState2, $[16] = t72) : t72 = $[16];
|
|
52217
52218
|
const releaseStack = filteredReleases.currentReleases.map(t72), isAnonymousVersion = editState2?.version !== null && !releaseStack.includes(displayed?._id), anonymousVersionsStack = isAnonymousVersion ? [displayed?._id] : [];
|
|
52218
|
-
t6 = systemStack.concat(!isAnonymousVersion || !strict ? releaseStack : []).concat(anonymousVersionsStack).filter(_temp$
|
|
52219
|
+
t6 = systemStack.concat(!isAnonymousVersion || !strict ? releaseStack : []).concat(anonymousVersionsStack).filter(_temp$1C), $[8] = displayed?._id, $[9] = editState2, $[10] = filteredReleases.currentReleases, $[11] = shouldIncludeDraft, $[12] = strict, $[13] = t5, $[14] = t6;
|
|
52219
52220
|
} else
|
|
52220
52221
|
t6 = $[14];
|
|
52221
52222
|
const stack = t6;
|
|
@@ -52230,7 +52231,7 @@ function useDocumentIdStack(t0) {
|
|
|
52230
52231
|
stack
|
|
52231
52232
|
}, $[19] = nextId, $[20] = position, $[21] = previousId, $[22] = stack, $[23] = t8) : t8 = $[23], t8;
|
|
52232
52233
|
}
|
|
52233
|
-
function _temp$
|
|
52234
|
+
function _temp$1C(id2) {
|
|
52234
52235
|
return typeof id2 == "string";
|
|
52235
52236
|
}
|
|
52236
52237
|
const isSameEditState = (prev, next) => prev.draft === next.draft && prev.published === next.published && prev.version === next.version && prev.ready === next.ready && prev.transactionSyncLock === next.transactionSyncLock;
|
|
@@ -52245,7 +52246,7 @@ function useEditState(publishedDocId, docTypeName, t0, version2) {
|
|
|
52245
52246
|
const source = documentStore.pair.editState(publishedDocId, docTypeName, version2);
|
|
52246
52247
|
if (priority === "low") {
|
|
52247
52248
|
const base = source.pipe(share$1());
|
|
52248
|
-
t1 = merge(base.pipe(take(1)), base.pipe(skip(1), debounce$1(_temp$
|
|
52249
|
+
t1 = merge(base.pipe(take(1)), base.pipe(skip(1), debounce$1(_temp$1B))).pipe(distinctUntilChanged$1(isSameEditState), shareReplay$1({
|
|
52249
52250
|
bufferSize: 1,
|
|
52250
52251
|
refCount: !0
|
|
52251
52252
|
}));
|
|
@@ -52261,7 +52262,7 @@ function useEditState(publishedDocId, docTypeName, t0, version2) {
|
|
|
52261
52262
|
t1 = $[5];
|
|
52262
52263
|
return useObservable(t1);
|
|
52263
52264
|
}
|
|
52264
|
-
function _temp$
|
|
52265
|
+
function _temp$1B() {
|
|
52265
52266
|
return timer(1e3);
|
|
52266
52267
|
}
|
|
52267
52268
|
const INITIAL = {
|
|
@@ -52486,13 +52487,13 @@ function useDocumentForm(options) {
|
|
|
52486
52487
|
$[72] !== t22 ? (t23 = t22(), $[72] = t22, $[73] = t23) : t23 = $[73];
|
|
52487
52488
|
const readOnly = t23, {
|
|
52488
52489
|
patch: patch2
|
|
52489
|
-
} = useDocumentOperation(documentId, documentType, activeDocumentReleaseId), patchRef = useRef(_temp$
|
|
52490
|
+
} = useDocumentOperation(documentId, documentType, activeDocumentReleaseId), patchRef = useRef(_temp$1A);
|
|
52490
52491
|
let t24;
|
|
52491
52492
|
$[74] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t24 = (event) => patchRef.current(event), $[74] = t24) : t24 = $[74];
|
|
52492
52493
|
const handleChange = t24;
|
|
52493
52494
|
let t25;
|
|
52494
52495
|
$[75] !== editState2.draft || $[76] !== editState2.published || $[77] !== initialValue?.value || $[78] !== patch2 || $[79] !== readOnly || $[80] !== telemetry ? (t25 = () => {
|
|
52495
|
-
readOnly ? patchRef.current = _temp2$
|
|
52496
|
+
readOnly ? patchRef.current = _temp2$D : patchRef.current = (event_0) => {
|
|
52496
52497
|
!editState2.draft && !editState2.published && telemetry.log(CreatedDraft), patch2.execute(toMutationPatches(event_0.patches), initialValue?.value);
|
|
52497
52498
|
};
|
|
52498
52499
|
}, $[75] = editState2.draft, $[76] = editState2.published, $[77] = initialValue?.value, $[78] = patch2, $[79] = readOnly, $[80] = telemetry, $[81] = t25) : t25 = $[81];
|
|
@@ -52617,10 +52618,10 @@ function useDocumentForm(options) {
|
|
|
52617
52618
|
onSetCollapsedFieldSet: handleOnSetCollapsedFieldSet
|
|
52618
52619
|
}, $[145] = collapsedFieldSets, $[146] = collapsedPaths, $[147] = connectionState, $[148] = editState2, $[149] = focusPath, $[150] = formState, $[151] = handleBlur, $[152] = handleFocus, $[153] = handleOnSetCollapsedFieldSet, $[154] = handleOnSetCollapsedPath, $[155] = handleProgrammaticFocus, $[156] = handleSetActiveFieldGroup, $[157] = handleSetOpenPath, $[158] = hasUpstreamVersion, $[159] = isPermissionsLoading, $[160] = openPath, $[161] = permissions, $[162] = ready, $[163] = schemaType, $[164] = upstreamEditState, $[165] = validation2, $[166] = value, $[167] = t45) : t45 = $[167], t45;
|
|
52619
52620
|
}
|
|
52620
|
-
function _temp2$
|
|
52621
|
+
function _temp2$D() {
|
|
52621
52622
|
throw new Error("Attempted to patch a read-only document");
|
|
52622
52623
|
}
|
|
52623
|
-
function _temp$
|
|
52624
|
+
function _temp$1A() {
|
|
52624
52625
|
throw new Error("Attempted to patch the Sanity document during initial render or in an `useInsertionEffect`. Input components should only call `onChange()` in a useEffect or an event handler.");
|
|
52625
52626
|
}
|
|
52626
52627
|
const IS_NUMERIC = /^\d+$/;
|
|
@@ -52905,7 +52906,7 @@ function SelectAssetsDialog(props2) {
|
|
|
52905
52906
|
i18n: workspace.i18n,
|
|
52906
52907
|
environment: "studio",
|
|
52907
52908
|
document: document2,
|
|
52908
|
-
getDocumentExists: _temp$
|
|
52909
|
+
getDocumentExists: _temp$1z
|
|
52909
52910
|
});
|
|
52910
52911
|
return filterMediaValidationMarkers(result);
|
|
52911
52912
|
}, $[4] = client, $[5] = document2, $[6] = mediaLibraryIds?.libraryId, $[7] = schema2, $[8] = schemaType, $[9] = workspace.i18n, $[10] = t4) : t4 = $[10];
|
|
@@ -52913,7 +52914,7 @@ function SelectAssetsDialog(props2) {
|
|
|
52913
52914
|
let t5;
|
|
52914
52915
|
$[11] !== schemaType?.options?.mediaLibrary?.filters ? (t5 = schemaType?.options?.mediaLibrary?.filters || [], $[11] = schemaType?.options?.mediaLibrary?.filters, $[12] = t5) : t5 = $[12];
|
|
52915
52916
|
let t6;
|
|
52916
|
-
$[13] !== t5 ? (t6 = t5.map(_temp2$
|
|
52917
|
+
$[13] !== t5 ? (t6 = t5.map(_temp2$C), $[13] = t5, $[14] = t6) : t6 = $[14];
|
|
52917
52918
|
const pluginFilters = t6;
|
|
52918
52919
|
let t7;
|
|
52919
52920
|
$[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = {
|
|
@@ -52969,7 +52970,7 @@ function SelectAssetsDialog(props2) {
|
|
|
52969
52970
|
return;
|
|
52970
52971
|
}
|
|
52971
52972
|
const validationResult = await validateSelection(assetSelectionItems[0]);
|
|
52972
|
-
validationResult.some(_temp3$
|
|
52973
|
+
validationResult.some(_temp3$h) && setValidation(validationResult);
|
|
52973
52974
|
}, $[36] = validateSelection, $[37] = t14) : t14 = $[37];
|
|
52974
52975
|
const handleAssetSelection = t14;
|
|
52975
52976
|
let t15;
|
|
@@ -53021,17 +53022,17 @@ function SelectAssetsDialog(props2) {
|
|
|
53021
53022
|
function _temp4$7(marker_0) {
|
|
53022
53023
|
return marker_0.level === "error";
|
|
53023
53024
|
}
|
|
53024
|
-
function _temp3$
|
|
53025
|
+
function _temp3$h(marker) {
|
|
53025
53026
|
return marker.level === "error";
|
|
53026
53027
|
}
|
|
53027
|
-
function _temp2$
|
|
53028
|
+
function _temp2$C(filter2) {
|
|
53028
53029
|
return {
|
|
53029
53030
|
type: "groq",
|
|
53030
53031
|
name: filter2.name,
|
|
53031
53032
|
query: filter2.query
|
|
53032
53033
|
};
|
|
53033
53034
|
}
|
|
53034
|
-
async function _temp$
|
|
53035
|
+
async function _temp$1z() {
|
|
53035
53036
|
return !0;
|
|
53036
53037
|
}
|
|
53037
53038
|
function UploadAssetsDialog(props2) {
|
|
@@ -53105,12 +53106,12 @@ function UploadAssetsDialog(props2) {
|
|
|
53105
53106
|
let t3, t4;
|
|
53106
53107
|
if ($[14] !== open || $[15] !== pageReadyForUploads || $[16] !== postMessage || $[17] !== t || $[18] !== toast || $[19] !== uploader ? (t3 = () => {
|
|
53107
53108
|
if (open && uploader) {
|
|
53108
|
-
pageReadyForUploads && uploader.getFiles().length > 0 && uploader.getFiles().every(_temp$
|
|
53109
|
+
pageReadyForUploads && uploader.getFiles().length > 0 && uploader.getFiles().every(_temp$1y) && (postMessage({
|
|
53109
53110
|
type: "uploadRequest",
|
|
53110
53111
|
files: uploader.getFiles()
|
|
53111
53112
|
}), setPageReadyForUploads(!1));
|
|
53112
53113
|
const subscribe2 = () => uploader.subscribe((event) => {
|
|
53113
|
-
event.type === "all-complete" && event.files.filter(_temp2$
|
|
53114
|
+
event.type === "all-complete" && event.files.filter(_temp2$B).forEach((file_2) => {
|
|
53114
53115
|
toast.push({
|
|
53115
53116
|
status: "warning",
|
|
53116
53117
|
title: t("asset-sources.media-library.warning.file-already-exist.title", {
|
|
@@ -53138,10 +53139,10 @@ function UploadAssetsDialog(props2) {
|
|
|
53138
53139
|
let t5;
|
|
53139
53140
|
return $[22] !== iframeUrl || $[23] !== setIframe ? (t5 = /* @__PURE__ */ jsx(Iframe, { ref: setIframe, src: iframeUrl, hidden: !0 }), $[22] = iframeUrl, $[23] = setIframe, $[24] = t5) : t5 = $[24], t5;
|
|
53140
53141
|
}
|
|
53141
|
-
function _temp2$
|
|
53142
|
+
function _temp2$B(file_1) {
|
|
53142
53143
|
return file_1.status === "alreadyExists";
|
|
53143
53144
|
}
|
|
53144
|
-
function _temp$
|
|
53145
|
+
function _temp$1y(file_0) {
|
|
53145
53146
|
return file_0.status === "pending";
|
|
53146
53147
|
}
|
|
53147
53148
|
const MediaLibraryAssetSourceComponent = function(props2, ref) {
|
|
@@ -53209,13 +53210,13 @@ const MediaLibraryAssetSourceComponent = function(props2, ref) {
|
|
|
53209
53210
|
t13
|
|
53210
53211
|
] }), $[42] = libraryIdProp, $[43] = projectId, $[44] = t13, $[45] = t7, $[46] = t14) : t14 = $[46], t14;
|
|
53211
53212
|
}, MediaLibraryAssetSource = memo(forwardRef(MediaLibraryAssetSourceComponent)), useRootPortalElement = () => {
|
|
53212
|
-
const $ = c(3), [container] = useState(_temp$
|
|
53213
|
+
const $ = c(3), [container] = useState(_temp$1x);
|
|
53213
53214
|
let t0, t1;
|
|
53214
53215
|
return $[0] !== container ? (t0 = () => (container.classList.add("media-library-portal"), document.body.appendChild(container), () => {
|
|
53215
53216
|
document.body.removeChild(container);
|
|
53216
53217
|
}), t1 = [container], $[0] = container, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1), container;
|
|
53217
53218
|
};
|
|
53218
|
-
function _temp$
|
|
53219
|
+
function _temp$1x() {
|
|
53219
53220
|
return document.createElement("div");
|
|
53220
53221
|
}
|
|
53221
53222
|
const DEFERRED_TERMINAL_STATUSES = ["complete", "alreadyExists"];
|
|
@@ -53388,12 +53389,12 @@ function DefaultIcon(t0) {
|
|
|
53388
53389
|
} = t0, theme = /* @__PURE__ */ useTheme$1(), fontFamily = theme.sanity.fonts.text.family, fontWeight = theme.sanity.fonts.text.weights.medium, fontSize = `${theme.sanity.fonts.text.sizes[1].fontSize}px`;
|
|
53389
53390
|
let t1;
|
|
53390
53391
|
$[0] !== subtitle || $[1] !== title ? (t1 = () => pseudoRandomNumber(`${title} ${subtitle}`), $[0] = subtitle, $[1] = title, $[2] = t1) : t1 = $[2];
|
|
53391
|
-
const [rng1] = useState(t1), huesWithoutGray = COLOR_HUES.filter(_temp$
|
|
53392
|
+
const [rng1] = useState(t1), huesWithoutGray = COLOR_HUES.filter(_temp$1w), colorHue = huesWithoutGray[Math.floor(rng1 * huesWithoutGray.length)];
|
|
53392
53393
|
let t2;
|
|
53393
53394
|
$[3] !== rng1 ? (t2 = () => pseudoRandomNumber(rng1.toString()), $[3] = rng1, $[4] = t2) : t2 = $[4];
|
|
53394
53395
|
const [rng2] = useState(t2), tint = possibleTints[Math.floor(rng2 * possibleTints.length)], color = hues[colorHue][tint].hex;
|
|
53395
53396
|
let t3;
|
|
53396
|
-
$[5] !== title ? (t3 = title.split(/\s/g).map(_temp2$
|
|
53397
|
+
$[5] !== title ? (t3 = title.split(/\s/g).map(_temp2$A).filter(Boolean).slice(0, 2).map(_temp3$g), $[5] = title, $[6] = t3) : t3 = $[6];
|
|
53397
53398
|
const letters = t3;
|
|
53398
53399
|
let t4;
|
|
53399
53400
|
if ($[7] !== color) {
|
|
@@ -53419,13 +53420,13 @@ function DefaultIcon(t0) {
|
|
|
53419
53420
|
t7
|
|
53420
53421
|
] }), $[19] = t5, $[20] = t7, $[21] = t8) : t8 = $[21], t8;
|
|
53421
53422
|
}
|
|
53422
|
-
function _temp3$
|
|
53423
|
+
function _temp3$g(i) {
|
|
53423
53424
|
return [...i][0]?.toUpperCase() ?? "";
|
|
53424
53425
|
}
|
|
53425
|
-
function _temp2$
|
|
53426
|
+
function _temp2$A(word) {
|
|
53426
53427
|
return word.replace(/[^\p{L}\p{N}]/gu, "");
|
|
53427
53428
|
}
|
|
53428
|
-
function _temp$
|
|
53429
|
+
function _temp$1w(hue) {
|
|
53429
53430
|
return hue !== "gray";
|
|
53430
53431
|
}
|
|
53431
53432
|
function createDefaultIcon(title, subtitle) {
|
|
@@ -55206,7 +55207,7 @@ function useSearch(t0) {
|
|
|
55206
55207
|
}), $[0] = client, $[1] = maxFieldDepth, $[2] = schema2, $[3] = strategy, $[4] = t1) : t1 = $[4];
|
|
55207
55208
|
const search2 = t1;
|
|
55208
55209
|
let t2;
|
|
55209
|
-
$[5] !== allowEmptyQueries || $[6] !== onComplete || $[7] !== onError || $[8] !== onStart || $[9] !== search2 ? (t2 = (inputValue$) => inputValue$.pipe(filter(nonNullable), map(sanitizeRequest), distinctUntilChanged(isEqual$1), debounce$2(_temp$
|
|
55210
|
+
$[5] !== allowEmptyQueries || $[6] !== onComplete || $[7] !== onError || $[8] !== onStart || $[9] !== search2 ? (t2 = (inputValue$) => inputValue$.pipe(filter(nonNullable), map(sanitizeRequest), distinctUntilChanged(isEqual$1), debounce$2(_temp$1v), tap(onStart), switchMap((request_0) => concat(of({
|
|
55210
55211
|
...INITIAL_SEARCH_STATE,
|
|
55211
55212
|
loading: !0,
|
|
55212
55213
|
options: request_0.options,
|
|
@@ -55234,7 +55235,7 @@ function useSearch(t0) {
|
|
|
55234
55235
|
nextCursor: void 0
|
|
55235
55236
|
})))), of({
|
|
55236
55237
|
loading: !1
|
|
55237
|
-
}))), scan(_temp2$
|
|
55238
|
+
}))), scan(_temp2$z, INITIAL_SEARCH_STATE), tap(setSearchState)), $[5] = allowEmptyQueries, $[6] = onComplete, $[7] = onError, $[8] = onStart, $[9] = search2, $[10] = t2) : t2 = $[10];
|
|
55238
55239
|
const handleQueryChange = useObservableEvent(t2);
|
|
55239
55240
|
let t3;
|
|
55240
55241
|
$[11] !== handleQueryChange ? (t3 = (searchRequest) => handleQueryChange(searchRequest), $[11] = handleQueryChange, $[12] = t3) : t3 = $[12];
|
|
@@ -55245,13 +55246,13 @@ function useSearch(t0) {
|
|
|
55245
55246
|
searchState
|
|
55246
55247
|
}, $[13] = handleSearch, $[14] = searchState, $[15] = t4) : t4 = $[15], t4;
|
|
55247
55248
|
}
|
|
55248
|
-
function _temp2$
|
|
55249
|
+
function _temp2$z(prevState, nextState) {
|
|
55249
55250
|
return {
|
|
55250
55251
|
...prevState,
|
|
55251
55252
|
...nextState
|
|
55252
55253
|
};
|
|
55253
55254
|
}
|
|
55254
|
-
function _temp$
|
|
55255
|
+
function _temp$1v(request) {
|
|
55255
55256
|
return timer(request?.debounceTime || DEFAULT_DEBOUNCE_TIME);
|
|
55256
55257
|
}
|
|
55257
55258
|
function getDocumentTypesTruncated({
|
|
@@ -55338,7 +55339,7 @@ const NO_FILTER = () => !0, StyledText$2 = styled(Text$1).withConfig({
|
|
|
55338
55339
|
}, $[4] = types, $[5] = t6) : t6 = $[5];
|
|
55339
55340
|
let t7;
|
|
55340
55341
|
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = (result) => {
|
|
55341
|
-
setHits(result.hits.map(_temp$
|
|
55342
|
+
setHits(result.hits.map(_temp$1u));
|
|
55342
55343
|
}, $[6] = t7) : t7 = $[6];
|
|
55343
55344
|
let t8;
|
|
55344
55345
|
$[7] !== schema2 || $[8] !== t6 ? (t8 = {
|
|
@@ -55425,7 +55426,7 @@ const NO_FILTER = () => !0, StyledText$2 = styled(Text$1).withConfig({
|
|
|
55425
55426
|
t132 = $[23];
|
|
55426
55427
|
t12 = t132;
|
|
55427
55428
|
}
|
|
55428
|
-
const placeholderText = t12, renderOption = _temp2$
|
|
55429
|
+
const placeholderText = t12, renderOption = _temp2$y;
|
|
55429
55430
|
let t13;
|
|
55430
55431
|
$[24] !== hits || $[25] !== searchState.loading || $[26] !== searchState.terms.query || $[27] !== t ? (t13 = (props2, contentRef) => {
|
|
55431
55432
|
const {
|
|
@@ -55447,7 +55448,7 @@ const NO_FILTER = () => !0, StyledText$2 = styled(Text$1).withConfig({
|
|
|
55447
55448
|
let t17;
|
|
55448
55449
|
return $[31] !== autocompleteId || $[32] !== handleQueryChange || $[33] !== handleSelect || $[34] !== hits || $[35] !== placeholderText || $[36] !== ref || $[37] !== renderPopover || $[38] !== searchState.loading || $[39] !== t14 || $[40] !== t15 || $[41] !== t16 ? (t17 = /* @__PURE__ */ jsx("div", { ref: autocompletePopoverReferenceElementRef, children: /* @__PURE__ */ jsx(Autocomplete, { "aria-label": placeholderText, filterOption: NO_FILTER, fontSize: t14, id: autocompleteId, loading: searchState.loading, openButton: t15, options: hits, onQueryChange: handleQueryChange, onSelect: handleSelect, placeholder: placeholderText, radius: 2, ref, renderOption, renderPopover, value: t16 }) }), $[31] = autocompleteId, $[32] = handleQueryChange, $[33] = handleSelect, $[34] = hits, $[35] = placeholderText, $[36] = ref, $[37] = renderPopover, $[38] = searchState.loading, $[39] = t14, $[40] = t15, $[41] = t16, $[42] = t17) : t17 = $[42], t17;
|
|
55449
55450
|
});
|
|
55450
|
-
function _temp$
|
|
55451
|
+
function _temp$1u(t0) {
|
|
55451
55452
|
const {
|
|
55452
55453
|
hit
|
|
55453
55454
|
} = t0;
|
|
@@ -55456,7 +55457,7 @@ function _temp$1v(t0) {
|
|
|
55456
55457
|
hit
|
|
55457
55458
|
};
|
|
55458
55459
|
}
|
|
55459
|
-
function _temp2$
|
|
55460
|
+
function _temp2$y(option) {
|
|
55460
55461
|
return /* @__PURE__ */ jsx(SearchResultItem, { disableIntentLink: !0, documentId: option.value, documentType: option.hit._type, layout: "compact" });
|
|
55461
55462
|
}
|
|
55462
55463
|
function SearchFilterReferenceInput(t0) {
|
|
@@ -55492,12 +55493,12 @@ function SearchFilterReferenceInput(t0) {
|
|
|
55492
55493
|
if (schemaType) {
|
|
55493
55494
|
const field = getSchemaField$1(schemaType, fieldDefinition.fieldPath);
|
|
55494
55495
|
if (isArraySchemaType(field?.type))
|
|
55495
|
-
return field?.type.of.filter(isReferenceSchemaType).flatMap(_temp$
|
|
55496
|
+
return field?.type.of.filter(isReferenceSchemaType).flatMap(_temp$1t);
|
|
55496
55497
|
if (isReferenceSchemaType(field?.type))
|
|
55497
55498
|
return field?.type.to;
|
|
55498
55499
|
}
|
|
55499
55500
|
return [];
|
|
55500
|
-
}, $[10] = fieldDefinition.fieldPath, $[11] = schema2, $[12] = t62) : t62 = $[12], t42 = fieldDefinition.documentTypes.filter(t52).flatMap(t62).reduce(_temp2$
|
|
55501
|
+
}, $[10] = fieldDefinition.fieldPath, $[11] = schema2, $[12] = t62) : t62 = $[12], t42 = fieldDefinition.documentTypes.filter(t52).flatMap(t62).reduce(_temp2$x, []), $[3] = documentTypesNarrowed, $[4] = fieldDefinition.documentTypes, $[5] = fieldDefinition.fieldPath, $[6] = schema2, $[7] = t42;
|
|
55501
55502
|
} else
|
|
55502
55503
|
t42 = $[7];
|
|
55503
55504
|
t3 = t42;
|
|
@@ -55521,10 +55522,10 @@ function SearchFilterReferenceInput(t0) {
|
|
|
55521
55522
|
/* @__PURE__ */ jsx(Button$1, { mode: "ghost", onClick: handleClear, text: t("search.filter-reference-clear"), tone: "critical" })
|
|
55522
55523
|
] }) : /* @__PURE__ */ jsx(ReferenceAutocomplete, { onSelect: handleChange, types: searchableTypes, value }) }), $[18] = handleChange, $[19] = handleClear, $[20] = handleClick, $[21] = searchableTypes, $[22] = t, $[23] = value, $[24] = t7) : t7 = $[24], t7;
|
|
55523
55524
|
}
|
|
55524
|
-
function _temp2$
|
|
55525
|
+
function _temp2$x(acc, val) {
|
|
55525
55526
|
return acc.findIndex((v) => v.name === val?.name) < 0 && acc.push(val), acc;
|
|
55526
55527
|
}
|
|
55527
|
-
function _temp$
|
|
55528
|
+
function _temp$1t(i) {
|
|
55528
55529
|
return i.to;
|
|
55529
55530
|
}
|
|
55530
55531
|
function CustomMenuItem$2(t0) {
|
|
@@ -55569,7 +55570,7 @@ function SearchFilterStringListInput(t0) {
|
|
|
55569
55570
|
$[8] !== fieldDefinition.fieldPath || $[9] !== schema2 ? (t52 = (type) => {
|
|
55570
55571
|
const schemaType = schema2.get(type);
|
|
55571
55572
|
return schemaType ? getSchemaField$1(schemaType, fieldDefinition.fieldPath)?.type.options : null;
|
|
55572
|
-
}, $[8] = fieldDefinition.fieldPath, $[9] = schema2, $[10] = t52) : t52 = $[10], t32 = fieldDefinition.documentTypes.filter(t42).map(t52).filter(isNonNullable$2).map(_temp$
|
|
55573
|
+
}, $[8] = fieldDefinition.fieldPath, $[9] = schema2, $[10] = t52) : t52 = $[10], t32 = fieldDefinition.documentTypes.filter(t42).map(t52).filter(isNonNullable$2).map(_temp$1s).flatMap(_temp3$f).filter(isNonNullable$2).reduce(_temp5$4, []), $[1] = documentTypesNarrowed, $[2] = fieldDefinition.documentTypes, $[3] = fieldDefinition.fieldPath, $[4] = schema2, $[5] = t32;
|
|
55573
55574
|
} else
|
|
55574
55575
|
t32 = $[5];
|
|
55575
55576
|
t2 = t32;
|
|
@@ -55621,13 +55622,13 @@ function _temp5$4(acc, val) {
|
|
|
55621
55622
|
function _temp4$6(a, b) {
|
|
55622
55623
|
return typeof a == "string" && typeof b == "string" ? a.localeCompare(b) : Number(a) - Number(b);
|
|
55623
55624
|
}
|
|
55624
|
-
function _temp3$
|
|
55625
|
-
return list?.map(_temp2$
|
|
55625
|
+
function _temp3$f(list) {
|
|
55626
|
+
return list?.map(_temp2$w);
|
|
55626
55627
|
}
|
|
55627
|
-
function _temp2$
|
|
55628
|
+
function _temp2$w(l) {
|
|
55628
55629
|
return toSelectItem(l);
|
|
55629
55630
|
}
|
|
55630
|
-
function _temp$
|
|
55631
|
+
function _temp$1s(o) {
|
|
55631
55632
|
return o.list;
|
|
55632
55633
|
}
|
|
55633
55634
|
function toSelectItem(option) {
|
|
@@ -55828,9 +55829,9 @@ function FileReferencePreview(t0) {
|
|
|
55828
55829
|
let t2;
|
|
55829
55830
|
$[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ jsx(FileSkeleton, {}), $[2] = t2) : t2 = $[2];
|
|
55830
55831
|
let t3;
|
|
55831
|
-
return $[3] !== observeAsset || $[4] !== reference ? (t3 = /* @__PURE__ */ jsx(WithReferencedAsset, { observeAsset, reference, waitPlaceholder: t2, children: _temp$
|
|
55832
|
+
return $[3] !== observeAsset || $[4] !== reference ? (t3 = /* @__PURE__ */ jsx(WithReferencedAsset, { observeAsset, reference, waitPlaceholder: t2, children: _temp$1r }), $[3] = observeAsset, $[4] = reference, $[5] = t3) : t3 = $[5], t3;
|
|
55832
55833
|
}
|
|
55833
|
-
function _temp$
|
|
55834
|
+
function _temp$1r(asset) {
|
|
55834
55835
|
return /* @__PURE__ */ jsx(FilePreview, { asset });
|
|
55835
55836
|
}
|
|
55836
55837
|
function FilePreview(t0) {
|
|
@@ -55889,9 +55890,9 @@ function ImageReferencePreview(t0) {
|
|
|
55889
55890
|
$[0] !== documentPreviewStore ? (t1 = (id2) => observeImageAsset(documentPreviewStore, id2), $[0] = documentPreviewStore, $[1] = t1) : t1 = $[1];
|
|
55890
55891
|
const observeAsset = t1;
|
|
55891
55892
|
let t2;
|
|
55892
|
-
return $[2] !== observeAsset || $[3] !== reference ? (t2 = /* @__PURE__ */ jsx(WithReferencedAsset, { observeAsset, reference, children: _temp$
|
|
55893
|
+
return $[2] !== observeAsset || $[3] !== reference ? (t2 = /* @__PURE__ */ jsx(WithReferencedAsset, { observeAsset, reference, children: _temp$1q }), $[2] = observeAsset, $[3] = reference, $[4] = t2) : t2 = $[4], t2;
|
|
55893
55894
|
}
|
|
55894
|
-
function _temp$
|
|
55895
|
+
function _temp$1q(asset) {
|
|
55895
55896
|
return /* @__PURE__ */ jsx(ImagePreview, { asset });
|
|
55896
55897
|
}
|
|
55897
55898
|
function ImagePreview(t0) {
|
|
@@ -56253,9 +56254,9 @@ const SHORT_WEEK_DAY_KEYS = ["calendar.weekday-names.short.monday", "calendar.we
|
|
|
56253
56254
|
weekInfo
|
|
56254
56255
|
} = useCurrentLocale();
|
|
56255
56256
|
let t0;
|
|
56256
|
-
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$1(getWeekStartsOfMonth$1(date, weekInfo.firstDay)).map(_temp$
|
|
56257
|
+
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$1(getWeekStartsOfMonth$1(date, weekInfo.firstDay)).map(_temp$1p), $[0] = date, $[1] = weekInfo.firstDay, $[2] = t0) : t0 = $[2], t0;
|
|
56257
56258
|
};
|
|
56258
|
-
function _temp$
|
|
56259
|
+
function _temp$1p(days) {
|
|
56259
56260
|
return {
|
|
56260
56261
|
number: getWeek(days[0]),
|
|
56261
56262
|
days
|
|
@@ -56837,7 +56838,7 @@ function CommonDateRangeInput(t0) {
|
|
|
56837
56838
|
state: t1
|
|
56838
56839
|
} = useSearchState(), {
|
|
56839
56840
|
fullscreen
|
|
56840
|
-
} = t1, [placeholderStartDate] = useState(_temp$
|
|
56841
|
+
} = t1, [placeholderStartDate] = useState(_temp$1o), [placeholderEndDate] = useState(_temp2$v);
|
|
56841
56842
|
let t2;
|
|
56842
56843
|
$[0] !== isDateTime || $[1] !== onChange || $[2] !== value?.includeTime ? (t2 = (t32) => {
|
|
56843
56844
|
const {
|
|
@@ -56911,10 +56912,10 @@ function CommonDateRangeInput(t0) {
|
|
|
56911
56912
|
t20
|
|
56912
56913
|
] }) }), $[52] = t16, $[53] = t19, $[54] = t20, $[55] = t21) : t21 = $[55], t21;
|
|
56913
56914
|
}
|
|
56914
|
-
function _temp2$
|
|
56915
|
+
function _temp2$v() {
|
|
56915
56916
|
return /* @__PURE__ */ new Date();
|
|
56916
56917
|
}
|
|
56917
|
-
function _temp$
|
|
56918
|
+
function _temp$1o() {
|
|
56918
56919
|
return addDays(/* @__PURE__ */ new Date(), PLACEHOLDER_START_DATE_OFFSET);
|
|
56919
56920
|
}
|
|
56920
56921
|
function getStartAndEndDate({
|
|
@@ -57528,7 +57529,14 @@ const portableTextOperators = {
|
|
|
57528
57529
|
...referenceOperators,
|
|
57529
57530
|
...slugOperators,
|
|
57530
57531
|
...stringOperators
|
|
57531
|
-
}, operatorDefinitions = Object.values(searchOperators),
|
|
57532
|
+
}, operatorDefinitions = Object.values(searchOperators), DEPLOY_STUDIO_PERMISSION = "sanity.project", DEPLOY_STUDIO_GRANT = "deployStudio";
|
|
57533
|
+
function hasDeployStudioGrant(grants) {
|
|
57534
|
+
return !!grants?.[DEPLOY_STUDIO_PERMISSION]?.some((p) => p.grants.some((g) => g.name === DEPLOY_STUDIO_GRANT));
|
|
57535
|
+
}
|
|
57536
|
+
function fetchCanDeployStudio(client) {
|
|
57537
|
+
return client.config().projectId ? firstValueFrom(getProjectGrants(client).pipe(catchError$1(() => of({})))).then(hasDeployStudioGrant) : Promise.resolve(!1);
|
|
57538
|
+
}
|
|
57539
|
+
const debug$8 = debug$c("sanity:manifest"), MAX_SYNC_ITERATIONS = 5, claimPromiseCache = /* @__PURE__ */ new Map();
|
|
57532
57540
|
async function uploadSchema(schema2, client) {
|
|
57533
57541
|
const pauseDurations = [], before = performance.now(), sync = await DESCRIPTOR_CONVERTER.get(schema2, {
|
|
57534
57542
|
pauseDurations
|
|
@@ -57688,7 +57696,7 @@ function useVideoPlaybackInfo(params) {
|
|
|
57688
57696
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
57689
57697
|
apiVersion: DEFAULT_API_VERSION
|
|
57690
57698
|
}, $[0] = t0) : t0 = $[0];
|
|
57691
|
-
const client = useClient(t0), [retrySubject] = useState(_temp$
|
|
57699
|
+
const client = useClient(t0), [retrySubject] = useState(_temp$1n);
|
|
57692
57700
|
let t1;
|
|
57693
57701
|
$[1] !== retrySubject ? (t1 = () => {
|
|
57694
57702
|
retrySubject.next();
|
|
@@ -57748,7 +57756,7 @@ function useVideoPlaybackInfo(params) {
|
|
|
57748
57756
|
const [initialState2, playbackInfoObservable] = t2;
|
|
57749
57757
|
return useObservable(playbackInfoObservable, initialState2);
|
|
57750
57758
|
}
|
|
57751
|
-
function _temp$
|
|
57759
|
+
function _temp$1n() {
|
|
57752
57760
|
return new Subject();
|
|
57753
57761
|
}
|
|
57754
57762
|
const RatioBox = styled(Card).withConfig({
|
|
@@ -58009,7 +58017,7 @@ function VideoPreview(props2) {
|
|
|
58009
58017
|
onOpenSourceForUpload: handleOpenSourceForUpload,
|
|
58010
58018
|
onOpenSourceForUploadSingle: handleOpenSourceForUploadSingle,
|
|
58011
58019
|
onSelectFilesSingle: handleSelectVideosFromAssetSourceSingle,
|
|
58012
|
-
getSingleButtonTestId: _temp$
|
|
58020
|
+
getSingleButtonTestId: _temp$1m,
|
|
58013
58021
|
dropdownMenuTestId: "video-input-upload-drop-down-menu-button",
|
|
58014
58022
|
onCloseParentMenu: t21,
|
|
58015
58023
|
onFilePickerCancel: t22
|
|
@@ -58041,7 +58049,7 @@ function VideoPreview(props2) {
|
|
|
58041
58049
|
let t27;
|
|
58042
58050
|
return $[94] !== t26 || $[95] !== videoActionsMenuProps ? (t27 = /* @__PURE__ */ jsx(VideoActionsMenu, { ...videoActionsMenuProps, children: t26 }), $[94] = t26, $[95] = videoActionsMenuProps, $[96] = t27) : t27 = $[96], t27;
|
|
58043
58051
|
}
|
|
58044
|
-
function _temp$
|
|
58052
|
+
function _temp$1m(sourceName2) {
|
|
58045
58053
|
return `video-input-upload-button-${sourceName2}`;
|
|
58046
58054
|
}
|
|
58047
58055
|
const ASSET_FIELD_PATH = ["asset"];
|
|
@@ -58260,7 +58268,7 @@ function StudioVideoInput(props2) {
|
|
|
58260
58268
|
$[0] !== fileConfig.directUploads ? (t0 = (type, file) => fileConfig.directUploads ? resolveUploader(type, file) : null, $[0] = fileConfig.directUploads, $[1] = t0) : t0 = $[1];
|
|
58261
58269
|
const resolveUploader$1 = t0, assetSources = sourcesFromSchema || fileConfig.assetSources;
|
|
58262
58270
|
let t1;
|
|
58263
|
-
$[2] !== assetSources ? (t1 = assetSources.filter(_temp$
|
|
58271
|
+
$[2] !== assetSources ? (t1 = assetSources.filter(_temp$1l), $[2] = assetSources, $[3] = t1) : t1 = $[3];
|
|
58264
58272
|
const filteredAssetSources = t1;
|
|
58265
58273
|
let t2;
|
|
58266
58274
|
$[4] !== client || $[5] !== documentPreviewStore ? (t2 = (id2) => observeVideoAsset(documentPreviewStore, id2, client), $[4] = client, $[5] = documentPreviewStore, $[6] = t2) : t2 = $[6];
|
|
@@ -58268,7 +58276,7 @@ function StudioVideoInput(props2) {
|
|
|
58268
58276
|
let t3;
|
|
58269
58277
|
return $[7] !== client || $[8] !== fileConfig.directUploads || $[9] !== filteredAssetSources || $[10] !== observeAsset || $[11] !== props2 || $[12] !== resolveUploader$1 ? (t3 = /* @__PURE__ */ jsx(BaseVideoInput, { ...props2, client, assetSources: filteredAssetSources, directUploads: fileConfig.directUploads, observeAsset, resolveUploader: resolveUploader$1 }), $[7] = client, $[8] = fileConfig.directUploads, $[9] = filteredAssetSources, $[10] = observeAsset, $[11] = props2, $[12] = resolveUploader$1, $[13] = t3) : t3 = $[13], t3;
|
|
58270
58278
|
}
|
|
58271
|
-
function _temp$
|
|
58279
|
+
function _temp$1l(source) {
|
|
58272
58280
|
return source.name === sourceName;
|
|
58273
58281
|
}
|
|
58274
58282
|
const VideoField = (props2) => props2.renderDefault({
|
|
@@ -58515,12 +58523,12 @@ const VideoField = (props2) => props2.renderDefault({
|
|
|
58515
58523
|
function useProjectOrganizationId() {
|
|
58516
58524
|
const $ = c(2), projectStore = useProjectStore();
|
|
58517
58525
|
let t0;
|
|
58518
|
-
return $[0] !== projectStore ? (t0 = projectStore.getOrganizationId().pipe(map$1(_temp$
|
|
58526
|
+
return $[0] !== projectStore ? (t0 = projectStore.getOrganizationId().pipe(map$1(_temp$1k), startWith$1({
|
|
58519
58527
|
value: null,
|
|
58520
58528
|
loading: !0
|
|
58521
58529
|
})), $[0] = projectStore, $[1] = t0) : t0 = $[1], useObservable(t0, INITIAL_STATE$6);
|
|
58522
58530
|
}
|
|
58523
|
-
function _temp$
|
|
58531
|
+
function _temp$1k(res) {
|
|
58524
58532
|
return {
|
|
58525
58533
|
value: res,
|
|
58526
58534
|
loading: !1
|
|
@@ -58678,7 +58686,7 @@ function DocumentDiff(t0) {
|
|
|
58678
58686
|
schemaType,
|
|
58679
58687
|
rootDiff,
|
|
58680
58688
|
isComparingCurrent: !1,
|
|
58681
|
-
FieldWrapper: _temp$
|
|
58689
|
+
FieldWrapper: _temp$1j,
|
|
58682
58690
|
value: document2,
|
|
58683
58691
|
showFromValue: !0
|
|
58684
58692
|
}, $[9] = document2, $[10] = rootDiff, $[11] = schemaType, $[12] = t3, $[13] = t4) : t4 = $[13];
|
|
@@ -58687,7 +58695,7 @@ function DocumentDiff(t0) {
|
|
|
58687
58695
|
let t6;
|
|
58688
58696
|
return $[17] !== t4 || $[18] !== t5 ? (t6 = /* @__PURE__ */ jsx(DocumentChangeContext.Provider, { value: t4, children: t5 }), $[17] = t4, $[18] = t5, $[19] = t6) : t6 = $[19], t6;
|
|
58689
58697
|
}
|
|
58690
|
-
function _temp$
|
|
58698
|
+
function _temp$1j(props2) {
|
|
58691
58699
|
return props2.children;
|
|
58692
58700
|
}
|
|
58693
58701
|
const ChipCard = /* @__PURE__ */ styled(Card).withConfig({
|
|
@@ -59017,7 +59025,7 @@ function useLinkToCanvas(t0) {
|
|
|
59017
59025
|
}
|
|
59018
59026
|
return projectStore.getOrganizationId().pipe(map$1((organizationId) => {
|
|
59019
59027
|
if (!organizationId)
|
|
59020
|
-
return _temp$
|
|
59028
|
+
return _temp$1i;
|
|
59021
59029
|
const canvasLinkUrl = `https://www.sanity.${client.config().apiHost === "https://api.sanity.work" ? "work" : "io"}/@${organizationId}/canvas/${path}`;
|
|
59022
59030
|
return () => window.open(canvasLinkUrl, "_blank");
|
|
59023
59031
|
}));
|
|
@@ -59059,20 +59067,20 @@ function useLinkToCanvas(t0) {
|
|
|
59059
59067
|
client,
|
|
59060
59068
|
document: document2,
|
|
59061
59069
|
schemaId
|
|
59062
|
-
}), getNavigateToCanvas()]).pipe(map$1(t6), tap$1(t7), catchError$1(_temp2$
|
|
59070
|
+
}), getNavigateToCanvas()]).pipe(map$1(t6), tap$1(t7), catchError$1(_temp2$u)), $[14] = client, $[15] = document2, $[16] = getNavigateToCanvas, $[17] = linkDialogDiffsShown, $[18] = linkRedirected, $[19] = schemaId, $[20] = t5;
|
|
59063
59071
|
} else
|
|
59064
59072
|
t5 = $[20];
|
|
59065
59073
|
t3 = t5;
|
|
59066
59074
|
}
|
|
59067
59075
|
return useObservable(t3, initialState);
|
|
59068
59076
|
}
|
|
59069
|
-
function _temp2$
|
|
59077
|
+
function _temp2$u(error) {
|
|
59070
59078
|
return of({
|
|
59071
59079
|
status: "error",
|
|
59072
59080
|
error: error.message
|
|
59073
59081
|
});
|
|
59074
59082
|
}
|
|
59075
|
-
function _temp$
|
|
59083
|
+
function _temp$1i() {
|
|
59076
59084
|
}
|
|
59077
59085
|
const LinkToCanvasDialog = (t0) => {
|
|
59078
59086
|
const $ = c(35), {
|
|
@@ -60059,7 +60067,7 @@ const EMPTY_ARRAY$b = [], Root$e = /* @__PURE__ */ styled(Stack).withConfig({
|
|
|
60059
60067
|
let t72;
|
|
60060
60068
|
if ($[8] !== options || $[9] !== searchTerm) {
|
|
60061
60069
|
const deburredSearchTerm = deburr(searchTerm).toLocaleLowerCase();
|
|
60062
|
-
t72 = options?.map(_temp$
|
|
60070
|
+
t72 = options?.map(_temp$1h)?.filter((option_0) => option_0?.displayName?.includes(deburredSearchTerm))?.sort((a, b) => {
|
|
60063
60071
|
const matchA = a.displayName?.startsWith(deburredSearchTerm), matchB = b.displayName?.startsWith(deburredSearchTerm);
|
|
60064
60072
|
return matchA && !matchB ? -1 : !matchA && matchB ? 1 : 0;
|
|
60065
60073
|
}), $[8] = options, $[9] = searchTerm, $[10] = t72;
|
|
@@ -60083,7 +60091,7 @@ const EMPTY_ARRAY$b = [], Root$e = /* @__PURE__ */ styled(Stack).withConfig({
|
|
|
60083
60091
|
t8
|
|
60084
60092
|
] }), $[21] = t7, $[22] = t8, $[23] = t9) : t9 = $[23], t9;
|
|
60085
60093
|
});
|
|
60086
|
-
function _temp$
|
|
60094
|
+
function _temp$1h(option) {
|
|
60087
60095
|
return {
|
|
60088
60096
|
...option,
|
|
60089
60097
|
displayName: deburr(option.displayName || "").toLocaleLowerCase()
|
|
@@ -60506,7 +60514,7 @@ function CommentInputProvider(props2) {
|
|
|
60506
60514
|
$[16] !== mentionsMenuOpen || $[17] !== onMentionMenuOpenChange ? (t8 = () => onMentionMenuOpenChange?.(mentionsMenuOpen), $[16] = mentionsMenuOpen, $[17] = onMentionMenuOpenChange, $[18] = t8) : t8 = $[18], useDidUpdate(mentionsMenuOpen, t8);
|
|
60507
60515
|
let t9;
|
|
60508
60516
|
$[19] !== editor2 || $[20] !== selectionAtMentionInsert ? (t9 = (userId) => {
|
|
60509
|
-
const mentionSchemaType = editor2.schemaTypes.inlineObjects.find(_temp$
|
|
60517
|
+
const mentionSchemaType = editor2.schemaTypes.inlineObjects.find(_temp$1g), [span, spanPath] = selectionAtMentionInsert && PortableTextEditor.findByPath(editor2, selectionAtMentionInsert.focus.path) || [];
|
|
60510
60518
|
if (span && isPortableTextSpan(span) && spanPath && mentionSchemaType) {
|
|
60511
60519
|
PortableTextEditor.focus(editor2);
|
|
60512
60520
|
const offset = PortableTextEditor.getSelection(editor2)?.focus.offset;
|
|
@@ -60553,7 +60561,7 @@ function CommentInputProvider(props2) {
|
|
|
60553
60561
|
let t12;
|
|
60554
60562
|
return $[39] !== children || $[40] !== ctxValue ? (t12 = /* @__PURE__ */ jsx(CommentInputContext.Provider, { value: ctxValue, children }), $[39] = children, $[40] = ctxValue, $[41] = t12) : t12 = $[41], t12;
|
|
60555
60563
|
}
|
|
60556
|
-
function _temp$
|
|
60564
|
+
function _temp$1g(t) {
|
|
60557
60565
|
return t.name === "mention";
|
|
60558
60566
|
}
|
|
60559
60567
|
const EditorRefPlugin = forwardRef(function(_, ref) {
|
|
@@ -61076,7 +61084,7 @@ function CommentReactionsUsersTooltipContent(props2) {
|
|
|
61076
61084
|
$[9] !== UserList || $[10] !== t4 ? (t5 = {
|
|
61077
61085
|
UserList,
|
|
61078
61086
|
ReactionName: t4,
|
|
61079
|
-
Text: _temp$
|
|
61087
|
+
Text: _temp$1f
|
|
61080
61088
|
}, $[9] = UserList, $[10] = t4, $[11] = t5) : t5 = $[11];
|
|
61081
61089
|
let t6;
|
|
61082
61090
|
$[12] !== t || $[13] !== t3 || $[14] !== t5 ? (t6 = /* @__PURE__ */ jsx(TextBox, { children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "reactions.users-reacted-with-reaction", values: t3, components: t5 }) }), $[12] = t, $[13] = t3, $[14] = t5, $[15] = t6) : t6 = $[15];
|
|
@@ -61086,7 +61094,7 @@ function CommentReactionsUsersTooltipContent(props2) {
|
|
|
61086
61094
|
t6
|
|
61087
61095
|
] }), $[16] = t2, $[17] = t6, $[18] = t7) : t7 = $[18], t7;
|
|
61088
61096
|
}
|
|
61089
|
-
function _temp$
|
|
61097
|
+
function _temp$1f(t0) {
|
|
61090
61098
|
const {
|
|
61091
61099
|
children
|
|
61092
61100
|
} = t0;
|
|
@@ -61133,12 +61141,12 @@ const renderMenuButton$1 = ({
|
|
|
61133
61141
|
let t1;
|
|
61134
61142
|
if ($[2] !== currentUser?.id || $[3] !== reactions) {
|
|
61135
61143
|
let t22;
|
|
61136
|
-
$[5] !== currentUser?.id ? (t22 = (r) => r.userId === currentUser?.id, $[5] = currentUser?.id, $[6] = t22) : t22 = $[6], t1 = reactions.filter(t22).map(_temp$
|
|
61144
|
+
$[5] !== currentUser?.id ? (t22 = (r) => r.userId === currentUser?.id, $[5] = currentUser?.id, $[6] = t22) : t22 = $[6], t1 = reactions.filter(t22).map(_temp$1e), $[2] = currentUser?.id, $[3] = reactions, $[4] = t1;
|
|
61137
61145
|
} else
|
|
61138
61146
|
t1 = $[4];
|
|
61139
61147
|
const currentUserReactionNames = t1;
|
|
61140
61148
|
let t2;
|
|
61141
|
-
$[7] !== reactions ? (t2 = groupReactionsByName(reactions).filter(_temp2$
|
|
61149
|
+
$[7] !== reactions ? (t2 = groupReactionsByName(reactions).filter(_temp2$t), $[7] = reactions, $[8] = t2) : t2 = $[8];
|
|
61142
61150
|
const groupedReactions = t2;
|
|
61143
61151
|
let t3;
|
|
61144
61152
|
$[9] !== groupedReactions ? (t3 = () => ({
|
|
@@ -61160,7 +61168,7 @@ const renderMenuButton$1 = ({
|
|
|
61160
61168
|
$[17] !== sortOrder ? (t72 = (t8, t9) => {
|
|
61161
61169
|
const [nameA] = t8, [nameB] = t9, indexA = sortOrder.indexOf(nameA), indexB = sortOrder.indexOf(nameB);
|
|
61162
61170
|
return indexA === -1 ? 1 : indexB === -1 ? -1 : indexA - indexB;
|
|
61163
|
-
}, $[17] = sortOrder, $[18] = t72) : t72 = $[18], sortedReactions = groupedReactions.sort(t72), t62 = setSortedGroupedReactions, t42 = groupedReactions, t52 = sortedReactions.map(_temp3$
|
|
61171
|
+
}, $[17] = sortOrder, $[18] = t72) : t72 = $[18], sortedReactions = groupedReactions.sort(t72), t62 = setSortedGroupedReactions, t42 = groupedReactions, t52 = sortedReactions.map(_temp3$e), $[11] = groupedReactions, $[12] = sortOrder, $[13] = t42, $[14] = t52, $[15] = t62, $[16] = sortedReactions;
|
|
61164
61172
|
} else
|
|
61165
61173
|
t42 = $[13], t52 = $[14], t62 = $[15], sortedReactions = $[16];
|
|
61166
61174
|
t62({
|
|
@@ -61192,14 +61200,14 @@ const renderMenuButton$1 = ({
|
|
|
61192
61200
|
] }) }), $[38] = t4, $[39] = t6, $[40] = t7) : t7 = $[40], t7;
|
|
61193
61201
|
});
|
|
61194
61202
|
CommentReactionsBar.displayName = "Memo(CommentReactionsBar)";
|
|
61195
|
-
function _temp$
|
|
61203
|
+
function _temp$1e(r_0) {
|
|
61196
61204
|
return r_0.shortName;
|
|
61197
61205
|
}
|
|
61198
|
-
function _temp2$
|
|
61206
|
+
function _temp2$t(t0) {
|
|
61199
61207
|
const [name_0] = t0;
|
|
61200
61208
|
return COMMENT_REACTION_EMOJIS[name_0];
|
|
61201
61209
|
}
|
|
61202
|
-
function _temp3$
|
|
61210
|
+
function _temp3$e(t0) {
|
|
61203
61211
|
const [name_1] = t0;
|
|
61204
61212
|
return name_1;
|
|
61205
61213
|
}
|
|
@@ -61449,7 +61457,7 @@ function CommentsListItemLayout(props2) {
|
|
|
61449
61457
|
$[0] !== value ? (t2 = hasCommentMessageValue(value), $[0] = value, $[1] = t2) : t2 = $[1];
|
|
61450
61458
|
const hasValue2 = t2;
|
|
61451
61459
|
let t3;
|
|
61452
|
-
$[2] !== comment.reactions ? (t3 = (comment?.reactions?.filter(_temp$
|
|
61460
|
+
$[2] !== comment.reactions ? (t3 = (comment?.reactions?.filter(_temp$1d) || EMPTY_ARRAY$7).filter(_temp2$s), $[2] = comment.reactions, $[3] = t3) : t3 = $[3];
|
|
61453
61461
|
const reactions = t3, hasReactions = !!reactions?.length;
|
|
61454
61462
|
let t4;
|
|
61455
61463
|
$[4] !== _createdAt ? (t4 = _createdAt ? new Date(_createdAt) : /* @__PURE__ */ new Date(), $[4] = _createdAt, $[5] = t4) : t4 = $[5];
|
|
@@ -61532,7 +61540,7 @@ function CommentsListItemLayout(props2) {
|
|
|
61532
61540
|
const handleOpenStatusChange = t21;
|
|
61533
61541
|
let t22;
|
|
61534
61542
|
$[44] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t22 = () => {
|
|
61535
|
-
setIsEditing(_temp3$
|
|
61543
|
+
setIsEditing(_temp3$d);
|
|
61536
61544
|
}, $[44] = t22) : t22 = $[44];
|
|
61537
61545
|
const toggleEdit = t22;
|
|
61538
61546
|
let t23;
|
|
@@ -61639,13 +61647,13 @@ function CommentsListItemLayout(props2) {
|
|
|
61639
61647
|
t57
|
|
61640
61648
|
] }), $[145] = T0, $[146] = handleRootKeyDown, $[147] = t27, $[148] = t56, $[149] = t57, $[150] = t58) : t58 = $[150], t58;
|
|
61641
61649
|
}
|
|
61642
|
-
function _temp3$
|
|
61650
|
+
function _temp3$d(v) {
|
|
61643
61651
|
return !v;
|
|
61644
61652
|
}
|
|
61645
|
-
function _temp2$
|
|
61653
|
+
function _temp2$s(r_0) {
|
|
61646
61654
|
return "userId" in r_0 && "shortName" in r_0;
|
|
61647
61655
|
}
|
|
61648
|
-
function _temp$
|
|
61656
|
+
function _temp$1d(r) {
|
|
61649
61657
|
return r?._optimisticState !== "removed";
|
|
61650
61658
|
}
|
|
61651
61659
|
const ThreadCard = /* @__PURE__ */ styled(Card).attrs({
|
|
@@ -62029,7 +62037,7 @@ function CommentThreadLayout(props2) {
|
|
|
62029
62037
|
}, $[6] = fieldPath, $[7] = onPathSelect, $[8] = t2) : t2 = $[8];
|
|
62030
62038
|
const handleNewThreadClick = t2;
|
|
62031
62039
|
let t3;
|
|
62032
|
-
$[9] !== breadcrumbs ? (t3 = breadcrumbs?.map(_temp$
|
|
62040
|
+
$[9] !== breadcrumbs ? (t3 = breadcrumbs?.map(_temp$1c) || [], $[9] = breadcrumbs, $[10] = t3) : t3 = $[10];
|
|
62033
62041
|
const crumbsTitlePath = t3, lastCrumb = crumbsTitlePath[crumbsTitlePath.length - 1];
|
|
62034
62042
|
let t4;
|
|
62035
62043
|
$[11] !== lastCrumb || $[12] !== t ? (t4 = t("list-item.breadcrumb-button-go-to-field-aria-label", {
|
|
@@ -62050,7 +62058,7 @@ function CommentThreadLayout(props2) {
|
|
|
62050
62058
|
t8
|
|
62051
62059
|
] }), $[32] = t6, $[33] = t7, $[34] = t8, $[35] = t9) : t9 = $[35], t9;
|
|
62052
62060
|
}
|
|
62053
|
-
function _temp$
|
|
62061
|
+
function _temp$1c(p) {
|
|
62054
62062
|
return p.title;
|
|
62055
62063
|
}
|
|
62056
62064
|
function groupThreads(comments2) {
|
|
@@ -62709,7 +62717,7 @@ function useCommentOperations(opts) {
|
|
|
62709
62717
|
createAddonDataset,
|
|
62710
62718
|
workspace,
|
|
62711
62719
|
getCommentLink
|
|
62712
|
-
} = opts, getIntent = useCommentsIntent(), activeToolName = useRouterState(_temp$
|
|
62720
|
+
} = opts, getIntent = useCommentsIntent(), activeToolName = useRouterState(_temp$1b), tools = useTools();
|
|
62713
62721
|
let t0;
|
|
62714
62722
|
if ($[0] !== activeToolName || $[1] !== tools) {
|
|
62715
62723
|
let t12;
|
|
@@ -62801,7 +62809,7 @@ function useCommentOperations(opts) {
|
|
|
62801
62809
|
operation: t7
|
|
62802
62810
|
}, $[44] = t7, $[45] = t8) : t8 = $[45], t8;
|
|
62803
62811
|
}
|
|
62804
|
-
function _temp$
|
|
62812
|
+
function _temp$1b(routerState) {
|
|
62805
62813
|
return typeof routerState.tool == "string" ? routerState.tool : void 0;
|
|
62806
62814
|
}
|
|
62807
62815
|
function useComments() {
|
|
@@ -63311,7 +63319,7 @@ function CalendarMonth(props2) {
|
|
|
63311
63319
|
let t1, t2;
|
|
63312
63320
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = {
|
|
63313
63321
|
gridTemplateColumns: "repeat(7, minmax(44px, 46px))"
|
|
63314
|
-
}, t2 = WEEK_DAY_NAMES.map(_temp$
|
|
63322
|
+
}, t2 = WEEK_DAY_NAMES.map(_temp$1a), $[0] = t1, $[1] = t2) : (t1 = $[0], t2 = $[1]);
|
|
63315
63323
|
let t3;
|
|
63316
63324
|
if ($[2] !== customValidation || $[3] !== getCurrentZoneDate || $[4] !== props2.date || $[5] !== props2.focused || $[6] !== props2.onSelect || $[7] !== props2.selected) {
|
|
63317
63325
|
let t42;
|
|
@@ -63329,7 +63337,7 @@ function CalendarMonth(props2) {
|
|
|
63329
63337
|
let t5;
|
|
63330
63338
|
return $[17] !== t0 || $[18] !== t4 ? (t5 = /* @__PURE__ */ jsx(Box, { "aria-hidden": t0, "data-ui": "CalendarMonth", children: t4 }), $[17] = t0, $[18] = t4, $[19] = t5) : t5 = $[19], t5;
|
|
63331
63339
|
}
|
|
63332
|
-
function _temp$
|
|
63340
|
+
function _temp$1a(weekday) {
|
|
63333
63341
|
return /* @__PURE__ */ jsx(Box, { paddingY: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, weight: "medium", style: {
|
|
63334
63342
|
textAlign: "center"
|
|
63335
63343
|
}, children: weekday }) }, weekday);
|
|
@@ -63474,9 +63482,9 @@ const features = {
|
|
|
63474
63482
|
}, children: [
|
|
63475
63483
|
/* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
63476
63484
|
/* @__PURE__ */ jsxs(Flex, { align: "center", flex: 1, children: [
|
|
63477
|
-
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Select$1, { "aria-label": "Select hour", value: selectedDate?.getHours(), onChange: handleHoursChange, children: HOURS_24.map(_temp$
|
|
63485
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Select$1, { "aria-label": "Select hour", value: selectedDate?.getHours(), onChange: handleHoursChange, children: HOURS_24.map(_temp$19) }) }),
|
|
63478
63486
|
/* @__PURE__ */ jsx(Box, { paddingX: 1, children: /* @__PURE__ */ jsx(Text$1, { children: ":" }) }),
|
|
63479
|
-
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Select$1, { "aria-label": "Select minutes", value: selectedDate?.getMinutes(), onChange: handleMinutesChange, children: range(0, 60, timeStep).map(_temp2$
|
|
63487
|
+
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Select$1, { "aria-label": "Select minutes", value: selectedDate?.getMinutes(), onChange: handleMinutesChange, children: range(0, 60, timeStep).map(_temp2$r) }) })
|
|
63480
63488
|
] }),
|
|
63481
63489
|
/* @__PURE__ */ jsx(Box, { marginLeft: 2, children: /* @__PURE__ */ jsx(Button$2, { text: "Set to current time", mode: "bleed", onClick: handleNowClick }) })
|
|
63482
63490
|
] }),
|
|
@@ -63503,7 +63511,7 @@ function CalendarMonthSelect(props2) {
|
|
|
63503
63511
|
let t2;
|
|
63504
63512
|
$[4] !== handlePrevMonthClick ? (t2 = /* @__PURE__ */ jsx(Button$2, { "aria-label": "Go to previous month", onClick: handlePrevMonthClick, mode: "bleed", icon: ChevronLeftIcon, paddingX: 2, radius: 0 }), $[4] = handlePrevMonthClick, $[5] = t2) : t2 = $[5];
|
|
63505
63513
|
let t3;
|
|
63506
|
-
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = MONTH_NAMES.map(_temp3$
|
|
63514
|
+
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = MONTH_NAMES.map(_temp3$c), $[6] = t3) : t3 = $[6];
|
|
63507
63515
|
let t4;
|
|
63508
63516
|
$[7] !== onChange || $[8] !== value ? (t4 = /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Select$1, { radius: 0, value, onChange, children: t3 }) }), $[7] = onChange, $[8] = value, $[9] = t4) : t4 = $[9];
|
|
63509
63517
|
let t5;
|
|
@@ -63515,7 +63523,7 @@ function CalendarMonthSelect(props2) {
|
|
|
63515
63523
|
t5
|
|
63516
63524
|
] }), $[12] = t2, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15], t6;
|
|
63517
63525
|
}
|
|
63518
|
-
function _temp3$
|
|
63526
|
+
function _temp3$c(m, i) {
|
|
63519
63527
|
return /* @__PURE__ */ jsx("option", { value: i, children: m }, i);
|
|
63520
63528
|
}
|
|
63521
63529
|
function CalendarYearSelect(props2) {
|
|
@@ -63547,10 +63555,10 @@ function CalendarYearSelect(props2) {
|
|
|
63547
63555
|
t5
|
|
63548
63556
|
] }), $[12] = t2, $[13] = t4, $[14] = t5, $[15] = t6) : t6 = $[15], t6;
|
|
63549
63557
|
}
|
|
63550
|
-
function _temp$
|
|
63558
|
+
function _temp$19(h) {
|
|
63551
63559
|
return /* @__PURE__ */ jsx("option", { value: h, children: `${h}`.padStart(2, "0") }, h);
|
|
63552
63560
|
}
|
|
63553
|
-
function _temp2$
|
|
63561
|
+
function _temp2$r(m_1) {
|
|
63554
63562
|
return /* @__PURE__ */ jsx("option", { value: m_1, children: `${m_1}`.padStart(2, "0") }, m_1);
|
|
63555
63563
|
}
|
|
63556
63564
|
const DatePicker = forwardRef(function(props2, ref) {
|
|
@@ -63676,7 +63684,7 @@ const DatePicker = forwardRef(function(props2, ref) {
|
|
|
63676
63684
|
$[32] !== deserialize2 || $[33] !== formatInputValue || $[34] !== localValue || $[35] !== parseInputValue || $[36] !== value ? (parseResult = localValue ? parseInputValue(localValue) : value ? deserialize2(value) : null, t5 = localValue || (parseResult?.isValid ? formatInputValue(parseResult.date) : value), $[32] = deserialize2, $[33] = formatInputValue, $[34] = localValue, $[35] = parseInputValue, $[36] = value, $[37] = parseResult, $[38] = t5) : (parseResult = $[37], t5 = $[38]);
|
|
63677
63685
|
const inputValue = t5;
|
|
63678
63686
|
let t6;
|
|
63679
|
-
$[39] !== markers ? (t6 = markers.map(_temp$
|
|
63687
|
+
$[39] !== markers ? (t6 = markers.map(_temp$18), $[39] = markers, $[40] = t6) : t6 = $[40];
|
|
63680
63688
|
const nodeValidations = t6;
|
|
63681
63689
|
let t7;
|
|
63682
63690
|
$[41] !== nodeValidations || $[42] !== parseResult ? (t7 = parseResult?.error ? [...nodeValidations, {
|
|
@@ -63691,7 +63699,7 @@ const DatePicker = forwardRef(function(props2, ref) {
|
|
|
63691
63699
|
let t10;
|
|
63692
63700
|
return $[60] !== description || $[61] !== id2 || $[62] !== level || $[63] !== t7 || $[64] !== t9 || $[65] !== title ? (t10 = /* @__PURE__ */ jsx(FormField, { validation: t7, title, level, description, inputId: id2, path: t8, children: t9 }), $[60] = description, $[61] = id2, $[62] = level, $[63] = t7, $[64] = t9, $[65] = title, $[66] = t10) : t10 = $[66], t10;
|
|
63693
63701
|
});
|
|
63694
|
-
function _temp$
|
|
63702
|
+
function _temp$18(m) {
|
|
63695
63703
|
return {
|
|
63696
63704
|
level: m.level,
|
|
63697
63705
|
path: m.path,
|
|
@@ -64074,7 +64082,7 @@ function useScheduleOperation() {
|
|
|
64074
64082
|
schedules: schedules2
|
|
64075
64083
|
} = t42, displayToast_1 = t52 === void 0 ? !0 : t52;
|
|
64076
64084
|
await (async () => {
|
|
64077
|
-
const scheduleIds = schedules2.map(_temp$
|
|
64085
|
+
const scheduleIds = schedules2.map(_temp$17), response = await api.deleteMultiple({
|
|
64078
64086
|
scheduleIds
|
|
64079
64087
|
}), {
|
|
64080
64088
|
fulfilledIds,
|
|
@@ -64185,7 +64193,7 @@ function useScheduleOperation() {
|
|
|
64185
64193
|
updateSchedule
|
|
64186
64194
|
}, $[18] = createSchedule, $[19] = deleteSchedule, $[20] = deleteSchedules, $[21] = publishSchedule, $[22] = updateSchedule, $[23] = t6) : t6 = $[23], t6;
|
|
64187
64195
|
}
|
|
64188
|
-
function _temp$
|
|
64196
|
+
function _temp$17(schedule_0) {
|
|
64189
64197
|
return schedule_0.id;
|
|
64190
64198
|
}
|
|
64191
64199
|
function useScheduleBaseUrl() {
|
|
@@ -65236,9 +65244,9 @@ const DocumentPreview$1 = (props2) => {
|
|
|
65236
65244
|
schedules: schedules2
|
|
65237
65245
|
} = props2;
|
|
65238
65246
|
let t0;
|
|
65239
|
-
return $[0] !== schedules2 ? (t0 = /* @__PURE__ */ jsx(Stack, { space: 4, children: schedules2.length === 0 ? /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: "No schedules" }) }) : /* @__PURE__ */ jsx(Stack, { space: 2, children: schedules2.map(_temp$
|
|
65247
|
+
return $[0] !== schedules2 ? (t0 = /* @__PURE__ */ jsx(Stack, { space: 4, children: schedules2.length === 0 ? /* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: "No schedules" }) }) : /* @__PURE__ */ jsx(Stack, { space: 2, children: schedules2.map(_temp$16) }) }), $[0] = schedules2, $[1] = t0) : t0 = $[1], t0;
|
|
65240
65248
|
};
|
|
65241
|
-
function _temp$
|
|
65249
|
+
function _temp$16(schedule) {
|
|
65242
65250
|
return /* @__PURE__ */ jsx(ScheduleItem, { schedule, type: "document" }, schedule.id);
|
|
65243
65251
|
}
|
|
65244
65252
|
const debug$6 = debugWithName$1("ScheduleAction"), useScheduleAction = (props2) => {
|
|
@@ -65488,14 +65496,14 @@ function useTasks() {
|
|
|
65488
65496
|
let t0;
|
|
65489
65497
|
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
65490
65498
|
activeDocument: null,
|
|
65491
|
-
setActiveDocument: _temp$
|
|
65499
|
+
setActiveDocument: _temp$15,
|
|
65492
65500
|
data: [],
|
|
65493
65501
|
isLoading: !1
|
|
65494
65502
|
}, $[0] = t0) : t0 = $[0], t0;
|
|
65495
65503
|
}
|
|
65496
65504
|
return context;
|
|
65497
65505
|
}
|
|
65498
|
-
function _temp$
|
|
65506
|
+
function _temp$15() {
|
|
65499
65507
|
return null;
|
|
65500
65508
|
}
|
|
65501
65509
|
function useTasksUpsell() {
|
|
@@ -66070,7 +66078,18 @@ function resolveSource$1({
|
|
|
66070
66078
|
const variantsEnabled = variantsEnabledReducer({
|
|
66071
66079
|
config,
|
|
66072
66080
|
initialValue: !1
|
|
66073
|
-
})
|
|
66081
|
+
}), schemaDescriptorId = authenticated ? (async () => {
|
|
66082
|
+
const studioClient = getClient2(DEFAULT_STUDIO_CLIENT_OPTIONS);
|
|
66083
|
+
if (!await fetchCanDeployStudio(studioClient)) {
|
|
66084
|
+
debug$4("Skipping schema upload: user lacks the deployStudio grant");
|
|
66085
|
+
return;
|
|
66086
|
+
}
|
|
66087
|
+
return uploadSchema(schema2, studioClient);
|
|
66088
|
+
})().catch((err) => {
|
|
66089
|
+
debug$4("Uploading schema failed", {
|
|
66090
|
+
err
|
|
66091
|
+
});
|
|
66092
|
+
}) : Promise.resolve(void 0);
|
|
66074
66093
|
return {
|
|
66075
66094
|
type: "source",
|
|
66076
66095
|
name: config.name,
|
|
@@ -66244,11 +66263,7 @@ function resolveSource$1({
|
|
|
66244
66263
|
i18next: i18n.i18next,
|
|
66245
66264
|
staticInitialValueTemplateItems,
|
|
66246
66265
|
options: config,
|
|
66247
|
-
schemaDescriptorId
|
|
66248
|
-
debug$4("Uploading schema failed", {
|
|
66249
|
-
err
|
|
66250
|
-
});
|
|
66251
|
-
}) : Promise.resolve(void 0)
|
|
66266
|
+
schemaDescriptorId
|
|
66252
66267
|
},
|
|
66253
66268
|
onUncaughtError: (error, errorInfo) => onUncaughtErrorResolver({
|
|
66254
66269
|
config,
|
|
@@ -66350,9 +66365,6 @@ function getRootPath(basePath) {
|
|
|
66350
66365
|
function joinBasePath(rootPath, basePath) {
|
|
66351
66366
|
return `/${[rootPath, basePath || ""].map((path) => path.replace(/^\/+/g, "").replace(/\/+$/g, "")).filter(Boolean).join("/")}`;
|
|
66352
66367
|
}
|
|
66353
|
-
function catchTap(promise, cb) {
|
|
66354
|
-
return promise.catch(cb), promise;
|
|
66355
|
-
}
|
|
66356
66368
|
function resolveConfig(config) {
|
|
66357
66369
|
const {
|
|
66358
66370
|
workspaces
|
|
@@ -66592,12 +66604,12 @@ function useSyncPathnameWithWorkspace(history2, _workspaces, workspaceAuthStates
|
|
|
66592
66604
|
getSnapshot: t3,
|
|
66593
66605
|
getServerSnapshot: t4,
|
|
66594
66606
|
selector: t5,
|
|
66595
|
-
isEqual: _temp$
|
|
66607
|
+
isEqual: _temp$14
|
|
66596
66608
|
}, $[14] = t2, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6) : t6 = $[18];
|
|
66597
66609
|
const store = t6;
|
|
66598
66610
|
return useSyncExternalStoreWithSelector(store.subscribe, store.getSnapshot, store.getServerSnapshot, store.selector, store.isEqual);
|
|
66599
66611
|
}
|
|
66600
|
-
function _temp$
|
|
66612
|
+
function _temp$14(a, b) {
|
|
66601
66613
|
if (a.type !== b.type)
|
|
66602
66614
|
return !1;
|
|
66603
66615
|
switch (a.type) {
|
|
@@ -66808,7 +66820,7 @@ function ColorSchemeLocalStorageProvider(t0) {
|
|
|
66808
66820
|
const $ = c(10), {
|
|
66809
66821
|
children,
|
|
66810
66822
|
onSchemeChange
|
|
66811
|
-
} = t0, scheme = useSyncExternalStore(subscribe, getSnapshot, _temp$
|
|
66823
|
+
} = t0, scheme = useSyncExternalStore(subscribe, getSnapshot, _temp$13);
|
|
66812
66824
|
let t1, t2;
|
|
66813
66825
|
$[0] !== onSchemeChange || $[1] !== scheme ? (t1 = () => {
|
|
66814
66826
|
typeof onSchemeChange == "function" && onSchemeChange(scheme), localStorage.setItem(LOCAL_STORAGE_KEY, scheme);
|
|
@@ -66818,7 +66830,7 @@ function ColorSchemeLocalStorageProvider(t0) {
|
|
|
66818
66830
|
let t4;
|
|
66819
66831
|
return $[7] !== scheme || $[8] !== t3 ? (t4 = /* @__PURE__ */ jsx(ColorSchemeSetValueContext.Provider, { value: setSnapshot, children: /* @__PURE__ */ jsx(ColorSchemeValueContext.Provider, { value: scheme, children: t3 }) }), $[7] = scheme, $[8] = t3, $[9] = t4) : t4 = $[9], t4;
|
|
66820
66832
|
}
|
|
66821
|
-
function _temp$
|
|
66833
|
+
function _temp$13() {
|
|
66822
66834
|
return "system";
|
|
66823
66835
|
}
|
|
66824
66836
|
function ColorSchemeCustomProvider(t0) {
|
|
@@ -66853,7 +66865,7 @@ function useColorSchemeValue() {
|
|
|
66853
66865
|
function useColorScheme() {
|
|
66854
66866
|
const $ = c(4);
|
|
66855
66867
|
let t0;
|
|
66856
|
-
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0], useEffect(_temp2$
|
|
66868
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = [], $[0] = t0) : t0 = $[0], useEffect(_temp2$q, t0);
|
|
66857
66869
|
const scheme = useColorSchemeValue(), setScheme = useColorSchemeSetValue();
|
|
66858
66870
|
let t1;
|
|
66859
66871
|
return $[1] !== scheme || $[2] !== setScheme ? (t1 = {
|
|
@@ -66861,7 +66873,7 @@ function useColorScheme() {
|
|
|
66861
66873
|
setScheme
|
|
66862
66874
|
}, $[1] = scheme, $[2] = setScheme, $[3] = t1) : t1 = $[3], t1;
|
|
66863
66875
|
}
|
|
66864
|
-
function _temp2$
|
|
66876
|
+
function _temp2$q() {
|
|
66865
66877
|
console.warn("useColorScheme() is deprecated, use useColorSchemeValue() or useColorSchemeSetValue() instead");
|
|
66866
66878
|
}
|
|
66867
66879
|
function useColorSchemeOptions(setScheme, t) {
|
|
@@ -67675,7 +67687,7 @@ function DocumentTypesPopoverContent() {
|
|
|
67675
67687
|
return index;
|
|
67676
67688
|
}
|
|
67677
67689
|
}, $[4] = documentTypeItems, $[5] = t5) : t5 = $[5];
|
|
67678
|
-
const getItemKey2 = t5, renderItem2 = _temp$
|
|
67690
|
+
const getItemKey2 = t5, renderItem2 = _temp$12;
|
|
67679
67691
|
let t6;
|
|
67680
67692
|
$[6] !== documentTypeItems ? (t6 = (index_0) => documentTypeItems[index_0].type !== "item", $[6] = documentTypeItems, $[7] = t6) : t6 = $[7];
|
|
67681
67693
|
const getItemDisabled = t6;
|
|
@@ -67709,7 +67721,7 @@ function DocumentTypesPopoverContent() {
|
|
|
67709
67721
|
t13
|
|
67710
67722
|
] }), $[33] = t12, $[34] = t13, $[35] = t9, $[36] = t14) : t14 = $[36], t14;
|
|
67711
67723
|
}
|
|
67712
|
-
function _temp$
|
|
67724
|
+
function _temp$12(item) {
|
|
67713
67725
|
return item.type === "divider" ? /* @__PURE__ */ jsx(Box, { paddingY: 1, children: /* @__PURE__ */ jsx(MenuDivider, {}) }) : item.type === "header" ? /* @__PURE__ */ jsx(Box, { margin: 2, padding: 1, children: /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, weight: "medium", children: item.title }) }) : item.type === "item" ? /* @__PURE__ */ jsx(DocumentTypeFilterItem, { paddingBottom: 1, selected: item.selected, type: item.item }) : null;
|
|
67714
67726
|
}
|
|
67715
67727
|
function ClearButton(t0) {
|
|
@@ -68543,7 +68555,7 @@ function useRecentSearchesStore() {
|
|
|
68543
68555
|
let t5;
|
|
68544
68556
|
return $[11] !== fieldDefinitions || $[12] !== filterDefinitions2 || $[13] !== operatorDefinitions2 || $[14] !== schema2 || $[15] !== setStoredSearch || $[16] !== storedSearch ? (t5 = {
|
|
68545
68557
|
addSearch: (searchTerm, searchFilters) => {
|
|
68546
|
-
const validStoredFilters = (searchFilters || []).map(_temp$
|
|
68558
|
+
const validStoredFilters = (searchFilters || []).map(_temp$11).filter((filter_0) => validateFilter({
|
|
68547
68559
|
fieldDefinitions,
|
|
68548
68560
|
filter: filter_0,
|
|
68549
68561
|
filterDefinitions: filterDefinitions2,
|
|
@@ -68553,7 +68565,7 @@ function useRecentSearchesStore() {
|
|
|
68553
68565
|
filters: validStoredFilters,
|
|
68554
68566
|
terms: {
|
|
68555
68567
|
query: searchTerm.query.trim(),
|
|
68556
|
-
typeNames: searchTerm.types.map(_temp2$
|
|
68568
|
+
typeNames: searchTerm.types.map(_temp2$p)
|
|
68557
68569
|
}
|
|
68558
68570
|
}, newRecent = {
|
|
68559
68571
|
version: RECENT_SEARCH_VERSION,
|
|
@@ -68615,10 +68627,10 @@ function useRecentSearchesStore() {
|
|
|
68615
68627
|
}
|
|
68616
68628
|
}, $[11] = fieldDefinitions, $[12] = filterDefinitions2, $[13] = operatorDefinitions2, $[14] = schema2, $[15] = setStoredSearch, $[16] = storedSearch, $[17] = t5) : t5 = $[17], t5;
|
|
68617
68629
|
}
|
|
68618
|
-
function _temp2$
|
|
68630
|
+
function _temp2$p(s) {
|
|
68619
68631
|
return s.name;
|
|
68620
68632
|
}
|
|
68621
|
-
function _temp$
|
|
68633
|
+
function _temp$11(filter2) {
|
|
68622
68634
|
return {
|
|
68623
68635
|
fieldId: filter2.fieldId,
|
|
68624
68636
|
filterName: filter2.filterName,
|
|
@@ -68679,12 +68691,12 @@ function Instructions() {
|
|
|
68679
68691
|
} = useTranslation();
|
|
68680
68692
|
let t0;
|
|
68681
68693
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
68682
|
-
ControlsIcon: _temp$
|
|
68694
|
+
ControlsIcon: _temp$10
|
|
68683
68695
|
}, $[0] = t0) : t0 = $[0];
|
|
68684
68696
|
let t1;
|
|
68685
68697
|
return $[1] !== t ? (t1 = /* @__PURE__ */ jsx(Flex, { align: "center", direction: "column", gap: 4, paddingX: 4, paddingY: 5, children: /* @__PURE__ */ jsx(Inline, { space: 3, children: /* @__PURE__ */ jsx(Text$1, { muted: !0, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "search.instructions", components: t0 }) }) }) }), $[1] = t, $[2] = t1) : t1 = $[2], t1;
|
|
68686
68698
|
}
|
|
68687
|
-
function _temp$
|
|
68699
|
+
function _temp$10() {
|
|
68688
68700
|
return /* @__PURE__ */ jsx(ControlsIcon, { style: {
|
|
68689
68701
|
padding: "0 0.25rem"
|
|
68690
68702
|
} }, 0);
|
|
@@ -68778,7 +68790,7 @@ function RecentSearchItem(t0) {
|
|
|
68778
68790
|
let t6;
|
|
68779
68791
|
$[16] !== availableCharacters || $[17] !== value.types ? (t6 = value.types.length > 0 && /* @__PURE__ */ jsx(SearchItemPillsBox, { children: /* @__PURE__ */ jsx(DocumentTypesPill, { availableCharacters, types: value.types }) }), $[16] = availableCharacters, $[17] = value.types, $[18] = t6) : t6 = $[18];
|
|
68780
68792
|
let t7;
|
|
68781
|
-
$[19] !== value.filters ? (t7 = value?.filters?.map(_temp
|
|
68793
|
+
$[19] !== value.filters ? (t7 = value?.filters?.map(_temp$$), $[19] = value.filters, $[20] = t7) : t7 = $[20];
|
|
68782
68794
|
let t8;
|
|
68783
68795
|
$[21] !== t5 || $[22] !== t6 || $[23] !== t7 ? (t8 = /* @__PURE__ */ jsxs(Flex, { align: "stretch", flex: 1, gap: 2, justify: "flex-start", marginLeft: 3, wrap: "wrap", children: [
|
|
68784
68796
|
t5,
|
|
@@ -68800,7 +68812,7 @@ function RecentSearchItem(t0) {
|
|
|
68800
68812
|
let t13;
|
|
68801
68813
|
return $[34] !== rest || $[35] !== t12 ? (t13 = /* @__PURE__ */ jsx(Box, { ...rest, children: t12 }), $[34] = rest, $[35] = t12, $[36] = t13) : t13 = $[36], t13;
|
|
68802
68814
|
}
|
|
68803
|
-
function _temp
|
|
68815
|
+
function _temp$$(filter2, i) {
|
|
68804
68816
|
return /* @__PURE__ */ jsx(FilterPill, { filter: filter2 }, i);
|
|
68805
68817
|
}
|
|
68806
68818
|
const VIRTUAL_LIST_RECENT_SEARCH_ITEM_HEIGHT = 36, MAX_COMBINED_TYPE_COUNT_SMALL = 20, MAX_COMBINED_TYPE_COUNT_LARGE = 40, RecentSearchesBox = styled(Card).withConfig({
|
|
@@ -69023,7 +69035,7 @@ function SortMenu() {
|
|
|
69023
69035
|
$[25] !== T0 || $[26] !== t5 || $[27] !== t6 || $[28] !== t7 ? (t13 = /* @__PURE__ */ jsx(T0, { mode: t5, icon: t6, text: t7 }), $[25] = T0, $[26] = t5, $[27] = t6, $[28] = t7, $[29] = t13) : t13 = $[29];
|
|
69024
69036
|
const t14 = menuButtonId || "";
|
|
69025
69037
|
let t15;
|
|
69026
|
-
$[30] !== menuOrderings ? (t15 = /* @__PURE__ */ jsx(Menu, { children: menuOrderings.map(_temp
|
|
69038
|
+
$[30] !== menuOrderings ? (t15 = /* @__PURE__ */ jsx(Menu, { children: menuOrderings.map(_temp$_) }), $[30] = menuOrderings, $[31] = t15) : t15 = $[31];
|
|
69027
69039
|
let t16;
|
|
69028
69040
|
$[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t16 = {
|
|
69029
69041
|
placement: "bottom-start",
|
|
@@ -69037,7 +69049,7 @@ function SortMenu() {
|
|
|
69037
69049
|
let t19;
|
|
69038
69050
|
return $[44] !== T3 || $[45] !== t11 || $[46] !== t18 ? (t19 = /* @__PURE__ */ jsx(T3, { borderBottom: t11, children: t18 }), $[44] = T3, $[45] = t11, $[46] = t18, $[47] = t19) : t19 = $[47], t19;
|
|
69039
69051
|
}
|
|
69040
|
-
function _temp
|
|
69052
|
+
function _temp$_(item_0, index) {
|
|
69041
69053
|
return isSearchDivider(item_0) ? /* @__PURE__ */ jsx(MenuDivider, {}, index) : /* @__PURE__ */ jsx(CustomMenuItem, { ordering: item_0 }, index);
|
|
69042
69054
|
}
|
|
69043
69055
|
const DebugScoreCard = styled(Card).withConfig({
|
|
@@ -69054,8 +69066,8 @@ function DebugOverlay(t0) {
|
|
|
69054
69066
|
score <= 0.1 ? tone = "critical" : score >= 0.5 && (tone = "primary");
|
|
69055
69067
|
let T0, T1, t1, t2;
|
|
69056
69068
|
if ($[0] !== data.stories) {
|
|
69057
|
-
const matchingStories = data.stories.filter(_temp$
|
|
69058
|
-
T1 = Tooltip, T0 = Stack, t1 = 2, t2 = matchingStories.length ? /* @__PURE__ */ jsx(Fragment$1, { children: matchingStories.map(_temp2$
|
|
69069
|
+
const matchingStories = data.stories.filter(_temp$Z);
|
|
69070
|
+
T1 = Tooltip, T0 = Stack, t1 = 2, t2 = matchingStories.length ? /* @__PURE__ */ jsx(Fragment$1, { children: matchingStories.map(_temp2$o) }) : /* @__PURE__ */ jsx(Code, { size: 0, children: "No matches" }), $[0] = data.stories, $[1] = T0, $[2] = T1, $[3] = t1, $[4] = t2;
|
|
69059
69071
|
} else
|
|
69060
69072
|
T0 = $[1], T1 = $[2], t1 = $[3], t2 = $[4];
|
|
69061
69073
|
let t3;
|
|
@@ -69070,13 +69082,13 @@ function DebugOverlay(t0) {
|
|
|
69070
69082
|
let t6;
|
|
69071
69083
|
return $[14] !== T1 || $[15] !== t3 || $[16] !== t5 ? (t6 = /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(T1, { content: t3, placement: "bottom-start", portal: !0, children: t5 }) }), $[14] = T1, $[15] = t3, $[16] = t5, $[17] = t6) : t6 = $[17], t6;
|
|
69072
69084
|
}
|
|
69073
|
-
function _temp2$
|
|
69085
|
+
function _temp2$o(story_0) {
|
|
69074
69086
|
return /* @__PURE__ */ jsxs(Inline, { space: 3, children: [
|
|
69075
69087
|
/* @__PURE__ */ jsx(Code, { size: 0, weight: "medium", children: story_0.path }),
|
|
69076
69088
|
/* @__PURE__ */ jsx(Code, { size: 0, children: story_0.why })
|
|
69077
69089
|
] }, story_0.path);
|
|
69078
69090
|
}
|
|
69079
|
-
function _temp$
|
|
69091
|
+
function _temp$Z(story) {
|
|
69080
69092
|
return story.score > 0;
|
|
69081
69093
|
}
|
|
69082
69094
|
const VIRTUAL_LIST_SEARCH_RESULT_ITEM_HEIGHT = 57, VIRTUAL_LIST_OVERSCAN = 4, SearchResultsInnerFlex = styled(Flex).withConfig({
|
|
@@ -69939,7 +69951,7 @@ function ReleasesToolLink() {
|
|
|
69939
69951
|
errorCount$
|
|
69940
69952
|
} = useReleasesStore(), hasError = useObservable(errorCount$) !== 0, {
|
|
69941
69953
|
selectedPerspective
|
|
69942
|
-
} = usePerspective(), activeToolName = useRouterState(_temp$
|
|
69954
|
+
} = usePerspective(), activeToolName = useRouterState(_temp$Y);
|
|
69943
69955
|
let t0;
|
|
69944
69956
|
$[0] !== t ? (t0 = t("release.navbar.tooltip"), $[0] = t, $[1] = t0) : t0 = $[1];
|
|
69945
69957
|
let t1;
|
|
@@ -69954,7 +69966,7 @@ function ReleasesToolLink() {
|
|
|
69954
69966
|
let t5;
|
|
69955
69967
|
return $[10] !== t0 || $[11] !== t4 ? (t5 = /* @__PURE__ */ jsx(Tooltip, { content: t0, children: t4 }), $[10] = t0, $[11] = t4, $[12] = t5) : t5 = $[12], t5;
|
|
69956
69968
|
}
|
|
69957
|
-
function _temp$
|
|
69969
|
+
function _temp$Y(routerState) {
|
|
69958
69970
|
return typeof routerState.tool == "string" ? routerState.tool : void 0;
|
|
69959
69971
|
}
|
|
69960
69972
|
function AnimatedTextWidth(t0) {
|
|
@@ -70089,7 +70101,7 @@ function CreateReleaseDialog(props2) {
|
|
|
70089
70101
|
const releaseValue = createReleaseMetadata(release);
|
|
70090
70102
|
await createRelease(releaseValue), onCancel(), telemetry.log(CreatedRelease, {
|
|
70091
70103
|
origin
|
|
70092
|
-
}), await new Promise(_temp$
|
|
70104
|
+
}), await new Promise(_temp$X), setPerspective(getReleaseIdFromReleaseDocumentId(release._id)), onSubmit(getReleaseIdFromReleaseDocumentId(release._id));
|
|
70093
70105
|
} catch (t22) {
|
|
70094
70106
|
const err = t22;
|
|
70095
70107
|
isReleaseLimitError(err) ? (onCancel(), clearReleaseDataFromStorage()) : (console.error(err), toast.push({
|
|
@@ -70130,7 +70142,7 @@ function CreateReleaseDialog(props2) {
|
|
|
70130
70142
|
let t10;
|
|
70131
70143
|
return $[33] !== dialogTitle || $[34] !== handleOnClose || $[35] !== onCancel || $[36] !== t9 ? (t10 = /* @__PURE__ */ jsx(Dialog$1, { onClickOutside: onCancel, header: dialogTitle, id: "create-release-dialog", onClose: handleOnClose, width: 1, padding: !1, children: t9 }), $[33] = dialogTitle, $[34] = handleOnClose, $[35] = onCancel, $[36] = t9, $[37] = t10) : t10 = $[37], t10;
|
|
70132
70144
|
}
|
|
70133
|
-
function _temp$
|
|
70145
|
+
function _temp$X(resolve) {
|
|
70134
70146
|
return setTimeout(resolve, 1e3);
|
|
70135
70147
|
}
|
|
70136
70148
|
const iconStyle = {
|
|
@@ -70628,7 +70640,7 @@ function ReleasesList(t0) {
|
|
|
70628
70640
|
bundles: agentBundles
|
|
70629
70641
|
} = useAgentBundles();
|
|
70630
70642
|
let t1;
|
|
70631
|
-
$[0] !== allReleases ? (t1 = allReleases.filter(_temp$
|
|
70643
|
+
$[0] !== allReleases ? (t1 = allReleases.filter(_temp$W), $[0] = allReleases, $[1] = t1) : t1 = $[1];
|
|
70632
70644
|
const releases2 = t1, {
|
|
70633
70645
|
document: t2
|
|
70634
70646
|
} = useWorkspace(), {
|
|
@@ -70717,7 +70729,7 @@ function ReleasesList(t0) {
|
|
|
70717
70729
|
t14
|
|
70718
70730
|
] }), $[49] = t10, $[50] = t11, $[51] = t14, $[52] = t9, $[53] = t15) : t15 = $[53], t15;
|
|
70719
70731
|
}
|
|
70720
|
-
function _temp$
|
|
70732
|
+
function _temp$W(release) {
|
|
70721
70733
|
return !isCardinalityOneRelease(release);
|
|
70722
70734
|
}
|
|
70723
70735
|
function findScrollableAncestor(element) {
|
|
@@ -71391,7 +71403,7 @@ function Layout(props2) {
|
|
|
71391
71403
|
let t7;
|
|
71392
71404
|
$[15] !== prefersDark ? (t7 = /* @__PURE__ */ jsx(Text$1, { size: 3, children: /* @__PURE__ */ jsx(SanityLogo, { dark: prefersDark }) }), $[15] = prefersDark, $[16] = t7) : t7 = $[16];
|
|
71393
71405
|
let t8;
|
|
71394
|
-
$[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t8 = /* @__PURE__ */ jsx(Flex, { align: "center", gap: 2, children: LINKS.map(_temp$
|
|
71406
|
+
$[17] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t8 = /* @__PURE__ */ jsx(Flex, { align: "center", gap: 2, children: LINKS.map(_temp$V) }), $[17] = t8) : t8 = $[17];
|
|
71395
71407
|
let t9;
|
|
71396
71408
|
$[18] !== t7 ? (t9 = /* @__PURE__ */ jsxs(Flex, { direction: "column", gap: 4, justify: "center", align: "center", paddingBottom: 4, children: [
|
|
71397
71409
|
t7,
|
|
@@ -71403,7 +71415,7 @@ function Layout(props2) {
|
|
|
71403
71415
|
t9
|
|
71404
71416
|
] }), $[20] = t6, $[21] = t9, $[22] = t10) : t10 = $[22], t10;
|
|
71405
71417
|
}
|
|
71406
|
-
function _temp$
|
|
71418
|
+
function _temp$V(link, index) {
|
|
71407
71419
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
71408
71420
|
/* @__PURE__ */ jsx(StyledText, { muted: !0, size: 1, children: /* @__PURE__ */ jsx("a", { href: link.url, target: "_blank", rel: "noopener noreferrer", children: link.title }) }),
|
|
71409
71421
|
index < LINKS.length - 1 && /* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: "\u2022" })
|
|
@@ -71593,18 +71605,18 @@ function useCanInviteProjectMembers(opts) {
|
|
|
71593
71605
|
enabled: t1
|
|
71594
71606
|
} = t0, enabled = t1 === void 0 ? !0 : t1, projectStore = useProjectStore();
|
|
71595
71607
|
let t2;
|
|
71596
|
-
$[2] !== projectStore ? (t2 = projectStore.getGrants().pipe(map$1(_temp3$
|
|
71608
|
+
$[2] !== projectStore ? (t2 = projectStore.getGrants().pipe(map$1(_temp3$b)), $[2] = projectStore, $[3] = t2) : t2 = $[3];
|
|
71597
71609
|
const result$ = t2;
|
|
71598
71610
|
let t3;
|
|
71599
71611
|
return $[4] !== enabled || $[5] !== result$ ? (t3 = enabled ? result$ : of(!1), $[4] = enabled, $[5] = result$, $[6] = t3) : t3 = $[6], useObservable(t3, !1);
|
|
71600
71612
|
}
|
|
71601
|
-
function _temp3$
|
|
71602
|
-
return !!grants[PERMISSION_NAME]?.some(_temp2$
|
|
71613
|
+
function _temp3$b(grants) {
|
|
71614
|
+
return !!grants[PERMISSION_NAME]?.some(_temp2$n);
|
|
71603
71615
|
}
|
|
71604
|
-
function _temp2$
|
|
71605
|
-
return p.grants.some(_temp$
|
|
71616
|
+
function _temp2$n(p) {
|
|
71617
|
+
return p.grants.some(_temp$U);
|
|
71606
71618
|
}
|
|
71607
|
-
function _temp$
|
|
71619
|
+
function _temp$U(g) {
|
|
71608
71620
|
return g.name === GRANT_NAME;
|
|
71609
71621
|
}
|
|
71610
71622
|
function ManageMenu$1(t0) {
|
|
@@ -71708,7 +71720,7 @@ function WorkspaceMenuButton() {
|
|
|
71708
71720
|
const stackRef = t0;
|
|
71709
71721
|
let t1;
|
|
71710
71722
|
$[1] !== visibleWorkspaces ? (t1 = () => {
|
|
71711
|
-
visibleWorkspaces.forEach(_temp$
|
|
71723
|
+
visibleWorkspaces.forEach(_temp$T);
|
|
71712
71724
|
}, $[1] = visibleWorkspaces, $[2] = t1) : t1 = $[2];
|
|
71713
71725
|
const handlePreload = t1;
|
|
71714
71726
|
let t2;
|
|
@@ -71756,7 +71768,7 @@ function WorkspaceMenuButton() {
|
|
|
71756
71768
|
let t13;
|
|
71757
71769
|
return $[27] !== t12 || $[28] !== t7 ? (t13 = /* @__PURE__ */ jsx(MenuButton, { button: t7, id: "workspace-menu", menu: t12, popover: POPOVER_PROPS }), $[27] = t12, $[28] = t7, $[29] = t13) : t13 = $[29], t13;
|
|
71758
71770
|
}
|
|
71759
|
-
function _temp$
|
|
71771
|
+
function _temp$T(workspace) {
|
|
71760
71772
|
probeWorkspaceAuth({
|
|
71761
71773
|
projectId: workspace.projectId,
|
|
71762
71774
|
dataset: workspace.dataset,
|
|
@@ -71804,7 +71816,7 @@ function CorsOriginErrorScreen(props2) {
|
|
|
71804
71816
|
t1 = $[5];
|
|
71805
71817
|
const registerUrl = t1;
|
|
71806
71818
|
let t2;
|
|
71807
|
-
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[6] = t2) : t2 = $[6], useEffect(_temp2$
|
|
71819
|
+
$[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = [], $[6] = t2) : t2 = $[6], useEffect(_temp2$m, t2);
|
|
71808
71820
|
let t3, t4;
|
|
71809
71821
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsx(Heading, { as: "h1", size: 2, children: "Connect this studio to your project" }), t4 = /* @__PURE__ */ jsx(Text$1, { size: 2, muted: !0, children: "This studio is not registered and cannot access your content yet. Choose how you want to connect it." }), $[7] = t3, $[8] = t4) : (t3 = $[7], t4 = $[8]);
|
|
71810
71822
|
let t5;
|
|
@@ -71847,13 +71859,13 @@ function CorsOriginErrorScreen(props2) {
|
|
|
71847
71859
|
t11
|
|
71848
71860
|
] }) }) }) }), $[25] = t10, $[26] = t12) : t12 = $[26], t12;
|
|
71849
71861
|
}
|
|
71850
|
-
function _temp2$
|
|
71851
|
-
const handleFocus = _temp$
|
|
71862
|
+
function _temp2$m() {
|
|
71863
|
+
const handleFocus = _temp$S;
|
|
71852
71864
|
return window.addEventListener("focus", handleFocus), () => {
|
|
71853
71865
|
window.removeEventListener("focus", handleFocus);
|
|
71854
71866
|
};
|
|
71855
71867
|
}
|
|
71856
|
-
function _temp$
|
|
71868
|
+
function _temp$S() {
|
|
71857
71869
|
window.location.reload();
|
|
71858
71870
|
}
|
|
71859
71871
|
function NotAuthenticatedScreen() {
|
|
@@ -71964,7 +71976,7 @@ function RequestAccessScreen() {
|
|
|
71964
71976
|
let t3, t4;
|
|
71965
71977
|
$[6] !== client || $[7] !== projectId ? (t3 = () => {
|
|
71966
71978
|
if (!client || !projectId)
|
|
71967
|
-
return _temp$
|
|
71979
|
+
return _temp$R;
|
|
71968
71980
|
const request$ = client.observable.request({
|
|
71969
71981
|
url: "/access/requests/me",
|
|
71970
71982
|
tag: "request-access"
|
|
@@ -71972,12 +71984,12 @@ function RequestAccessScreen() {
|
|
|
71972
71984
|
next: (requests) => {
|
|
71973
71985
|
if (!requests || !requests.length)
|
|
71974
71986
|
return;
|
|
71975
|
-
const projectRequests = requests.filter((request) => request.resourceId === projectId), declinedRequest = projectRequests.find(_temp2$
|
|
71987
|
+
const projectRequests = requests.filter((request) => request.resourceId === projectId), declinedRequest = projectRequests.find(_temp2$l);
|
|
71976
71988
|
if (declinedRequest && isAfter(addWeeks(new Date(declinedRequest.createdAt), 2), /* @__PURE__ */ new Date())) {
|
|
71977
71989
|
setHasBeenDenied(!0);
|
|
71978
71990
|
return;
|
|
71979
71991
|
}
|
|
71980
|
-
if (projectRequests.find(_temp3$
|
|
71992
|
+
if (projectRequests.find(_temp3$a)) {
|
|
71981
71993
|
setHasPendingRequest(!0);
|
|
71982
71994
|
return;
|
|
71983
71995
|
}
|
|
@@ -72081,13 +72093,13 @@ function RequestAccessScreen() {
|
|
|
72081
72093
|
function _temp4$4(request_2) {
|
|
72082
72094
|
return request_2.status === "pending" && isBefore(addWeeks(new Date(request_2.createdAt), 2), /* @__PURE__ */ new Date());
|
|
72083
72095
|
}
|
|
72084
|
-
function _temp3$
|
|
72096
|
+
function _temp3$a(request_1) {
|
|
72085
72097
|
return request_1.status === "pending" && isAfter(addWeeks(new Date(request_1.createdAt), 2), /* @__PURE__ */ new Date());
|
|
72086
72098
|
}
|
|
72087
|
-
function _temp2$
|
|
72099
|
+
function _temp2$l(request_0) {
|
|
72088
72100
|
return request_0.status === "declined";
|
|
72089
72101
|
}
|
|
72090
|
-
function _temp$
|
|
72102
|
+
function _temp$R() {
|
|
72091
72103
|
}
|
|
72092
72104
|
function useCopyToClipboard() {
|
|
72093
72105
|
const $ = c(3), [copiedText, setCopiedText] = useState(null);
|
|
@@ -72181,9 +72193,9 @@ function SchemaProblemGroups(props2) {
|
|
|
72181
72193
|
ret = $[1];
|
|
72182
72194
|
const items = ret;
|
|
72183
72195
|
let t0;
|
|
72184
|
-
return $[2] !== items ? (t0 = /* @__PURE__ */ jsx(Stack, { as: "ul", space: 4, children: items.map(_temp2$
|
|
72196
|
+
return $[2] !== items ? (t0 = /* @__PURE__ */ jsx(Stack, { as: "ul", space: 4, children: items.map(_temp2$k) }), $[2] = items, $[3] = t0) : t0 = $[3], t0;
|
|
72185
72197
|
}
|
|
72186
|
-
function _temp2$
|
|
72198
|
+
function _temp2$k(t0, i) {
|
|
72187
72199
|
const {
|
|
72188
72200
|
group: group2,
|
|
72189
72201
|
problem: problem_0
|
|
@@ -72201,14 +72213,14 @@ function _temp2$l(t0, i) {
|
|
|
72201
72213
|
'"'
|
|
72202
72214
|
] }) : null }) })
|
|
72203
72215
|
] }),
|
|
72204
|
-
/* @__PURE__ */ jsx(Box, { marginTop: 4, children: /* @__PURE__ */ jsx(Card, { border: !0, overflow: "auto", padding: 2, tone: "inherit", children: /* @__PURE__ */ jsx(Breadcrumbs, { separator: /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, children: "\u2192" }), children: group2.path.map(_temp$
|
|
72216
|
+
/* @__PURE__ */ jsx(Box, { marginTop: 4, children: /* @__PURE__ */ jsx(Card, { border: !0, overflow: "auto", padding: 2, tone: "inherit", children: /* @__PURE__ */ jsx(Breadcrumbs, { separator: /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, children: "\u2192" }), children: group2.path.map(_temp$Q) }) }) }),
|
|
72205
72217
|
/* @__PURE__ */ jsx(Box, { as: "ul", marginTop: 4, children: /* @__PURE__ */ jsx(Box, { as: "li", children: /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
72206
72218
|
/* @__PURE__ */ jsx(ErrorMessageText, { muted: !0, size: 1, children: problem_0.message }),
|
|
72207
72219
|
problem_0.helpId && /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, children: /* @__PURE__ */ jsx("a", { href: generateHelpUrl(problem_0.helpId), target: "_blank", rel: "noopener noreferrer", children: "View documentation \u2192" }) })
|
|
72208
72220
|
] }) }) })
|
|
72209
72221
|
] }, i);
|
|
72210
72222
|
}
|
|
72211
|
-
function _temp$
|
|
72223
|
+
function _temp$Q(segment, j) {
|
|
72212
72224
|
if (segment.kind === "type") {
|
|
72213
72225
|
const text = `${_renderSegmentName(segment.name || `<anonymous ${segment.type}>`)}:${segment.type}`;
|
|
72214
72226
|
return /* @__PURE__ */ jsx(Text$1, { title: text, size: 1, textOverflow: "ellipsis", children: /* @__PURE__ */ jsx(SegmentSpan, { children: text }) }, j);
|
|
@@ -72223,7 +72235,7 @@ function SchemaErrorsScreen(t0) {
|
|
|
72223
72235
|
schema: schema2
|
|
72224
72236
|
} = t0;
|
|
72225
72237
|
let t1;
|
|
72226
|
-
$[0] !== schema2._validation ? (t1 = schema2._validation?.filter(_temp2$
|
|
72238
|
+
$[0] !== schema2._validation ? (t1 = schema2._validation?.filter(_temp2$j) || [], $[0] = schema2._validation, $[1] = t1) : t1 = $[1];
|
|
72227
72239
|
const groupsWithErrors = t1;
|
|
72228
72240
|
let t2, t3;
|
|
72229
72241
|
$[2] !== schema2 ? (t2 = () => reportWarnings(schema2), t3 = [schema2], $[2] = schema2, $[3] = t2, $[4] = t3) : (t2 = $[3], t3 = $[4]), useEffect(t2, t3);
|
|
@@ -72274,10 +72286,10 @@ function SchemaErrorsScreen(t0) {
|
|
|
72274
72286
|
t11
|
|
72275
72287
|
] }) }) }), $[26] = t10, $[27] = t11, $[28] = t12) : t12 = $[28], t12;
|
|
72276
72288
|
}
|
|
72277
|
-
function _temp2$
|
|
72278
|
-
return group2.problems.some(_temp$
|
|
72289
|
+
function _temp2$j(group2) {
|
|
72290
|
+
return group2.problems.some(_temp$P);
|
|
72279
72291
|
}
|
|
72280
|
-
function _temp$
|
|
72292
|
+
function _temp$P(problem) {
|
|
72281
72293
|
return problem.severity === "error";
|
|
72282
72294
|
}
|
|
72283
72295
|
const View$1 = styled(Box).withConfig({
|
|
@@ -72341,7 +72353,7 @@ function ImportErrorScreen(props2) {
|
|
|
72341
72353
|
autoReload
|
|
72342
72354
|
} = props2;
|
|
72343
72355
|
let t0;
|
|
72344
|
-
$[0] !== autoReload ? (t0 = autoReload ? timer(0, 1e3).pipe(take(COUNTDOWN_SECONDS + 1), map(_temp$
|
|
72356
|
+
$[0] !== autoReload ? (t0 = autoReload ? timer(0, 1e3).pipe(take(COUNTDOWN_SECONDS + 1), map(_temp$O)) : of(0), $[0] = autoReload, $[1] = t0) : t0 = $[1];
|
|
72345
72357
|
const countdownSeconds = useObservable(t0, COUNTDOWN_SECONDS);
|
|
72346
72358
|
let t1, t2;
|
|
72347
72359
|
$[2] !== autoReload || $[3] !== countdownSeconds ? (t1 = () => {
|
|
@@ -72381,7 +72393,7 @@ function ImportErrorScreen(props2) {
|
|
|
72381
72393
|
let t12;
|
|
72382
72394
|
return $[22] !== t11 || $[23] !== t3 ? (t12 = /* @__PURE__ */ jsx(Card, { "data-testid": "studio-error-screen", "data-error": t3, height: "fill", overflow: "auto", paddingY: t4, paddingX: 4, sizing: "border", children: t11 }), $[22] = t11, $[23] = t3, $[24] = t12) : t12 = $[24], t12;
|
|
72383
72395
|
}
|
|
72384
|
-
function _temp$
|
|
72396
|
+
function _temp$O(seconds) {
|
|
72385
72397
|
return COUNTDOWN_SECONDS - seconds;
|
|
72386
72398
|
}
|
|
72387
72399
|
const DevServerStoppedErrorScreen = lazy(() => import("./ViteDevServerStopped.js").then((DevServerStopped) => ({
|
|
@@ -72503,7 +72515,7 @@ function StudioLayoutComponent() {
|
|
|
72503
72515
|
useNetworkProtocolCheck();
|
|
72504
72516
|
let t0;
|
|
72505
72517
|
$[0] !== tools ? (t0 = tools.filter(isDefaultRouteTool), $[0] = tools, $[1] = t0) : t0 = $[1];
|
|
72506
|
-
const defaultRouteTools = t0, router = useRouter(), activeToolName = useRouterState(_temp$
|
|
72518
|
+
const defaultRouteTools = t0, router = useRouter(), activeToolName = useRouterState(_temp$N);
|
|
72507
72519
|
let t1;
|
|
72508
72520
|
if ($[2] !== activeToolName || $[3] !== tools) {
|
|
72509
72521
|
let t28;
|
|
@@ -72565,7 +72577,7 @@ function StudioLayoutComponent() {
|
|
|
72565
72577
|
}, $[24] = searchFullscreenOpen, $[25] = searchFullscreenPortalEl, $[26] = searchOpen, $[27] = t11) : t11 = $[27];
|
|
72566
72578
|
const navbarContextValue = t11, Navbar = useNavbarComponent(), ActiveToolLayout = useActiveToolLayoutComponent();
|
|
72567
72579
|
let t12;
|
|
72568
|
-
$[28] !== activeTool || $[29] !== activeToolName || $[30] !== tools ? (t12 = !activeTool && (activeToolName === "desk" || !activeToolName) && typeof window < "u" && /\/desk(\/|$)/.test(window.location.pathname) && tools.some(_temp2$
|
|
72580
|
+
$[28] !== activeTool || $[29] !== activeToolName || $[30] !== tools ? (t12 = !activeTool && (activeToolName === "desk" || !activeToolName) && typeof window < "u" && /\/desk(\/|$)/.test(window.location.pathname) && tools.some(_temp2$i), $[28] = activeTool, $[29] = activeToolName, $[30] = tools, $[31] = t12) : t12 = $[31];
|
|
72569
72581
|
const isLegacyDeskRedirect = t12;
|
|
72570
72582
|
let t13, t14;
|
|
72571
72583
|
$[32] !== isLegacyDeskRedirect || $[33] !== router ? (t13 = () => {
|
|
@@ -72574,7 +72586,7 @@ function StudioLayoutComponent() {
|
|
|
72574
72586
|
replace: !0
|
|
72575
72587
|
});
|
|
72576
72588
|
}, t14 = [isLegacyDeskRedirect, router], $[32] = isLegacyDeskRedirect, $[33] = router, $[34] = t13, $[35] = t14) : (t13 = $[34], t14 = $[35]), useEffect(t13, t14);
|
|
72577
|
-
const getErrorScreen = _temp3$
|
|
72589
|
+
const getErrorScreen = _temp3$9;
|
|
72578
72590
|
let t15;
|
|
72579
72591
|
$[36] !== Navbar ? (t15 = /* @__PURE__ */ jsx(Navbar, {}), $[36] = Navbar, $[37] = t15) : t15 = $[37];
|
|
72580
72592
|
let t16;
|
|
@@ -72612,13 +72624,13 @@ function StudioLayoutComponent() {
|
|
|
72612
72624
|
t26
|
|
72613
72625
|
] }), $[65] = t16, $[66] = t17, $[67] = t18, $[68] = t19, $[69] = t20, $[70] = t26, $[71] = t27) : t27 = $[71], t27;
|
|
72614
72626
|
}
|
|
72615
|
-
function _temp3$
|
|
72627
|
+
function _temp3$9(error) {
|
|
72616
72628
|
return isDocumentLimitError(error) ? /* @__PURE__ */ jsx(DocumentLimitsUpsellPanel, {}) : null;
|
|
72617
72629
|
}
|
|
72618
|
-
function _temp2$
|
|
72630
|
+
function _temp2$i(tool_0) {
|
|
72619
72631
|
return tool_0.name === "structure";
|
|
72620
72632
|
}
|
|
72621
|
-
function _temp$
|
|
72633
|
+
function _temp$N(routerState) {
|
|
72622
72634
|
return typeof routerState.tool == "string" ? routerState.tool : void 0;
|
|
72623
72635
|
}
|
|
72624
72636
|
function pickToolMenuComponent(plugin) {
|
|
@@ -72668,7 +72680,7 @@ function useActiveToolLayoutComponent() {
|
|
|
72668
72680
|
function ConfigIssuesButton() {
|
|
72669
72681
|
const $ = c(19), schema2 = useSchema();
|
|
72670
72682
|
let t0;
|
|
72671
|
-
$[0] !== schema2._validation ? (t0 = schema2._validation?.filter(_temp2$
|
|
72683
|
+
$[0] !== schema2._validation ? (t0 = schema2._validation?.filter(_temp2$h) || [], $[0] = schema2._validation, $[1] = t0) : t0 = $[1];
|
|
72672
72684
|
const groupsWithWarnings = t0, configWarnings = getCollectedConfigWarnings(), totalWarnings = groupsWithWarnings.length + configWarnings.length, scheme = useColorSchemeValue(), {
|
|
72673
72685
|
t
|
|
72674
72686
|
} = useTranslation(), dialogId = useId(), [isDialogOpen, setDialogOpen] = useState(!1), [buttonElement, setButtonElement] = useState(null);
|
|
@@ -72704,7 +72716,7 @@ function ConfigIssuesButton() {
|
|
|
72704
72716
|
" ",
|
|
72705
72717
|
/* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, children: "Configuration checks are only performed during development and will not be visible in production builds" })
|
|
72706
72718
|
] }),
|
|
72707
|
-
configWarnings.length > 0 && /* @__PURE__ */ jsx(Stack, { space: 3, children: configWarnings.map(_temp3$
|
|
72719
|
+
configWarnings.length > 0 && /* @__PURE__ */ jsx(Stack, { space: 3, children: configWarnings.map(_temp3$8) }),
|
|
72708
72720
|
groupsWithWarnings.length > 0 && /* @__PURE__ */ jsx(SchemaProblemGroups, { problemGroups: groupsWithWarnings })
|
|
72709
72721
|
] }) });
|
|
72710
72722
|
let t8;
|
|
@@ -72713,7 +72725,7 @@ function ConfigIssuesButton() {
|
|
|
72713
72725
|
t7
|
|
72714
72726
|
] }), $[16] = t6, $[17] = t7, $[18] = t8) : t8 = $[18], t8;
|
|
72715
72727
|
}
|
|
72716
|
-
function _temp3$
|
|
72728
|
+
function _temp3$8(warning, index) {
|
|
72717
72729
|
return /* @__PURE__ */ jsx(Card, { padding: 3, radius: 2, shadow: 1, tone: "caution", children: /* @__PURE__ */ jsxs(Stack, { space: 2, children: [
|
|
72718
72730
|
/* @__PURE__ */ jsx(Text$1, { size: 1, weight: "medium", children: "Divergent auth config" }),
|
|
72719
72731
|
/* @__PURE__ */ jsx(Text$1, { size: 1, style: {
|
|
@@ -72721,10 +72733,10 @@ function _temp3$9(warning, index) {
|
|
|
72721
72733
|
}, children: warning.message })
|
|
72722
72734
|
] }) }, `${warning.type}-${warning.projectId}-${index}`);
|
|
72723
72735
|
}
|
|
72724
|
-
function _temp2$
|
|
72725
|
-
return group2.problems.some(_temp$
|
|
72736
|
+
function _temp2$h(group2) {
|
|
72737
|
+
return group2.problems.some(_temp$M);
|
|
72726
72738
|
}
|
|
72727
|
-
function _temp$
|
|
72739
|
+
function _temp$M(problem) {
|
|
72728
72740
|
return problem.severity === "warning";
|
|
72729
72741
|
}
|
|
72730
72742
|
const TrialDialogViewed = defineEvent({
|
|
@@ -73115,7 +73127,7 @@ const FreeTrialProvider = (t0) => {
|
|
|
73115
73127
|
url: `${queryURL}?${queryParams.toString()}`
|
|
73116
73128
|
}).subscribe((response) => {
|
|
73117
73129
|
setData(response), response?.showOnLoad && (setShowOnLoad(!0), setShowDialog(!0));
|
|
73118
|
-
}, _temp$
|
|
73130
|
+
}, _temp$L);
|
|
73119
73131
|
return () => {
|
|
73120
73132
|
request.unsubscribe();
|
|
73121
73133
|
};
|
|
@@ -73128,7 +73140,7 @@ const FreeTrialProvider = (t0) => {
|
|
|
73128
73140
|
showOnLoad ? (setShowOnLoad(!1), setShowDialog(closeAndReOpen), data?.showOnLoad?.id && client.request({
|
|
73129
73141
|
url: `/journey/trial/${data?.showOnLoad.id}`,
|
|
73130
73142
|
method: "POST"
|
|
73131
|
-
})) : setShowDialog(_temp2$
|
|
73143
|
+
})) : setShowDialog(_temp2$g);
|
|
73132
73144
|
}, $[18] = client, $[19] = data?.showOnLoad, $[20] = showOnLoad, $[21] = t7) : t7 = $[21];
|
|
73133
73145
|
const toggleShowContent = t7;
|
|
73134
73146
|
let t8;
|
|
@@ -73141,9 +73153,9 @@ const FreeTrialProvider = (t0) => {
|
|
|
73141
73153
|
let t9;
|
|
73142
73154
|
return $[27] !== children || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(FreeTrialContext.Provider, { value: t8, children }), $[27] = children, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
|
|
73143
73155
|
};
|
|
73144
|
-
function _temp$
|
|
73156
|
+
function _temp$L() {
|
|
73145
73157
|
}
|
|
73146
|
-
function _temp2$
|
|
73158
|
+
function _temp2$g(p) {
|
|
73147
73159
|
return !p;
|
|
73148
73160
|
}
|
|
73149
73161
|
const LOGO_MARK_SIZE = 25, RADIUS = 2, LogoMarkContainer = styled(Card).attrs({
|
|
@@ -73190,11 +73202,11 @@ function AppearanceMenu$1(t0) {
|
|
|
73190
73202
|
t
|
|
73191
73203
|
} = useTranslation(), options = useColorSchemeOptions(setScheme, t);
|
|
73192
73204
|
let t1;
|
|
73193
|
-
$[0] !== options ? (t1 = options.map(_temp$
|
|
73205
|
+
$[0] !== options ? (t1 = options.map(_temp$K), $[0] = options, $[1] = t1) : t1 = $[1];
|
|
73194
73206
|
let t2;
|
|
73195
73207
|
return $[2] !== t1 ? (t2 = /* @__PURE__ */ jsx(Card, { borderTop: !0, flex: "none", padding: 2, overflow: "auto", children: /* @__PURE__ */ jsx(Stack, { as: "ul", space: 1, children: t1 }) }), $[2] = t1, $[3] = t2) : t2 = $[3], t2;
|
|
73196
73208
|
}
|
|
73197
|
-
function _temp$
|
|
73209
|
+
function _temp$K(t0) {
|
|
73198
73210
|
const {
|
|
73199
73211
|
icon,
|
|
73200
73212
|
label,
|
|
@@ -73285,7 +73297,7 @@ const ANIMATION_TRANSITION = {
|
|
|
73285
73297
|
}, $[2] = onClose, $[3] = t1) : t1 = $[3];
|
|
73286
73298
|
const handleActionClick = t1;
|
|
73287
73299
|
let t2;
|
|
73288
|
-
$[4] !== actions || $[5] !== handleActionClick ? (t2 = actions?.filter(_temp$
|
|
73300
|
+
$[4] !== actions || $[5] !== handleActionClick ? (t2 = actions?.filter(_temp$J)?.map((action_0) => {
|
|
73289
73301
|
const {
|
|
73290
73302
|
render: ActionComponent
|
|
73291
73303
|
} = action_0;
|
|
@@ -73326,7 +73338,7 @@ const ANIMATION_TRANSITION = {
|
|
|
73326
73338
|
let t4;
|
|
73327
73339
|
return $[21] !== t3 ? (t4 = /* @__PURE__ */ jsx(AnimatePresence, { children: t3 }), $[21] = t3, $[22] = t4) : t4 = $[22], t4;
|
|
73328
73340
|
});
|
|
73329
|
-
function _temp$
|
|
73341
|
+
function _temp$J(v) {
|
|
73330
73342
|
return v.location === "sidebar";
|
|
73331
73343
|
}
|
|
73332
73344
|
function isQueryMatch(query, option) {
|
|
@@ -73539,7 +73551,7 @@ function NewDocumentButton(props2) {
|
|
|
73539
73551
|
}, $[15] = t6) : t6 = $[15];
|
|
73540
73552
|
const handleSearchChange = t6;
|
|
73541
73553
|
let t7;
|
|
73542
|
-
$[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = () => setOpen(_temp$
|
|
73554
|
+
$[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = () => setOpen(_temp$I), $[16] = t7) : t7 = $[16];
|
|
73543
73555
|
const handleToggleOpen = t7;
|
|
73544
73556
|
let t8;
|
|
73545
73557
|
$[17] !== buttonElement ? (t8 = () => {
|
|
@@ -73655,7 +73667,7 @@ function NewDocumentButton(props2) {
|
|
|
73655
73667
|
let t25;
|
|
73656
73668
|
return $[84] !== handlePopoverKeyDown || $[85] !== open || $[86] !== scheme || $[87] !== t22 || $[88] !== t24 ? (t25 = /* @__PURE__ */ jsx(StyledPopover$1, { constrainSize: !0, onKeyDown: handlePopoverKeyDown, open, tone: "default", portal: !0, radius: 3, ref: popoverRef, scheme, content: t22, children: t24 }), $[84] = handlePopoverKeyDown, $[85] = open, $[86] = scheme, $[87] = t22, $[88] = t24, $[89] = t25) : t25 = $[89], t25;
|
|
73657
73669
|
}
|
|
73658
|
-
function _temp$
|
|
73670
|
+
function _temp$I(v) {
|
|
73659
73671
|
return !v;
|
|
73660
73672
|
}
|
|
73661
73673
|
function useNewDocumentOptions() {
|
|
@@ -73712,7 +73724,7 @@ const PresenceMenuItem = memo(function(props2) {
|
|
|
73712
73724
|
if ($[7] !== handleFocus || $[8] !== locations || $[9] !== user) {
|
|
73713
73725
|
t3 = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
73714
73726
|
bb0: {
|
|
73715
|
-
const lastActiveLocation = orderBy(locations || [], ["lastActiveAt"], ["desc"]).find(_temp$
|
|
73727
|
+
const lastActiveLocation = orderBy(locations || [], ["lastActiveAt"], ["desc"]).find(_temp$H);
|
|
73716
73728
|
if (hasLink = !!lastActiveLocation?.documentId, lastActiveLocation) {
|
|
73717
73729
|
const perspective = getVersionFromId(lastActiveLocation.documentId), t42 = {
|
|
73718
73730
|
id: getPublishedId(lastActiveLocation.documentId),
|
|
@@ -73741,7 +73753,7 @@ const PresenceMenuItem = memo(function(props2) {
|
|
|
73741
73753
|
let t7;
|
|
73742
73754
|
return $[25] !== handleFocus || $[26] !== t4 || $[27] !== t5 || $[28] !== t6 || $[29] !== user.displayName ? (t7 = /* @__PURE__ */ jsx(MenuItem, { as: "div", disabled: t4, tooltipProps: t5, "data-as": "a", onFocus: handleFocus, preview: t6, ref: setMenuItemElement, text: user.displayName }), $[25] = handleFocus, $[26] = t4, $[27] = t5, $[28] = t6, $[29] = user.displayName, $[30] = t7) : t7 = $[30], t7;
|
|
73743
73755
|
});
|
|
73744
|
-
function _temp$
|
|
73756
|
+
function _temp$H(location2) {
|
|
73745
73757
|
return location2.documentId;
|
|
73746
73758
|
}
|
|
73747
73759
|
const StyledMenu$4 = styled(Menu).withConfig({
|
|
@@ -73863,21 +73875,21 @@ function useProjectSubscriptions() {
|
|
|
73863
73875
|
}), $[2] = t1) : t1 = $[2], t0 = t1;
|
|
73864
73876
|
break bb0;
|
|
73865
73877
|
}
|
|
73866
|
-
t0 = projectSubscriptions$.pipe(map(_temp$
|
|
73878
|
+
t0 = projectSubscriptions$.pipe(map(_temp$G), startWith(INITIAL_LOADING_STATE), catchError(_temp2$f));
|
|
73867
73879
|
}
|
|
73868
73880
|
$[0] = projectId, $[1] = t0;
|
|
73869
73881
|
} else
|
|
73870
73882
|
t0 = $[1];
|
|
73871
73883
|
return useObservable(t0, INITIAL_LOADING_STATE);
|
|
73872
73884
|
}
|
|
73873
|
-
function _temp2$
|
|
73885
|
+
function _temp2$f(error) {
|
|
73874
73886
|
return of({
|
|
73875
73887
|
isLoading: !1,
|
|
73876
73888
|
projectSubscriptions: null,
|
|
73877
73889
|
error
|
|
73878
73890
|
});
|
|
73879
73891
|
}
|
|
73880
|
-
function _temp$
|
|
73892
|
+
function _temp$G(cachedSubscriptions) {
|
|
73881
73893
|
return {
|
|
73882
73894
|
isLoading: !1,
|
|
73883
73895
|
projectSubscriptions: cachedSubscriptions,
|
|
@@ -73891,12 +73903,12 @@ const INITIAL_STATE$5 = {
|
|
|
73891
73903
|
function useProjectOrganizationData() {
|
|
73892
73904
|
const $ = c(2), projectStore = useProjectStore();
|
|
73893
73905
|
let t0;
|
|
73894
|
-
return $[0] !== projectStore ? (t0 = projectStore.getOrganizationData().pipe(map$1(_temp$
|
|
73906
|
+
return $[0] !== projectStore ? (t0 = projectStore.getOrganizationData().pipe(map$1(_temp$F), startWith$1({
|
|
73895
73907
|
value: null,
|
|
73896
73908
|
loading: !0
|
|
73897
73909
|
})), $[0] = projectStore, $[1] = t0) : t0 = $[1], useObservable(t0, INITIAL_STATE$5);
|
|
73898
73910
|
}
|
|
73899
|
-
function _temp$
|
|
73911
|
+
function _temp$F(res) {
|
|
73900
73912
|
return {
|
|
73901
73913
|
value: res,
|
|
73902
73914
|
loading: !1
|
|
@@ -73930,7 +73942,7 @@ function useStudioFeedbackTags() {
|
|
|
73930
73942
|
value: projectData
|
|
73931
73943
|
} = useProject(), {
|
|
73932
73944
|
projectSubscriptions
|
|
73933
|
-
} = useProjectSubscriptions(), activeTool = useRouterState(_temp$
|
|
73945
|
+
} = useProjectSubscriptions(), activeTool = useRouterState(_temp$E);
|
|
73934
73946
|
let t2;
|
|
73935
73947
|
$[3] !== workspace ? (t2 = resolvePluginNames(workspace), $[3] = workspace, $[4] = t2) : t2 = $[4];
|
|
73936
73948
|
const pluginNames = t2, userId = currentUser?.id ?? "unknown", t3 = projectData?.displayName ?? "", t4 = orgId ?? "", t5 = projectSubscriptions?.plan?.name ?? "";
|
|
@@ -73983,7 +73995,7 @@ function useStudioFeedbackTags() {
|
|
|
73983
73995
|
userId
|
|
73984
73996
|
}, $[24] = allTags, $[25] = baseTags, $[26] = dynamicTags, $[27] = t10, $[28] = t11, $[29] = userId, $[30] = t12) : t12 = $[30], t12;
|
|
73985
73997
|
}
|
|
73986
|
-
function _temp$
|
|
73998
|
+
function _temp$E(routerState) {
|
|
73987
73999
|
return typeof routerState.tool == "string" ? routerState.tool : "";
|
|
73988
74000
|
}
|
|
73989
74001
|
const cache$1 = /* @__PURE__ */ new Map();
|
|
@@ -74291,7 +74303,7 @@ function FeedbackDialog(props2) {
|
|
|
74291
74303
|
const handleMessageChange = t1;
|
|
74292
74304
|
let t2;
|
|
74293
74305
|
$[4] !== t ? (t2 = (files) => {
|
|
74294
|
-
const img = files.find(_temp$
|
|
74306
|
+
const img = files.find(_temp$D);
|
|
74295
74307
|
if (img) {
|
|
74296
74308
|
if (img.size > MAX_FILE_SIZE) {
|
|
74297
74309
|
setAttachmentError(t("feedback.attachment.error.size"));
|
|
@@ -74406,7 +74418,7 @@ function FeedbackDialog(props2) {
|
|
|
74406
74418
|
/* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: t("feedback.consent.disclaimer") })
|
|
74407
74419
|
] }),
|
|
74408
74420
|
/* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, children: [
|
|
74409
|
-
/* @__PURE__ */ jsx(Switch$1, { id: contactConsentId, checked: contactConsent, onChange: () => setContactConsent(_temp2$
|
|
74421
|
+
/* @__PURE__ */ jsx(Switch$1, { id: contactConsentId, checked: contactConsent, onChange: () => setContactConsent(_temp2$e) }),
|
|
74410
74422
|
/* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: t(contactConsent ? "feedback.consent.yes" : "feedback.consent.no") })
|
|
74411
74423
|
] })
|
|
74412
74424
|
] }), $[65] = contactConsent, $[66] = contactConsentId, $[67] = imageFile, $[68] = message, $[69] = resolvedEmail, $[70] = resolvedName, $[71] = t, $[72] = t21) : t21 = $[72];
|
|
@@ -74438,10 +74450,10 @@ function FeedbackDialog(props2) {
|
|
|
74438
74450
|
t29
|
|
74439
74451
|
] }), $[95] = dialogId, $[96] = handleDismiss, $[97] = t23, $[98] = t29, $[99] = t7, $[100] = t30) : t30 = $[100], t30;
|
|
74440
74452
|
}
|
|
74441
|
-
function _temp2$
|
|
74453
|
+
function _temp2$e(prev) {
|
|
74442
74454
|
return !prev;
|
|
74443
74455
|
}
|
|
74444
|
-
function _temp$
|
|
74456
|
+
function _temp$D(f) {
|
|
74445
74457
|
return f.type.startsWith("image/");
|
|
74446
74458
|
}
|
|
74447
74459
|
function StudioFeedbackDialogInner(props2) {
|
|
@@ -74495,11 +74507,11 @@ function useFeedbackAvailable(options) {
|
|
|
74495
74507
|
method: "POST",
|
|
74496
74508
|
body
|
|
74497
74509
|
}).then(async (response) => {
|
|
74498
|
-
setAvailable(response.ok), await response.arrayBuffer().catch(_temp$
|
|
74510
|
+
setAvailable(response.ok), await response.arrayBuffer().catch(_temp$C);
|
|
74499
74511
|
}).catch(() => setAvailable(!1));
|
|
74500
74512
|
}, t2 = [dsn, skip2], $[0] = dsn, $[1] = skip2, $[2] = t1, $[3] = t2) : (t1 = $[2], t2 = $[3]), useEffect(t1, t2), available;
|
|
74501
74513
|
}
|
|
74502
|
-
function _temp$
|
|
74514
|
+
function _temp$C() {
|
|
74503
74515
|
}
|
|
74504
74516
|
function useLiveUserApplication() {
|
|
74505
74517
|
return useContext(LiveUserApplicationContext);
|
|
@@ -74589,12 +74601,12 @@ function useStudioAnnouncements() {
|
|
|
74589
74601
|
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
74590
74602
|
studioAnnouncements: [],
|
|
74591
74603
|
unseenAnnouncements: [],
|
|
74592
|
-
onDialogOpen: _temp$
|
|
74604
|
+
onDialogOpen: _temp$B
|
|
74593
74605
|
}, $[0] = t0) : t0 = $[0], t0;
|
|
74594
74606
|
}
|
|
74595
74607
|
return context;
|
|
74596
74608
|
}
|
|
74597
|
-
function _temp$
|
|
74609
|
+
function _temp$B() {
|
|
74598
74610
|
}
|
|
74599
74611
|
function StudioAnnouncementsMenuItem(t0) {
|
|
74600
74612
|
const $ = c(9), {
|
|
@@ -74619,24 +74631,14 @@ function StudioAnnouncementsMenuItem(t0) {
|
|
|
74619
74631
|
let t2;
|
|
74620
74632
|
return $[6] !== handleOpenDialog || $[7] !== text ? (t2 = /* @__PURE__ */ jsx(MenuItem, { tone: "default", text, onClick: handleOpenDialog }), $[6] = handleOpenDialog, $[7] = text, $[8] = t2) : t2 = $[8], t2;
|
|
74621
74633
|
}
|
|
74622
|
-
const DEPLOY_STUDIO_PERMISSION = "sanity.project", DEPLOY_STUDIO_GRANT = "deployStudio";
|
|
74623
74634
|
function useCanDeployStudio(t0) {
|
|
74624
74635
|
const $ = c(5), enabled = t0 === void 0 ? !0 : t0, projectStore = useProjectStore();
|
|
74625
74636
|
let t1;
|
|
74626
|
-
$[0] !== projectStore ? (t1 = projectStore.getGrants().pipe(map$1(
|
|
74637
|
+
$[0] !== projectStore ? (t1 = projectStore.getGrants().pipe(map$1(hasDeployStudioGrant)), $[0] = projectStore, $[1] = t1) : t1 = $[1];
|
|
74627
74638
|
const result$ = t1;
|
|
74628
74639
|
let t2;
|
|
74629
74640
|
return $[2] !== enabled || $[3] !== result$ ? (t2 = enabled ? result$ : of(!1), $[2] = enabled, $[3] = result$, $[4] = t2) : t2 = $[4], useObservable(t2, !1);
|
|
74630
74641
|
}
|
|
74631
|
-
function _temp3$8(grants) {
|
|
74632
|
-
return !!grants[DEPLOY_STUDIO_PERMISSION]?.some(_temp2$e);
|
|
74633
|
-
}
|
|
74634
|
-
function _temp2$e(p) {
|
|
74635
|
-
return p.grants.some(_temp$B);
|
|
74636
|
-
}
|
|
74637
|
-
function _temp$B(g) {
|
|
74638
|
-
return g.name === DEPLOY_STUDIO_GRANT;
|
|
74639
|
-
}
|
|
74640
74642
|
function reload$1() {
|
|
74641
74643
|
document.location.reload();
|
|
74642
74644
|
}
|
|
@@ -76492,7 +76494,10 @@ async function registerStudioManifest(userApplication, workspaces, theme, signal
|
|
|
76492
76494
|
client,
|
|
76493
76495
|
authenticated
|
|
76494
76496
|
} = await firstValueFrom(workspace.auth.state);
|
|
76495
|
-
|
|
76497
|
+
if (!authenticated)
|
|
76498
|
+
return;
|
|
76499
|
+
const studioClient = client.withConfig(DEFAULT_STUDIO_CLIENT_OPTIONS);
|
|
76500
|
+
await fetchCanDeployStudio(studioClient) && (signal?.aborted || await studioClient.request({
|
|
76496
76501
|
method: "POST",
|
|
76497
76502
|
uri: `/projects/${projectId}/user-applications/${id2}/config/live-manifest`,
|
|
76498
76503
|
body: {
|
|
@@ -87541,6 +87546,7 @@ export {
|
|
|
87541
87546
|
getPreviewPaths,
|
|
87542
87547
|
getPreviewStateObservable$1 as getPreviewStateObservable,
|
|
87543
87548
|
getPreviewValueWithFallback,
|
|
87549
|
+
getProjectGrants,
|
|
87544
87550
|
getProviderTitle,
|
|
87545
87551
|
getPublishDateFromRelease,
|
|
87546
87552
|
getReferencePaths,
|