@cas-smartdesign/app-banner 0.2.6 → 0.3.0
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/app-banner-with-externals.js +15 -86
- package/dist/app-banner-with-externals.js.map +4 -4
- package/dist/app-banner.mjs +6 -5
- package/dist/app-banner.mjs.map +1 -1
- package/dist/docs/1. App banner with a fixed position.js +1 -1
- package/dist/docs/doc.css +1 -1
- package/dist/docs/doc.mjs +62 -51
- package/npm-third-party-licenses.json +52 -47
- package/package.json +5 -5
- package/readme.md +7 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var window;(window||={})["@cas-smartdesign/app-banner"]=(()=>{var
|
|
2
|
-
\f\r]`,
|
|
3
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),
|
|
1
|
+
var window;(window||={})["@cas-smartdesign/app-banner"]=(()=>{var V=Object.defineProperty;var Ot=Object.getOwnPropertyDescriptor;var Ut=Object.getOwnPropertyNames;var Rt=Object.prototype.hasOwnProperty;var Mt=(r,t)=>{for(var e in t)V(r,e,{get:t[e],enumerable:!0})},kt=(r,t,e,s)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ut(t))!Rt.call(r,i)&&i!==e&&V(r,i,{get:()=>t[i],enumerable:!(s=Ot(t,i))||s.enumerable});return r};var Ht=r=>kt(V({},"__esModule",{value:!0}),r);var ee={};Mt(ee,{AppBanner:()=>u});var L=globalThis,N=L.ShadowRoot&&(L.ShadyCSS===void 0||L.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,K=Symbol(),ot=new WeakMap,C=class{constructor(t,e,s){if(this._$cssResult$=!0,s!==K)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(N&&t===void 0){let s=e!==void 0&&e.length===1;s&&(t=ot.get(e)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),s&&ot.set(e,t))}return t}toString(){return this.cssText}},nt=r=>new C(typeof r=="string"?r:r+"",void 0,K),W=(r,...t)=>{let e=r.length===1?r[0]:t.reduce(((s,i,o)=>s+(n=>{if(n._$cssResult$===!0)return n.cssText;if(typeof n=="number")return n;throw Error("Value passed to 'css' function must be a 'css' function result: "+n+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+r[o+1]),r[0]);return new C(e,r,K)},at=(r,t)=>{if(N)r.adoptedStyleSheets=t.map((e=>e instanceof CSSStyleSheet?e:e.styleSheet));else for(let e of t){let s=document.createElement("style"),i=L.litNonce;i!==void 0&&s.setAttribute("nonce",i),s.textContent=e.cssText,r.appendChild(s)}},F=N?r=>r:r=>r instanceof CSSStyleSheet?(t=>{let e="";for(let s of t.cssRules)e+=s.cssText;return nt(e)})(r):r;var{is:Lt,defineProperty:Nt,getOwnPropertyDescriptor:Dt,getOwnPropertyNames:It,getOwnPropertySymbols:jt,getPrototypeOf:Bt}=Object,D=globalThis,ht=D.trustedTypes,qt=ht?ht.emptyScript:"",zt=D.reactiveElementPolyfillSupport,P=(r,t)=>r,T={toAttribute(r,t){switch(t){case Boolean:r=r?qt:null;break;case Object:case Array:r=r==null?r:JSON.stringify(r)}return r},fromAttribute(r,t){let e=r;switch(t){case Boolean:e=r!==null;break;case Number:e=r===null?null:Number(r);break;case Object:case Array:try{e=JSON.parse(r)}catch{e=null}}return e}},I=(r,t)=>!Lt(r,t),ct={attribute:!0,type:String,converter:T,reflect:!1,useDefault:!1,hasChanged:I};Symbol.metadata??=Symbol("metadata"),D.litPropertyMetadata??=new WeakMap;var f=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,e=ct){if(e.state&&(e.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((e=Object.create(e)).wrapped=!0),this.elementProperties.set(t,e),!e.noAccessor){let s=Symbol(),i=this.getPropertyDescriptor(t,s,e);i!==void 0&&Nt(this.prototype,t,i)}}static getPropertyDescriptor(t,e,s){let{get:i,set:o}=Dt(this.prototype,t)??{get(){return this[e]},set(n){this[e]=n}};return{get:i,set(n){let h=i?.call(this);o?.call(this,n),this.requestUpdate(t,h,s)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??ct}static _$Ei(){if(this.hasOwnProperty(P("elementProperties")))return;let t=Bt(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(P("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(P("properties"))){let e=this.properties,s=[...It(e),...jt(e)];for(let i of s)this.createProperty(i,e[i])}let t=this[Symbol.metadata];if(t!==null){let e=litPropertyMetadata.get(t);if(e!==void 0)for(let[s,i]of e)this.elementProperties.set(s,i)}this._$Eh=new Map;for(let[e,s]of this.elementProperties){let i=this._$Eu(e,s);i!==void 0&&this._$Eh.set(i,e)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let e=[];if(Array.isArray(t)){let s=new Set(t.flat(1/0).reverse());for(let i of s)e.unshift(F(i))}else t!==void 0&&e.push(F(t));return e}static _$Eu(t,e){let s=e.attribute;return s===!1?void 0:typeof s=="string"?s: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(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,e=this.constructor.elementProperties;for(let s of e.keys())this.hasOwnProperty(s)&&(t.set(s,this[s]),delete this[s]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return at(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,e,s){this._$AK(t,s)}_$ET(t,e){let s=this.constructor.elementProperties.get(t),i=this.constructor._$Eu(t,s);if(i!==void 0&&s.reflect===!0){let o=(s.converter?.toAttribute!==void 0?s.converter:T).toAttribute(e,s.type);this._$Em=t,o==null?this.removeAttribute(i):this.setAttribute(i,o),this._$Em=null}}_$AK(t,e){let s=this.constructor,i=s._$Eh.get(t);if(i!==void 0&&this._$Em!==i){let o=s.getPropertyOptions(i),n=typeof o.converter=="function"?{fromAttribute:o.converter}:o.converter?.fromAttribute!==void 0?o.converter:T;this._$Em=i;let h=n.fromAttribute(e,o.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(t,e,s){if(t!==void 0){let i=this.constructor,o=this[t];if(s??=i.getPropertyOptions(t),!((s.hasChanged??I)(o,e)||s.useDefault&&s.reflect&&o===this._$Ej?.get(t)&&!this.hasAttribute(i._$Eu(t,s))))return;this.C(t,e,s)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(t,e,{useDefault:s,reflect:i,wrapped:o},n){s&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,n??e??this[t]),o!==!0||n!==void 0)||(this._$AL.has(t)||(this.hasUpdated||s||(e=void 0),this._$AL.set(t,e)),i===!0&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){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(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[i,o]of this._$Ep)this[i]=o;this._$Ep=void 0}let s=this.constructor.elementProperties;if(s.size>0)for(let[i,o]of s){let{wrapped:n}=o,h=this[i];n!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,o,h)}}let t=!1,e=this._$AL;try{t=this.shouldUpdate(e),t?(this.willUpdate(e),this._$EO?.forEach((s=>s.hostUpdate?.())),this.update(e)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(e)}willUpdate(t){}_$AE(t){this._$EO?.forEach((e=>e.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((e=>this._$ET(e,this[e]))),this._$EM()}updated(t){}firstUpdated(t){}};f.elementStyles=[],f.shadowRootOptions={mode:"open"},f[P("elementProperties")]=new Map,f[P("finalized")]=new Map,zt?.({ReactiveElement:f}),(D.reactiveElementVersions??=[]).push("2.1.1");var tt=globalThis,j=tt.trustedTypes,lt=j?j.createPolicy("lit-html",{createHTML:r=>r}):void 0,gt="$lit$",b=`lit$${Math.random().toFixed(9).slice(2)}$`,$t="?"+b,Vt=`<${$t}>`,v=document,U=()=>v.createComment(""),R=r=>r===null||typeof r!="object"&&typeof r!="function",et=Array.isArray,Kt=r=>et(r)||typeof r?.[Symbol.iterator]=="function",Z=`[
|
|
2
|
+
\f\r]`,O=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,dt=/-->/g,pt=/>/g,_=RegExp(`>|${Z}(?:([^\\s"'>=/]+)(${Z}*=${Z}*(?:[^
|
|
3
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),ut=/'/g,mt=/"/g,bt=/^(?:script|style|textarea|title)$/i,st=r=>(t,...e)=>({_$litType$:r,strings:t,values:e}),yt=st(1),ae=st(2),he=st(3),g=Symbol.for("lit-noChange"),d=Symbol.for("lit-nothing"),ft=new WeakMap,A=v.createTreeWalker(v,129);function _t(r,t){if(!et(r)||!r.hasOwnProperty("raw"))throw Error("invalid template strings array");return lt!==void 0?lt.createHTML(t):t}var Wt=(r,t)=>{let e=r.length-1,s=[],i,o=t===2?"<svg>":t===3?"<math>":"",n=O;for(let h=0;h<e;h++){let a=r[h],l,p,c=-1,m=0;for(;m<a.length&&(n.lastIndex=m,p=n.exec(a),p!==null);)m=n.lastIndex,n===O?p[1]==="!--"?n=dt:p[1]!==void 0?n=pt:p[2]!==void 0?(bt.test(p[2])&&(i=RegExp("</"+p[2],"g")),n=_):p[3]!==void 0&&(n=_):n===_?p[0]===">"?(n=i??O,c=-1):p[1]===void 0?c=-2:(c=n.lastIndex-p[2].length,l=p[1],n=p[3]===void 0?_:p[3]==='"'?mt:ut):n===mt||n===ut?n=_:n===dt||n===pt?n=O:(n=_,i=void 0);let $=n===_&&r[h+1].startsWith("/>")?" ":"";o+=n===O?a+Vt:c>=0?(s.push(l),a.slice(0,c)+gt+a.slice(c)+b+$):a+b+(c===-2?h:$)}return[_t(r,o+(r[e]||"<?>")+(t===2?"</svg>":t===3?"</math>":"")),s]},M=class r{constructor({strings:t,_$litType$:e},s){let i;this.parts=[];let o=0,n=0,h=t.length-1,a=this.parts,[l,p]=Wt(t,e);if(this.el=r.createElement(l,s),A.currentNode=this.el.content,e===2||e===3){let c=this.el.content.firstChild;c.replaceWith(...c.childNodes)}for(;(i=A.nextNode())!==null&&a.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(let c of i.getAttributeNames())if(c.endsWith(gt)){let m=p[n++],$=i.getAttribute(c).split(b),H=/([.?@])?(.*)/.exec(m);a.push({type:1,index:o,name:H[2],strings:$,ctor:H[1]==="."?Y:H[1]==="?"?G:H[1]==="@"?Q:x}),i.removeAttribute(c)}else c.startsWith(b)&&(a.push({type:6,index:o}),i.removeAttribute(c));if(bt.test(i.tagName)){let c=i.textContent.split(b),m=c.length-1;if(m>0){i.textContent=j?j.emptyScript:"";for(let $=0;$<m;$++)i.append(c[$],U()),A.nextNode(),a.push({type:2,index:++o});i.append(c[m],U())}}}else if(i.nodeType===8)if(i.data===$t)a.push({type:2,index:o});else{let c=-1;for(;(c=i.data.indexOf(b,c+1))!==-1;)a.push({type:7,index:o}),c+=b.length-1}o++}}static createElement(t,e){let s=v.createElement("template");return s.innerHTML=t,s}};function S(r,t,e=r,s){if(t===g)return t;let i=s!==void 0?e._$Co?.[s]:e._$Cl,o=R(t)?void 0:t._$litDirective$;return i?.constructor!==o&&(i?._$AO?.(!1),o===void 0?i=void 0:(i=new o(r),i._$AT(r,e,s)),s!==void 0?(e._$Co??=[])[s]=i:e._$Cl=i),i!==void 0&&(t=S(r,i._$AS(r,t.values),i,s)),t}var J=class{constructor(t,e){this._$AV=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(t){let{el:{content:e},parts:s}=this._$AD,i=(t?.creationScope??v).importNode(e,!0);A.currentNode=i;let o=A.nextNode(),n=0,h=0,a=s[0];for(;a!==void 0;){if(n===a.index){let l;a.type===2?l=new k(o,o.nextSibling,this,t):a.type===1?l=new a.ctor(o,a.name,a.strings,this,t):a.type===6&&(l=new X(o,this,t)),this._$AV.push(l),a=s[++h]}n!==a?.index&&(o=A.nextNode(),n++)}return A.currentNode=v,i}p(t){let e=0;for(let s of this._$AV)s!==void 0&&(s.strings!==void 0?(s._$AI(t,s,e),e+=s.strings.length-2):s._$AI(t[e])),e++}},k=class r{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(t,e,s,i){this.type=2,this._$AH=d,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=s,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let t=this._$AA.parentNode,e=this._$AM;return e!==void 0&&t?.nodeType===11&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=S(this,t,e),R(t)?t===d||t==null||t===""?(this._$AH!==d&&this._$AR(),this._$AH=d):t!==this._$AH&&t!==g&&this._(t):t._$litType$!==void 0?this.$(t):t.nodeType!==void 0?this.T(t):Kt(t)?this.k(t):this._(t)}O(t){return this._$AA.parentNode.insertBefore(t,this._$AB)}T(t){this._$AH!==t&&(this._$AR(),this._$AH=this.O(t))}_(t){this._$AH!==d&&R(this._$AH)?this._$AA.nextSibling.data=t:this.T(v.createTextNode(t)),this._$AH=t}$(t){let{values:e,_$litType$:s}=t,i=typeof s=="number"?this._$AC(t):(s.el===void 0&&(s.el=M.createElement(_t(s.h,s.h[0]),this.options)),s);if(this._$AH?._$AD===i)this._$AH.p(e);else{let o=new J(i,this),n=o.u(this.options);o.p(e),this.T(n),this._$AH=o}}_$AC(t){let e=ft.get(t.strings);return e===void 0&&ft.set(t.strings,e=new M(t)),e}k(t){et(this._$AH)||(this._$AH=[],this._$AR());let e=this._$AH,s,i=0;for(let o of t)i===e.length?e.push(s=new r(this.O(U()),this.O(U()),this,this.options)):s=e[i],s._$AI(o),i++;i<e.length&&(this._$AR(s&&s._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){for(this._$AP?.(!1,!0,e);t!==this._$AB;){let s=t.nextSibling;t.remove(),t=s}}setConnected(t){this._$AM===void 0&&(this._$Cv=t,this._$AP?.(t))}},x=class{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(t,e,s,i,o){this.type=1,this._$AH=d,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=o,s.length>2||s[0]!==""||s[1]!==""?(this._$AH=Array(s.length-1).fill(new String),this.strings=s):this._$AH=d}_$AI(t,e=this,s,i){let o=this.strings,n=!1;if(o===void 0)t=S(this,t,e,0),n=!R(t)||t!==this._$AH&&t!==g,n&&(this._$AH=t);else{let h=t,a,l;for(t=o[0],a=0;a<o.length-1;a++)l=S(this,h[s+a],e,a),l===g&&(l=this._$AH[a]),n||=!R(l)||l!==this._$AH[a],l===d?t=d:t!==d&&(t+=(l??"")+o[a+1]),this._$AH[a]=l}n&&!i&&this.j(t)}j(t){t===d?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,t??"")}},Y=class extends x{constructor(){super(...arguments),this.type=3}j(t){this.element[this.name]=t===d?void 0:t}},G=class extends x{constructor(){super(...arguments),this.type=4}j(t){this.element.toggleAttribute(this.name,!!t&&t!==d)}},Q=class extends x{constructor(t,e,s,i,o){super(t,e,s,i,o),this.type=5}_$AI(t,e=this){if((t=S(this,t,e,0)??d)===g)return;let s=this._$AH,i=t===d&&s!==d||t.capture!==s.capture||t.once!==s.once||t.passive!==s.passive,o=t!==d&&(s===d||i);i&&this.element.removeEventListener(this.name,this,s),o&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,t):this._$AH.handleEvent(t)}},X=class{constructor(t,e,s){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=s}get _$AU(){return this._$AM._$AU}_$AI(t){S(this,t)}};var Ft=tt.litHtmlPolyfillSupport;Ft?.(M,k),(tt.litHtmlVersions??=[]).push("3.3.1");var At=(r,t,e)=>{let s=e?.renderBefore??t,i=s._$litPart$;if(i===void 0){let o=e?.renderBefore??null;s._$litPart$=i=new k(t.insertBefore(U(),o),o,void 0,e??{})}return i._$AI(r),i};var it=globalThis,y=class extends f{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Do=At(e,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return g}};y._$litElement$=!0,y.finalized=!0,it.litElementHydrateSupport?.({LitElement:y});var Zt=it.litElementPolyfillSupport;Zt?.({LitElement:y});(it.litElementVersions??=[]).push("4.2.1");var vt=r=>(t,e)=>{e!==void 0?e.addInitializer((()=>{customElements.define(r,t)})):customElements.define(r,t)};var Jt={attribute:!0,type:String,converter:T,reflect:!1,hasChanged:I},Yt=(r=Jt,t,e)=>{let{kind:s,metadata:i}=e,o=globalThis.litPropertyMetadata.get(i);if(o===void 0&&globalThis.litPropertyMetadata.set(i,o=new Map),s==="setter"&&((r=Object.create(r)).wrapped=!0),o.set(e.name,r),s==="accessor"){let{name:n}=e;return{set(h){let a=t.get.call(this);t.set.call(this,h),this.requestUpdate(n,a,r)},init(h){return h!==void 0&&this.C(n,void 0,r,h),h}}}if(s==="setter"){let{name:n}=e;return function(h){let a=this[n];t.call(this,h),this.requestUpdate(n,a,r)}}throw Error("Unsupported decorator location: "+s)};function E(r){return(t,e)=>typeof e=="object"?Yt(r,t,e):((s,i,o)=>{let n=i.hasOwnProperty(o);return i.constructor.createProperty(o,s),n?Object.getOwnPropertyDescriptor(i,o):void 0})(r,t,e)}var Et=class q extends HTMLElement{memoizedTemplate(){let t=this.is();if(q.TEMPLATE_CACHE[t])return q.TEMPLATE_CACHE[t];let e=this.template();return window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,this.is()),q.TEMPLATE_CACHE[t]=e,e}connectedCallback(){let t=this.memoizedTemplate();window.ShadyCSS&&window.ShadyCSS.styleElement(this),this.shadowRoot||(this.attachShadow({mode:"open"}),this.shadowRoot.appendChild(document.importNode(t.content,!0)),requestAnimationFrame(()=>this.dispatchEvent(new CustomEvent("ready"))))}whenReady(t){this.shadowRoot?t():this.addEventListener("ready",()=>t())}};Et.TEMPLATE_CACHE={};var St=Et;var Gt=`<style>
|
|
4
4
|
:host {
|
|
5
5
|
contain: content;
|
|
6
6
|
background: rgba(20, 103, 186, 0);
|
|
@@ -102,7 +102,7 @@ var window;(window||={})["@cas-smartdesign/app-banner"]=(()=>{var q=Object.defin
|
|
|
102
102
|
<div class="content">
|
|
103
103
|
<slot></slot>
|
|
104
104
|
</div>
|
|
105
|
-
`,
|
|
105
|
+
`,xt=class wt extends St{constructor(){super(),this._isSpaceOrEnterKeyDown=!1,this.addEventListener("keydown",t=>{this.isSpaceOrEnter(t)&&(this._isSpaceOrEnterKeyDown=!0,t.preventDefault())}),this.addEventListener("keyup",t=>{this.isSpaceOrEnter(t)&&this._isSpaceOrEnterKeyDown==!0&&(this._isSpaceOrEnterKeyDown=!1,this.click())}),this.addEventListener("click",t=>{if(this.disabled||this.hasAttribute("disabled")){t.stopImmediatePropagation();return}let e=this.getAttribute("type")?.toLowerCase()?.trim();if(e!=="submit"&&e!=="reset")return;let s=this.closest("form");s&&e==="submit"&&s.requestSubmit(),s&&e==="reset"&&s.reset()},{capture:!0})}get imageElement(){return this._image}get icon(){return this.getAttribute("icon")}set icon(t){this.icon!==t&&(t?this.setAttribute("icon",t):this.removeAttribute("icon"),this.updateIcon())}get primary(){return this.hasAttribute("primary")}set primary(t){t?this.setAttribute("primary",""):this.removeAttribute("primary")}get disabled(){return this.getAttribute("aria-disabled")=="true"}set disabled(t){this.setAttribute("aria-disabled",t.toString())}static get observedAttributes(){return["icon"]}is(){return wt.ID}template(){let t=document.createElement("template");return t.innerHTML=Gt,t}isSpaceOrEnter(t){switch(t.key){case" ":case"Space":case"Enter":return!0;default:return!1}}click(){!this.disabled&&!this.hasAttribute("disabled")&&super.click()}connectedCallback(){super.connectedCallback(),this.hasAttribute("tabIndex")||(this.tabIndex=0),this._image=this.shadowRoot.querySelector(".icon"),this.updateIcon(),this.hasAttribute("role")||this.setAttribute("role","button")}attributeChangedCallback(){this.updateIcon()}updateIcon(){if(this._image){let t=this.getAttribute("icon");t&&(this._image.src=t)}}};xt.ID="sd-button";var rt=xt;customElements.get(rt.ID)||customElements.define(rt.ID,rt);var Ct={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},Pt=r=>(...t)=>({_$litDirective$:r,values:t}),z=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,s){this._$Ct=t,this._$AM=e,this._$Ci=s}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}};var Tt=Pt(class extends z{constructor(r){if(super(r),r.type!==Ct.ATTRIBUTE||r.name!=="class"||r.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(r){return" "+Object.keys(r).filter((t=>r[t])).join(" ")+" "}update(r,[t]){if(this.st===void 0){this.st=new Set,r.strings!==void 0&&(this.nt=new Set(r.strings.join(" ").split(/\s/).filter((s=>s!==""))));for(let s in t)t[s]&&!this.nt?.has(s)&&this.st.add(s);return this.render(t)}let e=r.element.classList;for(let s of this.st)s in t||(e.remove(s),this.st.delete(s));for(let s in t){let i=!!t[s];i===this.st.has(s)||this.nt?.has(s)||(i?(e.add(s),this.st.add(s)):(e.remove(s),this.st.delete(s)))}return g}});var Qt="data:image/svg+xml,%3csvg%20width='16'%20height='16'%20viewBox='0%200%2016%2016'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M3.75%203.75L12.25%2012.25M12.25%203.75L3.75%2012.25'%20stroke='%23767676'%20stroke-width='1.2'/%3e%3c/svg%3e",Xt=Object.defineProperty,te=Object.getOwnPropertyDescriptor,w=(r,t,e,s)=>{for(var i=s>1?void 0:s?te(t,e):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(i=(s?n(t,e,i):n(i))||i);return s&&i&&Xt(t,e,i),i},u=class extends y{constructor(){super(...arguments),this.message="",this.messageAppButton="Open",this.url="",this.icon="",this.verticalAlignment=""}render(){let r=Tt({"app-banner":!0,"app-banner-on-top":this.verticalAlignment=="top","app-banner-on-bottom":this.verticalAlignment=="bottom"});return yt`<div class="${r}">
|
|
106
106
|
<a href="#" id="app-banner-close-action" @click="${this.closeBanner}">
|
|
107
107
|
<img src="${Qt}" alt="Close cross icon" />
|
|
108
108
|
</a>
|
|
@@ -111,15 +111,16 @@ var window;(window||={})["@cas-smartdesign/app-banner"]=(()=>{var q=Object.defin
|
|
|
111
111
|
<div class="app-banner-message-div">${this.message}</div>
|
|
112
112
|
<div class="app-banner-open-text">${this.messageAppButton}</div>
|
|
113
113
|
</a>
|
|
114
|
-
</div>`}closeBanner(){let r=this.shadowRoot.host;r.style.display="none"}};
|
|
114
|
+
</div>`}closeBanner(){let r=this.shadowRoot.host;r.style.display="none"}};u.ID="sd-app-banner";u.styles=W`
|
|
115
115
|
img {
|
|
116
116
|
display: block;
|
|
117
117
|
margin: auto;
|
|
118
|
+
max-height: 52px;
|
|
118
119
|
}
|
|
119
120
|
|
|
120
121
|
.app-banner {
|
|
121
122
|
font-family: "Segoe UI", "Lucida Sans", "Arial", sans-serif;
|
|
122
|
-
background-color: #f1f1f1;
|
|
123
|
+
background-color: var(--sd-app-banner-background-color, #f1f1f1);
|
|
123
124
|
border-radius: 5px;
|
|
124
125
|
box-shadow: 0 0 20px 0 rgba(0, 0, 0, 0.3);
|
|
125
126
|
margin: 20px;
|
|
@@ -167,13 +168,13 @@ var window;(window||={})["@cas-smartdesign/app-banner"]=(()=>{var q=Object.defin
|
|
|
167
168
|
}
|
|
168
169
|
|
|
169
170
|
.app-banner-open-text {
|
|
170
|
-
color: #2980b9;
|
|
171
|
+
color: var(--sd-app-banner-link-color, #2980b9);
|
|
171
172
|
font-size: 1.1em;
|
|
172
173
|
font-weight: bold;
|
|
173
174
|
justify-self: right;
|
|
174
175
|
padding-right: 10px;
|
|
175
176
|
}
|
|
176
|
-
`;
|
|
177
|
+
`;w([E()],u.prototype,"message",2);w([E()],u.prototype,"messageAppButton",2);w([E()],u.prototype,"url",2);w([E()],u.prototype,"icon",2);w([E()],u.prototype,"verticalAlignment",2);u=w([vt("sd-app-banner")],u);return Ht(ee);})();
|
|
177
178
|
/*! Bundled license information:
|
|
178
179
|
|
|
179
180
|
@lit/reactive-element/css-tag.js:
|
|
@@ -184,86 +185,28 @@ var window;(window||={})["@cas-smartdesign/app-banner"]=(()=>{var q=Object.defin
|
|
|
184
185
|
*)
|
|
185
186
|
|
|
186
187
|
@lit/reactive-element/reactive-element.js:
|
|
187
|
-
(**
|
|
188
|
-
* @license
|
|
189
|
-
* Copyright 2017 Google LLC
|
|
190
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
191
|
-
*)
|
|
192
|
-
|
|
193
188
|
lit-html/lit-html.js:
|
|
194
|
-
(**
|
|
195
|
-
* @license
|
|
196
|
-
* Copyright 2017 Google LLC
|
|
197
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
198
|
-
*)
|
|
199
|
-
|
|
200
189
|
lit-element/lit-element.js:
|
|
201
|
-
(**
|
|
202
|
-
* @license
|
|
203
|
-
* Copyright 2017 Google LLC
|
|
204
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
205
|
-
*)
|
|
206
|
-
|
|
207
|
-
lit-html/is-server.js:
|
|
208
|
-
(**
|
|
209
|
-
* @license
|
|
210
|
-
* Copyright 2022 Google LLC
|
|
211
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
212
|
-
*)
|
|
213
|
-
|
|
214
190
|
@lit/reactive-element/decorators/custom-element.js:
|
|
215
|
-
(**
|
|
216
|
-
* @license
|
|
217
|
-
* Copyright 2017 Google LLC
|
|
218
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
219
|
-
*)
|
|
220
|
-
|
|
221
191
|
@lit/reactive-element/decorators/property.js:
|
|
222
|
-
(**
|
|
223
|
-
* @license
|
|
224
|
-
* Copyright 2017 Google LLC
|
|
225
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
226
|
-
*)
|
|
227
|
-
|
|
228
192
|
@lit/reactive-element/decorators/state.js:
|
|
229
|
-
(**
|
|
230
|
-
* @license
|
|
231
|
-
* Copyright 2017 Google LLC
|
|
232
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
233
|
-
*)
|
|
234
|
-
|
|
235
|
-
@lit/reactive-element/decorators/base.js:
|
|
236
|
-
(**
|
|
237
|
-
* @license
|
|
238
|
-
* Copyright 2017 Google LLC
|
|
239
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
240
|
-
*)
|
|
241
|
-
|
|
242
193
|
@lit/reactive-element/decorators/event-options.js:
|
|
243
|
-
|
|
244
|
-
* @license
|
|
245
|
-
* Copyright 2017 Google LLC
|
|
246
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
247
|
-
*)
|
|
248
|
-
|
|
194
|
+
@lit/reactive-element/decorators/base.js:
|
|
249
195
|
@lit/reactive-element/decorators/query.js:
|
|
250
|
-
(**
|
|
251
|
-
* @license
|
|
252
|
-
* Copyright 2017 Google LLC
|
|
253
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
254
|
-
*)
|
|
255
|
-
|
|
256
196
|
@lit/reactive-element/decorators/query-all.js:
|
|
197
|
+
@lit/reactive-element/decorators/query-async.js:
|
|
198
|
+
@lit/reactive-element/decorators/query-assigned-nodes.js:
|
|
199
|
+
lit-html/directive.js:
|
|
257
200
|
(**
|
|
258
201
|
* @license
|
|
259
202
|
* Copyright 2017 Google LLC
|
|
260
203
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
261
204
|
*)
|
|
262
205
|
|
|
263
|
-
|
|
206
|
+
lit-html/is-server.js:
|
|
264
207
|
(**
|
|
265
208
|
* @license
|
|
266
|
-
* Copyright
|
|
209
|
+
* Copyright 2022 Google LLC
|
|
267
210
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
268
211
|
*)
|
|
269
212
|
|
|
@@ -274,20 +217,6 @@ lit-html/is-server.js:
|
|
|
274
217
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
275
218
|
*)
|
|
276
219
|
|
|
277
|
-
@lit/reactive-element/decorators/query-assigned-nodes.js:
|
|
278
|
-
(**
|
|
279
|
-
* @license
|
|
280
|
-
* Copyright 2017 Google LLC
|
|
281
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
282
|
-
*)
|
|
283
|
-
|
|
284
|
-
lit-html/directive.js:
|
|
285
|
-
(**
|
|
286
|
-
* @license
|
|
287
|
-
* Copyright 2017 Google LLC
|
|
288
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
289
|
-
*)
|
|
290
|
-
|
|
291
220
|
lit-html/directives/class-map.js:
|
|
292
221
|
(**
|
|
293
222
|
* @license
|