@everymatrix/general-input 1.59.2 → 1.60.0

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.
Files changed (29) hide show
  1. package/dist/cjs/checkbox-group-input_10.cjs.entry.js +5452 -37168
  2. package/dist/cjs/general-input.cjs.entry.js +4548 -1
  3. package/dist/cjs/toggle-checkbox-input.cjs.entry.js +22 -3
  4. package/dist/collection/components/checkbox-group-input/checkbox-group-input.js +2 -4
  5. package/dist/collection/components/date-input/date-input.js +2 -3
  6. package/dist/collection/components/general-input/general-input.js +2 -1
  7. package/dist/collection/components/password-input/password-input.css +14 -1
  8. package/dist/collection/components/password-input/password-input.js +2 -3
  9. package/dist/collection/components/select-input/select-input.js +2 -3
  10. package/dist/collection/components/tel-input/tel-input.js +2 -3
  11. package/dist/collection/components/toggle-checkbox-input/toggle-checkbox-input.js +22 -3
  12. package/dist/esm/checkbox-group-input_10.entry.js +5451 -37167
  13. package/dist/esm/general-input.entry.js +4548 -1
  14. package/dist/esm/toggle-checkbox-input.entry.js +22 -3
  15. package/dist/general-input/general-input.esm.js +1 -1
  16. package/dist/general-input/p-35d1eebe.entry.js +1 -0
  17. package/dist/general-input/p-5bc47cf3.entry.js +4510 -0
  18. package/dist/general-input/p-b4c2804b.entry.js +1 -0
  19. package/dist/types/components/checkbox-group-input/checkbox-group-input.d.ts +0 -2
  20. package/dist/types/components/date-input/date-input.d.ts +1 -2
  21. package/dist/types/components/general-input/general-input.d.ts +1 -0
  22. package/dist/types/components/password-input/password-input.d.ts +0 -1
  23. package/dist/types/components/select-input/select-input.d.ts +0 -1
  24. package/dist/types/components/tel-input/tel-input.d.ts +0 -1
  25. package/dist/types/components/toggle-checkbox-input/toggle-checkbox-input.d.ts +5 -0
  26. package/package.json +1 -1
  27. package/dist/general-input/p-aaf54cc4.entry.js +0 -4463
  28. package/dist/general-input/p-dc5f469a.entry.js +0 -1
  29. package/dist/general-input/p-dc77c96f.entry.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i}from"./p-8b2b0da7.js";import{t as o}from"./p-80314011.js";import{t as s}from"./p-2dccd0bf.js";const l=class{constructor(i){e(this,i),this.sendValidityState=t(this,"sendValidityState",7),this.sendInputValue=t(this,"sendInputValue",7),this.value="",this.setClientStyling=()=>{let e=document.createElement("style");e.innerHTML=this.clientStyling,this.stylingContainer.prepend(e)},this.name=void 0,this.displayName=void 0,this.defaultValue="",this.options=void 0,this.autofilled=void 0,this.tooltip=void 0,this.validation=void 0,this.language=void 0,this.emitValue=void 0,this.clientStyling="",this.errorMessage=void 0,this.isValid=void 0,this.limitStylingAppends=!1,this.showTooltip=!1,this.showFields="true"===this.defaultValue}handleStylingChange(e,t){e!==t&&this.setClientStyling()}validityStateHandler(e){this.sendValidityState.emit(e)}valueHandler(e){this.sendInputValue.emit(e)}handleClickOutside(e){e.composedPath()[0]!==this.tooltipIconReference&&e.composedPath()[0]!==this.tooltipReference&&(this.showTooltip=!1)}componentDidRender(){!this.limitStylingAppends&&this.stylingContainer&&(this.clientStyling&&this.setClientStyling(),this.limitStylingAppends=!0)}handleClick(){this.showFields=this.checkboxReference.checked,this.errorMessage=this.setErrorMessage(),this.isValid=this.setValidity(),this.valueHandler({name:this.name,value:this.checkboxReference.checked?"true":"false",type:"toggle"})}setValidity(){return this.checkboxReference.validity.valid}setErrorMessage(){if(this.checkboxReference.validity.valueMissing)return o("requiredError",this.language)}renderLabel(){return i("label",{class:"togglecheckbox__label",htmlFor:`${this.name}__input`},i("div",{class:"togglecheckbox__label-text",innerHTML:`${this.displayName} ${this.validation.mandatory?"*":""}`}))}renderTooltip(){return this.showTooltip?i("div",{class:"togglecheckbox__tooltip "+(this.showTooltip?"visible":""),ref:e=>this.tooltipReference=e,innerHTML:this.tooltip}):null}render(){return i("div",{key:"e8be91ce94cf76ebecc58a433ab567ab549f4692",class:`togglecheckbox__wrapper ${this.name}__input`,ref:e=>this.stylingContainer=e},i("div",{key:"dd42a6316cda06e357843165329de7525a24e3d5",class:"togglecheckbox__wrapper--flex"},i("input",{key:"932a6f8caeafa0d006f636484e33dda246c314d0",class:"togglecheckbox__input",type:"checkbox",id:`${this.name}__input`,ref:e=>this.checkboxReference=e,name:this.name,checked:"true"===this.defaultValue,readOnly:this.autofilled,required:this.validation.mandatory,value:this.value,onClick:()=>this.handleClick()}),this.renderLabel()),i("small",{key:"cbc789c8a5c21debc05971ff347371fbc25d4975",class:"togglecheckbox__error-message"},this.errorMessage),i("div",{key:"a5ce470c985829eb1f5a0567bb974cc15e3d0d64",class:"togglecheckbox__wrapper--relative"},this.tooltip&&i("img",{key:"faef05dd9341ffe44b6833ca8f4c86b85ed61956",class:"togglecheckbox__tooltip-icon",src:s,alt:"",ref:e=>this.tooltipIconReference=e,onClick:()=>this.showTooltip=!this.showTooltip}),this.renderTooltip()),i("div",{key:"89fed5f103acecca78fa53eea64d57574ef42727",class:"togglecheckbox__fields-wrapper "+(this.showFields?"":"hidden")},this.options.map((e=>i("general-input",{type:e.inputType,name:e.name,displayName:e.displayName,validation:e.validate,action:e.action||null,defaultValue:e.defaultValue,autofilled:e.autofill,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:e.tooltip,placeholder:null==e.placeholder?"":e.placeholder})))))}static get watchers(){return{clientStyling:["handleStylingChange"]}}};l.style='*,*::before,*::after{padding:0;margin:0;box-sizing:border-box}.togglecheckbox{font-family:"Roboto";font-style:normal;font-size:15px}.togglecheckbox__wrapper{position:relative}.togglecheckbox__wrapper--flex{display:flex;gap:10px;align-items:baseline}.togglecheckbox__wrapper--relative{position:relative;display:inline}.togglecheckbox__input{transform:scale(1.307, 1.307);margin-left:2px;accent-color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.togglecheckbox__label{font-style:inherit;font-family:inherit;font-weight:400;font-size:16px;color:var(--emw--registration-typography, var(--emw--color-black, #000000));line-height:1.5;cursor:pointer;padding:0}.togglecheckbox__label-text{font-size:16px}.togglecheckbox__label a{color:var(--emw--login-color-primary, var(--emw--color-primary, #D0046C))}.togglecheckbox__error-message{position:absolute;top:calc(100% + 5px);left:0;color:var(--emw--color-error, var(--emw--color-red, #ed0909))}.togglecheckbox__tooltip-icon{width:16px;height:auto}.togglecheckbox__tooltip{position:absolute;top:0;right:0;background-color:var(--emw--color-white, #FFFFFF);border:1px solid var(--emw--color-gray-100, #E6E6E6);color:var(--emw--registration-typography, var(--emw--color-black, #000000));padding:10px;border-radius:5px;opacity:0;transition:opacity 0.3s ease-in-out;z-index:10}.togglecheckbox__tooltip.visible{opacity:1}.togglecheckbox__fields-wrapper{margin-top:40px;display:flex;flex-direction:column;gap:40px}.hidden{display:none}';export{l as toggle_checkbox_input}
