@bynder/compact-view 5.2.3 → 5.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (253) hide show
  1. package/AccessToken2.js +1 -1
  2. package/ActiveFilters.js +49 -50
  3. package/AddMedia.js +19 -18
  4. package/Advanced.js +13 -13
  5. package/App.js +60 -59
  6. package/Arrow.js +1 -1
  7. package/AssetFilter.js +38 -38
  8. package/AssetItem.js +10 -17
  9. package/AssetList.js +5 -5
  10. package/AssetTypeItem.js +21 -21
  11. package/AssetsView.js +13 -13
  12. package/Axios2.js +82 -76
  13. package/AxiosError.js +36 -35
  14. package/ButtonAction.js +1 -1
  15. package/CanceledError.js +15 -8
  16. package/Card.js +1 -1
  17. package/Chip.js +1 -1
  18. package/CollectionCard.js +22 -22
  19. package/CollectionItem.js +9 -9
  20. package/CollectionList.js +5 -5
  21. package/CollectionView.js +11 -11
  22. package/ColorPicker.js +1 -1
  23. package/ColorPickerSolid.js +3 -3
  24. package/ColorPickerWithOpacity.js +3 -3
  25. package/Component.js +158 -0
  26. package/Component2.js +4 -0
  27. package/ConfigContext.js +7 -8
  28. package/Container.js +1 -1
  29. package/ContextAction.js +1 -1
  30. package/ControlGroup.js +6 -6
  31. package/Dat.js +33 -32
  32. package/DatDropdownItem.js +1 -1
  33. package/DesignSystemProvider.js +7 -7
  34. package/DirectionSelect.js +11 -10
  35. package/DomainInput.js +19 -11
  36. package/Draggable.js +337 -0
  37. package/Draggable2.js +4 -0
  38. package/DraggableCore.js +312 -0
  39. package/DraggableCore2.js +4 -0
  40. package/Dropdown.js +37 -37
  41. package/Dropdown2.js +1 -1
  42. package/DropdownListItem.js +1 -1
  43. package/FieldSelect.js +19 -17
  44. package/FileSelector.js +38 -37
  45. package/FontPicker.js +1 -1
  46. package/Form.js +1 -1
  47. package/Header.js +5 -4
  48. package/HttpStatusCode.js +7 -1
  49. package/InfiniteScroll.js +1 -1
  50. package/InlineBanner.js +1 -1
  51. package/Input.js +1 -1
  52. package/InterceptorManager.js +2 -1
  53. package/Item.js +8 -8
  54. package/Item4.js +2 -2
  55. package/LeftArrow.js +1 -1
  56. package/ListItem2.js +1 -1
  57. package/ModalBase.js +15 -15
  58. package/NoResults.js +1 -1
  59. package/Option_new.js +36 -29
  60. package/ReactPropTypesSecret.js +10 -0
  61. package/RightArrow.js +1 -1
  62. package/SearchInput.js +1 -1
  63. package/SearchInput2.js +1 -1
  64. package/SelectionFooter.js +41 -31
  65. package/Shield.js +2 -2
  66. package/Smartfilters_new.js +107 -98
  67. package/StatefulAssetList.js +50 -50
  68. package/StoreInitializer.js +32 -16
  69. package/SwitchNLS.js +1 -1
  70. package/TagItem.js +15 -15
  71. package/Tags.js +1 -1
  72. package/Toolbar.js +23 -20
  73. package/Tooltip2.js +1 -1
  74. package/ViewSwitch.js +17 -15
  75. package/_commonjsHelpers.js +28 -3
  76. package/adapters.js +54 -42
  77. package/api/filterAssets.d.ts +1 -1
  78. package/api/getAssets.d.ts +1 -1
  79. package/api/getFilters.d.ts +1 -1
  80. package/api/rest/index.d.ts +1 -1
  81. package/api/rest/types.d.ts +1 -1
  82. package/api2.js +1 -1
  83. package/asset.type.js +1 -1
  84. package/autocomplete.js +1 -1
  85. package/axios.js +1 -1
  86. package/bodyScrollLock.esm.js +68 -0
  87. package/buildURL.js +13 -15
  88. package/checkGlobals.js +1 -1
  89. package/cjs.js +7 -0
  90. package/cjs2.js +15 -0
  91. package/cjs3.js +4 -0
  92. package/clsx.m.js +6 -0
  93. package/clsx.m2.js +15 -0
  94. package/combineMetaproperties.js +3 -1
  95. package/composeSignals.js +1 -1
  96. package/cookieStore.js +1 -1
  97. package/cookies.js +13 -11
  98. package/currentScopes.js +1 -1
  99. package/data.js +1 -1
  100. package/devUtils.js +1 -1
  101. package/dispatchRequest.js +5 -5
  102. package/domFns.js +151 -0
  103. package/domFns2.js +4 -0
  104. package/factoryWithThrowingShims.js +52 -0
  105. package/fetch2.js +156 -128
  106. package/filter/AssetFilterContext.d.ts +3 -3
  107. package/filterAssets.js +1 -1
  108. package/getAsset.js +1 -1
  109. package/getAssetCounts.js +1 -1
  110. package/getAssets.js +1 -1
  111. package/getCollections.js +1 -1
  112. package/getFilterOptions.js +1 -1
  113. package/getFilters.js +1 -1
  114. package/getFilters_new.js +1 -1
  115. package/getPrefix.js +35 -0
  116. package/getPrefix2.js +4 -0
  117. package/getSimilarityAssets.js +1 -1
  118. package/goober.modern.js +75 -0
  119. package/handlers.js +1 -1
  120. package/iconBase.js +56 -0
  121. package/iconContext.js +12 -0
  122. package/iconsManifest.js +222 -0
  123. package/index-esm.js +1 -4
  124. package/index.browser.js +1 -1
  125. package/index.m.js +9 -0
  126. package/index.m2.js +17 -0
  127. package/index10.js +18 -2
  128. package/index11.js +181 -15
  129. package/index112.js +1 -1
  130. package/index12.js +313 -36
  131. package/index13.js +5 -2430
  132. package/index14.js +3 -557
  133. package/index15.js +15 -55
  134. package/index16.js +3 -2
  135. package/index17.js +3 -87
  136. package/index18.js +36 -60
  137. package/index19.js +3 -7
  138. package/index20.js +2429 -12
  139. package/index21.js +557 -10
  140. package/index22.js +1 -1
  141. package/index23.js +119 -6
  142. package/index24.js +39 -7
  143. package/index25.js +2 -5
  144. package/index26.js +86 -9
  145. package/index27.js +55 -8
  146. package/index28.js +6 -636
  147. package/index29.js +8692 -74
  148. package/index3.js +1684 -5
  149. package/index30.js +2 -5
  150. package/index31.js +4 -20
  151. package/index310.js +2 -0
  152. package/index32.js +11 -2
  153. package/index33.js +5083 -4
  154. package/index34.js +2 -18
  155. package/index35.js +59 -5
  156. package/index36.js +2 -2
  157. package/index37.js +13 -11
  158. package/index38.js +46 -10
  159. package/index39.js +6 -12
  160. package/index4.js +5 -1684
  161. package/index40.js +8 -11
  162. package/index41.js +26 -18
  163. package/index42.js +2 -64
  164. package/index43.js +63 -5
  165. package/index44.js +9 -55
  166. package/index45.js +7 -67
  167. package/index46.js +8 -31
  168. package/index47.js +5 -11
  169. package/index48.js +10 -121
  170. package/index49.js +9 -86
  171. package/index5.js +215 -23
  172. package/index50.js +636 -7
  173. package/index51.js +74 -11
  174. package/index52.js +4 -13
  175. package/index53.js +19 -13
  176. package/index54.js +4 -6
  177. package/index55.js +18 -7
  178. package/index56.js +5 -14
  179. package/index57.js +10 -28
  180. package/index58.js +10 -15
  181. package/index59.js +15 -0
  182. package/index6.js +250 -299
  183. package/index60.js +13 -0
  184. package/index61.js +21 -0
  185. package/index62.js +8 -0
  186. package/index63.js +57 -0
  187. package/index64.js +4 -0
  188. package/index65.js +69 -0
  189. package/index66.js +33 -0
  190. package/index67.js +13 -0
  191. package/index68.js +123 -0
  192. package/index69.js +88 -0
  193. package/index7.js +22 -5047
  194. package/index70.js +10 -0
  195. package/index71.js +13 -0
  196. package/index72.js +13 -225
  197. package/index73.js +16 -0
  198. package/index74.js +9 -0
  199. package/index75.js +228 -0
  200. package/index76.js +9 -0
  201. package/index77.js +17 -0
  202. package/index78.js +31 -0
  203. package/index79.js +18 -0
  204. package/index8.js +5044 -47
  205. package/index9.js +50 -15
  206. package/isAbsoluteURL.js +1 -1
  207. package/isURLSameOrigin.js +1 -1
  208. package/localization.js +15 -15
  209. package/log.js +14 -0
  210. package/log2.js +4 -0
  211. package/matchRequestUrl.js +1 -1
  212. package/mergeConfig.js +37 -32
  213. package/notify.js +2 -2
  214. package/package.json +1 -1
  215. package/positionFns.js +101 -0
  216. package/positionFns2.js +4 -0
  217. package/react-laag.esm.js +957 -0
  218. package/react.js +8 -8
  219. package/react2.js +9 -9
  220. package/resolveConfig.js +23 -23
  221. package/select/add-media/AddMedia.d.ts +3 -1
  222. package/select/current-selection/SelectedItems.d.ts +1 -1
  223. package/shims.js +29 -0
  224. package/shims2.js +4 -0
  225. package/store/StoreInitializer.d.ts +5 -1
  226. package/store/useAssetFilterStore.d.ts +55 -0
  227. package/store/useSelectionStore.d.ts +47 -0
  228. package/styled-components.browser.esm.js +2 -2
  229. package/throttle.js +1 -1
  230. package/toURLEncodedForm.js +11 -10
  231. package/tokenExpirationHelper.js +1 -1
  232. package/transformData.js +1 -1
  233. package/transitional.js +4 -3
  234. package/useAssetFilterStore.js +152 -0
  235. package/useDatStore.js +1 -1
  236. package/useEffectEvent.js +7 -7
  237. package/useFonts.js +2 -2
  238. package/useOrderingStore.js +1 -1
  239. package/useRouterStore.js +1 -1
  240. package/useSearchStore.js +1 -1
  241. package/useSelectionStore.js +131 -0
  242. package/useSimilaritySearchStore.js +1 -1
  243. package/useTranslate.js +1 -1
  244. package/utils/combineMetaproperties.d.ts +2 -0
  245. package/utils6.js +160 -118
  246. package/utils7.js +7 -68
  247. package/utils8.js +68 -7
  248. package/xhr.js +47 -46
  249. package/AssetFilterContext.js +0 -161
  250. package/SelectionContext.js +0 -143
  251. package/select/SelectionContext.d.ts +0 -30
  252. /package/{Middleware.js → Middleware2.js} +0 -0
  253. /package/{middleware2.js → middleware.js} +0 -0
