sanity-plugin-media 6.2.0 → 6.3.1
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/README.md +2 -0
- package/dist/index.js +527 -409
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2259,9 +2259,9 @@ const ButtonAssetCopy = (t0) => {
|
|
|
2259
2259
|
function getSchemeColor(scheme, colorKey) {
|
|
2260
2260
|
return SCHEME_COLORS[colorKey]?.[scheme];
|
|
2261
2261
|
}
|
|
2262
|
-
const Image$1 = styled.img.
|
|
2262
|
+
const Image$1 = styled.img.withConfig({
|
|
2263
2263
|
displayName: "Image",
|
|
2264
|
-
componentId: "sc-
|
|
2264
|
+
componentId: "sc-gwtcwh-0"
|
|
2265
2265
|
})`--checkerboard-color:${(props) => props.$scheme ? getSchemeColor(props.$scheme, "bg2") : "inherit"};display:block;width:100%;height:100%;object-fit:contain;${(props) => props.$showCheckerboard && css`background-image:linear-gradient(45deg,var(--checkerboard-color) 25%,transparent 25%),linear-gradient(-45deg,var(--checkerboard-color) 25%,transparent 25%),linear-gradient(45deg,transparent 75%,var(--checkerboard-color) 75%),linear-gradient(-45deg,transparent 75%,var(--checkerboard-color) 75%);background-size:20px 20px;background-position:0 0,0 10px,10px -10px,-10px 0;`}`, StyledErrorOutlineIcon = /* @__PURE__ */ styled(ErrorOutlineIcon).withConfig({
|
|
2266
2266
|
displayName: "StyledErrorOutlineIcon",
|
|
2267
2267
|
componentId: "sc-3yqi4g-0"
|
|
@@ -2502,7 +2502,7 @@ const Image$1 = styled.img.attrs({ crossOrigin: "anonymous" }).withConfig({
|
|
|
2502
2502
|
isLoading: creating,
|
|
2503
2503
|
isMulti: !0,
|
|
2504
2504
|
name,
|
|
2505
|
-
noOptionsMessage: _temp3$
|
|
2505
|
+
noOptionsMessage: _temp3$13,
|
|
2506
2506
|
onBlur,
|
|
2507
2507
|
onChange,
|
|
2508
2508
|
onCreateOption: onCreateTag,
|
|
@@ -2531,7 +2531,7 @@ function _temp$37(state) {
|
|
|
2531
2531
|
function _temp2$23(state_0) {
|
|
2532
2532
|
return state_0.tags.fetching;
|
|
2533
2533
|
}
|
|
2534
|
-
function _temp3$
|
|
2534
|
+
function _temp3$13() {
|
|
2535
2535
|
return "No tags";
|
|
2536
2536
|
}
|
|
2537
2537
|
const FormFieldInputText = (props) => {
|
|
@@ -2873,7 +2873,7 @@ const DialogAssetEdit = (props) => {
|
|
|
2873
2873
|
t19 = !1;
|
|
2874
2874
|
break bb0;
|
|
2875
2875
|
}
|
|
2876
|
-
let isLocaleObj = _temp3$
|
|
2876
|
+
let isLocaleObj = _temp3$12, fields = [
|
|
2877
2877
|
currentAsset.title,
|
|
2878
2878
|
currentAsset.altText,
|
|
2879
2879
|
currentAsset.description,
|
|
@@ -2887,7 +2887,7 @@ const DialogAssetEdit = (props) => {
|
|
|
2887
2887
|
t19 = !0;
|
|
2888
2888
|
break bb0;
|
|
2889
2889
|
}
|
|
2890
|
-
let configuredIds = new Set(locales.map(_temp4$
|
|
2890
|
+
let configuredIds = new Set(locales.map(_temp4$7));
|
|
2891
2891
|
t19 = fields.some((f_0) => isLocaleObj(f_0) ? Object.keys(f_0).some((k) => !configuredIds.has(k)) : !1);
|
|
2892
2892
|
}
|
|
2893
2893
|
$[41] = currentAsset, $[42] = locales, $[43] = t19;
|
|
@@ -2898,8 +2898,8 @@ const DialogAssetEdit = (props) => {
|
|
|
2898
2898
|
let cleanField = (field_1) => {
|
|
2899
2899
|
if (typeof field_1 != "object" || !field_1 || Array.isArray(field_1)) return field_1;
|
|
2900
2900
|
let obj_0 = field_1;
|
|
2901
|
-
if (!locales || locales.length === 0) return Object.keys(obj_0).sort().map((k_0) => obj_0[k_0]).find(_temp5$
|
|
2902
|
-
let configuredIds_0 = new Set(locales.map(_temp6$
|
|
2901
|
+
if (!locales || locales.length === 0) return Object.keys(obj_0).sort().map((k_0) => obj_0[k_0]).find(_temp5$5) || "";
|
|
2902
|
+
let configuredIds_0 = new Set(locales.map(_temp6$3)), cleaned = {};
|
|
2903
2903
|
for (let [key, val] of Object.entries(obj_0)) configuredIds_0.has(key) && (cleaned[key] = val);
|
|
2904
2904
|
return cleaned;
|
|
2905
2905
|
};
|
|
@@ -3192,16 +3192,16 @@ function _temp2$22(field_0, t0) {
|
|
|
3192
3192
|
let fallback_0 = t0 === void 0 ? "" : t0;
|
|
3193
3193
|
return typeof field_0 == "string" ? field_0 : typeof field_0 == "object" && field_0 && Object.values(field_0).find(_temp$36) || fallback_0;
|
|
3194
3194
|
}
|
|
3195
|
-
function _temp3$
|
|
3195
|
+
function _temp3$12(v_0) {
|
|
3196
3196
|
return typeof v_0 == "object" && !!v_0 && !Array.isArray(v_0);
|
|
3197
3197
|
}
|
|
3198
|
-
function _temp4$
|
|
3198
|
+
function _temp4$7(l) {
|
|
3199
3199
|
return l.id;
|
|
3200
3200
|
}
|
|
3201
|
-
function _temp5$
|
|
3201
|
+
function _temp5$5(v_1) {
|
|
3202
3202
|
return v_1;
|
|
3203
3203
|
}
|
|
3204
|
-
function _temp6$
|
|
3204
|
+
function _temp6$3(l_0) {
|
|
3205
3205
|
return l_0.id;
|
|
3206
3206
|
}
|
|
3207
3207
|
function _temp7$1(tag) {
|
|
@@ -3248,20 +3248,49 @@ const selectCombinedItems = createSelector([
|
|
|
3248
3248
|
return $[4] === downHandler ? (t2 = $[5], t3 = $[6]) : (t2 = () => (window.addEventListener("keydown", downHandler), window.addEventListener("keyup", upHandler), () => {
|
|
3249
3249
|
window.removeEventListener("keydown", downHandler), window.removeEventListener("keyup", upHandler);
|
|
3250
3250
|
}), t3 = [downHandler, upHandler], $[4] = downHandler, $[5] = t2, $[6] = t3), useEffect(t2, t3), keyPressed;
|
|
3251
|
-
},
|
|
3251
|
+
}, ASSET_DRAG_TYPE = "application/x-sanity-media-assets";
|
|
3252
|
+
/**
|
|
3253
|
+
* Write the dragged asset ids onto the drag event.
|
|
3254
|
+
*/
|
|
3255
|
+
function setDragAssetIds(event, assetIds) {
|
|
3256
|
+
event.dataTransfer.setData(ASSET_DRAG_TYPE, JSON.stringify(assetIds)), event.dataTransfer.effectAllowed = "move";
|
|
3257
|
+
}
|
|
3258
|
+
/**
|
|
3259
|
+
* Whether a drag event carries asset ids written by `setDragAssetIds`.
|
|
3260
|
+
*
|
|
3261
|
+
* During `dragover`, browsers hide the data payload but still expose the type list.
|
|
3262
|
+
*/
|
|
3263
|
+
function isAssetDrag(event) {
|
|
3264
|
+
return Array.prototype.includes.call(event.dataTransfer.types, ASSET_DRAG_TYPE);
|
|
3265
|
+
}
|
|
3266
|
+
/**
|
|
3267
|
+
* Read the dragged asset ids from a `drop` event. Returns an empty array when the
|
|
3268
|
+
* payload is missing or malformed.
|
|
3269
|
+
*/
|
|
3270
|
+
function getDragAssetIds(event) {
|
|
3271
|
+
let raw = event.dataTransfer.getData(ASSET_DRAG_TYPE);
|
|
3272
|
+
if (!raw) return [];
|
|
3273
|
+
try {
|
|
3274
|
+
let parsed = JSON.parse(raw);
|
|
3275
|
+
return Array.isArray(parsed) ? parsed.filter((id) => typeof id == "string") : [];
|
|
3276
|
+
} catch {
|
|
3277
|
+
return [];
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
const CardWrapper$2 = styled(Flex).withConfig({
|
|
3252
3281
|
displayName: "CardWrapper",
|
|
3253
|
-
componentId: "sc-
|
|
3282
|
+
componentId: "sc-15kxr0-0"
|
|
3254
3283
|
})`box-sizing:border-box;height:100%;overflow:hidden;position:relative;width:100%;`, CardContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3255
3284
|
displayName: "CardContainer",
|
|
3256
|
-
componentId: "sc-
|
|
3285
|
+
componentId: "sc-15kxr0-1"
|
|
3257
3286
|
})(({ $picked, theme, $updating }) => css`border:1px solid transparent;height:100%;pointer-events:${$updating ? "none" : "auto"};position:relative;transition:all 300ms;user-select:none;width:100%;border:${$picked ? `1px solid ${theme.sanity.color.spot.orange} !important` : "1px solid inherit"};${!$updating && css`@media (hover:hover) and (pointer:fine){&:hover{border:1px solid var(--card-border-color);}}`}`), ContextActionContainer$2 = /* @__PURE__ */ styled(Flex).withConfig({
|
|
3258
3287
|
displayName: "ContextActionContainer",
|
|
3259
|
-
componentId: "sc-
|
|
3288
|
+
componentId: "sc-15kxr0-2"
|
|
3260
3289
|
})(({ $scheme }) => css`cursor:pointer;height:${32}px;transition:all 300ms;@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg")};}}`), StyledWarningOutlineIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
|
|
3261
3290
|
displayName: "StyledWarningOutlineIcon",
|
|
3262
|
-
componentId: "sc-
|
|
3291
|
+
componentId: "sc-15kxr0-3"
|
|
3263
3292
|
})(({ theme }) => ({ color: theme.sanity.color.spot.red })), CardAsset = (props) => {
|
|
3264
|
-
let $ = c(
|
|
3293
|
+
let $ = c(89), { id, selected, source } = props, scheme = useColorSchemeValue(), toast = useToast(), shiftPressed = useKeyPress("shift"), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$35), assetsPicked = useTypedSelector(selectAssetsPicked), t0;
|
|
3265
3294
|
$[0] === id ? t0 = $[1] : (t0 = (state_0) => selectAssetById(state_0, id), $[0] = id, $[1] = t0);
|
|
3266
3295
|
let item = useTypedSelector(t0), t1;
|
|
3267
3296
|
$[2] === source ? t1 = $[3] : (t1 = (state_1) => {
|
|
@@ -3298,6 +3327,9 @@ const selectCombinedItems = createSelector([
|
|
|
3298
3327
|
})) : dispatch(assetsActions.pick({
|
|
3299
3328
|
assetId: asset._id,
|
|
3300
3329
|
picked: !picked
|
|
3330
|
+
})) : e.ctrlKey || e.metaKey ? dispatch(assetsActions.pick({
|
|
3331
|
+
assetId: asset._id,
|
|
3332
|
+
picked: !picked
|
|
3301
3333
|
})) : shiftPressed.current ? dispatch(picked ? assetsActions.pick({
|
|
3302
3334
|
assetId: asset._id,
|
|
3303
3335
|
picked: !picked
|
|
@@ -3320,23 +3352,27 @@ const selectCombinedItems = createSelector([
|
|
|
3320
3352
|
picked: !picked
|
|
3321
3353
|
})));
|
|
3322
3354
|
}, $[23] = asset._id, $[24] = dispatch, $[25] = handleReplaceAsset, $[26] = isMultiSelect, $[27] = lastPicked, $[28] = onSelect, $[29] = picked, $[30] = selected, $[31] = shiftPressed, $[32] = source, $[33] = t5) : t5 = $[33];
|
|
3323
|
-
let handleContextActionClick = t5,
|
|
3324
|
-
$[34]
|
|
3325
|
-
|
|
3355
|
+
let handleContextActionClick = t5, draggable = !selected && !updating && source !== "replace-asset", t6;
|
|
3356
|
+
$[34] !== asset._id || $[35] !== assetsPicked || $[36] !== picked ? (t6 = (e_1) => {
|
|
3357
|
+
setDragAssetIds(e_1, picked ? assetsPicked.map(_temp3$11) : [asset._id]);
|
|
3358
|
+
}, $[34] = asset._id, $[35] = assetsPicked, $[36] = picked, $[37] = t6) : t6 = $[37];
|
|
3359
|
+
let handleDragStart = t6, opacityContainer = updating ? .5 : 1, opacityPreview = selected || updating ? .25 : 1, t7 = draggable ? handleDragStart : void 0, t8 = selected ? "default" : "pointer", t9;
|
|
3360
|
+
$[38] === t8 ? t9 = $[39] : (t9 = {
|
|
3361
|
+
cursor: t8,
|
|
3326
3362
|
position: "relative"
|
|
3327
|
-
}, $[
|
|
3328
|
-
let
|
|
3329
|
-
$[
|
|
3363
|
+
}, $[38] = t8, $[39] = t9);
|
|
3364
|
+
let t10 = `media-asset-card-${asset._id}`, t11;
|
|
3365
|
+
$[40] === opacityPreview ? t11 = $[41] : (t11 = {
|
|
3330
3366
|
height: "100%",
|
|
3331
3367
|
opacity: opacityPreview
|
|
3332
|
-
}, $[
|
|
3333
|
-
let
|
|
3334
|
-
$[
|
|
3368
|
+
}, $[40] = opacityPreview, $[41] = t11);
|
|
3369
|
+
let t12;
|
|
3370
|
+
$[42] === asset ? t12 = $[43] : (t12 = isFileAsset(asset) && /* @__PURE__ */ jsx(FileIcon$1, {
|
|
3335
3371
|
extension: asset.extension,
|
|
3336
3372
|
width: "80px"
|
|
3337
|
-
}), $[
|
|
3338
|
-
let
|
|
3339
|
-
$[
|
|
3373
|
+
}), $[42] = asset, $[43] = t12);
|
|
3374
|
+
let t13;
|
|
3375
|
+
$[44] !== asset || $[45] !== isOpaque || $[46] !== scheme ? (t13 = isImageAsset(asset) && /* @__PURE__ */ jsx(Image$1, {
|
|
3340
3376
|
draggable: !1,
|
|
3341
3377
|
$scheme: scheme,
|
|
3342
3378
|
$showCheckerboard: !isOpaque,
|
|
@@ -3348,16 +3384,16 @@ const selectCombinedItems = createSelector([
|
|
|
3348
3384
|
draggable: !1,
|
|
3349
3385
|
transition: "opacity 1000ms"
|
|
3350
3386
|
}
|
|
3351
|
-
}), $[
|
|
3352
|
-
let
|
|
3353
|
-
$[
|
|
3354
|
-
"data-testid":
|
|
3387
|
+
}), $[44] = asset, $[45] = isOpaque, $[46] = scheme, $[47] = t13) : t13 = $[47];
|
|
3388
|
+
let t14;
|
|
3389
|
+
$[48] !== handleAssetClick || $[49] !== t10 || $[50] !== t11 || $[51] !== t12 || $[52] !== t13 ? (t14 = /* @__PURE__ */ jsxs("div", {
|
|
3390
|
+
"data-testid": t10,
|
|
3355
3391
|
onClick: handleAssetClick,
|
|
3356
|
-
style:
|
|
3357
|
-
children: [
|
|
3358
|
-
}), $[
|
|
3359
|
-
let
|
|
3360
|
-
$[
|
|
3392
|
+
style: t11,
|
|
3393
|
+
children: [t12, t13]
|
|
3394
|
+
}), $[48] = handleAssetClick, $[49] = t10, $[50] = t11, $[51] = t12, $[52] = t13, $[53] = t14) : t14 = $[53];
|
|
3395
|
+
let t15;
|
|
3396
|
+
$[54] !== opacityContainer || $[55] !== selected || $[56] !== updating ? (t15 = selected && !updating && /* @__PURE__ */ jsx(Flex, {
|
|
3361
3397
|
align: "center",
|
|
3362
3398
|
justify: "center",
|
|
3363
3399
|
style: {
|
|
@@ -3372,9 +3408,9 @@ const selectCombinedItems = createSelector([
|
|
|
3372
3408
|
size: 2,
|
|
3373
3409
|
children: /* @__PURE__ */ jsx(CheckmarkCircleIcon, {})
|
|
3374
3410
|
})
|
|
3375
|
-
}), $[
|
|
3376
|
-
let
|
|
3377
|
-
$[
|
|
3411
|
+
}), $[54] = opacityContainer, $[55] = selected, $[56] = updating, $[57] = t15) : t15 = $[57];
|
|
3412
|
+
let t16;
|
|
3413
|
+
$[58] === updating ? t16 = $[59] : (t16 = updating && /* @__PURE__ */ jsx(Flex, {
|
|
3378
3414
|
align: "center",
|
|
3379
3415
|
justify: "center",
|
|
3380
3416
|
style: {
|
|
@@ -3385,21 +3421,21 @@ const selectCombinedItems = createSelector([
|
|
|
3385
3421
|
width: "100%"
|
|
3386
3422
|
},
|
|
3387
3423
|
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
3388
|
-
}), $[
|
|
3389
|
-
let
|
|
3390
|
-
$[
|
|
3424
|
+
}), $[58] = updating, $[59] = t16);
|
|
3425
|
+
let t17;
|
|
3426
|
+
$[60] !== t14 || $[61] !== t15 || $[62] !== t16 || $[63] !== t9 ? (t17 = /* @__PURE__ */ jsxs(Box, {
|
|
3391
3427
|
flex: 1,
|
|
3392
|
-
style:
|
|
3428
|
+
style: t9,
|
|
3393
3429
|
children: [
|
|
3394
|
-
|
|
3395
|
-
|
|
3396
|
-
|
|
3430
|
+
t14,
|
|
3431
|
+
t15,
|
|
3432
|
+
t16
|
|
3397
3433
|
]
|
|
3398
|
-
}), $[
|
|
3399
|
-
let
|
|
3400
|
-
$[
|
|
3401
|
-
let
|
|
3402
|
-
$[
|
|
3434
|
+
}), $[60] = t14, $[61] = t15, $[62] = t16, $[63] = t9, $[64] = t17) : t17 = $[64];
|
|
3435
|
+
let t18;
|
|
3436
|
+
$[65] === opacityContainer ? t18 = $[66] : (t18 = { opacity: opacityContainer }, $[65] = opacityContainer, $[66] = t18);
|
|
3437
|
+
let t19;
|
|
3438
|
+
$[67] !== isMultiSelect || $[68] !== onSelect || $[69] !== picked ? (t19 = onSelect && !isMultiSelect ? /* @__PURE__ */ jsx(EditIcon, { style: {
|
|
3403
3439
|
flexShrink: 0,
|
|
3404
3440
|
opacity: .5
|
|
3405
3441
|
} }) : /* @__PURE__ */ jsx(Checkbox, {
|
|
@@ -3410,9 +3446,9 @@ const selectCombinedItems = createSelector([
|
|
|
3410
3446
|
pointerEvents: "none",
|
|
3411
3447
|
transform: "scale(0.8)"
|
|
3412
3448
|
}
|
|
3413
|
-
}), $[
|
|
3414
|
-
let
|
|
3415
|
-
$[
|
|
3449
|
+
}), $[67] = isMultiSelect, $[68] = onSelect, $[69] = picked, $[70] = t19) : t19 = $[70];
|
|
3450
|
+
let t20;
|
|
3451
|
+
$[71] === asset.originalFilename ? t20 = $[72] : (t20 = /* @__PURE__ */ jsx(Box, {
|
|
3416
3452
|
marginLeft: 2,
|
|
3417
3453
|
children: /* @__PURE__ */ jsx(Text, {
|
|
3418
3454
|
muted: !0,
|
|
@@ -3420,18 +3456,18 @@ const selectCombinedItems = createSelector([
|
|
|
3420
3456
|
textOverflow: "ellipsis",
|
|
3421
3457
|
children: asset.originalFilename
|
|
3422
3458
|
})
|
|
3423
|
-
}), $[
|
|
3424
|
-
let
|
|
3425
|
-
$[
|
|
3459
|
+
}), $[71] = asset.originalFilename, $[72] = t20);
|
|
3460
|
+
let t21;
|
|
3461
|
+
$[73] !== handleContextActionClick || $[74] !== scheme || $[75] !== t18 || $[76] !== t19 || $[77] !== t20 ? (t21 = /* @__PURE__ */ jsxs(ContextActionContainer$2, {
|
|
3426
3462
|
align: "center",
|
|
3427
3463
|
onClick: handleContextActionClick,
|
|
3428
3464
|
paddingX: 1,
|
|
3429
3465
|
$scheme: scheme,
|
|
3430
|
-
style:
|
|
3431
|
-
children: [
|
|
3432
|
-
}), $[
|
|
3433
|
-
let
|
|
3434
|
-
$[
|
|
3466
|
+
style: t18,
|
|
3467
|
+
children: [t19, t20]
|
|
3468
|
+
}), $[73] = handleContextActionClick, $[74] = scheme, $[75] = t18, $[76] = t19, $[77] = t20, $[78] = t21) : t21 = $[78];
|
|
3469
|
+
let t22;
|
|
3470
|
+
$[79] === error ? t22 = $[80] : (t22 = error && /* @__PURE__ */ jsx(Box, {
|
|
3435
3471
|
padding: 3,
|
|
3436
3472
|
style: {
|
|
3437
3473
|
position: "absolute",
|
|
@@ -3455,21 +3491,23 @@ const selectCombinedItems = createSelector([
|
|
|
3455
3491
|
children: /* @__PURE__ */ jsx(StyledWarningOutlineIcon, { color: "critical" })
|
|
3456
3492
|
})
|
|
3457
3493
|
})
|
|
3458
|
-
}), $[
|
|
3459
|
-
let
|
|
3460
|
-
return $[
|
|
3494
|
+
}), $[79] = error, $[80] = t22);
|
|
3495
|
+
let t23;
|
|
3496
|
+
return $[81] !== draggable || $[82] !== item.updating || $[83] !== picked || $[84] !== t17 || $[85] !== t21 || $[86] !== t22 || $[87] !== t7 ? (t23 = /* @__PURE__ */ jsx(CardWrapper$2, {
|
|
3461
3497
|
padding: 1,
|
|
3462
3498
|
children: /* @__PURE__ */ jsxs(CardContainer, {
|
|
3463
3499
|
direction: "column",
|
|
3500
|
+
draggable,
|
|
3501
|
+
onDragStart: t7,
|
|
3464
3502
|
$picked: picked,
|
|
3465
3503
|
$updating: item.updating,
|
|
3466
3504
|
children: [
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3505
|
+
t17,
|
|
3506
|
+
t21,
|
|
3507
|
+
t22
|
|
3470
3508
|
]
|
|
3471
3509
|
})
|
|
3472
|
-
}), $[
|
|
3510
|
+
}), $[81] = draggable, $[82] = item.updating, $[83] = picked, $[84] = t17, $[85] = t21, $[86] = t22, $[87] = t7, $[88] = t23) : t23 = $[88], t23;
|
|
3473
3511
|
};
|
|
3474
3512
|
var CardAsset_default = memo(CardAsset);
|
|
3475
3513
|
function _temp$35(state) {
|
|
@@ -3478,6 +3516,9 @@ function _temp$35(state) {
|
|
|
3478
3516
|
function _temp2$21(d) {
|
|
3479
3517
|
return d.type === "dialogAllAssets";
|
|
3480
3518
|
}
|
|
3519
|
+
function _temp3$11(pickedItem) {
|
|
3520
|
+
return pickedItem.asset._id;
|
|
3521
|
+
}
|
|
3481
3522
|
const CardWrapper$1 = styled(Flex).withConfig({
|
|
3482
3523
|
displayName: "CardWrapper",
|
|
3483
3524
|
componentId: "sc-52xpdk-0"
|
|
@@ -3968,7 +4009,7 @@ function omitFacetId(facet) {
|
|
|
3968
4009
|
return withoutId;
|
|
3969
4010
|
}
|
|
3970
4011
|
const ReplaceAssetsOverview = () => {
|
|
3971
|
-
let $ = c(36), dispatch = useDispatch(), store = useStore(), combinedItems = useTypedSelector(selectCombinedItems), assetsById = useTypedSelector(_temp$33), fetchCount = useTypedSelector(_temp2$19), fetching = useTypedSelector(_temp3$
|
|
4012
|
+
let $ = c(36), dispatch = useDispatch(), store = useStore(), combinedItems = useTypedSelector(selectCombinedItems), assetsById = useTypedSelector(_temp$33), fetchCount = useTypedSelector(_temp2$19), fetching = useTypedSelector(_temp3$10), fetchingError = useTypedSelector(_temp4$6), pageSize = useTypedSelector(_temp5$4), searchQuery = useTypedSelector(_temp6$2), searchFacets = useTypedSelector(_temp7), currentFolderId = useTypedSelector(_temp8), currentFolderUnfiled = useTypedSelector(_temp9), assetToReplaceId = useTypedSelector(_temp11), savedBrowserStateRef = useRef(null), t0;
|
|
3972
4013
|
$[0] !== currentFolderId || $[1] !== currentFolderUnfiled || $[2] !== searchFacets || $[3] !== searchQuery.length ? (t0 = () => searchQuery.length > 0 || searchFacets.length > 0 || !!currentFolderId || currentFolderUnfiled, $[0] = currentFolderId, $[1] = currentFolderUnfiled, $[2] = searchFacets, $[3] = searchQuery.length, $[4] = t0) : t0 = $[4];
|
|
3973
4014
|
let [awaitingRefetch, setAwaitingRefetch] = useState(t0), t1, t2;
|
|
3974
4015
|
$[5] !== dispatch || $[6] !== store ? (t1 = () => {
|
|
@@ -4055,16 +4096,16 @@ function _temp$33(state) {
|
|
|
4055
4096
|
function _temp2$19(state_0) {
|
|
4056
4097
|
return state_0.assets.fetchCount;
|
|
4057
4098
|
}
|
|
4058
|
-
function _temp3$
|
|
4099
|
+
function _temp3$10(state_1) {
|
|
4059
4100
|
return state_1.assets.fetching;
|
|
4060
4101
|
}
|
|
4061
|
-
function _temp4$
|
|
4102
|
+
function _temp4$6(state_2) {
|
|
4062
4103
|
return state_2.assets.fetchingError;
|
|
4063
4104
|
}
|
|
4064
|
-
function _temp5$
|
|
4105
|
+
function _temp5$4(state_3) {
|
|
4065
4106
|
return state_3.assets.pageSize;
|
|
4066
4107
|
}
|
|
4067
|
-
function _temp6$
|
|
4108
|
+
function _temp6$2(state_4) {
|
|
4068
4109
|
return state_4.search.query;
|
|
4069
4110
|
}
|
|
4070
4111
|
function _temp7(state_5) {
|
|
@@ -4546,7 +4587,10 @@ const getExpandedIdSet = (folderId, byId) => {
|
|
|
4546
4587
|
expanded.add(cursor), cursor = node.parentId;
|
|
4547
4588
|
}
|
|
4548
4589
|
return expanded;
|
|
4549
|
-
},
|
|
4590
|
+
}, DropTree = styled(Tree).withConfig({
|
|
4591
|
+
displayName: "DropTree",
|
|
4592
|
+
componentId: "sc-0bwz5x-0"
|
|
4593
|
+
})`[data-drop-target] > [data-ui='TreeItem__box']{box-shadow:inset 0 0 0 2px var(--card-focus-ring-color);}`, ROOT_DROP_TARGET_ID = "__all-assets", FolderHeaderAction = (t0) => {
|
|
4550
4594
|
let $ = c(11), { disabled: t1, icon, onClick, tone: t2, tooltip } = t0, disabled = t1 !== void 0 && t1, tone = t2 === void 0 ? "default" : t2, t3;
|
|
4551
4595
|
$[0] === tooltip ? t3 = $[1] : (t3 = /* @__PURE__ */ jsx(Container, {
|
|
4552
4596
|
padding: 2,
|
|
@@ -4637,140 +4681,191 @@ const getExpandedIdSet = (folderId, byId) => {
|
|
|
4637
4681
|
children: [t5, t7]
|
|
4638
4682
|
}), $[9] = t5, $[10] = t7, $[11] = t8) : t8 = $[11], t8;
|
|
4639
4683
|
}, FolderNode = (t0) => {
|
|
4640
|
-
let $ = c(
|
|
4684
|
+
let $ = c(30), { currentFolderId, dropTargetId, expandedIds, getDropTargetHandlers, node, onSelect } = t0, hasChildren = node.children.length > 0, selected = currentFolderId === node.id, isDropTarget = dropTargetId === node.id, t1;
|
|
4641
4685
|
$[0] !== expandedIds || $[1] !== node.id ? (t1 = expandedIds.has(node.id), $[0] = expandedIds, $[1] = node.id, $[2] = t1) : t1 = $[2];
|
|
4642
|
-
let t2;
|
|
4643
|
-
$[3] !== node.id || $[4] !== onSelect ? (
|
|
4644
|
-
let
|
|
4645
|
-
$[6] !== node.name || $[7] !== node.totalCount ? (
|
|
4686
|
+
let t2 = node.id, t3;
|
|
4687
|
+
$[3] !== node.id || $[4] !== onSelect ? (t3 = () => onSelect(node.id), $[3] = node.id, $[4] = onSelect, $[5] = t3) : t3 = $[5];
|
|
4688
|
+
let t4 = isDropTarget ? "" : void 0, t5;
|
|
4689
|
+
$[6] !== node.name || $[7] !== node.totalCount ? (t5 = /* @__PURE__ */ jsx(FolderItemText, {
|
|
4646
4690
|
name: node.name,
|
|
4647
4691
|
totalCount: node.totalCount
|
|
4648
|
-
}), $[6] = node.name, $[7] = node.totalCount, $[8] =
|
|
4649
|
-
let
|
|
4650
|
-
$[9] !==
|
|
4692
|
+
}), $[6] = node.name, $[7] = node.totalCount, $[8] = t5) : t5 = $[8];
|
|
4693
|
+
let t6 = selected ? "semibold" : "medium", t7;
|
|
4694
|
+
$[9] !== getDropTargetHandlers || $[10] !== node.id ? (t7 = getDropTargetHandlers(node.id), $[9] = getDropTargetHandlers, $[10] = node.id, $[11] = t7) : t7 = $[11];
|
|
4695
|
+
let t8;
|
|
4696
|
+
$[12] !== currentFolderId || $[13] !== dropTargetId || $[14] !== expandedIds || $[15] !== getDropTargetHandlers || $[16] !== hasChildren || $[17] !== node.children || $[18] !== onSelect ? (t8 = hasChildren && node.children.map((childNode) => /* @__PURE__ */ jsx(FolderNode, {
|
|
4651
4697
|
currentFolderId,
|
|
4698
|
+
dropTargetId,
|
|
4652
4699
|
expandedIds,
|
|
4700
|
+
getDropTargetHandlers,
|
|
4653
4701
|
node: childNode,
|
|
4654
4702
|
onSelect
|
|
4655
|
-
}, childNode.id)), $[
|
|
4656
|
-
let
|
|
4657
|
-
return $[
|
|
4703
|
+
}, childNode.id)), $[12] = currentFolderId, $[13] = dropTargetId, $[14] = expandedIds, $[15] = getDropTargetHandlers, $[16] = hasChildren, $[17] = node.children, $[18] = onSelect, $[19] = t8) : t8 = $[19];
|
|
4704
|
+
let t9;
|
|
4705
|
+
return $[20] !== node.id || $[21] !== selected || $[22] !== t1 || $[23] !== t3 || $[24] !== t4 || $[25] !== t5 || $[26] !== t6 || $[27] !== t7 || $[28] !== t8 ? (t9 = /* @__PURE__ */ jsx(TreeItem, {
|
|
4658
4706
|
expanded: t1,
|
|
4659
|
-
id:
|
|
4660
|
-
onClick:
|
|
4707
|
+
id: t2,
|
|
4708
|
+
onClick: t3,
|
|
4709
|
+
"data-drop-target": t4,
|
|
4661
4710
|
selected,
|
|
4662
|
-
text:
|
|
4663
|
-
weight:
|
|
4664
|
-
|
|
4665
|
-
|
|
4711
|
+
text: t5,
|
|
4712
|
+
weight: t6,
|
|
4713
|
+
...t7,
|
|
4714
|
+
children: t8
|
|
4715
|
+
}), $[20] = node.id, $[21] = selected, $[22] = t1, $[23] = t3, $[24] = t4, $[25] = t5, $[26] = t6, $[27] = t7, $[28] = t8, $[29] = t9) : t9 = $[29], t9;
|
|
4666
4716
|
}, FolderView = () => {
|
|
4667
|
-
let $ = c(
|
|
4717
|
+
let $ = c(114), dispatch = useDispatch(), currentFolderId = useTypedSelector(_temp$29), assetsById = useTypedSelector(_temp2$16), byId = useTypedSelector(_temp3$9), canDeleteFolder = useTypedSelector(selectCanDeleteFolder), fetching = useTypedSelector(_temp4$5), folderTree = useTypedSelector(selectFolderTree), currentFolder = currentFolderId ? byId[currentFolderId] : null, t0;
|
|
4668
4718
|
$[0] !== byId || $[1] !== currentFolderId ? (t0 = getExpandedIdSet(currentFolderId, byId), $[0] = byId, $[1] = currentFolderId, $[2] = t0) : t0 = $[2];
|
|
4669
4719
|
let expandedIds = t0, t1;
|
|
4670
4720
|
$[3] === expandedIds ? t1 = $[4] : (t1 = Array.from(expandedIds).join("|") || "root", $[3] = expandedIds, $[4] = t1);
|
|
4671
|
-
let treeKey = t1, hasFolders = folderTree.length > 0, t2;
|
|
4672
|
-
$[5] ===
|
|
4673
|
-
|
|
4674
|
-
|
|
4675
|
-
|
|
4676
|
-
|
|
4677
|
-
|
|
4678
|
-
|
|
4679
|
-
|
|
4680
|
-
}));
|
|
4681
|
-
}, $[7] = currentFolder, $[8] = currentFolderId, $[9] = dispatch, $[10] = t3) : t3 = $[10];
|
|
4682
|
-
let handleFolderDelete = t3, t4;
|
|
4683
|
-
$[11] === Symbol.for("react.memo_cache_sentinel") ? (t4 = {
|
|
4684
|
-
borderBottom: "1px solid var(--card-border-color)",
|
|
4685
|
-
flexShrink: 0,
|
|
4686
|
-
height: "32px"
|
|
4687
|
-
}, $[11] = t4) : t4 = $[11];
|
|
4721
|
+
let treeKey = t1, hasFolders = folderTree.length > 0, [dropTargetId, setDropTargetId] = useState(null), t2;
|
|
4722
|
+
$[5] === Symbol.for("react.memo_cache_sentinel") ? (t2 = /* @__PURE__ */ new Map(), $[5] = t2) : t2 = $[5];
|
|
4723
|
+
let dragDepth = useRef(t2), t3, t4;
|
|
4724
|
+
$[6] === Symbol.for("react.memo_cache_sentinel") ? (t3 = () => {
|
|
4725
|
+
let handleDragEnd = () => {
|
|
4726
|
+
dragDepth.current.clear(), setDropTargetId(null);
|
|
4727
|
+
};
|
|
4728
|
+
return window.addEventListener("dragend", handleDragEnd), () => window.removeEventListener("dragend", handleDragEnd);
|
|
4729
|
+
}, t4 = [], $[6] = t3, $[7] = t4) : (t3 = $[6], t4 = $[7]), useEffect(t3, t4);
|
|
4688
4730
|
let t5;
|
|
4689
|
-
$[
|
|
4690
|
-
|
|
4691
|
-
|
|
4692
|
-
|
|
4693
|
-
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4698
|
-
|
|
4699
|
-
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4704
|
-
|
|
4705
|
-
|
|
4706
|
-
|
|
4707
|
-
|
|
4708
|
-
|
|
4709
|
-
|
|
4710
|
-
|
|
4711
|
-
|
|
4712
|
-
|
|
4713
|
-
|
|
4714
|
-
|
|
4715
|
-
|
|
4716
|
-
|
|
4717
|
-
|
|
4718
|
-
|
|
4719
|
-
|
|
4720
|
-
|
|
4721
|
-
|
|
4722
|
-
|
|
4723
|
-
|
|
4724
|
-
|
|
4725
|
-
|
|
4726
|
-
|
|
4727
|
-
|
|
4728
|
-
|
|
4729
|
-
|
|
4730
|
-
|
|
4731
|
-
|
|
4732
|
-
|
|
4733
|
-
|
|
4734
|
-
|
|
4735
|
-
|
|
4736
|
-
|
|
4737
|
-
|
|
4738
|
-
|
|
4739
|
-
|
|
4740
|
-
|
|
4741
|
-
|
|
4742
|
-
|
|
4743
|
-
|
|
4744
|
-
|
|
4745
|
-
|
|
4746
|
-
|
|
4747
|
-
|
|
4748
|
-
|
|
4749
|
-
|
|
4750
|
-
|
|
4751
|
-
|
|
4752
|
-
|
|
4753
|
-
|
|
4754
|
-
|
|
4755
|
-
|
|
4756
|
-
|
|
4757
|
-
|
|
4758
|
-
|
|
4759
|
-
let
|
|
4760
|
-
$[
|
|
4731
|
+
$[8] === dispatch ? t5 = $[9] : (t5 = (folderId) => {
|
|
4732
|
+
dispatch(foldersActions.currentFolderSet({ folderId }));
|
|
4733
|
+
}, $[8] = dispatch, $[9] = t5);
|
|
4734
|
+
let handleFolderSelect = t5, T0, T1, T2, T3, T4, getDropTargetHandlers, t10, t11, t12, t13, t14, t15, t16, t17, t18, t19, t6, t7, t8, t9;
|
|
4735
|
+
if ($[10] !== assetsById || $[11] !== canDeleteFolder || $[12] !== currentFolder || $[13] !== currentFolderId || $[14] !== dispatch || $[15] !== dropTargetId || $[16] !== fetching || $[17] !== treeKey) {
|
|
4736
|
+
getDropTargetHandlers = (folderId_0) => {
|
|
4737
|
+
let targetId = folderId_0 ?? ROOT_DROP_TARGET_ID;
|
|
4738
|
+
return {
|
|
4739
|
+
onDragEnter: (e) => {
|
|
4740
|
+
if (!isAssetDrag(e)) return;
|
|
4741
|
+
e.preventDefault(), e.stopPropagation();
|
|
4742
|
+
let depth = (dragDepth.current.get(targetId) ?? 0) + 1;
|
|
4743
|
+
dragDepth.current.set(targetId, depth), setDropTargetId(targetId);
|
|
4744
|
+
},
|
|
4745
|
+
onDragOver: _temp5$3,
|
|
4746
|
+
onDragLeave: (e_1) => {
|
|
4747
|
+
if (!isAssetDrag(e_1)) return;
|
|
4748
|
+
e_1.stopPropagation();
|
|
4749
|
+
let depth_0 = (dragDepth.current.get(targetId) ?? 0) - 1;
|
|
4750
|
+
if (depth_0 > 0) {
|
|
4751
|
+
dragDepth.current.set(targetId, depth_0);
|
|
4752
|
+
return;
|
|
4753
|
+
}
|
|
4754
|
+
dragDepth.current.delete(targetId), setDropTargetId((current) => current === targetId ? null : current);
|
|
4755
|
+
},
|
|
4756
|
+
onDrop: (e_2) => {
|
|
4757
|
+
if (!isAssetDrag(e_2)) return;
|
|
4758
|
+
e_2.preventDefault(), e_2.stopPropagation(), dragDepth.current.clear(), setDropTargetId(null);
|
|
4759
|
+
let assets = getDragAssetIds(e_2).map((assetId) => assetsById[assetId]).filter(_temp6$1).filter((item_0) => (item_0.asset.opt?.media?.folder?._ref ?? null) !== folderId_0);
|
|
4760
|
+
assets.length !== 0 && dispatch(assetsActions.folderSetRequest({
|
|
4761
|
+
assets,
|
|
4762
|
+
folderId: folderId_0
|
|
4763
|
+
}));
|
|
4764
|
+
}
|
|
4765
|
+
};
|
|
4766
|
+
};
|
|
4767
|
+
let t20;
|
|
4768
|
+
$[38] !== currentFolder || $[39] !== currentFolderId || $[40] !== dispatch ? (t20 = () => {
|
|
4769
|
+
!currentFolderId || !currentFolder || dispatch(dialogActions.showConfirmDeleteFolder({
|
|
4770
|
+
folderId: currentFolderId,
|
|
4771
|
+
folderName: currentFolder.name
|
|
4772
|
+
}));
|
|
4773
|
+
}, $[38] = currentFolder, $[39] = currentFolderId, $[40] = dispatch, $[41] = t20) : t20 = $[41];
|
|
4774
|
+
let handleFolderDelete = t20;
|
|
4775
|
+
T4 = Flex, t16 = "column", t17 = 1, t18 = "fill";
|
|
4776
|
+
let t21;
|
|
4777
|
+
$[42] === Symbol.for("react.memo_cache_sentinel") ? (t21 = {
|
|
4778
|
+
borderBottom: "1px solid var(--card-border-color)",
|
|
4779
|
+
flexShrink: 0,
|
|
4780
|
+
height: "32px"
|
|
4781
|
+
}, $[42] = t21) : t21 = $[42];
|
|
4782
|
+
let t22;
|
|
4783
|
+
$[43] === Symbol.for("react.memo_cache_sentinel") ? (t22 = /* @__PURE__ */ jsx(Label, {
|
|
4784
|
+
size: 0,
|
|
4785
|
+
children: "Folders"
|
|
4786
|
+
}), $[43] = t22) : t22 = $[43];
|
|
4787
|
+
let t23;
|
|
4788
|
+
$[44] === fetching ? t23 = $[45] : (t23 = fetching && /* @__PURE__ */ jsx(Label, {
|
|
4789
|
+
size: 0,
|
|
4790
|
+
style: { opacity: .3 },
|
|
4791
|
+
children: "Loading..."
|
|
4792
|
+
}), $[44] = fetching, $[45] = t23);
|
|
4793
|
+
let t24;
|
|
4794
|
+
$[46] === t23 ? t24 = $[47] : (t24 = /* @__PURE__ */ jsx(Box, {
|
|
4795
|
+
flex: 1,
|
|
4796
|
+
children: /* @__PURE__ */ jsxs(Inline, {
|
|
4797
|
+
gap: 2,
|
|
4798
|
+
children: [t22, t23]
|
|
4799
|
+
})
|
|
4800
|
+
}), $[46] = t23, $[47] = t24);
|
|
4801
|
+
let t25;
|
|
4802
|
+
$[48] !== currentFolderId || $[49] !== dispatch ? (t25 = currentFolderId && /* @__PURE__ */ jsx(FolderHeaderAction, {
|
|
4803
|
+
icon: /* @__PURE__ */ jsx(EditIcon, {}),
|
|
4804
|
+
onClick: () => dispatch(DIALOG_ACTIONS.showFolderRename({ folderId: currentFolderId })),
|
|
4805
|
+
tone: "primary",
|
|
4806
|
+
tooltip: "Rename folder"
|
|
4807
|
+
}), $[48] = currentFolderId, $[49] = dispatch, $[50] = t25) : t25 = $[50];
|
|
4808
|
+
let t26;
|
|
4809
|
+
$[51] === Symbol.for("react.memo_cache_sentinel") ? (t26 = /* @__PURE__ */ jsx(AddIcon, {}), $[51] = t26) : t26 = $[51];
|
|
4810
|
+
let t27;
|
|
4811
|
+
$[52] !== currentFolderId || $[53] !== dispatch ? (t27 = /* @__PURE__ */ jsx(FolderHeaderAction, {
|
|
4812
|
+
icon: t26,
|
|
4813
|
+
onClick: () => dispatch(DIALOG_ACTIONS.showFolderCreate({ parentFolderId: currentFolderId || null })),
|
|
4814
|
+
tone: "primary",
|
|
4815
|
+
tooltip: "Create folder"
|
|
4816
|
+
}), $[52] = currentFolderId, $[53] = dispatch, $[54] = t27) : t27 = $[54];
|
|
4817
|
+
let t28;
|
|
4818
|
+
$[55] !== canDeleteFolder || $[56] !== currentFolderId || $[57] !== handleFolderDelete ? (t28 = currentFolderId && canDeleteFolder && /* @__PURE__ */ jsx(FolderHeaderAction, {
|
|
4819
|
+
icon: /* @__PURE__ */ jsx(TrashIcon, {}),
|
|
4820
|
+
onClick: handleFolderDelete,
|
|
4821
|
+
tone: "critical",
|
|
4822
|
+
tooltip: "Delete folder"
|
|
4823
|
+
}), $[55] = canDeleteFolder, $[56] = currentFolderId, $[57] = handleFolderDelete, $[58] = t28) : t28 = $[58];
|
|
4824
|
+
let t29;
|
|
4825
|
+
$[59] !== t25 || $[60] !== t27 || $[61] !== t28 ? (t29 = /* @__PURE__ */ jsxs(Inline, {
|
|
4826
|
+
gap: 1,
|
|
4827
|
+
children: [
|
|
4828
|
+
t25,
|
|
4829
|
+
t27,
|
|
4830
|
+
t28
|
|
4831
|
+
]
|
|
4832
|
+
}), $[59] = t25, $[60] = t27, $[61] = t28, $[62] = t29) : t29 = $[62], $[63] !== t24 || $[64] !== t29 ? (t19 = /* @__PURE__ */ jsxs(Flex, {
|
|
4833
|
+
align: "center",
|
|
4834
|
+
justify: "space-between",
|
|
4835
|
+
paddingX: 3,
|
|
4836
|
+
style: t21,
|
|
4837
|
+
children: [t24, t29]
|
|
4838
|
+
}), $[63] = t24, $[64] = t29, $[65] = t19) : t19 = $[65], T3 = Box, t15 = 2, T2 = Box, T1 = DropTree, t13 = 1, t14 = treeKey, T0 = TreeItem, t6 = dropTargetId === ROOT_DROP_TARGET_ID ? "" : void 0, t7 = ROOT_DROP_TARGET_ID, $[66] === dispatch ? t8 = $[67] : (t8 = () => dispatch(foldersActions.currentFolderClear()), $[66] = dispatch, $[67] = t8), t9 = currentFolderId === null, t10 = "All assets", t11 = currentFolderId === null ? "semibold" : "medium", t12 = getDropTargetHandlers(null), $[10] = assetsById, $[11] = canDeleteFolder, $[12] = currentFolder, $[13] = currentFolderId, $[14] = dispatch, $[15] = dropTargetId, $[16] = fetching, $[17] = treeKey, $[18] = T0, $[19] = T1, $[20] = T2, $[21] = T3, $[22] = T4, $[23] = getDropTargetHandlers, $[24] = t10, $[25] = t11, $[26] = t12, $[27] = t13, $[28] = t14, $[29] = t15, $[30] = t16, $[31] = t17, $[32] = t18, $[33] = t19, $[34] = t6, $[35] = t7, $[36] = t8, $[37] = t9;
|
|
4839
|
+
} else T0 = $[18], T1 = $[19], T2 = $[20], T3 = $[21], T4 = $[22], getDropTargetHandlers = $[23], t10 = $[24], t11 = $[25], t12 = $[26], t13 = $[27], t14 = $[28], t15 = $[29], t16 = $[30], t17 = $[31], t18 = $[32], t19 = $[33], t6 = $[34], t7 = $[35], t8 = $[36], t9 = $[37];
|
|
4840
|
+
let t20;
|
|
4841
|
+
$[68] !== T0 || $[69] !== t10 || $[70] !== t11 || $[71] !== t12 || $[72] !== t6 || $[73] !== t7 || $[74] !== t8 || $[75] !== t9 ? (t20 = /* @__PURE__ */ jsx(T0, {
|
|
4842
|
+
"data-drop-target": t6,
|
|
4843
|
+
id: t7,
|
|
4844
|
+
onClick: t8,
|
|
4845
|
+
selected: t9,
|
|
4846
|
+
text: t10,
|
|
4847
|
+
weight: t11,
|
|
4848
|
+
...t12
|
|
4849
|
+
}), $[68] = T0, $[69] = t10, $[70] = t11, $[71] = t12, $[72] = t6, $[73] = t7, $[74] = t8, $[75] = t9, $[76] = t20) : t20 = $[76];
|
|
4850
|
+
let t21;
|
|
4851
|
+
if ($[77] !== currentFolderId || $[78] !== dropTargetId || $[79] !== expandedIds || $[80] !== folderTree || $[81] !== getDropTargetHandlers || $[82] !== handleFolderSelect) {
|
|
4852
|
+
let t22;
|
|
4853
|
+
$[84] !== currentFolderId || $[85] !== dropTargetId || $[86] !== expandedIds || $[87] !== getDropTargetHandlers || $[88] !== handleFolderSelect ? (t22 = (node) => /* @__PURE__ */ jsx(FolderNode, {
|
|
4761
4854
|
currentFolderId,
|
|
4855
|
+
dropTargetId,
|
|
4762
4856
|
expandedIds,
|
|
4857
|
+
getDropTargetHandlers,
|
|
4763
4858
|
node,
|
|
4764
4859
|
onSelect: handleFolderSelect
|
|
4765
|
-
}, node.id), $[
|
|
4766
|
-
} else
|
|
4767
|
-
let
|
|
4768
|
-
$[
|
|
4769
|
-
gap:
|
|
4770
|
-
children: [
|
|
4771
|
-
},
|
|
4772
|
-
let
|
|
4773
|
-
$[
|
|
4860
|
+
}, node.id), $[84] = currentFolderId, $[85] = dropTargetId, $[86] = expandedIds, $[87] = getDropTargetHandlers, $[88] = handleFolderSelect, $[89] = t22) : t22 = $[89], t21 = folderTree.map(t22), $[77] = currentFolderId, $[78] = dropTargetId, $[79] = expandedIds, $[80] = folderTree, $[81] = getDropTargetHandlers, $[82] = handleFolderSelect, $[83] = t21;
|
|
4861
|
+
} else t21 = $[83];
|
|
4862
|
+
let t22;
|
|
4863
|
+
$[90] !== T1 || $[91] !== t13 || $[92] !== t14 || $[93] !== t20 || $[94] !== t21 ? (t22 = /* @__PURE__ */ jsxs(T1, {
|
|
4864
|
+
gap: t13,
|
|
4865
|
+
children: [t20, t21]
|
|
4866
|
+
}, t14), $[90] = T1, $[91] = t13, $[92] = t14, $[93] = t20, $[94] = t21, $[95] = t22) : t22 = $[95];
|
|
4867
|
+
let t23;
|
|
4868
|
+
$[96] !== fetching || $[97] !== hasFolders ? (t23 = !hasFolders && !fetching && /* @__PURE__ */ jsx(Box, {
|
|
4774
4869
|
marginTop: 3,
|
|
4775
4870
|
paddingX: 1,
|
|
4776
4871
|
children: /* @__PURE__ */ jsx(Text, {
|
|
@@ -4778,28 +4873,39 @@ const getExpandedIdSet = (folderId, byId) => {
|
|
|
4778
4873
|
size: 1,
|
|
4779
4874
|
children: /* @__PURE__ */ jsx("em", { children: "No folders" })
|
|
4780
4875
|
})
|
|
4781
|
-
}), $[
|
|
4782
|
-
let
|
|
4783
|
-
$[
|
|
4784
|
-
|
|
4785
|
-
|
|
4786
|
-
|
|
4787
|
-
|
|
4788
|
-
|
|
4789
|
-
|
|
4790
|
-
|
|
4791
|
-
|
|
4792
|
-
|
|
4793
|
-
|
|
4876
|
+
}), $[96] = fetching, $[97] = hasFolders, $[98] = t23) : t23 = $[98];
|
|
4877
|
+
let t24;
|
|
4878
|
+
$[99] !== T2 || $[100] !== t22 || $[101] !== t23 ? (t24 = /* @__PURE__ */ jsxs(T2, { children: [t22, t23] }), $[99] = T2, $[100] = t22, $[101] = t23, $[102] = t24) : t24 = $[102];
|
|
4879
|
+
let t25;
|
|
4880
|
+
$[103] !== T3 || $[104] !== t15 || $[105] !== t24 ? (t25 = /* @__PURE__ */ jsx(T3, {
|
|
4881
|
+
padding: t15,
|
|
4882
|
+
children: t24
|
|
4883
|
+
}), $[103] = T3, $[104] = t15, $[105] = t24, $[106] = t25) : t25 = $[106];
|
|
4884
|
+
let t26;
|
|
4885
|
+
return $[107] !== T4 || $[108] !== t16 || $[109] !== t17 || $[110] !== t18 || $[111] !== t19 || $[112] !== t25 ? (t26 = /* @__PURE__ */ jsxs(T4, {
|
|
4886
|
+
direction: t16,
|
|
4887
|
+
flex: t17,
|
|
4888
|
+
height: t18,
|
|
4889
|
+
children: [t19, t25]
|
|
4890
|
+
}), $[107] = T4, $[108] = t16, $[109] = t17, $[110] = t18, $[111] = t19, $[112] = t25, $[113] = t26) : t26 = $[113], t26;
|
|
4794
4891
|
};
|
|
4795
4892
|
function _temp$29(state) {
|
|
4796
4893
|
return state.folders.currentFolderId;
|
|
4797
4894
|
}
|
|
4798
4895
|
function _temp2$16(state_0) {
|
|
4799
|
-
return state_0.
|
|
4896
|
+
return state_0.assets.byIds;
|
|
4897
|
+
}
|
|
4898
|
+
function _temp3$9(state_1) {
|
|
4899
|
+
return state_1.folders.byId;
|
|
4900
|
+
}
|
|
4901
|
+
function _temp4$5(state_2) {
|
|
4902
|
+
return state_2.folders.fetching;
|
|
4800
4903
|
}
|
|
4801
|
-
function
|
|
4802
|
-
|
|
4904
|
+
function _temp5$3(e_0) {
|
|
4905
|
+
isAssetDrag(e_0) && (e_0.preventDefault(), e_0.stopPropagation(), e_0.dataTransfer.dropEffect = "move");
|
|
4906
|
+
}
|
|
4907
|
+
function _temp6$1(item) {
|
|
4908
|
+
return !!item;
|
|
4803
4909
|
}
|
|
4804
4910
|
const DialogFolders = (props) => {
|
|
4805
4911
|
let $ = c(7), { children, dialog: t0 } = props, { id } = t0, dispatch = useDispatch(), t1;
|
|
@@ -5343,7 +5449,7 @@ const DialogFolders = (props) => {
|
|
|
5343
5449
|
isDisabled: tagsFetching,
|
|
5344
5450
|
isSearchable: !0,
|
|
5345
5451
|
name: "tags",
|
|
5346
|
-
noOptionsMessage: _temp3$
|
|
5452
|
+
noOptionsMessage: _temp3$8,
|
|
5347
5453
|
onChange: (value) => handleChange(value),
|
|
5348
5454
|
options: allTagOptions,
|
|
5349
5455
|
placeholder: tagsFetching ? "Loading..." : "Select...",
|
|
@@ -5363,7 +5469,7 @@ function _temp$28(state) {
|
|
|
5363
5469
|
function _temp2$15(state_0) {
|
|
5364
5470
|
return state_0.tags.fetching;
|
|
5365
5471
|
}
|
|
5366
|
-
function _temp3$
|
|
5472
|
+
function _temp3$8() {
|
|
5367
5473
|
return "No tags";
|
|
5368
5474
|
}
|
|
5369
5475
|
const StackContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
@@ -5402,7 +5508,7 @@ function _temp2$14(facet) {
|
|
|
5402
5508
|
return facet.type === "number" ? /* @__PURE__ */ jsx(SearchFacetNumber, { facet }, key) : facet.type === "searchable" ? /* @__PURE__ */ jsx(SearchFacetTags, { facet }, key) : facet.type === "select" ? /* @__PURE__ */ jsx(SearchFacetSelect, { facet }, key) : facet.type === "string" ? /* @__PURE__ */ jsx(SearchFacetString, { facet }, key) : null;
|
|
5403
5509
|
}
|
|
5404
5510
|
const SearchFacetsControl = () => {
|
|
5405
|
-
let $ = c(35), dispatch = useDispatch(), assetTypes = useTypedSelector(_temp$26), searchFacets = useTypedSelector(_temp2$13), selectedDocument = useTypedSelector(_temp3$
|
|
5511
|
+
let $ = c(35), dispatch = useDispatch(), assetTypes = useTypedSelector(_temp$26), searchFacets = useTypedSelector(_temp2$13), selectedDocument = useTypedSelector(_temp3$7), popoverProps = usePortalPopoverProps(), { creditLine } = useToolOptions(), isTool = !selectedDocument, T0, T1, T2, t0, t1, t2;
|
|
5406
5512
|
if ($[0] !== assetTypes || $[1] !== creditLine?.enabled || $[2] !== dispatch || $[3] !== isTool || $[4] !== searchFacets) {
|
|
5407
5513
|
let t3;
|
|
5408
5514
|
$[11] !== assetTypes || $[12] !== creditLine?.enabled || $[13] !== isTool ? (t3 = (facet) => !creditLine?.enabled && facet?.type === "string" && facet?.name === "creditLine" ? !1 : facet.type === "group" || facet.type === "divider" ? !0 : isTool ? !facet?.selectOnly : facet.assetTypes.filter((assetType) => assetTypes.includes(assetType)).length > 0, $[11] = assetTypes, $[12] = creditLine?.enabled, $[13] = isTool, $[14] = t3) : t3 = $[14];
|
|
@@ -5470,7 +5576,7 @@ function _temp$26(state) {
|
|
|
5470
5576
|
function _temp2$13(state_0) {
|
|
5471
5577
|
return state_0.search.facets;
|
|
5472
5578
|
}
|
|
5473
|
-
function _temp3$
|
|
5579
|
+
function _temp3$7(state_1) {
|
|
5474
5580
|
return state_1.selected.document;
|
|
5475
5581
|
}
|
|
5476
5582
|
function _temp4$4(facet_0, index, facets) {
|
|
@@ -5904,7 +6010,7 @@ const TagContainer = styled(Flex).withConfig({
|
|
|
5904
6010
|
let tagIdsSegmented = pickedTagIdsUnique.reduce(t1, {
|
|
5905
6011
|
appliedToAll: [],
|
|
5906
6012
|
appliedToSome: []
|
|
5907
|
-
}), tagsAppliedToAll = tags.filter((tag_1) => tagIdsSegmented.appliedToAll.includes(tag_1.tag._id)).map(_temp3$
|
|
6013
|
+
}), tagsAppliedToAll = tags.filter((tag_1) => tagIdsSegmented.appliedToAll.includes(tag_1.tag._id)).map(_temp3$6), tagsAppliedToSome = tags.filter((tag_2) => tagIdsSegmented.appliedToSome.includes(tag_2.tag._id)).map(_temp4$3), tagsUnused = tags.filter((tag_3) => !pickedTagIdsUnique.includes(tag_3.tag._id)).map(_temp5$2);
|
|
5908
6014
|
items = [], assetsPicked.length === 0 ? items = tags.map(_temp6) : (tagsAppliedToAll?.length > 0 && (items = [
|
|
5909
6015
|
...items,
|
|
5910
6016
|
assetsPicked.length === 1 ? "Used" : "Used by all",
|
|
@@ -5951,7 +6057,7 @@ function _temp2$11(acc, val) {
|
|
|
5951
6057
|
let assetTagIds = val?.asset?.opt?.media?.tags?.map(_temp$23) || [];
|
|
5952
6058
|
return acc = acc.concat(assetTagIds), acc;
|
|
5953
6059
|
}
|
|
5954
|
-
function _temp3$
|
|
6060
|
+
function _temp3$6(tagItem) {
|
|
5955
6061
|
return {
|
|
5956
6062
|
...tagItem,
|
|
5957
6063
|
actions: [
|
|
@@ -6633,7 +6739,7 @@ function _temp$15(state) {
|
|
|
6633
6739
|
return state.search.query;
|
|
6634
6740
|
}
|
|
6635
6741
|
const Controls = () => {
|
|
6636
|
-
let $ = c(62), dispatch = useDispatch(), fetching = useTypedSelector(_temp$14), foldersPanelVisible = useTypedSelector(_temp2$8), pageIndex = useTypedSelector(_temp3$
|
|
6742
|
+
let $ = c(62), dispatch = useDispatch(), fetching = useTypedSelector(_temp$14), foldersPanelVisible = useTypedSelector(_temp2$8), pageIndex = useTypedSelector(_temp3$5), searchFacets = useTypedSelector(_temp4$2), tagsPanelVisible = useTypedSelector(_temp5$1), mediaIndex = useMediaIndex(), t0;
|
|
6637
6743
|
$[0] === dispatch ? t0 = $[1] : (t0 = () => {
|
|
6638
6744
|
dispatch(dialogActions.showSearchFacets());
|
|
6639
6745
|
}, $[0] = dispatch, $[1] = t0);
|
|
@@ -6845,7 +6951,7 @@ function _temp$14(state) {
|
|
|
6845
6951
|
function _temp2$8(state_0) {
|
|
6846
6952
|
return state_0.folders.panelVisible;
|
|
6847
6953
|
}
|
|
6848
|
-
function _temp3$
|
|
6954
|
+
function _temp3$5(state_1) {
|
|
6849
6955
|
return state_1.assets.pageIndex;
|
|
6850
6956
|
}
|
|
6851
6957
|
function _temp4$2(state_2) {
|
|
@@ -7219,15 +7325,15 @@ function _temp$8(state) {
|
|
|
7219
7325
|
}
|
|
7220
7326
|
const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
7221
7327
|
displayName: "ContainerGrid",
|
|
7222
|
-
componentId: "sc-
|
|
7328
|
+
componentId: "sc-zsye3t-0"
|
|
7223
7329
|
})(({ $scheme, $selected, $updating }) => css`align-items:center;cursor:${$selected ? "default" : "pointer"};height:100%;pointer-events:${$updating ? "none" : "auto"};user-select:none;white-space:nowrap;${!$updating && css`@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg")};}}`}`), ContextActionContainer = /* @__PURE__ */ styled(Flex).withConfig({
|
|
7224
7330
|
displayName: "ContextActionContainer",
|
|
7225
|
-
componentId: "sc-
|
|
7331
|
+
componentId: "sc-zsye3t-1"
|
|
7226
7332
|
})(({ $scheme }) => css`cursor:pointer;@media (hover:hover) and (pointer:fine){&:hover{background:${getSchemeColor($scheme, "bg2")};}}`), StyledWarningIcon = /* @__PURE__ */ styled(WarningFilledIcon).withConfig({
|
|
7227
7333
|
displayName: "StyledWarningIcon",
|
|
7228
|
-
componentId: "sc-
|
|
7334
|
+
componentId: "sc-zsye3t-2"
|
|
7229
7335
|
})(({ theme }) => ({ color: theme.sanity.color.spot.red })), TableRowAsset = (props) => {
|
|
7230
|
-
let $ = c(
|
|
7336
|
+
let $ = c(156), { id, selected } = props, scheme = useColorSchemeValue(), shiftPressed = useKeyPress("shift"), [referenceCountVisible, setReferenceCountVisible] = useState(!1), refCountVisibleTimeout = useRef(null), dispatch = useDispatch(), lastPicked = useTypedSelector(_temp$7), assetsPicked = useTypedSelector(selectAssetsPicked), t0;
|
|
7231
7337
|
$[0] === id ? t0 = $[1] : (t0 = (state_0) => selectAssetById(state_0, id), $[0] = id, $[1] = t0);
|
|
7232
7338
|
let item = useTypedSelector(t0), mediaIndex = useMediaIndex(), asset = item?.asset, error = item?.error, isOpaque = item?.asset?.metadata?.isOpaque, picked = item?.picked, updating = item?.updating, { isMultiSelect, onSelect } = useAssetSourceActions(), t1;
|
|
7233
7339
|
$[2] !== asset || $[3] !== dispatch || $[4] !== isMultiSelect || $[5] !== lastPicked || $[6] !== onSelect || $[7] !== picked || $[8] !== selected || $[9] !== shiftPressed ? (t1 = (e) => {
|
|
@@ -7250,6 +7356,9 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7250
7356
|
})) : dispatch(assetsActions.pick({
|
|
7251
7357
|
assetId: asset._id,
|
|
7252
7358
|
picked: !picked
|
|
7359
|
+
})) : e_0.ctrlKey || e_0.metaKey ? dispatch(assetsActions.pick({
|
|
7360
|
+
assetId: asset._id,
|
|
7361
|
+
picked: !picked
|
|
7253
7362
|
})) : shiftPressed.current ? dispatch(picked ? assetsActions.pick({
|
|
7254
7363
|
assetId: asset._id,
|
|
7255
7364
|
picked: !picked
|
|
@@ -7258,19 +7367,23 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7258
7367
|
endId: asset._id
|
|
7259
7368
|
})) : dispatch(dialogActions.showAssetEdit({ assetId: asset._id }))));
|
|
7260
7369
|
}, $[11] = asset, $[12] = dispatch, $[13] = isMultiSelect, $[14] = lastPicked, $[15] = onSelect, $[16] = picked, $[17] = selected, $[18] = shiftPressed, $[19] = t2) : t2 = $[19];
|
|
7261
|
-
let handleClick = t2,
|
|
7262
|
-
|
|
7370
|
+
let handleClick = t2, draggable = !selected && !updating, t3;
|
|
7371
|
+
$[20] !== asset || $[21] !== assetsPicked || $[22] !== picked ? (t3 = (e_1) => {
|
|
7372
|
+
asset && setDragAssetIds(e_1, picked ? assetsPicked.map(_temp2$5) : [asset._id]);
|
|
7373
|
+
}, $[20] = asset, $[21] = assetsPicked, $[22] = picked, $[23] = t3) : t3 = $[23];
|
|
7374
|
+
let handleDragStart = t3, opacityCell = updating ? .5 : 1, opacityPreview = selected || updating ? .1 : 1, t4, t5;
|
|
7375
|
+
if ($[24] === Symbol.for("react.memo_cache_sentinel") ? (t4 = () => (refCountVisibleTimeout.current = setTimeout(() => setReferenceCountVisible(!0), 750), () => {
|
|
7263
7376
|
refCountVisibleTimeout.current && clearTimeout(refCountVisibleTimeout.current);
|
|
7264
|
-
}),
|
|
7265
|
-
let
|
|
7266
|
-
$[
|
|
7267
|
-
columnGap:
|
|
7377
|
+
}), t5 = [], $[24] = t4, $[25] = t5) : (t4 = $[24], t5 = $[25]), useEffect(t4, t5), !asset) return null;
|
|
7378
|
+
let t6 = selected ? void 0 : handleClick, t7 = draggable ? handleDragStart : void 0, t8 = mediaIndex < 3 ? 0 : "16px", t9 = mediaIndex < 3 ? GRID_TEMPLATE_COLUMNS.SMALL : GRID_TEMPLATE_COLUMNS.LARGE, t10 = mediaIndex < 3 ? "auto" : "1fr", t11;
|
|
7379
|
+
$[26] !== t10 || $[27] !== t8 || $[28] !== t9 ? (t11 = {
|
|
7380
|
+
columnGap: t8,
|
|
7268
7381
|
rowGap: 0,
|
|
7269
|
-
gridTemplateColumns:
|
|
7270
|
-
gridTemplateRows:
|
|
7271
|
-
}, $[
|
|
7272
|
-
let
|
|
7273
|
-
$[
|
|
7382
|
+
gridTemplateColumns: t9,
|
|
7383
|
+
gridTemplateRows: t10
|
|
7384
|
+
}, $[26] = t10, $[27] = t8, $[28] = t9, $[29] = t11) : t11 = $[29];
|
|
7385
|
+
let t12 = item.updating, t13;
|
|
7386
|
+
$[30] === opacityCell ? t13 = $[31] : (t13 = {
|
|
7274
7387
|
alignItems: "center",
|
|
7275
7388
|
gridColumn: 1,
|
|
7276
7389
|
gridRowStart: 1,
|
|
@@ -7279,9 +7392,9 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7279
7392
|
justifyContent: "center",
|
|
7280
7393
|
opacity: opacityCell,
|
|
7281
7394
|
position: "relative"
|
|
7282
|
-
}, $[
|
|
7283
|
-
let
|
|
7284
|
-
$[
|
|
7395
|
+
}, $[30] = opacityCell, $[31] = t13);
|
|
7396
|
+
let t14;
|
|
7397
|
+
$[32] !== isMultiSelect || $[33] !== onSelect || $[34] !== picked ? (t14 = onSelect && !isMultiSelect ? /* @__PURE__ */ jsx(EditIcon, { style: {
|
|
7285
7398
|
flexShrink: 0,
|
|
7286
7399
|
opacity: .5
|
|
7287
7400
|
} }) : /* @__PURE__ */ jsx(Checkbox, {
|
|
@@ -7291,40 +7404,40 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7291
7404
|
pointerEvents: "none",
|
|
7292
7405
|
transform: "scale(0.8)"
|
|
7293
7406
|
}
|
|
7294
|
-
}), $[
|
|
7295
|
-
let
|
|
7296
|
-
$[
|
|
7407
|
+
}), $[32] = isMultiSelect, $[33] = onSelect, $[34] = picked, $[35] = t14) : t14 = $[35];
|
|
7408
|
+
let t15;
|
|
7409
|
+
$[36] !== handleContextActionClick || $[37] !== scheme || $[38] !== t13 || $[39] !== t14 ? (t15 = /* @__PURE__ */ jsx(ContextActionContainer, {
|
|
7297
7410
|
onClick: handleContextActionClick,
|
|
7298
7411
|
$scheme: scheme,
|
|
7299
|
-
style:
|
|
7300
|
-
children:
|
|
7301
|
-
}), $[
|
|
7302
|
-
let
|
|
7303
|
-
$[
|
|
7412
|
+
style: t13,
|
|
7413
|
+
children: t14
|
|
7414
|
+
}), $[36] = handleContextActionClick, $[37] = scheme, $[38] = t13, $[39] = t14, $[40] = t15) : t15 = $[40];
|
|
7415
|
+
let t16;
|
|
7416
|
+
$[41] === Symbol.for("react.memo_cache_sentinel") ? (t16 = {
|
|
7304
7417
|
gridColumn: 2,
|
|
7305
7418
|
gridRowStart: 1,
|
|
7306
7419
|
gridRowEnd: "span 5",
|
|
7307
7420
|
height: "90px",
|
|
7308
7421
|
width: "100px"
|
|
7309
|
-
}, $[
|
|
7310
|
-
let
|
|
7311
|
-
$[
|
|
7422
|
+
}, $[41] = t16) : t16 = $[41];
|
|
7423
|
+
let t17;
|
|
7424
|
+
$[42] === Symbol.for("react.memo_cache_sentinel") ? (t17 = {
|
|
7312
7425
|
height: "100%",
|
|
7313
7426
|
position: "relative"
|
|
7314
|
-
}, $[
|
|
7315
|
-
let
|
|
7316
|
-
$[
|
|
7427
|
+
}, $[42] = t17) : t17 = $[42];
|
|
7428
|
+
let t18;
|
|
7429
|
+
$[43] === opacityPreview ? t18 = $[44] : (t18 = {
|
|
7317
7430
|
height: "100%",
|
|
7318
7431
|
opacity: opacityPreview,
|
|
7319
7432
|
position: "relative"
|
|
7320
|
-
}, $[
|
|
7321
|
-
let
|
|
7322
|
-
$[
|
|
7433
|
+
}, $[43] = opacityPreview, $[44] = t18);
|
|
7434
|
+
let t19;
|
|
7435
|
+
$[45] === asset ? t19 = $[46] : (t19 = isFileAsset(asset) && /* @__PURE__ */ jsx(FileIcon$1, {
|
|
7323
7436
|
extension: asset.extension,
|
|
7324
7437
|
width: "40px"
|
|
7325
|
-
}), $[
|
|
7326
|
-
let
|
|
7327
|
-
$[
|
|
7438
|
+
}), $[45] = asset, $[46] = t19);
|
|
7439
|
+
let t20;
|
|
7440
|
+
$[47] !== asset || $[48] !== isOpaque || $[49] !== scheme ? (t20 = isImageAsset(asset) && /* @__PURE__ */ jsx(Image$1, {
|
|
7328
7441
|
draggable: !1,
|
|
7329
7442
|
$scheme: scheme,
|
|
7330
7443
|
$showCheckerboard: !isOpaque,
|
|
@@ -7332,14 +7445,14 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7332
7445
|
height: 100,
|
|
7333
7446
|
width: 100
|
|
7334
7447
|
})
|
|
7335
|
-
}), $[
|
|
7336
|
-
let
|
|
7337
|
-
$[
|
|
7338
|
-
style:
|
|
7339
|
-
children: [
|
|
7340
|
-
}), $[
|
|
7341
|
-
let
|
|
7342
|
-
$[
|
|
7448
|
+
}), $[47] = asset, $[48] = isOpaque, $[49] = scheme, $[50] = t20) : t20 = $[50];
|
|
7449
|
+
let t21;
|
|
7450
|
+
$[51] !== t18 || $[52] !== t19 || $[53] !== t20 ? (t21 = /* @__PURE__ */ jsxs(Box, {
|
|
7451
|
+
style: t18,
|
|
7452
|
+
children: [t19, t20]
|
|
7453
|
+
}), $[51] = t18, $[52] = t19, $[53] = t20, $[54] = t21) : t21 = $[54];
|
|
7454
|
+
let t22;
|
|
7455
|
+
$[55] === updating ? t22 = $[56] : (t22 = updating && /* @__PURE__ */ jsx(Flex, {
|
|
7343
7456
|
align: "center",
|
|
7344
7457
|
justify: "center",
|
|
7345
7458
|
style: {
|
|
@@ -7350,9 +7463,9 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7350
7463
|
width: "100%"
|
|
7351
7464
|
},
|
|
7352
7465
|
children: /* @__PURE__ */ jsx(Spinner, {})
|
|
7353
|
-
}), $[
|
|
7354
|
-
let
|
|
7355
|
-
$[
|
|
7466
|
+
}), $[55] = updating, $[56] = t22);
|
|
7467
|
+
let t23;
|
|
7468
|
+
$[57] !== selected || $[58] !== updating ? (t23 = selected && !updating && /* @__PURE__ */ jsx(Flex, {
|
|
7356
7469
|
align: "center",
|
|
7357
7470
|
justify: "center",
|
|
7358
7471
|
style: {
|
|
@@ -7366,174 +7479,174 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7366
7479
|
size: 2,
|
|
7367
7480
|
children: /* @__PURE__ */ jsx(CheckmarkCircleIcon, {})
|
|
7368
7481
|
})
|
|
7369
|
-
}), $[
|
|
7370
|
-
let
|
|
7371
|
-
$[
|
|
7372
|
-
style:
|
|
7482
|
+
}), $[57] = selected, $[58] = updating, $[59] = t23) : t23 = $[59];
|
|
7483
|
+
let t24;
|
|
7484
|
+
$[60] !== t21 || $[61] !== t22 || $[62] !== t23 ? (t24 = /* @__PURE__ */ jsx(Box, {
|
|
7485
|
+
style: t16,
|
|
7373
7486
|
children: /* @__PURE__ */ jsxs(Flex, {
|
|
7374
7487
|
align: "center",
|
|
7375
7488
|
justify: "center",
|
|
7376
|
-
style:
|
|
7489
|
+
style: t17,
|
|
7377
7490
|
children: [
|
|
7378
|
-
|
|
7379
|
-
|
|
7380
|
-
|
|
7491
|
+
t21,
|
|
7492
|
+
t22,
|
|
7493
|
+
t23
|
|
7381
7494
|
]
|
|
7382
7495
|
})
|
|
7383
|
-
}), $[
|
|
7384
|
-
let
|
|
7385
|
-
$[
|
|
7496
|
+
}), $[60] = t21, $[61] = t22, $[62] = t23, $[63] = t24) : t24 = $[63];
|
|
7497
|
+
let t25 = mediaIndex < 3 ? 3 : 0, t26 = mediaIndex < 3 ? 2 : "auto", t27;
|
|
7498
|
+
$[64] !== opacityCell || $[65] !== t26 ? (t27 = {
|
|
7386
7499
|
gridColumn: 3,
|
|
7387
|
-
gridRow:
|
|
7500
|
+
gridRow: t26,
|
|
7388
7501
|
opacity: opacityCell
|
|
7389
|
-
}, $[
|
|
7390
|
-
let
|
|
7391
|
-
$[
|
|
7392
|
-
let
|
|
7393
|
-
$[
|
|
7502
|
+
}, $[64] = opacityCell, $[65] = t26, $[66] = t27) : t27 = $[66];
|
|
7503
|
+
let t28;
|
|
7504
|
+
$[67] === Symbol.for("react.memo_cache_sentinel") ? (t28 = { lineHeight: "2em" }, $[67] = t28) : t28 = $[67];
|
|
7505
|
+
let t29;
|
|
7506
|
+
$[68] === asset.originalFilename ? t29 = $[69] : (t29 = /* @__PURE__ */ jsx(Text, {
|
|
7394
7507
|
muted: !0,
|
|
7395
7508
|
size: 1,
|
|
7396
|
-
style:
|
|
7509
|
+
style: t28,
|
|
7397
7510
|
textOverflow: "ellipsis",
|
|
7398
7511
|
children: asset.originalFilename
|
|
7399
|
-
}), $[
|
|
7400
|
-
let
|
|
7401
|
-
$[
|
|
7402
|
-
marginLeft:
|
|
7403
|
-
style:
|
|
7404
|
-
children:
|
|
7405
|
-
}), $[
|
|
7406
|
-
let
|
|
7407
|
-
$[
|
|
7408
|
-
gridColumn:
|
|
7409
|
-
gridRow:
|
|
7512
|
+
}), $[68] = asset.originalFilename, $[69] = t29);
|
|
7513
|
+
let t30;
|
|
7514
|
+
$[70] !== t25 || $[71] !== t27 || $[72] !== t29 ? (t30 = /* @__PURE__ */ jsx(Box, {
|
|
7515
|
+
marginLeft: t25,
|
|
7516
|
+
style: t27,
|
|
7517
|
+
children: t29
|
|
7518
|
+
}), $[70] = t25, $[71] = t27, $[72] = t29, $[73] = t30) : t30 = $[73];
|
|
7519
|
+
let t31 = mediaIndex < 3 ? 3 : 0, t32 = mediaIndex < 3 ? 3 : 4, t33 = mediaIndex < 3 ? 3 : "auto", t34;
|
|
7520
|
+
$[74] !== opacityCell || $[75] !== t32 || $[76] !== t33 ? (t34 = {
|
|
7521
|
+
gridColumn: t32,
|
|
7522
|
+
gridRow: t33,
|
|
7410
7523
|
opacity: opacityCell
|
|
7411
|
-
}, $[
|
|
7412
|
-
let t33;
|
|
7413
|
-
$[74] === Symbol.for("react.memo_cache_sentinel") ? (t33 = { lineHeight: "2em" }, $[74] = t33) : t33 = $[74];
|
|
7414
|
-
let t34;
|
|
7415
|
-
$[75] === asset ? t34 = $[76] : (t34 = isImageAsset(asset) && getAssetResolution(asset), $[75] = asset, $[76] = t34);
|
|
7524
|
+
}, $[74] = opacityCell, $[75] = t32, $[76] = t33, $[77] = t34) : t34 = $[77];
|
|
7416
7525
|
let t35;
|
|
7417
|
-
$[
|
|
7526
|
+
$[78] === Symbol.for("react.memo_cache_sentinel") ? (t35 = { lineHeight: "2em" }, $[78] = t35) : t35 = $[78];
|
|
7527
|
+
let t36;
|
|
7528
|
+
$[79] === asset ? t36 = $[80] : (t36 = isImageAsset(asset) && getAssetResolution(asset), $[79] = asset, $[80] = t36);
|
|
7529
|
+
let t37;
|
|
7530
|
+
$[81] === t36 ? t37 = $[82] : (t37 = /* @__PURE__ */ jsx(Text, {
|
|
7418
7531
|
muted: !0,
|
|
7419
7532
|
size: 1,
|
|
7420
|
-
style:
|
|
7533
|
+
style: t35,
|
|
7421
7534
|
textOverflow: "ellipsis",
|
|
7422
|
-
children:
|
|
7423
|
-
}), $[
|
|
7424
|
-
let
|
|
7425
|
-
$[
|
|
7426
|
-
marginLeft:
|
|
7427
|
-
style:
|
|
7428
|
-
children:
|
|
7429
|
-
}), $[
|
|
7430
|
-
let
|
|
7431
|
-
$[
|
|
7432
|
-
display:
|
|
7535
|
+
children: t36
|
|
7536
|
+
}), $[81] = t36, $[82] = t37);
|
|
7537
|
+
let t38;
|
|
7538
|
+
$[83] !== t31 || $[84] !== t34 || $[85] !== t37 ? (t38 = /* @__PURE__ */ jsx(Box, {
|
|
7539
|
+
marginLeft: t31,
|
|
7540
|
+
style: t34,
|
|
7541
|
+
children: t37
|
|
7542
|
+
}), $[83] = t31, $[84] = t34, $[85] = t37, $[86] = t38) : t38 = $[86];
|
|
7543
|
+
let t39 = mediaIndex < 3 ? "none" : "block", t40;
|
|
7544
|
+
$[87] !== opacityCell || $[88] !== t39 ? (t40 = {
|
|
7545
|
+
display: t39,
|
|
7433
7546
|
gridColumn: 5,
|
|
7434
7547
|
gridRow: "auto",
|
|
7435
7548
|
opacity: opacityCell
|
|
7436
|
-
}, $[
|
|
7437
|
-
let
|
|
7438
|
-
$[
|
|
7439
|
-
let
|
|
7440
|
-
$[
|
|
7549
|
+
}, $[87] = opacityCell, $[88] = t39, $[89] = t40) : t40 = $[89];
|
|
7550
|
+
let t41;
|
|
7551
|
+
$[90] === Symbol.for("react.memo_cache_sentinel") ? (t41 = { lineHeight: "2em" }, $[90] = t41) : t41 = $[90];
|
|
7552
|
+
let t42;
|
|
7553
|
+
$[91] === asset.mimeType ? t42 = $[92] : (t42 = /* @__PURE__ */ jsx(Text, {
|
|
7441
7554
|
muted: !0,
|
|
7442
7555
|
size: 1,
|
|
7443
|
-
style:
|
|
7556
|
+
style: t41,
|
|
7444
7557
|
textOverflow: "ellipsis",
|
|
7445
7558
|
children: asset.mimeType
|
|
7446
|
-
}), $[
|
|
7447
|
-
let
|
|
7448
|
-
$[
|
|
7449
|
-
style:
|
|
7450
|
-
children:
|
|
7451
|
-
}), $[
|
|
7452
|
-
let
|
|
7453
|
-
$[
|
|
7454
|
-
display:
|
|
7559
|
+
}), $[91] = asset.mimeType, $[92] = t42);
|
|
7560
|
+
let t43;
|
|
7561
|
+
$[93] !== t40 || $[94] !== t42 ? (t43 = /* @__PURE__ */ jsx(Box, {
|
|
7562
|
+
style: t40,
|
|
7563
|
+
children: t42
|
|
7564
|
+
}), $[93] = t40, $[94] = t42, $[95] = t43) : t43 = $[95];
|
|
7565
|
+
let t44 = mediaIndex < 3 ? "none" : "block", t45;
|
|
7566
|
+
$[96] !== opacityCell || $[97] !== t44 ? (t45 = {
|
|
7567
|
+
display: t44,
|
|
7455
7568
|
gridColumn: 6,
|
|
7456
7569
|
gridRow: "auto",
|
|
7457
7570
|
opacity: opacityCell
|
|
7458
|
-
}, $[
|
|
7459
|
-
let
|
|
7460
|
-
$[
|
|
7461
|
-
let
|
|
7462
|
-
$[
|
|
7571
|
+
}, $[96] = opacityCell, $[97] = t44, $[98] = t45) : t45 = $[98];
|
|
7572
|
+
let t46;
|
|
7573
|
+
$[99] === Symbol.for("react.memo_cache_sentinel") ? (t46 = { lineHeight: "2em" }, $[99] = t46) : t46 = $[99];
|
|
7574
|
+
let t47;
|
|
7575
|
+
$[100] === asset.size ? t47 = $[101] : (t47 = filesize(asset.size, {
|
|
7463
7576
|
base: 10,
|
|
7464
7577
|
round: 0
|
|
7465
|
-
}), $[
|
|
7466
|
-
let
|
|
7467
|
-
$[
|
|
7578
|
+
}), $[100] = asset.size, $[101] = t47);
|
|
7579
|
+
let t48;
|
|
7580
|
+
$[102] === t47 ? t48 = $[103] : (t48 = /* @__PURE__ */ jsx(Text, {
|
|
7468
7581
|
muted: !0,
|
|
7469
7582
|
size: 1,
|
|
7470
|
-
style:
|
|
7583
|
+
style: t46,
|
|
7471
7584
|
textOverflow: "ellipsis",
|
|
7472
|
-
children:
|
|
7473
|
-
}), $[
|
|
7474
|
-
let
|
|
7475
|
-
$[
|
|
7476
|
-
style:
|
|
7477
|
-
children:
|
|
7478
|
-
}), $[
|
|
7479
|
-
let
|
|
7480
|
-
$[
|
|
7481
|
-
gridColumn:
|
|
7482
|
-
gridRow:
|
|
7585
|
+
children: t47
|
|
7586
|
+
}), $[102] = t47, $[103] = t48);
|
|
7587
|
+
let t49;
|
|
7588
|
+
$[104] !== t45 || $[105] !== t48 ? (t49 = /* @__PURE__ */ jsx(Box, {
|
|
7589
|
+
style: t45,
|
|
7590
|
+
children: t48
|
|
7591
|
+
}), $[104] = t45, $[105] = t48, $[106] = t49) : t49 = $[106];
|
|
7592
|
+
let t50 = mediaIndex < 3 ? 3 : 0, t51 = mediaIndex < 3 ? 3 : 7, t52 = mediaIndex < 3 ? 4 : "auto", t53;
|
|
7593
|
+
$[107] !== opacityCell || $[108] !== t51 || $[109] !== t52 ? (t53 = {
|
|
7594
|
+
gridColumn: t51,
|
|
7595
|
+
gridRow: t52,
|
|
7483
7596
|
opacity: opacityCell
|
|
7484
|
-
}, $[
|
|
7485
|
-
let t52;
|
|
7486
|
-
$[107] === Symbol.for("react.memo_cache_sentinel") ? (t52 = { lineHeight: "2em" }, $[107] = t52) : t52 = $[107];
|
|
7487
|
-
let t53;
|
|
7488
|
-
$[108] === asset._updatedAt ? t53 = $[109] : (t53 = formatRelative(new Date(asset._updatedAt), /* @__PURE__ */ new Date()), $[108] = asset._updatedAt, $[109] = t53);
|
|
7597
|
+
}, $[107] = opacityCell, $[108] = t51, $[109] = t52, $[110] = t53) : t53 = $[110];
|
|
7489
7598
|
let t54;
|
|
7490
|
-
$[
|
|
7599
|
+
$[111] === Symbol.for("react.memo_cache_sentinel") ? (t54 = { lineHeight: "2em" }, $[111] = t54) : t54 = $[111];
|
|
7600
|
+
let t55;
|
|
7601
|
+
$[112] === asset._updatedAt ? t55 = $[113] : (t55 = formatRelative(new Date(asset._updatedAt), /* @__PURE__ */ new Date()), $[112] = asset._updatedAt, $[113] = t55);
|
|
7602
|
+
let t56;
|
|
7603
|
+
$[114] === t55 ? t56 = $[115] : (t56 = /* @__PURE__ */ jsx(Text, {
|
|
7491
7604
|
muted: !0,
|
|
7492
7605
|
size: 1,
|
|
7493
|
-
style:
|
|
7606
|
+
style: t54,
|
|
7494
7607
|
textOverflow: "ellipsis",
|
|
7495
|
-
children:
|
|
7496
|
-
}), $[
|
|
7497
|
-
let
|
|
7498
|
-
$[
|
|
7499
|
-
marginLeft:
|
|
7500
|
-
style:
|
|
7501
|
-
children:
|
|
7502
|
-
}), $[
|
|
7503
|
-
let
|
|
7504
|
-
$[
|
|
7505
|
-
display:
|
|
7608
|
+
children: t55
|
|
7609
|
+
}), $[114] = t55, $[115] = t56);
|
|
7610
|
+
let t57;
|
|
7611
|
+
$[116] !== t50 || $[117] !== t53 || $[118] !== t56 ? (t57 = /* @__PURE__ */ jsx(Box, {
|
|
7612
|
+
marginLeft: t50,
|
|
7613
|
+
style: t53,
|
|
7614
|
+
children: t56
|
|
7615
|
+
}), $[116] = t50, $[117] = t53, $[118] = t56, $[119] = t57) : t57 = $[119];
|
|
7616
|
+
let t58 = mediaIndex < 3 ? "none" : "block", t59;
|
|
7617
|
+
$[120] !== opacityCell || $[121] !== t58 ? (t59 = {
|
|
7618
|
+
display: t58,
|
|
7506
7619
|
gridColumn: 8,
|
|
7507
7620
|
gridRow: "auto",
|
|
7508
7621
|
opacity: opacityCell
|
|
7509
|
-
}, $[
|
|
7510
|
-
let
|
|
7511
|
-
$[
|
|
7512
|
-
let
|
|
7513
|
-
$[
|
|
7622
|
+
}, $[120] = opacityCell, $[121] = t58, $[122] = t59) : t59 = $[122];
|
|
7623
|
+
let t60;
|
|
7624
|
+
$[123] === Symbol.for("react.memo_cache_sentinel") ? (t60 = { lineHeight: "2em" }, $[123] = t60) : t60 = $[123];
|
|
7625
|
+
let t61;
|
|
7626
|
+
$[124] !== id || $[125] !== referenceCountVisible ? (t61 = /* @__PURE__ */ jsx(Text, {
|
|
7514
7627
|
muted: !0,
|
|
7515
7628
|
size: 1,
|
|
7516
|
-
style:
|
|
7629
|
+
style: t60,
|
|
7517
7630
|
textOverflow: "ellipsis",
|
|
7518
7631
|
children: referenceCountVisible ? /* @__PURE__ */ jsx(WithReferringDocuments, {
|
|
7519
7632
|
id,
|
|
7520
|
-
children:
|
|
7633
|
+
children: _temp3$4
|
|
7521
7634
|
}) : /* @__PURE__ */ jsx(Fragment, { children: "-" })
|
|
7522
|
-
}), $[
|
|
7523
|
-
let
|
|
7524
|
-
$[
|
|
7525
|
-
style:
|
|
7526
|
-
children:
|
|
7527
|
-
}), $[
|
|
7528
|
-
let
|
|
7529
|
-
$[
|
|
7530
|
-
gridColumn:
|
|
7635
|
+
}), $[124] = id, $[125] = referenceCountVisible, $[126] = t61) : t61 = $[126];
|
|
7636
|
+
let t62;
|
|
7637
|
+
$[127] !== t59 || $[128] !== t61 ? (t62 = /* @__PURE__ */ jsx(Box, {
|
|
7638
|
+
style: t59,
|
|
7639
|
+
children: t61
|
|
7640
|
+
}), $[127] = t59, $[128] = t61, $[129] = t62) : t62 = $[129];
|
|
7641
|
+
let t63 = mediaIndex < 3 ? 4 : 9, t64 = mediaIndex < 3 ? "span 5" : "auto", t65;
|
|
7642
|
+
$[130] !== opacityCell || $[131] !== t63 || $[132] !== t64 ? (t65 = {
|
|
7643
|
+
gridColumn: t63,
|
|
7531
7644
|
gridRowStart: "1",
|
|
7532
|
-
gridRowEnd:
|
|
7645
|
+
gridRowEnd: t64,
|
|
7533
7646
|
opacity: opacityCell
|
|
7534
|
-
}, $[
|
|
7535
|
-
let
|
|
7536
|
-
$[
|
|
7647
|
+
}, $[130] = opacityCell, $[131] = t63, $[132] = t64, $[133] = t65) : t65 = $[133];
|
|
7648
|
+
let t66;
|
|
7649
|
+
$[134] === error ? t66 = $[135] : (t66 = error && /* @__PURE__ */ jsx(Box, {
|
|
7537
7650
|
padding: 2,
|
|
7538
7651
|
children: /* @__PURE__ */ jsx(Tooltip, {
|
|
7539
7652
|
animate: !0,
|
|
@@ -7552,39 +7665,44 @@ const ContainerGrid$1 = /* @__PURE__ */ styled(Grid).withConfig({
|
|
|
7552
7665
|
children: /* @__PURE__ */ jsx(StyledWarningIcon, { color: "critical" })
|
|
7553
7666
|
})
|
|
7554
7667
|
})
|
|
7555
|
-
}), $[
|
|
7556
|
-
let
|
|
7557
|
-
$[
|
|
7668
|
+
}), $[134] = error, $[135] = t66);
|
|
7669
|
+
let t67;
|
|
7670
|
+
$[136] !== t65 || $[137] !== t66 ? (t67 = /* @__PURE__ */ jsx(Flex, {
|
|
7558
7671
|
align: "center",
|
|
7559
7672
|
justify: "center",
|
|
7560
|
-
style:
|
|
7561
|
-
children:
|
|
7562
|
-
}), $[
|
|
7563
|
-
let
|
|
7564
|
-
return $[
|
|
7565
|
-
|
|
7673
|
+
style: t65,
|
|
7674
|
+
children: t66
|
|
7675
|
+
}), $[136] = t65, $[137] = t66, $[138] = t67) : t67 = $[138];
|
|
7676
|
+
let t68;
|
|
7677
|
+
return $[139] !== draggable || $[140] !== item.updating || $[141] !== scheme || $[142] !== selected || $[143] !== t11 || $[144] !== t15 || $[145] !== t24 || $[146] !== t30 || $[147] !== t38 || $[148] !== t43 || $[149] !== t49 || $[150] !== t57 || $[151] !== t6 || $[152] !== t62 || $[153] !== t67 || $[154] !== t7 ? (t68 = /* @__PURE__ */ jsxs(ContainerGrid$1, {
|
|
7678
|
+
draggable,
|
|
7679
|
+
onClick: t6,
|
|
7680
|
+
onDragStart: t7,
|
|
7566
7681
|
$scheme: scheme,
|
|
7567
7682
|
$selected: selected,
|
|
7568
|
-
style:
|
|
7569
|
-
$updating:
|
|
7683
|
+
style: t11,
|
|
7684
|
+
$updating: t12,
|
|
7570
7685
|
children: [
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7686
|
+
t15,
|
|
7687
|
+
t24,
|
|
7688
|
+
t30,
|
|
7689
|
+
t38,
|
|
7690
|
+
t43,
|
|
7691
|
+
t49,
|
|
7692
|
+
t57,
|
|
7693
|
+
t62,
|
|
7694
|
+
t67
|
|
7580
7695
|
]
|
|
7581
|
-
}), $[
|
|
7696
|
+
}), $[139] = draggable, $[140] = item.updating, $[141] = scheme, $[142] = selected, $[143] = t11, $[144] = t15, $[145] = t24, $[146] = t30, $[147] = t38, $[148] = t43, $[149] = t49, $[150] = t57, $[151] = t6, $[152] = t62, $[153] = t67, $[154] = t7, $[155] = t68) : t68 = $[155], t68;
|
|
7582
7697
|
};
|
|
7583
7698
|
var TableRowAsset_default = memo(TableRowAsset);
|
|
7584
7699
|
function _temp$7(state) {
|
|
7585
7700
|
return state.assets.lastPicked;
|
|
7586
7701
|
}
|
|
7587
|
-
function _temp2$5(
|
|
7702
|
+
function _temp2$5(pickedItem) {
|
|
7703
|
+
return pickedItem.asset._id;
|
|
7704
|
+
}
|
|
7705
|
+
function _temp3$4(t0) {
|
|
7588
7706
|
let { isLoading, referringDocuments } = t0, uniqueDocuments = getUniqueDocuments(referringDocuments);
|
|
7589
7707
|
return isLoading ? /* @__PURE__ */ jsx(Fragment, { children: "-" }) : /* @__PURE__ */ jsx(Fragment, { children: Array.isArray(uniqueDocuments) ? uniqueDocuments.length : 0 });
|
|
7590
7708
|
}
|