@supersoniks/concorde 2.0.0 → 2.0.2

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.
@@ -618,7 +618,7 @@ const{D:Ee}=Tt,je=()=>document.createComment(""),Me=(t,e,s)=>{var i;const r=t._$
618
618
  * Copyright 2017 Google LLC
619
619
  * SPDX-License-Identifier: BSD-3-Clause
620
620
  */
621
- let ls=class extends Gt{constructor(t){if(super(t),this.et=kt,t.type!==Yt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===kt||null==t)return this.vt=void 0,this.et=t;if(t===_t)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}};ls.directiveName="unsafeHTML",ls.resultType=1;const cs=Qt(ls),hs=new Map,ds={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};let ps=!1;const us=sessionStorage.getItem("sonicIconsCache"),gs=us?JSON.parse(us):{icons:{},names:[]},bs=class{static registerIcons(t){const e=as;for(const s in t){const i=t[s],r=e[s]||{};for(const t in i)r[t]=i[t];e[s]=r}}};bs.fontAwesomeNext={get:async t=>{const e=t.library,s=t.name||"",i=as;var r,o;if("custom"==e&&(ps||(ps=!0,ds.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",ds.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&ds[e]){const r=ds[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return cs(n[a]);const l=r.url.replace("$prefix",o).replace("$name",s);if(gs.icons[l])return n[a]=gs.icons[l],cs(gs.icons[l]);if(!hs.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));hs.set(l,t)}const c=await hs.get(l);if(hs.delete(l),n[a]=c||"",gs.icons[l]=c||"",gs.names.length>100){const t=gs.names.shift();delete gs.icons[t]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(gs)),cs(c)}return cs(i.core[t.name]||"")}},bs.default=bs.fontAwesomeNext;let ms=bs;var fs=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ys=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fs(e,s,o),o};let ws=class extends Rt{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await ms.default.get({name:this.name,prefix:this.prefix,library:this.library})}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library"))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:kt}};ws.styles=_`
621
+ let ls=class extends Gt{constructor(t){if(super(t),this.et=kt,t.type!==Yt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===kt||null==t)return this.vt=void 0,this.et=t;if(t===_t)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.et)return this.vt;this.et=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}};ls.directiveName="unsafeHTML",ls.resultType=1;const cs=Qt(ls),hs=new Map,ds={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};let ps=!1;const us=sessionStorage.getItem("sonicIconsCache"),gs=us?JSON.parse(us):{icons:{},names:[]},bs=class{static registerIcons(t){const e=as;for(const s in t){const i=t[s],r=e[s]||{};for(const t in i)r[t]=i[t];e[s]=r}}};bs.fontAwesomeNext={get:async t=>{const e=t.library;if(!t.name)return"";const s=t.name,i=as;var r,o;if("custom"==e&&(ps||(ps=!0,ds.custom.url=(null==(r=document.querySelector("[customIconLibraryPath]"))?void 0:r.getAttribute("customIconLibraryPath"))||"",ds.custom.defaultPrefix=(null==(o=document.querySelector("[customIconDefaultPrefix]"))?void 0:o.getAttribute("customIconDefaultPrefix"))||"")),e&&ds[e]){const r=ds[e],o=t.prefix||r.defaultPrefix||"",n=i[e]||{};i[e]=n;const a=o+"-"+s;if(n[a])return cs(n[a]);const l=r.url.replace("$prefix",o).replace("$name",s);if(gs.icons[l])return n[a]=gs.icons[l],cs(gs.icons[l]);if(!hs.has(l)){const t=new Promise((async t=>{const e=await fetch(l);if(e.ok)try{t(await e.text())}catch(s){t(null)}else t(`<b title="Erreur ${e.status}">😶</b>`)}));hs.set(l,t)}const c=await hs.get(l);if(hs.delete(l),n[a]=c||"",gs.icons[l]=c||"",gs.names.length>100){const t=gs.names.shift();delete gs.icons[t]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(gs)),cs(c)}return cs(i.core[t.name]||"")}},bs.default=bs.fontAwesomeNext;let ms=bs;var fs=Object.defineProperty,vs=Object.getOwnPropertyDescriptor,ys=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?vs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&fs(e,s,o),o};let ws=class extends Rt{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library=""}async updateIcon(){this.iconText=await ms.default.get({name:this.name,prefix:this.prefix,library:this.library})}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library"))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:kt}};ws.styles=_`
622
622
  :host {
623
623
  line-height: 0.1em;
624
624
  width: fit-content;
@@ -940,7 +940,7 @@ const Vs=Qt(class extends Gt{constructor(t){if(super(t),t.type!==Yt)throw Error(
940
940
  </sonic-subscriber>
941
941
  ${o&&!c?Vs(o):kt}
942
942
  `}))}
943
- `}};Zs([U({type:Object})],Ys.prototype,"itemPropertyMap",2),Zs([U({type:String})],Ys.prototype,"templateKey",2),Zs([U({type:String})],Ys.prototype,"idKey",2),Zs([U()],Ys.prototype,"limit",2),Zs([U()],Ys.prototype,"offset",2),Ys=Zs([m("sonic-list")],Ys);var Qs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Gs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qs(e,s,o),o};let Xs=class extends(G(Rt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)d.delete(t);super.disconnectedCallback()}async connectedCallback(){this.instanceId=Xs.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=he.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),await d.getInstance().isLocalStrorageReady,this.configFilter()}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e?(this.filterPublisher=d.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{this.updateFilteredContent()}))):this.next()}updateFilteredContent(){var t;const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(const n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash||this.isFirstRequest){this.searchHash=o;for(const t of this.listDataProviders)d.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((async()=>{const t=this.resultCount;this.props=null,this.requestId++,this.resultCount=t,await d.getInstance().isLocalStrorageReady,window.requestAnimationFrame((()=>this.next()))}),this.isFirstRequest?0:400),this.isFirstRequest=!1}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e;console.log("next",t);let s=this.offset;const i=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId<this.requestId)return;if(console.log("next 2"),this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount);console.log("next 3")}if(console.log("next 4"),Array.isArray(this.props)){const t=this.props,e=t[t.length-1];s=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const t=[];t.resultCount=this.resultCount,this.props=t}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",s+"").replace("$limit",this.limit+"");const o=r.split("?"),n=o.shift(),a=new URLSearchParams(o.join("?")),l=null==(e=this.filterPublisher)?void 0:e.get(),c=this.filteredFields.split(" ");for(const d in l)this.filteredFields&&c.includes(d)||null==l[d]||""==l[d]||a.set(d,l[d]);this.searchHash||(this.searchHash=a.toString()),r=n+"?"+a.toString(),this.listDataProviders.push(r);const h=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:r+"_item_from_queue_"+this.instanceId,endPoint:r,offset:s,limit:this.limit}];h.resultCount=this.resultCount,this.props=h,this.lastRequestTime=(new Date).getTime()}render(){if(!Array.isArray(this.props))return kt;let t=!this.noLazyload;return 1==this.props.length&&(t=!1),xt`
943
+ `}};Zs([U({type:Object})],Ys.prototype,"itemPropertyMap",2),Zs([U({type:String})],Ys.prototype,"templateKey",2),Zs([U({type:String})],Ys.prototype,"idKey",2),Zs([U()],Ys.prototype,"limit",2),Zs([U()],Ys.prototype,"offset",2),Ys=Zs([m("sonic-list")],Ys);var Qs=Object.defineProperty,Gs=Object.getOwnPropertyDescriptor,Js=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Gs(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Qs(e,s,o),o};let Xs=class extends(G(Rt)){constructor(){super(...arguments),this.templates=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.dataProviderExpression="",this.idKey="id",this.currentScrollPosition=void 0,this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)d.delete(t);super.disconnectedCallback()}async connectedCallback(){this.instanceId=Xs.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=he.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),super.connectedCallback(),this.key=this.getAttribute("key"),this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=(new Date).getTime(),await d.getInstance().isLocalStrorageReady,this.configFilter()}configFilter(){var t;const e=this.getAncestorAttributeValue("dataFilterProvider");e?(this.filterPublisher=d.getInstance().get(e),null==(t=this.filterPublisher)||t.onInternalMutation((()=>{this.updateFilteredContent()}))):this.next()}updateFilteredContent(){var t;const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=null==(t=this.filterPublisher)?void 0:t.get(),r=this.filteredFields.split(" ");for(const n in i){let t=i[n];Array.isArray(t)&&(t=t.filter((t=>null!==t))),this.filteredFields&&!r.includes(n)||null==t||""===t.toString()||s.set(n,i[n].toString())}const o=s.toString();if(o!=this.searchHash||this.isFirstRequest){this.searchHash=o;for(const t of this.listDataProviders)d.delete(t);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout((async()=>{const t=this.resultCount;this.props=null,this.requestId++,this.resultCount=t,await d.getInstance().isLocalStrorageReady,window.requestAnimationFrame((()=>this.next()))}),this.isFirstRequest?0:400),this.isFirstRequest=!1}}resetDuration(){this.lastRequestTime=(new Date).getTime()}next(t){var e;let s=this.offset;const i=(new Date).getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props.length,!t.detail.isFirstLoad||!t.detail.props.length||-1==this.dataProviderExpression.indexOf("$offset"))return void(this.publisher.resultCount=this.resultCount)}if(Array.isArray(this.props)){const t=this.props,e=t[t.length-1];s=parseInt(e.offset.toString())+parseInt(e.limit.toString())}else{const t=[];t.resultCount=this.resultCount,this.props=t}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",s+"").replace("$limit",this.limit+"");const o=r.split("?"),n=o.shift(),a=new URLSearchParams(o.join("?")),l=null==(e=this.filterPublisher)?void 0:e.get(),c=this.filteredFields.split(" ");for(const d in l)this.filteredFields&&c.includes(d)||null==l[d]||""==l[d]||a.set(d,l[d]);this.searchHash||(this.searchHash=a.toString()),r=n+"?"+a.toString(),this.listDataProviders.push(r);const h=[...this.props,{id:a.toString()+"/"+this.props.length,dataProvider:r+"_item_from_queue_"+this.instanceId,endPoint:r,offset:s,limit:this.limit}];h.resultCount=this.resultCount,this.props=h,this.lastRequestTime=(new Date).getTime()}render(){if(!Array.isArray(this.props))return kt;let t=!this.noLazyload;return 1==this.props.length&&(t=!1),xt`
944
944
  ${
945
945
  /**
946
946
  * @license
@@ -1745,7 +1745,7 @@ function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.pro
1745
1745
  * @license
1746
1746
  * Copyright 2018 Google LLC
1747
1747
  * SPDX-License-Identifier: BSD-3-Clause
1748
- */,Ar=Qt(class extends Gt{constructor(t){var e;if(super(t),t.type!==Zt||"class"!==t.name||(null==(e=t.strings)?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null==(s=this.st)?void 0:s.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;for(const o of this.it)o in e||(r.remove(o),this.it.delete(o));for(const o in e){const t=!!e[o];t===this.it.has(o)||(null==(i=this.st)?void 0:i.has(o))||(t?(r.add(o),this.it.add(o)):(r.remove(o),this.it.delete(o)))}return _t}});var Pr=Object.defineProperty,Cr=Object.getOwnPropertyDescriptor,Sr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Cr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Pr(e,s,o),o};let $r=class extends(Ni(oe(G(Rt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}"password"==this.type&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text",console.log(this.isPassword)}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return xt`
1748
+ */,Ar=Qt(class extends Gt{constructor(t){var e;if(super(t),t.type!==Zt||"class"!==t.name||(null==(e=t.strings)?void 0:e.length)>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){var s,i;if(void 0===this.it){this.it=new Set,void 0!==t.strings&&(this.st=new Set(t.strings.join(" ").split(/\s/).filter((t=>""!==t))));for(const t in e)e[t]&&!(null==(s=this.st)?void 0:s.has(t))&&this.it.add(t);return this.render(e)}const r=t.element.classList;for(const o of this.it)o in e||(r.remove(o),this.it.delete(o));for(const o in e){const t=!!e[o];t===this.it.has(o)||(null==(i=this.st)?void 0:i.has(o))||(t?(r.add(o),this.it.add(o)):(r.remove(o),this.it.delete(o)))}return _t}});var Pr=Object.defineProperty,Cr=Object.getOwnPropertyDescriptor,Sr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Cr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Pr(e,s,o),o};let $r=class extends(Ni(oe(G(Rt)))){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs"),this.sameValueAsHandle=t=>this.pattern=t;const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}"password"==this.type&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){var t,e,s,i;this.hasLabel=!(!this.label&&!(null==(t=this.slotLabelNodes)?void 0:t.length)),this.hasDescription=!(!this.description&&!(null==(e=this.slotDescriptionNodes)?void 0:e.length)),this.hasSuffix=!!(null==(s=this.slotSuffixNodes)?void 0:s.length),this.hasPrefix=!!(null==(i=this.slotPrefixNodes)?void 0:i.length)}inlineContentFocus(){var t;this.inlineContent&&!this.disableInlineContentFocus&&(null==(t=this.input)||t.focus())}handleChange(t){this.hasAttribute("inputDelayMs")?(this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout((()=>super.handleChange(t)),parseInt(this.getAttribute("inputDelayMs")))):super.handleChange(t)}togglePasswordVisibility(){this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return xt`
1749
1749
  <label for="form-element" class="${this.hasLabel?"form-label":"hidden"}"
1750
1750
  >${this.label?cs(this.label):""}<slot
1751
1751
  name="label"
@@ -1876,7 +1876,7 @@ function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.pro
1876
1876
  :host([inline]) {
1877
1877
  vertical-align: baseline;
1878
1878
  }
1879
- `],Lr([V()],Er.prototype,"open",2),Lr([q("slot:not([name=content])")],Er.prototype,"popBtn",2),Lr([q("slot[name=content]")],Er.prototype,"popContent",2),Lr([U({type:Boolean})],Er.prototype,"noToggle",2),Lr([U({type:Boolean,reflect:!0})],Er.prototype,"inline",2),Lr([U({type:String,reflect:!0})],Er.prototype,"shadow",2),Lr([U({type:String})],Er.prototype,"placement",2),Er=Lr([m("sonic-pop")],Er);var jr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor;let Nr=class extends Pe{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};Nr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&jr(e,s,o),o})([m("sonic-menu-item")],Nr);class zr{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(e??t),this.l=s,this.o=r??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null==(e=this.callback)?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Ir=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Fr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ir(e,s,o),o};let Rr=class extends(Ui(Fi(Ti(Ri(Rt))))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.searchParameter="",this.hasInputPrefix=!1,this._resizeController=new zr(this,{}),this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{""!=t?this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection):this.lastValidSearch=""},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{var e;null==(e=this.formValuePublisher)||e.set(t[this.name])},this.findSearchedItem=t=>{var e;return t[this.searchParameter||this.name]==(null==(e=this.searchPublisher)?void 0:e.get())},this.findSelection=t=>t[this.name]==this.value,this.setSearchFromSelection=t=>{var e;this.lastValidSearch=t[this.searchParameter||this.name],null==(e=this.searchPublisher)||e.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var t,e,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=(null==(t=this.searchPublisher)?void 0:t.get())&&(null==(e=this.formValuePublisher)?void 0:e.get())&&(null==(s=this.formValuePublisher)||s.set(""))}}hasSlotOrProps(){var t;this.hasInputPrefix=!!(null==(t=this.slotInputPrefixNodes)?void 0:t.length)}connectedCallback(){var t,e,s;super.connectedCallback();const i=this.searchParameter||this.name,r=this.getAncestorAttributeValue("formDataProvider"),o=r+"__autocomplete";this.initSearchDataProvider=`${o}_init_search__`,this.initQueueDataProvider=`${o}_init_queue__`,this.searchDataProvider=`${o}_search__`,this.queueDataProvider=`${o}_queue__`;const n=ge.get;this.searchPublisher=n(this.searchDataProvider)[i],this.formValuePublisher=n(r)[this.name],this.countPublisher=n(this.queueDataProvider).resultCount,this.initCountPublisher=n(this.initQueueDataProvider).resultCount,this.value&&(ge.get(this.initSearchDataProvider)[this.name]=this.value),null==(t=this.initCountPublisher)||t.onAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.onAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.onAssign(this.updateActiveSelection)}disconnectedCallback(){var t,e,s;super.disconnectedCallback(),null==(t=this.initCountPublisher)||t.offAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.offAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.offAssign(this.updateActiveSelection);const i=ge.get;i(this.initSearchDataProvider).delete(),i(this.initQueueDataProvider).delete(),i(this.searchDataProvider).delete(),i(this.queueDataProvider).delete()}queryQueueListItem(t,e,s){let i;const r=ge.get(t).get();if(Array.isArray(r)){for(const t of r){const s=ge.get(t.dataProvider).get();if(Array.isArray(s)&&(i=s.find(e),i))break}i&&s(i)}}setSelectionRange(t,e){var s;null==(s=this.querySelector("sonic-input"))||s.setSelectionRange(t,e)}handleHide(){var t,e,s;if(this.select)return""==(null==(t=this.searchPublisher)?void 0:t.get())?(this.lastValidSearch="",void(null==(e=this.formValuePublisher)||e.set(""))):void(null==(s=this.searchPublisher)||s.set(this.lastValidSearch))}render(){return xt`
1879
+ `],Lr([V()],Er.prototype,"open",2),Lr([q("slot:not([name=content])")],Er.prototype,"popBtn",2),Lr([q("slot[name=content]")],Er.prototype,"popContent",2),Lr([U({type:Boolean})],Er.prototype,"noToggle",2),Lr([U({type:Boolean,reflect:!0})],Er.prototype,"inline",2),Lr([U({type:String,reflect:!0})],Er.prototype,"shadow",2),Lr([U({type:String})],Er.prototype,"placement",2),Er=Lr([m("sonic-pop")],Er);var jr=Object.defineProperty,Mr=Object.getOwnPropertyDescriptor;let Nr=class extends Pe{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="primary"),this.hasAttribute("shape")||(this.shape="block"),this.hasAttribute("align")||(this.align="left"),super.connectedCallback()}};Nr=((t,e,s,i)=>{for(var r,o=i>1?void 0:i?Mr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&jr(e,s,o),o})([m("sonic-menu-item")],Nr);class zr{constructor(t,{target:e,config:s,callback:i,skipInitial:r}){this.t=new Set,this.o=!1,this.i=!1,this.h=t,null!==e&&this.t.add(e??t),this.l=s,this.o=r??this.o,this.callback=i,window.ResizeObserver?(this.u=new ResizeObserver((t=>{this.handleChanges(t),this.h.requestUpdate()})),t.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(t){var e;this.value=null==(e=this.callback)?void 0:e.call(this,t,this.u)}hostConnected(){for(const t of this.t)this.observe(t)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(t){this.t.add(t),this.u.observe(t,this.l),this.i=!0,this.h.requestUpdate()}unobserve(t){this.t.delete(t),this.u.unobserve(t)}disconnect(){this.u.disconnect()}}var Ir=Object.defineProperty,Tr=Object.getOwnPropertyDescriptor,Fr=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Tr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ir(e,s,o),o};let Rr=class extends(Ui(Fi(Ti(Ri(Rt))))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.key="",this.searchParameter="",this.propertyName="",this.hasInputPrefix=!1,this._resizeController=new zr(this,{}),this.searchDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.updateSearchParameter=t=>{var e;if(""==t)return void(this.lastValidSearch="");!1===this.queryQueueListItem(this.queueDataProvider,this.findSelection,this.setSearchFromSelection)&&(this.lastValidSearch=t,null==(e=this.searchPublisher)||e.set(this.lastValidSearch))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.selectListItem=t=>{var e;let s="_self"===this.propertyName?t:t[this.propertyName||this.name];null==(e=this.formValuePublisher)||e.set(s)},this.findSearchedItem=t=>{var e;return("_self"===this.propertyName?t:t[this.propertyName||this.searchParameter||this.name])==(null==(e=this.searchPublisher)?void 0:e.get())},this.findSelection=t=>("_self"===this.propertyName?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{var e;this.lastValidSearch="_self"===this.propertyName?t:t[this.propertyName||this.searchParameter||this.name],null==(e=this.searchPublisher)||e.set(this.lastValidSearch)},this.updateActiveSelection=()=>{var t,e,s;this.queryQueueListItem(this.queueDataProvider,this.findSearchedItem,this.selectListItem),!this.select&&this.lastValidSearch&&this.lastValidSearch!=(null==(t=this.searchPublisher)?void 0:t.get())&&(null==(e=this.formValuePublisher)?void 0:e.get())&&(null==(s=this.formValuePublisher)||s.set(""))}}hasSlotOrProps(){var t;this.hasInputPrefix=!!(null==(t=this.slotInputPrefixNodes)?void 0:t.length)}connectedCallback(){var t,e,s;super.connectedCallback();const i=this.searchParameter||this.name,r=this.getAncestorAttributeValue("formDataProvider"),o=r+"__"+this.name+"__autocomplete";this.initSearchDataProvider=`${o}_init_search__`,this.initQueueDataProvider=`${o}_init_queue__`,this.searchDataProvider=`${o}_search__`,this.queueDataProvider=`${o}_queue__`;const n=ge.get;this.searchPublisher=n(this.searchDataProvider)[i],this.formValuePublisher=n(r)[this.name],this.countPublisher=n(this.queueDataProvider).resultCount,this.initCountPublisher=n(this.initQueueDataProvider).resultCount,this.value&&(ge.get(this.initSearchDataProvider)[this.name]=this.value),null==(t=this.initCountPublisher)||t.onAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.onAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.onAssign(this.updateActiveSelection)}disconnectedCallback(){var t,e,s;super.disconnectedCallback(),null==(t=this.initCountPublisher)||t.offAssign(this.initSearchParameter),null==(e=this.formValuePublisher)||e.offAssign(this.updateSearchParameter),null==(s=this.countPublisher)||s.offAssign(this.updateActiveSelection);const i=ge.get;i(this.initSearchDataProvider).delete(),i(this.initQueueDataProvider).delete(),i(this.searchDataProvider).delete(),i(this.queueDataProvider).delete()}queryQueueListItem(t,e,s){let i;const r=ge.get(t).get();if(Array.isArray(r)){for(const t of r){const s=ge.get(t.dataProvider).get();if(Array.isArray(s)&&(i=s.find(e),i))break}return!!i&&(s(i),!0)}}setSelectionRange(t,e){var s;null==(s=this.querySelector("sonic-input"))||s.setSelectionRange(t,e)}handleHide(){var t,e,s;if(this.select)return""==(null==(t=this.searchPublisher)?void 0:t.get())?(this.lastValidSearch="",void(null==(e=this.formValuePublisher)||e.set(""))):void(null==(s=this.searchPublisher)||s.set(this.lastValidSearch))}render(){return xt`
1880
1880
  <sonic-pop noToggle style="display:block;" @hide=${this.handleHide}>
1881
1881
  <sonic-input
1882
1882
  dataProvider="${this.initSearchDataProvider+Math.random()}"
@@ -1931,7 +1931,7 @@ function*(t,e){if(void 0!==t){let s=0;for(const i of t)yield e(i,s++)}}(this.pro
1931
1931
  min-width: 14rem;
1932
1932
  width: 100%;
1933
1933
  }
1934
- `],Fr([U({type:String})],Rr.prototype,"size",2),Fr([U({type:String})],Rr.prototype,"placeholder",2),Fr([U()],Rr.prototype,"filteredFields",2),Fr([U({type:Boolean})],Rr.prototype,"readonly",2),Fr([U({type:String})],Rr.prototype,"dataProviderExpression",2),Fr([U({type:Boolean})],Rr.prototype,"select",2),Fr([U({type:String})],Rr.prototype,"key",2),Fr([U({type:String})],Rr.prototype,"searchParameter",2),Fr([H({slot:"prefix",flatten:!0})],Rr.prototype,"slotInputPrefixNodes",2),Fr([V()],Rr.prototype,"hasInputPrefix",2),Rr=Fr([m("sonic-input-autocomplete")],Rr);var Ur=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Br=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ur(e,s,o),o};let qr=class extends(Ri(Rt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?xt`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:xt`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?kt:xt`
1934
+ `],Fr([U({type:String})],Rr.prototype,"size",2),Fr([U({type:String})],Rr.prototype,"placeholder",2),Fr([U()],Rr.prototype,"filteredFields",2),Fr([U({type:Boolean})],Rr.prototype,"readonly",2),Fr([U({type:String})],Rr.prototype,"dataProviderExpression",2),Fr([U({type:Boolean})],Rr.prototype,"select",2),Fr([U({type:String})],Rr.prototype,"key",2),Fr([U({type:String})],Rr.prototype,"searchParameter",2),Fr([U({type:String})],Rr.prototype,"propertyName",2),Fr([H({slot:"prefix",flatten:!0})],Rr.prototype,"slotInputPrefixNodes",2),Fr([V()],Rr.prototype,"hasInputPrefix",2),Rr=Fr([m("sonic-input-autocomplete")],Rr);var Ur=Object.defineProperty,Vr=Object.getOwnPropertyDescriptor,Br=(t,e,s,i)=>{for(var r,o=i>1?void 0:i?Vr(e,s):e,n=t.length-1;n>=0;n--)(r=t[n])&&(o=(i?r(e,s,o):r(o))||o);return i&&o&&Ur(e,s,o),o};let qr=class extends(Ri(Rt)){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=t=>{t?(this.hasNoChar=0==t.length,this.hasEnoughChars=t.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(t),this.hasMajuscule=/[A-Z]/.test(t),this.hasNumber=/[0-9]/.test(t),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(t)},ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ge.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(t){return t?xt`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:xt`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?kt:xt`
1935
1935
  <div>${this.wording_password_helper_decription}</div>
1936
1936
  <div>${this.getIcon(this.hasEnoughChars)} ${this.wording_password_helper_min_length}</div>
1937
1937
  <div>${this.getIcon(this.hasMinuscule)} ${this.wording_password_helper_lower_case}</div>
@@ -4712,7 +4712,9 @@ var require_concorde_core_es = __commonJS({
4712
4712
  _Icons.fontAwesomeNext = {
4713
4713
  get: async (params) => {
4714
4714
  const library = params.library;
4715
- const name = params.name || "";
4715
+ if (!params.name)
4716
+ return "";
4717
+ const name = params.name;
4716
4718
  const iconsAsRecord = icons;
4717
4719
  if (library == "custom") {
4718
4720
  enableCustomLibrary();
@@ -5930,7 +5932,6 @@ var require_concorde_core_es = __commonJS({
5930
5932
  }
5931
5933
  next(e2) {
5932
5934
  var _a2;
5933
- console.log("next", e2);
5934
5935
  let offset = this.offset;
5935
5936
  const newTime = (/* @__PURE__ */ new Date()).getTime();
5936
5937
  const requestDuration = newTime - this.lastRequestTime;
@@ -5942,15 +5943,12 @@ var require_concorde_core_es = __commonJS({
5942
5943
  if (e2) {
5943
5944
  if (e2.detail.requestId < this.requestId)
5944
5945
  return;
5945
- console.log("next 2");
5946
5946
  this.resultCount += e2.detail.props.length;
5947
5947
  if (!e2.detail.isFirstLoad || !e2.detail.props.length || this.dataProviderExpression.indexOf("$offset") == -1) {
5948
5948
  this.publisher.resultCount = this.resultCount;
5949
5949
  return;
5950
5950
  }
5951
- console.log("next 3");
5952
5951
  }
5953
- console.log("next 4");
5954
5952
  if (!Array.isArray(this.props)) {
5955
5953
  const newProps2 = [];
5956
5954
  newProps2.resultCount = this.resultCount;
@@ -8994,7 +8992,6 @@ var require_concorde_core_es = __commonJS({
8994
8992
  togglePasswordVisibility() {
8995
8993
  this.isPassword = !this.isPassword;
8996
8994
  this._type = this.isPassword ? "password" : "text";
8997
- console.log(this.isPassword);
8998
8995
  }
8999
8996
  render() {
9000
8997
  const slotClasses = {
@@ -9508,6 +9505,7 @@ var require_concorde_core_es = __commonJS({
9508
9505
  this.dataProviderExpression = "";
9509
9506
  this.key = "";
9510
9507
  this.searchParameter = "";
9508
+ this.propertyName = "";
9511
9509
  this.hasInputPrefix = false;
9512
9510
  this._resizeController = new s(this, {});
9513
9511
  this.searchDataProvider = "";
@@ -9516,29 +9514,37 @@ var require_concorde_core_es = __commonJS({
9516
9514
  this.initQueueDataProvider = "";
9517
9515
  this.lastValidSearch = "";
9518
9516
  this.updateSearchParameter = (value) => {
9517
+ var _a2;
9519
9518
  if (value == "") {
9520
9519
  this.lastValidSearch = "";
9521
9520
  return;
9522
9521
  }
9523
- this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
9522
+ let found = this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
9523
+ if (found === false) {
9524
+ this.lastValidSearch = value;
9525
+ (_a2 = this.searchPublisher) == null ? void 0 : _a2.set(this.lastValidSearch);
9526
+ }
9524
9527
  };
9525
9528
  this.initSearchParameter = () => {
9526
9529
  this.queryQueueListItem(this.initQueueDataProvider, this.findSelection, this.setSearchFromSelection);
9527
9530
  };
9528
9531
  this.selectListItem = (listItem) => {
9529
9532
  var _a2;
9530
- (_a2 = this.formValuePublisher) == null ? void 0 : _a2.set(listItem[this.name]);
9533
+ let value = this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.name];
9534
+ (_a2 = this.formValuePublisher) == null ? void 0 : _a2.set(value);
9531
9535
  };
9532
9536
  this.findSearchedItem = (listItem) => {
9533
9537
  var _a2;
9534
- return listItem[this.searchParameter || this.name] == ((_a2 = this.searchPublisher) == null ? void 0 : _a2.get());
9538
+ let value = this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.searchParameter || this.name];
9539
+ return value == ((_a2 = this.searchPublisher) == null ? void 0 : _a2.get());
9535
9540
  };
9536
9541
  this.findSelection = (listItem) => {
9537
- return listItem[this.name] == this.value;
9542
+ let value = this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.name];
9543
+ return value == this.value;
9538
9544
  };
9539
9545
  this.setSearchFromSelection = (listItem) => {
9540
9546
  var _a2;
9541
- this.lastValidSearch = listItem[this.searchParameter || this.name];
9547
+ this.lastValidSearch = this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.searchParameter || this.name];
9542
9548
  (_a2 = this.searchPublisher) == null ? void 0 : _a2.set(this.lastValidSearch);
9543
9549
  };
9544
9550
  this.updateActiveSelection = () => {
@@ -9561,7 +9567,7 @@ var require_concorde_core_es = __commonJS({
9561
9567
  super.connectedCallback();
9562
9568
  const searchParameter = this.searchParameter || this.name;
9563
9569
  const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
9564
- const dpPrefix = formDataProvider + "__autocomplete";
9570
+ const dpPrefix = formDataProvider + "__" + this.name + "__autocomplete";
9565
9571
  this.initSearchDataProvider = `${dpPrefix}_init_search__`;
9566
9572
  this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
9567
9573
  this.searchDataProvider = `${dpPrefix}_search__`;
@@ -9590,6 +9596,13 @@ var require_concorde_core_es = __commonJS({
9590
9596
  getPublisher(this.searchDataProvider).delete();
9591
9597
  getPublisher(this.queueDataProvider).delete();
9592
9598
  }
9599
+ /**
9600
+ * @param queueDataProvider
9601
+ * @param itemFinder
9602
+ * @param itemMutator
9603
+ *
9604
+ * @return bool|undefined True if item found, false otherwise, undefined if result is not a list
9605
+ */
9593
9606
  queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
9594
9607
  const queuePublisher = PublisherManager.get(queueDataProvider);
9595
9608
  let listItem;
@@ -9607,7 +9620,9 @@ var require_concorde_core_es = __commonJS({
9607
9620
  }
9608
9621
  if (listItem) {
9609
9622
  itemMutator(listItem);
9623
+ return true;
9610
9624
  }
9625
+ return false;
9611
9626
  }
9612
9627
  setSelectionRange(start, end) {
9613
9628
  var _a2;
@@ -9711,6 +9726,9 @@ var require_concorde_core_es = __commonJS({
9711
9726
  __decorateClass$C([
9712
9727
  n$4({ type: String })
9713
9728
  ], InputAutocomplete.prototype, "searchParameter", 2);
9729
+ __decorateClass$C([
9730
+ n$4({ type: String })
9731
+ ], InputAutocomplete.prototype, "propertyName", 2);
9714
9732
  __decorateClass$C([
9715
9733
  o$8({ slot: "prefix", flatten: true })
9716
9734
  ], InputAutocomplete.prototype, "slotInputPrefixNodes", 2);
@@ -144,7 +144,6 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement, {}) {
144
144
  this.lastRequestTime = new Date().getTime();
145
145
  }
146
146
  next(e) {
147
- console.log("next", e);
148
147
  let offset = this.offset;
149
148
  const newTime = new Date().getTime();
150
149
  const requestDuration = newTime - this.lastRequestTime;
@@ -160,15 +159,12 @@ let Queue = Queue_1 = class Queue extends Subscriber(LitElement, {}) {
160
159
  if (e) {
161
160
  if (e.detail.requestId < this.requestId)
162
161
  return;
163
- console.log("next 2");
164
162
  this.resultCount += e.detail.props.length;
165
163
  if (!e.detail.isFirstLoad || !e.detail.props.length || this.dataProviderExpression.indexOf("$offset") == -1) {
166
164
  this.publisher.resultCount = this.resultCount;
167
165
  return;
168
166
  }
169
- console.log("next 3");
170
167
  }
171
- console.log("next 4");
172
168
  if (!Array.isArray(this.props)) {
173
169
  const newProps = [];
174
170
  newProps.resultCount = this.resultCount;
@@ -96,7 +96,6 @@ let Input = class Input extends FormInput(FormElement(Subscriber(LitElement))) {
96
96
  togglePasswordVisibility() {
97
97
  this.isPassword = !this.isPassword;
98
98
  this._type = this.isPassword ? "password" : "text";
99
- console.log(this.isPassword);
100
99
  // this.type = this.isPassword ? "password" : "text";
101
100
  }
102
101
  render() {
@@ -86,7 +86,10 @@ export declare class InputAutocomplete extends InputAutocomplete_base {
86
86
  dataProviderExpression: string;
87
87
  select?: boolean;
88
88
  key: string;
89
+ /** The parameter name to use in dataProviderExpression route */
89
90
  searchParameter: string;
91
+ /** The property name to search in the dataProviderExpression result, use "_self" if result is a string list */
92
+ propertyName: string;
90
93
  slotInputPrefixNodes: Array<Node>;
91
94
  hasInputPrefix: boolean;
92
95
  _resizeController: ResizeController<unknown>;
@@ -106,6 +109,11 @@ export declare class InputAutocomplete extends InputAutocomplete_base {
106
109
  * Les fonctions de gestion
107
110
  */
108
111
  hasSlotOrProps(): void;
112
+ /**
113
+ * Run when the formDataProvider's field is updated
114
+ *
115
+ * @param value
116
+ */
109
117
  private updateSearchParameter;
110
118
  private initSearchParameter;
111
119
  private selectListItem;
@@ -115,7 +123,14 @@ export declare class InputAutocomplete extends InputAutocomplete_base {
115
123
  private updateActiveSelection;
116
124
  connectedCallback(): void;
117
125
  disconnectedCallback(): void;
118
- queryQueueListItem(queueDataProvider: string, itemFinder: (listItem: ListItem) => boolean, itemMutator: (listItem: ListItem) => void): void;
126
+ /**
127
+ * @param queueDataProvider
128
+ * @param itemFinder
129
+ * @param itemMutator
130
+ *
131
+ * @return bool|undefined True if item found, false otherwise, undefined if result is not a list
132
+ */
133
+ queryQueueListItem(queueDataProvider: string, itemFinder: (listItem: ListItem) => boolean, itemMutator: (listItem: ListItem) => void): boolean | undefined;
119
134
  setSelectionRange(start: number, end: number): void;
120
135
  handleHide(): void;
121
136
  render(): import("lit-html").TemplateResult<1>;
@@ -32,7 +32,10 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
32
32
  this.readonly = null;
33
33
  this.dataProviderExpression = "";
34
34
  this.key = "";
35
+ /** The parameter name to use in dataProviderExpression route */
35
36
  this.searchParameter = "";
37
+ /** The property name to search in the dataProviderExpression result, use "_self" if result is a string list */
38
+ this.propertyName = "";
36
39
  this.hasInputPrefix = false;
37
40
  this._resizeController = new ResizeController(this, {});
38
41
  /**
@@ -43,27 +46,42 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
43
46
  this.queueDataProvider = "";
44
47
  this.initQueueDataProvider = "";
45
48
  this.lastValidSearch = "";
49
+ /**
50
+ * Run when the formDataProvider's field is updated
51
+ *
52
+ * @param value
53
+ */
46
54
  this.updateSearchParameter = (value) => {
47
55
  if (value == "") {
48
56
  this.lastValidSearch = "";
49
57
  return;
50
58
  }
51
- this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
59
+ let found = this.queryQueueListItem(this.queueDataProvider, this.findSelection, this.setSearchFromSelection);
60
+ // Si la liste de this.queueDataProvider est bien initialisée, mais qu'aucun item ne correspond à la recherche
61
+ // On affiche quand même la valeur dans le champ de recherche, car il provient directement du formDataProvider
62
+ if (found === false) {
63
+ this.lastValidSearch = value;
64
+ this.searchPublisher?.set(this.lastValidSearch);
65
+ }
52
66
  };
53
67
  this.initSearchParameter = () => {
54
68
  this.queryQueueListItem(this.initQueueDataProvider, this.findSelection, this.setSearchFromSelection);
55
69
  };
56
70
  this.selectListItem = (listItem) => {
57
- this.formValuePublisher?.set(listItem[this.name]);
71
+ let value = this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.name];
72
+ this.formValuePublisher?.set(value);
58
73
  };
59
74
  this.findSearchedItem = (listItem) => {
60
- return listItem[this.searchParameter || this.name] == this.searchPublisher?.get();
75
+ let value = this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.searchParameter || this.name];
76
+ return value == this.searchPublisher?.get();
61
77
  };
62
78
  this.findSelection = (listItem) => {
63
- return listItem[this.name] == this.value;
79
+ let value = this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.name];
80
+ return value == this.value;
64
81
  };
65
82
  this.setSearchFromSelection = (listItem) => {
66
- this.lastValidSearch = listItem[this.searchParameter || this.name];
83
+ this.lastValidSearch =
84
+ this.propertyName === "_self" ? listItem : listItem[this.propertyName || this.searchParameter || this.name];
67
85
  this.searchPublisher?.set(this.lastValidSearch);
68
86
  };
69
87
  this.updateActiveSelection = () => {
@@ -90,7 +108,8 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
90
108
  * Nommage des différents dataProviders utilisés
91
109
  */
92
110
  const formDataProvider = this.getAncestorAttributeValue("formDataProvider");
93
- const dpPrefix = formDataProvider + "__autocomplete";
111
+ // Create unique provider name with formProvider name + input name
112
+ const dpPrefix = formDataProvider + "__" + this.name + "__autocomplete";
94
113
  this.initSearchDataProvider = `${dpPrefix}_init_search__`;
95
114
  this.initQueueDataProvider = `${dpPrefix}_init_queue__`;
96
115
  this.searchDataProvider = `${dpPrefix}_search__`;
@@ -132,6 +151,13 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
132
151
  getPublisher(this.searchDataProvider).delete();
133
152
  getPublisher(this.queueDataProvider).delete();
134
153
  }
154
+ /**
155
+ * @param queueDataProvider
156
+ * @param itemFinder
157
+ * @param itemMutator
158
+ *
159
+ * @return bool|undefined True if item found, false otherwise, undefined if result is not a list
160
+ */
135
161
  queryQueueListItem(queueDataProvider, itemFinder, itemMutator) {
136
162
  const queuePublisher = PublisherManager.get(queueDataProvider);
137
163
  let listItem;
@@ -149,7 +175,9 @@ let InputAutocomplete = class InputAutocomplete extends TemplatesContainer(FormI
149
175
  }
150
176
  if (listItem) {
151
177
  itemMutator(listItem);
178
+ return true;
152
179
  }
180
+ return false;
153
181
  }
154
182
  setSelectionRange(start, end) {
155
183
  this.querySelector("sonic-input")?.setSelectionRange(start, end);
@@ -253,6 +281,9 @@ __decorate([
253
281
  __decorate([
254
282
  property({ type: String })
255
283
  ], InputAutocomplete.prototype, "searchParameter", void 0);
284
+ __decorate([
285
+ property({ type: String })
286
+ ], InputAutocomplete.prototype, "propertyName", void 0);
256
287
  __decorate([
257
288
  queryAssignedElements({ slot: "prefix", flatten: true })
258
289
  ], InputAutocomplete.prototype, "slotInputPrefixNodes", void 0);
@@ -65,7 +65,9 @@ _a = Icons;
65
65
  Icons.fontAwesomeNext = {
66
66
  get: async (params) => {
67
67
  const library = params.library;
68
- const name = params.name || "";
68
+ if (!params.name)
69
+ return "";
70
+ const name = params.name;
69
71
  const iconsAsRecord = icons;
70
72
  /**
71
73
  * SVGS en ligne
@@ -90,7 +90,6 @@ export function autoSubscribe() {
90
90
  publisher.onAssign(onAssign, false);
91
91
  });
92
92
  this.__removeAutoSubscribe__ = () => {
93
- console.log("removeAutoSubscribe");
94
93
  publishers.forEach((publisher) => {
95
94
  publisher.offAssign(onAssign);
96
95
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@supersoniks/concorde",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "customElements": "custom-elements.json",
5
5
  "license": "MIT",
6
6
  "publishConfig": {