@bynder/compact-view 5.2.3 → 5.2.4
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/AccessToken2.js +1 -1
- package/ActiveFilters.js +49 -50
- package/AddMedia.js +19 -18
- package/Advanced.js +13 -13
- package/App.js +60 -59
- package/Arrow.js +1 -1
- package/AssetFilter.js +38 -38
- package/AssetItem.js +10 -17
- package/AssetList.js +5 -5
- package/AssetTypeItem.js +21 -21
- package/AssetsView.js +13 -13
- package/Axios2.js +82 -76
- package/AxiosError.js +36 -35
- package/ButtonAction.js +1 -1
- package/CanceledError.js +15 -8
- package/Card.js +1 -1
- package/Chip.js +1 -1
- package/CollectionCard.js +22 -22
- package/CollectionItem.js +9 -9
- package/CollectionList.js +5 -5
- package/CollectionView.js +11 -11
- package/ColorPicker.js +1 -1
- package/ColorPickerSolid.js +3 -3
- package/ColorPickerWithOpacity.js +3 -3
- package/Component.js +158 -0
- package/Component2.js +4 -0
- package/ConfigContext.js +7 -8
- package/Container.js +1 -1
- package/ContextAction.js +1 -1
- package/ControlGroup.js +6 -6
- package/Dat.js +33 -32
- package/DatDropdownItem.js +1 -1
- package/DesignSystemProvider.js +7 -7
- package/DirectionSelect.js +11 -10
- package/DomainInput.js +19 -11
- package/Draggable.js +337 -0
- package/Draggable2.js +4 -0
- package/DraggableCore.js +312 -0
- package/DraggableCore2.js +4 -0
- package/Dropdown.js +37 -37
- package/Dropdown2.js +1 -1
- package/DropdownListItem.js +1 -1
- package/FieldSelect.js +19 -17
- package/FileSelector.js +38 -37
- package/FontPicker.js +1 -1
- package/Form.js +1 -1
- package/Header.js +5 -4
- package/HttpStatusCode.js +7 -1
- package/InfiniteScroll.js +1 -1
- package/InlineBanner.js +1 -1
- package/Input.js +1 -1
- package/InterceptorManager.js +2 -1
- package/Item.js +8 -8
- package/Item4.js +2 -2
- package/LeftArrow.js +1 -1
- package/ListItem2.js +1 -1
- package/ModalBase.js +15 -15
- package/NoResults.js +1 -1
- package/Option_new.js +36 -29
- package/ReactPropTypesSecret.js +10 -0
- package/RightArrow.js +1 -1
- package/SearchInput.js +1 -1
- package/SearchInput2.js +1 -1
- package/SelectionFooter.js +41 -31
- package/Shield.js +2 -2
- package/Smartfilters_new.js +107 -98
- package/StatefulAssetList.js +50 -50
- package/StoreInitializer.js +32 -16
- package/SwitchNLS.js +1 -1
- package/TagItem.js +15 -15
- package/Tags.js +1 -1
- package/Toolbar.js +23 -20
- package/Tooltip2.js +1 -1
- package/ViewSwitch.js +17 -15
- package/_commonjsHelpers.js +28 -3
- package/adapters.js +54 -42
- package/api/filterAssets.d.ts +1 -1
- package/api/getAssets.d.ts +1 -1
- package/api/getFilters.d.ts +1 -1
- package/api/rest/index.d.ts +1 -1
- package/api/rest/types.d.ts +1 -1
- package/api2.js +1 -1
- package/asset.type.js +1 -1
- package/autocomplete.js +1 -1
- package/axios.js +1 -1
- package/bodyScrollLock.esm.js +68 -0
- package/buildURL.js +13 -15
- package/checkGlobals.js +1 -1
- package/cjs.js +7 -0
- package/cjs2.js +15 -0
- package/cjs3.js +4 -0
- package/clsx.m.js +6 -0
- package/clsx.m2.js +15 -0
- package/combineMetaproperties.js +3 -1
- package/composeSignals.js +1 -1
- package/cookieStore.js +1 -1
- package/cookies.js +13 -11
- package/currentScopes.js +1 -1
- package/data.js +1 -1
- package/devUtils.js +1 -1
- package/dispatchRequest.js +5 -5
- package/domFns.js +151 -0
- package/domFns2.js +4 -0
- package/factoryWithThrowingShims.js +52 -0
- package/fetch2.js +156 -128
- package/filter/AssetFilterContext.d.ts +3 -3
- package/filterAssets.js +1 -1
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +1 -1
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getPrefix.js +35 -0
- package/getPrefix2.js +4 -0
- package/getSimilarityAssets.js +1 -1
- package/goober.modern.js +75 -0
- package/handlers.js +1 -1
- package/iconBase.js +56 -0
- package/iconContext.js +12 -0
- package/iconsManifest.js +222 -0
- package/index-esm.js +1 -4
- package/index.browser.js +1 -1
- package/index.m.js +9 -0
- package/index.m2.js +17 -0
- package/index10.js +18 -2
- package/index11.js +181 -15
- package/index112.js +1 -1
- package/index12.js +313 -36
- package/index13.js +5 -2430
- package/index14.js +3 -557
- package/index15.js +15 -55
- package/index16.js +3 -2
- package/index17.js +3 -87
- package/index18.js +36 -60
- package/index19.js +3 -7
- package/index20.js +2429 -12
- package/index21.js +557 -10
- package/index22.js +1 -1
- package/index23.js +119 -6
- package/index24.js +39 -7
- package/index25.js +2 -5
- package/index26.js +86 -9
- package/index27.js +55 -8
- package/index28.js +6 -636
- package/index29.js +8692 -74
- package/index3.js +1684 -5
- package/index30.js +2 -5
- package/index31.js +4 -20
- package/index310.js +2 -0
- package/index32.js +11 -2
- package/index33.js +5083 -4
- package/index34.js +2 -18
- package/index35.js +59 -5
- package/index36.js +2 -2
- package/index37.js +13 -11
- package/index38.js +46 -10
- package/index39.js +6 -12
- package/index4.js +5 -1684
- package/index40.js +8 -11
- package/index41.js +26 -18
- package/index42.js +2 -64
- package/index43.js +63 -5
- package/index44.js +9 -55
- package/index45.js +7 -67
- package/index46.js +8 -31
- package/index47.js +5 -11
- package/index48.js +10 -121
- package/index49.js +9 -86
- package/index5.js +215 -23
- package/index50.js +636 -7
- package/index51.js +74 -11
- package/index52.js +4 -13
- package/index53.js +19 -13
- package/index54.js +4 -6
- package/index55.js +18 -7
- package/index56.js +5 -14
- package/index57.js +10 -28
- package/index58.js +10 -15
- package/index59.js +15 -0
- package/index6.js +250 -299
- package/index60.js +13 -0
- package/index61.js +21 -0
- package/index62.js +8 -0
- package/index63.js +57 -0
- package/index64.js +4 -0
- package/index65.js +69 -0
- package/index66.js +33 -0
- package/index67.js +13 -0
- package/index68.js +123 -0
- package/index69.js +88 -0
- package/index7.js +22 -5047
- package/index70.js +10 -0
- package/index71.js +13 -0
- package/index72.js +13 -225
- package/index73.js +16 -0
- package/index74.js +9 -0
- package/index75.js +228 -0
- package/index76.js +9 -0
- package/index77.js +17 -0
- package/index78.js +31 -0
- package/index79.js +18 -0
- package/index8.js +5044 -47
- package/index9.js +50 -15
- package/isAbsoluteURL.js +1 -1
- package/isURLSameOrigin.js +1 -1
- package/localization.js +15 -15
- package/log.js +14 -0
- package/log2.js +4 -0
- package/matchRequestUrl.js +1 -1
- package/mergeConfig.js +37 -32
- package/notify.js +2 -2
- package/package.json +1 -1
- package/positionFns.js +101 -0
- package/positionFns2.js +4 -0
- package/react-laag.esm.js +957 -0
- package/react.js +8 -8
- package/react2.js +9 -9
- package/resolveConfig.js +23 -23
- package/select/add-media/AddMedia.d.ts +3 -1
- package/select/current-selection/SelectedItems.d.ts +1 -1
- package/shims.js +29 -0
- package/shims2.js +4 -0
- package/store/StoreInitializer.d.ts +5 -1
- package/store/useAssetFilterStore.d.ts +55 -0
- package/store/useSelectionStore.d.ts +47 -0
- package/styled-components.browser.esm.js +2 -2
- package/throttle.js +1 -1
- package/toURLEncodedForm.js +11 -10
- package/tokenExpirationHelper.js +1 -1
- package/transformData.js +1 -1
- package/transitional.js +4 -3
- package/useAssetFilterStore.js +152 -0
- package/useDatStore.js +1 -1
- package/useEffectEvent.js +7 -7
- package/useFonts.js +2 -2
- package/useOrderingStore.js +1 -1
- package/useRouterStore.js +1 -1
- package/useSearchStore.js +1 -1
- package/useSelectionStore.js +131 -0
- package/useSimilaritySearchStore.js +1 -1
- package/useTranslate.js +1 -1
- package/utils/combineMetaproperties.d.ts +2 -0
- package/utils6.js +160 -118
- package/utils7.js +7 -68
- package/utils8.js +68 -7
- package/xhr.js +47 -46
- package/AssetFilterContext.js +0 -161
- package/SelectionContext.js +0 -143
- package/select/SelectionContext.d.ts +0 -30
- /package/{Middleware.js → Middleware2.js} +0 -0
- /package/{middleware2.js → middleware.js} +0 -0
package/AccessToken2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { __exports as a } from "./AccessToken3.js";
|
|
2
|
-
import { __require as x } from "./
|
|
2
|
+
import { __require as x } from "./index27.js";
|
|
3
3
|
import { __require as O } from "./localStorageHelper.js";
|
|
4
4
|
import { __require as E } from "./tokenExpirationHelper.js";
|
|
5
5
|
import { __require as H } from "./urlHelper.js";
|
package/ActiveFilters.js
CHANGED
|
@@ -1,80 +1,79 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import
|
|
3
|
-
import { Button as
|
|
4
|
-
import { assetTypeToString as
|
|
5
|
-
import { HorizontalScroll as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
function
|
|
11
|
-
const
|
|
1
|
+
import { jsx as e, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import k from "./styled-components.browser.esm.js";
|
|
3
|
+
import { Button as C } from "./Button.js";
|
|
4
|
+
import { assetTypeToString as g, getAssetTypeIcon as I } from "./asset.type.js";
|
|
5
|
+
import { HorizontalScroll as N } from "./HorizontalScroll.js";
|
|
6
|
+
import { ActiveFilter as r } from "./ActiveFilter.js";
|
|
7
|
+
import { __ as p } from "./index2.js";
|
|
8
|
+
import { useSimilaritySearchStore as O } from "./useSimilaritySearchStore.js";
|
|
9
|
+
import { useAssetFilterStore as T } from "./useAssetFilterStore.js";
|
|
10
|
+
function q() {
|
|
11
|
+
const {
|
|
12
|
+
assetTypes: o,
|
|
13
|
+
selectedSmartfilterOptions: f,
|
|
14
|
+
tags: l,
|
|
15
|
+
removeAssetType: h,
|
|
16
|
+
removeSmartfilterOption: v,
|
|
17
|
+
removeTag: u,
|
|
18
|
+
clear: x
|
|
19
|
+
} = T(), {
|
|
12
20
|
isSelected: s,
|
|
13
|
-
setIsSelected:
|
|
14
|
-
isNLSSelected:
|
|
15
|
-
setIsNLSSelected:
|
|
16
|
-
NLSSearchText:
|
|
17
|
-
setNLSSearchText:
|
|
18
|
-
} =
|
|
19
|
-
|
|
21
|
+
setIsSelected: c,
|
|
22
|
+
isNLSSelected: n,
|
|
23
|
+
setIsNLSSelected: a,
|
|
24
|
+
NLSSearchText: m,
|
|
25
|
+
setNLSSearchText: d
|
|
26
|
+
} = O(), S = Object.values(f || {}), y = S.length === 0 && o.length === 0 && l.length === 0 && !s && !(n && m) ? void 0 : /* @__PURE__ */ e(b, { children: /* @__PURE__ */ e(
|
|
27
|
+
C,
|
|
20
28
|
{
|
|
21
29
|
variant: "clean",
|
|
22
30
|
isSmall: !0,
|
|
23
31
|
onClick: () => {
|
|
24
|
-
|
|
32
|
+
x(), c(!1), a(!1), d(void 0);
|
|
25
33
|
},
|
|
26
|
-
|
|
34
|
+
"data-testid": "clear-filters-button",
|
|
35
|
+
children: p("Clear filters")
|
|
27
36
|
}
|
|
28
37
|
) });
|
|
29
|
-
return /* @__PURE__ */
|
|
30
|
-
|
|
31
|
-
const
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
|
|
38
|
+
return /* @__PURE__ */ e("div", { "data-testid": "selected-filter-list", children: /* @__PURE__ */ A(N, { isActiveFilter: !0, static: y, children: [
|
|
39
|
+
o.map((t) => {
|
|
40
|
+
const i = I(t);
|
|
41
|
+
return /* @__PURE__ */ e(
|
|
42
|
+
r,
|
|
34
43
|
{
|
|
35
|
-
onClick: () =>
|
|
36
|
-
title:
|
|
37
|
-
icon: /* @__PURE__ */ i
|
|
44
|
+
onClick: () => h(t),
|
|
45
|
+
title: g(t),
|
|
46
|
+
icon: /* @__PURE__ */ e(i, {})
|
|
38
47
|
},
|
|
39
48
|
t
|
|
40
49
|
);
|
|
41
50
|
}),
|
|
42
51
|
S.map(
|
|
43
|
-
(t) => Object.values(t).map((
|
|
44
|
-
|
|
52
|
+
(t) => Object.values(t).map((i) => /* @__PURE__ */ e(
|
|
53
|
+
r,
|
|
45
54
|
{
|
|
46
|
-
onClick: () =>
|
|
47
|
-
|
|
48
|
-
r.id
|
|
49
|
-
),
|
|
50
|
-
title: r.label
|
|
55
|
+
onClick: () => v(i.metapropertyName, i.id),
|
|
56
|
+
title: i.label
|
|
51
57
|
},
|
|
52
|
-
|
|
58
|
+
i.id
|
|
53
59
|
))
|
|
54
60
|
),
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
onClick: () => e.removeTag(t),
|
|
59
|
-
title: t
|
|
60
|
-
},
|
|
61
|
-
t
|
|
62
|
-
)),
|
|
63
|
-
(s || c && a) && /* @__PURE__ */ i(
|
|
64
|
-
o,
|
|
61
|
+
l.map((t) => /* @__PURE__ */ e(r, { onClick: () => u(t), title: t }, t)),
|
|
62
|
+
(s || n && m) && /* @__PURE__ */ e(
|
|
63
|
+
r,
|
|
65
64
|
{
|
|
66
65
|
onClick: () => {
|
|
67
|
-
|
|
66
|
+
c(!1), a(!1), d(void 0);
|
|
68
67
|
},
|
|
69
|
-
title:
|
|
68
|
+
title: p("Show similar")
|
|
70
69
|
}
|
|
71
70
|
)
|
|
72
71
|
] }) });
|
|
73
72
|
}
|
|
74
|
-
const
|
|
73
|
+
const b = k.div`
|
|
75
74
|
flex-shrink: 0;
|
|
76
75
|
animation: var(--fade-in-down);
|
|
77
76
|
`;
|
|
78
77
|
export {
|
|
79
|
-
|
|
78
|
+
q as ActiveFilters
|
|
80
79
|
};
|
package/AddMedia.js
CHANGED
|
@@ -3,21 +3,21 @@ import { useRef as b, useState as C, useEffect as E } from "react";
|
|
|
3
3
|
import { Button as A } from "./Button.js";
|
|
4
4
|
import { useConfig as M } from "./ConfigContext.js";
|
|
5
5
|
import { useAuth as O } from "./LoginContext.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { FileSelector as T } from "./FileSelector.js";
|
|
7
|
+
import { getAsset as j } from "./getAsset.js";
|
|
8
|
+
import { getAssets as D } from "./getAssets.js";
|
|
9
|
+
import { isErr as N } from "./result.type.js";
|
|
10
|
+
import { logger as k } from "./logger.js";
|
|
11
|
+
import { ButtonAction as q } from "./ButtonAction.js";
|
|
12
|
+
import { convertAssetIdToBase64 as B } from "./base64Converter.js";
|
|
13
|
+
import { useSimilaritySearchStore as G } from "./useSimilaritySearchStore.js";
|
|
14
|
+
import { useSelectionStore as p } from "./useSelectionStore.js";
|
|
15
15
|
function tt(t) {
|
|
16
16
|
const { assetFieldSelection: r, onSuccess: i, selectionMode: u, noCache: d } = M(), {
|
|
17
17
|
isSelected: f,
|
|
18
18
|
NLSSearchText: m,
|
|
19
19
|
isNLSSelected: S
|
|
20
|
-
} =
|
|
20
|
+
} = G(), { preselectedAssetIds: y } = p(), h = O(), l = b(!0), [s, a] = C(
|
|
21
21
|
u === "SingleSelectFile" ? { status: "WaitingForFileSelection" } : { status: "Ready" }
|
|
22
22
|
);
|
|
23
23
|
function F(e) {
|
|
@@ -28,14 +28,14 @@ function tt(t) {
|
|
|
28
28
|
}, []);
|
|
29
29
|
function v() {
|
|
30
30
|
const e = s.status === "ReadyWithFile" ? s.file : void 0;
|
|
31
|
-
a({ status: "Loading" }), u !== "MultiSelect" && t.selection[0]?.type === "asset" ?
|
|
32
|
-
assetId: f || m && S ?
|
|
31
|
+
a({ status: "Loading" }), u !== "MultiSelect" && t.selection[0]?.type === "asset" ? j({
|
|
32
|
+
assetId: f || m && S ? B(t.selection[0].value.id) : t.selection[0].value.id,
|
|
33
33
|
auth: h,
|
|
34
34
|
assetFieldSelection: r,
|
|
35
35
|
noCache: d
|
|
36
36
|
}).then((n) => {
|
|
37
37
|
g(n, e);
|
|
38
|
-
}) :
|
|
38
|
+
}) : D({
|
|
39
39
|
selectedItems: t.selection,
|
|
40
40
|
auth: h,
|
|
41
41
|
assetFieldSelection: r,
|
|
@@ -46,7 +46,7 @@ function tt(t) {
|
|
|
46
46
|
});
|
|
47
47
|
}
|
|
48
48
|
function g(e, n) {
|
|
49
|
-
if (
|
|
49
|
+
if (N(e)) {
|
|
50
50
|
a({ status: "Error" });
|
|
51
51
|
return;
|
|
52
52
|
}
|
|
@@ -54,14 +54,14 @@ function tt(t) {
|
|
|
54
54
|
const o = Array.isArray(e.value) ? e.value : [e.value];
|
|
55
55
|
o.sort((R, W) => w(R, W, y)), i(o, { selectedFile: n });
|
|
56
56
|
} catch (o) {
|
|
57
|
-
|
|
57
|
+
k.error(o);
|
|
58
58
|
}
|
|
59
59
|
l.current && (a({ status: "Done" }), setTimeout(() => {
|
|
60
60
|
l.current && a((o) => o.status === "ReadyWithFile" ? o : n ? { status: "ReadyWithFile", file: n } : { status: "Ready" });
|
|
61
61
|
}, 2e3));
|
|
62
62
|
}
|
|
63
63
|
return /* @__PURE__ */ x(L, { children: [
|
|
64
|
-
u === "SingleSelectFile" && t.selection[0]?.type === "asset" && /* @__PURE__ */ c(
|
|
64
|
+
u === "SingleSelectFile" && t.selection[0]?.type === "asset" && /* @__PURE__ */ c(T, { asset: t.selection[0].value, onChange: F }),
|
|
65
65
|
/* @__PURE__ */ c(
|
|
66
66
|
A,
|
|
67
67
|
{
|
|
@@ -71,7 +71,7 @@ function tt(t) {
|
|
|
71
71
|
"data-testid": "add-button",
|
|
72
72
|
isLoading: s.status === "Loading",
|
|
73
73
|
children: /* @__PURE__ */ c(
|
|
74
|
-
|
|
74
|
+
q,
|
|
75
75
|
{
|
|
76
76
|
status: s.status,
|
|
77
77
|
numberOfSelectedItems: t.selection.length
|
|
@@ -85,5 +85,6 @@ function w(t, r, i) {
|
|
|
85
85
|
return i ? !i.includes(t.id) && i.includes(r.id) ? 1 : i.includes(t.id) && !i.includes(r.id) ? -1 : i.indexOf(t.id) - i.indexOf(r.id) : 0;
|
|
86
86
|
}
|
|
87
87
|
export {
|
|
88
|
-
tt as AddMedia
|
|
88
|
+
tt as AddMedia,
|
|
89
|
+
w as sortAssets
|
|
89
90
|
};
|
package/Advanced.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
1
|
+
import { jsx as t, jsxs as d, Fragment as c } from "react/jsx-runtime";
|
|
2
2
|
import o from "./styled-components.browser.esm.js";
|
|
3
3
|
import { token as i } from "./token.js";
|
|
4
|
-
import { IconAdjust as
|
|
5
|
-
import { Dropdown as
|
|
4
|
+
import { IconAdjust as p } from "./index3.js";
|
|
5
|
+
import { Dropdown as g } from "./Dropdown.js";
|
|
6
6
|
import { __ as m } from "./index2.js";
|
|
7
7
|
import { useConfig as l } from "./ConfigContext.js";
|
|
8
|
-
import { Spinner as
|
|
9
|
-
import { AssetTypeItem as
|
|
8
|
+
import { Spinner as f } from "./Spinner.js";
|
|
9
|
+
import { AssetTypeItem as u } from "./AssetTypeItem.js";
|
|
10
10
|
function O(n) {
|
|
11
11
|
const { assetTypes: r } = l(), s = r.filter(
|
|
12
12
|
(e) => a(n.count, e) > 0
|
|
13
13
|
);
|
|
14
|
-
return r.length === 0 || s.length === 0 ? null : /* @__PURE__ */ t(A, { title: /* @__PURE__ */ t(h, {}), isSmall: !0, fadeIn: !0, children: () => /* @__PURE__ */ c
|
|
15
|
-
n.isLoading && /* @__PURE__ */ t(
|
|
14
|
+
return r.length === 0 || s.length === 0 ? null : /* @__PURE__ */ t(A, { title: /* @__PURE__ */ t(h, {}), isSmall: !0, fadeIn: !0, "data-testid": "advanced-filter-dropdown", children: () => /* @__PURE__ */ d(c, { children: [
|
|
15
|
+
n.isLoading && /* @__PURE__ */ t(f, {}),
|
|
16
16
|
/* @__PURE__ */ t($, { children: m("Type") }),
|
|
17
|
-
/* @__PURE__ */ t(
|
|
18
|
-
|
|
17
|
+
/* @__PURE__ */ t(w, { children: s.map((e) => /* @__PURE__ */ t(
|
|
18
|
+
u,
|
|
19
19
|
{
|
|
20
20
|
type: e,
|
|
21
21
|
count: a(n.count, e),
|
|
@@ -26,7 +26,7 @@ function O(n) {
|
|
|
26
26
|
] }) });
|
|
27
27
|
}
|
|
28
28
|
function h() {
|
|
29
|
-
return /* @__PURE__ */ c
|
|
29
|
+
return /* @__PURE__ */ d(c, { children: [
|
|
30
30
|
/* @__PURE__ */ t(I, {}),
|
|
31
31
|
m("Advanced")
|
|
32
32
|
] });
|
|
@@ -45,16 +45,16 @@ function a(n, r) {
|
|
|
45
45
|
return n.archive;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
const A = o(
|
|
48
|
+
const A = o(g)``, $ = o.h1`
|
|
49
49
|
padding: ${i.spacing5} ${i.spacing5} 0 ${i.spacing5};
|
|
50
50
|
margin: 0 0 ${i.spacing5} 0;
|
|
51
51
|
font-size: ${i.fontSize100};
|
|
52
|
-
`, I = o(
|
|
52
|
+
`, I = o(p)`
|
|
53
53
|
display: inline;
|
|
54
54
|
margin-right: ${i.spacing3};
|
|
55
55
|
height: ${i.spacing6};
|
|
56
56
|
width: ${i.spacing6};
|
|
57
|
-
`,
|
|
57
|
+
`, w = o.ul`
|
|
58
58
|
padding: 0;
|
|
59
59
|
margin: 0;
|
|
60
60
|
list-style: none;
|
package/App.js
CHANGED
|
@@ -1,37 +1,35 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
2
|
-
import { CollectionsView as
|
|
3
|
-
import { CollectionView as
|
|
4
|
-
import { ConfigProvider as
|
|
5
|
-
import { AssetFilter as
|
|
6
|
-
import { useLocalization as
|
|
1
|
+
import { jsx as e, jsxs as s, Fragment as I } from "react/jsx-runtime";
|
|
2
|
+
import { CollectionsView as T } from "./CollectionsView.js";
|
|
3
|
+
import { CollectionView as V } from "./CollectionView.js";
|
|
4
|
+
import { ConfigProvider as D, useConfig as F } from "./ConfigContext.js";
|
|
5
|
+
import { AssetFilter as O } from "./AssetFilter.js";
|
|
6
|
+
import { useLocalization as P } from "./index2.js";
|
|
7
7
|
import { ShadowRoot as k } from "./ShadowRoot.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { Shield as j } from "./Shield.js";
|
|
15
|
-
import { Dat as z } from "./Dat.js";
|
|
8
|
+
import { ThemeStyles as y } from "./Theming.js";
|
|
9
|
+
import { Toolbar as E } from "./Toolbar.js";
|
|
10
|
+
import { AssetsView as M } from "./AssetsView.js";
|
|
11
|
+
import { SelectionFooter as R } from "./SelectionFooter.js";
|
|
12
|
+
import { Shield as U } from "./Shield.js";
|
|
13
|
+
import { Dat as x } from "./Dat.js";
|
|
16
14
|
import "./DatDropdownItem.js";
|
|
17
|
-
import { useRouterSelectors as
|
|
18
|
-
import { useClearCollectionOnPageChange as
|
|
19
|
-
import { useDat as
|
|
20
|
-
import { StoreInitializer as
|
|
21
|
-
import { BrowserClient as
|
|
22
|
-
import { makeFetchTransport as
|
|
23
|
-
import { defaultStackParser as
|
|
24
|
-
import { Hub as
|
|
25
|
-
let
|
|
26
|
-
|
|
15
|
+
import { useRouterSelectors as j } from "./useRouterStore.js";
|
|
16
|
+
import { useClearCollectionOnPageChange as z } from "./useSearchStore.js";
|
|
17
|
+
import { useDat as H } from "./useDatStore.js";
|
|
18
|
+
import { StoreInitializer as N } from "./StoreInitializer.js";
|
|
19
|
+
import { BrowserClient as B } from "./client.js";
|
|
20
|
+
import { makeFetchTransport as G } from "./fetch.js";
|
|
21
|
+
import { defaultStackParser as L } from "./stack-parsers.js";
|
|
22
|
+
import { Hub as _ } from "./hub.js";
|
|
23
|
+
let n;
|
|
24
|
+
n = new B({
|
|
27
25
|
dsn: "https://dd74b64cc05845468f0c3654b458da29@sentry10.bynder.cloud/464",
|
|
28
26
|
autoSessionTracking: !0,
|
|
29
27
|
tracesSampleRate: 1,
|
|
30
28
|
integrations: [],
|
|
31
|
-
stackParser:
|
|
32
|
-
transport:
|
|
33
|
-
}), new
|
|
34
|
-
function
|
|
29
|
+
stackParser: L,
|
|
30
|
+
transport: G
|
|
31
|
+
}), new _(n);
|
|
32
|
+
function ue({
|
|
35
33
|
assetFieldSelection: o,
|
|
36
34
|
assetFilter: r,
|
|
37
35
|
assetTypes: c = ["IMAGE", "AUDIO", "VIDEO", "DOCUMENT", "ARCHIVE"],
|
|
@@ -42,18 +40,18 @@ function Ce({
|
|
|
42
40
|
onSuccess: f = (i, { selectedFile: t }) => console.log(i, t),
|
|
43
41
|
defaultImageDerivativeName: d,
|
|
44
42
|
defaultVideoDerivativeName: u,
|
|
45
|
-
theme:
|
|
46
|
-
hideExternalAccess:
|
|
47
|
-
selectedAssets:
|
|
48
|
-
hideLimitedUse:
|
|
43
|
+
theme: g,
|
|
44
|
+
hideExternalAccess: h,
|
|
45
|
+
selectedAssets: C,
|
|
46
|
+
hideLimitedUse: S,
|
|
49
47
|
isContainerMode: m = !1,
|
|
50
48
|
__shouldAddOriginal__: w,
|
|
51
|
-
hideSwitch:
|
|
52
|
-
noCache:
|
|
53
|
-
selectAllOption:
|
|
49
|
+
hideSwitch: A = !1,
|
|
50
|
+
noCache: b = !1,
|
|
51
|
+
selectAllOption: v = !1
|
|
54
52
|
}) {
|
|
55
|
-
|
|
56
|
-
const { datUrl: i } =
|
|
53
|
+
P(l);
|
|
54
|
+
const { datUrl: i } = H(), t = {
|
|
57
55
|
assetFieldSelection: o,
|
|
58
56
|
assetFilter: r,
|
|
59
57
|
assetTypes: c,
|
|
@@ -62,39 +60,42 @@ function Ce({
|
|
|
62
60
|
defaultImageDerivativeName: d,
|
|
63
61
|
defaultVideoDerivativeName: u,
|
|
64
62
|
selectionMode: p,
|
|
65
|
-
theme:
|
|
66
|
-
hideExternalAccess:
|
|
63
|
+
theme: g,
|
|
64
|
+
hideExternalAccess: h,
|
|
67
65
|
__shouldAddOriginal__: w,
|
|
68
|
-
hideSwitch:
|
|
69
|
-
noCache:
|
|
70
|
-
selectAllOption:
|
|
66
|
+
hideSwitch: A,
|
|
67
|
+
noCache: b,
|
|
68
|
+
selectAllOption: v
|
|
71
69
|
};
|
|
72
|
-
return /* @__PURE__ */ e(
|
|
70
|
+
return /* @__PURE__ */ e(U, { sentryClient: n, children: /* @__PURE__ */ e(k, { isContainerMode: m, children: /* @__PURE__ */ s(D, { value: t, children: [
|
|
73
71
|
/* @__PURE__ */ e(
|
|
74
|
-
|
|
72
|
+
N,
|
|
75
73
|
{
|
|
76
74
|
defaultSearchTerm: a,
|
|
77
|
-
resetOnMount: !m
|
|
75
|
+
resetOnMount: !m,
|
|
76
|
+
hideLimitedUse: S,
|
|
77
|
+
preselectedAssetIds: C,
|
|
78
|
+
predefinedFilter: r
|
|
78
79
|
}
|
|
79
80
|
),
|
|
80
|
-
/* @__PURE__ */ e(
|
|
81
|
-
/* @__PURE__ */
|
|
81
|
+
/* @__PURE__ */ e(y, { theme: t.theme }),
|
|
82
|
+
/* @__PURE__ */ s("div", { className: "cv-root cv-container", children: [
|
|
83
|
+
/* @__PURE__ */ e(E, {}),
|
|
84
|
+
/* @__PURE__ */ e(q, {}),
|
|
82
85
|
/* @__PURE__ */ e(R, {}),
|
|
83
|
-
/* @__PURE__ */ e(
|
|
84
|
-
/* @__PURE__ */ e(x, {}),
|
|
85
|
-
i && /* @__PURE__ */ e(z, {})
|
|
86
|
+
i && /* @__PURE__ */ e(x, {})
|
|
86
87
|
] })
|
|
87
|
-
] }) }) })
|
|
88
|
+
] }) }) });
|
|
88
89
|
}
|
|
89
|
-
function
|
|
90
|
-
const o =
|
|
91
|
-
return
|
|
92
|
-
o.page !== "collections" && (r === void 0 || r && r.showToolbar) && /* @__PURE__ */ e(
|
|
93
|
-
o.page === "assets" && /* @__PURE__ */ e(
|
|
94
|
-
o.page === "collections" && /* @__PURE__ */ e(
|
|
95
|
-
o.page === "collection" && /* @__PURE__ */ e(
|
|
90
|
+
function q() {
|
|
91
|
+
const o = j.use.page(), { assetFilter: r } = F();
|
|
92
|
+
return z(o), /* @__PURE__ */ s(I, { children: [
|
|
93
|
+
o.page !== "collections" && (r === void 0 || r && r.showToolbar) && /* @__PURE__ */ e(O, {}),
|
|
94
|
+
o.page === "assets" && /* @__PURE__ */ e(M, {}),
|
|
95
|
+
o.page === "collections" && /* @__PURE__ */ e(T, {}),
|
|
96
|
+
o.page === "collection" && /* @__PURE__ */ e(V, { collection: o.collection })
|
|
96
97
|
] });
|
|
97
98
|
}
|
|
98
99
|
export {
|
|
99
|
-
|
|
100
|
+
ue as App
|
|
100
101
|
};
|
package/Arrow.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import i from "./styled-components.browser.esm.js";
|
|
3
|
-
import { IconCaretDown as n } from "./
|
|
3
|
+
import { IconCaretDown as n } from "./index3.js";
|
|
4
4
|
import { token as o } from "./token.js";
|
|
5
5
|
function d(t) {
|
|
6
6
|
return /* @__PURE__ */ r(c, { ...t, children: /* @__PURE__ */ r(n, {}) });
|
package/AssetFilter.js
CHANGED
|
@@ -3,40 +3,40 @@ import { useState as f, useEffect as C } from "react";
|
|
|
3
3
|
import p from "./styled-components.browser.esm.js";
|
|
4
4
|
import { Button as F } from "./Button.js";
|
|
5
5
|
import { token as L } from "./token.js";
|
|
6
|
-
import { IconMultiSelect as B, IconRectangle as E } from "./
|
|
6
|
+
import { IconMultiSelect as B, IconRectangle as E } from "./index3.js";
|
|
7
7
|
import { useRouterSelectors as H } from "./useRouterStore.js";
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import { useGetFilters as V } from "./
|
|
12
|
-
import { useGetFilters as W } from "./getFilters_new.js";
|
|
8
|
+
import { useLocalization as R } from "./index2.js";
|
|
9
|
+
import { useConfig as Q } from "./ConfigContext.js";
|
|
10
|
+
import { useGetFilters as U } from "./getFilters.js";
|
|
11
|
+
import { useGetFilters as V } from "./getFilters_new.js";
|
|
13
12
|
import { Skeleton as u } from "./Skeleton.js";
|
|
14
|
-
import { HorizontalScroll as
|
|
15
|
-
import { Tags as
|
|
16
|
-
import { Advanced as
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
13
|
+
import { HorizontalScroll as W } from "./HorizontalScroll.js";
|
|
14
|
+
import { Tags as q } from "./Tags.js";
|
|
15
|
+
import { Advanced as J } from "./Advanced.js";
|
|
16
|
+
import { useAuth as K } from "./LoginContext.js";
|
|
17
|
+
import { getAssetCounts as X } from "./getAssetCounts.js";
|
|
18
|
+
import { Smartfilter as Y } from "./Smartfilters_new.js";
|
|
19
|
+
import { useSearchStateByPage as Z } from "./useSearchStore.js";
|
|
20
|
+
import { useSimilaritySearchStore as _ } from "./useSimilaritySearchStore.js";
|
|
21
|
+
import { useSelectionStore as ee } from "./useSelectionStore.js";
|
|
22
|
+
import { useAssetFilterStore as te } from "./useAssetFilterStore.js";
|
|
23
23
|
function Ie() {
|
|
24
|
-
const
|
|
24
|
+
const r = te(), t = H.use.page(), { value: i } = Z("assets"), {
|
|
25
25
|
assetTypes: a,
|
|
26
26
|
language: g,
|
|
27
27
|
assetFilter: x,
|
|
28
28
|
noCache: S,
|
|
29
29
|
selectionMode: w,
|
|
30
30
|
selectAllOption: T
|
|
31
|
-
} =
|
|
32
|
-
|
|
31
|
+
} = Q(), { clear: I, selectAll: b } = ee(), N = K(), [h, P] = f(t.page);
|
|
32
|
+
R(g);
|
|
33
33
|
const [j, A] = f(!1), {
|
|
34
34
|
isSelected: z,
|
|
35
35
|
isNLSSelected: D,
|
|
36
36
|
NLSSearchText: G
|
|
37
|
-
} =
|
|
37
|
+
} = _(), [M, v] = f(!1), { data: l, isLoading: y } = U(
|
|
38
38
|
{
|
|
39
|
-
filter:
|
|
39
|
+
filter: r,
|
|
40
40
|
searchTerm: i || null,
|
|
41
41
|
allAssetTypes: a,
|
|
42
42
|
language: g,
|
|
@@ -44,26 +44,26 @@ function Ie() {
|
|
|
44
44
|
collectionId: t.page === "collection" ? t.collection.id : null
|
|
45
45
|
},
|
|
46
46
|
S
|
|
47
|
-
), { data:
|
|
48
|
-
if (C(() => (t.page !== h && (P(t.page),
|
|
49
|
-
|
|
47
|
+
), { data: s } = V(S);
|
|
48
|
+
if (C(() => (t.page !== h && (P(t.page), r.clear()), () => {
|
|
49
|
+
r.clear();
|
|
50
50
|
}), [h, t.page]), C(() => {
|
|
51
51
|
let o = !1;
|
|
52
52
|
return (async () => {
|
|
53
53
|
v(!0);
|
|
54
54
|
try {
|
|
55
|
-
const d = await
|
|
55
|
+
const d = await X({
|
|
56
56
|
auth: N,
|
|
57
57
|
filter: {
|
|
58
58
|
searchTerm: i,
|
|
59
59
|
assetTypes: a,
|
|
60
60
|
collectionId: t.page === "collection" ? t.collection.id : void 0,
|
|
61
|
-
tagNames:
|
|
62
|
-
isLimitedUse:
|
|
63
|
-
metaproperties:
|
|
61
|
+
tagNames: r.tags,
|
|
62
|
+
isLimitedUse: r.isLimited,
|
|
63
|
+
metaproperties: r.selectedSmartfilterOptions
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
o ||
|
|
66
|
+
o || r.setActiveFiltersState(d);
|
|
67
67
|
} catch (d) {
|
|
68
68
|
o || console.error("Error fetching asset counts:", d);
|
|
69
69
|
} finally {
|
|
@@ -72,9 +72,9 @@ function Ie() {
|
|
|
72
72
|
})(), () => {
|
|
73
73
|
o = !0;
|
|
74
74
|
};
|
|
75
|
-
}, [
|
|
76
|
-
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(
|
|
77
|
-
const { tags: n, count: O } = l.value.searchAssets, { value: c } =
|
|
75
|
+
}, [r.tags, i, a, t.page, r.selectedSmartfilterOptions]), l.tag === "Failure" || !l.value || s.tag === "Failure" || s.tag === "Loading" || !s.value || M)
|
|
76
|
+
return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(re, {}) });
|
|
77
|
+
const { tags: n, count: O } = l.value.searchAssets, { value: c } = s, $ = j ? /* @__PURE__ */ e(
|
|
78
78
|
F,
|
|
79
79
|
{
|
|
80
80
|
onClick: () => {
|
|
@@ -98,15 +98,15 @@ function Ie() {
|
|
|
98
98
|
}
|
|
99
99
|
);
|
|
100
100
|
return z || D && G ? null : /* @__PURE__ */ m(k, { "data-testid": "filter-nav", children: [
|
|
101
|
-
/* @__PURE__ */ m(
|
|
102
|
-
c && c.filters.length > 0 && /* @__PURE__ */ e(
|
|
103
|
-
n && n.nodes.length > 0 && /* @__PURE__ */ e(
|
|
104
|
-
/* @__PURE__ */ e(
|
|
101
|
+
/* @__PURE__ */ m(W, { children: [
|
|
102
|
+
c && c.filters.length > 0 && /* @__PURE__ */ e(Y, { filterData: c }),
|
|
103
|
+
n && n.nodes.length > 0 && /* @__PURE__ */ e(q, { tags: n.nodes, isLoading: y }),
|
|
104
|
+
/* @__PURE__ */ e(J, { isLoading: y, count: O.assetType })
|
|
105
105
|
] }),
|
|
106
|
-
/* @__PURE__ */ e(
|
|
106
|
+
/* @__PURE__ */ e(se, { children: w === "MultiSelect" && T && t.page === "assets" && $ })
|
|
107
107
|
] });
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function re() {
|
|
110
110
|
return /* @__PURE__ */ m(oe, { children: [
|
|
111
111
|
/* @__PURE__ */ e(u, { width: 100 }),
|
|
112
112
|
/* @__PURE__ */ e(u, { width: 80 }),
|
|
@@ -119,7 +119,7 @@ const k = p.nav`
|
|
|
119
119
|
background-color: #fff;
|
|
120
120
|
padding: ${L.spacing3} ${L.spacing4};
|
|
121
121
|
z-index: 20;
|
|
122
|
-
`,
|
|
122
|
+
`, se = p.div`
|
|
123
123
|
display: flex;
|
|
124
124
|
align-items: center;
|
|
125
125
|
|
package/AssetItem.js
CHANGED
|
@@ -1,24 +1,17 @@
|
|
|
1
1
|
import { jsxs as m, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import i from "./styled-components.browser.esm.js";
|
|
3
|
-
import { Thumbnail as
|
|
3
|
+
import { Thumbnail as p } from "./Thumbnail.js";
|
|
4
4
|
import { token as o } from "./token.js";
|
|
5
|
-
import { getExtension as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
5
|
+
import { getExtension as r, getThumbnail as s } from "./utils2.js";
|
|
6
|
+
import { SelectedItemContainer as l } from "./SelectedItemContainer.js";
|
|
7
|
+
import { useSelectionStore as a } from "./useSelectionStore.js";
|
|
8
8
|
function b({ asset: e }) {
|
|
9
|
-
const
|
|
10
|
-
return /* @__PURE__ */ m(
|
|
11
|
-
|
|
12
|
-
{
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
children: [
|
|
16
|
-
/* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(s, { variant: "preview", imageUrl: l(e), size: "m" }) }),
|
|
17
|
-
/* @__PURE__ */ t(g, { children: e.name }),
|
|
18
|
-
n(e) && /* @__PURE__ */ t(h, { children: n(e) })
|
|
19
|
-
]
|
|
20
|
-
}
|
|
21
|
-
);
|
|
9
|
+
const { toggleAssets: n } = a();
|
|
10
|
+
return /* @__PURE__ */ m(l, { title: e.name, onRemove: () => n([e]), children: [
|
|
11
|
+
/* @__PURE__ */ t(c, { children: /* @__PURE__ */ t(p, { variant: "preview", imageUrl: s(e), size: "m" }) }),
|
|
12
|
+
/* @__PURE__ */ t(g, { children: e.name }),
|
|
13
|
+
r(e) && /* @__PURE__ */ t(h, { children: r(e) })
|
|
14
|
+
] });
|
|
22
15
|
}
|
|
23
16
|
const c = i.div`
|
|
24
17
|
margin-right: ${o.spacing4};
|