@wetransform/vue 3.2.0 → 3.4.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 +2 -1
- package/dist/index.d.mts +4 -8
- package/dist/index.mjs +2 -4
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@ const config: WeTransformConfig = {
|
|
|
27
27
|
customerId: 'your_customer_id',
|
|
28
28
|
signature: 'your_signed_token',
|
|
29
29
|
},
|
|
30
|
-
// Optional theming (colors, font, border radius). See @wetransform/core docs.
|
|
30
|
+
// Optional theming (colors, font, border radius, dark mode). See @wetransform/core docs.
|
|
31
31
|
customization: {
|
|
32
32
|
colors: {
|
|
33
33
|
primary: '#7c3aed',
|
|
@@ -143,6 +143,7 @@ And re-exports these symbols from `@wetransform/core`:
|
|
|
143
143
|
|
|
144
144
|
## Notes
|
|
145
145
|
|
|
146
|
+
- `config.agentChat` opens the Agent chat and restarts its conversation from a signed Agent context. See the Agent chat section of the `@wetransform/core` docs for the signature and when the conversation restarts.
|
|
146
147
|
- Requires Vue `>= 3.5`.
|
|
147
148
|
- Relies on `Promise.withResolvers` (ES2024): Chrome/Edge 119+, Firefox 121+, Safari 17.4+. Polyfill it to support older browsers.
|
|
148
149
|
- Wrapper lifecycle behavior forwards to core and does not modify core semantics.
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { SupportedLocales, SupportedLocales as SupportedLocales$1, WeTransformConfig, WeTransformConfig as WeTransformConfig$1, WeTransformEventMap, WeTransformEventMap as WeTransformEventMap$1, WeTransformInitialLocations, WeTransformInstance, WeTransformInstance as WeTransformInstance$1, WeTransformSDKCustomization, createWeTransform } from "@wetransform/core";
|
|
2
2
|
import { MaybeRefOrGetter, PropType } from "vue";
|
|
3
3
|
import { DistributiveOmit } from "@wetransform/core/internal";
|
|
4
|
-
//#region src/composables.d.ts
|
|
5
4
|
/**
|
|
6
5
|
* The config is read (via `toValue`) each time an instance is created — on
|
|
7
6
|
* mount and again on a recreation after destroy() — so a recreation picks up
|
|
@@ -17,8 +16,6 @@ export declare const useWeTransform: (config: MaybeRefOrGetter<WeTransformConfig
|
|
|
17
16
|
on: <K extends keyof WeTransformEventMap$1>(event: K, handler: WeTransformEventMap$1[K]) => (() => void);
|
|
18
17
|
setLocale: (locale: SupportedLocales$1) => Promise<void>;
|
|
19
18
|
};
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/components/WeTransformSdk.d.ts
|
|
22
19
|
type WeTransformComponentConfig = DistributiveOmit<WeTransformConfig$1, 'mountElement' | 'locale'>;
|
|
23
20
|
export declare const WeTransformSdk: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
24
21
|
config: {
|
|
@@ -65,6 +62,10 @@ export declare const WeTransformSdk: import("vue").DefineComponent<import("vue")
|
|
|
65
62
|
required: false;
|
|
66
63
|
};
|
|
67
64
|
}>> & Readonly<{
|
|
65
|
+
onOpen?: (() => any) | undefined;
|
|
66
|
+
onClose?: (() => any) | undefined;
|
|
67
|
+
onDestroy?: (() => any) | undefined;
|
|
68
|
+
onReady?: (() => any) | undefined;
|
|
68
69
|
onSuccessSubmit?: ((_payload: {
|
|
69
70
|
customerId: string;
|
|
70
71
|
templateHandle: string;
|
|
@@ -78,15 +79,10 @@ export declare const WeTransformSdk: import("vue").DefineComponent<import("vue")
|
|
|
78
79
|
stack?: string;
|
|
79
80
|
details?: Record<string, string | number | boolean>;
|
|
80
81
|
}) => any) | undefined;
|
|
81
|
-
onOpen?: (() => any) | undefined;
|
|
82
82
|
"onUpdate:open"?: ((_value: boolean) => any) | undefined;
|
|
83
|
-
onClose?: (() => any) | undefined;
|
|
84
|
-
onDestroy?: (() => any) | undefined;
|
|
85
|
-
onReady?: (() => any) | undefined;
|
|
86
83
|
}>, {
|
|
87
84
|
open: boolean;
|
|
88
85
|
autoOpen: boolean;
|
|
89
86
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
90
87
|
type WeTransformSdkProps = InstanceType<typeof WeTransformSdk>['$props'];
|
|
91
|
-
//#endregion
|
|
92
88
|
export { type SupportedLocales, type WeTransformConfig, type WeTransformEventMap, type WeTransformInitialLocations, type WeTransformInstance, type WeTransformSDKCustomization, type WeTransformSdkProps, createWeTransform };
|
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createWeTransform, createWeTransform as createWeTransform$1 } from "@wetransform/core";
|
|
2
2
|
import { defineComponent, getCurrentInstance, getCurrentScope, h, onMounted, onScopeDispose, onUnmounted, readonly, ref, shallowReadonly, shallowRef, toValue, useId, watch } from "vue";
|
|
3
|
-
|
|
3
|
+
// src/composables.ts
|
|
4
4
|
const noop = () => void 0;
|
|
5
5
|
/**
|
|
6
6
|
* The config is read (via `toValue`) each time an instance is created — on
|
|
@@ -96,8 +96,7 @@ const useWeTransform = (config) => {
|
|
|
96
96
|
setLocale
|
|
97
97
|
};
|
|
98
98
|
};
|
|
99
|
-
|
|
100
|
-
//#region src/components/WeTransformSdk.ts
|
|
99
|
+
// src/components/WeTransformSdk.ts
|
|
101
100
|
const WeTransformSdk = defineComponent({
|
|
102
101
|
name: "WeTransformSdk",
|
|
103
102
|
props: {
|
|
@@ -164,5 +163,4 @@ const WeTransformSdk = defineComponent({
|
|
|
164
163
|
});
|
|
165
164
|
}
|
|
166
165
|
});
|
|
167
|
-
//#endregion
|
|
168
166
|
export { WeTransformSdk, createWeTransform, useWeTransform };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wetransform/vue",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "Vue 3 wrapper for the WeTransform browser SDK.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"AI data importer",
|
|
@@ -29,17 +29,17 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@wetransform/core": "3.
|
|
32
|
+
"@wetransform/core": "3.4.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/node": "^24.19.2",
|
|
36
36
|
"@vitejs/plugin-vue": "^6.0.10",
|
|
37
37
|
"@vue/test-utils": "^2.5.1",
|
|
38
|
-
"jsdom": "^30.1.
|
|
38
|
+
"jsdom": "^30.1.3",
|
|
39
39
|
"typescript": "^6.0.3",
|
|
40
|
-
"vite": "npm:@voidzero-dev/vite-plus-core@1.
|
|
41
|
-
"vite-plus": "1.
|
|
42
|
-
"vue": "^3.5.
|
|
40
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@1.4.0",
|
|
41
|
+
"vite-plus": "1.4.0",
|
|
42
|
+
"vue": "^3.5.44",
|
|
43
43
|
"@wetransform/test-utils": "0.0.0"
|
|
44
44
|
},
|
|
45
45
|
"peerDependencies": {
|