@verdocs/web-sdk 1.14.8 → 1.14.9

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 (88) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/verdocs-auth.cjs.entry.js +5 -10
  3. package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
  4. package/dist/cjs/verdocs-field-textarea.cjs.entry.js +48 -4
  5. package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -5
  6. package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
  7. package/dist/cjs/verdocs-template-reminders.cjs.entry.js +37 -17
  8. package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
  9. package/dist/collection/collection-manifest.json +0 -1
  10. package/dist/collection/components/controls/verdocs-checkbox/verdocs-checkbox.css +3 -4
  11. package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +6 -12
  12. package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.css +2 -3
  13. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.css +13 -8
  14. package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +67 -2
  15. package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +2 -4
  16. package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +1 -1
  17. package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.js +37 -17
  18. package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.stories.js +1 -1
  19. package/dist/components/Recipients.js +74 -0
  20. package/dist/components/Toast.js +1 -74
  21. package/dist/components/index.d.ts +0 -1
  22. package/dist/components/index.js +0 -1
  23. package/dist/components/verdocs-auth.js +10 -22
  24. package/dist/components/verdocs-checkbox2.js +1 -1
  25. package/dist/components/verdocs-envelope-recipient-summary2.js +2 -1
  26. package/dist/components/verdocs-field-textarea.js +49 -3
  27. package/dist/components/verdocs-field-textbox.js +3 -5
  28. package/dist/components/verdocs-sign.js +2 -1
  29. package/dist/components/verdocs-status-indicator.js +1 -1
  30. package/dist/components/verdocs-template-reminders.js +37 -17
  31. package/dist/docs.json +19 -129
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/esm/verdocs-auth.entry.js +5 -10
  34. package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
  35. package/dist/esm/verdocs-field-textarea.entry.js +49 -5
  36. package/dist/esm/verdocs-field-textbox.entry.js +3 -5
  37. package/dist/esm/verdocs-status-indicator.entry.js +1 -1
  38. package/dist/esm/verdocs-template-reminders.entry.js +37 -17
  39. package/dist/esm/verdocs-web-sdk.js +1 -1
  40. package/dist/esm-es5/loader.js +1 -1
  41. package/dist/esm-es5/verdocs-auth.entry.js +1 -1
  42. package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
  43. package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
  44. package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
  45. package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
  46. package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
  47. package/dist/esm-es5/verdocs-web-sdk.js +1 -1
  48. package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +0 -2
  49. package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +15 -3
  50. package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +2 -2
  51. package/dist/types/components.d.ts +8 -45
  52. package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
  53. package/dist/verdocs-web-sdk/{p-be729608.system.entry.js → p-2a5b951c.system.entry.js} +1 -1
  54. package/dist/verdocs-web-sdk/p-48d71927.system.entry.js +1 -0
  55. package/dist/verdocs-web-sdk/p-8aba7c0a.entry.js +1 -0
  56. package/dist/verdocs-web-sdk/{p-8e181e8c.entry.js → p-8b85f402.entry.js} +1 -1
  57. package/dist/verdocs-web-sdk/p-b18c293a.system.entry.js +1 -0
  58. package/dist/verdocs-web-sdk/p-b772cdb5.entry.js +1 -0
  59. package/dist/verdocs-web-sdk/p-c2e75693.entry.js +1 -0
  60. package/dist/verdocs-web-sdk/p-c841a530.system.entry.js +1 -0
  61. package/dist/verdocs-web-sdk/{p-7bd5422e.system.entry.js → p-e4ab3dfc.system.entry.js} +1 -1
  62. package/dist/verdocs-web-sdk/p-e5f44611.entry.js +1 -0
  63. package/dist/verdocs-web-sdk/p-ebca6188.entry.js +1 -0
  64. package/dist/verdocs-web-sdk/p-f37f1ebc.system.entry.js +1 -0
  65. package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
  66. package/package.json +2 -2
  67. package/dist/cjs/verdocs-template-properties.cjs.entry.js +0 -75
  68. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.css +0 -102
  69. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.js +0 -177
  70. package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +0 -13
  71. package/dist/components/verdocs-template-properties.d.ts +0 -11
  72. package/dist/components/verdocs-template-properties.js +0 -131
  73. package/dist/custom-elements.json +0 -1616
  74. package/dist/esm/verdocs-template-properties.entry.js +0 -71
  75. package/dist/esm-es5/verdocs-template-properties.entry.js +0 -1
  76. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.d.ts +0 -45
  77. package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.stories.d.ts +0 -8
  78. package/dist/verdocs-web-sdk/p-0e4fe8f9.entry.js +0 -1
  79. package/dist/verdocs-web-sdk/p-1d14ae9c.entry.js +0 -1
  80. package/dist/verdocs-web-sdk/p-4157aa74.entry.js +0 -1
  81. package/dist/verdocs-web-sdk/p-4a9a3134.system.entry.js +0 -1
  82. package/dist/verdocs-web-sdk/p-71976828.entry.js +0 -1
  83. package/dist/verdocs-web-sdk/p-73717726.system.entry.js +0 -1
  84. package/dist/verdocs-web-sdk/p-77cd3ac5.system.entry.js +0 -1
  85. package/dist/verdocs-web-sdk/p-b3a8928b.entry.js +0 -1
  86. package/dist/verdocs-web-sdk/p-b6016e12.entry.js +0 -1
  87. package/dist/verdocs-web-sdk/p-d2bcbce0.system.entry.js +0 -1
  88. package/dist/verdocs-web-sdk/p-e7058963.system.entry.js +0 -1
