@design.estate/dees-catalog 1.0.179 → 1.0.181

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.
@@ -909,7 +909,7 @@ https://github.com/highlightjs/highlight.js/issues/2277`),$=R,G=v),L===void 0&&(
909
909
  }
910
910
  </style>
911
911
  <slot></slot>
912
- `}async firstUpdated(){let a=this.getFormElements();this.updateRequiredStatus();for(let r of a)r.changeSubject.subscribe(async()=>{let n=await this.collectFormData();this.changeSubject.next(n),console.log(n),this.updateRequiredStatus()});await this.addBehaviours(),this.readyDeferred.resolve()}getFormElements(){return Array.from(this.children).filter(a=>Kg.includes(a.constructor))}getSubmitButton(){return Array.from(this.children).find(a=>a instanceof G2)}async updateRequiredStatus(){console.log("checking the required status.");let a=!0;for(let r of this.getFormElements())r.required&&!r.value&&(a=!1);this.getSubmitButton()&&(this.getSubmitButton().disabled=!a)}async collectFormData(){let a=this.getFormElements(),r={};for(let n of a)n.key||console.log(`form element with label "${n.label}" has no key. skipping.`),r[n.key]=n.value;return r}async gatherAndDispatch(){let a=await this.collectFormData(),r=new CustomEvent("formData",{detail:{data:a},bubbles:!0});this.dispatchEvent(r),console.log("dispatched data:"),console.log(a)}setStatus(a,r){let n=this.getFormElements(),i=this.getSubmitButton();switch(a){case"normal":i.disabled=!1,i.status="normal";for(let c of n)c.disabled=!1;break;case"pending":i.disabled=!0,i.status="pending";for(let c of n)c.disabled=!0;break;case"success":i.disabled=!0,i.status="success";for(let c of n)c.disabled=!0;break;case"error":i.disabled=!0,i.status="error";for(let c of n)c.disabled=!0;break}i.text=r}async addBehaviours(){this.addEventListener("keydown",a=>{let r=a.target;if(Kg.includes(r.constructor)&&a.key==="Enter"){let n=this.getFormElements(),i=n.indexOf(r);i<n.length-1?n[i+1].focus():(r.blur(),this.getSubmitButton()?.focus())}})}};Gt.demo=()=>H`
912
+ `}async firstUpdated(){let a=this.getFormElements();this.updateRequiredStatus();for(let r of a)r.changeSubject.subscribe(async()=>{let n=await this.collectFormData();this.changeSubject.next(n),console.log(n),this.updateRequiredStatus()});await this.addBehaviours(),this.readyDeferred.resolve()}getFormElements(){return Array.from(this.children).filter(a=>Kg.includes(a.constructor))}getSubmitButton(){return Array.from(this.children).find(a=>a instanceof G2)}async updateRequiredStatus(){console.log("checking the required status.");let a=!0;for(let r of this.getFormElements())r.required&&!r.value&&(a=!1);this.getSubmitButton()&&(this.getSubmitButton().disabled=!a)}async collectFormData(){let a=this.getFormElements(),r={};for(let n of a)n.key||console.log(`form element with label "${n.label}" has no key. skipping.`),r[n.key]=n.value;return r}async gatherAndDispatch(){let a=await this.collectFormData(),r=new CustomEvent("formData",{detail:{data:a},bubbles:!0});this.dispatchEvent(r),console.log("dispatched data:"),console.log(a)}setStatus(a,r){let n=this.getFormElements(),i=this.getSubmitButton();switch(a){case"normal":i.disabled=!1,i.status="normal";for(let c of n)c.disabled=!1;break;case"pending":i.disabled=!0,i.status="pending";for(let c of n)c.disabled=!0;break;case"success":i.disabled=!0,i.status="success";for(let c of n)c.disabled=!0;break;case"error":i.disabled=!0,i.status="error";for(let c of n)c.disabled=!0;break}i.text=r}reset(){let a=this.getFormElements(),r=this.getSubmitButton();for(let n of a)n.value=null;this.setStatus("normal","Submit")}async addBehaviours(){this.addEventListener("keydown",a=>{let r=a.target;if(Kg.includes(r.constructor)&&a.key==="Enter"){let n=this.getFormElements(),i=n.indexOf(r);i<n.length-1?n[i+1].focus():(r.blur(),this.getSubmitButton()?.focus())}})}};Gt.demo=()=>H`
913
913
  <dees-form
914
914
  style="display: block; margin:auto; max-width: 500px; padding: 20px"
915
915
  @formData=${async a=>{let r=a.currentTarget;r.setStatus("pending","authenticating..."),await B2.smartdelay.delayFor(1e3),r.setStatus("success","authenticated!")}}
@@ -2521,7 +2521,7 @@ svg:not(:root).svg-inline--fa, svg:not(:host).svg-inline--fa {
2521
2521
  display: grid;
2522
2522
  grid-template-columns: 50% 50%;
2523
2523
  }
2524
- `],A([V({type:String})],Xe.prototype,"currentVersion",2),A([V({type:String})],Xe.prototype,"updatedVersion",2),Xe=A([n1("dees-updater")],Xe);var Hw={name:"@design.estate/dees-catalog",version:"1.0.178",description:"website for lossless.com"};export{N2 as DeesButton,H4 as DeesButtonExit,re as DeesChips,ne as DeesContextmenu,Ye as DeesDataviewCodebox,H3 as DeesDataviewStatusobject,Gt as DeesForm,G2 as DeesFormSubmit,Qe as DeesIcon,y2 as DeesInputCheckbox,A2 as DeesInputDropdown,g2 as DeesInputFileupload,x2 as DeesInputQuantitySelector,R2 as DeesInputRadio,f2 as DeesInputText,ce as DeesMobilenavigation,d2 as DeesPdf,F3 as DeesSimpleLogin,oe as DeesSpeechbubble,xe as DeesSpinner,Ze as DeesStepper,h2 as DeesTable,yr as DeesToast,Xe as DeesUpdater,Ue as DeesWindowLayer,Hw as commitinfo,ww as faIcons};
2524
+ `],A([V({type:String})],Xe.prototype,"currentVersion",2),A([V({type:String})],Xe.prototype,"updatedVersion",2),Xe=A([n1("dees-updater")],Xe);var Hw={name:"@design.estate/dees-catalog",version:"1.0.181",description:"website for lossless.com"};export{N2 as DeesButton,H4 as DeesButtonExit,re as DeesChips,ne as DeesContextmenu,Ye as DeesDataviewCodebox,H3 as DeesDataviewStatusobject,Gt as DeesForm,G2 as DeesFormSubmit,Qe as DeesIcon,y2 as DeesInputCheckbox,A2 as DeesInputDropdown,g2 as DeesInputFileupload,x2 as DeesInputQuantitySelector,R2 as DeesInputRadio,f2 as DeesInputText,ce as DeesMobilenavigation,d2 as DeesPdf,F3 as DeesSimpleLogin,oe as DeesSpeechbubble,xe as DeesSpinner,Ze as DeesStepper,h2 as DeesTable,yr as DeesToast,Xe as DeesUpdater,Ue as DeesWindowLayer,Hw as commitinfo,ww as faIcons};
2525
2525
  /*! Bundled license information:
2526
2526
 
2527
2527
  ieee754/index.js: