@everymatrix/player-user-consents 1.0.69

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 (44) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-69db8b9e.js +1229 -0
  3. package/dist/cjs/index.cjs.js +2 -0
  4. package/dist/cjs/loader.cjs.js +15 -0
  5. package/dist/cjs/player-user-consents.cjs.entry.js +209 -0
  6. package/dist/cjs/player-user-consents.cjs.js +25 -0
  7. package/dist/collection/collection-manifest.json +12 -0
  8. package/dist/collection/components/player-user-consents/index.js +1 -0
  9. package/dist/collection/components/player-user-consents/player-user-consents.css +28 -0
  10. package/dist/collection/components/player-user-consents/player-user-consents.js +258 -0
  11. package/dist/collection/index.js +1 -0
  12. package/dist/collection/utils/locale.utils.js +125 -0
  13. package/dist/collection/utils/utils.js +0 -0
  14. package/dist/esm/app-globals-0f993ce5.js +3 -0
  15. package/dist/esm/index-cea90c73.js +1202 -0
  16. package/dist/esm/index.js +1 -0
  17. package/dist/esm/loader.js +11 -0
  18. package/dist/esm/player-user-consents.entry.js +205 -0
  19. package/dist/esm/player-user-consents.js +20 -0
  20. package/dist/index.cjs.js +1 -0
  21. package/dist/index.js +1 -0
  22. package/dist/player-user-consents/index.esm.js +0 -0
  23. package/dist/player-user-consents/p-1e483854.js +2 -0
  24. package/dist/player-user-consents/p-c528b18d.entry.js +1 -0
  25. package/dist/player-user-consents/p-e1255160.js +1 -0
  26. package/dist/player-user-consents/player-user-consents.esm.js +1 -0
  27. package/dist/stencil.config.dev.js +17 -0
  28. package/dist/stencil.config.js +17 -0
  29. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.d.ts +2 -0
  30. package/dist/types/Users/raul.vasile/workspace/everymatrix/widgets-monorepo/packages/stencil/player-user-consents/.stencil/packages/stencil/player-user-consents/stencil.config.dev.d.ts +2 -0
  31. package/dist/types/components/player-user-consents/index.d.ts +1 -0
  32. package/dist/types/components/player-user-consents/player-user-consents.d.ts +52 -0
  33. package/dist/types/components.d.ts +117 -0
  34. package/dist/types/index.d.ts +1 -0
  35. package/dist/types/stencil-public-runtime.d.ts +1674 -0
  36. package/dist/types/utils/locale.utils.d.ts +2 -0
  37. package/dist/types/utils/utils.d.ts +0 -0
  38. package/loader/cdn.js +1 -0
  39. package/loader/index.cjs.js +1 -0
  40. package/loader/index.d.ts +24 -0
  41. package/loader/index.es2017.js +1 -0
  42. package/loader/index.js +2 -0
  43. package/loader/package.json +11 -0
  44. package/package.json +26 -0
