@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.
Files changed (241) 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/axios.js +1 -1
  85. package/bodyScrollLock.esm.js +68 -0
  86. package/buildURL.js +13 -15
  87. package/checkGlobals.js +1 -1
  88. package/cjs.js +7 -0
  89. package/cjs2.js +15 -0
  90. package/cjs3.js +4 -0
  91. package/clsx.m.js +6 -0
  92. package/clsx.m2.js +15 -0
  93. package/combineMetaproperties.js +3 -1
  94. package/composeSignals.js +1 -1
  95. package/cookieStore.js +1 -1
  96. package/cookies.js +13 -11
  97. package/currentScopes.js +1 -1
  98. package/data.js +1 -1
  99. package/devUtils.js +1 -1
  100. package/dispatchRequest.js +5 -5
  101. package/domFns.js +151 -0
  102. package/domFns2.js +4 -0
  103. package/factoryWithThrowingShims.js +52 -0
  104. package/fetch2.js +156 -128
  105. package/filter/AssetFilterContext.d.ts +3 -3
  106. package/getPrefix.js +35 -0
  107. package/getPrefix2.js +4 -0
  108. package/goober.modern.js +75 -0
  109. package/handlers.js +1 -1
  110. package/iconBase.js +56 -0
  111. package/iconContext.js +12 -0
  112. package/iconsManifest.js +222 -0
  113. package/index-esm.js +1 -4
  114. package/index.browser.js +1 -1
  115. package/index.m.js +9 -0
  116. package/index.m2.js +17 -0
  117. package/index10.js +1 -1
  118. package/index11.js +181 -15
  119. package/index112.js +1 -1
  120. package/index12.js +313 -36
  121. package/index13.js +5 -2430
  122. package/index14.js +3 -557
  123. package/index15.js +15 -55
  124. package/index16.js +3 -2
  125. package/index17.js +3 -87
  126. package/index18.js +36 -7
  127. package/index19.js +3 -60
  128. package/index20.js +2429 -12
  129. package/index21.js +557 -10
  130. package/index22.js +1 -1
  131. package/index23.js +119 -6
  132. package/index24.js +39 -7
  133. package/index25.js +2 -5
  134. package/index26.js +86 -9
  135. package/index27.js +55 -8
  136. package/index28.js +6 -636
  137. package/index29.js +8692 -74
  138. package/index3.js +1684 -5
  139. package/index30.js +2 -5
  140. package/index31.js +4 -20
  141. package/index310.js +2 -0
  142. package/index32.js +11 -2
  143. package/index33.js +5083 -4
  144. package/index34.js +2 -18
  145. package/index35.js +59 -5
  146. package/index36.js +2 -2
  147. package/index37.js +13 -11
  148. package/index38.js +46 -10
  149. package/index39.js +6 -12
  150. package/index4.js +5 -1684
  151. package/index40.js +8 -11
  152. package/index41.js +26 -18
  153. package/index42.js +2 -64
  154. package/index43.js +63 -5
  155. package/index44.js +9 -55
  156. package/index45.js +7 -67
  157. package/index46.js +8 -31
  158. package/index47.js +5 -11
  159. package/index48.js +10 -121
  160. package/index49.js +9 -86
  161. package/index5.js +215 -23
  162. package/index50.js +636 -7
  163. package/index51.js +74 -11
  164. package/index52.js +4 -13
  165. package/index53.js +19 -13
  166. package/index54.js +4 -6
  167. package/index55.js +18 -7
  168. package/index56.js +5 -14
  169. package/index57.js +10 -28
  170. package/index58.js +10 -15
  171. package/index59.js +15 -0
  172. package/index6.js +250 -299
  173. package/index60.js +13 -0
  174. package/index61.js +21 -0
  175. package/index62.js +8 -0
  176. package/index63.js +57 -0
  177. package/index64.js +4 -0
  178. package/index65.js +69 -0
  179. package/index66.js +33 -0
  180. package/index67.js +13 -0
  181. package/index68.js +123 -0
  182. package/index69.js +88 -0
  183. package/index7.js +25 -2
  184. package/index70.js +10 -0
  185. package/index71.js +13 -0
  186. package/index72.js +13 -225
  187. package/index73.js +16 -0
  188. package/index74.js +9 -0
  189. package/index75.js +228 -0
  190. package/index76.js +9 -0
  191. package/index77.js +17 -0
  192. package/index78.js +31 -0
  193. package/index79.js +18 -0
  194. package/index8.js +1537 -1536
  195. package/index9.js +1 -1
  196. package/isAbsoluteURL.js +1 -1
  197. package/isURLSameOrigin.js +1 -1
  198. package/localization.js +15 -15
  199. package/log.js +14 -0
  200. package/log2.js +4 -0
  201. package/matchRequestUrl.js +1 -1
  202. package/mergeConfig.js +37 -32
  203. package/notify.js +2 -2
  204. package/package.json +1 -1
  205. package/positionFns.js +101 -0
  206. package/positionFns2.js +4 -0
  207. package/react-laag.esm.js +957 -0
  208. package/react.js +8 -8
  209. package/react2.js +9 -9
  210. package/resolveConfig.js +23 -23
  211. package/select/add-media/AddMedia.d.ts +3 -1
  212. package/select/current-selection/SelectedItems.d.ts +1 -1
  213. package/shims.js +29 -0
  214. package/shims2.js +4 -0
  215. package/store/StoreInitializer.d.ts +5 -1
  216. package/store/useAssetFilterStore.d.ts +55 -0
  217. package/store/useSelectionStore.d.ts +47 -0
  218. package/styled-components.browser.esm.js +2 -2
  219. package/throttle.js +1 -1
  220. package/toURLEncodedForm.js +11 -10
  221. package/tokenExpirationHelper.js +1 -1
  222. package/transformData.js +1 -1
  223. package/transitional.js +4 -3
  224. package/useAssetFilterStore.js +152 -0
  225. package/useDatStore.js +1 -1
  226. package/useEffectEvent.js +7 -7
  227. package/useFonts.js +1 -1
  228. package/useOrderingStore.js +1 -1
  229. package/useRouterStore.js +1 -1
  230. package/useSearchStore.js +1 -1
  231. package/useSelectionStore.js +131 -0
  232. package/useSimilaritySearchStore.js +1 -1
  233. package/useTranslate.js +1 -1
  234. package/utils/combineMetaproperties.d.ts +2 -0
  235. package/utils6.js +160 -118
  236. package/xhr.js +47 -46
  237. package/AssetFilterContext.js +0 -161
  238. package/Middleware.js +0 -49
  239. package/SelectionContext.js +0 -143
  240. package/middleware2.js +0 -177
  241. package/select/SelectionContext.d.ts +0 -30
