@fixefy/fixefy-ui-components 0.2.14 → 0.2.15

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.
@@ -397,112 +397,114 @@ const FxAsyncDropdown = /*#__PURE__*/ _react.default.forwardRef((props)=>{
397
397
  return rv;
398
398
  };
399
399
  const getSingleValueByModalType = (option, modal)=>{
400
- let rv = null;
401
- const clicked = getOption(option);
402
- switch(modal_type){
403
- case 'chip':
404
- rv = modal === 'displayed' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
405
- status: clicked,
406
- label: (0, _helpers.titleCase)(clicked),
407
- variant: "outlined",
408
- onDelete: ()=>{
409
- deleteOneItem(option);
410
- }
411
- }, option._id) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
412
- status: clicked,
413
- label: (0, _helpers.titleCase)(clicked),
414
- variant: "outlined"
415
- }, option._id);
416
- break;
417
- case 'logo':
418
- rv = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
419
- sx: {
420
- display: 'flex',
421
- gap: 1,
422
- color: 'grey',
423
- cursor: 'pointer',
424
- width: '100%'
425
- },
426
- children: [
427
- /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
428
- style: {
429
- width: '70px'
430
- },
431
- children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
432
- icon: `companies/${option.logo}`,
433
- width: 70,
434
- height: 16
435
- })
436
- }),
437
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
438
- sx: {
439
- width: '170px',
440
- overflow: 'hidden',
441
- display: 'flex',
442
- justifyContent: 'flex-start',
443
- gap: 1
444
- },
445
- children: [
446
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
447
- variant: "subtitle2",
448
- color: theme.palette.typography.title,
449
- children: (0, _helpers.titleCase)(clicked)
450
- }),
451
- modal === 'displayed' && /*#__PURE__*/ (0, _jsxruntime.jsx)(DeleteButton, {
452
- option: option
453
- })
454
- ]
455
- }),
456
- modal === 'list' && isChecked(option) && /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
457
- width: 16,
458
- height: 16,
459
- icon: 'filters/chosen_icon.svg'
460
- })
461
- ]
462
- }, option._id);
463
- break;
464
- case 'text':
465
- default:
466
- rv = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
467
- sx: {
468
- display: 'flex',
469
- justifyContent: 'space-between',
470
- width: '100%',
471
- maxWidth: '250px',
472
- gap: 1,
473
- color: 'grey',
474
- cursor: 'pointer'
475
- },
476
- children: [
477
- /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
478
- sx: {
479
- width: '210px',
480
- overflow: 'hidden',
481
- display: 'flex',
482
- justifyContent: 'flex-start',
483
- gap: 1
484
- },
485
- children: [
486
- /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
487
- variant: "subtitle2",
488
- color: theme.palette.typography.title,
489
- children: (0, _helpers.titleCase)(clicked)
490
- }),
491
- modal === 'displayed' && /*#__PURE__*/ (0, _jsxruntime.jsx)(DeleteButton, {
492
- option: option
400
+ if (option) {
401
+ let rv = null;
402
+ const clicked = getOption(option);
403
+ switch(modal_type){
404
+ case 'chip':
405
+ rv = modal === 'displayed' ? /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
406
+ status: clicked,
407
+ label: (0, _helpers.titleCase)(clicked),
408
+ variant: "outlined",
409
+ onDelete: ()=>{
410
+ deleteOneItem(option);
411
+ }
412
+ }, option._id) : /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxChip.FxChip, {
413
+ status: clicked,
414
+ label: (0, _helpers.titleCase)(clicked),
415
+ variant: "outlined"
416
+ }, option._id);
417
+ break;
418
+ case 'logo':
419
+ rv = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
420
+ sx: {
421
+ display: 'flex',
422
+ gap: 1,
423
+ color: 'grey',
424
+ cursor: 'pointer',
425
+ width: '100%'
426
+ },
427
+ children: [
428
+ /*#__PURE__*/ (0, _jsxruntime.jsx)("span", {
429
+ style: {
430
+ width: '70px'
431
+ },
432
+ children: /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
433
+ icon: `companies/${option.logo ? option.logo : 'logo_placeholder/logo_placeholder.svg'}`,
434
+ width: 70,
435
+ height: 16
493
436
  })
494
- ]
495
- }),
496
- modal === 'list' && isChecked(option) && /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
497
- width: 16,
498
- height: 16,
499
- icon: 'filters/chosen_icon.svg'
500
- })
501
- ]
502
- }, option._id);
503
- break;
437
+ }),
438
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
439
+ sx: {
440
+ width: '170px',
441
+ overflow: 'hidden',
442
+ display: 'flex',
443
+ justifyContent: 'flex-start',
444
+ gap: 1
445
+ },
446
+ children: [
447
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
448
+ variant: "subtitle2",
449
+ color: theme.palette.typography.title,
450
+ children: (0, _helpers.titleCase)(clicked)
451
+ }),
452
+ modal === 'displayed' && /*#__PURE__*/ (0, _jsxruntime.jsx)(DeleteButton, {
453
+ option: option
454
+ })
455
+ ]
456
+ }),
457
+ modal === 'list' && isChecked(option) && /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
458
+ width: 16,
459
+ height: 16,
460
+ icon: 'filters/chosen_icon.svg'
461
+ })
462
+ ]
463
+ }, option._id);
464
+ break;
465
+ case 'text':
466
+ default:
467
+ rv = /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
468
+ sx: {
469
+ display: 'flex',
470
+ justifyContent: 'space-between',
471
+ width: '100%',
472
+ maxWidth: '250px',
473
+ gap: 1,
474
+ color: 'grey',
475
+ cursor: 'pointer'
476
+ },
477
+ children: [
478
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Box, {
479
+ sx: {
480
+ width: '210px',
481
+ overflow: 'hidden',
482
+ display: 'flex',
483
+ justifyContent: 'flex-start',
484
+ gap: 1
485
+ },
486
+ children: [
487
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(_material.Typography, {
488
+ variant: "subtitle2",
489
+ color: theme.palette.typography.title,
490
+ children: (0, _helpers.titleCase)(clicked)
491
+ }),
492
+ modal === 'displayed' && /*#__PURE__*/ (0, _jsxruntime.jsx)(DeleteButton, {
493
+ option: option
494
+ })
495
+ ]
496
+ }),
497
+ modal === 'list' && isChecked(option) && /*#__PURE__*/ (0, _jsxruntime.jsx)(_FxIcon.FxIcon, {
498
+ width: 16,
499
+ height: 16,
500
+ icon: 'filters/chosen_icon.svg'
501
+ })
502
+ ]
503
+ }, option._id);
504
+ break;
505
+ }
506
+ return rv;
504
507
  }
505
- return rv;
506
508
  };
507
509
  const getMultipleDisplayedValues = ()=>{
508
510
  return /*#__PURE__*/ (0, _jsxruntime.jsxs)(_material.Stack, {
package/package.json CHANGED
@@ -70,5 +70,5 @@
70
70
  "require": "./dist/index.js"
71
71
  }
72
72
  },
73
- "version": "0.2.14"
73
+ "version": "0.2.15"
74
74
  }