@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.
@@ -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;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)}";
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, listTemplates, deleteTemplate, integerSequence, canPerformTemplateAction } from '@verdocs/js-sdk';
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 listTemplates(this.endpoint, queryParams);
128
+ const response = await getTemplates(this.endpoint, queryParams);
129
129
  this.templates = response.templates;
130
- this.count = response.total;
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: '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) => {
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: 'ec3aad6196653129f6e5107455a16ed9b3e61865', label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
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: '2724fed4125aa25e4eca0ffb2257f73efdcdd3b8', label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
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: '0b359f7886bc720cc7c9226a188e9a9ddbf57f96', label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
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: '8d27b2e859f2bb8414f76bc6c623fdc5b673f3c9', mode: "dark", size: 24 }), h("div", { key: '620315aef35c64aa9eb1ad57c5d0ecccd595a669', style: { display: 'flex', flex: '1' } })), locallyFilteredTemplates.map(template => {
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: '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 => {
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: '906e97265ab3564b2bff57f66869769ebaf65bcd', heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
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"],