@verdocs/web-sdk 4.0.5 → 4.0.7

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 (57) hide show
  1. package/dist/cjs/index-cfdfab36.js +170 -1
  2. package/dist/cjs/verdocs-button-panel.cjs.entry.js +2 -2
  3. package/dist/cjs/verdocs-button_3.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-checkbox_5.cjs.entry.js +16 -7
  5. package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -1
  6. package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
  7. package/dist/collection/components/controls/verdocs-button/verdocs-button.js +1 -20
  8. package/dist/collection/components/controls/verdocs-button-panel/verdocs-button-panel.js +2 -12
  9. package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +1 -17
  10. package/dist/collection/components/controls/verdocs-file-chooser/verdocs-file-chooser.js +1 -5
  11. package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +16 -3
  12. package/dist/components/verdocs-button-panel.js +2 -2
  13. package/dist/components/verdocs-button2.js +1 -1
  14. package/dist/components/verdocs-dropdown2.js +1 -1
  15. package/dist/components/verdocs-file-chooser2.js +1 -1
  16. package/dist/components/verdocs-template-field-properties2.js +16 -3
  17. package/dist/docs.json +5 -5
  18. package/dist/esm/index-b89cf6a4.js +170 -1
  19. package/dist/esm/verdocs-button-panel.entry.js +2 -2
  20. package/dist/esm/verdocs-button_3.entry.js +1 -1
  21. package/dist/esm/verdocs-checkbox_5.entry.js +16 -3
  22. package/dist/esm/verdocs-dropdown.entry.js +1 -1
  23. package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
  24. package/dist/esm-es5/index-b89cf6a4.js +1 -2
  25. package/dist/esm-es5/verdocs-button-panel.entry.js +1 -1
  26. package/dist/esm-es5/verdocs-button_3.entry.js +1 -1
  27. package/dist/esm-es5/verdocs-checkbox_5.entry.js +1 -1
  28. package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
  29. package/dist/esm-es5/verdocs-file-chooser_2.entry.js +1 -1
  30. package/dist/types/components/controls/verdocs-button/verdocs-button.d.ts +0 -19
  31. package/dist/types/components/controls/verdocs-button-panel/verdocs-button-panel.d.ts +0 -10
  32. package/dist/types/components/controls/verdocs-dropdown/verdocs-dropdown.d.ts +0 -16
  33. package/dist/types/components/controls/verdocs-file-chooser/verdocs-file-chooser.d.ts +0 -4
  34. package/dist/types/components.d.ts +0 -172
  35. package/dist/verdocs-web-sdk/p-322fa613.system.js +1 -1
  36. package/dist/verdocs-web-sdk/{p-0bd91b17.entry.js → p-3ae988e6.entry.js} +1 -1
  37. package/dist/verdocs-web-sdk/{p-943c7b8f.system.entry.js → p-3d9d0c2e.system.entry.js} +1 -1
  38. package/dist/verdocs-web-sdk/p-5bc622c5.entry.js +1 -0
  39. package/dist/verdocs-web-sdk/{p-208ba4e2.system.entry.js → p-7db995b0.system.entry.js} +1 -1
  40. package/dist/verdocs-web-sdk/{p-7c1030dc.system.entry.js → p-8a0fd8b4.system.entry.js} +1 -1
  41. package/dist/verdocs-web-sdk/p-9746816b.system.entry.js +1 -0
  42. package/dist/verdocs-web-sdk/{p-6890fe65.system.entry.js → p-9a780e51.system.entry.js} +1 -1
  43. package/dist/verdocs-web-sdk/{p-1a5cdf1a.entry.js → p-9f7a6ff6.entry.js} +1 -1
  44. package/dist/verdocs-web-sdk/{p-7adbe456.entry.js → p-b952113a.entry.js} +1 -1
  45. package/dist/verdocs-web-sdk/{p-48d9efa4.entry.js → p-e504ebcd.entry.js} +1 -1
  46. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  47. package/package.json +1 -3
  48. package/dist/collection/components/controls/verdocs-button/test/verdocs-button.e2e.js +0 -8
  49. package/dist/collection/components/controls/verdocs-button/test/verdocs-button.spec.js +0 -36
  50. package/dist/collection/components/controls/verdocs-organization-card/test/org-popup.e2e.js +0 -34
  51. package/dist/collection/components/controls/verdocs-organization-card/test/org-popup.spec.js +0 -64
  52. package/dist/collection/components/controls/verdocs-text-input/test/verdocs-text-input.js +0 -8
  53. package/dist/collection/components/controls/verdocs-text-input/test/verdocs-text-input.spec.js +0 -36
  54. package/dist/custom-elements.json +0 -2134
  55. package/dist/types/components/controls/verdocs-text-input/test/verdocs-text-input.d.ts +0 -1
  56. package/dist/verdocs-web-sdk/p-383de7ca.entry.js +0 -1
  57. package/dist/verdocs-web-sdk/p-c0d1020a.system.entry.js +0 -1
