@verdocs/web-sdk 4.2.28 → 4.2.33

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.
@@ -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;display:none}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)}";
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.listTemplates(this.endpoint, queryParams);
132
+ const response = await jsSdk.getTemplates(this.endpoint, queryParams);
133
133
  this.templates = response.templates;
134
- this.count = response.total;
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: 'f694c7dfbf5eba03936305973ee58f659b6bf108' }, index.h("div", { key: '3e4d44e62833d7202b23c0d5f836bc9d197408a0', class: "header" }, index.h("div", { key: 'f1141327d08933634f429520f47946a2a1d656fe', class: "filter" }, index.h("verdocs-text-input", { key: 'a769a17f2f7b82ab4a3ba2b9b911ee7d73a4e049', 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) => {
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: 'ec3aad6196653129f6e5107455a16ed9b3e61865', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
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: '2724fed4125aa25e4eca0ffb2257f73efdcdd3b8', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
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: '0b359f7886bc720cc7c9226a188e9a9ddbf57f96', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
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: '8d27b2e859f2bb8414f76bc6c623fdc5b673f3c9', mode: "dark", size: 24 }), index.h("div", { key: '620315aef35c64aa9eb1ad57c5d0ecccd595a669', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
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: '3feb2c40a2e322baeb52fea8815174268bdb9097' }, jsSdk.integerSequence(0, this.rowsPerPage).map(() => (index.h("div", { class: "template-placeholder" }))))), this.initiallyLoaded && !this.templates.length && index.h("div", { key: 'a4fbb1722d6d000614b0bfff01081c72550dbd85', 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 => {
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: '906e97265ab3564b2bff57f66869769ebaf65bcd', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
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"],
@@ -15,7 +15,6 @@ verdocs-send {
15
15
  background: #ffffff;
16
16
  flex-direction: column;
17
17
  font-family: "Inter", -apple-system, "Segoe UI", "Roboto", "Helvetica Neue", sans-serif;
18
- display: none;
19
18
  }
20
19
  verdocs-send.sendable {
21
20
  display: flex;
@@ -1,5 +1,5 @@
1
1
  import { format } from "date-fns";
2
- import { deleteTemplate, listTemplates, VerdocsEndpoint } from "@verdocs/js-sdk";
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 listTemplates(this.endpoint, queryParams);
117
+ const response = await getTemplates(this.endpoint, queryParams);
118
118
  this.templates = response.templates;
119
- this.count = response.total;
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: 'f694c7dfbf5eba03936305973ee58f659b6bf108' }, h("div", { key: '3e4d44e62833d7202b23c0d5f836bc9d197408a0', class: "header" }, h("div", { key: 'f1141327d08933634f429520f47946a2a1d656fe', class: "filter" }, h("verdocs-text-input", { key: 'a769a17f2f7b82ab4a3ba2b9b911ee7d73a4e049', 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) => {
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: 'ec3aad6196653129f6e5107455a16ed9b3e61865', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
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: '2724fed4125aa25e4eca0ffb2257f73efdcdd3b8', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
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: '0b359f7886bc720cc7c9226a188e9a9ddbf57f96', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
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: '8d27b2e859f2bb8414f76bc6c623fdc5b673f3c9', mode: "dark", size: 24 }), h("div", { key: '620315aef35c64aa9eb1ad57c5d0ecccd595a669', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
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: '3feb2c40a2e322baeb52fea8815174268bdb9097' }, integerSequence(0, this.rowsPerPage).map(() => (h("div", { class: "template-placeholder" }))))), this.initiallyLoaded && !this.templates.length && h("div", { key: 'a4fbb1722d6d000614b0bfff01081c72550dbd85', 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 => {
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: '906e97265ab3564b2bff57f66869769ebaf65bcd', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
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": "IGetTemplateSummarySortBy",
291
- "resolved": "\"counter\" | \"created_at\" | \"last_used_at\" | \"name\" | \"star_counter\" | \"updated_at\"",
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": "IGetTemplateSummarySortBy",
580
- "resolved": "\"counter\" | \"created_at\" | \"last_used_at\" | \"name\" | \"star_counter\" | \"updated_at\"",
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;display:none}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)}";
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, listTemplates, deleteTemplate, canPerformTemplateAction, integerSequence } from '@verdocs/js-sdk';
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 listTemplates(this.endpoint, queryParams);
138
+ const response = await getTemplates(this.endpoint, queryParams);
139
139
  this.templates = response.templates;
140
- this.count = response.total;
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: 'f694c7dfbf5eba03936305973ee58f659b6bf108' }, h("div", { key: '3e4d44e62833d7202b23c0d5f836bc9d197408a0', class: "header" }, h("div", { key: 'f1141327d08933634f429520f47946a2a1d656fe', class: "filter" }, h("verdocs-text-input", { key: 'a769a17f2f7b82ab4a3ba2b9b911ee7d73a4e049', 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) => {
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: 'ec3aad6196653129f6e5107455a16ed9b3e61865', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
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: '2724fed4125aa25e4eca0ffb2257f73efdcdd3b8', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
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: '0b359f7886bc720cc7c9226a188e9a9ddbf57f96', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
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: '8d27b2e859f2bb8414f76bc6c623fdc5b673f3c9', mode: "dark", size: 24 }), h("div", { key: '620315aef35c64aa9eb1ad57c5d0ecccd595a669', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
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: '3feb2c40a2e322baeb52fea8815174268bdb9097' }, integerSequence(0, this.rowsPerPage).map(() => (h("div", { class: "template-placeholder" }))))), this.initiallyLoaded && !this.templates.length && h("div", { key: 'a4fbb1722d6d000614b0bfff01081c72550dbd85', 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 => {
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: '906e97265ab3564b2bff57f66869769ebaf65bcd', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
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"],