arengibook 2.4.641 → 2.4.642

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.
Files changed (2) hide show
  1. package/dist/index.js +50 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -39346,26 +39346,23 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
39346
39346
  style: styleLabel
39347
39347
  }, option[optionLabel]));
39348
39348
  };
39349
- var selectedItemTemplate = function selectedItemTemplate(paramValue, index) {
39350
- // const selectedOption = loadedOptions.find(opt => opt[optionValue] === paramValue);
39349
+ var selectedItemTemplate = function selectedItemTemplate(option) {
39351
39350
  var selectedOption = objValue.find(function (opt) {
39352
- return opt[optionValue] === paramValue;
39351
+ return opt[optionValue] === option;
39353
39352
  });
39354
39353
  console.log("ecoute de selectedOption");
39355
39354
  console.log(loadedOptions.find(function (opt) {
39356
- return opt[optionValue] === paramValue;
39355
+ return opt[optionValue] === option;
39357
39356
  }));
39358
39357
  console.log(selectedOption);
39359
39358
  console.log(objValue);
39360
- console.log(paramValue);
39361
39359
  console.log(selectedOptions);
39362
39360
  console.log(loadedOptions);
39363
39361
  if (!selectedOption) return null;
39364
- // const isLastItem = index === selectedOptions.length - 1;
39365
39362
  var handleRemove = function handleRemove(e) {
39366
39363
  e.stopPropagation();
39367
39364
  var newSelectedOptions = selectedOptions.filter(function (opt) {
39368
- return opt !== paramValue;
39365
+ return opt !== option;
39369
39366
  });
39370
39367
  setSelectedOptions(newSelectedOptions);
39371
39368
  if (onChange) onChange(newSelectedOptions);
@@ -39392,6 +39389,52 @@ var MultiSelectMetaAsync = function MultiSelectMetaAsync(_ref) {
39392
39389
  }, "\xD7"));
39393
39390
  };
39394
39391
 
39392
+ // const selectedItemTemplate = (paramValue, index) => {
39393
+ // // const selectedOption = loadedOptions.find(opt => opt[optionValue] === paramValue);
39394
+ // const selectedOption = objValue.find(opt => opt[optionValue] === paramValue);
39395
+ //
39396
+ // console.log("ecoute de selectedOption")
39397
+ // console.log(loadedOptions.find(opt => opt[optionValue] === paramValue))
39398
+ // console.log(selectedOption)
39399
+ // console.log(objValue)
39400
+ // console.log(paramValue)
39401
+ // console.log(selectedOptions)
39402
+ // console.log(loadedOptions)
39403
+ //
39404
+ // if (!selectedOption) return null;
39405
+ // // const isLastItem = index === selectedOptions.length - 1;
39406
+ // const handleRemove = (e) => {
39407
+ // e.stopPropagation();
39408
+ // const newSelectedOptions = selectedOptions.filter(opt => opt !== paramValue);
39409
+ // setSelectedOptions(newSelectedOptions);
39410
+ // if (onChange) onChange(newSelectedOptions);
39411
+ // };
39412
+ //
39413
+ // return (
39414
+ // <span
39415
+ // onClick={handleRemove}
39416
+ // style={{
39417
+ // backgroundColor: selectedOption?.color ? selectedOption?.color : '#f8e6ec',
39418
+ // color: selectedOption?.color ? inverseColor(selectedOption?.color) : '#333',
39419
+ // padding: '6px 12px',
39420
+ // fontSize: '14px',
39421
+ // borderRadius: '8px',
39422
+ // boxShadow: '2px 2px 4px rgba(0, 0, 0, 0.15)',
39423
+ // display: 'inline-block',
39424
+ // marginBottom: '5px',
39425
+ // fontFamily: 'Arial',
39426
+ // cursor: 'pointer',
39427
+ // marginRight: '15px',
39428
+ // ...valueStyle,
39429
+ // }}
39430
+ // >
39431
+ // {selectedOption[optionLabel]}
39432
+ // <span style={{ marginLeft: '5px' }}>×</span>
39433
+ // </span>
39434
+ // );
39435
+ //
39436
+ // };
39437
+
39395
39438
  // Fonction de lazy loading
39396
39439
  var onLazyLoad = function onLazyLoad(event) {
39397
39440
  if (isOptionsArray) return;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "arengibook",
3
3
  "private": false,
4
- "version": "2.4.641",
4
+ "version": "2.4.642",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.js",
7
7
  "exports": {