@supersoniks/concorde 1.1.26 → 1.1.27
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/components.d.ts +2 -2
- package/components.js +2 -2
- package/concorde-core.bundle.js +17 -17
- package/concorde-core.es.js +3 -3
- package/core/components/functional/list/list.d.ts +1 -4
- package/core/components/functional/list/list.js +1 -1
- package/core/components/ui/form/input/input.d.ts +0 -3
- package/core/components/ui/form/input/input.js +1 -1
- package/core/components/ui/form/radio/radio.d.ts +1 -1
- package/core/components/ui/form/radio/radio.js +1 -1
- package/core/components/ui/form/select/select.js +1 -1
- package/core/components/ui/form/textarea/textarea.js +1 -1
- package/core/components/ui/icon/icon.js +1 -1
- package/core/components/ui/icon/icons.js +1 -1
- package/core/components/ui/loader/loader.js +2 -2
- package/core/components/ui/menu/menu-item.d.ts +1 -1
- package/core/components/ui/menu/menu-item.js +1 -1
- package/core/components/ui/menu/menu.d.ts +1 -1
- package/core/components/ui/menu/menu.js +1 -1
- package/core/components/ui/modal/modal.d.ts +5 -5
- package/core/components/ui/modal/modal.js +5 -5
- package/core/components/ui/table/table.d.ts +7 -7
- package/core/components/ui/table/table.js +7 -7
- package/core/components/ui/tabs/tab.d.ts +1 -1
- package/core/components/ui/tabs/tab.js +1 -1
- package/core/components/ui/tabs/tabs.js +0 -1
- package/core/components/ui/taxonomy/taxonomy.d.ts +2 -2
- package/core/components/ui/taxonomy/taxonomy.js +2 -2
- package/core/components/ui/theme/theme.js +3 -3
- package/core/components/ui/toast/message-subscriber.js +1 -1
- package/core/components/ui/toast/toast-item.d.ts +2 -2
- package/core/components/ui/toast/toast-item.js +1 -1
- package/core/components/ui/toast/toast.d.ts +3 -3
- package/core/components/ui/toast/toast.js +1 -1
- package/core/mixins/Fetcher.d.ts +3 -5
- package/core/mixins/Fetcher.js +4 -4
- package/core/mixins/FormCheckable.d.ts +3 -0
- package/core/mixins/FormElement.js +1 -1
- package/core/mixins/FormInput.d.ts +8 -0
- package/core/mixins/Subscriber.js +1 -1
- package/core/utils/DataBindObserver.js +4 -0
- package/core/utils/LocationHandler.js +4 -2
- package/core/utils/api.js +1 -1
- package/mixins.d.ts +3 -3
- package/mixins.js +6 -6
- package/package.json +192 -189
- package/utils.d.ts +8 -8
- package/utils.js +8 -8
package/concorde-core.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var $t=Object.defineProperty,xt=Object.defineProperties;var _t=Object.getOwnPropertyDescriptors;var bt=Object.getOwnPropertySymbols;var kt=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable;var vt=(q,O,B)=>O in q?$t(q,O,{enumerable:!0,configurable:!0,writable:!0,value:B}):q[O]=B,ut=(q,O)=>{for(var B in O||(O={}))kt.call(O,B)&&vt(q,B,O[B]);if(bt)for(var B of bt(O))At.call(O,B)&&vt(q,B,O[B]);return q},mt=(q,O)=>xt(q,_t(O));var yt=(q,O,B)=>(vt(q,typeof O!="symbol"?O+"":O,B),B);var wt;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -42,7 +42,7 @@ var wt=Object.defineProperty,$t=Object.defineProperties;var xt=Object.getOwnProp
|
|
|
42
42
|
* @license
|
|
43
43
|
* Copyright 2017 Google LLC
|
|
44
44
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
45
|
-
*/function o$c(q,O,B){let D,U=q;return typeof q=="object"?(U=q.slot,D=q):D={flatten:O},B?l$q({slot:U,flatten:O,selector:B}):o$d({descriptor:W=>({get(){var K,Y;const Z="slot"+(U?`[name=${U}]`:":not([name])"),G=(K=this.renderRoot)===null||K===void 0?void 0:K.querySelector(Z);return(Y=G==null?void 0:G.assignedNodes(D))!==null&&Y!==void 0?Y:[]},enumerable:!0,configurable:!0})})}function isComplex(q){return typeof q=="object"&&q!=null}class PublisherProxy$1{constructor(O,B=null){for(this._proxies_=new Map,this._value_=O,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this.parent=B,this.root=this;this.root.parent;)this.root=this.root.parent}delete(){for(let O of this._proxies_.values())O.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(O=!1){this._mutationListeners_.forEach(B=>B()),!O&&this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(O=!1){this._assignListeners_.forEach(B=>B(this.get())),this._publishInternalMutation_(O)}_publishInvalidation_(){this._invalidateListeners_.forEach(O=>O())}_publishDynamicFilling_(O,B){this._fillListeners_.forEach(D=>{D[O]!==B&&(D[O]=B)}),this._publishTemplateFilling_(O,B)}_publishTemplateFilling_(O,B){this._templateFillListeners_.forEach(D=>{let U=Object.getOwnPropertyDescriptor(D,O);U&&!U.set||(D.propertyMap&&D.propertyMap[O]&&(O=D.propertyMap[O]),typeof D[O]!="undefined"&&D[O]!==B&&(D[O]=B))})}onAssign(O){typeof O=="function"&&(this._assignListeners_.add(O),O(this.get()))}offAssign(O){this._assignListeners_.delete(O)}onInvalidate(O){typeof O=="function"&&this._invalidateListeners_.add(O)}offInvalidate(O){this._invalidateListeners_.delete(O)}invalidate(O){this._publishInvalidation_()}onInternalMutation(O){typeof O=="function"&&(this._mutationListeners_.add(O),O())}offInternalMutation(O){this._mutationListeners_.delete(O)}startTemplateFilling(O){this._templateFillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O.propertyMap&&O.propertyMap[B]&&(B=O.propertyMap[B]),typeof O[B]!="undefined"&&O[B]!==D&&(O[B]=D)}}stopTemplateFilling(O){this._templateFillListeners_.delete(O)}startDynamicFilling(O){this._fillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O[B]!==D&&(O[B]=D)}}stopDynamicFilling(O){this._fillListeners_.delete(O)}set(O,B=!1){if(this._value_===O||this._value_.hasOwnProperty("__value")&&O.hasOwnProperty("__value")&&this._value_.__value===O.__value)return!0;if(this._value_=O,this._value_.hasOwnProperty("__value"))return this._publishAssignement_(B),!0;if(Array.from(this._proxies_.keys()).forEach(U=>{!this._value_[U]&&this._proxies_.has(U)&&!this._proxies_.get(U).hasListener()&&this._proxies_.delete(U)}),isComplex(this._value_))for(let U in this._value_){let W=O[U],Y=isComplex(W)?W:{__value:W};if(!this._proxies_.has(U)){let Z=new Publisher({},this);this._proxies_.set(U,Z,!0),Z._proxies_.set("_parent_",this)}this._proxies_.get(U).set(Y,!0),this._publishDynamicFilling_(U,W)}return this._publishAssignement_(),!0}get(){if(this._value_.hasOwnProperty("__value")){let O=this._value_.__value;return O!=null?O:null}return this._value_}}const gt=class{constructor(){if(gt.instance!=null)throw"Singleton / use getInstance";gt.instance=this,this.publishers=new Map}static getInstance(){return gt.instance==null?new gt:gt.instance}static get(O){return gt.getInstance().get(O)}static delete(O){return gt.getInstance().delete(O)}get(O){return this.publishers.has(O)||this.publishers.set(O,new Publisher({})),this.publishers.get(O)}set(O,B){this.publishers.set(O,B)}delete(O){if(!this.publishers.has(O))return!1;this.publishers.get(O),this.publishers.delete(O)}};let PublisherManager$1=gt;yt(PublisherManager$1,"instance",null);class Publisher extends PublisherProxy$1{constructor(O,B=null){super(O,B);let D=this,U=new Proxy(this,{get:function(W,K){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(K))return D[K];if(!D._proxies_.has(K)){let Y=D._value_[K],Z=new Publisher(isComplex(Y)?Y:{__value:Y},D);Z._proxies_.set("_parent_",U),D._proxies_.set(K,Z)}return D._proxies_.get(K)},set:function(W,K,Y){if(K=="_value_")return W._value_=Y,W._value_;if(!D._proxies_.has(K)){let G=new Publisher({},D);G._proxies_.set("_parent_",U),D._proxies_.set(K,G)}return D._value_[K]!==Y&&(D._value_[K]=Y,D._publishDynamicFilling_(K,Y),D._proxies_.get(K).set(isComplex(Y)?Y:{__value:Y})),D._proxies_.get(K)},deleteProperty:function(W,K){return D._publishDynamicFilling_(K,null),D._proxies_.delete(K),delete D._value_[K]},enumerate:function(W,K){return D._value_.keys()},has:function(W,K){return K in D._value_&&K!="_lockInternalMutationPublishing_"},defineProperty:function(W,K,Y){return Y&&"value"in Y&&(D._value_[K]=Y.value),D._value_},getOwnPropertyDescriptor:function(W,K){return D._value_[K],{enumerable:!0,configurable:!0}},ownKeys:function(W){return D._value_.__value?Object.keys(this._value_.__value):Object.keys(D._value_)}});return U}}typeof module!="undefined"&&(module.exports={Publisher,PublisherManager:PublisherManager$1});class r$h{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce((O,B)=>{const D=B.indexOf("=");return O[B.substring(0,D).trim()]=B.substring(D+1),O},{})}static getAncestorAttributeValue(O,B){for(;!(O.hasAttribute&&O.hasAttribute(B))&&(O.parentNode||O.host);)O=O.parentNode||O.host;return O.hasAttribute?O.getAttribute(B):null}}const n$h=class{constructor(q){this.serviceURL=q.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=q.userName,this.password=q.password,this.token=q.token,this.tokenProvider=q.tokenProvider}async auth(){if(this.token)return;if(n$h.tokens.has(this.serviceURL)){this.token=n$h.tokens.get(this.serviceURL);return}if(!this.userName||!this.password||!this.tokenProvider)return;let q={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},O=await fetch(this.computeURL(this.tokenProvider),{headers:q});try{let B=await O.json();this.token=B.token,n$h.tokens.set(this.serviceURL,this.token)}catch{}}async get(q,O){let B=await this.createHeaders(O);const D=this.computeURL(q);if(!n$h.loadingGetPromises.has(D)){let W=new Promise(async K=>{let Y=await fetch(D,{headers:B});try{let Z=await Y.json();K(Z)}catch{K(null)}});n$h.loadingGetPromises.set(D,W)}let U=await n$h.loadingGetPromises.get(D);return n$h.loadingGetPromises.delete(D),U}async createHeaders(q){await this.auth();let O={};return this.token&&(O.Authorization="Bearer "+this.token),O.credentials="include",O["Accept-Language"]=r$h.getLanguage(),q&&Object.assign(O,q),O}computeURL(q){return(this.serviceURL+"/"+q).replace(/([^(https?\:)])\/{2,}/g,"$1/")}async send(q,O,B="POST",D){await this.auth();let U=await this.createHeaders(D);U.Accept="application/json",U["Content-Type"]="application/json";let W=await fetch(this.computeURL(q),{headers:U,method:B,body:JSON.stringify(O)});try{return await W.json()}catch{return null}}async put(q,O,B){return this.send(q,O,"PUT",B)}async post(q,O,B){return this.send(q,O,"POST",B)}async delete(q,O,B){return this.send(q,O,"delete",B)}};let a$q=n$h;a$q.loadingGetPromises=new Map,a$q.tokens=new Map;class r$g{static ucFirst(O){return typeof O!="string"?O:O.charAt(0).toUpperCase()+O.substring(1)}static js(O){try{return Function("return "+O)()}catch{return""}}}const r$f=class{static disable(){!this.enabled||(this.enabled=!1,Array.from(r$f.observedElements.keys()).forEach(q=>r$f.unObserve(q)))}static observe(q){if(!r$f.enabled||r$f.observedElements.has(q))return;let O=new MutationObserver(r$f.onMutation),B={};B.childList=!0,B.subtree=!0,B.attributes=!0,B.attributeFilter=["data-bind"],O.observe(q,B),q.querySelectorAll("[data-bind]").forEach(D=>r$f.addPublisherListeners(D)),r$f.observedElements.set(q,O)}static unObserve(q){let O=this.observedElements.get(q);!O||(O.disconnect(),q.querySelectorAll("[data-bind]").forEach(B=>r$f.removePublisherListeners(B)))}static onAdded(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$f.addPublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$f.addPublisherListeners(O)):q.childNodes.forEach(O=>r$f.onAdded(O))}static onRemoved(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$f.removePublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$f.removePublisherListeners(O)):q.childNodes.forEach(O=>r$f.onRemoved(O))}static onMutation(q){for(let D of q)switch(D.type){case"attributes":r$f.addPublisherListeners(D.target);break;case"childList":var O=D.addedNodes,B=D.removedNodes;O.forEach(U=>{r$f.onAdded(U)}),B.forEach(U=>{r$f.onRemoved(U)});break}}static removePublisherListeners(q){let O=r$f.publisherListeners.get(q);!O||(r$f.publisherListeners.delete(q),O.forEach(B=>{B.publisher.offAssign(B.onAssign)}))}static getVariablesDescriptor(q){let O=q.match(/(\$(?:\w+\\?\.?)+)/g);return O?O=O.map(B=>B.replace("$","")):O=[q],O=O.filter(B=>B.length>0),{expression:q.replace("\\",""),variables:O.map(B=>B.split(/\b\.\b/).map(D=>D.replace("\\","")))}}static getDataBindItems(q){return Array.from(q.attributes).filter(O=>O.name.indexOf("::")==0).map(O=>({propertyToUpdate:O.name.substring(2).replace(/\-((html)|\w)/g,B=>B.substring(1).toUpperCase()),bindedVariablesDescriptor:r$f.getVariablesDescriptor(O.value)}))}static getSubPublisher(q,O){for(let B of O)B!="_self_"&&(q=q[B]);return q}static addPublisherListeners(q){r$f.removePublisherListeners(q);let O=q,B=r$h.getAncestorAttributeValue(O.parentNode||O.host||O,"dataProvider");if(!B)return;let D=PublisherManager$1.getInstance().get(B),U=r$f.getDataBindItems(q),W=[];U.forEach(K=>{let Y=K.bindedVariablesDescriptor,Z=K.propertyToUpdate;for(let G of Y.variables){let st=G,tt=D;tt=r$f.getSubPublisher(D,st);let Q=q,rt={publisher:tt,onAssign:()=>{let ot=Y.variables.map(ct=>r$f.getSubPublisher(D,ct).get()),nt=Y.expression,ht=!1;if(ot.length==1&&Y.variables[0].join(".")==nt.substring(1)){let ct=ot[0];ct===null&&(ct=""),Q[Z]=ct;return}for(let ct=0;ct<ot.length;ct++){let X=ot[ct],J=Y.variables[ct];X===null&&(ht=!0,X=void 0),nt=nt.replace("$"+J.join("."),X)}if(nt.indexOf("|")!=-1){let ct=nt.indexOf("|");if(ct==0)nt=r$g.js(nt.substring(1));else{let X=nt.substring(0,ct),J=nt.substring(ct+1),et=r$g;nt=ht?"":et[X]?et[X](J):nt}}else nt=ht?"":nt;Q[Z]=nt}};tt.onAssign(rt.onAssign),W.push(rt)}}),r$f.publisherListeners.set(q,W)}};let l$p=r$f;l$p.observedElements=new Map,l$p.enabled=!0,l$p.publisherListeners=new Map,l$p.observe(document.documentElement);let A$2=window;A$2.SonicDataBindObserver||(A$2.SonicDataBindObserver=l$p);class a$p{static shallowEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(let W of D)if(O[W]!==B[W])return!1;return!0}static deepEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(const W of D){const K=O[W],Y=B[W],Z=a$p.isObject(K)&&a$p.isObject(Y);if(Z&&!a$p.deepEqual(K,Y)||!Z&&K!==Y)return!1}return!0}static isObject(O){return O!=null&&typeof O=="object"}static isUndefindOrNull(O){return O==null}static traverse(O,B,D=!1){for(let U of B){let W=O[U];if(W===void 0)return;D&&a$p.isObject(W)?O=Object.assign(Array.isArray(W)?[]:{},O,W):O=O[U]}return O}}var y$6=Object.defineProperty,P$2=Object.getOwnPropertyDescriptor,a$o=(q,O,B,D)=>{for(var U=D>1?void 0:D?P$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$6(O,B,U),U};let f$h=!1,v$7=new Set;const L$1=q=>{const O=class extends q{constructor(...D){super(),this.noAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=null,this.args=D}hasAncestorAttribute(D){return this.getAncestorAttributeValue(D)!=null}getAncestorAttributeValue(D){let U=this;return r$h.getAncestorAttributeValue(U,D)}get props(){return this.publisher?this.publisher.get():this._props}set props(D){typeof D=="string"&&["{","["].includes(D.trim().charAt(0))&&(D=JSON.parse(D)),(D==null||D==="")&&(D={}),this.publisher||this.initPublisher(),this._props=D,this.publisher&&this.publisher.set(D),this.requestUpdate()}updated(D){super.updated(D),this.shadowRoot?this.shadowRoot.children.length==0?this.style.display="none":this.style.removeProperty("display"):this.children.length==0?this.style.display="none":this.style.removeProperty("display")}connectedCallback(){if(this.hasAttribute("lazyRendering")){let D={root:null,rootMargin:Math.max(window.innerWidth*.1,window.innerHeight*.1)+"px"},U=!0;new IntersectionObserver(W=>{for(const K of W)U&&K.isIntersecting&&(U=!1,this.initWording(),this.initPublisher())},D).observe(this)}else this.initWording(),this.initPublisher();this.addDebugger(),super.connectedCallback(),O.instanceCounter++}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate())),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&this.publisher.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");let D=this.debug.style;D.position="fixed",D.top="0",D.right="0",D.margin="auto",D.borderRadius=".7rem",D.backgroundColor="#0f1729",D.color="#c5d4f9",D.padding="16px 16px",D.margin="16px 16px",D.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",D.overflowY="auto",D.zIndex="99999999",D.maxHeight="calc(100vh - 32px)",D.fontFamily="Consolas, monospace",D.maxWidth="50vw",D.fontSize="12px",D.minWidth="300px",D.overflowWrap="break-word"}if(this.addEventListener("click",D=>{!D.ctrlKey||(D.preventDefault(),f$h=!f$h)}),this.dataProvider){let D=window;D[this.dataProvider]=this.publisher}this.addEventListener("mouseover",()=>{f$h||this.removeDebugger(),document.body.appendChild(this.debug),v$7.add(this.debug)}),this.addEventListener("mouseout",()=>{f$h||this.removeDebugger()}),this.publisher.onInternalMutation(()=>{this.debug.innerHTML=`\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(this.publisher.get(),null," ")}</pre>`})}}removeDebugger(){v$7.forEach(D=>{document.body.contains(D)&&document.body.removeChild(D)}),v$7=new Set}getApiConfiguration(){const D=this.getAncestorAttributeValue("token");let U=this.getAncestorAttributeValue("serviceURL"),W=null,K=null,Y=null;return D||(W=this.getAncestorAttributeValue("userName"),K=this.getAncestorAttributeValue("password"),Y=this.getAncestorAttributeValue("tokenProvider")),{serviceURL:U,token:D,userName:W,password:K,tokenProvider:Y}}async initWording(){let D=!1;const U=Object.getOwnPropertyNames(this.constructor.prototype);for(let Z of U)if(Z.indexOf("wording_")==0){D=!0;break}if(!D)return;let W=PublisherManager$1.getInstance().get("sonic-wording"),K=this.getAncestorAttributeValue("wordingProvider");const Y=new a$q(this.getApiConfiguration());if(K){let Z=[];for(let G of U)if(G.indexOf("wording_")==0){let st=G.substring(8);W.get()[G]||(W[G]="...",Z.push(st))}if(Z.length>0){let G=await Y.post(K,{labels:Z});for(let st in G)W["wording_"+st]=G[st]}W.startTemplateFilling(this),this.wordingPublisher=W}}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;let D=super.createRenderRoot();return l$p.observe(D),D}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const D=PublisherManager$1.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let U=this.dataProvider;if(!U&&this._props&&(this.dataProvider=U="__subscriber__"+O.instanceCounter),U){this.bindPublisher&&D.set(U,this.bindPublisher());let W=D.get(U);if(this.dataProvider=U,this.hasAttribute("subDataProvider")){let K=this.getAttribute("subDataProvider");this.dataProvider=U+"/"+K,W=a$p.traverse(W,K.split(".")),D.set(this.dataProvider,W),this.publisher=W}this.publisher=W}this.publisher&&(this.onAssign=()=>{this.requestUpdate()},this.publisher.onAssign(this.onAssign),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this._props&&this.publisher.set(this._props))}};let B=O;return B.instanceCounter=0,a$o([e$b({type:Boolean})],B.prototype,"noAutoFill",2),a$o([e$b({type:Object})],B.prototype,"propertyMap",2),a$o([e$b({type:String,attribute:"data-title"})],B.prototype,"title",2),a$o([e$b({reflect:!0})],B.prototype,"dataProvider",2),a$o([e$b()],B.prototype,"bindPublisher",2),a$o([e$b()],B.prototype,"props",1),B};let m$g=window;m$g.SonicPublisherManager||(m$g.SonicPublisherManager=PublisherManager$1);var p$i=Object.defineProperty,i$o=Object.getOwnPropertyDescriptor,n$g=(q,O,B,D)=>{for(var U=D>1?void 0:D?i$o(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$i(O,B,U),U};const T$2=q=>{class O extends q{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){let D=this.templates||[...this.querySelectorAll("template")];for(let U of D)U.hasAttribute(this.templateValueAttribute)&&(this.templateParts[U.getAttribute(this.templateValueAttribute)]=U,this.templatePartsList.push(U));this.templateList=D.filter(U=>!U.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=D),super.connectedCallback()}}return n$g([e$b({type:Array})],O.prototype,"templates",2),O};var p$h=Object.defineProperty,_=Object.getOwnPropertyDescriptor,t$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?_(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$h(O,B,U),U};const M="sonic-date";let SonicDate=class extends L$1(T$2(s$a)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=new Date().getTime()/1e3,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(q){this._wording_billet_periode_validite=q,this.duAu=this.wording_billet_periode_validite.split("%s").map(O=>O.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.wording_billet_periode_validite="Du %s au %s",this.pageLanguage=r$h.getLanguage(),super.connectedCallback()}getDatesParts(q,O,B){const D=new Intl.DateTimeFormat(this.language||this.pageLanguage,B);let U=this.startDateObject;U.setTime(q*1e3);let W=null;if(O>0){let K=this.endDateObject;if(K.setTime(O*1e3),W=D.formatRangeToParts(U,K),this.designMode)for(let Z of W)Z.type=="literal"&&this.designMode&&Z.value.trim()==","&&(Z.hidden=!0);const Y=U.getFullYear()==K.getFullYear()&&U.getMonth()==K.getMonth()&&U.getDate()==K.getDate();if(W.some(Z=>Z.source=="endRange")&&!Y){for(let Z of W)if(Z.type=="literal"&&Z.source=="shared"&&Z.value.trim().length>0&&!Y){Z.value=" "+this.duAu[1]+" ",Z.type="to";break}this.designMode||W.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else W=D.formatToParts(U);return W[0].value=r$g.ucFirst(W[0].value),W=W.filter(K=>K.hidden!==!0),W}render(){if(!this.renderIf)return w$1;if(this.date_string&&(this.date=new Date(this.date_string).getTime()/1e3),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=new Date(this.start_date_string).getTime()/1e3),this.end_date_string&&(this.end_date=new Date(this.end_date_string).getTime()/1e3),this.end_date>0&&this.end_date<this.start_date){const B=this.start_date;this.start_date=this.end_date,this.end_date=B}let q={weekday:this.weekday,year:this.year,month:this.month,day:this.day};this.hour&&(q.hour=this.hour),this.minute&&(q.minute=this.minute),this.era&&(q.era=this.era),this.time_zone&&(q.timeZone=this.time_zone);let O=this.getDatesParts(this.start_date,this.end_date,q);return $$2`${O.map(B=>{let D=this.templateParts[B.type];if(D){var U=document.importNode(D.content,!0);let W=U.children[0];return W.innerText.trim()==""&&(W.innerText=B.value),U}return $$2`<span class="${B.type}">${B.value}</span>`})}`}};t$9([e$b()],SonicDate.prototype,"wording_billet_periode_validite",1),t$9([e$b({type:Boolean})],SonicDate.prototype,"designMode",2),t$9([e$b({type:String})],SonicDate.prototype,"time_zone",2),t$9([e$b({type:Number})],SonicDate.prototype,"date",2),t$9([e$b({type:String})],SonicDate.prototype,"date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"start_date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"end_date_string",2),t$9([e$b({type:Number})],SonicDate.prototype,"start_date",2),t$9([e$b({type:Number})],SonicDate.prototype,"end_date",2),t$9([e$b({type:String})],SonicDate.prototype,"era",2),t$9([e$b({type:String})],SonicDate.prototype,"year",2),t$9([e$b({type:String})],SonicDate.prototype,"month",2),t$9([e$b({type:String})],SonicDate.prototype,"day",2),t$9([e$b({type:String})],SonicDate.prototype,"weekday",2),t$9([e$b({type:String})],SonicDate.prototype,"hour",2),t$9([e$b({type:String})],SonicDate.prototype,"minute",2),t$9([e$b({type:String})],SonicDate.prototype,"language",2),t$9([e$b({type:Boolean})],SonicDate.prototype,"renderIf",2),SonicDate=t$9([n$j(M)],SonicDate);const inline=r$k`:host([align="left"]) .sonic-loader--inline { margin-left:0; } :host([align="right"]) .sonic-loader--inline { margin-left:auto; margin-right:0; } .sonic-loader--inline { display:block; position: relative; width: 80px; height: 80px; margin:auto; z-index:20; } .sonic-loader--inline div { position: absolute; top: 33px; width: 13px; height: 13px; border-radius: 50%; background:var(--sc-loader-bg); animation-timing-function: cubic-bezier(0, 1, 1, 0); } .sonic-loader--inline div:nth-child(1) { left: 8px; animation: lds-ellipsis1 0.6s infinite; } .sonic-loader--inline div:nth-child(2) { left: 8px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(3) { left: 32px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(4) { left: 56px; animation: lds-ellipsis3 0.6s infinite; } @keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } } @keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }`,fixed=r$k`@keyframes sonic-loader--fixed { 0% { transform: scale(0); opacity: 0; } 5% { opacity: 1; } 70% { opacity:90%; } 100% { transform: scale(1); opacity: 0; } } .sonic-loader--fixed { position: fixed; top:50%; left:50%; transform:transateY(-50%) translateX(-50%); z-index:999; } .sonic-loader--fixed > div:nth-child(2) { animation-delay: -0.5s; } .sonic-loader--fixed > div:nth-child(3) { animation-delay: -0.2s; } .sonic-loader--fixed > div:nth-child(4) { display:none !important; } .sonic-loader--fixed > div { background-color: var(--sc-loader-bg); width: 5rem; height: 5rem; border-radius: 100%; margin: 2px; animation-fill-mode: both; position: absolute; top: 0px; opacity: 0; margin: 0; top: -2.5rem; left: -2.5rem; width: 5rem; height: 5rem; animation: sonic-loader--fixed 1s 0s linear infinite; }`;var d$r=Object.defineProperty,c$m=Object.getOwnPropertyDescriptor,a$n=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$m(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$r(O,B,U),U};const l$o="sonic-loader";let Loader=class extends s$a{constructor(){super(...arguments),this.mode="fixed"}static show(q){Loader.loader||(Loader.loader=document.createElement("sonic-loader"));let O=Loader.loader;q||(q={});let B=q;for(let D in B)O.setAttribute(D,B[D]);q.container||(q.container=document.querySelector("sonic-theme")||document.body,q.mode="fixed"),q.container.appendChild(O),Loader.callCounter++}static hide(){Loader.callCounter--,!(Loader.callCounter>0)&&Loader.loader&&Loader.loader.remove()}render(){return $$2`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Loader.styles=[inline,fixed,r$k`:host { --sc-loader-bg: var(--sc-primary, currentColor); pointer-events: none; } .sonic-loader { opacity: 0; animation: showLoader 0.5s 0.5s forwards; } .sonic-loader--inline { animation-delay: 0s; } @keyframes showLoader { 0% { opacity: 0; } 100% { opacity: 1; } }`],Loader.callCounter=0,a$n([e$b({type:String})],Loader.prototype,"mode",2),Loader=a$n([n$j(l$o)],Loader);try{customElements.define(l$o,Loader)}catch{}/**
|
|
45
|
+
*/function o$c(q,O,B){let D,U=q;return typeof q=="object"?(U=q.slot,D=q):D={flatten:O},B?l$q({slot:U,flatten:O,selector:B}):o$d({descriptor:W=>({get(){var K,Y;const Z="slot"+(U?`[name=${U}]`:":not([name])"),G=(K=this.renderRoot)===null||K===void 0?void 0:K.querySelector(Z);return(Y=G==null?void 0:G.assignedNodes(D))!==null&&Y!==void 0?Y:[]},enumerable:!0,configurable:!0})})}function isComplex(q){return typeof q=="object"&&q!=null}class PublisherProxy$1{constructor(O,B=null){for(this._proxies_=new Map,this._value_=O,this._invalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this.parent=B,this.root=this;this.root.parent;)this.root=this.root.parent}delete(){for(let O of this._proxies_.values())O.delete();this._invalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear()}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(O=!1){this._mutationListeners_.forEach(B=>B()),!O&&this.parent&&this.parent._publishInternalMutation_()}_publishAssignement_(O=!1){this._assignListeners_.forEach(B=>B(this.get())),this._publishInternalMutation_(O)}_publishInvalidation_(){this._invalidateListeners_.forEach(O=>O())}_publishDynamicFilling_(O,B){this._fillListeners_.forEach(D=>{D[O]!==B&&(D[O]=B)}),this._publishTemplateFilling_(O,B)}_publishTemplateFilling_(O,B){this._templateFillListeners_.forEach(D=>{let U=Object.getOwnPropertyDescriptor(D,O);U&&!U.set||(D.propertyMap&&D.propertyMap[O]&&(O=D.propertyMap[O]),typeof D[O]!="undefined"&&D[O]!==B&&(D[O]=B))})}onAssign(O){typeof O=="function"&&(this._assignListeners_.add(O),O(this.get()))}offAssign(O){this._assignListeners_.delete(O)}onInvalidate(O){typeof O=="function"&&this._invalidateListeners_.add(O)}offInvalidate(O){this._invalidateListeners_.delete(O)}invalidate(O){this._publishInvalidation_()}onInternalMutation(O){typeof O=="function"&&(this._mutationListeners_.add(O),O())}offInternalMutation(O){this._mutationListeners_.delete(O)}startTemplateFilling(O){this._templateFillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O.propertyMap&&O.propertyMap[B]&&(B=O.propertyMap[B]),typeof O[B]!="undefined"&&O[B]!==D&&(O[B]=D)}}stopTemplateFilling(O){this._templateFillListeners_.delete(O)}startDynamicFilling(O){this._fillListeners_.add(O);for(var B in this._value_){const D=this._value_[B];O[B]!==D&&(O[B]=D)}}stopDynamicFilling(O){this._fillListeners_.delete(O)}set(O,B=!1){if(this._value_===O||this._value_.hasOwnProperty("__value")&&O.hasOwnProperty("__value")&&this._value_.__value===O.__value)return!0;if(this._value_=O,this._value_.hasOwnProperty("__value"))return this._publishAssignement_(B),!0;if(Array.from(this._proxies_.keys()).forEach(U=>{!this._value_[U]&&this._proxies_.has(U)&&!this._proxies_.get(U).hasListener()&&this._proxies_.delete(U)}),isComplex(this._value_))for(let U in this._value_){let W=O[U],Y=isComplex(W)?W:{__value:W};if(!this._proxies_.has(U)){let Z=new Publisher({},this);this._proxies_.set(U,Z,!0),Z._proxies_.set("_parent_",this)}this._proxies_.get(U).set(Y,!0),this._publishDynamicFilling_(U,W)}return this._publishAssignement_(),!0}get(){if(this._value_.hasOwnProperty("__value")){let O=this._value_.__value;return O!=null?O:null}return this._value_}}const gt=class{constructor(){if(gt.instance!=null)throw"Singleton / use getInstance";gt.instance=this,this.publishers=new Map}static getInstance(){return gt.instance==null?new gt:gt.instance}static get(O){return gt.getInstance().get(O)}static delete(O){return gt.getInstance().delete(O)}get(O){return this.publishers.has(O)||this.publishers.set(O,new Publisher({})),this.publishers.get(O)}set(O,B){this.publishers.set(O,B)}delete(O){if(!this.publishers.has(O))return!1;this.publishers.get(O),this.publishers.delete(O)}};let PublisherManager$1=gt;yt(PublisherManager$1,"instance",null);class Publisher extends PublisherProxy$1{constructor(O,B=null){super(O,B);let D=this,U=new Proxy(this,{get:function(W,K){if(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_lockInternalMutationPublishing_"].includes(K))return D[K];if(!D._proxies_.has(K)){let Y=D._value_[K],Z=new Publisher(isComplex(Y)?Y:{__value:Y},D);Z._proxies_.set("_parent_",U),D._proxies_.set(K,Z)}return D._proxies_.get(K)},set:function(W,K,Y){if(K=="_value_")return W._value_=Y,W._value_;if(!D._proxies_.has(K)){let G=new Publisher({},D);G._proxies_.set("_parent_",U),D._proxies_.set(K,G)}return D._value_[K]!==Y&&(D._value_[K]=Y,D._publishDynamicFilling_(K,Y),D._proxies_.get(K).set(isComplex(Y)?Y:{__value:Y})),D._proxies_.get(K)},deleteProperty:function(W,K){return D._publishDynamicFilling_(K,null),D._proxies_.delete(K),delete D._value_[K]},enumerate:function(W,K){return D._value_.keys()},has:function(W,K){return K in D._value_&&K!="_lockInternalMutationPublishing_"},defineProperty:function(W,K,Y){return Y&&"value"in Y&&(D._value_[K]=Y.value),D._value_},getOwnPropertyDescriptor:function(W,K){return D._value_[K],{enumerable:!0,configurable:!0}},ownKeys:function(W){return D._value_.__value?Object.keys(this._value_.__value):Object.keys(D._value_)}});return U}}typeof module!="undefined"&&(module.exports={Publisher,PublisherManager:PublisherManager$1});class r$h{static getLanguage(){return document.getElementsByTagName("html")[0].getAttribute("lang")}static getCookies(){return document.cookie.split(";").reduce((O,B)=>{const D=B.indexOf("=");return O[B.substring(0,D).trim()]=B.substring(D+1),O},{})}static getAncestorAttributeValue(O,B){for(;!(O.hasAttribute&&O.hasAttribute(B))&&(O.parentNode||O.host);)O=O.parentNode||O.host;return O.hasAttribute?O.getAttribute(B):null}}const n$h=class{constructor(q){this.serviceURL=q.serviceURL,this.serviceURL||(this.serviceURL=document.location.origin),this.userName=q.userName,this.password=q.password,this.token=q.token,this.tokenProvider=q.tokenProvider}async auth(){if(this.token)return;if(n$h.tokens.has(this.serviceURL)){this.token=n$h.tokens.get(this.serviceURL);return}if(!this.userName||!this.password||!this.tokenProvider)return;let q={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))},O=await fetch(this.computeURL(this.tokenProvider),{headers:q});try{let B=await O.json();this.token=B.token,n$h.tokens.set(this.serviceURL,this.token)}catch{}}async get(q,O){let B=await this.createHeaders(O);const D=this.computeURL(q);if(!n$h.loadingGetPromises.has(D)){let W=new Promise(async K=>{let Y=await fetch(D,{headers:B});try{let Z=await Y.json();K(Z)}catch{K(null)}});n$h.loadingGetPromises.set(D,W)}let U=await n$h.loadingGetPromises.get(D);return n$h.loadingGetPromises.delete(D),U}async createHeaders(q){await this.auth();let O={};return this.token&&(O.Authorization="Bearer "+this.token),O.credentials="include",O["Accept-Language"]=r$h.getLanguage(),q&&Object.assign(O,q),O}computeURL(q){return(this.serviceURL+"/"+q).replace(/([^(https?\:)])\/{2,}/g,"$1/")}async send(q,O,B="POST",D){await this.auth();let U=await this.createHeaders(D);U.Accept="application/json",U["Content-Type"]="application/json";let W=await fetch(this.computeURL(q),{headers:U,method:B,body:JSON.stringify(O)});try{return await W.json()}catch{return null}}async put(q,O,B){return this.send(q,O,"PUT",B)}async post(q,O,B){return this.send(q,O,"POST",B)}async delete(q,O,B){return this.send(q,O,"delete",B)}};let a$q=n$h;a$q.loadingGetPromises=new Map,a$q.tokens=new Map;class r$g{static ucFirst(O){return typeof O!="string"?O:O.charAt(0).toUpperCase()+O.substring(1)}static js(O){try{return Function("return "+O)()}catch{return""}}}const r$f=class{static disable(){!this.enabled||(this.enabled=!1,Array.from(r$f.observedElements.keys()).forEach(q=>r$f.unObserve(q)))}static observe(q){if(!q||!r$f.enabled||r$f.observedElements.has(q))return;let O=new MutationObserver(r$f.onMutation),B={};B.childList=!0,B.subtree=!0,B.attributes=!0,B.attributeFilter=["data-bind"],O.observe(q,B),q.querySelectorAll("[data-bind]").forEach(D=>r$f.addPublisherListeners(D)),r$f.observedElements.set(q,O)}static unObserve(q){if(!q)return;let O=this.observedElements.get(q);!O||(O.disconnect(),q.querySelectorAll("[data-bind]").forEach(B=>r$f.removePublisherListeners(B)))}static onAdded(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$f.addPublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$f.addPublisherListeners(O)):q.childNodes.forEach(O=>r$f.onAdded(O))}static onRemoved(q){q.hasAttribute&&q.hasAttribute("data-bind")&&r$f.removePublisherListeners(q),q.querySelectorAll?q.querySelectorAll("[data-bind]").forEach(O=>r$f.removePublisherListeners(O)):q.childNodes.forEach(O=>r$f.onRemoved(O))}static onMutation(q){for(let D of q)switch(D.type){case"attributes":r$f.addPublisherListeners(D.target);break;case"childList":var O=D.addedNodes,B=D.removedNodes;O.forEach(U=>{r$f.onAdded(U)}),B.forEach(U=>{r$f.onRemoved(U)});break}}static removePublisherListeners(q){let O=r$f.publisherListeners.get(q);!O||(r$f.publisherListeners.delete(q),O.forEach(B=>{B.publisher.offAssign(B.onAssign)}))}static getVariablesDescriptor(q){let O=q.match(/(\$(?:\w+\\?\.?)+)/g);return O?O=O.map(B=>B.replace("$","")):O=[q],O=O.filter(B=>B.length>0),{expression:q.replace("\\",""),variables:O.map(B=>B.split(/\b\.\b/).map(D=>D.replace("\\","")))}}static getDataBindItems(q){return Array.from(q.attributes).filter(O=>O.name.indexOf("::")==0).map(O=>({propertyToUpdate:O.name.substring(2).replace(/\-((html)|\w)/g,B=>B.substring(1).toUpperCase()),bindedVariablesDescriptor:r$f.getVariablesDescriptor(O.value)}))}static getSubPublisher(q,O){for(let B of O)B!="_self_"&&(q=q[B]);return q}static addPublisherListeners(q){r$f.removePublisherListeners(q);let O=q,B=r$h.getAncestorAttributeValue(O.parentNode||O.host||O,"dataProvider");if(!B)return;let D=PublisherManager$1.getInstance().get(B),U=r$f.getDataBindItems(q),W=[];U.forEach(K=>{let Y=K.bindedVariablesDescriptor,Z=K.propertyToUpdate;for(let G of Y.variables){let st=G,tt=D;tt=r$f.getSubPublisher(D,st);let Q=q,rt={publisher:tt,onAssign:()=>{let ot=Y.variables.map(ct=>r$f.getSubPublisher(D,ct).get()),nt=Y.expression,ht=!1;if(ot.length==1&&Y.variables[0].join(".")==nt.substring(1)){let ct=ot[0];ct===null&&(ct=""),Q[Z]=ct;return}for(let ct=0;ct<ot.length;ct++){let X=ot[ct],J=Y.variables[ct];X===null&&(ht=!0,X=void 0),nt=nt.replace("$"+J.join("."),X)}if(nt.indexOf("|")!=-1){let ct=nt.indexOf("|");if(ct==0)nt=r$g.js(nt.substring(1));else{let X=nt.substring(0,ct),J=nt.substring(ct+1),et=r$g;nt=ht?"":et[X]?et[X](J):nt}}else nt=ht?"":nt;Q[Z]=nt}};tt.onAssign(rt.onAssign),W.push(rt)}}),r$f.publisherListeners.set(q,W)}};let l$p=r$f;l$p.observedElements=new Map,l$p.enabled=!0,l$p.publisherListeners=new Map,l$p.observe(document.documentElement);let A$2=window;A$2.SonicDataBindObserver||(A$2.SonicDataBindObserver=l$p);class a$p{static shallowEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(let W of D)if(O[W]!==B[W])return!1;return!0}static deepEqual(O,B){const D=Object.keys(O),U=Object.keys(B);if(D.length!==U.length)return!1;for(const W of D){const K=O[W],Y=B[W],Z=a$p.isObject(K)&&a$p.isObject(Y);if(Z&&!a$p.deepEqual(K,Y)||!Z&&K!==Y)return!1}return!0}static isObject(O){return O!=null&&typeof O=="object"}static isUndefindOrNull(O){return O==null}static traverse(O,B,D=!1){for(let U of B){let W=O[U];if(W===void 0)return;D&&a$p.isObject(W)?O=Object.assign(Array.isArray(W)?[]:{},O,W):O=O[U]}return O}}var y$6=Object.defineProperty,P$2=Object.getOwnPropertyDescriptor,a$o=(q,O,B,D)=>{for(var U=D>1?void 0:D?P$2(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&y$6(O,B,U),U};let f$h=!1,v$7=new Set;const L$1=q=>{const O=class extends q{constructor(...D){super(),this.noAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.defferedDebug=null,this.debug=null,this.onAssign=null,this.args=D}hasAncestorAttribute(D){return this.getAncestorAttributeValue(D)!=null}getAncestorAttributeValue(D){let U=this;return r$h.getAncestorAttributeValue(U,D)}get props(){return this.publisher?this.publisher.get():this._props}set props(D){typeof D=="string"&&["{","["].includes(D.trim().charAt(0))&&(D=JSON.parse(D)),(D==null||D==="")&&(D={}),this.publisher||this.initPublisher(),this._props=D,this.publisher&&this.publisher.set(D),this.requestUpdate()}updated(D){super.updated(D),this.shadowRoot?this.shadowRoot.children.length==0?this.style.display="none":this.style.removeProperty("display"):this.children.length==0?this.style.display="none":this.style.removeProperty("display")}connectedCallback(){if(this.hasAttribute("lazyRendering")){let D={root:null,rootMargin:Math.max(window.innerWidth*.1,window.innerHeight*.1)+"px"},U=!0;new IntersectionObserver(W=>{for(const K of W)U&&K.isIntersecting&&(U=!1,this.initWording(),this.initPublisher())},D).observe(this)}else this.initWording(),this.initPublisher();this.addDebugger(),super.connectedCallback(),O.instanceCounter++}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate())),this.wordingPublisher&&this.wordingPublisher.stopTemplateFilling(this),this.onAssign&&this.publisher.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");let D=this.debug.style;D.position="fixed",D.top="0",D.right="0",D.margin="auto",D.borderRadius=".7rem",D.backgroundColor="#0f1729",D.color="#c5d4f9",D.padding="16px 16px",D.margin="16px 16px",D.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",D.overflowY="auto",D.zIndex="99999999",D.maxHeight="calc(100vh - 32px)",D.fontFamily="Consolas, monospace",D.maxWidth="50vw",D.fontSize="12px",D.minWidth="300px",D.overflowWrap="break-word"}if(this.addEventListener("click",D=>{!D.ctrlKey||(D.preventDefault(),f$h=!f$h)}),this.dataProvider){let D=window;D[this.dataProvider]=this.publisher}this.addEventListener("mouseover",()=>{f$h||this.removeDebugger(),document.body.appendChild(this.debug),v$7.add(this.debug)}),this.addEventListener("mouseout",()=>{f$h||this.removeDebugger()}),this.publisher.onInternalMutation(()=>{this.debug.innerHTML=`\u{1F916} DataProvider : "<b style="font-weight:700;color:#fff">${this.dataProvider}</b>"<br><div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px">Variable disponible dans la console<br>ctrl + Clique : \xE9pingler / d\xE9s\xE9pingler</div><pre style="margin-top:10px;background:0 0;padding:0;font-size:inherit;color:inherit">${JSON.stringify(this.publisher.get(),null," ")}</pre>`})}}removeDebugger(){v$7.forEach(D=>{document.body.contains(D)&&document.body.removeChild(D)}),v$7=new Set}getApiConfiguration(){const D=this.getAncestorAttributeValue("token");let U=this.getAncestorAttributeValue("serviceURL"),W=null,K=null,Y=null;return D||(W=this.getAncestorAttributeValue("userName"),K=this.getAncestorAttributeValue("password"),Y=this.getAncestorAttributeValue("tokenProvider")),{serviceURL:U,token:D,userName:W,password:K,tokenProvider:Y}}async initWording(){let D=!1;const U=Object.getOwnPropertyNames(this.constructor.prototype);for(let Z of U)if(Z.indexOf("wording_")==0){D=!0;break}if(!D)return;let W=PublisherManager$1.getInstance().get("sonic-wording"),K=this.getAncestorAttributeValue("wordingProvider");const Y=new a$q(this.getApiConfiguration());if(K){let Z=[];for(let G of U)if(G.indexOf("wording_")==0){let st=G.substring(8);W.get()[G]||(W[G]="...",Z.push(st))}if(Z.length>0){let G=await Y.post(K,{labels:Z});for(let st in G)W["wording_"+st]=G[st]}W.startTemplateFilling(this),this.wordingPublisher=W}}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;let D=super.createRenderRoot();return l$p.observe(D),D}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const D=PublisherManager$1.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let U=this.dataProvider;if(!U&&this._props&&(this.dataProvider=U="__subscriber__"+O.instanceCounter),U){this.bindPublisher&&D.set(U,this.bindPublisher());let W=D.get(U);if(this.dataProvider=U,this.hasAttribute("subDataProvider")){let K=this.getAttribute("subDataProvider");this.dataProvider=U+"/"+K,W=a$p.traverse(W,K.split(".")),D.set(this.dataProvider,W),this.publisher=W}this.publisher=W}this.publisher&&(this.onAssign=()=>{this.requestUpdate()},this.publisher.onAssign(this.onAssign),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this._props&&this.publisher.set(this._props))}};let B=O;return B.instanceCounter=0,a$o([e$b({type:Boolean})],B.prototype,"noAutoFill",2),a$o([e$b({type:Object})],B.prototype,"propertyMap",2),a$o([e$b({type:String,attribute:"data-title"})],B.prototype,"title",2),a$o([e$b({reflect:!0})],B.prototype,"dataProvider",2),a$o([e$b()],B.prototype,"bindPublisher",2),a$o([e$b()],B.prototype,"props",1),B};let m$g=window;m$g.SonicPublisherManager||(m$g.SonicPublisherManager=PublisherManager$1);var p$i=Object.defineProperty,i$o=Object.getOwnPropertyDescriptor,n$g=(q,O,B,D)=>{for(var U=D>1?void 0:D?i$o(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$i(O,B,U),U};const T$2=q=>{class O extends q{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){let D=this.templates||[...this.querySelectorAll("template")];for(let U of D)U.hasAttribute(this.templateValueAttribute)&&(this.templateParts[U.getAttribute(this.templateValueAttribute)]=U,this.templatePartsList.push(U));this.templateList=D.filter(U=>!U.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=D),super.connectedCallback()}}return n$g([e$b({type:Array})],O.prototype,"templates",2),O};var p$h=Object.defineProperty,_=Object.getOwnPropertyDescriptor,t$9=(q,O,B,D)=>{for(var U=D>1?void 0:D?_(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&p$h(O,B,U),U};const M="sonic-date";let SonicDate=class extends L$1(T$2(s$a)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=new Date().getTime()/1e3,this.end_date=0,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.minute="2-digit",this.language="",this.renderIf=!0,this.startDateObject=new Date,this.endDateObject=new Date}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(q){this._wording_billet_periode_validite=q,this.duAu=this.wording_billet_periode_validite.split("%s").map(O=>O.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.wording_billet_periode_validite="Du %s au %s",this.pageLanguage=r$h.getLanguage(),super.connectedCallback()}getDatesParts(q,O,B){const D=new Intl.DateTimeFormat(this.language||this.pageLanguage,B);let U=this.startDateObject;U.setTime(q*1e3);let W=null;if(O>0){let K=this.endDateObject;if(K.setTime(O*1e3),W=D.formatRangeToParts(U,K),this.designMode)for(let Z of W)Z.type=="literal"&&this.designMode&&Z.value.trim()==","&&(Z.hidden=!0);const Y=U.getFullYear()==K.getFullYear()&&U.getMonth()==K.getMonth()&&U.getDate()==K.getDate();if(W.some(Z=>Z.source=="endRange")&&!Y){for(let Z of W)if(Z.type=="literal"&&Z.source=="shared"&&Z.value.trim().length>0&&!Y){Z.value=" "+this.duAu[1]+" ",Z.type="to";break}this.designMode||W.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else W=D.formatToParts(U);return W[0].value=r$g.ucFirst(W[0].value),W=W.filter(K=>K.hidden!==!0),W}render(){if(!this.renderIf)return w$1;if(this.date_string&&(this.date=new Date(this.date_string).getTime()/1e3),this.date&&(this.start_date=this.date),this.start_date_string&&(this.start_date=new Date(this.start_date_string).getTime()/1e3),this.end_date_string&&(this.end_date=new Date(this.end_date_string).getTime()/1e3),this.end_date>0&&this.end_date<this.start_date){const B=this.start_date;this.start_date=this.end_date,this.end_date=B}let q={weekday:this.weekday,year:this.year,month:this.month,day:this.day};this.hour&&(q.hour=this.hour),this.minute&&(q.minute=this.minute),this.era&&(q.era=this.era),this.time_zone&&(q.timeZone=this.time_zone);let O=this.getDatesParts(this.start_date,this.end_date,q);return $$2`${O.map(B=>{let D=this.templateParts[B.type];if(D){var U=document.importNode(D.content,!0);let W=U.children[0];return W.innerText.trim()==""&&(W.innerText=B.value),U}return $$2`<span class="${B.type}">${B.value}</span>`})}`}};t$9([e$b()],SonicDate.prototype,"wording_billet_periode_validite",1),t$9([e$b({type:Boolean})],SonicDate.prototype,"designMode",2),t$9([e$b({type:String})],SonicDate.prototype,"time_zone",2),t$9([e$b({type:Number})],SonicDate.prototype,"date",2),t$9([e$b({type:String})],SonicDate.prototype,"date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"start_date_string",2),t$9([e$b({type:String})],SonicDate.prototype,"end_date_string",2),t$9([e$b({type:Number})],SonicDate.prototype,"start_date",2),t$9([e$b({type:Number})],SonicDate.prototype,"end_date",2),t$9([e$b({type:String})],SonicDate.prototype,"era",2),t$9([e$b({type:String})],SonicDate.prototype,"year",2),t$9([e$b({type:String})],SonicDate.prototype,"month",2),t$9([e$b({type:String})],SonicDate.prototype,"day",2),t$9([e$b({type:String})],SonicDate.prototype,"weekday",2),t$9([e$b({type:String})],SonicDate.prototype,"hour",2),t$9([e$b({type:String})],SonicDate.prototype,"minute",2),t$9([e$b({type:String})],SonicDate.prototype,"language",2),t$9([e$b({type:Boolean})],SonicDate.prototype,"renderIf",2),SonicDate=t$9([n$j(M)],SonicDate);const inline=r$k`:host([align="left"]) .sonic-loader--inline { margin-left:0; } :host([align="right"]) .sonic-loader--inline { margin-left:auto; margin-right:0; } .sonic-loader--inline { display:block; position: relative; width: 80px; height: 80px; margin:auto; z-index:20; } .sonic-loader--inline div { position: absolute; top: 33px; width: 13px; height: 13px; border-radius: 50%; background:var(--sc-loader-bg); animation-timing-function: cubic-bezier(0, 1, 1, 0); } .sonic-loader--inline div:nth-child(1) { left: 8px; animation: lds-ellipsis1 0.6s infinite; } .sonic-loader--inline div:nth-child(2) { left: 8px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(3) { left: 32px; animation: lds-ellipsis2 0.6s infinite; } .sonic-loader--inline div:nth-child(4) { left: 56px; animation: lds-ellipsis3 0.6s infinite; } @keyframes lds-ellipsis1 { 0% { transform: scale(0); } 100% { transform: scale(1); } } @keyframes lds-ellipsis3 { 0% { transform: scale(1); } 100% { transform: scale(0); } } @keyframes lds-ellipsis2 { 0% { transform: translate(0, 0); } 100% { transform: translate(24px, 0); } }`,fixed=r$k`@keyframes sonic-loader--fixed { 0% { transform: scale(0); opacity: 0; } 5% { opacity: 1; } 70% { opacity:90%; } 100% { transform: scale(1); opacity: 0; } } .sonic-loader--fixed { position: fixed; top:50%; left:50%; transform:transateY(-50%) translateX(-50%); z-index:999; } .sonic-loader--fixed > div:nth-child(2) { animation-delay: -0.5s; } .sonic-loader--fixed > div:nth-child(3) { animation-delay: -0.2s; } .sonic-loader--fixed > div:nth-child(4) { display:none !important; } .sonic-loader--fixed > div { background-color: var(--sc-loader-bg); width: 5rem; height: 5rem; border-radius: 100%; margin: 2px; animation-fill-mode: both; position: absolute; top: 0px; opacity: 0; margin: 0; top: -2.5rem; left: -2.5rem; width: 5rem; height: 5rem; animation: sonic-loader--fixed 1s 0s linear infinite; }`;var d$r=Object.defineProperty,c$m=Object.getOwnPropertyDescriptor,a$n=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$m(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$r(O,B,U),U};const l$o="sonic-loader";let Loader=class extends s$a{constructor(){super(...arguments),this.mode="fixed"}static show(q){Loader.loader||(Loader.loader=document.createElement("sonic-loader"));let O=Loader.loader;q||(q={});let B=q;for(let D in B)O.setAttribute(D,B[D]);q.container||(q.container=document.querySelector("sonic-theme")||document.body,q.mode="fixed"),q.container.appendChild(O),Loader.callCounter++}static hide(){Loader.callCounter--,!(Loader.callCounter>0)&&Loader.loader&&Loader.loader.remove()}render(){return $$2`<div class="sonic-loader sonic-loader--${this.mode}"><div></div><div></div><div></div><div></div></div>`}};Loader.styles=[inline,fixed,r$k`:host { --sc-loader-bg: var(--sc-primary, currentColor); pointer-events: none; } .sonic-loader { opacity: 0; animation: showLoader 0.5s 0.5s forwards; } .sonic-loader--inline { animation-delay: 0s; } @keyframes showLoader { 0% { opacity: 0; } 100% { opacity: 1; } }`],Loader.callCounter=0,a$n([e$b({type:String})],Loader.prototype,"mode",2),Loader=a$n([n$j(l$o)],Loader);try{customElements.define(l$o,Loader)}catch{}/**
|
|
46
46
|
* @license
|
|
47
47
|
* Copyright 2017 Google LLC
|
|
48
48
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -99,7 +99,7 @@ var wt=Object.defineProperty,$t=Object.defineProperties;var xt=Object.getOwnProp
|
|
|
99
99
|
* @license
|
|
100
100
|
* Copyright 2018 Google LLC
|
|
101
101
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
102
|
-
*/const i$k=e$9(class extends i$n{constructor(q){var O;if(super(q),q.type!==t$8.ATTRIBUTE||q.name!=="style"||((O=q.strings)===null||O===void 0?void 0:O.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(q){return Object.keys(q).reduce((O,B)=>{const D=q[B];return D==null?O:O+`${B=B.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${D};`},"")}update(q,[O]){const{style:B}=q.element;if(this.ct===void 0){this.ct=new Set;for(const D in O)this.ct.add(D);return this.render(O)}this.ct.forEach(D=>{O[D]==null&&(this.ct.delete(D),D.includes("-")?B.removeProperty(D):B[D]="")});for(const D in O){const U=O[D];U!=null&&(this.ct.add(D),D.includes("-")?B.setProperty(D,U):B[D]=U)}return b$6}}),customScroll=r$k`.custom-scroll { overflow:auto !important; } .custom-scroll::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; border: solid .15rem transparent; border-radius: var(--sc-rounded); background:transparent; } .custom-scroll::-webkit-scrollbar-thumb { box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg); border-radius: var(--sc-rounded); border: solid .15rem transparent; }`;var d$o=Object.defineProperty,u$8=Object.getOwnPropertyDescriptor,t$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$o(O,B,U),U};const x$1={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},y$4="sonic-toast-item";let SonicToastItem=class extends s$a{constructor(){super(...arguments),this.title="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.maxHeight="10rem",this.visible=!0}render(){return this.visible?$$2`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&$$2`<sonic-icon name="${x$1[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?$$2`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?o$a(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:w$1}hide(){this.closest("sonic-toast")||(this.visible=!1),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},4200)}};SonicToastItem.styles=[customScroll,r$k`* { box-sizing: border-box; } :host { display: block; pointer-events: auto; position: relative; --sc-toast-status-color: transparent; --sc-toast-color: var(--sc-base-content); --sc-toast-bg: var(--sc-base); --sc-toast-rounded: var(--sc-rounded-md); --sc-toast-shadow: var(--sc-shadow-lg); } .fixed-area { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999; display: flex; flex-direction: column-reverse; } .sonic-toast { position: relative; pointer-events: auto; overflow:hidden; line-height: 1.25; color: var(--sc-toast-color); box-shadow: var(--sc-toast-shadow); border-radius: var(--sc-toast-rounded); background: var(--sc-toast-bg); } .sonic-toast-content { padding: 1em 2rem 1em 1em; display: flex; gap: 0.5rem; overflow: auto; position:relative; } .sonic-toast-text { align-self: center; margin-top: auto; margin-bottom: auto; max-width:70ch; } ::slotted(a), .sonic-toast-text a { color: inherit; text-decoration: underline; text-underline-offset: 0.15rem; } /*BUTTON CLOSE*/ .sonic-toast-close { all: unset; position: absolute; z-index:4; pointer-events: initial; right: 0.5em; top: 0.5em; width: 1.5rem; height: 1.5rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-align: center; opacity: 0.5; background: rgba(0, 0, 0, 0); } .sonic-toast-close:focus, .sonic-toast-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.075); } .sonic-toast-close svg { width: 1rem; height: 1rem; object-fit: contain; object-position: center center; } /*Title*/ .sonic-toast-title { font-weight: bold; font-size: 1.15rem; margin: 0.15em 0 0.25em; } /*STATUS*/ .success { --sc-toast-status-color: var(--sc-success); --sc-toast-title-color: var(--sc-toast-status-color); } .error { --sc-toast-status-color: var(--sc-danger); --sc-toast-title-color: var(--sc-toast-status-color); } .warning { --sc-toast-status-color: var(--sc-warning); --sc-toast-title-color: var(--sc-toast-status-color); } .info { --sc-toast-status-color: var(--sc-info); --sc-toast-title-color: var(--sc-toast-status-color); } .success, .error, .info, .warning { border-top: 3px solid var(--sc-toast-status-color, currentColor); } .sonic-toast:before { content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.05; pointer-events: none; transition: 0.2s; border-radius: var(--sc-toast-rounded); background-color: var(--sc-toast-status-color); } .sonic-toast:hover:before { opacity: 0.025; } .info .sonic-toast-icon, .error .sonic-toast-icon, .success .sonic-toast-icon, .warning .sonic-toast-icon { color: var(--sc-toast-status-color, currentColor); } .sonic-toast-icon { position:sticky; top:0; } .ghost { opacity: 0.85; pointer-events: none; }`],t$7([e$b({type:String})],SonicToastItem.prototype,"title",2),t$7([e$b({type:String})],SonicToastItem.prototype,"text",2),t$7([e$b({type:String})],SonicToastItem.prototype,"status",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"ghost",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"preserve",2),t$7([e$b({type:String})],SonicToastItem.prototype,"maxHeight",2),t$7([t$a()],SonicToastItem.prototype,"visible",2),SonicToastItem=t$7([n$j(y$4)],SonicToastItem);var d$n=Object.defineProperty,u$7=Object.getOwnPropertyDescriptor,l$k=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$n(O,B,U),U};const T$1="sonic-toast";let SonicToast$1=class extends s$a{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const q=window.parent!=window;let O={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return q||(O=mt(ut({},O),{margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"999",maxWidth:"64ch",flexDirection:"column-reverse"})),this.toasts?$$2`<div aria-live="polite" style="${i$k(O)}">${c$k(this.toasts,B=>B.id,B=>$$2`<sonic-toast-item maxHeight="${q?"none":"10rem"}" status="${B.status}" ?ghost="${B.ghost}" ?preserve="${B.preserve}" id="${B.id}" @hide="${()=>this.removeItem(B)}" ${$$1({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${B.text?o$a(B.text):""}</sonic-toast-item>`)}</div>`:w$1}static removeAll(){let q=document.querySelector("sonic-toast");!q||(q.toasts=q.toasts.filter(O=>O.ghost))}static add(q){if(!document.querySelector("sonic-toast")){let W=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(W)}let O=document.querySelector("sonic-toast");const B=new Date().valueOf(),D=new RegExp("</a>|</button>").test(q.text),U={id:B,text:q.text,title:q.title,status:q.status,preserve:D?!0:q.preserve,ghost:q.ghost};if(O.toasts.length>0){let W=ut({},U),K=ut({},O.toasts[O.toasts.length-1]);if(W.id=K.id=0,!U.preserve&&a$p.shallowEqual(W,K))return null}return O.toasts=[...O.toasts,U],U}removeItem(q){this.toasts=this.toasts.filter(O=>O!=q)}};if(l$k([e$b({type:Array})],SonicToast$1.prototype,"toasts",2),SonicToast$1=l$k([n$j(T$1)],SonicToast$1),typeof window<"u"){let q=window;q.SonicToast=SonicToast$1}const i$j=class{static listen(){if(!i$j.listening)return;let q=document.location.href.replace(document.location.origin,"");i$j.prevURL&&i$j.prevURL!=q&&(i$j.prevURL=q,i$j.listeners.forEach(O=>{O.location=q})),window.requestAnimationFrame(i$j.listen)}static offChange(q){let O=i$j.listeners.indexOf(q);O!=-1&&(i$j.listeners.splice(O,1),i$j.listeners.length==0&&(i$j.listening=!1))}static onChange(q){i$j.listening||(i$j.listening=!0,i$j.listen()),i$j.listeners.push(q)}static changeFromComponent(q){if(q.goBack!==null){const K=document.location.origin;let Y=q.goBack||K;if((document.referrer.indexOf("http")!=0||new URL(document.referrer).origin!=K)&&Y!=document.location.href){let Z=history.state||{};Z.concorde=Z.concorde||{},Z.concorde.hasDoneHistoryBack=!0,history.pushState(Z,document.title),history.back(),document.location.replace(Y)}else history.back();return}let O=q.getAttribute("to");if(O||(O=q.href),!O)return;if(O.indexOf("#")==0){document.location.hash=O.substring(1);return}let B=new URL(O,document.location.href),D=B.pathname.split("/"),U=[],W="";for(let K of D)K!=W&&U.push(K),W=K;O="/"+U.join("/")+B.search+(B.hash?+B.hash:""),q.hasAttribute("pushState")?history.pushState(null,"",O):q.hasAttribute("replaceState")?history.replaceState(null,"",O):document.location.href=O}static updateComponentActiveState(q){if(q.autoActive!="disabled"&&q.href&&q.href.indexOf("http")!=0){let O=new URL(q.href,document.location.href),B=new URL(q.location,document.location.origin),D=!1;q.autoActive=="strict"?D=O.pathname==B.pathname&&O.hash==B.hash&&O.search==B.search:D=B.href.indexOf(O.href)==0,D?q.setAttribute("active","true"):q.removeAttribute("active")}}};let a$k=i$j;a$k.listeners=[],a$k.listening=!1,a$k.prevURL=document.location.href.replace(document.location.origin,"");var v$5=Object.defineProperty,F=Object.getOwnPropertyDescriptor,a$j=(q,O,B,D)=>{for(var U=D>1?void 0:D?F(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&v$5(O,B,U),U};const b$3=new Map,V=q=>{class O extends q{constructor(...D){super(),this.touched=!1,this.error=null,this.autofocus=null,this.disabled=null,this.required=null,this.onValueAssign=null,this.onFormValueAssign=null,this.onFormDataInValidate=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=U=>{this.setValueFromPublisher(U)},this.onFormValueAssign=U=>{this.setFormValueFromPublisher(U)},this.onFormDataInValidate=()=>{!this.getFormPublisher().isFormValid.get()||this.validateFormElement()}}get name(){return this._name}set name(D){this._name=D}validateFormElement(){}updateDataValue(){if(this._name){let D=this.getFormPublisher();D&&(D[this._name]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(D[this.name].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?PublisherManager$1.get(this.formDataProvider):this.publisher}getValueForFormPublisher(){return this.value}setValueFromPublisher(D){this.value=D}setFormValueFromPublisher(D){this.value=D}get value(){return this._value}set value(D){a$p.isObject(D)&&D.hasOwnProperty("__value")&&D.value==null||D!=null&&this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}initPublisher(){this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&D[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.updateDataValue(),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),D=this.getFormPublisher(),this._name&&D&&(D[this._name].onAssign(this.onFormValueAssign),D.onInvalidate(this.onFormDataInValidate))}handleChange(D){this.value=D.target.value;const U=new Event("change");this.dispatchEvent(U)}addKeyboardNavigation(){let D=this.getAncestorAttributeValue("data-keyboard-nav");if(!D)return;let U=D.split(" "),W=U[0];if(!W)return;for(let Y of U){b$3.has(Y)||b$3.set(Y,[]);let Z=b$3.get(Y);Z.indexOf(this)==-1&&Z.push(this)}let K=b$3.get(W);this.addEventListener("keydown",Y=>{if(!["ArrowDown","ArrowUp"].includes(Y.key))return;let Z="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",G=K.filter(Q=>{let rt=Q.shadowRoot.querySelector(Z);if(!rt)return!1;let ot=window.getComputedStyle(rt);return ot.display!=="none"&&ot.display!==""&&ot.pointerEvents!="none"&&ot.visibility!=="hidden"&&rt.getBoundingClientRect().width>0}),st=null;if(Y.key=="ArrowDown"){let Q=G.indexOf(this);Q==G.length-1?st=G[0]:st=G[Q+1]}else if(Y.key=="ArrowUp"){let Q=G.indexOf(this);Q==0?st=G[G.length-1]:st=G[Q-1]}let tt=st.shadowRoot.querySelector(Z);tt&&(tt.focus(),Y.preventDefault())})}connectedCallback(){super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&(D[this._name].offAssign(this.onFormValueAssign),D.offInvalidate(this.onFormDataInValidate))}}return a$j([e$b({type:Boolean,reflect:!0})],O.prototype,"touched",2),a$j([e$b({type:Boolean})],O.prototype,"error",2),a$j([e$b({type:Boolean})],O.prototype,"autofocus",2),a$j([e$b({type:Boolean})],O.prototype,"disabled",2),a$j([e$b({type:Boolean})],O.prototype,"required",2),a$j([e$b()],O.prototype,"name",1),a$j([e$b()],O.prototype,"value",1),O};var a$i=Object.defineProperty,c$i=Object.getOwnPropertyDescriptor,s$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$i(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$i(O,B,U),U};const d$m=q=>{class O extends q{constructor(){super(...arguments),this._value="",this._name="",this.unique=null,this.radio=null,this._checked=null}get value(){return this._value}set value(D){this.hasAttribute("value")&&(D=this.getAttribute("value")),this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}get name(){return this._name}set name(D){this.hasAttribute("name")&&(D=this.getAttribute("name")),this._name=D}get checked(){return this._checked}set checked(D){this.setCheckedValue(D)}validateFormElement(){var W;const D=(W=this.shadowRoot)==null?void 0:W.querySelector("input");if(!D||D.checkValidity())return;let U=this.getFormPublisher()[this.name].get();(this.unique||this.radio)&&U!==null&&U.toString().length>0||(this.getFormPublisher().isFormValid=!1,D.reportValidity())}setCheckedValue(D){this._checked!=D&&(this._checked=D,this.updateDataValue(),this.requestUpdate(),this.publisher&&!this.radio&&!this.unique&&(this.publisher.checked=this._checked))}handleChange(){this.checked=this.checked?this.radio?!0:null:!0;const D=new Event("change");this.dispatchEvent(D)}getValueForFormPublisher(){let D=this.getFormPublisher()[this.name].get();if(this.unique||this.radio)return this.checked&&this.value!=null?this.value:D;Array.isArray(D)||(D=[]),D=D.slice(0);let U=D.indexOf(this.value);return this.checked===!0&&U===-1&&D.push(this.value),this.checked===null&&U!==-1&&D.splice(U,1),D}setFormValueFromPublisher(D){if(this.unique||this.radio){this.checked=this.value==D?!0:null;return}Array.isArray(D)||(D=[]),this.checked=D.indexOf(this.value)!==-1?!0:null}initPublisher(){super.initPublisher(),!!this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&(this.checked=!0)}}return s$7([e$b()],O.prototype,"value",1),s$7([e$b()],O.prototype,"name",1),s$7([e$b({type:Boolean})],O.prototype,"unique",2),s$7([e$b({type:Boolean})],O.prototype,"radio",2),s$7([e$b()],O.prototype,"checked",1),O};/**
|
|
102
|
+
*/const i$k=e$9(class extends i$n{constructor(q){var O;if(super(q),q.type!==t$8.ATTRIBUTE||q.name!=="style"||((O=q.strings)===null||O===void 0?void 0:O.length)>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(q){return Object.keys(q).reduce((O,B)=>{const D=q[B];return D==null?O:O+`${B=B.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${D};`},"")}update(q,[O]){const{style:B}=q.element;if(this.ct===void 0){this.ct=new Set;for(const D in O)this.ct.add(D);return this.render(O)}this.ct.forEach(D=>{O[D]==null&&(this.ct.delete(D),D.includes("-")?B.removeProperty(D):B[D]="")});for(const D in O){const U=O[D];U!=null&&(this.ct.add(D),D.includes("-")?B.setProperty(D,U):B[D]=U)}return b$6}}),customScroll=r$k`.custom-scroll { overflow:auto !important; } .custom-scroll::-webkit-scrollbar { width: 0.5rem; height: 0.5rem; border: solid .15rem transparent; border-radius: var(--sc-rounded); background:transparent; } .custom-scroll::-webkit-scrollbar-thumb { box-shadow: inset 0 0 2rem 2rem var(--sc-scrollbar-bg); border-radius: var(--sc-rounded); border: solid .15rem transparent; }`;var d$o=Object.defineProperty,u$8=Object.getOwnPropertyDescriptor,t$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$8(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$o(O,B,U),U};const x$1={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},y$4="sonic-toast-item";let SonicToastItem=class extends s$a{constructor(){super(...arguments),this.title="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.maxHeight="10rem",this.visible=!0}render(){return this.visible?$$2`<div class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"><button aria-label="Close" class="sonic-toast-close" @click="${()=>this.hide()}"><sonic-icon name="cancel" size="lg"></sonic-icon></button><div class="sonic-toast-content custom-scroll" style="max-height:${this.maxHeight}">${this.status&&$$2`<sonic-icon name="${x$1[this.status]}" class="sonic-toast-icon" size="2xl"></sonic-icon>`}<div class="sonic-toast-text">${this.title?$$2`<div class="sonic-toast-title">${this.title}</div>`:""} ${this.text?o$a(this.text):""}<slot></slot></div>${this.preserve?"":this.autoHide()}</div></div>`:w$1}hide(){this.closest("sonic-toast")||(this.visible=!1),this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},4200)}};SonicToastItem.styles=[customScroll,r$k`* { box-sizing: border-box; } :host { display: block; pointer-events: auto; position: relative; --sc-toast-status-color: transparent; --sc-toast-color: var(--sc-base-content); --sc-toast-bg: var(--sc-base); --sc-toast-rounded: var(--sc-rounded-md); --sc-toast-shadow: var(--sc-shadow-lg); } .fixed-area { position: fixed; bottom: 1.25rem; right: 1.25rem; z-index: 999; display: flex; flex-direction: column-reverse; } .sonic-toast { position: relative; pointer-events: auto; overflow:hidden; line-height: 1.25; color: var(--sc-toast-color); box-shadow: var(--sc-toast-shadow); border-radius: var(--sc-toast-rounded); background: var(--sc-toast-bg); } .sonic-toast-content { padding: 1em 2rem 1em 1em; display: flex; gap: 0.5rem; overflow: auto; position:relative; } .sonic-toast-text { align-self: center; margin-top: auto; margin-bottom: auto; max-width:70ch; } ::slotted(a), .sonic-toast-text a { color: inherit; text-decoration: underline; text-underline-offset: 0.15rem; } /*BUTTON CLOSE*/ .sonic-toast-close { all: unset; position: absolute; z-index:4; pointer-events: initial; right: 0.5em; top: 0.5em; width: 1.5rem; height: 1.5rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; text-align: center; opacity: 0.5; background: rgba(0, 0, 0, 0); } .sonic-toast-close:focus, .sonic-toast-close:hover { opacity: 1; background: rgba(0, 0, 0, 0.075); } .sonic-toast-close svg { width: 1rem; height: 1rem; object-fit: contain; object-position: center center; } /*Title*/ .sonic-toast-title { font-weight: bold; font-size: 1.15rem; margin: 0.15em 0 0.25em; } /*STATUS*/ .success { --sc-toast-status-color: var(--sc-success); --sc-toast-title-color: var(--sc-toast-status-color); } .error { --sc-toast-status-color: var(--sc-danger); --sc-toast-title-color: var(--sc-toast-status-color); } .warning { --sc-toast-status-color: var(--sc-warning); --sc-toast-title-color: var(--sc-toast-status-color); } .info { --sc-toast-status-color: var(--sc-info); --sc-toast-title-color: var(--sc-toast-status-color); } .success, .error, .info, .warning { border-top: 3px solid var(--sc-toast-status-color, currentColor); } .sonic-toast:before { content: ""; display: block; position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0.05; pointer-events: none; transition: 0.2s; border-radius: var(--sc-toast-rounded); background-color: var(--sc-toast-status-color); } .sonic-toast:hover:before { opacity: 0.025; } .info .sonic-toast-icon, .error .sonic-toast-icon, .success .sonic-toast-icon, .warning .sonic-toast-icon { color: var(--sc-toast-status-color, currentColor); } .sonic-toast-icon { position:sticky; top:0; } .ghost { opacity: 0.85; pointer-events: none; }`],t$7([e$b({type:String})],SonicToastItem.prototype,"title",2),t$7([e$b({type:String})],SonicToastItem.prototype,"text",2),t$7([e$b({type:String})],SonicToastItem.prototype,"status",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"ghost",2),t$7([e$b({type:Boolean})],SonicToastItem.prototype,"preserve",2),t$7([e$b({type:String})],SonicToastItem.prototype,"maxHeight",2),t$7([t$a()],SonicToastItem.prototype,"visible",2),SonicToastItem=t$7([n$j(y$4)],SonicToastItem);var d$n=Object.defineProperty,u$7=Object.getOwnPropertyDescriptor,l$k=(q,O,B,D)=>{for(var U=D>1?void 0:D?u$7(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&d$n(O,B,U),U};const T$1="sonic-toast";let SonicToast$1=class extends s$a{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const q=window.parent!=window;let O={pointerEvents:"none",gap:"1rem",display:"flex",margin:"1rem"};return q||(O=mt(ut({},O),{margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"999",maxWidth:"64ch",flexDirection:"column-reverse"})),this.toasts?$$2`<div aria-live="polite" style="${i$k(O)}">${c$k(this.toasts,B=>B.id,B=>$$2`<sonic-toast-item maxHeight="${q?"none":"10rem"}" status="${B.status}" ?ghost="${B.ghost}" ?preserve="${B.preserve}" id="${B.id}" @hide="${()=>this.removeItem(B)}" ${$$1({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}>${B.text?o$a(B.text):""}</sonic-toast-item>`)}</div>`:w$1}static removeAll(){let q=document.querySelector("sonic-toast");!q||(q.toasts=q.toasts.filter(O=>O.ghost))}static add(q){if(!document.querySelector("sonic-toast")){let W=document.createElement("sonic-toast");(document.querySelector("sonic-theme")||document.body).prepend(W)}let O=document.querySelector("sonic-toast");const B=new Date().valueOf(),D=new RegExp("</a>|</button>").test(q.text),U={id:B,text:q.text,title:q.title,status:q.status,preserve:D?!0:q.preserve,ghost:q.ghost};if(O.toasts.length>0){let W=ut({},U),K=ut({},O.toasts[O.toasts.length-1]);if(W.id=K.id=0,!U.preserve&&a$p.shallowEqual(W,K))return null}return O.toasts=[...O.toasts,U],U}removeItem(q){this.toasts=this.toasts.filter(O=>O!=q)}};if(l$k([e$b({type:Array})],SonicToast$1.prototype,"toasts",2),SonicToast$1=l$k([n$j(T$1)],SonicToast$1),typeof window<"u"){let q=window;q.SonicToast=SonicToast$1}const i$j=class{static listen(){var O;if(!i$j.listening)return;let q=(O=document.location)==null?void 0:O.href.replace(document.location.origin,"");i$j.prevURL&&i$j.prevURL!=q&&(i$j.prevURL=q,i$j.listeners.forEach(B=>{B.location=q})),window.requestAnimationFrame(i$j.listen)}static offChange(q){let O=i$j.listeners.indexOf(q);O!=-1&&(i$j.listeners.splice(O,1),i$j.listeners.length==0&&(i$j.listening=!1))}static onChange(q){i$j.listening||(i$j.listening=!0,i$j.listen()),i$j.listeners.push(q)}static changeFromComponent(q){if(q.goBack!==null){const K=document.location.origin;let Y=q.goBack||K;if((document.referrer.indexOf("http")!=0||new URL(document.referrer).origin!=K)&&Y!=document.location.href){let Z=history.state||{};Z.concorde=Z.concorde||{},Z.concorde.hasDoneHistoryBack=!0,history.pushState(Z,document.title),history.back(),document.location.replace(Y)}else history.back();return}let O=q.getAttribute("to");if(O||(O=q.href),!O)return;if(O.indexOf("#")==0){document.location.hash=O.substring(1);return}let B=new URL(O,document.location.href),D=B.pathname.split("/"),U=[],W="";for(let K of D)K!=W&&U.push(K),W=K;O="/"+U.join("/")+B.search+(B.hash?+B.hash:""),q.hasAttribute("pushState")?history.pushState(null,"",O):q.hasAttribute("replaceState")?history.replaceState(null,"",O):document.location.href=O}static updateComponentActiveState(q){if(q.autoActive!="disabled"&&q.href&&q.href.indexOf("http")!=0){let O=new URL(q.href,document.location.href),B=new URL(q.location,document.location.origin),D=!1;q.autoActive=="strict"?D=O.pathname==B.pathname&&O.hash==B.hash&&O.search==B.search:D=B.href.indexOf(O.href)==0,D?q.setAttribute("active","true"):q.removeAttribute("active")}}};let a$k=i$j;a$k.listeners=[],a$k.listening=!1,a$k.prevURL=(wt=document.location)==null?void 0:wt.href.replace(document.location.origin,"");var v$5=Object.defineProperty,F=Object.getOwnPropertyDescriptor,a$j=(q,O,B,D)=>{for(var U=D>1?void 0:D?F(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&v$5(O,B,U),U};const b$3=new Map,V=q=>{class O extends q{constructor(...D){super(),this.touched=!1,this.error=null,this.autofocus=null,this.disabled=null,this.required=null,this.onValueAssign=null,this.onFormValueAssign=null,this.onFormDataInValidate=null,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=U=>{this.setValueFromPublisher(U)},this.onFormValueAssign=U=>{this.setFormValueFromPublisher(U)},this.onFormDataInValidate=()=>{!this.getFormPublisher().isFormValid.get()||this.validateFormElement()}}get name(){return this._name}set name(D){this._name=D}validateFormElement(){}updateDataValue(){if(this._name){let D=this.getFormPublisher();D&&(D[this._name]=this.getValueForFormPublisher(),this.setFormValueFromPublisher(D[this.name].get()))}}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?PublisherManager$1.get(this.formDataProvider):this.publisher}getValueForFormPublisher(){return this.value}setValueFromPublisher(D){this.value=D}setFormValueFromPublisher(D){this.value=D}get value(){return this._value}set value(D){a$p.isObject(D)&&D.hasOwnProperty("__value")&&D.value==null||D!=null&&this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}initPublisher(){this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&D[this._name].offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.updateDataValue(),this.publisher&&this._name&&this.publisher[this._name].onAssign(this.onValueAssign),D=this.getFormPublisher(),this._name&&D&&(D[this._name].onAssign(this.onFormValueAssign),D.onInvalidate(this.onFormDataInValidate))}handleChange(D){this.value=D.target.value;const U=new Event("change");this.dispatchEvent(U)}addKeyboardNavigation(){let D=this.getAncestorAttributeValue("data-keyboard-nav");if(!D)return;let U=D.split(" "),W=U[0];if(!W)return;for(let Y of U){b$3.has(Y)||b$3.set(Y,[]);let Z=b$3.get(Y);Z.indexOf(this)==-1&&Z.push(this)}let K=b$3.get(W);this.addEventListener("keydown",Y=>{if(!["ArrowDown","ArrowUp"].includes(Y.key))return;let Z="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",G=K.filter(Q=>{let rt=Q.shadowRoot.querySelector(Z);if(!rt)return!1;let ot=window.getComputedStyle(rt);return ot.display!=="none"&&ot.display!==""&&ot.pointerEvents!="none"&&ot.visibility!=="hidden"&&rt.getBoundingClientRect().width>0}),st=null;if(Y.key=="ArrowDown"){let Q=G.indexOf(this);Q==G.length-1?st=G[0]:st=G[Q+1]}else if(Y.key=="ArrowUp"){let Q=G.indexOf(this);Q==0?st=G[G.length-1]:st=G[Q-1]}let tt=st.shadowRoot.querySelector(Z);tt&&(tt.focus(),Y.preventDefault())})}connectedCallback(){super.connectedCallback(),this.addKeyboardNavigation()}disconnectedCallback(){super.disconnectedCallback(),this._name&&this.publisher&&this.publisher[this._name].offAssign(this.onValueAssign);let D=this.getFormPublisher();this._name&&D&&(D[this._name].offAssign(this.onFormValueAssign),D.offInvalidate(this.onFormDataInValidate))}}return a$j([e$b({type:Boolean,reflect:!0})],O.prototype,"touched",2),a$j([e$b({type:Boolean})],O.prototype,"error",2),a$j([e$b({type:Boolean})],O.prototype,"autofocus",2),a$j([e$b({type:Boolean})],O.prototype,"disabled",2),a$j([e$b({type:Boolean})],O.prototype,"required",2),a$j([e$b()],O.prototype,"name",1),a$j([e$b()],O.prototype,"value",1),O};var a$i=Object.defineProperty,c$i=Object.getOwnPropertyDescriptor,s$7=(q,O,B,D)=>{for(var U=D>1?void 0:D?c$i(O,B):O,W=q.length-1,K;W>=0;W--)(K=q[W])&&(U=(D?K(O,B,U):K(U))||U);return D&&U&&a$i(O,B,U),U};const d$m=q=>{class O extends q{constructor(){super(...arguments),this._value="",this._name="",this.unique=null,this.radio=null,this._checked=null}get value(){return this._value}set value(D){this.hasAttribute("value")&&(D=this.getAttribute("value")),this._value!=D&&(this._value=D,this.updateDataValue(),this.requestUpdate())}get name(){return this._name}set name(D){this.hasAttribute("name")&&(D=this.getAttribute("name")),this._name=D}get checked(){return this._checked}set checked(D){this.setCheckedValue(D)}validateFormElement(){var W;const D=(W=this.shadowRoot)==null?void 0:W.querySelector("input");if(!D||D.checkValidity())return;let U=this.getFormPublisher()[this.name].get();(this.unique||this.radio)&&U!==null&&U.toString().length>0||(this.getFormPublisher().isFormValid=!1,D.reportValidity())}setCheckedValue(D){this._checked!=D&&(this._checked=D,this.updateDataValue(),this.requestUpdate(),this.publisher&&!this.radio&&!this.unique&&(this.publisher.checked=this._checked))}handleChange(){this.checked=this.checked?this.radio?!0:null:!0;const D=new Event("change");this.dispatchEvent(D)}getValueForFormPublisher(){let D=this.getFormPublisher()[this.name].get();if(this.unique||this.radio)return this.checked&&this.value!=null?this.value:D;Array.isArray(D)||(D=[]),D=D.slice(0);let U=D.indexOf(this.value);return this.checked===!0&&U===-1&&D.push(this.value),this.checked===null&&U!==-1&&D.splice(U,1),D}setFormValueFromPublisher(D){if(this.unique||this.radio){this.checked=this.value==D?!0:null;return}Array.isArray(D)||(D=[]),this.checked=D.indexOf(this.value)!==-1?!0:null}initPublisher(){super.initPublisher(),!!this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&(this.checked=!0)}}return s$7([e$b()],O.prototype,"value",1),s$7([e$b()],O.prototype,"name",1),s$7([e$b({type:Boolean})],O.prototype,"unique",2),s$7([e$b({type:Boolean})],O.prototype,"radio",2),s$7([e$b()],O.prototype,"checked",1),O};/**
|
|
103
103
|
* @license
|
|
104
104
|
* Copyright 2018 Google LLC
|
|
105
105
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/loader/loader";
|
|
3
|
-
import "
|
|
3
|
+
import "@supersoniks/concorde/core/components/functional/subscriber/subscriber";
|
|
4
4
|
declare const List_base: {
|
|
5
5
|
new (...args: any[]): {
|
|
6
6
|
api: import("../../../utils/api").default | null;
|
|
@@ -16,9 +16,6 @@ declare const List_base: {
|
|
|
16
16
|
onInvalidate: any;
|
|
17
17
|
disconnectedCallback(): void;
|
|
18
18
|
connectedCallback(): void;
|
|
19
|
-
/**
|
|
20
|
-
* Loading
|
|
21
|
-
*/
|
|
22
19
|
firstUpdated(): void;
|
|
23
20
|
onIntersection(entries: IntersectionObserverEntry[]): void;
|
|
24
21
|
props: any;
|
|
@@ -11,7 +11,7 @@ import Fetcher from "@supersoniks/concorde/core/mixins/Fetcher";
|
|
|
11
11
|
import { repeat } from "lit/directives/repeat.js";
|
|
12
12
|
import { templateContent } from "lit/directives/template-content.js";
|
|
13
13
|
import "@supersoniks/concorde/core/components/ui/loader/loader";
|
|
14
|
-
import "
|
|
14
|
+
import "@supersoniks/concorde/core/components/functional/subscriber/subscriber";
|
|
15
15
|
import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
16
16
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
17
17
|
import TemplatesContainer from "@supersoniks/concorde/core/mixins/TemplatesContainer";
|
|
@@ -35,9 +35,6 @@ declare const Input_base: {
|
|
|
35
35
|
removeAttribute(name: string): void;
|
|
36
36
|
initPublisher(): void;
|
|
37
37
|
getApiConfiguration(): import("../../../../utils/api").APIConfiguration;
|
|
38
|
-
/**
|
|
39
|
-
* Taille du composant, implique notamment des modifications de typo et de marge interne
|
|
40
|
-
*/
|
|
41
38
|
connectedCallback(): void;
|
|
42
39
|
requestUpdate(): void;
|
|
43
40
|
getAttribute(name: string): string;
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement } from "lit";
|
|
8
8
|
import { customElement, property, queryAssignedNodes, state } from "lit/decorators.js";
|
|
9
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
|
-
import { formControl } from "
|
|
10
|
+
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
11
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
12
12
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
13
13
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Checkbox } from "
|
|
1
|
+
import { Checkbox } from "@supersoniks/concorde/core/components/ui/form/checkbox/checkbox";
|
|
2
2
|
export declare class Radio extends Checkbox {
|
|
3
3
|
static styles: (import("lit").CSSResult | import("lit").CSSResultGroup[])[];
|
|
4
4
|
constructor();
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
-
import { Checkbox } from "
|
|
9
|
+
import { Checkbox } from "@supersoniks/concorde/core/components/ui/form/checkbox/checkbox";
|
|
10
10
|
/**
|
|
11
11
|
* ### Le composant sonic-radio étend sonic-checkbox en assignant sa propriété radio à true.
|
|
12
12
|
*
|
|
@@ -10,7 +10,7 @@ import { customElement, property, queryAssignedNodes, state } from "lit/decorato
|
|
|
10
10
|
import { classMap } from "lit/directives/class-map.js";
|
|
11
11
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
12
12
|
import { repeat } from "lit/directives/repeat.js";
|
|
13
|
-
import { formControl } from "
|
|
13
|
+
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
14
14
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
15
15
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
16
16
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property, state, queryAssignedNodes } from "lit/decorators.js";
|
|
9
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
|
-
import { formControl } from "
|
|
10
|
+
import { formControl } from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
11
11
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
12
12
|
import FormElement from "@supersoniks/concorde/core/mixins/FormElement";
|
|
13
13
|
import FormInput from "@supersoniks/concorde/core/mixins/FormInput";
|
|
@@ -15,7 +15,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
15
15
|
};
|
|
16
16
|
import { LitElement, css, nothing } from "lit";
|
|
17
17
|
import { customElement, property } from "lit/decorators.js";
|
|
18
|
-
import Icons from "
|
|
18
|
+
import Icons from "@supersoniks/concorde/core/components/ui/icon/icons";
|
|
19
19
|
/**
|
|
20
20
|
* Afficher l'icone choisie parmis une liste prédéfinie dans icons.json
|
|
21
21
|
* les tailles suivantes sont disponible via l'attribut *size* : 2xs,xs,sm,"",lg,xl,2xl
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
};
|
|
10
10
|
var _a;
|
|
11
11
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
12
|
-
import icons from "
|
|
12
|
+
import icons from "@supersoniks/concorde/core/components/ui/icon/icons.json";
|
|
13
13
|
/**
|
|
14
14
|
* Ce tableau static permet de ne pas appeler plusieurs fois le même service lors d'appel concurrents en GET.
|
|
15
15
|
*/
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var Loader_1;
|
|
8
8
|
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
|
-
import { inline } from "
|
|
11
|
-
import { fixed } from "
|
|
10
|
+
import { inline } from "@supersoniks/concorde/core/components/ui/loader/styles/inline";
|
|
11
|
+
import { fixed } from "@supersoniks/concorde/core/components/ui/loader/styles/fixed";
|
|
12
12
|
const tagName = "sonic-loader";
|
|
13
13
|
let Loader = Loader_1 = class Loader extends LitElement {
|
|
14
14
|
constructor() {
|
|
@@ -5,7 +5,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
7
|
import { customElement } from "lit/decorators.js";
|
|
8
|
-
import { Button } from "
|
|
8
|
+
import { Button } from "@supersoniks/concorde/core/components/ui/button/button";
|
|
9
9
|
const tagName = "sonic-menu-item";
|
|
10
10
|
let MenuItem = class MenuItem extends Button {
|
|
11
11
|
constructor() {
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { styleMap } from "lit/directives/style-map.js";
|
|
9
9
|
import { customElement, property, queryAssignedElements, state } from "lit/decorators.js";
|
|
10
|
-
import "
|
|
10
|
+
import "@supersoniks/concorde/core/components/ui/menu/menu-item";
|
|
11
11
|
const tagName = "sonic-menu";
|
|
12
12
|
let MenuItems = class MenuItems extends LitElement {
|
|
13
13
|
constructor() {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-actions";
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-title";
|
|
4
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-subtitle";
|
|
5
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-content";
|
|
6
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-close";
|
|
7
7
|
declare type ModalCreateOptions = {
|
|
8
8
|
content?: string;
|
|
9
9
|
};
|
|
@@ -10,11 +10,11 @@ import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
|
10
10
|
import { animate, fadeIn, fadeOut } from "@lit-labs/motion";
|
|
11
11
|
import { styleMap } from "lit/directives/style-map.js";
|
|
12
12
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
13
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-actions";
|
|
14
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-title";
|
|
15
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-subtitle";
|
|
16
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-content";
|
|
17
|
+
import "@supersoniks/concorde/core/components/ui/modal/modal-close";
|
|
18
18
|
const tagName = "sonic-modal";
|
|
19
19
|
let Modal = class Modal extends Subscriber(LitElement) {
|
|
20
20
|
constructor() {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { LitElement } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
4
|
-
import "
|
|
5
|
-
import "
|
|
6
|
-
import "
|
|
7
|
-
import "
|
|
8
|
-
import "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tr";
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/table/table-th";
|
|
4
|
+
import "@supersoniks/concorde/core/components/ui/table/table-td";
|
|
5
|
+
import "@supersoniks/concorde/core/components/ui/table/table-thead";
|
|
6
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tbody";
|
|
7
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
|
|
8
|
+
import "@supersoniks/concorde/core/components/ui/table/table-caption";
|
|
9
9
|
export declare class Table extends LitElement {
|
|
10
10
|
static styles: import("lit").CSSResult[];
|
|
11
11
|
size: "xs" | "sm" | "md" | "lg" | "xl";
|
|
@@ -8,13 +8,13 @@ import { html, LitElement, css } from "lit";
|
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import { styleMap } from "lit/directives/style-map.js";
|
|
10
10
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
11
|
-
import "
|
|
12
|
-
import "
|
|
13
|
-
import "
|
|
14
|
-
import "
|
|
15
|
-
import "
|
|
16
|
-
import "
|
|
17
|
-
import "
|
|
11
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tr";
|
|
12
|
+
import "@supersoniks/concorde/core/components/ui/table/table-th";
|
|
13
|
+
import "@supersoniks/concorde/core/components/ui/table/table-td";
|
|
14
|
+
import "@supersoniks/concorde/core/components/ui/table/table-thead";
|
|
15
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tbody";
|
|
16
|
+
import "@supersoniks/concorde/core/components/ui/table/table-tfoot";
|
|
17
|
+
import "@supersoniks/concorde/core/components/ui/table/table-caption";
|
|
18
18
|
const tagName = "sonic-table";
|
|
19
19
|
let Table = class Table extends LitElement {
|
|
20
20
|
constructor() {
|
|
@@ -6,7 +6,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
6
6
|
};
|
|
7
7
|
import { css } from "lit";
|
|
8
8
|
import { customElement } from "lit/decorators.js";
|
|
9
|
-
import { Button } from "
|
|
9
|
+
import { Button } from "@supersoniks/concorde/core/components/ui/button/button";
|
|
10
10
|
let Tab = class Tab extends Button {
|
|
11
11
|
constructor() {
|
|
12
12
|
super();
|
|
@@ -7,7 +7,6 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css } from "lit";
|
|
8
8
|
import { customElement, property, query } from "lit/decorators.js";
|
|
9
9
|
import { ResizeController } from "@lit-labs/observers/resize_controller.js";
|
|
10
|
-
// import { tailwind } from "../theme/theme";
|
|
11
10
|
let Tabs = class Tabs extends LitElement {
|
|
12
11
|
constructor() {
|
|
13
12
|
super(...arguments);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/badge/badge";
|
|
4
4
|
/**
|
|
5
5
|
* Le composant taxonomy crée un badge (*sonic-badge*) contenant une liste de termes préfixés par une icone (*sonic-icon*) optionelle séparées par une chaine html séparatrice (*separator*)
|
|
6
6
|
*/
|
|
@@ -7,8 +7,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { css, html, LitElement, nothing } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import { repeat } from "lit/directives/repeat.js";
|
|
10
|
-
import "
|
|
11
|
-
import "
|
|
10
|
+
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
11
|
+
import "@supersoniks/concorde/core/components/ui/badge/badge";
|
|
12
12
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
13
13
|
const tagName = "sonic-taxonomy";
|
|
14
14
|
/**
|
|
@@ -7,9 +7,9 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
var Theme_1;
|
|
8
8
|
import { html, LitElement, css } from "lit";
|
|
9
9
|
import { customElement, property } from "lit/decorators.js";
|
|
10
|
-
import { coreVariables } from "
|
|
11
|
-
import { light } from "
|
|
12
|
-
import { dark } from "
|
|
10
|
+
import { coreVariables } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/core-variables";
|
|
11
|
+
import { light } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/light";
|
|
12
|
+
import { dark } from "@supersoniks/concorde/core/components/ui/theme/theme-collection/dark";
|
|
13
13
|
const tagName = "sonic-theme";
|
|
14
14
|
let Theme = Theme_1 = class Theme extends LitElement {
|
|
15
15
|
constructor() {
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { LitElement, nothing } from "lit";
|
|
8
8
|
import { customElement, property } from "lit/decorators.js";
|
|
9
9
|
import Subscriber from "@supersoniks/concorde/core/mixins/Subscriber";
|
|
10
|
-
import { SonicToast } from "
|
|
10
|
+
import { SonicToast } from "@supersoniks/concorde/core/components/ui/toast/toast";
|
|
11
11
|
const tagName = "sonic-toast-message-subscriber";
|
|
12
12
|
//Superbe mix de multples versions d'api.
|
|
13
13
|
let MessageSubscriber = class MessageSubscriber extends Subscriber(LitElement) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
|
-
import "
|
|
3
|
-
import { ToastStatus } from "
|
|
2
|
+
import "@supersoniks/concorde/core/components/ui/toast/types";
|
|
3
|
+
import { ToastStatus } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
4
4
|
export declare class SonicToastItem extends LitElement {
|
|
5
5
|
static styles: import("lit").CSSResult[];
|
|
6
6
|
title: string;
|
|
@@ -7,7 +7,7 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
7
7
|
import { html, LitElement, css, nothing } from "lit";
|
|
8
8
|
import { customElement, property, state } from "lit/decorators.js";
|
|
9
9
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
10
|
-
import "
|
|
10
|
+
import "@supersoniks/concorde/core/components/ui/toast/types";
|
|
11
11
|
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
12
12
|
const icon = {
|
|
13
13
|
warning: "warning-circled-outline",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { LitElement, nothing } from "lit";
|
|
2
2
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
3
|
-
import "
|
|
4
|
-
import { Toast } from "
|
|
3
|
+
import "@supersoniks/concorde/core/components/ui/toast/toast-item";
|
|
4
|
+
import { Toast } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
5
5
|
export declare class SonicToast extends LitElement {
|
|
6
6
|
toasts: Toast[];
|
|
7
7
|
createRenderRoot(): this;
|
|
@@ -11,7 +11,7 @@ export declare class SonicToast extends LitElement {
|
|
|
11
11
|
id: number;
|
|
12
12
|
text: string;
|
|
13
13
|
title: string | undefined;
|
|
14
|
-
status: import("
|
|
14
|
+
status: import("@supersoniks/concorde/core/components/ui/toast/types").ToastStatus | undefined;
|
|
15
15
|
preserve: boolean | undefined;
|
|
16
16
|
ghost: boolean | undefined;
|
|
17
17
|
} | null;
|
|
@@ -12,7 +12,7 @@ import Objects from "@supersoniks/concorde/core/utils/Objects";
|
|
|
12
12
|
import "@supersoniks/concorde/core/components/ui/icon/icon";
|
|
13
13
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
14
14
|
import { styleMap } from "lit/directives/style-map.js";
|
|
15
|
-
import "
|
|
15
|
+
import "@supersoniks/concorde/core/components/ui/toast/toast-item";
|
|
16
16
|
const tagName = "sonic-toast";
|
|
17
17
|
let SonicToast = class SonicToast extends LitElement {
|
|
18
18
|
constructor() {
|