@banzamel/mineralui 1.0.7 → 1.0.8
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/README.md +1 -1
- package/dist/feedback-CmOz23FV.cjs +2 -0
- package/dist/feedback-CmOz23FV.cjs.map +1 -0
- package/dist/{feedback-5sizFz86.js → feedback-DCIGou8P.js} +118 -116
- package/dist/feedback-DCIGou8P.js.map +1 -0
- package/dist/feedback.cjs +1 -1
- package/dist/feedback.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/dist/feedback-5sizFz86.js.map +0 -1
- package/dist/feedback-BB_6Du5-.cjs +0 -2
- package/dist/feedback-BB_6Du5-.cjs.map +0 -1
|
@@ -14,8 +14,8 @@ import { t as P } from "./MToggle-B7cKH5Tl.js";
|
|
|
14
14
|
import { n as ie } from "./MPagination-CbkRMnL1.js";
|
|
15
15
|
import { t as F } from "./MStack-DhdMFSUL.js";
|
|
16
16
|
import { t as I } from "./MDataTable--pUkQHAv.js";
|
|
17
|
-
import { createContext as
|
|
18
|
-
import { Fragment as
|
|
17
|
+
import { createContext as ae, useCallback as L, useContext as R, useEffect as z, useMemo as B, useRef as V, useState as H } from "react";
|
|
18
|
+
import { Fragment as U, jsx as W, jsxs as G } from "react/jsx-runtime";
|
|
19
19
|
//#region src/components/feedback/statusIcons.tsx
|
|
20
20
|
var K = {
|
|
21
21
|
success: /* @__PURE__ */ W(l, {}),
|
|
@@ -57,7 +57,7 @@ function J({ color: e = "info", icon: t = !0, title: n, className: r, children:
|
|
|
57
57
|
//#endregion
|
|
58
58
|
//#region src/components/feedback/MBanner/MBanner.tsx
|
|
59
59
|
function oe({ color: t = "primary", variant: n = "filled", icon: r, action: i, dismissible: a = !1, onDismiss: o, className: s, children: c, ...l }) {
|
|
60
|
-
let [d, f] =
|
|
60
|
+
let [d, f] = H(!0), [m, h] = H(!1), g = V(null);
|
|
61
61
|
if (!d) return null;
|
|
62
62
|
let _ = () => {
|
|
63
63
|
h(!0);
|
|
@@ -140,17 +140,17 @@ function se({ color: e = "primary", size: t = "lg", label: n = "Loading", center
|
|
|
140
140
|
}
|
|
141
141
|
//#endregion
|
|
142
142
|
//#region src/components/feedback/MToast/MToastContext.ts
|
|
143
|
-
var X =
|
|
144
|
-
function
|
|
145
|
-
let e =
|
|
143
|
+
var X = ae(null), Z = X.Provider;
|
|
144
|
+
function Q() {
|
|
145
|
+
let e = R(X);
|
|
146
146
|
if (!e) throw Error("useMToast must be used inside MToastProvider");
|
|
147
147
|
return e;
|
|
148
148
|
}
|
|
149
149
|
//#endregion
|
|
150
150
|
//#region src/components/feedback/MToast/MToastItem.tsx
|
|
151
|
-
function
|
|
152
|
-
let [r, i] =
|
|
153
|
-
|
|
151
|
+
function ce({ entry: t, onDismiss: n }) {
|
|
152
|
+
let [r, i] = H(!1), a = t.duration ?? 4e3;
|
|
153
|
+
z(() => {
|
|
154
154
|
if (a <= 0) return;
|
|
155
155
|
let e = setTimeout(() => i(!0), a);
|
|
156
156
|
return () => clearTimeout(e);
|
|
@@ -192,14 +192,14 @@ function le({ entry: t, onDismiss: n }) {
|
|
|
192
192
|
}
|
|
193
193
|
//#endregion
|
|
194
194
|
//#region src/components/feedback/MToast/MToastProvider.tsx
|
|
195
|
-
var
|
|
195
|
+
var le = 0;
|
|
196
196
|
function ue({ position: e = "top-right", duration: t = 4e3, children: n }) {
|
|
197
|
-
let [r, i] =
|
|
197
|
+
let [r, i] = H([]), a = V(t);
|
|
198
198
|
a.current = t;
|
|
199
|
-
let o =
|
|
199
|
+
let o = L((e) => {
|
|
200
200
|
i((t) => t.filter((t) => t.id !== e));
|
|
201
|
-
}, []), s =
|
|
202
|
-
let t = `toast-${++
|
|
201
|
+
}, []), s = L((e) => {
|
|
202
|
+
let t = `toast-${++le}`, n = {
|
|
203
203
|
id: t,
|
|
204
204
|
...e,
|
|
205
205
|
duration: e.duration ?? a.current
|
|
@@ -207,13 +207,13 @@ function ue({ position: e = "top-right", duration: t = 4e3, children: n }) {
|
|
|
207
207
|
return i((e) => [...e, n]), t;
|
|
208
208
|
}, []);
|
|
209
209
|
return /* @__PURE__ */ G(Z, {
|
|
210
|
-
value:
|
|
210
|
+
value: B(() => ({
|
|
211
211
|
toast: s,
|
|
212
212
|
dismiss: o
|
|
213
213
|
}), [s, o]),
|
|
214
214
|
children: [n, /* @__PURE__ */ W(d, { children: /* @__PURE__ */ W("div", {
|
|
215
215
|
className: u("toast container", e),
|
|
216
|
-
children: r.map((e) => /* @__PURE__ */ W(
|
|
216
|
+
children: r.map((e) => /* @__PURE__ */ W(ce, {
|
|
217
217
|
entry: e,
|
|
218
218
|
onDismiss: o
|
|
219
219
|
}, e.id))
|
|
@@ -222,9 +222,9 @@ function ue({ position: e = "top-right", duration: t = 4e3, children: n }) {
|
|
|
222
222
|
}
|
|
223
223
|
//#endregion
|
|
224
224
|
//#region src/components/feedback/MCookie/MCookieConsentProvider/MCookieConsentContext.ts
|
|
225
|
-
var de =
|
|
225
|
+
var de = ae(null), fe = de.Provider;
|
|
226
226
|
function $() {
|
|
227
|
-
return
|
|
227
|
+
return R(de);
|
|
228
228
|
}
|
|
229
229
|
function pe() {
|
|
230
230
|
let e = $();
|
|
@@ -268,39 +268,40 @@ function Se(e) {
|
|
|
268
268
|
typeof window > "u" || typeof CustomEvent > "u" || window.dispatchEvent(new CustomEvent(j, { detail: { state: e } }));
|
|
269
269
|
}
|
|
270
270
|
function Ce({ children: e, version: t = "1", storageKey: n = te, persist: r = !0, storage: i = D, cookieName: a = k, cookieMaxAgeDays: o = 180, categories: s, declaration: c, defaultConsent: l, mode: u = "opt-in", hideOnAccept: d = !0, autoShow: f = !0, reopenOnVersionChange: p = !0, texts: m, loadDeclaration: h, loadConsent: g, saveConsent: _, requiredCookies: v = me, categoryRules: y = he, onDetectedCookies: b, onConsentChange: ee, onAcceptAll: x, onRejectAll: S, onWithdraw: C }) {
|
|
271
|
-
let O = N(), j =
|
|
272
|
-
ie.current = P, F.current = l
|
|
273
|
-
let [
|
|
271
|
+
let O = N(), j = B(() => M(O, m), [O, m]), P = B(() => s && s.length > 0 ? s : w(j), [s, j]), ie = V(P), F = V(l);
|
|
272
|
+
ie.current = P, F.current = l;
|
|
273
|
+
let [I, ae] = H(!1), [R, U] = H(null), [G, K] = H(!1), [q, J] = H(!1), [oe, Y] = H(c ?? re()), [se, X] = H(() => A({
|
|
274
274
|
requiredCookies: v,
|
|
275
275
|
categoryRules: y
|
|
276
276
|
}));
|
|
277
|
-
|
|
277
|
+
z(() => {
|
|
278
278
|
let e = !0;
|
|
279
279
|
async function t() {
|
|
280
280
|
if (c) {
|
|
281
|
-
|
|
281
|
+
Y(c);
|
|
282
282
|
return;
|
|
283
283
|
}
|
|
284
|
-
if (!
|
|
285
|
-
|
|
284
|
+
if (!h) {
|
|
285
|
+
Y(re());
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
288
|
try {
|
|
289
|
-
let t = await
|
|
290
|
-
e &&
|
|
289
|
+
let t = await h();
|
|
290
|
+
e && Y(t);
|
|
291
291
|
} catch {
|
|
292
|
-
e &&
|
|
292
|
+
e && Y(re());
|
|
293
293
|
}
|
|
294
294
|
}
|
|
295
295
|
return t(), () => {
|
|
296
296
|
e = !1;
|
|
297
297
|
};
|
|
298
|
-
}, [c]),
|
|
298
|
+
}, [c, h]), z(() => {
|
|
299
299
|
let e = !0;
|
|
300
300
|
async function o() {
|
|
301
|
+
e && ae(!1);
|
|
301
302
|
let o = null;
|
|
302
|
-
if (
|
|
303
|
-
o = await
|
|
303
|
+
if (g) try {
|
|
304
|
+
o = await g();
|
|
304
305
|
} catch {
|
|
305
306
|
o = null;
|
|
306
307
|
}
|
|
@@ -316,12 +317,12 @@ function Ce({ children: e, version: t = "1", storageKey: n = te, persist: r = !0
|
|
|
316
317
|
...o,
|
|
317
318
|
categories: ge(ie.current, o.categories, F.current)
|
|
318
319
|
};
|
|
319
|
-
|
|
320
|
+
U((t) => xe(t, e) ? t : e), K((e) => e && !1);
|
|
320
321
|
} else {
|
|
321
322
|
let e = !!(f && (!o || p));
|
|
322
|
-
|
|
323
|
+
U((e) => e == null ? e : null), K((t) => t === e ? t : e);
|
|
323
324
|
}
|
|
324
|
-
ae(
|
|
325
|
+
ae(!0);
|
|
325
326
|
}
|
|
326
327
|
}
|
|
327
328
|
return o(), () => {
|
|
@@ -330,13 +331,14 @@ function Ce({ children: e, version: t = "1", storageKey: n = te, persist: r = !0
|
|
|
330
331
|
}, [
|
|
331
332
|
f,
|
|
332
333
|
a,
|
|
334
|
+
g,
|
|
333
335
|
r,
|
|
334
336
|
p,
|
|
335
337
|
i,
|
|
336
338
|
n,
|
|
337
339
|
t
|
|
338
|
-
]),
|
|
339
|
-
|
|
340
|
+
]), z(() => {
|
|
341
|
+
U((e) => {
|
|
340
342
|
if (!e || e.version !== t) return e;
|
|
341
343
|
let n = ge(P, e.categories, l);
|
|
342
344
|
return be(e.categories, n) ? e : {
|
|
@@ -349,27 +351,27 @@ function Ce({ children: e, version: t = "1", storageKey: n = te, persist: r = !0
|
|
|
349
351
|
l,
|
|
350
352
|
t
|
|
351
353
|
]);
|
|
352
|
-
let
|
|
354
|
+
let Z = L(() => {
|
|
353
355
|
let e = A({
|
|
354
356
|
requiredCookies: v,
|
|
355
357
|
categoryRules: y
|
|
356
358
|
});
|
|
357
|
-
|
|
359
|
+
X((t) => ye(t, e) ? t : e), b?.(e);
|
|
358
360
|
}, [
|
|
359
361
|
y,
|
|
360
362
|
b,
|
|
361
363
|
v
|
|
362
364
|
]);
|
|
363
|
-
|
|
364
|
-
|
|
365
|
+
z(() => {
|
|
366
|
+
Z();
|
|
365
367
|
}, [
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
368
|
+
Z,
|
|
369
|
+
I,
|
|
370
|
+
R,
|
|
371
|
+
q
|
|
370
372
|
]);
|
|
371
|
-
let Q =
|
|
372
|
-
|
|
373
|
+
let Q = L(async (e) => {
|
|
374
|
+
U(e), Se(e), r && E({
|
|
373
375
|
storage: i,
|
|
374
376
|
storageKey: n,
|
|
375
377
|
cookieName: a,
|
|
@@ -383,17 +385,17 @@ function Ce({ children: e, version: t = "1", storageKey: n = te, persist: r = !0
|
|
|
383
385
|
_,
|
|
384
386
|
i,
|
|
385
387
|
n
|
|
386
|
-
]),
|
|
387
|
-
|
|
388
|
-
}, []),
|
|
389
|
-
|
|
390
|
-
}, []),
|
|
391
|
-
|
|
392
|
-
}, []),
|
|
393
|
-
|
|
394
|
-
}, [
|
|
388
|
+
]), ce = L(() => {
|
|
389
|
+
K(!0);
|
|
390
|
+
}, []), le = L(() => {
|
|
391
|
+
K(!1);
|
|
392
|
+
}, []), ue = L(() => {
|
|
393
|
+
J(!0), K(!1);
|
|
394
|
+
}, []), de = L(() => {
|
|
395
|
+
J(!1), K((e) => e || R == null);
|
|
396
|
+
}, [R]), $ = L((e = "banner") => {
|
|
395
397
|
let n = _e(t, e, P, P.reduce((e, t) => (e[t.key] = !0, e), {}), l);
|
|
396
|
-
Q(n), x?.(n), d &&
|
|
398
|
+
Q(n), x?.(n), d && K(!1), J(!1);
|
|
397
399
|
}, [
|
|
398
400
|
P,
|
|
399
401
|
l,
|
|
@@ -401,28 +403,28 @@ function Ce({ children: e, version: t = "1", storageKey: n = te, persist: r = !0
|
|
|
401
403
|
x,
|
|
402
404
|
Q,
|
|
403
405
|
t
|
|
404
|
-
]),
|
|
406
|
+
]), pe = L((e = "banner") => {
|
|
405
407
|
let n = _e(t, e, P, P.reduce((e, t) => (e[t.key] = t.required ?? !1, e), {}), l);
|
|
406
|
-
Q(n), S?.(n),
|
|
408
|
+
Q(n), S?.(n), K(!1), J(!1);
|
|
407
409
|
}, [
|
|
408
410
|
P,
|
|
409
411
|
l,
|
|
410
412
|
S,
|
|
411
413
|
Q,
|
|
412
414
|
t
|
|
413
|
-
]),
|
|
414
|
-
Q(_e(t, n, P, e, l)),
|
|
415
|
+
]), Ce = L((e, n = "preferences") => {
|
|
416
|
+
Q(_e(t, n, P, e, l)), K(!1), J(!1);
|
|
415
417
|
}, [
|
|
416
418
|
P,
|
|
417
419
|
l,
|
|
418
420
|
Q,
|
|
419
421
|
t
|
|
420
|
-
]),
|
|
422
|
+
]), we = L(() => {
|
|
421
423
|
r && ne({
|
|
422
424
|
storage: i,
|
|
423
425
|
storageKey: n,
|
|
424
426
|
cookieName: a
|
|
425
|
-
}),
|
|
427
|
+
}), U(null), Se(null), J(!1), K(f), C?.();
|
|
426
428
|
}, [
|
|
427
429
|
f,
|
|
428
430
|
a,
|
|
@@ -430,56 +432,56 @@ function Ce({ children: e, version: t = "1", storageKey: n = te, persist: r = !0
|
|
|
430
432
|
r,
|
|
431
433
|
i,
|
|
432
434
|
n
|
|
433
|
-
]),
|
|
435
|
+
]), Te = L((e) => P.find((t) => t.key === e)?.required ? !0 : R?.categories?.[e] === !0, [P, R]), Ee = L((e) => P.some((t) => t.key === e && t.required), [P]), De = I && R == null;
|
|
434
436
|
return /* @__PURE__ */ W(fe, {
|
|
435
|
-
value:
|
|
436
|
-
ready:
|
|
437
|
-
pending:
|
|
438
|
-
bannerOpen:
|
|
439
|
-
preferencesOpen:
|
|
437
|
+
value: B(() => ({
|
|
438
|
+
ready: I,
|
|
439
|
+
pending: De,
|
|
440
|
+
bannerOpen: G,
|
|
441
|
+
preferencesOpen: q,
|
|
440
442
|
version: t,
|
|
441
443
|
mode: u,
|
|
442
|
-
state:
|
|
444
|
+
state: R,
|
|
443
445
|
texts: j,
|
|
444
446
|
categories: P,
|
|
445
|
-
declaration:
|
|
446
|
-
inventory:
|
|
447
|
-
hasConsent:
|
|
448
|
-
isRequired:
|
|
449
|
-
showBanner:
|
|
450
|
-
hideBanner:
|
|
451
|
-
openPreferences:
|
|
452
|
-
closePreferences:
|
|
453
|
-
acceptAll:
|
|
454
|
-
rejectAll:
|
|
455
|
-
savePreferences:
|
|
456
|
-
withdrawConsent:
|
|
457
|
-
setDeclaration:
|
|
458
|
-
refreshInventory:
|
|
447
|
+
declaration: oe,
|
|
448
|
+
inventory: se,
|
|
449
|
+
hasConsent: Te,
|
|
450
|
+
isRequired: Ee,
|
|
451
|
+
showBanner: ce,
|
|
452
|
+
hideBanner: le,
|
|
453
|
+
openPreferences: ue,
|
|
454
|
+
closePreferences: de,
|
|
455
|
+
acceptAll: $,
|
|
456
|
+
rejectAll: pe,
|
|
457
|
+
savePreferences: Ce,
|
|
458
|
+
withdrawConsent: we,
|
|
459
|
+
setDeclaration: Y,
|
|
460
|
+
refreshInventory: Z
|
|
459
461
|
}), [
|
|
460
|
-
|
|
461
|
-
|
|
462
|
+
I,
|
|
463
|
+
De,
|
|
464
|
+
G,
|
|
462
465
|
q,
|
|
463
|
-
oe,
|
|
464
466
|
t,
|
|
465
467
|
u,
|
|
466
|
-
|
|
468
|
+
R,
|
|
467
469
|
j,
|
|
468
470
|
P,
|
|
471
|
+
oe,
|
|
469
472
|
se,
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
+
Te,
|
|
474
|
+
Ee,
|
|
475
|
+
ce,
|
|
476
|
+
le,
|
|
473
477
|
ue,
|
|
474
478
|
de,
|
|
475
479
|
$,
|
|
476
480
|
pe,
|
|
477
481
|
Ce,
|
|
478
482
|
we,
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
X,
|
|
482
|
-
le
|
|
483
|
+
Y,
|
|
484
|
+
Z
|
|
483
485
|
]),
|
|
484
486
|
children: e
|
|
485
487
|
});
|
|
@@ -512,13 +514,13 @@ function Oe(e, t) {
|
|
|
512
514
|
return !e || e.length === 0 ? [] : e.filter((e) => e.category === t ? e.type == null || Ee.has(e.type) : !1).sort((e, t) => e.name.localeCompare(t.name));
|
|
513
515
|
}
|
|
514
516
|
function ke({ open: e, variant: t = "drawer", embedded: n = !1, title: r, description: i, showAcceptAll: a = !0, showRejectAll: o = !0, showSave: s = !0, acceptLabel: c, rejectLabel: l, saveLabel: d, closeLabel: f, categories: m, onClose: C, onAcceptAll: w, onRejectAll: T, onSave: E, renderCategoryDetails: te, className: D, ...O }) {
|
|
515
|
-
let k = $(), A =
|
|
516
|
-
if (
|
|
517
|
+
let k = $(), A = B(() => m ?? k?.categories ?? [], [m, k?.categories]), j = e ?? k?.preferencesOpen ?? !1, [ne, re] = H(() => De(A, k?.state?.categories ?? null));
|
|
518
|
+
if (z(() => {
|
|
517
519
|
re(De(A, k?.state?.categories ?? null));
|
|
518
|
-
}, [A, k?.state]),
|
|
520
|
+
}, [A, k?.state]), z(() => {
|
|
519
521
|
j && k?.refreshInventory();
|
|
520
522
|
}, [k, j]), !j && t !== "inline") return null;
|
|
521
|
-
let M = r ?? k?.texts.preferencesTitle, N = i ?? k?.texts.preferencesDescription, I = c ?? k?.texts.acceptAll,
|
|
523
|
+
let M = r ?? k?.texts.preferencesTitle, N = i ?? k?.texts.preferencesDescription, I = c ?? k?.texts.acceptAll, ae = l ?? k?.texts.rejectAll, L = d ?? k?.texts.savePreferences, R = f ?? k?.texts.close ?? "Close", V = k?.texts.requiredLabel, U = k?.texts.detectedCookiesLabel ?? "Detected cookies", K = k?.texts.noDetectedCookies ?? "No cookies detected in this category yet.", q = C ?? (() => k?.closePreferences()), J = w ?? (() => k?.acceptAll("preferences")), oe = T ?? (() => k?.rejectAll("preferences")), Y = E ?? ((e) => k?.savePreferences(e, "preferences")), se = /* @__PURE__ */ G(ie, {
|
|
522
524
|
align: "center",
|
|
523
525
|
className: "cookie-preferences-brand",
|
|
524
526
|
children: [/* @__PURE__ */ W(h, {
|
|
@@ -542,9 +544,9 @@ function ke({ open: e, variant: t = "drawer", embedded: n = !1, title: r, descri
|
|
|
542
544
|
children: [
|
|
543
545
|
/* @__PURE__ */ G("div", {
|
|
544
546
|
className: "cookie-preferences-label",
|
|
545
|
-
children: [/* @__PURE__ */ W("span", { children: e.label }), e.required &&
|
|
547
|
+
children: [/* @__PURE__ */ W("span", { children: e.label }), e.required && V && /* @__PURE__ */ W("span", {
|
|
546
548
|
className: "cookie-preferences-required",
|
|
547
|
-
children:
|
|
549
|
+
children: V
|
|
548
550
|
})]
|
|
549
551
|
}),
|
|
550
552
|
/* @__PURE__ */ W("div", {
|
|
@@ -556,7 +558,7 @@ function ke({ open: e, variant: t = "drawer", embedded: n = !1, title: r, descri
|
|
|
556
558
|
className: "cookie-preferences-detected",
|
|
557
559
|
children: [/* @__PURE__ */ W("div", {
|
|
558
560
|
className: "cookie-preferences-detected-label",
|
|
559
|
-
children:
|
|
561
|
+
children: U
|
|
560
562
|
}), t.length > 0 ? /* @__PURE__ */ W("div", {
|
|
561
563
|
className: "cookie-preferences-cookie-list",
|
|
562
564
|
children: t.map((e) => /* @__PURE__ */ G("div", {
|
|
@@ -614,13 +616,13 @@ function ke({ open: e, variant: t = "drawer", embedded: n = !1, title: r, descri
|
|
|
614
616
|
variant: "ghost",
|
|
615
617
|
color: "primary",
|
|
616
618
|
onClick: q,
|
|
617
|
-
children:
|
|
619
|
+
children: R
|
|
618
620
|
}),
|
|
619
621
|
o && /* @__PURE__ */ W(p, {
|
|
620
622
|
variant: "outlined",
|
|
621
623
|
color: "primary",
|
|
622
624
|
onClick: oe,
|
|
623
|
-
children:
|
|
625
|
+
children: ae
|
|
624
626
|
}),
|
|
625
627
|
a && /* @__PURE__ */ W(p, {
|
|
626
628
|
variant: "ghost",
|
|
@@ -633,7 +635,7 @@ function ke({ open: e, variant: t = "drawer", embedded: n = !1, title: r, descri
|
|
|
633
635
|
onClick: () => {
|
|
634
636
|
Y(ne);
|
|
635
637
|
},
|
|
636
|
-
children:
|
|
638
|
+
children: L
|
|
637
639
|
})
|
|
638
640
|
]
|
|
639
641
|
})]
|
|
@@ -698,8 +700,8 @@ function Ae() {
|
|
|
698
700
|
return typeof window > "u" ? null : window.__MINERAL_COOKIE_RUNTIME__ ?? null;
|
|
699
701
|
}
|
|
700
702
|
function je() {
|
|
701
|
-
let [e, t] =
|
|
702
|
-
return
|
|
703
|
+
let [e, t] = H(() => Ae());
|
|
704
|
+
return z(() => {
|
|
703
705
|
if (typeof window > "u") return;
|
|
704
706
|
let e = () => {
|
|
705
707
|
t(Ae());
|
|
@@ -710,8 +712,8 @@ function je() {
|
|
|
710
712
|
}, []), e;
|
|
711
713
|
}
|
|
712
714
|
function Me({ placement: e = "bottom-left", triggerPlacement: t = "bottom-left", blockInteraction: n = !0, className: r, details: i }) {
|
|
713
|
-
let a = pe(), o = a.bannerOpen || a.preferencesOpen;
|
|
714
|
-
|
|
715
|
+
let a = pe(), o = a.ready && (a.bannerOpen || a.preferencesOpen);
|
|
716
|
+
z(() => {
|
|
715
717
|
if (!n || !a.pending || !o) return;
|
|
716
718
|
let e = document.body.style.overflow;
|
|
717
719
|
return document.body.style.overflow = "hidden", () => {
|
|
@@ -723,7 +725,7 @@ function Me({ placement: e = "bottom-left", triggerPlacement: t = "bottom-left",
|
|
|
723
725
|
o
|
|
724
726
|
]);
|
|
725
727
|
let c = e === "modal" ? "center" : e, l = e === "top-drawer" || e === "bottom-drawer";
|
|
726
|
-
return /* @__PURE__ */ G(
|
|
728
|
+
return /* @__PURE__ */ G(U, { children: [o && /* @__PURE__ */ G(d, { children: [n && a.pending && /* @__PURE__ */ W("div", { className: "cookie-consent-backdrop" }), /* @__PURE__ */ W("div", {
|
|
727
729
|
className: "cookie-consent-layer",
|
|
728
730
|
children: /* @__PURE__ */ W("div", {
|
|
729
731
|
className: u("cookie-consent-panel", c),
|
|
@@ -790,7 +792,7 @@ function Me({ placement: e = "bottom-left", triggerPlacement: t = "bottom-left",
|
|
|
790
792
|
})
|
|
791
793
|
})
|
|
792
794
|
})
|
|
793
|
-
})] }), t !== "none" && !o && /* @__PURE__ */ W(d, { children: /* @__PURE__ */ W(we, {
|
|
795
|
+
})] }), a.ready && t !== "none" && !o && /* @__PURE__ */ W(d, { children: /* @__PURE__ */ W(we, {
|
|
794
796
|
variant: "filled",
|
|
795
797
|
color: "primary",
|
|
796
798
|
shape: "circle",
|
|
@@ -839,7 +841,7 @@ function Ne({ placement: e = "bottom-left", triggerPlacement: t = "bottom-left",
|
|
|
839
841
|
//#endregion
|
|
840
842
|
//#region src/components/feedback/MCookie/MCookieBanner/MCookieBanner.tsx
|
|
841
843
|
function Pe({ className: e, title: t, description: n, showRejectAll: r, showPreferences: i, acceptLabel: a, rejectLabel: o, preferencesLabel: s, dismissible: c, closeLabel: l, onAcceptAll: d, onRejectAll: f, onOpenPreferences: m, onDismiss: h, actions: g, children: _ }) {
|
|
842
|
-
let b = _ ?? /* @__PURE__ */ G(
|
|
844
|
+
let b = _ ?? /* @__PURE__ */ G(U, { children: [/* @__PURE__ */ G("div", {
|
|
843
845
|
className: "cookie-banner-content",
|
|
844
846
|
children: [t && /* @__PURE__ */ W("div", {
|
|
845
847
|
className: "cookie-banner-title",
|
|
@@ -850,7 +852,7 @@ function Pe({ className: e, title: t, description: n, showRejectAll: r, showPref
|
|
|
850
852
|
})]
|
|
851
853
|
}), /* @__PURE__ */ G("div", {
|
|
852
854
|
className: "cookie-banner-actions",
|
|
853
|
-
children: [g ?? /* @__PURE__ */ G(
|
|
855
|
+
children: [g ?? /* @__PURE__ */ G(U, { children: [
|
|
854
856
|
i && /* @__PURE__ */ W(p, {
|
|
855
857
|
variant: "ghost",
|
|
856
858
|
color: "primary",
|
|
@@ -930,7 +932,7 @@ function Le(e, t) {
|
|
|
930
932
|
].filter(Boolean).some((e) => String(e).toLowerCase().includes(n)));
|
|
931
933
|
}
|
|
932
934
|
function Re({ items: e, grouped: t = !0, searchable: n = !1, compact: r = !1, emptyState: i, loading: a = !1, title: o, description: s, showCategory: c = !0, showProvider: l = !0, showDuration: d = !0, showType: f = !0, showDomain: p = !0, renderActions: g, className: _, ...v }) {
|
|
933
|
-
let y = $(), [b, ee] =
|
|
935
|
+
let y = $(), [b, ee] = H(""), x = B(() => e ?? y?.declaration ?? [], [y?.declaration, e]), S = B(() => Le(x, b), [b, x]), w = o ?? y?.texts.declarationTitle, T = s ?? y?.texts.declarationDescription, E = y?.texts.noDeclarationItems ?? "No declaration items available.", te = y?.texts.searchDeclaration ?? "Search cookies...", D = B(() => {
|
|
934
936
|
let e = [];
|
|
935
937
|
return c && !t && e.push({
|
|
936
938
|
key: "category",
|
|
@@ -972,7 +974,7 @@ function Re({ items: e, grouped: t = !0, searchable: n = !1, compact: r = !1, em
|
|
|
972
974
|
d,
|
|
973
975
|
l,
|
|
974
976
|
f
|
|
975
|
-
]), O =
|
|
977
|
+
]), O = B(() => {
|
|
976
978
|
if (!t) return [];
|
|
977
979
|
let e = /* @__PURE__ */ new Map();
|
|
978
980
|
for (let t of S) {
|
|
@@ -1033,6 +1035,6 @@ function Re({ items: e, grouped: t = !0, searchable: n = !1, compact: r = !1, em
|
|
|
1033
1035
|
});
|
|
1034
1036
|
}
|
|
1035
1037
|
//#endregion
|
|
1036
|
-
export { we as a, ue as c, oe as d, J as f, ke as i,
|
|
1038
|
+
export { we as a, ue as c, oe as d, J as f, ke as i, Q as l, Ie as n, Ce as o, Ne as r, pe as s, Re as t, se as u };
|
|
1037
1039
|
|
|
1038
|
-
//# sourceMappingURL=feedback-
|
|
1040
|
+
//# sourceMappingURL=feedback-DCIGou8P.js.map
|