@@ -0,0 +1,125 @@
1
+ const DEFAULT_LANGUAGE = 'en';
2
+ const TRANSLATIONS = {
3
+ en: {
4
+ termsAndConditions: {
5
+ acceptPart1: "I accept the ",
6
+ acceptPart2: ", I have read and understood the ",
7
+ acceptPart3: " as published on this site and confirm that I am over 18 years old.",
8
+ tc: "Terms and Conditions"
9
+ },
10
+ privacyPolicy: {
11
+ readUnderstandPart1: "I have read and understood the ",
12
+ readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
13
+ privacy: "Privacy Policy"
14
+ },
15
+ sms: "I consent to receive marketing communication via SMS.",
16
+ emailmarketing: "I consent to receive marketing communication via Email."
17
+ },
18
+ ro: {
19
+ termsAndConditions: {
20
+ acceptPart1: "Accept ",
21
+ acceptPart2: " platformei. Am citit şi înţeles ",
22
+ acceptPart3: " publicată pe acest site şi confirm că am vârstă peste 18 ani.",
23
+ tc: "Termenii şi condiţiile"
24
+ },
25
+ privacyPolicy: {
26
+ readUnderstandPart1: "Am citit şi înţeles ",
27
+ readUnderstandPart2: " publicată pe acest site şi confirm că am vârstă peste 18 ani.",
28
+ privacy: "Politica de confidenţialitate"
29
+ },
30
+ sms: "Sunt de acord să primesc promoţii de marketing prin SMS.",
31
+ emailmarketing: "Sunt de acord să primesc promoţii de marketing pe e-mail."
32
+ },
33
+ hr: {
34
+ termsAndConditions: {
35
+ acceptPart1: "I accept the ",
36
+ acceptPart2: ", I have read and understood the ",
37
+ acceptPart3: " as published on this site and confirm that I am over 18 years old.",
38
+ tc: "Terms and Conditions"
39
+ },
40
+ privacyPolicy: {
41
+ readUnderstandPart1: "I have read and understood the ",
42
+ readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
43
+ privacy: "Privacy Policy"
44
+ },
45
+ sms: "I consent to receive marketing communication via SMS.",
46
+ emailmarketing: "I consent to receive marketing communication via Email."
47
+ },
48
+ fr: {
49
+ termsAndConditions: {
50
+ acceptPart1: "I accept the ",
51
+ acceptPart2: ", I have read and understood the ",
52
+ acceptPart3: " as published on this site and confirm that I am over 18 years old.",
53
+ tc: "Terms and Conditions"
54
+ },
55
+ privacyPolicy: {
56
+ readUnderstandPart1: "I have read and understood the ",
57
+ readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
58
+ privacy: "Privacy Policy"
59
+ },
60
+ sms: "I consent to receive marketing communication via SMS.",
61
+ emailmarketing: "I consent to receive marketing communication via Email."
62
+ },
63
+ cs: {
64
+ termsAndConditions: {
65
+ acceptPart1: "I accept the ",
66
+ acceptPart2: ", I have read and understood the ",
67
+ acceptPart3: " as published on this site and confirm that I am over 18 years old.",
68
+ tc: "Terms and Conditions"
69
+ },
70
+ privacyPolicy: {
71
+ readUnderstandPart1: "I have read and understood the ",
72
+ readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
73
+ privacy: "Privacy Policy"
74
+ },
75
+ sms: "I consent to receive marketing communication via SMS.",
76
+ emailmarketing: "I consent to receive marketing communication via Email."
77
+ },
78
+ de: {
79
+ termsAndConditions: {
80
+ acceptPart1: "I accept the ",
81
+ acceptPart2: ", I have read and understood the ",
82
+ acceptPart3: " as published on this site and confirm that I am over 18 years old.",
83
+ tc: "Terms and Conditions"
84
+ },
85
+ privacyPolicy: {
86
+ readUnderstandPart1: "I have read and understood the ",
87
+ readUnderstandPart2: ", as published on this site and confirm that I am over 18 years old.",
88
+ privacy: "Privacy Policy"
89
+ },
90
+ sms: "I consent to receive marketing communication via SMS.",
91
+ emailmarketing: "I consent to receive marketing communication via Email."
92
+ },
93
+ };
94
+ export const getTranslations = (url) => {
95
+ // fetch url, get the data, replace the TRANSLATIONS content
96
+ return new Promise((resolve) => {
97
+ fetch(url)
98
+ .then((res) => res.json())
99
+ .then((data) => {
100
+ Object.keys(data).forEach((item) => {
101
+ for (let key in data[item]) {
102
+ TRANSLATIONS[item][key] = data[item][key];
103
+ }
104
+ });
105
+ resolve(true);
106
+ });
107
+ });
108
+ };
109
+ export const translate = (key, customLang, values) => {
110
+ const lang = customLang || DEFAULT_LANGUAGE;
111
+ const getNestedTranslation = (obj, path) => {
112
+ return path.split('.').reduce((o, k) => (o && o[k] !== undefined ? o[k] : null), obj);
113
+ };
114
+ let translation = getNestedTranslation(TRANSLATIONS[lang], key);
115
+ if (translation === null) {
116
+ return key;
117
+ }
118
+ if (values !== undefined) {
119
+ for (const [k, v] of Object.entries(values)) {
120
+ const regex = new RegExp(`{${k}}`, 'g');
121
+ translation = translation.replace(regex, v);
122
+ }
123
+ }
124
+ return translation;
125
+ };
File without changes
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };