@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/index5.js CHANGED
@@ -1,27 +1,219 @@
1
- var f, h;
2
- function c() {
3
- return h || (h = 1, f = function(e, r, a, i) {
4
- var t = a ? a.call(i, e, r) : void 0;
5
- if (t !== void 0)
6
- return !!t;
7
- if (e === r)
8
- return !0;
9
- if (typeof e != "object" || !e || typeof r != "object" || !r)
10
- return !1;
11
- var n = Object.keys(e), q = Object.keys(r);
12
- if (n.length !== q.length)
13
- return !1;
14
- for (var w = Object.prototype.hasOwnProperty.bind(r), u = 0; u < n.length; u++) {
15
- var l = n[u];
16
- if (!w(l))
17
- return !1;
18
- var s = e[l], v = r[l];
19
- if (t = a ? a.call(i, s, v, l) : void 0, t === !1 || t === void 0 && s !== v)
20
- return !1;
1
+ import ee, { useRef as b, useState as te, useEffect as y } from "react";
2
+ import { createPortal as ne } from "react-dom";
3
+ import v from "./index13.js";
4
+ import { useForwardedRef as re } from "./index.m.js";
5
+ import { jsxs as S, jsx as c } from "react/jsx-runtime";
6
+ import { disableBodyScroll as oe, enableBodyScroll as ae } from "./bodyScrollLock.esm.js";
7
+ const ie = ({ classes: e, classNames: t, styles: n, id: a, closeIcon: o, onClick: r }) => /* @__PURE__ */ c("button", {
8
+ id: a,
9
+ className: v(e.closeButton, t?.closeButton),
10
+ style: n?.closeButton,
11
+ onClick: r,
12
+ "data-testid": "close-button",
13
+ children: o || /* @__PURE__ */ c("svg", {
14
+ className: t?.closeIcon,
15
+ style: n?.closeIcon,
16
+ width: 28,
17
+ height: 28,
18
+ viewBox: "0 0 36 36",
19
+ "data-testid": "close-icon",
20
+ children: /* @__PURE__ */ c("path", { d: "M28.5 9.62L26.38 7.5 18 15.88 9.62 7.5 7.5 9.62 15.88 18 7.5 26.38l2.12 2.12L18 20.12l8.38 8.38 2.12-2.12L20.12 18z" })
21
+ })
22
+ });
23
+ var le = ie;
24
+ const g = typeof window < "u", L = [
25
+ "input",
26
+ "select",
27
+ "textarea",
28
+ "a[href]",
29
+ "button",
30
+ "[tabindex]",
31
+ "audio[controls]",
32
+ "video[controls]",
33
+ '[contenteditable]:not([contenteditable="false"])'
34
+ ];
35
+ function ue(e) {
36
+ return e.offsetParent === null || getComputedStyle(e).visibility === "hidden";
37
+ }
38
+ function ce(e, t) {
39
+ for (var n = 0; n < e.length; n++) if (e[n].checked && e[n].form === t) return e[n];
40
+ }
41
+ function de(e) {
42
+ if (e.tagName !== "INPUT" || e.type !== "radio" || !e.name) return !0;
43
+ var t = e.form || e.ownerDocument, n = t.querySelectorAll('input[type="radio"][name="' + e.name + '"]'), a = ce(n, e.form);
44
+ return a === e || a === void 0 && n[0] === e;
45
+ }
46
+ function M(e) {
47
+ for (var t = document.activeElement, n = e.querySelectorAll(L.join(",")), a = [], o = 0; o < n.length; o++) {
48
+ var r = n[o];
49
+ (t === r || !r.disabled && me(r) > -1 && !ue(r) && de(r)) && a.push(r);
50
+ }
51
+ return a;
52
+ }
53
+ function se(e, t) {
54
+ if (!(!e || e.key !== "Tab")) {
55
+ if (!t || !t.contains)
56
+ return process && console.warn("focus-trap-js: parent element is not defined"), !1;
57
+ if (!t.contains(e.target)) return !1;
58
+ var n = M(t), a = n[0], o = n[n.length - 1];
59
+ return e.shiftKey && e.target === a ? (o.focus(), e.preventDefault(), !0) : !e.shiftKey && e.target === o ? (a.focus(), e.preventDefault(), !0) : !1;
60
+ }
61
+ }
62
+ function me(e) {
63
+ var t = parseInt(e.getAttribute("tabindex"), 10);
64
+ return isNaN(t) ? fe(e) ? 0 : e.tabIndex : t;
65
+ }
66
+ function fe(e) {
67
+ return e.getAttribute("contentEditable");
68
+ }
69
+ const ve = ({ container: e, initialFocusRef: t }) => {
70
+ const n = b(null);
71
+ return y(() => {
72
+ const a = (o) => {
73
+ e?.current && se(o, e.current);
74
+ };
75
+ if (g && document.addEventListener("keydown", a), g && e?.current) {
76
+ const o = () => {
77
+ L.findIndex((r) => document.activeElement?.matches(r)) !== -1 && (n.current = document.activeElement);
78
+ };
79
+ if (t)
80
+ o(), requestAnimationFrame(() => {
81
+ t.current?.focus();
82
+ });
83
+ else {
84
+ const r = M(e.current);
85
+ r[0] && (o(), r[0].focus());
86
+ }
21
87
  }
22
- return !0;
23
- }), f;
88
+ return () => {
89
+ g && (document.removeEventListener("keydown", a), n.current?.focus());
90
+ };
91
+ }, [e, t]), null;
92
+ };
93
+ let s = [];
94
+ const E = {
95
+ add: (e) => {
96
+ s.push(e);
97
+ },
98
+ remove: (e) => {
99
+ s = s.filter((t) => t !== e);
100
+ },
101
+ isTopModal: (e) => !!s.length && s[s.length - 1] === e
102
+ };
103
+ function be(e, t) {
104
+ y(() => (t && E.add(e), () => {
105
+ E.remove(e);
106
+ }), [t, e]);
24
107
  }
108
+ const ye = (e, t, n, a, o) => {
109
+ const r = b(null);
110
+ y(() => (t && e.current && a && (r.current = e.current, oe(e.current, { reserveScrollBarGap: o })), () => {
111
+ r.current && (ae(r.current), r.current = null);
112
+ }), [
113
+ t,
114
+ n,
115
+ e,
116
+ a,
117
+ o
118
+ ]);
119
+ }, i = {
120
+ root: "react-responsive-modal-root",
121
+ overlay: "react-responsive-modal-overlay",
122
+ overlayAnimationIn: "react-responsive-modal-overlay-in",
123
+ overlayAnimationOut: "react-responsive-modal-overlay-out",
124
+ modalContainer: "react-responsive-modal-container",
125
+ modalContainerCenter: "react-responsive-modal-containerCenter",
126
+ modal: "react-responsive-modal-modal",
127
+ modalAnimationIn: "react-responsive-modal-modal-in",
128
+ modalAnimationOut: "react-responsive-modal-modal-out",
129
+ closeButton: "react-responsive-modal-closeButton"
130
+ }, he = ee.forwardRef(({ open: e, center: t, blockScroll: n = !0, closeOnEsc: a = !0, closeOnOverlayClick: o = !0, container: r, showCloseIcon: O = !0, closeIconId: B, closeIcon: P, focusTrapped: R = !0, initialFocusRef: _ = void 0, animationDuration: w = 300, classNames: l, styles: m, role: F = "dialog", ariaLabel: K, ariaDescribedby: j, ariaLabelledby: D, containerId: $, modalId: q, onClose: A, onEscKeyDown: N, onOverlayClick: U, onAnimationEnd: z, children: H, reserveScrollBarGap: J }, Q) => {
131
+ const I = re(Q), h = b(null), d = b(null), u = b(null);
132
+ u.current === null && g && (u.current = document.createElement("div"));
133
+ const [f, k] = te(!1);
134
+ be(h, e), ye(h, e, f, n, J);
135
+ const V = () => {
136
+ u.current && !r && !document.body.contains(u.current) && document.body.appendChild(u.current), document.addEventListener("keydown", x);
137
+ }, W = () => {
138
+ u.current && !r && document.body.contains(u.current) && document.body.removeChild(u.current), document.removeEventListener("keydown", x);
139
+ }, x = (p) => {
140
+ p.keyCode !== 27 || !E.isTopModal(h) || (N?.(p), a && A());
141
+ };
142
+ y(() => () => {
143
+ f && W();
144
+ }, [f]), y(() => {
145
+ e && !f && (k(!0), V());
146
+ }, [e]);
147
+ const X = (p) => {
148
+ if (d.current === null && (d.current = !0), !d.current) {
149
+ d.current = null;
150
+ return;
151
+ }
152
+ U?.(p), o && A(), d.current = null;
153
+ }, C = () => {
154
+ d.current = !1;
155
+ }, Y = () => {
156
+ e || k(!1), z?.();
157
+ }, T = r || u.current, Z = e ? l?.overlayAnimationIn ?? i.overlayAnimationIn : l?.overlayAnimationOut ?? i.overlayAnimationOut, G = e ? l?.modalAnimationIn ?? i.modalAnimationIn : l?.modalAnimationOut ?? i.modalAnimationOut;
158
+ return f && T ? ne(/* @__PURE__ */ S("div", {
159
+ className: v(i.root, l?.root),
160
+ style: m?.root,
161
+ "data-testid": "root",
162
+ children: [/* @__PURE__ */ c("div", {
163
+ className: v(i.overlay, l?.overlay),
164
+ "data-testid": "overlay",
165
+ "aria-hidden": !0,
166
+ style: {
167
+ animation: `${Z} ${w}ms`,
168
+ ...m?.overlay
169
+ }
170
+ }), /* @__PURE__ */ c("div", {
171
+ ref: h,
172
+ id: $,
173
+ className: v(i.modalContainer, t && i.modalContainerCenter, l?.modalContainer),
174
+ style: m?.modalContainer,
175
+ "data-testid": "modal-container",
176
+ onClick: X,
177
+ children: /* @__PURE__ */ S("div", {
178
+ ref: I,
179
+ className: v(i.modal, l?.modal),
180
+ style: {
181
+ animation: `${G} ${w}ms`,
182
+ ...m?.modal
183
+ },
184
+ onMouseDown: C,
185
+ onMouseUp: C,
186
+ onClick: C,
187
+ onAnimationEnd: Y,
188
+ id: q,
189
+ role: F,
190
+ "aria-modal": "true",
191
+ "aria-label": K,
192
+ "aria-labelledby": D,
193
+ "aria-describedby": j,
194
+ "data-testid": "modal",
195
+ tabIndex: -1,
196
+ children: [
197
+ R && /* @__PURE__ */ c(ve, {
198
+ container: I,
199
+ initialFocusRef: _
200
+ }),
201
+ H,
202
+ O && /* @__PURE__ */ c(le, {
203
+ classes: i,
204
+ classNames: l,
205
+ styles: m,
206
+ closeIcon: P,
207
+ onClick: A,
208
+ id: B
209
+ })
210
+ ]
211
+ })
212
+ })]
213
+ }), T) : null;
214
+ });
215
+ var Ie = he;
25
216
  export {
26
- c as __require
217
+ he as Modal,
218
+ Ie as default
27
219
  };