@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/AssetList.js CHANGED
@@ -6,9 +6,9 @@ import { CardSkeleton as V } from "./CardSkeleton.js";
6
6
  import { DragSelect as X } from "./DragSelect.js";
7
7
  import { useDimensions as Y } from "./useDimensions.js";
8
8
  import { InfiniteScroll as Z } from "./InfiniteScroll.js";
9
- import { useSelection as $ } from "./SelectionContext.js";
10
- import { useSimilaritySearchStore as T } from "./useSimilaritySearchStore.js";
11
- import { useSimilarityAssets as ee } from "./getSimilarityAssets.js";
9
+ import { useSimilaritySearchStore as $ } from "./useSimilaritySearchStore.js";
10
+ import { useSimilarityAssets as T } from "./getSimilarityAssets.js";
11
+ import { useSelectionStore as ee } from "./useSelectionStore.js";
12
12
  function he({
13
13
  assets: e,
14
14
  count: l,
@@ -26,11 +26,11 @@ function he({
26
26
  theme: S,
27
27
  children: B = null
28
28
  }) {
29
- const x = P(null), { dimensions: M } = Y(x.current), [f, v] = k([]), [D, b] = k("inactive"), { clear: R } = $(), {
29
+ const x = P(null), { dimensions: M } = Y(x.current), [f, v] = k([]), [D, b] = k("inactive"), { clear: R } = ee(), {
30
30
  setIsEnabled: C,
31
31
  isEnabled: H,
32
32
  setIsSelected: W
33
- } = T(), { resetData: j, search: p } = ee(), [A, E] = te(l, M), L = P(!1);
33
+ } = $(), { resetData: j, search: p } = T(), [A, E] = te(l, M), L = P(!1);
34
34
  J(() => {
35
35
  !L.current && e.value && e.value.length > 0 && (L.current = !0, (async () => {
36
36
  if (e.value && e.value.length > 0) {
package/AssetTypeItem.js CHANGED
@@ -1,34 +1,34 @@
1
- import { jsx as t, jsxs as d } from "react/jsx-runtime";
2
- import r from "./styled-components.browser.esm.js";
3
- import { Checkbox as a } from "./Checkbox.js";
4
- import { token as m } from "./token.js";
5
- import { useAssetFilter as l } from "./AssetFilterContext.js";
6
- import { getAssetTypeIcon as f, assetTypeToString as s } from "./asset.type.js";
7
- import { ListItem as y, StyledCheckboxWrapper as h, Content as p } from "./Checkbox.styles.js";
8
- function I(e) {
9
- const n = l(), i = n.assetTypes.includes(e.type);
10
- function o() {
11
- i ? n.removeAssetType(e.type) : n.addAssetType(e.type);
1
+ import { jsx as t, jsxs as r } from "react/jsx-runtime";
2
+ import m from "./styled-components.browser.esm.js";
3
+ import { Checkbox as l } from "./Checkbox.js";
4
+ import { token as y } from "./token.js";
5
+ import { getAssetTypeIcon as p, assetTypeToString as s } from "./asset.type.js";
6
+ import { ListItem as f, StyledCheckboxWrapper as h, Content as g } from "./Checkbox.styles.js";
7
+ import { useAssetFilterStore as C } from "./useAssetFilterStore.js";
8
+ function L(e) {
9
+ const { assetTypes: n, addAssetType: o, removeAssetType: d } = C(), i = n.includes(e.type);
10
+ function a() {
11
+ i ? d(e.type) : o(e.type);
12
12
  }
13
- const c = f(e.type);
14
- return /* @__PURE__ */ t(y, { "data-testid": "advanced-options", children: /* @__PURE__ */ t(h, { $isChecked: i, $isLoading: e.isLoading, children: /* @__PURE__ */ t(
15
- a,
13
+ const c = p(e.type);
14
+ return /* @__PURE__ */ t(f, { "data-testid": "advanced-options", children: /* @__PURE__ */ t(h, { $isChecked: i, $isLoading: e.isLoading, children: /* @__PURE__ */ t(
15
+ l,
16
16
  {
17
17
  isChecked: i,
18
- onChange: o,
18
+ onChange: a,
19
19
  "data-testid": `${s(e.type)}-filter`,
20
- children: /* @__PURE__ */ d(p, { $isChecked: i, children: [
20
+ children: /* @__PURE__ */ r(g, { $isChecked: i, children: [
21
21
  /* @__PURE__ */ t(c, {}),
22
- /* @__PURE__ */ t(g, { children: s(e.type) }),
23
- /* @__PURE__ */ t("span", { className: "fade-in-down", children: e.count })
22
+ /* @__PURE__ */ t(k, { "data-testid": "asset-type-label", children: s(e.type) }),
23
+ /* @__PURE__ */ t("span", { className: "fade-in-down", "data-testid": "asset-type-count", children: e.count })
24
24
  ] })
25
25
  }
26
26
  ) }) });
27
27
  }
28
- const g = r.div`
29
- margin: 1px ${m.spacing3};
28
+ const k = m.div`
29
+ margin: 1px ${y.spacing3};
30
30
  flex-grow: 1;
31
31
  `;
32
32
  export {
33
- I as AssetTypeItem
33
+ L as AssetTypeItem
34
34
  };
package/AssetsView.js CHANGED
@@ -2,44 +2,44 @@ import { jsx as h } from "react/jsx-runtime";
2
2
  import { useMemo as y } from "react";
3
3
  import { useFilterAssets as A } from "./filterAssets.js";
4
4
  import { useConfig as g } from "./ConfigContext.js";
5
- import { useAssetFilter as T } from "./AssetFilterContext.js";
6
- import { useOrderingSelectors as F } from "./useOrderingStore.js";
7
- import { StatefulAssetList as b } from "./StatefulAssetList.js";
8
- import { useSearchStateByPage as v } from "./useSearchStore.js";
9
- import { useSimilaritySearchStore as w } from "./useSimilaritySearchStore.js";
10
- import { useSimilarityAssets as B } from "./getSimilarityAssets.js";
5
+ import { useOrderingSelectors as T } from "./useOrderingStore.js";
6
+ import { StatefulAssetList as F } from "./StatefulAssetList.js";
7
+ import { useSearchStateByPage as b } from "./useSearchStore.js";
8
+ import { useSimilaritySearchStore as v } from "./useSimilaritySearchStore.js";
9
+ import { useSimilarityAssets as w } from "./getSimilarityAssets.js";
10
+ import { useAssetFilterStore as B } from "./useAssetFilterStore.js";
11
11
  function k() {
12
- const { assetTypes: s, tags: t, isLimited: r, selectedSmartfilterOptions: o } = T(), {
12
+ const { assetTypes: t, tags: r, isLimited: s, selectedSmartfilterOptions: o } = B(), {
13
13
  isSelected: l,
14
14
  isNLSSelected: m,
15
15
  NLSSearchText: f
16
- } = w(), { connection: S } = B(), { value: c } = v("assets"), i = F.use.assets(), {
16
+ } = v(), { connection: S } = w(), { value: c } = b("assets"), i = T.use.assets(), {
17
17
  assetFilter: e,
18
18
  assetTypes: a,
19
19
  language: n,
20
20
  noCache: u
21
21
  } = g(), d = y(() => e === void 0 ? {
22
- filter: { assetTypes: s, selectedSmartfilterOptions: o, tags: t, isLimited: r },
22
+ filter: { assetTypes: t, selectedSmartfilterOptions: o, tags: r, isLimited: s },
23
23
  searchTerm: c,
24
24
  orderBy: i,
25
25
  allAssetTypes: a,
26
26
  language: n
27
27
  } : e && e.showToolbar ? {
28
- filter: { assetTypes: s, selectedSmartfilterOptions: o, tags: t, isLimited: r },
28
+ filter: { assetTypes: t, selectedSmartfilterOptions: o, tags: r, isLimited: s },
29
29
  searchTerm: c,
30
30
  orderBy: i,
31
31
  predefinedFilter: e,
32
32
  allAssetTypes: a,
33
33
  language: n
34
34
  } : {
35
- filter: { assetTypes: s, selectedSmartfilterOptions: o, tags: t, isLimited: r },
35
+ filter: { assetTypes: t, selectedSmartfilterOptions: o, tags: r, isLimited: s },
36
36
  predefinedFilter: e,
37
37
  orderBy: i,
38
38
  language: n
39
39
  }, [
40
- s,
41
40
  t,
42
41
  r,
42
+ s,
43
43
  c,
44
44
  i,
45
45
  e,
@@ -48,7 +48,7 @@ function k() {
48
48
  o
49
49
  ]), p = A(d, u);
50
50
  return /* @__PURE__ */ h(
51
- b,
51
+ F,
52
52
  {
53
53
  connection: l || m && !!f ? S : p,
54
54
  showActiveFilters: e === void 0 || e && e.showToolbar
package/Axios2.js CHANGED
@@ -1,17 +1,18 @@
1
1
  import d from "./utils6.js";
2
- import U from "./buildURL.js";
3
- import q from "./InterceptorManager.js";
4
- import R from "./dispatchRequest.js";
2
+ import S from "./buildURL.js";
3
+ import E from "./InterceptorManager.js";
4
+ import I from "./dispatchRequest.js";
5
5
  import w from "./mergeConfig.js";
6
- import A from "./buildFullPath.js";
7
- import m from "./validator.js";
8
- import T from "./AxiosHeaders.js";
9
- const i = m.validators;
10
- class k {
6
+ import U from "./buildFullPath.js";
7
+ import y from "./validator.js";
8
+ import A from "./AxiosHeaders.js";
9
+ import T from "./transitional.js";
10
+ const l = y.validators;
11
+ class q {
11
12
  constructor(t) {
12
13
  this.defaults = t || {}, this.interceptors = {
13
- request: new q(),
14
- response: new q()
14
+ request: new E(),
15
+ response: new E()
15
16
  };
16
17
  }
17
18
  /**
@@ -25,112 +26,117 @@ class k {
25
26
  async request(t, e) {
26
27
  try {
27
28
  return await this._request(t, e);
28
- } catch (s) {
29
- if (s instanceof Error) {
30
- let l = {};
31
- Error.captureStackTrace ? Error.captureStackTrace(l) : l = new Error();
32
- const a = l.stack ? l.stack.replace(/^.+\n/, "") : "";
29
+ } catch (r) {
30
+ if (r instanceof Error) {
31
+ let n = {};
32
+ Error.captureStackTrace ? Error.captureStackTrace(n) : n = new Error();
33
+ const s = n.stack ? n.stack.replace(/^.+\n/, "") : "";
33
34
  try {
34
- s.stack ? a && !String(s.stack).endsWith(a.replace(/^.+\n.+\n/, "")) && (s.stack += `
35
- ` + a) : s.stack = a;
35
+ r.stack ? s && !String(r.stack).endsWith(s.replace(/^.+\n.+\n/, "")) && (r.stack += `
36
+ ` + s) : r.stack = s;
36
37
  } catch {
37
38
  }
38
39
  }
39
- throw s;
40
+ throw r;
40
41
  }
41
42
  }
42
43
  _request(t, e) {
43
44
  typeof t == "string" ? (e = e || {}, e.url = t) : e = t || {}, e = w(this.defaults, e);
44
- const { transitional: s, paramsSerializer: l, headers: a } = e;
45
- s !== void 0 && m.assertOptions(s, {
46
- silentJSONParsing: i.transitional(i.boolean),
47
- forcedJSONParsing: i.transitional(i.boolean),
48
- clarifyTimeoutError: i.transitional(i.boolean)
49
- }, !1), l != null && (d.isFunction(l) ? e.paramsSerializer = {
50
- serialize: l
51
- } : m.assertOptions(l, {
52
- encode: i.function,
53
- serialize: i.function
54
- }, !0)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), m.assertOptions(e, {
55
- baseUrl: i.spelling("baseURL"),
56
- withXsrfToken: i.spelling("withXSRFToken")
45
+ const { transitional: r, paramsSerializer: n, headers: s } = e;
46
+ r !== void 0 && y.assertOptions(r, {
47
+ silentJSONParsing: l.transitional(l.boolean),
48
+ forcedJSONParsing: l.transitional(l.boolean),
49
+ clarifyTimeoutError: l.transitional(l.boolean),
50
+ legacyInterceptorReqResOrdering: l.transitional(l.boolean)
51
+ }, !1), n != null && (d.isFunction(n) ? e.paramsSerializer = {
52
+ serialize: n
53
+ } : y.assertOptions(n, {
54
+ encode: l.function,
55
+ serialize: l.function
56
+ }, !0)), e.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? e.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : e.allowAbsoluteUrls = !0), y.assertOptions(e, {
57
+ baseUrl: l.spelling("baseURL"),
58
+ withXsrfToken: l.spelling("withXSRFToken")
57
59
  }, !0), e.method = (e.method || this.defaults.method || "get").toLowerCase();
58
- let f = a && d.merge(
59
- a.common,
60
- a[e.method]
60
+ let f = s && d.merge(
61
+ s.common,
62
+ s[e.method]
61
63
  );
62
- a && d.forEach(
64
+ s && d.forEach(
63
65
  ["delete", "get", "head", "post", "put", "patch", "common"],
64
- (r) => {
65
- delete a[r];
66
+ (a) => {
67
+ delete s[a];
66
68
  }
67
- ), e.headers = T.concat(f, a);
68
- const h = [];
69
- let y = !0;
70
- this.interceptors.request.forEach(function(n) {
71
- typeof n.runWhen == "function" && n.runWhen(e) === !1 || (y = y && n.synchronous, h.unshift(n.fulfilled, n.rejected));
69
+ ), e.headers = A.concat(f, s);
70
+ const u = [];
71
+ let b = !0;
72
+ this.interceptors.request.forEach(function(o) {
73
+ if (typeof o.runWhen == "function" && o.runWhen(e) === !1)
74
+ return;
75
+ b = b && o.synchronous;
76
+ const m = e.transitional || T;
77
+ m && m.legacyInterceptorReqResOrdering ? u.unshift(o.fulfilled, o.rejected) : u.push(o.fulfilled, o.rejected);
72
78
  });
73
- const c = [];
74
- this.interceptors.response.forEach(function(n) {
75
- c.push(n.fulfilled, n.rejected);
79
+ const p = [];
80
+ this.interceptors.response.forEach(function(o) {
81
+ p.push(o.fulfilled, o.rejected);
76
82
  });
77
- let u, o = 0, p;
78
- if (!y) {
79
- const r = [R.bind(this), void 0];
80
- for (r.unshift.apply(r, h), r.push.apply(r, c), p = r.length, u = Promise.resolve(e); o < p; )
81
- u = u.then(r[o++], r[o++]);
82
- return u;
83
+ let h, i = 0, c;
84
+ if (!b) {
85
+ const a = [I.bind(this), void 0];
86
+ for (a.unshift(...u), a.push(...p), c = a.length, h = Promise.resolve(e); i < c; )
87
+ h = h.then(a[i++], a[i++]);
88
+ return h;
83
89
  }
84
- p = h.length;
85
- let b = e;
86
- for (o = 0; o < p; ) {
87
- const r = h[o++], n = h[o++];
90
+ c = u.length;
91
+ let R = e;
92
+ for (; i < c; ) {
93
+ const a = u[i++], o = u[i++];
88
94
  try {
89
- b = r(b);
90
- } catch (S) {
91
- n.call(this, S);
95
+ R = a(R);
96
+ } catch (m) {
97
+ o.call(this, m);
92
98
  break;
93
99
  }
94
100
  }
95
101
  try {
96
- u = R.call(this, b);
97
- } catch (r) {
98
- return Promise.reject(r);
102
+ h = I.call(this, R);
103
+ } catch (a) {
104
+ return Promise.reject(a);
99
105
  }
100
- for (o = 0, p = c.length; o < p; )
101
- u = u.then(c[o++], c[o++]);
102
- return u;
106
+ for (i = 0, c = p.length; i < c; )
107
+ h = h.then(p[i++], p[i++]);
108
+ return h;
103
109
  }
104
110
  getUri(t) {
105
111
  t = w(this.defaults, t);
106
- const e = A(t.baseURL, t.url, t.allowAbsoluteUrls);
107
- return U(e, t.params, t.paramsSerializer);
112
+ const e = U(t.baseURL, t.url, t.allowAbsoluteUrls);
113
+ return S(e, t.params, t.paramsSerializer);
108
114
  }
109
115
  }
110
116
  d.forEach(["delete", "get", "head", "options"], function(t) {
111
- k.prototype[t] = function(e, s) {
112
- return this.request(w(s || {}, {
117
+ q.prototype[t] = function(e, r) {
118
+ return this.request(w(r || {}, {
113
119
  method: t,
114
120
  url: e,
115
- data: (s || {}).data
121
+ data: (r || {}).data
116
122
  }));
117
123
  };
118
124
  });
119
125
  d.forEach(["post", "put", "patch"], function(t) {
120
- function e(s) {
121
- return function(a, f, h) {
122
- return this.request(w(h || {}, {
126
+ function e(r) {
127
+ return function(s, f, u) {
128
+ return this.request(w(u || {}, {
123
129
  method: t,
124
- headers: s ? {
130
+ headers: r ? {
125
131
  "Content-Type": "multipart/form-data"
126
132
  } : {},
127
- url: a,
133
+ url: s,
128
134
  data: f
129
135
  }));
130
136
  };
131
137
  }
132
- k.prototype[t] = e(), k.prototype[t + "Form"] = e(!0);
138
+ q.prototype[t] = e(), q.prototype[t + "Form"] = e(!0);
133
139
  });
134
140
  export {
135
- k as default
141
+ q as default
136
142
  };
package/AxiosError.js CHANGED
@@ -1,9 +1,24 @@
1
- import a from "./utils6.js";
2
- function e(t, i, o, E, r) {
3
- Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = t, this.name = "AxiosError", i && (this.code = i), o && (this.config = o), E && (this.request = E), r && (this.response = r, this.status = r.status ? r.status : null);
4
- }
5
- a.inherits(e, Error, {
6
- toJSON: function() {
1
+ import N from "./utils6.js";
2
+ class R extends Error {
3
+ static from(E, t, _, i, s, O) {
4
+ const e = new R(E.message, t || E.code, _, i, s);
5
+ return e.cause = E, e.name = E.name, O && Object.assign(e, O), e;
6
+ }
7
+ /**
8
+ * Create an Error with the specified message, config, error code, request and response.
9
+ *
10
+ * @param {string} message The error message.
11
+ * @param {string} [code] The error code (for example, 'ECONNABORTED').
12
+ * @param {Object} [config] The config.
13
+ * @param {Object} [request] The request.
14
+ * @param {Object} [response] The response.
15
+ *
16
+ * @returns {Error} The created error.
17
+ */
18
+ constructor(E, t, _, i, s) {
19
+ super(E), this.name = "AxiosError", this.isAxiosError = !0, t && (this.code = t), _ && (this.config = _), i && (this.request = i), s && (this.response = s, this.status = s.status);
20
+ }
21
+ toJSON() {
7
22
  return {
8
23
  // Standard
9
24
  message: this.message,
@@ -17,38 +32,24 @@ a.inherits(e, Error, {
17
32
  columnNumber: this.columnNumber,
18
33
  stack: this.stack,
19
34
  // Axios
20
- config: a.toJSONObject(this.config),
35
+ config: N.toJSONObject(this.config),
21
36
  code: this.code,
22
37
  status: this.status
23
38
  };
24
39
  }
25
- });
26
- const R = e.prototype, u = {};
27
- [
28
- "ERR_BAD_OPTION_VALUE",
29
- "ERR_BAD_OPTION",
30
- "ECONNABORTED",
31
- "ETIMEDOUT",
32
- "ERR_NETWORK",
33
- "ERR_FR_TOO_MANY_REDIRECTS",
34
- "ERR_DEPRECATED",
35
- "ERR_BAD_RESPONSE",
36
- "ERR_BAD_REQUEST",
37
- "ERR_CANCELED",
38
- "ERR_NOT_SUPPORT",
39
- "ERR_INVALID_URL"
40
- // eslint-disable-next-line func-names
41
- ].forEach((t) => {
42
- u[t] = { value: t };
43
- });
44
- Object.defineProperties(e, u);
45
- Object.defineProperty(R, "isAxiosError", { value: !0 });
46
- e.from = (t, i, o, E, r, c) => {
47
- const s = Object.create(R);
48
- return a.toFlatObject(t, s, function(h) {
49
- return h !== Error.prototype;
50
- }, (n) => n !== "isAxiosError"), e.call(s, t.message, i, o, E, r), s.cause = t, s.name = t.name, c && Object.assign(s, c), s;
51
- };
40
+ }
41
+ R.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
42
+ R.ERR_BAD_OPTION = "ERR_BAD_OPTION";
43
+ R.ECONNABORTED = "ECONNABORTED";
44
+ R.ETIMEDOUT = "ETIMEDOUT";
45
+ R.ERR_NETWORK = "ERR_NETWORK";
46
+ R.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
47
+ R.ERR_DEPRECATED = "ERR_DEPRECATED";
48
+ R.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
49
+ R.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
50
+ R.ERR_CANCELED = "ERR_CANCELED";
51
+ R.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
52
+ R.ERR_INVALID_URL = "ERR_INVALID_URL";
52
53
  export {
53
- e as default
54
+ R as default
54
55
  };
package/ButtonAction.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsx as r, Fragment as o } from "react/jsx-runtime";
2
- import { IconCheck as n } from "./index4.js";
2
+ import { IconCheck as n } from "./index3.js";
3
3
  import { __ as e } from "./index2.js";
4
4
  import { pluralize as m } from "./text.js";
5
5
  function a({
package/CanceledError.js CHANGED
@@ -1,11 +1,18 @@
1
- import r from "./AxiosError.js";
2
- import i from "./utils6.js";
3
- function l(o, t, e) {
4
- r.call(this, o ?? "canceled", r.ERR_CANCELED, t, e), this.name = "CanceledError";
1
+ import e from "./AxiosError.js";
2
+ class n extends e {
3
+ /**
4
+ * A `CanceledError` is an object that is thrown when an operation is canceled.
5
+ *
6
+ * @param {string=} message The message.
7
+ * @param {Object=} config The config.
8
+ * @param {Object=} request The request.
9
+ *
10
+ * @returns {CanceledError} The created error.
11
+ */
12
+ constructor(r, o, t) {
13
+ super(r ?? "canceled", e.ERR_CANCELED, o, t), this.name = "CanceledError", this.__CANCEL__ = !0;
14
+ }
5
15
  }
6
- i.inherits(l, r, {
7
- __CANCEL__: !0
8
- });
9
16
  export {
10
- l as default
17
+ n as default
11
18
  };
package/Card.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { jsx as t, jsxs as M } from "react/jsx-runtime";
2
2
  import { useMemo as j } from "react";
3
3
  import s, { css as c } from "./styled-components.browser.esm.js";
4
- import { IconCheck as F } from "./index4.js";
4
+ import { IconCheck as F } from "./index3.js";
5
5
  import { token as r } from "./token.js";
6
6
  import { Frame as z } from "./Frame.js";
7
7
  import { CardContext as S } from "./context.js";
package/Chip.js CHANGED
@@ -2,7 +2,7 @@ import { jsxs as C, jsx as n } from "react/jsx-runtime";
2
2
  import { forwardRef as T } from "react";
3
3
  import d, { css as e } from "./styled-components.browser.esm.js";
4
4
  import { useFocusRing as $ } from "./useFocusRing.js";
5
- import { IconCancel as q } from "./index4.js";
5
+ import { IconCancel as q } from "./index3.js";
6
6
  import { token as o } from "./token.js";
7
7
  import { textStyles as u } from "./textStyles.js";
8
8
  import { makeInternalTokens as I } from "./makeInternalTokens.js";
package/CollectionCard.js CHANGED
@@ -1,40 +1,40 @@
1
- import { jsx as t, jsxs as g } from "react/jsx-runtime";
1
+ import { jsx as e, jsxs as g } from "react/jsx-runtime";
2
2
  import s from "./styled-components.browser.esm.js";
3
- import { IconOpenInNew as u } from "./index4.js";
3
+ import { IconOpenInNew as u } from "./index3.js";
4
4
  import { Card as n } from "./Card.js";
5
- import { token as i } from "./token.js";
5
+ import { token as a } from "./token.js";
6
6
  import { useSelectionMode as C, useConfig as h } from "./ConfigContext.js";
7
7
  import { __ as o } from "./index2.js";
8
8
  import { useRouter as x } from "./useRouterStore.js";
9
- import { useSelection as $ } from "./SelectionContext.js";
10
- import { pluralize as b } from "./text.js";
11
- function P({ collection: e, fadeIn: d = !0, isSelected: r, style: l }) {
12
- const m = C(), [, c] = x(), p = $(), { hideExternalAccess: f } = h();
13
- return /* @__PURE__ */ t(w, { id: e.id, style: l, $fadeIn: d, children: /* @__PURE__ */ g(
9
+ import { pluralize as $ } from "./text.js";
10
+ import { useSelectionStore as b } from "./useSelectionStore.js";
11
+ function P({ collection: t, fadeIn: d = !0, isSelected: r, style: l }) {
12
+ const c = C(), [, m] = x(), { toggleCollection: p } = b(), { hideExternalAccess: f } = h();
13
+ return /* @__PURE__ */ e(w, { id: t.id, style: l, $fadeIn: d, children: /* @__PURE__ */ g(
14
14
  n,
15
15
  {
16
- contextAction: !f && /* @__PURE__ */ t(
16
+ contextAction: !f && /* @__PURE__ */ e(
17
17
  n.ContextActionButton,
18
18
  {
19
19
  "aria-label": o("Open in new tab"),
20
20
  onClick: () => {
21
- window.open(e.url, "_blank");
21
+ window.open(t.url, "_blank");
22
22
  },
23
- children: /* @__PURE__ */ t(u, {})
23
+ children: /* @__PURE__ */ e(u, {})
24
24
  }
25
25
  ),
26
26
  selectButtonAriaLabel: r ? o("Deselect") : o("Select"),
27
- onSelect: m === "MultiSelect" ? (a) => {
28
- a.stopPropagation(), p.toggleCollection(e);
27
+ onSelect: c === "MultiSelect" ? (i) => {
28
+ i.stopPropagation(), p(t);
29
29
  } : void 0,
30
30
  isSelected: r,
31
- onClick: () => c({ page: "collection", collection: e }),
31
+ onClick: () => m({ page: "collection", collection: t }),
32
32
  "aria-selected": r,
33
33
  "data-testid": "asset-card",
34
34
  children: [
35
- /* @__PURE__ */ t(n.Frame, { children: /* @__PURE__ */ t(n.Images, { children: e.thumbnailUrls.slice(0, 3).map((a) => /* @__PURE__ */ t(n.Img, { src: a, alt: e.name }, a)) }) }),
36
- /* @__PURE__ */ t(n.Header, { title: e.name, "data-testid": "asset-name" }),
37
- /* @__PURE__ */ t(I, { children: b(e.assetCount, o("{} asset"), o("{} assets")) })
35
+ /* @__PURE__ */ e(n.Frame, { children: /* @__PURE__ */ e(n.Images, { children: t.thumbnailUrls.slice(0, 3).map((i) => /* @__PURE__ */ e(n.Img, { src: i, alt: t.name }, i)) }) }),
36
+ /* @__PURE__ */ e(n.Header, { title: t.name, "data-testid": "asset-name" }),
37
+ /* @__PURE__ */ e(I, { "data-testid": "collection-asset-count", children: $(t.assetCount, o("{} asset"), o("{} assets")) })
38
38
  ]
39
39
  }
40
40
  ) });
@@ -42,13 +42,13 @@ function P({ collection: e, fadeIn: d = !0, isSelected: r, style: l }) {
42
42
  const w = s.div`
43
43
  width: 224px;
44
44
  position: relative;
45
- margin: ${i.spacing3};
45
+ margin: ${a.spacing3};
46
46
  align-self: flex-start;
47
- ${(e) => e.$fadeIn ? "animation: var(--fade-in-down);" : ""}
47
+ ${(t) => t.$fadeIn ? "animation: var(--fade-in-down);" : ""}
48
48
  `, I = s.div`
49
- padding: 0 0 ${i.spacing4} ${i.spacing5};
50
- margin-top: -${i.spacing2};
51
- font-size: ${i.fontSize75};
49
+ padding: 0 0 ${a.spacing4} ${a.spacing5};
50
+ margin-top: -${a.spacing2};
51
+ font-size: ${a.fontSize75};
52
52
  color: rgba(0, 34, 51, 0.5);
53
53
  `;
54
54
  export {
package/CollectionItem.js CHANGED
@@ -1,23 +1,23 @@
1
1
  import { jsxs as m, jsx as o } from "react/jsx-runtime";
2
2
  import e from "./styled-components.browser.esm.js";
3
- import { IconCollection as a } from "./index4.js";
3
+ import { IconCollection as a } from "./index3.js";
4
4
  import { Thumbnail as l } from "./Thumbnail.js";
5
5
  import { token as i } from "./token.js";
6
- import { __ as n } from "./index2.js";
7
- import { useSelection as s } from "./SelectionContext.js";
8
- import { pluralize as p } from "./text.js";
9
- import { SelectedItemContainer as c } from "./SelectedItemContainer.js";
6
+ import { __ as r } from "./index2.js";
7
+ import { pluralize as s } from "./text.js";
8
+ import { SelectedItemContainer as p } from "./SelectedItemContainer.js";
9
+ import { useSelectionStore as c } from "./useSelectionStore.js";
10
10
  function z({ collection: t }) {
11
- const r = s();
11
+ const { toggleCollection: n } = c();
12
12
  return /* @__PURE__ */ m(
13
- c,
13
+ p,
14
14
  {
15
15
  title: t.name,
16
- onRemove: () => r.toggleCollection(t),
16
+ onRemove: () => n(t),
17
17
  children: [
18
18
  /* @__PURE__ */ o(f, { children: /* @__PURE__ */ o(l, { variant: "clean", icon: /* @__PURE__ */ o(a, {}) }) }),
19
19
  /* @__PURE__ */ o(g, { children: t.name }),
20
- /* @__PURE__ */ o(h, { children: p(t.assetCount, n("{} asset"), n("{} assets")) })
20
+ /* @__PURE__ */ o(h, { children: s(t.assetCount, r("{} asset"), r("{} assets")) })
21
21
  ]
22
22
  }
23
23
  );
package/CollectionList.js CHANGED
@@ -7,11 +7,11 @@ import { CollectionCard as L } from "./CollectionCard.js";
7
7
  import { useDimensions as x } from "./useDimensions.js";
8
8
  import { InfiniteScroll as I } from "./InfiniteScroll.js";
9
9
  import { NoResults as N } from "./NoResults.js";
10
- import { useSelectedCollectionIds as k } from "./SelectionContext.js";
11
- import { nbsp as w } from "./text.js";
12
- import { useSearchStore as M } from "./useSearchStore.js";
10
+ import { nbsp as k } from "./text.js";
11
+ import { useSearchStore as w } from "./useSearchStore.js";
12
+ import { useSelectedCollectionIds as M } from "./useSelectionStore.js";
13
13
  function E(l) {
14
- const [d, a] = S(null), { dimensions: i } = x(d), c = k(), { setSearch: m } = M(), { data: o, isLoading: f, loadMore: u, hasNextPage: p } = l.connection, n = i !== void 0 ? Math.ceil(i.height / 184) : 0, s = i !== void 0 ? Math.round((i.width - 32) / 204) : 0;
14
+ const [d, a] = S(null), { dimensions: i } = x(d), c = M(), { setSearch: m } = w(), { data: o, isLoading: f, loadMore: u, hasNextPage: p } = l.connection, n = i !== void 0 ? Math.ceil(i.height / 184) : 0, s = i !== void 0 ? Math.round((i.width - 32) / 204) : 0;
15
15
  return /* @__PURE__ */ h(
16
16
  "div",
17
17
  {
@@ -26,7 +26,7 @@ function E(l) {
26
26
  {
27
27
  rows: n,
28
28
  columns: s,
29
- title: /* @__PURE__ */ t(R, { children: w })
29
+ title: /* @__PURE__ */ t(R, { children: k })
30
30
  }
31
31
  ),
32
32
  o.tag === "Loaded" && o.value?.collections.nodes.length === 0 && /* @__PURE__ */ t(N, { onReset: () => m("collections", "") }),