arengibook 2.4.579 → 2.4.582
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 +23 -61
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -35802,7 +35802,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35802
35802
|
var _ref$options = _ref.options,
|
|
35803
35803
|
options = _ref$options === void 0 ? [] : _ref$options,
|
|
35804
35804
|
_ref$isGroupedOption = _ref.isGroupedOption,
|
|
35805
|
-
isGroupedOption = _ref$isGroupedOption === void 0 ?
|
|
35805
|
+
isGroupedOption = _ref$isGroupedOption === void 0 ? false : _ref$isGroupedOption,
|
|
35806
35806
|
value = _ref.value,
|
|
35807
35807
|
_ref$placeholder = _ref.placeholder,
|
|
35808
35808
|
placeholder = _ref$placeholder === void 0 ? 'Sélectionnez une option' : _ref$placeholder,
|
|
@@ -35876,39 +35876,20 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35876
35876
|
}, valueStyle)
|
|
35877
35877
|
}, (option === null || option === void 0 ? void 0 : option.label) || placeholder);
|
|
35878
35878
|
};
|
|
35879
|
-
var formatGroupedOptions = function formatGroupedOptions(options) {
|
|
35880
|
-
return Object.entries(options).map(function (_ref2) {
|
|
35881
|
-
var _ref3 = _slicedToArray$8(_ref2, 2),
|
|
35882
|
-
groupLabel = _ref3[0],
|
|
35883
|
-
groupItems = _ref3[1];
|
|
35884
|
-
return {
|
|
35885
|
-
label: groupLabel,
|
|
35886
|
-
items: Object.entries(groupItems).map(function (_ref4) {
|
|
35887
|
-
var _ref5 = _slicedToArray$8(_ref4, 2),
|
|
35888
|
-
label = _ref5[0],
|
|
35889
|
-
value = _ref5[1];
|
|
35890
|
-
return {
|
|
35891
|
-
label: label,
|
|
35892
|
-
value: value
|
|
35893
|
-
};
|
|
35894
|
-
})
|
|
35895
|
-
};
|
|
35896
|
-
});
|
|
35897
|
-
};
|
|
35898
|
-
isGroupedOption ? formatGroupedOptions(options) : options;
|
|
35899
35879
|
var groupedItemTemplate = function groupedItemTemplate(option) {
|
|
35900
|
-
var
|
|
35901
|
-
showImage =
|
|
35902
|
-
imageKey =
|
|
35903
|
-
imageStyle =
|
|
35904
|
-
showIcon =
|
|
35905
|
-
iconKey =
|
|
35906
|
-
labelStyle =
|
|
35907
|
-
generalIcon =
|
|
35908
|
-
generalImage =
|
|
35880
|
+
var _ref2 = groupedItemTemplateConfig || {},
|
|
35881
|
+
showImage = _ref2.showImage,
|
|
35882
|
+
imageKey = _ref2.imageKey,
|
|
35883
|
+
imageStyle = _ref2.imageStyle,
|
|
35884
|
+
showIcon = _ref2.showIcon,
|
|
35885
|
+
iconKey = _ref2.iconKey,
|
|
35886
|
+
labelStyle = _ref2.labelStyle,
|
|
35887
|
+
generalIcon = _ref2.generalIcon,
|
|
35888
|
+
generalImage = _ref2.generalImage;
|
|
35909
35889
|
var icon = option.value && option.value[iconKey];
|
|
35890
|
+
var styleLabel = {};
|
|
35910
35891
|
if (generalIcon || generalIcon || showImage && option[imageKey] || showIcon && icon) {
|
|
35911
|
-
|
|
35892
|
+
styleLabel = {
|
|
35912
35893
|
'marginLeft': '10px'
|
|
35913
35894
|
};
|
|
35914
35895
|
}
|
|
@@ -35920,9 +35901,13 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35920
35901
|
fontSize: '15px',
|
|
35921
35902
|
fontWeight: 'bold'
|
|
35922
35903
|
}, labelStyle)
|
|
35923
|
-
}, generalIcon && /*#__PURE__*/React__default.createElement(
|
|
35904
|
+
}, generalIcon && /*#__PURE__*/React__default.createElement("i", {
|
|
35905
|
+
style: _objectSpread2({
|
|
35906
|
+
fontSize: '15px',
|
|
35907
|
+
fontWeight: 'bold'
|
|
35908
|
+
}, labelStyle),
|
|
35924
35909
|
className: generalIcon
|
|
35925
|
-
})
|
|
35910
|
+
}), generalImage && /*#__PURE__*/React__default.createElement("img", {
|
|
35926
35911
|
alt: "General",
|
|
35927
35912
|
src: generalImage,
|
|
35928
35913
|
style: imageStyle || {
|
|
@@ -35930,7 +35915,7 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35930
35915
|
marginRight: '0.5rem'
|
|
35931
35916
|
},
|
|
35932
35917
|
className: "mr-2"
|
|
35933
|
-
})
|
|
35918
|
+
}), showImage && option[imageKey] && /*#__PURE__*/React__default.createElement("img", {
|
|
35934
35919
|
alt: option.label,
|
|
35935
35920
|
src: option[imageKey],
|
|
35936
35921
|
style: imageStyle || {
|
|
@@ -35939,38 +35924,15 @@ var Dropdown = function Dropdown(_ref) {
|
|
|
35939
35924
|
},
|
|
35940
35925
|
className: "mr-2"
|
|
35941
35926
|
}), showIcon && icon && /*#__PURE__*/React__default.createElement("i", {
|
|
35927
|
+
style: _objectSpread2({
|
|
35928
|
+
fontSize: '15px',
|
|
35929
|
+
fontWeight: 'bold'
|
|
35930
|
+
}, labelStyle),
|
|
35942
35931
|
className: 'mr-2 ' + icon
|
|
35943
35932
|
}), /*#__PURE__*/React__default.createElement("span", {
|
|
35944
35933
|
style: styleLabel
|
|
35945
35934
|
}, option.label)));
|
|
35946
35935
|
}
|
|
35947
|
-
return /*#__PURE__*/React__default.createElement("div", {
|
|
35948
|
-
className: "flex align-items-center"
|
|
35949
|
-
}, generalImage && /*#__PURE__*/React__default.createElement("img", {
|
|
35950
|
-
alt: "General",
|
|
35951
|
-
src: generalImage,
|
|
35952
|
-
style: imageStyle || {
|
|
35953
|
-
width: '18px',
|
|
35954
|
-
marginRight: '0.5rem'
|
|
35955
|
-
},
|
|
35956
|
-
className: "mr-2"
|
|
35957
|
-
}), generalIcon && /*#__PURE__*/React__default.createElement("i", {
|
|
35958
|
-
className: 'mr-2 ' + generalIcon
|
|
35959
|
-
}), showImage && option[imageKey] && /*#__PURE__*/React__default.createElement("img", {
|
|
35960
|
-
alt: option.label,
|
|
35961
|
-
src: option[imageKey],
|
|
35962
|
-
style: imageStyle || {
|
|
35963
|
-
width: '18px',
|
|
35964
|
-
marginRight: '0.5rem'
|
|
35965
|
-
},
|
|
35966
|
-
className: "mr-2"
|
|
35967
|
-
}), showIcon && icon && /*#__PURE__*/React__default.createElement("i", {
|
|
35968
|
-
className: 'mr-2 ' + icon
|
|
35969
|
-
}), /*#__PURE__*/React__default.createElement("div", {
|
|
35970
|
-
style: _objectSpread2({}, labelStyle)
|
|
35971
|
-
}, /*#__PURE__*/React__default.createElement("span", {
|
|
35972
|
-
style: styleLabel
|
|
35973
|
-
}, option.label)));
|
|
35974
35936
|
};
|
|
35975
35937
|
return /*#__PURE__*/React__default.createElement("div", {
|
|
35976
35938
|
className: "flex flex-col gap-1"
|