@wexio/messenger-widget-vue 1.8.3 → 1.9.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 +1 -0
- package/dist/index.js +12 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -160,6 +160,7 @@ const user: VisitorIdentity = {
|
|
|
160
160
|
| `default-open` | `boolean` | Open the panel on mount (uncontrolled afterwards). |
|
|
161
161
|
| `open` | `boolean` | Controlled open state; keep it in sync from the `open` / `close` events. Leave unset for uncontrolled. |
|
|
162
162
|
| `preview-tab` | `PreviewTabSignal` | Navigate to a tab (`{ tab, nonce, article? }`) without a remount; opens the panel. A new `nonce` re-issues the request. |
|
|
163
|
+
| `booking-services` | `string[]` | Host narrowing of the booking services: only these service ids are offered (it only narrows; the allow-list stays server-side). |
|
|
163
164
|
|
|
164
165
|
## Events
|
|
165
166
|
|
package/dist/index.js
CHANGED
|
@@ -87,6 +87,8 @@ export const WexioWidget = defineComponent({
|
|
|
87
87
|
/** Navigate to a tab / article without a remount (and open the panel):
|
|
88
88
|
* `{ tab, nonce, article? }`. A new `nonce` re-issues the request. */
|
|
89
89
|
previewTab: { type: Object, default: undefined },
|
|
90
|
+
/** Host narrowing of the booking services (`booking.services`): only these service ids are offered. */
|
|
91
|
+
bookingServices: { type: Array, default: undefined },
|
|
90
92
|
},
|
|
91
93
|
emits: {
|
|
92
94
|
resize: (payload) =>
|
|
@@ -114,6 +116,8 @@ export const WexioWidget = defineComponent({
|
|
|
114
116
|
el.addEventListener("wexio:close", onClose);
|
|
115
117
|
// `previewTab` is an object, so it goes through the element's JS property.
|
|
116
118
|
if (props.previewTab) el.previewTab = props.previewTab;
|
|
119
|
+
// An array, so it too goes through the element's JS property.
|
|
120
|
+
if (props.bookingServices) el.bookingServices = props.bookingServices;
|
|
117
121
|
if (props.user) el.identify?.(props.user);
|
|
118
122
|
});
|
|
119
123
|
|
|
@@ -133,6 +137,14 @@ export const WexioWidget = defineComponent({
|
|
|
133
137
|
},
|
|
134
138
|
);
|
|
135
139
|
|
|
140
|
+
watch(
|
|
141
|
+
() => props.bookingServices,
|
|
142
|
+
(next) => {
|
|
143
|
+
const el = elRef.value;
|
|
144
|
+
if (el) el.bookingServices = next;
|
|
145
|
+
},
|
|
146
|
+
);
|
|
147
|
+
|
|
136
148
|
// Identity is set imperatively rather than as a reactive attribute —
|
|
137
149
|
// mirrors the React component's `user` prop semantics. `null` /
|
|
138
150
|
// `undefined` logs the visitor out.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wexio/messenger-widget-vue",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.9.0",
|
|
4
4
|
"description": "Vue 3 component embed for the Wexio web messenger. Thin reactive wrapper around the <wexio-widget> web component — same WidgetShell runtime, same Shadow-DOM isolation.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"private": false,
|