@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.
Files changed (213) hide show
  1. package/dist/components/consent-manager-dialog/__tests__/styles.spec.cjs +41 -20
  2. package/dist/components/consent-manager-dialog/__tests__/styles.spec.js +34 -6
  3. package/dist/components/consent-manager-dialog/atoms/dialog-card.cjs +67 -32
  4. package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts +9 -3
  5. package/dist/components/consent-manager-dialog/atoms/dialog-card.d.ts.map +1 -1
  6. package/dist/components/consent-manager-dialog/atoms/dialog-card.js +26 -12
  7. package/dist/components/consent-manager-dialog/atoms/overlay.cjs +20 -19
  8. package/dist/components/consent-manager-dialog/atoms/overlay.d.ts.map +1 -1
  9. package/dist/components/consent-manager-dialog/atoms/overlay.js +7 -4
  10. package/dist/components/consent-manager-dialog/consent-manager-dialog.cjs +20 -16
  11. package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts +0 -2
  12. package/dist/components/consent-manager-dialog/consent-manager-dialog.d.ts.map +1 -1
  13. package/dist/components/consent-manager-dialog/consent-manager-dialog.js +10 -2
  14. package/dist/components/consent-manager-dialog/consent-manager-dialog.module.cjs +12 -10
  15. package/dist/components/consent-manager-dialog/consent-manager-dialog.module.js +4 -2
  16. package/dist/components/consent-manager-dialog/consent-manager-dialog_module.css +29 -15
  17. package/dist/components/consent-manager-dialog/index.cjs +43 -17
  18. package/dist/components/consent-manager-dialog/theme.cjs +3 -4
  19. package/dist/components/consent-manager-widget/__tests__/styles.spec.cjs +41 -20
  20. package/dist/components/consent-manager-widget/__tests__/styles.spec.js +34 -6
  21. package/dist/components/consent-manager-widget/atoms/accordion.cjs +50 -24
  22. package/dist/components/consent-manager-widget/atoms/accordion.d.ts.map +1 -1
  23. package/dist/components/consent-manager-widget/atoms/button.cjs +27 -13
  24. package/dist/components/consent-manager-widget/atoms/footer.cjs +19 -17
  25. package/dist/components/consent-manager-widget/atoms/root.cjs +10 -8
  26. package/dist/components/consent-manager-widget/consent-manager-widget.cjs +11 -22
  27. package/dist/components/consent-manager-widget/consent-manager-widget.d.ts.map +1 -1
  28. package/dist/components/consent-manager-widget/consent-manager-widget.js +3 -14
  29. package/dist/components/consent-manager-widget/consent-manager-widget.module.cjs +12 -13
  30. package/dist/components/consent-manager-widget/consent-manager-widget.module.js +4 -5
  31. package/dist/components/consent-manager-widget/consent-manager-widget_module.css +24 -29
  32. package/dist/components/consent-manager-widget/index.cjs +87 -29
  33. package/dist/components/consent-manager-widget/theme.cjs +3 -4
  34. package/dist/components/consent-manager-widget/types.cjs +3 -4
  35. package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.cjs +189 -0
  36. package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.d.ts +2 -0
  37. package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.d.ts.map +1 -0
  38. package/dist/components/cookie-banner/__tests__/cookie-banner.e2e.test.js +183 -0
  39. package/dist/components/cookie-banner/__tests__/styles.spec.cjs +35 -20
  40. package/dist/components/cookie-banner/__tests__/styles.spec.js +28 -6
  41. package/dist/components/cookie-banner/atoms/overlay.cjs +18 -18
  42. package/dist/components/cookie-banner/atoms/overlay.d.ts.map +1 -1
  43. package/dist/components/cookie-banner/atoms/overlay.js +7 -5
  44. package/dist/components/cookie-banner/atoms/root.cjs +17 -17
  45. package/dist/components/cookie-banner/atoms/root.d.ts +14 -0
  46. package/dist/components/cookie-banner/atoms/root.d.ts.map +1 -1
  47. package/dist/components/cookie-banner/atoms/root.js +6 -4
  48. package/dist/components/cookie-banner/components.cjs +69 -28
  49. package/dist/components/cookie-banner/components.d.ts.map +1 -1
  50. package/dist/components/cookie-banner/components.js +14 -3
  51. package/dist/components/cookie-banner/cookie-banner.cjs +11 -9
  52. package/dist/components/cookie-banner/cookie-banner.d.ts +12 -0
  53. package/dist/components/cookie-banner/cookie-banner.d.ts.map +1 -1
  54. package/dist/components/cookie-banner/cookie-banner.js +3 -1
  55. package/dist/components/cookie-banner/cookie-banner.module.cjs +10 -10
  56. package/dist/components/cookie-banner/cookie-banner.module.js +2 -2
  57. package/dist/components/cookie-banner/cookie-banner_module.css +7 -7
  58. package/dist/components/cookie-banner/error-boundary.cjs +8 -9
  59. package/dist/components/cookie-banner/error-boundary.d.ts +1 -1
  60. package/dist/components/cookie-banner/error-boundary.js +0 -1
  61. package/dist/components/cookie-banner/index.cjs +65 -23
  62. package/dist/components/cookie-banner/theme.cjs +3 -4
  63. package/dist/components/shared/libs/polymorphic.cjs +3 -4
  64. package/dist/components/shared/libs/polymorphic.d.ts +1 -7
  65. package/dist/components/shared/libs/polymorphic.d.ts.map +1 -1
  66. package/dist/components/shared/libs/recursive-clone-children.cjs +8 -8
  67. package/dist/components/shared/primitives/box.cjs +10 -10
  68. package/dist/components/shared/primitives/box.d.ts.map +1 -1
  69. package/dist/components/shared/primitives/box.js +3 -3
  70. package/dist/components/shared/primitives/button.cjs +9 -9
  71. package/dist/components/shared/primitives/button.d.ts +2 -102
  72. package/dist/components/shared/primitives/button.d.ts.map +1 -1
  73. package/dist/components/shared/primitives/button.js +2 -2
  74. package/dist/components/shared/primitives/button.types.cjs +3 -4
  75. package/dist/components/shared/primitives/button.types.d.ts +1 -8
  76. package/dist/components/shared/primitives/button.types.d.ts.map +1 -1
  77. package/dist/components/shared/ui/accordion/accordion.cjs +25 -17
  78. package/dist/components/shared/ui/accordion/accordion.d.ts.map +1 -1
  79. package/dist/components/shared/ui/accordion/accordion.js +8 -8
  80. package/dist/components/shared/ui/accordion/accordion.module.cjs +11 -11
  81. package/dist/components/shared/ui/accordion/accordion.module.js +3 -3
  82. package/dist/components/shared/ui/accordion/accordion.types.cjs +3 -4
  83. package/dist/components/shared/ui/accordion/accordion.types.d.ts +0 -10
  84. package/dist/components/shared/ui/accordion/accordion.types.d.ts.map +1 -1
  85. package/dist/components/shared/ui/accordion/accordion_module.css +39 -19
  86. package/dist/components/shared/ui/accordion/index.cjs +7 -14
  87. package/dist/components/shared/ui/button/button.cjs +16 -16
  88. package/dist/components/shared/ui/button/button.d.ts +4 -204
  89. package/dist/components/shared/ui/button/button.d.ts.map +1 -1
  90. package/dist/components/shared/ui/button/button.module.cjs +10 -10
  91. package/dist/components/shared/ui/button/button.module.js +2 -2
  92. package/dist/components/shared/ui/button/button.types.cjs +3 -4
  93. package/dist/components/shared/ui/button/button_module.css +40 -19
  94. package/dist/components/shared/ui/button/index.cjs +7 -14
  95. package/dist/components/shared/ui/icon.cjs +8 -8
  96. package/dist/components/shared/ui/icon.d.ts.map +1 -1
  97. package/dist/components/shared/ui/logo.cjs +43 -54
  98. package/dist/components/shared/ui/logo.d.ts +3 -2
  99. package/dist/components/shared/ui/logo.d.ts.map +1 -1
  100. package/dist/components/shared/ui/logo.js +32 -46
  101. package/dist/components/shared/ui/switch/index.cjs +7 -14
  102. package/dist/components/shared/ui/switch/switch.cjs +11 -15
  103. package/dist/components/shared/ui/switch/switch.d.ts.map +1 -1
  104. package/dist/components/shared/ui/switch/switch.js +3 -3
  105. package/dist/components/shared/ui/switch/switch.module.cjs +10 -10
  106. package/dist/components/shared/ui/switch/switch.module.js +2 -2
  107. package/dist/components/shared/ui/switch/switch.types.cjs +3 -4
  108. package/dist/components/shared/ui/switch/switch_module.css +32 -10
  109. package/dist/context/consent-manager-context.cjs +9 -9
  110. package/dist/context/consent-manager-context.d.ts +29 -10
  111. package/dist/context/consent-manager-context.d.ts.map +1 -1
  112. package/dist/context/consent-manager-context.js +1 -1
  113. package/dist/context/theme-context.cjs +17 -9
  114. package/dist/context/theme-context.d.ts +16 -1
  115. package/dist/context/theme-context.d.ts.map +1 -1
  116. package/dist/context/theme-context.js +7 -1
  117. package/dist/hooks/__tests__/use-consent-manager.test.cjs +76 -0
  118. package/dist/hooks/__tests__/use-consent-manager.test.d.ts +2 -0
  119. package/dist/hooks/__tests__/use-consent-manager.test.d.ts.map +1 -0
  120. package/dist/hooks/__tests__/use-consent-manager.test.js +70 -0
  121. package/dist/hooks/__tests__/use-styles.test.cjs +76 -0
  122. package/dist/hooks/__tests__/use-styles.test.d.ts +2 -0
  123. package/dist/hooks/__tests__/use-styles.test.d.ts.map +1 -0
  124. package/dist/hooks/__tests__/use-styles.test.js +70 -0
  125. package/dist/hooks/__tests__/use-theme.test.cjs +86 -0
  126. package/dist/hooks/__tests__/use-theme.test.d.ts +2 -0
  127. package/dist/hooks/__tests__/use-theme.test.d.ts.map +1 -0
  128. package/dist/hooks/__tests__/use-theme.test.js +80 -0
  129. package/dist/hooks/index.cjs +23 -21
  130. package/dist/hooks/index.d.ts +1 -0
  131. package/dist/hooks/index.d.ts.map +1 -1
  132. package/dist/hooks/index.js +18 -1
  133. package/dist/hooks/use-color-scheme.cjs +66 -0
  134. package/dist/hooks/use-color-scheme.d.ts +16 -0
  135. package/dist/hooks/use-color-scheme.d.ts.map +1 -0
  136. package/dist/hooks/use-color-scheme.js +32 -0
  137. package/dist/hooks/use-consent-manager.cjs +13 -9
  138. package/dist/hooks/use-consent-manager.d.ts +13 -5
  139. package/dist/hooks/use-consent-manager.d.ts.map +1 -1
  140. package/dist/hooks/use-consent-manager.js +5 -1
  141. package/dist/hooks/use-focus-trap.cjs +76 -0
  142. package/dist/hooks/use-focus-trap.d.ts +15 -0
  143. package/dist/hooks/use-focus-trap.d.ts.map +1 -0
  144. package/dist/hooks/use-focus-trap.js +42 -0
  145. package/dist/hooks/use-scroll-lock.cjs +55 -0
  146. package/dist/hooks/use-scroll-lock.d.ts +26 -0
  147. package/dist/hooks/use-scroll-lock.d.ts.map +1 -0
  148. package/dist/hooks/use-scroll-lock.js +21 -0
  149. package/dist/{utils → hooks}/use-styles.cjs +13 -13
  150. package/dist/{utils → hooks}/use-styles.d.ts.map +1 -1
  151. package/dist/{utils → hooks}/use-styles.js +5 -5
  152. package/dist/hooks/use-theme.cjs +10 -12
  153. package/dist/hooks/use-theme.d.ts.map +1 -1
  154. package/dist/hooks/use-theme.js +2 -4
  155. package/dist/hooks/use-translations.cjs +8 -8
  156. package/dist/index.cjs +66 -30
  157. package/dist/index.d.ts +9 -10
  158. package/dist/index.d.ts.map +1 -1
  159. package/dist/index.js +12 -4
  160. package/dist/providers/__tests__/provider-basic.test.cjs +127 -0
  161. package/dist/providers/__tests__/provider-basic.test.d.ts +2 -0
  162. package/dist/providers/__tests__/provider-basic.test.d.ts.map +1 -0
  163. package/dist/providers/__tests__/provider-basic.test.js +121 -0
  164. package/dist/providers/__tests__/provider-context.test.cjs +139 -0
  165. package/dist/providers/__tests__/provider-context.test.d.ts +2 -0
  166. package/dist/providers/__tests__/provider-context.test.d.ts.map +1 -0
  167. package/dist/providers/__tests__/provider-context.test.js +133 -0
  168. package/dist/providers/__tests__/provider-errors.test.cjs +98 -0
  169. package/dist/providers/__tests__/provider-errors.test.d.ts +2 -0
  170. package/dist/providers/__tests__/provider-errors.test.d.ts.map +1 -0
  171. package/dist/providers/__tests__/provider-errors.test.js +92 -0
  172. package/dist/providers/__tests__/test-helpers.cjs +171 -0
  173. package/dist/providers/__tests__/test-helpers.d.ts +6 -0
  174. package/dist/providers/__tests__/test-helpers.d.ts.map +1 -0
  175. package/dist/providers/__tests__/test-helpers.js +134 -0
  176. package/dist/providers/consent-manager-provider.cjs +95 -38
  177. package/dist/providers/consent-manager-provider.d.ts +16 -2
  178. package/dist/providers/consent-manager-provider.d.ts.map +1 -1
  179. package/dist/providers/consent-manager-provider.js +87 -30
  180. package/dist/types/consent-manager.cjs +3 -4
  181. package/dist/types/consent-manager.d.ts +47 -72
  182. package/dist/types/consent-manager.d.ts.map +1 -1
  183. package/dist/types/theme/index.cjs +7 -14
  184. package/dist/types/theme/style-keys.cjs +3 -4
  185. package/dist/types/theme/style-types.cjs +3 -4
  186. package/dist/utils/cn.cjs +10 -16
  187. package/dist/utils/cn.d.ts +1 -5
  188. package/dist/utils/cn.d.ts.map +1 -1
  189. package/dist/utils/cn.js +1 -2
  190. package/dist/utils/merge-styles.cjs +8 -8
  191. package/dist/utils/test-helpers.cjs +70 -0
  192. package/dist/utils/test-helpers.d.ts +30 -0
  193. package/dist/utils/test-helpers.d.ts.map +1 -0
  194. package/dist/utils/test-helpers.js +33 -0
  195. package/dist/utils/translations.cjs +12 -8
  196. package/package.json +17 -12
  197. package/dist/components/consent-manager-dialog/__tests__/utils.cjs +0 -68
  198. package/dist/components/consent-manager-dialog/__tests__/utils.d.ts +0 -13
  199. package/dist/components/consent-manager-dialog/__tests__/utils.d.ts.map +0 -1
  200. package/dist/components/consent-manager-dialog/__tests__/utils.js +0 -34
  201. package/dist/components/consent-manager-widget/__tests__/utils.cjs +0 -68
  202. package/dist/components/consent-manager-widget/__tests__/utils.d.ts +0 -13
  203. package/dist/components/consent-manager-widget/__tests__/utils.d.ts.map +0 -1
  204. package/dist/components/consent-manager-widget/__tests__/utils.js +0 -34
  205. package/dist/components/consent-manager-widget/atoms/logo.cjs +0 -101
  206. package/dist/components/consent-manager-widget/atoms/logo.d.ts +0 -8
  207. package/dist/components/consent-manager-widget/atoms/logo.d.ts.map +0 -1
  208. package/dist/components/consent-manager-widget/atoms/logo.js +0 -67
  209. package/dist/components/cookie-banner/__tests__/utils.cjs +0 -67
  210. package/dist/components/cookie-banner/__tests__/utils.d.ts +0 -13
  211. package/dist/components/cookie-banner/__tests__/utils.d.ts.map +0 -1
  212. package/dist/components/cookie-banner/__tests__/utils.js +0 -33
  213. /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 = function(exports1, definition) {
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 = function(obj, prop) {
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 = function(exports1) {
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
- function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceSettings, namespace = 'c15tStore', noStyle = false, translationConfig, trackingBlockerConfig, theme, disableAnimation = false }) {
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 store = (0, external_react_namespaceObject.useMemo)(()=>{
50
- const store = (0, external_c15t_namespaceObject.createConsentManagerStore)(namespace, {
51
- trackingBlockerConfig
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
- store.getState().setTranslationConfig(preparedTranslationConfig);
54
- return store;
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
- namespace,
98
+ consentManager,
99
+ isConsentDomain,
57
100
  preparedTranslationConfig,
58
- trackingBlockerConfig
101
+ store,
102
+ backendURL,
103
+ mode
59
104
  ]);
60
- const [state, setState] = (0, external_react_namespaceObject.useState)(store.getState());
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
- const { setGdprTypes, setComplianceSetting, setDetectedCountry } = store.getState();
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 = store.subscribe((newState)=>{
68
- setState(newState);
69
- });
70
- return ()=>{
71
- unsubscribe();
72
- };
116
+ const unsubscribe = consentStore.subscribe(setState);
117
+ return unsubscribe;
73
118
  }, [
74
- store,
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
- disableAnimation
125
+ noStyle,
126
+ disableAnimation,
127
+ scrollLock,
128
+ trapFocus
89
129
  }), [
90
- noStyle,
91
130
  theme,
92
- disableAnimation
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: contextValue,
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
- var __webpack_export_target__ = exports;
103
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
104
- if (__webpack_exports__.__esModule) Object.defineProperty(__webpack_export_target__, '__esModule', {
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
- * - Injecting default styles (unless noStyle is true)
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, initialGdprTypes, initialComplianceSettings, namespace, noStyle, translationConfig, trackingBlockerConfig, theme, disableAnimation, }: ConsentManagerProviderProps): import("react/jsx-runtime").JSX.Element;
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":"AAUA,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAQ5E;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CAAC,EACtC,QAAQ,EACR,gBAAgB,EAChB,yBAAyB,EACzB,SAAuB,EACvB,OAAe,EACf,iBAAiB,EACjB,qBAAqB,EACrB,KAAK,EACL,gBAAwB,GACxB,EAAE,2BAA2B,2CAyF7B"}
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
- function ConsentManagerProvider({ children, initialGdprTypes, initialComplianceSettings, namespace = 'c15tStore', noStyle = false, translationConfig, trackingBlockerConfig, theme, disableAnimation = false }) {
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 store = (0, __WEBPACK_EXTERNAL_MODULE_react__.useMemo)(()=>{
20
- const store = (0, __WEBPACK_EXTERNAL_MODULE_c15t__.createConsentManagerStore)(namespace, {
21
- trackingBlockerConfig
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
- namespace,
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
- trackingBlockerConfig
73
+ store,
74
+ backendURL,
75
+ mode
29
76
  ]);
30
- const [state, setState] = (0, __WEBPACK_EXTERNAL_MODULE_react__.useState)(store.getState());
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
- const { setGdprTypes, setComplianceSetting, setDetectedCountry } = store.getState();
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 = store.subscribe((newState)=>{
38
- setState(newState);
39
- });
40
- return ()=>{
41
- unsubscribe();
42
- };
88
+ const unsubscribe = consentStore.subscribe(setState);
89
+ return unsubscribe;
43
90
  }, [
44
- store,
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
- disableAnimation
97
+ noStyle,
98
+ disableAnimation,
99
+ scrollLock,
100
+ trapFocus
59
101
  }), [
60
- noStyle,
61
102
  theme,
62
- disableAnimation
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: contextValue,
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 = function(exports1) {
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 __webpack_export_target__ = exports;
16
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
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
- import type { AllConsentNames, ComplianceRegion, ComplianceSettings, NamespaceProps, PrivacyConsentState, TrackingBlockerConfig, TranslationConfig, createConsentManagerStore } from 'c15t';
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
- * Configuration options for the ConsentManagerProvider component.
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 ConsentManagerProviderProps extends NamespaceProps {
10
+ export interface ReactUIOptions {
15
11
  /**
16
- * @remarks
17
- * React elements to be rendered within the consent manager context.
12
+ * Visual theme to apply.
18
13
  */
19
- children: ReactNode;
14
+ theme?: 'light' | 'dark';
20
15
  /**
21
- * @remarks
22
- * Array of consent types to be pre-configured for GDPR compliance.
23
- * These types define what kinds of cookies and tracking are initially allowed.
16
+ * Whether to disable animations.
17
+ * @default false
24
18
  */
25
- initialGdprTypes?: AllConsentNames[];
19
+ disableAnimation?: boolean;
26
20
  /**
27
- * @remarks
28
- * Region-specific compliance settings that define how the consent manager
29
- * should behave in different geographical regions.
21
+ * Whether to lock scroll when dialogs are open.
22
+ * @default false
30
23
  */
31
- initialComplianceSettings?: Record<ComplianceRegion, ComplianceSettings>;
24
+ scrollLock?: boolean;
32
25
  /**
33
- * @remarks
34
- * Whether to skip injecting default styles
35
- * @default false
26
+ * Whether to trap focus within dialogs.
27
+ * @default true
36
28
  */
37
- noStyle?: boolean;
29
+ trapFocus?: boolean;
30
+ /**
31
+ * Color scheme preference.
32
+ * @default 'system'
33
+ */
34
+ colorScheme?: 'light' | 'dark' | 'system';
38
35
  /**
39
- * @remarks
40
- * Whether to disable animations
36
+ * Whether to disable default styles.
41
37
  * @default false
42
38
  */
43
- disableAnimation?: boolean;
39
+ noStyle?: boolean;
40
+ }
41
+ /**
42
+ * Extended configuration options for the React consent manager
43
+ */
44
+ export type ConsentManagerOptions = CoreOptions & {
44
45
  /**
45
- * @remarks
46
- * Theme configuration for the consent manager
46
+ * React-specific UI configuration options
47
47
  */
48
- theme?: CookieBannerTheme & ConsentManagerDialogTheme;
48
+ react?: ReactUIOptions;
49
49
  /**
50
- * @remarks
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
- translationConfig?: Partial<TranslationConfig>;
78
- trackingBlockerConfig?: TrackingBlockerConfig;
79
- }
52
+ translations?: Partial<TranslationConfig>;
53
+ };
80
54
  /**
81
- * Internal context value interface for the consent manager.
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
- * @internal
57
+ * @public
88
58
  */
89
- export interface ConsentManagerContextValue {
90
- /** Current privacy consent state */
91
- state: PrivacyConsentState;
92
- /** Store instance for managing consent state */
93
- store: ReturnType<typeof createConsentManagerStore>;
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,eAAe,EACf,gBAAgB,EAChB,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,qBAAqB,EACrB,iBAAiB,EACjB,yBAAyB,EACzB,MAAM,MAAM,CAAC;AACd,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,4CAA4C,CAAC;AAC5F,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAE3E;;;;;;;;GAQG;AACH,MAAM,WAAW,2BAA4B,SAAQ,cAAc;IAClE;;;OAGG;IACH,QAAQ,EAAE,SAAS,CAAC;IAEpB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,eAAe,EAAE,CAAC;IAErC;;;;OAIG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAC,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;IACzE;;;;OAIG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;OAIG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;OAGG;IACH,KAAK,CAAC,EAAE,iBAAiB,GAAG,yBAAyB,CAAC;IAEtD;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACH,iBAAiB,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE/C,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;CAC9C;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,0BAA0B;IAC1C,oCAAoC;IACpC,KAAK,EAAE,mBAAmB,CAAC;IAC3B,gDAAgD;IAChD,KAAK,EAAE,UAAU,CAAC,OAAO,yBAAyB,CAAC,CAAC;CACpD"}
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 = function(module) {
22
- var getter = module && module.__esModule ? function() {
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 = function(exports1, definition) {
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 = function(obj, prop) {
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 = function(exports1) {
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 __webpack_export_target__ = exports;
73
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
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 = function(exports1) {
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 __webpack_export_target__ = exports;
16
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
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 = function(exports1) {
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 __webpack_export_target__ = exports;
16
- for(var __webpack_i__ in __webpack_exports__)__webpack_export_target__[__webpack_i__] = __webpack_exports__[__webpack_i__];
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
  });