@@ -1 +1 @@
1
- var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,o,r){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function n(e){try{a(r.next(e))}catch(e){s(e)}}function l(e){try{a(r["throw"](e))}catch(e){s(e)}}function a(e){e.done?o(e.value):i(e.value).then(n,l)}a((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,n;return n={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function l(e){return function(t){return a([e,t])}}function a(l){if(r)throw new TypeError("Generator is already executing.");while(n&&(n=0,l[0]&&(o=0)),o)try{if(r=1,i&&(s=l[0]&2?i["return"]:l[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:o.label++;return{value:l[1],done:false};case 5:o.label++;i=l[1];l=[0];continue;case 7:l=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){o.label=l[1];break}if(l[0]===6&&o.label<s[1]){o.label=s[1];s=l;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(l);break}if(s[2])o.ops.pop();o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e];i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++){if(s||!(r in t)){if(!s)s=Array.prototype.slice.call(t,0,r);s[r]=t[r]}}return e.concat(s||Array.prototype.slice.call(t))};import{r as registerInstance,h,H as Host,c as createEvent,g as getElement}from"./index-b89cf6a4.js";import uuidv4 from"uuid-browser";import{VerdocsEndpoint,updateField,deleteField}from"@verdocs/js-sdk";import{g as getTemplateFieldStore,u as updateStoreField}from"./TemplateFieldStore-d7516adf.js";import{g as getTemplateRoleStore}from"./TemplateRoleStore-ddc3b96f.js";import{g as getTemplateStore}from"./TemplateStore-df5484bb.js";import{S as SDKError}from"./errors-887f1e88.js";import"./index-296aabaf.js";import"./index-7456b04f.js";var verdocsCheckboxCss='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';var VerdocsCheckboxStyle0=verdocsCheckboxCss;var VerdocsCheckbox=function(){function e(e){registerInstance(this,e);this.checked=false;this.name="";this.label="";this.value="";this.theme="light";this.disabled=false}e.prototype.render=function(){var e;return h(Host,{key:"419474760206bae27e0ad8f578a0fb0d97702791",class:(e={disabled:this.disabled},e[this.theme]=true,e)},h("label",{key:"4cb5190cdc28bec1528637bfeeb130d392ce4347"},h("input",{key:"f032febf516c10b0540094f058a59031ce2c706b",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),h("span",{key:"c089f80a6a1060d775c1a13d8cbe8a577287f329"},this.label)))};return e}();VerdocsCheckbox.style=VerdocsCheckboxStyle0;var verdocsComponentErrorCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';var VerdocsComponentErrorStyle0=verdocsComponentErrorCss;var VerdocsComponentError=function(){function e(e){registerInstance(this,e);this.message=""}e.prototype.render=function(){return h(Host,{key:"af86792a4a2d09d2242645a1a8db657c5cd984bf"},h("div",{key:"52096cd84877537d50bea3e0e7a424e5d352c566",class:"inner"},this.message))};return e}();VerdocsComponentError.style=VerdocsComponentErrorStyle0;var verdocsPortalCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";var VerdocsPortalStyle0=verdocsPortalCss;var Z_INDEX="10001";var VerdocsPortal=function(){function e(e){registerInstance(this,e);this.clickAway=createEvent(this,"clickAway",7);this.moved=false;this.anchor=undefined;this.voffset=0;this.align="left"}e.prototype.handleScroll=function(){this.calculatePosition()};e.prototype.handleResize=function(){this.calculatePosition()};e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){(t=this.clickAway)===null||t===void 0?void 0:t.emit()}};e.prototype.calculateLeft=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();if(this.align==="left"){return Math.max(t.left,0)}if(this.align==="right"){return Math.max(t.left+t.width-this.portal.offsetWidth,0)}return Math.max(t.left-this.portal.offsetWidth/2+t.width/2,0)};e.prototype.calculateTop=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();return t.bottom+this.voffset};e.prototype.calculatePosition=function(){this.portal.style.top="".concat(this.calculateTop(),"px");this.portal.style.left="".concat(this.calculateLeft(),"px")};e.prototype.componentWillLoad=function(){var e;var t="".concat(this.anchor,"-portal");(e=document.getElementById(t))===null||e===void 0?void 0:e.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",t);this.portal.style.zIndex=Z_INDEX;this.portal.style.position="absolute";document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element);this.calculatePosition()};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.render=function(){var e=this;return h(Host,{key:"80b497808d7c72fdb5786712abdd50d98f0ab160",ref:function(t){return e.element=t}},h("slot",{key:"d52fd1a7acd0d7f301ca2c9ba81b406a0107c3a0"}))};return e}();VerdocsPortal.style=VerdocsPortalStyle0;var verdocsSelectInputCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var VerdocsSelectInputStyle0=verdocsSelectInputCss;var VerdocsSelectInput=function(){function e(e){registerInstance(this,e);this.value="";this.label="";this.options=undefined;this.disabled=false}e.prototype.render=function(){var e=this;return h(Host,{key:"a353e008560aed3f922fc52d5c091d88cbe099a3",class:"input-field"},h("label",{key:"90a9b8244853fa2083f0d7fb1672ed204ed22a4c"},this.label?h("div",{class:"input-label"},this.label+":"):h("div",null),h("select",{key:"a68e1ea7b9f9b6f375b2d6c1df859708acc79bea",class:"input-element",disabled:this.disabled},this.options.map((function(t){return h("option",{value:t.value,selected:t.value===e.value},t.label)})))))};return e}();VerdocsSelectInput.style=VerdocsSelectInputStyle0;var verdocsTemplateFieldPropertiesCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275)}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';var VerdocsTemplateFieldPropertiesStyle0=verdocsTemplateFieldPropertiesCss;var capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};var TrashIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var HelpIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';var VerdocsTemplateFieldProperties=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.delete=createEvent(this,"delete",7);this.settingsChanged=createEvent(this,"settingsChanged",7);this.sdkError=createEvent(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.loading=true;this.setting=null;this.label="";this.type="textbox";this.name="";this.required=false;this.roleName="";this.group="";this.fieldType="";this.options=[];this.placeholder="";this.value="";this.leading=0;this.showingHelp=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,r,i,s,n,l,a,c,d,p;var u=this;return __generator(this,(function(f){switch(f.label){case 0:f.trys.push([0,4,,5]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELD PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.fieldName){console.error("[FIELD PROPERTIES] Missing required field name");return[2]}if(!this.endpoint.session){console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,getTemplateStore(this.endpoint,this.templateId)];case 1:l.templateStore=f.sent();a=this;return[4,getTemplateFieldStore(this.templateId)];case 2:a.fieldStore=f.sent();c=this;return[4,getTemplateRoleStore(this.templateId)];case 3:c.roleStore=f.sent();d=this.fieldStore.get("fields").find((function(e){return e.name===u.fieldName}));if(!d){console.log('[FIELD PROPERTIES] Unable to find field "'.concat(this.fieldName,'" in fields'))}else{console.log("props",d)}this.type=d.type;this.name=d.name;this.label=d.label;this.group=d.name;this.roleName=d.role_name;this.required=d.required;this.fieldType=d.type;this.placeholder=((e=d.settings)===null||e===void 0?void 0:e.placeholder)||"";this.value=((t=d.settings)===null||t===void 0?void 0:t.result)||"";this.leading=((o=d.settings)===null||o===void 0?void 0:o.leading)||0;this.setting=d.settings||{};this.options=((r=d.settings)===null||r===void 0?void 0:r.options)||[];this.dirty=false;this.loading=false;console.log("Displaying settings for",this.setting);return[3,5];case 4:p=f.sent();console.log("[FIELD PROPERTIES] Error loading template",p);this.loading=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(p.message,(s=p.response)===null||s===void 0?void 0:s.status,(n=p.response)===null||n===void 0?void 0:n.data));return[3,5];case 5:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var o,r,i,s,n;e.stopPropagation();var l=this.fieldStore.get("fields").find((function(e){return e.name===t.fieldName}));if(l){this.name=l.name;this.label=l.label;this.roleName=l.role_name;this.required=l.required;this.placeholder=((o=l.settings)===null||o===void 0?void 0:o.placeholder)||"";this.value=((r=l.settings)===null||r===void 0?void 0:r.result)||"";this.leading=((i=l.settings)===null||i===void 0?void 0:i.leading)||0}this.dirty=false;(s=this.close)===null||s===void 0?void 0:s.emit();(n=document.getElementById("verdocs-template-field-properties"))===null||n===void 0?void 0:n.remove()};e.prototype.handleSave=function(e){var t=this;e.stopPropagation();var o={name:this.name,label:this.label||null,required:this.required,role_name:this.roleName};if(this.type==="checkbox_group"||this.type==="radio_button_group"){o.settings=this.setting;o.settings.options=this.options}else if(this.type==="textarea"||this.type==="textbox"){o.settings=__assign({},this.setting);o.settings.result=(this.value||"").trim()}else if(this.type==="dropdown"){o.settings={x:this.setting.x,y:this.setting.y,options:this.options}}console.log("FP: Will update",this.fieldName,o);updateField(this.endpoint,this.templateId,this.fieldName,o).then((function(e){var r,i,s;t.dirty=false;updateStoreField(t.fieldStore,t.fieldName,e);(r=t.settingsChanged)===null||r===void 0?void 0:r.emit({fieldName:t.fieldName,settings:o,field:e});(i=t.close)===null||i===void 0?void 0:i.emit();(s=document.getElementById("verdocs-template-field-properties"))===null||s===void 0?void 0:s.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleAddOption=function(e){var t=this;e.stopPropagation();var o={name:this.name,required:this.required,role_name:this.roleName};this.options.push(this.type==="radio_button_group"?{id:uuidv4(),value:"Option ".concat(this.options.length+1),selected:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:uuidv4(),value:"Option ".concat(this.options.length+1),checked:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20});o.settings=__assign({},this.setting);delete o.settings.result;o.settings.options=__spreadArray([],this.options,true);updateField(this.endpoint,this.templateId,this.fieldName,o).then((function(e){var r,i,s;t.dirty=false;updateStoreField(t.fieldStore,t.fieldName,e);t.fieldName=e.name;(r=t.settingsChanged)===null||r===void 0?void 0:r.emit({fieldName:t.fieldName,settings:o,field:e});(i=t.close)===null||i===void 0?void 0:i.emit();(s=document.getElementById("verdocs-template-field-properties"))===null||s===void 0?void 0:s.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")){deleteField(this.endpoint,this.templateId,this.fieldName).then((function(){var e,o;t.fieldStore.set("fields",t.fieldStore.get("fields").filter((function(e){return e.name!==t.fieldName})));(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(o=document.getElementById("verdocs-template-field-properties"))===null||o===void 0?void 0:o.remove()})).catch((function(e){console.log("[FIELD PROPERTIES] Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!this.fieldStore.get("fields").some((function(t){return t.name===e.fieldName}))){return h(Host,{class:"empty"})}if(this.helpText&&this.showingHelp){return h(Host,null,h("h6",null,capitalize(this.fieldType)," Settings ",h("div",{style:{flex:"1"}}),h("div",{class:"help-icon",innerHTML:HelpIcon,onClick:function(){return e.showingHelp=false}})),h("p",{class:"instructions",innerHTML:this.helpText}))}return h(Host,{id:"verdocs-template-field-properties"},h("h6",null,capitalize(this.fieldType.replace(/_/g," "))," Settings ",h("div",{style:{flex:"1"}}),this.helpText&&h("div",{class:"help-icon",innerHTML:HelpIcon,onClick:function(){return e.showingHelp=true}})),h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{class:"row"},h("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}})),h("div",{class:"row"},h("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:function(t){e.label=t.target.value;e.dirty=true}})),h("div",{class:"row"},h("div",{class:"input-label"},"Role:"),h("verdocs-select-input",{value:this.roleName,options:(t=this.roleStore.state)===null||t===void 0?void 0:t.roles.map((function(e){return{label:e.name,value:e.name}})),onInput:function(t){e.roleName=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&h("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},h("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:function(t){e.value=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&h("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},h("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:function(t){e.placeholder=t.target.value;e.dirty=true}})),h("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},h("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),h("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:function(t){e.required=t.target.checked;e.dirty=true}})),["checkbox_group","radio_button_group"].includes(this.type)&&h("verdocs-button",{size:"small",onClick:function(t){return e.handleAddOption(t)},label:"Add Option"}),["dropdown"].includes(this.type)&&h("div",{class:"options"},h("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),h("div",{class:"row-header"},h("h6",null,"ID"),h("h6",null,"Label"),h("div",{style:{width:"34px"}})),this.options.map((function(t,o){return h("div",{class:"row option-row",key:o},h("verdocs-text-input",{id:"verdocs-option-id-".concat(t.id),value:t.id,placeholder:"Unique ID",onInput:function(t){e.options[o].id=t.target.value;e.dirty=true}}),h("verdocs-text-input",{id:"verdocs-option-value-".concat(t.id),value:t.value,placeholder:"Display value",onInput:function(t){e.options[o].value=t.target.value;e.dirty=true}}),h("button",{innerHTML:TrashIcon,class:"remove-button",onClick:function(){e.options=e.options.filter((function(e){return e.id!==t.id}));e.dirty=true}}))})),h("div",{class:"row-header"},h("button",{class:"add-option-button",onClick:function(){e.options=__spreadArray(__spreadArray([],e.options,true),[{id:"option-".concat(e.options.length+1),value:"Option ".concat(e.options.length+1)}],false);e.dirty=true}},"Add Option"))),h("div",{class:"buttons"},h("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:TrashIcon}),h("div",{style:{flex:"1"}}),h("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateFieldProperties.style=VerdocsTemplateFieldPropertiesStyle0;export{VerdocsCheckbox as verdocs_checkbox,VerdocsComponentError as verdocs_component_error,VerdocsPortal as verdocs_portal,VerdocsSelectInput as verdocs_select_input,VerdocsTemplateFieldProperties as verdocs_template_field_properties};
1
+ var __assign=this&&this.__assign||function(){__assign=Object.assign||function(e){for(var t,o=1,r=arguments.length;o<r;o++){t=arguments[o];for(var i in t)if(Object.prototype.hasOwnProperty.call(t,i))e[i]=t[i]}return e};return __assign.apply(this,arguments)};var __awaiter=this&&this.__awaiter||function(e,t,o,r){function i(e){return e instanceof o?e:new o((function(t){t(e)}))}return new(o||(o=Promise))((function(o,s){function n(e){try{a(r.next(e))}catch(e){s(e)}}function l(e){try{a(r["throw"](e))}catch(e){s(e)}}function a(e){e.done?o(e.value):i(e.value).then(n,l)}a((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var o={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,i,s,n;return n={next:l(0),throw:l(1),return:l(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function l(e){return function(t){return a([e,t])}}function a(l){if(r)throw new TypeError("Generator is already executing.");while(n&&(n=0,l[0]&&(o=0)),o)try{if(r=1,i&&(s=l[0]&2?i["return"]:l[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,l[1])).done)return s;if(i=0,s)l=[l[0]&2,s.value];switch(l[0]){case 0:case 1:s=l;break;case 4:o.label++;return{value:l[1],done:false};case 5:o.label++;i=l[1];l=[0];continue;case 7:l=o.ops.pop();o.trys.pop();continue;default:if(!(s=o.trys,s=s.length>0&&s[s.length-1])&&(l[0]===6||l[0]===2)){o=0;continue}if(l[0]===3&&(!s||l[1]>s[0]&&l[1]<s[3])){o.label=l[1];break}if(l[0]===6&&o.label<s[1]){o.label=s[1];s=l;break}if(s&&o.label<s[2]){o.label=s[2];o.ops.push(l);break}if(s[2])o.ops.pop();o.trys.pop();continue}l=t.call(e,o)}catch(e){l=[6,e];i=0}finally{r=s=0}if(l[0]&5)throw l[1];return{value:l[0]?l[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,o){if(o||arguments.length===2)for(var r=0,i=t.length,s;r<i;r++){if(s||!(r in t)){if(!s)s=Array.prototype.slice.call(t,0,r);s[r]=t[r]}}return e.concat(s||Array.prototype.slice.call(t))};import{r as registerInstance,h,H as Host,c as createEvent,g as getElement}from"./index-b89cf6a4.js";import{VerdocsEndpoint,updateField,deleteField}from"@verdocs/js-sdk";import{g as getTemplateFieldStore,u as updateStoreField}from"./TemplateFieldStore-d7516adf.js";import{g as getTemplateRoleStore}from"./TemplateRoleStore-ddc3b96f.js";import{g as getTemplateStore}from"./TemplateStore-df5484bb.js";import{S as SDKError}from"./errors-887f1e88.js";import"./index-296aabaf.js";import"./index-7456b04f.js";var verdocsCheckboxCss='@charset "UTF-8";@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-checkbox{line-height:18px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-checkbox label>input[type=checkbox]{display:none}verdocs-checkbox label>input[type=checkbox]+*::before{content:"";width:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:"✓";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}';var VerdocsCheckboxStyle0=verdocsCheckboxCss;var VerdocsCheckbox=function(){function e(e){registerInstance(this,e);this.checked=false;this.name="";this.label="";this.value="";this.theme="light";this.disabled=false}e.prototype.render=function(){var e;return h(Host,{key:"419474760206bae27e0ad8f578a0fb0d97702791",class:(e={disabled:this.disabled},e[this.theme]=true,e)},h("label",{key:"4cb5190cdc28bec1528637bfeeb130d392ce4347"},h("input",{key:"f032febf516c10b0540094f058a59031ce2c706b",type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),h("span",{key:"c089f80a6a1060d775c1a13d8cbe8a577287f329"},this.label)))};return e}();VerdocsCheckbox.style=VerdocsCheckboxStyle0;var verdocsComponentErrorCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-component-error{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;padding:15px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-component-error .inner{-ms-flex:1;flex:1;height:300px;display:-ms-flexbox;display:flex;font-size:18px;-webkit-box-sizing:border-box;box-sizing:border-box;padding:0 20px;background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}';var VerdocsComponentErrorStyle0=verdocsComponentErrorCss;var VerdocsComponentError=function(){function e(e){registerInstance(this,e);this.message=""}e.prototype.render=function(){return h(Host,{key:"af86792a4a2d09d2242645a1a8db657c5cd984bf"},h("div",{key:"52096cd84877537d50bea3e0e7a424e5d352c566",class:"inner"},this.message))};return e}();VerdocsComponentError.style=VerdocsComponentErrorStyle0;var verdocsPortalCss="@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}";var VerdocsPortalStyle0=verdocsPortalCss;var Z_INDEX="10001";var VerdocsPortal=function(){function e(e){registerInstance(this,e);this.clickAway=createEvent(this,"clickAway",7);this.moved=false;this.anchor=undefined;this.voffset=0;this.align="left"}e.prototype.handleScroll=function(){this.calculatePosition()};e.prototype.handleResize=function(){this.calculatePosition()};e.prototype.handleClick=function(e){var t;if(!this.element.contains(e.target)){(t=this.clickAway)===null||t===void 0?void 0:t.emit()}};e.prototype.calculateLeft=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();if(this.align==="left"){return Math.max(t.left,0)}if(this.align==="right"){return Math.max(t.left+t.width-this.portal.offsetWidth,0)}return Math.max(t.left-this.portal.offsetWidth/2+t.width/2,0)};e.prototype.calculateTop=function(){var e=document.getElementById(this.anchor);if(!e)return 0;var t=e.getBoundingClientRect();return t.bottom+this.voffset};e.prototype.calculatePosition=function(){this.portal.style.top="".concat(this.calculateTop(),"px");this.portal.style.left="".concat(this.calculateLeft(),"px")};e.prototype.componentWillLoad=function(){var e;var t="".concat(this.anchor,"-portal");(e=document.getElementById(t))===null||e===void 0?void 0:e.remove();this.portal=document.createElement("div");this.portal.setAttribute("id",t);this.portal.style.zIndex=Z_INDEX;this.portal.style.position="absolute";document.body.append(this.portal)};e.prototype.componentDidLoad=function(){this.portal.appendChild(this.element);this.calculatePosition()};e.prototype.disconnectedCallback=function(){this.moved?this.portal.remove():this.moved=true};e.prototype.render=function(){var e=this;return h(Host,{key:"80b497808d7c72fdb5786712abdd50d98f0ab160",ref:function(t){return e.element=t}},h("slot",{key:"d52fd1a7acd0d7f301ca2c9ba81b406a0107c3a0"}))};return e}();VerdocsPortal.style=VerdocsPortalStyle0;var verdocsSelectInputCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-select-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}';var VerdocsSelectInputStyle0=verdocsSelectInputCss;var VerdocsSelectInput=function(){function e(e){registerInstance(this,e);this.value="";this.label="";this.options=undefined;this.disabled=false}e.prototype.render=function(){var e=this;return h(Host,{key:"a353e008560aed3f922fc52d5c091d88cbe099a3",class:"input-field"},h("label",{key:"90a9b8244853fa2083f0d7fb1672ed204ed22a4c"},this.label?h("div",{class:"input-label"},this.label+":"):h("div",null),h("select",{key:"a68e1ea7b9f9b6f375b2d6c1df859708acc79bea",class:"input-element",disabled:this.disabled},this.options.map((function(t){return h("option",{value:t.value,selected:t.value===e.value},t.label)})))))};return e}();VerdocsSelectInput.style=VerdocsSelectInputStyle0;var verdocsTemplateFieldPropertiesCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-template-field-properties{padding:20px;display:block;border-radius:4px;background:#ffffff;border:1px solid #ccc;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275);box-shadow:2px 2px 10px 0px rgba(0, 0, 0, 0.1215686275)}verdocs-template-field-properties .buttons{display:-ms-flexbox;display:flex;margin-top:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-field-properties .buttons verdocs-button{margin-left:16px}verdocs-template-field-properties form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties form .row .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0;-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-select-input{-ms-flex:1;flex:1;margin:0}verdocs-template-field-properties verdocs-text-input{margin:0;-ms-flex:1;flex:1}verdocs-template-field-properties verdocs-text-input label{margin:0;display:-ms-flexbox;display:flex;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties verdocs-text-input .input-label{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-template-field-properties verdocs-text-input input{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .checkbox-wrapper{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-field-properties .delete-button{height:34px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .delete-button:active{background:#f3f3f3}verdocs-template-field-properties .delete-button svg{width:24px;height:24px}verdocs-template-field-properties h6{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;font-size:16px;font-weight:bold;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;color:#092c4c}verdocs-template-field-properties h6 .help-icon{opacity:0.5}verdocs-template-field-properties h6 .help-icon:hover{opacity:1;cursor:pointer}verdocs-template-field-properties .row-header{gap:15px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-template-field-properties .row-header h6{margin-bottom:0}verdocs-template-field-properties .row-header verdocs-help-icon{-webkit-transform:scale(0.85);transform:scale(0.85)}verdocs-template-field-properties .row-header verdocs-help-icon svg{margin-bottom:-5px}verdocs-template-field-properties .row-header .add-button{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-field-properties .row-header .add-button:hover{opacity:1}verdocs-template-field-properties .row-header .add-button svg{width:32px;height:32px}verdocs-template-field-properties .option-row{margin:15px 0}verdocs-template-field-properties .option-row .remove-button{height:28px;display:-ms-flexbox;display:flex;cursor:pointer;background:none;border-radius:4px;-ms-flex-align:center;align-items:center;border:1px solid #999;-ms-flex-pack:center;justify-content:center}verdocs-template-field-properties .option-row .remove-button:active{background:#f3f3f3}verdocs-template-field-properties .option-row .remove-button:hover svg{stroke:rgb(165, 0, 33)}verdocs-template-field-properties .option-row .remove-button svg{width:20px;height:20px;stroke:#333333}verdocs-template-field-properties .options{background:#f3f3f3;padding:0 0 10px 0}verdocs-template-field-properties .options .row-header,verdocs-template-field-properties .options .option-row{padding:0 10px}verdocs-template-field-properties .options .add-option-button{border-radius:5px;border:1px solid #cccccc;background:#46497d;color:#ffffff;padding:3px 8px}verdocs-template-field-properties .options .option-row .input-element{font-size:14px}verdocs-template-field-properties .options verdocs-help-icon{opacity:1;-webkit-transform:scale(0.8);transform:scale(0.8)}verdocs-template-field-properties .options verdocs-help-icon svg{fill:#ffffff}';var VerdocsTemplateFieldPropertiesStyle0=verdocsTemplateFieldPropertiesCss;var capitalize=function(e){return e.charAt(0).toUpperCase()+e.slice(1)};var TrashIcon='<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#a50021"><path stroke-linecap="round" stroke-linejoin="round" d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0" /></svg>';var HelpIcon='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';function generateWeakGuid(){var e=function(){return Math.floor((1+Math.random())*65536).toString(16).substring(1)};return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}var VerdocsTemplateFieldProperties=function(){function e(e){registerInstance(this,e);this.close=createEvent(this,"close",7);this.delete=createEvent(this,"delete",7);this.settingsChanged=createEvent(this,"settingsChanged",7);this.sdkError=createEvent(this,"sdkError",7);this.templateStore=null;this.fieldStore=null;this.roleStore=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.fieldName="";this.helpText="";this.dirty=false;this.loading=true;this.setting=null;this.label="";this.type="textbox";this.name="";this.required=false;this.roleName="";this.group="";this.fieldType="";this.options=[];this.placeholder="";this.value="";this.leading=0;this.showingHelp=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,o,r,i,s,n,l,a,c,d,p;var u=this;return __generator(this,(function(f){switch(f.label){case 0:f.trys.push([0,4,,5]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELD PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.fieldName){console.error("[FIELD PROPERTIES] Missing required field name");return[2]}if(!this.endpoint.session){console.log("[FIELD PROPERTIES] Unable to start builder session, must be authenticated");return[2]}l=this;return[4,getTemplateStore(this.endpoint,this.templateId)];case 1:l.templateStore=f.sent();a=this;return[4,getTemplateFieldStore(this.templateId)];case 2:a.fieldStore=f.sent();c=this;return[4,getTemplateRoleStore(this.templateId)];case 3:c.roleStore=f.sent();d=this.fieldStore.get("fields").find((function(e){return e.name===u.fieldName}));if(!d){console.log('[FIELD PROPERTIES] Unable to find field "'.concat(this.fieldName,'" in fields'))}else{console.log("props",d)}this.type=d.type;this.name=d.name;this.label=d.label;this.group=d.name;this.roleName=d.role_name;this.required=d.required;this.fieldType=d.type;this.placeholder=((e=d.settings)===null||e===void 0?void 0:e.placeholder)||"";this.value=((t=d.settings)===null||t===void 0?void 0:t.result)||"";this.leading=((o=d.settings)===null||o===void 0?void 0:o.leading)||0;this.setting=d.settings||{};this.options=((r=d.settings)===null||r===void 0?void 0:r.options)||[];this.dirty=false;this.loading=false;console.log("Displaying settings for",this.setting);return[3,5];case 4:p=f.sent();console.log("[FIELD PROPERTIES] Error loading template",p);this.loading=false;(i=this.sdkError)===null||i===void 0?void 0:i.emit(new SDKError(p.message,(s=p.response)===null||s===void 0?void 0:s.status,(n=p.response)===null||n===void 0?void 0:n.data));return[3,5];case 5:return[2]}}))}))};e.prototype.handleCancel=function(e){var t=this;var o,r,i,s,n;e.stopPropagation();var l=this.fieldStore.get("fields").find((function(e){return e.name===t.fieldName}));if(l){this.name=l.name;this.label=l.label;this.roleName=l.role_name;this.required=l.required;this.placeholder=((o=l.settings)===null||o===void 0?void 0:o.placeholder)||"";this.value=((r=l.settings)===null||r===void 0?void 0:r.result)||"";this.leading=((i=l.settings)===null||i===void 0?void 0:i.leading)||0}this.dirty=false;(s=this.close)===null||s===void 0?void 0:s.emit();(n=document.getElementById("verdocs-template-field-properties"))===null||n===void 0?void 0:n.remove()};e.prototype.handleSave=function(e){var t=this;e.stopPropagation();var o={name:this.name,label:this.label||null,required:this.required,role_name:this.roleName};if(this.type==="checkbox_group"||this.type==="radio_button_group"){o.settings=this.setting;o.settings.options=this.options}else if(this.type==="textarea"||this.type==="textbox"){o.settings=__assign({},this.setting);o.settings.result=(this.value||"").trim()}else if(this.type==="dropdown"){o.settings={x:this.setting.x,y:this.setting.y,options:this.options}}console.log("FP: Will update",this.fieldName,o);updateField(this.endpoint,this.templateId,this.fieldName,o).then((function(e){var r,i,s;t.dirty=false;updateStoreField(t.fieldStore,t.fieldName,e);(r=t.settingsChanged)===null||r===void 0?void 0:r.emit({fieldName:t.fieldName,settings:o,field:e});(i=t.close)===null||i===void 0?void 0:i.emit();(s=document.getElementById("verdocs-template-field-properties"))===null||s===void 0?void 0:s.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleAddOption=function(e){var t=this;e.stopPropagation();var o={name:this.name,required:this.required,role_name:this.roleName};this.options.push(this.type==="radio_button_group"?{id:generateWeakGuid(),value:"Option ".concat(this.options.length+1),selected:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20}:{id:generateWeakGuid(),value:"Option ".concat(this.options.length+1),checked:false,x:this.options.length>0?this.options[this.options.length-1].x:20,y:this.options.length>0?this.options[this.options.length-1].y-25:20});o.settings=__assign({},this.setting);delete o.settings.result;o.settings.options=__spreadArray([],this.options,true);updateField(this.endpoint,this.templateId,this.fieldName,o).then((function(e){var r,i,s;t.dirty=false;updateStoreField(t.fieldStore,t.fieldName,e);t.fieldName=e.name;(r=t.settingsChanged)===null||r===void 0?void 0:r.emit({fieldName:t.fieldName,settings:o,field:e});(i=t.close)===null||i===void 0?void 0:i.emit();(s=document.getElementById("verdocs-template-field-properties"))===null||s===void 0?void 0:s.remove()})).catch((function(){console.log("Field update failed",e)}))};e.prototype.handleDelete=function(e){return __awaiter(this,void 0,void 0,(function(){var t=this;return __generator(this,(function(o){e.stopPropagation();if(window.confirm("Are you sure you wish to remove this field? This action cannot be undone.")){deleteField(this.endpoint,this.templateId,this.fieldName).then((function(){var e,o;t.fieldStore.set("fields",t.fieldStore.get("fields").filter((function(e){return e.name!==t.fieldName})));(e=t.delete)===null||e===void 0?void 0:e.emit({templateId:t.templateId,roleName:t.roleName});(o=document.getElementById("verdocs-template-field-properties"))===null||o===void 0?void 0:o.remove()})).catch((function(e){console.log("[FIELD PROPERTIES] Deletion error",e)}))}return[2]}))}))};e.prototype.render=function(){var e=this;var t;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!this.fieldStore.get("fields").some((function(t){return t.name===e.fieldName}))){return h(Host,{class:"empty"})}if(this.helpText&&this.showingHelp){return h(Host,null,h("h6",null,capitalize(this.fieldType)," Settings ",h("div",{style:{flex:"1"}}),h("div",{class:"help-icon",innerHTML:HelpIcon,onClick:function(){return e.showingHelp=false}})),h("p",{class:"instructions",innerHTML:this.helpText}))}return h(Host,{id:"verdocs-template-field-properties"},h("h6",null,capitalize(this.fieldType.replace(/_/g," "))," Settings ",h("div",{style:{flex:"1"}}),this.helpText&&h("div",{class:"help-icon",innerHTML:HelpIcon,onClick:function(){return e.showingHelp=true}})),h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("div",{class:"row"},h("verdocs-text-input",{id:"verdocs-field-name",label:"Field Name",value:this.name,autocomplete:"off",placeholder:"Field Name...",onInput:function(t){e.name=t.target.value;e.dirty=true}})),h("div",{class:"row"},h("verdocs-text-input",{id:"verdocs-field-label",label:"Optional Label",value:this.label,autocomplete:"off",placeholder:"Optional Label...",onInput:function(t){e.label=t.target.value;e.dirty=true}})),h("div",{class:"row"},h("div",{class:"input-label"},"Role:"),h("verdocs-select-input",{value:this.roleName,options:(t=this.roleStore.state)===null||t===void 0?void 0:t.roles.map((function(e){return{label:e.name,value:e.name}})),onInput:function(t){e.roleName=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&h("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},h("verdocs-text-input",{id:"verdocs-field-value",label:"Value",value:this.value,autocomplete:"off",placeholder:"Pre-defined value...",onInput:function(t){e.value=t.target.value;e.dirty=true}})),["textbox","textarea"].includes(this.type)&&h("div",{class:"row",style:{marginTop:"10px",marginBottom:"10px"}},h("verdocs-text-input",{id:"verdocs-field-placeholder",label:"Placeholder",value:this.placeholder,autocomplete:"off",placeholder:"Placeholder...",onInput:function(t){e.placeholder=t.target.value;e.dirty=true}})),h("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px"}},h("label",{htmlFor:"verdocs-is-required",class:"input-label"},"Required"),h("verdocs-checkbox",{id:"verdocs-is-required",name:"is-required",checked:this.required,value:"on",onInput:function(t){e.required=t.target.checked;e.dirty=true}})),["checkbox_group","radio_button_group"].includes(this.type)&&h("verdocs-button",{size:"small",onClick:function(t){return e.handleAddOption(t)},label:"Add Option"}),["dropdown"].includes(this.type)&&h("div",{class:"options"},h("div",{class:"row",style:{marginTop:"15px",marginBottom:"15px",textAlign:"center",fontWeight:"700",fontSize:"14px",justifyContent:"center",backgroundColor:"#333333",padding:"5px 8px",color:"#ffffff"}},"Options"),h("div",{class:"row-header"},h("h6",null,"ID"),h("h6",null,"Label"),h("div",{style:{width:"34px"}})),this.options.map((function(t,o){return h("div",{class:"row option-row",key:o},h("verdocs-text-input",{id:"verdocs-option-id-".concat(t.id),value:t.id,placeholder:"Unique ID",onInput:function(t){e.options[o].id=t.target.value;e.dirty=true}}),h("verdocs-text-input",{id:"verdocs-option-value-".concat(t.id),value:t.value,placeholder:"Display value",onInput:function(t){e.options[o].value=t.target.value;e.dirty=true}}),h("button",{innerHTML:TrashIcon,class:"remove-button",onClick:function(){e.options=e.options.filter((function(e){return e.id!==t.id}));e.dirty=true}}))})),h("div",{class:"row-header"},h("button",{class:"add-option-button",onClick:function(){e.options=__spreadArray(__spreadArray([],e.options,true),[{id:"option-".concat(e.options.length+1),value:"Option ".concat(e.options.length+1)}],false);e.dirty=true}},"Add Option"))),h("div",{class:"buttons"},h("button",{class:"delete-button",disabled:this.dirty,onClick:function(t){return e.handleDelete(t)},innerHTML:TrashIcon}),h("div",{style:{flex:"1"}}),h("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))))};Object.defineProperty(e.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return e}();VerdocsTemplateFieldProperties.style=VerdocsTemplateFieldPropertiesStyle0;export{VerdocsCheckbox as verdocs_checkbox,VerdocsComponentError as verdocs_component_error,VerdocsPortal as verdocs_portal,VerdocsSelectInput as verdocs_select_input,VerdocsTemplateFieldProperties as verdocs_template_field_properties};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b89cf6a4.js";var verdocsDropdownCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-dropdown{display:block;position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}#verdocs-dropdown-menu-items{width:200px;z-index:10000;position:absolute;border-radius:5px;background:#33354c;border:1px solid #654dcb}.verdocs-dropdown-menu-separator{height:1px;margin-top:5px;padding-top:5px;border-top:1px solid rgba(255, 255, 255, 0.3725490196)}.verdocs-dropdown-menu-option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}.verdocs-dropdown-menu-option:hover{cursor:pointer;background:#55bc81}.verdocs-dropdown-menu-option[disabled]{color:#aaaaaa}.verdocs-dropdown-menu-option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}';var VerdocsDropdownStyle0=verdocsDropdownCss;var MENU_ID="verdocs-dropdown-menu-items";var DropdownArrow='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>';function debounce(o,r,e){var n;return function(){var d=this,t=arguments;var i=function(){n=null;if(!e)o.apply(d,t)};var a=e&&!n;clearTimeout(n);n=setTimeout(i,r);if(a)o.apply(d,t)}}var VerdocsDropdown=function(){function o(o){registerInstance(this,o);this.optionSelected=createEvent(this,"optionSelected",7);this.options=[]}o.prototype.handleResize=function(){debounce(this.repositionDropdown.bind(this),100)};o.prototype.handleSelectOption=function(o,r){var e;o.stopPropagation();(e=this.optionSelected)===null||e===void 0?void 0:e.emit(r);this.hide()};o.prototype.repositionDropdown=function(){var o,r;var e=document.getElementById(MENU_ID);if(e){var n=document.body.scrollWidth;var d=(o=this.dropdownButton)===null||o===void 0?void 0:o.getBoundingClientRect();var t=((r=this.dropdownButton)===null||r===void 0?void 0:r.offsetWidth)||28;console.log("Repositioning dropdown",{bodyWidth:n,buttonRect:d,triggerHeight:t},e);e.style.top="".concat(((d===null||d===void 0?void 0:d.top)||0)+t,"px");e.style.right="".concat(Math.max(0,n-((d===null||d===void 0?void 0:d.right)||0)),"px")}};o.prototype.showDropdown=function(){var o=this;this.hide();var r=document.createElement("div");r.id=MENU_ID;this.options.forEach((function(e){if(!e.label){var n=document.createElement("div");n.className="verdocs-dropdown-menu-separator";r.appendChild(n)}else{var d=document.createElement("button");d.className="verdocs-dropdown-menu-option";d.disabled=e.disabled||false;d.innerHTML=e.label;d.addEventListener("click",(function(r){return o.handleSelectOption(r,e)}));r.appendChild(d)}}));document.body.appendChild(r);setTimeout(this.repositionDropdown.bind(this),50)};o.prototype.toggle=function(o){o.stopPropagation();if(document.getElementById(MENU_ID)){this.hide()}else{this.showDropdown()}};o.prototype.hide=function(){var o;(o=document.getElementById(MENU_ID))===null||o===void 0?void 0:o.remove()};o.prototype.render=function(){var o=this;return h(Host,{key:"ba41da3a28f1fb5b36c6918967fad5297cedf8dd"},h("button",{key:"8f10c96d7e108f79115c8b4b309c7e02ab5f37f6",class:"arrow",innerHTML:DropdownArrow,"aria-label":"Open Menu",onClick:function(r){return o.toggle(r)},ref:function(r){return o.dropdownButton=r}}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();VerdocsDropdown.style=VerdocsDropdownStyle0;export{VerdocsDropdown as verdocs_dropdown};
1
+ import{r as registerInstance,c as createEvent,h,H as Host,g as getElement}from"./index-b89cf6a4.js";var verdocsDropdownCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-dropdown{display:block;position:relative;font-family:"Inter", "Barlow", sans-serif}verdocs-dropdown .arrow{width:32px;height:26px;background:#fff;cursor:pointer;border-radius:4px;-ms-flex-align:center;align-items:center;display:-ms-inline-flexbox;display:inline-flex;border:1px solid #cccccc;-ms-flex-pack:center;justify-content:center}verdocs-dropdown .arrow svg{fill:#55bc81;-webkit-transition:0.3s;transition:0.3s}verdocs-dropdown.open .arrow{background:#4c56cb;border:1px solid #707ae5}verdocs-dropdown.open .arrow svg{-webkit-transform:scaleY(-1);transform:scaleY(-1);fill:#fff}#verdocs-dropdown-menu-items{width:200px;z-index:10000;position:absolute;border-radius:5px;background:#33354c;border:1px solid #654dcb}.verdocs-dropdown-menu-separator{height:1px;margin-top:5px;padding-top:5px;border-top:1px solid rgba(255, 255, 255, 0.3725490196)}.verdocs-dropdown-menu-option{width:100%;color:#fff;border:none;display:block;text-align:left;background:none;padding:10px 20px}.verdocs-dropdown-menu-option:hover{cursor:pointer;background:#55bc81}.verdocs-dropdown-menu-option[disabled]{color:#aaaaaa}.verdocs-dropdown-menu-option[disabled]:hover{cursor:inherit;background:transparent;color:#aaaaaa}';var VerdocsDropdownStyle0=verdocsDropdownCss;var MENU_ID="verdocs-dropdown-menu-items";var DropdownArrow='<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#50BE80"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M7 10l5 5 5-5H7z"/></svg>';function debounce(o,r,e){var n;return function(){var d=this,t=arguments;var i=function(){n=null;if(!e)o.apply(d,t)};var a=e&&!n;clearTimeout(n);n=setTimeout(i,r);if(a)o.apply(d,t)}}var VerdocsDropdown=function(){function o(o){registerInstance(this,o);this.optionSelected=createEvent(this,"optionSelected",7);this.options=[]}o.prototype.handleResize=function(){debounce(this.repositionDropdown.bind(this),100)};o.prototype.handleSelectOption=function(o,r){var e;o.stopPropagation();(e=this.optionSelected)===null||e===void 0?void 0:e.emit(r);this.hide()};o.prototype.repositionDropdown=function(){var o,r;var e=document.getElementById(MENU_ID);if(e){var n=document.body.scrollWidth;var d=(o=this.dropdownButton)===null||o===void 0?void 0:o.getBoundingClientRect();var t=((r=this.dropdownButton)===null||r===void 0?void 0:r.offsetWidth)||28;console.log("Repositioning dropdown",{bodyWidth:n,buttonRect:d,triggerHeight:t},e);e.style.top="".concat(((d===null||d===void 0?void 0:d.top)||0)+t,"px");e.style.right="".concat(Math.max(0,n-((d===null||d===void 0?void 0:d.right)||0)),"px")}};o.prototype.showDropdown=function(){var o=this;this.hide();var r=document.createElement("div");r.id=MENU_ID;this.options.forEach((function(e){if(!e.label){var n=document.createElement("div");n.className="verdocs-dropdown-menu-separator";r.appendChild(n)}else{var d=document.createElement("button");d.className="verdocs-dropdown-menu-option";d.disabled=e.disabled||false;d.innerHTML=e.label;d.addEventListener("click",(function(r){return o.handleSelectOption(r,e)}));r.appendChild(d)}}));document.body.appendChild(r);setTimeout(this.repositionDropdown.bind(this),50)};o.prototype.toggle=function(o){o.stopPropagation();if(document.getElementById(MENU_ID)){this.hide()}else{this.showDropdown()}};o.prototype.hide=function(){var o;(o=document.getElementById(MENU_ID))===null||o===void 0?void 0:o.remove()};o.prototype.render=function(){var o=this;return h(Host,{key:"068386cdca529f310e7914d475739ca9a574d02d"},h("button",{key:"557fe893e3123fdff6251992c14a3a803451fd30",class:"arrow",innerHTML:DropdownArrow,"aria-label":"Open Menu",onClick:function(r){return o.toggle(r)},ref:function(r){return o.dropdownButton=r}}))};Object.defineProperty(o.prototype,"el",{get:function(){return getElement(this)},enumerable:false,configurable:true});return o}();VerdocsDropdown.style=VerdocsDropdownStyle0;export{VerdocsDropdown as verdocs_dropdown};
@@ -1 +1 @@
1
- import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b89cf6a4.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";import{u as unicodeNBSP}from"./Icons-faf0377f.js";var verdocsFileChooserCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}';var VerdocsFileChooserStyle0=verdocsFileChooserCss;var VerdocsFileChooser=function(){function e(e){registerInstance(this,e);this.fileSelected=createEvent(this,"fileSelected",7);this.endpoint=VerdocsEndpoint.getDefault();this.file=undefined}e.prototype.handleFileChanged=function(e){var o,r;this.file=((o=e.target.files)===null||o===void 0?void 0:o[0])||null;(r=this.fileSelected)===null||r===void 0?void 0:r.emit({file:this.file});console.debug("[CHOOSER] Selected file",this.file)};e.prototype.handleSelectFile=function(e){var o,r;e.stopPropagation();this.file=null;(o=this.fileSelected)===null||o===void 0?void 0:o.emit({file:null});(r=document.getElementById("verdocs-file-chooser"))===null||r===void 0?void 0:r.click()};e.prototype.render=function(){var e=this;var o=this.file?"Select a different file":"Select a file from your computer";return h(Host,{key:"f8febf3e2ed17a5997e9e97aad97a83ecd5a0bb2"},h("input",{key:"b151b6e4a19521ecb95b40a7b414c6ffd3e7c74b",type:"file",multiple:true,id:"verdocs-file-chooser",accept:"application/pdf,.pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",style:{display:"none"},onChange:function(o){return e.handleFileChanged(o)}}),h("div",{key:"9aa5d9b06f54f4479afb9276702632c695d24d0f",class:"upload-box"},h("div",{key:"769adcb7a66ae0357e581909978fc18e5cca75ab",class:"selected-filename"},this.file?this.file.name:"Drag a file here"),h("div",{key:"d50342ec030cf44a608b7e13e480015c63822ea7",class:"or-prefer"},this.file?unicodeNBSP:"Or, if you prefer..."),h("verdocs-button",{key:"d6a883649258392cb922a4b0a4901e526017bf5f",label:o,size:"small",onClick:function(o){return e.handleSelectFile(o)}})))};return e}();VerdocsFileChooser.style=VerdocsFileChooserStyle0;var verdocsProgressBarCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-progress-bar{font-family:"Inter", "Barlow", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}';var VerdocsProgressBarStyle0=verdocsProgressBarCss;var VerdocsProgressBar=function(){function e(e){registerInstance(this,e);this.label="";this.showPercent=false;this.percent=0}e.prototype.render=function(){var e=Math.ceil(100*Math.min(this.percent,100)/100);return h(Host,{key:"3c48e5a6c30688c72bbeaa00b3d0fdf8cba1c765"},h("div",{key:"f64ac74d3ca62bac1aa859e2d6abd3d94c8efd48",class:"labels"},this.label&&h("div",{key:"018cd8a64169ca83e6702eab88d187ad2a0cb50e",class:"label"},this.label),this.showPercent&&h("div",{key:"550104a8505d437df7248adb11fd97aaa9e72ef9",class:"label"},this.percent,"%")),h("div",{key:"11cc23dad95af23bbf84022312dc760b15fe4b70",class:"bar"},h("div",{key:"168c45390049adeb97996699aab0708c19ccb4f7",class:"slider",style:{width:"".concat(e,"%")}})))};return e}();VerdocsProgressBar.style=VerdocsProgressBarStyle0;export{VerdocsFileChooser as verdocs_file_chooser,VerdocsProgressBar as verdocs_progress_bar};
1
+ import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b89cf6a4.js";import{VerdocsEndpoint}from"@verdocs/js-sdk";import{u as unicodeNBSP}from"./Icons-faf0377f.js";var verdocsFileChooserCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}';var VerdocsFileChooserStyle0=verdocsFileChooserCss;var VerdocsFileChooser=function(){function e(e){registerInstance(this,e);this.fileSelected=createEvent(this,"fileSelected",7);this.endpoint=VerdocsEndpoint.getDefault();this.file=undefined}e.prototype.handleFileChanged=function(e){var o,r;this.file=((o=e.target.files)===null||o===void 0?void 0:o[0])||null;(r=this.fileSelected)===null||r===void 0?void 0:r.emit({file:this.file});console.debug("[CHOOSER] Selected file",this.file)};e.prototype.handleSelectFile=function(e){var o,r;e.stopPropagation();this.file=null;(o=this.fileSelected)===null||o===void 0?void 0:o.emit({file:null});(r=document.getElementById("verdocs-file-chooser"))===null||r===void 0?void 0:r.click()};e.prototype.render=function(){var e=this;var o=this.file?"Select a different file":"Select a file from your computer";return h(Host,{key:"870f83d51356099942aeb7f50680bff38b946e74"},h("input",{key:"a4177207b2d87dd1d7e26093b93e36858a296f65",type:"file",multiple:true,id:"verdocs-file-chooser",accept:"application/pdf,.pdf,.doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document",style:{display:"none"},onChange:function(o){return e.handleFileChanged(o)}}),h("div",{key:"57e6c23406d1a12bc7b426fe76469c83925692ed",class:"upload-box"},h("div",{key:"6b05c0bc019af781b632b91761e96b48a7e99623",class:"selected-filename"},this.file?this.file.name:"Drag a file here"),h("div",{key:"b1ab95cb7d5a19c2d5c3e3a48c073a954bbed454",class:"or-prefer"},this.file?unicodeNBSP:"Or, if you prefer..."),h("verdocs-button",{key:"bec299eef4e98464c0cd76180c8b2af875ee6243",label:o,size:"small",onClick:function(o){return e.handleSelectFile(o)}})))};return e}();VerdocsFileChooser.style=VerdocsFileChooserStyle0;var verdocsProgressBarCss='@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-progress-bar{font-family:"Inter", "Barlow", sans-serif;width:100%;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-progress-bar .labels{display:-ms-flexbox;display:flex;margin:0 0 8px 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:justify;justify-content:space-between}verdocs-progress-bar .labels .label{display:-ms-flexbox;display:flex;font-size:14px;font-weight:600;color:#33364b}verdocs-progress-bar .bar{display:-ms-flexbox;display:flex;-ms-flex:0 0 10px;flex:0 0 10px;border-radius:5px;background-color:#cccccc}verdocs-progress-bar .bar .slider{display:-ms-flexbox;display:flex;border-radius:5px;background-color:#55bc81}';var VerdocsProgressBarStyle0=verdocsProgressBarCss;var VerdocsProgressBar=function(){function e(e){registerInstance(this,e);this.label="";this.showPercent=false;this.percent=0}e.prototype.render=function(){var e=Math.ceil(100*Math.min(this.percent,100)/100);return h(Host,{key:"3c48e5a6c30688c72bbeaa00b3d0fdf8cba1c765"},h("div",{key:"f64ac74d3ca62bac1aa859e2d6abd3d94c8efd48",class:"labels"},this.label&&h("div",{key:"018cd8a64169ca83e6702eab88d187ad2a0cb50e",class:"label"},this.label),this.showPercent&&h("div",{key:"550104a8505d437df7248adb11fd97aaa9e72ef9",class:"label"},this.percent,"%")),h("div",{key:"11cc23dad95af23bbf84022312dc760b15fe4b70",class:"bar"},h("div",{key:"168c45390049adeb97996699aab0708c19ccb4f7",class:"slider",style:{width:"".concat(e,"%")}})))};return e}();VerdocsProgressBar.style=VerdocsProgressBarStyle0;export{VerdocsFileChooser as verdocs_file_chooser,VerdocsProgressBar as verdocs_progress_bar};
@@ -1,22 +1,3 @@
1
- /**
2
- * Display a simple button.
3
- *
4
- * Three variants are supported. `standard` and `outline` buttons look like traditional form buttons and are ideal candidates for 'Ok' and
5
- * 'Cancel' options in most cases. `text` buttons are intended to be used inline in content blocks or for more subtle button options.
6
- * (Auth uses text buttons for the Forgot Password and Sign Up options.)
7
- *
8
- * Four sizes are also supported. Most use cases will call for the `normal` size, but a `small` size is ideal for more subtle controls, such
9
- * as pagination or other secondary functions. `medium` buttons are slightly larger to provide balance in forms where other items are also
10
- * bigger, and `large` buttons are for cases where the page has mostly white-space and the buttons need to fill more space.
11
- *
12
- * Icons may be placed either before ("start") or after ("end") the button label. Icons should be SVG objects passed as strings and will
13
- * be rendered as HTML inside the button label area. It is important that the root <SVG> tag contains a default `fill="#ffffff"` setting
14
- * for the base color, and that child elements below it do not. This allows the button color to carry into the icon properly.
15
- *
16
- * ```html
17
- * <verdocs-button label="OK" onClick={() => (console.log('OK clicked'))} />
18
- * ```
19
- */
20
1
  export declare class VerdocsButton {
21
2
  /**
22
3
  * The label for the button.
@@ -1,14 +1,4 @@
1
1
  import { Instance } from '@popperjs/core';
2
- /**
3
- * Displays a clickable icon suitable for display in a toolbar. When clicked, a customizable drop-down panel will be
4
- * displayed.
5
- *
6
- * ```html
7
- * <verdocs-button-panel icon="<svg.../>">
8
- * <div class="content">...</div>
9
- * </verdocs-button-panel>
10
- * ```
11
- */
12
2
  export declare class VerdocsButtonPanel {
13
3
  iconEl: HTMLDivElement;
14
4
  panelEl: HTMLDivElement;
@@ -5,22 +5,6 @@ export interface IMenuOption {
5
5
  faIcon?: any;
6
6
  disabled?: boolean;
7
7
  }
8
- /**
9
- * Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden
10
- * when the button is pressed again, or an option is selected. Separators may be created by supplying an entry with an empty label.
11
- *
12
- * ```html
13
- * <verdocs-dropdown
14
- * options={[
15
- * {label: 'Option 1', disabled: true},
16
- * {label: 'Option 2', id: '2'}
17
- * {label: ''}
18
- * {label: 'Option 3', id: '2'}
19
- * ]}
20
- * label="OK" onClick={() => (console.log('OK clicked'))}
21
- * />
22
- * ```
23
- */
24
8
  export declare class VerdocsDropdown {
25
9
  el: HTMLElement;
26
10
  private dropdownButton?;
@@ -1,9 +1,5 @@
1
1
  import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
2
  import { EventEmitter } from '../../../stencil-public-runtime';
3
- /**
4
- * Displays a file picker to upload an attachment. This component is just the picker - the host application or component should
5
- * provide the actual upload functionality.
6
- */
7
3
  export declare class VerdocsFileChooser {
8
4
  /**
9
5
  * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
@@ -117,21 +117,6 @@ export namespace Components {
117
117
  */
118
118
  "templateId": string | null;
119
119
  }
120
- /**
121
- * Display a simple button.
122
- * Three variants are supported. `standard` and `outline` buttons look like traditional form buttons and are ideal candidates for 'Ok' and
123
- * 'Cancel' options in most cases. `text` buttons are intended to be used inline in content blocks or for more subtle button options.
124
- * (Auth uses text buttons for the Forgot Password and Sign Up options.)
125
- * Four sizes are also supported. Most use cases will call for the `normal` size, but a `small` size is ideal for more subtle controls, such
126
- * as pagination or other secondary functions. `medium` buttons are slightly larger to provide balance in forms where other items are also
127
- * bigger, and `large` buttons are for cases where the page has mostly white-space and the buttons need to fill more space.
128
- * Icons may be placed either before ("start") or after ("end") the button label. Icons should be SVG objects passed as strings and will
129
- * be rendered as HTML inside the button label area. It is important that the root <SVG> tag contains a default `fill="#ffffff"` setting
130
- * for the base color, and that child elements below it do not. This allows the button color to carry into the icon properly.
131
- * ```html
132
- * <verdocs-button label="OK" onClick={() => (console.log('OK clicked'))} />
133
- * ```
134
- */
135
120
  interface VerdocsButton {
136
121
  /**
137
122
  * Whether the button should be disabled.
@@ -162,15 +147,6 @@ export namespace Components {
162
147
  */
163
148
  "variant": 'standard' | 'text' | 'outline';
164
149
  }
165
- /**
166
- * Displays a clickable icon suitable for display in a toolbar. When clicked, a customizable drop-down panel will be
167
- * displayed.
168
- * ```html
169
- * <verdocs-button-panel icon="<svg.../>">
170
- * <div class="content">...</div>
171
- * </verdocs-button-panel>
172
- * ```
173
- */
174
150
  interface VerdocsButtonPanel {
175
151
  "hidePanel": () => Promise<void>;
176
152
  /**
@@ -257,21 +233,6 @@ export namespace Components {
257
233
  */
258
234
  interface VerdocsDialog {
259
235
  }
260
- /**
261
- * Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden
262
- * when the button is pressed again, or an option is selected. Separators may be created by supplying an entry with an empty label.
263
- * ```html
264
- * <verdocs-dropdown
265
- * options={[
266
- * {label: 'Option 1', disabled: true},
267
- * {label: 'Option 2', id: '2'}
268
- * {label: ''}
269
- * {label: 'Option 3', id: '2'}
270
- * ]}
271
- * label="OK" onClick={() => (console.log('OK clicked'))}
272
- * />
273
- * ```
274
- */
275
236
  interface VerdocsDropdown {
276
237
  /**
277
238
  * The menu options to display.
@@ -926,10 +887,6 @@ export namespace Components {
926
887
  */
927
888
  "yscale"?: number;
928
889
  }
929
- /**
930
- * Displays a file picker to upload an attachment. This component is just the picker - the host application or component should
931
- * provide the actual upload functionality.
932
- */
933
890
  interface VerdocsFileChooser {
934
891
  /**
935
892
  * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
@@ -2146,36 +2103,12 @@ declare global {
2146
2103
  prototype: HTMLVerdocsBuildElement;
2147
2104
  new (): HTMLVerdocsBuildElement;
2148
2105
  };
2149
- /**
2150
- * Display a simple button.
2151
- * Three variants are supported. `standard` and `outline` buttons look like traditional form buttons and are ideal candidates for 'Ok' and
2152
- * 'Cancel' options in most cases. `text` buttons are intended to be used inline in content blocks or for more subtle button options.
2153
- * (Auth uses text buttons for the Forgot Password and Sign Up options.)
2154
- * Four sizes are also supported. Most use cases will call for the `normal` size, but a `small` size is ideal for more subtle controls, such
2155
- * as pagination or other secondary functions. `medium` buttons are slightly larger to provide balance in forms where other items are also
2156
- * bigger, and `large` buttons are for cases where the page has mostly white-space and the buttons need to fill more space.
2157
- * Icons may be placed either before ("start") or after ("end") the button label. Icons should be SVG objects passed as strings and will
2158
- * be rendered as HTML inside the button label area. It is important that the root <SVG> tag contains a default `fill="#ffffff"` setting
2159
- * for the base color, and that child elements below it do not. This allows the button color to carry into the icon properly.
2160
- * ```html
2161
- * <verdocs-button label="OK" onClick={() => (console.log('OK clicked'))} />
2162
- * ```
2163
- */
2164
2106
  interface HTMLVerdocsButtonElement extends Components.VerdocsButton, HTMLStencilElement {
2165
2107
  }
2166
2108
  var HTMLVerdocsButtonElement: {
2167
2109
  prototype: HTMLVerdocsButtonElement;
2168
2110
  new (): HTMLVerdocsButtonElement;
2169
2111
  };
2170
- /**
2171
- * Displays a clickable icon suitable for display in a toolbar. When clicked, a customizable drop-down panel will be
2172
- * displayed.
2173
- * ```html
2174
- * <verdocs-button-panel icon="<svg.../>">
2175
- * <div class="content">...</div>
2176
- * </verdocs-button-panel>
2177
- * ```
2178
- */
2179
2112
  interface HTMLVerdocsButtonPanelElement extends Components.VerdocsButtonPanel, HTMLStencilElement {
2180
2113
  }
2181
2114
  var HTMLVerdocsButtonPanelElement: {
@@ -2262,21 +2195,6 @@ declare global {
2262
2195
  interface HTMLVerdocsDropdownElementEventMap {
2263
2196
  "optionSelected": IMenuOption;
2264
2197
  }
2265
- /**
2266
- * Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden
2267
- * when the button is pressed again, or an option is selected. Separators may be created by supplying an entry with an empty label.
2268
- * ```html
2269
- * <verdocs-dropdown
2270
- * options={[
2271
- * {label: 'Option 1', disabled: true},
2272
- * {label: 'Option 2', id: '2'}
2273
- * {label: ''}
2274
- * {label: 'Option 3', id: '2'}
2275
- * ]}
2276
- * label="OK" onClick={() => (console.log('OK clicked'))}
2277
- * />
2278
- * ```
2279
- */
2280
2198
  interface HTMLVerdocsDropdownElement extends Components.VerdocsDropdown, HTMLStencilElement {
2281
2199
  addEventListener<K extends keyof HTMLVerdocsDropdownElementEventMap>(type: K, listener: (this: HTMLVerdocsDropdownElement, ev: VerdocsDropdownCustomEvent<HTMLVerdocsDropdownElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2282
2200
  addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -2657,10 +2575,6 @@ declare global {
2657
2575
  interface HTMLVerdocsFileChooserElementEventMap {
2658
2576
  "fileSelected": {file: File | null};
2659
2577
  }
2660
- /**
2661
- * Displays a file picker to upload an attachment. This component is just the picker - the host application or component should
2662
- * provide the actual upload functionality.
2663
- */
2664
2578
  interface HTMLVerdocsFileChooserElement extends Components.VerdocsFileChooser, HTMLStencilElement {
2665
2579
  addEventListener<K extends keyof HTMLVerdocsFileChooserElementEventMap>(type: K, listener: (this: HTMLVerdocsFileChooserElement, ev: VerdocsFileChooserCustomEvent<HTMLVerdocsFileChooserElementEventMap[K]>) => any, options?: boolean | AddEventListenerOptions): void;
2666
2580
  addEventListener<K extends keyof DocumentEventMap>(type: K, listener: (this: Document, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void;
@@ -3877,21 +3791,6 @@ declare namespace LocalJSX {
3877
3791
  */
3878
3792
  "templateId"?: string | null;
3879
3793
  }
3880
- /**
3881
- * Display a simple button.
3882
- * Three variants are supported. `standard` and `outline` buttons look like traditional form buttons and are ideal candidates for 'Ok' and
3883
- * 'Cancel' options in most cases. `text` buttons are intended to be used inline in content blocks or for more subtle button options.
3884
- * (Auth uses text buttons for the Forgot Password and Sign Up options.)
3885
- * Four sizes are also supported. Most use cases will call for the `normal` size, but a `small` size is ideal for more subtle controls, such
3886
- * as pagination or other secondary functions. `medium` buttons are slightly larger to provide balance in forms where other items are also
3887
- * bigger, and `large` buttons are for cases where the page has mostly white-space and the buttons need to fill more space.
3888
- * Icons may be placed either before ("start") or after ("end") the button label. Icons should be SVG objects passed as strings and will
3889
- * be rendered as HTML inside the button label area. It is important that the root <SVG> tag contains a default `fill="#ffffff"` setting
3890
- * for the base color, and that child elements below it do not. This allows the button color to carry into the icon properly.
3891
- * ```html
3892
- * <verdocs-button label="OK" onClick={() => (console.log('OK clicked'))} />
3893
- * ```
3894
- */
3895
3794
  interface VerdocsButton {
3896
3795
  /**
3897
3796
  * Whether the button should be disabled.
@@ -3922,15 +3821,6 @@ declare namespace LocalJSX {
3922
3821
  */
3923
3822
  "variant"?: 'standard' | 'text' | 'outline';
3924
3823
  }
3925
- /**
3926
- * Displays a clickable icon suitable for display in a toolbar. When clicked, a customizable drop-down panel will be
3927
- * displayed.
3928
- * ```html
3929
- * <verdocs-button-panel icon="<svg.../>">
3930
- * <div class="content">...</div>
3931
- * </verdocs-button-panel>
3932
- * ```
3933
- */
3934
3824
  interface VerdocsButtonPanel {
3935
3825
  /**
3936
3826
  * SVG icon to display
@@ -4030,21 +3920,6 @@ declare namespace LocalJSX {
4030
3920
  */
4031
3921
  "onExit"?: (event: VerdocsDialogCustomEvent<any>) => void;
4032
3922
  }
4033
- /**
4034
- * Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden
4035
- * when the button is pressed again, or an option is selected. Separators may be created by supplying an entry with an empty label.
4036
- * ```html
4037
- * <verdocs-dropdown
4038
- * options={[
4039
- * {label: 'Option 1', disabled: true},
4040
- * {label: 'Option 2', id: '2'}
4041
- * {label: ''}
4042
- * {label: 'Option 3', id: '2'}
4043
- * ]}
4044
- * label="OK" onClick={() => (console.log('OK clicked'))}
4045
- * />
4046
- * ```
4047
- */
4048
3923
  interface VerdocsDropdown {
4049
3924
  /**
4050
3925
  * Event fired when a menu option is clicked. Web Component events need to be "composed" to cross the Shadow DOM and be received by parent frameworks.
@@ -4868,10 +4743,6 @@ declare namespace LocalJSX {
4868
4743
  */
4869
4744
  "yscale"?: number;
4870
4745
  }
4871
- /**
4872
- * Displays a file picker to upload an attachment. This component is just the picker - the host application or component should
4873
- * provide the actual upload functionality.
4874
- */
4875
4746
  interface VerdocsFileChooser {
4876
4747
  /**
4877
4748
  * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
@@ -6264,31 +6135,7 @@ declare module "@stencil/core" {
6264
6135
  * Display a template building experience.
6265
6136
  */
6266
6137
  "verdocs-build": LocalJSX.VerdocsBuild & JSXBase.HTMLAttributes<HTMLVerdocsBuildElement>;
6267
- /**
6268
- * Display a simple button.
6269
- * Three variants are supported. `standard` and `outline` buttons look like traditional form buttons and are ideal candidates for 'Ok' and
6270
- * 'Cancel' options in most cases. `text` buttons are intended to be used inline in content blocks or for more subtle button options.
6271
- * (Auth uses text buttons for the Forgot Password and Sign Up options.)
6272
- * Four sizes are also supported. Most use cases will call for the `normal` size, but a `small` size is ideal for more subtle controls, such
6273
- * as pagination or other secondary functions. `medium` buttons are slightly larger to provide balance in forms where other items are also
6274
- * bigger, and `large` buttons are for cases where the page has mostly white-space and the buttons need to fill more space.
6275
- * Icons may be placed either before ("start") or after ("end") the button label. Icons should be SVG objects passed as strings and will
6276
- * be rendered as HTML inside the button label area. It is important that the root <SVG> tag contains a default `fill="#ffffff"` setting
6277
- * for the base color, and that child elements below it do not. This allows the button color to carry into the icon properly.
6278
- * ```html
6279
- * <verdocs-button label="OK" onClick={() => (console.log('OK clicked'))} />
6280
- * ```
6281
- */
6282
6138
  "verdocs-button": LocalJSX.VerdocsButton & JSXBase.HTMLAttributes<HTMLVerdocsButtonElement>;
6283
- /**
6284
- * Displays a clickable icon suitable for display in a toolbar. When clicked, a customizable drop-down panel will be
6285
- * displayed.
6286
- * ```html
6287
- * <verdocs-button-panel icon="<svg.../>">
6288
- * <div class="content">...</div>
6289
- * </verdocs-button-panel>
6290
- * ```
6291
- */
6292
6139
  "verdocs-button-panel": LocalJSX.VerdocsButtonPanel & JSXBase.HTMLAttributes<HTMLVerdocsButtonPanelElement>;
6293
6140
  /**
6294
6141
  * Displays a check box. Note that this is different from the `verdocs-field-checkbox` component, which is designed
@@ -6323,21 +6170,6 @@ declare module "@stencil/core" {
6323
6170
  * Display a simple dialog where the contents are provided via slots.
6324
6171
  */
6325
6172
  "verdocs-dialog": LocalJSX.VerdocsDialog & JSXBase.HTMLAttributes<HTMLVerdocsDialogElement>;
6326
- /**
6327
- * Display a drop-down menu button. A menu of the specified options will be displayed when the button is pressed. The menu will be hidden
6328
- * when the button is pressed again, or an option is selected. Separators may be created by supplying an entry with an empty label.
6329
- * ```html
6330
- * <verdocs-dropdown
6331
- * options={[
6332
- * {label: 'Option 1', disabled: true},
6333
- * {label: 'Option 2', id: '2'}
6334
- * {label: ''}
6335
- * {label: 'Option 3', id: '2'}
6336
- * ]}
6337
- * label="OK" onClick={() => (console.log('OK clicked'))}
6338
- * />
6339
- * ```
6340
- */
6341
6173
  "verdocs-dropdown": LocalJSX.VerdocsDropdown & JSXBase.HTMLAttributes<HTMLVerdocsDropdownElement>;
6342
6174
  /**
6343
6175
  * Represents one document page. This is primarily a layout container used to coordinate positions of
@@ -6411,10 +6243,6 @@ declare module "@stencil/core" {
6411
6243
  * Display a timestamp field.
6412
6244
  */
6413
6245
  "verdocs-field-timestamp": LocalJSX.VerdocsFieldTimestamp & JSXBase.HTMLAttributes<HTMLVerdocsFieldTimestampElement>;
6414
- /**
6415
- * Displays a file picker to upload an attachment. This component is just the picker - the host application or component should
6416
- * provide the actual upload functionality.
6417
- */
6418
6246
  "verdocs-file-chooser": LocalJSX.VerdocsFileChooser & JSXBase.HTMLAttributes<HTMLVerdocsFileChooserElement>;
6419
6247
  /**
6420
6248
  * Floating Action Button style menu. For proper placement, this should be added to the DOM inside a container that is set to