@dreamsengine/dreams-ad-engine 0.0.7 → 0.0.8

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/README.md CHANGED
@@ -74,6 +74,8 @@ const AdTestComponent = () => {
74
74
  ></dreams-ad-engine>
75
75
  );
76
76
  };
77
+
78
+ export default AdTestComponent;
77
79
  ```
78
80
 
79
81
  Use the component disabling SSR
@@ -112,7 +112,7 @@
112
112
  background-position: right -40px top 0;
113
113
  }
114
114
  }
115
- `;var Dt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,g=(n,t,e,s)=>{for(var i=s>1?void 0:s?jt(t,e):t,o=n.length-1,r;o>=0;o--)(r=n[o])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Dt(t,e,i),i},Bt=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},ot=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},rt=(n,t,e)=>(Bt(n,t,"access private method"),e),q,ft,V,$t;let d=class extends T{constructor(){super(...arguments),ot(this,q),ot(this,V),this.networkId="",this.adUnit="",this.divId=`div-gpt-ad-${this.adUnit}-${crypto.randomUUID()}`,this.mapping=[],this.sizing=[],this.refresh=!1,this.enableTitle=!1,this.title="Publicidad",this.minHeight=100,this.adLoaded=!1}connectedCallback(){if(super.connectedCallback(),!d.initialized)rt(this,q,ft).call(this),d.initialized=!0,d.old_url=location.href;else{const n=location.href;d.old_url!==n&&(window.googletag.destroySlots(window.dreamsAllSlots),d.old_url=n,window.dreamsAllSlots=[],window.dreamsSlotsToUpdate=[])}}firstUpdated(){typeof this.mapping=="string"&&(this.mapping=JSON.parse(this.mapping)),typeof this.sizing=="string"&&(this.sizing=JSON.parse(this.sizing)),typeof this.minHeight=="string"&&(this.minHeight=parseInt(this.minHeight)),rt(this,V,$t).call(this)}render(){return C`
115
+ `;var Dt=Object.defineProperty,jt=Object.getOwnPropertyDescriptor,g=(n,t,e,s)=>{for(var i=s>1?void 0:s?jt(t,e):t,o=n.length-1,r;o>=0;o--)(r=n[o])&&(i=(s?r(t,e,i):r(i))||i);return s&&i&&Dt(t,e,i),i},Bt=(n,t,e)=>{if(!t.has(n))throw TypeError("Cannot "+e)},ot=(n,t,e)=>{if(t.has(n))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(n):t.set(n,e)},rt=(n,t,e)=>(Bt(n,t,"access private method"),e),q,ft,V,$t;let d=class extends T{constructor(){super(...arguments),ot(this,q),ot(this,V),this.networkId="",this.adUnit="",this.divId="",this.mapping=[],this.sizing=[],this.refresh=!1,this.enableTitle=!1,this.title="Publicidad",this.minHeight=100,this.adLoaded=!1}connectedCallback(){if(super.connectedCallback(),!d.initialized)rt(this,q,ft).call(this),d.initialized=!0,d.old_url=location.href;else{const n=location.href;d.old_url!==n&&(window.googletag.destroySlots(window.dreamsAllSlots),d.old_url=n,window.dreamsAllSlots=[],window.dreamsSlotsToUpdate=[])}}firstUpdated(){this.divId=`div-gpt-ad-${this.adUnit}-${crypto.randomUUID()}`,typeof this.mapping=="string"&&(this.mapping=JSON.parse(this.mapping)),typeof this.sizing=="string"&&(this.sizing=JSON.parse(this.sizing)),typeof this.minHeight=="string"&&(this.minHeight=parseInt(this.minHeight)),rt(this,V,$t).call(this)}render(){return C`
116
116
  <div class="ad-container">
117
117
  ${nt(this.enableTitle,()=>C`<span class="ad-label">${this.title}</span>`,()=>C``)}
118
118
  ${nt(!this.adLoaded,()=>C`<div
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@dreamsengine/dreams-ad-engine",
3
- "version": "0.0.7",
3
+ "version": "0.0.8",
4
4
  "type": "module",
5
+ "license": "GPL-3.0",
5
6
  "main": "./dist/dreams-ad-engine.js",
6
7
  "module": "./dist/dreams-ad-engine.js",
7
8
  "description": "A component to render Google Ads",