@verdocs/web-sdk 4.2.28 → 4.2.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/verdocs-preview_10.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +9 -9
- package/dist/collection/components/embeds/verdocs-send/verdocs-send.css +0 -1
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +16 -28
- package/dist/components/verdocs-send2.js +1 -1
- package/dist/components/verdocs-templates-list.js +10 -10
- package/dist/esm/verdocs-preview_10.entry.js +1 -1
- package/dist/esm/verdocs-templates-list.entry.js +10 -10
- package/dist/esm-es5/verdocs-preview_10.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +3 -3
- package/dist/types/components.d.ts +6 -6
- package/dist/verdocs-web-sdk/p-322fa613.system.js +1 -1
- package/dist/verdocs-web-sdk/p-3306f93a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-61266396.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ba2761ee.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-f0a70f44.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/verdocs-web-sdk/p-0def046c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1ab4d5a9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b61842bd.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b7397955.system.entry.js +0 -1
@@ -100,7 +100,7 @@ const VerdocsPreview = class {
|
|
100
100
|
};
|
101
101
|
VerdocsPreview.style = VerdocsPreviewStyle0;
|
102
102
|
|
103
|
-
const verdocsSendCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif
|
103
|
+
const verdocsSendCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}";
|
104
104
|
const VerdocsSendStyle0 = verdocsSendCss;
|
105
105
|
|
106
106
|
const editIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';
|
@@ -129,9 +129,9 @@ const VerdocsTemplatesList = class {
|
|
129
129
|
if (this.name.trim() !== '') {
|
130
130
|
queryParams.q = this.name.trim();
|
131
131
|
}
|
132
|
-
const response = await jsSdk.
|
132
|
+
const response = await jsSdk.getTemplates(this.endpoint, queryParams);
|
133
133
|
this.templates = response.templates;
|
134
|
-
this.count = response.
|
134
|
+
this.count = response.count;
|
135
135
|
this.loading = false;
|
136
136
|
}
|
137
137
|
catch (e) {
|
@@ -159,24 +159,24 @@ const VerdocsTemplatesList = class {
|
|
159
159
|
// In addition to the server query we also filter locally. This provides a faster UI update
|
160
160
|
// while the onBlur re-queries the server for any new records that now qualify by the filter.
|
161
161
|
const locallyFilteredTemplates = !this.localNameFilter ? this.templates : this.templates.filter(t => t.name.toLowerCase().includes(this.localNameFilter.toLowerCase()));
|
162
|
-
return (index.h(index.Host, { key: '
|
162
|
+
return (index.h(index.Host, { key: '567fb81399e2719e52ad2ede3f6786ac9b81dd28' }, index.h("div", { key: '9b8c57ecc7ec397ae2a295263e44283d48408d1f', class: "header" }, index.h("div", { key: '902b1e9c4e636ada6b55ba01e5d9ff855892a5d4', class: "filter" }, index.h("verdocs-text-input", { key: '0cff9a689fec70e1516d828823adc411d6b9353f', id: "verdocs-filter-name", value: this.name, clearable: true, autocomplete: "off", placeholder: "Filter by Name...", onInput: (e) => (this.localNameFilter = e.target.value.trim()), onFocusout: (e) => {
|
163
163
|
var _a;
|
164
164
|
this.name = e.target.value.trim();
|
165
165
|
this.localNameFilter = e.target.value.trim();
|
166
166
|
(_a = this.changeName) === null || _a === void 0 ? void 0 : _a.emit(this.name);
|
167
|
-
} })), index.h("verdocs-quick-filter", { key: '
|
167
|
+
} })), index.h("verdocs-quick-filter", { key: 'd972df79f9706106ac104d1dc332891650440f02', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
|
168
168
|
var _a;
|
169
169
|
this.sharing = e.detail.value;
|
170
170
|
(_a = this.changeSharing) === null || _a === void 0 ? void 0 : _a.emit(this.sharing);
|
171
|
-
} }), index.h("verdocs-quick-filter", { key: '
|
171
|
+
} }), index.h("verdocs-quick-filter", { key: '59f5120af2e4142d1df9d7fd7745d750aefed1a9', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
|
172
172
|
var _a;
|
173
173
|
this.starred = e.detail.value;
|
174
174
|
(_a = this.changeStarred) === null || _a === void 0 ? void 0 : _a.emit(this.starred);
|
175
|
-
} }), index.h("verdocs-quick-filter", { key: '
|
175
|
+
} }), index.h("verdocs-quick-filter", { key: '136ba69d6a611450f5a7577377fdc49077bc7c75', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
|
176
176
|
var _a;
|
177
177
|
this.sort = e.detail.value;
|
178
178
|
(_a = this.changeSort) === null || _a === void 0 ? void 0 : _a.emit(this.sort);
|
179
|
-
} }), this.loading && index.h("verdocs-spinner", { key: '
|
179
|
+
} }), this.loading && index.h("verdocs-spinner", { key: '2f5ecff99858ac58cb9c3163ebf29de9c9af0600', mode: "dark", size: 24 }), index.h("div", { key: '002f869e168bede8529f5a1eef34193a1c7fa2a4', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
|
180
180
|
const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';
|
181
181
|
const date = template[dateToShow];
|
182
182
|
const MENU_OPTIONS = [];
|
@@ -223,9 +223,9 @@ const VerdocsTemplatesList = class {
|
|
223
223
|
var _a;
|
224
224
|
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template });
|
225
225
|
} }, index.h("div", { class: "inner" }, index.h("verdocs-template-star", { template: template, endpoint: this.endpoint }), index.h("div", { class: "spacer icon-spacer" }), index.h("div", { class: "name" }, template.name), index.h("div", { class: "spacer usage-spacer" }), index.h("div", { class: "usage" }, index.h("span", { innerHTML: EnvelopeIcon, title: "Usage Counter" }), template.counter || '--'), index.h("div", { class: "spacer last-used-spacer" }), index.h("div", { class: "last-used" }, dateToShow === 'created_at' && index.h("span", { innerHTML: CreatedIcon, title: "Created" }), dateToShow === 'updated_at' && index.h("span", { innerHTML: UpdatedIcon, title: "Last Updated" }), dateToShow === 'last_used_at' && index.h("span", { innerHTML: LastUsedIcon, title: "Last Used" }), date ? index$1.dateFns.format(new Date(date), 'P') : 'Never'), index.h("div", { class: "spacer ownership-spacer" }), template.is_public && (index.h("div", { class: "ownership" }, index.h("span", { innerHTML: GlobeAltIcon }), " Public")), !template.is_public && !template.is_personal && (index.h("div", { class: "ownership" }, index.h("span", { innerHTML: LockClosedIcon }), " Private")), !template.is_public && template.is_personal && (index.h("div", { class: "ownership" }, index.h("span", { innerHTML: BuildingOfficeIcon }), " Shared")), index.h("verdocs-dropdown", { options: MENU_OPTIONS, onOptionSelected: e => this.handleOptionSelected(e.detail.id, template) }))));
|
226
|
-
}), !this.initiallyLoaded && (index.h("div", { key: '
|
226
|
+
}), !this.initiallyLoaded && (index.h("div", { key: '474cabc9eec73c09797ced3f8a30f96cdfcf8c83' }, jsSdk.integerSequence(0, this.rowsPerPage).map(() => (index.h("div", { class: "template-placeholder" }))))), this.initiallyLoaded && !this.templates.length && index.h("div", { key: '0672ebc51ac1fb5277bf4221d3e5317989e31a07', class: "empty-text" }, "No matching templates found. Please adjust your filters and try again."), this.initiallyLoaded && this.templates.length && this.showPagination ? (index.h("div", { style: { marginTop: '20px' } }, index.h("verdocs-pagination", { selectedPage: this.selectedPage, perPage: this.rowsPerPage, itemCount: this.count, onSelectPage: e => {
|
227
227
|
this.selectedPage = e.detail.selectedPage;
|
228
|
-
} }))) : (index.h("div", null)), this.confirmDelete && (index.h("verdocs-ok-dialog", { key: '
|
228
|
+
} }))) : (index.h("div", null)), this.confirmDelete && (index.h("verdocs-ok-dialog", { key: '891cd4b0f6930b148b6144a17285c487aae56b51', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
|
229
229
|
}
|
230
230
|
static get watchers() { return {
|
231
231
|
"sharing": ["handleSharingUpdated"],
|
package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
import { format } from "date-fns";
|
2
|
-
import { deleteTemplate,
|
2
|
+
import { deleteTemplate, getTemplates, VerdocsEndpoint } from "@verdocs/js-sdk";
|
3
3
|
import { integerSequence, canPerformTemplateAction } from "@verdocs/js-sdk";
|
4
4
|
import { h, Host } from "@stencil/core";
|
5
5
|
import { SDKError } from "../../../utils/errors";
|
@@ -114,9 +114,9 @@ export class VerdocsTemplatesList {
|
|
114
114
|
if (this.name.trim() !== '') {
|
115
115
|
queryParams.q = this.name.trim();
|
116
116
|
}
|
117
|
-
const response = await
|
117
|
+
const response = await getTemplates(this.endpoint, queryParams);
|
118
118
|
this.templates = response.templates;
|
119
|
-
this.count = response.
|
119
|
+
this.count = response.count;
|
120
120
|
this.loading = false;
|
121
121
|
}
|
122
122
|
catch (e) {
|
@@ -144,24 +144,24 @@ export class VerdocsTemplatesList {
|
|
144
144
|
// In addition to the server query we also filter locally. This provides a faster UI update
|
145
145
|
// while the onBlur re-queries the server for any new records that now qualify by the filter.
|
146
146
|
const locallyFilteredTemplates = !this.localNameFilter ? this.templates : this.templates.filter(t => t.name.toLowerCase().includes(this.localNameFilter.toLowerCase()));
|
147
|
-
return (h(Host, { key: '
|
147
|
+
return (h(Host, { key: '567fb81399e2719e52ad2ede3f6786ac9b81dd28' }, h("div", { key: '9b8c57ecc7ec397ae2a295263e44283d48408d1f', class: "header" }, h("div", { key: '902b1e9c4e636ada6b55ba01e5d9ff855892a5d4', class: "filter" }, h("verdocs-text-input", { key: '0cff9a689fec70e1516d828823adc411d6b9353f', id: "verdocs-filter-name", value: this.name, clearable: true, autocomplete: "off", placeholder: "Filter by Name...", onInput: (e) => (this.localNameFilter = e.target.value.trim()), onFocusout: (e) => {
|
148
148
|
var _a;
|
149
149
|
this.name = e.target.value.trim();
|
150
150
|
this.localNameFilter = e.target.value.trim();
|
151
151
|
(_a = this.changeName) === null || _a === void 0 ? void 0 : _a.emit(this.name);
|
152
|
-
} })), h("verdocs-quick-filter", { key: '
|
152
|
+
} })), h("verdocs-quick-filter", { key: 'd972df79f9706106ac104d1dc332891650440f02', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
|
153
153
|
var _a;
|
154
154
|
this.sharing = e.detail.value;
|
155
155
|
(_a = this.changeSharing) === null || _a === void 0 ? void 0 : _a.emit(this.sharing);
|
156
|
-
} }), h("verdocs-quick-filter", { key: '
|
156
|
+
} }), h("verdocs-quick-filter", { key: '59f5120af2e4142d1df9d7fd7745d750aefed1a9', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
|
157
157
|
var _a;
|
158
158
|
this.starred = e.detail.value;
|
159
159
|
(_a = this.changeStarred) === null || _a === void 0 ? void 0 : _a.emit(this.starred);
|
160
|
-
} }), h("verdocs-quick-filter", { key: '
|
160
|
+
} }), h("verdocs-quick-filter", { key: '136ba69d6a611450f5a7577377fdc49077bc7c75', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
|
161
161
|
var _a;
|
162
162
|
this.sort = e.detail.value;
|
163
163
|
(_a = this.changeSort) === null || _a === void 0 ? void 0 : _a.emit(this.sort);
|
164
|
-
} }), this.loading && h("verdocs-spinner", { key: '
|
164
|
+
} }), this.loading && h("verdocs-spinner", { key: '2f5ecff99858ac58cb9c3163ebf29de9c9af0600', mode: "dark", size: 24 }), h("div", { key: '002f869e168bede8529f5a1eef34193a1c7fa2a4', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
|
165
165
|
const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';
|
166
166
|
const date = template[dateToShow];
|
167
167
|
const MENU_OPTIONS = [];
|
@@ -208,9 +208,9 @@ export class VerdocsTemplatesList {
|
|
208
208
|
var _a;
|
209
209
|
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template });
|
210
210
|
} }, 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) }))));
|
211
|
-
}), !this.initiallyLoaded && (h("div", { key: '
|
211
|
+
}), !this.initiallyLoaded && (h("div", { key: '474cabc9eec73c09797ced3f8a30f96cdfcf8c83' }, integerSequence(0, this.rowsPerPage).map(() => (h("div", { class: "template-placeholder" }))))), this.initiallyLoaded && !this.templates.length && h("div", { key: '0672ebc51ac1fb5277bf4221d3e5317989e31a07', class: "empty-text" }, "No matching templates found. Please adjust your filters and try again."), this.initiallyLoaded && this.templates.length && this.showPagination ? (h("div", { style: { marginTop: '20px' } }, h("verdocs-pagination", { selectedPage: this.selectedPage, perPage: this.rowsPerPage, itemCount: this.count, onSelectPage: e => {
|
212
212
|
this.selectedPage = e.detail.selectedPage;
|
213
|
-
} }))) : (h("div", null)), this.confirmDelete && (h("verdocs-ok-dialog", { key: '
|
213
|
+
} }))) : (h("div", null)), this.confirmDelete && (h("verdocs-ok-dialog", { key: '891cd4b0f6930b148b6144a17285c487aae56b51', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
|
214
214
|
}
|
215
215
|
static get is() { return "verdocs-templates-list"; }
|
216
216
|
static get originalStyleUrls() {
|
@@ -287,15 +287,9 @@ export class VerdocsTemplatesList {
|
|
287
287
|
"type": "string",
|
288
288
|
"mutable": true,
|
289
289
|
"complexType": {
|
290
|
-
"original": "
|
291
|
-
"resolved": "
|
292
|
-
"references": {
|
293
|
-
"IGetTemplateSummarySortBy": {
|
294
|
-
"location": "import",
|
295
|
-
"path": "@verdocs/js-sdk",
|
296
|
-
"id": ""
|
297
|
-
}
|
298
|
-
}
|
290
|
+
"original": "string",
|
291
|
+
"resolved": "string",
|
292
|
+
"references": {}
|
299
293
|
},
|
300
294
|
"required": false,
|
301
295
|
"optional": false,
|
@@ -576,15 +570,9 @@ export class VerdocsTemplatesList {
|
|
576
570
|
"text": "Event fired when the user changes their sort order. Host applications can use this to save the user's preferences."
|
577
571
|
},
|
578
572
|
"complexType": {
|
579
|
-
"original": "
|
580
|
-
"resolved": "
|
581
|
-
"references": {
|
582
|
-
"IGetTemplateSummarySortBy": {
|
583
|
-
"location": "import",
|
584
|
-
"path": "@verdocs/js-sdk",
|
585
|
-
"id": ""
|
586
|
-
}
|
587
|
-
}
|
573
|
+
"original": "string",
|
574
|
+
"resolved": "string",
|
575
|
+
"references": {}
|
588
576
|
}
|
589
577
|
}, {
|
590
578
|
"method": "changeSharing",
|
@@ -12,7 +12,7 @@ import { d as defineCustomElement$3 } from './verdocs-select-input2.js';
|
|
12
12
|
import { d as defineCustomElement$2 } from './verdocs-spinner2.js';
|
13
13
|
import { d as defineCustomElement$1 } from './verdocs-toggle-button2.js';
|
14
14
|
|
15
|
-
const verdocsSendCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif
|
15
|
+
const verdocsSendCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}";
|
16
16
|
const VerdocsSendStyle0 = verdocsSendCss;
|
17
17
|
|
18
18
|
const editIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
2
|
-
import { VerdocsEndpoint,
|
2
|
+
import { VerdocsEndpoint, getTemplates, deleteTemplate, canPerformTemplateAction, integerSequence } from '@verdocs/js-sdk';
|
3
3
|
import { S as SDKError } from './errors.js';
|
4
4
|
import { d as defineCustomElement$a } from './verdocs-button2.js';
|
5
5
|
import { d as defineCustomElement$9 } from './verdocs-dropdown2.js';
|
@@ -135,9 +135,9 @@ const VerdocsTemplatesList$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsTem
|
|
135
135
|
if (this.name.trim() !== '') {
|
136
136
|
queryParams.q = this.name.trim();
|
137
137
|
}
|
138
|
-
const response = await
|
138
|
+
const response = await getTemplates(this.endpoint, queryParams);
|
139
139
|
this.templates = response.templates;
|
140
|
-
this.count = response.
|
140
|
+
this.count = response.count;
|
141
141
|
this.loading = false;
|
142
142
|
}
|
143
143
|
catch (e) {
|
@@ -165,24 +165,24 @@ const VerdocsTemplatesList$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsTem
|
|
165
165
|
// In addition to the server query we also filter locally. This provides a faster UI update
|
166
166
|
// while the onBlur re-queries the server for any new records that now qualify by the filter.
|
167
167
|
const locallyFilteredTemplates = !this.localNameFilter ? this.templates : this.templates.filter(t => t.name.toLowerCase().includes(this.localNameFilter.toLowerCase()));
|
168
|
-
return (h(Host, { key: '
|
168
|
+
return (h(Host, { key: '567fb81399e2719e52ad2ede3f6786ac9b81dd28' }, h("div", { key: '9b8c57ecc7ec397ae2a295263e44283d48408d1f', class: "header" }, h("div", { key: '902b1e9c4e636ada6b55ba01e5d9ff855892a5d4', class: "filter" }, h("verdocs-text-input", { key: '0cff9a689fec70e1516d828823adc411d6b9353f', id: "verdocs-filter-name", value: this.name, clearable: true, autocomplete: "off", placeholder: "Filter by Name...", onInput: (e) => (this.localNameFilter = e.target.value.trim()), onFocusout: (e) => {
|
169
169
|
var _a;
|
170
170
|
this.name = e.target.value.trim();
|
171
171
|
this.localNameFilter = e.target.value.trim();
|
172
172
|
(_a = this.changeName) === null || _a === void 0 ? void 0 : _a.emit(this.name);
|
173
|
-
} })), h("verdocs-quick-filter", { key: '
|
173
|
+
} })), h("verdocs-quick-filter", { key: 'd972df79f9706106ac104d1dc332891650440f02', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
|
174
174
|
var _a;
|
175
175
|
this.sharing = e.detail.value;
|
176
176
|
(_a = this.changeSharing) === null || _a === void 0 ? void 0 : _a.emit(this.sharing);
|
177
|
-
} }), h("verdocs-quick-filter", { key: '
|
177
|
+
} }), h("verdocs-quick-filter", { key: '59f5120af2e4142d1df9d7fd7745d750aefed1a9', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
|
178
178
|
var _a;
|
179
179
|
this.starred = e.detail.value;
|
180
180
|
(_a = this.changeStarred) === null || _a === void 0 ? void 0 : _a.emit(this.starred);
|
181
|
-
} }), h("verdocs-quick-filter", { key: '
|
181
|
+
} }), h("verdocs-quick-filter", { key: '136ba69d6a611450f5a7577377fdc49077bc7c75', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
|
182
182
|
var _a;
|
183
183
|
this.sort = e.detail.value;
|
184
184
|
(_a = this.changeSort) === null || _a === void 0 ? void 0 : _a.emit(this.sort);
|
185
|
-
} }), this.loading && h("verdocs-spinner", { key: '
|
185
|
+
} }), this.loading && h("verdocs-spinner", { key: '2f5ecff99858ac58cb9c3163ebf29de9c9af0600', mode: "dark", size: 24 }), h("div", { key: '002f869e168bede8529f5a1eef34193a1c7fa2a4', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
|
186
186
|
const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';
|
187
187
|
const date = template[dateToShow];
|
188
188
|
const MENU_OPTIONS = [];
|
@@ -229,9 +229,9 @@ const VerdocsTemplatesList$1 = /*@__PURE__*/ proxyCustomElement(class VerdocsTem
|
|
229
229
|
var _a;
|
230
230
|
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template });
|
231
231
|
} }, 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 ? dateFns.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) }))));
|
232
|
-
}), !this.initiallyLoaded && (h("div", { key: '
|
232
|
+
}), !this.initiallyLoaded && (h("div", { key: '474cabc9eec73c09797ced3f8a30f96cdfcf8c83' }, integerSequence(0, this.rowsPerPage).map(() => (h("div", { class: "template-placeholder" }))))), this.initiallyLoaded && !this.templates.length && h("div", { key: '0672ebc51ac1fb5277bf4221d3e5317989e31a07', class: "empty-text" }, "No matching templates found. Please adjust your filters and try again."), this.initiallyLoaded && this.templates.length && this.showPagination ? (h("div", { style: { marginTop: '20px' } }, h("verdocs-pagination", { selectedPage: this.selectedPage, perPage: this.rowsPerPage, itemCount: this.count, onSelectPage: e => {
|
233
233
|
this.selectedPage = e.detail.selectedPage;
|
234
|
-
} }))) : (h("div", null)), this.confirmDelete && (h("verdocs-ok-dialog", { key: '
|
234
|
+
} }))) : (h("div", null)), this.confirmDelete && (h("verdocs-ok-dialog", { key: '891cd4b0f6930b148b6144a17285c487aae56b51', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
|
235
235
|
}
|
236
236
|
static get watchers() { return {
|
237
237
|
"sharing": ["handleSharingUpdated"],
|
@@ -96,7 +96,7 @@ const VerdocsPreview = class {
|
|
96
96
|
};
|
97
97
|
VerdocsPreview.style = VerdocsPreviewStyle0;
|
98
98
|
|
99
|
-
const verdocsSendCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif
|
99
|
+
const verdocsSendCss = "@-webkit-keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}@keyframes verdocs-field-pulse{0%{background-color:rgba(0, 0, 0, 0.35)}50%{background-color:rgba(0, 0, 0, 0)}100%{background-color:rgba(0, 0, 0, 0.35)}}verdocs-send{padding:10px;position:relative;background:#ffffff;-ms-flex-direction:column;flex-direction:column;font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}verdocs-send.sendable{display:-ms-flexbox;display:flex}verdocs-send .recipients{position:relative}verdocs-send .left-line{top:32px;left:20px;z-index:1;width:12px;bottom:30px;position:absolute;background:#ffffff;border-left:3px dotted #9b9b9b}verdocs-send .level{display:-ms-flexbox;display:flex;-webkit-column-gap:10px;-moz-column-gap:10px;column-gap:10px;margin-left:50px;position:relative;-ms-flex-direction:row;flex-direction:row;padding:8px 0 4px 0;border-bottom:1px solid rgba(151, 151, 151, 0.2666666667)}verdocs-send .level .level-icon{top:14px;z-index:2;left:-40px;width:24px;height:24px;position:absolute;background:#ffffff}verdocs-send .level .level-icon svg{fill:rgba(0, 0, 0, 0.537254902)}verdocs-send .level .recipient{height:30px;display:-ms-flexbox;display:flex;-ms-flex:0 0 30px;flex:0 0 30px;color:#000000;cursor:pointer;font-size:14px;-ms-flex-align:center;align-items:center;border-radius:30px;-ms-flex-direction:row;flex-direction:row;background:#dddddd;white-space:nowrap;border:2px solid #dddddd;padding:2px 10px 2px 14px}verdocs-send .level .recipient .icon{width:22px;height:22px;-ms-flex:0 0 22px;flex:0 0 22px;margin:0 0 0 10px}verdocs-send .level .recipient .icon svg{width:22px;height:22px;fill:#333333;outline:none}verdocs-send .level .complete{-ms-flex:1;flex:1;height:30px;display:-ms-flexbox;display:flex;color:#000000;font-size:14px;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;padding:3px 10px 3px 2px}verdocs-send .buttons{display:-ms-flexbox;display:flex;margin-top:10px;-webkit-column-gap:15px;-moz-column-gap:15px;column-gap:15px;-ms-flex-direction:row;flex-direction:row}verdocs-send verdocs-contact-picker{left:0;top:41px;z-index:10;position:absolute;border:1px solid #dddddd;-webkit-box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1);box-shadow:0 0 6px 3px rgba(0, 0, 0, 0.1)}";
|
100
100
|
const VerdocsSendStyle0 = verdocsSendCss;
|
101
101
|
|
102
102
|
const editIcon = '<svg focusable="false" aria-hidden="true" viewBox="0 0 24 24" tabindex="-1"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.9959.9959 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"></path></svg>';
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host } from './index-b89cf6a4.js';
|
2
|
-
import { VerdocsEndpoint,
|
2
|
+
import { VerdocsEndpoint, getTemplates, deleteTemplate, integerSequence, canPerformTemplateAction } from '@verdocs/js-sdk';
|
3
3
|
import { S as SDKError } from './errors-887f1e88.js';
|
4
4
|
import { d as dateFns } from './index-0329eed3.js';
|
5
5
|
|
@@ -125,9 +125,9 @@ const VerdocsTemplatesList = class {
|
|
125
125
|
if (this.name.trim() !== '') {
|
126
126
|
queryParams.q = this.name.trim();
|
127
127
|
}
|
128
|
-
const response = await
|
128
|
+
const response = await getTemplates(this.endpoint, queryParams);
|
129
129
|
this.templates = response.templates;
|
130
|
-
this.count = response.
|
130
|
+
this.count = response.count;
|
131
131
|
this.loading = false;
|
132
132
|
}
|
133
133
|
catch (e) {
|
@@ -155,24 +155,24 @@ const VerdocsTemplatesList = class {
|
|
155
155
|
// In addition to the server query we also filter locally. This provides a faster UI update
|
156
156
|
// while the onBlur re-queries the server for any new records that now qualify by the filter.
|
157
157
|
const locallyFilteredTemplates = !this.localNameFilter ? this.templates : this.templates.filter(t => t.name.toLowerCase().includes(this.localNameFilter.toLowerCase()));
|
158
|
-
return (h(Host, { key: '
|
158
|
+
return (h(Host, { key: '567fb81399e2719e52ad2ede3f6786ac9b81dd28' }, h("div", { key: '9b8c57ecc7ec397ae2a295263e44283d48408d1f', class: "header" }, h("div", { key: '902b1e9c4e636ada6b55ba01e5d9ff855892a5d4', class: "filter" }, h("verdocs-text-input", { key: '0cff9a689fec70e1516d828823adc411d6b9353f', id: "verdocs-filter-name", value: this.name, clearable: true, autocomplete: "off", placeholder: "Filter by Name...", onInput: (e) => (this.localNameFilter = e.target.value.trim()), onFocusout: (e) => {
|
159
159
|
var _a;
|
160
160
|
this.name = e.target.value.trim();
|
161
161
|
this.localNameFilter = e.target.value.trim();
|
162
162
|
(_a = this.changeName) === null || _a === void 0 ? void 0 : _a.emit(this.name);
|
163
|
-
} })), h("verdocs-quick-filter", { key: '
|
163
|
+
} })), h("verdocs-quick-filter", { key: 'd972df79f9706106ac104d1dc332891650440f02', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
|
164
164
|
var _a;
|
165
165
|
this.sharing = e.detail.value;
|
166
166
|
(_a = this.changeSharing) === null || _a === void 0 ? void 0 : _a.emit(this.sharing);
|
167
|
-
} }), h("verdocs-quick-filter", { key: '
|
167
|
+
} }), h("verdocs-quick-filter", { key: '59f5120af2e4142d1df9d7fd7745d750aefed1a9', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
|
168
168
|
var _a;
|
169
169
|
this.starred = e.detail.value;
|
170
170
|
(_a = this.changeStarred) === null || _a === void 0 ? void 0 : _a.emit(this.starred);
|
171
|
-
} }), h("verdocs-quick-filter", { key: '
|
171
|
+
} }), h("verdocs-quick-filter", { key: '136ba69d6a611450f5a7577377fdc49077bc7c75', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
|
172
172
|
var _a;
|
173
173
|
this.sort = e.detail.value;
|
174
174
|
(_a = this.changeSort) === null || _a === void 0 ? void 0 : _a.emit(this.sort);
|
175
|
-
} }), this.loading && h("verdocs-spinner", { key: '
|
175
|
+
} }), this.loading && h("verdocs-spinner", { key: '2f5ecff99858ac58cb9c3163ebf29de9c9af0600', mode: "dark", size: 24 }), h("div", { key: '002f869e168bede8529f5a1eef34193a1c7fa2a4', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
|
176
176
|
const dateToShow = this.sort === 'created_at' ? 'created_at' : this.sort === 'updated_at' ? 'updated_at' : 'last_used_at';
|
177
177
|
const date = template[dateToShow];
|
178
178
|
const MENU_OPTIONS = [];
|
@@ -219,9 +219,9 @@ const VerdocsTemplatesList = class {
|
|
219
219
|
var _a;
|
220
220
|
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template });
|
221
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 ? dateFns.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) }))));
|
222
|
-
}), !this.initiallyLoaded && (h("div", { key: '
|
222
|
+
}), !this.initiallyLoaded && (h("div", { key: '474cabc9eec73c09797ced3f8a30f96cdfcf8c83' }, integerSequence(0, this.rowsPerPage).map(() => (h("div", { class: "template-placeholder" }))))), this.initiallyLoaded && !this.templates.length && h("div", { key: '0672ebc51ac1fb5277bf4221d3e5317989e31a07', class: "empty-text" }, "No matching templates found. Please adjust your filters and try again."), this.initiallyLoaded && this.templates.length && this.showPagination ? (h("div", { style: { marginTop: '20px' } }, h("verdocs-pagination", { selectedPage: this.selectedPage, perPage: this.rowsPerPage, itemCount: this.count, onSelectPage: e => {
|
223
223
|
this.selectedPage = e.detail.selectedPage;
|
224
|
-
} }))) : (h("div", null)), this.confirmDelete && (h("verdocs-ok-dialog", { key: '
|
224
|
+
} }))) : (h("div", null)), this.confirmDelete && (h("verdocs-ok-dialog", { key: '891cd4b0f6930b148b6144a17285c487aae56b51', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
|
225
225
|
}
|
226
226
|
static get watchers() { return {
|
227
227
|
"sharing": ["handleSharingUpdated"],
|