@bynder/compact-view 5.2.2 → 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/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/getPrefix.js +35 -0
- package/getPrefix2.js +4 -0
- 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 +1 -1
- 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 -7
- package/index19.js +3 -60
- 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 +25 -2
- 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 +1537 -1536
- package/index9.js +1 -1
- 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 +1 -1
- 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/xhr.js +47 -46
- package/AssetFilterContext.js +0 -161
- package/Middleware.js +0 -49
- package/SelectionContext.js +0 -143
- package/middleware2.js +0 -177
- package/select/SelectionContext.d.ts +0 -30
package/StatefulAssetList.js
CHANGED
|
@@ -1,77 +1,77 @@
|
|
|
1
|
-
import { jsx as t, jsxs as
|
|
2
|
-
import { useEffect as
|
|
3
|
-
import
|
|
1
|
+
import { jsx as t, jsxs as _ } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect as m } from "react";
|
|
3
|
+
import g from "./styled-components.browser.esm.js";
|
|
4
4
|
import { token as i } from "./token.js";
|
|
5
|
-
import { IconErrorOutline as
|
|
6
|
-
import { __ as
|
|
7
|
-
import { NoResults as
|
|
8
|
-
import {
|
|
9
|
-
import { useConfig as w } from "./ConfigContext.js";
|
|
10
|
-
import { useSelectedAssetIds as D, useSelection as R } from "./SelectionContext.js";
|
|
5
|
+
import { IconErrorOutline as w } from "./index3.js";
|
|
6
|
+
import { __ as u } from "./index2.js";
|
|
7
|
+
import { NoResults as D } from "./NoResults.js";
|
|
8
|
+
import { useConfig as I } from "./ConfigContext.js";
|
|
11
9
|
import { Oops as M } from "./Oops.js";
|
|
12
|
-
import { ActiveFilters as
|
|
13
|
-
import { pluralize as
|
|
14
|
-
import { AssetList as
|
|
15
|
-
import { DirectionSelect as
|
|
16
|
-
import { FieldSelect as
|
|
17
|
-
import { Tooltip as
|
|
18
|
-
import { useSearchStore as
|
|
19
|
-
import { useSimilaritySearchStore as
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
10
|
+
import { ActiveFilters as R } from "./ActiveFilters.js";
|
|
11
|
+
import { pluralize as H } from "./text.js";
|
|
12
|
+
import { AssetList as P } from "./AssetList.js";
|
|
13
|
+
import { DirectionSelect as $ } from "./DirectionSelect.js";
|
|
14
|
+
import { FieldSelect as b } from "./FieldSelect.js";
|
|
15
|
+
import { Tooltip as j } from "./Tooltip.js";
|
|
16
|
+
import { useSearchStore as U } from "./useSearchStore.js";
|
|
17
|
+
import { useSimilaritySearchStore as k } from "./useSimilaritySearchStore.js";
|
|
18
|
+
import { useSelectionStore as z, useSelectionModeHandler as B } from "./useSelectionStore.js";
|
|
19
|
+
import { useAssetFilterStore as O } from "./useAssetFilterStore.js";
|
|
20
|
+
function ue(e) {
|
|
21
|
+
const { data: s, isLoading: r, loadMore: p, hasNextPage: d, executeQuery: S } = e.connection, { setIsLoading: A, setSearch: l } = U(), c = I(), { selectAssets: h, setAllAssets: v, selection: L } = z(), { assetToggleHandler: x } = B(), { clear: E } = O(), {
|
|
22
|
+
isNLSSelected: y,
|
|
23
|
+
NLSSearchText: T,
|
|
24
24
|
isSelected: C
|
|
25
|
-
} =
|
|
26
|
-
if (
|
|
27
|
-
r ||
|
|
28
|
-
}, [r]),
|
|
29
|
-
s.tag !== "Failure" &&
|
|
25
|
+
} = k(), N = L.filter((a) => a.type === "asset").map((a) => a.value.id);
|
|
26
|
+
if (m(() => {
|
|
27
|
+
r || A(!1);
|
|
28
|
+
}, [r]), m(() => {
|
|
29
|
+
s.tag !== "Failure" && v(f(s));
|
|
30
30
|
}, [s]), s.tag === "Failure")
|
|
31
|
-
return /* @__PURE__ */ t(M, { error: new Error(s.value), onRetry:
|
|
32
|
-
const o = s.value?.searchAssets?.assets?.totalCount ?? e.totalCount,
|
|
33
|
-
|
|
34
|
-
}, n = !!(C ||
|
|
31
|
+
return /* @__PURE__ */ t(M, { error: new Error(s.value), onRetry: S });
|
|
32
|
+
const o = s.value?.searchAssets?.assets?.totalCount ?? e.totalCount, F = () => {
|
|
33
|
+
E(), l("assets", ""), l("collection", "");
|
|
34
|
+
}, n = !!(C || y && T);
|
|
35
35
|
return /* @__PURE__ */ t(
|
|
36
|
-
|
|
36
|
+
P,
|
|
37
37
|
{
|
|
38
|
-
assets:
|
|
38
|
+
assets: f(s),
|
|
39
39
|
count: o,
|
|
40
40
|
isLoading: r,
|
|
41
|
-
loadMore:
|
|
42
|
-
hasNextPage:
|
|
43
|
-
theme:
|
|
44
|
-
selectionMode:
|
|
45
|
-
selectedAssetIds:
|
|
41
|
+
loadMore: p,
|
|
42
|
+
hasNextPage: d,
|
|
43
|
+
theme: c.theme,
|
|
44
|
+
selectionMode: c.selectionMode,
|
|
45
|
+
selectedAssetIds: N,
|
|
46
46
|
onSelect: h,
|
|
47
|
-
onToggle:
|
|
48
|
-
emptyStateElement: /* @__PURE__ */ t(
|
|
49
|
-
children: /* @__PURE__ */
|
|
50
|
-
o !== void 0 && /* @__PURE__ */ t(
|
|
51
|
-
e.showActiveFilters && /* @__PURE__ */ t(
|
|
47
|
+
onToggle: x,
|
|
48
|
+
emptyStateElement: /* @__PURE__ */ t(D, { onReset: F }),
|
|
49
|
+
children: /* @__PURE__ */ _(Q, { children: [
|
|
50
|
+
o !== void 0 && /* @__PURE__ */ t(V, { "data-testid": "assets-amount", children: H(o, u("{} asset"), u("{} assets")) }, o),
|
|
51
|
+
e.showActiveFilters && /* @__PURE__ */ t(R, {}),
|
|
52
52
|
/* @__PURE__ */ t(
|
|
53
|
-
|
|
53
|
+
b,
|
|
54
54
|
{
|
|
55
55
|
options: n ? ["NL_SEARCH"] : ["CREATED_AT", "PUBLISHED_AT", "UPDATED_AT", "NAME"]
|
|
56
56
|
}
|
|
57
57
|
),
|
|
58
|
-
/* @__PURE__ */ t(
|
|
58
|
+
/* @__PURE__ */ t($, { nlSearch: n }),
|
|
59
59
|
n && /* @__PURE__ */ t(
|
|
60
|
-
|
|
60
|
+
j,
|
|
61
61
|
{
|
|
62
62
|
text: `You cannot change the sorting criteria while a Visual Similarity filter
|
|
63
63
|
is being applied`,
|
|
64
64
|
position: "left",
|
|
65
65
|
margin: "left",
|
|
66
66
|
marginAmount: "spacing3",
|
|
67
|
-
children: /* @__PURE__ */ t(
|
|
67
|
+
children: /* @__PURE__ */ t(w, {})
|
|
68
68
|
}
|
|
69
69
|
)
|
|
70
70
|
] })
|
|
71
71
|
}
|
|
72
72
|
);
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function f(e) {
|
|
75
75
|
return e.tag === "Loading" && !e.value ? {
|
|
76
76
|
tag: "Loading",
|
|
77
77
|
value: void 0
|
|
@@ -83,17 +83,17 @@ function u(e) {
|
|
|
83
83
|
value: e.value.searchAssets.assets.nodes
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
|
-
const
|
|
86
|
+
const Q = g.div`
|
|
87
87
|
display: flex;
|
|
88
88
|
justify-content: space-between;
|
|
89
89
|
align-items: center;
|
|
90
90
|
z-index: 10;
|
|
91
91
|
padding: ${i.spacing5} ${i.spacing5} ${i.spacing3} ${i.spacing5};
|
|
92
|
-
`,
|
|
92
|
+
`, V = g.span`
|
|
93
93
|
color: rgba(0, 34, 51, 0.5);
|
|
94
94
|
flex-shrink: 0;
|
|
95
95
|
animation: fade-in-down 0.15s ease-out;
|
|
96
96
|
`;
|
|
97
97
|
export {
|
|
98
|
-
|
|
98
|
+
ue as StatefulAssetList
|
|
99
99
|
};
|
package/StoreInitializer.js
CHANGED
|
@@ -1,29 +1,45 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import { useSearchStore as
|
|
3
|
-
import { useOrderingStore as
|
|
4
|
-
import { useDatStore as
|
|
5
|
-
import { useSimilaritySearchStore as
|
|
6
|
-
import { useRouterStore as
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import { useRef as m, useEffect as s } from "react";
|
|
2
|
+
import { useSearchStore as S } from "./useSearchStore.js";
|
|
3
|
+
import { useOrderingStore as p } from "./useOrderingStore.js";
|
|
4
|
+
import { useDatStore as A } from "./useDatStore.js";
|
|
5
|
+
import { useSimilaritySearchStore as d } from "./useSimilaritySearchStore.js";
|
|
6
|
+
import { useRouterStore as y } from "./useRouterStore.js";
|
|
7
|
+
import { useAssetFilterStore as f } from "./useAssetFilterStore.js";
|
|
8
|
+
import { usePreselectedAssets as P, useSelectionStore as c } from "./useSelectionStore.js";
|
|
9
|
+
function T() {
|
|
10
|
+
p.getState().reset(), A.getState().reset(), S.getState().clear(), c.getState().clear(), d.setState({
|
|
9
11
|
isEnabled: !1,
|
|
10
12
|
isSelected: !1,
|
|
11
13
|
isNLSSelected: !1,
|
|
12
14
|
NLSSearchText: void 0,
|
|
13
15
|
similarityAssetsData: { tag: "Loading", value: null }
|
|
14
|
-
}),
|
|
16
|
+
}), y.setState({ page: { page: "assets" } }), f.getState().clear();
|
|
15
17
|
}
|
|
16
|
-
function
|
|
17
|
-
defaultSearchTerm:
|
|
18
|
-
resetOnMount:
|
|
18
|
+
function I({
|
|
19
|
+
defaultSearchTerm: a,
|
|
20
|
+
resetOnMount: g = !1,
|
|
21
|
+
predefinedFilter: e,
|
|
22
|
+
hideLimitedUse: n = !1,
|
|
23
|
+
preselectedAssetIds: o
|
|
19
24
|
}) {
|
|
20
|
-
const t =
|
|
25
|
+
const i = P(o), l = c((t) => t.selectAssets), u = c((t) => t.setPreselectedAssetIds), r = m(!1);
|
|
21
26
|
return s(() => {
|
|
22
|
-
|
|
27
|
+
r.current || (g && T(), S.getState().setSearch("assets", a ?? ""), r.current = !0);
|
|
23
28
|
}, []), s(() => {
|
|
24
|
-
|
|
29
|
+
r.current && S.getState().setSearch("assets", a ?? "");
|
|
30
|
+
}, [a]), s(() => {
|
|
31
|
+
u(o ?? []);
|
|
32
|
+
}, [o, u]), s(() => {
|
|
33
|
+
i.length > 0 && l(i);
|
|
34
|
+
}, [i, l]), s(() => {
|
|
35
|
+
r.current && f.getState().setHideLimitedUse(n);
|
|
36
|
+
}, [n]), s(() => {
|
|
37
|
+
if (r.current) {
|
|
38
|
+
const t = f.getState();
|
|
39
|
+
t.setPredefinedFilter(e), e && (e?.predefinedMetapropertiesOptions && t.setPredefinedMetaproperties(), e.predefinedAssetType && t.setAssetTypes(e.predefinedAssetType), e.predefinedTagNames && t.setTags(e.predefinedTagNames));
|
|
40
|
+
}
|
|
25
41
|
}, [e]), null;
|
|
26
42
|
}
|
|
27
43
|
export {
|
|
28
|
-
|
|
44
|
+
I as StoreInitializer
|
|
29
45
|
};
|
package/SwitchNLS.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Switch as m } from "./Switch.js";
|
|
|
4
4
|
import { TruncatedText as c } from "./TruncatedText.js";
|
|
5
5
|
import { token as r } from "./token.js";
|
|
6
6
|
import { textStyles as s } from "./textStyles.js";
|
|
7
|
-
import { IconSmart as f } from "./
|
|
7
|
+
import { IconSmart as f } from "./index3.js";
|
|
8
8
|
import { __ as d } from "./index2.js";
|
|
9
9
|
const j = ({ isNLSSearchOn: e, setIsNLSSearchOn: n }) => {
|
|
10
10
|
const a = (t) => {
|
package/TagItem.js
CHANGED
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
1
|
+
import { jsxs as g, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import i from "./styled-components.browser.esm.js";
|
|
3
3
|
import { token as s } from "./token.js";
|
|
4
4
|
import { Chip as r } from "./Chip2.js";
|
|
5
|
-
import {
|
|
6
|
-
function
|
|
7
|
-
const
|
|
8
|
-
function
|
|
9
|
-
|
|
5
|
+
import { useAssetFilterStore as c } from "./useAssetFilterStore.js";
|
|
6
|
+
function v(t) {
|
|
7
|
+
const { tags: n, addTag: o, removeTag: m } = c(), a = n.includes(t.tag.name);
|
|
8
|
+
function d() {
|
|
9
|
+
a ? m(t.tag.name) : t.isLoading || o(t.tag.name);
|
|
10
10
|
}
|
|
11
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ g(
|
|
12
12
|
r,
|
|
13
13
|
{
|
|
14
14
|
loading: t.isLoading,
|
|
15
|
-
active:
|
|
16
|
-
onClick:
|
|
15
|
+
active: a,
|
|
16
|
+
onClick: d,
|
|
17
17
|
"data-testid": "tag-item",
|
|
18
18
|
children: [
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
-
/* @__PURE__ */
|
|
19
|
+
/* @__PURE__ */ e(l, { "data-testid": "tag-item-name", children: t.tag.name }),
|
|
20
|
+
/* @__PURE__ */ e(f, { "data-testid": "tag-item-count", children: t.tag.assetCount })
|
|
21
21
|
]
|
|
22
22
|
},
|
|
23
23
|
t.tag.id
|
|
24
24
|
);
|
|
25
25
|
}
|
|
26
|
-
const l =
|
|
26
|
+
const l = i.span`
|
|
27
27
|
max-with: 128px;
|
|
28
28
|
overflow: hidden;
|
|
29
29
|
text-overflow: ellipsis;
|
|
30
30
|
white-space: nowrap;
|
|
31
|
-
`,
|
|
31
|
+
`, f = i.span`
|
|
32
32
|
color: rgba(0, 34, 51, 0.5);
|
|
33
33
|
margin-left: ${s.spacing3};
|
|
34
34
|
`;
|
|
35
35
|
export {
|
|
36
|
-
|
|
36
|
+
v as TagItem
|
|
37
37
|
};
|
package/Tags.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as n, jsxs as a, Fragment as e } from "react/jsx-runtime";
|
|
2
2
|
import s from "./styled-components.browser.esm.js";
|
|
3
3
|
import { token as i } from "./token.js";
|
|
4
|
-
import { IconTag as d } from "./
|
|
4
|
+
import { IconTag as d } from "./index3.js";
|
|
5
5
|
import { Dropdown as p } from "./Dropdown.js";
|
|
6
6
|
import { __ as g } from "./index2.js";
|
|
7
7
|
import { TagItem as c } from "./TagItem.js";
|
package/Toolbar.js
CHANGED
|
@@ -1,53 +1,56 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import
|
|
3
|
-
import { IconExitApp as u, IconCancel as f } from "./
|
|
4
|
-
import { Button as
|
|
5
|
-
import { token as
|
|
1
|
+
import { jsxs as i, Fragment as p, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import d from "./styled-components.browser.esm.js";
|
|
3
|
+
import { IconExitApp as u, IconCancel as f } from "./index3.js";
|
|
4
|
+
import { Button as c } from "./Button.js";
|
|
5
|
+
import { token as n } from "./token.js";
|
|
6
6
|
import { __ as l } from "./index2.js";
|
|
7
7
|
import { useIsLoggedIn as g, useAuth as h } from "./LoginContext.js";
|
|
8
8
|
import { useModalContext as x } from "./Modal.js";
|
|
9
9
|
import { SearchInput as C } from "./SearchInput.js";
|
|
10
10
|
import { ViewSwitch as I } from "./ViewSwitch.js";
|
|
11
|
-
import {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
import { useHideSwitch as b } from "./ConfigContext.js";
|
|
12
|
+
import { useAssetFilterStore as v } from "./useAssetFilterStore.js";
|
|
13
|
+
function H() {
|
|
14
|
+
const e = g(), t = x(), r = h(), { predefinedFilter: s } = v(), m = b(), a = s !== void 0 && !s?.showToolbar;
|
|
15
|
+
return !e && !t && a ? null : /* @__PURE__ */ i(w, { children: [
|
|
16
|
+
!a && /* @__PURE__ */ i(p, { children: [
|
|
17
|
+
!m && /* @__PURE__ */ o(I, {}),
|
|
17
18
|
/* @__PURE__ */ o(C, {})
|
|
18
19
|
] }),
|
|
19
|
-
/* @__PURE__ */
|
|
20
|
+
/* @__PURE__ */ i(S, { children: [
|
|
20
21
|
e && !r?.hideLogout && /* @__PURE__ */ o(
|
|
21
|
-
|
|
22
|
+
c,
|
|
22
23
|
{
|
|
23
24
|
variant: "clean",
|
|
24
25
|
onClick: () => r?.logout(),
|
|
25
26
|
rightIcon: /* @__PURE__ */ o(u, {}),
|
|
27
|
+
"data-testid": "logout-button",
|
|
26
28
|
children: l("Log out")
|
|
27
29
|
}
|
|
28
30
|
),
|
|
29
31
|
t && /* @__PURE__ */ o(
|
|
30
|
-
|
|
32
|
+
c,
|
|
31
33
|
{
|
|
32
34
|
variant: "clean",
|
|
33
35
|
onClick: () => t.onClose(),
|
|
34
36
|
title: l("Close"),
|
|
35
|
-
icon: /* @__PURE__ */ o(f, {})
|
|
37
|
+
icon: /* @__PURE__ */ o(f, {}),
|
|
38
|
+
"data-testid": "close-modal-button"
|
|
36
39
|
}
|
|
37
40
|
)
|
|
38
41
|
] })
|
|
39
42
|
] });
|
|
40
43
|
}
|
|
41
|
-
const
|
|
44
|
+
const w = d.nav`
|
|
42
45
|
display: flex;
|
|
43
46
|
justify-content: space-between;
|
|
44
|
-
background: ${
|
|
45
|
-
padding: ${
|
|
47
|
+
background: ${n.gray10};
|
|
48
|
+
padding: ${n.spacing4} ${n.spacing4};
|
|
46
49
|
z-index: 30;
|
|
47
|
-
`,
|
|
50
|
+
`, S = d.div`
|
|
48
51
|
display: inline-flex;
|
|
49
52
|
margin-left: auto;
|
|
50
53
|
`;
|
|
51
54
|
export {
|
|
52
|
-
|
|
55
|
+
H as Toolbar
|
|
53
56
|
};
|
package/Tooltip2.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsxs as T, Fragment as C, jsx as o } from "react/jsx-runtime";
|
|
2
|
-
import { useHover as O, useLayer as L } from "react-laag";
|
|
2
|
+
import { useHover as O, useLayer as L } from "./react-laag.esm.js";
|
|
3
3
|
import p, { css as P } from "./styled-components.browser.esm.js";
|
|
4
4
|
import { useFocusRing as M } from "./useFocusRing.js";
|
|
5
5
|
import { LightTheme as S, DarkTheme as F } from "./themeContainers.js";
|
package/ViewSwitch.js
CHANGED
|
@@ -1,41 +1,43 @@
|
|
|
1
|
-
import { jsxs as l, jsx as
|
|
1
|
+
import { jsxs as l, jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import m from "./styled-components.browser.esm.js";
|
|
3
|
-
import { Button as
|
|
3
|
+
import { Button as i } from "./Button.js";
|
|
4
4
|
import { token as p } from "./token.js";
|
|
5
5
|
import { __ as r } from "./index2.js";
|
|
6
|
-
import { useRouter as
|
|
7
|
-
import { useSimilaritySearchStore as
|
|
6
|
+
import { useRouter as d } from "./useRouterStore.js";
|
|
7
|
+
import { useSimilaritySearchStore as f } from "./useSimilaritySearchStore.js";
|
|
8
8
|
import { useSimilarityAssets as g } from "./getSimilarityAssets.js";
|
|
9
9
|
function I() {
|
|
10
|
-
const [
|
|
10
|
+
const [t, e] = d(), { setIsSelected: a, setIsNLSSelected: n } = f(), { resetData: c } = g(), s = () => {
|
|
11
11
|
a(!1), n(!1), c();
|
|
12
12
|
};
|
|
13
|
-
return /* @__PURE__ */ l(
|
|
14
|
-
/* @__PURE__ */
|
|
15
|
-
|
|
13
|
+
return /* @__PURE__ */ l(u, { children: [
|
|
14
|
+
/* @__PURE__ */ o(
|
|
15
|
+
i,
|
|
16
16
|
{
|
|
17
|
-
isPressed:
|
|
17
|
+
isPressed: t.page === "assets",
|
|
18
18
|
variant: "clean",
|
|
19
19
|
onClick: () => {
|
|
20
|
-
|
|
20
|
+
e({ page: "assets" }), s();
|
|
21
21
|
},
|
|
22
|
+
"data-testid": "assets-button",
|
|
22
23
|
children: r("Assets")
|
|
23
24
|
}
|
|
24
25
|
),
|
|
25
|
-
/* @__PURE__ */
|
|
26
|
-
|
|
26
|
+
/* @__PURE__ */ o(
|
|
27
|
+
i,
|
|
27
28
|
{
|
|
28
|
-
isPressed:
|
|
29
|
+
isPressed: t.page === "collections",
|
|
29
30
|
variant: "clean",
|
|
30
31
|
onClick: () => {
|
|
31
|
-
|
|
32
|
+
e({ page: "collections" }), s();
|
|
32
33
|
},
|
|
34
|
+
"data-testid": "collections-button",
|
|
33
35
|
children: r("Collections")
|
|
34
36
|
}
|
|
35
37
|
)
|
|
36
38
|
] });
|
|
37
39
|
}
|
|
38
|
-
const
|
|
40
|
+
const u = m.div`
|
|
39
41
|
display: inline-flex;
|
|
40
42
|
margin-right: auto;
|
|
41
43
|
gap: ${p.spacing2};
|
package/_commonjsHelpers.js
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
|
-
function e
|
|
2
|
-
return
|
|
1
|
+
function u(e) {
|
|
2
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
3
|
+
}
|
|
4
|
+
function c(e) {
|
|
5
|
+
if (Object.prototype.hasOwnProperty.call(e, "__esModule")) return e;
|
|
6
|
+
var n = e.default;
|
|
7
|
+
if (typeof n == "function") {
|
|
8
|
+
var t = function r() {
|
|
9
|
+
var o = !1;
|
|
10
|
+
try {
|
|
11
|
+
o = this instanceof r;
|
|
12
|
+
} catch {
|
|
13
|
+
}
|
|
14
|
+
return o ? Reflect.construct(n, arguments, this.constructor) : n.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
t.prototype = n.prototype;
|
|
17
|
+
} else t = {};
|
|
18
|
+
return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(e).forEach(function(r) {
|
|
19
|
+
var o = Object.getOwnPropertyDescriptor(e, r);
|
|
20
|
+
Object.defineProperty(t, r, o.get ? o : {
|
|
21
|
+
enumerable: !0,
|
|
22
|
+
get: function() {
|
|
23
|
+
return e[r];
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
}), t;
|
|
3
27
|
}
|
|
4
28
|
export {
|
|
5
|
-
|
|
29
|
+
c as getAugmentedNamespace,
|
|
30
|
+
u as getDefaultExportFromCjs
|
|
6
31
|
};
|
package/adapters.js
CHANGED
|
@@ -1,53 +1,65 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
1
|
+
import s from "./utils6.js";
|
|
2
|
+
import m from "./null.js";
|
|
3
|
+
import u from "./xhr.js";
|
|
4
|
+
import { getFetch as b } from "./fetch2.js";
|
|
5
5
|
import d from "./AxiosError.js";
|
|
6
|
-
const
|
|
7
|
-
http:
|
|
8
|
-
xhr:
|
|
9
|
-
fetch:
|
|
6
|
+
const c = {
|
|
7
|
+
http: m,
|
|
8
|
+
xhr: u,
|
|
9
|
+
fetch: {
|
|
10
|
+
get: b
|
|
11
|
+
}
|
|
10
12
|
};
|
|
11
|
-
|
|
13
|
+
s.forEach(c, (e, o) => {
|
|
12
14
|
if (e) {
|
|
13
15
|
try {
|
|
14
|
-
Object.defineProperty(e, "name", { value:
|
|
16
|
+
Object.defineProperty(e, "name", { value: o });
|
|
15
17
|
} catch {
|
|
16
18
|
}
|
|
17
|
-
Object.defineProperty(e, "adapterName", { value:
|
|
19
|
+
Object.defineProperty(e, "adapterName", { value: o });
|
|
18
20
|
}
|
|
19
21
|
});
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
` +
|
|
41
|
-
`) : " " +
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
22
|
+
const f = (e) => `- ${e}`, g = (e) => s.isFunction(e) || e === null || e === !1;
|
|
23
|
+
function w(e, o) {
|
|
24
|
+
e = s.isArray(e) ? e : [e];
|
|
25
|
+
const { length: a } = e;
|
|
26
|
+
let i, t;
|
|
27
|
+
const p = {};
|
|
28
|
+
for (let r = 0; r < a; r++) {
|
|
29
|
+
i = e[r];
|
|
30
|
+
let n;
|
|
31
|
+
if (t = i, !g(i) && (t = c[(n = String(i)).toLowerCase()], t === void 0))
|
|
32
|
+
throw new d(`Unknown adapter '${n}'`);
|
|
33
|
+
if (t && (s.isFunction(t) || (t = t.get(o))))
|
|
34
|
+
break;
|
|
35
|
+
p[n || "#" + r] = t;
|
|
36
|
+
}
|
|
37
|
+
if (!t) {
|
|
38
|
+
const r = Object.entries(p).map(
|
|
39
|
+
([l, h]) => `adapter ${l} ` + (h === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
40
|
+
);
|
|
41
|
+
let n = a ? r.length > 1 ? `since :
|
|
42
|
+
` + r.map(f).join(`
|
|
43
|
+
`) : " " + f(r[0]) : "as no adapter specified";
|
|
44
|
+
throw new d(
|
|
45
|
+
"There is no suitable adapter to dispatch the request " + n,
|
|
46
|
+
"ERR_NOT_SUPPORT"
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
return t;
|
|
50
|
+
}
|
|
51
|
+
const x = {
|
|
52
|
+
/**
|
|
53
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
54
|
+
* @type {Function}
|
|
55
|
+
*/
|
|
56
|
+
getAdapter: w,
|
|
57
|
+
/**
|
|
58
|
+
* Exposes all known adapters
|
|
59
|
+
* @type {Object<string, Function|Object>}
|
|
60
|
+
*/
|
|
61
|
+
adapters: c
|
|
50
62
|
};
|
|
51
63
|
export {
|
|
52
|
-
|
|
64
|
+
x as default
|
|
53
65
|
};
|
package/api/filterAssets.d.ts
CHANGED
|
@@ -3,10 +3,10 @@ import { Ordering } from '../store/useOrderingStore';
|
|
|
3
3
|
import { Collection } from '../views/collection/collection.types';
|
|
4
4
|
import { AssetType, Asset } from '../views/asset/asset.type';
|
|
5
5
|
import { Connection } from './graphql.types';
|
|
6
|
-
import { Filter } from '../filter/AssetFilterContext';
|
|
7
6
|
import { AssetFilterJson } from '../filter/assetFilter.type';
|
|
8
7
|
import { MetapropertyType } from '../filter/filters/metaproperty/MetapropertyFilterContent';
|
|
9
8
|
import { AuthInformationState } from '../auth/useAuthInformation';
|
|
9
|
+
import { Filter } from '../store/useAssetFilterStore';
|
|
10
10
|
export interface GraphqlResponse {
|
|
11
11
|
searchAssets: {
|
|
12
12
|
assets: Assets;
|
package/api/getAssets.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Result } from '../auth/result.type';
|
|
2
|
-
import { SelectedItem } from '../
|
|
2
|
+
import { SelectedItem } from '../store/useSelectionStore';
|
|
3
3
|
import { Asset } from './getAsset';
|
|
4
4
|
import { AuthInformationState } from '../auth/useAuthInformation';
|
|
5
5
|
export declare function getAssets(options: {
|
package/api/getFilters.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Data } from './graphql.types';
|
|
2
2
|
import { Tag } from '../filter/filters/metaproperty/MetapropertyFilterContent';
|
|
3
|
-
import { Filter } from '../filter/AssetFilterContext';
|
|
4
3
|
import { AssetType } from '../views/asset/asset.type';
|
|
5
4
|
import { AssetFilterJson } from '../filter/assetFilter.type';
|
|
5
|
+
import { Filter } from '../store/useAssetFilterStore';
|
|
6
6
|
export interface GraphqlFiltersResponse {
|
|
7
7
|
searchAssets: {
|
|
8
8
|
count: {
|
package/api/rest/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosError, AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
-
export declare const onSuccess: <T>(response: AxiosResponse<T, any>) => T;
|
|
2
|
+
export declare const onSuccess: <T>(response: AxiosResponse<T, any, {}>) => T;
|
|
3
3
|
export declare const onError: (error: AxiosError) => never;
|
|
4
4
|
declare const getRequest: <T>(endpoint: string, params?: AxiosRequestConfig) => Promise<T>;
|
|
5
5
|
declare const postRequest: <T>(endpoint: string, data: unknown, config?: AxiosRequestConfig) => Promise<T>;
|
package/api/rest/types.d.ts
CHANGED
package/api2.js
CHANGED
package/asset.type.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconArchive as o, IconVideocam as t, IconCamera as c, IconFile as n, IconVolumeUp as s } from "./
|
|
1
|
+
import { IconArchive as o, IconVideocam as t, IconCamera as c, IconFile as n, IconVolumeUp as s } from "./index3.js";
|
|
2
2
|
import { __ as a } from "./index2.js";
|
|
3
3
|
function u(e) {
|
|
4
4
|
const r = {
|