funda-ui 3.9.35 → 3.9.55

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/Table/index.d.ts CHANGED
@@ -17,6 +17,7 @@ declare type TableProps = {
17
17
  responsive?: boolean;
18
18
  enhancedResponsive?: boolean;
19
19
  enhancedResponsiveWithScrollBar?: boolean;
20
+ cellAutoWidth?: boolean;
20
21
  /** -- */
21
22
  id?: string;
22
23
  onCellMouseEnter?: (el: any) => void;
@@ -29,7 +30,7 @@ declare type TableProps = {
29
30
  onHeadCellMouseLeave?: (el: any) => void;
30
31
  onHeadCellClick?: (el: any) => void;
31
32
  onClick?: (el: any, val: any) => void;
32
- onCheck?: (val: any) => void;
33
+ onCheck?: (val: any, el: any, checked: boolean) => void;
33
34
  onDrag?: (dragStart: any, dragEnd: any) => void;
34
35
  onRenderFinished?: (res: boolean) => void;
35
36
  };
package/Table/index.js CHANGED
@@ -627,7 +627,7 @@ var TableFieldRow = function TableFieldRow(props) {
627
627
  // STEP 6:
628
628
  // callback
629
629
  //-----------
630
- onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res);
630
+ onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res, el, val);
631
631
  }