@@ -1 +0,0 @@
1
- import{r as t,h as i,H as s}from"./p-8b2b0da7.js";import{g as e}from"./p-80314011.js";const a=class{constructor(i){t(this,i),this.handleClick=t=>{this.emitOnClick&&(t.stopPropagation(),window.postMessage({type:`registration${this.name}Clicked`},window.location.href))},this.type="text",this.name=void 0,this.displayName=void 0,this.placeholder=void 0,this.action=void 0,this.validation=void 0,this.options=void 0,this.language=void 0,this.autofilled=void 0,this.tooltip=void 0,this.defaultValue=void 0,this.emitValue=void 0,this.isDuplicateInput=void 0,this.clientStyling="",this.dateFormat=void 0,this.translationUrl="",this.emitOnClick=!1}connectedCallback(){this.translationUrl&&e(this.translationUrl)}renderInput(){var t;switch(null===(t=this.type)||void 0===t?void 0:t.toLowerCase()){case"text":return i("text-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"email":return i("email-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"number":return i("number-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"checkbox":return i("checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,emitValue:this.emitValue,defaultValue:this.defaultValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip});case"checkboxgroup":return i("checkbox-group-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options});case"togglecheckbox":return i("toggle-checkbox-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,options:this.options,"emit-on-click":this.emitOnClick});case"datetime":return i("date-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder,dateFormat:this.dateFormat,"emit-on-click":this.emitOnClick});case"password":return i("password-input",{name:this.name,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,autofilled:this.autofilled,emitValue:this.emitValue,language:this.language,isDuplicateInput:this.isDuplicateInput,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"radio":return i("radio-input",{name:this.name,displayName:this.displayName,optionsGroup:this.options,validation:this.validation,emitValue:this.emitValue,language:this.language,"client-styling":this.clientStyling});case"tel":return i("tel-input",{name:this.name,action:this.action,displayName:this.displayName,validation:this.validation,defaultValue:this.defaultValue,emitValue:this.emitValue,language:this.language,autofilled:this.autofilled,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});case"dropdown":return i("select-input",{name:this.name,action:this.action,defaultValue:this.defaultValue,displayName:this.displayName,options:this.options,validation:this.validation,emitValue:this.emitValue,autofilled:this.autofilled,language:this.language,"client-styling":this.clientStyling,tooltip:this.tooltip,placeholder:this.placeholder});default:return i("p",null,"The ",this.type," input type is not valid")}}render(){return i(s,{key:"e1c49fc91ead165c05b30c21ac568486e55c8096",class:`general-input--${this.name}`,onClick:this.handleClick},this.renderInput())}};a.style=":host{display:block;height:100%}";export{a as general_input}