@verdocs/web-sdk 1.9.38 → 1.9.41
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/Envelopes-68058bbe.js +118 -0
- package/dist/cjs/{Envelopes-f2f8dd92.js → Envelopes-d30cba62.js} +2 -2
- package/dist/cjs/{VerdocsEndpoint-257ebdb3.js → VerdocsEndpoint-c1c80b51.js} +55 -23
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-0ec89d7d.js → utils-53125d26.js} +2 -115
- package/dist/cjs/verdocs-auth.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-build.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-document-page_2.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-dropdown.cjs.entry.js +1 -0
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +221 -0
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-signature_3.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-preview.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-search.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +24 -23
- package/dist/cjs/verdocs-template-create_4.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-view.cjs.entry.js +4 -3
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/controls/verdocs-dropdown/verdocs-dropdown.js +1 -0
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.css +159 -0
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +299 -0
- package/dist/collection/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.js +12 -0
- package/dist/components/Envelopes.js +69 -0
- package/dist/components/Envelopes2.js +111 -0
- package/dist/components/VerdocsEndpoint.js +55 -23
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/utils.js +2 -110
- package/dist/components/verdocs-dropdown2.js +1 -0
- package/dist/components/verdocs-envelope-sidebar.d.ts +11 -0
- package/dist/components/verdocs-envelope-sidebar.js +242 -0
- package/dist/components/verdocs-search-activity2.js +1 -1
- package/dist/components/verdocs-sign.js +5 -3
- package/dist/components/verdocs-template-fields2.js +1 -1
- package/dist/components/verdocs-view2.js +3 -68
- package/dist/docs.json +73 -1
- package/dist/esm/Envelopes-130fd6ea.js +111 -0
- package/dist/esm/{Envelopes-779de57c.js → Envelopes-6982dfc6.js} +1 -1
- package/dist/esm/{VerdocsEndpoint-28ba21cc.js → VerdocsEndpoint-cf4392fb.js} +55 -23
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-06d58b15.js → utils-188fa107.js} +2 -110
- package/dist/esm/verdocs-auth.entry.js +1 -1
- package/dist/esm/verdocs-build.entry.js +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm/verdocs-document-page_2.entry.js +2 -1
- package/dist/esm/verdocs-dropdown.entry.js +1 -0
- package/dist/esm/verdocs-envelope-sidebar.entry.js +217 -0
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -1
- package/dist/esm/verdocs-field-date.entry.js +2 -1
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -1
- package/dist/esm/verdocs-field-initial.entry.js +2 -1
- package/dist/esm/verdocs-field-payment.entry.js +2 -1
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -1
- package/dist/esm/verdocs-field-signature_3.entry.js +2 -1
- package/dist/esm/verdocs-field-textarea.entry.js +2 -1
- package/dist/esm/verdocs-field-textbox.entry.js +2 -1
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -1
- package/dist/esm/verdocs-preview.entry.js +3 -2
- package/dist/esm/verdocs-quick-functions_3.entry.js +2 -2
- package/dist/esm/verdocs-search.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +3 -2
- package/dist/esm/verdocs-sign.entry.js +5 -4
- package/dist/esm/verdocs-template-create_4.entry.js +3 -2
- package/dist/esm/verdocs-view.entry.js +4 -3
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/Envelopes-130fd6ea.js +1 -0
- package/dist/esm-es5/Envelopes-6982dfc6.js +1 -0
- package/dist/esm-es5/VerdocsEndpoint-cf4392fb.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/utils-188fa107.js +1 -0
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -0
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-create_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.d.ts +39 -0
- package/dist/types/components/elements/verdocs-envelope-sidebar/verdocs-envelope-sidebar.stories.d.ts +6 -0
- package/dist/types/components.d.ts +37 -0
- package/dist/verdocs-web-sdk/p-03effe00.system.js +1 -0
- package/dist/verdocs-web-sdk/p-0dd25856.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0eb992eb.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0fbb34f5.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-89f25d01.entry.js → p-1759e35b.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-1ed1a048.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-25cf23c1.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2b0456b9.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2c8f6280.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ddda809b.system.js → p-2d687108.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-32d1020a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3d410f78.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ba6c3671.system.entry.js → p-450c5246.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4490a384.system.entry.js → p-47dfcf69.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4c67b1b7.system.js +1 -0
- package/dist/verdocs-web-sdk/p-5539dc08.js +1 -0
- package/dist/verdocs-web-sdk/{p-a42a5853.system.entry.js → p-556ae1ae.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-6e00d147.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6e52f29d.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7330b63c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-74e19125.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-76f192c8.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-773f07d3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-5597170d.system.entry.js → p-77b92d0b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-123572b9.entry.js → p-7d3eebb8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7e14f782.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0a33398a.entry.js → p-7e84deff.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2d36b5a3.entry.js → p-7f5b41a4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-808a2600.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-824e733a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-14c69e28.system.entry.js → p-83c05c68.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-848e564d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-880b619d.js +1 -0
- package/dist/verdocs-web-sdk/p-8a22d96a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8cfca7ee.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-96ab62f2.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a229aae2.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-adac8a26.js +1 -0
- package/dist/verdocs-web-sdk/p-b7036bc4.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bbad56e6.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bd49e24b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c062334b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c16b6ca4.system.js +1 -1
- package/dist/verdocs-web-sdk/{p-4f72d7e9.js → p-c4deb4b7.js} +1 -1
- package/dist/verdocs-web-sdk/p-c9af569a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d5bb68c4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d6222a3d.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d729c183.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d9f744ed.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e0cfad01.system.js +1 -0
- package/dist/verdocs-web-sdk/p-e206c61c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e2bf56f6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ecaf3712.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f17cddc0.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fc6cb0be.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +15 -15
- package/dist/esm-es5/Envelopes-779de57c.js +0 -1
- package/dist/esm-es5/VerdocsEndpoint-28ba21cc.js +0 -1
- package/dist/esm-es5/utils-06d58b15.js +0 -1
- package/dist/verdocs-web-sdk/p-0315f91f.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0592cb20.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-0b67a5f1.system.js +0 -1
- package/dist/verdocs-web-sdk/p-16fe44ba.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-17136749.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1cc4f8c2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-24b9c1a3.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2c776579.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-34bed726.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-34e3df55.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3ee11027.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-41b71077.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-427524bd.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4814e58e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-49d804da.js +0 -1
- package/dist/verdocs-web-sdk/p-57165db2.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5dec58c2.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5e67c42f.js +0 -1
- package/dist/verdocs-web-sdk/p-5faa7077.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-602a22c7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6239f230.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-63a00853.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-69a32638.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6a75bbb5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-787252e0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7a6c829f.system.js +0 -1
- package/dist/verdocs-web-sdk/p-85f91c34.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-893553e7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-93bf1041.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-99c2766b.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9c595648.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a5698580.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ac4c1ad8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b39a41fc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ba02faae.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e9e18f1a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ef845e9c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f80f538d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fcf9e8f0.entry.js +0 -1
|
@@ -516,7 +516,7 @@ const matchAll = (regExp, str) => {
|
|
|
516
516
|
const isHTMLForm = kindOfTest('HTMLFormElement');
|
|
517
517
|
|
|
518
518
|
const toCamelCase = str => {
|
|
519
|
-
return str.toLowerCase().replace(/[_
|
|
519
|
+
return str.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,
|
|
520
520
|
function replacer(m, p1, p2) {
|
|
521
521
|
return p1.toUpperCase() + p2;
|
|
522
522
|
}
|
|
@@ -600,6 +600,37 @@ const toFiniteNumber = (value, defaultValue) => {
|
|
|
600
600
|
return Number.isFinite(value) ? value : defaultValue;
|
|
601
601
|
};
|
|
602
602
|
|
|
603
|
+
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
|
|
604
|
+
|
|
605
|
+
const DIGIT = '0123456789';
|
|
606
|
+
|
|
607
|
+
const ALPHABET = {
|
|
608
|
+
DIGIT,
|
|
609
|
+
ALPHA,
|
|
610
|
+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
|
|
611
|
+
};
|
|
612
|
+
|
|
613
|
+
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
|
|
614
|
+
let str = '';
|
|
615
|
+
const {length} = alphabet;
|
|
616
|
+
while (size--) {
|
|
617
|
+
str += alphabet[Math.random() * length|0];
|
|
618
|
+
}
|
|
619
|
+
|
|
620
|
+
return str;
|
|
621
|
+
};
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* If the thing is a FormData object, return true, otherwise return false.
|
|
625
|
+
*
|
|
626
|
+
* @param {unknown} thing - The thing to check.
|
|
627
|
+
*
|
|
628
|
+
* @returns {boolean}
|
|
629
|
+
*/
|
|
630
|
+
function isSpecCompliantForm(thing) {
|
|
631
|
+
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
|
632
|
+
}
|
|
633
|
+
|
|
603
634
|
const toJSONObject = (obj) => {
|
|
604
635
|
const stack = new Array(10);
|
|
605
636
|
|
|
@@ -677,6 +708,9 @@ const utils = {
|
|
|
677
708
|
findKey,
|
|
678
709
|
global: _global,
|
|
679
710
|
isContextDefined,
|
|
711
|
+
ALPHABET,
|
|
712
|
+
generateString,
|
|
713
|
+
isSpecCompliantForm,
|
|
680
714
|
toJSONObject
|
|
681
715
|
};
|
|
682
716
|
|
|
@@ -775,8 +809,8 @@ AxiosError.from = (error, code, config, request, response, customProps) => {
|
|
|
775
809
|
return axiosError;
|
|
776
810
|
};
|
|
777
811
|
|
|
778
|
-
|
|
779
|
-
|
|
812
|
+
// eslint-disable-next-line strict
|
|
813
|
+
const httpAdapter = null;
|
|
780
814
|
|
|
781
815
|
/**
|
|
782
816
|
* Determines if the given thing is a array or js object.
|
|
@@ -833,17 +867,6 @@ const predicates = utils.toFlatObject(utils, {}, null, function filter(prop) {
|
|
|
833
867
|
return /^is[A-Z]/.test(prop);
|
|
834
868
|
});
|
|
835
869
|
|
|
836
|
-
/**
|
|
837
|
-
* If the thing is a FormData object, return true, otherwise return false.
|
|
838
|
-
*
|
|
839
|
-
* @param {unknown} thing - The thing to check.
|
|
840
|
-
*
|
|
841
|
-
* @returns {boolean}
|
|
842
|
-
*/
|
|
843
|
-
function isSpecCompliant(thing) {
|
|
844
|
-
return thing && utils.isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator];
|
|
845
|
-
}
|
|
846
|
-
|
|
847
870
|
/**
|
|
848
871
|
* Convert a data object to FormData
|
|
849
872
|
*
|
|
@@ -873,7 +896,7 @@ function toFormData(obj, formData, options) {
|
|
|
873
896
|
}
|
|
874
897
|
|
|
875
898
|
// eslint-disable-next-line no-param-reassign
|
|
876
|
-
formData = formData || new (
|
|
899
|
+
formData = formData || new (FormData)();
|
|
877
900
|
|
|
878
901
|
// eslint-disable-next-line no-param-reassign
|
|
879
902
|
options = utils.toFlatObject(options, {
|
|
@@ -891,7 +914,7 @@ function toFormData(obj, formData, options) {
|
|
|
891
914
|
const dots = options.dots;
|
|
892
915
|
const indexes = options.indexes;
|
|
893
916
|
const _Blob = options.Blob || typeof Blob !== 'undefined' && Blob;
|
|
894
|
-
const useBlob = _Blob &&
|
|
917
|
+
const useBlob = _Blob && utils.isSpecCompliantForm(formData);
|
|
895
918
|
|
|
896
919
|
if (!utils.isFunction(visitor)) {
|
|
897
920
|
throw new TypeError('visitor must be a function');
|
|
@@ -1723,8 +1746,20 @@ class AxiosHeaders {
|
|
|
1723
1746
|
return deleted;
|
|
1724
1747
|
}
|
|
1725
1748
|
|
|
1726
|
-
clear() {
|
|
1727
|
-
|
|
1749
|
+
clear(matcher) {
|
|
1750
|
+
const keys = Object.keys(this);
|
|
1751
|
+
let i = keys.length;
|
|
1752
|
+
let deleted = false;
|
|
1753
|
+
|
|
1754
|
+
while (i--) {
|
|
1755
|
+
const key = keys[i];
|
|
1756
|
+
if(!matcher || matchHeaderValue(this, this[key], key, matcher)) {
|
|
1757
|
+
delete this[key];
|
|
1758
|
+
deleted = true;
|
|
1759
|
+
}
|
|
1760
|
+
}
|
|
1761
|
+
|
|
1762
|
+
return deleted;
|
|
1728
1763
|
}
|
|
1729
1764
|
|
|
1730
1765
|
normalize(format) {
|
|
@@ -1815,7 +1850,7 @@ class AxiosHeaders {
|
|
|
1815
1850
|
}
|
|
1816
1851
|
}
|
|
1817
1852
|
|
|
1818
|
-
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent']);
|
|
1853
|
+
AxiosHeaders.accessor(['Content-Type', 'Content-Length', 'Accept', 'Accept-Encoding', 'User-Agent', 'Authorization']);
|
|
1819
1854
|
|
|
1820
1855
|
utils.freezeMethods(AxiosHeaders.prototype);
|
|
1821
1856
|
utils.freezeMethods(AxiosHeaders);
|
|
@@ -1866,9 +1901,6 @@ utils.inherits(CanceledError, AxiosError, {
|
|
|
1866
1901
|
__CANCEL__: true
|
|
1867
1902
|
});
|
|
1868
1903
|
|
|
1869
|
-
// eslint-disable-next-line strict
|
|
1870
|
-
const httpAdapter = null;
|
|
1871
|
-
|
|
1872
1904
|
/**
|
|
1873
1905
|
* Resolve or reject a Promise based on response status.
|
|
1874
1906
|
*
|
|
@@ -2569,7 +2601,7 @@ function mergeConfig(config1, config2) {
|
|
|
2569
2601
|
return config;
|
|
2570
2602
|
}
|
|
2571
2603
|
|
|
2572
|
-
const VERSION = "1.
|
|
2604
|
+
const VERSION = "1.3.0";
|
|
2573
2605
|
|
|
2574
2606
|
const validators$1 = {};
|
|
2575
2607
|
|
package/dist/esm/loader.js
CHANGED
|
@@ -10,7 +10,7 @@ const patchEsm = () => {
|
|
|
10
10
|
const defineCustomElements = (win, options) => {
|
|
11
11
|
if (typeof window === 'undefined') return Promise.resolve();
|
|
12
12
|
return patchEsm().then(() => {
|
|
13
|
-
return bootstrapLazy([["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"pdfUrl":[32],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"recipientsAssigned":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"focusField":[64]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"]}]]],["verdocs-
|
|
13
|
+
return bootstrapLazy([["verdocs-build",[[0,"verdocs-build",{"endpoint":[16],"templateId":[1,"template-id"],"step":[32],"pdfUrl":[32],"template":[32]}]]],["verdocs-sign",[[0,"verdocs-sign",{"envelopeId":[1,"envelope-id"],"roleId":[1,"role-id"],"inviteCode":[1,"invite-code"],"recipient":[32],"signerToken":[32],"hasSignature":[32],"nextButtonLabel":[32],"nextSubmits":[32],"errorMessage":[32],"focusedField":[32],"isDone":[32],"showDone":[32],"finishLater":[32],"showFinishLater":[32],"agreed":[32],"documentsSingularPlural":[32]}]]],["verdocs-field-initial",[[0,"verdocs-field-initial",{"field":[16],"disabled":[4],"initials":[1],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempInitials":[32],"focusField":[64]}]]],["verdocs-auth",[[0,"verdocs-auth",{"endpoint":[16],"visible":[4],"logo":[1],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]]],["verdocs-field-date",[[0,"verdocs-field-date",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"containerId":[32],"focusField":[64]}]]],["verdocs-field-textarea",[[0,"verdocs-field-textarea",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-textbox",[[0,"verdocs-field-textbox",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-timestamp",[[0,"verdocs-field-timestamp",{"field":[16],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-search",[[0,"verdocs-search",{"endpoint":[16]}]]],["verdocs-send",[[0,"verdocs-send",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"pdfUrl":[32],"containerId":[32],"rolesAtLevel":[32],"showPickerForId":[32],"sessionContacts":[32],"recipientsAssigned":[32]}]]],["verdocs-field-attachment",[[0,"verdocs-field-attachment",{"field":[16],"disabled":[4],"roleIndex":[2,"role-index"],"focusField":[64]}]]],["verdocs-preview",[[0,"verdocs-preview",{"endpoint":[16],"templateId":[1,"template-id"]}]]],["verdocs-envelope-sidebar",[[0,"verdocs-envelope-sidebar",{"endpoint":[16],"envelopeId":[1,"envelope-id"],"activeTab":[32],"panelOpen":[32]}]]],["verdocs-kba-dialog",[[0,"verdocs-kba-dialog",{"step":[2],"steps":[2],"helptitle":[1],"helptext":[1],"mode":[1],"label":[1],"placeholder":[1],"choices":[16],"response":[32]}]]],["verdocs-field-checkbox",[[0,"verdocs-field-checkbox",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2]}]]],["verdocs-field-dropdown",[[0,"verdocs-field-dropdown",{"field":[16],"disabled":[4],"roleindex":[2],"focusField":[64]}]]],["verdocs-field-payment",[[0,"verdocs-field-payment",{"field":[16],"disabled":[4],"fields":[16],"pageNum":[2,"page-num"],"roleName":[1,"role-name"],"fieldId":[1,"field-id"],"recipients":[8],"selectedRoleName":[1,"selected-role-name"],"pdfPages":[16],"currentSignature":[1,"current-signature"],"currentSignatureId":[1,"current-signature-id"],"currentInitial":[1,"current-initial"],"currentInitialId":[1,"current-initial-id"],"focused":[4],"signed":[4],"roleindex":[2],"preparedMessage":[32],"signatureUrl":[32]}]]],["verdocs-field-radio-button",[[0,"verdocs-field-radio-button",{"field":[16],"option":[2],"disabled":[4],"done":[4],"roleindex":[2]}]]],["verdocs-organization-card",[[0,"verdocs-organization-card",{"organization":[16]}]]],["verdocs-search-tabs",[[0,"verdocs-search-tabs",{"selected":[32]}]]],["verdocs-status-indicator",[[0,"verdocs-status-indicator",{"size":[1],"theme":[1],"status":[1],"envelope":[16],"isOpen":[32],"recipientStatusIcons":[32],"containerId":[32]}]]],["verdocs-template-card",[[0,"verdocs-template-card",{"template":[16]}]]],["verdocs-template-tags",[[0,"verdocs-template-tags",{"tags":[16]}]]],["verdocs-toggle",[[0,"verdocs-toggle",{"options":[16],"theme":[1],"selectedOption":[32]}]]],["verdocs-view",[[0,"verdocs-view",{"endpoint":[16],"envelopeId":[1,"envelope-id"]}]]],["verdocs-toggle-button",[[0,"verdocs-toggle-button",{"active":[4],"icon":[1],"label":[1],"size":[1],"_active":[32]}]]],["verdocs-button",[[0,"verdocs-button",{"label":[1],"startIcon":[1,"start-icon"],"endIcon":[1,"end-icon"],"size":[1],"type":[1],"variant":[1],"disabled":[4]}]]],["verdocs-contact-picker",[[0,"verdocs-contact-picker",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32]}]]],["verdocs-initial-dialog",[[0,"verdocs-initial-dialog",{"initials":[1],"fontLoaded":[32],"enteredInitials":[32],"mode":[32]}]]],["verdocs-upload-dialog",[[0,"verdocs-upload-dialog",{"draggingOver":[32],"decodedFiles":[32]}]]],["verdocs-ok-dialog",[[0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"showCancel":[4,"show-cancel"]}]]],["verdocs-quick-functions_3",[[0,"verdocs-quick-functions",{"endpoint":[16]}],[0,"verdocs-search-activity",{"endpoint":[16],"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}],[0,"verdocs-search-box",{"endpoint":[16],"placeholder":[1],"type":[1],"query":[1],"grabsFocus":[4,"grabs-focus"],"focusField":[64]}]]],["verdocs-checkbox",[[0,"verdocs-checkbox",{"checked":[4],"name":[1],"label":[1],"value":[1],"theme":[1],"disabled":[4]}]]],["verdocs-dropdown",[[0,"verdocs-dropdown",{"options":[16],"open":[32]}]]],["verdocs-radio-button",[[0,"verdocs-radio-button",{"checked":[4],"name":[1],"value":[1],"disabled":[4]}]]],["verdocs-help-icon_2",[[0,"verdocs-template-sender-dialog",{"value":[1],"newValue":[32]}],[0,"verdocs-help-icon",{"text":[1],"containerId":[32]}]]],["verdocs-field-signature_3",[[0,"verdocs-field-signature",{"field":[16],"name":[1],"disabled":[4],"editable":[4],"moveable":[4],"done":[4],"roleindex":[2],"tempSignature":[32],"focusField":[64]}],[0,"verdocs-toolbar-icon",{"text":[1],"icon":[1],"containerId":[32]}],[0,"verdocs-signature-dialog",{"name":[1],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]]],["verdocs-document-page_2",[[0,"verdocs-document-page",{"pageImageUri":[1,"page-image-uri"],"pageNumber":[2,"page-number"],"virtualWidth":[2,"virtual-width"],"virtualHeight":[1026,"virtual-height"],"layers":[16],"containerId":[32],"renderedWidth":[32],"renderedHeight":[32],"naturalWidth":[32],"naturalHeight":[32],"aspectRatio":[32],"skipFirstNotification":[32]}],[0,"verdocs-loader"]]],["verdocs-button-panel_3",[[4,"verdocs-button-panel",{"icon":[1]}],[0,"verdocs-select-input",{"value":[1],"label":[1],"options":[16],"disabled":[4]}],[0,"verdocs-text-input",{"value":[1],"label":[1],"placeholder":[1],"autocomplete":[1],"type":[1],"disabled":[4]}]]],["verdocs-template-create_4",[[0,"verdocs-template-fields",{"endpoint":[16],"templateId":[1,"template-id"]}],[0,"verdocs-template-properties",{"endpoint":[16],"templateId":[1,"template-id"],"template":[32],"name":[32],"visibility":[32],"sendReminders":[32],"firstReminderDays":[32],"reminderDays":[32]}],[0,"verdocs-template-recipients",{"endpoint":[16],"templateRole":[16],"contactSuggestions":[16],"name":[32],"email":[32],"phone":[32],"message":[32],"showSuggestions":[32],"showMessage":[32],"delegator":[32],"sender":[32],"showingSenderDialog":[32],"orderedRoles":[32]}],[0,"verdocs-template-create",{"endpoint":[16],"file":[32]}]]]], options);
|
|
14
14
|
});
|
|
15
15
|
};
|
|
16
16
|
|
|
@@ -1,114 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as getEnvelopeFile } from './Envelopes-130fd6ea.js';
|
|
2
2
|
import { d as downloadBlob } from './Files-70a192df.js';
|
|
3
3
|
|
|
4
|
-
var __awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
5
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
6
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
8
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
9
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
10
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
|
-
});
|
|
12
|
-
};
|
|
13
|
-
var __generator = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
14
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
15
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
16
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
17
|
-
function step(op) {
|
|
18
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
19
|
-
while (_) try {
|
|
20
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
21
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
22
|
-
switch (op[0]) {
|
|
23
|
-
case 0: case 1: t = op; break;
|
|
24
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
25
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
26
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
27
|
-
default:
|
|
28
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
29
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
30
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
31
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
32
|
-
if (t[2]) _.ops.pop();
|
|
33
|
-
_.trys.pop(); continue;
|
|
34
|
-
}
|
|
35
|
-
op = body.call(thisArg, _);
|
|
36
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
37
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* Get a signing session for an Envelope.
|
|
42
|
-
*/
|
|
43
|
-
var getSigningSession = function (endpoint, params) { return __awaiter(void 0, void 0, void 0, function () {
|
|
44
|
-
return __generator(this, function (_a) {
|
|
45
|
-
return [2 /*return*/, endpoint.api //
|
|
46
|
-
.get("/envelopes/".concat(params.envelopeId, "/recipients/").concat(encodeURIComponent(params.roleId), "/invitation/").concat(params.inviteCode))
|
|
47
|
-
.then(function (r) {
|
|
48
|
-
var _a;
|
|
49
|
-
// Avoiding a jsonwebtoken dependency here - we don't actually need the whole library
|
|
50
|
-
var signerToken = ((_a = r.headers) === null || _a === void 0 ? void 0 : _a.signer_token) || '';
|
|
51
|
-
var session = decodeAccessTokenBody(signerToken);
|
|
52
|
-
endpoint.setToken(signerToken);
|
|
53
|
-
return { recipient: r.data, session: session, signerToken: signerToken };
|
|
54
|
-
})];
|
|
55
|
-
});
|
|
56
|
-
}); };
|
|
57
|
-
/**
|
|
58
|
-
* Get all metadata for an Envelope.
|
|
59
|
-
*/
|
|
60
|
-
var getEnvelope = function (endpoint, envelopeId, ssr) { return __awaiter(void 0, void 0, void 0, function () {
|
|
61
|
-
return __generator(this, function (_a) {
|
|
62
|
-
return [2 /*return*/, endpoint.api //
|
|
63
|
-
.get("/envelopes/".concat(envelopeId) + (ssr ? '?ssr=true' : ''))
|
|
64
|
-
.then(function (r) { return r.data; })];
|
|
65
|
-
});
|
|
66
|
-
}); };
|
|
67
|
-
/**
|
|
68
|
-
* Get (binary download) a file attached to an Envelope. It is important to use this method
|
|
69
|
-
* rather than a direct A HREF or similar link to set the authorization headers for the
|
|
70
|
-
* request.
|
|
71
|
-
*/
|
|
72
|
-
var getEnvelopeFile = function (endpoint, envelopeId, documentId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
73
|
-
return __generator(this, function (_a) {
|
|
74
|
-
return [2 /*return*/, endpoint.api //
|
|
75
|
-
.get("/envelopes/".concat(envelopeId, "/envelope_documents/").concat(documentId, "?file=true"), { responseType: 'blob' })
|
|
76
|
-
.then(function (r) { return r.data; })];
|
|
77
|
-
});
|
|
78
|
-
}); };
|
|
79
|
-
/**
|
|
80
|
-
* Update a Document field. Typically called during the signing process as a Recipient fills in fields.
|
|
81
|
-
*/
|
|
82
|
-
var updateEnvelopeField = function (endpoint, envelopeId, fieldName, value) { return __awaiter(void 0, void 0, void 0, function () {
|
|
83
|
-
return __generator(this, function (_a) {
|
|
84
|
-
return [2 /*return*/, endpoint.api //
|
|
85
|
-
.put("/envelopes/".concat(envelopeId, "/fields/").concat(fieldName), value)
|
|
86
|
-
.then(function (r) { return r.data; })];
|
|
87
|
-
});
|
|
88
|
-
}); };
|
|
89
|
-
/**
|
|
90
|
-
* Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a
|
|
91
|
-
* signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
|
|
92
|
-
*/
|
|
93
|
-
var updateEnvelopeFieldSignature = function (endpoint, envelopeId, fieldName, signatureId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
94
|
-
return __generator(this, function (_a) {
|
|
95
|
-
return [2 /*return*/, endpoint.api //
|
|
96
|
-
.put("/envelopes/".concat(envelopeId, "/fields/").concat(fieldName, "/signature/").concat(signatureId))
|
|
97
|
-
.then(function (r) { return r.data; })];
|
|
98
|
-
});
|
|
99
|
-
}); };
|
|
100
|
-
/**
|
|
101
|
-
* Update a Document signature field. Signature fields are ID-driven. Call `Document.createSignature()` first to create a
|
|
102
|
-
* signature for a Recipient, then call `Documents.updateDocumentFieldSignature()` to attach it to a field.
|
|
103
|
-
*/
|
|
104
|
-
var updateEnvelopeFieldInitials = function (endpoint, envelopeId, fieldName, initialId) { return __awaiter(void 0, void 0, void 0, function () {
|
|
105
|
-
return __generator(this, function (_a) {
|
|
106
|
-
return [2 /*return*/, endpoint.api //
|
|
107
|
-
.put("/envelopes/".concat(envelopeId, "/fields/").concat(fieldName, "/initial/").concat(initialId))
|
|
108
|
-
.then(function (r) { return r.data; })];
|
|
109
|
-
});
|
|
110
|
-
}); };
|
|
111
|
-
|
|
112
4
|
function rescale(r, n) {
|
|
113
5
|
return r * n;
|
|
114
6
|
}
|
|
@@ -334,4 +226,4 @@ const throttle = (f, delay) => {
|
|
|
334
226
|
};
|
|
335
227
|
};
|
|
336
228
|
|
|
337
|
-
export { getRoleIndex as a,
|
|
229
|
+
export { getRoleIndex as a, getFieldId as b, updateCssTransform as c, getFieldSettings as g, renderDocumentField as r, savePDF as s, throttle as t, updateDocumentFieldValue as u };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-f78d163d.js';
|
|
2
2
|
import './Types-ab9f6af8.js';
|
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-cf4392fb.js';
|
|
4
4
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
5
5
|
import './Token-54690789.js';
|
|
6
6
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
|
|
2
2
|
import './Types-ab9f6af8.js';
|
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-cf4392fb.js';
|
|
4
4
|
import { l as loadTemplate } from './Templates-ad0e1ebe.js';
|
|
5
5
|
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
6
|
import './Token-54690789.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h } from './index-f78d163d.js';
|
|
2
2
|
import './Types-ab9f6af8.js';
|
|
3
|
-
import { V as VerdocsEndpoint } from './VerdocsEndpoint-
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-cf4392fb.js';
|
|
4
4
|
import './Token-54690789.js';
|
|
5
5
|
|
|
6
6
|
const verdocsContactPickerCss = "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}";
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, a as getElement } from './index-f78d163d.js';
|
|
2
|
-
import { t as throttle } from './utils-
|
|
2
|
+
import { t as throttle } from './utils-188fa107.js';
|
|
3
|
+
import './Envelopes-130fd6ea.js';
|
|
3
4
|
import './Token-54690789.js';
|
|
4
5
|
import './Files-70a192df.js';
|
|
5
6
|
|
|
@@ -37,6 +37,7 @@ const VerdocsDropdown = class {
|
|
|
37
37
|
showDropdown() {
|
|
38
38
|
var _a, _b;
|
|
39
39
|
// this.isOpen = true;
|
|
40
|
+
this.open = true;
|
|
40
41
|
this.dropdownMenu.setAttribute('data-show', '');
|
|
41
42
|
this.dropdownMenu.removeAttribute('aria-hidden');
|
|
42
43
|
(_a = this.popper) === null || _a === void 0 ? void 0 : _a.setOptions(options => ({
|
|
@@ -0,0 +1,217 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, H as Host } from './index-f78d163d.js';
|
|
2
|
+
import './Types-ab9f6af8.js';
|
|
3
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint-cf4392fb.js';
|
|
4
|
+
import { g as getEnvelopeById, s as state } from './Envelopes-6982dfc6.js';
|
|
5
|
+
import { S as SDKError } from './errors-9b5498c8.js';
|
|
6
|
+
import { f as format } from './index-d264c496.js';
|
|
7
|
+
import './Token-54690789.js';
|
|
8
|
+
import './Envelopes-130fd6ea.js';
|
|
9
|
+
import './index-fd7b8a34.js';
|
|
10
|
+
import './Templates-0638b1e4.js';
|
|
11
|
+
|
|
12
|
+
const verdocsEnvelopeSidebarCss = "verdocs-envelope-sidebar{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;-ms-flex-direction:row;flex-direction:row;display:-ms-flexbox;display:flex;-ms-flex:0 0 56px;flex:0 0 56px;width:56px;min-height:400px;height:100%;background:#41435e;-webkit-transition:0.5s cubic-bezier(0.35, 0, 0.25, 1);transition:0.5s cubic-bezier(0.35, 0, 0.25, 1)}verdocs-envelope-sidebar.open{-ms-flex:0 0 400px;flex:0 0 400px;width:400px}verdocs-envelope-sidebar .buttons{-ms-flex-direction:column;flex-direction:column;-ms-flex:0 0 56px;flex:0 0 56px;display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .buttons button{height:50px;outline:none;border:none;border-left:2px solid transparent;background:none;width:100%}verdocs-envelope-sidebar .buttons button.active{border-left:2px solid #50bd80}verdocs-envelope-sidebar .buttons button svg{color:white;width:24px;height:24px}verdocs-envelope-sidebar .content{-ms-flex:1;flex:1;display:none;color:white;-ms-flex-direction:column;flex-direction:column;padding:12px 16px 16px}verdocs-envelope-sidebar.open .content{display:-ms-flexbox;display:flex}verdocs-envelope-sidebar .title{margin-bottom:12px;font-size:16px;line-height:24px;font-weight:400;-ms-flex:0;flex:0}verdocs-envelope-sidebar .label{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54);-ms-flex:0;flex:0}verdocs-envelope-sidebar .value{margin-bottom:14px;font-size:14px;font-weight:500;line-height:16px;color:#fff;-ms-flex:0;flex:0}verdocs-envelope-sidebar .recipient-detail{-ms-flex:0;flex:0;padding:8px;position:relative;-ms-flex-direction:column;flex-direction:column;border:solid 1px #979797;margin-bottom:16px}verdocs-envelope-sidebar .recipient-header{-ms-flex-direction:row;flex-direction:row;-webkit-box-sizing:border-box;box-sizing:border-box;display:-ms-flexbox;display:flex;place-content:center space-between;-ms-flex-align:center;align-items:center;margin-bottom:4px}verdocs-envelope-sidebar .recipient-number{width:24px;height:24px;display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;border-radius:24px;font-size:14px;font-weight:500;margin-right:10px;border:solid 1px #979797}verdocs-envelope-sidebar .recipient-type{-ms-flex:1 1 88px;flex:1 1 88px;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:88px;min-width:88px;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status{-ms-flex:1 1 100px;flex:1 1 100px;border-radius:5px;text-align:center;-webkit-box-sizing:border-box;box-sizing:border-box;max-width:100px;min-width:100px;background-color:#616161;text-transform:capitalize}verdocs-envelope-sidebar .recipient-status.invited{background-color:#ff8f00}verdocs-envelope-sidebar .recipient-status.opened{background-color:#616161}verdocs-envelope-sidebar .recipient-status.signed,verdocs-envelope-sidebar .recipient-status.submitted{background-color:#2e7d32}verdocs-envelope-sidebar .recipient-status.pending{background-color:#0277bd}verdocs-envelope-sidebar .recipient-status.canceled,verdocs-envelope-sidebar .recipient-status.declined{background-color:#c62828}verdocs-envelope-sidebar .recipient-content{-ms-flex-direction:column;flex-direction:column}verdocs-envelope-sidebar .history-entry{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:8px 0 0;margin:8px 0 0;border-top:1px solid #dddddd}verdocs-envelope-sidebar .history-entry .activity-icon{margin-right:14px}verdocs-envelope-sidebar .history-entry .activity-icon svg{width:24px;height:24px;fill:#ffffff}verdocs-envelope-sidebar .history-entry .activity-text{font-size:14px;line-height:16px;margin-bottom:4px}verdocs-envelope-sidebar .history-entry .activity-date{font-size:12px;line-height:16px;color:rgba(255, 255, 255, 0.54)}verdocs-envelope-sidebar .content .history-entry:first-of-type{border-top:none}";
|
|
13
|
+
|
|
14
|
+
const InformationCircle = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M11.25 11.25l.041-.02a.75.75 0 011.063.852l-.708 2.836a.75.75 0 001.063.853l.041-.021M21 12a9 9 0 11-18 0 9 9 0 0118 0zm-9-3.75h.008v.008H12V8.25z" /></svg>`;
|
|
15
|
+
const Users = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /></svg>`;
|
|
16
|
+
const ClipboardDocuments = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="#ffffff"><path stroke-linecap="round" stroke-linejoin="round" d="M9 12h3.75M9 15h3.75M9 18h3.75m3 .75H18a2.25 2.25 0 002.25-2.25V6.108c0-1.135-.845-2.098-1.976-2.192a48.424 48.424 0 00-1.123-.08m-5.801 0c-.065.21-.1.433-.1.664 0 .414.336.75.75.75h4.5a.75.75 0 00.75-.75 2.25 2.25 0 00-.1-.664m-5.8 0A2.251 2.251 0 0113.5 2.25H15c1.012 0 1.867.668 2.15 1.586m-5.8 0c-.376.023-.75.05-1.124.08C9.095 4.01 8.25 4.973 8.25 6.108V8.25m0 0H4.875c-.621 0-1.125.504-1.125 1.125v11.25c0 .621.504 1.125 1.125 1.125h9.75c.621 0 1.125-.504 1.125-1.125V9.375c0-.621-.504-1.125-1.125-1.125H8.25zM6.75 12h.008v.008H6.75V12zm0 3h.008v.008H6.75V15zm0 3h.008v.008H6.75V18z" /></svg>`;
|
|
17
|
+
// https://materialui.co/icon/verified-user and https://heroicons.com/
|
|
18
|
+
const ActivityIcons = {
|
|
19
|
+
visibility: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M12 15a3 3 0 100-6 3 3 0 000 6z" /><path fill-rule="evenodd" d="M1.323 11.447C2.811 6.976 7.028 3.75 12.001 3.75c4.97 0 9.185 3.223 10.675 7.69.12.362.12.752 0 1.113-1.487 4.471-5.705 7.697-10.677 7.697-4.97 0-9.186-3.223-10.675-7.69a1.762 1.762 0 010-1.113zM17.25 12a5.25 5.25 0 11-10.5 0 5.25 5.25 0 0110.5 0z" clip-rule="evenodd" /></svg>`,
|
|
20
|
+
pencil: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path d="M21.731 2.269a2.625 2.625 0 00-3.712 0l-1.157 1.157 3.712 3.712 1.157-1.157a2.625 2.625 0 000-3.712zM19.513 8.199l-3.712-3.712-12.15 12.15a5.25 5.25 0 00-1.32 2.214l-.8 2.685a.75.75 0 00.933.933l2.685-.8a5.25 5.25 0 002.214-1.32L19.513 8.2z" /></svg>`,
|
|
21
|
+
mail: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M20 4H4c-1.1 0-1.99.9-1.99 2L2 18c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2zm0 4l-8 5-8-5V6l8 5 8-5v2z"/></svg>`,
|
|
22
|
+
done: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M19.916 4.626a.75.75 0 01.208 1.04l-9 13.5a.75.75 0 01-1.154.114l-6-6a.75.75 0 011.06-1.06l5.353 5.353 8.493-12.739a.75.75 0 011.04-.208z" clip-rule="evenodd" /></svg>`,
|
|
23
|
+
send: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M2.01 21L23 12 2.01 3 2 10l15 2-15 2z"/></svg>`,
|
|
24
|
+
gesture: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M4.59 6.89c.7-.71 1.4-1.35 1.71-1.22.5.2 0 1.03-.3 1.52-.25.42-2.86 3.89-2.86 6.31 0 1.28.48 2.34 1.34 2.98.75.56 1.74.73 2.64.46 1.07-.31 1.95-1.4 3.06-2.77 1.21-1.49 2.83-3.44 4.08-3.44 1.63 0 1.65 1.01 1.76 1.79-3.78.64-5.38 3.67-5.38 5.37 0 1.7 1.44 3.09 3.21 3.09 1.63 0 4.29-1.33 4.69-6.1H21v-2.5h-2.47c-.15-1.65-1.09-4.2-4.03-4.2-2.25 0-4.18 1.91-4.94 2.84-.58.73-2.06 2.48-2.29 2.72-.25.3-.68.84-1.11.84-.45 0-.72-.83-.36-1.92.35-1.09 1.4-2.86 1.85-3.52.78-1.14 1.3-1.92 1.3-3.28C8.95 3.69 7.31 3 6.44 3 5.12 3 3.97 4 3.72 4.25c-.36.36-.66.66-.88.93l1.75 1.71zm9.29 11.66c-.31 0-.74-.26-.74-.72 0-.6.73-2.2 2.87-2.76-.3 2.69-1.43 3.48-2.13 3.48z"/></svg>`,
|
|
25
|
+
clear: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>`,
|
|
26
|
+
check_circle: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"/></svg>`,
|
|
27
|
+
link: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg>`,
|
|
28
|
+
cancel: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2zm5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12 17 15.59z"/></svg>`,
|
|
29
|
+
done_all: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M18 7l-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.41L6 19l1.41-1.41L1.83 12 .41 13.41z"/></svg>`,
|
|
30
|
+
create: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>`,
|
|
31
|
+
perm_identity: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>`,
|
|
32
|
+
people: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M16 11c1.66 0 2.99-1.34 2.99-3S17.66 5 16 5c-1.66 0-3 1.34-3 3s1.34 3 3 3zm-8 0c1.66 0 2.99-1.34 2.99-3S9.66 5 8 5C6.34 5 5 6.34 5 8s1.34 3 3 3zm0 2c-2.33 0-7 1.17-7 3.5V19h14v-2.5c0-2.33-4.67-3.5-7-3.5zm8 0c-.29 0-.62.02-.97.05 1.16.84 1.97 1.97 1.97 3.45V19h6v-2.5c0-2.33-4.67-3.5-7-3.5z"/></svg>`,
|
|
33
|
+
contact_email: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M21 8V7l-3 2-3-2v1l3 2 3-2zm1-5H2C.9 3 0 3.9 0 5v14c0 1.1.9 2 2 2h20c1.1 0 1.99-.9 1.99-2L24 5c0-1.1-.9-2-2-2zM8 6c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm6 12H2v-1c0-2 4-3.1 6-3.1s6 1.1 6 3.1v1zm8-6h-8V6h8v6z"/></svg>`,
|
|
34
|
+
textsms: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="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-2zM9 11H7V9h2v2zm4 0h-2V9h2v2zm4 0h-2V9h2v2z"/></svg>`,
|
|
35
|
+
verified_user: `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="#ffffff"><path fill-rule="evenodd" d="M12.516 2.17a.75.75 0 00-1.032 0 11.209 11.209 0 01-7.877 3.08.75.75 0 00-.722.515A12.74 12.74 0 002.25 9.75c0 5.942 4.064 10.933 9.563 12.348a.749.749 0 00.374 0c5.499-1.415 9.563-6.406 9.563-12.348 0-1.39-.223-2.73-.635-3.985a.75.75 0 00-.722-.516l-.143.001c-2.996 0-5.717-1.17-7.734-3.08zm3.094 8.016a.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>`,
|
|
36
|
+
account_circle: `<svg xmlns="http://www.w3.org/2000/svg" height="24" viewBox="0 0 24 24" width="24"><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 3c1.66 0 3 1.34 3 3s-1.34 3-3 3-3-1.34-3-3 1.34-3 3-3zm0 14.2c-2.5 0-4.71-1.28-6-3.22.03-1.99 4-3.08 6-3.08 1.99 0 5.97 1.09 6 3.08-1.29 1.94-3.5 3.22-6 3.22z"/></svg>`,
|
|
37
|
+
};
|
|
38
|
+
const VerdocsEnvelopeSidebar = class {
|
|
39
|
+
constructor(hostRef) {
|
|
40
|
+
registerInstance(this, hostRef);
|
|
41
|
+
this.sdkError = createEvent(this, "sdkError", 7);
|
|
42
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
|
43
|
+
this.envelopeId = '';
|
|
44
|
+
this.activeTab = 1;
|
|
45
|
+
this.panelOpen = false;
|
|
46
|
+
}
|
|
47
|
+
componentWillLoad() {
|
|
48
|
+
this.endpoint.loadSession();
|
|
49
|
+
}
|
|
50
|
+
// TODO: Handling signing vs preview-as-user cases
|
|
51
|
+
// TODO: Handle anonymous case and failure to load due to not being logged in
|
|
52
|
+
async componentDidLoad() {
|
|
53
|
+
var _a, _b, _c;
|
|
54
|
+
if (!this.envelopeId) {
|
|
55
|
+
console.error(`[SIDEBAR] Missing required envelopeId`);
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
try {
|
|
59
|
+
await getEnvelopeById(this.endpoint, this.envelopeId);
|
|
60
|
+
}
|
|
61
|
+
catch (e) {
|
|
62
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
setTab(tab) {
|
|
66
|
+
this.panelOpen = tab !== this.activeTab || !this.panelOpen;
|
|
67
|
+
this.activeTab = tab;
|
|
68
|
+
}
|
|
69
|
+
// TODO: Refactor to a common library?
|
|
70
|
+
canResendRecipient(recipient) {
|
|
71
|
+
return (!['pending', 'declined', 'submitted', 'canceled'].includes(recipient.status) && //
|
|
72
|
+
!['complete', 'declined', 'canceled'].includes(state.envelope.status));
|
|
73
|
+
}
|
|
74
|
+
canModifyRecipient(recipient) {
|
|
75
|
+
return (!recipient.claimed && //
|
|
76
|
+
!['declined', 'signed', 'submitted', 'canceled'].includes(recipient.status) &&
|
|
77
|
+
!['complete', 'declined', 'canceled'].includes(state.envelope.status));
|
|
78
|
+
}
|
|
79
|
+
handleRecipientAction(recipient, id) {
|
|
80
|
+
console.log('recipient action', id, recipient);
|
|
81
|
+
}
|
|
82
|
+
prepareHistoryEntries() {
|
|
83
|
+
const entries = [];
|
|
84
|
+
const histories = state.envelope.histories || [];
|
|
85
|
+
entries.push({ icon: 'pencil', message: 'Envelope created.', date: new Date(state.envelope.created_at) });
|
|
86
|
+
if (state.envelope.status === 'complete') {
|
|
87
|
+
entries.push({ icon: 'pencil', message: 'Envelope completed.', date: new Date(state.envelope.updated_at) });
|
|
88
|
+
}
|
|
89
|
+
const ownerCanceled = histories.some(history => history.event === 'owner:canceled');
|
|
90
|
+
if (state.envelope.status === 'canceled' && !ownerCanceled) {
|
|
91
|
+
entries.push({ icon: 'pencil', message: 'Envelope Cancelled.', date: new Date(state.envelope.canceled_at) });
|
|
92
|
+
}
|
|
93
|
+
histories.forEach(history => {
|
|
94
|
+
const user = state.envelope.recipients.find(recipient => recipient.role_name === history.role_name);
|
|
95
|
+
const name = (user === null || user === void 0 ? void 0 : user.full_name) || '';
|
|
96
|
+
switch (history.event.toLowerCase()) {
|
|
97
|
+
case 'recipient:signed':
|
|
98
|
+
entries.push({ icon: 'gesture', message: `Signed by ${name}.`, date: new Date(history.created_at) });
|
|
99
|
+
break;
|
|
100
|
+
case 'recipient:declined':
|
|
101
|
+
entries.push({ icon: 'clear', message: `Declined by ${name}.`, date: new Date(history.created_at) });
|
|
102
|
+
break;
|
|
103
|
+
case 'recipient:opened':
|
|
104
|
+
switch (history.event_detail) {
|
|
105
|
+
// TODO: Sync these up with reality
|
|
106
|
+
case 'email':
|
|
107
|
+
case 'mail':
|
|
108
|
+
entries.push({ icon: 'visibility', message: `Opened by ${name}, via email.`, date: new Date(history.created_at) });
|
|
109
|
+
break;
|
|
110
|
+
case 'sms':
|
|
111
|
+
entries.push({ icon: 'visibility', message: `Opened by ${name}, via SMS.`, date: new Date(history.created_at) });
|
|
112
|
+
break;
|
|
113
|
+
case 'in_person_link':
|
|
114
|
+
entries.push({ icon: 'visibility', message: `Opened by ${name}, via In-person link.`, date: new Date(history.created_at) });
|
|
115
|
+
break;
|
|
116
|
+
case 'in_app':
|
|
117
|
+
entries.push({ icon: 'visibility', message: `Opened by ${name}, via dashboard.`, date: new Date(history.created_at) });
|
|
118
|
+
break;
|
|
119
|
+
default:
|
|
120
|
+
entries.push({ icon: 'visibility', message: `Opened by ${name}.`, date: new Date(history.created_at) });
|
|
121
|
+
}
|
|
122
|
+
break;
|
|
123
|
+
case 'recipient:submitted':
|
|
124
|
+
switch (history.event_detail) {
|
|
125
|
+
// TODO: Sync up
|
|
126
|
+
case 'approver':
|
|
127
|
+
entries.push({ icon: 'check_circle', message: `Approved by ${name}.`, date: new Date(history.created_at) });
|
|
128
|
+
break;
|
|
129
|
+
default:
|
|
130
|
+
entries.push({ icon: 'send', message: `Submitted by ${name}.`, date: new Date(history.created_at) });
|
|
131
|
+
break;
|
|
132
|
+
}
|
|
133
|
+
break;
|
|
134
|
+
case 'recipient:prepared':
|
|
135
|
+
entries.push({ icon: 'send', message: `Prepared by ${name}.`, date: new Date(history.created_at) });
|
|
136
|
+
break;
|
|
137
|
+
case 'recipient:claimed':
|
|
138
|
+
if (history.event_detail === 'guest') {
|
|
139
|
+
entries.push({ icon: 'account_circle', message: `${name} claimed the Verdoc as a guest.`, date: new Date(history.created_at) });
|
|
140
|
+
}
|
|
141
|
+
else if (history.event_detail === 'profile') {
|
|
142
|
+
entries.push({ icon: 'verified_user', message: `${name} claimed the Verdoc as a verified user.`, date: new Date(history.created_at) });
|
|
143
|
+
}
|
|
144
|
+
break;
|
|
145
|
+
case 'recipient:agreed':
|
|
146
|
+
entries.push({ icon: 'done', message: `${name} agreed to use electronic records and signatures.`, date: new Date(history.created_at) });
|
|
147
|
+
break;
|
|
148
|
+
case 'recipient:invited':
|
|
149
|
+
if (history.event_detail === 'sms') {
|
|
150
|
+
entries.push({ icon: 'textsms', message: `${name} has been invited via SMS.`, date: new Date(history.created_at) });
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
entries.push({ icon: 'mail', message: `${name} has been invited via email.`, date: new Date(history.created_at) });
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case 'invitation:resent':
|
|
157
|
+
entries.push({
|
|
158
|
+
icon: 'mail',
|
|
159
|
+
message: `Invitation was resent to ${name} ${history.event_detail === 'reminder' ? ' by reminder' : ''}.`,
|
|
160
|
+
date: new Date(history.created_at),
|
|
161
|
+
});
|
|
162
|
+
break;
|
|
163
|
+
case 'envelope:cc':
|
|
164
|
+
entries.push({ icon: 'contact_mail', message: `A copy has been sent to ${name}.`, date: new Date(history.created_at) });
|
|
165
|
+
break;
|
|
166
|
+
case 'recipient:delegated':
|
|
167
|
+
entries.push({ icon: 'people', message: history.event_detail, date: new Date(history.created_at) });
|
|
168
|
+
break;
|
|
169
|
+
case 'recipient:updated_info':
|
|
170
|
+
entries.push({ icon: 'perm_identity', message: history.event_detail, date: new Date(history.created_at) });
|
|
171
|
+
break;
|
|
172
|
+
case 'owner:updated_recipient_info':
|
|
173
|
+
entries.push({ icon: 'perm_identity', message: history.event_detail, date: new Date(history.created_at) });
|
|
174
|
+
break;
|
|
175
|
+
case 'created':
|
|
176
|
+
entries.push({ icon: 'create', message: `Envelope was created.`, date: new Date(history.created_at) });
|
|
177
|
+
break;
|
|
178
|
+
case 'completed':
|
|
179
|
+
entries.push({ icon: 'done_all', message: `Envelope was completed.`, date: new Date(history.created_at) });
|
|
180
|
+
break;
|
|
181
|
+
case 'canceled':
|
|
182
|
+
case 'owner:canceled':
|
|
183
|
+
entries.push({ icon: 'cancel', message: `Envelope was canceled by the creator.`, date: new Date(history.created_at) });
|
|
184
|
+
break;
|
|
185
|
+
case 'owner:get_in_person_link':
|
|
186
|
+
entries.push({ icon: 'link', message: `Owner accessed the In-person link for ${user}.`, date: new Date(history.created_at) });
|
|
187
|
+
break;
|
|
188
|
+
default:
|
|
189
|
+
console.log('unknown', history);
|
|
190
|
+
break;
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
entries.sort((a, b) => b.date.getTime() - a.date.getTime());
|
|
194
|
+
return entries;
|
|
195
|
+
}
|
|
196
|
+
render() {
|
|
197
|
+
var _a, _b, _c;
|
|
198
|
+
if (!state.envelope) {
|
|
199
|
+
return h(Host, null);
|
|
200
|
+
}
|
|
201
|
+
const session = this.endpoint.getSession();
|
|
202
|
+
const isEnvelopeOwner = session.profile_id === state.envelope.profile_id; // TODO: What about org admins?
|
|
203
|
+
const historyEntries = this.prepareHistoryEntries();
|
|
204
|
+
return (h(Host, { class: this.panelOpen ? 'open' : '' }, h("div", { class: "buttons" }, h("button", { class: this.activeTab === 1 ? 'active' : '', onClick: () => this.setTab(1), innerHTML: InformationCircle }), h("button", { class: this.activeTab === 2 ? 'active' : '', onClick: () => this.setTab(2), innerHTML: Users }), h("button", { class: this.activeTab === 3 ? 'active' : '', onClick: () => this.setTab(3), innerHTML: ClipboardDocuments })), this.activeTab === 1 && (h("div", { class: "content" }, h("div", { class: "title" }, "Details"), h("div", { class: "label" }, "Envelope ID"), h("div", { class: "value" }, state.envelope.id), h("div", { class: "label" }, "Date Created"), h("div", { class: "value" }, format(new Date(state.envelope.created_at), 'PP pp')), h("div", { class: "label" }, "Last Modified"), h("div", { class: "value" }, format(new Date(state.envelope.updated_at), 'PP pp')), h("div", { class: "label" }, "Status"), h("div", { class: "value" }, state.envelope.status), h("div", { class: "label" }, "Verdoc Owner UUID"), h("div", { class: "value" }, state.envelope.profile_id), h("div", { class: "label" }, "Verdoc Owner Name"), h("div", { class: "value" }, (_a = state.envelope.profile) === null || _a === void 0 ? void 0 :
|
|
205
|
+
_a.first_name, " ", (_b = state.envelope.profile) === null || _b === void 0 ? void 0 :
|
|
206
|
+
_b.last_name), h("div", { class: "label" }, "Verdoc Owner Email"), h("div", { class: "value" }, (_c = state.envelope.profile) === null || _c === void 0 ? void 0 : _c.email))), this.activeTab === 2 && (h("div", { class: "content" }, h("div", { class: "title" }, "Recipients"), state.envelope.recipients.map((recipient, index) => (h("div", { class: "recipient-detail" }, h("div", { class: "recipient-header" }, h("div", { class: "recipient-number" }, index + 1), h("div", { class: "recipient-type" }, recipient.type), h("div", { class: { 'recipient-status': true, [recipient.status]: true } }, recipient.status), isEnvelopeOwner && (h("verdocs-dropdown", { onOptionSelected: item => this.handleRecipientAction(recipient, item.detail.id), options: [
|
|
207
|
+
{ id: 'reminder', label: 'Send Reminder', disabled: !this.canResendRecipient(recipient) },
|
|
208
|
+
{ id: 'modify', label: 'Modify Recipient', disabled: !this.canModifyRecipient(recipient) },
|
|
209
|
+
{ id: 'inperson', label: 'Get In-Person Link', disabled: !this.canModifyRecipient(recipient) || !['invited', 'opened'].includes(recipient.status) },
|
|
210
|
+
// TODO: Details dialog
|
|
211
|
+
// {id:'details',label: 'View Details'},
|
|
212
|
+
] }))), h("dic", { class: "recipient-content" }, h("div", { class: "recipient-name" }, recipient.full_name), h("div", { class: "recipient-name" }, recipient.email), h("div", { class: "recipient-name" }, recipient.phone))))))), this.activeTab === 3 && (h("div", { class: "content" }, h("div", { class: "title" }, "History"), historyEntries.map(entry => (h("div", { class: "history-entry" }, h("div", { class: "activity-icon", innerHTML: ActivityIcons[entry.icon] || entry.icon }), h("div", { class: "activity-details" }, h("div", { class: "activity-text" }, entry.message), h("div", { class: "activity-date" }, format(entry.date, 'PP pp'))))))))));
|
|
213
|
+
}
|
|
214
|
+
};
|
|
215
|
+
VerdocsEnvelopeSidebar.style = verdocsEnvelopeSidebarCss;
|
|
216
|
+
|
|
217
|
+
export { VerdocsEnvelopeSidebar as verdocs_envelope_sidebar };
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host } from './index-f78d163d.js';
|
|
2
2
|
import { g as getRGBA } from './Colors-1b298092.js';
|
|
3
|
-
import { g as getFieldSettings } from './utils-
|
|
3
|
+
import { g as getFieldSettings } from './utils-188fa107.js';
|
|
4
|
+
import './Envelopes-130fd6ea.js';
|
|
4
5
|
import './Token-54690789.js';
|
|
5
6
|
import './Files-70a192df.js';
|
|
6
7
|
|