@c15t/react 0.0.1-rc.8 → 1.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/dist/components/consent-manager-dialog/__tests__/styles.spec.cjs +41 -20
- package/dist/components/consent-manager-dialog/__tests__/styles.spec.js +34 -6
- package/dist/components/consent-manager-dialog/atoms/dialog-card.cjs +67 -32
- package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts +9 -3
- package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts.map +1 -1
- package/dist/components/consent-manager-dialog/atoms/dialog-card.js +26 -12
- package/dist/components/consent-manager-dialog/atoms/overlay.cjs +20 -19
- package/dist/components/consent-manager-dialog/atoms/overlay.d.ts.map +1 -1
- package/dist/components/consent-manager-dialog/atoms/overlay.js +7 -4
- package/dist/components/consent-manager-dialog/consent-manager-dialog.cjs +20 -16
- package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts +0 -2
- package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts.map +1 -1
- package/dist/components/consent-manager-dialog/consent-manager-dialog.js +10 -2
- package/dist/components/consent-manager-dialog/consent-manager-dialog.module.cjs +12 -10
- package/dist/components/consent-manager-dialog/consent-manager-dialog.module.js +4 -2
- package/dist/components/consent-manager-dialog/consent-manager-dialog_module.css +29 -15
- package/dist/components/consent-manager-dialog/index.cjs +43 -17
- package/dist/components/consent-manager-dialog/theme.cjs +3 -4
- package/dist/components/consent-manager-widget/__tests__/styles.spec.cjs +41 -20
- package/dist/components/consent-manager-widget/__tests__/styles.spec.js +34 -6
- package/dist/components/consent-manager-widget/atoms/accordion.cjs +50 -24
- package/dist/components/consent-manager-widget/atoms/accordion.d.ts.map +1 -1
- package/dist/components/consent-manager-widget/atoms/button.cjs +27 -13
- package/dist/components/consent-manager-widget/atoms/footer.cjs +19 -17
- package/dist/components/consent-manager-widget/atoms/root.cjs +10 -8
- package/dist/components/consent-manager-widget/consent-manager-widget.cjs +11 -22
- package/dist/components/consent-manager-widget/consent-manager-widget.d.ts.map +1 -1
- package/dist/components/consent-manager-widget/consent-manager-widget.js +3 -14
- package/dist/components/consent-manager-widget/consent-manager-widget.module.cjs +12 -13
- package/dist/components/consent-manager-widget/consent-manager-widget.module.js +4 -5
- package/dist/components/consent-manager-widget/consent-manager-widget_module.css +24 -29
- package/dist/components/consent-manager-widget/index.cjs +87 -29
- package/dist/components/consent-manager-widget/theme.cjs +3 -4
- package/dist/components/consent-manager-widget/types.cjs +3 -4
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.cjs +189 -0
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.d.ts +2 -0
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.d.ts.map +1 -0
- package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.js +183 -0
- package/dist/components/cookie-banner/__tests__/styles.spec.cjs +35 -20
- package/dist/components/cookie-banner/__tests__/styles.spec.js +28 -6
- package/dist/components/cookie-banner/atoms/overlay.cjs +18 -18
- package/dist/components/cookie-banner/atoms/overlay.d.ts.map +1 -1
- package/dist/components/cookie-banner/atoms/overlay.js +7 -5
- package/dist/components/cookie-banner/atoms/root.cjs +17 -17
- package/dist/components/cookie-banner/atoms/root.d.ts +14 -0
- package/dist/components/cookie-banner/atoms/root.d.ts.map +1 -1
- package/dist/components/cookie-banner/atoms/root.js +6 -4
- package/dist/components/cookie-banner/components.cjs +69 -28
- package/dist/components/cookie-banner/components.d.ts.map +1 -1
- package/dist/components/cookie-banner/components.js +14 -3
- package/dist/components/cookie-banner/cookie-banner.cjs +11 -9
- package/dist/components/cookie-banner/cookie-banner.d.ts +12 -0
- package/dist/components/cookie-banner/cookie-banner.d.ts.map +1 -1
- package/dist/components/cookie-banner/cookie-banner.js +3 -1
- package/dist/components/cookie-banner/cookie-banner.module.cjs +10 -10
- package/dist/components/cookie-banner/cookie-banner.module.js +2 -2
- package/dist/components/cookie-banner/cookie-banner_module.css +7 -7
- package/dist/components/cookie-banner/error-boundary.cjs +8 -9
- package/dist/components/cookie-banner/error-boundary.d.ts +1 -1
- package/dist/components/cookie-banner/error-boundary.js +0 -1
- package/dist/components/cookie-banner/index.cjs +65 -23
- package/dist/components/cookie-banner/theme.cjs +3 -4
- package/dist/components/shared/libs/polymorphic.cjs +3 -4
- package/dist/components/shared/libs/polymorphic.d.ts +1 -7
- package/dist/components/shared/libs/polymorphic.d.ts.map +1 -1
- package/dist/components/shared/libs/recursive-clone-children.cjs +8 -8
- package/dist/components/shared/primitives/box.cjs +10 -10
- package/dist/components/shared/primitives/box.d.ts.map +1 -1
- package/dist/components/shared/primitives/box.js +3 -3
- package/dist/components/shared/primitives/button.cjs +9 -9
- package/dist/components/shared/primitives/button.d.ts +2 -102
- package/dist/components/shared/primitives/button.d.ts.map +1 -1
- package/dist/components/shared/primitives/button.js +2 -2
- package/dist/components/shared/primitives/button.types.cjs +3 -4
- package/dist/components/shared/primitives/button.types.d.ts +1 -8
- package/dist/components/shared/primitives/button.types.d.ts.map +1 -1
- package/dist/components/shared/ui/accordion/accordion.cjs +25 -17
- package/dist/components/shared/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/components/shared/ui/accordion/accordion.js +8 -8
- package/dist/components/shared/ui/accordion/accordion.module.cjs +11 -11
- package/dist/components/shared/ui/accordion/accordion.module.js +3 -3
- package/dist/components/shared/ui/accordion/accordion.types.cjs +3 -4
- package/dist/components/shared/ui/accordion/accordion.types.d.ts +0 -10
- package/dist/components/shared/ui/accordion/accordion.types.d.ts.map +1 -1
- package/dist/components/shared/ui/accordion/accordion_module.css +39 -19
- package/dist/components/shared/ui/accordion/index.cjs +7 -14
- package/dist/components/shared/ui/button/button.cjs +16 -16
- package/dist/components/shared/ui/button/button.d.ts +4 -204
- package/dist/components/shared/ui/button/button.d.ts.map +1 -1
- package/dist/components/shared/ui/button/button.module.cjs +10 -10
- package/dist/components/shared/ui/button/button.module.js +2 -2
- package/dist/components/shared/ui/button/button.types.cjs +3 -4
- package/dist/components/shared/ui/button/button_module.css +40 -19
- package/dist/components/shared/ui/button/index.cjs +7 -14
- package/dist/components/shared/ui/icon.cjs +8 -8
- package/dist/components/shared/ui/icon.d.ts.map +1 -1
- package/dist/components/shared/ui/logo.cjs +43 -54
- package/dist/components/shared/ui/logo.d.ts +3 -2
- package/dist/components/shared/ui/logo.d.ts.map +1 -1
- package/dist/components/shared/ui/logo.js +32 -46
- package/dist/components/shared/ui/switch/index.cjs +7 -14
- package/dist/components/shared/ui/switch/switch.cjs +11 -15
- package/dist/components/shared/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/shared/ui/switch/switch.js +3 -3
- package/dist/components/shared/ui/switch/switch.module.cjs +10 -10
- package/dist/components/shared/ui/switch/switch.module.js +2 -2
- package/dist/components/shared/ui/switch/switch.types.cjs +3 -4
- package/dist/components/shared/ui/switch/switch_module.css +32 -10
- package/dist/context/consent-manager-context.cjs +9 -9
- package/dist/context/consent-manager-context.d.ts +29 -10
- package/dist/context/consent-manager-context.d.ts.map +1 -1
- package/dist/context/consent-manager-context.js +1 -1
- package/dist/context/theme-context.cjs +17 -9
- package/dist/context/theme-context.d.ts +16 -1
- package/dist/context/theme-context.d.ts.map +1 -1
- package/dist/context/theme-context.js +7 -1
- package/dist/hooks/__tests__/use-consent-manager.test.cjs +76 -0
- package/dist/hooks/__tests__/use-consent-manager.test.d.ts +2 -0
- package/dist/hooks/__tests__/use-consent-manager.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/use-consent-manager.test.js +70 -0
- package/dist/hooks/__tests__/use-styles.test.cjs +76 -0
- package/dist/hooks/__tests__/use-styles.test.d.ts +2 -0
- package/dist/hooks/__tests__/use-styles.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/use-styles.test.js +70 -0
- package/dist/hooks/__tests__/use-theme.test.cjs +86 -0
- package/dist/hooks/__tests__/use-theme.test.d.ts +2 -0
- package/dist/hooks/__tests__/use-theme.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/use-theme.test.js +80 -0
- package/dist/hooks/index.cjs +23 -21
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +18 -1
- package/dist/hooks/use-color-scheme.cjs +66 -0
- package/dist/hooks/use-color-scheme.d.ts +16 -0
- package/dist/hooks/use-color-scheme.d.ts.map +1 -0
- package/dist/hooks/use-color-scheme.js +32 -0
- package/dist/hooks/use-consent-manager.cjs +13 -9
- package/dist/hooks/use-consent-manager.d.ts +13 -5
- package/dist/hooks/use-consent-manager.d.ts.map +1 -1
- package/dist/hooks/use-consent-manager.js +5 -1
- package/dist/hooks/use-focus-trap.cjs +76 -0
- package/dist/hooks/use-focus-trap.d.ts +15 -0
- package/dist/hooks/use-focus-trap.d.ts.map +1 -0
- package/dist/hooks/use-focus-trap.js +42 -0
- package/dist/hooks/use-scroll-lock.cjs +55 -0
- package/dist/hooks/use-scroll-lock.d.ts +26 -0
- package/dist/hooks/use-scroll-lock.d.ts.map +1 -0
- package/dist/hooks/use-scroll-lock.js +21 -0
- package/dist/{utils → hooks}/use-styles.cjs +13 -13
- package/dist/{utils → hooks}/use-styles.d.ts.map +1 -1
- package/dist/{utils → hooks}/use-styles.js +5 -5
- package/dist/hooks/use-theme.cjs +10 -12
- package/dist/hooks/use-theme.d.ts.map +1 -1
- package/dist/hooks/use-theme.js +2 -4
- package/dist/hooks/use-translations.cjs +8 -8
- package/dist/index.cjs +66 -30
- package/dist/index.d.ts +9 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -4
- package/dist/providers/__tests__/provider-basic.test.cjs +127 -0
- package/dist/providers/__tests__/provider-basic.test.d.ts +2 -0
- package/dist/providers/__tests__/provider-basic.test.d.ts.map +1 -0
- package/dist/providers/__tests__/provider-basic.test.js +121 -0
- package/dist/providers/__tests__/provider-context.test.cjs +139 -0
- package/dist/providers/__tests__/provider-context.test.d.ts +2 -0
- package/dist/providers/__tests__/provider-context.test.d.ts.map +1 -0
- package/dist/providers/__tests__/provider-context.test.js +133 -0
- package/dist/providers/__tests__/provider-errors.test.cjs +98 -0
- package/dist/providers/__tests__/provider-errors.test.d.ts +2 -0
- package/dist/providers/__tests__/provider-errors.test.d.ts.map +1 -0
- package/dist/providers/__tests__/provider-errors.test.js +92 -0
- package/dist/providers/__tests__/test-helpers.cjs +171 -0
- package/dist/providers/__tests__/test-helpers.d.ts +6 -0
- package/dist/providers/__tests__/test-helpers.d.ts.map +1 -0
- package/dist/providers/__tests__/test-helpers.js +134 -0
- package/dist/providers/consent-manager-provider.cjs +95 -38
- package/dist/providers/consent-manager-provider.d.ts +16 -2
- package/dist/providers/consent-manager-provider.d.ts.map +1 -1
- package/dist/providers/consent-manager-provider.js +87 -30
- package/dist/types/consent-manager.cjs +3 -4
- package/dist/types/consent-manager.d.ts +47 -72
- package/dist/types/consent-manager.d.ts.map +1 -1
- package/dist/types/theme/index.cjs +7 -14
- package/dist/types/theme/style-keys.cjs +3 -4
- package/dist/types/theme/style-types.cjs +3 -4
- package/dist/utils/cn.cjs +10 -16
- package/dist/utils/cn.d.ts +1 -5
- package/dist/utils/cn.d.ts.map +1 -1
- package/dist/utils/cn.js +1 -2
- package/dist/utils/merge-styles.cjs +8 -8
- package/dist/utils/test-helpers.cjs +70 -0
- package/dist/utils/test-helpers.d.ts +30 -0
- package/dist/utils/test-helpers.d.ts.map +1 -0
- package/dist/utils/test-helpers.js +33 -0
- package/dist/utils/translations.cjs +12 -8
- package/package.json +17 -12
- package/dist/components/consent-manager-dialog/__tests__/utils.cjs +0 -68
- package/dist/components/consent-manager-dialog/__tests__/utils.d.ts +0 -13
- package/dist/components/consent-manager-dialog/__tests__/utils.d.ts.map +0 -1
- package/dist/components/consent-manager-dialog/__tests__/utils.js +0 -34
- package/dist/components/consent-manager-widget/__tests__/utils.cjs +0 -68
- package/dist/components/consent-manager-widget/__tests__/utils.d.ts +0 -13
- package/dist/components/consent-manager-widget/__tests__/utils.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/__tests__/utils.js +0 -34
- package/dist/components/consent-manager-widget/atoms/logo.cjs +0 -101
- package/dist/components/consent-manager-widget/atoms/logo.d.ts +0 -8
- package/dist/components/consent-manager-widget/atoms/logo.d.ts.map +0 -1
- package/dist/components/consent-manager-widget/atoms/logo.js +0 -67
- package/dist/components/cookie-banner/__tests__/utils.cjs +0 -67
- package/dist/components/cookie-banner/__tests__/utils.d.ts +0 -13
- package/dist/components/cookie-banner/__tests__/utils.d.ts.map +0 -1
- package/dist/components/cookie-banner/__tests__/utils.js +0 -33
- /package/dist/{utils → hooks}/use-styles.d.ts +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
var __webpack_require__ = {};
|
|
4
4
|
(()=>{
|
|
5
|
-
__webpack_require__.d =
|
|
5
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
6
6
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: definition[key]
|
|
@@ -10,12 +10,10 @@ var __webpack_require__ = {};
|
|
|
10
10
|
};
|
|
11
11
|
})();
|
|
12
12
|
(()=>{
|
|
13
|
-
__webpack_require__.o =
|
|
14
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
15
|
-
};
|
|
13
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
16
14
|
})();
|
|
17
15
|
(()=>{
|
|
18
|
-
__webpack_require__.r =
|
|
16
|
+
__webpack_require__.r = (exports1)=>{
|
|
19
17
|
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
20
18
|
value: 'Module'
|
|
21
19
|
});
|
|
@@ -33,9 +31,13 @@ const jsx_runtime_namespaceObject = require("react/jsx-runtime");
|
|
|
33
31
|
const external_c15t_namespaceObject = require("c15t");
|
|
34
32
|
const external_react_namespaceObject = require("react");
|
|
35
33
|
const consent_manager_context_cjs_namespaceObject = require("../context/consent-manager-context.cjs");
|
|
36
|
-
const translations_cjs_namespaceObject = require("../utils/translations.cjs");
|
|
37
34
|
const theme_context_cjs_namespaceObject = require("../context/theme-context.cjs");
|
|
38
|
-
|
|
35
|
+
const use_color_scheme_cjs_namespaceObject = require("../hooks/use-color-scheme.cjs");
|
|
36
|
+
const translations_cjs_namespaceObject = require("../utils/translations.cjs");
|
|
37
|
+
function ConsentManagerProvider({ children, options }) {
|
|
38
|
+
const { mode, backendURL, callbacks, store = {}, translations: translationConfig, react = {} } = options;
|
|
39
|
+
const { initialGdprTypes, initialComplianceSettings } = store;
|
|
40
|
+
const { theme, disableAnimation = false, scrollLock = false, trapFocus = true, colorScheme = 'system', noStyle = false } = react;
|
|
39
41
|
const preparedTranslationConfig = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
40
42
|
const mergedConfig = (0, translations_cjs_namespaceObject.mergeTranslationConfigs)(external_c15t_namespaceObject.defaultTranslationConfig, translationConfig);
|
|
41
43
|
const defaultLanguage = (0, translations_cjs_namespaceObject.detectBrowserLanguage)(mergedConfig.translations, mergedConfig.defaultLanguage, mergedConfig.disableAutoLanguageSwitch);
|
|
@@ -46,61 +48,116 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
46
48
|
}, [
|
|
47
49
|
translationConfig
|
|
48
50
|
]);
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
51
|
+
const isConsentDomain = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
52
|
+
if ('undefined' == typeof window) return false;
|
|
53
|
+
return Boolean(('c15t' === mode || 'offline' === mode) && (backendURL?.includes('c15t.dev') || window.location.hostname.includes('c15t.dev')));
|
|
54
|
+
}, [
|
|
55
|
+
mode,
|
|
56
|
+
backendURL
|
|
57
|
+
]);
|
|
58
|
+
const consentManager = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
59
|
+
if ('offline' === mode) return (0, external_c15t_namespaceObject.configureConsentManager)({
|
|
60
|
+
mode: 'offline',
|
|
61
|
+
callbacks,
|
|
62
|
+
store
|
|
63
|
+
});
|
|
64
|
+
if ('custom' === mode && 'endpointHandlers' in options) return (0, external_c15t_namespaceObject.configureConsentManager)({
|
|
65
|
+
mode: 'custom',
|
|
66
|
+
endpointHandlers: options.endpointHandlers,
|
|
67
|
+
callbacks,
|
|
68
|
+
store
|
|
52
69
|
});
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
return (0, external_c15t_namespaceObject.configureConsentManager)({
|
|
71
|
+
mode: 'c15t',
|
|
72
|
+
backendURL: backendURL || '/api/c15t',
|
|
73
|
+
callbacks,
|
|
74
|
+
store
|
|
75
|
+
});
|
|
76
|
+
}, [
|
|
77
|
+
mode,
|
|
78
|
+
backendURL,
|
|
79
|
+
callbacks,
|
|
80
|
+
store,
|
|
81
|
+
options
|
|
82
|
+
]);
|
|
83
|
+
const storeRef = (0, external_react_namespaceObject.useRef)(null);
|
|
84
|
+
const prevBackendURLRef = (0, external_react_namespaceObject.useRef)(backendURL);
|
|
85
|
+
const prevModeRef = (0, external_react_namespaceObject.useRef)(mode);
|
|
86
|
+
const consentStore = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
87
|
+
const storeWithTranslations = {
|
|
88
|
+
...store,
|
|
89
|
+
translationConfig: preparedTranslationConfig,
|
|
90
|
+
isConsentDomain
|
|
91
|
+
};
|
|
92
|
+
const shouldRecreateStore = !storeRef.current || prevBackendURLRef.current !== backendURL || prevModeRef.current !== mode;
|
|
93
|
+
prevBackendURLRef.current = backendURL;
|
|
94
|
+
prevModeRef.current = mode;
|
|
95
|
+
if (shouldRecreateStore) storeRef.current = (0, external_c15t_namespaceObject.createConsentManagerStore)(consentManager, storeWithTranslations);
|
|
96
|
+
return storeRef.current;
|
|
55
97
|
}, [
|
|
56
|
-
|
|
98
|
+
consentManager,
|
|
99
|
+
isConsentDomain,
|
|
57
100
|
preparedTranslationConfig,
|
|
58
|
-
|
|
101
|
+
store,
|
|
102
|
+
backendURL,
|
|
103
|
+
mode
|
|
59
104
|
]);
|
|
60
|
-
const [state, setState] = (0, external_react_namespaceObject.useState)(
|
|
105
|
+
const [state, setState] = (0, external_react_namespaceObject.useState)(()=>{
|
|
106
|
+
if (!consentStore) return {};
|
|
107
|
+
return consentStore.getState();
|
|
108
|
+
});
|
|
61
109
|
(0, external_react_namespaceObject.useEffect)(()=>{
|
|
62
|
-
|
|
110
|
+
if (!consentStore) return;
|
|
111
|
+
const { setGdprTypes, setComplianceSetting, setDetectedCountry } = consentStore.getState();
|
|
63
112
|
if (initialGdprTypes) setGdprTypes(initialGdprTypes);
|
|
64
113
|
if (initialComplianceSettings) for (const [region, settings] of Object.entries(initialComplianceSettings))setComplianceSetting(region, settings);
|
|
65
114
|
const country = document.querySelector('meta[name="user-country"]')?.getAttribute('content') || 'US';
|
|
66
115
|
setDetectedCountry(country);
|
|
67
|
-
const unsubscribe =
|
|
68
|
-
|
|
69
|
-
});
|
|
70
|
-
return ()=>{
|
|
71
|
-
unsubscribe();
|
|
72
|
-
};
|
|
116
|
+
const unsubscribe = consentStore.subscribe(setState);
|
|
117
|
+
return unsubscribe;
|
|
73
118
|
}, [
|
|
74
|
-
|
|
119
|
+
consentStore,
|
|
75
120
|
initialGdprTypes,
|
|
76
121
|
initialComplianceSettings
|
|
77
122
|
]);
|
|
78
|
-
const contextValue = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
79
|
-
state,
|
|
80
|
-
store
|
|
81
|
-
}), [
|
|
82
|
-
state,
|
|
83
|
-
store
|
|
84
|
-
]);
|
|
85
123
|
const themeContextValue = (0, external_react_namespaceObject.useMemo)(()=>({
|
|
86
|
-
noStyle,
|
|
87
124
|
theme,
|
|
88
|
-
|
|
125
|
+
noStyle,
|
|
126
|
+
disableAnimation,
|
|
127
|
+
scrollLock,
|
|
128
|
+
trapFocus
|
|
89
129
|
}), [
|
|
90
|
-
noStyle,
|
|
91
130
|
theme,
|
|
92
|
-
|
|
131
|
+
noStyle,
|
|
132
|
+
disableAnimation,
|
|
133
|
+
scrollLock,
|
|
134
|
+
trapFocus
|
|
135
|
+
]);
|
|
136
|
+
(0, use_color_scheme_cjs_namespaceObject.useColorScheme)(colorScheme);
|
|
137
|
+
const consentContextValue = (0, external_react_namespaceObject.useMemo)(()=>{
|
|
138
|
+
if (!consentStore) throw new Error('Consent store must be initialized before creating context value');
|
|
139
|
+
return {
|
|
140
|
+
state,
|
|
141
|
+
store: consentStore,
|
|
142
|
+
manager: consentManager
|
|
143
|
+
};
|
|
144
|
+
}, [
|
|
145
|
+
state,
|
|
146
|
+
consentStore,
|
|
147
|
+
consentManager
|
|
93
148
|
]);
|
|
94
149
|
return /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(consent_manager_context_cjs_namespaceObject.ConsentStateContext.Provider, {
|
|
95
|
-
value:
|
|
150
|
+
value: consentContextValue,
|
|
96
151
|
children: /*#__PURE__*/ (0, jsx_runtime_namespaceObject.jsx)(theme_context_cjs_namespaceObject.GlobalThemeContext.Provider, {
|
|
97
152
|
value: themeContextValue,
|
|
98
153
|
children: children
|
|
99
154
|
})
|
|
100
155
|
});
|
|
101
156
|
}
|
|
102
|
-
|
|
103
|
-
for(var __webpack_i__ in __webpack_exports__)
|
|
104
|
-
|
|
157
|
+
exports.ConsentManagerProvider = __webpack_exports__.ConsentManagerProvider;
|
|
158
|
+
for(var __webpack_i__ in __webpack_exports__)if (-1 === [
|
|
159
|
+
"ConsentManagerProvider"
|
|
160
|
+
].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
161
|
+
Object.defineProperty(exports, '__esModule', {
|
|
105
162
|
value: true
|
|
106
163
|
});
|
|
@@ -5,12 +5,26 @@ import type { ConsentManagerProviderProps } from '../types/consent-manager';
|
|
|
5
5
|
* @remarks
|
|
6
6
|
* This component initializes and manages the consent management system, including:
|
|
7
7
|
* - Setting up the consent store with initial configuration
|
|
8
|
+
* - Creating a consent manager from the provided options
|
|
8
9
|
* - Detecting user's region for compliance
|
|
9
10
|
* - Managing consent state updates
|
|
10
11
|
* - Providing access to consent management throughout the app
|
|
11
|
-
*
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* <ConsentManagerProvider
|
|
16
|
+
* options={{
|
|
17
|
+
* mode: 'offline',
|
|
18
|
+
* callbacks: {
|
|
19
|
+
* onConsentSet: (response) => console.log('Consent updated')
|
|
20
|
+
* }
|
|
21
|
+
* }}
|
|
22
|
+
* >
|
|
23
|
+
* {children}
|
|
24
|
+
* </ConsentManagerProvider>
|
|
25
|
+
* ```
|
|
12
26
|
*
|
|
13
27
|
* @public
|
|
14
28
|
*/
|
|
15
|
-
export declare function ConsentManagerProvider({ children,
|
|
29
|
+
export declare function ConsentManagerProvider({ children, options, }: ConsentManagerProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
16
30
|
//# sourceMappingURL=consent-manager-provider.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-manager-provider.d.ts","sourceRoot":"","sources":["../../src/providers/consent-manager-provider.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"consent-manager-provider.d.ts","sourceRoot":"","sources":["../../src/providers/consent-manager-provider.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAM5E;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,QAAQ,EACR,OAAO,GACP,EAAE,2BAA2B,2CAwM7B"}
|
|
@@ -3,9 +3,13 @@ import * as __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__ from "react/j
|
|
|
3
3
|
import * as __WEBPACK_EXTERNAL_MODULE_c15t__ from "c15t";
|
|
4
4
|
import * as __WEBPACK_EXTERNAL_MODULE_react__ from "react";
|
|
5
5
|
import * as __WEBPACK_EXTERNAL_MODULE__context_consent_manager_context_js_ee8f06d2__ from "../context/consent-manager-context.js";
|
|
6
|
-
import * as __WEBPACK_EXTERNAL_MODULE__utils_translations_js_c2629c1f__ from "../utils/translations.js";
|
|
7
6
|
import * as __WEBPACK_EXTERNAL_MODULE__context_theme_context_js_fbb05439__ from "../context/theme-context.js";
|
|
8
|
-
|
|
7
|
+
import * as __WEBPACK_EXTERNAL_MODULE__hooks_use_color_scheme_js_939e374b__ from "../hooks/use-color-scheme.js";
|
|
8
|
+
import * as __WEBPACK_EXTERNAL_MODULE__utils_translations_js_c2629c1f__ from "../utils/translations.js";
|
|
9
|
+
function ConsentManagerProvider({ children, options }) {
|
|
10
|
+
const { mode, backendURL, callbacks, store = {}, translations: translationConfig, react = {} } = options;
|
|
11
|
+
const { initialGdprTypes, initialComplianceSettings } = store;
|
|
12
|
+
const { theme, disableAnimation = false, scrollLock = false, trapFocus = true, colorScheme = 'system', noStyle = false } = react;
|
|
9
13
|
const preparedTranslationConfig = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
10
14
|
const mergedConfig = (0, __WEBPACK_EXTERNAL_MODULE__utils_translations_js_c2629c1f__.mergeTranslationConfigs)(__WEBPACK_EXTERNAL_MODULE_c15t__.defaultTranslationConfig, translationConfig);
|
|
11
15
|
const defaultLanguage = (0, __WEBPACK_EXTERNAL_MODULE__utils_translations_js_c2629c1f__.detectBrowserLanguage)(mergedConfig.translations, mergedConfig.defaultLanguage, mergedConfig.disableAutoLanguageSwitch);
|
|
@@ -16,53 +20,106 @@ function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceS
|
|
|
16
20
|
}, [
|
|
17
21
|
translationConfig
|
|
18
22
|
]);
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
23
|
+
const isConsentDomain = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
24
|
+
if ('undefined' == typeof window) return false;
|
|
25
|
+
return Boolean(('c15t' === mode || 'offline' === mode) && (backendURL?.includes('c15t.dev') || window.location.hostname.includes('c15t.dev')));
|
|
26
|
+
}, [
|
|
27
|
+
mode,
|
|
28
|
+
backendURL
|
|
29
|
+
]);
|
|
30
|
+
const consentManager = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
31
|
+
if ('offline' === mode) return (0, __WEBPACK_EXTERNAL_MODULE_c15t__.configureConsentManager)({
|
|
32
|
+
mode: 'offline',
|
|
33
|
+
callbacks,
|
|
34
|
+
store
|
|
35
|
+
});
|
|
36
|
+
if ('custom' === mode && 'endpointHandlers' in options) return (0, __WEBPACK_EXTERNAL_MODULE_c15t__.configureConsentManager)({
|
|
37
|
+
mode: 'custom',
|
|
38
|
+
endpointHandlers: options.endpointHandlers,
|
|
39
|
+
callbacks,
|
|
40
|
+
store
|
|
41
|
+
});
|
|
42
|
+
return (0, __WEBPACK_EXTERNAL_MODULE_c15t__.configureConsentManager)({
|
|
43
|
+
mode: 'c15t',
|
|
44
|
+
backendURL: backendURL || '/api/c15t',
|
|
45
|
+
callbacks,
|
|
46
|
+
store
|
|
22
47
|
});
|
|
23
|
-
store.getState().setTranslationConfig(preparedTranslationConfig);
|
|
24
|
-
return store;
|
|
25
48
|
}, [
|
|
26
|
-
|
|
49
|
+
mode,
|
|
50
|
+
backendURL,
|
|
51
|
+
callbacks,
|
|
52
|
+
store,
|
|
53
|
+
options
|
|
54
|
+
]);
|
|
55
|
+
const storeRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(null);
|
|
56
|
+
const prevBackendURLRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(backendURL);
|
|
57
|
+
const prevModeRef = (0, __WEBPACK_EXTERNAL_MODULE_react__.useRef)(mode);
|
|
58
|
+
const consentStore = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
59
|
+
const storeWithTranslations = {
|
|
60
|
+
...store,
|
|
61
|
+
translationConfig: preparedTranslationConfig,
|
|
62
|
+
isConsentDomain
|
|
63
|
+
};
|
|
64
|
+
const shouldRecreateStore = !storeRef.current || prevBackendURLRef.current !== backendURL || prevModeRef.current !== mode;
|
|
65
|
+
prevBackendURLRef.current = backendURL;
|
|
66
|
+
prevModeRef.current = mode;
|
|
67
|
+
if (shouldRecreateStore) storeRef.current = (0, __WEBPACK_EXTERNAL_MODULE_c15t__.createConsentManagerStore)(consentManager, storeWithTranslations);
|
|
68
|
+
return storeRef.current;
|
|
69
|
+
}, [
|
|
70
|
+
consentManager,
|
|
71
|
+
isConsentDomain,
|
|
27
72
|
preparedTranslationConfig,
|
|
28
|
-
|
|
73
|
+
store,
|
|
74
|
+
backendURL,
|
|
75
|
+
mode
|
|
29
76
|
]);
|
|
30
|
-
const [state, setState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(
|
|
77
|
+
const [state, setState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(()=>{
|
|
78
|
+
if (!consentStore) return {};
|
|
79
|
+
return consentStore.getState();
|
|
80
|
+
});
|
|
31
81
|
(0, __WEBPACK_EXTERNAL_MODULE_react__.useEffect)(()=>{
|
|
32
|
-
|
|
82
|
+
if (!consentStore) return;
|
|
83
|
+
const { setGdprTypes, setComplianceSetting, setDetectedCountry } = consentStore.getState();
|
|
33
84
|
if (initialGdprTypes) setGdprTypes(initialGdprTypes);
|
|
34
85
|
if (initialComplianceSettings) for (const [region, settings] of Object.entries(initialComplianceSettings))setComplianceSetting(region, settings);
|
|
35
86
|
const country = document.querySelector('meta[name="user-country"]')?.getAttribute('content') || 'US';
|
|
36
87
|
setDetectedCountry(country);
|
|
37
|
-
const unsubscribe =
|
|
38
|
-
|
|
39
|
-
});
|
|
40
|
-
return ()=>{
|
|
41
|
-
unsubscribe();
|
|
42
|
-
};
|
|
88
|
+
const unsubscribe = consentStore.subscribe(setState);
|
|
89
|
+
return unsubscribe;
|
|
43
90
|
}, [
|
|
44
|
-
|
|
91
|
+
consentStore,
|
|
45
92
|
initialGdprTypes,
|
|
46
93
|
initialComplianceSettings
|
|
47
94
|
]);
|
|
48
|
-
const contextValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
49
|
-
state,
|
|
50
|
-
store
|
|
51
|
-
}), [
|
|
52
|
-
state,
|
|
53
|
-
store
|
|
54
|
-
]);
|
|
55
95
|
const themeContextValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>({
|
|
56
|
-
noStyle,
|
|
57
96
|
theme,
|
|
58
|
-
|
|
97
|
+
noStyle,
|
|
98
|
+
disableAnimation,
|
|
99
|
+
scrollLock,
|
|
100
|
+
trapFocus
|
|
59
101
|
}), [
|
|
60
|
-
noStyle,
|
|
61
102
|
theme,
|
|
62
|
-
|
|
103
|
+
noStyle,
|
|
104
|
+
disableAnimation,
|
|
105
|
+
scrollLock,
|
|
106
|
+
trapFocus
|
|
107
|
+
]);
|
|
108
|
+
(0, __WEBPACK_EXTERNAL_MODULE__hooks_use_color_scheme_js_939e374b__.useColorScheme)(colorScheme);
|
|
109
|
+
const consentContextValue = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
|
|
110
|
+
if (!consentStore) throw new Error('Consent store must be initialized before creating context value');
|
|
111
|
+
return {
|
|
112
|
+
state,
|
|
113
|
+
store: consentStore,
|
|
114
|
+
manager: consentManager
|
|
115
|
+
};
|
|
116
|
+
}, [
|
|
117
|
+
state,
|
|
118
|
+
consentStore,
|
|
119
|
+
consentManager
|
|
63
120
|
]);
|
|
64
121
|
return /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__context_consent_manager_context_js_ee8f06d2__.ConsentStateContext.Provider, {
|
|
65
|
-
value:
|
|
122
|
+
value: consentContextValue,
|
|
66
123
|
children: /*#__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_react_jsx_runtime_225474f2__.jsx)(__WEBPACK_EXTERNAL_MODULE__context_theme_context_js_fbb05439__.GlobalThemeContext.Provider, {
|
|
67
124
|
value: themeContextValue,
|
|
68
125
|
children: children
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.r =
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
5
|
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
6
|
value: 'Module'
|
|
7
7
|
});
|
|
@@ -12,8 +12,7 @@ var __webpack_require__ = {};
|
|
|
12
12
|
})();
|
|
13
13
|
var __webpack_exports__ = {};
|
|
14
14
|
__webpack_require__.r(__webpack_exports__);
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
15
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
18
17
|
value: true
|
|
19
18
|
});
|
|
@@ -1,95 +1,70 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* @packageDocumentation
|
|
3
|
+
* Type definitions for the consent manager components.
|
|
4
|
+
*/
|
|
5
|
+
import type { ConsentManagerOptions as CoreOptions, TranslationConfig } from 'c15t';
|
|
2
6
|
import type { ReactNode } from 'react';
|
|
3
|
-
import type { ConsentManagerDialogTheme } from '../components/consent-manager-dialog/theme';
|
|
4
|
-
import type { CookieBannerTheme } from '../components/cookie-banner/theme';
|
|
5
7
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* @remarks
|
|
9
|
-
* These props allow you to configure the initial state and behavior of the consent manager,
|
|
10
|
-
* including GDPR types, compliance settings, and namespace configuration.
|
|
11
|
-
*
|
|
12
|
-
* @public
|
|
8
|
+
* React-specific configuration options
|
|
13
9
|
*/
|
|
14
|
-
export interface
|
|
10
|
+
export interface ReactUIOptions {
|
|
15
11
|
/**
|
|
16
|
-
*
|
|
17
|
-
* React elements to be rendered within the consent manager context.
|
|
12
|
+
* Visual theme to apply.
|
|
18
13
|
*/
|
|
19
|
-
|
|
14
|
+
theme?: 'light' | 'dark';
|
|
20
15
|
/**
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* These types define what kinds of cookies and tracking are initially allowed.
|
|
16
|
+
* Whether to disable animations.
|
|
17
|
+
* @default false
|
|
24
18
|
*/
|
|
25
|
-
|
|
19
|
+
disableAnimation?: boolean;
|
|
26
20
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
* should behave in different geographical regions.
|
|
21
|
+
* Whether to lock scroll when dialogs are open.
|
|
22
|
+
* @default false
|
|
30
23
|
*/
|
|
31
|
-
|
|
24
|
+
scrollLock?: boolean;
|
|
32
25
|
/**
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
* @default false
|
|
26
|
+
* Whether to trap focus within dialogs.
|
|
27
|
+
* @default true
|
|
36
28
|
*/
|
|
37
|
-
|
|
29
|
+
trapFocus?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Color scheme preference.
|
|
32
|
+
* @default 'system'
|
|
33
|
+
*/
|
|
34
|
+
colorScheme?: 'light' | 'dark' | 'system';
|
|
38
35
|
/**
|
|
39
|
-
*
|
|
40
|
-
* Whether to disable animations
|
|
36
|
+
* Whether to disable default styles.
|
|
41
37
|
* @default false
|
|
42
38
|
*/
|
|
43
|
-
|
|
39
|
+
noStyle?: boolean;
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Extended configuration options for the React consent manager
|
|
43
|
+
*/
|
|
44
|
+
export type ConsentManagerOptions = CoreOptions & {
|
|
44
45
|
/**
|
|
45
|
-
*
|
|
46
|
-
* Theme configuration for the consent manager
|
|
46
|
+
* React-specific UI configuration options
|
|
47
47
|
*/
|
|
48
|
-
|
|
48
|
+
react?: ReactUIOptions;
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
* The configuration allows you to:
|
|
52
|
-
* - Define translations for multiple languages through the translations object
|
|
53
|
-
* - Set a default language via defaultLanguage prop
|
|
54
|
-
* - Control automatic language switching based on browser settings with disableAutoLanguageSwitch
|
|
55
|
-
* - Override specific translation keys while keeping defaults for others
|
|
56
|
-
*
|
|
57
|
-
* @example
|
|
58
|
-
* ```tsx
|
|
59
|
-
* <ConsentManagerProvider
|
|
60
|
-
* translationConfig={{
|
|
61
|
-
* translations: {
|
|
62
|
-
* de: {
|
|
63
|
-
* cookieBanner: {
|
|
64
|
-
* title: 'Cookie-Einstellungen',
|
|
65
|
-
* description: 'Wir verwenden Cookies...'
|
|
66
|
-
* }
|
|
67
|
-
* }
|
|
68
|
-
* },
|
|
69
|
-
* defaultLanguage: 'en',
|
|
70
|
-
* disableAutoLanguageSwitch: false
|
|
71
|
-
* }}
|
|
72
|
-
* >
|
|
73
|
-
* {children}
|
|
74
|
-
* </ConsentManagerProvider>
|
|
75
|
-
* ```
|
|
50
|
+
* Translation configuration
|
|
76
51
|
*/
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
52
|
+
translations?: Partial<TranslationConfig>;
|
|
53
|
+
};
|
|
80
54
|
/**
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
* @remarks
|
|
84
|
-
* Combines both the current state and store instance for complete
|
|
85
|
-
* consent management functionality.
|
|
55
|
+
* Configuration options for the ConsentManagerProvider.
|
|
86
56
|
*
|
|
87
|
-
* @
|
|
57
|
+
* @public
|
|
88
58
|
*/
|
|
89
|
-
export interface
|
|
90
|
-
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
59
|
+
export interface ConsentManagerProviderProps {
|
|
60
|
+
/**
|
|
61
|
+
* React children to render within the provider.
|
|
62
|
+
*/
|
|
63
|
+
children: ReactNode;
|
|
64
|
+
/**
|
|
65
|
+
* Configuration options for the consent manager.
|
|
66
|
+
* This includes core, React, store, and translation settings.
|
|
67
|
+
*/
|
|
68
|
+
options: ConsentManagerOptions;
|
|
94
69
|
}
|
|
95
70
|
//# sourceMappingURL=consent-manager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consent-manager.d.ts","sourceRoot":"","sources":["../../src/types/consent-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACX,
|
|
1
|
+
{"version":3,"file":"consent-manager.d.ts","sourceRoot":"","sources":["../../src/types/consent-manager.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EACX,qBAAqB,IAAI,WAAW,EACpC,iBAAiB,EACjB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC;;GAEG;AACH,MAAM,WAAW,cAAc;IAC9B;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAEzB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,GAAG,MAAM,GAAG,QAAQ,CAAC;IAE1C;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAAG,WAAW,GAAG;IACjD;;OAEG;IACH,KAAK,CAAC,EAAE,cAAc,CAAC;IAEvB;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;CAC1C,CAAC;AAEF;;;;GAIG;AACH,MAAM,WAAW,2BAA2B;IAC3C;;OAEG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;OAGG;IACH,OAAO,EAAE,qBAAqB,CAAC;CAC/B"}
|
|
@@ -18,12 +18,8 @@ function __webpack_require__(moduleId) {
|
|
|
18
18
|
return module.exports;
|
|
19
19
|
}
|
|
20
20
|
(()=>{
|
|
21
|
-
__webpack_require__.n =
|
|
22
|
-
var getter = module && module.__esModule ?
|
|
23
|
-
return module['default'];
|
|
24
|
-
} : function() {
|
|
25
|
-
return module;
|
|
26
|
-
};
|
|
21
|
+
__webpack_require__.n = (module)=>{
|
|
22
|
+
var getter = module && module.__esModule ? ()=>module['default'] : ()=>module;
|
|
27
23
|
__webpack_require__.d(getter, {
|
|
28
24
|
a: getter
|
|
29
25
|
});
|
|
@@ -31,7 +27,7 @@ function __webpack_require__(moduleId) {
|
|
|
31
27
|
};
|
|
32
28
|
})();
|
|
33
29
|
(()=>{
|
|
34
|
-
__webpack_require__.d =
|
|
30
|
+
__webpack_require__.d = (exports1, definition)=>{
|
|
35
31
|
for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
|
|
36
32
|
enumerable: true,
|
|
37
33
|
get: definition[key]
|
|
@@ -39,12 +35,10 @@ function __webpack_require__(moduleId) {
|
|
|
39
35
|
};
|
|
40
36
|
})();
|
|
41
37
|
(()=>{
|
|
42
|
-
__webpack_require__.o =
|
|
43
|
-
return Object.prototype.hasOwnProperty.call(obj, prop);
|
|
44
|
-
};
|
|
38
|
+
__webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
|
|
45
39
|
})();
|
|
46
40
|
(()=>{
|
|
47
|
-
__webpack_require__.r =
|
|
41
|
+
__webpack_require__.r = (exports1)=>{
|
|
48
42
|
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
49
43
|
value: 'Module'
|
|
50
44
|
});
|
|
@@ -69,8 +63,7 @@ var __webpack_exports__ = {};
|
|
|
69
63
|
}).bind(0, __WEBPACK_IMPORT_KEY__);
|
|
70
64
|
__webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
71
65
|
})();
|
|
72
|
-
var
|
|
73
|
-
|
|
74
|
-
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
66
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
67
|
+
Object.defineProperty(exports, '__esModule', {
|
|
75
68
|
value: true
|
|
76
69
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.r =
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
5
|
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
6
|
value: 'Module'
|
|
7
7
|
});
|
|
@@ -12,8 +12,7 @@ var __webpack_require__ = {};
|
|
|
12
12
|
})();
|
|
13
13
|
var __webpack_exports__ = {};
|
|
14
14
|
__webpack_require__.r(__webpack_exports__);
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
15
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
18
17
|
value: true
|
|
19
18
|
});
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_require__ = {};
|
|
3
3
|
(()=>{
|
|
4
|
-
__webpack_require__.r =
|
|
4
|
+
__webpack_require__.r = (exports1)=>{
|
|
5
5
|
if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
|
|
6
6
|
value: 'Module'
|
|
7
7
|
});
|
|
@@ -12,8 +12,7 @@ var __webpack_require__ = {};
|
|
|
12
12
|
})();
|
|
13
13
|
var __webpack_exports__ = {};
|
|
14
14
|
__webpack_require__.r(__webpack_exports__);
|
|
15
|
-
var
|
|
16
|
-
|
|
17
|
-
if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
|
|
15
|
+
for(var __webpack_i__ in __webpack_exports__)exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
16
|
+
Object.defineProperty(exports, '__esModule', {
|
|
18
17
|
value: true
|
|
19
18
|
});
|