@secondstaxorg/sscomp 1.8.69 → 1.8.71

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 CHANGED
@@ -25526,12 +25526,15 @@ const TablePrimary = (props) => {
25526
25526
  },[tbody]);
25527
25527
 
25528
25528
  function sortByColumn(column){
25529
+ if (tbody){
25530
+ if(typeof (tbody )[0][column] !== 'string') return
25531
+ }
25529
25532
  if (column === sortedCol){
25530
25533
  if (tbody && tbody.length > 0){
25531
25534
  const sortedItems = [...tbody];
25532
25535
  sortedItems.sort((a,b) => a[column].localeCompare(b[column]));
25533
25536
  let revSort = sortedItems.reverse();
25534
- setTbodyOri(revSort);
25537
+ setTbodyItems(revSort);
25535
25538
  setSortedCol('');
25536
25539
  }
25537
25540
  return
@@ -25540,7 +25543,7 @@ const TablePrimary = (props) => {
25540
25543
  if (tbody && tbody.length > 0){
25541
25544
  const sortedItems = [...tbody];
25542
25545
  sortedItems.sort((a,b) => a[column].localeCompare(b[column]));
25543
- setTbodyOri(sortedItems);
25546
+ setTbodyItems(sortedItems);
25544
25547
  }
25545
25548
  return
25546
25549
  }
@@ -25554,32 +25557,32 @@ const TablePrimary = (props) => {
25554
25557
 
25555
25558
  return (
25556
25559
  React$1.createElement(React$1.Fragment, null
25557
- , React$1.createElement(TableContainer$1, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 48}}
25558
- , React$1.createElement(Table, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 49}}
25559
- , React$1.createElement('thead', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 50}}
25560
- , React$1.createElement('tr', { className: "rounded-row paragraph2Medium" , __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 51}}
25560
+ , React$1.createElement(TableContainer$1, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 51}}
25561
+ , React$1.createElement(Table, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 52}}
25562
+ , React$1.createElement('thead', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 53}}
25563
+ , React$1.createElement('tr', { className: "rounded-row paragraph2Medium" , __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 54}}
25561
25564
  , thead.map((item,index) => (
25562
25565
  React$1.createElement('th', { key: index, onClick: ()=>{
25563
25566
  sortByColumn(item.dataKey);
25564
- }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 53}}, item.label)
25567
+ }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 56}}, item.label)
25565
25568
  ))
25566
25569
  )
25567
25570
  )
25568
- , React$1.createElement('tbody', { className: "rounded-row paragraph2Regular" , __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 59}}
25571
+ , React$1.createElement('tbody', { className: "rounded-row paragraph2Regular" , __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 62}}
25569
25572
  , children
25570
25573
  , !children && tbodyItems && tbodyItems.map((item,index) => (
25571
25574
  React$1.createElement('tr', { key: index, className: clickedRow && 'clickable', onClick: ()=>{
25572
25575
  if (clickedRow) {
25573
25576
  clickedRow(item);
25574
- }}, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 62}}
25577
+ }}, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 65}}
25575
25578
  , thead.map((cellItem,index) => (
25576
- React$1.createElement('td', { key: index, className: (index == thead.length - 1 && clickedRow) ? 'with-arrow' : '', __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 67}}
25577
- , React$1.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 68}}
25579
+ React$1.createElement('td', { key: index, className: (index == thead.length - 1 && clickedRow) ? 'with-arrow' : '', __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 70}}
25580
+ , React$1.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 71}}
25578
25581
  , item[cellItem.dataKey]
25579
25582
  )
25580
25583
  , (index == thead.length - 1 && clickedRow) &&
25581
- React$1.createElement('svg', { width: "16", height: "16", viewBox: "0 0 16 16" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 72}}
25582
- , React$1.createElement('path', { d: "M10.3592 7.52685L6.58584 3.76019C6.52387 3.6977 6.45013 3.64811 6.36889 3.61426C6.28765 3.58041 6.20052 3.56299 6.11251 3.56299C6.0245 3.56299 5.93736 3.58041 5.85612 3.61426C5.77488 3.64811 5.70115 3.6977 5.63917 3.76019C5.51501 3.8851 5.44531 4.05406 5.44531 4.23019C5.44531 4.40631 5.51501 4.57528 5.63917 4.70019L8.93917 8.03352L5.63917 11.3335C5.51501 11.4584 5.44531 11.6274 5.44531 11.8035C5.44531 11.9796 5.51501 12.1486 5.63917 12.2735C5.70092 12.3365 5.77455 12.3866 5.8558 12.421C5.93705 12.4553 6.0243 12.4732 6.11251 12.4735C6.20071 12.4732 6.28797 12.4553 6.36922 12.421C6.45047 12.3866 6.5241 12.3365 6.58584 12.2735L10.3592 8.50685C10.4268 8.44443 10.4808 8.36866 10.5178 8.28432C10.5547 8.19999 10.5738 8.10892 10.5738 8.01685C10.5738 7.92479 10.5547 7.83372 10.5178 7.74938C10.4808 7.66505 10.4268 7.58928 10.3592 7.52685Z" , fill: "#A4BBDD", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 73}})
25584
+ React$1.createElement('svg', { width: "16", height: "16", viewBox: "0 0 16 16" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 75}}
25585
+ , React$1.createElement('path', { d: "M10.3592 7.52685L6.58584 3.76019C6.52387 3.6977 6.45013 3.64811 6.36889 3.61426C6.28765 3.58041 6.20052 3.56299 6.11251 3.56299C6.0245 3.56299 5.93736 3.58041 5.85612 3.61426C5.77488 3.64811 5.70115 3.6977 5.63917 3.76019C5.51501 3.8851 5.44531 4.05406 5.44531 4.23019C5.44531 4.40631 5.51501 4.57528 5.63917 4.70019L8.93917 8.03352L5.63917 11.3335C5.51501 11.4584 5.44531 11.6274 5.44531 11.8035C5.44531 11.9796 5.51501 12.1486 5.63917 12.2735C5.70092 12.3365 5.77455 12.3866 5.8558 12.421C5.93705 12.4553 6.0243 12.4732 6.11251 12.4735C6.20071 12.4732 6.28797 12.4553 6.36922 12.421C6.45047 12.3866 6.5241 12.3365 6.58584 12.2735L10.3592 8.50685C10.4268 8.44443 10.4808 8.36866 10.5178 8.28432C10.5547 8.19999 10.5738 8.10892 10.5738 8.01685C10.5738 7.92479 10.5547 7.83372 10.5178 7.74938C10.4808 7.66505 10.4268 7.58928 10.3592 7.52685Z" , fill: "#A4BBDD", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 76}})
25583
25586
  )
25584
25587
 
25585
25588
  )
@@ -25593,7 +25596,7 @@ const TablePrimary = (props) => {
25593
25596
  React$1.createElement(Pagination, { itemsPerPage: itemsPerPage, items: tbodyOri, paginatedItems: (arr)=>{
25594
25597
  setTbodyItems(arr);
25595
25598
  paginatedItems(arr);
25596
- }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 84}})
25599
+ }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 87}})
25597
25600
 
25598
25601
  )
25599
25602
  )