funda-ui 4.7.150 → 4.7.155

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.
@@ -110,7 +110,9 @@ __webpack_require__.r(__webpack_exports__);
110
110
  var RootPortal = function RootPortal(props) {
111
111
  var containerClassName = props.containerClassName,
112
112
  show = props.show,
113
- children = props.children;
113
+ children = props.children,
114
+ _props$usePortal = props.usePortal,
115
+ usePortal = _props$usePortal === void 0 ? true : _props$usePortal;
114
116
  var containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
115
117
 
116
118
  // Move HTML templates to tag end body </body>
@@ -121,15 +123,20 @@ var RootPortal = function RootPortal(props) {
121
123
  // Use `containerRef.current` to ensure the correctness of the nextjs framework. It may report an error document as undefined
122
124
 
123
125
  (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
124
- containerRef.current = document.createElement('div');
125
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
126
- document.body.appendChild(containerRef.current);
126
+ if (usePortal) {
127
+ containerRef.current = document.createElement('div');
128
+ containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
129
+ document.body.appendChild(containerRef.current);
130
+ }
127
131
  return function () {
128
- if (containerRef.current) {
132
+ if (usePortal && containerRef.current) {
129
133
  containerRef.current.remove();
130
134
  }
131
135
  };
132
- }, []);
136
+ }, [usePortal]);
137
+ if (!usePortal) {
138
+ return show ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, children) : null;
139
+ }
133
140
  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));
134
141
  };
135
142
  /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (RootPortal);
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
- containerRef.current = document.createElement('div');
186
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
187
- document.body.appendChild(containerRef.current);
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/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
- containerRef.current = document.createElement('div');
186
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
187
- document.body.appendChild(containerRef.current);
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
- containerRef.current = document.createElement('div');
186
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
187
- document.body.appendChild(containerRef.current);
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
- containerRef.current = document.createElement('div');
186
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
187
- document.body.appendChild(containerRef.current);
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
- containerRef.current = document.createElement('div');
186
- containerRef.current.className = "root-portal-container ".concat(containerClassName || '');
187
- document.body.appendChild(containerRef.current);
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 */
@@ -13,12 +13,19 @@ export declare type QuestionData = {
13
13
  title: string;
14
14
  list: Array<string>;
15
15
  };
16
+ export declare type SelectedOption = {
17
+ [key: string]: string | number;
18
+ curIndex: number;
19
+ curValue: string;
20
+ };
16
21
  export interface FloatingButton {
17
22
  label: string;
18
23
  value: string;
19
24
  onClick: string;
25
+ active?: boolean;
20
26
  isSelect?: boolean;
21
27
  dynamicOptions?: boolean;
28
+ defaultSelected?: number;
22
29
  [key: string]: any;
23
30
  }
24
31
  export interface FloatingButtonSelectOption {
@@ -76,6 +83,7 @@ export declare type ChatboxProps = {
76
83
  defaultQuestions?: QuestionData;
77
84
  showCopyBtn?: boolean;
78
85
  autoCopyReply?: boolean;
86
+ usePopUp?: boolean;
79
87
  customRequest?: CustomRequestFunction;
80
88
  renderParser?: (input: string) => Promise<string>;
81
89
  requestBodyFormatter?: (body: any, contextData: Record<string, any>, conversationHistory: MessageDetail[]) => Promise<Record<string, any>>;