@verdocs/web-sdk 1.15.1 → 1.15.3
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/{TemplateStore-fe148e97.js → TemplateStore-a7745f0a.js} +1 -1
- package/dist/cjs/{Templates-1a86703d.js → Templates-6fb62dcd.js} +15 -0
- package/dist/cjs/{index-7c19ba1d.js → index-961181ce.js} +37 -602
- package/dist/cjs/index-db620f37.js +575 -0
- package/dist/cjs/ipc-test.cjs.entry.js +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/{utils-2c6835c6.js → utils-67dac0c3.js} +1 -1
- package/dist/cjs/verdocs-activity-box.cjs.entry.js +6 -7
- package/dist/cjs/verdocs-build.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-button-panel_3.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-envelope-document-page.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-envelope-sidebar.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-envelopes-list.cjs.entry.js +5 -6
- package/dist/cjs/verdocs-field-checkbox.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-date.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-dropdown.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-initial.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-payment.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-radio-button.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-signature.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-textarea.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-textbox.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-field-timestamp.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +2 -1
- package/dist/cjs/verdocs-pagination_3.cjs.entry.js +169 -0
- package/dist/cjs/verdocs-preview.cjs.entry.js +5 -4
- package/dist/cjs/verdocs-quick-functions_3.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-send.cjs.entry.js +5 -4
- package/dist/cjs/verdocs-sign.cjs.entry.js +3 -2
- package/dist/cjs/{verdocs-pagination_4.cjs.entry.js → verdocs-status-indicator.cjs.entry.js} +0 -161
- package/dist/cjs/verdocs-template-attachments_2.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-document-page_2.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-template-fields_4.cjs.entry.js +5 -4
- package/dist/cjs/verdocs-template-name.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-reminders.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-template-star.cjs.entry.js +67 -0
- package/dist/cjs/verdocs-template-visibility.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-templates-list.cjs.entry.js +595 -111
- package/dist/cjs/verdocs-view.cjs.entry.js +3 -2
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/envelopes/verdocs-activity-box/verdocs-activity-box.js +1 -1
- package/dist/collection/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.js +38 -43
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.css +31 -0
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.js +144 -0
- package/dist/collection/components/templates/verdocs-template-star/verdocs-template-star.stories.js +27 -0
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.css +98 -17
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js +175 -221
- package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.stories.js +8 -6
- package/dist/components/Templates.js +15 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +1 -1
- package/dist/components/verdocs-activity-box.js +6 -7
- package/dist/components/verdocs-envelopes-list.js +4 -7
- package/dist/components/verdocs-template-star.d.ts +11 -0
- package/dist/components/verdocs-template-star.js +6 -0
- package/dist/components/verdocs-template-star2.js +82 -0
- package/dist/components/verdocs-templates-list.js +634 -123
- package/dist/custom-elements.json +1890 -0
- package/dist/docs.json +223 -61
- package/dist/esm/{TemplateStore-c15956ae.js → TemplateStore-ad36abff.js} +1 -1
- package/dist/esm/{Templates-3760f311.js → Templates-1893bda7.js} +15 -1
- package/dist/esm/{index-914ed6f7.js → index-2685d184.js} +1 -566
- package/dist/esm/index-8dc8fdc4.js +568 -0
- package/dist/esm/ipc-test.entry.js +2 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/{utils-a8284581.js → utils-ef800713.js} +2 -2
- package/dist/esm/verdocs-activity-box.entry.js +6 -7
- package/dist/esm/verdocs-build.entry.js +2 -2
- package/dist/esm/verdocs-button-panel_3.entry.js +2 -2
- package/dist/esm/verdocs-envelope-document-page.entry.js +3 -2
- package/dist/esm/verdocs-envelope-sidebar.entry.js +2 -1
- package/dist/esm/verdocs-envelopes-list.entry.js +5 -6
- package/dist/esm/verdocs-field-checkbox.entry.js +3 -2
- package/dist/esm/verdocs-field-date.entry.js +3 -2
- package/dist/esm/verdocs-field-dropdown.entry.js +3 -2
- package/dist/esm/verdocs-field-initial.entry.js +3 -2
- package/dist/esm/verdocs-field-payment.entry.js +3 -2
- package/dist/esm/verdocs-field-radio-button.entry.js +3 -2
- package/dist/esm/verdocs-field-signature.entry.js +3 -2
- package/dist/esm/verdocs-field-textarea.entry.js +3 -2
- package/dist/esm/verdocs-field-textbox.entry.js +3 -2
- package/dist/esm/verdocs-field-timestamp.entry.js +3 -2
- package/dist/esm/verdocs-organization-card.entry.js +2 -1
- package/dist/esm/verdocs-pagination_3.entry.js +163 -0
- package/dist/esm/verdocs-preview.entry.js +5 -4
- package/dist/esm/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm/verdocs-send.entry.js +5 -4
- package/dist/esm/verdocs-sign.entry.js +3 -2
- package/dist/esm/{verdocs-pagination_4.entry.js → verdocs-status-indicator.entry.js} +2 -160
- package/dist/esm/verdocs-template-attachments_2.entry.js +2 -2
- package/dist/esm/verdocs-template-document-page_2.entry.js +3 -2
- package/dist/esm/verdocs-template-fields_4.entry.js +5 -4
- package/dist/esm/verdocs-template-name.entry.js +2 -2
- package/dist/esm/verdocs-template-reminders.entry.js +2 -2
- package/dist/esm/verdocs-template-star.entry.js +63 -0
- package/dist/esm/verdocs-template-visibility.entry.js +2 -2
- package/dist/esm/verdocs-templates-list.entry.js +592 -108
- package/dist/esm/verdocs-view.entry.js +3 -2
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/{TemplateStore-c15956ae.js → TemplateStore-ad36abff.js} +1 -1
- package/dist/esm-es5/{Templates-3760f311.js → Templates-1893bda7.js} +1 -1
- package/dist/esm-es5/index-2685d184.js +1 -0
- package/dist/esm-es5/index-8dc8fdc4.js +1 -0
- package/dist/esm-es5/ipc-test.entry.js +1 -1
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/{utils-a8284581.js → utils-ef800713.js} +2 -2
- package/dist/esm-es5/verdocs-activity-box.entry.js +1 -1
- package/dist/esm-es5/verdocs-build.entry.js +1 -1
- package/dist/esm-es5/verdocs-button-panel_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-document-page.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelope-sidebar.entry.js +1 -1
- package/dist/esm-es5/verdocs-envelopes-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-checkbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-date.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-dropdown.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-initial.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-payment.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-radio-button.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-signature.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textarea.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-textbox.entry.js +1 -1
- package/dist/esm-es5/verdocs-field-timestamp.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-pagination_3.entry.js +1 -0
- package/dist/esm-es5/verdocs-preview.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions_3.entry.js +1 -1
- package/dist/esm-es5/verdocs-send.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-status-indicator.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-attachments_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-document-page_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-fields_4.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-name.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-reminders.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-star.entry.js +1 -0
- package/dist/esm-es5/verdocs-template-visibility.entry.js +1 -1
- package/dist/esm-es5/verdocs-templates-list.entry.js +1 -1
- package/dist/esm-es5/verdocs-view.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/envelopes/verdocs-envelopes-list/verdocs-envelopes-list.d.ts +8 -16
- package/dist/types/components/templates/verdocs-template-star/verdocs-template-star.d.ts +35 -0
- package/dist/types/components/templates/verdocs-template-star/verdocs-template-star.stories.d.ts +6 -0
- package/dist/types/components/templates/verdocs-templates-list/verdocs-templates-list.d.ts +24 -29
- package/dist/types/components.d.ts +89 -27
- package/dist/verdocs-web-sdk/p-067b43ba.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-09ee5e46.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-0ae14e45.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-831e2651.system.entry.js → p-0b369a3e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-b2a0cef4.entry.js → p-0e1c0da5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-11942b39.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-11de0d75.system.js +1 -0
- package/dist/verdocs-web-sdk/p-1cf38cea.system.js +1 -1
- package/dist/verdocs-web-sdk/p-1d010a79.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-46013b8a.entry.js → p-20fcfef9.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2118b452.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-21629ed8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-253b6f06.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2961d1a8.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-2a4566ab.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-35841b7c.js +1 -0
- package/dist/verdocs-web-sdk/p-38d7c3f2.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3ed5dc5c.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3fe6dc00.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-42f1012f.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-45b1c6cd.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-e34783b1.entry.js → p-4615a245.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4a7dcb1b.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3399a2a2.system.entry.js → p-4eb69794.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4fe4e161.js +1 -0
- package/dist/verdocs-web-sdk/{p-dee333ac.system.entry.js → p-52f9cfba.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-5612d642.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-56943696.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5abf9fab.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-5c5a5baf.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-3cac4136.system.js → p-5ef54155.system.js} +2 -2
- package/dist/verdocs-web-sdk/p-62f70c53.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-63f9586c.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6570268f.js +1 -0
- package/dist/verdocs-web-sdk/p-67df4e57.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-68dc38f8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-6cc3de8d.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-c02c16e1.js → p-6f4149c4.js} +1 -1
- package/dist/verdocs-web-sdk/{p-90f5c0fa.system.entry.js → p-7028e5fd.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-eac4674e.system.entry.js → p-715c5b9d.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-73371d7a.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-fb3d4091.system.js → p-75455b2d.system.js} +1 -1
- package/dist/verdocs-web-sdk/{p-4cdc37f8.entry.js → p-78c38cec.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-63abfff5.system.entry.js → p-79cf7768.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-7bc3f0ae.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-7d992b01.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-80f083a4.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-812ed1e7.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-823225c2.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-82f6faac.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8603a0d0.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-8c4abfcc.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-90371251.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-951d9c70.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9dde58a8.system.js +1 -0
- package/dist/verdocs-web-sdk/p-a3ac0082.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cb17023f.entry.js → p-a3b3cdf5.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a10e87d.entry.js → p-a6a8d20f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-ac18bc08.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b2c5baae.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b3401d8e.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b6dba09e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-b995ebab.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-bd077b3e.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-aefbafc3.system.entry.js → p-bf8cf9ff.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c6c2b890.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-a6ecbbd5.js → p-c8b879d1.js} +2 -2
- package/dist/verdocs-web-sdk/p-cb283760.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-ce097fdf.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-783d4ad4.system.entry.js → p-ce626e5b.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d2d18696.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-d4765b46.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-db67fbd1.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-efcde7ca.entry.js → p-dda7674c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e32ec792.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4e02f533.entry.js → p-f88d1bb0.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-fc8bba36.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/index-914ed6f7.js +0 -1
- package/dist/esm-es5/verdocs-pagination_4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-01de4163.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-134aad4b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-14638f0c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-1a0cccea.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-23686c43.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2730089c.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2dbe3de7.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2e164979.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2ff7c8c3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-38434761.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3ad85ae0.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3d80bb1e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3eccbc81.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-3fadef3d.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-40f3a175.js +0 -1
- package/dist/verdocs-web-sdk/p-42acf76c.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-4bbc74d9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5ba13ab8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5c2d7886.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-634a5760.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-6c267fdd.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-871f33f9.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8d32aca4.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-90f5a645.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-92917e74.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-92b2d9e4.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-92ca2aef.system.js +0 -1
- package/dist/verdocs-web-sdk/p-9416d327.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-95332ec8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-9f76bbe1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a4391c14.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a7eef6e9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a824c9a6.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c0d8f0db.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-c220af42.js +0 -1
- package/dist/verdocs-web-sdk/p-c53aefe5.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cd0eb575.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d497b3c1.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-dc9c4361.system.js +0 -1
- package/dist/verdocs-web-sdk/p-e2e972fc.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e646e8ef.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e6512cc3.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e72c075e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e971511e.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-e989b3ce.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f623b887.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f6594380.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-f7ea7b36.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fbd3e8df.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ff3e5717.entry.js +0 -1
package/dist/collection/components/templates/verdocs-templates-list/verdocs-templates-list.js
CHANGED
@@ -1,134 +1,94 @@
|
|
1
1
|
import { VerdocsEndpoint } from '@verdocs/js-sdk';
|
2
2
|
import { Templates } from '@verdocs/js-sdk/Templates';
|
3
|
+
import { canPerformTemplateAction } from '@verdocs/js-sdk/Templates/Actions';
|
3
4
|
import { userCanCreateTemplate } from '@verdocs/js-sdk/Templates/Permissions';
|
4
5
|
import { Host, h } from '@stencil/core';
|
5
|
-
// import {getRecipientsWithActions, userCanAct, userCanCancelEnvelope} from '@verdocs/js-sdk/Envelopes/Permissions';
|
6
|
-
// import {saveEnvelopesAsZip} from '../../../utils/utils';
|
7
6
|
import { VerdocsToast } from '../../../utils/Toast';
|
8
7
|
import { SDKError } from '../../../utils/errors';
|
9
|
-
import {
|
10
|
-
const TemplateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
// ];
|
8
|
+
import { formatDistance } from 'date-fns';
|
9
|
+
const TemplateIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"<path stroke-linecap="round" stroke-linejoin="round" d="M19.5 14.25v-2.625a3.375 3.375 0 00-3.375-3.375h-1.5A1.125 1.125 0 0113.5 7.125v-1.5a3.375 3.375 0 00-3.375-3.375H8.25m0 12.75h7.5m-7.5 3H12M10.5 2.25H5.625c-.621 0-1.125.504-1.125 1.125v17.25c0 .621.504 1.125 1.125 1.125h12.75c.621 0 1.125-.504 1.125-1.125V11.25a9 9 0 00-9-9z" /></svg>`;
|
10
|
+
const GlobeAltIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M12 21a9.004 9.004 0 008.716-6.747M12 21a9.004 9.004 0 01-8.716-6.747M12 21c2.485 0 4.5-4.03 4.5-9S14.485 3 12 3m0 18c-2.485 0-4.5-4.03-4.5-9S9.515 3 12 3m0 0a8.997 8.997 0 017.843 4.582M12 3a8.997 8.997 0 00-7.843 4.582m15.686 0A11.953 11.953 0 0112 10.5c-2.998 0-5.74-1.1-7.843-2.918m15.686 0A8.959 8.959 0 0121 12c0 .778-.099 1.533-.284 2.253m0 0A17.919 17.919 0 0112 16.5c-3.162 0-6.133-.815-8.716-2.247m0 0A9.015 9.015 0 013 12c0-1.605.42-3.113 1.157-4.418" /></svg>`;
|
11
|
+
const LockClosedIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M16.5 10.5V6.75a4.5 4.5 0 10-9 0v3.75m-.75 11.25h10.5a2.25 2.25 0 002.25-2.25v-6.75a2.25 2.25 0 00-2.25-2.25H6.75a2.25 2.25 0 00-2.25 2.25v6.75a2.25 2.25 0 002.25 2.25z" /></svg>`;
|
12
|
+
const BuildingOfficeIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M3.75 21h16.5M4.5 3h15M5.25 3v18m13.5-18v18M9 6.75h1.5m-1.5 3h1.5m-1.5 3h1.5m3-6H15m-1.5 3H15m-1.5 3H15M9 21v-3.375c0-.621.504-1.125 1.125-1.125h3.75c.621 0 1.125.504 1.125 1.125V21" /></svg>`;
|
13
|
+
const CalendarIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M6.75 3v2.25M17.25 3v2.25M3 18.75V7.5a2.25 2.25 0 012.25-2.25h13.5A2.25 2.25 0 0121 7.5v11.25m-18 0A2.25 2.25 0 005.25 21h13.5A2.25 2.25 0 0021 18.75m-18 0v-7.5A2.25 2.25 0 015.25 9h13.5A2.25 2.25 0 0121 11.25v7.5" /></svg>`;
|
14
|
+
const EnvelopeIcon = `<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor"><path stroke-linecap="round" stroke-linejoin="round" d="M21.75 6.75v10.5a2.25 2.25 0 01-2.25 2.25h-15a2.25 2.25 0 01-2.25-2.25V6.75m19.5 0A2.25 2.25 0 0019.5 4.5h-15a2.25 2.25 0 00-2.25 2.25m19.5 0v.243a2.25 2.25 0 01-1.07 1.916l-7.5 4.615a2.25 2.25 0 01-2.36 0L3.32 8.91a2.25 2.25 0 01-1.07-1.916V6.75" /></svg>`;
|
15
|
+
const SharingFilters = [
|
16
|
+
{ value: 'all', label: 'All' },
|
17
|
+
{ value: 'personal', label: 'Personal' },
|
18
|
+
{ value: 'shared', label: 'Shared' },
|
19
|
+
{ value: 'public', label: 'Public' },
|
20
|
+
];
|
21
|
+
const StarredFilters = [
|
22
|
+
{ value: 'all', label: 'All' },
|
23
|
+
{ value: 'starred', label: 'Starred' },
|
24
|
+
{ value: 'unstarred', label: 'Not Starred' },
|
25
|
+
];
|
26
|
+
const SortOptions = [
|
27
|
+
{ value: 'name', label: 'Name' },
|
28
|
+
{ value: 'created_at', label: 'Created' },
|
29
|
+
{ value: 'updated_at', label: 'Last Updated' },
|
30
|
+
{ value: 'last_used_at', label: 'Last Used' },
|
31
|
+
{ value: 'counter', label: 'Most Used' },
|
32
|
+
{ value: 'star_counter', label: 'Most Starred' },
|
33
|
+
];
|
36
34
|
/**
|
37
35
|
* Displays a list of envelopes matching specified conditions.
|
38
36
|
*/
|
39
37
|
export class VerdocsTemplatesList {
|
40
38
|
constructor() {
|
41
|
-
this.handleOptionSelected = (
|
42
|
-
|
43
|
-
if (
|
44
|
-
|
45
|
-
// navigate(URLS.TEMPLATE_DETAIL.build(summary.id, 'preview'));
|
46
|
-
// navigate('/' + URLS.SEND(summary.id));
|
39
|
+
this.handleOptionSelected = (option, template) => {
|
40
|
+
var _a, _b;
|
41
|
+
if (option === 'createdoc') {
|
42
|
+
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: template });
|
47
43
|
}
|
48
|
-
else if (
|
49
|
-
|
50
|
-
VerdocsToast('Link creation is coming soon!');
|
44
|
+
else if (option === 'createlink') {
|
45
|
+
VerdocsToast('This feature is coming soon!');
|
51
46
|
}
|
52
|
-
else if (
|
53
|
-
|
54
|
-
// TODO: Need to complete this
|
55
|
-
// navigate(URLS.TEMPLATE_DETAIL.build(summary.id, 'edit'));
|
56
|
-
// if (this.canSendEnvelope && this.canSignNow) {
|
57
|
-
// const roles = JSON.parse(JSON.stringify(this.template.roles));
|
58
|
-
// if (this.numberOfUnknownRoles === 1) {
|
59
|
-
// const emptyRoleIndex = findIndex(roles, (role) => !role['email']);
|
60
|
-
// if (emptyRoleIndex > -1) {
|
61
|
-
// roles[emptyRoleIndex].email = this.currentProfile.email;
|
62
|
-
// roles[emptyRoleIndex].full_name = this.currentProfile.first_name + ' ' + this.currentProfile.last_name;
|
63
|
-
// }
|
64
|
-
// }
|
65
|
-
// const body = {
|
66
|
-
// template_id: this.template.id,
|
67
|
-
// roles: roles,
|
68
|
-
// };
|
69
|
-
// this.envelopeService.sendInvite(body).subscribe(
|
70
|
-
// (envelope) => {
|
71
|
-
// this.goToEnvelopeView(envelope);
|
72
|
-
// },
|
73
|
-
// (err) => {
|
74
|
-
// console.error({
|
75
|
-
// message: 'Failed to create Envelope',
|
76
|
-
// detail: err,
|
77
|
-
// });
|
78
|
-
// if (err && err.error && err.error.code && err.error.code === 'E000020') {
|
79
|
-
// const userId = this.vTokenObject.getProfileID();
|
80
|
-
// this._redirectUrl = `${environment.rAccount_frontend_url}/rAccount/user/${userId}/billing`;
|
81
|
-
// const plansDialog = this.dialog.open(PlansDialog, {
|
82
|
-
// panelClass: 'confirmation',
|
83
|
-
// });
|
84
|
-
// plansDialog.componentInstance.type = 'free';
|
85
|
-
// plansDialog.componentInstance.redirectUrl = this._redirectUrl;
|
86
|
-
// }
|
87
|
-
// },
|
88
|
-
// );
|
89
|
-
// }
|
47
|
+
else if (option === 'signnow') {
|
48
|
+
VerdocsToast('This feature is coming soon!');
|
90
49
|
}
|
91
|
-
else if (
|
92
|
-
|
93
|
-
// navigate(URLS.SUBMITTED_DATA.build(summary.id));
|
50
|
+
else if (option === 'submitted') {
|
51
|
+
VerdocsToast('This feature is coming soon!');
|
94
52
|
}
|
95
|
-
else if (
|
96
|
-
|
97
|
-
// setPreviewTemplateLink(summary);
|
53
|
+
else if (option === 'link') {
|
54
|
+
VerdocsToast('This feature is coming soon!');
|
98
55
|
}
|
99
|
-
else if (
|
100
|
-
|
101
|
-
// navigate(URLS.TEMPLATE_DETAIL.build(summary.id, 'edit'));
|
56
|
+
else if (option === 'edit') {
|
57
|
+
(_b = this.editTemplate) === null || _b === void 0 ? void 0 : _b.emit({ endpoint: this.endpoint, template: template });
|
102
58
|
}
|
103
|
-
else if (
|
104
|
-
|
105
|
-
// setConfirmDeleteTemplateId(summary.id);
|
59
|
+
else if (option === 'delete') {
|
60
|
+
this.confirmDelete = template;
|
106
61
|
}
|
107
62
|
};
|
108
63
|
this.endpoint = VerdocsEndpoint.getDefault();
|
109
|
-
this.items = 5;
|
110
|
-
this.view = undefined;
|
111
|
-
this.page = 0;
|
112
|
-
this.count = 0;
|
113
|
-
this.loading = true;
|
114
|
-
this.name = '';
|
115
|
-
this.containing = '';
|
116
64
|
this.sharing = 'all';
|
117
65
|
this.starred = 'all';
|
118
66
|
this.sort = 'updated_at';
|
119
|
-
this.
|
67
|
+
this.name = '';
|
68
|
+
this.selectedPage = 0;
|
69
|
+
this.count = 0;
|
70
|
+
this.loading = true;
|
71
|
+
this.confirmDelete = null;
|
120
72
|
this.templates = [];
|
121
73
|
}
|
122
74
|
async componentWillLoad() {
|
75
|
+
this.endpoint.loadSession();
|
76
|
+
if (!this.endpoint.session) {
|
77
|
+
console.log('[TEMPLATES] Must be authenticated');
|
78
|
+
return;
|
79
|
+
}
|
80
|
+
return this.queryTemplates();
|
81
|
+
}
|
82
|
+
async queryTemplates() {
|
123
83
|
var _a, _b, _c;
|
124
84
|
try {
|
125
85
|
this.endpoint.loadSession();
|
126
86
|
if (!this.endpoint.session) {
|
127
|
-
console.log('[
|
87
|
+
console.log('[TEMPLATES] Must be authenticated');
|
128
88
|
return;
|
129
89
|
}
|
130
90
|
let queryParams = {
|
131
|
-
page: this.
|
91
|
+
page: this.selectedPage,
|
132
92
|
ascending: this.sort === 'name' || this.sort === 'star_counter',
|
133
93
|
sort_by: this.sort,
|
134
94
|
};
|
@@ -137,20 +97,20 @@ export class VerdocsTemplatesList {
|
|
137
97
|
queryParams.is_public = this.sharing === 'public';
|
138
98
|
}
|
139
99
|
if (this.starred !== 'all') {
|
140
|
-
|
141
|
-
queryParams['is_starred'] = this.starred === 'starred';
|
100
|
+
queryParams.is_starred = this.starred === 'starred';
|
142
101
|
}
|
143
102
|
if (this.name.trim() !== '') {
|
144
103
|
queryParams.name = this.name.trim();
|
145
104
|
}
|
105
|
+
console.log('qp', queryParams, this.name);
|
146
106
|
const response = await Templates.getSummary(this.endpoint, queryParams);
|
147
|
-
console.log('[TEMPLATES] Got
|
107
|
+
console.log('[TEMPLATES] Got templates', response);
|
148
108
|
this.templates = response.result;
|
149
109
|
this.count = response.total;
|
150
110
|
this.loading = false;
|
151
111
|
}
|
152
112
|
catch (e) {
|
153
|
-
console.log('[
|
113
|
+
console.log('[TEMPLATES] Error with preview session', e);
|
154
114
|
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
155
115
|
}
|
156
116
|
}
|
@@ -174,15 +134,35 @@ export class VerdocsTemplatesList {
|
|
174
134
|
// return hasPermission && canPreview;
|
175
135
|
return hasPermission;
|
176
136
|
}
|
137
|
+
deleteTemplate(template) {
|
138
|
+
this.confirmDelete = null;
|
139
|
+
Templates.deleteTemplate(this.endpoint, template.id)
|
140
|
+
.then(() => {
|
141
|
+
var _a;
|
142
|
+
console.log('[TEMPLATES] Deleted template', template);
|
143
|
+
(_a = this.templateDeleted) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: template });
|
144
|
+
return this.queryTemplates();
|
145
|
+
})
|
146
|
+
.catch(e => {
|
147
|
+
var _a, _b, _c;
|
148
|
+
console.log('[TEMPLATES] Error deleting template', template);
|
149
|
+
(_a = this.sdkError) === null || _a === void 0 ? void 0 : _a.emit(new SDKError(e.message, (_b = e.response) === null || _b === void 0 ? void 0 : _b.status, (_c = e.response) === null || _c === void 0 ? void 0 : _c.data));
|
150
|
+
});
|
151
|
+
}
|
177
152
|
render() {
|
178
|
-
|
179
|
-
return (h(Host, { style: { minHeight: '300px' } }, h("verdocs-loader", null)));
|
180
|
-
}
|
181
|
-
return (h(Host, null, h("div", { class: "header" }, h("div", { class: "filter" }, h("verdocs-text-input", { id: "verdocs-filter-name", value: this.name, autocomplete: "off", placeholder: "Filter by Name...", onInput: (e) => {
|
153
|
+
return (h(Host, null, h("div", { class: "header" }, h("div", { class: "filter" }, h("verdocs-text-input", { id: "verdocs-filter-name", value: this.name, autocomplete: "off", placeholder: "Filter by Name...", onFocusout: (e) => {
|
182
154
|
this.name = e.target.value;
|
183
|
-
|
184
|
-
|
185
|
-
|
155
|
+
return this.queryTemplates();
|
156
|
+
} })), h("verdocs-quick-filter", { label: "Sharing", value: this.sharing, options: SharingFilters, onOptionSelected: e => {
|
157
|
+
this.sharing = e.detail.value;
|
158
|
+
return this.queryTemplates();
|
159
|
+
} }), h("verdocs-quick-filter", { label: "Starred", value: this.starred, options: StarredFilters, onOptionSelected: e => {
|
160
|
+
this.starred = e.detail.value;
|
161
|
+
return this.queryTemplates();
|
162
|
+
} }), h("verdocs-quick-filter", { label: "Sort By", value: this.sort, options: SortOptions, onOptionSelected: e => {
|
163
|
+
this.sort = e.detail.value;
|
164
|
+
return this.queryTemplates();
|
165
|
+
} }), this.loading && h("verdocs-spinner", { mode: "dark", size: 24 }), h("div", { style: { display: 'flex', flex: '1' } })), this.templates.map(summary => {
|
186
166
|
const MENU_OPTIONS = [
|
187
167
|
// [disabled]="!canSendEnvelope"
|
188
168
|
{ label: 'Preview / Send', id: 'createdoc', disabled: !this.canPreview(summary) },
|
@@ -198,80 +178,14 @@ export class VerdocsTemplatesList {
|
|
198
178
|
{ label: 'Edit', id: 'edit', disabled: !this.canEdit(summary) },
|
199
179
|
{ label: 'Delete', id: 'delete', disabled: !this.canDelete(summary) },
|
200
180
|
];
|
201
|
-
return (h("div", { class: "template", onClick: () => {
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
// if (e.target.checked) {
|
210
|
-
// this.selectedEnvelopes = [...this.selectedEnvelopes, envelope];
|
211
|
-
// } else {
|
212
|
-
// this.selectedEnvelopes = this.selectedEnvelopes.filter(e => e.id !== envelope.id);
|
213
|
-
// }
|
214
|
-
// }}
|
215
|
-
// />
|
216
|
-
//
|
217
|
-
// <div class="vert-spacer" />
|
218
|
-
//
|
219
|
-
// <span innerHTML={DocumentIcon} />
|
220
|
-
//
|
221
|
-
// <div class="envelope-name">
|
222
|
-
// {envelope.name}: <div class="envelope-recipients">{envelope.recipients.map(r => r.full_name).join(', ')}</div>
|
223
|
-
// </div>
|
224
|
-
//
|
225
|
-
// <div class="vert-spacer" />
|
226
|
-
//
|
227
|
-
// <verdocs-status-indicator envelope={envelope} style={{width: '125px'}} />
|
228
|
-
//
|
229
|
-
// <div class="vert-spacer" />
|
230
|
-
//
|
231
|
-
// <div class="last-modified">{new Date(envelope.updated_at).toLocaleString()}</div>
|
232
|
-
//
|
233
|
-
// <div class="vert-spacer" />
|
234
|
-
//
|
235
|
-
// <verdocs-dropdown
|
236
|
-
// options={[
|
237
|
-
// {label: 'View Envelope', id: 'view'},
|
238
|
-
// {label: 'Finish Envelope', id: 'finish', disabled: !userCanFinish},
|
239
|
-
// {label: 'Download', id: 'download'},
|
240
|
-
// {label: 'Cancel', id: 'cancel', disabled: !userCanCancel},
|
241
|
-
// ]}
|
242
|
-
// onOptionSelected={e => {
|
243
|
-
// switch (e.detail.id) {
|
244
|
-
// case 'view':
|
245
|
-
// this.viewEnvelope?.emit({endpoint: this.endpoint, envelope});
|
246
|
-
// break;
|
247
|
-
// case 'finish':
|
248
|
-
// this.finishLater?.emit({endpoint: this.endpoint, envelope});
|
249
|
-
// break;
|
250
|
-
// case 'download':
|
251
|
-
// this.downloadEnvelope(envelope);
|
252
|
-
// break;
|
253
|
-
// case 'cancel':
|
254
|
-
// if (window.confirm('Are you sure you want to cancel this envelope?')) {
|
255
|
-
// cancelEnvelope(this.endpoint, envelope.id)
|
256
|
-
// .then(r => {
|
257
|
-
// console.log('Cancel result', r);
|
258
|
-
// VerdocsToast('Envelope canceled');
|
259
|
-
// })
|
260
|
-
// .catch(e => {
|
261
|
-
// console.log('cxl error', e);
|
262
|
-
// VerdocsToast('Unable to cancel envelope: ' + e.messabge, {style: 'error'});
|
263
|
-
// });
|
264
|
-
// }
|
265
|
-
// break;
|
266
|
-
// }
|
267
|
-
// }}
|
268
|
-
// />
|
269
|
-
// </div>
|
270
|
-
// </div>
|
271
|
-
);
|
272
|
-
}), !this.templates.length ? (h("div", { class: "mt-4 border-2 px-20 py-20 text-center" }, "No matching templates found. Please adjust your filters and try again.")) : (h("div", null)
|
273
|
-
// <Pagination page={this.page} total={this.count} onSelectPage={setPage} />
|
274
|
-
)));
|
181
|
+
return (h("div", { class: "template", onClick: () => {
|
182
|
+
var _a;
|
183
|
+
(_a = this.viewTemplate) === null || _a === void 0 ? void 0 : _a.emit({ endpoint: this.endpoint, template: summary });
|
184
|
+
} }, h("div", { class: "inner" }, h("verdocs-template-star", { template: summary, endpoint: this.endpoint }), h("div", { class: "spacer icon-spacer" }), h("span", { innerHTML: TemplateIcon }), h("div", { class: "name" }, summary.name), h("div", { class: "spacer usage-spacer" }), h("div", { class: "usage" }, h("span", { innerHTML: EnvelopeIcon }), summary.counter || '--'), h("div", { class: "spacer last-used-spacer" }), h("div", { class: "last-used" }, h("span", { innerHTML: CalendarIcon }), h("span", { style: { marginRight: '5px' } }, "Last Used:"), summary.last_used_at ? formatDistance(new Date(summary.last_used_at), new Date()) : 'Never'), h("div", { class: "spacer ownership-spacer" }), summary.is_public && (h("div", { class: "ownership" }, h("span", { innerHTML: GlobeAltIcon }), " Public")), !summary.is_public && !summary.is_personal && (h("div", { class: "ownership" }, h("span", { innerHTML: LockClosedIcon }), " Private")), !summary.is_public && summary.is_personal && (h("div", { class: "ownership" }, h("span", { innerHTML: BuildingOfficeIcon }), " Shared")), h("verdocs-dropdown", { options: MENU_OPTIONS, onOptionSelected: e => this.handleOptionSelected(e.detail.id, summary) }))));
|
185
|
+
}), !this.templates.length ? (h("div", { class: "empty-text" }, "No matching templates found. Please adjust your filters and try again.")) : (h("div", { style: { marginTop: '10px' } }, h("verdocs-pagination", { selectedPage: this.selectedPage, perPage: 10, itemCount: this.count, onSelectPage: e => {
|
186
|
+
this.selectedPage = e.detail.selectedPage;
|
187
|
+
return this.queryTemplates();
|
188
|
+
} }))), this.confirmDelete && (h("verdocs-ok-dialog", { heading: "Delete this Template?", message: "This operation cannot be undone.", onNext: () => this.deleteTemplate(this.confirmDelete), onExit: () => (this.confirmDelete = null), showCancel: true }))));
|
275
189
|
}
|
276
190
|
static get is() { return "verdocs-templates-list"; }
|
277
191
|
static get originalStyleUrls() {
|
@@ -307,45 +221,86 @@ export class VerdocsTemplatesList {
|
|
307
221
|
},
|
308
222
|
"defaultValue": "VerdocsEndpoint.getDefault()"
|
309
223
|
},
|
310
|
-
"
|
311
|
-
"type": "
|
312
|
-
"mutable":
|
224
|
+
"sharing": {
|
225
|
+
"type": "string",
|
226
|
+
"mutable": true,
|
313
227
|
"complexType": {
|
314
|
-
"original": "
|
315
|
-
"resolved": "
|
228
|
+
"original": "'all' | 'personal' | 'shared' | 'public'",
|
229
|
+
"resolved": "\"all\" | \"personal\" | \"public\" | \"shared\"",
|
230
|
+
"references": {}
|
231
|
+
},
|
232
|
+
"required": false,
|
233
|
+
"optional": true,
|
234
|
+
"docs": {
|
235
|
+
"tags": [],
|
236
|
+
"text": "The sharing settings to filter by."
|
237
|
+
},
|
238
|
+
"attribute": "sharing",
|
239
|
+
"reflect": true,
|
240
|
+
"defaultValue": "'all'"
|
241
|
+
},
|
242
|
+
"starred": {
|
243
|
+
"type": "string",
|
244
|
+
"mutable": true,
|
245
|
+
"complexType": {
|
246
|
+
"original": "'all' | 'starred' | 'unstarred'",
|
247
|
+
"resolved": "\"all\" | \"starred\" | \"unstarred\"",
|
316
248
|
"references": {}
|
317
249
|
},
|
318
250
|
"required": false,
|
319
251
|
"optional": false,
|
320
252
|
"docs": {
|
321
253
|
"tags": [],
|
322
|
-
"text": "The
|
254
|
+
"text": "The starred settings to filter by."
|
323
255
|
},
|
324
|
-
"attribute": "
|
325
|
-
"reflect":
|
326
|
-
"defaultValue": "
|
256
|
+
"attribute": "starred",
|
257
|
+
"reflect": true,
|
258
|
+
"defaultValue": "'all'"
|
327
259
|
},
|
328
|
-
"
|
260
|
+
"sort": {
|
329
261
|
"type": "string",
|
330
|
-
"mutable":
|
262
|
+
"mutable": true,
|
331
263
|
"complexType": {
|
332
|
-
"original": "
|
333
|
-
"resolved": "\"
|
264
|
+
"original": "IGetTemplateSummarySortBy",
|
265
|
+
"resolved": "\"counter\" | \"created_at\" | \"last_used_at\" | \"name\" | \"star_counter\" | \"updated_at\"",
|
266
|
+
"references": {
|
267
|
+
"IGetTemplateSummarySortBy": {
|
268
|
+
"location": "import",
|
269
|
+
"path": "@verdocs/js-sdk/Templates/Templates"
|
270
|
+
}
|
271
|
+
}
|
272
|
+
},
|
273
|
+
"required": false,
|
274
|
+
"optional": false,
|
275
|
+
"docs": {
|
276
|
+
"tags": [],
|
277
|
+
"text": "The sort order to display."
|
278
|
+
},
|
279
|
+
"attribute": "sort",
|
280
|
+
"reflect": true,
|
281
|
+
"defaultValue": "'updated_at'"
|
282
|
+
},
|
283
|
+
"name": {
|
284
|
+
"type": "string",
|
285
|
+
"mutable": true,
|
286
|
+
"complexType": {
|
287
|
+
"original": "string",
|
288
|
+
"resolved": "string",
|
334
289
|
"references": {}
|
335
290
|
},
|
336
291
|
"required": false,
|
337
|
-
"optional":
|
292
|
+
"optional": false,
|
338
293
|
"docs": {
|
339
294
|
"tags": [],
|
340
|
-
"text": "
|
295
|
+
"text": "If set, filter templates by the specified name."
|
341
296
|
},
|
342
|
-
"attribute": "
|
297
|
+
"attribute": "name",
|
343
298
|
"reflect": true,
|
344
|
-
"defaultValue": "
|
299
|
+
"defaultValue": "''"
|
345
300
|
},
|
346
|
-
"
|
301
|
+
"selectedPage": {
|
347
302
|
"type": "number",
|
348
|
-
"mutable":
|
303
|
+
"mutable": true,
|
349
304
|
"complexType": {
|
350
305
|
"original": "number",
|
351
306
|
"resolved": "number",
|
@@ -355,9 +310,9 @@ export class VerdocsTemplatesList {
|
|
355
310
|
"optional": false,
|
356
311
|
"docs": {
|
357
312
|
"tags": [],
|
358
|
-
"text": "The
|
313
|
+
"text": "The initial page number to select. Pagination is internally controlled but may be overriden by the\nhost applicaiton."
|
359
314
|
},
|
360
|
-
"attribute": "page",
|
315
|
+
"attribute": "selected-page",
|
361
316
|
"reflect": true,
|
362
317
|
"defaultValue": "0"
|
363
318
|
}
|
@@ -367,12 +322,7 @@ export class VerdocsTemplatesList {
|
|
367
322
|
return {
|
368
323
|
"count": {},
|
369
324
|
"loading": {},
|
370
|
-
"
|
371
|
-
"containing": {},
|
372
|
-
"sharing": {},
|
373
|
-
"starred": {},
|
374
|
-
"sort": {},
|
375
|
-
"selectedTemplates": {},
|
325
|
+
"confirmDelete": {},
|
376
326
|
"templates": {}
|
377
327
|
};
|
378
328
|
}
|
@@ -398,14 +348,14 @@ export class VerdocsTemplatesList {
|
|
398
348
|
}
|
399
349
|
}
|
400
350
|
}, {
|
401
|
-
"method": "
|
402
|
-
"name": "
|
351
|
+
"method": "viewTemplate",
|
352
|
+
"name": "viewTemplate",
|
403
353
|
"bubbles": true,
|
404
354
|
"cancelable": true,
|
405
355
|
"composed": true,
|
406
356
|
"docs": {
|
407
357
|
"tags": [],
|
408
|
-
"text": "Event fired when the user clicks
|
358
|
+
"text": "Event fired when the user clicks a template to view it. Typically the host application will use this to navigate\nto the template preview. This is also fired when the user selects \"Preview/Send\" fropm the dropdown menu."
|
409
359
|
},
|
410
360
|
"complexType": {
|
411
361
|
"original": "{endpoint: VerdocsEndpoint; template: ITemplate}",
|
@@ -422,14 +372,14 @@ export class VerdocsTemplatesList {
|
|
422
372
|
}
|
423
373
|
}
|
424
374
|
}, {
|
425
|
-
"method": "
|
426
|
-
"name": "
|
375
|
+
"method": "editTemplate",
|
376
|
+
"name": "editTemplate",
|
427
377
|
"bubbles": true,
|
428
378
|
"cancelable": true,
|
429
379
|
"composed": true,
|
430
380
|
"docs": {
|
431
381
|
"tags": [],
|
432
|
-
"text": "Event fired when the user
|
382
|
+
"text": "Event fired when the user chooses the Edit option from the dropdown menu."
|
433
383
|
},
|
434
384
|
"complexType": {
|
435
385
|
"original": "{endpoint: VerdocsEndpoint; template: ITemplate}",
|
@@ -446,22 +396,26 @@ export class VerdocsTemplatesList {
|
|
446
396
|
}
|
447
397
|
}
|
448
398
|
}, {
|
449
|
-
"method": "
|
450
|
-
"name": "
|
399
|
+
"method": "templateDeleted",
|
400
|
+
"name": "templateDeleted",
|
451
401
|
"bubbles": true,
|
452
402
|
"cancelable": true,
|
453
403
|
"composed": true,
|
454
404
|
"docs": {
|
455
405
|
"tags": [],
|
456
|
-
"text": "Event fired when the user
|
406
|
+
"text": "Event fired when the user chooses the Delete option from the dropdown menu. When this is fired, the template\nwill already have been deleted. The host application should remove it from the list or refresh the list."
|
457
407
|
},
|
458
408
|
"complexType": {
|
459
|
-
"original": "{endpoint: VerdocsEndpoint;
|
460
|
-
"resolved": "{ endpoint: VerdocsEndpoint;
|
409
|
+
"original": "{endpoint: VerdocsEndpoint; template: ITemplate}",
|
410
|
+
"resolved": "{ endpoint: VerdocsEndpoint; template: ITemplate; }",
|
461
411
|
"references": {
|
462
412
|
"VerdocsEndpoint": {
|
463
413
|
"location": "import",
|
464
414
|
"path": "@verdocs/js-sdk"
|
415
|
+
},
|
416
|
+
"ITemplate": {
|
417
|
+
"location": "import",
|
418
|
+
"path": "@verdocs/js-sdk/Templates/Types"
|
465
419
|
}
|
466
420
|
}
|
467
421
|
}
|
@@ -3,14 +3,16 @@ export default {
|
|
3
3
|
title: 'Templates/Templates List',
|
4
4
|
component: 'verdocs-templates-list',
|
5
5
|
args: {
|
6
|
-
|
6
|
+
items: 10,
|
7
|
+
sharing: 'all',
|
8
|
+
starred: 'all',
|
9
|
+
sortBy: 'updated_at',
|
7
10
|
},
|
8
11
|
argTypes: {
|
9
12
|
onClose: { action: 'close' },
|
10
13
|
},
|
14
|
+
parameters: {
|
15
|
+
layout: 'fullscreen',
|
16
|
+
},
|
11
17
|
};
|
12
|
-
export const TemplatesList = ({ onClose, templateId }) => html `
|
13
|
-
<div style="width: 360px; background: #ffffff; padding: 20px; box-sizing: border-box">
|
14
|
-
<verdocs-templates-list .templateId=${templateId} @close=${onClose} />
|
15
|
-
</div>
|
16
|
-
`;
|
18
|
+
export const TemplatesList = ({ onClose, templateId }) => html ` <verdocs-templates-list .templateId=${templateId} @close=${onClose} /> `;
|
@@ -131,6 +131,20 @@ var updateTemplate = function (endpoint, templateId, params) {
|
|
131
131
|
.put("/templates/".concat(templateId), params)
|
132
132
|
.then(function (r) { return r.data; });
|
133
133
|
};
|
134
|
+
/**
|
135
|
+
* Delete a template.
|
136
|
+
*
|
137
|
+
* ```typescript
|
138
|
+
* import {Templates} from '@verdocs/js-sdk/Templates';
|
139
|
+
*
|
140
|
+
* await Templates.deleteTemplate((VerdocsEndpoint.getDefault(), '83da3d70-7857-4392-b876-c4592a304bc9');
|
141
|
+
* ```
|
142
|
+
*/
|
143
|
+
var deleteTemplate = function (endpoint, templateId) {
|
144
|
+
return endpoint.api //
|
145
|
+
.delete("/templates/".concat(templateId))
|
146
|
+
.then(function (r) { return r.data; });
|
147
|
+
};
|
134
148
|
/**
|
135
149
|
* Get a summary of template data, typically used to populate admin panel dashboard pages.
|
136
150
|
*
|
@@ -151,4 +165,4 @@ var getSummary = function (endpoint, params) {
|
|
151
165
|
});
|
152
166
|
};
|
153
167
|
|
154
|
-
export { getTemplates as a, getTemplate as b, createTemplate as c, getSummary as g, updateTemplate as u };
|
168
|
+
export { getTemplates as a, getTemplate as b, createTemplate as c, deleteTemplate as d, getSummary as g, updateTemplate as u };
|
@@ -59,6 +59,7 @@ export { VerdocsTemplateReminders as VerdocsTemplateReminders } from '../types/c
|
|
59
59
|
export { VerdocsTemplateRoleProperties as VerdocsTemplateRoleProperties } from '../types/components/templates/verdocs-template-role-properties/verdocs-template-role-properties';
|
60
60
|
export { VerdocsTemplateRoles as VerdocsTemplateRoles } from '../types/components/templates/verdocs-template-roles/verdocs-template-roles';
|
61
61
|
export { VerdocsTemplateSender as VerdocsTemplateSender } from '../types/components/templates/verdocs-template-sender/verdocs-template-sender';
|
62
|
+
export { VerdocsTemplateStar as VerdocsTemplateStar } from '../types/components/templates/verdocs-template-star/verdocs-template-star';
|
62
63
|
export { VerdocsTemplateTags as VerdocsTemplateTags } from '../types/components/templates/verdocs-template-tags/verdocs-template-tags';
|
63
64
|
export { VerdocsTemplateVisibility as VerdocsTemplateVisibility } from '../types/components/templates/verdocs-template-visibillity/verdocs-template-visibility';
|
64
65
|
export { VerdocsTemplatesList as VerdocsTemplatesList } from '../types/components/templates/verdocs-templates-list/verdocs-templates-list';
|
package/dist/components/index.js
CHANGED
@@ -59,6 +59,7 @@ export { VerdocsTemplateReminders, defineCustomElement as defineCustomElementVer
|
|
59
59
|
export { VerdocsTemplateRoleProperties, defineCustomElement as defineCustomElementVerdocsTemplateRoleProperties } from './verdocs-template-role-properties.js';
|
60
60
|
export { VerdocsTemplateRoles, defineCustomElement as defineCustomElementVerdocsTemplateRoles } from './verdocs-template-roles.js';
|
61
61
|
export { VerdocsTemplateSender, defineCustomElement as defineCustomElementVerdocsTemplateSender } from './verdocs-template-sender.js';
|
62
|
+
export { VerdocsTemplateStar, defineCustomElement as defineCustomElementVerdocsTemplateStar } from './verdocs-template-star.js';
|
62
63
|
export { VerdocsTemplateTags, defineCustomElement as defineCustomElementVerdocsTemplateTags } from './verdocs-template-tags.js';
|
63
64
|
export { VerdocsTemplateVisibility, defineCustomElement as defineCustomElementVerdocsTemplateVisibility } from './verdocs-template-visibility.js';
|
64
65
|
export { VerdocsTemplatesList, defineCustomElement as defineCustomElementVerdocsTemplatesList } from './verdocs-templates-list.js';
|
@@ -2185,4 +2185,4 @@ function cleanEscapedString(input) {
|
|
2185
2185
|
return matched[1].replace(doubleQuoteRegExp, "'");
|
2186
2186
|
}
|
2187
2187
|
|
2188
|
-
export { format as f };
|
2188
|
+
export { getDefaultOptions as a, format as f, getTimezoneOffsetInMilliseconds as g, locale as l, requiredArgs as r, toDate as t };
|