@everymatrix/user-action-controller 1.44.0 → 1.45.2

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 (50) hide show
  1. package/dist/cjs/app-globals-3a1e7e63.js +5 -0
  2. package/dist/cjs/index-c5061e5a.js +1315 -0
  3. package/dist/cjs/loader.cjs.js +7 -13
  4. package/dist/cjs/player-user-consents_2.cjs.entry.js +457 -495
  5. package/dist/cjs/user-action-controller.cjs.js +17 -11
  6. package/dist/collection/collection-manifest.json +3 -3
  7. package/dist/collection/components/user-action-controller/index.js +1 -0
  8. package/dist/collection/components/user-action-controller/user-action-controller.js +408 -414
  9. package/dist/collection/utils/locale.utils.js +70 -70
  10. package/dist/collection/utils/utils.js +1 -1
  11. package/dist/esm/app-globals-0f993ce5.js +3 -0
  12. package/dist/esm/index-02b86e76.js +1288 -0
  13. package/dist/esm/loader.js +7 -13
  14. package/dist/esm/player-user-consents_2.entry.js +457 -495
  15. package/dist/esm/user-action-controller.js +14 -11
  16. package/dist/stencil.config.dev.js +17 -0
  17. package/dist/stencil.config.js +14 -19
  18. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.d.ts +2 -0
  19. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/user-action-controller/.stencil/packages/stencil/user-action-controller/stencil.config.dev.d.ts +2 -0
  20. package/dist/types/components/user-action-controller/index.d.ts +1 -0
  21. package/dist/types/components/user-action-controller/user-action-controller.d.ts +68 -68
  22. package/dist/types/stencil-public-runtime.d.ts +142 -33
  23. package/dist/user-action-controller/p-b996e8b8.js +2 -0
  24. package/dist/user-action-controller/p-d7fbd383.entry.js +1 -0
  25. package/dist/user-action-controller/p-e1255160.js +1 -0
  26. package/dist/user-action-controller/user-action-controller.esm.js +1 -1
  27. package/loader/cdn.js +1 -3
  28. package/loader/index.cjs.js +1 -3
  29. package/loader/index.d.ts +13 -1
  30. package/loader/index.es2017.js +1 -3
  31. package/loader/index.js +1 -3
  32. package/loader/package.json +1 -0
  33. package/package.json +9 -2
  34. package/dist/cjs/index-87049e21.js +0 -1300
  35. package/dist/components/index.d.ts +0 -26
  36. package/dist/components/index.js +0 -1
  37. package/dist/components/player-user-consents.js +0 -6
  38. package/dist/components/player-user-consents2.js +0 -257
  39. package/dist/components/user-action-controller.d.ts +0 -11
  40. package/dist/components/user-action-controller.js +0 -365
  41. package/dist/esm/index-71f14530.js +0 -1274
  42. package/dist/esm/polyfills/core-js.js +0 -11
  43. package/dist/esm/polyfills/css-shim.js +0 -1
  44. package/dist/esm/polyfills/dom.js +0 -79
  45. package/dist/esm/polyfills/es5-html-element.js +0 -1
  46. package/dist/esm/polyfills/index.js +0 -34
  47. package/dist/esm/polyfills/system.js +0 -6
  48. package/dist/types/Users/adrian.pripon/Documents/Work/widgets-stencil/packages/user-action-controller/.stencil/packages/user-action-controller/stencil.config.d.ts +0 -2
  49. package/dist/user-action-controller/p-2dc9103a.entry.js +0 -1
  50. package/dist/user-action-controller/p-ba444709.js +0 -1
@@ -1,79 +1,79 @@
1
1
  const DEFAULT_LANGUAGE = 'en';
