@verdocs/web-sdk 2.1.2 → 2.2.0
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/Profiles-244e8254.js +95 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +27 -54
- package/dist/cjs/verdocs-button_2.cjs.entry.js +65 -0
- package/dist/cjs/{verdocs-checkbox_5.cjs.entry.js → verdocs-checkbox_4.cjs.entry.js} +0 -38
- package/dist/cjs/verdocs-settings-organization_2.cjs.entry.js +4383 -0
- package/dist/cjs/verdocs-settings.cjs.entry.js +42 -0
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -0
- package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.css +0 -3
- package/dist/collection/components/controls/verdocs-help-icon/verdocs-help-icon.js +24 -5
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +7 -0
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +26 -11
- package/dist/collection/components/embeds/verdocs-settings/verdocs-settings.css +29 -0
- package/dist/collection/components/embeds/verdocs-settings/verdocs-settings.js +98 -0
- package/dist/collection/components/embeds/verdocs-settings/verdocs-settings.stories.js +10 -0
- package/dist/collection/components/settings/verdocs-settings-organization/TimeZones.js +144 -0
- package/dist/collection/components/settings/verdocs-settings-organization/verdocs-settings-organization.css +33 -0
- package/dist/collection/components/settings/verdocs-settings-organization/verdocs-settings-organization.js +226 -0
- package/dist/collection/components/settings/verdocs-settings-organization/verdocs-settings-organization.stories.js +13 -0
- package/dist/collection/components/settings/verdocs-settings-profile/verdocs-settings-profile.css +33 -0
- package/dist/collection/components/settings/verdocs-settings-profile/verdocs-settings-profile.js +187 -0
- package/dist/collection/components/settings/verdocs-settings-profile/verdocs-settings-profile.stories.js +13 -0
- package/dist/components/EnvelopeStore.js +1 -1
- package/dist/components/Organizations.js +32 -0
- package/dist/components/Profiles.js +57 -0
- package/dist/components/TemplateStore.js +1 -1
- package/dist/components/index.d.ts +3 -0
- package/dist/components/index.js +3 -0
- package/dist/components/index3.js +3979 -168
- package/dist/components/index4.js +194 -0
- package/dist/components/verdocs-auth.js +41 -60
- package/dist/components/verdocs-help-icon2.js +8 -6
- package/dist/components/verdocs-settings-organization.d.ts +11 -0
- package/dist/components/verdocs-settings-organization.js +6 -0
- package/dist/components/verdocs-settings-organization2.js +331 -0
- package/dist/components/verdocs-settings-profile.d.ts +11 -0
- package/dist/components/verdocs-settings-profile.js +6 -0
- package/dist/components/verdocs-settings-profile2.js +142 -0
- package/dist/components/verdocs-settings.d.ts +11 -0
- package/dist/components/verdocs-settings.js +101 -0
- package/dist/custom-elements.json +1975 -0
- package/dist/docs.json +263 -1
- package/dist/esm/Profiles-7645e6f1.js +88 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +26 -53
- package/dist/esm/verdocs-button_2.entry.js +60 -0
- package/dist/esm/{verdocs-checkbox_5.entry.js → verdocs-checkbox_4.entry.js} +1 -38
- package/dist/esm/verdocs-settings-organization_2.entry.js +4378 -0
- package/dist/esm/verdocs-settings.entry.js +38 -0
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Profiles-7645e6f1.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-checkbox_4.entry.js +1 -0
- package/dist/esm-es5/verdocs-settings-organization_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-settings.entry.js +1 -0
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/controls/verdocs-help-icon/verdocs-help-icon.d.ts +6 -2
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +2 -1
- package/dist/types/components/embeds/verdocs-settings/verdocs-settings.d.ts +22 -0
- package/dist/types/components/embeds/verdocs-settings/verdocs-settings.stories.d.ts +4 -0
- package/dist/types/components/settings/verdocs-settings-organization/TimeZones.d.ts +1 -0
- package/dist/types/components/settings/verdocs-settings-organization/verdocs-settings-organization.d.ts +42 -0
- package/dist/types/components/settings/verdocs-settings-organization/verdocs-settings-organization.stories.d.ts +6 -0
- package/dist/types/components/settings/verdocs-settings-profile/verdocs-settings-profile.d.ts +38 -0
- package/dist/types/components/settings/verdocs-settings-profile/verdocs-settings-profile.stories.d.ts +6 -0
- package/dist/types/components.d.ts +104 -0
- package/dist/types/utils/utils.d.ts +1 -1
- package/dist/verdocs-web-sdk/p-075dc36d.js +1 -0
- package/dist/verdocs-web-sdk/p-0fecb805.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-144d4ed1.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-229a6849.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-40361f22.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-4821f318.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/p-888adbc2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cbebc039.system.js +1 -0
- package/dist/verdocs-web-sdk/p-ce22913a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-de192808.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e9d2b68a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-febebe69.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +4 -3
- package/dist/cjs/verdocs-button.cjs.entry.js +0 -26
- package/dist/esm/verdocs-button.entry.js +0 -22
- package/dist/esm-es5/verdocs-button.entry.js +0 -1
- package/dist/esm-es5/verdocs-checkbox_5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-28b22c54.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-450d6648.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-606e0405.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9964cc5e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c391fa41.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fbabbcea.system.entry.js +0 -1
@@ -1,24 +1,10 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-151c0874.js';
|
2
2
|
import { d as decodeAccessTokenBody } from './Types-5f31149e.js';
|
3
|
+
import { c as createBusinessAccount, i as isOrgAvailable } from './Profiles-7645e6f1.js';
|
3
4
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
4
5
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
5
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
6
7
|
|
7
|
-
/**
|
8
|
-
* An Organization is the top level object for ownership for Members, Documents, and Templates.
|
9
|
-
*
|
10
|
-
* @module
|
11
|
-
*/
|
12
|
-
/**
|
13
|
-
* Check if an organization name is available. Typically used during the sign-up process. This endpoint is rate-limited
|
14
|
-
* to prevent abuse. Developers experiencing problems with testing new applications should contact support.
|
15
|
-
*/
|
16
|
-
var isOrgAvailable = function (endpoint, name) {
|
17
|
-
return endpoint.api //
|
18
|
-
.post('/organizations/check-availability', { name: name }, { baseURL: endpoint.getBaseURLv2() })
|
19
|
-
.then(function (r) { return r.data; });
|
20
|
-
};
|
21
|
-
|
22
8
|
/**
|
23
9
|
* Authenticate to Verdocs via user/password authentication
|
24
10
|
*
|
@@ -71,36 +57,12 @@ var resendVerification = function (endpoint, accessToken) {
|
|
71
57
|
.then(function (r) { return r.data; });
|
72
58
|
};
|
73
59
|
|
74
|
-
|
75
|
-
* Get the user's available profiles. The current profile will be marked with `current: true`.
|
76
|
-
*
|
77
|
-
* ```typescript
|
78
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
79
|
-
*
|
80
|
-
* const profiles = await Profiles.getProfiles()
|
81
|
-
* ```
|
82
|
-
*/
|
83
|
-
/**
|
84
|
-
* Create a user account and parent organization. This endpoint is for creating a new organization. Users joining an
|
85
|
-
* existing organization should be invited, and follow their invitation links/instructions to create their accounts.
|
86
|
-
*
|
87
|
-
* ```typescript
|
88
|
-
* import {Profiles} from '@verdocs/js-sdk/Users';
|
89
|
-
*
|
90
|
-
* const newAccount = await Profiles.createBusinessAccount({
|
91
|
-
* orgName: 'ORG', email: 'a@b.com', password: '12345678', firstName: 'FIRST', lastName: 'LAST'
|
92
|
-
* });
|
93
|
-
* ```
|
94
|
-
*/
|
95
|
-
var createBusinessAccount = function (endpoint, params) {
|
96
|
-
return endpoint.api //
|
97
|
-
.post('/user/business', params)
|
98
|
-
.then(function (r) { return r.data; });
|
99
|
-
};
|
100
|
-
|
101
|
-
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}";
|
60
|
+
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}verdocs-auth verdocs-help-icon{margin-top:18px;display:-ms-flexbox;display:flex;width:32px;height:32px;-ms-flex:0 0 32px;flex:0 0 32px}";
|
102
61
|
|
103
62
|
const RECHECK_INTERVAL = 5000;
|
63
|
+
const OkIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="green"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm13.36-1.814a.75.75 0 10-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 00-1.06 1.06l2.25 2.25a.75.75 0 001.14-.094l3.75-5.25z" clip-rule="evenodd" /></svg>`;
|
64
|
+
const TakenIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="red"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" /></svg>`;
|
65
|
+
const InfoIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" viewBox="0 0 24 24" fill="#4a4a4a"><path fill-rule="evenodd" d="M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm11.378-3.917c-.89-.777-2.366-.777-3.255 0a.75.75 0 01-.988-1.129c1.454-1.272 3.776-1.272 5.23 0 1.513 1.324 1.513 3.518 0 4.842a3.75 3.75 0 01-.837.552c-.676.328-1.028.774-1.028 1.152v.75a.75.75 0 01-1.5 0v-.75c0-1.279 1.06-2.107 1.875-2.502.182-.088.351-.199.503-.331.83-.727.83-1.857 0-2.584zM12 18a.75.75 0 100-1.5.75.75 0 000 1.5z" clip-rule="evenodd" /></svg>`;
|
104
66
|
const Industries = [
|
105
67
|
{ value: '', label: '' },
|
106
68
|
{ value: 'Accounting & Tax', label: 'Accounting & Tax' },
|
@@ -155,7 +117,7 @@ const VerdocsAuth = class {
|
|
155
117
|
this.isAuthenticated = false;
|
156
118
|
this.displayMode = 'login';
|
157
119
|
this.orgname = '';
|
158
|
-
this.orgAvailable = '';
|
120
|
+
this.orgAvailable = 'UNKNOWN';
|
159
121
|
this.first = '';
|
160
122
|
this.last = '';
|
161
123
|
this.username = '';
|
@@ -170,6 +132,7 @@ const VerdocsAuth = class {
|
|
170
132
|
this.reason = '';
|
171
133
|
this.signupStep = 1;
|
172
134
|
this.resendDisabled = false;
|
135
|
+
this.checkingOrg = false;
|
173
136
|
}
|
174
137
|
componentWillLoad() {
|
175
138
|
var _a, _b;
|
@@ -318,12 +281,21 @@ const VerdocsAuth = class {
|
|
318
281
|
});
|
319
282
|
}
|
320
283
|
async checkAvailability(name) {
|
321
|
-
this.
|
322
|
-
|
323
|
-
|
324
|
-
|
325
|
-
|
326
|
-
|
284
|
+
this.checkingOrg = true;
|
285
|
+
try {
|
286
|
+
this.orgname = name;
|
287
|
+
const r = await isOrgAvailable(this.endpoint, name);
|
288
|
+
this.orgAvailable = r.result;
|
289
|
+
console.log('response', this.orgAvailable);
|
290
|
+
// Stage: POST - https://2r8pilqa44.execute-api.us-east-1.amazonaws.com/organizations/check-availability
|
291
|
+
// Prod: POST - https://lb1is9fxoc.execute-api.us-east-1.amazonaws.com/organizations/check-availability
|
292
|
+
}
|
293
|
+
catch (e) {
|
294
|
+
// NOP
|
295
|
+
// We need to trap this error because we get a 400 if the org name is invalid.
|
296
|
+
this.orgAvailable = 'UNKNOWN';
|
297
|
+
}
|
298
|
+
this.checkingOrg = false;
|
327
299
|
}
|
328
300
|
render() {
|
329
301
|
if (!this.visible) {
|
@@ -333,9 +305,10 @@ const VerdocsAuth = class {
|
|
333
305
|
return (h("verdocs-button", { label: "Sign Out", disabled: this.submitting, onClick: () => this.handleLogout(), style: { display: 'flex', justifyContent: 'center', margin: '30px auto 0' } }));
|
334
306
|
}
|
335
307
|
if (this.displayMode === 'signup') {
|
336
|
-
const step1Invalid = this.submitting || !this.first || !this.last || !this.username || !this.password || !this.orgname || this.orgAvailable !== '
|
337
|
-
|
338
|
-
|
308
|
+
const step1Invalid = this.submitting || !this.first || !this.last || !this.username || !this.password || !this.orgname || this.orgAvailable !== 'AVAILABLE';
|
309
|
+
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("div", { style: { display: 'flex', flexDirection: 'row', gap: '10px', alignItems: 'center' } }, h("verdocs-text-input", { label: "Organization Name", autocomplete: "org", required: true, value: this.orgname, onInput: (e) => this.checkAvailability(e.target.value), disabled: this.submitting, style: { flex: '1' }, onBlur: () => {
|
310
|
+
console.log('blur');
|
311
|
+
} }), !this.checkingOrg && this.orgAvailable === 'AVAILABLE' && h("verdocs-help-icon", { icon: OkIcon, text: "Organization name is available." }), !this.checkingOrg && this.orgAvailable === 'TAKEN' && h("verdocs-help-icon", { icon: TakenIcon, text: "Organization already registered." }), !this.checkingOrg && this.orgAvailable === 'UNKNOWN' && h("verdocs-help-icon", { icon: InfoIcon, text: "Organization name must be unique." }), this.checkingOrg && h("verdocs-spinner", { mode: "dark", size: 24 })), 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: () => {
|
339
312
|
this.signupStep = 2;
|
340
313
|
}, 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' } }))))));
|
341
314
|
}
|
@@ -0,0 +1,60 @@
|
|
1
|
+
import { r as registerInstance, h, H as Host } from './index-151c0874.js';
|
2
|
+
import { c as createPopper } from './popper-15e448b4.js';
|
3
|
+
|
4
|
+
const verdocsButtonCss = "verdocs-button button{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;text-transform:uppercase;-ms-flex-pack:center;justify-content:center;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;font-weight:700;cursor:pointer;margin:0}verdocs-button button:disabled{cursor:inherit;pointer-events:none}verdocs-button button .icon{margin:0 12px}verdocs-button button .icon svg{fill:#ffffff;display:block}verdocs-button button .button-label{padding:0 12px}verdocs-button button.small{height:34px;font-size:13px}verdocs-button button.small .icon{margin:0 4px}verdocs-button button.small .icon svg{margin:2px 0 0 0;height:20px}verdocs-button button.small .button-label{padding:0 4px}verdocs-button button.normal{height:44px;font-size:14px}verdocs-button button.normal .icon.start{margin:0 4px 0 8px}verdocs-button button.normal .icon.end{margin:0 8px 0 4px}verdocs-button button.normal .icon svg{margin:2px 0 0 0;height:22px}verdocs-button button.normal .button-label{padding:0 10px}verdocs-button button.medium{height:52px;font-size:16px}verdocs-button button.medium .icon.start{margin:0 0 0 18px}verdocs-button button.medium .icon.end{margin:0 18px 0 0}verdocs-button button.medium .icon svg{margin:2px 0 0 0;height:26px}verdocs-button button.medium .button-label{padding:0 20px}verdocs-button button.large{height:60px;font-size:20px}verdocs-button button.large .icon.start{margin:0 0 0 24px}verdocs-button button.large .icon.end{margin:0 24px 0 0}verdocs-button button.large .icon svg{margin:2px 0 0 0;height:32px}verdocs-button button.large .button-label{padding:0 34px}verdocs-button button.standard{background:#55bc81;border-radius:4px;outline:none;border:none;color:white}verdocs-button button.standard:disabled{background-color:#999999;cursor:default}verdocs-button button.standard:active:not([disabled]){-webkit-filter:brightness(110%);filter:brightness(110%)}verdocs-button button.text{color:#4c56cb;background:transparent;font-weight:500;padding:0 4px;outline:none;border:none}verdocs-button button.text:disabled{color:#999999}verdocs-button button.text:active:not([disabled]){-webkit-filter:brightness(130%);filter:brightness(130%)}verdocs-button button.text .icon svg{fill:#4c56cb}verdocs-button button.outline{border:1px solid #4c56cb;color:#4c56cb;outline:none;background:transparent;border-radius:4px;padding:0 20px}verdocs-button button.outline:disabled{color:#999999;border:1px solid #999999}verdocs-button button.outline:active{background:#4c56cb;color:white}verdocs-button button.outline .icon svg{fill:#4c56cb}";
|
5
|
+
|
6
|
+
const VerdocsButton = class {
|
7
|
+
constructor(hostRef) {
|
8
|
+
registerInstance(this, hostRef);
|
9
|
+
this.label = undefined;
|
10
|
+
this.startIcon = null;
|
11
|
+
this.endIcon = null;
|
12
|
+
this.size = 'normal';
|
13
|
+
this.type = 'button';
|
14
|
+
this.variant = 'standard';
|
15
|
+
this.disabled = false;
|
16
|
+
}
|
17
|
+
render() {
|
18
|
+
return (h("button", { disabled: this.disabled, type: this.type, class: `${this.variant} ${this.size} ${this.type}` }, this.startIcon ? h("span", { class: "icon start", innerHTML: this.startIcon }) : null, h("span", { class: "button-label" }, this.label), this.endIcon ? h("span", { class: "icon end", innerHTML: this.endIcon }) : null));
|
19
|
+
}
|
20
|
+
};
|
21
|
+
VerdocsButton.style = verdocsButtonCss;
|
22
|
+
|
23
|
+
const verdocsHelpIconCss = "verdocs-help-icon{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:\"\";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}";
|
24
|
+
|
25
|
+
const helpIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24" fill="#5c6575"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';
|
26
|
+
const VerdocsHelpIcon = class {
|
27
|
+
constructor(hostRef) {
|
28
|
+
registerInstance(this, hostRef);
|
29
|
+
this.text = '';
|
30
|
+
this.icon = helpIcon;
|
31
|
+
this.containerId = `verdocs-help-icon-${Math.random().toString(36).substring(2, 11)}`;
|
32
|
+
}
|
33
|
+
componentDidLoad() {
|
34
|
+
this.popperInstance = createPopper(this.iconEl, this.tooltipEl, {
|
35
|
+
// placement: 'top-end',
|
36
|
+
// modifiers: [{name: 'offset', options: {offset: [0, 10]}}],
|
37
|
+
});
|
38
|
+
}
|
39
|
+
disconnectedCallback() {
|
40
|
+
if (this.popperInstance) {
|
41
|
+
this.popperInstance.destroy();
|
42
|
+
this.popperInstance = null;
|
43
|
+
}
|
44
|
+
}
|
45
|
+
show() {
|
46
|
+
var _a, _b;
|
47
|
+
(_a = this.tooltipEl) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
|
48
|
+
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
49
|
+
}
|
50
|
+
hide() {
|
51
|
+
var _a;
|
52
|
+
(_a = this.tooltipEl) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
53
|
+
}
|
54
|
+
render() {
|
55
|
+
return (h(Host, { class: {} }, h("div", { "aria-describedby": this.containerId, class: "icon", innerHTML: this.icon, onMouseEnter: () => this.show(), onFocus: () => this.show(), onMouseLeave: () => this.hide(), onBlur: () => this.hide(), ref: el => (this.iconEl = el) }), h("div", { id: this.containerId, role: "tooltip", class: "tooltip", "data-popper-placement": "bottom", ref: el => (this.tooltipEl = el) }, h("span", { innerHTML: this.text }), h("div", { "data-popper-arrow": "true", class: "arrow" }))));
|
56
|
+
}
|
57
|
+
};
|
58
|
+
VerdocsHelpIcon.style = verdocsHelpIconCss;
|
59
|
+
|
60
|
+
export { VerdocsButton as verdocs_button, VerdocsHelpIcon as verdocs_help_icon };
|
@@ -1,5 +1,4 @@
|
|
1
1
|
import { r as registerInstance, h, H as Host, a as getElement } from './index-151c0874.js';
|
2
|
-
import { c as createPopper } from './popper-15e448b4.js';
|
3
2
|
|
4
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;margin-right:8px;line-height:20px;border-radius:2px;border-style:solid;border-width:0.1rem;display:inline-block;vertical-align:bottom;border-color:#aeb4bf}verdocs-checkbox label>input[type=checkbox]:checked+*{color:#55bc81}verdocs-checkbox label>input[type=checkbox]:checked+*::before{content:\"✓\";color:white;text-align:center;background:#55bc81;border-color:#55bc81}verdocs-checkbox.dark label>input[type=checkbox]+*::before{border-color:#ffffff}verdocs-checkbox.dark label>input[type=checkbox]:checked+*::before{background:#55bc81;border-color:#55bc81}";
|
5
4
|
|
@@ -32,42 +31,6 @@ const VerdocsComponentError = class {
|
|
32
31
|
};
|
33
32
|
VerdocsComponentError.style = verdocsComponentErrorCss;
|
34
33
|
|
35
|
-
const verdocsHelpIconCss = "verdocs-help-icon{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;display:inline-block;opacity:0.3;position:relative}verdocs-help-icon:hover{opacity:1}verdocs-help-icon .icon{display:inline-block}verdocs-help-icon .icon svg{fill:#5c6575}verdocs-help-icon .tooltip{display:none;min-width:200px;-webkit-box-shadow:0 0 10px 1px #999999;box-shadow:0 0 10px 1px #999999;background:#ffffff;color:#33364b;max-width:240px;font-weight:bold;position:absolute;padding:5px 10px;font-size:13px;border-radius:4px;z-index:10000}verdocs-help-icon .tooltip .arrow,verdocs-help-icon .tooltip .arrow::before{position:absolute;width:8px;height:8px;background:inherit}verdocs-help-icon .tooltip .arrow{visibility:hidden;top:-4px}verdocs-help-icon .tooltip .arrow::before{visibility:visible;content:\"\";-webkit-transform:rotate(45deg);transform:rotate(45deg)}verdocs-help-icon .tooltip[data-show]{display:block}verdocs-help-icon .tooltip[data-popper-placement^=top]>.arrow{bottom:-4px}verdocs-help-icon .tooltip[data-popper-placement^=bottom]>.arrow{top:-4px}verdocs-help-icon .tooltip[data-popper-placement^=left]>.arrow{right:-4px}verdocs-help-icon .tooltip[data-popper-placement^=right]>.arrow{left:-4px}";
|
36
|
-
|
37
|
-
const helpIcon = '<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="M11.925 18q.55 0 .938-.387.387-.388.387-.938 0-.55-.387-.925-.388-.375-.938-.375-.55 0-.925.375t-.375.925q0 .55.375.938.375.387.925.387Zm-.95-3.85h1.95q0-.8.2-1.287.2-.488 1.025-1.288.65-.625 1.025-1.213.375-.587.375-1.437 0-1.425-1.025-2.175Q13.5 6 12.1 6q-1.425 0-2.35.775t-1.275 1.85l1.775.7q.125-.45.55-.975.425-.525 1.275-.525.725 0 1.1.412.375.413.375.888 0 .475-.287.9-.288.425-.713.775-1.075.95-1.325 1.475-.25.525-.25 1.875ZM12 22.2q-2.125 0-3.988-.8-1.862-.8-3.237-2.175Q3.4 17.85 2.6 15.988 1.8 14.125 1.8 12t.8-3.988q.8-1.862 2.175-3.237Q6.15 3.4 8.012 2.6 9.875 1.8 12 1.8t3.988.8q1.862.8 3.237 2.175Q20.6 6.15 21.4 8.012q.8 1.863.8 3.988t-.8 3.988q-.8 1.862-2.175 3.237Q17.85 20.6 15.988 21.4q-1.863.8-3.988.8Zm0-2.275q3.325 0 5.625-2.3t2.3-5.625q0-3.325-2.3-5.625T12 4.075q-3.325 0-5.625 2.3T4.075 12q0 3.325 2.3 5.625t5.625 2.3ZM12 12Z"/></svg>';
|
38
|
-
const VerdocsHelpIcon = class {
|
39
|
-
constructor(hostRef) {
|
40
|
-
registerInstance(this, hostRef);
|
41
|
-
this.text = '';
|
42
|
-
this.containerId = `verdocs-help-icon-${Math.random().toString(36).substring(2, 11)}`;
|
43
|
-
}
|
44
|
-
componentDidLoad() {
|
45
|
-
this.popperInstance = createPopper(this.icon, this.tooltip, {
|
46
|
-
// placement: 'top-end',
|
47
|
-
// modifiers: [{name: 'offset', options: {offset: [0, 10]}}],
|
48
|
-
});
|
49
|
-
}
|
50
|
-
disconnectedCallback() {
|
51
|
-
if (this.popperInstance) {
|
52
|
-
this.popperInstance.destroy();
|
53
|
-
this.popperInstance = null;
|
54
|
-
}
|
55
|
-
}
|
56
|
-
show() {
|
57
|
-
var _a, _b;
|
58
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.setAttribute('data-show', '');
|
59
|
-
(_b = this.popperInstance) === null || _b === void 0 ? void 0 : _b.update().catch(() => { });
|
60
|
-
}
|
61
|
-
hide() {
|
62
|
-
var _a;
|
63
|
-
(_a = this.tooltip) === null || _a === void 0 ? void 0 : _a.removeAttribute('data-show');
|
64
|
-
}
|
65
|
-
render() {
|
66
|
-
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" }))));
|
67
|
-
}
|
68
|
-
};
|
69
|
-
VerdocsHelpIcon.style = verdocsHelpIconCss;
|
70
|
-
|
71
34
|
const verdocsSelectInputCss = "verdocs-select-input{font-family:\"Inter\", \"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 0 10px 0;display:block}verdocs-select-input .input-element{-webkit-box-sizing:border-box;box-sizing:border-box;background:#ffffff;border:1px solid #cccccc;border-radius:4px;background:#ffffff;color:#092c4c;width:100%;font-size:16px;height:28px;padding:2px 8px}verdocs-select-input .input-element::-webkit-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-moz-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element:-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::-ms-input-placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-element::placeholder{color:#aaaaaa;opacity:1}verdocs-select-input .input-label{display:block;color:#555570;font-weight:700;font-size:14px;margin:0 0 4px 0}";
|
72
35
|
|
73
36
|
const VerdocsSelectInput = class {
|
@@ -121,4 +84,4 @@ const VerdocsTextInput = class {
|
|
121
84
|
};
|
122
85
|
VerdocsTextInput.style = verdocsTextInputCss;
|
123
86
|
|
124
|
-
export { VerdocsCheckbox as verdocs_checkbox, VerdocsComponentError as verdocs_component_error,
|
87
|
+
export { VerdocsCheckbox as verdocs_checkbox, VerdocsComponentError as verdocs_component_error, VerdocsSelectInput as verdocs_select_input, VerdocsTextInput as verdocs_text_input };
|