@supersoniks/concorde 3.1.3 → 3.1.4
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 +3 -1
- package/concorde-core.bundle.js +14 -7
- package/concorde-core.es.js +14 -7
- package/dist/concorde-core.bundle.js +14 -7
- package/dist/concorde-core.es.js +14 -7
- package/package.json +1 -1
- package/postcss.config.cjs +0 -0
- package/src/core/components/ui/form/css/form-control.ts +14 -7
- package/src/core/components/ui/form/select/select.ts +1 -0
- package/src/core/components/ui/modal/modal-actions.ts +9 -5
- package/src/core/components/ui/toast/toast-item.ts +44 -22
- package/src/docs/tailwind/index.ts +0 -0
- package/docs/assets/index--bDsd7qW.css +0 -1
- package/docs/assets/index-Ce3mr_lI.js +0 -4040
- package/docs/css/docs.css +0 -0
- package/docs/img/concorde-logo.svg +0 -1
- package/docs/img/concorde.png +0 -0
- package/docs/img/concorde_def.png +0 -0
- package/docs/index.html +0 -132
- package/docs/src/core/components/functional/date/date.md +0 -290
- package/docs/src/core/components/functional/fetch/fetch.md +0 -117
- package/docs/src/core/components/functional/if/if.md +0 -16
- package/docs/src/core/components/functional/list/list.md +0 -194
- package/docs/src/core/components/functional/mix/mix.md +0 -41
- package/docs/src/core/components/functional/queue/queue.md +0 -87
- package/docs/src/core/components/functional/router/router.md +0 -112
- package/docs/src/core/components/functional/sdui/default-library.json +0 -108
- package/docs/src/core/components/functional/sdui/example.json +0 -99
- package/docs/src/core/components/functional/sdui/sdui.md +0 -356
- package/docs/src/core/components/functional/states/states.md +0 -87
- package/docs/src/core/components/functional/submit/submit.md +0 -48
- package/docs/src/core/components/functional/subscriber/subscriber.md +0 -91
- package/docs/src/core/components/functional/value/value.md +0 -35
- package/docs/src/core/components/ui/alert/alert.md +0 -121
- package/docs/src/core/components/ui/badge/badge.md +0 -102
- package/docs/src/core/components/ui/button/button.md +0 -184
- package/docs/src/core/components/ui/captcha/captcha.md +0 -12
- package/docs/src/core/components/ui/card/card.md +0 -96
- package/docs/src/core/components/ui/divider/divider.md +0 -35
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -96
- package/docs/src/core/components/ui/form/fieldset/fieldset.md +0 -129
- package/docs/src/core/components/ui/form/form-actions/form-actions.md +0 -77
- package/docs/src/core/components/ui/form/form-layout/form-layout.md +0 -43
- package/docs/src/core/components/ui/form/input/input.md +0 -168
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +0 -130
- package/docs/src/core/components/ui/form/radio/radio.md +0 -86
- package/docs/src/core/components/ui/form/select/select.md +0 -99
- package/docs/src/core/components/ui/form/textarea/textarea.md +0 -66
- package/docs/src/core/components/ui/group/group.md +0 -75
- package/docs/src/core/components/ui/icon/icon.md +0 -125
- package/docs/src/core/components/ui/icon/icons.json +0 -1
- package/docs/src/core/components/ui/image/image.md +0 -107
- package/docs/src/core/components/ui/link/link.md +0 -43
- package/docs/src/core/components/ui/loader/loader.md +0 -37
- package/docs/src/core/components/ui/menu/menu.md +0 -288
- package/docs/src/core/components/ui/modal/modal.md +0 -123
- package/docs/src/core/components/ui/pop/pop.md +0 -79
- package/docs/src/core/components/ui/progress/progress.md +0 -65
- package/docs/src/core/components/ui/table/table.md +0 -467
- package/docs/src/core/components/ui/tooltip/tooltip.md +0 -37
- package/docs/src/docs/_core-concept/overview.md +0 -57
- package/docs/src/docs/_core-concept/subscriber.md +0 -76
- package/docs/src/docs/_getting-started/concorde-outside.md +0 -141
- package/docs/src/docs/_getting-started/create-a-component.md +0 -137
- package/docs/src/docs/_getting-started/pubsub.md +0 -150
- package/docs/src/docs/_getting-started/start.md +0 -37
- package/docs/src/docs/_getting-started/theming.md +0 -91
- package/docs/src/docs/search/docs-search.json +0 -3737
- package/docs/src/tag-list.json +0 -1
- package/docs/src/tsconfig.json +0 -113
- package/docs/svg/regular/plane.svg +0 -1
- package/docs/svg/solid/plane.svg +0 -1
package/build-infos.json
CHANGED
package/concorde-core.bundle.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(J){typeof define=="function"&&define.amd?define(J):J()})(function(){"use strict";var jt,k,L,Er,t,Y;let J=class Mt{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 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=Mt.getAncestorAttributeValue(t,"token"),i=Mt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Mt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Mt.getAncestorAttributeValue(t,"tokenProvider"),c=Mt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Mt.getAncestorAttributeValue(t,"userName"),n=Mt.getAncestorAttributeValue(t,"password"));const h=Mt.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 Mt.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)})}},os=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=J.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 Ne(r){return typeof r=="object"&&r!=null}const Tr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let xe="sonic";typeof __SONIC_PREFIX__>"u"&&(xe="sonic"+Math.floor(Math.random()*1e6));const Es=xe=="sonic"?"publisher-proxies-data":xe+"-publisher-proxies-data";let Ns=(jt=class{constructor(t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=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.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._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Tr(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>e(i)),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.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_()}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 o;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;const i=this._value_;if(this._value_=Ne(t)?t:{__value:t},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,l)=>{this._value_[l]===void 0&&l!="_parent_"&&i[l]&&(this._value_[l]=null)}),await this._publishAssignement_(),Ne(this._value_))for(const n in this._value_){const l=t[n],h=Ne(l)?l:{__value:l};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,l);continue}await((o=this._proxies_.get(n))==null?void 0:o.set(h,!0)),this._publishDynamicFilling_(n,l)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+xe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+xe+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),E=(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(Es),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(Es,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_"+J.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 Te(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_"+J.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Es,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="Thu May 30 2024 12:53:16 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 Ts=window;Ts.SonicPublisherManager||(Ts.SonicPublisherManager=E),Ts.SonicPublisherManager.registerInstance(E.getInstance());const jr=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Te extends Ns{constructor(t,s=null){super(t,s);const i=new Proxy(this,{get:function(e,o){if(o==Symbol.toPrimitive)return()=>i.get();if(jr.has(o))return e[o];if(!e._proxies_.has(o)){const n=e._value_[o],l=new Te(Ne(n)?n:{__value:n},e);l._proxies_.set("_parent_",i),e._proxies_.set(o,l)}return e._proxies_.get(o)},set:function(e,o,n){var c;if(o=="_value_")return e._value_=n,!0;if(o=="_cachedGet_")return e._cachedGet_=n,!0;if(o=="_assignmentId_")return e._assignmentId_=n,!0;if(o=="_is_savable_")return e._is_savable_=n,!0;if(o=="_instanceCounter_")return e._instanceCounter_=n,!0;if(!e._proxies_.has(o)){const h=new Te({},e);h._proxies_.set("_parent_",i),e._proxies_.set(o,h)}return e._value_[o]!==n&&(e._value_[o]=n,e._publishDynamicFilling_(o,n),(c=e._proxies_.get(o))==null||c.set(Ne(n)?n:{__value:n})),!0},deleteProperty:function(e,o){var n;return e._publishDynamicFilling_(o,null),(n=e._proxies_.get(o))==null||n.set(null),delete e._value_[o]},has:function(e,o){return o in e._value_&&o!="_lockInternalMutationPublishing_"},defineProperty:function(e,o,n){return n&&"value"in n&&(e._value_[o]=n.value),!0},getOwnPropertyDescriptor:function(e,o){return{enumerable:!0,configurable:!0}},ownKeys:function(e){return e._value_.__value?Object.keys(e._value_.__value):Object.keys(e._value_)}});return i}toString(){return"hey"}valueOf(){return 2}getProperty(t,s){return t[s]}}class Mr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ns.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(xe+"-publisher-proxy",Mr)}catch{}let ns=(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=J.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.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,b={publisher:f,onAssign:()=>{const _=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let C=l.expression,O=!1;if(_.length==1&&l.variables[0].join(".")==C.substring(1)){let D=_[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<_.length;D++){let p=_[D];const u=l.variables[D];p===null&&(O=!0,p=void 0),C=C.replace("$"+u.join("."),p)}if(C.indexOf("|")!=-1){const D=C.indexOf("|");if(D==0)C=os.js(C.substring(1));else{const p=C.substring(0,D),u=C.substring(D+1),y=os[p];C=O?"":y?y(u):C}}else C=O?"":C;m[c]=C}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ns.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ns);let X=class te{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=te.isObject(l)&&te.isObject(c),d=i?l!==c:l!=c;if(h&&!te.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 te.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&&te.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),te.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return te.getURLSearchArray(t,"").join("&")}};/**
|
|
1
|
+
(function(J){typeof define=="function"&&define.amd?define(J):J()})(function(){"use strict";var jt,k,L,Er,t,Y;let J=class Mt{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 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=Mt.getAncestorAttributeValue(t,"token"),i=Mt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Mt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Mt.getAncestorAttributeValue(t,"tokenProvider"),c=Mt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Mt.getAncestorAttributeValue(t,"userName"),n=Mt.getAncestorAttributeValue(t,"password"));const h=Mt.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 Mt.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)})}},os=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=J.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 Ne(r){return typeof r=="object"&&r!=null}const Tr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let xe="sonic";typeof __SONIC_PREFIX__>"u"&&(xe="sonic"+Math.floor(Math.random()*1e6));const Es=xe=="sonic"?"publisher-proxies-data":xe+"-publisher-proxies-data";let Ns=(jt=class{constructor(t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=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.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._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Tr(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>e(i)),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.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_()}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 o;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;const i=this._value_;if(this._value_=Ne(t)?t:{__value:t},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,l)=>{this._value_[l]===void 0&&l!="_parent_"&&i[l]&&(this._value_[l]=null)}),await this._publishAssignement_(),Ne(this._value_))for(const n in this._value_){const l=t[n],h=Ne(l)?l:{__value:l};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,l);continue}await((o=this._proxies_.get(n))==null?void 0:o.set(h,!0)),this._publishDynamicFilling_(n,l)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+xe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+xe+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),E=(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(Es),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(Es,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_"+J.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 Te(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_"+J.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Es,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 Jun 14 2024 14:16:16 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 Ts=window;Ts.SonicPublisherManager||(Ts.SonicPublisherManager=E),Ts.SonicPublisherManager.registerInstance(E.getInstance());const jr=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Te extends Ns{constructor(t,s=null){super(t,s);const i=new Proxy(this,{get:function(e,o){if(o==Symbol.toPrimitive)return()=>i.get();if(jr.has(o))return e[o];if(!e._proxies_.has(o)){const n=e._value_[o],l=new Te(Ne(n)?n:{__value:n},e);l._proxies_.set("_parent_",i),e._proxies_.set(o,l)}return e._proxies_.get(o)},set:function(e,o,n){var c;if(o=="_value_")return e._value_=n,!0;if(o=="_cachedGet_")return e._cachedGet_=n,!0;if(o=="_assignmentId_")return e._assignmentId_=n,!0;if(o=="_is_savable_")return e._is_savable_=n,!0;if(o=="_instanceCounter_")return e._instanceCounter_=n,!0;if(!e._proxies_.has(o)){const h=new Te({},e);h._proxies_.set("_parent_",i),e._proxies_.set(o,h)}return e._value_[o]!==n&&(e._value_[o]=n,e._publishDynamicFilling_(o,n),(c=e._proxies_.get(o))==null||c.set(Ne(n)?n:{__value:n})),!0},deleteProperty:function(e,o){var n;return e._publishDynamicFilling_(o,null),(n=e._proxies_.get(o))==null||n.set(null),delete e._value_[o]},has:function(e,o){return o in e._value_&&o!="_lockInternalMutationPublishing_"},defineProperty:function(e,o,n){return n&&"value"in n&&(e._value_[o]=n.value),!0},getOwnPropertyDescriptor:function(e,o){return{enumerable:!0,configurable:!0}},ownKeys:function(e){return e._value_.__value?Object.keys(e._value_.__value):Object.keys(e._value_)}});return i}toString(){return"hey"}valueOf(){return 2}getProperty(t,s){return t[s]}}class Mr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ns.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(xe+"-publisher-proxy",Mr)}catch{}let ns=(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=J.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.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,b={publisher:f,onAssign:()=>{const _=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let C=l.expression,O=!1;if(_.length==1&&l.variables[0].join(".")==C.substring(1)){let D=_[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<_.length;D++){let p=_[D];const u=l.variables[D];p===null&&(O=!0,p=void 0),C=C.replace("$"+u.join("."),p)}if(C.indexOf("|")!=-1){const D=C.indexOf("|");if(D==0)C=os.js(C.substring(1));else{const p=C.substring(0,D),u=C.substring(D+1),y=os[p];C=O?"":y?y(u):C}}else C=O?"":C;m[c]=C}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ns.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ns);let X=class te{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=te.isObject(l)&&te.isObject(c),d=i?l!==c:l!=c;if(h&&!te.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 te.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&&te.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),te.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return te.getURLSearchArray(t,"").join("&")}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1520,11 +1520,13 @@
|
|
|
1520
1520
|
|
|
1521
1521
|
line-height: 1.1;
|
|
1522
1522
|
color: var(--sc-input-c);
|
|
1523
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1523
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1524
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
1524
1525
|
|
|
1525
1526
|
font-family: var(--sc-input-ff);
|
|
1526
1527
|
background-color: var(--sc-input-background);
|
|
1527
|
-
border: var(--sc-input-b-width) solid
|
|
1528
|
+
border: var(--sc-input-b-width) solid
|
|
1529
|
+
var(--sc-input-b-color, var(--sc-base-300, #aaa));
|
|
1528
1530
|
width: 100%;
|
|
1529
1531
|
font-size: var(--sc-input-fs);
|
|
1530
1532
|
|
|
@@ -1533,9 +1535,7 @@
|
|
|
1533
1535
|
padding-left: var(--sc-input-px);
|
|
1534
1536
|
padding-right: var(--sc-input-px);
|
|
1535
1537
|
|
|
1536
|
-
transition:
|
|
1537
|
-
border-color 0.15s ease-in-out,
|
|
1538
|
-
color 0.15s ease-in-out,
|
|
1538
|
+
transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out,
|
|
1539
1539
|
box-shadow 0.15s ease-in-out;
|
|
1540
1540
|
min-height: var(--sc-input-height);
|
|
1541
1541
|
}
|
|
@@ -1752,7 +1752,8 @@
|
|
|
1752
1752
|
}
|
|
1753
1753
|
input[type="color"]::-webkit-color-swatch {
|
|
1754
1754
|
border: none;
|
|
1755
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1755
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1756
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
1756
1757
|
}
|
|
1757
1758
|
|
|
1758
1759
|
/*Input Image*/
|
|
@@ -1829,6 +1830,12 @@
|
|
|
1829
1830
|
--sc-input-addon-bg: var(--sc-info);
|
|
1830
1831
|
--sc-input-addon-color: var(--sc-info-content);
|
|
1831
1832
|
}
|
|
1833
|
+
:host([status="primary"]) {
|
|
1834
|
+
--sc-input-b-color: var(--sc-primary);
|
|
1835
|
+
--sc-input-c: var(--sc-primary);
|
|
1836
|
+
--sc-input-addon-bg: var(--sc-primary);
|
|
1837
|
+
--sc-input-addon-color: var(--sc-primary-content);
|
|
1838
|
+
}
|
|
1832
1839
|
`;/**
|
|
1833
1840
|
* @license
|
|
1834
1841
|
* Copyright 2018 Google LLC
|
package/concorde-core.es.js
CHANGED
|
@@ -463,7 +463,7 @@ let N = (k = class {
|
|
|
463
463
|
const h = await new Response(l.readable).arrayBuffer();
|
|
464
464
|
return new TextDecoder().decode(h);
|
|
465
465
|
}
|
|
466
|
-
}, k.buildDate = "
|
|
466
|
+
}, k.buildDate = "Fri Jun 14 2024 14:16:16 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);
|
|
467
467
|
const Us = window;
|
|
468
468
|
Us.SonicPublisherManager || (Us.SonicPublisherManager = N);
|
|
469
469
|
Us.SonicPublisherManager.registerInstance(
|
|
@@ -7204,11 +7204,13 @@ const Xa = P`
|
|
|
7204
7204
|
|
|
7205
7205
|
line-height: 1.1;
|
|
7206
7206
|
color: var(--sc-input-c);
|
|
7207
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7207
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7208
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
7208
7209
|
|
|
7209
7210
|
font-family: var(--sc-input-ff);
|
|
7210
7211
|
background-color: var(--sc-input-background);
|
|
7211
|
-
border: var(--sc-input-b-width) solid
|
|
7212
|
+
border: var(--sc-input-b-width) solid
|
|
7213
|
+
var(--sc-input-b-color, var(--sc-base-300, #aaa));
|
|
7212
7214
|
width: 100%;
|
|
7213
7215
|
font-size: var(--sc-input-fs);
|
|
7214
7216
|
|
|
@@ -7217,9 +7219,7 @@ const Xa = P`
|
|
|
7217
7219
|
padding-left: var(--sc-input-px);
|
|
7218
7220
|
padding-right: var(--sc-input-px);
|
|
7219
7221
|
|
|
7220
|
-
transition:
|
|
7221
|
-
border-color 0.15s ease-in-out,
|
|
7222
|
-
color 0.15s ease-in-out,
|
|
7222
|
+
transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out,
|
|
7223
7223
|
box-shadow 0.15s ease-in-out;
|
|
7224
7224
|
min-height: var(--sc-input-height);
|
|
7225
7225
|
}
|
|
@@ -7436,7 +7436,8 @@ const Xa = P`
|
|
|
7436
7436
|
}
|
|
7437
7437
|
input[type="color"]::-webkit-color-swatch {
|
|
7438
7438
|
border: none;
|
|
7439
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7439
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7440
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
7440
7441
|
}
|
|
7441
7442
|
|
|
7442
7443
|
/*Input Image*/
|
|
@@ -7513,6 +7514,12 @@ const Xa = P`
|
|
|
7513
7514
|
--sc-input-addon-bg: var(--sc-info);
|
|
7514
7515
|
--sc-input-addon-color: var(--sc-info-content);
|
|
7515
7516
|
}
|
|
7517
|
+
:host([status="primary"]) {
|
|
7518
|
+
--sc-input-b-color: var(--sc-primary);
|
|
7519
|
+
--sc-input-c: var(--sc-primary);
|
|
7520
|
+
--sc-input-addon-bg: var(--sc-primary);
|
|
7521
|
+
--sc-input-addon-color: var(--sc-primary-content);
|
|
7522
|
+
}
|
|
7516
7523
|
`;
|
|
7517
7524
|
/**
|
|
7518
7525
|
* @license
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(J){typeof define=="function"&&define.amd?define(J):J()})(function(){"use strict";var jt,k,L,Er,t,Y;let J=class Mt{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 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=Mt.getAncestorAttributeValue(t,"token"),i=Mt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Mt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Mt.getAncestorAttributeValue(t,"tokenProvider"),c=Mt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Mt.getAncestorAttributeValue(t,"userName"),n=Mt.getAncestorAttributeValue(t,"password"));const h=Mt.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 Mt.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)})}},os=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=J.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 Ne(r){return typeof r=="object"&&r!=null}const Tr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let xe="sonic";typeof __SONIC_PREFIX__>"u"&&(xe="sonic"+Math.floor(Math.random()*1e6));const Es=xe=="sonic"?"publisher-proxies-data":xe+"-publisher-proxies-data";let Ns=(jt=class{constructor(t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=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.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._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Tr(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>e(i)),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.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_()}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 o;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;const i=this._value_;if(this._value_=Ne(t)?t:{__value:t},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,l)=>{this._value_[l]===void 0&&l!="_parent_"&&i[l]&&(this._value_[l]=null)}),await this._publishAssignement_(),Ne(this._value_))for(const n in this._value_){const l=t[n],h=Ne(l)?l:{__value:l};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,l);continue}await((o=this._proxies_.get(n))==null?void 0:o.set(h,!0)),this._publishDynamicFilling_(n,l)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+xe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+xe+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),E=(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(Es),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(Es,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_"+J.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 Te(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_"+J.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Es,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="Thu May 30 2024 12:53:16 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 Ts=window;Ts.SonicPublisherManager||(Ts.SonicPublisherManager=E),Ts.SonicPublisherManager.registerInstance(E.getInstance());const jr=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Te extends Ns{constructor(t,s=null){super(t,s);const i=new Proxy(this,{get:function(e,o){if(o==Symbol.toPrimitive)return()=>i.get();if(jr.has(o))return e[o];if(!e._proxies_.has(o)){const n=e._value_[o],l=new Te(Ne(n)?n:{__value:n},e);l._proxies_.set("_parent_",i),e._proxies_.set(o,l)}return e._proxies_.get(o)},set:function(e,o,n){var c;if(o=="_value_")return e._value_=n,!0;if(o=="_cachedGet_")return e._cachedGet_=n,!0;if(o=="_assignmentId_")return e._assignmentId_=n,!0;if(o=="_is_savable_")return e._is_savable_=n,!0;if(o=="_instanceCounter_")return e._instanceCounter_=n,!0;if(!e._proxies_.has(o)){const h=new Te({},e);h._proxies_.set("_parent_",i),e._proxies_.set(o,h)}return e._value_[o]!==n&&(e._value_[o]=n,e._publishDynamicFilling_(o,n),(c=e._proxies_.get(o))==null||c.set(Ne(n)?n:{__value:n})),!0},deleteProperty:function(e,o){var n;return e._publishDynamicFilling_(o,null),(n=e._proxies_.get(o))==null||n.set(null),delete e._value_[o]},has:function(e,o){return o in e._value_&&o!="_lockInternalMutationPublishing_"},defineProperty:function(e,o,n){return n&&"value"in n&&(e._value_[o]=n.value),!0},getOwnPropertyDescriptor:function(e,o){return{enumerable:!0,configurable:!0}},ownKeys:function(e){return e._value_.__value?Object.keys(e._value_.__value):Object.keys(e._value_)}});return i}toString(){return"hey"}valueOf(){return 2}getProperty(t,s){return t[s]}}class Mr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ns.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(xe+"-publisher-proxy",Mr)}catch{}let ns=(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=J.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.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,b={publisher:f,onAssign:()=>{const _=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let C=l.expression,O=!1;if(_.length==1&&l.variables[0].join(".")==C.substring(1)){let D=_[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<_.length;D++){let p=_[D];const u=l.variables[D];p===null&&(O=!0,p=void 0),C=C.replace("$"+u.join("."),p)}if(C.indexOf("|")!=-1){const D=C.indexOf("|");if(D==0)C=os.js(C.substring(1));else{const p=C.substring(0,D),u=C.substring(D+1),y=os[p];C=O?"":y?y(u):C}}else C=O?"":C;m[c]=C}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ns.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ns);let X=class te{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=te.isObject(l)&&te.isObject(c),d=i?l!==c:l!=c;if(h&&!te.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 te.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&&te.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),te.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return te.getURLSearchArray(t,"").join("&")}};/**
|
|
1
|
+
(function(J){typeof define=="function"&&define.amd?define(J):J()})(function(){"use strict";var jt,k,L,Er,t,Y;let J=class Mt{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 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=Mt.getAncestorAttributeValue(t,"token"),i=Mt.getAncestorAttributeValue(t,"addHTTPResponse")!=null,e=Mt.getAncestorAttributeValue(t,"serviceURL");let o=null,n=null;const l=Mt.getAncestorAttributeValue(t,"tokenProvider"),c=Mt.getAncestorAttributeValue(t,"eventsApiToken");s||(o=Mt.getAncestorAttributeValue(t,"userName"),n=Mt.getAncestorAttributeValue(t,"password"));const h=Mt.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 Mt.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)})}},os=class{static ucFirst(t){return typeof t!="string"?t:t.charAt(0).toUpperCase()+t.substring(1)}static minutesDuration(t,s="",i="long"){s||(s=J.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 Ne(r){return typeof r=="object"&&r!=null}const Tr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let xe="sonic";typeof __SONIC_PREFIX__>"u"&&(xe="sonic"+Math.floor(Math.random()*1e6));const Es=xe=="sonic"?"publisher-proxies-data":xe+"-publisher-proxies-data";let Ns=(jt=class{constructor(t,s){for(this._proxies_=new Map,this._is_savable_=!1,this._invalidateListeners_=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.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._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),jt.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(t=!1){if(this._mutationListeners_.forEach(s=>s()),this._is_savable_&&!E.changed){E.changed=!0,E.saveId++;const s=E.saveId;setTimeout(()=>E.getInstance().saveToLocalStorage(s),1e3)}t||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(t=!1){this._assignmentId_++;const s=this._assignmentId_;if(await Tr(),s!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(e=>e(i)),this._publishInternalMutation_(t)}_publishInvalidation_(){this._invalidateListeners_.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_()}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 o;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;const i=this._value_;if(this._value_=Ne(t)?t:{__value:t},this._cachedGet_=void 0,Object.prototype.hasOwnProperty.call(this._value_,"__value"))return await this._publishAssignement_(s),!0;for(const n in this._value_)this._value_[n]===void 0&&delete this._value_[n];if(this._proxies_.forEach((n,l)=>{this._value_[l]===void 0&&l!="_parent_"&&i[l]&&(this._value_[l]=null)}),await this._publishAssignement_(),Ne(this._value_))for(const n in this._value_){const l=t[n],h=Ne(l)?l:{__value:l};if(!this._proxies_.has(n)){this._publishDynamicFilling_(n,l);continue}await((o=this._proxies_.get(n))==null?void 0:o.set(h,!0)),this._publishDynamicFilling_(n,l)}return!0}get(){if(this._cachedGet_!==void 0)return this._cachedGet_;if(E.modifiedCollectore.length>0&&E.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_||(jt.instancesCounter++,this._instanceCounter_=jt.instancesCounter),jt.instances.set(this._instanceCounter_,this),"<"+xe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+xe+"-publisher-proxy>"}},jt.instances=new Map,jt.instancesCounter=0,jt),E=(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(Es),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(Es,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_"+J.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 Te(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_"+J.getLanguage()]={lastModifiationMS:new Date().getTime(),data:n},i=!0)}if(i){const e=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Es,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 Jun 14 2024 14:16:16 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 Ts=window;Ts.SonicPublisherManager||(Ts.SonicPublisherManager=E),Ts.SonicPublisherManager.registerInstance(E.getInstance());const jr=new Set(["invalidate","onInvalidate","offInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_value_","_is_savable_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_"]);class Te extends Ns{constructor(t,s=null){super(t,s);const i=new Proxy(this,{get:function(e,o){if(o==Symbol.toPrimitive)return()=>i.get();if(jr.has(o))return e[o];if(!e._proxies_.has(o)){const n=e._value_[o],l=new Te(Ne(n)?n:{__value:n},e);l._proxies_.set("_parent_",i),e._proxies_.set(o,l)}return e._proxies_.get(o)},set:function(e,o,n){var c;if(o=="_value_")return e._value_=n,!0;if(o=="_cachedGet_")return e._cachedGet_=n,!0;if(o=="_assignmentId_")return e._assignmentId_=n,!0;if(o=="_is_savable_")return e._is_savable_=n,!0;if(o=="_instanceCounter_")return e._instanceCounter_=n,!0;if(!e._proxies_.has(o)){const h=new Te({},e);h._proxies_.set("_parent_",i),e._proxies_.set(o,h)}return e._value_[o]!==n&&(e._value_[o]=n,e._publishDynamicFilling_(o,n),(c=e._proxies_.get(o))==null||c.set(Ne(n)?n:{__value:n})),!0},deleteProperty:function(e,o){var n;return e._publishDynamicFilling_(o,null),(n=e._proxies_.get(o))==null||n.set(null),delete e._value_[o]},has:function(e,o){return o in e._value_&&o!="_lockInternalMutationPublishing_"},defineProperty:function(e,o,n){return n&&"value"in n&&(e._value_[o]=n.value),!0},getOwnPropertyDescriptor:function(e,o){return{enumerable:!0,configurable:!0}},ownKeys:function(e){return e._value_.__value?Object.keys(e._value_.__value):Object.keys(e._value_)}});return i}toString(){return"hey"}valueOf(){return 2}getProperty(t,s){return t[s]}}class Mr extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=t=>{this.innerHTML=t.toString()}}connectedCallback(){var t;this.publisherId=this.getAttribute("publisher")||"",this.publisher=Ns.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(xe+"-publisher-proxy",Mr)}catch{}let ns=(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=J.getAncestorAttributeValue(t.parentNode||t.host||t,"dataProvider");if(!s)return;const i=E.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,b={publisher:f,onAssign:()=>{const _=l.variables.map(D=>{var p;return(p=L.getSubPublisher(i,D))==null?void 0:p.get()});let C=l.expression,O=!1;if(_.length==1&&l.variables[0].join(".")==C.substring(1)){let D=_[0];D===null&&(D=""),m[c]=D;return}for(let D=0;D<_.length;D++){let p=_[D];const u=l.variables[D];p===null&&(O=!0,p=void 0),C=C.replace("$"+u.join("."),p)}if(C.indexOf("|")!=-1){const D=C.indexOf("|");if(D==0)C=os.js(C.substring(1));else{const p=C.substring(0,D),u=C.substring(D+1),y=os[p];C=O?"":y?y(u):C}}else C=O?"":C;m[c]=C}};f==null||f.onAssign(b.onAssign),o.push(b)}}),L.publisherListeners.set(t,o)}},L.observedElements=new Map,L.enabled=!0,L.publisherListeners=new Map,L);ns.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=ns);let X=class te{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=te.isObject(l)&&te.isObject(c),d=i?l!==c:l!=c;if(h&&!te.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 te.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&&te.isObject(o)?t=Object.assign(Array.isArray(o)?[]:{},t,o):t=t[e]}return t}static getURLSearchArray(t,s=""){let i=[];for(let e in t){const o=t[e];s&&(e=s+"["+e+"]"),te.isObject(o)?i=[...i,...this.getURLSearchArray(o,e)]:i.push(`${e}=${o}`)}return i}static getURLSearchString(t){return te.getURLSearchArray(t,"").join("&")}};/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -1520,11 +1520,13 @@
|
|
|
1520
1520
|
|
|
1521
1521
|
line-height: 1.1;
|
|
1522
1522
|
color: var(--sc-input-c);
|
|
1523
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1523
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1524
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
1524
1525
|
|
|
1525
1526
|
font-family: var(--sc-input-ff);
|
|
1526
1527
|
background-color: var(--sc-input-background);
|
|
1527
|
-
border: var(--sc-input-b-width) solid
|
|
1528
|
+
border: var(--sc-input-b-width) solid
|
|
1529
|
+
var(--sc-input-b-color, var(--sc-base-300, #aaa));
|
|
1528
1530
|
width: 100%;
|
|
1529
1531
|
font-size: var(--sc-input-fs);
|
|
1530
1532
|
|
|
@@ -1533,9 +1535,7 @@
|
|
|
1533
1535
|
padding-left: var(--sc-input-px);
|
|
1534
1536
|
padding-right: var(--sc-input-px);
|
|
1535
1537
|
|
|
1536
|
-
transition:
|
|
1537
|
-
border-color 0.15s ease-in-out,
|
|
1538
|
-
color 0.15s ease-in-out,
|
|
1538
|
+
transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out,
|
|
1539
1539
|
box-shadow 0.15s ease-in-out;
|
|
1540
1540
|
min-height: var(--sc-input-height);
|
|
1541
1541
|
}
|
|
@@ -1752,7 +1752,8 @@
|
|
|
1752
1752
|
}
|
|
1753
1753
|
input[type="color"]::-webkit-color-swatch {
|
|
1754
1754
|
border: none;
|
|
1755
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1755
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
1756
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
1756
1757
|
}
|
|
1757
1758
|
|
|
1758
1759
|
/*Input Image*/
|
|
@@ -1829,6 +1830,12 @@
|
|
|
1829
1830
|
--sc-input-addon-bg: var(--sc-info);
|
|
1830
1831
|
--sc-input-addon-color: var(--sc-info-content);
|
|
1831
1832
|
}
|
|
1833
|
+
:host([status="primary"]) {
|
|
1834
|
+
--sc-input-b-color: var(--sc-primary);
|
|
1835
|
+
--sc-input-c: var(--sc-primary);
|
|
1836
|
+
--sc-input-addon-bg: var(--sc-primary);
|
|
1837
|
+
--sc-input-addon-color: var(--sc-primary-content);
|
|
1838
|
+
}
|
|
1832
1839
|
`;/**
|
|
1833
1840
|
* @license
|
|
1834
1841
|
* Copyright 2018 Google LLC
|
package/dist/concorde-core.es.js
CHANGED
|
@@ -463,7 +463,7 @@ let N = (k = class {
|
|
|
463
463
|
const h = await new Response(l.readable).arrayBuffer();
|
|
464
464
|
return new TextDecoder().decode(h);
|
|
465
465
|
}
|
|
466
|
-
}, k.buildDate = "
|
|
466
|
+
}, k.buildDate = "Fri Jun 14 2024 14:16:16 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);
|
|
467
467
|
const Us = window;
|
|
468
468
|
Us.SonicPublisherManager || (Us.SonicPublisherManager = N);
|
|
469
469
|
Us.SonicPublisherManager.registerInstance(
|
|
@@ -7204,11 +7204,13 @@ const Xa = P`
|
|
|
7204
7204
|
|
|
7205
7205
|
line-height: 1.1;
|
|
7206
7206
|
color: var(--sc-input-c);
|
|
7207
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7207
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7208
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
7208
7209
|
|
|
7209
7210
|
font-family: var(--sc-input-ff);
|
|
7210
7211
|
background-color: var(--sc-input-background);
|
|
7211
|
-
border: var(--sc-input-b-width) solid
|
|
7212
|
+
border: var(--sc-input-b-width) solid
|
|
7213
|
+
var(--sc-input-b-color, var(--sc-base-300, #aaa));
|
|
7212
7214
|
width: 100%;
|
|
7213
7215
|
font-size: var(--sc-input-fs);
|
|
7214
7216
|
|
|
@@ -7217,9 +7219,7 @@ const Xa = P`
|
|
|
7217
7219
|
padding-left: var(--sc-input-px);
|
|
7218
7220
|
padding-right: var(--sc-input-px);
|
|
7219
7221
|
|
|
7220
|
-
transition:
|
|
7221
|
-
border-color 0.15s ease-in-out,
|
|
7222
|
-
color 0.15s ease-in-out,
|
|
7222
|
+
transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out,
|
|
7223
7223
|
box-shadow 0.15s ease-in-out;
|
|
7224
7224
|
min-height: var(--sc-input-height);
|
|
7225
7225
|
}
|
|
@@ -7436,7 +7436,8 @@ const Xa = P`
|
|
|
7436
7436
|
}
|
|
7437
7437
|
input[type="color"]::-webkit-color-swatch {
|
|
7438
7438
|
border: none;
|
|
7439
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7439
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
7440
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
7440
7441
|
}
|
|
7441
7442
|
|
|
7442
7443
|
/*Input Image*/
|
|
@@ -7513,6 +7514,12 @@ const Xa = P`
|
|
|
7513
7514
|
--sc-input-addon-bg: var(--sc-info);
|
|
7514
7515
|
--sc-input-addon-color: var(--sc-info-content);
|
|
7515
7516
|
}
|
|
7517
|
+
:host([status="primary"]) {
|
|
7518
|
+
--sc-input-b-color: var(--sc-primary);
|
|
7519
|
+
--sc-input-c: var(--sc-primary);
|
|
7520
|
+
--sc-input-addon-bg: var(--sc-primary);
|
|
7521
|
+
--sc-input-addon-color: var(--sc-primary-content);
|
|
7522
|
+
}
|
|
7516
7523
|
`;
|
|
7517
7524
|
/**
|
|
7518
7525
|
* @license
|
package/package.json
CHANGED
package/postcss.config.cjs
CHANGED
|
File without changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {css} from "lit";
|
|
1
|
+
import { css } from "lit";
|
|
2
2
|
|
|
3
3
|
export const passwordToggle = css`
|
|
4
4
|
.password-toggle {
|
|
@@ -71,11 +71,13 @@ export const formControl = css`
|
|
|
71
71
|
|
|
72
72
|
line-height: 1.1;
|
|
73
73
|
color: var(--sc-input-c);
|
|
74
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
74
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
75
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
75
76
|
|
|
76
77
|
font-family: var(--sc-input-ff);
|
|
77
78
|
background-color: var(--sc-input-background);
|
|
78
|
-
border: var(--sc-input-b-width) solid
|
|
79
|
+
border: var(--sc-input-b-width) solid
|
|
80
|
+
var(--sc-input-b-color, var(--sc-base-300, #aaa));
|
|
79
81
|
width: 100%;
|
|
80
82
|
font-size: var(--sc-input-fs);
|
|
81
83
|
|
|
@@ -84,9 +86,7 @@ export const formControl = css`
|
|
|
84
86
|
padding-left: var(--sc-input-px);
|
|
85
87
|
padding-right: var(--sc-input-px);
|
|
86
88
|
|
|
87
|
-
transition:
|
|
88
|
-
border-color 0.15s ease-in-out,
|
|
89
|
-
color 0.15s ease-in-out,
|
|
89
|
+
transition: border-color 0.15s ease-in-out, color 0.15s ease-in-out,
|
|
90
90
|
box-shadow 0.15s ease-in-out;
|
|
91
91
|
min-height: var(--sc-input-height);
|
|
92
92
|
}
|
|
@@ -303,7 +303,8 @@ export const formControl = css`
|
|
|
303
303
|
}
|
|
304
304
|
input[type="color"]::-webkit-color-swatch {
|
|
305
305
|
border: none;
|
|
306
|
-
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
306
|
+
border-radius: var(--sc-item-rounded-tl) var(--sc-item-rounded-tr)
|
|
307
|
+
var(--sc-item-rounded-br) var(--sc-item-rounded-bl);
|
|
307
308
|
}
|
|
308
309
|
|
|
309
310
|
/*Input Image*/
|
|
@@ -380,4 +381,10 @@ export const formControl = css`
|
|
|
380
381
|
--sc-input-addon-bg: var(--sc-info);
|
|
381
382
|
--sc-input-addon-color: var(--sc-info-content);
|
|
382
383
|
}
|
|
384
|
+
:host([status="primary"]) {
|
|
385
|
+
--sc-input-b-color: var(--sc-primary);
|
|
386
|
+
--sc-input-c: var(--sc-primary);
|
|
387
|
+
--sc-input-addon-bg: var(--sc-primary);
|
|
388
|
+
--sc-input-addon-color: var(--sc-primary-content);
|
|
389
|
+
}
|
|
383
390
|
`;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import {html, LitElement, css} from "lit";
|
|
2
|
-
import {customElement, queryAssignedElements} from "lit/decorators.js";
|
|
3
|
-
import {Modal} from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
1
|
+
import { html, LitElement, css } from "lit";
|
|
2
|
+
import { customElement, queryAssignedElements } from "lit/decorators.js";
|
|
3
|
+
import { Modal } from "@supersoniks/concorde/core/components/ui/modal/modal";
|
|
4
|
+
import { HTML } from "@supersoniks/concorde/utils";
|
|
4
5
|
const tagName = "sonic-modal-actions";
|
|
5
6
|
@customElement(tagName)
|
|
6
7
|
export class ModalActions extends LitElement {
|
|
@@ -15,14 +16,17 @@ export class ModalActions extends LitElement {
|
|
|
15
16
|
`,
|
|
16
17
|
];
|
|
17
18
|
|
|
18
|
-
@queryAssignedElements({selector: "sonic-button"})
|
|
19
|
+
@queryAssignedElements({ selector: "sonic-button" })
|
|
19
20
|
buttons!: Array<HTMLElement>;
|
|
20
21
|
|
|
21
22
|
firstUpdated(changedProperties: Map<string | number | symbol, unknown>) {
|
|
22
23
|
this.buttons?.forEach((btn) => {
|
|
23
24
|
btn.addEventListener("click", () => {
|
|
24
25
|
if (btn.getAttribute("hideModal") != "false") {
|
|
25
|
-
const parentModal =
|
|
26
|
+
const parentModal = HTML.getClosestElement(
|
|
27
|
+
this,
|
|
28
|
+
"sonic-modal"
|
|
29
|
+
) as Modal;
|
|
26
30
|
parentModal?.hide();
|
|
27
31
|
}
|
|
28
32
|
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {html, LitElement, css, nothing} from "lit";
|
|
2
|
-
import {customElement, property, state} from "lit/decorators.js";
|
|
3
|
-
import {unsafeHTML} from "lit/directives/unsafe-html.js";
|
|
1
|
+
import { html, LitElement, css, nothing } from "lit";
|
|
2
|
+
import { customElement, property, state } from "lit/decorators.js";
|
|
3
|
+
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
4
4
|
import "@supersoniks/concorde/core/components/ui/toast/types";
|
|
5
|
-
import {ToastStatus} from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
6
|
-
import {customScroll} from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
5
|
+
import { ToastStatus } from "@supersoniks/concorde/core/components/ui/toast/types";
|
|
6
|
+
import { customScroll } from "@supersoniks/concorde/core/components/ui/_css/scroll";
|
|
7
|
+
import { HTML } from "@supersoniks/concorde/utils";
|
|
7
8
|
|
|
8
9
|
const icon: Record<string, string> = {
|
|
9
10
|
warning: "warning-circled-outline",
|
|
@@ -86,7 +87,8 @@ export class SonicToastItem extends LitElement {
|
|
|
86
87
|
}
|
|
87
88
|
|
|
88
89
|
::slotted(:is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child),
|
|
89
|
-
.sonic-toast-text
|
|
90
|
+
.sonic-toast-text
|
|
91
|
+
> :is(p, ul, ol, hr, h1, h2, h3, h4, h5, h6):last-child {
|
|
90
92
|
margin-bottom: 0 !important;
|
|
91
93
|
}
|
|
92
94
|
|
|
@@ -197,14 +199,14 @@ export class SonicToastItem extends LitElement {
|
|
|
197
199
|
`,
|
|
198
200
|
];
|
|
199
201
|
|
|
200
|
-
@property({type: String}) title = "";
|
|
201
|
-
@property({type: String}) id = "";
|
|
202
|
-
@property({type: String}) text = "";
|
|
203
|
-
@property({type: String}) status: ToastStatus = "";
|
|
204
|
-
@property({type: Boolean}) ghost = false;
|
|
205
|
-
@property({type: Boolean}) preserve = false;
|
|
206
|
-
@property({type: Boolean}) dismissForever = false;
|
|
207
|
-
@property({type: String}) maxHeight = "10rem";
|
|
202
|
+
@property({ type: String }) title = "";
|
|
203
|
+
@property({ type: String }) id = "";
|
|
204
|
+
@property({ type: String }) text = "";
|
|
205
|
+
@property({ type: String }) status: ToastStatus = "";
|
|
206
|
+
@property({ type: Boolean }) ghost = false;
|
|
207
|
+
@property({ type: Boolean }) preserve = false;
|
|
208
|
+
@property({ type: Boolean }) dismissForever = false;
|
|
209
|
+
@property({ type: String }) maxHeight = "10rem";
|
|
208
210
|
@state() visible = true;
|
|
209
211
|
|
|
210
212
|
// @queryAssignedElements({flatten: true, slot: main"})
|
|
@@ -224,15 +226,32 @@ export class SonicToastItem extends LitElement {
|
|
|
224
226
|
return nothing;
|
|
225
227
|
}
|
|
226
228
|
|
|
227
|
-
return html`<div
|
|
228
|
-
|
|
229
|
+
return html`<div
|
|
230
|
+
class="sonic-toast ${this.status} ${this.ghost ? "ghost" : ""}"
|
|
231
|
+
>
|
|
232
|
+
<button
|
|
233
|
+
aria-label="Close"
|
|
234
|
+
class="sonic-toast-close"
|
|
235
|
+
@click=${() => this.hide()}
|
|
236
|
+
>
|
|
229
237
|
<sonic-icon name="cancel" size="lg"></sonic-icon>
|
|
230
238
|
</button>
|
|
231
|
-
<div
|
|
232
|
-
|
|
239
|
+
<div
|
|
240
|
+
class="sonic-toast-content custom-scroll"
|
|
241
|
+
style="max-height: ${this.maxHeight} ;"
|
|
242
|
+
>
|
|
243
|
+
${this.status &&
|
|
244
|
+
html`<sonic-icon
|
|
245
|
+
name=${icon[this.status]}
|
|
246
|
+
class="sonic-toast-icon"
|
|
247
|
+
size="2xl"
|
|
248
|
+
></sonic-icon>`}
|
|
233
249
|
|
|
234
250
|
<div class="sonic-toast-text">
|
|
235
|
-
${this.title
|
|
251
|
+
${this.title
|
|
252
|
+
? html`<div class="sonic-toast-title">${this.title}</div>`
|
|
253
|
+
: ""}
|
|
254
|
+
${this.text ? unsafeHTML(this.text) : ""}
|
|
236
255
|
<slot></slot>
|
|
237
256
|
</div>
|
|
238
257
|
|
|
@@ -242,7 +261,7 @@ export class SonicToastItem extends LitElement {
|
|
|
242
261
|
}
|
|
243
262
|
|
|
244
263
|
hide() {
|
|
245
|
-
if (!
|
|
264
|
+
if (!HTML.getClosestElement(this, "sonic-toast")) {
|
|
246
265
|
this.visible = false;
|
|
247
266
|
}
|
|
248
267
|
|
|
@@ -251,9 +270,12 @@ export class SonicToastItem extends LitElement {
|
|
|
251
270
|
const dismissed = localStorage.getItem("sonic-toast-dismissed") || "{}";
|
|
252
271
|
const dismissedObj = JSON.parse(dismissed);
|
|
253
272
|
dismissedObj[this.id] = true;
|
|
254
|
-
localStorage.setItem(
|
|
273
|
+
localStorage.setItem(
|
|
274
|
+
"sonic-toast-dismissed",
|
|
275
|
+
JSON.stringify(dismissedObj)
|
|
276
|
+
);
|
|
255
277
|
}
|
|
256
|
-
this.dispatchEvent(new CustomEvent("hide", {bubbles: true}));
|
|
278
|
+
this.dispatchEvent(new CustomEvent("hide", { bubbles: true }));
|
|
257
279
|
}
|
|
258
280
|
|
|
259
281
|
show() {
|
|
File without changes
|