@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.
Files changed (253) hide show
  1. package/AccessToken2.js +1 -1
  2. package/ActiveFilters.js +49 -50
  3. package/AddMedia.js +19 -18
  4. package/Advanced.js +13 -13
  5. package/App.js +60 -59
  6. package/Arrow.js +1 -1
  7. package/AssetFilter.js +38 -38
  8. package/AssetItem.js +10 -17
  9. package/AssetList.js +5 -5
  10. package/AssetTypeItem.js +21 -21
  11. package/AssetsView.js +13 -13
  12. package/Axios2.js +82 -76
  13. package/AxiosError.js +36 -35
  14. package/ButtonAction.js +1 -1
  15. package/CanceledError.js +15 -8
  16. package/Card.js +1 -1
  17. package/Chip.js +1 -1
  18. package/CollectionCard.js +22 -22
  19. package/CollectionItem.js +9 -9
  20. package/CollectionList.js +5 -5
  21. package/CollectionView.js +11 -11
  22. package/ColorPicker.js +1 -1
  23. package/ColorPickerSolid.js +3 -3
  24. package/ColorPickerWithOpacity.js +3 -3
  25. package/Component.js +158 -0
  26. package/Component2.js +4 -0
  27. package/ConfigContext.js +7 -8
  28. package/Container.js +1 -1
  29. package/ContextAction.js +1 -1
  30. package/ControlGroup.js +6 -6
  31. package/Dat.js +33 -32
  32. package/DatDropdownItem.js +1 -1
  33. package/DesignSystemProvider.js +7 -7
  34. package/DirectionSelect.js +11 -10
  35. package/DomainInput.js +19 -11
  36. package/Draggable.js +337 -0
  37. package/Draggable2.js +4 -0
  38. package/DraggableCore.js +312 -0
  39. package/DraggableCore2.js +4 -0
  40. package/Dropdown.js +37 -37
  41. package/Dropdown2.js +1 -1
  42. package/DropdownListItem.js +1 -1
  43. package/FieldSelect.js +19 -17
  44. package/FileSelector.js +38 -37
  45. package/FontPicker.js +1 -1
  46. package/Form.js +1 -1
  47. package/Header.js +5 -4
  48. package/HttpStatusCode.js +7 -1
  49. package/InfiniteScroll.js +1 -1
  50. package/InlineBanner.js +1 -1
  51. package/Input.js +1 -1
  52. package/InterceptorManager.js +2 -1
  53. package/Item.js +8 -8
  54. package/Item4.js +2 -2
  55. package/LeftArrow.js +1 -1
  56. package/ListItem2.js +1 -1
  57. package/ModalBase.js +15 -15
  58. package/NoResults.js +1 -1
  59. package/Option_new.js +36 -29
  60. package/ReactPropTypesSecret.js +10 -0
  61. package/RightArrow.js +1 -1
  62. package/SearchInput.js +1 -1
  63. package/SearchInput2.js +1 -1
  64. package/SelectionFooter.js +41 -31
  65. package/Shield.js +2 -2
  66. package/Smartfilters_new.js +107 -98
  67. package/StatefulAssetList.js +50 -50
  68. package/StoreInitializer.js +32 -16
  69. package/SwitchNLS.js +1 -1
  70. package/TagItem.js +15 -15
  71. package/Tags.js +1 -1
  72. package/Toolbar.js +23 -20
  73. package/Tooltip2.js +1 -1
  74. package/ViewSwitch.js +17 -15
  75. package/_commonjsHelpers.js +28 -3
  76. package/adapters.js +54 -42
  77. package/api/filterAssets.d.ts +1 -1
  78. package/api/getAssets.d.ts +1 -1
  79. package/api/getFilters.d.ts +1 -1
  80. package/api/rest/index.d.ts +1 -1
  81. package/api/rest/types.d.ts +1 -1
  82. package/api2.js +1 -1
  83. package/asset.type.js +1 -1
  84. package/autocomplete.js +1 -1
  85. package/axios.js +1 -1
  86. package/bodyScrollLock.esm.js +68 -0
  87. package/buildURL.js +13 -15
  88. package/checkGlobals.js +1 -1
  89. package/cjs.js +7 -0
  90. package/cjs2.js +15 -0
  91. package/cjs3.js +4 -0
  92. package/clsx.m.js +6 -0
  93. package/clsx.m2.js +15 -0
  94. package/combineMetaproperties.js +3 -1
  95. package/composeSignals.js +1 -1
  96. package/cookieStore.js +1 -1
  97. package/cookies.js +13 -11
  98. package/currentScopes.js +1 -1
  99. package/data.js +1 -1
  100. package/devUtils.js +1 -1
  101. package/dispatchRequest.js +5 -5
  102. package/domFns.js +151 -0
  103. package/domFns2.js +4 -0
  104. package/factoryWithThrowingShims.js +52 -0
  105. package/fetch2.js +156 -128
  106. package/filter/AssetFilterContext.d.ts +3 -3
  107. package/filterAssets.js +1 -1
  108. package/getAsset.js +1 -1
  109. package/getAssetCounts.js +1 -1
  110. package/getAssets.js +1 -1
  111. package/getCollections.js +1 -1
  112. package/getFilterOptions.js +1 -1
  113. package/getFilters.js +1 -1
  114. package/getFilters_new.js +1 -1
  115. package/getPrefix.js +35 -0
  116. package/getPrefix2.js +4 -0
  117. package/getSimilarityAssets.js +1 -1
  118. package/goober.modern.js +75 -0
  119. package/handlers.js +1 -1
  120. package/iconBase.js +56 -0
  121. package/iconContext.js +12 -0
  122. package/iconsManifest.js +222 -0
  123. package/index-esm.js +1 -4
  124. package/index.browser.js +1 -1
  125. package/index.m.js +9 -0
  126. package/index.m2.js +17 -0
  127. package/index10.js +18 -2
  128. package/index11.js +181 -15
  129. package/index112.js +1 -1
  130. package/index12.js +313 -36
  131. package/index13.js +5 -2430
  132. package/index14.js +3 -557
  133. package/index15.js +15 -55
  134. package/index16.js +3 -2
  135. package/index17.js +3 -87
  136. package/index18.js +36 -60
  137. package/index19.js +3 -7
  138. package/index20.js +2429 -12
  139. package/index21.js +557 -10
  140. package/index22.js +1 -1
  141. package/index23.js +119 -6
  142. package/index24.js +39 -7
  143. package/index25.js +2 -5
  144. package/index26.js +86 -9
  145. package/index27.js +55 -8
  146. package/index28.js +6 -636
  147. package/index29.js +8692 -74
  148. package/index3.js +1684 -5
  149. package/index30.js +2 -5
  150. package/index31.js +4 -20
  151. package/index310.js +2 -0
  152. package/index32.js +11 -2
  153. package/index33.js +5083 -4
  154. package/index34.js +2 -18
  155. package/index35.js +59 -5
  156. package/index36.js +2 -2
  157. package/index37.js +13 -11
  158. package/index38.js +46 -10
  159. package/index39.js +6 -12
  160. package/index4.js +5 -1684
  161. package/index40.js +8 -11
  162. package/index41.js +26 -18
  163. package/index42.js +2 -64
  164. package/index43.js +63 -5
  165. package/index44.js +9 -55
  166. package/index45.js +7 -67
  167. package/index46.js +8 -31
  168. package/index47.js +5 -11
  169. package/index48.js +10 -121
  170. package/index49.js +9 -86
  171. package/index5.js +215 -23
  172. package/index50.js +636 -7
  173. package/index51.js +74 -11
  174. package/index52.js +4 -13
  175. package/index53.js +19 -13
  176. package/index54.js +4 -6
  177. package/index55.js +18 -7
  178. package/index56.js +5 -14
  179. package/index57.js +10 -28
  180. package/index58.js +10 -15
  181. package/index59.js +15 -0
  182. package/index6.js +250 -299
  183. package/index60.js +13 -0
  184. package/index61.js +21 -0
  185. package/index62.js +8 -0
  186. package/index63.js +57 -0
  187. package/index64.js +4 -0
  188. package/index65.js +69 -0
  189. package/index66.js +33 -0
  190. package/index67.js +13 -0
  191. package/index68.js +123 -0
  192. package/index69.js +88 -0
  193. package/index7.js +22 -5047
  194. package/index70.js +10 -0
  195. package/index71.js +13 -0
  196. package/index72.js +13 -225
  197. package/index73.js +16 -0
  198. package/index74.js +9 -0
  199. package/index75.js +228 -0
  200. package/index76.js +9 -0
  201. package/index77.js +17 -0
  202. package/index78.js +31 -0
  203. package/index79.js +18 -0
  204. package/index8.js +5044 -47
  205. package/index9.js +50 -15
  206. package/isAbsoluteURL.js +1 -1
  207. package/isURLSameOrigin.js +1 -1
  208. package/localization.js +15 -15
  209. package/log.js +14 -0
  210. package/log2.js +4 -0
  211. package/matchRequestUrl.js +1 -1
  212. package/mergeConfig.js +37 -32
  213. package/notify.js +2 -2
  214. package/package.json +1 -1
  215. package/positionFns.js +101 -0
  216. package/positionFns2.js +4 -0
  217. package/react-laag.esm.js +957 -0
  218. package/react.js +8 -8
  219. package/react2.js +9 -9
  220. package/resolveConfig.js +23 -23
  221. package/select/add-media/AddMedia.d.ts +3 -1
  222. package/select/current-selection/SelectedItems.d.ts +1 -1
  223. package/shims.js +29 -0
  224. package/shims2.js +4 -0
  225. package/store/StoreInitializer.d.ts +5 -1
  226. package/store/useAssetFilterStore.d.ts +55 -0
  227. package/store/useSelectionStore.d.ts +47 -0
  228. package/styled-components.browser.esm.js +2 -2
  229. package/throttle.js +1 -1
  230. package/toURLEncodedForm.js +11 -10
  231. package/tokenExpirationHelper.js +1 -1
  232. package/transformData.js +1 -1
  233. package/transitional.js +4 -3
  234. package/useAssetFilterStore.js +152 -0
  235. package/useDatStore.js +1 -1
  236. package/useEffectEvent.js +7 -7
  237. package/useFonts.js +2 -2
  238. package/useOrderingStore.js +1 -1
  239. package/useRouterStore.js +1 -1
  240. package/useSearchStore.js +1 -1
  241. package/useSelectionStore.js +131 -0
  242. package/useSimilaritySearchStore.js +1 -1
  243. package/useTranslate.js +1 -1
  244. package/utils/combineMetaproperties.d.ts +2 -0
  245. package/utils6.js +160 -118
  246. package/utils7.js +7 -68
  247. package/utils8.js +68 -7
  248. package/xhr.js +47 -46
  249. package/AssetFilterContext.js +0 -161
  250. package/SelectionContext.js +0 -143
  251. package/select/SelectionContext.d.ts +0 -30
  252. /package/{Middleware.js → Middleware2.js} +0 -0
  253. /package/{middleware2.js → middleware.js} +0 -0
