funda-ui 4.5.512 → 4.5.575
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/EventCalendar/index.js +9 -0
- package/EventCalendarTimeline/index.js +21 -35
- package/LiveSearch/index.css +1 -1
- package/MasonryLayout/index.js +19 -9
- package/MultipleSelect/index.css +1 -1
- package/Select/index.css +1 -1
- package/Select/index.js +30 -5
- package/Table/index.css +1 -1
- package/lib/cjs/EventCalendar/index.js +9 -0
- package/lib/cjs/EventCalendarTimeline/index.js +21 -35
- package/lib/cjs/MasonryLayout/index.js +19 -9
- package/lib/cjs/Select/index.js +30 -5
- package/lib/css/LiveSearch/index.css +1 -1
- package/lib/css/MultipleSelect/index.css +1 -1
- package/lib/css/Select/index.css +1 -1
- package/lib/css/Table/index.css +1 -1
- package/lib/esm/EventCalendar/index.tsx +9 -0
- package/lib/esm/EventCalendarTimeline/index.tsx +310 -330
- package/lib/esm/LiveSearch/index.scss +1 -1
- package/lib/esm/MasonryLayout/index.tsx +21 -8
- package/lib/esm/MultipleSelect/index.scss +1 -1
- package/lib/esm/Select/index.scss +1 -1
- package/lib/esm/Select/index.tsx +42 -8
- package/lib/esm/Table/index.scss +1 -1
- package/package.json +1 -1
- package/MasonryLayout/index.css +0 -6
- package/lib/css/MasonryLayout/index.css +0 -6
- package/lib/esm/MasonryLayout/index.scss +0 -13
package/EventCalendar/index.js
CHANGED
|
@@ -3025,6 +3025,15 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3025
3025
|
// exposes the following methods
|
|
3026
3026
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
3027
3027
|
return {
|
|
3028
|
+
today: function today() {
|
|
3029
|
+
handleTodayChange();
|
|
3030
|
+
},
|
|
3031
|
+
next: function next() {
|
|
3032
|
+
handleNextChange();
|
|
3033
|
+
},
|
|
3034
|
+
prev: function prev() {
|
|
3035
|
+
handlePrevChange();
|
|
3036
|
+
},
|
|
3028
3037
|
closeModal: function closeModal() {
|
|
3029
3038
|
if (modalEditHandleRef.current) modalEditHandleRef.current.close();
|
|
3030
3039
|
if (modalDeleteHandleRef.current) modalDeleteHandleRef.current.close();
|
|
@@ -3990,10 +3990,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3990
3990
|
//
|
|
3991
3991
|
var FILL_BLANK_DATE_DISABLD = typeof forwardAndBackFillDisabled === 'undefined' ? true : forwardAndBackFillDisabled;
|
|
3992
3992
|
|
|
3993
|
-
// root
|
|
3994
|
-
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3995
|
-
var rootWidth = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);
|
|
3996
|
-
|
|
3997
3993
|
//
|
|
3998
3994
|
var now = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
3999
3995
|
return new Date();
|
|
@@ -4121,6 +4117,15 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4121
4117
|
// exposes the following methods
|
|
4122
4118
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
4123
4119
|
return {
|
|
4120
|
+
today: function today() {
|
|
4121
|
+
handleTodayChange();
|
|
4122
|
+
},
|
|
4123
|
+
next: function next() {
|
|
4124
|
+
handleNextChange();
|
|
4125
|
+
},
|
|
4126
|
+
prev: function prev() {
|
|
4127
|
+
handlePrevChange();
|
|
4128
|
+
},
|
|
4124
4129
|
gridInit: function gridInit() {
|
|
4125
4130
|
tableGridInit();
|
|
4126
4131
|
},
|
|
@@ -4936,6 +4941,16 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4936
4941
|
|
|
4937
4942
|
// restore table grid init status
|
|
4938
4943
|
restoreTableGridInitStatus();
|
|
4944
|
+
|
|
4945
|
+
// The scrollbar position is horizontal
|
|
4946
|
+
setTimeout(function () {
|
|
4947
|
+
if (scrollBodyRef.current && tableGridRef.current) {
|
|
4948
|
+
var targetPos = tableGridRef.current.querySelector('.custom-event-tl-table__datagrid-header__content tbody .today.selected');
|
|
4949
|
+
if (targetPos !== null) {
|
|
4950
|
+
scrollBodyRef.current.scrollLeft = targetPos.offsetLeft;
|
|
4951
|
+
}
|
|
4952
|
+
}
|
|
4953
|
+
}, 0);
|
|
4939
4954
|
}
|
|
4940
4955
|
function handleAppearanceChange(e) {
|
|
4941
4956
|
var _mode = e.target.dataset.mode;
|
|
@@ -5021,7 +5036,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5021
5036
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__cell-cushion-headercontent__container', {
|
|
5022
5037
|
'empty': !isInteractive,
|
|
5023
5038
|
'today': d === now.getDate(),
|
|
5024
|
-
'selected':
|
|
5039
|
+
'selected': "".concat(year, "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(month + 1), "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(day)) === "".concat(year, "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(month + 1), "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(d)),
|
|
5025
5040
|
'last-cell': isLastCol
|
|
5026
5041
|
}),
|
|
5027
5042
|
key: "col" + i,
|
|
@@ -5444,28 +5459,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5444
5459
|
trElements[i].style.height = tdOHeight;
|
|
5445
5460
|
}
|
|
5446
5461
|
}
|
|
5447
|
-
function outerWrapperInit() {
|
|
5448
|
-
var _rootRef$current$pare;
|
|
5449
|
-
if (rootRef.current === null) return;
|
|
5450
|
-
var hasInlineHeightOrMaxHeight = function hasInlineHeightOrMaxHeight(element) {
|
|
5451
|
-
if (!element) return false;
|
|
5452
|
-
return element.style.height !== '' || element.style.maxHeight !== '';
|
|
5453
|
-
};
|
|
5454
|
-
|
|
5455
|
-
// calculate wrapper width & height
|
|
5456
|
-
var wrapperWidth = ((_rootRef$current$pare = rootRef.current.parentElement) === null || _rootRef$current$pare === void 0 ? void 0 : _rootRef$current$pare.offsetWidth) || 0;
|
|
5457
|
-
if (rootRef.current && wrapperWidth > 0 && rootWidth.current === 0) {
|
|
5458
|
-
var _rootRef$current$pare2;
|
|
5459
|
-
rootWidth.current = wrapperWidth;
|
|
5460
|
-
rootRef.current.style.width = wrapperWidth + 'px';
|
|
5461
|
-
|
|
5462
|
-
// height
|
|
5463
|
-
var wrapperHeight = ((_rootRef$current$pare2 = rootRef.current.parentElement) === null || _rootRef$current$pare2 === void 0 ? void 0 : _rootRef$current$pare2.offsetHeight) || 0;
|
|
5464
|
-
if (hasInlineHeightOrMaxHeight(rootRef.current.parentElement) && wrapperHeight > 0) {
|
|
5465
|
-
rootRef.current.style.height = wrapperHeight + 'px';
|
|
5466
|
-
}
|
|
5467
|
-
}
|
|
5468
|
-
}
|
|
5469
5462
|
function tableGridInit() {
|
|
5470
5463
|
//
|
|
5471
5464
|
if (tableGridRef.current === null) return;
|
|
@@ -5731,10 +5724,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5731
5724
|
onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
|
|
5732
5725
|
}, [eventsValue, customTodayDate, appearanceMode]);
|
|
5733
5726
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5734
|
-
// calculate wrapper width (!!!FIRST!!!)
|
|
5735
|
-
//--------------
|
|
5736
|
-
outerWrapperInit();
|
|
5737
|
-
|
|
5738
5727
|
// !!!Please do not use dependencies
|
|
5739
5728
|
//--------------
|
|
5740
5729
|
return function () {
|
|
@@ -5747,9 +5736,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5747
5736
|
};
|
|
5748
5737
|
}, []);
|
|
5749
5738
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5750
|
-
ref: rootRef,
|
|
5751
|
-
className: "custom-event-tl__outerwrapper"
|
|
5752
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5753
5739
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl__wrapper custom-event-tl__wrapper--".concat(appearanceMode), calendarWrapperClassName)
|
|
5754
5740
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5755
5741
|
className: "custom-event-tl__header bg-body-tertiary"
|
|
@@ -5961,7 +5947,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5961
5947
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
5962
5948
|
key: i
|
|
5963
5949
|
}, generateDaysUi(item.eventSources, item.listSection, i, true));
|
|
5964
|
-
}))))))))))))
|
|
5950
|
+
})))))))))))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_2___default()), {
|
|
5965
5951
|
ref: modalDeleteHandleRef,
|
|
5966
5952
|
show: showDelete,
|
|
5967
5953
|
maskOpacity: modalMaskOpacity,
|
package/LiveSearch/index.css
CHANGED
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
--livesearch-listgroup-item-hover-focus-bg: rgba(0,0,0,.1);
|
|
20
20
|
--livesearch-listgroup-content-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
21
21
|
--livesearch-listgroup-content-scrollbar-track: rgba(0, 0, 0, 0);
|
|
22
|
-
--livesearch-listgroup-content-scrollbar-w:
|
|
22
|
+
--livesearch-listgroup-content-scrollbar-w: 10px;
|
|
23
23
|
display: none;
|
|
24
24
|
min-width: var(--livesearch-listgroup-popwin-min-width);
|
|
25
25
|
z-index: 1055; /* --bs-modal-zindex */
|
package/MasonryLayout/index.js
CHANGED
|
@@ -476,6 +476,17 @@ var MasonryLayout = function MasonryLayout(props) {
|
|
|
476
476
|
|
|
477
477
|
// STEP 3:
|
|
478
478
|
//=================
|
|
479
|
+
// Calculate the wrapper width based on the gap
|
|
480
|
+
var wrapperTotalGap = 0;
|
|
481
|
+
for (var _i2 = 0; _i2 < colCount; _i2++) {
|
|
482
|
+
if (_i2 > 0) {
|
|
483
|
+
wrapperTotalGap += GAP;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (rootRef.current) rootRef.current.style.width = "calc(100% - ".concat(wrapperTotalGap, "px)");
|
|
487
|
+
|
|
488
|
+
// STEP 4:
|
|
489
|
+
//=================
|
|
479
490
|
// Divide the children into columns
|
|
480
491
|
var items = [];
|
|
481
492
|
if (children && !Array.isArray(children)) {
|
|
@@ -493,32 +504,31 @@ var MasonryLayout = function MasonryLayout(props) {
|
|
|
493
504
|
var columnIndex = i % colCount;
|
|
494
505
|
columnWrapper["".concat(itemWrapperKey).concat(columnIndex)].push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
495
506
|
key: i,
|
|
496
|
-
className: "masonry-item",
|
|
497
507
|
style: {
|
|
498
508
|
marginBottom: "".concat(GAP, "px")
|
|
499
509
|
}
|
|
500
510
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
501
511
|
style: perBrickWidth > 0 ? {
|
|
502
|
-
|
|
512
|
+
width: perBrickWidth + 'px'
|
|
503
513
|
} : undefined
|
|
504
514
|
}, el)));
|
|
505
515
|
});
|
|
506
516
|
|
|
507
|
-
// STEP
|
|
517
|
+
// STEP 5:
|
|
508
518
|
//=================
|
|
509
519
|
// Wrapping the items in each column with a div and pushing it into the result array
|
|
510
|
-
for (var
|
|
520
|
+
for (var _i3 = 0; _i3 < colCount; _i3++) {
|
|
511
521
|
result.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
512
|
-
key:
|
|
522
|
+
key: _i3,
|
|
513
523
|
className: "masonry-item",
|
|
514
524
|
style: {
|
|
515
|
-
marginLeft: "".concat(
|
|
516
|
-
flex: 1
|
|
525
|
+
marginLeft: "".concat(_i3 > 0 ? GAP : 0, "px"),
|
|
526
|
+
flex: '0 1 auto'
|
|
517
527
|
}
|
|
518
|
-
}, columnWrapper["".concat(itemWrapperKey).concat(
|
|
528
|
+
}, columnWrapper["".concat(itemWrapperKey).concat(_i3)]));
|
|
519
529
|
}
|
|
520
530
|
|
|
521
|
-
// STEP
|
|
531
|
+
// STEP 6:
|
|
522
532
|
//=================
|
|
523
533
|
setItems(result);
|
|
524
534
|
}, [children]);
|
package/MultipleSelect/index.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--m-select-body-font-size: 0.75rem;
|
|
9
9
|
--m-select-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
10
10
|
--m-select-scrollbar-track: rgba(0, 0, 0, 0);
|
|
11
|
-
--m-select-scrollbar-w:
|
|
11
|
+
--m-select-scrollbar-w: 10px;
|
|
12
12
|
--m-select-search-icon-color: #333;
|
|
13
13
|
--m-select-body-bg: #fff;
|
|
14
14
|
--m-select-header-bg: #dee2e6;
|
package/Select/index.css
CHANGED
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
--cus-sel-listgroup-item-hover-focus-bg: rgba(0,0,0,.1);
|
|
267
267
|
--cus-sel-listgroup-content-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
268
268
|
--cus-sel-listgroup-content-scrollbar-track: rgba(0, 0, 0, 0);
|
|
269
|
-
--cus-sel-listgroup-content-scrollbar-w:
|
|
269
|
+
--cus-sel-listgroup-content-scrollbar-w: 10px;
|
|
270
270
|
--cus-sel-listgroup-grouptitle-color: #a2a2a2;
|
|
271
271
|
--cus-sel-listgroup-groupborder-color: #d8d8d8;
|
|
272
272
|
display: none;
|
package/Select/index.js
CHANGED
|
@@ -3591,6 +3591,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3591
3591
|
var listRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3592
3592
|
var listContentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3593
3593
|
var optionsRes = options ? (0,initDefaultOptions.isJSON)(options) ? JSON.parse(options) : options : [];
|
|
3594
|
+
var LIST_CONTAINER_MAX_HEIGHT = 350;
|
|
3594
3595
|
var keyboardSelectedItem = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3595
3596
|
|
|
3596
3597
|
// return a array of options
|
|
@@ -3659,6 +3660,14 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3659
3660
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
3660
3661
|
controlArr = _useState22[0],
|
|
3661
3662
|
setControlArr = _useState22[1];
|
|
3663
|
+
var listContainerHeightLimit = function listContainerHeightLimit(num) {
|
|
3664
|
+
var res = num;
|
|
3665
|
+
if (res > LIST_CONTAINER_MAX_HEIGHT) res = LIST_CONTAINER_MAX_HEIGHT;
|
|
3666
|
+
|
|
3667
|
+
// Avoid the height of the child div containing decimal points and scrollbars
|
|
3668
|
+
res = res + 1;
|
|
3669
|
+
return res;
|
|
3670
|
+
};
|
|
3662
3671
|
var multiSelControlOptionExist = function multiSelControlOptionExist(arr, val) {
|
|
3663
3672
|
var _data = arr.filter(Boolean);
|
|
3664
3673
|
return _data.map(function (v) {
|
|
@@ -4188,8 +4197,16 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4188
4197
|
|
|
4189
4198
|
// STEP 2:
|
|
4190
4199
|
//-----------
|
|
4191
|
-
// Detect
|
|
4192
|
-
|
|
4200
|
+
// Detect content MAX HEIGHT and ACTUAL HEIGHT
|
|
4201
|
+
var _contentBox = listContentRef.current.getBoundingClientRect();
|
|
4202
|
+
var _contentOldHeight = listContentRef.current.clientHeight;
|
|
4203
|
+
|
|
4204
|
+
// height restrictions
|
|
4205
|
+
_contentOldHeight = listContainerHeightLimit(_contentOldHeight);
|
|
4206
|
+
|
|
4207
|
+
// You need to wait for the height of the pop-up container to be set
|
|
4208
|
+
// Detect position、
|
|
4209
|
+
if (window.innerHeight - _triggerBox.top > _contentOldHeight) {
|
|
4193
4210
|
targetPos = 'bottom';
|
|
4194
4211
|
} else {
|
|
4195
4212
|
targetPos = 'top';
|
|
@@ -4198,11 +4215,12 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4198
4215
|
|
|
4199
4216
|
// STEP 3:
|
|
4200
4217
|
//-----------
|
|
4201
|
-
//
|
|
4202
|
-
var _contentBox = listContentRef.current.getBoundingClientRect();
|
|
4203
|
-
var _contentOldHeight = listContentRef.current.clientHeight;
|
|
4218
|
+
// Set the pop-up height
|
|
4204
4219
|
if (targetPos === 'top') {
|
|
4205
4220
|
contentMaxHeight = _triggerBox.top;
|
|
4221
|
+
|
|
4222
|
+
// height restrictions
|
|
4223
|
+
contentMaxHeight = listContainerHeightLimit(contentMaxHeight);
|
|
4206
4224
|
if (_contentBox.height > contentMaxHeight) {
|
|
4207
4225
|
listContentRef.current.style.height = contentMaxHeight - contentHeightOffset + 'px';
|
|
4208
4226
|
if (typeof listContentRef.current.dataset.height === 'undefined') listContentRef.current.dataset.height = contentMaxHeight - contentHeightOffset;
|
|
@@ -4221,6 +4239,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4221
4239
|
}
|
|
4222
4240
|
if (targetPos === 'bottom') {
|
|
4223
4241
|
contentMaxHeight = window.innerHeight - _triggerBox.bottom;
|
|
4242
|
+
|
|
4243
|
+
// height restrictions
|
|
4244
|
+
contentMaxHeight = listContainerHeightLimit(contentMaxHeight);
|
|
4224
4245
|
if (_contentBox.height > contentMaxHeight) {
|
|
4225
4246
|
listContentRef.current.style.height = contentMaxHeight - 10 + 'px';
|
|
4226
4247
|
if (typeof listContentRef.current.dataset.height === 'undefined') listContentRef.current.dataset.height = contentMaxHeight - 10;
|
|
@@ -4346,6 +4367,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4346
4367
|
var oldHeight = listContentRef.current.dataset.height;
|
|
4347
4368
|
var pos = listContentRef.current.dataset.pos;
|
|
4348
4369
|
var filteredHeight = listContentRef.current.firstChild.clientHeight;
|
|
4370
|
+
|
|
4371
|
+
// height restrictions
|
|
4372
|
+
oldHeight = listContainerHeightLimit(oldHeight);
|
|
4373
|
+
filteredHeight = listContainerHeightLimit(filteredHeight);
|
|
4349
4374
|
if (parseFloat(oldHeight) > filteredHeight) {
|
|
4350
4375
|
listContentRef.current.style.height = filteredHeight + 'px';
|
|
4351
4376
|
} else {
|
package/Table/index.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--syntable-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
9
9
|
--syntable-scrollbar-track: rgba(0, 0, 0, 0);
|
|
10
10
|
--syntable-scrollbar-h: 3px;
|
|
11
|
-
--syntable-scrollbar-w:
|
|
11
|
+
--syntable-scrollbar-w: 10px;
|
|
12
12
|
--syntable-padding-x: 1rem;
|
|
13
13
|
--syntable-padding-y: 0.5rem;
|
|
14
14
|
--syntable-cell-focus-shadow: inset 0px 0px 2px 0px rgba(13, 110, 253, 2.25);
|
|
@@ -3025,6 +3025,15 @@ var EventCalendar = function EventCalendar(props) {
|
|
|
3025
3025
|
// exposes the following methods
|
|
3026
3026
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
3027
3027
|
return {
|
|
3028
|
+
today: function today() {
|
|
3029
|
+
handleTodayChange();
|
|
3030
|
+
},
|
|
3031
|
+
next: function next() {
|
|
3032
|
+
handleNextChange();
|
|
3033
|
+
},
|
|
3034
|
+
prev: function prev() {
|
|
3035
|
+
handlePrevChange();
|
|
3036
|
+
},
|
|
3028
3037
|
closeModal: function closeModal() {
|
|
3029
3038
|
if (modalEditHandleRef.current) modalEditHandleRef.current.close();
|
|
3030
3039
|
if (modalDeleteHandleRef.current) modalDeleteHandleRef.current.close();
|
|
@@ -3990,10 +3990,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
3990
3990
|
//
|
|
3991
3991
|
var FILL_BLANK_DATE_DISABLD = typeof forwardAndBackFillDisabled === 'undefined' ? true : forwardAndBackFillDisabled;
|
|
3992
3992
|
|
|
3993
|
-
// root
|
|
3994
|
-
var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
3995
|
-
var rootWidth = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0);
|
|
3996
|
-
|
|
3997
3993
|
//
|
|
3998
3994
|
var now = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
|
3999
3995
|
return new Date();
|
|
@@ -4121,6 +4117,15 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4121
4117
|
// exposes the following methods
|
|
4122
4118
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useImperativeHandle)(contentRef, function () {
|
|
4123
4119
|
return {
|
|
4120
|
+
today: function today() {
|
|
4121
|
+
handleTodayChange();
|
|
4122
|
+
},
|
|
4123
|
+
next: function next() {
|
|
4124
|
+
handleNextChange();
|
|
4125
|
+
},
|
|
4126
|
+
prev: function prev() {
|
|
4127
|
+
handlePrevChange();
|
|
4128
|
+
},
|
|
4124
4129
|
gridInit: function gridInit() {
|
|
4125
4130
|
tableGridInit();
|
|
4126
4131
|
},
|
|
@@ -4936,6 +4941,16 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
4936
4941
|
|
|
4937
4942
|
// restore table grid init status
|
|
4938
4943
|
restoreTableGridInitStatus();
|
|
4944
|
+
|
|
4945
|
+
// The scrollbar position is horizontal
|
|
4946
|
+
setTimeout(function () {
|
|
4947
|
+
if (scrollBodyRef.current && tableGridRef.current) {
|
|
4948
|
+
var targetPos = tableGridRef.current.querySelector('.custom-event-tl-table__datagrid-header__content tbody .today.selected');
|
|
4949
|
+
if (targetPos !== null) {
|
|
4950
|
+
scrollBodyRef.current.scrollLeft = targetPos.offsetLeft;
|
|
4951
|
+
}
|
|
4952
|
+
}
|
|
4953
|
+
}, 0);
|
|
4939
4954
|
}
|
|
4940
4955
|
function handleAppearanceChange(e) {
|
|
4941
4956
|
var _mode = e.target.dataset.mode;
|
|
@@ -5021,7 +5036,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5021
5036
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)('custom-event-tl-table__cell-cushion-headercontent__container', {
|
|
5022
5037
|
'empty': !isInteractive,
|
|
5023
5038
|
'today': d === now.getDate(),
|
|
5024
|
-
'selected':
|
|
5039
|
+
'selected': "".concat(year, "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(month + 1), "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(day)) === "".concat(year, "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(month + 1), "-").concat((0,funda_utils_dist_cjs_date__WEBPACK_IMPORTED_MODULE_6__.padZero)(d)),
|
|
5025
5040
|
'last-cell': isLastCol
|
|
5026
5041
|
}),
|
|
5027
5042
|
key: "col" + i,
|
|
@@ -5444,28 +5459,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5444
5459
|
trElements[i].style.height = tdOHeight;
|
|
5445
5460
|
}
|
|
5446
5461
|
}
|
|
5447
|
-
function outerWrapperInit() {
|
|
5448
|
-
var _rootRef$current$pare;
|
|
5449
|
-
if (rootRef.current === null) return;
|
|
5450
|
-
var hasInlineHeightOrMaxHeight = function hasInlineHeightOrMaxHeight(element) {
|
|
5451
|
-
if (!element) return false;
|
|
5452
|
-
return element.style.height !== '' || element.style.maxHeight !== '';
|
|
5453
|
-
};
|
|
5454
|
-
|
|
5455
|
-
// calculate wrapper width & height
|
|
5456
|
-
var wrapperWidth = ((_rootRef$current$pare = rootRef.current.parentElement) === null || _rootRef$current$pare === void 0 ? void 0 : _rootRef$current$pare.offsetWidth) || 0;
|
|
5457
|
-
if (rootRef.current && wrapperWidth > 0 && rootWidth.current === 0) {
|
|
5458
|
-
var _rootRef$current$pare2;
|
|
5459
|
-
rootWidth.current = wrapperWidth;
|
|
5460
|
-
rootRef.current.style.width = wrapperWidth + 'px';
|
|
5461
|
-
|
|
5462
|
-
// height
|
|
5463
|
-
var wrapperHeight = ((_rootRef$current$pare2 = rootRef.current.parentElement) === null || _rootRef$current$pare2 === void 0 ? void 0 : _rootRef$current$pare2.offsetHeight) || 0;
|
|
5464
|
-
if (hasInlineHeightOrMaxHeight(rootRef.current.parentElement) && wrapperHeight > 0) {
|
|
5465
|
-
rootRef.current.style.height = wrapperHeight + 'px';
|
|
5466
|
-
}
|
|
5467
|
-
}
|
|
5468
|
-
}
|
|
5469
5462
|
function tableGridInit() {
|
|
5470
5463
|
//
|
|
5471
5464
|
if (tableGridRef.current === null) return;
|
|
@@ -5731,10 +5724,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5731
5724
|
onListRenderComplete === null || onListRenderComplete === void 0 ? void 0 : onListRenderComplete();
|
|
5732
5725
|
}, [eventsValue, customTodayDate, appearanceMode]);
|
|
5733
5726
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
5734
|
-
// calculate wrapper width (!!!FIRST!!!)
|
|
5735
|
-
//--------------
|
|
5736
|
-
outerWrapperInit();
|
|
5737
|
-
|
|
5738
5727
|
// !!!Please do not use dependencies
|
|
5739
5728
|
//--------------
|
|
5740
5729
|
return function () {
|
|
@@ -5747,9 +5736,6 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5747
5736
|
};
|
|
5748
5737
|
}, []);
|
|
5749
5738
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5750
|
-
ref: rootRef,
|
|
5751
|
-
className: "custom-event-tl__outerwrapper"
|
|
5752
|
-
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5753
5739
|
className: (0,funda_utils_dist_cjs_cls__WEBPACK_IMPORTED_MODULE_7__.combinedCls)("custom-event-tl__wrapper custom-event-tl__wrapper--".concat(appearanceMode), calendarWrapperClassName)
|
|
5754
5740
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
5755
5741
|
className: "custom-event-tl__header bg-body-tertiary"
|
|
@@ -5961,7 +5947,7 @@ var EventCalendarTimeline = function EventCalendarTimeline(props) {
|
|
|
5961
5947
|
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("tr", {
|
|
5962
5948
|
key: i
|
|
5963
5949
|
}, generateDaysUi(item.eventSources, item.listSection, i, true));
|
|
5964
|
-
}))))))))))))
|
|
5950
|
+
})))))))))))), EVENTS_ENABLED ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((funda_modaldialog__WEBPACK_IMPORTED_MODULE_2___default()), {
|
|
5965
5951
|
ref: modalDeleteHandleRef,
|
|
5966
5952
|
show: showDelete,
|
|
5967
5953
|
maskOpacity: modalMaskOpacity,
|
|
@@ -476,6 +476,17 @@ var MasonryLayout = function MasonryLayout(props) {
|
|
|
476
476
|
|
|
477
477
|
// STEP 3:
|
|
478
478
|
//=================
|
|
479
|
+
// Calculate the wrapper width based on the gap
|
|
480
|
+
var wrapperTotalGap = 0;
|
|
481
|
+
for (var _i2 = 0; _i2 < colCount; _i2++) {
|
|
482
|
+
if (_i2 > 0) {
|
|
483
|
+
wrapperTotalGap += GAP;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
if (rootRef.current) rootRef.current.style.width = "calc(100% - ".concat(wrapperTotalGap, "px)");
|
|
487
|
+
|
|
488
|
+
// STEP 4:
|
|
489
|
+
//=================
|
|
479
490
|
// Divide the children into columns
|
|
480
491
|
var items = [];
|
|
481
492
|
if (children && !Array.isArray(children)) {
|
|
@@ -493,32 +504,31 @@ var MasonryLayout = function MasonryLayout(props) {
|
|
|
493
504
|
var columnIndex = i % colCount;
|
|
494
505
|
columnWrapper["".concat(itemWrapperKey).concat(columnIndex)].push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
495
506
|
key: i,
|
|
496
|
-
className: "masonry-item",
|
|
497
507
|
style: {
|
|
498
508
|
marginBottom: "".concat(GAP, "px")
|
|
499
509
|
}
|
|
500
510
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
501
511
|
style: perBrickWidth > 0 ? {
|
|
502
|
-
|
|
512
|
+
width: perBrickWidth + 'px'
|
|
503
513
|
} : undefined
|
|
504
514
|
}, el)));
|
|
505
515
|
});
|
|
506
516
|
|
|
507
|
-
// STEP
|
|
517
|
+
// STEP 5:
|
|
508
518
|
//=================
|
|
509
519
|
// Wrapping the items in each column with a div and pushing it into the result array
|
|
510
|
-
for (var
|
|
520
|
+
for (var _i3 = 0; _i3 < colCount; _i3++) {
|
|
511
521
|
result.push( /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
|
512
|
-
key:
|
|
522
|
+
key: _i3,
|
|
513
523
|
className: "masonry-item",
|
|
514
524
|
style: {
|
|
515
|
-
marginLeft: "".concat(
|
|
516
|
-
flex: 1
|
|
525
|
+
marginLeft: "".concat(_i3 > 0 ? GAP : 0, "px"),
|
|
526
|
+
flex: '0 1 auto'
|
|
517
527
|
}
|
|
518
|
-
}, columnWrapper["".concat(itemWrapperKey).concat(
|
|
528
|
+
}, columnWrapper["".concat(itemWrapperKey).concat(_i3)]));
|
|
519
529
|
}
|
|
520
530
|
|
|
521
|
-
// STEP
|
|
531
|
+
// STEP 6:
|
|
522
532
|
//=================
|
|
523
533
|
setItems(result);
|
|
524
534
|
}, [children]);
|
package/lib/cjs/Select/index.js
CHANGED
|
@@ -3591,6 +3591,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3591
3591
|
var listRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3592
3592
|
var listContentRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3593
3593
|
var optionsRes = options ? (0,initDefaultOptions.isJSON)(options) ? JSON.parse(options) : options : [];
|
|
3594
|
+
var LIST_CONTAINER_MAX_HEIGHT = 350;
|
|
3594
3595
|
var keyboardSelectedItem = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
3595
3596
|
|
|
3596
3597
|
// return a array of options
|
|
@@ -3659,6 +3660,14 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3659
3660
|
_useState22 = _slicedToArray(_useState21, 2),
|
|
3660
3661
|
controlArr = _useState22[0],
|
|
3661
3662
|
setControlArr = _useState22[1];
|
|
3663
|
+
var listContainerHeightLimit = function listContainerHeightLimit(num) {
|
|
3664
|
+
var res = num;
|
|
3665
|
+
if (res > LIST_CONTAINER_MAX_HEIGHT) res = LIST_CONTAINER_MAX_HEIGHT;
|
|
3666
|
+
|
|
3667
|
+
// Avoid the height of the child div containing decimal points and scrollbars
|
|
3668
|
+
res = res + 1;
|
|
3669
|
+
return res;
|
|
3670
|
+
};
|
|
3662
3671
|
var multiSelControlOptionExist = function multiSelControlOptionExist(arr, val) {
|
|
3663
3672
|
var _data = arr.filter(Boolean);
|
|
3664
3673
|
return _data.map(function (v) {
|
|
@@ -4188,8 +4197,16 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4188
4197
|
|
|
4189
4198
|
// STEP 2:
|
|
4190
4199
|
//-----------
|
|
4191
|
-
// Detect
|
|
4192
|
-
|
|
4200
|
+
// Detect content MAX HEIGHT and ACTUAL HEIGHT
|
|
4201
|
+
var _contentBox = listContentRef.current.getBoundingClientRect();
|
|
4202
|
+
var _contentOldHeight = listContentRef.current.clientHeight;
|
|
4203
|
+
|
|
4204
|
+
// height restrictions
|
|
4205
|
+
_contentOldHeight = listContainerHeightLimit(_contentOldHeight);
|
|
4206
|
+
|
|
4207
|
+
// You need to wait for the height of the pop-up container to be set
|
|
4208
|
+
// Detect position、
|
|
4209
|
+
if (window.innerHeight - _triggerBox.top > _contentOldHeight) {
|
|
4193
4210
|
targetPos = 'bottom';
|
|
4194
4211
|
} else {
|
|
4195
4212
|
targetPos = 'top';
|
|
@@ -4198,11 +4215,12 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4198
4215
|
|
|
4199
4216
|
// STEP 3:
|
|
4200
4217
|
//-----------
|
|
4201
|
-
//
|
|
4202
|
-
var _contentBox = listContentRef.current.getBoundingClientRect();
|
|
4203
|
-
var _contentOldHeight = listContentRef.current.clientHeight;
|
|
4218
|
+
// Set the pop-up height
|
|
4204
4219
|
if (targetPos === 'top') {
|
|
4205
4220
|
contentMaxHeight = _triggerBox.top;
|
|
4221
|
+
|
|
4222
|
+
// height restrictions
|
|
4223
|
+
contentMaxHeight = listContainerHeightLimit(contentMaxHeight);
|
|
4206
4224
|
if (_contentBox.height > contentMaxHeight) {
|
|
4207
4225
|
listContentRef.current.style.height = contentMaxHeight - contentHeightOffset + 'px';
|
|
4208
4226
|
if (typeof listContentRef.current.dataset.height === 'undefined') listContentRef.current.dataset.height = contentMaxHeight - contentHeightOffset;
|
|
@@ -4221,6 +4239,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4221
4239
|
}
|
|
4222
4240
|
if (targetPos === 'bottom') {
|
|
4223
4241
|
contentMaxHeight = window.innerHeight - _triggerBox.bottom;
|
|
4242
|
+
|
|
4243
|
+
// height restrictions
|
|
4244
|
+
contentMaxHeight = listContainerHeightLimit(contentMaxHeight);
|
|
4224
4245
|
if (_contentBox.height > contentMaxHeight) {
|
|
4225
4246
|
listContentRef.current.style.height = contentMaxHeight - 10 + 'px';
|
|
4226
4247
|
if (typeof listContentRef.current.dataset.height === 'undefined') listContentRef.current.dataset.height = contentMaxHeight - 10;
|
|
@@ -4346,6 +4367,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4346
4367
|
var oldHeight = listContentRef.current.dataset.height;
|
|
4347
4368
|
var pos = listContentRef.current.dataset.pos;
|
|
4348
4369
|
var filteredHeight = listContentRef.current.firstChild.clientHeight;
|
|
4370
|
+
|
|
4371
|
+
// height restrictions
|
|
4372
|
+
oldHeight = listContainerHeightLimit(oldHeight);
|
|
4373
|
+
filteredHeight = listContainerHeightLimit(filteredHeight);
|
|
4349
4374
|
if (parseFloat(oldHeight) > filteredHeight) {
|
|
4350
4375
|
listContentRef.current.style.height = filteredHeight + 'px';
|
|
4351
4376
|
} else {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
--livesearch-listgroup-item-hover-focus-bg: rgba(0,0,0,.1);
|
|
20
20
|
--livesearch-listgroup-content-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
21
21
|
--livesearch-listgroup-content-scrollbar-track: rgba(0, 0, 0, 0);
|
|
22
|
-
--livesearch-listgroup-content-scrollbar-w:
|
|
22
|
+
--livesearch-listgroup-content-scrollbar-w: 10px;
|
|
23
23
|
display: none;
|
|
24
24
|
min-width: var(--livesearch-listgroup-popwin-min-width);
|
|
25
25
|
z-index: 1055; /* --bs-modal-zindex */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--m-select-body-font-size: 0.75rem;
|
|
9
9
|
--m-select-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
10
10
|
--m-select-scrollbar-track: rgba(0, 0, 0, 0);
|
|
11
|
-
--m-select-scrollbar-w:
|
|
11
|
+
--m-select-scrollbar-w: 10px;
|
|
12
12
|
--m-select-search-icon-color: #333;
|
|
13
13
|
--m-select-body-bg: #fff;
|
|
14
14
|
--m-select-header-bg: #dee2e6;
|
package/lib/css/Select/index.css
CHANGED
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
--cus-sel-listgroup-item-hover-focus-bg: rgba(0,0,0,.1);
|
|
267
267
|
--cus-sel-listgroup-content-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
268
268
|
--cus-sel-listgroup-content-scrollbar-track: rgba(0, 0, 0, 0);
|
|
269
|
-
--cus-sel-listgroup-content-scrollbar-w:
|
|
269
|
+
--cus-sel-listgroup-content-scrollbar-w: 10px;
|
|
270
270
|
--cus-sel-listgroup-grouptitle-color: #a2a2a2;
|
|
271
271
|
--cus-sel-listgroup-groupborder-color: #d8d8d8;
|
|
272
272
|
display: none;
|
package/lib/css/Table/index.css
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
--syntable-scrollbar-color: rgba(0, 0, 0, 0.2);
|
|
9
9
|
--syntable-scrollbar-track: rgba(0, 0, 0, 0);
|
|
10
10
|
--syntable-scrollbar-h: 3px;
|
|
11
|
-
--syntable-scrollbar-w:
|
|
11
|
+
--syntable-scrollbar-w: 10px;
|
|
12
12
|
--syntable-padding-x: 1rem;
|
|
13
13
|
--syntable-padding-y: 0.5rem;
|
|
14
14
|
--syntable-cell-focus-shadow: inset 0px 0px 2px 0px rgba(13, 110, 253, 2.25);
|
|
@@ -187,6 +187,15 @@ const EventCalendar = (props: EventCalendarProps) => {
|
|
|
187
187
|
useImperativeHandle(
|
|
188
188
|
contentRef,
|
|
189
189
|
() => ({
|
|
190
|
+
today: () => {
|
|
191
|
+
handleTodayChange();
|
|
192
|
+
},
|
|
193
|
+
next: () => {
|
|
194
|
+
handleNextChange();
|
|
195
|
+
},
|
|
196
|
+
prev: () => {
|
|
197
|
+
handlePrevChange();
|
|
198
|
+
},
|
|
190
199
|
closeModal: () => {
|
|
191
200
|
if (modalEditHandleRef.current) modalEditHandleRef.current.close();
|
|
192
201
|
if (modalDeleteHandleRef.current) modalDeleteHandleRef.current.close();
|