sanity 5.2.0-next.37 → 5.2.0-next.39
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-es/TooltipDelayGroupProvider.js +13 -12
- package/lib/_chunks-es/TooltipDelayGroupProvider.js.map +1 -1
- package/lib/_chunks-es/package.js +1 -1
- package/lib/_chunks-es/version.js +1 -1
- package/lib/_internal/cli/threads/extractManifest.cjs +1 -6
- package/lib/_internal/cli/threads/extractManifest.cjs.map +1 -1
- package/lib/_singletons.d.ts +35 -24
- package/lib/_singletons.js +2 -2
- package/lib/_singletons.js.map +1 -1
- package/lib/desk.d.ts +0 -20
- package/lib/index.d.ts +51 -14
- package/lib/index.js +1036 -1045
- package/lib/index.js.map +1 -1
- package/lib/presentation.d.ts +0 -10
- package/lib/structure.d.ts +0 -10
- package/package.json +14 -14
package/lib/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
3
|
import * as PathUtils from "@sanity/util/paths";
|
|
4
|
-
import { toString, FOCUS_TERMINATOR, startsWith, isEqual as isEqual$3, pathFor, get as get$1, trimLeft,
|
|
4
|
+
import { toString, FOCUS_TERMINATOR, startsWith, isEqual as isEqual$3, pathFor, get as get$1, trimLeft, trimChildPath as trimChildPath$1, fromString } from "@sanity/util/paths";
|
|
5
5
|
import React, { forwardRef, useRef, useState, useId, useCallback, useMemo, useImperativeHandle, useEffect, isValidElement, Fragment, cloneElement, memo, useContext, useSyncExternalStore, Suspense, useReducer, startTransition, Component, useLayoutEffect, useEffectEvent, createContext, useDebugValue, PureComponent, Children, useTransition, useInsertionEffect, lazy, useDeferredValue, version, StrictMode } from "react";
|
|
6
6
|
import deepEquals from "react-fast-compare";
|
|
7
|
-
import { WorkspacesContext, LocaleContext, MediaLibraryIdsContext, PerspectiveContext, UserColorManagerContext, ResourceCacheContext, EventsContext, WorkspaceContext, DocumentChangeContext, ReviewChangesContext, DiffContext, PresenceContext, FormBuilderContext, ValidationContext, PortableTextMarkersContext, PortableTextMemberItemsContext, ChangeIndicatorTrackerContextStore, ChangeIndicatorTrackerContextGetSnapshot, FormCallbacksContext, ReferenceInputOptionsContext, DocumentIdContext, HoveredFieldContext, FieldActionsContext, FormValueContext, ReferenceItemRefContext, GetFormValueContext, EnhancedObjectDialogContext, DocumentFieldActionsContext, SortableItemIdContext, VirtualizerScrollInstanceContext, FullscreenPTEContext, PresenceTrackerContextStore, PresenceTrackerContextGetSnapshot, FormFieldPresenceContext, SourceContext, PortableTextMemberItemElementRefsContext, ScrollContext, AssetLimitUpsellContext, ReleasesUpsellContext, ReleasesMetadataContext, TableContext, SearchContext, SingleDocReleaseEnabledContext, SingleDocReleaseUpsellContext, SingleDocReleaseContext, ActiveWorkspaceMatcherContext, CalendarContext, AppIdCacheContext, CommentsAuthoringPathContext, CommentsIntentContext, CommentInputContext, CommentsContext, CommentsEnabledContext, CommentsOnboardingContext, CommentsSelectedPathContext, CommentsUpsellContext, AddonDatasetContext, SanityCreateConfigContext, ScheduledPublishingEnabledContext, SchedulesContext, SchedulePublishUpsellContext, DocumentActionPropsContext, TasksEnabledContext, IsLastPaneContext, MentionUserContext, TasksNavigationContext, TasksContext, TasksUpsellContext, RouterHistoryContext, ColorSchemeSetValueContext, ColorSchemeValueContext, DocumentLimitUpsellContext, NavbarContext, FreeTrialContext, PackageVersionInfoContext, StudioAnnouncementContext, CopyPasteContext, UserApplicationCacheContext, LiveUserApplicationContext, PreviewCardContext, ZIndexContext, zIndexContextDefaults } from "sanity/_singletons";
|
|
7
|
+
import { WorkspacesContext, LocaleContext, MediaLibraryIdsContext, PerspectiveContext, UserColorManagerContext, ResourceCacheContext, EventsContext, WorkspaceContext, DocumentChangeContext, ReviewChangesContext, DiffContext, PresenceContext, FormBuilderContext, ValidationContext, PortableTextMarkersContext, PortableTextMemberItemsContext, ChangeIndicatorTrackerContextStore, ChangeIndicatorTrackerContextGetSnapshot, FormCallbacksContext, ReferenceInputOptionsContext, DocumentIdContext, HoveredFieldContext, FieldActionsContext, FormValueContext, ReferenceItemRefContext, GetFormValueContext, EnhancedObjectDialogContext, DocumentFieldActionsContext, SortableItemIdContext, VirtualizerScrollInstanceContext, FullscreenPTEContext, PresenceTrackerContextStore, PresenceTrackerContextGetSnapshot, FormFieldPresenceContext, SourceContext, PortableTextMemberItemElementRefsContext, ScrollContext, AssetLimitUpsellContext, DialogStackContext, ReleasesUpsellContext, ReleasesMetadataContext, TableContext, SearchContext, SingleDocReleaseEnabledContext, SingleDocReleaseUpsellContext, SingleDocReleaseContext, ActiveWorkspaceMatcherContext, CalendarContext, AppIdCacheContext, CommentsAuthoringPathContext, CommentsIntentContext, CommentInputContext, CommentsContext, CommentsEnabledContext, CommentsOnboardingContext, CommentsSelectedPathContext, CommentsUpsellContext, AddonDatasetContext, SanityCreateConfigContext, ScheduledPublishingEnabledContext, SchedulesContext, SchedulePublishUpsellContext, DocumentActionPropsContext, TasksEnabledContext, IsLastPaneContext, MentionUserContext, TasksNavigationContext, TasksContext, TasksUpsellContext, RouterHistoryContext, ColorSchemeSetValueContext, ColorSchemeValueContext, DocumentLimitUpsellContext, NavbarContext, FreeTrialContext, PackageVersionInfoContext, StudioAnnouncementContext, CopyPasteContext, UserApplicationCacheContext, LiveUserApplicationContext, PreviewCardContext, ZIndexContext, zIndexContextDefaults } from "sanity/_singletons";
|
|
8
8
|
import { SchedulesContext as SchedulesContext2 } from "sanity/_singletons";
|
|
9
9
|
import { Badge, Grid, rem, Box, Stack, Card, Spinner, Text as Text$1, Layer, Flex, Button as Button$1, Skeleton, Heading, Avatar, AvatarStack, Inline, Breadcrumbs, useClickOutsideEvent, Code, useTheme, useGlobalKeyDown, MenuDivider, Menu, useElementRect, Autocomplete, useToast, useElementSize, AvatarCounter, TextInput as TextInput$1, Container as Container$2, Checkbox as Checkbox$1, Switch as Switch$1, Select, LayerProvider, ElementQuery, TabList, rgba, useLayer, MenuItem as MenuItem$1, useBoundaryElement, BoundaryElementProvider, usePortal, PortalProvider, Portal, _responsive, useRootTheme, useArrayProp, TextArea, TextSkeleton, useMediaIndex, isHTMLElement, Radio, TabPanel, studioTheme, Label, Dialog as Dialog$1, ThemeColorProvider, DialogProvider, focusLastDescendant, focusFirstDescendant, VirtualList as VirtualList$1, usePrefersDark, ThemeProvider, ToastProvider } from "@sanity/ui";
|
|
10
10
|
import { useVirtualizer, defaultRangeExtractor, elementScroll } from "@tanstack/react-virtual";
|
|
11
|
-
import { throttle, isEqual as isEqual$2, memoize as memoize$1, partition, groupBy, omit, isPlainObject as isPlainObject$1, get, flatten as flatten$1, uniqBy, sample, uniq, orderBy, xor, debounce, keyBy, toLower, compact, words, intersection, union, flow, trim, sortBy, isFinite, pickBy, findIndex as findIndex$1, clone, isObject, isString as isString$1, noop as noop$
|
|
12
|
-
import { styled, css, keyframes, useTheme as useTheme$1, createGlobalStyle
|
|
11
|
+
import { throttle, isEqual as isEqual$2, memoize as memoize$1, partition, groupBy, omit, isPlainObject as isPlainObject$1, get, flatten as flatten$1, uniqBy, sample, uniq, orderBy, xor, debounce, keyBy, toLower, compact, words, intersection, union, flow, trim, sortBy, isFinite, pickBy, findIndex as findIndex$1, clone, isObject, isString as isString$1, noop as noop$7, capitalize, deburr, startCase, last as last$1, difference, upperFirst, set as set$1, find, uniqueId, castArray, pick, sortedIndex, values, identity as identity$2, isEmpty as isEmpty$1, range, sum as sum$1, max, escapeRegExp as escapeRegExp$1 } from "lodash-es";
|
|
12
|
+
import { styled, css, keyframes, useTheme as useTheme$1, createGlobalStyle } from "styled-components";
|
|
13
13
|
import { EllipsisHorizontalIcon, ErrorOutlineIcon, CircleIcon, CalendarIcon, UnpublishIcon, PublishIcon, EditIcon, CloseIcon, TrashIcon, AddCircleIcon, TimelineIcon, ChevronRightIcon, DocumentIcon, ImageIcon, ChevronDownIcon, ArrowRightIcon, ArrowDownIcon, RevertIcon, WarningOutlineIcon, InfoOutlineIcon, CheckmarkIcon, AddIcon, HelpCircleIcon, AccessDeniedIcon, ToggleArrowRightIcon, SyncIcon, LaunchIcon, BulbOutlineIcon, UnknownIcon, UploadIcon, DragHandleIcon, SearchIcon, StackCompactIcon, PanelLeftIcon, InsertAboveIcon, InsertBelowIcon, CopyIcon, AddDocumentIcon, ChevronLeftIcon, EarthGlobeIcon, EarthAmericasIcon, LinkIcon, UlistIcon, OlistIcon, CodeIcon, UnderlineIcon, StrikethroughIcon, ItalicIcon, BoldIcon, BlockElementIcon, InlineElementIcon, CollapseIcon, ExpandIcon, ResetIcon, Icon, ChevronUpIcon, DownloadIcon, DocumentsIcon, ReadOnlyIcon, BinaryDocumentIcon, CropIcon, EyeOpenIcon, DotIcon, LockIcon, CheckmarkCircleIcon, PinFilledIcon, PinIcon, RestoreIcon, ClockIcon, CloseCircleIcon, UnarchiveIcon, ArchiveIcon, ArrowUpIcon, ControlsIcon, SpinnerIcon, ArrowLeftIcon, SortIcon, ComposeSparklesIcon, ClipboardIcon, StringIcon, NumberIcon, BlockContentIcon, UndoIcon, UnlinkIcon, LinkRemovedIcon, AddCommentIcon, CommentIcon, SelectIcon, TaskIcon, UserIcon, DesktopIcon, MoonIcon, SunIcon, EyeClosedIcon, DoubleChevronRightIcon, AddUserIcon, CogIcon, BoltIcon, LeaveIcon, UsersIcon, GithubIcon, RefreshIcon, MenuIcon } from "@sanity/icons";
|
|
14
14
|
import { Button, ErrorBoundary, Tooltip, Popover, MenuItem, MenuButton, TooltipDelayGroupProvider, Dialog, Tab } from "./_chunks-es/TooltipDelayGroupProvider.js";
|
|
15
15
|
import { Hotkeys } from "./_chunks-es/TooltipDelayGroupProvider.js";
|
|
@@ -2927,7 +2927,7 @@ function collate(documents) {
|
|
|
2927
2927
|
function removeDupes$3(documents) {
|
|
2928
2928
|
return collate(documents).map((entry) => entry.draft || entry.published || entry.versions[0]).filter(isNonNullable$3);
|
|
2929
2929
|
}
|
|
2930
|
-
const EMPTY_OBJECT = Object.freeze({}), EMPTY_ARRAY$
|
|
2930
|
+
const EMPTY_OBJECT = Object.freeze({}), EMPTY_ARRAY$z = Object.freeze([]), formatRelativeLocale = (...args) => {
|
|
2931
2931
|
const dateFnsRelative = formatRelative(...args);
|
|
2932
2932
|
if (isValid(parse(dateFnsRelative, "MM/dd/yyyy", /* @__PURE__ */ new Date()))) {
|
|
2933
2933
|
const [dateTime] = args;
|
|
@@ -3729,8 +3729,8 @@ function _createMiddlewareComponent(DefaultComponent2, middlewareComponents) {
|
|
|
3729
3729
|
let next = _temp9;
|
|
3730
3730
|
if ($[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel")) {
|
|
3731
3731
|
for (const Middleware of middlewareComponents) {
|
|
3732
|
-
const
|
|
3733
|
-
next = (props_0) => /* @__PURE__ */ jsx(Middleware, { ...props_0, renderDefault
|
|
3732
|
+
const renderDefault = next;
|
|
3733
|
+
next = (props_0) => /* @__PURE__ */ jsx(Middleware, { ...props_0, renderDefault });
|
|
3734
3734
|
}
|
|
3735
3735
|
$[0] = next;
|
|
3736
3736
|
} else
|
|
@@ -4994,7 +4994,7 @@ function toOrderedChains(events2) {
|
|
|
4994
4994
|
return sortedList;
|
|
4995
4995
|
});
|
|
4996
4996
|
}
|
|
4997
|
-
const DEFAULT_MAX_BUFFER_SIZE = 20, DEFAULT_DEADLINE_MS = 3e4, EMPTY_ARRAY$
|
|
4997
|
+
const DEFAULT_MAX_BUFFER_SIZE = 20, DEFAULT_DEADLINE_MS = 3e4, EMPTY_ARRAY$y = [];
|
|
4998
4998
|
function sequentializeListenerEvents(options) {
|
|
4999
4999
|
const {
|
|
5000
5000
|
resolveChainDeadline = DEFAULT_DEADLINE_MS,
|
|
@@ -5008,7 +5008,7 @@ function sequentializeListenerEvents(options) {
|
|
|
5008
5008
|
base: {
|
|
5009
5009
|
revision: event.document?._rev
|
|
5010
5010
|
},
|
|
5011
|
-
buffer: EMPTY_ARRAY$
|
|
5011
|
+
buffer: EMPTY_ARRAY$y,
|
|
5012
5012
|
emitEvents: [event]
|
|
5013
5013
|
};
|
|
5014
5014
|
if (event.type === "mutation") {
|
|
@@ -5037,7 +5037,7 @@ function sequentializeListenerEvents(options) {
|
|
|
5037
5037
|
return {
|
|
5038
5038
|
...state,
|
|
5039
5039
|
buffer: nextBuffer,
|
|
5040
|
-
emitEvents: EMPTY_ARRAY$
|
|
5040
|
+
emitEvents: EMPTY_ARRAY$y
|
|
5041
5041
|
};
|
|
5042
5042
|
}
|
|
5043
5043
|
return {
|
|
@@ -5045,9 +5045,9 @@ function sequentializeListenerEvents(options) {
|
|
|
5045
5045
|
emitEvents: [event]
|
|
5046
5046
|
};
|
|
5047
5047
|
}, {
|
|
5048
|
-
emitEvents: EMPTY_ARRAY$
|
|
5048
|
+
emitEvents: EMPTY_ARRAY$y,
|
|
5049
5049
|
base: void 0,
|
|
5050
|
-
buffer: EMPTY_ARRAY$
|
|
5050
|
+
buffer: EMPTY_ARRAY$y
|
|
5051
5051
|
}), switchMap$1((state) => {
|
|
5052
5052
|
if (state.buffer.length > 0) {
|
|
5053
5053
|
const brokenChainStartsAt = new Date(state.buffer[0].messageReceivedAt), nextDeadline = resolveChainDeadline - (Date.now() - brokenChainStartsAt.getTime());
|
|
@@ -6425,7 +6425,7 @@ Asset ID: ${value.media._ref}`), context.i18n.t("validation:object.media-not-fou
|
|
|
6425
6425
|
Array: arrayValidators,
|
|
6426
6426
|
Object: objectValidators,
|
|
6427
6427
|
Date: dateValidators
|
|
6428
|
-
}, isFieldRef = (constraint) => typeof constraint != "object" || !constraint ? !1 : constraint.type === Rule.FIELD_REF, EMPTY_ARRAY$
|
|
6428
|
+
}, isFieldRef = (constraint) => typeof constraint != "object" || !constraint ? !1 : constraint.type === Rule.FIELD_REF, EMPTY_ARRAY$x = [], Rule = class Rule2 extends Rule$1 {
|
|
6429
6429
|
static array = (def) => new Rule2(def).type("Array");
|
|
6430
6430
|
static object = (def) => new Rule2(def).type("Object");
|
|
6431
6431
|
static string = (def) => new Rule2(def).type("String");
|
|
@@ -6444,7 +6444,7 @@ Asset ID: ${value.media._ref}`), context.i18n.t("validation:object.media-not-fou
|
|
|
6444
6444
|
customValidationConcurrencyLimiter
|
|
6445
6445
|
} = __internal, valueIsEmpty = value == null;
|
|
6446
6446
|
if (valueIsEmpty && this._required === "optional")
|
|
6447
|
-
return EMPTY_ARRAY$
|
|
6447
|
+
return EMPTY_ARRAY$x;
|
|
6448
6448
|
const rules = (
|
|
6449
6449
|
// Run only the _custom_ functions if the rule is not set to required or optional
|
|
6450
6450
|
this._required === void 0 && valueIsEmpty ? this._rules.filter((curr) => curr.flag === "custom") : this._rules
|
|
@@ -8953,7 +8953,7 @@ function useTimelineStore(t0) {
|
|
|
8953
8953
|
$[28] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t12 = () => timelineStateRef.current, $[28] = t12) : t12 = $[28];
|
|
8954
8954
|
let t13;
|
|
8955
8955
|
$[29] !== onError || $[30] !== timelineController$ ? (t13 = (callback) => {
|
|
8956
|
-
const subscription = timelineController$.pipe(map$1(_temp3$
|
|
8956
|
+
const subscription = timelineController$.pipe(map$1(_temp3$I), distinctUntilChanged$1(deepEquals), catchError$1((err_0) => (onError?.(err_0), of(INITIAL_TIMELINE_STATE))), tap$1((timelineState) => {
|
|
8957
8957
|
timelineStateRef.current = timelineState;
|
|
8958
8958
|
}), tap$1(callback)).subscribe();
|
|
8959
8959
|
return () => subscription.unsubscribe();
|
|
@@ -8967,7 +8967,7 @@ function useTimelineStore(t0) {
|
|
|
8967
8967
|
subscribe: t13
|
|
8968
8968
|
}, $[32] = t10, $[33] = t11, $[34] = t13, $[35] = t9, $[36] = t14) : t14 = $[36], t14;
|
|
8969
8969
|
}
|
|
8970
|
-
function _temp3$
|
|
8970
|
+
function _temp3$I(innerController_0) {
|
|
8971
8971
|
const chunks = innerController_0.timeline.mapChunks(_temp$46), lastNonDeletedChunk = chunks.filter(_temp2$1H), hasMoreChunks = !innerController_0.timeline.reachedEarliestEntry;
|
|
8972
8972
|
hasMoreChunks && chunks.length > 16 && innerController_0.setLoadMore(!1);
|
|
8973
8973
|
const timelineReady = !["invalid", "loading"].includes(innerController_0.selectionState);
|
|
@@ -11939,7 +11939,7 @@ function isObjectType$1(schemaType) {
|
|
|
11939
11939
|
function isObjectValue(value) {
|
|
11940
11940
|
return value !== null && !Array.isArray(value) && typeof value == "object";
|
|
11941
11941
|
}
|
|
11942
|
-
function noop$
|
|
11942
|
+
function noop$6() {
|
|
11943
11943
|
}
|
|
11944
11944
|
function isFieldChange(change) {
|
|
11945
11945
|
return change.type === "field";
|
|
@@ -14982,7 +14982,7 @@ function _temp$3T(marker) {
|
|
|
14982
14982
|
}
|
|
14983
14983
|
const NONEXISTENT_PATH = ["@@_NONEXISTENT_PATH_@@"];
|
|
14984
14984
|
function useMemberValidation(member) {
|
|
14985
|
-
const prev = useRef(null), memberValidation = member?.validation && member.validation.length > 0 ? member.validation : EMPTY_ARRAY$
|
|
14985
|
+
const prev = useRef(null), memberValidation = member?.validation && member.validation.length > 0 ? member.validation : EMPTY_ARRAY$z, childValidation = useChildValidation(member?.path || NONEXISTENT_PATH), validation2 = useMemo(() => member?.schemaType && isBlockType(member?.schemaType) ? memberValidation : memberValidation.concat(childValidation), [childValidation, member, memberValidation]), [hasError, hasWarning, hasInfo] = useMemo(() => [validation2.filter((v) => v.level === "error").length > 0, validation2.filter((v_0) => v_0.level === "warning").length > 0, validation2.filter((v_1) => v_1.level === "info").length > 0], [validation2]), reconciled = immutableReconcile(prev.current, validation2);
|
|
14986
14986
|
return prev.current = reconciled, useMemo(() => ({
|
|
14987
14987
|
validation: reconciled,
|
|
14988
14988
|
hasError,
|
|
@@ -15409,7 +15409,7 @@ function Annotation(props2) {
|
|
|
15409
15409
|
$[28] !== path ? (t92 = (p) => isEqual$3(p.path, path), $[28] = path, $[29] = t92) : t92 = $[29], t8 = presence.filter(t92), $[25] = path, $[26] = presence, $[27] = t8;
|
|
15410
15410
|
} else
|
|
15411
15411
|
t8 = $[27];
|
|
15412
|
-
const rootPresence = t8, isOpen = !!memberItem?.member.open, input = memberItem?.input, nodePath = memberItem?.node.path || EMPTY_ARRAY$
|
|
15412
|
+
const rootPresence = t8, isOpen = !!memberItem?.member.open, input = memberItem?.input, nodePath = memberItem?.node.path || EMPTY_ARRAY$z, referenceElement = spanElement, t9 = editor2.schemaTypes.block, t10 = !!readOnly, t11 = markersToolTip || text;
|
|
15413
15413
|
let t12;
|
|
15414
15414
|
$[30] !== editor2.schemaTypes.block || $[31] !== editorNodeFocused || $[32] !== floatingBoundary || $[33] !== focused || $[34] !== input || $[35] !== isOpen || $[36] !== markers || $[37] !== nodePath || $[38] !== onClose || $[39] !== onOpen || $[40] !== onPathFocus || $[41] !== onRemove || $[42] !== referenceBoundary || $[43] !== referenceElement || $[44] !== renderAnnotation || $[45] !== renderBlock2 || $[46] !== renderField || $[47] !== renderInlineBlock || $[48] !== renderInput || $[49] !== renderItem2 || $[50] !== renderPreview || $[51] !== rootPresence || $[52] !== schemaType || $[53] !== selected || $[54] !== t10 || $[55] !== t11 || $[56] !== validation2 || $[57] !== value ? (t12 = {
|
|
15415
15415
|
__unstable_floatingBoundary: floatingBoundary,
|
|
@@ -15581,10 +15581,10 @@ function ChangeIndicatorsTrackerComponent(props2) {
|
|
|
15581
15581
|
let t1;
|
|
15582
15582
|
return $[3] !== store || $[4] !== t0 ? (t1 = /* @__PURE__ */ jsx(ChangeIndicatorTrackerContextStore.Provider, { value: store, children: t0 }), $[3] = store, $[4] = t0, $[5] = t1) : t1 = $[5], t1;
|
|
15583
15583
|
}
|
|
15584
|
-
const ChangeIndicatorsTracker = memo(ChangeIndicatorsTrackerComponent), EMPTY_ARRAY$
|
|
15584
|
+
const ChangeIndicatorsTracker = memo(ChangeIndicatorsTrackerComponent), EMPTY_ARRAY$w = [];
|
|
15585
15585
|
function useChangeIndicatorsReportedValues() {
|
|
15586
15586
|
const snapshot2 = useContext(ChangeIndicatorTrackerContextGetSnapshot);
|
|
15587
|
-
return snapshot2 === null ? (console.warn(new Error('No context provided for reporter. Make sure that the component calling "useChangeIndicatorsReportedValues()", is wrapped inside a <ChangeIndicatorsTracker> element')), EMPTY_ARRAY$
|
|
15587
|
+
return snapshot2 === null ? (console.warn(new Error('No context provided for reporter. Make sure that the component calling "useChangeIndicatorsReportedValues()", is wrapped inside a <ChangeIndicatorsTracker> element')), EMPTY_ARRAY$w) : snapshot2;
|
|
15588
15588
|
}
|
|
15589
15589
|
const useChangeIndicatorsReporter = (id2, value, isEqual2) => {
|
|
15590
15590
|
const store = useContext(ChangeIndicatorTrackerContextStore);
|
|
@@ -16181,9 +16181,9 @@ function asType(schemaType, asOneOfTypes) {
|
|
|
16181
16181
|
if (schemaType)
|
|
16182
16182
|
return asType(schemaType.type, asOneOfTypes);
|
|
16183
16183
|
}
|
|
16184
|
-
const EMPTY_ARRAY$
|
|
16184
|
+
const EMPTY_ARRAY$v = [];
|
|
16185
16185
|
function BooleanField(field) {
|
|
16186
|
-
const $ = c(20), documentId = usePublishedId$1(), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$
|
|
16186
|
+
const $ = c(20), documentId = usePublishedId$1(), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$v), focused = !!field.inputProps.focused;
|
|
16187
16187
|
let t0;
|
|
16188
16188
|
$[0] !== documentId || $[1] !== field.actions || $[2] !== field.path || $[3] !== field.schemaType ? (t0 = documentId && field.actions && field.actions.length > 0 && /* @__PURE__ */ jsx(FieldActionsResolver, { actions: field.actions, documentId, documentType: field.schemaType.name, onActions: setFieldActionNodes, path: field.path, schemaType: field.schemaType }), $[0] = documentId, $[1] = field.actions, $[2] = field.path, $[3] = field.schemaType, $[4] = t0) : t0 = $[4];
|
|
16189
16189
|
const t1 = !!field.inputProps.focused;
|
|
@@ -16198,7 +16198,7 @@ function BooleanField(field) {
|
|
|
16198
16198
|
] }), $[17] = t0, $[18] = t3, $[19] = t4) : t4 = $[19], t4;
|
|
16199
16199
|
}
|
|
16200
16200
|
function DateTimeField(field) {
|
|
16201
|
-
const $ = c(15), documentId = usePublishedId$1(), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$
|
|
16201
|
+
const $ = c(15), documentId = usePublishedId$1(), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$v), focused = !!field.inputProps.focused;
|
|
16202
16202
|
let t0;
|
|
16203
16203
|
$[0] !== documentId || $[1] !== field.actions || $[2] !== field.path || $[3] !== field.schemaType ? (t0 = documentId && field.actions && field.actions.length > 0 && /* @__PURE__ */ jsx(FieldActionsResolver, { actions: field.actions, documentId, documentType: field.schemaType.name, onActions: setFieldActionNodes, path: field.path, schemaType: field.schemaType }), $[0] = documentId, $[1] = field.actions, $[2] = field.path, $[3] = field.schemaType, $[4] = t0) : t0 = $[4];
|
|
16204
16204
|
let t1;
|
|
@@ -16210,7 +16210,7 @@ function DateTimeField(field) {
|
|
|
16210
16210
|
] }), $[12] = t0, $[13] = t1, $[14] = t2) : t2 = $[14], t2;
|
|
16211
16211
|
}
|
|
16212
16212
|
function PrimitiveField$1(field) {
|
|
16213
|
-
const $ = c(35), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$
|
|
16213
|
+
const $ = c(35), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$v), documentId = usePublishedId$1(), focused = !!field.inputProps.focused;
|
|
16214
16214
|
let t0;
|
|
16215
16215
|
$[0] !== documentId || $[1] !== field.actions || $[2] !== field.path || $[3] !== field.schemaType ? (t0 = documentId && field.actions && field.actions.length > 0 && /* @__PURE__ */ jsx(FieldActionsResolver, { actions: field.actions, documentId, documentType: field.schemaType.name, onActions: setFieldActionNodes, path: field.path, schemaType: field.schemaType }), $[0] = documentId, $[1] = field.actions, $[2] = field.path, $[3] = field.schemaType, $[4] = t0) : t0 = $[4];
|
|
16216
16216
|
const t1 = `field-${field.inputId}`;
|
|
@@ -16229,12 +16229,12 @@ function PrimitiveField$1(field) {
|
|
|
16229
16229
|
] }), $[32] = t0, $[33] = t5, $[34] = t6) : t6 = $[34], t6;
|
|
16230
16230
|
}
|
|
16231
16231
|
function ObjectOrArrayField(field) {
|
|
16232
|
-
const $ = c(36), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$
|
|
16232
|
+
const $ = c(36), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$v), documentId = usePublishedId$1(), focused = !!field.inputProps.focused, disableActions = field.schemaType.options?.disableActions || EMPTY_ARRAY$v;
|
|
16233
16233
|
let t0;
|
|
16234
16234
|
$[0] !== disableActions || $[1] !== field.actions ? (t0 = field.actions?.filter((a) => a.name === "pasteField" ? !disableActions.includes("add") : a.name === "copyField" ? !disableActions.includes("copy") : !0), $[0] = disableActions, $[1] = field.actions, $[2] = t0) : t0 = $[2];
|
|
16235
16235
|
const actions = t0;
|
|
16236
16236
|
let t1;
|
|
16237
|
-
$[3] !== actions || $[4] !== documentId || $[5] !== field.actions || $[6] !== field.path || $[7] !== field.schemaType ? (t1 = documentId && field.actions && field.actions.length > 0 && /* @__PURE__ */ jsx(FieldActionsResolver, { actions: actions || EMPTY_ARRAY$
|
|
16237
|
+
$[3] !== actions || $[4] !== documentId || $[5] !== field.actions || $[6] !== field.path || $[7] !== field.schemaType ? (t1 = documentId && field.actions && field.actions.length > 0 && /* @__PURE__ */ jsx(FieldActionsResolver, { actions: actions || EMPTY_ARRAY$v, documentId, documentType: field.schemaType.name, onActions: setFieldActionNodes, path: field.path, schemaType: field.schemaType }), $[3] = actions, $[4] = documentId, $[5] = field.actions, $[6] = field.path, $[7] = field.schemaType, $[8] = t1) : t1 = $[8];
|
|
16238
16238
|
const t2 = `field-${field.inputId}`;
|
|
16239
16239
|
let t3;
|
|
16240
16240
|
$[9] !== field.__internal_comments || $[10] !== field.__internal_slot || $[11] !== field.children || $[12] !== field.collapsed || $[13] !== field.collapsible || $[14] !== field.description || $[15] !== field.inputId || $[16] !== field.level || $[17] !== field.onCollapse || $[18] !== field.onExpand || $[19] !== field.presence || $[20] !== field.schemaType.deprecated || $[21] !== field.title || $[22] !== field.validation || $[23] !== fieldActionsNodes || $[24] !== t2 ? (t3 = /* @__PURE__ */ jsx(FormFieldSet, { __internal_comments: field.__internal_comments, __internal_slot: field.__internal_slot, __unstable_headerActions: fieldActionsNodes, __unstable_presence: field.presence, collapsed: field.collapsed, collapsible: field.collapsible, "data-testid": t2, description: field.description, level: field.level, onCollapse: field.onCollapse, onExpand: field.onExpand, title: field.title, validation: field.validation, inputId: field.inputId, deprecated: field.schemaType.deprecated, children: field.children }), $[9] = field.__internal_comments, $[10] = field.__internal_slot, $[11] = field.children, $[12] = field.collapsed, $[13] = field.collapsible, $[14] = field.description, $[15] = field.inputId, $[16] = field.level, $[17] = field.onCollapse, $[18] = field.onExpand, $[19] = field.presence, $[20] = field.schemaType.deprecated, $[21] = field.title, $[22] = field.validation, $[23] = fieldActionsNodes, $[24] = t2, $[25] = t3) : t3 = $[25];
|
|
@@ -16247,11 +16247,11 @@ function ObjectOrArrayField(field) {
|
|
|
16247
16247
|
] }), $[33] = t1, $[34] = t4, $[35] = t5) : t5 = $[35], t5;
|
|
16248
16248
|
}
|
|
16249
16249
|
function ImageOrFileField(field) {
|
|
16250
|
-
const $ = c(32), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$
|
|
16250
|
+
const $ = c(32), [fieldActionsNodes, setFieldActionNodes] = useState(EMPTY_ARRAY$v), documentId = usePublishedId$1(), focused = !!field.inputProps.focused;
|
|
16251
16251
|
let t0;
|
|
16252
16252
|
if ($[0] !== field.inputProps.members || $[1] !== field.presence) {
|
|
16253
16253
|
const hotspotField = field.inputProps.members.find(_temp$3M);
|
|
16254
|
-
t0 = hotspotField?.open ? field.presence : field.presence.concat(hotspotField?.field.presence || EMPTY_ARRAY$
|
|
16254
|
+
t0 = hotspotField?.open ? field.presence : field.presence.concat(hotspotField?.field.presence || EMPTY_ARRAY$v), $[0] = field.inputProps.members, $[1] = field.presence, $[2] = t0;
|
|
16255
16255
|
} else
|
|
16256
16256
|
t0 = $[2];
|
|
16257
16257
|
const presence = t0;
|
|
@@ -17479,13 +17479,13 @@ function HumanizedList(props2) {
|
|
|
17479
17479
|
let T0, t1;
|
|
17480
17480
|
if ($[1] !== listFormat || $[2] !== props2.values) {
|
|
17481
17481
|
const parts = listFormat.formatToParts(props2.values);
|
|
17482
|
-
T0 = Fragment, t1 = parts.map(_temp3$
|
|
17482
|
+
T0 = Fragment, t1 = parts.map(_temp3$H), $[1] = listFormat, $[2] = props2.values, $[3] = T0, $[4] = t1;
|
|
17483
17483
|
} else
|
|
17484
17484
|
T0 = $[3], t1 = $[4];
|
|
17485
17485
|
let t2;
|
|
17486
17486
|
return $[5] !== T0 || $[6] !== t1 ? (t2 = /* @__PURE__ */ jsx(T0, { children: t1 }), $[5] = T0, $[6] = t1, $[7] = t2) : t2 = $[7], t2;
|
|
17487
17487
|
}
|
|
17488
|
-
function _temp3$
|
|
17488
|
+
function _temp3$H(segment) {
|
|
17489
17489
|
return segment.type === "element" ? /* @__PURE__ */ jsx("code", { children: segment.value }, segment.value) : segment.value;
|
|
17490
17490
|
}
|
|
17491
17491
|
const HeaderButton = styled.button`
|
|
@@ -17697,17 +17697,17 @@ function ReferenceStrengthMismatchAlertStrip(t0) {
|
|
|
17697
17697
|
let t11;
|
|
17698
17698
|
return $[20] !== t1 || $[21] !== t10 ? (t11 = /* @__PURE__ */ jsx(AlertStrip, { padding: 1, title: t1, status: "warning", "data-testid": "alert-reference-strength-mismatch", children: t10 }), $[20] = t1, $[21] = t10, $[22] = t11) : t11 = $[22], t11;
|
|
17699
17699
|
}
|
|
17700
|
-
const noop$
|
|
17700
|
+
const noop$5 = () => {
|
|
17701
17701
|
}, INITIAL_LOADING_STATE$4 = {
|
|
17702
17702
|
isLoading: !0,
|
|
17703
17703
|
result: void 0,
|
|
17704
17704
|
error: void 0,
|
|
17705
|
-
retry: noop$
|
|
17705
|
+
retry: noop$5
|
|
17706
17706
|
}, EMPTY_STATE$2 = {
|
|
17707
17707
|
isLoading: !1,
|
|
17708
17708
|
result: void 0,
|
|
17709
17709
|
error: void 0,
|
|
17710
|
-
retry: noop$
|
|
17710
|
+
retry: noop$5
|
|
17711
17711
|
};
|
|
17712
17712
|
function useReferenceInfo$2(id2, getReferenceInfo2) {
|
|
17713
17713
|
const $ = c(10), [t0] = useState(_temp$3F), [onRetry$2, onRetry2] = t0;
|
|
@@ -17996,7 +17996,7 @@ function ReferenceInputPreview(props2) {
|
|
|
17996
17996
|
const menu = t13;
|
|
17997
17997
|
let t14;
|
|
17998
17998
|
$[48] !== onPathFocus ? (t14 = (event) => {
|
|
17999
|
-
event.target === elementRef.current && onPathFocus(EMPTY_ARRAY$
|
|
17999
|
+
event.target === elementRef.current && onPathFocus(EMPTY_ARRAY$z);
|
|
18000
18000
|
}, $[48] = onPathFocus, $[49] = t14) : t14 = $[49];
|
|
18001
18001
|
const handleFocus = t14;
|
|
18002
18002
|
if (isEditing) {
|
|
@@ -18359,7 +18359,7 @@ function StudioReferenceInput(props2) {
|
|
|
18359
18359
|
let t92;
|
|
18360
18360
|
if ($[35] !== initialValueTemplateItems || $[36] !== schemaType.to) {
|
|
18361
18361
|
let t102;
|
|
18362
|
-
$[38] !== schemaType.to ? (t102 = (i) => schemaType.to.some((_refType) => _refType.name === i.template?.schemaType), $[38] = schemaType.to, $[39] = t102) : t102 = $[39], t92 = (initialValueTemplateItems || []).filter(t102).map(_temp3$
|
|
18362
|
+
$[38] !== schemaType.to ? (t102 = (i) => schemaType.to.some((_refType) => _refType.name === i.template?.schemaType), $[38] = schemaType.to, $[39] = t102) : t102 = $[39], t92 = (initialValueTemplateItems || []).filter(t102).map(_temp3$G).filter(isNonNullable$3), $[35] = initialValueTemplateItems, $[36] = schemaType.to, $[37] = t92;
|
|
18363
18363
|
} else
|
|
18364
18364
|
t92 = $[37];
|
|
18365
18365
|
t8 = t92;
|
|
@@ -18371,7 +18371,7 @@ function StudioReferenceInput(props2) {
|
|
|
18371
18371
|
let t10;
|
|
18372
18372
|
return $[43] !== EditReferenceLink || $[44] !== createOptions || $[45] !== getReferenceInfo$1 || $[46] !== handleEditReference || $[47] !== handleSearch || $[48] !== isDocumentLiveEdit || $[49] !== props2 || $[50] !== selectedState ? (t10 = /* @__PURE__ */ jsx(ReferenceInput, { ...props2, onSearch: handleSearch, liveEdit: isDocumentLiveEdit, getReferenceInfo: getReferenceInfo$1, selectedState, editReferenceLinkComponent: EditReferenceLink, createOptions, onEditReference: handleEditReference }), $[43] = EditReferenceLink, $[44] = createOptions, $[45] = getReferenceInfo$1, $[46] = handleEditReference, $[47] = handleSearch, $[48] = isDocumentLiveEdit, $[49] = props2, $[50] = selectedState, $[51] = t10) : t10 = $[51], t10;
|
|
18373
18373
|
}
|
|
18374
|
-
function _temp3$
|
|
18374
|
+
function _temp3$G(item) {
|
|
18375
18375
|
return item.template?.schemaType ? {
|
|
18376
18376
|
id: item.id,
|
|
18377
18377
|
title: item.title || `${item.template.schemaType} from template ${item.template?.id}`,
|
|
@@ -19390,7 +19390,7 @@ function applyPatch(value, patch2) {
|
|
|
19390
19390
|
return _applyPatch(value, patch2);
|
|
19391
19391
|
}
|
|
19392
19392
|
function DocumentFieldActionsProvider(props2) {
|
|
19393
|
-
const $ = c(5), t0 = props2.actions || EMPTY_ARRAY$
|
|
19393
|
+
const $ = c(5), t0 = props2.actions || EMPTY_ARRAY$z;
|
|
19394
19394
|
let t1;
|
|
19395
19395
|
$[0] !== t0 ? (t1 = {
|
|
19396
19396
|
actions: t0
|
|
@@ -19875,7 +19875,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
19875
19875
|
}));
|
|
19876
19876
|
const uploader = new assetSource.Uploader();
|
|
19877
19877
|
setAssetSourceUploadComponents((prev) => {
|
|
19878
|
-
const AssetSourceComponent = assetSource.component, assetSourceComponent = /* @__PURE__ */ jsx(AssetSourceComponent, { assetSource, action: "upload", onSelect: (assets_0) => handleSelectAssetsFromSource(assets_0, schemaType_0, key_0), accept: "*/*", onClose: noop$
|
|
19878
|
+
const AssetSourceComponent = assetSource.component, assetSourceComponent = /* @__PURE__ */ jsx(AssetSourceComponent, { assetSource, action: "upload", onSelect: (assets_0) => handleSelectAssetsFromSource(assets_0, schemaType_0, key_0), accept: "*/*", onClose: noop$7, selectedAssets: [], selectionType: "single", uploader }, key_0);
|
|
19879
19879
|
return [...prev, assetSourceComponent];
|
|
19880
19880
|
});
|
|
19881
19881
|
const unsubscribe = uploader.subscribe((event_4) => {
|
|
@@ -19889,7 +19889,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
19889
19889
|
break bb183;
|
|
19890
19890
|
}
|
|
19891
19891
|
case "error": {
|
|
19892
|
-
event_4.files.forEach(_temp3$
|
|
19892
|
+
event_4.files.forEach(_temp3$F), toast.push({
|
|
19893
19893
|
status: "error",
|
|
19894
19894
|
description: t("asset-sources.common.uploader.upload-failed.description"),
|
|
19895
19895
|
title: t("asset-sources.common.uploader.upload-failed.title")
|
|
@@ -19979,7 +19979,7 @@ function ArrayOfObjectsField(props2) {
|
|
|
19979
19979
|
assetSourceUploadComponents
|
|
19980
19980
|
] }), $[136] = assetSourceUploadComponents, $[137] = handleChange, $[138] = onFieldGroupSelect, $[139] = onPathBlur, $[140] = onPathFocus, $[141] = onPathOpen, $[142] = onSetFieldSetCollapsed, $[143] = onSetPathCollapsed, $[144] = t31, $[145] = t32) : t32 = $[145], t32;
|
|
19981
19981
|
}
|
|
19982
|
-
function _temp3$
|
|
19982
|
+
function _temp3$F(_file) {
|
|
19983
19983
|
console.error(_file.error);
|
|
19984
19984
|
}
|
|
19985
19985
|
function _temp2$1v(item) {
|
|
@@ -20785,7 +20785,7 @@ const InvalidValueInput = forwardRef((props2, ref) => {
|
|
|
20785
20785
|
let t11;
|
|
20786
20786
|
$[32] !== t || $[33] !== validTypes.length ? (t11 = validTypes.length !== 1 && /* @__PURE__ */ jsx(Text$1, { as: "p", muted: !0, size: 1, children: t("inputs.invalid-value.details.multi-type-description") }), $[32] = t, $[33] = validTypes.length, $[34] = t11) : t11 = $[34];
|
|
20787
20787
|
let t12;
|
|
20788
|
-
$[35] !== validTypes ? (t12 = validTypes.length !== 1 && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp3$
|
|
20788
|
+
$[35] !== validTypes ? (t12 = validTypes.length !== 1 && /* @__PURE__ */ jsx(Stack, { as: "ul", space: 2, children: validTypes.map(_temp3$E) }), $[35] = validTypes, $[36] = t12) : t12 = $[36];
|
|
20789
20789
|
let t13;
|
|
20790
20790
|
$[37] !== actualType ? (t13 = {
|
|
20791
20791
|
actualType
|
|
@@ -20846,7 +20846,7 @@ function _temp2$1s() {
|
|
|
20846
20846
|
focus: _temp$3u
|
|
20847
20847
|
};
|
|
20848
20848
|
}
|
|
20849
|
-
function _temp3$
|
|
20849
|
+
function _temp3$E(validType) {
|
|
20850
20850
|
return /* @__PURE__ */ jsx(Text$1, { as: "li", children: /* @__PURE__ */ jsx("code", { children: validType }) }, validType);
|
|
20851
20851
|
}
|
|
20852
20852
|
const MAX_AVATARS_DOCK = 3, DEFAULT_MAX_AVATARS_FIELDS = 3, AVATAR_DISTANCE = -4, AVATAR_SIZE = 25, AVATAR_ARROW_HEIGHT = 4, INTERSECTION_THRESHOLDS = [0, 0.25, 0.75, 1], INTERSECTION_ELEMENT_PADDING = 23, SNAP_TO_DOCK_DISTANCE_TOP = 8, SNAP_TO_DOCK_DISTANCE_BOTTOM = 8, SLIDE_RIGHT_THRESHOLD_TOP = 20, SLIDE_RIGHT_THRESHOLD_BOTTOM = 20, DEBUG$1 = !1, splitRight = (array, max2) => {
|
|
@@ -21061,7 +21061,7 @@ const StatusIconWrapper = styled.div`
|
|
|
21061
21061
|
left: 8px;
|
|
21062
21062
|
position: relative;
|
|
21063
21063
|
width: 25px;
|
|
21064
|
-
`, EMPTY_ARRAY$
|
|
21064
|
+
`, EMPTY_ARRAY$u = [], VALIDATION_ICONS = {
|
|
21065
21065
|
error: ValidationErrorIcon,
|
|
21066
21066
|
warning: ValidationWarningIcon,
|
|
21067
21067
|
info: ValidationInfoIcon
|
|
@@ -21082,11 +21082,11 @@ function FormFieldValidationStatus(props2) {
|
|
|
21082
21082
|
__unstable_showSummary: showSummary,
|
|
21083
21083
|
fontSize,
|
|
21084
21084
|
placement
|
|
21085
|
-
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$
|
|
21085
|
+
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$u : t0, hasErrors = validation2.some(_temp$3t), hasWarnings = validation2.some(_temp2$1r), status = hasErrors ? "error" : hasWarnings ? "warning" : "info", StatusIcon = VALIDATION_ICONS[status];
|
|
21086
21086
|
let t1;
|
|
21087
21087
|
$[0] !== showSummary || $[1] !== validation2 ? (t1 = showSummary && /* @__PURE__ */ jsx(FormFieldValidationSummary, { validation: validation2 }), $[0] = showSummary, $[1] = validation2, $[2] = t1) : t1 = $[2];
|
|
21088
21088
|
let t2;
|
|
21089
|
-
$[3] !== showSummary || $[4] !== validation2 ? (t2 = !showSummary && /* @__PURE__ */ jsx(Fragment$1, { children: validation2.map(_temp3$
|
|
21089
|
+
$[3] !== showSummary || $[4] !== validation2 ? (t2 = !showSummary && /* @__PURE__ */ jsx(Fragment$1, { children: validation2.map(_temp3$D) }), $[3] = showSummary, $[4] = validation2, $[5] = t2) : t2 = $[5];
|
|
21090
21090
|
let t3;
|
|
21091
21091
|
$[6] !== t1 || $[7] !== t2 ? (t3 = /* @__PURE__ */ jsxs(StyledStack, { space: 3, children: [
|
|
21092
21092
|
t1,
|
|
@@ -21101,7 +21101,7 @@ function FormFieldValidationStatus(props2) {
|
|
|
21101
21101
|
let t7;
|
|
21102
21102
|
return $[16] !== placement || $[17] !== t3 || $[18] !== t6 ? (t7 = /* @__PURE__ */ jsx(Tooltip, { content: t3, portal: !0, placement, fallbackPlacements: t4, children: t6 }), $[16] = placement, $[17] = t3, $[18] = t6, $[19] = t7) : t7 = $[19], t7;
|
|
21103
21103
|
}
|
|
21104
|
-
function _temp3$
|
|
21104
|
+
function _temp3$D(item, itemIndex) {
|
|
21105
21105
|
return /* @__PURE__ */ jsx(FormFieldValidationStatusItem, { validation: item }, itemIndex);
|
|
21106
21106
|
}
|
|
21107
21107
|
function _temp2$1r(v_0) {
|
|
@@ -21192,7 +21192,7 @@ const LabelSuffix = styled(Flex)`
|
|
|
21192
21192
|
* the intrinsic block size of the label.
|
|
21193
21193
|
*/
|
|
21194
21194
|
contain: size;
|
|
21195
|
-
`, EMPTY_ARRAY$
|
|
21195
|
+
`, EMPTY_ARRAY$t = [], FormFieldHeaderText = memo(function(props2) {
|
|
21196
21196
|
const $ = c(28), {
|
|
21197
21197
|
description,
|
|
21198
21198
|
inputId,
|
|
@@ -21200,7 +21200,7 @@ const LabelSuffix = styled(Flex)`
|
|
|
21200
21200
|
deprecated,
|
|
21201
21201
|
validation: t0,
|
|
21202
21202
|
suffix
|
|
21203
|
-
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$
|
|
21203
|
+
} = props2, validation2 = t0 === void 0 ? EMPTY_ARRAY$t : t0, {
|
|
21204
21204
|
t
|
|
21205
21205
|
} = useTranslation(), hasValidations = validation2.length > 0;
|
|
21206
21206
|
let t1;
|
|
@@ -21232,7 +21232,7 @@ const LabelSuffix = styled(Flex)`
|
|
|
21232
21232
|
t6,
|
|
21233
21233
|
t7
|
|
21234
21234
|
] }), $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8) : t8 = $[27], t8;
|
|
21235
|
-
}), EMPTY_ARRAY$
|
|
21235
|
+
}), EMPTY_ARRAY$s = [], FormField = memo(function(props2) {
|
|
21236
21236
|
const $ = c(34);
|
|
21237
21237
|
let children, comments2, deprecated, description, inputId, level, restProps, t0, t1, t2, title, validation2;
|
|
21238
21238
|
$[0] !== props2 ? ({
|
|
@@ -21249,7 +21249,7 @@ const LabelSuffix = styled(Flex)`
|
|
|
21249
21249
|
deprecated,
|
|
21250
21250
|
...restProps
|
|
21251
21251
|
} = props2, $[0] = props2, $[1] = children, $[2] = comments2, $[3] = deprecated, $[4] = description, $[5] = inputId, $[6] = level, $[7] = restProps, $[8] = t0, $[9] = t1, $[10] = t2, $[11] = title, $[12] = validation2) : (children = $[1], comments2 = $[2], deprecated = $[3], description = $[4], inputId = $[5], level = $[6], restProps = $[7], t0 = $[8], t1 = $[9], t2 = $[10], title = $[11], validation2 = $[12]);
|
|
21252
|
-
const actions = t0 === void 0 ? EMPTY_ARRAY$
|
|
21252
|
+
const actions = t0 === void 0 ? EMPTY_ARRAY$s : t0, presence = t1 === void 0 ? EMPTY_ARRAY$s : t1, slot = t2 === void 0 ? null : t2, {
|
|
21253
21253
|
focused,
|
|
21254
21254
|
hovered,
|
|
21255
21255
|
onMouseEnter,
|
|
@@ -21398,7 +21398,7 @@ const Root$v = styled(Stack).attrs({
|
|
|
21398
21398
|
box-shadow: none;
|
|
21399
21399
|
}
|
|
21400
21400
|
`;
|
|
21401
|
-
}), EMPTY_ARRAY$
|
|
21401
|
+
}), EMPTY_ARRAY$r = [], FormFieldSet = forwardRef(function(props2, forwardedRef) {
|
|
21402
21402
|
const $ = c(82);
|
|
21403
21403
|
let children, collapsed, collapsible, columns, comments2, deprecated, description, inputId, onCollapse, onExpand, onFocus, restProps, t0, t1, t2, t3, t4, tabIndex, title;
|
|
21404
21404
|
$[0] !== props2 ? ({
|
|
@@ -21422,7 +21422,7 @@ const Root$v = styled(Stack).attrs({
|
|
|
21422
21422
|
deprecated,
|
|
21423
21423
|
...restProps
|
|
21424
21424
|
} = props2, $[0] = props2, $[1] = children, $[2] = collapsed, $[3] = collapsible, $[4] = columns, $[5] = comments2, $[6] = deprecated, $[7] = description, $[8] = inputId, $[9] = onCollapse, $[10] = onExpand, $[11] = onFocus, $[12] = restProps, $[13] = t0, $[14] = t1, $[15] = t2, $[16] = t3, $[17] = t4, $[18] = tabIndex, $[19] = title) : (children = $[1], collapsed = $[2], collapsible = $[3], columns = $[4], comments2 = $[5], deprecated = $[6], description = $[7], inputId = $[8], onCollapse = $[9], onExpand = $[10], onFocus = $[11], restProps = $[12], t0 = $[13], t1 = $[14], t2 = $[15], t3 = $[16], t4 = $[17], tabIndex = $[18], title = $[19]);
|
|
21425
|
-
const slot = t0 === void 0 ? null : t0, actions = t1 === void 0 ? EMPTY_ARRAY$
|
|
21425
|
+
const slot = t0 === void 0 ? null : t0, actions = t1 === void 0 ? EMPTY_ARRAY$r : t1, presence = t2 === void 0 ? EMPTY_ARRAY$r : t2, level = t3 === void 0 ? 0 : t3, validation2 = t4 === void 0 ? EMPTY_ARRAY$r : t4, {
|
|
21426
21426
|
focused,
|
|
21427
21427
|
hovered,
|
|
21428
21428
|
onMouseEnter,
|
|
@@ -21983,7 +21983,7 @@ function fileTarget(Component2) {
|
|
|
21983
21983
|
let t8;
|
|
21984
21984
|
$[24] !== onFiles ? (t8 = (event_3) => {
|
|
21985
21985
|
if (onFiles) {
|
|
21986
|
-
if (Array.from(event_3.dataTransfer.items).map(_temp3$
|
|
21986
|
+
if (Array.from(event_3.dataTransfer.items).map(_temp3$C).some(_temp4$i))
|
|
21987
21987
|
return;
|
|
21988
21988
|
event_3.preventDefault(), event_3.stopPropagation();
|
|
21989
21989
|
}
|
|
@@ -22042,7 +22042,7 @@ function _temp$3p(item) {
|
|
|
22042
22042
|
function _temp2$1p(item_0) {
|
|
22043
22043
|
return isPortableTextItem(item_0);
|
|
22044
22044
|
}
|
|
22045
|
-
function _temp3$
|
|
22045
|
+
function _temp3$C(item_1) {
|
|
22046
22046
|
return {
|
|
22047
22047
|
type: item_1.type,
|
|
22048
22048
|
kind: item_1.kind
|
|
@@ -22166,7 +22166,7 @@ function uploadTarget$1(Component2) {
|
|
|
22166
22166
|
const alertRejectedFiles = t1;
|
|
22167
22167
|
let t2;
|
|
22168
22168
|
$[13] !== alertRejectedFiles || $[14] !== formBuilder || $[15] !== onSelectFile || $[16] !== types ? (t2 = (files) => {
|
|
22169
|
-
const filesAndAssetSources = getFilesAndAssetSources(files, types, assetSourceDestinationName.current, formBuilder), ready = filesAndAssetSources.filter(_temp2$1o), rejected_0 = filesAndAssetSources.filter(_temp3$
|
|
22169
|
+
const filesAndAssetSources = getFilesAndAssetSources(files, types, assetSourceDestinationName.current, formBuilder), ready = filesAndAssetSources.filter(_temp2$1o), rejected_0 = filesAndAssetSources.filter(_temp3$B);
|
|
22170
22170
|
rejected_0.length > 0 && alertRejectedFiles(rejected_0), onSelectFile && ready.forEach((entry_1) => {
|
|
22171
22171
|
onSelectFile({
|
|
22172
22172
|
assetSource: entry_1.assetSource,
|
|
@@ -22286,7 +22286,7 @@ function _temp$3n(task, i) {
|
|
|
22286
22286
|
function _temp2$1o(entry) {
|
|
22287
22287
|
return entry.assetSource !== null;
|
|
22288
22288
|
}
|
|
22289
|
-
function _temp3$
|
|
22289
|
+
function _temp3$B(entry_0) {
|
|
22290
22290
|
return entry_0.assetSource === null;
|
|
22291
22291
|
}
|
|
22292
22292
|
function _temp4$h(entry_2) {
|
|
@@ -23007,7 +23007,7 @@ function useValuePreviewWithFallback(props2) {
|
|
|
23007
23007
|
value: t2
|
|
23008
23008
|
}, $[6] = preview, $[7] = t2, $[8] = t3) : t3 = $[8], t3;
|
|
23009
23009
|
}
|
|
23010
|
-
const MAX_LENGTH = 5, EMPTY_ARRAY$
|
|
23010
|
+
const MAX_LENGTH$1 = 5, EMPTY_ARRAY$q = [], SEPARATOR$1 = "/", RootInline = styled(Inline)`
|
|
23011
23011
|
flex-wrap: nowrap;
|
|
23012
23012
|
overflow: hidden;
|
|
23013
23013
|
min-width: 0;
|
|
@@ -23098,7 +23098,7 @@ const MAX_LENGTH = 5, EMPTY_ARRAY$s = [], SEPARATOR = "/", RootInline = styled(I
|
|
|
23098
23098
|
] }), $[23] = t12, $[24] = t5, $[25] = t13) : t13 = $[25];
|
|
23099
23099
|
let t14;
|
|
23100
23100
|
return $[26] !== handleClick || $[27] !== t13 ? (t14 = /* @__PURE__ */ jsx(Card, { as: "button", padding: 1, radius: 3, onClick: handleClick, style: t3, children: t13 }), $[26] = handleClick, $[27] = t13, $[28] = t14) : t14 = $[28], t14;
|
|
23101
|
-
}, SeparatorItem = forwardRef(function(props2, ref) {
|
|
23101
|
+
}, SeparatorItem$1 = forwardRef(function(props2, ref) {
|
|
23102
23102
|
const $ = c(5), {
|
|
23103
23103
|
children
|
|
23104
23104
|
} = props2;
|
|
@@ -23107,18 +23107,18 @@ const MAX_LENGTH = 5, EMPTY_ARRAY$s = [], SEPARATOR = "/", RootInline = styled(I
|
|
|
23107
23107
|
let t1;
|
|
23108
23108
|
return $[2] !== ref || $[3] !== t0 ? (t1 = /* @__PURE__ */ jsx(Box, { ref, children: t0 }), $[2] = ref, $[3] = t0, $[4] = t1) : t1 = $[4], t1;
|
|
23109
23109
|
});
|
|
23110
|
-
function DialogBreadcrumbs(props2) {
|
|
23110
|
+
function DialogBreadcrumbs$1(props2) {
|
|
23111
23111
|
const $ = c(29), {
|
|
23112
23112
|
items: t0,
|
|
23113
23113
|
onPathSelect,
|
|
23114
23114
|
selectedPath,
|
|
23115
23115
|
siblings
|
|
23116
|
-
} = props2, itemsProp = t0 === void 0 ? EMPTY_ARRAY$
|
|
23116
|
+
} = props2, itemsProp = t0 === void 0 ? EMPTY_ARRAY$q : t0, [rootElement, setRootElement] = useState(null), size = useElementSize(rootElement);
|
|
23117
23117
|
let t1;
|
|
23118
23118
|
bb0: {
|
|
23119
23119
|
const w = size?.border.width;
|
|
23120
23120
|
if (!w) {
|
|
23121
|
-
t1 = MAX_LENGTH;
|
|
23121
|
+
t1 = MAX_LENGTH$1;
|
|
23122
23122
|
break bb0;
|
|
23123
23123
|
}
|
|
23124
23124
|
if (w < 500) {
|
|
@@ -23129,7 +23129,7 @@ function DialogBreadcrumbs(props2) {
|
|
|
23129
23129
|
t1 = 4;
|
|
23130
23130
|
break bb0;
|
|
23131
23131
|
}
|
|
23132
|
-
t1 = MAX_LENGTH;
|
|
23132
|
+
t1 = MAX_LENGTH$1;
|
|
23133
23133
|
}
|
|
23134
23134
|
const maxLength = t1;
|
|
23135
23135
|
let t2;
|
|
@@ -23156,24 +23156,24 @@ function DialogBreadcrumbs(props2) {
|
|
|
23156
23156
|
}, menu: /* @__PURE__ */ jsx(Menu, { children: item.map((overflowItem) => /* @__PURE__ */ jsx(Box, { padding: 1, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", align: "center", style: {
|
|
23157
23157
|
maxWidth: "250px"
|
|
23158
23158
|
}, children: [
|
|
23159
|
-
/* @__PURE__ */ jsx(SeparatorItem, { children: SEPARATOR }),
|
|
23159
|
+
/* @__PURE__ */ jsx(SeparatorItem$1, { children: SEPARATOR$1 }),
|
|
23160
23160
|
/* @__PURE__ */ jsx(MenuCard, { item: overflowItem, onPathSelect, isSelected: !1, isLast: !1, siblings }, overflowItem.path.toString())
|
|
23161
23161
|
] }) }, overflowItem.path.toString())) }) }),
|
|
23162
|
-
showSeparator && /* @__PURE__ */ jsx(SeparatorItem, { children: SEPARATOR })
|
|
23162
|
+
showSeparator && /* @__PURE__ */ jsx(SeparatorItem$1, { children: SEPARATOR$1 })
|
|
23163
23163
|
] }, key);
|
|
23164
23164
|
const isSelected = isEqual$2(item.path, selectedPath), isLast = index === items.length - 1;
|
|
23165
23165
|
return /* @__PURE__ */ jsxs(Inline, { flex: isLast ? 1 : void 0, style: {
|
|
23166
23166
|
minWidth: 0
|
|
23167
23167
|
}, children: [
|
|
23168
23168
|
/* @__PURE__ */ jsx(MenuCard, { item, isSelected, onPathSelect, isLast, siblings }),
|
|
23169
|
-
showSeparator && /* @__PURE__ */ jsx(SeparatorItem, { children: SEPARATOR })
|
|
23169
|
+
showSeparator && /* @__PURE__ */ jsx(SeparatorItem$1, { children: SEPARATOR$1 })
|
|
23170
23170
|
] }, key);
|
|
23171
23171
|
}, $[9] = items.length, $[10] = onPathSelect, $[11] = selectedPath, $[12] = siblings, $[13] = t42) : t42 = $[13], t3 = items.map(t42), $[4] = items, $[5] = onPathSelect, $[6] = selectedPath, $[7] = siblings, $[8] = t3;
|
|
23172
23172
|
} else
|
|
23173
23173
|
t3 = $[8];
|
|
23174
23174
|
const nodes = t3;
|
|
23175
23175
|
let t4;
|
|
23176
|
-
$[14] !== onPathSelect ? (t4 = () => onPathSelect(EMPTY_ARRAY$
|
|
23176
|
+
$[14] !== onPathSelect ? (t4 = () => onPathSelect(EMPTY_ARRAY$q), $[14] = onPathSelect, $[15] = t4) : t4 = $[15];
|
|
23177
23177
|
let t5;
|
|
23178
23178
|
$[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t5 = {
|
|
23179
23179
|
textTransform: "capitalize",
|
|
@@ -23191,7 +23191,7 @@ function DialogBreadcrumbs(props2) {
|
|
|
23191
23191
|
let t9;
|
|
23192
23192
|
$[22] !== t4 || $[23] !== t8 ? (t9 = /* @__PURE__ */ jsx(Card, { onClick: t4, as: "button", paddingRight: 1, paddingY: 1, radius: 3, children: t8 }), $[22] = t4, $[23] = t8, $[24] = t9) : t9 = $[24];
|
|
23193
23193
|
let t10;
|
|
23194
|
-
$[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsx(SeparatorItem, { children: SEPARATOR }), $[25] = t10) : t10 = $[25];
|
|
23194
|
+
$[25] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = /* @__PURE__ */ jsx(SeparatorItem$1, { children: SEPARATOR$1 }), $[25] = t10) : t10 = $[25];
|
|
23195
23195
|
let t11;
|
|
23196
23196
|
return $[26] !== nodes || $[27] !== t9 ? (t11 = /* @__PURE__ */ jsxs(RootInline, { ref: setRootElement, children: [
|
|
23197
23197
|
t9,
|
|
@@ -23307,10 +23307,10 @@ function useImageObjectUrl(url) {
|
|
|
23307
23307
|
function _temp$3j(prev) {
|
|
23308
23308
|
return prev.objectUrl || prev.isLoading || prev.error ? IDLE_RESULT : prev;
|
|
23309
23309
|
}
|
|
23310
|
-
const noop$
|
|
23310
|
+
const noop$4 = () => {
|
|
23311
23311
|
}, UNDEFINED = (
|
|
23312
23312
|
/*#__NOINLINE__*/
|
|
23313
|
-
noop$
|
|
23313
|
+
noop$4()
|
|
23314
23314
|
), OBJECT = Object, isUndefined = (v) => v === UNDEFINED, isFunction = (v) => typeof v == "function", mergeObjects = (a, b) => ({
|
|
23315
23315
|
...a,
|
|
23316
23316
|
...b
|
|
@@ -23359,8 +23359,8 @@ const isOnline = () => online, [onWindowEvent, offWindowEvent] = isWindowDefined
|
|
|
23359
23359
|
window.addEventListener.bind(window),
|
|
23360
23360
|
window.removeEventListener.bind(window)
|
|
23361
23361
|
] : [
|
|
23362
|
-
noop$
|
|
23363
|
-
noop$
|
|
23362
|
+
noop$4,
|
|
23363
|
+
noop$4
|
|
23364
23364
|
], isVisible = () => {
|
|
23365
23365
|
const visibilityState = isDocumentDefined && document.visibilityState;
|
|
23366
23366
|
return isUndefined(visibilityState) || visibilityState !== "hidden";
|
|
@@ -23491,7 +23491,7 @@ const revalidateAllKeys = (revalidators, type) => {
|
|
|
23491
23491
|
}, initCache = (provider, options) => {
|
|
23492
23492
|
if (!SWRGlobalState.has(provider)) {
|
|
23493
23493
|
const opts = mergeObjects(defaultConfigOptions, options), EVENT_REVALIDATORS = {}, mutate2 = internalMutate.bind(UNDEFINED, provider);
|
|
23494
|
-
let unmount = noop$
|
|
23494
|
+
let unmount = noop$4;
|
|
23495
23495
|
const subscriptions = {}, subscribe2 = (key, callback) => {
|
|
23496
23496
|
const subs = subscriptions[key] || [];
|
|
23497
23497
|
return subscriptions[key] = subs, subs.push(callback), () => subs.splice(subs.indexOf(callback), 1);
|
|
@@ -23534,11 +23534,11 @@ const revalidateAllKeys = (revalidators, type) => {
|
|
|
23534
23534
|
}, compare = (currentData, newData) => stableHash(currentData) == stableHash(newData), [cache, mutate] = initCache(/* @__PURE__ */ new Map()), defaultConfig = mergeObjects(
|
|
23535
23535
|
{
|
|
23536
23536
|
// events
|
|
23537
|
-
onLoadingSlow: noop$
|
|
23538
|
-
onSuccess: noop$
|
|
23539
|
-
onError: noop$
|
|
23537
|
+
onLoadingSlow: noop$4,
|
|
23538
|
+
onSuccess: noop$4,
|
|
23539
|
+
onError: noop$4,
|
|
23540
23540
|
onErrorRetry,
|
|
23541
|
-
onDiscarded: noop$
|
|
23541
|
+
onDiscarded: noop$4,
|
|
23542
23542
|
// switches
|
|
23543
23543
|
revalidateOnFocus: !0,
|
|
23544
23544
|
revalidateOnReconnect: !0,
|
|
@@ -24316,21 +24316,6 @@ function FullscreenPTEProvider(t0) {
|
|
|
24316
24316
|
function useFullscreenPTE() {
|
|
24317
24317
|
return useContext(FullscreenPTEContext);
|
|
24318
24318
|
}
|
|
24319
|
-
function getRootPath$1(path) {
|
|
24320
|
-
const keyedSegmentIndex = path.findIndex((seg) => seg?.hasOwnProperty("_key"));
|
|
24321
|
-
return keyedSegmentIndex === -1 ? path : path.slice(0, keyedSegmentIndex);
|
|
24322
|
-
}
|
|
24323
|
-
function getSchemaField$3(schemaType, fieldPath) {
|
|
24324
|
-
if (!fieldPath) return;
|
|
24325
|
-
const paths = fromString(fieldPath), firstPath = paths[0];
|
|
24326
|
-
if (firstPath && isObjectSchemaType(schemaType)) {
|
|
24327
|
-
const field = schemaType?.fields?.find((f) => f.name === firstPath);
|
|
24328
|
-
if (field) {
|
|
24329
|
-
const nextPath = toString(paths.slice(1));
|
|
24330
|
-
return nextPath ? getSchemaField$3(field.type, nextPath) : field;
|
|
24331
|
-
}
|
|
24332
|
-
}
|
|
24333
|
-
}
|
|
24334
24319
|
function getItemType(arrayType, item) {
|
|
24335
24320
|
const itemTypeName = resolveTypeName$2(item);
|
|
24336
24321
|
return itemTypeName === "object" && arrayType.of.length === 1 ? arrayType.of[0] : arrayType.of.find((memberType) => memberType.name === itemTypeName);
|
|
@@ -24339,80 +24324,6 @@ function getPrimitiveItemType(arrayType, item) {
|
|
|
24339
24324
|
const itemTypeName = resolveTypeName$2(item);
|
|
24340
24325
|
return arrayType?.of.find((memberType) => memberType.name === itemTypeName || memberType.jsonType === itemTypeName);
|
|
24341
24326
|
}
|
|
24342
|
-
function findArrayTypePaths(fields) {
|
|
24343
|
-
const arrayPaths = [];
|
|
24344
|
-
let currentPath = [];
|
|
24345
|
-
function checkFields(nestedFields) {
|
|
24346
|
-
nestedFields.forEach((field) => {
|
|
24347
|
-
const newPath = [...currentPath, field.name];
|
|
24348
|
-
isArrayOfObjectsSchemaType(field.type) && arrayPaths.push(newPath), isObjectSchemaType(field.type) && (currentPath = newPath, checkFields(field.type.fields), currentPath = currentPath.slice(0, -1));
|
|
24349
|
-
});
|
|
24350
|
-
}
|
|
24351
|
-
return checkFields(fields), arrayPaths;
|
|
24352
|
-
}
|
|
24353
|
-
function findPTEtypePaths(fields, basePath = [], visitedTypes = /* @__PURE__ */ new Set()) {
|
|
24354
|
-
const arrayPaths = [];
|
|
24355
|
-
return fields.forEach((field) => {
|
|
24356
|
-
const newPath = [...basePath, field.name];
|
|
24357
|
-
if (isArrayOfBlocksSchemaType(field.type) && arrayPaths.push(newPath), isObjectSchemaType(field.type)) {
|
|
24358
|
-
const typeName = field.type.name;
|
|
24359
|
-
if (!visitedTypes.has(typeName)) {
|
|
24360
|
-
const newVisitedTypes = new Set(visitedTypes);
|
|
24361
|
-
newVisitedTypes.add(typeName);
|
|
24362
|
-
const nestedPaths = findPTEtypePaths(field.type.fields, newPath, newVisitedTypes);
|
|
24363
|
-
arrayPaths.push(...nestedPaths);
|
|
24364
|
-
}
|
|
24365
|
-
}
|
|
24366
|
-
isArrayOfObjectsSchemaType(field.type) && field.type.of?.forEach((arrayMemberType) => {
|
|
24367
|
-
if (isObjectSchemaType(arrayMemberType)) {
|
|
24368
|
-
const typeName = arrayMemberType.name;
|
|
24369
|
-
if (!visitedTypes.has(typeName)) {
|
|
24370
|
-
const newVisitedTypes = new Set(visitedTypes);
|
|
24371
|
-
newVisitedTypes.add(typeName);
|
|
24372
|
-
const nestedPaths = findPTEtypePaths(arrayMemberType.fields, newPath, newVisitedTypes);
|
|
24373
|
-
arrayPaths.push(...nestedPaths);
|
|
24374
|
-
}
|
|
24375
|
-
}
|
|
24376
|
-
});
|
|
24377
|
-
}), arrayPaths;
|
|
24378
|
-
}
|
|
24379
|
-
function isPathTextInPTEField(fields, targetPath, documentValue) {
|
|
24380
|
-
if (targetPath.length === 0) return !1;
|
|
24381
|
-
const allPTEPaths = findPTEtypePaths(fields), possiblePaths = [], currentSegments = [];
|
|
24382
|
-
for (const segment of targetPath)
|
|
24383
|
-
typeof segment == "string" && (currentSegments.push(segment), possiblePaths.push(currentSegments.join(".")));
|
|
24384
|
-
const isWithinPTEField = allPTEPaths.some((parentPath) => possiblePaths.some((path) => path === pathToString(parentPath) || startsWith(parentPath, stringToPath(path)))), containsChildren = targetPath.some((segment) => typeof segment == "string" && segment === "children");
|
|
24385
|
-
if (!isWithinPTEField || !containsChildren) return !1;
|
|
24386
|
-
if (!documentValue) return !0;
|
|
24387
|
-
const valueAtPath = get$1(documentValue, targetPath);
|
|
24388
|
-
return !(valueAtPath && typeof valueAtPath == "object" && "_type" in valueAtPath && valueAtPath._type !== "span");
|
|
24389
|
-
}
|
|
24390
|
-
function buildBreadcrumbsState(props2) {
|
|
24391
|
-
const {
|
|
24392
|
-
arraySchemaType,
|
|
24393
|
-
arrayValue,
|
|
24394
|
-
itemPath,
|
|
24395
|
-
parentPath
|
|
24396
|
-
} = props2, items = arrayValue.map((arrayItem) => {
|
|
24397
|
-
const nestedItemPath = [...parentPath, {
|
|
24398
|
-
_key: arrayItem._key
|
|
24399
|
-
}], itemType = getItemType(arraySchemaType, arrayItem);
|
|
24400
|
-
return isReferenceSchemaType(itemType) || !itemType ? null : {
|
|
24401
|
-
children: EMPTY_ARRAY$B,
|
|
24402
|
-
parentSchemaType: arraySchemaType,
|
|
24403
|
-
path: nestedItemPath,
|
|
24404
|
-
schemaType: itemType,
|
|
24405
|
-
value: arrayItem
|
|
24406
|
-
};
|
|
24407
|
-
}).filter(Boolean), selectedItem = items.find((item) => isEqual$2(item.path, itemPath));
|
|
24408
|
-
return {
|
|
24409
|
-
children: items,
|
|
24410
|
-
parentSchemaType: arraySchemaType,
|
|
24411
|
-
path: itemPath,
|
|
24412
|
-
schemaType: selectedItem.schemaType,
|
|
24413
|
-
value: selectedItem.value
|
|
24414
|
-
};
|
|
24415
|
-
}
|
|
24416
24327
|
function isArrayItemSelected(itemPath, path) {
|
|
24417
24328
|
return JSON.stringify(itemPath) === JSON.stringify(path);
|
|
24418
24329
|
}
|
|
@@ -24430,24 +24341,6 @@ function shouldBeInBreadcrumb(itemPath, path, documentValue) {
|
|
|
24430
24341
|
if (typeof segment == "string" ? currentValue = currentValue?.[segment] : typeof segment == "object" && isKeySegment(segment) && Array.isArray(currentValue) && (currentValue = currentValue.find((child) => child?._key === segment._key)), !currentValue) break;
|
|
24431
24342
|
return currentValue && typeof currentValue == "object" && "_type" in currentValue && hasSpanChildren(currentValue) ? !1 : itemPath.every((segment, index) => isArrayItemSelected(path[index], segment)) && isArrayItemPath(itemPath);
|
|
24432
24343
|
}
|
|
24433
|
-
function validateRelativePathExists(relativePath, documentValue) {
|
|
24434
|
-
if (!relativePath || relativePath.length === 0)
|
|
24435
|
-
return relativePath;
|
|
24436
|
-
let result = null;
|
|
24437
|
-
return relativePath.forEach((segment, i) => {
|
|
24438
|
-
if (result !== null || !isKeySegment(segment))
|
|
24439
|
-
return;
|
|
24440
|
-
const parentPath = relativePath.slice(0, i), parentValue = getValueAtPath(documentValue, parentPath);
|
|
24441
|
-
if (!Array.isArray(parentValue)) {
|
|
24442
|
-
result = parentPath;
|
|
24443
|
-
return;
|
|
24444
|
-
}
|
|
24445
|
-
parentValue.some((item) => item && typeof item == "object" && "_key" in item && item._key === segment._key) || (result = parentPath);
|
|
24446
|
-
}), result !== null ? result : relativePath;
|
|
24447
|
-
}
|
|
24448
|
-
function getRelativePath(path) {
|
|
24449
|
-
return isArrayItemPath(path) ? path : path.slice(0, path.length - 1);
|
|
24450
|
-
}
|
|
24451
24344
|
function shouldSkipSiblingCount(args) {
|
|
24452
24345
|
const {
|
|
24453
24346
|
arraySchemaType,
|
|
@@ -24455,303 +24348,7 @@ function shouldSkipSiblingCount(args) {
|
|
|
24455
24348
|
} = args, lastFieldSegment = fieldPath[fieldPath.length - 1];
|
|
24456
24349
|
return isArrayOfBlocksSchemaType(arraySchemaType) && lastFieldSegment === "children";
|
|
24457
24350
|
}
|
|
24458
|
-
|
|
24459
|
-
const {
|
|
24460
|
-
childField,
|
|
24461
|
-
childPath,
|
|
24462
|
-
childValue,
|
|
24463
|
-
documentValue,
|
|
24464
|
-
openPath,
|
|
24465
|
-
recursive,
|
|
24466
|
-
rootSchemaType,
|
|
24467
|
-
breadcrumbs,
|
|
24468
|
-
childrenMenuItems
|
|
24469
|
-
} = props2;
|
|
24470
|
-
let relativePath = null;
|
|
24471
|
-
const siblings = /* @__PURE__ */ new Map(), portableTextValue = Array.isArray(childValue) ? childValue : [], isTextContent = isPathTextInPTEField(rootSchemaType.fields, openPath, documentValue);
|
|
24472
|
-
return isTextContent ? {
|
|
24473
|
-
breadcrumbs,
|
|
24474
|
-
childrenMenuItems,
|
|
24475
|
-
siblings,
|
|
24476
|
-
relativePath: null
|
|
24477
|
-
} : (portableTextValue.forEach((block) => {
|
|
24478
|
-
const blockObj = block;
|
|
24479
|
-
if (!blockObj._key || !blockObj._type || blockObj._type === "block") return;
|
|
24480
|
-
const blockPath = [...childPath, {
|
|
24481
|
-
_key: blockObj._key
|
|
24482
|
-
}], blockSchemaType = childField.type.of ? getItemType(childField.type, blockObj) : null;
|
|
24483
|
-
if (!blockSchemaType || !blockSchemaType || !isObjectSchemaType(blockSchemaType) || !blockSchemaType.fields || isReferenceSchemaType(blockSchemaType)) return;
|
|
24484
|
-
if (isArrayItemSelected(blockPath, openPath) && (relativePath = getRelativePath(blockPath)), startsWith(blockPath, openPath) && shouldBeInBreadcrumb(blockPath, openPath, documentValue)) {
|
|
24485
|
-
const blockBreadcrumb = {
|
|
24486
|
-
children: EMPTY_ARRAY$B,
|
|
24487
|
-
parentSchemaType: childField.type,
|
|
24488
|
-
path: blockPath,
|
|
24489
|
-
schemaType: blockSchemaType,
|
|
24490
|
-
value: blockObj
|
|
24491
|
-
};
|
|
24492
|
-
breadcrumbs.push(blockBreadcrumb);
|
|
24493
|
-
}
|
|
24494
|
-
const blockChildrenMenuItems = [];
|
|
24495
|
-
blockSchemaType.fields.forEach((blockField) => {
|
|
24496
|
-
if (isArrayOfObjectsSchemaType(blockField.type) && !isArrayOfBlocksSchemaType(blockField.type)) {
|
|
24497
|
-
const blockFieldPath = [...blockPath, blockField.name], blockFieldValue = getValueAtPath(documentValue, blockFieldPath);
|
|
24498
|
-
if (startsWith(blockFieldPath, openPath)) {
|
|
24499
|
-
const lastSegment = openPath[openPath.length - 1];
|
|
24500
|
-
if (isKeySegment(lastSegment)) {
|
|
24501
|
-
const targetItem = (Array.isArray(blockFieldValue) ? blockFieldValue : []).find((item) => item && typeof item == "object" && "_key" in item && item._key === lastSegment._key), itemSchemaType = targetItem ? getItemType(blockField.type, targetItem) : null;
|
|
24502
|
-
if (itemSchemaType && isReferenceSchemaType(itemSchemaType)) return;
|
|
24503
|
-
}
|
|
24504
|
-
relativePath = getRelativePath(openPath);
|
|
24505
|
-
const arrayFieldValue = Array.isArray(blockFieldValue) ? blockFieldValue : [];
|
|
24506
|
-
if (shouldBeInBreadcrumb(blockFieldPath, openPath, documentValue)) {
|
|
24507
|
-
const breadcrumbsResult = buildBreadcrumbsState({
|
|
24508
|
-
arraySchemaType: blockField.type,
|
|
24509
|
-
arrayValue: arrayFieldValue,
|
|
24510
|
-
itemPath: blockFieldPath,
|
|
24511
|
-
parentPath: blockPath
|
|
24512
|
-
});
|
|
24513
|
-
breadcrumbs.push(breadcrumbsResult);
|
|
24514
|
-
}
|
|
24515
|
-
const blockFieldState = recursive({
|
|
24516
|
-
documentValue,
|
|
24517
|
-
path: blockFieldPath,
|
|
24518
|
-
schemaType: blockField
|
|
24519
|
-
}), blockFieldPathString = pathToString$1(blockFieldPath), skipChildren = shouldSkipSiblingCount({
|
|
24520
|
-
arraySchemaType: childField.type,
|
|
24521
|
-
fieldPath: blockFieldPath
|
|
24522
|
-
});
|
|
24523
|
-
blockFieldState.siblings.forEach((info, pathString) => {
|
|
24524
|
-
skipChildren && pathString === blockFieldPathString || siblings.set(pathString, info);
|
|
24525
|
-
}), blockChildrenMenuItems.push({
|
|
24526
|
-
children: blockFieldState?.menuItems || EMPTY_ARRAY$B,
|
|
24527
|
-
parentSchemaType: blockSchemaType,
|
|
24528
|
-
path: blockFieldPath,
|
|
24529
|
-
schemaType: blockField,
|
|
24530
|
-
value: arrayFieldValue
|
|
24531
|
-
});
|
|
24532
|
-
}
|
|
24533
|
-
}
|
|
24534
|
-
}), isObjectSchemaType(blockSchemaType) && childrenMenuItems.push({
|
|
24535
|
-
children: blockChildrenMenuItems,
|
|
24536
|
-
parentSchemaType: childField.type,
|
|
24537
|
-
path: blockPath,
|
|
24538
|
-
schemaType: blockSchemaType,
|
|
24539
|
-
value: blockObj
|
|
24540
|
-
});
|
|
24541
|
-
}), relativePath = validateRelativePathExists(relativePath, documentValue), {
|
|
24542
|
-
relativePath: isTextContent ? null : relativePath,
|
|
24543
|
-
breadcrumbs,
|
|
24544
|
-
childrenMenuItems,
|
|
24545
|
-
siblings
|
|
24546
|
-
});
|
|
24547
|
-
}
|
|
24548
|
-
function buildArrayState(props2) {
|
|
24549
|
-
const {
|
|
24550
|
-
arraySchemaType,
|
|
24551
|
-
arrayValue,
|
|
24552
|
-
documentValue,
|
|
24553
|
-
openPath,
|
|
24554
|
-
rootPath,
|
|
24555
|
-
recursive,
|
|
24556
|
-
rootSchemaType
|
|
24557
|
-
} = props2;
|
|
24558
|
-
let relativePath = [];
|
|
24559
|
-
const menuItems = [], breadcrumbs = [], siblings = /* @__PURE__ */ new Map();
|
|
24560
|
-
return isArrayOfBlocksSchemaType(arraySchemaType) && isPathTextInPTEField(rootSchemaType.fields, openPath, documentValue) ? {
|
|
24561
|
-
breadcrumbs,
|
|
24562
|
-
menuItems,
|
|
24563
|
-
relativePath,
|
|
24564
|
-
rootTitle: "",
|
|
24565
|
-
siblings
|
|
24566
|
-
} : (arrayValue.forEach((item, arrayIndex) => {
|
|
24567
|
-
const itemPath = [...rootPath, {
|
|
24568
|
-
_key: item._key
|
|
24569
|
-
}], itemSchemaField = getItemType(arraySchemaType, item);
|
|
24570
|
-
if (!itemSchemaField || isReferenceSchemaType(itemSchemaField)) return;
|
|
24571
|
-
isArrayItemSelected(itemPath, openPath) && (relativePath = getRelativePath(itemPath)), item._key && startsWith(itemPath, openPath) && !isArrayOfBlocksSchemaType(arraySchemaType) && siblings.set(toString(rootPath), {
|
|
24572
|
-
count: arrayValue.length,
|
|
24573
|
-
index: arrayIndex + 1
|
|
24574
|
-
});
|
|
24575
|
-
const childrenFields = itemSchemaField?.fields || [], childrenMenuItems = [];
|
|
24576
|
-
if (shouldBeInBreadcrumb(itemPath, openPath, documentValue)) {
|
|
24577
|
-
const breadcrumbsResult = buildBreadcrumbsState({
|
|
24578
|
-
arraySchemaType,
|
|
24579
|
-
arrayValue,
|
|
24580
|
-
itemPath,
|
|
24581
|
-
parentPath: rootPath
|
|
24582
|
-
});
|
|
24583
|
-
breadcrumbs.push(breadcrumbsResult);
|
|
24584
|
-
}
|
|
24585
|
-
childrenFields.forEach((childField) => {
|
|
24586
|
-
const childPath = [...itemPath, childField.name], childValue = getValueAtPath(documentValue, childPath);
|
|
24587
|
-
if (isReferenceSchemaType(childField.type)) return;
|
|
24588
|
-
if (isArrayItemSelected(childPath, openPath) && (relativePath = getRelativePath(childPath)), isObjectSchemaType(childField.type)) {
|
|
24589
|
-
const arrayPaths = findArrayTypePaths(childField.type.fields);
|
|
24590
|
-
if (arrayPaths.length === 0) return;
|
|
24591
|
-
arrayPaths.forEach((arrayPath) => {
|
|
24592
|
-
const fieldPath = [...childPath, ...arrayPath], nestedArrayField = getSchemaField$3(childField.type, toString(arrayPath)), arrayFieldValue_ = getValueAtPath(documentValue, fieldPath), arrayFieldValue = Array.isArray(arrayFieldValue_) ? arrayFieldValue_ : [];
|
|
24593
|
-
if (!arrayFieldValue.length || isReferenceSchemaType(nestedArrayField.type)) return;
|
|
24594
|
-
isArrayOfObjectsSchemaType(nestedArrayField.type), isArrayItemSelected(fieldPath, openPath) && (relativePath = getRelativePath(fieldPath));
|
|
24595
|
-
const updateNestedArrayIndex = (nestedItem, nestedIndex) => {
|
|
24596
|
-
const nestedItemObj = nestedItem, nestedItemPath = [...fieldPath, {
|
|
24597
|
-
_key: nestedItemObj._key
|
|
24598
|
-
}];
|
|
24599
|
-
startsWith(nestedItemPath, openPath) && siblings.set(toString(fieldPath), {
|
|
24600
|
-
count: arrayFieldValue.length,
|
|
24601
|
-
index: nestedIndex + 1
|
|
24602
|
-
});
|
|
24603
|
-
};
|
|
24604
|
-
arrayFieldValue.forEach(updateNestedArrayIndex);
|
|
24605
|
-
const nestedArrayState = recursive({
|
|
24606
|
-
documentValue,
|
|
24607
|
-
path: fieldPath,
|
|
24608
|
-
schemaType: nestedArrayField
|
|
24609
|
-
});
|
|
24610
|
-
nestedArrayState.siblings.forEach((info, pathString) => {
|
|
24611
|
-
siblings.set(pathString, info);
|
|
24612
|
-
}), childrenMenuItems.push({
|
|
24613
|
-
children: nestedArrayState.menuItems,
|
|
24614
|
-
parentSchemaType: childField.type,
|
|
24615
|
-
path: fieldPath,
|
|
24616
|
-
schemaType: nestedArrayField.type,
|
|
24617
|
-
value: arrayFieldValue
|
|
24618
|
-
});
|
|
24619
|
-
});
|
|
24620
|
-
}
|
|
24621
|
-
const isPortableText2 = isArrayOfBlocksSchemaType(childField.type);
|
|
24622
|
-
if (isArrayOfObjectsSchemaType(childField.type) && childValue && !isPortableText2) {
|
|
24623
|
-
const childArray = Array.isArray(childValue) ? childValue : [], updateChildArrayIndex = (childItem, childIndex) => {
|
|
24624
|
-
const childItemObj = childItem, childItemPath = [...childPath, {
|
|
24625
|
-
_key: childItemObj._key
|
|
24626
|
-
}];
|
|
24627
|
-
startsWith(childItemPath, openPath) && (isArrayOfBlocksSchemaType(arraySchemaType) && childField.name === "children" || siblings.set(toString(childPath), {
|
|
24628
|
-
count: childArray.length,
|
|
24629
|
-
index: childIndex + 1
|
|
24630
|
-
}));
|
|
24631
|
-
};
|
|
24632
|
-
if (childArray.forEach(updateChildArrayIndex), shouldBeInBreadcrumb(childPath, openPath, documentValue)) {
|
|
24633
|
-
const breadcrumbsResult = buildBreadcrumbsState({
|
|
24634
|
-
arraySchemaType: childField.type,
|
|
24635
|
-
arrayValue: childValue,
|
|
24636
|
-
itemPath: childPath,
|
|
24637
|
-
parentPath: itemPath
|
|
24638
|
-
});
|
|
24639
|
-
breadcrumbs.push(breadcrumbsResult);
|
|
24640
|
-
}
|
|
24641
|
-
const childState = recursive({
|
|
24642
|
-
documentValue,
|
|
24643
|
-
path: childPath,
|
|
24644
|
-
schemaType: childField
|
|
24645
|
-
}), childPathString = toString(childPath), skipChildArraySiblings = shouldSkipSiblingCount({
|
|
24646
|
-
arraySchemaType,
|
|
24647
|
-
fieldPath: childPath
|
|
24648
|
-
});
|
|
24649
|
-
childState.siblings.forEach((info, pathString) => {
|
|
24650
|
-
skipChildArraySiblings && pathString === childPathString || siblings.set(pathString, info);
|
|
24651
|
-
}), childrenMenuItems.push({
|
|
24652
|
-
children: childState?.menuItems || EMPTY_ARRAY$B,
|
|
24653
|
-
parentSchemaType: itemSchemaField,
|
|
24654
|
-
path: childPath,
|
|
24655
|
-
schemaType: childField,
|
|
24656
|
-
value: childValue
|
|
24657
|
-
});
|
|
24658
|
-
}
|
|
24659
|
-
if (isPortableText2) {
|
|
24660
|
-
const pteResult = buildArrayStatePTE({
|
|
24661
|
-
childField,
|
|
24662
|
-
childPath,
|
|
24663
|
-
childValue,
|
|
24664
|
-
documentValue,
|
|
24665
|
-
openPath,
|
|
24666
|
-
recursive,
|
|
24667
|
-
rootSchemaType,
|
|
24668
|
-
breadcrumbs,
|
|
24669
|
-
childrenMenuItems
|
|
24670
|
-
});
|
|
24671
|
-
pteResult.siblings.forEach((info, pathString) => {
|
|
24672
|
-
siblings.set(pathString, info);
|
|
24673
|
-
}), pteResult.relativePath && pteResult.relativePath !== null && relativePath.length === 0 && (relativePath = pteResult.relativePath);
|
|
24674
|
-
}
|
|
24675
|
-
}), isArrayItemSelected(itemPath, openPath) && !isReferenceSchemaType(itemSchemaField?.type) && (relativePath = getRelativePath(itemPath)), isPrimitiveSchemaType(itemSchemaField?.type) || menuItems.push({
|
|
24676
|
-
children: childrenMenuItems,
|
|
24677
|
-
parentSchemaType: arraySchemaType,
|
|
24678
|
-
path: itemPath,
|
|
24679
|
-
schemaType: itemSchemaField,
|
|
24680
|
-
value: item
|
|
24681
|
-
});
|
|
24682
|
-
}), relativePath = validateRelativePathExists(relativePath, documentValue), {
|
|
24683
|
-
breadcrumbs,
|
|
24684
|
-
menuItems,
|
|
24685
|
-
relativePath,
|
|
24686
|
-
rootTitle: "",
|
|
24687
|
-
siblings
|
|
24688
|
-
});
|
|
24689
|
-
}
|
|
24690
|
-
const EMPTY_ARRAY$r = [], EMPTY_TREE_STATE = {
|
|
24691
|
-
breadcrumbs: EMPTY_ARRAY$r,
|
|
24692
|
-
menuItems: EMPTY_ARRAY$r,
|
|
24693
|
-
relativePath: EMPTY_ARRAY$r,
|
|
24694
|
-
rootTitle: "",
|
|
24695
|
-
siblings: /* @__PURE__ */ new Map()
|
|
24696
|
-
};
|
|
24697
|
-
function buildTreeEditingState(props2) {
|
|
24698
|
-
const {
|
|
24699
|
-
openPath
|
|
24700
|
-
} = props2, rootPath = getRootPath$1(openPath), rootField = getSchemaField$3(props2.schemaType, toString(rootPath));
|
|
24701
|
-
if (!rootField?.type)
|
|
24702
|
-
return EMPTY_TREE_STATE;
|
|
24703
|
-
const rootTitle = getSchemaTypeTitle(rootField.type);
|
|
24704
|
-
if (!isArrayOfObjectsSchemaType(rootField.type))
|
|
24705
|
-
return EMPTY_TREE_STATE;
|
|
24706
|
-
let relativePath = [];
|
|
24707
|
-
const breadcrumbs = [], result = recursive({
|
|
24708
|
-
schemaType: rootField,
|
|
24709
|
-
documentValue: props2.documentValue,
|
|
24710
|
-
path: rootPath
|
|
24711
|
-
});
|
|
24712
|
-
function recursive(recursiveProps) {
|
|
24713
|
-
const {
|
|
24714
|
-
schemaType,
|
|
24715
|
-
path,
|
|
24716
|
-
documentValue
|
|
24717
|
-
} = recursiveProps, value = getValueAtPath(documentValue, path), arrayValue = Array.isArray(value) ? value : EMPTY_ARRAY$r, arraySchemaType = schemaType?.type, arrayState = buildArrayState({
|
|
24718
|
-
arraySchemaType,
|
|
24719
|
-
arrayValue,
|
|
24720
|
-
documentValue,
|
|
24721
|
-
openPath,
|
|
24722
|
-
// Pass the recursive function to the buildArrayState function
|
|
24723
|
-
// to allow for recursive calls in the array items.
|
|
24724
|
-
recursive,
|
|
24725
|
-
rootPath: path,
|
|
24726
|
-
// Needed in order to keep track of portable text fields and its items types
|
|
24727
|
-
rootSchemaType: props2.schemaType
|
|
24728
|
-
});
|
|
24729
|
-
return arrayState.relativePath.length > 0 && (relativePath = arrayState.relativePath), breadcrumbs.unshift(...arrayState.breadcrumbs), arrayState;
|
|
24730
|
-
}
|
|
24731
|
-
return {
|
|
24732
|
-
relativePath,
|
|
24733
|
-
breadcrumbs,
|
|
24734
|
-
menuItems: result.menuItems,
|
|
24735
|
-
rootTitle,
|
|
24736
|
-
siblings: result.siblings
|
|
24737
|
-
};
|
|
24738
|
-
}
|
|
24739
|
-
function NestedDialogHeader(props2) {
|
|
24740
|
-
const $ = c(5), {
|
|
24741
|
-
treeState,
|
|
24742
|
-
onHandlePathSelect
|
|
24743
|
-
} = props2, {
|
|
24744
|
-
relativePath,
|
|
24745
|
-
siblings
|
|
24746
|
-
} = treeState;
|
|
24747
|
-
let t0;
|
|
24748
|
-
return $[0] !== onHandlePathSelect || $[1] !== relativePath || $[2] !== siblings || $[3] !== treeState.breadcrumbs ? (t0 = /* @__PURE__ */ jsx(Flex, { align: "center", gap: 2, justify: "space-between", children: /* @__PURE__ */ jsx(DialogBreadcrumbs, { items: treeState.breadcrumbs, onPathSelect: onHandlePathSelect, selectedPath: relativePath, siblings }) }), $[0] = onHandlePathSelect, $[1] = relativePath, $[2] = siblings, $[3] = treeState.breadcrumbs, $[4] = t0) : t0 = $[4], t0;
|
|
24749
|
-
}
|
|
24750
|
-
const EMPTY_ARRAY$q = [];
|
|
24751
|
-
function renderDefault(props2) {
|
|
24752
|
-
return props2.renderDefault(props2);
|
|
24753
|
-
}
|
|
24754
|
-
const StyledDialog$2 = styled(Dialog)(({
|
|
24351
|
+
styled(Dialog)(({
|
|
24755
24352
|
theme
|
|
24756
24353
|
}) => {
|
|
24757
24354
|
const spacing = getTheme_v2(theme)?.space[4];
|
|
@@ -24767,115 +24364,6 @@ const StyledDialog$2 = styled(Dialog)(({
|
|
|
24767
24364
|
}
|
|
24768
24365
|
`;
|
|
24769
24366
|
});
|
|
24770
|
-
function EnhancedObjectDialog(props2) {
|
|
24771
|
-
const $ = c(43), {
|
|
24772
|
-
onPathFocus,
|
|
24773
|
-
onPathOpen,
|
|
24774
|
-
openPath,
|
|
24775
|
-
rootInputProps,
|
|
24776
|
-
schemaType
|
|
24777
|
-
} = props2, {
|
|
24778
|
-
value
|
|
24779
|
-
} = rootInputProps, [treeState, setTreeState] = useState(EMPTY_TREE_STATE), {
|
|
24780
|
-
hasAnyFullscreen,
|
|
24781
|
-
allFullscreenPaths
|
|
24782
|
-
} = useFullscreenPTE(), openPathRef = useRef(void 0), valueRef = useRef(void 0), treeStateRef = useRef(EMPTY_TREE_STATE), telemetry = useTelemetry();
|
|
24783
|
-
let t0;
|
|
24784
|
-
$[0] !== schemaType.fields || $[1] !== telemetry ? (t0 = (opts, treeStateRef_0) => {
|
|
24785
|
-
const currentTreeState = treeStateRef_0.current, isPathWithinPTEtext = isPathTextInPTEField(schemaType.fields, opts.openPath, opts.documentValue), nextState = buildTreeEditingState(opts);
|
|
24786
|
-
if (isEqual$2(nextState, currentTreeState))
|
|
24787
|
-
return;
|
|
24788
|
-
const builtRelativePath = nextState.relativePath, hasNoRelativePath = builtRelativePath.length === 0, isMarksDefinition = opts.openPath[opts.openPath.length - 2] === "markDefs", isClosingDialog = opts.openPath.length === 0, nextRelativePath = (hasNoRelativePath || !isArrayItemPath(builtRelativePath) || isMarksDefinition) && !isClosingDialog ? currentTreeState.relativePath : builtRelativePath, nextBreadcrumbs = isPathWithinPTEtext && currentTreeState.breadcrumbs.length > 0 ? currentTreeState.breadcrumbs : nextState.breadcrumbs, nextSiblings = isPathWithinPTEtext && currentTreeState.siblings && currentTreeState.siblings.size > 0 ? currentTreeState.siblings : nextState.siblings, wasDialogClosed = currentTreeState.relativePath.length === 0, willDialogOpen = nextRelativePath.length > 0;
|
|
24789
|
-
wasDialogClosed && willDialogOpen && telemetry.log(NestedDialogOpened, {
|
|
24790
|
-
path: pathToString$1(nextRelativePath)
|
|
24791
|
-
});
|
|
24792
|
-
const newTreeState = {
|
|
24793
|
-
...nextState,
|
|
24794
|
-
relativePath: nextRelativePath,
|
|
24795
|
-
breadcrumbs: nextBreadcrumbs,
|
|
24796
|
-
siblings: nextSiblings
|
|
24797
|
-
};
|
|
24798
|
-
treeStateRef_0.current = newTreeState, setTreeState(newTreeState);
|
|
24799
|
-
}, $[0] = schemaType.fields, $[1] = telemetry, $[2] = t0) : t0 = $[2];
|
|
24800
|
-
const handleBuildTreeEditingState = t0;
|
|
24801
|
-
let t1;
|
|
24802
|
-
$[3] !== handleBuildTreeEditingState ? (t1 = debounce(handleBuildTreeEditingState, 1e3), $[3] = handleBuildTreeEditingState, $[4] = t1) : t1 = $[4];
|
|
24803
|
-
const debouncedBuildTreeEditingState = t1;
|
|
24804
|
-
let t2;
|
|
24805
|
-
$[5] !== allFullscreenPaths || $[6] !== debouncedBuildTreeEditingState || $[7] !== hasAnyFullscreen || $[8] !== onPathFocus || $[9] !== onPathOpen || $[10] !== openPath || $[11] !== telemetry || $[12] !== treeState.relativePath ? (t2 = () => {
|
|
24806
|
-
if (hasAnyFullscreen() && allFullscreenPaths.length >= 1) {
|
|
24807
|
-
const ancestorPaths = allFullscreenPaths.filter((pathStr) => {
|
|
24808
|
-
const fullscreenPath = stringToPath(pathStr);
|
|
24809
|
-
if (fullscreenPath.length >= treeState.relativePath.length || !fullscreenPath.every((segment, index) => {
|
|
24810
|
-
const relativeSegment = treeState.relativePath[index];
|
|
24811
|
-
return isKeySegment(segment) && isKeySegment(relativeSegment) ? segment._key === relativeSegment._key : segment === relativeSegment;
|
|
24812
|
-
}))
|
|
24813
|
-
return !1;
|
|
24814
|
-
if (fullscreenPath.some(_temp$3h))
|
|
24815
|
-
return !0;
|
|
24816
|
-
const nextSegment = treeState.relativePath[fullscreenPath.length];
|
|
24817
|
-
return !isKeySegment(nextSegment);
|
|
24818
|
-
});
|
|
24819
|
-
if (ancestorPaths.length > 0) {
|
|
24820
|
-
const closestParentPath = ancestorPaths.reduce(_temp2$1l);
|
|
24821
|
-
onPathOpen(stringToPath(closestParentPath));
|
|
24822
|
-
return;
|
|
24823
|
-
}
|
|
24824
|
-
}
|
|
24825
|
-
debouncedBuildTreeEditingState.cancel(), telemetry.log(NestedDialogClosed, {
|
|
24826
|
-
path: pathToString$1(treeState.relativePath)
|
|
24827
|
-
}), onPathOpen(EMPTY_ARRAY$q), treeStateRef.current = EMPTY_TREE_STATE, setTreeState(EMPTY_TREE_STATE), valueRef.current = void 0, openPathRef.current = void 0;
|
|
24828
|
-
const firstKeySegmentIndex = openPath.findIndex(isKeySegment), rootFocusPath = openPath.slice(0, firstKeySegmentIndex + 1);
|
|
24829
|
-
onPathFocus(rootFocusPath);
|
|
24830
|
-
}, $[5] = allFullscreenPaths, $[6] = debouncedBuildTreeEditingState, $[7] = hasAnyFullscreen, $[8] = onPathFocus, $[9] = onPathOpen, $[10] = openPath, $[11] = telemetry, $[12] = treeState.relativePath, $[13] = t2) : t2 = $[13];
|
|
24831
|
-
const onClose = t2;
|
|
24832
|
-
let t3;
|
|
24833
|
-
$[14] !== onClose || $[15] !== onPathOpen || $[16] !== treeState.relativePath ? (t3 = (event) => {
|
|
24834
|
-
(event.metaKey || event.ctrlKey) && event.key === "ArrowUp" && (event.preventDefault(), treeState.relativePath.length > 2 ? onPathOpen(treeState.relativePath.slice(0, -1)) : onClose());
|
|
24835
|
-
}, $[14] = onClose, $[15] = onPathOpen, $[16] = treeState.relativePath, $[17] = t3) : t3 = $[17], useGlobalKeyDown(t3);
|
|
24836
|
-
let t4;
|
|
24837
|
-
$[18] !== debouncedBuildTreeEditingState || $[19] !== onClose || $[20] !== onPathFocus || $[21] !== onPathOpen ? (t4 = (path) => {
|
|
24838
|
-
path.length === 0 && onClose(), debouncedBuildTreeEditingState.cancel(), onPathOpen(path), isArrayItemPath(path) || onPathFocus(path);
|
|
24839
|
-
}, $[18] = debouncedBuildTreeEditingState, $[19] = onClose, $[20] = onPathFocus, $[21] = onPathOpen, $[22] = t4) : t4 = $[22];
|
|
24840
|
-
const onHandlePathSelect = t4;
|
|
24841
|
-
let t5, t6;
|
|
24842
|
-
$[23] !== debouncedBuildTreeEditingState || $[24] !== handleBuildTreeEditingState || $[25] !== openPath || $[26] !== schemaType || $[27] !== value ? (t5 = () => {
|
|
24843
|
-
const valueChanged = !isEqual$2(value, valueRef.current), openPathChanged = !isEqual$2(openPath, openPathRef.current), isInitialRender = valueRef.current === void 0 && openPathRef.current === void 0, isMarksDefinition_0 = openPath[openPath.length - 2] === "markDefs";
|
|
24844
|
-
if (isInitialRender || openPathChanged || !isMarksDefinition_0) {
|
|
24845
|
-
handleBuildTreeEditingState({
|
|
24846
|
-
schemaType,
|
|
24847
|
-
documentValue: value,
|
|
24848
|
-
openPath
|
|
24849
|
-
}, treeStateRef), valueRef.current = value, openPathRef.current = openPath;
|
|
24850
|
-
return;
|
|
24851
|
-
}
|
|
24852
|
-
if (!(!valueChanged && !openPathChanged && isMarksDefinition_0))
|
|
24853
|
-
return valueRef.current = value, openPathRef.current = openPath, debouncedBuildTreeEditingState({
|
|
24854
|
-
schemaType,
|
|
24855
|
-
documentValue: value,
|
|
24856
|
-
openPath
|
|
24857
|
-
}, treeStateRef), () => {
|
|
24858
|
-
debouncedBuildTreeEditingState.cancel();
|
|
24859
|
-
};
|
|
24860
|
-
}, t6 = [schemaType, value, debouncedBuildTreeEditingState, openPath, handleBuildTreeEditingState], $[23] = debouncedBuildTreeEditingState, $[24] = handleBuildTreeEditingState, $[25] = openPath, $[26] = schemaType, $[27] = value, $[28] = t5, $[29] = t6) : (t5 = $[28], t6 = $[29]), useEffect(t5, t6);
|
|
24861
|
-
const [documentScrollElement, setDocumentScrollElement] = useState(null), containerElement = useRef(null);
|
|
24862
|
-
if (treeState.relativePath.length === 0)
|
|
24863
|
-
return null;
|
|
24864
|
-
let t7;
|
|
24865
|
-
$[30] !== onHandlePathSelect || $[31] !== treeState ? (t7 = /* @__PURE__ */ jsx(NestedDialogHeader, { treeState, onHandlePathSelect }), $[30] = onHandlePathSelect, $[31] = treeState, $[32] = t7) : t7 = $[32];
|
|
24866
|
-
let t8;
|
|
24867
|
-
$[33] !== rootInputProps || $[34] !== treeState.relativePath ? (t8 = /* @__PURE__ */ jsx(Box, { ref: containerElement, children: /* @__PURE__ */ jsx(FormInput, { ...rootInputProps, relativePath: treeState.relativePath, renderDefault }) }), $[33] = rootInputProps, $[34] = treeState.relativePath, $[35] = t8) : t8 = $[35];
|
|
24868
|
-
let t9;
|
|
24869
|
-
$[36] !== onClose || $[37] !== t7 || $[38] !== t8 ? (t9 = /* @__PURE__ */ jsx(StyledDialog$2, { "data-testid": "nested-object-dialog", onClose, id: "nested-object-dialog", header: t7, width: 1, contentRef: setDocumentScrollElement, children: t8 }), $[36] = onClose, $[37] = t7, $[38] = t8, $[39] = t9) : t9 = $[39];
|
|
24870
|
-
let t10;
|
|
24871
|
-
return $[40] !== documentScrollElement || $[41] !== t9 ? (t10 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t9 }), $[40] = documentScrollElement, $[41] = t9, $[42] = t10) : t10 = $[42], t10;
|
|
24872
|
-
}
|
|
24873
|
-
function _temp2$1l(longest, current) {
|
|
24874
|
-
return current.length > longest.length ? current : longest;
|
|
24875
|
-
}
|
|
24876
|
-
function _temp$3h(segment_0) {
|
|
24877
|
-
return isKeySegment(segment_0);
|
|
24878
|
-
}
|
|
24879
24367
|
const FlexWrapper$1 = styled(Flex)`
|
|
24880
24368
|
& > div:first-child {
|
|
24881
24369
|
flex: 1;
|
|
@@ -24913,14 +24401,14 @@ function PresenceTooltip(props2) {
|
|
|
24913
24401
|
items
|
|
24914
24402
|
} = props2;
|
|
24915
24403
|
let t0;
|
|
24916
|
-
$[0] !== items ? (t0 = items.map(_temp$
|
|
24404
|
+
$[0] !== items ? (t0 = items.map(_temp$3h), $[0] = items, $[1] = t0) : t0 = $[1];
|
|
24917
24405
|
let t1;
|
|
24918
24406
|
$[2] !== t0 ? (t1 = /* @__PURE__ */ jsx(Stack, { sizing: "border", children: t0 }), $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
24919
24407
|
const content = t1;
|
|
24920
24408
|
let t2;
|
|
24921
24409
|
return $[4] !== children || $[5] !== content ? (t2 = /* @__PURE__ */ jsx(Tooltip, { content, placement: "top", portal: "documentScrollElement", children }), $[4] = children, $[5] = content, $[6] = t2) : t2 = $[6], t2;
|
|
24922
24410
|
}
|
|
24923
|
-
function _temp$
|
|
24411
|
+
function _temp$3h(item) {
|
|
24924
24412
|
return /* @__PURE__ */ jsxs(Flex, { align: "center", gap: 2, children: [
|
|
24925
24413
|
/* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(UserAvatar, { user: item.user, status: "online" }) }),
|
|
24926
24414
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: item.user.displayName })
|
|
@@ -24936,7 +24424,7 @@ const FieldPresenceInner = memo(function(t0) {
|
|
|
24936
24424
|
} = 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;
|
|
24937
24425
|
let t5;
|
|
24938
24426
|
if ($[0] !== animateArrowFrom || $[1] !== maxAvatars || $[2] !== position || $[3] !== presence || $[4] !== stack) {
|
|
24939
|
-
const uniquePresence = uniqBy(presence || [], _temp$
|
|
24427
|
+
const uniquePresence = uniqBy(presence || [], _temp$3g), sorted = sortBy(uniquePresence, _temp2$1l), [hidden, visible] = stack ? splitRight(sorted, maxAvatars) : [[], sorted];
|
|
24940
24428
|
let t62;
|
|
24941
24429
|
$[6] !== animateArrowFrom || $[7] !== position ? (t62 = (_visible) => ({
|
|
24942
24430
|
key: _visible.user.id,
|
|
@@ -24953,7 +24441,7 @@ const FieldPresenceInner = memo(function(t0) {
|
|
|
24953
24441
|
let t7;
|
|
24954
24442
|
return $[10] !== avatars ? (t7 = /* @__PURE__ */ jsxs(FlexWrapper$1, { children: [
|
|
24955
24443
|
t6,
|
|
24956
|
-
/* @__PURE__ */ jsx(InnerBox, { direction: "row-reverse", children: avatars.map(_temp3$
|
|
24444
|
+
/* @__PURE__ */ jsx(InnerBox, { direction: "row-reverse", children: avatars.map(_temp3$A) })
|
|
24957
24445
|
] }), $[10] = avatars, $[11] = t7) : t7 = $[11], t7;
|
|
24958
24446
|
});
|
|
24959
24447
|
function FieldPresence(props2) {
|
|
@@ -24984,13 +24472,13 @@ function _temp4$g(item) {
|
|
|
24984
24472
|
return item.user.id;
|
|
24985
24473
|
}
|
|
24986
24474
|
const FieldPresenceWithOverlay = FieldPresence;
|
|
24987
|
-
function _temp$
|
|
24475
|
+
function _temp$3g(item) {
|
|
24988
24476
|
return item.user.id;
|
|
24989
24477
|
}
|
|
24990
|
-
function _temp2$
|
|
24478
|
+
function _temp2$1l(_presence) {
|
|
24991
24479
|
return _presence.lastActiveAt;
|
|
24992
24480
|
}
|
|
24993
|
-
function _temp3$
|
|
24481
|
+
function _temp3$A(av, i) {
|
|
24994
24482
|
return av && /* @__PURE__ */ jsx("div", { style: {
|
|
24995
24483
|
position: "absolute",
|
|
24996
24484
|
transform: `translate3d(${-i * (AVATAR_SIZE + AVATAR_DISTANCE)}px, 0px, 0px)`,
|
|
@@ -25120,7 +24608,7 @@ const createIntersectionObserver = (options) => {
|
|
|
25120
24608
|
}, t8 = [], $[11] = t7, $[12] = t8) : (t7 = $[11], t8 = $[12]), useLayoutEffect(t7, t8);
|
|
25121
24609
|
const top = intersections["::top"], bottom2 = intersections["::bottom"];
|
|
25122
24610
|
let t9;
|
|
25123
|
-
$[13] !== bottom2 || $[14] !== intersections || $[15] !== regions || $[16] !== top ? (t9 = top && bottom2 ? regions.filter(_temp$
|
|
24611
|
+
$[13] !== bottom2 || $[14] !== intersections || $[15] !== regions || $[16] !== top ? (t9 = top && bottom2 ? regions.filter(_temp$3f).map((region_0) => {
|
|
25124
24612
|
const intersection2 = intersections[region_0.id];
|
|
25125
24613
|
if (!intersection2)
|
|
25126
24614
|
return null;
|
|
@@ -25169,7 +24657,7 @@ const createIntersectionObserver = (options) => {
|
|
|
25169
24657
|
t15
|
|
25170
24658
|
] }), $[36] = ref, $[37] = t10, $[38] = t11, $[39] = t13, $[40] = t14, $[41] = t15, $[42] = t16) : t16 = $[42], t16;
|
|
25171
24659
|
});
|
|
25172
|
-
function _temp$
|
|
24660
|
+
function _temp$3f(region) {
|
|
25173
24661
|
return region.presence?.length > 0;
|
|
25174
24662
|
}
|
|
25175
24663
|
const ITEM_TRANSITION = {
|
|
@@ -25255,7 +24743,7 @@ function StickyOverlay(props2) {
|
|
|
25255
24743
|
const regions = t1;
|
|
25256
24744
|
let t2;
|
|
25257
24745
|
$[3] !== margins ? (t2 = (regionsWithIntersectionDetails, containerWidth) => {
|
|
25258
|
-
const grouped = group(regionsWithIntersectionDetails.filter(_temp$
|
|
24746
|
+
const grouped = group(regionsWithIntersectionDetails.filter(_temp$3e)), topSpacing = sum(grouped.top.map(_temp2$1k)), bottomSpacing = sum([...grouped.inside, ...grouped.bottom].map(_temp3$z)), counts = grouped.inside.reduce(_temp4$f, {
|
|
25259
24747
|
nearTop: 0,
|
|
25260
24748
|
nearBottom: 0
|
|
25261
24749
|
});
|
|
@@ -25281,13 +24769,13 @@ function _temp4$f(_counts, withIntersection) {
|
|
|
25281
24769
|
nearBottom: _counts.nearBottom + (nearBottom ? withIntersection.region.presence.length : 0)
|
|
25282
24770
|
};
|
|
25283
24771
|
}
|
|
25284
|
-
function _temp3$
|
|
24772
|
+
function _temp3$z(n_0) {
|
|
25285
24773
|
return n_0.region.rect.height + n_0.spacerHeight;
|
|
25286
24774
|
}
|
|
25287
|
-
function _temp2$
|
|
24775
|
+
function _temp2$1k(n) {
|
|
25288
24776
|
return n.region.rect.height + n.spacerHeight;
|
|
25289
24777
|
}
|
|
25290
|
-
function _temp$
|
|
24778
|
+
function _temp$3e(item) {
|
|
25291
24779
|
return item.region.presence.length > 0;
|
|
25292
24780
|
}
|
|
25293
24781
|
const EMPTY_ARRAY$o = [], PresenceDock = memo(function(props2) {
|
|
@@ -25778,7 +25266,7 @@ function TreeEditingMenuItem(props2) {
|
|
|
25778
25266
|
$[13] !== item.path || $[14] !== onPathSelect ? (t6 = () => onPathSelect(item.path), $[13] = item.path, $[14] = onPathSelect, $[15] = t6) : t6 = $[15];
|
|
25779
25267
|
const handleClick = t6;
|
|
25780
25268
|
let t7;
|
|
25781
|
-
$[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = () => setOpen(_temp$
|
|
25269
|
+
$[16] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = () => setOpen(_temp$3d), $[16] = t7) : t7 = $[16];
|
|
25782
25270
|
const handleExpandClick = t7;
|
|
25783
25271
|
let t8, t9;
|
|
25784
25272
|
$[17] !== item || $[18] !== selectedPath ? (t8 = () => {
|
|
@@ -25814,7 +25302,7 @@ function TreeEditingMenuItem(props2) {
|
|
|
25814
25302
|
t18
|
|
25815
25303
|
] }, stringPath), $[53] = open, $[54] = stringPath, $[55] = t17, $[56] = t18, $[57] = t19) : t19 = $[57], t19;
|
|
25816
25304
|
}
|
|
25817
|
-
function _temp$
|
|
25305
|
+
function _temp$3d(v) {
|
|
25818
25306
|
return !v;
|
|
25819
25307
|
}
|
|
25820
25308
|
const TreeEditingMenu = memo(function(props2) {
|
|
@@ -25891,7 +25379,7 @@ const TreeEditingMenu = memo(function(props2) {
|
|
|
25891
25379
|
return $[31] !== content ? (t10 = /* @__PURE__ */ jsx(Resizable, { maxWidth: 450, minWidth: 150, initialWidth: 250, children: content }), $[31] = content, $[32] = t10) : t10 = $[32], t10;
|
|
25892
25380
|
}
|
|
25893
25381
|
return content;
|
|
25894
|
-
}), PRESENCE_MARGINS$
|
|
25382
|
+
}), PRESENCE_MARGINS$2 = [0, 0, 1, 0];
|
|
25895
25383
|
memo(function(props2) {
|
|
25896
25384
|
const $ = c(27), {
|
|
25897
25385
|
breadcrumbs,
|
|
@@ -25905,7 +25393,7 @@ memo(function(props2) {
|
|
|
25905
25393
|
siblings
|
|
25906
25394
|
} = props2, [scrollElement, setScrollElement] = useState(null), containerElementRef = useRef(null), [open, setOpen] = useState(!1);
|
|
25907
25395
|
let t0;
|
|
25908
|
-
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => setOpen(_temp$
|
|
25396
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => setOpen(_temp$3c), $[0] = t0) : t0 = $[0];
|
|
25909
25397
|
const toggleOpen = t0;
|
|
25910
25398
|
let t1;
|
|
25911
25399
|
$[1] !== setParentScrollElement ? (t1 = (el) => {
|
|
@@ -25915,9 +25403,9 @@ memo(function(props2) {
|
|
|
25915
25403
|
let t2;
|
|
25916
25404
|
$[3] !== items || $[4] !== onPathSelect || $[5] !== open || $[6] !== selectedPath || $[7] !== title ? (t2 = /* @__PURE__ */ jsx(TreeEditingLayoutSidebar, { items, onOpenToggle: toggleOpen, onPathSelect, open, selectedPath, title }), $[3] = items, $[4] = onPathSelect, $[5] = open, $[6] = selectedPath, $[7] = title, $[8] = t2) : t2 = $[8];
|
|
25917
25405
|
let t3;
|
|
25918
|
-
$[9] !== breadcrumbs || $[10] !== onPathSelect || $[11] !== selectedPath || $[12] !== siblings ? (t3 = /* @__PURE__ */ jsx(FixedHeightFlex, { align: "center", sizing: "border", gap: 2, paddingX: 4, children: /* @__PURE__ */ jsx(Flex, { flex: 1, children: /* @__PURE__ */ jsx(DialogBreadcrumbs, { items: breadcrumbs, onPathSelect, selectedPath, siblings }) }) }), $[9] = breadcrumbs, $[10] = onPathSelect, $[11] = selectedPath, $[12] = siblings, $[13] = t3) : t3 = $[13];
|
|
25406
|
+
$[9] !== breadcrumbs || $[10] !== onPathSelect || $[11] !== selectedPath || $[12] !== siblings ? (t3 = /* @__PURE__ */ jsx(FixedHeightFlex, { align: "center", sizing: "border", gap: 2, paddingX: 4, children: /* @__PURE__ */ jsx(Flex, { flex: 1, children: /* @__PURE__ */ jsx(DialogBreadcrumbs$1, { items: breadcrumbs, onPathSelect, selectedPath, siblings }) }) }), $[9] = breadcrumbs, $[10] = onPathSelect, $[11] = selectedPath, $[12] = siblings, $[13] = t3) : t3 = $[13];
|
|
25919
25407
|
let t4;
|
|
25920
|
-
$[14] !== children || $[15] !== scrollElement ? (t4 = children && /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { containerElement: containerElementRef, scrollElement, children: /* @__PURE__ */ jsx(Container$2, { width: 1, ref: containerElementRef, paddingX: 5, paddingY: 5, sizing: "border", children: /* @__PURE__ */ jsx(PresenceOverlay, { margins: PRESENCE_MARGINS$
|
|
25408
|
+
$[14] !== children || $[15] !== scrollElement ? (t4 = children && /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { containerElement: containerElementRef, scrollElement, children: /* @__PURE__ */ jsx(Container$2, { width: 1, ref: containerElementRef, paddingX: 5, paddingY: 5, sizing: "border", children: /* @__PURE__ */ jsx(PresenceOverlay, { margins: PRESENCE_MARGINS$2, children }) }) }), $[14] = children, $[15] = scrollElement, $[16] = t4) : t4 = $[16];
|
|
25921
25409
|
let t5;
|
|
25922
25410
|
$[17] !== handleSetScrollElementRef || $[18] !== t4 ? (t5 = /* @__PURE__ */ jsx(Card, { flex: 1, id: "tree-editing-form", overflow: "auto", ref: handleSetScrollElementRef, children: t4 }), $[17] = handleSetScrollElementRef, $[18] = t4, $[19] = t5) : t5 = $[19];
|
|
25923
25411
|
let t6;
|
|
@@ -25932,7 +25420,7 @@ memo(function(props2) {
|
|
|
25932
25420
|
t6
|
|
25933
25421
|
] }), $[24] = t2, $[25] = t6, $[26] = t7) : t7 = $[26], t7;
|
|
25934
25422
|
});
|
|
25935
|
-
function _temp$
|
|
25423
|
+
function _temp$3c(v) {
|
|
25936
25424
|
return !v;
|
|
25937
25425
|
}
|
|
25938
25426
|
function SourceProvider(t0) {
|
|
@@ -25981,22 +25469,20 @@ function useSource() {
|
|
|
25981
25469
|
return source;
|
|
25982
25470
|
}
|
|
25983
25471
|
function EnhancedObjectDialogProvider(props2) {
|
|
25984
|
-
const $ = c(
|
|
25472
|
+
const $ = c(6), {
|
|
25985
25473
|
children,
|
|
25986
|
-
isDialogAvailable,
|
|
25987
25474
|
legacyEditing
|
|
25988
25475
|
} = props2, {
|
|
25989
25476
|
beta
|
|
25990
|
-
} = useSource(), t0 = beta?.form?.enhancedObjectDialog?.enabled === !0, t1 = !!
|
|
25991
|
-
let
|
|
25992
|
-
$[0] !== t0 || $[1] !== t1
|
|
25477
|
+
} = useSource(), t0 = beta?.form?.enhancedObjectDialog?.enabled === !0, t1 = !!legacyEditing;
|
|
25478
|
+
let t2;
|
|
25479
|
+
$[0] !== t0 || $[1] !== t1 ? (t2 = {
|
|
25993
25480
|
enabled: t0,
|
|
25994
|
-
|
|
25995
|
-
|
|
25996
|
-
|
|
25997
|
-
|
|
25998
|
-
|
|
25999
|
-
return $[4] !== children || $[5] !== value ? (t4 = /* @__PURE__ */ jsx(EnhancedObjectDialogContext.Provider, { value, children }), $[4] = children, $[5] = value, $[6] = t4) : t4 = $[6], t4;
|
|
25481
|
+
legacyEditing: t1
|
|
25482
|
+
}, $[0] = t0, $[1] = t1, $[2] = t2) : t2 = $[2];
|
|
25483
|
+
const value = t2;
|
|
25484
|
+
let t3;
|
|
25485
|
+
return $[3] !== children || $[4] !== value ? (t3 = /* @__PURE__ */ jsx(EnhancedObjectDialogContext.Provider, { value, children }), $[3] = children, $[4] = value, $[5] = t3) : t3 = $[5], t3;
|
|
26000
25486
|
}
|
|
26001
25487
|
function useInsertMenuMenuItems(props2) {
|
|
26002
25488
|
const $ = c(53), {
|
|
@@ -26121,7 +25607,7 @@ const MENU_POPOVER_PROPS$7 = {
|
|
|
26121
25607
|
tone: "default"
|
|
26122
25608
|
}, EMPTY_ARRAY$n = [];
|
|
26123
25609
|
function GridItem(props2) {
|
|
26124
|
-
const $ = c(
|
|
25610
|
+
const $ = c(94), {
|
|
26125
25611
|
schemaType,
|
|
26126
25612
|
parentSchemaType,
|
|
26127
25613
|
path,
|
|
@@ -26143,9 +25629,8 @@ function GridItem(props2) {
|
|
|
26143
25629
|
} = t0, {
|
|
26144
25630
|
t
|
|
26145
25631
|
} = useTranslation(), {
|
|
26146
|
-
enabled: enhancedObjectDialogEnabled
|
|
26147
|
-
|
|
26148
|
-
} = useEnhancedObjectDialog(), uploadState = value[UPLOAD_STATUS_KEY], uploadProgress = typeof uploadState?.progress == "number" ? uploadState?.progress : void 0, openPortal = open && !(enhancedObjectDialogEnabled && isDialogAvailable), sortable = parentSchemaType.options?.sortable !== !1, insertableTypes = parentSchemaType.of, [previewCardElement, setPreviewCardElement] = useState(null), previewCardRef = useRef(null);
|
|
25632
|
+
enabled: enhancedObjectDialogEnabled
|
|
25633
|
+
} = useEnhancedObjectDialog(), uploadState = value[UPLOAD_STATUS_KEY], uploadProgress = typeof uploadState?.progress == "number" ? uploadState?.progress : void 0, openPortal = open && !enhancedObjectDialogEnabled, openEnhancedDialog = open && enhancedObjectDialogEnabled, sortable = parentSchemaType.options?.sortable !== !1, insertableTypes = parentSchemaType.of, [previewCardElement, setPreviewCardElement] = useState(null), previewCardRef = useRef(null);
|
|
26149
25634
|
let t1, t2;
|
|
26150
25635
|
$[0] !== previewCardElement ? (t1 = () => previewCardElement, t2 = [previewCardElement], $[0] = previewCardElement, $[1] = t1, $[2] = t2) : (t1 = $[1], t2 = $[2]), useImperativeHandle(previewCardRef, t1, t2), useScrollIntoViewOnFocusWithin(previewCardRef, open);
|
|
26151
25636
|
let t3;
|
|
@@ -26187,7 +25672,7 @@ function GridItem(props2) {
|
|
|
26187
25672
|
const presence = t7, childValidation = useChildValidation(path, !0);
|
|
26188
25673
|
let t8;
|
|
26189
25674
|
$[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];
|
|
26190
|
-
const validation2 = t8, hasErrors = childValidation.some(_temp$
|
|
25675
|
+
const validation2 = t8, hasErrors = childValidation.some(_temp$3b), hasWarnings = childValidation.some(_temp2$1j), [contextMenuButtonElement, setContextMenuButtonElement] = useState(null), t9 = parentSchemaType.options?.insertMenu;
|
|
26191
25676
|
let t10;
|
|
26192
25677
|
$[16] !== contextMenuButtonElement || $[17] !== handleInsert || $[18] !== insertableTypes || $[19] !== t9 ? (t10 = {
|
|
26193
25678
|
schemaTypes: insertableTypes,
|
|
@@ -26249,25 +25734,30 @@ function GridItem(props2) {
|
|
|
26249
25734
|
$[64] !== menu || $[65] !== openPortal || $[66] !== presence || $[67] !== readOnly || $[68] !== sortable || $[69] !== t20 || $[70] !== tone || $[71] !== validation2 ? (t21 = /* @__PURE__ */ jsx(CellLayout, { menu, presence, validation: validation2, tone, radius: 2, border: !0, dragHandle: sortable, selected: openPortal, readOnly, children: t20 }), $[64] = menu, $[65] = openPortal, $[66] = presence, $[67] = readOnly, $[68] = sortable, $[69] = t20, $[70] = tone, $[71] = validation2, $[72] = t21) : t21 = $[72];
|
|
26250
25735
|
const item = t21;
|
|
26251
25736
|
let t22;
|
|
26252
|
-
if ($[73] !== changed || $[74] !== children || $[75] !== focused || $[76] !== item || $[77] !== onClose || $[78] !==
|
|
25737
|
+
if ($[73] !== changed || $[74] !== children || $[75] !== focused || $[76] !== item || $[77] !== onClose || $[78] !== openEnhancedDialog || $[79] !== openPortal || $[80] !== parentSchemaType.options?.modal?.type || $[81] !== parentSchemaType.options?.modal?.width || $[82] !== path || $[83] !== previewCardElement || $[84] !== readOnly || $[85] !== schemaType || $[86] !== t || $[87] !== value) {
|
|
26253
25738
|
const itemTypeTitle = getSchemaTypeTitle(schemaType), t23 = !!focused;
|
|
26254
25739
|
let t24;
|
|
26255
|
-
$[
|
|
25740
|
+
$[89] !== changed || $[90] !== item || $[91] !== path || $[92] !== t23 ? (t24 = /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: t23, children: item }), $[89] = changed, $[90] = item, $[91] = path, $[92] = t23, $[93] = t24) : t24 = $[93], t22 = /* @__PURE__ */ jsxs(EnhancedObjectDialogProvider, { children: [
|
|
26256
25741
|
t24,
|
|
26257
25742
|
openPortal && /* @__PURE__ */ jsx(EditPortal, { header: readOnly ? t("inputs.array.action.view", {
|
|
26258
25743
|
itemTypeTitle
|
|
26259
25744
|
}) : t("inputs.array.action.edit", {
|
|
26260
25745
|
itemTypeTitle
|
|
25746
|
+
}), type: parentSchemaType?.options?.modal?.type || "dialog", width: parentSchemaType?.options?.modal?.width ?? 1, id: value._key, onClose, autofocus: focused, legacy_referenceElement: previewCardElement, children }),
|
|
25747
|
+
openEnhancedDialog && /* @__PURE__ */ jsx(EnhancedObjectDialog, { header: readOnly ? t("inputs.array.action.view", {
|
|
25748
|
+
itemTypeTitle
|
|
25749
|
+
}) : t("inputs.array.action.edit", {
|
|
25750
|
+
itemTypeTitle
|
|
26261
25751
|
}), type: parentSchemaType?.options?.modal?.type || "dialog", width: parentSchemaType?.options?.modal?.width ?? 1, id: value._key, onClose, autofocus: focused, legacy_referenceElement: previewCardElement, children })
|
|
26262
|
-
] }), $[73] = changed, $[74] = children, $[75] = focused, $[76] = item, $[77] = onClose, $[78] =
|
|
25752
|
+
] }), $[73] = changed, $[74] = children, $[75] = focused, $[76] = item, $[77] = onClose, $[78] = openEnhancedDialog, $[79] = openPortal, $[80] = parentSchemaType.options?.modal?.type, $[81] = parentSchemaType.options?.modal?.width, $[82] = path, $[83] = previewCardElement, $[84] = readOnly, $[85] = schemaType, $[86] = t, $[87] = value, $[88] = t22;
|
|
26263
25753
|
} else
|
|
26264
|
-
t22 = $[
|
|
25754
|
+
t22 = $[88];
|
|
26265
25755
|
return t22;
|
|
26266
25756
|
}
|
|
26267
|
-
function _temp2$
|
|
25757
|
+
function _temp2$1j(v_0) {
|
|
26268
25758
|
return v_0.level === "warning";
|
|
26269
25759
|
}
|
|
26270
|
-
function _temp$
|
|
25760
|
+
function _temp$3b(v) {
|
|
26271
25761
|
return v.level === "error";
|
|
26272
25762
|
}
|
|
26273
25763
|
const EMPTY$4 = [];
|
|
@@ -26293,9 +25783,9 @@ function GridArrayInput(props2) {
|
|
|
26293
25783
|
value: t1
|
|
26294
25784
|
} = props2, ArrayFunctions = t0 === void 0 ? ArrayOfObjectsFunctions : t0, value = t1 === void 0 ? EMPTY$4 : t1, {
|
|
26295
25785
|
t
|
|
26296
|
-
} = useTranslation(), sortable = schemaType.options?.sortable !== !1, renderItem2 = _temp$
|
|
25786
|
+
} = useTranslation(), sortable = schemaType.options?.sortable !== !1, renderItem2 = _temp$3a;
|
|
26297
25787
|
let t2;
|
|
26298
|
-
$[0] !== members ? (t2 = members.map(_temp2$
|
|
25788
|
+
$[0] !== members ? (t2 = members.map(_temp2$1i), $[0] = members, $[1] = t2) : t2 = $[1];
|
|
26299
25789
|
const memberKeys = t2;
|
|
26300
25790
|
let t3;
|
|
26301
25791
|
$[2] !== members.length || $[3] !== schemaType.placeholder || $[4] !== t ? (t3 = members?.length === 0 && /* @__PURE__ */ jsx(Card, { padding: 3, border: !0, radius: 2, children: /* @__PURE__ */ jsx(Text$1, { align: "center", muted: !0, size: 1, children: schemaType.placeholder || /* @__PURE__ */ jsx(Fragment$1, { children: t("inputs.array.no-items-label") }) }) }), $[2] = members.length, $[3] = schemaType.placeholder, $[4] = t, $[5] = t3) : t3 = $[5];
|
|
@@ -26319,10 +25809,10 @@ function GridArrayInput(props2) {
|
|
|
26319
25809
|
t7
|
|
26320
25810
|
] }), $[37] = t6, $[38] = t7, $[39] = t8) : t8 = $[39], t8;
|
|
26321
25811
|
}
|
|
26322
|
-
function _temp2$
|
|
25812
|
+
function _temp2$1i(member) {
|
|
26323
25813
|
return member.key;
|
|
26324
25814
|
}
|
|
26325
|
-
function _temp$
|
|
25815
|
+
function _temp$3a(itemProps) {
|
|
26326
25816
|
return /* @__PURE__ */ jsx(GridItem, { ...itemProps });
|
|
26327
25817
|
}
|
|
26328
25818
|
function useMemoCompare(next, compare2) {
|
|
@@ -26344,7 +25834,7 @@ function useVisibilityDetection(parentRef) {
|
|
|
26344
25834
|
if (wasVisible === isNowVisible)
|
|
26345
25835
|
return;
|
|
26346
25836
|
const becameVisible = !wasVisible && isNowVisible;
|
|
26347
|
-
prevVisible.current = isNowVisible, setIsVisible(isNowVisible), becameVisible && setMountKey(_temp$
|
|
25837
|
+
prevVisible.current = isNowVisible, setIsVisible(isNowVisible), becameVisible && setMountKey(_temp$39);
|
|
26348
25838
|
});
|
|
26349
25839
|
return parentRef.current && resizeObserver2.observe(parentRef.current), () => resizeObserver2.disconnect();
|
|
26350
25840
|
}, t1 = [parentRef], $[0] = parentRef, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
|
|
@@ -26354,7 +25844,7 @@ function useVisibilityDetection(parentRef) {
|
|
|
26354
25844
|
mountKey
|
|
26355
25845
|
}, $[3] = isVisible2, $[4] = mountKey, $[5] = t2) : t2 = $[5], t2;
|
|
26356
25846
|
}
|
|
26357
|
-
function _temp$
|
|
25847
|
+
function _temp$39(prev) {
|
|
26358
25848
|
return prev + 1;
|
|
26359
25849
|
}
|
|
26360
25850
|
const Root$p = styled(Card)`
|
|
@@ -26452,7 +25942,7 @@ function IncompatibleItemType(props2) {
|
|
|
26452
25942
|
const handleKeyDown = t2;
|
|
26453
25943
|
let t3;
|
|
26454
25944
|
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
26455
|
-
setShowDetails(_temp$
|
|
25945
|
+
setShowDetails(_temp$38);
|
|
26456
25946
|
}, $[7] = t3) : t3 = $[7];
|
|
26457
25947
|
const handleShowDetails = t3;
|
|
26458
25948
|
let t4;
|
|
@@ -26514,7 +26004,7 @@ function IncompatibleItemType(props2) {
|
|
|
26514
26004
|
let t22;
|
|
26515
26005
|
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;
|
|
26516
26006
|
}
|
|
26517
|
-
function _temp$
|
|
26007
|
+
function _temp$38(v) {
|
|
26518
26008
|
return !v;
|
|
26519
26009
|
}
|
|
26520
26010
|
const MENU_POPOVER_PROPS$6 = {
|
|
@@ -26661,7 +26151,7 @@ function ListArrayInput(props2) {
|
|
|
26661
26151
|
t
|
|
26662
26152
|
} = useTranslation(), [activeDragItemIndex, setActiveDragItemIndex] = useState(null);
|
|
26663
26153
|
let t2;
|
|
26664
|
-
$[0] !== members ? (t2 = members.map(_temp$
|
|
26154
|
+
$[0] !== members ? (t2 = members.map(_temp$37), $[0] = members, $[1] = t2) : t2 = $[1];
|
|
26665
26155
|
const memberKeys = useMemoCompare(t2, shallowEquals), parentRef = useRef(null), {
|
|
26666
26156
|
isVisible: isVisible2,
|
|
26667
26157
|
mountKey
|
|
@@ -26707,7 +26197,7 @@ function ListArrayInput(props2) {
|
|
|
26707
26197
|
t9
|
|
26708
26198
|
] }), $[42] = t8, $[43] = t9, $[44] = t10) : t10 = $[44], t10;
|
|
26709
26199
|
}
|
|
26710
|
-
function _temp$
|
|
26200
|
+
function _temp$37(member) {
|
|
26711
26201
|
return member.key;
|
|
26712
26202
|
}
|
|
26713
26203
|
function ArrayOfObjectsInput(props2) {
|
|
@@ -26752,7 +26242,7 @@ function ArrayOfObjectOptionsInput(props2) {
|
|
|
26752
26242
|
$[0] !== t0 ? (t1 = t0 === void 0 ? [] : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
26753
26243
|
const value = t1, t2 = schemaType.options?.list || EMPTY_ARRAY$m;
|
|
26754
26244
|
let t3;
|
|
26755
|
-
$[2] !== t2 ? (t3 = t2.map(_temp$
|
|
26245
|
+
$[2] !== t2 ? (t3 = t2.map(_temp$36), $[2] = t2, $[3] = t3) : t3 = $[3];
|
|
26756
26246
|
const options = t3;
|
|
26757
26247
|
let t4;
|
|
26758
26248
|
$[4] !== onChange || $[5] !== options || $[6] !== value ? (t4 = (isChecked, changedOption) => {
|
|
@@ -26792,7 +26282,7 @@ function ArrayOfObjectOptionsInput(props2) {
|
|
|
26792
26282
|
let t9;
|
|
26793
26283
|
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;
|
|
26794
26284
|
}
|
|
26795
|
-
function _temp$
|
|
26285
|
+
function _temp$36(option, index) {
|
|
26796
26286
|
return isKeyedObject(option) ? option : {
|
|
26797
26287
|
...option,
|
|
26798
26288
|
_key: `auto-generated-${index}`
|
|
@@ -26834,7 +26324,7 @@ function ArrayOfPrimitiveOptionsInput(props2) {
|
|
|
26834
26324
|
const options = t3;
|
|
26835
26325
|
let t4;
|
|
26836
26326
|
$[6] !== onChange || $[7] !== options || $[8] !== value ? (t4 = (isChecked, changedValue) => {
|
|
26837
|
-
const nextValue = options.map(_temp$
|
|
26327
|
+
const nextValue = options.map(_temp$35).filter((optionValue) => optionValue === changedValue ? isChecked : value.includes(optionValue));
|
|
26838
26328
|
onChange(nextValue.length > 0 ? set(nextValue) : unset());
|
|
26839
26329
|
}, $[6] = onChange, $[7] = options, $[8] = value, $[9] = t4) : t4 = $[9];
|
|
26840
26330
|
const handleChange = t4, t5 = schemaType.options?.layout === "grid" ? Math.min(options.length, 4) : 1;
|
|
@@ -26856,7 +26346,7 @@ function ArrayOfPrimitiveOptionsInput(props2) {
|
|
|
26856
26346
|
let t8;
|
|
26857
26347
|
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;
|
|
26858
26348
|
}
|
|
26859
|
-
function _temp$
|
|
26349
|
+
function _temp$35(option) {
|
|
26860
26350
|
return option.value;
|
|
26861
26351
|
}
|
|
26862
26352
|
function ArrayOfOptionsInput(props2) {
|
|
@@ -26963,14 +26453,14 @@ function uploadTarget(Component2) {
|
|
|
26963
26453
|
const tasks2 = files.map((file_0) => ({
|
|
26964
26454
|
file: file_0,
|
|
26965
26455
|
uploaderCandidates: getUploadCandidates(types, resolveUploader2, file_0)
|
|
26966
|
-
})), ready = tasks2.filter(_temp$
|
|
26456
|
+
})), ready = tasks2.filter(_temp$34), rejected = tasks2.filter(_temp2$1h);
|
|
26967
26457
|
rejected.length > 0 && pushToast({
|
|
26968
26458
|
closable: !0,
|
|
26969
26459
|
status: "warning",
|
|
26970
26460
|
title: t("inputs.array.error.cannot-upload-unable-to-convert", {
|
|
26971
26461
|
count: rejected.length
|
|
26972
26462
|
}),
|
|
26973
|
-
description: rejected.map(_temp3$
|
|
26463
|
+
description: rejected.map(_temp3$y)
|
|
26974
26464
|
}), ready.forEach((task_2) => {
|
|
26975
26465
|
uploadFile2(task_2.file, sortBy(task_2.uploaderCandidates, _temp4$e)[0]);
|
|
26976
26466
|
});
|
|
@@ -27039,13 +26529,13 @@ function DropMessage(props2) {
|
|
|
27039
26529
|
let t2;
|
|
27040
26530
|
return $[3] !== t1 ? (t2 = /* @__PURE__ */ jsx(Fragment$1, { children: t1 }), $[3] = t1, $[4] = t2) : t2 = $[4], t2;
|
|
27041
26531
|
}
|
|
27042
|
-
function _temp$
|
|
26532
|
+
function _temp$34(task) {
|
|
27043
26533
|
return task.uploaderCandidates.length > 0;
|
|
27044
26534
|
}
|
|
27045
|
-
function _temp2$
|
|
26535
|
+
function _temp2$1h(task_0) {
|
|
27046
26536
|
return task_0.uploaderCandidates.length === 0;
|
|
27047
26537
|
}
|
|
27048
|
-
function _temp3$
|
|
26538
|
+
function _temp3$y(task_1, i) {
|
|
27049
26539
|
return /* @__PURE__ */ jsxs(Flex, { gap: 2, padding: 2, children: [
|
|
27050
26540
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsx(Text$1, { weight: "medium", children: task_1.file.name }) }),
|
|
27051
26541
|
/* @__PURE__ */ jsx(Box, { children: /* @__PURE__ */ jsxs(Text$1, { size: 1, children: [
|
|
@@ -27122,7 +26612,7 @@ const MENU_BUTTON_POPOVER_PROPS$2 = {
|
|
|
27122
26612
|
children,
|
|
27123
26613
|
presence,
|
|
27124
26614
|
schemaType
|
|
27125
|
-
} = props2, hasError = validation2.filter(_temp$
|
|
26615
|
+
} = props2, hasError = validation2.filter(_temp$33).length > 0, hasWarning = validation2.filter(_temp2$1g).length > 0;
|
|
27126
26616
|
let t0;
|
|
27127
26617
|
$[0] !== onInsert ? (t0 = (pos, insertType) => {
|
|
27128
26618
|
onInsert({
|
|
@@ -27189,10 +26679,10 @@ const MENU_BUTTON_POPOVER_PROPS$2 = {
|
|
|
27189
26679
|
let t17;
|
|
27190
26680
|
return $[50] !== menu || $[51] !== sortable || $[52] !== t11 || $[53] !== t12 || $[54] !== t13 || $[55] !== t16 || $[56] !== tone ? (t17 = /* @__PURE__ */ jsx(RowLayout, { tone, readOnly: t11, menu, dragHandle: sortable, presence: t12, validation: t13, children: t16 }), $[50] = menu, $[51] = sortable, $[52] = t11, $[53] = t12, $[54] = t13, $[55] = t16, $[56] = tone, $[57] = t17) : t17 = $[57], t17;
|
|
27191
26681
|
});
|
|
27192
|
-
function _temp$
|
|
26682
|
+
function _temp$33(item) {
|
|
27193
26683
|
return item.level === "error";
|
|
27194
26684
|
}
|
|
27195
|
-
function _temp2$
|
|
26685
|
+
function _temp2$1g(item_0) {
|
|
27196
26686
|
return item_0.level === "warning";
|
|
27197
26687
|
}
|
|
27198
26688
|
function NoItemsPlaceholder(t0) {
|
|
@@ -27558,7 +27048,7 @@ const TIME_ZONE_SCOPE_TYPE = {
|
|
|
27558
27048
|
let t6;
|
|
27559
27049
|
$[22] !== allTimeZones ? (t6 = () => {
|
|
27560
27050
|
const localTzName = Intl.DateTimeFormat().resolvedOptions().timeZone, foundLocal = allTimeZones.find((tz_3) => tz_3.name === localTzName);
|
|
27561
|
-
return foundLocal || allTimeZones.find(_temp$
|
|
27051
|
+
return foundLocal || allTimeZones.find(_temp$32) || allTimeZones[0];
|
|
27562
27052
|
}, $[22] = allTimeZones, $[23] = t6) : t6 = $[23];
|
|
27563
27053
|
const getLocalTimeZone = t6;
|
|
27564
27054
|
let t7;
|
|
@@ -27656,7 +27146,7 @@ function getErrorMessage$1(err) {
|
|
|
27656
27146
|
let message;
|
|
27657
27147
|
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;
|
|
27658
27148
|
}
|
|
27659
|
-
function _temp$
|
|
27149
|
+
function _temp$32(timeZone) {
|
|
27660
27150
|
return timeZone.abbreviation === "GMT";
|
|
27661
27151
|
}
|
|
27662
27152
|
const TimeZoneCitySpan = styled.span(({
|
|
@@ -27714,7 +27204,7 @@ const TimeZoneCitySpan = styled.span(({
|
|
|
27714
27204
|
const handleTimeZoneUpdate = t6, isDirty = selectedTz?.name !== timeZone.name;
|
|
27715
27205
|
let t7;
|
|
27716
27206
|
$[18] !== getLocalTimeZone ? (t7 = getLocalTimeZone(), $[18] = getLocalTimeZone, $[19] = t7) : t7 = $[19];
|
|
27717
|
-
const isLocalTzSelected = selectedTz?.name === t7.name, renderOption = _temp$
|
|
27207
|
+
const isLocalTzSelected = selectedTz?.name === t7.name, renderOption = _temp$31, renderValue = _temp2$1f, t8 = !isDirty || !selectedTz;
|
|
27718
27208
|
let t9;
|
|
27719
27209
|
$[20] !== handleTimeZoneUpdate || $[21] !== t8 ? (t9 = {
|
|
27720
27210
|
confirmButton: {
|
|
@@ -27759,7 +27249,7 @@ const TimeZoneCitySpan = styled.span(({
|
|
|
27759
27249
|
}, $[46] = t19, $[47] = t20) : t20 = $[47];
|
|
27760
27250
|
const t21 = selectedTz?.value;
|
|
27761
27251
|
let t22;
|
|
27762
|
-
$[48] !== allTimeZones || $[49] !== handleTimeZoneChange || $[50] !== t18 || $[51] !== t20 || $[52] !== t21 ? (t22 = /* @__PURE__ */ jsx(Autocomplete, { fontSize: 2, icon: SearchIcon, id: "timezone", onChange: handleTimeZoneChange, openButton: !0, options: allTimeZones, padding: 4, filterOption: _temp3$
|
|
27252
|
+
$[48] !== allTimeZones || $[49] !== handleTimeZoneChange || $[50] !== t18 || $[51] !== t20 || $[52] !== t21 ? (t22 = /* @__PURE__ */ jsx(Autocomplete, { fontSize: 2, icon: SearchIcon, id: "timezone", onChange: handleTimeZoneChange, openButton: !0, options: allTimeZones, padding: 4, filterOption: _temp3$x, placeholder: t18, popover: t20, renderOption, renderValue, tabIndex: -1, value: t21 }), $[48] = allTimeZones, $[49] = handleTimeZoneChange, $[50] = t18, $[51] = t20, $[52] = t21, $[53] = t22) : t22 = $[53];
|
|
27763
27253
|
let t23;
|
|
27764
27254
|
$[54] !== t17 || $[55] !== t22 ? (t23 = /* @__PURE__ */ jsxs(Stack, { space: 3, children: [
|
|
27765
27255
|
t17,
|
|
@@ -27773,7 +27263,7 @@ const TimeZoneCitySpan = styled.span(({
|
|
|
27773
27263
|
let t25;
|
|
27774
27264
|
return $[60] !== onClose || $[61] !== t24 || $[62] !== t9 ? (t25 = /* @__PURE__ */ jsx(Dialog, { footer: t9, header: "Select time zone", id: "time-zone", onClose, width: 1, children: t24 }), $[60] = onClose, $[61] = t24, $[62] = t9, $[63] = t25) : t25 = $[63], t25;
|
|
27775
27265
|
};
|
|
27776
|
-
function _temp$
|
|
27266
|
+
function _temp$31(option) {
|
|
27777
27267
|
return /* @__PURE__ */ jsx(Card, { as: "button", padding: 3, children: /* @__PURE__ */ jsxs(Text$1, { size: 1, textOverflow: "ellipsis", children: [
|
|
27778
27268
|
/* @__PURE__ */ jsx(TimeZoneCitySpan, { children: option.city }),
|
|
27779
27269
|
/* @__PURE__ */ jsxs(TimeZoneOffsetSpan, { children: [
|
|
@@ -27786,10 +27276,10 @@ function _temp$30(option) {
|
|
|
27786
27276
|
/* @__PURE__ */ jsx(TimeZoneAlternativeNameSpan, { children: option.alternativeName })
|
|
27787
27277
|
] }) });
|
|
27788
27278
|
}
|
|
27789
|
-
function _temp2$
|
|
27279
|
+
function _temp2$1f(_value, option_0) {
|
|
27790
27280
|
return option_0 ? `${option_0.alternativeName} (${option_0.namePretty})` : "";
|
|
27791
27281
|
}
|
|
27792
|
-
function _temp3$
|
|
27282
|
+
function _temp3$x(query, option_1) {
|
|
27793
27283
|
return query === "" ? !0 : `${option_1.city} (GMT
|
|
27794
27284
|
${option_1.offset}) ${option_1.alternativeName}`?.toLowerCase()?.includes(query?.toLowerCase());
|
|
27795
27285
|
}
|
|
@@ -27877,9 +27367,9 @@ const DEFAULT_MONTH_NAMES = ["January", "February", "March", "April", "May", "Ju
|
|
|
27877
27367
|
weekInfo
|
|
27878
27368
|
} = useCurrentLocale();
|
|
27879
27369
|
let t0;
|
|
27880
|
-
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$2(getWeekStartsOfMonth$2(date, weekInfo.firstDay)).map(_temp$
|
|
27370
|
+
return $[0] !== date || $[1] !== weekInfo.firstDay ? (t0 = getWeekDaysFromWeekStarts$2(getWeekStartsOfMonth$2(date, weekInfo.firstDay)).map(_temp$30), $[0] = date, $[1] = weekInfo.firstDay, $[2] = t0) : t0 = $[2], t0;
|
|
27881
27371
|
};
|
|
27882
|
-
function _temp$
|
|
27372
|
+
function _temp$30(days) {
|
|
27883
27373
|
return {
|
|
27884
27374
|
number: getWeek(days[0]),
|
|
27885
27375
|
days
|
|
@@ -27905,7 +27395,7 @@ function CalendarMonth$3(props2) {
|
|
|
27905
27395
|
gridTemplateColumns: "repeat(7, minmax(44px, 46px))"
|
|
27906
27396
|
}, $[4] = t2) : t2 = $[4];
|
|
27907
27397
|
let t3;
|
|
27908
|
-
$[5] !== weekDayNames ? (t3 = weekDayNames.map(_temp$
|
|
27398
|
+
$[5] !== weekDayNames ? (t3 = weekDayNames.map(_temp$2$), $[5] = weekDayNames, $[6] = t3) : t3 = $[6];
|
|
27909
27399
|
const t4 = useWeeksOfMonth$1(props2.date);
|
|
27910
27400
|
let t5;
|
|
27911
27401
|
if ($[7] !== props2.focused || $[8] !== props2.isPastDisabled || $[9] !== props2.onSelect || $[10] !== props2.selected || $[11] !== t4) {
|
|
@@ -27924,7 +27414,7 @@ function CalendarMonth$3(props2) {
|
|
|
27924
27414
|
let t7;
|
|
27925
27415
|
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;
|
|
27926
27416
|
}
|
|
27927
|
-
function _temp$
|
|
27417
|
+
function _temp$2$(weekday) {
|
|
27928
27418
|
return /* @__PURE__ */ jsx(Box, { paddingY: 2, children: /* @__PURE__ */ jsx(Text$1, { size: 1, weight: "medium", style: {
|
|
27929
27419
|
textAlign: "center"
|
|
27930
27420
|
}, children: weekday }) }, weekday);
|
|
@@ -28229,11 +27719,11 @@ function CalendarMonthSelect$1(props2) {
|
|
|
28229
27719
|
monthNames
|
|
28230
27720
|
} = props2;
|
|
28231
27721
|
let t0;
|
|
28232
|
-
$[0] !== monthNames ? (t0 = monthNames.map(_temp$
|
|
27722
|
+
$[0] !== monthNames ? (t0 = monthNames.map(_temp$2_), $[0] = monthNames, $[1] = t0) : t0 = $[1];
|
|
28233
27723
|
let t1;
|
|
28234
27724
|
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, { fontSize: 1, radius: 2, value, onChange, padding: 2, children: t0 }) }) }), $[2] = onChange, $[3] = t0, $[4] = value, $[5] = t1) : t1 = $[5], t1;
|
|
28235
27725
|
}
|
|
28236
|
-
function _temp$
|
|
27726
|
+
function _temp$2_(monthName, i) {
|
|
28237
27727
|
return /* @__PURE__ */ jsx("option", { value: i, children: monthName }, i);
|
|
28238
27728
|
}
|
|
28239
27729
|
function CalendarYearSelect$1(props2) {
|
|
@@ -28498,15 +27988,15 @@ const TimeZoneButton = (props2) => {
|
|
|
28498
27988
|
$[3] !== tooltipContent ? (t2 = /* @__PURE__ */ jsx(Box, { flex: 1, padding: 1, children: /* @__PURE__ */ jsx(Text$1, { size: 1, children: tooltipContent }) }), $[3] = tooltipContent, $[4] = t2) : t2 = $[4];
|
|
28499
27989
|
let t3;
|
|
28500
27990
|
$[5] !== allowTimeZoneSwitch || $[6] !== dialogTimeZoneShow || $[7] !== timeZone.alternativeName || $[8] !== timeZone.city || $[9] !== timeZone.namePretty || $[10] !== useElementQueries ? (t3 = /* @__PURE__ */ jsx("div", { children: useElementQueries ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
28501
|
-
/* @__PURE__ */ jsx(Box, { className: "button-small", children: allowTimeZoneSwitch ? /* @__PURE__ */ jsx(Button, { "data-testid": "timezone-button", icon: EarthAmericasIcon, mode: "bleed", readOnly: !allowTimeZoneSwitch, onClick: allowTimeZoneSwitch ? dialogTimeZoneShow : noop$
|
|
27991
|
+
/* @__PURE__ */ jsx(Box, { className: "button-small", children: allowTimeZoneSwitch ? /* @__PURE__ */ jsx(Button, { "data-testid": "timezone-button", icon: EarthAmericasIcon, mode: "bleed", readOnly: !allowTimeZoneSwitch, onClick: allowTimeZoneSwitch ? dialogTimeZoneShow : noop$7, text: `${timeZone.city}` }) : /* @__PURE__ */ jsxs(Inline, { space: 2, padding: 2, children: [
|
|
28502
27992
|
/* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: /* @__PURE__ */ jsx(EarthAmericasIcon, {}) }),
|
|
28503
27993
|
/* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: `${timeZone.city}` })
|
|
28504
27994
|
] }) }),
|
|
28505
|
-
/* @__PURE__ */ jsx(Box, { className: "button-large", children: allowTimeZoneSwitch ? /* @__PURE__ */ jsx(Button, { "data-testid": "timezone-button", icon: EarthAmericasIcon, mode: "bleed", readOnly: !allowTimeZoneSwitch, onClick: allowTimeZoneSwitch ? dialogTimeZoneShow : noop$
|
|
27995
|
+
/* @__PURE__ */ jsx(Box, { className: "button-large", children: allowTimeZoneSwitch ? /* @__PURE__ */ jsx(Button, { "data-testid": "timezone-button", icon: EarthAmericasIcon, mode: "bleed", readOnly: !allowTimeZoneSwitch, onClick: allowTimeZoneSwitch ? dialogTimeZoneShow : noop$7, text: `${timeZone.alternativeName} (${timeZone.namePretty})` }) : /* @__PURE__ */ jsxs(Inline, { space: 2, padding: 2, children: [
|
|
28506
27996
|
/* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: /* @__PURE__ */ jsx(EarthAmericasIcon, {}) }),
|
|
28507
27997
|
/* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: `${timeZone.alternativeName} (${timeZone.namePretty})` })
|
|
28508
27998
|
] }) })
|
|
28509
|
-
] }) : /* @__PURE__ */ jsx(Fragment$1, { children: allowTimeZoneSwitch ? /* @__PURE__ */ jsx(Button, { icon: EarthAmericasIcon, mode: "bleed", readOnly: !allowTimeZoneSwitch, onClick: allowTimeZoneSwitch ? dialogTimeZoneShow : noop$
|
|
27999
|
+
] }) : /* @__PURE__ */ jsx(Fragment$1, { children: allowTimeZoneSwitch ? /* @__PURE__ */ jsx(Button, { icon: EarthAmericasIcon, mode: "bleed", readOnly: !allowTimeZoneSwitch, onClick: allowTimeZoneSwitch ? dialogTimeZoneShow : noop$7, text: `${timeZone.alternativeName} (${timeZone.namePretty})` }) : /* @__PURE__ */ jsxs(Inline, { space: 2, padding: 2, children: [
|
|
28510
28000
|
/* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: /* @__PURE__ */ jsx(EarthAmericasIcon, {}) }),
|
|
28511
28001
|
/* @__PURE__ */ jsx(Text$1, { weight: "medium", size: 1, children: `${timeZone.alternativeName} (${timeZone.namePretty})` })
|
|
28512
28002
|
] }) }) }), $[5] = allowTimeZoneSwitch, $[6] = dialogTimeZoneShow, $[7] = timeZone.alternativeName, $[8] = timeZone.city, $[9] = timeZone.namePretty, $[10] = useElementQueries, $[11] = t3) : t3 = $[11];
|
|
@@ -28575,7 +28065,7 @@ function DateTimeInput$2(props2) {
|
|
|
28575
28065
|
changed,
|
|
28576
28066
|
path,
|
|
28577
28067
|
presence: t0
|
|
28578
|
-
} = props2, presence = t0 === void 0 ? EMPTY_ARRAY$
|
|
28068
|
+
} = props2, presence = t0 === void 0 ? EMPTY_ARRAY$z : t0, {
|
|
28579
28069
|
focused,
|
|
28580
28070
|
__internal_comments: comments2,
|
|
28581
28071
|
hovered,
|
|
@@ -28808,7 +28298,7 @@ const GroupTab = forwardRef(function(props2, ref) {
|
|
|
28808
28298
|
} = useTranslation();
|
|
28809
28299
|
let t3;
|
|
28810
28300
|
$[2] !== t ? (t3 = t("inputs.object.field-group-tabs.aria-label"), $[2] = t, $[3] = t3) : t3 = $[3];
|
|
28811
|
-
const t4 = groups.find(_temp$
|
|
28301
|
+
const t4 = groups.find(_temp$2Z)?.name;
|
|
28812
28302
|
let t5;
|
|
28813
28303
|
if ($[4] !== groups || $[5] !== inputId || $[6] !== t) {
|
|
28814
28304
|
let t62;
|
|
@@ -28842,7 +28332,7 @@ const GroupTab = forwardRef(function(props2, ref) {
|
|
|
28842
28332
|
/* @__PURE__ */ jsx(GroupSelect, { ...props2, disabled, onSelect: handleClick })
|
|
28843
28333
|
] }), $[6] = disabled, $[7] = handleClick, $[8] = props2, $[9] = t3) : t3 = $[9], t3;
|
|
28844
28334
|
});
|
|
28845
|
-
function _temp$
|
|
28335
|
+
function _temp$2Z(g) {
|
|
28846
28336
|
return g.selected;
|
|
28847
28337
|
}
|
|
28848
28338
|
const FieldGroupTabsWrapper = styled(Card)`
|
|
@@ -28949,8 +28439,7 @@ const RootStack$2 = styled(Stack)`
|
|
|
28949
28439
|
outline: none;
|
|
28950
28440
|
}
|
|
28951
28441
|
`, ObjectInput = memo(function(props2) {
|
|
28952
|
-
const $ = c(
|
|
28953
|
-
__internal_enhancedbjectDialog: t0,
|
|
28442
|
+
const $ = c(43), {
|
|
28954
28443
|
groups,
|
|
28955
28444
|
id: id2,
|
|
28956
28445
|
members,
|
|
@@ -28968,73 +28457,68 @@ const RootStack$2 = styled(Stack)`
|
|
|
28968
28457
|
level,
|
|
28969
28458
|
value,
|
|
28970
28459
|
onPathFocus
|
|
28971
|
-
} = props2,
|
|
28972
|
-
let
|
|
28973
|
-
$[0] !== schemaType.options ? (
|
|
28460
|
+
} = props2, wrapperRef = useRef(null);
|
|
28461
|
+
let t0;
|
|
28462
|
+
$[0] !== schemaType.options ? (t0 = schemaType.options || {}, $[0] = schemaType.options, $[1] = t0) : t0 = $[1];
|
|
28974
28463
|
const {
|
|
28975
28464
|
columns
|
|
28976
|
-
} =
|
|
28465
|
+
} = t0;
|
|
28466
|
+
let t1;
|
|
28467
|
+
$[2] !== id2 || $[3] !== path ? (t1 = id2 !== "root" && !(path.length > 0 && isKeySegment(last$1(path))), $[2] = id2, $[3] = path, $[4] = t1) : t1 = $[4];
|
|
28468
|
+
const isFocusable = t1;
|
|
28977
28469
|
let t2;
|
|
28978
|
-
$[2] !== id2 || $[3] !== path ? (t2 = id2 !== "root" && !(path.length > 0 && isKeySegment(last$1(path))), $[2] = id2, $[3] = path, $[4] = t2) : t2 = $[4];
|
|
28979
|
-
const isFocusable = t2;
|
|
28980
|
-
let t3;
|
|
28981
28470
|
bb0: {
|
|
28982
28471
|
if (!schemaType.fields) {
|
|
28983
|
-
|
|
28472
|
+
t2 = null;
|
|
28984
28473
|
break bb0;
|
|
28985
28474
|
}
|
|
28986
|
-
let
|
|
28475
|
+
let t32;
|
|
28987
28476
|
if ($[5] !== schemaType.fields || $[6] !== value) {
|
|
28988
|
-
const knownFieldNames = schemaType.fields.map(_temp$
|
|
28989
|
-
|
|
28477
|
+
const knownFieldNames = schemaType.fields.map(_temp$2Y);
|
|
28478
|
+
t32 = Object.keys(value || {}).filter((key) => !key.startsWith("_") && !knownFieldNames.includes(key)), $[5] = schemaType.fields, $[6] = value, $[7] = t32;
|
|
28990
28479
|
} else
|
|
28991
|
-
|
|
28992
|
-
const unknownFields =
|
|
28480
|
+
t32 = $[7];
|
|
28481
|
+
const unknownFields = t32;
|
|
28993
28482
|
if (unknownFields.length === 0) {
|
|
28994
|
-
|
|
28483
|
+
t2 = null;
|
|
28995
28484
|
break bb0;
|
|
28996
28485
|
}
|
|
28997
|
-
let
|
|
28998
|
-
$[8] !== onChange || $[9] !== unknownFields || $[10] !== value ? (
|
|
28486
|
+
let t42;
|
|
28487
|
+
$[8] !== onChange || $[9] !== unknownFields || $[10] !== value ? (t42 = /* @__PURE__ */ jsx(UnknownFields, { fieldNames: unknownFields, value, onChange }), $[8] = onChange, $[9] = unknownFields, $[10] = value, $[11] = t42) : t42 = $[11], t2 = t42;
|
|
28999
28488
|
}
|
|
29000
|
-
const renderedUnknownFields =
|
|
28489
|
+
const renderedUnknownFields = t2;
|
|
28490
|
+
let t3;
|
|
28491
|
+
$[12] !== groups ? (t3 = groups.find(_temp2$1e), $[12] = groups, $[13] = t3) : t3 = $[13];
|
|
28492
|
+
const selectedGroup = t3;
|
|
29001
28493
|
let t4;
|
|
29002
|
-
$[
|
|
29003
|
-
|
|
28494
|
+
$[14] !== isFocusable || $[15] !== onPathFocus ? (t4 = (event) => {
|
|
28495
|
+
isFocusable && event.target === wrapperRef.current && onPathFocus(EMPTY_ARRAY$z);
|
|
28496
|
+
}, $[14] = isFocusable, $[15] = onPathFocus, $[16] = t4) : t4 = $[16];
|
|
28497
|
+
const handleFocus = t4;
|
|
29004
28498
|
let t5;
|
|
29005
|
-
$[
|
|
29006
|
-
|
|
29007
|
-
}, $[14] = isFocusable, $[15] = onPathFocus, $[16] = t5) : t5 = $[16];
|
|
29008
|
-
const handleFocus = t5;
|
|
29009
|
-
let t6;
|
|
29010
|
-
$[17] !== members || $[18] !== renderAnnotation || $[19] !== renderBlock2 || $[20] !== renderField || $[21] !== renderInlineBlock || $[22] !== renderInput || $[23] !== renderItem2 || $[24] !== renderPreview ? (t6 = () => /* @__PURE__ */ jsx(ObjectInputMembers, { members, renderAnnotation, renderBlock: renderBlock2, renderField, renderInlineBlock, renderInput, renderItem: renderItem2, renderPreview }), $[17] = members, $[18] = renderAnnotation, $[19] = renderBlock2, $[20] = renderField, $[21] = renderInlineBlock, $[22] = renderInput, $[23] = renderItem2, $[24] = renderPreview, $[25] = t6) : t6 = $[25];
|
|
29011
|
-
const renderObjectMembers = t6;
|
|
28499
|
+
$[17] !== members || $[18] !== renderAnnotation || $[19] !== renderBlock2 || $[20] !== renderField || $[21] !== renderInlineBlock || $[22] !== renderInput || $[23] !== renderItem2 || $[24] !== renderPreview ? (t5 = () => /* @__PURE__ */ jsx(ObjectInputMembers, { members, renderAnnotation, renderBlock: renderBlock2, renderField, renderInlineBlock, renderInput, renderItem: renderItem2, renderPreview }), $[17] = members, $[18] = renderAnnotation, $[19] = renderBlock2, $[20] = renderField, $[21] = renderInlineBlock, $[22] = renderInput, $[23] = renderItem2, $[24] = renderPreview, $[25] = t5) : t5 = $[25];
|
|
28500
|
+
const renderObjectMembers = t5;
|
|
29012
28501
|
if (members.length === 0)
|
|
29013
28502
|
return null;
|
|
29014
|
-
const
|
|
29015
|
-
let
|
|
29016
|
-
$[26] !== groups || $[27] !== id2 || $[28] !== level || $[29] !== onFieldGroupSelect ? (
|
|
29017
|
-
const
|
|
28503
|
+
const t6 = isFocusable ? 0 : void 0;
|
|
28504
|
+
let t7;
|
|
28505
|
+
$[26] !== groups || $[27] !== id2 || $[28] !== level || $[29] !== onFieldGroupSelect ? (t7 = groups.length > 0 ? /* @__PURE__ */ jsx(FieldGroupTabsWrapper, { $level: level, "data-testid": "field-groups", children: /* @__PURE__ */ jsx(FieldGroupTabs, { groups, inputId: id2, onClick: onFieldGroupSelect, shouldAutoFocus: !1 }) }) : null, $[26] = groups, $[27] = id2, $[28] = level, $[29] = onFieldGroupSelect, $[30] = t7) : t7 = $[30];
|
|
28506
|
+
const t8 = selectedGroup?.name;
|
|
28507
|
+
let t9;
|
|
28508
|
+
$[31] !== columns || $[32] !== renderObjectMembers ? (t9 = columns ? /* @__PURE__ */ jsx(AlignedBottomGrid, { columns, gap: 4, marginTop: 1, children: renderObjectMembers() }) : renderObjectMembers(), $[31] = columns, $[32] = renderObjectMembers, $[33] = t9) : t9 = $[33];
|
|
29018
28509
|
let t10;
|
|
29019
|
-
$[
|
|
28510
|
+
$[34] !== t8 || $[35] !== t9 ? (t10 = /* @__PURE__ */ jsx(Fragment, { children: t9 }, t8), $[34] = t8, $[35] = t9, $[36] = t10) : t10 = $[36];
|
|
29020
28511
|
let t11;
|
|
29021
|
-
$[
|
|
29022
|
-
|
|
29023
|
-
|
|
29024
|
-
t8,
|
|
29025
|
-
t11,
|
|
28512
|
+
return $[37] !== handleFocus || $[38] !== renderedUnknownFields || $[39] !== t10 || $[40] !== t6 || $[41] !== t7 ? (t11 = /* @__PURE__ */ jsxs(RootStack$2, { space: 6, tabIndex: t6, onFocus: handleFocus, ref: wrapperRef, children: [
|
|
28513
|
+
t7,
|
|
28514
|
+
t10,
|
|
29026
28515
|
renderedUnknownFields
|
|
29027
|
-
] }), $[37] = handleFocus, $[38] = renderedUnknownFields, $[39] =
|
|
29028
|
-
let t13;
|
|
29029
|
-
return $[43] !== arrayEditingModal || $[44] !== t12 ? (t13 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
29030
|
-
arrayEditingModal,
|
|
29031
|
-
t12
|
|
29032
|
-
] }), $[43] = arrayEditingModal, $[44] = t12, $[45] = t13) : t13 = $[45], t13;
|
|
28516
|
+
] }), $[37] = handleFocus, $[38] = renderedUnknownFields, $[39] = t10, $[40] = t6, $[41] = t7, $[42] = t11) : t11 = $[42], t11;
|
|
29033
28517
|
});
|
|
29034
|
-
function _temp$
|
|
28518
|
+
function _temp$2Y(field) {
|
|
29035
28519
|
return field.name;
|
|
29036
28520
|
}
|
|
29037
|
-
function _temp2$
|
|
28521
|
+
function _temp2$1e(t0) {
|
|
29038
28522
|
const {
|
|
29039
28523
|
selected
|
|
29040
28524
|
} = t0;
|
|
@@ -29110,7 +28594,7 @@ function SlugInput(props2) {
|
|
|
29110
28594
|
focusPath
|
|
29111
28595
|
} = props2, sourceField = schemaType.options?.source;
|
|
29112
28596
|
let t0;
|
|
29113
|
-
$[0] !== validation2 ? (t0 = validation2.filter(_temp$
|
|
28597
|
+
$[0] !== validation2 ? (t0 = validation2.filter(_temp$2X), $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
29114
28598
|
const errors = t0, inputRef = useRef(null), slugContext = useSlugContext(), {
|
|
29115
28599
|
t
|
|
29116
28600
|
} = useTranslation();
|
|
@@ -29176,7 +28660,7 @@ function SlugInput(props2) {
|
|
|
29176
28660
|
t13
|
|
29177
28661
|
] }) }), $[38] = t12, $[39] = t13, $[40] = t14) : t14 = $[40], t14;
|
|
29178
28662
|
}
|
|
29179
|
-
function _temp$
|
|
28663
|
+
function _temp$2X(item) {
|
|
29180
28664
|
return item.level === "error";
|
|
29181
28665
|
}
|
|
29182
28666
|
function StringInputBasic(props2) {
|
|
@@ -29441,7 +28925,7 @@ const ScrollContainerComponent = forwardRef(function(props2, forwardedRef) {
|
|
|
29441
28925
|
const As = t0 === void 0 ? "div" : t0, ref = useRef(null);
|
|
29442
28926
|
let t1;
|
|
29443
28927
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => ref.current, $[4] = t1) : t1 = $[4], useImperativeHandle(forwardedRef, t1);
|
|
29444
|
-
const parentContext = useContext(ScrollContext), [childContext] = useState(_temp$
|
|
28928
|
+
const parentContext = useContext(ScrollContext), [childContext] = useState(_temp$2W);
|
|
29445
28929
|
let t2, t3;
|
|
29446
28930
|
$[5] !== childContext || $[6] !== onScroll ? (t2 = () => {
|
|
29447
28931
|
if (onScroll)
|
|
@@ -29471,7 +28955,7 @@ const ScrollContainerComponent = forwardRef(function(props2, forwardedRef) {
|
|
|
29471
28955
|
return $[19] !== childContext || $[20] !== t8 ? (t9 = /* @__PURE__ */ jsx(ScrollContext.Provider, { value: childContext, children: t8 }), $[19] = childContext, $[20] = t8, $[21] = t9) : t9 = $[21], t9;
|
|
29472
28956
|
}), ScrollContainer = memo(ScrollContainerComponent);
|
|
29473
28957
|
ScrollContainer.displayName = "Memo(Forwardref(ScrollContainer))";
|
|
29474
|
-
function _temp$
|
|
28958
|
+
function _temp$2W() {
|
|
29475
28959
|
return createPubSub();
|
|
29476
28960
|
}
|
|
29477
28961
|
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 = {
|
|
@@ -29747,7 +29231,7 @@ const ChangeBarWrapper = memo(function(props2) {
|
|
|
29747
29231
|
isInteractive,
|
|
29748
29232
|
...restProps
|
|
29749
29233
|
} = props2, $[0] = props2, $[1] = children, $[2] = disabled, $[3] = hasFocus, $[4] = isChanged, $[5] = isInteractive, $[6] = onMouseEnterProp, $[7] = onMouseLeaveProp, $[8] = restProps, $[9] = t0, $[10] = withHoverEffect) : (children = $[1], disabled = $[2], hasFocus = $[3], isChanged = $[4], isInteractive = $[5], onMouseEnterProp = $[6], onMouseLeaveProp = $[7], restProps = $[8], t0 = $[9], withHoverEffect = $[10]);
|
|
29750
|
-
const path = t0 === void 0 ? EMPTY_ARRAY$
|
|
29234
|
+
const path = t0 === void 0 ? EMPTY_ARRAY$z : t0, layer = useLayer(), [hasHover, setHover] = useState(!1);
|
|
29751
29235
|
let t1;
|
|
29752
29236
|
$[11] !== onMouseEnterProp ? (t1 = (event) => {
|
|
29753
29237
|
onMouseEnterProp?.(event), setHover(!0);
|
|
@@ -29861,7 +29345,7 @@ function BlockActions(props2) {
|
|
|
29861
29345
|
renderBlockActions
|
|
29862
29346
|
} = props2;
|
|
29863
29347
|
let t0;
|
|
29864
|
-
$[0] !== editor2.schemaTypes.decorators ? (t0 = editor2.schemaTypes.decorators.map(_temp$
|
|
29348
|
+
$[0] !== editor2.schemaTypes.decorators ? (t0 = editor2.schemaTypes.decorators.map(_temp$2V), $[0] = editor2.schemaTypes.decorators, $[1] = t0) : t0 = $[1];
|
|
29865
29349
|
const decoratorValues = t0;
|
|
29866
29350
|
let t1;
|
|
29867
29351
|
bb0: {
|
|
@@ -29900,7 +29384,7 @@ function BlockActions(props2) {
|
|
|
29900
29384
|
let t2;
|
|
29901
29385
|
return $[8] !== blockActions ? (t2 = /* @__PURE__ */ jsx(Root$j, { contentEditable: !1, children: blockActions }), $[8] = blockActions, $[9] = t2) : t2 = $[9], t2;
|
|
29902
29386
|
}
|
|
29903
|
-
function _temp$
|
|
29387
|
+
function _temp$2V(d) {
|
|
29904
29388
|
return d.value;
|
|
29905
29389
|
}
|
|
29906
29390
|
function textBlockStyle(props2) {
|
|
@@ -30292,7 +29776,7 @@ function TextBlock(props2) {
|
|
|
30292
29776
|
paddingY: 2
|
|
30293
29777
|
}, $[33] = value.style, $[34] = t142) : t142 = $[34], t13 = t142;
|
|
30294
29778
|
}
|
|
30295
|
-
const outerPaddingProps = t13, isOpen = !!memberItem?.member.open, parentSchemaType = editor2.schemaTypes.portableText, referenceElement = divElement, t14 = memberItem?.node.path || EMPTY_ARRAY$
|
|
29779
|
+
const outerPaddingProps = t13, isOpen = !!memberItem?.member.open, parentSchemaType = editor2.schemaTypes.portableText, referenceElement = divElement, t14 = memberItem?.node.path || EMPTY_ARRAY$z, t15 = !!readOnly;
|
|
30296
29780
|
let t16;
|
|
30297
29781
|
$[35] !== floatingBoundary || $[36] !== focused || $[37] !== isOpen || $[38] !== markers || $[39] !== onItemClose || $[40] !== onOpen || $[41] !== onPathFocus || $[42] !== onRemove || $[43] !== parentSchemaType || $[44] !== referenceBoundary || $[45] !== referenceElement || $[46] !== renderAnnotation || $[47] !== renderBlock2 || $[48] !== renderField || $[49] !== renderInlineBlock || $[50] !== renderInput || $[51] !== renderItem2 || $[52] !== renderPreview || $[53] !== schemaType || $[54] !== selected || $[55] !== t14 || $[56] !== t15 || $[57] !== text || $[58] !== textPresence || $[59] !== validation2 || $[60] !== value ? (t16 = {
|
|
30298
29782
|
__unstable_floatingBoundary: floatingBoundary,
|
|
@@ -30633,13 +30117,13 @@ const MENU_BUTTON_POPOVER_PROPS$1 = {
|
|
|
30633
30117
|
onMenuClose
|
|
30634
30118
|
} = props2;
|
|
30635
30119
|
let t0;
|
|
30636
|
-
$[0] !== menuOptions ? (t0 = menuOptions.map(_temp$
|
|
30120
|
+
$[0] !== menuOptions ? (t0 = menuOptions.map(_temp$2U), $[0] = menuOptions, $[1] = t0) : t0 = $[1];
|
|
30637
30121
|
let t1;
|
|
30638
30122
|
$[2] !== t0 ? (t1 = /* @__PURE__ */ jsx(Menu, { children: t0 }), $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
30639
30123
|
let t2;
|
|
30640
30124
|
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;
|
|
30641
30125
|
});
|
|
30642
|
-
function _temp$
|
|
30126
|
+
function _temp$2U(c2, index) {
|
|
30643
30127
|
const {
|
|
30644
30128
|
collapsedProps,
|
|
30645
30129
|
expandedProps,
|
|
@@ -30766,7 +30250,7 @@ const CollapseMenu = forwardRef(function(props2, ref) {
|
|
|
30766
30250
|
}, $[10] = rootEl, $[11] = t3) : t3 = $[11];
|
|
30767
30251
|
const intersectionOptions = t3;
|
|
30768
30252
|
let t4;
|
|
30769
|
-
$[12] !== menuOptions ? (t4 = menuOptions.map(_temp$
|
|
30253
|
+
$[12] !== menuOptions ? (t4 = menuOptions.map(_temp$2T), $[12] = menuOptions, $[13] = t4) : t4 = $[13];
|
|
30770
30254
|
const menuOptionKeys = t4;
|
|
30771
30255
|
let t5;
|
|
30772
30256
|
$[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];
|
|
@@ -30904,7 +30388,7 @@ const CollapseMenu = forwardRef(function(props2, ref) {
|
|
|
30904
30388
|
let t1;
|
|
30905
30389
|
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;
|
|
30906
30390
|
});
|
|
30907
|
-
function _temp$
|
|
30391
|
+
function _temp$2T(child) {
|
|
30908
30392
|
return child.key;
|
|
30909
30393
|
}
|
|
30910
30394
|
const CollapseMenuButton = forwardRef(function(props2, ref) {
|
|
@@ -31077,9 +30561,9 @@ function useActiveActionKeys(t0) {
|
|
|
31077
30561
|
actions
|
|
31078
30562
|
} = t0, editor2 = usePortableTextEditor(), selection = usePortableTextEditorSelection();
|
|
31079
30563
|
let t1;
|
|
31080
|
-
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$
|
|
30564
|
+
return $[0] !== actions || $[1] !== editor2 || $[2] !== selection ? (t1 = selection ? actions.filter((a) => a.type === "annotation" ? PortableTextEditor.isAnnotationActive(editor2, a.key) : a.type === "listStyle" ? PortableTextEditor.hasListStyle(editor2, a.key) : PortableTextEditor.isMarkActive(editor2, a.key)).map(_temp$2S) : [], $[0] = actions, $[1] = editor2, $[2] = selection, $[3] = t1) : t1 = $[3], useUnique(t1);
|
|
31081
30565
|
}
|
|
31082
|
-
function _temp$
|
|
30566
|
+
function _temp$2S(a_0) {
|
|
31083
30567
|
return a_0.key;
|
|
31084
30568
|
}
|
|
31085
30569
|
function useActiveStyleKeys(t0) {
|
|
@@ -31087,9 +30571,9 @@ function useActiveStyleKeys(t0) {
|
|
|
31087
30571
|
items
|
|
31088
30572
|
} = t0, editor2 = usePortableTextEditor(), focusBlock = useFocusBlock(), selection = usePortableTextEditorSelection();
|
|
31089
30573
|
let t1;
|
|
31090
|
-
return $[0] !== editor2 || $[1] !== focusBlock || $[2] !== items || $[3] !== selection ? (t1 = focusBlock && selection ? items.filter((i) => PortableTextEditor.hasBlockStyle(editor2, i.style)).map(_temp2$
|
|
30574
|
+
return $[0] !== editor2 || $[1] !== focusBlock || $[2] !== items || $[3] !== selection ? (t1 = focusBlock && selection ? items.filter((i) => PortableTextEditor.hasBlockStyle(editor2, i.style)).map(_temp2$1d) : [], $[0] = editor2, $[1] = focusBlock, $[2] = items, $[3] = selection, $[4] = t1) : t1 = $[4], useUnique(t1);
|
|
31091
30575
|
}
|
|
31092
|
-
function _temp2$
|
|
30576
|
+
function _temp2$1d(i_0) {
|
|
31093
30577
|
return i_0.style;
|
|
31094
30578
|
}
|
|
31095
30579
|
const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$4 = {
|
|
@@ -31108,7 +30592,7 @@ const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$4 = {
|
|
|
31108
30592
|
$[0] !== selection ? (t0 = selection && isKeySegment(selection.anchor.path[0]) && isKeySegment(selection.focus.path[0]) ? selection.anchor.path[0]._key !== selection?.focus.path[0]._key : selection?.anchor.path[0] !== selection?.focus.path[0], $[0] = selection, $[1] = t0) : t0 = $[1];
|
|
31109
30593
|
const isSelectingMultipleBlocks = t0, isVoidBlock = focusBlock?._type !== editor2.schemaTypes.block.name, isEmptyTextBlock = !isVoidBlock && Array.isArray(focusBlock.children) && focusBlock.children.length === 1 && focusBlock?.children[0].text === "", disabled = disabledProp || isVoidBlock;
|
|
31110
30594
|
let t1;
|
|
31111
|
-
$[2] !== groups ? (t1 = groups.reduce(_temp2$
|
|
30595
|
+
$[2] !== groups ? (t1 = groups.reduce(_temp2$1c, []), $[2] = groups, $[3] = t1) : t1 = $[3];
|
|
31112
30596
|
const actions = t1;
|
|
31113
30597
|
let t2;
|
|
31114
30598
|
$[4] !== actions ? (t2 = {
|
|
@@ -31153,14 +30637,14 @@ const CollapseMenuMemo$1 = memo(CollapseMenu), MENU_POPOVER_PROPS$4 = {
|
|
|
31153
30637
|
let t7;
|
|
31154
30638
|
return $[28] !== children || $[29] !== collapsed || $[30] !== handleMenuClose || $[31] !== menuButtonProps ? (t7 = /* @__PURE__ */ jsx(CollapseMenuMemo$1, { "data-testid": "action-menu-auto-collapse-menu", collapsed, disableRestoreFocusOnClose: !0, gap: 1, menuButtonProps, onMenuClose: handleMenuClose, children }), $[28] = children, $[29] = collapsed, $[30] = handleMenuClose, $[31] = menuButtonProps, $[32] = t7) : t7 = $[32], t7;
|
|
31155
30639
|
});
|
|
31156
|
-
function _temp$
|
|
30640
|
+
function _temp$2R(action, actionIndex) {
|
|
31157
30641
|
return actionIndex === 0 ? {
|
|
31158
30642
|
...action,
|
|
31159
30643
|
firstInGroup: !0
|
|
31160
30644
|
} : action;
|
|
31161
30645
|
}
|
|
31162
|
-
function _temp2$
|
|
31163
|
-
return acc.concat(group2.actions.map(_temp$
|
|
30646
|
+
function _temp2$1c(acc, group2) {
|
|
30647
|
+
return acc.concat(group2.actions.map(_temp$2R));
|
|
31164
30648
|
}
|
|
31165
30649
|
const MenuButtonMemo = memo(MenuButton), StyledMenuItem = styled(MenuItem$1)`
|
|
31166
30650
|
// Change the border color variable used by BlockQuote
|
|
@@ -31341,12 +30825,12 @@ const MenuButtonMemo = memo(MenuButton), StyledMenuItem = styled(MenuItem$1)`
|
|
|
31341
30825
|
onToggleFullscreen
|
|
31342
30826
|
} = t0, {
|
|
31343
30827
|
t
|
|
31344
|
-
} = useTranslation(), showActionMenu = actionGroups.reduce(_temp$
|
|
30828
|
+
} = useTranslation(), showActionMenu = actionGroups.reduce(_temp$2Q, 0) > 0, showInsertMenu = insertMenuItems.length > 0, [rootElement, setRootElement] = useState(null), rootElementRect = useElementRect(rootElement), collapsed = collapsible && rootElementRect ? rootElementRect?.width < 400 : !1, showBlockStyleSelect = blockStyles.length > 1;
|
|
31345
30829
|
let t1;
|
|
31346
30830
|
$[0] !== rootElement ? (t1 = {
|
|
31347
30831
|
rootElement
|
|
31348
30832
|
}, $[0] = rootElement, $[1] = t1) : t1 = $[1], useRovingFocus(t1);
|
|
31349
|
-
const preventEditorBlurOnToolbarMouseDown = _temp2$
|
|
30833
|
+
const preventEditorBlurOnToolbarMouseDown = _temp2$1b;
|
|
31350
30834
|
let t2;
|
|
31351
30835
|
$[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];
|
|
31352
30836
|
let t3;
|
|
@@ -31450,10 +30934,10 @@ function Toolbar(props2) {
|
|
|
31450
30934
|
let t6;
|
|
31451
30935
|
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;
|
|
31452
30936
|
}
|
|
31453
|
-
function _temp$
|
|
30937
|
+
function _temp$2Q(acc, x) {
|
|
31454
30938
|
return acc + x.actions.length;
|
|
31455
30939
|
}
|
|
31456
|
-
function _temp2$
|
|
30940
|
+
function _temp2$1b(e) {
|
|
31457
30941
|
e.preventDefault();
|
|
31458
30942
|
}
|
|
31459
30943
|
const noOutlineStyle = {
|
|
@@ -31608,7 +31092,7 @@ function useTrackFocusPath(props2) {
|
|
|
31608
31092
|
$[0] !== boundaryElement || $[1] !== editor2 || $[2] !== elementRefs || $[3] !== focusPath || $[4] !== portableTextMemberItems || $[5] !== selection ? (t0 = () => {
|
|
31609
31093
|
if (focusPath.length === 0 || selection?.focus.path && isEqual$3(selection.focus.path, focusPath.slice(0, selection.focus.path.length)))
|
|
31610
31094
|
return;
|
|
31611
|
-
const focusedItem = portableTextMemberItems.find(_temp$
|
|
31095
|
+
const focusedItem = portableTextMemberItems.find(_temp$2P), openItem = portableTextMemberItems.find(_temp2$1a), relatedEditorItem = focusedItem || openItem, elementRef = relatedEditorItem ? elementRefs[relatedEditorItem.member.key] : void 0;
|
|
31612
31096
|
if (relatedEditorItem && elementRef) {
|
|
31613
31097
|
boundaryElement && (scrollIntoView$1(boundaryElement, {
|
|
31614
31098
|
scrollMode: "if-needed",
|
|
@@ -31645,10 +31129,10 @@ function useTrackFocusPath(props2) {
|
|
|
31645
31129
|
let t2;
|
|
31646
31130
|
$[7] !== boundaryElement || $[8] !== editor2 || $[9] !== elementRefs || $[10] !== focusPath || $[11] !== onItemClose || $[12] !== portableTextMemberItems || $[13] !== t1 ? (t2 = [boundaryElement, editor2, elementRefs, focusPath, onItemClose, portableTextMemberItems, t1], $[7] = boundaryElement, $[8] = editor2, $[9] = elementRefs, $[10] = focusPath, $[11] = onItemClose, $[12] = portableTextMemberItems, $[13] = t1, $[14] = t2) : t2 = $[14], useLayoutEffect(t0, t2);
|
|
31647
31131
|
}
|
|
31648
|
-
function _temp2$
|
|
31132
|
+
function _temp2$1a(m_0) {
|
|
31649
31133
|
return m_0.member.open;
|
|
31650
31134
|
}
|
|
31651
|
-
function _temp$
|
|
31135
|
+
function _temp$2P(m) {
|
|
31652
31136
|
return m.member.item.focused;
|
|
31653
31137
|
}
|
|
31654
31138
|
const Root$h = styled(Card)(rootStyle), PreviewSpan = styled.span`
|
|
@@ -31917,7 +31401,7 @@ function Content(props2) {
|
|
|
31917
31401
|
content: "Close"
|
|
31918
31402
|
}, $[12] = t7) : t7 = $[12];
|
|
31919
31403
|
let t8;
|
|
31920
|
-
$[13] !== handleClose ? (t8 = /* @__PURE__ */ jsx(Button, { autoFocus: !0, icon: CloseIcon, mode: "bleed", onClick: handleClose, tooltipProps: t7 }), $[13] = handleClose, $[14] = t8) : t8 = $[14];
|
|
31404
|
+
$[13] !== handleClose ? (t8 = /* @__PURE__ */ jsx(Button, { autoFocus: !0, icon: CloseIcon, mode: "bleed", onClick: handleClose, tooltipProps: t7, "data-testid": "close-popover-edit-dialog-button" }), $[13] = handleClose, $[14] = t8) : t8 = $[14];
|
|
31921
31405
|
let t9;
|
|
31922
31406
|
$[15] !== t6 || $[16] !== t8 ? (t9 = /* @__PURE__ */ jsx(ContentHeaderBox, { flex: "none", padding: 1, children: /* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
31923
31407
|
t6,
|
|
@@ -31936,7 +31420,7 @@ function Content(props2) {
|
|
|
31936
31420
|
return $[24] !== contentElement || $[25] !== t12 ? (t13 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: contentElement, containerElement, children: t12 }), $[24] = contentElement, $[25] = t12, $[26] = t13) : t13 = $[26], t13;
|
|
31937
31421
|
}
|
|
31938
31422
|
function ObjectEditModal(props2) {
|
|
31939
|
-
const $ = c(
|
|
31423
|
+
const $ = c(28), {
|
|
31940
31424
|
autoFocus,
|
|
31941
31425
|
defaultType,
|
|
31942
31426
|
floatingBoundary,
|
|
@@ -31949,7 +31433,9 @@ function ObjectEditModal(props2) {
|
|
|
31949
31433
|
} = useTranslation();
|
|
31950
31434
|
let t0;
|
|
31951
31435
|
$[0] !== schemaType ? (t0 = _getModalOption(schemaType), $[0] = schemaType, $[1] = t0) : t0 = $[1];
|
|
31952
|
-
const schemaModalOption = t0, modalType = schemaModalOption?.type || defaultType
|
|
31436
|
+
const schemaModalOption = t0, modalType = schemaModalOption?.type || defaultType, {
|
|
31437
|
+
enabled: nestedObjectNavigationEnabled
|
|
31438
|
+
} = useEnhancedObjectDialog();
|
|
31953
31439
|
let t1;
|
|
31954
31440
|
if ($[2] !== schemaType.i18nTitleKey || $[3] !== schemaType.name || $[4] !== schemaType.title || $[5] !== t) {
|
|
31955
31441
|
const schemaTypeTitle = schemaType.i18nTitleKey ? t(schemaType.i18nTitleKey) : schemaType.title || schemaType.name;
|
|
@@ -31968,10 +31454,10 @@ function ObjectEditModal(props2) {
|
|
|
31968
31454
|
let t32;
|
|
31969
31455
|
$[9] !== modalTitle ? (t32 = /* @__PURE__ */ jsx(Fragment$1, { children: modalTitle }), $[9] = modalTitle, $[10] = t32) : t32 = $[10];
|
|
31970
31456
|
let t4;
|
|
31971
|
-
return $[11] !== autoFocus || $[12] !== floatingBoundary || $[13] !== handleClose || $[14] !== modalWidth || $[15] !== props2.children || $[16] !== referenceBoundary || $[17] !== referenceElement || $[18] !== t32 ? (t4 = /* @__PURE__ */ jsx(PopoverEditDialog, { autoFocus, floatingBoundary, onClose: handleClose, referenceBoundary, referenceElement, title: t32, width: modalWidth, children: props2.children }), $[11] = autoFocus, $[12] = floatingBoundary, $[13] = handleClose, $[14] = modalWidth, $[15] = props2.children, $[16] = referenceBoundary, $[17] = referenceElement, $[18] = t32, $[19] = t4) : t4 = $[19], t4;
|
|
31457
|
+
return $[11] !== autoFocus || $[12] !== floatingBoundary || $[13] !== handleClose || $[14] !== modalWidth || $[15] !== props2.children || $[16] !== referenceBoundary || $[17] !== referenceElement || $[18] !== t32 ? (t4 = /* @__PURE__ */ jsx(PopoverEditDialog, { autoFocus, floatingBoundary, onClose: handleClose, referenceBoundary, referenceElement, title: t32, width: modalWidth, "data-testid": "popover-edit-dialog", children: props2.children }), $[11] = autoFocus, $[12] = floatingBoundary, $[13] = handleClose, $[14] = modalWidth, $[15] = props2.children, $[16] = referenceBoundary, $[17] = referenceElement, $[18] = t32, $[19] = t4) : t4 = $[19], t4;
|
|
31972
31458
|
}
|
|
31973
31459
|
let t3;
|
|
31974
|
-
return $[20] !== autoFocus || $[21] !== handleClose || $[22] !== modalTitle || $[23] !== modalWidth || $[24] !== props2.children ? (t3 = /* @__PURE__ */ jsx(DefaultEditDialog, { onClose: handleClose, title: modalTitle, width: modalWidth, autoFocus, children: props2.children }), $[20] = autoFocus, $[21] = handleClose, $[22] = modalTitle, $[23] = modalWidth, $[24] = props2.children, $[
|
|
31460
|
+
return $[20] !== autoFocus || $[21] !== handleClose || $[22] !== modalTitle || $[23] !== modalWidth || $[24] !== nestedObjectNavigationEnabled || $[25] !== onClose || $[26] !== props2.children ? (t3 = nestedObjectNavigationEnabled ? /* @__PURE__ */ jsx(EnhancedObjectDialog, { type: "dialog", onClose, header: modalTitle, width: 1, autofocus: autoFocus, children: props2.children }) : /* @__PURE__ */ jsx(DefaultEditDialog, { onClose: handleClose, title: modalTitle, width: modalWidth, autoFocus, children: props2.children }), $[20] = autoFocus, $[21] = handleClose, $[22] = modalTitle, $[23] = modalWidth, $[24] = nestedObjectNavigationEnabled, $[25] = onClose, $[26] = props2.children, $[27] = t3) : t3 = $[27], t3;
|
|
31975
31461
|
}
|
|
31976
31462
|
const InlineObject = (props2) => {
|
|
31977
31463
|
const $ = c(69), {
|
|
@@ -32035,7 +31521,7 @@ const InlineObject = (props2) => {
|
|
|
32035
31521
|
$[11] !== editor2 || $[12] !== onItemClose || $[13] !== selfSelection ? (t4 = () => {
|
|
32036
31522
|
onItemClose(), PortableTextEditor.select(editor2, selfSelection), PortableTextEditor.focus(editor2);
|
|
32037
31523
|
}, $[11] = editor2, $[12] = onItemClose, $[13] = selfSelection, $[14] = t4) : t4 = $[14];
|
|
32038
|
-
const onClose = t4, isOpen = !!memberItem?.member.open, input = memberItem?.input, nodePath = memberItem?.node.path || EMPTY_ARRAY$
|
|
31524
|
+
const onClose = t4, isOpen = !!memberItem?.member.open, input = memberItem?.input, nodePath = memberItem?.node.path || EMPTY_ARRAY$z, referenceElement = divElement, presence = useChildPresence(path, !0);
|
|
32039
31525
|
let t5;
|
|
32040
31526
|
if ($[15] !== path || $[16] !== presence) {
|
|
32041
31527
|
let t62;
|
|
@@ -32097,7 +31583,7 @@ const InlineObject = (props2) => {
|
|
|
32097
31583
|
let t13;
|
|
32098
31584
|
return $[66] !== setRef || $[67] !== t12 ? (t13 = /* @__PURE__ */ jsx("span", { ref: setRef, contentEditable: !1, children: t12 }), $[66] = setRef, $[67] = t12, $[68] = t13) : t13 = $[68], t13;
|
|
32099
31585
|
}, DefaultInlineObjectComponent = (props2) => {
|
|
32100
|
-
const $ = c(
|
|
31586
|
+
const $ = c(45), {
|
|
32101
31587
|
__unstable_floatingBoundary: floatingBoundary,
|
|
32102
31588
|
__unstable_referenceBoundary: referenceBoundary,
|
|
32103
31589
|
__unstable_referenceElement: referenceElement,
|
|
@@ -32118,70 +31604,64 @@ const InlineObject = (props2) => {
|
|
|
32118
31604
|
t
|
|
32119
31605
|
} = useTranslation(), hasMarkers = markers.length > 0, popoverTitle = schemaType?.title || schemaType.name;
|
|
32120
31606
|
let t0;
|
|
32121
|
-
$[0] !== validation2 ? (t0 = validation2.filter(_temp$
|
|
31607
|
+
$[0] !== validation2 ? (t0 = validation2.filter(_temp$2O), $[0] = validation2, $[1] = t0) : t0 = $[1];
|
|
32122
31608
|
const hasError = t0.length > 0;
|
|
32123
31609
|
let t1;
|
|
32124
|
-
$[2] !== validation2 ? (t1 = validation2.filter(_temp2$
|
|
32125
|
-
const hasWarning = t1.length > 0
|
|
32126
|
-
enabled: nestedObjectNavigationEnabled,
|
|
32127
|
-
isDialogAvailable
|
|
32128
|
-
} = useEnhancedObjectDialog();
|
|
31610
|
+
$[2] !== validation2 ? (t1 = validation2.filter(_temp2$19), $[2] = validation2, $[3] = t1) : t1 = $[3];
|
|
31611
|
+
const hasWarning = t1.length > 0;
|
|
32129
31612
|
let t2;
|
|
32130
|
-
$[4] !== schemaType ? (t2 = isReferenceSchemaType(schemaType), $[4] = schemaType, $[5] = t2) : t2 = $[5];
|
|
32131
|
-
const shouldUseEnhancedDialog = nestedObjectNavigationEnabled && isDialogAvailable && !t2;
|
|
32132
|
-
let t3;
|
|
32133
31613
|
bb0: {
|
|
32134
31614
|
if (hasError) {
|
|
32135
|
-
|
|
31615
|
+
t2 = "critical";
|
|
32136
31616
|
break bb0;
|
|
32137
31617
|
}
|
|
32138
31618
|
if (hasWarning) {
|
|
32139
|
-
|
|
31619
|
+
t2 = "caution";
|
|
32140
31620
|
break bb0;
|
|
32141
31621
|
}
|
|
32142
31622
|
if (selected || focused) {
|
|
32143
|
-
|
|
31623
|
+
t2 = "primary";
|
|
32144
31624
|
break bb0;
|
|
32145
31625
|
}
|
|
32146
|
-
|
|
31626
|
+
t2 = void 0;
|
|
32147
31627
|
}
|
|
32148
|
-
const tone =
|
|
32149
|
-
let
|
|
32150
|
-
$[
|
|
32151
|
-
const
|
|
32152
|
-
let
|
|
32153
|
-
$[
|
|
31628
|
+
const tone = t2;
|
|
31629
|
+
let t3;
|
|
31630
|
+
$[4] !== t ? (t3 = t("inputs.portable-text.inline-block.aria-label"), $[4] = t, $[5] = t3) : t3 = $[5];
|
|
31631
|
+
const t4 = focused || void 0, t5 = hasError || void 0, t6 = hasMarkers || void 0, t7 = readOnly || void 0, t8 = selected || void 0, t9 = hasWarning || void 0, t10 = readOnly ? onOpen : void 0;
|
|
31632
|
+
let t11;
|
|
31633
|
+
$[6] !== renderPreview || $[7] !== schemaType || $[8] !== value ? (t11 = renderPreview({
|
|
32154
31634
|
layout: "inline",
|
|
32155
31635
|
schemaType,
|
|
32156
31636
|
skipVisibilityCheck: !0,
|
|
32157
31637
|
value,
|
|
32158
31638
|
fallbackTitle: "Click to edit"
|
|
32159
|
-
}), $[
|
|
31639
|
+
}), $[6] = renderPreview, $[7] = schemaType, $[8] = value, $[9] = t11) : t11 = $[9];
|
|
31640
|
+
let t12;
|
|
31641
|
+
$[10] !== t11 ? (t12 = /* @__PURE__ */ jsx(PreviewSpan, { children: t11 }), $[10] = t11, $[11] = t12) : t12 = $[11];
|
|
32160
31642
|
let t13;
|
|
32161
|
-
$[12] !== t12 ? (t13 = /* @__PURE__ */ jsx(
|
|
31643
|
+
$[12] !== onOpen || $[13] !== t10 || $[14] !== t12 || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== t6 || $[19] !== t7 || $[20] !== t8 || $[21] !== t9 || $[22] !== tone ? (t13 = /* @__PURE__ */ jsx(Root$h, { "aria-label": t3, "data-focused": t4, "data-invalid": t5, "data-markers": t6, "data-read-only": t7, "data-selected": t8, "data-warning": t9, forwardedAs: "span", onClick: t10, onDoubleClick: onOpen, tone, children: t12 }), $[12] = onOpen, $[13] = t10, $[14] = t12, $[15] = t3, $[16] = t4, $[17] = t5, $[18] = t6, $[19] = t7, $[20] = t8, $[21] = t9, $[22] = tone, $[23] = t13) : t13 = $[23];
|
|
32162
31644
|
let t14;
|
|
32163
|
-
$[
|
|
31645
|
+
$[24] !== floatingBoundary || $[25] !== focused || $[26] !== onOpen || $[27] !== onRemove || $[28] !== open || $[29] !== popoverTitle || $[30] !== referenceBoundary || $[31] !== referenceElement ? (t14 = referenceElement && /* @__PURE__ */ jsx(InlineObjectToolbarPopover, { floatingBoundary, inlineObjectFocused: focused, inlineObjectOpen: open, onOpenInlineObject: onOpen, onRemoveInlineObject: onRemove, referenceBoundary, referenceElement, title: popoverTitle }), $[24] = floatingBoundary, $[25] = focused, $[26] = onOpen, $[27] = onRemove, $[28] = open, $[29] = popoverTitle, $[30] = referenceBoundary, $[31] = referenceElement, $[32] = t14) : t14 = $[32];
|
|
32164
31646
|
let t15;
|
|
32165
|
-
$[
|
|
31647
|
+
$[33] !== children || $[34] !== floatingBoundary || $[35] !== onClose || $[36] !== open || $[37] !== referenceBoundary || $[38] !== referenceElement || $[39] !== schemaType ? (t15 = open && /* @__PURE__ */ jsx(ObjectEditModal, { autoFocus: !0, defaultType: "popover", floatingBoundary, onClose, referenceBoundary, referenceElement, schemaType, children }), $[33] = children, $[34] = floatingBoundary, $[35] = onClose, $[36] = open, $[37] = referenceBoundary, $[38] = referenceElement, $[39] = schemaType, $[40] = t15) : t15 = $[40];
|
|
32166
31648
|
let t16;
|
|
32167
|
-
|
|
32168
|
-
|
|
32169
|
-
return $[44] !== t14 || $[45] !== t15 || $[46] !== t16 ? (t17 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
31649
|
+
return $[41] !== t13 || $[42] !== t14 || $[43] !== t15 ? (t16 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
31650
|
+
t13,
|
|
32170
31651
|
t14,
|
|
32171
|
-
t15
|
|
32172
|
-
|
|
32173
|
-
] }), $[44] = t14, $[45] = t15, $[46] = t16, $[47] = t17) : t17 = $[47], t17;
|
|
31652
|
+
t15
|
|
31653
|
+
] }), $[41] = t13, $[42] = t14, $[43] = t15, $[44] = t16) : t16 = $[44], t16;
|
|
32174
31654
|
};
|
|
32175
|
-
function _temp$
|
|
31655
|
+
function _temp$2O(v) {
|
|
32176
31656
|
return v.level === "error";
|
|
32177
31657
|
}
|
|
32178
|
-
function _temp2$
|
|
31658
|
+
function _temp2$19(v_0) {
|
|
32179
31659
|
return v_0.level === "warning";
|
|
32180
31660
|
}
|
|
32181
31661
|
function AnnotationObjectEditModal(props2) {
|
|
32182
31662
|
const $ = c(14), editor2 = usePortableTextEditor(), boundaryElement = useBoundaryElement().element, portableTextMemberItems = usePortableTextMemberItems(), elementRefs = usePortableTextMemberItemElementRefs();
|
|
32183
31663
|
let t0;
|
|
32184
|
-
$[0] !== portableTextMemberItems ? (t0 = portableTextMemberItems.find(_temp$
|
|
31664
|
+
$[0] !== portableTextMemberItems ? (t0 = portableTextMemberItems.find(_temp$2N), $[0] = portableTextMemberItems, $[1] = t0) : t0 = $[1];
|
|
32185
31665
|
const openAnnotation = t0;
|
|
32186
31666
|
let t1;
|
|
32187
31667
|
$[2] !== editor2 || $[3] !== openAnnotation || $[4] !== props2 ? (t1 = () => {
|
|
@@ -32197,7 +31677,7 @@ function AnnotationObjectEditModal(props2) {
|
|
|
32197
31677
|
let t3;
|
|
32198
31678
|
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;
|
|
32199
31679
|
}
|
|
32200
|
-
function _temp$
|
|
31680
|
+
function _temp$2N(m) {
|
|
32201
31681
|
return m.kind === "annotation" && m.member.open;
|
|
32202
31682
|
}
|
|
32203
31683
|
function Compositor(props2) {
|
|
@@ -32235,7 +31715,7 @@ function Compositor(props2) {
|
|
|
32235
31715
|
renderItem: renderItem2,
|
|
32236
31716
|
renderPreview,
|
|
32237
31717
|
value
|
|
32238
|
-
} = props2, focusPath = t0 === void 0 ? EMPTY_ARRAY$
|
|
31718
|
+
} = props2, focusPath = t0 === void 0 ? EMPTY_ARRAY$z : t0, editor2 = usePortableTextEditor(), setElementRef = useSetPortableTextMemberItemElementRef(), boundaryElement = useBoundaryElement().element, [wrapperElement, setWrapperElement] = useState(null), [scrollElement, setScrollElement] = useState(null);
|
|
32239
31719
|
let t1;
|
|
32240
31720
|
$[0] !== onToggleFullscreen ? (t1 = () => {
|
|
32241
31721
|
onToggleFullscreen();
|
|
@@ -32592,7 +32072,7 @@ function useOptimisticPortableTextDiff(t0) {
|
|
|
32592
32072
|
t22 = Object.values(optimisticRangeDecorations).concat(Object.entries(definitiveRangeDecorations).filter((t32) => {
|
|
32593
32073
|
const [blockKey] = t32;
|
|
32594
32074
|
return typeof optimisticRangeDecorations[blockKey] > "u";
|
|
32595
|
-
}).map(_temp$
|
|
32075
|
+
}).map(_temp$2M)).flat(), $[2] = definitiveValue, $[3] = optimisticValue, $[4] = perspective, $[5] = upstreamValue, $[6] = t22;
|
|
32596
32076
|
} else
|
|
32597
32077
|
t22 = $[6];
|
|
32598
32078
|
t1 = t22;
|
|
@@ -32630,7 +32110,7 @@ function useOptimisticPortableTextDiff(t0) {
|
|
|
32630
32110
|
onOptimisticChange
|
|
32631
32111
|
}, $[14] = onOptimisticChange, $[15] = rangeDecorations, $[16] = t5) : t5 = $[16], t5;
|
|
32632
32112
|
}
|
|
32633
|
-
function _temp$
|
|
32113
|
+
function _temp$2M(t0) {
|
|
32634
32114
|
const [, blockRangeDecorations] = t0;
|
|
32635
32115
|
return blockRangeDecorations;
|
|
32636
32116
|
}
|
|
@@ -32756,7 +32236,7 @@ const markdownConfig = {
|
|
|
32756
32236
|
},
|
|
32757
32237
|
typography: {
|
|
32758
32238
|
guard: createDecoratorGuard({
|
|
32759
|
-
decorators: _temp2$
|
|
32239
|
+
decorators: _temp2$18
|
|
32760
32240
|
})
|
|
32761
32241
|
}
|
|
32762
32242
|
},
|
|
@@ -32848,14 +32328,14 @@ const RenderDefault = (props2) => {
|
|
|
32848
32328
|
let t1;
|
|
32849
32329
|
return $[1] !== RenderPlugins || $[2] !== props2 ? (t1 = /* @__PURE__ */ jsx(RenderPlugins, { ...props2 }), $[1] = RenderPlugins, $[2] = props2, $[3] = t1) : t1 = $[3], t1;
|
|
32850
32330
|
};
|
|
32851
|
-
function _temp$
|
|
32331
|
+
function _temp$2L(decorator) {
|
|
32852
32332
|
return decorator.name === "code" ? [] : [decorator.name];
|
|
32853
32333
|
}
|
|
32854
|
-
function _temp2$
|
|
32334
|
+
function _temp2$18(t0) {
|
|
32855
32335
|
const {
|
|
32856
32336
|
context
|
|
32857
32337
|
} = t0;
|
|
32858
|
-
return context.schema.decorators.flatMap(_temp$
|
|
32338
|
+
return context.schema.decorators.flatMap(_temp$2L);
|
|
32859
32339
|
}
|
|
32860
32340
|
const DOT_SIZE = 6, CONTENT_BOX_VARIANTS = {
|
|
32861
32341
|
animate: {
|
|
@@ -33012,9 +32492,9 @@ function usePresenceCursorDecorations(props2) {
|
|
|
33012
32492
|
const handleRangeDecorationMoved = t2;
|
|
33013
32493
|
let t3, t4;
|
|
33014
32494
|
$[3] !== fieldPresence || $[4] !== path ? (t3 = () => {
|
|
33015
|
-
const nextPresence = fieldPresence.filter((p_0) => startsWith(path, p_0.path) && !isEqual$2(path, p_0.path)), filteredNext = nextPresence.map(_temp$
|
|
32495
|
+
const nextPresence = fieldPresence.filter((p_0) => startsWith(path, p_0.path) && !isEqual$2(path, p_0.path)), filteredNext = nextPresence.map(_temp$2K), filteredPrevious = previousPresence.current.map(_temp2$17);
|
|
33016
32496
|
if (!isEqual$2(filteredNext, filteredPrevious)) {
|
|
33017
|
-
const value = nextPresence.length > 0 ? nextPresence : EMPTY_ARRAY$
|
|
32497
|
+
const value = nextPresence.length > 0 ? nextPresence : EMPTY_ARRAY$z;
|
|
33018
32498
|
setCurrentPresence(value), previousPresence.current = value;
|
|
33019
32499
|
}
|
|
33020
32500
|
}, t4 = [fieldPresence, path], $[3] = fieldPresence, $[4] = path, $[5] = t3, $[6] = t4) : (t3 = $[5], t4 = $[6]), useEffect(t3, t4);
|
|
@@ -33044,13 +32524,13 @@ function usePresenceCursorDecorations(props2) {
|
|
|
33044
32524
|
setPresenceCursorDecorations(decorations.filter(Boolean));
|
|
33045
32525
|
}, t6 = [currentPresence, handleRangeDecorationMoved], $[7] = currentPresence, $[8] = t5, $[9] = t6) : (t5 = $[8], t6 = $[9]), useEffect(t5, t6), presenceCursorDecorations;
|
|
33046
32526
|
}
|
|
33047
|
-
function _temp2$
|
|
32527
|
+
function _temp2$17(d_0) {
|
|
33048
32528
|
return {
|
|
33049
32529
|
...d_0.selection,
|
|
33050
32530
|
sessionId: d_0.sessionId
|
|
33051
32531
|
};
|
|
33052
32532
|
}
|
|
33053
|
-
function _temp$
|
|
32533
|
+
function _temp$2K(d) {
|
|
33054
32534
|
return {
|
|
33055
32535
|
...d.selection,
|
|
33056
32536
|
sessionId: d.sessionId
|
|
@@ -33122,7 +32602,7 @@ function PortableTextInput(props2) {
|
|
|
33122
32602
|
hotkeys,
|
|
33123
32603
|
initialActive,
|
|
33124
32604
|
initialFullscreen,
|
|
33125
|
-
markers = EMPTY_ARRAY$
|
|
32605
|
+
markers = EMPTY_ARRAY$z,
|
|
33126
32606
|
onChange,
|
|
33127
32607
|
onCopy,
|
|
33128
32608
|
onEditorChange,
|
|
@@ -33931,12 +33411,12 @@ function useFeatureEnabled(featureKey) {
|
|
|
33931
33411
|
features: features2,
|
|
33932
33412
|
error: null
|
|
33933
33413
|
};
|
|
33934
|
-
}, $[6] = featureKey, $[7] = t2) : t2 = $[7], t1 = req.pipe(map(t2), startWith(INITIAL_LOADING_STATE$3), catchError(_temp$
|
|
33414
|
+
}, $[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;
|
|
33935
33415
|
} else
|
|
33936
33416
|
t1 = $[5];
|
|
33937
33417
|
return useObservable(t1, INITIAL_LOADING_STATE$3);
|
|
33938
33418
|
}
|
|
33939
|
-
function _temp$
|
|
33419
|
+
function _temp$2J(error) {
|
|
33940
33420
|
return of({
|
|
33941
33421
|
isLoading: !1,
|
|
33942
33422
|
enabled: !1,
|
|
@@ -33953,7 +33433,7 @@ function DisabledFeatureWarning(t0) {
|
|
|
33953
33433
|
} = useTranslation();
|
|
33954
33434
|
let t1;
|
|
33955
33435
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = {
|
|
33956
|
-
DocumentationLink: _temp$
|
|
33436
|
+
DocumentationLink: _temp$2I
|
|
33957
33437
|
}, $[0] = t1) : t1 = $[0];
|
|
33958
33438
|
let t2;
|
|
33959
33439
|
$[1] !== t ? (t2 = /* @__PURE__ */ jsx(Translate, { t, i18nKey: "inputs.reference.cross-dataset.feature-disabled-description", components: t1 }), $[1] = t, $[2] = t2) : t2 = $[2];
|
|
@@ -33990,7 +33470,7 @@ function DisabledFeatureWarning(t0) {
|
|
|
33990
33470
|
t11
|
|
33991
33471
|
] }), $[26] = t10, $[27] = t11, $[28] = t12) : t12 = $[28], t12;
|
|
33992
33472
|
}
|
|
33993
|
-
function _temp$
|
|
33473
|
+
function _temp$2I(t0) {
|
|
33994
33474
|
const {
|
|
33995
33475
|
children
|
|
33996
33476
|
} = t0;
|
|
@@ -34070,23 +33550,23 @@ function CrossDatasetReferencePreview(props2) {
|
|
|
34070
33550
|
t5
|
|
34071
33551
|
] }), $[34] = t1, $[35] = t5, $[36] = t6) : t6 = $[36], t6;
|
|
34072
33552
|
}
|
|
34073
|
-
const noop$
|
|
33553
|
+
const noop$3 = () => {
|
|
34074
33554
|
}, INITIAL_LOADING_STATE$2 = {
|
|
34075
33555
|
isLoading: !0,
|
|
34076
33556
|
result: void 0,
|
|
34077
33557
|
error: void 0,
|
|
34078
|
-
retry: noop$
|
|
33558
|
+
retry: noop$3
|
|
34079
33559
|
}, EMPTY_STATE$1 = {
|
|
34080
33560
|
isLoading: !1,
|
|
34081
33561
|
result: void 0,
|
|
34082
33562
|
error: void 0,
|
|
34083
|
-
retry: noop$
|
|
33563
|
+
retry: noop$3
|
|
34084
33564
|
};
|
|
34085
33565
|
function useReferenceInfo$1(doc, getReferenceInfo2) {
|
|
34086
33566
|
const $ = c(8), [retryAttempt, setRetryAttempt] = useState(0);
|
|
34087
33567
|
let t0;
|
|
34088
33568
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
34089
|
-
setRetryAttempt(_temp$
|
|
33569
|
+
setRetryAttempt(_temp$2H);
|
|
34090
33570
|
}, $[0] = t0) : t0 = $[0];
|
|
34091
33571
|
const retry2 = t0;
|
|
34092
33572
|
let t1;
|
|
@@ -34110,7 +33590,7 @@ function useReferenceInfo$1(doc, getReferenceInfo2) {
|
|
|
34110
33590
|
retryAttempt
|
|
34111
33591
|
})))) : of(EMPTY_STATE$1), $[4] = docInfo, $[5] = getReferenceInfo2, $[6] = retryAttempt, $[7] = t2) : t2 = $[7], useObservable(t2, INITIAL_LOADING_STATE$2);
|
|
34112
33592
|
}
|
|
34113
|
-
function _temp$
|
|
33593
|
+
function _temp$2H(current) {
|
|
34114
33594
|
return current + 1;
|
|
34115
33595
|
}
|
|
34116
33596
|
function useProjectId$1() {
|
|
@@ -34350,7 +33830,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
34350
33830
|
push
|
|
34351
33831
|
} = useToast();
|
|
34352
33832
|
let t12;
|
|
34353
|
-
$[29] !== validation2 ? (t12 = validation2.filter(_temp$
|
|
33833
|
+
$[29] !== validation2 ? (t12 = validation2.filter(_temp$2G), $[29] = validation2, $[30] = t12) : t12 = $[30];
|
|
34354
33834
|
const errors = t12;
|
|
34355
33835
|
let t13;
|
|
34356
33836
|
$[31] !== onPathFocus ? (t13 = (event_0) => {
|
|
@@ -34381,7 +33861,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
34381
33861
|
id: `reference-search-fail-${inputId}`
|
|
34382
33862
|
}), console.error(error), of({
|
|
34383
33863
|
hits: []
|
|
34384
|
-
})))))), scan(_temp2$
|
|
33864
|
+
})))))), scan(_temp2$16, INITIAL_SEARCH_STATE$2), tap(setSearchState)), $[37] = inputId, $[38] = onSearch, $[39] = push, $[40] = t16) : t16 = $[40];
|
|
34385
33865
|
const handleQueryChange = useObservableEvent(t16);
|
|
34386
33866
|
let t17;
|
|
34387
33867
|
$[41] !== handleQueryChange ? (t17 = () => {
|
|
@@ -34404,7 +33884,7 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
34404
33884
|
let t22;
|
|
34405
33885
|
$[54] !== featureInfo.enabled || $[55] !== featureInfo.isLoading || $[56] !== handleClear || $[57] !== value ? (t22 = !featureInfo.isLoading && !featureInfo.enabled && /* @__PURE__ */ jsx(DisabledFeatureWarning, { value, onClearValue: handleClear }), $[54] = featureInfo.enabled, $[55] = featureInfo.isLoading, $[56] = handleClear, $[57] = value, $[58] = t22) : t22 = $[58];
|
|
34406
33886
|
let t23;
|
|
34407
|
-
$[59] !== actualStrength || $[60] !== autocompletePopoverReferenceElement || $[61] !== changed || $[62] !== elementProps || $[63] !== errors || $[64] !== featureInfo.enabled || $[65] !== featureInfo.isLoading || $[66] !== focused || $[67] !== handleAutocompleteFocus || $[68] !== handleAutocompleteKeyDown || $[69] !== handleAutocompleteOpenButtonClick || $[70] !== handleChange || $[71] !== handleClear || $[72] !== handleFixStrengthMismatch || $[73] !== handleFocus || $[74] !== handleQueryChange || $[75] !== handleReplace || $[76] !== inputId || $[77] !== isEditing || $[78] !== loadableReferenceInfo || $[79] !== path || $[80] !== readOnly || $[81] !== renderOption || $[82] !== schemaType || $[83] !== searchState.hits || $[84] !== searchState.isLoading || $[85] !== searchState.searchString || $[86] !== showWeakRefMismatch || $[87] !== studioUrl || $[88] !== t || $[89] !== 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$
|
|
33887
|
+
$[59] !== actualStrength || $[60] !== autocompletePopoverReferenceElement || $[61] !== changed || $[62] !== elementProps || $[63] !== errors || $[64] !== featureInfo.enabled || $[65] !== featureInfo.isLoading || $[66] !== focused || $[67] !== handleAutocompleteFocus || $[68] !== handleAutocompleteKeyDown || $[69] !== handleAutocompleteOpenButtonClick || $[70] !== handleChange || $[71] !== handleClear || $[72] !== handleFixStrengthMismatch || $[73] !== handleFocus || $[74] !== handleQueryChange || $[75] !== handleReplace || $[76] !== inputId || $[77] !== isEditing || $[78] !== loadableReferenceInfo || $[79] !== path || $[80] !== readOnly || $[81] !== renderOption || $[82] !== schemaType || $[83] !== searchState.hits || $[84] !== searchState.isLoading || $[85] !== searchState.searchString || $[86] !== showWeakRefMismatch || $[87] !== studioUrl || $[88] !== t || $[89] !== 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$w), 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: {
|
|
34408
33888
|
onClick: handleAutocompleteOpenButtonClick
|
|
34409
33889
|
}, 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: [
|
|
34410
33890
|
/* @__PURE__ */ jsxs(Flex, { align: "center", padding: 1, children: [
|
|
@@ -34426,19 +33906,19 @@ function CrossDatasetReferenceInput(props2) {
|
|
|
34426
33906
|
t23
|
|
34427
33907
|
] }), $[91] = t22, $[92] = t23, $[93] = t24) : t24 = $[93], t24;
|
|
34428
33908
|
}
|
|
34429
|
-
function _temp3$
|
|
33909
|
+
function _temp3$w(hit_0) {
|
|
34430
33910
|
return {
|
|
34431
33911
|
value: hit_0.id,
|
|
34432
33912
|
hit: hit_0
|
|
34433
33913
|
};
|
|
34434
33914
|
}
|
|
34435
|
-
function _temp2$
|
|
33915
|
+
function _temp2$16(prevState, nextState) {
|
|
34436
33916
|
return {
|
|
34437
33917
|
...prevState,
|
|
34438
33918
|
...nextState
|
|
34439
33919
|
};
|
|
34440
33920
|
}
|
|
34441
|
-
function _temp$
|
|
33921
|
+
function _temp$2G(item) {
|
|
34442
33922
|
return item.level === "error";
|
|
34443
33923
|
}
|
|
34444
33924
|
const REQUEST_TAG_BASE$1 = "cross-dataset-refs", AVAILABILITY_READABLE$2 = {
|
|
@@ -34668,23 +34148,23 @@ function GlobalDocumentReferencePreview(props2) {
|
|
|
34668
34148
|
t5
|
|
34669
34149
|
] }), $[34] = t1, $[35] = t5, $[36] = t6) : t6 = $[36], t6;
|
|
34670
34150
|
}
|
|
34671
|
-
const noop$
|
|
34151
|
+
const noop$2 = () => {
|
|
34672
34152
|
}, INITIAL_LOADING_STATE$1 = {
|
|
34673
34153
|
isLoading: !0,
|
|
34674
34154
|
result: void 0,
|
|
34675
34155
|
error: void 0,
|
|
34676
|
-
retry: noop$
|
|
34156
|
+
retry: noop$2
|
|
34677
34157
|
}, EMPTY_STATE = {
|
|
34678
34158
|
isLoading: !1,
|
|
34679
34159
|
result: void 0,
|
|
34680
34160
|
error: void 0,
|
|
34681
|
-
retry: noop$
|
|
34161
|
+
retry: noop$2
|
|
34682
34162
|
};
|
|
34683
34163
|
function useReferenceInfo(doc, getReferenceInfo2) {
|
|
34684
34164
|
const $ = c(10), [retryAttempt, setRetryAttempt] = useState(0);
|
|
34685
34165
|
let t0;
|
|
34686
34166
|
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = () => {
|
|
34687
|
-
setRetryAttempt(_temp$
|
|
34167
|
+
setRetryAttempt(_temp$2F);
|
|
34688
34168
|
}, $[0] = t0) : t0 = $[0];
|
|
34689
34169
|
const retry2 = t0;
|
|
34690
34170
|
let t1;
|
|
@@ -34718,7 +34198,7 @@ function useReferenceInfo(doc, getReferenceInfo2) {
|
|
|
34718
34198
|
}
|
|
34719
34199
|
return useObservable(t1, INITIAL_LOADING_STATE$1);
|
|
34720
34200
|
}
|
|
34721
|
-
function _temp$
|
|
34201
|
+
function _temp$2F(current) {
|
|
34722
34202
|
return current + 1;
|
|
34723
34203
|
}
|
|
34724
34204
|
function OptionPreview(props2) {
|
|
@@ -34961,7 +34441,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
34961
34441
|
push
|
|
34962
34442
|
} = useToast();
|
|
34963
34443
|
let t11;
|
|
34964
|
-
$[31] !== validation2 ? (t11 = validation2.filter(_temp$
|
|
34444
|
+
$[31] !== validation2 ? (t11 = validation2.filter(_temp$2E), $[31] = validation2, $[32] = t11) : t11 = $[32];
|
|
34965
34445
|
const errors = t11;
|
|
34966
34446
|
let t12;
|
|
34967
34447
|
$[33] !== onPathFocus ? (t12 = (event_0) => {
|
|
@@ -34992,7 +34472,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
34992
34472
|
id: `reference-search-fail-${inputId}`
|
|
34993
34473
|
}), console.error(error), of({
|
|
34994
34474
|
hits: []
|
|
34995
|
-
})))))), scan(_temp2$
|
|
34475
|
+
})))))), scan(_temp2$15, INITIAL_SEARCH_STATE$1), tap(setSearchState)), $[39] = inputId, $[40] = onSearch, $[41] = push, $[42] = t15) : t15 = $[42];
|
|
34996
34476
|
const handleQueryChange = useObservableEvent(t15);
|
|
34997
34477
|
let t16;
|
|
34998
34478
|
$[43] !== handleQueryChange ? (t16 = () => {
|
|
@@ -35036,7 +34516,7 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
35036
34516
|
let t20;
|
|
35037
34517
|
$[55] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t20 = () => [clickOutsideBoundaryRef.current, autocompletePortalRef.current], $[55] = t20) : t20 = $[55], useClickOutsideEvent(t19, t20);
|
|
35038
34518
|
let t21;
|
|
35039
|
-
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$
|
|
34519
|
+
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$v), 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: {
|
|
35040
34520
|
onClick: handleAutocompleteOpenButtonClick
|
|
35041
34521
|
}, 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: [
|
|
35042
34522
|
/* @__PURE__ */ jsxs(Flex, { align: "center", padding: 1, children: [
|
|
@@ -35053,19 +34533,19 @@ function GlobalDocumentReferenceInput(props2) {
|
|
|
35053
34533
|
loadableReferenceInfo.error && /* @__PURE__ */ jsx(ReferenceMetadataLoadErrorAlertStrip, { errorMessage: loadableReferenceInfo.error.message, onHandleRetry: loadableReferenceInfo.retry })
|
|
35054
34534
|
] }) }) }), $[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;
|
|
35055
34535
|
}
|
|
35056
|
-
function _temp3$
|
|
34536
|
+
function _temp3$v(hit_0) {
|
|
35057
34537
|
return {
|
|
35058
34538
|
value: hit_0.id,
|
|
35059
34539
|
hit: hit_0
|
|
35060
34540
|
};
|
|
35061
34541
|
}
|
|
35062
|
-
function _temp2$
|
|
34542
|
+
function _temp2$15(prevState, nextState) {
|
|
35063
34543
|
return {
|
|
35064
34544
|
...prevState,
|
|
35065
34545
|
...nextState
|
|
35066
34546
|
};
|
|
35067
34547
|
}
|
|
35068
|
-
function _temp$
|
|
34548
|
+
function _temp$2E(item) {
|
|
35069
34549
|
return item.level === "error";
|
|
35070
34550
|
}
|
|
35071
34551
|
function getReferenceClient(client, schemaType) {
|
|
@@ -35573,7 +35053,7 @@ const TRANSFORMATIONS = {
|
|
|
35573
35053
|
const controller = new AbortController(), signal = controller.signal;
|
|
35574
35054
|
return fetch(props2.icon.url, {
|
|
35575
35055
|
signal
|
|
35576
|
-
}).then(_temp$
|
|
35056
|
+
}).then(_temp$2D).then((data) => setHtml(data)).catch(_temp2$14), () => {
|
|
35577
35057
|
controller.abort();
|
|
35578
35058
|
};
|
|
35579
35059
|
}, t1 = [props2.icon.url], $[0] = props2.icon.url, $[1] = t0, $[2] = t1) : (t0 = $[1], t1 = $[2]), useEffect(t0, t1);
|
|
@@ -35724,12 +35204,12 @@ function UpsellDescriptionSerializer(props2) {
|
|
|
35724
35204
|
let t2;
|
|
35725
35205
|
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;
|
|
35726
35206
|
}
|
|
35727
|
-
function _temp$
|
|
35207
|
+
function _temp$2D(response) {
|
|
35728
35208
|
if (!response.ok)
|
|
35729
35209
|
throw new Error(`HTTP error! status: ${response.status}`);
|
|
35730
35210
|
return response.text();
|
|
35731
35211
|
}
|
|
35732
|
-
function _temp2$
|
|
35212
|
+
function _temp2$14(error) {
|
|
35733
35213
|
error.name !== "AbortError" && console.error(error);
|
|
35734
35214
|
}
|
|
35735
35215
|
const StyledButton$3 = styled(Button)(({
|
|
@@ -35859,9 +35339,9 @@ function useReferringDocuments(id2, t0) {
|
|
|
35859
35339
|
docId: id2
|
|
35860
35340
|
}, {
|
|
35861
35341
|
tag: "use-referring-documents"
|
|
35862
|
-
}).pipe(map(_temp$
|
|
35342
|
+
}).pipe(map(_temp$2C), startWith(INITIAL_STATE$8)), $[2] = documentStore, $[3] = id2, $[4] = projection, $[5] = t2) : t2 = $[5], useObservable(t2, INITIAL_STATE$8);
|
|
35863
35343
|
}
|
|
35864
|
-
function _temp$
|
|
35344
|
+
function _temp$2C(docs) {
|
|
35865
35345
|
return {
|
|
35866
35346
|
referringDocuments: docs,
|
|
35867
35347
|
isLoading: !1
|
|
@@ -35889,7 +35369,7 @@ const AssetUsageList = (t0) => {
|
|
|
35889
35369
|
let t6;
|
|
35890
35370
|
$[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];
|
|
35891
35371
|
let t7;
|
|
35892
|
-
$[11] !== referringDocuments ? (t7 = referringDocuments.map(_temp$
|
|
35372
|
+
$[11] !== referringDocuments ? (t7 = referringDocuments.map(_temp$2B), $[11] = referringDocuments, $[12] = t7) : t7 = $[12];
|
|
35893
35373
|
let t8;
|
|
35894
35374
|
return $[13] !== t6 || $[14] !== t7 ? (t8 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
35895
35375
|
t6,
|
|
@@ -35917,7 +35397,7 @@ const AssetUsageList = (t0) => {
|
|
|
35917
35397
|
let t6;
|
|
35918
35398
|
return $[11] !== LinkComponent2 || $[12] !== document2._id || $[13] !== t5 ? (t6 = /* @__PURE__ */ jsx(Card, { as: LinkComponent2, radius: 2, "data-as": "a", tabIndex: 0, children: t5 }, t2), $[11] = LinkComponent2, $[12] = document2._id, $[13] = t5, $[14] = t6) : t6 = $[14], t6;
|
|
35919
35399
|
};
|
|
35920
|
-
function _temp$
|
|
35400
|
+
function _temp$2B(document2) {
|
|
35921
35401
|
return /* @__PURE__ */ jsx(DocumentLink, { document: document2 }, document2._id);
|
|
35922
35402
|
}
|
|
35923
35403
|
const STYLE_ASSET_IMAGE = {
|
|
@@ -36013,7 +35493,7 @@ function AssetDeleteDialog(t0) {
|
|
|
36013
35493
|
} = useLegacyReferringDocuments(asset._id);
|
|
36014
35494
|
let t2;
|
|
36015
35495
|
if ($[0] !== referringDocuments) {
|
|
36016
|
-
const drafts = referringDocuments.reduce(_temp$
|
|
35496
|
+
const drafts = referringDocuments.reduce(_temp$2A, []);
|
|
36017
35497
|
t2 = referringDocuments.filter((doc_0) => !drafts.includes(doc_0._id)), $[0] = referringDocuments, $[1] = t2;
|
|
36018
35498
|
} else
|
|
36019
35499
|
t2 = $[1];
|
|
@@ -36054,7 +35534,7 @@ function AssetDeleteDialog(t0) {
|
|
|
36054
35534
|
let t10;
|
|
36055
35535
|
return $[26] !== isLoading || $[27] !== onClose || $[28] !== t7 || $[29] !== t8 || $[30] !== t9 ? (t10 = /* @__PURE__ */ jsx(Dialog, { __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;
|
|
36056
35536
|
}
|
|
36057
|
-
function _temp$
|
|
35537
|
+
function _temp$2A(acc, doc) {
|
|
36058
35538
|
return doc._id.startsWith("drafts.") ? acc.concat(doc._id.slice(7)) : acc;
|
|
36059
35539
|
}
|
|
36060
35540
|
const MENU_POPOVER_PROPS$2 = {
|
|
@@ -36110,7 +35590,7 @@ function AssetUsageDialog(t0) {
|
|
|
36110
35590
|
} = useLegacyReferringDocuments(asset._id);
|
|
36111
35591
|
let t1;
|
|
36112
35592
|
if ($[0] !== referringDocuments) {
|
|
36113
|
-
const drafts = referringDocuments.reduce(_temp$
|
|
35593
|
+
const drafts = referringDocuments.reduce(_temp$2z, []);
|
|
36114
35594
|
t1 = referringDocuments.filter((doc_0) => !drafts.includes(doc_0._id)), $[0] = referringDocuments, $[1] = t1;
|
|
36115
35595
|
} else
|
|
36116
35596
|
t1 = $[1];
|
|
@@ -36126,7 +35606,7 @@ function AssetUsageDialog(t0) {
|
|
|
36126
35606
|
let t4;
|
|
36127
35607
|
return $[10] !== onClose || $[11] !== t2 || $[12] !== t3 ? (t4 = /* @__PURE__ */ jsx(Dialog, { __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;
|
|
36128
35608
|
}
|
|
36129
|
-
function _temp$
|
|
35609
|
+
function _temp$2z(acc, doc) {
|
|
36130
35610
|
return doc._id.startsWith("drafts.") ? acc.concat(doc._id.slice(7)) : acc;
|
|
36131
35611
|
}
|
|
36132
35612
|
const MIME_TYPES = {
|
|
@@ -36405,7 +35885,7 @@ const CardIconWrapper = styled.span`
|
|
|
36405
35885
|
const handleToggleUsageDialog = t9;
|
|
36406
35886
|
let t10;
|
|
36407
35887
|
$[22] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = () => {
|
|
36408
|
-
setIsOpen(_temp$
|
|
35888
|
+
setIsOpen(_temp$2y);
|
|
36409
35889
|
}, $[22] = t10) : t10 = $[22];
|
|
36410
35890
|
const handleToggleOpen = t10;
|
|
36411
35891
|
let t11;
|
|
@@ -36521,7 +36001,7 @@ const CardIconWrapper = styled.span`
|
|
|
36521
36001
|
t27
|
|
36522
36002
|
] }), $[100] = asset, $[101] = isSelected, $[102] = t26, $[103] = t27, $[104] = t28) : t28 = $[104], t28;
|
|
36523
36003
|
};
|
|
36524
|
-
function _temp$
|
|
36004
|
+
function _temp$2y(prev) {
|
|
36525
36005
|
return !prev;
|
|
36526
36006
|
}
|
|
36527
36007
|
const STYLES_FILENAME = {
|
|
@@ -36791,7 +36271,7 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
36791
36271
|
$[0] !== client ? (t0 = client.withConfig({
|
|
36792
36272
|
apiVersion: "2023-02-14"
|
|
36793
36273
|
}), $[0] = client, $[1] = t0) : t0 = $[1];
|
|
36794
|
-
const versionedClient2 = t0, [_elementId] = useState(_temp$
|
|
36274
|
+
const versionedClient2 = t0, [_elementId] = useState(_temp$2x), currentPageNumber = useRef(0), {
|
|
36795
36275
|
t
|
|
36796
36276
|
} = useTranslation(), fetch$ = useRef(void 0);
|
|
36797
36277
|
let t1;
|
|
@@ -36878,7 +36358,7 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
36878
36358
|
$[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: [
|
|
36879
36359
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(InfoOutlineIcon, {}) }),
|
|
36880
36360
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "asset-source.dialog.accept-message", values: {
|
|
36881
|
-
acceptTypes: listFormat.format(accept.split(",").map(_temp2$
|
|
36361
|
+
acceptTypes: listFormat.format(accept.split(",").map(_temp2$13))
|
|
36882
36362
|
} }) })
|
|
36883
36363
|
] }) }), $[30] = accept, $[31] = isImageOnlyWildCard, $[32] = isLoading, $[33] = listFormat, $[34] = t, $[35] = t16) : t16 = $[35];
|
|
36884
36364
|
let t17;
|
|
@@ -36897,10 +36377,10 @@ const PER_PAGE = 200, ASSET_TYPE_IMAGE = "sanity.imageAsset", ASSET_TYPE_FILE =
|
|
|
36897
36377
|
let t21;
|
|
36898
36378
|
return $[61] !== _elementId || $[62] !== handleClose || $[63] !== hasResetAutoFocus || $[64] !== ref || $[65] !== t15 || $[66] !== t20 ? (t21 = /* @__PURE__ */ jsx(Dialog, { __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;
|
|
36899
36379
|
}, SelectAssetsDialog$1 = memo(forwardRef(SelectAssetsComponent));
|
|
36900
|
-
function _temp$
|
|
36380
|
+
function _temp$2x() {
|
|
36901
36381
|
return `default-asset-source-${uniqueId()}`;
|
|
36902
36382
|
}
|
|
36903
|
-
function _temp2$
|
|
36383
|
+
function _temp2$13(type) {
|
|
36904
36384
|
return type.trim();
|
|
36905
36385
|
}
|
|
36906
36386
|
const DatasetAssetSourceComponent = function(props2, ref) {
|
|
@@ -37356,7 +36836,7 @@ function UploadPlaceholderComponent(props2) {
|
|
|
37356
36836
|
} = useTranslation(), client = useClient(DEFAULT_STUDIO_CLIENT_OPTIONS), source = useSource();
|
|
37357
36837
|
let result;
|
|
37358
36838
|
if ($[0] !== assetSources || $[1] !== client || $[2] !== source || $[3] !== type) {
|
|
37359
|
-
if (result = assetSources.filter(_temp$
|
|
36839
|
+
if (result = assetSources.filter(_temp$2w), result.length === 0) {
|
|
37360
36840
|
const options = {
|
|
37361
36841
|
client,
|
|
37362
36842
|
title: source.title || source.name
|
|
@@ -37408,7 +36888,7 @@ function UploadPlaceholderComponent(props2) {
|
|
|
37408
36888
|
] })
|
|
37409
36889
|
] }), $[26] = assetSourcesWithUpload.length, $[27] = browse, $[28] = collapsed, $[29] = directUploads, $[30] = hoveringFiles, $[31] = readOnly, $[32] = type, $[33] = uploadButton, $[34] = t3) : t3 = $[34], t3;
|
|
37410
36890
|
}
|
|
37411
|
-
function _temp$
|
|
36891
|
+
function _temp$2w(s) {
|
|
37412
36892
|
return !!s.Uploader;
|
|
37413
36893
|
}
|
|
37414
36894
|
const UploadPlaceholder = memo(UploadPlaceholderComponent), STALE_UPLOAD_MS = 12e4, RatioBox$2 = styled(Card)`
|
|
@@ -37806,7 +37286,7 @@ function FilePreview$1(props2) {
|
|
|
37806
37286
|
$[0] !== schemaType ? (t0 = get(schemaType, "options.accept", ""), $[0] = schemaType, $[1] = t0) : t0 = $[1];
|
|
37807
37287
|
const accept = t0;
|
|
37808
37288
|
let t1;
|
|
37809
|
-
$[2] !== assetSources ? (t1 = assetSources.filter(_temp$
|
|
37289
|
+
$[2] !== assetSources ? (t1 = assetSources.filter(_temp$2v), $[2] = assetSources, $[3] = t1) : t1 = $[3];
|
|
37810
37290
|
const assetSourcesWithUpload = t1;
|
|
37811
37291
|
let t2;
|
|
37812
37292
|
$[4] !== assetSources || $[5] !== setSelectedAssetSource ? (t2 = (event) => {
|
|
@@ -37891,7 +37371,7 @@ function FilePreview$1(props2) {
|
|
|
37891
37371
|
let t9;
|
|
37892
37372
|
return $[53] !== asset || $[54] !== observeAsset || $[55] !== t8 ? (t9 = /* @__PURE__ */ jsx(WithReferencedAsset, { reference: asset, observeAsset, waitPlaceholder: t7, children: t8 }), $[53] = asset, $[54] = observeAsset, $[55] = t8, $[56] = t9) : t9 = $[56], t9;
|
|
37893
37373
|
}
|
|
37894
|
-
function _temp$
|
|
37374
|
+
function _temp$2v(s) {
|
|
37895
37375
|
return !!s.Uploader;
|
|
37896
37376
|
}
|
|
37897
37377
|
function InvalidFileWarning(t0) {
|
|
@@ -38152,7 +37632,7 @@ function BaseFileInput(props2) {
|
|
|
38152
37632
|
break bb68;
|
|
38153
37633
|
}
|
|
38154
37634
|
case "error": {
|
|
38155
|
-
event.files.forEach(_temp$
|
|
37635
|
+
event.files.forEach(_temp$2u), push({
|
|
38156
37636
|
status: "error",
|
|
38157
37637
|
description: t("asset-sources.common.uploader.upload-failed.description"),
|
|
38158
37638
|
title: t("asset-sources.common.uploader.upload-failed.title")
|
|
@@ -38160,7 +37640,7 @@ function BaseFileInput(props2) {
|
|
|
38160
37640
|
break bb68;
|
|
38161
37641
|
}
|
|
38162
37642
|
case "all-complete": {
|
|
38163
|
-
event.files.some(_temp2$
|
|
37643
|
+
event.files.some(_temp2$12) && handleAssetLimitUpsellDialog("field_action"), onChange(PatchEvent.from([unset([UPLOAD_STATUS_KEY])]));
|
|
38164
37644
|
break bb68;
|
|
38165
37645
|
}
|
|
38166
37646
|
default:
|
|
@@ -38210,10 +37690,10 @@ function BaseFileInput(props2) {
|
|
|
38210
37690
|
t14
|
|
38211
37691
|
] }), $[79] = t13, $[80] = t14, $[81] = t15) : t15 = $[81], t15;
|
|
38212
37692
|
}
|
|
38213
|
-
function _temp2$
|
|
37693
|
+
function _temp2$12(file_0) {
|
|
38214
37694
|
return file_0.status === "error" && isAssetLimitError(file_0.error);
|
|
38215
37695
|
}
|
|
38216
|
-
function _temp$
|
|
37696
|
+
function _temp$2u(file_1) {
|
|
38217
37697
|
console.error(file_1.error);
|
|
38218
37698
|
}
|
|
38219
37699
|
function StudioFileInput(props2) {
|
|
@@ -38433,7 +37913,7 @@ function ImageInputAssetMenuWithReferenceAssetComponent(props2) {
|
|
|
38433
37913
|
$[0] !== documentId || $[1] !== observeAsset ? (t0 = observeAsset(documentId), $[0] = documentId, $[1] = observeAsset, $[2] = t0) : t0 = $[2];
|
|
38434
37914
|
const asset = useObservable(t0);
|
|
38435
37915
|
let t1;
|
|
38436
|
-
$[3] !== assetSources ? (t1 = assetSources.filter(_temp$
|
|
37916
|
+
$[3] !== assetSources ? (t1 = assetSources.filter(_temp$2t), $[3] = assetSources, $[4] = t1) : t1 = $[4];
|
|
38437
37917
|
const assetSourcesWithUpload = t1;
|
|
38438
37918
|
let t2;
|
|
38439
37919
|
$[5] !== onSelectFile ? (t2 = (assetSource, files) => {
|
|
@@ -38488,7 +37968,7 @@ function ImageInputAssetMenuWithReferenceAssetComponent(props2) {
|
|
|
38488
37968
|
let t6;
|
|
38489
37969
|
return $[39] !== handleOpenDialog || $[40] !== isMenuOpen || $[41] !== setHotspotButtonElement || $[42] !== setMenuButtonElement || $[43] !== setMenuOpen || $[44] !== t4 || $[45] !== t5 ? (t6 = /* @__PURE__ */ jsx(ImageActionsMenu, { isMenuOpen, onEdit: handleOpenDialog, onMenuOpen: setMenuOpen, setHotspotButtonElement, setMenuButtonElement, showEdit: t4, children: t5 }), $[39] = handleOpenDialog, $[40] = isMenuOpen, $[41] = setHotspotButtonElement, $[42] = setMenuButtonElement, $[43] = setMenuOpen, $[44] = t4, $[45] = t5, $[46] = t6) : t6 = $[46], t6;
|
|
38490
37970
|
}
|
|
38491
|
-
function _temp$
|
|
37971
|
+
function _temp$2t(s) {
|
|
38492
37972
|
return !!s.Uploader;
|
|
38493
37973
|
}
|
|
38494
37974
|
const ImageInputAssetMenuWithReferenceAsset = memo(ImageInputAssetMenuWithReferenceAssetComponent);
|
|
@@ -39664,7 +39144,7 @@ function ToolSVGComponent(props2) {
|
|
|
39664
39144
|
const svgElement = svgRef.current;
|
|
39665
39145
|
if (!svgElement)
|
|
39666
39146
|
return;
|
|
39667
|
-
const handleTouchMove = _temp$
|
|
39147
|
+
const handleTouchMove = _temp$2s;
|
|
39668
39148
|
return svgElement.addEventListener("touchmove", handleTouchMove, {
|
|
39669
39149
|
passive: !1
|
|
39670
39150
|
}), () => {
|
|
@@ -39915,7 +39395,7 @@ function ToolSVGComponent(props2) {
|
|
|
39915
39395
|
t83
|
|
39916
39396
|
] }) }), $[217] = handlePointerMove, $[218] = handlePointerUp, $[219] = t19, $[220] = t23, $[221] = t24, $[222] = t30, $[223] = t35, $[224] = t36, $[225] = t47, $[226] = t77, $[227] = t83, $[228] = t84) : t84 = $[228], t84;
|
|
39917
39397
|
}
|
|
39918
|
-
function _temp$
|
|
39398
|
+
function _temp$2s(e) {
|
|
39919
39399
|
e.preventDefault();
|
|
39920
39400
|
}
|
|
39921
39401
|
const ToolSVG = memo(ToolSVGComponent);
|
|
@@ -40034,7 +39514,7 @@ function ImageToolInput(props2) {
|
|
|
40034
39514
|
onPathFocus,
|
|
40035
39515
|
readOnly,
|
|
40036
39516
|
elementProps: t1
|
|
40037
|
-
} = props2, focusPath = t0 === void 0 ? EMPTY_ARRAY$
|
|
39517
|
+
} = props2, focusPath = t0 === void 0 ? EMPTY_ARRAY$z : t0, {
|
|
40038
39518
|
ref: forwardRef2
|
|
40039
39519
|
} = t1, ref = useRef(null);
|
|
40040
39520
|
let t2;
|
|
@@ -40062,7 +39542,7 @@ function ImageToolInput(props2) {
|
|
|
40062
39542
|
$[8] !== onChange || $[9] !== readOnly || $[10] !== schemaType.fields ? (t7 = (finalValue) => {
|
|
40063
39543
|
if (readOnly)
|
|
40064
39544
|
return;
|
|
40065
|
-
const cropField = schemaType.fields.find(_temp$
|
|
39545
|
+
const cropField = schemaType.fields.find(_temp$2r), hotspotField = schemaType.fields.find(_temp2$11), crop = cropField ? {
|
|
40066
39546
|
_type: cropField.type.name,
|
|
40067
39547
|
...finalValue.crop || DEFAULT_CROP
|
|
40068
39548
|
} : finalValue.crop, hotspot = hotspotField ? {
|
|
@@ -40086,7 +39566,7 @@ function ImageToolInput(props2) {
|
|
|
40086
39566
|
$[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: [
|
|
40087
39567
|
/* @__PURE__ */ jsx(Text$1, { size: 1, children: t("inputs.imagetool.vector-warning.title") }),
|
|
40088
39568
|
/* @__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: {
|
|
40089
|
-
ImageUrlDocumentationLink: _temp3$
|
|
39569
|
+
ImageUrlDocumentationLink: _temp3$u,
|
|
40090
39570
|
ImageUrlPackageDocumentationLink: _temp4$d
|
|
40091
39571
|
} }) }) })
|
|
40092
39572
|
] }) }) }) : null, $[18] = isSvg, $[19] = t, $[20] = t12) : t12 = $[20];
|
|
@@ -40136,16 +39616,16 @@ function _temp4$d(t0) {
|
|
|
40136
39616
|
} = t0;
|
|
40137
39617
|
return /* @__PURE__ */ jsx("a", { href: "https://www.sanity.io/docs/image-urls#fm-048ba39d9e88", children: /* @__PURE__ */ jsx("code", { children: children_0 }) });
|
|
40138
39618
|
}
|
|
40139
|
-
function _temp3$
|
|
39619
|
+
function _temp3$u(t0) {
|
|
40140
39620
|
const {
|
|
40141
39621
|
children
|
|
40142
39622
|
} = t0;
|
|
40143
39623
|
return /* @__PURE__ */ jsx("a", { href: "https://www.sanity.io/docs/image-urls#fm-048ba39d9e88", children });
|
|
40144
39624
|
}
|
|
40145
|
-
function _temp2$
|
|
39625
|
+
function _temp2$11(field_0) {
|
|
40146
39626
|
return field_0.type.name !== "object" && field_0.name === "hotspot";
|
|
40147
39627
|
}
|
|
40148
|
-
function _temp$
|
|
39628
|
+
function _temp$2r(field) {
|
|
40149
39629
|
return field.name === "crop" && field.type.name !== "object";
|
|
40150
39630
|
}
|
|
40151
39631
|
function ImageInputHotspotInput(props2) {
|
|
@@ -40408,7 +39888,7 @@ function BaseImageInputComponent(props2) {
|
|
|
40408
39888
|
const handleClearField = t5;
|
|
40409
39889
|
let t6;
|
|
40410
39890
|
$[19] !== onChange || $[20] !== value || $[21] !== valueIsArrayElement ? (t6 = () => {
|
|
40411
|
-
const allKeys = Object.keys(value || {}), isEmpty2 = allKeys.filter(_temp$
|
|
39891
|
+
const allKeys = Object.keys(value || {}), isEmpty2 = allKeys.filter(_temp$2q).length === 0, removeKeys = ["asset", "media"].concat(allKeys.filter(_temp2$10)).map(_temp3$t);
|
|
40412
39892
|
onChange(isEmpty2 && !valueIsArrayElement() ? unset() : removeKeys);
|
|
40413
39893
|
}, $[19] = onChange, $[20] = value, $[21] = valueIsArrayElement, $[22] = t6) : t6 = $[22];
|
|
40414
39894
|
const handleRemoveButtonClick = t6;
|
|
@@ -40562,13 +40042,13 @@ function _temp5$8(eventFile) {
|
|
|
40562
40042
|
function _temp4$c(eventFile_0) {
|
|
40563
40043
|
console.error(eventFile_0.error);
|
|
40564
40044
|
}
|
|
40565
|
-
function _temp3$
|
|
40045
|
+
function _temp3$t(key_1) {
|
|
40566
40046
|
return unset([key_1]);
|
|
40567
40047
|
}
|
|
40568
|
-
function _temp2
|
|
40048
|
+
function _temp2$10(key_0) {
|
|
40569
40049
|
return ["crop", "hotspot", "_upload"].includes(key_0);
|
|
40570
40050
|
}
|
|
40571
|
-
function _temp$
|
|
40051
|
+
function _temp$2q(key) {
|
|
40572
40052
|
return !["_type", "_key", "_upload", "asset", "crop", "hotspot", "media"].includes(key);
|
|
40573
40053
|
}
|
|
40574
40054
|
const BaseImageInput = memo(BaseImageInputComponent);
|
|
@@ -40853,11 +40333,11 @@ function TagsArrayInput(props2) {
|
|
|
40853
40333
|
$[0] !== t0 ? (t1 = t0 === void 0 ? [] : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
40854
40334
|
const value = t1;
|
|
40855
40335
|
let t2;
|
|
40856
|
-
$[2] !== value ? (t2 = value?.map(_temp$
|
|
40336
|
+
$[2] !== value ? (t2 = value?.map(_temp$2p), $[2] = value, $[3] = t2) : t2 = $[3];
|
|
40857
40337
|
const tagInputValue = t2;
|
|
40858
40338
|
let t3;
|
|
40859
40339
|
$[4] !== onChange ? (t3 = (nextValue) => {
|
|
40860
|
-
onChange(nextValue.length === 0 ? unset() : set(nextValue.map(_temp2
|
|
40340
|
+
onChange(nextValue.length === 0 ? unset() : set(nextValue.map(_temp2$$)));
|
|
40861
40341
|
}, $[4] = onChange, $[5] = t3) : t3 = $[5];
|
|
40862
40342
|
const handleChange = t3;
|
|
40863
40343
|
let t4;
|
|
@@ -40865,10 +40345,10 @@ function TagsArrayInput(props2) {
|
|
|
40865
40345
|
let t5;
|
|
40866
40346
|
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;
|
|
40867
40347
|
}
|
|
40868
|
-
function _temp2
|
|
40348
|
+
function _temp2$$(v_0) {
|
|
40869
40349
|
return v_0.value;
|
|
40870
40350
|
}
|
|
40871
|
-
function _temp$
|
|
40351
|
+
function _temp$2p(v) {
|
|
40872
40352
|
return {
|
|
40873
40353
|
value: v
|
|
40874
40354
|
};
|
|
@@ -40945,11 +40425,11 @@ function SelectInput(props2) {
|
|
|
40945
40425
|
}
|
|
40946
40426
|
handleChange(nextItem_0);
|
|
40947
40427
|
}, $[12] = handleChange, $[13] = itemFromOptionValue, $[14] = t6) : t6 = $[14];
|
|
40948
|
-
const handleSelectChange = t6, content = isRadio ? /* @__PURE__ */ jsx(RadioSelect, { ...elementProps, value: currentItem, inputId, items, direction: schemaType.options?.direction || "vertical", customValidity: validationError, onChange: handleChange, readOnly }) : /* @__PURE__ */ jsx(Select, { ...elementProps, customValidity: validationError, value: optionValueFromItem(currentItem), readOnly, onChange: handleSelectChange, children: [EMPTY_ITEM, ...items].map(_temp$
|
|
40428
|
+
const handleSelectChange = t6, content = isRadio ? /* @__PURE__ */ jsx(RadioSelect, { ...elementProps, value: currentItem, inputId, items, direction: schemaType.options?.direction || "vertical", customValidity: validationError, onChange: handleChange, readOnly }) : /* @__PURE__ */ jsx(Select, { ...elementProps, customValidity: validationError, value: optionValueFromItem(currentItem), readOnly, onChange: handleSelectChange, children: [EMPTY_ITEM, ...items].map(_temp$2o) }), t7 = !!focused;
|
|
40949
40429
|
let t8;
|
|
40950
40430
|
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;
|
|
40951
40431
|
}
|
|
40952
|
-
function _temp$
|
|
40432
|
+
function _temp$2o(item_1, i) {
|
|
40953
40433
|
return /* @__PURE__ */ jsx("option", { value: i - 1, children: item_1.title }, `${i - 1}`);
|
|
40954
40434
|
}
|
|
40955
40435
|
const RadioSelect = forwardRef(function(props2, ref) {
|
|
@@ -41035,7 +40515,7 @@ const MENU_POPOVER_PROPS$1 = {
|
|
|
41035
40515
|
position: "relative"
|
|
41036
40516
|
}, EMPTY_ARRAY$j = [];
|
|
41037
40517
|
function PreviewItem(props2) {
|
|
41038
|
-
const $ = c(
|
|
40518
|
+
const $ = c(97), {
|
|
41039
40519
|
schemaType,
|
|
41040
40520
|
parentSchemaType,
|
|
41041
40521
|
path,
|
|
@@ -41057,9 +40537,8 @@ function PreviewItem(props2) {
|
|
|
41057
40537
|
} = t0, {
|
|
41058
40538
|
t
|
|
41059
40539
|
} = useTranslation(), {
|
|
41060
|
-
enabled: enhancedObjectDialogEnabled
|
|
41061
|
-
|
|
41062
|
-
} = useEnhancedObjectDialog(), openPortal = open && !(enhancedObjectDialogEnabled && isDialogAvailable), sortable = parentSchemaType.options?.sortable !== !1, insertableTypes = parentSchemaType.of, [previewCardElement, setPreviewCardElement] = useState(null), previewCardRef = useRef(null);
|
|
40540
|
+
enabled: enhancedObjectDialogEnabled
|
|
40541
|
+
} = useEnhancedObjectDialog(), openPortal = open && !enhancedObjectDialogEnabled, openEnhancedDialog = open && enhancedObjectDialogEnabled, sortable = parentSchemaType.options?.sortable !== !1, insertableTypes = parentSchemaType.of, [previewCardElement, setPreviewCardElement] = useState(null), previewCardRef = useRef(null);
|
|
41063
40542
|
let t1, t2;
|
|
41064
40543
|
$[0] !== previewCardElement ? (t1 = () => previewCardElement, t2 = [previewCardElement], $[0] = previewCardElement, $[1] = t1, $[2] = t2) : (t1 = $[1], t2 = $[2]), useImperativeHandle(previewCardRef, t1, t2), useScrollIntoViewOnFocusWithin(previewCardRef, open && previewCardElement !== null);
|
|
41065
40544
|
let t3;
|
|
@@ -41101,7 +40580,7 @@ function PreviewItem(props2) {
|
|
|
41101
40580
|
const presence = t7, childValidation = useChildValidation(path, !0);
|
|
41102
40581
|
let t8;
|
|
41103
40582
|
$[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];
|
|
41104
|
-
const validation2 = t8, hasErrors = childValidation.some(_temp$
|
|
40583
|
+
const validation2 = t8, hasErrors = childValidation.some(_temp$2n), hasWarnings = childValidation.some(_temp2$_), [contextMenuButtonElement, setContextMenuButtonElement] = useState(null), t9 = parentSchemaType.options?.insertMenu;
|
|
41105
40584
|
let t10;
|
|
41106
40585
|
$[16] !== contextMenuButtonElement || $[17] !== handleInsert || $[18] !== insertableTypes || $[19] !== t9 ? (t10 = {
|
|
41107
40586
|
schemaTypes: insertableTypes,
|
|
@@ -41162,27 +40641,32 @@ function PreviewItem(props2) {
|
|
|
41162
40641
|
$[64] !== focused || $[65] !== menu || $[66] !== open || $[67] !== presence || $[68] !== sortable || $[69] !== t18 || $[70] !== t21 || $[71] !== tone || $[72] !== validation2 ? (t22 = /* @__PURE__ */ jsx(RowLayout, { menu, presence, validation: validation2, tone, focused, dragHandle: sortable, selected: open, readOnly: t18, children: t21 }), $[64] = focused, $[65] = menu, $[66] = open, $[67] = presence, $[68] = sortable, $[69] = t18, $[70] = t21, $[71] = tone, $[72] = validation2, $[73] = t22) : t22 = $[73];
|
|
41163
40642
|
const item = t22;
|
|
41164
40643
|
let t23;
|
|
41165
|
-
if ($[74] !== changed || $[75] !== children || $[76] !== focused || $[77] !== item || $[78] !== onClose || $[79] !==
|
|
40644
|
+
if ($[74] !== changed || $[75] !== children || $[76] !== focused || $[77] !== item || $[78] !== onClose || $[79] !== openEnhancedDialog || $[80] !== openPortal || $[81] !== parentSchemaType.options?.modal?.type || $[82] !== parentSchemaType.options?.modal?.width || $[83] !== path || $[84] !== previewCardElement || $[85] !== readOnly || $[86] !== schemaType || $[87] !== t || $[88] !== value) {
|
|
41166
40645
|
const itemTypeTitle = getSchemaTypeTitle(schemaType), t24 = !!focused;
|
|
41167
40646
|
let t25;
|
|
41168
|
-
$[
|
|
40647
|
+
$[90] !== item ? (t25 = /* @__PURE__ */ jsx(Box, { paddingX: 1, children: item }), $[90] = item, $[91] = t25) : t25 = $[91];
|
|
41169
40648
|
let t26;
|
|
41170
|
-
$[
|
|
40649
|
+
$[92] !== changed || $[93] !== path || $[94] !== t24 || $[95] !== t25 ? (t26 = /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: t24, children: t25 }), $[92] = changed, $[93] = path, $[94] = t24, $[95] = t25, $[96] = t26) : t26 = $[96], t23 = /* @__PURE__ */ jsxs(EnhancedObjectDialogProvider, { children: [
|
|
41171
40650
|
t26,
|
|
41172
40651
|
openPortal && /* @__PURE__ */ jsx(EditPortal, { header: readOnly ? t("inputs.array.action.view", {
|
|
41173
40652
|
itemTypeTitle
|
|
41174
40653
|
}) : t("inputs.array.action.edit", {
|
|
41175
40654
|
itemTypeTitle
|
|
40655
|
+
}), type: parentSchemaType?.options?.modal?.type || "dialog", width: parentSchemaType?.options?.modal?.width ?? 1, id: value._key, onClose, autofocus: focused, legacy_referenceElement: previewCardElement, children }),
|
|
40656
|
+
openEnhancedDialog && /* @__PURE__ */ jsx(EnhancedObjectDialog, { header: readOnly ? t("inputs.array.action.view", {
|
|
40657
|
+
itemTypeTitle
|
|
40658
|
+
}) : t("inputs.array.action.edit", {
|
|
40659
|
+
itemTypeTitle
|
|
41176
40660
|
}), type: parentSchemaType?.options?.modal?.type || "dialog", width: parentSchemaType?.options?.modal?.width ?? 1, id: value._key, onClose, autofocus: focused, legacy_referenceElement: previewCardElement, children })
|
|
41177
|
-
] }), $[74] = changed, $[75] = children, $[76] = focused, $[77] = item, $[78] = onClose, $[79] =
|
|
40661
|
+
] }), $[74] = changed, $[75] = children, $[76] = focused, $[77] = item, $[78] = onClose, $[79] = openEnhancedDialog, $[80] = openPortal, $[81] = parentSchemaType.options?.modal?.type, $[82] = parentSchemaType.options?.modal?.width, $[83] = path, $[84] = previewCardElement, $[85] = readOnly, $[86] = schemaType, $[87] = t, $[88] = value, $[89] = t23;
|
|
41178
40662
|
} else
|
|
41179
|
-
t23 = $[
|
|
40663
|
+
t23 = $[89];
|
|
41180
40664
|
return t23;
|
|
41181
40665
|
}
|
|
41182
|
-
function _temp2$
|
|
40666
|
+
function _temp2$_(v_0) {
|
|
41183
40667
|
return v_0.level === "warning";
|
|
41184
40668
|
}
|
|
41185
|
-
function _temp$
|
|
40669
|
+
function _temp$2n(v) {
|
|
41186
40670
|
return v.level === "error";
|
|
41187
40671
|
}
|
|
41188
40672
|
function ReferenceItemRefProvider(props2) {
|
|
@@ -41254,7 +40738,7 @@ function ReferenceItem(props2) {
|
|
|
41254
40738
|
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (hadFocus, hasFocus) => {
|
|
41255
40739
|
!hadFocus && hasFocus && elementRef.current && elementRef.current?.focus();
|
|
41256
40740
|
}, $[4] = t2) : t2 = $[4], useDidUpdate(focused, t2);
|
|
41257
|
-
const hasErrors = props2.validation.some(_temp$
|
|
40741
|
+
const hasErrors = props2.validation.some(_temp$2m), hasWarnings = props2.validation.some(_temp2$Z), resolvingInitialValue = value._resolvingInitialValue;
|
|
41258
40742
|
let t3;
|
|
41259
40743
|
$[5] !== onInsert || $[6] !== value ? (t3 = () => {
|
|
41260
40744
|
onInsert({
|
|
@@ -41321,7 +40805,7 @@ function ReferenceItem(props2) {
|
|
|
41321
40805
|
const {
|
|
41322
40806
|
insertBefore,
|
|
41323
40807
|
insertAfter: insertAfter2
|
|
41324
|
-
} = useInsertMenuMenuItems(t11), disableActions = parentSchemaType.options?.disableActions || EMPTY_ARRAY$
|
|
40808
|
+
} = useInsertMenuMenuItems(t11), disableActions = parentSchemaType.options?.disableActions || EMPTY_ARRAY$z;
|
|
41325
40809
|
let t12;
|
|
41326
40810
|
$[29] !== onChange || $[30] !== schemaType.weak ? (t12 = () => {
|
|
41327
40811
|
onChange(schemaType.weak === !0 ? set(!0, ["_weak"]) : unset(["_weak"]));
|
|
@@ -41388,10 +40872,10 @@ function ReferenceItem(props2) {
|
|
|
41388
40872
|
let t27;
|
|
41389
40873
|
return $[98] !== changed || $[99] !== path || $[100] !== t25 || $[101] !== t26 ? (t27 = /* @__PURE__ */ jsx(ChangeIndicator, { path, isChanged: changed, hasFocus: t25, children: t26 }), $[98] = changed, $[99] = path, $[100] = t25, $[101] = t26, $[102] = t27) : t27 = $[102], t27;
|
|
41390
40874
|
}
|
|
41391
|
-
function _temp2$
|
|
40875
|
+
function _temp2$Z(v_0) {
|
|
41392
40876
|
return v_0.level === "warning";
|
|
41393
40877
|
}
|
|
41394
|
-
function _temp$
|
|
40878
|
+
function _temp$2m(v) {
|
|
41395
40879
|
return v.level === "error";
|
|
41396
40880
|
}
|
|
41397
40881
|
function defaultResolveItemComponent(schemaType) {
|
|
@@ -42010,7 +41494,7 @@ function createPrepareFormState({
|
|
|
42010
41494
|
columns: fieldSet?.options?.columns
|
|
42011
41495
|
}
|
|
42012
41496
|
}];
|
|
42013
|
-
}), hasFieldGroups = schemaTypeGroupConfig.length > 0, filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$
|
|
41497
|
+
}), hasFieldGroups = schemaTypeGroupConfig.length > 0, filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$z, validation2 = props2.validation.filter((item) => isEqual$3(item.path, props2.path)).map((v) => ({
|
|
42014
41498
|
level: v.level,
|
|
42015
41499
|
message: v.message,
|
|
42016
41500
|
path: v.path
|
|
@@ -42058,7 +41542,7 @@ function createPrepareFormState({
|
|
|
42058
41542
|
}), prepareArrayOfPrimitivesInputState = memoizePrepareArrayOfPrimitivesInputState(function(props2) {
|
|
42059
41543
|
if (props2.level === MAX_FIELD_DEPTH || props2.hidden === !0 || props2.hidden?.value)
|
|
42060
41544
|
return null;
|
|
42061
|
-
const items = Array.isArray(props2.value) ? props2.value : [], filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$
|
|
41545
|
+
const items = Array.isArray(props2.value) ? props2.value : [], filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$z, validation2 = props2.validation.filter((item) => isEqual$3(item.path, props2.path)).map((v) => ({
|
|
42062
41546
|
level: v.level,
|
|
42063
41547
|
message: v.message,
|
|
42064
41548
|
path: v.path
|
|
@@ -42089,7 +41573,7 @@ function createPrepareFormState({
|
|
|
42089
41573
|
}), prepareArrayOfObjectsInputState = memoizePrepareArrayOfObjectsInputState(function(props2) {
|
|
42090
41574
|
if (props2.level === MAX_FIELD_DEPTH || props2.hidden === !0 || props2.hidden?.value)
|
|
42091
41575
|
return null;
|
|
42092
|
-
const items = Array.isArray(props2.value) ? props2.value : [], filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$
|
|
41576
|
+
const items = Array.isArray(props2.value) ? props2.value : [], filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$z, validation2 = props2.validation.filter((item) => isEqual$3(item.path, props2.path)).map((v) => ({
|
|
42093
41577
|
level: v.level,
|
|
42094
41578
|
message: v.message,
|
|
42095
41579
|
path: v.path
|
|
@@ -42207,7 +41691,7 @@ function createPrepareFormState({
|
|
|
42207
41691
|
item
|
|
42208
41692
|
};
|
|
42209
41693
|
}), preparePrimitiveInputState = memoizePreparePrimitiveInputState(function(props2) {
|
|
42210
|
-
const filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$
|
|
41694
|
+
const filteredPresence = props2.presence.filter((item) => isEqual$3(item.path, props2.path)), presence = filteredPresence.length ? filteredPresence : EMPTY_ARRAY$z, validation2 = props2.validation.filter((item) => isEqual$3(item.path, props2.path)).map((v) => ({
|
|
42211
41695
|
level: v.level,
|
|
42212
41696
|
message: v.message,
|
|
42213
41697
|
path: v.path
|
|
@@ -42301,6 +41785,98 @@ function prepareDiffProps({
|
|
|
42301
41785
|
hasUpstreamVersion
|
|
42302
41786
|
};
|
|
42303
41787
|
}
|
|
41788
|
+
function DialogStackProvider(t0) {
|
|
41789
|
+
const $ = c(23), {
|
|
41790
|
+
children
|
|
41791
|
+
} = t0;
|
|
41792
|
+
let t1;
|
|
41793
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[0] = t1) : t1 = $[0];
|
|
41794
|
+
const [stack, setStack] = useState(t1), {
|
|
41795
|
+
onPathOpen
|
|
41796
|
+
} = useFormCallbacks(), {
|
|
41797
|
+
hasAnyFullscreen,
|
|
41798
|
+
allFullscreenPaths
|
|
41799
|
+
} = useFullscreenPTE();
|
|
41800
|
+
let t2;
|
|
41801
|
+
$[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = (id2, path) => {
|
|
41802
|
+
setStack((prev) => prev.some((entry) => entry.id === id2) ? prev : [...prev, {
|
|
41803
|
+
id: id2,
|
|
41804
|
+
path
|
|
41805
|
+
}]);
|
|
41806
|
+
}, $[1] = t2) : t2 = $[1];
|
|
41807
|
+
const push = t2;
|
|
41808
|
+
let t3;
|
|
41809
|
+
$[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = (id_0) => {
|
|
41810
|
+
setStack((prev_0) => prev_0.filter((entry_0) => entry_0.id !== id_0));
|
|
41811
|
+
}, $[2] = t3) : t3 = $[2];
|
|
41812
|
+
const remove2 = t3;
|
|
41813
|
+
let t4;
|
|
41814
|
+
$[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = (id_1, path_0) => {
|
|
41815
|
+
setStack((prev_1) => prev_1.map((entry_1) => entry_1.id === id_1 ? {
|
|
41816
|
+
...entry_1,
|
|
41817
|
+
path: path_0
|
|
41818
|
+
} : entry_1));
|
|
41819
|
+
}, $[3] = t4) : t4 = $[3];
|
|
41820
|
+
const update = t4;
|
|
41821
|
+
let t5;
|
|
41822
|
+
$[4] !== allFullscreenPaths ? (t5 = (currentPath) => allFullscreenPaths.filter((pathStr) => {
|
|
41823
|
+
const fullscreenPath = stringToPath(pathStr);
|
|
41824
|
+
if (fullscreenPath.length > currentPath.length || !fullscreenPath.every((segment, index) => {
|
|
41825
|
+
const currentSegment = currentPath[index];
|
|
41826
|
+
return isKeySegment(segment) && isKeySegment(currentSegment) ? segment._key === currentSegment._key : segment === currentSegment;
|
|
41827
|
+
}))
|
|
41828
|
+
return !1;
|
|
41829
|
+
if (fullscreenPath.some(_temp$2l))
|
|
41830
|
+
return !0;
|
|
41831
|
+
const nextSegment = currentPath[fullscreenPath.length];
|
|
41832
|
+
return !isKeySegment(nextSegment);
|
|
41833
|
+
}), $[4] = allFullscreenPaths, $[5] = t5) : t5 = $[5];
|
|
41834
|
+
const findAncestorFullscreenPath = t5;
|
|
41835
|
+
let t6;
|
|
41836
|
+
$[6] !== onPathOpen ? (t6 = () => {
|
|
41837
|
+
onPathOpen(EMPTY_ARRAY$z), setStack([]);
|
|
41838
|
+
}, $[6] = onPathOpen, $[7] = t6) : t6 = $[7];
|
|
41839
|
+
const closeAll = t6;
|
|
41840
|
+
let t7;
|
|
41841
|
+
$[8] !== findAncestorFullscreenPath || $[9] !== onPathOpen ? (t7 = (currentPath_0) => {
|
|
41842
|
+
const ancestorPaths = findAncestorFullscreenPath(currentPath_0);
|
|
41843
|
+
if (ancestorPaths && ancestorPaths.length > 0) {
|
|
41844
|
+
const closestParentPath = ancestorPaths.reduce(_temp2$Y), newPath = stringToPath(closestParentPath);
|
|
41845
|
+
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) => {
|
|
41846
|
+
const newSegment = newPath[index_0];
|
|
41847
|
+
return isKeySegment(segment_1) && isKeySegment(newSegment) ? segment_1._key === newSegment._key : segment_1 === newSegment;
|
|
41848
|
+
})));
|
|
41849
|
+
}
|
|
41850
|
+
}, $[8] = findAncestorFullscreenPath, $[9] = onPathOpen, $[10] = t7) : t7 = $[10];
|
|
41851
|
+
const closeWithFullscreen = t7;
|
|
41852
|
+
let t8;
|
|
41853
|
+
$[11] !== allFullscreenPaths || $[12] !== closeAll || $[13] !== closeWithFullscreen || $[14] !== hasAnyFullscreen || $[15] !== stack ? (t8 = () => {
|
|
41854
|
+
const currentPath_1 = stack[stack.length - 1]?.path;
|
|
41855
|
+
if (currentPath_1 && hasAnyFullscreen() && allFullscreenPaths.length >= 1) {
|
|
41856
|
+
closeWithFullscreen(currentPath_1);
|
|
41857
|
+
return;
|
|
41858
|
+
}
|
|
41859
|
+
closeAll();
|
|
41860
|
+
}, $[11] = allFullscreenPaths, $[12] = closeAll, $[13] = closeWithFullscreen, $[14] = hasAnyFullscreen, $[15] = stack, $[16] = t8) : t8 = $[16];
|
|
41861
|
+
const close = t8;
|
|
41862
|
+
let t9;
|
|
41863
|
+
$[17] !== close || $[18] !== stack ? (t9 = {
|
|
41864
|
+
stack,
|
|
41865
|
+
push,
|
|
41866
|
+
remove: remove2,
|
|
41867
|
+
update,
|
|
41868
|
+
close
|
|
41869
|
+
}, $[17] = close, $[18] = stack, $[19] = t9) : t9 = $[19];
|
|
41870
|
+
const value = t9;
|
|
41871
|
+
let t10;
|
|
41872
|
+
return $[20] !== children || $[21] !== value ? (t10 = /* @__PURE__ */ jsx(DialogStackContext.Provider, { value, children }), $[20] = children, $[21] = value, $[22] = t10) : t10 = $[22], t10;
|
|
41873
|
+
}
|
|
41874
|
+
function _temp2$Y(longest, current) {
|
|
41875
|
+
return current.length > longest.length ? current : longest;
|
|
41876
|
+
}
|
|
41877
|
+
function _temp$2l(segment_0) {
|
|
41878
|
+
return isKeySegment(segment_0);
|
|
41879
|
+
}
|
|
42304
41880
|
function FormBuilderInputErrorBoundary(props2) {
|
|
42305
41881
|
const $ = c(7), {
|
|
42306
41882
|
children
|
|
@@ -42586,7 +42162,7 @@ function FormBuilderProvider(props2) {
|
|
|
42586
42162
|
schemaType,
|
|
42587
42163
|
unstable,
|
|
42588
42164
|
validation: validation2
|
|
42589
|
-
} = props2, fieldActions = t0 === void 0 ? EMPTY_ARRAY$
|
|
42165
|
+
} = props2, fieldActions = t0 === void 0 ? EMPTY_ARRAY$z : t0, patchChannel = t1 === void 0 ? missingPatchChannel : t1, t2 = unstable?.CustomMarkers || DefaultCustomMarkers, t3 = unstable?.Markers || DefaultMarkers;
|
|
42590
42166
|
let t4;
|
|
42591
42167
|
$[0] !== t2 || $[1] !== t3 ? (t4 = {
|
|
42592
42168
|
ArrayFunctions: ArrayOfObjectsFunctions,
|
|
@@ -42711,7 +42287,7 @@ function FormProvider(props2) {
|
|
|
42711
42287
|
return $[14] !== autoFocus || $[15] !== changesOpen || $[16] !== children || $[17] !== collapsedFieldSets || $[18] !== collapsedPaths || $[19] !== fieldActions || $[20] !== file || $[21] !== focusPath || $[22] !== focused || $[23] !== groups || $[24] !== id2 || $[25] !== image || $[26] !== onChange || $[27] !== onFieldGroupSelect || $[28] !== onPathBlur || $[29] !== onPathFocus || $[30] !== onPathOpen || $[31] !== onSetFieldSetCollapsed || $[32] !== onSetPathCollapsed || $[33] !== patchChannel || $[34] !== presence || $[35] !== readOnly || $[36] !== renderAnnotation || $[37] !== renderBlock2 || $[38] !== renderField || $[39] !== renderInlineBlock || $[40] !== renderInput || $[41] !== renderItem2 || $[42] !== renderPreview || $[43] !== schemaType || $[44] !== validation2 ? (t7 = /* @__PURE__ */ jsx(FormBuilderProvider, { __internal_fieldActions: fieldActions, __internal_patchChannel: patchChannel, autoFocus, changesOpen, collapsedFieldSets, collapsedPaths, file, focusPath, focused, groups, id: id2, image, onChange, onPathBlur, onPathFocus, onPathOpen, onFieldGroupSelect, onSetPathCollapsed, onSetFieldSetCollapsed, presence, readOnly, renderAnnotation, renderBlock: renderBlock2, renderField, renderInlineBlock, renderInput, renderItem: renderItem2, renderPreview, schemaType, validation: validation2, children }), $[14] = autoFocus, $[15] = changesOpen, $[16] = children, $[17] = collapsedFieldSets, $[18] = collapsedPaths, $[19] = fieldActions, $[20] = file, $[21] = focusPath, $[22] = focused, $[23] = groups, $[24] = id2, $[25] = image, $[26] = onChange, $[27] = onFieldGroupSelect, $[28] = onPathBlur, $[29] = onPathFocus, $[30] = onPathOpen, $[31] = onSetFieldSetCollapsed, $[32] = onSetPathCollapsed, $[33] = patchChannel, $[34] = presence, $[35] = readOnly, $[36] = renderAnnotation, $[37] = renderBlock2, $[38] = renderField, $[39] = renderInlineBlock, $[40] = renderInput, $[41] = renderItem2, $[42] = renderPreview, $[43] = schemaType, $[44] = validation2, $[45] = t7) : t7 = $[45], t7;
|
|
42712
42288
|
}
|
|
42713
42289
|
function FormBuilder(props2) {
|
|
42714
|
-
const $ = c(
|
|
42290
|
+
const $ = c(113), {
|
|
42715
42291
|
__internal_fieldActions: fieldActions,
|
|
42716
42292
|
__internal_patchChannel: patchChannel,
|
|
42717
42293
|
autoFocus,
|
|
@@ -42739,7 +42315,7 @@ function FormBuilder(props2) {
|
|
|
42739
42315
|
validation: validation2,
|
|
42740
42316
|
value,
|
|
42741
42317
|
compareValue
|
|
42742
|
-
} = props2, openPath = t0 === void 0 ? EMPTY_ARRAY$
|
|
42318
|
+
} = props2, openPath = t0 === void 0 ? EMPTY_ARRAY$z : t0;
|
|
42743
42319
|
let t1;
|
|
42744
42320
|
$[0] !== onSetPathCollapsed ? (t1 = (fieldName) => onSetPathCollapsed([fieldName], !0), $[0] = onSetPathCollapsed, $[1] = t1) : t1 = $[1];
|
|
42745
42321
|
const handleCollapseField = t1;
|
|
@@ -42747,16 +42323,16 @@ function FormBuilder(props2) {
|
|
|
42747
42323
|
$[2] !== onSetPathCollapsed ? (t2 = (fieldName_0) => onSetPathCollapsed([fieldName_0], !1), $[2] = onSetPathCollapsed, $[3] = t2) : t2 = $[3];
|
|
42748
42324
|
const handleExpandField = t2;
|
|
42749
42325
|
let t3;
|
|
42750
|
-
$[4] !== onPathBlur ? (t3 = () => onPathBlur(EMPTY_ARRAY$
|
|
42326
|
+
$[4] !== onPathBlur ? (t3 = () => onPathBlur(EMPTY_ARRAY$z), $[4] = onPathBlur, $[5] = t3) : t3 = $[5];
|
|
42751
42327
|
const handleBlur = t3;
|
|
42752
42328
|
let t4;
|
|
42753
|
-
$[6] !== onPathFocus ? (t4 = () => onPathFocus(EMPTY_ARRAY$
|
|
42329
|
+
$[6] !== onPathFocus ? (t4 = () => onPathFocus(EMPTY_ARRAY$z), $[6] = onPathFocus, $[7] = t4) : t4 = $[7];
|
|
42754
42330
|
const handleFocus = t4;
|
|
42755
42331
|
let t5;
|
|
42756
42332
|
$[8] !== onChange ? (t5 = (patch2) => onChange(PatchEvent.from(patch2)), $[8] = onChange, $[9] = t5) : t5 = $[9];
|
|
42757
42333
|
const handleChange = t5, focusRef = useRef(null);
|
|
42758
42334
|
let t6;
|
|
42759
|
-
$[10] !== onFieldGroupSelect ? (t6 = (groupName) => onFieldGroupSelect(EMPTY_ARRAY$
|
|
42335
|
+
$[10] !== onFieldGroupSelect ? (t6 = (groupName) => onFieldGroupSelect(EMPTY_ARRAY$z, groupName), $[10] = onFieldGroupSelect, $[11] = t6) : t6 = $[11];
|
|
42760
42336
|
const handleSelectFieldGroup = t6;
|
|
42761
42337
|
let t7;
|
|
42762
42338
|
$[12] !== onPathOpen ? (t7 = (fieldName_1) => onPathOpen([fieldName_1]), $[12] = onPathOpen, $[13] = t7) : t7 = $[13];
|
|
@@ -42829,8 +42405,8 @@ function FormBuilder(props2) {
|
|
|
42829
42405
|
onPathFocus,
|
|
42830
42406
|
onFieldOpen: handleOpenField,
|
|
42831
42407
|
onFieldGroupSelect: handleSelectFieldGroup,
|
|
42832
|
-
path: EMPTY_ARRAY$
|
|
42833
|
-
presence: EMPTY_ARRAY$
|
|
42408
|
+
path: EMPTY_ARRAY$z,
|
|
42409
|
+
presence: EMPTY_ARRAY$z,
|
|
42834
42410
|
readOnly,
|
|
42835
42411
|
renderAnnotation,
|
|
42836
42412
|
renderBlock: renderBlock2,
|
|
@@ -42840,7 +42416,7 @@ function FormBuilder(props2) {
|
|
|
42840
42416
|
renderItem: renderItem2,
|
|
42841
42417
|
renderPreview,
|
|
42842
42418
|
schemaType,
|
|
42843
|
-
validation: EMPTY_ARRAY$
|
|
42419
|
+
validation: EMPTY_ARRAY$z,
|
|
42844
42420
|
value,
|
|
42845
42421
|
compareValue,
|
|
42846
42422
|
__unstable_computeDiff: t20,
|
|
@@ -42848,40 +42424,27 @@ function FormBuilder(props2) {
|
|
|
42848
42424
|
displayInlineChanges: !1,
|
|
42849
42425
|
hasUpstreamVersion: diffProps.hasUpstreamVersion
|
|
42850
42426
|
}, $[46] = compareValue, $[47] = diffProps.__unstable_computeDiff, $[48] = diffProps.hasUpstreamVersion, $[49] = focusPath, $[50] = focused, $[51] = groups, $[52] = handleChange, $[53] = handleCloseField, $[54] = handleCollapseField, $[55] = handleCollapseFieldSet, $[56] = handleExpandField, $[57] = handleExpandFieldSet, $[58] = handleOpenField, $[59] = handleSelectFieldGroup, $[60] = id2, $[61] = members, $[62] = onPathFocus, $[63] = readOnly, $[64] = renderAnnotation, $[65] = renderBlock2, $[66] = renderField, $[67] = renderInlineBlock, $[68] = renderInput, $[69] = renderItem2, $[70] = renderPreview, $[71] = schemaType, $[72] = t19, $[73] = t21, $[74] = value, $[75] = t22) : t22 = $[75];
|
|
42851
|
-
const rootInputProps = t22
|
|
42427
|
+
const rootInputProps = t22;
|
|
42428
|
+
let t23;
|
|
42429
|
+
$[76] !== onPathOpen || $[77] !== openPath || $[78] !== renderInput || $[79] !== rootInputProps ? (t23 = /* @__PURE__ */ jsx(FullscreenPTEProvider, { children: /* @__PURE__ */ jsx(DialogStackProvider, { children: /* @__PURE__ */ jsx(EnhancedObjectDialogProvider, { children: /* @__PURE__ */ jsx(RootInput, { rootInputProps, onPathOpen, openPath, renderInput }) }) }) }), $[76] = onPathOpen, $[77] = openPath, $[78] = renderInput, $[79] = rootInputProps, $[80] = t23) : t23 = $[80];
|
|
42852
42430
|
let t24;
|
|
42853
|
-
$[
|
|
42431
|
+
$[81] !== fieldActions || $[82] !== t23 ? (t24 = /* @__PURE__ */ jsx(DocumentFieldActionsProvider, { actions: fieldActions, children: t23 }), $[81] = fieldActions, $[82] = t23, $[83] = t24) : t24 = $[83];
|
|
42854
42432
|
let t25;
|
|
42855
|
-
$[
|
|
42433
|
+
$[84] !== t24 || $[85] !== value ? (t25 = /* @__PURE__ */ jsx(FormValueProvider, { value, children: t24 }), $[84] = t24, $[85] = value, $[86] = t25) : t25 = $[86];
|
|
42856
42434
|
let t26;
|
|
42857
|
-
$[
|
|
42435
|
+
$[87] !== t25 || $[88] !== value ? (t26 = /* @__PURE__ */ jsx(GetFormValueProvider, { value, children: t25 }), $[87] = t25, $[88] = value, $[89] = t26) : t26 = $[89];
|
|
42858
42436
|
let t27;
|
|
42859
|
-
$[
|
|
42860
|
-
let t28;
|
|
42861
|
-
$[90] !== t27 || $[91] !== value ? (t28 = /* @__PURE__ */ jsx(GetFormValueProvider, { value, children: t27 }), $[90] = t27, $[91] = value, $[92] = t28) : t28 = $[92];
|
|
42862
|
-
let t29;
|
|
42863
|
-
return $[93] !== autoFocus || $[94] !== changesOpen || $[95] !== collapsedFieldSets || $[96] !== collapsedPaths || $[97] !== fieldActions || $[98] !== focusPath || $[99] !== focused || $[100] !== groups || $[101] !== id2 || $[102] !== onChange || $[103] !== onFieldGroupSelect || $[104] !== onPathBlur || $[105] !== onPathFocus || $[106] !== onPathOpen || $[107] !== onSetFieldSetCollapsed || $[108] !== onSetPathCollapsed || $[109] !== patchChannel || $[110] !== presence || $[111] !== readOnly || $[112] !== schemaType || $[113] !== t28 || $[114] !== validation2 ? (t29 = /* @__PURE__ */ jsx(FormProvider, { __internal_fieldActions: fieldActions, __internal_patchChannel: patchChannel, autoFocus, changesOpen, collapsedFieldSets, collapsedPaths, focusPath, focused, groups, id: id2, onChange, onPathBlur, onPathFocus, onPathOpen, onFieldGroupSelect, onSetPathCollapsed, onSetFieldSetCollapsed, presence, validation: validation2, readOnly, schemaType, children: t28 }), $[93] = autoFocus, $[94] = changesOpen, $[95] = collapsedFieldSets, $[96] = collapsedPaths, $[97] = fieldActions, $[98] = focusPath, $[99] = focused, $[100] = groups, $[101] = id2, $[102] = onChange, $[103] = onFieldGroupSelect, $[104] = onPathBlur, $[105] = onPathFocus, $[106] = onPathOpen, $[107] = onSetFieldSetCollapsed, $[108] = onSetPathCollapsed, $[109] = patchChannel, $[110] = presence, $[111] = readOnly, $[112] = schemaType, $[113] = t28, $[114] = validation2, $[115] = t29) : t29 = $[115], t29;
|
|
42437
|
+
return $[90] !== autoFocus || $[91] !== changesOpen || $[92] !== collapsedFieldSets || $[93] !== collapsedPaths || $[94] !== fieldActions || $[95] !== focusPath || $[96] !== focused || $[97] !== groups || $[98] !== id2 || $[99] !== onChange || $[100] !== onFieldGroupSelect || $[101] !== onPathBlur || $[102] !== onPathFocus || $[103] !== onPathOpen || $[104] !== onSetFieldSetCollapsed || $[105] !== onSetPathCollapsed || $[106] !== patchChannel || $[107] !== presence || $[108] !== readOnly || $[109] !== schemaType || $[110] !== t26 || $[111] !== validation2 ? (t27 = /* @__PURE__ */ jsx(FormProvider, { __internal_fieldActions: fieldActions, __internal_patchChannel: patchChannel, autoFocus, changesOpen, collapsedFieldSets, collapsedPaths, focusPath, focused, groups, id: id2, onChange, onPathBlur, onPathFocus, onPathOpen, onFieldGroupSelect, onSetPathCollapsed, onSetFieldSetCollapsed, presence, validation: validation2, readOnly, schemaType, children: t26 }), $[90] = autoFocus, $[91] = changesOpen, $[92] = collapsedFieldSets, $[93] = collapsedPaths, $[94] = fieldActions, $[95] = focusPath, $[96] = focused, $[97] = groups, $[98] = id2, $[99] = onChange, $[100] = onFieldGroupSelect, $[101] = onPathBlur, $[102] = onPathFocus, $[103] = onPathOpen, $[104] = onSetFieldSetCollapsed, $[105] = onSetPathCollapsed, $[106] = patchChannel, $[107] = presence, $[108] = readOnly, $[109] = schemaType, $[110] = t26, $[111] = validation2, $[112] = t27) : t27 = $[112], t27;
|
|
42864
42438
|
}
|
|
42865
42439
|
function _temp$2i(m) {
|
|
42866
42440
|
return m.kind === "field" && m.field.changed;
|
|
42867
42441
|
}
|
|
42868
42442
|
function RootInput(props2) {
|
|
42869
|
-
const
|
|
42443
|
+
const {
|
|
42870
42444
|
rootInputProps,
|
|
42871
|
-
onPathOpen,
|
|
42872
|
-
openPath,
|
|
42873
42445
|
renderInput
|
|
42874
|
-
} = props2
|
|
42875
|
-
|
|
42876
|
-
} = useEnhancedObjectDialog();
|
|
42877
|
-
let t0;
|
|
42878
|
-
$[0] !== enhancedObjectDialogEnabled || $[1] !== onPathOpen || $[2] !== openPath || $[3] !== rootInputProps ? (t0 = enhancedObjectDialogEnabled && /* @__PURE__ */ jsx(EnhancedObjectDialog, { onPathFocus: rootInputProps.onPathFocus, onPathOpen, openPath, rootInputProps, schemaType: rootInputProps.schemaType }), $[0] = enhancedObjectDialogEnabled, $[1] = onPathOpen, $[2] = openPath, $[3] = rootInputProps, $[4] = t0) : t0 = $[4];
|
|
42879
|
-
const arrayEditingModal = t0;
|
|
42880
|
-
let t1;
|
|
42881
|
-
return $[5] !== arrayEditingModal || $[6] !== renderInput || $[7] !== rootInputProps ? (t1 = renderInput({
|
|
42882
|
-
...rootInputProps,
|
|
42883
|
-
__internal_enhancedbjectDialog: arrayEditingModal
|
|
42884
|
-
}), $[5] = arrayEditingModal, $[6] = renderInput, $[7] = rootInputProps, $[8] = t1) : t1 = $[8], t1;
|
|
42446
|
+
} = props2;
|
|
42447
|
+
return renderInput(rootInputProps);
|
|
42885
42448
|
}
|
|
42886
42449
|
const Root$e = styled(Card)((props2) => {
|
|
42887
42450
|
const {
|
|
@@ -43080,7 +42643,7 @@ function BlockObjectActionsMenu(props2) {
|
|
|
43080
42643
|
] }), $[39] = t14, $[40] = t5, $[41] = t15) : t15 = $[41], t15;
|
|
43081
42644
|
}
|
|
43082
42645
|
function BlockObject(props2) {
|
|
43083
|
-
const $ = c(
|
|
42646
|
+
const $ = c(98), {
|
|
43084
42647
|
floatingBoundary,
|
|
43085
42648
|
focused,
|
|
43086
42649
|
isFullscreen,
|
|
@@ -43114,10 +42677,7 @@ function BlockObject(props2) {
|
|
|
43114
42677
|
const changeHovered = t0, markers = usePortableTextMarkers(path), editor2 = usePortableTextEditor(), [divElement, setDivElement] = useState(null);
|
|
43115
42678
|
let t1;
|
|
43116
42679
|
$[3] !== path ? (t1 = pathToString$1(path), $[3] = path, $[4] = t1) : t1 = $[4];
|
|
43117
|
-
const memberItem = usePortableTextMemberItem(t1), isDeleting = useRef(!1)
|
|
43118
|
-
enabled: nestedObjectNavigationEnabled,
|
|
43119
|
-
isDialogAvailable
|
|
43120
|
-
} = useEnhancedObjectDialog(), shouldUseEnhancedDialog = nestedObjectNavigationEnabled && isDialogAvailable;
|
|
42680
|
+
const memberItem = usePortableTextMemberItem(t1), isDeleting = useRef(!1);
|
|
43121
42681
|
let t2;
|
|
43122
42682
|
$[5] !== relativePath ? (t2 = {
|
|
43123
42683
|
anchor: {
|
|
@@ -43203,9 +42763,9 @@ function BlockObject(props2) {
|
|
|
43203
42763
|
const rootPresence = t9, tooltipEnabled = hasError || hasWarning || hasInfo || hasMarkers;
|
|
43204
42764
|
let t10;
|
|
43205
42765
|
$[30] !== Markers || $[31] !== markers || $[32] !== renderCustomMarkers || $[33] !== tooltipEnabled || $[34] !== validation2 ? (t10 = tooltipEnabled && /* @__PURE__ */ jsx(TooltipBox, { children: /* @__PURE__ */ jsx(Markers, { markers, validation: validation2, renderCustomMarkers }) }) || null, $[30] = Markers, $[31] = markers, $[32] = renderCustomMarkers, $[33] = tooltipEnabled, $[34] = validation2, $[35] = t10) : t10 = $[35];
|
|
43206
|
-
const toolTipContent = t10, isOpen = !!memberItem?.member.open, input = memberItem?.input, nodePath = memberItem?.node.path || EMPTY_ARRAY$
|
|
42766
|
+
const toolTipContent = t10, isOpen = !!memberItem?.member.open, input = memberItem?.input, nodePath = memberItem?.node.path || EMPTY_ARRAY$z, referenceElement = divElement, t11 = !!readOnly;
|
|
43207
42767
|
let t12;
|
|
43208
|
-
$[36] !== floatingBoundary || $[37] !== focused || $[38] !== input || $[39] !== isOpen || $[40] !== markers || $[41] !== nodePath || $[42] !== onClose || $[43] !== onOpen || $[44] !== onPathFocus || $[45] !== onRemove || $[46] !== parentSchemaType || $[47] !== referenceBoundary || $[48] !== referenceElement || $[49] !== renderAnnotation || $[50] !== renderBlock2 || $[51] !== renderField || $[52] !== renderInlineBlock || $[53] !== renderInput || $[54] !== renderItem2 || $[55] !== renderPreview || $[56] !== rootPresence || $[57] !== schemaType || $[58] !== selected || $[59] !==
|
|
42768
|
+
$[36] !== floatingBoundary || $[37] !== focused || $[38] !== input || $[39] !== isOpen || $[40] !== markers || $[41] !== nodePath || $[42] !== onClose || $[43] !== onOpen || $[44] !== onPathFocus || $[45] !== onRemove || $[46] !== parentSchemaType || $[47] !== referenceBoundary || $[48] !== referenceElement || $[49] !== renderAnnotation || $[50] !== renderBlock2 || $[51] !== renderField || $[52] !== renderInlineBlock || $[53] !== renderInput || $[54] !== renderItem2 || $[55] !== renderPreview || $[56] !== rootPresence || $[57] !== schemaType || $[58] !== selected || $[59] !== t11 || $[60] !== validation2 || $[61] !== value ? (t12 = {
|
|
43209
42769
|
__unstable_floatingBoundary: floatingBoundary,
|
|
43210
42770
|
__unstable_referenceBoundary: referenceBoundary,
|
|
43211
42771
|
__unstable_referenceElement: referenceElement,
|
|
@@ -43224,7 +42784,6 @@ function BlockObject(props2) {
|
|
|
43224
42784
|
renderAnnotation,
|
|
43225
42785
|
renderBlock: renderBlock2,
|
|
43226
42786
|
renderDefault: DefaultBlockObjectComponent,
|
|
43227
|
-
shouldUseEnhancedDialog,
|
|
43228
42787
|
renderField,
|
|
43229
42788
|
renderInlineBlock,
|
|
43230
42789
|
renderInput,
|
|
@@ -43234,40 +42793,40 @@ function BlockObject(props2) {
|
|
|
43234
42793
|
selected,
|
|
43235
42794
|
validation: validation2,
|
|
43236
42795
|
value
|
|
43237
|
-
}, $[36] = floatingBoundary, $[37] = focused, $[38] = input, $[39] = isOpen, $[40] = markers, $[41] = nodePath, $[42] = onClose, $[43] = onOpen, $[44] = onPathFocus, $[45] = onRemove, $[46] = parentSchemaType, $[47] = referenceBoundary, $[48] = referenceElement, $[49] = renderAnnotation, $[50] = renderBlock2, $[51] = renderField, $[52] = renderInlineBlock, $[53] = renderInput, $[54] = renderItem2, $[55] = renderPreview, $[56] = rootPresence, $[57] = schemaType, $[58] = selected, $[59] =
|
|
42796
|
+
}, $[36] = floatingBoundary, $[37] = focused, $[38] = input, $[39] = isOpen, $[40] = markers, $[41] = nodePath, $[42] = onClose, $[43] = onOpen, $[44] = onPathFocus, $[45] = onRemove, $[46] = parentSchemaType, $[47] = referenceBoundary, $[48] = referenceElement, $[49] = renderAnnotation, $[50] = renderBlock2, $[51] = renderField, $[52] = renderInlineBlock, $[53] = renderInput, $[54] = renderItem2, $[55] = renderPreview, $[56] = rootPresence, $[57] = schemaType, $[58] = selected, $[59] = t11, $[60] = validation2, $[61] = value, $[62] = t12) : t12 = $[62];
|
|
43238
42797
|
const componentProps = t12, blockActionsEnabled = renderBlockActions && value && !readOnly, changeIndicatorVisible = isFullscreen && memberItem;
|
|
43239
42798
|
let t13;
|
|
43240
|
-
$[
|
|
42799
|
+
$[63] !== memberItem || $[64] !== setElementRef ? (t13 = (elm) => {
|
|
43241
42800
|
memberItem && setElementRef({
|
|
43242
42801
|
key: memberItem.member.key,
|
|
43243
42802
|
elementRef: elm
|
|
43244
42803
|
}), setDivElement(elm);
|
|
43245
|
-
}, $[
|
|
42804
|
+
}, $[63] = memberItem, $[64] = setElementRef, $[65] = t13) : t13 = $[65];
|
|
43246
42805
|
const setRef = t13;
|
|
43247
42806
|
let t14;
|
|
43248
|
-
$[
|
|
42807
|
+
$[66] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t14 = void 0, $[66] = t14) : t14 = $[66];
|
|
43249
42808
|
const t15 = isOpen ? !0 : !tooltipEnabled;
|
|
43250
42809
|
let t16;
|
|
43251
|
-
$[
|
|
42810
|
+
$[67] !== componentProps || $[68] !== renderBlock2 ? (t16 = renderBlock2 && /* @__PURE__ */ jsx(RenderBlock, { ...componentProps, renderBlock: renderBlock2 }), $[67] = componentProps, $[68] = renderBlock2, $[69] = t16) : t16 = $[69];
|
|
43252
42811
|
let t17;
|
|
43253
|
-
$[
|
|
42812
|
+
$[70] !== t16 ? (t17 = /* @__PURE__ */ jsx("div", { children: t16 }), $[70] = t16, $[71] = t17) : t17 = $[71];
|
|
43254
42813
|
let t18;
|
|
43255
|
-
$[
|
|
42814
|
+
$[72] !== t15 || $[73] !== t17 || $[74] !== toolTipContent ? (t18 = /* @__PURE__ */ jsx(Box, { flex: 1, children: /* @__PURE__ */ jsx(Tooltip, { placement: "top", portal: "editor", disabled: t15, content: toolTipContent, children: t17 }) }), $[72] = t15, $[73] = t17, $[74] = toolTipContent, $[75] = t18) : t18 = $[75];
|
|
43256
42815
|
let t19;
|
|
43257
|
-
$[
|
|
42816
|
+
$[76] !== blockActionsEnabled || $[77] !== focused || $[78] !== onChange || $[79] !== renderBlockActions || $[80] !== value ? (t19 = blockActionsEnabled && /* @__PURE__ */ jsx(BlockActionsOuter, { contentEditable: !1, marginRight: 3, children: /* @__PURE__ */ jsx(BlockActionsInner, { children: focused && /* @__PURE__ */ jsx(BlockActions, { block: value, onChange, renderBlockActions }) }) }), $[76] = blockActionsEnabled, $[77] = focused, $[78] = onChange, $[79] = renderBlockActions, $[80] = value, $[81] = t19) : t19 = $[81];
|
|
43258
42817
|
let t20;
|
|
43259
|
-
$[
|
|
42818
|
+
$[82] !== changeIndicatorVisible || $[83] !== focused || $[84] !== memberItem ? (t20 = changeIndicatorVisible && /* @__PURE__ */ jsx(ChangeIndicatorWrapper, { $hasChanges: memberItem.member.item.changed, contentEditable: !1, children: /* @__PURE__ */ jsx(StyledChangeIndicatorWithProvidedFullPath, { hasFocus: focused, isChanged: memberItem.member.item.changed, path: memberItem.member.item.path, withHoverEffect: !1 }) }), $[82] = changeIndicatorVisible, $[83] = focused, $[84] = memberItem, $[85] = t20) : t20 = $[85];
|
|
43260
42819
|
let t21;
|
|
43261
|
-
$[
|
|
42820
|
+
$[86] !== changeHovered || $[87] !== isFullscreen ? (t21 = changeHovered && /* @__PURE__ */ jsx(ReviewChangesHighlightBlock, { $fullScreen: !!isFullscreen }), $[86] = changeHovered, $[87] = isFullscreen, $[88] = t21) : t21 = $[88];
|
|
43262
42821
|
let t22;
|
|
43263
|
-
$[
|
|
42822
|
+
$[89] !== innerPaddingProps || $[90] !== t18 || $[91] !== t19 || $[92] !== t20 || $[93] !== t21 ? (t22 = /* @__PURE__ */ jsx(Flex, { paddingBottom: 1, marginY: 3, style: t14, children: /* @__PURE__ */ jsxs(PreviewContainer, { ...innerPaddingProps, children: [
|
|
43264
42823
|
t18,
|
|
43265
42824
|
t19,
|
|
43266
42825
|
t20,
|
|
43267
42826
|
t21
|
|
43268
|
-
] }) }), $[
|
|
42827
|
+
] }) }), $[89] = innerPaddingProps, $[90] = t18, $[91] = t19, $[92] = t20, $[93] = t21, $[94] = t22) : t22 = $[94];
|
|
43269
42828
|
let t23;
|
|
43270
|
-
return $[
|
|
42829
|
+
return $[95] !== setRef || $[96] !== t22 ? (t23 = /* @__PURE__ */ jsx(Box, { ref: setRef, contentEditable: !1, children: t22 }), $[95] = setRef, $[96] = t22, $[97] = t23) : t23 = $[97], t23;
|
|
43271
42830
|
}
|
|
43272
42831
|
function RenderBlock(props2) {
|
|
43273
42832
|
const {
|
|
@@ -43277,12 +42836,11 @@ function RenderBlock(props2) {
|
|
|
43277
42836
|
return renderBlock2(componentProps);
|
|
43278
42837
|
}
|
|
43279
42838
|
const DefaultBlockObjectComponent = (props2) => {
|
|
43280
|
-
const $ = c(
|
|
42839
|
+
const $ = c(42), {
|
|
43281
42840
|
__unstable_floatingBoundary,
|
|
43282
42841
|
__unstable_referenceBoundary,
|
|
43283
42842
|
__unstable_referenceElement,
|
|
43284
42843
|
children,
|
|
43285
|
-
shouldUseEnhancedDialog,
|
|
43286
42844
|
focused,
|
|
43287
42845
|
markers,
|
|
43288
42846
|
onClose,
|
|
@@ -43321,12 +42879,12 @@ const DefaultBlockObjectComponent = (props2) => {
|
|
|
43321
42879
|
let t13;
|
|
43322
42880
|
$[18] !== handleDoubleClickToOpen || $[19] !== t1 || $[20] !== t12 || $[21] !== t2 || $[22] !== t3 || $[23] !== t4 || $[24] !== t5 || $[25] !== t6 || $[26] !== t7 || $[27] !== t8 || $[28] !== t9 || $[29] !== tone ? (t13 = /* @__PURE__ */ jsx(Root$e, { "aria-label": t1, "data-focused": t2, "data-image-preview": t3, "data-invalid": t4, "data-markers": t5, "data-read-only": t6, "data-selected": t7, "data-testid": "pte-block-object", "data-warning": t8, flex: 1, onDoubleClick: handleDoubleClickToOpen, padding: t9, tone, children: t12 }), $[18] = handleDoubleClickToOpen, $[19] = t1, $[20] = t12, $[21] = t2, $[22] = t3, $[23] = t4, $[24] = t5, $[25] = t6, $[26] = t7, $[27] = t8, $[28] = t9, $[29] = tone, $[30] = t13) : t13 = $[30];
|
|
43323
42881
|
let t14;
|
|
43324
|
-
$[31] !== __unstable_floatingBoundary || $[32] !== __unstable_referenceBoundary || $[33] !== __unstable_referenceElement || $[34] !== children || $[35] !== onClose || $[36] !== open || $[37] !== schemaType
|
|
42882
|
+
$[31] !== __unstable_floatingBoundary || $[32] !== __unstable_referenceBoundary || $[33] !== __unstable_referenceElement || $[34] !== children || $[35] !== onClose || $[36] !== open || $[37] !== schemaType ? (t14 = open && /* @__PURE__ */ jsx(ObjectEditModal, { floatingBoundary: __unstable_floatingBoundary, defaultType: "dialog", onClose, autoFocus: !0, schemaType, referenceBoundary: __unstable_referenceBoundary, referenceElement: __unstable_referenceElement, children }), $[31] = __unstable_floatingBoundary, $[32] = __unstable_referenceBoundary, $[33] = __unstable_referenceElement, $[34] = children, $[35] = onClose, $[36] = open, $[37] = schemaType, $[38] = t14) : t14 = $[38];
|
|
43325
42883
|
let t15;
|
|
43326
|
-
return $[
|
|
42884
|
+
return $[39] !== t13 || $[40] !== t14 ? (t15 = /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
43327
42885
|
t13,
|
|
43328
42886
|
t14
|
|
43329
|
-
] }), $[
|
|
42887
|
+
] }), $[39] = t13, $[40] = t14, $[41] = t15) : t15 = $[41], t15;
|
|
43330
42888
|
};
|
|
43331
42889
|
function _temp$2h(v) {
|
|
43332
42890
|
return v.level === "error";
|
|
@@ -43363,9 +42921,9 @@ function useResolveDefaultComponent(props2) {
|
|
|
43363
42921
|
} = parentTypeProps.schemaType, ParentTypeResolvedComponent = componentResolver(restSchemaType);
|
|
43364
42922
|
return /* @__PURE__ */ jsx(ParentTypeResolvedComponent, { ...parentTypeProps });
|
|
43365
42923
|
}, $[3] = componentResolver, $[4] = t1) : t1 = $[4];
|
|
43366
|
-
const
|
|
42924
|
+
const renderDefault = t1;
|
|
43367
42925
|
let t2;
|
|
43368
|
-
return $[5] !== DefaultResolvedComponent || $[6] !== componentProps || $[7] !==
|
|
42926
|
+
return $[5] !== DefaultResolvedComponent || $[6] !== componentProps || $[7] !== renderDefault ? (t2 = /* @__PURE__ */ jsx(DefaultResolvedComponent, { ...componentProps, renderDefault }), $[5] = DefaultResolvedComponent, $[6] = componentProps, $[7] = renderDefault, $[8] = t2) : t2 = $[8], t2;
|
|
43369
42927
|
}
|
|
43370
42928
|
function DefaultInput(props2) {
|
|
43371
42929
|
const $ = c(2);
|
|
@@ -44349,7 +43907,7 @@ function useDocumentVersionInfo(documentId) {
|
|
|
44349
43907
|
}, DOCUMENT_STUB_PATHS).pipe(map(_temp2$V)),
|
|
44350
43908
|
published: documentPreviewStore.observePaths({
|
|
44351
43909
|
_id: publishedId
|
|
44352
|
-
}, DOCUMENT_STUB_PATHS).pipe(map(_temp3$
|
|
43910
|
+
}, DOCUMENT_STUB_PATHS).pipe(map(_temp3$s)),
|
|
44353
43911
|
versions: releaseVersions
|
|
44354
43912
|
}), $[7] = documentPreviewStore, $[8] = draftId, $[9] = publishedId, $[10] = releaseIds, $[11] = t3;
|
|
44355
43913
|
} else
|
|
@@ -44363,7 +43921,7 @@ function useDocumentVersionInfo(documentId) {
|
|
|
44363
43921
|
published: void 0
|
|
44364
43922
|
}, $[12] = t4) : t4 = $[12], useObservable(observable, t4);
|
|
44365
43923
|
}
|
|
44366
|
-
function _temp3$
|
|
43924
|
+
function _temp3$s(value_1) {
|
|
44367
43925
|
return exists(value_1) ? value_1 : void 0;
|
|
44368
43926
|
}
|
|
44369
43927
|
function _temp2$V(value_0) {
|
|
@@ -44844,7 +44402,7 @@ const Z_OFFSET$1 = {
|
|
|
44844
44402
|
type: "contentReleases"
|
|
44845
44403
|
}, RELEASE_FORM_STORAGE_KEY = "studio.release-form.recovery";
|
|
44846
44404
|
function useReleaseFormStorage() {
|
|
44847
|
-
const $ = c(1), getStoredReleaseData = _temp$2b, saveReleaseDataToStorage = _temp2$U, clearReleaseDataFromStorage = _temp3$
|
|
44405
|
+
const $ = c(1), getStoredReleaseData = _temp$2b, saveReleaseDataToStorage = _temp2$U, clearReleaseDataFromStorage = _temp3$r;
|
|
44848
44406
|
let t0;
|
|
44849
44407
|
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = {
|
|
44850
44408
|
getStoredReleaseData,
|
|
@@ -44852,7 +44410,7 @@ function useReleaseFormStorage() {
|
|
|
44852
44410
|
clearReleaseDataFromStorage
|
|
44853
44411
|
}, $[0] = t0) : t0 = $[0], t0;
|
|
44854
44412
|
}
|
|
44855
|
-
function _temp3$
|
|
44413
|
+
function _temp3$r() {
|
|
44856
44414
|
localStorage.removeItem(RELEASE_FORM_STORAGE_KEY);
|
|
44857
44415
|
}
|
|
44858
44416
|
function _temp2$U(data) {
|
|
@@ -45840,7 +45398,7 @@ const RELEASES_NAME = "sanity/releases", RELEASES_INTENT = "release", releases =
|
|
|
45840
45398
|
let t0;
|
|
45841
45399
|
return $[0] !== contextValue ? (t0 = contextValue || {
|
|
45842
45400
|
state: DEFAULT_METADATA_STATE,
|
|
45843
|
-
addReleaseIdsToListener: _temp3$
|
|
45401
|
+
addReleaseIdsToListener: _temp3$q,
|
|
45844
45402
|
removeReleaseIdsFromListener: _temp4$b
|
|
45845
45403
|
}, $[0] = contextValue, $[1] = t0) : t0 = $[1], t0;
|
|
45846
45404
|
};
|
|
@@ -45850,7 +45408,7 @@ function _temp$27(slug) {
|
|
|
45850
45408
|
function _temp2$S(releaseId) {
|
|
45851
45409
|
return typeof releaseId == "string";
|
|
45852
45410
|
}
|
|
45853
|
-
function _temp3$
|
|
45411
|
+
function _temp3$q() {
|
|
45854
45412
|
return null;
|
|
45855
45413
|
}
|
|
45856
45414
|
function _temp4$b() {
|
|
@@ -47697,7 +47255,7 @@ const useIsReleasesPlus = () => {
|
|
|
47697
47255
|
}
|
|
47698
47256
|
return observableClient.request({
|
|
47699
47257
|
url: `/data/history/${dataset}/documents/${docId_0}?revision=${revisionId}`
|
|
47700
|
-
}).pipe(map$1(_temp3$
|
|
47258
|
+
}).pipe(map$1(_temp3$p), catchError$1((err) => (console.error(`Error fetching document ${docId_0}:`, err), of(void 0))));
|
|
47701
47259
|
})) : of(void 0)), map$1(_temp5$7), catchError$1(_temp6$3)), $[5] = client, $[6] = dataset, $[7] = observableClient, $[8] = releaseDocuments, $[9] = transactionId, $[10] = t42;
|
|
47702
47260
|
} else
|
|
47703
47261
|
t42 = $[10];
|
|
@@ -47723,7 +47281,7 @@ function _temp$21(t0) {
|
|
|
47723
47281
|
function _temp2$P(document_0) {
|
|
47724
47282
|
return document_0._id;
|
|
47725
47283
|
}
|
|
47726
|
-
function _temp3$
|
|
47284
|
+
function _temp3$p(t0) {
|
|
47727
47285
|
const {
|
|
47728
47286
|
documents: t1
|
|
47729
47287
|
} = t0, [revertDocument] = t1;
|
|
@@ -47751,7 +47309,7 @@ const usePostPublishTransactions = (documents) => {
|
|
|
47751
47309
|
$[1] !== client || $[2] !== documents || $[3] !== transactionId ? (t1 = from(getTransactionsLogs(client, documents.map(_temp$20), {
|
|
47752
47310
|
fromTransaction: transactionId,
|
|
47753
47311
|
limit: 2
|
|
47754
|
-
})).pipe(map$1(_temp2$O), catchError$1(_temp3$
|
|
47312
|
+
})).pipe(map$1(_temp2$O), catchError$1(_temp3$o)), $[1] = client, $[2] = documents, $[3] = transactionId, $[4] = t1) : t1 = $[4], t0 = t1;
|
|
47755
47313
|
}
|
|
47756
47314
|
return useObservable(t0, null);
|
|
47757
47315
|
};
|
|
@@ -47764,7 +47322,7 @@ function _temp$20(t0) {
|
|
|
47764
47322
|
function _temp2$O(transactions) {
|
|
47765
47323
|
return transactions.length > 1;
|
|
47766
47324
|
}
|
|
47767
|
-
function _temp3$
|
|
47325
|
+
function _temp3$o() {
|
|
47768
47326
|
return of(null);
|
|
47769
47327
|
}
|
|
47770
47328
|
const ConfirmReleaseDialog = (t0) => {
|
|
@@ -47997,7 +47555,7 @@ const ReleaseScheduleButton = (t0) => {
|
|
|
47997
47555
|
isEqual$2(newRelease, release) || updateRelease(newRelease);
|
|
47998
47556
|
}
|
|
47999
47557
|
if (isScheduledDateInPast()) {
|
|
48000
|
-
setRerenderDialog(_temp3$
|
|
47558
|
+
setRerenderDialog(_temp3$n);
|
|
48001
47559
|
return;
|
|
48002
47560
|
}
|
|
48003
47561
|
const run = async () => {
|
|
@@ -48209,7 +47767,7 @@ function _temp2$N(t0) {
|
|
|
48209
47767
|
} = t0;
|
|
48210
47768
|
return validation_0.hasError;
|
|
48211
47769
|
}
|
|
48212
|
-
function _temp3$
|
|
47770
|
+
function _temp3$n(cur) {
|
|
48213
47771
|
return cur + 1;
|
|
48214
47772
|
}
|
|
48215
47773
|
const ReleaseUnscheduleButton = (t0) => {
|
|
@@ -50158,7 +49716,7 @@ function FilterTooltip(t0) {
|
|
|
50158
49716
|
const fieldDefinitionDocumentTypeTitles = fieldDefinition?.documentTypes ? fieldDefinition.documentTypes.map((d) => {
|
|
50159
49717
|
const defType = schema2.get(d);
|
|
50160
49718
|
return defType?.title || startCase(defType?.name);
|
|
50161
|
-
}).filter(isNonNullable$3).sort() : EMPTY_ARRAY$
|
|
49719
|
+
}).filter(isNonNullable$3).sort() : EMPTY_ARRAY$z;
|
|
50162
49720
|
if ($[16] !== fieldDefinition || $[17] !== schema2 || $[18] !== t) {
|
|
50163
49721
|
let fieldDefinitionDescription;
|
|
50164
49722
|
if (fieldDefinition?.documentTypes) {
|
|
@@ -54004,7 +53562,7 @@ function useGuardWithReleaseLimitUpsell() {
|
|
|
54004
53562
|
$[0] !== guardWithReleaseLimitUpsell ? (t0 = () => {
|
|
54005
53563
|
setIsPendingGuardResponse(!0);
|
|
54006
53564
|
const promise = new Promise((resolve) => {
|
|
54007
|
-
guardWithReleaseLimitUpsell(noop$
|
|
53565
|
+
guardWithReleaseLimitUpsell(noop$7, !1, (hasPassed) => {
|
|
54008
53566
|
resolve(hasPassed);
|
|
54009
53567
|
});
|
|
54010
53568
|
});
|
|
@@ -54426,7 +53984,7 @@ function ConfirmScheduledDraftsDialog(t0) {
|
|
|
54426
53984
|
$[2] !== t ? (t2 = confirmScheduledDraftsColumnDefs(t), $[2] = t, $[3] = t2) : t2 = $[3];
|
|
54427
53985
|
const columnDefs = t2;
|
|
54428
53986
|
let t3;
|
|
54429
|
-
$[4] !== activeScheduledDrafts ? (t3 = activeScheduledDrafts.some(_temp3$
|
|
53987
|
+
$[4] !== activeScheduledDrafts ? (t3 = activeScheduledDrafts.some(_temp3$m), $[4] = activeScheduledDrafts, $[5] = t3) : t3 = $[5];
|
|
54430
53988
|
const hasPastDates = t3;
|
|
54431
53989
|
let t4;
|
|
54432
53990
|
$[6] !== activeScheduledDrafts || $[7] !== onClose || $[8] !== scheduleActiveDrafts || $[9] !== t || $[10] !== toast ? (t4 = async () => {
|
|
@@ -54488,7 +54046,7 @@ function ConfirmScheduledDraftsDialog(t0) {
|
|
|
54488
54046
|
let t16;
|
|
54489
54047
|
return $[41] !== onClose || $[42] !== t15 || $[43] !== t5 || $[44] !== t7 ? (t16 = /* @__PURE__ */ jsx(Dialog, { id: "confirm-active-scheduled-drafts-dialog", header: t5, onClose, width: 2, padding: !1, footer: t7, children: t15 }), $[41] = onClose, $[42] = t15, $[43] = t5, $[44] = t7, $[45] = t16) : t16 = $[45], t16;
|
|
54490
54048
|
}
|
|
54491
|
-
function _temp3$
|
|
54049
|
+
function _temp3$m(release_0) {
|
|
54492
54050
|
return release_0.metadata.intendedPublishAt && isPast(new Date(release_0.metadata.intendedPublishAt));
|
|
54493
54051
|
}
|
|
54494
54052
|
function _temp2$G(release) {
|
|
@@ -56211,7 +55769,7 @@ function ReleasesOverview() {
|
|
|
56211
55769
|
let t38;
|
|
56212
55770
|
bb2: {
|
|
56213
55771
|
let t392;
|
|
56214
|
-
$[95] !== cardinalityView ? (t392 = (items) => cardinalityView === "drafts" ? items.filter(_temp3$
|
|
55772
|
+
$[95] !== cardinalityView ? (t392 = (items) => cardinalityView === "drafts" ? items.filter(_temp3$l) : items, $[95] = cardinalityView, $[96] = t392) : t392 = $[96];
|
|
56215
55773
|
const filterActiveIfNeeded = t392;
|
|
56216
55774
|
if (!releaseFilterDate) {
|
|
56217
55775
|
const t403 = releaseGroupMode === "active" ? tableReleases : archivedReleases;
|
|
@@ -56338,7 +55896,7 @@ function ReleasesOverview() {
|
|
|
56338
55896
|
t64
|
|
56339
55897
|
] }), $[201] = t63, $[202] = t64, $[203] = t65) : t65 = $[203], t65;
|
|
56340
55898
|
}
|
|
56341
|
-
function _temp3$
|
|
55899
|
+
function _temp3$l(release_3) {
|
|
56342
55900
|
return release_3.state !== "active";
|
|
56343
55901
|
}
|
|
56344
55902
|
function _temp2$F(release_0) {
|
|
@@ -57416,11 +56974,11 @@ function PresenceScope(props2) {
|
|
|
57416
56974
|
let t1;
|
|
57417
56975
|
return $[4] !== childPresence || $[5] !== children ? (t1 = /* @__PURE__ */ jsx(FormFieldPresenceContext.Provider, { value: childPresence, children }), $[4] = childPresence, $[5] = children, $[6] = t1) : t1 = $[6], t1;
|
|
57418
56976
|
}
|
|
57419
|
-
const PRESENCE_MARGINS = [0, 0, 1, 0];
|
|
57420
|
-
function onDragEnter(event) {
|
|
56977
|
+
const PRESENCE_MARGINS$1 = [0, 0, 1, 0];
|
|
56978
|
+
function onDragEnter$1(event) {
|
|
57421
56979
|
return event.stopPropagation();
|
|
57422
56980
|
}
|
|
57423
|
-
function onDrop(event) {
|
|
56981
|
+
function onDrop$1(event) {
|
|
57424
56982
|
return event.stopPropagation();
|
|
57425
56983
|
}
|
|
57426
56984
|
function EditPortal(props2) {
|
|
@@ -57432,12 +56990,12 @@ function EditPortal(props2) {
|
|
|
57432
56990
|
width
|
|
57433
56991
|
} = props2, [documentScrollElement, setDocumentScrollElement] = useState(null), containerElement = useRef(null);
|
|
57434
56992
|
let t0;
|
|
57435
|
-
$[0] !== children ? (t0 = /* @__PURE__ */ jsx(PresenceOverlay, { margins: PRESENCE_MARGINS, children: /* @__PURE__ */ jsx(Box, { ref: containerElement, children }) }), $[0] = children, $[1] = t0) : t0 = $[1];
|
|
56993
|
+
$[0] !== children ? (t0 = /* @__PURE__ */ jsx(PresenceOverlay, { margins: PRESENCE_MARGINS$1, children: /* @__PURE__ */ jsx(Box, { ref: containerElement, children }) }), $[0] = children, $[1] = t0) : t0 = $[1];
|
|
57436
56994
|
const contents = t0;
|
|
57437
56995
|
if (type === "dialog") {
|
|
57438
56996
|
const t12 = props2.id || "";
|
|
57439
56997
|
let t22;
|
|
57440
|
-
$[2] !== contents || $[3] !== header || $[4] !== onClose || $[5] !== props2.autofocus || $[6] !== t12 || $[7] !== width ? (t22 = /* @__PURE__ */ jsx(Dialog, { __unstable_autoFocus: props2.autofocus, contentRef: setDocumentScrollElement, "data-testid": "edit-portal-dialog", header, id: t12, onClickOutside: onClose, onClose, onDragEnter, onDrop, width, children: contents }), $[2] = contents, $[3] = header, $[4] = onClose, $[5] = props2.autofocus, $[6] = t12, $[7] = width, $[8] = t22) : t22 = $[8];
|
|
56998
|
+
$[2] !== contents || $[3] !== header || $[4] !== onClose || $[5] !== props2.autofocus || $[6] !== t12 || $[7] !== width ? (t22 = /* @__PURE__ */ jsx(Dialog, { __unstable_autoFocus: props2.autofocus, contentRef: setDocumentScrollElement, "data-testid": "edit-portal-dialog", header, id: t12, onClickOutside: onClose, onClose, onDragEnter: onDragEnter$1, onDrop: onDrop$1, width, children: contents }), $[2] = contents, $[3] = header, $[4] = onClose, $[5] = props2.autofocus, $[6] = t12, $[7] = width, $[8] = t22) : t22 = $[8];
|
|
57441
56999
|
let t3;
|
|
57442
57000
|
return $[9] !== documentScrollElement || $[10] !== t22 ? (t3 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t22 }), $[9] = documentScrollElement, $[10] = t22, $[11] = t3) : t3 = $[11], t3;
|
|
57443
57001
|
}
|
|
@@ -57446,6 +57004,487 @@ function EditPortal(props2) {
|
|
|
57446
57004
|
let t2;
|
|
57447
57005
|
return $[15] !== header || $[16] !== onClose || $[17] !== props2.legacy_referenceElement || $[18] !== t1 || $[19] !== width ? (t2 = /* @__PURE__ */ jsx(PopoverDialog, { header, onClose, referenceElement: props2.legacy_referenceElement, width, containerRef: setDocumentScrollElement, children: t1 }), $[15] = header, $[16] = onClose, $[17] = props2.legacy_referenceElement, $[18] = t1, $[19] = width, $[20] = t2) : t2 = $[20], t2;
|
|
57448
57006
|
}
|
|
57007
|
+
const noop$1 = () => {
|
|
57008
|
+
};
|
|
57009
|
+
function useDialogStack(t0) {
|
|
57010
|
+
const $ = c(21);
|
|
57011
|
+
let t1;
|
|
57012
|
+
$[0] !== t0 ? (t1 = t0 === void 0 ? {} : t0, $[0] = t0, $[1] = t1) : t1 = $[1];
|
|
57013
|
+
const {
|
|
57014
|
+
path
|
|
57015
|
+
} = t1, context = useContext(DialogStackContext), id2 = useId(), hasRegistered = useRef(!1), push = context?.push, remove2 = context?.remove, update = context?.update;
|
|
57016
|
+
let t2, t3;
|
|
57017
|
+
$[2] !== id2 || $[3] !== path || $[4] !== push || $[5] !== remove2 ? (t2 = () => {
|
|
57018
|
+
if (!(!push || !remove2))
|
|
57019
|
+
return hasRegistered.current = !0, push(id2, path), () => {
|
|
57020
|
+
hasRegistered.current = !1, remove2(id2);
|
|
57021
|
+
};
|
|
57022
|
+
}, t3 = [push, remove2, id2, path], $[2] = id2, $[3] = path, $[4] = push, $[5] = remove2, $[6] = t2, $[7] = t3) : (t2 = $[6], t3 = $[7]), useEffect(t2, t3);
|
|
57023
|
+
let t4, t5;
|
|
57024
|
+
$[8] !== id2 || $[9] !== path || $[10] !== update ? (t4 = () => {
|
|
57025
|
+
update && hasRegistered.current && update(id2, path);
|
|
57026
|
+
}, t5 = [update, id2, path], $[8] = id2, $[9] = path, $[10] = update, $[11] = t4, $[12] = t5) : (t4 = $[11], t5 = $[12]), useEffect(t4, t5);
|
|
57027
|
+
let t6;
|
|
57028
|
+
$[13] !== context?.stack ? (t6 = context?.stack ?? [], $[13] = context?.stack, $[14] = t6) : t6 = $[14];
|
|
57029
|
+
const stack = t6, topEntry = stack.length > 0 ? stack[stack.length - 1] : null, isTop = context ? topEntry?.id === id2 : !0, close = context?.close ?? noop$1;
|
|
57030
|
+
let t7;
|
|
57031
|
+
return $[15] !== close || $[16] !== id2 || $[17] !== isTop || $[18] !== stack || $[19] !== topEntry ? (t7 = {
|
|
57032
|
+
dialogId: id2,
|
|
57033
|
+
topEntry,
|
|
57034
|
+
stack,
|
|
57035
|
+
isTop,
|
|
57036
|
+
close
|
|
57037
|
+
}, $[15] = close, $[16] = id2, $[17] = isTop, $[18] = stack, $[19] = topEntry, $[20] = t7) : t7 = $[20], t7;
|
|
57038
|
+
}
|
|
57039
|
+
function getSchemaField$1(schemaType, fieldPath) {
|
|
57040
|
+
if (!fieldPath) return;
|
|
57041
|
+
const paths = fromString(fieldPath), firstPath = paths[0];
|
|
57042
|
+
if (firstPath && isObjectSchemaType(schemaType)) {
|
|
57043
|
+
const field = schemaType?.fields?.find((f) => f.name === firstPath);
|
|
57044
|
+
if (field) {
|
|
57045
|
+
const nextPath = toString(paths.slice(1));
|
|
57046
|
+
return nextPath ? getSchemaField$1(field.type, nextPath) : field;
|
|
57047
|
+
}
|
|
57048
|
+
}
|
|
57049
|
+
}
|
|
57050
|
+
function resolveSchemaTypeForPath(baseType, path, documentValue) {
|
|
57051
|
+
if (!baseType) return;
|
|
57052
|
+
let currentField = baseType;
|
|
57053
|
+
return path.forEach((segment, index) => {
|
|
57054
|
+
const nextPath = path.slice(0, index + 1);
|
|
57055
|
+
if (isKeySegment(segment) || isIndexSegment(segment)) {
|
|
57056
|
+
const arraySchemaType = currentField, itemValue = getValueAtPath(documentValue, nextPath), item = getItemType(arraySchemaType, itemValue);
|
|
57057
|
+
if (item) {
|
|
57058
|
+
currentField = item;
|
|
57059
|
+
return;
|
|
57060
|
+
}
|
|
57061
|
+
}
|
|
57062
|
+
const nextField = getSchemaField$1(currentField, toString(nextPath.length > 1 ? nextPath.slice(-1) : nextPath));
|
|
57063
|
+
nextField?.type && (currentField = nextField.type);
|
|
57064
|
+
}), currentField;
|
|
57065
|
+
}
|
|
57066
|
+
function useBreadcrumbPreview(itemPath, documentSchemaType, documentValue) {
|
|
57067
|
+
const $ = c(7), value = useFormValue(itemPath);
|
|
57068
|
+
let t0;
|
|
57069
|
+
$[0] !== documentSchemaType || $[1] !== documentValue || $[2] !== itemPath ? (t0 = resolveSchemaTypeForPath(documentSchemaType, itemPath, documentValue), $[0] = documentSchemaType, $[1] = documentValue, $[2] = itemPath, $[3] = t0) : t0 = $[3];
|
|
57070
|
+
const schemaType = t0;
|
|
57071
|
+
let t1;
|
|
57072
|
+
$[4] !== schemaType || $[5] !== value ? (t1 = {
|
|
57073
|
+
schemaType,
|
|
57074
|
+
value
|
|
57075
|
+
}, $[4] = schemaType, $[5] = value, $[6] = t1) : t1 = $[6];
|
|
57076
|
+
const {
|
|
57077
|
+
value: preview
|
|
57078
|
+
} = useValuePreviewWithFallback(t1);
|
|
57079
|
+
return preview.title;
|
|
57080
|
+
}
|
|
57081
|
+
function useBreadcrumbSiblingInfo(itemPath, documentSchemaType, documentValue) {
|
|
57082
|
+
const $ = c(9), lastKeySegmentIndex = itemPath.findLastIndex(isKeySegment);
|
|
57083
|
+
let t0;
|
|
57084
|
+
bb0: {
|
|
57085
|
+
if (lastKeySegmentIndex < 0) {
|
|
57086
|
+
let t13;
|
|
57087
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t13 = [], $[0] = t13) : t13 = $[0], t0 = t13;
|
|
57088
|
+
break bb0;
|
|
57089
|
+
}
|
|
57090
|
+
let t12;
|
|
57091
|
+
$[1] !== itemPath || $[2] !== lastKeySegmentIndex ? (t12 = itemPath.slice(0, lastKeySegmentIndex), $[1] = itemPath, $[2] = lastKeySegmentIndex, $[3] = t12) : t12 = $[3], t0 = t12;
|
|
57092
|
+
}
|
|
57093
|
+
const parentArrayPath = t0, parentArrayValue = useFormValue(parentArrayPath), parentArraySchemaType = resolveSchemaTypeForPath(documentSchemaType, parentArrayPath, documentValue);
|
|
57094
|
+
let t1;
|
|
57095
|
+
bb1: {
|
|
57096
|
+
if (parentArrayPath.length < 3) {
|
|
57097
|
+
t1 = !1;
|
|
57098
|
+
break bb1;
|
|
57099
|
+
}
|
|
57100
|
+
const pteArrayPath = parentArrayPath.slice(0, -2), pteSchemaType = resolveSchemaTypeForPath(documentSchemaType, pteArrayPath, documentValue);
|
|
57101
|
+
t1 = shouldSkipSiblingCount({
|
|
57102
|
+
arraySchemaType: pteSchemaType,
|
|
57103
|
+
fieldPath: parentArrayPath
|
|
57104
|
+
});
|
|
57105
|
+
}
|
|
57106
|
+
const isInsidePTEChildren = t1, itemSchemaType = resolveSchemaTypeForPath(documentSchemaType, itemPath, documentValue);
|
|
57107
|
+
let t2;
|
|
57108
|
+
bb2: {
|
|
57109
|
+
if (lastKeySegmentIndex < 0) {
|
|
57110
|
+
t2 = null;
|
|
57111
|
+
break bb2;
|
|
57112
|
+
}
|
|
57113
|
+
const isObjectType2 = isObjectSchemaType(itemSchemaType), isParentPTE = parentArraySchemaType && isArrayOfBlocksSchemaType(parentArraySchemaType);
|
|
57114
|
+
if (isObjectType2 && isParentPTE) {
|
|
57115
|
+
t2 = null;
|
|
57116
|
+
break bb2;
|
|
57117
|
+
}
|
|
57118
|
+
if (isObjectType2 && isInsidePTEChildren) {
|
|
57119
|
+
t2 = null;
|
|
57120
|
+
break bb2;
|
|
57121
|
+
}
|
|
57122
|
+
const keySegment = itemPath[lastKeySegmentIndex];
|
|
57123
|
+
if (!isKeySegment(keySegment)) {
|
|
57124
|
+
t2 = null;
|
|
57125
|
+
break bb2;
|
|
57126
|
+
}
|
|
57127
|
+
const arrayValue = parentArrayValue;
|
|
57128
|
+
if (!Array.isArray(arrayValue)) {
|
|
57129
|
+
t2 = null;
|
|
57130
|
+
break bb2;
|
|
57131
|
+
}
|
|
57132
|
+
let t3;
|
|
57133
|
+
$[4] !== keySegment ? (t3 = (item) => item._key === keySegment._key, $[4] = keySegment, $[5] = t3) : t3 = $[5];
|
|
57134
|
+
const index = arrayValue.findIndex(t3);
|
|
57135
|
+
if (index < 0) {
|
|
57136
|
+
t2 = null;
|
|
57137
|
+
break bb2;
|
|
57138
|
+
}
|
|
57139
|
+
const t4 = index + 1;
|
|
57140
|
+
let t5;
|
|
57141
|
+
$[6] !== arrayValue.length || $[7] !== t4 ? (t5 = {
|
|
57142
|
+
index: t4,
|
|
57143
|
+
count: arrayValue.length
|
|
57144
|
+
}, $[6] = arrayValue.length, $[7] = t4, $[8] = t5) : t5 = $[8], t2 = t5;
|
|
57145
|
+
}
|
|
57146
|
+
return t2;
|
|
57147
|
+
}
|
|
57148
|
+
const MAX_LENGTH = 5, SEPARATOR = "/", rootInlineStyle = {
|
|
57149
|
+
flexWrap: "nowrap",
|
|
57150
|
+
overflow: "hidden",
|
|
57151
|
+
minWidth: 0,
|
|
57152
|
+
width: "100%"
|
|
57153
|
+
}, overflowButtonStyle = {
|
|
57154
|
+
maxHeight: "1rem",
|
|
57155
|
+
overflow: "hidden",
|
|
57156
|
+
minWidth: "2ch"
|
|
57157
|
+
}, overflowTextStyle = {
|
|
57158
|
+
overflow: "hidden",
|
|
57159
|
+
padding: "8px 0"
|
|
57160
|
+
}, SeparatorItem = forwardRef(function(props2, ref) {
|
|
57161
|
+
const $ = c(5), {
|
|
57162
|
+
children
|
|
57163
|
+
} = props2;
|
|
57164
|
+
let t0;
|
|
57165
|
+
$[0] !== children ? (t0 = /* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children }), $[0] = children, $[1] = t0) : t0 = $[1];
|
|
57166
|
+
let t1;
|
|
57167
|
+
return $[2] !== ref || $[3] !== t0 ? (t1 = /* @__PURE__ */ jsx(Box, { ref, children: t0 }), $[2] = ref, $[3] = t0, $[4] = t1) : t1 = $[4], t1;
|
|
57168
|
+
});
|
|
57169
|
+
function BreadcrumbButton(t0) {
|
|
57170
|
+
const $ = c(22), {
|
|
57171
|
+
itemPath,
|
|
57172
|
+
documentSchemaType,
|
|
57173
|
+
documentValue,
|
|
57174
|
+
isSelected: t1,
|
|
57175
|
+
onPathSelect
|
|
57176
|
+
} = t0, isSelected = t1 === void 0 ? !1 : t1, title = useBreadcrumbPreview(itemPath, documentSchemaType, documentValue), siblingInfo = useBreadcrumbSiblingInfo(itemPath, documentSchemaType, documentValue), telemetry = useTelemetry();
|
|
57177
|
+
let t2;
|
|
57178
|
+
$[0] !== itemPath || $[1] !== onPathSelect || $[2] !== telemetry ? (t2 = () => {
|
|
57179
|
+
onPathSelect(itemPath), telemetry.log(NavigatedToNestedObjectViaBreadcrumb, {
|
|
57180
|
+
path: pathToString$1(itemPath)
|
|
57181
|
+
});
|
|
57182
|
+
}, $[0] = itemPath, $[1] = onPathSelect, $[2] = telemetry, $[3] = t2) : t2 = $[3];
|
|
57183
|
+
const handleClick = t2;
|
|
57184
|
+
let t3;
|
|
57185
|
+
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = {
|
|
57186
|
+
minWidth: 0,
|
|
57187
|
+
maxWidth: "250px"
|
|
57188
|
+
}, $[4] = t3) : t3 = $[4];
|
|
57189
|
+
const t4 = isSelected ? "location" : !1;
|
|
57190
|
+
let t5;
|
|
57191
|
+
$[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t5 = {
|
|
57192
|
+
minWidth: 0
|
|
57193
|
+
}, $[5] = t5) : t5 = $[5];
|
|
57194
|
+
let t6;
|
|
57195
|
+
$[6] !== siblingInfo ? (t6 = siblingInfo && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxs(Badge, { children: [
|
|
57196
|
+
"#",
|
|
57197
|
+
siblingInfo.index
|
|
57198
|
+
] }) }), $[6] = siblingInfo, $[7] = t6) : t6 = $[7];
|
|
57199
|
+
let t7;
|
|
57200
|
+
$[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = {
|
|
57201
|
+
minWidth: 0,
|
|
57202
|
+
overflow: "hidden"
|
|
57203
|
+
}, $[8] = t7) : t7 = $[8];
|
|
57204
|
+
const t8 = !isSelected, t9 = isSelected ? "bold" : "medium";
|
|
57205
|
+
let t10;
|
|
57206
|
+
$[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = {
|
|
57207
|
+
whiteSpace: "nowrap",
|
|
57208
|
+
textTransform: "capitalize"
|
|
57209
|
+
}, $[9] = t10) : t10 = $[9];
|
|
57210
|
+
let t11;
|
|
57211
|
+
$[10] !== t8 || $[11] !== t9 || $[12] !== title ? (t11 = /* @__PURE__ */ jsx(Box, { padding: 1, style: t7, children: /* @__PURE__ */ jsx(Text$1, { muted: t8, size: 1, weight: t9, textOverflow: "ellipsis", style: t10, children: title }) }), $[10] = t8, $[11] = t9, $[12] = title, $[13] = t11) : t11 = $[13];
|
|
57212
|
+
let t12;
|
|
57213
|
+
$[14] !== t11 || $[15] !== t6 ? (t12 = /* @__PURE__ */ jsxs(Flex, { align: "center", style: t5, children: [
|
|
57214
|
+
t6,
|
|
57215
|
+
t11
|
|
57216
|
+
] }), $[14] = t11, $[15] = t6, $[16] = t12) : t12 = $[16];
|
|
57217
|
+
let t13;
|
|
57218
|
+
return $[17] !== handleClick || $[18] !== t12 || $[19] !== t4 || $[20] !== title ? (t13 = /* @__PURE__ */ jsx(Button$1, { mode: "bleed", padding: 1, radius: 2, onClick: handleClick, style: t3, title, "aria-label": title, "aria-current": t4, children: t12 }), $[17] = handleClick, $[18] = t12, $[19] = t4, $[20] = title, $[21] = t13) : t13 = $[21], t13;
|
|
57219
|
+
}
|
|
57220
|
+
function BreadcrumbMenuItem(t0) {
|
|
57221
|
+
const $ = c(20), {
|
|
57222
|
+
itemPath,
|
|
57223
|
+
documentSchemaType,
|
|
57224
|
+
documentValue,
|
|
57225
|
+
onPathSelect
|
|
57226
|
+
} = t0, title = useBreadcrumbPreview(itemPath, documentSchemaType, documentValue), siblingInfo = useBreadcrumbSiblingInfo(itemPath, documentSchemaType, documentValue);
|
|
57227
|
+
let t1;
|
|
57228
|
+
$[0] !== itemPath || $[1] !== onPathSelect ? (t1 = () => {
|
|
57229
|
+
onPathSelect(itemPath);
|
|
57230
|
+
}, $[0] = itemPath, $[1] = onPathSelect, $[2] = t1) : t1 = $[2];
|
|
57231
|
+
const handleClick = t1;
|
|
57232
|
+
let t2;
|
|
57233
|
+
$[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t2 = {
|
|
57234
|
+
minWidth: 0,
|
|
57235
|
+
maxWidth: "250px"
|
|
57236
|
+
}, $[3] = t2) : t2 = $[3];
|
|
57237
|
+
let t3;
|
|
57238
|
+
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = /* @__PURE__ */ jsx(Box, { flex: "none", padding: 1, children: /* @__PURE__ */ jsx(Text$1, { size: 1, muted: !0, children: SEPARATOR }) }), $[4] = t3) : t3 = $[4];
|
|
57239
|
+
let t4;
|
|
57240
|
+
$[5] !== siblingInfo ? (t4 = siblingInfo && /* @__PURE__ */ jsx(Box, { flex: "none", children: /* @__PURE__ */ jsxs(Badge, { children: [
|
|
57241
|
+
"#",
|
|
57242
|
+
siblingInfo.index
|
|
57243
|
+
] }) }), $[5] = siblingInfo, $[6] = t4) : t4 = $[6];
|
|
57244
|
+
const t5 = siblingInfo?.index ? 1 : 0;
|
|
57245
|
+
let t6;
|
|
57246
|
+
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t6 = {
|
|
57247
|
+
minWidth: 0,
|
|
57248
|
+
overflow: "hidden"
|
|
57249
|
+
}, $[7] = t6) : t6 = $[7];
|
|
57250
|
+
let t7;
|
|
57251
|
+
$[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = {
|
|
57252
|
+
whiteSpace: "nowrap",
|
|
57253
|
+
textTransform: "capitalize"
|
|
57254
|
+
}, $[8] = t7) : t7 = $[8];
|
|
57255
|
+
let t8;
|
|
57256
|
+
$[9] !== title ? (t8 = /* @__PURE__ */ jsx(Text$1, { size: 1, textOverflow: "ellipsis", style: t7, title, children: title }), $[9] = title, $[10] = t8) : t8 = $[10];
|
|
57257
|
+
let t9;
|
|
57258
|
+
$[11] !== t5 || $[12] !== t8 ? (t9 = /* @__PURE__ */ jsx(Box, { paddingLeft: t5, paddingY: 1, style: t6, children: t8 }), $[11] = t5, $[12] = t8, $[13] = t9) : t9 = $[13];
|
|
57259
|
+
let t10;
|
|
57260
|
+
$[14] !== t4 || $[15] !== t9 ? (t10 = /* @__PURE__ */ jsxs(Flex, { align: "center", style: t2, children: [
|
|
57261
|
+
t3,
|
|
57262
|
+
t4,
|
|
57263
|
+
t9
|
|
57264
|
+
] }), $[14] = t4, $[15] = t9, $[16] = t10) : t10 = $[16];
|
|
57265
|
+
let t11;
|
|
57266
|
+
return $[17] !== handleClick || $[18] !== t10 ? (t11 = /* @__PURE__ */ jsx(MenuItem$1, { padding: 1, onClick: handleClick, children: t10 }), $[17] = handleClick, $[18] = t10, $[19] = t11) : t11 = $[19], t11;
|
|
57267
|
+
}
|
|
57268
|
+
function DialogBreadcrumbs(t0) {
|
|
57269
|
+
const $ = c(43), {
|
|
57270
|
+
currentPath
|
|
57271
|
+
} = t0, {
|
|
57272
|
+
onPathOpen
|
|
57273
|
+
} = useFormCallbacks(), {
|
|
57274
|
+
schemaType: documentSchemaType
|
|
57275
|
+
} = useFormBuilder();
|
|
57276
|
+
let t1;
|
|
57277
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = [], $[0] = t1) : t1 = $[0];
|
|
57278
|
+
const documentValue = useFormValue(t1), [rootElement, setRootElement] = useState(null), size = useElementSize(rootElement);
|
|
57279
|
+
let t2;
|
|
57280
|
+
$[1] !== onPathOpen ? (t2 = (path) => {
|
|
57281
|
+
onPathOpen(path);
|
|
57282
|
+
}, $[1] = onPathOpen, $[2] = t2) : t2 = $[2];
|
|
57283
|
+
const handlePathSelect = t2;
|
|
57284
|
+
let t3;
|
|
57285
|
+
bb0: {
|
|
57286
|
+
const w = size?.border.width;
|
|
57287
|
+
if (!w) {
|
|
57288
|
+
t3 = MAX_LENGTH;
|
|
57289
|
+
break bb0;
|
|
57290
|
+
}
|
|
57291
|
+
if (w < 500) {
|
|
57292
|
+
t3 = 3;
|
|
57293
|
+
break bb0;
|
|
57294
|
+
}
|
|
57295
|
+
if (w < 700) {
|
|
57296
|
+
t3 = 4;
|
|
57297
|
+
break bb0;
|
|
57298
|
+
}
|
|
57299
|
+
t3 = MAX_LENGTH;
|
|
57300
|
+
}
|
|
57301
|
+
const maxLength = t3;
|
|
57302
|
+
let t4;
|
|
57303
|
+
bb1: {
|
|
57304
|
+
if (!currentPath || currentPath.length === 0) {
|
|
57305
|
+
let t52;
|
|
57306
|
+
$[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t52 = [], $[3] = t52) : t52 = $[3], t4 = t52;
|
|
57307
|
+
break bb1;
|
|
57308
|
+
}
|
|
57309
|
+
let result;
|
|
57310
|
+
$[4] !== currentPath || $[5] !== documentValue ? (result = [], currentPath.forEach((segment, index) => {
|
|
57311
|
+
if (isKeySegment(segment)) {
|
|
57312
|
+
const itemPath = currentPath.slice(0, index + 1);
|
|
57313
|
+
shouldBeInBreadcrumb(itemPath, currentPath, documentValue) && result.push({
|
|
57314
|
+
path: itemPath
|
|
57315
|
+
});
|
|
57316
|
+
}
|
|
57317
|
+
}), $[4] = currentPath, $[5] = documentValue, $[6] = result) : result = $[6], t4 = result;
|
|
57318
|
+
}
|
|
57319
|
+
const rawItems = t4;
|
|
57320
|
+
let t5;
|
|
57321
|
+
bb2: {
|
|
57322
|
+
const len = rawItems.length + 1, availableSlots = maxLength - 1, beforeLength = Math.ceil(availableSlots / 2), afterLength = Math.floor(availableSlots / 2);
|
|
57323
|
+
if (maxLength && len > maxLength) {
|
|
57324
|
+
let t62;
|
|
57325
|
+
$[7] !== beforeLength || $[8] !== rawItems ? (t62 = rawItems.slice(0, beforeLength - 1), $[7] = beforeLength, $[8] = rawItems, $[9] = t62) : t62 = $[9];
|
|
57326
|
+
let t72;
|
|
57327
|
+
$[10] !== afterLength || $[11] !== beforeLength || $[12] !== rawItems ? (t72 = rawItems.slice(beforeLength - 1, rawItems.length - afterLength), $[10] = afterLength, $[11] = beforeLength, $[12] = rawItems, $[13] = t72) : t72 = $[13];
|
|
57328
|
+
let t82;
|
|
57329
|
+
$[14] !== afterLength || $[15] !== rawItems ? (t82 = rawItems.slice(rawItems.length - afterLength), $[14] = afterLength, $[15] = rawItems, $[16] = t82) : t82 = $[16];
|
|
57330
|
+
let t92;
|
|
57331
|
+
$[17] !== t62 || $[18] !== t72 || $[19] !== t82 ? (t92 = [...t62, t72, ...t82], $[17] = t62, $[18] = t72, $[19] = t82, $[20] = t92) : t92 = $[20], t5 = t92;
|
|
57332
|
+
break bb2;
|
|
57333
|
+
}
|
|
57334
|
+
t5 = rawItems;
|
|
57335
|
+
}
|
|
57336
|
+
const items = t5;
|
|
57337
|
+
let t6;
|
|
57338
|
+
$[21] !== currentPath?.[0] ? (t6 = currentPath?.[0]?.toString(), $[21] = currentPath?.[0], $[22] = t6) : t6 = $[22];
|
|
57339
|
+
const rootFieldName = t6;
|
|
57340
|
+
if (!currentPath || currentPath.length === 0)
|
|
57341
|
+
return null;
|
|
57342
|
+
let t7;
|
|
57343
|
+
$[23] !== currentPath || $[24] !== documentSchemaType || $[25] !== documentValue || $[26] !== handlePathSelect || $[27] !== items ? (t7 = items.map((item, index_0) => {
|
|
57344
|
+
const key = `breadcrumb-${index_0}`, showSeparator = index_0 < items.length - 1;
|
|
57345
|
+
if (Array.isArray(item))
|
|
57346
|
+
return /* @__PURE__ */ jsxs(Inline, { children: [
|
|
57347
|
+
/* @__PURE__ */ jsx(MenuButton, { id: "breadcrumb-overflow-menu-button", button: /* @__PURE__ */ jsx(Button$1, { mode: "bleed", padding: 1, style: overflowButtonStyle, children: /* @__PURE__ */ jsx(Flex, { overflow: "hidden", children: /* @__PURE__ */ jsx(Text$1, { size: 1, weight: "medium", textOverflow: "ellipsis", style: overflowTextStyle, "aria-label": "More breadcrumb items", children: "..." }) }) }), popover: {
|
|
57348
|
+
placement: "bottom-start",
|
|
57349
|
+
portal: !0
|
|
57350
|
+
}, menu: /* @__PURE__ */ jsx(Menu, { children: item.map((overflowItem) => /* @__PURE__ */ jsx(BreadcrumbMenuItem, { itemPath: overflowItem.path, documentSchemaType, documentValue, onPathSelect: handlePathSelect }, overflowItem.path.toString())) }) }),
|
|
57351
|
+
showSeparator && /* @__PURE__ */ jsx(SeparatorItem, { children: SEPARATOR })
|
|
57352
|
+
] }, key);
|
|
57353
|
+
const isSelected = currentPath.length === item.path.length && item.path.every((seg, i) => {
|
|
57354
|
+
const currentSeg = currentPath[i];
|
|
57355
|
+
return isKeySegment(seg) && isKeySegment(currentSeg) ? seg._key === currentSeg._key : seg === currentSeg;
|
|
57356
|
+
}), isLast = index_0 === items.length - 1;
|
|
57357
|
+
return /* @__PURE__ */ jsxs(Inline, { flex: isLast ? 1 : void 0, style: {
|
|
57358
|
+
minWidth: 0
|
|
57359
|
+
}, children: [
|
|
57360
|
+
/* @__PURE__ */ jsx(BreadcrumbButton, { itemPath: item.path, documentSchemaType, documentValue, isSelected, onPathSelect: handlePathSelect }),
|
|
57361
|
+
showSeparator && /* @__PURE__ */ jsx(SeparatorItem, { children: SEPARATOR })
|
|
57362
|
+
] }, key);
|
|
57363
|
+
}), $[23] = currentPath, $[24] = documentSchemaType, $[25] = documentValue, $[26] = handlePathSelect, $[27] = items, $[28] = t7) : t7 = $[28];
|
|
57364
|
+
const nodes = t7;
|
|
57365
|
+
let t8;
|
|
57366
|
+
$[29] !== handlePathSelect ? (t8 = () => handlePathSelect([]), $[29] = handlePathSelect, $[30] = t8) : t8 = $[30];
|
|
57367
|
+
let t9;
|
|
57368
|
+
$[31] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = {
|
|
57369
|
+
minWidth: 0,
|
|
57370
|
+
maxWidth: "250px"
|
|
57371
|
+
}, $[31] = t9) : t9 = $[31];
|
|
57372
|
+
let t10;
|
|
57373
|
+
$[32] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t10 = {
|
|
57374
|
+
whiteSpace: "nowrap",
|
|
57375
|
+
textTransform: "capitalize"
|
|
57376
|
+
}, $[32] = t10) : t10 = $[32];
|
|
57377
|
+
let t11;
|
|
57378
|
+
$[33] !== rootFieldName ? (t11 = /* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, textOverflow: "ellipsis", style: t10, children: rootFieldName }), $[33] = rootFieldName, $[34] = t11) : t11 = $[34];
|
|
57379
|
+
let t12;
|
|
57380
|
+
$[35] !== rootFieldName || $[36] !== t11 || $[37] !== t8 ? (t12 = /* @__PURE__ */ jsx(Button$1, { mode: "bleed", padding: 2, radius: 2, onClick: t8, style: t9, title: rootFieldName, "aria-label": rootFieldName, children: t11 }), $[35] = rootFieldName, $[36] = t11, $[37] = t8, $[38] = t12) : t12 = $[38];
|
|
57381
|
+
let t13;
|
|
57382
|
+
$[39] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t13 = /* @__PURE__ */ jsx(SeparatorItem, { children: SEPARATOR }), $[39] = t13) : t13 = $[39];
|
|
57383
|
+
let t14;
|
|
57384
|
+
return $[40] !== nodes || $[41] !== t12 ? (t14 = /* @__PURE__ */ jsxs(Inline, { ref: setRootElement, style: rootInlineStyle, children: [
|
|
57385
|
+
t12,
|
|
57386
|
+
t13,
|
|
57387
|
+
nodes
|
|
57388
|
+
] }), $[40] = nodes, $[41] = t12, $[42] = t14) : t14 = $[42], t14;
|
|
57389
|
+
}
|
|
57390
|
+
const StyledDialog$2 = styled(Dialog)`
|
|
57391
|
+
${(props2) => props2.$isHidden && `
|
|
57392
|
+
/* Hide the backdrop (the semi-transparent overlay) */
|
|
57393
|
+
background: transparent !important;
|
|
57394
|
+
|
|
57395
|
+
/* Hide the dialog card */
|
|
57396
|
+
[data-ui='DialogCard'] {
|
|
57397
|
+
opacity: 0 !important;
|
|
57398
|
+
pointer-events: none !important;
|
|
57399
|
+
transform: scale(0.95) !important;
|
|
57400
|
+
}
|
|
57401
|
+
`}
|
|
57402
|
+
`, PRESENCE_MARGINS = [0, 0, 1, 0];
|
|
57403
|
+
function onDragEnter(event) {
|
|
57404
|
+
return event.stopPropagation();
|
|
57405
|
+
}
|
|
57406
|
+
function onDrop(event) {
|
|
57407
|
+
return event.stopPropagation();
|
|
57408
|
+
}
|
|
57409
|
+
function EnhancedObjectDialog(props2) {
|
|
57410
|
+
const $ = c(49), {
|
|
57411
|
+
children,
|
|
57412
|
+
header,
|
|
57413
|
+
onClose,
|
|
57414
|
+
type,
|
|
57415
|
+
width
|
|
57416
|
+
} = props2, [documentScrollElement, setDocumentScrollElement] = useState(null), containerElement = useRef(null), {
|
|
57417
|
+
onPathOpen
|
|
57418
|
+
} = useFormCallbacks(), telemetry = useTelemetry(), {
|
|
57419
|
+
absolutePath,
|
|
57420
|
+
path
|
|
57421
|
+
} = children?.props, currentPath = absolutePath || path;
|
|
57422
|
+
let t0;
|
|
57423
|
+
$[0] !== currentPath ? (t0 = {
|
|
57424
|
+
path: currentPath
|
|
57425
|
+
}, $[0] = currentPath, $[1] = t0) : t0 = $[1];
|
|
57426
|
+
const {
|
|
57427
|
+
dialogId,
|
|
57428
|
+
isTop,
|
|
57429
|
+
stack,
|
|
57430
|
+
close
|
|
57431
|
+
} = useDialogStack(t0);
|
|
57432
|
+
let t1;
|
|
57433
|
+
$[2] !== stack.length || $[3] !== telemetry ? (t1 = () => {
|
|
57434
|
+
stack.length === 0 && telemetry.log(NestedDialogOpened, {
|
|
57435
|
+
path: pathToString$1([])
|
|
57436
|
+
});
|
|
57437
|
+
}, $[2] = stack.length, $[3] = telemetry, $[4] = t1) : t1 = $[4];
|
|
57438
|
+
let t2;
|
|
57439
|
+
$[5] !== stack || $[6] !== telemetry ? (t2 = [stack, telemetry], $[5] = stack, $[6] = telemetry, $[7] = t2) : t2 = $[7], useEffect(t1, t2);
|
|
57440
|
+
let t3;
|
|
57441
|
+
$[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = {
|
|
57442
|
+
height: "min(calc(100vh - 200px), 500px)"
|
|
57443
|
+
}, $[8] = t3) : t3 = $[8];
|
|
57444
|
+
let t4;
|
|
57445
|
+
$[9] !== children ? (t4 = /* @__PURE__ */ jsx(PresenceOverlay, { margins: PRESENCE_MARGINS, children: /* @__PURE__ */ jsx(Box, { ref: containerElement, style: t3, children }) }), $[9] = children, $[10] = t4) : t4 = $[10];
|
|
57446
|
+
const contents = t4, [hasEverBeenNested, setHasEverBeenNested] = useState(!1);
|
|
57447
|
+
let t5, t6;
|
|
57448
|
+
$[11] !== hasEverBeenNested || $[12] !== stack.length ? (t5 = () => {
|
|
57449
|
+
stack.length > 1 && !hasEverBeenNested && setHasEverBeenNested(!0);
|
|
57450
|
+
}, t6 = [stack.length, hasEverBeenNested], $[11] = hasEverBeenNested, $[12] = stack.length, $[13] = t5, $[14] = t6) : (t5 = $[13], t6 = $[14]), useEffect(t5, t6);
|
|
57451
|
+
const shouldDisableAnimation = stack.length > 1 || hasEverBeenNested;
|
|
57452
|
+
let t7;
|
|
57453
|
+
$[15] !== close || $[16] !== isTop || $[17] !== onClose || $[18] !== onPathOpen || $[19] !== stack || $[20] !== telemetry ? (t7 = (event) => {
|
|
57454
|
+
if (isTop && (event.metaKey || event.ctrlKey) && event.key === "ArrowUp") {
|
|
57455
|
+
event.preventDefault();
|
|
57456
|
+
const lastStackPath = stack[stack.length - 1]?.path;
|
|
57457
|
+
if (lastStackPath && lastStackPath.length > 1) {
|
|
57458
|
+
const newLastStackPath = lastStackPath.slice(0, -1);
|
|
57459
|
+
newLastStackPath.length > 1 ? onPathOpen(newLastStackPath) : (telemetry.log(NestedDialogClosed, {
|
|
57460
|
+
path: pathToString$1([])
|
|
57461
|
+
}), onClose?.(), close());
|
|
57462
|
+
}
|
|
57463
|
+
}
|
|
57464
|
+
}, $[15] = close, $[16] = isTop, $[17] = onClose, $[18] = onPathOpen, $[19] = stack, $[20] = telemetry, $[21] = t7) : t7 = $[21];
|
|
57465
|
+
const handleGlobalKeyDown = t7;
|
|
57466
|
+
let t8;
|
|
57467
|
+
$[22] !== close || $[23] !== onClose || $[24] !== telemetry ? (t8 = () => {
|
|
57468
|
+
telemetry.log(NestedDialogClosed, {
|
|
57469
|
+
path: pathToString$1([])
|
|
57470
|
+
}), onClose?.(), close();
|
|
57471
|
+
}, $[22] = close, $[23] = onClose, $[24] = telemetry, $[25] = t8) : t8 = $[25];
|
|
57472
|
+
const handleClose = t8;
|
|
57473
|
+
if (useGlobalKeyDown(handleGlobalKeyDown), type === "dialog") {
|
|
57474
|
+
const t92 = !isTop, t102 = isTop ? props2.autofocus : !1;
|
|
57475
|
+
let t11;
|
|
57476
|
+
$[26] !== currentPath ? (t11 = /* @__PURE__ */ jsx(DialogBreadcrumbs, { currentPath }), $[26] = currentPath, $[27] = t11) : t11 = $[27];
|
|
57477
|
+
const t12 = !shouldDisableAnimation;
|
|
57478
|
+
let t13;
|
|
57479
|
+
$[28] !== contents || $[29] !== dialogId || $[30] !== handleClose || $[31] !== t102 || $[32] !== t11 || $[33] !== t12 || $[34] !== t92 || $[35] !== width ? (t13 = /* @__PURE__ */ jsx(StyledDialog$2, { $isHidden: t92, __unstable_autoFocus: t102, contentRef: setDocumentScrollElement, "data-testid": "nested-object-dialog", header: t11, id: dialogId, onClose: handleClose, onDragEnter, onDrop, width, animate: t12, children: contents }), $[28] = contents, $[29] = dialogId, $[30] = handleClose, $[31] = t102, $[32] = t11, $[33] = t12, $[34] = t92, $[35] = width, $[36] = t13) : t13 = $[36];
|
|
57480
|
+
let t14;
|
|
57481
|
+
return $[37] !== documentScrollElement || $[38] !== t13 ? (t14 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t13 }), $[37] = documentScrollElement, $[38] = t13, $[39] = t14) : t14 = $[39], t14;
|
|
57482
|
+
}
|
|
57483
|
+
let t9;
|
|
57484
|
+
$[40] !== contents || $[41] !== handleClose || $[42] !== header || $[43] !== props2.legacy_referenceElement || $[44] !== width ? (t9 = /* @__PURE__ */ jsx(PopoverDialog, { header, onClose: handleClose, width, containerRef: setDocumentScrollElement, referenceElement: props2.legacy_referenceElement, children: contents }), $[40] = contents, $[41] = handleClose, $[42] = header, $[43] = props2.legacy_referenceElement, $[44] = width, $[45] = t9) : t9 = $[45];
|
|
57485
|
+
let t10;
|
|
57486
|
+
return $[46] !== documentScrollElement || $[47] !== t9 ? (t10 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t9 }), $[46] = documentScrollElement, $[47] = t9, $[48] = t10) : t10 = $[48], t10;
|
|
57487
|
+
}
|
|
57449
57488
|
function TelephoneInput(props2) {
|
|
57450
57489
|
const $ = c(5), {
|
|
57451
57490
|
schemaType,
|
|
@@ -57542,7 +57581,7 @@ function resolveCallbackState({
|
|
|
57542
57581
|
childResult && (children[field.name] = childResult);
|
|
57543
57582
|
}
|
|
57544
57583
|
}
|
|
57545
|
-
for (const group2 of schemaType.groups ?? EMPTY_ARRAY$
|
|
57584
|
+
for (const group2 of schemaType.groups ?? EMPTY_ARRAY$z)
|
|
57546
57585
|
if (property in group2) {
|
|
57547
57586
|
const groupResult = resolveConditionalProperty(group2[property], context);
|
|
57548
57587
|
if (!groupResult) continue;
|
|
@@ -57624,7 +57663,7 @@ function useFormState(t0) {
|
|
|
57624
57663
|
perspective,
|
|
57625
57664
|
hasUpstreamVersion,
|
|
57626
57665
|
displayInlineChanges
|
|
57627
|
-
} = t0, currentUser = useCurrentUser(), [prepareHiddenState] = useState(_temp$1x), [prepareReadOnlyState] = useState(_temp2$D), [prepareFormState] = useState(_temp3$
|
|
57666
|
+
} = t0, currentUser = useCurrentUser(), [prepareHiddenState] = useState(_temp$1x), [prepareReadOnlyState] = useState(_temp2$D), [prepareFormState] = useState(_temp3$k), [reconcileFieldGroupState] = useState(_temp4$9);
|
|
57628
57667
|
let t1;
|
|
57629
57668
|
$[0] !== fieldGroupState || $[1] !== reconcileFieldGroupState ? (t1 = reconcileFieldGroupState(fieldGroupState), $[0] = fieldGroupState, $[1] = reconcileFieldGroupState, $[2] = t1) : t1 = $[2];
|
|
57630
57669
|
const reconciledFieldGroupState = t1, [reconcileCollapsedPaths] = useState(_temp5$6);
|
|
@@ -57655,7 +57694,7 @@ function useFormState(t0) {
|
|
|
57655
57694
|
const {
|
|
57656
57695
|
hidden,
|
|
57657
57696
|
readOnly
|
|
57658
|
-
} = t6, t7 = documentValue && isGoingToUnpublish(documentValue) ? EMPTY_ARRAY$
|
|
57697
|
+
} = t6, t7 = documentValue && isGoingToUnpublish(documentValue) ? EMPTY_ARRAY$z : validation2;
|
|
57659
57698
|
let t8;
|
|
57660
57699
|
return $[23] !== changesOpen || $[24] !== comparisonValue || $[25] !== currentUser || $[26] !== displayInlineChanges || $[27] !== documentValue || $[28] !== focusPath || $[29] !== hasUpstreamVersion || $[30] !== hidden || $[31] !== openPath || $[32] !== perspective || $[33] !== prepareFormState || $[34] !== presence || $[35] !== readOnly || $[36] !== reconciledCollapsedFieldsets || $[37] !== reconciledCollapsedPaths || $[38] !== reconciledFieldGroupState || $[39] !== schemaType || $[40] !== t7 ? (t8 = prepareFormState({
|
|
57661
57700
|
schemaType,
|
|
@@ -57698,7 +57737,7 @@ function _temp4$9() {
|
|
|
57698
57737
|
return last2 = result, result;
|
|
57699
57738
|
};
|
|
57700
57739
|
}
|
|
57701
|
-
function _temp3$
|
|
57740
|
+
function _temp3$k() {
|
|
57702
57741
|
return createPrepareFormState();
|
|
57703
57742
|
}
|
|
57704
57743
|
function _temp2$D() {
|
|
@@ -57802,9 +57841,9 @@ const INITIAL$1 = "connecting";
|
|
|
57802
57841
|
function useConnectionState(publishedDocId, docTypeName, version2) {
|
|
57803
57842
|
const $ = c(5), documentStore = useDocumentStore();
|
|
57804
57843
|
let t0;
|
|
57805
|
-
return $[0] !== docTypeName || $[1] !== documentStore.pair || $[2] !== publishedDocId || $[3] !== version2 ? (t0 = documentStore.pair.documentEvents(publishedDocId, docTypeName, version2).pipe(map(_temp$1w), map(_temp2$C), switchMap(_temp3$
|
|
57844
|
+
return $[0] !== docTypeName || $[1] !== documentStore.pair || $[2] !== publishedDocId || $[3] !== version2 ? (t0 = documentStore.pair.documentEvents(publishedDocId, docTypeName, version2).pipe(map(_temp$1w), map(_temp2$C), switchMap(_temp3$j), startWith(INITIAL$1), distinctUntilChanged()), $[0] = docTypeName, $[1] = documentStore.pair, $[2] = publishedDocId, $[3] = version2, $[4] = t0) : t0 = $[4], useObservable(t0, INITIAL$1);
|
|
57806
57845
|
}
|
|
57807
|
-
function _temp3$
|
|
57846
|
+
function _temp3$j(isConnected) {
|
|
57808
57847
|
return isConnected ? of("connected") : timer(200).pipe(mapTo("reconnecting"));
|
|
57809
57848
|
}
|
|
57810
57849
|
function _temp2$C(eventType) {
|
|
@@ -58192,7 +58231,7 @@ function useDocumentForm(options) {
|
|
|
58192
58231
|
}
|
|
58193
58232
|
const activeDocumentReleaseId = t6, editState2 = useEditState(documentId, documentType, "default", activeDocumentReleaseId), connectionState = useConnectionState(documentId, documentType, activeDocumentReleaseId);
|
|
58194
58233
|
useReconnectingToast(connectionState === "reconnecting");
|
|
58195
|
-
const [focusPath, setFocusPath] = useState(initialFocusPath || EMPTY_ARRAY$
|
|
58234
|
+
const [focusPath, setFocusPath] = useState(initialFocusPath || EMPTY_ARRAY$z);
|
|
58196
58235
|
let t7;
|
|
58197
58236
|
bb1: {
|
|
58198
58237
|
let t82;
|
|
@@ -58263,7 +58302,7 @@ function useDocumentForm(options) {
|
|
|
58263
58302
|
subscription.unsubscribe();
|
|
58264
58303
|
};
|
|
58265
58304
|
}, t14 = [presenceStore, value._id], $[35] = presenceStore, $[36] = value._id, $[37] = t13, $[38] = t14) : (t13 = $[37], t14 = $[38]), useEffect(t13, t14);
|
|
58266
|
-
const [openPath, onSetOpenPath] = useState(EMPTY_ARRAY$
|
|
58305
|
+
const [openPath, onSetOpenPath] = useState(EMPTY_ARRAY$z), [fieldGroupState, onSetFieldGroupState] = useState(), [collapsedPaths, onSetCollapsedPath] = useState(), [collapsedFieldSets, onSetCollapsedFieldSets] = useState();
|
|
58267
58306
|
let t15;
|
|
58268
58307
|
$[39] !== onSetCollapsedPath ? (t15 = (path, collapsed) => {
|
|
58269
58308
|
onSetCollapsedPath((prevState) => setAtPath(prevState, path, collapsed));
|
|
@@ -58388,23 +58427,12 @@ function useDocumentForm(options) {
|
|
|
58388
58427
|
let t38;
|
|
58389
58428
|
$[129] !== enhancedObjectDialogEnabled || $[130] !== handleSetOpenPath || $[131] !== onFocusPath || $[132] !== setFocusPath || $[133] !== updatePresenceThrottled ? (t38 = (_nextFocusPath, payload_0) => {
|
|
58390
58429
|
const nextFocusPath_0 = pathFor(_nextFocusPath);
|
|
58391
|
-
|
|
58392
|
-
if (setFocusPath(pathFor(nextFocusPath_0)), enhancedObjectDialogEnabled) {
|
|
58393
|
-
const lastSegment = nextFocusPath_0[nextFocusPath_0.length - 1];
|
|
58394
|
-
if (!isKeySegment(lastSegment)) {
|
|
58395
|
-
const lastKeyIndex = nextFocusPath_0.findLastIndex(_temp3$j), newOpenPath = lastKeyIndex >= 0 ? nextFocusPath_0.slice(0, lastKeyIndex + 1) : nextFocusPath_0.slice(0, -1);
|
|
58396
|
-
document.getElementById(`${pathToString$1(nextFocusPath_0)}`) || handleSetOpenPath(pathFor(newOpenPath));
|
|
58397
|
-
}
|
|
58398
|
-
} else
|
|
58399
|
-
handleSetOpenPath(pathFor(nextFocusPath_0.slice(0, -1)));
|
|
58400
|
-
focusPathRef.current = nextFocusPath_0, onFocusPath?.(nextFocusPath_0);
|
|
58401
|
-
}
|
|
58402
|
-
updatePresenceThrottled(nextFocusPath_0, payload_0);
|
|
58430
|
+
nextFocusPath_0 !== focusPathRef.current && (setFocusPath(pathFor(nextFocusPath_0)), enhancedObjectDialogEnabled && handleSetOpenPath(pathFor(nextFocusPath_0.slice(0, -1))), focusPathRef.current = nextFocusPath_0, onFocusPath?.(nextFocusPath_0)), updatePresenceThrottled(nextFocusPath_0, payload_0);
|
|
58403
58431
|
}, $[129] = enhancedObjectDialogEnabled, $[130] = handleSetOpenPath, $[131] = onFocusPath, $[132] = setFocusPath, $[133] = updatePresenceThrottled, $[134] = t38) : t38 = $[134];
|
|
58404
58432
|
const handleFocus = t38;
|
|
58405
58433
|
let t39;
|
|
58406
58434
|
$[135] !== onFocusPath || $[136] !== setFocusPath ? (t39 = (_blurredPath) => {
|
|
58407
|
-
setFocusPath(EMPTY_ARRAY$
|
|
58435
|
+
setFocusPath(EMPTY_ARRAY$z), focusPathRef.current !== EMPTY_ARRAY$z && (focusPathRef.current = EMPTY_ARRAY$z, onFocusPath?.(EMPTY_ARRAY$z));
|
|
58408
58436
|
}, $[135] = onFocusPath, $[136] = setFocusPath, $[137] = t39) : t39 = $[137];
|
|
58409
58437
|
const handleBlur = t39;
|
|
58410
58438
|
let t40;
|
|
@@ -58440,9 +58468,6 @@ function useDocumentForm(options) {
|
|
|
58440
58468
|
onSetCollapsedFieldSet: handleOnSetCollapsedFieldSet
|
|
58441
58469
|
}, $[142] = collapsedFieldSets, $[143] = collapsedPaths, $[144] = connectionState, $[145] = editState2, $[146] = focusPath, $[147] = formState, $[148] = handleBlur, $[149] = handleFocus, $[150] = handleOnSetCollapsedFieldSet, $[151] = handleOnSetCollapsedPath, $[152] = handleProgrammaticFocus, $[153] = handleSetActiveFieldGroup, $[154] = handleSetOpenPath, $[155] = hasUpstreamVersion, $[156] = isPermissionsLoading, $[157] = openPath, $[158] = permissions, $[159] = ready, $[160] = schemaType, $[161] = upstreamEditState, $[162] = validation2, $[163] = value, $[164] = t41) : t41 = $[164], t41;
|
|
58442
58470
|
}
|
|
58443
|
-
function _temp3$j(seg) {
|
|
58444
|
-
return isKeySegment(seg);
|
|
58445
|
-
}
|
|
58446
58471
|
function _temp2$B() {
|
|
58447
58472
|
throw new Error("Attempted to patch a read-only document");
|
|
58448
58473
|
}
|
|
@@ -65030,13 +65055,13 @@ function useNotificationTarget(opts) {
|
|
|
65030
65055
|
getNotificationValue: handleGetNotificationValue
|
|
65031
65056
|
}, $[18] = handleGetNotificationValue, $[19] = t6) : t6 = $[19], t6;
|
|
65032
65057
|
}
|
|
65033
|
-
function getSchemaField
|
|
65058
|
+
function getSchemaField(schemaType, fieldPath) {
|
|
65034
65059
|
const paths = PathUtils.fromString(fieldPath), firstPath = paths[0];
|
|
65035
65060
|
if (firstPath && isObjectSchemaType(schemaType)) {
|
|
65036
65061
|
const field = schemaType?.fields?.find((f) => f.name === firstPath);
|
|
65037
65062
|
if (field) {
|
|
65038
65063
|
const nextPath = PathUtils.toString(paths.slice(1));
|
|
65039
|
-
return nextPath ? getSchemaField
|
|
65064
|
+
return nextPath ? getSchemaField(field.type, nextPath) : field;
|
|
65040
65065
|
}
|
|
65041
65066
|
}
|
|
65042
65067
|
}
|
|
@@ -65055,7 +65080,7 @@ function buildCommentBreadcrumbs(props2) {
|
|
|
65055
65080
|
} = props2, paths = PathUtils.fromString(fieldPath), fieldPaths = [];
|
|
65056
65081
|
let currentSchemaType = schemaType;
|
|
65057
65082
|
return paths.forEach((seg, index) => {
|
|
65058
|
-
const currentPath = paths.slice(0, index + 1), previousPath = paths.slice(0, index), field = getSchemaField
|
|
65083
|
+
const currentPath = paths.slice(0, index + 1), previousPath = paths.slice(0, index), field = getSchemaField(currentSchemaType, PathUtils.toString([seg])), isKeySegment2 = seg.hasOwnProperty("_key"), parentValue = getValueAtPath(documentValue, previousPath), currentValue = getValueAtPath(documentValue, currentPath), conditionalContext = {
|
|
65059
65084
|
document: documentValue,
|
|
65060
65085
|
currentUser,
|
|
65061
65086
|
parent: parentValue,
|
|
@@ -77683,7 +77708,7 @@ function TasksHeaderDraftsMenu() {
|
|
|
77683
77708
|
} = state, currentUser = useCurrentUser(), draftTasks = currentUser?.id ? data.filter((task) => {
|
|
77684
77709
|
const isAuthoredByUser = task.authorId === currentUser.id, isDraft2 = !task.createdByUser, hasEdits = task._updatedAt !== task._createdAt, isNotTheTaskBeingCreated = viewMode === "create" ? task._id !== selectedTask : !0;
|
|
77685
77710
|
return isAuthoredByUser && isDraft2 && isNotTheTaskBeingCreated && hasEdits;
|
|
77686
|
-
}) : EMPTY_ARRAY$
|
|
77711
|
+
}) : EMPTY_ARRAY$z;
|
|
77687
77712
|
let t0;
|
|
77688
77713
|
$[0] !== setViewMode ? (t0 = (id2) => {
|
|
77689
77714
|
setViewMode({
|
|
@@ -78575,7 +78600,7 @@ function resolveSource$1({
|
|
|
78575
78600
|
...context,
|
|
78576
78601
|
...partialContext
|
|
78577
78602
|
},
|
|
78578
|
-
initialValue: EMPTY_ARRAY$
|
|
78603
|
+
initialValue: EMPTY_ARRAY$z,
|
|
78579
78604
|
propertyName: "document.inspectors",
|
|
78580
78605
|
reducer: documentInspectorsReducer
|
|
78581
78606
|
}),
|
|
@@ -83907,35 +83932,7 @@ const FieldCopied = defineEvent({
|
|
|
83907
83932
|
name: "Field Pasted",
|
|
83908
83933
|
version: 1,
|
|
83909
83934
|
description: 'User clicked the "Paste field" button in the field action menu or used the Ctrl+V shortcut'
|
|
83910
|
-
});
|
|
83911
|
-
function getSchemaField(schemaType, fieldPath) {
|
|
83912
|
-
if (!fieldPath) return;
|
|
83913
|
-
const paths = fromString(fieldPath), firstPath = paths[0];
|
|
83914
|
-
if (firstPath && isObjectSchemaType(schemaType)) {
|
|
83915
|
-
const field = schemaType?.fields?.find((f) => f.name === firstPath);
|
|
83916
|
-
if (field) {
|
|
83917
|
-
const nextPath = toString(paths.slice(1));
|
|
83918
|
-
return nextPath ? getSchemaField(field.type, nextPath) : field;
|
|
83919
|
-
}
|
|
83920
|
-
}
|
|
83921
|
-
}
|
|
83922
|
-
function resolveSchemaTypeForPath(baseType, path, documentValue) {
|
|
83923
|
-
if (!baseType) return;
|
|
83924
|
-
let currentField = baseType;
|
|
83925
|
-
return path.forEach((segment, index) => {
|
|
83926
|
-
const nextPath = path.slice(0, index + 1);
|
|
83927
|
-
if (isKeySegment(segment) || isIndexSegment(segment)) {
|
|
83928
|
-
const arraySchemaType = currentField, itemValue = getValueAtPath(documentValue, nextPath), item = getItemType(arraySchemaType, itemValue);
|
|
83929
|
-
if (item) {
|
|
83930
|
-
currentField = item;
|
|
83931
|
-
return;
|
|
83932
|
-
}
|
|
83933
|
-
}
|
|
83934
|
-
const nextField = getSchemaField(currentField, toString(nextPath.length > 1 ? nextPath.slice(-1) : nextPath));
|
|
83935
|
-
nextField?.type && (currentField = nextField.type);
|
|
83936
|
-
}), currentField;
|
|
83937
|
-
}
|
|
83938
|
-
const MIMETYPE_SANITY_CLIPBOARD = "web application/vnd.sanity-clipboard-item+json", MIMETYPE_HTML = "text/html", MIMETYPE_PLAINTEXT = "text/plain", SUPPORTS_SANITY_CLIPBOARD_MIMETYPE = typeof ClipboardItem < "u" && "supports" in ClipboardItem && ClipboardItem.supports(MIMETYPE_SANITY_CLIPBOARD), BASE64_ATTR = "sanity-clipboard-base64";
|
|
83935
|
+
}), MIMETYPE_SANITY_CLIPBOARD = "web application/vnd.sanity-clipboard-item+json", MIMETYPE_HTML = "text/html", MIMETYPE_PLAINTEXT = "text/plain", SUPPORTS_SANITY_CLIPBOARD_MIMETYPE = typeof ClipboardItem < "u" && "supports" in ClipboardItem && ClipboardItem.supports(MIMETYPE_SANITY_CLIPBOARD), BASE64_ATTR = "sanity-clipboard-base64";
|
|
83939
83936
|
async function getClipboardItem() {
|
|
83940
83937
|
const items = await navigator.clipboard.read();
|
|
83941
83938
|
for (const item of items) {
|
|
@@ -84851,7 +84848,7 @@ function PerspectiveProvider(t0) {
|
|
|
84851
84848
|
children,
|
|
84852
84849
|
selectedPerspectiveName,
|
|
84853
84850
|
excludedPerspectives: t1
|
|
84854
|
-
} = t0, excludedPerspectives = t1 === void 0 ? EMPTY_ARRAY$
|
|
84851
|
+
} = t0, excludedPerspectives = t1 === void 0 ? EMPTY_ARRAY$z : t1, {
|
|
84855
84852
|
data: releases2
|
|
84856
84853
|
} = useActiveReleases(), {
|
|
84857
84854
|
document: t2
|
|
@@ -84901,7 +84898,7 @@ function GlobalPerspectiveProvider(t0) {
|
|
|
84901
84898
|
let selectedPerspectiveName = router.stickyParams.perspective;
|
|
84902
84899
|
!isDraftModelEnabled && typeof selectedPerspectiveName > "u" && (selectedPerspectiveName = PUBLISHED$1);
|
|
84903
84900
|
let t3;
|
|
84904
|
-
$[0] !== router.stickyParams.excludedPerspectives ? (t3 = router.stickyParams.excludedPerspectives?.split(",") || EMPTY_ARRAY$
|
|
84901
|
+
$[0] !== router.stickyParams.excludedPerspectives ? (t3 = router.stickyParams.excludedPerspectives?.split(",") || EMPTY_ARRAY$z, $[0] = router.stickyParams.excludedPerspectives, $[1] = t3) : t3 = $[1];
|
|
84905
84902
|
const excludedPerspectives = t3;
|
|
84906
84903
|
let t4;
|
|
84907
84904
|
return $[2] !== children || $[3] !== excludedPerspectives || $[4] !== selectedPerspectiveName ? (t4 = /* @__PURE__ */ jsx(PerspectiveProvider, { selectedPerspectiveName, excludedPerspectives, children }), $[2] = children, $[3] = excludedPerspectives, $[4] = selectedPerspectiveName, $[5] = t4) : t4 = $[5], t4;
|
|
@@ -85363,25 +85360,17 @@ const purifyConfig = {
|
|
|
85363
85360
|
"feSpotLight",
|
|
85364
85361
|
"feTile",
|
|
85365
85362
|
"feTurbulence"
|
|
85366
|
-
]
|
|
85367
|
-
/**
|
|
85368
|
-
* Required to allow for the use of `style` tags,
|
|
85369
|
-
* namely rendering the style tags from `styled-components`
|
|
85370
|
-
*/
|
|
85371
|
-
FORCE_BODY: !0
|
|
85363
|
+
]
|
|
85372
85364
|
};
|
|
85373
85365
|
function normalizeIcon(Icon2, title, subtitle = "") {
|
|
85374
85366
|
return isValidElementType(Icon2) ? /* @__PURE__ */ jsx(Icon2, {}) : isValidElement(Icon2) ? Icon2 : createDefaultIcon(title, subtitle);
|
|
85375
85367
|
}
|
|
85376
85368
|
const resolveIcon = (props2) => {
|
|
85377
|
-
const sheet = new ServerStyleSheet();
|
|
85378
85369
|
try {
|
|
85379
|
-
const iconElement = normalizeIcon(props2.icon, props2.title, props2.subtitle), wrappedElement = /* @__PURE__ */ jsx(ThemeProvider, { theme: props2.theme, children: iconElement }),
|
|
85370
|
+
const iconElement = normalizeIcon(props2.icon, props2.title, props2.subtitle), wrappedElement = /* @__PURE__ */ jsx(ThemeProvider, { theme: props2.theme, children: iconElement }), html = renderToStaticMarkup(wrappedElement).trim();
|
|
85380
85371
|
return DOMPurify.sanitize(html, purifyConfig);
|
|
85381
85372
|
} catch {
|
|
85382
85373
|
return;
|
|
85383
|
-
} finally {
|
|
85384
|
-
sheet.seal();
|
|
85385
85374
|
}
|
|
85386
85375
|
}, buildId = (
|
|
85387
85376
|
// @ts-expect-error: __SANITY_BUILD_TIMESTAMP__ is a global env variable set by the vite config
|
|
@@ -88400,7 +88389,7 @@ function PopoverDialog(props2) {
|
|
|
88400
88389
|
t5
|
|
88401
88390
|
] }) }), $[13] = containerRef, $[14] = t4, $[15] = t5, $[16] = t6) : t6 = $[16];
|
|
88402
88391
|
let t7;
|
|
88403
|
-
$[17] !== t6 || $[18] !== width ? (t7 = /* @__PURE__ */ jsx(PopoverContainer, { width, children: t6 }), $[17] = t6, $[18] = width, $[19] = t7) : t7 = $[19];
|
|
88392
|
+
$[17] !== t6 || $[18] !== width ? (t7 = /* @__PURE__ */ jsx(PopoverContainer, { width, "data-testid": "popover-dialog", children: t6 }), $[17] = t6, $[18] = width, $[19] = t7) : t7 = $[19];
|
|
88404
88393
|
const content = t7;
|
|
88405
88394
|
let t8;
|
|
88406
88395
|
return $[20] !== content || $[21] !== referenceElement ? (t8 = /* @__PURE__ */ jsx(StyledPopover, { portal: !0, constrainSize: !0, content, open: !0, referenceElement }), $[20] = content, $[21] = referenceElement, $[22] = t8) : t8 = $[22], t8;
|
|
@@ -90040,11 +90029,12 @@ export {
|
|
|
90040
90029
|
DocumentPreviewPresence,
|
|
90041
90030
|
DocumentStatus,
|
|
90042
90031
|
DocumentStatusIndicator,
|
|
90043
|
-
EMPTY_ARRAY$
|
|
90032
|
+
EMPTY_ARRAY$z as EMPTY_ARRAY,
|
|
90044
90033
|
EMPTY_OBJECT,
|
|
90045
90034
|
EditPortal,
|
|
90046
90035
|
EditScheduleForm,
|
|
90047
90036
|
EmailInput,
|
|
90037
|
+
EnhancedObjectDialog,
|
|
90048
90038
|
ErrorActions,
|
|
90049
90039
|
ErrorMessage,
|
|
90050
90040
|
Event$1 as Event,
|
|
@@ -90371,7 +90361,7 @@ export {
|
|
|
90371
90361
|
listenQuery,
|
|
90372
90362
|
matchWorkspace,
|
|
90373
90363
|
newDraftFrom,
|
|
90374
|
-
noop$
|
|
90364
|
+
noop$6 as noop,
|
|
90375
90365
|
normalizeIndexSegment,
|
|
90376
90366
|
normalizeIndexTupleSegment,
|
|
90377
90367
|
normalizeKeySegment,
|
|
@@ -90445,6 +90435,7 @@ export {
|
|
|
90445
90435
|
useCurrentUser,
|
|
90446
90436
|
useDataset,
|
|
90447
90437
|
useDateTimeFormat,
|
|
90438
|
+
useDialogStack,
|
|
90448
90439
|
useDidUpdate,
|
|
90449
90440
|
useDiffAnnotationColor,
|
|
90450
90441
|
useDocumentChange,
|