@verdocs/web-sdk 2.0.7 → 2.0.9
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/{index-961181ce.js → index-7c19ba1d.js} +602 -37
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-ce815868.js → utils-ae9b4e3e.js} +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +3 -4
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-date.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -2
- package/dist/cjs/verdocs-pagination_3.cjs.entry.js +3 -4
- package/dist/cjs/verdocs-preview.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-send.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-sign.cjs.entry.js +12 -4
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +34 -504
- package/dist/cjs/verdocs-view.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/controls/verdocs-pagination/verdocs-pagination.css +1 -0
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +11 -1
- package/dist/collection/components/envelopes/verdocs-contact-picker/verdocs-contact-picker.css +1 -1
- package/dist/collection/components/envelopes/verdocs-envelope-sidebar/verdocs-envelope-sidebar.js +1 -1
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +23 -29
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +80 -4
- package/dist/components/index2.js +1 -1
- package/dist/components/verdocs-contact-picker2.js +1 -1
- package/dist/components/verdocs-envelope-sidebar.js +1 -1
- package/dist/components/verdocs-pagination2.js +1 -1
- package/dist/components/verdocs-sign.js +11 -1
- package/dist/components/verdocs-templates-list.js +20 -490
- package/dist/docs.json +37 -1
- package/dist/esm/{index-2685d184.js → index-914ed6f7.js} +566 -1
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-51c8f6c7.js → utils-6412577d.js} +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +3 -4
- package/dist/esm/verdocs-envelope-document-page.entry.js +2 -3
- package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -3
- package/dist/esm/verdocs-envelopes-list.entry.js +2 -3
- package/dist/esm/verdocs-field-checkbox.entry.js +2 -3
- package/dist/esm/verdocs-field-date.entry.js +2 -3
- package/dist/esm/verdocs-field-dropdown.entry.js +2 -3
- package/dist/esm/verdocs-field-initial.entry.js +2 -3
- package/dist/esm/verdocs-field-payment.entry.js +2 -3
- package/dist/esm/verdocs-field-radio-button.entry.js +2 -3
- package/dist/esm/verdocs-field-signature.entry.js +2 -3
- package/dist/esm/verdocs-field-textarea.entry.js +2 -3
- package/dist/esm/verdocs-field-textbox.entry.js +2 -3
- package/dist/esm/verdocs-field-timestamp.entry.js +2 -3
- package/dist/esm/verdocs-organization-card.entry.js +1 -2
- package/dist/esm/verdocs-pagination_3.entry.js +3 -4
- package/dist/esm/verdocs-preview.entry.js +2 -3
- package/dist/esm/verdocs-send.entry.js +2 -3
- package/dist/esm/verdocs-sign.entry.js +12 -4
- package/dist/esm/verdocs-template-document-page_2.entry.js +2 -3
- package/dist/esm/verdocs-template-fields_4.entry.js +2 -3
- package/dist/esm/verdocs-templates-list.entry.js +20 -490
- package/dist/esm/verdocs-view.entry.js +2 -3
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/index-914ed6f7.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-51c8f6c7.js → utils-6412577d.js} +1 -1
- package/dist/esm-es5/verdocs-contact-picker.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-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.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-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-preview.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-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +1 -0
- package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +19 -0
- package/dist/types/components.d.ts +16 -0
- package/dist/verdocs-web-sdk/p-071697d2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-07ec8b75.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0867e803.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-10b88811.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-119c68da.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-62aaeefd.system.js → p-13b3dd46.system.js} +1 -1
- package/dist/verdocs-web-sdk/p-1aa15768.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1f8f50ec.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-216fb277.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-25332568.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-27c654c5.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2c589cfe.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3f8cb451.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-47dd8143.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-4a4b097e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-647cdb84.system.js +1 -1
- package/dist/verdocs-web-sdk/p-653b1563.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-670a2414.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-70a1cb8d.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-72127c91.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7895b10e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7c72fce6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-80177cc3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-87a2cd5d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-87cf940c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8f370d3a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9176b478.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a31bf4c7.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-aadfc04d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b4dee4ca.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ba5565d4.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c079268f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c214b652.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c220af42.js +1 -0
- package/dist/verdocs-web-sdk/p-c9a691bf.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cbb985f6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ccc162ab.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-cfb617a2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d0b40fce.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d0c6885b.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d13da19a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d145cb63.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-dc9c4361.system.js +1 -0
- package/dist/verdocs-web-sdk/p-dca1d739.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e01dd4e1.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e40720da.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-e826490a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ea87070d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-fa7332f2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ae4c9e4a.js → p-fc6ce0d8.js} +1 -1
- package/dist/verdocs-web-sdk/p-fdf8bc45.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +1 -1
- package/dist/cjs/index-db620f37.js +0 -575
- package/dist/esm/index-8dc8fdc4.js +0 -568
- package/dist/esm-es5/index-2685d184.js +0 -1
- package/dist/esm-es5/index-8dc8fdc4.js +0 -1
- package/dist/verdocs-web-sdk/p-0385e501.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-11a30706.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1d010a79.system.js +0 -1
- package/dist/verdocs-web-sdk/p-26417803.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2ebc0650.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3561afed.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-35841b7c.js +0 -1
- package/dist/verdocs-web-sdk/p-3a4d619d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-403ea34b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-42d2c651.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-455c136c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-485ed6e3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4fe4e161.js +0 -1
- package/dist/verdocs-web-sdk/p-5255e6f7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5cff7439.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5e92d526.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6995a8d8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6ac57122.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6e8b1251.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6ebab009.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-7cd40ff6.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-844f5d1b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-87232ec1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-88e0bab8.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8b2dc164.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8b77a5dc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-90565aa6.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-91b8a076.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-92e1ea05.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9dde58a8.system.js +0 -1
- package/dist/verdocs-web-sdk/p-a106413b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a3c33953.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a88c77bb.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a8eb011c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b42c686d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b7b48889.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-bd3405ab.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c0b4cda6.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c2eb64ad.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c7cebd38.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c8a1de2c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cf6d8044.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d115c414.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d1809f69.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d3f3c09a.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d45ea55d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d95adf62.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f2207c05.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fac4806c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fc8bb551.entry.js +0 -1
@@ -4,501 +4,17 @@ import { V as VerdocsEndpoint, c as canPerformTemplateAction } from './VerdocsEn
|
|
4
4
|
import { l as listTemplates, d as deleteTemplate } from './Templates-f90883f7.js';
|
5
5
|
import { V as VerdocsToast } from './Toast-f3b8fd46.js';
|
6
6
|
import { S as SDKError } from './errors-9b5498c8.js';
|
7
|
-
import {
|
7
|
+
import { f as format } from './index-914ed6f7.js';
|
8
8
|
|
9
|
-
|
10
|
-
* @name compareAsc
|
11
|
-
* @category Common Helpers
|
12
|
-
* @summary Compare the two dates and return -1, 0 or 1.
|
13
|
-
*
|
14
|
-
* @description
|
15
|
-
* Compare the two dates and return 1 if the first date is after the second,
|
16
|
-
* -1 if the first date is before the second or 0 if dates are equal.
|
17
|
-
*
|
18
|
-
* @param {Date|Number} dateLeft - the first date to compare
|
19
|
-
* @param {Date|Number} dateRight - the second date to compare
|
20
|
-
* @returns {Number} the result of the comparison
|
21
|
-
* @throws {TypeError} 2 arguments required
|
22
|
-
*
|
23
|
-
* @example
|
24
|
-
* // Compare 11 February 1987 and 10 July 1989:
|
25
|
-
* const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))
|
26
|
-
* //=> -1
|
27
|
-
*
|
28
|
-
* @example
|
29
|
-
* // Sort the array of dates:
|
30
|
-
* const result = [
|
31
|
-
* new Date(1995, 6, 2),
|
32
|
-
* new Date(1987, 1, 11),
|
33
|
-
* new Date(1989, 6, 10)
|
34
|
-
* ].sort(compareAsc)
|
35
|
-
* //=> [
|
36
|
-
* // Wed Feb 11 1987 00:00:00,
|
37
|
-
* // Mon Jul 10 1989 00:00:00,
|
38
|
-
* // Sun Jul 02 1995 00:00:00
|
39
|
-
* // ]
|
40
|
-
*/
|
41
|
-
function compareAsc(dirtyDateLeft, dirtyDateRight) {
|
42
|
-
requiredArgs(2, arguments);
|
43
|
-
var dateLeft = toDate(dirtyDateLeft);
|
44
|
-
var dateRight = toDate(dirtyDateRight);
|
45
|
-
var diff = dateLeft.getTime() - dateRight.getTime();
|
46
|
-
if (diff < 0) {
|
47
|
-
return -1;
|
48
|
-
} else if (diff > 0) {
|
49
|
-
return 1;
|
50
|
-
// Return 0 if diff is 0; return NaN if diff is NaN
|
51
|
-
} else {
|
52
|
-
return diff;
|
53
|
-
}
|
54
|
-
}
|
55
|
-
|
56
|
-
/**
|
57
|
-
* @name differenceInCalendarMonths
|
58
|
-
* @category Month Helpers
|
59
|
-
* @summary Get the number of calendar months between the given dates.
|
60
|
-
*
|
61
|
-
* @description
|
62
|
-
* Get the number of calendar months between the given dates.
|
63
|
-
*
|
64
|
-
* @param {Date|Number} dateLeft - the later date
|
65
|
-
* @param {Date|Number} dateRight - the earlier date
|
66
|
-
* @returns {Number} the number of calendar months
|
67
|
-
* @throws {TypeError} 2 arguments required
|
68
|
-
*
|
69
|
-
* @example
|
70
|
-
* // How many calendar months are between 31 January 2014 and 1 September 2014?
|
71
|
-
* const result = differenceInCalendarMonths(
|
72
|
-
* new Date(2014, 8, 1),
|
73
|
-
* new Date(2014, 0, 31)
|
74
|
-
* )
|
75
|
-
* //=> 8
|
76
|
-
*/
|
77
|
-
function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {
|
78
|
-
requiredArgs(2, arguments);
|
79
|
-
var dateLeft = toDate(dirtyDateLeft);
|
80
|
-
var dateRight = toDate(dirtyDateRight);
|
81
|
-
var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();
|
82
|
-
var monthDiff = dateLeft.getMonth() - dateRight.getMonth();
|
83
|
-
return yearDiff * 12 + monthDiff;
|
84
|
-
}
|
85
|
-
|
86
|
-
/**
|
87
|
-
* @name differenceInMilliseconds
|
88
|
-
* @category Millisecond Helpers
|
89
|
-
* @summary Get the number of milliseconds between the given dates.
|
90
|
-
*
|
91
|
-
* @description
|
92
|
-
* Get the number of milliseconds between the given dates.
|
93
|
-
*
|
94
|
-
* @param {Date|Number} dateLeft - the later date
|
95
|
-
* @param {Date|Number} dateRight - the earlier date
|
96
|
-
* @returns {Number} the number of milliseconds
|
97
|
-
* @throws {TypeError} 2 arguments required
|
98
|
-
*
|
99
|
-
* @example
|
100
|
-
* // How many milliseconds are between
|
101
|
-
* // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?
|
102
|
-
* const result = differenceInMilliseconds(
|
103
|
-
* new Date(2014, 6, 2, 12, 30, 21, 700),
|
104
|
-
* new Date(2014, 6, 2, 12, 30, 20, 600)
|
105
|
-
* )
|
106
|
-
* //=> 1100
|
107
|
-
*/
|
108
|
-
function differenceInMilliseconds(dateLeft, dateRight) {
|
109
|
-
requiredArgs(2, arguments);
|
110
|
-
return toDate(dateLeft).getTime() - toDate(dateRight).getTime();
|
111
|
-
}
|
112
|
-
|
113
|
-
var roundingMap = {
|
114
|
-
ceil: Math.ceil,
|
115
|
-
round: Math.round,
|
116
|
-
floor: Math.floor,
|
117
|
-
trunc: function trunc(value) {
|
118
|
-
return value < 0 ? Math.ceil(value) : Math.floor(value);
|
119
|
-
} // Math.trunc is not supported by IE
|
120
|
-
};
|
121
|
-
|
122
|
-
var defaultRoundingMethod = 'trunc';
|
123
|
-
function getRoundingMethod(method) {
|
124
|
-
return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
|
125
|
-
}
|
126
|
-
|
127
|
-
/**
|
128
|
-
* @name endOfDay
|
129
|
-
* @category Day Helpers
|
130
|
-
* @summary Return the end of a day for the given date.
|
131
|
-
*
|
132
|
-
* @description
|
133
|
-
* Return the end of a day for the given date.
|
134
|
-
* The result will be in the local timezone.
|
135
|
-
*
|
136
|
-
* @param {Date|Number} date - the original date
|
137
|
-
* @returns {Date} the end of a day
|
138
|
-
* @throws {TypeError} 1 argument required
|
139
|
-
*
|
140
|
-
* @example
|
141
|
-
* // The end of a day for 2 September 2014 11:55:00:
|
142
|
-
* const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
143
|
-
* //=> Tue Sep 02 2014 23:59:59.999
|
144
|
-
*/
|
145
|
-
function endOfDay(dirtyDate) {
|
146
|
-
requiredArgs(1, arguments);
|
147
|
-
var date = toDate(dirtyDate);
|
148
|
-
date.setHours(23, 59, 59, 999);
|
149
|
-
return date;
|
150
|
-
}
|
151
|
-
|
152
|
-
/**
|
153
|
-
* @name endOfMonth
|
154
|
-
* @category Month Helpers
|
155
|
-
* @summary Return the end of a month for the given date.
|
156
|
-
*
|
157
|
-
* @description
|
158
|
-
* Return the end of a month for the given date.
|
159
|
-
* The result will be in the local timezone.
|
160
|
-
*
|
161
|
-
* @param {Date|Number} date - the original date
|
162
|
-
* @returns {Date} the end of a month
|
163
|
-
* @throws {TypeError} 1 argument required
|
164
|
-
*
|
165
|
-
* @example
|
166
|
-
* // The end of a month for 2 September 2014 11:55:00:
|
167
|
-
* const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
168
|
-
* //=> Tue Sep 30 2014 23:59:59.999
|
169
|
-
*/
|
170
|
-
function endOfMonth(dirtyDate) {
|
171
|
-
requiredArgs(1, arguments);
|
172
|
-
var date = toDate(dirtyDate);
|
173
|
-
var month = date.getMonth();
|
174
|
-
date.setFullYear(date.getFullYear(), month + 1, 0);
|
175
|
-
date.setHours(23, 59, 59, 999);
|
176
|
-
return date;
|
177
|
-
}
|
178
|
-
|
179
|
-
/**
|
180
|
-
* @name isLastDayOfMonth
|
181
|
-
* @category Month Helpers
|
182
|
-
* @summary Is the given date the last day of a month?
|
183
|
-
*
|
184
|
-
* @description
|
185
|
-
* Is the given date the last day of a month?
|
186
|
-
*
|
187
|
-
* @param {Date|Number} date - the date to check
|
188
|
-
* @returns {Boolean} the date is the last day of a month
|
189
|
-
* @throws {TypeError} 1 argument required
|
190
|
-
*
|
191
|
-
* @example
|
192
|
-
* // Is 28 February 2014 the last day of a month?
|
193
|
-
* const result = isLastDayOfMonth(new Date(2014, 1, 28))
|
194
|
-
* //=> true
|
195
|
-
*/
|
196
|
-
function isLastDayOfMonth(dirtyDate) {
|
197
|
-
requiredArgs(1, arguments);
|
198
|
-
var date = toDate(dirtyDate);
|
199
|
-
return endOfDay(date).getTime() === endOfMonth(date).getTime();
|
200
|
-
}
|
201
|
-
|
202
|
-
/**
|
203
|
-
* @name differenceInMonths
|
204
|
-
* @category Month Helpers
|
205
|
-
* @summary Get the number of full months between the given dates.
|
206
|
-
*
|
207
|
-
* @description
|
208
|
-
* Get the number of full months between the given dates using trunc as a default rounding method.
|
209
|
-
*
|
210
|
-
* @param {Date|Number} dateLeft - the later date
|
211
|
-
* @param {Date|Number} dateRight - the earlier date
|
212
|
-
* @returns {Number} the number of full months
|
213
|
-
* @throws {TypeError} 2 arguments required
|
214
|
-
*
|
215
|
-
* @example
|
216
|
-
* // How many full months are between 31 January 2014 and 1 September 2014?
|
217
|
-
* const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))
|
218
|
-
* //=> 7
|
219
|
-
*/
|
220
|
-
function differenceInMonths(dirtyDateLeft, dirtyDateRight) {
|
221
|
-
requiredArgs(2, arguments);
|
222
|
-
var dateLeft = toDate(dirtyDateLeft);
|
223
|
-
var dateRight = toDate(dirtyDateRight);
|
224
|
-
var sign = compareAsc(dateLeft, dateRight);
|
225
|
-
var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));
|
226
|
-
var result;
|
227
|
-
|
228
|
-
// Check for the difference of less than month
|
229
|
-
if (difference < 1) {
|
230
|
-
result = 0;
|
231
|
-
} else {
|
232
|
-
if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {
|
233
|
-
// This will check if the date is end of Feb and assign a higher end of month date
|
234
|
-
// to compare it with Jan
|
235
|
-
dateLeft.setDate(30);
|
236
|
-
}
|
237
|
-
dateLeft.setMonth(dateLeft.getMonth() - sign * difference);
|
238
|
-
|
239
|
-
// Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full
|
240
|
-
// If so, result must be decreased by 1 in absolute value
|
241
|
-
var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign;
|
242
|
-
|
243
|
-
// Check for cases of one full calendar month
|
244
|
-
if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {
|
245
|
-
isLastMonthNotFull = false;
|
246
|
-
}
|
247
|
-
result = sign * (difference - Number(isLastMonthNotFull));
|
248
|
-
}
|
249
|
-
|
250
|
-
// Prevent negative zero
|
251
|
-
return result === 0 ? 0 : result;
|
252
|
-
}
|
253
|
-
|
254
|
-
/**
|
255
|
-
* @name differenceInSeconds
|
256
|
-
* @category Second Helpers
|
257
|
-
* @summary Get the number of seconds between the given dates.
|
258
|
-
*
|
259
|
-
* @description
|
260
|
-
* Get the number of seconds between the given dates.
|
261
|
-
*
|
262
|
-
* @param {Date|Number} dateLeft - the later date
|
263
|
-
* @param {Date|Number} dateRight - the earlier date
|
264
|
-
* @param {Object} [options] - an object with options.
|
265
|
-
* @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)
|
266
|
-
* @returns {Number} the number of seconds
|
267
|
-
* @throws {TypeError} 2 arguments required
|
268
|
-
*
|
269
|
-
* @example
|
270
|
-
* // How many seconds are between
|
271
|
-
* // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?
|
272
|
-
* const result = differenceInSeconds(
|
273
|
-
* new Date(2014, 6, 2, 12, 30, 20, 0),
|
274
|
-
* new Date(2014, 6, 2, 12, 30, 7, 999)
|
275
|
-
* )
|
276
|
-
* //=> 12
|
277
|
-
*/
|
278
|
-
function differenceInSeconds(dateLeft, dateRight, options) {
|
279
|
-
requiredArgs(2, arguments);
|
280
|
-
var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;
|
281
|
-
return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
|
282
|
-
}
|
283
|
-
|
284
|
-
function assign(target, object) {
|
285
|
-
if (target == null) {
|
286
|
-
throw new TypeError('assign requires that input parameter not be null or undefined');
|
287
|
-
}
|
288
|
-
for (var property in object) {
|
289
|
-
if (Object.prototype.hasOwnProperty.call(object, property)) {
|
290
|
-
target[property] = object[property];
|
291
|
-
}
|
292
|
-
}
|
293
|
-
return target;
|
294
|
-
}
|
295
|
-
|
296
|
-
function cloneObject(object) {
|
297
|
-
return assign({}, object);
|
298
|
-
}
|
299
|
-
|
300
|
-
var MINUTES_IN_DAY = 1440;
|
301
|
-
var MINUTES_IN_ALMOST_TWO_DAYS = 2520;
|
302
|
-
var MINUTES_IN_MONTH = 43200;
|
303
|
-
var MINUTES_IN_TWO_MONTHS = 86400;
|
304
|
-
|
305
|
-
/**
|
306
|
-
* @name formatDistance
|
307
|
-
* @category Common Helpers
|
308
|
-
* @summary Return the distance between the given dates in words.
|
309
|
-
*
|
310
|
-
* @description
|
311
|
-
* Return the distance between the given dates in words.
|
312
|
-
*
|
313
|
-
* | Distance between dates | Result |
|
314
|
-
* |-------------------------------------------------------------------|---------------------|
|
315
|
-
* | 0 ... 30 secs | less than a minute |
|
316
|
-
* | 30 secs ... 1 min 30 secs | 1 minute |
|
317
|
-
* | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
|
318
|
-
* | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
|
319
|
-
* | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
|
320
|
-
* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
|
321
|
-
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
|
322
|
-
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
|
323
|
-
* | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
|
324
|
-
* | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
|
325
|
-
* | 1 yr ... 1 yr 3 months | about 1 year |
|
326
|
-
* | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
|
327
|
-
* | 1 yr 9 months ... 2 yrs | almost 2 years |
|
328
|
-
* | N yrs ... N yrs 3 months | about N years |
|
329
|
-
* | N yrs 3 months ... N yrs 9 months | over N years |
|
330
|
-
* | N yrs 9 months ... N+1 yrs | almost N+1 years |
|
331
|
-
*
|
332
|
-
* With `options.includeSeconds == true`:
|
333
|
-
* | Distance between dates | Result |
|
334
|
-
* |------------------------|----------------------|
|
335
|
-
* | 0 secs ... 5 secs | less than 5 seconds |
|
336
|
-
* | 5 secs ... 10 secs | less than 10 seconds |
|
337
|
-
* | 10 secs ... 20 secs | less than 20 seconds |
|
338
|
-
* | 20 secs ... 40 secs | half a minute |
|
339
|
-
* | 40 secs ... 60 secs | less than a minute |
|
340
|
-
* | 60 secs ... 90 secs | 1 minute |
|
341
|
-
*
|
342
|
-
* @param {Date|Number} date - the date
|
343
|
-
* @param {Date|Number} baseDate - the date to compare with
|
344
|
-
* @param {Object} [options] - an object with options.
|
345
|
-
* @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed
|
346
|
-
* @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first
|
347
|
-
* @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
348
|
-
* @returns {String} the distance in words
|
349
|
-
* @throws {TypeError} 2 arguments required
|
350
|
-
* @throws {RangeError} `date` must not be Invalid Date
|
351
|
-
* @throws {RangeError} `baseDate` must not be Invalid Date
|
352
|
-
* @throws {RangeError} `options.locale` must contain `formatDistance` property
|
353
|
-
*
|
354
|
-
* @example
|
355
|
-
* // What is the distance between 2 July 2014 and 1 January 2015?
|
356
|
-
* const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))
|
357
|
-
* //=> '6 months'
|
358
|
-
*
|
359
|
-
* @example
|
360
|
-
* // What is the distance between 1 January 2015 00:00:15
|
361
|
-
* // and 1 January 2015 00:00:00, including seconds?
|
362
|
-
* const result = formatDistance(
|
363
|
-
* new Date(2015, 0, 1, 0, 0, 15),
|
364
|
-
* new Date(2015, 0, 1, 0, 0, 0),
|
365
|
-
* { includeSeconds: true }
|
366
|
-
* )
|
367
|
-
* //=> 'less than 20 seconds'
|
368
|
-
*
|
369
|
-
* @example
|
370
|
-
* // What is the distance from 1 January 2016
|
371
|
-
* // to 1 January 2015, with a suffix?
|
372
|
-
* const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {
|
373
|
-
* addSuffix: true
|
374
|
-
* })
|
375
|
-
* //=> 'about 1 year ago'
|
376
|
-
*
|
377
|
-
* @example
|
378
|
-
* // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?
|
379
|
-
* import { eoLocale } from 'date-fns/locale/eo'
|
380
|
-
* const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {
|
381
|
-
* locale: eoLocale
|
382
|
-
* })
|
383
|
-
* //=> 'pli ol 1 jaro'
|
384
|
-
*/
|
385
|
-
|
386
|
-
function formatDistance(dirtyDate, dirtyBaseDate, options) {
|
387
|
-
var _ref, _options$locale;
|
388
|
-
requiredArgs(2, arguments);
|
389
|
-
var defaultOptions = getDefaultOptions();
|
390
|
-
var locale$1 = (_ref = (_options$locale = options === null || options === void 0 ? void 0 : options.locale) !== null && _options$locale !== void 0 ? _options$locale : defaultOptions.locale) !== null && _ref !== void 0 ? _ref : locale;
|
391
|
-
if (!locale$1.formatDistance) {
|
392
|
-
throw new RangeError('locale must contain formatDistance property');
|
393
|
-
}
|
394
|
-
var comparison = compareAsc(dirtyDate, dirtyBaseDate);
|
395
|
-
if (isNaN(comparison)) {
|
396
|
-
throw new RangeError('Invalid time value');
|
397
|
-
}
|
398
|
-
var localizeOptions = assign(cloneObject(options), {
|
399
|
-
addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix),
|
400
|
-
comparison: comparison
|
401
|
-
});
|
402
|
-
var dateLeft;
|
403
|
-
var dateRight;
|
404
|
-
if (comparison > 0) {
|
405
|
-
dateLeft = toDate(dirtyBaseDate);
|
406
|
-
dateRight = toDate(dirtyDate);
|
407
|
-
} else {
|
408
|
-
dateLeft = toDate(dirtyDate);
|
409
|
-
dateRight = toDate(dirtyBaseDate);
|
410
|
-
}
|
411
|
-
var seconds = differenceInSeconds(dateRight, dateLeft);
|
412
|
-
var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;
|
413
|
-
var minutes = Math.round((seconds - offsetInSeconds) / 60);
|
414
|
-
var months;
|
415
|
-
|
416
|
-
// 0 up to 2 mins
|
417
|
-
if (minutes < 2) {
|
418
|
-
if (options !== null && options !== void 0 && options.includeSeconds) {
|
419
|
-
if (seconds < 5) {
|
420
|
-
return locale$1.formatDistance('lessThanXSeconds', 5, localizeOptions);
|
421
|
-
} else if (seconds < 10) {
|
422
|
-
return locale$1.formatDistance('lessThanXSeconds', 10, localizeOptions);
|
423
|
-
} else if (seconds < 20) {
|
424
|
-
return locale$1.formatDistance('lessThanXSeconds', 20, localizeOptions);
|
425
|
-
} else if (seconds < 40) {
|
426
|
-
return locale$1.formatDistance('halfAMinute', 0, localizeOptions);
|
427
|
-
} else if (seconds < 60) {
|
428
|
-
return locale$1.formatDistance('lessThanXMinutes', 1, localizeOptions);
|
429
|
-
} else {
|
430
|
-
return locale$1.formatDistance('xMinutes', 1, localizeOptions);
|
431
|
-
}
|
432
|
-
} else {
|
433
|
-
if (minutes === 0) {
|
434
|
-
return locale$1.formatDistance('lessThanXMinutes', 1, localizeOptions);
|
435
|
-
} else {
|
436
|
-
return locale$1.formatDistance('xMinutes', minutes, localizeOptions);
|
437
|
-
}
|
438
|
-
}
|
439
|
-
|
440
|
-
// 2 mins up to 0.75 hrs
|
441
|
-
} else if (minutes < 45) {
|
442
|
-
return locale$1.formatDistance('xMinutes', minutes, localizeOptions);
|
443
|
-
|
444
|
-
// 0.75 hrs up to 1.5 hrs
|
445
|
-
} else if (minutes < 90) {
|
446
|
-
return locale$1.formatDistance('aboutXHours', 1, localizeOptions);
|
447
|
-
|
448
|
-
// 1.5 hrs up to 24 hrs
|
449
|
-
} else if (minutes < MINUTES_IN_DAY) {
|
450
|
-
var hours = Math.round(minutes / 60);
|
451
|
-
return locale$1.formatDistance('aboutXHours', hours, localizeOptions);
|
452
|
-
|
453
|
-
// 1 day up to 1.75 days
|
454
|
-
} else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {
|
455
|
-
return locale$1.formatDistance('xDays', 1, localizeOptions);
|
456
|
-
|
457
|
-
// 1.75 days up to 30 days
|
458
|
-
} else if (minutes < MINUTES_IN_MONTH) {
|
459
|
-
var days = Math.round(minutes / MINUTES_IN_DAY);
|
460
|
-
return locale$1.formatDistance('xDays', days, localizeOptions);
|
461
|
-
|
462
|
-
// 1 month up to 2 months
|
463
|
-
} else if (minutes < MINUTES_IN_TWO_MONTHS) {
|
464
|
-
months = Math.round(minutes / MINUTES_IN_MONTH);
|
465
|
-
return locale$1.formatDistance('aboutXMonths', months, localizeOptions);
|
466
|
-
}
|
467
|
-
months = differenceInMonths(dateRight, dateLeft);
|
468
|
-
|
469
|
-
// 2 months up to 12 months
|
470
|
-
if (months < 12) {
|
471
|
-
var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);
|
472
|
-
return locale$1.formatDistance('xMonths', nearestMonth, localizeOptions);
|
473
|
-
|
474
|
-
// 1 year up to max Date
|
475
|
-
} else {
|
476
|
-
var monthsSinceStartOfYear = months % 12;
|
477
|
-
var years = Math.floor(months / 12);
|
478
|
-
|
479
|
-
// N years up to 1 years 3 months
|
480
|
-
if (monthsSinceStartOfYear < 3) {
|
481
|
-
return locale$1.formatDistance('aboutXYears', years, localizeOptions);
|
482
|
-
|
483
|
-
// N years 3 months up to N years 9 months
|
484
|
-
} else if (monthsSinceStartOfYear < 9) {
|
485
|
-
return locale$1.formatDistance('overXYears', years, localizeOptions);
|
486
|
-
|
487
|
-
// N years 9 months up to N year 12 months
|
488
|
-
} else {
|
489
|
-
return locale$1.formatDistance('almostXYears', years + 1, localizeOptions);
|
490
|
-
}
|
491
|
-
}
|
492
|
-
}
|
493
|
-
|
494
|
-
const verdocsTemplatesListCss = "verdocs-templates-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-templates-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .header .filter{width:150px}verdocs-templates-list .header verdocs-text-input{margin:0}verdocs-templates-list .header verdocs-text-input input{height:32px}verdocs-templates-list .filter{-ms-flex-align:center;align-items:center}verdocs-templates-list .template{width:100%;margin:3px 0;background:#ffffff}verdocs-templates-list .template:hover{cursor:pointer;background:#f5f5fa}verdocs-templates-list .template .inner{gap:10px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .template .inner svg{width:24px;height:24px}verdocs-templates-list .name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:black;font-size:18px;margin-left:10px}@media screen and (max-width: 1300px){verdocs-templates-list .name{font-size:16px}}verdocs-templates-list .spacer{margin:0;height:30px;-ms-flex:0 0 1px;flex:0 0 1px;display:-ms-flexbox;display:flex;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-templates-list .spacer{margin:12px 0;border-top:1px solid #dad8dd;border-right:none}}verdocs-templates-list .empty-text{font-size:20px;text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-templates-list .ownership{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 100px;flex:0 0 100px;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .ownership svg{width:24px;height:24px;margin-right:8px}verdocs-templates-list .last-used{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 280px;flex:0 0 280px;font-size:16px;margin:0 0 0 10px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .last-used svg{width:24px;height:24px;margin-right:8px}verdocs-templates-list .usage{color:#444;display:-ms-flexbox;display:flex;-ms-flex:0 0 60px;flex:0 0 60px;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .usage svg{width:24px;height:24px;margin-right:8px}";
|
9
|
+
const verdocsTemplatesListCss = "verdocs-templates-list{display:-ms-flexbox;display:flex;padding:10px;font-size:18px;-ms-flex-wrap:nowrap;flex-wrap:nowrap;border-radius:6px;color:#33364b;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", \"Barlow\", sans-serif}verdocs-templates-list .header{width:100%;row-gap:4px;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-column-gap:12px;-moz-column-gap:12px;column-gap:12px;margin:0 0 10px 0;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .header .filter{width:150px}verdocs-templates-list .header verdocs-text-input{margin:0}verdocs-templates-list .header verdocs-text-input input{height:32px}verdocs-templates-list .filter{-ms-flex-align:center;align-items:center}verdocs-templates-list .template{width:100%;margin:3px 0;border:1px solid #ffffff;background:#ffffff}verdocs-templates-list .template:hover{cursor:pointer;background:#ededff;border:1px solid #a7a7f5}verdocs-templates-list .template .inner{gap:10px;display:-ms-flexbox;display:flex;padding:8px 14px;border-radius:5px;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center}verdocs-templates-list .template .inner svg{width:24px;height:24px}verdocs-templates-list .name{-ms-flex:1;flex:1;display:-ms-flexbox;display:flex;color:black;font-size:16px;margin-left:10px}@media screen and (max-width: 1300px){verdocs-templates-list .name{font-size:16px}}verdocs-templates-list .spacer{margin:0;height:30px;-ms-flex:0 0 1px;flex:0 0 1px;display:-ms-flexbox;display:flex;border-right:1px solid #dad8dd}@media screen and (max-width: 800px){verdocs-templates-list .spacer{margin:12px 0;border-top:1px solid #dad8dd;border-right:none}}verdocs-templates-list .empty-text{font-size:20px;text-align:center;margin:16px 0 0 0;padding:80px 80px;border:2px solid #ccc}verdocs-templates-list .usage,verdocs-templates-list .ownership,verdocs-templates-list .last-used{gap:10px;color:#444;display:-ms-flexbox;display:flex;font-size:16px;margin:0 0 0 10px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}verdocs-templates-list .usage span,verdocs-templates-list .usage svg,verdocs-templates-list .ownership span,verdocs-templates-list .ownership svg,verdocs-templates-list .last-used span,verdocs-templates-list .last-used svg{width:24px;height:24px}verdocs-templates-list .usage span,verdocs-templates-list .ownership span,verdocs-templates-list .last-used span{display:block}verdocs-templates-list .ownership{-ms-flex:0 0 100px;flex:0 0 100px}verdocs-templates-list .last-used{-ms-flex:0 0 130px;flex:0 0 130px}verdocs-templates-list .usage{-ms-flex:0 0 60px;flex:0 0 60px}";
|
495
10
|
|
496
|
-
const TemplateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>`;
|
497
11
|
const GlobeAltIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>`;
|
498
12
|
const LockClosedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>`;
|
499
13
|
const BuildingOfficeIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>`;
|
500
|
-
const CalendarIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5" /></svg>`;
|
501
14
|
const EnvelopeIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>`;
|
15
|
+
const CreatedIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 122.88 122.88"><g><path d="M81.61,4.73c0-2.61,2.58-4.73,5.77-4.73c3.19,0,5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 c-3.19,0-5.77-2.12-5.77-4.73V4.73L81.61,4.73z M66.11,103.81c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,103.81z M15.85,67.09c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,67.09z M40.98,67.09 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,67.09z M66.11,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,67.09z M91.25,67.09c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,67.09z M15.85,85.45c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,85.45z M40.98,85.45 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,85.45z M66.11,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2H81.9c0.34,0,0.61,1.43,0.61,3.2 c0,1.77-0.27,3.2-0.61,3.2H66.11L66.11,85.45z M91.25,85.45c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79 c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H91.25L91.25,85.45z M15.85,103.81c-0.34,0-0.61-1.43-0.61-3.2 c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H15.85L15.85,103.81z M40.98,103.81 c-0.34,0-0.61-1.43-0.61-3.2c0-1.77,0.27-3.2,0.61-3.2h15.79c0.34,0,0.61,1.43,0.61,3.2c0,1.77-0.27,3.2-0.61,3.2H40.98 L40.98,103.81z M29.61,4.73c0-2.61,2.58-4.73,5.77-4.73s5.77,2.12,5.77,4.73v20.72c0,2.61-2.58,4.73-5.77,4.73 s-5.77-2.12-5.77-4.73V4.73L29.61,4.73z M6.4,45.32h110.07V21.47c0-0.8-0.33-1.53-0.86-2.07c-0.53-0.53-1.26-0.86-2.07-0.86H103 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h10.55c2.57,0,4.9,1.05,6.59,2.74c1.69,1.69,2.74,4.02,2.74,6.59v27.06v65.03 c0,2.57-1.05,4.9-2.74,6.59c-1.69,1.69-4.02,2.74-6.59,2.74H9.33c-2.57,0-4.9-1.05-6.59-2.74C1.05,118.45,0,116.12,0,113.55V48.52 V21.47c0-2.57,1.05-4.9,2.74-6.59c1.69-1.69,4.02-2.74,6.59-2.74H20.6c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H9.33 c-0.8,0-1.53,0.33-2.07,0.86c-0.53,0.53-0.86,1.26-0.86,2.07V45.32L6.4,45.32z M116.48,51.73H6.4v61.82c0,0.8,0.33,1.53,0.86,2.07 c0.53,0.53,1.26,0.86,2.07,0.86h104.22c0.8,0,1.53-0.33,2.07-0.86c0.53-0.53,0.86-1.26,0.86-2.07V51.73L116.48,51.73z M50.43,18.54 c-1.77,0-3.2-1.43-3.2-3.2c0-1.77,1.43-3.2,3.2-3.2h21.49c1.77,0,3.2,1.43,3.2,3.2c0,1.77-1.43,3.2-3.2,3.2H50.43L50.43,18.54z"/></g></svg>`;
|
16
|
+
const LastUsedIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 410.2"><path d="M35.28 35.51h32.54v43.42c0 10.58 4.27 20.06 11.35 27.23 17.03 17.14 45.5 17.45 63.06.93 7.71-7.29 12.4-17.14 12.4-28.16V35.51h65.71v43.42c0 6.34 1.56 12.3 4.35 17.6 2.03 3.85 4.71 7.37 7.92 10.43l2.41 2.24c1.79 1.46 3.71 2.79 5.76 3.97l.31.18.07.04.25.13.16.1.15.08.27.14.05.03.32.17.05.03.27.13.15.08.17.09.26.12.07.04.32.16.03.01.31.15.12.06.2.09.24.11.1.05.33.14.34.16.1.04.23.1.21.09.13.05.31.13h.03l.34.14.08.04.27.1.18.07.16.06.3.11.05.02.34.12.06.02.3.11.16.05.19.07.26.09.09.03.35.12.02.01.34.1.13.04.22.07.25.07.11.03.36.11.36.1.11.03.25.07.22.06.14.04.34.09h.02l.37.1.08.02.29.06.19.05.17.03.32.08.05.01.37.08.06.01.31.06.17.04.21.03.28.06.09.02.37.07h.03l.35.06.14.03.23.03.27.04.11.02.38.06.38.05.12.01.26.04.23.03.15.01.35.05h.03l.39.04.08.01.3.02.21.02.17.02.34.02.05.01.39.03h.05l.34.02.18.01.21.01.3.02h.08l.39.01.03.01.36.01h.39l.28.01h.96l.33-.01h.39l.18-.01.2-.01.25-.01h.13l.32-.02h.07l.38-.02h.01l.37-.02.07-.01.32-.02.12-.01.26-.02.19-.02.19-.02.25-.02.13-.01.31-.04h.07l.37-.05h.01l.37-.04.06-.01.32-.04.12-.02.26-.03.18-.03.19-.03.24-.04.14-.02.3-.05.07-.01.36-.06h.01l.37-.07.05-.01.32-.06.12-.02.25-.05.18-.04.19-.04.23-.05.14-.03.29-.07.08-.01.35-.08.01-.01.36-.08.05-.02.31-.08.11-.02.25-.07.17-.04.2-.06.22-.05.14-.05.28-.08.07-.02.34-.09.02-.01.36-.11.03-.01.32-.1.1-.03.25-.08.16-.05.19-.07.22-.07.13-.04.28-.1.08-.03.32-.11.02-.01.35-.13.04-.01.3-.11.09-.04.26-.1.15-.06.19-.07.21-.09.13-.05.26-.11.08-.03.32-.13.02-.01.33-.14.04-.02.3-.13.09-.04.24-.11.14-.07.19-.08.19-.1.14-.06.25-.12.08-.03.3-.16h.03l.32-.17.03-.01.29-.16.09-.04.24-.12.13-.07.19-.1.18-.1.14-.07.23-.13.08-.05.29-.16.03-.01.31-.18c1.11-.64 2.17-1.31 3.2-2.03l2.71-1.95c4.36-3.56 7.92-7.88 10.43-12.76 2.73-5.26 4.25-11.19 4.25-17.5V35.51h33.97c9.68 0 18.5 3.98 24.91 10.38 6.4 6.37 10.38 15.2 10.38 24.9V192.9H365.1v-53.83H11.3v233.49c0 15.25 12.49 27.74 27.75 27.74h298.3c15.27 0 27.75-12.51 27.75-27.74V325.6h11.31v49.32c0 9.7-3.98 18.53-10.37 24.91-6.42 6.39-15.24 10.37-24.92 10.37H35.28c-9.68 0-18.49-3.97-24.89-10.37C3.97 393.41 0 384.59 0 374.92V70.79C0 61.12 3.97 52.3 10.36 45.9c6.43-6.42 15.25-10.39 24.92-10.39zm211.43-21.54c0-7.71 7.61-13.97 17.03-13.97 9.42 0 17.04 6.26 17.04 13.97v64.96c0 7.7-7.62 13.96-17.04 13.96-9.42 0-17.03-6.26-17.03-13.96V13.97zm-152.52 0C94.19 6.26 101.81 0 111.23 0c9.42 0 17.03 6.26 17.03 13.97v64.96c0 7.7-7.61 13.96-17.03 13.96-9.42 0-17.04-6.26-17.04-13.96V13.97zm311.37 327.72c1.48-14.79 2.69-32.45 3.59-46.5h-75.88v-71.88h77.43c-.39-14.06-1.17-31.75-2.35-46.58-.96-5.93 6.02-9.73 10.51-5.9l90.89 82.99c2.7 2.31 3.02 6.38.7 9.08l-.74.73-93.65 84.05c-4.6 3.89-11.47-.19-10.5-5.99zM63.51 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44H63.51c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44zm198.44-98.62h50.55c3.23 0 5.92 2.43 6.37 5.52h-16v49.42h-40.92c-3.53 0-6.45-2.9-6.45-6.45v-42.05c0-3.54 2.9-6.44 6.45-6.44zm0 98.62h40.92v39.6h16.07v8.9c0 3.52-2.92 6.44-6.44 6.44h-50.55c-3.53 0-6.45-2.91-6.45-6.44v-42.06c0-3.54 2.9-6.44 6.45-6.44zm-98.5-98.62h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45h-50.56c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zm-99.94 0h50.56c3.53 0 6.43 2.92 6.43 6.44v42.05c0 3.53-2.91 6.45-6.43 6.45H63.51c-3.53 0-6.44-2.9-6.44-6.45v-42.05c0-3.54 2.9-6.44 6.44-6.44zM163.45 286h50.56c3.53 0 6.43 2.91 6.43 6.44v42.06c0 3.52-2.91 6.44-6.43 6.44h-50.56c-3.53 0-6.44-2.91-6.44-6.44v-42.06c0-3.54 2.9-6.44 6.44-6.44z"/></svg>`;
|
17
|
+
const UpdatedIcon = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 506.49"><path fill-rule="nonzero" d="m371.06 415.61-43.25 11.52 6.23-46.41 37.02 34.89zm6.76-177.5c36.98 0 70.56 15.04 94.83 39.35C496.96 301.7 512 335.25 512 372.31c0 37.02-15.02 70.61-39.3 94.88l-.68.64c-24.23 23.88-57.5 38.66-94.2 38.66-37.06 0-70.61-15.04-94.88-39.31l-.64-.69c-23.9-24.24-38.68-57.53-38.68-94.18 0-37.06 15.04-70.61 39.32-94.89 24.27-24.27 57.85-39.31 94.88-39.31zm78.74 55.41c-20.09-20.11-47.96-32.58-78.74-32.58-30.75 0-58.61 12.47-78.75 32.62-20.15 20.14-32.62 48-32.62 78.75 0 30.5 12.25 58.14 32.02 78.19l.6.55c20.14 20.14 48 32.61 78.75 32.61 30.48 0 58.12-12.25 78.21-32.02l.54-.58c20.15-20.15 32.61-48 32.61-78.75s-12.48-58.61-32.62-78.79zM294.24 17.11C294.24 7.69 303.52 0 315.1 0c11.57 0 20.87 7.64 20.87 17.11v74.85c0 9.42-9.3 17.11-20.87 17.11-11.58 0-20.86-7.65-20.86-17.11V17.11zM56.8 242.28c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57H56.8zm90.77 0c-1.17 0-2.23-5.2-2.23-11.57 0-6.38.92-11.53 2.23-11.53h56.94c1.18 0 2.24 5.2 2.24 11.53 0 6.39-.92 11.57-2.24 11.57h-56.94zm90.77 0c-1.16 0-2.22-5.2-2.22-11.57 0-6.38.92-11.53 2.22-11.53h56.94c1.19 0 2.25 5.15 2.25 11.49-5.7 3.55-11.2 7.44-16.43 11.61h-42.76zm-181.4 66.24c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.22 5.2 2.22 11.58 0 6.37-.91 11.57-2.22 11.57H56.94zm90.77 0c-1.18 0-2.24-5.2-2.24-11.57 0-6.38.93-11.58 2.24-11.58h56.94c1.18 0 2.23 5.2 2.23 11.58 0 6.37-.92 11.57-2.23 11.57h-56.94zM57.06 374.8c-1.18 0-2.24-5.2-2.24-11.59 0-6.36.94-11.56 2.24-11.56H114c1.19 0 2.24 5.2 2.24 11.56 0 6.39-.93 11.59-2.24 11.59H57.06zm90.78 0c-1.19 0-2.25-5.2-2.25-11.59 0-6.36.94-11.56 2.25-11.56h56.94c1.18 0 2.24 5.2 2.24 11.56 0 6.39-.94 11.59-2.24 11.59h-56.94zM106.83 17.11C106.83 7.69 116.1 0 127.69 0c11.57 0 20.86 7.64 20.86 17.11v74.85c0 9.42-9.34 17.11-20.86 17.11-11.59 0-20.86-7.65-20.86-17.11V17.11zM22.97 163.64h397.39V77.46c0-2.94-1.19-5.53-3.09-7.43-1.9-1.9-4.59-3.08-7.42-3.08h-38.1c-6.39 0-11.59-5.2-11.59-11.57 0-6.38 5.2-11.58 11.59-11.58h38.1c9.32 0 17.7 3.77 23.82 9.88 6.12 6.14 9.88 14.5 9.88 23.83v136.81c-7.61-2.62-15.41-4.73-23.44-6.29v-21.38h.25H22.97v223.17c0 2.94 1.18 5.52 3.08 7.42 1.91 1.9 4.61 3.08 7.44 3.08h188.85c2.16 8.02 4.86 15.84 8.11 23.36H33.71c-9.3 0-17.7-3.75-23.84-9.89C3.75 427.72 0 419.36 0 410.02V77.55c0-9.29 3.75-17.7 9.87-23.82 6.14-6.13 14.5-9.89 23.84-9.89h40.67c6.38 0 11.57 5.2 11.57 11.57C85.95 61.8 80.76 67 74.38 67H33.71c-2.96 0-5.54 1.18-7.44 3.08-1.9 1.9-3.09 4.59-3.09 7.43v86.16h-.21v-.03zm158.95-96.69c-6.39 0-11.57-5.2-11.57-11.57 0-6.38 5.18-11.58 11.57-11.58h77.55c6.39 0 11.57 5.2 11.57 11.58 0 6.37-5.18 11.57-11.57 11.57h-77.55zm161.66 303.24 45.37-51.33c.72-.84 1.78-1.34 2.85-1.36.69-.01 1.37.13 1.98.45l32.94 29.96c.66.59 1.05 1.46 1.06 2.35.02 1-.39 1.98-1.16 2.66l-46.15 52.16-36.95-34.89h.06z"/></svg>`;
|
502
18
|
const SharingFilters = [
|
503
19
|
{ value: 'all', label: 'All' },
|
504
20
|
{ value: 'personal', label: 'Personal' },
|
@@ -525,6 +41,10 @@ const VerdocsTemplatesList = class {
|
|
525
41
|
this.viewTemplate = createEvent(this, "viewTemplate", 7);
|
526
42
|
this.editTemplate = createEvent(this, "editTemplate", 7);
|
527
43
|
this.templateDeleted = createEvent(this, "templateDeleted", 7);
|
44
|
+
this.changeSort = createEvent(this, "changeSort", 7);
|
45
|
+
this.changeSharing = createEvent(this, "changeSharing", 7);
|
46
|
+
this.changeStarred = createEvent(this, "changeStarred", 7);
|
47
|
+
this.changeName = createEvent(this, "changeName", 7);
|
528
48
|
this.handleOptionSelected = (option, template) => {
|
529
49
|
var _a, _b;
|
530
50
|
if (option === 'send') {
|
@@ -641,14 +161,24 @@ const VerdocsTemplatesList = class {
|
|
641
161
|
}
|
642
162
|
render() {
|
643
163
|
return (h(Host, null, h("div", { class: "header" }, h("div", { class: "filter" }, h("verdocs-text-input", { id: "verdocs-filter-name", value: this.name, autocomplete: "off", placeholder: "Filter by Name...", onFocusout: (e) => {
|
164
|
+
var _a;
|
644
165
|
this.name = e.target.value;
|
166
|
+
(_a = this.changeName) === null || _a === void 0 ? void 0 : _a.emit(this.name);
|
645
167
|
} })), h("verdocs-quick-filter", { label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
|
168
|
+
var _a;
|
646
169
|
this.sharing = e.detail.value;
|
170
|
+
(_a = this.changeSharing) === null || _a === void 0 ? void 0 : _a.emit(this.sharing);
|
647
171
|
} }), h("verdocs-quick-filter", { label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
|
172
|
+
var _a;
|
648
173
|
this.starred = e.detail.value;
|
174
|
+
(_a = this.changeStarred) === null || _a === void 0 ? void 0 : _a.emit(this.starred);
|
649
175
|
} }), h("verdocs-quick-filter", { label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
|
176
|
+
var _a;
|
650
177
|
this.sort = e.detail.value;
|
178
|
+
(_a = this.changeSort) === null || _a === void 0 ? void 0 : _a.emit(this.sort);
|
651
179
|
} }), this.loading && h("verdocs-spinner", { mode: "dark", size: 24 }), h("div", { style: { display: 'flex', flex: '1' } })), this.templates.map(template => {
|
180
|
+
const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';
|
181
|
+
const date = template[dateToShow];
|
652
182
|
const MENU_OPTIONS = [];
|
653
183
|
if (this.allowedActions.includes('send')) {
|
654
184
|
MENU_OPTIONS.push({ label: 'Send', id: 'send', disabled: !this.canPreview(template) });
|
@@ -678,7 +208,7 @@ const VerdocsTemplatesList = class {
|
|
678
208
|
return (h("div", { class: "template", onClick: () => {
|
679
209
|
var _a;
|
680
210
|
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template });
|
681
|
-
} }, h("div", { class: "inner" }, h("verdocs-template-star", { template: template, endpoint: this.endpoint }), h("div", { class: "spacer icon-spacer" }), h("
|
211
|
+
} }, h("div", { class: "inner" }, h("verdocs-template-star", { template: template, endpoint: this.endpoint }), h("div", { class: "spacer icon-spacer" }), h("div", { class: "name" }, template.name), h("div", { class: "spacer usage-spacer" }), h("div", { class: "usage" }, h("span", { innerHTML: EnvelopeIcon, title: "Usage Counter" }), template.counter || '--'), h("div", { class: "spacer last-used-spacer" }), h("div", { class: "last-used" }, dateToShow === 'created_at' && h("span", { innerHTML: CreatedIcon, title: "Created" }), dateToShow === 'updated_at' && h("span", { innerHTML: UpdatedIcon, title: "Last Updated" }), dateToShow === 'last_used_at' && h("span", { innerHTML: LastUsedIcon, title: "Last Used" }), date ? format(new Date(date), 'P') : 'Never'), h("div", { class: "spacer ownership-spacer" }), template.is_public && (h("div", { class: "ownership" }, h("span", { innerHTML: GlobeAltIcon }), " Public")), !template.is_public && !template.is_personal && (h("div", { class: "ownership" }, h("span", { innerHTML: LockClosedIcon }), " Private")), !template.is_public && template.is_personal && (h("div", { class: "ownership" }, h("span", { innerHTML: BuildingOfficeIcon }), " Shared")), h("verdocs-dropdown", { options: MENU_OPTIONS, onOptionSelected: e => this.handleOptionSelected(e.detail.id, template) }))));
|
682
212
|
}), !this.templates.length ? (h("div", { class: "empty-text" }, "No matching templates found. Please adjust your filters and try again.")) : (h("div", { style: { marginTop: '10px' } }, h("verdocs-pagination", { selectedPage: this.selectedPage, perPage: 10, itemCount: this.count, onSelectPage: e => {
|
683
213
|
this.selectedPage = e.detail.selectedPage;
|
684
214
|
return this.queryTemplates();
|
@@ -4,13 +4,12 @@ import { b as userCanCancelEnvelope } from './Permissions-391258bd.js';
|
|
4
4
|
import './Types-5f31149e.js';
|
5
5
|
import { V as VerdocsEndpoint } from './VerdocsEndpoint-e447b318.js';
|
6
6
|
import { i as integerSequence } from './Primitives-054bc6e5.js';
|
7
|
-
import { s as saveEnvelopesAsZip, e as saveCertificate, b as saveAttachment } from './utils-
|
7
|
+
import { s as saveEnvelopesAsZip, e as saveCertificate, b as saveAttachment } from './utils-6412577d.js';
|
8
8
|
import { S as SDKError } from './errors-9b5498c8.js';
|
9
9
|
import './_commonjsHelpers-5ec8f9b7.js';
|
10
10
|
import './Files-70a192df.js';
|
11
11
|
import './Types-de18e225.js';
|
12
|
-
import './index-
|
13
|
-
import './index-8dc8fdc4.js';
|
12
|
+
import './index-914ed6f7.js';
|
14
13
|
|
15
14
|
const verdocsViewCss = "verdocs-view{display:-ms-flexbox;display:flex;overflow:hidden;min-height:600px;position:relative;-ms-flex-align:center;align-items:center;-ms-flex-direction:column;flex-direction:column;-webkit-box-sizing:border-box;box-sizing:border-box;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-view div,verdocs-view canvas{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-view .document{-ms-flex:1;flex:1;width:100%;height:100%;display:-ms-flexbox;display:flex;padding:15px;row-gap:15px;min-height:200px;max-width:1200px;position:relative;overflow-y:scroll;-ms-flex-align:center;align-items:center;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-direction:column;flex-direction:column}verdocs-view .document .inner{width:100%;max-width:1028px}verdocs-view .loading-indicator{top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;z-index:10000;position:fixed;background-color:rgba(0, 0, 0, 0.7)}#verdocs-view-header{width:100%;color:#fff;display:-ms-flexbox;display:flex;z-index:1000;-ms-flex:0 0 56px;flex:0 0 56px;padding:0 20px;font-size:12px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-webkit-transition:all 0.25s;transition:all 0.25s;background-color:#33354c;-webkit-box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12);box-shadow:0 4px 4px 0 rgba(0, 0, 0, 0.24), 0 0 4px 0 rgba(0, 0, 0, 0.12)}#verdocs-view-header .inner{width:100%;display:-ms-flexbox;display:flex;margin:0 auto;padding:0 20px;max-width:1200px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row}#verdocs-view-header .logo{width:80px;display:none;margin:-6px 0 0 0}#verdocs-view-header .title{font-size:18px;font-weight:500;white-space:nowrap;text-overflow:ellipsis}";
|
16
15
|
|