@notificationapi/react 1.7.0 → 1.9.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/dist/assets/Badge.js +60 -64
- package/dist/assets/Box.js +26 -24
- package/dist/assets/Button.js +22 -19
- package/dist/assets/ButtonBase.js +193 -185
- package/dist/assets/DefaultPropsProvider.js +416 -4199
- package/dist/assets/DefaultPropsProvider2.js +992 -0
- package/dist/assets/Divider.js +22 -18
- package/dist/assets/GlobalStyles.js +23 -0
- package/dist/assets/Grow.js +1513 -120
- package/dist/assets/IconButton.js +8 -7
- package/dist/assets/List.js +12 -11
- package/dist/assets/Modal.js +18 -17
- package/dist/assets/Notification.js +787 -770
- package/dist/assets/Paper.js +8 -8
- package/dist/assets/Popover.js +37 -36
- package/dist/assets/Portal.js +39 -49
- package/dist/assets/Stack.js +32 -30
- package/dist/assets/Typography.js +84 -97
- package/dist/assets/createSvgIcon.js +25 -24
- package/dist/assets/createTheme.js +2828 -0
- package/dist/assets/exactProp.js +13 -0
- package/dist/assets/index.js +19 -148
- package/dist/assets/index2.js +151 -0
- package/dist/assets/useControlled.js +49 -0
- package/dist/assets/usePreviousProps.js +10 -0
- package/dist/assets/useTheme.js +6 -7
- package/dist/assets/{useTheme2.js → useThemeWithoutDefault.js} +63 -67
- package/dist/assets/utils.js +4 -4
- package/dist/components/Notifications/Inbox.js +593 -583
- package/dist/components/Notifications/InboxHeader.js +360 -1754
- package/dist/components/Notifications/Notification.js +4 -2
- package/dist/components/Notifications/NotificationFeed.js +40 -32
- package/dist/components/Notifications/NotificationLauncher.js +90 -64
- package/dist/components/Notifications/NotificationPopup.js +76 -65
- package/dist/components/Preferences/NotificationPreferencesInline.js +57 -39
- package/dist/components/Preferences/NotificationPreferencesPopup.js +111 -99
- package/dist/components/Preferences/PreferenceInput.js +427 -414
- package/dist/components/Preferences/Preferences.js +329 -278
- package/dist/components/Provider/index.d.ts +2 -0
- package/dist/components/Provider/index.js +1008 -401
- package/dist/components/Slack/SlackConnect.js +4627 -2024
- package/dist/main.d.ts +2 -0
- package/dist/main.js +6 -3
- package/dist/utils/theme.d.ts +17 -0
- package/dist/utils/theme.js +104 -0
- package/package.json +1 -1
- package/dist/assets/dividerClasses.js +0 -56
|
@@ -1,36 +1,37 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { useContext as
|
|
4
|
-
import { NotificationAPIContext as
|
|
1
|
+
import { jsx as s, jsxs as G, Fragment as he } from "react/jsx-runtime";
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import { useContext as xe } from "react";
|
|
4
|
+
import { NotificationAPIContext as ye } from "../Provider/context.js";
|
|
5
5
|
import { PreferenceInput as ie } from "./PreferenceInput.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import { P as
|
|
10
|
-
import { a as
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
6
|
+
import { getThemeColors as ve } from "../../utils/theme.js";
|
|
7
|
+
import { u as le, b as Ce, e as Te, a as se, c as we, B as Ee } from "../../assets/ButtonBase.js";
|
|
8
|
+
import { r as Re } from "../../assets/index2.js";
|
|
9
|
+
import { g as q, P as e, p as Ae } from "../../assets/createTheme.js";
|
|
10
|
+
import { g as _, s as E, m as I, u as J, c as U, a as K } from "../../assets/DefaultPropsProvider.js";
|
|
11
|
+
import { P as Se } from "../../assets/Paper.js";
|
|
12
|
+
import { u as Ne } from "../../assets/useControlled.js";
|
|
13
|
+
import { T as Ie, g as ae } from "../../assets/utils.js";
|
|
14
|
+
import { u as De } from "../../assets/resolveComponentProps.js";
|
|
15
|
+
import { c as ke } from "../../assets/createSvgIcon.js";
|
|
15
16
|
import { T as ce } from "../../assets/Typography.js";
|
|
16
17
|
import { B as Me } from "../../assets/Box.js";
|
|
17
18
|
function Pe(o) {
|
|
18
|
-
return
|
|
19
|
+
return q("MuiCollapse", o);
|
|
19
20
|
}
|
|
20
|
-
|
|
21
|
+
_("MuiCollapse", ["root", "horizontal", "vertical", "entered", "hidden", "wrapper", "wrapperInner"]);
|
|
21
22
|
const Oe = (o) => {
|
|
22
23
|
const {
|
|
23
24
|
orientation: t,
|
|
24
25
|
classes: n
|
|
25
|
-
} = o,
|
|
26
|
+
} = o, c = {
|
|
26
27
|
root: ["root", `${t}`],
|
|
27
28
|
entered: ["entered"],
|
|
28
29
|
hidden: ["hidden"],
|
|
29
30
|
wrapper: ["wrapper", `${t}`],
|
|
30
31
|
wrapperInner: ["wrapperInner", `${t}`]
|
|
31
32
|
};
|
|
32
|
-
return K(
|
|
33
|
-
}, $e =
|
|
33
|
+
return K(c, Pe, n);
|
|
34
|
+
}, $e = E("div", {
|
|
34
35
|
name: "MuiCollapse",
|
|
35
36
|
slot: "Root",
|
|
36
37
|
overridesResolver: (o, t) => {
|
|
@@ -78,7 +79,7 @@ const Oe = (o) => {
|
|
|
78
79
|
visibility: "hidden"
|
|
79
80
|
}
|
|
80
81
|
}]
|
|
81
|
-
}))), ze =
|
|
82
|
+
}))), ze = E("div", {
|
|
82
83
|
name: "MuiCollapse",
|
|
83
84
|
slot: "Wrapper",
|
|
84
85
|
overridesResolver: (o, t) => t.wrapper
|
|
@@ -95,7 +96,7 @@ const Oe = (o) => {
|
|
|
95
96
|
height: "100%"
|
|
96
97
|
}
|
|
97
98
|
}]
|
|
98
|
-
}), je =
|
|
99
|
+
}), je = E("div", {
|
|
99
100
|
name: "MuiCollapse",
|
|
100
101
|
slot: "WrapperInner",
|
|
101
102
|
overridesResolver: (o, t) => t.wrapperInner
|
|
@@ -110,129 +111,129 @@ const Oe = (o) => {
|
|
|
110
111
|
height: "100%"
|
|
111
112
|
}
|
|
112
113
|
}]
|
|
113
|
-
}), L = /* @__PURE__ */
|
|
114
|
-
const
|
|
114
|
+
}), L = /* @__PURE__ */ u.forwardRef(function(t, n) {
|
|
115
|
+
const c = J({
|
|
115
116
|
props: t,
|
|
116
117
|
name: "MuiCollapse"
|
|
117
118
|
}), {
|
|
118
|
-
addEndListener:
|
|
119
|
-
children:
|
|
120
|
-
className:
|
|
119
|
+
addEndListener: i,
|
|
120
|
+
children: p,
|
|
121
|
+
className: l,
|
|
121
122
|
collapsedSize: d = "0px",
|
|
122
123
|
component: g,
|
|
123
|
-
easing:
|
|
124
|
+
easing: C,
|
|
124
125
|
in: m,
|
|
125
|
-
onEnter:
|
|
126
|
-
onEntered:
|
|
126
|
+
onEnter: a,
|
|
127
|
+
onEntered: x,
|
|
127
128
|
onEntering: A,
|
|
128
129
|
onExit: D,
|
|
129
|
-
onExited:
|
|
130
|
-
onExiting:
|
|
130
|
+
onExited: R,
|
|
131
|
+
onExiting: T,
|
|
131
132
|
orientation: f = "vertical",
|
|
132
|
-
style:
|
|
133
|
-
timeout:
|
|
133
|
+
style: k,
|
|
134
|
+
timeout: y = Ae.standard,
|
|
134
135
|
// eslint-disable-next-line react/prop-types
|
|
135
|
-
TransitionComponent:
|
|
136
|
+
TransitionComponent: W = Ie,
|
|
136
137
|
...Q
|
|
137
|
-
} =
|
|
138
|
-
...
|
|
138
|
+
} = c, M = {
|
|
139
|
+
...c,
|
|
139
140
|
orientation: f,
|
|
140
141
|
collapsedSize: d
|
|
141
|
-
},
|
|
142
|
+
}, v = Oe(M), P = le(), X = Ce(), w = u.useRef(null), O = u.useRef(), $ = typeof d == "number" ? `${d}px` : d, S = f === "horizontal", N = S ? "width" : "height", z = u.useRef(null), Y = De(n, z), j = (r) => (b) => {
|
|
142
143
|
if (r) {
|
|
143
|
-
const
|
|
144
|
-
|
|
144
|
+
const h = z.current;
|
|
145
|
+
b === void 0 ? r(h) : r(h, b);
|
|
145
146
|
}
|
|
146
|
-
}, Z = () =>
|
|
147
|
-
|
|
148
|
-
}),
|
|
149
|
-
const
|
|
150
|
-
|
|
147
|
+
}, Z = () => w.current ? w.current[S ? "clientWidth" : "clientHeight"] : 0, pe = j((r, b) => {
|
|
148
|
+
w.current && S && (w.current.style.position = "absolute"), r.style[N] = $, a && a(r, b);
|
|
149
|
+
}), ue = j((r, b) => {
|
|
150
|
+
const h = Z();
|
|
151
|
+
w.current && S && (w.current.style.position = "");
|
|
151
152
|
const {
|
|
152
153
|
duration: B,
|
|
153
154
|
easing: H
|
|
154
155
|
} = ae({
|
|
155
|
-
style:
|
|
156
|
-
timeout:
|
|
157
|
-
easing:
|
|
156
|
+
style: k,
|
|
157
|
+
timeout: y,
|
|
158
|
+
easing: C
|
|
158
159
|
}, {
|
|
159
160
|
mode: "enter"
|
|
160
161
|
});
|
|
161
|
-
if (
|
|
162
|
-
const re =
|
|
163
|
-
r.style.transitionDuration = `${re}ms`,
|
|
162
|
+
if (y === "auto") {
|
|
163
|
+
const re = P.transitions.getAutoHeightDuration(h);
|
|
164
|
+
r.style.transitionDuration = `${re}ms`, O.current = re;
|
|
164
165
|
} else
|
|
165
166
|
r.style.transitionDuration = typeof B == "string" ? B : `${B}ms`;
|
|
166
|
-
r.style[N] = `${
|
|
167
|
-
}),
|
|
168
|
-
r.style[N] = "auto",
|
|
169
|
-
}),
|
|
167
|
+
r.style[N] = `${h}px`, r.style.transitionTimingFunction = H, A && A(r, b);
|
|
168
|
+
}), fe = j((r, b) => {
|
|
169
|
+
r.style[N] = "auto", x && x(r, b);
|
|
170
|
+
}), me = j((r) => {
|
|
170
171
|
r.style[N] = `${Z()}px`, D && D(r);
|
|
171
|
-
}),
|
|
172
|
-
const
|
|
173
|
-
duration:
|
|
172
|
+
}), ge = j(R), be = j((r) => {
|
|
173
|
+
const b = Z(), {
|
|
174
|
+
duration: h,
|
|
174
175
|
easing: B
|
|
175
176
|
} = ae({
|
|
176
|
-
style:
|
|
177
|
-
timeout:
|
|
178
|
-
easing:
|
|
177
|
+
style: k,
|
|
178
|
+
timeout: y,
|
|
179
|
+
easing: C
|
|
179
180
|
}, {
|
|
180
181
|
mode: "exit"
|
|
181
182
|
});
|
|
182
|
-
if (
|
|
183
|
-
const H =
|
|
184
|
-
r.style.transitionDuration = `${H}ms`,
|
|
183
|
+
if (y === "auto") {
|
|
184
|
+
const H = P.transitions.getAutoHeightDuration(b);
|
|
185
|
+
r.style.transitionDuration = `${H}ms`, O.current = H;
|
|
185
186
|
} else
|
|
186
|
-
r.style.transitionDuration = typeof
|
|
187
|
-
r.style[N] =
|
|
187
|
+
r.style.transitionDuration = typeof h == "string" ? h : `${h}ms`;
|
|
188
|
+
r.style[N] = $, r.style.transitionTimingFunction = B, T && T(r);
|
|
188
189
|
});
|
|
189
|
-
return /* @__PURE__ */
|
|
190
|
+
return /* @__PURE__ */ s(W, {
|
|
190
191
|
in: m,
|
|
191
|
-
onEnter:
|
|
192
|
-
onEntered:
|
|
193
|
-
onEntering:
|
|
194
|
-
onExit:
|
|
195
|
-
onExited:
|
|
196
|
-
onExiting:
|
|
192
|
+
onEnter: pe,
|
|
193
|
+
onEntered: fe,
|
|
194
|
+
onEntering: ue,
|
|
195
|
+
onExit: me,
|
|
196
|
+
onExited: ge,
|
|
197
|
+
onExiting: be,
|
|
197
198
|
addEndListener: (r) => {
|
|
198
|
-
|
|
199
|
+
y === "auto" && X.start(O.current || 0, r), i && i(z.current, r);
|
|
199
200
|
},
|
|
200
|
-
nodeRef:
|
|
201
|
-
timeout:
|
|
201
|
+
nodeRef: z,
|
|
202
|
+
timeout: y === "auto" ? null : y,
|
|
202
203
|
...Q,
|
|
203
204
|
children: (r, {
|
|
204
|
-
ownerState:
|
|
205
|
-
...
|
|
206
|
-
}) => /* @__PURE__ */
|
|
205
|
+
ownerState: b,
|
|
206
|
+
...h
|
|
207
|
+
}) => /* @__PURE__ */ s($e, {
|
|
207
208
|
as: g,
|
|
208
|
-
className: U(
|
|
209
|
-
entered:
|
|
210
|
-
exited: !m &&
|
|
209
|
+
className: U(v.root, l, {
|
|
210
|
+
entered: v.entered,
|
|
211
|
+
exited: !m && $ === "0px" && v.hidden
|
|
211
212
|
}[r]),
|
|
212
213
|
style: {
|
|
213
|
-
[S ? "minWidth" : "minHeight"]:
|
|
214
|
-
...
|
|
214
|
+
[S ? "minWidth" : "minHeight"]: $,
|
|
215
|
+
...k
|
|
215
216
|
},
|
|
216
217
|
ref: Y,
|
|
217
218
|
ownerState: {
|
|
218
|
-
...
|
|
219
|
+
...M,
|
|
219
220
|
state: r
|
|
220
221
|
},
|
|
221
|
-
...
|
|
222
|
-
children: /* @__PURE__ */
|
|
222
|
+
...h,
|
|
223
|
+
children: /* @__PURE__ */ s(ze, {
|
|
223
224
|
ownerState: {
|
|
224
|
-
...
|
|
225
|
+
...M,
|
|
225
226
|
state: r
|
|
226
227
|
},
|
|
227
|
-
className:
|
|
228
|
-
ref:
|
|
229
|
-
children: /* @__PURE__ */
|
|
228
|
+
className: v.wrapper,
|
|
229
|
+
ref: w,
|
|
230
|
+
children: /* @__PURE__ */ s(je, {
|
|
230
231
|
ownerState: {
|
|
231
|
-
...
|
|
232
|
+
...M,
|
|
232
233
|
state: r
|
|
233
234
|
},
|
|
234
|
-
className:
|
|
235
|
-
children:
|
|
235
|
+
className: v.wrapperInner,
|
|
236
|
+
children: p
|
|
236
237
|
})
|
|
237
238
|
})
|
|
238
239
|
})
|
|
@@ -334,25 +335,25 @@ process.env.NODE_ENV !== "production" && (L.propTypes = {
|
|
|
334
335
|
})])
|
|
335
336
|
});
|
|
336
337
|
L && (L.muiSupportAuto = !0);
|
|
337
|
-
const ne = /* @__PURE__ */
|
|
338
|
+
const ne = /* @__PURE__ */ u.createContext({});
|
|
338
339
|
process.env.NODE_ENV !== "production" && (ne.displayName = "AccordionContext");
|
|
339
340
|
function Ve(o) {
|
|
340
|
-
return
|
|
341
|
+
return q("MuiAccordion", o);
|
|
341
342
|
}
|
|
342
|
-
const F =
|
|
343
|
+
const F = _("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled", "gutters", "region"]), We = (o) => {
|
|
343
344
|
const {
|
|
344
345
|
classes: t,
|
|
345
346
|
square: n,
|
|
346
|
-
expanded:
|
|
347
|
-
disabled:
|
|
348
|
-
disableGutters:
|
|
347
|
+
expanded: c,
|
|
348
|
+
disabled: i,
|
|
349
|
+
disableGutters: p
|
|
349
350
|
} = o;
|
|
350
351
|
return K({
|
|
351
|
-
root: ["root", !n && "rounded",
|
|
352
|
+
root: ["root", !n && "rounded", c && "expanded", i && "disabled", !p && "gutters"],
|
|
352
353
|
heading: ["heading"],
|
|
353
354
|
region: ["region"]
|
|
354
355
|
}, Ve, t);
|
|
355
|
-
},
|
|
356
|
+
}, Be = E(Se, {
|
|
356
357
|
name: "MuiAccordion",
|
|
357
358
|
slot: "Root",
|
|
358
359
|
overridesResolver: (o, t) => {
|
|
@@ -439,88 +440,88 @@ const F = q("MuiAccordion", ["root", "heading", "rounded", "expanded", "disabled
|
|
|
439
440
|
}
|
|
440
441
|
}
|
|
441
442
|
}]
|
|
442
|
-
}))),
|
|
443
|
+
}))), Ge = E("h3", {
|
|
443
444
|
name: "MuiAccordion",
|
|
444
445
|
slot: "Heading",
|
|
445
446
|
overridesResolver: (o, t) => t.heading
|
|
446
447
|
})({
|
|
447
448
|
all: "unset"
|
|
448
|
-
}), ee = /* @__PURE__ */
|
|
449
|
-
const
|
|
449
|
+
}), ee = /* @__PURE__ */ u.forwardRef(function(t, n) {
|
|
450
|
+
const c = J({
|
|
450
451
|
props: t,
|
|
451
452
|
name: "MuiAccordion"
|
|
452
453
|
}), {
|
|
453
|
-
children:
|
|
454
|
-
className:
|
|
455
|
-
defaultExpanded:
|
|
454
|
+
children: i,
|
|
455
|
+
className: p,
|
|
456
|
+
defaultExpanded: l = !1,
|
|
456
457
|
disabled: d = !1,
|
|
457
458
|
disableGutters: g = !1,
|
|
458
|
-
expanded:
|
|
459
|
+
expanded: C,
|
|
459
460
|
onChange: m,
|
|
460
|
-
square:
|
|
461
|
-
slots:
|
|
461
|
+
square: a = !1,
|
|
462
|
+
slots: x = {},
|
|
462
463
|
slotProps: A = {},
|
|
463
464
|
TransitionComponent: D,
|
|
464
|
-
TransitionProps:
|
|
465
|
-
...
|
|
466
|
-
} =
|
|
467
|
-
controlled:
|
|
468
|
-
default:
|
|
465
|
+
TransitionProps: R,
|
|
466
|
+
...T
|
|
467
|
+
} = c, [f, k] = Ne({
|
|
468
|
+
controlled: C,
|
|
469
|
+
default: l,
|
|
469
470
|
name: "Accordion",
|
|
470
471
|
state: "expanded"
|
|
471
|
-
}),
|
|
472
|
-
|
|
473
|
-
}, [f, m,
|
|
472
|
+
}), y = u.useCallback((Y) => {
|
|
473
|
+
k(!f), m && m(Y, !f);
|
|
474
|
+
}, [f, m, k]), [W, ...Q] = u.Children.toArray(i), M = u.useMemo(() => ({
|
|
474
475
|
expanded: f,
|
|
475
476
|
disabled: d,
|
|
476
477
|
disableGutters: g,
|
|
477
|
-
toggle:
|
|
478
|
-
}), [f, d, g,
|
|
479
|
-
...
|
|
480
|
-
square:
|
|
478
|
+
toggle: y
|
|
479
|
+
}), [f, d, g, y]), v = {
|
|
480
|
+
...c,
|
|
481
|
+
square: a,
|
|
481
482
|
disabled: d,
|
|
482
483
|
disableGutters: g,
|
|
483
484
|
expanded: f
|
|
484
|
-
},
|
|
485
|
+
}, P = We(v), X = {
|
|
485
486
|
transition: D,
|
|
486
|
-
...
|
|
487
|
-
},
|
|
488
|
-
transition:
|
|
487
|
+
...x
|
|
488
|
+
}, w = {
|
|
489
|
+
transition: R,
|
|
489
490
|
...A
|
|
490
|
-
},
|
|
491
|
+
}, O = {
|
|
491
492
|
slots: X,
|
|
492
|
-
slotProps:
|
|
493
|
-
}, [
|
|
494
|
-
elementType:
|
|
495
|
-
externalForwardedProps:
|
|
496
|
-
className:
|
|
497
|
-
ownerState:
|
|
498
|
-
}), [N,
|
|
493
|
+
slotProps: w
|
|
494
|
+
}, [$, S] = se("heading", {
|
|
495
|
+
elementType: Ge,
|
|
496
|
+
externalForwardedProps: O,
|
|
497
|
+
className: P.heading,
|
|
498
|
+
ownerState: v
|
|
499
|
+
}), [N, z] = se("transition", {
|
|
499
500
|
elementType: L,
|
|
500
|
-
externalForwardedProps:
|
|
501
|
-
ownerState:
|
|
501
|
+
externalForwardedProps: O,
|
|
502
|
+
ownerState: v
|
|
502
503
|
});
|
|
503
|
-
return /* @__PURE__ */ G(
|
|
504
|
-
className: U(
|
|
504
|
+
return /* @__PURE__ */ G(Be, {
|
|
505
|
+
className: U(P.root, p),
|
|
505
506
|
ref: n,
|
|
506
|
-
ownerState:
|
|
507
|
-
square:
|
|
508
|
-
...
|
|
509
|
-
children: [/* @__PURE__ */
|
|
507
|
+
ownerState: v,
|
|
508
|
+
square: a,
|
|
509
|
+
...T,
|
|
510
|
+
children: [/* @__PURE__ */ s($, {
|
|
510
511
|
...S,
|
|
511
|
-
children: /* @__PURE__ */
|
|
512
|
-
value:
|
|
513
|
-
children:
|
|
512
|
+
children: /* @__PURE__ */ s(ne.Provider, {
|
|
513
|
+
value: M,
|
|
514
|
+
children: W
|
|
514
515
|
})
|
|
515
|
-
}), /* @__PURE__ */
|
|
516
|
+
}), /* @__PURE__ */ s(N, {
|
|
516
517
|
in: f,
|
|
517
518
|
timeout: "auto",
|
|
518
|
-
...
|
|
519
|
-
children: /* @__PURE__ */
|
|
520
|
-
"aria-labelledby":
|
|
521
|
-
id:
|
|
519
|
+
...z,
|
|
520
|
+
children: /* @__PURE__ */ s("div", {
|
|
521
|
+
"aria-labelledby": W.props.id,
|
|
522
|
+
id: W.props["aria-controls"],
|
|
522
523
|
role: "region",
|
|
523
|
-
className:
|
|
524
|
+
className: P.region,
|
|
524
525
|
children: Q
|
|
525
526
|
})
|
|
526
527
|
})]
|
|
@@ -535,8 +536,8 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
|
535
536
|
* The content of the component.
|
|
536
537
|
*/
|
|
537
538
|
children: we(e.node.isRequired, (o) => {
|
|
538
|
-
const t =
|
|
539
|
-
return
|
|
539
|
+
const t = u.Children.toArray(o.children)[0];
|
|
540
|
+
return Re.isFragment(t) ? new Error("MUI: The Accordion doesn't accept a Fragment as a child. Consider providing an array instead.") : /* @__PURE__ */ u.isValidElement(t) ? null : new Error("MUI: Expected the first child of Accordion to be a valid element.");
|
|
540
541
|
}),
|
|
541
542
|
/**
|
|
542
543
|
* Override or extend the styles applied to the component.
|
|
@@ -611,18 +612,18 @@ process.env.NODE_ENV !== "production" && (ee.propTypes = {
|
|
|
611
612
|
*/
|
|
612
613
|
TransitionProps: e.object
|
|
613
614
|
});
|
|
614
|
-
function
|
|
615
|
-
return
|
|
615
|
+
function Ue(o) {
|
|
616
|
+
return q("MuiAccordionDetails", o);
|
|
616
617
|
}
|
|
617
|
-
|
|
618
|
-
const
|
|
618
|
+
_("MuiAccordionDetails", ["root"]);
|
|
619
|
+
const He = (o) => {
|
|
619
620
|
const {
|
|
620
621
|
classes: t
|
|
621
622
|
} = o;
|
|
622
623
|
return K({
|
|
623
624
|
root: ["root"]
|
|
624
|
-
},
|
|
625
|
-
},
|
|
625
|
+
}, Ue, t);
|
|
626
|
+
}, Fe = E("div", {
|
|
626
627
|
name: "MuiAccordionDetails",
|
|
627
628
|
slot: "Root",
|
|
628
629
|
overridesResolver: (o, t) => t.root
|
|
@@ -630,19 +631,19 @@ const Ue = (o) => {
|
|
|
630
631
|
theme: o
|
|
631
632
|
}) => ({
|
|
632
633
|
padding: o.spacing(1, 2, 2)
|
|
633
|
-
}))), oe = /* @__PURE__ */
|
|
634
|
-
const
|
|
634
|
+
}))), oe = /* @__PURE__ */ u.forwardRef(function(t, n) {
|
|
635
|
+
const c = J({
|
|
635
636
|
props: t,
|
|
636
637
|
name: "MuiAccordionDetails"
|
|
637
638
|
}), {
|
|
638
|
-
className:
|
|
639
|
-
...
|
|
640
|
-
} =
|
|
641
|
-
return /* @__PURE__ */
|
|
642
|
-
className: U(d.root,
|
|
639
|
+
className: i,
|
|
640
|
+
...p
|
|
641
|
+
} = c, l = c, d = He(l);
|
|
642
|
+
return /* @__PURE__ */ s(Fe, {
|
|
643
|
+
className: U(d.root, i),
|
|
643
644
|
ref: n,
|
|
644
|
-
ownerState:
|
|
645
|
-
...
|
|
645
|
+
ownerState: l,
|
|
646
|
+
...p
|
|
646
647
|
});
|
|
647
648
|
});
|
|
648
649
|
process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
@@ -667,23 +668,23 @@ process.env.NODE_ENV !== "production" && (oe.propTypes = {
|
|
|
667
668
|
*/
|
|
668
669
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
669
670
|
});
|
|
670
|
-
function
|
|
671
|
-
return
|
|
671
|
+
function Le(o) {
|
|
672
|
+
return q("MuiAccordionSummary", o);
|
|
672
673
|
}
|
|
673
|
-
const
|
|
674
|
+
const V = _("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disabled", "gutters", "contentGutters", "content", "expandIconWrapper"]), qe = (o) => {
|
|
674
675
|
const {
|
|
675
676
|
classes: t,
|
|
676
677
|
expanded: n,
|
|
677
|
-
disabled:
|
|
678
|
-
disableGutters:
|
|
678
|
+
disabled: c,
|
|
679
|
+
disableGutters: i
|
|
679
680
|
} = o;
|
|
680
681
|
return K({
|
|
681
|
-
root: ["root", n && "expanded",
|
|
682
|
+
root: ["root", n && "expanded", c && "disabled", !i && "gutters"],
|
|
682
683
|
focusVisible: ["focusVisible"],
|
|
683
|
-
content: ["content", n && "expanded", !
|
|
684
|
+
content: ["content", n && "expanded", !i && "contentGutters"],
|
|
684
685
|
expandIconWrapper: ["expandIconWrapper", n && "expanded"]
|
|
685
|
-
},
|
|
686
|
-
},
|
|
686
|
+
}, Le, t);
|
|
687
|
+
}, _e = E(Ee, {
|
|
687
688
|
name: "MuiAccordionSummary",
|
|
688
689
|
slot: "Root",
|
|
689
690
|
overridesResolver: (o, t) => t.root
|
|
@@ -699,25 +700,25 @@ const W = q("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
|
|
|
699
700
|
minHeight: 48,
|
|
700
701
|
padding: o.spacing(0, 2),
|
|
701
702
|
transition: o.transitions.create(["min-height", "background-color"], t),
|
|
702
|
-
[`&.${
|
|
703
|
+
[`&.${V.focusVisible}`]: {
|
|
703
704
|
backgroundColor: (o.vars || o).palette.action.focus
|
|
704
705
|
},
|
|
705
|
-
[`&.${
|
|
706
|
+
[`&.${V.disabled}`]: {
|
|
706
707
|
opacity: (o.vars || o).palette.action.disabledOpacity
|
|
707
708
|
},
|
|
708
|
-
[`&:hover:not(.${
|
|
709
|
+
[`&:hover:not(.${V.disabled})`]: {
|
|
709
710
|
cursor: "pointer"
|
|
710
711
|
},
|
|
711
712
|
variants: [{
|
|
712
713
|
props: (n) => !n.disableGutters,
|
|
713
714
|
style: {
|
|
714
|
-
[`&.${
|
|
715
|
+
[`&.${V.expanded}`]: {
|
|
715
716
|
minHeight: 64
|
|
716
717
|
}
|
|
717
718
|
}
|
|
718
719
|
}]
|
|
719
720
|
};
|
|
720
|
-
})),
|
|
721
|
+
})), Je = E("span", {
|
|
721
722
|
name: "MuiAccordionSummary",
|
|
722
723
|
slot: "Content",
|
|
723
724
|
overridesResolver: (o, t) => t.content
|
|
@@ -734,12 +735,12 @@ const W = q("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
|
|
|
734
735
|
transition: o.transitions.create(["margin"], {
|
|
735
736
|
duration: o.transitions.duration.shortest
|
|
736
737
|
}),
|
|
737
|
-
[`&.${
|
|
738
|
+
[`&.${V.expanded}`]: {
|
|
738
739
|
margin: "20px 0"
|
|
739
740
|
}
|
|
740
741
|
}
|
|
741
742
|
}]
|
|
742
|
-
}))),
|
|
743
|
+
}))), Ke = E("span", {
|
|
743
744
|
name: "MuiAccordionSummary",
|
|
744
745
|
slot: "ExpandIconWrapper",
|
|
745
746
|
overridesResolver: (o, t) => t.expandIconWrapper
|
|
@@ -752,52 +753,52 @@ const W = q("MuiAccordionSummary", ["root", "expanded", "focusVisible", "disable
|
|
|
752
753
|
transition: o.transitions.create("transform", {
|
|
753
754
|
duration: o.transitions.duration.shortest
|
|
754
755
|
}),
|
|
755
|
-
[`&.${
|
|
756
|
+
[`&.${V.expanded}`]: {
|
|
756
757
|
transform: "rotate(180deg)"
|
|
757
758
|
}
|
|
758
|
-
}))), te = /* @__PURE__ */
|
|
759
|
-
const
|
|
759
|
+
}))), te = /* @__PURE__ */ u.forwardRef(function(t, n) {
|
|
760
|
+
const c = J({
|
|
760
761
|
props: t,
|
|
761
762
|
name: "MuiAccordionSummary"
|
|
762
763
|
}), {
|
|
763
|
-
children:
|
|
764
|
-
className:
|
|
765
|
-
expandIcon:
|
|
764
|
+
children: i,
|
|
765
|
+
className: p,
|
|
766
|
+
expandIcon: l,
|
|
766
767
|
focusVisibleClassName: d,
|
|
767
768
|
onClick: g,
|
|
768
|
-
...
|
|
769
|
-
} =
|
|
769
|
+
...C
|
|
770
|
+
} = c, {
|
|
770
771
|
disabled: m = !1,
|
|
771
|
-
disableGutters:
|
|
772
|
-
expanded:
|
|
772
|
+
disableGutters: a,
|
|
773
|
+
expanded: x,
|
|
773
774
|
toggle: A
|
|
774
|
-
} =
|
|
775
|
+
} = u.useContext(ne), D = (f) => {
|
|
775
776
|
A && A(f), g && g(f);
|
|
776
|
-
},
|
|
777
|
-
...
|
|
778
|
-
expanded:
|
|
777
|
+
}, R = {
|
|
778
|
+
...c,
|
|
779
|
+
expanded: x,
|
|
779
780
|
disabled: m,
|
|
780
|
-
disableGutters:
|
|
781
|
-
},
|
|
782
|
-
return /* @__PURE__ */ G(
|
|
781
|
+
disableGutters: a
|
|
782
|
+
}, T = qe(R);
|
|
783
|
+
return /* @__PURE__ */ G(_e, {
|
|
783
784
|
focusRipple: !1,
|
|
784
785
|
disableRipple: !0,
|
|
785
786
|
disabled: m,
|
|
786
|
-
"aria-expanded":
|
|
787
|
-
className: U(
|
|
788
|
-
focusVisibleClassName: U(
|
|
787
|
+
"aria-expanded": x,
|
|
788
|
+
className: U(T.root, p),
|
|
789
|
+
focusVisibleClassName: U(T.focusVisible, d),
|
|
789
790
|
onClick: D,
|
|
790
791
|
ref: n,
|
|
791
|
-
ownerState:
|
|
792
|
-
...
|
|
793
|
-
children: [/* @__PURE__ */
|
|
794
|
-
className:
|
|
795
|
-
ownerState:
|
|
796
|
-
children:
|
|
797
|
-
}),
|
|
798
|
-
className:
|
|
799
|
-
ownerState:
|
|
800
|
-
children:
|
|
792
|
+
ownerState: R,
|
|
793
|
+
...C,
|
|
794
|
+
children: [/* @__PURE__ */ s(Je, {
|
|
795
|
+
className: T.content,
|
|
796
|
+
ownerState: R,
|
|
797
|
+
children: i
|
|
798
|
+
}), l && /* @__PURE__ */ s(Ke, {
|
|
799
|
+
className: T.expandIconWrapper,
|
|
800
|
+
ownerState: R,
|
|
801
|
+
children: l
|
|
801
802
|
})]
|
|
802
803
|
});
|
|
803
804
|
});
|
|
@@ -840,94 +841,144 @@ process.env.NODE_ENV !== "production" && (te.propTypes = {
|
|
|
840
841
|
*/
|
|
841
842
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
842
843
|
});
|
|
843
|
-
const de =
|
|
844
|
+
const de = ke(/* @__PURE__ */ s("path", {
|
|
844
845
|
d: "M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"
|
|
845
846
|
}), "ExpandMore");
|
|
846
|
-
function
|
|
847
|
-
const o = ye(
|
|
847
|
+
function mo() {
|
|
848
|
+
const o = xe(ye), t = le(), n = ve(t);
|
|
848
849
|
if (!o || !o.preferences)
|
|
849
850
|
return null;
|
|
850
|
-
const
|
|
851
|
-
var
|
|
852
|
-
const
|
|
853
|
-
(a) => a.notificationId ===
|
|
854
|
-
),
|
|
855
|
-
(a) => a.notificationId ===
|
|
856
|
-
),
|
|
857
|
-
(a) =>
|
|
858
|
-
(
|
|
851
|
+
const c = o.preferences.notifications.sort((i, p) => i.title.localeCompare(p.title)).map((i) => {
|
|
852
|
+
var g, C, m;
|
|
853
|
+
const p = (g = o.preferences) == null ? void 0 : g.preferences.filter(
|
|
854
|
+
(a) => a.notificationId === i.notificationId && !a.subNotificationId
|
|
855
|
+
), l = (C = o.preferences) == null ? void 0 : C.preferences.filter(
|
|
856
|
+
(a) => a.notificationId === i.notificationId && a.subNotificationId
|
|
857
|
+
), d = (m = o.preferences) == null ? void 0 : m.subNotifications.filter(
|
|
858
|
+
(a) => l == null ? void 0 : l.find(
|
|
859
|
+
(x) => x.subNotificationId === a.subNotificationId && x.notificationId === a.notificationId
|
|
859
860
|
)
|
|
860
861
|
);
|
|
861
862
|
return /* @__PURE__ */ G(
|
|
862
863
|
ee,
|
|
863
864
|
{
|
|
864
|
-
|
|
865
|
+
sx: {
|
|
865
866
|
marginBottom: 0,
|
|
866
|
-
marginTop: 0
|
|
867
|
+
marginTop: 0,
|
|
868
|
+
backgroundColor: n.paper,
|
|
869
|
+
color: n.text,
|
|
870
|
+
"&:before": {
|
|
871
|
+
backgroundColor: n.divider
|
|
872
|
+
}
|
|
867
873
|
},
|
|
868
874
|
children: [
|
|
869
|
-
/* @__PURE__ */
|
|
875
|
+
/* @__PURE__ */ s(
|
|
870
876
|
te,
|
|
871
877
|
{
|
|
872
|
-
expandIcon: /* @__PURE__ */
|
|
873
|
-
|
|
874
|
-
backgroundColor: "
|
|
878
|
+
expandIcon: /* @__PURE__ */ s(de, { sx: { color: n.text } }),
|
|
879
|
+
sx: {
|
|
880
|
+
backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.05)" : "rgba(0, 0, 0, 0.02)",
|
|
875
881
|
flexDirection: "row-reverse",
|
|
876
|
-
gap: 16
|
|
882
|
+
gap: 16,
|
|
883
|
+
"&:hover": {
|
|
884
|
+
backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.08)" : "rgba(0, 0, 0, 0.04)"
|
|
885
|
+
}
|
|
877
886
|
},
|
|
878
|
-
children: /* @__PURE__ */
|
|
887
|
+
children: /* @__PURE__ */ s(ce, { variant: "body1", sx: { color: n.text }, children: i.title })
|
|
879
888
|
}
|
|
880
889
|
),
|
|
881
|
-
/* @__PURE__ */
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
{
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
},
|
|
906
|
-
children: /* @__PURE__ */ i(ce, { variant: "body1", children: a.title })
|
|
907
|
-
}
|
|
908
|
-
),
|
|
909
|
-
/* @__PURE__ */ i(oe, { children: /* @__PURE__ */ i(
|
|
910
|
-
ie,
|
|
911
|
-
{
|
|
912
|
-
notification: n,
|
|
913
|
-
preferences: c || [],
|
|
914
|
-
updateDelivery: o.updateDelivery,
|
|
915
|
-
subNotificationId: a.subNotificationId
|
|
890
|
+
/* @__PURE__ */ s(
|
|
891
|
+
oe,
|
|
892
|
+
{
|
|
893
|
+
sx: { backgroundColor: n.paper, color: n.text },
|
|
894
|
+
children: /* @__PURE__ */ G(he, { children: [
|
|
895
|
+
/* @__PURE__ */ s(
|
|
896
|
+
ie,
|
|
897
|
+
{
|
|
898
|
+
notification: i,
|
|
899
|
+
preferences: p || [],
|
|
900
|
+
updateDelivery: o.updateDelivery
|
|
901
|
+
},
|
|
902
|
+
i.notificationId
|
|
903
|
+
),
|
|
904
|
+
d == null ? void 0 : d.map((a) => /* @__PURE__ */ G(
|
|
905
|
+
ee,
|
|
906
|
+
{
|
|
907
|
+
sx: {
|
|
908
|
+
marginTop: 12,
|
|
909
|
+
backgroundColor: n.paper,
|
|
910
|
+
color: n.text,
|
|
911
|
+
"&:before": {
|
|
912
|
+
backgroundColor: n.divider
|
|
913
|
+
}
|
|
916
914
|
},
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
915
|
+
children: [
|
|
916
|
+
/* @__PURE__ */ s(
|
|
917
|
+
te,
|
|
918
|
+
{
|
|
919
|
+
expandIcon: /* @__PURE__ */ s(de, { sx: { color: n.text } }),
|
|
920
|
+
sx: {
|
|
921
|
+
flexDirection: "row-reverse",
|
|
922
|
+
gap: 16,
|
|
923
|
+
backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.03)" : "rgba(0, 0, 0, 0.01)",
|
|
924
|
+
"&:hover": {
|
|
925
|
+
backgroundColor: t.palette.mode === "dark" ? "rgba(255, 255, 255, 0.06)" : "rgba(0, 0, 0, 0.02)"
|
|
926
|
+
}
|
|
927
|
+
},
|
|
928
|
+
children: /* @__PURE__ */ s(
|
|
929
|
+
ce,
|
|
930
|
+
{
|
|
931
|
+
variant: "body1",
|
|
932
|
+
sx: { color: n.text },
|
|
933
|
+
children: a.title
|
|
934
|
+
}
|
|
935
|
+
)
|
|
936
|
+
}
|
|
937
|
+
),
|
|
938
|
+
/* @__PURE__ */ s(
|
|
939
|
+
oe,
|
|
940
|
+
{
|
|
941
|
+
sx: {
|
|
942
|
+
backgroundColor: n.paper,
|
|
943
|
+
color: n.text
|
|
944
|
+
},
|
|
945
|
+
children: /* @__PURE__ */ s(
|
|
946
|
+
ie,
|
|
947
|
+
{
|
|
948
|
+
notification: i,
|
|
949
|
+
preferences: l || [],
|
|
950
|
+
updateDelivery: o.updateDelivery,
|
|
951
|
+
subNotificationId: a.subNotificationId
|
|
952
|
+
},
|
|
953
|
+
a.subNotificationId
|
|
954
|
+
)
|
|
955
|
+
}
|
|
956
|
+
)
|
|
957
|
+
]
|
|
958
|
+
},
|
|
959
|
+
`${a.notificationId}-${a.subNotificationId}`
|
|
960
|
+
))
|
|
961
|
+
] })
|
|
962
|
+
}
|
|
963
|
+
)
|
|
924
964
|
]
|
|
925
965
|
},
|
|
926
|
-
|
|
966
|
+
i.notificationId
|
|
927
967
|
);
|
|
928
968
|
});
|
|
929
|
-
return /* @__PURE__ */
|
|
969
|
+
return /* @__PURE__ */ s(
|
|
970
|
+
Me,
|
|
971
|
+
{
|
|
972
|
+
sx: {
|
|
973
|
+
borderRadius: 2,
|
|
974
|
+
overflow: "hidden",
|
|
975
|
+
backgroundColor: n.paper,
|
|
976
|
+
color: n.text
|
|
977
|
+
},
|
|
978
|
+
children: c
|
|
979
|
+
}
|
|
980
|
+
);
|
|
930
981
|
}
|
|
931
982
|
export {
|
|
932
|
-
|
|
983
|
+
mo as Preferences
|
|
933
984
|
};
|