@everymatrix/general-news-notification 1.52.0 → 1.52.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/{general-news-notification-0c381985.js → general-news-notification-3e467546.js} +1 -1
- package/dist/cjs/general-news-notification.cjs.entry.js +1 -1
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/collection/components/general-news-notification/general-news-notification.css +4 -4
- package/dist/esm/{general-news-notification-11bb4e0c.js → general-news-notification-3db68ce9.js} +1 -1
- package/dist/esm/general-news-notification.entry.js +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/general-news-notification/general-news-notification.esm.js +1 -1
- package/dist/general-news-notification/index.esm.js +1 -1
- package/dist/general-news-notification/{p-b9d18408.js → p-bb80c541.js} +1 -1
- package/dist/general-news-notification/p-f176153a.entry.js +1 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-news-notification/.stencil/packages/stencil/general-news-notification/stencil.config.d.ts +2 -0
- package/dist/types/Users/adrian.pripon/Documents/Work/widgets-monorepo/packages/stencil/general-news-notification/.stencil/packages/stencil/general-news-notification/stencil.config.dev.d.ts +2 -0
- package/package.json +1 -1
- package/dist/general-news-notification/p-f05ed7ae.entry.js +0 -1
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-news-notification/.stencil/packages/stencil/general-news-notification/stencil.config.d.ts +0 -2
- package/dist/types/Users/maria.bumbar/Desktop/widgets-monorepo/packages/stencil/general-news-notification/.stencil/packages/stencil/general-news-notification/stencil.config.dev.d.ts +0 -2
package/dist/cjs/{general-news-notification-0c381985.js → general-news-notification-3e467546.js}
RENAMED
|
@@ -65,7 +65,7 @@ const translate = (key, customLang, values) => {
|
|
|
65
65
|
return translation;
|
|
66
66
|
};
|
|
67
67
|
|
|
68
|
-
const generalNewsNotificationCss = ":host{display:block}.NotificationWrapper{background:var(--emw
|
|
68
|
+
const generalNewsNotificationCss = ":host{display:block}.NotificationWrapper{background:var(--emw--header-color-background, var(--emw--color-background, #000000));color:var(--emw--color-white, #FFFFFF);position:sticky;width:100%;text-align:center;overflow:hidden;z-index:298;display:flex;justify-content:flex-end;align-items:center;border-bottom:6px solid var(--emw--color-primary, #22B04E);max-height:40px}.SlidingBar{transition:all 0.3s ease-in-out;width:100%}.Message{will-change:transform;margin:0 auto;padding:10px;width:90%}.ScrollLeft .Message{white-space:nowrap;animation:scroll-left 10s linear infinite;width:100%}.ScrollRight .Message{white-space:nowrap;animation:scroll-right 10s linear infinite;width:100%}.VisibleButtons .Message{display:flex}@keyframes scroll-left{from{transform:translateX(100%)}to{transform:translateX(-100%)}}@keyframes scroll-right{from{transform:translateX(-100%)}to{transform:translateX(100%)}}.SlidingBar:hover .Message{animation-play-state:paused}.CloseButton{padding-left:10px;background-color:var(--emw--header-color-background, var(--emw--color-background, #000000));display:flex;z-index:299;gap:10px}.ToggleButton{position:absolute;left:0}.ToggleButton .TriangleActive,.ToggleButton .TriangleInactive{display:block;transition:all 0.2s}.ToggleButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:8px}.ToggleButton svg{fill:var(--emw--header-color-background, var(--emw--color-background, #000000));width:16px;transform:rotate(180deg)}.CloseButton{right:10px}button{background-color:var(--emw--color-primary, #22B04E);color:var(--emw--header-color-background, var(--emw--color-background, #000000));border:none;width:40px;height:40px;cursor:pointer}.NotificationWrapper.Minimized{visibility:hidden}";
|
|
69
69
|
const GeneralNewsNotificationStyle0 = generalNewsNotificationCss;
|
|
70
70
|
|
|
71
71
|
const GeneralNewsNotification = class {
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const generalNewsNotification = require('./general-news-notification-
|
|
5
|
+
const generalNewsNotification = require('./general-news-notification-3e467546.js');
|
|
6
6
|
require('./index-889e271c.js');
|
|
7
7
|
|
|
8
8
|
|
package/dist/cjs/index.cjs.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const generalNewsNotification = require('./general-news-notification-
|
|
5
|
+
const generalNewsNotification = require('./general-news-notification-3e467546.js');
|
|
6
6
|
require('./index-889e271c.js');
|
|
7
7
|
|
|
8
8
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.NotificationWrapper {
|
|
6
|
-
background: var(--emw
|
|
6
|
+
background: var(--emw--header-color-background, var(--emw--color-background, #000000));
|
|
7
7
|
color: var(--emw--color-white, #FFFFFF);
|
|
8
8
|
position: sticky;
|
|
9
9
|
width: 100%;
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
|
|
68
68
|
.CloseButton {
|
|
69
69
|
padding-left: 10px;
|
|
70
|
-
background-color: var(--emw
|
|
70
|
+
background-color: var(--emw--header-color-background, var(--emw--color-background, #000000));
|
|
71
71
|
display: flex;
|
|
72
72
|
z-index: 299;
|
|
73
73
|
gap: 10px;
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
margin-top: 8px;
|
|
88
88
|
}
|
|
89
89
|
.ToggleButton svg {
|
|
90
|
-
fill: var(--emw
|
|
90
|
+
fill: var(--emw--header-color-background, var(--emw--color-background, #000000));
|
|
91
91
|
width: 16px;
|
|
92
92
|
transform: rotate(180deg);
|
|
93
93
|
}
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
|
|
99
99
|
button {
|
|
100
100
|
background-color: var(--emw--color-primary, #22B04E);
|
|
101
|
-
color: var(--emw
|
|
101
|
+
color: var(--emw--header-color-background, var(--emw--color-background, #000000));
|
|
102
102
|
border: none;
|
|
103
103
|
width: 40px;
|
|
104
104
|
height: 40px;
|
package/dist/esm/{general-news-notification-11bb4e0c.js → general-news-notification-3db68ce9.js}
RENAMED
|
@@ -63,7 +63,7 @@ const translate = (key, customLang, values) => {
|
|
|
63
63
|
return translation;
|
|
64
64
|
};
|
|
65
65
|
|
|
66
|
-
const generalNewsNotificationCss = ":host{display:block}.NotificationWrapper{background:var(--emw
|
|
66
|
+
const generalNewsNotificationCss = ":host{display:block}.NotificationWrapper{background:var(--emw--header-color-background, var(--emw--color-background, #000000));color:var(--emw--color-white, #FFFFFF);position:sticky;width:100%;text-align:center;overflow:hidden;z-index:298;display:flex;justify-content:flex-end;align-items:center;border-bottom:6px solid var(--emw--color-primary, #22B04E);max-height:40px}.SlidingBar{transition:all 0.3s ease-in-out;width:100%}.Message{will-change:transform;margin:0 auto;padding:10px;width:90%}.ScrollLeft .Message{white-space:nowrap;animation:scroll-left 10s linear infinite;width:100%}.ScrollRight .Message{white-space:nowrap;animation:scroll-right 10s linear infinite;width:100%}.VisibleButtons .Message{display:flex}@keyframes scroll-left{from{transform:translateX(100%)}to{transform:translateX(-100%)}}@keyframes scroll-right{from{transform:translateX(-100%)}to{transform:translateX(100%)}}.SlidingBar:hover .Message{animation-play-state:paused}.CloseButton{padding-left:10px;background-color:var(--emw--header-color-background, var(--emw--color-background, #000000));display:flex;z-index:299;gap:10px}.ToggleButton{position:absolute;left:0}.ToggleButton .TriangleActive,.ToggleButton .TriangleInactive{display:block;transition:all 0.2s}.ToggleButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:8px}.ToggleButton svg{fill:var(--emw--header-color-background, var(--emw--color-background, #000000));width:16px;transform:rotate(180deg)}.CloseButton{right:10px}button{background-color:var(--emw--color-primary, #22B04E);color:var(--emw--header-color-background, var(--emw--color-background, #000000));border:none;width:40px;height:40px;cursor:pointer}.NotificationWrapper.Minimized{visibility:hidden}";
|
|
67
67
|
const GeneralNewsNotificationStyle0 = generalNewsNotificationCss;
|
|
68
68
|
|
|
69
69
|
const GeneralNewsNotification = class {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { G as general_news_notification } from './general-news-notification-
|
|
1
|
+
export { G as general_news_notification } from './general-news-notification-3db68ce9.js';
|
|
2
2
|
import './index-e9994984.js';
|
package/dist/esm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { G as GeneralNewsNotification } from './general-news-notification-
|
|
1
|
+
export { G as GeneralNewsNotification } from './general-news-notification-3db68ce9.js';
|
|
2
2
|
import './index-e9994984.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as n,b as i}from"./p-51c5e725.js";export{s as setNonce}from"./p-51c5e725.js";import{g as t}from"./p-e1255160.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),n(t)})().then((async n=>(await t(),i([["p-
|
|
1
|
+
import{p as n,b as i}from"./p-51c5e725.js";export{s as setNonce}from"./p-51c5e725.js";import{g as t}from"./p-e1255160.js";(()=>{const i=import.meta.url,t={};return""!==i&&(t.resourcesUrl=new URL(".",i).href),n(t)})().then((async n=>(await t(),i([["p-f176153a",[[1,"general-news-notification",{cmsEndpoint:[1,"cms-endpoint"],language:[1],animationType:[1,"animation-type"],speed:[2],canMinimize:[4,"can-minimize"],canClose:[4,"can-close"],clientStyling:[1,"client-styling"],clientStylingUrl:[1,"client-styling-url"],translationUrl:[1,"translation-url"],message:[32],isMinimized:[32],isClosed:[32],isLoading:[32]},null,{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}]]]],n))));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{G as GeneralNewsNotification}from"./p-
|
|
1
|
+
export{G as GeneralNewsNotification}from"./p-bb80c541.js";import"./p-51c5e725.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,h as i}from"./p-51c5e725.js";const e=()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"iPad"===t||"iPhone"===t?"ios":"mtWeb"},s={en:{loading:"Is Loading ..."}},o=t=>new Promise((i=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((i=>{s[i]||(s[i]={});for(let e in t[i])s[i][e]=t[i][e]})),i(!0)}))})),r=class{constructor(i){t(this,i),this.componentDidLoad=()=>{this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL())},this.connectedCallback=()=>{this.cmsEndpoint&&this.language&&this.getNotificationMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))},this.getNotificationMessage=()=>{this.isLoading=!0;try{let t=new URL(`${this.cmsEndpoint}/${this.language}/header-notification`);t.searchParams.append("device",e()),t.searchParams.append("platform",e()),fetch(t.href).then((t=>{if(200===t.status)return t.json();throw new Error("HTTP status "+t.status)})).then((t=>{this.message=t.message})).catch((t=>{console.error(t)})).finally((()=>this.isLoading=!1))}catch(t){console.error("Error fetching message:",t)}},this.toggleMinimize=()=>{this.isMinimized=!this.isMinimized},this.closeNotification=()=>{this.isClosed=!0},this.cmsEndpoint=void 0,this.language=void 0,this.animationType="static",this.speed=30,this.canMinimize=!1,this.canClose=!1,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.message=void 0,this.isMinimized=!1,this.isClosed=!1,this.isLoading=!0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.language&&this.getNotificationMessage()}handleStylingChange(t,i){t!==i&&this.setClientStyling()}handleStylingUrlChange(t,i){t!==i&&this.setClientStylingURL()}handleNewTranslations(){this.isLoading=!0,o(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await o(this.translationUrl)}render(){if(this.isClosed)return null;const t=`${this.speed}s`;return i("div",{ref:t=>this.stylingContainer=t},this.canMinimize&&i("button",{class:"ToggleButton",onClick:this.toggleMinimize},i("span",{class:this.isMinimized?"TriangleActive":"TriangleInactive"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},i("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),i("div",{class:{NotificationWrapper:!0,Minimized:this.isMinimized}},i("div",{class:{SlidingBar:!0,Minimized:this.isMinimized,ScrollLeft:"scroll-left"===this.animationType,ScrollRight:"scroll-right"===this.animationType,VisibleButtons:this.canMinimize||!0===this.canClose}},i("div",{class:"Message",style:{animationDuration:t}},this.isLoading?((t,i)=>{let e=s[void 0!==i&&i in s?i:"en"].loading;return e})(0,this.language):this.message)),this.canClose&&i("div",{class:"CloseButton"},i("button",{onClick:this.closeNotification},"X"))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}}};r.style=":host{display:block}.NotificationWrapper{background:var(--emw
|
|
1
|
+
import{r as t,h as i}from"./p-51c5e725.js";const e=()=>{const t=(()=>{let t=window.navigator.userAgent;return t.toLowerCase().match(/android/i)?"Android":t.toLowerCase().match(/iphone/i)?"iPhone":t.toLowerCase().match(/ipad|ipod/i)?"iPad":"PC"})();if(t)return"PC"===t?"dk":"iPad"===t||"iPhone"===t?"ios":"mtWeb"},s={en:{loading:"Is Loading ..."}},o=t=>new Promise((i=>{fetch(t).then((t=>t.json())).then((t=>{Object.keys(t).forEach((i=>{s[i]||(s[i]={});for(let e in t[i])s[i][e]=t[i][e]})),i(!0)}))})),r=class{constructor(i){t(this,i),this.componentDidLoad=()=>{this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.clientStylingUrl&&this.setClientStylingURL())},this.connectedCallback=()=>{this.cmsEndpoint&&this.language&&this.getNotificationMessage()},this.setClientStyling=()=>{let t=document.createElement("style");t.innerHTML=this.clientStyling,this.stylingContainer.prepend(t)},this.setClientStylingURL=()=>{let t=new URL(this.clientStylingUrl),i=document.createElement("style");fetch(t.href).then((t=>t.text())).then((t=>{i.innerHTML=t,setTimeout((()=>{this.stylingContainer.prepend(i)}),1)})).catch((t=>{console.log("error ",t)}))},this.getNotificationMessage=()=>{this.isLoading=!0;try{let t=new URL(`${this.cmsEndpoint}/${this.language}/header-notification`);t.searchParams.append("device",e()),t.searchParams.append("platform",e()),fetch(t.href).then((t=>{if(200===t.status)return t.json();throw new Error("HTTP status "+t.status)})).then((t=>{this.message=t.message})).catch((t=>{console.error(t)})).finally((()=>this.isLoading=!1))}catch(t){console.error("Error fetching message:",t)}},this.toggleMinimize=()=>{this.isMinimized=!this.isMinimized},this.closeNotification=()=>{this.isClosed=!0},this.cmsEndpoint=void 0,this.language=void 0,this.animationType="static",this.speed=30,this.canMinimize=!1,this.canClose=!1,this.clientStyling="",this.clientStylingUrl="",this.translationUrl="",this.message=void 0,this.isMinimized=!1,this.isClosed=!1,this.isLoading=!0}watchEndpoint(t,i){t&&t!=i&&this.cmsEndpoint&&this.language&&this.getNotificationMessage()}handleStylingChange(t,i){t!==i&&this.setClientStyling()}handleStylingUrlChange(t,i){t!==i&&this.setClientStylingURL()}handleNewTranslations(){this.isLoading=!0,o(this.translationUrl).then((()=>{this.isLoading=!1}))}async componentWillLoad(){this.translationUrl.length>2&&await o(this.translationUrl)}render(){if(this.isClosed)return null;const t=`${this.speed}s`;return i("div",{ref:t=>this.stylingContainer=t},this.canMinimize&&i("button",{class:"ToggleButton",onClick:this.toggleMinimize},i("span",{class:this.isMinimized?"TriangleActive":"TriangleInactive"},i("svg",{xmlns:"http://www.w3.org/2000/svg",width:"14",height:"6.835",viewBox:"0 0 14 6.835"},i("path",{id:"arrow",d:"M281.541,447.921a.488.488,0,0,0,.295-.122l6.5-5.851a.488.488,0,1,0-.65-.726l-6.176,5.556-6.176-5.556h0a.488.488,0,1,0-.65.726l6.5,5.851a.488.488,0,0,0,.355.122Z",transform:"translate(-274.511 -441.088)"})))),i("div",{class:{NotificationWrapper:!0,Minimized:this.isMinimized}},i("div",{class:{SlidingBar:!0,Minimized:this.isMinimized,ScrollLeft:"scroll-left"===this.animationType,ScrollRight:"scroll-right"===this.animationType,VisibleButtons:this.canMinimize||!0===this.canClose}},i("div",{class:"Message",style:{animationDuration:t}},this.isLoading?((t,i)=>{let e=s[void 0!==i&&i in s?i:"en"].loading;return e})(0,this.language):this.message)),this.canClose&&i("div",{class:"CloseButton"},i("button",{onClick:this.closeNotification},"X"))))}static get watchers(){return{cmsEndpoint:["watchEndpoint"],language:["watchEndpoint"],clientStyling:["handleStylingChange"],clientStylingUrl:["handleStylingUrlChange"],translationUrl:["handleNewTranslations"]}}};r.style=":host{display:block}.NotificationWrapper{background:var(--emw--header-color-background, var(--emw--color-background, #000000));color:var(--emw--color-white, #FFFFFF);position:sticky;width:100%;text-align:center;overflow:hidden;z-index:298;display:flex;justify-content:flex-end;align-items:center;border-bottom:6px solid var(--emw--color-primary, #22B04E);max-height:40px}.SlidingBar{transition:all 0.3s ease-in-out;width:100%}.Message{will-change:transform;margin:0 auto;padding:10px;width:90%}.ScrollLeft .Message{white-space:nowrap;animation:scroll-left 10s linear infinite;width:100%}.ScrollRight .Message{white-space:nowrap;animation:scroll-right 10s linear infinite;width:100%}.VisibleButtons .Message{display:flex}@keyframes scroll-left{from{transform:translateX(100%)}to{transform:translateX(-100%)}}@keyframes scroll-right{from{transform:translateX(-100%)}to{transform:translateX(100%)}}.SlidingBar:hover .Message{animation-play-state:paused}.CloseButton{padding-left:10px;background-color:var(--emw--header-color-background, var(--emw--color-background, #000000));display:flex;z-index:299;gap:10px}.ToggleButton{position:absolute;left:0}.ToggleButton .TriangleActive,.ToggleButton .TriangleInactive{display:block;transition:all 0.2s}.ToggleButton .TriangleActive{transform:scale(1.1) rotateX(180deg) translateY(3px);fill:var(--emw--color-primary, #52d004);margin-top:8px}.ToggleButton svg{fill:var(--emw--header-color-background, var(--emw--color-background, #000000));width:16px;transform:rotate(180deg)}.CloseButton{right:10px}button{background-color:var(--emw--color-primary, #22B04E);color:var(--emw--header-color-background, var(--emw--color-background, #000000));border:none;width:40px;height:40px;cursor:pointer}.NotificationWrapper.Minimized{visibility:hidden}";export{r as G}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{G as general_news_notification}from"./p-bb80c541.js";import"./p-51c5e725.js";
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export{G as general_news_notification}from"./p-b9d18408.js";import"./p-51c5e725.js";
|