sanity 5.22.0-next.26 → 5.22.0-next.28
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/version.js +2 -2
- package/lib/cli.d.ts +1 -1
- package/lib/index.js +86 -59
- package/lib/index.js.map +1 -1
- package/package.json +12 -12
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var version = "5.22.0-next.
|
|
1
|
+
var version = "5.22.0-next.28+14f7b82b7c";
|
|
2
2
|
let buildVersion;
|
|
3
3
|
try {
|
|
4
4
|
buildVersion = process.env.PKG_BUILD_VERSION;
|
|
@@ -7,7 +7,7 @@ try {
|
|
|
7
7
|
try {
|
|
8
8
|
buildVersion = buildVersion || // This is replaced by `@sanity/pkg-utils` at build time
|
|
9
9
|
// and must always be references by its full static name, e.g. no optional chaining, no `if (process && process.env)` etc.
|
|
10
|
-
"5.22.0-next.
|
|
10
|
+
"5.22.0-next.28+14f7b82b7c";
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
const SANITY_VERSION = buildVersion || `${version}-dev`;
|
package/lib/cli.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { CliClientOptions, CliConfig, createCliConfig, defineCliConfig, getCliClient } from "@sanity/cli";
|
|
2
|
-
import { StudioEnvVariablesOptions, getStudioEnvironmentVariables } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+cli@6.
|
|
2
|
+
import { StudioEnvVariablesOptions, getStudioEnvironmentVariables } from "/home/runner/work/sanity/sanity/node_modules/.pnpm/@sanity+cli@6.4.0_@emotion+is-prop-valid@1.4.0_@sanity+styled-components@6.1.24_react-d_d58cc76ce5550790ce264ba422c17e42/node_modules/@sanity/cli/dist/exports/_internal.js";
|
|
3
3
|
export { type CliClientOptions, type CliConfig, type StudioEnvVariablesOptions, createCliConfig, defineCliConfig, getCliClient, getStudioEnvironmentVariables };
|
package/lib/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx, jsxs, Fragment as Fragment$1 } from "react/jsx-runtime";
|
|
2
2
|
import { c } from "react/compiler-runtime";
|
|
3
|
-
import { Badge, Grid, Box, Stack, rem, Text as Text$1, Layer, Card, Spinner, Flex, Dialog, useTheme, Button as Button$1, Skeleton, Heading, useToast, Avatar, AvatarStack, Inline, Breadcrumbs, useClickOutsideEvent, Code, useLayer, Portal, LayerProvider, MenuDivider, Menu, useElementRect, Autocomplete, useMediaIndex, useGlobalKeyDown, Checkbox as Checkbox$1, Switch as Switch$1, TextInput as TextInput$1, Select, ElementQuery, TabList, rgba, MenuItem as MenuItem$1,
|
|
3
|
+
import { Badge, Grid, Box, Stack, rem, Text as Text$1, Layer, Card, Spinner, Flex, Dialog, useTheme, Button as Button$1, Skeleton, Heading, useToast, Avatar, AvatarStack, Inline, Breadcrumbs, useClickOutsideEvent, Code, useLayer, Portal, LayerProvider, MenuDivider, Menu, useElementRect, useBoundaryElement, Autocomplete, useMediaIndex, useGlobalKeyDown, Checkbox as Checkbox$1, Switch as Switch$1, TextInput as TextInput$1, Select, ElementQuery, TabList, rgba, MenuItem as MenuItem$1, BoundaryElementProvider, usePortal, PortalProvider, _responsive, useRootTheme, useArrayProp, TextArea, TextSkeleton, useElementSize, isHTMLElement, Radio, TabPanel, Container as Container$3, studioTheme, Label, AvatarCounter, ThemeColorProvider, DialogProvider, focusLastDescendant, focusFirstDescendant, VirtualList as VirtualList$1, usePrefersDark, ThemeProvider, ToastProvider } from "@sanity/ui";
|
|
4
4
|
import * as PathUtils from "@sanity/util/paths";
|
|
5
5
|
import { toString, FOCUS_TERMINATOR, startsWith, isEqual as isEqual$2, pathFor, fromString, get as get$1, trimChildPath as trimChildPath$1, trimLeft } from "@sanity/util/paths";
|
|
6
6
|
import React, { forwardRef, useRef, useState, useId, useCallback, useMemo, useImperativeHandle, useEffect, isValidElement, Fragment, cloneElement, memo, useContext, useSyncExternalStore, Suspense, useReducer, startTransition, Component, use as use$2, useLayoutEffect, useEffectEvent, PureComponent, Children, createContext, useDebugValue, useTransition, useInsertionEffect, lazy, useDeferredValue, version, StrictMode } from "react";
|
|
@@ -19727,14 +19727,21 @@ function OptionPreview$2(props2) {
|
|
|
19727
19727
|
let t2;
|
|
19728
19728
|
return $[10] !== documentId || $[11] !== refType || $[12] !== renderPreview || $[13] !== t1 ? (t2 = /* @__PURE__ */ jsx(ReferencePreview, { id: documentId, layout: "default", refType, renderPreview, showTypeLabel: t1 }), $[10] = documentId, $[11] = refType, $[12] = renderPreview, $[13] = t1, $[14] = t2) : t2 = $[14], t2;
|
|
19729
19729
|
}
|
|
19730
|
-
const AUTOCOMPLETE_POPOVER_BOUNDARY = typeof document > "u" ? void 0 : document.documentElement
|
|
19730
|
+
const AUTOCOMPLETE_POPOVER_BOUNDARY = typeof document > "u" ? void 0 : document.documentElement;
|
|
19731
|
+
function useReferenceAutocompletePopoverBoundary(referenceElement) {
|
|
19732
|
+
const {
|
|
19733
|
+
element: contextElement
|
|
19734
|
+
} = useBoundaryElement();
|
|
19735
|
+
return contextElement && referenceElement && contextElement.contains(referenceElement) ? contextElement : AUTOCOMPLETE_POPOVER_BOUNDARY ?? null;
|
|
19736
|
+
}
|
|
19737
|
+
const StyledPopover$6 = styled(Popover).withConfig({
|
|
19731
19738
|
displayName: "StyledPopover",
|
|
19732
19739
|
componentId: "sc-15m5qjt-0"
|
|
19733
19740
|
})`& > div{overflow:auto;-webkit-overflow-scrolling:touch;}`, StyledText$5 = styled(Text$1).withConfig({
|
|
19734
19741
|
displayName: "StyledText",
|
|
19735
19742
|
componentId: "sc-15m5qjt-1"
|
|
19736
19743
|
})`word-break:break-word;`, FALLBACK_PLACEMENTS$3 = ["top-start", "bottom-start"], ReferenceAutocomplete$3 = forwardRef(function(props2, ref) {
|
|
19737
|
-
const $ = c(
|
|
19744
|
+
const $ = c(24), {
|
|
19738
19745
|
focusPath
|
|
19739
19746
|
} = useFormBuilder();
|
|
19740
19747
|
let loading, path, portalRef, referenceElement, restProps, searchString;
|
|
@@ -19750,9 +19757,9 @@ const AUTOCOMPLETE_POPOVER_BOUNDARY = typeof document > "u" ? void 0 : document.
|
|
|
19750
19757
|
$[7] !== focusPath || $[8] !== path ? (t0 = () => !!PathUtils.startsWith(path, focusPath), $[7] = focusPath, $[8] = path, $[9] = t0) : t0 = $[9];
|
|
19751
19758
|
const [autoFocus] = useState(t0), {
|
|
19752
19759
|
t
|
|
19753
|
-
} = useTranslation(), hasResults = props2.options && props2.options.length > 0;
|
|
19760
|
+
} = useTranslation(), hasResults = props2.options && props2.options.length > 0, popoverBoundary = useReferenceAutocompletePopoverBoundary(referenceElement);
|
|
19754
19761
|
let t1;
|
|
19755
|
-
$[10] !== hasResults || $[11] !== loading || $[12] !==
|
|
19762
|
+
$[10] !== hasResults || $[11] !== loading || $[12] !== popoverBoundary || $[13] !== portalRef || $[14] !== referenceElement || $[15] !== searchString || $[16] !== t ? (t1 = (t22, contentRef) => {
|
|
19756
19763
|
const {
|
|
19757
19764
|
content,
|
|
19758
19765
|
hidden,
|
|
@@ -19760,13 +19767,13 @@ const AUTOCOMPLETE_POPOVER_BOUNDARY = typeof document > "u" ? void 0 : document.
|
|
|
19760
19767
|
onMouseEnter,
|
|
19761
19768
|
onMouseLeave
|
|
19762
19769
|
} = t22;
|
|
19763
|
-
return /* @__PURE__ */ jsx(StyledPopover$6, { "data-testid": "autocomplete-popover", placement: "bottom-start", fallbackPlacements: FALLBACK_PLACEMENTS$3, arrow: !1, constrainSize: !0, floatingBoundary:
|
|
19770
|
+
return /* @__PURE__ */ jsx(StyledPopover$6, { "data-testid": "autocomplete-popover", placement: "bottom-start", fallbackPlacements: FALLBACK_PLACEMENTS$3, arrow: !1, constrainSize: !0, floatingBoundary: popoverBoundary, referenceBoundary: popoverBoundary, onMouseEnter, onMouseLeave, content: /* @__PURE__ */ jsx("div", { ref: contentRef, children: hasResults ? content : /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsx(Flex, { align: "center", height: "fill", justify: "center", children: /* @__PURE__ */ jsx(StyledText$5, { align: "center", muted: !0, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "inputs.reference.no-results-for-query", values: {
|
|
19764
19771
|
searchTerm: searchString || ""
|
|
19765
19772
|
} }) }) }) }) }), open: !loading && !hidden, ref: portalRef, portal: !0, referenceElement: referenceElement || inputElement, matchReferenceWidth: !0 });
|
|
19766
|
-
}, $[10] = hasResults, $[11] = loading, $[12] =
|
|
19773
|
+
}, $[10] = hasResults, $[11] = loading, $[12] = popoverBoundary, $[13] = portalRef, $[14] = referenceElement, $[15] = searchString, $[16] = t, $[17] = t1) : t1 = $[17];
|
|
19767
19774
|
const renderPopover = t1;
|
|
19768
19775
|
let t2;
|
|
19769
|
-
return $[
|
|
19776
|
+
return $[18] !== autoFocus || $[19] !== loading || $[20] !== ref || $[21] !== renderPopover || $[22] !== restProps ? (t2 = /* @__PURE__ */ jsx(Autocomplete, { ...restProps, loading, ref, renderPopover, autoFocus }), $[18] = autoFocus, $[19] = loading, $[20] = ref, $[21] = renderPopover, $[22] = restProps, $[23] = t2) : t2 = $[23], t2;
|
|
19770
19777
|
});
|
|
19771
19778
|
function focusRingBorderStyle$2(border) {
|
|
19772
19779
|
return `inset 0 0 0 ${border.width}px ${border.color}`;
|
|
@@ -33105,7 +33112,7 @@ function VirtualizerScrollInstanceProvider(props2) {
|
|
|
33105
33112
|
return $[3] !== props2.children || $[4] !== value ? (t1 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceContext.Provider, { value, children: props2.children }), $[3] = props2.children, $[4] = value, $[5] = t1) : t1 = $[5], t1;
|
|
33106
33113
|
}
|
|
33107
33114
|
function DefaultEditDialog(props2) {
|
|
33108
|
-
const $ = c(
|
|
33115
|
+
const $ = c(16), {
|
|
33109
33116
|
onClose,
|
|
33110
33117
|
children,
|
|
33111
33118
|
title,
|
|
@@ -33117,9 +33124,11 @@ function DefaultEditDialog(props2) {
|
|
|
33117
33124
|
let t2;
|
|
33118
33125
|
$[1] !== children ? (t2 = /* @__PURE__ */ jsx(Box, { ref: containerElement, children }), $[1] = children, $[2] = t2) : t2 = $[2];
|
|
33119
33126
|
let t3;
|
|
33120
|
-
$[3] !== contentElement || $[4] !== t2 ? (t3 = /* @__PURE__ */ jsx(
|
|
33127
|
+
$[3] !== contentElement || $[4] !== t2 ? (t3 = /* @__PURE__ */ jsx(BoundaryElementProvider, { element: contentElement, children: t2 }), $[3] = contentElement, $[4] = t2, $[5] = t3) : t3 = $[5];
|
|
33121
33128
|
let t4;
|
|
33122
|
-
|
|
33129
|
+
$[6] !== contentElement || $[7] !== t3 ? (t4 = /* @__PURE__ */ jsx(PresenceOverlay, { margins: t1, children: /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: contentElement, containerElement, children: t3 }) }), $[6] = contentElement, $[7] = t3, $[8] = t4) : t4 = $[8];
|
|
33130
|
+
let t5;
|
|
33131
|
+
return $[9] !== autoFocus || $[10] !== dialogId || $[11] !== onClose || $[12] !== t4 || $[13] !== title || $[14] !== width ? (t5 = /* @__PURE__ */ jsx(Dialog$1, { header: title, id: dialogId, onClickOutside: onClose, onClose, portal: "default", width, contentRef: setContentElement, "data-testid": "default-edit-object-dialog", __unstable_autoFocus: autoFocus, children: t4 }), $[9] = autoFocus, $[10] = dialogId, $[11] = onClose, $[12] = t4, $[13] = title, $[14] = width, $[15] = t5) : t5 = $[15], t5;
|
|
33123
33132
|
}
|
|
33124
33133
|
const RootPopover = styled(Popover).withConfig({
|
|
33125
33134
|
displayName: "RootPopover",
|
|
@@ -33153,7 +33162,7 @@ function PopoverEditDialog(props2) {
|
|
|
33153
33162
|
return $[2] !== floatingBoundary || $[3] !== referenceBoundary || $[4] !== referenceElement || $[5] !== t1 || $[6] !== width ? (t2 = /* @__PURE__ */ jsx(RootPopover, { content: t1, constrainSize: !0, "data-testid": "popover-edit-dialog", "data-ui": "PopoverEditDialog", fallbackPlacements: POPOVER_FALLBACK_PLACEMENTS$4, floatingBoundary, open: !0, overflow: "auto", placement: "bottom", portal: "default", preventOverflow: !0, referenceBoundary, referenceElement, width, autoFocus: !0 }), $[2] = floatingBoundary, $[3] = referenceBoundary, $[4] = referenceElement, $[5] = t1, $[6] = width, $[7] = t2) : t2 = $[7], t2;
|
|
33154
33163
|
}
|
|
33155
33164
|
function Content(props2) {
|
|
33156
|
-
const $ = c(
|
|
33165
|
+
const $ = c(33), {
|
|
33157
33166
|
onClose,
|
|
33158
33167
|
referenceBoundary,
|
|
33159
33168
|
referenceElement,
|
|
@@ -33176,39 +33185,49 @@ function Content(props2) {
|
|
|
33176
33185
|
$[5] !== referenceElement ? (t3 = () => [referenceElement], $[5] = referenceElement, $[6] = t3) : t3 = $[6];
|
|
33177
33186
|
let t4;
|
|
33178
33187
|
$[7] !== referenceBoundary ? (t4 = () => referenceBoundary, $[7] = referenceBoundary, $[8] = t4) : t4 = $[8], useClickOutsideEvent(handleClose, t3, t4);
|
|
33179
|
-
const [contentElement, setContentElement] = useState(null), containerElement = useRef(null);
|
|
33180
|
-
let t5;
|
|
33181
|
-
$[9]
|
|
33188
|
+
const [contentElement, setContentElement] = useState(null), [boundaryElement, setBoundaryElement] = useState(null), containerElement = useRef(null);
|
|
33189
|
+
let t5, t6;
|
|
33190
|
+
$[9] !== contentElement ? (t5 = () => {
|
|
33191
|
+
if (!contentElement) {
|
|
33192
|
+
setBoundaryElement(null);
|
|
33193
|
+
return;
|
|
33194
|
+
}
|
|
33195
|
+
setBoundaryElement(contentElement.closest('[data-ui="Popover__wrapper"]'));
|
|
33196
|
+
}, t6 = [contentElement], $[9] = contentElement, $[10] = t5, $[11] = t6) : (t5 = $[10], t6 = $[11]), useEffect(t5, t6);
|
|
33197
|
+
let t7;
|
|
33198
|
+
$[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = (element) => {
|
|
33182
33199
|
if (isClosedRef.current)
|
|
33183
33200
|
return !1;
|
|
33184
33201
|
const target = element, portalElements = document.querySelectorAll("[data-portal]");
|
|
33185
33202
|
return !Array.from(portalElements).some((portal) => portal.contains(target)) && !isClosedRef.current ? !1 : !!element.contentEditable || !!containerElement.current?.contains(element);
|
|
33186
|
-
}, $[9] = t5) : t5 = $[9];
|
|
33187
|
-
const handleFocusLockWhiteList = t5;
|
|
33188
|
-
let t6;
|
|
33189
|
-
$[10] !== title ? (t6 = /* @__PURE__ */ jsx(Box, { flex: 1, padding: 2, children: /* @__PURE__ */ jsx(Text$1, { weight: "medium", children: title }) }), $[10] = title, $[11] = t6) : t6 = $[11];
|
|
33190
|
-
let t7;
|
|
33191
|
-
$[12] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t7 = {
|
|
33192
|
-
content: "Close"
|
|
33193
33203
|
}, $[12] = t7) : t7 = $[12];
|
|
33204
|
+
const handleFocusLockWhiteList = t7;
|
|
33194
33205
|
let t8;
|
|
33195
|
-
$[13] !==
|
|
33206
|
+
$[13] !== title ? (t8 = /* @__PURE__ */ jsx(Box, { flex: 1, padding: 2, children: /* @__PURE__ */ jsx(Text$1, { weight: "medium", children: title }) }), $[13] = title, $[14] = t8) : t8 = $[14];
|
|
33196
33207
|
let t9;
|
|
33197
|
-
$[15]
|
|
33198
|
-
|
|
33199
|
-
|
|
33200
|
-
] }) }), $[15] = t6, $[16] = t8, $[17] = t9) : t9 = $[17];
|
|
33208
|
+
$[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t9 = {
|
|
33209
|
+
content: "Close"
|
|
33210
|
+
}, $[15] = t9) : t9 = $[15];
|
|
33201
33211
|
let t10;
|
|
33202
|
-
$[
|
|
33212
|
+
$[16] !== handleClose ? (t10 = /* @__PURE__ */ jsx(Button, { autoFocus: !0, icon: CloseIcon, mode: "bleed", onClick: handleClose, tooltipProps: t9, "data-testid": "close-popover-edit-dialog-button" }), $[16] = handleClose, $[17] = t10) : t10 = $[17];
|
|
33203
33213
|
let t11;
|
|
33204
|
-
$[19] !==
|
|
33214
|
+
$[18] !== t10 || $[19] !== t8 ? (t11 = /* @__PURE__ */ jsx(ContentHeaderBox, { flex: "none", padding: 1, children: /* @__PURE__ */ jsxs(Flex, { align: "center", children: [
|
|
33215
|
+
t8,
|
|
33216
|
+
t10
|
|
33217
|
+
] }) }), $[18] = t10, $[19] = t8, $[20] = t11) : t11 = $[20];
|
|
33205
33218
|
let t12;
|
|
33206
|
-
$[21]
|
|
33207
|
-
t9,
|
|
33208
|
-
t11
|
|
33209
|
-
] }) }), $[21] = t11, $[22] = t9, $[23] = t12) : t12 = $[23];
|
|
33219
|
+
$[21] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t12 = [0, 0, 1, 0], $[21] = t12) : t12 = $[21];
|
|
33210
33220
|
let t13;
|
|
33211
|
-
|
|
33221
|
+
$[22] !== props2.children ? (t13 = /* @__PURE__ */ jsx(ContentScrollerBox, { flex: 1, children: /* @__PURE__ */ jsx(PresenceOverlay, { margins: t12, children: /* @__PURE__ */ jsx(Box, { padding: 3, ref: setContentElement, children: props2.children }) }) }), $[22] = props2.children, $[23] = t13) : t13 = $[23];
|
|
33222
|
+
let t14;
|
|
33223
|
+
$[24] !== t11 || $[25] !== t13 ? (t14 = /* @__PURE__ */ jsx(FocusLock, { autoFocus: !0, whiteList: handleFocusLockWhiteList, children: /* @__PURE__ */ jsxs(Flex, { as: NoopContainer, ref: containerElement, direction: "column", height: "fill", children: [
|
|
33224
|
+
t11,
|
|
33225
|
+
t13
|
|
33226
|
+
] }) }), $[24] = t11, $[25] = t13, $[26] = t14) : t14 = $[26];
|
|
33227
|
+
let t15;
|
|
33228
|
+
$[27] !== boundaryElement || $[28] !== t14 ? (t15 = /* @__PURE__ */ jsx(BoundaryElementProvider, { element: boundaryElement, children: t14 }), $[27] = boundaryElement, $[28] = t14, $[29] = t15) : t15 = $[29];
|
|
33229
|
+
let t16;
|
|
33230
|
+
return $[30] !== contentElement || $[31] !== t15 ? (t16 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: contentElement, containerElement, children: t15 }), $[30] = contentElement, $[31] = t15, $[32] = t16) : t16 = $[32], t16;
|
|
33212
33231
|
}
|
|
33213
33232
|
function ObjectEditModal(props2) {
|
|
33214
33233
|
const $ = c(28), {
|
|
@@ -35636,7 +35655,7 @@ const StyledPopover$5 = styled(Popover).withConfig({
|
|
|
35636
35655
|
displayName: "StyledText",
|
|
35637
35656
|
componentId: "sc-1aid2lb-1"
|
|
35638
35657
|
})`word-break:break-word;`, FALLBACK_PLACEMENTS$2 = ["top-start", "bottom-start"], ReferenceAutocomplete$2 = forwardRef(function(props2, ref) {
|
|
35639
|
-
const $ = c(
|
|
35658
|
+
const $ = c(18);
|
|
35640
35659
|
let loading, portalRef, referenceElement, restProps, searchString;
|
|
35641
35660
|
$[0] !== props2 ? ({
|
|
35642
35661
|
searchString,
|
|
@@ -35647,9 +35666,9 @@ const StyledPopover$5 = styled(Popover).withConfig({
|
|
|
35647
35666
|
} = props2, $[0] = props2, $[1] = loading, $[2] = portalRef, $[3] = referenceElement, $[4] = restProps, $[5] = searchString) : (loading = $[1], portalRef = $[2], referenceElement = $[3], restProps = $[4], searchString = $[5]);
|
|
35648
35667
|
const {
|
|
35649
35668
|
t
|
|
35650
|
-
} = useTranslation(), hasResults = props2.options && props2.options.length > 0;
|
|
35669
|
+
} = useTranslation(), hasResults = props2.options && props2.options.length > 0, popoverBoundary = useReferenceAutocompletePopoverBoundary(referenceElement);
|
|
35651
35670
|
let t0;
|
|
35652
|
-
$[6] !== hasResults || $[7] !== loading || $[8] !==
|
|
35671
|
+
$[6] !== hasResults || $[7] !== loading || $[8] !== popoverBoundary || $[9] !== portalRef || $[10] !== referenceElement || $[11] !== searchString || $[12] !== t ? (t0 = (t12, contentRef) => {
|
|
35653
35672
|
const {
|
|
35654
35673
|
content,
|
|
35655
35674
|
hidden,
|
|
@@ -35657,13 +35676,13 @@ const StyledPopover$5 = styled(Popover).withConfig({
|
|
|
35657
35676
|
onMouseEnter,
|
|
35658
35677
|
onMouseLeave
|
|
35659
35678
|
} = t12;
|
|
35660
|
-
return /* @__PURE__ */ jsx(StyledPopover$5, { "data-testid": "autocomplete-popover", placement: "bottom-start", fallbackPlacements: FALLBACK_PLACEMENTS$2, arrow: !1, constrainSize: !0, floatingBoundary:
|
|
35679
|
+
return /* @__PURE__ */ jsx(StyledPopover$5, { "data-testid": "autocomplete-popover", placement: "bottom-start", fallbackPlacements: FALLBACK_PLACEMENTS$2, arrow: !1, constrainSize: !0, floatingBoundary: popoverBoundary, referenceBoundary: popoverBoundary, onMouseEnter, onMouseLeave, content: /* @__PURE__ */ jsx("div", { ref: contentRef, children: hasResults ? content : /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsx(Flex, { align: "center", height: "fill", justify: "center", children: /* @__PURE__ */ jsx(StyledText$4, { align: "center", muted: !0, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "inputs.reference.no-results-for-query", values: {
|
|
35661
35680
|
searchTerm: searchString || ""
|
|
35662
35681
|
} }) }) }) }) }), open: !loading && !hidden, ref: portalRef, portal: !0, referenceElement: referenceElement || inputElement, matchReferenceWidth: !0 });
|
|
35663
|
-
}, $[6] = hasResults, $[7] = loading, $[8] =
|
|
35682
|
+
}, $[6] = hasResults, $[7] = loading, $[8] = popoverBoundary, $[9] = portalRef, $[10] = referenceElement, $[11] = searchString, $[12] = t, $[13] = t0) : t0 = $[13];
|
|
35664
35683
|
const renderPopover = t0;
|
|
35665
35684
|
let t1;
|
|
35666
|
-
return $[
|
|
35685
|
+
return $[14] !== ref || $[15] !== renderPopover || $[16] !== restProps ? (t1 = /* @__PURE__ */ jsx(Autocomplete, { ...restProps, ref, renderPopover }), $[14] = ref, $[15] = renderPopover, $[16] = restProps, $[17] = t1) : t1 = $[17], t1;
|
|
35667
35686
|
}), INITIAL_SEARCH_STATE$2 = {
|
|
35668
35687
|
hits: [],
|
|
35669
35688
|
isLoading: !1
|
|
@@ -36240,7 +36259,7 @@ const StyledPopover$4 = styled(Popover).withConfig({
|
|
|
36240
36259
|
displayName: "StyledText",
|
|
36241
36260
|
componentId: "sc-1u5fo8k-1"
|
|
36242
36261
|
})`word-break:break-word;`, FALLBACK_PLACEMENTS$1 = ["top-start", "bottom-start"], ReferenceAutocomplete$1 = forwardRef(function(props2, ref) {
|
|
36243
|
-
const $ = c(
|
|
36262
|
+
const $ = c(18);
|
|
36244
36263
|
let loading, portalRef, referenceElement, restProps, searchString;
|
|
36245
36264
|
$[0] !== props2 ? ({
|
|
36246
36265
|
searchString,
|
|
@@ -36251,9 +36270,9 @@ const StyledPopover$4 = styled(Popover).withConfig({
|
|
|
36251
36270
|
} = props2, $[0] = props2, $[1] = loading, $[2] = portalRef, $[3] = referenceElement, $[4] = restProps, $[5] = searchString) : (loading = $[1], portalRef = $[2], referenceElement = $[3], restProps = $[4], searchString = $[5]);
|
|
36252
36271
|
const {
|
|
36253
36272
|
t
|
|
36254
|
-
} = useTranslation(), hasResults = props2.options && props2.options.length > 0;
|
|
36273
|
+
} = useTranslation(), hasResults = props2.options && props2.options.length > 0, popoverBoundary = useReferenceAutocompletePopoverBoundary(referenceElement);
|
|
36255
36274
|
let t0;
|
|
36256
|
-
$[6] !== hasResults || $[7] !== loading || $[8] !==
|
|
36275
|
+
$[6] !== hasResults || $[7] !== loading || $[8] !== popoverBoundary || $[9] !== portalRef || $[10] !== referenceElement || $[11] !== searchString || $[12] !== t ? (t0 = (t12, contentRef) => {
|
|
36257
36276
|
const {
|
|
36258
36277
|
content,
|
|
36259
36278
|
hidden,
|
|
@@ -36261,13 +36280,13 @@ const StyledPopover$4 = styled(Popover).withConfig({
|
|
|
36261
36280
|
onMouseEnter,
|
|
36262
36281
|
onMouseLeave
|
|
36263
36282
|
} = t12;
|
|
36264
|
-
return /* @__PURE__ */ jsx(StyledPopover$4, { "data-testid": "autocomplete-popover", placement: "bottom-start", fallbackPlacements: FALLBACK_PLACEMENTS$1, arrow: !1, constrainSize: !0, floatingBoundary:
|
|
36283
|
+
return /* @__PURE__ */ jsx(StyledPopover$4, { "data-testid": "autocomplete-popover", placement: "bottom-start", fallbackPlacements: FALLBACK_PLACEMENTS$1, arrow: !1, constrainSize: !0, floatingBoundary: popoverBoundary, referenceBoundary: popoverBoundary, onMouseEnter, onMouseLeave, content: /* @__PURE__ */ jsx("div", { ref: contentRef, children: hasResults ? content : /* @__PURE__ */ jsx(Box, { padding: 4, children: /* @__PURE__ */ jsx(Flex, { align: "center", height: "fill", justify: "center", children: /* @__PURE__ */ jsx(StyledText$3, { align: "center", muted: !0, children: /* @__PURE__ */ jsx(Translate, { t, i18nKey: "inputs.reference.no-results-for-query", values: {
|
|
36265
36284
|
searchTerm: searchString || ""
|
|
36266
36285
|
} }) }) }) }) }), open: !loading && !hidden, ref: portalRef, portal: !0, referenceElement: referenceElement || inputElement, matchReferenceWidth: !0 });
|
|
36267
|
-
}, $[6] = hasResults, $[7] = loading, $[8] =
|
|
36286
|
+
}, $[6] = hasResults, $[7] = loading, $[8] = popoverBoundary, $[9] = portalRef, $[10] = referenceElement, $[11] = searchString, $[12] = t, $[13] = t0) : t0 = $[13];
|
|
36268
36287
|
const renderPopover = t0;
|
|
36269
36288
|
let t1;
|
|
36270
|
-
return $[
|
|
36289
|
+
return $[14] !== ref || $[15] !== renderPopover || $[16] !== restProps ? (t1 = /* @__PURE__ */ jsx(Autocomplete, { ...restProps, ref, renderPopover }), $[14] = ref, $[15] = renderPopover, $[16] = restProps, $[17] = t1) : t1 = $[17], t1;
|
|
36271
36290
|
}), INITIAL_SEARCH_STATE$1 = {
|
|
36272
36291
|
hits: [],
|
|
36273
36292
|
isLoading: !1
|
|
@@ -60205,7 +60224,7 @@ function onDrop$1(event) {
|
|
|
60205
60224
|
return event.stopPropagation();
|
|
60206
60225
|
}
|
|
60207
60226
|
function EditPortal(props2) {
|
|
60208
|
-
const $ = c(
|
|
60227
|
+
const $ = c(27), {
|
|
60209
60228
|
children,
|
|
60210
60229
|
header,
|
|
60211
60230
|
onClose,
|
|
@@ -60218,14 +60237,18 @@ function EditPortal(props2) {
|
|
|
60218
60237
|
if (type === "dialog") {
|
|
60219
60238
|
const t12 = props2.id || "";
|
|
60220
60239
|
let t22;
|
|
60221
|
-
$[2] !== contents || $[3] !==
|
|
60222
|
-
let
|
|
60223
|
-
|
|
60240
|
+
$[2] !== contents || $[3] !== documentScrollElement ? (t22 = /* @__PURE__ */ jsx(BoundaryElementProvider, { element: documentScrollElement, children: contents }), $[2] = contents, $[3] = documentScrollElement, $[4] = t22) : t22 = $[4];
|
|
60241
|
+
let t32;
|
|
60242
|
+
$[5] !== header || $[6] !== onClose || $[7] !== props2.autofocus || $[8] !== t12 || $[9] !== t22 || $[10] !== width ? (t32 = /* @__PURE__ */ jsx(Dialog$1, { __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: t22 }), $[5] = header, $[6] = onClose, $[7] = props2.autofocus, $[8] = t12, $[9] = t22, $[10] = width, $[11] = t32) : t32 = $[11];
|
|
60243
|
+
let t4;
|
|
60244
|
+
return $[12] !== documentScrollElement || $[13] !== t32 ? (t4 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t32 }), $[12] = documentScrollElement, $[13] = t32, $[14] = t4) : t4 = $[14], t4;
|
|
60224
60245
|
}
|
|
60225
60246
|
let t1;
|
|
60226
|
-
$[
|
|
60247
|
+
$[15] !== contents || $[16] !== documentScrollElement ? (t1 = /* @__PURE__ */ jsx(BoundaryElementProvider, { element: documentScrollElement, children: contents }), $[15] = contents, $[16] = documentScrollElement, $[17] = t1) : t1 = $[17];
|
|
60227
60248
|
let t2;
|
|
60228
|
-
|
|
60249
|
+
$[18] !== documentScrollElement || $[19] !== t1 ? (t2 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t1 }), $[18] = documentScrollElement, $[19] = t1, $[20] = t2) : t2 = $[20];
|
|
60250
|
+
let t3;
|
|
60251
|
+
return $[21] !== header || $[22] !== onClose || $[23] !== props2.legacy_referenceElement || $[24] !== t2 || $[25] !== width ? (t3 = /* @__PURE__ */ jsx(PopoverDialog, { header, onClose, referenceElement: props2.legacy_referenceElement, width, containerRef: setDocumentScrollElement, children: t2 }), $[21] = header, $[22] = onClose, $[23] = props2.legacy_referenceElement, $[24] = t2, $[25] = width, $[26] = t3) : t3 = $[26], t3;
|
|
60229
60252
|
}
|
|
60230
60253
|
const noop$1 = () => {
|
|
60231
60254
|
};
|
|
@@ -60680,7 +60703,7 @@ function onDrop(event) {
|
|
|
60680
60703
|
return event.stopPropagation();
|
|
60681
60704
|
}
|
|
60682
60705
|
function EnhancedObjectDialog(props2) {
|
|
60683
|
-
const $ = c(
|
|
60706
|
+
const $ = c(61), {
|
|
60684
60707
|
children,
|
|
60685
60708
|
header,
|
|
60686
60709
|
type,
|
|
@@ -60748,18 +60771,22 @@ function EnhancedObjectDialog(props2) {
|
|
|
60748
60771
|
const handleCompleteDialogClose = t9;
|
|
60749
60772
|
if (useGlobalKeyDown(handleGlobalKeyDown), type === "dialog") {
|
|
60750
60773
|
const t102 = !isTop, t112 = isTop ? props2.autofocus : !1;
|
|
60751
|
-
let
|
|
60752
|
-
$[29] !== currentPath || $[30] !== handleStackedDialogClose || $[31] !== navigateTo ? (
|
|
60774
|
+
let t122;
|
|
60775
|
+
$[29] !== currentPath || $[30] !== handleStackedDialogClose || $[31] !== navigateTo ? (t122 = /* @__PURE__ */ jsx(DialogBreadcrumbs, { currentPath, onNavigate: navigateTo, onClose: handleStackedDialogClose }), $[29] = currentPath, $[30] = handleStackedDialogClose, $[31] = navigateTo, $[32] = t122) : t122 = $[32];
|
|
60753
60776
|
const t13 = !shouldDisableAnimation;
|
|
60754
60777
|
let t14;
|
|
60755
|
-
$[33] !== contents || $[34] !==
|
|
60778
|
+
$[33] !== contents || $[34] !== documentScrollElement ? (t14 = /* @__PURE__ */ jsx(BoundaryElementProvider, { element: documentScrollElement, children: contents }), $[33] = contents, $[34] = documentScrollElement, $[35] = t14) : t14 = $[35];
|
|
60756
60779
|
let t15;
|
|
60757
|
-
|
|
60780
|
+
$[36] !== dialogId || $[37] !== handleCompleteDialogClose || $[38] !== handleStackedDialogClose || $[39] !== t102 || $[40] !== t112 || $[41] !== t122 || $[42] !== t13 || $[43] !== t14 || $[44] !== width ? (t15 = /* @__PURE__ */ jsx(StyledDialog$2, { $isHidden: t102, __unstable_autoFocus: t112, contentRef: setDocumentScrollElement, "data-testid": "nested-object-dialog", header: t122, id: dialogId, onClose: handleStackedDialogClose, onDragEnter, onDrop, width, animate: t13, onClickOutside: handleCompleteDialogClose, children: t14 }), $[36] = dialogId, $[37] = handleCompleteDialogClose, $[38] = handleStackedDialogClose, $[39] = t102, $[40] = t112, $[41] = t122, $[42] = t13, $[43] = t14, $[44] = width, $[45] = t15) : t15 = $[45];
|
|
60781
|
+
let t16;
|
|
60782
|
+
return $[46] !== documentScrollElement || $[47] !== t15 ? (t16 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t15 }), $[46] = documentScrollElement, $[47] = t15, $[48] = t16) : t16 = $[48], t16;
|
|
60758
60783
|
}
|
|
60759
60784
|
let t10;
|
|
60760
|
-
$[
|
|
60785
|
+
$[49] !== contents || $[50] !== documentScrollElement ? (t10 = /* @__PURE__ */ jsx(BoundaryElementProvider, { element: documentScrollElement, children: contents }), $[49] = contents, $[50] = documentScrollElement, $[51] = t10) : t10 = $[51];
|
|
60761
60786
|
let t11;
|
|
60762
|
-
|
|
60787
|
+
$[52] !== handleStackedDialogClose || $[53] !== header || $[54] !== props2.legacy_referenceElement || $[55] !== t10 || $[56] !== width ? (t11 = /* @__PURE__ */ jsx(PopoverDialog, { header, onClose: handleStackedDialogClose, width, containerRef: setDocumentScrollElement, referenceElement: props2.legacy_referenceElement, children: t10 }), $[52] = handleStackedDialogClose, $[53] = header, $[54] = props2.legacy_referenceElement, $[55] = t10, $[56] = width, $[57] = t11) : t11 = $[57];
|
|
60788
|
+
let t12;
|
|
60789
|
+
return $[58] !== documentScrollElement || $[59] !== t11 ? (t12 = /* @__PURE__ */ jsx(VirtualizerScrollInstanceProvider, { scrollElement: documentScrollElement, containerElement, children: t11 }), $[58] = documentScrollElement, $[59] = t11, $[60] = t12) : t12 = $[60], t12;
|
|
60763
60790
|
}
|
|
60764
60791
|
function isObjectInputProps(inputProps) {
|
|
60765
60792
|
return isObjectSchemaType(inputProps.schemaType);
|