@redneckz/wildless-cms-uni-blocks 0.14.136 → 0.14.138
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/bundle/bundle.umd.js +23 -16
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Footer/cookieReplaceData.d.ts +1 -0
- package/bundle/utils/mapCookie.d.ts +1 -0
- package/dist/components/Footer/Footer.js +8 -2
- package/dist/components/Footer/Footer.js.map +1 -1
- package/dist/components/Footer/Footer.mobile.js +8 -2
- package/dist/components/Footer/Footer.mobile.js.map +1 -1
- package/dist/components/Footer/cookieReplaceData.d.ts +1 -0
- package/dist/components/Footer/cookieReplaceData.js +4 -0
- package/dist/components/Footer/cookieReplaceData.js.map +1 -0
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +8 -5
- package/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/dist/ui-kit/YandexMap/YandexMap.js +3 -4
- package/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/dist/utils/isUUID.js +1 -1
- package/dist/utils/isUUID.js.map +1 -1
- package/dist/utils/mapCookie.d.ts +1 -0
- package/dist/utils/mapCookie.js +11 -0
- package/dist/utils/mapCookie.js.map +1 -0
- package/lib/components/Footer/Footer.js +8 -2
- package/lib/components/Footer/Footer.js.map +1 -1
- package/lib/components/Footer/Footer.mobile.js +8 -2
- package/lib/components/Footer/Footer.mobile.js.map +1 -1
- package/lib/components/Footer/cookieReplaceData.d.ts +1 -0
- package/lib/components/Footer/cookieReplaceData.js +2 -0
- package/lib/components/Footer/cookieReplaceData.js.map +1 -0
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +8 -5
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/lib/ui-kit/YandexMap/YandexMap.js +3 -4
- package/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/lib/utils/isUUID.js +1 -1
- package/lib/utils/isUUID.js.map +1 -1
- package/lib/utils/mapCookie.d.ts +1 -0
- package/lib/utils/mapCookie.js +8 -0
- package/lib/utils/mapCookie.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +23 -16
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/Footer/cookieReplaceData.d.ts +1 -0
- package/mobile/bundle/utils/mapCookie.d.ts +1 -0
- package/mobile/dist/components/Footer/Footer.js +8 -2
- package/mobile/dist/components/Footer/Footer.js.map +1 -1
- package/mobile/dist/components/Footer/cookieReplaceData.d.ts +1 -0
- package/mobile/dist/components/Footer/cookieReplaceData.js +4 -0
- package/mobile/dist/components/Footer/cookieReplaceData.js.map +1 -0
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +8 -5
- package/mobile/dist/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js +3 -4
- package/mobile/dist/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/dist/utils/isUUID.js +1 -1
- package/mobile/dist/utils/isUUID.js.map +1 -1
- package/mobile/dist/utils/mapCookie.d.ts +1 -0
- package/mobile/dist/utils/mapCookie.js +11 -0
- package/mobile/dist/utils/mapCookie.js.map +1 -0
- package/mobile/lib/components/Footer/Footer.js +8 -2
- package/mobile/lib/components/Footer/Footer.js.map +1 -1
- package/mobile/lib/components/Footer/cookieReplaceData.d.ts +1 -0
- package/mobile/lib/components/Footer/cookieReplaceData.js +2 -0
- package/mobile/lib/components/Footer/cookieReplaceData.js.map +1 -0
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js +8 -5
- package/mobile/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.js.map +1 -1
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js +3 -4
- package/mobile/lib/ui-kit/YandexMap/YandexMap.js.map +1 -1
- package/mobile/lib/utils/isUUID.js +1 -1
- package/mobile/lib/utils/isUUID.js.map +1 -1
- package/mobile/lib/utils/mapCookie.d.ts +1 -0
- package/mobile/lib/utils/mapCookie.js +8 -0
- package/mobile/lib/utils/mapCookie.js.map +1 -0
- package/mobile/src/components/Footer/Footer.tsx +9 -2
- package/mobile/src/components/Footer/cookieReplaceData.ts +1 -0
- package/mobile/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +8 -5
- package/mobile/src/components/VerticalLayout/VerticalLayout.example.json +10 -0
- package/mobile/src/ui-kit/YandexMap/YandexMap.tsx +3 -7
- package/mobile/src/utils/isUUID.ts +3 -1
- package/mobile/src/utils/mapCookie.ts +11 -0
- package/package.json +5 -2
- package/src/components/Footer/Footer.mobile.tsx +9 -2
- package/src/components/Footer/Footer.tsx +9 -2
- package/src/components/Footer/cookieReplaceData.ts +1 -0
- package/src/components/OfficesAtmsMap/OfficesAtmsMapLayout.tsx +8 -5
- package/src/components/VerticalLayout/VerticalLayout.example.json +10 -0
- package/src/ui-kit/YandexMap/YandexMap.tsx +3 -7
- package/src/utils/isUUID.ts +3 -1
- package/src/utils/mapCookie.ts +11 -0
- package/bundle/utils/deleteAllCookie.d.ts +0 -1
- package/dist/utils/deleteAllCookie.d.ts +0 -1
- package/dist/utils/deleteAllCookie.js +0 -11
- package/dist/utils/deleteAllCookie.js.map +0 -1
- package/lib/utils/deleteAllCookie.d.ts +0 -1
- package/lib/utils/deleteAllCookie.js +0 -8
- package/lib/utils/deleteAllCookie.js.map +0 -1
- package/mobile/bundle/utils/deleteAllCookie.d.ts +0 -1
- package/mobile/dist/utils/deleteAllCookie.d.ts +0 -1
- package/mobile/dist/utils/deleteAllCookie.js +0 -11
- package/mobile/dist/utils/deleteAllCookie.js.map +0 -1
- package/mobile/lib/utils/deleteAllCookie.d.ts +0 -1
- package/mobile/lib/utils/deleteAllCookie.js +0 -8
- package/mobile/lib/utils/deleteAllCookie.js.map +0 -1
- package/mobile/src/utils/deleteAllCookie.ts +0 -8
- package/src/utils/deleteAllCookie.ts +0 -8
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
3
4
|
import { type LinkProps } from '../../model/LinkProps';
|
|
4
5
|
import { projectSettings } from '../../ProjectSettings';
|
|
@@ -7,9 +8,10 @@ import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
|
7
8
|
import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
8
9
|
import { Text } from '../../ui-kit/Text/Text';
|
|
9
10
|
import { appendSlash } from '../../utils/appendSlash';
|
|
10
|
-
import {
|
|
11
|
+
import { mapCookie } from '../../utils/mapCookie';
|
|
11
12
|
import { RollupItem } from '../RollupItem/RollupItem';
|
|
12
13
|
import { Contacts } from './Contacts';
|
|
14
|
+
import { COOKIE_REPLACE } from './cookieReplaceData';
|
|
13
15
|
import { findIconByHref } from './findIconByHref';
|
|
14
16
|
import { type FooterDataProps } from './FooterDataProps';
|
|
15
17
|
import { type FooterProps } from './FooterProps';
|
|
@@ -31,6 +33,11 @@ export const Footer = JSX<FooterProps>(({ className, ...rest }) => {
|
|
|
31
33
|
documents,
|
|
32
34
|
} = useSWRResource<FooterDataProps>(projectSettings.FOOTER || 'footer', { fallback });
|
|
33
35
|
|
|
36
|
+
const handleOnClick = useCallback(() => {
|
|
37
|
+
const [name, oldValue, newValue] = COOKIE_REPLACE;
|
|
38
|
+
mapCookie(name, (value) => value?.replace(oldValue, newValue));
|
|
39
|
+
}, []);
|
|
40
|
+
|
|
34
41
|
return (
|
|
35
42
|
<BlockWrapper tag="footer" className={className} defaultPadding="p-4xl pb-24" {...rest}>
|
|
36
43
|
<div className="mb-lg pb-xs border-b border-main-divider">
|
|
@@ -62,7 +69,7 @@ export const Footer = JSX<FooterProps>(({ className, ...rest }) => {
|
|
|
62
69
|
text="Вернуться на прежнюю версию сайта"
|
|
63
70
|
className="text-l font-light max-w-[292px]"
|
|
64
71
|
href="https://old.rshb.ru"
|
|
65
|
-
onClick={
|
|
72
|
+
onClick={handleOnClick}
|
|
66
73
|
/>
|
|
67
74
|
</div>
|
|
68
75
|
<HorizontalNavigation
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useCallback } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { useSWRResource } from '../../hooks/useSWRResource';
|
|
3
4
|
import { projectSettings } from '../../ProjectSettings';
|
|
4
5
|
import { useSitemap } from '../../services/sitemap/useSitemap';
|
|
@@ -7,9 +8,10 @@ import { LinkButton } from '../../ui-kit/LinkButton/LinkButton';
|
|
|
7
8
|
import { Logo } from '../../ui-kit/Logo/Logo';
|
|
8
9
|
import { SearchBar } from '../../ui-kit/SearchBar/SearchBar';
|
|
9
10
|
import { Sitemap } from '../../ui-kit/Sitemap/Sitemap';
|
|
10
|
-
import {
|
|
11
|
+
import { mapCookie } from '../../utils/mapCookie';
|
|
11
12
|
import { style } from '../../utils/style';
|
|
12
13
|
import { Contacts } from './Contacts';
|
|
14
|
+
import { COOKIE_REPLACE } from './cookieReplaceData';
|
|
13
15
|
import { type FooterDataProps } from './FooterDataProps';
|
|
14
16
|
import { type FooterProps } from './FooterProps';
|
|
15
17
|
import { HorizontalNavigation } from './HorizontalNavigation';
|
|
@@ -25,6 +27,11 @@ export const Footer = JSX<FooterProps>(({ className, ...rest }) => {
|
|
|
25
27
|
fallback: rest.options?.page?.fallback,
|
|
26
28
|
});
|
|
27
29
|
|
|
30
|
+
const handleOnClick = useCallback(() => {
|
|
31
|
+
const [name, oldValue, newValue] = COOKIE_REPLACE;
|
|
32
|
+
mapCookie(name, (value) => value?.replace(oldValue, newValue));
|
|
33
|
+
}, []);
|
|
34
|
+
|
|
28
35
|
return (
|
|
29
36
|
<BlockWrapper tag="footer" className={className} {...rest}>
|
|
30
37
|
<div className="flex items-stretch gap-3xl pb-3xl ">
|
|
@@ -42,7 +49,7 @@ export const Footer = JSX<FooterProps>(({ className, ...rest }) => {
|
|
|
42
49
|
version="link"
|
|
43
50
|
href="https://old.rshb.ru"
|
|
44
51
|
className="!text-left text-s font-light"
|
|
45
|
-
onClick={
|
|
52
|
+
onClick={handleOnClick}
|
|
46
53
|
>
|
|
47
54
|
Вернуться на прежнюю версию сайта
|
|
48
55
|
</LinkButton>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const COOKIE_REPLACE = ['split_version', 'New', 'Old'];
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
+
import { useMemo } from '@redneckz/uni-jsx/lib/hooks';
|
|
2
3
|
import { useForm } from '../../hooks/useForm';
|
|
3
4
|
import { type VNode } from '../../model/VNode';
|
|
4
5
|
import { ClientOnly } from '../../ui-kit/ClientOnly';
|
|
@@ -39,13 +40,15 @@ export const OfficesAtmsMapLayout = JSX<OfficesAtmsMapLayoutProps<Branch | Atm>>
|
|
|
39
40
|
}) => {
|
|
40
41
|
const [filtrationState, { field, reset }] = useForm(initFilterState);
|
|
41
42
|
|
|
42
|
-
const filteredItems =
|
|
43
|
+
const [filteredItems, points, lengthItems] = useMemo(() => {
|
|
44
|
+
const _filteredItems = filterItems(data, filtrationState);
|
|
43
45
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
46
|
+
const _points = _filteredItems
|
|
47
|
+
.map((_) => [_.gpsLatitude, _.gpsLongitude].filter(Boolean) as number[])
|
|
48
|
+
.filter((_) => _ && _.length === 2);
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
return [_filteredItems, _points, _filteredItems.length];
|
|
51
|
+
}, [data, filtrationState]);
|
|
49
52
|
|
|
50
53
|
return (
|
|
51
54
|
<div className={style('space-y-1', className)}>
|
|
@@ -9,6 +9,16 @@
|
|
|
9
9
|
"style": ["col-span-12"],
|
|
10
10
|
"type": "VerticalLayout",
|
|
11
11
|
"blocks": [
|
|
12
|
+
{
|
|
13
|
+
"content": {
|
|
14
|
+
"title": "Заголовок",
|
|
15
|
+
"description": "Описание",
|
|
16
|
+
"align": "text-center",
|
|
17
|
+
"headlineVersion": "M"
|
|
18
|
+
},
|
|
19
|
+
"style": ["col-span-12"],
|
|
20
|
+
"type": "Headline"
|
|
21
|
+
},
|
|
12
22
|
{
|
|
13
23
|
"content": {
|
|
14
24
|
"isBlur": false,
|
|
@@ -40,8 +40,6 @@ export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5
|
|
|
40
40
|
|
|
41
41
|
const [isFullScreen, setIsFullScreen] = useState();
|
|
42
42
|
|
|
43
|
-
const pointsCenter = points ? getCenterPoint(points) : DEFAULT_CENTER_COORDS;
|
|
44
|
-
|
|
45
43
|
useEffect(() => {
|
|
46
44
|
if (!map?.current) {
|
|
47
45
|
yandexMaps?.ready(() => {
|
|
@@ -51,7 +49,7 @@ export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5
|
|
|
51
49
|
}
|
|
52
50
|
|
|
53
51
|
map.current = new yandexMaps.Map('map', {
|
|
54
|
-
center:
|
|
52
|
+
center: points ? getCenterPoint(points) : DEFAULT_CENTER_COORDS,
|
|
55
53
|
zoom,
|
|
56
54
|
controls: [],
|
|
57
55
|
suppressMapOpenBlock: true,
|
|
@@ -59,16 +57,14 @@ export const YandexMap = JSX<YandexMapProps>(({ points, className = '', zoom = 5
|
|
|
59
57
|
|
|
60
58
|
renderClusterer(yandexMaps, map.current, points);
|
|
61
59
|
});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
if (map.current && yandexMaps) {
|
|
60
|
+
} else if (yandexMaps) {
|
|
65
61
|
renderClusterer(yandexMaps, map.current, points);
|
|
66
62
|
|
|
67
63
|
if (!points?.length) {
|
|
68
64
|
map.current.setCenter(DEFAULT_CENTER_COORDS);
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
|
-
}, [yandexMaps, map, points,
|
|
67
|
+
}, [yandexMaps, map, points, zoom]);
|
|
72
68
|
|
|
73
69
|
if (!yandexMaps) {
|
|
74
70
|
return null;
|
package/src/utils/isUUID.ts
CHANGED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export const mapCookie = (
|
|
2
|
+
name: string,
|
|
3
|
+
mapper: (value: string | undefined) => string | undefined,
|
|
4
|
+
) => {
|
|
5
|
+
const cookies = globalThis.document?.cookie.split(';') ?? [];
|
|
6
|
+
const [, value] = cookies.map((_) => _.split('=')).find(([key]) => key.trim() === name) || [];
|
|
7
|
+
|
|
8
|
+
if (mapper(value)) {
|
|
9
|
+
globalThis.document.cookie = `${name}=${mapper(value)}`;
|
|
10
|
+
}
|
|
11
|
+
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deleteAllCookies: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deleteAllCookies: () => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.deleteAllCookies = void 0;
|
|
3
|
-
const deleteAllCookies = () => {
|
|
4
|
-
const cookies = globalThis.document?.cookie.split(';') ?? [];
|
|
5
|
-
for (const cookie of cookies) {
|
|
6
|
-
const [name] = cookie.split('=');
|
|
7
|
-
globalThis.document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
exports.deleteAllCookies = deleteAllCookies;
|
|
11
|
-
//# sourceMappingURL=deleteAllCookie.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteAllCookie.js","sourceRoot":"","sources":["../../src/utils/deleteAllCookie.ts"],"names":[],"mappings":";;AAAO,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAE7D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,gDAAgD,CAAC;KACtF;AACH,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deleteAllCookies: () => void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const deleteAllCookies = () => {
|
|
2
|
-
const cookies = globalThis.document?.cookie.split(';') ?? [];
|
|
3
|
-
for (const cookie of cookies) {
|
|
4
|
-
const [name] = cookie.split('=');
|
|
5
|
-
globalThis.document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=deleteAllCookie.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteAllCookie.js","sourceRoot":"","sources":["../../src/utils/deleteAllCookie.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAE7D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,gDAAgD,CAAC;KACtF;AACH,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deleteAllCookies: () => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deleteAllCookies: () => void;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
-
exports.deleteAllCookies = void 0;
|
|
3
|
-
const deleteAllCookies = () => {
|
|
4
|
-
const cookies = globalThis.document?.cookie.split(';') ?? [];
|
|
5
|
-
for (const cookie of cookies) {
|
|
6
|
-
const [name] = cookie.split('=');
|
|
7
|
-
globalThis.document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
exports.deleteAllCookies = deleteAllCookies;
|
|
11
|
-
//# sourceMappingURL=deleteAllCookie.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteAllCookie.js","sourceRoot":"","sources":["../../src/utils/deleteAllCookie.ts"],"names":[],"mappings":";;AAAO,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAE7D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,gDAAgD,CAAC;KACtF;AACH,CAAC,CAAC;AAPW,QAAA,gBAAgB,oBAO3B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const deleteAllCookies: () => void;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const deleteAllCookies = () => {
|
|
2
|
-
const cookies = globalThis.document?.cookie.split(';') ?? [];
|
|
3
|
-
for (const cookie of cookies) {
|
|
4
|
-
const [name] = cookie.split('=');
|
|
5
|
-
globalThis.document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
//# sourceMappingURL=deleteAllCookie.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"deleteAllCookie.js","sourceRoot":"","sources":["../../src/utils/deleteAllCookie.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,MAAM,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;IAE7D,KAAK,MAAM,MAAM,IAAI,OAAO,EAAE;QAC5B,MAAM,CAAC,IAAI,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACjC,UAAU,CAAC,QAAQ,CAAC,MAAM,GAAG,GAAG,IAAI,gDAAgD,CAAC;KACtF;AACH,CAAC,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const deleteAllCookies = () => {
|
|
2
|
-
const cookies = globalThis.document?.cookie.split(';') ?? [];
|
|
3
|
-
|
|
4
|
-
for (const cookie of cookies) {
|
|
5
|
-
const [name] = cookie.split('=');
|
|
6
|
-
globalThis.document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
|
|
7
|
-
}
|
|
8
|
-
};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export const deleteAllCookies = () => {
|
|
2
|
-
const cookies = globalThis.document?.cookie.split(';') ?? [];
|
|
3
|
-
|
|
4
|
-
for (const cookie of cookies) {
|
|
5
|
-
const [name] = cookie.split('=');
|
|
6
|
-
globalThis.document.cookie = `${name}=;expires=Thu, 01 Jan 1970 00:00:00 GMT;path=/`;
|
|
7
|
-
}
|
|
8
|
-
};
|