@verdocs/web-sdk 2.0.8 → 2.0.10
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/{utils-ce815868.js → utils-ae9b4e3e.js} +1 -1
- package/dist/cjs/verdocs-contact-picker.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +2 -3
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +1 -2
- 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 +2 -3
- 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/collection/components/controls/verdocs-pagination/verdocs-pagination.css +1 -0
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +23 -30
- 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-pagination2.js +1 -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/{utils-51c8f6c7.js → utils-6412577d.js} +1 -1
- package/dist/esm/verdocs-contact-picker.entry.js +2 -3
- package/dist/esm/verdocs-envelope-document-page.entry.js +2 -3
- package/dist/esm/verdocs-envelope-sidebar.entry.js +1 -2
- 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 +2 -3
- 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-es5/index-914ed6f7.js +1 -0
- 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/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-73422f8f.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-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-c199ed9d.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/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-048a6205.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-11a30706.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-19fefdf7.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-403ea34b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-42d2c651.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-450047f1.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-5e50330a.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-9cc39dc6.system.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-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-c7cebd38.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c8a1de2c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c91ad3c7.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-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
@@ -13,501 +13,17 @@ import { d as defineCustomElement$5 } from './verdocs-quick-filter2.js';
|
|
13
13
|
import { d as defineCustomElement$4 } from './verdocs-spinner2.js';
|
14
14
|
import { d as defineCustomElement$3 } from './verdocs-template-star2.js';
|
15
15
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
16
|
-
import {
|
16
|
+
import { f as format } from './index2.js';
|
17
17
|
|
18
|
-
|
19
|
-
* @name compareAsc
|
20
|
-
* @category Common Helpers
|
21
|
-
* @summary Compare the two dates and return -1, 0 or 1.
|
22
|
-
*
|
23
|
-
* @description
|
24
|
-
* Compare the two dates and return 1 if the first date is after the second,
|
25
|
-
* -1 if the first date is before the second or 0 if dates are equal.
|
26
|
-
*
|
27
|
-
* @param {Date|Number} dateLeft - the first date to compare
|
28
|
-
* @param {Date|Number} dateRight - the second date to compare
|
29
|
-
* @returns {Number} the result of the comparison
|
30
|
-
* @throws {TypeError} 2 arguments required
|
31
|
-
*
|
32
|
-
* @example
|
33
|
-
* // Compare 11 February 1987 and 10 July 1989:
|
34
|
-
* const result = compareAsc(new Date(1987, 1, 11), new Date(1989, 6, 10))
|
35
|
-
* //=> -1
|
36
|
-
*
|
37
|
-
* @example
|
38
|
-
* // Sort the array of dates:
|
39
|
-
* const result = [
|
40
|
-
* new Date(1995, 6, 2),
|
41
|
-
* new Date(1987, 1, 11),
|
42
|
-
* new Date(1989, 6, 10)
|
43
|
-
* ].sort(compareAsc)
|
44
|
-
* //=> [
|
45
|
-
* // Wed Feb 11 1987 00:00:00,
|
46
|
-
* // Mon Jul 10 1989 00:00:00,
|
47
|
-
* // Sun Jul 02 1995 00:00:00
|
48
|
-
* // ]
|
49
|
-
*/
|
50
|
-
function compareAsc(dirtyDateLeft, dirtyDateRight) {
|
51
|
-
requiredArgs(2, arguments);
|
52
|
-
var dateLeft = toDate(dirtyDateLeft);
|
53
|
-
var dateRight = toDate(dirtyDateRight);
|
54
|
-
var diff = dateLeft.getTime() - dateRight.getTime();
|
55
|
-
if (diff < 0) {
|
56
|
-
return -1;
|
57
|
-
} else if (diff > 0) {
|
58
|
-
return 1;
|
59
|
-
// Return 0 if diff is 0; return NaN if diff is NaN
|
60
|
-
} else {
|
61
|
-
return diff;
|
62
|
-
}
|
63
|
-
}
|
64
|
-
|
65
|
-
/**
|
66
|
-
* @name differenceInCalendarMonths
|
67
|
-
* @category Month Helpers
|
68
|
-
* @summary Get the number of calendar months between the given dates.
|
69
|
-
*
|
70
|
-
* @description
|
71
|
-
* Get the number of calendar months between the given dates.
|
72
|
-
*
|
73
|
-
* @param {Date|Number} dateLeft - the later date
|
74
|
-
* @param {Date|Number} dateRight - the earlier date
|
75
|
-
* @returns {Number} the number of calendar months
|
76
|
-
* @throws {TypeError} 2 arguments required
|
77
|
-
*
|
78
|
-
* @example
|
79
|
-
* // How many calendar months are between 31 January 2014 and 1 September 2014?
|
80
|
-
* const result = differenceInCalendarMonths(
|
81
|
-
* new Date(2014, 8, 1),
|
82
|
-
* new Date(2014, 0, 31)
|
83
|
-
* )
|
84
|
-
* //=> 8
|
85
|
-
*/
|
86
|
-
function differenceInCalendarMonths(dirtyDateLeft, dirtyDateRight) {
|
87
|
-
requiredArgs(2, arguments);
|
88
|
-
var dateLeft = toDate(dirtyDateLeft);
|
89
|
-
var dateRight = toDate(dirtyDateRight);
|
90
|
-
var yearDiff = dateLeft.getFullYear() - dateRight.getFullYear();
|
91
|
-
var monthDiff = dateLeft.getMonth() - dateRight.getMonth();
|
92
|
-
return yearDiff * 12 + monthDiff;
|
93
|
-
}
|
94
|
-
|
95
|
-
/**
|
96
|
-
* @name differenceInMilliseconds
|
97
|
-
* @category Millisecond Helpers
|
98
|
-
* @summary Get the number of milliseconds between the given dates.
|
99
|
-
*
|
100
|
-
* @description
|
101
|
-
* Get the number of milliseconds between the given dates.
|
102
|
-
*
|
103
|
-
* @param {Date|Number} dateLeft - the later date
|
104
|
-
* @param {Date|Number} dateRight - the earlier date
|
105
|
-
* @returns {Number} the number of milliseconds
|
106
|
-
* @throws {TypeError} 2 arguments required
|
107
|
-
*
|
108
|
-
* @example
|
109
|
-
* // How many milliseconds are between
|
110
|
-
* // 2 July 2014 12:30:20.600 and 2 July 2014 12:30:21.700?
|
111
|
-
* const result = differenceInMilliseconds(
|
112
|
-
* new Date(2014, 6, 2, 12, 30, 21, 700),
|
113
|
-
* new Date(2014, 6, 2, 12, 30, 20, 600)
|
114
|
-
* )
|
115
|
-
* //=> 1100
|
116
|
-
*/
|
117
|
-
function differenceInMilliseconds(dateLeft, dateRight) {
|
118
|
-
requiredArgs(2, arguments);
|
119
|
-
return toDate(dateLeft).getTime() - toDate(dateRight).getTime();
|
120
|
-
}
|
121
|
-
|
122
|
-
var roundingMap = {
|
123
|
-
ceil: Math.ceil,
|
124
|
-
round: Math.round,
|
125
|
-
floor: Math.floor,
|
126
|
-
trunc: function trunc(value) {
|
127
|
-
return value < 0 ? Math.ceil(value) : Math.floor(value);
|
128
|
-
} // Math.trunc is not supported by IE
|
129
|
-
};
|
130
|
-
|
131
|
-
var defaultRoundingMethod = 'trunc';
|
132
|
-
function getRoundingMethod(method) {
|
133
|
-
return method ? roundingMap[method] : roundingMap[defaultRoundingMethod];
|
134
|
-
}
|
135
|
-
|
136
|
-
/**
|
137
|
-
* @name endOfDay
|
138
|
-
* @category Day Helpers
|
139
|
-
* @summary Return the end of a day for the given date.
|
140
|
-
*
|
141
|
-
* @description
|
142
|
-
* Return the end of a day for the given date.
|
143
|
-
* The result will be in the local timezone.
|
144
|
-
*
|
145
|
-
* @param {Date|Number} date - the original date
|
146
|
-
* @returns {Date} the end of a day
|
147
|
-
* @throws {TypeError} 1 argument required
|
148
|
-
*
|
149
|
-
* @example
|
150
|
-
* // The end of a day for 2 September 2014 11:55:00:
|
151
|
-
* const result = endOfDay(new Date(2014, 8, 2, 11, 55, 0))
|
152
|
-
* //=> Tue Sep 02 2014 23:59:59.999
|
153
|
-
*/
|
154
|
-
function endOfDay(dirtyDate) {
|
155
|
-
requiredArgs(1, arguments);
|
156
|
-
var date = toDate(dirtyDate);
|
157
|
-
date.setHours(23, 59, 59, 999);
|
158
|
-
return date;
|
159
|
-
}
|
160
|
-
|
161
|
-
/**
|
162
|
-
* @name endOfMonth
|
163
|
-
* @category Month Helpers
|
164
|
-
* @summary Return the end of a month for the given date.
|
165
|
-
*
|
166
|
-
* @description
|
167
|
-
* Return the end of a month for the given date.
|
168
|
-
* The result will be in the local timezone.
|
169
|
-
*
|
170
|
-
* @param {Date|Number} date - the original date
|
171
|
-
* @returns {Date} the end of a month
|
172
|
-
* @throws {TypeError} 1 argument required
|
173
|
-
*
|
174
|
-
* @example
|
175
|
-
* // The end of a month for 2 September 2014 11:55:00:
|
176
|
-
* const result = endOfMonth(new Date(2014, 8, 2, 11, 55, 0))
|
177
|
-
* //=> Tue Sep 30 2014 23:59:59.999
|
178
|
-
*/
|
179
|
-
function endOfMonth(dirtyDate) {
|
180
|
-
requiredArgs(1, arguments);
|
181
|
-
var date = toDate(dirtyDate);
|
182
|
-
var month = date.getMonth();
|
183
|
-
date.setFullYear(date.getFullYear(), month + 1, 0);
|
184
|
-
date.setHours(23, 59, 59, 999);
|
185
|
-
return date;
|
186
|
-
}
|
187
|
-
|
188
|
-
/**
|
189
|
-
* @name isLastDayOfMonth
|
190
|
-
* @category Month Helpers
|
191
|
-
* @summary Is the given date the last day of a month?
|
192
|
-
*
|
193
|
-
* @description
|
194
|
-
* Is the given date the last day of a month?
|
195
|
-
*
|
196
|
-
* @param {Date|Number} date - the date to check
|
197
|
-
* @returns {Boolean} the date is the last day of a month
|
198
|
-
* @throws {TypeError} 1 argument required
|
199
|
-
*
|
200
|
-
* @example
|
201
|
-
* // Is 28 February 2014 the last day of a month?
|
202
|
-
* const result = isLastDayOfMonth(new Date(2014, 1, 28))
|
203
|
-
* //=> true
|
204
|
-
*/
|
205
|
-
function isLastDayOfMonth(dirtyDate) {
|
206
|
-
requiredArgs(1, arguments);
|
207
|
-
var date = toDate(dirtyDate);
|
208
|
-
return endOfDay(date).getTime() === endOfMonth(date).getTime();
|
209
|
-
}
|
210
|
-
|
211
|
-
/**
|
212
|
-
* @name differenceInMonths
|
213
|
-
* @category Month Helpers
|
214
|
-
* @summary Get the number of full months between the given dates.
|
215
|
-
*
|
216
|
-
* @description
|
217
|
-
* Get the number of full months between the given dates using trunc as a default rounding method.
|
218
|
-
*
|
219
|
-
* @param {Date|Number} dateLeft - the later date
|
220
|
-
* @param {Date|Number} dateRight - the earlier date
|
221
|
-
* @returns {Number} the number of full months
|
222
|
-
* @throws {TypeError} 2 arguments required
|
223
|
-
*
|
224
|
-
* @example
|
225
|
-
* // How many full months are between 31 January 2014 and 1 September 2014?
|
226
|
-
* const result = differenceInMonths(new Date(2014, 8, 1), new Date(2014, 0, 31))
|
227
|
-
* //=> 7
|
228
|
-
*/
|
229
|
-
function differenceInMonths(dirtyDateLeft, dirtyDateRight) {
|
230
|
-
requiredArgs(2, arguments);
|
231
|
-
var dateLeft = toDate(dirtyDateLeft);
|
232
|
-
var dateRight = toDate(dirtyDateRight);
|
233
|
-
var sign = compareAsc(dateLeft, dateRight);
|
234
|
-
var difference = Math.abs(differenceInCalendarMonths(dateLeft, dateRight));
|
235
|
-
var result;
|
236
|
-
|
237
|
-
// Check for the difference of less than month
|
238
|
-
if (difference < 1) {
|
239
|
-
result = 0;
|
240
|
-
} else {
|
241
|
-
if (dateLeft.getMonth() === 1 && dateLeft.getDate() > 27) {
|
242
|
-
// This will check if the date is end of Feb and assign a higher end of month date
|
243
|
-
// to compare it with Jan
|
244
|
-
dateLeft.setDate(30);
|
245
|
-
}
|
246
|
-
dateLeft.setMonth(dateLeft.getMonth() - sign * difference);
|
247
|
-
|
248
|
-
// Math.abs(diff in full months - diff in calendar months) === 1 if last calendar month is not full
|
249
|
-
// If so, result must be decreased by 1 in absolute value
|
250
|
-
var isLastMonthNotFull = compareAsc(dateLeft, dateRight) === -sign;
|
251
|
-
|
252
|
-
// Check for cases of one full calendar month
|
253
|
-
if (isLastDayOfMonth(toDate(dirtyDateLeft)) && difference === 1 && compareAsc(dirtyDateLeft, dateRight) === 1) {
|
254
|
-
isLastMonthNotFull = false;
|
255
|
-
}
|
256
|
-
result = sign * (difference - Number(isLastMonthNotFull));
|
257
|
-
}
|
258
|
-
|
259
|
-
// Prevent negative zero
|
260
|
-
return result === 0 ? 0 : result;
|
261
|
-
}
|
262
|
-
|
263
|
-
/**
|
264
|
-
* @name differenceInSeconds
|
265
|
-
* @category Second Helpers
|
266
|
-
* @summary Get the number of seconds between the given dates.
|
267
|
-
*
|
268
|
-
* @description
|
269
|
-
* Get the number of seconds between the given dates.
|
270
|
-
*
|
271
|
-
* @param {Date|Number} dateLeft - the later date
|
272
|
-
* @param {Date|Number} dateRight - the earlier date
|
273
|
-
* @param {Object} [options] - an object with options.
|
274
|
-
* @param {String} [options.roundingMethod='trunc'] - a rounding method (`ceil`, `floor`, `round` or `trunc`)
|
275
|
-
* @returns {Number} the number of seconds
|
276
|
-
* @throws {TypeError} 2 arguments required
|
277
|
-
*
|
278
|
-
* @example
|
279
|
-
* // How many seconds are between
|
280
|
-
* // 2 July 2014 12:30:07.999 and 2 July 2014 12:30:20.000?
|
281
|
-
* const result = differenceInSeconds(
|
282
|
-
* new Date(2014, 6, 2, 12, 30, 20, 0),
|
283
|
-
* new Date(2014, 6, 2, 12, 30, 7, 999)
|
284
|
-
* )
|
285
|
-
* //=> 12
|
286
|
-
*/
|
287
|
-
function differenceInSeconds(dateLeft, dateRight, options) {
|
288
|
-
requiredArgs(2, arguments);
|
289
|
-
var diff = differenceInMilliseconds(dateLeft, dateRight) / 1000;
|
290
|
-
return getRoundingMethod(options === null || options === void 0 ? void 0 : options.roundingMethod)(diff);
|
291
|
-
}
|
292
|
-
|
293
|
-
function assign(target, object) {
|
294
|
-
if (target == null) {
|
295
|
-
throw new TypeError('assign requires that input parameter not be null or undefined');
|
296
|
-
}
|
297
|
-
for (var property in object) {
|
298
|
-
if (Object.prototype.hasOwnProperty.call(object, property)) {
|
299
|
-
target[property] = object[property];
|
300
|
-
}
|
301
|
-
}
|
302
|
-
return target;
|
303
|
-
}
|
304
|
-
|
305
|
-
function cloneObject(object) {
|
306
|
-
return assign({}, object);
|
307
|
-
}
|
308
|
-
|
309
|
-
var MINUTES_IN_DAY = 1440;
|
310
|
-
var MINUTES_IN_ALMOST_TWO_DAYS = 2520;
|
311
|
-
var MINUTES_IN_MONTH = 43200;
|
312
|
-
var MINUTES_IN_TWO_MONTHS = 86400;
|
313
|
-
|
314
|
-
/**
|
315
|
-
* @name formatDistance
|
316
|
-
* @category Common Helpers
|
317
|
-
* @summary Return the distance between the given dates in words.
|
318
|
-
*
|
319
|
-
* @description
|
320
|
-
* Return the distance between the given dates in words.
|
321
|
-
*
|
322
|
-
* | Distance between dates | Result |
|
323
|
-
* |-------------------------------------------------------------------|---------------------|
|
324
|
-
* | 0 ... 30 secs | less than a minute |
|
325
|
-
* | 30 secs ... 1 min 30 secs | 1 minute |
|
326
|
-
* | 1 min 30 secs ... 44 mins 30 secs | [2..44] minutes |
|
327
|
-
* | 44 mins ... 30 secs ... 89 mins 30 secs | about 1 hour |
|
328
|
-
* | 89 mins 30 secs ... 23 hrs 59 mins 30 secs | about [2..24] hours |
|
329
|
-
* | 23 hrs 59 mins 30 secs ... 41 hrs 59 mins 30 secs | 1 day |
|
330
|
-
* | 41 hrs 59 mins 30 secs ... 29 days 23 hrs 59 mins 30 secs | [2..30] days |
|
331
|
-
* | 29 days 23 hrs 59 mins 30 secs ... 44 days 23 hrs 59 mins 30 secs | about 1 month |
|
332
|
-
* | 44 days 23 hrs 59 mins 30 secs ... 59 days 23 hrs 59 mins 30 secs | about 2 months |
|
333
|
-
* | 59 days 23 hrs 59 mins 30 secs ... 1 yr | [2..12] months |
|
334
|
-
* | 1 yr ... 1 yr 3 months | about 1 year |
|
335
|
-
* | 1 yr 3 months ... 1 yr 9 month s | over 1 year |
|
336
|
-
* | 1 yr 9 months ... 2 yrs | almost 2 years |
|
337
|
-
* | N yrs ... N yrs 3 months | about N years |
|
338
|
-
* | N yrs 3 months ... N yrs 9 months | over N years |
|
339
|
-
* | N yrs 9 months ... N+1 yrs | almost N+1 years |
|
340
|
-
*
|
341
|
-
* With `options.includeSeconds == true`:
|
342
|
-
* | Distance between dates | Result |
|
343
|
-
* |------------------------|----------------------|
|
344
|
-
* | 0 secs ... 5 secs | less than 5 seconds |
|
345
|
-
* | 5 secs ... 10 secs | less than 10 seconds |
|
346
|
-
* | 10 secs ... 20 secs | less than 20 seconds |
|
347
|
-
* | 20 secs ... 40 secs | half a minute |
|
348
|
-
* | 40 secs ... 60 secs | less than a minute |
|
349
|
-
* | 60 secs ... 90 secs | 1 minute |
|
350
|
-
*
|
351
|
-
* @param {Date|Number} date - the date
|
352
|
-
* @param {Date|Number} baseDate - the date to compare with
|
353
|
-
* @param {Object} [options] - an object with options.
|
354
|
-
* @param {Boolean} [options.includeSeconds=false] - distances less than a minute are more detailed
|
355
|
-
* @param {Boolean} [options.addSuffix=false] - result indicates if the second date is earlier or later than the first
|
356
|
-
* @param {Locale} [options.locale=defaultLocale] - the locale object. See [Locale]{@link https://date-fns.org/docs/Locale}
|
357
|
-
* @returns {String} the distance in words
|
358
|
-
* @throws {TypeError} 2 arguments required
|
359
|
-
* @throws {RangeError} `date` must not be Invalid Date
|
360
|
-
* @throws {RangeError} `baseDate` must not be Invalid Date
|
361
|
-
* @throws {RangeError} `options.locale` must contain `formatDistance` property
|
362
|
-
*
|
363
|
-
* @example
|
364
|
-
* // What is the distance between 2 July 2014 and 1 January 2015?
|
365
|
-
* const result = formatDistance(new Date(2014, 6, 2), new Date(2015, 0, 1))
|
366
|
-
* //=> '6 months'
|
367
|
-
*
|
368
|
-
* @example
|
369
|
-
* // What is the distance between 1 January 2015 00:00:15
|
370
|
-
* // and 1 January 2015 00:00:00, including seconds?
|
371
|
-
* const result = formatDistance(
|
372
|
-
* new Date(2015, 0, 1, 0, 0, 15),
|
373
|
-
* new Date(2015, 0, 1, 0, 0, 0),
|
374
|
-
* { includeSeconds: true }
|
375
|
-
* )
|
376
|
-
* //=> 'less than 20 seconds'
|
377
|
-
*
|
378
|
-
* @example
|
379
|
-
* // What is the distance from 1 January 2016
|
380
|
-
* // to 1 January 2015, with a suffix?
|
381
|
-
* const result = formatDistance(new Date(2015, 0, 1), new Date(2016, 0, 1), {
|
382
|
-
* addSuffix: true
|
383
|
-
* })
|
384
|
-
* //=> 'about 1 year ago'
|
385
|
-
*
|
386
|
-
* @example
|
387
|
-
* // What is the distance between 1 August 2016 and 1 January 2015 in Esperanto?
|
388
|
-
* import { eoLocale } from 'date-fns/locale/eo'
|
389
|
-
* const result = formatDistance(new Date(2016, 7, 1), new Date(2015, 0, 1), {
|
390
|
-
* locale: eoLocale
|
391
|
-
* })
|
392
|
-
* //=> 'pli ol 1 jaro'
|
393
|
-
*/
|
394
|
-
|
395
|
-
function formatDistance(dirtyDate, dirtyBaseDate, options) {
|
396
|
-
var _ref, _options$locale;
|
397
|
-
requiredArgs(2, arguments);
|
398
|
-
var defaultOptions = getDefaultOptions();
|
399
|
-
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;
|
400
|
-
if (!locale$1.formatDistance) {
|
401
|
-
throw new RangeError('locale must contain formatDistance property');
|
402
|
-
}
|
403
|
-
var comparison = compareAsc(dirtyDate, dirtyBaseDate);
|
404
|
-
if (isNaN(comparison)) {
|
405
|
-
throw new RangeError('Invalid time value');
|
406
|
-
}
|
407
|
-
var localizeOptions = assign(cloneObject(options), {
|
408
|
-
addSuffix: Boolean(options === null || options === void 0 ? void 0 : options.addSuffix),
|
409
|
-
comparison: comparison
|
410
|
-
});
|
411
|
-
var dateLeft;
|
412
|
-
var dateRight;
|
413
|
-
if (comparison > 0) {
|
414
|
-
dateLeft = toDate(dirtyBaseDate);
|
415
|
-
dateRight = toDate(dirtyDate);
|
416
|
-
} else {
|
417
|
-
dateLeft = toDate(dirtyDate);
|
418
|
-
dateRight = toDate(dirtyBaseDate);
|
419
|
-
}
|
420
|
-
var seconds = differenceInSeconds(dateRight, dateLeft);
|
421
|
-
var offsetInSeconds = (getTimezoneOffsetInMilliseconds(dateRight) - getTimezoneOffsetInMilliseconds(dateLeft)) / 1000;
|
422
|
-
var minutes = Math.round((seconds - offsetInSeconds) / 60);
|
423
|
-
var months;
|
424
|
-
|
425
|
-
// 0 up to 2 mins
|
426
|
-
if (minutes < 2) {
|
427
|
-
if (options !== null && options !== void 0 && options.includeSeconds) {
|
428
|
-
if (seconds < 5) {
|
429
|
-
return locale$1.formatDistance('lessThanXSeconds', 5, localizeOptions);
|
430
|
-
} else if (seconds < 10) {
|
431
|
-
return locale$1.formatDistance('lessThanXSeconds', 10, localizeOptions);
|
432
|
-
} else if (seconds < 20) {
|
433
|
-
return locale$1.formatDistance('lessThanXSeconds', 20, localizeOptions);
|
434
|
-
} else if (seconds < 40) {
|
435
|
-
return locale$1.formatDistance('halfAMinute', 0, localizeOptions);
|
436
|
-
} else if (seconds < 60) {
|
437
|
-
return locale$1.formatDistance('lessThanXMinutes', 1, localizeOptions);
|
438
|
-
} else {
|
439
|
-
return locale$1.formatDistance('xMinutes', 1, localizeOptions);
|
440
|
-
}
|
441
|
-
} else {
|
442
|
-
if (minutes === 0) {
|
443
|
-
return locale$1.formatDistance('lessThanXMinutes', 1, localizeOptions);
|
444
|
-
} else {
|
445
|
-
return locale$1.formatDistance('xMinutes', minutes, localizeOptions);
|
446
|
-
}
|
447
|
-
}
|
448
|
-
|
449
|
-
// 2 mins up to 0.75 hrs
|
450
|
-
} else if (minutes < 45) {
|
451
|
-
return locale$1.formatDistance('xMinutes', minutes, localizeOptions);
|
452
|
-
|
453
|
-
// 0.75 hrs up to 1.5 hrs
|
454
|
-
} else if (minutes < 90) {
|
455
|
-
return locale$1.formatDistance('aboutXHours', 1, localizeOptions);
|
456
|
-
|
457
|
-
// 1.5 hrs up to 24 hrs
|
458
|
-
} else if (minutes < MINUTES_IN_DAY) {
|
459
|
-
var hours = Math.round(minutes / 60);
|
460
|
-
return locale$1.formatDistance('aboutXHours', hours, localizeOptions);
|
461
|
-
|
462
|
-
// 1 day up to 1.75 days
|
463
|
-
} else if (minutes < MINUTES_IN_ALMOST_TWO_DAYS) {
|
464
|
-
return locale$1.formatDistance('xDays', 1, localizeOptions);
|
465
|
-
|
466
|
-
// 1.75 days up to 30 days
|
467
|
-
} else if (minutes < MINUTES_IN_MONTH) {
|
468
|
-
var days = Math.round(minutes / MINUTES_IN_DAY);
|
469
|
-
return locale$1.formatDistance('xDays', days, localizeOptions);
|
470
|
-
|
471
|
-
// 1 month up to 2 months
|
472
|
-
} else if (minutes < MINUTES_IN_TWO_MONTHS) {
|
473
|
-
months = Math.round(minutes / MINUTES_IN_MONTH);
|
474
|
-
return locale$1.formatDistance('aboutXMonths', months, localizeOptions);
|
475
|
-
}
|
476
|
-
months = differenceInMonths(dateRight, dateLeft);
|
477
|
-
|
478
|
-
// 2 months up to 12 months
|
479
|
-
if (months < 12) {
|
480
|
-
var nearestMonth = Math.round(minutes / MINUTES_IN_MONTH);
|
481
|
-
return locale$1.formatDistance('xMonths', nearestMonth, localizeOptions);
|
482
|
-
|
483
|
-
// 1 year up to max Date
|
484
|
-
} else {
|
485
|
-
var monthsSinceStartOfYear = months % 12;
|
486
|
-
var years = Math.floor(months / 12);
|
487
|
-
|
488
|
-
// N years up to 1 years 3 months
|
489
|
-
if (monthsSinceStartOfYear < 3) {
|
490
|
-
return locale$1.formatDistance('aboutXYears', years, localizeOptions);
|
491
|
-
|
492
|
-
// N years 3 months up to N years 9 months
|
493
|
-
} else if (monthsSinceStartOfYear < 9) {
|
494
|
-
return locale$1.formatDistance('overXYears', years, localizeOptions);
|
495
|
-
|
496
|
-
// N years 9 months up to N year 12 months
|
497
|
-
} else {
|
498
|
-
return locale$1.formatDistance('almostXYears', years + 1, localizeOptions);
|
499
|
-
}
|
500
|
-
}
|
501
|
-
}
|
502
|
-
|
503
|
-
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}";
|
18
|
+
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-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}";
|
504
19
|
|
505
|
-
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>`;
|
506
20
|
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>`;
|
507
21
|
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>`;
|
508
22
|
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>`;
|
509
|
-
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>`;
|
510
23
|
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>`;
|
24
|
+
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>`;
|
25
|
+
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>`;
|
26
|
+
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>`;
|
511
27
|
const SharingFilters = [
|
512
28
|
{ value: 'all', label: 'All' },
|
513
29
|
{ value: 'personal', label: 'Personal' },
|
@@ -535,6 +51,10 @@ const VerdocsTemplatesList$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
535
51
|
this.viewTemplate = createEvent(this, "viewTemplate", 7);
|
536
52
|
this.editTemplate = createEvent(this, "editTemplate", 7);
|
537
53
|
this.templateDeleted = createEvent(this, "templateDeleted", 7);
|
54
|
+
this.changeSort = createEvent(this, "changeSort", 7);
|
55
|
+
this.changeSharing = createEvent(this, "changeSharing", 7);
|
56
|
+
this.changeStarred = createEvent(this, "changeStarred", 7);
|
57
|
+
this.changeName = createEvent(this, "changeName", 7);
|
538
58
|
this.handleOptionSelected = (option, template) => {
|
539
59
|
var _a, _b;
|
540
60
|
if (option === 'send') {
|
@@ -651,14 +171,24 @@ const VerdocsTemplatesList$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
651
171
|
}
|
652
172
|
render() {
|
653
173
|
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) => {
|
174
|
+
var _a;
|
654
175
|
this.name = e.target.value;
|
176
|
+
(_a = this.changeName) === null || _a === void 0 ? void 0 : _a.emit(this.name);
|
655
177
|
} })), h("verdocs-quick-filter", { label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
|
178
|
+
var _a;
|
656
179
|
this.sharing = e.detail.value;
|
180
|
+
(_a = this.changeSharing) === null || _a === void 0 ? void 0 : _a.emit(this.sharing);
|
657
181
|
} }), h("verdocs-quick-filter", { label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
|
182
|
+
var _a;
|
658
183
|
this.starred = e.detail.value;
|
184
|
+
(_a = this.changeStarred) === null || _a === void 0 ? void 0 : _a.emit(this.starred);
|
659
185
|
} }), h("verdocs-quick-filter", { label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
|
186
|
+
var _a;
|
660
187
|
this.sort = e.detail.value;
|
188
|
+
(_a = this.changeSort) === null || _a === void 0 ? void 0 : _a.emit(this.sort);
|
661
189
|
} }), this.loading && h("verdocs-spinner", { mode: "dark", size: 24 }), h("div", { style: { display: 'flex', flex: '1' } })), this.templates.map(template => {
|
190
|
+
const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';
|
191
|
+
const date = template[dateToShow];
|
662
192
|
const MENU_OPTIONS = [];
|
663
193
|
if (this.allowedActions.includes('send')) {
|
664
194
|
MENU_OPTIONS.push({ label: 'Send', id: 'send', disabled: !this.canPreview(template) });
|
@@ -688,7 +218,7 @@ const VerdocsTemplatesList$1 = /*@__PURE__*/ proxyCustomElement(class extends HT
|
|
688
218
|
return (h("div", { class: "template", onClick: () => {
|
689
219
|
var _a;
|
690
220
|
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template });
|
691
|
-
} }, h("div", { class: "inner" }, h("verdocs-template-star", { template: template, endpoint: this.endpoint }), h("div", { class: "spacer icon-spacer" }), h("
|
221
|
+
} }, 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) }))));
|
692
222
|
}), !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 => {
|
693
223
|
this.selectedPage = e.detail.selectedPage;
|
694
224
|
return this.queryTemplates();
|
package/dist/docs.json
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
{
|
2
|
-
"timestamp": "2023-07-
|
2
|
+
"timestamp": "2023-07-28T20:24:47",
|
3
3
|
"compiler": {
|
4
4
|
"name": "@stencil/core",
|
5
5
|
"version": "2.20.0",
|
@@ -8583,6 +8583,42 @@
|
|
8583
8583
|
],
|
8584
8584
|
"methods": [],
|
8585
8585
|
"events": [
|
8586
|
+
{
|
8587
|
+
"event": "changeName",
|
8588
|
+
"detail": "string",
|
8589
|
+
"bubbles": true,
|
8590
|
+
"cancelable": true,
|
8591
|
+
"composed": true,
|
8592
|
+
"docs": "Event fired when the user changes the name filter. This is fired for every inputChange event (every character\ntyped). This event is provided for balance with the other events, but host applications should generally not\nsave this value. Users might appreciate applications remembering their sorting or filtering preferences, but\nprobably not their search terms.",
|
8593
|
+
"docsTags": []
|
8594
|
+
},
|
8595
|
+
{
|
8596
|
+
"event": "changeSharing",
|
8597
|
+
"detail": "\"all\" | \"personal\" | \"public\" | \"shared\"",
|
8598
|
+
"bubbles": true,
|
8599
|
+
"cancelable": true,
|
8600
|
+
"composed": true,
|
8601
|
+
"docs": "Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.",
|
8602
|
+
"docsTags": []
|
8603
|
+
},
|
8604
|
+
{
|
8605
|
+
"event": "changeSort",
|
8606
|
+
"detail": "\"counter\" | \"created_at\" | \"last_used_at\" | \"name\" | \"star_counter\" | \"updated_at\"",
|
8607
|
+
"bubbles": true,
|
8608
|
+
"cancelable": true,
|
8609
|
+
"composed": true,
|
8610
|
+
"docs": "Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.",
|
8611
|
+
"docsTags": []
|
8612
|
+
},
|
8613
|
+
{
|
8614
|
+
"event": "changeStarred",
|
8615
|
+
"detail": "\"all\" | \"starred\" | \"unstarred\"",
|
8616
|
+
"bubbles": true,
|
8617
|
+
"cancelable": true,
|
8618
|
+
"composed": true,
|
8619
|
+
"docs": "Event fired when the user changes their sort order. Host applications can use this to save the user's preferences.",
|
8620
|
+
"docsTags": []
|
8621
|
+
},
|
8586
8622
|
{
|
8587
8623
|
"event": "editTemplate",
|
8588
8624
|
"detail": "{ endpoint: VerdocsEndpoint; template: ITemplate; }",
|