@@ -1,77 +1,77 @@
1
- import { jsx as t, jsxs as F } from "react/jsx-runtime";
2
- import { useEffect as c } from "react";
3
- import f from "./styled-components.browser.esm.js";
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 N } from "./index4.js";
6
- import { __ as m } from "./index2.js";
7
- import { NoResults as I } from "./NoResults.js";
8
- import { useAssetFilter as _ } from "./AssetFilterContext.js";
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 P } from "./ActiveFilters.js";
13
- import { pluralize as $ } from "./text.js";
14
- import { AssetList as b } from "./AssetList.js";
15
- import { DirectionSelect as j } from "./DirectionSelect.js";
16
- import { FieldSelect as U } from "./FieldSelect.js";
17
- import { Tooltip as k } from "./Tooltip.js";
18
- import { useSearchStore as z } from "./useSearchStore.js";
19
- import { useSimilaritySearchStore as B } from "./useSimilaritySearchStore.js";
20
- function ce(e) {
21
- const { data: s, isLoading: r, loadMore: g, hasNextPage: p, executeQuery: d } = e.connection, { setIsLoading: S, setSearch: a } = z(), l = w(), A = D(), { selectAssets: h, toggleAssets: v, setAllAssets: L } = R(), x = _(), {
22
- isNLSSelected: E,
23
- NLSSearchText: y,
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
- } = B();
26
- if (c(() => {
27
- r || S(!1);
28
- }, [r]), c(() => {
29
- s.tag !== "Failure" && L(u(s));
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: d });
32
- const o = s.value?.searchAssets?.assets?.totalCount ?? e.totalCount, T = () => {
33
- x.clear(), a("assets", ""), a("collection", "");
34
- }, n = !!(C || E && y);
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
- b,
36
+ P,
37
37
  {
38
- assets: u(s),
38
+ assets: f(s),
39
39
  count: o,
40
40
  isLoading: r,
41
- loadMore: g,
42
- hasNextPage: p,
43
- theme: l.theme,
44
- selectionMode: l.selectionMode,
45
- selectedAssetIds: A,
41
+ loadMore: p,
42
+ hasNextPage: d,
43
+ theme: c.theme,
44
+ selectionMode: c.selectionMode,
45
+ selectedAssetIds: N,
46
46
  onSelect: h,
47
- onToggle: v,
48
- emptyStateElement: /* @__PURE__ */ t(I, { onReset: T }),
49
- children: /* @__PURE__ */ F(H, { children: [
50
- o !== void 0 && /* @__PURE__ */ t(O, { "data-testid": "assets-amount", children: $(o, m("{} asset"), m("{} assets")) }, o),
51
- e.showActiveFilters && /* @__PURE__ */ t(P, {}),
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
- U,
53
+ b,
54
54
  {
55
55
  options: n ? ["NL_SEARCH"] : ["CREATED_AT", "PUBLISHED_AT", "UPDATED_AT", "NAME"]
56
56
  }
57
57
  ),
58
- /* @__PURE__ */ t(j, { nlSearch: n }),
58
+ /* @__PURE__ */ t($, { nlSearch: n }),
59
59
  n && /* @__PURE__ */ t(
60
- k,
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(N, {})
67
+ children: /* @__PURE__ */ t(w, {})
68
68
  }
69
69
  )
70
70
  ] })
71
71
  }
