@everymatrix/pam-player-documents 0.11.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.
- package/dist/cjs/app-globals-3a1e7e63.js +5 -0
- package/dist/cjs/index-84b76e65.js +1227 -0
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +15 -0
- package/dist/cjs/pam-player-documents-bc881ad5.js +416 -0
- package/dist/cjs/pam-player-documents.cjs.js +25 -0
- package/dist/cjs/pam-player-documents_2.cjs.entry.js +203 -0
- package/dist/collection/collection-manifest.json +19 -0
- package/dist/collection/components/pam-player-documents/index.js +1 -0
- package/dist/collection/components/pam-player-documents/pam-player-documents.css +249 -0
- package/dist/collection/components/pam-player-documents/pam-player-documents.js +428 -0
- package/dist/collection/index.js +1 -0
- package/dist/collection/utils/locale.utils.js +129 -0
- package/dist/collection/utils/utils.js +12 -0
- package/dist/esm/app-globals-0f993ce5.js +3 -0
- package/dist/esm/index-3f96eae4.js +1200 -0
- package/dist/esm/index.js +2 -0
- package/dist/esm/loader.js +11 -0
- package/dist/esm/pam-player-documents-7540c613.js +414 -0
- package/dist/esm/pam-player-documents.js +20 -0
- package/dist/esm/pam-player-documents_2.entry.js +198 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/pam-player-documents/app-globals-0f993ce5.js +1 -0
- package/dist/pam-player-documents/index-3f96eae4.js +2 -0
- package/dist/pam-player-documents/index.esm.js +1 -0
- package/dist/pam-player-documents/pam-player-documents-7540c613.js +1 -0
- package/dist/pam-player-documents/pam-player-documents.esm.js +1 -0
- package/dist/pam-player-documents/pam-player-documents_2.entry.js +1 -0
- package/dist/stencil.config.dev.js +17 -0
- package/dist/stencil.config.js +19 -0
- package/dist/storybook/main.js +47 -0
- package/dist/storybook/preview.js +9 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/libs/common/src/storybook/storybook-utils.d.ts +39 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/packages/stencil/pam-player-documents/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/packages/stencil/pam-player-documents/stencil.config.dev.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/packages/stencil/pam-player-documents/storybook/main.d.ts +3 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/packages/stencil/pam-player-documents/storybook/preview.d.ts +70 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/tools/plugins/index.d.ts +3 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +5 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/tools/plugins/vite-chunk-plugin.d.ts +6 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/pam-player-documents/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +4 -0
- package/dist/types/components/pam-player-documents/index.d.ts +1 -0
- package/dist/types/components/pam-player-documents/pam-player-documents.d.ts +46 -0
- package/dist/types/components.d.ts +57 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +1674 -0
- package/dist/types/utils/locale.utils.d.ts +23 -0
- package/dist/types/utils/utils.d.ts +7 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/loader/package.json +11 -0
- package/package.json +26 -0
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
export { P as pam_player_documents } from './pam-player-documents-7540c613.js';
|
|
2
|
+
import { r as registerInstance, h, H as Host } from './index-3f96eae4.js';
|
|
3
|
+
|
|
4
|
+
const uiSkeletonCss = ":host{display:block;--emw-skeleton-rectangle-background:#c2c2c2;--emw-skeleton-circle-background:#c2c2c2;--emw-skeleton-text-background:#c2c2c2;--emw-skeleton-title-background:#c2c2c2;--emw-skeleton-image-background:#c2c2c2;--emw-skeleton-logo-background:#c2c2c2;--emw-skeleton-primary-color:#e0e0e0;--emw-skeleton-secondary-color:#f0f0f0}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 2px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, inherit)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";
|
|
5
|
+
const UiSkeletonStyle0 = uiSkeletonCss;
|
|
6
|
+
|
|
7
|
+
const UiSkeleton = class {
|
|
8
|
+
constructor(hostRef) {
|
|
9
|
+
registerInstance(this, hostRef);
|
|
10
|
+
this.stylingValue = {
|
|
11
|
+
width: this.handleStylingProps(this.width),
|
|
12
|
+
height: this.handleStylingProps(this.height),
|
|
13
|
+
borderRadius: this.handleStylingProps(this.borderRadius),
|
|
14
|
+
marginBottom: this.handleStylingProps(this.marginBottom),
|
|
15
|
+
marginTop: this.handleStylingProps(this.marginTop),
|
|
16
|
+
marginLeft: this.handleStylingProps(this.marginLeft),
|
|
17
|
+
marginRight: this.handleStylingProps(this.marginRight)
|
|
18
|
+
};
|
|
19
|
+
this.structure = undefined;
|
|
20
|
+
this.width = 'unset';
|
|
21
|
+
this.height = 'unset';
|
|
22
|
+
this.borderRadius = 'unset';
|
|
23
|
+
this.marginBottom = 'unset';
|
|
24
|
+
this.marginTop = 'unset';
|
|
25
|
+
this.marginLeft = 'unset';
|
|
26
|
+
this.marginRight = 'unset';
|
|
27
|
+
this.animation = true;
|
|
28
|
+
this.rows = 0;
|
|
29
|
+
this.size = '100%';
|
|
30
|
+
this.color = '#c2c2c2';
|
|
31
|
+
this.primaryColor = '#c2c2c2';
|
|
32
|
+
this.secondaryColor = '#ffffff';
|
|
33
|
+
}
|
|
34
|
+
handleStructureChange(newValue, oldValue) {
|
|
35
|
+
if (oldValue !== newValue) {
|
|
36
|
+
this.handleStructure(newValue);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
handleStylingProps(value) {
|
|
40
|
+
switch (typeof value) {
|
|
41
|
+
case 'number':
|
|
42
|
+
return value === 0 ? 0 : `${value}px`;
|
|
43
|
+
case 'undefined':
|
|
44
|
+
return 'unset';
|
|
45
|
+
case 'string':
|
|
46
|
+
if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
|
|
47
|
+
value.endsWith('px') ||
|
|
48
|
+
value.endsWith('%')) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
return 'unset';
|
|
53
|
+
}
|
|
54
|
+
default:
|
|
55
|
+
return 'unset';
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
handleStructure(structure) {
|
|
59
|
+
switch (structure) {
|
|
60
|
+
case 'logo':
|
|
61
|
+
return this.renderLogo();
|
|
62
|
+
case 'image':
|
|
63
|
+
return this.renderImage();
|
|
64
|
+
case 'title':
|
|
65
|
+
return this.renderTitle();
|
|
66
|
+
case 'text':
|
|
67
|
+
return this.renderText();
|
|
68
|
+
case 'rectangle':
|
|
69
|
+
return this.renderRectangle();
|
|
70
|
+
case 'circle':
|
|
71
|
+
return this.renderCircle();
|
|
72
|
+
default:
|
|
73
|
+
return null;
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
renderLogo() {
|
|
77
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
|
|
78
|
+
}
|
|
79
|
+
renderImage() {
|
|
80
|
+
return h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
|
|
81
|
+
}
|
|
82
|
+
renderTitle() {
|
|
83
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
|
|
84
|
+
}
|
|
85
|
+
renderText() {
|
|
86
|
+
return (h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index) => (h("div", { key: index, class: 'Text ' + (this.animation ? 'Skeleton' : '') })))));
|
|
87
|
+
}
|
|
88
|
+
renderRectangle() {
|
|
89
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
|
|
90
|
+
}
|
|
91
|
+
renderCircle() {
|
|
92
|
+
return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
let styleBlock = '';
|
|
96
|
+
switch (this.structure) {
|
|
97
|
+
case 'logo':
|
|
98
|
+
styleBlock = `
|
|
99
|
+
:host {
|
|
100
|
+
--emw-skeleton-logo-width: ${this.stylingValue.width};
|
|
101
|
+
--emw-skeleton-logo-height: ${this.stylingValue.height};
|
|
102
|
+
--emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
|
|
103
|
+
--emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
|
|
104
|
+
--emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
|
|
105
|
+
--emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
|
|
106
|
+
--emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
|
|
107
|
+
--emw-skeleton-logo-background: ${this.color};
|
|
108
|
+
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
109
|
+
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
110
|
+
}
|
|
111
|
+
`;
|
|
112
|
+
break;
|
|
113
|
+
case 'image':
|
|
114
|
+
styleBlock = `
|
|
115
|
+
:host {
|
|
116
|
+
--emw-skeleton-image-width: ${this.stylingValue.width};
|
|
117
|
+
--emw-skeleton-image-height: ${this.stylingValue.height};
|
|
118
|
+
--emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
|
|
119
|
+
--emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
|
|
120
|
+
--emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
|
|
121
|
+
--emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
|
|
122
|
+
--emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
|
|
123
|
+
--emw-skeleton-image-background: ${this.color};
|
|
124
|
+
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
125
|
+
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
126
|
+
}
|
|
127
|
+
`;
|
|
128
|
+
break;
|
|
129
|
+
case 'title':
|
|
130
|
+
styleBlock = `
|
|
131
|
+
:host {
|
|
132
|
+
--emw-skeleton-title-width: ${this.stylingValue.width};
|
|
133
|
+
--emw-skeleton-title-height: ${this.stylingValue.height};
|
|
134
|
+
--emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
|
|
135
|
+
--emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
|
|
136
|
+
--emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
|
|
137
|
+
--emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
|
|
138
|
+
--emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
|
|
139
|
+
--emw-skeleton-title-background: ${this.color};
|
|
140
|
+
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
141
|
+
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
142
|
+
}
|
|
143
|
+
`;
|
|
144
|
+
break;
|
|
145
|
+
case 'text':
|
|
146
|
+
styleBlock = `
|
|
147
|
+
:host {
|
|
148
|
+
--emw-skeleton-text-width: ${this.stylingValue.width};
|
|
149
|
+
--emw-skeleton-text-height: ${this.stylingValue.height};
|
|
150
|
+
--emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
|
|
151
|
+
--emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
|
|
152
|
+
--emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
|
|
153
|
+
--emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
|
|
154
|
+
--emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
|
|
155
|
+
--emw-skeleton-text-background: ${this.color};
|
|
156
|
+
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
157
|
+
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
158
|
+
}
|
|
159
|
+
`;
|
|
160
|
+
break;
|
|
161
|
+
case 'rectangle':
|
|
162
|
+
styleBlock = `
|
|
163
|
+
:host {
|
|
164
|
+
--emw-skeleton-rectangle-width: ${this.stylingValue.width};
|
|
165
|
+
--emw-skeleton-rectangle-height: ${this.stylingValue.height};
|
|
166
|
+
--emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
|
|
167
|
+
--emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
|
|
168
|
+
--emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
|
|
169
|
+
--emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
|
|
170
|
+
--emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
|
|
171
|
+
--emw-skeleton-rectangle-background: ${this.color};
|
|
172
|
+
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
173
|
+
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
174
|
+
}
|
|
175
|
+
`;
|
|
176
|
+
break;
|
|
177
|
+
case 'circle':
|
|
178
|
+
styleBlock = `
|
|
179
|
+
:host {
|
|
180
|
+
--emw-skeleton-circle-size: ${this.size};
|
|
181
|
+
--emw-skeleton-circle-background: ${this.color};
|
|
182
|
+
--emw-skeleton-primary-color: ${this.primaryColor};
|
|
183
|
+
--emw-skeleton-secondary-color: ${this.secondaryColor};
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
186
|
+
break;
|
|
187
|
+
default:
|
|
188
|
+
styleBlock = '';
|
|
189
|
+
}
|
|
190
|
+
return (h(Host, { key: '5c185b76c438d20d4ad88bc48d94ff5628410bb7' }, h("style", { key: 'de95e60a5955d5b2af83710423fe40329c187f7e' }, styleBlock), this.handleStructure(this.structure)));
|
|
191
|
+
}
|
|
192
|
+
static get watchers() { return {
|
|
193
|
+
"structure": ["handleStructureChange"]
|
|
194
|
+
}; }
|
|
195
|
+
};
|
|
196
|
+
UiSkeleton.style = UiSkeletonStyle0;
|
|
197
|
+
|
|
198
|
+
export { UiSkeleton as ui_skeleton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cjs/index.cjs.js');
|
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './esm/index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const o=()=>{};export{o as g}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e=Object.defineProperty,t=new WeakMap,n=e=>t.get(e),l=(e,n)=>t.set(n.t=e,n),o=(e,t)=>t in e,s=(e,t)=>(0,console.error)(e,t),r=new Map,i=new Map,c="slot-fb{display:contents}slot-fb[hidden]{display:none}",u="undefined"!=typeof window?window:{},a=u.document||{head:{}},f={l:0,o:"",jmp:e=>e(),raf:e=>requestAnimationFrame(e),ael:(e,t,n,l)=>e.addEventListener(t,n,l),rel:(e,t,n,l)=>e.removeEventListener(t,n,l),ce:(e,t)=>new CustomEvent(e,t)},h=e=>Promise.resolve(e),p=(()=>{try{return new CSSStyleSheet,"function"==typeof(new CSSStyleSheet).replaceSync}catch(e){}return!1})(),m=!1,d=[],y=[],w=(e,t)=>n=>{e.push(n),m||(m=!0,t&&4&f.l?b(v):f.raf(v))},$=e=>{for(let t=0;t<e.length;t++)try{e[t](performance.now())}catch(e){s(e)}e.length=0},v=()=>{$(d),$(y),(m=d.length>0)&&f.raf(v)},b=e=>h().then(e),g=w(y,!0),S={},j=e=>"object"==(e=typeof e)||"function"===e;function k(e){var t,n,l;return null!=(l=null==(n=null==(t=e.head)?void 0:t.querySelector('meta[name="csp-nonce"]'))?void 0:n.getAttribute("content"))?l:void 0}((t,n)=>{for(var l in n)e(t,l,{get:n[l],enumerable:!0})})({},{err:()=>E,map:()=>C,ok:()=>O,unwrap:()=>P,unwrapErr:()=>L});var O=e=>({isOk:!0,isErr:!1,value:e}),E=e=>({isOk:!1,isErr:!0,value:e});function C(e,t){if(e.isOk){const n=t(e.value);return n instanceof Promise?n.then((e=>O(e))):O(n)}if(e.isErr)return E(e.value);throw"should never get here"}var M,x,P=e=>{if(e.isOk)return e.value;throw e.value},L=e=>{if(e.isErr)return e.value;throw e.value},R=(e,t,...n)=>{let l=null,o=null,s=!1,r=!1;const i=[],c=t=>{for(let n=0;n<t.length;n++)l=t[n],Array.isArray(l)?c(l):null!=l&&"boolean"!=typeof l&&((s="function"!=typeof e&&!j(l))&&(l+=""),s&&r?i[i.length-1].i+=l:i.push(s?T(null,l):l),r=s)};if(c(n),t){t.key&&(o=t.key);{const e=t.className||t.class;e&&(t.class="object"!=typeof e?e:Object.keys(e).filter((t=>e[t])).join(" "))}}const u=T(e,null);return u.u=t,i.length>0&&(u.h=i),u.p=o,u},T=(e,t)=>({l:0,m:e,i:t,$:null,h:null,u:null,p:null}),A={},F=new WeakMap,H=e=>"sc-"+e.v,N=(e,t,n,l,s,r)=>{if(n!==l){let i=o(e,t),c=t.toLowerCase();if("class"===t){const t=e.classList,o=W(n),s=W(l);t.remove(...o.filter((e=>e&&!s.includes(e)))),t.add(...s.filter((e=>e&&!o.includes(e))))}else if("key"===t);else if("ref"===t)l&&l(e);else if(i||"o"!==t[0]||"n"!==t[1]){const o=j(l);if((i||o&&null!==l)&&!s)try{if(e.tagName.includes("-"))e[t]=l;else{const o=null==l?"":l;"list"===t?i=!1:null!=n&&e[t]==o||(e[t]=o)}}catch(e){}null==l||!1===l?!1===l&&""!==e.getAttribute(t)||e.removeAttribute(t):(!i||4&r||s)&&!o&&e.setAttribute(t,l=!0===l?"":l)}else if(t="-"===t[2]?t.slice(3):o(u,c)?c.slice(2):c[2]+t.slice(3),n||l){const o=t.endsWith(D);t=t.replace(q,""),n&&f.rel(e,t,n,o),l&&f.ael(e,t,l,o)}}},U=/\s/,W=e=>e?e.split(U):[],D="Capture",q=RegExp(D+"$"),G=(e,t,n)=>{const l=11===t.$.nodeType&&t.$.host?t.$.host:t.$,o=e&&e.u||S,s=t.u||S;for(const e of V(Object.keys(o)))e in s||N(l,e,o[e],void 0,n,t.l);for(const e of V(Object.keys(s)))N(l,e,o[e],s[e],n,t.l)};function V(e){return e.includes("ref")?[...e.filter((e=>"ref"!==e)),"ref"]:e}var _=!1,z=(e,t,n)=>{const l=t.h[n];let o,s,r=0;if(null!==l.i)o=l.$=a.createTextNode(l.i);else{if(_||(_="svg"===l.m),o=l.$=a.createElementNS(_?"http://www.w3.org/2000/svg":"http://www.w3.org/1999/xhtml",l.m),_&&"foreignObject"===l.m&&(_=!1),G(null,l,_),null!=M&&o["s-si"]!==M&&o.classList.add(o["s-si"]=M),l.h)for(r=0;r<l.h.length;++r)s=z(e,l,r),s&&o.appendChild(s);"svg"===l.m?_=!1:"foreignObject"===o.tagName&&(_=!0)}return o["s-hn"]=x,o},B=(e,t,n,l,o,s)=>{let r,i=e;for(i.shadowRoot&&i.tagName===x&&(i=i.shadowRoot);o<=s;++o)l[o]&&(r=z(null,n,o),r&&(l[o].$=r,X(i,r,t)))},I=(e,t,n)=>{for(let l=t;l<=n;++l){const t=e[l];if(t){const e=t.$;Q(t),e&&e.remove()}}},J=(e,t,n=!1)=>e.m===t.m&&(!!n||e.p===t.p),K=(e,t,n=!1)=>{const l=t.$=e.$,o=e.h,s=t.h,r=t.m,i=t.i;null===i?(G(e,t,_="svg"===r||"foreignObject"!==r&&_),null!==o&&null!==s?((e,t,n,l,o=!1)=>{let s,r,i=0,c=0,u=0,a=0,f=t.length-1,h=t[0],p=t[f],m=l.length-1,d=l[0],y=l[m];for(;i<=f&&c<=m;)if(null==h)h=t[++i];else if(null==p)p=t[--f];else if(null==d)d=l[++c];else if(null==y)y=l[--m];else if(J(h,d,o))K(h,d,o),h=t[++i],d=l[++c];else if(J(p,y,o))K(p,y,o),p=t[--f],y=l[--m];else if(J(h,y,o))K(h,y,o),X(e,h.$,p.$.nextSibling),h=t[++i],y=l[--m];else if(J(p,d,o))K(p,d,o),X(e,p.$,h.$),p=t[--f],d=l[++c];else{for(u=-1,a=i;a<=f;++a)if(t[a]&&null!==t[a].p&&t[a].p===d.p){u=a;break}u>=0?(r=t[u],r.m!==d.m?s=z(t&&t[c],n,u):(K(r,d,o),t[u]=void 0,s=r.$),d=l[++c]):(s=z(t&&t[c],n,c),d=l[++c]),s&&X(h.$.parentNode,s,h.$)}i>f?B(e,null==l[m+1]?null:l[m+1].$,n,l,c,m):c>m&&I(t,i,f)})(l,o,t,s,n):null!==s?(null!==e.i&&(l.textContent=""),B(l,null,t,s,0,s.length-1)):null!==o&&I(o,0,o.length-1),_&&"svg"===r&&(_=!1)):e.i!==i&&(l.data=i)},Q=e=>{e.u&&e.u.ref&&e.u.ref(null),e.h&&e.h.map(Q)},X=(e,t,n)=>null==e?void 0:e.insertBefore(t,n),Y=(e,t)=>{t&&!e.S&&t["s-p"]&&t["s-p"].push(new Promise((t=>e.S=t)))},Z=(e,t)=>{if(e.l|=16,!(4&e.l))return Y(e,e.j),g((()=>ee(e,t)));e.l|=512},ee=(e,t)=>{const n=e.t;if(!n)throw Error(`Can't render component <${e.$hostElement$.tagName.toLowerCase()} /> with invalid Stencil runtime! Make sure this imported component is compiled with a \`externalRuntime: true\` flag. For more information, please refer to https://stenciljs.com/docs/custom-elements#externalruntime`);let l;return t&&(l=ie(n,"componentWillLoad")),te(l,(()=>le(e,n,t)))},te=(e,t)=>ne(e)?e.then(t).catch((e=>{console.error(e),t()})):t(),ne=e=>e instanceof Promise||e&&e.then&&"function"==typeof e.then,le=async(e,t,n)=>{var l;const o=e.$hostElement$,s=o["s-rc"];n&&(e=>{const t=e.k,n=e.$hostElement$,l=t.l,o=((e,t)=>{var n;const l=H(t),o=i.get(l);if(e=11===e.nodeType?e:a,o)if("string"==typeof o){let s,r=F.get(e=e.head||e);if(r||F.set(e,r=new Set),!r.has(l)){{s=a.createElement("style"),s.innerHTML=o;const t=null!=(n=f.O)?n:k(a);null!=t&&s.setAttribute("nonce",t),e.insertBefore(s,e.querySelector("link"))}4&t.l&&(s.innerHTML+=c),r&&r.add(l)}}else e.adoptedStyleSheets.includes(o)||(e.adoptedStyleSheets=[...e.adoptedStyleSheets,o]);return l})(n.shadowRoot?n.shadowRoot:n.getRootNode(),t);10&l&&(n["s-sc"]=o,n.classList.add(o+"-h"))})(e);oe(e,t,o,n),s&&(s.map((e=>e())),o["s-rc"]=void 0);{const t=null!=(l=o["s-p"])?l:[],n=()=>se(e);0===t.length?n():(Promise.all(t).then(n),e.l|=4,t.length=0)}},oe=(e,t,n,l)=>{try{t=t.render(),e.l&=-17,e.l|=2,((e,t,n=!1)=>{const l=e.$hostElement$,o=e.k,s=e.C||T(null,null),r=(e=>e&&e.m===A)(t)?t:R(null,null,t);if(x=l.tagName,o.M&&(r.u=r.u||{},o.M.map((([e,t])=>r.u[t]=l[e]))),n&&r.u)for(const e of Object.keys(r.u))l.hasAttribute(e)&&!["key","ref","style","class"].includes(e)&&(r.u[e]=l[e]);r.m=null,r.l|=4,e.C=r,r.$=s.$=l.shadowRoot||l,M=l["s-sc"],K(s,r,n)})(e,t,l)}catch(t){s(t,e.$hostElement$)}return null},se=e=>{const t=e.$hostElement$,n=e.t,l=e.j;64&e.l||(e.l|=64,ce(t),ie(n,"componentDidLoad"),e.P(t),l||re()),e.S&&(e.S(),e.S=void 0),512&e.l&&b((()=>Z(e,!1))),e.l&=-517},re=()=>{ce(a.documentElement),b((()=>(e=>{const t=f.ce("appload",{detail:{namespace:"pam-player-documents"}});return e.dispatchEvent(t),t})(u)))},ie=(e,t,n)=>{if(e&&e[t])try{return e[t](n)}catch(e){s(e)}},ce=e=>e.classList.add("hydrated"),ue=(e,t,l)=>{var o,r;const i=e.prototype;if(t.L||t.R||e.watchers){e.watchers&&!t.R&&(t.R=e.watchers);const c=Object.entries(null!=(o=t.L)?o:{});if(c.map((([e,[o]])=>{(31&o||2&l&&32&o)&&Object.defineProperty(i,e,{get(){return((e,t)=>n(this).T.get(t))(0,e)},set(l){((e,t,l,o)=>{const r=n(e);if(!r)throw Error(`Couldn't find host element for "${o.v}" as it is unknown to this Stencil runtime. This usually happens when integrating a 3rd party Stencil component with another Stencil component or application. Please reach out to the maintainers of the 3rd party Stencil component or report this on the Stencil Discord server (https://chat.stenciljs.com) or comment on this similar [GitHub issue](https://github.com/ionic-team/stencil/issues/5457).`);const i=r.$hostElement$,c=r.T.get(t),u=r.l,a=r.t;if(l=((e,t)=>null==e||j(e)?e:4&t?"false"!==e&&(""===e||!!e):2&t?parseFloat(e):1&t?e+"":e)(l,o.L[t][0]),(!(8&u)||void 0===c)&&l!==c&&(!Number.isNaN(c)||!Number.isNaN(l))&&(r.T.set(t,l),a)){if(o.R&&128&u){const e=o.R[t];e&&e.map((e=>{try{a[e](l,c,t)}catch(e){s(e,i)}}))}2==(18&u)&&Z(r,!1)}})(this,e,l,t)},configurable:!0,enumerable:!0})})),1&l){const l=new Map;i.attributeChangedCallback=function(e,o,s){f.jmp((()=>{var r;const c=l.get(e);if(this.hasOwnProperty(c))s=this[c],delete this[c];else{if(i.hasOwnProperty(c)&&"number"==typeof this[c]&&this[c]==s)return;if(null==c){const l=n(this),i=null==l?void 0:l.l;if(i&&!(8&i)&&128&i&&s!==o){const n=l.t,i=null==(r=t.R)?void 0:r[e];null==i||i.forEach((t=>{null!=n[t]&&n[t].call(n,s,o,e)}))}return}}this[c]=(null!==s||"boolean"!=typeof this[c])&&s}))},e.observedAttributes=Array.from(new Set([...Object.keys(null!=(r=t.R)?r:{}),...c.filter((([e,t])=>15&t[0])).map((([e,n])=>{var o;const s=n[1]||e;return l.set(s,e),512&n[0]&&(null==(o=t.M)||o.push([e,s])),s}))]))}}return e},ae=e=>{ie(e,"disconnectedCallback")},fe=(e,l={})=>{var o;const h=[],m=l.exclude||[],d=u.customElements,y=a.head,w=y.querySelector("meta[charset]"),$=a.createElement("style"),v=[];let b,g=!0;Object.assign(f,l),f.o=new URL(l.resourcesUrl||"./",a.baseURI).href;let S=!1;if(e.map((e=>{e[1].map((l=>{var o;const c={l:l[0],v:l[1],L:l[2],A:l[3]};4&c.l&&(S=!0),c.L=l[2],c.M=[],c.R=null!=(o=l[4])?o:{};const u=c.v,a=class extends HTMLElement{constructor(e){if(super(e),this.hasRegisteredEventListeners=!1,((e,n)=>{const l={l:0,$hostElement$:e,k:n,T:new Map};l.F=new Promise((e=>l.P=e)),e["s-p"]=[],e["s-rc"]=[],t.set(e,l)})(e=this,c),1&c.l)if(e.shadowRoot){if("open"!==e.shadowRoot.mode)throw Error(`Unable to re-use existing shadow root for ${c.v}! Mode is set to ${e.shadowRoot.mode} but Stencil only supports open shadow roots.`)}else e.attachShadow({mode:"open"})}connectedCallback(){this.hasRegisteredEventListeners||(this.hasRegisteredEventListeners=!0),b&&(clearTimeout(b),b=null),g?v.push(this):f.jmp((()=>(e=>{if(!(1&f.l)){const t=n(e),l=t.k,o=()=>{};if(1&t.l)(null==t?void 0:t.t)||(null==t?void 0:t.F)&&t.F.then((()=>{}));else{t.l|=1;{let n=e;for(;n=n.parentNode||n.host;)if(n["s-p"]){Y(t,t.j=n);break}}l.L&&Object.entries(l.L).map((([t,[n]])=>{if(31&n&&e.hasOwnProperty(t)){const n=e[t];delete e[t],e[t]=n}})),(async(e,t,n)=>{let l;if(!(32&t.l)){if(t.l|=32,n.H){const e=(e=>{const t=e.v.replace(/-/g,"_"),n=e.H;if(!n)return;const l=r.get(n);return l?l[t]:import(`./${n}.entry.js`).then((e=>(r.set(n,e),e[t])),s)
|
|
2
|
+
/*!__STENCIL_STATIC_IMPORT_SWITCH__*/})(n);if(e&&"then"in e){const t=()=>{};l=await e,t()}else l=e;if(!l)throw Error(`Constructor for "${n.v}#${t.N}" was not found`);l.isProxied||(n.R=l.watchers,ue(l,n,2),l.isProxied=!0);const o=()=>{};t.l|=8;try{new l(t)}catch(e){s(e)}t.l&=-9,t.l|=128,o()}else l=e.constructor,customElements.whenDefined(e.localName).then((()=>t.l|=128));if(l&&l.style){let e;"string"==typeof l.style&&(e=l.style);const t=H(n);if(!i.has(t)){const l=()=>{};((e,t,n)=>{let l=i.get(e);p&&n?(l=l||new CSSStyleSheet,"string"==typeof l?l=t:l.replaceSync(t)):l=t,i.set(e,l)})(t,e,!!(1&n.l)),l()}}}const o=t.j,c=()=>Z(t,!0);o&&o["s-rc"]?o["s-rc"].push(c):c()})(e,t,l)}o()}})(this)))}disconnectedCallback(){f.jmp((()=>(async()=>{if(!(1&f.l)){const e=n(this);(null==e?void 0:e.t)?ae(e.t):(null==e?void 0:e.F)&&e.F.then((()=>ae(e.t)))}})()))}componentOnReady(){return n(this).F}};c.H=e[0],m.includes(u)||d.get(u)||(h.push(u),d.define(u,ue(a,c,1)))}))})),h.length>0&&(S&&($.textContent+=c),$.textContent+=h.sort()+"{visibility:hidden}.hydrated{visibility:inherit}",$.innerHTML.length)){$.setAttribute("data-styles","");const e=null!=(o=f.O)?o:k(a);null!=e&&$.setAttribute("nonce",e),y.insertBefore($,w?w.nextSibling:y.firstChild)}g=!1,v.length?v.map((e=>e.connectedCallback())):f.jmp((()=>b=setTimeout(re,30)))},he=e=>f.O=e;export{A as H,fe as b,R as h,h as p,l as r,he as s}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as PamPlayerDocuments}from"./pam-player-documents-7540c613.js";import"./index-3f96eae4.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,h as t}from"./index-3f96eae4.js";function n(e,t){if(e){const n=document.createElement("style");n.innerHTML=t,e.appendChild(n)}}function o(e,t){const n=new URL(t);fetch(n.href).then((e=>e.text())).then((t=>{const n=document.createElement("style");n.innerHTML=t,e&&e.appendChild(n)})).catch((e=>{console.error("There was an error while trying to load client styling from URL",e)}))}const r={en:{title:"Documents",documentType:"Document Type",documentNumber:"Document Number",documentNumberError:"Document number is invalid",saveButton:"Save Changes",successMessage:"Your changes have been saved!",errorMessageUpdate:"An error has occured when attempting to update the documents information",errorMessageFetch:"An error has occured when attempting to fetch the documents information"},"zh-hk":{title:"文件",documentType:"文件類型",documentNumber:"文件號碼",documentNumberError:"文件號碼無效",saveButton:"保存更改",successMessage:"您的更改已保存!",errorMessageUpdate:"嘗試更新文件信息時發生錯誤",errorMessageFetch:"在嘗試獲取文件信息時發生錯誤"},fr:{title:"Documents",documentType:"Type de document",documentNumber:"Numéro de document",documentNumberError:"Le numéro de document est invalide",saveButton:"Enregistrer les modifications",successMessage:"Vos modifications ont été enregistrées !",errorMessageUpdate:"Une erreur s'est produite lors de la tentative de mise à jour des informations des documents",errorMessageFetch:"Une erreur est survenue lors de la tentative de récupération des informations sur les documents"},ro:{title:"Documente",documentType:"Tip document",documentNumber:"Număr document",documentNumberError:"Numărul documentului este invalid",saveButton:"Salvează modificările",successMessage:"Modificările dvs. au fost salvate!",errorMessageUpdate:"A apărut o eroare la încercarea de a actualiza informațiile documentelor",errorMessageFetch:"A apărut o eroare la încercarea de a obține informațiile documentelor"},tr:{title:"Belgeler",documentType:"Belge Türü",documentNumber:"Belge Numarası",documentNumberError:"Belge numarası geçersiz",saveButton:"Değişiklikleri Kaydet",successMessage:"Değişiklikleriniz kaydedildi!",errorMessageUpdate:"Belgelerin bilgilerini güncellemeye çalışırken bir hata oluştu",errorMessageFetch:"Belgelerin bilgilerini almak için yapılan işlemde bir hata oluştu"},es:{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número de documento",documentNumberError:"El número de documento no es válido",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de los documentos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los documentos"},pt:{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número do documento",documentNumberError:"O número do documento é inválido",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações dos documentos",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações dos documentos"},hr:{title:"Dokumenti",documentType:"Vrsta dokumenta",documentNumber:"Broj dokumenta",documentNumberError:"Broj dokumenta je nevažeći",saveButton:"Spremi promjene",successMessage:"Vaše promjene su spremljene!",errorMessageUpdate:"Došlo je do pogreške prilikom pokušaja ažuriranja informacija o dokumentima",errorMessageFetch:"Došlo je do greške prilikom pokušaja dobijanja informacija o dokumentima"},"pt-br":{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número do documento",documentNumberError:"O número do documento é inválido",saveButton:"Salvar alterações",successMessage:"Suas alterações foram salvas!",errorMessageUpdate:"Ocorreu um erro ao tentar atualizar as informações dos documentos",errorMessageFetch:"Ocorreu um erro ao tentar buscar as informações dos documentos"},"es-mx":{title:"Documentos",documentType:"Tipo de documento",documentNumber:"Número de documento",documentNumberError:"El número de documento no es válido",saveButton:"Guardar cambios",successMessage:"¡Tus cambios han sido guardados!",errorMessageUpdate:"Se ha producido un error al intentar actualizar la información de los documentos",errorMessageFetch:"Se ha producido un error al intentar obtener la información de los documentos"}},i=(e,t,n)=>{let o=r[r[t]?t:"en"][e];if(void 0!==n)for(const[e,t]of Object.entries(n.values)){const n=new RegExp(`{${e}}`,"g");o=o.replace(n,t)}return o},a=class{constructor(n){var o;e(this,n),this.dataRef={},this.fieldsState={},this.sendLoadedMessage=()=>{window.postMessage({type:"DOCUMENTS_LOADED"})},this.sendValidMessage=()=>{window.postMessage({type:"DOCUMENTS_VALIDITY",data:this.isSubmitButtonAvailable})},this.sendSuccessNotification=()=>{window.postMessage({type:"WidgetNotification",data:{type:"success",message:i("successMessage",this.lang)}},window.location.href)},this.sendErrorNotification=e=>{window.postMessage({type:"WidgetNotification",data:{type:"error",message:i(e,this.lang)}},window.location.href)},this.sendData=()=>{window.postMessage({type:"DOCUMENTS_UPDATE_DATA",data:this.data},window.location.href)},this.messageHandler=e=>{var t;switch(null===(t=e.data)||void 0===t?void 0:t.type){case"DOCUMENTS_DATA":this.data=e.data.data,this.resetState(),this.isSkeletonLoading=!1;break;case"DOCUMENTS_SEND_DATA":this.sendData()}},this.getData=()=>{const e=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/documents/`,this.endpoint),t=new Headers;t.append("X-SessionID",this.session);const n={method:"GET",headers:t};return new Promise((t=>{fetch(e.href,n).then((e=>{if(e.ok)return e.json();this.sendErrorNotification("errorMessageFetch")})).then((e=>{this.data=e,t()}))}))},this.buildFieldState=(e,t,n)=>Object.assign({isValid:e,initialValue:t,rule:n}),this.resetState=()=>{this.initData(),this.initEditableFieldsState(),this.invalidFields=0,this.isSubmitButtonAvailable=!1},this.updateState=e=>t=>{this.dataRef[e].documentNumber=t.target.value;const n=this.fieldsState[e].data.documentNumber,o=t.target.value,r=n.rule(o);r&&!n.isValid?(n.isValid=!0,this.invalidFields-=1):!r&&n.isValid&&(n.isValid=!1,this.invalidFields+=1),this.fieldsState[e].hasChanged=o!==n.initialValue;const i=this.isSubmitButtonAvailable;this.updateSubmitButtonStatus(),"true"!==this.isStandAlone&&this.isSubmitButtonAvailable!==i&&this.sendValidMessage()},this.updateData=e=>{e&&e.preventDefault();const t=[];for(const e of Object.keys(this.fieldsState)){if(!this.fieldsState[e].hasChanged)continue;const n=this.dataRef[e],o=new URL(`/api/v1/players/${this.userId}/player-identifiable-information/documents/${n.documentId}/`,this.endpoint),r=new Headers;r.append("X-SessionId",this.session),r.append("Content-Type","application/json-patch+json");const i={method:"PUT",headers:r,body:JSON.stringify(n)};t.push(fetch(o,i))}Promise.all(t).then((e=>{if(e.some((e=>!e.ok)))return this.sendErrorNotification("errorMessageUpdate");this.sendSuccessNotification(),this.getData().then((()=>this.resetState()))}))},this.updateSubmitButtonStatus=()=>{this.isSubmitButtonAvailable=0===this.invalidFields&&Object.values(this.fieldsState).some((e=>e.hasChanged))},this.editableField=(e,n,o,r)=>{const a=this.fieldsState[e].data[n],s=this.dataRef[e];return a?t("div",{class:"Field "+(a.isValid?"":"Invalid")},t("label",null,i(o,this.lang)),t("input",{type:"text",value:s[n],onKeyUp:this.updateState(e)}),!a.isValid&&t("p",{class:"Error"},i(r,this.lang))):null},this.staticField=(e,n,o)=>{const r=this.dataRef[e];return r&&r[n]?t("div",{class:"Field Disabled"},t("label",null,i(o,this.lang)),t("input",{type:"text",value:r[n],readonly:!0})):null},this.toggleScreen=()=>{window.postMessage({type:"PlayerAccountMenuActive",isMobile:this.isMobile},window.location.href)},this.userId=void 0,this.session=void 0,this.endpoint=void 0,this.lang="en",this.mbSource=void 0,this.clientStyling=void 0,this.clientStylingUrl=void 0,this.translationUrl=void 0,this.isEditable="false",this.isStandAlone="true",this.limitStylingAppends=!1,this.isSkeletonLoading=!0,this.isSubmitButtonAvailable=!1,this.invalidFields=0,this.isMobile=!!((o=window.navigator.userAgent).toLowerCase().match(/android/i)||o.toLowerCase().match(/blackberry|bb/i)||o.toLowerCase().match(/iphone|ipad|ipod/i)||o.toLowerCase().match(/windows phone|windows mobile|iemobile|wpdesktop/i))}handleStylingChange(e,t){e!==t&&n(this.stylingContainer,this.clientStyling)}handleStylingUrlChange(e,t){e!==t&&o(this.stylingContainer,this.clientStylingUrl)}async componentWillLoad(){"true"===this.isStandAlone&&await this.getData().then((()=>{this.initData(),this.initEditableFieldsState()})).finally((()=>this.isSkeletonLoading=!1))}componentDidLoad(){this.stylingContainer&&(null!=window.emMessageBuss?function(e,t){if(window.emMessageBus){const n=document.createElement("style");window.emMessageBus.subscribe(t,(t=>{n.innerHTML=t,e&&e.appendChild(n)}))}}(this.stylingContainer,`${this.mbSource}.Style`):(this.clientStyling&&n(this.stylingContainer,this.clientStyling),this.clientStylingUrl&&o(this.stylingContainer,this.clientStylingUrl))),"true"!==this.isStandAlone&&(window.addEventListener("message",this.messageHandler,!1),this.sendLoadedMessage())}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe(),"true"!==this.isStandAlone&&window.removeEventListener("message",this.messageHandler,!1)}initData(){for(const e of this.data.documents)this.dataRef[e.documentType]=e}initEditableFieldsState(){for(const[e,t]of Object.entries(this.dataRef))this.fieldsState[e]={},this.fieldsState[e].data={},this.fieldsState[e].data.documentNumber=this.buildFieldState(!0,t.documentNumber,(e=>e&&/^(?=.*[a-zA-Z0-9])[a-zA-Z0-9\s]+$/.test(e)&&e.length<=50)),this.fieldsState[e].hasChanged=!1}render(){return t("div",{key:"7abe1ef66b345689e5b12f56c8c563f21bf31862",ref:e=>this.stylingContainer=e},this.isSkeletonLoading?t("form",{class:"PlayerDocumentsWrapper skeleton"},t("div",{class:"ReturnButton"},t("ui-skeleton",{structure:"title",width:"auto",height:"30px"})),t("div",{class:"Section"},t("section",{class:"SectionContent"},t("div",{class:"Field"},t("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),t("ui-skeleton",{structure:"title",width:"100%",height:"40px"})),t("div",{class:"Field"},t("ui-skeleton",{structure:"text",width:"auto","margin-bottom":"10px",height:"10px"}),t("ui-skeleton",{structure:"title",width:"100%",height:"40px"})))),t("section",{class:"ButtonsArea"},t("div",{class:"SaveButton"},t("ui-skeleton",{structure:"rectangle",width:"auto",height:"40px"})))):t("form",{class:"PlayerDocumentsWrapper "+(this.isMobile?"Mobile":"")},t("div",{class:"ReturnButton",onClick:this.toggleScreen},t("svg",{xmlns:"http://www.w3.org/2000/svg",width:"15",height:"15",viewBox:"0 0 15 15"},t("g",{transform:"translate(-20 -158)"},t("g",{transform:"translate(20 158)"},t("path",{class:"aaa",d:"M7.5,0,6.136,1.364,11.3,6.526H0V8.474H11.3L6.136,13.636,7.5,15,15,7.5Z",transform:"translate(15 15) rotate(180)"})))),t("h2",null,i("title",this.lang))),t("h2",{class:"HeaderText"},i("title",this.lang)),t("div",{class:"Section"},t("section",{class:"SectionContent"},Object.keys(this.dataRef).map((e=>t("div",{class:"CompoundField"},this.staticField(e,"documentType","documentType"),"true"===this.isEditable?this.editableField(e,"documentNumber","documentNumber","documentNumberError"):this.staticField(e,"documentNumber","documentNumber")))))),"true"===this.isStandAlone&&t("section",{class:"ButtonsArea"},t("button",{class:"SaveButton "+(this.isSubmitButtonAvailable?"":"Disabled"),onClick:this.updateData},i("saveButton")))))}static get watchers(){return{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}}};a.style=":host {\n display: block;\n}\n\nbutton {\n font-family: var(--emw--button-typography);\n}\n\ninput, select, option {\n font-family: inherit;\n}\n\n.PlayerDocumentsWrapper {\n color: var(--emw--pam-typography, var(--emw-color-contrast, #07072A));\n background: var(--emw-color-pale, var(--emw--color-gray-50, #F1F1F1));\n padding: 50px;\n height: 100%;\n border-radius: var(--emw--border-radius-large, 10px);\n container-type: inline-size;\n opacity: 1;\n animation-name: fadeIn;\n animation-iteration-count: 1;\n animation-timing-function: ease-in;\n animation-duration: 0.3s;\n}\n.PlayerDocumentsWrapper .ReturnButton {\n display: none;\n}\n.PlayerDocumentsWrapper h2 {\n font-size: var(--emw--font-size-x-large, 24px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n}\n.PlayerDocumentsWrapper .Section {\n background: var(--emw-color-pale, var(--emw--color-gray-100, #E6E6E6));\n border-radius: var(--emw--border-radius-large, 10px);\n padding: 10px;\n margin-bottom: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionTitle {\n font-size: var(--emw--font-size-large, 20px);\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n text-transform: capitalize;\n font-weight: var(--emw--font-weight-semibold, 500);\n padding: 0;\n border: 0;\n margin-top: 10px;\n margin-bottom: 10px;\n background: transparent;\n cursor: pointer;\n}\n.PlayerDocumentsWrapper .Section .SectionContent {\n display: grid;\n column-gap: 50px;\n row-gap: 25px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n padding-bottom: 30px;\n margin-top: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field {\n width: 100%;\n display: flex;\n flex-direction: column;\n /* Chrome, Safari, Edge, Opera */\n /* Firefox */\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field label {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-semibold, 500);\n margin-bottom: 5px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input {\n font-size: var(--emw--size-small, 14px);\n font-weight: var(--emw--font-weight-light, 300);\n color: var(--emw--pam-contrast, var(--emw-color-contrast, #07072A));\n padding: 10px;\n line-height: 16px;\n background: var(--emw-color-white, #FFFFFF);\n outline: none;\n transition-duration: var(--emw--transition-medium, 250ms);\n border: 1px solid var(--emw--color-gray-100, #353535);\n border-radius: var(--emw--border-radius-medium, 10px);\n width: 100%;\n box-sizing: border-box;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input:focus, .PlayerDocumentsWrapper .Section .SectionContent .Field input :focus-within, .PlayerDocumentsWrapper .Section .SectionContent .Field input :focus-visible, .PlayerDocumentsWrapper .Section .SectionContent .Field input :visited {\n border: 1px solid var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n box-shadow: 0 0 0 1pt var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input::-webkit-outer-spin-button,\n.PlayerDocumentsWrapper .Section .SectionContent .Field input::-webkit-inner-spin-button {\n -webkit-appearance: none;\n margin: 0;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field input[type=number] {\n -moz-appearance: textfield;\n appearance: textfield;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field.Invalid input {\n border: 1px solid var(--emw-color-error, var(--emw-color-red, #FD2839));\n background: var(--emw-color-pale, #FBECF4);\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field .Error {\n color: var(--emw-color-error, var(--emw-color-red, #FD2839));\n font-size: var(--emw--font-size-x-small, 12px);\n line-height: 10px;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .Field.Disabled input {\n opacity: 0.5;\n}\n.PlayerDocumentsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: row;\n}\n.PlayerDocumentsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n grid-template-rows: auto;\n grid-template-columns: 1fr;\n margin-top: 20px;\n width: 50%;\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton {\n display: flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n cursor: pointer;\n background-image: linear-gradient(to bottom, color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, black 20%), var(--emw--color-primary, #22B04E), color-mix(in srgb, var(--emw--color-primary, #22B04E) 80%, white 30%));\n border: 2px solid var(--emw--button-border-color, #0E5924);\n color: var(--emw--button-text-color, #FFFFFF);\n border-radius: var(--emw--button-border-radius, 10px);\n font-size: var(--emw--size-standard, 16px);\n text-transform: uppercase;\n transition-duration: var(--emw--transition-medium, 250ms);\n max-width: 400px;\n min-width: 200px;\n padding: 13px 0;\n width: 100%;\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton:active {\n background: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n}\n.PlayerDocumentsWrapper .ButtonsArea .SaveButton.Disabled {\n opacity: 0.3;\n cursor: not-allowed;\n}\n.PlayerDocumentsWrapper.skeleton .ReturnButton {\n display: block;\n width: 200px;\n margin-top: 15px;\n margin-bottom: 20px;\n}\n.PlayerDocumentsWrapper.skeleton .Section .SectionContent {\n grid-template-columns: 1fr 1fr;\n max-height: 100%;\n overflow: hidden;\n}\n.PlayerDocumentsWrapper.skeleton .Section .SectionContent .Field {\n height: 60px;\n overflow: hidden;\n}\n.PlayerDocumentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 500px;\n border-radius: 30px;\n overflow: hidden;\n display: block;\n background-image: none;\n border: none;\n}\n@container (max-width: 425px) {\n .PlayerDocumentsWrapper {\n padding: 20px 15px;\n background: var(--emw-color-gray-50, #F9F8F8);\n max-width: unset;\n border-radius: var(--emw--border-radius-small, 5px);\n }\n .PlayerDocumentsWrapper .ReturnButton {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n display: inline-flex;\n align-items: center;\n column-gap: 10px;\n margin-bottom: 10px;\n }\n .PlayerDocumentsWrapper .ReturnButton svg {\n fill: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n }\n .PlayerDocumentsWrapper .HeaderText {\n display: none;\n }\n .PlayerDocumentsWrapper h2 {\n color: var(--emw--pam-color-primary, var(--emw--color-primary, #22B04E));\n font-size: var(--emw--font-size-large, 20px);\n font-weight: var(--emw--font-weight-semibold, 500);\n }\n .PlayerDocumentsWrapper .Section .SectionContent {\n row-gap: 15px;\n grid-template-columns: 1fr;\n }\n .PlayerDocumentsWrapper .Section .SectionContent .CompoundField {\n width: 100%;\n display: flex;\n gap: 10px;\n flex-direction: column;\n }\n .PlayerDocumentsWrapper .Section .SectionTitle {\n margin-top: 5px;\n margin-bottom: 5px;\n font-size: var(--emw--font-size-medium, 16px);\n }\n .PlayerDocumentsWrapper .Section .Field label {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(-emw--font-weight-normal, 400);\n }\n .PlayerDocumentsWrapper .Section .Field input {\n color: var(--emw-color-gray-300, #58586B);\n font-size: var(--emw--size-x-small, 12px);\n font-weight: var(--emw--font-weight-light, 300);\n }\n .PlayerDocumentsWrapper .ButtonsArea {\n grid-column-gap: 10px;\n width: 100%;\n grid-template-columns: 1fr 1fr;\n }\n .PlayerDocumentsWrapper .ButtonsArea .SaveButton {\n font-size: var(--emw--size-x-small, 12px);\n height: 40px;\n color: var(--emw-button-typography, var(--emw-color-white, #FFFFFF));\n }\n .PlayerDocumentsWrapper .ButtonsArea .SaveButton.Disabled {\n color: var(--emw-color-gray-300, #58586B);\n }\n .PlayerDocumentsWrapper.skeleton .Section .SectionContent {\n display: block;\n }\n .PlayerDocumentsWrapper.skeleton .Section .SectionContent .Field {\n margin-bottom: 15px;\n }\n .PlayerDocumentsWrapper.skeleton .ButtonsArea .SaveButton {\n width: 100%;\n height: 100%;\n border-radius: 20px;\n }\n}";export{a as P}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{p as i,b as n}from"./index-3f96eae4.js";export{s as setNonce}from"./index-3f96eae4.js";import{g as e}from"./app-globals-0f993ce5.js";(()=>{const n=import.meta.url,e={};return""!==n&&(e.resourcesUrl=new URL(".",n).href),i(e)})().then((async i=>(await e(),n([["pam-player-documents_2",[[1,"pam-player-documents",{userId:[513,"user-id"],session:[513],endpoint:[513],lang:[513],mbSource:[513,"mb-source"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],isEditable:[513,"is-editable"],isStandAlone:[513,"is-stand-alone"],limitStylingAppends:[32],isSkeletonLoading:[32],isSubmitButtonAvailable:[32],invalidFields:[32],isMobile:[32]},null,{clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[8,"border-radius"],marginBottom:[8,"margin-bottom"],marginTop:[8,"margin-top"],marginLeft:[8,"margin-left"],marginRight:[8,"margin-right"],animation:[4],rows:[2],size:[1],color:[1],primaryColor:[1,"primary-color"],secondaryColor:[1,"secondary-color"]},null,{structure:["handleStructureChange"]}]]]],i))));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{P as pam_player_documents}from"./pam-player-documents-7540c613.js";import{r as e,h as t,H as n}from"./index-3f96eae4.js";const r=class{constructor(t){e(this,t),this.stylingValue={width:this.handleStylingProps(this.width),height:this.handleStylingProps(this.height),borderRadius:this.handleStylingProps(this.borderRadius),marginBottom:this.handleStylingProps(this.marginBottom),marginTop:this.handleStylingProps(this.marginTop),marginLeft:this.handleStylingProps(this.marginLeft),marginRight:this.handleStylingProps(this.marginRight)},this.structure=void 0,this.width="unset",this.height="unset",this.borderRadius="unset",this.marginBottom="unset",this.marginTop="unset",this.marginLeft="unset",this.marginRight="unset",this.animation=!0,this.rows=0,this.size="100%",this.color="#c2c2c2",this.primaryColor="#c2c2c2",this.secondaryColor="#ffffff"}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}handleStylingProps(e){switch(typeof e){case"number":return 0===e?0:`${e}px`;case"undefined":default:return"unset";case"string":return["auto","unset","none","inherit","initial"].includes(e)||e.endsWith("px")||e.endsWith("%")?e:"unset"}}handleStructure(e){switch(e){case"logo":return this.renderLogo();case"image":return this.renderImage();case"title":return this.renderTitle();case"text":return this.renderText();case"rectangle":return this.renderRectangle();case"circle":return this.renderCircle();default:return null}}renderLogo(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Logo "+(this.animation?"Skeleton":"")}))}renderImage(){return t("div",{class:"Image "+(this.animation?"Skeleton":"")})}renderTitle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Title "+(this.animation?"Skeleton":"")}))}renderText(){return t("div",{class:"SkeletonContainer"},Array.from({length:this.rows>0?this.rows:1}).map(((e,n)=>t("div",{key:n,class:"Text "+(this.animation?"Skeleton":"")}))))}renderRectangle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Rectangle "+(this.animation?"Skeleton":"")}))}renderCircle(){return t("div",{class:"SkeletonContainer"},t("div",{class:"Circle "+(this.animation?"Skeleton":"")}))}render(){let e="";switch(this.structure){case"logo":e=`\n :host {\n --emw-skeleton-logo-width: ${this.stylingValue.width};\n --emw-skeleton-logo-height: ${this.stylingValue.height};\n --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};\n --emw-skeleton-logo-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"image":e=`\n :host {\n --emw-skeleton-image-width: ${this.stylingValue.width};\n --emw-skeleton-image-height: ${this.stylingValue.height};\n --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};\n --emw-skeleton-image-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"title":e=`\n :host {\n --emw-skeleton-title-width: ${this.stylingValue.width};\n --emw-skeleton-title-height: ${this.stylingValue.height};\n --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};\n --emw-skeleton-title-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"text":e=`\n :host {\n --emw-skeleton-text-width: ${this.stylingValue.width};\n --emw-skeleton-text-height: ${this.stylingValue.height};\n --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};\n --emw-skeleton-text-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"rectangle":e=`\n :host {\n --emw-skeleton-rectangle-width: ${this.stylingValue.width};\n --emw-skeleton-rectangle-height: ${this.stylingValue.height};\n --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};\n --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};\n --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};\n --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};\n --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};\n --emw-skeleton-rectangle-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.size};\n --emw-skeleton-circle-background: ${this.color};\n --emw-skeleton-primary-color: ${this.primaryColor};\n --emw-skeleton-secondary-color: ${this.secondaryColor};\n }\n `;break;default:e=""}return t(n,{key:"5c185b76c438d20d4ad88bc48d94ff5628410bb7"},t("style",{key:"de95e60a5955d5b2af83710423fe40329c187f7e"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};r.style=":host{display:block;--emw-skeleton-rectangle-background:#c2c2c2;--emw-skeleton-circle-background:#c2c2c2;--emw-skeleton-text-background:#c2c2c2;--emw-skeleton-title-background:#c2c2c2;--emw-skeleton-image-background:#c2c2c2;--emw-skeleton-logo-background:#c2c2c2;--emw-skeleton-primary-color:#e0e0e0;--emw-skeleton-secondary-color:#f0f0f0}.Skeleton{animation:skeleton-loading 1s linear infinite alternate}.Rectangle{background-color:var(--emw-skeleton-rectangle-background, #c2c2c2);width:var(--emw-skeleton-rectangle-width, 400px);height:var(--emw-skeleton-rectangle-height, 200px);border-radius:var(--emw-skeleton-rectangle-border-radius, 2px)}.Circle{background-color:var(--emw-skeleton-circle-background, #c2c2c2);width:var(--emw-skeleton-circle-size, 400px);height:var(--emw-skeleton-circle-size, 400px);border-radius:50%}.Text{background-color:var(--emw-skeleton-text-background, #c2c2c2);width:var(--emw-skeleton-text-width, 500px);height:var(--emw-skeleton-text-height, 20px);border-radius:var(--emw-skeleton-text-border-radius, 5px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:var(--emw-skeleton-text-width-100, 300px)}.Title{background-color:var(--emw-skeleton-title-background, #c2c2c2);width:var(--emw-skeleton-title-width, 300px);height:var(--emw-skeleton-title-height, 30px);border-radius:var(--emw-skeleton-title-border-radius, 5px);margin-bottom:var(--emw-skeleton-title-margin-bottom, 5px)}.Image{background-color:var(--emw-skeleton-image-background, #c2c2c2);width:var(--emw-skeleton-image-width, 100%);height:var(--emw-skeleton-image-height, 100%);border-radius:var(--emw-skeleton-image-border-radius, inherit)}.Logo{background-color:var(--emw-skeleton-logo-background, #c2c2c2);width:var(--emw-skeleton-logo-width, 120px);height:var(--emw-skeleton-logo-height, 75px);border-radius:var(--emw-skeleton-logo-border-radius, 5px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, var(--emw-skeleton-color-0, #c2c2c2))}100%{background-color:var(--emw-skeleton-secondary-color, var(--emw-skeleton-color-100, #f0f0f0))}}";export{r as ui_skeleton}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
|
+
export const config = {
|
|
3
|
+
namespace: 'pam-player-documents',
|
|
4
|
+
taskQueue: 'async',
|
|
5
|
+
sourceMap: false,
|
|
6
|
+
minifyJs: true,
|
|
7
|
+
hashFileNames: false,
|
|
8
|
+
extras: {
|
|
9
|
+
experimentalImportInjection: true
|
|
10
|
+
},
|
|
11
|
+
plugins: [sass()],
|
|
12
|
+
outputTargets: [
|
|
13
|
+
{
|
|
14
|
+
type: 'www'
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { sass } from "@stencil/sass";
|
|
2
|
+
import { cleanPackageJsonStencil } from "../../../tools/plugins";
|
|
3
|
+
export const config = {
|
|
4
|
+
namespace: 'pam-player-documents',
|
|
5
|
+
taskQueue: 'async',
|
|
6
|
+
sourceMap: false,
|
|
7
|
+
minifyJs: true,
|
|
8
|
+
hashFileNames: false,
|
|
9
|
+
extras: {
|
|
10
|
+
experimentalImportInjection: true
|
|
11
|
+
},
|
|
12
|
+
plugins: [sass(), cleanPackageJsonStencil()],
|
|
13
|
+
outputTargets: [
|
|
14
|
+
{
|
|
15
|
+
type: 'dist',
|
|
16
|
+
esmLoaderPath: '../loader'
|
|
17
|
+
}
|
|
18
|
+
]
|
|
19
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import path from "path";
|
|
2
|
+
import { getStoryFiles, detectUsedPackages, parseTsConfig, exec, filterParsedPathsByUsedPackages } from "../../../../libs/common/src/storybook/storybook-utils";
|
|
3
|
+
const config = {
|
|
4
|
+
stories: ['../**/*.@(mdx|stories.@(js|ts|tsx))'],
|
|
5
|
+
addons: [
|
|
6
|
+
'@storybook/addon-essentials',
|
|
7
|
+
'@storybook/addon-interactions',
|
|
8
|
+
'storybook-dark-mode'
|
|
9
|
+
],
|
|
10
|
+
docs: {
|
|
11
|
+
defaultName: 'Documentation',
|
|
12
|
+
autodocs: 'tag'
|
|
13
|
+
},
|
|
14
|
+
framework: {
|
|
15
|
+
name: '@storybook/web-components-vite',
|
|
16
|
+
options: {}
|
|
17
|
+
},
|
|
18
|
+
// Async viteFinal to build dependent packages before finalizing configuration.
|
|
19
|
+
viteFinal: async (config) => {
|
|
20
|
+
const storyFiles = getStoryFiles(path.resolve(__dirname, '../'));
|
|
21
|
+
const usedPackages = detectUsedPackages(storyFiles);
|
|
22
|
+
const buildPromises = usedPackages.map(async (pkg) => {
|
|
23
|
+
try {
|
|
24
|
+
console.log(`Building package ${pkg}...`);
|
|
25
|
+
const { stdout, stderr } = await exec(`nx run ${pkg}:build`);
|
|
26
|
+
console.log(`Built package ${pkg}: ${stdout}`);
|
|
27
|
+
if (stderr) {
|
|
28
|
+
console.error(`Build warning/error for package ${pkg}: ${stderr}`);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
catch (error) {
|
|
32
|
+
console.error(`Error building package ${pkg}:`, error);
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
await Promise.all(buildPromises);
|
|
36
|
+
const parsedPaths = parseTsConfig() || {};
|
|
37
|
+
const filteredParsedPaths = filterParsedPathsByUsedPackages(parsedPaths, usedPackages);
|
|
38
|
+
return Object.assign(Object.assign({}, config), { resolve: {
|
|
39
|
+
alias: Object.assign({}, filteredParsedPaths)
|
|
40
|
+
}, define: {
|
|
41
|
+
process: {
|
|
42
|
+
env: {}
|
|
43
|
+
}
|
|
44
|
+
} });
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
export default config;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { themes } from "@storybook/theming";
|
|
2
|
+
export const parameters = {
|
|
3
|
+
darkMode: {
|
|
4
|
+
dark: Object.assign(Object.assign({}, themes.dark), { appBg: 'black' }),
|
|
5
|
+
light: Object.assign(Object.assign({}, themes.normal), { appBg: 'green' }),
|
|
6
|
+
current: 'light',
|
|
7
|
+
stylePreview: true
|
|
8
|
+
}
|
|
9
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { exec as execCallback } from 'child_process';
|
|
3
|
+
export declare const exec: typeof execCallback.__promisify__;
|
|
4
|
+
/**
|
|
5
|
+
* Recursively retrieves all story files (.stories.ts/.stories.tsx) in a directory.
|
|
6
|
+
* @param dir The directory to search.
|
|
7
|
+
* @returns Array of story file paths.
|
|
8
|
+
*/
|
|
9
|
+
export declare const getStoryFiles: (dir: string) => string[];
|
|
10
|
+
/**
|
|
11
|
+
* Detects which internal packages are used in the provided story files.
|
|
12
|
+
* It looks at every import that starts with the given package alias prefix,
|
|
13
|
+
* then extracts the package name (the segment immediately following the prefix).
|
|
14
|
+
*
|
|
15
|
+
* @param stories Array of story file paths.
|
|
16
|
+
* @returns Array of unique package names (e.g. ['foo', 'bar']).
|
|
17
|
+
*/
|
|
18
|
+
export declare const detectUsedPackages: (stories: string[]) => string[];
|
|
19
|
+
/**
|
|
20
|
+
* Extracts all import paths from a file using the TypeScript compiler API.
|
|
21
|
+
* @param filePath The file path to parse.
|
|
22
|
+
* @returns Array of import strings.
|
|
23
|
+
*/
|
|
24
|
+
export declare const extractImports: (filePath: string) => string[];
|
|
25
|
+
/**
|
|
26
|
+
* Parses the tsconfig paths and resolves them to absolute paths.
|
|
27
|
+
* @param tsconfigPath The path to the tsconfig file.
|
|
28
|
+
* @returns An object mapping alias keys to absolute paths.
|
|
29
|
+
*/
|
|
30
|
+
export declare const parseTsConfig: () => Record<string, string> | null;
|
|
31
|
+
/**
|
|
32
|
+
* Filters the parsed tsconfig alias mapping to only include keys that correspond
|
|
33
|
+
* to the used packages.
|
|
34
|
+
*
|
|
35
|
+
* @param parsedPaths The full alias mapping from tsconfig.
|
|
36
|
+
* @param usedPackages Array of package names that are used (e.g. ['foo', 'bar']).
|
|
37
|
+
* @returns Filtered alias mapping.
|
|
38
|
+
*/
|
|
39
|
+
export declare const filterParsedPathsByUsedPackages: (parsedPaths: Record<string, string>, usedPackages: string[]) => Record<string, string>;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
export declare const parameters: {
|
|
2
|
+
darkMode: {
|
|
3
|
+
dark: {
|
|
4
|
+
appBg: string;
|
|
5
|
+
base: "light" | "dark";
|
|
6
|
+
colorPrimary: string;
|
|
7
|
+
colorSecondary: string;
|
|
8
|
+
appContentBg: string;
|
|
9
|
+
appPreviewBg: string;
|
|
10
|
+
appBorderColor: string;
|
|
11
|
+
appBorderRadius: number;
|
|
12
|
+
fontBase: string;
|
|
13
|
+
fontCode: string;
|
|
14
|
+
textColor: string;
|
|
15
|
+
textInverseColor: string;
|
|
16
|
+
textMutedColor: string;
|
|
17
|
+
barTextColor: string;
|
|
18
|
+
barHoverColor: string;
|
|
19
|
+
barSelectedColor: string;
|
|
20
|
+
barBg: string;
|
|
21
|
+
buttonBg: string;
|
|
22
|
+
buttonBorder: string;
|
|
23
|
+
booleanBg: string;
|
|
24
|
+
booleanSelectedBg: string;
|
|
25
|
+
inputBg: string;
|
|
26
|
+
inputBorder: string;
|
|
27
|
+
inputTextColor: string;
|
|
28
|
+
inputBorderRadius: number;
|
|
29
|
+
brandTitle?: string;
|
|
30
|
+
brandUrl?: string;
|
|
31
|
+
brandImage?: string;
|
|
32
|
+
brandTarget?: string;
|
|
33
|
+
gridCellSize?: number;
|
|
34
|
+
};
|
|
35
|
+
light: {
|
|
36
|
+
appBg: string;
|
|
37
|
+
base: "light" | "dark";
|
|
38
|
+
colorPrimary: string;
|
|
39
|
+
colorSecondary: string;
|
|
40
|
+
appContentBg: string;
|
|
41
|
+
appPreviewBg: string;
|
|
42
|
+
appBorderColor: string;
|
|
43
|
+
appBorderRadius: number;
|
|
44
|
+
fontBase: string;
|
|
45
|
+
fontCode: string;
|
|
46
|
+
textColor: string;
|
|
47
|
+
textInverseColor: string;
|
|
48
|
+
textMutedColor: string;
|
|
49
|
+
barTextColor: string;
|
|
50
|
+
barHoverColor: string;
|
|
51
|
+
barSelectedColor: string;
|
|
52
|
+
barBg: string;
|
|
53
|
+
buttonBg: string;
|
|
54
|
+
buttonBorder: string;
|
|
55
|
+
booleanBg: string;
|
|
56
|
+
booleanSelectedBg: string;
|
|
57
|
+
inputBg: string;
|
|
58
|
+
inputBorder: string;
|
|
59
|
+
inputTextColor: string;
|
|
60
|
+
inputBorderRadius: number;
|
|
61
|
+
brandTitle?: string;
|
|
62
|
+
brandUrl?: string;
|
|
63
|
+
brandImage?: string;
|
|
64
|
+
brandTarget?: string;
|
|
65
|
+
gridCellSize?: number;
|
|
66
|
+
};
|
|
67
|
+
current: string;
|
|
68
|
+
stylePreview: boolean;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PamPlayerDocuments } from './pam-player-documents';
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import "../../../../../../dist/packages/stencil/ui-skeleton/dist/types/index";
|
|
2
|
+
export declare class PamPlayerDocuments {
|
|
3
|
+
userId: string;
|
|
4
|
+
session: string;
|
|
5
|
+
endpoint: string;
|
|
6
|
+
lang: string;
|
|
7
|
+
mbSource: string;
|
|
8
|
+
clientStyling: string;
|
|
9
|
+
clientStylingUrl: string;
|
|
10
|
+
translationUrl: string;
|
|
11
|
+
isEditable: string;
|
|
12
|
+
isStandAlone: string;
|
|
13
|
+
limitStylingAppends: boolean;
|
|
14
|
+
isSkeletonLoading: boolean;
|
|
15
|
+
isSubmitButtonAvailable: boolean;
|
|
16
|
+
invalidFields: number;
|
|
17
|
+
isMobile: boolean;
|
|
18
|
+
private stylingContainer;
|
|
19
|
+
private stylingSubscription;
|
|
20
|
+
data: any;
|
|
21
|
+
dataRef: Record<string, Record<string, any>>;
|
|
22
|
+
fieldsState: Record<string, any>;
|
|
23
|
+
handleStylingChange(newValue: string, oldValue: string): void;
|
|
24
|
+
handleStylingUrlChange(newValue: string, oldValue: string): void;
|
|
25
|
+
componentWillLoad(): Promise<void>;
|
|
26
|
+
componentDidLoad(): void;
|
|
27
|
+
disconnectedCallback(): void;
|
|
28
|
+
sendLoadedMessage: () => void;
|
|
29
|
+
sendValidMessage: () => void;
|
|
30
|
+
sendSuccessNotification: () => void;
|
|
31
|
+
sendErrorNotification: (errorKey: string) => void;
|
|
32
|
+
sendData: () => void;
|
|
33
|
+
messageHandler: (message: MessageEvent) => void;
|
|
34
|
+
getData: () => Promise<void>;
|
|
35
|
+
initData(): void;
|
|
36
|
+
buildFieldState: (isValid: any, initialValue: any, rule: any) => any;
|
|
37
|
+
initEditableFieldsState(): void;
|
|
38
|
+
resetState: () => void;
|
|
39
|
+
updateState: (sectionKey: any) => (e: any) => void;
|
|
40
|
+
updateData: (e: any) => void;
|
|
41
|
+
updateSubmitButtonStatus: () => void;
|
|
42
|
+
editableField: (sectionKey: string, fieldKey: string, labelTranslationKey: string, errorTranslationKey: string) => HTMLElement;
|
|
43
|
+
staticField: (sectionKey: string, fieldKey: string, labelTranslationKey: string) => HTMLElement;
|
|
44
|
+
toggleScreen: () => void;
|
|
45
|
+
render(): any;
|
|
46
|
+
}
|