@supersoniks/concorde 3.1.24 → 3.1.26
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/build-infos.json +1 -1
- package/concorde-core.bundle.js +15 -5
- package/concorde-core.es.js +21 -9
- package/dist/concorde-core.bundle.js +15 -5
- package/dist/concorde-core.es.js +21 -9
- package/package.json +1 -1
- package/scripts/pre-build.mjs +0 -0
- package/scripts/pre-publish.mjs +54 -2
- package/src/core/_types/types.ts +0 -0
- package/src/core/components/ui/button/button.ts +2 -0
- package/src/core/components/ui/form/input/input.ts +0 -0
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +0 -3
- package/src/core/components/ui/group/group.ts +34 -15
- package/src/core/components/ui/theme/theme.ts +1 -1
- package/src/core/components/ui/toast/message-subscriber.ts +0 -0
- package/src/core/components/ui/toast/toast.ts +0 -0
- package/src/core/components/ui/ui.ts +0 -0
- package/src/core/core.ts +0 -0
- package/src/core/utils/PublisherProxy.ts +1 -6
- package/src/core/utils/route.ts +0 -0
- package/src/tsconfig-model.json +4 -0
- package/src/tsconfig.json +4 -0
package/build-infos.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"date":
|
|
1
|
+
{"date":1725975268}
|
package/concorde-core.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var It,k,L,Fr,t,G;let Q=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}},as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=Q.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};function Me(r){return typeof r=="object"&&r!=null}const Ur=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Ts=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let Ms=(It=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),It.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Ur(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,s=!1){var e,o,n;if(Array.isArray(t)&&t.indexOf(null)!=-1&&console.log(t),this._value_===t||this._value_&&t&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;this._value_,this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=Object.prototype.hasOwnProperty.call(this._value_,"__value");if(this._parentKey_&&this.parent){const l=i?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._publishAssignement_(),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(It.instancesCounter++,this._instanceCounter_=It.instancesCounter),It.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},It.instances=new Map,It.instancesCounter=0,It),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Ts),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(Ts,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.log("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+Q.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new je(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+Q.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Ts,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Fri Sep 06 2024 14:29:58 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);const js=window;js.SonicPublisherManager||(js.SonicPublisherManager=N),js.SonicPublisherManager.registerInstance(N.getInstance());const Vr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class je extends Ms{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Vr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new je(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new je({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Br extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ms.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(Ce+"-publisher-proxy",Br)}catch{}let ls=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=Q.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,v={publisher:f,onAssign:()=>{const b=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(b.length==1&&l.variables[0].join(".")==P.substring(1)){let D=b[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<b.length;D++){let p=b[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ls.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ls);let X=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=X.traverseDotNotation;/**
|
|
1
|
+
(function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var It,k,L,Fr,t,G;let Q=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}},as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=Q.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};function Me(r){return typeof r=="object"&&r!=null}const Ur=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Ts=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let Ms=(It=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),It.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Ur(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=Object.prototype.hasOwnProperty.call(this._value_,"__value");if(this._parentKey_&&this.parent){const l=i?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._publishAssignement_(),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(It.instancesCounter++,this._instanceCounter_=It.instancesCounter),It.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},It.instances=new Map,It.instancesCounter=0,It),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Ts),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(Ts,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+Q.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new je(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+Q.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Ts,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Tue Sep 10 2024 15:34:28 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);const js=window;js.SonicPublisherManager||(js.SonicPublisherManager=N),js.SonicPublisherManager.registerInstance(N.getInstance());const Vr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class je extends Ms{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Vr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new je(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new je({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Br extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ms.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(Ce+"-publisher-proxy",Br)}catch{}let ls=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=Q.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,v={publisher:f,onAssign:()=>{const b=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(b.length==1&&l.variables[0].join(".")==P.substring(1)){let D=b[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<b.length;D++){let p=b[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ls.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ls);let X=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=X.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -411,6 +411,7 @@
|
|
|
411
411
|
|
|
412
412
|
.main-slot {
|
|
413
413
|
flex-grow: 1;
|
|
414
|
+
min-width: 0;
|
|
414
415
|
display: block;
|
|
415
416
|
}
|
|
416
417
|
|
|
@@ -421,6 +422,7 @@
|
|
|
421
422
|
slot[name="suffix"],
|
|
422
423
|
slot[name="prefix"] {
|
|
423
424
|
flex-shrink: 0;
|
|
425
|
+
min-width: 0;
|
|
424
426
|
}
|
|
425
427
|
|
|
426
428
|
/*ALIGNEMENT DES ICONES
|
|
@@ -943,7 +945,7 @@
|
|
|
943
945
|
${fr}
|
|
944
946
|
}
|
|
945
947
|
}
|
|
946
|
-
`;var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,Qe=(r,t,s,i)=>{for(var e=i>1?void 0:i?un(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&pn(t,s,e),e};const fn="sonic-theme";let vt=class extends w{constructor(){super(),this.theme="light",this.background=!1,this.color=!1,this.font=!1,vt.instance=this}static getPopContainer(){return vt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var e;const r=document.styleSheets,t=r.length,s=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};(e=et.get("sonic-theme"))==null||e.set(i),document.querySelectorAll("iframe").forEach(o=>{var n;return(n=o.contentWindow)==null?void 0:n.postMessage({type:"SonicTheme",...i},"*")})}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[...vt.styles.map(e=>e.styleSheet),...Array.from(document.styleSheets)];for(const e of t)try{if(!e)continue;const o=e.cssRules;for(const n of o){if(!("style"in n))continue;const l=n.style;for(const c of l)r.includes(c)||c.indexOf("--sc")!==0||r.push(c)}}catch{console.
|
|
948
|
+
`;var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,Qe=(r,t,s,i)=>{for(var e=i>1?void 0:i?un(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&pn(t,s,e),e};const fn="sonic-theme";let vt=class extends w{constructor(){super(),this.theme="light",this.background=!1,this.color=!1,this.font=!1,vt.instance=this}static getPopContainer(){return vt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var e;const r=document.styleSheets,t=r.length,s=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};(e=et.get("sonic-theme"))==null||e.set(i),document.querySelectorAll("iframe").forEach(o=>{var n;return(n=o.contentWindow)==null?void 0:n.postMessage({type:"SonicTheme",...i},"*")})}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[...vt.styles.map(e=>e.styleSheet),...Array.from(document.styleSheets)];for(const e of t)try{if(!e)continue;const o=e.cssRules;for(const n of o){if(!("style"in n))continue;const l=n.style;for(const c of l)r.includes(c)||c.indexOf("--sc")!==0||r.push(c)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return r.forEach(e=>i[e]=s.getPropertyValue(e)),i}render(){return g`<slot></slot>`}};vt.styles=[hn,dn,cn,$`
|
|
947
949
|
:host([color]) {
|
|
948
950
|
color: var(--sc-base-content);
|
|
949
951
|
}
|
|
@@ -2034,7 +2036,7 @@
|
|
|
2034
2036
|
* @license
|
|
2035
2037
|
* Copyright 2021 Google LLC
|
|
2036
2038
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2037
|
-
*/class Dr{constructor(t,{target:s,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=i,this.o=o??this.o,this.callback=e,window.ResizeObserver?(this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var s;this.value=(s=this.callback)==null?void 0:s.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Wa=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,gt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ka(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Wa(t,s,e),e};let at=class extends oi(vr(br(Kt(w)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new Dr(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var s;if(r==""){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&(this.lastValidSearch=r,(s=this.searchPublisher)==null||s.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=((r==null?void 0:r.length)||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{var s;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(s=this.formValuePublisher)==null||s.set(t)},this.findSearchedItem=r=>{var s;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((s=this.searchPublisher)==null?void 0:s.get())},this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{var t;this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],(t=this.searchPublisher)==null||t.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var r,t,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=((r=this.searchPublisher)==null?void 0:r.get())&&((t=this.formValuePublisher)!=null&&t.get())&&((s=this.formValuePublisher)==null||s.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}connectedCallback(){var e,o,n,l;
|
|
2039
|
+
*/class Dr{constructor(t,{target:s,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=i,this.o=o??this.o,this.callback=e,window.ResizeObserver?(this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var s;this.value=(s=this.callback)==null?void 0:s.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Wa=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,gt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ka(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Wa(t,s,e),e};let at=class extends oi(vr(br(Kt(w)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new Dr(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var s;if(r==""){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&(this.lastValidSearch=r,(s=this.searchPublisher)==null||s.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=((r==null?void 0:r.length)||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{var s;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(s=this.formValuePublisher)==null||s.set(t)},this.findSearchedItem=r=>{var s;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((s=this.searchPublisher)==null?void 0:s.get())},this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{var t;this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],(t=this.searchPublisher)==null||t.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var r,t,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=((r=this.searchPublisher)==null?void 0:r.get())&&((t=this.formValuePublisher)!=null&&t.get())&&((s=this.formValuePublisher)==null||s.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}connectedCallback(){var e,o,n,l;super.connectedCallback();const r=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),s=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${s}_init_search__`,this.initQueueDataProvider=`${s}_init_queue__`,this.searchDataProvider=`${s}_search__`,this.queueDataProvider=`${s}_queue__`;const i=et.get;this.searchPublisher=i(this.searchDataProvider)[r],this.formValuePublisher=ht(i(t),this.name),this.countPublisher=i(this.queueDataProvider).resultCount,this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&(et.get(this.initSearchDataProvider)[this.name]=this.value),(e=this.initCountPublisher)==null||e.onAssign(this.initSearchParameter),(o=this.formValuePublisher)==null||o.onAssign(this.updateSearchParameter),(n=this.countPublisher)==null||n.onAssign(this.updateActiveSelection),(l=this.searchPublisher)==null||l.onAssign(this.updatePopContentVisibility)}disconnectedCallback(){var t,s,i,e;super.disconnectedCallback(),(t=this.initCountPublisher)==null||t.offAssign(this.initSearchParameter),(s=this.formValuePublisher)==null||s.offAssign(this.updateSearchParameter),(i=this.countPublisher)==null||i.offAssign(this.updateActiveSelection);const r=et.get;r(this.initSearchDataProvider).delete(),r(this.initQueueDataProvider).delete(),r(this.searchDataProvider).delete(),r(this.queueDataProvider).delete(),(e=this.searchPublisher)==null||e.offAssign(this.updatePopContentVisibility)}queryQueueListItem(r,t,s){const i=et.get(r);let e;const o=i.get();if(Array.isArray(o)){for(const n of o){const l=et.get(n.dataProvider).get();if(Array.isArray(l)&&(e=l.find(t),e))break}return e?(s(e),!0):!1}}setSelectionRange(r,t){var s;(s=this.querySelector("sonic-input"))==null||s.setSelectionRange(r,t)}handleHide(){var r,t,s;if(this.select){if(((r=this.searchPublisher)==null?void 0:r.get())==""){this.lastValidSearch="",(t=this.formValuePublisher)==null||t.set("");return}(s=this.searchPublisher)==null||s.set(this.lastValidSearch)}}render(){var r;return g`
|
|
2038
2040
|
<sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
|
|
2039
2041
|
<sonic-input
|
|
2040
2042
|
dataProvider="${this.initSearchDataProvider+Math.random()}"
|
|
@@ -2608,10 +2610,17 @@ ${this.value}</textarea
|
|
|
2608
2610
|
gap: 0.3rem;
|
|
2609
2611
|
}
|
|
2610
2612
|
`],mi([a({type:String})],es.prototype,"direction",2),mi([a({type:String})],es.prototype,"justify",2),es=mi([_(Sl)],es);var Ol=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,te=(r,t,s,i)=>{for(var e=i>1?void 0:i?Dl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ol(t,s,e),e};const kl="sonic-group";let Et=class extends w{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const r=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),t=r.length;t>1&&r.forEach((s,i)=>{const e=s;i===0?(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0")):i===t-1?(e.style.setProperty("--sc-item-rounded-tl","0"),e.style.setProperty("--sc-item-rounded-bl","0")):(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0"),e.style.setProperty("--sc-item-rounded-tl","0"),e.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}render(){const r={alignItems:this.alignItems};return g`<span class="${this.hasLabel?"form-label":"hidden"}"
|
|
2611
|
-
>${this.label?F(this.label):""}<slot
|
|
2613
|
+
>${this.label?F(this.label):""}<slot
|
|
2614
|
+
name="label"
|
|
2615
|
+
@slotchange=${this.hasSlotOrProps}
|
|
2616
|
+
></slot
|
|
2612
2617
|
></span>
|
|
2613
2618
|
<slot class="main-slot" style=${ut(r)}></slot>
|
|
2614
|
-
<slot
|
|
2619
|
+
<slot
|
|
2620
|
+
name="description"
|
|
2621
|
+
@slotchange=${this.hasSlotOrProps}
|
|
2622
|
+
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2623
|
+
>
|
|
2615
2624
|
${this.description?g`${F(this.description)}`:""}
|
|
2616
2625
|
</slot>`}};Et.styles=[Ot,Os,Ds,$`
|
|
2617
2626
|
:host {
|
|
@@ -2622,6 +2631,7 @@ ${this.value}</textarea
|
|
|
2622
2631
|
.main-slot {
|
|
2623
2632
|
width: 100%;
|
|
2624
2633
|
display: flex;
|
|
2634
|
+
min-width: 0;
|
|
2625
2635
|
}
|
|
2626
2636
|
.hidden {
|
|
2627
2637
|
display: none;
|
package/concorde-core.es.js
CHANGED
|
@@ -313,9 +313,9 @@ let ni = (Dt = class {
|
|
|
313
313
|
*/
|
|
314
314
|
async set(t, s = !1) {
|
|
315
315
|
var e, o, n;
|
|
316
|
-
if (
|
|
316
|
+
if (this._value_ === t || this._value_ && t && Object.prototype.hasOwnProperty.call(this._value_, "__value") && Object.prototype.hasOwnProperty.call(t, "__value") && this._value_.__value === t.__value)
|
|
317
317
|
return !0;
|
|
318
|
-
this._value_
|
|
318
|
+
this._value_ = Fe(t) ? t : { __value: t }, this._cachedGet_ = void 0;
|
|
319
319
|
const i = Object.prototype.hasOwnProperty.call(
|
|
320
320
|
this._value_,
|
|
321
321
|
"__value"
|
|
@@ -393,7 +393,7 @@ let T = (k = class {
|
|
|
393
393
|
} catch {
|
|
394
394
|
window.requestAnimationFrame(() => {
|
|
395
395
|
t(!1);
|
|
396
|
-
}), console.
|
|
396
|
+
}), console.warn("no publisher cache in this browser");
|
|
397
397
|
}
|
|
398
398
|
})();
|
|
399
399
|
});
|
|
@@ -529,7 +529,7 @@ let T = (k = class {
|
|
|
529
529
|
const h = await new Response(l.readable).arrayBuffer();
|
|
530
530
|
return new TextDecoder().decode(h);
|
|
531
531
|
}
|
|
532
|
-
}, k.buildDate = "
|
|
532
|
+
}, k.buildDate = "Tue Sep 10 2024 15:34:28 GMT+0200 (Central European Summer Time)", k.changed = !1, k.saving = !1, k.saveId = 0, k.instance = null, k.instances = /* @__PURE__ */ new Map(), k.modifiedCollectore = [], k);
|
|
533
533
|
const Bs = window;
|
|
534
534
|
Bs.SonicPublisherManager || (Bs.SonicPublisherManager = T);
|
|
535
535
|
Bs.SonicPublisherManager.registerInstance(
|
|
@@ -3795,6 +3795,7 @@ M.styles = [
|
|
|
3795
3795
|
|
|
3796
3796
|
.main-slot {
|
|
3797
3797
|
flex-grow: 1;
|
|
3798
|
+
min-width: 0;
|
|
3798
3799
|
display: block;
|
|
3799
3800
|
}
|
|
3800
3801
|
|
|
@@ -3805,6 +3806,7 @@ M.styles = [
|
|
|
3805
3806
|
slot[name="suffix"],
|
|
3806
3807
|
slot[name="prefix"] {
|
|
3807
3808
|
flex-shrink: 0;
|
|
3809
|
+
min-width: 0;
|
|
3808
3810
|
}
|
|
3809
3811
|
|
|
3810
3812
|
/*ALIGNEMENT DES ICONES
|
|
@@ -4951,7 +4953,7 @@ let vt = class extends w {
|
|
|
4951
4953
|
r.includes(c) || c.indexOf("--sc") !== 0 || r.push(c);
|
|
4952
4954
|
}
|
|
4953
4955
|
} catch {
|
|
4954
|
-
console.
|
|
4956
|
+
console.warn("Erreur lors de la récupération des variables CSS");
|
|
4955
4957
|
}
|
|
4956
4958
|
const s = window.getComputedStyle(this), i = {};
|
|
4957
4959
|
return r.forEach((e) => i[e] = s.getPropertyValue(e)), i;
|
|
@@ -8270,7 +8272,7 @@ let nt = class extends bi(
|
|
|
8270
8272
|
}
|
|
8271
8273
|
connectedCallback() {
|
|
8272
8274
|
var e, o, n, l;
|
|
8273
|
-
|
|
8275
|
+
super.connectedCallback();
|
|
8274
8276
|
const r = this.searchParameter || this.name, t = this.getAncestorAttributeValue("formDataProvider"), s = t + "__" + this.name + "__autocomplete";
|
|
8275
8277
|
this.initSearchDataProvider = `${s}_init_search__`, this.initQueueDataProvider = `${s}_init_queue__`, this.searchDataProvider = `${s}_search__`, this.queueDataProvider = `${s}_queue__`;
|
|
8276
8278
|
const i = tt.get;
|
|
@@ -9594,7 +9596,9 @@ let Lt = class extends w {
|
|
|
9594
9596
|
super(...arguments), this.alignItems = "center", this.hasDescription = !1, this.hasLabel = !1;
|
|
9595
9597
|
}
|
|
9596
9598
|
updated() {
|
|
9597
|
-
const r = this.querySelectorAll(
|
|
9599
|
+
const r = this.querySelectorAll(
|
|
9600
|
+
"sonic-input, sonic-button, sonic-select"
|
|
9601
|
+
), t = r.length;
|
|
9598
9602
|
t > 1 && r.forEach((s, i) => {
|
|
9599
9603
|
const e = s;
|
|
9600
9604
|
i === 0 ? (e.style.setProperty("--sc-item-rounded-tr", "0"), e.style.setProperty("--sc-item-rounded-br", "0")) : i === t - 1 ? (e.style.setProperty("--sc-item-rounded-tl", "0"), e.style.setProperty("--sc-item-rounded-bl", "0")) : (e.style.setProperty("--sc-item-rounded-tr", "0"), e.style.setProperty("--sc-item-rounded-br", "0"), e.style.setProperty("--sc-item-rounded-tl", "0"), e.style.setProperty("--sc-item-rounded-bl", "0"));
|
|
@@ -9618,10 +9622,17 @@ let Lt = class extends w {
|
|
|
9618
9622
|
>${this.label ? z(
|
|
9619
9623
|
this.label
|
|
9620
9624
|
/*+ labelStarSuffix*/
|
|
9621
|
-
) : ""}<slot
|
|
9625
|
+
) : ""}<slot
|
|
9626
|
+
name="label"
|
|
9627
|
+
@slotchange=${this.hasSlotOrProps}
|
|
9628
|
+
></slot
|
|
9622
9629
|
></span>
|
|
9623
9630
|
<slot class="main-slot" style=${ut(r)}></slot>
|
|
9624
|
-
<slot
|
|
9631
|
+
<slot
|
|
9632
|
+
name="description"
|
|
9633
|
+
@slotchange=${this.hasSlotOrProps}
|
|
9634
|
+
class="${this.hasDescription ? "form-description" : "hidden"}"
|
|
9635
|
+
>
|
|
9625
9636
|
${this.description ? g`${z(this.description)}` : ""}
|
|
9626
9637
|
</slot>`;
|
|
9627
9638
|
}
|
|
@@ -9639,6 +9650,7 @@ Lt.styles = [
|
|
|
9639
9650
|
.main-slot {
|
|
9640
9651
|
width: 100%;
|
|
9641
9652
|
display: flex;
|
|
9653
|
+
min-width: 0;
|
|
9642
9654
|
}
|
|
9643
9655
|
.hidden {
|
|
9644
9656
|
display: none;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var It,k,L,Fr,t,G;let Q=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}},as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=Q.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};function Me(r){return typeof r=="object"&&r!=null}const Ur=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Ts=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let Ms=(It=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),It.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Ur(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,s=!1){var e,o,n;if(Array.isArray(t)&&t.indexOf(null)!=-1&&console.log(t),this._value_===t||this._value_&&t&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;this._value_,this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=Object.prototype.hasOwnProperty.call(this._value_,"__value");if(this._parentKey_&&this.parent){const l=i?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._publishAssignement_(),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(It.instancesCounter++,this._instanceCounter_=It.instancesCounter),It.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},It.instances=new Map,It.instancesCounter=0,It),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Ts),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(Ts,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.log("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+Q.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new je(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+Q.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Ts,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Fri Sep 06 2024 14:29:58 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);const js=window;js.SonicPublisherManager||(js.SonicPublisherManager=N),js.SonicPublisherManager.registerInstance(N.getInstance());const Vr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class je extends Ms{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Vr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new je(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new je({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Br extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ms.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(Ce+"-publisher-proxy",Br)}catch{}let ls=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=Q.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,v={publisher:f,onAssign:()=>{const b=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(b.length==1&&l.variables[0].join(".")==P.substring(1)){let D=b[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<b.length;D++){let p=b[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ls.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ls);let X=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=X.traverseDotNotation;/**
|
|
1
|
+
(function(Q){typeof define=="function"&&define.amd?define(Q):Q()})(function(){"use strict";var It,k,L,Fr,t,G;let Q=class Ft{static getLanguage(){const t=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||t}static getCookies(){return document.cookie.split(";").reduce((t,s)=>{const i=s.indexOf("=");return t[s.substring(0,i).trim()]=s.substring(i+1),t},{})}static everyAncestors(t,s){for(;t;){if(!s(t))return;t=t.parentNode||t.host}}static getScrollableAncestor(t){for(;t;){const s=t;if(s.nodeType===1){const i=window.getComputedStyle(s);if((i==null?void 0:i.overflowY)==="hidden"||(i==null?void 0:i.overflowX)==="hidden")return t}t=t.parentNode||t.host}return null}static getAncestorAttributeValue(t,s){if(!t)return null;for(;!("hasAttribute"in t&&t.hasAttribute(s))&&(t.parentNode||t.host);)t=t.parentNode||t.host;return"hasAttribute"in t?t.getAttribute(s):null}static getApiConfiguration(t){const s=Ft.getAncestorAttributeValue(t,"token"),i=Ft.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Ft.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Ft.getAncestorAttributeValue(t,"tokenProvider"),c=Ft.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Ft.getAncestorAttributeValue(t,"userName"),n=Ft.getAncestorAttributeValue(t,"password"));const h=Ft.getAncestorAttributeValue(t,"credentials")||void 0,d=t.getAttribute("cache"),f=t.hasAttribute("blockUntilDone");return{serviceURL:e,token:s,userName:o,password:n,authToken:c,tokenProvider:l,addHTTPResponse:i,credentials:h,cache:d,blockUntilDone:f}}static getClosestElement(t,s){for(;!(t.nodeName&&t.nodeName.toLowerCase()===s)&&(t.parentNode||t.host);)t=t.parentNode||t.host;return t.nodeName?t:null}static getClosestForm(t){return Ft.getClosestElement(t,"form")}static async loadJS(t){return new Promise(async i=>{const e=document.createElement("script");e.src=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}static async loadCSS(t){return new Promise(async i=>{const e=document.createElement("link");e.type="text/css",e.rel="stylesheet",e.href=t,e.onload=()=>i(!0),e.onerror=()=>i(!0),document.head.appendChild(e)})}},as=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=Q.getLanguage());const e=(h,d)=>[Math.floor(h/d),h%d];function o(h,d,f){return new Intl.NumberFormat(h,{style:"unit",unit:d,unitDisplay:f}).format}const[n,l]=e(t,60),c=[];return n&&c.push(o(s,"hour",i)(n)),l&&c.push(o(s,"minute",i)(l)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(c)}static js(t){try{return Function("return "+t)()}catch{return""}}};function Me(r){return typeof r=="object"&&r!=null}const Ur=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Ce="sonic";typeof __SONIC_PREFIX__>"u"&&(Ce="sonic"+Math.floor(Math.random()*1e6));const Ts=Ce=="sonic"?"publisher-proxies-data":Ce+"-publisher-proxies-data";let Ms=(It=class{constructor(t,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=t,this.parent=s||null,this._parentKey_=i,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){var t;for(const s in this._proxies_.keys())s!="_parent_"&&((t=this._proxies_.get(s))==null||t.delete());this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),It.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!N.changed){N.changed=!0,N.saveId++;const s=N.saveId;setTimeout(()=>N.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Ur(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>{e(i)}),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.forEach(t=>t())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(t=>t())}_publishDynamicFilling_(t,s){this._fillListeners_.forEach(i=>{i[t]!==s&&(i[t]=s)}),this._publishTemplateFilling_(t,s)}_publishTemplateFilling_(t,s){this._templateFillListeners_.forEach(i=>{const e=Object.getOwnPropertyDescriptor(i,t);e&&!e.set&&!e.writable||(i.propertyMap&&i.propertyMap[t]&&(t=i.propertyMap[t]),typeof i[t]<"u"&&i[t]!==s&&(i[t]=s))})}onAssign(t,s=!0){typeof t=="function"&&(this._assignListeners_.has(t)||(this._assignListeners_.add(t),s&&t(this.get())))}offAssign(t){this._assignListeners_.delete(t)}onInvalidate(t){typeof t=="function"&&this._invalidateListeners_.add(t)}offInvalidate(t){typeof t=="function"&&this._invalidateListeners_.delete(t)}invalidate(){this._publishInvalidation_()}onFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.add(t)}offFormInvalidate(t){typeof t=="function"&&this._formInvalidateListeners_.delete(t)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(t){typeof t=="function"&&(this._mutationListeners_.add(t),t())}offInternalMutation(t){typeof t=="function"&&this._mutationListeners_.delete(t)}startTemplateFilling(t){if(this._templateFillListeners_.add(t),typeof this._value_=="object")for(const s in this._value_){let i=s;const e=this._value_[s];t.propertyMap&&t.propertyMap[s]&&(i=t.propertyMap[s]),typeof t[s]<"u"&&t[s]!==e&&(t[i]=e)}}stopTemplateFilling(t){this._templateFillListeners_.delete(t)}startDynamicFilling(t){this._fillListeners_.add(t);for(const s in this._value_){const i=this._value_[s];t[s]!==i&&(t[s]=i)}}stopDynamicFilling(t){this._fillListeners_.delete(t)}async set(t,s=!1){var e,o,n;if(this._value_===t||this._value_&&t&&Object.prototype.hasOwnProperty.call(this._value_,"__value")&&Object.prototype.hasOwnProperty.call(t,"__value")&&this._value_.__value===t.__value)return!0;this._value_=Me(t)?t:{__value:t},this._cachedGet_=void 0;const i=Object.prototype.hasOwnProperty.call(this._value_,"__value");if(this._parentKey_&&this.parent){const l=i?this._value_.__value:this._value_;if(((e=this.parent)==null?void 0:e.get())==null&&((o=this.parent)==null?void 0:o.get())==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:l});else{const c=[];c[Number(this._parentKey_)]=l,this.parent.set(c)}else this.parent._value_[this._parentKey_]=l}if(i)return this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const l in this._value_)this._value_[l]===void 0&&delete this._value_[l];if(this._publishAssignement_(),Me(this._value_))for(const l in this._value_){const c=t[l],d=Me(c)?c:{__value:c};if(!this._proxies_.has(l)){this._publishDynamicFilling_(l,c);continue}(n=this._proxies_.get(l))==null||n.set(d,!0),this._publishDynamicFilling_(l,c)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(N.modifiedCollectore.length>0&&N.modifiedCollectore[0].add(this),Object.prototype.hasOwnProperty.call(this._value_,"__value")){const t=this._value_.__value;return this._cachedGet_=t??null}return this._cachedGet_=this._value_}get $tag(){return this._instanceCounter_||(It.instancesCounter++,this._instanceCounter_=It.instancesCounter),It.instances.set(this._instanceCounter_,this),"<"+Ce+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Ce+"-publisher-proxy>"}},It.instances=new Map,It.instancesCounter=0,It),N=(k=class{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],k.instance!=null)throw"Singleton / use getInstance";k.instance=this,this.isLocalStrorageReady=this.cleanStorageData()}async cleanStorageData(){return new Promise(t=>{(async()=>{try{let i=localStorage.getItem(Ts),e=null;if(i&&(e=await this.decompress(i,"gzip")),e)try{this.localStorageData=JSON.parse(e)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(Ts,i),this.localStorageData={};const o=new Date().getTime()-1e3*60*60*12;for(const n in this.localStorageData)this.localStorageData[n].lastModifiationMS<o&&delete this.localStorageData[n];t(!0)}catch{window.requestAnimationFrame(()=>{t(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(t){if(t){const s=k.instances.get(t);return s||(console.warn("No PublisherManager instance registered with id:",t,"creating new one"),new k)}return k.instance==null?new k:k.instance}static registerInstance(t,s){k.instances.has(t)&&console.warn("PublisherManager instance already registered with id: ",t),k.instances.set(t,s)}static get(t,s){return k.getInstance().get(t,s)}static collectModifiedPublisher(){k.modifiedCollectore.unshift(new Set)}static getModifiedPublishers(){return k.modifiedCollectore.shift()}static delete(t){return t?k.getInstance().delete(t):!1}async setLocalData(t,s){var i;await this.isLocalStrorageReady,t.set(((i=this.localStorageData[s+"¤lang_"+Q.getLanguage()])==null?void 0:i.data)||t.get())}get(t,s){const i=(s==null?void 0:s.localStorageMode)==="enabled";if(!this.publishers.has(t)){const o={},n=new je(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+Q.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Ts,e)}if(k.saving=!1,k.changed){k.saveId++;const e=k.saveId;setTimeout(()=>this.saveToLocalStorage(e),1e3)}}catch{k.saving=!1}}async compress(t,s){const i=new TextEncoder().encode(t),e=window,o=new e.CompressionStream(s),n=o.writable.getWriter();n.write(i),n.close();const l=await new Response(o.readable).arrayBuffer(),c=new Uint8Array(l);let h="";for(let d=0;d<c.length;d++)h+=String.fromCharCode(c[d]);return btoa(h)}async decompress(t,s){const i=atob(t),o=Uint8Array.from(i,d=>d.charCodeAt(0)).buffer,n=window,l=new n.DecompressionStream(s),c=l.writable.getWriter();c.write(o),c.close();const h=await new Response(l.readable).arrayBuffer();return new TextDecoder().decode(h)}},k.buildDate="Tue Sep 10 2024 15:34:28 GMT+0200 (Central European Summer Time)",k.changed=!1,k.saving=!1,k.saveId=0,k.instance=null,k.instances=new Map,k.modifiedCollectore=[],k);const js=window;js.SonicPublisherManager||(js.SonicPublisherManager=N),js.SonicPublisherManager.registerInstance(N.getInstance());const Vr=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class je extends Ms{constructor(t,s=null,i){super(t,s,i);const e=new Proxy(this,{get:function(o,n){if(Vr.has(n))return o[n];if(n==Symbol.toPrimitive)return()=>e.get();if(!o._proxies_.has(n)){const l=o._value_[n],c=new je(Me(l)?l:{__value:l},o,n);c._proxies_.set("_parent_",e),o._proxies_.set(n,c)}return o._proxies_.get(n)},set:function(o,n,l){var h;if(n=="_value_")return o._value_=l,!0;if(n=="_cachedGet_")return o._cachedGet_=l,!0;if(n=="_assignmentId_")return o._assignmentId_=l,!0;if(n=="_is_savable_")return o._is_savable_=l,!0;if(n=="_instanceCounter_")return o._instanceCounter_=l,!0;if(!o._proxies_.has(n)){const d=new je({},o,n);d._proxies_.set("_parent_",e),o._proxies_.set(n,d)}return o._value_[n]!==l&&(o._value_[n]=l,o._publishDynamicFilling_(n,l),(h=o._proxies_.get(n))==null||h.set(Me(l)?l:{__value:l})),!0},deleteProperty:function(o,n){var l;return o._publishDynamicFilling_(n,null),(l=o._proxies_.get(n))==null||l.set(null),delete o._value_[n]},has:function(o,n){return n in o._value_&&n!="_lockInternalMutationPublishing_"},defineProperty:function(o,n,l){return l&&"value"in l&&(o._value_[n]=l.value),!0},getOwnPropertyDescriptor:function(o,n){return{enumerable:!0,configurable:!0}},ownKeys:function(o){return o._value_.__value?Object.keys(o._value_.__value):Object.keys(o._value_)}});return e}getProperty(t,s){return t[s]}}class Br extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ms.instances.get(parseInt(this.publisherId)),(t=this.publisher)==null||t.onAssign(this.onAssign)}disconnectedCallback(){var t;(t=this.publisher)==null||t.offAssign(this.onAssign)}}try{customElements.define(Ce+"-publisher-proxy",Br)}catch{}let ls=(L=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(L.observedElements.keys()).forEach(t=>L.unObserve(t)))}static observe(t){if(!t||!L.enabled||L.observedElements.has(t))return;const s=new MutationObserver(L.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(t,i),t.querySelectorAll("[data-bind]").forEach(e=>L.addPublisherListeners(e)),L.observedElements.set(t,s)}static unObserve(t){if(!t)return;const s=this.observedElements.get(t);s&&(s.disconnect(),t.querySelectorAll("[data-bind]").forEach(i=>L.removePublisherListeners(i)))}static onAdded(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.addPublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.addPublisherListeners(s)):t.childNodes.forEach(s=>L.onAdded(s))}static onRemoved(t){t.hasAttribute&&t.hasAttribute("data-bind")&&L.removePublisherListeners(t),t.querySelectorAll?t.querySelectorAll("[data-bind]").forEach(s=>L.removePublisherListeners(s)):t.childNodes.forEach(s=>L.onRemoved(s))}static onMutation(t){for(const s of t)switch(s.type){case"attributes":L.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{L.onAdded(i)}),s.removedNodes.forEach(i=>{L.onRemoved(i)});break}}static removePublisherListeners(t){const s=L.publisherListeners.get(t);s&&(L.publisherListeners.delete(t),s.forEach(i=>{var e;(e=i.publisher)==null||e.offAssign(i.onAssign)}))}static getVariablesDescriptor(t){let s=t.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[t],s=s.filter(i=>i.length>0),{expression:t.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(e=>e.replace("\\","")))}}static getDataBindItems(t){return"attributes"in t?Array.from(t.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,e=>e.substring(1).toUpperCase()),bindedVariablesDescriptor:L.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(t,s){if(!s)return t;for(const i of s)if(i!="_self_"){if(!t)return null;t=t[i]}return t}static addPublisherListeners(t){L.removePublisherListeners(t);const s=Q.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=N.getInstance().get(s),e=L.getDataBindItems(t),o=[];e.forEach(n=>{const l=n.bindedVariablesDescriptor,c=n.propertyToUpdate;for(const h of l.variables){const d=h;let f=i;f=L.getSubPublisher(i,d);const m=t,v={publisher:f,onAssign:()=>{const b=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let P=l.expression,S=!1;if(b.length==1&&l.variables[0].join(".")==P.substring(1)){let D=b[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<b.length;D++){let p=b[D];const u=l.variables[D];p===null&&(S=!0,p=void 0),P=P.replace("$"+u.join("."),p)}if(P.indexOf("|")!=-1){const D=P.indexOf("|");if(D==0)P=as.js(P.substring(1));else{const p=P.substring(0,D),u=P.substring(D+1),y=as[p];P=S?"":y?y(u):P}}else P=S?"":P;m[c]=P}};f==null||f.onAssign(v.onAssign),o.push(v)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ls.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ls);let X=class Ht{static shallowEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n];if(i?l!==c:l!=c)return!1}return!0}static deepEqual(t,s,i=!0){const e=Object.keys(t),o=Object.keys(s);if(e.length!==o.length&&i)return!1;for(const n of e){const l=t[n],c=s[n],h=Ht.isObject(l)&&Ht.isObject(c),d=i?l!==c:l!=c;if(h&&!Ht.deepEqual(l,c)||!h&&d)return!1}return!0}static isObject(t){return t!=null&&typeof t=="object"}static isUndefindOrNull(t){return t==null}static isEmpty(t){return Ht.isUndefindOrNull(t)?!0:Object.keys(t).length===0}static traverse(t,s,i=!1){for(const e of s){const o=t[e];if(o===void 0)return;i&&Ht.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static traverseDotNotation(t,s,i=!1){return Ht.traverse(t,s.split("."),i)}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),Ht.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return Ht.getURLSearchArray(t,"").join("&")}};const ht=X.traverseDotNotation;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -411,6 +411,7 @@
|
|
|
411
411
|
|
|
412
412
|
.main-slot {
|
|
413
413
|
flex-grow: 1;
|
|
414
|
+
min-width: 0;
|
|
414
415
|
display: block;
|
|
415
416
|
}
|
|
416
417
|
|
|
@@ -421,6 +422,7 @@
|
|
|
421
422
|
slot[name="suffix"],
|
|
422
423
|
slot[name="prefix"] {
|
|
423
424
|
flex-shrink: 0;
|
|
425
|
+
min-width: 0;
|
|
424
426
|
}
|
|
425
427
|
|
|
426
428
|
/*ALIGNEMENT DES ICONES
|
|
@@ -943,7 +945,7 @@
|
|
|
943
945
|
${fr}
|
|
944
946
|
}
|
|
945
947
|
}
|
|
946
|
-
`;var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,Qe=(r,t,s,i)=>{for(var e=i>1?void 0:i?un(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&pn(t,s,e),e};const fn="sonic-theme";let vt=class extends w{constructor(){super(),this.theme="light",this.background=!1,this.color=!1,this.font=!1,vt.instance=this}static getPopContainer(){return vt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var e;const r=document.styleSheets,t=r.length,s=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};(e=et.get("sonic-theme"))==null||e.set(i),document.querySelectorAll("iframe").forEach(o=>{var n;return(n=o.contentWindow)==null?void 0:n.postMessage({type:"SonicTheme",...i},"*")})}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[...vt.styles.map(e=>e.styleSheet),...Array.from(document.styleSheets)];for(const e of t)try{if(!e)continue;const o=e.cssRules;for(const n of o){if(!("style"in n))continue;const l=n.style;for(const c of l)r.includes(c)||c.indexOf("--sc")!==0||r.push(c)}}catch{console.
|
|
948
|
+
`;var pn=Object.defineProperty,un=Object.getOwnPropertyDescriptor,Qe=(r,t,s,i)=>{for(var e=i>1?void 0:i?un(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&pn(t,s,e),e};const fn="sonic-theme";let vt=class extends w{constructor(){super(),this.theme="light",this.background=!1,this.color=!1,this.font=!1,vt.instance=this}static getPopContainer(){return vt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",r=>this.receiveMessage(r),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){var e;const r=document.styleSheets,t=r.length,s=[];for(let o=0;o<t;o++){const n=r[o];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};(e=et.get("sonic-theme"))==null||e.set(i),document.querySelectorAll("iframe").forEach(o=>{var n;return(n=o.contentWindow)==null?void 0:n.postMessage({type:"SonicTheme",...i},"*")})}receiveMessage(r){const t=r.data;!t.type||t.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const r=[],t=[...vt.styles.map(e=>e.styleSheet),...Array.from(document.styleSheets)];for(const e of t)try{if(!e)continue;const o=e.cssRules;for(const n of o){if(!("style"in n))continue;const l=n.style;for(const c of l)r.includes(c)||c.indexOf("--sc")!==0||r.push(c)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return r.forEach(e=>i[e]=s.getPropertyValue(e)),i}render(){return g`<slot></slot>`}};vt.styles=[hn,dn,cn,$`
|
|
947
949
|
:host([color]) {
|
|
948
950
|
color: var(--sc-base-content);
|
|
949
951
|
}
|
|
@@ -2034,7 +2036,7 @@
|
|
|
2034
2036
|
* @license
|
|
2035
2037
|
* Copyright 2021 Google LLC
|
|
2036
2038
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2037
|
-
*/class Dr{constructor(t,{target:s,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=i,this.o=o??this.o,this.callback=e,window.ResizeObserver?(this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var s;this.value=(s=this.callback)==null?void 0:s.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Wa=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,gt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ka(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Wa(t,s,e),e};let at=class extends oi(vr(br(Kt(w)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new Dr(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var s;if(r==""){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&(this.lastValidSearch=r,(s=this.searchPublisher)==null||s.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=((r==null?void 0:r.length)||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{var s;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(s=this.formValuePublisher)==null||s.set(t)},this.findSearchedItem=r=>{var s;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((s=this.searchPublisher)==null?void 0:s.get())},this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{var t;this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],(t=this.searchPublisher)==null||t.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var r,t,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=((r=this.searchPublisher)==null?void 0:r.get())&&((t=this.formValuePublisher)!=null&&t.get())&&((s=this.formValuePublisher)==null||s.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}connectedCallback(){var e,o,n,l;
|
|
2039
|
+
*/class Dr{constructor(t,{target:s,config:i,callback:e,skipInitial:o}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,s!==null&&this.t.add(s??t),this.l=i,this.o=o??this.o,this.callback=e,window.ResizeObserver?(this.u=new ResizeObserver(n=>{this.handleChanges(n),this.h.requestUpdate()}),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var s;this.value=(s=this.callback)==null?void 0:s.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Wa=Object.defineProperty,Ka=Object.getOwnPropertyDescriptor,gt=(r,t,s,i)=>{for(var e=i>1?void 0:i?Ka(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Wa(t,s,e),e};let at=class extends oi(vr(br(Kt(w)))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.minSearchLength=0,this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new Dr(this,{}),this.isPopVisible=!1,this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=r=>{var s;if(r==""){this.lastValidSearch="";return}this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)===!1&&(this.lastValidSearch=r,(s=this.searchPublisher)==null||s.set(this.lastValidSearch))},this.updatePopContentVisibility=r=>{this.isPopVisible=((r==null?void 0:r.length)||0)>=this.minSearchLength},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=r=>{var s;const t=this.propertyName==="_self"?r:r[this.propertyName||this.name];(s=this.formValuePublisher)==null||s.set(t)},this.findSearchedItem=r=>{var s;return(this.propertyName==="_self"?r:r[this.propertyName||this.searchParameter||this.name])==((s=this.searchPublisher)==null?void 0:s.get())},this.findSelection=r=>(this.propertyName==="_self"?r:r[this.propertyName||this.name])==this.value,this.setSearchFromSelection=r=>{var t;this.lastValidSearch=this.propertyName==="_self"?r:r[this.searchParameter||this.propertyName||this.name],(t=this.searchPublisher)==null||t.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var r,t,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=((r=this.searchPublisher)==null?void 0:r.get())&&((t=this.formValuePublisher)!=null&&t.get())&&((s=this.formValuePublisher)==null||s.set(""))}}hasSlotOrProps(){var r;this.hasInputPrefix=!!((r=this.slotInputPrefixNodes)!=null&&r.length)}connectedCallback(){var e,o,n,l;super.connectedCallback();const r=this.searchParameter||this.name,t=this.getAncestorAttributeValue("formDataProvider"),s=t+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${s}_init_search__`,this.initQueueDataProvider=`${s}_init_queue__`,this.searchDataProvider=`${s}_search__`,this.queueDataProvider=`${s}_queue__`;const i=et.get;this.searchPublisher=i(this.searchDataProvider)[r],this.formValuePublisher=ht(i(t),this.name),this.countPublisher=i(this.queueDataProvider).resultCount,this.initCountPublisher=i(this.initQueueDataProvider).resultCount,this.value&&(et.get(this.initSearchDataProvider)[this.name]=this.value),(e=this.initCountPublisher)==null||e.onAssign(this.initSearchParameter),(o=this.formValuePublisher)==null||o.onAssign(this.updateSearchParameter),(n=this.countPublisher)==null||n.onAssign(this.updateActiveSelection),(l=this.searchPublisher)==null||l.onAssign(this.updatePopContentVisibility)}disconnectedCallback(){var t,s,i,e;super.disconnectedCallback(),(t=this.initCountPublisher)==null||t.offAssign(this.initSearchParameter),(s=this.formValuePublisher)==null||s.offAssign(this.updateSearchParameter),(i=this.countPublisher)==null||i.offAssign(this.updateActiveSelection);const r=et.get;r(this.initSearchDataProvider).delete(),r(this.initQueueDataProvider).delete(),r(this.searchDataProvider).delete(),r(this.queueDataProvider).delete(),(e=this.searchPublisher)==null||e.offAssign(this.updatePopContentVisibility)}queryQueueListItem(r,t,s){const i=et.get(r);let e;const o=i.get();if(Array.isArray(o)){for(const n of o){const l=et.get(n.dataProvider).get();if(Array.isArray(l)&&(e=l.find(t),e))break}return e?(s(e),!0):!1}}setSelectionRange(r,t){var s;(s=this.querySelector("sonic-input"))==null||s.setSelectionRange(r,t)}handleHide(){var r,t,s;if(this.select){if(((r=this.searchPublisher)==null?void 0:r.get())==""){this.lastValidSearch="",(t=this.formValuePublisher)==null||t.set("");return}(s=this.searchPublisher)==null||s.set(this.lastValidSearch)}}render(){var r;return g`
|
|
2038
2040
|
<sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
|
|
2039
2041
|
<sonic-input
|
|
2040
2042
|
dataProvider="${this.initSearchDataProvider+Math.random()}"
|
|
@@ -2608,10 +2610,17 @@ ${this.value}</textarea
|
|
|
2608
2610
|
gap: 0.3rem;
|
|
2609
2611
|
}
|
|
2610
2612
|
`],mi([a({type:String})],es.prototype,"direction",2),mi([a({type:String})],es.prototype,"justify",2),es=mi([_(Sl)],es);var Ol=Object.defineProperty,Dl=Object.getOwnPropertyDescriptor,te=(r,t,s,i)=>{for(var e=i>1?void 0:i?Dl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ol(t,s,e),e};const kl="sonic-group";let Et=class extends w{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const r=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),t=r.length;t>1&&r.forEach((s,i)=>{const e=s;i===0?(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0")):i===t-1?(e.style.setProperty("--sc-item-rounded-tl","0"),e.style.setProperty("--sc-item-rounded-bl","0")):(e.style.setProperty("--sc-item-rounded-tr","0"),e.style.setProperty("--sc-item-rounded-br","0"),e.style.setProperty("--sc-item-rounded-tl","0"),e.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(r){this.hasSlotOrProps(),super.willUpdate(r)}hasSlotOrProps(){var r,t;this.hasLabel=!!(this.label||(r=this.slotLabelNodes)!=null&&r.length),this.hasDescription=!!(this.description||(t=this.slotDescriptionNodes)!=null&&t.length)}render(){const r={alignItems:this.alignItems};return g`<span class="${this.hasLabel?"form-label":"hidden"}"
|
|
2611
|
-
>${this.label?F(this.label):""}<slot
|
|
2613
|
+
>${this.label?F(this.label):""}<slot
|
|
2614
|
+
name="label"
|
|
2615
|
+
@slotchange=${this.hasSlotOrProps}
|
|
2616
|
+
></slot
|
|
2612
2617
|
></span>
|
|
2613
2618
|
<slot class="main-slot" style=${ut(r)}></slot>
|
|
2614
|
-
<slot
|
|
2619
|
+
<slot
|
|
2620
|
+
name="description"
|
|
2621
|
+
@slotchange=${this.hasSlotOrProps}
|
|
2622
|
+
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2623
|
+
>
|
|
2615
2624
|
${this.description?g`${F(this.description)}`:""}
|
|
2616
2625
|
</slot>`}};Et.styles=[Ot,Os,Ds,$`
|
|
2617
2626
|
:host {
|
|
@@ -2622,6 +2631,7 @@ ${this.value}</textarea
|
|
|
2622
2631
|
.main-slot {
|
|
2623
2632
|
width: 100%;
|
|
2624
2633
|
display: flex;
|
|
2634
|
+
min-width: 0;
|
|
2625
2635
|
}
|
|
2626
2636
|
.hidden {
|
|
2627
2637
|
display: none;
|
package/dist/concorde-core.es.js
CHANGED
|
@@ -313,9 +313,9 @@ let ni = (Dt = class {
|
|
|
313
313
|
*/
|
|
314
314
|
async set(t, s = !1) {
|
|
315
315
|
var e, o, n;
|
|
316
|
-
if (
|
|
316
|
+
if (this._value_ === t || this._value_ && t && Object.prototype.hasOwnProperty.call(this._value_, "__value") && Object.prototype.hasOwnProperty.call(t, "__value") && this._value_.__value === t.__value)
|
|
317
317
|
return !0;
|
|
318
|
-
this._value_
|
|
318
|
+
this._value_ = Fe(t) ? t : { __value: t }, this._cachedGet_ = void 0;
|
|
319
319
|
const i = Object.prototype.hasOwnProperty.call(
|
|
320
320
|
this._value_,
|
|
321
321
|
"__value"
|
|
@@ -393,7 +393,7 @@ let T = (k = class {
|
|
|
393
393
|
} catch {
|
|
394
394
|
window.requestAnimationFrame(() => {
|
|
395
395
|
t(!1);
|
|
396
|
-
}), console.
|
|
396
|
+
}), console.warn("no publisher cache in this browser");
|
|
397
397
|
}
|
|
398
398
|
})();
|
|
399
399
|
});
|
|
@@ -529,7 +529,7 @@ let T = (k = class {
|
|
|
529
529
|
const h = await new Response(l.readable).arrayBuffer();
|
|
530
530
|
return new TextDecoder().decode(h);
|
|
531
531
|
}
|
|
532
|
-
}, k.buildDate = "
|
|
532
|
+
}, k.buildDate = "Tue Sep 10 2024 15:34:28 GMT+0200 (Central European Summer Time)", k.changed = !1, k.saving = !1, k.saveId = 0, k.instance = null, k.instances = /* @__PURE__ */ new Map(), k.modifiedCollectore = [], k);
|
|
533
533
|
const Bs = window;
|
|
534
534
|
Bs.SonicPublisherManager || (Bs.SonicPublisherManager = T);
|
|
535
535
|
Bs.SonicPublisherManager.registerInstance(
|
|
@@ -3795,6 +3795,7 @@ M.styles = [
|
|
|
3795
3795
|
|
|
3796
3796
|
.main-slot {
|
|
3797
3797
|
flex-grow: 1;
|
|
3798
|
+
min-width: 0;
|
|
3798
3799
|
display: block;
|
|
3799
3800
|
}
|
|
3800
3801
|
|
|
@@ -3805,6 +3806,7 @@ M.styles = [
|
|
|
3805
3806
|
slot[name="suffix"],
|
|
3806
3807
|
slot[name="prefix"] {
|
|
3807
3808
|
flex-shrink: 0;
|
|
3809
|
+
min-width: 0;
|
|
3808
3810
|
}
|
|
3809
3811
|
|
|
3810
3812
|
/*ALIGNEMENT DES ICONES
|
|
@@ -4951,7 +4953,7 @@ let vt = class extends w {
|
|
|
4951
4953
|
r.includes(c) || c.indexOf("--sc") !== 0 || r.push(c);
|
|
4952
4954
|
}
|
|
4953
4955
|
} catch {
|
|
4954
|
-
console.
|
|
4956
|
+
console.warn("Erreur lors de la récupération des variables CSS");
|
|
4955
4957
|
}
|
|
4956
4958
|
const s = window.getComputedStyle(this), i = {};
|
|
4957
4959
|
return r.forEach((e) => i[e] = s.getPropertyValue(e)), i;
|
|
@@ -8270,7 +8272,7 @@ let nt = class extends bi(
|
|
|
8270
8272
|
}
|
|
8271
8273
|
connectedCallback() {
|
|
8272
8274
|
var e, o, n, l;
|
|
8273
|
-
|
|
8275
|
+
super.connectedCallback();
|
|
8274
8276
|
const r = this.searchParameter || this.name, t = this.getAncestorAttributeValue("formDataProvider"), s = t + "__" + this.name + "__autocomplete";
|
|
8275
8277
|
this.initSearchDataProvider = `${s}_init_search__`, this.initQueueDataProvider = `${s}_init_queue__`, this.searchDataProvider = `${s}_search__`, this.queueDataProvider = `${s}_queue__`;
|
|
8276
8278
|
const i = tt.get;
|
|
@@ -9594,7 +9596,9 @@ let Lt = class extends w {
|
|
|
9594
9596
|
super(...arguments), this.alignItems = "center", this.hasDescription = !1, this.hasLabel = !1;
|
|
9595
9597
|
}
|
|
9596
9598
|
updated() {
|
|
9597
|
-
const r = this.querySelectorAll(
|
|
9599
|
+
const r = this.querySelectorAll(
|
|
9600
|
+
"sonic-input, sonic-button, sonic-select"
|
|
9601
|
+
), t = r.length;
|
|
9598
9602
|
t > 1 && r.forEach((s, i) => {
|
|
9599
9603
|
const e = s;
|
|
9600
9604
|
i === 0 ? (e.style.setProperty("--sc-item-rounded-tr", "0"), e.style.setProperty("--sc-item-rounded-br", "0")) : i === t - 1 ? (e.style.setProperty("--sc-item-rounded-tl", "0"), e.style.setProperty("--sc-item-rounded-bl", "0")) : (e.style.setProperty("--sc-item-rounded-tr", "0"), e.style.setProperty("--sc-item-rounded-br", "0"), e.style.setProperty("--sc-item-rounded-tl", "0"), e.style.setProperty("--sc-item-rounded-bl", "0"));
|
|
@@ -9618,10 +9622,17 @@ let Lt = class extends w {
|
|
|
9618
9622
|
>${this.label ? z(
|
|
9619
9623
|
this.label
|
|
9620
9624
|
/*+ labelStarSuffix*/
|
|
9621
|
-
) : ""}<slot
|
|
9625
|
+
) : ""}<slot
|
|
9626
|
+
name="label"
|
|
9627
|
+
@slotchange=${this.hasSlotOrProps}
|
|
9628
|
+
></slot
|
|
9622
9629
|
></span>
|
|
9623
9630
|
<slot class="main-slot" style=${ut(r)}></slot>
|
|
9624
|
-
<slot
|
|
9631
|
+
<slot
|
|
9632
|
+
name="description"
|
|
9633
|
+
@slotchange=${this.hasSlotOrProps}
|
|
9634
|
+
class="${this.hasDescription ? "form-description" : "hidden"}"
|
|
9635
|
+
>
|
|
9625
9636
|
${this.description ? g`${z(this.description)}` : ""}
|
|
9626
9637
|
</slot>`;
|
|
9627
9638
|
}
|
|
@@ -9639,6 +9650,7 @@ Lt.styles = [
|
|
|
9639
9650
|
.main-slot {
|
|
9640
9651
|
width: 100%;
|
|
9641
9652
|
display: flex;
|
|
9653
|
+
min-width: 0;
|
|
9642
9654
|
}
|
|
9643
9655
|
.hidden {
|
|
9644
9656
|
display: none;
|
package/package.json
CHANGED
package/scripts/pre-build.mjs
CHANGED
|
File without changes
|
package/scripts/pre-publish.mjs
CHANGED
|
@@ -17,8 +17,60 @@ requiredFiles.forEach((file) => {
|
|
|
17
17
|
});
|
|
18
18
|
|
|
19
19
|
if (!allFilesExist) {
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
console.error('❌ La publication est bloquée en raison de fichiers manquants.');
|
|
21
22
|
process.exit(1); // Bloque la publication en renvoyant un code d'erreur
|
|
22
23
|
} else {
|
|
23
|
-
|
|
24
|
+
//emoji check mark
|
|
25
|
+
console.log('✅ Tous les fichiers requis sont présents')
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
// list ts files having console.log in their code ins the src folder
|
|
29
|
+
// console.log("🚀 Maintenance des console.log");
|
|
30
|
+
const consoleLogFiles = [];
|
|
31
|
+
function listFiles(dir) {
|
|
32
|
+
let files = [];
|
|
33
|
+
let list = fs.readdirSync(dir);
|
|
34
|
+
list.forEach((file) => {
|
|
35
|
+
const path = dir + "/" + file;
|
|
36
|
+
let stat = fs.statSync(path);
|
|
37
|
+
if (stat && stat.isDirectory()) {
|
|
38
|
+
files = files.concat(listFiles(path));
|
|
39
|
+
} else {
|
|
40
|
+
if (path.indexOf(".ts") != -1) {
|
|
41
|
+
files.push(path);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
return files;
|
|
47
|
+
}
|
|
48
|
+
const componentsFiles = listFiles('src');
|
|
49
|
+
componentsFiles.forEach((file) => {
|
|
50
|
+
if (!file.match(/\.ts$/)) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
const content
|
|
54
|
+
|
|
55
|
+
= fs.readFileSync(file, 'utf8');
|
|
56
|
+
if (content.includes('console.log')) {
|
|
57
|
+
consoleLogFiles.push(file);
|
|
58
|
+
}
|
|
24
59
|
}
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
if (consoleLogFiles.length > 0) {
|
|
63
|
+
//add an error emoji console.error('Les fichiers suivants contiennent des console.log:');
|
|
64
|
+
consoleLogFiles.forEach((file) => {
|
|
65
|
+
// ajouter une émoji puce
|
|
66
|
+
console.error(" - "+file);
|
|
67
|
+
}
|
|
68
|
+
);
|
|
69
|
+
|
|
70
|
+
console.error('❌ La publication est bloquée en raison de la présence de console.log.');
|
|
71
|
+
process.exit(1); // Bloque la publication en renvoyant un code d'erreur
|
|
72
|
+
}else{
|
|
73
|
+
//emoji check mark
|
|
74
|
+
console.log('✅ Bavo! Aucun console.log oublié')
|
|
75
|
+
}
|
|
76
|
+
|
package/src/core/_types/types.ts
CHANGED
|
File without changes
|
|
@@ -317,6 +317,7 @@ export class Button extends FormCheckable(FormElement(Subscriber(LitElement))) {
|
|
|
317
317
|
|
|
318
318
|
.main-slot {
|
|
319
319
|
flex-grow: 1;
|
|
320
|
+
min-width: 0;
|
|
320
321
|
display: block;
|
|
321
322
|
}
|
|
322
323
|
|
|
@@ -327,6 +328,7 @@ export class Button extends FormCheckable(FormElement(Subscriber(LitElement))) {
|
|
|
327
328
|
slot[name="suffix"],
|
|
328
329
|
slot[name="prefix"] {
|
|
329
330
|
flex-shrink: 0;
|
|
331
|
+
min-width: 0;
|
|
330
332
|
}
|
|
331
333
|
|
|
332
334
|
/*ALIGNEMENT DES ICONES
|
|
File without changes
|
|
@@ -179,11 +179,8 @@ export class InputAutocomplete extends TemplatesContainer(
|
|
|
179
179
|
};
|
|
180
180
|
|
|
181
181
|
connectedCallback() {
|
|
182
|
-
console.log(this.value, this.getAttribute("value"));
|
|
183
|
-
|
|
184
182
|
super.connectedCallback();
|
|
185
183
|
|
|
186
|
-
console.log(this.value, this.getAttribute("value"));
|
|
187
184
|
|
|
188
185
|
/**
|
|
189
186
|
* Nom de la valeur de recherche
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
import {html, LitElement, css, PropertyValues} from "lit";
|
|
2
|
-
import {styleMap} from "lit/directives/style-map.js";
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
import { html, LitElement, css, PropertyValues } from "lit";
|
|
2
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
3
|
+
import {
|
|
4
|
+
customElement,
|
|
5
|
+
property,
|
|
6
|
+
state,
|
|
7
|
+
queryAssignedNodes,
|
|
8
|
+
} from "lit/decorators.js";
|
|
9
|
+
import {
|
|
10
|
+
label,
|
|
11
|
+
description,
|
|
12
|
+
} from "@supersoniks/concorde/core/components/ui/form/css/form-control";
|
|
13
|
+
import { fontSize } from "@supersoniks/concorde/core/components/ui/_css/size";
|
|
14
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
7
15
|
|
|
8
16
|
const tagName = "sonic-group";
|
|
9
17
|
|
|
10
18
|
@customElement(tagName)
|
|
11
19
|
export class Group extends LitElement {
|
|
12
|
-
@property({type: String}) alignItems = "center";
|
|
13
|
-
@property({type: String}) label?: string;
|
|
14
|
-
@property({type: String}) description?: string;
|
|
15
|
-
@queryAssignedNodes({slot: "label", flatten: true})
|
|
20
|
+
@property({ type: String }) alignItems = "center";
|
|
21
|
+
@property({ type: String }) label?: string;
|
|
22
|
+
@property({ type: String }) description?: string;
|
|
23
|
+
@queryAssignedNodes({ slot: "label", flatten: true })
|
|
16
24
|
slotLabelNodes!: Array<Node>;
|
|
17
25
|
|
|
18
|
-
@queryAssignedNodes({slot: "description", flatten: true})
|
|
26
|
+
@queryAssignedNodes({ slot: "description", flatten: true })
|
|
19
27
|
slotDescriptionNodes!: Array<Node>;
|
|
20
28
|
|
|
21
29
|
@state() hasDescription = false;
|
|
@@ -34,6 +42,7 @@ export class Group extends LitElement {
|
|
|
34
42
|
.main-slot {
|
|
35
43
|
width: 100%;
|
|
36
44
|
display: flex;
|
|
45
|
+
min-width: 0;
|
|
37
46
|
}
|
|
38
47
|
.hidden {
|
|
39
48
|
display: none;
|
|
@@ -48,7 +57,9 @@ export class Group extends LitElement {
|
|
|
48
57
|
];
|
|
49
58
|
|
|
50
59
|
updated(): void {
|
|
51
|
-
const children = this.querySelectorAll(
|
|
60
|
+
const children = this.querySelectorAll(
|
|
61
|
+
"sonic-input, sonic-button, sonic-select"
|
|
62
|
+
);
|
|
52
63
|
const nbChildren = children.length;
|
|
53
64
|
|
|
54
65
|
if (nbChildren > 1) {
|
|
@@ -82,7 +93,8 @@ export class Group extends LitElement {
|
|
|
82
93
|
|
|
83
94
|
hasSlotOrProps() {
|
|
84
95
|
this.hasLabel = this.label || this.slotLabelNodes?.length ? true : false;
|
|
85
|
-
this.hasDescription =
|
|
96
|
+
this.hasDescription =
|
|
97
|
+
this.description || this.slotDescriptionNodes?.length ? true : false;
|
|
86
98
|
}
|
|
87
99
|
|
|
88
100
|
render() {
|
|
@@ -91,10 +103,17 @@ export class Group extends LitElement {
|
|
|
91
103
|
};
|
|
92
104
|
|
|
93
105
|
return html`<span class="${this.hasLabel ? "form-label" : "hidden"}"
|
|
94
|
-
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
|
|
106
|
+
>${this.label ? unsafeHTML(this.label /*+ labelStarSuffix*/) : ""}<slot
|
|
107
|
+
name="label"
|
|
108
|
+
@slotchange=${this.hasSlotOrProps}
|
|
109
|
+
></slot
|
|
95
110
|
></span>
|
|
96
111
|
<slot class="main-slot" style=${styleMap(slotStyle)}></slot>
|
|
97
|
-
<slot
|
|
112
|
+
<slot
|
|
113
|
+
name="description"
|
|
114
|
+
@slotchange=${this.hasSlotOrProps}
|
|
115
|
+
class="${this.hasDescription ? "form-description" : "hidden"}"
|
|
116
|
+
>
|
|
98
117
|
${this.description ? html`${unsafeHTML(this.description)}` : ""}
|
|
99
118
|
</slot>`;
|
|
100
119
|
}
|
|
@@ -131,7 +131,7 @@ export class Theme extends LitElement {
|
|
|
131
131
|
}
|
|
132
132
|
}
|
|
133
133
|
} catch (e) {
|
|
134
|
-
console.
|
|
134
|
+
console.warn("Erreur lors de la récupération des variables CSS");
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
137
|
const style = window.getComputedStyle(this);
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/src/core/core.ts
CHANGED
|
File without changes
|
|
@@ -32,7 +32,6 @@ if (typeof __BUILD_DATE__ === "undefined") {
|
|
|
32
32
|
(window as any).__BUILD_DATE__ = "No build date";
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
// console.log("PublisherProxy.ts loaded", (import.meta as any).env?.MODE);
|
|
36
35
|
|
|
37
36
|
if (typeof __SONIC_PREFIX__ === "undefined") {
|
|
38
37
|
SONIC_PREFIX = "sonic" + Math.floor(Math.random() * 1000000);
|
|
@@ -294,9 +293,6 @@ export class PublisherProxy<T = any> {
|
|
|
294
293
|
*/
|
|
295
294
|
|
|
296
295
|
async set(newValue: T, lockInternalMutationsTransmission = false) {
|
|
297
|
-
if(Array.isArray(newValue) && newValue.indexOf(null)!=-1){
|
|
298
|
-
console.log(newValue);
|
|
299
|
-
}
|
|
300
296
|
/**
|
|
301
297
|
* On retounre tout de suite si la valeur n'a pas changé
|
|
302
298
|
*/
|
|
@@ -316,7 +312,6 @@ export class PublisherProxy<T = any> {
|
|
|
316
312
|
* On assigne la nouvelle valeur
|
|
317
313
|
*/
|
|
318
314
|
|
|
319
|
-
const prevValue = this._value_ as any;
|
|
320
315
|
this._value_ = isComplex(newValue)
|
|
321
316
|
? newValue
|
|
322
317
|
: ({ __value: newValue } as any);
|
|
@@ -498,7 +493,7 @@ export class PublisherManager {
|
|
|
498
493
|
window.requestAnimationFrame(() => {
|
|
499
494
|
resolve(false);
|
|
500
495
|
});
|
|
501
|
-
console.
|
|
496
|
+
console.warn("no publisher cache in this browser");
|
|
502
497
|
}
|
|
503
498
|
};
|
|
504
499
|
doiIt();
|
package/src/core/utils/route.ts
CHANGED
|
File without changes
|
package/src/tsconfig-model.json
CHANGED
package/src/tsconfig.json
CHANGED
|
@@ -799,6 +799,10 @@
|
|
|
799
799
|
"esModuleInterop": true,
|
|
800
800
|
"forceConsistentCasingInFileNames": true,
|
|
801
801
|
"strict": true,
|
|
802
|
+
"noUnusedLocals": true,
|
|
803
|
+
"noUnusedParameters": true,
|
|
804
|
+
"noImplicitReturns": true,
|
|
805
|
+
"noFallthroughCasesInSwitch": true,
|
|
802
806
|
"skipLibCheck": true
|
|
803
807
|
}
|
|
804
808
|
}
|