funda-ui 4.7.133 → 4.7.152
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.css +15 -4
- package/CascadingSelect/index.d.ts +2 -0
- package/CascadingSelect/index.js +294 -22
- package/CascadingSelectE2E/index.css +15 -4
- package/CascadingSelectE2E/index.d.ts +2 -0
- package/CascadingSelectE2E/index.js +300 -28
- package/Chatbox/index.d.ts +7 -0
- package/Chatbox/index.js +247 -163
- package/Checkbox/index.js +4 -2
- package/LiveSearch/index.js +2 -1
- package/Refresher/index.js +3 -3
- package/Select/index.css +33 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +350 -39
- package/SplitterPanel/index.js +3 -3
- package/Switch/index.js +4 -2
- package/Utils/format-string.d.ts +2 -1
- package/Utils/format-string.js +22 -12
- package/Utils/time.d.ts +3 -3
- package/Utils/useIsMobile.js +3 -3
- package/lib/cjs/CascadingSelect/index.d.ts +2 -0
- package/lib/cjs/CascadingSelect/index.js +294 -22
- package/lib/cjs/CascadingSelectE2E/index.d.ts +2 -0
- package/lib/cjs/CascadingSelectE2E/index.js +300 -28
- package/lib/cjs/Chatbox/index.d.ts +7 -0
- package/lib/cjs/Chatbox/index.js +247 -163
- package/lib/cjs/Checkbox/index.js +4 -2
- package/lib/cjs/LiveSearch/index.js +2 -1
- package/lib/cjs/Refresher/index.js +3 -3
- package/lib/cjs/Select/index.d.ts +1 -0
- package/lib/cjs/Select/index.js +350 -39
- package/lib/cjs/SplitterPanel/index.js +3 -3
- package/lib/cjs/Switch/index.js +4 -2
- package/lib/cjs/Utils/format-string.d.ts +2 -1
- package/lib/cjs/Utils/format-string.js +22 -12
- package/lib/cjs/Utils/time.d.ts +3 -3
- package/lib/cjs/Utils/useIsMobile.js +3 -3
- package/lib/css/CascadingSelect/index.css +15 -4
- package/lib/css/CascadingSelectE2E/index.css +15 -4
- package/lib/css/Select/index.css +33 -0
- package/lib/esm/CascadingSelect/index.scss +22 -7
- package/lib/esm/CascadingSelect/index.tsx +49 -1
- package/lib/esm/CascadingSelectE2E/Group.tsx +1 -0
- package/lib/esm/CascadingSelectE2E/index.scss +23 -6
- package/lib/esm/CascadingSelectE2E/index.tsx +53 -1
- package/lib/esm/Chatbox/index.tsx +96 -11
- package/lib/esm/Checkbox/index.tsx +5 -3
- package/lib/esm/LiveSearch/index.tsx +2 -1
- package/lib/esm/Select/index.scss +43 -2
- package/lib/esm/Select/index.tsx +81 -24
- package/lib/esm/Select/utils/func.ts +0 -10
- package/lib/esm/Switch/index.tsx +4 -2
- package/lib/esm/Textarea/index.tsx +0 -1
- package/lib/esm/Utils/hooks/useIsMobile.tsx +9 -12
- package/lib/esm/Utils/libs/format-string.ts +22 -12
- package/lib/esm/Utils/libs/time.ts +6 -6
- package/package.json +1 -1
package/Checkbox/index.js
CHANGED
|
@@ -537,7 +537,7 @@ var Checkbox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
537
537
|
var idRes = id || uniqueID;
|
|
538
538
|
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
539
539
|
var valRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
540
|
-
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(
|
|
540
|
+
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
541
541
|
_useState2 = _slicedToArray(_useState, 2),
|
|
542
542
|
val = _useState2[0],
|
|
543
543
|
setVal = _useState2[1]; // Avoid the error "react checkbox changing an uncontrolled input to be controlled"
|
|
@@ -599,7 +599,9 @@ var Checkbox = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(fu
|
|
|
599
599
|
}
|
|
600
600
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
601
601
|
// default value
|
|
602
|
-
|
|
602
|
+
if (typeof checked === 'boolean') {
|
|
603
|
+
setVal(checked);
|
|
604
|
+
}
|
|
603
605
|
|
|
604
606
|
// Set a checkbox to indeterminate state
|
|
605
607
|
if (typeof indeterminate !== 'undefined') {
|
package/LiveSearch/index.js
CHANGED
|
@@ -2827,6 +2827,7 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
2827
2827
|
onBlur = props.onBlur,
|
|
2828
2828
|
_onPressEnter = props.onPressEnter,
|
|
2829
2829
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
2830
|
+
var QUERY_STRING_PLACEHOLDER = '------'; // Invalid parameters for the first automatic request
|
|
2830
2831
|
var DEPTH = depth || 1055; // the default value same as bootstrap
|
|
2831
2832
|
var POS_OFFSET = 0;
|
|
2832
2833
|
var EXCEEDED_SIDE_POS_OFFSET = Number(exceededSidePosOffset) || 15;
|
|
@@ -3478,7 +3479,7 @@ var LiveSearch = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(
|
|
|
3478
3479
|
//--------------
|
|
3479
3480
|
var _oparams = fetchFuncMethodParams || [];
|
|
3480
3481
|
var _params = _oparams.map(function (item) {
|
|
3481
|
-
return item !== '$QUERY_STRING' ? item : fetchTrigger && !fetchUpdate ? '' : fetchUpdate ?
|
|
3482
|
+
return item !== '$QUERY_STRING' ? item : fetchTrigger && !fetchUpdate ? '' : fetchUpdate ? QUERY_STRING_PLACEHOLDER : fetchTrigger ? QUERY_STRING_PLACEHOLDER : '';
|
|
3482
3483
|
});
|
|
3483
3484
|
if (!firstFetch) {
|
|
3484
3485
|
fetchData(_params.join(','));
|
package/Refresher/index.js
CHANGED
|
@@ -245,10 +245,10 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
245
245
|
// Set the mounted state to true after the component has mounted
|
|
246
246
|
setIsMounted(true);
|
|
247
247
|
var handleResize = function handleResize() {
|
|
248
|
-
if (window) {
|
|
248
|
+
if (typeof window !== 'undefined') {
|
|
249
249
|
var detectDeviceType = function detectDeviceType() {
|
|
250
250
|
// 1. First check if window and navigator are available (SSR compatibility)
|
|
251
|
-
if (typeof window === 'undefined' ||
|
|
251
|
+
if (typeof window === 'undefined' || typeof navigator === 'undefined') {
|
|
252
252
|
return 'desktop'; // Default to desktop
|
|
253
253
|
}
|
|
254
254
|
|
|
@@ -256,7 +256,7 @@ var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_
|
|
|
256
256
|
var ua = navigator.userAgent.toLowerCase();
|
|
257
257
|
|
|
258
258
|
// 3. Get platform info
|
|
259
|
-
var platform = navigator.platform.toLowerCase();
|
|
259
|
+
var platform = navigator.platform ? navigator.platform.toLowerCase() : '';
|
|
260
260
|
|
|
261
261
|
// 4. Check screen characteristics using window.matchMedia
|
|
262
262
|
var isTouch = 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
package/Select/index.css
CHANGED
|
@@ -56,6 +56,8 @@
|
|
|
56
56
|
.custom-select__wrapper .custom-select-multi__control-blinking-cursor {
|
|
57
57
|
display: inline-block;
|
|
58
58
|
color: var(--cus-sel-placeholder-color);
|
|
59
|
+
width: 100%;
|
|
60
|
+
/* Text preview */
|
|
59
61
|
}
|
|
60
62
|
.custom-select__wrapper .custom-select-multi__control-blinking-cursor.animated {
|
|
61
63
|
animation: 1s mf-sel-blink step-end infinite;
|
|
@@ -63,6 +65,13 @@
|
|
|
63
65
|
.custom-select__wrapper .custom-select-multi__control-blinking-cursor.control-placeholder {
|
|
64
66
|
color: var(--cus-sel-input-placeholder-color);
|
|
65
67
|
}
|
|
68
|
+
.custom-select__wrapper .custom-select-multi__control-blinking-cursor > span {
|
|
69
|
+
display: inline-block;
|
|
70
|
+
text-overflow: ellipsis;
|
|
71
|
+
white-space: nowrap;
|
|
72
|
+
overflow: hidden;
|
|
73
|
+
max-width: 100%;
|
|
74
|
+
}
|
|
66
75
|
.custom-select__wrapper .custom-select-multi__control-blinking-following-cursor {
|
|
67
76
|
position: absolute;
|
|
68
77
|
top: 0.375rem;
|
|
@@ -269,9 +278,12 @@
|
|
|
269
278
|
--cus-sel-listgroup-content-scrollbar-w: 10px;
|
|
270
279
|
--cus-sel-listgroup-grouptitle-color: #a2a2a2;
|
|
271
280
|
--cus-sel-listgroup-groupborder-color: #d8d8d8;
|
|
281
|
+
--cus-sel-loader-color: #000000;
|
|
272
282
|
display: none;
|
|
273
283
|
min-width: var(--cus-sel-listgroup-popwin-min-width);
|
|
274
284
|
z-index: 1055; /* --bs-modal-zindex */
|
|
285
|
+
/*------ Loader ------*/
|
|
286
|
+
/*------ Options ------*/
|
|
275
287
|
/*------ Multiple selection ------*/
|
|
276
288
|
/*------ Group ------*/
|
|
277
289
|
/*------ Extended buttons of Multiple selection ------*/
|
|
@@ -280,6 +292,27 @@
|
|
|
280
292
|
.custom-select__options-wrapper.active {
|
|
281
293
|
display: block !important;
|
|
282
294
|
}
|
|
295
|
+
.custom-select__options-wrapper .cus-select-loader {
|
|
296
|
+
pointer-events: none;
|
|
297
|
+
z-index: 1;
|
|
298
|
+
width: 12px;
|
|
299
|
+
height: 12px;
|
|
300
|
+
text-align: center;
|
|
301
|
+
transform-origin: center;
|
|
302
|
+
transform: translate(-5px, 0) rotate(0);
|
|
303
|
+
animation: 1s linear infinite cus-select__spinner;
|
|
304
|
+
}
|
|
305
|
+
.custom-select__options-wrapper .cus-select-loader svg {
|
|
306
|
+
vertical-align: top;
|
|
307
|
+
}
|
|
308
|
+
.custom-select__options-wrapper .cus-select-loader svg path {
|
|
309
|
+
fill: var(--cus-sel-loader-color);
|
|
310
|
+
}
|
|
311
|
+
@keyframes cus-select__spinner {
|
|
312
|
+
to {
|
|
313
|
+
transform: translate(-5px, 0) rotate(-360deg);
|
|
314
|
+
}
|
|
315
|
+
}
|
|
283
316
|
.custom-select__options-wrapper .custom-select__options-contentlist {
|
|
284
317
|
overflow: hidden;
|
|
285
318
|
overflow-y: auto;
|
package/Select/index.d.ts
CHANGED