@appmate/wishlist
Advanced tools
Comparing version
{ | ||
"name": "@appmate/wishlist", | ||
"version": "5.26.0", | ||
"version": "5.27.0", | ||
"description": "Wishlist King SDK", | ||
@@ -5,0 +5,0 @@ "main": "wishlist-app.js", |
@@ -40,3 +40,3 @@ var ji=Object.defineProperty;var Be=s=>{throw TypeError(s)};var Ki=(s,t)=>{for(var e in t)ji(s,e,{get:t[e],enumerable:!0})};var ze=(s,t,e)=>t.has(s)||Be("Cannot "+e);var vt=(s,t,e)=>(ze(s,t,"read from private field"),e?e.call(s):t.get(s)),xt=(s,t,e)=>t.has(s)?Be("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(s):t.set(s,e),$t=(s,t,e,i)=>(ze(s,t,"write to private field"),i?i.call(s,e):t.set(s,e),e);var Ot={};Ki(Ot,{CSSResult:()=>lt,LitElement:()=>D,ReactiveElement:()=>L,_$LE:()=>ns,_$LH:()=>Ee,adoptStyles:()=>Nt,css:()=>Ke,defaultConverter:()=>Bt,getCompatibleStyle:()=>At,html:()=>es,isServer:()=>Us,mathml:()=>ss,noChange:()=>_,notEqual:()=>be,nothing:()=>x,render:()=>_e,supportsAdoptingStyleSheets:()=>St,svg:()=>is,unsafeCSS:()=>we});var Vt=globalThis,St=Vt.ShadowRoot&&(Vt.ShadyCSS===void 0||Vt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,ge=Symbol(),je=new WeakMap,lt=class{constructor(t,e,i){if(this._$cssResult$=!0,i!==ge)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=e}get styleSheet(){let t=this.o,e=this.t;if(St&&t===void 0){let i=e!==void 0&&e.length===1;i&&(t=je.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),i&&je.set(e,t))}return t}toString(){return this.cssText}},we=s=>new lt(typeof s=="string"?s:s+"",void 0,ge),Ke=(s,...t)=>{let e=s.length===1?s[0]:t.reduce((i,n,r)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(n)+s[r+1],s[0]);return new lt(e,s,ge)},Nt=(s,t)=>{if(St)s.adoptedStyleSheets=t.map(e=>e instanceof CSSStyleSheet?e:e.styleSheet);else for(let e of t){let i=document.createElement("style"),n=Vt.litNonce;n!==void 0&&i.setAttribute("nonce",n),i.textContent=e.cssText,s.appendChild(i)}},At=St?s=>s:s=>s instanceof CSSStyleSheet?(t=>{let e="";for(let i of t.cssRules)e+=i.cssText;return we(e)})(s):s;var{is:qi,defineProperty:Yi,getOwnPropertyDescriptor:Xi,getOwnPropertyNames:Zi,getOwnPropertySymbols:Ji,getPrototypeOf:Gi}=Object,z=globalThis,qe=z.trustedTypes,Qi=qe?qe.emptyScript:"",ye=z.reactiveElementPolyfillSupport,Ct=(s,t)=>s,Bt={toAttribute(s,t){switch(t){case Boolean:s=s?Qi:null;break;case Object:case Array:s=s==null?s:JSON.stringify(s)}return s},fromAttribute(s,t){let e=s;switch(t){case Boolean:e=s!==null;break;case Number:e=s===null?null:Number(s);break;case Object:case Array:try{e=JSON.parse(s)}catch(i){e=null}}return e}},be=(s,t)=>!qi(s,t),Ye={attribute:!0,type:String,converter:Bt,reflect:!1,hasChanged:be},Xe,Ze;(Xe=Symbol.metadata)!=null||(Symbol.metadata=Symbol("metadata")),(Ze=z.litPropertyMetadata)!=null||(z.litPropertyMetadata=new WeakMap);var L=class extends HTMLElement{static addInitializer(t){var e;this._$Ei(),((e=this.l)!=null?e:this.l=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=Ye){if(e.state&&(e.attribute=!1),this._$Ei(),this.elementProperties.set(t,e),!e.noAccessor){let i=Symbol(),n=this.getPropertyDescriptor(t,i,e);n!==void 0&&Yi(this.prototype,t,n)}}static getPropertyDescriptor(t,e,i){var o;let{get:n,set:r}=(o=Xi(this.prototype,t))!=null?o:{get(){return this[e]},set(a){this[e]=a}};return{get(){return n==null?void 0:n.call(this)},set(a){let l=n==null?void 0:n.call(this);r.call(this,a),this.requestUpdate(t,l,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){var e;return(e=this.elementProperties.get(t))!=null?e:Ye}static _$Ei(){if(this.hasOwnProperty(Ct("elementProperties")))return;let t=Gi(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(Ct("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Ct("properties"))){let e=this.properties,i=[...Zi(e),...Ji(e)];for(let n of i)this.createProperty(n,e[n])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[i,n]of e)this.elementProperties.set(i,n)}this._$Eh=new Map;for(let[e,i]of this.elementProperties){let n=this._$Eu(e,i);n!==void 0&&this._$Eh.set(n,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let i=new Set(t.flat(1/0).reverse());for(let n of i)e.unshift(At(n))}else t!==void 0&&e.push(At(t));return e}static _$Eu(t,e){let i=e.attribute;return i===!1?void 0:typeof i=="string"?i:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){var t;this._$ES=new Promise(e=>this.enableUpdating=e),this._$AL=new Map,this._$E_(),this.requestUpdate(),(t=this.constructor.l)==null||t.forEach(e=>e(this))}addController(t){var e,i;((e=this._$EO)!=null?e:this._$EO=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&((i=t.hostConnected)==null||i.call(t))}removeController(t){var e;(e=this._$EO)==null||e.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let i of e.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){var e;let t=(e=this.shadowRoot)!=null?e:this.attachShadow(this.constructor.shadowRootOptions);return Nt(t,this.constructor.elementStyles),t}connectedCallback(){var t,e;(t=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),(e=this._$EO)==null||e.forEach(i=>{var n;return(n=i.hostConnected)==null?void 0:n.call(i)})}enableUpdating(t){}disconnectedCallback(){var t;(t=this._$EO)==null||t.forEach(e=>{var i;return(i=e.hostDisconnected)==null?void 0:i.call(e)})}attributeChangedCallback(t,e,i){this._$AK(t,i)}_$EC(t,e){var r;let i=this.constructor.elementProperties.get(t),n=this.constructor._$Eu(t,i);if(n!==void 0&&i.reflect===!0){let o=(((r=i.converter)==null?void 0:r.toAttribute)!==void 0?i.converter:Bt).toAttribute(e,i.type);this._$Em=t,o==null?this.removeAttribute(n):this.setAttribute(n,o),this._$Em=null}}_$AK(t,e){var r;let i=this.constructor,n=i._$Eh.get(t);if(n!==void 0&&this._$Em!==n){let o=i.getPropertyOptions(n),a=typeof o.converter=="function"?{fromAttribute:o.converter}:((r=o.converter)==null?void 0:r.fromAttribute)!==void 0?o.converter:Bt;this._$Em=n,this[n]=a.fromAttribute(e,o.type),this._$Em=null}}requestUpdate(t,e,i){var n;if(t!==void 0){if(i!=null||(i=this.constructor.getPropertyOptions(t)),!((n=i.hasChanged)!=null?n:be)(this[t],e))return;this.P(t,e,i)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,e,i){var n;this._$AL.has(t)||this._$AL.set(t,e),i.reflect===!0&&this._$Em!==t&&((n=this._$Ej)!=null?n:this._$Ej=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(e){Promise.reject(e)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var i,n;if(!this.isUpdatePending)return;if(!this.hasUpdated){if((i=this.renderRoot)!=null||(this.renderRoot=this.createRenderRoot()),this._$Ep){for(let[o,a]of this._$Ep)this[o]=a;this._$Ep=void 0}let r=this.constructor.elementProperties;if(r.size>0)for(let[o,a]of r)a.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],a)}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),(n=this._$EO)==null||n.forEach(r=>{var o;return(o=r.hostUpdate)==null?void 0:o.call(r)}),this.update(e)):this._$EU()}catch(r){throw t=!1,this._$EU(),r}t&&this._$AE(e)}willUpdate(t){}_$AE(t){var e;(e=this._$EO)==null||e.forEach(i=>{var n;return(n=i.hostUpdated)==null?void 0:n.call(i)}),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&(this._$Ej=this._$Ej.forEach(e=>this._$EC(e,this[e]))),this._$EU()}updated(t){}firstUpdated(t){}},Je;L.elementStyles=[],L.shadowRootOptions={mode:"open"},L[Ct("elementProperties")]=new Map,L[Ct("finalized")]=new Map,ye==null||ye({ReactiveElement:L}),((Je=z.reactiveElementVersions)!=null?Je:z.reactiveElementVersions=[]).push("2.0.4");var _t=globalThis,zt=_t.trustedTypes,Ge=zt?zt.createPolicy("lit-html",{createHTML:s=>s}):void 0,$e="$lit$",H=`lit$${Math.random().toFixed(9).slice(2)}$`,Se="?"+H,ts=`<${Se}>`,G=document,Pt=()=>G.createComment(""),Tt=s=>s===null||typeof s!="object"&&typeof s!="function",Ae=Array.isArray,oi=s=>Ae(s)||typeof(s==null?void 0:s[Symbol.iterator])=="function",ve=`[ | ||
${(!e.selectedValue||this.hideUnavailableValues&&o)&&this.lit.html`<option disabled selected>${(a=this.defaultText)!=null?a:"Select"}</option>`} | ||
${r.map(l=>this.lit.html` | ||
${r.map(l=>{var c,d;return this.lit.html` | ||
<option | ||
@@ -47,5 +47,5 @@ value=${l} | ||
> | ||
${l} | ||
${(d=(c=this.formatValue)==null?void 0:c.call(this,l))!=null?d:l} | ||
</option> | ||
`)} | ||
`})} | ||
</select> | ||
@@ -60,3 +60,3 @@ <div class="wk-content"> | ||
</div> | ||
`}updated(e){var i;super.updated(e),e.has("option")&&this.classList.toggle("wk-single-option",((i=this.option)==null?void 0:i.values.length)===1)}createRenderRoot(){return this}};fe.properties={icon:{type:String},option:{type:Object},defaultText:{type:String},disableSoldoutValues:{type:Boolean},hideUnavailableValues:{type:Boolean}};customElements.get("wk-option-select")||customElements.define("wk-option-select",fe);var pe=class extends S{get app(){if(!window.WishlistKing)throw new Error("Wishlist King SDK not initialized");return window.WishlistKing}render(){if(!this.option)return;let t=`options[${this.option.name}]`,e=`${this.id}-fieldset`;return this.lit.html` | ||
`}updated(e){var i;super.updated(e),e.has("option")&&this.classList.toggle("wk-single-option",((i=this.option)==null?void 0:i.values.length)===1)}createRenderRoot(){return this}};fe.properties={icon:{type:String},option:{type:Object},defaultText:{type:String},disableSoldoutValues:{type:Boolean},hideUnavailableValues:{type:Boolean},formatValue:{type:Function}};customElements.get("wk-option-select")||customElements.define("wk-option-select",fe);var pe=class extends S{get app(){if(!window.WishlistKing)throw new Error("Wishlist King SDK not initialized");return window.WishlistKing}render(){if(!this.option)return;let t=`options[${this.option.name}]`,e=`${this.id}-fieldset`;return this.lit.html` | ||
<div class="wk-option-swatches"> | ||
@@ -63,0 +63,0 @@ <label class="wk-label" for=${e}>${this.option.name}</label> |
Sorry, the diff of this file is not supported yet
789916
0.11%