@xelto.npm/xc2-lib 0.1.32 → 0.1.34

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.cjs.js CHANGED
@@ -33257,7 +33257,7 @@ const defaultComponent = 'tr';
33257
33257
  * Will automatically set dynamic row height
33258
33258
  * based on the material table element parent (head, body, etc).
33259
33259
  */
33260
- const TableRow$1 = /*#__PURE__*/React__namespace.forwardRef(function TableRow(inProps, ref) {
33260
+ const TableRow$2 = /*#__PURE__*/React__namespace.forwardRef(function TableRow(inProps, ref) {
33261
33261
  const props = useThemeProps({
33262
33262
  props: inProps,
33263
33263
  name: 'MuiTableRow'
@@ -33286,7 +33286,7 @@ const TableRow$1 = /*#__PURE__*/React__namespace.forwardRef(function TableRow(in
33286
33286
  ownerState: ownerState
33287
33287
  }, other));
33288
33288
  });
33289
- process.env.NODE_ENV !== "production" ? TableRow$1.propTypes /* remove-proptypes */ = {
33289
+ process.env.NODE_ENV !== "production" ? TableRow$2.propTypes /* remove-proptypes */ = {
33290
33290
  // ----------------------------- Warning --------------------------------
33291
33291
  // | These PropTypes are generated from the TypeScript type definitions |
33292
33292
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -33323,9 +33323,9 @@ process.env.NODE_ENV !== "production" ? TableRow$1.propTypes /* remove-proptypes
33323
33323
  */
33324
33324
  sx: propTypesExports.oneOfType([propTypesExports.arrayOf(propTypesExports.oneOfType([propTypesExports.func, propTypesExports.object, propTypesExports.bool])), propTypesExports.func, propTypesExports.object])
33325
33325
  } : void 0;
33326
- var MuiTableRow = TableRow$1;
33326
+ var MuiTableRow = TableRow$2;
33327
33327
 
33328
- var TableRow = /*#__PURE__*/Object.freeze({
33328
+ var TableRow$1 = /*#__PURE__*/Object.freeze({
33329
33329
  __proto__: null,
33330
33330
  default: MuiTableRow,
33331
33331
  tableRowClasses: tableRowClasses$1,
@@ -73856,7 +73856,6 @@ var CustomButton = styled$1(Button$2, {
73856
73856
  border: '2px solid #293072',
73857
73857
  backgroundColor: theme.mainPallete.primary.white,
73858
73858
  color: theme.mainPallete.primary.blue,
73859
- textTransform: 'uppercase',
73860
73859
  fontFamily: ['"Barlow", sans-serif'],
73861
73860
  '&:hover': {
73862
73861
  boxShadow: 'none'
@@ -74134,7 +74133,6 @@ var CustomIconButton = styled$1(Button$2, {
74134
74133
  fontWeight: 'bold',
74135
74134
  boxShadow: 'none',
74136
74135
  border: '2px solid #293072',
74137
- textTransform: 'uppercase',
74138
74136
  fontFamily: ['"Barlow", sans-serif'],
74139
74137
  padding: '4px 21px',
74140
74138
  fontSize: '16px',
@@ -90508,7 +90506,7 @@ var slice = {
90508
90506
 
90509
90507
  var require$$50 = /*@__PURE__*/getAugmentedNamespace(TableCell);
90510
90508
 
90511
- var require$$51 = /*@__PURE__*/getAugmentedNamespace(TableRow);
90509
+ var require$$51 = /*@__PURE__*/getAugmentedNamespace(TableRow$1);
90512
90510
 
90513
90511
  var require$$52 = /*@__PURE__*/getAugmentedNamespace(Checkbox);
90514
90512
 
@@ -98573,92 +98571,104 @@ var StyledCustomTable = styled$1(Box$1)(function (_ref) {
98573
98571
  textAlign: 'left'
98574
98572
  }
98575
98573
  }
98574
+ }
98575
+ }
98576
+ };
98577
+ });
98578
+ var TableRow = styled$1('tr')(function () {
98579
+ return {
98580
+ '&.selected': {
98581
+ backgroundColor: 'rgba(22, 199, 165,0.11) !important'
98582
+ },
98583
+ '&.highlight-green': {
98584
+ backgroundColor: 'rgba(201,224,27, 0.33)'
98585
+ },
98586
+ '&.highlight-red': {
98587
+ backgroundColor: 'rgba(224,95,27,0.33)'
98588
+ },
98589
+ '&.highlight-orange': {
98590
+ backgroundColor: 'rgba(255,166,44,0.33)'
98591
+ },
98592
+ 'td:last-child': {
98593
+ paddingRight: '10px',
98594
+ 'div.MuiTextField-root': {
98595
+ borderWidth: '0px',
98596
+ 'input': {
98597
+ textAlign: 'right'
98598
+ },
98599
+ 'svg': {
98600
+ display: 'none'
98601
+ }
98602
+ }
98603
+ },
98604
+ 'td': {
98605
+ fontFamily: theme.fontFamily,
98606
+ fontSize: '16px',
98607
+ lineHeight: '21px',
98608
+ fontWeight: theme.fontWeight.regular,
98609
+ color: theme.mainPallete.primary.blue,
98610
+ padding: '5px 10px',
98611
+ verticalAlign: 'middle',
98612
+ borderWidth: '0 0 1.5px 0',
98613
+ borderColor: '#DBE0F2',
98614
+ borderStyle: 'solid',
98615
+ '@media(min-width: 480px)': {
98616
+ padding: '25px 10px',
98617
+ verticalAlign: 'top'
98576
98618
  },
98577
- 'tbody': {
98578
- 'tr.selected': {
98579
- backgroundColor: 'rgba(22, 199, 165,0.11)'
98619
+ 'div.MuiTextField-root': {
98620
+ borderWidth: '0px',
98621
+ 'input': {
98622
+ textAlign: 'left'
98580
98623
  },
98581
- 'tr.custom-row-component': {
98582
- 'td:last-child': {
98583
- paddingRight: '10px',
98584
- 'div.MuiTextField-root': {
98585
- borderWidth: '0px',
98586
- 'input': {
98587
- textAlign: 'right'
98588
- },
98589
- 'svg': {
98590
- display: 'none'
98591
- }
98592
- }
98593
- },
98594
- 'td': {
98595
- fontFamily: theme.fontFamily,
98596
- fontSize: '16px',
98597
- lineHeight: '21px',
98598
- fontWeight: theme.fontWeight.regular,
98599
- color: theme.mainPallete.primary.blue,
98600
- padding: '5px 10px',
98601
- verticalAlign: 'middle',
98602
- borderWidth: '0 0 1.5px 0',
98603
- borderColor: '#DBE0F2',
98604
- borderStyle: 'solid',
98605
- '@media(min-width: 480px)': {
98606
- padding: '25px 10px',
98607
- verticalAlign: 'top'
98608
- },
98609
- 'div.MuiTextField-root': {
98610
- borderWidth: '0px',
98611
- 'input': {
98612
- textAlign: 'left'
98613
- },
98614
- 'svg': {
98615
- display: 'none'
98616
- },
98617
- '.MuiOutlinedInput-root': {
98618
- margin: '5px 0',
98619
- '&.Mui-focused': {
98620
- backgroundColor: 'white'
98621
- }
98622
- }
98623
- },
98624
- '&:first-child': {
98625
- textAlign: 'left'
98626
- },
98627
- '&:last-child': {
98628
- textAlign: 'right'
98629
- },
98630
- 'div.text': {
98631
- padding: 0,
98632
- // height: '34px',
98633
- display: 'flex',
98634
- flexDirection: 'column',
98635
- justifyContent: 'center',
98636
- fontSize: '13px',
98637
- lineHeight: '17px',
98638
- fontWeight: 'regular',
98639
- '@media(min-width: 480px)': {
98640
- height: '45px',
98641
- fontSize: '16px',
98642
- lineHeight: '15px',
98643
- margin: '5px 0'
98644
- },
98645
- '@media(min-width: 720px)': {
98646
- fontSize: '24px',
98647
- lineHeight: '25px'
98648
- },
98649
- '@media(min-width: 1024px)': {
98650
- padding: '9px 25px 10px 25px',
98651
- fontSize: '12px',
98652
- lineHeight: '16px'
98653
- }
98654
- }
98655
- },
98656
- '&:hover': {
98657
- '@media(min-width:1024px)': {
98658
- backgroundColor: 'rgba(22, 199, 165,0.11)'
98659
- }
98624
+ 'svg': {
98625
+ display: 'none'
98626
+ },
98627
+ '.MuiOutlinedInput-root': {
98628
+ margin: '5px 0',
98629
+ '&.Mui-focused': {
98630
+ backgroundColor: 'white'
98660
98631
  }
98661
98632
  }
98633
+ },
98634
+ '&:first-child': {
98635
+ textAlign: 'left'
98636
+ },
98637
+ '&:last-child': {
98638
+ textAlign: 'right'
98639
+ },
98640
+ 'div.text': {
98641
+ padding: 0,
98642
+ // height: '34px',
98643
+ display: 'flex',
98644
+ flexDirection: 'column',
98645
+ justifyContent: 'center',
98646
+ fontSize: '13px',
98647
+ lineHeight: '17px',
98648
+ fontWeight: 'regular',
98649
+ '&.bold': {
98650
+ fontWeight: 'bold'
98651
+ },
98652
+ '@media(min-width: 480px)': {
98653
+ height: '45px',
98654
+ fontSize: '16px',
98655
+ lineHeight: '15px',
98656
+ margin: '5px 0'
98657
+ },
98658
+ '@media(min-width: 720px)': {
98659
+ fontSize: '24px',
98660
+ lineHeight: '25px'
98661
+ },
98662
+ '@media(min-width: 1024px)': {
98663
+ padding: '9px 25px 10px 25px',
98664
+ fontSize: '12px',
98665
+ lineHeight: '16px'
98666
+ }
98667
+ }
98668
+ },
98669
+ '&:hover': {
98670
+ '@media(min-width:1024px)': {
98671
+ backgroundColor: 'rgba(22, 199, 165,0.11)'
98662
98672
  }
98663
98673
  }
98664
98674
  };
@@ -98677,6 +98687,7 @@ var RenderTextField = /*#__PURE__*/React.memo(function (_ref2) {
98677
98687
  _useState2 = _slicedToArray$a(_useState, 2),
98678
98688
  customValue = _useState2[0],
98679
98689
  setCustomValue = _useState2[1];
98690
+ var isBold = (item === null || item === void 0 ? void 0 : item.bold) || false;
98680
98691
  return /*#__PURE__*/React.createElement(React.Fragment, null, isEditable && /*#__PURE__*/React.createElement(TextField, {
98681
98692
  label: "",
98682
98693
  small: true,
@@ -98698,22 +98709,25 @@ var RenderTextField = /*#__PURE__*/React.memo(function (_ref2) {
98698
98709
  key: index,
98699
98710
  value: customValue
98700
98711
  }), !isEditable && /*#__PURE__*/React.createElement("div", {
98701
- className: "text"
98712
+ className: "text ".concat(isBold ? 'bold' : '')
98702
98713
  }, value));
98703
98714
  });
98704
- var CustomRowComponent = /*#__PURE__*/React.memo(function (_ref3) {
98715
+ var CustomRowComponent = function CustomRowComponent(_ref3) {
98705
98716
  var data = _ref3.data,
98706
98717
  rowIndex = _ref3.rowIndex,
98718
+ onDoubleClick = _ref3.onDoubleClick,
98707
98719
  handleClick = _ref3.handleClick,
98708
98720
  rowsSelected = _ref3.rowsSelected,
98709
98721
  tableData = _ref3.tableData,
98710
98722
  handleChangeData = _ref3.handleChangeData;
98711
98723
  if (data.length <= 0) return null;
98712
98724
  var uniqueRowKey = "row-".concat(rowIndex + 1);
98713
- return /*#__PURE__*/React.createElement("tr", {
98725
+ var style = tableData[rowIndex][2] || '';
98726
+ return /*#__PURE__*/React.createElement(TableRow, {
98714
98727
  key: uniqueRowKey,
98715
98728
  onClick: handleClick,
98716
- className: rowsSelected !== undefined && rowsSelected.indexOf(rowIndex) !== -1 ? 'custom-row-component selected' : 'custom-row-component'
98729
+ onDoubleClick: onDoubleClick,
98730
+ className: "".concat(rowsSelected !== undefined && rowsSelected.indexOf(rowIndex) !== -1 ? 'selected' : '', " ").concat(style)
98717
98731
  }, data.map(function (column, key) {
98718
98732
  var uniqueCellKey = "".concat(uniqueRowKey, "-column-").concat(key + 1);
98719
98733
  return /*#__PURE__*/React.createElement("td", {
@@ -98732,7 +98746,7 @@ var CustomRowComponent = /*#__PURE__*/React.memo(function (_ref3) {
98732
98746
  });
98733
98747
  }));
98734
98748
  }));
98735
- });
98749
+ };
98736
98750
  var TableMobileComponent = function TableMobileComponent(_ref4) {
98737
98751
  var id = _ref4.id,
98738
98752
  columns = _ref4.columns,
@@ -98746,7 +98760,8 @@ var TableMobileComponent = function TableMobileComponent(_ref4) {
98746
98760
  selectionType = _ref4.selectionType,
98747
98761
  rowsSelected = _ref4.rowsSelected,
98748
98762
  setSelectedRows = _ref4.setSelectedRows,
98749
- searchPlaceholder = _ref4.searchPlaceholder;
98763
+ searchPlaceholder = _ref4.searchPlaceholder,
98764
+ onRowDoubleClick = _ref4.onRowDoubleClick;
98750
98765
  var _useState3 = React.useState([]),
98751
98766
  _useState4 = _slicedToArray$a(_useState3, 2),
98752
98767
  values = _useState4[0],
@@ -98797,6 +98812,7 @@ var TableMobileComponent = function TableMobileComponent(_ref4) {
98797
98812
  return handleRowClick(rowIndex);
98798
98813
  } : null,
98799
98814
  handleChangeData: handleChangeData,
98815
+ onDoubleClick: onRowDoubleClick,
98800
98816
  rowsSelected: rowsSelected,
98801
98817
  tableData: values
98802
98818
  });
@@ -98853,7 +98869,8 @@ TableMobileComponent.propTypes = {
98853
98869
  })),
98854
98870
  includeSearch: propTypesExports.bool,
98855
98871
  handleChangeData: propTypesExports.func,
98856
- setSelectedRows: propTypesExports.func
98872
+ setSelectedRows: propTypesExports.func,
98873
+ onRowDoubleClick: propTypesExports.oneOfType([propTypesExports.func, undefined])
98857
98874
  };
98858
98875
  TableMobileComponent.defaultProps = {
98859
98876
  columns: [],
@@ -98862,7 +98879,8 @@ TableMobileComponent.defaultProps = {
98862
98879
  handleChangeData: function handleChangeData() {},
98863
98880
  fixedHeader: true,
98864
98881
  tableBodyMaxHeight: "100vh",
98865
- setSelectedRows: function setSelectedRows() {}
98882
+ setSelectedRows: function setSelectedRows() {},
98883
+ onRowDoubleClick: undefined
98866
98884
  };
98867
98885
 
98868
98886
  var StyledModalContainer = styled$1(Box$1)(function (_ref) {
@@ -99245,7 +99263,7 @@ var StyledStep = styled$1(function (props) {
99245
99263
  var CustomStepper = function CustomStepper(_ref4) {
99246
99264
  var steps = _ref4.steps,
99247
99265
  label = _ref4.label,
99248
- withIcon = _ref4.withIcon,
99266
+ scan = _ref4.scan,
99249
99267
  currentStep = _ref4.currentStep,
99250
99268
  errorMessage = _ref4.errorMessage;
99251
99269
  var currentStepIndex = steps.findIndex(function (step) {
@@ -99260,10 +99278,13 @@ var CustomStepper = function CustomStepper(_ref4) {
99260
99278
  sx: {
99261
99279
  width: '100%'
99262
99280
  }
99263
- }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), withIcon && /*#__PURE__*/React.createElement(Icon, {
99264
- iconName: 'icon_wf_no_barcode_printer',
99281
+ }, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), typeof scan === 'boolean' && (scan ? /*#__PURE__*/React.createElement(Icon, {
99282
+ iconName: 'icon_wf_scan',
99283
+ size: 'responsive'
99284
+ }) : /*#__PURE__*/React.createElement(Icon, {
99285
+ iconName: 'icon_wf_no_scan',
99265
99286
  size: 'responsive'
99266
- }))), /*#__PURE__*/React.createElement(StyledStepper, {
99287
+ })))), /*#__PURE__*/React.createElement(StyledStepper, {
99267
99288
  activeStep: currentStepIndex,
99268
99289
  numberOfSteps: steps.length
99269
99290
  }, steps.map(function (step, index) {
@@ -99281,7 +99302,7 @@ CustomStepper.propTypes = {
99281
99302
  })]),
99282
99303
  label: propTypesExports.string,
99283
99304
  steps: propTypesExports.arrayOf(propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.string)])),
99284
- withIcon: propTypesExports.bool,
99305
+ scan: propTypesExports.bool,
99285
99306
  errorMessage: propTypesExports.string
99286
99307
  };
99287
99308
  CustomStepper.defaultProps = {
@@ -99289,7 +99310,6 @@ CustomStepper.defaultProps = {
99289
99310
  forwardedRef: function forwardedRef() {},
99290
99311
  label: '',
99291
99312
  steps: [],
99292
- withIcon: false,
99293
99313
  errorMessage: 'Error'
99294
99314
  };
99295
99315
 
package/dist/index.esm.js CHANGED
@@ -33237,7 +33237,7 @@ const defaultComponent = 'tr';
33237
33237
  * Will automatically set dynamic row height
33238
33238
  * based on the material table element parent (head, body, etc).
33239
33239
  */
33240
- const TableRow$1 = /*#__PURE__*/React.forwardRef(function TableRow(inProps, ref) {
33240
+ const TableRow$2 = /*#__PURE__*/React.forwardRef(function TableRow(inProps, ref) {
33241
33241
  const props = useThemeProps({
33242
33242
  props: inProps,
33243
33243
  name: 'MuiTableRow'
@@ -33266,7 +33266,7 @@ const TableRow$1 = /*#__PURE__*/React.forwardRef(function TableRow(inProps, ref)
33266
33266
  ownerState: ownerState
33267
33267
  }, other));
33268
33268
  });
33269
- process.env.NODE_ENV !== "production" ? TableRow$1.propTypes /* remove-proptypes */ = {
33269
+ process.env.NODE_ENV !== "production" ? TableRow$2.propTypes /* remove-proptypes */ = {
33270
33270
  // ----------------------------- Warning --------------------------------
33271
33271
  // | These PropTypes are generated from the TypeScript type definitions |
33272
33272
  // | To update them edit the d.ts file and run "yarn proptypes" |
@@ -33303,9 +33303,9 @@ process.env.NODE_ENV !== "production" ? TableRow$1.propTypes /* remove-proptypes
33303
33303
  */
33304
33304
  sx: propTypesExports.oneOfType([propTypesExports.arrayOf(propTypesExports.oneOfType([propTypesExports.func, propTypesExports.object, propTypesExports.bool])), propTypesExports.func, propTypesExports.object])
33305
33305
  } : void 0;
33306
- var MuiTableRow = TableRow$1;
33306
+ var MuiTableRow = TableRow$2;
33307
33307
 
33308
- var TableRow = /*#__PURE__*/Object.freeze({
33308
+ var TableRow$1 = /*#__PURE__*/Object.freeze({
33309
33309
  __proto__: null,
33310
33310
  default: MuiTableRow,
33311
33311
  tableRowClasses: tableRowClasses$1,
@@ -73836,7 +73836,6 @@ var CustomButton = styled$1(Button$2, {
73836
73836
  border: '2px solid #293072',
73837
73837
  backgroundColor: theme.mainPallete.primary.white,
73838
73838
  color: theme.mainPallete.primary.blue,
73839
- textTransform: 'uppercase',
73840
73839
  fontFamily: ['"Barlow", sans-serif'],
73841
73840
  '&:hover': {
73842
73841
  boxShadow: 'none'
@@ -74114,7 +74113,6 @@ var CustomIconButton = styled$1(Button$2, {
74114
74113
  fontWeight: 'bold',
74115
74114
  boxShadow: 'none',
74116
74115
  border: '2px solid #293072',
74117
- textTransform: 'uppercase',
74118
74116
  fontFamily: ['"Barlow", sans-serif'],
74119
74117
  padding: '4px 21px',
74120
74118
  fontSize: '16px',
@@ -90488,7 +90486,7 @@ var slice = {
90488
90486
 
90489
90487
  var require$$50 = /*@__PURE__*/getAugmentedNamespace(TableCell);
90490
90488
 
90491
- var require$$51 = /*@__PURE__*/getAugmentedNamespace(TableRow);
90489
+ var require$$51 = /*@__PURE__*/getAugmentedNamespace(TableRow$1);
90492
90490
 
90493
90491
  var require$$52 = /*@__PURE__*/getAugmentedNamespace(Checkbox);
90494
90492
 
@@ -98553,92 +98551,104 @@ var StyledCustomTable = styled$1(Box$1)(function (_ref) {
98553
98551
  textAlign: 'left'
98554
98552
  }
98555
98553
  }
98554
+ }
98555
+ }
98556
+ };
98557
+ });
98558
+ var TableRow = styled$1('tr')(function () {
98559
+ return {
98560
+ '&.selected': {
98561
+ backgroundColor: 'rgba(22, 199, 165,0.11) !important'
98562
+ },
98563
+ '&.highlight-green': {
98564
+ backgroundColor: 'rgba(201,224,27, 0.33)'
98565
+ },
98566
+ '&.highlight-red': {
98567
+ backgroundColor: 'rgba(224,95,27,0.33)'
98568
+ },
98569
+ '&.highlight-orange': {
98570
+ backgroundColor: 'rgba(255,166,44,0.33)'
98571
+ },
98572
+ 'td:last-child': {
98573
+ paddingRight: '10px',
98574
+ 'div.MuiTextField-root': {
98575
+ borderWidth: '0px',
98576
+ 'input': {
98577
+ textAlign: 'right'
98578
+ },
98579
+ 'svg': {
98580
+ display: 'none'
98581
+ }
98582
+ }
98583
+ },
98584
+ 'td': {
98585
+ fontFamily: theme.fontFamily,
98586
+ fontSize: '16px',
98587
+ lineHeight: '21px',
98588
+ fontWeight: theme.fontWeight.regular,
98589
+ color: theme.mainPallete.primary.blue,
98590
+ padding: '5px 10px',
98591
+ verticalAlign: 'middle',
98592
+ borderWidth: '0 0 1.5px 0',
98593
+ borderColor: '#DBE0F2',
98594
+ borderStyle: 'solid',
98595
+ '@media(min-width: 480px)': {
98596
+ padding: '25px 10px',
98597
+ verticalAlign: 'top'
98556
98598
  },
98557
- 'tbody': {
98558
- 'tr.selected': {
98559
- backgroundColor: 'rgba(22, 199, 165,0.11)'
98599
+ 'div.MuiTextField-root': {
98600
+ borderWidth: '0px',
98601
+ 'input': {
98602
+ textAlign: 'left'
98560
98603
  },
98561
- 'tr.custom-row-component': {
98562
- 'td:last-child': {
98563
- paddingRight: '10px',
98564
- 'div.MuiTextField-root': {
98565
- borderWidth: '0px',
98566
- 'input': {
98567
- textAlign: 'right'
98568
- },
98569
- 'svg': {
98570
- display: 'none'
98571
- }
98572
- }
98573
- },
98574
- 'td': {
98575
- fontFamily: theme.fontFamily,
98576
- fontSize: '16px',
98577
- lineHeight: '21px',
98578
- fontWeight: theme.fontWeight.regular,
98579
- color: theme.mainPallete.primary.blue,
98580
- padding: '5px 10px',
98581
- verticalAlign: 'middle',
98582
- borderWidth: '0 0 1.5px 0',
98583
- borderColor: '#DBE0F2',
98584
- borderStyle: 'solid',
98585
- '@media(min-width: 480px)': {
98586
- padding: '25px 10px',
98587
- verticalAlign: 'top'
98588
- },
98589
- 'div.MuiTextField-root': {
98590
- borderWidth: '0px',
98591
- 'input': {
98592
- textAlign: 'left'
98593
- },
98594
- 'svg': {
98595
- display: 'none'
98596
- },
98597
- '.MuiOutlinedInput-root': {
98598
- margin: '5px 0',
98599
- '&.Mui-focused': {
98600
- backgroundColor: 'white'
98601
- }
98602
- }
98603
- },
98604
- '&:first-child': {
98605
- textAlign: 'left'
98606
- },
98607
- '&:last-child': {
98608
- textAlign: 'right'
98609
- },
98610
- 'div.text': {
98611
- padding: 0,
98612
- // height: '34px',
98613
- display: 'flex',
98614
- flexDirection: 'column',
98615
- justifyContent: 'center',
98616
- fontSize: '13px',
98617
- lineHeight: '17px',
98618
- fontWeight: 'regular',
98619
- '@media(min-width: 480px)': {
98620
- height: '45px',
98621
- fontSize: '16px',
98622
- lineHeight: '15px',
98623
- margin: '5px 0'
98624
- },
98625
- '@media(min-width: 720px)': {
98626
- fontSize: '24px',
98627
- lineHeight: '25px'
98628
- },
98629
- '@media(min-width: 1024px)': {
98630
- padding: '9px 25px 10px 25px',
98631
- fontSize: '12px',
98632
- lineHeight: '16px'
98633
- }
98634
- }
98635
- },
98636
- '&:hover': {
98637
- '@media(min-width:1024px)': {
98638
- backgroundColor: 'rgba(22, 199, 165,0.11)'
98639
- }
98604
+ 'svg': {
98605
+ display: 'none'
98606
+ },
98607
+ '.MuiOutlinedInput-root': {
98608
+ margin: '5px 0',
98609
+ '&.Mui-focused': {
98610
+ backgroundColor: 'white'
98640
98611
  }
98641
98612
  }
98613
+ },
98614
+ '&:first-child': {
98615
+ textAlign: 'left'
98616
+ },
98617
+ '&:last-child': {
98618
+ textAlign: 'right'
98619
+ },
98620
+ 'div.text': {
98621
+ padding: 0,
98622
+ // height: '34px',
98623
+ display: 'flex',
98624
+ flexDirection: 'column',
98625
+ justifyContent: 'center',
98626
+ fontSize: '13px',
98627
+ lineHeight: '17px',
98628
+ fontWeight: 'regular',
98629
+ '&.bold': {
98630
+ fontWeight: 'bold'
98631
+ },
98632
+ '@media(min-width: 480px)': {
98633
+ height: '45px',
98634
+ fontSize: '16px',
98635
+ lineHeight: '15px',
98636
+ margin: '5px 0'
98637
+ },
98638
+ '@media(min-width: 720px)': {
98639
+ fontSize: '24px',
98640
+ lineHeight: '25px'
98641
+ },
98642
+ '@media(min-width: 1024px)': {
98643
+ padding: '9px 25px 10px 25px',
98644
+ fontSize: '12px',
98645
+ lineHeight: '16px'
98646
+ }
98647
+ }
98648
+ },
98649
+ '&:hover': {
98650
+ '@media(min-width:1024px)': {
98651
+ backgroundColor: 'rgba(22, 199, 165,0.11)'
98642
98652
  }
98643
98653
  }
98644
98654
  };
@@ -98657,6 +98667,7 @@ var RenderTextField = /*#__PURE__*/React__default.memo(function (_ref2) {
98657
98667
  _useState2 = _slicedToArray$a(_useState, 2),
98658
98668
  customValue = _useState2[0],
98659
98669
  setCustomValue = _useState2[1];
98670
+ var isBold = (item === null || item === void 0 ? void 0 : item.bold) || false;
98660
98671
  return /*#__PURE__*/React__default.createElement(React__default.Fragment, null, isEditable && /*#__PURE__*/React__default.createElement(TextField, {
98661
98672
  label: "",
98662
98673
  small: true,
@@ -98678,22 +98689,25 @@ var RenderTextField = /*#__PURE__*/React__default.memo(function (_ref2) {
98678
98689
  key: index,
98679
98690
  value: customValue
98680
98691
  }), !isEditable && /*#__PURE__*/React__default.createElement("div", {
98681
- className: "text"
98692
+ className: "text ".concat(isBold ? 'bold' : '')
98682
98693
  }, value));
98683
98694
  });
98684
- var CustomRowComponent = /*#__PURE__*/React__default.memo(function (_ref3) {
98695
+ var CustomRowComponent = function CustomRowComponent(_ref3) {
98685
98696
  var data = _ref3.data,
98686
98697
  rowIndex = _ref3.rowIndex,
98698
+ onDoubleClick = _ref3.onDoubleClick,
98687
98699
  handleClick = _ref3.handleClick,
98688
98700
  rowsSelected = _ref3.rowsSelected,
98689
98701
  tableData = _ref3.tableData,
98690
98702
  handleChangeData = _ref3.handleChangeData;
98691
98703
  if (data.length <= 0) return null;
98692
98704
  var uniqueRowKey = "row-".concat(rowIndex + 1);
98693
- return /*#__PURE__*/React__default.createElement("tr", {
98705
+ var style = tableData[rowIndex][2] || '';
98706
+ return /*#__PURE__*/React__default.createElement(TableRow, {
98694
98707
  key: uniqueRowKey,
98695
98708
  onClick: handleClick,
98696
- className: rowsSelected !== undefined && rowsSelected.indexOf(rowIndex) !== -1 ? 'custom-row-component selected' : 'custom-row-component'
98709
+ onDoubleClick: onDoubleClick,
98710
+ className: "".concat(rowsSelected !== undefined && rowsSelected.indexOf(rowIndex) !== -1 ? 'selected' : '', " ").concat(style)
98697
98711
  }, data.map(function (column, key) {
98698
98712
  var uniqueCellKey = "".concat(uniqueRowKey, "-column-").concat(key + 1);
98699
98713
  return /*#__PURE__*/React__default.createElement("td", {
@@ -98712,7 +98726,7 @@ var CustomRowComponent = /*#__PURE__*/React__default.memo(function (_ref3) {
98712
98726
  });
98713
98727
  }));
98714
98728
  }));
98715
- });
98729
+ };
98716
98730
  var TableMobileComponent = function TableMobileComponent(_ref4) {
98717
98731
  var id = _ref4.id,
98718
98732
  columns = _ref4.columns,
@@ -98726,7 +98740,8 @@ var TableMobileComponent = function TableMobileComponent(_ref4) {
98726
98740
  selectionType = _ref4.selectionType,
98727
98741
  rowsSelected = _ref4.rowsSelected,
98728
98742
  setSelectedRows = _ref4.setSelectedRows,
98729
- searchPlaceholder = _ref4.searchPlaceholder;
98743
+ searchPlaceholder = _ref4.searchPlaceholder,
98744
+ onRowDoubleClick = _ref4.onRowDoubleClick;
98730
98745
  var _useState3 = useState([]),
98731
98746
  _useState4 = _slicedToArray$a(_useState3, 2),
98732
98747
  values = _useState4[0],
@@ -98777,6 +98792,7 @@ var TableMobileComponent = function TableMobileComponent(_ref4) {
98777
98792
  return handleRowClick(rowIndex);
98778
98793
  } : null,
98779
98794
  handleChangeData: handleChangeData,
98795
+ onDoubleClick: onRowDoubleClick,
98780
98796
  rowsSelected: rowsSelected,
98781
98797
  tableData: values
98782
98798
  });
@@ -98833,7 +98849,8 @@ TableMobileComponent.propTypes = {
98833
98849
  })),
98834
98850
  includeSearch: propTypesExports.bool,
98835
98851
  handleChangeData: propTypesExports.func,
98836
- setSelectedRows: propTypesExports.func
98852
+ setSelectedRows: propTypesExports.func,
98853
+ onRowDoubleClick: propTypesExports.oneOfType([propTypesExports.func, undefined])
98837
98854
  };
98838
98855
  TableMobileComponent.defaultProps = {
98839
98856
  columns: [],
@@ -98842,7 +98859,8 @@ TableMobileComponent.defaultProps = {
98842
98859
  handleChangeData: function handleChangeData() {},
98843
98860
  fixedHeader: true,
98844
98861
  tableBodyMaxHeight: "100vh",
98845
- setSelectedRows: function setSelectedRows() {}
98862
+ setSelectedRows: function setSelectedRows() {},
98863
+ onRowDoubleClick: undefined
98846
98864
  };
98847
98865
 
98848
98866
  var StyledModalContainer = styled$1(Box$1)(function (_ref) {
@@ -99225,7 +99243,7 @@ var StyledStep = styled$1(function (props) {
99225
99243
  var CustomStepper = function CustomStepper(_ref4) {
99226
99244
  var steps = _ref4.steps,
99227
99245
  label = _ref4.label,
99228
- withIcon = _ref4.withIcon,
99246
+ scan = _ref4.scan,
99229
99247
  currentStep = _ref4.currentStep,
99230
99248
  errorMessage = _ref4.errorMessage;
99231
99249
  var currentStepIndex = steps.findIndex(function (step) {
@@ -99240,10 +99258,13 @@ var CustomStepper = function CustomStepper(_ref4) {
99240
99258
  sx: {
99241
99259
  width: '100%'
99242
99260
  }
99243
- }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React__default.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), withIcon && /*#__PURE__*/React__default.createElement(Icon, {
99244
- iconName: 'icon_wf_no_barcode_printer',
99261
+ }, /*#__PURE__*/React__default.createElement(React__default.Fragment, null, /*#__PURE__*/React__default.createElement(StyledLabelAndIconWrapper, null, /*#__PURE__*/React__default.createElement(StepLabel$1, null, currentStepIndex !== -1 ? "".concat(label, " ").concat(currentStepIndex + 1, "/").concat(steps.length) : errorMessage), typeof scan === 'boolean' && (scan ? /*#__PURE__*/React__default.createElement(Icon, {
99262
+ iconName: 'icon_wf_scan',
99263
+ size: 'responsive'
99264
+ }) : /*#__PURE__*/React__default.createElement(Icon, {
99265
+ iconName: 'icon_wf_no_scan',
99245
99266
  size: 'responsive'
99246
- }))), /*#__PURE__*/React__default.createElement(StyledStepper, {
99267
+ })))), /*#__PURE__*/React__default.createElement(StyledStepper, {
99247
99268
  activeStep: currentStepIndex,
99248
99269
  numberOfSteps: steps.length
99249
99270
  }, steps.map(function (step, index) {
@@ -99261,7 +99282,7 @@ CustomStepper.propTypes = {
99261
99282
  })]),
99262
99283
  label: propTypesExports.string,
99263
99284
  steps: propTypesExports.arrayOf(propTypesExports.oneOfType([propTypesExports.string, propTypesExports.arrayOf(propTypesExports.string)])),
99264
- withIcon: propTypesExports.bool,
99285
+ scan: propTypesExports.bool,
99265
99286
  errorMessage: propTypesExports.string
99266
99287
  };
99267
99288
  CustomStepper.defaultProps = {
@@ -99269,7 +99290,6 @@ CustomStepper.defaultProps = {
99269
99290
  forwardedRef: function forwardedRef() {},
99270
99291
  label: '',
99271
99292
  steps: [],
99272
- withIcon: false,
99273
99293
  errorMessage: 'Error'
99274
99294
  };
99275
99295
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xelto.npm/xc2-lib",
3
- "version": "0.1.32",
3
+ "version": "0.1.34",
4
4
  "author": "XELTO",
5
5
  "description": "React component library based on MUI",
6
6
  "license": "ISC",