@everymatrix/player-user-consents 1.31.1 → 1.32.4

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 (46) hide show
  1. package/LICENSE +21 -0
  2. package/package.json +3 -2
  3. package/dist/cjs/index-28f85617.js +0 -1178
  4. package/dist/cjs/index.cjs.js +0 -2
  5. package/dist/cjs/loader.cjs.js +0 -21
  6. package/dist/cjs/player-user-consents.cjs.entry.js +0 -93
  7. package/dist/cjs/player-user-consents.cjs.js +0 -19
  8. package/dist/collection/collection-manifest.json +0 -12
  9. package/dist/collection/components/player-user-consents/player-user-consents.css +0 -18
  10. package/dist/collection/components/player-user-consents/player-user-consents.js +0 -247
  11. package/dist/collection/index.js +0 -1
  12. package/dist/collection/utils/utils.js +0 -3
  13. package/dist/components/index.d.ts +0 -26
  14. package/dist/components/index.js +0 -1
  15. package/dist/components/player-user-consents.d.ts +0 -11
  16. package/dist/components/player-user-consents.js +0 -117
  17. package/dist/esm/index-6f67dd59.js +0 -1152
  18. package/dist/esm/index.js +0 -1
  19. package/dist/esm/loader.js +0 -17
  20. package/dist/esm/player-user-consents.entry.js +0 -89
  21. package/dist/esm/player-user-consents.js +0 -17
  22. package/dist/esm/polyfills/core-js.js +0 -11
  23. package/dist/esm/polyfills/css-shim.js +0 -1
  24. package/dist/esm/polyfills/dom.js +0 -79
  25. package/dist/esm/polyfills/es5-html-element.js +0 -1
  26. package/dist/esm/polyfills/index.js +0 -34
  27. package/dist/esm/polyfills/system.js +0 -6
  28. package/dist/index.cjs.js +0 -1
  29. package/dist/index.js +0 -1
  30. package/dist/player-user-consents/index.esm.js +0 -0
  31. package/dist/player-user-consents/p-0dbe810e.entry.js +0 -1
  32. package/dist/player-user-consents/p-cf852ecd.js +0 -1
  33. package/dist/player-user-consents/player-user-consents.esm.js +0 -1
  34. package/dist/stencil.config.js +0 -22
  35. package/dist/types/Users/sebastian.strulea/Documents/work/widgets-stencil/packages/player-user-consents/.stencil/packages/player-user-consents/stencil.config.d.ts +0 -2
  36. package/dist/types/components/player-user-consents/player-user-consents.d.ts +0 -45
  37. package/dist/types/components.d.ts +0 -94
  38. package/dist/types/index.d.ts +0 -1
  39. package/dist/types/stencil-public-runtime.d.ts +0 -1565
  40. package/dist/types/utils/utils.d.ts +0 -1
  41. package/loader/cdn.js +0 -3
  42. package/loader/index.cjs.js +0 -3
  43. package/loader/index.d.ts +0 -12
  44. package/loader/index.es2017.js +0 -3
  45. package/loader/index.js +0 -4
  46. package/loader/package.json +0 -10
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
@@ -1,21 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-28f85617.js');
6
-
7
- /*
8
- Stencil Client Patch Esm v2.15.2 | MIT Licensed | https://stenciljs.com
9
- */
10
- const patchEsm = () => {
11
- return index.promiseResolve();
12
- };
13
-
14
- const defineCustomElements = (win, options) => {
15
- if (typeof window === 'undefined') return Promise.resolve();
16
- return patchEsm().then(() => {
17
- return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"consentTitle":[513,"consent-title"],"tcLink":[513,"tc-link"],"privacyLink":[513,"privacy-link"],"clientStyling":[1,"client-styling"],"textContent":[32],"limitStylingAppends":[32]}]]]], options);
18
- });
19
- };
20
-
21
- exports.defineCustomElements = defineCustomElements;
@@ -1,93 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- const index = require('./index-28f85617.js');
6
-
7
- const playerUserConsentsCss = ":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.userConsent:hover{border-bottom:1px solid #000;cursor:pointer}.MandatoryItem{color:#f00;font-size:1.2rem}";
8
-
9
- const PlayerUserConsents = class {
10
- constructor(hostRef) {
11
- index.registerInstance(this, hostRef);
12
- this.userLegislationConsent = index.createEvent(this, "userLegislationConsent", 7);
13
- /**
14
- * 'true' when parent expects component to emit it's current value
15
- */
16
- this.queried = false;
17
- /**
18
- * the type of the consent, used to determine render details
19
- */
20
- this.consentType = '';
21
- /**
22
- * wether or not this consent is mandatory. Used for render details
23
- */
24
- this.mandatory = false;
25
- /**
26
- * the title of the consent to be displayed
27
- */
28
- this.consentTitle = '';
29
- /**
30
- * link to the t&c page
31
- */
32
- this.tcLink = '#';
33
- /**
34
- * link to privacy policy page
35
- */
36
- this.privacyLink = '#';
37
- /**
38
- * Client custom styling via inline style
39
- */
40
- this.clientStyling = '';
41
- /**
42
- * the text content to be rendered by the component. Determined at runtime
43
- */
44
- this.textContent = '';
45
- this.limitStylingAppends = false;
46
- // Maybe switch this out with a localization source
47
- this.stringVariants = {
48
- termsandconditions1: "I accept the ",
49
- termsandconditions2: ", I have read and understood the ",
50
- termsandconditions3: " as published on this site and confirm that I am over 18 years old.",
51
- tc: "Terms and Conditions",
52
- privacy: "Privacy Policy",
53
- sms: "I consent to receive marketing communication via SMS.",
54
- emailmarketing: "I consent to receive marketing communication via Email."
55
- };
56
- this.setClientStyling = () => {
57
- let sheet = document.createElement('style');
58
- sheet.innerHTML = this.clientStyling;
59
- this.stylingContainer.prepend(sheet);
60
- };
61
- }
62
- determineTextContent() {
63
- let result = this.consentType === 'termsandconditions' ?
64
- index.h("span", null, this.stringVariants['termsandconditions1'], index.h("a", { href: this.tcLink }, this.stringVariants['tc']), this.stringVariants['termsandconditions2'], index.h("a", { href: this.privacyLink }, this.stringVariants['privacy']), this.stringVariants['termsandconditions3'])
65
- : index.h("span", null, this.stringVariants[this.consentType]);
66
- return result;
67
- }
68
- userLegislationConsentHandler() {
69
- this.userLegislationConsent.emit({
70
- type: this.consentType,
71
- value: this.checkboxInput.checked
72
- });
73
- }
74
- componentDidRender() {
75
- // start custom styling area
76
- if (!this.limitStylingAppends && this.stylingContainer) {
77
- if (this.clientStyling)
78
- this.setClientStyling();
79
- this.limitStylingAppends = true;
80
- }
81
- // end custom styling area
82
- }
83
- render() {
84
- if (this.queried) {
85
- this.userLegislationConsentHandler();
86
- }
87
- this.textContent = this.determineTextContent();
88
- return (index.h("div", { ref: el => this.stylingContainer = el }, index.h("p", { class: "ConsentTitle" }, this.consentTitle), index.h("label", { class: "userConsent", htmlFor: "userConsent" }, index.h("input", { ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.textContent, this.mandatory && index.h("span", { class: "MandatoryItem" }, "*"))));
89
- }
90
- };
91
- PlayerUserConsents.style = playerUserConsentsCss;
92
-
93
- exports.player_user_consents = PlayerUserConsents;
@@ -1,19 +0,0 @@
1
- 'use strict';
2
-
3
- const index = require('./index-28f85617.js');
4
-
5
- /*
6
- Stencil Client Patch Browser v2.15.2 | MIT Licensed | https://stenciljs.com
7
- */
8
- const patchBrowser = () => {
9
- const importMeta = (typeof document === 'undefined' ? new (require('u' + 'rl').URL)('file:' + __filename).href : (document.currentScript && document.currentScript.src || new URL('player-user-consents.cjs.js', document.baseURI).href));
10
- const opts = {};
11
- if (importMeta !== '') {
12
- opts.resourcesUrl = new URL('.', importMeta).href;
13
- }
14
- return index.promiseResolve(opts);
15
- };
16
-
17
- patchBrowser().then(options => {
18
- return index.bootstrapLazy([["player-user-consents.cjs",[[1,"player-user-consents",{"queried":[516],"consentType":[513,"consent-type"],"mandatory":[516],"consentTitle":[513,"consent-title"],"tcLink":[513,"tc-link"],"privacyLink":[513,"privacy-link"],"clientStyling":[1,"client-styling"],"textContent":[32],"limitStylingAppends":[32]}]]]], options);
19
- });
@@ -1,12 +0,0 @@
1
- {
2
- "entries": [
3
- "./components/player-user-consents/player-user-consents.js"
4
- ],
5
- "compiler": {
6
- "name": "@stencil/core",
7
- "version": "2.15.2",
8
- "typescriptVersion": "4.5.4"
9
- },
10
- "collections": [],
11
- "bundles": []
12
- }
@@ -1,18 +0,0 @@
1
- :host {
2
- display: block;
3
- }
4
-
5
- .ConsentTitle {
6
- margin-bottom: 0.2rem;
7
- font-weight: 600;
8
- }
9
-
10
- .userConsent:hover {
11
- border-bottom: 1px solid #000;
12
- cursor: pointer;
13
- }
14
-
15
- .MandatoryItem {
16
- color: #f00;
17
- font-size: 1.2rem;
18
- }
@@ -1,247 +0,0 @@
1
- import { Component, h, Event, Prop, State } from '@stencil/core';
2
- export class PlayerUserConsents {
3
- constructor() {
4
- /**
5
- * 'true' when parent expects component to emit it's current value
6
- */
7
- this.queried = false;
8
- /**
9
- * the type of the consent, used to determine render details
10
- */
11
- this.consentType = '';
12
- /**
13
- * wether or not this consent is mandatory. Used for render details
14
- */
15
- this.mandatory = false;
16
- /**
17
- * the title of the consent to be displayed
18
- */
19
- this.consentTitle = '';
20
- /**
21
- * link to the t&c page
22
- */
23
- this.tcLink = '#';
24
- /**
25
- * link to privacy policy page
26
- */
27
- this.privacyLink = '#';
28
- /**
29
- * Client custom styling via inline style
30
- */
31
- this.clientStyling = '';
32
- /**
33
- * the text content to be rendered by the component. Determined at runtime
34
- */
35
- this.textContent = '';
36
- this.limitStylingAppends = false;
37
- // Maybe switch this out with a localization source
38
- this.stringVariants = {
39
- termsandconditions1: "I accept the ",
40
- termsandconditions2: ", I have read and understood the ",
41
- termsandconditions3: " as published on this site and confirm that I am over 18 years old.",
42
- tc: "Terms and Conditions",
43
- privacy: "Privacy Policy",
44
- sms: "I consent to receive marketing communication via SMS.",
45
- emailmarketing: "I consent to receive marketing communication via Email."
46
- };
47
- this.setClientStyling = () => {
48
- let sheet = document.createElement('style');
49
- sheet.innerHTML = this.clientStyling;
50
- this.stylingContainer.prepend(sheet);
51
- };
52
- }
53
- determineTextContent() {
54
- let result = this.consentType === 'termsandconditions' ?
55
- h("span", null,
56
- this.stringVariants['termsandconditions1'],
57
- h("a", { href: this.tcLink }, this.stringVariants['tc']),
58
- this.stringVariants['termsandconditions2'],
59
- h("a", { href: this.privacyLink }, this.stringVariants['privacy']),
60
- this.stringVariants['termsandconditions3'])
61
- : h("span", null, this.stringVariants[this.consentType]);
62
- return result;
63
- }
64
- userLegislationConsentHandler() {
65
- this.userLegislationConsent.emit({
66
- type: this.consentType,
67
- value: this.checkboxInput.checked
68
- });
69
- }
70
- componentDidRender() {
71
- // start custom styling area
72
- if (!this.limitStylingAppends && this.stylingContainer) {
73
- if (this.clientStyling)
74
- this.setClientStyling();
75
- this.limitStylingAppends = true;
76
- }
77
- // end custom styling area
78
- }
79
- render() {
80
- if (this.queried) {
81
- this.userLegislationConsentHandler();
82
- }
83
- this.textContent = this.determineTextContent();
84
- return (h("div", { ref: el => this.stylingContainer = el },
85
- h("p", { class: "ConsentTitle" }, this.consentTitle),
86
- h("label", { class: "userConsent", htmlFor: "userConsent" },
87
- h("input", { ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }),
88
- this.textContent,
89
- this.mandatory && h("span", { class: "MandatoryItem" }, "*"))));
90
- }
91
- static get is() { return "player-user-consents"; }
92
- static get encapsulation() { return "shadow"; }
93
- static get originalStyleUrls() { return {
94
- "$": ["player-user-consents.scss"]
95
- }; }
96
- static get styleUrls() { return {
97
- "$": ["player-user-consents.css"]
98
- }; }
99
- static get properties() { return {
100
- "queried": {
101
- "type": "boolean",
102
- "mutable": false,
103
- "complexType": {
104
- "original": "boolean",
105
- "resolved": "boolean",
106
- "references": {}
107
- },
108
- "required": false,
109
- "optional": false,
110
- "docs": {
111
- "tags": [],
112
- "text": "'true' when parent expects component to emit it's current value"
113
- },
114
- "attribute": "queried",
115
- "reflect": true,
116
- "defaultValue": "false"
117
- },
118
- "consentType": {
119
- "type": "string",
120
- "mutable": false,
121
- "complexType": {
122
- "original": "string",
123
- "resolved": "string",
124
- "references": {}
125
- },
126
- "required": false,
127
- "optional": false,
128
- "docs": {
129
- "tags": [],
130
- "text": "the type of the consent, used to determine render details"
131
- },
132
- "attribute": "consent-type",
133
- "reflect": true,
134
- "defaultValue": "''"
135
- },
136
- "mandatory": {
137
- "type": "boolean",
138
- "mutable": false,
139
- "complexType": {
140
- "original": "boolean",
141
- "resolved": "boolean",
142
- "references": {}
143
- },
144
- "required": false,
145
- "optional": false,
146
- "docs": {
147
- "tags": [],
148
- "text": "wether or not this consent is mandatory. Used for render details"
149
- },
150
- "attribute": "mandatory",
151
- "reflect": true,
152
- "defaultValue": "false"
153
- },
154
- "consentTitle": {
155
- "type": "string",
156
- "mutable": false,
157
- "complexType": {
158
- "original": "string",
159
- "resolved": "string",
160
- "references": {}
161
- },
162
- "required": false,
163
- "optional": false,
164
- "docs": {
165
- "tags": [],
166
- "text": "the title of the consent to be displayed"
167
- },
168
- "attribute": "consent-title",
169
- "reflect": true,
170
- "defaultValue": "''"
171
- },
172
- "tcLink": {
173
- "type": "string",
174
- "mutable": false,
175
- "complexType": {
176
- "original": "string",
177
- "resolved": "string",
178
- "references": {}
179
- },
180
- "required": false,
181
- "optional": false,
182
- "docs": {
183
- "tags": [],
184
- "text": "link to the t&c page"
185
- },
186
- "attribute": "tc-link",
187
- "reflect": true,
188
- "defaultValue": "'#'"
189
- },
190
- "privacyLink": {
191
- "type": "string",
192
- "mutable": false,
193
- "complexType": {
194
- "original": "string",
195
- "resolved": "string",
196
- "references": {}
197
- },
198
- "required": false,
199
- "optional": false,
200
- "docs": {
201
- "tags": [],
202
- "text": "link to privacy policy page"
203
- },
204
- "attribute": "privacy-link",
205
- "reflect": true,
206
- "defaultValue": "'#'"
207
- },
208
- "clientStyling": {
209
- "type": "string",
210
- "mutable": false,
211
- "complexType": {
212
- "original": "string",
213
- "resolved": "string",
214
- "references": {}
215
- },
216
- "required": false,
217
- "optional": false,
218
- "docs": {
219
- "tags": [],
220
- "text": "Client custom styling via inline style"
221
- },
222
- "attribute": "client-styling",
223
- "reflect": false,
224
- "defaultValue": "''"
225
- }
226
- }; }
227
- static get states() { return {
228
- "textContent": {},
229
- "limitStylingAppends": {}
230
- }; }
231
- static get events() { return [{
232
- "method": "userLegislationConsent",
233
- "name": "userLegislationConsent",
234
- "bubbles": true,
235
- "cancelable": true,
236
- "composed": true,
237
- "docs": {
238
- "tags": [],
239
- "text": ""
240
- },
241
- "complexType": {
242
- "original": "object",
243
- "resolved": "object",
244
- "references": {}
245
- }
246
- }]; }
247
- }
@@ -1 +0,0 @@
1
- export * from './components';
@@ -1,3 +0,0 @@
1
- export function format(first, middle, last) {
2
- return ((first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : ''));
3
- }
@@ -1,26 +0,0 @@
1
- /* PlayerUserConsents custom elements */
2
-
3
- import type { Components, JSX } from "../types/components";
4
-
5
- /**
6
- * Used to manually set the base path where assets can be found.
7
- * If the script is used as "module", it's recommended to use "import.meta.url",
8
- * such as "setAssetPath(import.meta.url)". Other options include
9
- * "setAssetPath(document.currentScript.src)", or using a bundler's replace plugin to
10
- * dynamically set the path at build time, such as "setAssetPath(process.env.ASSET_PATH)".
11
- * But do note that this configuration depends on how your script is bundled, or lack of
12
- * bundling, and where your assets can be loaded from. Additionally custom bundling
13
- * will have to ensure the static assets are copied to its build directory.
14
- */
15
- export declare const setAssetPath: (path: string) => void;
16
-
17
- export interface SetPlatformOptions {
18
- raf?: (c: FrameRequestCallback) => number;
19
- ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
20
- rel?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
21
- }
22
- export declare const setPlatformOptions: (opts: SetPlatformOptions) => void;
23
-
24
- export type { Components, JSX };
25
-
26
- export * from '../types';
@@ -1 +0,0 @@
1
- export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
@@ -1,11 +0,0 @@
1
- import type { Components, JSX } from "../types/components";
2
-
3
- interface PlayerUserConsents extends Components.PlayerUserConsents, HTMLElement {}
4
- export const PlayerUserConsents: {
5
- prototype: PlayerUserConsents;
6
- new (): PlayerUserConsents;
7
- };
8
- /**
9
- * Used to define this component and all nested components recursively.
10
- */
11
- export const defineCustomElement: () => void;
@@ -1,117 +0,0 @@
1
- import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
2
-
3
- const playerUserConsentsCss = ":host{display:block}.ConsentTitle{margin-bottom:0.2rem;font-weight:600}.userConsent:hover{border-bottom:1px solid #000;cursor:pointer}.MandatoryItem{color:#f00;font-size:1.2rem}";
4
-
5
- const PlayerUserConsents$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
6
- constructor() {
7
- super();
8
- this.__registerHost();
9
- this.__attachShadow();
10
- this.userLegislationConsent = createEvent(this, "userLegislationConsent", 7);
11
- /**
12
- * 'true' when parent expects component to emit it's current value
13
- */
14
- this.queried = false;
15
- /**
16
- * the type of the consent, used to determine render details
17
- */
18
- this.consentType = '';
19
- /**
20
- * wether or not this consent is mandatory. Used for render details
21
- */
22
- this.mandatory = false;
23
- /**
24
- * the title of the consent to be displayed
25
- */
26
- this.consentTitle = '';
27
- /**
28
- * link to the t&c page
29
- */
30
- this.tcLink = '#';
31
- /**
32
- * link to privacy policy page
33
- */
34
- this.privacyLink = '#';
35
- /**
36
- * Client custom styling via inline style
37
- */
38
- this.clientStyling = '';
39
- /**
40
- * the text content to be rendered by the component. Determined at runtime
41
- */
42
- this.textContent = '';
43
- this.limitStylingAppends = false;
44
- // Maybe switch this out with a localization source
45
- this.stringVariants = {
46
- termsandconditions1: "I accept the ",
47
- termsandconditions2: ", I have read and understood the ",
48
- termsandconditions3: " as published on this site and confirm that I am over 18 years old.",
49
- tc: "Terms and Conditions",
50
- privacy: "Privacy Policy",
51
- sms: "I consent to receive marketing communication via SMS.",
52
- emailmarketing: "I consent to receive marketing communication via Email."
53
- };
54
- this.setClientStyling = () => {
55
- let sheet = document.createElement('style');
56
- sheet.innerHTML = this.clientStyling;
57
- this.stylingContainer.prepend(sheet);
58
- };
59
- }
60
- determineTextContent() {
61
- let result = this.consentType === 'termsandconditions' ?
62
- h("span", null, this.stringVariants['termsandconditions1'], h("a", { href: this.tcLink }, this.stringVariants['tc']), this.stringVariants['termsandconditions2'], h("a", { href: this.privacyLink }, this.stringVariants['privacy']), this.stringVariants['termsandconditions3'])
63
- : h("span", null, this.stringVariants[this.consentType]);
64
- return result;
65
- }
66
- userLegislationConsentHandler() {
67
- this.userLegislationConsent.emit({
68
- type: this.consentType,
69
- value: this.checkboxInput.checked
70
- });
71
- }
72
- componentDidRender() {
73
- // start custom styling area
74
- if (!this.limitStylingAppends && this.stylingContainer) {
75
- if (this.clientStyling)
76
- this.setClientStyling();
77
- this.limitStylingAppends = true;
78
- }
79
- // end custom styling area
80
- }
81
- render() {
82
- if (this.queried) {
83
- this.userLegislationConsentHandler();
84
- }
85
- this.textContent = this.determineTextContent();
86
- return (h("div", { ref: el => this.stylingContainer = el }, h("p", { class: "ConsentTitle" }, this.consentTitle), h("label", { class: "userConsent", htmlFor: "userConsent" }, h("input", { ref: el => this.checkboxInput = el, id: "userConsent", type: "checkbox", onInput: () => this.userLegislationConsentHandler() }), this.textContent, this.mandatory && h("span", { class: "MandatoryItem" }, "*"))));
87
- }
88
- static get style() { return playerUserConsentsCss; }
89
- }, [1, "player-user-consents", {
90
- "queried": [516],
91
- "consentType": [513, "consent-type"],
92
- "mandatory": [516],
93
- "consentTitle": [513, "consent-title"],
94
- "tcLink": [513, "tc-link"],
95
- "privacyLink": [513, "privacy-link"],
96
- "clientStyling": [1, "client-styling"],
97
- "textContent": [32],
98
- "limitStylingAppends": [32]
99
- }]);
100
- function defineCustomElement$1() {
101
- if (typeof customElements === "undefined") {
102
- return;
103
- }
104
- const components = ["player-user-consents"];
105
- components.forEach(tagName => { switch (tagName) {
106
- case "player-user-consents":
107
- if (!customElements.get(tagName)) {
108
- customElements.define(tagName, PlayerUserConsents$1);
109
- }
110
- break;
111
- } });
112
- }
113
-
114
- const PlayerUserConsents = PlayerUserConsents$1;
115
- const defineCustomElement = defineCustomElement$1;
116
-
117
- export { PlayerUserConsents, defineCustomElement };