@verdocs/web-sdk-vue 5.0.21 → 5.0.23
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/README.md +63 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# Verdocs Vue SDK
|
|
2
|
+
|
|
3
|
+
> Library of components and embeds to quickly build Verdocs-enabled apps in Vue.
|
|
4
|
+
|
|
5
|
+
This SDK provides UI controls and components for building rich, Verdocs-enabled document signing experiences for the Web. Components
|
|
6
|
+
are built in [StencilJS](https://stenciljs.com/) for maximum portability between front-end frameworks. This package contains the
|
|
7
|
+
Vue framework components - for React or Angular, please see the parent repository.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
Begin by installing the SDK into your app. Currently Vue >= 3 is supported. Although it is not required,
|
|
12
|
+
it is recommended to install the Verdocs JS SDK as well, as it provides the underlying API access for
|
|
13
|
+
the components in this package.
|
|
14
|
+
|
|
15
|
+
npm i -S @verdocs/web-sdk-vue @verdocs/js-sdk
|
|
16
|
+
|
|
17
|
+
Next, per the instructions at [Vue and Web Components](https://vuejs.org/guide/extras/web-components#example-vite-config), configure the Vue plugin for Vite to support
|
|
18
|
+
custom components by adding the following to your `vite.config.js`:
|
|
19
|
+
|
|
20
|
+
```javascript
|
|
21
|
+
...
|
|
22
|
+
|
|
23
|
+
export default defineConfig({
|
|
24
|
+
plugins: [
|
|
25
|
+
vue({
|
|
26
|
+
// Add this configuration block
|
|
27
|
+
template: {
|
|
28
|
+
compilerOptions: {
|
|
29
|
+
// treat all tags with a dash as custom elements
|
|
30
|
+
isCustomElement: (tag) => tag.includes('-')
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}),
|
|
34
|
+
...
|
|
35
|
+
],
|
|
36
|
+
...
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
````
|
|
40
|
+
|
|
41
|
+
Finally, register the Verdocs Web SDK with Vue by adding the following to your `App.vue`:
|
|
42
|
+
|
|
43
|
+
```javascript
|
|
44
|
+
...
|
|
45
|
+
import {ComponentLibrary, VerdocsAuth} from '@verdocs/web-sdk-vue';
|
|
46
|
+
...
|
|
47
|
+
|
|
48
|
+
if (ComponentLibrary?.install) {
|
|
49
|
+
ComponentLibrary.install();
|
|
50
|
+
}
|
|
51
|
+
````
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
Verdocs Web Components may be used like any other custom component in Vue. The only adjustment to
|
|
56
|
+
keep in mind is that the component name must be in kebab-case, and event handlers must omit the `on`
|
|
57
|
+
prefix, e.g.:
|
|
58
|
+
|
|
59
|
+
```vue
|
|
60
|
+
<verdocs-templates-list
|
|
61
|
+
@viewTemplate="(event) => console.log('Selected', event.detail)"
|
|
62
|
+
/>
|
|
63
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verdocs/web-sdk-vue",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.23",
|
|
4
4
|
"description": "Verdocs Web SDK for React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"rollup": "rollup -c"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"@verdocs/web-sdk": "^5.0.
|
|
21
|
+
"@verdocs/web-sdk": "^5.0.23",
|
|
22
22
|
"@stencil/vue-output-target": "^0.9.2"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|