@everymatrix/general-footer-template 1.69.0 → 1.69.3

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.
@@ -19,7 +19,7 @@ var patchBrowser = () => {
19
19
 
20
20
  patchBrowser().then(async (options) => {
21
21
  await appGlobals.globalScripts();
22
- return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
22
+ return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[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]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
23
23
  });
24
24
 
25
25
  exports.setNonce = index.setNonce;
@@ -8,7 +8,7 @@ const appGlobals = require('./app-globals-3a1e7e63.js');
8
8
  const defineCustomElements = async (win, options) => {
9
9
  if (typeof window === 'undefined') return undefined;
10
10
  await appGlobals.globalScripts();
11
- return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
11
+ return index.bootstrapLazy([["custom-content-section.cjs",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list.cjs",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock.cjs",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template.cjs",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2.cjs",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[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]},null,{"structure":["handleStructureChange"]}]]],["image-list.cjs",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
12
12
  };
13
13
 
14
14
  exports.setNonce = index.setNonce;
@@ -67,32 +67,58 @@ const UiImage = class {
67
67
  };
68
68
  UiImage.style = UiImageStyle0;
69
69
 
70
- 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))}}";
70
+ const uiSkeletonCss = ":host{display:block}.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, 10px)}.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, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.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, 10px);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, unset)}.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, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
71
71
  const UiSkeletonStyle0 = uiSkeletonCss;
72
72
 
73
73
  const UiSkeleton = class {
74
74
  constructor(hostRef) {
75
75
  index.registerInstance(this, hostRef);
76
+ this.stylingValue = {
77
+ width: this.handleStylingProps(this.width),
78
+ height: this.handleStylingProps(this.height),
79
+ borderRadius: this.handleStylingProps(this.borderRadius),
80
+ marginBottom: this.handleStylingProps(this.marginBottom),
81
+ marginTop: this.handleStylingProps(this.marginTop),
82
+ marginLeft: this.handleStylingProps(this.marginLeft),
83
+ marginRight: this.handleStylingProps(this.marginRight),
84
+ size: this.handleStylingProps(this.size)
85
+ };
76
86
  this.structure = undefined;
77
- this.width = undefined;
78
- this.height = undefined;
79
- this.borderRadius = undefined;
80
- this.marginBottom = undefined;
81
- this.marginTop = undefined;
82
- this.marginLeft = undefined;
83
- this.marginRight = undefined;
87
+ this.width = 'unset';
88
+ this.height = 'unset';
89
+ this.borderRadius = 'unset';
90
+ this.marginBottom = 'unset';
91
+ this.marginTop = 'unset';
92
+ this.marginLeft = 'unset';
93
+ this.marginRight = 'unset';
84
94
  this.animation = true;
85
- this.rows = undefined;
86
- this.size = undefined;
87
- this.color = undefined;
88
- this.primaryColor = undefined;
89
- this.secondaryColor = undefined;
95
+ this.rows = 0;
96
+ this.size = '100%';
90
97
  }
91
98
  handleStructureChange(newValue, oldValue) {
92
99
  if (oldValue !== newValue) {
93
100
  this.handleStructure(newValue);
94
101
  }
95
102
  }
103
+ handleStylingProps(value) {
104
+ switch (typeof value) {
105
+ case 'number':
106
+ return value === 0 ? 0 : `${value}px`;
107
+ case 'undefined':
108
+ return 'unset';
109
+ case 'string':
110
+ if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
111
+ value.endsWith('px') ||
112
+ value.endsWith('%')) {
113
+ return value;
114
+ }
115
+ else {
116
+ return 'unset';
117
+ }
118
+ default:
119
+ return 'unset';
120
+ }
121
+ }
96
122
  handleStructure(structure) {
97
123
  switch (structure) {
98
124
  case 'logo':
@@ -112,22 +138,22 @@ const UiSkeleton = class {
112
138
  }
113
139
  }
114
140
  renderLogo() {
115
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: "Logo " + (this.animation ? 'Skeleton' : '') })));
141
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
116
142
  }
117
143
  renderImage() {
118
- return (index.h("div", { class: "Image " + (this.animation ? 'Skeleton' : '') }));
144
+ return index.h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
119
145
  }
120
146
  renderTitle() {
121
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: "Title " + (this.animation ? 'Skeleton' : '') })));
147
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
122
148
  }
123
149
  renderText() {
124
- return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: "Text " + (this.animation ? 'Skeleton' : '') })))));
150
+ return (index.h("div", { class: "SkeletonContainer" }, Array.from({ length: this.rows > 0 ? this.rows : 1 }).map((_, index$1) => (index.h("div", { key: index$1, class: 'Text ' + (this.animation ? 'Skeleton' : '') })))));
125
151
  }
