@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.
- 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/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/getPrefix.js +35 -0
- package/getPrefix2.js +4 -0
- 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 +1 -1
- 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 -7
- package/index19.js +3 -60
- 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 +25 -2
- 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 +1537 -1536
- package/index9.js +1 -1
- 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 +1 -1
- 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/xhr.js +47 -46
- package/AssetFilterContext.js +0 -161
- package/Middleware.js +0 -49
- package/SelectionContext.js +0 -143
- package/middleware2.js +0 -177
- package/select/SelectionContext.d.ts +0 -30
package/index6.js
CHANGED
|
@@ -1,315 +1,266 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as i from "react";
|
|
2
|
+
import { keyframes as c, css as x, styled as l, setup as v } from "./goober.modern.js";
|
|
3
|
+
var w = (t) => typeof t == "function", u = (t, e) => w(t) ? t(e) : t, $ = /* @__PURE__ */ (() => {
|
|
4
|
+
let t = 0;
|
|
5
|
+
return () => (++t).toString();
|
|
6
|
+
})(), E = /* @__PURE__ */ (() => {
|
|
7
|
+
let t;
|
|
8
|
+
return () => {
|
|
9
|
+
if (t === void 0 && typeof window < "u") {
|
|
10
|
+
let e = matchMedia("(prefers-reduced-motion: reduce)");
|
|
11
|
+
t = !e || e.matches;
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
14
|
+
};
|
|
15
|
+
})(), k = 20, y = "default", b = (t, e) => {
|
|
16
|
+
let { toastLimit: a } = t.settings;
|
|
17
|
+
switch (e.type) {
|
|
18
|
+
case 0:
|
|
19
|
+
return { ...t, toasts: [e.toast, ...t.toasts].slice(0, a) };
|
|
20
|
+
case 1:
|
|
21
|
+
return { ...t, toasts: t.toasts.map((r) => r.id === e.toast.id ? { ...r, ...e.toast } : r) };
|
|
22
|
+
case 2:
|
|
23
|
+
let { toast: o } = e;
|
|
24
|
+
return b(t, { type: t.toasts.find((r) => r.id === o.id) ? 1 : 0, toast: o });
|
|
25
|
+
case 3:
|
|
26
|
+
let { toastId: n } = e;
|
|
27
|
+
return { ...t, toasts: t.toasts.map((r) => r.id === n || n === void 0 ? { ...r, dismissed: !0, visible: !1 } : r) };
|
|
28
|
+
case 4:
|
|
29
|
+
return e.toastId === void 0 ? { ...t, toasts: [] } : { ...t, toasts: t.toasts.filter((r) => r.id !== e.toastId) };
|
|
30
|
+
case 5:
|
|
31
|
+
return { ...t, pausedAt: e.time };
|
|
32
|
+
case 6:
|
|
33
|
+
let d = e.time - (t.pausedAt || 0);
|
|
34
|
+
return { ...t, pausedAt: void 0, toasts: t.toasts.map((r) => ({ ...r, pauseDuration: r.pauseDuration + d })) };
|
|
12
35
|
}
|
|
36
|
+
}, I = [], z = { toasts: [], pausedAt: void 0, settings: { toastLimit: k } }, p = {}, g = (t, e = y) => {
|
|
37
|
+
p[e] = b(p[e] || z, t), I.forEach(([a, o]) => {
|
|
38
|
+
a === e && o(p[e]);
|
|
39
|
+
});
|
|
40
|
+
}, h = (t) => Object.keys(p).forEach((e) => g(t, e)), A = (t) => Object.keys(p).find((e) => p[e].toasts.some((a) => a.id === t)), f = (t = y) => (e) => {
|
|
41
|
+
g(e, t);
|
|
42
|
+
}, j = (t, e = "blank", a) => ({ createdAt: Date.now(), visible: !0, dismissed: !1, type: e, ariaProps: { role: "status", "aria-live": "polite" }, message: t, pauseDuration: 0, ...a, id: a?.id || $() }), m = (t) => (e, a) => {
|
|
43
|
+
let o = j(e, t, a);
|
|
44
|
+
return f(o.toasterId || A(o.id))({ type: 2, toast: o }), o.id;
|
|
45
|
+
}, s = (t, e) => m("blank")(t, e);
|
|
46
|
+
s.error = m("error");
|
|
47
|
+
s.success = m("success");
|
|
48
|
+
s.loading = m("loading");
|
|
49
|
+
s.custom = m("custom");
|
|
50
|
+
s.dismiss = (t, e) => {
|
|
51
|
+
let a = { type: 3, toastId: t };
|
|
52
|
+
e ? f(e)(a) : h(a);
|
|
53
|
+
};
|
|
54
|
+
s.dismissAll = (t) => s.dismiss(void 0, t);
|
|
55
|
+
s.remove = (t, e) => {
|
|
56
|
+
let a = { type: 4, toastId: t };
|
|
57
|
+
e ? f(e)(a) : h(a);
|
|
58
|
+
};
|
|
59
|
+
s.removeAll = (t) => s.remove(void 0, t);
|
|
60
|
+
s.promise = (t, e, a) => {
|
|
61
|
+
let o = s.loading(e.loading, { ...a, ...a?.loading });
|
|
62
|
+
return typeof t == "function" && (t = t()), t.then((n) => {
|
|
63
|
+
let d = e.success ? u(e.success, n) : void 0;
|
|
64
|
+
return d ? s.success(d, { id: o, ...a, ...a?.success }) : s.dismiss(o), n;
|
|
65
|
+
}).catch((n) => {
|
|
66
|
+
let d = e.error ? u(e.error, n) : void 0;
|
|
67
|
+
d ? s.error(d, { id: o, ...a, ...a?.error }) : s.dismiss(o);
|
|
68
|
+
}), t;
|
|
69
|
+
};
|
|
70
|
+
var D = c`
|
|
71
|
+
from {
|
|
72
|
+
transform: scale(0) rotate(45deg);
|
|
73
|
+
opacity: 0;
|
|
13
74
|
}
|
|
14
|
-
|
|
15
|
-
(
|
|
16
|
-
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
this.input = new v(e);
|
|
22
|
-
}
|
|
23
|
-
next() {
|
|
24
|
-
return this.input.value === f ? this.readVariable() : this.readText();
|
|
25
|
-
}
|
|
26
|
-
skip(e) {
|
|
27
|
-
e !== this.input.value && this.input.croak(), this.input.next();
|
|
28
|
-
}
|
|
29
|
-
readWhile(e) {
|
|
30
|
-
let n = "";
|
|
31
|
-
for (; !this.input.done && e(this.input.value); )
|
|
32
|
-
n += this.input.value, this.input.next();
|
|
33
|
-
return n;
|
|
34
|
-
}
|
|
35
|
-
readVariable() {
|
|
36
|
-
this.skip(f);
|
|
37
|
-
const e = this.readWhile((r) => !S(r)).trim();
|
|
38
|
-
if (e.length === 0 && this.input.croak(), this.input.value === l)
|
|
39
|
-
return this.skip(l), {
|
|
40
|
-
type: u.Variable,
|
|
41
|
-
value: e
|
|
42
|
-
};
|
|
43
|
-
this.skip(p);
|
|
44
|
-
const n = this.readVariableType();
|
|
45
|
-
return {
|
|
46
|
-
options: this.readVariableOptions(),
|
|
47
|
-
type: n,
|
|
48
|
-
value: e
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
readText() {
|
|
52
|
-
return {
|
|
53
|
-
type: u.Text,
|
|
54
|
-
value: this.readWhile((e) => e !== f && e !== l)
|
|
55
|
-
};
|
|
56
|
-
}
|
|
57
|
-
readVariableType() {
|
|
58
|
-
const e = this.readWhile((n) => n !== p).trim();
|
|
59
|
-
if (e === L)
|
|
60
|
-
return u.Plural;
|
|
61
|
-
if (e === C)
|
|
62
|
-
return u.Select;
|
|
63
|
-
this.input.croak();
|
|
64
|
-
}
|
|
65
|
-
readVariableOptions() {
|
|
66
|
-
this.skip(p);
|
|
67
|
-
const e = {};
|
|
68
|
-
for (; this.input.value !== l; )
|
|
69
|
-
e[this.readText().value.trim()] = this.readExpression();
|
|
70
|
-
return this.skip(l), e;
|
|
71
|
-
}
|
|
72
|
-
readExpression() {
|
|
73
|
-
const e = [];
|
|
74
|
-
for (this.skip(f); this.input.value !== l; )
|
|
75
|
-
e.push(this.next());
|
|
76
|
-
return this.skip(l), e;
|
|
77
|
-
}
|
|
75
|
+
to {
|
|
76
|
+
transform: scale(1) rotate(45deg);
|
|
77
|
+
opacity: 1;
|
|
78
|
+
}`, L = c`
|
|
79
|
+
from {
|
|
80
|
+
transform: scale(0);
|
|
81
|
+
opacity: 0;
|
|
78
82
|
}
|
|
79
|
-
|
|
80
|
-
|
|
83
|
+
to {
|
|
84
|
+
transform: scale(1);
|
|
85
|
+
opacity: 1;
|
|
86
|
+
}`, P = c`
|
|
87
|
+
from {
|
|
88
|
+
transform: scale(0) rotate(90deg);
|
|
89
|
+
opacity: 0;
|
|
81
90
|
}
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
"
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
"assets",
|
|
112
|
-
"asset",
|
|
113
|
-
"subbrand",
|
|
114
|
-
"Subbrands",
|
|
115
|
-
"category",
|
|
116
|
-
"task",
|
|
117
|
-
"Stage",
|
|
118
|
-
"accountable",
|
|
119
|
-
"tasks",
|
|
120
|
-
"stage",
|
|
121
|
-
"Categories",
|
|
122
|
-
"Category",
|
|
123
|
-
"stages",
|
|
124
|
-
"Task",
|
|
125
|
-
"Stages",
|
|
126
|
-
"Tasks",
|
|
127
|
-
"Accountable"
|
|
128
|
-
];
|
|
129
|
-
function I({ locale: t, translation: e, values: n, wordReplacements: r }) {
|
|
130
|
-
const s = new P(e), a = [];
|
|
131
|
-
for (; !s.input.done; )
|
|
132
|
-
o(s.next());
|
|
133
|
-
return a;
|
|
134
|
-
function o({ options: h, type: d, value: i }) {
|
|
135
|
-
if (d === u.Variable) {
|
|
136
|
-
if (R.includes(i)) {
|
|
137
|
-
r[i] ? a.push(r[i]) : a.push(i);
|
|
138
|
-
return;
|
|
139
|
-
}
|
|
140
|
-
a.push(n[i]);
|
|
141
|
-
return;
|
|
142
|
-
}
|
|
143
|
-
if (!h) {
|
|
144
|
-
a.push(i);
|
|
145
|
-
return;
|
|
146
|
-
}
|
|
147
|
-
if (d === u.Select) {
|
|
148
|
-
h[n[i]].map(o);
|
|
149
|
-
return;
|
|
150
|
-
}
|
|
151
|
-
const m = t.replace("_", "-");
|
|
152
|
-
h[new Intl.PluralRules(m).select(n[i])].map(o);
|
|
91
|
+
to {
|
|
92
|
+
transform: scale(1) rotate(90deg);
|
|
93
|
+
opacity: 1;
|
|
94
|
+
}`, O = l("div")`
|
|
95
|
+
width: 20px;
|
|
96
|
+
opacity: 0;
|
|
97
|
+
height: 20px;
|
|
98
|
+
border-radius: 10px;
|
|
99
|
+
background: ${(t) => t.primary || "#ff4b4b"};
|
|
100
|
+
position: relative;
|
|
101
|
+
transform: rotate(45deg);
|
|
102
|
+
|
|
103
|
+
animation: ${D} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
104
|
+
forwards;
|
|
105
|
+
animation-delay: 100ms;
|
|
106
|
+
|
|
107
|
+
&:after,
|
|
108
|
+
&:before {
|
|
109
|
+
content: '';
|
|
110
|
+
animation: ${L} 0.15s ease-out forwards;
|
|
111
|
+
animation-delay: 150ms;
|
|
112
|
+
position: absolute;
|
|
113
|
+
border-radius: 3px;
|
|
114
|
+
opacity: 0;
|
|
115
|
+
background: ${(t) => t.secondary || "#fff"};
|
|
116
|
+
bottom: 9px;
|
|
117
|
+
left: 4px;
|
|
118
|
+
height: 2px;
|
|
119
|
+
width: 12px;
|
|
153
120
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
constructor(e, n, r) {
|
|
160
|
-
this.memo = {}, this.onError = console.error, this.translateParts = (s, a) => {
|
|
161
|
-
const o = this.getTranslationById(s);
|
|
162
|
-
try {
|
|
163
|
-
return I({
|
|
164
|
-
locale: this.locale,
|
|
165
|
-
translation: o,
|
|
166
|
-
values: a,
|
|
167
|
-
wordReplacements: this.wordReplacements
|
|
168
|
-
});
|
|
169
|
-
} catch (h) {
|
|
170
|
-
return this.onError(h), [o];
|
|
171
|
-
}
|
|
172
|
-
}, this.translate = (s, a = {}) => this.translateParts(s, a).join(""), this.getTranslationById = (s) => {
|
|
173
|
-
if (!this.memo[s]) {
|
|
174
|
-
let a = this.translations[s];
|
|
175
|
-
typeof a != "string" && (this.onError(new Error(`Localization: Missing translation with ID "${s}"`)), a = s), this.memo[s] = a;
|
|
176
|
-
}
|
|
177
|
-
return this.memo[s];
|
|
178
|
-
}, this.locale = k(n), r ? (this.translations = {
|
|
179
|
-
...e,
|
|
180
|
-
...r.translations
|
|
181
|
-
}, this.wordReplacements = r.wordReplacements) : (this.translations = {
|
|
182
|
-
...e
|
|
183
|
-
}, this.wordReplacements = {});
|
|
121
|
+
|
|
122
|
+
&:before {
|
|
123
|
+
animation: ${P} 0.15s ease-out forwards;
|
|
124
|
+
animation-delay: 180ms;
|
|
125
|
+
transform: rotate(90deg);
|
|
184
126
|
}
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
const e = {
|
|
189
|
-
translations: {},
|
|
190
|
-
wordReplacements: {}
|
|
191
|
-
};
|
|
192
|
-
if (!t.addCustomTranslations)
|
|
193
|
-
return e;
|
|
194
|
-
try {
|
|
195
|
-
const n = await V(), r = _(n), s = await fetch(r, {
|
|
196
|
-
method: "GET",
|
|
197
|
-
headers: {
|
|
198
|
-
"Content-Type": "application/json"
|
|
199
|
-
}
|
|
200
|
-
});
|
|
201
|
-
if (s.ok) {
|
|
202
|
-
const o = await s.json();
|
|
203
|
-
return U(o, k(t.locale));
|
|
204
|
-
}
|
|
205
|
-
const a = await s.text();
|
|
206
|
-
throw new Error(a);
|
|
207
|
-
} catch (n) {
|
|
208
|
-
return console.error("Localization: Failed to fetch custom translations.", n), e;
|
|
127
|
+
`, S = c`
|
|
128
|
+
from {
|
|
129
|
+
transform: rotate(0deg);
|
|
209
130
|
}
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
return `/v7/portal/portals/${t}/custom-translations`;
|
|
213
|
-
}
|
|
214
|
-
async function V() {
|
|
215
|
-
try {
|
|
216
|
-
const t = await w.getJWT();
|
|
217
|
-
return w.decodeJWT(t).account_id;
|
|
218
|
-
} catch {
|
|
219
|
-
const e = await fetch("/v7/idp/access-tokens/userless-by-session").then((r) => r.json()).then((r) => r.access_token);
|
|
220
|
-
return w.decodeJWT(e).account_id;
|
|
131
|
+
to {
|
|
132
|
+
transform: rotate(360deg);
|
|
221
133
|
}
|
|
134
|
+
`, T = l("div")`
|
|
135
|
+
width: 12px;
|
|
136
|
+
height: 12px;
|
|
137
|
+
box-sizing: border-box;
|
|
138
|
+
border: 2px solid;
|
|
139
|
+
border-radius: 100%;
|
|
140
|
+
border-color: ${(t) => t.secondary || "#e0e0e0"};
|
|
141
|
+
border-right-color: ${(t) => t.primary || "#616161"};
|
|
142
|
+
animation: ${S} 1s linear infinite;
|
|
143
|
+
`, _ = c`
|
|
144
|
+
from {
|
|
145
|
+
transform: scale(0) rotate(45deg);
|
|
146
|
+
opacity: 0;
|
|
222
147
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
return r;
|
|
148
|
+
to {
|
|
149
|
+
transform: scale(1) rotate(45deg);
|
|
150
|
+
opacity: 1;
|
|
151
|
+
}`, C = c`
|
|
152
|
+
0% {
|
|
153
|
+
height: 0;
|
|
154
|
+
width: 0;
|
|
155
|
+
opacity: 0;
|
|
232
156
|
}
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
const [e, n] = await Promise.all([
|
|
238
|
-
b(t.fetchFallback),
|
|
239
|
-
W(t)
|
|
240
|
-
]);
|
|
241
|
-
return {
|
|
242
|
-
...e,
|
|
243
|
-
...n
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
return b(t.fetchFallback);
|
|
157
|
+
40% {
|
|
158
|
+
height: 0;
|
|
159
|
+
width: 6px;
|
|
160
|
+
opacity: 1;
|
|
247
161
|
}
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
162
|
+
100% {
|
|
163
|
+
opacity: 1;
|
|
164
|
+
height: 10px;
|
|
165
|
+
}`, F = l("div")`
|
|
166
|
+
width: 20px;
|
|
167
|
+
opacity: 0;
|
|
168
|
+
height: 20px;
|
|
169
|
+
border-radius: 10px;
|
|
170
|
+
background: ${(t) => t.primary || "#61d345"};
|
|
171
|
+
position: relative;
|
|
172
|
+
transform: rotate(45deg);
|
|
173
|
+
|
|
174
|
+
animation: ${_} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
175
|
+
forwards;
|
|
176
|
+
animation-delay: 100ms;
|
|
177
|
+
&:after {
|
|
178
|
+
content: '';
|
|
179
|
+
box-sizing: border-box;
|
|
180
|
+
animation: ${C} 0.2s ease-out forwards;
|
|
181
|
+
opacity: 0;
|
|
182
|
+
animation-delay: 200ms;
|
|
183
|
+
position: absolute;
|
|
184
|
+
border-right: 2px solid;
|
|
185
|
+
border-bottom: 2px solid;
|
|
186
|
+
border-color: ${(t) => t.secondary || "#fff"};
|
|
187
|
+
bottom: 6px;
|
|
188
|
+
left: 6px;
|
|
189
|
+
height: 10px;
|
|
190
|
+
width: 6px;
|
|
253
191
|
}
|
|
192
|
+
`, N = l("div")`
|
|
193
|
+
position: absolute;
|
|
194
|
+
`, R = l("div")`
|
|
195
|
+
position: relative;
|
|
196
|
+
display: flex;
|
|
197
|
+
justify-content: center;
|
|
198
|
+
align-items: center;
|
|
199
|
+
min-width: 20px;
|
|
200
|
+
min-height: 20px;
|
|
201
|
+
`, H = c`
|
|
202
|
+
from {
|
|
203
|
+
transform: scale(0.6);
|
|
204
|
+
opacity: 0.4;
|
|
254
205
|
}
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
206
|
+
to {
|
|
207
|
+
transform: scale(1);
|
|
208
|
+
opacity: 1;
|
|
209
|
+
}`, M = l("div")`
|
|
210
|
+
position: relative;
|
|
211
|
+
transform: scale(0.6);
|
|
212
|
+
opacity: 0.4;
|
|
213
|
+
min-width: 20px;
|
|
214
|
+
animation: ${H} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275)
|
|
215
|
+
forwards;
|
|
216
|
+
`, Q = ({ toast: t }) => {
|
|
217
|
+
let { icon: e, type: a, iconTheme: o } = t;
|
|
218
|
+
return e !== void 0 ? typeof e == "string" ? i.createElement(M, null, e) : e : a === "blank" ? null : i.createElement(R, null, i.createElement(T, { ...o }), a !== "loading" && i.createElement(N, null, a === "error" ? i.createElement(O, { ...o }) : i.createElement(F, { ...o })));
|
|
219
|
+
}, V = (t) => `
|
|
220
|
+
0% {transform: translate3d(0,${t * -200}%,0) scale(.6); opacity:.5;}
|
|
221
|
+
100% {transform: translate3d(0,0,0) scale(1); opacity:1;}
|
|
222
|
+
`, W = (t) => `
|
|
223
|
+
0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}
|
|
224
|
+
100% {transform: translate3d(0,${t * -150}%,-1px) scale(.6); opacity:0;}
|
|
225
|
+
`, Y = "0%{opacity:0;} 100%{opacity:1;}", Z = "0%{opacity:1;} 100%{opacity:0;}", q = l("div")`
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
background: #fff;
|
|
229
|
+
color: #363636;
|
|
230
|
+
line-height: 1.3;
|
|
231
|
+
will-change: transform;
|
|
232
|
+
box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05);
|
|
233
|
+
max-width: 350px;
|
|
234
|
+
pointer-events: auto;
|
|
235
|
+
padding: 8px 10px;
|
|
236
|
+
border-radius: 8px;
|
|
237
|
+
`, B = l("div")`
|
|
238
|
+
display: flex;
|
|
239
|
+
justify-content: center;
|
|
240
|
+
margin: 4px 10px;
|
|
241
|
+
color: inherit;
|
|
242
|
+
flex: 1 1 auto;
|
|
243
|
+
white-space: pre-line;
|
|
244
|
+
`, G = (t, e) => {
|
|
245
|
+
let a = t.includes("top") ? 1 : -1, [o, n] = E() ? [Y, Z] : [V(a), W(a)];
|
|
246
|
+
return { animation: e ? `${c(o)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards` : `${c(n)} 0.4s forwards cubic-bezier(.06,.71,.55,1)` };
|
|
247
|
+
};
|
|
248
|
+
i.memo(({ toast: t, position: e, style: a, children: o }) => {
|
|
249
|
+
let n = t.height ? G(t.position || e || "top-center", t.visible) : { opacity: 0 }, d = i.createElement(Q, { toast: t }), r = i.createElement(B, { ...t.ariaProps }, u(t.message, t));
|
|
250
|
+
return i.createElement(q, { className: t.className, style: { ...n, ...a, ...t.style } }, typeof o == "function" ? o({ icon: d, message: r }) : i.createElement(i.Fragment, null, d, r));
|
|
251
|
+
});
|
|
252
|
+
v(i.createElement);
|
|
253
|
+
x`
|
|
254
|
+
z-index: 9999;
|
|
255
|
+
> * {
|
|
256
|
+
pointer-events: auto;
|
|
269
257
|
}
|
|
270
|
-
|
|
271
|
-
function B(t) {
|
|
272
|
-
var e;
|
|
273
|
-
const n = new URLSearchParams({
|
|
274
|
-
module: t.project,
|
|
275
|
-
locale: k(t.locale)
|
|
276
|
-
});
|
|
277
|
-
return !((e = t.features) === null || e === void 0) && e.length && n.append("features", t.features.join(",")), "/v7/localization/keys/?" + n;
|
|
278
|
-
}
|
|
279
|
-
const T = c.createContext(void 0);
|
|
280
|
-
function O({ children: t, translations: e, onError: n, ...r }) {
|
|
281
|
-
const [s, a] = g(e), [o, h] = g({
|
|
282
|
-
translations: {},
|
|
283
|
-
wordReplacements: {}
|
|
284
|
-
});
|
|
285
|
-
if (x(() => {
|
|
286
|
-
s || Promise.all([A(r), F(r)]).then(([i, m]) => {
|
|
287
|
-
a(i), h(m);
|
|
288
|
-
});
|
|
289
|
-
}, [s, r]), !s)
|
|
290
|
-
return null;
|
|
291
|
-
const d = new z(s, r.locale, o);
|
|
292
|
-
return n && (d.onError = n), c.createElement(T.Provider, { value: d }, t);
|
|
293
|
-
}
|
|
294
|
-
function D({ id: t, ...e }) {
|
|
295
|
-
const n = E(T);
|
|
296
|
-
if (!n)
|
|
297
|
-
throw new Error("Localization: <Translate /> cannot be used without <LocalizationProvider />");
|
|
298
|
-
return c.createElement(c.Fragment, null, n.translateParts(t, e).map((r, s) => c.isValidElement(r) ? c.cloneElement(r, {
|
|
299
|
-
key: s
|
|
300
|
-
}) : c.createElement(c.Fragment, { key: s }, r)));
|
|
301
|
-
}
|
|
302
|
-
function N() {
|
|
303
|
-
const t = E(T);
|
|
304
|
-
if (!t)
|
|
305
|
-
throw new Error("Localization: useTranslate() cannot be used without <LocalizationProvider />");
|
|
306
|
-
return {
|
|
307
|
-
translate: t.translate
|
|
308
|
-
};
|
|
309
|
-
}
|
|
258
|
+
`;
|
|
310
259
|
export {
|
|
311
|
-
|
|
312
|
-
O as
|
|
313
|
-
|
|
314
|
-
|
|
260
|
+
F as CheckmarkIcon,
|
|
261
|
+
O as ErrorIcon,
|
|
262
|
+
T as LoaderIcon,
|
|
263
|
+
Q as ToastIcon,
|
|
264
|
+
u as resolveValue,
|
|
265
|
+
s as toast
|
|
315
266
|
};
|
package/index60.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import m from "./index46.js";
|
|
2
|
+
import f from "./index72.js";
|
|
3
|
+
import o from "./index73.js";
|
|
4
|
+
import i from "./index47.js";
|
|
5
|
+
var u = 6048e5;
|
|
6
|
+
function p(t, r) {
|
|
7
|
+
i(1, arguments);
|
|
8
|
+
var e = m(t), a = f(e, r).getTime() - o(e, r).getTime();
|
|
9
|
+
return Math.round(a / u) + 1;
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
p as default
|
|
13
|
+
};
|
package/index61.js
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import D from "./index46.js";
|
|
2
|
+
import p from "./index47.js";
|
|
3
|
+
import T from "./index72.js";
|
|
4
|
+
import O from "./index45.js";
|
|
5
|
+
import { getDefaultOptions as c } from "./index54.js";
|
|
6
|
+
function h(g, e) {
|
|
7
|
+
var a, i, o, l, n, s, f, u;
|
|
8
|
+
p(1, arguments);
|
|
9
|
+
var v = D(g), t = v.getUTCFullYear(), C = c(), r = O((a = (i = (o = (l = e?.firstWeekContainsDate) !== null && l !== void 0 ? l : e == null || (n = e.locale) === null || n === void 0 || (s = n.options) === null || s === void 0 ? void 0 : s.firstWeekContainsDate) !== null && o !== void 0 ? o : C.firstWeekContainsDate) !== null && i !== void 0 ? i : (f = C.locale) === null || f === void 0 || (u = f.options) === null || u === void 0 ? void 0 : u.firstWeekContainsDate) !== null && a !== void 0 ? a : 1);
|
|
10
|
+
if (!(r >= 1 && r <= 7))
|
|
11
|
+
throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");
|
|
12
|
+
var d = /* @__PURE__ */ new Date(0);
|
|
13
|
+
d.setUTCFullYear(t + 1, 0, r), d.setUTCHours(0, 0, 0, 0);
|
|
14
|
+
var k = T(d, e), m = /* @__PURE__ */ new Date(0);
|
|
15
|
+
m.setUTCFullYear(t, 0, r), m.setUTCHours(0, 0, 0, 0);
|
|
16
|
+
var W = T(m, e);
|
|
17
|
+
return v.getTime() >= k.getTime() ? t + 1 : v.getTime() >= W.getTime() ? t : t - 1;
|
|
18
|
+
}
|
|
19
|
+
export {
|
|
20
|
+
h as default
|
|
21
|
+
};
|
package/index62.js
ADDED
package/index63.js
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import n from "./index62.js";
|
|
2
|
+
var i = {
|
|
3
|
+
// Year
|
|
4
|
+
y: function(t, e) {
|
|
5
|
+
var a = t.getUTCFullYear(), u = a > 0 ? a : 1 - a;
|
|
6
|
+
return n(e === "yy" ? u % 100 : u, e.length);
|
|
7
|
+
},
|
|
8
|
+
// Month
|
|
9
|
+
M: function(t, e) {
|
|
10
|
+
var a = t.getUTCMonth();
|
|
11
|
+
return e === "M" ? String(a + 1) : n(a + 1, 2);
|
|
12
|
+
},
|
|
13
|
+
// Day of the month
|
|
14
|
+
d: function(t, e) {
|
|
15
|
+
return n(t.getUTCDate(), e.length);
|
|
16
|
+
},
|
|
17
|
+
// AM or PM
|
|
18
|
+
a: function(t, e) {
|
|
19
|
+
var a = t.getUTCHours() / 12 >= 1 ? "pm" : "am";
|
|
20
|
+
switch (e) {
|
|
21
|
+
case "a":
|
|
22
|
+
case "aa":
|
|
23
|
+
return a.toUpperCase();
|
|
24
|
+
case "aaa":
|
|
25
|
+
return a;
|
|
26
|
+
case "aaaaa":
|
|
27
|
+
return a[0];
|
|
28
|
+
case "aaaa":
|
|
29
|
+
default:
|
|
30
|
+
return a === "am" ? "a.m." : "p.m.";
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
// Hour [1-12]
|
|
34
|
+
h: function(t, e) {
|
|
35
|
+
return n(t.getUTCHours() % 12 || 12, e.length);
|
|
36
|
+
},
|
|
37
|
+
// Hour [0-23]
|
|
38
|
+
H: function(t, e) {
|
|
39
|
+
return n(t.getUTCHours(), e.length);
|
|
40
|
+
},
|
|
41
|
+
// Minute
|
|
42
|
+
m: function(t, e) {
|
|
43
|
+
return n(t.getUTCMinutes(), e.length);
|
|
44
|
+
},
|
|
45
|
+
// Second
|
|
46
|
+
s: function(t, e) {
|
|
47
|
+
return n(t.getUTCSeconds(), e.length);
|
|
48
|
+
},
|
|
49
|
+
// Fraction of second
|
|
50
|
+
S: function(t, e) {
|
|
51
|
+
var a = e.length, u = t.getUTCMilliseconds(), o = Math.floor(u * Math.pow(10, a - 3));
|
|
52
|
+
return n(o, e.length);
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
export {
|
|
56
|
+
i as default
|
|
57
|
+
};
|
package/index64.js
ADDED