funda-ui 4.7.152 → 4.7.161
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/CascadingSelect/index.js +13 -6
- package/CascadingSelectE2E/index.js +13 -6
- package/Chatbox/index.css +8 -0
- package/Chatbox/index.d.ts +1 -0
- package/Chatbox/index.js +18 -8
- package/Date/index.js +13 -6
- package/DropdownMenu/index.js +13 -6
- package/EventCalendar/index.js +42 -35
- package/EventCalendarTimeline/index.js +55 -41
- package/LiveSearch/index.css +33 -0
- package/LiveSearch/index.d.ts +1 -0
- package/LiveSearch/index.js +186 -91
- package/ModalDialog/index.js +13 -6
- package/RootPortal/index.d.ts +2 -1
- package/RootPortal/index.js +13 -6
- package/Select/index.js +81 -72
- package/Toast/index.js +13 -6
- package/Tooltip/index.js +13 -6
- package/lib/cjs/CascadingSelect/index.js +13 -6
- package/lib/cjs/CascadingSelectE2E/index.js +13 -6
- package/lib/cjs/Chatbox/index.d.ts +1 -0
- package/lib/cjs/Chatbox/index.js +18 -8
- package/lib/cjs/Date/index.js +13 -6
- package/lib/cjs/DropdownMenu/index.js +13 -6
- package/lib/cjs/EventCalendar/index.js +42 -35
- package/lib/cjs/EventCalendarTimeline/index.js +55 -41
- package/lib/cjs/LiveSearch/index.d.ts +1 -0
- package/lib/cjs/LiveSearch/index.js +186 -91
- package/lib/cjs/ModalDialog/index.js +13 -6
- package/lib/cjs/RootPortal/index.d.ts +2 -1
- package/lib/cjs/RootPortal/index.js +13 -6
- package/lib/cjs/Select/index.js +81 -72
- package/lib/cjs/Toast/index.js +13 -6
- package/lib/cjs/Tooltip/index.js +13 -6
- package/lib/css/Chatbox/index.css +8 -0
- package/lib/css/LiveSearch/index.css +33 -0
- package/lib/esm/Chatbox/index.scss +9 -0
- package/lib/esm/Chatbox/index.tsx +7 -4
- package/lib/esm/LiveSearch/index.scss +47 -0
- package/lib/esm/LiveSearch/index.tsx +120 -64
- package/lib/esm/RootPortal/index.tsx +14 -8
- package/lib/esm/SearchBar/index.tsx +1 -0
- package/lib/esm/Select/index.tsx +65 -64
- package/lib/esm/Textarea/index.tsx +1 -0
- package/package.json +1 -1
package/Select/index.js
CHANGED
|
@@ -171,7 +171,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
171
171
|
var RootPortal = function RootPortal(props) {
|
|
172
172
|
var containerClassName = props.containerClassName,
|
|
173
173
|
show = props.show,
|
|
174
|
-
children = props.children
|
|
174
|
+
children = props.children,
|
|
175
|
+
_props$usePortal = props.usePortal,
|
|
176
|
+
usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
|
|
175
177
|
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
176
178
|
|
|
177
179
|
// Move HTML templates to tag end body </body>
|
|
@@ -182,15 +184,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
182
184
|
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
183
185
|
|
|
184
186
|
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
if (usePortal) {
|
|
188
|
+
containerRef.current = document.createElement('div');
|
|
189
|
+
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
190
|
+
document.body.appendChild(containerRef.current);
|
|
191
|
+
}
|
|
188
192
|
return function () {
|
|
189
|
-
if (containerRef.current) {
|
|
193
|
+
if (usePortal && containerRef.current) {
|
|
190
194
|
containerRef.current.remove();
|
|
191
195
|
}
|
|
192
196
|
};
|
|
193
|
-
}, []);
|
|
197
|
+
}, [usePortal]);
|
|
198
|
+
if (!usePortal) {
|
|
199
|
+
return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, children) : null;
|
|
200
|
+
}
|
|
194
201
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
195
202
|
};
|
|
196
203
|
/* harmony default export */
|
|
@@ -3778,7 +3785,8 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3778
3785
|
firstRequestAutoExec = props.firstRequestAutoExec,
|
|
3779
3786
|
fetchTrigger = props.fetchTrigger,
|
|
3780
3787
|
fetchTriggerForDefaultData = props.fetchTriggerForDefaultData,
|
|
3781
|
-
fetchNoneInfo = props.fetchNoneInfo,
|
|
3788
|
+
_props$fetchNoneInfo = props.fetchNoneInfo,
|
|
3789
|
+
fetchNoneInfo = _props$fetchNoneInfo === void 0 ? 'No match yet' : _props$fetchNoneInfo,
|
|
3782
3790
|
fetchUpdate = props.fetchUpdate,
|
|
3783
3791
|
fetchFuncAsync = props.fetchFuncAsync,
|
|
3784
3792
|
fetchFuncMethod = props.fetchFuncMethod,
|
|
@@ -3851,7 +3859,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3851
3859
|
var _useState11 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(null),
|
|
3852
3860
|
_useState12 = _slicedToArray(_useState11, 2),
|
|
3853
3861
|
controlTempValue = _useState12[0],
|
|
3854
|
-
setControlTempValue = _useState12[1];
|
|
3862
|
+
setControlTempValue = _useState12[1]; // Storage for temporary input
|
|
3855
3863
|
var _useState13 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
3856
3864
|
_useState14 = _slicedToArray(_useState13, 2),
|
|
3857
3865
|
isOpen = _useState14[0],
|
|
@@ -3869,6 +3877,11 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3869
3877
|
handleFirstFetchCompleted = _useState20[0],
|
|
3870
3878
|
setHandleFirstFetchCompleted = _useState20[1];
|
|
3871
3879
|
|
|
3880
|
+
// Mark whether it is out of focus
|
|
3881
|
+
// Fixed the issue that caused the pop-up window to still display due to
|
|
3882
|
+
// the delayed close in handleBlur and the timing of the call to popwinPosInit
|
|
3883
|
+
var isBlurringRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(false);
|
|
3884
|
+
|
|
3872
3885
|
// filter status
|
|
3873
3886
|
var _useState21 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
|
|
3874
3887
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
@@ -4090,7 +4103,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4090
4103
|
function _fetchData() {
|
|
4091
4104
|
_fetchData = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(params, valueToInputDefault, inputDefault) {
|
|
4092
4105
|
var init,
|
|
4093
|
-
incomingOptionsData,
|
|
4094
4106
|
defaultValue,
|
|
4095
4107
|
response,
|
|
4096
4108
|
_ORGIN_DATA,
|
|
@@ -4109,17 +4121,15 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4109
4121
|
while (1) switch (_context.prev = _context.next) {
|
|
4110
4122
|
case 0:
|
|
4111
4123
|
init = _args.length > 3 && _args[3] !== undefined ? _args[3] : true;
|
|
4112
|
-
//
|
|
4113
|
-
// It is usually used for complex cascading `<Select />` components
|
|
4114
|
-
incomingOptionsData = valueInputRef.current.dataset.options; // Determine whether the default value is user query input or default input
|
|
4124
|
+
// Determine whether the default value is user query input or default input
|
|
4115
4125
|
defaultValue = init ? valueToInputDefault : '';
|
|
4116
4126
|
if (!(_typeof(fetchFuncAsync) === 'object')) {
|
|
4117
|
-
_context.next =
|
|
4127
|
+
_context.next = 23;
|
|
4118
4128
|
break;
|
|
4119
4129
|
}
|
|
4120
|
-
_context.next =
|
|
4130
|
+
_context.next = 5;
|
|
4121
4131
|
return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')));
|
|
4122
|
-
case
|
|
4132
|
+
case 5:
|
|
4123
4133
|
response = _context.sent;
|
|
4124
4134
|
_ORGIN_DATA = response.data; // reset data structure
|
|
4125
4135
|
if (typeof fetchCallback === 'function') {
|
|
@@ -4134,26 +4144,17 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4134
4144
|
}
|
|
4135
4145
|
|
|
4136
4146
|
// STEP 1: ===========
|
|
4137
|
-
// get incoming options from `data-options` of component
|
|
4138
|
-
if (typeof incomingOptionsData !== 'undefined') {
|
|
4139
|
-
_ORGIN_DATA = JSON.parse(incomingOptionsData);
|
|
4140
|
-
|
|
4141
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
4142
|
-
if (typeof defaultValue !== 'undefined' && defaultValue !== '') valueInputRef.current.dataset.value = defaultValue;
|
|
4143
|
-
}
|
|
4144
|
-
|
|
4145
|
-
// STEP 2: ===========
|
|
4146
4147
|
// Set hierarchical categories ( with sub-categories )
|
|
4147
4148
|
if (hierarchical) {
|
|
4148
4149
|
_ORGIN_DATA = (0,tree.addTreeDepth)(_ORGIN_DATA);
|
|
4149
4150
|
(0,tree.addTreeIndent)(_ORGIN_DATA, INDENT_PLACEHOLDER, INDENT_LAST_PLACEHOLDER, 'label');
|
|
4150
4151
|
}
|
|
4151
4152
|
|
|
4152
|
-
// STEP
|
|
4153
|
+
// STEP 2: ===========
|
|
4153
4154
|
// Flatten the group
|
|
4154
4155
|
_ORGIN_DATA = optionsCustomSelectFlat(_ORGIN_DATA);
|
|
4155
4156
|
|
|
4156
|
-
// STEP
|
|
4157
|
+
// STEP 3: ===========
|
|
4157
4158
|
// value & label must be initialized
|
|
4158
4159
|
filterRes = [];
|
|
4159
4160
|
if (MANUAL_REQ) {
|
|
@@ -4182,7 +4183,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4182
4183
|
}
|
|
4183
4184
|
}
|
|
4184
4185
|
|
|
4185
|
-
// STEP
|
|
4186
|
+
// STEP 4: ===========
|
|
4186
4187
|
// ++++++++++++++++++++
|
|
4187
4188
|
// Single selection
|
|
4188
4189
|
// ++++++++++++++++++++
|
|
@@ -4250,7 +4251,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4250
4251
|
});
|
|
4251
4252
|
}
|
|
4252
4253
|
|
|
4253
|
-
// STEP
|
|
4254
|
+
// STEP 5: ===========
|
|
4254
4255
|
//
|
|
4255
4256
|
// remove Duplicate objects from JSON Array
|
|
4256
4257
|
optionsFormatGroupOpt(_ORGIN_DATA); // prevent the value from being filtered out
|
|
@@ -4260,34 +4261,25 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4260
4261
|
//
|
|
4261
4262
|
setOrginalData(_ORGIN_DATA);
|
|
4262
4263
|
|
|
4263
|
-
// STEP
|
|
4264
|
+
// STEP 6: ===========
|
|
4264
4265
|
//
|
|
4265
4266
|
onFetch === null || onFetch === void 0 ? void 0 : onFetch(selectInputRef.current, valueInputRef.current, defaultValue, _ORGIN_DATA, incomingData);
|
|
4266
4267
|
|
|
4267
4268
|
//
|
|
4268
4269
|
return _context.abrupt("return", _ORGIN_DATA);
|
|
4269
|
-
case
|
|
4270
|
+
case 23:
|
|
4270
4271
|
// STEP 1: ===========
|
|
4271
|
-
// get incoming options from `data-options` of component
|
|
4272
|
-
if (typeof incomingOptionsData !== 'undefined') {
|
|
4273
|
-
staticOptionsData = JSON.parse(incomingOptionsData);
|
|
4274
|
-
|
|
4275
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
4276
|
-
if (typeof defaultValue !== 'undefined' && defaultValue !== '') valueInputRef.current.dataset.value = defaultValue;
|
|
4277
|
-
}
|
|
4278
|
-
|
|
4279
|
-
// STEP 2: ===========
|
|
4280
4272
|
// Set hierarchical categories ( with sub-categories )
|
|
4281
4273
|
if (hierarchical) {
|
|
4282
4274
|
staticOptionsData = (0,tree.addTreeDepth)(staticOptionsData);
|
|
4283
4275
|
(0,tree.addTreeIndent)(staticOptionsData, INDENT_PLACEHOLDER, INDENT_LAST_PLACEHOLDER, 'label');
|
|
4284
4276
|
}
|
|
4285
4277
|
|
|
4286
|
-
// STEP
|
|
4278
|
+
// STEP 2: ===========
|
|
4287
4279
|
// Flatten the group
|
|
4288
4280
|
staticOptionsData = optionsCustomSelectFlat(staticOptionsData);
|
|
4289
4281
|
|
|
4290
|
-
// STEP
|
|
4282
|
+
// STEP 3: ===========
|
|
4291
4283
|
// value & label must be initialized
|
|
4292
4284
|
|
|
4293
4285
|
// If the default value is label, match value
|
|
@@ -4306,7 +4298,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4306
4298
|
_filterRes3 = [inputDefault];
|
|
4307
4299
|
}
|
|
4308
4300
|
|
|
4309
|
-
// STEP
|
|
4301
|
+
// STEP 4: ===========
|
|
4310
4302
|
// ++++++++++++++++++++
|
|
4311
4303
|
// Single selection
|
|
4312
4304
|
// ++++++++++++++++++++
|
|
@@ -4374,7 +4366,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4374
4366
|
});
|
|
4375
4367
|
}
|
|
4376
4368
|
|
|
4377
|
-
// STEP
|
|
4369
|
+
// STEP 5: ===========
|
|
4378
4370
|
//
|
|
4379
4371
|
// remove Duplicate objects from JSON Array
|
|
4380
4372
|
optionsFormatGroupOpt(staticOptionsData); // prevent the value from being filtered out
|
|
@@ -4384,13 +4376,13 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4384
4376
|
//
|
|
4385
4377
|
setOrginalData(staticOptionsData);
|
|
4386
4378
|
|
|
4387
|
-
// STEP
|
|
4379
|
+
// STEP 6: ===========
|
|
4388
4380
|
//
|
|
4389
4381
|
onFetch === null || onFetch === void 0 ? void 0 : onFetch(selectInputRef.current, valueInputRef.current, defaultValue, staticOptionsData, incomingData);
|
|
4390
4382
|
|
|
4391
4383
|
//
|
|
4392
4384
|
return _context.abrupt("return", staticOptionsData);
|
|
4393
|
-
case
|
|
4385
|
+
case 39:
|
|
4394
4386
|
case "end":
|
|
4395
4387
|
return _context.stop();
|
|
4396
4388
|
}
|
|
@@ -4428,6 +4420,11 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4428
4420
|
function popwinPosInit() {
|
|
4429
4421
|
var scrollbarInit = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
4430
4422
|
if (listContentRef.current === null || rootRef.current === null || selectInputRef.current === null) return;
|
|
4423
|
+
|
|
4424
|
+
// If it is out of focus, do not perform position initialization
|
|
4425
|
+
if (isBlurringRef.current) return;
|
|
4426
|
+
|
|
4427
|
+
//
|
|
4431
4428
|
var contentHeightOffset = 80;
|
|
4432
4429
|
var contentMaxHeight = 0;
|
|
4433
4430
|
|
|
@@ -4593,7 +4590,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4593
4590
|
}
|
|
4594
4591
|
function popwinFilterItems(val) {
|
|
4595
4592
|
if (listContentRef.current === null) return;
|
|
4596
|
-
var invisibleItems = 0;
|
|
4597
4593
|
[].slice.call(listContentRef.current.querySelectorAll('.custom-select-multi__control-option-item')).forEach(function (node) {
|
|
4598
4594
|
// Avoid fatal errors causing page crashes
|
|
4599
4595
|
var _queryString = typeof node.dataset.querystring !== 'undefined' && node.dataset.querystring !== null ? node.dataset.querystring : '';
|
|
@@ -4750,6 +4746,13 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4750
4746
|
selectInputRef.current.select();
|
|
4751
4747
|
}
|
|
4752
4748
|
|
|
4749
|
+
// Every time the input changes or the search button is clicked, a data request will be triggered
|
|
4750
|
+
if (MANUAL_REQ && (controlTempValue === '' || controlTempValue === null)) {
|
|
4751
|
+
setTimeout(function () {
|
|
4752
|
+
popwinPosHide();
|
|
4753
|
+
}, 0);
|
|
4754
|
+
}
|
|
4755
|
+
|
|
4753
4756
|
// update temporary value
|
|
4754
4757
|
setControlTempValue('');
|
|
4755
4758
|
|
|
@@ -4773,7 +4776,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4773
4776
|
valueArr,
|
|
4774
4777
|
labelArr,
|
|
4775
4778
|
curItem,
|
|
4776
|
-
incominggetOptionsData,
|
|
4777
4779
|
options,
|
|
4778
4780
|
curBtn,
|
|
4779
4781
|
noCallback,
|
|
@@ -4808,9 +4810,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4808
4810
|
}
|
|
4809
4811
|
return _context2.abrupt("return");
|
|
4810
4812
|
case 5:
|
|
4811
|
-
curItem = el === null ? isObject(dataInput) ? dataInput : JSON.parse(dataInput) : optionsData[Number(el.currentTarget.dataset.index)]; // get
|
|
4812
|
-
// It is usually used for complex cascading `<Select />` components
|
|
4813
|
-
incominggetOptionsData = valueInputRef.current.dataset.options; // get options
|
|
4813
|
+
curItem = el === null ? isObject(dataInput) ? dataInput : JSON.parse(dataInput) : optionsData[Number(el.currentTarget.dataset.index)]; // get options
|
|
4814
4814
|
options = [].slice.call(listRef.current.querySelectorAll('.list-group-item:not(.hide):not(.no-match)')); // current control of some option
|
|
4815
4815
|
curBtn = options.filter(function (node) {
|
|
4816
4816
|
return node.dataset.itemdata == JSON.stringify(curItem);
|
|
@@ -4864,11 +4864,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4864
4864
|
setControlValue(_value);
|
|
4865
4865
|
setControlLabel(formatIndentVal(_label, INDENT_LAST_PLACEHOLDER));
|
|
4866
4866
|
|
|
4867
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
4868
|
-
if (typeof incominggetOptionsData !== 'undefined') {
|
|
4869
|
-
valueInputRef.current.dataset.value = _value;
|
|
4870
|
-
}
|
|
4871
|
-
|
|
4872
4867
|
// ++++++++++++++++++++
|
|
4873
4868
|
// Multiple selection
|
|
4874
4869
|
// ++++++++++++++++++++
|
|
@@ -4970,11 +4965,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4970
4965
|
setControlValue(_value2);
|
|
4971
4966
|
setControlLabel(formatIndentVal(_label2, INDENT_LAST_PLACEHOLDER));
|
|
4972
4967
|
|
|
4973
|
-
// set value if the attribute `data-options` of component exists, only valid for single selection (it may be an empty array)
|
|
4974
|
-
if (typeof incominggetOptionsData !== 'undefined') {
|
|
4975
|
-
valueInputRef.current.dataset.value = _value2;
|
|
4976
|
-
}
|
|
4977
|
-
|
|
4978
4968
|
// ++++++++++++++++++++
|
|
4979
4969
|
// Multiple selection
|
|
4980
4970
|
// ++++++++++++++++++++
|
|
@@ -5048,7 +5038,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5048
5038
|
|
|
5049
5039
|
// Fixed an out-of-focus issue
|
|
5050
5040
|
fixFocusStatus();
|
|
5051
|
-
case
|
|
5041
|
+
case 12:
|
|
5052
5042
|
case "end":
|
|
5053
5043
|
return _context2.stop();
|
|
5054
5044
|
}
|
|
@@ -5199,6 +5189,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5199
5189
|
}
|
|
5200
5190
|
}
|
|
5201
5191
|
function handleShowList() {
|
|
5192
|
+
// Reset the out-of-focus marker
|
|
5193
|
+
isBlurringRef.current = false;
|
|
5194
|
+
|
|
5202
5195
|
//
|
|
5203
5196
|
if (!isOpen) {
|
|
5204
5197
|
activate();
|
|
@@ -5255,18 +5248,25 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5255
5248
|
while (1) switch (_context4.prev = _context4.next) {
|
|
5256
5249
|
case 0:
|
|
5257
5250
|
inputVal = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : null;
|
|
5251
|
+
if (!MANUAL_REQ) {
|
|
5252
|
+
_context4.next = 3;
|
|
5253
|
+
break;
|
|
5254
|
+
}
|
|
5255
|
+
return _context4.abrupt("return", []);
|
|
5256
|
+
case 3:
|
|
5257
|
+
//
|
|
5258
5258
|
_oparams = fetchFuncMethodParams || [];
|
|
5259
5259
|
_params = _oparams.map(function (item) {
|
|
5260
5260
|
return item !== '$QUERY_STRING' ? item : MANUAL_REQ ? QUERY_STRING_PLACEHOLDER : '';
|
|
5261
5261
|
});
|
|
5262
|
-
_context4.next =
|
|
5262
|
+
_context4.next = 7;
|
|
5263
5263
|
return fetchData(_params.join(','), finalRes(inputVal), inputVal);
|
|
5264
|
-
case
|
|
5264
|
+
case 7:
|
|
5265
5265
|
res = _context4.sent;
|
|
5266
5266
|
// Set an identifier indicating that the first request has been completed
|
|
5267
5267
|
if (!handleFirstFetchCompleted) setHandleFirstFetchCompleted(true);
|
|
5268
5268
|
return _context4.abrupt("return", res);
|
|
5269
|
-
case
|
|
5269
|
+
case 10:
|
|
5270
5270
|
case "end":
|
|
5271
5271
|
return _context4.stop();
|
|
5272
5272
|
}
|
|
@@ -5294,6 +5294,11 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5294
5294
|
|
|
5295
5295
|
// Fixed an out-of-focus issue
|
|
5296
5296
|
fixFocusStatus();
|
|
5297
|
+
|
|
5298
|
+
// Every time the input changes or the search button is clicked, a data request will be triggered
|
|
5299
|
+
if (MANUAL_REQ && val !== '') {
|
|
5300
|
+
popwinPosInit();
|
|
5301
|
+
}
|
|
5297
5302
|
}
|
|
5298
5303
|
|
|
5299
5304
|
//
|
|
@@ -5301,14 +5306,14 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5301
5306
|
var _rootRef$current;
|
|
5302
5307
|
(_rootRef$current = rootRef.current) === null || _rootRef$current === void 0 ? void 0 : _rootRef$current.classList.add('focus');
|
|
5303
5308
|
|
|
5304
|
-
// update temporary value
|
|
5305
|
-
setControlTempValue('');
|
|
5306
|
-
|
|
5307
5309
|
//
|
|
5308
5310
|
onFocus === null || onFocus === void 0 ? void 0 : onFocus(selectInputRef.current);
|
|
5309
5311
|
}
|
|
5310
5312
|
function handleBlur(event) {
|
|
5311
5313
|
var _rootRef$current2;
|
|
5314
|
+
// Set the out-of-focus marker
|
|
5315
|
+
isBlurringRef.current = true;
|
|
5316
|
+
|
|
5312
5317
|
// Fix the focus issue with using the "Tabs" and "Enter" keys
|
|
5313
5318
|
//
|
|
5314
5319
|
//
|
|
@@ -5667,6 +5672,8 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5667
5672
|
type: "button",
|
|
5668
5673
|
className: "btn border-end-0 rounded-pill",
|
|
5669
5674
|
onClick: function onClick(e) {
|
|
5675
|
+
e.preventDefault();
|
|
5676
|
+
e.stopPropagation();
|
|
5670
5677
|
handleFetch().then(function (response) {
|
|
5671
5678
|
// pop win initalization
|
|
5672
5679
|
setTimeout(function () {
|
|
@@ -5693,10 +5700,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5693
5700
|
pointerEvents: 'auto',
|
|
5694
5701
|
cursor: 'pointer'
|
|
5695
5702
|
} : undefined,
|
|
5696
|
-
onClick:
|
|
5697
|
-
|
|
5698
|
-
|
|
5699
|
-
|
|
5703
|
+
onClick: function onClick(e) {
|
|
5704
|
+
if (MULTI_SEL_ENTIRE_AREA_TRIGGER) {
|
|
5705
|
+
if (typeof readOnly === 'undefined' || !readOnly) handleShowList();
|
|
5706
|
+
}
|
|
5700
5707
|
}
|
|
5701
5708
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
|
|
5702
5709
|
className: "custom-select-multi__list"
|
|
@@ -5790,6 +5797,8 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5790
5797
|
type: "button",
|
|
5791
5798
|
className: "btn border-end-0 rounded-pill",
|
|
5792
5799
|
onClick: function onClick(e) {
|
|
5800
|
+
e.preventDefault();
|
|
5801
|
+
e.stopPropagation();
|
|
5793
5802
|
handleFetch().then(function (response) {
|
|
5794
5803
|
// pop win initalization
|
|
5795
5804
|
setTimeout(function () {
|
|
@@ -5894,7 +5903,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5894
5903
|
}), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
5895
5904
|
fill: "inherit",
|
|
5896
5905
|
d: "M437.026,134.798c16.52-16.52,16.52-43.304,0-59.824c-16.519-16.511-43.304-16.52-59.823,0c-16.52,16.52-16.503,43.295,0,59.815C393.722,151.309,420.507,151.309,437.026,134.798z"
|
|
5897
|
-
}))))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, fetchNoneInfo
|
|
5906
|
+
}))))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, fetchNoneInfo)), optionsData ? optionsData.map(function (item, index) {
|
|
5898
5907
|
var startItemBorder = index === 0 ? 'border-top-0' : '';
|
|
5899
5908
|
var endItemBorder = index === optionsData.length - 1 ? 'border-bottom-0' : '';
|
|
5900
5909
|
|
package/Toast/index.js
CHANGED
|
@@ -171,7 +171,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
171
171
|
var RootPortal = function RootPortal(props) {
|
|
172
172
|
var containerClassName = props.containerClassName,
|
|
173
173
|
show = props.show,
|
|
174
|
-
children = props.children
|
|
174
|
+
children = props.children,
|
|
175
|
+
_props$usePortal = props.usePortal,
|
|
176
|
+
usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
|
|
175
177
|
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
176
178
|
|
|
177
179
|
// Move HTML templates to tag end body </body>
|
|
@@ -182,15 +184,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
182
184
|
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
183
185
|
|
|
184
186
|
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
if (usePortal) {
|
|
188
|
+
containerRef.current = document.createElement('div');
|
|
189
|
+
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
190
|
+
document.body.appendChild(containerRef.current);
|
|
191
|
+
}
|
|
188
192
|
return function () {
|
|
189
|
-
if (containerRef.current) {
|
|
193
|
+
if (usePortal && containerRef.current) {
|
|
190
194
|
containerRef.current.remove();
|
|
191
195
|
}
|
|
192
196
|
};
|
|
193
|
-
}, []);
|
|
197
|
+
}, [usePortal]);
|
|
198
|
+
if (!usePortal) {
|
|
199
|
+
return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, children) : null;
|
|
200
|
+
}
|
|
194
201
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
195
202
|
};
|
|
196
203
|
/* harmony default export */
|
package/Tooltip/index.js
CHANGED
|
@@ -171,7 +171,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
171
171
|
var RootPortal = function RootPortal(props) {
|
|
172
172
|
var containerClassName = props.containerClassName,
|
|
173
173
|
show = props.show,
|
|
174
|
-
children = props.children
|
|
174
|
+
children = props.children,
|
|
175
|
+
_props$usePortal = props.usePortal,
|
|
176
|
+
usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
|
|
175
177
|
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
176
178
|
|
|
177
179
|
// Move HTML templates to tag end body </body>
|
|
@@ -182,15 +184,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
182
184
|
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
183
185
|
|
|
184
186
|
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
if (usePortal) {
|
|
188
|
+
containerRef.current = document.createElement('div');
|
|
189
|
+
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
190
|
+
document.body.appendChild(containerRef.current);
|
|
191
|
+
}
|
|
188
192
|
return function () {
|
|
189
|
-
if (containerRef.current) {
|
|
193
|
+
if (usePortal && containerRef.current) {
|
|
190
194
|
containerRef.current.remove();
|
|
191
195
|
}
|
|
192
196
|
};
|
|
193
|
-
}, []);
|
|
197
|
+
}, [usePortal]);
|
|
198
|
+
if (!usePortal) {
|
|
199
|
+
return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, children) : null;
|
|
200
|
+
}
|
|
194
201
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
195
202
|
};
|
|
196
203
|
/* harmony default export */
|
|
@@ -171,7 +171,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
171
171
|
var RootPortal = function RootPortal(props) {
|
|
172
172
|
var containerClassName = props.containerClassName,
|
|
173
173
|
show = props.show,
|
|
174
|
-
children = props.children
|
|
174
|
+
children = props.children,
|
|
175
|
+
_props$usePortal = props.usePortal,
|
|
176
|
+
usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
|
|
175
177
|
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
176
178
|
|
|
177
179
|
// Move HTML templates to tag end body </body>
|
|
@@ -182,15 +184,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
182
184
|
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
183
185
|
|
|
184
186
|
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
if (usePortal) {
|
|
188
|
+
containerRef.current = document.createElement('div');
|
|
189
|
+
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
190
|
+
document.body.appendChild(containerRef.current);
|
|
191
|
+
}
|
|
188
192
|
return function () {
|
|
189
|
-
if (containerRef.current) {
|
|
193
|
+
if (usePortal && containerRef.current) {
|
|
190
194
|
containerRef.current.remove();
|
|
191
195
|
}
|
|
192
196
|
};
|
|
193
|
-
}, []);
|
|
197
|
+
}, [usePortal]);
|
|
198
|
+
if (!usePortal) {
|
|
199
|
+
return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, children) : null;
|
|
200
|
+
}
|
|
194
201
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
195
202
|
};
|
|
196
203
|
/* harmony default export */
|
|
@@ -171,7 +171,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
171
171
|
var RootPortal = function RootPortal(props) {
|
|
172
172
|
var containerClassName = props.containerClassName,
|
|
173
173
|
show = props.show,
|
|
174
|
-
children = props.children
|
|
174
|
+
children = props.children,
|
|
175
|
+
_props$usePortal = props.usePortal,
|
|
176
|
+
usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
|
|
175
177
|
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
176
178
|
|
|
177
179
|
// Move HTML templates to tag end body </body>
|
|
@@ -182,15 +184,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
182
184
|
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
183
185
|
|
|
184
186
|
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
if (usePortal) {
|
|
188
|
+
containerRef.current = document.createElement('div');
|
|
189
|
+
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
190
|
+
document.body.appendChild(containerRef.current);
|
|
191
|
+
}
|
|
188
192
|
return function () {
|
|
189
|
-
if (containerRef.current) {
|
|
193
|
+
if (usePortal && containerRef.current) {
|
|
190
194
|
containerRef.current.remove();
|
|
191
195
|
}
|
|
192
196
|
};
|
|
193
|
-
}, []);
|
|
197
|
+
}, [usePortal]);
|
|
198
|
+
if (!usePortal) {
|
|
199
|
+
return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, children) : null;
|
|
200
|
+
}
|
|
194
201
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
195
202
|
};
|
|
196
203
|
/* harmony default export */
|
|
@@ -83,6 +83,7 @@ export declare type ChatboxProps = {
|
|
|
83
83
|
defaultQuestions?: QuestionData;
|
|
84
84
|
showCopyBtn?: boolean;
|
|
85
85
|
autoCopyReply?: boolean;
|
|
86
|
+
usePopUp?: boolean;
|
|
86
87
|
customRequest?: CustomRequestFunction;
|
|
87
88
|
renderParser?: (input: string) => Promise<string>;
|
|
88
89
|
requestBodyFormatter?: (body: any, contextData: Record<string, any>, conversationHistory: MessageDetail[]) => Promise<Record<string, any>>;
|
package/lib/cjs/Chatbox/index.js
CHANGED
|
@@ -171,7 +171,9 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
171
171
|
var RootPortal = function RootPortal(props) {
|
|
172
172
|
var containerClassName = props.containerClassName,
|
|
173
173
|
show = props.show,
|
|
174
|
-
children = props.children
|
|
174
|
+
children = props.children,
|
|
175
|
+
_props$usePortal = props.usePortal,
|
|
176
|
+
usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
|
|
175
177
|
var containerRef = (0, react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
176
178
|
|
|
177
179
|
// Move HTML templates to tag end body </body>
|
|
@@ -182,15 +184,20 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
182
184
|
// Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
|
|
183
185
|
|
|
184
186
|
(0, react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
187
|
+
if (usePortal) {
|
|
188
|
+
containerRef.current = document.createElement('div');
|
|
189
|
+
containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
|
|
190
|
+
document.body.appendChild(containerRef.current);
|
|
191
|
+
}
|
|
188
192
|
return function () {
|
|
189
|
-
if (containerRef.current) {
|
|
193
|
+
if (usePortal && containerRef.current) {
|
|
190
194
|
containerRef.current.remove();
|
|
191
195
|
}
|
|
192
196
|
};
|
|
193
|
-
}, []);
|
|
197
|
+
}, [usePortal]);
|
|
198
|
+
if (!usePortal) {
|
|
199
|
+
return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, children) : null;
|
|
200
|
+
}
|
|
194
201
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(react__WEBPACK_IMPORTED_MODULE_0___default().Fragment, null, containerRef.current && show && /*#__PURE__*/(0, react_dom__WEBPACK_IMPORTED_MODULE_1__.createPortal)(children, containerRef.current));
|
|
195
202
|
};
|
|
196
203
|
/* harmony default export */
|
|
@@ -4430,6 +4437,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
4430
4437
|
toolkitButtons = currentProps.toolkitButtons,
|
|
4431
4438
|
newChatButton = currentProps.newChatButton,
|
|
4432
4439
|
maxHistoryLength = currentProps.maxHistoryLength,
|
|
4440
|
+
usePopUp = currentProps.usePopUp,
|
|
4433
4441
|
customRequest = currentProps.customRequest,
|
|
4434
4442
|
onQuestionClick = currentProps.onQuestionClick,
|
|
4435
4443
|
onCopyCallback = currentProps.onCopyCallback,
|
|
@@ -4502,6 +4510,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
4502
4510
|
maxHistoryLength: maxHistoryLength,
|
|
4503
4511
|
toolkitButtons: toolkitButtons,
|
|
4504
4512
|
newChatButton: newChatButton,
|
|
4513
|
+
usePopUp: usePopUp,
|
|
4505
4514
|
customRequest: customRequest,
|
|
4506
4515
|
onQuestionClick: onQuestionClick,
|
|
4507
4516
|
onCopyCallback: onCopyCallback,
|
|
@@ -5548,6 +5557,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
5548
5557
|
|
|
5549
5558
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((dist_cjs_default()), {
|
|
5550
5559
|
show: true,
|
|
5560
|
+
usePortal: args().usePopUp,
|
|
5551
5561
|
containerClassName: "Chatbox"
|
|
5552
5562
|
}, args().bubble ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
5553
5563
|
className: "".concat(args().prefix || 'custom-', "chatbox-circle"),
|
|
@@ -5584,7 +5594,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
5584
5594
|
style: {
|
|
5585
5595
|
display: show ? 'block' : 'none'
|
|
5586
5596
|
},
|
|
5587
|
-
className: "".concat(args().prefix || 'custom-', "chatbox-container"),
|
|
5597
|
+
className: "".concat(args().prefix || 'custom-', "chatbox-container ").concat(typeof args().usePopUp !== 'undefined' && args().usePopUp === false ? 'popup-none' : ''),
|
|
5588
5598
|
ref: rootRef
|
|
5589
5599
|
}, msgList.length === 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
5590
5600
|
className: "d-flex flex-column align-items-center justify-content-center ".concat(hasQuestion() ? '' : 'h-50')
|
|
@@ -5633,7 +5643,7 @@ var Chatbox = function Chatbox(props) {
|
|
|
5633
5643
|
}
|
|
5634
5644
|
});
|
|
5635
5645
|
})))) : null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
5636
|
-
className: "messages",
|
|
5646
|
+
className: "messages ".concat(msgList.length === 0 ? 'd-none' : ''),
|
|
5637
5647
|
ref: msgContainerRef
|
|
5638
5648
|
}, msgList.map(function (msg, index) {
|
|
5639
5649
|
var _msg$tag, _msg$tag2;
|