@ukpc-lib/react 0.12.1-dev.9 → 0.12.1
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/dist/components/FavoriteMenu/components/MenuItem.d.ts +2 -5
- package/dist/components/FavoriteMenu/data.json.d.ts +2414 -0
- package/dist/components/FavoriteMenu/models/MenuItemDto.d.ts +1 -0
- package/dist/components/GlobalMenu/components/MenuItem.d.ts +1 -2
- package/dist/components/GlobalMenu/data.json.d.ts +1146 -1982
- package/dist/components/index.cjs +22 -18
- package/dist/components/index.js +1792 -2059
- package/dist/components/main.d.ts +0 -1
- package/dist/index.esm2017-09df9812.js +40618 -0
- package/dist/index.esm2017-ef3751d6.cjs +1101 -0
- package/dist/share/index.cjs +1 -1
- package/dist/share/index.js +1 -1
- package/package.json +6 -8
- package/web-components-bundle/access-denied/index.js +3 -2
- package/web-components-bundle/favorite-menu/index.js +8 -6
- package/web-components-bundle/global-menu/index.js +7 -5
- package/web-components-bundle/global-topbar/index.js +6 -8
- package/web-components-bundle/has-permission/index.js +7 -4
- package/web-components-bundle/index-7afe1760.js +44169 -0
- package/web-components-bundle/{index-T58UE-6b.js → index-c91ec106.js} +393 -378
- package/web-components-bundle/react-to-web-component-d5889290.js +6388 -0
- package/web-components-bundle/react-toastify.esm-d8df41b8.js +339 -0
- package/web-components-bundle/toast-config/index.js +2 -2
- package/web-components-bundle/toast-config-notification/index.js +4 -3
- package/dist/components/BaseBreadcrumb/index.d.ts +0 -17
- package/dist/index.esm2017-D13q7k3i.js +0 -41293
- package/dist/index.esm2017-DIs_XI9p.cjs +0 -1078
- package/web-components-bundle/base-breadcrumbs/index.js +0 -5
- package/web-components-bundle/clsx-DB4S2d7J.js +0 -22
- package/web-components-bundle/index-BSe1av43.js +0 -48
- package/web-components-bundle/index-BziS9Had.js +0 -5410
- package/web-components-bundle/index-DSZn86FM.js +0 -39978
- package/web-components-bundle/page-not-found/index.js +0 -6
- package/web-components-bundle/react-to-web-component-CXwKHjZr.js +0 -6388
- package/web-components-bundle/react-toastify.esm-CrTD7cpE.js +0 -320
- package/web-components-bundle/setPrototypeOf-BVKdEITT.js +0 -14
|
@@ -1,320 +0,0 @@
|
|
|
1
|
-
import { r as b, a as y } from "./react-to-web-component-CXwKHjZr.js";
|
|
2
|
-
import { c as F } from "./clsx-DB4S2d7J.js";
|
|
3
|
-
const J = (e) => typeof e == "number" && !isNaN(e), q = (e) => typeof e == "string", k = (e) => typeof e == "function", ne = (e) => q(e) || k(e) ? e : null, ie = (e) => b.isValidElement(e) || q(e) || k(e) || J(e);
|
|
4
|
-
function ye(e, t, o) {
|
|
5
|
-
o === void 0 && (o = 300);
|
|
6
|
-
const { scrollHeight: r, style: a } = e;
|
|
7
|
-
requestAnimationFrame(() => {
|
|
8
|
-
a.minHeight = "initial", a.height = r + "px", a.transition = `all ${o}ms`, requestAnimationFrame(() => {
|
|
9
|
-
a.height = "0", a.padding = "0", a.margin = "0", setTimeout(t, o);
|
|
10
|
-
});
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
function se(e) {
|
|
14
|
-
let { enter: t, exit: o, appendPosition: r = !1, collapse: a = !0, collapseDuration: d = 300 } = e;
|
|
15
|
-
return function(n) {
|
|
16
|
-
let { children: E, position: p, preventExitTransition: _, done: u, nodeRef: C, isIn: I, playToast: N } = n;
|
|
17
|
-
const m = r ? `${t}--${p}` : t, c = r ? `${o}--${p}` : o, T = b.useRef(0);
|
|
18
|
-
return b.useLayoutEffect(() => {
|
|
19
|
-
const f = C.current, l = m.split(" "), s = (g) => {
|
|
20
|
-
g.target === C.current && (N(), f.removeEventListener("animationend", s), f.removeEventListener("animationcancel", s), T.current === 0 && g.type !== "animationcancel" && f.classList.remove(...l));
|
|
21
|
-
};
|
|
22
|
-
f.classList.add(...l), f.addEventListener("animationend", s), f.addEventListener("animationcancel", s);
|
|
23
|
-
}, []), b.useEffect(() => {
|
|
24
|
-
const f = C.current, l = () => {
|
|
25
|
-
f.removeEventListener("animationend", l), a ? ye(f, u, d) : u();
|
|
26
|
-
};
|
|
27
|
-
I || (_ ? l() : (T.current = 1, f.className += ` ${c}`, f.addEventListener("animationend", l)));
|
|
28
|
-
}, [I]), y.createElement(y.Fragment, null, E);
|
|
29
|
-
};
|
|
30
|
-
}
|
|
31
|
-
function ce(e, t) {
|
|
32
|
-
return e != null ? { content: e.content, containerId: e.props.containerId, id: e.props.toastId, theme: e.props.theme, type: e.props.type, data: e.props.data || {}, isLoading: e.props.isLoading, icon: e.props.icon, status: t } : {};
|
|
33
|
-
}
|
|
34
|
-
const $ = /* @__PURE__ */ new Map();
|
|
35
|
-
let K = [];
|
|
36
|
-
const le = /* @__PURE__ */ new Set(), ve = (e) => le.forEach((t) => t(e)), ue = () => $.size > 0;
|
|
37
|
-
function pe(e, t) {
|
|
38
|
-
var o;
|
|
39
|
-
if (t)
|
|
40
|
-
return !((o = $.get(t)) == null || !o.isToastActive(e));
|
|
41
|
-
let r = !1;
|
|
42
|
-
return $.forEach((a) => {
|
|
43
|
-
a.isToastActive(e) && (r = !0);
|
|
44
|
-
}), r;
|
|
45
|
-
}
|
|
46
|
-
function fe(e, t) {
|
|
47
|
-
ie(e) && (ue() || K.push({ content: e, options: t }), $.forEach((o) => {
|
|
48
|
-
o.buildToast(e, t);
|
|
49
|
-
}));
|
|
50
|
-
}
|
|
51
|
-
function de(e, t) {
|
|
52
|
-
$.forEach((o) => {
|
|
53
|
-
t != null && t != null && t.containerId ? (t == null ? void 0 : t.containerId) === o.id && o.toggle(e, t == null ? void 0 : t.id) : o.toggle(e, t == null ? void 0 : t.id);
|
|
54
|
-
});
|
|
55
|
-
}
|
|
56
|
-
function he(e) {
|
|
57
|
-
const { subscribe: t, getSnapshot: o, setProps: r } = b.useRef(function(d) {
|
|
58
|
-
const n = d.containerId || 1;
|
|
59
|
-
return { subscribe(E) {
|
|
60
|
-
const p = /* @__PURE__ */ function(u, C, I) {
|
|
61
|
-
let N = 1, m = 0, c = [], T = [], f = [], l = C;
|
|
62
|
-
const s = /* @__PURE__ */ new Map(), g = /* @__PURE__ */ new Set(), M = () => {
|
|
63
|
-
f = Array.from(s.values()), g.forEach((i) => i());
|
|
64
|
-
}, O = (i) => {
|
|
65
|
-
T = i == null ? [] : T.filter((v) => v !== i), M();
|
|
66
|
-
}, L = (i) => {
|
|
67
|
-
const { toastId: v, onOpen: w, updateId: R, children: S } = i.props, Y = R == null;
|
|
68
|
-
i.staleId && s.delete(i.staleId), s.set(v, i), T = [...T, i.props.toastId].filter((z) => z !== i.staleId), M(), I(ce(i, Y ? "added" : "updated")), Y && k(w) && w(b.isValidElement(S) && S.props);
|
|
69
|
-
};
|
|
70
|
-
return { id: u, props: l, observe: (i) => (g.add(i), () => g.delete(i)), toggle: (i, v) => {
|
|
71
|
-
s.forEach((w) => {
|
|
72
|
-
v != null && v !== w.props.toastId || k(w.toggle) && w.toggle(i);
|
|
73
|
-
});
|
|
74
|
-
}, removeToast: O, toasts: s, clearQueue: () => {
|
|
75
|
-
m -= c.length, c = [];
|
|
76
|
-
}, buildToast: (i, v) => {
|
|
77
|
-
if (((A) => {
|
|
78
|
-
let { containerId: P, toastId: x, updateId: B } = A;
|
|
79
|
-
const V = P ? P !== u : u !== 1, U = s.has(x) && B == null;
|
|
80
|
-
return V || U;
|
|
81
|
-
})(v))
|
|
82
|
-
return;
|
|
83
|
-
const { toastId: w, updateId: R, data: S, staleId: Y, delay: z } = v, Q = () => {
|
|
84
|
-
O(w);
|
|
85
|
-
}, Z = R == null;
|
|
86
|
-
Z && m++;
|
|
87
|
-
const D = { ...l, style: l.toastStyle, key: N++, ...Object.fromEntries(Object.entries(v).filter((A) => {
|
|
88
|
-
let [P, x] = A;
|
|
89
|
-
return x != null;
|
|
90
|
-
})), toastId: w, updateId: R, data: S, closeToast: Q, isIn: !1, className: ne(v.className || l.toastClassName), bodyClassName: ne(v.bodyClassName || l.bodyClassName), progressClassName: ne(v.progressClassName || l.progressClassName), autoClose: !v.isLoading && (H = v.autoClose, j = l.autoClose, H === !1 || J(H) && H > 0 ? H : j), deleteToast() {
|
|
91
|
-
const A = s.get(w), { onClose: P, children: x } = A.props;
|
|
92
|
-
k(P) && P(b.isValidElement(x) && x.props), I(ce(A, "removed")), s.delete(w), m--, m < 0 && (m = 0), c.length > 0 ? L(c.shift()) : M();
|
|
93
|
-
} };
|
|
94
|
-
var H, j;
|
|
95
|
-
D.closeButton = l.closeButton, v.closeButton === !1 || ie(v.closeButton) ? D.closeButton = v.closeButton : v.closeButton === !0 && (D.closeButton = !ie(l.closeButton) || l.closeButton);
|
|
96
|
-
let W = i;
|
|
97
|
-
b.isValidElement(i) && !q(i.type) ? W = b.cloneElement(i, { closeToast: Q, toastProps: D, data: S }) : k(i) && (W = i({ closeToast: Q, toastProps: D, data: S }));
|
|
98
|
-
const X = { content: W, props: D, staleId: Y };
|
|
99
|
-
l.limit && l.limit > 0 && m > l.limit && Z ? c.push(X) : J(z) ? setTimeout(() => {
|
|
100
|
-
L(X);
|
|
101
|
-
}, z) : L(X);
|
|
102
|
-
}, setProps(i) {
|
|
103
|
-
l = i;
|
|
104
|
-
}, setToggle: (i, v) => {
|
|
105
|
-
s.get(i).toggle = v;
|
|
106
|
-
}, isToastActive: (i) => T.some((v) => v === i), getSnapshot: () => f };
|
|
107
|
-
}(n, d, ve);
|
|
108
|
-
$.set(n, p);
|
|
109
|
-
const _ = p.observe(E);
|
|
110
|
-
return K.forEach((u) => fe(u.content, u.options)), K = [], () => {
|
|
111
|
-
_(), $.delete(n);
|
|
112
|
-
};
|
|
113
|
-
}, setProps(E) {
|
|
114
|
-
var p;
|
|
115
|
-
(p = $.get(n)) == null || p.setProps(E);
|
|
116
|
-
}, getSnapshot() {
|
|
117
|
-
var E;
|
|
118
|
-
return (E = $.get(n)) == null ? void 0 : E.getSnapshot();
|
|
119
|
-
} };
|
|
120
|
-
}(e)).current;
|
|
121
|
-
r(e);
|
|
122
|
-
const a = b.useSyncExternalStore(t, o, o);
|
|
123
|
-
return { getToastToRender: function(d) {
|
|
124
|
-
if (!a)
|
|
125
|
-
return [];
|
|
126
|
-
const n = /* @__PURE__ */ new Map();
|
|
127
|
-
return e.newestOnTop && a.reverse(), a.forEach((E) => {
|
|
128
|
-
const { position: p } = E.props;
|
|
129
|
-
n.has(p) || n.set(p, []), n.get(p).push(E);
|
|
130
|
-
}), Array.from(n, (E) => d(E[0], E[1]));
|
|
131
|
-
}, isToastActive: pe, count: a == null ? void 0 : a.length };
|
|
132
|
-
}
|
|
133
|
-
function Ee(e) {
|
|
134
|
-
const [t, o] = b.useState(!1), [r, a] = b.useState(!1), d = b.useRef(null), n = b.useRef({ start: 0, delta: 0, removalDistance: 0, canCloseOnClick: !0, canDrag: !1, didMove: !1 }).current, { autoClose: E, pauseOnHover: p, closeToast: _, onClick: u, closeOnClick: C } = e;
|
|
135
|
-
var I, N;
|
|
136
|
-
function m() {
|
|
137
|
-
o(!0);
|
|
138
|
-
}
|
|
139
|
-
function c() {
|
|
140
|
-
o(!1);
|
|
141
|
-
}
|
|
142
|
-
function T(s) {
|
|
143
|
-
const g = d.current;
|
|
144
|
-
n.canDrag && g && (n.didMove = !0, t && c(), n.delta = e.draggableDirection === "x" ? s.clientX - n.start : s.clientY - n.start, n.start !== s.clientX && (n.canCloseOnClick = !1), g.style.transform = `translate3d(${e.draggableDirection === "x" ? `${n.delta}px, var(--y)` : `0, calc(${n.delta}px + var(--y))`},0)`, g.style.opacity = "" + (1 - Math.abs(n.delta / n.removalDistance)));
|
|
145
|
-
}
|
|
146
|
-
function f() {
|
|
147
|
-
document.removeEventListener("pointermove", T), document.removeEventListener("pointerup", f);
|
|
148
|
-
const s = d.current;
|
|
149
|
-
if (n.canDrag && n.didMove && s) {
|
|
150
|
-
if (n.canDrag = !1, Math.abs(n.delta) > n.removalDistance)
|
|
151
|
-
return a(!0), e.closeToast(), void e.collapseAll();
|
|
152
|
-
s.style.transition = "transform 0.2s, opacity 0.2s", s.style.removeProperty("transform"), s.style.removeProperty("opacity");
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
(N = $.get((I = { id: e.toastId, containerId: e.containerId, fn: o }).containerId || 1)) == null || N.setToggle(I.id, I.fn), b.useEffect(() => {
|
|
156
|
-
if (e.pauseOnFocusLoss)
|
|
157
|
-
return document.hasFocus() || c(), window.addEventListener("focus", m), window.addEventListener("blur", c), () => {
|
|
158
|
-
window.removeEventListener("focus", m), window.removeEventListener("blur", c);
|
|
159
|
-
};
|
|
160
|
-
}, [e.pauseOnFocusLoss]);
|
|
161
|
-
const l = { onPointerDown: function(s) {
|
|
162
|
-
if (e.draggable === !0 || e.draggable === s.pointerType) {
|
|
163
|
-
n.didMove = !1, document.addEventListener("pointermove", T), document.addEventListener("pointerup", f);
|
|
164
|
-
const g = d.current;
|
|
165
|
-
n.canCloseOnClick = !0, n.canDrag = !0, g.style.transition = "none", e.draggableDirection === "x" ? (n.start = s.clientX, n.removalDistance = g.offsetWidth * (e.draggablePercent / 100)) : (n.start = s.clientY, n.removalDistance = g.offsetHeight * (e.draggablePercent === 80 ? 1.5 * e.draggablePercent : e.draggablePercent) / 100);
|
|
166
|
-
}
|
|
167
|
-
}, onPointerUp: function(s) {
|
|
168
|
-
const { top: g, bottom: M, left: O, right: L } = d.current.getBoundingClientRect();
|
|
169
|
-
s.nativeEvent.type !== "touchend" && e.pauseOnHover && s.clientX >= O && s.clientX <= L && s.clientY >= g && s.clientY <= M ? c() : m();
|
|
170
|
-
} };
|
|
171
|
-
return E && p && (l.onMouseEnter = c, e.stacked || (l.onMouseLeave = m)), C && (l.onClick = (s) => {
|
|
172
|
-
u && u(s), n.canCloseOnClick && _();
|
|
173
|
-
}), { playToast: m, pauseToast: c, isRunning: t, preventExitTransition: r, toastRef: d, eventHandlers: l };
|
|
174
|
-
}
|
|
175
|
-
function Te(e) {
|
|
176
|
-
let { delay: t, isRunning: o, closeToast: r, type: a = "default", hide: d, className: n, style: E, controlledProgress: p, progress: _, rtl: u, isIn: C, theme: I } = e;
|
|
177
|
-
const N = d || p && _ === 0, m = { ...E, animationDuration: `${t}ms`, animationPlayState: o ? "running" : "paused" };
|
|
178
|
-
p && (m.transform = `scaleX(${_})`);
|
|
179
|
-
const c = F("Toastify__progress-bar", p ? "Toastify__progress-bar--controlled" : "Toastify__progress-bar--animated", `Toastify__progress-bar-theme--${I}`, `Toastify__progress-bar--${a}`, { "Toastify__progress-bar--rtl": u }), T = k(n) ? n({ rtl: u, type: a, defaultClassName: c }) : F(c, n), f = { [p && _ >= 1 ? "onTransitionEnd" : "onAnimationEnd"]: p && _ < 1 ? null : () => {
|
|
180
|
-
C && r();
|
|
181
|
-
} };
|
|
182
|
-
return y.createElement("div", { className: "Toastify__progress-bar--wrp", "data-hidden": N }, y.createElement("div", { className: `Toastify__progress-bar--bg Toastify__progress-bar-theme--${I} Toastify__progress-bar--${a}` }), y.createElement("div", { role: "progressbar", "aria-hidden": N ? "true" : "false", "aria-label": "notification timer", className: T, style: m, ...f }));
|
|
183
|
-
}
|
|
184
|
-
let be = 1;
|
|
185
|
-
const me = () => "" + be++;
|
|
186
|
-
function Ie(e) {
|
|
187
|
-
return e && (q(e.toastId) || J(e.toastId)) ? e.toastId : me();
|
|
188
|
-
}
|
|
189
|
-
function G(e, t) {
|
|
190
|
-
return fe(e, t), t.toastId;
|
|
191
|
-
}
|
|
192
|
-
function oe(e, t) {
|
|
193
|
-
return { ...t, type: t && t.type || e, toastId: Ie(t) };
|
|
194
|
-
}
|
|
195
|
-
function ee(e) {
|
|
196
|
-
return (t, o) => G(t, oe(e, o));
|
|
197
|
-
}
|
|
198
|
-
function h(e, t) {
|
|
199
|
-
return G(e, oe("default", t));
|
|
200
|
-
}
|
|
201
|
-
h.loading = (e, t) => G(e, oe("default", { isLoading: !0, autoClose: !1, closeOnClick: !1, closeButton: !1, draggable: !1, ...t })), h.promise = function(e, t, o) {
|
|
202
|
-
let r, { pending: a, error: d, success: n } = t;
|
|
203
|
-
a && (r = q(a) ? h.loading(a, o) : h.loading(a.render, { ...o, ...a }));
|
|
204
|
-
const E = { isLoading: null, autoClose: null, closeOnClick: null, closeButton: null, draggable: null }, p = (u, C, I) => {
|
|
205
|
-
if (C == null)
|
|
206
|
-
return void h.dismiss(r);
|
|
207
|
-
const N = { type: u, ...E, ...o, data: I }, m = q(C) ? { render: C } : C;
|
|
208
|
-
return r ? h.update(r, { ...N, ...m }) : h(m.render, { ...N, ...m }), I;
|
|
209
|
-
}, _ = k(e) ? e() : e;
|
|
210
|
-
return _.then((u) => p("success", n, u)).catch((u) => p("error", d, u)), _;
|
|
211
|
-
}, h.success = ee("success"), h.info = ee("info"), h.error = ee("error"), h.warning = ee("warning"), h.warn = h.warning, h.dark = (e, t) => G(e, oe("default", { theme: "dark", ...t })), h.dismiss = function(e) {
|
|
212
|
-
(function(t) {
|
|
213
|
-
var o;
|
|
214
|
-
if (ue()) {
|
|
215
|
-
if (t == null || q(o = t) || J(o))
|
|
216
|
-
$.forEach((r) => {
|
|
217
|
-
r.removeToast(t);
|
|
218
|
-
});
|
|
219
|
-
else if (t && ("containerId" in t || "id" in t)) {
|
|
220
|
-
const r = $.get(t.containerId);
|
|
221
|
-
r ? r.removeToast(t.id) : $.forEach((a) => {
|
|
222
|
-
a.removeToast(t.id);
|
|
223
|
-
});
|
|
224
|
-
}
|
|
225
|
-
} else
|
|
226
|
-
K = K.filter((r) => t != null && r.options.toastId !== t);
|
|
227
|
-
})(e);
|
|
228
|
-
}, h.clearWaitingQueue = function(e) {
|
|
229
|
-
e === void 0 && (e = {}), $.forEach((t) => {
|
|
230
|
-
!t.props.limit || e.containerId && t.id !== e.containerId || t.clearQueue();
|
|
231
|
-
});
|
|
232
|
-
}, h.isActive = pe, h.update = function(e, t) {
|
|
233
|
-
t === void 0 && (t = {});
|
|
234
|
-
const o = ((r, a) => {
|
|
235
|
-
var d;
|
|
236
|
-
let { containerId: n } = a;
|
|
237
|
-
return (d = $.get(n || 1)) == null ? void 0 : d.toasts.get(r);
|
|
238
|
-
})(e, t);
|
|
239
|
-
if (o) {
|
|
240
|
-
const { props: r, content: a } = o, d = { delay: 100, ...r, ...t, toastId: t.toastId || e, updateId: me() };
|
|
241
|
-
d.toastId !== e && (d.staleId = e);
|
|
242
|
-
const n = d.render || a;
|
|
243
|
-
delete d.render, G(n, d);
|
|
244
|
-
}
|
|
245
|
-
}, h.done = (e) => {
|
|
246
|
-
h.update(e, { progress: 1 });
|
|
247
|
-
}, h.onChange = function(e) {
|
|
248
|
-
return le.add(e), () => {
|
|
249
|
-
le.delete(e);
|
|
250
|
-
};
|
|
251
|
-
}, h.play = (e) => de(!0, e), h.pause = (e) => de(!1, e);
|
|
252
|
-
const _e = typeof window < "u" ? b.useLayoutEffect : b.useEffect, te = (e) => {
|
|
253
|
-
let { theme: t, type: o, isLoading: r, ...a } = e;
|
|
254
|
-
return y.createElement("svg", { viewBox: "0 0 24 24", width: "100%", height: "100%", fill: t === "colored" ? "currentColor" : `var(--toastify-icon-color-${o})`, ...a });
|
|
255
|
-
}, re = { info: function(e) {
|
|
256
|
-
return y.createElement(te, { ...e }, y.createElement("path", { d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z" }));
|
|
257
|
-
}, warning: function(e) {
|
|
258
|
-
return y.createElement(te, { ...e }, y.createElement("path", { d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z" }));
|
|
259
|
-
}, success: function(e) {
|
|
260
|
-
return y.createElement(te, { ...e }, y.createElement("path", { d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z" }));
|
|
261
|
-
}, error: function(e) {
|
|
262
|
-
return y.createElement(te, { ...e }, y.createElement("path", { d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z" }));
|
|
263
|
-
}, spinner: function() {
|
|
264
|
-
return y.createElement("div", { className: "Toastify__spinner" });
|
|
265
|
-
} }, Ce = (e) => {
|
|
266
|
-
const { isRunning: t, preventExitTransition: o, toastRef: r, eventHandlers: a, playToast: d } = Ee(e), { closeButton: n, children: E, autoClose: p, onClick: _, type: u, hideProgressBar: C, closeToast: I, transition: N, position: m, className: c, style: T, bodyClassName: f, bodyStyle: l, progressClassName: s, progressStyle: g, updateId: M, role: O, progress: L, rtl: i, toastId: v, deleteToast: w, isIn: R, isLoading: S, closeOnClick: Y, theme: z } = e, Q = F("Toastify__toast", `Toastify__toast-theme--${z}`, `Toastify__toast--${u}`, { "Toastify__toast--rtl": i }, { "Toastify__toast--close-on-click": Y }), Z = k(c) ? c({ rtl: i, position: m, type: u, defaultClassName: Q }) : F(Q, c), D = function(X) {
|
|
267
|
-
let { theme: A, type: P, isLoading: x, icon: B } = X, V = null;
|
|
268
|
-
const U = { theme: A, type: P };
|
|
269
|
-
return B === !1 || (k(B) ? V = B({ ...U, isLoading: x }) : b.isValidElement(B) ? V = b.cloneElement(B, U) : x ? V = re.spinner() : ((ge) => ge in re)(P) && (V = re[P](U))), V;
|
|
270
|
-
}(e), H = !!L || !p, j = { closeToast: I, type: u, theme: z };
|
|
271
|
-
let W = null;
|
|
272
|
-
return n === !1 || (W = k(n) ? n(j) : b.isValidElement(n) ? b.cloneElement(n, j) : function(X) {
|
|
273
|
-
let { closeToast: A, theme: P, ariaLabel: x = "close" } = X;
|
|
274
|
-
return y.createElement("button", { className: `Toastify__close-button Toastify__close-button--${P}`, type: "button", onClick: (B) => {
|
|
275
|
-
B.stopPropagation(), A(B);
|
|
276
|
-
}, "aria-label": x }, y.createElement("svg", { "aria-hidden": "true", viewBox: "0 0 14 16" }, y.createElement("path", { fillRule: "evenodd", d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z" })));
|
|
277
|
-
}(j)), y.createElement(N, { isIn: R, done: w, position: m, preventExitTransition: o, nodeRef: r, playToast: d }, y.createElement("div", { id: v, onClick: _, "data-in": R, className: Z, ...a, style: T, ref: r }, y.createElement("div", { ...R && { role: O }, className: k(f) ? f({ type: u }) : F("Toastify__toast-body", f), style: l }, D != null && y.createElement("div", { className: F("Toastify__toast-icon", { "Toastify--animate-icon Toastify__zoom-enter": !S }) }, D), y.createElement("div", null, E)), W, y.createElement(Te, { ...M && !H ? { key: `pb-${M}` } : {}, rtl: i, theme: z, delay: p, isRunning: t, isIn: R, closeToast: I, hide: C, type: u, style: g, className: s, controlledProgress: H, progress: L || 0 })));
|
|
278
|
-
}, ae = function(e, t) {
|
|
279
|
-
return t === void 0 && (t = !1), { enter: `Toastify--animate Toastify__${e}-enter`, exit: `Toastify--animate Toastify__${e}-exit`, appendPosition: t };
|
|
280
|
-
}, Le = se(ae("bounce", !0));
|
|
281
|
-
se(ae("slide", !0));
|
|
282
|
-
se(ae("zoom"));
|
|
283
|
-
se(ae("flip"));
|
|
284
|
-
const Ne = { position: "top-right", transition: Le, autoClose: 5e3, closeButton: !0, pauseOnHover: !0, pauseOnFocusLoss: !0, draggable: "touch", draggablePercent: 80, draggableDirection: "x", role: "alert", theme: "light" };
|
|
285
|
-
function ke(e) {
|
|
286
|
-
let t = { ...Ne, ...e };
|
|
287
|
-
const o = e.stacked, [r, a] = b.useState(!0), d = b.useRef(null), { getToastToRender: n, isToastActive: E, count: p } = he(t), { className: _, style: u, rtl: C, containerId: I } = t;
|
|
288
|
-
function N(c) {
|
|
289
|
-
const T = F("Toastify__toast-container", `Toastify__toast-container--${c}`, { "Toastify__toast-container--rtl": C });
|
|
290
|
-
return k(_) ? _({ position: c, rtl: C, defaultClassName: T }) : F(T, ne(_));
|
|
291
|
-
}
|
|
292
|
-
function m() {
|
|
293
|
-
o && (a(!0), h.play());
|
|
294
|
-
}
|
|
295
|
-
return _e(() => {
|
|
296
|
-
if (o) {
|
|
297
|
-
var c;
|
|
298
|
-
const T = d.current.querySelectorAll('[data-in="true"]'), f = 12, l = (c = t.position) == null ? void 0 : c.includes("top");
|
|
299
|
-
let s = 0, g = 0;
|
|
300
|
-
Array.from(T).reverse().forEach((M, O) => {
|
|
301
|
-
const L = M;
|
|
302
|
-
L.classList.add("Toastify__toast--stacked"), O > 0 && (L.dataset.collapsed = `${r}`), L.dataset.pos || (L.dataset.pos = l ? "top" : "bot");
|
|
303
|
-
const i = s * (r ? 0.2 : 1) + (r ? 0 : f * O);
|
|
304
|
-
L.style.setProperty("--y", `${l ? i : -1 * i}px`), L.style.setProperty("--g", `${f}`), L.style.setProperty("--s", "" + (1 - (r ? g : 0))), s += L.offsetHeight, g += 0.025;
|
|
305
|
-
});
|
|
306
|
-
}
|
|
307
|
-
}, [r, p, o]), y.createElement("div", { ref: d, className: "Toastify", id: I, onMouseEnter: () => {
|
|
308
|
-
o && (a(!1), h.pause());
|
|
309
|
-
}, onMouseLeave: m }, n((c, T) => {
|
|
310
|
-
const f = T.length ? { ...u } : { ...u, pointerEvents: "none" };
|
|
311
|
-
return y.createElement("div", { className: N(c), style: f, key: `container-${c}` }, T.map((l) => {
|
|
312
|
-
let { content: s, props: g } = l;
|
|
313
|
-
return y.createElement(Ce, { ...g, stacked: o, collapseAll: m, isIn: E(g.toastId, g.containerId), style: g.style, key: `toast-${g.key}` }, s);
|
|
314
|
-
}));
|
|
315
|
-
}));
|
|
316
|
-
}
|
|
317
|
-
export {
|
|
318
|
-
h as B,
|
|
319
|
-
ke as Q
|
|
320
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
function o(e) {
|
|
2
|
-
if (e === void 0)
|
|
3
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
4
|
-
return e;
|
|
5
|
-
}
|
|
6
|
-
function n(e, r) {
|
|
7
|
-
return n = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(t, i) {
|
|
8
|
-
return t.__proto__ = i, t;
|
|
9
|
-
}, n(e, r);
|
|
10
|
-
}
|
|
11
|
-
export {
|
|
12
|
-
n as _,
|
|
13
|
-
o as a
|
|
14
|
-
};
|