@@ -1,71 +0,0 @@
1
- import { r as registerInstance, c as createEvent, h, H as Host } from './index-b18c0348.js';
2
- import './Types-5f31149e.js';
3
- import { V as VerdocsEndpoint } from './VerdocsEndpoint-5b92f115.js';
4
- import { g as getTemplateStore } from './TemplateStore-852097c3.js';
5
- import { S as SDKError } from './errors-9b5498c8.js';
6
- import './index-29123f30.js';
7
- import './Templates-67172396.js';
8
-
9
- const verdocsTemplatePropertiesCss = "verdocs-template-properties{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}";
10
-
11
- const VerdocsTemplateProperties = class {
12
- constructor(hostRef) {
13
- registerInstance(this, hostRef);
14
- this.exit = createEvent(this, "exit", 7);
15
- this.next = createEvent(this, "next", 7);
16
- this.sdkError = createEvent(this, "sdkError", 7);
17
- this.store = null;
18
- this.endpoint = VerdocsEndpoint.getDefault();
19
- this.templateId = '';
20
- this.name = '';
21
- this.visibility = '';
22
- this.sendReminders = false;
23
- this.firstReminderDays = '1';
24
- this.reminderDays = '1';
25
- }
26
- async componentWillLoad() {
27
- var _a, _b, _c, _d, _e, _f, _g;
28
- try {
29
- this.endpoint.loadSession();
30
- if (!this.templateId) {
31
- console.log(`[PROPERTIES] Missing required template ID ${this.templateId}`);
32
- return;
33
- }
34
- if (!this.endpoint.session) {
35
- console.log('[PROPERTIES] Unable to start builder session, must be authenticated');
36
- return;
37
- }
38
- this.store = await getTemplateStore(this.endpoint, this.templateId, true);
39
- this.name = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.name;
40
- this.sendReminders = ((_d = (_c = this.store) === null || _c === void 0 ? void 0 : _c.state) === null || _d === void 0 ? void 0 : _d.reminder_id) !== null;
41
- }
42
- catch (e) {
43
- console.log('[PROPERTIES] Error loading template', e);
44
- (_e = this.sdkError) === null || _e === void 0 ? void 0 : _e.emit(new SDKError(e.message, (_f = e.response) === null || _f === void 0 ? void 0 : _f.status, (_g = e.response) === null || _g === void 0 ? void 0 : _g.data));
45
- }
46
- }
47
- handleCancel(e) {
48
- var _a;
49
- e.stopPropagation();
50
- (_a = this.exit) === null || _a === void 0 ? void 0 : _a.emit();
51
- }
52
- handleSubmit(e) {
53
- var _a;
54
- e.stopPropagation();
55
- (_a = this.next) === null || _a === void 0 ? void 0 : _a.emit({
56
- name: this.name,
57
- firstReminderDays: +this.firstReminderDays,
58
- reminderDays: +this.reminderDays,
59
- sendReminders: this.sendReminders,
60
- });
61
- }
62
- render() {
63
- if (!this.endpoint.session) {
64
- return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
65
- }
66
- return (h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Template Name"), h("fieldset", null, h("verdocs-text-input", { value: this.name, autocomplete: "off", onInput: (e) => (this.name = e.target.value) })), h("h5", null, "Reminders"), h("fieldset", null, h("div", { class: "input-row" }, h("label", null, "Send Automatic Reminders"), h("verdocs-checkbox", { name: "automatic-reminders", checked: this.sendReminders, value: "on", onInput: (e) => (this.sendReminders = e.target.checked) })), h("div", { class: "input-row" }, h("label", null, "Days Before First Reminder"), h("verdocs-text-input", { value: this.firstReminderDays, onInput: (e) => (this.firstReminderDays = e.target.value) })), h("div", { class: "input-row" }, h("label", null, "Days Between Reminders"), h("verdocs-text-input", { value: this.reminderDays, onInput: (e) => (this.reminderDays = e.target.value) }))), h("h5", null, "Template Visibility"), h("fieldset", null, h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "private", onChange: () => (this.visibility = 'private') }), h("label", { htmlFor: "verdocs-radio-button-visibility-private" }, h("div", { class: "title" }, "Private"), h("div", { class: "description" }, "Only you can share and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "shared", onChange: () => (this.visibility = 'shared') }), h("label", { htmlFor: "verdocs-radio-button-visibility-shared" }, h("div", { class: "title" }, "Shared to your organization"), h("div", { class: "description" }, "Give access to your organization to share and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: true, value: "shared_public", onChange: () => (this.visibility = 'shared_public') }), h("label", { htmlFor: "verdocs-radio-button-visibility-shared_public" }, h("div", { class: "title" }, "Shared to your organization and Public"), h("div", { class: "description" }, "Give access to your organization to share this template, and anyone on the Web can find and use this template"))), h("div", { class: "radio-row" }, h("verdocs-radio-button", { name: "visibility", checked: this.visibility === 'public', value: "public", onChange: () => (this.visibility = 'public') }), h("label", { htmlFor: "verdocs-radio-button-visibility-public" }, h("div", { class: "title" }, "Public"), h("div", { class: "description" }, "Anyone on the Web can find and use this template")))), h("div", { class: "buttons" }, h("div", { class: "flex-fill" }), h("verdocs-button", { variant: "outline", label: "Cancel", size: "small", onClick: e => this.handleCancel(e) }), h("verdocs-button", { label: "OK", size: "small", onClick: e => this.handleSubmit(e) }))));
67
- }
68
- };
69
- VerdocsTemplateProperties.style = verdocsTemplatePropertiesCss;
70
-
71
- export { VerdocsTemplateProperties as verdocs_template_properties };
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,r){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,s){function n(e){try{l(r.next(e))}catch(e){s(e)}}function a(e){try{l(r["throw"](e))}catch(e){s(e)}}function l(e){e.done?i(e.value):o(e.value).then(n,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},r,o,s,n;return n={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(n[Symbol.iterator]=function(){return this}),n;function a(e){return function(t){return l([e,t])}}function l(n){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,o&&(s=n[0]&2?o["return"]:n[0]?o["throw"]||((s=o["return"])&&s.call(o),0):o.next)&&!(s=s.call(o,n[1])).done)return s;if(o=0,s)n=[n[0]&2,s.value];switch(n[0]){case 0:case 1:s=n;break;case 4:i.label++;return{value:n[1],done:false};case 5:i.label++;o=n[1];n=[0];continue;case 7:n=i.ops.pop();i.trys.pop();continue;default:if(!(s=i.trys,s=s.length>0&&s[s.length-1])&&(n[0]===6||n[0]===2)){i=0;continue}if(n[0]===3&&(!s||n[1]>s[0]&&n[1]<s[3])){i.label=n[1];break}if(n[0]===6&&i.label<s[1]){i.label=s[1];s=n;break}if(s&&i.label<s[2]){i.label=s[2];i.ops.push(n);break}if(s[2])i.ops.pop();i.trys.pop();continue}n=t.call(e,i)}catch(e){n=[6,e];o=0}finally{r=s=0}if(n[0]&5)throw n[1];return{value:n[0]?n[1]:void 0,done:true}}};import{r as registerInstance,c as createEvent,h,H as Host}from"./index-b18c0348.js";import"./Types-5f31149e.js";import{V as VerdocsEndpoint}from"./VerdocsEndpoint-5b92f115.js";import{g as getTemplateStore}from"./TemplateStore-852097c3.js";import{S as SDKError}from"./errors-9b5498c8.js";import"./index-29123f30.js";import"./Templates-67172396.js";var verdocsTemplatePropertiesCss='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';var VerdocsTemplateProperties=function(){function e(e){registerInstance(this,e);this.exit=createEvent(this,"exit",7);this.next=createEvent(this,"next",7);this.sdkError=createEvent(this,"sdkError",7);this.store=null;this.endpoint=VerdocsEndpoint.getDefault();this.templateId="";this.name="";this.visibility="";this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,r,o,s,n,a,l;return __generator(this,(function(p){switch(p.label){case 0:p.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PROPERTIES] Unable to start builder session, must be authenticated");return[2]}a=this;return[4,getTemplateStore(this.endpoint,this.templateId,true)];case 1:a.store=p.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.sendReminders=((r=(i=this.store)===null||i===void 0?void 0:i.state)===null||r===void 0?void 0:r.reminder_id)!==null;return[3,3];case 2:l=p.sent();console.log("[PROPERTIES] Error loading template",l);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new SDKError(l.message,(s=l.response)===null||s===void 0?void 0:s.status,(n=l.response)===null||n===void 0?void 0:n.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return h(Host,null,h("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return h("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},h("h5",null,"Template Name"),h("fieldset",null,h("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:function(t){return e.name=t.target.value}})),h("h5",null,"Reminders"),h("fieldset",null,h("div",{class:"input-row"},h("label",null,"Send Automatic Reminders"),h("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){return e.sendReminders=t.target.checked}})),h("div",{class:"input-row"},h("label",null,"Days Before First Reminder"),h("verdocs-text-input",{value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value}})),h("div",{class:"input-row"},h("label",null,"Days Between Reminders"),h("verdocs-text-input",{value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value}}))),h("h5",null,"Template Visibility"),h("fieldset",null,h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"private",onChange:function(){return e.visibility="private"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-private"},h("div",{class:"title"},"Private"),h("div",{class:"description"},"Only you can share and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"shared",onChange:function(){return e.visibility="shared"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-shared"},h("div",{class:"title"},"Shared to your organization"),h("div",{class:"description"},"Give access to your organization to share and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:true,value:"shared_public",onChange:function(){return e.visibility="shared_public"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},h("div",{class:"title"},"Shared to your organization and Public"),h("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),h("div",{class:"radio-row"},h("verdocs-radio-button",{name:"visibility",checked:this.visibility==="public",value:"public",onChange:function(){return e.visibility="public"}}),h("label",{htmlFor:"verdocs-radio-button-visibility-public"},h("div",{class:"title"},"Public"),h("div",{class:"description"},"Anyone on the Web can find and use this template")))),h("div",{class:"buttons"},h("div",{class:"flex-fill"}),h("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),h("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}();VerdocsTemplateProperties.style=verdocsTemplatePropertiesCss;export{VerdocsTemplateProperties as verdocs_template_properties};
@@ -1,45 +0,0 @@
1
- import { VerdocsEndpoint } from '@verdocs/js-sdk';
2
- import { EventEmitter } from '../../../stencil-public-runtime';
3
- import { TTemplateStore } from '../../../utils/TemplateStore';
4
- import { SDKError } from '../../../utils/errors';
5
- /**
6
- * Displays a collection of settings boxes that allow a user to configure a template's behavior.
7
- */
8
- export declare class VerdocsTemplateProperties {
9
- /**
10
- * The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
11
- */
12
- endpoint: VerdocsEndpoint;
13
- /**
14
- * The template ID to edit.
15
- */
16
- templateId: string;
17
- /**
18
- * Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
19
- */
20
- exit: EventEmitter;
21
- /**
22
- * Event fired when the user completes the step.
23
- */
24
- next: EventEmitter<{
25
- name: string;
26
- sendReminders: boolean;
27
- firstReminderDays: number;
28
- reminderDays: number;
29
- }>;
30
- /**
31
- * Event fired if an error occurs. The event details will contain information about the error. Most errors will
32
- * terminate the process, and the calling application should correct the condition and re-render the component.
33
- */
34
- sdkError: EventEmitter<SDKError>;
35
- name: string;
36
- visibility: string;
37
- sendReminders: boolean;
38
- firstReminderDays: string;
39
- reminderDays: string;
40
- store: TTemplateStore | null;
41
- componentWillLoad(): Promise<void>;
42
- handleCancel(e: any): void;
43
- handleSubmit(e: any): void;
44
- render(): any;
45
- }
@@ -1,8 +0,0 @@
1
- import { Meta } from '@storybook/web-components';
2
- declare const _default: Meta<import("@storybook/web-components").Args>;
3
- export default _default;
4
- export declare const Properties: ({ onExit, onNext, templateId }: {
5
- onExit: any;
6
- onNext: any;
7
- templateId: any;
8
- }) => import("lit-html").TemplateResult<1>;
@@ -1 +0,0 @@
1
- import{r as e,h as t,H as o}from"./p-9cf1a627.js";import{c as i}from"./p-9d707f6e.js";const s=class{constructor(t){e(this,t),this.checked=!1,this.name="",this.label="",this.value="",this.theme="light",this.disabled=!1}render(){return t(o,{class:{disabled:this.disabled,[this.theme]:!0}},t("label",null,t("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),t("span",null,this.label)))}};s.style='@charset "UTF-8";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:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;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}';const r=class{constructor(t){e(this,t),this.message=""}render(){return t(o,null,t("div",{class:"inner"},this.message))}};r.style='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}';const n=class{constructor(t){e(this,t),this.text="",this.containerId=`verdocs-help-icon-${Math.random().toString(36).substring(2,11)}`}componentDidLoad(){this.popperInstance=i(this.icon,this.tooltip,{})}disconnectedCallback(){this.popperInstance&&(this.popperInstance.destroy(),this.popperInstance=null)}show(){var e,t;null===(e=this.tooltip)||void 0===e||e.setAttribute("data-show",""),null===(t=this.popperInstance)||void 0===t||t.update().catch((()=>{}))}hide(){var e;null===(e=this.tooltip)||void 0===e||e.removeAttribute("data-show")}render(){return t(o,{class:{}},t("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:'<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>',onMouseEnter:()=>this.show(),onFocus:()=>this.show(),onMouseLeave:()=>this.hide(),onBlur:()=>this.hide(),ref:e=>this.icon=e}),t("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:e=>this.tooltip=e},this.text,t("div",{"data-popper-arrow":"true",class:"arrow"})))}};n.style='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';const c=class{constructor(t){e(this,t),this.value="",this.label="",this.placeholder="",this.autocomplete="",this.helpText="",this.type="text",this.disabled=!1}render(){return t(o,{class:"input-field"},t("label",null,this.label&&t("div",{class:"input-label"},this.label+":"),t("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&t("verdocs-help-icon",{text:this.helpText})))}};c.style='verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';export{s as verdocs_checkbox,r as verdocs_component_error,n as verdocs_help_icon,c as verdocs_text_input}
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as s,H as i}from"./p-9cf1a627.js";import{g as o}from"./p-6de76553.js";import{g as r}from"./p-73155c52.js";import"./p-eab67c09.js";import"./p-9b73909f.js";import"./p-05788c2b.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-ab01f71e.js";const a=class{constructor(s){e(this,s),this.settingsChanged=t(this,"settingsChanged",7),this.deleted=t(this,"deleted",7),this.templateid="",this.field=null,this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.rerender=0}async focusField(){this.el.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.showPanel&&e.showPanel()}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.hidePanel&&e.hidePanel()}render(){var e,t;const a=r(this.field),l=null!==(t=null!==(e=this.disabled)&&void 0!==e?e:a.disabled)&&void 0!==t&&t,d=this.field.rgba||o(this.roleindex);return this.done?s(i,{class:{done:this.done}},a.value):s(i,{class:{required:a.required,disabled:l},style:{backgroundColor:d}},s("textarea",{placeholder:a.placeholder||"",tabIndex:a.order,value:a.value,disabled:l,name:this.field.name,required:a.required,ref:e=>this.el=e}),this.editable&&s("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>',id:`verdocs-settings-panel-${this.field.name}`},s("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;return null===(e=this.deleted)||void 0===e||e.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:e=>{var t;return null===(t=this.settingsChanged)||void 0===t||t.emit(e.detail),this.hideSettingsPanel()}})))}};a.style='verdocs-field-textarea{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textarea verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textarea verdocs-button-panel[data-active],verdocs-field-textarea verdocs-button-panel:hover{opacity:1}verdocs-field-textarea verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textarea verdocs-button-panel .icon:hover svg{fill:#000000}';export{a as verdocs_field_textarea}
@@ -1 +0,0 @@
1
- import{r as t,c as s,h as i}from"./p-9cf1a627.js";import{V as e}from"./p-0b4ea5f9.js";import"./p-05788c2b.js";import{S as o}from"./p-7a1b2643.js";const n=class{constructor(i){t(this,i),this.authenticated=s(this,"authenticated",7),this.sdkError=s(this,"sdkError",7),this.endpoint=e.getDefault(),this.visible=!0,this.logo="https://verdocs.com/assets/blue-logo.svg",this.isAuthenticated=!1,this.displayMode="login",this.username="",this.password="",this.loggingIn=!1,this.activeSession=null,this.loginError=null}componentWillLoad(){var t,s;this.endpoint.loadSession(),this.endpoint.session?(console.log("[AUTH] Authenticated"),this.isAuthenticated=!0,this.activeSession=this.endpoint.session,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!0,session:this.endpoint.session})):(console.log("[AUTH] Anonymous"),null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!1,session:null}))}handleLogin(){var t,s;this.loggingIn=!0,(t=this.endpoint,s={username:this.username,password:this.password},t.api.post("/authentication/login",s).then((function(t){return t.data}))).then((t=>{var s;this.loggingIn=!1,this.endpoint.setToken(t.accessToken),this.activeSession=this.endpoint.session,this.isAuthenticated=!0,null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!0,session:this.endpoint.session})})).catch((t=>{var s,i,e,n,l;console.log("[AUTH] Authentication error",t.response,JSON.stringify(t)),this.loggingIn=!1,this.activeSession=null,null===(s=this.authenticated)||void 0===s||s.emit({authenticated:!1,session:null}),null===(i=this.sdkError)||void 0===i||i.emit(new o(t.message,null===(e=t.response)||void 0===e?void 0:e.status,null===(n=t.response)||void 0===n?void 0:n.data)),403===(null===(l=null==t?void 0:t.response)||void 0===l?void 0:l.status)&&(this.loginError="Please check your username and password and try again.")}))}handleLogout(){var t;this.endpoint.clearSession(),this.isAuthenticated=!1,null===(t=this.authenticated)||void 0===t||t.emit({authenticated:!1,session:null})}handleClearError(){this.loginError=null}render(){return this.visible?this.isAuthenticated?i("div",{class:"status-result"},"Authenticated"):"signup"===this.displayMode?i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:()=>this.displayMode="login",disabled:this.loggingIn})),i("form",{onSubmit:()=>this.handleLogin()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}}))):i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn})),i("form",{onSubmit:()=>this.handleLogin()},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:t=>this.username=t.target.value,disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:t=>this.password=t.target.value,disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:()=>this.displayMode="signup",disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:()=>this.handleLogin(),style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:()=>this.handleClearError()}):i("div",null)):i("div",{style:{display:"none"}},"Authenticated")}};n.style='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';export{n as verdocs_auth}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,r,n){function i(e){return e instanceof r?e:new r((function(t){t(e)}))}return new(r||(r=Promise))((function(r,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n["throw"](e))}catch(e){s(e)}}function l(e){e.done?r(e.value):i(e.value).then(o,a)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var r={label:0,sent:function(){if(s[0]&1)throw s[1];return s[1]},trys:[],ops:[]},n,i,s,o;return o={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(o[Symbol.iterator]=function(){return this}),o;function a(e){return function(t){return l([e,t])}}function l(o){if(n)throw new TypeError("Generator is already executing.");while(r)try{if(n=1,i&&(s=o[0]&2?i["return"]:o[0]?i["throw"]||((s=i["return"])&&s.call(i),0):i.next)&&!(s=s.call(i,o[1])).done)return s;if(i=0,s)o=[o[0]&2,s.value];switch(o[0]){case 0:case 1:s=o;break;case 4:r.label++;return{value:o[1],done:false};case 5:r.label++;i=o[1];o=[0];continue;case 7:o=r.ops.pop();r.trys.pop();continue;default:if(!(s=r.trys,s=s.length>0&&s[s.length-1])&&(o[0]===6||o[0]===2)){r=0;continue}if(o[0]===3&&(!s||o[1]>s[0]&&o[1]<s[3])){r.label=o[1];break}if(o[0]===6&&r.label<s[1]){r.label=s[1];s=o;break}if(s&&r.label<s[2]){r.label=s[2];r.ops.push(o);break}if(s[2])r.ops.pop();r.trys.pop();continue}o=t.call(e,r)}catch(e){o=[6,e];i=0}finally{n=s=0}if(o[0]&5)throw o[1];return{value:o[0]?o[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-dc849a58.system.js","./p-4cc5d833.system.js","./p-187b20b7.system.js","./p-b4d11d90.system.js","./p-4ac861c9.system.js"],(function(e){"use strict";var t,r,n,i,s,o,a;return{setters:[function(e){t=e.r;r=e.c;n=e.h;i=e.H},function(){},function(e){s=e.V},function(e){o=e.g},function(e){a=e.S},function(){},function(){}],execute:function(){var l=function(e,t,r){return e.api.post("/templates/".concat(t,"/reminder/"),r).then((function(e){return e.data}))};var d=function(e,t,r,n){return e.api.put("/templates/".concat(t,"/reminder/").concat(r),n).then((function(e){return e.data}))};var c=function(e,t,r){return e.api.delete("/templates/".concat(t,"/reminder/").concat(r)).then((function(e){return e.data}))};var u='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';var m=e("verdocs_template_reminders",function(){function e(e){t(this,e);this.close=r(this,"close",7);this.sdkError=r(this,"sdkError",7);this.store=null;this.endpoint=s.getDefault();this.templateId="";this.showPlanBlocker=false;this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1";this.dirty=false}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,r,n,i,s,l;return __generator(this,(function(d){switch(d.label){case 0:d.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[ROLES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[ROLES] Unable to start builder session, must be authenticated");return[2]}s=this;return[4,o(this.endpoint,this.templateId,true)];case 1:s.store=d.sent();this.sendReminders=!!((t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.reminder_id);this.dirty=false;return[3,3];case 2:l=d.sent();console.log("[TEMPLATE REMINDERS] Error loading template",l);(r=this.sdkError)===null||r===void 0?void 0:r.emit(new a(l.message,(n=l.response)===null||n===void 0?void 0:n.status,(i=l.response)===null||i===void 0?void 0:i.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t,r,n;e.stopPropagation();this.sendReminders=!!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.reminder_id);this.dirty=false;(n=this.close)===null||n===void 0?void 0:n.emit()};e.prototype.handleSave=function(e){return __awaiter(this,void 0,void 0,(function(){var t,r,n,i,s,o;return __generator(this,(function(a){switch(a.label){case 0:e.stopPropagation();if(!this.sendReminders)return[3,5];o={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};if(!!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.reminder_id))return[3,2];return[4,l(this.endpoint,this.templateId,o)];case 1:a.sent();return[3,4];case 2:return[4,d(this.endpoint,this.templateId,(n=this.store)===null||n===void 0?void 0:n.state.reminder_id,o)];case 3:a.sent();a.label=4;case 4:return[3,7];case 5:return[4,c(this.endpoint,this.templateId,(i=this.store)===null||i===void 0?void 0:i.state.reminder_id)];case 6:a.sent();a.label=7;case 7:this.dirty=false;(s=this.close)===null||s===void 0?void 0:s.emit();return[2]}}))}))};e.prototype.render=function(){var e=this;var t,r;if(!this.endpoint.session){return n(i,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(!this.endpoint.session||!((r=(t=this.store)===null||t===void 0?void 0:t.state)===null||r===void 0?void 0:r.isLoaded)){return n(i,{class:"empty"})}return n(i,null,n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("h5",null,"Reminders"),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),n("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){e.showPlanBlocker=true;t.target.checked=false}})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),n("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"input-row"},n("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),n("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value},disabled:!this.sendReminders})),n("div",{class:"buttons"},n("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:function(t){return e.handleCancel(t)}}),n("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:function(t){return e.handleSave(t)}}))),this.showPlanBlocker&&n("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:function(){return e.showPlanBlocker=false}}))};return e}());m.style=u}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s,a as o}from"./p-9cf1a627.js";import{i as r}from"./p-0d28cf05.js";import{g as n}from"./p-6de76553.js";import{g as l}from"./p-73155c52.js";import{u as d}from"./p-feb442b1.js";import"./p-05788c2b.js";import{V as a}from"./p-0b4ea5f9.js";import"./p-eab67c09.js";import"./p-9b73909f.js";import"./p-aa124212.js";import"./p-de60d3a8.js";import"./p-ab01f71e.js";const h=class{constructor(i){e(this,i),this.settingsChanged=t(this,"settingsChanged",7),this.deleted=t(this,"deleted",7),this.endpoint=a.getDefault(),this.templateid="",this.field=null,this.disabled=!1,this.editable=!1,this.moveable=!1,this.done=!1,this.roleindex=0,this.rerender=0}async focusField(){this.inputEl.focus()}async showSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.showPanel&&e.showPanel()}async hideSettingsPanel(){const e=document.getElementById(`verdocs-settings-panel-${this.field.name}`);e&&e.hidePanel&&e.hidePanel()}componentDidRender(){r.dynamicDrop(!0),this.editable&&r(this.el).resizable({edges:{top:!1,bottom:!1,left:!0,right:!0},listeners:{start:this.handleResizeStart.bind(this),move:this.handleResize.bind(this),end:this.handleResizeEnd.bind(this)}})}handleResizeStart(e){e.preventDefault(),e.stopPropagation()}handleResize(e){console.log("resize",e);const t=+(e.target.getAttribute("resizeX")||0),i=+(e.target.getAttribute("resizeY")||0),s=e.dx+t,o=e.dy+i;this.el.style.width=`${parseFloat(this.el.style.width||"0")+e.dx}px`,e.target.setAttribute("resizeX",s),e.target.setAttribute("resizeY",o)}handleResizeEnd(e){console.log("resizeEnd",e);const t=+(e.target.getAttribute("resizeX")||0),i=(l(this.field).width||150)+t,s={...l(this.field),width:Math.round(i)};delete s.result,d(this.endpoint,this.templateid,this.field.name,{setting:s}).then((()=>{var e;return null===(e=this.settingsChanged)||void 0===e?void 0:e.emit({fieldName:this.field.name,settings:s})})).catch((e=>console.log("Field update failed",e)))}render(){var e,t,o,r;const d=l(this.field);let a=null!==(t=null!==(e=this.disabled)&&void 0!==e?e:d.disabled)&&void 0!==t&&t;const h=this.field.rgba||n(this.roleindex),p=(null==d?void 0:d.result)||"",c=(d.width||150)/5;return this.done?i(s,{class:{done:this.done}},p):i(s,{class:{required:null===(o=this.field)||void 0===o?void 0:o.required,disabled:a,done:this.done},style:{backgroundColor:h}},i("input",{type:"text",name:this.field.name,placeholder:null==d?void 0:d.placeholder,tabIndex:null==d?void 0:d.order,value:p,disabled:a,required:null===(r=this.field)||void 0===r?void 0:r.required,ref:e=>this.inputEl=e,maxlength:c}),this.editable&&i("verdocs-button-panel",{icon:'<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>',id:`verdocs-settings-panel-${this.field.name}`},i("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:()=>this.hideSettingsPanel(),onDelete:()=>{var e;return null===(e=this.deleted)||void 0===e||e.emit({fieldName:this.field.name}),this.hideSettingsPanel()},onSettingsChanged:e=>{var t;return null===(t=this.settingsChanged)||void 0===t||t.emit(e.detail),this.hideSettingsPanel()},helpText:'Text boxes may be used to capture simple text input. Participant-entered values will be stored for later retrieval via the "name" field.<br /><br />If marked required, the participant must complete the field before proceeding.'})))}get el(){return o(this)}};h.style='verdocs-field-textbox{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;width:150px;height:15px;display:block;font-size:11px;position:relative;letter-spacing:-0.2px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textbox.disabled{opacity:0.5}verdocs-field-textbox input{width:100%;height:100%;border:none;outline:none;padding:0 3px;font-size:11px;background:none;font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87)}verdocs-field-textbox input.hide{display:none}verdocs-field-textbox.required{border:1px solid #cc0000}verdocs-field-textbox.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textbox verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textbox verdocs-button-panel[data-active],verdocs-field-textbox verdocs-button-panel:hover{opacity:1}verdocs-field-textbox verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textbox verdocs-button-panel .icon:hover svg{fill:#000000}verdocs-field-textbox [data-lastpass-icon-root]{display:none !important}';export{h as verdocs_field_textbox}
@@ -1 +0,0 @@
1
- System.register(["./p-934a39b4.system.js","./p-5e0c6e7c.system.js"],(function(e){"use strict";var t,o,i,n;return{setters:[function(e){t=e.r;o=e.h;i=e.H},function(e){n=e.c}],execute:function(){var r='@charset "UTF-8";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:1rem;height:1rem;-ms-flex-negative:0;flex-shrink:0;line-height:18px;border-radius:2px;border-style:solid;margin-right:0.5rem;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 s=e("verdocs_checkbox",function(){function e(e){t(this,e);this.checked=false;this.name="";this.label="";this.value="";this.theme="light";this.disabled=false}e.prototype.render=function(){var e;return o(i,{class:(e={disabled:this.disabled},e[this.theme]=true,e)},o("label",null,o("input",{type:"checkbox",value:this.value,name:this.name,checked:this.checked,disabled:this.disabled}),o("span",null,this.label)))};return e}());s.style=r;var c='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 a=e("verdocs_component_error",function(){function e(e){t(this,e);this.message=""}e.prototype.render=function(){return o(i,null,o("div",{class:"inner"},this.message))};return e}());a.style=c;var l='verdocs-help-icon{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:"";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}';var p='<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 d=e("verdocs_help_icon",function(){function e(e){t(this,e);this.text="";this.containerId="verdocs-help-icon-".concat(Math.random().toString(36).substring(2,11))}e.prototype.componentDidLoad=function(){this.popperInstance=n(this.icon,this.tooltip,{})};e.prototype.disconnectedCallback=function(){if(this.popperInstance){this.popperInstance.destroy();this.popperInstance=null}};e.prototype.show=function(){var e,t;(e=this.tooltip)===null||e===void 0?void 0:e.setAttribute("data-show","");(t=this.popperInstance)===null||t===void 0?void 0:t.update().catch((function(){}))};e.prototype.hide=function(){var e;(e=this.tooltip)===null||e===void 0?void 0:e.removeAttribute("data-show")};e.prototype.render=function(){var e=this;return o(i,{class:{}},o("div",{"aria-describedby":this.containerId,class:"icon",innerHTML:p,onMouseEnter:function(){return e.show()},onFocus:function(){return e.show()},onMouseLeave:function(){return e.hide()},onBlur:function(){return e.hide()},ref:function(t){return e.icon=t}}),o("div",{id:this.containerId,role:"tooltip",class:"tooltip","data-popper-placement":"bottom",ref:function(t){return e.tooltip=t}},this.text,o("div",{"data-popper-arrow":"true",class:"arrow"})))};return e}());d.style=l;var h='verdocs-text-input{font-family:"Inter", "Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-text-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;border:1px solid #707ae5;border-radius:4px;background:#ffffff;color:#000;width:100%;font-size:16px;height:28px;padding:4px 12px;outline:none}verdocs-text-input .input-element:disabled{border:1px solid #aeb4bf;background:#f5f5fa}verdocs-text-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-text-input .input-element:focus{outline:1px solid #7d88ff}verdocs-text-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}verdocs-text-input [data-lastpass-icon-root]{display:none !important}';var b=e("verdocs_text_input",function(){function e(e){t(this,e);this.value="";this.label="";this.placeholder="";this.autocomplete="";this.helpText="";this.type="text";this.disabled=false}e.prototype.render=function(){return o(i,{class:"input-field"},o("label",null,this.label&&o("div",{class:"input-label"},this.label+":"),o("input",{type:this.type,value:this.value,class:"input-element","data-lpignore":"true",disabled:this.disabled,placeholder:this.placeholder,autoComplete:this.autocomplete}),this.helpText&&o("verdocs-help-icon",{text:this.helpText})))};return e}());b.style=h}}}));
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,n,i){function r(e){return e instanceof n?e:new n((function(t){t(e)}))}return new(n||(n=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i["throw"](e))}catch(e){o(e)}}function l(e){e.done?n(e.value):r(e.value).then(a,s)}l((i=i.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var n={label:0,sent:function(){if(o[0]&1)throw o[1];return o[1]},trys:[],ops:[]},i,r,o,a;return a={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function s(e){return function(t){return l([e,t])}}function l(a){if(i)throw new TypeError("Generator is already executing.");while(n)try{if(i=1,r&&(o=a[0]&2?r["return"]:a[0]?r["throw"]||((o=r["return"])&&o.call(r),0):r.next)&&!(o=o.call(r,a[1])).done)return o;if(r=0,o)a=[a[0]&2,o.value];switch(a[0]){case 0:case 1:o=a;break;case 4:n.label++;return{value:a[1],done:false};case 5:n.label++;r=a[1];a=[0];continue;case 7:a=n.ops.pop();n.trys.pop();continue;default:if(!(o=n.trys,o=o.length>0&&o[o.length-1])&&(a[0]===6||a[0]===2)){n=0;continue}if(a[0]===3&&(!o||a[1]>o[0]&&a[1]<o[3])){n.label=a[1];break}if(a[0]===6&&n.label<o[1]){n.label=o[1];o=a;break}if(o&&n.label<o[2]){n.label=o[2];n.ops.push(a);break}if(o[2])n.ops.pop();n.trys.pop();continue}a=t.call(e,n)}catch(e){a=[6,e];r=0}finally{i=o=0}if(a[0]&5)throw a[1];return{value:a[0]?a[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-05eb4fed.system.js","./p-da31f940.system.js","./p-bbee73c8.system.js","./p-973ebb54.system.js","./p-54498887.system.js","./p-327858f0.system.js","./p-7fd7152d.system.js","./p-51a3ea62.system.js"],(function(e){"use strict";var t,n,i,r,o,a;return{setters:[function(e){t=e.r;n=e.c;i=e.h;r=e.H},function(e){o=e.g},function(e){a=e.g},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var s='verdocs-field-textarea{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:150px;height:15px;display:block;font-size:11px;position:relative;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{-webkit-box-sizing:border-box;box-sizing:border-box;color:rgba(0, 0, 0, 0.87);font-weight:500;-webkit-transform-origin:0 0;transform-origin:0 0;height:100%;width:100%;background:none;font-size:11px;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea textarea.hide{display:none}verdocs-field-textarea.required{border:1px solid #cc0000}verdocs-field-textarea.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}verdocs-field-textarea verdocs-button-panel{top:-3px;left:-2px;opacity:0.5;z-index:1000;cursor:pointer;position:absolute;-webkit-transform:scale(0.6);transform:scale(0.6)}verdocs-field-textarea verdocs-button-panel[data-active],verdocs-field-textarea verdocs-button-panel:hover{opacity:1}verdocs-field-textarea verdocs-button-panel .icon svg{fill:#333333}verdocs-field-textarea verdocs-button-panel .icon:hover svg{fill:#000000}';var l='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20"><path d="m7.5 18.5-.312-2.667q-.188-.125-.396-.25-.209-.125-.396-.229l-2.479 1.063-2.521-4.334 2.125-1.625q.021-.104.021-.229v-.458q0-.125-.021-.229L1.396 7.917l2.521-4.313 2.5 1.042q.166-.104.375-.229.208-.125.396-.229L7.5 1.5h5l.312 2.688q.188.104.396.229.209.125.396.229l2.479-1.042 2.521 4.313-2.125 1.625v.916l2.125 1.625-2.521 4.334-2.5-1.063q-.166.104-.375.229-.208.125-.396.25L12.5 18.5Zm2.479-5.521q1.229 0 2.104-.875T12.958 10q0-1.229-.875-2.104t-2.104-.875q-1.208 0-2.094.875Q7 8.771 7 10t.885 2.104q.886.875 2.094.875Zm0-1.75q-.5 0-.864-.364Q8.75 10.5 8.75 10t.365-.865q.364-.364.864-.364t.865.364q.364.365.364.865t-.364.865q-.365.364-.865.364ZM10.021 10Zm-.792 6.521h1.542l.25-2.146q.625-.167 1.198-.51.573-.344 1.031-.823l2.021.854.771-1.271-1.771-1.354q.104-.292.156-.615.052-.323.052-.656 0-.292-.052-.604-.052-.313-.135-.646l1.77-1.375-.77-1.271-2.021.875q-.479-.5-1.042-.833-.562-.334-1.187-.5l-.271-2.167H9.208l-.25 2.167q-.625.166-1.187.5-.563.333-1.042.812l-2-.854-.771 1.271 1.73 1.354q-.084.333-.136.656Q5.5 9.708 5.5 10t.052.604q.052.313.136.667l-1.73 1.354.771 1.271 2-.834q.479.459 1.042.792.562.334 1.187.5Z"/></svg>';var d=e("verdocs_field_textarea",function(){function e(e){t(this,e);this.settingsChanged=n(this,"settingsChanged",7);this.deleted=n(this,"deleted",7);this.templateid="";this.field=null;this.disabled=false;this.editable=false;this.moveable=false;this.done=false;this.roleindex=0;this.rerender=0}e.prototype.focusField=function(){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(e){this.el.focus();return[2]}))}))};e.prototype.showSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.showPanel){e.showPanel()}return[2]}))}))};e.prototype.hideSettingsPanel=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){e=document.getElementById("verdocs-settings-panel-".concat(this.field.name));if(e&&e.hidePanel){e.hidePanel()}return[2]}))}))};e.prototype.render=function(){var e=this;var t,n;var s=a(this.field);var d=(n=(t=this.disabled)!==null&&t!==void 0?t:s.disabled)!==null&&n!==void 0?n:false;var c=this.field["rgba"]||o(this.roleindex);if(this.done){return i(r,{class:{done:this.done}},s.value)}return i(r,{class:{required:s.required,disabled:d},style:{backgroundColor:c}},i("textarea",{placeholder:s.placeholder||"",tabIndex:s.order,value:s.value,disabled:d,name:this.field.name,required:s.required,ref:function(t){return e.el=t}}),this.editable&&i("verdocs-button-panel",{icon:l,id:"verdocs-settings-panel-".concat(this.field.name)},i("verdocs-template-field-properties",{templateId:this.templateid,fieldName:this.field.name,onClose:function(){return e.hideSettingsPanel()},onDelete:function(){var t;(t=e.deleted)===null||t===void 0?void 0:t.emit({fieldName:e.field.name});return e.hideSettingsPanel()},onSettingsChanged:function(t){var n;(n=e.settingsChanged)===null||n===void 0?void 0:n.emit(t.detail);return e.hideSettingsPanel()}})))};return e}());d.style=s}}}));
@@ -1 +0,0 @@
1
- import{r as e,c as t,h as i,H as s}from"./p-9cf1a627.js";import"./p-05788c2b.js";import{V as r}from"./p-0b4ea5f9.js";import{g as o}from"./p-4b65e2f3.js";import{S as l}from"./p-7a1b2643.js";import"./p-790beec1.js";import"./p-822ba467.js";const n=class{constructor(i){e(this,i),this.close=t(this,"close",7),this.sdkError=t(this,"sdkError",7),this.store=null,this.endpoint=r.getDefault(),this.templateId="",this.showPlanBlocker=!1,this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1",this.dirty=!1}async componentWillLoad(){var e,t,i,s,r;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");this.store=await o(this.endpoint,this.templateId,!0),this.sendReminders=!!(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.reminder_id),this.dirty=!1}catch(e){console.log("[TEMPLATE REMINDERS] Error loading template",e),null===(i=this.sdkError)||void 0===i||i.emit(new l(e.message,null===(s=e.response)||void 0===s?void 0:s.status,null===(r=e.response)||void 0===r?void 0:r.data))}}handleCancel(e){var t,i,s;e.stopPropagation(),this.sendReminders=!!(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id),this.dirty=!1,null===(s=this.close)||void 0===s||s.emit()}async handleSave(e){var t,i,s,r,o,l,n,a;if(e.stopPropagation(),this.sendReminders){const e={setup_time:864e5*+this.firstReminderDays,interval_time:864e5*+this.reminderDays};(null===(i=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===i?void 0:i.reminder_id)?await function(e,t,i,s){return e.api.put("/templates/".concat(t,"/reminder/").concat(i),s).then((function(e){return e.data}))}(this.endpoint,this.templateId,null===(s=this.store)||void 0===s?void 0:s.state.reminder_id,e):await function(e,t,i){return e.api.post("/templates/".concat(t,"/reminder/"),i).then((function(e){return e.data}))}(this.endpoint,this.templateId,e)}else await(l=this.endpoint,n=this.templateId,a=null===(r=this.store)||void 0===r?void 0:r.state.reminder_id,l.api.delete("/templates/".concat(n,"/reminder/").concat(a)).then((function(e){return e.data})));this.dirty=!1,null===(o=this.close)||void 0===o||o.emit()}render(){var e,t;return this.endpoint.session?this.endpoint.session&&(null===(t=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===t?void 0:t.isLoaded)?i(s,null,i("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},i("h5",null,"Reminders"),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-send-reminders"},"Send Automatic Reminders"),i("verdocs-checkbox",{id:"verdocs-send-reminders",name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>{this.showPlanBlocker=!0,e.target.checked=!1}})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-first-reminder-days"},"Days Before First Reminder"),i("verdocs-text-input",{id:"verdocs-first-reminder-days",type:"number",value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value,disabled:!this.sendReminders})),i("div",{class:"input-row"},i("label",{htmlFor:"verdocs-days-between-reminders"},"Days Between Reminders"),i("verdocs-text-input",{id:"verdocs-days-between-reminders",type:"number",value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value,disabled:!this.sendReminders})),i("div",{class:"buttons"},i("verdocs-button",{size:"small",variant:"outline",label:"Cancel",disabled:!this.dirty,onClick:e=>this.handleCancel(e)}),i("verdocs-button",{size:"small",label:"Save",disabled:!this.dirty,onClick:e=>this.handleSave(e)}))),this.showPlanBlocker&&i("verdocs-ok-dialog",{heading:"Upgrade to access this feature",message:"Please upgrade your plan to access this feature.",onNext:()=>this.showPlanBlocker=!1})):i(s,{class:"empty"}):i(s,null,i("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};n.style='verdocs-template-reminders{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-reminders.loading{min-height:300px;position:relative;display:block}verdocs-template-reminders.empty{display:none}verdocs-template-reminders form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-reminders form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 20px 0}verdocs-template-reminders form label{font-size:16px;font-weight:500;margin:0 0 6px 0;color:#33364b}verdocs-template-reminders form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-reminders form input:focus{outline:none}verdocs-template-reminders form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-reminders form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px}verdocs-template-reminders form .input-row verdocs-text-input input{text-align:center}verdocs-template-reminders form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-reminders .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-reminders ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-moz-placeholder{color:#aaaaaa}verdocs-template-reminders :-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-reminders ::placeholder{color:#aaaaaa}';export{n as verdocs_template_reminders}
@@ -1 +0,0 @@
1
- import{r as e,c as i,h as t,H as o}from"./p-9cf1a627.js";import"./p-05788c2b.js";import{V as s}from"./p-0b4ea5f9.js";import{g as r}from"./p-4b65e2f3.js";import{S as l}from"./p-7a1b2643.js";import"./p-790beec1.js";import"./p-822ba467.js";const a=class{constructor(t){e(this,t),this.exit=i(this,"exit",7),this.next=i(this,"next",7),this.sdkError=i(this,"sdkError",7),this.store=null,this.endpoint=s.getDefault(),this.templateId="",this.name="",this.visibility="",this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1"}async componentWillLoad(){var e,i,t,o,s,a,p;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[PROPERTIES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[PROPERTIES] Unable to start builder session, must be authenticated");this.store=await r(this.endpoint,this.templateId,!0),this.name=null===(i=null===(e=this.store)||void 0===e?void 0:e.state)||void 0===i?void 0:i.name,this.sendReminders=null!==(null===(o=null===(t=this.store)||void 0===t?void 0:t.state)||void 0===o?void 0:o.reminder_id)}catch(e){console.log("[PROPERTIES] Error loading template",e),null===(s=this.sdkError)||void 0===s||s.emit(new l(e.message,null===(a=e.response)||void 0===a?void 0:a.status,null===(p=e.response)||void 0===p?void 0:p.data))}}handleCancel(e){var i;e.stopPropagation(),null===(i=this.exit)||void 0===i||i.emit()}handleSubmit(e){var i;e.stopPropagation(),null===(i=this.next)||void 0===i||i.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})}render(){return this.endpoint.session?t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},t("h5",null,"Template Name"),t("fieldset",null,t("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:e=>this.name=e.target.value})),t("h5",null,"Reminders"),t("fieldset",null,t("div",{class:"input-row"},t("label",null,"Send Automatic Reminders"),t("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>this.sendReminders=e.target.checked})),t("div",{class:"input-row"},t("label",null,"Days Before First Reminder"),t("verdocs-text-input",{value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value})),t("div",{class:"input-row"},t("label",null,"Days Between Reminders"),t("verdocs-text-input",{value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value}))),t("h5",null,"Template Visibility"),t("fieldset",null,t("div",{class:"radio-row"},t("verdocs-radio-button",{name:"visibility",checked:!0,value:"private",onChange:()=>this.visibility="private"}),t("label",{htmlFor:"verdocs-radio-button-visibility-private"},t("div",{class:"title"},"Private"),t("div",{class:"description"},"Only you can share and use this template"))),t("div",{class:"radio-row"},t("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared",onChange:()=>this.visibility="shared"}),t("label",{htmlFor:"verdocs-radio-button-visibility-shared"},t("div",{class:"title"},"Shared to your organization"),t("div",{class:"description"},"Give access to your organization to share and use this template"))),t("div",{class:"radio-row"},t("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared_public",onChange:()=>this.visibility="shared_public"}),t("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},t("div",{class:"title"},"Shared to your organization and Public"),t("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),t("div",{class:"radio-row"},t("verdocs-radio-button",{name:"visibility",checked:"public"===this.visibility,value:"public",onChange:()=>this.visibility="public"}),t("label",{htmlFor:"verdocs-radio-button-visibility-public"},t("div",{class:"title"},"Public"),t("div",{class:"description"},"Anyone on the Web can find and use this template")))),t("div",{class:"buttons"},t("div",{class:"flex-fill"}),t("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),t("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e)}))):t(o,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};a.style='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';export{a as verdocs_template_properties}
@@ -1 +0,0 @@
1
- var __awaiter=this&&this.__awaiter||function(e,t,i,r){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,n){function s(e){try{l(r.next(e))}catch(e){n(e)}}function a(e){try{l(r["throw"](e))}catch(e){n(e)}}function l(e){e.done?i(e.value):o(e.value).then(s,a)}l((r=r.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(n[0]&1)throw n[1];return n[1]},trys:[],ops:[]},r,o,n,s;return s={next:a(0),throw:a(1),return:a(2)},typeof Symbol==="function"&&(s[Symbol.iterator]=function(){return this}),s;function a(e){return function(t){return l([e,t])}}function l(s){if(r)throw new TypeError("Generator is already executing.");while(i)try{if(r=1,o&&(n=s[0]&2?o["return"]:s[0]?o["throw"]||((n=o["return"])&&n.call(o),0):o.next)&&!(n=n.call(o,s[1])).done)return n;if(o=0,n)s=[s[0]&2,n.value];switch(s[0]){case 0:case 1:n=s;break;case 4:i.label++;return{value:s[1],done:false};case 5:i.label++;o=s[1];s=[0];continue;case 7:s=i.ops.pop();i.trys.pop();continue;default:if(!(n=i.trys,n=n.length>0&&n[n.length-1])&&(s[0]===6||s[0]===2)){i=0;continue}if(s[0]===3&&(!n||s[1]>n[0]&&s[1]<n[3])){i.label=s[1];break}if(s[0]===6&&i.label<n[1]){i.label=n[1];n=s;break}if(n&&i.label<n[2]){i.label=n[2];i.ops.push(s);break}if(n[2])i.ops.pop();i.trys.pop();continue}s=t.call(e,i)}catch(e){s=[6,e];o=0}finally{r=n=0}if(s[0]&5)throw s[1];return{value:s[0]?s[1]:void 0,done:true}}};System.register(["./p-934a39b4.system.js","./p-54498887.system.js","./p-dc849a58.system.js","./p-4cc5d833.system.js","./p-187b20b7.system.js","./p-b4d11d90.system.js","./p-4ac861c9.system.js"],(function(e){"use strict";var t,i,r,o,n,s,a;return{setters:[function(e){t=e.r;i=e.c;r=e.h;o=e.H},function(){},function(e){n=e.V},function(e){s=e.g},function(e){a=e.S},function(){},function(){}],execute:function(){var l='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';var p=e("verdocs_template_properties",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.store=null;this.endpoint=n.getDefault();this.templateId="";this.name="";this.visibility="";this.sendReminders=false;this.firstReminderDays="1";this.reminderDays="1"}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,r,o,n,l,p,d;return __generator(this,(function(c){switch(c.label){case 0:c.trys.push([0,2,,3]);this.endpoint.loadSession();if(!this.templateId){console.log("[PROPERTIES] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[PROPERTIES] Unable to start builder session, must be authenticated");return[2]}p=this;return[4,s(this.endpoint,this.templateId,true)];case 1:p.store=c.sent();this.name=(t=(e=this.store)===null||e===void 0?void 0:e.state)===null||t===void 0?void 0:t.name;this.sendReminders=((r=(i=this.store)===null||i===void 0?void 0:i.state)===null||r===void 0?void 0:r.reminder_id)!==null;return[3,3];case 2:d=c.sent();console.log("[PROPERTIES] Error loading template",d);(o=this.sdkError)===null||o===void 0?void 0:o.emit(new a(d.message,(n=d.response)===null||n===void 0?void 0:n.status,(l=d.response)===null||l===void 0?void 0:l.data));return[3,3];case 3:return[2]}}))}))};e.prototype.handleCancel=function(e){var t;e.stopPropagation();(t=this.exit)===null||t===void 0?void 0:t.emit()};e.prototype.handleSubmit=function(e){var t;e.stopPropagation();(t=this.next)===null||t===void 0?void 0:t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return r(o,null,r("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return r("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},r("h5",null,"Template Name"),r("fieldset",null,r("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:function(t){return e.name=t.target.value}})),r("h5",null,"Reminders"),r("fieldset",null,r("div",{class:"input-row"},r("label",null,"Send Automatic Reminders"),r("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:function(t){return e.sendReminders=t.target.checked}})),r("div",{class:"input-row"},r("label",null,"Days Before First Reminder"),r("verdocs-text-input",{value:this.firstReminderDays,onInput:function(t){return e.firstReminderDays=t.target.value}})),r("div",{class:"input-row"},r("label",null,"Days Between Reminders"),r("verdocs-text-input",{value:this.reminderDays,onInput:function(t){return e.reminderDays=t.target.value}}))),r("h5",null,"Template Visibility"),r("fieldset",null,r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:true,value:"private",onChange:function(){return e.visibility="private"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-private"},r("div",{class:"title"},"Private"),r("div",{class:"description"},"Only you can share and use this template"))),r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:true,value:"shared",onChange:function(){return e.visibility="shared"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-shared"},r("div",{class:"title"},"Shared to your organization"),r("div",{class:"description"},"Give access to your organization to share and use this template"))),r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:true,value:"shared_public",onChange:function(){return e.visibility="shared_public"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},r("div",{class:"title"},"Shared to your organization and Public"),r("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),r("div",{class:"radio-row"},r("verdocs-radio-button",{name:"visibility",checked:this.visibility==="public",value:"public",onChange:function(){return e.visibility="public"}}),r("label",{htmlFor:"verdocs-radio-button-visibility-public"},r("div",{class:"title"},"Public"),r("div",{class:"description"},"Anyone on the Web can find and use this template")))),r("div",{class:"buttons"},r("div",{class:"flex-fill"}),r("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)}}),r("verdocs-button",{label:"OK",size:"small",onClick:function(t){return e.handleSubmit(t)}})))};return e}());p.style=l}}}));
@@ -1 +0,0 @@
1
- System.register(["./p-934a39b4.system.js","./p-dc849a58.system.js","./p-54498887.system.js","./p-187b20b7.system.js"],(function(t){"use strict";var e,n,i,s,o;return{setters:[function(t){e=t.r;n=t.c;i=t.h},function(t){s=t.V},function(){},function(t){o=t.S}],execute:function(){var a=function(t,e){return t.api.post("/authentication/login",e).then((function(t){return t.data}))};var r='verdocs-auth{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}';var l=t("verdocs_auth",function(){function t(t){e(this,t);this.authenticated=n(this,"authenticated",7);this.sdkError=n(this,"sdkError",7);this.endpoint=s.getDefault();this.visible=true;this.logo="https://verdocs.com/assets/blue-logo.svg";this.isAuthenticated=false;this.displayMode="login";this.username="";this.password="";this.loggingIn=false;this.activeSession=null;this.loginError=null}t.prototype.componentWillLoad=function(){var t,e;this.endpoint.loadSession();if(this.endpoint.session){console.log("[AUTH] Authenticated");this.isAuthenticated=true;this.activeSession=this.endpoint.session;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:true,session:this.endpoint.session})}else{console.log("[AUTH] Anonymous");(e=this.authenticated)===null||e===void 0?void 0:e.emit({authenticated:false,session:null})}};t.prototype.handleLogin=function(){var t=this;this.loggingIn=true;a(this.endpoint,{username:this.username,password:this.password}).then((function(e){var n;t.loggingIn=false;t.endpoint.setToken(e.accessToken);t.activeSession=t.endpoint.session;t.isAuthenticated=true;(n=t.authenticated)===null||n===void 0?void 0:n.emit({authenticated:true,session:t.endpoint.session})})).catch((function(e){var n,i,s,a,r;console.log("[AUTH] Authentication error",e.response,JSON.stringify(e));t.loggingIn=false;t.activeSession=null;(n=t.authenticated)===null||n===void 0?void 0:n.emit({authenticated:false,session:null});(i=t.sdkError)===null||i===void 0?void 0:i.emit(new o(e.message,(s=e.response)===null||s===void 0?void 0:s.status,(a=e.response)===null||a===void 0?void 0:a.data));if(((r=e===null||e===void 0?void 0:e.response)===null||r===void 0?void 0:r.status)===403){t.loginError="Please check your username and password and try again."}}))};t.prototype.handleLogout=function(){var t;this.endpoint.clearSession();this.isAuthenticated=false;(t=this.authenticated)===null||t===void 0?void 0:t.emit({authenticated:false,session:null})};t.prototype.handleClearError=function(){this.loginError=null};t.prototype.render=function(){var t=this;if(!this.visible){return i("div",{style:{display:"none"}},"Authenticated")}if(this.isAuthenticated){return i("div",{class:"status-result"},"Authenticated")}if(this.displayMode==="signup"){return i("div",{class:"signup-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Sign up for an account"),i("h4",null,"Already have an account?",i("verdocs-button",{label:"Log In",variant:"text",onClick:function(){return t.displayMode="login"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(e){return t.username=e.target.value},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(e){return t.password=e.target.value},disabled:this.loggingIn}),i("verdocs-button",{label:"Signup",disabled:this.loggingIn,onClick:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"30px auto 0"}})))}return i("div",{class:"login-form"},i("img",{src:this.logo,alt:"Verdocs Logo",class:"logo"}),i("h3",null,"Log in to your account"),i("h4",null,"Don't have an account?",i("verdocs-button",{label:"Sign Up",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn})),i("form",{onSubmit:function(){return t.handleLogin()}},i("verdocs-text-input",{label:"Email",autocomplete:"username",value:this.username,onInput:function(e){return t.username=e.target.value},disabled:this.loggingIn}),i("verdocs-text-input",{label:"Password",type:"password",autocomplete:"current-password",value:this.password,onInput:function(e){return t.password=e.target.value},disabled:this.loggingIn}),i("verdocs-button",{label:"Forgot Your Password?",variant:"text",onClick:function(){return t.displayMode="signup"},disabled:this.loggingIn,style:{display:"flex",justifyContent:"center",margin:"10px auto 20px"}}),i("verdocs-button",{label:"Login",disabled:this.loggingIn,onClick:function(){return t.handleLogin()},style:{display:"flex",justifyContent:"center",margin:"10px auto 0"}})),this.loginError?i("verdocs-ok-dialog",{heading:"Login Error",message:this.loginError,onNext:function(){return t.handleClearError()}}):i("div",null))};return t}());l.style=r}}}));