@verdocs/web-sdk 1.1.0 → 1.2.0
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/Auth-0ba9a04b.js +68 -0
- package/dist/cjs/{Transport-68c8b1f4.js → Token-1ea6d834.js} +81 -19
- package/dist/cjs/{index-6fc067b7.js → index-01e27102.js} +5 -357
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/verdocs-auth.cjs.entry.js +9 -70
- package/dist/cjs/verdocs-button_2.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-document-status.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-dropdown_12.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-initial-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-loader.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-organization-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-quick-functions.cjs.entry.js +31 -0
- package/dist/cjs/verdocs-search-activity_2.cjs.entry.js +210 -0
- package/dist/cjs/verdocs-search-tabs.cjs.entry.js +20 -0
- package/dist/cjs/verdocs-search.cjs.entry.js +2 -2
- package/dist/cjs/verdocs-sign.cjs.entry.js +11 -12
- package/dist/cjs/verdocs-signature-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-card.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-template-tags.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-toggle.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-upload-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-web-sdk.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +4 -6
- package/dist/collection/components/elements/{search-quick-functions → verdocs-quick-functions}/document-icon.svg +0 -0
- package/dist/collection/components/elements/{search-quick-functions → verdocs-quick-functions}/template-icon.svg +0 -0
- package/dist/collection/components/elements/{search-quick-functions/search-quick-functions.css → verdocs-quick-functions/verdocs-quick-functions.css} +5 -5
- package/dist/collection/components/elements/{search-quick-functions/search-quick-functions.js → verdocs-quick-functions/verdocs-quick-functions.js} +9 -10
- package/dist/collection/components/elements/{search-quick-functions/search-quick-functions.stories.js → verdocs-quick-functions/verdocs-quick-functions.stories.js} +2 -2
- package/dist/collection/components/elements/{search-starred → verdocs-search-activity}/document-icon.svg +0 -0
- package/dist/collection/components/elements/{search-starred/search-starred.css → verdocs-search-activity/verdocs-search-activity.css} +12 -12
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.js +168 -0
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.stories.js +14 -0
- package/dist/collection/components/elements/{search-box → verdocs-search-box}/close.svg +0 -0
- package/dist/collection/components/elements/{search-box → verdocs-search-box}/search.svg +0 -0
- package/dist/collection/components/elements/{search-box/search-box.css → verdocs-search-box/verdocs-search-box.css} +9 -9
- package/dist/collection/components/elements/{search-box/search-box.js → verdocs-search-box/verdocs-search-box.js} +14 -15
- package/dist/collection/components/elements/{search-box/search-box.stories.js → verdocs-search-box/verdocs-search-box.stories.js} +2 -2
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.css +3 -0
- package/dist/collection/components/elements/verdocs-search-tabs/verdocs-search-tabs.js +19 -0
- package/dist/collection/components/elements/{search-tabs/search-tabs.stories.js → verdocs-search-tabs/verdocs-search-tabs.stories.js} +2 -2
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +2 -2
- package/dist/collection/components/embeds/verdocs-search/verdocs-search.js +4 -4
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +1 -1
- package/dist/custom-elements/index.d.ts +24 -36
- package/dist/custom-elements/index.js +271 -331
- package/dist/docs.json +254 -344
- package/dist/esm/Auth-16761ea6.js +64 -0
- package/dist/esm/{Transport-797d3c59.js → Token-b82a8ea3.js} +81 -20
- package/dist/esm/{index-80d1b936.js → index-ade0ef1e.js} +5 -357
- package/dist/esm/loader.js +2 -2
- package/dist/esm/verdocs-auth.entry.js +4 -65
- package/dist/esm/verdocs-button_2.entry.js +1 -1
- package/dist/esm/verdocs-document-status.entry.js +1 -1
- package/dist/esm/verdocs-dropdown_12.entry.js +1 -1
- package/dist/esm/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm/verdocs-loader.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-organization-card.entry.js +1 -1
- package/dist/esm/verdocs-quick-functions.entry.js +27 -0
- package/dist/esm/verdocs-search-activity_2.entry.js +205 -0
- package/dist/esm/verdocs-search-tabs.entry.js +16 -0
- package/dist/esm/verdocs-search.entry.js +2 -2
- package/dist/esm/verdocs-sign.entry.js +3 -4
- package/dist/esm/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm/verdocs-template-card.entry.js +1 -1
- package/dist/esm/verdocs-template-tags.entry.js +1 -1
- package/dist/esm/verdocs-toggle.entry.js +1 -1
- package/dist/esm/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm/verdocs-web-sdk.js +2 -2
- package/dist/esm-es5/Auth-16761ea6.js +1 -0
- package/dist/esm-es5/{Transport-797d3c59.js → Token-b82a8ea3.js} +1 -1
- package/dist/esm-es5/index-ade0ef1e.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-button_2.entry.js +1 -1
- package/dist/esm-es5/verdocs-document-status.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_12.entry.js +1 -1
- package/dist/esm-es5/verdocs-initial-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-loader.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-organization-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -0
- package/dist/esm-es5/verdocs-search-activity_2.entry.js +1 -0
- package/dist/esm-es5/verdocs-search-tabs.entry.js +1 -0
- package/dist/esm-es5/verdocs-search.entry.js +1 -1
- package/dist/esm-es5/verdocs-sign.entry.js +1 -1
- package/dist/esm-es5/verdocs-signature-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-card.entry.js +1 -1
- package/dist/esm-es5/verdocs-template-tags.entry.js +1 -1
- package/dist/esm-es5/verdocs-toggle.entry.js +1 -1
- package/dist/esm-es5/verdocs-upload-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-web-sdk.js +1 -1
- package/dist/types/components/elements/{search-quick-functions/search-quick-functions.d.ts → verdocs-quick-functions/verdocs-quick-functions.d.ts} +1 -1
- package/dist/types/components/elements/{search-quick-functions/search-quick-functions.stories.d.ts → verdocs-quick-functions/verdocs-quick-functions.stories.d.ts} +0 -0
- package/dist/types/components/elements/{search-starred/search-starred.d.ts → verdocs-search-activity/verdocs-search-activity.d.ts} +10 -3
- package/dist/types/components/elements/{search-starred/search-starred.stories.d.ts → verdocs-search-activity/verdocs-search-activity.stories.d.ts} +2 -2
- package/dist/types/components/elements/{search-box/search-box.d.ts → verdocs-search-box/verdocs-search-box.d.ts} +1 -1
- package/dist/types/components/elements/{search-box/search-box.stories.d.ts → verdocs-search-box/verdocs-search-box.stories.d.ts} +0 -0
- package/dist/types/components/elements/{search-tabs/search-tabs.d.ts → verdocs-search-tabs/verdocs-search-tabs.d.ts} +1 -1
- package/dist/types/components/elements/{search-tabs/search-tabs.stories.d.ts → verdocs-search-tabs/verdocs-search-tabs.stories.d.ts} +0 -0
- package/dist/types/components.d.ts +106 -154
- package/dist/verdocs-web-sdk/{p-b07ae79f.entry.js → p-063c4c71.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-94d6f88f.system.entry.js → p-10e7c953.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-5a6041c0.entry.js → p-183c7338.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-d03d748c.entry.js → p-25a138c4.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-2ded0974.entry.js → p-28b3017f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-2ec1d8d8.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-3ced6e3a.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-a415926b.system.entry.js → p-41383ebc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-44b75396.system.js +1 -0
- package/dist/verdocs-web-sdk/p-48b73707.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-4bfe13e6.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-556f577f.system.js +1 -0
- package/dist/verdocs-web-sdk/p-6e95da9d.js +1 -0
- package/dist/verdocs-web-sdk/p-6ef8ca10.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-72ebb6e3.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-cdae8dba.entry.js → p-817302a8.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8a1b9ad0.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-ba8a7e2d.system.entry.js → p-91f87fa8.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-95880bac.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-9e0a07a7.js +1 -0
- package/dist/verdocs-web-sdk/{p-d299cd16.system.entry.js → p-a0fcbe6e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3a102b59.entry.js → p-ae37b970.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-b3c30059.system.js +1 -0
- package/dist/verdocs-web-sdk/{p-b13ee3be.entry.js → p-b567001f.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fae1351f.system.entry.js → p-b8f5af91.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-f4786f62.entry.js → p-bc61d0ce.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-c4add613.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-80c7bc0c.system.entry.js → p-ccad2089.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-993a0a23.system.entry.js → p-cfb1cad1.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-82f4cb67.system.entry.js → p-d3a4e22e.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-d3ae5318.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-dc1f3572.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-bdfa7db9.system.entry.js → p-dcf25d2c.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-89f5fc2b.entry.js → p-df4ae522.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-3b2cd409.system.entry.js → p-e0091c19.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-0956a3bc.system.entry.js → p-e1887a75.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-e9f5d6a6.js +1 -0
- package/dist/verdocs-web-sdk/{p-853e30f2.system.entry.js → p-efffddab.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-6327fd83.entry.js → p-f0d20c75.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-fcfe34db.entry.js → p-f35c796c.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-24236b87.entry.js → p-f5109d69.entry.js} +1 -1
- package/dist/verdocs-web-sdk/{p-7f9a96d5.system.entry.js → p-f6938563.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-fa8ae849.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/dist/verdocs-web-sdk/verdocs-web-sdk.js +1 -1
- package/package.json +10 -13
- package/dist/cjs/Token-65a1dc17.js +0 -71
- package/dist/cjs/search-box_5.cjs.entry.js +0 -283
- package/dist/cjs/search-tabs.cjs.entry.js +0 -20
- package/dist/collection/components/elements/search-recent/search-icon.svg +0 -1
- package/dist/collection/components/elements/search-recent/search-recent.css +0 -65
- package/dist/collection/components/elements/search-recent/search-recent.js +0 -98
- package/dist/collection/components/elements/search-recent/search-recent.stories.js +0 -12
- package/dist/collection/components/elements/search-saved/search-icon.svg +0 -1
- package/dist/collection/components/elements/search-saved/search-saved.css +0 -56
- package/dist/collection/components/elements/search-saved/search-saved.js +0 -98
- package/dist/collection/components/elements/search-saved/search-saved.stories.js +0 -12
- package/dist/collection/components/elements/search-starred/search-starred.js +0 -114
- package/dist/collection/components/elements/search-starred/search-starred.stories.js +0 -35
- package/dist/collection/components/elements/search-tabs/search-tabs.css +0 -3
- package/dist/collection/components/elements/search-tabs/search-tabs.js +0 -20
- package/dist/custom-elements.json +0 -727
- package/dist/esm/Token-a058076d.js +0 -69
- package/dist/esm/search-box_5.entry.js +0 -275
- package/dist/esm/search-tabs.entry.js +0 -16
- package/dist/esm-es5/Token-a058076d.js +0 -1
- package/dist/esm-es5/index-80d1b936.js +0 -1
- package/dist/esm-es5/search-box_5.entry.js +0 -1
- package/dist/esm-es5/search-tabs.entry.js +0 -1
- package/dist/types/components/elements/search-recent/search-recent.d.ts +0 -25
- package/dist/types/components/elements/search-recent/search-recent.stories.d.ts +0 -7
- package/dist/types/components/elements/search-saved/search-saved.d.ts +0 -25
- package/dist/types/components/elements/search-saved/search-saved.stories.d.ts +0 -7
- package/dist/verdocs-web-sdk/p-30d908ea.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-37b07203.system.js +0 -1
- package/dist/verdocs-web-sdk/p-3c70c740.system.js +0 -1
- package/dist/verdocs-web-sdk/p-403cb7cf.js +0 -1
- package/dist/verdocs-web-sdk/p-4a538cbc.js +0 -1
- package/dist/verdocs-web-sdk/p-62ec194f.js +0 -1
- package/dist/verdocs-web-sdk/p-81b15287.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-83dbc583.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-8739595c.system.js +0 -1
- package/dist/verdocs-web-sdk/p-9a896baf.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a4fc6ad9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-a73a1ff8.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-aec93cc9.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-d82dc646.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-eaffa4b1.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fc3d921f.system.js +0 -1
|
@@ -1,85 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
3
|
|
|
4
|
-
const SearchIcon$2 = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/>
|
|
6
|
-
</svg>
|
|
7
|
-
`;
|
|
8
|
-
|
|
9
|
-
const CloseIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
10
|
-
<path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/>
|
|
11
|
-
</svg>
|
|
12
|
-
`;
|
|
13
|
-
|
|
14
|
-
const searchBoxCss = "search-box{font-family:sans-serif;font-family:var(--verdocs-font)}search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:var(--verdocs-container-border-color)}search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}search-box form input:focus{outline:none}search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#50be80;text-transform:uppercase;color:#fff}search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}search-box form svg{width:12px;height:12px;margin-right:6px}search-box ::-webkit-input-placeholder{color:#aeb4bf}search-box ::-moz-placeholder{color:#aeb4bf}search-box :-ms-input-placeholder{color:#aeb4bf}search-box ::-ms-input-placeholder{color:#aeb4bf}search-box ::placeholder{color:#aeb4bf}";
|
|
15
|
-
|
|
16
|
-
let SearchBox$1 = class extends HTMLElement$1 {
|
|
17
|
-
constructor() {
|
|
18
|
-
super();
|
|
19
|
-
this.__registerHost();
|
|
20
|
-
this.searchClicked = createEvent(this, "searchClicked", 7);
|
|
21
|
-
this.typeChanged = createEvent(this, "typeChanged", 7);
|
|
22
|
-
this.queryChanged = createEvent(this, "queryChanged", 7);
|
|
23
|
-
/**
|
|
24
|
-
* The placeholder to display in the input field.
|
|
25
|
-
*/
|
|
26
|
-
this.placeholder = 'search documents, templates, people...';
|
|
27
|
-
/**
|
|
28
|
-
* If set to a value other than 'all', a removeable filter indicator will be displayed.
|
|
29
|
-
*/
|
|
30
|
-
this.type = 'all';
|
|
31
|
-
/**
|
|
32
|
-
* The text search string entered by the user.
|
|
33
|
-
*/
|
|
34
|
-
this.query = '';
|
|
35
|
-
}
|
|
36
|
-
handleSearch(e) {
|
|
37
|
-
this.searchClicked.emit({ type: this.type, query: this.query });
|
|
38
|
-
e.preventDefault();
|
|
39
|
-
return false;
|
|
40
|
-
}
|
|
41
|
-
handleChange(e) {
|
|
42
|
-
this.queryChanged.emit(e.target.value);
|
|
43
|
-
}
|
|
44
|
-
handleClearFilter() {
|
|
45
|
-
this.typeChanged.emit('all');
|
|
46
|
-
}
|
|
47
|
-
handleKeyUp(e) {
|
|
48
|
-
if (e.key === 'Enter') {
|
|
49
|
-
this.searchClicked.emit({ type: this.type, query: this.query });
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
render() {
|
|
53
|
-
return (h(Host, null, h("form", { onSubmit: e => this.handleSearch(e) }, this.type !== undefined && this.type !== 'all' && (h("span", { class: "type" }, this.type, "s ", h("button", { class: "remove", innerHTML: CloseIcon, onClick: () => this.handleClearFilter() }))), h("input", { type: "text", placeholder: this.placeholder, value: this.query, onInput: e => this.handleChange(e), onKeyUp: e => this.handleKeyUp(e) }), h("button", { onClick: e => this.handleSearch(e), class: "search" }, h("span", { innerHTML: SearchIcon$2 }), "Search"))));
|
|
54
|
-
}
|
|
55
|
-
static get style() { return searchBoxCss; }
|
|
56
|
-
};
|
|
57
|
-
|
|
58
|
-
const TemplateIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>`;
|
|
59
|
-
|
|
60
|
-
const DocumentIcon$1 = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
|
|
61
|
-
|
|
62
|
-
const searchQuickFunctionsCss = "search-quick-functions{font-family:sans-serif;font-family:var(--verdocs-font)}search-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:var(--verdocs-background-dark);text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}search-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}search-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#50be50}search-quick-functions button svg{fill:#ffffff}";
|
|
63
|
-
|
|
64
|
-
let SearchQuickFunctions$1 = class extends HTMLElement$1 {
|
|
65
|
-
constructor() {
|
|
66
|
-
super();
|
|
67
|
-
this.__registerHost();
|
|
68
|
-
this.createTemplate = createEvent(this, "createTemplate", 7);
|
|
69
|
-
this.createDocument = createEvent(this, "createDocument", 7);
|
|
70
|
-
}
|
|
71
|
-
handleCreateTemplate() {
|
|
72
|
-
this.createTemplate.emit();
|
|
73
|
-
}
|
|
74
|
-
handleCreateDocument() {
|
|
75
|
-
this.createDocument.emit();
|
|
76
|
-
}
|
|
77
|
-
render() {
|
|
78
|
-
return (h(Host, null, h("div", { class: "container" }, h("p", { class: "title" }, "Quick Create"), h("button", { onClick: () => this.handleCreateTemplate(), innerHTML: TemplateIcon }, "Template"), h("button", { onClick: () => this.handleCreateDocument(), innerHTML: DocumentIcon$1 }, "Document"))));
|
|
79
|
-
}
|
|
80
|
-
static get style() { return searchQuickFunctionsCss; }
|
|
81
|
-
};
|
|
82
|
-
|
|
83
4
|
// This file provides a polyfill for managing globals in both NodeJS and browser environments. This is
|
|
84
5
|
// an anti-pattern we'd hoped to avoid, but we have several projects dependending on one common library
|
|
85
6
|
// (this js-sdk) and we want that library to provide a common endpoint to all callers (so authentication
|
|
@@ -1921,9 +1842,14 @@ axios_1.default = _default;
|
|
|
1921
1842
|
|
|
1922
1843
|
var axios = axios_1;
|
|
1923
1844
|
|
|
1845
|
+
var requestLogger = function (r) {
|
|
1846
|
+
// tslint:disable-next-line
|
|
1847
|
+
console.debug("[JS-SDK] ".concat(r.method.toUpperCase(), " ").concat(r.baseURL).concat(r.url), r.data ? JSON.stringify(r.data) : '');
|
|
1848
|
+
return r;
|
|
1849
|
+
};
|
|
1924
1850
|
/**
|
|
1925
|
-
*
|
|
1926
|
-
*
|
|
1851
|
+
* VerdocsEndpoint is a class wrapper for a specific connection and authorization context for calling the Verdocs APIs.
|
|
1852
|
+
* Endpoints can be used for isolated session tasks.
|
|
1927
1853
|
* For instance, ephemeral signing sessions may be created independently of a caller's status as an authenticated user.
|
|
1928
1854
|
* In that case, an Endpoint can be created and authenticated, used for calls related to signing operations, then
|
|
1929
1855
|
* discarded once signing is complete.
|
|
@@ -1939,31 +1865,19 @@ var axios = axios_1;
|
|
|
1939
1865
|
* .setClientID('1234)
|
|
1940
1866
|
* .setTimeout(5000);
|
|
1941
1867
|
* ```
|
|
1942
|
-
*
|
|
1943
|
-
* @module
|
|
1944
1868
|
*/
|
|
1945
|
-
var requestLogger = function (r) {
|
|
1946
|
-
// tslint:disable-next-line
|
|
1947
|
-
console.debug("[JS-SDK] ".concat(r.method.toUpperCase(), " ").concat(r.baseURL).concat(r.url), r.data ? JSON.stringify(r.data) : '');
|
|
1948
|
-
return r;
|
|
1949
|
-
};
|
|
1950
1869
|
var VerdocsEndpoint = /** @class */ (function () {
|
|
1951
1870
|
/**
|
|
1952
|
-
* Create a new
|
|
1871
|
+
* Create a new VerdocsEndpoint to call Verdocs platform services.
|
|
1953
1872
|
*
|
|
1954
1873
|
* ```typescript
|
|
1955
1874
|
* import {VerdocsEndpoint} from '@verdocs/js-sdk/HTTP';
|
|
1956
|
-
*
|
|
1957
|
-
* console.log('Current timeout', Transport.getEndpoint().defaults.timeout);
|
|
1875
|
+
* const endpoint = new VerdocsEndpoint();
|
|
1958
1876
|
* ```
|
|
1959
1877
|
*/
|
|
1960
|
-
function VerdocsEndpoint(
|
|
1961
|
-
var _b = _a === void 0 ? {} : _a, baseURL = _b.baseURL, timeout = _b.timeout;
|
|
1878
|
+
function VerdocsEndpoint() {
|
|
1962
1879
|
this.requestLoggerId = null;
|
|
1963
|
-
this.api = axios.create({
|
|
1964
|
-
baseURL: baseURL || 'https://api.verdocs.com',
|
|
1965
|
-
timeout: timeout || 6000,
|
|
1966
|
-
});
|
|
1880
|
+
this.api = axios.create({ baseURL: 'https://api.verdocs.com', timeout: 3000 });
|
|
1967
1881
|
}
|
|
1968
1882
|
/**
|
|
1969
1883
|
* Set the timeout for API calls in milliseconds. 2000-4000ms is recommended for most purposes. 3000ms is the default.
|
|
@@ -2079,7 +1993,7 @@ var VerdocsEndpoint = /** @class */ (function () {
|
|
|
2079
1993
|
// Also see globalThis for comments about why we're doing this in the first place.
|
|
2080
1994
|
var ENDPOINT_KEY = Symbol.for('verdocs-api-endpoint');
|
|
2081
1995
|
if (!globalThis_1[ENDPOINT_KEY]) {
|
|
2082
|
-
globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint(
|
|
1996
|
+
globalThis_1[ENDPOINT_KEY] = new VerdocsEndpoint();
|
|
2083
1997
|
}
|
|
2084
1998
|
var globalEndpoint = globalThis_1[ENDPOINT_KEY];
|
|
2085
1999
|
var activeEndpoint = globalEndpoint;
|
|
@@ -2114,216 +2028,6 @@ var setActiveEndpoint = function (e) {
|
|
|
2114
2028
|
activeEndpoint = e || globalEndpoint;
|
|
2115
2029
|
};
|
|
2116
2030
|
|
|
2117
|
-
/**
|
|
2118
|
-
* Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
|
|
2119
|
-
* to locate items across all content types. More specific retrievals may be performed using the various "list" endpoints within
|
|
2120
|
-
* each collection (e.g. {@link Documents.Documents.searchDocuments} or {@link Templates.Templates.searchTemplates}).
|
|
2121
|
-
*
|
|
2122
|
-
* @module
|
|
2123
|
-
*/
|
|
2124
|
-
var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
2125
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
2126
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
2127
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
2128
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
2129
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
2130
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
2131
|
-
});
|
|
2132
|
-
};
|
|
2133
|
-
var __generator$2 = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
2134
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
2135
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
2136
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
2137
|
-
function step(op) {
|
|
2138
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
2139
|
-
while (_) try {
|
|
2140
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
2141
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
2142
|
-
switch (op[0]) {
|
|
2143
|
-
case 0: case 1: t = op; break;
|
|
2144
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
2145
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
2146
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
2147
|
-
default:
|
|
2148
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
2149
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
2150
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
2151
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
2152
|
-
if (t[2]) _.ops.pop();
|
|
2153
|
-
_.trys.pop(); continue;
|
|
2154
|
-
}
|
|
2155
|
-
op = body.call(thisArg, _);
|
|
2156
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
2157
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
2158
|
-
}
|
|
2159
|
-
};
|
|
2160
|
-
/**
|
|
2161
|
-
* Retrieve recent and saved searches. Note that result counts will be limited to a maximum of 20 entries for each
|
|
2162
|
-
* type but this may be expanded in the future. Client UI's should self-limit display counts as needed.
|
|
2163
|
-
*
|
|
2164
|
-
* ```typescript
|
|
2165
|
-
* import {Content} from '@verdocs/js-sdk/Search';
|
|
2166
|
-
*
|
|
2167
|
-
* const {recent, saved} = await Content.getSearchHistory();
|
|
2168
|
-
* ```
|
|
2169
|
-
*/
|
|
2170
|
-
var getSearchHistory = function () { return __awaiter$2(void 0, void 0, void 0, function () {
|
|
2171
|
-
return __generator$2(this, function (_a) {
|
|
2172
|
-
return [2 /*return*/, getEndpoint()
|
|
2173
|
-
.api.get('/search/history')
|
|
2174
|
-
.then(function (r) { return r.data; })];
|
|
2175
|
-
});
|
|
2176
|
-
}); };
|
|
2177
|
-
|
|
2178
|
-
const SearchIcon$1 = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>`;
|
|
2179
|
-
|
|
2180
|
-
const searchRecentCss = "search-recent{font-family:sans-serif;font-family:var(--verdocs-font)}search-recent .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:var(--verdocs-background-dark);text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}search-recent .title{font-size:22px;font-weight:700;line-height:30px}search-recent .items{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:start;align-items:flex-start;margin-top:20px}search-recent .button{background:transparent;border:none;height:20px;font-size:16px;font-family:sans-serif;color:#ffffff;line-height:26px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}search-recent .button:hover{cursor:pointer}search-recent .button:not(:last-child){margin-bottom:36px}search-recent .button svg{fill:#707ae5;width:28px;height:28px;margin-right:26px}search-recent .pill{font-size:14px;display:-ms-inline-flexbox;display:inline-flex;padding:3px 8px;border-radius:6px;margin-right:8px;background-color:#999999;color:#333}search-recent .empty{text-transform:none;line-height:22px;color:#ccc}";
|
|
2181
|
-
|
|
2182
|
-
let SearchRecent$1 = class extends HTMLElement$1 {
|
|
2183
|
-
constructor() {
|
|
2184
|
-
super();
|
|
2185
|
-
this.__registerHost();
|
|
2186
|
-
this.entrySelected = createEvent(this, "entrySelected", 7);
|
|
2187
|
-
/**
|
|
2188
|
-
* If set, limits the number of entries that will be shown. Note that there is a server-imposed limit of 20 entries
|
|
2189
|
-
* that cannot currently be increased (only reduced).
|
|
2190
|
-
*/
|
|
2191
|
-
this.limit = 10;
|
|
2192
|
-
this.recent = [];
|
|
2193
|
-
this.emptyMessage = 'You do not have any recent searches.';
|
|
2194
|
-
}
|
|
2195
|
-
componentDidLoad() {
|
|
2196
|
-
getSearchHistory()
|
|
2197
|
-
.then(r => {
|
|
2198
|
-
this.recent = r.recent;
|
|
2199
|
-
this.emptyMessage = 'You do not have any recent searches.';
|
|
2200
|
-
})
|
|
2201
|
-
.catch(e => {
|
|
2202
|
-
var _a;
|
|
2203
|
-
console.warn('[Verdocs/search-recent] Error getting reent searches', e);
|
|
2204
|
-
if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
|
|
2205
|
-
this.emptyMessage = 'Authenticated required.';
|
|
2206
|
-
}
|
|
2207
|
-
});
|
|
2208
|
-
}
|
|
2209
|
-
handleSelectEntry(entry) {
|
|
2210
|
-
this.entrySelected.emit(entry);
|
|
2211
|
-
}
|
|
2212
|
-
render() {
|
|
2213
|
-
return (h(Host, null, h("div", { class: "container" }, h("p", { class: "title" }, "Recent Searches"), h("div", { class: "items" }, this.recent.slice(0, this.limit).map(entry => (h("button", { class: "button", innerHTML: SearchIcon$1, onClick: () => this.handleSelectEntry(entry) }, entry.params.q))), this.recent.length < 1 && h("div", { class: "empty" }, this.emptyMessage)))));
|
|
2214
|
-
}
|
|
2215
|
-
static get style() { return searchRecentCss; }
|
|
2216
|
-
};
|
|
2217
|
-
|
|
2218
|
-
const SearchIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"/></svg>`;
|
|
2219
|
-
|
|
2220
|
-
const searchSavedCss = "search-saved{font-family:sans-serif;font-family:var(--verdocs-font)}search-saved .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:var(--verdocs-background-dark);text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}search-saved .title{font-size:22px;font-weight:700;line-height:30px}search-saved .items{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;-ms-flex-align:start;align-items:flex-start;margin-top:20px}search-saved .button{background:transparent;border:none;height:20px;font-size:16px;font-family:sans-serif;color:#ffffff;line-height:26px;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}search-saved .button:hover{cursor:pointer}search-saved .button:not(:last-child){margin-bottom:36px}search-saved .button svg{fill:#707ae5;width:28px;height:28px;margin-right:26px}search-saved .empty{text-transform:none;line-height:22px;color:#ccc}";
|
|
2221
|
-
|
|
2222
|
-
let SearchSaved$1 = class extends HTMLElement$1 {
|
|
2223
|
-
constructor() {
|
|
2224
|
-
super();
|
|
2225
|
-
this.__registerHost();
|
|
2226
|
-
this.entrySelected = createEvent(this, "entrySelected", 7);
|
|
2227
|
-
/**
|
|
2228
|
-
* If set, limits the number of entries that will be shown. Note that there is a server-imposed limit of 20 entries
|
|
2229
|
-
* that cannot currently be increased (only reduced).
|
|
2230
|
-
*/
|
|
2231
|
-
this.limit = 10;
|
|
2232
|
-
this.saved = [];
|
|
2233
|
-
this.emptyMessage = 'You do not have any saved searches.';
|
|
2234
|
-
}
|
|
2235
|
-
componentDidLoad() {
|
|
2236
|
-
getSearchHistory()
|
|
2237
|
-
.then(r => {
|
|
2238
|
-
this.saved = r.saved;
|
|
2239
|
-
this.emptyMessage = 'You do not have any saved searches.';
|
|
2240
|
-
})
|
|
2241
|
-
.catch(e => {
|
|
2242
|
-
var _a;
|
|
2243
|
-
console.warn('[Verdocs/search-recent] Error getting saved searches', e);
|
|
2244
|
-
if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
|
|
2245
|
-
this.emptyMessage = 'Authenticated required.';
|
|
2246
|
-
}
|
|
2247
|
-
});
|
|
2248
|
-
}
|
|
2249
|
-
handleSelectEntry(entry) {
|
|
2250
|
-
this.entrySelected.emit(entry);
|
|
2251
|
-
}
|
|
2252
|
-
render() {
|
|
2253
|
-
return (h(Host, null, h("div", { class: "container" }, h("p", { class: "title" }, "Saved Searches"), h("div", { class: "items" }, this.saved.slice(0, this.limit).map(entry => (h("button", { class: "button", innerHTML: SearchIcon, onClick: () => this.handleSelectEntry(entry) }, entry.name))), this.saved.length < 1 && h("div", { class: "empty" }, this.emptyMessage)))));
|
|
2254
|
-
}
|
|
2255
|
-
static get style() { return searchSavedCss; }
|
|
2256
|
-
};
|
|
2257
|
-
|
|
2258
|
-
const DocumentIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
|
|
2259
|
-
|
|
2260
|
-
const searchStarredCss = "search-starred{font-family:sans-serif;font-family:var(--verdocs-font)}search-starred .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:var(--verdocs-background-dark)}search-starred .title{font-size:22px;font-weight:700;line-height:30px}search-starred .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}search-starred .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}search-starred .item:hover{cursor:pointer}search-starred .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}search-starred .icon svg{fill:#707ae5;width:22px;height:22px}search-starred .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}search-starred .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}search-starred .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}search-starred .empty{text-transform:none;line-height:22px;color:#ccc}";
|
|
2261
|
-
|
|
2262
|
-
let SearchStarred$1 = class extends HTMLElement$1 {
|
|
2263
|
-
constructor() {
|
|
2264
|
-
super();
|
|
2265
|
-
this.__registerHost();
|
|
2266
|
-
this.entrySelected = createEvent(this, "entrySelected", 7);
|
|
2267
|
-
this.emptyMessage = 'You do not have any starred searches.';
|
|
2268
|
-
}
|
|
2269
|
-
componentDidLoad() {
|
|
2270
|
-
// TODO
|
|
2271
|
-
// getStarred()
|
|
2272
|
-
// .then(r => {
|
|
2273
|
-
// this.saved = r.saved;
|
|
2274
|
-
// this.emptyMessage = 'You do not have any saved searches.';
|
|
2275
|
-
// })
|
|
2276
|
-
// .catch(e => {
|
|
2277
|
-
// console.warn('[Verdocs/search-recent] Error getting saved searches', e);
|
|
2278
|
-
// if (e?.response?.status === 401) {
|
|
2279
|
-
// this.emptyMessage = 'Authenticated required.';
|
|
2280
|
-
// }
|
|
2281
|
-
// });
|
|
2282
|
-
}
|
|
2283
|
-
handleSelectEntry(entry) {
|
|
2284
|
-
this.entrySelected.emit(entry);
|
|
2285
|
-
}
|
|
2286
|
-
computePagesText(pages) {
|
|
2287
|
-
if (pages < 2) {
|
|
2288
|
-
return `${pages} Page`;
|
|
2289
|
-
}
|
|
2290
|
-
else {
|
|
2291
|
-
return `${pages} Pages`;
|
|
2292
|
-
}
|
|
2293
|
-
}
|
|
2294
|
-
computeRecipientsText(recipients) {
|
|
2295
|
-
if (typeof recipients === 'object') {
|
|
2296
|
-
return recipients.join(', ');
|
|
2297
|
-
}
|
|
2298
|
-
else if (recipients > 1) {
|
|
2299
|
-
return `${recipients} Recipients`;
|
|
2300
|
-
}
|
|
2301
|
-
else {
|
|
2302
|
-
return `${recipients} Recipient`;
|
|
2303
|
-
}
|
|
2304
|
-
}
|
|
2305
|
-
render() {
|
|
2306
|
-
var _a, _b;
|
|
2307
|
-
return (h(Host, null, h("div", { class: "container" }, h("p", { class: "title" }, "My Starred Items"), h("div", { class: "items" }, (_a = this.options) === null || _a === void 0 ? void 0 :
|
|
2308
|
-
_a.map(option => (h("button", { class: "item", onClick: () => this.handleSelectEntry(option) }, h("div", { class: "icon", innerHTML: DocumentIcon }), h("div", { class: "details" }, h("div", { class: "item-title" }, option.params.q), h("div", { class: "info" }, option.pages ? `${this.computePagesText(option.pages)} ` : '', option.recipients ? this.computeRecipientsText(option.recipients) : ''))))), (((_b = this.options) === null || _b === void 0 ? void 0 : _b.length) || []) < 1 && h("div", { class: "empty" }, this.emptyMessage)))));
|
|
2309
|
-
}
|
|
2310
|
-
static get style() { return searchStarredCss; }
|
|
2311
|
-
};
|
|
2312
|
-
|
|
2313
|
-
const searchTabsCss = ":host{display:block}";
|
|
2314
|
-
|
|
2315
|
-
let SearchTabs$1 = class extends HTMLElement$1 {
|
|
2316
|
-
constructor() {
|
|
2317
|
-
super();
|
|
2318
|
-
this.__registerHost();
|
|
2319
|
-
this.selected = 'all';
|
|
2320
|
-
}
|
|
2321
|
-
render() {
|
|
2322
|
-
return (h(Host, null, h("slot", null)));
|
|
2323
|
-
}
|
|
2324
|
-
static get style() { return searchTabsCss; }
|
|
2325
|
-
};
|
|
2326
|
-
|
|
2327
2031
|
/* tslint:disable:no-bitwise */
|
|
2328
2032
|
var b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
|
2329
2033
|
// Regular expression to check formal correctness of base64 encoded strings
|
|
@@ -2456,7 +2160,7 @@ var loadSession = function (source) {
|
|
|
2456
2160
|
const verdocsAuthCss = "verdocs-auth{font-family:sans-serif;font-family:var(--verdocs-font);background-color:var(--verdocs-secondary-color);padding:40px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}verdocs-auth .login-form,verdocs-auth .signup-form{background:#f2f5fa;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;border-radius:8px;-ms-flex-direction:column;flex-direction:column;display:-ms-flexbox;display:flex;padding:20px;width:300px;max-width:100%}verdocs-auth .logo{margin:20px 0 30px;width:128px;max-width:100%}verdocs-auth h3{text-align:center;font-weight:400;font-size:16px;line-height:1.75;margin:0}verdocs-auth h4{text-align:center;font-weight:400;font-size:14px;line-height:1.43;margin:0}verdocs-auth .status-result{display:none}verdocs-auth .status-result.debug{white-space:pre-wrap;font-size:14px;background:#fff;padding:10px;display:block;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:center;justify-content:center}verdocs-auth form{width:100%}verdocs-auth verdocs-text-input{margin-bottom:10px}";
|
|
2457
2161
|
|
|
2458
2162
|
const BASE_URL$1 = 'https://stage-api.verdocs.com/';
|
|
2459
|
-
const SOURCE = 'verdocs-stage';
|
|
2163
|
+
const SOURCE$1 = 'verdocs-stage';
|
|
2460
2164
|
let VerdocsAuth$1 = class extends HTMLElement$1 {
|
|
2461
2165
|
constructor() {
|
|
2462
2166
|
super();
|
|
@@ -2489,13 +2193,13 @@ let VerdocsAuth$1 = class extends HTMLElement$1 {
|
|
|
2489
2193
|
this.loginError = null;
|
|
2490
2194
|
}
|
|
2491
2195
|
componentWillLoad() {
|
|
2492
|
-
const staging = new VerdocsEndpoint(
|
|
2196
|
+
const staging = new VerdocsEndpoint().setBaseURL(BASE_URL$1);
|
|
2493
2197
|
setActiveEndpoint(staging);
|
|
2494
2198
|
console.log('Set active endpoint', getEndpoint());
|
|
2495
2199
|
}
|
|
2496
2200
|
componentDidLoad() {
|
|
2497
|
-
const session = loadSession(SOURCE);
|
|
2498
|
-
console.log('loaded session', session, SOURCE);
|
|
2201
|
+
const session = loadSession(SOURCE$1);
|
|
2202
|
+
console.log('loaded session', session, SOURCE$1);
|
|
2499
2203
|
if (session !== null) {
|
|
2500
2204
|
this.isAuthenticated = true;
|
|
2501
2205
|
this.activeSession = session;
|
|
@@ -2515,7 +2219,7 @@ let VerdocsAuth$1 = class extends HTMLElement$1 {
|
|
|
2515
2219
|
.then(r => {
|
|
2516
2220
|
this.loggingIn = false;
|
|
2517
2221
|
console.log('Login result', r.accessToken);
|
|
2518
|
-
const session = setSession(SOURCE, r.accessToken, true);
|
|
2222
|
+
const session = setSession(SOURCE$1, r.accessToken, true);
|
|
2519
2223
|
this.activeSession = session;
|
|
2520
2224
|
this.isAuthenticated = true;
|
|
2521
2225
|
console.log('set session', session);
|
|
@@ -8022,6 +7726,31 @@ let VerdocsOrganizationCard$1 = class extends HTMLElement$1 {
|
|
|
8022
7726
|
static get style() { return verdocsOrganizationCardCss; }
|
|
8023
7727
|
};
|
|
8024
7728
|
|
|
7729
|
+
const TemplateIcon = `<svg xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><g><rect fill="none" height="24" width="24"/><g><path d="M19,5v14H5V5H19 M19,3H5C3.9,3,3,3.9,3,5v14c0,1.1,0.9,2,2,2h14c1.1,0,2-0.9,2-2V5C21,3.9,20.1,3,19,3L19,3z"/></g><path d="M14,17H7v-2h7V17z M17,13H7v-2h10V13z M17,9H7V7h10V9z"/></g></svg>`;
|
|
7730
|
+
|
|
7731
|
+
const DocumentIcon$1 = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
|
|
7732
|
+
|
|
7733
|
+
const verdocsQuickFunctionsCss = "verdocs-quick-functions{font-family:sans-serif;font-family:var(--verdocs-font)}verdocs-quick-functions .container{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;-ms-flex-wrap:nowrap;flex-wrap:nowrap;width:240px;background-color:var(--verdocs-background-dark);text-transform:uppercase;padding:10px 10px 20px 10px;font-family:sans-serif;color:#ffffff}verdocs-quick-functions .title{font-size:22px;font-weight:700;line-height:30px;margin:1em 0 40px 0}verdocs-quick-functions button{width:140px;height:40px;border:none;display:-ms-flexbox;display:flex;color:#ffffff;cursor:pointer;font-size:14px;font-weight:700;line-height:25px;-ms-flex-align:center;align-items:center;margin-bottom:20px;border-radius:5px;text-transform:uppercase;-ms-flex-pack:space-evenly;justify-content:space-evenly;background-color:#50be50}verdocs-quick-functions button svg{fill:#ffffff}";
|
|
7734
|
+
|
|
7735
|
+
let VerdocsQuickFunctions$1 = class extends HTMLElement$1 {
|
|
7736
|
+
constructor() {
|
|
7737
|
+
super();
|
|
7738
|
+
this.__registerHost();
|
|
7739
|
+
this.createTemplate = createEvent(this, "createTemplate", 7);
|
|
7740
|
+
this.createDocument = createEvent(this, "createDocument", 7);
|
|
7741
|
+
}
|
|
7742
|
+
handleCreateTemplate() {
|
|
7743
|
+
this.createTemplate.emit();
|
|
7744
|
+
}
|
|
7745
|
+
handleCreateDocument() {
|
|
7746
|
+
this.createDocument.emit();
|
|
7747
|
+
}
|
|
7748
|
+
render() {
|
|
7749
|
+
return (h("div", { class: "container" }, h("p", { class: "title" }, "Quick Create"), h("button", { onClick: () => this.handleCreateTemplate(), innerHTML: TemplateIcon }, "Template"), h("button", { onClick: () => this.handleCreateDocument(), innerHTML: DocumentIcon$1 }, "Document")));
|
|
7750
|
+
}
|
|
7751
|
+
static get style() { return verdocsQuickFunctionsCss; }
|
|
7752
|
+
};
|
|
7753
|
+
|
|
8025
7754
|
const verdocsSearchCss = "verdocs-search{font-family:sans-serif;font-family:var(--verdocs-font);display:-ms-flexbox;display:flex;background-color:var(--verdocs-background-dark)}verdocs-search search-box{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin:20px 10px}verdocs-search .boxes{-ms-flex-wrap:wrap;flex-wrap:wrap;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:20px 0}verdocs-search search-recent,verdocs-search search-saved,verdocs-search search-quick-functions,verdocs-search search-starred{display:-ms-flexbox;display:flex;margin:0 20px 20px 0}";
|
|
8026
7755
|
|
|
8027
7756
|
let VerdocsSearch$1 = class extends HTMLElement$1 {
|
|
@@ -8030,11 +7759,226 @@ let VerdocsSearch$1 = class extends HTMLElement$1 {
|
|
|
8030
7759
|
this.__registerHost();
|
|
8031
7760
|
}
|
|
8032
7761
|
render() {
|
|
8033
|
-
return (h("div", { class: "container" }, h("search-box", null), h("div", { class: "boxes" }, h("search-
|
|
7762
|
+
return (h("div", { class: "container" }, h("verdocs-search-box", null), h("div", { class: "boxes" }, h("verdocs-search-activity", { type: "recent" }), h("verdocs-search-activity", { type: "saved" }), h("verdocs-search-activity", { type: "starred" }), h("search-quick-functions", null))));
|
|
8034
7763
|
}
|
|
8035
7764
|
static get style() { return verdocsSearchCss; }
|
|
8036
7765
|
};
|
|
8037
7766
|
|
|
7767
|
+
/**
|
|
7768
|
+
* Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
|
|
7769
|
+
* to locate items across all content types. More specific retrievals may be performed using the various "list" endpoints within
|
|
7770
|
+
* each collection (e.g. {@link Documents.Documents.searchDocuments} or {@link Templates.Templates.searchTemplates}).
|
|
7771
|
+
*
|
|
7772
|
+
* @module
|
|
7773
|
+
*/
|
|
7774
|
+
var __awaiter$2 = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
7775
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
7776
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
7777
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
7778
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7779
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
7780
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
7781
|
+
});
|
|
7782
|
+
};
|
|
7783
|
+
var __generator$2 = (undefined && undefined.__generator) || function (thisArg, body) {
|
|
7784
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
7785
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
7786
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
7787
|
+
function step(op) {
|
|
7788
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
7789
|
+
while (_) try {
|
|
7790
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
7791
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
7792
|
+
switch (op[0]) {
|
|
7793
|
+
case 0: case 1: t = op; break;
|
|
7794
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
7795
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
7796
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
7797
|
+
default:
|
|
7798
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
7799
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
7800
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
7801
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
7802
|
+
if (t[2]) _.ops.pop();
|
|
7803
|
+
_.trys.pop(); continue;
|
|
7804
|
+
}
|
|
7805
|
+
op = body.call(thisArg, _);
|
|
7806
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
7807
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
7808
|
+
}
|
|
7809
|
+
};
|
|
7810
|
+
/**
|
|
7811
|
+
* Retrieve recent and saved searches. Note that result counts will be limited to a maximum of 20 entries for each
|
|
7812
|
+
* type but this may be expanded in the future. Client UI's should self-limit display counts as needed.
|
|
7813
|
+
*
|
|
7814
|
+
* ```typescript
|
|
7815
|
+
* import {Content} from '@verdocs/js-sdk/Search';
|
|
7816
|
+
*
|
|
7817
|
+
* const {recent, saved} = await Content.getSearchHistory();
|
|
7818
|
+
* ```
|
|
7819
|
+
*/
|
|
7820
|
+
var getSearchHistory = function () { return __awaiter$2(void 0, void 0, void 0, function () {
|
|
7821
|
+
return __generator$2(this, function (_a) {
|
|
7822
|
+
return [2 /*return*/, getEndpoint()
|
|
7823
|
+
.api.get('/search/history')
|
|
7824
|
+
.then(function (r) { return r.data; })];
|
|
7825
|
+
});
|
|
7826
|
+
}); };
|
|
7827
|
+
|
|
7828
|
+
var getTemplates = function (params) {
|
|
7829
|
+
return getEndpoint()
|
|
7830
|
+
.api.get('/templates/', { params: params })
|
|
7831
|
+
.then(function (r) { return r.data; });
|
|
7832
|
+
};
|
|
7833
|
+
|
|
7834
|
+
const DocumentIcon = `<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#000000"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M8 16h8v2H8zm0-4h8v2H8zm6-10H6c-1.1 0-2 .9-2 2v16c0 1.1.89 2 1.99 2H18c1.1 0 2-.9 2-2V8l-6-6zm4 18H6V4h7v5h5v11z"/></svg>`;
|
|
7835
|
+
|
|
7836
|
+
const verdocsSearchActivityCss = "verdocs-search-activity{font-family:sans-serif;font-family:var(--verdocs-font)}verdocs-search-activity .container{display:-ms-flexbox;display:flex;width:240px;color:#ffffff;-ms-flex-direction:column;flex-direction:column;text-transform:uppercase;padding:10px 10px 20px 10px;background-color:var(--verdocs-background-dark)}verdocs-search-activity .title{font-size:22px;font-weight:700;line-height:30px}verdocs-search-activity .items{display:-ms-flexbox;display:flex;margin-top:20px;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item{border:none;display:-ms-flexbox;display:flex;text-align:left;margin-bottom:20px;-ms-flex-direction:row;flex-direction:row;background:transparent}verdocs-search-activity .item:hover{cursor:pointer}verdocs-search-activity .icon{-ms-flex:0 0 22px;flex:0 0 22px;margin-right:14px}verdocs-search-activity .icon svg{fill:#707ae5;width:22px;height:22px}verdocs-search-activity .details{display:-ms-flexbox;display:flex;overflow:hidden;-ms-flex-direction:column;flex-direction:column}verdocs-search-activity .item-title{font-size:16px;font-weight:400;color:#ffffff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}verdocs-search-activity .info{font-size:14px;font-weight:500;line-height:23px;color:#aeb4bf}verdocs-search-activity .empty{text-transform:none;line-height:22px;color:#ccc}";
|
|
7837
|
+
|
|
7838
|
+
const SOURCE = 'verdocs-stage';
|
|
7839
|
+
let VerdocsSearchActivity$1 = class extends HTMLElement$1 {
|
|
7840
|
+
constructor() {
|
|
7841
|
+
super();
|
|
7842
|
+
this.__registerHost();
|
|
7843
|
+
this.entrySelected = createEvent(this, "entrySelected", 7);
|
|
7844
|
+
this.type = 'recent';
|
|
7845
|
+
this.emptyMessage = 'You do not have any starred searches.';
|
|
7846
|
+
this.authFailure = false;
|
|
7847
|
+
this.title = 'Recent Searches';
|
|
7848
|
+
this.recent = [];
|
|
7849
|
+
this.saved = [];
|
|
7850
|
+
this.starred = [];
|
|
7851
|
+
}
|
|
7852
|
+
componentWillLoad() {
|
|
7853
|
+
loadSession(SOURCE);
|
|
7854
|
+
const errorHandler = e => {
|
|
7855
|
+
var _a;
|
|
7856
|
+
console.warn('[Verdocs/search-activity] Error getting search data', e);
|
|
7857
|
+
if (((_a = e === null || e === void 0 ? void 0 : e.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
|
|
7858
|
+
this.authFailure = true;
|
|
7859
|
+
}
|
|
7860
|
+
};
|
|
7861
|
+
switch (this.type) {
|
|
7862
|
+
case 'recent':
|
|
7863
|
+
this.title = 'Recent Searches';
|
|
7864
|
+
this.emptyMessage = 'You do not have any recent searches.';
|
|
7865
|
+
getSearchHistory()
|
|
7866
|
+
.then(r => (this.recent = r.recent))
|
|
7867
|
+
.catch(errorHandler);
|
|
7868
|
+
break;
|
|
7869
|
+
case 'saved':
|
|
7870
|
+
this.title = 'Saved Searches';
|
|
7871
|
+
this.emptyMessage = 'You do not have any saved searches.';
|
|
7872
|
+
getSearchHistory()
|
|
7873
|
+
.then(r => (this.saved = r.saved))
|
|
7874
|
+
.catch(errorHandler);
|
|
7875
|
+
break;
|
|
7876
|
+
case 'starred':
|
|
7877
|
+
this.title = 'My Starred items';
|
|
7878
|
+
this.emptyMessage = 'You do not have any starred templates.';
|
|
7879
|
+
getTemplates({ is_starred: true })
|
|
7880
|
+
.then(r => (this.starred = r))
|
|
7881
|
+
.catch(errorHandler);
|
|
7882
|
+
break;
|
|
7883
|
+
}
|
|
7884
|
+
}
|
|
7885
|
+
handleSelectEntry(entry) {
|
|
7886
|
+
this.entrySelected.emit(entry);
|
|
7887
|
+
}
|
|
7888
|
+
computePagesText(pages) {
|
|
7889
|
+
if (pages < 2) {
|
|
7890
|
+
return `${pages} Page`;
|
|
7891
|
+
}
|
|
7892
|
+
else {
|
|
7893
|
+
return `${pages} Pages`;
|
|
7894
|
+
}
|
|
7895
|
+
}
|
|
7896
|
+
computeRecipientsText(recipients) {
|
|
7897
|
+
if (typeof recipients === 'object') {
|
|
7898
|
+
return recipients.join(', ');
|
|
7899
|
+
}
|
|
7900
|
+
else if (recipients > 1) {
|
|
7901
|
+
return `${recipients} Recipients`;
|
|
7902
|
+
}
|
|
7903
|
+
else {
|
|
7904
|
+
return `${recipients} Recipient`;
|
|
7905
|
+
}
|
|
7906
|
+
}
|
|
7907
|
+
render() {
|
|
7908
|
+
const showEmpty = this.recent.length < 1 && this.saved.length < 1 && this.starred.length < 1;
|
|
7909
|
+
return (h("div", { class: "container" }, h("p", { class: "title" }, this.title), h("div", { class: "items" }, this.recent.map(recent => (h("button", { class: "item", onClick: () => this.handleSelectEntry(recent) }, h("div", { class: "icon", innerHTML: DocumentIcon }), h("div", { class: "details" }, h("div", { class: "item-title" }, recent.params.q), h("div", { class: "info" }, "Test"))))), this.saved.map(option => (h("button", { class: "item", onClick: () => this.handleSelectEntry(option) }, h("div", { class: "icon", innerHTML: DocumentIcon }), h("div", { class: "details" }, h("div", { class: "item-title" }, option.params.q), h("div", { class: "info" }))))), showEmpty && h("div", { class: "empty" }, this.authFailure ? 'Authentication required' : this.emptyMessage))));
|
|
7910
|
+
}
|
|
7911
|
+
static get style() { return verdocsSearchActivityCss; }
|
|
7912
|
+
};
|
|
7913
|
+
|
|
7914
|
+
const SearchIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7915
|
+
<path d="M23.4809 20.7176L17.9111 15.2536C19.0961 13.6368 19.727 11.6926 19.7128 9.70131C19.7201 7.53345 18.9846 5.42606 17.6244 3.71753C16.2642 2.009 14.3581 0.798456 12.2123 0.280282C10.0665 -0.237892 7.80552 -0.0336342 5.79227 0.86026C3.77902 1.75415 2.13038 3.28582 1.1111 5.20931C0.0918114 7.1328 -0.238985 9.33652 0.171813 11.4666C0.582612 13.5967 1.71117 15.5296 3.37628 16.9548C5.0414 18.3801 7.14646 19.2151 9.35344 19.3257C11.5604 19.4364 13.7413 18.8162 15.5458 17.5649L21.1372 23.05L21.1563 23.0663C21.4841 23.3487 21.9039 23.507 22.3401 23.5128C22.7823 23.5125 23.2063 23.3402 23.5191 23.0337V23.0337C23.6749 22.8812 23.7979 22.6995 23.8804 22.4993C23.963 22.2991 24.0036 22.0847 23.9997 21.8688C23.9959 21.6529 23.9477 21.44 23.858 21.2428C23.7683 21.0456 23.639 20.8682 23.4778 20.7212L23.4809 20.7176ZM14.5167 14.1975C13.4564 15.2349 12.0623 15.8797 10.5719 16.022C9.08145 16.1644 7.58681 15.7955 6.34249 14.9781C5.09816 14.1608 4.18109 12.9456 3.74751 11.5395C3.31393 10.1334 3.39064 8.6233 3.96455 7.26643C4.53846 5.90955 5.57409 4.7898 6.89507 4.09787C8.21606 3.40594 9.74071 3.18461 11.2093 3.4716C12.678 3.75858 13.9998 4.53612 14.9497 5.6718C15.8996 6.80748 16.4188 8.23105 16.4189 9.7001C16.4196 10.5357 16.2519 11.3632 15.9254 12.135C15.599 12.9069 15.1202 13.6078 14.5167 14.1975V14.1975Z" fill="white"/>
|
|
7916
|
+
</svg>
|
|
7917
|
+
`;
|
|
7918
|
+
|
|
7919
|
+
const CloseIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
7920
|
+
<path d="M14.0739 11.7565L19.7127 6.23228C20.0875 5.85692 20.0875 5.25309 19.7127 4.87773L19.0213 4.20046C18.6382 3.82511 18.0219 3.82511 17.6387 4.20046L12 9.72472L6.36127 4.20046C5.97814 3.82511 5.36179 3.82511 4.97866 4.20046L4.28735 4.87773C3.90422 5.25309 3.90422 5.85692 4.28735 6.23228L9.92608 11.7565L4.28735 17.2808C3.90422 17.6561 3.90422 18.26 4.28735 18.6353L4.97866 19.3126C5.36179 19.688 5.97814 19.688 6.36127 19.3126L12 13.7883L17.6387 19.3126C18.0219 19.688 18.6382 19.688 19.0213 19.3126L19.7127 18.6353C20.0958 18.26 20.0958 17.6561 19.7127 17.2808L14.0739 11.7565Z" fill="white"/>
|
|
7921
|
+
</svg>
|
|
7922
|
+
`;
|
|
7923
|
+
|
|
7924
|
+
const verdocsSearchBoxCss = "verdocs-search-box{font-family:sans-serif;font-family:var(--verdocs-font)}verdocs-search-box form{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;height:45px;-webkit-box-sizing:border-box;box-sizing:border-box;margin:5px 0 0;border-radius:5px;-ms-flex-align:center;align-items:center;background-color:#fff;padding:0 8px;border-width:1px;border-style:solid;border-color:var(--verdocs-container-border-color)}verdocs-search-box form input{-webkit-box-sizing:border-box;box-sizing:border-box;height:43px;width:100%;font-size:18px;border:none}verdocs-search-box form input:focus{outline:none}verdocs-search-box form button.search{cursor:pointer;display:-ms-inline-flexbox;display:inline-flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px;border:none;width:100px;height:28px;font-weight:700;font-size:10px;letter-spacing:1px;background-color:#50be80;text-transform:uppercase;color:#fff}verdocs-search-box form .type{background-color:#707ae5;height:30px;display:-ms-inline-flexbox;display:inline-flex;padding:1px 0 2px 10px;font-size:13px;line-height:16px;border-radius:4px;-ms-flex-pack:center;justify-content:center;text-transform:uppercase;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;color:#fff;margin-right:10px}verdocs-search-box form .type button{border:none;color:#fff;margin:5px 0 0 8px;background:transparent}verdocs-search-box form svg{width:12px;height:12px;margin-right:6px}verdocs-search-box ::-webkit-input-placeholder{color:#aeb4bf}verdocs-search-box ::-moz-placeholder{color:#aeb4bf}verdocs-search-box :-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::-ms-input-placeholder{color:#aeb4bf}verdocs-search-box ::placeholder{color:#aeb4bf}";
|
|
7925
|
+
|
|
7926
|
+
let VerdocsSearchBox$1 = class extends HTMLElement$1 {
|
|
7927
|
+
constructor() {
|
|
7928
|
+
super();
|
|
7929
|
+
this.__registerHost();
|
|
7930
|
+
this.searchClicked = createEvent(this, "searchClicked", 7);
|
|
7931
|
+
this.typeChanged = createEvent(this, "typeChanged", 7);
|
|
7932
|
+
this.queryChanged = createEvent(this, "queryChanged", 7);
|
|
7933
|
+
/**
|
|
7934
|
+
* The placeholder to display in the input field.
|
|
7935
|
+
*/
|
|
7936
|
+
this.placeholder = 'search documents, templates, people...';
|
|
7937
|
+
/**
|
|
7938
|
+
* If set to a value other than 'all', a removeable filter indicator will be displayed.
|
|
7939
|
+
*/
|
|
7940
|
+
this.type = 'all';
|
|
7941
|
+
/**
|
|
7942
|
+
* The text search string entered by the user.
|
|
7943
|
+
*/
|
|
7944
|
+
this.query = '';
|
|
7945
|
+
}
|
|
7946
|
+
handleSearch(e) {
|
|
7947
|
+
this.searchClicked.emit({ type: this.type, query: this.query });
|
|
7948
|
+
e.preventDefault();
|
|
7949
|
+
return false;
|
|
7950
|
+
}
|
|
7951
|
+
handleChange(e) {
|
|
7952
|
+
this.queryChanged.emit(e.target.value);
|
|
7953
|
+
}
|
|
7954
|
+
handleClearFilter() {
|
|
7955
|
+
this.typeChanged.emit('all');
|
|
7956
|
+
}
|
|
7957
|
+
handleKeyUp(e) {
|
|
7958
|
+
if (e.key === 'Enter') {
|
|
7959
|
+
this.searchClicked.emit({ type: this.type, query: this.query });
|
|
7960
|
+
}
|
|
7961
|
+
}
|
|
7962
|
+
render() {
|
|
7963
|
+
return (h("form", { onSubmit: e => this.handleSearch(e) }, this.type !== undefined && this.type !== 'all' && (h("span", { class: "type" }, this.type, "s ", h("button", { class: "remove", innerHTML: CloseIcon, onClick: () => this.handleClearFilter() }))), h("input", { type: "text", placeholder: this.placeholder, value: this.query, onInput: e => this.handleChange(e), onKeyUp: e => this.handleKeyUp(e) }), h("button", { onClick: e => this.handleSearch(e), class: "search" }, h("span", { innerHTML: SearchIcon }), "Search")));
|
|
7964
|
+
}
|
|
7965
|
+
static get style() { return verdocsSearchBoxCss; }
|
|
7966
|
+
};
|
|
7967
|
+
|
|
7968
|
+
const verdocsSearchTabsCss = "verdocs-search-tabs{display:block}";
|
|
7969
|
+
|
|
7970
|
+
let VerdocsSearchTabs$1 = class extends HTMLElement$1 {
|
|
7971
|
+
constructor() {
|
|
7972
|
+
super();
|
|
7973
|
+
this.__registerHost();
|
|
7974
|
+
this.selected = 'all';
|
|
7975
|
+
}
|
|
7976
|
+
render() {
|
|
7977
|
+
return h("div", null, "\u00A0");
|
|
7978
|
+
}
|
|
7979
|
+
static get style() { return verdocsSearchTabsCss; }
|
|
7980
|
+
};
|
|
7981
|
+
|
|
8038
7982
|
/**
|
|
8039
7983
|
* Given a `rgba(r,g,b,a)` string value, returns the hex equivalent, dropping the alpha channel.
|
|
8040
7984
|
*/
|
|
@@ -10218,7 +10162,7 @@ let VerdocsSign$1 = class extends HTMLElement$1 {
|
|
|
10218
10162
|
this.focusedField = '';
|
|
10219
10163
|
}
|
|
10220
10164
|
componentWillLoad() {
|
|
10221
|
-
const endpoint = new VerdocsEndpoint(
|
|
10165
|
+
const endpoint = new VerdocsEndpoint().setBaseURL(BASE_URL);
|
|
10222
10166
|
setActiveEndpoint(endpoint);
|
|
10223
10167
|
}
|
|
10224
10168
|
async componentDidLoad() {
|
|
@@ -10977,8 +10921,8 @@ let VerdocsUploadDialog$1 = class extends HTMLElement$1 {
|
|
|
10977
10921
|
const _nodeResolve_empty = {};
|
|
10978
10922
|
|
|
10979
10923
|
const _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
|
|
10980
|
-
|
|
10981
|
-
|
|
10924
|
+
__proto__: null,
|
|
10925
|
+
'default': _nodeResolve_empty
|
|
10982
10926
|
});
|
|
10983
10927
|
|
|
10984
10928
|
const require$$5 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);
|
|
@@ -27062,12 +27006,6 @@ let VerdocsView$1 = class extends HTMLElement$1 {
|
|
|
27062
27006
|
static get style() { return verdocsViewCss; }
|
|
27063
27007
|
};
|
|
27064
27008
|
|
|
27065
|
-
const SearchBox = /*@__PURE__*/proxyCustomElement(SearchBox$1, [0,"search-box",{"placeholder":[1],"type":[1],"query":[1]}]);
|
|
27066
|
-
const SearchQuickFunctions = /*@__PURE__*/proxyCustomElement(SearchQuickFunctions$1, [0,"search-quick-functions"]);
|
|
27067
|
-
const SearchRecent = /*@__PURE__*/proxyCustomElement(SearchRecent$1, [0,"search-recent",{"limit":[2],"recent":[32],"emptyMessage":[32]}]);
|
|
27068
|
-
const SearchSaved = /*@__PURE__*/proxyCustomElement(SearchSaved$1, [0,"search-saved",{"limit":[2],"saved":[32],"emptyMessage":[32]}]);
|
|
27069
|
-
const SearchStarred = /*@__PURE__*/proxyCustomElement(SearchStarred$1, [0,"search-starred",{"options":[8],"emptyMessage":[32]}]);
|
|
27070
|
-
const SearchTabs = /*@__PURE__*/proxyCustomElement(SearchTabs$1, [4,"search-tabs",{"selected":[32]}]);
|
|
27071
27009
|
const VerdocsAuth = /*@__PURE__*/proxyCustomElement(VerdocsAuth$1, [0,"verdocs-auth",{"visible":[4],"logo":[1],"debug":[4],"isAuthenticated":[32],"displayMode":[32],"username":[32],"password":[32],"loggingIn":[32],"activeSession":[32],"loginError":[32]}]);
|
|
27072
27010
|
const VerdocsButton = /*@__PURE__*/proxyCustomElement(VerdocsButton$1, [0,"verdocs-button",{"label":[1],"type":[1],"variant":[1],"disabled":[4]}]);
|
|
27073
27011
|
const VerdocsDocumentStatus = /*@__PURE__*/proxyCustomElement(VerdocsDocumentStatus$1, [0,"verdocs-document-status",{"status":[1]}]);
|
|
@@ -27086,7 +27024,11 @@ const VerdocsInitialDialog = /*@__PURE__*/proxyCustomElement(VerdocsInitialDialo
|
|
|
27086
27024
|
const VerdocsLoader = /*@__PURE__*/proxyCustomElement(VerdocsLoader$1, [0,"verdocs-loader"]);
|
|
27087
27025
|
const VerdocsOkDialog = /*@__PURE__*/proxyCustomElement(VerdocsOkDialog$1, [0,"verdocs-ok-dialog",{"heading":[1],"message":[1],"open":[4],"cancel":[4]}]);
|
|
27088
27026
|
const VerdocsOrganizationCard = /*@__PURE__*/proxyCustomElement(VerdocsOrganizationCard$1, [0,"verdocs-organization-card",{"organization":[16]}]);
|
|
27027
|
+
const VerdocsQuickFunctions = /*@__PURE__*/proxyCustomElement(VerdocsQuickFunctions$1, [0,"verdocs-quick-functions"]);
|
|
27089
27028
|
const VerdocsSearch = /*@__PURE__*/proxyCustomElement(VerdocsSearch$1, [0,"verdocs-search"]);
|
|
27029
|
+
const VerdocsSearchActivity = /*@__PURE__*/proxyCustomElement(VerdocsSearchActivity$1, [0,"verdocs-search-activity",{"type":[1],"options":[8],"emptyMessage":[32],"authFailure":[32],"title":[32],"recent":[32],"saved":[32],"starred":[32]}]);
|
|
27030
|
+
const VerdocsSearchBox = /*@__PURE__*/proxyCustomElement(VerdocsSearchBox$1, [0,"verdocs-search-box",{"placeholder":[1],"type":[1],"query":[1]}]);
|
|
27031
|
+
const VerdocsSearchTabs = /*@__PURE__*/proxyCustomElement(VerdocsSearchTabs$1, [0,"verdocs-search-tabs",{"selected":[32]}]);
|
|
27090
27032
|
const VerdocsSign = /*@__PURE__*/proxyCustomElement(VerdocsSign$1, [0,"verdocs-sign",{"documentid":[1],"roleid":[1],"invitecode":[1],"endpoint":[32],"recipient":[32],"signerToken":[32],"pdfUrl":[32],"recipientIndex":[32],"document":[32],"fields":[32],"pdfPageInfo":[32],"hasSignature":[32],"nextButtonLabel":[32],"focusedField":[32]}]);
|
|
27091
27033
|
const VerdocsSignatureDialog = /*@__PURE__*/proxyCustomElement(VerdocsSignatureDialog$1, [0,"verdocs-signature-dialog",{"fullname":[1],"open":[4],"fontLoaded":[32],"enteredName":[32],"mode":[32]}]);
|
|
27092
27034
|
const VerdocsTemplateCard = /*@__PURE__*/proxyCustomElement(VerdocsTemplateCard$1, [0,"verdocs-template-card",{"template":[16]}]);
|
|
@@ -27098,13 +27040,7 @@ const VerdocsView = /*@__PURE__*/proxyCustomElement(VerdocsView$1, [0,"verdocs-v
|
|
|
27098
27040
|
const defineCustomElements = (opts) => {
|
|
27099
27041
|
if (typeof customElements !== 'undefined') {
|
|
27100
27042
|
[
|
|
27101
|
-
|
|
27102
|
-
SearchQuickFunctions,
|
|
27103
|
-
SearchRecent,
|
|
27104
|
-
SearchSaved,
|
|
27105
|
-
SearchStarred,
|
|
27106
|
-
SearchTabs,
|
|
27107
|
-
VerdocsAuth,
|
|
27043
|
+
VerdocsAuth,
|
|
27108
27044
|
VerdocsButton,
|
|
27109
27045
|
VerdocsDocumentStatus,
|
|
27110
27046
|
VerdocsDropdown,
|
|
@@ -27122,7 +27058,11 @@ const defineCustomElements = (opts) => {
|
|
|
27122
27058
|
VerdocsLoader,
|
|
27123
27059
|
VerdocsOkDialog,
|
|
27124
27060
|
VerdocsOrganizationCard,
|
|
27061
|
+
VerdocsQuickFunctions,
|
|
27125
27062
|
VerdocsSearch,
|
|
27063
|
+
VerdocsSearchActivity,
|
|
27064
|
+
VerdocsSearchBox,
|
|
27065
|
+
VerdocsSearchTabs,
|
|
27126
27066
|
VerdocsSign,
|
|
27127
27067
|
VerdocsSignatureDialog,
|
|
27128
27068
|
VerdocsTemplateCard,
|
|
@@ -27139,4 +27079,4 @@ const defineCustomElements = (opts) => {
|
|
|
27139
27079
|
}
|
|
27140
27080
|
};
|
|
27141
27081
|
|
|
27142
|
-
export {
|
|
27082
|
+
export { VerdocsAuth, VerdocsButton, VerdocsDocumentStatus, VerdocsDropdown, VerdocsFieldAttachment, VerdocsFieldCheckbox, VerdocsFieldDate, VerdocsFieldDropdown, VerdocsFieldInitial, VerdocsFieldPayment, VerdocsFieldRadioButton, VerdocsFieldSignature, VerdocsFieldTextarea, VerdocsFieldTextbox, VerdocsInitialDialog, VerdocsLoader, VerdocsOkDialog, VerdocsOrganizationCard, VerdocsQuickFunctions, VerdocsSearch, VerdocsSearchActivity, VerdocsSearchBox, VerdocsSearchTabs, VerdocsSign, VerdocsSignatureDialog, VerdocsTemplateCard, VerdocsTemplateTags, VerdocsTextInput, VerdocsToggle, VerdocsUploadDialog, VerdocsView, defineCustomElements };
|