package/AccessToken2.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { __exports as a } from "./AccessToken3.js";
2
- import { __require as x } from "./index15.js";
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 i, jsxs as f } from "react/jsx-runtime";
2
- import h from "./styled-components.browser.esm.js";
3
- import { Button as v } from "./Button.js";
4
- import { assetTypeToString as u, getAssetTypeIcon as y } from "./asset.type.js";
5
- import { HorizontalScroll as x } from "./HorizontalScroll.js";
6
- import { useAssetFilter as A } from "./AssetFilterContext.js";
7
- import { ActiveFilter as o } from "./ActiveFilter.js";
8
- import { __ as d } from "./index2.js";
9
- import { useSimilaritySearchStore as g } from "./useSimilaritySearchStore.js";
10
- function B() {
11
- const e = A(), {
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: l,
14
- isNLSSelected: c,
15
- setIsNLSSelected: n,
16
- NLSSearchText: a,
17
- setNLSSearchText: m
18
- } = g(), S = Object.values(e.selectedSmartfilterOptions || {}), p = S.length === 0 && e.assetTypes.length === 0 && e.tags.length === 0 && !s && !(c && a) ? void 0 : /* @__PURE__ */ i(k, { children: /* @__PURE__ */ i(
19
- v,
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
- e.clear(), l(!1), n(!1), m(void 0);
32
+ x(), c(!1), a(!1), d(void 0);
25
33
  },
26
- children: d("Clear filters")
34
+ "data-testid": "clear-filters-button",
35
+ children: p("Clear filters")
27
36
  }
28
37
  ) });
