@verdocs/web-sdk 2.0.28 → 2.1.1
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 +194 -31
- package/dist/cjs/verdocs-floating-menu.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-pagination_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-floating-menu/verdocs-floating-menu.css +2 -2
- package/dist/collection/components/controls/verdocs-organization-card/verdocs-organization-card.css +1 -1
- package/dist/collection/components/controls/verdocs-pagination/verdocs-pagination.css +2 -2
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +10 -2
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +135 -32
- package/dist/collection/components/templates/verdocs-template-card/verdocs-template-card.css +1 -1
- package/dist/components/verdocs-auth.js +197 -33
- package/dist/components/verdocs-floating-menu.js +1 -1
- package/dist/components/verdocs-organization-card.js +1 -1
- package/dist/components/verdocs-pagination2.js +1 -1
- package/dist/components/verdocs-template-card.js +1 -1
- package/dist/custom-elements.json +1947 -0
- package/dist/docs.json +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +194 -31
- package/dist/esm/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm/verdocs-template-card.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/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-floating-menu.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-card.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 +12 -4
- package/dist/verdocs-web-sdk/p-450d6648.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-52a69b07.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-57e5b1b4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-63e6717e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/p-704515f0.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-dbfa7aea.entry.js → p-7f0208c6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-70a1cb8d.entry.js → p-91a46b70.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-9964cc5e.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-511d7177.entry.js → p-a99ffad6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-bacfc080.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +5 -5
- package/dist/verdocs-web-sdk/p-670a2414.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-68487ce7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-afd6285f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b4ac7a21.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c7c021fe.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cfdd1d5b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d7e29ce9.system.entry.js +0 -1
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
2
|
+
import { d as decodeAccessTokenBody } from './Types.js';
|
2
3
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
3
|
-
import './Types.js';
|
4
4
|
import { V as VerdocsToast } from './Toast.js';
|
5
5
|
import { S as SDKError } from './errors.js';
|
6
6
|
import { d as defineCustomElement$5 } from './verdocs-button2.js';
|
@@ -39,9 +39,72 @@ var authenticateUser = function (endpoint, params) {
|
|
39
39
|
.post('/authentication/login', params)
|
40
40
|
.then(function (r) { return r.data; });
|
41
41
|
};
|
42
|
+
/**
|
43
|
+
* Reset the caller's password.
|
44
|
+
*
|
45
|
+
* ```typescript
|
46
|
+
* import {Auth} from '@verdocs/js-sdk/Auth';
|
47
|
+
*
|
48
|
+
* const {success} = await Auth.resetPassword({ email });
|
49
|
+
* if (status !== 'OK') {
|
50
|
+
* window.alert(`Please check your email for instructions on how to reset your password.`);
|
51
|
+
* }
|
52
|
+
* ```
|
53
|
+
*/
|
54
|
+
var resetPassword = function (endpoint, params) {
|
55
|
+
return endpoint.api //
|
56
|
+
.post('/user/reset_password', params)
|
57
|
+
.then(function (r) { return r.data; });
|
58
|
+
};
|
59
|
+
/**
|
60
|
+
* Resend the email verification request. Note that to prevent certain forms of abuse, the email address is not
|
61
|
+
* a parameter here. Instead, the caller must be authenticated as the (unverified) user. To simplify this process,
|
62
|
+
* the access token to be used may be passed directly as a parameter here. This avoids the need to set it as the
|
63
|
+
* active token on an endpoint, which may be inconvenient in workflows where it is preferable to keep the user in
|
64
|
+
* "anonymous" mode while verification is being performed.
|
65
|
+
*
|
66
|
+
* ```typescript
|
67
|
+
* import {Auth} from '@verdocs/js-sdk/Auth';
|
68
|
+
*
|
69
|
+
* const result = await Auth.resendVerification();
|
70
|
+
* ```
|
71
|
+
*/
|
72
|
+
var resendVerification = function (endpoint, accessToken) {
|
73
|
+
return endpoint.api //
|
74
|
+
.post('/user/email_verification', {}, accessToken ? { headers: { Authorization: "Bearer ".concat(accessToken) } } : {})
|
75
|
+
.then(function (r) { return r.data; });
|
76
|
+
};
|
77
|
+
|
78
|
+
/**
|
79
|
+
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
80
|
+
*
|
81
|
+
* ```typescript
|
82
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
83
|
+
*
|
84
|
+
* const profiles = await Profiles.getProfiles()
|
85
|
+
* ```
|
86
|
+
*/
|
87
|
+
/**
|
88
|
+
* Create a user account and parent organization. This endpoint is for creating a new organization. Users joining an
|
89
|
+
* existing organization should be invited, and follow their invitation links/instructions to create their accounts.
|
90
|
+
*
|
91
|
+
* ```typescript
|
92
|
+
* import {Profiles} from '@verdocs/js-sdk/Users';
|
93
|
+
*
|
94
|
+
* const newAccount = await Profiles.createBusinessAccount({
|
95
|
+
* orgName: 'ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
96
|
+
* });
|
97
|
+
* ```
|
98
|
+
*/
|
99
|
+
var createBusinessAccount = function (endpoint, params) {
|
100
|
+
return endpoint.api //
|
101
|
+
.post('/user/business', params)
|
102
|
+
.then(function (r) { return r.data; });
|
103
|
+
};
|
42
104
|
|
43
|
-
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 .
|
105
|
+
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 .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 .buttons{gap:20px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}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}verdocs-auth p+p{margin-top:0}";
|
44
106
|
|
107
|
+
const RECHECK_INTERVAL = 5000;
|
45
108
|
const Industries = [
|
46
109
|
{ value: '', label: '' },
|
47
110
|
{ value: 'Accounting & Tax', label: 'Accounting & Tax' },
|
@@ -88,6 +151,9 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
88
151
|
this.__registerHost();
|
89
152
|
this.authenticated = createEvent(this, "authenticated", 7);
|
90
153
|
this.sdkError = createEvent(this, "sdkError", 7);
|
154
|
+
this.recheckTimer = null;
|
155
|
+
this.resendDisabledTimer = null;
|
156
|
+
this.accessTokenForVerification = null;
|
91
157
|
this.endpoint = VerdocsEndpoint.getDefault();
|
92
158
|
this.visible = true;
|
93
159
|
this.logo = 'https://app.verdocs.com/assets/blue-logo.svg';
|
@@ -100,14 +166,15 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
100
166
|
this.username = '';
|
101
167
|
this.phone = '';
|
102
168
|
this.password = '';
|
103
|
-
this.
|
169
|
+
this.submitting = false;
|
104
170
|
this.activeSession = null;
|
105
171
|
this.accountType = 'org';
|
106
172
|
this.howHear = '';
|
107
173
|
this.industry = '';
|
108
174
|
this.companySize = '';
|
109
175
|
this.reason = '';
|
110
|
-
this.
|
176
|
+
this.signupStep = 1;
|
177
|
+
this.resendDisabled = false;
|
111
178
|
}
|
112
179
|
componentWillLoad() {
|
113
180
|
var _a, _b;
|
@@ -123,42 +190,94 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
123
190
|
(_b = this.authenticated) === null || _b === void 0 ? void 0 : _b.emit({ authenticated: false, session: null });
|
124
191
|
}
|
125
192
|
}
|
193
|
+
disconnectedCallback() {
|
194
|
+
this.cancelRecheckTimer();
|
195
|
+
}
|
196
|
+
cancelRecheckTimer() {
|
197
|
+
if (this.recheckTimer) {
|
198
|
+
try {
|
199
|
+
clearTimeout(this.recheckTimer);
|
200
|
+
}
|
201
|
+
catch (e) {
|
202
|
+
// NOP
|
203
|
+
}
|
204
|
+
this.recheckTimer = null;
|
205
|
+
}
|
206
|
+
if (this.resendDisabledTimer) {
|
207
|
+
try {
|
208
|
+
clearTimeout(this.resendDisabledTimer);
|
209
|
+
}
|
210
|
+
catch (e) {
|
211
|
+
// NOP
|
212
|
+
}
|
213
|
+
this.resendDisabledTimer = null;
|
214
|
+
}
|
215
|
+
}
|
126
216
|
handleSignup() {
|
127
|
-
this.
|
128
|
-
|
217
|
+
this.submitting = true;
|
218
|
+
this.accessTokenForVerification = null;
|
219
|
+
createBusinessAccount(this.endpoint, {
|
220
|
+
email: this.username,
|
221
|
+
password: this.password,
|
222
|
+
firstName: this.first,
|
223
|
+
lastName: this.last,
|
224
|
+
orgName: this.orgname,
|
225
|
+
industry: this.industry,
|
226
|
+
size: this.companySize,
|
227
|
+
// source?: string;
|
228
|
+
// referral?: string;
|
229
|
+
// coupon?: string;
|
230
|
+
reason: this.reason,
|
231
|
+
hearabout: this.howHear,
|
232
|
+
})
|
129
233
|
.then(r => {
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
this.
|
134
|
-
this.isAuthenticated = true;
|
135
|
-
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: true, session: this.endpoint.session });
|
234
|
+
console.log('Result', r);
|
235
|
+
console.log('[AUTH] Created profile', r.profile);
|
236
|
+
console.log('[AUTH] Created organization', r.organization);
|
237
|
+
this.loginAndCheckVerification();
|
136
238
|
})
|
137
239
|
.catch(e => {
|
138
|
-
var _a, _b, _c, _d;
|
139
|
-
console.log('[AUTH]
|
140
|
-
this.
|
240
|
+
var _a, _b, _c, _d, _e;
|
241
|
+
console.log('[AUTH] Signup error', e.response, JSON.stringify(e));
|
242
|
+
this.submitting = false;
|
141
243
|
this.activeSession = null;
|
142
244
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
143
245
|
(_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));
|
144
|
-
VerdocsToast('
|
246
|
+
VerdocsToast('Signup failed: ' + ((_e = e.response) === null || _e === void 0 ? void 0 : _e.data), { style: 'error' });
|
145
247
|
});
|
146
248
|
}
|
147
|
-
|
148
|
-
this.
|
249
|
+
loginAndCheckVerification() {
|
250
|
+
this.submitting = true;
|
251
|
+
this.accessTokenForVerification = null;
|
149
252
|
authenticateUser(this.endpoint, { username: this.username, password: this.password })
|
150
253
|
.then(r => {
|
151
254
|
var _a;
|
152
|
-
this.
|
153
|
-
this.
|
154
|
-
|
155
|
-
|
156
|
-
(
|
255
|
+
this.cancelRecheckTimer();
|
256
|
+
this.submitting = false;
|
257
|
+
const body = decodeAccessTokenBody(r.accessToken);
|
258
|
+
console.log('[AUTH] Got access token body', body);
|
259
|
+
if (body === null || body === void 0 ? void 0 : body.email_verified) {
|
260
|
+
console.log('[AUTH] Email address is verified, completing login');
|
261
|
+
this.displayMode = 'login'; // After signing out, this will be the next mode
|
262
|
+
this.accessTokenForVerification = null;
|
263
|
+
this.endpoint.setToken(r.accessToken);
|
264
|
+
this.activeSession = this.endpoint.session;
|
265
|
+
this.isAuthenticated = true;
|
266
|
+
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: true, session: this.endpoint.session });
|
267
|
+
}
|
268
|
+
else {
|
269
|
+
console.log('[AUTH] Logged in, pending email address verification');
|
270
|
+
this.displayMode = 'verify';
|
271
|
+
this.accessTokenForVerification = r.accessToken;
|
272
|
+
this.recheckTimer = setTimeout(() => this.loginAndCheckVerification(), RECHECK_INTERVAL);
|
273
|
+
}
|
157
274
|
})
|
158
275
|
.catch(e => {
|
159
276
|
var _a, _b, _c, _d;
|
277
|
+
this.cancelRecheckTimer();
|
160
278
|
console.log('[AUTH] Authentication error', e.response, JSON.stringify(e));
|
161
|
-
this.
|
279
|
+
this.displayMode = 'login';
|
280
|
+
this.submitting = false;
|
162
281
|
this.activeSession = null;
|
163
282
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
164
283
|
(_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));
|
@@ -169,8 +288,40 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
169
288
|
var _a;
|
170
289
|
this.endpoint.clearSession();
|
171
290
|
this.isAuthenticated = false;
|
291
|
+
this.accessTokenForVerification = null;
|
172
292
|
(_a = this.authenticated) === null || _a === void 0 ? void 0 : _a.emit({ authenticated: false, session: null });
|
173
293
|
}
|
294
|
+
handleResend() {
|
295
|
+
// Avoid the user just click-spamming this pathway. The server rate-limits this anyway so it's not a
|
296
|
+
// security issue but it's a poor user experience to allow it.
|
297
|
+
this.resendDisabled = true;
|
298
|
+
this.resendDisabledTimer = setTimeout(() => {
|
299
|
+
this.resendDisabled = false;
|
300
|
+
this.resendDisabledTimer = null;
|
301
|
+
}, 30000);
|
302
|
+
resendVerification(this.endpoint, this.accessTokenForVerification)
|
303
|
+
.then(r => {
|
304
|
+
console.log('[AUTH] Verification request resent', r);
|
305
|
+
VerdocsToast('Please check your email for a message with verification instructions.', { style: 'info' });
|
306
|
+
})
|
307
|
+
.catch((e) => {
|
308
|
+
console.log('[AUTH] Unable to resend verification', e);
|
309
|
+
});
|
310
|
+
}
|
311
|
+
handleReset() {
|
312
|
+
this.submitting = true;
|
313
|
+
resetPassword(this.endpoint, { email: this.username })
|
314
|
+
.then(r => {
|
315
|
+
console.log('[AUTH] Reset sent', r);
|
316
|
+
this.submitting = false;
|
317
|
+
this.displayMode = 'login';
|
318
|
+
VerdocsToast('If your email address is registered, you will receive instructions on resetting your password shortly.', { style: 'info' });
|
319
|
+
})
|
320
|
+
.catch((e) => {
|
321
|
+
console.log('[AUTH] Unable to reset password', e);
|
322
|
+
this.submitting = false;
|
323
|
+
});
|
324
|
+
}
|
174
325
|
async checkAvailability(name) {
|
175
326
|
this.orgname = name;
|
176
327
|
this.orgAvailable = '';
|
@@ -184,18 +335,30 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
184
335
|
return h("div", { style: { display: 'none' } }, "Authenticated");
|
185
336
|
}
|
186
337
|
if (this.isAuthenticated) {
|
187
|
-
return (h("verdocs-button", { label: "Sign Out", disabled: this.
|
338
|
+
return (h("verdocs-button", { label: "Sign Out", disabled: this.submitting, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
|
188
339
|
}
|
189
340
|
if (this.displayMode === 'signup') {
|
190
|
-
const
|
191
|
-
|
192
|
-
|
341
|
+
const step1Invalid = this.submitting || !this.first || !this.last || !this.username || !this.password || !this.orgname || this.orgAvailable !== 'OK';
|
342
|
+
console.log({ step1Invalid }, this.orgAvailable);
|
343
|
+
return (h("div", { class: "form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Sign up for a trial account"), h("h4", null, "Already have an account?", h("verdocs-button", { label: "Log In", variant: "text", onClick: () => (this.displayMode = 'login'), disabled: this.submitting })), this.signupStep === 1 && (h("form", { onSubmit: () => this.handleSignup() }, h("div", { style: { display: 'flex', flexDirection: 'row', columnGap: '20px' } }, h("verdocs-text-input", { label: "First Name", autocomplete: "first", required: true, value: this.first, onInput: (e) => (this.first = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Last Name", autocomplete: "last", required: true, value: this.last, onInput: (e) => (this.last = e.target.value), disabled: this.submitting })), h("verdocs-text-input", { label: "Email", autocomplete: "email", required: true, value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Phone #", autocomplete: "phone", value: this.phone, onInput: (e) => (this.phone = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", required: true, autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", required: true, value: this.orgname, onInput: (e) => this.checkAvailability(e.target.value), disabled: this.submitting }), this.orgAvailable === 'TAKEN' && h("p", { style: { color: 'red' } }, "This organization name is already taken."), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Next", disabled: step1Invalid, onClick: () => (this.signupStep = 2), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.signupStep === 2 && (h("form", { onSubmit: () => this.handleSignup() }, h("verdocs-text-input", { label: "How did you hear about Verdocs?", value: this.howHear, onInput: (e) => (this.howHear = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Your Industry", options: Industries, value: this.industry, onInput: (e) => (this.industry = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Company Size", options: CompanySizes, value: this.companySize, onInput: (e) => (this.companySize = e.target.value), disabled: this.submitting }), h("verdocs-select-input", { label: "Purpose", options: Reasons, value: this.reason, onInput: (e) => (this.reason = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("verdocs-button", { label: "Create Account", disabled: this.submitting, onClick: () => this.handleSignup(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }))), this.signupStep === 3 && (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, h("em", null, "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.submitting, onClick: () => {
|
344
|
+
this.signupStep = 2;
|
193
345
|
}, 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' } }))))));
|
194
346
|
}
|
195
|
-
|
347
|
+
if (this.displayMode === 'forgot') {
|
348
|
+
return (h("div", { class: "form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Forgot your password?"), h("p", null, "Enter your e-mail address below, and reset instructions will be sent to your Inbox."), h("p", null, h("em", null, "Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")), h("form", { onSubmit: () => this.handleSignup() }, h("verdocs-text-input", { label: "Email", autocomplete: "email", required: true, value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.submitting }), h("div", { style: { marginTop: '30px' } }), h("div", { class: "buttons" }, h("verdocs-button", { label: "Cancel", variant: "outline", disabled: this.submitting, onClick: () => (this.displayMode = 'login') }), h("verdocs-button", { label: "Reset", disabled: this.submitting, onClick: () => this.handleReset() })))));
|
349
|
+
}
|
350
|
+
if (this.displayMode === 'verify') {
|
351
|
+
return (h("div", { class: "form" }, h("img", { src: this.logo, alt: "Verdocs Logo", class: "logo" }), h("h3", null, "Please Verify your Email Address"), h("p", null, "Check your e-mail inbox for a verification email, and follow the instructions provided."), h("p", null, h("em", null, "Please allow up to 24 hours for delivery, and check your spam folder if you do not receive the message. ")), h("div", { class: "buttons" }, h("verdocs-button", { label: "Sign Out", variant: "outline", disabled: this.submitting, onClick: () => {
|
352
|
+
this.username = '';
|
353
|
+
this.password = '';
|
354
|
+
this.cancelRecheckTimer();
|
355
|
+
this.displayMode = 'login';
|
356
|
+
} }), h("verdocs-button", { label: "Resend Email", disabled: this.resendDisabled, onClick: () => this.handleResend() }))));
|
357
|
+
}
|
358
|
+
return (h("div", { class: "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: () => {
|
196
359
|
this.displayMode = 'signup';
|
197
|
-
this.
|
198
|
-
}, disabled: this.
|
360
|
+
this.signupStep = 1;
|
361
|
+
}, disabled: this.submitting })), h("form", { onSubmit: () => this.loginAndCheckVerification() }, h("verdocs-text-input", { label: "Email", autocomplete: "username", value: this.username, onInput: (e) => (this.username = e.target.value), disabled: this.submitting }), h("verdocs-text-input", { label: "Password", type: "password", autocomplete: "current-password", value: this.password, onInput: (e) => (this.password = e.target.value), disabled: this.submitting }), h("verdocs-button", { label: "Forgot Your Password?", variant: "text", onClick: () => (this.displayMode = 'forgot'), disabled: this.submitting, style: { display: 'flex', justifyContent: 'center', margin: '10px auto 20px' } }), h("verdocs-button", { label: "Login", disabled: this.submitting, onClick: () => this.loginAndCheckVerification(), style: { display: 'flex', justifyContent: 'center', margin: '10px auto 0' } }))));
|
199
362
|
}
|
200
363
|
static get style() { return verdocsAuthCss; }
|
201
364
|
}, [0, "verdocs-auth", {
|
@@ -211,14 +374,15 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
211
374
|
"username": [32],
|
212
375
|
"phone": [32],
|
213
376
|
"password": [32],
|
214
|
-
"
|
377
|
+
"submitting": [32],
|
215
378
|
"activeSession": [32],
|
216
379
|
"accountType": [32],
|
217
380
|
"howHear": [32],
|
218
381
|
"industry": [32],
|
219
382
|
"companySize": [32],
|
220
383
|
"reason": [32],
|
221
|
-
"
|
384
|
+
"signupStep": [32],
|
385
|
+
"resendDisabled": [32]
|
222
386
|
}]);
|
223
387
|
function defineCustomElement$1() {
|
224
388
|
if (typeof customElements === "undefined") {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { d as defineCustomElement$2 } from './verdocs-toolbar-icon2.js';
|
3
3
|
|
4
|
-
const verdocsFloatingMenuCss = "verdocs-floating-menu{display:none}#verdocs-floating-menu{position:absolute;width:56px;height:56px;display:-ms-flexbox;display:flex;-ms-flex:0 0 fit-content;flex:0 0 fit-content}#verdocs-floating-menu:not(.force-closed):hover{height:500px}#verdocs-floating-menu:not(.force-closed):hover .trigger{-webkit-box-shadow:0 10px 25px #4c56cb;box-shadow:0 10px 25px #4c56cb;-webkit-transform:translatey(2px);transform:translatey(2px);-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu:not(.force-closed):hover .options{display:-ms-flexbox;display:flex}#verdocs-floating-menu:not(.force-closed):hover .options .option{-webkit-animation:vfm-appear 0.1s forwards 0.2s;animation:vfm-appear 0.1s forwards 0.2s}#verdocs-floating-menu .trigger{position:absolute;width:56px;height:56px;background:#
|
4
|
+
const verdocsFloatingMenuCss = "verdocs-floating-menu{display:none}#verdocs-floating-menu{position:absolute;width:56px;height:56px;display:-ms-flexbox;display:flex;-ms-flex:0 0 fit-content;flex:0 0 fit-content}#verdocs-floating-menu:not(.force-closed):hover{height:500px}#verdocs-floating-menu:not(.force-closed):hover .trigger{-webkit-box-shadow:0 10px 25px #4c56cb;box-shadow:0 10px 25px #4c56cb;-webkit-transform:translatey(2px);transform:translatey(2px);-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu:not(.force-closed):hover .options{display:-ms-flexbox;display:flex}#verdocs-floating-menu:not(.force-closed):hover .options .option{-webkit-animation:vfm-appear 0.1s forwards 0.2s;animation:vfm-appear 0.1s forwards 0.2s}#verdocs-floating-menu .trigger{position:absolute;width:56px;height:56px;background:#s;bottom:0;border-radius:50%;left:0;right:0;margin:auto;color:white;line-height:52px;text-align:center;font-size:44px;z-index:100;-webkit-box-shadow:0 10px 25px -5px #4c56cb;box-shadow:0 10px 25px -5px #4c56cb;cursor:pointer;-webkit-transition:all 0.3s;transition:all 0.3s}#verdocs-floating-menu .options{width:56px;-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 fit-content;flex:0 0 fit-content;position:absolute;bottom:70px;display:none}#verdocs-floating-menu .option{background:#s;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:50%;width:36px;height:36px;margin:5px auto;color:white;font-weight:500;text-align:center;line-height:36px;opacity:0}#verdocs-floating-menu verdocs-toolbar-icon .icon{display:-ms-flexbox;display:flex}#verdocs-floating-menu verdocs-toolbar-icon .icon svg{fill:#ffffff}@-webkit-keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}@keyframes vfm-appear{0%{opacity:0}30%{-webkit-transform:scale(0.4);transform:scale(0.4);opacity:0.3}70%{-webkit-transform:scale(1.2);transform:scale(1.2);opacity:0.6}100%{-webkit-transform:scale(1);transform:scale(1);opacity:1}}";
|
5
5
|
|
6
6
|
// @see https://stackoverflow.com/a/49186677/1812436
|
7
7
|
const getScrollParent = node => {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { f as format } from './index2.js';
|
3
3
|
|
4
|
-
const verdocsOrganizationCardCss = "verdocs-organization-card{font-family:\"Inter\", \"Barlow\", sans-serif;position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card:hover>.popup{display:-ms-flexbox;display:flex;background:#ffffff;color:#33354c}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}verdocs-organization-card .popup{position:absolute;top:-1px;left:-4px;display:none;border:1px solid #cccccc;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;font-family:sans-serif}verdocs-organization-card .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}verdocs-organization-card .popup-header .status{margin-right:20px}verdocs-organization-card .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}verdocs-organization-card .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}verdocs-organization-card .field{margin:0 0 20px 0}verdocs-organization-card .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}verdocs-organization-card .field a{color:#
|
4
|
+
const verdocsOrganizationCardCss = "verdocs-organization-card{font-family:\"Inter\", \"Barlow\", sans-serif;position:relative;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;border:1px solid #cccccc;background:#ffffff;border-radius:8px;padding:7px 15px}verdocs-organization-card:hover>.popup{display:-ms-flexbox;display:flex;background:#ffffff;color:#33354c}verdocs-organization-card .icon{-ms-flex:0;flex:0;height:24px;width:24px;margin:0 14px 0 0}verdocs-organization-card .icon svg{fill:#aeb4bf;height:24px;width:24px}verdocs-organization-card .content{margin-top:2px}verdocs-organization-card .popup{position:absolute;top:-1px;left:-4px;display:none;border:1px solid #cccccc;border-radius:10px;width:326px;padding:20px 40px 0 40px;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;font-family:sans-serif}verdocs-organization-card .popup-header{display:-ms-flexbox;display:flex;-ms-flex:0;flex:0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:end;align-items:flex-end;margin:0 0 20px 0;font-size:21px;line-height:16px;color:#4c56cb}verdocs-organization-card .popup-header .status{margin-right:20px}verdocs-organization-card .popup-body{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-size:14px;text-transform:uppercase}verdocs-organization-card .status{-webkit-transform:scale(1.5);transform:scale(1.5);width:24px;height:24px}verdocs-organization-card .field{margin:0 0 20px 0}verdocs-organization-card .field strong{color:#7b7b9a;display:block;margin:0 0 5px 0}verdocs-organization-card .field a{color:#s;text-transform:uppercase}";
|
5
5
|
|
6
6
|
const UserIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px"><rect fill="none" height="24" width="24"/><g><path d="M4,13c1.1,0,2-0.9,2-2c0-1.1-0.9-2-2-2s-2,0.9-2,2C2,12.1,2.9,13,4,13z M5.13,14.1C4.76,14.04,4.39,14,4,14 c-0.99,0-1.93,0.21-2.78,0.58C0.48,14.9,0,15.62,0,16.43V18l4.5,0v-1.61C4.5,15.56,4.73,14.78,5.13,14.1z M20,13c1.1,0,2-0.9,2-2 c0-1.1-0.9-2-2-2s-2,0.9-2,2C18,12.1,18.9,13,20,13z M24,16.43c0-0.81-0.48-1.53-1.22-1.85C21.93,14.21,20.99,14,20,14 c-0.39,0-0.76,0.04-1.13,0.1c0.4,0.68,0.63,1.46,0.63,2.29V18l4.5,0V16.43z M16.24,13.65c-1.17-0.52-2.61-0.9-4.24-0.9 c-1.63,0-3.07,0.39-4.24,0.9C6.68,14.13,6,15.21,6,16.39V18h12v-1.61C18,15.21,17.32,14.13,16.24,13.65z M8.07,16 c0.09-0.23,0.13-0.39,0.91-0.69c0.97-0.38,1.99-0.56,3.02-0.56s2.05,0.18,3.02,0.56c0.77,0.3,0.81,0.46,0.91,0.69H8.07z M12,8 c0.55,0,1,0.45,1,1s-0.45,1-1,1s-1-0.45-1-1S11.45,8,12,8 M12,6c-1.66,0-3,1.34-3,3c0,1.66,1.34,3,3,3s3-1.34,3-3 C15,7.34,13.66,6,12,6L12,6z"/></g></svg>';
|
7
7
|
const BusinessIcon = '<svg xmlns="http://www.w3.org/2000/svg" focusable="false" aria-hidden="true" height="24px" viewBox="0 0 24 24" width="24px"><path d="M12 7V3H2v18h20V7H12zM6 19H4v-2h2v2zm0-4H4v-2h2v2zm0-4H4V9h2v2zm0-4H4V5h2v2zm4 12H8v-2h2v2zm0-4H8v-2h2v2zm0-4H8V9h2v2zm0-4H8V5h2v2zm10 12h-8v-2h2v-2h-2v-2h2v-2h-2V9h8v10zm-2-8h-2v2h2v-2zm0 4h-2v2h2v-2z"></path></svg>';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
2
|
import { i as integerSequence } from './Primitives.js';
|
3
3
|
|
4
|
-
const verdocsPaginationCss = "verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #
|
4
|
+
const verdocsPaginationCss = "verdocs-pagination{gap:8px;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-pagination .page-button{height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;cursor:pointer;font-size:16px;font-weight:600;border-radius:4px;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;color:#33364b;border:1px solid #s}verdocs-pagination .page-button svg{width:18px;height:18px}verdocs-pagination .page-button.selected{cursor:default;color:#ffffff;background:#s}verdocs-pagination .ellipsis{width:38px;height:38px;display:-ms-flexbox;display:flex;-ms-flex:0 0 38px;flex:0 0 38px;line-height:32px;-ms-flex-pack:center;justify-content:center;color:#33364b}";
|
5
5
|
|
6
6
|
const ChevronDoubleLeft = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M18.75 19.5l-7.5-7.5 7.5-7.5m-6 15L5.25 12l7.5-7.5" /></svg>`;
|
7
7
|
const ChevronDoubleRight = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 4.5l7.5 7.5-7.5 7.5m-6-15l7.5 7.5-7.5 7.5" /></svg>`;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h, Host } from '@stencil/core/internal/client';
|
2
2
|
|
3
|
-
const verdocsTemplateCardCss = "verdocs-template-card{font-family:\"Inter\", \"Barlow\", sans-serif;width:320px;height:320px;display:-ms-flexbox;display:flex;padding:25px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;-webkit-box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05);box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05)}verdocs-template-card .thumbnail{width:272px;height:158px;-o-object-fit:cover;object-fit:cover;margin-bottom:22px;-o-object-position:-20% 0;object-position:-20% 0}verdocs-template-card .name{font-size:18px;font-weight:700;margin-bottom:7px}verdocs-template-card .org-name{font-size:14px;font-weight:700;margin-bottom:6px}verdocs-template-card hr{width:100%;margin-bottom:17px;background-color:#aeb4bf}verdocs-template-card .controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;text-align:center;font-size:16px}verdocs-template-card .controls .control{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;margin-right:8px;-ms-flex-align:start;align-items:flex-start;border-right:1px solid #aeb4bf}verdocs-template-card .controls .control.secondary{-ms-flex-pack:center;justify-content:center}verdocs-template-card .controls .control svg{fill:#aeb4bf;height:16px;max-width:16px;margin:0 8px -2px 0}verdocs-template-card .additional-controls svg{margin-right:0;fill:#
|
3
|
+
const verdocsTemplateCardCss = "verdocs-template-card{font-family:\"Inter\", \"Barlow\", sans-serif;width:320px;height:320px;display:-ms-flexbox;display:flex;padding:25px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;-webkit-box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05);box-shadow:2px 2px 5px rgba(51, 54, 75, 0.05)}verdocs-template-card .thumbnail{width:272px;height:158px;-o-object-fit:cover;object-fit:cover;margin-bottom:22px;-o-object-position:-20% 0;object-position:-20% 0}verdocs-template-card .name{font-size:18px;font-weight:700;margin-bottom:7px}verdocs-template-card .org-name{font-size:14px;font-weight:700;margin-bottom:6px}verdocs-template-card hr{width:100%;margin-bottom:17px;background-color:#aeb4bf}verdocs-template-card .controls{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-pack:justify;justify-content:space-between;text-align:center;font-size:16px}verdocs-template-card .controls .control{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;margin-right:8px;-ms-flex-align:start;align-items:flex-start;border-right:1px solid #aeb4bf}verdocs-template-card .controls .control.secondary{-ms-flex-pack:center;justify-content:center}verdocs-template-card .controls .control svg{fill:#aeb4bf;height:16px;max-width:16px;margin:0 8px -2px 0}verdocs-template-card .additional-controls svg{margin-right:0;fill:#s}";
|
4
4
|
|
5
5
|
const ActionsIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z"/></svg>`;
|
6
6
|
const EmailIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M22 6c0-1.1-.9-2-2-2H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6zm-2 0l-8 5-8-5h16zm0 12H4V8l8 5 8-5v10z"/></svg>`;
|