@8wave/ai-elements 0.123.0 → 0.124.0-beta.2
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 +4 -0
- package/dist/ai-elements.es.js +2592 -2474
- package/dist/ai-elements.es.js.map +1 -1
- package/dist-vue/PkChatbot.js +1 -1
- package/dist-vue/PkChatbotMessages.js +1 -1
- package/dist-vue/PkChatbotViewChat.js +1 -1
- package/dist-vue/PkChatbotViewConversations.js +1 -1
- package/dist-vue/PkChatbotViewFiles.js +1 -1
- package/dist-vue/PkChatbotViewProfile.js +1 -1
- package/dist-vue/_chunks/{PkChatbot-MEYD0XUR.js → PkChatbot-C7--w-xA.js} +20 -11
- package/dist-vue/_chunks/PkChatbot-C7--w-xA.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotMessages-BcHNPZUB.js → PkChatbotMessages-pWNZCmM2.js} +322 -282
- package/dist-vue/_chunks/PkChatbotMessages-pWNZCmM2.js.map +1 -0
- package/dist-vue/_chunks/{PkChatbotViewChat-CfpGWukX.js → PkChatbotViewChat-mWZvsKLA.js} +3 -3
- package/dist-vue/_chunks/{PkChatbotViewChat-CfpGWukX.js.map → PkChatbotViewChat-mWZvsKLA.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewConversations-JCrQIoGf.js → PkChatbotViewConversations-CIv5g2xZ.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewConversations-JCrQIoGf.js.map → PkChatbotViewConversations-CIv5g2xZ.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewFiles-B1mncBOo.js → PkChatbotViewFiles-DjYF-UoB.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewFiles-B1mncBOo.js.map → PkChatbotViewFiles-DjYF-UoB.js.map} +1 -1
- package/dist-vue/_chunks/{PkChatbotViewProfile--TWIrhYk.js → PkChatbotViewProfile-D3d-hG14.js} +2 -2
- package/dist-vue/_chunks/{PkChatbotViewProfile--TWIrhYk.js.map → PkChatbotViewProfile-D3d-hG14.js.map} +1 -1
- package/dist-vue/_chunks/{useChatbotStore--6ws3cew.js → useChatbotStore--PcS9kGN.js} +2 -1
- package/dist-vue/_chunks/useChatbotStore--PcS9kGN.js.map +1 -0
- package/dist-vue/apps/web-component/src/components/EmbeddedChatWidget.ce.d.ts +11 -4
- package/dist-vue/apps/web-component/src/lib.d.ts +3 -0
- package/dist-vue/apps/web-component/src/pageTools/snapshot.d.ts +18 -9
- package/dist-vue/composables.js +15 -5
- package/dist-vue/composables.js.map +1 -1
- package/dist-vue/index.js +6 -6
- package/dist-vue/locales.js +12 -2
- package/dist-vue/packages/components/src/chat/PkChatbot.d.ts +11 -7
- package/dist-vue/packages/components/src/chat/PkChatbotMessages.d.ts +5 -0
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmCard.d.ts +12 -3
- package/dist-vue/packages/components/src/chat/PkHostCallConfirmDialog.d.ts +5 -0
- package/dist-vue/packages/composable/src/chatbot/hostTools.d.ts +11 -1
- package/dist-vue/packages/composable/src/chatbot/useChatbotStore.d.ts +3 -0
- package/dist-vue/style.css +1 -1
- package/package.json +1 -1
- package/dist-vue/_chunks/PkChatbot-MEYD0XUR.js.map +0 -1
- package/dist-vue/_chunks/PkChatbotMessages-BcHNPZUB.js.map +0 -1
- package/dist-vue/_chunks/useChatbotStore--6ws3cew.js.map +0 -1
|
@@ -38,14 +38,20 @@ type __VLS_Props = {
|
|
|
38
38
|
* Boolean or attribute string ("true"/"false").
|
|
39
39
|
*/
|
|
40
40
|
followPageDialogs?: boolean | string;
|
|
41
|
+
/**
|
|
42
|
+
* The chat's menu offers "Close", which dispatches
|
|
43
|
+
* `close-requested`: the host closes the panel it opened.
|
|
44
|
+
* Boolean or attribute string ("true"/"false").
|
|
45
|
+
*/
|
|
46
|
+
closable?: boolean | string;
|
|
41
47
|
};
|
|
42
|
-
declare var
|
|
48
|
+
declare var __VLS_92: {}, __VLS_95: {}, __VLS_113: string, __VLS_114: {};
|
|
43
49
|
type __VLS_Slots = {} & {
|
|
44
|
-
[K in NonNullable<typeof
|
|
50
|
+
[K in NonNullable<typeof __VLS_113>]?: (props: typeof __VLS_114) => any;
|
|
45
51
|
} & {
|
|
46
|
-
'header-actions'?: (props: typeof
|
|
52
|
+
'header-actions'?: (props: typeof __VLS_92) => any;
|
|
47
53
|
} & {
|
|
48
|
-
actions?: (props: typeof
|
|
54
|
+
actions?: (props: typeof __VLS_95) => any;
|
|
49
55
|
};
|
|
50
56
|
declare const __VLS_base: DefineComponent<__VLS_Props, {
|
|
51
57
|
sendMessage(text: string): void;
|
|
@@ -65,6 +71,7 @@ declare const __VLS_base: DefineComponent<__VLS_Props, {
|
|
|
65
71
|
customCss: string;
|
|
66
72
|
baseUrl: string;
|
|
67
73
|
systemTheme: "light" | "dark";
|
|
74
|
+
closable: boolean | string;
|
|
68
75
|
externalToken: string;
|
|
69
76
|
awaitExternalToken: boolean | string;
|
|
70
77
|
useHostSession: boolean | string;
|
|
@@ -29,6 +29,7 @@ export declare const EmbeddedChatWidgetCe: VueElementConstructor<{
|
|
|
29
29
|
systemTheme?: "light" | "dark";
|
|
30
30
|
theme?: "light" | "dark";
|
|
31
31
|
followPageDialogs?: boolean | string;
|
|
32
|
+
closable?: boolean | string;
|
|
32
33
|
}>;
|
|
33
34
|
declare module 'vue' {
|
|
34
35
|
interface GlobalComponents {
|
|
@@ -119,6 +120,8 @@ export interface EmbeddedChatWidgetElement extends HTMLElement {
|
|
|
119
120
|
theme?: 'light' | 'dark';
|
|
120
121
|
/** While the page has a modal dialog open, the chat moves into it and stays usable (spec `page-tools-improvements.md`, M11). */
|
|
121
122
|
followPageDialogs?: boolean;
|
|
123
|
+
/** The chat's menu offers "Close", which dispatches `close-requested`: the host closes the panel. */
|
|
124
|
+
closable?: boolean;
|
|
122
125
|
forwardedSlots?: string;
|
|
123
126
|
customCss?: string;
|
|
124
127
|
sendMessage(text: string): void;
|
|
@@ -88,10 +88,15 @@ export declare const openListOf: (element: Element, rules: PageRules) => Element
|
|
|
88
88
|
export declare function languageNamed(name: string): string | undefined;
|
|
89
89
|
/** One line for an element with a role: `[12] button "Invia" disabled`. */
|
|
90
90
|
export declare function describe(element: Element, ref: number, rules: PageRules): string;
|
|
91
|
-
/**
|
|
91
|
+
/**
|
|
92
|
+
* A field of a form as the user sees it filled in. `before` is there when the
|
|
93
|
+
* value changed since the agent first read it: what it was, empty when the
|
|
94
|
+
* field had none.
|
|
95
|
+
*/
|
|
92
96
|
export type FieldSummary = {
|
|
93
97
|
label: string;
|
|
94
98
|
value: string;
|
|
99
|
+
before?: string;
|
|
95
100
|
};
|
|
96
101
|
/**
|
|
97
102
|
* Each field of a form with its whole value, an empty one included: what a
|
|
@@ -105,26 +110,30 @@ export declare function formValues(form: HTMLFormElement, rules: PageRules, chec
|
|
|
105
110
|
* the user judges, not the exact body of the request, which the site's own
|
|
106
111
|
* handlers may change. Leaves out the excluded and sensitive fields (with
|
|
107
112
|
* their labels, as the snapshot does), the hidden, disabled and empty ones,
|
|
108
|
-
* and the buttons. `checked`
|
|
113
|
+
* and the buttons. `checked` and `unchecked` are the values of a checkbox.
|
|
114
|
+
*
|
|
115
|
+
* `fields` are the changes, each with what it was, in the order of the
|
|
116
|
+
* form; `unchanged` the other fields that send a value, which the card
|
|
117
|
+
* folds: on a page of settings they are most of the form.
|
|
109
118
|
*/
|
|
110
|
-
export declare function formSummary(form: HTMLFormElement, rules: PageRules, { checked, whole, before, }: {
|
|
119
|
+
export declare function formSummary(form: HTMLFormElement, rules: PageRules, { checked, unchecked, whole, before, }: {
|
|
111
120
|
checked: string;
|
|
121
|
+
unchecked?: string;
|
|
112
122
|
/**
|
|
113
123
|
* Every field with its whole value, a list box by the text it shows:
|
|
114
124
|
* what tells whether the form changed while its card waited, the
|
|
115
|
-
* fields
|
|
125
|
+
* folded fields and the ends of long values included.
|
|
116
126
|
*/
|
|
117
127
|
whole?: boolean;
|
|
118
128
|
/**
|
|
119
|
-
* The whole value each field had before (`formValues`):
|
|
120
|
-
* whose value differs
|
|
121
|
-
*
|
|
122
|
-
* before counts as unchanged.
|
|
129
|
+
* The whole value each field had before (`formValues`): a field
|
|
130
|
+
* whose value differs is a change, a long one shown from where it
|
|
131
|
+
* changed. A field with no value before counts as unchanged.
|
|
123
132
|
*/
|
|
124
133
|
before?: Pick<WeakMap<Element, string>, 'get'>;
|
|
125
134
|
}): {
|
|
126
135
|
fields: FieldSummary[];
|
|
127
|
-
|
|
136
|
+
unchanged: FieldSummary[];
|
|
128
137
|
};
|
|
129
138
|
export type SnapshotResult = {
|
|
130
139
|
text: string;
|
package/dist-vue/composables.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { g as e, h as t } from "./_chunks/Agent-D3US-D1x.js";
|
|
2
2
|
import { t as n } from "./_chunks/createChatbotApiClient-CFKeOgEA.js";
|
|
3
|
-
import { n as r } from "./_chunks/useChatbotStore--
|
|
3
|
+
import { n as r } from "./_chunks/useChatbotStore--PcS9kGN.js";
|
|
4
4
|
import { n as i } from "./_chunks/src-nb8MU1sh.js";
|
|
5
5
|
import { N as a, o } from "./_chunks/utils-DmBnucJs.js";
|
|
6
6
|
import { t as s } from "./_chunks/useLocalizedString-Dmn92nix.js";
|
|
@@ -1855,19 +1855,23 @@ var R = {
|
|
|
1855
1855
|
}
|
|
1856
1856
|
},
|
|
1857
1857
|
toolApproval: {
|
|
1858
|
+
afterColumn: "Dopo",
|
|
1858
1859
|
approved: "Approvato: l'azione è stata eseguita.",
|
|
1859
1860
|
assistantDiscardAgent: "L'agente vuole annullare le modifiche non salvate a «{name}», comprese le tue. Consenti?",
|
|
1860
1861
|
assistantLeaveUnsaved: "L'agente vuole aprire un'altra pagina: le modifiche non salvate di questa andranno perse. Consenti?",
|
|
1861
1862
|
assistantSaveAgent: "L'agente vuole salvare le modifiche a «{name}». Consenti?",
|
|
1863
|
+
beforeColumn: "Prima",
|
|
1862
1864
|
cancelled: "Annullato: l'azione non è stata eseguita.",
|
|
1863
1865
|
confirmed: "Confermato: l'agente ha proseguito con l'azione.",
|
|
1864
1866
|
denied: "Rifiutato: l'azione non è stata eseguita.",
|
|
1865
1867
|
expired: "Questa richiesta non è più confermabile: l'azione non è stata eseguita.",
|
|
1866
1868
|
fieldChecked: "sì",
|
|
1869
|
+
fieldColumn: "Campo",
|
|
1870
|
+
fieldUnchecked: "no",
|
|
1867
1871
|
formFill: "L'agente vuole compilare il modulo «{name}». Consenti?",
|
|
1868
1872
|
formSubmit: "L'agente vuole compilare e inviare il modulo «{name}». Consenti?",
|
|
1869
1873
|
hostCall: "L'agente vuole usare «{name}». Consenti?",
|
|
1870
|
-
|
|
1874
|
+
noChanges: "Nessun campo è cambiato da quando l'agente ha letto il modulo.",
|
|
1871
1875
|
pageAnswer: "La pagina chiede: «{question}» L'agente vuole rispondere «{name}». Consenti?",
|
|
1872
1876
|
pageBack: "L'agente vuole tornare alla pagina precedente. Consenti?",
|
|
1873
1877
|
pageClick: "L'agente vuole cliccare «{name}». Consenti?",
|
|
@@ -1882,7 +1886,8 @@ var R = {
|
|
|
1882
1886
|
pagePress: "L'agente vuole premere {key} su «{name}». Consenti?",
|
|
1883
1887
|
pageSubmit: "L'agente vuole inviare il modulo con «{name}». Consenti?",
|
|
1884
1888
|
prompt: "Per continuare serve la tua conferma:",
|
|
1885
|
-
promptNamed: "Per continuare, l'agente vuole usare «{tool}»."
|
|
1889
|
+
promptNamed: "Per continuare, l'agente vuole usare «{tool}».",
|
|
1890
|
+
unchangedFields: "{n} campo invariato | {n} campi invariati"
|
|
1886
1891
|
},
|
|
1887
1892
|
toolGroup: {
|
|
1888
1893
|
channels: "Canali di messaggistica",
|
|
@@ -3937,19 +3942,23 @@ var R = {
|
|
|
3937
3942
|
}
|
|
3938
3943
|
},
|
|
3939
3944
|
toolApproval: {
|
|
3945
|
+
afterColumn: "After",
|
|
3940
3946
|
approved: "Approved: the action was performed.",
|
|
3941
3947
|
assistantDiscardAgent: "The agent wants to discard the unsaved changes to “{name}”, yours included. Allow it?",
|
|
3942
3948
|
assistantLeaveUnsaved: "The agent wants to open another page: the unsaved changes on this one will be lost. Allow it?",
|
|
3943
3949
|
assistantSaveAgent: "The agent wants to save the changes to “{name}”. Allow it?",
|
|
3950
|
+
beforeColumn: "Before",
|
|
3944
3951
|
cancelled: "Cancelled: the action was not performed.",
|
|
3945
3952
|
confirmed: "Confirmed: the agent proceeded with the action.",
|
|
3946
3953
|
denied: "Denied: the action was not performed.",
|
|
3947
3954
|
expired: "This request is no longer answerable: the action was not performed.",
|
|
3948
3955
|
fieldChecked: "yes",
|
|
3956
|
+
fieldColumn: "Field",
|
|
3957
|
+
fieldUnchecked: "no",
|
|
3949
3958
|
formFill: "The agent wants to fill in the form “{name}”. Allow it?",
|
|
3950
3959
|
formSubmit: "The agent wants to fill in and submit the form “{name}”. Allow it?",
|
|
3951
3960
|
hostCall: "The agent wants to use “{name}”. Allow it?",
|
|
3952
|
-
|
|
3961
|
+
noChanges: "No field changed since the agent read the form.",
|
|
3953
3962
|
pageAnswer: "The page asks: “{question}” The agent wants to answer “{name}”. Allow it?",
|
|
3954
3963
|
pageBack: "The agent wants to go back to the previous page. Allow it?",
|
|
3955
3964
|
pageClick: "The agent wants to click “{name}”. Allow it?",
|
|
@@ -3964,7 +3973,8 @@ var R = {
|
|
|
3964
3973
|
pagePress: "The agent wants to press {key} on “{name}”. Allow it?",
|
|
3965
3974
|
pageSubmit: "The agent wants to submit the form with “{name}”. Allow it?",
|
|
3966
3975
|
prompt: "Your confirmation is needed to continue:",
|
|
3967
|
-
promptNamed: "To continue, the agent wants to use “{tool}”."
|
|
3976
|
+
promptNamed: "To continue, the agent wants to use “{tool}”.",
|
|
3977
|
+
unchangedFields: "{n} unchanged field | {n} unchanged fields"
|
|
3968
3978
|
},
|
|
3969
3979
|
toolGroup: {
|
|
3970
3980
|
channels: "Messaging channels",
|