2
2
  const TRANSLATIONS = {
3
- en: {
4
- termsAndConditionsTitle: 'Terms and Conditions',
5
- smsTitle: 'SMS marketing',
6
- emailMarketingTitle: 'Email marketing',
7
- privacyPolicyTitle: 'Privacy Policy',
8
- userNoticeText: 'Before you can proceed you must consent to the following',
9
- submitButtonText: 'Submit'
10
- },
11
- ro: {
12
- termsAndConditionsTitle: 'Termeni şi condiţii',
13
- smsTitle: 'SMS marketing',
14
- emailMarketingTitle: 'Email marketing',
15
- privacyPolicyTitle: 'Privacy Policy',
16
- userNoticeText: 'Before you can proceed you must consent to the following',
17
- submitButtonText: 'Submit'
18
- },
19
- hr: {
20
- termsAndConditionsTitle: 'Opći uvjeti i odredbe',
21
- smsTitle: 'SMS makretinški sadržaj',
22
- emailMarketingTitle: 'E-mail makretinški sadržaj',
23
- privacyPolicyTitle: 'Politika Privatnosti',
24
- userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
25
- submitButtonText: 'Pošalji'
26
- },
27
- fr: {
28
- termsAndConditionsTitle: 'Terms and Conditions',
29
- smsTitle: 'SMS marketing',
30
- emailMarketingTitle: 'Email marketing',
31
- privacyPolicyTitle: 'Privacy Policy',
32
- userNoticeText: 'Before you can proceed you must consent to the following',
33
- submitButtonText: 'Submit'
34
- },
35
- cs: {
36
- termsAndConditionsTitle: 'Terms and Conditions',
37
- smsTitle: 'SMS marketing',
38
- emailMarketingTitle: 'Email marketing',
39
- privacyPolicyTitle: 'Privacy Policy',
40
- userNoticeText: 'Before you can proceed you must consent to the following',
41
- submitButtonText: 'Submit'
42
- },
43
- de: {
44
- termsAndConditionsTitle: 'Terms and Conditions',
45
- smsTitle: 'SMS marketing',
46
- emailMarketingTitle: 'Email marketing',
47
- privacyPolicyTitle: 'Privacy Policy',
48
- userNoticeText: 'Before you can proceed you must consent to the following',
49
- submitButtonText: 'Submit'
50
- },
3
+ en: {
4
+ termsAndConditionsTitle: 'Terms and Conditions',
5
+ smsTitle: 'SMS marketing',
6
+ emailMarketingTitle: 'Email marketing',
7
+ privacyPolicyTitle: 'Privacy Policy',
8
+ userNoticeText: 'Before you can proceed you must consent to the following',
9
+ submitButtonText: 'Submit'
10
+ },
11
+ ro: {
12
+ termsAndConditionsTitle: 'Termeni şi condiţii',
13
+ smsTitle: 'SMS marketing',
14
+ emailMarketingTitle: 'Email marketing',
15
+ privacyPolicyTitle: 'Privacy Policy',
16
+ userNoticeText: 'Before you can proceed you must consent to the following',
17
+ submitButtonText: 'Submit'
18
+ },
19
+ hr: {
20
+ termsAndConditionsTitle: 'Opći uvjeti i odredbe',
21
+ smsTitle: 'SMS makretinški sadržaj',
22
+ emailMarketingTitle: 'E-mail makretinški sadržaj',
23
+ privacyPolicyTitle: 'Politika Privatnosti',
24
+ userNoticeText: 'Prije nego što možete nastaviti, morate pristati na sljedeće',
25
+ submitButtonText: 'Pošalji'
26
+ },
27
+ fr: {
28
+ termsAndConditionsTitle: 'Terms and Conditions',
29
+ smsTitle: 'SMS marketing',
30
+ emailMarketingTitle: 'Email marketing',
31
+ privacyPolicyTitle: 'Privacy Policy',
32
+ userNoticeText: 'Before you can proceed you must consent to the following',
33
+ submitButtonText: 'Submit'
34
+ },
35
+ cs: {
36
+ termsAndConditionsTitle: 'Terms and Conditions',
37
+ smsTitle: 'SMS marketing',
38
+ emailMarketingTitle: 'Email marketing',
39
+ privacyPolicyTitle: 'Privacy Policy',
40
+ userNoticeText: 'Before you can proceed you must consent to the following',
41
+ submitButtonText: 'Submit'
42
+ },
43
+ de: {
44
+ termsAndConditionsTitle: 'Terms and Conditions',
45
+ smsTitle: 'SMS marketing',
46
+ emailMarketingTitle: 'Email marketing',
47
+ privacyPolicyTitle: 'Privacy Policy',
48
+ userNoticeText: 'Before you can proceed you must consent to the following',
49
+ submitButtonText: 'Submit'
50
+ },
51
51
  };
52
52
  export const getTranslations = (url) => {
53
- return new Promise((resolve) => {
54
- fetch(url)
55
- .then((res) => res.json())
56
- .then((data) => {
57
- Object.keys(data).forEach((lang) => {
58
- if (!TRANSLATIONS[lang]) {
59
- TRANSLATIONS[lang] = {};
60
- }
61
- for (let key in data[lang]) {
62
- TRANSLATIONS[lang][key] = data[lang][key];
63
- }
64
- });
65
- resolve(true);
53
+ return new Promise((resolve) => {
54
+ fetch(url)
55
+ .then((res) => res.json())
56
+ .then((data) => {
57
+ Object.keys(data).forEach((lang) => {
58
+ if (!TRANSLATIONS[lang]) {
59
+ TRANSLATIONS[lang] = {};
60
+ }
61
+ for (let key in data[lang]) {
62
+ TRANSLATIONS[lang][key] = data[lang][key];
63
+ }
64
+ });
65
+ resolve(true);
66
+ });
66
67
  });
67
- });
68
68
  };
69
69
  export const translate = (key, customLang, values) => {
70
- const lang = customLang;
71
- let translation = TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
72
- if (values !== undefined) {
73
- for (const [key, value] of Object.entries(values.values)) {
74
- const regex = new RegExp(`{${key}}`, 'g');
75
- translation = translation.replace(regex, value);
70
+ const lang = customLang;
71
+ let translation = TRANSLATIONS[(lang !== undefined) && (lang in TRANSLATIONS) ? lang : DEFAULT_LANGUAGE][key];
72
+ if (values !== undefined) {
73
+ for (const [key, value] of Object.entries(values.values)) {
74
+ const regex = new RegExp(`{${key}}`, 'g');
75
+ translation = translation.replace(regex, value);
76
+ }
76
77
  }
77
- }
78
- return translation;
78
+ return translation;
79
79
  };
@@ -1,3 +1,3 @@
1
1
  export function format(first, middle, last) {
2
- return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
2
+ return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
3
3
  }
@@ -0,0 +1,3 @@
1
+ const globalScripts = () => {};
2
+
3
+ export { globalScripts as g };