72
72
  );
73
73
  }
74
- function u(e) {
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 H = f.div`
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
- `, O = f.span`
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
- ce as StatefulAssetList
98
+ ue as StatefulAssetList
99
99
  };
@@ -1,29 +1,45 @@
1
- import { useRef as i, useEffect as s } from "react";
2
- import { useSearchStore as r } from "./useSearchStore.js";
3
- import { useOrderingStore as o } from "./useOrderingStore.js";
4
- import { useDatStore as S } from "./useDatStore.js";
5
- import { useSimilaritySearchStore as l } from "./useSimilaritySearchStore.js";
6
- import { useRouterStore as f } from "./useRouterStore.js";
7
- function n() {
8
- o.getState().reset(), S.getState().reset(), r.getState().clear(), l.setState({
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
- }), f.setState({ page: { page: "assets" } });
16
+ }), y.setState({ page: { page: "assets" } }), f.getState().clear();
15
17
  }
16
- function h({
17
- defaultSearchTerm: e,
18
- resetOnMount: a = !1
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 = i(!1);
25
+ const i = P(o), l = c((t) => t.selectAssets), u = c((t) => t.setPreselectedAssetIds), r = m(!1);
21
26
  return s(() => {
22
- t.current || (a && n(), r.getState().setSearch("assets", e ?? ""), t.current = !0);
27
+ r.current || (g && T(), S.getState().setSearch("assets", a ?? ""), r.current = !0);
23
28
  }, []), s(() => {
24
- t.current && r.getState().setSearch("assets", e ?? "");
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
- h as StoreInitializer
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 "./index4.js";
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 m, jsx as a } from "react/jsx-runtime";
2
- import n from "./styled-components.browser.esm.js";
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 { useAssetFilter as g } from "./AssetFilterContext.js";
6
- function x(t) {
7
- const e = g(), i = e.tags.includes(t.tag.name);
8
- function o() {
9
- i ? e.removeTag(t.tag.name) : t.isLoading || e.addTag(t.tag.name);
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__ */ m(
11
+ return /* @__PURE__ */ g(
12
12
  r,
13
13
  {
14
14
  loading: t.isLoading,
15
- active: i,
16
- onClick: o,
15
+ active: a,
16
+ onClick: d,
17
17
  "data-testid": "tag-item",
18
18
  children: [
19
- /* @__PURE__ */ a(l, { children: t.tag.name }),
20
- /* @__PURE__ */ a(c, { children: t.tag.assetCount })
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 = n.span`
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
- `, c = n.span`
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
- x as TagItem
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 "./index4.js";
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 n, Fragment as p, jsx as o } from "react/jsx-runtime";
2
- import m from "./styled-components.browser.esm.js";
3
- import { IconExitApp as u, IconCancel as f } from "./index4.js";
4
- import { Button as a } from "./Button.js";
5
- import { token as i } from "./token.js";
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 { useAssetFilter as v, useHideSwitch as w } from "./ConfigContext.js";
12
- function z() {
13
- const e = g(), t = x(), r = h(), s = v(), d = w(), c = s !== void 0 && !s.showToolbar;
14
- return !e && !t && c ? null : /* @__PURE__ */ n(b, { children: [
15
- !c && /* @__PURE__ */ n(p, { children: [
16
- !d && /* @__PURE__ */ o(I, {}),
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__ */ n(k, { children: [
20
+ /* @__PURE__ */ i(S, { children: [
20
21
  e && !r?.hideLogout && /* @__PURE__ */ o(
21
- a,
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
- a,
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 b = m.nav`
44
+ const w = d.nav`
42
45
  display: flex;
43
46
  justify-content: space-between;
44
- background: ${i.gray10};
45
- padding: ${i.spacing4} ${i.spacing4};
47
+ background: ${n.gray10};
48
+ padding: ${n.spacing4} ${n.spacing4};
46
49
  z-index: 30;
47
- `, k = m.div`
50
+ `, S = d.div`
48
51
  display: inline-flex;
49
52
  margin-left: auto;
50
53
  `;
51
54
  export {
52
- z as Toolbar
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 i } from "react/jsx-runtime";
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 o } from "./Button.js";
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 f } from "./useRouterStore.js";
7
- import { useSimilaritySearchStore as d } from "./useSimilaritySearchStore.js";
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 [e, t] = f(), { setIsSelected: a, setIsNLSSelected: n } = d(), { resetData: c } = g(), s = () => {
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(S, { children: [
14
- /* @__PURE__ */ i(
15
- o,
13
+ return /* @__PURE__ */ l(u, { children: [
14
+ /* @__PURE__ */ o(
15
+ i,
16
16
  {
17
- isPressed: e.page === "assets",
17
+ isPressed: t.page === "assets",
18
18
  variant: "clean",
19
19
  onClick: () => {
20
- t({ page: "assets" }), s();
20
+ e({ page: "assets" }), s();
21
21
  },
22
+ "data-testid": "assets-button",
22
23
  children: r("Assets")
23
24
  }
24
25
  ),
25
- /* @__PURE__ */ i(
26
- o,
26
+ /* @__PURE__ */ o(
27
+ i,
27
28
  {
28
- isPressed: e.page === "collections",
29
+ isPressed: t.page === "collections",
29
30
  variant: "clean",
30
31
  onClick: () => {
31
- t({ page: "collections" }), s();
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 S = m.div`
40
+ const u = m.div`
39
41
  display: inline-flex;
40
42
  margin-right: auto;
41
43
  gap: ${p.spacing2};
@@ -1,6 +1,31 @@
1
- function e(t) {
2
- return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
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
- e as getDefaultExportFromCjs
29
+ c as getAugmentedNamespace,
30
+ u as getDefaultExportFromCjs
6
31
  };
package/adapters.js CHANGED
@@ -1,53 +1,65 @@
1
- import a from "./utils6.js";
2
- import h from "./null.js";
3
- import m from "./xhr.js";
4
- import u from "./fetch2.js";
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 s = {
7
- http: h,
8
- xhr: m,
9
- fetch: u
6
+ const c = {
7
+ http: m,
8
+ xhr: u,
9
+ fetch: {
10
+ get: b
11
+ }
10
12
  };
11
- a.forEach(s, (e, n) => {
13
+ s.forEach(c, (e, o) => {
12
14
  if (e) {
13
15
  try {
14
- Object.defineProperty(e, "name", { value: n });
16
+ Object.defineProperty(e, "name", { value: o });
15
17
  } catch {
16
18
  }
17
- Object.defineProperty(e, "adapterName", { value: n });
19
+ Object.defineProperty(e, "adapterName", { value: o });
18
20
  }
19
21
  });
20
- const c = (e) => `- ${e}`, b = (e) => a.isFunction(e) || e === null || e === !1, y = {
21
- getAdapter: (e) => {
22
- e = a.isArray(e) ? e : [e];
23
- const { length: n } = e;
24
- let o, r;
25
- const p = {};
26
- for (let t = 0; t < n; t++) {
27
- o = e[t];
28
- let i;
29
- if (r = o, !b(o) && (r = s[(i = String(o)).toLowerCase()], r === void 0))
30
- throw new d(`Unknown adapter '${i}'`);
31
- if (r)
32
- break;
33
- p[i || "#" + t] = r;
34
- }
35
- if (!r) {
36
- const t = Object.entries(p).map(
37
- ([f, l]) => `adapter ${f} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
38
- );
39
- let i = n ? t.length > 1 ? `since :
40
- ` + t.map(c).join(`
41
- `) : " " + c(t[0]) : "as no adapter specified";
42
- throw new d(
43
- "There is no suitable adapter to dispatch the request " + i,
44
- "ERR_NOT_SUPPORT"
45
- );
46
- }
47
- return r;
48
- },
49
- adapters: s
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
- y as default
64
+ x as default
53
65
  };
@@ -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;
@@ -1,5 +1,5 @@
1
1
  import { Result } from '../auth/result.type';
2
- import { SelectedItem } from '../select/SelectionContext';
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: {
@@ -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: {
@@ -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>;
@@ -42,7 +42,7 @@ export type AutocompleteOption = {
42
42
  label: string;
43
43
  icon?: string;
44
44
  };
45
- export type AutcompleteResponseOption = {
45
+ export type AutocompleteResponseOption = {
46
46
  dependencyId: string;
47
47
  isMultifilter: number;
48
48
  options: AutocompleteOption[];
package/api2.js CHANGED
@@ -1,4 +1,4 @@
1
- import "./index12.js";
1
+ import "./index18.js";
2
2
  import E from "./axios.js";
3
3
  var T;
4
4
  const F = ((T = document.querySelector('meta[name="x-csrf-token"]')) == null ? void 0 : T.getAttribute("content")) || "", s = {
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 "./index4.js";
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 = {
package/autocomplete.js CHANGED
@@ -1,4 +1,4 @@
1
- import { getRequest as a } from "./index9.js";
1
+ import { getRequest as a } from "./index10.js";
2
2
  import { handlers as m } from "./handlers2.js";
3
3
  import { ensureValidUrl as d } from "./url.js";
4
4
  const f = async ({