@bynder/compact-view 5.2.0 → 5.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (261) hide show
  1. package/ActiveFilter.js +0 -1
  2. package/ActiveFilters.js +0 -1
  3. package/AddMedia.js +21 -22
  4. package/Advanced.js +0 -1
  5. package/App.js +63 -59
  6. package/AssetCard.js +60 -52
  7. package/AssetCardMetaproperties.js +0 -1
  8. package/AssetFilter.js +0 -1
  9. package/AssetFilterContext.js +0 -1
  10. package/AssetItem.js +0 -1
  11. package/AssetList.js +44 -44
  12. package/AssetTypeItem.js +0 -1
  13. package/AssetsView.js +0 -1
  14. package/Autocomplete_new.js +64 -80
  15. package/ButtonAction.js +0 -1
  16. package/CardSkeleton.js +0 -1
  17. package/Checkbox.styles.js +0 -1
  18. package/Chip.js +0 -1
  19. package/CollectionCard.js +0 -1
  20. package/CollectionItem.js +0 -1
  21. package/CollectionList.js +0 -1
  22. package/CollectionView.js +0 -1
  23. package/CollectionsView.js +0 -1
  24. package/ConfigContext.js +0 -1
  25. package/ConnectButton.js +0 -1
  26. package/Container.js +0 -1
  27. package/ContextAction.js +28 -21
  28. package/Dat.js +0 -1
  29. package/DatDropdownItem.js +0 -1
  30. package/DesignSystemContext.js +0 -1
  31. package/DirectionSelect.js +0 -1
  32. package/DocumentIcon.js +0 -1
  33. package/DomainInput.js +0 -1
  34. package/DragSelect.js +66 -61
  35. package/Dropdown.js +0 -1
  36. package/DropdownContent.js +54 -39
  37. package/DropdownListItem.js +0 -1
  38. package/ErrorIcon.js +0 -1
  39. package/ErrorMessage.js +0 -1
  40. package/FieldSelect.js +0 -1
  41. package/FileSelector.js +123 -139
  42. package/Header.js +0 -1
  43. package/HorizontalScroll.js +0 -1
  44. package/InfiniteScroll.js +0 -1
  45. package/LeftArrow.js +0 -1
  46. package/LoginComponent.js +0 -1
  47. package/LoginContext.js +0 -1
  48. package/MetapropertyFilterContent.js +0 -1
  49. package/MetapropertyOption.js +0 -1
  50. package/Modal.js +0 -1
  51. package/NoResults.js +0 -1
  52. package/Oops.js +0 -1
  53. package/Option_new.js +0 -1
  54. package/RefreshingSpinner.js +0 -1
  55. package/ReportModal.js +0 -1
  56. package/RightArrow.js +0 -1
  57. package/RootElementContext.js +0 -1
  58. package/SearchInput.js +26 -22
  59. package/SelectedItemContainer.js +0 -1
  60. package/SelectedItems.js +0 -1
  61. package/SelectionContext.js +0 -1
  62. package/SelectionFooter.js +0 -1
  63. package/ShadowRoot.js +0 -1
  64. package/ShadowRootInternal.js +0 -1
  65. package/Shield.js +0 -1
  66. package/Skeleton.js +0 -1
  67. package/SmartFilterContent.js +0 -1
  68. package/SmartFilterSelect_new.js +0 -1
  69. package/Smartfilters_new.js +63 -57
  70. package/Spinner.js +0 -1
  71. package/StatefulAssetList.js +0 -1
  72. package/StoreInitializer.js +29 -0
  73. package/Styles.css.js +0 -1
  74. package/SwitchNLS.js +0 -1
  75. package/TagItem.js +0 -1
  76. package/Tags.js +0 -1
  77. package/Theming.js +0 -1
  78. package/Toolbar.js +0 -1
  79. package/Tooltip.js +0 -1
  80. package/ViewSwitch.js +0 -1
  81. package/api/types/getFilters_new.d.ts +8 -0
  82. package/asset.type.js +0 -1
  83. package/asyncDebounce.js +0 -1
  84. package/auth.js +0 -1
  85. package/autocomplete.js +0 -1
  86. package/base64Converter.js +0 -1
  87. package/chunk.js +0 -1
  88. package/class.js +0 -1
  89. package/combineFilters.js +0 -1
  90. package/combineMetaproperties.js +0 -1
  91. package/constants.js +0 -1
  92. package/createSelectors.js +0 -1
  93. package/crypto.js +0 -1
  94. package/filter/filters/smartfilters/Metaproperties/Autocomplete_new.d.ts +1 -1
  95. package/filter/filters/smartfilters/Metaproperties/Option_new.d.ts +3 -3
  96. package/filterAssets.js +0 -1
  97. package/getAsset.js +0 -1
  98. package/getAssetCounts.js +0 -1
  99. package/getAssets.js +0 -1
  100. package/getCollections.js +0 -1
  101. package/getFilterOptions.js +0 -1
  102. package/getFilters.js +0 -1
  103. package/getFilters_new.js +0 -1
  104. package/getLimitedUseThumbnails.js +0 -1
  105. package/getSimilarityAssets.js +0 -1
  106. package/handlers.js +0 -1
  107. package/helpers.js +0 -1
  108. package/index.js +0 -1
  109. package/index2.js +0 -1
  110. package/index3.js +1 -2
  111. package/index4.js +0 -1
  112. package/logger.js +0 -1
  113. package/loginwindow.js +0 -1
  114. package/normalizeResponse.js +0 -1
  115. package/oauth2.js +0 -1
  116. package/package.json +1 -1
  117. package/result.type.js +0 -1
  118. package/store/StoreInitializer.d.ts +8 -0
  119. package/text.js +0 -1
  120. package/trimMetapropertyValue.js +0 -1
  121. package/url.js +0 -1
  122. package/useAccountDomain.js +0 -1
  123. package/useAuthInformation.js +0 -1
  124. package/useClickOutside.js +0 -1
  125. package/useDatStore.js +0 -1
  126. package/useDimensions.js +0 -1
  127. package/useOrderingStore.js +0 -1
  128. package/useRouterStore.js +0 -1
  129. package/useSearchStore.js +0 -1
  130. package/useSimilaritySearchStore.js +0 -1
  131. package/utils.js +0 -1
  132. package/utils2.js +0 -1
  133. package/views/asset/asset-card/AssetCard.d.ts +4 -2
  134. package/views/asset/asset-card/ContextAction.d.ts +3 -1
  135. package/ActiveFilter.js.map +0 -1
  136. package/ActiveFilters.js.map +0 -1
  137. package/AddMedia.js.map +0 -1
  138. package/Advanced.js.map +0 -1
  139. package/App.js.map +0 -1
  140. package/AssetCard.js.map +0 -1
  141. package/AssetCardMetaproperties.js.map +0 -1
  142. package/AssetFilter.js.map +0 -1
  143. package/AssetFilterContext.js.map +0 -1
  144. package/AssetItem.js.map +0 -1
  145. package/AssetList.js.map +0 -1
  146. package/AssetTypeItem.js.map +0 -1
  147. package/AssetsView.js.map +0 -1
  148. package/Autocomplete_new.js.map +0 -1
  149. package/ButtonAction.js.map +0 -1
  150. package/CardSkeleton.js.map +0 -1
  151. package/Checkbox.styles.js.map +0 -1
  152. package/Chip.js.map +0 -1
  153. package/CollectionCard.js.map +0 -1
  154. package/CollectionItem.js.map +0 -1
  155. package/CollectionList.js.map +0 -1
  156. package/CollectionView.js.map +0 -1
  157. package/CollectionsView.js.map +0 -1
  158. package/ConfigContext.js.map +0 -1
  159. package/ConnectButton.js.map +0 -1
  160. package/Container.js.map +0 -1
  161. package/ContextAction.js.map +0 -1
  162. package/Dat.js.map +0 -1
  163. package/DatDropdownItem.js.map +0 -1
  164. package/DesignSystemContext.js.map +0 -1
  165. package/DirectionSelect.js.map +0 -1
  166. package/DocumentIcon.js.map +0 -1
  167. package/DomainInput.js.map +0 -1
  168. package/DragSelect.js.map +0 -1
  169. package/Dropdown.js.map +0 -1
  170. package/DropdownContent.js.map +0 -1
  171. package/DropdownListItem.js.map +0 -1
  172. package/ErrorIcon.js.map +0 -1
  173. package/ErrorMessage.js.map +0 -1
  174. package/FieldSelect.js.map +0 -1
  175. package/FileSelector.js.map +0 -1
  176. package/Header.js.map +0 -1
  177. package/HorizontalScroll.js.map +0 -1
  178. package/InfiniteScroll.js.map +0 -1
  179. package/LeftArrow.js.map +0 -1
  180. package/LoginComponent.js.map +0 -1
  181. package/LoginContext.js.map +0 -1
  182. package/MetapropertyFilterContent.js.map +0 -1
  183. package/MetapropertyOption.js.map +0 -1
  184. package/Modal.js.map +0 -1
  185. package/NoResults.js.map +0 -1
  186. package/Oops.js.map +0 -1
  187. package/Option_new.js.map +0 -1
  188. package/RefreshingSpinner.js.map +0 -1
  189. package/ReportModal.js.map +0 -1
  190. package/RightArrow.js.map +0 -1
  191. package/RootElementContext.js.map +0 -1
  192. package/SearchInput.js.map +0 -1
  193. package/SelectedItemContainer.js.map +0 -1
  194. package/SelectedItems.js.map +0 -1
  195. package/SelectionContext.js.map +0 -1
  196. package/SelectionFooter.js.map +0 -1
  197. package/ShadowRoot.js.map +0 -1
  198. package/ShadowRootInternal.js.map +0 -1
  199. package/Shield.js.map +0 -1
  200. package/Skeleton.js.map +0 -1
  201. package/SmartFilterContent.js.map +0 -1
  202. package/SmartFilterSelect_new.js.map +0 -1
  203. package/Smartfilters_new.js.map +0 -1
  204. package/Spinner.js.map +0 -1
  205. package/StatefulAssetList.js.map +0 -1
  206. package/Styles.css.js.map +0 -1
  207. package/SwitchNLS.js.map +0 -1
  208. package/TagItem.js.map +0 -1
  209. package/Tags.js.map +0 -1
  210. package/Theming.js.map +0 -1
  211. package/Toolbar.js.map +0 -1
  212. package/Tooltip.js.map +0 -1
  213. package/ViewSwitch.js.map +0 -1
  214. package/asset.type.js.map +0 -1
  215. package/asyncDebounce.js.map +0 -1
  216. package/auth.js.map +0 -1
  217. package/autocomplete.js.map +0 -1
  218. package/base64Converter.js.map +0 -1
  219. package/chunk.js.map +0 -1
  220. package/class.js.map +0 -1
  221. package/combineFilters.js.map +0 -1
  222. package/combineMetaproperties.js.map +0 -1
  223. package/constants.js.map +0 -1
  224. package/createSelectors.js.map +0 -1
  225. package/crypto.js.map +0 -1
  226. package/filterAssets.js.map +0 -1
  227. package/getAsset.js.map +0 -1
  228. package/getAssetCounts.js.map +0 -1
  229. package/getAssets.js.map +0 -1
  230. package/getCollections.js.map +0 -1
  231. package/getFilterOptions.js.map +0 -1
  232. package/getFilters.js.map +0 -1
  233. package/getFilters_new.js.map +0 -1
  234. package/getLimitedUseThumbnails.js.map +0 -1
  235. package/getSimilarityAssets.js.map +0 -1
  236. package/handlers.js.map +0 -1
  237. package/helpers.js.map +0 -1
  238. package/index.js.map +0 -1
  239. package/index2.js.map +0 -1
  240. package/index3.js.map +0 -1
  241. package/index4.js.map +0 -1
  242. package/logger.js.map +0 -1
  243. package/loginwindow.js.map +0 -1
  244. package/normalizeResponse.js.map +0 -1
  245. package/oauth2.js.map +0 -1
  246. package/result.type.js.map +0 -1
  247. package/router/RouterContext.d.ts +0 -19
  248. package/text.js.map +0 -1
  249. package/trimMetapropertyValue.js.map +0 -1
  250. package/url.js.map +0 -1
  251. package/useAccountDomain.js.map +0 -1
  252. package/useAuthInformation.js.map +0 -1
  253. package/useClickOutside.js.map +0 -1
  254. package/useDatStore.js.map +0 -1
  255. package/useDimensions.js.map +0 -1
  256. package/useOrderingStore.js.map +0 -1
  257. package/useRouterStore.js.map +0 -1
  258. package/useSearchStore.js.map +0 -1
  259. package/useSimilaritySearchStore.js.map +0 -1
  260. package/utils.js.map +0 -1
  261. package/utils2.js.map +0 -1
