@wetransform/vue 1.5.5 → 1.6.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/README.md +6 -5
- package/dist/index.d.mts +2 -3
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -68,8 +68,8 @@ Emits:
|
|
|
68
68
|
- `close`
|
|
69
69
|
- `destroy`
|
|
70
70
|
- `onReady`
|
|
71
|
-
- `successSubmit` → `(payload: { customerId: string; templateHandle: string; fileUrl: string; signature: string })`
|
|
72
|
-
- `error` → `(payload: { code: string; message: string })`
|
|
71
|
+
- `successSubmit` → `(payload: { customerId: string; templateHandle: string; fileUrl: string; signature: string; userFileName: string })`
|
|
72
|
+
- `error` → `(payload: { code: string; message: string; stack?: string })`
|
|
73
73
|
|
|
74
74
|
## Composable usage
|
|
75
75
|
|
|
@@ -84,7 +84,7 @@ const { open, close, destroy, setLocale, isOpen, weTransformInstance, on } = use
|
|
|
84
84
|
},
|
|
85
85
|
})
|
|
86
86
|
|
|
87
|
-
on('successSubmit', ({ customerId, templateHandle, fileUrl, signature }) => {
|
|
87
|
+
on('successSubmit', ({ customerId, templateHandle, fileUrl, signature, userFileName }) => {
|
|
88
88
|
// Handle post-submit
|
|
89
89
|
})
|
|
90
90
|
|
|
@@ -97,7 +97,7 @@ console.log(isOpen.value)
|
|
|
97
97
|
console.log(weTransformInstance.value)
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
`useWeTransform(config)` accepts a plain config object, a `Ref<WeTransformConfig>`, or a getter `() => WeTransformConfig`.
|
|
100
|
+
`useWeTransform(config)` accepts a plain config object, a `Ref<WeTransformConfig>`, or a getter `() => WeTransformConfig`.
|
|
101
101
|
|
|
102
102
|
`useWeTransform(config)` returns:
|
|
103
103
|
|
|
@@ -121,12 +121,13 @@ And re-exports these symbols from `@wetransform/core`:
|
|
|
121
121
|
- `WeTransformConfig`
|
|
122
122
|
- `WeTransformEventMap`
|
|
123
123
|
- `WeTransformInstance`
|
|
124
|
+
- `WeTransformInitialLocations`
|
|
124
125
|
- `SupportedLocales`
|
|
125
126
|
|
|
126
127
|
## Notes
|
|
127
128
|
|
|
128
129
|
- Wrapper lifecycle behavior forwards to core and does not modify core semantics.
|
|
129
130
|
- Component: `config` is used at instantiation time. For structural config changes, remount with a Vue `:key`.
|
|
130
|
-
- Composable: `config` is
|
|
131
|
+
- Composable: `config` is read at instantiation time. For structural config changes, call `destroy()` and re-invoke `useWeTransform` (or use a Vue `:key` on the parent).
|
|
131
132
|
- The component forces the SDK `mountElement` internally; do not pass `mountElement` in `config`.
|
|
132
133
|
- The `locale` prop (component) and `setLocale` (composable) can be called at any time, including before or while the SDK is open.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { SupportedLocales, SupportedLocales as SupportedLocales$1, WeTransformConfig, WeTransformConfig as WeTransformConfig$1, WeTransformEventMap, WeTransformEventMap as WeTransformEventMap$1, WeTransformInitialLocations, WeTransformInstance, createWeTransform } from "@wetransform/core";
|
|
2
|
-
import * as _$vue from "vue";
|
|
3
2
|
import { ComponentOptionsMixin, DefineComponent, MaybeRefOrGetter } from "vue";
|
|
4
3
|
|
|
5
4
|
//#region src/composables.d.ts
|
|
6
5
|
declare const useWeTransform: (config: MaybeRefOrGetter<WeTransformConfig$1>) => {
|
|
7
|
-
weTransformInstance: Readonly<
|
|
6
|
+
weTransformInstance: Readonly<import("vue").Ref<{
|
|
8
7
|
readonly open: () => Promise<void>;
|
|
9
8
|
readonly close: () => Promise<void>;
|
|
10
9
|
readonly destroy: () => Promise<void>;
|
|
@@ -17,7 +16,7 @@ declare const useWeTransform: (config: MaybeRefOrGetter<WeTransformConfig$1>) =>
|
|
|
17
16
|
readonly setLocale: (locale: SupportedLocales$1) => Promise<void>;
|
|
18
17
|
readonly on: <K extends keyof WeTransformEventMap$1>(event: K, handler: WeTransformEventMap$1[K]) => () => void;
|
|
19
18
|
} | null>>;
|
|
20
|
-
isOpen: Readonly<
|
|
19
|
+
isOpen: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
21
20
|
open: () => Promise<void>;
|
|
22
21
|
close: () => Promise<void>;
|
|
23
22
|
destroy: () => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wetransform/vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"homepage": "https://wetransform.com",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"files": [
|
|
@@ -14,17 +14,17 @@
|
|
|
14
14
|
"access": "public"
|
|
15
15
|
},
|
|
16
16
|
"dependencies": {
|
|
17
|
-
"vue": "^3.5.
|
|
18
|
-
"@wetransform/core": "1.
|
|
17
|
+
"vue": "^3.5.38",
|
|
18
|
+
"@wetransform/core": "1.6.0"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^24.12.0",
|
|
22
22
|
"@vitejs/plugin-vue": "^6.0.7",
|
|
23
|
-
"@vue/test-utils": "^2.4.
|
|
23
|
+
"@vue/test-utils": "^2.4.11",
|
|
24
24
|
"jsdom": "^29.1.1",
|
|
25
25
|
"typescript": "^6.0.3",
|
|
26
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@0.1
|
|
27
|
-
"vite-plus": "
|
|
26
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@0.2.1",
|
|
27
|
+
"vite-plus": "0.2.1"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"build": "VITE_MODE=production vp pack",
|