@elicecontents/content-ui 1.0.5 → 1.0.6
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/cjs/_virtual/_rollupPluginBabelHelpers.js +328 -0
- package/cjs/components/base-input/BaseInput.d.ts +2 -1
- package/cjs/components/base-input/BaseInput.js +4 -1
- package/cjs/components/chat/Chat.d.ts +7 -3
- package/cjs/components/chat/Chat.js +12 -4
- package/cjs/components/index.d.ts +1 -0
- package/cjs/components/index.js +2 -0
- package/cjs/components/layout/Footer/LayoutFooterSubmit.d.ts +3 -1
- package/cjs/components/layout/Footer/LayoutFooterSubmit.js +6 -0
- package/cjs/components/layout/Layout.d.ts +1 -1
- package/cjs/components/pagination-button/PaginationButton.js +0 -1
- package/cjs/components/recorder-chat/AssistantAvatar.d.ts +2 -0
- package/cjs/components/recorder-chat/AssistantAvatar.js +162 -0
- package/cjs/components/recorder-chat/RecorderChat.d.ts +41 -0
- package/cjs/components/recorder-chat/RecorderChat.js +407 -0
- package/cjs/components/recorder-chat/TypingIndicator.d.ts +3 -0
- package/cjs/components/recorder-chat/TypingIndicator.js +33 -0
- package/cjs/components/recorder-chat/UserAvatar.d.ts +2 -0
- package/cjs/components/recorder-chat/UserAvatar.js +173 -0
- package/cjs/components/recorder-chat/index.d.ts +1 -0
- package/cjs/components/recorder-chat/index.js +7 -0
- package/cjs/icons/{Numbers.d.ts → NumbersIcon.d.ts} +1 -2
- package/cjs/icons/index.d.ts +1 -1
- package/cjs/icons/index.js +2 -2
- package/cjs/index.js +4 -2
- package/es/_virtual/_rollupPluginBabelHelpers.js +327 -1
- package/es/components/base-input/BaseInput.d.ts +2 -1
- package/es/components/base-input/BaseInput.js +4 -1
- package/es/components/chat/Chat.d.ts +7 -3
- package/es/components/chat/Chat.js +12 -4
- package/es/components/index.d.ts +1 -0
- package/es/components/index.js +1 -0
- package/es/components/layout/Footer/LayoutFooterSubmit.d.ts +3 -1
- package/es/components/layout/Footer/LayoutFooterSubmit.js +6 -0
- package/es/components/layout/Layout.d.ts +1 -1
- package/es/components/pagination-button/PaginationButton.js +0 -1
- package/es/components/recorder-chat/AssistantAvatar.d.ts +2 -0
- package/es/components/recorder-chat/AssistantAvatar.js +158 -0
- package/es/components/recorder-chat/RecorderChat.d.ts +41 -0
- package/es/components/recorder-chat/RecorderChat.js +398 -0
- package/es/components/recorder-chat/TypingIndicator.d.ts +3 -0
- package/es/components/recorder-chat/TypingIndicator.js +25 -0
- package/es/components/recorder-chat/UserAvatar.d.ts +2 -0
- package/es/components/recorder-chat/UserAvatar.js +169 -0
- package/es/components/recorder-chat/index.d.ts +1 -0
- package/es/components/recorder-chat/index.js +1 -0
- package/es/icons/{Numbers.d.ts → NumbersIcon.d.ts} +1 -2
- package/es/icons/index.d.ts +1 -1
- package/es/icons/index.js +1 -1
- package/es/index.js +2 -1
- package/package.json +1 -1
- /package/cjs/icons/{Numbers.js → NumbersIcon.js} +0 -0
- /package/es/icons/{Numbers.js → NumbersIcon.js} +0 -0
|
@@ -11,6 +11,31 @@ function _arrayWithHoles(r) {
|
|
|
11
11
|
function _arrayWithoutHoles(r) {
|
|
12
12
|
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
13
13
|
}
|
|
14
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) {
|
|
15
|
+
try {
|
|
16
|
+
var i = n[a](c),
|
|
17
|
+
u = i.value;
|
|
18
|
+
} catch (n) {
|
|
19
|
+
return void e(n);
|
|
20
|
+
}
|
|
21
|
+
i.done ? t(u) : Promise.resolve(u).then(r, o);
|
|
22
|
+
}
|
|
23
|
+
function _asyncToGenerator(n) {
|
|
24
|
+
return function () {
|
|
25
|
+
var t = this,
|
|
26
|
+
e = arguments;
|
|
27
|
+
return new Promise(function (r, o) {
|
|
28
|
+
var a = n.apply(t, e);
|
|
29
|
+
function _next(n) {
|
|
30
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
|
|
31
|
+
}
|
|
32
|
+
function _throw(n) {
|
|
33
|
+
asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
|
|
34
|
+
}
|
|
35
|
+
_next(void 0);
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
}
|
|
14
39
|
function _defineProperty(e, r, t) {
|
|
15
40
|
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
16
41
|
value: t,
|
|
@@ -52,6 +77,307 @@ function _nonIterableRest() {
|
|
|
52
77
|
function _nonIterableSpread() {
|
|
53
78
|
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
54
79
|
}
|
|
80
|
+
function _regeneratorRuntime() {
|
|
81
|
+
_regeneratorRuntime = function () {
|
|
82
|
+
return e;
|
|
83
|
+
};
|
|
84
|
+
var t,
|
|
85
|
+
e = {},
|
|
86
|
+
r = Object.prototype,
|
|
87
|
+
n = r.hasOwnProperty,
|
|
88
|
+
o = Object.defineProperty || function (t, e, r) {
|
|
89
|
+
t[e] = r.value;
|
|
90
|
+
},
|
|
91
|
+
i = "function" == typeof Symbol ? Symbol : {},
|
|
92
|
+
a = i.iterator || "@@iterator",
|
|
93
|
+
c = i.asyncIterator || "@@asyncIterator",
|
|
94
|
+
u = i.toStringTag || "@@toStringTag";
|
|
95
|
+
function define(t, e, r) {
|
|
96
|
+
return Object.defineProperty(t, e, {
|
|
97
|
+
value: r,
|
|
98
|
+
enumerable: true,
|
|
99
|
+
configurable: true,
|
|
100
|
+
writable: true
|
|
101
|
+
}), t[e];
|
|
102
|
+
}
|
|
103
|
+
try {
|
|
104
|
+
define({}, "");
|
|
105
|
+
} catch (t) {
|
|
106
|
+
define = function (t, e, r) {
|
|
107
|
+
return t[e] = r;
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function wrap(t, e, r, n) {
|
|
111
|
+
var i = e && e.prototype instanceof Generator ? e : Generator,
|
|
112
|
+
a = Object.create(i.prototype),
|
|
113
|
+
c = new Context(n || []);
|
|
114
|
+
return o(a, "_invoke", {
|
|
115
|
+
value: makeInvokeMethod(t, r, c)
|
|
116
|
+
}), a;
|
|
117
|
+
}
|
|
118
|
+
function tryCatch(t, e, r) {
|
|
119
|
+
try {
|
|
120
|
+
return {
|
|
121
|
+
type: "normal",
|
|
122
|
+
arg: t.call(e, r)
|
|
123
|
+
};
|
|
124
|
+
} catch (t) {
|
|
125
|
+
return {
|
|
126
|
+
type: "throw",
|
|
127
|
+
arg: t
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
e.wrap = wrap;
|
|
132
|
+
var h = "suspendedStart",
|
|
133
|
+
l = "suspendedYield",
|
|
134
|
+
f = "executing",
|
|
135
|
+
s = "completed",
|
|
136
|
+
y = {};
|
|
137
|
+
function Generator() {}
|
|
138
|
+
function GeneratorFunction() {}
|
|
139
|
+
function GeneratorFunctionPrototype() {}
|
|
140
|
+
var p = {};
|
|
141
|
+
define(p, a, function () {
|
|
142
|
+
return this;
|
|
143
|
+
});
|
|
144
|
+
var d = Object.getPrototypeOf,
|
|
145
|
+
v = d && d(d(values([])));
|
|
146
|
+
v && v !== r && n.call(v, a) && (p = v);
|
|
147
|
+
var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
|
|
148
|
+
function defineIteratorMethods(t) {
|
|
149
|
+
["next", "throw", "return"].forEach(function (e) {
|
|
150
|
+
define(t, e, function (t) {
|
|
151
|
+
return this._invoke(e, t);
|
|
152
|
+
});
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
function AsyncIterator(t, e) {
|
|
156
|
+
function invoke(r, o, i, a) {
|
|
157
|
+
var c = tryCatch(t[r], t, o);
|
|
158
|
+
if ("throw" !== c.type) {
|
|
159
|
+
var u = c.arg,
|
|
160
|
+
h = u.value;
|
|
161
|
+
return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
|
|
162
|
+
invoke("next", t, i, a);
|
|
163
|
+
}, function (t) {
|
|
164
|
+
invoke("throw", t, i, a);
|
|
165
|
+
}) : e.resolve(h).then(function (t) {
|
|
166
|
+
u.value = t, i(u);
|
|
167
|
+
}, function (t) {
|
|
168
|
+
return invoke("throw", t, i, a);
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
a(c.arg);
|
|
172
|
+
}
|
|
173
|
+
var r;
|
|
174
|
+
o(this, "_invoke", {
|
|
175
|
+
value: function (t, n) {
|
|
176
|
+
function callInvokeWithMethodAndArg() {
|
|
177
|
+
return new e(function (e, r) {
|
|
178
|
+
invoke(t, n, e, r);
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
|
|
182
|
+
}
|
|
183
|
+
});
|
|
184
|
+
}
|
|
185
|
+
function makeInvokeMethod(e, r, n) {
|
|
186
|
+
var o = h;
|
|
187
|
+
return function (i, a) {
|
|
188
|
+
if (o === f) throw Error("Generator is already running");
|
|
189
|
+
if (o === s) {
|
|
190
|
+
if ("throw" === i) throw a;
|
|
191
|
+
return {
|
|
192
|
+
value: t,
|
|
193
|
+
done: true
|
|
194
|
+
};
|
|
195
|
+
}
|
|
196
|
+
for (n.method = i, n.arg = a;;) {
|
|
197
|
+
var c = n.delegate;
|
|
198
|
+
if (c) {
|
|
199
|
+
var u = maybeInvokeDelegate(c, n);
|
|
200
|
+
if (u) {
|
|
201
|
+
if (u === y) continue;
|
|
202
|
+
return u;
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
|
|
206
|
+
if (o === h) throw o = s, n.arg;
|
|
207
|
+
n.dispatchException(n.arg);
|
|
208
|
+
} else "return" === n.method && n.abrupt("return", n.arg);
|
|
209
|
+
o = f;
|
|
210
|
+
var p = tryCatch(e, r, n);
|
|
211
|
+
if ("normal" === p.type) {
|
|
212
|
+
if (o = n.done ? s : l, p.arg === y) continue;
|
|
213
|
+
return {
|
|
214
|
+
value: p.arg,
|
|
215
|
+
done: n.done
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
"throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
|
|
219
|
+
}
|
|
220
|
+
};
|
|
221
|
+
}
|
|
222
|
+
function maybeInvokeDelegate(e, r) {
|
|
223
|
+
var n = r.method,
|
|
224
|
+
o = e.iterator[n];
|
|
225
|
+
if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
|
|
226
|
+
var i = tryCatch(o, e.iterator, r.arg);
|
|
227
|
+
if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
|
|
228
|
+
var a = i.arg;
|
|
229
|
+
return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
|
|
230
|
+
}
|
|
231
|
+
function pushTryEntry(t) {
|
|
232
|
+
var e = {
|
|
233
|
+
tryLoc: t[0]
|
|
234
|
+
};
|
|
235
|
+
1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
|
|
236
|
+
}
|
|
237
|
+
function resetTryEntry(t) {
|
|
238
|
+
var e = t.completion || {};
|
|
239
|
+
e.type = "normal", delete e.arg, t.completion = e;
|
|
240
|
+
}
|
|
241
|
+
function Context(t) {
|
|
242
|
+
this.tryEntries = [{
|
|
243
|
+
tryLoc: "root"
|
|
244
|
+
}], t.forEach(pushTryEntry, this), this.reset(true);
|
|
245
|
+
}
|
|
246
|
+
function values(e) {
|
|
247
|
+
if (e || "" === e) {
|
|
248
|
+
var r = e[a];
|
|
249
|
+
if (r) return r.call(e);
|
|
250
|
+
if ("function" == typeof e.next) return e;
|
|
251
|
+
if (!isNaN(e.length)) {
|
|
252
|
+
var o = -1,
|
|
253
|
+
i = function next() {
|
|
254
|
+
for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = false, next;
|
|
255
|
+
return next.value = t, next.done = true, next;
|
|
256
|
+
};
|
|
257
|
+
return i.next = i;
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
throw new TypeError(typeof e + " is not iterable");
|
|
261
|
+
}
|
|
262
|
+
return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
|
|
263
|
+
value: GeneratorFunctionPrototype,
|
|
264
|
+
configurable: true
|
|
265
|
+
}), o(GeneratorFunctionPrototype, "constructor", {
|
|
266
|
+
value: GeneratorFunction,
|
|
267
|
+
configurable: true
|
|
268
|
+
}), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
|
|
269
|
+
var e = "function" == typeof t && t.constructor;
|
|
270
|
+
return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
|
|
271
|
+
}, e.mark = function (t) {
|
|
272
|
+
return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
|
|
273
|
+
}, e.awrap = function (t) {
|
|
274
|
+
return {
|
|
275
|
+
__await: t
|
|
276
|
+
};
|
|
277
|
+
}, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
|
|
278
|
+
return this;
|
|
279
|
+
}), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
|
|
280
|
+
void 0 === i && (i = Promise);
|
|
281
|
+
var a = new AsyncIterator(wrap(t, r, n, o), i);
|
|
282
|
+
return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
|
|
283
|
+
return t.done ? t.value : a.next();
|
|
284
|
+
});
|
|
285
|
+
}, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
|
|
286
|
+
return this;
|
|
287
|
+
}), define(g, "toString", function () {
|
|
288
|
+
return "[object Generator]";
|
|
289
|
+
}), e.keys = function (t) {
|
|
290
|
+
var e = Object(t),
|
|
291
|
+
r = [];
|
|
292
|
+
for (var n in e) r.push(n);
|
|
293
|
+
return r.reverse(), function next() {
|
|
294
|
+
for (; r.length;) {
|
|
295
|
+
var t = r.pop();
|
|
296
|
+
if (t in e) return next.value = t, next.done = false, next;
|
|
297
|
+
}
|
|
298
|
+
return next.done = true, next;
|
|
299
|
+
};
|
|
300
|
+
}, e.values = values, Context.prototype = {
|
|
301
|
+
constructor: Context,
|
|
302
|
+
reset: function (e) {
|
|
303
|
+
if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = false, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
|
|
304
|
+
},
|
|
305
|
+
stop: function () {
|
|
306
|
+
this.done = true;
|
|
307
|
+
var t = this.tryEntries[0].completion;
|
|
308
|
+
if ("throw" === t.type) throw t.arg;
|
|
309
|
+
return this.rval;
|
|
310
|
+
},
|
|
311
|
+
dispatchException: function (e) {
|
|
312
|
+
if (this.done) throw e;
|
|
313
|
+
var r = this;
|
|
314
|
+
function handle(n, o) {
|
|
315
|
+
return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
|
|
316
|
+
}
|
|
317
|
+
for (var o = this.tryEntries.length - 1; o >= 0; --o) {
|
|
318
|
+
var i = this.tryEntries[o],
|
|
319
|
+
a = i.completion;
|
|
320
|
+
if ("root" === i.tryLoc) return handle("end");
|
|
321
|
+
if (i.tryLoc <= this.prev) {
|
|
322
|
+
var c = n.call(i, "catchLoc"),
|
|
323
|
+
u = n.call(i, "finallyLoc");
|
|
324
|
+
if (c && u) {
|
|
325
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
326
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
327
|
+
} else if (c) {
|
|
328
|
+
if (this.prev < i.catchLoc) return handle(i.catchLoc, true);
|
|
329
|
+
} else {
|
|
330
|
+
if (!u) throw Error("try statement without catch or finally");
|
|
331
|
+
if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
abrupt: function (t, e) {
|
|
337
|
+
for (var r = this.tryEntries.length - 1; r >= 0; --r) {
|
|
338
|
+
var o = this.tryEntries[r];
|
|
339
|
+
if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
|
|
340
|
+
var i = o;
|
|
341
|
+
break;
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
|
|
345
|
+
var a = i ? i.completion : {};
|
|
346
|
+
return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
|
|
347
|
+
},
|
|
348
|
+
complete: function (t, e) {
|
|
349
|
+
if ("throw" === t.type) throw t.arg;
|
|
350
|
+
return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
|
|
351
|
+
},
|
|
352
|
+
finish: function (t) {
|
|
353
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
354
|
+
var r = this.tryEntries[e];
|
|
355
|
+
if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
|
|
356
|
+
}
|
|
357
|
+
},
|
|
358
|
+
catch: function (t) {
|
|
359
|
+
for (var e = this.tryEntries.length - 1; e >= 0; --e) {
|
|
360
|
+
var r = this.tryEntries[e];
|
|
361
|
+
if (r.tryLoc === t) {
|
|
362
|
+
var n = r.completion;
|
|
363
|
+
if ("throw" === n.type) {
|
|
364
|
+
var o = n.arg;
|
|
365
|
+
resetTryEntry(r);
|
|
366
|
+
}
|
|
367
|
+
return o;
|
|
368
|
+
}
|
|
369
|
+
}
|
|
370
|
+
throw Error("illegal catch attempt");
|
|
371
|
+
},
|
|
372
|
+
delegateYield: function (e, r, n) {
|
|
373
|
+
return this.delegate = {
|
|
374
|
+
iterator: values(e),
|
|
375
|
+
resultName: r,
|
|
376
|
+
nextLoc: n
|
|
377
|
+
}, "next" === this.method && (this.arg = t), y;
|
|
378
|
+
}
|
|
379
|
+
}, e;
|
|
380
|
+
}
|
|
55
381
|
function _slicedToArray(r, e) {
|
|
56
382
|
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
57
383
|
}
|
|
@@ -90,11 +416,13 @@ function _unsupportedIterableToArray(r, a) {
|
|
|
90
416
|
exports.arrayLikeToArray = _arrayLikeToArray;
|
|
91
417
|
exports.arrayWithHoles = _arrayWithHoles;
|
|
92
418
|
exports.arrayWithoutHoles = _arrayWithoutHoles;
|
|
419
|
+
exports.asyncToGenerator = _asyncToGenerator;
|
|
93
420
|
exports.defineProperty = _defineProperty;
|
|
94
421
|
exports.iterableToArray = _iterableToArray;
|
|
95
422
|
exports.iterableToArrayLimit = _iterableToArrayLimit;
|
|
96
423
|
exports.nonIterableRest = _nonIterableRest;
|
|
97
424
|
exports.nonIterableSpread = _nonIterableSpread;
|
|
425
|
+
exports.regeneratorRuntime = _regeneratorRuntime;
|
|
98
426
|
exports.slicedToArray = _slicedToArray;
|
|
99
427
|
exports.taggedTemplateLiteral = _taggedTemplateLiteral;
|
|
100
428
|
exports.toConsumableArray = _toConsumableArray;
|
|
@@ -4,8 +4,9 @@ export interface BaseInputProps {
|
|
|
4
4
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
children?: React.ReactNode;
|
|
7
|
+
isDisabled: boolean;
|
|
7
8
|
}
|
|
8
|
-
declare const BaseInput: (({ value, onChange, placeholder, children }: BaseInputProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
|
+
declare const BaseInput: (({ value, onChange, placeholder, children, isDisabled, }: BaseInputProps) => import("react/jsx-runtime").JSX.Element) & {
|
|
9
10
|
LeftElement: ({ children }: {
|
|
10
11
|
children?: React.ReactNode;
|
|
11
12
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -53,13 +53,16 @@ var BaseInput = Object.assign(function (_ref2) {
|
|
|
53
53
|
onChange = _ref2.onChange,
|
|
54
54
|
_ref2$placeholder = _ref2.placeholder,
|
|
55
55
|
placeholder = _ref2$placeholder === void 0 ? "Enter text..." : _ref2$placeholder,
|
|
56
|
-
children = _ref2.children
|
|
56
|
+
children = _ref2.children,
|
|
57
|
+
_ref2$isDisabled = _ref2.isDisabled,
|
|
58
|
+
isDisabled = _ref2$isDisabled === void 0 ? false : _ref2$isDisabled;
|
|
57
59
|
var theme = material.useTheme();
|
|
58
60
|
return jsxRuntime.jsxs(BaseInputContainer, {
|
|
59
61
|
children: [children && jsxRuntime.jsx("div", {
|
|
60
62
|
children: children
|
|
61
63
|
}), " ", jsxRuntime.jsxs(BaseInputContent, {
|
|
62
64
|
children: [jsxRuntime.jsx(InputText, {
|
|
65
|
+
disabled: isDisabled,
|
|
63
66
|
value: value,
|
|
64
67
|
onChange: onChange,
|
|
65
68
|
placeholder: placeholder
|
|
@@ -14,10 +14,12 @@ export interface EliceChatProps {
|
|
|
14
14
|
height?: string;
|
|
15
15
|
onTranscribingChange?: (value: boolean) => void;
|
|
16
16
|
isLoadingMessage?: boolean;
|
|
17
|
+
isDisabled?: boolean;
|
|
18
|
+
CustomAssistantAvatar?: React.ReactNode;
|
|
17
19
|
}
|
|
18
20
|
declare const EliceChat: {
|
|
19
|
-
({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, isLoadingMessage, height, }: EliceChatProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
MessageList({ messages, isLoadingMessage, scrollRef, height, }: {
|
|
21
|
+
({ placeholder, messages, content, onReset, onSend, onChange, onRecord, onTranscribingChange, isLoadingMessage, CustomAssistantAvatar, isDisabled, height, }: EliceChatProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
MessageList({ messages, isLoadingMessage, scrollRef, height, CustomAssistantAvatar, }: {
|
|
21
23
|
messages: {
|
|
22
24
|
role: "system" | "user" | "assistant";
|
|
23
25
|
content: string;
|
|
@@ -25,10 +27,12 @@ declare const EliceChat: {
|
|
|
25
27
|
isLoadingMessage?: boolean | undefined;
|
|
26
28
|
scrollRef: React.RefObject<HTMLDivElement>;
|
|
27
29
|
height?: string | undefined;
|
|
30
|
+
CustomAssistantAvatar: React.ReactNode;
|
|
28
31
|
}): import("react/jsx-runtime").JSX.Element;
|
|
29
|
-
InputArea({ placeHolder, value, onChange, onSend, onReset, onRecord, onTranscribingChange, }: {
|
|
32
|
+
InputArea({ placeHolder, value, isDisabled, onChange, onSend, onReset, onRecord, onTranscribingChange, }: {
|
|
30
33
|
placeHolder: string;
|
|
31
34
|
value: string;
|
|
35
|
+
isDisabled: boolean;
|
|
32
36
|
onChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
|
|
33
37
|
onSend: () => void;
|
|
34
38
|
onReset: () => void;
|
|
@@ -86,6 +86,9 @@ var _EliceChat = function EliceChat(_ref14) {
|
|
|
86
86
|
onRecord = _ref14.onRecord,
|
|
87
87
|
onTranscribingChange = _ref14.onTranscribingChange,
|
|
88
88
|
isLoadingMessage = _ref14.isLoadingMessage,
|
|
89
|
+
CustomAssistantAvatar = _ref14.CustomAssistantAvatar,
|
|
90
|
+
_ref14$isDisabled = _ref14.isDisabled,
|
|
91
|
+
isDisabled = _ref14$isDisabled === void 0 ? false : _ref14$isDisabled,
|
|
89
92
|
_ref14$height = _ref14.height,
|
|
90
93
|
height = _ref14$height === void 0 ? "100%" : _ref14$height;
|
|
91
94
|
var theme = material.useTheme();
|
|
@@ -113,7 +116,8 @@ var _EliceChat = function EliceChat(_ref14) {
|
|
|
113
116
|
children: [jsxRuntime.jsx(_EliceChat.MessageList, {
|
|
114
117
|
messages: messages,
|
|
115
118
|
isLoadingMessage: isLoadingMessage,
|
|
116
|
-
scrollRef: scrollRef
|
|
119
|
+
scrollRef: scrollRef,
|
|
120
|
+
CustomAssistantAvatar: CustomAssistantAvatar
|
|
117
121
|
}), jsxRuntime.jsx(_EliceChat.InputArea, {
|
|
118
122
|
placeHolder: placeholder,
|
|
119
123
|
value: inputValue,
|
|
@@ -124,7 +128,8 @@ var _EliceChat = function EliceChat(_ref14) {
|
|
|
124
128
|
onSend: handleSend,
|
|
125
129
|
onReset: onReset,
|
|
126
130
|
onRecord: onRecord,
|
|
127
|
-
onTranscribingChange: onTranscribingChange
|
|
131
|
+
onTranscribingChange: onTranscribingChange,
|
|
132
|
+
isDisabled: isDisabled
|
|
128
133
|
})]
|
|
129
134
|
});
|
|
130
135
|
};
|
|
@@ -134,7 +139,8 @@ _EliceChat.MessageList = function (_ref15) {
|
|
|
134
139
|
isLoadingMessage = _ref15.isLoadingMessage,
|
|
135
140
|
scrollRef = _ref15.scrollRef,
|
|
136
141
|
_ref15$height = _ref15.height,
|
|
137
|
-
height = _ref15$height === void 0 ? "100%" : _ref15$height
|
|
142
|
+
height = _ref15$height === void 0 ? "100%" : _ref15$height,
|
|
143
|
+
CustomAssistantAvatar = _ref15.CustomAssistantAvatar;
|
|
138
144
|
var theme = material.useTheme();
|
|
139
145
|
return jsxRuntime.jsx(StyledScrollBarStack, {
|
|
140
146
|
theme: theme,
|
|
@@ -154,7 +160,7 @@ _EliceChat.MessageList = function (_ref15) {
|
|
|
154
160
|
alignItems: "center",
|
|
155
161
|
children: [jsxRuntime.jsx(material.Stack, {
|
|
156
162
|
flexShrink: 0,
|
|
157
|
-
children: isAssistant ? jsxRuntime.jsx(AssistantAvatar.default, {}) : jsxRuntime.jsx(UserAvatar.default, {})
|
|
163
|
+
children: isAssistant ? CustomAssistantAvatar !== null && CustomAssistantAvatar !== void 0 ? CustomAssistantAvatar : jsxRuntime.jsx(AssistantAvatar.default, {}) : jsxRuntime.jsx(UserAvatar.default, {})
|
|
158
164
|
}), jsxRuntime.jsx(StyledMessage, {
|
|
159
165
|
isAssistant: isAssistant,
|
|
160
166
|
theme: theme,
|
|
@@ -170,6 +176,7 @@ _EliceChat.MessageList = function (_ref15) {
|
|
|
170
176
|
_EliceChat.InputArea = function (_ref16) {
|
|
171
177
|
var placeHolder = _ref16.placeHolder,
|
|
172
178
|
value = _ref16.value,
|
|
179
|
+
isDisabled = _ref16.isDisabled,
|
|
173
180
|
onChange = _ref16.onChange,
|
|
174
181
|
onSend = _ref16.onSend,
|
|
175
182
|
onReset = _ref16.onReset,
|
|
@@ -187,6 +194,7 @@ _EliceChat.InputArea = function (_ref16) {
|
|
|
187
194
|
flexGrow: 1,
|
|
188
195
|
maxHeight: "14.625rem",
|
|
189
196
|
children: jsxRuntime.jsx(StyledInput, {
|
|
197
|
+
disabled: isDisabled,
|
|
190
198
|
value: value,
|
|
191
199
|
onChange: onChange,
|
|
192
200
|
placeholder: placeHolder,
|
package/cjs/components/index.js
CHANGED
|
@@ -19,6 +19,7 @@ var AdaptiveImage = require('./AdaptiveImage/AdaptiveImage.js');
|
|
|
19
19
|
var SubtitleButton = require('./subtitle-button/SubtitleButton.js');
|
|
20
20
|
var BaseInput = require('./base-input/BaseInput.js');
|
|
21
21
|
var Modal = require('./Modal/Modal.js');
|
|
22
|
+
var RecorderChat = require('./recorder-chat/RecorderChat.js');
|
|
22
23
|
|
|
23
24
|
|
|
24
25
|
|
|
@@ -41,3 +42,4 @@ exports.EliceImage = AdaptiveImage.default;
|
|
|
41
42
|
exports.EliceSubButton = SubtitleButton.default;
|
|
42
43
|
exports.BaseInput = BaseInput.default;
|
|
43
44
|
exports.EliceModal = Modal.default;
|
|
45
|
+
exports.EliceRecorderChat = RecorderChat.default;
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export interface LayoutFooterSubmitProps {
|
|
2
2
|
isRollback?: boolean;
|
|
3
3
|
isSubmit?: boolean;
|
|
4
|
+
disableRollback?: boolean;
|
|
5
|
+
disableSubmit?: boolean;
|
|
4
6
|
submitText?: string;
|
|
5
7
|
rollbackText?: string;
|
|
6
8
|
onRollback?: () => void;
|
|
7
9
|
onSubmit?: () => void;
|
|
8
10
|
}
|
|
9
|
-
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, submitText, rollbackText, onSubmit, onRollback, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const LayoutFooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, }: LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
12
|
export default LayoutFooterSubmit;
|
|
@@ -11,6 +11,10 @@ var LayoutFooterSubmit = function LayoutFooterSubmit(_ref) {
|
|
|
11
11
|
isRollback = _ref$isRollback === void 0 ? false : _ref$isRollback,
|
|
12
12
|
_ref$isSubmit = _ref.isSubmit,
|
|
13
13
|
isSubmit = _ref$isSubmit === void 0 ? false : _ref$isSubmit,
|
|
14
|
+
_ref$disableRollback = _ref.disableRollback,
|
|
15
|
+
disableRollback = _ref$disableRollback === void 0 ? false : _ref$disableRollback,
|
|
16
|
+
_ref$disableSubmit = _ref.disableSubmit,
|
|
17
|
+
disableSubmit = _ref$disableSubmit === void 0 ? false : _ref$disableSubmit,
|
|
14
18
|
submitText = _ref.submitText,
|
|
15
19
|
rollbackText = _ref.rollbackText,
|
|
16
20
|
onSubmit = _ref.onSubmit,
|
|
@@ -19,10 +23,12 @@ var LayoutFooterSubmit = function LayoutFooterSubmit(_ref) {
|
|
|
19
23
|
direction: "row",
|
|
20
24
|
spacing: 1,
|
|
21
25
|
children: [isRollback && jsxRuntime.jsx(Button.default, {
|
|
26
|
+
disabled: disableRollback,
|
|
22
27
|
variant: "outlined",
|
|
23
28
|
onClick: onRollback,
|
|
24
29
|
children: rollbackText !== null && rollbackText !== void 0 ? rollbackText : "다시하기"
|
|
25
30
|
}), isSubmit && jsxRuntime.jsx(Button.default, {
|
|
31
|
+
disabled: disableSubmit,
|
|
26
32
|
onClick: onSubmit,
|
|
27
33
|
children: submitText !== null && submitText !== void 0 ? submitText : "제출하기"
|
|
28
34
|
})]
|
|
@@ -33,6 +33,6 @@ declare const EliceLayout: (({ children, onPrev, onNext, allowPrev, allowNext, b
|
|
|
33
33
|
children: React.ReactNode;
|
|
34
34
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
35
35
|
FooterPaging: React.FC<import("./Footer").LayoutFooterPagingProps>;
|
|
36
|
-
FooterSubmit: ({ isRollback, isSubmit, submitText, rollbackText, onSubmit, onRollback, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
36
|
+
FooterSubmit: ({ isRollback, isSubmit, disableRollback, disableSubmit, submitText, rollbackText, onSubmit, onRollback, }: import("./Footer").LayoutFooterSubmitProps) => import("react/jsx-runtime").JSX.Element;
|
|
37
37
|
};
|
|
38
38
|
export default EliceLayout;
|
|
@@ -45,7 +45,6 @@ var PaginationButton = function PaginationButton(_ref7) {
|
|
|
45
45
|
size = _ref7.size;
|
|
46
46
|
var _useAIDTMediaQuery = useAIDTMediaQuery.default(),
|
|
47
47
|
isTablet = _useAIDTMediaQuery.isTablet;
|
|
48
|
-
console.log(isTablet);
|
|
49
48
|
return jsxRuntime.jsxs(Button, {
|
|
50
49
|
onClick: onClick,
|
|
51
50
|
disabled: disabled,
|