@verdocs/web-sdk 1.4.7 → 1.5.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/VerdocsEndpoint-5e6dd8ef.js +4780 -0
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/verdocs-auth.cjs.entry.js +32 -19
- package/dist/cjs/verdocs-dropdown_12.cjs.entry.js +15 -11
- package/dist/cjs/verdocs-kba-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-ok-dialog.cjs.entry.js +1 -1
- package/dist/cjs/verdocs-quick-functions.cjs.entry.js +5 -0
- package/dist/cjs/verdocs-search-activity_2.cjs.entry.js +40 -35
- package/dist/cjs/verdocs-search.cjs.entry.js +6 -1
- package/dist/cjs/verdocs-sign.cjs.entry.js +26 -161
- package/dist/cjs/verdocs-web-sdk.cjs.js +1 -1
- package/dist/collection/components/dialogs/verdocs-kba-dialog/verdocs-kba-dialog.css +1 -1
- package/dist/collection/components/dialogs/verdocs-ok-dialog/verdocs-ok-dialog.css +1 -1
- package/dist/collection/components/elements/verdocs-quick-functions/verdocs-quick-functions.js +31 -1
- package/dist/collection/components/elements/verdocs-search-activity/verdocs-search-activity.js +30 -6
- package/dist/collection/components/elements/verdocs-search-box/verdocs-search-box.js +26 -0
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.css +1 -4
- package/dist/collection/components/embeds/verdocs-auth/verdocs-auth.js +35 -17
- package/dist/collection/components/embeds/verdocs-search/verdocs-search.js +36 -6
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.css +27 -26
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.js +40 -23
- package/dist/collection/components/embeds/verdocs-sign/verdocs-sign.stories.js +2 -2
- package/dist/collection/components/embeds/verdocs-view/verdocs-view.js +26 -0
- package/dist/components/VerdocsEndpoint.js +4766 -0
- package/dist/components/verdocs-auth.js +33 -18
- package/dist/components/verdocs-kba-dialog.js +1 -1
- package/dist/components/verdocs-ok-dialog2.js +1 -1
- package/dist/components/verdocs-quick-functions.js +8 -1
- package/dist/components/verdocs-search-activity2.js +37 -34
- package/dist/components/verdocs-search-box2.js +6 -0
- package/dist/components/verdocs-search.js +9 -2
- package/dist/components/verdocs-sign.js +27 -162
- package/dist/components/verdocs-view2.js +6 -1
- package/dist/custom-elements.json +830 -0
- package/dist/docs.json +117 -3
- package/dist/esm/VerdocsEndpoint-30e1b6ec.js +4766 -0
- package/dist/esm/loader.js +1 -1
- package/dist/esm/verdocs-auth.entry.js +32 -19
- package/dist/esm/verdocs-dropdown_12.entry.js +5 -1
- package/dist/esm/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm/verdocs-quick-functions.entry.js +5 -0
- package/dist/esm/verdocs-search-activity_2.entry.js +40 -35
- package/dist/esm/verdocs-search.entry.js +6 -1
- package/dist/esm/verdocs-sign.entry.js +26 -161
- package/dist/esm/verdocs-web-sdk.js +1 -1
- package/dist/esm-es5/VerdocsEndpoint-30e1b6ec.js +7 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/verdocs-auth.entry.js +1 -1
- package/dist/esm-es5/verdocs-dropdown_12.entry.js +2 -2
- package/dist/esm-es5/verdocs-kba-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-ok-dialog.entry.js +1 -1
- package/dist/esm-es5/verdocs-quick-functions.entry.js +1 -1
- package/dist/esm-es5/verdocs-search-activity_2.entry.js +1 -1
- 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-web-sdk.js +1 -1
- package/dist/types/components/elements/verdocs-quick-functions/verdocs-quick-functions.d.ts +5 -0
- package/dist/types/components/elements/verdocs-search-activity/verdocs-search-activity.d.ts +5 -0
- package/dist/types/components/elements/verdocs-search-box/verdocs-search-box.d.ts +5 -0
- package/dist/types/components/embeds/verdocs-auth/verdocs-auth.d.ts +7 -4
- package/dist/types/components/embeds/verdocs-search/verdocs-search.d.ts +5 -0
- package/dist/types/components/embeds/verdocs-sign/verdocs-sign.d.ts +6 -3
- package/dist/types/components/embeds/verdocs-view/verdocs-view.d.ts +5 -0
- package/dist/types/components.d.ts +57 -0
- package/dist/verdocs-web-sdk/{p-ed5baeb4.entry.js → p-064453c3.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-06f38046.js +1 -0
- package/dist/verdocs-web-sdk/p-16d62a51.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1b4e04b7.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-1ea3b9d3.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-30cc8818.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-0353c423.entry.js → p-32ad1014.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-4d80d044.system.js +7 -0
- package/dist/verdocs-web-sdk/{p-432c3151.system.entry.js → p-81fc0196.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-8276345a.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-88a300c5.system.js +1 -1
- package/dist/verdocs-web-sdk/p-9139a76d.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-a87069d5.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-aa9fc574.entry.js +1 -0
- package/dist/verdocs-web-sdk/p-c29c2cf8.entry.js +1 -0
- package/dist/verdocs-web-sdk/{p-4368df79.system.entry.js → p-c4d03ff9.system.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-a1143ddb.entry.js → p-d522de7d.entry.js} +2 -2
- package/dist/verdocs-web-sdk/{p-e2e643c5.system.entry.js → p-e4ba14dc.system.entry.js} +1 -1
- package/dist/verdocs-web-sdk/p-f6a53928.system.entry.js +1 -0
- package/dist/verdocs-web-sdk/verdocs-web-sdk.esm.js +1 -1
- package/package.json +2 -2
- package/dist/cjs/Auth-4ec35ac7.js +0 -97
- package/dist/cjs/Token-ac80819a.js +0 -2331
- package/dist/cjs/buffer-es6-bc8199b1.js +0 -2018
- package/dist/components/Auth.js +0 -92
- package/dist/components/Token.js +0 -2325
- package/dist/components/buffer-es6.js +0 -2010
- package/dist/esm/Auth-15cd42a8.js +0 -92
- package/dist/esm/Token-ce37bd9d.js +0 -2325
- package/dist/esm/buffer-es6-136673c8.js +0 -2010
- package/dist/esm-es5/Auth-15cd42a8.js +0 -1
- package/dist/esm-es5/Token-ce37bd9d.js +0 -1
- package/dist/esm-es5/buffer-es6-136673c8.js +0 -7
- package/dist/verdocs-web-sdk/p-0c0b4a10.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2b57857d.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-2c161242.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-39633a02.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-5dfd73f9.system.js +0 -7
- package/dist/verdocs-web-sdk/p-69ef22bd.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-737b2e99.js +0 -1
- package/dist/verdocs-web-sdk/p-8730dc92.system.js +0 -1
- package/dist/verdocs-web-sdk/p-a7cfe6fc.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-b9164c4b.system.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-cec13589.system.js +0 -1
- package/dist/verdocs-web-sdk/p-e6e2894e.js +0 -1
- package/dist/verdocs-web-sdk/p-ea6d6dc7.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-ef932a87.js +0 -1
- package/dist/verdocs-web-sdk/p-f0e6fde0.entry.js +0 -1
- package/dist/verdocs-web-sdk/p-fd853e54.system.entry.js +0 -1
|
@@ -1,19 +1,37 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
3
|
-
import { V as VerdocsEndpoint, s as setActiveEndpoint } from './Token.js';
|
|
2
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
|
4
3
|
import { d as defineCustomElement$4 } from './verdocs-button2.js';
|
|
5
4
|
import { d as defineCustomElement$3 } from './verdocs-ok-dialog2.js';
|
|
6
5
|
import { d as defineCustomElement$2 } from './verdocs-text-input2.js';
|
|
7
6
|
|
|
8
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Authenticate to Verdocs via user/password authentication
|
|
9
|
+
*
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import {Auth} from '@verdocs/js-sdk/Auth';
|
|
12
|
+
* import {Transport} from '@verdocs/js-sdk/HTTP';
|
|
13
|
+
*
|
|
14
|
+
* const {accessToken} = await Auth.authenticateUser({ username: 'test@test.com', password: 'PASSWORD' });
|
|
15
|
+
* Transport.setAuthToken(accessToken);
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
var authenticateUser = function (endpoint, params) {
|
|
19
|
+
return endpoint.api //
|
|
20
|
+
.post('/authentication/login', params)
|
|
21
|
+
.then(function (r) { return r.data; });
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
const verdocsAuthCss = "verdocs-auth{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif;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:#ffffff;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;-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}";
|
|
9
25
|
|
|
10
|
-
const BASE_URL = 'https://stage-api.verdocs.com/';
|
|
11
|
-
const SOURCE = 'verdocs-stage';
|
|
12
26
|
const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
13
27
|
constructor() {
|
|
14
28
|
super();
|
|
15
29
|
this.__registerHost();
|
|
16
30
|
this.authenticated = createEvent(this, "authenticated", 7);
|
|
31
|
+
/**
|
|
32
|
+
* The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
|
|
33
|
+
*/
|
|
34
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
|
17
35
|
/**
|
|
18
36
|
* Normally, if the user has a valid session, this embed will be invisible, otherwise it will display
|
|
19
37
|
* login / signup forms. If this is set to false, this embed will be invisible in both cases. Apps may
|
|
@@ -40,16 +58,12 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
40
58
|
this.activeSession = null;
|
|
41
59
|
this.loginError = null;
|
|
42
60
|
}
|
|
43
|
-
componentWillLoad() {
|
|
44
|
-
const staging = new VerdocsEndpoint().setBaseURL(BASE_URL);
|
|
45
|
-
setActiveEndpoint(staging);
|
|
46
|
-
}
|
|
47
61
|
componentDidLoad() {
|
|
48
|
-
|
|
49
|
-
if (session !== null) {
|
|
62
|
+
this.endpoint.loadSession();
|
|
63
|
+
if (this.endpoint.session !== null) {
|
|
50
64
|
this.isAuthenticated = true;
|
|
51
|
-
this.activeSession = session;
|
|
52
|
-
this.authenticated.emit({ authenticated: true, session });
|
|
65
|
+
this.activeSession = this.endpoint.session;
|
|
66
|
+
this.authenticated.emit({ authenticated: true, session: this.endpoint.session });
|
|
53
67
|
}
|
|
54
68
|
else {
|
|
55
69
|
this.authenticated.emit({ authenticated: false, session: null });
|
|
@@ -61,13 +75,13 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
61
75
|
// }
|
|
62
76
|
handleLogin() {
|
|
63
77
|
this.loggingIn = true;
|
|
64
|
-
authenticateUser({ username: this.username, password: this.password })
|
|
78
|
+
authenticateUser(this.endpoint, { username: this.username, password: this.password })
|
|
65
79
|
.then(r => {
|
|
66
80
|
this.loggingIn = false;
|
|
67
|
-
|
|
68
|
-
this.activeSession = session;
|
|
81
|
+
this.endpoint.setToken(r.accessToken);
|
|
82
|
+
this.activeSession = this.endpoint.session;
|
|
69
83
|
this.isAuthenticated = true;
|
|
70
|
-
this.authenticated.emit({ authenticated: true, session });
|
|
84
|
+
this.authenticated.emit({ authenticated: true, session: this.endpoint.session });
|
|
71
85
|
})
|
|
72
86
|
.catch(e => {
|
|
73
87
|
var _a;
|
|
@@ -81,7 +95,7 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
81
95
|
});
|
|
82
96
|
}
|
|
83
97
|
handleLogout() {
|
|
84
|
-
|
|
98
|
+
this.endpoint.clearSession();
|
|
85
99
|
this.isAuthenticated = false;
|
|
86
100
|
this.authenticated.emit({ authenticated: false, session: null });
|
|
87
101
|
}
|
|
@@ -105,6 +119,7 @@ const VerdocsAuth$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement
|
|
|
105
119
|
}
|
|
106
120
|
static get style() { return verdocsAuthCss; }
|
|
107
121
|
}, [0, "verdocs-auth", {
|
|
122
|
+
"endpoint": [16],
|
|
108
123
|
"visible": [4],
|
|
109
124
|
"logo": [1],
|
|
110
125
|
"debug": [4],
|
|
@@ -7,7 +7,7 @@ const Question = `<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xm
|
|
|
7
7
|
</svg>
|
|
8
8
|
`;
|
|
9
9
|
|
|
10
|
-
const verdocsKbaDialogCss = "verdocs-kba-dialog{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:14px 0;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border
|
|
10
|
+
const verdocsKbaDialogCss = "verdocs-kba-dialog{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog div{-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-kba-dialog .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-kba-dialog .dialog{width:440px;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;background:#fff;padding:16px;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-kba-dialog .heading{display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;font-size:20px;font-weight:500}verdocs-kba-dialog .step{margin-left:6px;color:#666}verdocs-kba-dialog .help-box{background-color:#707ae5;display:-ms-flexbox;display:flex;-ms-flex-direction:row;flex-direction:row;margin:14px 0;padding:14px;-ms-flex-align:center;align-items:center;color:white}verdocs-kba-dialog .help-details{display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;margin-left:15px;font-size:14px}verdocs-kba-dialog .help-icon{width:40px;height:40px}verdocs-kba-dialog .help-title{font-weight:600;margin-bottom:4px}verdocs-kba-dialog .help-text{font-weight:400}verdocs-kba-dialog .choices{display:grid;gap:15px;grid-template-columns:repeat(auto-fill, minmax(100px, 1fr));margin:0 0 15px 0}verdocs-kba-dialog .choice{border:1px solid #707ae5;border-radius:5px;display:-ms-flexbox;display:flex;height:60px;-ms-flex-pack:center;justify-content:center;-ms-flex-align:center;align-items:center;text-align:center;color:#5c6575;cursor:pointer}verdocs-kba-dialog .choice.selected{background-color:#707ae5;color:#ffffff}verdocs-kba-dialog .buttons{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-direction:row;flex-direction:row;-ms-flex-pack:end;justify-content:flex-end}verdocs-kba-dialog .buttons verdocs-button{margin-left:16px}";
|
|
11
11
|
|
|
12
12
|
const VerdocsKbaDialog$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
13
13
|
constructor() {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h, Host } from '@stencil/core/internal/client';
|
|
2
2
|
import { d as defineCustomElement$1 } from './verdocs-button2.js';
|
|
3
3
|
|
|
4
|
-
const verdocsOkDialogCss = "verdocs-ok-dialog{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-ok-dialog .dialog{max-width:50%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;background:#444444;padding:8px 16px;color:#ffffff}verdocs-ok-dialog .content{font-size:
|
|
4
|
+
const verdocsOkDialogCss = "verdocs-ok-dialog{font-family:\"Barlow\", sans-serif;-webkit-box-sizing:border-box;box-sizing:border-box}verdocs-ok-dialog .background-overlay{position:absolute;z-index:10000;top:0;left:0;right:0;bottom:0;display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;background:#0000007f}verdocs-ok-dialog .dialog{max-width:50%;display:-ms-flexbox;display:flex;-ms-flex-direction:column;flex-direction:column;border-radius:4px;overflow:hidden;-webkit-box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4);box-shadow:3px 3px 5px 1px rgba(40, 40, 40, 0.4)}verdocs-ok-dialog .heading{display:-ms-flexbox;display:flex;font-size:16px;-ms-flex-direction:row;flex-direction:row;background:#444444;padding:8px 16px;color:#ffffff}verdocs-ok-dialog .content{font-size:16px;background:#ffffff;padding:20px}verdocs-ok-dialog .buttons{display:-ms-flexbox;display:flex;margin:20px 0 0 0;-ms-flex-direction:row;flex-direction:row;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}verdocs-ok-dialog .buttons verdocs-button{margin-left:16px}";
|
|
5
5
|
|
|
6
6
|
const VerdocsOkDialog = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
7
7
|
constructor() {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
|
2
3
|
|
|
3
4
|
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>`;
|
|
4
5
|
|
|
@@ -12,6 +13,10 @@ const VerdocsQuickFunctions$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
12
13
|
this.__registerHost();
|
|
13
14
|
this.createTemplate = createEvent(this, "createTemplate", 7);
|
|
14
15
|
this.createDocument = createEvent(this, "createDocument", 7);
|
|
16
|
+
/**
|
|
17
|
+
* The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
|
|
18
|
+
*/
|
|
19
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
|
15
20
|
}
|
|
16
21
|
handleCreateTemplate() {
|
|
17
22
|
this.createTemplate.emit();
|
|
@@ -23,7 +28,9 @@ const VerdocsQuickFunctions$1 = /*@__PURE__*/ proxyCustomElement(class extends H
|
|
|
23
28
|
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 }, "Document")));
|
|
24
29
|
}
|
|
25
30
|
static get style() { return verdocsQuickFunctionsCss; }
|
|
26
|
-
}, [0, "verdocs-quick-functions"
|
|
31
|
+
}, [0, "verdocs-quick-functions", {
|
|
32
|
+
"endpoint": [16]
|
|
33
|
+
}]);
|
|
27
34
|
function defineCustomElement$1() {
|
|
28
35
|
if (typeof customElements === "undefined") {
|
|
29
36
|
return;
|
|
@@ -1,6 +1,29 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A Template defines how a Verdocs signing flow will be performed, including attachments, signing fields, and
|
|
6
|
+
* recipients.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* Get all templates accessible by the caller, with optional filters.
|
|
12
|
+
*
|
|
13
|
+
* ```typescript
|
|
14
|
+
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
15
|
+
*
|
|
16
|
+
* await Templates.getTemplates();
|
|
17
|
+
* await Templates.getTemplates({ is_starred: true });
|
|
18
|
+
* await Templates.getTemplates({ is_creator: true });
|
|
19
|
+
* await Templates.getTemplates({ is_organization: true });
|
|
20
|
+
* ```
|
|
21
|
+
*/
|
|
22
|
+
var getTemplates = function (endpoint, params) {
|
|
23
|
+
return endpoint.api //
|
|
24
|
+
.get('/templates/', { params: params })
|
|
25
|
+
.then(function (r) { return r.data; });
|
|
26
|
+
};
|
|
4
27
|
|
|
5
28
|
/**
|
|
6
29
|
* Verdocs provides a range of search functions to help find and retrieve content. This module provides generic functions intended
|
|
@@ -55,48 +78,27 @@ var __generator = (undefined && undefined.__generator) || function (thisArg, bod
|
|
|
55
78
|
* const {recent, saved} = await Content.getSearchHistory();
|
|
56
79
|
* ```
|
|
57
80
|
*/
|
|
58
|
-
var getSearchHistory = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
81
|
+
var getSearchHistory = function (endpoint) { return __awaiter(void 0, void 0, void 0, function () {
|
|
59
82
|
return __generator(this, function (_a) {
|
|
60
|
-
return [2 /*return*/,
|
|
61
|
-
.
|
|
83
|
+
return [2 /*return*/, endpoint.api //
|
|
84
|
+
.get('/search/history')
|
|
62
85
|
.then(function (r) { return r.data; })];
|
|
63
86
|
});
|
|
64
87
|
}); };
|
|
65
88
|
|
|
66
|
-
/**
|
|
67
|
-
* A Template defines how a Verdocs signing flow will be performed, including attachments, signing fields, and
|
|
68
|
-
* recipients.
|
|
69
|
-
*
|
|
70
|
-
* @module
|
|
71
|
-
*/
|
|
72
|
-
/**
|
|
73
|
-
* Get all templates accessible by the caller, with optional filters.
|
|
74
|
-
*
|
|
75
|
-
* ```typescript
|
|
76
|
-
* import {Templates} from '@verdocs/js-sdk/Templates';
|
|
77
|
-
*
|
|
78
|
-
* await Templates.getTemplates();
|
|
79
|
-
* await Templates.getTemplates({ is_starred: true });
|
|
80
|
-
* await Templates.getTemplates({ is_creator: true });
|
|
81
|
-
* await Templates.getTemplates({ is_organization: true });
|
|
82
|
-
* ```
|
|
83
|
-
*/
|
|
84
|
-
var getTemplates = function (params) {
|
|
85
|
-
return getEndpoint()
|
|
86
|
-
.api.get('/templates/', { params: params })
|
|
87
|
-
.then(function (r) { return r.data; });
|
|
88
|
-
};
|
|
89
|
-
|
|
90
89
|
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>`;
|
|
91
90
|
|
|
92
91
|
const verdocsSearchActivityCss = "verdocs-search-activity{font-family:\"Inter\", -apple-system, \"Segoe UI\", \"Roboto\", \"Helvetica Neue\", sans-serif}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}";
|
|
93
92
|
|
|
94
|
-
const SOURCE = 'verdocs-stage';
|
|
95
93
|
const VerdocsSearchActivity = /*@__PURE__*/ proxyCustomElement(class extends HTMLElement {
|
|
96
94
|
constructor() {
|
|
97
95
|
super();
|
|
98
96
|
this.__registerHost();
|
|
99
97
|
this.entrySelected = createEvent(this, "entrySelected", 7);
|
|
98
|
+
/**
|
|
99
|
+
* The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
|
|
100
|
+
*/
|
|
101
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
|
100
102
|
this.type = 'recent';
|
|
101
103
|
this.emptyMessage = 'You do not have any starred searches.';
|
|
102
104
|
this.authFailure = false;
|
|
@@ -106,7 +108,7 @@ const VerdocsSearchActivity = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
106
108
|
this.starred = [];
|
|
107
109
|
}
|
|
108
110
|
componentWillLoad() {
|
|
109
|
-
loadSession(
|
|
111
|
+
this.endpoint.loadSession();
|
|
110
112
|
const errorHandler = e => {
|
|
111
113
|
var _a;
|
|
112
114
|
console.warn('[Verdocs/search-activity] Error getting search data', e);
|
|
@@ -118,21 +120,21 @@ const VerdocsSearchActivity = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
118
120
|
case 'recent':
|
|
119
121
|
this.title = 'Recent Searches';
|
|
120
122
|
this.emptyMessage = 'You do not have any recent searches.';
|
|
121
|
-
getSearchHistory()
|
|
123
|
+
getSearchHistory(this.endpoint)
|
|
122
124
|
.then(r => (this.recent = r.recent))
|
|
123
125
|
.catch(errorHandler);
|
|
124
126
|
break;
|
|
125
127
|
case 'saved':
|
|
126
128
|
this.title = 'Saved Searches';
|
|
127
129
|
this.emptyMessage = 'You do not have any saved searches.';
|
|
128
|
-
getSearchHistory()
|
|
130
|
+
getSearchHistory(this.endpoint)
|
|
129
131
|
.then(r => (this.saved = r.saved))
|
|
130
132
|
.catch(errorHandler);
|
|
131
133
|
break;
|
|
132
134
|
case 'starred':
|
|
133
135
|
this.title = 'My Starred items';
|
|
134
136
|
this.emptyMessage = 'You do not have any starred templates.';
|
|
135
|
-
getTemplates({ is_starred: true })
|
|
137
|
+
getTemplates(this.endpoint, { is_starred: true })
|
|
136
138
|
.then(r => (this.starred = r))
|
|
137
139
|
.catch(errorHandler);
|
|
138
140
|
break;
|
|
@@ -166,6 +168,7 @@ const VerdocsSearchActivity = /*@__PURE__*/ proxyCustomElement(class extends HTM
|
|
|
166
168
|
}
|
|
167
169
|
static get style() { return verdocsSearchActivityCss; }
|
|
168
170
|
}, [0, "verdocs-search-activity", {
|
|
171
|
+
"endpoint": [16],
|
|
169
172
|
"type": [1],
|
|
170
173
|
"options": [8],
|
|
171
174
|
"emptyMessage": [32],
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, createEvent, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
|
2
3
|
|
|
3
4
|
const SearchIcon = `<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
4
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"/>
|
|
@@ -19,6 +20,10 @@ const VerdocsSearchBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
19
20
|
this.searchClicked = createEvent(this, "searchClicked", 7);
|
|
20
21
|
this.typeChanged = createEvent(this, "typeChanged", 7);
|
|
21
22
|
this.queryChanged = createEvent(this, "queryChanged", 7);
|
|
23
|
+
/**
|
|
24
|
+
* The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
|
|
25
|
+
*/
|
|
26
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
|
22
27
|
/**
|
|
23
28
|
* The placeholder to display in the input field.
|
|
24
29
|
*/
|
|
@@ -53,6 +58,7 @@ const VerdocsSearchBox = /*@__PURE__*/ proxyCustomElement(class extends HTMLElem
|
|
|
53
58
|
}
|
|
54
59
|
static get style() { return verdocsSearchBoxCss; }
|
|
55
60
|
}, [0, "verdocs-search-box", {
|
|
61
|
+
"endpoint": [16],
|
|
56
62
|
"placeholder": [1],
|
|
57
63
|
"type": [1],
|
|
58
64
|
"query": [1]
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { proxyCustomElement, HTMLElement, h } from '@stencil/core/internal/client';
|
|
2
|
+
import { V as VerdocsEndpoint } from './VerdocsEndpoint.js';
|
|
2
3
|
import { d as defineCustomElement$3 } from './verdocs-search-activity2.js';
|
|
3
4
|
import { d as defineCustomElement$2 } from './verdocs-search-box2.js';
|
|
4
5
|
|
|
@@ -8,12 +9,18 @@ const VerdocsSearch$1 = /*@__PURE__*/ proxyCustomElement(class extends HTMLEleme
|
|
|
8
9
|
constructor() {
|
|
9
10
|
super();
|
|
10
11
|
this.__registerHost();
|
|
12
|
+
/**
|
|
13
|
+
* The endpoint to use to communicate with Verdocs. If not set, the default endpoint will be used.
|
|
14
|
+
*/
|
|
15
|
+
this.endpoint = VerdocsEndpoint.getDefault();
|
|
11
16
|
}
|
|
12
17
|
render() {
|
|
13
|
-
return (h("div", { class: "container" }, h("verdocs-search-box",
|
|
18
|
+
return (h("div", { class: "container" }, h("verdocs-search-box", { endpoint: this.endpoint }), h("div", { class: "boxes" }, h("verdocs-search-activity", { type: "recent", endpoint: this.endpoint }), h("verdocs-search-activity", { type: "saved", endpoint: this.endpoint }), h("verdocs-search-activity", { type: "starred", endpoint: this.endpoint }), h("search-quick-functions", { endpoint: this.endpoint }))));
|
|
14
19
|
}
|
|
15
20
|
static get style() { return verdocsSearchCss; }
|
|
16
|
-
}, [0, "verdocs-search"
|
|
21
|
+
}, [0, "verdocs-search", {
|
|
22
|
+
"endpoint": [16]
|
|
23
|
+
}]);
|
|
17
24
|
function defineCustomElement$1() {
|
|
18
25
|
if (typeof customElements === "undefined") {
|
|
19
26
|
return;
|