funda-ui 4.3.355 → 4.3.721
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/DynamicFields/index.d.ts +1 -0
- package/DynamicFields/index.js +23 -3
- package/EventCalendar/index.css +150 -106
- package/EventCalendar/index.d.ts +11 -2
- package/EventCalendar/index.js +835 -151
- package/EventCalendarTimeline/index.css +293 -251
- package/EventCalendarTimeline/index.d.ts +18 -9
- package/EventCalendarTimeline/index.js +1077 -505
- package/MultipleCheckboxes/index.d.ts +1 -0
- package/MultipleCheckboxes/index.js +17 -7
- package/MultipleSelect/index.d.ts +4 -0
- package/MultipleSelect/index.js +54 -8
- package/NativeSelect/index.js +1 -0
- package/Radio/index.d.ts +2 -1
- package/Radio/index.js +54 -24
- package/Select/index.js +115 -42
- package/Table/index.js +27 -3
- package/lib/cjs/DynamicFields/index.d.ts +1 -0
- package/lib/cjs/DynamicFields/index.js +23 -3
- package/lib/cjs/EventCalendar/index.d.ts +11 -2
- package/lib/cjs/EventCalendar/index.js +835 -151
- package/lib/cjs/EventCalendarTimeline/index.d.ts +18 -9
- package/lib/cjs/EventCalendarTimeline/index.js +1077 -505
- package/lib/cjs/MultipleCheckboxes/index.d.ts +1 -0
- package/lib/cjs/MultipleCheckboxes/index.js +17 -7
- package/lib/cjs/MultipleSelect/index.d.ts +4 -0
- package/lib/cjs/MultipleSelect/index.js +54 -8
- package/lib/cjs/NativeSelect/index.js +1 -0
- package/lib/cjs/Radio/index.d.ts +2 -1
- package/lib/cjs/Radio/index.js +54 -24
- package/lib/cjs/Select/index.js +115 -42
- package/lib/cjs/Table/index.js +27 -3
- package/lib/css/EventCalendar/index.css +150 -106
- package/lib/css/EventCalendarTimeline/index.css +293 -251
- package/lib/esm/DynamicFields/index.tsx +28 -3
- package/lib/esm/EventCalendar/index.scss +172 -104
- package/lib/esm/EventCalendar/index.tsx +272 -139
- package/lib/esm/EventCalendarTimeline/index.scss +275 -213
- package/lib/esm/EventCalendarTimeline/index.tsx +706 -708
- package/lib/esm/MultipleCheckboxes/index.tsx +18 -5
- package/lib/esm/MultipleSelect/ItemList.tsx +1 -0
- package/lib/esm/MultipleSelect/index.tsx +103 -52
- package/lib/esm/NativeSelect/index.tsx +2 -0
- package/lib/esm/Radio/index.tsx +68 -27
- package/lib/esm/Select/index.tsx +236 -65
- package/lib/esm/Table/Table.tsx +1 -0
- package/lib/esm/Table/TableCell.tsx +6 -0
- package/lib/esm/Table/table-utils/ToggleSelection.tsx +17 -2
- package/package.json +1 -1
package/lib/cjs/Select/index.js
CHANGED
|
@@ -3532,8 +3532,8 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3532
3532
|
onFocus = props.onFocus,
|
|
3533
3533
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
3534
3534
|
var DEPTH = depth || 1055; // the default value same as bootstrap
|
|
3535
|
-
var
|
|
3536
|
-
var LIVE_SEARCH_DISABLED =
|
|
3535
|
+
var MANUAL_REQ = typeof fetchTrigger !== 'undefined' && fetchTrigger === true ? true : false; // Manual requests
|
|
3536
|
+
var LIVE_SEARCH_DISABLED = !MANUAL_REQ && typeof window !== 'undefined' && typeof window['funda-ui__Select-disable-livesearch'] !== 'undefined' ? true : false; // Globally disable real-time search functionality (only valid for non-dynamic requests)
|
|
3537
3537
|
|
|
3538
3538
|
var FIRST_REQUEST_AUTO = typeof firstRequestAutoExec === 'undefined' ? true : firstRequestAutoExec;
|
|
3539
3539
|
var INPUT_READONLY = LIVE_SEARCH_DISABLED ? true : typeof readOnly === 'undefined' ? null : readOnly;
|
|
@@ -3648,6 +3648,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3648
3648
|
close: function close() {
|
|
3649
3649
|
cancel();
|
|
3650
3650
|
if (MULTI_SEL_VALID) popwinPosHide();
|
|
3651
|
+
},
|
|
3652
|
+
open: function open() {
|
|
3653
|
+
activate();
|
|
3651
3654
|
}
|
|
3652
3655
|
};
|
|
3653
3656
|
}, [popupRef]);
|
|
@@ -3655,6 +3658,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3655
3658
|
return {
|
|
3656
3659
|
active: function active() {
|
|
3657
3660
|
handleShowList();
|
|
3661
|
+
selectInputRef.current.select();
|
|
3658
3662
|
},
|
|
3659
3663
|
focus: function focus() {
|
|
3660
3664
|
selectInputRef.current.select();
|
|
@@ -3861,7 +3865,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3861
3865
|
// STEP 4: ===========
|
|
3862
3866
|
// value & label must be initialized
|
|
3863
3867
|
filterRes = [];
|
|
3864
|
-
if (
|
|
3868
|
+
if (MANUAL_REQ) {
|
|
3865
3869
|
// If a manual action is used to trigger the request
|
|
3866
3870
|
if (typeof fetchTriggerForDefaultData !== 'undefined' && fetchTriggerForDefaultData !== null && typeof (fetchTriggerForDefaultData === null || fetchTriggerForDefaultData === void 0 ? void 0 : fetchTriggerForDefaultData.values[0]) !== 'undefined') {
|
|
3867
3871
|
filterRes = [{
|
|
@@ -4342,7 +4346,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4342
4346
|
// hide list
|
|
4343
4347
|
setIsOpen(false);
|
|
4344
4348
|
if (!MULTI_SEL_VALID) popwinPosHide();
|
|
4345
|
-
if (
|
|
4349
|
+
if (MANUAL_REQ) {
|
|
4346
4350
|
// clean data
|
|
4347
4351
|
setOptionsData([]);
|
|
4348
4352
|
} else {
|
|
@@ -4390,7 +4394,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4390
4394
|
popwinNoMatchInit();
|
|
4391
4395
|
}, 500);
|
|
4392
4396
|
}
|
|
4393
|
-
if (
|
|
4397
|
+
if (MANUAL_REQ) {
|
|
4394
4398
|
// clean data
|
|
4395
4399
|
setOptionsData([]);
|
|
4396
4400
|
} else {
|
|
@@ -4398,6 +4402,11 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4398
4402
|
setOptionsData(orginalData);
|
|
4399
4403
|
}
|
|
4400
4404
|
|
|
4405
|
+
// When you select multiple times, it automatically focuses on the search input box
|
|
4406
|
+
if (MULTI_SEL_VALID) {
|
|
4407
|
+
selectInputRef.current.select();
|
|
4408
|
+
}
|
|
4409
|
+
|
|
4401
4410
|
// update temporary value
|
|
4402
4411
|
setControlTempValue('');
|
|
4403
4412
|
|
|
@@ -4408,6 +4417,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4408
4417
|
// This is also the element to apply the CSS '-webkit-overflow-scrolling: touch;' if desired.
|
|
4409
4418
|
if (LOCK_BODY_SCROLL) (0,bodyScrollLock.disableBodyScroll)(document.querySelector('body'));
|
|
4410
4419
|
}
|
|
4420
|
+
function fixFocusStatus() {
|
|
4421
|
+
// When selecting multiple times, in order to avoid losing
|
|
4422
|
+
if (MULTI_SEL_VALID) handleFocus(selectInputRef.current);
|
|
4423
|
+
}
|
|
4411
4424
|
function handleSelect(_x5) {
|
|
4412
4425
|
return _handleSelect.apply(this, arguments);
|
|
4413
4426
|
}
|
|
@@ -4418,9 +4431,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4418
4431
|
labelArr,
|
|
4419
4432
|
curItem,
|
|
4420
4433
|
incominggetOptionsData,
|
|
4421
|
-
_rootRef$current3,
|
|
4422
4434
|
options,
|
|
4423
4435
|
curBtn,
|
|
4436
|
+
noCallback,
|
|
4437
|
+
_rootRef$current3,
|
|
4424
4438
|
_data$callback,
|
|
4425
4439
|
_data,
|
|
4426
4440
|
_value,
|
|
@@ -4453,21 +4467,27 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4453
4467
|
case 5:
|
|
4454
4468
|
curItem = el === null ? isObject(dataInput) ? dataInput : JSON.parse(dataInput) : optionsData[Number(el.currentTarget.dataset.index)]; // get incoming options from `data-options` of component
|
|
4455
4469
|
// It is usually used for complex cascading `<Select />` components
|
|
4456
|
-
incominggetOptionsData = valueInputRef.current.dataset.options; //
|
|
4457
|
-
if (!MULTI_SEL_VALID) {
|
|
4458
|
-
cancel();
|
|
4459
|
-
}
|
|
4460
|
-
|
|
4461
|
-
//remove focus style
|
|
4462
|
-
if (!MULTI_SEL_VALID) {
|
|
4463
|
-
(_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 ? void 0 : _rootRef$current3.classList.remove('focus');
|
|
4464
|
-
}
|
|
4465
|
-
|
|
4466
|
-
// get options
|
|
4470
|
+
incominggetOptionsData = valueInputRef.current.dataset.options; // get options
|
|
4467
4471
|
options = [].slice.call(listRef.current.querySelectorAll('.list-group-item:not(.hide):not(.no-match)')); // current control of some option
|
|
4468
4472
|
curBtn = options.filter(function (node) {
|
|
4469
4473
|
return node.dataset.itemdata == JSON.stringify(curItem);
|
|
4470
|
-
})[0]; //
|
|
4474
|
+
})[0]; // Determine whether there is a callback
|
|
4475
|
+
noCallback = typeof curItem.callback === 'undefined'; // ==========================================================================
|
|
4476
|
+
// Whether to cancel or not
|
|
4477
|
+
// ==========================================================================
|
|
4478
|
+
if (noCallback) {
|
|
4479
|
+
// cancel
|
|
4480
|
+
if (!MULTI_SEL_VALID) {
|
|
4481
|
+
cancel();
|
|
4482
|
+
}
|
|
4483
|
+
|
|
4484
|
+
//remove focus style
|
|
4485
|
+
if (!MULTI_SEL_VALID) {
|
|
4486
|
+
(_rootRef$current3 = rootRef.current) === null || _rootRef$current3 === void 0 ? void 0 : _rootRef$current3.classList.remove('focus');
|
|
4487
|
+
}
|
|
4488
|
+
}
|
|
4489
|
+
|
|
4490
|
+
// update value * label
|
|
4471
4491
|
if (dataInput) {
|
|
4472
4492
|
// ==========================================================================
|
|
4473
4493
|
// Use the "keyboard" to trigger
|
|
@@ -4484,9 +4504,18 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4484
4504
|
// ++++++++++++++++++++
|
|
4485
4505
|
// clear all active classes of options
|
|
4486
4506
|
// (Avoid using the keyboard to select and two actives will appear after clicking on a non-selected option.)
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4507
|
+
if (noCallback) {
|
|
4508
|
+
options.forEach(function (node) {
|
|
4509
|
+
node.classList.remove('active');
|
|
4510
|
+
});
|
|
4511
|
+
}
|
|
4512
|
+
|
|
4513
|
+
// If there is a callback, delete the activated style
|
|
4514
|
+
if (!noCallback) {
|
|
4515
|
+
setTimeout(function () {
|
|
4516
|
+
curBtn.classList.remove('active', 'disabled');
|
|
4517
|
+
}, 0);
|
|
4518
|
+
}
|
|
4490
4519
|
|
|
4491
4520
|
//
|
|
4492
4521
|
setControlValue(_value);
|
|
@@ -4550,13 +4579,15 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4550
4579
|
adjustMultiControlContainerHeight();
|
|
4551
4580
|
|
|
4552
4581
|
// active current option
|
|
4553
|
-
|
|
4554
|
-
|
|
4555
|
-
|
|
4582
|
+
if (noCallback) {
|
|
4583
|
+
setTimeout(function () {
|
|
4584
|
+
$el.classList.add('active');
|
|
4585
|
+
}, 0);
|
|
4586
|
+
}
|
|
4556
4587
|
}
|
|
4557
4588
|
|
|
4558
4589
|
//
|
|
4559
|
-
if (typeof onChange === 'function') {
|
|
4590
|
+
if (noCallback && typeof onChange === 'function') {
|
|
4560
4591
|
onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? curItem : multipleSelectionCallback(currentControlValueArr, currentControlLabelArr));
|
|
4561
4592
|
|
|
4562
4593
|
//
|
|
@@ -4578,9 +4609,18 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4578
4609
|
|
|
4579
4610
|
// clear all active classes of options
|
|
4580
4611
|
// (Avoid using the keyboard to select and two actives will appear after clicking on a non-selected option.)
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4612
|
+
if (noCallback) {
|
|
4613
|
+
options.forEach(function (node) {
|
|
4614
|
+
node.classList.remove('active');
|
|
4615
|
+
});
|
|
4616
|
+
}
|
|
4617
|
+
|
|
4618
|
+
// If there is a callback, delete the activated style
|
|
4619
|
+
if (!noCallback) {
|
|
4620
|
+
setTimeout(function () {
|
|
4621
|
+
curBtn.classList.remove('active', 'disabled');
|
|
4622
|
+
}, 0);
|
|
4623
|
+
}
|
|
4584
4624
|
|
|
4585
4625
|
//
|
|
4586
4626
|
setControlValue(_value2);
|
|
@@ -4645,20 +4685,25 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4645
4685
|
adjustMultiControlContainerHeight();
|
|
4646
4686
|
|
|
4647
4687
|
// active current option
|
|
4648
|
-
|
|
4649
|
-
|
|
4650
|
-
|
|
4688
|
+
if (noCallback) {
|
|
4689
|
+
setTimeout(function () {
|
|
4690
|
+
_$el.classList.add('active');
|
|
4691
|
+
}, 0);
|
|
4692
|
+
}
|
|
4651
4693
|
}
|
|
4652
4694
|
|
|
4653
4695
|
//
|
|
4654
|
-
if (typeof onChange === 'function') {
|
|
4696
|
+
if (noCallback && typeof onChange === 'function') {
|
|
4655
4697
|
onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, !MULTI_SEL_VALID ? curItem : multipleSelectionCallback(_currentControlValueArr, _currentControlLabelArr));
|
|
4656
4698
|
|
|
4657
4699
|
//
|
|
4658
4700
|
selectInputRef.current.blur();
|
|
4659
4701
|
}
|
|
4660
4702
|
}
|
|
4661
|
-
|
|
4703
|
+
|
|
4704
|
+
// Fixed an out-of-focus issue
|
|
4705
|
+
fixFocusStatus();
|
|
4706
|
+
case 13:
|
|
4662
4707
|
case "end":
|
|
4663
4708
|
return _context2.stop();
|
|
4664
4709
|
}
|
|
@@ -4750,6 +4795,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4750
4795
|
_values = _values2;
|
|
4751
4796
|
}
|
|
4752
4797
|
onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, multipleSelectionCallback(_values, _labels));
|
|
4798
|
+
|
|
4799
|
+
// Fixed an out-of-focus issue
|
|
4800
|
+
fixFocusStatus();
|
|
4753
4801
|
}
|
|
4754
4802
|
function handleCleanValue(event) {
|
|
4755
4803
|
if (typeof event !== 'undefined') {
|
|
@@ -4764,7 +4812,6 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4764
4812
|
queryString: ''
|
|
4765
4813
|
};
|
|
4766
4814
|
handleSelect(null, JSON.stringify(emptyValue), [], []);
|
|
4767
|
-
onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, emptyValue);
|
|
4768
4815
|
|
|
4769
4816
|
// update temporary value
|
|
4770
4817
|
setControlTempValue(null);
|
|
@@ -4862,7 +4909,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4862
4909
|
inputVal = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : null;
|
|
4863
4910
|
_oparams = fetchFuncMethodParams || [];
|
|
4864
4911
|
_params = _oparams.map(function (item) {
|
|
4865
|
-
return item !== '$QUERY_STRING' ? item :
|
|
4912
|
+
return item !== '$QUERY_STRING' ? item : MANUAL_REQ ? '------' : '';
|
|
4866
4913
|
});
|
|
4867
4914
|
_context4.next = 5;
|
|
4868
4915
|
return fetchData(_params.join(','), finalRes(inputVal), inputVal);
|
|
@@ -4894,6 +4941,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4894
4941
|
|
|
4895
4942
|
//
|
|
4896
4943
|
handleChangeFetchSafe(val);
|
|
4944
|
+
|
|
4945
|
+
// Fixed an out-of-focus issue
|
|
4946
|
+
fixFocusStatus();
|
|
4897
4947
|
}
|
|
4898
4948
|
|
|
4899
4949
|
//
|
|
@@ -4905,7 +4955,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4905
4955
|
setControlTempValue('');
|
|
4906
4956
|
|
|
4907
4957
|
//
|
|
4908
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(
|
|
4958
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(selectInputRef.current);
|
|
4909
4959
|
}
|
|
4910
4960
|
function handleBlur(event) {
|
|
4911
4961
|
var _rootRef$current2;
|
|
@@ -4922,7 +4972,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4922
4972
|
if (listContentRef.current) listContentRef.current.focus();
|
|
4923
4973
|
}
|
|
4924
4974
|
setTimeout(function () {
|
|
4925
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(
|
|
4975
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputRef.current);
|
|
4926
4976
|
}, 300);
|
|
4927
4977
|
}
|
|
4928
4978
|
function generateInputFocusStr() {
|
|
@@ -5062,6 +5112,16 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5062
5112
|
}));
|
|
5063
5113
|
return _handleKeyPressed.apply(this, arguments);
|
|
5064
5114
|
}
|
|
5115
|
+
function handleDocOut(e) {
|
|
5116
|
+
if (e.target.closest('.custom-select__options-wrapper') === null && e.target.closest('.custom-select__wrapper') === null) {
|
|
5117
|
+
// cancel
|
|
5118
|
+
cancel();
|
|
5119
|
+
if (MULTI_SEL_VALID) popwinPosHide();
|
|
5120
|
+
|
|
5121
|
+
//
|
|
5122
|
+
handleBlur(null);
|
|
5123
|
+
}
|
|
5124
|
+
}
|
|
5065
5125
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
5066
5126
|
// Call a function when the component has been rendered completely
|
|
5067
5127
|
//--------------
|
|
@@ -5097,6 +5157,19 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5097
5157
|
}
|
|
5098
5158
|
}
|
|
5099
5159
|
}, []);
|
|
5160
|
+
|
|
5161
|
+
// Fixed an out-of-focus issue
|
|
5162
|
+
//--------------
|
|
5163
|
+
// !!! TIPS:
|
|
5164
|
+
// Fixed: When `fixFocusStatus()` is triggered, the above judgment will be invalidated, and this judgment will be used
|
|
5165
|
+
// Fixed: The pop-up window is not closed due to the mixing of business components
|
|
5166
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
5167
|
+
document.addEventListener('pointerdown', handleDocOut);
|
|
5168
|
+
return function () {
|
|
5169
|
+
document.removeEventListener('pointerdown', handleDocOut);
|
|
5170
|
+
};
|
|
5171
|
+
}, [orginalData]); // // Avoid the issue that `setOptionsData(orginalData)` sets the original value to empty on the first entry
|
|
5172
|
+
|
|
5100
5173
|
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, label ? /*#__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", {
|
|
5101
5174
|
className: "custom-select__label"
|
|
5102
5175
|
}, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
|
|
@@ -5208,7 +5281,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5208
5281
|
'reverse': isOpen
|
|
5209
5282
|
}),
|
|
5210
5283
|
style: {
|
|
5211
|
-
display:
|
|
5284
|
+
display: MANUAL_REQ ? 'none' : 'inline-block'
|
|
5212
5285
|
}
|
|
5213
5286
|
}, controlArrow ? controlArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
5214
5287
|
width: "10px",
|
|
@@ -5226,7 +5299,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5226
5299
|
transform: "translate(56.000000, 160.000000)"
|
|
5227
5300
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
5228
5301
|
d: "M144,6525.39 L142.594,6524 L133.987,6532.261 L133.069,6531.38 L133.074,6531.385 L125.427,6524.045 L124,6525.414 C126.113,6527.443 132.014,6533.107 133.987,6535 C135.453,6533.594 134.024,6534.965 144,6525.39"
|
|
5229
|
-
})))))),
|
|
5302
|
+
})))))), MANUAL_REQ ? /*#__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("span", {
|
|
5230
5303
|
className: "custom-select-multi__control-searchbtn"
|
|
5231
5304
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
|
|
5232
5305
|
tabIndex: -1,
|
|
@@ -5268,7 +5341,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5268
5341
|
className: "custom-select-multi__list"
|
|
5269
5342
|
}, typeof multiSelectSelectedItemOnlyStatus !== 'undefined' ? /*#__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("li", {
|
|
5270
5343
|
className: "custom-select-multi__list-item-statusstring"
|
|
5271
|
-
}, typeof multiSelectSelectedItemOnlyStatus.itemsLabel === 'string' && controlArr.labels.length > 0 && controlArr.labels.length < optionsData.length ? multiSelectSelectedItemOnlyStatus.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel === 'string' && controlArr.labels.length === 0 ? multiSelectSelectedItemOnlyStatus.noneLabel : null, controlArr.labels.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, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel === 'string' && controlArr.labels.length === optionsData.length ? multiSelectSelectedItemOnlyStatus.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel !== 'string' && controlArr.labels.length > 0 ? MULTI_SEL_SELECTED_STATUS.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel !== 'string' && controlArr.labels.length === 0 ? MULTI_SEL_SELECTED_STATUS.noneLabel : null, controlArr.labels.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, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel !== 'string' && controlArr.labels.length === optionsData.length ? MULTI_SEL_SELECTED_STATUS.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof renderSelectedValue === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, renderSelectedValue(controlArr, handleMultiControlItemRemove)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, controlArr.labels.map(function (item, index) {
|
|
5344
|
+
}, MANUAL_REQ ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel === 'string' && controlArr.labels.length > 0 ? multiSelectSelectedItemOnlyStatus.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel === 'string' && controlArr.labels.length === 0 ? multiSelectSelectedItemOnlyStatus.noneLabel : null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel !== 'string' && controlArr.labels.length > 0 ? MULTI_SEL_SELECTED_STATUS.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel !== 'string' && controlArr.labels.length === 0 ? MULTI_SEL_SELECTED_STATUS.noneLabel : null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel === 'string' && controlArr.labels.length > 0 && controlArr.labels.length < optionsData.length ? multiSelectSelectedItemOnlyStatus.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel === 'string' && controlArr.labels.length === 0 ? multiSelectSelectedItemOnlyStatus.noneLabel : null, controlArr.labels.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, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel === 'string' && controlArr.labels.length === optionsData.length ? multiSelectSelectedItemOnlyStatus.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel !== 'string' && controlArr.labels.length > 0 ? MULTI_SEL_SELECTED_STATUS.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel !== 'string' && controlArr.labels.length === 0 ? MULTI_SEL_SELECTED_STATUS.noneLabel : null, controlArr.labels.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, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel !== 'string' && controlArr.labels.length === optionsData.length ? MULTI_SEL_SELECTED_STATUS.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof renderSelectedValue === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, renderSelectedValue(controlArr, handleMultiControlItemRemove)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, controlArr.labels.map(function (item, index) {
|
|
5272
5345
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
|
|
5273
5346
|
key: 'selected-item-' + index,
|
|
5274
5347
|
"data-value": controlArr.values[index],
|
|
@@ -5331,7 +5404,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5331
5404
|
'reverse': isOpen
|
|
5332
5405
|
}),
|
|
5333
5406
|
style: {
|
|
5334
|
-
display:
|
|
5407
|
+
display: MANUAL_REQ ? 'none' : 'inline-block'
|
|
5335
5408
|
}
|
|
5336
5409
|
}, controlArrow ? controlArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
5337
5410
|
width: "10px",
|
|
@@ -5349,7 +5422,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5349
5422
|
transform: "translate(56.000000, 160.000000)"
|
|
5350
5423
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
5351
5424
|
d: "M144,6525.39 L142.594,6524 L133.987,6532.261 L133.069,6531.38 L133.074,6531.385 L125.427,6524.045 L124,6525.414 C126.113,6527.443 132.014,6533.107 133.987,6535 C135.453,6533.594 134.024,6534.965 144,6525.39"
|
|
5352
|
-
})))))),
|
|
5425
|
+
})))))), MANUAL_REQ ? /*#__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("span", {
|
|
5353
5426
|
className: "custom-select-multi__control-searchbtn"
|
|
5354
5427
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
|
|
5355
5428
|
tabIndex: -1,
|
package/lib/cjs/Table/index.js
CHANGED
|
@@ -1337,8 +1337,14 @@ var useTableKeyPress = function useTableKeyPress(_ref, deps) {
|
|
|
1337
1337
|
};
|
|
1338
1338
|
/* harmony default export */ const hooks_useTableKeyPress = (useTableKeyPress);
|
|
1339
1339
|
;// CONCATENATED MODULE: ./src/TableCell.tsx
|
|
1340
|
-
|
|
1340
|
+
function TableCell_typeof(obj) { "@babel/helpers - typeof"; return TableCell_typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, TableCell_typeof(obj); }
|
|
1341
|
+
var TableCell_excluded = ["children", "active", "nowrap", "activeClassName", "className", "colSpan", "style", "scope", "onClick", "onKeyDown"];
|
|
1341
1342
|
function TableCell_extends() { TableCell_extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return TableCell_extends.apply(this, arguments); }
|
|
1343
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1344
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
1345
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
1346
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return TableCell_typeof(key) === "symbol" ? key : String(key); }
|
|
1347
|
+
function _toPrimitive(input, hint) { if (TableCell_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (TableCell_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
1342
1348
|
function TableCell_objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = TableCell_objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
1343
1349
|
function TableCell_objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
1344
1350
|
|
|
@@ -1349,9 +1355,11 @@ function TableCell_objectWithoutPropertiesLoose(source, excluded) { if (source =
|
|
|
1349
1355
|
var TableCell = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (_ref, externalRef) {
|
|
1350
1356
|
var children = _ref.children,
|
|
1351
1357
|
active = _ref.active,
|
|
1358
|
+
nowrap = _ref.nowrap,
|
|
1352
1359
|
activeClassName = _ref.activeClassName,
|
|
1353
1360
|
myClassName = _ref.className,
|
|
1354
1361
|
colSpan = _ref.colSpan,
|
|
1362
|
+
style = _ref.style,
|
|
1355
1363
|
scope = _ref.scope,
|
|
1356
1364
|
_onClick = _ref.onClick,
|
|
1357
1365
|
onKeyDown = _ref.onKeyDown,
|
|
@@ -1383,6 +1391,9 @@ var TableCell = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_rea
|
|
|
1383
1391
|
}, [rootRef]),
|
|
1384
1392
|
handleKeyPressed = _useTableKeyPress.handleKeyPressed;
|
|
1385
1393
|
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(CellComponent, TableCell_extends({}, attributes, {
|
|
1394
|
+
style: typeof nowrap === 'undefined' ? style : _objectSpread({
|
|
1395
|
+
whiteSpace: (0,cls.clsWrite)(nowrap, 'normal', 'nowrap')
|
|
1396
|
+
}, style),
|
|
1386
1397
|
ref: function ref(node) {
|
|
1387
1398
|
if (typeof externalRef === 'function') {
|
|
1388
1399
|
externalRef(node);
|
|
@@ -1646,11 +1657,24 @@ var ToggleSelection = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
1646
1657
|
setSelectAll: function setSelectAll(value) {
|
|
1647
1658
|
setAllChecked(value);
|
|
1648
1659
|
},
|
|
1660
|
+
set: function set(check) {
|
|
1661
|
+
var _resolvedRef$current;
|
|
1662
|
+
var s = String((_resolvedRef$current = resolvedRef.current) === null || _resolvedRef$current === void 0 ? void 0 : _resolvedRef$current.dataset.row);
|
|
1663
|
+
setSelectedItems(function (prev) {
|
|
1664
|
+
var _data = new Set(prev);
|
|
1665
|
+
if (check) {
|
|
1666
|
+
_data.add(s);
|
|
1667
|
+
} else {
|
|
1668
|
+
_data["delete"](s);
|
|
1669
|
+
}
|
|
1670
|
+
return _data;
|
|
1671
|
+
});
|
|
1672
|
+
},
|
|
1649
1673
|
control: function control() {
|
|
1650
1674
|
return resolvedRef.current;
|
|
1651
1675
|
}
|
|
1652
1676
|
};
|
|
1653
|
-
}, [contentRef, resolvedRef]);
|
|
1677
|
+
}, [contentRef, resolvedRef, selectedItems]);
|
|
1654
1678
|
function selectTarget(rowIndex) {
|
|
1655
1679
|
var _val = String(rowIndex);
|
|
1656
1680
|
|
|
@@ -1697,7 +1721,7 @@ var ToggleSelection = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
1697
1721
|
// =================================================================
|
|
1698
1722
|
var filteredData = [];
|
|
1699
1723
|
if (!isNaN(row) && Array.isArray(originData)) {
|
|
1700
|
-
var newSelectedItems = new Set(
|
|
1724
|
+
var newSelectedItems = new Set();
|
|
1701
1725
|
newSelectedItems.add(_val);
|
|
1702
1726
|
setSelectedItems(newSelectedItems);
|
|
1703
1727
|
filteredData = originData.filter(function (v, i) {
|