@mobileaction/action-kit 1.57.1 → 1.58.1-beta.20260302124652
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/dist/action-kit.mjs +175 -171
- package/dist/{annotations-DjS6cZ0g.js → annotations-BhvhQ0T6.js} +1 -1
- package/dist/components/chatbot/MaChatbotFeedbackPanel.vue.d.ts +14 -0
- package/dist/components/chatbot/MaChatbotInputArea.vue.d.ts +22 -0
- package/dist/components/chatbot/MaChatbotMessageBubble.vue.d.ts +15 -0
- package/dist/components/chatbot/MaChatbotPromptStarters.vue.d.ts +15 -0
- package/dist/components/chatbot/composables/useFeedback.d.ts +11 -0
- package/dist/components/chatbot/composables/useMaChatbot.d.ts +17 -0
- package/dist/components/chatbot/composables/useMessages.d.ts +43 -0
- package/dist/components/chatbot/constants.d.ts +9 -0
- package/dist/components/chatbot/index.vue.d.ts +70 -0
- package/dist/components/chatbot/plugin.d.ts +23 -0
- package/dist/components/chatbot/stories/default.stories.d.ts +7 -0
- package/dist/components/chatbot/types.d.ts +87 -0
- package/dist/components/chatbot/utils.d.ts +6 -0
- package/dist/components/collapse/components/CollapseItem.vue.d.ts +2 -0
- package/dist/components/collapse/stories/CollapseItem.stories.d.ts +9 -0
- package/dist/components/collapse/stories/default.stories.d.ts +1 -0
- package/dist/components/date-picker-2/index.vue.d.ts +0 -1
- package/dist/components/date-picker-2/stories/default.stories.d.ts +2 -0
- package/dist/components/date-picker-2/types.d.ts +7 -1
- package/dist/components/modal-2/MaConfirmModal.vue.d.ts +1 -1
- package/dist/components/modal-2/MaModal.vue.d.ts +1 -1
- package/dist/{export-data-DSMuByxy.js → export-data-DnC9d-sd.js} +1 -1
- package/dist/{exporting-DZnBR8gm.js → exporting-B7mAf03M.js} +1 -1
- package/dist/{funnel-DaTDEOyF.js → funnel-CEWXLfUD.js} +1 -1
- package/dist/{index-bTz35Vhl.js → index-DMf_qtJ9.js} +10921 -9957
- package/dist/index.d.ts +4 -0
- package/dist/{map-BhX11nMc.js → map-DMyXppWv.js} +1 -1
- package/dist/{offline-exporting-Dj1jDKzF.js → offline-exporting-ClAybQAO.js} +1 -1
- package/dist/{stock-Cv-uIi1p.js → stock-Dlx9teS0.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/{venn-CgBXe2Vp.js → venn-Dsb_Mzdf.js} +1 -1
- package/dist/{wordcloud-Bwb3kAJt.js → wordcloud-C63iQ3vv.js} +1 -1
- package/package.json +6 -3
package/dist/action-kit.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { SelectOptGroup as
|
|
1
|
+
import { aQ as e, aR as o, aS as t, aT as M, bA as i, aM as n, aN as r, aX as c, aZ as p, aY as l, b4 as b, b8 as S, b9 as u, b6 as T, b5 as d, b7 as m, b3 as C, bh as y, c8 as I, c7 as g, bk as P, bi as A, bP as B, by as h, bB as z, bE as v, bC as D, ba as O, bb as k, _ as w, aW as L, aU as R, aV as E, a as _, b as f, c as x, d as N, e as F, b1 as G, b0 as K, a$ as V, a_ as U, b2 as H, f as W, j, be as q, bg as J, bf as Z, k as Q, l as X, aI as Y, aK as $, r as aa, p as sa, n as ea, o as oa, q as ta, t as Ma, s as ia, bj as na, bL as ra, u as ca, v as pa, w as la, y as ba, x as Sa, N as ua, O as Ta, P as da, S as ma, Q as Ca, T as ya, z as Ia, A as ga, bl as Pa, bm as Aa, B as Ba, C as ha, bp as za, bn as va, bo as Da, bw as Oa, E as ka, br as wa, D as La, bs as Ra, bt as Ea, bu as _a, bq as fa, F as xa, G as Na, bx as Fa, bv as Ga, M as Ka, J as Va, L as Ua, I as Ha, K as Wa, U as ja, bI as qa, R as Ja, bH as Za, bG as Qa, h as Xa, W as Ya, cd as $a, V as as, X as ss, bM as es, bT as os, bS as ts, Y as Ms, Z as is, $ as ns, bW as rs, bV as cs, a1 as ps, a0 as ls, a3 as bs, a2 as Ss, a4 as us, c0 as Ts, b$ as ds, c1 as ms, b_ as Cs, a6 as ys, a7 as Is, a5 as gs, c2 as Ps, a8 as As, c4 as Bs, c3 as hs, a9 as zs, ae as vs, ac as Ds, aa as Os, ab as ks, ad as ws, ah as Ls, ai as Rs, ak as Es, af as _s, al as fs, aj as xs, ag as Ns, ce as Fs, am as Gs, an as Ks, i as Vs, ao as Us, cg as Hs, ch as Ws, cf as js, ap as qs, ar as Js, as as Zs, ck as Qs, aq as Xs, cj as Ys, at as $s, au as ae, cq as se, ax as ee, av as oe, cn as te, co as Me, cp as ie, ay as ne, aw as re, cm as ce, cl as pe, az as le, aA as be, aC as Se, aB as ue, aD as Te, aE as de, aF as me, aG as Ce, cA as ye, cz as Ie, cy as ge, aH as Pe, bQ as Ae, bO as Be, ca as he, c9 as ze, bU as ve, bF as De, bX as Oe, bZ as ke, bY as we, bz as Le, bD as Re, c6 as Ee, cc as _e, cb as fe, c5 as xe, bc as Ne, bd as Fe, ci as Ge, cr as Ke, cs as Ve, ct as Ue, cv as He, cu as We, cw as je, cx as qe, cC as Je, cB as Ze, cD as Qe, aJ as Xe, bK as Ye, bJ as $e, H as ao, m as so, aP as eo, bR as oo, aO as to, aL as Mo, bN as io } from "./index-DMf_qtJ9.js";
|
|
2
|
+
import { SelectOptGroup as ro } from "ant-design-vue";
|
|
3
3
|
export {
|
|
4
4
|
e as ACTION_KIT_LOCALE_EN,
|
|
5
5
|
o as ACTION_KIT_LOCALE_JA,
|
|
@@ -8,8 +8,8 @@ export {
|
|
|
8
8
|
i as ASSETS,
|
|
9
9
|
n as ActionKit,
|
|
10
10
|
r as ActionKitSymbol,
|
|
11
|
-
|
|
12
|
-
|
|
11
|
+
c as Animations,
|
|
12
|
+
p as AppIconPlatforms,
|
|
13
13
|
l as AppIconSizes,
|
|
14
14
|
b as ButtonColors,
|
|
15
15
|
S as ButtonHtmlTypes,
|
|
@@ -17,9 +17,9 @@ export {
|
|
|
17
17
|
T as ButtonShapes,
|
|
18
18
|
d as ButtonSizes,
|
|
19
19
|
m as ButtonTargets,
|
|
20
|
-
|
|
20
|
+
C as ButtonVariants,
|
|
21
21
|
y as CascaderSizes,
|
|
22
|
-
|
|
22
|
+
I as CheckboxPlacementRight,
|
|
23
23
|
g as CheckboxPlacements,
|
|
24
24
|
P as CollapseItemState,
|
|
25
25
|
A as CollapseModes,
|
|
@@ -51,172 +51,176 @@ export {
|
|
|
51
51
|
Z as MaCardSizes,
|
|
52
52
|
Q as MaCascader,
|
|
53
53
|
X as MaChart,
|
|
54
|
-
Y as
|
|
55
|
-
$ as
|
|
56
|
-
aa as
|
|
57
|
-
sa as
|
|
58
|
-
ea as
|
|
59
|
-
oa as
|
|
60
|
-
ta as
|
|
61
|
-
Ma as
|
|
62
|
-
ia as
|
|
63
|
-
na as
|
|
64
|
-
ra as
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
la as
|
|
68
|
-
ba as
|
|
69
|
-
Sa as
|
|
70
|
-
ua as
|
|
71
|
-
Ta as
|
|
72
|
-
da as
|
|
73
|
-
ma as
|
|
54
|
+
Y as MaChatbot,
|
|
55
|
+
$ as MaChatbotSymbol,
|
|
56
|
+
aa as MaCheckbox,
|
|
57
|
+
sa as MaCheckbox2,
|
|
58
|
+
ea as MaCheckbox2Card,
|
|
59
|
+
oa as MaCheckbox2Group,
|
|
60
|
+
ta as MaCheckboxGroup,
|
|
61
|
+
Ma as MaCollapse,
|
|
62
|
+
ia as MaCollapseItem,
|
|
63
|
+
na as MaCollapseSizes,
|
|
64
|
+
ra as MaConfirmModal2,
|
|
65
|
+
ca as MaContentScroller,
|
|
66
|
+
pa as MaCountryRadio,
|
|
67
|
+
la as MaCountrySelect,
|
|
68
|
+
ba as MaDatePicker,
|
|
69
|
+
Sa as MaDatePicker2,
|
|
70
|
+
ua as MaDevicePreviewAppDetailPreview,
|
|
71
|
+
Ta as MaDevicePreviewAppTodayTabPreview,
|
|
72
|
+
da as MaDevicePreviewProductPages,
|
|
73
|
+
ma as MaDevicePreviewSearchResults,
|
|
74
|
+
Ca as MaDevicePreviewSearchTab,
|
|
75
|
+
ya as MaDevicePreviewTodayTab,
|
|
74
76
|
Ia as MaDrawer,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
77
|
+
ga as MaDropdown,
|
|
78
|
+
Pa as MaDropdownPlacements,
|
|
79
|
+
Aa as MaDropdownTriggers,
|
|
80
|
+
Ba as MaEllipsis,
|
|
81
|
+
ha as MaEmpty,
|
|
82
|
+
za as MaEmptyIcons,
|
|
83
|
+
va as MaEmptySizes,
|
|
84
|
+
Da as MaEmptyVariants,
|
|
85
|
+
Oa as MaFlagIconRatios,
|
|
86
|
+
ka as MaForm,
|
|
87
|
+
wa as MaForm2,
|
|
88
|
+
La as MaFormItem,
|
|
89
|
+
Ra as MaFormItem2,
|
|
90
|
+
Ea as MaFormItem2Label,
|
|
91
|
+
_a as MaFormItem2Message,
|
|
92
|
+
fa as MaFormLayouts,
|
|
93
|
+
xa as MaIcon,
|
|
94
|
+
Na as MaIconButton,
|
|
95
|
+
Fa as MaIconSizeClassNames,
|
|
96
|
+
Ga as MaIconSizes,
|
|
97
|
+
Ka as MaImage,
|
|
98
|
+
Va as MaImage2,
|
|
99
|
+
Ua as MaImageGroup,
|
|
100
|
+
Ha as MaImageGroup2,
|
|
101
|
+
Wa as MaImagePreview,
|
|
102
|
+
ja as MaInput,
|
|
103
|
+
qa as MaInputCurrencies,
|
|
104
|
+
Ja as MaInputNumber,
|
|
105
|
+
Za as MaInputSizes,
|
|
106
|
+
Qa as MaInputTypes,
|
|
107
|
+
Xa as MaLinkButton,
|
|
108
|
+
Ya as MaMenu,
|
|
109
|
+
$a as MaMenuButtonPropSizes,
|
|
110
|
+
as as MaMenuItem,
|
|
111
|
+
ss as MaModal,
|
|
112
|
+
es as MaModal2,
|
|
113
|
+
os as MaModalTypeIcon,
|
|
114
|
+
ts as MaModalTypes,
|
|
115
|
+
Ms as MaNotification,
|
|
116
|
+
is as MaNumericInput,
|
|
117
|
+
ns as MaPagination,
|
|
118
|
+
rs as MaPaginationModes,
|
|
119
|
+
cs as MaPaginationSizes,
|
|
120
|
+
ps as MaPopconfirm,
|
|
121
|
+
ls as MaPopconfirm2,
|
|
122
|
+
bs as MaPopover,
|
|
123
|
+
Ss as MaPopover2,
|
|
124
|
+
us as MaProgress,
|
|
125
|
+
Ts as MaProgressCircleSizes,
|
|
126
|
+
ds as MaProgressColors,
|
|
127
|
+
ms as MaProgressPercentAlignments,
|
|
128
|
+
Cs as MaProgressTypes,
|
|
129
|
+
ys as MaRadio,
|
|
128
130
|
Is as MaRadioCard,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
131
|
+
gs as MaRadioGroup,
|
|
132
|
+
Ps as MaRadioTypes,
|
|
133
|
+
As as MaRate,
|
|
134
|
+
Bs as MaRateColors,
|
|
135
|
+
hs as MaRateSizes,
|
|
136
|
+
zs as MaResult,
|
|
137
|
+
vs as MaSelect,
|
|
138
|
+
Ds as MaSelect2,
|
|
139
|
+
Os as MaSelect2Option,
|
|
140
|
+
ks as MaSelect2OptionGroup,
|
|
141
|
+
ro as MaSelectOptGroup,
|
|
142
|
+
ws as MaSelectOption,
|
|
143
|
+
Ls as MaSideMenuAddNewAppButton,
|
|
144
|
+
Rs as MaSideMenuAppButton,
|
|
145
|
+
Es as MaSideMenuButton,
|
|
146
|
+
_s as MaSideMenuButton2,
|
|
147
|
+
fs as MaSideMenuIconButton,
|
|
148
|
+
xs as MaSideMenuItem,
|
|
149
|
+
Ns as MaSideMenuItem2,
|
|
150
|
+
Fs as MaSideMenuItemColors,
|
|
151
|
+
Gs as MaSideMenuRoundIconButton,
|
|
152
|
+
Ks as MaSlider,
|
|
153
|
+
Vs as MaSocialButton,
|
|
154
|
+
Us as MaSpin,
|
|
155
|
+
Hs as MaSpinColors,
|
|
156
|
+
Ws as MaSpinSizes,
|
|
157
|
+
js as MaSpinTypes,
|
|
158
|
+
qs as MaStep,
|
|
159
|
+
Js as MaStepItem,
|
|
160
|
+
Zs as MaStepItems,
|
|
161
|
+
Qs as MaStepSizes,
|
|
162
|
+
Xs as MaSteps,
|
|
163
|
+
Ys as MaStepsDirections,
|
|
164
|
+
$s as MaSwitch,
|
|
165
|
+
ae as MaTabButton2,
|
|
166
|
+
se as MaTabIconAlignMents,
|
|
167
|
+
ee as MaTabPane,
|
|
168
|
+
oe as MaTabPane2,
|
|
169
|
+
te as MaTabPanePlacements,
|
|
170
|
+
Me as MaTabPositions,
|
|
171
|
+
ie as MaTabTypes,
|
|
172
|
+
ne as MaTabs,
|
|
173
|
+
re as MaTabs2,
|
|
174
|
+
ce as MaTabsSizes,
|
|
175
|
+
pe as MaTabsTypes,
|
|
176
|
+
le as MaTagInput,
|
|
177
|
+
be as MaToggle,
|
|
178
|
+
Se as MaTooltip,
|
|
179
|
+
ue as MaTooltip2,
|
|
180
|
+
Te as MaTrackButton,
|
|
181
|
+
de as MaTree,
|
|
182
|
+
me as MaTypography,
|
|
183
|
+
Ce as MaUpload,
|
|
184
|
+
ye as MaUploadFileStatus,
|
|
183
185
|
Ie as MaUploadSizes,
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
186
|
+
ge as MaUploadTypes,
|
|
187
|
+
Pe as MaWatchlistButton,
|
|
188
|
+
Ae as ModalManager,
|
|
189
|
+
Be as ModalPositions,
|
|
190
|
+
he as MultiSelectOptionCheckbox,
|
|
191
|
+
ze as MultiSelectOptions,
|
|
192
|
+
ve as NumericInputSizes,
|
|
193
|
+
De as PageTypes,
|
|
194
|
+
Oe as Popconfirm2Variants,
|
|
195
|
+
ke as Popover2Placements,
|
|
196
|
+
we as Popover2TriggerTypes,
|
|
197
|
+
Le as SCALE_FACTORS,
|
|
198
|
+
Re as SearchResultsDisplayTypes,
|
|
199
|
+
Ee as SelectModes,
|
|
200
|
+
_e as SelectOptionTypeRadio,
|
|
201
|
+
fe as SelectOptionTypes,
|
|
202
|
+
xe as SelectSizes,
|
|
203
|
+
Ne as SocialButtonBrands,
|
|
204
|
+
Fe as SocialButtonVariants,
|
|
205
|
+
Ge as SwitchTypes,
|
|
206
|
+
Ke as ToggleSizes,
|
|
207
|
+
Ve as Tooltip2Types,
|
|
208
|
+
Ue as TooltipPlacements,
|
|
209
|
+
He as TooltipTriggerTypes,
|
|
210
|
+
We as TooltipTypes,
|
|
211
|
+
je as TrackButtonSizes,
|
|
212
|
+
qe as TreeModes,
|
|
213
|
+
Je as TypographyTags,
|
|
214
|
+
Ze as TypographyTypes,
|
|
215
|
+
Qe as TypographyWeights,
|
|
216
|
+
Xe as createMaChatbot,
|
|
217
|
+
Ye as currencyOptions,
|
|
218
|
+
$e as currencySymbols,
|
|
219
|
+
ao as loadIcon,
|
|
220
|
+
so as maChartDefaultOptions,
|
|
221
|
+
eo as maCountry,
|
|
222
|
+
oo as modalManager,
|
|
223
|
+
to as useActionKit,
|
|
224
|
+
Mo as useMaChatbot,
|
|
225
|
+
io as useModal
|
|
222
226
|
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { FeedbackSubmitPayload, MaChatbotFeedbackTopic } from './types';
|
|
2
|
+
export interface MaChatbotFeedbackPanelProps {
|
|
3
|
+
topics?: MaChatbotFeedbackTopic[];
|
|
4
|
+
}
|
|
5
|
+
declare const _default: import("vue").DefineComponent<MaChatbotFeedbackPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
submit: (payload: FeedbackSubmitPayload) => any;
|
|
7
|
+
cancel: () => any;
|
|
8
|
+
}, string, import("vue").PublicProps, Readonly<MaChatbotFeedbackPanelProps> & Readonly<{
|
|
9
|
+
onSubmit?: (payload: FeedbackSubmitPayload) => any;
|
|
10
|
+
onCancel?: () => any;
|
|
11
|
+
}>, {
|
|
12
|
+
topics: MaChatbotFeedbackTopic[];
|
|
13
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface MaChatbotInputAreaProps {
|
|
2
|
+
modelValue: string;
|
|
3
|
+
placeholder?: string;
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
isBusy?: boolean;
|
|
6
|
+
maxLength?: number;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("vue").DefineComponent<MaChatbotInputAreaProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
stop: () => any;
|
|
10
|
+
"update:modelValue": (value: string) => any;
|
|
11
|
+
send: () => any;
|
|
12
|
+
}, string, import("vue").PublicProps, Readonly<MaChatbotInputAreaProps> & Readonly<{
|
|
13
|
+
onStop?: () => any;
|
|
14
|
+
"onUpdate:modelValue"?: (value: string) => any;
|
|
15
|
+
onSend?: () => any;
|
|
16
|
+
}>, {
|
|
17
|
+
disabled: boolean;
|
|
18
|
+
placeholder: string;
|
|
19
|
+
maxLength: number;
|
|
20
|
+
isBusy: boolean;
|
|
21
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MaChatbotMessage } from './types';
|
|
2
|
+
export interface MaChatbotMessageBubbleProps {
|
|
3
|
+
message: MaChatbotMessage;
|
|
4
|
+
isStreaming: boolean;
|
|
5
|
+
errorMessage: string;
|
|
6
|
+
renderedHtml: string;
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import("vue").DefineComponent<MaChatbotMessageBubbleProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
9
|
+
thumbsUp: (msg: MaChatbotMessage) => any;
|
|
10
|
+
thumbsDown: (msg: MaChatbotMessage) => any;
|
|
11
|
+
}, string, import("vue").PublicProps, Readonly<MaChatbotMessageBubbleProps> & Readonly<{
|
|
12
|
+
onThumbsUp?: (msg: MaChatbotMessage) => any;
|
|
13
|
+
onThumbsDown?: (msg: MaChatbotMessage) => any;
|
|
14
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { MaChatbotSuggestedPrompt } from './types';
|
|
2
|
+
export interface MaChatbotPromptStartersProps {
|
|
3
|
+
prompts: MaChatbotSuggestedPrompt[];
|
|
4
|
+
disabled?: boolean;
|
|
5
|
+
initiallyOpen?: boolean;
|
|
6
|
+
}
|
|
7
|
+
declare const _default: import("vue").DefineComponent<MaChatbotPromptStartersProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
8
|
+
select: (prompt: MaChatbotSuggestedPrompt) => any;
|
|
9
|
+
}, string, import("vue").PublicProps, Readonly<MaChatbotPromptStartersProps> & Readonly<{
|
|
10
|
+
onSelect?: (prompt: MaChatbotSuggestedPrompt) => any;
|
|
11
|
+
}>, {
|
|
12
|
+
disabled: boolean;
|
|
13
|
+
initiallyOpen: boolean;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { MaChatbotFeedbackTopic, MaChatbotMessage } from '../types';
|
|
2
|
+
export interface UseFeedbackOptions {
|
|
3
|
+
submitFeedbackApi: (recordId: number, isPositive: boolean, feedbackTopic?: string, feedbackText?: string) => Promise<boolean>;
|
|
4
|
+
}
|
|
5
|
+
export declare function useFeedback({ submitFeedbackApi }: UseFeedbackOptions): {
|
|
6
|
+
showFeedbackPanel: import("vue").Ref<boolean, boolean>;
|
|
7
|
+
handleThumbsUp: (msg: MaChatbotMessage) => void;
|
|
8
|
+
handleThumbsDown: (msg: MaChatbotMessage) => void;
|
|
9
|
+
cancelFeedback: () => void;
|
|
10
|
+
submitNegativeFeedback: (topic: MaChatbotFeedbackTopic | null, text: string) => Promise<MaChatbotMessage | null>;
|
|
11
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { MaChatbotStreamMetadata, SendMessageOptions } from '../types';
|
|
2
|
+
export declare function useMaChatbot(): {
|
|
3
|
+
isLoading: Readonly<import("vue").Ref<boolean, boolean>>;
|
|
4
|
+
error: Readonly<import("vue").Ref<string, string>>;
|
|
5
|
+
guardrailViolation: Readonly<import("vue").Ref<{
|
|
6
|
+
readonly guard: string;
|
|
7
|
+
readonly stage?: string;
|
|
8
|
+
}, {
|
|
9
|
+
readonly guard: string;
|
|
10
|
+
readonly stage?: string;
|
|
11
|
+
}>>;
|
|
12
|
+
sendMessage: ({ prompt, maOrgId, onToken, onDone, onError, onGuardrailViolation, onStreamMetadata, }: SendMessageOptions) => Promise<MaChatbotStreamMetadata>;
|
|
13
|
+
stopStream: () => void;
|
|
14
|
+
logSession: (userInput: string, aiResponse: string, model?: string, inputTokenUsage?: number, outputTokenUsage?: number, requestTime?: number) => Promise<number | null>;
|
|
15
|
+
submitFeedback: (recordId: number, isPositive: boolean, feedbackTopic?: string, feedbackText?: string) => Promise<boolean>;
|
|
16
|
+
sessionId: string;
|
|
17
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { useMaChatbot } from './useMaChatbot';
|
|
2
|
+
import type { MaChatbotMessage, MaChatbotSuggestedPrompt } from '../types';
|
|
3
|
+
type ChatbotApi = ReturnType<typeof useMaChatbot>;
|
|
4
|
+
export interface UseMessagesOptions {
|
|
5
|
+
maOrgId: () => string | undefined;
|
|
6
|
+
mockStreamFn: () => ((prompt: string, onToken: (token: string) => void, onDone: () => void) => void) | undefined;
|
|
7
|
+
api: ChatbotApi;
|
|
8
|
+
}
|
|
9
|
+
export declare function useMessages({ maOrgId, mockStreamFn, api }: UseMessagesOptions): {
|
|
10
|
+
messages: import("vue").Ref<{
|
|
11
|
+
id: string;
|
|
12
|
+
role: import("../types").MaChatbotMessageRole;
|
|
13
|
+
content: string;
|
|
14
|
+
timestamp?: Date;
|
|
15
|
+
status?: import("../types").MaChatbotMessageStatus;
|
|
16
|
+
recordId?: number;
|
|
17
|
+
feedback?: boolean;
|
|
18
|
+
feedbackTopic?: import("../types").MaChatbotFeedbackTopic;
|
|
19
|
+
feedbackText?: string;
|
|
20
|
+
}[], MaChatbotMessage[] | {
|
|
21
|
+
id: string;
|
|
22
|
+
role: import("../types").MaChatbotMessageRole;
|
|
23
|
+
content: string;
|
|
24
|
+
timestamp?: Date;
|
|
25
|
+
status?: import("../types").MaChatbotMessageStatus;
|
|
26
|
+
recordId?: number;
|
|
27
|
+
feedback?: boolean;
|
|
28
|
+
feedbackTopic?: import("../types").MaChatbotFeedbackTopic;
|
|
29
|
+
feedbackText?: string;
|
|
30
|
+
}[]>;
|
|
31
|
+
userInput: import("vue").Ref<string, string>;
|
|
32
|
+
messagesContainerRef: import("vue").Ref<HTMLElement, HTMLElement>;
|
|
33
|
+
isBusy: import("vue").ComputedRef<boolean>;
|
|
34
|
+
hasMessages: import("vue").ComputedRef<boolean>;
|
|
35
|
+
error: Readonly<import("vue").Ref<string, string>>;
|
|
36
|
+
renderMarkdown: (text: string, isStreaming?: boolean) => string;
|
|
37
|
+
isStreamingMessage: (msg: MaChatbotMessage) => boolean;
|
|
38
|
+
isErrorMessage: (msg: MaChatbotMessage) => boolean;
|
|
39
|
+
sendMessage: () => Promise<void>;
|
|
40
|
+
stopStream: () => void;
|
|
41
|
+
handlePromptSelect: (prompt: MaChatbotSuggestedPrompt) => void;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare const TOKEN_EXPIRY_THRESHOLD_SECONDS = 70;
|
|
2
|
+
export declare const SENDER_LABELS: {
|
|
3
|
+
readonly user: "You";
|
|
4
|
+
readonly assistant: "AI Assistant";
|
|
5
|
+
};
|
|
6
|
+
export declare const STREAM_INTERRUPTED_SUFFIX: " [Stream interrupted]";
|
|
7
|
+
export declare const GENERATED_BY_TEXT: "This response generated by MobileAction AI Performance Assistant.";
|
|
8
|
+
export declare const TYPING_INFO_TEXT: "The response is generated by MobileAction AI Performance Assistant. This may take a moment, you can close the chat safely.";
|
|
9
|
+
export declare const INPUT_MAX_LENGTH = 1000;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { MaChatbotFeedbackSentPayload, MaChatbotMessage, MaChatbotMessageSentPayload, MaChatbotSuggestedPrompt } from './types';
|
|
2
|
+
import './styles.scss';
|
|
3
|
+
export interface MaChatbotProps {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
suggestedPrompts?: MaChatbotSuggestedPrompt[];
|
|
6
|
+
maOrgId?: string;
|
|
7
|
+
guardRailViolationMessage?: string;
|
|
8
|
+
timeoutErrorMessage?: string;
|
|
9
|
+
genericErrorMessage?: string;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
mockStreamFn?: (prompt: string, onToken: (token: string) => void, onDone: () => void) => void;
|
|
12
|
+
}
|
|
13
|
+
declare var __VLS_1: {}, __VLS_26: {};
|
|
14
|
+
type __VLS_Slots = {} & {
|
|
15
|
+
header?: (props: typeof __VLS_1) => any;
|
|
16
|
+
} & {
|
|
17
|
+
'input-prepend'?: (props: typeof __VLS_26) => any;
|
|
18
|
+
};
|
|
19
|
+
declare const __VLS_component: import("vue").DefineComponent<MaChatbotProps, {
|
|
20
|
+
messages: import("vue").Ref<{
|
|
21
|
+
id: string;
|
|
22
|
+
role: import("./types").MaChatbotMessageRole;
|
|
23
|
+
content: string;
|
|
24
|
+
timestamp?: Date;
|
|
25
|
+
status?: import("./types").MaChatbotMessageStatus;
|
|
26
|
+
recordId?: number;
|
|
27
|
+
feedback?: boolean;
|
|
28
|
+
feedbackTopic?: import("./types").MaChatbotFeedbackTopic;
|
|
29
|
+
feedbackText?: string;
|
|
30
|
+
}[], MaChatbotMessage[] | {
|
|
31
|
+
id: string;
|
|
32
|
+
role: import("./types").MaChatbotMessageRole;
|
|
33
|
+
content: string;
|
|
34
|
+
timestamp?: Date;
|
|
35
|
+
status?: import("./types").MaChatbotMessageStatus;
|
|
36
|
+
recordId?: number;
|
|
37
|
+
feedback?: boolean;
|
|
38
|
+
feedbackTopic?: import("./types").MaChatbotFeedbackTopic;
|
|
39
|
+
feedbackText?: string;
|
|
40
|
+
}[]>;
|
|
41
|
+
sendMessage: () => Promise<void>;
|
|
42
|
+
stopStream: () => void;
|
|
43
|
+
isBusy: import("vue").ComputedRef<boolean>;
|
|
44
|
+
error: Readonly<import("vue").Ref<string, string>>;
|
|
45
|
+
showFeedbackPanel: import("vue").Ref<boolean, boolean>;
|
|
46
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
47
|
+
messageSent: (payload: MaChatbotMessageSentPayload) => any;
|
|
48
|
+
messageStopped: () => any;
|
|
49
|
+
feedbackSent: (payload: MaChatbotFeedbackSentPayload) => any;
|
|
50
|
+
}, string, import("vue").PublicProps, Readonly<MaChatbotProps> & Readonly<{
|
|
51
|
+
onMessageSent?: (payload: MaChatbotMessageSentPayload) => any;
|
|
52
|
+
onMessageStopped?: () => any;
|
|
53
|
+
onFeedbackSent?: (payload: MaChatbotFeedbackSentPayload) => any;
|
|
54
|
+
}>, {
|
|
55
|
+
disabled: boolean;
|
|
56
|
+
placeholder: string;
|
|
57
|
+
maOrgId: string;
|
|
58
|
+
mockStreamFn: (prompt: string, onToken: (token: string) => void, onDone: () => void) => void;
|
|
59
|
+
suggestedPrompts: MaChatbotSuggestedPrompt[];
|
|
60
|
+
guardRailViolationMessage: string;
|
|
61
|
+
timeoutErrorMessage: string;
|
|
62
|
+
genericErrorMessage: string;
|
|
63
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
64
|
+
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
65
|
+
export default _default;
|
|
66
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
67
|
+
new (): {
|
|
68
|
+
$slots: S;
|
|
69
|
+
};
|
|
70
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { App, InjectionKey } from 'vue';
|
|
2
|
+
import type { MaChatbotPluginOptions } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* Injection key for MaChatbot plugin options.
|
|
5
|
+
*
|
|
6
|
+
* Uses `Symbol.for()` to ensure the same symbol is shared across
|
|
7
|
+
* different package instances (important for npm library consumers).
|
|
8
|
+
*/
|
|
9
|
+
export declare const MaChatbotSymbol: InjectionKey<MaChatbotPluginOptions>;
|
|
10
|
+
/**
|
|
11
|
+
* Creates a MaChatbot plugin instance.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* app.use(createMaChatbot({
|
|
16
|
+
* agentApiUrl: import.meta.env.VITE_CHATBOT_API_URL,
|
|
17
|
+
* getAccessToken: () => store.accessToken,
|
|
18
|
+
* }))
|
|
19
|
+
* ```
|
|
20
|
+
*/
|
|
21
|
+
export declare function createMaChatbot(options: MaChatbotPluginOptions): {
|
|
22
|
+
install(app: App): void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3';
|
|
2
|
+
import MaChatbot from '../index.vue';
|
|
3
|
+
declare const meta: Meta<typeof MaChatbot>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof MaChatbot>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const Playground: Story;
|