@bytebrand/fe-ui-core 4.1.44 → 4.1.46
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/package.json
CHANGED
|
@@ -4,6 +4,10 @@ import Button from '../../../Button/Button';
|
|
|
4
4
|
import styles from './PreviewCookieModal.styl';
|
|
5
5
|
|
|
6
6
|
const PreviewCookieModal = ({ toggleModal, modalCookieChange, setModal }) => {
|
|
7
|
+
const onAcceptAll = () => {
|
|
8
|
+
localStorage.set('cookieConfig', {});
|
|
9
|
+
toggleModal();
|
|
10
|
+
}
|
|
7
11
|
return (
|
|
8
12
|
<div className={styles.modalWrapper}>
|
|
9
13
|
<IconSVG name='autodeLogo' customDimensions />
|
|
@@ -11,7 +15,7 @@ const PreviewCookieModal = ({ toggleModal, modalCookieChange, setModal }) => {
|
|
|
11
15
|
<div className={styles.modalContent}>Für ein bestmögliches Nutzererlebnis setzen wir Cookies und andere Technologien ein. Diese können Sie hier verwalten.</div>
|
|
12
16
|
<div className={styles.buttonsContainer}>
|
|
13
17
|
<Button onClick={() => setModal('MANAGE_COOKIE_MODAL')} className={styles.modalBtn} variant='outlined'>Cookie-Einstellungen</Button>
|
|
14
|
-
<Button onClick={
|
|
18
|
+
<Button onClick={onAcceptAll} className={styles.modalBtn}>zustimmen</Button>
|
|
15
19
|
</div>
|
|
16
20
|
</div>
|
|
17
21
|
);
|
|
@@ -3,8 +3,6 @@ import MaterialSelect from '../MaterialSelect/MaterialSelect';
|
|
|
3
3
|
import styles from './TimePicker.styl';
|
|
4
4
|
|
|
5
5
|
interface ITimePickerProps {
|
|
6
|
-
onHandleTimeChange: (value: number) => void;
|
|
7
|
-
onHandleDayChange: (value: number) => void;
|
|
8
6
|
onHandleTimestampChange: (value: string) => void;
|
|
9
7
|
className: string;
|
|
10
8
|
lang: string;
|
|
@@ -15,18 +13,22 @@ interface ITimePickerProps {
|
|
|
15
13
|
}
|
|
16
14
|
|
|
17
15
|
const TimePicker = ({
|
|
18
|
-
onHandleTimeChange,
|
|
19
|
-
onHandleDayChange,
|
|
20
16
|
onHandleTimestampChange,
|
|
21
17
|
className,
|
|
22
18
|
lang,
|
|
23
|
-
time,
|
|
24
|
-
day,
|
|
25
19
|
t,
|
|
26
20
|
size = 'custom'
|
|
27
21
|
}: ITimePickerProps) => {
|
|
28
22
|
const date = new Date();
|
|
29
23
|
const [currentDay, setCurrentDay] = useState(date.getDay());
|
|
24
|
+
const [day, setDay] = useState(0);
|
|
25
|
+
const [time, setTime] = useState(0);
|
|
26
|
+
const onHandleDayChange = (value: number) => {
|
|
27
|
+
setDay(value);
|
|
28
|
+
};
|
|
29
|
+
const onHandleTimeChange = (value: number) => {
|
|
30
|
+
setTime(value)
|
|
31
|
+
}
|
|
30
32
|
const format = {
|
|
31
33
|
hour: 'numeric',
|
|
32
34
|
minute: 'numeric'
|
|
@@ -37,10 +39,11 @@ const TimePicker = ({
|
|
|
37
39
|
const setNewDay = new Date(`${date.toDateString()} ${endOfTheDayTime}`) > date ? 0 : 86400000;
|
|
38
40
|
const interval = 30 * 60 * 1000;
|
|
39
41
|
const roundedTime = new Date(Math.ceil(date / interval) * interval);
|
|
40
|
-
const nextWeekDays = [...Array(7).keys()].map(days => (
|
|
42
|
+
const nextWeekDays = [...Array(7).keys()].map((days, index) => (
|
|
41
43
|
{
|
|
42
|
-
value:
|
|
43
|
-
label: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' })
|
|
44
|
+
value: index,
|
|
45
|
+
label: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' }),
|
|
46
|
+
day: new Date(Date.now() + setNewDay + 86400000 * days).toLocaleString(lang, { weekday: 'short', day: 'numeric', month: '2-digit' })
|
|
44
47
|
}
|
|
45
48
|
));
|
|
46
49
|
const nextWeekDaysFull = [...Array(7).keys()].map(days => new Date(Date.now() + setNewDay + 86400000 * days));
|