632
632
  function handleTbodyEnter(e) {
633
633
  var _e$target$closest;
@@ -707,6 +707,7 @@ var TableFieldRow = function TableFieldRow(props) {
707
707
  className: "radio-svg-btn",
708
708
  "data-index": "".concat(rowIndex),
709
709
  "data-key": "".concat(rowKey),
710
+ "data-use": dataUse,
710
711
  onClick: function onClick(e) {
711
712
  e.preventDefault();
712
713
 
@@ -728,7 +729,7 @@ var TableFieldRow = function TableFieldRow(props) {
728
729
  // STEP 2:
729
730
  // callback
730
731
  //-----------
731
- onCheck === null || onCheck === void 0 ? void 0 : onCheck([formatCheckboxControlVal(e.currentTarget)]);
732
+ onCheck === null || onCheck === void 0 ? void 0 : onCheck([formatCheckboxControlVal(e.currentTarget)], e.currentTarget, true);
732
733
  }
733
734
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
734
735
  className: "radio-svg--default"
@@ -773,6 +774,7 @@ var TableFieldRow = function TableFieldRow(props) {
773
774
  tabIndex: -1,
774
775
  "data-index": "".concat(rowIndex),
775
776
  "data-key": "".concat(rowKey),
777
+ "data-use": dataUse,
776
778
  value: "".concat(rowKey),
777
779
  checked: (_latestCheckedData$fi = latestCheckedData().filter(function (cur) {
778
780
  return cur.key === rowKey;
@@ -1020,7 +1022,7 @@ var TableHeaders = function TableHeaders(props) {
1020
1022
  // STEP 6:
1021
1023
  // callback
1022
1024
  //-----------
1023
- onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res);
1025
+ onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res, el, val);
1024
1026
  }
1025
1027
  return data ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("thead", {
1026
1028
  className: headClassName ? headClassName : ''
@@ -1061,6 +1063,9 @@ var TableHeaders = function TableHeaders(props) {
1061
1063
  className: "form-check-input",
1062
1064
  name: "checkbox-".concat(checkboxNamePrefix, "-all"),
1063
1065
  tabIndex: -1,
1066
+ "data-index": -1,
1067
+ "data-key": "row-all",
1068
+ "data-use": "",
1064
1069
  value: "row-all",
1065
1070
  checked: (_filter$ = getCheckedRootData.filter(function (cur) {
1066
1071
  return cur.key === 'row-all';
@@ -1165,6 +1170,7 @@ var Table = function Table(props) {
1165
1170
  responsive = props.responsive,
1166
1171
  enhancedResponsive = props.enhancedResponsive,
1167
1172
  enhancedResponsiveWithScrollBar = props.enhancedResponsiveWithScrollBar,
1173
+ cellAutoWidth = props.cellAutoWidth,
1168
1174
  id = props.id,
1169
1175
  onCellMouseEnter = props.onCellMouseEnter,
1170
1176
  onCellMouseLeave = props.onCellMouseLeave,
@@ -1601,7 +1607,10 @@ var Table = function Table(props) {
1601
1607
  id: idRes,
1602
1608
  className: "table__wrapper ".concat(wrapperClassName || wrapperClassName === '' ? wrapperClassName : "mb-3 position-relative", " ").concat(responsiveClasses, " ").concat(enhancedResponsiveClasses, " ").concat(checkableClasses, " ").concat(radioClasses, " ").concat(draggableClasses, " ").concat(sortableClasses)
1603
1609
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("table", {
1604
- className: "".concat(tableClassName || tableClassName === '' ? tableClassName : "table", " ").concat(tableClasses)
1610
+ className: "".concat(tableClassName || tableClassName === '' ? tableClassName : "table", " ").concat(tableClasses),
1611
+ style: typeof cellAutoWidth === 'undefined' || cellAutoWidth === false ? {} : {
1612
+ width: '1%'
1613
+ }
1605
1614
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TableHeaders, {
1606
1615
  data: _headers,
1607
1616
  useRadio: useRadio || false,
@@ -17,6 +17,7 @@ declare type TableProps = {
17
17
  responsive?: boolean;
18
18
  enhancedResponsive?: boolean;
19
19
  enhancedResponsiveWithScrollBar?: boolean;
20
+ cellAutoWidth?: boolean;
20
21
  /** -- */
21
22
  id?: string;
22
23
  onCellMouseEnter?: (el: any) => void;
@@ -29,7 +30,7 @@ declare type TableProps = {
29
30
  onHeadCellMouseLeave?: (el: any) => void;
30
31
  onHeadCellClick?: (el: any) => void;
31
32
  onClick?: (el: any, val: any) => void;
32
- onCheck?: (val: any) => void;
33
+ onCheck?: (val: any, el: any, checked: boolean) => void;
33
34
  onDrag?: (dragStart: any, dragEnd: any) => void;
34
35
  onRenderFinished?: (res: boolean) => void;
35
36
  };
@@ -627,7 +627,7 @@ var TableFieldRow = function TableFieldRow(props) {
627
627
  // STEP 6:
628
628
  // callback
629
629
  //-----------
630
- onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res);
630
+ onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res, el, val);
631
631
  }
632
632
  function handleTbodyEnter(e) {
633
633
  var _e$target$closest;
@@ -707,6 +707,7 @@ var TableFieldRow = function TableFieldRow(props) {
707
707
  className: "radio-svg-btn",
708
708
  "data-index": "".concat(rowIndex),
709
709
  "data-key": "".concat(rowKey),
710
+ "data-use": dataUse,
710
711
  onClick: function onClick(e) {
711
712
  e.preventDefault();
712
713
 
@@ -728,7 +729,7 @@ var TableFieldRow = function TableFieldRow(props) {
728
729
  // STEP 2:
729
730
  // callback
730
731
  //-----------
731
- onCheck === null || onCheck === void 0 ? void 0 : onCheck([formatCheckboxControlVal(e.currentTarget)]);
732
+ onCheck === null || onCheck === void 0 ? void 0 : onCheck([formatCheckboxControlVal(e.currentTarget)], e.currentTarget, true);
732
733
  }
733
734
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
734
735
  className: "radio-svg--default"
@@ -773,6 +774,7 @@ var TableFieldRow = function TableFieldRow(props) {
773
774
  tabIndex: -1,
774
775
  "data-index": "".concat(rowIndex),
775
776
  "data-key": "".concat(rowKey),
777
+ "data-use": dataUse,
776
778
  value: "".concat(rowKey),
777
779
  checked: (_latestCheckedData$fi = latestCheckedData().filter(function (cur) {
778
780
  return cur.key === rowKey;
@@ -1020,7 +1022,7 @@ var TableHeaders = function TableHeaders(props) {
1020
1022
  // STEP 6:
1021
1023
  // callback
1022
1024
  //-----------
1023
- onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res);
1025
+ onCheck === null || onCheck === void 0 ? void 0 : onCheck(_res, el, val);
1024
1026
  }
1025
1027
  return data ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("thead", {
1026
1028
  className: headClassName ? headClassName : ''
@@ -1061,6 +1063,9 @@ var TableHeaders = function TableHeaders(props) {
1061
1063
  className: "form-check-input",
1062
1064
  name: "checkbox-".concat(checkboxNamePrefix, "-all"),
1063
1065
  tabIndex: -1,
1066
+ "data-index": -1,
1067
+ "data-key": "row-all",
1068
+ "data-use": "",
1064
1069
  value: "row-all",
1065
1070
  checked: (_filter$ = getCheckedRootData.filter(function (cur) {
1066
1071
  return cur.key === 'row-all';
@@ -1165,6 +1170,7 @@ var Table = function Table(props) {
1165
1170
  responsive = props.responsive,
1166
1171
  enhancedResponsive = props.enhancedResponsive,
1167
1172
  enhancedResponsiveWithScrollBar = props.enhancedResponsiveWithScrollBar,
1173
+ cellAutoWidth = props.cellAutoWidth,
1168
1174
  id = props.id,
1169
1175
  onCellMouseEnter = props.onCellMouseEnter,
1170
1176
  onCellMouseLeave = props.onCellMouseLeave,
@@ -1601,7 +1607,10 @@ var Table = function Table(props) {
1601
1607
  id: idRes,
1602
1608
  className: "table__wrapper ".concat(wrapperClassName || wrapperClassName === '' ? wrapperClassName : "mb-3 position-relative", " ").concat(responsiveClasses, " ").concat(enhancedResponsiveClasses, " ").concat(checkableClasses, " ").concat(radioClasses, " ").concat(draggableClasses, " ").concat(sortableClasses)
1603
1609
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("table", {
1604
- className: "".concat(tableClassName || tableClassName === '' ? tableClassName : "table", " ").concat(tableClasses)
1610
+ className: "".concat(tableClassName || tableClassName === '' ? tableClassName : "table", " ").concat(tableClasses),
1611
+ style: typeof cellAutoWidth === 'undefined' || cellAutoWidth === false ? {} : {
1612
+ width: '1%'
1613
+ }
1605
1614
  }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_TableHeaders, {
1606
1615
  data: _headers,
1607
1616
  useRadio: useRadio || false,
@@ -34,7 +34,7 @@ type TableFieldRowProps = {
34
34
  updategetCheckedData?: any;
35
35
  getCheckedRootData?: any[];
36
36
  updategetCheckedRootData?: any;
37
- onCheck?: (val: any) => void;
37
+ onCheck?: (val: any, el: any, checked: boolean) => void;
38
38
  evCellMouseEnter?: (el: any) => void | undefined;
39
39
  evCellMouseLeave?: (el: any) => void | undefined;
40
40
  evCellClick?: (el: any) => void | undefined;
@@ -306,7 +306,7 @@ const TableFieldRow = (props: TableFieldRowProps) => {
306
306
  // STEP 6:
307
307
  // callback
308
308
  //-----------
309
- onCheck?.(_res);
309
+ onCheck?.(_res, el, val);
310
310
 
311
311
  }
312
312
 
@@ -361,6 +361,7 @@ const TableFieldRow = (props: TableFieldRowProps) => {
361
361
  className="radio-svg-btn"
362
362
  data-index={`${rowIndex}`}
363
363
  data-key={`${rowKey}`}
364
+ data-use={dataUse}
364
365
  onClick={(e: any) => {
365
366
  e.preventDefault();
366
367
 
@@ -382,7 +383,7 @@ const TableFieldRow = (props: TableFieldRowProps) => {
382
383
  // STEP 2:
383
384
  // callback
384
385
  //-----------
385
- onCheck?.([formatCheckboxControlVal(e.currentTarget)]);
386
+ onCheck?.([formatCheckboxControlVal(e.currentTarget)], e.currentTarget, true);
386
387
  }}
387
388
  >
388
389
  <span className="radio-svg--default">
@@ -433,6 +434,7 @@ const TableFieldRow = (props: TableFieldRowProps) => {
433
434
  tabIndex={-1}
434
435
  data-index={`${rowIndex}`}
435
436
  data-key={`${rowKey}`}
437
+ data-use={dataUse}
436
438
  value={`${rowKey}`}
437
439
  checked={latestCheckedData().filter((cur: any) => cur.key === rowKey)[0]?.checked}
438
440
  onChange={(e: any) => {
@@ -22,7 +22,7 @@ type TableHeadersProps = {
22
22
  updategetCheckedData?: any;
23
23
  getCheckedRootData?: any[];
24
24
  updategetCheckedRootData?: any;
25
- onCheck?: (val: any) => void;
25
+ onCheck?: (val: any, el: any, checked: boolean) => void;
26
26
  evSort?: (option: any) => void;
27
27
  evHeadCellMouseEnter?: (el: any) => void | undefined;
28
28
  evHeadCellMouseLeave?: (el: any) => void | undefined;
@@ -111,7 +111,7 @@ const TableHeaders = (props: TableHeadersProps) => {
111
111
  // STEP 6:
112
112
  // callback
113
113
  //-----------
114
- onCheck?.(_res);
114
+ onCheck?.(_res, el, val);
115
115
 
116
116
  }
117
117
 
@@ -151,6 +151,9 @@ const TableHeaders = (props: TableHeadersProps) => {
151
151
  className="form-check-input"
152
152
  name={`checkbox-${checkboxNamePrefix}-all`}
153
153
  tabIndex={-1}
154
+ data-index={-1}
155
+ data-key="row-all"
156
+ data-use=""
154
157
  value={`row-all`}
155
158
  checked={getCheckedRootData!.filter((cur: any) => cur.key === 'row-all')[0]?.checked}
156
159
  onChange={(e: any) => {
@@ -29,7 +29,7 @@ type TableRowProps = {
29
29
  getCheckedRootData?: any[];
30
30
  updategetCheckedRootData?: any;
31
31
  onClick?: (el: any, val: any) => void;
32
- onCheck?: (val: any) => void;
32
+ onCheck?: (val: any, el: any, checked: boolean) => void;
33
33
  evDragEnd?: (option: any) => void | undefined;
34
34
  evDragStart?: (option: any) => void | undefined;
35
35
  evCellMouseEnter?: (el: any) => void | undefined;
@@ -31,6 +31,7 @@ type TableProps = {
31
31
  responsive?: boolean;
32
32
  enhancedResponsive?: boolean;
33
33
  enhancedResponsiveWithScrollBar?: boolean;
34
+ cellAutoWidth?: boolean;
34
35
  /** -- */
35
36
  id?: string;
36
37
  onCellMouseEnter?: (el: any) => void;
@@ -43,7 +44,7 @@ type TableProps = {
43
44
  onHeadCellMouseLeave?: (el: any) => void;
44
45
  onHeadCellClick?: (el: any) => void;
45
46
  onClick?: (el: any, val: any) => void;
46
- onCheck?: (val: any) => void;
47
+ onCheck?: (val: any, el: any, checked: boolean) => void;
47
48
  onDrag?: (dragStart: any, dragEnd: any ) => void;
48
49
  onRenderFinished?: (res: boolean) => void;
49
50
  };
@@ -68,6 +69,7 @@ const Table = (props: TableProps) => {
68
69
  responsive,
69
70
  enhancedResponsive,
70
71
  enhancedResponsiveWithScrollBar,
72
+ cellAutoWidth,
71
73
  id,
72
74
  onCellMouseEnter,
73
75
  onCellMouseLeave,
@@ -569,7 +571,7 @@ const Table = (props: TableProps) => {
569
571
 
570
572
  <div ref={rootRef} id={idRes} className={`table__wrapper ${wrapperClassName || wrapperClassName === '' ? wrapperClassName : `mb-3 position-relative`} ${responsiveClasses} ${enhancedResponsiveClasses} ${checkableClasses} ${radioClasses} ${draggableClasses} ${sortableClasses}`}>
571
573
 
572
- <table className={`${tableClassName || tableClassName === '' ? tableClassName : "table"} ${tableClasses}`}>
574
+ <table className={`${tableClassName || tableClassName === '' ? tableClassName : "table"} ${tableClasses}`} style={typeof cellAutoWidth === 'undefined' || cellAutoWidth === false ? {} : {width: '1%'}}>
573
575
 
574
576
  <TableHeaders
575
577
  data={_headers}
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "UIUX Lab",
3
3
  "email": "uiuxlab@gmail.com",
4
4
  "name": "funda-ui",
5
- "version": "3.9.35",
5
+ "version": "3.9.55",
6
6
  "description": "React components using pure Bootstrap 5+ which does not contain any external style and script libraries.",
7
7
  "repository": {
8
8
  "type": "git",