package/ActiveFilter.js CHANGED
@@ -30,4 +30,3 @@ const n = r(o)`
30
30
  export {
31
31
  l as ActiveFilter
32
32
  };
33
- //# sourceMappingURL=ActiveFilter.js.map
package/ActiveFilters.js CHANGED
@@ -78,4 +78,3 @@ const k = h.div`
78
78
  export {
79
79
  B as ActiveFilters
80
80
  };
81
- //# sourceMappingURL=ActiveFilters.js.map
package/AddMedia.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { jsxs as x, Fragment as L, jsx as c } from "react/jsx-runtime";
2
- import { useRef as C, useState as b, useEffect as A } from "react";
3
- import { Button as E } from "@bynder/design-system";
2
+ import { useRef as b, useState as C, useEffect as E } from "react";
3
+ import { Button as A } from "@bynder/design-system";
4
4
  import { useConfig as M } from "./ConfigContext.js";
5
5
  import { useAuth as O } from "./LoginContext.js";
6
6
  import { useSelection as T } from "./SelectionContext.js";
@@ -13,46 +13,46 @@ import { ButtonAction as B } from "./ButtonAction.js";
13
13
  import { convertAssetIdToBase64 as G } from "./base64Converter.js";
14
14
  import { useSimilaritySearchStore as p } from "./useSimilaritySearchStore.js";
