@secondstaxorg/sscomp 1.8.61 → 1.8.63

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
@@ -550,10 +550,7 @@ const NumberButton = styled.button`
550
550
  height: 32px;
551
551
  color:${theme.colors["neutral-900"]};
552
552
  background:${theme.colors.white};
553
- font-size: 16px;
554
- line-height: 19px;
555
553
  text-align: center;
556
- font-weight: 400;
557
554
  font-family: "Circular Book",sans-serif;
558
555
  display: flex;
559
556
  justify-content: center;
@@ -653,7 +650,7 @@ const Pagination = (props) => {
653
650
  )
654
651
  , pageNumbers.map((number) => {
655
652
  if (number >= startFrom && number <= startFrom + 10) return (
656
- React$1.createElement(NumberButton, { className: `${number === pageNum ? 'active' : ''}`, key: number,
653
+ React$1.createElement(NumberButton, { className: `${number === pageNum ? 'active' : ''} paragraph2Regular`, key: number,
657
654
  onClick: () => {
658
655
  if (returnedPageNum) returnedPageNum(number);
659
656
  setPageNum(number);
@@ -676,7 +673,7 @@ const Pagination = (props) => {
676
673
  )
677
674
 
678
675
  )
679
- , pageNumbers.length > 10 && React$1.createElement(React$1.Fragment, null, React$1.createElement('input', { type: "text", className: `jump-to ${validation}`, placeholder: "Go to" , onChange: (e)=>{
676
+ , pageNumbers.length > 10 && React$1.createElement('span', { className: "paragraph2Regular", __self: undefined, __source: {fileName: _jsxFileName$19, lineNumber: 83}}, React$1.createElement('input', { type: "text", className: `jump-to ${validation}`, placeholder: "Go to" , onChange: (e)=>{
680
677
  if (!e.target.value) {
681
678
  setValidation('');
682
679
  return
@@ -25510,9 +25507,13 @@ const _jsxFileName$b = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
25510
25507
  const TablePrimary = (props) => {
25511
25508
  const {thead,children,tbody,clickedRow,showPagination,itemsPerPage,paginatedItems} = props;
25512
25509
  const [tbodyItems,setTbodyItems] = React$1.useState([]);
25513
- const [tbodyOri,setTbodyOri] = React$1.useState(tbody);
25510
+ const [tbodyOri,setTbodyOri] = React$1.useState(undefined);
25514
25511
  const [sortedCol,setSortedCol] = React$1.useState('');
25515
25512
 
25513
+ React$1.useEffect(()=>{
25514
+ setTbodyOri(tbody);
25515
+ },[tbody]);
25516
+
25516
25517
  function sortByColumn(column){
25517
25518
  if (column === sortedCol){
25518
25519
  if (tbody && tbody.length > 0){
@@ -25522,7 +25523,6 @@ const TablePrimary = (props) => {
25522
25523
  setTbodyItems(revSort);
25523
25524
  setSortedCol('');
25524
25525
  }
25525
-
25526
25526
  return
25527
25527
  }else if(column !== sortedCol){
25528
25528
  setSortedCol(column);
@@ -25531,7 +25531,6 @@ const TablePrimary = (props) => {
25531
25531
  sortedItems.sort((a,b) => a[column].localeCompare(b[column]));
25532
25532
  setTbodyItems(sortedItems);
25533
25533
  }
25534
-
25535
25534
  return
25536
25535
  }
25537
25536
  }
@@ -25540,36 +25539,36 @@ const TablePrimary = (props) => {
25540
25539
  if (!showPagination){
25541
25540
  setTbodyItems(tbody );
25542
25541
  }
25543
- },[showPagination]);
25542
+ },[showPagination,tbodyOri]);
25544
25543
 
25545
25544
  return (
25546
25545
  React$1.createElement(React$1.Fragment, null
25547
- , React$1.createElement(TableContainer$1, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 46}}
25548
- , React$1.createElement(Table, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 47}}
25549
- , React$1.createElement('thead', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 48}}
25550
- , React$1.createElement('tr', { className: "rounded-row", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 49}}
25546
+ , React$1.createElement(TableContainer$1, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 48}}
25547
+ , React$1.createElement(Table, {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 49}}
25548
+ , React$1.createElement('thead', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 50}}
25549
+ , React$1.createElement('tr', { className: "rounded-row", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 51}}
25551
25550
  , thead.map((item,index) => (
25552
25551
  React$1.createElement('th', { key: index, onClick: ()=>{
25553
25552
  sortByColumn(item.dataKey);
25554
- }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 51}}, item.label)
25553
+ }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 53}}, item.label)
25555
25554
  ))
25556
25555
  )
25557
25556
  )
25558
- , React$1.createElement('tbody', { className: "rounded-row", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 57}}
25557
+ , React$1.createElement('tbody', { className: "rounded-row", __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 59}}
25559
25558
  , children
25560
25559
  , !children && tbodyItems && tbodyItems.map((item,index) => (
25561
25560
  React$1.createElement('tr', { key: index, className: clickedRow && 'clickable', onClick: ()=>{
25562
25561
  if (clickedRow) {
25563
25562
  clickedRow(item);
25564
- }}, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 60}}
25563
+ }}, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 62}}
25565
25564
  , thead.map((cellItem,index) => (
25566
- React$1.createElement('td', { key: index, className: (index == thead.length - 1 && clickedRow) ? 'with-arrow' : '', __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 65}}
25567
- , React$1.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 66}}
25565
+ React$1.createElement('td', { key: index, className: (index == thead.length - 1 && clickedRow) ? 'with-arrow' : '', __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 67}}
25566
+ , React$1.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 68}}
25568
25567
  , item[cellItem.dataKey]
25569
25568
  )
25570
25569
  , (index == thead.length - 1 && clickedRow) &&
25571
- 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: 70}}
25572
- , 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: 71}})
25570
+ 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}}
25571
+ , 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}})
25573
25572
  )
25574
25573
 
25575
25574
  )
@@ -25583,7 +25582,7 @@ const TablePrimary = (props) => {
25583
25582
  React$1.createElement(Pagination, { itemsPerPage: itemsPerPage, items: tbodyOri, paginatedItems: (arr)=>{
25584
25583
  setTbodyItems(arr);
25585
25584
  paginatedItems(arr);
25586
- }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 82}})
25585
+ }, __self: undefined, __source: {fileName: _jsxFileName$b, lineNumber: 84}})
25587
25586
 
25588
25587
  )
25589
25588
  )