@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.
- package/AccessToken2.js +1 -1
- package/ActiveFilters.js +49 -50
- package/AddMedia.js +19 -18
- package/Advanced.js +13 -13
- package/App.js +60 -59
- package/Arrow.js +1 -1
- package/AssetFilter.js +38 -38
- package/AssetItem.js +10 -17
- package/AssetList.js +5 -5
- package/AssetTypeItem.js +21 -21
- package/AssetsView.js +13 -13
- package/Axios2.js +82 -76
- package/AxiosError.js +36 -35
- package/ButtonAction.js +1 -1
- package/CanceledError.js +15 -8
- package/Card.js +1 -1
- package/Chip.js +1 -1
- package/CollectionCard.js +22 -22
- package/CollectionItem.js +9 -9
- package/CollectionList.js +5 -5
- package/CollectionView.js +11 -11
- package/ColorPicker.js +1 -1
- package/ColorPickerSolid.js +3 -3
- package/ColorPickerWithOpacity.js +3 -3
- package/Component.js +158 -0
- package/Component2.js +4 -0
- package/ConfigContext.js +7 -8
- package/Container.js +1 -1
- package/ContextAction.js +1 -1
- package/ControlGroup.js +6 -6
- package/Dat.js +33 -32
- package/DatDropdownItem.js +1 -1
- package/DesignSystemProvider.js +7 -7
- package/DirectionSelect.js +11 -10
- package/DomainInput.js +19 -11
- package/Draggable.js +337 -0
- package/Draggable2.js +4 -0
- package/DraggableCore.js +312 -0
- package/DraggableCore2.js +4 -0
- package/Dropdown.js +37 -37
- package/Dropdown2.js +1 -1
- package/DropdownListItem.js +1 -1
- package/FieldSelect.js +19 -17
- package/FileSelector.js +38 -37
- package/FontPicker.js +1 -1
- package/Form.js +1 -1
- package/Header.js +5 -4
- package/HttpStatusCode.js +7 -1
- package/InfiniteScroll.js +1 -1
- package/InlineBanner.js +1 -1
- package/Input.js +1 -1
- package/InterceptorManager.js +2 -1
- package/Item.js +8 -8
- package/Item4.js +2 -2
- package/LeftArrow.js +1 -1
- package/ListItem2.js +1 -1
- package/ModalBase.js +15 -15
- package/NoResults.js +1 -1
- package/Option_new.js +36 -29
- package/ReactPropTypesSecret.js +10 -0
- package/RightArrow.js +1 -1
- package/SearchInput.js +1 -1
- package/SearchInput2.js +1 -1
- package/SelectionFooter.js +41 -31
- package/Shield.js +2 -2
- package/Smartfilters_new.js +107 -98
- package/StatefulAssetList.js +50 -50
- package/StoreInitializer.js +32 -16
- package/SwitchNLS.js +1 -1
- package/TagItem.js +15 -15
- package/Tags.js +1 -1
- package/Toolbar.js +23 -20
- package/Tooltip2.js +1 -1
- package/ViewSwitch.js +17 -15
- package/_commonjsHelpers.js +28 -3
- package/adapters.js +54 -42
- package/api/filterAssets.d.ts +1 -1
- package/api/getAssets.d.ts +1 -1
- package/api/getFilters.d.ts +1 -1
- package/api/rest/index.d.ts +1 -1
- package/api/rest/types.d.ts +1 -1
- package/api2.js +1 -1
- package/asset.type.js +1 -1
- package/autocomplete.js +1 -1
- package/axios.js +1 -1
- package/bodyScrollLock.esm.js +68 -0
- package/buildURL.js +13 -15
- package/checkGlobals.js +1 -1
- package/cjs.js +7 -0
- package/cjs2.js +15 -0
- package/cjs3.js +4 -0
- package/clsx.m.js +6 -0
- package/clsx.m2.js +15 -0
- package/combineMetaproperties.js +3 -1
- package/composeSignals.js +1 -1
- package/cookieStore.js +1 -1
- package/cookies.js +13 -11
- package/currentScopes.js +1 -1
- package/data.js +1 -1
- package/devUtils.js +1 -1
- package/dispatchRequest.js +5 -5
- package/domFns.js +151 -0
- package/domFns2.js +4 -0
- package/factoryWithThrowingShims.js +52 -0
- package/fetch2.js +156 -128
- package/filter/AssetFilterContext.d.ts +3 -3
- package/filterAssets.js +1 -1
- package/getAsset.js +1 -1
- package/getAssetCounts.js +1 -1
- package/getAssets.js +1 -1
- package/getCollections.js +1 -1
- package/getFilterOptions.js +1 -1
- package/getFilters.js +1 -1
- package/getFilters_new.js +1 -1
- package/getPrefix.js +35 -0
- package/getPrefix2.js +4 -0
- package/getSimilarityAssets.js +1 -1
- package/goober.modern.js +75 -0
- package/handlers.js +1 -1
- package/iconBase.js +56 -0
- package/iconContext.js +12 -0
- package/iconsManifest.js +222 -0
- package/index-esm.js +1 -4
- package/index.browser.js +1 -1
- package/index.m.js +9 -0
- package/index.m2.js +17 -0
- package/index10.js +18 -2
- package/index11.js +181 -15
- package/index112.js +1 -1
- package/index12.js +313 -36
- package/index13.js +5 -2430
- package/index14.js +3 -557
- package/index15.js +15 -55
- package/index16.js +3 -2
- package/index17.js +3 -87
- package/index18.js +36 -60
- package/index19.js +3 -7
- package/index20.js +2429 -12
- package/index21.js +557 -10
- package/index22.js +1 -1
- package/index23.js +119 -6
- package/index24.js +39 -7
- package/index25.js +2 -5
- package/index26.js +86 -9
- package/index27.js +55 -8
- package/index28.js +6 -636
- package/index29.js +8692 -74
- package/index3.js +1684 -5
- package/index30.js +2 -5
- package/index31.js +4 -20
- package/index310.js +2 -0
- package/index32.js +11 -2
- package/index33.js +5083 -4
- package/index34.js +2 -18
- package/index35.js +59 -5
- package/index36.js +2 -2
- package/index37.js +13 -11
- package/index38.js +46 -10
- package/index39.js +6 -12
- package/index4.js +5 -1684
- package/index40.js +8 -11
- package/index41.js +26 -18
- package/index42.js +2 -64
- package/index43.js +63 -5
- package/index44.js +9 -55
- package/index45.js +7 -67
- package/index46.js +8 -31
- package/index47.js +5 -11
- package/index48.js +10 -121
- package/index49.js +9 -86
- package/index5.js +215 -23
- package/index50.js +636 -7
- package/index51.js +74 -11
- package/index52.js +4 -13
- package/index53.js +19 -13
- package/index54.js +4 -6
- package/index55.js +18 -7
- package/index56.js +5 -14
- package/index57.js +10 -28
- package/index58.js +10 -15
- package/index59.js +15 -0
- package/index6.js +250 -299
- package/index60.js +13 -0
- package/index61.js +21 -0
- package/index62.js +8 -0
- package/index63.js +57 -0
- package/index64.js +4 -0
- package/index65.js +69 -0
- package/index66.js +33 -0
- package/index67.js +13 -0
- package/index68.js +123 -0
- package/index69.js +88 -0
- package/index7.js +22 -5047
- package/index70.js +10 -0
- package/index71.js +13 -0
- package/index72.js +13 -225
- package/index73.js +16 -0
- package/index74.js +9 -0
- package/index75.js +228 -0
- package/index76.js +9 -0
- package/index77.js +17 -0
- package/index78.js +31 -0
- package/index79.js +18 -0
- package/index8.js +5044 -47
- package/index9.js +50 -15
- package/isAbsoluteURL.js +1 -1
- package/isURLSameOrigin.js +1 -1
- package/localization.js +15 -15
- package/log.js +14 -0
- package/log2.js +4 -0
- package/matchRequestUrl.js +1 -1
- package/mergeConfig.js +37 -32
- package/notify.js +2 -2
- package/package.json +1 -1
- package/positionFns.js +101 -0
- package/positionFns2.js +4 -0
- package/react-laag.esm.js +957 -0
- package/react.js +8 -8
- package/react2.js +9 -9
- package/resolveConfig.js +23 -23
- package/select/add-media/AddMedia.d.ts +3 -1
- package/select/current-selection/SelectedItems.d.ts +1 -1
- package/shims.js +29 -0
- package/shims2.js +4 -0
- package/store/StoreInitializer.d.ts +5 -1
- package/store/useAssetFilterStore.d.ts +55 -0
- package/store/useSelectionStore.d.ts +47 -0
- package/styled-components.browser.esm.js +2 -2
- package/throttle.js +1 -1
- package/toURLEncodedForm.js +11 -10
- package/tokenExpirationHelper.js +1 -1
- package/transformData.js +1 -1
- package/transitional.js +4 -3
- package/useAssetFilterStore.js +152 -0
- package/useDatStore.js +1 -1
- package/useEffectEvent.js +7 -7
- package/useFonts.js +2 -2
- package/useOrderingStore.js +1 -1
- package/useRouterStore.js +1 -1
- package/useSearchStore.js +1 -1
- package/useSelectionStore.js +131 -0
- package/useSimilaritySearchStore.js +1 -1
- package/useTranslate.js +1 -1
- package/utils/combineMetaproperties.d.ts +2 -0
- package/utils6.js +160 -118
- package/utils7.js +7 -68
- package/utils8.js +68 -7
- package/xhr.js +47 -46
- package/AssetFilterContext.js +0 -161
- package/SelectionContext.js +0 -143
- package/select/SelectionContext.d.ts +0 -30
- /package/{Middleware.js → Middleware2.js} +0 -0
- /package/{middleware2.js → middleware.js} +0 -0
package/index5.js
CHANGED
|
@@ -1,27 +1,219 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
|
23
|
-
|
|
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
|
-
|
|
217
|
+
he as Modal,
|
|
218
|
+
Ie as default
|
|
27
219
|
};
|