arengibook 2.4.613 → 2.4.614
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/dist/index.js +28 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36039,7 +36039,8 @@ var DropdownSelectMetaAsync = function DropdownSelectMetaAsync(_ref) {
|
|
|
36039
36039
|
};
|
|
36040
36040
|
var style = {
|
|
36041
36041
|
border: invalid ? '1px solid red' : '1px solid #ccc',
|
|
36042
|
-
width: '100%'
|
|
36042
|
+
width: '100%',
|
|
36043
|
+
minHeight: '45px'
|
|
36043
36044
|
};
|
|
36044
36045
|
useEffect(function () {
|
|
36045
36046
|
setOptionSelected(objValue ? objValue === null || objValue === void 0 ? void 0 : objValue[optionValue] : value !== null && value !== void 0 ? value : null);
|
|
@@ -36086,16 +36087,6 @@ var DropdownSelectMetaAsync = function DropdownSelectMetaAsync(_ref) {
|
|
|
36086
36087
|
setIsEditing(false);
|
|
36087
36088
|
}
|
|
36088
36089
|
};
|
|
36089
|
-
var handleClear = function handleClear() {
|
|
36090
|
-
setOptionSelected(null);
|
|
36091
|
-
setInputValue('');
|
|
36092
|
-
if (onChange) onChange(null);
|
|
36093
|
-
options('', [], {
|
|
36094
|
-
page: 1
|
|
36095
|
-
}).then(function (result) {
|
|
36096
|
-
setLoadedOptions((result === null || result === void 0 ? void 0 : result.options) || []);
|
|
36097
|
-
});
|
|
36098
|
-
};
|
|
36099
36090
|
useEffect(function () {
|
|
36100
36091
|
var _dropdownRef$current;
|
|
36101
36092
|
var clearButton = (_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.querySelector('.p-dropdown-clear-icon');
|
|
@@ -36112,15 +36103,25 @@ var DropdownSelectMetaAsync = function DropdownSelectMetaAsync(_ref) {
|
|
|
36112
36103
|
setOptionSelected(e.value);
|
|
36113
36104
|
if (clickedFromList.current) {
|
|
36114
36105
|
var _selected$optionLabel;
|
|
36106
|
+
setIsEditing(false);
|
|
36115
36107
|
var selected = loadedOptions.find(function (opt) {
|
|
36116
36108
|
return opt[optionValue] === e.value;
|
|
36117
36109
|
});
|
|
36118
36110
|
setInputValue((_selected$optionLabel = selected === null || selected === void 0 ? void 0 : selected[optionLabel]) !== null && _selected$optionLabel !== void 0 ? _selected$optionLabel : '');
|
|
36119
|
-
setIsEditing(true);
|
|
36120
36111
|
}
|
|
36121
36112
|
clickedFromList.current = false;
|
|
36122
36113
|
if (onChange) onChange(e.value);
|
|
36123
36114
|
};
|
|
36115
|
+
var handleClear = function handleClear() {
|
|
36116
|
+
setOptionSelected(null);
|
|
36117
|
+
setInputValue('');
|
|
36118
|
+
if (onChange) onChange(null);
|
|
36119
|
+
options('', [], {
|
|
36120
|
+
page: 1
|
|
36121
|
+
}).then(function (result) {
|
|
36122
|
+
setLoadedOptions((result === null || result === void 0 ? void 0 : result.options) || []);
|
|
36123
|
+
});
|
|
36124
|
+
};
|
|
36124
36125
|
var handleInputChange = /*#__PURE__*/function () {
|
|
36125
36126
|
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(e) {
|
|
36126
36127
|
var search, result, _result$options2, _result, filteredOptions;
|
|
@@ -36181,8 +36182,8 @@ var DropdownSelectMetaAsync = function DropdownSelectMetaAsync(_ref) {
|
|
|
36181
36182
|
}, placeholder);
|
|
36182
36183
|
return /*#__PURE__*/React__default.createElement("span", {
|
|
36183
36184
|
style: _objectSpread2({
|
|
36184
|
-
backgroundColor: selectedOption !== null && selectedOption !== void 0 && selectedOption.color ? selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.color : '#
|
|
36185
|
-
color: selectedOption !== null && selectedOption !== void 0 && selectedOption.color ? inverseColor(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.color) : '#
|
|
36185
|
+
backgroundColor: selectedOption !== null && selectedOption !== void 0 && selectedOption.color ? selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.color : '#FFFFFF',
|
|
36186
|
+
color: selectedOption !== null && selectedOption !== void 0 && selectedOption.color ? inverseColor(selectedOption === null || selectedOption === void 0 ? void 0 : selectedOption.color) : '#FFFFFF',
|
|
36186
36187
|
padding: '6px 12px',
|
|
36187
36188
|
fontSize: '14px',
|
|
36188
36189
|
borderRadius: '8px',
|
|
@@ -36261,7 +36262,7 @@ var DropdownSelectMetaAsync = function DropdownSelectMetaAsync(_ref) {
|
|
|
36261
36262
|
options: loadedOptions,
|
|
36262
36263
|
onChange: handleChange,
|
|
36263
36264
|
filter: filter,
|
|
36264
|
-
placeholder: placeholder,
|
|
36265
|
+
placeholder: placeholder === "" || placeholder === null ? ' ' : placeholder,
|
|
36265
36266
|
optionLabel: optionLabel,
|
|
36266
36267
|
optionValue: optionValue,
|
|
36267
36268
|
showClear: true,
|
|
@@ -36311,7 +36312,7 @@ var Dropdown = function Dropdown(props) {
|
|
|
36311
36312
|
isGroupedOption = _props$isGroupedOptio === void 0 ? false : _props$isGroupedOptio,
|
|
36312
36313
|
value = props.value,
|
|
36313
36314
|
_props$placeholder = props.placeholder,
|
|
36314
|
-
placeholder = _props$placeholder === void 0 ? '
|
|
36315
|
+
placeholder = _props$placeholder === void 0 ? ' ' : _props$placeholder,
|
|
36315
36316
|
_props$disabled = props.disabled,
|
|
36316
36317
|
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
36317
36318
|
_props$filter = props.filter,
|
|
@@ -36713,12 +36714,12 @@ var DropdownPresets = {
|
|
|
36713
36714
|
}
|
|
36714
36715
|
},
|
|
36715
36716
|
SelectMetaSync: {
|
|
36716
|
-
placeholder: 'Sélectionnez une couleur',
|
|
36717
36717
|
options: optionsWithColors,
|
|
36718
|
-
value: '
|
|
36718
|
+
value: 'bleu',
|
|
36719
36719
|
// objValue: { label: 'Bleu', value: 'bleu', color: '#000000' },
|
|
36720
36720
|
isSelectMeta: true,
|
|
36721
|
-
|
|
36721
|
+
placeholder: "",
|
|
36722
|
+
editable: true,
|
|
36722
36723
|
selectMetaConfig: {
|
|
36723
36724
|
generalIcon: 'pi pi-circle-fill'
|
|
36724
36725
|
},
|
|
@@ -36773,6 +36774,7 @@ var DropdownPresets = {
|
|
|
36773
36774
|
}(),
|
|
36774
36775
|
value: 23,
|
|
36775
36776
|
// objValue: { label: 'Option 24', value: '24', color: '#000000' },
|
|
36777
|
+
placeholder: "",
|
|
36776
36778
|
editable: true,
|
|
36777
36779
|
filter: false,
|
|
36778
36780
|
selectMetaConfig: {
|
|
@@ -39131,9 +39133,6 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39131
39133
|
var currentPageRef = useRef(1);
|
|
39132
39134
|
var isOptionsArray = Array.isArray(options);
|
|
39133
39135
|
useEffect(function () {
|
|
39134
|
-
if (objValue) {
|
|
39135
|
-
setValueToOptionMap(objValue);
|
|
39136
|
-
}
|
|
39137
39136
|
if (isOptionsArray) {
|
|
39138
39137
|
setLoadedOptions(options);
|
|
39139
39138
|
} else {
|
|
@@ -39293,7 +39292,7 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39293
39292
|
clearTimeout(loadLazyTimeout.current);
|
|
39294
39293
|
}
|
|
39295
39294
|
loadLazyTimeout.current = setTimeout(/*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
39296
|
-
var first, last, _items, result, newOptions, i;
|
|
39295
|
+
var first, last, _items, result, newOptions, i, virtualscroll;
|
|
39297
39296
|
return _regenerator().w(function (_context3) {
|
|
39298
39297
|
while (1) switch (_context3.n) {
|
|
39299
39298
|
case 0:
|
|
@@ -39314,6 +39313,12 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
|
|
|
39314
39313
|
setLoadedOptions(_items);
|
|
39315
39314
|
setLoading(false);
|
|
39316
39315
|
currentPageRef.current += 1;
|
|
39316
|
+
|
|
39317
|
+
// redimensionnement du conteneur
|
|
39318
|
+
virtualscroll = document.querySelector('.p-virtualscroller.p-dropdown-items-wrapper');
|
|
39319
|
+
if (virtualscroll) {
|
|
39320
|
+
virtualscroll.style.height = "auto";
|
|
39321
|
+
}
|
|
39317
39322
|
case 2:
|
|
39318
39323
|
return _context3.a(2);
|
|
39319
39324
|
}
|