package/react.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import r from "react";
2
- import { createStore as a } from "./vanilla.js";
3
- const o = (t) => t;
4
- function s(t, e = o) {
2
+ import { createStore as c } from "./vanilla.js";
3
+ const u = (t) => t;
4
+ function o(t, e = u) {
5
5
  const n = r.useSyncExternalStore(
6
6
  t.subscribe,
7
7
  r.useCallback(() => e(t.getState()), [t, e]),
@@ -9,11 +9,11 @@ function s(t, e = o) {
9
9
  );
10
10
  return r.useDebugValue(n), n;
11
11
  }
12
- const u = (t) => {
13
- const e = a(t), n = (c) => s(e, c);
12
+ const s = (t) => {
13
+ const e = c(t), n = (a) => o(e, a);
14
14
  return Object.assign(n, e), n;
15
- }, l = (t) => u;
15
+ }, i = (t) => s;
16
16
  export {
17
- l as create,
18
- s as useStore
17
+ i as create,
18
+ o as useStore
19
19
  };
package/react2.js CHANGED
@@ -1,18 +1,18 @@
1
- import o from "react";
2
- import { createStore as u } from "./vanilla2.js";
1
+ import u from "react";
2
+ import { createStore as s } from "./vanilla2.js";
3
3
  const c = (t) => t;
4
4
  function a(t, e = c) {
5
- const n = o.useSyncExternalStore(
5
+ const n = u.useSyncExternalStore(
6
6
  t.subscribe,
7
- o.useCallback(() => e(t.getState()), [t, e]),
8
- o.useCallback(() => e(t.getInitialState()), [t, e])
7
+ u.useCallback(() => e(t.getState()), [t, e]),
8
+ u.useCallback(() => e(t.getInitialState()), [t, e])
9
9
  );
10
- return o.useDebugValue(n), n;
10
+ return u.useDebugValue(n), n;
11
11
  }
12
- const r = (t) => {
13
- const e = u(t), n = (s) => a(e, s);
12
+ const o = (t) => {
13
+ const e = s(t), n = (r) => a(e, r);
14
14
  return Object.assign(n, e), n;
15
- }, b = ((t) => t ? r(t) : r);
15
+ }, b = ((t) => t ? o(t) : o);
16
16
  export {
17
17
  b as create,
18
18
  a as useStore
package/resolveConfig.js CHANGED
@@ -1,33 +1,33 @@
1
- import n from "./index19.js";
2
- import l from "./utils6.js";
3
- import h from "./isURLSameOrigin.js";
4
- import c from "./cookies.js";
1
+ import n from "./index28.js";
2
+ import m from "./utils6.js";
3
+ import c from "./isURLSameOrigin.js";
4
+ import h from "./cookies.js";
5
5
  import w from "./buildFullPath.js";
6
- import C from "./mergeConfig.js";
7
- import b from "./AxiosHeaders.js";
8
- import S from "./buildURL.js";
9
- const v = (s) => {
10
- const e = C({}, s);
11
- let { data: p, withXSRFToken: o, xsrfHeaderName: m, xsrfCookieName: f, headers: r, auth: t } = e;
12
- e.headers = r = b.from(r), e.url = S(w(e.baseURL, e.url, e.allowAbsoluteUrls), s.params, s.paramsSerializer), t && r.set(
6
+ import b from "./mergeConfig.js";
7
+ import C from "./AxiosHeaders.js";
8
+ import g from "./buildURL.js";
9
+ const E = (a) => {
10
+ const e = b({}, a);
11
+ let { data: i, withXSRFToken: r, xsrfHeaderName: f, xsrfCookieName: d, headers: o, auth: s } = e;
12
+ if (e.headers = o = C.from(o), e.url = g(w(e.baseURL, e.url, e.allowAbsoluteUrls), a.params, a.paramsSerializer), s && o.set(
13
13
  "Authorization",
14
- "Basic " + btoa((t.username || "") + ":" + (t.password ? unescape(encodeURIComponent(t.password)) : ""))
15
- );
16
- let i;
17
- if (l.isFormData(p)) {
14
+ "Basic " + btoa((s.username || "") + ":" + (s.password ? unescape(encodeURIComponent(s.password)) : ""))
15
+ ), m.isFormData(i)) {
18
16
  if (n.hasStandardBrowserEnv || n.hasStandardBrowserWebWorkerEnv)
19
- r.setContentType(void 0);
20
- else if ((i = r.getContentType()) !== !1) {
21
- const [a, ...d] = i ? i.split(";").map((u) => u.trim()).filter(Boolean) : [];
22
- r.setContentType([a || "multipart/form-data", ...d].join("; "));
17
+ o.setContentType(void 0);
18
+ else if (m.isFunction(i.getHeaders)) {
19
+ const t = i.getHeaders(), u = ["content-type", "content-length"];
20
+ Object.entries(t).forEach(([l, p]) => {
21
+ u.includes(l.toLowerCase()) && o.set(l, p);
22
+ });
23
23
  }
24
24
  }
25
- if (n.hasStandardBrowserEnv && (o && l.isFunction(o) && (o = o(e)), o || o !== !1 && h(e.url))) {
26
- const a = m && f && c.read(f);
27
- a && r.set(m, a);
25
+ if (n.hasStandardBrowserEnv && (r && m.isFunction(r) && (r = r(e)), r || r !== !1 && c(e.url))) {
26
+ const t = f && d && h.read(d);
27
+ t && o.set(f, t);
28
28
  }
29
29
  return e;
30
30
  };
31
31
  export {
32
- v as default
32
+ E as default
33
33
  };
@@ -1,7 +1,9 @@
1
1
  import { default as React } from 'react';
2
- import { SelectedItem } from '../SelectionContext';
2
+ import { Asset } from '../../api/getAsset';
3
+ import { SelectedItem } from '../../store/useSelectionStore';
3
4
  interface Props {
4
5
  selection: SelectedItem[];
5
6
  }
6
7
  export declare function AddMedia(props: Props): React.JSX.Element;
8
+ export declare function sortAssets(assetA: Asset, assetB: Asset, preselectedAssetIds: any): number;
7
9
  export {};
@@ -1,5 +1,5 @@
1
1
  import { default as React } from 'react';
2
- import { SelectedItem } from '../SelectionContext';
2
+ import { SelectedItem } from '../../store/useSelectionStore';
3
3
  export declare function SelectedItems({ selection }: {
4
4
  selection: SelectedItem[];
5
5
  }): React.JSX.Element;
package/shims.js ADDED
@@ -0,0 +1,29 @@
1
+ import { __exports as n } from "./shims2.js";
2
+ var r;
3
+ function h() {
4
+ if (r) return n;
5
+ r = 1, Object.defineProperty(n, "__esModule", {
6
+ value: !0
7
+ }), n.dontSetMe = f, n.findInArray = o, n.int = c, n.isFunction = u, n.isNum = s;
8
+ function o(t, i) {
9
+ for (let e = 0, p = t.length; e < p; e++)
10
+ if (i.apply(i, [t[e], e, t])) return t[e];
11
+ }
12
+ function u(t) {
13
+ return typeof t == "function" || Object.prototype.toString.call(t) === "[object Function]";
14
+ }
15
+ function s(t) {
16
+ return typeof t == "number" && !isNaN(t);
17
+ }
18
+ function c(t) {
19
+ return parseInt(t, 10);
20
+ }
21
+ function f(t, i, e) {
22
+ if (t[i])
23
+ return new Error("Invalid prop ".concat(i, " passed to ").concat(e, " - do not set this, set it on the child."));
24
+ }
25
+ return n;
26
+ }
27
+ export {
28
+ h as __require
29
+ };
package/shims2.js ADDED
@@ -0,0 +1,4 @@
1
+ var s = {};
2
+ export {
3
+ s as __exports
4
+ };
@@ -1,8 +1,12 @@
1
+ import { AssetFilterJson } from '../filter/assetFilter.type';
1
2
  interface StoreInitializerProps {
2
3
  defaultSearchTerm?: string;
3
4
  resetOnMount?: boolean;
5
+ predefinedFilter?: AssetFilterJson;
6
+ hideLimitedUse?: boolean;
7
+ preselectedAssetIds?: string[];
4
8
  }
5
9
  declare function resetAllStores(): void;
6
- export declare function StoreInitializer({ defaultSearchTerm, resetOnMount, }: StoreInitializerProps): null;
10
+ export declare function StoreInitializer({ defaultSearchTerm, resetOnMount, predefinedFilter, hideLimitedUse, preselectedAssetIds, }: StoreInitializerProps): null;
7
11
  export declare function useResetAllStores(): typeof resetAllStores;
8
12
  export {};
@@ -0,0 +1,55 @@
1
+ import { AssetType } from '../views/asset/asset.type';
2
+ import { MetapropertyOptionType as MetapropertyOption } from '../filter/filters/metaproperty/MetapropertyOption';
3
+ import { AssetFilterJson } from '../filter/assetFilter.type';
4
+ import { AutocompleteResponseOption, SmartfilterOption, selectedSmartfilterOptionsType, AssetCountType } from '../api/rest/types';
5
+ type MetapropertyMapType = Record<string, MetapropertyOption>;
6
+ export interface Filter {
7
+ assetTypes: AssetType[];
8
+ existingFilters: Record<string, Record<string, number>> | null;
9
+ isDropdownActive: boolean;
10
+ isLimited?: boolean;
11
+ metaproperties: MetapropertyOption[];
12
+ metapropertyIds: string[];
13
+ metapropertyMap: MetapropertyMapType;
14
+ predefinedFilter?: AssetFilterJson;
15
+ selectedSmartfilterOptions: selectedSmartfilterOptionsType;
16
+ tags: string[];
17
+ }
18
+ interface Actions {
19
+ addAssetType: (assetType: AssetType) => void;
20
+ setAssetTypes: (assetTypes: AssetType[]) => void;
21
+ removeAssetType: (assetType: AssetType) => void;
22
+ addMetaproperty: (metaproperty: MetapropertyOption) => void;
23
+ removeMetaproperty: (metaproperty: MetapropertyOption) => void;
24
+ setPredefinedMetaproperties: () => void;
25
+ addTag: (tag: string) => void;
26
+ setTags: (tags: string[]) => void;
27
+ removeTag: (tag: string) => void;
28
+ clear: () => void;
29
+ setDropdownState: (active: boolean) => void;
30
+ selectSmartfilterOption: (metapropertyName: string, option: SmartfilterOption | AutocompleteResponseOption, isMultifilter?: boolean) => void;
31
+ removeSmartfilterOption: (metapropertyName: string, optionId: string) => void;
32
+ setActiveFiltersState: (count: AssetCountType) => void;
33
+ setPredefinedFilter: (filter?: AssetFilterJson) => void;
34
+ setHideLimitedUse: (hide: boolean) => void;
35
+ }
36
+ export type AssetFilterStore = Filter & Actions;
37
+ export declare const useAssetFilterStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<AssetFilterStore>, "setState" | "devtools"> & {
38
+ setState(partial: AssetFilterStore | Partial<AssetFilterStore> | ((state: AssetFilterStore) => AssetFilterStore | Partial<AssetFilterStore>), replace?: false | undefined, action?: (string | {
39
+ [x: string]: unknown;
40
+ [x: number]: unknown;
41
+ [x: symbol]: unknown;
42
+ type: string;
43
+ }) | undefined): void;
44
+ setState(state: AssetFilterStore | ((state: AssetFilterStore) => AssetFilterStore), replace: true, action?: (string | {
45
+ [x: string]: unknown;
46
+ [x: number]: unknown;
47
+ [x: symbol]: unknown;
48
+ type: string;
49
+ }) | undefined): void;
50
+ devtools: {
51
+ cleanup: () => void;
52
+ };
53
+ }>;
54
+ export declare function keepPredefinedMetapropertiesInMap(metapropertyMap: MetapropertyMapType, predefinedMetaproperties: string[]): {};
55
+ export {};
@@ -0,0 +1,47 @@
1
+ import { Asset, AssetData } from '../views/asset/asset.type';
2
+ import { Collection } from '../views/collection/collection.types';
3
+ export type SelectedAsset = {
4
+ type: 'asset';
5
+ value: Asset;
6
+ };
7
+ export type SelectedCollection = {
8
+ type: 'collection';
9
+ value: Collection;
10
+ };
11
+ export type SelectedItem = SelectedAsset | SelectedCollection;
12
+ interface SelectionState {
13
+ selection: SelectedItem[];
14
+ preselectedAssetIds?: string[];
15
+ allAssetsStore: Asset[];
16
+ setPreselectedAssetIds: (ids: string[]) => void;
17
+ clear: () => void;
18
+ selectAll: () => void;
19
+ selectAssets: (assets: Asset[]) => void;
20
+ toggleAssets: (assets: Asset[]) => void;
21
+ toggleCollection: (collection: Collection) => void;
22
+ setAllAssets: (assetData: AssetData) => void;
23
+ setSelection: (selection: SelectedItem[]) => void;
24
+ }
25
+ export declare const useSelectionStore: import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<SelectionState>, "setState" | "devtools"> & {
26
+ setState(partial: SelectionState | Partial<SelectionState> | ((state: SelectionState) => SelectionState | Partial<SelectionState>), replace?: false | undefined, action?: (string | {
27
+ [x: string]: unknown;
28
+ [x: number]: unknown;
29
+ [x: symbol]: unknown;
30
+ type: string;
31
+ }) | undefined): void;
32
+ setState(state: SelectionState | ((state: SelectionState) => SelectionState), replace: true, action?: (string | {
33
+ [x: string]: unknown;
34
+ [x: number]: unknown;
35
+ [x: symbol]: unknown;
36
+ type: string;
37
+ }) | undefined): void;
38
+ devtools: {
39
+ cleanup: () => void;
40
+ };
41
+ }>;
42
+ export declare const useSelectionModeHandler: () => {
43
+ assetToggleHandler: (assets: Asset[]) => void;
44
+ };
45
+ export declare function usePreselectedAssets(preselectedAssetIds?: string[]): Asset[];
46
+ export declare function useSelectedCollectionIds(): string[];
47
+ export {};
@@ -1,9 +1,9 @@
1
1
  import { __assign as g, __spreadArray as T } from "./tslib.es6.js";
2
2
  import S, { useContext as ie, useState as ae, useMemo as ut, useEffect as ue, createElement as ce } from "react";
3
- import le from "./index3.js";
3
+ import le from "./index4.js";
4
4
  import pe from "./emotion-unitless.esm.js";
5
5
  import { RULESET as fe } from "./Enum.js";
6
- import { prefixer as he, middleware as de, rulesheet as me } from "./Middleware.js";
6
+ import { prefixer as he, middleware as de, rulesheet as me } from "./Middleware2.js";
7
7
  import { stringify as ve, serialize as ye } from "./Serializer.js";
8
8
  import { compile as ge } from "./Parser.js";
9
9
  var j = typeof process < "u" && process.env !== void 0 && (process.env.REACT_APP_SC_ATTR || process.env.SC_ATTR) || "data-styled", Ft = "active", $t = "data-styled-version", nt = "6.1.13", vt = `/*!sc*/
package/throttle.js CHANGED
@@ -1,7 +1,7 @@
1
1
  function h(r, a) {
2
2
  let s = 0, u = 1e3 / a, e, t;
3
3
  const n = (l, o = Date.now()) => {
4
- s = o, e = null, t && (clearTimeout(t), t = null), r.apply(null, l);
4
+ s = o, e = null, t && (clearTimeout(t), t = null), r(...l);
5
5
  };
6
6
  return [(...l) => {
7
7
  const o = Date.now(), i = o - s;
@@ -1,13 +1,14 @@
1
- import e from "./utils6.js";
2
- import n from "./toFormData.js";
3
- import r from "./index19.js";
4
- function c(o, i) {
5
- return n(o, new r.classes.URLSearchParams(), Object.assign({
6
- visitor: function(t, s, f, a) {
7
- return r.isNode && e.isBuffer(t) ? (this.append(s, t.toString("base64")), !1) : a.defaultVisitor.apply(this, arguments);
8
- }
9
- }, i));
1
+ import s from "./utils6.js";
2
+ import f from "./toFormData.js";
3
+ import r from "./index28.js";
4
+ function d(o, i) {
5
+ return f(o, new r.classes.URLSearchParams(), {
6
+ visitor: function(t, a, n, e) {
7
+ return r.isNode && s.isBuffer(t) ? (this.append(a, t.toString("base64")), !1) : e.defaultVisitor.apply(this, arguments);
8
+ },
9
+ ...i
10
+ });
10
11
  }
11
12
  export {
12
- c as default
13
+ d as default
13
14
  };
@@ -1,5 +1,5 @@
1
1
  import { __exports as i } from "./tokenExpirationHelper2.js";
2
- import { __require as E } from "./index15.js";
2
+ import { __require as E } from "./index27.js";
3
3
  import { __require as x } from "./constants4.js";
4
4
  import { __require as b } from "./localStorageHelper.js";
5
5
  var u;
package/transformData.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import i from "./utils6.js";
2
- import m from "./index17.js";
2
+ import m from "./index26.js";
3
3
  import s from "./AxiosHeaders.js";
4
4
  function h(f, t) {
5
5
  const o = this || m, r = t || o, n = s.from(r.headers);
package/transitional.js CHANGED
@@ -1,8 +1,9 @@
1
- const r = {
1
+ const e = {
2
2
  silentJSONParsing: !0,
3
3
  forcedJSONParsing: !0,
4
- clarifyTimeoutError: !1
4
+ clarifyTimeoutError: !1,
5
+ legacyInterceptorReqResOrdering: !0
5
6
  };
6
7
  export {
7
- r as default
8
+ e as default
8
9
  };
@@ -0,0 +1,152 @@
1
+ import { devtools as f } from "./middleware.js";
2
+ import { create as c } from "./react.js";
3
+ function l(t, e) {
4
+ return t.includes(e) ? t : [...t, e];
5
+ }
6
+ function a(t, e) {
7
+ return t.filter((r) => r !== e);
8
+ }
9
+ const u = c()(
10
+ f(
11
+ (t) => ({
12
+ assetTypes: [],
13
+ metaproperties: [],
14
+ metapropertyIds: [],
15
+ predefinedFilter: void 0,
16
+ tags: [],
17
+ isLimited: void 0,
18
+ isDropdownActive: !1,
19
+ selectedSmartfilterOptions: {},
20
+ existingFilters: null,
21
+ metapropertyMap: {},
22
+ setPredefinedFilter: (e) => t(() => ({
23
+ predefinedFilter: e
24
+ })),
25
+ addAssetType: (e) => t((r) => ({
26
+ assetTypes: l(r.assetTypes, e)
27
+ })),
28
+ setAssetTypes: (e) => t(() => ({
29
+ assetTypes: e
30
+ })),
31
+ removeAssetType: (e) => {
32
+ t((r) => {
33
+ const { predefinedFilter: i } = r;
34
+ return i?.showToolbar && i.predefinedAssetType?.includes(e) ? { assetTypes: r.assetTypes } : {
35
+ assetTypes: a(r.assetTypes, e)
36
+ };
37
+ });
38
+ },
39
+ addMetaproperty: (e) => t((r) => ({
40
+ metapropertyIds: l(r.metapropertyIds, e.id),
41
+ metapropertyMap: {
42
+ ...r.metapropertyMap,
43
+ [e.id]: e
44
+ }
45
+ })),
46
+ removeMetaproperty: (e) => t((r) => {
47
+ const { [e.id]: i, ...s } = r.metapropertyMap;
48
+ return {
49
+ metapropertyIds: a(r.metapropertyIds, e.id),
50
+ metapropertyMap: s
51
+ };
52
+ }),
53
+ setPredefinedMetaproperties: () => t((e) => {
54
+ const r = {}, { predefinedFilter: i } = e;
55
+ return Object.entries(i?.predefinedMetapropertiesOptions || {}).reduce(
56
+ (s, [n, d]) => (s[n] = {}, Object.entries(d).forEach(([o, p]) => {
57
+ s[n][p] = {
58
+ id: p,
59
+ label: o,
60
+ metapropertyName: n
61
+ };
62
+ }), s),
63
+ r
64
+ ), { selectedSmartfilterOptions: r };
65
+ }),
66
+ addTag: (e) => t((r) => ({
67
+ tags: l(r.tags, e)
68
+ })),
69
+ setTags: (e) => t(() => ({
70
+ tags: e
71
+ })),
72
+ removeTag: (e) => {
73
+ t((r) => {
74
+ const { predefinedFilter: i } = r;
75
+ return i?.showToolbar && i.predefinedTagNames?.includes(e) ? { tags: r.tags } : {
76
+ tags: a(r.tags, e)
77
+ };
78
+ });
79
+ },
80
+ selectSmartfilterOption: (e, r, i) => t((s) => {
81
+ const n = {
82
+ id: r.id,
83
+ label: r.label,
84
+ metapropertyName: e
85
+ }, d = s.selectedSmartfilterOptions[e] || {}, o = !!d[r.id];
86
+ return i ? {
87
+ selectedSmartfilterOptions: {
88
+ ...s.selectedSmartfilterOptions,
89
+ [e]: o ? (
90
+ // Remove if already selected
91
+ Object.fromEntries(
92
+ Object.entries(d).filter(
93
+ ([p]) => p !== r.id
94
+ )
95
+ )
96
+ ) : (
97
+ // Add if not selected already
98
+ {
99
+ ...d,
100
+ [r.id]: n
101
+ }
102
+ )
103
+ }
104
+ } : o ? {
105
+ selectedSmartfilterOptions: {
106
+ ...s.selectedSmartfilterOptions,
107
+ [e]: {}
108
+ }
109
+ } : {
110
+ selectedSmartfilterOptions: {
111
+ ...s.selectedSmartfilterOptions,
112
+ [e]: {
113
+ [r.id]: n
114
+ }
115
+ }
116
+ };
117
+ }),
118
+ removeSmartfilterOption: (e, r) => t((i) => {
119
+ const { [e]: s, ...n } = i.selectedSmartfilterOptions, { [r]: d, ...o } = s || {};
120
+ return o && Object.keys(o).length > 0 ? {
121
+ selectedSmartfilterOptions: {
122
+ ...i.selectedSmartfilterOptions,
123
+ [e]: o
124
+ }
125
+ } : { selectedSmartfilterOptions: n };
126
+ }),
127
+ setActiveFiltersState: (e) => {
128
+ const r = e.count, i = Object.entries(r || {}).filter(
129
+ ([s, n]) => s.startsWith("property") && n && Object.keys(n).length > 0
130
+ ).reduce((s, [n, d]) => (s[n.replace("property_", "")] = d, s), {});
131
+ t({ existingFilters: i });
132
+ },
133
+ clear: () => t((e) => {
134
+ const r = e.predefinedFilter?.showToolbar && e.predefinedFilter?.predefinedAssetType ? [...e.predefinedFilter.predefinedAssetType] : [], i = e.predefinedFilter?.showToolbar && e.predefinedFilter?.predefinedTagNames ? [...e.predefinedFilter.predefinedTagNames] : [];
135
+ return {
136
+ assetTypes: r,
137
+ tags: i,
138
+ selectedSmartfilterOptions: {},
139
+ existingFilters: null
140
+ };
141
+ }),
142
+ setDropdownState: (e) => t({ isDropdownActive: e }),
143
+ setHideLimitedUse: (e) => t(() => ({
144
+ isLimited: e ? !1 : void 0
145
+ }))
146
+ }),
147
+ { name: "AssetFilterStore", enabled: !1 }
148
+ )
149
+ );
150
+ export {
151
+ u as useAssetFilterStore
152
+ };
package/useDatStore.js CHANGED
@@ -1,4 +1,4 @@
1
- import { devtools as f } from "./middleware2.js";
1
+ import { devtools as f } from "./middleware.js";
2
2
  import { createSelectors as c } from "./createSelectors.js";
3
3
  import { create as l } from "./react.js";
4
4
  const i = l()(
package/useEffectEvent.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { useLayoutEffect as f } from "./useLayoutEffect.js";
2
- import o, { useRef as u, useCallback as n } from "react";
2
+ import u, { useRef as o, useCallback as n } from "react";
3
3
  var a;
4
- const s = (a = o.useInsertionEffect) !== null && a !== void 0 ? a : f;
5
- function d(c) {
6
- const t = u(null);
4
+ const s = (a = u.useInsertionEffect) !== null && a !== void 0 ? a : f;
5
+ function d(t) {
6
+ const c = o(null);
7
7
  return s(() => {
8
- t.current = c;
8
+ c.current = t;
9
9
  }, [
10
- c
10
+ t
11
11
  ]), n((...r) => {
12
- const e = t.current;
12
+ const e = c.current;
13
13
  return e?.(...r);
14
14
  }, []);
15
15
  }
package/useFonts.js CHANGED
@@ -2,9 +2,9 @@ import { useState as o, useCallback as c, useEffect as E, useMemo as O } from "r
2
2
  import { produce as d } from "./immer.js";
3
3
  import { useDebouncedCallback as x } from "./index.module3.js";
4
4
  import { notify as P } from "./notify.js";
5
- import { useTranslate as B } from "./index6.js";
5
+ import { useTranslate as B } from "./index12.js";
6
6
  import { API as T } from "./api2.js";
7
- import { filterFamilies as k, moveSelectedFamilyToTop as w, getFamilyAndSubfamily as U, getDefaultFont as H } from "./utils7.js";
7
+ import { filterFamilies as k, moveSelectedFamilyToTop as w, getFamilyAndSubfamily as U, getDefaultFont as H } from "./utils8.js";
8
8
  import { captureException as b } from "./exports3.js";
9
9
  const M = 500, Z = 20;
10
10
  function $(A) {
@@ -1,4 +1,4 @@
1
- import { devtools as c } from "./middleware2.js";
1
+ import { devtools as c } from "./middleware.js";
2
2
  import { createSelectors as l } from "./createSelectors.js";
3
3
  import { create as d } from "./react.js";
4
4
  const s = {
package/useRouterStore.js CHANGED
@@ -1,4 +1,4 @@
1
- import { devtools as s } from "./middleware2.js";
1
+ import { devtools as s } from "./middleware.js";
2
2
  import { createSelectors as a } from "./createSelectors.js";
3
3
  import { create as c } from "./react.js";
4
4
  const r = c()(
package/useSearchStore.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useEffect as i } from "react";
2
- import { devtools as l } from "./middleware2.js";
2
+ import { devtools as l } from "./middleware.js";
3
3
  import { createSelectors as S } from "./createSelectors.js";
4
4
  import { create as f } from "./react.js";
5
5
  const n = {