29
- return /* @__PURE__ */ i("div", { "data-testid": "selected-filter-list", children: /* @__PURE__ */ f(x, { isActiveFilter: !0, static: p, children: [
30
- e.assetTypes.map((t) => {
31
- const r = y(t);
32
- return /* @__PURE__ */ i(
33
- o,
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: () => e.removeAssetType(t),
36
- title: u(t),
37
- icon: /* @__PURE__ */ i(r, {})
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((r) => /* @__PURE__ */ i(
44
- o,
52
+ (t) => Object.values(t).map((i) => /* @__PURE__ */ e(
53
+ r,
45
54
  {
46
- onClick: () => e.removeSmartfilterOption(
47
- r.metapropertyName,
48
- r.id
49
- ),
50
- title: r.label
55
+ onClick: () => v(i.metapropertyName, i.id),
56
+ title: i.label
51
57
  },
52
- r.id
58
+ i.id
53
59
  ))
54
60
  ),
55
- e.tags.map((t) => /* @__PURE__ */ i(
56
- o,
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
- l(!1), n(!1), m(void 0);
66
+ c(!1), a(!1), d(void 0);
68
67
  },
69
- title: d("Show similar")
68
+ title: p("Show similar")
70
69
  }
71
70
  )
72
71
  ] }) });
73
72
  }
74
- const k = h.div`
73
+ const b = k.div`
75
74
  flex-shrink: 0;
76
75
  animation: var(--fade-in-down);
77
76
  `;
78
77
  export {
79
- B as ActiveFilters
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 { useSelection as T } from "./SelectionContext.js";
7
- import { FileSelector as j } from "./FileSelector.js";
8
- import { getAsset as D } from "./getAsset.js";
9
- import { getAssets as N } from "./getAssets.js";
10
- import { isErr as k } from "./result.type.js";
11
- import { logger as q } from "./logger.js";
12
- import { ButtonAction as B } from "./ButtonAction.js";
13
- import { convertAssetIdToBase64 as G } from "./base64Converter.js";
14
- import { useSimilaritySearchStore as p } from "./useSimilaritySearchStore.js";
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
- } = p(), { preselectedAssetIds: y } = T(), h = O(), l = b(!0), [s, a] = C(
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" ? D({
32
- assetId: f || m && S ? G(t.selection[0].value.id) : t.selection[0].value.id,
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
- }) : N({
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 (k(e)) {
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
- q.error(o);
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(j, { asset: t.selection[0].value, onChange: F }),
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
- B,
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 c, Fragment as d } from "react/jsx-runtime";
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 g } from "./index4.js";
5
- import { Dropdown as p } from "./Dropdown.js";
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 u } from "./Spinner.js";
9
- import { AssetTypeItem as f } from "./AssetTypeItem.js";
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(d, { children: [
15
- n.isLoading && /* @__PURE__ */ t(u, {}),
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(y, { children: s.map((e) => /* @__PURE__ */ t(
18
- f,
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(d, { children: [
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(p)``, $ = o.h1`
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(g)`
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
- `, y = o.ul`
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 n, Fragment as b } from "react/jsx-runtime";
2
- import { CollectionsView as F } from "./CollectionsView.js";
3
- import { CollectionView as I } from "./CollectionView.js";
4
- import { ConfigProvider as T, useConfig as V } from "./ConfigContext.js";
5
- import { AssetFilter as D } from "./AssetFilter.js";
6
- import { useLocalization as O } from "./index2.js";
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 { AssetFilterProvider as y } from "./AssetFilterContext.js";
9
- import { SelectionProvider as E } from "./SelectionContext.js";
10
- import { ThemeStyles as M } from "./Theming.js";
11
- import { Toolbar as R } from "./Toolbar.js";
12
- import { AssetsView as U } from "./AssetsView.js";
13
- import { SelectionFooter as x } from "./SelectionFooter.js";
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 H } from "./useRouterStore.js";
18
- import { useClearCollectionOnPageChange as N } from "./useSearchStore.js";
19
- import { useDat as B } from "./useDatStore.js";
20
- import { StoreInitializer as G } from "./StoreInitializer.js";
21
- import { BrowserClient as L } from "./client.js";
22
- import { makeFetchTransport as _ } from "./fetch.js";
23
- import { defaultStackParser as q } from "./stack-parsers.js";
24
- import { Hub as J } from "./hub.js";
25
- let s;
26
- s = new L({
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: q,
32
- transport: _
33
- }), new J(s);
34
- function Ce({
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: h,
46
- hideExternalAccess: g,
47
- selectedAssets: S,
48
- hideLimitedUse: C,
43
+ theme: g,
44
+ hideExternalAccess: h,
45
+ selectedAssets: C,
46
+ hideLimitedUse: S,
49
47
  isContainerMode: m = !1,
50
48
  __shouldAddOriginal__: w,
51
- hideSwitch: v = !1,
52
- noCache: A = !1,
53
- selectAllOption: P = !1
49
+ hideSwitch: A = !1,
50
+ noCache: b = !1,
51
+ selectAllOption: v = !1
54
52
  }) {
55
- O(l);
56
- const { datUrl: i } = B(), t = {
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: h,
66
- hideExternalAccess: g,
63
+ theme: g,
64
+ hideExternalAccess: h,
67
65
  __shouldAddOriginal__: w,
68
- hideSwitch: v,
69
- noCache: A,
70
- selectAllOption: P
66
+ hideSwitch: A,
67
+ noCache: b,
68
+ selectAllOption: v
71
69
  };
72
- return /* @__PURE__ */ e(j, { sentryClient: s, children: /* @__PURE__ */ e(k, { isContainerMode: m, children: /* @__PURE__ */ e(y, { hideLimitedUse: C, predefinedFilter: r, children: /* @__PURE__ */ e(T, { value: t, children: /* @__PURE__ */ n(E, { preselectedAssetIds: S ?? [], children: [
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
- G,
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(M, { theme: t.theme }),
81
- /* @__PURE__ */ n("div", { className: "cv-root cv-container", children: [
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(K, {}),
84
- /* @__PURE__ */ e(x, {}),
85
- i && /* @__PURE__ */ e(z, {})
86
+ i && /* @__PURE__ */ e(x, {})
86
87
  ] })
87
- ] }) }) }) }) });
88
+ ] }) }) });
88
89
  }
89
- function K() {
90
- const o = H.use.page(), { assetFilter: r } = V();
91
- return N(o), /* @__PURE__ */ n(b, { children: [
92
- o.page !== "collections" && (r === void 0 || r && r.showToolbar) && /* @__PURE__ */ e(D, {}),
93
- o.page === "assets" && /* @__PURE__ */ e(U, {}),
94
- o.page === "collections" && /* @__PURE__ */ e(F, {}),
95
- o.page === "collection" && /* @__PURE__ */ e(I, { collection: o.collection })
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
- Ce as App
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 "./index4.js";
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 "./index4.js";
6
+ import { IconMultiSelect as B, IconRectangle as E } from "./index3.js";
7
7
  import { useRouterSelectors as H } from "./useRouterStore.js";
8
- import { useAssetFilter as R } from "./AssetFilterContext.js";
9
- import { useLocalization as Q } from "./index2.js";
10
- import { useConfig as U } from "./ConfigContext.js";
11
- import { useGetFilters as V } from "./getFilters.js";
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 q } from "./HorizontalScroll.js";
15
- import { Tags as J } from "./Tags.js";
16
- import { Advanced as K } from "./Advanced.js";
17
- import { useSelection as X } from "./SelectionContext.js";
18
- import { useAuth as Y } from "./LoginContext.js";
19
- import { getAssetCounts as Z } from "./getAssetCounts.js";
20
- import { Smartfilter as _ } from "./Smartfilters_new.js";
21
- import { useSearchStateByPage as ee } from "./useSearchStore.js";
22
- import { useSimilaritySearchStore as te } from "./useSimilaritySearchStore.js";
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 s = R(), t = H.use.page(), { value: i } = ee("assets"), {
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
- } = U(), { clear: I, selectAll: b } = X(), N = Y(), [h, P] = f(t.page);
32
- Q(g);
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
- } = te(), [M, v] = f(!1), { data: l, isLoading: y } = V(
37
+ } = _(), [M, v] = f(!1), { data: l, isLoading: y } = U(
38
38
  {
39
- filter: s,
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: r } = W(S);
48
- if (C(() => (t.page !== h && (P(t.page), s.clear()), () => {
49
- s.clear();
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 Z({
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: s.tags,
62
- isLimitedUse: s.isLimited,
63
- metaproperties: s.selectedSmartfilterOptions
61
+ tagNames: r.tags,
62
+ isLimitedUse: r.isLimited,
63
+ metaproperties: r.selectedSmartfilterOptions
64
64
  }
65
65
  });
66
- o || s.setActiveFiltersState(d);
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
- }, [s.tags, i, a, t.page, s.selectedSmartfilterOptions]), l.tag === "Failure" || !l.value || r.tag === "Failure" || r.tag === "Loading" || !r.value || M)
76
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(se, {}) });
77
- const { tags: n, count: O } = l.value.searchAssets, { value: c } = r, $ = j ? /* @__PURE__ */ e(
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(q, { children: [
102
- c && c.filters.length > 0 && /* @__PURE__ */ e(_, { filterData: c }),
103
- n && n.nodes.length > 0 && /* @__PURE__ */ e(J, { tags: n.nodes, isLoading: y }),
104
- /* @__PURE__ */ e(K, { isLoading: y, count: O.assetType })
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(re, { children: w === "MultiSelect" && T && t.page === "assets" && $ })
106
+ /* @__PURE__ */ e(se, { children: w === "MultiSelect" && T && t.page === "assets" && $ })
107
107
  ] });
108
108
  }
109
- function se() {
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
- `, re = p.div`
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 s } from "./Thumbnail.js";
3
+ import { Thumbnail as p } from "./Thumbnail.js";
4
4
  import { token as o } from "./token.js";
5
- import { getExtension as n, getThumbnail as l } from "./utils2.js";
6
- import { useSelection as p } from "./SelectionContext.js";
7
- import { SelectedItemContainer as a } from "./SelectedItemContainer.js";
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 r = p();
10
- return /* @__PURE__ */ m(
11
- a,
12
- {
13
- title: e.name,
14
- onRemove: () => r.toggleAssets([e]),
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};