@supersoniks/concorde 3.1.5 → 3.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +84 -16
- package/concorde-core.es.js +85 -17
- package/dist/concorde-core.bundle.js +84 -16
- package/dist/concorde-core.es.js +85 -17
- package/package.json +1 -1
- package/postcss.config.cjs +0 -0
- package/src/core/components/ui/_css/size.ts +3 -0
- package/src/core/components/ui/menu/menu.ts +116 -30
- 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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"date":
|
|
1
|
+
{"date":1719313394}
|
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 Te(r){return typeof r=="object"&&r!=null}const Tr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Pe="sonic";typeof __SONIC_PREFIX__>"u"&&(Pe="sonic"+Math.floor(Math.random()*1e6));const Es=Pe=="sonic"?"publisher-proxies-data":Pe+"-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_=Te(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_(),Te(this._value_))for(const n in this._value_){const l=t[n],h=Te(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),"<"+Pe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Pe+"-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 je(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+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="Wed Jun 19 2024 17:55:51 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 je 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 je(Te(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 je({},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(Te(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(Pe+"-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 Te(r){return typeof r=="object"&&r!=null}const Tr=async()=>new Promise(r=>{window.queueMicrotask(()=>r(null))});let Pe="sonic";typeof __SONIC_PREFIX__>"u"&&(Pe="sonic"+Math.floor(Math.random()*1e6));const Es=Pe=="sonic"?"publisher-proxies-data":Pe+"-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_=Te(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_(),Te(this._value_))for(const n in this._value_){const l=t[n],h=Te(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),"<"+Pe+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Pe+"-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 je(o);this.set(t,n)}const e=this.publishers.get(t);return i&&this.initialisedData.indexOf(t)===-1&&(e._is_savable_=!0,this.initialisedData.push(t),this.setLocalData(e,t)),this.publishers.get(t)}set(t,s){this.publishers.set(t,s)}delete(t){return this.publishers.has(t)?(this.publishers.delete(t),!0):!1}async saveToLocalStorage(t=0){if(!(t!==k.saveId&&t%10!=0))try{if(!k.changed||k.saving)return;k.saving=!0,k.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const e of s){const o=this.publishers.get(e);if(!(o!=null&&o._is_savable_))continue;const n=o==null?void 0:o.get();n&&(this.localStorageData[e+"¤lang_"+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="Tue Jun 25 2024 13:03:13 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 je 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 je(Te(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 je({},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(Te(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(Pe+"-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
|
|
@@ -103,6 +103,9 @@
|
|
|
103
103
|
:host([size="2xl"]) {
|
|
104
104
|
--sc-fs: 1.5rem;
|
|
105
105
|
}
|
|
106
|
+
:host([size="inherit"]) {
|
|
107
|
+
--sc-fs: 1em;
|
|
108
|
+
}
|
|
106
109
|
`;var Ro=Object.defineProperty,Fo=Object.getOwnPropertyDescriptor,R=(r,t,s,i)=>{for(var e=i>1?void 0:i?Fo(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ro(t,s,e),e};const Uo="sonic-button";let T=class extends Ys(Oe(G(v))){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(r){this._href=r,this.href&&this.href.indexOf("http")!=0?it.onChange(this):it.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(r){r.preventDefault(),it.changeFromComponent(this)}handleChange(r){if(!((r==null?void 0:r.type)=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(r==null||r.preventDefault(),r==null||r.stopPropagation(),it.changeFromComponent(this)),this.hasAttribute("reset"))){const t=this.getAttribute("reset"),s=t?tt.get(t):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(r){this.autoRepeat&&(this.handleChange(r),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(r){if(this.name){if(r?this.setAttribute("active","true"):this.removeAttribute("active"),r==this._checked)return;super.setCheckedValue(r)}}disconnectedCallback(){it.offChange(this),super.disconnectedCallback()}willUpdate(r){(r.has("href")||r.has("autoActive"))&&it.updateComponentActiveState(this),r.has("location")&&it.updateComponentActiveState(this)}render(){const r={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},t=g`
|
|
107
110
|
<button
|
|
108
111
|
part="button"
|
|
@@ -2645,11 +2648,26 @@ ${this.value}</textarea
|
|
|
2645
2648
|
opacity: 1;
|
|
2646
2649
|
scale: 1;
|
|
2647
2650
|
}
|
|
2648
|
-
`],Lt([a({type:String})],xt.prototype,"rounded",2),Lt([a({type:String})],xt.prototype,"src",2),Lt([a({type:String})],xt.prototype,"alt",2),Lt([a({type:String})],xt.prototype,"loading",2),Lt([a({type:String,reflect:!0})],xt.prototype,"transition",2),Lt([a({type:String})],xt.prototype,"ratio",2),Lt([a({type:String})],xt.prototype,"objectPosition",2),Lt([a({type:String})],xt.prototype,"imageRendering",2),Lt([a({type:Boolean,reflect:!0})],xt.prototype,"cover",2),xt=Lt([w(kl)],xt);var Ll=Object.defineProperty,El=Object.getOwnPropertyDescriptor,vt=(r,t,s,i)=>{for(var e=i>1?void 0:i?El(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ll(t,s,e),e};const Nl="sonic-menu";let ht=class extends v{constructor(){super(...arguments),this.
|
|
2651
|
+
`],Lt([a({type:String})],xt.prototype,"rounded",2),Lt([a({type:String})],xt.prototype,"src",2),Lt([a({type:String})],xt.prototype,"alt",2),Lt([a({type:String})],xt.prototype,"loading",2),Lt([a({type:String,reflect:!0})],xt.prototype,"transition",2),Lt([a({type:String})],xt.prototype,"ratio",2),Lt([a({type:String})],xt.prototype,"objectPosition",2),Lt([a({type:String})],xt.prototype,"imageRendering",2),Lt([a({type:Boolean,reflect:!0})],xt.prototype,"cover",2),xt=Lt([w(kl)],xt);var Ll=Object.defineProperty,El=Object.getOwnPropertyDescriptor,vt=(r,t,s,i)=>{for(var e=i>1?void 0:i?El(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Ll(t,s,e),e};const Nl="sonic-menu";let ht=class extends v{constructor(){super(...arguments),this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.minWidth="0",this.hasMoreElements=!1,this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this,this.direction))}}checkIfMore(){var r;this.hasMoreElements=!!((r=this.moreElements)!=null&&r.length)}updated(r){const t=this.querySelector(".more-btn");this.size&&t&&t.setAttribute("size",this.size),this.querySelectorAll("sonic-divider").forEach(i=>{i.hasAttribute("size")||i.setAttribute("size","xs")}),super.updated(r)}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.updateIsScollable()}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}disconnectedCallback(){var r;(r=this.observer)==null||r.disconnect(),super.disconnectedCallback()}initScrollable(){let r=!1,t,s;this.scrollable&&(this.addEventListener("mousedown",i=>{r=!0,this.classList.add("active"),t=i.pageX-this.offsetLeft,s=this.scrollLeft}),this.addEventListener("mouseleave",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{r=!1,this.classList.remove("active")}),this.addEventListener("mousemove",i=>{if(!r)return;i.preventDefault();const o=(i.pageX-this.offsetLeft-t)*1.5;this.scrollLeft=s-o,this.setScrollShadow(this,this.direction)}),this.addEventListener("scroll",i=>{i.preventDefault(),this.setScrollShadow(this,this.direction)}))}setScrollShadow(r,t){t=="row"?(r.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),r.scrollLeft<r.scrollWidth-r.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):t=="column"&&(r.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),r.scrollTop<r.scrollHeight-(r.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(r){r.forEach(t=>{this.size&&t.setAttribute("size",this.size),this.align&&t.getAttribute("shape")!="square"&&t.getAttribute("shape")!="circle"&&t.setAttribute("align",this.align),this.direction=="row"&&t.getAttribute("shape")=="block"&&t.setAttribute("shape","default")})}render(){const r={minWidth:this.minWidth,flexDirection:this.direction,gap:this.gap},t=this.direction=="row",s={display:"block",alignSelf:t?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},i={marginLeft:t?"":".55em"};return g`<menu
|
|
2652
|
+
part="menu"
|
|
2653
|
+
class="shadowable"
|
|
2654
|
+
style=${dt(r)}
|
|
2655
|
+
>
|
|
2649
2656
|
<slot @slotchange=${this.mainSlotChange}></slot>
|
|
2650
|
-
<sonic-pop
|
|
2651
|
-
|
|
2652
|
-
|
|
2657
|
+
<sonic-pop
|
|
2658
|
+
style=${dt(s)}
|
|
2659
|
+
class=${this.hasMoreElements?"":"hidden"}
|
|
2660
|
+
>
|
|
2661
|
+
<sonic-menu-item
|
|
2662
|
+
style=${dt(i)}
|
|
2663
|
+
class="more-btn"
|
|
2664
|
+
shape=${this.moreShape}
|
|
2665
|
+
align="center"
|
|
2666
|
+
>
|
|
2667
|
+
<sonic-icon
|
|
2668
|
+
size="xl"
|
|
2669
|
+
name=${t?"more-vert":"more-horiz"}
|
|
2670
|
+
></sonic-icon>
|
|
2653
2671
|
</sonic-menu-item>
|
|
2654
2672
|
<slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
|
|
2655
2673
|
</sonic-pop>
|
|
@@ -2710,12 +2728,28 @@ ${this.value}</textarea
|
|
|
2710
2728
|
display: none !important;
|
|
2711
2729
|
}
|
|
2712
2730
|
:host([scrollable][direction="row"].shadow-right) {
|
|
2713
|
-
-webkit-mask-image: linear-gradient(
|
|
2714
|
-
|
|
2731
|
+
-webkit-mask-image: linear-gradient(
|
|
2732
|
+
to left,
|
|
2733
|
+
rgba(0, 0, 0, 0),
|
|
2734
|
+
rgba(0, 0, 0, 1) 10%
|
|
2735
|
+
);
|
|
2736
|
+
mask-image: linear-gradient(
|
|
2737
|
+
to left,
|
|
2738
|
+
rgba(0, 0, 0, 0),
|
|
2739
|
+
rgba(0, 0, 0, 1) 10%
|
|
2740
|
+
);
|
|
2715
2741
|
}
|
|
2716
2742
|
:host([scrollable][direction="row"].shadow-left) {
|
|
2717
|
-
-webkit-mask-image: linear-gradient(
|
|
2718
|
-
|
|
2743
|
+
-webkit-mask-image: linear-gradient(
|
|
2744
|
+
to right,
|
|
2745
|
+
rgba(0, 0, 0, 0),
|
|
2746
|
+
rgba(0, 0, 0, 1) 10%
|
|
2747
|
+
);
|
|
2748
|
+
mask-image: linear-gradient(
|
|
2749
|
+
to right,
|
|
2750
|
+
rgba(0, 0, 0, 0),
|
|
2751
|
+
rgba(0, 0, 0, 1) 10%
|
|
2752
|
+
);
|
|
2719
2753
|
}
|
|
2720
2754
|
:host([scrollable][direction="row"].shadow-left.shadow-right) {
|
|
2721
2755
|
-webkit-mask-image: linear-gradient(
|
|
@@ -2725,19 +2759,53 @@ ${this.value}</textarea
|
|
|
2725
2759
|
rgba(0, 0, 0, 1) 90%,
|
|
2726
2760
|
rgba(0, 0, 0, 0) 100%
|
|
2727
2761
|
);
|
|
2728
|
-
mask-image: linear-gradient(
|
|
2762
|
+
mask-image: linear-gradient(
|
|
2763
|
+
to right,
|
|
2764
|
+
rgba(0, 0, 0, 0) 0%,
|
|
2765
|
+
rgba(0, 0, 0, 1) 10%,
|
|
2766
|
+
rgba(0, 0, 0, 1) 90%,
|
|
2767
|
+
rgba(0, 0, 0, 0) 100%
|
|
2768
|
+
);
|
|
2729
2769
|
}
|
|
2730
2770
|
:host([scrollable][direction="column"].shadow-top) {
|
|
2731
|
-
-webkit-mask-image: linear-gradient(
|
|
2732
|
-
|
|
2771
|
+
-webkit-mask-image: linear-gradient(
|
|
2772
|
+
to bottom,
|
|
2773
|
+
rgba(0, 0, 0, 0),
|
|
2774
|
+
rgba(0, 0, 0, 1) 10%
|
|
2775
|
+
);
|
|
2776
|
+
mask-image: linear-gradient(
|
|
2777
|
+
to bottom,
|
|
2778
|
+
rgba(0, 0, 0, 0),
|
|
2779
|
+
rgba(0, 0, 0, 1) 10%
|
|
2780
|
+
);
|
|
2733
2781
|
}
|
|
2734
2782
|
:host([scrollable][direction="column"].shadow-bottom) {
|
|
2735
|
-
-webkit-mask-image: linear-gradient(
|
|
2736
|
-
|
|
2783
|
+
-webkit-mask-image: linear-gradient(
|
|
2784
|
+
to top,
|
|
2785
|
+
rgba(0, 0, 0, 0),
|
|
2786
|
+
rgba(0, 0, 0, 1) 10%
|
|
2787
|
+
);
|
|
2788
|
+
mask-image: linear-gradient(
|
|
2789
|
+
to top,
|
|
2790
|
+
rgba(0, 0, 0, 0),
|
|
2791
|
+
rgba(0, 0, 0, 1) 10%
|
|
2792
|
+
);
|
|
2737
2793
|
}
|
|
2738
2794
|
:host([scrollable][direction="column"].shadow-top.shadow-bottom) {
|
|
2739
|
-
-webkit-mask-image: linear-gradient(
|
|
2740
|
-
|
|
2795
|
+
-webkit-mask-image: linear-gradient(
|
|
2796
|
+
to top,
|
|
2797
|
+
rgba(0, 0, 0, 0) 0%,
|
|
2798
|
+
rgba(0, 0, 0, 1) 10%,
|
|
2799
|
+
rgba(0, 0, 0, 1) 90%,
|
|
2800
|
+
rgba(0, 0, 0, 0) 100%
|
|
2801
|
+
);
|
|
2802
|
+
mask-image: linear-gradient(
|
|
2803
|
+
to bottom,
|
|
2804
|
+
rgba(0, 0, 0, 0) 0%,
|
|
2805
|
+
rgba(0, 0, 0, 1) 10%,
|
|
2806
|
+
rgba(0, 0, 0, 1) 90%,
|
|
2807
|
+
rgba(0, 0, 0, 0) 100%
|
|
2808
|
+
);
|
|
2741
2809
|
}
|
|
2742
2810
|
`],vt([a({type:String,reflect:!0})],ht.prototype,"size",2),vt([a({type:String,reflect:!0})],ht.prototype,"direction",2),vt([a({type:String})],ht.prototype,"gap",2),vt([a({type:String,reflect:!0})],ht.prototype,"align",2),vt([a({type:String,reflect:!0})],ht.prototype,"shadow",2),vt([a({type:String})],ht.prototype,"moreShape",2),vt([a({type:Boolean})],ht.prototype,"scrollable",2),vt([a({type:String})],ht.prototype,"minWidth",2),vt([ee("menu")],ht.prototype,"menu",2),vt([se({selector:"sonic-menu-item"})],ht.prototype,"menuChildren",2),vt([se({slot:"more",selector:"*"})],ht.prototype,"moreElements",2),vt([j()],ht.prototype,"hasMoreElements",2),ht=vt([w(Nl)],ht);var Tl=Object.defineProperty,jl=Object.getOwnPropertyDescriptor,$r=(r,t,s,i)=>{for(var e=i>1?void 0:i?jl(t,s):t,o=r.length-1,n;o>=0;o--)(n=r[o])&&(e=(i?n(t,s,e):n(e))||e);return i&&e&&Tl(t,s,e),e};const Ml="sonic-modal-actions";let Os=class extends v{firstUpdated(r){var t;(t=this.buttons)==null||t.forEach(s=>{s.addEventListener("click",()=>{if(s.getAttribute("hideModal")!="false"){const i=de.getClosestElement(this,"sonic-modal");i==null||i.hide()}})}),super.firstUpdated(r)}render(){return g`<slot></slot>`}};Os.styles=[P`
|
|
2743
2811
|
:host {
|
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 = "Tue Jun 25 2024 13:03:13 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(
|
|
@@ -3330,6 +3330,9 @@ const x = (r) => r ?? $, Lt = P`
|
|
|
3330
3330
|
:host([size="2xl"]) {
|
|
3331
3331
|
--sc-fs: 1.5rem;
|
|
3332
3332
|
}
|
|
3333
|
+
:host([size="inherit"]) {
|
|
3334
|
+
--sc-fs: 1em;
|
|
3335
|
+
}
|
|
3333
3336
|
`;
|
|
3334
3337
|
var Ro = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, U = (r, t, s, i) => {
|
|
3335
3338
|
for (var e = i > 1 ? void 0 : i ? Fo(t, s) : t, o = r.length - 1, n; o >= 0; o--)
|
|
@@ -9628,7 +9631,7 @@ var Jl = Object.defineProperty, Xl = Object.getOwnPropertyDescriptor, vt = (r, t
|
|
|
9628
9631
|
const tc = "sonic-menu";
|
|
9629
9632
|
let ct = class extends y {
|
|
9630
9633
|
constructor() {
|
|
9631
|
-
super(...arguments), this.
|
|
9634
|
+
super(...arguments), this.direction = "column", this.gap = "var(--sc-menu-gap)", this.align = "left", this.shadow = null, this.moreShape = "circle", this.scrollable = !1, this.observer = null, this.minWidth = "0", this.hasMoreElements = !1, this.updateIsScollable = () => {
|
|
9632
9635
|
this.scrollable && (this.initScrollable(), this.setScrollShadow(this, this.direction));
|
|
9633
9636
|
};
|
|
9634
9637
|
}
|
|
@@ -9691,11 +9694,26 @@ let ct = class extends y {
|
|
|
9691
9694
|
}, i = {
|
|
9692
9695
|
marginLeft: t ? "" : ".55em"
|
|
9693
9696
|
};
|
|
9694
|
-
return g`<menu
|
|
9697
|
+
return g`<menu
|
|
9698
|
+
part="menu"
|
|
9699
|
+
class="shadowable"
|
|
9700
|
+
style=${dt(r)}
|
|
9701
|
+
>
|
|
9695
9702
|
<slot @slotchange=${this.mainSlotChange}></slot>
|
|
9696
|
-
<sonic-pop
|
|
9697
|
-
|
|
9698
|
-
|
|
9703
|
+
<sonic-pop
|
|
9704
|
+
style=${dt(s)}
|
|
9705
|
+
class=${this.hasMoreElements ? "" : "hidden"}
|
|
9706
|
+
>
|
|
9707
|
+
<sonic-menu-item
|
|
9708
|
+
style=${dt(i)}
|
|
9709
|
+
class="more-btn"
|
|
9710
|
+
shape=${this.moreShape}
|
|
9711
|
+
align="center"
|
|
9712
|
+
>
|
|
9713
|
+
<sonic-icon
|
|
9714
|
+
size="xl"
|
|
9715
|
+
name=${t ? "more-vert" : "more-horiz"}
|
|
9716
|
+
></sonic-icon>
|
|
9699
9717
|
</sonic-menu-item>
|
|
9700
9718
|
<slot name="more" @slotchange=${this.checkIfMore} slot="content"></slot>
|
|
9701
9719
|
</sonic-pop>
|
|
@@ -9760,12 +9778,28 @@ ct.styles = [
|
|
|
9760
9778
|
display: none !important;
|
|
9761
9779
|
}
|
|
9762
9780
|
:host([scrollable][direction="row"].shadow-right) {
|
|
9763
|
-
-webkit-mask-image: linear-gradient(
|
|
9764
|
-
|
|
9781
|
+
-webkit-mask-image: linear-gradient(
|
|
9782
|
+
to left,
|
|
9783
|
+
rgba(0, 0, 0, 0),
|
|
9784
|
+
rgba(0, 0, 0, 1) 10%
|
|
9785
|
+
);
|
|
9786
|
+
mask-image: linear-gradient(
|
|
9787
|
+
to left,
|
|
9788
|
+
rgba(0, 0, 0, 0),
|
|
9789
|
+
rgba(0, 0, 0, 1) 10%
|
|
9790
|
+
);
|
|
9765
9791
|
}
|
|
9766
9792
|
:host([scrollable][direction="row"].shadow-left) {
|
|
9767
|
-
-webkit-mask-image: linear-gradient(
|
|
9768
|
-
|
|
9793
|
+
-webkit-mask-image: linear-gradient(
|
|
9794
|
+
to right,
|
|
9795
|
+
rgba(0, 0, 0, 0),
|
|
9796
|
+
rgba(0, 0, 0, 1) 10%
|
|
9797
|
+
);
|
|
9798
|
+
mask-image: linear-gradient(
|
|
9799
|
+
to right,
|
|
9800
|
+
rgba(0, 0, 0, 0),
|
|
9801
|
+
rgba(0, 0, 0, 1) 10%
|
|
9802
|
+
);
|
|
9769
9803
|
}
|
|
9770
9804
|
:host([scrollable][direction="row"].shadow-left.shadow-right) {
|
|
9771
9805
|
-webkit-mask-image: linear-gradient(
|
|
@@ -9775,19 +9809,53 @@ ct.styles = [
|
|
|
9775
9809
|
rgba(0, 0, 0, 1) 90%,
|
|
9776
9810
|
rgba(0, 0, 0, 0) 100%
|
|
9777
9811
|
);
|
|
9778
|
-
mask-image: linear-gradient(
|
|
9812
|
+
mask-image: linear-gradient(
|
|
9813
|
+
to right,
|
|
9814
|
+
rgba(0, 0, 0, 0) 0%,
|
|
9815
|
+
rgba(0, 0, 0, 1) 10%,
|
|
9816
|
+
rgba(0, 0, 0, 1) 90%,
|
|
9817
|
+
rgba(0, 0, 0, 0) 100%
|
|
9818
|
+
);
|
|
9779
9819
|
}
|
|
9780
9820
|
:host([scrollable][direction="column"].shadow-top) {
|
|
9781
|
-
-webkit-mask-image: linear-gradient(
|
|
9782
|
-
|
|
9821
|
+
-webkit-mask-image: linear-gradient(
|
|
9822
|
+
to bottom,
|
|
9823
|
+
rgba(0, 0, 0, 0),
|
|
9824
|
+
rgba(0, 0, 0, 1) 10%
|
|
9825
|
+
);
|
|
9826
|
+
mask-image: linear-gradient(
|
|
9827
|
+
to bottom,
|
|
9828
|
+
rgba(0, 0, 0, 0),
|
|
9829
|
+
rgba(0, 0, 0, 1) 10%
|
|
9830
|
+
);
|
|
9783
9831
|
}
|
|
9784
9832
|
:host([scrollable][direction="column"].shadow-bottom) {
|
|
9785
|
-
-webkit-mask-image: linear-gradient(
|
|
9786
|
-
|
|
9833
|
+
-webkit-mask-image: linear-gradient(
|
|
9834
|
+
to top,
|
|
9835
|
+
rgba(0, 0, 0, 0),
|
|
9836
|
+
rgba(0, 0, 0, 1) 10%
|
|
9837
|
+
);
|
|
9838
|
+
mask-image: linear-gradient(
|
|
9839
|
+
to top,
|
|
9840
|
+
rgba(0, 0, 0, 0),
|
|
9841
|
+
rgba(0, 0, 0, 1) 10%
|
|
9842
|
+
);
|
|
9787
9843
|
}
|
|
9788
9844
|
:host([scrollable][direction="column"].shadow-top.shadow-bottom) {
|
|
9789
|
-
-webkit-mask-image: linear-gradient(
|
|
9790
|
-
|
|
9845
|
+
-webkit-mask-image: linear-gradient(
|
|
9846
|
+
to top,
|
|
9847
|
+
rgba(0, 0, 0, 0) 0%,
|
|
9848
|
+
rgba(0, 0, 0, 1) 10%,
|
|
9849
|
+
rgba(0, 0, 0, 1) 90%,
|
|
9850
|
+
rgba(0, 0, 0, 0) 100%
|
|
9851
|
+
);
|
|
9852
|
+
mask-image: linear-gradient(
|
|
9853
|
+
to bottom,
|
|
9854
|
+
rgba(0, 0, 0, 0) 0%,
|
|
9855
|
+
rgba(0, 0, 0, 1) 10%,
|
|
9856
|
+
rgba(0, 0, 0, 1) 90%,
|
|
9857
|
+
rgba(0, 0, 0, 0) 100%
|
|
9858
|
+
);
|
|
9791
9859
|
}
|
|
9792
9860
|
`
|
|
9793
9861
|
];
|