15
15
  function tt(t) {
16
- const { assetFieldSelection: r, onSuccess: i, selectionMode: u, noCache: f } = M(), {
17
- isSelected: d,
18
- NLSSearchText: h,
19
- isNLSSelected: g
20
- } = p(), { preselectedAssetIds: F } = T(), m = O(), l = C(!0), [s, a] = b(
16
+ const { assetFieldSelection: r, onSuccess: i, selectionMode: u, noCache: d } = M(), {
17
+ isSelected: f,
18
+ NLSSearchText: m,
19
+ isNLSSelected: S
20
+ } = p(), { preselectedAssetIds: y } = T(), h = O(), l = b(!0), [s, a] = C(
21
21
  u === "SingleSelectFile" ? { status: "WaitingForFileSelection" } : { status: "Ready" }
22
22
  );
23
- function y(e) {
23
+ function F(e) {
24
24
  a(e === void 0 ? { status: "WaitingForFileSelection" } : { status: "ReadyWithFile", file: e });
25
25
  }
26
- A(() => () => {
26
+ E(() => () => {
27
27
  l.current = !1;
28
28
  }, []);
29
29
  function v() {
30
30
  const e = s.status === "ReadyWithFile" ? s.file : void 0;
31
31
  a({ status: "Loading" }), u !== "MultiSelect" && t.selection[0]?.type === "asset" ? D({
32
- assetId: d || h && g ? G(t.selection[0].value.id) : t.selection[0].value.id,
33
- auth: m,
32
+ assetId: f || m && S ? G(t.selection[0].value.id) : t.selection[0].value.id,
33
+ auth: h,
34
34
  assetFieldSelection: r,
35
- noCache: f
35
+ noCache: d
36
36
  }).then((n) => {
37
- S(n, e);
37
+ g(n, e);
38
38
  }) : N({
39
39
  selectedItems: t.selection,
40
- auth: m,
40
+ auth: h,
41
41
  assetFieldSelection: r,
42
- noCache: f,
43
- isSimilaritySearchEnabled: d
42
+ noCache: d,
43
+ isSimilaritySearchEnabled: f || !!m && S
44
44
  }).then((n) => {
45
- S(n, e);
45
+ g(n, e);
46
46
  });
47
47
  }
48
- function S(e, n) {
48
+ function g(e, n) {
49
49
  if (k(e)) {
50
50
  a({ status: "Error" });
51
51
  return;
52
52
  }
53
53
  try {
54
54
  const o = Array.isArray(e.value) ? e.value : [e.value];
55
- o.sort((R, W) => w(R, W, F)), i(o, { selectedFile: n });
55
+ o.sort((R, W) => w(R, W, y)), i(o, { selectedFile: n });
56
56
  } catch (o) {
57
57
  q.error(o);
58
58
  }
@@ -61,9 +61,9 @@ function tt(t) {
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: y }),
64
+ u === "SingleSelectFile" && t.selection[0]?.type === "asset" && /* @__PURE__ */ c(j, { asset: t.selection[0].value, onChange: F }),
65
65
  /* @__PURE__ */ c(
66
- E,
66
+ A,
67
67
  {
68
68
  variant: "primary",
69
69
  isDisabled: s.status === "Loading" || s.status === "WaitingForFileSelection",
@@ -87,4 +87,3 @@ function w(t, r, i) {
87
87
  export {
88
88
  tt as AddMedia
89
89
  };
90
- //# sourceMappingURL=AddMedia.js.map
package/Advanced.js CHANGED
@@ -63,4 +63,3 @@ const A = o(p)``, $ = o.h1`
63
63
  export {
64
64
  O as Advanced
65
65
  };
66
- //# sourceMappingURL=Advanced.js.map
package/App.js CHANGED
@@ -1,93 +1,97 @@
1
- import { jsx as e, jsxs as s, Fragment as F } from "react/jsx-runtime";
2
- import { useEffect as V } from "react";
3
- import { BrowserClient as D, makeFetchTransport as E, defaultStackParser as I, Hub as T } from "@sentry/browser";
4
- import { CollectionsView as k } from "./CollectionsView.js";
5
- import { CollectionView as y } from "./CollectionView.js";
6
- import { ConfigProvider as M, useConfig as O } from "./ConfigContext.js";
7
- import { AssetFilter as R } from "./AssetFilter.js";
8
- import { useLocalization as U } from "./index2.js";
9
- import { ShadowRoot as x } from "./ShadowRoot.js";
10
- import { AssetFilterProvider as j } from "./AssetFilterContext.js";
11
- import { SelectionProvider as H } from "./SelectionContext.js";
12
- import { ThemeStyles as N } from "./Theming.js";
1
+ import { jsx as e, jsxs as n, Fragment as b } from "react/jsx-runtime";
2
+ import { BrowserClient as F, makeFetchTransport as I, defaultStackParser as T, Hub as V } from "@sentry/browser";
3
+ import { CollectionsView as D } from "./CollectionsView.js";
4
+ import { CollectionView as O } from "./CollectionView.js";
5
+ import { ConfigProvider as k, useConfig as y } from "./ConfigContext.js";
6
+ import { AssetFilter as E } from "./AssetFilter.js";
7
+ import { useLocalization as M } from "./index2.js";
8
+ import { ShadowRoot as R } from "./ShadowRoot.js";
9
+ import { AssetFilterProvider as U } from "./AssetFilterContext.js";
10
+ import { SelectionProvider as x } from "./SelectionContext.js";
11
+ import { ThemeStyles as j } from "./Theming.js";
13
12
  import { Toolbar as z } from "./Toolbar.js";
14
- import { AssetsView as B } from "./AssetsView.js";
15
- import { SelectionFooter as G } from "./SelectionFooter.js";
16
- import { Shield as L } from "./Shield.js";
17
- import { Dat as _ } from "./Dat.js";
13
+ import { AssetsView as H } from "./AssetsView.js";
14
+ import { SelectionFooter as N } from "./SelectionFooter.js";
15
+ import { Shield as B } from "./Shield.js";
16
+ import { Dat as G } from "./Dat.js";
18
17
  import "./DatDropdownItem.js";
19
- import { useRouterSelectors as q } from "./useRouterStore.js";
20
- import { useSearchStore as J, useClearCollectionOnPageChange as K } from "./useSearchStore.js";
21
- import { useDat as Q } from "./useDatStore.js";
22
- let n;
23
- n = new D({
18
+ import { useRouterSelectors as L } from "./useRouterStore.js";
19
+ import { useClearCollectionOnPageChange as _ } from "./useSearchStore.js";
20
+ import { useDat as q } from "./useDatStore.js";
21
+ import { StoreInitializer as J } from "./StoreInitializer.js";
22
+ let s;
23
+ s = new F({
24
24
  dsn: "https://dd74b64cc05845468f0c3654b458da29@sentry10.bynder.cloud/464",
25
25
  autoSessionTracking: !0,
26
26
  tracesSampleRate: 1,
27
27
  integrations: [],
28
- stackParser: I,
29
- transport: E
30
- }), new T(n);
31
- function Se({
28
+ stackParser: T,
29
+ transport: I
30
+ }), new V(s);
31
+ function he({
32
32
  assetFieldSelection: o,
33
33
  assetFilter: r,
34
- assetTypes: a = ["IMAGE", "AUDIO", "VIDEO", "DOCUMENT", "ARCHIVE"],
35
- defaultSearchTerm: l,
36
- language: c = "en_US",
34
+ assetTypes: m = ["IMAGE", "AUDIO", "VIDEO", "DOCUMENT", "ARCHIVE"],
35
+ defaultSearchTerm: a,
36
+ language: l = "en_US",
37
37
  mode: p = "MultiSelect",
38
38
  // eslint-disable-next-line no-console
39
- onSuccess: f = (t, { selectedFile: i }) => console.log(t, i),
39
+ onSuccess: f = (i, { selectedFile: t }) => console.log(i, t),
40
40
  defaultImageDerivativeName: d,
41
41
  defaultVideoDerivativeName: u,
42
42
  theme: h,
43
43
  hideExternalAccess: g,
44
44
  selectedAssets: S,
45
45
  hideLimitedUse: C,
46
- isContainerMode: w = !1,
47
- __shouldAddOriginal__: v,
48
- hideSwitch: A = !1,
49
- noCache: P = !1,
50
- selectAllOption: b = !1
46
+ isContainerMode: c = !1,
47
+ __shouldAddOriginal__: w,
48
+ hideSwitch: v = !1,
49
+ noCache: A = !1,
50
+ selectAllOption: P = !1
51
51
  }) {
52
- U(c);
53
- const { setSearch: t } = J(), { datUrl: i } = Q(), m = {
52
+ M(l);
53
+ const { datUrl: i } = q(), t = {
54
54
  assetFieldSelection: o,
55
55
  assetFilter: r,
56
- assetTypes: a,
57
- language: c,
56
+ assetTypes: m,
57
+ language: l,
58
58
  onSuccess: f,
59
59
  defaultImageDerivativeName: d,
60
60
  defaultVideoDerivativeName: u,
61
61
  selectionMode: p,
62
62
  theme: h,
63
63
  hideExternalAccess: g,
64
- __shouldAddOriginal__: v,
65
- hideSwitch: A,
66
- noCache: P,
67
- selectAllOption: b
64
+ __shouldAddOriginal__: w,
65
+ hideSwitch: v,
66
+ noCache: A,
67
+ selectAllOption: P
68
68
  };
69
- return V(() => {
70
- t("assets", l ?? "");
71
- }, [l, t]), /* @__PURE__ */ e(L, { sentryClient: n, children: /* @__PURE__ */ e(x, { isContainerMode: w, children: /* @__PURE__ */ e(j, { hideLimitedUse: C, predefinedFilter: r, children: /* @__PURE__ */ e(M, { value: m, children: /* @__PURE__ */ s(H, { preselectedAssetIds: S ?? [], children: [
72
- /* @__PURE__ */ e(N, { theme: m.theme }),
73
- /* @__PURE__ */ s("div", { className: "cv-root cv-container", children: [
69
+ return /* @__PURE__ */ e(B, { sentryClient: s, children: /* @__PURE__ */ e(R, { isContainerMode: c, children: /* @__PURE__ */ e(U, { hideLimitedUse: C, predefinedFilter: r, children: /* @__PURE__ */ e(k, { value: t, children: /* @__PURE__ */ n(x, { preselectedAssetIds: S ?? [], children: [
70
+ /* @__PURE__ */ e(
71
+ J,
72
+ {
73
+ defaultSearchTerm: a,
74
+ resetOnMount: !c
75
+ }
76
+ ),
77
+ /* @__PURE__ */ e(j, { theme: t.theme }),
78
+ /* @__PURE__ */ n("div", { className: "cv-root cv-container", children: [
74
79
  /* @__PURE__ */ e(z, {}),
75
- /* @__PURE__ */ e(W, {}),
76
- /* @__PURE__ */ e(G, {}),
77
- i && /* @__PURE__ */ e(_, {})
80
+ /* @__PURE__ */ e(K, {}),
81
+ /* @__PURE__ */ e(N, {}),
82
+ i && /* @__PURE__ */ e(G, {})
78
83
  ] })
79
84
  ] }) }) }) }) });
80
85
  }
81
- function W() {
82
- const o = q.use.page(), { assetFilter: r } = O();
83
- return K(o), /* @__PURE__ */ s(F, { children: [
84
- o.page !== "collections" && (r === void 0 || r && r.showToolbar) && /* @__PURE__ */ e(R, {}),
85
- o.page === "assets" && /* @__PURE__ */ e(B, {}),
86
- o.page === "collections" && /* @__PURE__ */ e(k, {}),
87
- o.page === "collection" && /* @__PURE__ */ e(y, { collection: o.collection })
86
+ function K() {
87
+ const o = L.use.page(), { assetFilter: r } = y();
88
+ return _(o), /* @__PURE__ */ n(b, { children: [
89
+ o.page !== "collections" && (r === void 0 || r && r.showToolbar) && /* @__PURE__ */ e(E, {}),
90
+ o.page === "assets" && /* @__PURE__ */ e(H, {}),
91
+ o.page === "collections" && /* @__PURE__ */ e(D, {}),
92
+ o.page === "collection" && /* @__PURE__ */ e(O, { collection: o.collection })
88
93
  ] });
89
94
  }
90
95
  export {
91
- Se as App
96
+ he as App
92
97
  };
93
- //# sourceMappingURL=App.js.map
package/AssetCard.js CHANGED
@@ -1,76 +1,79 @@
1
- import { jsx as i, jsxs as f } from "react/jsx-runtime";
2
- import { useState as g, useEffect as x } from "react";
1
+ import { jsx as i, jsxs as g } from "react/jsx-runtime";
2
+ import { useState as x, useEffect as w } from "react";
3
3
  import s from "styled-components";
4
- import { token as r, Card as l, Badge as w, TruncatedText as P } from "@bynder/design-system";
5
- import { useConfig as U } from "./ConfigContext.js";
6
- import { getStatusText as V, getExtension as W, getThumbnail as b } from "./utils.js";
4
+ import { token as o, Card as l, Badge as $, TruncatedText as U } from "@bynder/design-system";
5
+ import { useConfig as V } from "./ConfigContext.js";
6
+ import { getStatusText as W, getExtension as _, getThumbnail as b } from "./utils.js";
7
7
  import { __ as d } from "./index2.js";
8
- import { ContextAction as _ } from "./ContextAction.js";
9
- import { AssetCardMetaproperties as z } from "./AssetCardMetaproperties.js";
10
- import { useDat as L } from "./useDatStore.js";
11
- function Z({
8
+ import { ContextAction as z } from "./ContextAction.js";
9
+ import { AssetCardMetaproperties as L } from "./AssetCardMetaproperties.js";
10
+ import { useDat as j } from "./useDatStore.js";
11
+ function tt({
12
12
  className: e,
13
+ dragState: p,
13
14
  fadeIn: y = !0,
14
15
  asset: t,
15
16
  isSelected: n,
16
17
  isOutlined: C,
17
- onClick: p,
18
- children: $ = null,
19
- isSilimilaritySearchEnabled: v = !1,
18
+ onClick: c,
19
+ children: v = null,
20
+ isSimilaritySearchEnabled: S = !1,
20
21
  onSimilaritySearch: T
21
22
  }) {
22
- const [B, S] = g(), [I, k] = g(), { openDat: A, setTransformation: M } = L(), { theme: m } = U(), c = V(t), h = W(t);
23
- x(() => {
24
- const o = t.metaproperties?.nodes.filter(
23
+ const [B, I] = x(), [k, A] = x(), { openDat: M, setTransformation: D } = j(), { theme: m } = V(), h = W(t), u = _(t);
24
+ w(() => {
25
+ const r = t.metaproperties?.nodes.filter(
25
26
  (a) => a.showInGridView || a.showInListView
26
27
  );
27
- S(o);
28
- }, [t.metaproperties]), x(() => {
29
- const o = t.textMetaproperties?.filter(
28
+ I(r);
29
+ }, [t.metaproperties]), w(() => {
30
+ const r = t.textMetaproperties?.filter(
30
31
  (a) => a.showInGridView || a.showInListView
31
32
  );
32
- k(o);
33
+ A(r);
33
34
  }, [t.textMetaproperties]);
34
- const u = (o) => {
35
- p !== void 0 && (o.stopPropagation(), M(), p(t, o));
36
- }, D = (o) => {
37
- o.stopPropagation(), T([t.databaseId ? t.databaseId : t.id]);
35
+ const f = (r) => {
36
+ c !== void 0 && (r.stopPropagation(), D(), c(t, r));
37
+ }, P = (r) => {
38
+ r.stopPropagation(), T([t.databaseId ? t.databaseId : t.id]);
38
39
  };
39
40
  return /* @__PURE__ */ i(
40
- j,
41
+ E,
41
42
  {
42
43
  id: t.id,
44
+ $dragState: p,
43
45
  $theme: m,
44
46
  $isOutlined: (n || C) && m?.colorPrimary !== void 0,
45
47
  $fadeIn: y,
46
48
  className: e,
47
49
  "data-drag-select-id": t.id,
48
- children: /* @__PURE__ */ f(
50
+ children: /* @__PURE__ */ g(
49
51
  l,
50
52
  {
51
53
  contextAction: /* @__PURE__ */ i(
52
- _,
54
+ z,
53
55
  {
56
+ dragState: p,
54
57
  transformBaseUrl: t.files?.transformBaseUrl?.url,
55
58
  portalUrl: t.url,
56
59
  onOpenDAT: () => {
57
- A(t.files?.transformBaseUrl?.url, t, t.name);
60
+ M(t.files?.transformBaseUrl?.url, t, t.name);
58
61
  }
59
62
  }
60
63
  ),
61
64
  selectButtonAriaLabel: n ? d("Deselect") : d("Select"),
62
- onSelect: u,
63
- onClick: u,
65
+ onSelect: f,
66
+ onClick: f,
64
67
  isSelected: n,
65
68
  "aria-selected": n,
66
69
  "data-testid": "asset-card",
67
70
  children: [
68
- /* @__PURE__ */ f(
71
+ /* @__PURE__ */ g(
69
72
  l.Frame,
70
73
  {
71
- icon: c ? /* @__PURE__ */ i(E, { $limitWidth: !!h, children: /* @__PURE__ */ i(w, { color: "black-alpha", "data-testid": "asset-tag", children: /* @__PURE__ */ i(P, { children: c }) }) }) : void 0,
74
+ icon: h ? /* @__PURE__ */ i(G, { $limitWidth: !!u, children: /* @__PURE__ */ i($, { color: "black-alpha", "data-testid": "asset-tag", children: /* @__PURE__ */ i(U, { children: h }) }) }) : void 0,
72
75
  "data-testid": "asset-type",
73
- badge: h,
76
+ badge: u,
74
77
  children: [
75
78
  /* @__PURE__ */ i(l.Images, { children: b(t) && /* @__PURE__ */ i(
76
79
  l.Img,
@@ -80,27 +83,27 @@ function Z({
80
83
  contentResize: "fit"
81
84
  }
82
85
  ) }),
83
- v && t.__typename === "Image" && /* @__PURE__ */ i(
84
- H,
86
+ S && t.__typename === "Image" && /* @__PURE__ */ i(
87
+ N,
85
88
  {
86
- onClick: D,
89
+ onClick: P,
87
90
  "data-testid": "similarity-search-indicator",
88
91
  type: "button",
89
92
  "aria-label": "similarity-search-button",
90
93
  className: "showSimilarButton",
91
- children: /* @__PURE__ */ i(w, { isSmall: !0, children: d("Show similar") })
94
+ children: /* @__PURE__ */ i($, { isSmall: !0, children: d("Show similar") })
92
95
  }
93
96
  )
94
97
  ]
95
98
  }
96
99
  ),
97
- $,
98
- /* @__PURE__ */ i(G, { "data-testid": "asset-name", children: t.name }),
100
+ v,
101
+ /* @__PURE__ */ i(H, { "data-testid": "asset-name", children: t.name }),
99
102
  /* @__PURE__ */ i(
100
- z,
103
+ L,
101
104
  {
102
105
  metaproperties: B,
103
- textMetaproperties: I
106
+ textMetaproperties: k
104
107
  }
105
108
  )
106
109
  ]
@@ -109,8 +112,8 @@ function Z({
109
112
  }
110
113
  );
111
114
  }
112
- const j = s.div`
113
- margin: ${r.spacing3};
115
+ const E = s.div`
116
+ margin: ${o.spacing3};
114
117
  width: 224px;
115
118
  align-self: flex-start;
116
119
  position: relative;
@@ -125,20 +128,26 @@ const j = s.div`
125
128
  }
126
129
 
127
130
  &:hover .showSimilarButton {
131
+ ${(e) => e.$dragState !== "select" && `
128
132
  display: block;
133
+ `}
129
134
  }
130
- `, E = s.div`
135
+
136
+ [data-testid='asset-card']:hover {
137
+ ${(e) => e.$dragState === "select" && "--card-frame-overlay-color: transparent;"}
138
+ }
139
+ `, G = s.div`
131
140
  ${(e) => e.$limitWidth && "max-width: 142px;"}
132
- margin-top: ${r.spacing2};
133
- `, G = s.p`
141
+ margin-top: ${o.spacing2};
142
+ `, H = s.p`
134
143
  width: auto;
135
144
  max-width: 100%;
136
145
  height: auto;
137
146
  line-height: 20px;
138
147
  min-height: 20px;
139
148
  max-height: 20px;
140
- padding: 0 ${r.spacing5};
141
- margin: ${r.spacing3} 0;
149
+ padding: 0 ${o.spacing5};
150
+ margin: ${o.spacing3} 0;
142
151
  transition: all 200ms ease;
143
152
  overflow: hidden;
144
153
  text-overflow: ellipsis;
@@ -150,7 +159,7 @@ const j = s.div`
150
159
  word-break: break-all;
151
160
  white-space: normal;
152
161
  }
153
- `, H = s.button`
162
+ `, N = s.button`
154
163
  background: none;
155
164
  border: none;
156
165
  padding: 0;
@@ -162,11 +171,10 @@ const j = s.div`
162
171
  text-align: inherit;
163
172
 
164
173
  position: absolute;
165
- bottom: ${r.spacing4};
166
- left: ${r.spacing4};
174
+ bottom: ${o.spacing4};
175
+ left: ${o.spacing4};
167
176
  z-index: 1;
168
177
  `;
169
178
  export {
170
- Z as AssetCard
179
+ tt as AssetCard
171
180
  };
172
- //# sourceMappingURL=AssetCard.js.map
@@ -44,4 +44,3 @@ const b = ({ metaproperties: p, textMetaproperties: d }) => {
44
44
  export {
45
45
  b as AssetCardMetaproperties
46
46
  };
47
- //# sourceMappingURL=AssetCardMetaproperties.js.map
package/AssetFilter.js CHANGED
@@ -135,4 +135,3 @@ const k = p.nav`
135
135
  export {
136
136
  Te as AssetFilter
137
137
  };
138
- //# sourceMappingURL=AssetFilter.js.map
@@ -159,4 +159,3 @@ export {
159
159
  U as AssetFilterProvider,
160
160
  F as useAssetFilter
161
161
  };
162
- //# sourceMappingURL=AssetFilterContext.js.map
package/AssetItem.js CHANGED
@@ -37,4 +37,3 @@ const c = i.div`
37
37
  export {
38
38
  A as AssetItem
39
39
  };
40
- //# sourceMappingURL=AssetItem.js.map