sanity 5.28.1-next.3 → 5.28.1-next.5
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/index.js +99 -125
- package/lib/index.js.map +1 -1
- package/package.json +11 -11
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var version = "5.28.1-next.
|
|
1
|
+
var version = "5.28.1-next.5+34982cf0e1";
|
|
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.28.1-next.
|
|
10
|
+
"5.28.1-next.5+34982cf0e1";
|
|
11
11
|
} catch {
|
|
12
12
|
}
|
|
13
13
|
const SANITY_VERSION = buildVersion || `${version}-dev`;
|
package/lib/index.js
CHANGED
|
@@ -38571,7 +38571,7 @@ function enqueueAssetAccessPolicyFetch(assetRef, client) {
|
|
|
38571
38571
|
return resolveAssetPolicyLoader(client, libraryId).load(assetId);
|
|
38572
38572
|
}
|
|
38573
38573
|
function useAccessPolicy(params) {
|
|
38574
|
-
const $ = c(
|
|
38574
|
+
const $ = c(5), {
|
|
38575
38575
|
client,
|
|
38576
38576
|
source
|
|
38577
38577
|
} = params;
|
|
@@ -38591,26 +38591,8 @@ function useAccessPolicy(params) {
|
|
|
38591
38591
|
const options = t2, {
|
|
38592
38592
|
data: cdnAccessPolicy,
|
|
38593
38593
|
isLoading
|
|
38594
|
-
} = useSWR(requestKey, fetcher, options)
|
|
38595
|
-
|
|
38596
|
-
} = useProjectDatasets();
|
|
38597
|
-
if (ref)
|
|
38598
|
-
return canCheck ? isLoading ? "checking" : cdnAccessPolicy ?? "unknown" : "unknown";
|
|
38599
|
-
let t3;
|
|
38600
|
-
$[5] !== client ? (t3 = client.config(), $[5] = client, $[6] = t3) : t3 = $[6];
|
|
38601
|
-
const datasetName = t3.dataset;
|
|
38602
|
-
if (!datasetName)
|
|
38603
|
-
return "public";
|
|
38604
|
-
if (datasets === null)
|
|
38605
|
-
return "checking";
|
|
38606
|
-
let t4;
|
|
38607
|
-
if ($[7] !== datasetName || $[8] !== datasets) {
|
|
38608
|
-
let t5;
|
|
38609
|
-
$[10] !== datasetName ? (t5 = (entry) => entry.name === datasetName, $[10] = datasetName, $[11] = t5) : t5 = $[11], t4 = datasets.find(t5), $[7] = datasetName, $[8] = datasets, $[9] = t4;
|
|
38610
|
-
} else
|
|
38611
|
-
t4 = $[9];
|
|
38612
|
-
const datasetEntry = t4;
|
|
38613
|
-
return datasetEntry ? datasetEntry.aclMode : "public";
|
|
38594
|
+
} = useSWR(requestKey, fetcher, options);
|
|
38595
|
+
return ref ? canCheck ? isLoading ? "checking" : cdnAccessPolicy ?? "unknown" : "unknown" : "public";
|
|
38614
38596
|
}
|
|
38615
38597
|
function getDataTestIdPrefix(schemaType) {
|
|
38616
38598
|
const name = schemaType.name || "file", jsonType = schemaType.jsonType || "object";
|
|
@@ -41736,6 +41718,90 @@ function _temp2$15(field_0) {
|
|
|
41736
41718
|
function _temp$2B(field) {
|
|
41737
41719
|
return field.name === "crop" && field.type.name !== "object";
|
|
41738
41720
|
}
|
|
41721
|
+
function ImageInputHotspotInput(props2) {
|
|
41722
|
+
const $ = c(19), {
|
|
41723
|
+
handleCloseDialog,
|
|
41724
|
+
inputProps,
|
|
41725
|
+
imageInputProps,
|
|
41726
|
+
isImageToolEnabled
|
|
41727
|
+
} = props2, {
|
|
41728
|
+
t
|
|
41729
|
+
} = useTranslation(), {
|
|
41730
|
+
changed,
|
|
41731
|
+
id: id2,
|
|
41732
|
+
imageUrlBuilder,
|
|
41733
|
+
value
|
|
41734
|
+
} = imageInputProps, withImageTool = isImageToolEnabled && value && value.asset;
|
|
41735
|
+
let t0;
|
|
41736
|
+
$[0] !== imageUrlBuilder || $[1] !== value ? (t0 = value?.asset ? imageUrlBuilder.image(value.asset).url() : "", $[0] = imageUrlBuilder, $[1] = value, $[2] = t0) : t0 = $[2];
|
|
41737
|
+
const imageUrl = t0;
|
|
41738
|
+
let t1;
|
|
41739
|
+
$[3] !== t ? (t1 = t("inputs.image.hotspot-dialog.title"), $[3] = t, $[4] = t1) : t1 = $[4];
|
|
41740
|
+
const t2 = `${id2}_dialog`;
|
|
41741
|
+
let t3;
|
|
41742
|
+
$[5] !== changed || $[6] !== imageInputProps || $[7] !== imageUrl || $[8] !== inputProps || $[9] !== value || $[10] !== withImageTool ? (t3 = withImageTool && value?.asset && /* @__PURE__ */ jsx(ImageToolInput, { ...imageInputProps, imageUrl, value, presence: inputProps.presence, changed }), $[5] = changed, $[6] = imageInputProps, $[7] = imageUrl, $[8] = inputProps, $[9] = value, $[10] = withImageTool, $[11] = t3) : t3 = $[11];
|
|
41743
|
+
let t4;
|
|
41744
|
+
$[12] !== t3 ? (t4 = /* @__PURE__ */ jsx(PresenceOverlay, { children: /* @__PURE__ */ jsx(Stack, { space: 5, children: t3 }) }), $[12] = t3, $[13] = t4) : t4 = $[13];
|
|
41745
|
+
let t5;
|
|
41746
|
+
return $[14] !== handleCloseDialog || $[15] !== t1 || $[16] !== t2 || $[17] !== t4 ? (t5 = /* @__PURE__ */ jsx(Dialog$1, { __unstable_autoFocus: !1, header: t1, id: t2, onClickOutside: handleCloseDialog, onClose: handleCloseDialog, width: 1, children: t4 }), $[14] = handleCloseDialog, $[15] = t1, $[16] = t2, $[17] = t4, $[18] = t5) : t5 = $[18], t5;
|
|
41747
|
+
}
|
|
41748
|
+
function ImagePreview$1(props2) {
|
|
41749
|
+
const $ = c(21);
|
|
41750
|
+
let rest, src, t0;
|
|
41751
|
+
$[0] !== props2 ? ({
|
|
41752
|
+
accessPolicy: t0,
|
|
41753
|
+
src,
|
|
41754
|
+
...rest
|
|
41755
|
+
} = props2, $[0] = props2, $[1] = rest, $[2] = src, $[3] = t0) : (rest = $[1], src = $[2], t0 = $[3]);
|
|
41756
|
+
const accessPolicy = t0 === void 0 ? "public" : t0, [isLoaded, setLoaded] = useState(!1), [hasError, setHasError] = useState(!1);
|
|
41757
|
+
let t1;
|
|
41758
|
+
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => {
|
|
41759
|
+
setLoaded(!1), setHasError(!1);
|
|
41760
|
+
}, $[4] = t1) : t1 = $[4];
|
|
41761
|
+
let t2;
|
|
41762
|
+
$[5] !== src ? (t2 = [src], $[5] = src, $[6] = t2) : t2 = $[6], useEffect(t1, t2);
|
|
41763
|
+
let t3;
|
|
41764
|
+
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
41765
|
+
setLoaded(!0), setHasError(!1);
|
|
41766
|
+
}, $[7] = t3) : t3 = $[7];
|
|
41767
|
+
const onLoadChange = t3;
|
|
41768
|
+
let t4;
|
|
41769
|
+
$[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = () => {
|
|
41770
|
+
setHasError(!0), setLoaded(!1);
|
|
41771
|
+
}, $[8] = t4) : t4 = $[8];
|
|
41772
|
+
const onErrorChange = t4, showAccessWarning = hasError && accessPolicy === "unknown", showLoading = !isLoaded && !showAccessWarning;
|
|
41773
|
+
let t5;
|
|
41774
|
+
$[9] !== showAccessWarning ? (t5 = showAccessWarning && /* @__PURE__ */ jsx(AccessWarningOverlay, {}), $[9] = showAccessWarning, $[10] = t5) : t5 = $[10];
|
|
41775
|
+
let t6;
|
|
41776
|
+
$[11] !== showLoading ? (t6 = showLoading && /* @__PURE__ */ jsx(LoadingOverlay, {}), $[11] = showLoading, $[12] = t6) : t6 = $[12];
|
|
41777
|
+
let t7;
|
|
41778
|
+
$[13] !== props2.alt || $[14] !== src ? (t7 = src && /* @__PURE__ */ jsx("img", { src, "data-testid": "hotspot-image-input", alt: props2.alt, onLoad: onLoadChange, onError: onErrorChange, referrerPolicy: "strict-origin-when-cross-origin" }), $[13] = props2.alt, $[14] = src, $[15] = t7) : t7 = $[15];
|
|
41779
|
+
let t8;
|
|
41780
|
+
return $[16] !== rest || $[17] !== t5 || $[18] !== t6 || $[19] !== t7 ? (t8 = /* @__PURE__ */ jsxs(RatioBox$2, { ...rest, tone: "transparent", children: [
|
|
41781
|
+
t5,
|
|
41782
|
+
t6,
|
|
41783
|
+
t7
|
|
41784
|
+
] }), $[16] = rest, $[17] = t5, $[18] = t6, $[19] = t7, $[20] = t8) : t8 = $[20], t8;
|
|
41785
|
+
}
|
|
41786
|
+
function LoadingOverlay() {
|
|
41787
|
+
const $ = c(1);
|
|
41788
|
+
let t0;
|
|
41789
|
+
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(Overlay, { padding: 3, tone: "transparent", children: /* @__PURE__ */ jsx(FlexOverlay, { direction: "column", align: "center", justify: "center", children: /* @__PURE__ */ jsx(LoadingBlock, { showText: !0 }) }) }), $[0] = t0) : t0 = $[0], t0;
|
|
41790
|
+
}
|
|
41791
|
+
function AccessWarningOverlay() {
|
|
41792
|
+
const $ = c(5), {
|
|
41793
|
+
t
|
|
41794
|
+
} = useTranslation();
|
|
41795
|
+
let t0;
|
|
41796
|
+
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(ErrorIconWrapper, { children: /* @__PURE__ */ jsx(WarningOutlineIcon, {}) }), $[0] = t0) : t0 = $[0];
|
|
41797
|
+
let t1;
|
|
41798
|
+
$[1] !== t ? (t1 = t("inputs.image.error.possible-access-restriction"), $[1] = t, $[2] = t1) : t1 = $[2];
|
|
41799
|
+
let t2;
|
|
41800
|
+
return $[3] !== t1 ? (t2 = /* @__PURE__ */ jsx(Overlay, { padding: 3, tone: "critical", border: !0, children: /* @__PURE__ */ jsxs(FlexOverlay, { direction: "column", align: "center", justify: "center", gap: 2, children: [
|
|
41801
|
+
t0,
|
|
41802
|
+
/* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, children: t1 })
|
|
41803
|
+
] }) }), $[3] = t1, $[4] = t2) : t2 = $[4], t2;
|
|
41804
|
+
}
|
|
41739
41805
|
const CACHE_DISPOSE_DELAY = 2e3, requestCache = /* @__PURE__ */ new Map(), IDLE_RESULT = {
|
|
41740
41806
|
error: null,
|
|
41741
41807
|
isLoading: !1,
|
|
@@ -41864,98 +41930,6 @@ function useImageUrl(params) {
|
|
|
41864
41930
|
url
|
|
41865
41931
|
}, $[7] = isLoading, $[8] = url, $[9] = t2) : t2 = $[9], t2;
|
|
41866
41932
|
}
|
|
41867
|
-
function ImageInputHotspotInput(props2) {
|
|
41868
|
-
const $ = c(21), {
|
|
41869
|
-
accessPolicy,
|
|
41870
|
-
handleCloseDialog,
|
|
41871
|
-
inputProps,
|
|
41872
|
-
imageInputProps,
|
|
41873
|
-
isImageToolEnabled
|
|
41874
|
-
} = props2, {
|
|
41875
|
-
t
|
|
41876
|
-
} = useTranslation(), {
|
|
41877
|
-
changed,
|
|
41878
|
-
id: id2,
|
|
41879
|
-
imageUrlBuilder,
|
|
41880
|
-
value
|
|
41881
|
-
} = imageInputProps, withImageTool = isImageToolEnabled && value && value.asset, t0 = withImageTool ? value.asset : void 0;
|
|
41882
|
-
let t1;
|
|
41883
|
-
$[0] !== accessPolicy || $[1] !== imageUrlBuilder || $[2] !== t0 ? (t1 = {
|
|
41884
|
-
accessPolicy,
|
|
41885
|
-
imageSource: t0,
|
|
41886
|
-
imageUrlBuilder
|
|
41887
|
-
}, $[0] = accessPolicy, $[1] = imageUrlBuilder, $[2] = t0, $[3] = t1) : t1 = $[3];
|
|
41888
|
-
const {
|
|
41889
|
-
isLoading,
|
|
41890
|
-
url: imageUrl
|
|
41891
|
-
} = useImageUrl(t1);
|
|
41892
|
-
let t2;
|
|
41893
|
-
$[4] !== t ? (t2 = t("inputs.image.hotspot-dialog.title"), $[4] = t, $[5] = t2) : t2 = $[5];
|
|
41894
|
-
const t3 = `${id2}_dialog`;
|
|
41895
|
-
let t4;
|
|
41896
|
-
$[6] !== changed || $[7] !== imageInputProps || $[8] !== imageUrl || $[9] !== inputProps || $[10] !== isLoading || $[11] !== value || $[12] !== withImageTool ? (t4 = withImageTool && value?.asset && /* @__PURE__ */ jsx(Fragment$1, { children: isLoading || !imageUrl ? /* @__PURE__ */ jsx(LoadingBlock, { showText: !0 }) : /* @__PURE__ */ jsx(ImageToolInput, { ...imageInputProps, imageUrl, value, presence: inputProps.presence, changed }) }), $[6] = changed, $[7] = imageInputProps, $[8] = imageUrl, $[9] = inputProps, $[10] = isLoading, $[11] = value, $[12] = withImageTool, $[13] = t4) : t4 = $[13];
|
|
41897
|
-
let t5;
|
|
41898
|
-
$[14] !== t4 ? (t5 = /* @__PURE__ */ jsx(PresenceOverlay, { children: /* @__PURE__ */ jsx(Stack, { space: 5, children: t4 }) }), $[14] = t4, $[15] = t5) : t5 = $[15];
|
|
41899
|
-
let t6;
|
|
41900
|
-
return $[16] !== handleCloseDialog || $[17] !== t2 || $[18] !== t3 || $[19] !== t5 ? (t6 = /* @__PURE__ */ jsx(Dialog$1, { __unstable_autoFocus: !1, header: t2, id: t3, onClickOutside: handleCloseDialog, onClose: handleCloseDialog, width: 1, children: t5 }), $[16] = handleCloseDialog, $[17] = t2, $[18] = t3, $[19] = t5, $[20] = t6) : t6 = $[20], t6;
|
|
41901
|
-
}
|
|
41902
|
-
function ImagePreview$1(props2) {
|
|
41903
|
-
const $ = c(21);
|
|
41904
|
-
let rest, src, t0;
|
|
41905
|
-
$[0] !== props2 ? ({
|
|
41906
|
-
accessPolicy: t0,
|
|
41907
|
-
src,
|
|
41908
|
-
...rest
|
|
41909
|
-
} = props2, $[0] = props2, $[1] = rest, $[2] = src, $[3] = t0) : (rest = $[1], src = $[2], t0 = $[3]);
|
|
41910
|
-
const accessPolicy = t0 === void 0 ? "public" : t0, [isLoaded, setLoaded] = useState(!1), [hasError, setHasError] = useState(!1);
|
|
41911
|
-
let t1;
|
|
41912
|
-
$[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t1 = () => {
|
|
41913
|
-
setLoaded(!1), setHasError(!1);
|
|
41914
|
-
}, $[4] = t1) : t1 = $[4];
|
|
41915
|
-
let t2;
|
|
41916
|
-
$[5] !== src ? (t2 = [src], $[5] = src, $[6] = t2) : t2 = $[6], useEffect(t1, t2);
|
|
41917
|
-
let t3;
|
|
41918
|
-
$[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
41919
|
-
setLoaded(!0), setHasError(!1);
|
|
41920
|
-
}, $[7] = t3) : t3 = $[7];
|
|
41921
|
-
const onLoadChange = t3;
|
|
41922
|
-
let t4;
|
|
41923
|
-
$[8] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t4 = () => {
|
|
41924
|
-
setHasError(!0), setLoaded(!1);
|
|
41925
|
-
}, $[8] = t4) : t4 = $[8];
|
|
41926
|
-
const onErrorChange = t4, showAccessWarning = hasError && accessPolicy === "unknown", showLoading = !isLoaded && !showAccessWarning;
|
|
41927
|
-
let t5;
|
|
41928
|
-
$[9] !== showAccessWarning ? (t5 = showAccessWarning && /* @__PURE__ */ jsx(AccessWarningOverlay, {}), $[9] = showAccessWarning, $[10] = t5) : t5 = $[10];
|
|
41929
|
-
let t6;
|
|
41930
|
-
$[11] !== showLoading ? (t6 = showLoading && /* @__PURE__ */ jsx(LoadingOverlay, {}), $[11] = showLoading, $[12] = t6) : t6 = $[12];
|
|
41931
|
-
let t7;
|
|
41932
|
-
$[13] !== props2.alt || $[14] !== src ? (t7 = src && /* @__PURE__ */ jsx("img", { src, "data-testid": "hotspot-image-input", alt: props2.alt, onLoad: onLoadChange, onError: onErrorChange, referrerPolicy: "strict-origin-when-cross-origin" }), $[13] = props2.alt, $[14] = src, $[15] = t7) : t7 = $[15];
|
|
41933
|
-
let t8;
|
|
41934
|
-
return $[16] !== rest || $[17] !== t5 || $[18] !== t6 || $[19] !== t7 ? (t8 = /* @__PURE__ */ jsxs(RatioBox$2, { ...rest, tone: "transparent", children: [
|
|
41935
|
-
t5,
|
|
41936
|
-
t6,
|
|
41937
|
-
t7
|
|
41938
|
-
] }), $[16] = rest, $[17] = t5, $[18] = t6, $[19] = t7, $[20] = t8) : t8 = $[20], t8;
|
|
41939
|
-
}
|
|
41940
|
-
function LoadingOverlay() {
|
|
41941
|
-
const $ = c(1);
|
|
41942
|
-
let t0;
|
|
41943
|
-
return $[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(Overlay, { padding: 3, tone: "transparent", children: /* @__PURE__ */ jsx(FlexOverlay, { direction: "column", align: "center", justify: "center", children: /* @__PURE__ */ jsx(LoadingBlock, { showText: !0 }) }) }), $[0] = t0) : t0 = $[0], t0;
|
|
41944
|
-
}
|
|
41945
|
-
function AccessWarningOverlay() {
|
|
41946
|
-
const $ = c(5), {
|
|
41947
|
-
t
|
|
41948
|
-
} = useTranslation();
|
|
41949
|
-
let t0;
|
|
41950
|
-
$[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (t0 = /* @__PURE__ */ jsx(ErrorIconWrapper, { children: /* @__PURE__ */ jsx(WarningOutlineIcon, {}) }), $[0] = t0) : t0 = $[0];
|
|
41951
|
-
let t1;
|
|
41952
|
-
$[1] !== t ? (t1 = t("inputs.image.error.possible-access-restriction"), $[1] = t, $[2] = t1) : t1 = $[2];
|
|
41953
|
-
let t2;
|
|
41954
|
-
return $[3] !== t1 ? (t2 = /* @__PURE__ */ jsx(Overlay, { padding: 3, tone: "critical", border: !0, children: /* @__PURE__ */ jsxs(FlexOverlay, { direction: "column", align: "center", justify: "center", gap: 2, children: [
|
|
41955
|
-
t0,
|
|
41956
|
-
/* @__PURE__ */ jsx(Text$1, { muted: !0, size: 1, children: t1 })
|
|
41957
|
-
] }) }), $[3] = t1, $[4] = t2) : t2 = $[4], t2;
|
|
41958
|
-
}
|
|
41959
41933
|
const ImageInputPreview = memo(function(props2) {
|
|
41960
41934
|
const $ = c(6), {
|
|
41961
41935
|
accessPolicy,
|
|
@@ -42057,7 +42031,7 @@ function InvalidImageWarning(t0) {
|
|
|
42057
42031
|
] }), $[17] = t6, $[18] = t8, $[19] = t9) : t9 = $[19], t9;
|
|
42058
42032
|
}
|
|
42059
42033
|
function BaseImageInputComponent(props2) {
|
|
42060
|
-
const $ = c(
|
|
42034
|
+
const $ = c(168), {
|
|
42061
42035
|
assetSources,
|
|
42062
42036
|
client,
|
|
42063
42037
|
directUploads,
|
|
@@ -42248,32 +42222,32 @@ function BaseImageInputComponent(props2) {
|
|
|
42248
42222
|
$[98] !== assetSources || $[99] !== directUploads || $[100] !== elementProps || $[101] !== handleClearField || $[102] !== handleClearUploadState || $[103] !== handleOpenSourceForUpload || $[104] !== handleSelectFileToUpload || $[105] !== isStale || $[106] !== readOnly || $[107] !== renderAssetAccessPolicy || $[108] !== renderAssetMenu || $[109] !== renderPreview || $[110] !== renderUploadPlaceholder || $[111] !== renderUploadState || $[112] !== schemaType || $[113] !== selectedAssetSource || $[114] !== value ? (t23 = (inputProps) => value && typeof value.asset < "u" && !value?._upload && !isImageSource(value) ? /* @__PURE__ */ jsx(InvalidImageWarning, { onClearValue: handleClearField }) : /* @__PURE__ */ jsx(ImageInputAsset, { assetSources, directUploads: directUploads !== !1, elementProps, handleClearUploadState, inputProps, isStale, onOpenSourceForUpload: handleOpenSourceForUpload, onSelectFile: handleSelectFileToUpload, readOnly, renderAssetAccessPolicy, renderAssetMenu, renderPreview, renderUploadPlaceholder, renderUploadState, schemaType, selectedAssetSource, value }), $[98] = assetSources, $[99] = directUploads, $[100] = elementProps, $[101] = handleClearField, $[102] = handleClearUploadState, $[103] = handleOpenSourceForUpload, $[104] = handleSelectFileToUpload, $[105] = isStale, $[106] = readOnly, $[107] = renderAssetAccessPolicy, $[108] = renderAssetMenu, $[109] = renderPreview, $[110] = renderUploadPlaceholder, $[111] = renderUploadState, $[112] = schemaType, $[113] = selectedAssetSource, $[114] = value, $[115] = t23) : t23 = $[115];
|
|
42249
42223
|
const renderAsset = t23;
|
|
42250
42224
|
let t24;
|
|
42251
|
-
$[116] !==
|
|
42225
|
+
$[116] !== handleCloseDialog || $[117] !== isImageToolEnabled || $[118] !== props2 ? (t24 = (inputProps_0) => /* @__PURE__ */ jsx(ImageInputHotspotInput, { isImageToolEnabled: isImageToolEnabled(), handleCloseDialog, imageInputProps: props2, inputProps: inputProps_0 }), $[116] = handleCloseDialog, $[117] = isImageToolEnabled, $[118] = props2, $[119] = t24) : t24 = $[119];
|
|
42252
42226
|
const renderHotspotInput = t24;
|
|
42253
42227
|
let t25;
|
|
42254
|
-
$[
|
|
42228
|
+
$[120] !== assetSourceAction || $[121] !== assetSourceUploader?.uploader || $[122] !== handleAssetSourceChangeAction || $[123] !== handleAssetSourceClosed || $[124] !== handleSelectAssetFromSource$1 || $[125] !== observeAsset || $[126] !== openInSourceAsset || $[127] !== schemaType || $[128] !== selectedAssetSource || $[129] !== value ? (t25 = () => !selectedAssetSource || !assetSourceAction ? null : /* @__PURE__ */ jsx(AssetSourceDialog, { action: assetSourceAction, assetType: "image", observeAsset, onClose: handleAssetSourceClosed, onChangeAction: handleAssetSourceChangeAction, onSelect: handleSelectAssetFromSource$1, openInSourceAsset, schemaType, selectedAssetSource, uploader: assetSourceUploader?.uploader, value }), $[120] = assetSourceAction, $[121] = assetSourceUploader?.uploader, $[122] = handleAssetSourceChangeAction, $[123] = handleAssetSourceClosed, $[124] = handleSelectAssetFromSource$1, $[125] = observeAsset, $[126] = openInSourceAsset, $[127] = schemaType, $[128] = selectedAssetSource, $[129] = value, $[130] = t25) : t25 = $[130];
|
|
42255
42229
|
const renderAssetSource = t25;
|
|
42256
42230
|
let t26;
|
|
42257
|
-
$[
|
|
42231
|
+
$[131] !== members ? (t26 = members.find(_temp4$f), $[131] = members, $[132] = t26) : t26 = $[132];
|
|
42258
42232
|
const hotspotField = t26;
|
|
42259
42233
|
let t27;
|
|
42260
|
-
if ($[
|
|
42234
|
+
if ($[133] !== renderAnnotation || $[134] !== renderAsset || $[135] !== renderBlock2 || $[136] !== renderField || $[137] !== renderInlineBlock || $[138] !== renderInput || $[139] !== renderItem2 || $[140] !== renderPreviewProp || $[141] !== renderedMembers || $[142] !== schemaType || $[143] !== t) {
|
|
42261
42235
|
let t282;
|
|
42262
|
-
$[
|
|
42236
|
+
$[145] !== renderAnnotation || $[146] !== renderAsset || $[147] !== renderBlock2 || $[148] !== renderField || $[149] !== renderInlineBlock || $[150] !== renderInput || $[151] !== renderItem2 || $[152] !== renderPreviewProp || $[153] !== schemaType || $[154] !== t ? (t282 = (member_0) => member_0.kind === "field" && (member_0.name === "crop" || member_0.name === "hotspot") ? null : member_0.kind === "field" ? /* @__PURE__ */ jsx(MemberField, { member: member_0, renderAnnotation, renderBlock: renderBlock2, renderInlineBlock, renderInput: member_0.name === "asset" ? renderAsset : renderInput, renderField: member_0.name === "asset" ? passThrough$1 : renderField, renderItem: renderItem2, renderPreview: renderPreviewProp }, member_0.key) : member_0.kind === "fieldSet" ? /* @__PURE__ */ jsx(MemberFieldSet, { member: member_0, renderAnnotation, renderBlock: renderBlock2, renderField, renderInlineBlock, renderInput, renderItem: renderItem2, renderPreview: renderPreviewProp, schemaType }, member_0.key) : member_0.kind === "error" ? /* @__PURE__ */ jsx(MemberFieldError, { member: member_0 }, member_0.key) : member_0.kind === "decoration" ? /* @__PURE__ */ jsx(MemberDecoration, { member: member_0 }, member_0.key) : /* @__PURE__ */ jsx(Fragment, { children: t("inputs.image.error.unknown-member-kind", {
|
|
42263
42237
|
kind: member_0.kind
|
|
42264
|
-
}) }, member_0.key), $[
|
|
42238
|
+
}) }, member_0.key), $[145] = renderAnnotation, $[146] = renderAsset, $[147] = renderBlock2, $[148] = renderField, $[149] = renderInlineBlock, $[150] = renderInput, $[151] = renderItem2, $[152] = renderPreviewProp, $[153] = schemaType, $[154] = t, $[155] = t282) : t282 = $[155], t27 = renderedMembers.map(t282), $[133] = renderAnnotation, $[134] = renderAsset, $[135] = renderBlock2, $[136] = renderField, $[137] = renderInlineBlock, $[138] = renderInput, $[139] = renderItem2, $[140] = renderPreviewProp, $[141] = renderedMembers, $[142] = schemaType, $[143] = t, $[144] = t27;
|
|
42265
42239
|
} else
|
|
42266
|
-
t27 = $[
|
|
42240
|
+
t27 = $[144];
|
|
42267
42241
|
let t28;
|
|
42268
|
-
$[
|
|
42242
|
+
$[156] !== focusPath || $[157] !== hotspotField || $[158] !== props2 || $[159] !== renderHotspotInput ? (t28 = hotspotField && focusPath[0] === "hotspot" && /* @__PURE__ */ jsx(FormInput, { ...props2, absolutePath: hotspotField.field.path, renderInput: renderHotspotInput }), $[156] = focusPath, $[157] = hotspotField, $[158] = props2, $[159] = renderHotspotInput, $[160] = t28) : t28 = $[160];
|
|
42269
42243
|
let t29;
|
|
42270
|
-
$[
|
|
42244
|
+
$[161] !== renderAssetSource || $[162] !== selectedAssetSource ? (t29 = selectedAssetSource && renderAssetSource(), $[161] = renderAssetSource, $[162] = selectedAssetSource, $[163] = t29) : t29 = $[163];
|
|
42271
42245
|
let t30;
|
|
42272
|
-
return $[
|
|
42246
|
+
return $[164] !== t27 || $[165] !== t28 || $[166] !== t29 ? (t30 = /* @__PURE__ */ jsxs(Stack, { space: 5, "data-testid": "image-input", children: [
|
|
42273
42247
|
t27,
|
|
42274
42248
|
t28,
|
|
42275
42249
|
t29
|
|
42276
|
-
] }), $[
|
|
42250
|
+
] }), $[164] = t27, $[165] = t28, $[166] = t29, $[167] = t30) : t30 = $[167], t30;
|
|
42277
42251
|
}
|
|
42278
42252
|
function _temp4$f(member) {
|
|
42279
42253
|
return member.kind === "field" && member.name === "hotspot";
|