@verdocs/web-sdk 1.16.3 → 1.16.5
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/{utils-1bbf48c2.js → utils-ce815868.js} +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +24 -3
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +15 -15
- package/dist/cjs/verdocs-checkbox_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +4 -3
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.js +1 -1
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +9 -0
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +26 -3
- package/dist/collection/components/fields/verdocs-field-textbox/verdocs-field-textbox.js +1 -1
- package/dist/collection/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.js +21 -17
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +3 -2
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +1 -1
- package/dist/collection/utils/utils.js +2 -2
- package/dist/components/utils.js +2 -2
- package/dist/components/verdocs-auth.js +37 -8
- package/dist/components/verdocs-field-textbox.js +1 -1
- package/dist/components/verdocs-help-icon2.js +1 -1
- package/dist/components/verdocs-template-field-properties2.js +15 -15
- package/dist/components/verdocs-template-fields2.js +3 -2
- package/dist/docs.json +16 -4
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-ae5a050a.js → utils-51c8f6c7.js} +2 -2
- package/dist/esm/verdocs-auth.entry.js +24 -3
- package/dist/esm/verdocs-button-panel_3.entry.js +15 -15
- package/dist/esm/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm/verdocs-field-date.entry.js +1 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +1 -1
- package/dist/esm/verdocs-field-payment.entry.js +1 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm/verdocs-field-signature.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +2 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm/verdocs-preview.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +4 -3
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-ae5a050a.js → utils-51c8f6c7.js} +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.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-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.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 +3 -0
- package/dist/types/components/templates/verdocs-template-field-properties/verdocs-template-field-properties.d.ts +3 -2
- package/dist/types/components.d.ts +1 -1
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/verdocs-web-sdk/{p-44d1c4bb.entry.js → p-004e9c9b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2b0f47c3.system.entry.js → p-0bc0e0e1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-01923f32.entry.js → p-0dec6856.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-130f3a72.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-f7ef018a.entry.js → p-13bd5018.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b503f72.entry.js → p-285f36b1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-beb29c88.system.entry.js → p-2985bb3e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1c1f677c.system.entry.js → p-2a1f413b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-86c866f9.system.entry.js → p-315f2a24.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3422705a.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-29c0a0ac.entry.js → p-3561afed.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a9ecf297.entry.js → p-4ab54e29.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d3d0bc3d.entry.js → p-4cc14862.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-698c0f03.system.entry.js → p-4ed347fe.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d1236f08.entry.js → p-50b62a6f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5de9866d.entry.js → p-5e9a6ecb.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f30de95e.system.js → p-62aaeefd.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-357e8437.system.entry.js → p-6d442326.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6d6b57c4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-1cff4451.system.entry.js → p-7589ac5e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-51bb5f0f.entry.js → p-79ddf1a7.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c460e8c3.system.entry.js → p-7b173813.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7f8a8798.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-6a0cceab.entry.js → p-80149a45.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a58de63f.system.entry.js → p-86652c3f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-467e2c5d.entry.js → p-86945f63.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-bc3f9d16.system.entry.js → p-88bb464c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e4f9b152.system.entry.js → p-8b77a5dc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1e5810c6.system.entry.js → p-8c8e0f2b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9764c57e.system.entry.js → p-8dc8dec2.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5215744e.entry.js → p-8ff6e046.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-433ce546.system.entry.js → p-92a36e56.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-46113362.entry.js → p-98bd4b4f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3413b5df.system.entry.js → p-a3698582.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c16dd5ef.entry.js → p-abc0b7a8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6ab0539d.js → p-ae4c9e4a.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4c49ad8a.entry.js → p-b0ec1235.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1f0f8952.system.entry.js → p-b78a0d6a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-9e7ab094.system.entry.js → p-c1c252b5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-96375cc8.system.entry.js → p-c9d2766b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-39d7ac16.system.entry.js → p-ce0362cd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-43bd6bca.system.entry.js → p-ceba2698.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d6cef406.entry.js → p-d0910a5d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-884d4302.entry.js → p-d8b85f5f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-21b46e22.system.entry.js → p-e37a7869.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1a95da40.entry.js → p-e591fe98.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1328971a.entry.js → p-e95a5155.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-fcf2a8ed.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/custom-elements.json +0 -1890
- package/dist/verdocs-web-sdk/p-1a859044.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2c657b17.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-82430214.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c3fc7975.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e202ce0e.system.entry.js +0 -1
@@ -31,7 +31,7 @@ export class VerdocsHelpIcon {
|
|
31
31
|
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
32
32
|
}
|
33
33
|
render() {
|
34
|
-
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: helpIcon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.icon = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": "bottom", ref: el => (this.tooltip = el) }, this.text, h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
34
|
+
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: helpIcon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.icon = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": "bottom", ref: el => (this.tooltip = el) }, h("span", { innerHTML: this.text }), h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
35
35
|
}
|
36
36
|
static get is() { return "verdocs-help-icon"; }
|
37
37
|
static get originalStyleUrls() {
|
@@ -35,6 +35,9 @@ verdocs-auth h4 {
|
|
35
35
|
line-height: 1.43;
|
36
36
|
margin: 0;
|
37
37
|
}
|
38
|
+
verdocs-auth h4 verdocs-button button.normal .button-label {
|
39
|
+
padding: 0;
|
40
|
+
}
|
38
41
|
verdocs-auth .status-result {
|
39
42
|
display: none;
|
40
43
|
}
|
@@ -52,4 +55,10 @@ verdocs-auth form {
|
|
52
55
|
}
|
53
56
|
verdocs-auth verdocs-text-input {
|
54
57
|
margin-bottom: 10px;
|
58
|
+
}
|
59
|
+
verdocs-auth .account-option {
|
60
|
+
gap: 8px;
|
61
|
+
margin: 20px 0 8px 0;
|
62
|
+
display: flex;
|
63
|
+
flex-direction: row;
|
55
64
|
}
|
@@ -46,6 +46,8 @@ export class VerdocsAuth {
|
|
46
46
|
this.password = '';
|
47
47
|
this.loggingIn = false;
|
48
48
|
this.activeSession = null;
|
49
|
+
this.accountType = 'org';
|
50
|
+
this.step = 1;
|
49
51
|
}
|
50
52
|
componentWillLoad() {
|
51
53
|
var _a, _b;
|
@@ -109,6 +111,10 @@ export class VerdocsAuth {
|
|
109
111
|
this.isAuthenticated = false;
|
110
112
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
111
113
|
}
|
114
|
+
checkAvailability() {
|
115
|
+
// Stage: POST - https://2r8pilqa44.execute-api.us-east-1.amazonaws.com/organizations/check-availability
|
116
|
+
// Prod: POST - https://lb1is9fxoc.execute-api.us-east-1.amazonaws.com/organizations/check-availability
|
117
|
+
}
|
112
118
|
render() {
|
113
119
|
if (!this.visible) {
|
114
120
|
return h("div", { style: { display: 'none' } }, "Authenticated");
|
@@ -117,9 +123,24 @@ export class VerdocsAuth {
|
|
117
123
|
return (h("verdocs-button", { label: "Sign Out", disabled: this.loggingIn, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
|
118
124
|
}
|
119
125
|
if (this.displayMode === 'signup') {
|
120
|
-
return (h("div", { class: "signup-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Sign up for
|
126
|
+
return (h("div", { class: "signup-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Sign up for a free account"), h("h4", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.loggingIn })), this.step === 1 && (h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", value: this.first, onInput: (e) => (this.first = e.target.value), disabled: this.loggingIn }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", value: this.last, onInput: (e) => (this.last = e.target.value), disabled: this.loggingIn })), h("verdocs-text-input", { label: "Email", autocomplete: "email", 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("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: this.loggingIn, onClick: () => {
|
127
|
+
this.step = 2;
|
128
|
+
}, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.step === 2 && (h("form", { onSubmit: () => this.handleSignup() }, h("p", null, "Please check your e-mail inbox for a verification code and follow the instructions provided."), h("p", null, "NOTE: Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ", h("a", { href: "#" }, "Click Here"), " to resend it. Be sure to check your spam folder."), h("div", { style: { display: 'flex', flexDirection: 'row', gap: '20px' } }, h("verdocs-button", { label: "Back", disabled: this.loggingIn, onClick: () => {
|
129
|
+
this.step = 1;
|
130
|
+
}, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }), h("verdocs-button", { label: "Go to Dashboard", disabled: true, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } })))), this.step === 3 && (h("form", { onSubmit: () => this.handleSignup() }, h("div", { class: "account-option" }, h("verdocs-radio-button", { id: "create-for-org", name: "account-type", value: "org", checked: this.accountType === 'org', onInput: e => {
|
131
|
+
console.log('o', e.target);
|
132
|
+
this.accountType = 'org';
|
133
|
+
} }), h("label", { htmlFor: "verdocs-radio-button-account-type-org" }, "Create an Organization"), h("verdocs-help-icon", { text: "Creating an organization allows you to organize shared resources such as templates, and add additional users who may access them.<br /><br />Organization names must be unique." })), h("div", null, this.accountType === 'org' && (h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", value: this.orgname, onInput: (e) => (this.orgname = e.target.value), disabled: this.loggingIn }))), h("div", { class: "account-option" }, h("verdocs-radio-button", { id: "create-for-personal", name: "account-type", value: "personal", checked: this.accountType === 'personal', onInput: e => {
|
134
|
+
console.log('p', e.target);
|
135
|
+
this.accountType = 'personal';
|
136
|
+
} }), h("label", { htmlFor: "verdocs-radio-button-account-type-personal" }, "Create a Personal Account"), h("verdocs-help-icon", { text: "Personal accounts are free, but are limited in functionality." })), h("div", { style: { marginTop: '30px' } }), h("div", { style: { display: 'flex', flexDirection: 'row', gap: '20px' } }, h("verdocs-button", { label: "Back", disabled: this.loggingIn, onClick: () => {
|
137
|
+
this.step = 1;
|
138
|
+
}, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }), h("verdocs-button", { label: "Create Account", disabled: this.loggingIn, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))))));
|
121
139
|
}
|
122
|
-
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: () =>
|
140
|
+
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: () => {
|
141
|
+
this.displayMode = 'signup';
|
142
|
+
this.step = 1;
|
143
|
+
}, 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' } }))));
|
123
144
|
}
|
124
145
|
static get is() { return "verdocs-auth"; }
|
125
146
|
static get originalStyleUrls() {
|
@@ -203,7 +224,9 @@ export class VerdocsAuth {
|
|
203
224
|
"username": {},
|
204
225
|
"password": {},
|
205
226
|
"loggingIn": {},
|
206
|
-
"activeSession": {}
|
227
|
+
"activeSession": {},
|
228
|
+
"accountType": {},
|
229
|
+
"step": {}
|
207
230
|
};
|
208
231
|
}
|
209
232
|
static get events() {
|
@@ -90,7 +90,7 @@ export class VerdocsFieldTextbox {
|
|
90
90
|
const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);
|
91
91
|
const value = (settings === null || settings === void 0 ? void 0 : settings.result) || '';
|
92
92
|
const width = settings.width || 150;
|
93
|
-
// TODO: This is an
|
93
|
+
// TODO: This is an outdated technique from the old system. We should compute it.
|
94
94
|
const maxlength = width / 5;
|
95
95
|
if (this.done) {
|
96
96
|
return h(Host, { class: { done: this.done } }, value);
|
@@ -113,13 +113,12 @@ export class VerdocsTemplateFieldProperties {
|
|
113
113
|
options: this.options,
|
114
114
|
};
|
115
115
|
}
|
116
|
-
console.log('will', newProperties);
|
117
116
|
updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
|
118
|
-
.then(
|
117
|
+
.then(field => {
|
119
118
|
var _a, _b;
|
120
119
|
this.dirty = false;
|
121
|
-
this.updateField();
|
122
|
-
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties });
|
120
|
+
this.updateField(field);
|
121
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties, field });
|
123
122
|
(_b = this.close) === null || _b === void 0 ? void 0 : _b.emit();
|
124
123
|
})
|
125
124
|
.catch(() => {
|
@@ -153,29 +152,30 @@ export class VerdocsTemplateFieldProperties {
|
|
153
152
|
delete newProperties.setting.result;
|
154
153
|
newProperties.setting.options = [...this.options];
|
155
154
|
updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
|
156
|
-
.then(
|
155
|
+
.then(field => {
|
157
156
|
var _a, _b;
|
158
157
|
this.dirty = false;
|
159
|
-
this.updateField();
|
160
|
-
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties });
|
158
|
+
this.updateField(field);
|
159
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties, field });
|
161
160
|
(_b = this.close) === null || _b === void 0 ? void 0 : _b.emit();
|
162
161
|
})
|
163
162
|
.catch(() => {
|
164
163
|
console.log('Field update failed', e);
|
165
164
|
});
|
166
165
|
}
|
167
|
-
updateField() {
|
166
|
+
updateField(newField) {
|
168
167
|
const newFields = [...this.store.state.fields];
|
169
168
|
newFields.forEach(field => {
|
170
169
|
if (field.name === this.fieldName) {
|
171
|
-
field
|
172
|
-
field.
|
173
|
-
field.
|
174
|
-
field.
|
170
|
+
Object.assign(field, newField);
|
171
|
+
// field.name = this.name;
|
172
|
+
// field.role_name = this.roleName;
|
173
|
+
// field.required = this.required;
|
174
|
+
// field.label = this.placeholder;
|
175
175
|
// field.setting.result = this.defaultValue;
|
176
|
-
if (field.setting.options) {
|
177
|
-
|
178
|
-
}
|
176
|
+
// if (field.setting.options) {
|
177
|
+
// field.setting.options = this.options;
|
178
|
+
// }
|
179
179
|
}
|
180
180
|
});
|
181
181
|
this.store.state.fields = newFields;
|
@@ -403,12 +403,16 @@ export class VerdocsTemplateFieldProperties {
|
|
403
403
|
"text": "Event fired when the field's settings are changed."
|
404
404
|
},
|
405
405
|
"complexType": {
|
406
|
-
"original": "{fieldName: string; settings: ITemplateFieldSetting}",
|
407
|
-
"resolved": "{ fieldName: string; settings: ITemplateFieldSetting; }",
|
406
|
+
"original": "{fieldName: string; settings: ITemplateFieldSetting; field: ITemplateField}",
|
407
|
+
"resolved": "{ fieldName: string; settings: ITemplateFieldSetting; field: ITemplateField; }",
|
408
408
|
"references": {
|
409
409
|
"ITemplateFieldSetting": {
|
410
410
|
"location": "import",
|
411
411
|
"path": "@verdocs/js-sdk/Templates/Types"
|
412
|
+
},
|
413
|
+
"ITemplateField": {
|
414
|
+
"location": "import",
|
415
|
+
"path": "@verdocs/js-sdk/Templates/Types"
|
412
416
|
}
|
413
417
|
}
|
414
418
|
}
|
package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js
CHANGED
@@ -104,8 +104,9 @@ export class VerdocsTemplateFields {
|
|
104
104
|
el.addEventListener('settingsChanged', e => {
|
105
105
|
var _a, _b, _c, _d;
|
106
106
|
console.log('[FIELDS] settingsChanged', e.detail);
|
107
|
-
Object.assign(field
|
107
|
+
Object.assign(field, e.detail.field);
|
108
108
|
this.selectedRoleName = field.role_name;
|
109
|
+
el.field = e.detail.field;
|
109
110
|
el.setAttribute('roleindex', getRoleIndex(getRoleNames(this.store), field.role_name));
|
110
111
|
el.field = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.fields.find(f => f.name === field.name);
|
111
112
|
this.rerender++;
|
@@ -120,7 +121,7 @@ export class VerdocsTemplateFields {
|
|
120
121
|
});
|
121
122
|
el.addEventListener('deleted', () => {
|
122
123
|
var _a, _b;
|
123
|
-
console.log('
|
124
|
+
console.log('[FIELDS] Deleted', this, field);
|
124
125
|
el.remove();
|
125
126
|
this.rerender++;
|
126
127
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.store) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
package/dist/components/utils.js
CHANGED
@@ -3,8 +3,9 @@ import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
|
3
3
|
import './Types.js';
|
4
4
|
import { V as VerdocsToast } from './Toast.js';
|
5
5
|
import { S as SDKError } from './errors.js';
|
6
|
-
import { d as defineCustomElement$
|
7
|
-
import { d as defineCustomElement$
|
6
|
+
import { d as defineCustomElement$5 } from './verdocs-button2.js';
|
7
|
+
import { d as defineCustomElement$4 } from './verdocs-help-icon2.js';
|
8
|
+
import { d as defineCustomElement$3 } from './verdocs-radio-button2.js';
|
8
9
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
9
10
|
|
10
11
|
/**
|
@@ -24,7 +25,7 @@ var authenticateUser = function (endpoint, params) {
|
|
24
25
|
.then(function (r) { return r.data; });
|
25
26
|
};
|
26
27
|
|
27
|
-
const verdocsAuthCss = "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}";
|
28
|
+
const verdocsAuthCss = "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 h4 verdocs-button button.normal .button-label{padding: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}verdocs-auth .account-option{gap:8px;margin:20px 0 8px 0;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}";
|
28
29
|
|
29
30
|
const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
30
31
|
constructor() {
|
@@ -44,6 +45,8 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
44
45
|
this.password = '';
|
45
46
|
this.loggingIn = false;
|
46
47
|
this.activeSession = null;
|
48
|
+
this.accountType = 'org';
|
49
|
+
this.step = 1;
|
47
50
|
}
|
48
51
|
componentWillLoad() {
|
49
52
|
var _a, _b;
|
@@ -107,6 +110,10 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
107
110
|
this.isAuthenticated = false;
|
108
111
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
109
112
|
}
|
113
|
+
checkAvailability() {
|
114
|
+
// Stage: POST - https://2r8pilqa44.execute-api.us-east-1.amazonaws.com/organizations/check-availability
|
115
|
+
// Prod: POST - https://lb1is9fxoc.execute-api.us-east-1.amazonaws.com/organizations/check-availability
|
116
|
+
}
|
110
117
|
render() {
|
111
118
|
if (!this.visible) {
|
112
119
|
return h("div", { style: { display: 'none' } }, "Authenticated");
|
@@ -115,9 +122,24 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
115
122
|
return (h("verdocs-button", { label: "Sign Out", disabled: this.loggingIn, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
|
116
123
|
}
|
117
124
|
if (this.displayMode === 'signup') {
|
118
|
-
return (h("div", { class: "signup-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Sign up for
|
125
|
+
return (h("div", { class: "signup-form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Sign up for a free account"), h("h4", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.loggingIn })), this.step === 1 && (h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", value: this.first, onInput: (e) => (this.first = e.target.value), disabled: this.loggingIn }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", value: this.last, onInput: (e) => (this.last = e.target.value), disabled: this.loggingIn })), h("verdocs-text-input", { label: "Email", autocomplete: "email", 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("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: this.loggingIn, onClick: () => {
|
126
|
+
this.step = 2;
|
127
|
+
}, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.step === 2 && (h("form", { onSubmit: () => this.handleSignup() }, h("p", null, "Please check your e-mail inbox for a verification code and follow the instructions provided."), h("p", null, "NOTE: Verification messages may take up to 1 hour to arrive. If you do not receive the invitation, ", h("a", { href: "#" }, "Click Here"), " to resend it. Be sure to check your spam folder."), h("div", { style: { display: 'flex', flexDirection: 'row', gap: '20px' } }, h("verdocs-button", { label: "Back", disabled: this.loggingIn, onClick: () => {
|
128
|
+
this.step = 1;
|
129
|
+
}, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }), h("verdocs-button", { label: "Go to Dashboard", disabled: true, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } })))), this.step === 3 && (h("form", { onSubmit: () => this.handleSignup() }, h("div", { class: "account-option" }, h("verdocs-radio-button", { id: "create-for-org", name: "account-type", value: "org", checked: this.accountType === 'org', onInput: e => {
|
130
|
+
console.log('o', e.target);
|
131
|
+
this.accountType = 'org';
|
132
|
+
} }), h("label", { htmlFor: "verdocs-radio-button-account-type-org" }, "Create an Organization"), h("verdocs-help-icon", { text: "Creating an organization allows you to organize shared resources such as templates, and add additional users who may access them.<br /><br />Organization names must be unique." })), h("div", null, this.accountType === 'org' && (h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", value: this.orgname, onInput: (e) => (this.orgname = e.target.value), disabled: this.loggingIn }))), h("div", { class: "account-option" }, h("verdocs-radio-button", { id: "create-for-personal", name: "account-type", value: "personal", checked: this.accountType === 'personal', onInput: e => {
|
133
|
+
console.log('p', e.target);
|
134
|
+
this.accountType = 'personal';
|
135
|
+
} }), h("label", { htmlFor: "verdocs-radio-button-account-type-personal" }, "Create a Personal Account"), h("verdocs-help-icon", { text: "Personal accounts are free, but are limited in functionality." })), h("div", { style: { marginTop: '30px' } }), h("div", { style: { display: 'flex', flexDirection: 'row', gap: '20px' } }, h("verdocs-button", { label: "Back", disabled: this.loggingIn, onClick: () => {
|
136
|
+
this.step = 1;
|
137
|
+
}, style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }), h("verdocs-button", { label: "Create Account", disabled: this.loggingIn, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))))));
|
119
138
|
}
|
120
|
-
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: () =>
|
139
|
+
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: () => {
|
140
|
+
this.displayMode = 'signup';
|
141
|
+
this.step = 1;
|
142
|
+
}, 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' } }))));
|
121
143
|
}
|
122
144
|
static get style() { return verdocsAuthCss; }
|
123
145
|
}, [0, "verdocs-auth", {
|
@@ -132,13 +154,15 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
132
154
|
"username": [32],
|
133
155
|
"password": [32],
|
134
156
|
"loggingIn": [32],
|
135
|
-
"activeSession": [32]
|
157
|
+
"activeSession": [32],
|
158
|
+
"accountType": [32],
|
159
|
+
"step": [32]
|
136
160
|
}]);
|
137
161
|
function defineCustomElement$1() {
|
138
162
|
if (typeof customElements === "undefined") {
|
139
163
|
return;
|
140
164
|
}
|
141
|
-
const components = ["verdocs-auth", "verdocs-button", "verdocs-help-icon", "verdocs-text-input"];
|
165
|
+
const components = ["verdocs-auth", "verdocs-button", "verdocs-help-icon", "verdocs-radio-button", "verdocs-text-input"];
|
142
166
|
components.forEach(tagName => { switch (tagName) {
|
143
167
|
case "verdocs-auth":
|
144
168
|
if (!customElements.get(tagName)) {
|
@@ -147,10 +171,15 @@ function defineCustomElement$1() {
|
|
147
171
|
break;
|
148
172
|
case "verdocs-button":
|
149
173
|
if (!customElements.get(tagName)) {
|
150
|
-
defineCustomElement$
|
174
|
+
defineCustomElement$5();
|
151
175
|
}
|
152
176
|
break;
|
153
177
|
case "verdocs-help-icon":
|
178
|
+
if (!customElements.get(tagName)) {
|
179
|
+
defineCustomElement$4();
|
180
|
+
}
|
181
|
+
break;
|
182
|
+
case "verdocs-radio-button":
|
154
183
|
if (!customElements.get(tagName)) {
|
155
184
|
defineCustomElement$3();
|
156
185
|
}
|
@@ -103,7 +103,7 @@ const VerdocsFieldTextbox$1 = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
103
103
|
const backgroundColor = this.field['rgba'] || getRGBA(this.roleindex);
|
104
104
|
const value = (settings === null || settings === void 0 ? void 0 : settings.result) || '';
|
105
105
|
const width = settings.width || 150;
|
106
|
-
// TODO: This is an
|
106
|
+
// TODO: This is an outdated technique from the old system. We should compute it.
|
107
107
|
const maxlength = width / 5;
|
108
108
|
if (this.done) {
|
109
109
|
return h(Host, { class: { done: this.done } }, value);
|
@@ -33,7 +33,7 @@ const VerdocsHelpIcon = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
33
33
|
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
34
34
|
}
|
35
35
|
render() {
|
36
|
-
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: helpIcon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.icon = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": "bottom", ref: el => (this.tooltip = el) }, this.text, h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
36
|
+
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: helpIcon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.icon = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": "bottom", ref: el => (this.tooltip = el) }, h("span", { innerHTML: this.text }), h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
37
37
|
}
|
38
38
|
static get style() { return verdocsHelpIconCss; }
|
39
39
|
}, [0, "verdocs-help-icon", {
|
@@ -315,13 +315,12 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class ex
|
|
315
315
|
options: this.options,
|
316
316
|
};
|
317
317
|
}
|
318
|
-
console.log('will', newProperties);
|
319
318
|
updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
|
320
|
-
.then(
|
319
|
+
.then(field => {
|
321
320
|
var _a, _b;
|
322
321
|
this.dirty = false;
|
323
|
-
this.updateField();
|
324
|
-
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties });
|
322
|
+
this.updateField(field);
|
323
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties, field });
|
325
324
|
(_b = this.close) === null || _b === void 0 ? void 0 : _b.emit();
|
326
325
|
})
|
327
326
|
.catch(() => {
|
@@ -355,29 +354,30 @@ const VerdocsTemplateFieldProperties = /*@__PURE__*/ proxyCustomElement(class ex
|
|
355
354
|
delete newProperties.setting.result;
|
356
355
|
newProperties.setting.options = [...this.options];
|
357
356
|
updateField(this.endpoint, this.templateId, this.fieldName, newProperties)
|
358
|
-
.then(
|
357
|
+
.then(field => {
|
359
358
|
var _a, _b;
|
360
359
|
this.dirty = false;
|
361
|
-
this.updateField();
|
362
|
-
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties });
|
360
|
+
this.updateField(field);
|
361
|
+
(_a = this.settingsChanged) === null || _a === void 0 ? void 0 : _a.emit({ fieldName: this.fieldName, settings: newProperties, field });
|
363
362
|
(_b = this.close) === null || _b === void 0 ? void 0 : _b.emit();
|
364
363
|
})
|
365
364
|
.catch(() => {
|
366
365
|
console.log('Field update failed', e);
|
367
366
|
});
|
368
367
|
}
|
369
|
-
updateField() {
|
368
|
+
updateField(newField) {
|
370
369
|
const newFields = [...this.store.state.fields];
|
371
370
|
newFields.forEach(field => {
|
372
371
|
if (field.name === this.fieldName) {
|
373
|
-
field
|
374
|
-
field.
|
375
|
-
field.
|
376
|
-
field.
|
372
|
+
Object.assign(field, newField);
|
373
|
+
// field.name = this.name;
|
374
|
+
// field.role_name = this.roleName;
|
375
|
+
// field.required = this.required;
|
376
|
+
// field.label = this.placeholder;
|
377
377
|
// field.setting.result = this.defaultValue;
|
378
|
-
if (field.setting.options) {
|
379
|
-
|
380
|
-
}
|
378
|
+
// if (field.setting.options) {
|
379
|
+
// field.setting.options = this.options;
|
380
|
+
// }
|
381
381
|
}
|
382
382
|
});
|
383
383
|
this.store.state.fields = newFields;
|
@@ -115,8 +115,9 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
115
115
|
el.addEventListener('settingsChanged', e => {
|
116
116
|
var _a, _b, _c, _d;
|
117
117
|
console.log('[FIELDS] settingsChanged', e.detail);
|
118
|
-
Object.assign(field
|
118
|
+
Object.assign(field, e.detail.field);
|
119
119
|
this.selectedRoleName = field.role_name;
|
120
|
+
el.field = e.detail.field;
|
120
121
|
el.setAttribute('roleindex', getRoleIndex(getRoleNames(this.store), field.role_name));
|
121
122
|
el.field = (_b = (_a = this.store) === null || _a === void 0 ? void 0 : _a.state) === null || _b === void 0 ? void 0 : _b.fields.find(f => f.name === field.name);
|
122
123
|
this.rerender++;
|
@@ -131,7 +132,7 @@ const VerdocsTemplateFields = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
131
132
|
});
|
132
133
|
el.addEventListener('deleted', () => {
|
133
134
|
var _a, _b;
|
134
|
-
console.log('
|
135
|
+
console.log('[FIELDS] Deleted', this, field);
|
135
136
|
el.remove();
|
136
137
|
this.rerender++;
|
137
138
|
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: (_b = this.store) === null || _b === void 0 ? void 0 : _b.state, event: 'updated-field' });
|
package/dist/docs.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"timestamp": "2023-07-
|
2
|
+
"timestamp": "2023-07-12T02:45:14",
|
3
3
|
"compiler": {
|
4
4
|
"name": "@stencil/core",
|
5
5
|
"version": "2.20.0",
|
@@ -315,12 +315,16 @@
|
|
315
315
|
"dependents": [],
|
316
316
|
"dependencies": [
|
317
317
|
"verdocs-button",
|
318
|
-
"verdocs-text-input"
|
318
|
+
"verdocs-text-input",
|
319
|
+
"verdocs-radio-button",
|
320
|
+
"verdocs-help-icon"
|
319
321
|
],
|
320
322
|
"dependencyGraph": {
|
321
323
|
"verdocs-auth": [
|
322
324
|
"verdocs-button",
|
323
|
-
"verdocs-text-input"
|
325
|
+
"verdocs-text-input",
|
326
|
+
"verdocs-radio-button",
|
327
|
+
"verdocs-help-icon"
|
324
328
|
],
|
325
329
|
"verdocs-text-input": [
|
326
330
|
"verdocs-help-icon"
|
@@ -4931,12 +4935,16 @@
|
|
4931
4935
|
"slots": [],
|
4932
4936
|
"parts": [],
|
4933
4937
|
"dependents": [
|
4938
|
+
"verdocs-auth",
|
4934
4939
|
"verdocs-template-role-properties",
|
4935
4940
|
"verdocs-template-sender",
|
4936
4941
|
"verdocs-text-input"
|
4937
4942
|
],
|
4938
4943
|
"dependencies": [],
|
4939
4944
|
"dependencyGraph": {
|
4945
|
+
"verdocs-auth": [
|
4946
|
+
"verdocs-help-icon"
|
4947
|
+
],
|
4940
4948
|
"verdocs-template-role-properties": [
|
4941
4949
|
"verdocs-help-icon"
|
4942
4950
|
],
|
@@ -5903,10 +5911,14 @@
|
|
5903
5911
|
"slots": [],
|
5904
5912
|
"parts": [],
|
5905
5913
|
"dependents": [
|
5914
|
+
"verdocs-auth",
|
5906
5915
|
"verdocs-template-sender"
|
5907
5916
|
],
|
5908
5917
|
"dependencies": [],
|
5909
5918
|
"dependencyGraph": {
|
5919
|
+
"verdocs-auth": [
|
5920
|
+
"verdocs-radio-button"
|
5921
|
+
],
|
5910
5922
|
"verdocs-template-sender": [
|
5911
5923
|
"verdocs-radio-button"
|
5912
5924
|
]
|
@@ -7353,7 +7365,7 @@
|
|
7353
7365
|
},
|
7354
7366
|
{
|
7355
7367
|
"event": "settingsChanged",
|
7356
|
-
"detail": "{ fieldName: string; settings: ITemplateFieldSetting; }",
|
7368
|
+
"detail": "{ fieldName: string; settings: ITemplateFieldSetting; field: ITemplateField; }",
|
7357
7369
|
"bubbles": true,
|
7358
7370
|
"cancelable": true,
|
7359
7371
|
"composed": true,
|