126
152
  renderRectangle() {
127
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: "Rectangle " + (this.animation ? 'Skeleton' : '') })));
153
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
128
154
  }
129
155
  renderCircle() {
130
- return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: "Circle " + (this.animation ? 'Skeleton' : '') })));
156
+ return (index.h("div", { class: "SkeletonContainer" }, index.h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
131
157
  }
132
158
  render() {
133
159
  let styleBlock = '';
@@ -135,97 +161,79 @@ const UiSkeleton = class {
135
161
  case 'logo':
136
162
  styleBlock = `
137
163
  :host {
138
- --emw-skeleton-logo-width: ${this.width};
139
- --emw-skeleton-logo-height: ${this.height};
140
- --emw-skeleton-logo-border-radius: ${this.borderRadius}px;
141
- --emw-skeleton-logo-margin-bottom: ${this.marginBottom}px;
142
- --emw-skeleton-logo-margin-top: ${this.marginTop}px;
143
- --emw-skeleton-logo-margin-left: ${this.marginLeft}px;
144
- --emw-skeleton-logo-margin-right: ${this.marginRight}px;
145
- --emw-skeleton-logo-background: ${this.color};
146
- --emw-skeleton-primary-color: ${this.primaryColor};
147
- --emw-skeleton-secondary-color: ${this.secondaryColor};
164
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
165
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
166
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
167
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
168
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
169
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
170
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
148
171
  }
149
172
  `;
150
173
  break;
151
174
  case 'image':
152
175
  styleBlock = `
153
176
  :host {
154
- --emw-skeleton-image-width: ${this.width};
155
- --emw-skeleton-image-height: ${this.height};
156
- --emw-skeleton-image-border-radius: ${this.borderRadius}px;
157
- --emw-skeleton-image-margin-bottom: ${this.marginBottom}px;
158
- --emw-skeleton-image-margin-top: ${this.marginTop}px;
159
- --emw-skeleton-image-margin-left: ${this.marginLeft}px;
160
- --emw-skeleton-image-margin-right: ${this.marginRight}px;
161
- --emw-skeleton-image-background: ${this.color};
162
- --emw-skeleton-primary-color: ${this.primaryColor};
163
- --emw-skeleton-secondary-color: ${this.secondaryColor};
177
+ --emw-skeleton-image-width: ${this.stylingValue.width};
178
+ --emw-skeleton-image-height: ${this.stylingValue.height};
179
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
180
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
181
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
182
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
183
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
164
184
  }
165
185
  `;
166
186
  break;
167
187
  case 'title':
168
188
  styleBlock = `
169
189
  :host {
170
- --emw-skeleton-title-width: ${this.width};
171
- --emw-skeleton-title-height: ${this.height};
172
- --emw-skeleton-title-border-radius: ${this.borderRadius}px;
173
- --emw-skeleton-title-margin-bottom: ${this.marginBottom}px;
174
- --emw-skeleton-title-margin-top: ${this.marginTop}px;
175
- --emw-skeleton-title-margin-left: ${this.marginLeft}px;
176
- --emw-skeleton-title-margin-right: ${this.marginRight}px;
177
- --emw-skeleton-title-background: ${this.color};
178
- --emw-skeleton-primary-color: ${this.primaryColor};
179
- --emw-skeleton-secondary-color: ${this.secondaryColor};
190
+ --emw-skeleton-title-width: ${this.stylingValue.width};
191
+ --emw-skeleton-title-height: ${this.stylingValue.height};
192
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
193
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
194
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
195
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
196
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
180
197
  }
181
198
  `;
182
199
  break;
183
200
  case 'text':
184
201
  styleBlock = `
185
202
  :host {
186
- --emw-skeleton-text-width: ${this.width};
187
- --emw-skeleton-text-height: ${this.height};
188
- --emw-skeleton-text-border-radius: ${this.borderRadius}px;
189
- --emw-skeleton-text-margin-bottom: ${this.marginBottom}px;
190
- --emw-skeleton-text-margin-top: ${this.marginTop}px;
191
- --emw-skeleton-text-margin-left: ${this.marginLeft}px;
192
- --emw-skeleton-text-margin-right: ${this.marginRight}px;
193
- --emw-skeleton-text-background: ${this.color};
194
- --emw-skeleton-primary-color: ${this.primaryColor};
195
- --emw-skeleton-secondary-color: ${this.secondaryColor};
203
+ --emw-skeleton-text-width: ${this.stylingValue.width};
204
+ --emw-skeleton-text-height: ${this.stylingValue.height};
205
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
206
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
207
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
208
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
209
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
196
210
  }
197
211
  `;
198
212
  break;
199
213
  case 'rectangle':
200
214
  styleBlock = `
201
215
  :host {
202
- --emw-skeleton-rectangle-width: ${this.width};
203
- --emw-skeleton-rectangle-height: ${this.height};
204
- --emw-skeleton-rectangle-border-radius: ${this.borderRadius}px;
205
- --emw-skeleton-rectangle-margin-bottom: ${this.marginBottom}px;
206
- --emw-skeleton-rectangle-margin-top: ${this.marginTop}px;
207
- --emw-skeleton-rectangle-margin-left: ${this.marginLeft}px;
208
- --emw-skeleton-rectangle-margin-right: ${this.marginRight}px;
209
- --emw-skeleton-rectangle-background: ${this.color};
210
- --emw-skeleton-primary-color: ${this.primaryColor};
211
- --emw-skeleton-secondary-color: ${this.secondaryColor};
216
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
217
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
218
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
219
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
220
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
221
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
222
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
212
223
  }
213
224
  `;
214
225
  break;
215
226
  case 'circle':
216
227
  styleBlock = `
217
228
  :host {
218
- --emw-skeleton-circle-size: ${this.size};
219
- --emw-skeleton-circle-background: ${this.color};
220
- --emw-skeleton-primary-color: ${this.primaryColor};
221
- --emw-skeleton-secondary-color: ${this.secondaryColor};
229
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
222
230
  }
223
231
  `;
224
232
  break;
225
233
  default:
226
234
  styleBlock = '';
227
235
  }
228
- return (index.h(index.Host, { key: '3bb792a149db7fe732d5cbfa092cdb4d6ca0689e' }, index.h("style", { key: 'a4607599b60659f385ae2660513e38b383739674' }, styleBlock), this.handleStructure(this.structure)));
236
+ return (index.h(index.Host, { key: 'e6b885bfd985ce7663d990756fe9101e25eb97f0' }, index.h("style", { key: '06ae24c7bb74f4dacfc12ae58085333f9dc89da5' }, styleBlock), this.handleStructure(this.structure)));
229
237
  }
230
238
  static get watchers() { return {
231
239
  "structure": ["handleStructureChange"]
@@ -16,5 +16,5 @@ var patchBrowser = () => {
16
16
 
17
17
  patchBrowser().then(async (options) => {
18
18
  await globalScripts();
19
- return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
19
+ return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[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]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
20
20
  });
@@ -5,7 +5,7 @@ import { g as globalScripts } from './app-globals-0f993ce5.js';
5
5
  const defineCustomElements = async (win, options) => {
6
6
  if (typeof window === 'undefined') return undefined;
7
7
  await globalScripts();
8
- return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[0,"ui-skeleton",{"structure":[1],"width":[1],"height":[1],"borderRadius":[2,"border-radius"],"marginBottom":[2,"margin-bottom"],"marginTop":[2,"margin-top"],"marginLeft":[2,"margin-left"],"marginRight":[2,"margin-right"],"animation":[4],"rows":[2],"size":[1],"color":[1],"primaryColor":[1,"primary-color"],"secondaryColor":[1,"secondary-color"]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
8
+ return bootstrapLazy([["custom-content-section",[[2,"custom-content-section",{"customContent":[1,"custom-content"],"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[516,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{"repeaterContent":[8,"repeater-content"],"baseUrl":[513,"base-url"],"language":[513],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"translationUrl":[513,"translation-url"],"language":[513],"timeString":[32]},null,{"translationUrl":["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{"language":[513],"sections":[513],"endpoint":[513],"env":[513],"userRoles":[513,"user-roles"],"userid":[513],"session":[513],"baseUrl":[513,"base-url"],"navigateViaEvent":[513,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"],"clientStyling":[513,"client-styling"],"clientStylingUrl":[513,"client-styling-url"],"translationUrl":[513,"translation-url"],"clockFormat":[513,"clock-format"],"timeZone":[513,"time-zone"],"mbSource":[513,"mb-source"],"hasErrors":[32]}]]],["ui-image_2",[[0,"ui-image",{"src":[1],"width":[1],"height":[1],"alt":[1],"styles":[8],"detectDistance":[1,"detect-distance"],"imgLoaded":[32],"shouldLoad":[32]},null,{"src":["handleSrc"]}],[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]},null,{"structure":["handleStructureChange"]}]]],["image-list",[[2,"image-list",{"repeaterContent":[8,"repeater-content"],"navigateViaEvent":[4,"navigate-via-event"],"postMessageEvent":[513,"post-message-event"]}]]]], options);
9
9
  };
10
10
 
11
11
  export { defineCustomElements };
@@ -63,32 +63,58 @@ const UiImage = class {
63
63
  };
64
64
  UiImage.style = UiImageStyle0;
65
65
 
66
- 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))}}";
66
+ const uiSkeletonCss = ":host{display:block}.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, 10px)}.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, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.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, 10px);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, unset)}.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, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";
67
67
  const UiSkeletonStyle0 = uiSkeletonCss;
68
68
 
69
69
  const UiSkeleton = class {
70
70
  constructor(hostRef) {
71
71
  registerInstance(this, hostRef);
72
+ this.stylingValue = {
73
+ width: this.handleStylingProps(this.width),
74
+ height: this.handleStylingProps(this.height),
75
+ borderRadius: this.handleStylingProps(this.borderRadius),
76
+ marginBottom: this.handleStylingProps(this.marginBottom),
77
+ marginTop: this.handleStylingProps(this.marginTop),
78
+ marginLeft: this.handleStylingProps(this.marginLeft),
79
+ marginRight: this.handleStylingProps(this.marginRight),
80
+ size: this.handleStylingProps(this.size)
81
+ };
72
82
  this.structure = undefined;
73
- this.width = undefined;
74
- this.height = undefined;
75
- this.borderRadius = undefined;
76
- this.marginBottom = undefined;
77
- this.marginTop = undefined;
78
- this.marginLeft = undefined;
79
- this.marginRight = undefined;
83
+ this.width = 'unset';
84
+ this.height = 'unset';
85
+ this.borderRadius = 'unset';
86
+ this.marginBottom = 'unset';
87
+ this.marginTop = 'unset';
88
+ this.marginLeft = 'unset';
89
+ this.marginRight = 'unset';
80
90
  this.animation = true;
81
- this.rows = undefined;
82
- this.size = undefined;
83
- this.color = undefined;
84
- this.primaryColor = undefined;
85
- this.secondaryColor = undefined;
91
+ this.rows = 0;
92
+ this.size = '100%';
86
93
  }
87
94
  handleStructureChange(newValue, oldValue) {
88
95
  if (oldValue !== newValue) {
89
96
  this.handleStructure(newValue);
90
97
  }
91
98
  }
99
+ handleStylingProps(value) {
100
+ switch (typeof value) {
101
+ case 'number':
102
+ return value === 0 ? 0 : `${value}px`;
103
+ case 'undefined':
104
+ return 'unset';
105
+ case 'string':
106
+ if (['auto', 'unset', 'none', 'inherit', 'initial'].includes(value) ||
107
+ value.endsWith('px') ||
108
+ value.endsWith('%')) {
109
+ return value;
110
+ }
111
+ else {
112
+ return 'unset';
113
+ }
114
+ default:
115
+ return 'unset';
116
+ }
117
+ }
92
118
  handleStructure(structure) {
93
119
  switch (structure) {
94
120
  case 'logo':
@@ -108,22 +134,22 @@ const UiSkeleton = class {
108
134
  }
109
135
  }
110
136
  renderLogo() {
111
- return (h("div", { class: "SkeletonContainer" }, h("div", { class: "Logo " + (this.animation ? 'Skeleton' : '') })));
137
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Logo ' + (this.animation ? 'Skeleton' : '') })));
112
138
  }
113
139
  renderImage() {
114
- return (h("div", { class: "Image " + (this.animation ? 'Skeleton' : '') }));
140
+ return h("div", { class: 'Image ' + (this.animation ? 'Skeleton' : '') });
115
141
  }
116
142
  renderTitle() {
117
- return (h("div", { class: "SkeletonContainer" }, h("div", { class: "Title " + (this.animation ? 'Skeleton' : '') })));
143
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Title ' + (this.animation ? 'Skeleton' : '') })));
118
144
  }
119
145
  renderText() {
120
- 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' : '') })))));
146
+ 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' : '') })))));
121
147
  }
122
148
  renderRectangle() {
123
- return (h("div", { class: "SkeletonContainer" }, h("div", { class: "Rectangle " + (this.animation ? 'Skeleton' : '') })));
149
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Rectangle ' + (this.animation ? 'Skeleton' : '') })));
124
150
  }
125
151
  renderCircle() {
126
- return (h("div", { class: "SkeletonContainer" }, h("div", { class: "Circle " + (this.animation ? 'Skeleton' : '') })));
152
+ return (h("div", { class: "SkeletonContainer" }, h("div", { class: 'Circle ' + (this.animation ? 'Skeleton' : '') })));
127
153
  }
128
154
  render() {
129
155
  let styleBlock = '';
@@ -131,97 +157,79 @@ const UiSkeleton = class {
131
157
  case 'logo':
132
158
  styleBlock = `
133
159
  :host {
134
- --emw-skeleton-logo-width: ${this.width};
135
- --emw-skeleton-logo-height: ${this.height};
136
- --emw-skeleton-logo-border-radius: ${this.borderRadius}px;
137
- --emw-skeleton-logo-margin-bottom: ${this.marginBottom}px;
138
- --emw-skeleton-logo-margin-top: ${this.marginTop}px;
139
- --emw-skeleton-logo-margin-left: ${this.marginLeft}px;
140
- --emw-skeleton-logo-margin-right: ${this.marginRight}px;
141
- --emw-skeleton-logo-background: ${this.color};
142
- --emw-skeleton-primary-color: ${this.primaryColor};
143
- --emw-skeleton-secondary-color: ${this.secondaryColor};
160
+ --emw-skeleton-logo-width: ${this.stylingValue.width};
161
+ --emw-skeleton-logo-height: ${this.stylingValue.height};
162
+ --emw-skeleton-logo-border-radius: ${this.stylingValue.borderRadius};
163
+ --emw-skeleton-logo-margin-bottom: ${this.stylingValue.marginBottom};
164
+ --emw-skeleton-logo-margin-top: ${this.stylingValue.marginTop};
165
+ --emw-skeleton-logo-margin-left: ${this.stylingValue.marginLeft};
166
+ --emw-skeleton-logo-margin-right: ${this.stylingValue.marginRight};
144
167
  }
145
168
  `;
146
169
  break;
147
170
  case 'image':
148
171
  styleBlock = `
149
172
  :host {
150
- --emw-skeleton-image-width: ${this.width};
151
- --emw-skeleton-image-height: ${this.height};
152
- --emw-skeleton-image-border-radius: ${this.borderRadius}px;
153
- --emw-skeleton-image-margin-bottom: ${this.marginBottom}px;
154
- --emw-skeleton-image-margin-top: ${this.marginTop}px;
155
- --emw-skeleton-image-margin-left: ${this.marginLeft}px;
156
- --emw-skeleton-image-margin-right: ${this.marginRight}px;
157
- --emw-skeleton-image-background: ${this.color};
158
- --emw-skeleton-primary-color: ${this.primaryColor};
159
- --emw-skeleton-secondary-color: ${this.secondaryColor};
173
+ --emw-skeleton-image-width: ${this.stylingValue.width};
174
+ --emw-skeleton-image-height: ${this.stylingValue.height};
175
+ --emw-skeleton-image-border-radius: ${this.stylingValue.borderRadius};
176
+ --emw-skeleton-image-margin-bottom: ${this.stylingValue.marginBottom};
177
+ --emw-skeleton-image-margin-top: ${this.stylingValue.marginTop};
178
+ --emw-skeleton-image-margin-left: ${this.stylingValue.marginLeft};
179
+ --emw-skeleton-image-margin-right: ${this.stylingValue.marginRight};
160
180
  }
161
181
  `;
162
182
  break;
163
183
  case 'title':
164
184
  styleBlock = `
165
185
  :host {
166
- --emw-skeleton-title-width: ${this.width};
167
- --emw-skeleton-title-height: ${this.height};
168
- --emw-skeleton-title-border-radius: ${this.borderRadius}px;
169
- --emw-skeleton-title-margin-bottom: ${this.marginBottom}px;
170
- --emw-skeleton-title-margin-top: ${this.marginTop}px;
171
- --emw-skeleton-title-margin-left: ${this.marginLeft}px;
172
- --emw-skeleton-title-margin-right: ${this.marginRight}px;
173
- --emw-skeleton-title-background: ${this.color};
174
- --emw-skeleton-primary-color: ${this.primaryColor};
175
- --emw-skeleton-secondary-color: ${this.secondaryColor};
186
+ --emw-skeleton-title-width: ${this.stylingValue.width};
187
+ --emw-skeleton-title-height: ${this.stylingValue.height};
188
+ --emw-skeleton-title-border-radius: ${this.stylingValue.borderRadius};
189
+ --emw-skeleton-title-margin-bottom: ${this.stylingValue.marginBottom};
190
+ --emw-skeleton-title-margin-top: ${this.stylingValue.marginTop};
191
+ --emw-skeleton-title-margin-left: ${this.stylingValue.marginLeft};
192
+ --emw-skeleton-title-margin-right: ${this.stylingValue.marginRight};
176
193
  }
177
194
  `;
178
195
  break;
179
196
  case 'text':
180
197
  styleBlock = `
181
198
  :host {
182
- --emw-skeleton-text-width: ${this.width};
183
- --emw-skeleton-text-height: ${this.height};
184
- --emw-skeleton-text-border-radius: ${this.borderRadius}px;
185
- --emw-skeleton-text-margin-bottom: ${this.marginBottom}px;
186
- --emw-skeleton-text-margin-top: ${this.marginTop}px;
187
- --emw-skeleton-text-margin-left: ${this.marginLeft}px;
188
- --emw-skeleton-text-margin-right: ${this.marginRight}px;
189
- --emw-skeleton-text-background: ${this.color};
190
- --emw-skeleton-primary-color: ${this.primaryColor};
191
- --emw-skeleton-secondary-color: ${this.secondaryColor};
199
+ --emw-skeleton-text-width: ${this.stylingValue.width};
200
+ --emw-skeleton-text-height: ${this.stylingValue.height};
201
+ --emw-skeleton-text-border-radius: ${this.stylingValue.borderRadius};
202
+ --emw-skeleton-text-margin-bottom: ${this.stylingValue.marginBottom};
203
+ --emw-skeleton-text-margin-top: ${this.stylingValue.marginTop};
204
+ --emw-skeleton-text-margin-left: ${this.stylingValue.marginLeft};
205
+ --emw-skeleton-text-margin-right: ${this.stylingValue.marginRight};
192
206
  }
193
207
  `;
194
208
  break;
195
209
  case 'rectangle':
196
210
  styleBlock = `
197
211
  :host {
198
- --emw-skeleton-rectangle-width: ${this.width};
199
- --emw-skeleton-rectangle-height: ${this.height};
200
- --emw-skeleton-rectangle-border-radius: ${this.borderRadius}px;
201
- --emw-skeleton-rectangle-margin-bottom: ${this.marginBottom}px;
202
- --emw-skeleton-rectangle-margin-top: ${this.marginTop}px;
203
- --emw-skeleton-rectangle-margin-left: ${this.marginLeft}px;
204
- --emw-skeleton-rectangle-margin-right: ${this.marginRight}px;
205
- --emw-skeleton-rectangle-background: ${this.color};
206
- --emw-skeleton-primary-color: ${this.primaryColor};
207
- --emw-skeleton-secondary-color: ${this.secondaryColor};
212
+ --emw-skeleton-rectangle-width: ${this.stylingValue.width};
213
+ --emw-skeleton-rectangle-height: ${this.stylingValue.height};
214
+ --emw-skeleton-rectangle-border-radius: ${this.stylingValue.borderRadius};
215
+ --emw-skeleton-rectangle-margin-bottom: ${this.stylingValue.marginBottom};
216
+ --emw-skeleton-rectangle-margin-top: ${this.stylingValue.marginTop};
217
+ --emw-skeleton-rectangle-margin-left: ${this.stylingValue.marginLeft};
218
+ --emw-skeleton-rectangle-margin-right: ${this.stylingValue.marginRight};
208
219
  }
209
220
  `;
210
221
  break;
211
222
  case 'circle':
212
223
  styleBlock = `
213
224
  :host {
214
- --emw-skeleton-circle-size: ${this.size};
215
- --emw-skeleton-circle-background: ${this.color};
216
- --emw-skeleton-primary-color: ${this.primaryColor};
217
- --emw-skeleton-secondary-color: ${this.secondaryColor};
225
+ --emw-skeleton-circle-size: ${this.stylingValue.size};
218
226
  }
219
227
  `;
220
228
  break;
221
229
  default:
222
230
  styleBlock = '';
223
231
  }
224
- return (h(Host, { key: '3bb792a149db7fe732d5cbfa092cdb4d6ca0689e' }, h("style", { key: 'a4607599b60659f385ae2660513e38b383739674' }, styleBlock), this.handleStructure(this.structure)));
232
+ return (h(Host, { key: 'e6b885bfd985ce7663d990756fe9101e25eb97f0' }, h("style", { key: '06ae24c7bb74f4dacfc12ae58085333f9dc89da5' }, styleBlock), this.handleStructure(this.structure)));
225
233
  }
226
234
  static get watchers() { return {
227
235
  "structure": ["handleStructureChange"]
@@ -1 +1 @@
1
- import{p as e,b as t}from"./index-83985f06.js";export{s as setNonce}from"./index-83985f06.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t([["custom-content-section",[[2,"custom-content-section",{customContent:[1,"custom-content"],repeaterContent:[8,"repeater-content"],navigateViaEvent:[516,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{repeaterContent:[8,"repeater-content"],baseUrl:[513,"base-url"],language:[513],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],translationUrl:[513,"translation-url"],language:[513],timeString:[32]},null,{translationUrl:["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{language:[513],sections:[513],endpoint:[513],env:[513],userRoles:[513,"user-roles"],userid:[513],session:[513],baseUrl:[513,"base-url"],navigateViaEvent:[513,"navigate-via-event"],postMessageEvent:[513,"post-message-event"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],mbSource:[513,"mb-source"],hasErrors:[32]}]]],["ui-image_2",[[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}],[0,"ui-skeleton",{structure:[1],width:[1],height:[1],borderRadius:[2,"border-radius"],marginBottom:[2,"margin-bottom"],marginTop:[2,"margin-top"],marginLeft:[2,"margin-left"],marginRight:[2,"margin-right"],animation:[4],rows:[2],size:[1],color:[1],primaryColor:[1,"primary-color"],secondaryColor:[1,"secondary-color"]},null,{structure:["handleStructureChange"]}]]],["image-list",[[2,"image-list",{repeaterContent:[8,"repeater-content"],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]]],e))));
1
+ import{p as e,b as t}from"./index-83985f06.js";export{s as setNonce}from"./index-83985f06.js";import{g as n}from"./app-globals-0f993ce5.js";(()=>{const t=import.meta.url,n={};return""!==t&&(n.resourcesUrl=new URL(".",t).href),e(n)})().then((async e=>(await n(),t([["custom-content-section",[[2,"custom-content-section",{customContent:[1,"custom-content"],repeaterContent:[8,"repeater-content"],navigateViaEvent:[516,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["link-section-list",[[0,"link-section-list",{repeaterContent:[8,"repeater-content"],baseUrl:[513,"base-url"],language:[513],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]],["custom-clock",[[2,"custom-clock",{clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],translationUrl:[513,"translation-url"],language:[513],timeString:[32]},null,{translationUrl:["handleNewTranslations"]}]]],["general-footer-template",[[1,"general-footer-template",{language:[513],sections:[513],endpoint:[513],env:[513],userRoles:[513,"user-roles"],userid:[513],session:[513],baseUrl:[513,"base-url"],navigateViaEvent:[513,"navigate-via-event"],postMessageEvent:[513,"post-message-event"],clientStyling:[513,"client-styling"],clientStylingUrl:[513,"client-styling-url"],translationUrl:[513,"translation-url"],clockFormat:[513,"clock-format"],timeZone:[513,"time-zone"],mbSource:[513,"mb-source"],hasErrors:[32]}]]],["ui-image_2",[[0,"ui-image",{src:[1],width:[1],height:[1],alt:[1],styles:[8],detectDistance:[1,"detect-distance"],imgLoaded:[32],shouldLoad:[32]},null,{src:["handleSrc"]}],[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]},null,{structure:["handleStructureChange"]}]]],["image-list",[[2,"image-list",{repeaterContent:[8,"repeater-content"],navigateViaEvent:[4,"navigate-via-event"],postMessageEvent:[513,"post-message-event"]}]]]],e))));
@@ -1 +1 @@
1
- import{r as e,h as t,H as i,g as n}from"./index-83985f06.js";const o=class{constructor(t){e(this,t),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const e=new Image;e.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,e.onload=null)},e.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.__uxComponent;t&&(t.shouldLoad=!0,t.handleSrc()),window.EMUxObserver.unobserve(e.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return t(i,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&t("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),t("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:e=>this.image=e,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return n(this)}static get watchers(){return{src:["handleSrc"]}}};o.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";const s=class{constructor(t){e(this,t),this.structure=void 0,this.width=void 0,this.height=void 0,this.borderRadius=void 0,this.marginBottom=void 0,this.marginTop=void 0,this.marginLeft=void 0,this.marginRight=void 0,this.animation=!0,this.rows=void 0,this.size=void 0,this.color=void 0,this.primaryColor=void 0,this.secondaryColor=void 0}handleStructureChange(e,t){t!==e&&this.handleStructure(e)}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,i)=>t("div",{key:i,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.width};\n --emw-skeleton-logo-height: ${this.height};\n --emw-skeleton-logo-border-radius: ${this.borderRadius}px;\n --emw-skeleton-logo-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-logo-margin-top: ${this.marginTop}px;\n --emw-skeleton-logo-margin-left: ${this.marginLeft}px;\n --emw-skeleton-logo-margin-right: ${this.marginRight}px;\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.width};\n --emw-skeleton-image-height: ${this.height};\n --emw-skeleton-image-border-radius: ${this.borderRadius}px;\n --emw-skeleton-image-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-image-margin-top: ${this.marginTop}px;\n --emw-skeleton-image-margin-left: ${this.marginLeft}px;\n --emw-skeleton-image-margin-right: ${this.marginRight}px;\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.width};\n --emw-skeleton-title-height: ${this.height};\n --emw-skeleton-title-border-radius: ${this.borderRadius}px;\n --emw-skeleton-title-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-title-margin-top: ${this.marginTop}px;\n --emw-skeleton-title-margin-left: ${this.marginLeft}px;\n --emw-skeleton-title-margin-right: ${this.marginRight}px;\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.width};\n --emw-skeleton-text-height: ${this.height};\n --emw-skeleton-text-border-radius: ${this.borderRadius}px;\n --emw-skeleton-text-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-text-margin-top: ${this.marginTop}px;\n --emw-skeleton-text-margin-left: ${this.marginLeft}px;\n --emw-skeleton-text-margin-right: ${this.marginRight}px;\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.width};\n --emw-skeleton-rectangle-height: ${this.height};\n --emw-skeleton-rectangle-border-radius: ${this.borderRadius}px;\n --emw-skeleton-rectangle-margin-bottom: ${this.marginBottom}px;\n --emw-skeleton-rectangle-margin-top: ${this.marginTop}px;\n --emw-skeleton-rectangle-margin-left: ${this.marginLeft}px;\n --emw-skeleton-rectangle-margin-right: ${this.marginRight}px;\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(i,{key:"3bb792a149db7fe732d5cbfa092cdb4d6ca0689e"},t("style",{key:"a4607599b60659f385ae2660513e38b383739674"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};s.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{o as ui_image,s as ui_skeleton}
1
+ import{r as e,h as t,H as i,g as s}from"./index-83985f06.js";const n=class{constructor(t){e(this,t),this.src=void 0,this.width=void 0,this.height=void 0,this.alt=void 0,this.styles=void 0,this.detectDistance="200px",this.imgLoaded=!1,this.shouldLoad=!1}handleSrc(){if(!this.shouldLoad)return;const e=new Image;e.onload=()=>{this.image&&(this.image.src=this.src,this.imgLoaded=!0,e.onload=null)},e.src=this.src}componentDidLoad(){"IntersectionObserver"in window?(this.el.__uxComponent=this,window.EMUxObserver||(window.EMUxObserver=new IntersectionObserver((e=>{e.forEach((e=>{if(e.isIntersecting){const t=e.target.__uxComponent;t&&(t.shouldLoad=!0,t.handleSrc()),window.EMUxObserver.unobserve(e.target)}}))}),{rootMargin:this.detectDistance})),window.EMUxObserver.observe(this.el)):(this.shouldLoad=!0,this.handleSrc())}render(){return t(i,{key:"f506ba73852f257ad80bf59ca177d2065a5f365e",class:"HostContainer"},!this.imgLoaded&&t("ui-skeleton",{key:"564ebfab701f827ddc2debccb7615926dbc9e876",class:"UiContainer",structure:"image",width:"100%",height:"100%"}),t("img",{key:"2188ca4494c10587f064acc5459ffc468948f497",ref:e=>this.image=e,src:this.shouldLoad?this.src:void 0,onLoad:()=>this.imgLoaded=!0,style:this.styles,class:"UiContainer "+(this.imgLoaded?"Visible":"Hidden"),alt:this.alt,width:this.width,height:this.height,loading:"lazy"}))}get el(){return s(this)}static get watchers(){return{src:["handleSrc"]}}};n.style=".HostContainer{display:block}.UiContainer{height:100%;width:100%;border-radius:inherit;object-fit:inherit}.UiContainer .Image{border-radius:inherit}.Hidden{opacity:0;transition:opacity 0.5s ease-in-out}.Visible{opacity:1;border-radius:var(--emw--border-radius-medium, 10px);transition:opacity 0.5s ease-in-out}";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),size:this.handleStylingProps(this.size)},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%"}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,i)=>t("div",{key:i,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 }\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 }\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 }\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 }\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 }\n `;break;case"circle":e=`\n :host {\n --emw-skeleton-circle-size: ${this.stylingValue.size};\n }\n `;break;default:e=""}return t(i,{key:"e6b885bfd985ce7663d990756fe9101e25eb97f0"},t("style",{key:"06ae24c7bb74f4dacfc12ae58085333f9dc89da5"},e),this.handleStructure(this.structure))}static get watchers(){return{structure:["handleStructureChange"]}}};r.style=":host{display:block}.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, 10px)}.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, 10px);margin-bottom:var(--emw-skeleton-text-margin-bottom, 5px)}.Text:last-child{width:calc(var(--emw-skeleton-text-width, 400px) - 100px)}.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, 10px);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, unset)}.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, 10px)}@keyframes skeleton-loading{0%{background-color:var(--emw-skeleton-primary-color, #e0e0e0)}100%{background-color:var(--emw-skeleton-secondary-color, #f0f0f0)}}";export{n as ui_image,r as ui_skeleton}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@everymatrix/general-footer-template",
3
- "version": "1.69.0",
3
+ "version": "1.69.3",
4
4
  "main": "./dist/index.cjs.js",
5
5
  "module": "./dist/index.js",
6
6
  "es2015": "./dist/esm/index.mjs",