@verdocs/web-sdk 1.11.11 → 1.12.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/verdocs-contact-picker.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-attachment.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +3 -3
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-create_2.cjs.entry.js +2 -7
- package/dist/cjs/verdocs-template-properties.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-roles.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +2 -2
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.js +4 -4
- package/dist/collection/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.js +3 -3
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.js +4 -4
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.js +4 -4
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.js +5 -5
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.js +3 -3
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.js +4 -4
- package/dist/collection/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.js +3 -3
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.js +4 -4
- package/dist/collection/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.js +4 -6
- package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.js +4 -4
- package/dist/collection/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.js +2 -2
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.js +4 -4
- package/dist/collection/components/fields/verdocs-field-attachment/verdocs-field-attachment.js +1 -1
- package/dist/collection/components/fields/verdocs-field-initial/verdocs-field-initial.js +4 -4
- package/dist/collection/components/fields/verdocs-field-signature/verdocs-field-signature.js +1 -1
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.js +4 -21
- package/dist/collection/components/templates/verdocs-template-create/verdocs-template-create.stories.js +2 -2
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.js +0 -35
- package/dist/collection/components/templates/verdocs-template-fields/verdocs-template-fields.stories.js +3 -6
- package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.js +4 -4
- package/dist/collection/components/templates/verdocs-template-properties/verdocs-template-properties.stories.js +2 -2
- package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.js +4 -4
- package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.stories.js +2 -2
- package/dist/components/index.d.ts +1 -1
- package/dist/components/verdocs-contact-picker2.js +2 -2
- package/dist/components/verdocs-field-attachment.js +1 -1
- package/dist/components/verdocs-field-initial.js +2 -2
- package/dist/components/verdocs-field-signature.js +1 -1
- package/dist/components/verdocs-initial-dialog2.js +2 -2
- package/dist/components/verdocs-kba-dialog.js +2 -2
- package/dist/components/verdocs-ok-dialog2.js +3 -3
- package/dist/components/verdocs-send.js +2 -2
- package/dist/components/verdocs-signature-dialog2.js +2 -2
- package/dist/components/verdocs-template-create2.js +2 -5
- package/dist/components/verdocs-template-fields2.js +0 -2
- package/dist/components/verdocs-template-properties.js +2 -2
- package/dist/components/verdocs-template-roles.js +2 -2
- package/dist/components/verdocs-upload-dialog2.js +2 -2
- package/dist/docs.json +28 -55
- package/dist/esm/verdocs-contact-picker.entry.js +2 -2
- package/dist/esm/verdocs-field-attachment.entry.js +1 -1
- package/dist/esm/verdocs-field-initial.entry.js +2 -2
- package/dist/esm/verdocs-field-signature.entry.js +1 -1
- package/dist/esm/verdocs-initial-dialog.entry.js +2 -2
- package/dist/esm/verdocs-kba-dialog.entry.js +2 -2
- package/dist/esm/verdocs-ok-dialog.entry.js +3 -3
- package/dist/esm/verdocs-send.entry.js +2 -2
- package/dist/esm/verdocs-signature-dialog.entry.js +2 -2
- package/dist/esm/verdocs-template-create_2.entry.js +2 -7
- package/dist/esm/verdocs-template-properties.entry.js +2 -2
- package/dist/esm/verdocs-template-roles.entry.js +2 -2
- package/dist/esm/verdocs-upload-dialog.entry.js +2 -2
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-attachment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-properties.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-roles.entry.js +1 -1
- package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
- package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-initial-dialog/verdocs-initial-dialog.stories.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.stories.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.stories.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.d.ts +2 -2
- package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.d.ts +2 -2
- package/dist/types/components/elements/verdocs-contact-picker/verdocs-contact-picker.d.ts +2 -2
- package/dist/types/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.d.ts +2 -2
- package/dist/types/components/embeds/verdocs-send/verdocs-send.d.ts +2 -2
- package/dist/types/components/fields/verdocs-field-initial/verdocs-field-initial.d.ts +2 -2
- package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.d.ts +2 -6
- package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.stories.d.ts +2 -2
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts +0 -8
- package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.stories.d.ts +1 -3
- package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.d.ts +2 -2
- package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.stories.d.ts +2 -2
- package/dist/types/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.d.ts +2 -2
- package/dist/types/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.stories.d.ts +2 -2
- package/dist/types/components.d.ts +24 -36
- package/dist/verdocs-web-sdk/p-04ca7746.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-062bd1d6.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0bb87b59.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-24266b55.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-257d232d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-25c56686.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-30f1611a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3903c3c0.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3bc39719.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7b82f0f2.system.entry.js → p-504d51c9.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-a72e49c5.system.entry.js → p-55610f09.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7b4d7756.system.entry.js → p-5659c4bb.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-607b66bb.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-64841d89.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-70a6176e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-75e8cb42.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-79b5b76f.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7e6d7c07.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-a62755ba.system.entry.js → p-a0fd3c9b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4faa7ff3.system.entry.js → p-a8ff2439.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d0fc924d.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5fa9dd45.system.entry.js → p-da81a310.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-dfe6f5d9.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-7be5af5d.system.entry.js → p-e9f06aab.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-457d3af9.system.entry.js → p-f1863a57.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f75b2973.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fc57a027.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/verdocs-web-sdk/p-0048af58.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0e58db22.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1178d7a5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5342a0bb.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5659eb9b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5737eeb5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5e932394.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-75c744e0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-772ca02c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-99f4242f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a275f3b8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a38a4e2d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a8a3bcb0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a8b3e594.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b154b9b9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b71f26f2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c5be2c0f.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f2ff8d0e.system.entry.js +0 -1
- /package/dist/collection/components/templates/{verdocs-template-recipients → verdocs-template-roles}/verdocs-template-roles.css +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const OkDialog: ({ heading, message, showCancel, onNext,
|
|
4
|
+
export declare const OkDialog: ({ heading, message, showCancel, onNext, onExit }: {
|
|
5
5
|
heading: any;
|
|
6
6
|
message: any;
|
|
7
7
|
showCancel: any;
|
|
8
8
|
onNext: any;
|
|
9
|
-
|
|
9
|
+
onExit: any;
|
|
10
10
|
}) => import("lit-html").TemplateResult<1>;
|
package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.d.ts
CHANGED
|
@@ -15,9 +15,9 @@ export declare class VerdocsSignatureDialog {
|
|
|
15
15
|
*/
|
|
16
16
|
next: EventEmitter<string>;
|
|
17
17
|
/**
|
|
18
|
-
*
|
|
18
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
exit: EventEmitter;
|
|
21
21
|
fontLoaded: boolean;
|
|
22
22
|
enteredName: string;
|
|
23
23
|
mode: string;
|
package/dist/types/components/dialogs/verdocs-signature-dialog/verdocs-signature-dialog.stories.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const SignatureDialog: ({ name, onCancel,
|
|
4
|
+
export declare const SignatureDialog: ({ name, onCancel, onExit }: {
|
|
5
5
|
name: any;
|
|
6
6
|
onCancel: any;
|
|
7
|
-
|
|
7
|
+
onExit: any;
|
|
8
8
|
}) => import("lit-html").TemplateResult<1>;
|
|
@@ -8,9 +8,9 @@ import { FileWithData } from '@verdocs/js-sdk/Utils/Files';
|
|
|
8
8
|
export declare class VerdocsUploadDialog {
|
|
9
9
|
private fileInput?;
|
|
10
10
|
/**
|
|
11
|
-
* Event fired when the
|
|
11
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
exit: EventEmitter;
|
|
14
14
|
/**
|
|
15
15
|
* Event fired when the dialog is closed. The event data will contain the file selected.
|
|
16
16
|
*/
|
package/dist/types/components/dialogs/verdocs-upload-dialog/verdocs-upload-dialog.stories.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const UploadDialog: ({ message, open,
|
|
4
|
+
export declare const UploadDialog: ({ message, open, onExit }: {
|
|
5
5
|
message: any;
|
|
6
6
|
open: any;
|
|
7
|
-
|
|
7
|
+
onExit: any;
|
|
8
8
|
}) => import("lit-html").TemplateResult<1>;
|
|
@@ -56,9 +56,9 @@ export declare class VerdocsContactPicker {
|
|
|
56
56
|
*/
|
|
57
57
|
searchContacts: EventEmitter<IContactSearchEvent>;
|
|
58
58
|
/**
|
|
59
|
-
* Event fired when the
|
|
59
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
exit: EventEmitter;
|
|
62
62
|
/**
|
|
63
63
|
* Event fired when the user changes the type.
|
|
64
64
|
*/
|
package/dist/types/components/elements/verdocs-contact-picker/verdocs-contact-picker.stories.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const ContactPicker: ({ templateRole, contactSuggestions, searchContacts,
|
|
4
|
+
export declare const ContactPicker: ({ templateRole, contactSuggestions, searchContacts, onExit, onNext }: {
|
|
5
5
|
templateRole: any;
|
|
6
6
|
contactSuggestions: any;
|
|
7
7
|
searchContacts: any;
|
|
8
|
-
|
|
8
|
+
onExit: any;
|
|
9
9
|
onNext: any;
|
|
10
10
|
}) => import("lit-html").TemplateResult<1>;
|
|
@@ -29,9 +29,9 @@ export declare class VerdocsSend {
|
|
|
29
29
|
template_id: string;
|
|
30
30
|
}>;
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
33
33
|
*/
|
|
34
|
-
|
|
34
|
+
exit: EventEmitter;
|
|
35
35
|
/**
|
|
36
36
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will
|
|
37
37
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
|
@@ -40,9 +40,9 @@ export declare class VerdocsFieldInitial {
|
|
|
40
40
|
*/
|
|
41
41
|
adopt: EventEmitter<string>;
|
|
42
42
|
/**
|
|
43
|
-
* Event
|
|
43
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
44
44
|
*/
|
|
45
|
-
|
|
45
|
+
exit: EventEmitter;
|
|
46
46
|
/**
|
|
47
47
|
* Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc.
|
|
48
48
|
* It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every
|
package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.d.ts
CHANGED
|
@@ -12,13 +12,9 @@ export declare class VerdocsTemplateCreate {
|
|
|
12
12
|
*/
|
|
13
13
|
endpoint: VerdocsEndpoint;
|
|
14
14
|
/**
|
|
15
|
-
* Event fired when the
|
|
15
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
16
16
|
*/
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Test event for debugging
|
|
20
|
-
*/
|
|
21
|
-
testev: EventEmitter;
|
|
17
|
+
exit: EventEmitter;
|
|
22
18
|
/**
|
|
23
19
|
* Event fired when the user changes the type.
|
|
24
20
|
*/
|
package/dist/types/components/templates/verdocs-template-create/verdocs-template-create.stories.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Create: ({
|
|
5
|
-
|
|
4
|
+
export declare const Create: ({ onExit, onNext }: {
|
|
5
|
+
onExit: any;
|
|
6
6
|
onNext: any;
|
|
7
7
|
}) => import("lit-html").TemplateResult<1>;
|
package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.d.ts
CHANGED
|
@@ -23,14 +23,6 @@ export declare class VerdocsTemplateFields {
|
|
|
23
23
|
* This allows the parent application to more easily control its placement and scroll effects.
|
|
24
24
|
*/
|
|
25
25
|
toolbarTargetId: string | null;
|
|
26
|
-
/**
|
|
27
|
-
* Event fired when the user completes the step.
|
|
28
|
-
*/
|
|
29
|
-
next: EventEmitter<ITemplate>;
|
|
30
|
-
/**
|
|
31
|
-
* Event fired when the user cancels the dialog.
|
|
32
|
-
*/
|
|
33
|
-
cancel: EventEmitter;
|
|
34
26
|
/**
|
|
35
27
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will
|
|
36
28
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
package/dist/types/components/templates/verdocs-template-fields/verdocs-template-fields.stories.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Fields: ({ templateId
|
|
4
|
+
export declare const Fields: ({ templateId }: {
|
|
5
5
|
templateId: any;
|
|
6
|
-
onCancel: any;
|
|
7
|
-
onNext: any;
|
|
8
6
|
}) => import("lit-html").TemplateResult<1>;
|
package/dist/types/components/templates/verdocs-template-properties/verdocs-template-properties.d.ts
CHANGED
|
@@ -15,9 +15,9 @@ export declare class VerdocsTemplateProperties {
|
|
|
15
15
|
*/
|
|
16
16
|
templateId: string;
|
|
17
17
|
/**
|
|
18
|
-
* Event fired when the
|
|
18
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
19
19
|
*/
|
|
20
|
-
|
|
20
|
+
exit: EventEmitter;
|
|
21
21
|
/**
|
|
22
22
|
* Event fired when the user completes the step.
|
|
23
23
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Properties: ({
|
|
5
|
-
|
|
4
|
+
export declare const Properties: ({ onExit, onNext, templateId }: {
|
|
5
|
+
onExit: any;
|
|
6
6
|
onNext: any;
|
|
7
7
|
templateId: any;
|
|
8
8
|
}) => import("lit-html").TemplateResult<1>;
|
|
@@ -20,9 +20,9 @@ export declare class VerdocsTemplateRoles {
|
|
|
20
20
|
*/
|
|
21
21
|
next: EventEmitter;
|
|
22
22
|
/**
|
|
23
|
-
* Event fired when the
|
|
23
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
24
24
|
*/
|
|
25
|
-
|
|
25
|
+
exit: EventEmitter;
|
|
26
26
|
/**
|
|
27
27
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will
|
|
28
28
|
* terminate the process, and the calling application should correct the condition and re-render the component.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Meta } from '@storybook/web-components';
|
|
2
2
|
declare const _default: Meta<import("@storybook/web-components").Args>;
|
|
3
3
|
export default _default;
|
|
4
|
-
export declare const Roles: ({ templateId,
|
|
4
|
+
export declare const Roles: ({ templateId, onExit, onSave }: {
|
|
5
5
|
templateId: any;
|
|
6
|
-
|
|
6
|
+
onExit: any;
|
|
7
7
|
onSave: any;
|
|
8
8
|
}) => import("lit-html").TemplateResult<1>;
|
|
@@ -1652,9 +1652,9 @@ declare namespace LocalJSX {
|
|
|
1652
1652
|
*/
|
|
1653
1653
|
"endpoint"?: VerdocsEndpoint;
|
|
1654
1654
|
/**
|
|
1655
|
-
* Event fired when the
|
|
1655
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
1656
1656
|
*/
|
|
1657
|
-
"
|
|
1657
|
+
"onExit"?: (event: VerdocsContactPickerCustomEvent<any>) => void;
|
|
1658
1658
|
/**
|
|
1659
1659
|
* Event fired when the user changes the type.
|
|
1660
1660
|
*/
|
|
@@ -1871,14 +1871,14 @@ declare namespace LocalJSX {
|
|
|
1871
1871
|
* Event emitted when an initial block is adopted by the user. The event detail will contain the base64 string of the initial image.
|
|
1872
1872
|
*/
|
|
1873
1873
|
"onAdopt"?: (event: VerdocsFieldInitialCustomEvent<string>) => void;
|
|
1874
|
-
/**
|
|
1875
|
-
* Event emitted when the user cancels the process.
|
|
1876
|
-
*/
|
|
1877
|
-
"onCancel"?: (event: VerdocsFieldInitialCustomEvent<any>) => void;
|
|
1878
1874
|
/**
|
|
1879
1875
|
* Event fired when the field is deleted.
|
|
1880
1876
|
*/
|
|
1881
1877
|
"onDeleted"?: (event: VerdocsFieldInitialCustomEvent<{fieldName: string}>) => void;
|
|
1878
|
+
/**
|
|
1879
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
1880
|
+
*/
|
|
1881
|
+
"onExit"?: (event: VerdocsFieldInitialCustomEvent<any>) => void;
|
|
1882
1882
|
/**
|
|
1883
1883
|
* Event fired when the input field value changes. Note that this will only be fired on blur, tab-out, ENTER key press, etc. It is generally the best event to subscribe to than `input` for most cases EXCEPT autocomplete fields that need to see every keypress.
|
|
1884
1884
|
*/
|
|
@@ -2141,9 +2141,9 @@ declare namespace LocalJSX {
|
|
|
2141
2141
|
*/
|
|
2142
2142
|
"initials"?: string;
|
|
2143
2143
|
/**
|
|
2144
|
-
* Event fired when the step is cancelled.
|
|
2144
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2145
2145
|
*/
|
|
2146
|
-
"
|
|
2146
|
+
"onExit"?: (event: VerdocsInitialDialogCustomEvent<any>) => void;
|
|
2147
2147
|
/**
|
|
2148
2148
|
* Event fired when the initials are adopted.
|
|
2149
2149
|
*/
|
|
@@ -2171,9 +2171,9 @@ declare namespace LocalJSX {
|
|
|
2171
2171
|
*/
|
|
2172
2172
|
"mode"?: 'text' | 'choice';
|
|
2173
2173
|
/**
|
|
2174
|
-
* Event fired when the
|
|
2174
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2175
2175
|
*/
|
|
2176
|
-
"
|
|
2176
|
+
"onExit"?: (event: VerdocsKbaDialogCustomEvent<any>) => void;
|
|
2177
2177
|
/**
|
|
2178
2178
|
* Event fired when the dialog is closed. The event data will contain the value selected.
|
|
2179
2179
|
*/
|
|
@@ -2203,9 +2203,9 @@ declare namespace LocalJSX {
|
|
|
2203
2203
|
*/
|
|
2204
2204
|
"message"?: string;
|
|
2205
2205
|
/**
|
|
2206
|
-
* Event fired when the
|
|
2206
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2207
2207
|
*/
|
|
2208
|
-
"
|
|
2208
|
+
"onExit"?: (event: VerdocsOkDialogCustomEvent<any>) => void;
|
|
2209
2209
|
/**
|
|
2210
2210
|
* Event fired when the user clicks the OK button.
|
|
2211
2211
|
*/
|
|
@@ -2345,9 +2345,9 @@ declare namespace LocalJSX {
|
|
|
2345
2345
|
*/
|
|
2346
2346
|
"endpoint"?: VerdocsEndpoint;
|
|
2347
2347
|
/**
|
|
2348
|
-
*
|
|
2348
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2349
2349
|
*/
|
|
2350
|
-
"
|
|
2350
|
+
"onExit"?: (event: VerdocsSendCustomEvent<any>) => void;
|
|
2351
2351
|
/**
|
|
2352
2352
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will terminate the process, and the calling application should correct the condition and re-render the component.
|
|
2353
2353
|
*/
|
|
@@ -2393,9 +2393,9 @@ declare namespace LocalJSX {
|
|
|
2393
2393
|
*/
|
|
2394
2394
|
"name"?: string;
|
|
2395
2395
|
/**
|
|
2396
|
-
*
|
|
2396
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2397
2397
|
*/
|
|
2398
|
-
"
|
|
2398
|
+
"onExit"?: (event: VerdocsSignatureDialogCustomEvent<any>) => void;
|
|
2399
2399
|
/**
|
|
2400
2400
|
* Fired when the user completes the dialog and clicks Adopt. The event detail will contain a base64-encoded string representation of the signature adopted.
|
|
2401
2401
|
*/
|
|
@@ -2449,9 +2449,9 @@ declare namespace LocalJSX {
|
|
|
2449
2449
|
*/
|
|
2450
2450
|
"endpoint"?: VerdocsEndpoint;
|
|
2451
2451
|
/**
|
|
2452
|
-
* Event fired when the
|
|
2452
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2453
2453
|
*/
|
|
2454
|
-
"
|
|
2454
|
+
"onExit"?: (event: VerdocsTemplateCreateCustomEvent<any>) => void;
|
|
2455
2455
|
/**
|
|
2456
2456
|
* Event fired when the user changes the type.
|
|
2457
2457
|
*/
|
|
@@ -2460,10 +2460,6 @@ declare namespace LocalJSX {
|
|
|
2460
2460
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will terminate the process, and the calling application should correct the condition and re-render the component.
|
|
2461
2461
|
*/
|
|
2462
2462
|
"onSdkError"?: (event: VerdocsTemplateCreateCustomEvent<SDKError>) => void;
|
|
2463
|
-
/**
|
|
2464
|
-
* Test event for debugging
|
|
2465
|
-
*/
|
|
2466
|
-
"onTestev"?: (event: VerdocsTemplateCreateCustomEvent<any>) => void;
|
|
2467
2463
|
}
|
|
2468
2464
|
interface VerdocsTemplateDocumentPage {
|
|
2469
2465
|
/**
|
|
@@ -2534,14 +2530,6 @@ declare namespace LocalJSX {
|
|
|
2534
2530
|
* The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
|
|
2535
2531
|
*/
|
|
2536
2532
|
"endpoint"?: VerdocsEndpoint;
|
|
2537
|
-
/**
|
|
2538
|
-
* Event fired when the user cancels the dialog.
|
|
2539
|
-
*/
|
|
2540
|
-
"onCancel"?: (event: VerdocsTemplateFieldsCustomEvent<any>) => void;
|
|
2541
|
-
/**
|
|
2542
|
-
* Event fired when the user completes the step.
|
|
2543
|
-
*/
|
|
2544
|
-
"onNext"?: (event: VerdocsTemplateFieldsCustomEvent<ITemplate>) => void;
|
|
2545
2533
|
/**
|
|
2546
2534
|
* Event fired if an error occurs. The event details will contain information about the error. Most errors will terminate the process, and the calling application should correct the condition and re-render the component.
|
|
2547
2535
|
*/
|
|
@@ -2583,9 +2571,9 @@ declare namespace LocalJSX {
|
|
|
2583
2571
|
*/
|
|
2584
2572
|
"endpoint"?: VerdocsEndpoint;
|
|
2585
2573
|
/**
|
|
2586
|
-
* Event fired when the
|
|
2574
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2587
2575
|
*/
|
|
2588
|
-
"
|
|
2576
|
+
"onExit"?: (event: VerdocsTemplatePropertiesCustomEvent<any>) => void;
|
|
2589
2577
|
/**
|
|
2590
2578
|
* Event fired when the user completes the step.
|
|
2591
2579
|
*/
|
|
@@ -2653,9 +2641,9 @@ declare namespace LocalJSX {
|
|
|
2653
2641
|
*/
|
|
2654
2642
|
"endpoint"?: VerdocsEndpoint;
|
|
2655
2643
|
/**
|
|
2656
|
-
* Event fired when the
|
|
2644
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2657
2645
|
*/
|
|
2658
|
-
"
|
|
2646
|
+
"onExit"?: (event: VerdocsTemplateRolesCustomEvent<any>) => void;
|
|
2659
2647
|
/**
|
|
2660
2648
|
* Event fired when the user clicks to proceed.
|
|
2661
2649
|
*/
|
|
@@ -2794,9 +2782,9 @@ declare namespace LocalJSX {
|
|
|
2794
2782
|
}
|
|
2795
2783
|
interface VerdocsUploadDialog {
|
|
2796
2784
|
/**
|
|
2797
|
-
* Event fired when the
|
|
2785
|
+
* Event fired when the step is cancelled. This is called exit to avoid conflicts with the JS-reserved "cancel" event name.
|
|
2798
2786
|
*/
|
|
2799
|
-
"
|
|
2787
|
+
"onExit"?: (event: VerdocsUploadDialogCustomEvent<any>) => void;
|
|
2800
2788
|
/**
|
|
2801
2789
|
* Event fired when the dialog is closed. The event data will contain the file selected.
|
|
2802
2790
|
*/
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as i,h as o,F as s,H as l}from"./p-7239d28d.js";const t=class{constructor(o){e(this,o),this.exit=i(this,"exit",7),this.next=i(this,"next",7),this.step=1,this.steps=3,this.helptitle="One Time Code",this.helptext="Please check your text messages for a security code, and enter the code below.",this.mode="choice",this.label="PIN",this.placeholder="Enter your PIN...",this.choices=["553 Arbor Dr","18 Lacey Ln","23A Ball Ct","2375 Cavallo Blvd","23-1 RR-7","151 Boulder Rd"],this.response=""}handleCancel(){this.exit.emit()}handleDismiss(e){"background-overlay"===e.target.className&&(e.preventDefault(),this.handleCancel())}handleDone(){this.next.emit(this.response)}render(){return o(l,null,o("div",{class:"background-overlay",onClick:e=>this.handleDismiss(e)},o("div",{class:"dialog"},o("div",{class:"heading"},"Confirm Your Identity",this.steps>1?o("span",{class:"step"},"(",this.step,"/",this.steps,")"):o(s,null)),o("div",{class:"help-box"},o("div",{class:"help-icon",innerHTML:'<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M20 0C8.95313 0 0 8.95313 0 20C0 31.0469 8.95313 40 20 40C31.0469 40 40 31.0469 40 20C40 8.95313 31.0469 0 20 0ZM20 36.25C11.0391 36.25 3.75 28.9602 3.75 20C3.75 11.0398 11.0391 3.75 20 3.75C28.9609 3.75 36.25 11.0398 36.25 20C36.25 28.9602 28.9609 36.25 20 36.25Z" fill="white"/><path d="M20 26.25C18.5938 26.25 17.5 27.3438 17.5 28.75C17.5 30.1562 18.5234 31.25 20 31.25C21.3359 31.25 22.5 30.1562 22.5 28.75C22.5 27.3438 21.3359 26.25 20 26.25ZM22.5859 10H18.5938C15.5469 10 13.125 12.4219 13.125 15.4688C13.125 16.4844 13.9844 17.3438 15 17.3438C16.0156 17.3438 16.875 16.4844 16.875 15.4688C16.875 14.5312 17.5859 13.75 18.5234 13.75H22.5156C23.5234 13.75 24.375 14.5312 24.375 15.4688C24.375 16.0938 24.0625 16.5703 23.5156 16.8828L19.0625 19.6094C18.4375 20 18.125 20.625 18.125 21.25V22.5C18.125 23.5156 18.9844 24.375 20 24.375C21.0156 24.375 21.875 23.5156 21.875 22.5V22.3438L25.3984 20.1562C27.0391 19.1406 28.0547 17.3438 28.0547 15.4688C28.125 12.4219 25.7031 10 22.5859 10Z" fill="#E7E7E7"/></svg>'}),o("div",{class:"help-details"},o("div",{class:"help-title"},this.helptitle),o("div",{class:"help-text"},this.helptext))),"choice"===this.mode?o("div",{class:"choices"},this.choices.map((e=>o("div",{class:"choice "+(e===this.response?"selected":""),onClick:()=>{this.response=e}},e)))):o("div",{class:"input"},o("label",{htmlFor:"verdocs-kba-input"},this.label),o("input",{type:"text",id:"verdocs-kba-input",name:"verdocs-kba-input",placeholder:this.placeholder})),o("div",{class:"buttons"},o("verdocs-button",{label:"Cancel",variant:"outline",onClick:()=>this.handleCancel()}),o("verdocs-button",{label:"Done",onClick:()=>this.handleDone(),disabled:!this.response})))))}};t.style='verdocs-kba-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:14px 0;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}';export{t as verdocs_kba_dialog}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as o,H as i}from"./p-7239d28d.js";import{g as s}from"./p-b28ef4bb.js";import{V as r}from"./p-4e49fb12.js";import{S as l}from"./p-7a1b2643.js";import{s as a}from"./p-a8b01bb9.js";import"./p-21603661.js";import"./p-8b2040be.js";import"./p-7291906c.js";const p=class{constructor(o){e(this,o),this.exit=t(this,"exit",7),this.next=t(this,"next",7),this.sdkError=t(this,"sdkError",7),this.endpoint=r.getDefault(),this.templateId="",this.template=null,this.name="",this.visibility="",this.sendReminders=!1,this.firstReminderDays="1",this.reminderDays="1"}async componentWillLoad(){var e,t,o;try{this.endpoint.loadSession(),console.log(`[PROPERTIES] Loading template ${this.templateId}`);const e=await s(this.endpoint,this.templateId);if(!e)return void console.log("[PREVIEW] Unable to load template");console.log("[PROPERTIES] Got template",e),this.template=e,a.template=e,this.name=e.name,this.sendReminders=null!==e.reminder_id}catch(i){console.log("[PROPERTIES] Error loading template",i),null===(e=this.sdkError)||void 0===e||e.emit(new l(i.message,null===(t=i.response)||void 0===t?void 0:t.status,null===(o=i.response)||void 0===o?void 0:o.data))}}handleCancel(e){var t;e.stopPropagation(),null===(t=this.exit)||void 0===t||t.emit()}handleSubmit(e){var t;e.stopPropagation(),null===(t=this.next)||void 0===t||t.emit({name:this.name,firstReminderDays:+this.firstReminderDays,reminderDays:+this.reminderDays,sendReminders:this.sendReminders})}render(){return this.endpoint.session?o("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off"},o("h5",null,"Template Name"),o("fieldset",null,o("verdocs-text-input",{value:this.name,autocomplete:"off",onInput:e=>this.name=e.target.value})),o("h5",null,"Reminders"),o("fieldset",null,o("div",{class:"input-row"},o("label",null,"Send Automatic Reminders"),o("verdocs-checkbox",{name:"automatic-reminders",checked:this.sendReminders,value:"on",onInput:e=>this.sendReminders=e.target.checked})),o("div",{class:"input-row"},o("label",null,"Days Before First Reminder"),o("verdocs-text-input",{value:this.firstReminderDays,onInput:e=>this.firstReminderDays=e.target.value})),o("div",{class:"input-row"},o("label",null,"Days Between Reminders"),o("verdocs-text-input",{value:this.reminderDays,onInput:e=>this.reminderDays=e.target.value}))),o("h5",null,"Template Visibility"),o("fieldset",null,o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"private",onChange:()=>this.visibility="private"}),o("label",{htmlFor:"verdocs-radio-button-visibility-private"},o("div",{class:"title"},"Private"),o("div",{class:"description"},"Only you can share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared",onChange:()=>this.visibility="shared"}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared"},o("div",{class:"title"},"Shared to your organization"),o("div",{class:"description"},"Give access to your organization to share and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:!0,value:"shared_public",onChange:()=>this.visibility="shared_public"}),o("label",{htmlFor:"verdocs-radio-button-visibility-shared_public"},o("div",{class:"title"},"Shared to your organization and Public"),o("div",{class:"description"},"Give access to your organization to share this template, and anyone on the Web can find and use this template"))),o("div",{class:"radio-row"},o("verdocs-radio-button",{name:"visibility",checked:"public"===this.visibility,value:"public",onChange:()=>this.visibility="public"}),o("label",{htmlFor:"verdocs-radio-button-visibility-public"},o("div",{class:"title"},"Public"),o("div",{class:"description"},"Anyone on the Web can find and use this template")))),o("div",{class:"buttons"},o("div",{class:"flex-fill"}),o("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),o("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e)}))):o(i,null,o("verdocs-component-error",{message:"You must be authenticated to use this module."}))}};p.style='verdocs-template-properties{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-properties form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form h5{font-size:14px;font-weight:400;margin:0 0 6px 0}verdocs-template-properties form .row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form fieldset{width:440px;border:none;max-width:100%;margin:0 0 20px 0;-webkit-box-sizing:border-box;box-sizing:border-box;padding:20px 20px 10px 20px;background-color:#ffffff;-webkit-box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14);box-shadow:0 1px 3px 0 rgba(0, 0, 0, 0.2), 0 2px 2px 0 rgba(0, 0, 0, 0.12), 0 0 2px 0 rgba(0, 0, 0, 0.14)}verdocs-template-properties form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-properties form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-properties form input:focus{outline:none}verdocs-template-properties form .input-row{display:-ms-flexbox;display:flex;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .input-row label{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex}verdocs-template-properties form .input-row verdocs-text-input{margin:0;display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px}verdocs-template-properties form .input-row verdocs-text-input input{text-align:center}verdocs-template-properties form .input-row verdocs-checkbox{display:-ms-flexbox;display:flex;-ms-flex:0 0 40px;flex:0 0 40px;-ms-flex-pack:center;justify-content:center}verdocs-template-properties form .radio-row{display:-ms-flexbox;display:flex;position:relative;margin:0 0 10px 0;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties form .radio-row verdocs-radio-button{display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px}verdocs-template-properties form .radio-row label{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-properties form .radio-row label .title{font-size:16px;font-weight:500}verdocs-template-properties form .radio-row label .description{font-size:14px;font-weight:400}verdocs-template-properties .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-properties .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-properties ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-moz-placeholder{color:#aaaaaa}verdocs-template-properties :-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-properties ::placeholder{color:#aaaaaa}';export{p as verdocs_template_properties}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as o,h as t,H as s,F as r,a as l}from"./p-7239d28d.js";import{i}from"./p-642b2f86.js";import{u as a,c as n}from"./p-8027431e.js";import{V as d,T as p}from"./p-4e49fb12.js";import{g as c}from"./p-6de76553.js";import{s as m}from"./p-a8b01bb9.js";import{l as h}from"./p-35c46590.js";import{a as v}from"./p-44930c58.js";import{S as f}from"./p-7a1b2643.js";import"./p-21603661.js";import"./p-8b2040be.js";import"./p-7291906c.js";import"./p-b28ef4bb.js";import"./p-388b771c.js";import"./p-aa124212.js";import"./p-ab01f71e.js";const x={[p.EVERYONE]:"Everyone",[p.EVERYONE_AS_CREATOR]:"Everyone as Me",[p.ORGANIZATION_MEMBER]:"Organization member",[p.ORGANIZATION_MEMBER_AS_CREATOR]:"Organization Member as Me",[p.CREATOR]:"Me"},g='<svg xmlns="http://www.w3.org/2000/svg" height="20" width="20" fill="#00000089"><path d="m8.021 17.917-.313-2.5q-.27-.125-.625-.334-.354-.208-.625-.395l-2.312.979-1.979-3.438 1.979-1.5q-.021-.167-.031-.364-.011-.198-.011-.365 0-.146.011-.344.01-.198.031-.385l-1.979-1.5 1.979-3.417 2.312.958q.271-.187.615-.385t.635-.344l.313-2.5h3.958l.313 2.5q.312.167.625.344.312.177.604.385l2.333-.958 1.979 3.417-1.979 1.521q.021.187.021.364V10q0 .146-.01.333-.011.188-.011.396l1.958 1.5-1.979 3.438-2.312-.979q-.292.208-.615.395-.323.188-.614.334l-.313 2.5Zm1.937-5.355q1.063 0 1.813-.75t.75-1.812q0-1.062-.75-1.812t-1.813-.75q-1.041 0-1.802.75-.76.75-.76 1.812t.76 1.812q.761.75 1.802.75Zm0-1.333q-.5 0-.864-.364-.365-.365-.365-.865t.365-.865q.364-.364.864-.364t.865.364q.365.365.365.865t-.365.865q-.365.364-.865.364ZM10.021 10Zm-.854 6.583h1.666l.25-2.187q.605-.167 1.136-.49.531-.323 1.031-.802l2.021.875.854-1.375-1.792-1.354q.105-.333.136-.635.031-.303.031-.615 0-.292-.031-.573-.031-.281-.115-.635l1.792-1.396-.834-1.375-2.062.875q-.438-.438-1.021-.781-.583-.344-1.125-.49l-.271-2.208H9.167l-.271 2.208q-.584.146-1.125.458-.542.313-1.042.792l-2.021-.854-.833 1.375 1.75 1.354q-.083.333-.125.646-.042.312-.042.604t.042.594q.042.302.125.635l-1.75 1.375.833 1.375 2.021-.854q.479.458 1.021.771.542.312 1.146.479Z"/></svg>',u='<svg xmlns="http://www.w3.org/2000/svg" fill="#ffffff" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor"><path strokeLinecap="round" strokeLinejoin="round" d="M12 9v6m3-3H9m12 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>',b=class{constructor(t){e(this,t),this.next=o(this,"next",7),this.exit=o(this,"exit",7),this.sdkError=o(this,"sdkError",7),this.templateUpdated=o(this,"templateUpdated",7),this.sequences=[],this.endpoint=d.getDefault(),this.templateId="",this.showingRoleDialog=null,this.showingSenderDialog=!1,this.sender=null,this.forceRerender=1}async componentWillLoad(){var e,o,t,s,r,l;try{if(this.endpoint.loadSession(),!this.templateId)return void console.log(`[ROLES] Missing required template ID ${this.templateId}`);if(!this.endpoint.session)return void console.log("[ROLES] Unable to start builder session, must be authenticated");try{console.log(`[ROLES] Loading template ${this.templateId}`,this.endpoint.session),await h(this.endpoint,this.templateId,!0)}catch(s){console.log("[ROLES] Error loading template",s),null===(e=this.sdkError)||void 0===e||e.emit(new f(s.message,null===(o=s.response)||void 0===o?void 0:o.status,null===(t=s.response)||void 0===t?void 0:t.data))}this.sortTemplateRoles(),this.renumberTemplateRoles()}catch(e){console.log("[FIELDS] Error with preview session",e),null===(s=this.sdkError)||void 0===s||s.emit(new f(e.message,null===(r=e.response)||void 0===r?void 0:r.status,null===(l=e.response)||void 0===l?void 0:l.data))}}componentDidRender(){i.dynamicDrop(!0),i(".recipient").draggable({listeners:{start:function(e){e.target.classList.add("dragging"),this.el.classList.add("dragging")}.bind(this),move:function(e){const o=+(e.target.getAttribute("posX")||0),t=+(e.target.getAttribute("posY")||0),s=e.dx+o,r=e.dy+t;e.target.setAttribute("posX",s),e.target.setAttribute("posy",r),e.target.style.transform=`translate(${s+100}px, ${r-40}px)`}.bind(this),end:function(e){e.target.classList.remove("dragging"),this.el.classList.remove("dragging"),e.target.setAttribute("posX",0),e.target.setAttribute("posy",0),e.target.style.transform="translate(0px, 0px)"}.bind(this)}}),i(".dropzone").dropzone({overlap:.05,ondrop:function(e){var o,t;e.target.classList.remove("active");const s=e.relatedTarget.dataset.rolename,r=+e.target.dataset.sequence,l=+e.target.dataset.order,i=null===(o=m.template)||void 0===o?void 0:o.roles.find((e=>e.name===s));i&&(i.sequence=r,i.order=l,this.sortTemplateRoles(),this.renumberTemplateRoles(),this.forceRerender++,Promise.all(null===(t=m.template)||void 0===t?void 0:t.roles.map((e=>a(this.endpoint,this.templateId,e.name,{sequence:e.sequence,order:e.order})))).then((()=>console.log("[ROLES] Updated roles"))).catch((e=>console.log("[ROLES] Role updates failed",e))))}.bind(this),ondropactivate:e=>{e.target.classList.add("visible")},ondropdeactivate:e=>{e.target.classList.remove("visible")},ondragenter:e=>{e.target.classList.add("active")},ondragleave:e=>{e.target.classList.remove("active")}})}handleCancel(e){var o;e.stopPropagation(),null===(o=this.exit)||void 0===o||o.emit()}handleSubmit(e){var o;e.stopPropagation(),null===(o=this.next)||void 0===o||o.emit()}sortTemplateRoles(){var e;null===(e=m.template)||void 0===e||e.roles.sort(((e,o)=>e.sequence===o.sequence?e.order-o.order:e.sequence-o.sequence))}extractSequenceNumbers(){var e;this.sequences=[],null===(e=m.template)||void 0===e||e.roles.forEach((e=>{this.sequences.includes(e.sequence)||this.sequences.push(e.sequence)}))}renumberTemplateRoles(){this.extractSequenceNumbers();const e=[];this.sequences.sort(((e,o)=>e-o)),this.sequences.forEach(((o,t)=>{var s;null===(s=m.template)||void 0===s||s.roles.filter((e=>e.sequence===o)).forEach(((o,s)=>{e.includes(o.name)||(o.sequence=t+1,o.order=s+1,e.push(o.name))}))})),this.extractSequenceNumbers()}getNextRoleName(){var e,o;let t="",s=null===(e=m.template)||void 0===e?void 0:e.roles.length;do{s++,t=`Recipient ${s}`}while(!t||(null===(o=m.template)||void 0===o?void 0:o.roles.some((e=>e.name===t))));return t}handleAddRole(e,o){e.stopPropagation();const t=m.template.roles.filter((e=>e.sequence===o)).length+1,s=this.getNextRoleName();console.log("Will create",s,o,t),n(this.endpoint,this.templateId,{template_id:this.templateId,name:s,full_name:"",email:"",phone:"",sequence:o,order:t,type:"signer",delegator:!1}).then((e=>{console.log("Created role",e),m.template.roles.push(e),this.renumberTemplateRoles(),this.forceRerender++})).catch((e=>{console.log("Error creating role",e)}))}handleAddStep(e,o){e.stopPropagation();const t=this.getNextRoleName();console.log("Will create",t,o,1),n(this.endpoint,this.templateId,{template_id:this.templateId,name:t,full_name:"",email:"",phone:"",sequence:o,order:1,type:"signer",delegator:!1}).then((e=>{console.log("Created role",e),m.template.roles.push(e),this.renumberTemplateRoles(),this.forceRerender++})).catch((e=>{console.log("Error creating role",e)}))}render(){var e;if(!this.endpoint.session)return t(s,null,t("verdocs-component-error",{message:"You must be authenticated to use this module."}));if(m.loading||!m.template)return t(s,null,t("verdocs-loader",null));const o=((null===(e=m.template)||void 0===e?void 0:e.roles)||[]).map((e=>e.name));return t(s,null,t("form",{onSubmit:e=>e.preventDefault(),onClick:e=>e.stopPropagation(),autocomplete:"off","data-r":this.forceRerender},t("h5",null,"Roles"),t("div",{class:"participants"},t("div",{class:"left-line"}),t("div",{class:"row"},t("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M2 12C2 6.48 6.48 2 12 2s10 4.48 10 10-4.48 10-10 10S2 17.52 2 12zm10 6c3.31 0 6-2.69 6-6s-2.69-6-6-6-6 2.69-6 6 2.69 6 6 6z"></path></svg>'}),t("div",{class:"row-roles"},t("div",{class:"sender"},t("span",{class:"label"},"Sender:")," ",x[m.template.sender]," ",t("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingSenderDialog=!0,"aria-role":"button"})))),t("div",{class:"row add-sequence","data-sequence":0},t("div",{class:"icon",innerHTML:u}),t("div",{class:"row-roles"},t("div",{class:"dropzone","data-sequence":0,"data-order":1},"Add Step"))),this.sequences.map((e=>t(r,null,t("div",{class:"row"},t("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z"></path></svg>'}),t("div",{class:"row-roles"},t("div",{class:"dropzone","data-order":.5,"data-sequence":e}),m.template.roles.filter((o=>o.sequence===e)).map((s=>t(r,null,t("div",{class:"recipient",style:{backgroundColor:c(v(o,s.name))},"data-rolename":s.name},t("span",{class:"type-icon",innerHTML:"signer"===s.type?'<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>':"cc"===s.type?'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><path d="M1.5 8.67v8.58a3 3 0 003 3h15a3 3 0 003-3V8.67l-8.928 5.493a3 3 0 01-3.144 0L1.5 8.67z" /><path d="M22.5 6.908V6.75a3 3 0 00-3-3h-15a3 3 0 00-3 3v.158l9.714 5.978a1.5 1.5 0 001.572 0L22.5 6.908z" /></svg>':'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor"><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>'}),s.name," ",t("div",{class:"settings-button",innerHTML:g,onClick:()=>this.showingRoleDialog=s.name,"aria-role":"button"})),t("div",{class:"dropzone","data-order":s.order+.5,"data-sequence":e})))),t("button",{class:"add-role",innerHTML:u,onClick:o=>this.handleAddRole(o,e)}))),this.sequences.length>0&&t("div",{class:"row add-sequence","data-sequence":e},t("div",{class:"row-roles"},t("div",{class:"icon",innerHTML:u}),t("div",{class:"dropzone","data-sequence":e+1,"data-order":1},"Add Step")))))),t("div",{class:"row","data-sequence":this.sequences.length+1},t("div",{class:"row-roles"},t("div",{class:"icon",innerHTML:u}),t("button",{class:"add-step",innerHTML:u,onClick:e=>this.handleAddStep(e,this.sequences.length+1)}))),t("div",{class:"row"},t("div",{class:"icon",innerHTML:'<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" fill="#00000089"><path d="m18 7-1.41-1.41-6.34 6.34 1.41 1.41L18 7zm4.24-1.41L11.66 16.17 7.48 12l-1.41 1.41L11.66 19l12-12-1.42-1.41zM.41 13.41 6 19l1.41-1.41L1.83 12 .41 13.41z"></path></svg>'}),t("div",{class:"row-roles"},t("div",{class:"complete"},"Document Complete")))),o.length<1&&t("div",{class:"empty"},"You must add at least one Role before proceeding.",t("br",null)," Click the ",t("span",{innerHTML:u})," Add button above to get started."),t("div",{class:"buttons"},t("div",{class:"flex-fill"}),t("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:e=>this.handleCancel(e)}),t("verdocs-button",{label:"OK",size:"small",onClick:e=>this.handleSubmit(e),disabled:o.length<1}))),this.showingRoleDialog&&t("verdocs-template-role-properties",{endpoint:this.endpoint,templateId:this.templateId,roleName:this.showingRoleDialog,onClose:()=>{this.showingRoleDialog=null,this.forceRerender++},onDelete:e=>{console.log("deleted",e.detail),this.renumberTemplateRoles(),this.showingRoleDialog=null,this.forceRerender++}}),this.showingSenderDialog&&t("verdocs-template-sender",{endpoint:this.endpoint,templateId:this.templateId,onClose:()=>this.showingSenderDialog=!1}))}get el(){return l(this)}};b.style='verdocs-template-roles{display:block;min-width:400px;font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-roles>form{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;background-color:#ffffff;padding:12px}verdocs-template-roles>form h5{font-size:16px;font-weight:bold;color:#4c56cb;margin:0 0 10px 0}verdocs-template-roles>form .participants{position:relative}verdocs-template-roles>form .left-line{top:32px;left:11px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-template-roles>form .row{display:-ms-flexbox;display:flex;-webkit-column-gap:0;-moz-column-gap:0;column-gap:0;min-height:35px;margin-left:40px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:6px 0 4px 0}verdocs-template-roles>form .row .row-roles{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles>form .row .icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-template-roles>form .row .sender{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 5px 0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;border:1px solid #c6c9cc;background-color:#f5f5fa}verdocs-template-roles>form .row .complete{height:30px;display:-ms-flexbox;display:flex;font-size:14px;padding:0 15px;line-height:30px;-ms-flex-direction:row;flex-direction:row;border-radius:30px;background-color:#f5f5fa;border:1px solid #aeb4bf}verdocs-template-roles>form .row .label{font-weight:bold;margin-right:6px;color:#33364b}verdocs-template-roles>form .row .settings-button{margin:0 0 0 9px;cursor:pointer}verdocs-template-roles>form .row .recipient{height:30px;display:-ms-flexbox;display:flex;font-size:14px;border-radius:30px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:0 5px 0 6px;white-space:nowrap;border:1px solid #aeb4bf}verdocs-template-roles>form .row .recipient .type-icon{width:24px;height:24px;-webkit-transform:scale(0.8);transform:scale(0.8);opacity:0.6;margin:0 12px 0 0}verdocs-template-roles>form .row .recipient.dragging{position:absolute}verdocs-template-roles>form .row .recipient.dragging+.dropzone{display:none !important}verdocs-template-roles>form .row .dropzone{width:14px;height:30px;display:none}verdocs-template-roles>form .row .dropzone svg{fill:#cccccc}verdocs-template-roles>form .row .dropzone.visible{margin:0 7px;display:-ms-flexbox;display:flex;-ms-flex:0 0 14px;flex:0 0 14px}verdocs-template-roles>form .row .dropzone.active{-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;background:#654dcb7f;border:1px dashed #654dcb}verdocs-template-roles>form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-template-roles>form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-template-roles>form input:focus{outline:none}verdocs-template-roles .row.add-sequence{display:none}verdocs-template-roles .add-role{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-role:hover{opacity:1}verdocs-template-roles .add-role svg{width:32px;height:32px}verdocs-template-roles .add-step{margin:0;padding:0;border:none;opacity:0.5;cursor:pointer;background:none}verdocs-template-roles .add-step:hover{opacity:1}verdocs-template-roles .add-step svg{width:32px;height:32px}verdocs-template-roles.dragging .add-role{display:none}verdocs-template-roles.dragging form .row .recipient+.dropzone{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence{display:-ms-flexbox;display:flex}verdocs-template-roles.dragging .row.add-sequence .dropzone{opacity:0.5;-ms-flex:0 0 120px;flex:0 0 120px;border-radius:30px;-ms-flex-align:center;align-items:center;background:#654dcb7f;-ms-flex-pack:center;justify-content:center;border:1px dashed #654dcb}verdocs-template-roles.dragging .row.add-sequence .dropzone.active{opacity:1}verdocs-template-roles .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-template-roles .empty{font-size:13px;margin-top:15px;margin-bottom:5px}verdocs-template-roles .empty svg{width:20px;height:20px;stroke:#666666;margin-bottom:-5px}verdocs-template-roles ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-moz-placeholder{color:#aaaaaa}verdocs-template-roles :-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-roles ::placeholder{color:#aaaaaa}';export{b as verdocs_template_roles}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as s,h as e,H as i}from"./p-7239d28d.js";import{g as o}from"./p-6de76553.js";import{s as n}from"./p-a8b01bb9.js";import"./p-8b2040be.js";import"./p-7291906c.js";const r=class{constructor(e){t(this,e),this.settingsChanged=s(this,"settingsChanged",7),this.field=null,this.disabled=!1,this.roleIndex=0}async focusField(){this.handleShow()}handleShow(){this.dialog=document.createElement("verdocs-upload-dialog"),this.dialog.open=!0,this.dialog.addEventListener("exit",(()=>{var t;return null===(t=this.dialog)||void 0===t?void 0:t.remove()})),document.addEventListener("done",(()=>{var t;return null===(t=this.dialog)||void 0===t?void 0:t.remove()})),document.body.append(this.dialog)}async showSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.showPanel&&t.showPanel()}async hideSettingsPanel(){const t=document.getElementById(`verdocs-settings-panel-${this.field.name}`);t&&t.hidePanel&&t.hidePanel(),n.updateCount++}render(){var t,s,n,r;let d={x:0,y:0};"settings"in this.field&&(null===(t=this.field)||void 0===t?void 0:t.settings)?d=this.field.settings:"setting"in this.field&&(null===(s=this.field)||void 0===s?void 0:s.setting)&&(d=this.field.setting);const a=null!==(r=null!==(n=this.disabled)&&void 0!==n?n:d.disabled)&&void 0!==r&&r,l=this.field.rgba||o(this.roleIndex);return e(i,{class:{required:d.required,disabled:a},style:{backgroundColor:l}},e("span",{innerHTML:'<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.172 7l-6.586 6.586a2 2 0 102.828 2.828l6.414-6.586a4 4 0 00-5.656-5.656l-6.415 6.585a6 6 0 108.486 8.486L20.5 13" /></svg>',onClick:()=>!a&&this.handleShow()}))}};r.style='verdocs-field-attachment{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;width:24px;height:24px;display:block;font-size:11px;background-color:transparent;-webkit-transform-origin:bottom left;transform-origin:bottom left}verdocs-field-attachment.disabled{opacity:0.5}verdocs-field-attachment.disabled span{cursor:inherit}verdocs-field-attachment span{width:20px;cursor:pointer}verdocs-field-attachment.required span{border:1px solid #cc0000}verdocs-field-attachment.focused{-webkit-animation:verdocs-field-pulse 0.75s 2;animation:verdocs-field-pulse 0.75s 2}';export{r as verdocs_field_attachment}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-9422b807.system.js"],(function(e){"use strict";var t,n,i,o;return{setters:[function(e){t=e.r;n=e.c;i=e.h;o=e.H}],execute:function(){var a='verdocs-signature-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-signature-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);background:#f9f9f9}verdocs-signature-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-signature-dialog .content{font-size:14px;padding:20px}verdocs-signature-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-signature-dialog .buttons verdocs-button{margin-left:16px}verdocs-signature-dialog canvas{background:#ffffff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 #0000001f;box-shadow:0 0 6px 0 #0000001f}verdocs-signature-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-signature-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-signature-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-signature-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-signature-dialog .tabs .tab:hover{color:#55bc81}';var r=e("verdocs_signature_dialog",function(){function e(e){t(this,e);this.next=n(this,"next",7);this.exit=n(this,"exit",7);this.name="";this.fontLoaded=false;this.enteredName="";this.mode="type"}e.prototype.componentWillLoad=function(){var e=this;this.enteredName=this.name;var t=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");t.load().then((function(t){document.fonts.add(t);e.fontLoaded=true}))};e.prototype.componentDidLoad=function(){this.redrawSignature()};e.prototype.componentDidUpdate=function(){this.redrawSignature()};e.prototype.redrawSignature=function(){if(!this.canvasElement){return}var e=this.canvasElement.width;var t=this.canvasElement.getContext("2d");t.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);var n=100;do{n-=2;t.font="".concat(n,"px Dancing Script")}while(t.measureText(this.enteredName).width>e-32);t.textAlign="center";t.textBaseline="middle";t.font="".concat(n,"px Dancing Script");t.fillText(this.enteredName,this.canvasElement.width/2,this.canvasElement.height/2)};e.prototype.handleNameChange=function(e){this.enteredName=e.target.value};e.prototype.handleCancel=function(e){e.stopPropagation();e.preventDefault();this.exit.emit()};e.prototype.handleAdopt=function(e){e.stopPropagation();e.preventDefault();var t=this.canvasElement.toDataURL("image/png");this.next.emit(t)};e.prototype.render=function(){var e=this;return i(o,{onClick:function(t){return e.handleCancel(t)}},i("div",{class:"dialog"},i("div",{class:"heading"},"Create Your Signature"),i("div",{class:"content"},i("verdocs-text-input",{placeholder:"Full Name...",label:"Full Name",value:this.enteredName,onInput:function(t){return e.handleNameChange(t)},onClick:function(e){return e.stopPropagation()}}),i("div",{class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?i("canvas",{ref:function(t){return e.canvasElement=t}}):i("div",{style:{display:"none"}}),i("div",{class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),i("div",{class:"buttons"},i("verdocs-button",{label:"CANCEL",size:"normal",variant:"outline",onClick:function(t){return e.handleCancel(t)}}),i("verdocs-button",{label:"Adopt & Sign",size:"normal",onClick:function(t){return e.handleAdopt(t)}})))))};return e}());r.style=a}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as o,h as e}from"./p-7239d28d.js";import{V as i}from"./p-4e49fb12.js";import"./p-21603661.js";const s=class{constructor(e){t(this,e),this.searchContacts=o(this,"searchContacts",7),this.exit=o(this,"exit",7),this.next=o(this,"next",7),this.endpoint=i.getDefault(),this.templateRole=null,this.contactSuggestions=[],this.name=void 0,this.email=void 0,this.phone=void 0,this.message=void 0,this.showSuggestions=!1,this.showMessage=!1,this.delegator=!1,this.nameFieldId=`verdocs-contact-picker-name-${Math.random().toString(36).substring(2,11)}`,this.emailFieldId=`verdocs-contact-picker-email-${Math.random().toString(36).substring(2,11)}`,this.phoneFieldId=`verdocs-contact-picker-phone-${Math.random().toString(36).substring(2,11)}`}componentWillLoad(){this.templateRole&&(this.name=this.templateRole.full_name||"",this.email=this.templateRole.email||"",this.phone=this.templateRole.phone||"",this.delegator=this.templateRole.delegator||!1,this.message=this.templateRole.message||"",this.showMessage=""!==this.message)}handleNameChange(t){var o;this.name=t.target.value,null===(o=this.searchContacts)||void 0===o||o.emit({query:this.name})}handleEmailChange(t){this.email=t.target.value}handlePhoneChange(t){this.phone=t.target.value}handleMessageChange(t){this.message=t.target.value}handleCancel(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.exit)||void 0===o||o.emit()}handleSubmit(t){var o;t.stopPropagation(),this.showSuggestions=!1,null===(o=this.next)||void 0===o||o.emit({full_name:this.name,email:this.email,phone:this.phone,message:this.message,delegator:this.delegator})}handleSelectSuggestion(t,o){t.stopPropagation(),this.name=o.name,this.email=o.email,this.phone=o.phone,this.showSuggestions=!1}render(){return e("form",{onSubmit:t=>t.preventDefault(),onClick:t=>t.stopPropagation(),autocomplete:"off"},e("div",{class:"row"},e("label",{htmlFor:this.nameFieldId},"Name:"),e("input",{id:this.nameFieldId,name:this.nameFieldId,type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.name,placeholder:"Recipient Name...",onFocus:()=>{var t;return this.showSuggestions=(null===(t=this.contactSuggestions)||void 0===t?void 0:t.length)>0},onInput:t=>this.handleNameChange(t)}),this.showSuggestions&&e("div",{class:"dropdown"},this.contactSuggestions.map((t=>{var o;return e("div",{key:null!==(o=t.id)&&void 0!==o?o:t.name,class:"suggestion",onClick:o=>this.handleSelectSuggestion(o,t)},t.avatar?e("img",{alt:"Avatar",class:"avatar",src:t.avatar}):e("div",{class:"avatar",innerHTML:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AccountCircleIcon" tabindex="-1" title="AccountCircle"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 4c1.93 0 3.5 1.57 3.5 3.5S13.93 13 12 13s-3.5-1.57-3.5-3.5S10.07 6 12 6zm0 14c-2.03 0-4.43-.82-6.14-2.88C7.55 15.8 9.68 15 12 15s4.45.8 6.14 2.12C16.43 19.18 14.03 20 12 20z"></path></svg>'}),e("div",{class:"details"},e("div",{class:"name"},t.name),t.email&&e("div",{class:"destination"},t.email),t.phone&&e("div",{class:"destination"},t.phone)))})))),e("div",{class:"row"},e("label",{htmlFor:this.emailFieldId},"Email:"),e("input",{id:this.emailFieldId,name:this.emailFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.email,placeholder:"Email Address...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleEmailChange(t)})),e("div",{class:"row"},e("label",{htmlFor:this.phoneFieldId},"Phone:"),e("input",{id:this.phoneFieldId,name:this.phoneFieldId,type:"text","data-lpignore":"true",autoComplete:"blocked",value:this.phone,placeholder:"Phone Number...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handlePhoneChange(t)})),this.showMessage&&e("div",{class:"row"},e("label",{htmlFor:"verdocs-contact-picker-message"},"Message:"),e("input",{id:"verdocs-contact-picker-message",name:"verdocs-contact-picker-message",type:"text","data-lpignore":"true",autocomplete:"blocked",value:this.message,placeholder:"Invitation Message...",onFocus:()=>this.showSuggestions=!1,onInput:t=>this.handleMessageChange(t)})),e("div",{class:"buttons"},e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiBox-root css-1om0hkc" focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-2 12H6v-2h12v2zm0-3H6V9h12v2zm0-3H6V6h12v2z"></path></svg>',size:"small",active:this.showMessage,onToggle:t=>{this.showMessage=t.detail.active,this.showSuggestions=!1}}),e("verdocs-toggle-button",{icon:'<svg class="MuiSvgIcon-root MuiSvgIcon-fontSizeMedium MuiSvgIcon-root MuiSvgIcon-fontSizeLarge css-zjt8k" focusable="false" aria-hidden="true" viewBox="0 0 24 24" data-testid="AssignmentIndIcon" tabindex="-1" title="AssignmentInd"><path d="M19 3h-4.18C14.4 1.84 13.3 1 12 1c-1.3 0-2.4.84-2.82 2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-7 0c.55 0 1 .45 1 1s-.45 1-1 1-1-.45-1-1 .45-1 1-1zm0 4c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H6v-1.4c0-2 4-3.1 6-3.1s6 1.1 6 3.1V19z"></path></svg>',size:"small",active:this.delegator,onToggle:t=>{this.delegator=t.detail.active,this.showSuggestions=!1}}),e("div",{class:"flex-fill"}),e("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:t=>this.handleCancel(t)}),e("verdocs-button",{label:"OK",size:"small",onClick:t=>this.handleSubmit(t)})))}};s.style='verdocs-contact-picker{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;background-color:#ffffff}verdocs-contact-picker form{background-color:#f5f5fa;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .row{width:300px;display:-ms-flexbox;display:flex;position:relative;margin:0 0 20px 0;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form label{display:block;font-size:14px;font-weight:500;margin:0 0 4px 0;color:#5c6575}verdocs-contact-picker form input{border:none;font-size:18px;padding:3px 6px 3px 0;background:transparent;border-bottom:1px solid #33364b}verdocs-contact-picker form input:focus{outline:none}verdocs-contact-picker form .dropdown{left:0;right:0;top:49px;z-index:100;position:absolute;background:#ffffff;-webkit-box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1);box-shadow:0 0 15px 0 rgba(0, 0, 0, 0.1)}verdocs-contact-picker form .dropdown .suggestion{display:-ms-flexbox;display:flex;padding:6px 12px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker form .dropdown .suggestion svg{fill:#666666}verdocs-contact-picker form .dropdown .suggestion .avatar{width:48px;height:48px;-ms-flex:0 0 48px;flex:0 0 48px;margin-right:8px;border-radius:100%}verdocs-contact-picker form .dropdown .suggestion .details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-contact-picker form .dropdown .suggestion .name{font-size:16px;font-weight:500;margin-bottom:3px;color:#092c4c}verdocs-contact-picker form .dropdown .suggestion .destination{font-size:14px;margin-bottom:3px;color:#33364b}verdocs-contact-picker form .dropdown .suggestion:hover{background:#eee;cursor:pointer}verdocs-contact-picker .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-direction:row;flex-direction:row}verdocs-contact-picker .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-contact-picker ::-webkit-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-moz-placeholder{color:#aaaaaa}verdocs-contact-picker :-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::-ms-input-placeholder{color:#aaaaaa}verdocs-contact-picker ::placeholder{color:#aaaaaa}verdocs-contact-picker [data-lastpass-icon-root]{display:none !important}';export{s as verdocs_contact_picker}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
System.register(["./p-9422b807.system.js"],(function(t){"use strict";var i,e,n,o;return{setters:[function(t){i=t.r;e=t.c;n=t.h;o=t.H}],execute:function(){var a='verdocs-initial-dialog{font-family:"Barlow", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box;position:fixed;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-initial-dialog .dialog{width:100%;max-width:340px;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);background:#f9f9f9}verdocs-initial-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;padding:20px 20px 0 20px;line-height:28px;font-size:20px;font-weight:500}verdocs-initial-dialog .content{font-size:14px;padding:20px}verdocs-initial-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end;-ms-flex-align:center;align-items:center}verdocs-initial-dialog .buttons verdocs-button{margin-left:16px}verdocs-initial-dialog canvas{background:#fff;-webkit-box-sizing:border-box;box-sizing:border-box;margin:0 auto;width:300px;height:79px;max-width:100%;-webkit-box-shadow:0 0 6px 0 #0000001f;box-shadow:0 0 6px 0 #0000001f}verdocs-initial-dialog .disclaimer{text-align:justify;padding:8px 0;font-size:11px;line-height:14px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .as-shown{font-size:11px;margin:4px 0 20px 4px;color:rgba(0, 0, 0, 0.54)}verdocs-initial-dialog .tabs{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row}verdocs-initial-dialog .tabs .tab{padding:8px 15px;cursor:pointer}verdocs-initial-dialog .tabs .tab.active{border-bottom:2px solid #cccccc}verdocs-initial-dialog .tabs .tab:hover{color:#55bc81}';var s=t("verdocs_initial_dialog",function(){function t(t){i(this,t);this.next=e(this,"next",7);this.exit=e(this,"exit",7);this.initials="";this.fontLoaded=false;this.enteredInitials="";this.mode="type"}t.prototype.componentWillLoad=function(){var t=this;this.enteredInitials=this.initials.toUpperCase();var i=new FontFace("Dancing Script","url(https://fonts.gstatic.com/s/dancingscript/v19/If2cXTr6YS-zF4S-kcSWSVi_sxjsohD9F50Ruu7BMSo3Sup6hNX6plRP.woff)");i.load().then((function(i){document.fonts.add(i);t.fontLoaded=true}))};t.prototype.componentDidLoad=function(){this.redrawSignature()};t.prototype.componentDidUpdate=function(){this.redrawSignature()};t.prototype.redrawSignature=function(){if(!this.canvasElement){return}var t=this.canvasElement.width;var i=this.canvasElement.getContext("2d");i.clearRect(0,0,this.canvasElement.width,this.canvasElement.height);var e=100;do{e-=2;i.font="".concat(e,"px Dancing Script")}while(i.measureText(this.enteredInitials).width>t-32);i.textAlign="center";i.textBaseline="middle";i.font="".concat(e,"px Dancing Script");i.fillText(this.enteredInitials,this.canvasElement.width/2,this.canvasElement.height/2)};t.prototype.handleNameChange=function(t){this.enteredInitials=t.target.value};t.prototype.handleCancel=function(t){t.stopPropagation();t.preventDefault();this.exit.emit()};t.prototype.handleAdopt=function(t){t.stopPropagation();t.preventDefault();var i=this.canvasElement.toDataURL("image/png");this.next.emit(i)};t.prototype.render=function(){var t=this;return n(o,{onClick:function(i){return t.handleCancel(i)}},n("div",{class:"dialog"},n("div",{class:"heading"},"Create Your Initial"),n("div",{class:"content"},n("verdocs-text-input",{placeholder:"Initials...",label:"Initials",value:this.enteredInitials,onInput:function(i){return t.handleNameChange(i)}}),n("div",{class:"as-shown"},"As shown on driver's license or govt. ID card."),this.fontLoaded?n("canvas",{ref:function(i){return t.canvasElement=i}}):n("div",{style:{display:"none"}}),n("div",{class:"disclaimer"},"By clicking Adopt, I agree that the signature will be the electronic representation of my signature for all purposes when I (or my agent) use them on documents, including legally binding contracts — just the same as a pen-and-paper signature or initial."),n("div",{class:"buttons"},n("verdocs-button",{label:"CANCEL",variant:"outline",onClick:function(i){return t.handleCancel(i)}}),n("verdocs-button",{label:"Adopt & Sign",onClick:function(i){return t.handleAdopt(i)}})))))};return t}());s.style=a}}}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var __awaiter=this&&this.__awaiter||function(e,t,i,n){function o(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,a){function r(e){try{l(n.next(e))}catch(e){a(e)}}function s(e){try{l(n["throw"](e))}catch(e){a(e)}}function l(e){e.done?i(e.value):o(e.value).then(r,s)}l((n=n.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},n,o,a,r;return r={next:s(0),throw:s(1),return:s(2)},typeof Symbol==="function"&&(r[Symbol.iterator]=function(){return this}),r;function s(e){return function(t){return l([e,t])}}function l(r){if(n)throw new TypeError("Generator is already executing.");while(i)try{if(n=1,o&&(a=r[0]&2?o["return"]:r[0]?o["throw"]||((a=o["return"])&&a.call(o),0):o.next)&&!(a=a.call(o,r[1])).done)return a;if(o=0,a)r=[r[0]&2,a.value];switch(r[0]){case 0:case 1:a=r;break;case 4:i.label++;return{value:r[1],done:false};case 5:i.label++;o=r[1];r=[0];continue;case 7:r=i.ops.pop();i.trys.pop();continue;default:if(!(a=i.trys,a=a.length>0&&a[a.length-1])&&(r[0]===6||r[0]===2)){i=0;continue}if(r[0]===3&&(!a||r[1]>a[0]&&r[1]<a[3])){i.label=r[1];break}if(r[0]===6&&i.label<a[1]){i.label=a[1];a=r;break}if(a&&i.label<a[2]){i.label=a[2];i.ops.push(r);break}if(a[2])i.ops.pop();i.trys.pop();continue}r=t.call(e,i)}catch(e){r=[6,e];o=0}finally{n=a=0}if(r[0]&5)throw r[1];return{value:r[0]?r[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var n=0,o=t.length,a;n<o;n++){if(a||!(n in t)){if(!a)a=Array.prototype.slice.call(t,0,n);a[n]=t[n]}}return e.concat(a||Array.prototype.slice.call(t))};System.register(["./p-9422b807.system.js","./p-69912cbf.system.js","./p-0522edd2.system.js","./p-4f63fae0.system.js","./p-187b20b7.system.js","./p-c739f90a.system.js","./p-b1288daf.system.js","./p-dc2efab7.system.js","./p-03aeaebe.system.js","./p-f0f99234.system.js","./p-af2c2f79.system.js","./p-e764098e.system.js","./p-327858f0.system.js","./p-51a3ea62.system.js","./p-71c7e1ba.system.js","./p-d50523fd.system.js"],(function(e){"use strict";var t,i,n,o,a,r,s,l,d,c,p,h,u,g,f,m,v,x,w;return{setters:[function(e){t=e.r;i=e.c;n=e.h;o=e.H},function(e){a=e.c;r=e.g},function(e){s=e.c},function(e){l=e.V},function(e){d=e.S},function(e){c=e.i},function(e){p=e.u;h=e.c},function(e){u=e.a;g=e.r;f=e.e;m=e.f;v=e.h},function(e){x=e.s},function(e){w=e.l},function(){},function(){},function(){},function(){},function(){},function(){}],execute:function(){var b='verdocs-template-create{font-family:"Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif}verdocs-template-create form{background-color:#ffffff;padding:12px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column}verdocs-template-create form .upload-box{-webkit-box-sizing:border-box;box-sizing:border-box;width:320px;text-align:center;padding:44px 18px 66px;border:2px dashed #979797;color:rgba(0, 0, 0, 0.54)}verdocs-template-create form .upload-box svg{width:64px;fill:#5c6575}verdocs-template-create .loader-wrapper{background-color:#ffffff;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;position:relative;width:320px;height:320px;text-align:center;border:2px dashed #979797;-ms-flex-pack:end;justify-content:flex-end;padding:0 0 30px 0}verdocs-template-create .buttons{display:-ms-flexbox;display:flex;-webkit-column-gap:8px;-moz-column-gap:8px;column-gap:8px;margin-top:16px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-template-create .buttons .flex-fill{-ms-flex:1;flex:1}verdocs-template-create ::-webkit-input-placeholder{color:#aaaaaa}verdocs-template-create ::-moz-placeholder{color:#aaaaaa}verdocs-template-create :-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::-ms-input-placeholder{color:#aaaaaa}verdocs-template-create ::placeholder{color:#aaaaaa}';var y=" ";var C='<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24"><path d="M6 2c-1.1 0-1.99.9-1.99 2L4 20c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6H6zm7 7V3.5L18.5 9H13z"></path></svg>';var q=e("verdocs_template_create",function(){function e(e){t(this,e);this.exit=i(this,"exit",7);this.next=i(this,"next",7);this.sdkError=i(this,"sdkError",7);this.endpoint=l.getDefault();this.file=undefined;this.creating=false}e.prototype.componentWillLoad=function(){this.endpoint.setTimeout(3e4);this.endpoint.loadSession()};e.prototype.handleFileChanged=function(e){var t;this.file=((t=e.target.files)===null||t===void 0?void 0:t[0])||null;console.log("[CREATE] Selected file",this.file)};e.prototype.handleUpload=function(e){e.stopPropagation();var t=document.getElementById("verdocs-template-create-file");t.click()};e.prototype.handleCancel=function(e){e.stopPropagation();this.exit.emit()};e.prototype.handleSubmit=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,o,l,c,p,h;var u=this;return __generator(this,(function(g){switch(g.label){case 0:e.stopPropagation();console.log("Submitting");if(!this.file){return[2]}this.creating=true;g.label=1;case 1:g.trys.push([1,4,,5]);return[4,a(this.endpoint,{name:this.file.name})];case 2:o=g.sent();console.log("[CREATE] Created template",o);return[4,s(this.endpoint,o.id,this.file)];case 3:l=g.sent();console.log("[CREATE] Created document",l);c=null;p=setInterval((function(){return __awaiter(u,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:console.log("[CREATE] Waiting for template to be processed...",l);return[4,r(this.endpoint,o.id)];case 1:c=t.sent();if(c===null||c===void 0?void 0:c.processed){console.log("[CREATE] Retrieved new template",c);if(p){clearInterval(p)}(e=this.next)===null||e===void 0?void 0:e.emit(c);this.creating=false}return[2]}}))}))}),3e3);return[3,5];case 4:h=g.sent();console.log("[CREATE] Error creating template",h);(t=this.sdkError)===null||t===void 0?void 0:t.emit(new d(h.message,(i=h.response)===null||i===void 0?void 0:i.status,(n=h.response)===null||n===void 0?void 0:n.data));this.creating=false;return[3,5];case 5:return[2]}}))}))};e.prototype.render=function(){var e=this;if(!this.endpoint.session){return n(o,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}return n("form",{onSubmit:function(e){return e.preventDefault()},onClick:function(e){return e.stopPropagation()},autocomplete:"off"},n("input",{type:"file",id:"verdocs-template-create-file",multiple:true,accept:"application/pdf",style:{display:"none"},onChange:function(t){return e.handleFileChanged(t)}}),this.creating?n("div",{class:"loader-wrapper"},n("verdocs-loader",null),n("div",{class:"loading-text"},"Processing, please wait...")):n("div",{class:"upload-box"},n("div",null,n("span",{innerHTML:C})),n("div",{style:{marginTop:"20px",fontSize:"20px",fontWeight:"bold",overflowWrap:"anywhere"}},this.file?this.file.name:"Drag a file here"),n("div",{style:{marginTop:"20px",marginBottom:"20px",fontSize:"16px",height:"20px"}},this.file?y:"Or, if you prefer..."),n("verdocs-button",{label:this.file?"Select a different file":"Select a file from your computer",size:"small",onClick:function(t){return e.handleUpload(t)}})),n("div",{class:"buttons"},n("verdocs-button",{variant:"outline",label:"Cancel",size:"small",onClick:function(t){return e.handleCancel(t)},disabled:this.creating}),n("verdocs-button",{label:"Next",size:"small",onClick:function(t){return e.handleSubmit(t)},disabled:!this.file||this.creating})))};return e}());q.style=b;var E="verdocs-template-fields{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;position:relative}verdocs-template-fields .page-0{padding:65px 15px 0 15px;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields .page-0 .user-placed-fields{height:100px;position:relative;background:#ffffff;-webkit-box-shadow:0 0 10px 5px #0000000f;box-shadow:0 0 10px 5px #0000000f}verdocs-template-fields .page-0 .user-placed-fields .title{top:0;left:0;color:#ffffff;font-size:12px;padding:3px 6px;font-weight:bold;position:absolute;background:#46497d}verdocs-template-fields .pages{display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;position:relative;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-template-fields .pages div,verdocs-template-fields .pages canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-template-fields #verdocs-template-fields-toolbar{height:50px;display:-ms-flexbox;display:flex;-ms-flex:0 0 50px;flex:0 0 50px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;background:#46497d}verdocs-template-fields #verdocs-template-fields-toolbar svg{width:24px;height:24px}verdocs-template-fields.placing-attachment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-checkbox{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-date{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-dropdown{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-initial{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-payment{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-radio{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-signature{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textarea{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z'/%3E%3C/svg%3E\") 16 16, pointer}verdocs-template-fields.placing-textbox{cursor:url(\"data:image/svg+xml,%3Csvg width='32' height='15' viewBox='0 0 32 15' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cmask id='path-1-inside-1_1401_24' fill='white'%3E%3Cpath d='M0 0H32V15H0V0Z'/%3E%3C/mask%3E%3Cpath d='M0 0H32V15H0V0Z' fill='%234C56CB' fill-opacity='0.1'/%3E%3Cpath d='M0 0V-1H-1V0H0ZM0 15H-1V16H0V15ZM0 1H32V-1H0V1ZM32 14H0V16H32V14ZM1 15V0H-1V15H1Z' fill='%234C56CB' mask='url(%23path-1-inside-1_1401_24)'/%3E%3Cpath d='M3 11.8V8.65H14.15V11.8H3ZM3 6.65V3.5H20.15V6.65H3Z' fill='%234C56CB'/%3E%3Cline x1='31.5' y1='1' x2='31.5' y2='14' stroke='%234C56CB' stroke-opacity='0.32' stroke-dasharray='1 1'/%3E%3C/svg%3E%0A\") 0 14, pointer}verdocs-template-fields.placing-timestamp{cursor:url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' width='24'%3E%3Cpath d='m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z'/%3E%3C/svg%3E\") 0 14, pointer}";var Z='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.425 16.15V13h11.15v3.15Zm0-5.15V7.85h17.15V11Z"/></svg>';var k='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M3.225 20.725v-3.15h11.55v3.15Zm0-4.775V12.8h17.55v3.15Zm0-4.75V8.05h17.55v3.15Zm0-4.775v-3.15h17.55v3.15Z"/></svg>';var _='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m10.55 16.55 7.275-7.275L16.05 7.5l-5.5 5.45-2.675-2.65L6.1 12.075Zm-5.375 4.925q-1.125 0-1.887-.763-.763-.762-.763-1.887V5.175q0-1.125.763-1.888.762-.762 1.887-.762h13.65q1.125 0 1.888.762.762.763.762 1.888v13.65q0 1.125-.762 1.887-.763.763-1.888.763Zm0-2.65h13.65V5.175H5.175v13.65Zm0-13.65v13.65-13.65Z"/></svg>';var V='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M12 17q2.075 0 3.538-1.463Q17 14.075 17 12t-1.462-3.538Q14.075 7 12 7 9.925 7 8.463 8.462 7 9.925 7 12q0 2.075 1.463 3.537Q9.925 17 12 17Zm0 5.85q-2.275 0-4.25-.85t-3.438-2.312Q2.85 18.225 2 16.25q-.85-1.975-.85-4.25T2 7.75q.85-1.975 2.312-3.438Q5.775 2.85 7.75 2q1.975-.85 4.25-.85t4.25.85q1.975.85 3.438 2.312Q21.15 5.775 22 7.75q.85 1.975.85 4.25T22 16.25q-.85 1.975-2.312 3.438Q18.225 21.15 16.25 22q-1.975.85-4.25.85Zm0-3.15q3.25 0 5.475-2.225Q19.7 15.25 19.7 12q0-3.25-2.225-5.475Q15.25 4.3 12 4.3q-3.25 0-5.475 2.225Q4.3 8.75 4.3 12q0 3.25 2.225 5.475Q8.75 19.7 12 19.7Zm0-7.7Z"/></svg>';var H='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M7.6 13.925q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375Zm4.4 0q-.55 0-.925-.375t-.375-.925q0-.55.375-.937.375-.388.925-.388t.925.388q.375.387.375.937t-.375.925q-.375.375-.925.375ZM5.3 22.85q-1.325 0-2.238-.912-.912-.913-.912-2.238V6.3q0-1.325.912-2.238.913-.912 2.238-.912H6v-2h2.575v2h6.85v-2H18v2h.7q1.325 0 2.238.912.912.913.912 2.238v13.4q0 1.325-.912 2.238-.913.912-2.238.912Zm0-3.15h13.4V10H5.3v9.7ZM5.3 8h13.4V6.3H5.3Zm0 0V6.3 8Z"/></svg>';var I='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="m9.225 21.225 4.65-4.65h8.45v4.65Zm-5.35-2.2H5.05l8.5-8.5-1.175-1.175-8.5 8.5Zm14.25-9.95L13.8 4.8l1.325-1.325q.625-.65 1.525-.663.9-.012 1.6.663l1.225 1.175q.675.675.663 1.562-.013.888-.663 1.513ZM16.7 10.55 6 21.225H1.675V16.9L12.35 6.225Zm-3.725-.625-.6-.575 1.175 1.175Z"/></svg>';var S='<svg xmlns="http://www.w3.org/2000/svg" height="24" width="24"><path fill="#ffffff" d="M6.225 20.775V7h-5V3.225H15V7h-5v13.775Zm9.775 0v-8h-3V9h9.775v3.775h-3v8Z"/></svg>';var M='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path fill="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>';var L='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke="#ffffff" stroke-linecap="round" stroke-linejoin="round" d="M3 4.5h14.25M3 9h9.75M3 13.5h9.75m4.5-4.5v12m0 0l-3.75-3.75M17.25 21L21 17.25" /></svg>';var A=[{id:"checkbox",tooltip:"Check Box",icon:_},{id:"date",tooltip:"Date",icon:H},{id:"dropdown",tooltip:"Dropdown",icon:L},{id:"initial",tooltip:"Initials",icon:S},{id:"radio",tooltip:"Radio Button",icon:V},{id:"signature",tooltip:"Signature",icon:I},{id:"textarea",tooltip:"Text Area",icon:k},{id:"textbox",tooltip:"Text Box",icon:Z},{id:"timestamp",tooltip:"Timestamp",icon:M}];var P=e("verdocs_template_fields",function(){function e(e){t(this,e);this.sdkError=i(this,"sdkError",7);this.templateUpdated=i(this,"templateUpdated",7);this.pageHeights={};this.cachedPageInfo={};this.endpoint=l.getDefault();this.templateId=null;this.toolbarTargetId=null;this.placing=null;this.selectedRoleName="";this.rerender=1}e.prototype.componentWillLoad=function(){return __awaiter(this,void 0,void 0,(function(){var e,t,i,n,o,a,r,s;return __generator(this,(function(l){switch(l.label){case 0:l.trys.push([0,5,,6]);this.endpoint.loadSession();if(!this.templateId){console.log("[FIELDS] Missing required template ID ".concat(this.templateId));return[2]}if(!this.endpoint.session){console.log("[BUILD] Unable to start builder session, must be authenticated");return[2]}l.label=1;case 1:l.trys.push([1,3,,4]);console.log("[FIELDS] Loading template ".concat(this.templateId),this.endpoint.session);return[4,w(this.endpoint,this.templateId,true)];case 2:l.sent();this.selectedRoleName=x.roleNames[0];console.log("Starting with role",this.selectedRoleName);return[3,4];case 3:r=l.sent();console.log("[FIELDS] Error loading template",r);(e=this.sdkError)===null||e===void 0?void 0:e.emit(new d(r.message,(t=r.response)===null||t===void 0?void 0:t.status,(i=r.response)===null||i===void 0?void 0:i.data));return[3,4];case 4:return[3,6];case 5:s=l.sent();console.log("[FIELDS] Error with preview session",s);(n=this.sdkError)===null||n===void 0?void 0:n.emit(new d(s.message,(o=s.response)===null||o===void 0?void 0:o.status,(a=s.response)===null||a===void 0?void 0:a.data));return[3,6];case 6:return[2]}}))}))};e.prototype.componentDidRender=function(){c.dynamicDrop(true);var e=this.toolbarTargetId?document.getElementById(this.toolbarTargetId):null;var t=document.getElementById("verdocs-template-fields-toolbar");if(e&&t){console.log("[FIELDS] Moving toolbar");t.remove();e.append(t)}};e.prototype.handleKeyDown=function(e){if(e.key==="Escape"){this.placing=null}};e.prototype.handleFieldChange=function(e,t,i){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(n){console.log("[FIELDS] handleFieldChange",e,t,i);this.rerender++;return[2]}))}))};e.prototype.attachFieldAttributes=function(e,t,i,n){var o=this;n.addEventListener("input",(function(e){return o.handleFieldChange(t,e)}));n.addEventListener("settingsChanged",(function(){var e;console.log("settings changed",o,t);n.setAttribute("roleindex",u(x.roleNames,t.role_name));o.rerender++;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));n.addEventListener("deleted",(function(){var e;console.log("deleted",o,t);n.remove();o.rerender++;(e=o.templateUpdated)===null||e===void 0?void 0:e.emit({endpoint:o.endpoint,template:x.template,event:"updated-field"})}));n.setAttribute("roleindex",i);n.setAttribute("pageNumber",e.pageNumber);n.setAttribute("xScale",e.xScale);n.setAttribute("yScale",e.yScale);n.setAttribute("name",t.name)};e.prototype.handlePageRendered=function(e){var t=this;var i=e.detail;console.log("[FIELDS] Page rendered",i.pageNumber,i);this.cachedPageInfo[i.pageNumber]=i;this.pageHeights[i.pageNumber]=i.naturalHeight;var n=x.fields.filter((function(e){return e.page_sequence===i.pageNumber}));n.forEach((function(e){var n=u(x.roleNames,e.role_name);var o=g(e,i,n,{disabled:true,editable:true,draggable:true});if(!o){return}if(Array.isArray(o)){o.map((function(o){return t.attachFieldAttributes(i,e,n,o)}))}else{t.attachFieldAttributes(i,e,n,o)}c(o).draggable({listeners:{start:function(e){console.log("[FIELDS] Drag started",e.type,e.target)},move:function(e){var t=+(e.target.getAttribute("posX")||0);var i=+(e.target.getAttribute("posY")||0);var n=+(e.target.getAttribute("xScale")||1);var o=+(e.target.getAttribute("yScale")||1);var a=e.dx/n+t;var r=e.dy/o+i;e.target.setAttribute("posX",a);e.target.setAttribute("posy",r);f(e.target,"translate","".concat(a,"px, ").concat(r,"px"))},end:t.handleMoveField.bind(t)}})}))};e.prototype.handleMoveField=function(e){return __awaiter(this,void 0,void 0,(function(){var t,i,n,o,a,r,s,l,d,c,h,u,g,f,m,v,w,b;return __generator(this,(function(y){switch(y.label){case 0:t=e.target.getAttribute("pageNumber");i=this.cachedPageInfo[t],n=i.naturalWidth,o=n===void 0?612:n,a=i.naturalHeight,r=a===void 0?792:a,s=i.renderedHeight,l=s===void 0?792:s;console.log("[FIELDS] Drag ended",t,e.target);d=e.target.getBoundingClientRect();c=e.target.parentElement;h=c.getBoundingClientRect();u=Math.max(d.left-h.left,0);g=Math.max(l-(h.bottom-d.bottom),0);f=this.viewCoordinatesToPageCoordinates(u,g,t,o-e.rect.width,r-e.rect.height),m=f.x,v=f.y;w=e.target.getAttribute("name");b=x.fields.find((function(e){return e.name===w}));if(!b)return[3,2];b.setting.x=m;b.setting.y=v;return[4,p(this.endpoint,this.templateId,w,b)];case 1:y.sent();this.handlePageRendered({detail:this.cachedPageInfo[t]});y.label=2;case 2:return[2]}}))}))};e.prototype.generateFieldName=function(e,t){var i=1;var n;do{n="".concat(e,"P").concat(t,"-").concat(i);i++}while(x.fields.some((function(e){return e.name===n})));console.log("Field name",n);return n};e.prototype.viewCoordinatesToPageCoordinates=function(e,t,i,n,o){var a=this.cachedPageInfo[i],r=a.xScale,s=r===void 0?1:r,l=a.yScale,d=l===void 0?1:l,c=a.renderedHeight,p=c===void 0?792:c;var h=Math.floor(Math.min(e/s,n));var u=Math.floor(Math.min(Math.max(p-t,0)/d,o));return{x:h,y:u}};e.prototype.handleClickPage=function(e,t){return __awaiter(this,void 0,void 0,(function(){var i,n,o,a,r,s,l,d,c,p,u,g,f,w,b,y;return __generator(this,(function(C){switch(C.label){case 0:if(!this.placing)return[3,2];console.log("Placing field",this.placing,t.sequence,e.offsetX,e.offsetY);n=t.sequence;o=e.offsetX;a=e.offsetY;r=m(this.placing);s=v(this.placing);l=this.cachedPageInfo[n];console.log("Cached page",l);d=l.naturalWidth,c=d===void 0?612:d,p=l.naturalHeight,u=p===void 0?792:p;g=this.viewCoordinatesToPageCoordinates(o,a,n,c-r,u-s),f=g.x,w=g.y;b={name:this.generateFieldName(this.placing,n),role_name:this.selectedRoleName,template_id:this.templateId,type:this.placing,required:true,page_sequence:n,validator:null,setting:{x:f,y:w}};switch(b.type){case"attachment":case"payment":b.setting={x:f,y:w};break;case"initial":case"signature":b.setting={x:f,y:w,result:""};break;case"checkbox_group":b.setting={x:f,y:w,minimum_checked:0,maximum_checked:1e3};break;case"date":b.setting={x:f,y:w,width:r,height:s,result:""};break;case"dropdown":b.setting={x:f,y:w,width:r,height:s,value:"",placeholder:"Select a value"};break;case"radio_button_group":b.setting={x:f,y:w};break;case"textbox":b.setting={x:f,y:w,width:r,height:s,result:"",leading:0,alignment:0,upperCase:false};break;case"timestamp":b.setting={x:f,y:w,width:r,height:s};break}return[4,h(this.endpoint,this.templateId,b)];case 1:y=C.sent();console.log("Saved field",y);x.fields.push(y);this.placing=null;(i=this.templateUpdated)===null||i===void 0?void 0:i.emit({endpoint:this.endpoint,template:x.template,event:"added-field"});this.handlePageRendered({detail:this.cachedPageInfo[n]});C.label=2;case 2:return[2]}}))}))};e.prototype.render=function(){var e;var t=this;if(!this.endpoint.session){return n(o,null,n("verdocs-component-error",{message:"You must be authenticated to use this module."}))}if(x.loading||!x.template){return n(o,null,n("verdocs-loader",null))}var i=__spreadArray([],x.template.pages,true);i.sort((function(e,t){return e.sequence-t.sequence}));return n(o,{class:this.placing?(e={},e["placing-".concat(this.placing)]=true,e):{},"data-r":this.rerender,onSubmit:function(){console.log("onSubmit")}},n("div",{id:"verdocs-template-fields-toolbar"},A.map((function(e){return n("verdocs-toolbar-icon",{text:e.tooltip,icon:e.icon,onClick:function(){return t.placing=e.id}})}))),n("div",{class:"pages"},i.map((function(e){return n("verdocs-template-document-page",{templateId:e.template_id,documentId:e.document_id,pageNumber:e.sequence,virtualWidth:612,virtualHeight:792,onClick:function(i){return t.handleClickPage(i,e)},onPageRendered:function(e){return t.handlePageRendered(e)},layers:[{name:"page",type:"canvas"},{name:"controls",type:"div"}]})}))))};return e}());P.style=E}}}));
|