@verdocs/web-sdk 2.2.20 → 2.2.22
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/{TemplateStore-66577b50.js → TemplateStore-a5fa2b0c.js} +1 -1
- package/dist/cjs/{VerdocsEndpoint-a2dc85ad.js → VerdocsEndpoint-45deeb6a.js} +2 -2
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +50 -72
- package/dist/cjs/verdocs-button-panel_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-contact-picker_2.cjs.entry.js +1 -1
- package/dist/cjs/{verdocs-dialog_3.cjs.entry.js → verdocs-dialog_2.cjs.entry.js} +0 -25
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-recipient-link_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-envelopes-list.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 +1 -1
- package/dist/cjs/verdocs-file-chooser_2.cjs.entry.js +1 -1
- package/dist/cjs/{verdocs-preview_6.cjs.entry.js → verdocs-preview_8.cjs.entry.js} +205 -14
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings-api-keys_4.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-settings.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-tabs.cjs.entry.js +26 -0
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +11 -5
- package/dist/cjs/verdocs-template-star.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-view.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.css +15 -16
- package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.js +5 -14
- package/dist/collection/components/controls/verdocs-tabs/verdocs-tabs.stories.js +4 -13
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.css +1 -34
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.js +107 -17
- package/dist/collection/components/embeds/verdocs-build/verdocs-build.stories.js +1 -1
- package/dist/collection/components/templates/verdocs-template-attachments/verdocs-template-attachments.js +13 -8
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.css +25 -0
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.js +219 -0
- package/dist/collection/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.stories.js +16 -0
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +28 -3
- package/dist/collection/components/templates/verdocs-template-name/verdocs-template-name.js +27 -3
- package/dist/collection/components/templates/verdocs-template-reminders/verdocs-template-reminders.js +28 -3
- package/dist/collection/components/templates/verdocs-template-roles/verdocs-template-roles.js +9 -3
- package/dist/collection/components/templates/verdocs-template-visibillity/verdocs-template-visibility.js +27 -2
- package/dist/components/VerdocsEndpoint.js +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/verdocs-build.js +99 -102
- package/dist/components/verdocs-tabs2.js +2 -8
- package/dist/components/verdocs-template-attachments2.js +5 -4
- package/dist/components/verdocs-template-build-tabs.d.ts +11 -0
- package/dist/components/verdocs-template-build-tabs.js +6 -0
- package/dist/components/verdocs-template-build-tabs2.js +132 -0
- package/dist/components/verdocs-template-create.js +1 -138
- package/dist/{esm/verdocs-template-create.entry.js → components/verdocs-template-create2.js} +61 -14
- package/dist/components/verdocs-template-name2.js +4 -3
- package/dist/components/verdocs-template-reminders2.js +5 -3
- package/dist/components/verdocs-template-roles2.js +9 -3
- package/dist/components/verdocs-template-visibility2.js +4 -2
- package/dist/docs.json +212 -13
- package/dist/esm/{TemplateStore-3c138524.js → TemplateStore-e8cf5a15.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-6fe4258b.js → VerdocsEndpoint-d58d5544.js} +1 -1
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-activity-box.entry.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +51 -73
- package/dist/esm/verdocs-button-panel_2.entry.js +2 -2
- package/dist/esm/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm/{verdocs-dialog_3.entry.js → verdocs-dialog_2.entry.js} +1 -25
- package/dist/esm/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm/verdocs-file-chooser_2.entry.js +1 -1
- package/dist/esm/{verdocs-preview_6.entry.js → verdocs-preview_8.entry.js} +207 -18
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm/verdocs-settings.entry.js +1 -1
- package/dist/esm/verdocs-sign.entry.js +1 -1
- package/dist/esm/verdocs-tabs.entry.js +22 -0
- package/dist/esm/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm/verdocs-template-fields_4.entry.js +11 -5
- package/dist/esm/verdocs-template-star.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +1 -1
- package/dist/esm/verdocs-view.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{TemplateStore-3c138524.js → TemplateStore-e8cf5a15.js} +1 -1
- package/dist/esm-es5/{VerdocsEndpoint-6fe4258b.js → VerdocsEndpoint-d58d5544.js} +1 -1
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker_2.entry.js +1 -1
- package/dist/esm-es5/{verdocs-dialog_3.entry.js → verdocs-dialog_2.entry.js} +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-recipient-link_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.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-file-chooser_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview_8.entry.js +1 -0
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings-api-keys_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-settings.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-tabs.entry.js +1 -0
- 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-template-star.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.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/controls/verdocs-tabs/verdocs-tabs.d.ts +3 -4
- package/dist/types/components/controls/verdocs-tabs/verdocs-tabs.stories.d.ts +2 -3
- package/dist/types/components/embeds/verdocs-build/verdocs-build.d.ts +24 -2
- package/dist/types/components/templates/verdocs-template-attachments/verdocs-template-attachments.d.ts +4 -2
- package/dist/types/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.d.ts +39 -0
- package/dist/types/components/templates/verdocs-template-build-tabs/verdocs-template-build-tabs.stories.d.ts +8 -0
- package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.d.ts +8 -0
- package/dist/types/components/templates/verdocs-template-name/verdocs-template-name.d.ts +9 -0
- package/dist/types/components/templates/verdocs-template-reminders/verdocs-template-reminders.d.ts +9 -0
- package/dist/types/components/templates/verdocs-template-roles/verdocs-template-roles.d.ts +1 -0
- package/dist/types/components/templates/verdocs-template-visibillity/verdocs-template-visibility.d.ts +9 -0
- package/dist/types/components.d.ts +82 -8
- package/dist/verdocs-web-sdk/{p-963f6e05.system.entry.js → p-07696831.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-8eb640c4.system.entry.js → p-07b5f356.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-957e1e4e.entry.js → p-0b2102df.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ec9f11dc.system.entry.js → p-0df9e6e1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-15df3998.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-724d4efa.system.js → p-1753f57b.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-1dda2d09.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7fb8387d.system.entry.js → p-21e137f0.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1ab8f7f6.system.entry.js → p-2284d430.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-49777798.system.entry.js → p-2549a794.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2a0ed0ab.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-53fb6c8c.entry.js → p-2b6e4f2a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a06f6e8e.entry.js → p-3a90098d.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-3ce7e733.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4a3f9e45.entry.js → p-3da4fed1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a5d8085.system.entry.js → p-4017b53a.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f867f61b.entry.js → p-428de4a5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6c4de84c.entry.js → p-42f27e8c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4422958b.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-71d6e1c3.system.entry.js → p-45bee3f6.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-92e3d974.system.entry.js → p-45d5e035.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0fa99a06.system.entry.js → p-48c62137.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-79c09ffc.system.entry.js → p-506754d5.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-79410da3.entry.js → p-51979353.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2cb422a2.entry.js → p-5ab837bf.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-65c99d51.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-96fb90bd.system.entry.js → p-66cec042.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f732abf1.entry.js → p-6ccb86b6.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6f1e794d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-70685224.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-58c8584e.entry.js → p-77ecee31.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b3b370b5.entry.js → p-78e4f430.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6734b77c.entry.js → p-79b0c643.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c26d3d7b.system.entry.js → p-7bd5db75.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5ed21587.entry.js → p-84efd562.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b3706eb2.system.entry.js → p-883d60e1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8d14ace0.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-87c527e4.entry.js → p-9009e136.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a41a8742.entry.js → p-965b66a8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-99c8acfa.system.entry.js → p-a0ad315e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d56ac75b.entry.js → p-a1e82d5a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a8aefe57.system.entry.js → p-a894761f.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ab7df219.system.entry.js → p-aba05f25.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-c488219f.entry.js → p-ad273610.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-1e48cc2c.system.entry.js → p-ae971bb4.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-53276c5b.js → p-af048fad.js} +1 -1
- package/dist/verdocs-web-sdk/{p-ec06b3d1.entry.js → p-ba04698a.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-55f66c83.entry.js → p-bbd400a5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-38031118.system.entry.js → p-cd64b223.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-e36c7481.entry.js → p-d4aec860.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2c5e2d73.js → p-d4d8858f.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a6d93251.entry.js → p-e40dd4d1.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f8210aa7.system.entry.js → p-edabba6b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f04bf956.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-994623c4.entry.js → p-f2deae25.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3e20d28c.system.entry.js → p-f9e89b56.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-75435256.system.entry.js → p-fab73ec8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/verdocs-template-create.cjs.entry.js +0 -99
- package/dist/custom-elements.json +0 -2021
- package/dist/esm-es5/verdocs-preview_6.entry.js +0 -1
- package/dist/esm-es5/verdocs-template-create.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-070dfd64.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7ebe11ff.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-88e12975.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-93eb4996.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9e15bdda.system.js +0 -1
- package/dist/verdocs-web-sdk/p-b35e8183.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e1cad931.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f3aa514e.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fbd27c79.entry.js +0 -1
@@ -1,69 +1,12 @@
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
|
1
|
+
import { r as registerInstance, c as createEvent, f as forceUpdate, h, H as Host, a as getElement } from './index-172625c5.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
|
-
import {
|
4
|
-
import { g as getTemplateStore } from './TemplateStore-
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
4
|
+
import { g as getTemplateStore } from './TemplateStore-e8cf5a15.js';
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
6
6
|
import './index-4439b0d1.js';
|
7
7
|
import './Templates-f90883f7.js';
|
8
8
|
|
9
|
-
|
10
|
-
* Confirm whether the user has all of the specified permissions.
|
11
|
-
*/
|
12
|
-
var userHasPermissions = function (session, permissions) {
|
13
|
-
return permissions.every(function (perm) { return ((session === null || session === void 0 ? void 0 : session.permissions) || []).includes(perm); });
|
14
|
-
};
|
15
|
-
|
16
|
-
/**
|
17
|
-
* Various helpers to identify available operations for a template by a user.
|
18
|
-
*
|
19
|
-
* @module
|
20
|
-
*/
|
21
|
-
/**
|
22
|
-
* Check to see if the user created the template.
|
23
|
-
*/
|
24
|
-
var userIsTemplateCreator = function (session, template) {
|
25
|
-
return session && template && session.profile_id === template.profile_id;
|
26
|
-
};
|
27
|
-
/**
|
28
|
-
* Check to see if a template is "shared" with the user.
|
29
|
-
*/
|
30
|
-
var userHasSharedTemplate = function (session, template) {
|
31
|
-
return session && template && !template.is_personal && session.organization_id === template.organization_id;
|
32
|
-
};
|
33
|
-
/**
|
34
|
-
* Check to see if the user can read/view a template.
|
35
|
-
*/
|
36
|
-
var userCanReadTemplate = function (session, template) {
|
37
|
-
return template.is_public ||
|
38
|
-
userIsTemplateCreator(session, template) ||
|
39
|
-
(userHasSharedTemplate(session, template) && userHasPermissions(session, [Permissions.TEMPLATE_MEMBER_READ]));
|
40
|
-
};
|
41
|
-
/**
|
42
|
-
* Check to see if the user can update a tempate.
|
43
|
-
*/
|
44
|
-
var userCanUpdateTemplate = function (session, template) {
|
45
|
-
return userIsTemplateCreator(session, template) ||
|
46
|
-
(userHasSharedTemplate(session, template) &&
|
47
|
-
userHasPermissions(session, [Permissions.TEMPLATE_MEMBER_READ, Permissions.TEMPLATE_MEMBER_WRITE]));
|
48
|
-
};
|
49
|
-
/**
|
50
|
-
* Check to see if the user can "build" the template (use the field builder). The user must have write access to the
|
51
|
-
* template, and the template must have at least one signer role.
|
52
|
-
*/
|
53
|
-
var userCanBuildTemplate = function (session, template) {
|
54
|
-
return userCanUpdateTemplate(session, template) && (template.roles || []).filter(function (role) { return role.type === 'signer'; }).length > 0;
|
55
|
-
};
|
56
|
-
/**
|
57
|
-
* Check to see if the user can preview the template. The user must have read access to the template, the template must
|
58
|
-
* have at least one signer, and every signer must have at least one field.
|
59
|
-
*/
|
60
|
-
var userCanPreviewTemplate = function (session, template) {
|
61
|
-
var hasPermission = userCanReadTemplate(session, template);
|
62
|
-
var signers = (template.roles || []).filter(function (role) { return role.type === 'signer'; });
|
63
|
-
return hasPermission && signers.length > 0 && signers.every(function (signer) { return (signer.fields || []).length > 0; });
|
64
|
-
};
|
65
|
-
|
66
|
-
const verdocsBuildCss = "verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-build .steps{-ms-flex:0;flex:0;gap:10px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:5px 20px 0 10px;background-color:#f2f5fa;border-bottom:1px solid #cccccc}verdocs-build .steps .step{border:none;height:40px;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;padding:0 20px;font-size:13px;font-weight:600;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;border-top-left-radius:5px;border-top-right-radius:5px;background-color:#666666}verdocs-build .steps .step:disabled{cursor:inherit;background-color:#aaaaaa}verdocs-build .steps .step.active{background-color:#707ae5}verdocs-build .content{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-shadow:0 0 7px -3px #000000cc;box-shadow:0 0 7px -3px #000000cc}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}";
|
9
|
+
const verdocsBuildCss = "verdocs-build{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-build .content{-ms-flex:1;flex:1;gap:20px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column}verdocs-build verdocs-template-attachments,verdocs-build verdocs-template-roles{margin:20px}verdocs-build verdocs-template-fields{border-top:1px solid #777777}verdocs-build verdocs-template-attachments{padding:20px;background:#ffffff}verdocs-build verdocs-template-fields{width:100%}verdocs-build verdocs-preview{-ms-flex:1;flex:1}";
|
67
10
|
|
68
11
|
const VerdocsBuild = class {
|
69
12
|
constructor(hostRef) {
|
@@ -71,35 +14,64 @@ const VerdocsBuild = class {
|
|
71
14
|
this.sdkError = createEvent(this, "sdkError", 7);
|
72
15
|
this.stepChanged = createEvent(this, "stepChanged", 7);
|
73
16
|
this.send = createEvent(this, "send", 7);
|
74
|
-
this.
|
17
|
+
this.templateUpdated = createEvent(this, "templateUpdated", 7);
|
18
|
+
this.templateCreated = createEvent(this, "templateCreated", 7);
|
75
19
|
this.endpoint = VerdocsEndpoint.getDefault();
|
76
20
|
this.templateId = null;
|
77
|
-
this.step =
|
21
|
+
this.step = 'preview';
|
22
|
+
this.store = null;
|
23
|
+
}
|
24
|
+
onTemplateIdChanged(newTemplateId) {
|
25
|
+
console.log('Template ID changed', newTemplateId);
|
26
|
+
this.loadTemplate(newTemplateId).catch((e) => console.log('Unknown Error', e));
|
27
|
+
}
|
28
|
+
onStepChanged(newStep) {
|
29
|
+
console.log('Step changed', newStep);
|
30
|
+
this.loadTemplate(this.templateId).catch((e) => console.log('Unknown Error', e));
|
78
31
|
}
|
79
32
|
async componentWillLoad() {
|
80
33
|
var _a, _b, _c;
|
81
34
|
try {
|
82
35
|
this.endpoint.loadSession();
|
83
36
|
if (!this.templateId) {
|
84
|
-
console.log(`[BUILD]
|
37
|
+
console.log(`[BUILD] No template ID, activating upload mode`);
|
38
|
+
this.step = 'attachments';
|
85
39
|
return;
|
86
40
|
}
|
87
41
|
if (!this.endpoint.session) {
|
88
42
|
console.log('[BUILD] Unable to start builder session, must be authenticated');
|
89
43
|
return;
|
90
44
|
}
|
91
|
-
this.
|
92
|
-
this.store = await getTemplateStore(this.endpoint, this.templateId, true);
|
45
|
+
this.loadTemplate(this.templateId).catch(e => console.log('[BUILD] Unable to load template', e));
|
93
46
|
}
|
94
47
|
catch (e) {
|
95
48
|
console.log('[BUILD] Error loading template', e);
|
96
49
|
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
97
50
|
}
|
98
51
|
}
|
52
|
+
async loadTemplate(templateId) {
|
53
|
+
if (templateId) {
|
54
|
+
console.log('Loading store', templateId);
|
55
|
+
this.store = await getTemplateStore(this.endpoint, templateId, true);
|
56
|
+
forceUpdate(this.el);
|
57
|
+
}
|
58
|
+
}
|
99
59
|
handleCancel(e) {
|
100
60
|
console.log('Cancel', e.detail);
|
101
61
|
this.step = 'preview';
|
102
62
|
}
|
63
|
+
async handleTemplateCreated(templateId) {
|
64
|
+
var _a;
|
65
|
+
await this.loadTemplate(templateId);
|
66
|
+
this.templateId = templateId;
|
67
|
+
this.step = 'roles';
|
68
|
+
(_a = this.stepChanged) === null || _a === void 0 ? void 0 : _a.emit('roles');
|
69
|
+
}
|
70
|
+
async handleTemplateUpdated(e) {
|
71
|
+
var _a;
|
72
|
+
console.log('tup');
|
73
|
+
(_a = this.templateUpdated) === null || _a === void 0 ? void 0 : _a.emit(e.detail);
|
74
|
+
}
|
103
75
|
handleAttachmentsNext() {
|
104
76
|
var _a;
|
105
77
|
this.step = 'roles';
|
@@ -110,10 +82,9 @@ const VerdocsBuild = class {
|
|
110
82
|
this.step = 'fields';
|
111
83
|
(_a = this.stepChanged) === null || _a === void 0 ? void 0 : _a.emit('fields');
|
112
84
|
}
|
113
|
-
|
85
|
+
handleStepChanged(step) {
|
114
86
|
var _a;
|
115
|
-
|
116
|
-
e.preventDefault();
|
87
|
+
console.log('osc', step);
|
117
88
|
this.step = step;
|
118
89
|
(_a = this.stepChanged) === null || _a === void 0 ? void 0 : _a.emit(step);
|
119
90
|
}
|
@@ -121,11 +92,18 @@ const VerdocsBuild = class {
|
|
121
92
|
if (!this.endpoint.session) {
|
122
93
|
return (h(Host, null, h("verdocs-component-error", { message: "You must be authenticated to use this module." })));
|
123
94
|
}
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
95
|
+
if (!this.store) {
|
96
|
+
console.log('[BUILD] No template ID, rendering created view');
|
97
|
+
return (h(Host, null, h("div", { class: "content" }, h("verdocs-template-build-tabs", { endpoint: this.endpoint, templateId: this.templateId, step: "attachments", onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, onStepChanged: e => this.handleStepChanged(e.detail) }), h("verdocs-template-create", { endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleAttachmentsNext(), onTemplateCreated: e => this.handleTemplateCreated(e.detail.templateId) }))));
|
98
|
+
}
|
99
|
+
console.log('[BUILD] Rendering build view', this.step, ['attachments', 'roles', 'settings', 'fields', 'preview'].indexOf(this.step));
|
100
|
+
return (h(Host, null, h("div", { class: "content" }, h("verdocs-template-build-tabs", { endpoint: this.endpoint, templateId: this.templateId, step: this.step, onSdkError: e => { var _a; return (_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, onStepChanged: e => this.handleStepChanged(e.detail) }), this.step === 'attachments' && (h("verdocs-template-attachments", { templateId: this.templateId, endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleAttachmentsNext(), onTemplateUpdated: e => this.handleTemplateUpdated(e) })), this.step === 'roles' && (h("verdocs-template-roles", { templateId: this.templateId, endpoint: this.endpoint, onExit: e => this.handleCancel(e), onNext: () => this.handleRolesNext(), onTemplateUpdated: e => this.handleTemplateUpdated(e) })), this.step === 'settings' && (h("div", { style: { flexDirection: 'column', gap: '20px', display: 'flex', maxWidth: '400px', margin: '20px' } }, h("verdocs-template-name", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), h("verdocs-template-reminders", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), h("verdocs-template-visibility", { templateId: this.templateId, endpoint: this.endpoint, style: { backgroundColor: '#ffffff', padding: '20px' }, onTemplateUpdated: e => this.handleTemplateUpdated(e) }))), this.step === 'fields' && h("verdocs-template-fields", { templateId: this.templateId, endpoint: this.endpoint, onTemplateUpdated: e => this.handleTemplateUpdated(e) }), this.step === 'preview' && (h("div", { style: { flexDirection: 'row', display: 'flex', width: '100%', backgroundColor: '#eeeeee', maxHeight: '100%' } }, h("div", { style: { display: 'flex', flex: '0 0 300px', backgroundColor: '#ffffff', boxShadow: '1px 1px 6px -2px #0000007f' } }, h("verdocs-send", { templateId: this.templateId, endpoint: this.endpoint, onSend: e => { var _a; return (_a = this.send) === null || _a === void 0 ? void 0 : _a.emit(e.detail); }, style: { width: '100%' } })), h("div", { style: { display: 'flex', flex: '1', justifyContent: 'center', overflowY: 'scroll' } }, h("verdocs-preview", { templateId: this.templateId, endpoint: this.endpoint, style: { display: 'flex', flex: '1', maxWidth: '1000px' } })))))));
|
128
101
|
}
|
102
|
+
get el() { return getElement(this); }
|
103
|
+
static get watchers() { return {
|
104
|
+
"templateId": ["onTemplateIdChanged"],
|
105
|
+
"step": ["onStepChanged"]
|
106
|
+
}; }
|
129
107
|
};
|
130
108
|
VerdocsBuild.style = verdocsBuildCss;
|
131
109
|
|
@@ -2,9 +2,9 @@ import { r as registerInstance, h, H as Host, c as createEvent, a as getElement
|
|
2
2
|
import { c as createPopper } from './popper-15e448b4.js';
|
3
3
|
import { a as commonjsGlobal } from './_commonjsHelpers-5ec8f9b7.js';
|
4
4
|
import './Types-5f31149e.js';
|
5
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
5
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
6
6
|
import { u as updateField, d as deleteField } from './Fields-c82e6df3.js';
|
7
|
-
import { g as getTemplateStore } from './TemplateStore-
|
7
|
+
import { g as getTemplateStore } from './TemplateStore-e8cf5a15.js';
|
8
8
|
import { S as SDKError } from './errors-9b5498c8.js';
|
9
9
|
import './index-4439b0d1.js';
|
10
10
|
import './Templates-f90883f7.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
4
4
|
import { d as convertToE164 } from './utils-c0cd0b91.js';
|
5
5
|
import './_commonjsHelpers-5ec8f9b7.js';
|
6
6
|
import './Envelopes-5e32159f.js';
|
@@ -43,28 +43,4 @@ const VerdocsTable = class {
|
|
43
43
|
};
|
44
44
|
VerdocsTable.style = verdocsTableCss;
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
const VerdocsTabs = class {
|
49
|
-
constructor(hostRef) {
|
50
|
-
registerInstance(this, hostRef);
|
51
|
-
this.selectTab = createEvent(this, "selectTab", 7);
|
52
|
-
this.tabs = [];
|
53
|
-
this.defaultTab = 0;
|
54
|
-
this.selectedTab = 0;
|
55
|
-
}
|
56
|
-
componentWillLoad() {
|
57
|
-
this.selectedTab = this.defaultTab || 0;
|
58
|
-
}
|
59
|
-
handleSelectTab(index) {
|
60
|
-
var _a;
|
61
|
-
this.selectedTab = index;
|
62
|
-
(_a = this.selectTab) === null || _a === void 0 ? void 0 : _a.emit({ tab: this.tabs[index], index });
|
63
|
-
}
|
64
|
-
render() {
|
65
|
-
return (h(Host, null, this.tabs.map((tab, index) => (h("div", { class: `tab ${index === this.selectedTab ? 'active' : ''} ${tab.disabled ? 'disabled' : ''}`, onClick: tab.disabled ? () => { } : () => this.handleSelectTab(index) }, tab.label))), h("div", { class: "flex flex-1" }), h("slot", null, h("div", null))));
|
66
|
-
}
|
67
|
-
};
|
68
|
-
VerdocsTabs.style = verdocsTabsCss;
|
69
|
-
|
70
|
-
export { VerdocsDialog as verdocs_dialog, VerdocsTable as verdocs_table, VerdocsTabs as verdocs_tabs };
|
46
|
+
export { VerdocsDialog as verdocs_dialog, VerdocsTable as verdocs_table };
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-172625c5.js';
|
2
2
|
import { j as getEnvelopeDocumentPageDisplayUri } from './Envelopes-5e32159f.js';
|
3
3
|
import './Types-5f31149e.js';
|
4
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
5
5
|
import { t as throttle } from './utils-c0cd0b91.js';
|
6
6
|
import './_commonjsHelpers-5ec8f9b7.js';
|
7
7
|
import './Files-70a192df.js';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
3
|
import { g as getInPersonLink } from './Recipients-4ec2138c.js';
|
4
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
5
5
|
import { g as getEnvelopeStore } from './EnvelopeStore-7f484014.js';
|
6
6
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
7
7
|
import { S as SDKError } from './errors-9b5498c8.js';
|
@@ -3,7 +3,7 @@ import { c as cancelEnvelope } from './Envelopes-5e32159f.js';
|
|
3
3
|
import { u as userIsEnvelopeOwner } from './Permissions-f2eb0421.js';
|
4
4
|
import { r as resendInvitation } from './Recipients-4ec2138c.js';
|
5
5
|
import './Types-5f31149e.js';
|
6
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
6
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
7
7
|
import { g as getEnvelopeStore } from './EnvelopeStore-7f484014.js';
|
8
8
|
import { F as FORMAT_TIMESTAMP } from './Types-de18e225.js';
|
9
9
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
@@ -2,7 +2,7 @@ import { r as registerInstance, c as createEvent, h, H as Host } from './index-1
|
|
2
2
|
import { l as listEnvelopes, c as cancelEnvelope } from './Envelopes-5e32159f.js';
|
3
3
|
import { g as getRecipientsWithActions, a as userCanAct, b as userCanCancelEnvelope } from './Permissions-f2eb0421.js';
|
4
4
|
import './Types-5f31149e.js';
|
5
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
5
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
6
6
|
import { i as integerSequence } from './Primitives-8fe93caf.js';
|
7
7
|
import { s as saveEnvelopesAsZip } from './utils-c0cd0b91.js';
|
8
8
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-172625c5.js';
|
2
2
|
import { i as interact } from './interact.min-cf83fa88.js';
|
3
3
|
import './Types-5f31149e.js';
|
4
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
5
5
|
import { u as updateField } from './Fields-c82e6df3.js';
|
6
6
|
import { g as getRGBA } from './Colors-1b298092.js';
|
7
7
|
import { g as getFieldSettings } from './utils-c0cd0b91.js';
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-172625c5.js';
|
2
2
|
import { i as interact } from './interact.min-cf83fa88.js';
|
3
3
|
import './Types-5f31149e.js';
|
4
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
4
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
5
5
|
import { u as updateField } from './Fields-c82e6df3.js';
|
6
6
|
import { g as getRGBA } from './Colors-1b298092.js';
|
7
7
|
import { g as getFieldSettings } from './utils-c0cd0b91.js';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-172625c5.js';
|
2
2
|
import './Types-5f31149e.js';
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-d58d5544.js';
|
4
4
|
import { u as unicodeNBSP } from './Icons-c29eb0fa.js';
|
5
5
|
|
6
6
|
const verdocsFileChooserCss = "verdocs-file-chooser{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-file-chooser .upload-box{text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;padding:40px 15px;color:rgba(0, 0, 0, 0.54)}verdocs-file-chooser .upload-box svg{width:64px;height:64px;fill:#5c6575}verdocs-file-chooser .selected-filename{font-size:20px;font-weight:bold;overflow-wrap:anywhere}verdocs-file-chooser .or-prefer{height:20px;margin:20px 0;font-size:16px}";
|