@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.
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +5 -10
- package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +48 -4
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -5
- package/dist/cjs/verdocs-status-indicator.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +37 -17
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +0 -1
- package/dist/collection/components/controls/verdocs-checkbox/verdocs-checkbox.css +3 -4
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +6 -12
- package/dist/collection/components/envelopes/verdocs-status-indicator/verdocs-status-indicator.css +2 -3
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.css +13 -8
- package/dist/collection/components/fields/verdocs-field-textarea/verdocs-field-textarea.js +67 -2
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +2 -4
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +1 -1
- package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.js +37 -17
- package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.stories.js +1 -1
- package/dist/components/Recipients.js +74 -0
- package/dist/components/Toast.js +1 -74
- package/dist/components/index.d.ts +0 -1
- package/dist/components/index.js +0 -1
- package/dist/components/verdocs-auth.js +10 -22
- package/dist/components/verdocs-checkbox2.js +1 -1
- package/dist/components/verdocs-envelope-recipient-summary2.js +2 -1
- package/dist/components/verdocs-field-textarea.js +49 -3
- package/dist/components/verdocs-field-textbox.js +3 -5
- package/dist/components/verdocs-sign.js +2 -1
- package/dist/components/verdocs-status-indicator.js +1 -1
- package/dist/components/verdocs-template-reminders.js +37 -17
- package/dist/docs.json +19 -129
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +5 -10
- package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +49 -5
- package/dist/esm/verdocs-field-textbox.entry.js +3 -5
- package/dist/esm/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm/verdocs-template-reminders.entry.js +37 -17
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +0 -2
- package/dist/types/components/fields/verdocs-field-textarea/verdocs-field-textarea.d.ts +15 -3
- package/dist/types/components/fields/verdocs-field-textbox/verdocs-field-textbox.d.ts +2 -2
- package/dist/types/components.d.ts +8 -45
- package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-be729608.system.entry.js → p-2a5b951c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-48d71927.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8aba7c0a.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-8e181e8c.entry.js → p-8b85f402.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b18c293a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b772cdb5.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c2e75693.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c841a530.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7bd5422e.system.entry.js → p-e4ab3dfc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e5f44611.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ebca6188.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f37f1ebc.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +0 -75
- package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.css +0 -102
- package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.js +0 -177
- package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +0 -13
- package/dist/components/verdocs-template-properties.d.ts +0 -11
- package/dist/components/verdocs-template-properties.js +0 -131
- package/dist/custom-elements.json +0 -1616
- package/dist/esm/verdocs-template-properties.entry.js +0 -71
- package/dist/esm-es5/verdocs-template-properties.entry.js +0 -1
- package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.d.ts +0 -45
- package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.stories.d.ts +0 -8
- package/dist/verdocs-web-sdk/p-0e4fe8f9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1d14ae9c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4157aa74.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4a9a3134.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-71976828.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-73717726.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-77cd3ac5.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b3a8928b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b6016e12.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d2bcbce0.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e7058963.system.entry.js +0 -1
@@ -1,10 +1,10 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
2
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
3
3
|
import './Types.js';
|
4
|
+
import { V as VerdocsToast } from './Toast.js';
|
4
5
|
import { S as SDKError } from './errors.js';
|
5
|
-
import { d as defineCustomElement$
|
6
|
-
import { d as defineCustomElement$
|
7
|
-
import { d as defineCustomElement$3 } from './verdocs-ok-dialog2.js';
|
6
|
+
import { d as defineCustomElement$4 } from './verdocs-button2.js';
|
7
|
+
import { d as defineCustomElement$3 } from './verdocs-help-icon2.js';
|
8
8
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
9
9
|
|
10
10
|
/**
|
@@ -41,7 +41,6 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
41
41
|
this.password = '';
|
42
42
|
this.loggingIn = false;
|
43
43
|
this.activeSession = null;
|
44
|
-
this.loginError = null;
|
45
44
|
}
|
46
45
|
componentWillLoad() {
|
47
46
|
var _a, _b;
|
@@ -69,15 +68,13 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
69
68
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: true, session: this.endpoint.session });
|
70
69
|
})
|
71
70
|
.catch(e => {
|
72
|
-
var _a, _b, _c, _d
|
71
|
+
var _a, _b, _c, _d;
|
73
72
|
console.log('[AUTH] Authentication error', e.response, JSON.stringify(e));
|
74
73
|
this.loggingIn = false;
|
75
74
|
this.activeSession = null;
|
76
75
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
77
76
|
(_b = this.sdkError) === null || _b === void 0 ? void 0 : _b.emit(new SDKError(e.message, (_c = e.response) === null || _c === void 0 ? void 0 : _c.status, (_d = e.response) === null || _d === void 0 ? void 0 : _d.data));
|
78
|
-
|
79
|
-
this.loginError = 'Please check your username and password and try again.';
|
80
|
-
}
|
77
|
+
VerdocsToast('Login failed. Please check your username and password and try again.', { style: 'error' });
|
81
78
|
});
|
82
79
|
}
|
83
80
|
handleLogout() {
|
@@ -86,20 +83,17 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
86
83
|
this.isAuthenticated = false;
|
87
84
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
88
85
|
}
|
89
|
-
handleClearError() {
|
90
|
-
this.loginError = null;
|
91
|
-
}
|
92
86
|
render() {
|
93
87
|
if (!this.visible) {
|
94
88
|
return h("div", { style: { display: 'none' } }, "Authenticated");
|
95
89
|
}
|
96
90
|
if (this.isAuthenticated) {
|
97
|
-
return h("
|
91
|
+
return (h("verdocs-button", { label: "Sign Out", disabled: this.loggingIn, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
|
98
92
|
}
|
99
93
|
if (this.displayMode === 'signup') {
|
100
94
|
return (h("div", { class: "signup-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Sign up for an account"), h("h4", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.loggingIn })), h("form", { onSubmit: () => this.handleLogin() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.loggingIn }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.loggingIn }), h("verdocs-button", { label: "Signup", disabled: this.loggingIn, onClick: () => this.handleLogin(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))));
|
101
95
|
}
|
102
|
-
return (h("div", { class: "login-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Log in to your account"), h("h4", null, "Don't have an account?", h("verdocs-button", { label: "Sign Up", variant: "text", onClick: () => (this.displayMode = 'signup'), disabled: this.loggingIn })), h("form", { onSubmit: () => this.handleLogin() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.loggingIn }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.loggingIn }), h("verdocs-button", { label: "Forgot Your Password?", variant: "text", onClick: () => (this.displayMode = 'signup'), disabled: this.loggingIn, style: { display: 'flex', justifyContent: 'center', margin: '10px auto 20px' } }), h("verdocs-button", { label: "Login", disabled: this.loggingIn, onClick: () => this.handleLogin(), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } }))
|
96
|
+
return (h("div", { class: "login-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Log in to your account"), h("h4", null, "Don't have an account?", h("verdocs-button", { label: "Sign Up", variant: "text", onClick: () => (this.displayMode = 'signup'), disabled: this.loggingIn })), h("form", { onSubmit: () => this.handleLogin() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.loggingIn }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.loggingIn }), h("verdocs-button", { label: "Forgot Your Password?", variant: "text", onClick: () => (this.displayMode = 'signup'), disabled: this.loggingIn, style: { display: 'flex', justifyContent: 'center', margin: '10px auto 20px' } }), h("verdocs-button", { label: "Login", disabled: this.loggingIn, onClick: () => this.handleLogin(), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } }))));
|
103
97
|
}
|
104
98
|
static get style() { return verdocsAuthCss; }
|
105
99
|
}, [0, "verdocs-auth", {
|
@@ -111,14 +105,13 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
111
105
|
"username": [32],
|
112
106
|
"password": [32],
|
113
107
|
"loggingIn": [32],
|
114
|
-
"activeSession": [32]
|
115
|
-
"loginError": [32]
|
108
|
+
"activeSession": [32]
|
116
109
|
}]);
|
117
110
|
function defineCustomElement$1() {
|
118
111
|
if (typeof customElements === "undefined") {
|
119
112
|
return;
|
120
113
|
}
|
121
|
-
const components = ["verdocs-auth", "verdocs-button", "verdocs-help-icon", "verdocs-
|
114
|
+
const components = ["verdocs-auth", "verdocs-button", "verdocs-help-icon", "verdocs-text-input"];
|
122
115
|
components.forEach(tagName => { switch (tagName) {
|
123
116
|
case "verdocs-auth":
|
124
117
|
if (!customElements.get(tagName)) {
|
@@ -126,16 +119,11 @@ function defineCustomElement$1() {
|
|
126
119
|
}
|
127
120
|
break;
|
128
121
|
case "verdocs-button":
|
129
|
-
if (!customElements.get(tagName)) {
|
130
|
-
defineCustomElement$5();
|
131
|
-
}
|
132
|
-
break;
|
133
|
-
case "verdocs-help-icon":
|
134
122
|
if (!customElements.get(tagName)) {
|
135
123
|
defineCustomElement$4();
|
136
124
|
}
|
137
125
|
break;
|
138
|
-
case "verdocs-
|
126
|
+
case "verdocs-help-icon":
|
139
127
|
if (!customElements.get(tagName)) {
|
140
128
|
defineCustomElement$3();
|
141
129
|
}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
2
|
|
3
|
-
const verdocsCheckboxCss = "@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:
|
3
|
+
const verdocsCheckboxCss = "@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:20px;height:20px;-ms-flex-negative:0;flex-shrink:0;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:\"✓\";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}";
|
4
4
|
|
5
5
|
const VerdocsCheckbox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
6
6
|
constructor() {
|
@@ -1,10 +1,11 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { g as getRecipientsWithActions, r as recipientCanAct } from './Permissions.js';
|
3
|
-
import {
|
3
|
+
import { g as getInPersonLink } from './Recipients.js';
|
4
4
|
import './Types.js';
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
6
6
|
import { c as createStore } from './index3.js';
|
7
7
|
import { d as getEnvelope } from './Envelopes.js';
|
8
|
+
import { V as VerdocsToast } from './Toast.js';
|
8
9
|
import { S as SDKError } from './errors.js';
|
9
10
|
import { d as defineCustomElement$1 } from './verdocs-button2.js';
|
10
11
|
|
@@ -1,6 +1,10 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
+
import './Types.js';
|
3
|
+
import { u as updateField } from './Fields.js';
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
2
5
|
import { g as getRGBA } from './Colors.js';
|
3
6
|
import { g as getFieldSettings } from './utils.js';
|
7
|
+
import { i as interact } from './interact.min.js';
|
4
8
|
import { d as defineCustomElement$9 } from './verdocs-button2.js';
|
5
9
|
import { d as defineCustomElement$8 } from './verdocs-button-panel2.js';
|
6
10
|
import { d as defineCustomElement$7 } from './verdocs-checkbox2.js';
|
@@ -10,7 +14,7 @@ import { d as defineCustomElement$4 } from './verdocs-select-input2.js';
|
|
10
14
|
import { d as defineCustomElement$3 } from './verdocs-template-field-properties2.js';
|
11
15
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
12
16
|
|
13
|
-
const verdocsFieldTextareaCss = "verdocs-field-textarea{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;
|
17
|
+
const verdocsFieldTextareaCss = "verdocs-field-textarea{width:150px;height:15px;display:block;font-size:11px;position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;border:1px solid rgba(0, 0, 0, 0.2)}verdocs-field-textarea.disabled{opacity:0.5}verdocs-field-textarea textarea{width:100%;height:100%;resize:none;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-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}";
|
14
18
|
|
15
19
|
const settingsIcon = '<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>';
|
16
20
|
const VerdocsFieldTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
@@ -19,6 +23,7 @@ const VerdocsFieldTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
19
23
|
this.__registerHost();
|
20
24
|
this.settingsChanged = createEvent(this, "settingsChanged", 7);
|
21
25
|
this.deleted = createEvent(this, "deleted", 7);
|
26
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
22
27
|
this.templateid = '';
|
23
28
|
this.field = null;
|
24
29
|
this.disabled = false;
|
@@ -29,7 +34,7 @@ const VerdocsFieldTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
29
34
|
this.rerender = 0;
|
30
35
|
}
|
31
36
|
async focusField() {
|
32
|
-
this.
|
37
|
+
this.inputEl.focus();
|
33
38
|
}
|
34
39
|
async showSettingsPanel() {
|
35
40
|
const settingsPanel = document.getElementById(`verdocs-settings-panel-${this.field.name}`);
|
@@ -44,6 +49,45 @@ const VerdocsFieldTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
44
49
|
}
|
45
50
|
// TemplateStore.updateCount++;
|
46
51
|
}
|
52
|
+
componentDidRender() {
|
53
|
+
interact.dynamicDrop(true);
|
54
|
+
if (this.editable) {
|
55
|
+
interact(this.el).resizable({
|
56
|
+
edges: { top: true, bottom: true, left: true, right: true },
|
57
|
+
listeners: {
|
58
|
+
start: this.handleResizeStart.bind(this),
|
59
|
+
move: this.handleResize.bind(this),
|
60
|
+
end: this.handleResizeEnd.bind(this),
|
61
|
+
},
|
62
|
+
});
|
63
|
+
}
|
64
|
+
}
|
65
|
+
handleResizeStart(e) {
|
66
|
+
e.preventDefault();
|
67
|
+
e.stopPropagation();
|
68
|
+
}
|
69
|
+
handleResize(e) {
|
70
|
+
const oldX = +(e.target.getAttribute('resizeX') || 0);
|
71
|
+
const oldY = +(e.target.getAttribute('resizeY') || 0);
|
72
|
+
const newX = e.dx + oldX;
|
73
|
+
const newY = e.dy + oldY;
|
74
|
+
this.el.style.width = `${parseFloat(this.el.style.width || '0') + e.dx}px`;
|
75
|
+
this.el.style.height = `${parseFloat(this.el.style.height || '0') + e.dy}px`;
|
76
|
+
e.target.setAttribute('resizeX', newX);
|
77
|
+
e.target.setAttribute('resizeY', newY);
|
78
|
+
}
|
79
|
+
handleResizeEnd(e) {
|
80
|
+
const resizeWidth = +(e.target.getAttribute('resizeX') || 0);
|
81
|
+
const resizeHeight = +(e.target.getAttribute('resizeY') || 0);
|
82
|
+
const settings = getFieldSettings(this.field);
|
83
|
+
const newWidth = (settings.width || 150) + resizeWidth;
|
84
|
+
const newHeight = (settings.height || 41) + resizeHeight;
|
85
|
+
const newSettings = { ...getFieldSettings(this.field), width: Math.round(newWidth), height: Math.round(newHeight) };
|
86
|
+
delete newSettings['result'];
|
87
|
+
updateField(this.endpoint, this.templateid, this.field.name, { setting: newSettings })
|
88
|
+
.then(() => { var _a; return (_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name, settings: newSettings }); })
|
89
|
+
.catch(e => console.log('Field update failed', e));
|
90
|
+
}
|
47
91
|
render() {
|
48
92
|
var _a, _b;
|
49
93
|
const settings = getFieldSettings(this.field);
|
@@ -52,7 +96,7 @@ const VerdocsFieldTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
52
96
|
if (this.done) {
|
53
97
|
return h(Host, { class: { done: this.done } }, settings.value);
|
54
98
|
}
|
55
|
-
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("textarea", { placeholder: settings.placeholder || '', tabIndex: settings.order, value: settings.value, disabled: disabled, name: this.field.name, required: settings.required, ref: el => (this.
|
99
|
+
return (h(Host, { class: { required: settings.required, disabled }, style: { backgroundColor } }, h("textarea", { placeholder: settings.placeholder || '', tabIndex: settings.order, value: settings.value, disabled: disabled, name: this.field.name, required: settings.required, ref: el => (this.inputEl = el) }), this.editable && (h("verdocs-button-panel", { icon: settingsIcon, id: `verdocs-settings-panel-${this.field.name}` }, h("verdocs-template-field-properties", { templateId: this.templateid, fieldName: this.field.name, onClose: () => this.hideSettingsPanel(), onDelete: () => {
|
56
100
|
var _a;
|
57
101
|
(_a = this.deleted) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.field.name });
|
58
102
|
return this.hideSettingsPanel();
|
@@ -62,8 +106,10 @@ const VerdocsFieldTextarea$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
62
106
|
return this.hideSettingsPanel();
|
63
107
|
} })))));
|
64
108
|
}
|
109
|
+
get el() { return this; }
|
65
110
|
static get style() { return verdocsFieldTextareaCss; }
|
66
111
|
}, [0, "verdocs-field-textarea", {
|
112
|
+
"endpoint": [16],
|
67
113
|
"templateid": [1],
|
68
114
|
"field": [16],
|
69
115
|
"disabled": [4],
|
@@ -1,10 +1,10 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { i as interact } from './interact.min.js';
|
3
|
-
import { g as getRGBA } from './Colors.js';
|
4
|
-
import { g as getFieldSettings } from './utils.js';
|
5
|
-
import { u as updateField } from './Fields.js';
|
6
3
|
import './Types.js';
|
4
|
+
import { u as updateField } from './Fields.js';
|
7
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
6
|
+
import { g as getRGBA } from './Colors.js';
|
7
|
+
import { g as getFieldSettings } from './utils.js';
|
8
8
|
import { d as defineCustomElement$9 } from './verdocs-button2.js';
|
9
9
|
import { d as defineCustomElement$8 } from './verdocs-button-panel2.js';
|
10
10
|
import { d as defineCustomElement$7 } from './verdocs-checkbox2.js';
|
@@ -67,7 +67,6 @@ const VerdocsFieldTextbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
67
67
|
e.stopPropagation();
|
68
68
|
}
|
69
69
|
handleResize(e) {
|
70
|
-
console.log('resize', e);
|
71
70
|
const oldX = +(e.target.getAttribute('resizeX') || 0);
|
72
71
|
const oldY = +(e.target.getAttribute('resizeY') || 0);
|
73
72
|
const newX = e.dx + oldX;
|
@@ -79,7 +78,6 @@ const VerdocsFieldTextbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
79
78
|
e.target.setAttribute('resizeY', newY);
|
80
79
|
}
|
81
80
|
handleResizeEnd(e) {
|
82
|
-
console.log('resizeEnd', e);
|
83
81
|
const resizeWidth = +(e.target.getAttribute('resizeX') || 0);
|
84
82
|
const settings = getFieldSettings(this.field);
|
85
83
|
const newWidth = (settings.width || 150) + resizeWidth;
|
@@ -1,13 +1,14 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host, Fragment } from '@stencil/core/internal/client';
|
2
2
|
import { g as getSigningSession, t as throttledGetEnvelope, u as updateEnvelopeField, a as updateEnvelopeFieldSignature, b as updateEnvelopeFieldInitials } from './Envelopes.js';
|
3
3
|
import { R as RecipientStates } from './Types.js';
|
4
|
-
import { e as envelopeRecipientAgree, a as envelopeRecipientDecline,
|
4
|
+
import { e as envelopeRecipientAgree, a as envelopeRecipientDecline, b as envelopeRecipientSubmit } from './Recipients.js';
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
6
6
|
import { a as isValidPhone, i as isValidEmail } from './Validators.js';
|
7
7
|
import { f as fullNameToInitials, i as integerSequence } from './Primitives.js';
|
8
8
|
import { s as saveAttachment, u as updateDocumentFieldValue, a as getRoleIndex, r as renderDocumentField, b as getFieldId } from './utils.js';
|
9
9
|
import { a as FORMAT_DATE } from './Types2.js';
|
10
10
|
import { S as SDKError } from './errors.js';
|
11
|
+
import { V as VerdocsToast } from './Toast.js';
|
11
12
|
import { d as defineCustomElement$8 } from './verdocs-button2.js';
|
12
13
|
import { d as defineCustomElement$7 } from './verdocs-checkbox2.js';
|
13
14
|
import { d as defineCustomElement$6 } from './verdocs-dropdown2.js';
|
@@ -7199,7 +7199,7 @@ function RecipientFlow() {
|
|
7199
7199
|
};
|
7200
7200
|
}
|
7201
7201
|
|
7202
|
-
const verdocsStatusIndicatorCss = "verdocs-status-indicator{display:-ms-flexbox;display:flex;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;
|
7202
|
+
const verdocsStatusIndicatorCss = "verdocs-status-indicator{display:-ms-flexbox;display:flex;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-status-indicator.has-document:hover{cursor:pointer;background:rgba(0, 0, 0, 0.1)}verdocs-status-indicator .icon{width:25px;height:25px;margin:0 10px 0 0}verdocs-status-indicator.dark{color:#ffffff}verdocs-status-indicator.small{font-size:16px}verdocs-status-indicator.small .icon{width:20px;height:20px;margin:0 8px 0 0}verdocs-status-indicator .detail-panel{display:none;background:#ffffff;border:1px solid #1e2031;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;border-radius:10px;font-weight:500}verdocs-status-indicator .detail-panel h1{font-size:44px;color:#092c4c}verdocs-status-indicator .detail-panel[data-show]{display:-ms-flexbox;display:flex}";
|
7203
7203
|
|
7204
7204
|
const AcceptedDark = `<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12.5" cy="12.5" r="11.5" stroke="white" stroke-width="2"/><path d="M11.728 15.968C11.7067 15.9893 11.7013 16.0107 11.712 16.032C11.7227 16.0533 11.744 16.064 11.776 16.064H16.112C16.1653 16.064 16.208 16.0853 16.24 16.128C16.2827 16.16 16.304 16.2027 16.304 16.256V17.808C16.304 17.8613 16.2827 17.9093 16.24 17.952C16.208 17.984 16.1653 18 16.112 18H8.912C8.85867 18 8.81067 17.984 8.768 17.952C8.736 17.9093 8.72 17.8613 8.72 17.808V16.336C8.72 16.24 8.752 16.16 8.816 16.096C9.33867 15.584 9.872 15.0293 10.416 14.432C10.96 13.824 11.3013 13.4453 11.44 13.296C11.7387 12.944 12.0427 12.608 12.352 12.288C13.3227 11.2107 13.808 10.4107 13.808 9.888C13.808 9.51467 13.6747 9.21067 13.408 8.976C13.1413 8.73067 12.7947 8.608 12.368 8.608C11.9413 8.608 11.5947 8.73067 11.328 8.976C11.0613 9.21067 10.928 9.52533 10.928 9.92V10.32C10.928 10.3733 10.9067 10.4213 10.864 10.464C10.832 10.496 10.7893 10.512 10.736 10.512H8.848C8.79467 10.512 8.74667 10.496 8.704 10.464C8.672 10.4213 8.656 10.3733 8.656 10.32V9.568C8.688 8.992 8.86933 8.48533 9.2 8.048C9.53067 7.6 9.968 7.25867 10.512 7.024C11.0667 6.78933 11.6853 6.672 12.368 6.672C13.1253 6.672 13.7813 6.816 14.336 7.104C14.9013 7.38133 15.3333 7.76 15.632 8.24C15.9413 8.72 16.096 9.25333 16.096 9.84C16.096 10.288 15.984 10.7467 15.76 11.216C15.536 11.6853 15.2 12.192 14.752 12.736C14.4213 13.152 14.064 13.5627 13.68 13.968C13.296 14.3733 12.7253 14.96 11.968 15.728L11.728 15.968Z" fill="white"/></svg>`;
|
7205
7205
|
const AcceptedLight = `<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg"><circle cx="12.5" cy="12.5" r="11.5" stroke="#654DCB" stroke-width="2"/><path d="M11.728 15.968C11.7067 15.9893 11.7013 16.0107 11.712 16.032C11.7227 16.0533 11.744 16.064 11.776 16.064H16.112C16.1653 16.064 16.208 16.0853 16.24 16.128C16.2827 16.16 16.304 16.2027 16.304 16.256V17.808C16.304 17.8613 16.2827 17.9093 16.24 17.952C16.208 17.984 16.1653 18 16.112 18H8.912C8.85867 18 8.81067 17.984 8.768 17.952C8.736 17.9093 8.72 17.8613 8.72 17.808V16.336C8.72 16.24 8.752 16.16 8.816 16.096C9.33867 15.584 9.872 15.0293 10.416 14.432C10.96 13.824 11.3013 13.4453 11.44 13.296C11.7387 12.944 12.0427 12.608 12.352 12.288C13.3227 11.2107 13.808 10.4107 13.808 9.888C13.808 9.51467 13.6747 9.21067 13.408 8.976C13.1413 8.73067 12.7947 8.608 12.368 8.608C11.9413 8.608 11.5947 8.73067 11.328 8.976C11.0613 9.21067 10.928 9.52533 10.928 9.92V10.32C10.928 10.3733 10.9067 10.4213 10.864 10.464C10.832 10.496 10.7893 10.512 10.736 10.512H8.848C8.79467 10.512 8.74667 10.496 8.704 10.464C8.672 10.4213 8.656 10.3733 8.656 10.32V9.568C8.688 8.992 8.86933 8.48533 9.2 8.048C9.53067 7.6 9.968 7.25867 10.512 7.024C11.0667 6.78933 11.6853 6.672 12.368 6.672C13.1253 6.672 13.7813 6.816 14.336 7.104C14.9013 7.38133 15.3333 7.76 15.632 8.24C15.9413 8.72 16.096 9.25333 16.096 9.84C16.096 10.288 15.984 10.7467 15.76 11.216C15.536 11.6853 15.2 12.192 14.752 12.736C14.4213 13.152 14.064 13.5627 13.68 13.968C13.296 14.3733 12.7253 14.96 11.968 15.728L11.728 15.968Z" fill="#654DCB"/></svg>`;
|
@@ -3,6 +3,7 @@ import './Types.js';
|
|
3
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
4
4
|
import { g as getTemplateStore } from './TemplateStore.js';
|
5
5
|
import { S as SDKError } from './errors.js';
|
6
|
+
import { V as VerdocsToast } from './Toast.js';
|
6
7
|
import { d as defineCustomElement$7 } from './verdocs-button2.js';
|
7
8
|
import { d as defineCustomElement$6 } from './verdocs-checkbox2.js';
|
8
9
|
import { d as defineCustomElement$5 } from './verdocs-component-error2.js';
|
@@ -43,6 +44,9 @@ const VerdocsTemplateReminders$1 = /*@__PURE__*/ proxyCustomElement(class extend
|
|
43
44
|
this.reminderDays = '1';
|
44
45
|
this.dirty = false;
|
45
46
|
}
|
47
|
+
// POST https://api.verdocs.com/templates/8337af06-3b5a-4e1b-98be-67d82bc7ecd1/reminder
|
48
|
+
// interval_time: 1,
|
49
|
+
// setup_time:1,
|
46
50
|
async componentWillLoad() {
|
47
51
|
var _a, _b, _c, _d, _e;
|
48
52
|
try {
|
@@ -72,25 +76,35 @@ const VerdocsTemplateReminders$1 = /*@__PURE__*/ proxyCustomElement(class extend
|
|
72
76
|
(_c = this.close) === null || _c === void 0 ? void 0 : _c.emit();
|
73
77
|
}
|
74
78
|
async handleSave(e) {
|
75
|
-
var _a, _b, _c, _d, _e;
|
79
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
76
80
|
e.stopPropagation();
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
81
|
+
try {
|
82
|
+
if (this.sendReminders) {
|
83
|
+
const params = {
|
84
|
+
setup_time: +this.firstReminderDays,
|
85
|
+
interval_time: +this.reminderDays,
|
86
|
+
};
|
87
|
+
if (!((_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.reminder_id)) {
|
88
|
+
await createReminder(this.endpoint, this.templateId, params);
|
89
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
90
|
+
}
|
91
|
+
else {
|
92
|
+
await updateReminder(this.endpoint, this.templateId, (_c = this.store) === null || _c === void 0 ? void 0 : _c.state.reminder_id, params);
|
93
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
94
|
+
}
|
84
95
|
}
|
85
96
|
else {
|
86
|
-
await
|
97
|
+
await deleteReminder(this.endpoint, this.templateId, (_d = this.store) === null || _d === void 0 ? void 0 : _d.state.reminder_id);
|
98
|
+
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
87
99
|
}
|
88
100
|
}
|
89
|
-
|
90
|
-
|
101
|
+
catch (e) {
|
102
|
+
console.log('[TEMPLATE REMINDERS] Unable to update reminders', e);
|
103
|
+
VerdocsToast(e.message);
|
104
|
+
(_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));
|
91
105
|
}
|
92
106
|
this.dirty = false;
|
93
|
-
(
|
107
|
+
(_h = this.close) === null || _h === void 0 ? void 0 : _h.emit();
|
94
108
|
}
|
95
109
|
render() {
|
96
110
|
var _a, _b;
|
@@ -102,11 +116,17 @@ const VerdocsTemplateReminders$1 = /*@__PURE__*/ proxyCustomElement(class extend
|
|
102
116
|
return h(Host, { class: "empty" });
|
103
117
|
}
|
104
118
|
return (h(Host, null, h("form", { onSubmit: e => e.preventDefault(), onClick: e => e.stopPropagation(), autocomplete: "off" }, h("h5", null, "Reminders"), h("div", { class: "input-row" }, h("label", { htmlFor: "verdocs-send-reminders" }, "Send Automatic Reminders"), h("verdocs-checkbox", { id: "verdocs-send-reminders", name: "automatic-reminders", checked: this.sendReminders, value: "on", onInput: (e) => {
|
105
|
-
this.showPlanBlocker = true;
|
106
|
-
e.target.checked = false;
|
107
|
-
|
108
|
-
|
109
|
-
} })), h("div", { class: "input-row" }, h("label", { htmlFor: "verdocs-first-reminder-days" }, "Days Before First Reminder"), h("verdocs-text-input", { id: "verdocs-first-reminder-days", type: "number", value: this.firstReminderDays, onInput: (e) =>
|
119
|
+
// this.showPlanBlocker = true;
|
120
|
+
// e.target.checked = false;
|
121
|
+
this.sendReminders = e.target.checked;
|
122
|
+
this.dirty = true;
|
123
|
+
} })), h("div", { class: "input-row" }, h("label", { htmlFor: "verdocs-first-reminder-days" }, "Days Before First Reminder"), h("verdocs-text-input", { id: "verdocs-first-reminder-days", type: "number", value: this.firstReminderDays, onInput: (e) => {
|
124
|
+
this.firstReminderDays = e.target.value;
|
125
|
+
this.dirty = true;
|
126
|
+
}, disabled: !this.sendReminders })), h("div", { class: "input-row" }, h("label", { htmlFor: "verdocs-days-between-reminders" }, "Days Between Reminders"), h("verdocs-text-input", { id: "verdocs-days-between-reminders", type: "number", value: this.reminderDays, onInput: (e) => {
|
127
|
+
this.reminderDays = e.target.value;
|
128
|
+
this.dirty = true;
|
129
|
+
}, disabled: !this.sendReminders })), h("div", { class: "buttons" }, h("verdocs-button", { size: "small", variant: "outline", label: "Cancel", disabled: !this.dirty, onClick: e => this.handleCancel(e) }), h("verdocs-button", { size: "small", label: "Save", disabled: !this.dirty, onClick: e => this.handleSave(e) }))), this.showPlanBlocker && (h("verdocs-ok-dialog", { heading: "Upgrade to access this feature", message: "Please upgrade your plan to access this feature.", onNext: () => (this.showPlanBlocker = false) }))));
|
110
130
|
}
|
111
131
|
static get style() { return verdocsTemplateRemindersCss; }
|
112
132
|
}, [0, "verdocs-template-reminders", {
|