@abyss-project/commons-front-core 7.1.0 → 8.0.0
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 +24 -0
- package/dist/{AbyssModal.component-DVIzX2ko.js → AbyssCookieConsentProvider-BhSzVu8P.js} +2328 -2103
- package/dist/CookieConsentSettings.component-DMEAuCVS.js +77 -0
- package/dist/components/layers/Toast/Toast.d.ts +1 -1
- package/dist/components/structure/AppShell/AppShell.d.ts +1 -1
- package/dist/components/structure/test-support/structure-test-harness.d.ts +1 -1
- package/dist/cookie-consent.js +17 -16
- package/dist/{design-theme-DGpfyrRa.js → design-theme-CvLzOz3p.js} +1 -1
- package/dist/fonts.css +1 -1
- package/dist/hooks/use-rich-intl.hook.d.ts +10 -0
- package/dist/{index-2dP8eJDC.js → index-21vSFz6u.js} +2 -2
- package/dist/{index-CKRPvslz.js → index-6KdfKdSJ.js} +2 -2
- package/dist/{index-CRAwLl2U.js → index-7HAvRXgu.js} +2 -2
- package/dist/{index-ClyGJxMq.js → index-ASLTmD1Y.js} +2 -2
- package/dist/{index-EOvj8bHf.js → index-BTjzj7mm.js} +2 -2
- package/dist/{index-Bnd34zc3.js → index-BVS73U9E.js} +4 -4
- package/dist/{index-D3RFab1e.js → index-BkfBpYKR.js} +3 -3
- package/dist/{index-G39MXErO.js → index-BqIg55B3.js} +4 -4
- package/dist/{index-BCbBLGCq.js → index-Btnmn1iK.js} +4 -4
- package/dist/{index-uN5dp-oL.js → index-BtsnuEJC.js} +24753 -22818
- package/dist/{index-5lZWuL9E.js → index-C92C_oG5.js} +2 -2
- package/dist/{index-BNXtGwVO.js → index-CHGRiRCe.js} +3 -3
- package/dist/{index-BvnEqebm.js → index-ClLoBnCN.js} +2 -2
- package/dist/{index-C9rZao0s.js → index-D4Qh2Iww.js} +3 -3
- package/dist/{index-DY-1nAn8.js → index-D5e4uD4k.js} +2 -2
- package/dist/{index-BzqtPPN5.js → index-D_GWBYM2.js} +1 -1
- package/dist/{index-D-ULIp83.js → index-DixNft1u.js} +2 -2
- package/dist/{index-s1jdo-Md.js → index-GoHiFeaw.js} +2 -2
- package/dist/{index-CtgSTnzK.js → index-LdiTmDFg.js} +2 -2
- package/dist/{index-Dne75cXj.js → index-Ni4BmFs4.js} +2 -2
- package/dist/{index-CUmAInm9.js → index-bR-mnNUA.js} +2 -2
- package/dist/{index-CEkvsFyX.js → index-l7FAjaVB.js} +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1581 -1514
- package/dist/legacy/components/CookieConsent/AbyssCookieConsentProvider.d.ts +5 -0
- package/dist/legacy/components/CookieConsent/AbyssCookieConsentProvider.spec.d.ts +1 -0
- package/dist/legacy/components/Utils/AbyssErrorPage/AbyssErrorBoundary.component.spec.d.ts +1 -0
- package/dist/legacy/fonts.css +1 -1
- package/dist/legacy.js +83 -82
- package/dist/rum/AbyssRumProvider.d.ts +29 -0
- package/dist/rum/AbyssRumProvider.spec.d.ts +1 -0
- package/dist/rum/feedback-ticket.d.ts +24 -0
- package/dist/rum/index.d.ts +2 -0
- package/dist/theme/augmentation.d.ts +1 -1
- package/dist/theme/components/shared.d.ts +1 -1
- package/dist/theme/create-abyss-theme.d.ts +1 -1
- package/dist/theme/design-theme.d.ts +1 -1
- package/dist/theme/tokens/oklch.d.ts +1 -1
- package/dist/theme/tokens/soft.d.ts +1 -1
- package/dist/translations/en.d.ts +1 -0
- package/dist/translations/fr.d.ts +1 -0
- package/package.json +7 -3
- package/vite.config.ts +1 -1
- package/dist/CookieConsentSettings.component-BdBT72qy.js +0 -299
- package/test-results/catalog/.last-run.json +0 -4
|
@@ -1,299 +0,0 @@
|
|
|
1
|
-
import { jsxs as r, Fragment as S, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { useState as b, createContext as I, useContext as P, useMemo as j, useEffect as F } from "react";
|
|
3
|
-
import { useTheme as R, Paper as _, Typography as s, Link as z, Stack as f, Button as m, Box as p, Switch as E, Card as T, CardContent as L, FormControlLabel as x, Checkbox as y } from "@mui/material";
|
|
4
|
-
import { b as v, l as k, D as Y, A as $, u as D } from "./AbyssModal.component-DVIzX2ko.js";
|
|
5
|
-
const C = ({ category: i, checked: o, locked: t = !1, onChange: c }) => {
|
|
6
|
-
const n = R(), a = v();
|
|
7
|
-
return /* @__PURE__ */ r(
|
|
8
|
-
f,
|
|
9
|
-
{
|
|
10
|
-
direction: "row",
|
|
11
|
-
spacing: 2,
|
|
12
|
-
alignItems: "flex-start",
|
|
13
|
-
sx: {
|
|
14
|
-
p: 2,
|
|
15
|
-
borderRadius: "12px",
|
|
16
|
-
border: "1px solid",
|
|
17
|
-
borderColor: k(n.palette.mode).glass.border,
|
|
18
|
-
bgcolor: k(n.palette.mode).glass.background
|
|
19
|
-
},
|
|
20
|
-
children: [
|
|
21
|
-
/* @__PURE__ */ r(p, { sx: { flex: 1, minWidth: 0 }, children: [
|
|
22
|
-
/* @__PURE__ */ r(f, { direction: "row", spacing: 1, alignItems: "center", children: [
|
|
23
|
-
/* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: a.formatRichMessage({
|
|
24
|
-
id: `cookies.category.${i}.title`
|
|
25
|
-
}) }),
|
|
26
|
-
t && /* @__PURE__ */ e(
|
|
27
|
-
s,
|
|
28
|
-
{
|
|
29
|
-
variant: "caption",
|
|
30
|
-
sx: {
|
|
31
|
-
px: 0.75,
|
|
32
|
-
py: 0.125,
|
|
33
|
-
borderRadius: "6px",
|
|
34
|
-
color: n.palette.primary.main,
|
|
35
|
-
border: "1px solid",
|
|
36
|
-
borderColor: k(n.palette.mode).glass.borderHover,
|
|
37
|
-
whiteSpace: "nowrap"
|
|
38
|
-
},
|
|
39
|
-
children: a.formatRichMessage({
|
|
40
|
-
id: "cookies.category.essentials.always-on"
|
|
41
|
-
})
|
|
42
|
-
}
|
|
43
|
-
)
|
|
44
|
-
] }),
|
|
45
|
-
/* @__PURE__ */ e(
|
|
46
|
-
s,
|
|
47
|
-
{
|
|
48
|
-
variant: "caption",
|
|
49
|
-
color: "text.secondary",
|
|
50
|
-
sx: { display: "block", mt: 0.5 },
|
|
51
|
-
children: a.formatRichMessage({
|
|
52
|
-
id: `cookies.category.${i}.description`
|
|
53
|
-
})
|
|
54
|
-
}
|
|
55
|
-
)
|
|
56
|
-
] }),
|
|
57
|
-
/* @__PURE__ */ e(
|
|
58
|
-
E,
|
|
59
|
-
{
|
|
60
|
-
checked: o,
|
|
61
|
-
disabled: t,
|
|
62
|
-
onChange: (d, l) => c == null ? void 0 : c(l),
|
|
63
|
-
inputProps: {
|
|
64
|
-
"aria-label": a.formatRichMessage({
|
|
65
|
-
id: `cookies.category.${i}.title`
|
|
66
|
-
})
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
)
|
|
70
|
-
]
|
|
71
|
-
}
|
|
72
|
-
);
|
|
73
|
-
}, H = ({
|
|
74
|
-
api: i
|
|
75
|
-
}) => {
|
|
76
|
-
const o = R(), t = v(), { acceptAll: c, rejectAll: n, save: a } = i, [d, l] = b(!1), [h, u] = b(!1), [g, w] = b(!1), A = () => {
|
|
77
|
-
a({ analytics: h, marketing: g }), l(!1);
|
|
78
|
-
};
|
|
79
|
-
return /* @__PURE__ */ r(S, { children: [
|
|
80
|
-
/* @__PURE__ */ r(
|
|
81
|
-
_,
|
|
82
|
-
{
|
|
83
|
-
elevation: 0,
|
|
84
|
-
role: "dialog",
|
|
85
|
-
"aria-modal": !1,
|
|
86
|
-
"aria-labelledby": "cookie-consent-title",
|
|
87
|
-
"aria-describedby": "cookie-consent-description",
|
|
88
|
-
sx: {
|
|
89
|
-
position: "fixed",
|
|
90
|
-
bottom: { xs: 12, md: 24 },
|
|
91
|
-
left: { xs: 12, md: "auto" },
|
|
92
|
-
right: { xs: 12, md: 24 },
|
|
93
|
-
width: { xs: "auto", md: 420 },
|
|
94
|
-
zIndex: (W) => W.zIndex.snackbar,
|
|
95
|
-
p: { xs: 2.5, md: 3 },
|
|
96
|
-
borderRadius: "16px",
|
|
97
|
-
border: "1px solid",
|
|
98
|
-
borderColor: k(o.palette.mode).glass.border,
|
|
99
|
-
// Opaque base under the gradient: the surface gradient is translucent,
|
|
100
|
-
// and on its own it let the page text behind the card show through.
|
|
101
|
-
backgroundColor: o.palette.background.paper,
|
|
102
|
-
backgroundImage: k(o.palette.mode).gradients.surface,
|
|
103
|
-
backdropFilter: k(o.palette.mode).glass.blurStrong,
|
|
104
|
-
boxShadow: "0 16px 48px rgba(0, 0, 0, 0.45)",
|
|
105
|
-
animation: "cookie-consent-in 320ms cubic-bezier(0.16, 1, 0.3, 1)",
|
|
106
|
-
"@keyframes cookie-consent-in": {
|
|
107
|
-
from: { opacity: 0, transform: "translateY(12px)" },
|
|
108
|
-
to: { opacity: 1, transform: "translateY(0)" }
|
|
109
|
-
},
|
|
110
|
-
"@media (prefers-reduced-motion: reduce)": {
|
|
111
|
-
animation: "none"
|
|
112
|
-
}
|
|
113
|
-
},
|
|
114
|
-
children: [
|
|
115
|
-
/* @__PURE__ */ e(
|
|
116
|
-
s,
|
|
117
|
-
{
|
|
118
|
-
id: "cookie-consent-title",
|
|
119
|
-
variant: "subtitle1",
|
|
120
|
-
fontWeight: 700,
|
|
121
|
-
children: t.formatRichMessage({ id: "cookies.banner.title" })
|
|
122
|
-
}
|
|
123
|
-
),
|
|
124
|
-
/* @__PURE__ */ e(
|
|
125
|
-
s,
|
|
126
|
-
{
|
|
127
|
-
id: "cookie-consent-description",
|
|
128
|
-
variant: "body2",
|
|
129
|
-
color: "text.secondary",
|
|
130
|
-
sx: { mt: 1 },
|
|
131
|
-
children: t.formatRichMessage({ id: "cookies.banner.description" })
|
|
132
|
-
}
|
|
133
|
-
),
|
|
134
|
-
/* @__PURE__ */ e(
|
|
135
|
-
z,
|
|
136
|
-
{
|
|
137
|
-
href: Y,
|
|
138
|
-
rel: "noreferrer",
|
|
139
|
-
underline: "hover",
|
|
140
|
-
variant: "body2",
|
|
141
|
-
sx: {
|
|
142
|
-
display: "inline-block",
|
|
143
|
-
mt: 1.5,
|
|
144
|
-
color: o.palette.primary.main
|
|
145
|
-
},
|
|
146
|
-
children: t.formatRichMessage({ id: "cookies.banner.privacy-link" })
|
|
147
|
-
}
|
|
148
|
-
),
|
|
149
|
-
/* @__PURE__ */ r(f, { direction: "row", spacing: 1, sx: { mt: 2.5 }, children: [
|
|
150
|
-
/* @__PURE__ */ e(m, { variant: "contained", onClick: c, sx: { flex: 1 }, children: t.formatRichMessage({ id: "cookies.action.accept-all" }) }),
|
|
151
|
-
/* @__PURE__ */ e(m, { variant: "outlined", onClick: n, sx: { flex: 1 }, children: t.formatRichMessage({ id: "cookies.action.reject-all" }) })
|
|
152
|
-
] }),
|
|
153
|
-
/* @__PURE__ */ e(
|
|
154
|
-
m,
|
|
155
|
-
{
|
|
156
|
-
variant: "text",
|
|
157
|
-
size: "small",
|
|
158
|
-
onClick: () => l(!0),
|
|
159
|
-
sx: { mt: 1, width: "100%", color: "text.secondary" },
|
|
160
|
-
children: t.formatRichMessage({ id: "cookies.action.configure" })
|
|
161
|
-
}
|
|
162
|
-
)
|
|
163
|
-
]
|
|
164
|
-
}
|
|
165
|
-
),
|
|
166
|
-
/* @__PURE__ */ r(
|
|
167
|
-
$,
|
|
168
|
-
{
|
|
169
|
-
open: d,
|
|
170
|
-
onClose: () => l(!1),
|
|
171
|
-
maxWidth: "sm",
|
|
172
|
-
fullWidth: !0,
|
|
173
|
-
children: [
|
|
174
|
-
/* @__PURE__ */ e(s, { variant: "h6", fontWeight: 700, children: t.formatRichMessage({ id: "cookies.configure.title" }) }),
|
|
175
|
-
/* @__PURE__ */ r(f, { spacing: 1.5, sx: { mt: 3 }, children: [
|
|
176
|
-
/* @__PURE__ */ e(C, { category: "essentials", checked: !0, locked: !0 }),
|
|
177
|
-
/* @__PURE__ */ e(
|
|
178
|
-
C,
|
|
179
|
-
{
|
|
180
|
-
category: "analytics",
|
|
181
|
-
checked: h,
|
|
182
|
-
onChange: u
|
|
183
|
-
}
|
|
184
|
-
),
|
|
185
|
-
/* @__PURE__ */ e(
|
|
186
|
-
C,
|
|
187
|
-
{
|
|
188
|
-
category: "marketing",
|
|
189
|
-
checked: g,
|
|
190
|
-
onChange: w
|
|
191
|
-
}
|
|
192
|
-
)
|
|
193
|
-
] }),
|
|
194
|
-
/* @__PURE__ */ r(
|
|
195
|
-
f,
|
|
196
|
-
{
|
|
197
|
-
direction: "row",
|
|
198
|
-
spacing: 1,
|
|
199
|
-
justifyContent: "flex-end",
|
|
200
|
-
sx: { mt: 3 },
|
|
201
|
-
children: [
|
|
202
|
-
/* @__PURE__ */ e(m, { variant: "text", onClick: () => l(!1), children: t.formatRichMessage({ id: "cookies.action.cancel" }) }),
|
|
203
|
-
/* @__PURE__ */ e(m, { variant: "contained", onClick: A, children: t.formatRichMessage({ id: "cookies.action.save" }) })
|
|
204
|
-
]
|
|
205
|
-
}
|
|
206
|
-
)
|
|
207
|
-
]
|
|
208
|
-
}
|
|
209
|
-
)
|
|
210
|
-
] });
|
|
211
|
-
}, M = I(null), O = () => {
|
|
212
|
-
const i = P(M);
|
|
213
|
-
if (!i)
|
|
214
|
-
throw new Error(
|
|
215
|
-
"useAbyssCookieConsent must be used inside <AbyssCookieConsentProvider>"
|
|
216
|
-
);
|
|
217
|
-
return i;
|
|
218
|
-
}, G = ({ children: i, consentVersion: o, isAuthenticated: t, domain: c, renderBanner: n }) => {
|
|
219
|
-
const a = D({ isAuthenticated: t, consentVersion: o, domain: c }), d = j(() => a.isResolved ? null : n ? n(a) : /* @__PURE__ */ e(H, { api: a }), [a, n]);
|
|
220
|
-
return /* @__PURE__ */ r(M.Provider, { value: a, children: [
|
|
221
|
-
i,
|
|
222
|
-
d
|
|
223
|
-
] });
|
|
224
|
-
}, J = () => {
|
|
225
|
-
const i = v(), { consent: o, save: t } = O(), [c, n] = b((o == null ? void 0 : o.analytics) ?? !1), [a, d] = b((o == null ? void 0 : o.marketing) ?? !1), l = o == null ? void 0 : o.analytics, h = o == null ? void 0 : o.marketing;
|
|
226
|
-
return F(() => {
|
|
227
|
-
l !== void 0 && n(l), h !== void 0 && d(h);
|
|
228
|
-
}, [l, h]), /* @__PURE__ */ e(T, { sx: { borderRadius: 3 }, children: /* @__PURE__ */ e(L, { children: /* @__PURE__ */ r(f, { spacing: 2, children: [
|
|
229
|
-
/* @__PURE__ */ e(s, { variant: "h6", children: i.formatRichMessage({ id: "cookies.configure.title" }) }),
|
|
230
|
-
/* @__PURE__ */ e(
|
|
231
|
-
x,
|
|
232
|
-
{
|
|
233
|
-
control: /* @__PURE__ */ e(y, { checked: !0, disabled: !0 }),
|
|
234
|
-
label: /* @__PURE__ */ r(p, { children: [
|
|
235
|
-
/* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: i.formatRichMessage({
|
|
236
|
-
id: "cookies.category.essentials.title"
|
|
237
|
-
}) }),
|
|
238
|
-
/* @__PURE__ */ e(s, { variant: "caption", color: "text.secondary", children: i.formatRichMessage({
|
|
239
|
-
id: "cookies.category.essentials.description"
|
|
240
|
-
}) })
|
|
241
|
-
] })
|
|
242
|
-
}
|
|
243
|
-
),
|
|
244
|
-
/* @__PURE__ */ e(
|
|
245
|
-
x,
|
|
246
|
-
{
|
|
247
|
-
control: /* @__PURE__ */ e(
|
|
248
|
-
y,
|
|
249
|
-
{
|
|
250
|
-
checked: c,
|
|
251
|
-
onChange: (u, g) => n(g)
|
|
252
|
-
}
|
|
253
|
-
),
|
|
254
|
-
label: /* @__PURE__ */ r(p, { children: [
|
|
255
|
-
/* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: i.formatRichMessage({
|
|
256
|
-
id: "cookies.category.analytics.title"
|
|
257
|
-
}) }),
|
|
258
|
-
/* @__PURE__ */ e(s, { variant: "caption", color: "text.secondary", children: i.formatRichMessage({
|
|
259
|
-
id: "cookies.category.analytics.description"
|
|
260
|
-
}) })
|
|
261
|
-
] })
|
|
262
|
-
}
|
|
263
|
-
),
|
|
264
|
-
/* @__PURE__ */ e(
|
|
265
|
-
x,
|
|
266
|
-
{
|
|
267
|
-
control: /* @__PURE__ */ e(
|
|
268
|
-
y,
|
|
269
|
-
{
|
|
270
|
-
checked: a,
|
|
271
|
-
onChange: (u, g) => d(g)
|
|
272
|
-
}
|
|
273
|
-
),
|
|
274
|
-
label: /* @__PURE__ */ r(p, { children: [
|
|
275
|
-
/* @__PURE__ */ e(s, { variant: "body2", fontWeight: 600, children: i.formatRichMessage({
|
|
276
|
-
id: "cookies.category.marketing.title"
|
|
277
|
-
}) }),
|
|
278
|
-
/* @__PURE__ */ e(s, { variant: "caption", color: "text.secondary", children: i.formatRichMessage({
|
|
279
|
-
id: "cookies.category.marketing.description"
|
|
280
|
-
}) })
|
|
281
|
-
] })
|
|
282
|
-
}
|
|
283
|
-
),
|
|
284
|
-
/* @__PURE__ */ e(p, { children: /* @__PURE__ */ e(
|
|
285
|
-
m,
|
|
286
|
-
{
|
|
287
|
-
variant: "contained",
|
|
288
|
-
onClick: () => t({ analytics: c, marketing: a }),
|
|
289
|
-
children: i.formatRichMessage({ id: "cookies.action.save" })
|
|
290
|
-
}
|
|
291
|
-
) })
|
|
292
|
-
] }) }) });
|
|
293
|
-
};
|
|
294
|
-
export {
|
|
295
|
-
G as A,
|
|
296
|
-
H as C,
|
|
297
|
-
J as a,
|
|
298
|
-
O as u
|
|
299
|
-
};
|