@everymatrix/general-styling-wrapper 1.74.3 → 1.74.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/general-styling-wrapper.cjs.entry.js +3 -3
- package/dist/collection/utils/locale.utils.js +3 -3
- package/dist/esm/general-styling-wrapper.entry.js +3 -3
- package/dist/general-styling-wrapper/general-styling-wrapper.entry.js +1 -1
- package/package.json +1 -1
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/libs/common/src/storybook/storybook-utils.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/stencil.config.dev.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/storybook/main.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/packages/stencil/general-styling-wrapper/storybook/preview.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/index.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/stencil-clean-deps-plugin.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/vite-chunk-plugin.d.ts +0 -0
- /package/dist/types/Users/{sebastian.strulea/Documents/work → maria.bumbar/Desktop/Widgets & Template}/widgets-monorepo/packages/stencil/general-styling-wrapper/.stencil/tools/plugins/vite-clean-deps-plugin.d.ts +0 -0
|
@@ -10,9 +10,9 @@ const mergeTranslations = (url, target) => {
|
|
|
10
10
|
.then((res) => res.json())
|
|
11
11
|
.then((data) => {
|
|
12
12
|
Object.keys(data).forEach((item) => {
|
|
13
|
-
target[item] = target[item] ||
|
|
13
|
+
target[item] = target[item] || {};
|
|
14
14
|
Object.keys(data[item]).forEach((key) => {
|
|
15
|
-
//if there is
|
|
15
|
+
//if there is no key in target, do nothing
|
|
16
16
|
if (!target['en'][key]) {
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
@@ -25,7 +25,7 @@ const mergeTranslations = (url, target) => {
|
|
|
25
25
|
});
|
|
26
26
|
}
|
|
27
27
|
else {
|
|
28
|
-
target[item][key] = data[item][key] || defaultTranslation;
|
|
28
|
+
target[item][key] = data[item][key] || Object.assign({}, defaultTranslation);
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
});
|
|
@@ -4,9 +4,9 @@ export const mergeTranslations = (url, target) => {
|
|
|
4
4
|
.then((res) => res.json())
|
|
5
5
|
.then((data) => {
|
|
6
6
|
Object.keys(data).forEach((item) => {
|
|
7
|
-
target[item] = target[item] ||
|
|
7
|
+
target[item] = target[item] || {};
|
|
8
8
|
Object.keys(data[item]).forEach((key) => {
|
|
9
|
-
//if there is
|
|
9
|
+
//if there is no key in target, do nothing
|
|
10
10
|
if (!target['en'][key]) {
|
|
11
11
|
return;
|
|
12
12
|
}
|
|
@@ -19,7 +19,7 @@ export const mergeTranslations = (url, target) => {
|
|
|
19
19
|
});
|
|
20
20
|
}
|
|
21
21
|
else {
|
|
22
|
-
target[item][key] = data[item][key] || defaultTranslation;
|
|
22
|
+
target[item][key] = data[item][key] || Object.assign({}, defaultTranslation);
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
});
|
|
@@ -6,9 +6,9 @@ const mergeTranslations = (url, target) => {
|
|
|
6
6
|
.then((res) => res.json())
|
|
7
7
|
.then((data) => {
|
|
8
8
|
Object.keys(data).forEach((item) => {
|
|
9
|
-
target[item] = target[item] ||
|
|
9
|
+
target[item] = target[item] || {};
|
|
10
10
|
Object.keys(data[item]).forEach((key) => {
|
|
11
|
-
//if there is
|
|
11
|
+
//if there is no key in target, do nothing
|
|
12
12
|
if (!target['en'][key]) {
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@ const mergeTranslations = (url, target) => {
|
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
23
|
else {
|
|
24
|
-
target[item][key] = data[item][key] || defaultTranslation;
|
|
24
|
+
target[item][key] = data[item][key] || Object.assign({}, defaultTranslation);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
27
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i,g as e}from"./index-7ef90fae.js";function n(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function s(t,i){const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const o=class{constructor(i){t(this,i),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{e.innerHTML=i,t&&t.appendChild(e)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&s(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(t,i){t!=i&&n(this.el,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&this.clientStylingUrl&&s(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&s(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const n=(i=this.translationUrl,e=this.targetTranslations,new Promise((t=>{fetch(i).then((t=>t.json())).then((i=>{Object.keys(i).forEach((t=>{e[t]=e[t]||
|
|
1
|
+
import{r as t,h as i,g as e}from"./index-7ef90fae.js";function n(t,i){if(t){const e=document.createElement("style");e.innerHTML=i,t.appendChild(e)}}function s(t,i){const e=new URL(i);fetch(e.href).then((t=>t.text())).then((i=>{const e=document.createElement("style");e.innerHTML=i,t&&t.appendChild(e)})).catch((t=>{console.error("There was an error while trying to load client styling from URL",t)}))}const o=class{constructor(i){t(this,i),this.stylingAppends=!1,this.clientStyling="",this.clientStylingUrl="",this.mbSource=void 0,this.translationUrl="",this.targetTranslations=void 0}componentDidLoad(){this.el&&(null!=window.emMessageBus?function(t,i){if(window.emMessageBus){const e=document.createElement("style");window.emMessageBus.subscribe(i,(i=>{e.innerHTML=i,t&&t.appendChild(e)}))}}(this.el,`${this.mbSource}.Style`):(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&s(this.el,this.clientStylingUrl),this.stylingAppends=!0))}disconnectedCallback(){this.stylingSubscription&&this.stylingSubscription.unsubscribe()}handleClientStylingChange(t,i){t!=i&&n(this.el,this.clientStyling)}handleClientStylingUrlChange(t,i){t!=i&&this.clientStylingUrl&&s(this.el,this.clientStylingUrl)}componentDidRender(){this.stylingAppends||(this.clientStyling&&n(this.el,this.clientStyling),this.clientStylingUrl&&s(this.el,this.clientStylingUrl),this.stylingAppends=!0)}async componentWillLoad(){const t=[];if(this.translationUrl){const n=(i=this.translationUrl,e=this.targetTranslations,new Promise((t=>{fetch(i).then((t=>t.json())).then((i=>{Object.keys(i).forEach((t=>{e[t]=e[t]||{},Object.keys(i[t]).forEach((n=>{if(!e.en[n])return;const s=e.en[n];"object"==typeof i[t][n]?(e[t][n]=e[t][n]||Object.assign({},s),Object.keys(i[t][n]).forEach((s=>{e[t][n][s]=i[t][n][s]}))):e[t][n]=i[t][n]||Object.assign({},s)}))})),t(!0)})).catch((i=>{console.error("Failed to load translations:",i),t(!1)}))})));t.push(n)}var i,e;return await Promise.all(t)}render(){return i("div",{key:"09ad83748bbad518743c8671b986c541c52bf3f0",class:"StyleShell"},i("slot",{key:"3b28b776d3944410c717b002b70946d274a4e8e7",name:"mainContent"}))}get el(){return e(this)}static get watchers(){return{clientStyling:["handleClientStylingChange"],clientStylingUrl:["handleClientStylingUrlChange"]}}};o.style=":host{display:block}";export{o as general_styling_wrapper}
|
package/package.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|