react-table-edit 1.4.34 → 1.4.36

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.
@@ -30,6 +30,7 @@ type Props = {
30
30
  onCloseMenu?: () => void;
31
31
  footerComponent?: () => JSX.Element;
32
32
  onChange: (val: any) => void;
33
+ compareFunction?: (row?: any) => boolean | undefined;
33
34
  };
34
35
  declare const SelectTable: React.ForwardRefExoticComponent<Props & React.RefAttributes<unknown>>;
35
36
  export { SelectTable };
@@ -1,4 +1,4 @@
1
- import { Dispatch, ReactNode, SetStateAction, JSX } from "react";
1
+ import { Dispatch, JSX, ReactNode, SetStateAction } from "react";
2
2
  import { UseFormGetValues, UseFormReset, UseFormSetValue } from "react-hook-form";
3
3
  /** Căn lề văn bản trong bảng */
4
4
  type ITextAlign = 'center' | 'left' | 'right';
@@ -104,6 +104,8 @@ export type ISettingSelectElement = {
104
104
  loadOptions?: (keyword: string, callback: (rs: any[]) => void) => void;
105
105
  /** Sự kiện mở menu */
106
106
  onOpenMenu?: (row: any, col: IColumnTable, indexRow: number) => void;
107
+ /** Tuỳ chỉnh xác định hàng được chọn */
108
+ compareFunction?: (rowOption?: any, rowData?: any) => boolean;
107
109
  };
108
110
  /** Cấu hình cho kiểu số */
109
111
  export type ISettingNumericElement = {
package/dist/index.d.ts CHANGED
@@ -108,6 +108,8 @@ type ISettingSelectElement = {
108
108
  loadOptions?: (keyword: string, callback: (rs: any[]) => void) => void;
109
109
  /** Sự kiện mở menu */
110
110
  onOpenMenu?: (row: any, col: IColumnTable, indexRow: number) => void;
111
+ /** Tuỳ chỉnh xác định hàng được chọn */
112
+ compareFunction?: (rowOption?: any, rowData?: any) => boolean;
111
113
  };
112
114
  /** Cấu hình cho kiểu số */
113
115
  type ISettingNumericElement = {
@@ -530,6 +532,7 @@ type Props$1 = {
530
532
  onCloseMenu?: () => void;
531
533
  footerComponent?: () => JSX.Element;
532
534
  onChange: (val: any) => void;
535
+ compareFunction?: (row?: any) => boolean | undefined;
533
536
  };
534
537
  declare const SelectTable: React__default.ForwardRefExoticComponent<Props$1 & React__default.RefAttributes<unknown>>;
535
538
 
package/dist/index.js CHANGED
@@ -6,8 +6,8 @@ var jsxRuntime = require('react/jsx-runtime');
6
6
  var React$5 = require('react');
7
7
  var reactI18next = require('react-i18next');
8
8
  var ReactDOM = require('react-dom');
9
- var client = require('react-dom/client');
10
9
  var toast = require('react-hot-toast');
10
+ var client = require('react-dom/client');
11
11
  var reactRouterDom = require('react-router-dom');
12
12
 
13
13
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
@@ -17769,39 +17769,6 @@ const renderLabel = (props) => {
17769
17769
  return (jsxRuntime.jsx(React$5.Fragment, { children: isLabel === false ? '' : jsxRuntime.jsxs(Label$1, { for: name, children: [t(label ? label : ''), " ", required ? jsxRuntime.jsx("span", { className: "text-danger", children: "*" }) : '', " "] }) }));
17770
17770
  };
17771
17771
 
17772
- const TextInput = (props) => {
17773
- const { control, id, name, min, max, type, label, labelSize, required, errors, height, disabled, row, isLabel, placeholder, autoFocus, inLine, callback, readOnly, classes, ...rest } = props;
17774
- const renderInput = () => {
17775
- return (jsxRuntime.jsxs(React$5.Fragment, { children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => (jsxRuntime.jsx(Input$1, { id: id, value: !isNullOrUndefined(value) ? value : '', onChange: (val) => {
17776
- if (min || max) {
17777
- if (min && Number(val.target.value) >= min) {
17778
- onChange(val.target.value);
17779
- if (callback) {
17780
- callback(val);
17781
- }
17782
- }
17783
- if (max && Number(val.target.value) <= max) {
17784
- onChange(val.target.value);
17785
- if (callback) {
17786
- callback(val);
17787
- }
17788
- }
17789
- }
17790
- else {
17791
- onChange(val.target.value);
17792
- if (callback) {
17793
- callback(val);
17794
- }
17795
- }
17796
- }, style: { height: `${height}px` }, autoFocus: autoFocus, disabled: disabled, placeholder: placeholder, type: type ? type : 'text', invalid: errors && true, className: "h-100", rows: row, min: min, max: max, readOnly: readOnly, ...rest })) }), errors && jsxRuntime.jsx(FormFeedback$1, { children: errors?.message })] }));
17797
- };
17798
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$2(' align', {
17799
- [labelSize ? labelSize : '']: labelSize,
17800
- [classes ? classes : '']: classes,
17801
- 'form-row-inline-error': errors
17802
- }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
17803
- };
17804
-
17805
17772
  const NumberInput = (props) => {
17806
17773
  const { id, control, fractionCurrency, name, min, max, label, labelSize, required, errors, disabled, isLabel, fixedDecimalScale, placeholder, inLine, callback, decimalSeparator = ',', thousandSeparator = '.', classes, width, allowNegative } = props;
17807
17774
  const renderInput = () => {
@@ -17847,9 +17814,42 @@ const NumberInput = (props) => {
17847
17814
  }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { style: { width: width ? width : undefined }, className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
17848
17815
  };
17849
17816
 
17817
+ const TextInput = (props) => {
17818
+ const { control, id, name, min, max, type, label, labelSize, required, errors, height, disabled, row, isLabel, placeholder, autoFocus, inLine, callback, readOnly, classes, ...rest } = props;
17819
+ const renderInput = () => {
17820
+ return (jsxRuntime.jsxs(React$5.Fragment, { children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => (jsxRuntime.jsx(Input$1, { id: id, value: !isNullOrUndefined(value) ? value : '', onChange: (val) => {
17821
+ if (min || max) {
17822
+ if (min && Number(val.target.value) >= min) {
17823
+ onChange(val.target.value);
17824
+ if (callback) {
17825
+ callback(val);
17826
+ }
17827
+ }
17828
+ if (max && Number(val.target.value) <= max) {
17829
+ onChange(val.target.value);
17830
+ if (callback) {
17831
+ callback(val);
17832
+ }
17833
+ }
17834
+ }
17835
+ else {
17836
+ onChange(val.target.value);
17837
+ if (callback) {
17838
+ callback(val);
17839
+ }
17840
+ }
17841
+ }, style: { height: `${height}px` }, autoFocus: autoFocus, disabled: disabled, placeholder: placeholder, type: type ? type : 'text', invalid: errors && true, className: "h-100", rows: row, min: min, max: max, readOnly: readOnly, ...rest })) }), errors && jsxRuntime.jsx(FormFeedback$1, { children: errors?.message })] }));
17842
+ };
17843
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$2(' align', {
17844
+ [labelSize ? labelSize : '']: labelSize,
17845
+ [classes ? classes : '']: classes,
17846
+ 'form-row-inline-error': errors
17847
+ }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { className: classNames$2('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
17848
+ };
17849
+
17850
17850
  const defaultMaxHeight$1 = 250;
17851
17851
  const SelectTable = React$5.forwardRef((props, ref) => {
17852
- const { id, menuWidth, width, invalid, placeholder, textAlign, options, columns, value, fieldValue, fieldLabel, maxHeight, isClearable, component, isMulti, noHeader, isDisabled, showFooter, formatSetting, allowCreate, onPaste, onChange, handleAdd, onKeyDown, onOpenMenu, loadOptions, onCloseMenu, footerComponent, formatOptionLabel } = props;
17852
+ const { id, menuWidth, width, invalid, placeholder, textAlign, options, columns, value, fieldValue, fieldLabel, maxHeight, isClearable, component, isMulti, noHeader, isDisabled, showFooter, formatSetting, allowCreate, onPaste, onChange, handleAdd, onKeyDown, onOpenMenu, loadOptions, onCloseMenu, footerComponent, formatOptionLabel, compareFunction } = props;
17853
17853
  const selectTableRef = React$5.useRef(null);
17854
17854
  const selectMenuTableRef = React$5.useRef(null);
17855
17855
  const inputRef = React$5.useRef(null);
@@ -17888,7 +17888,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
17888
17888
  };
17889
17889
  React$5.useEffect(() => {
17890
17890
  if (dropdownOpen && value && !isMulti && selectMenuTableRef) {
17891
- const index = (optionsLoad ? optionsLoad : options)?.findIndex((e) => e[fieldValue ?? 'value'] === value[fieldValue ?? 'value']);
17891
+ const index = (optionsLoad ? optionsLoad : options)?.findIndex((row) => (compareFunction ? compareFunction(row) : row[fieldValue ?? 'value'] === value[fieldValue ?? 'value']));
17892
17892
  if (index >= 0) {
17893
17893
  selectMenuTableRef.current.scrollTo({ top: (index - 1) * 30 });
17894
17894
  }
@@ -17995,7 +17995,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
17995
17995
  newIndex = indexFocus + 1;
17996
17996
  }
17997
17997
  else if (value) {
17998
- newIndex = (optionsLoad ? optionsLoad : options)?.findIndex((e) => e[fieldValue ?? 'value'] === value[fieldValue ?? 'value']) + 1;
17998
+ newIndex = (optionsLoad ? optionsLoad : options)?.findIndex((row) => (compareFunction ? compareFunction(row) : row[fieldValue ?? 'value'] === value[fieldValue ?? 'value'])) + 1;
17999
17999
  }
18000
18000
  if (newIndex < (optionsLoad ? optionsLoad : options).length) {
18001
18001
  setIndexFocus(newIndex);
@@ -18019,7 +18019,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
18019
18019
  newIndex = indexFocus - 1;
18020
18020
  }
18021
18021
  else if (value) {
18022
- newIndex = (optionsLoad ? optionsLoad : options)?.findIndex((e) => e[fieldValue ?? 'value'] === value[fieldValue ?? 'value']) - 1;
18022
+ newIndex = (optionsLoad ? optionsLoad : options)?.findIndex((row) => (compareFunction ? compareFunction(row) : row[fieldValue ?? 'value'] === value[fieldValue ?? 'value'])) - 1;
18023
18023
  }
18024
18024
  if (newIndex >= 0) {
18025
18025
  setIndexFocus(newIndex);
@@ -18115,9 +18115,9 @@ const SelectTable = React$5.forwardRef((props, ref) => {
18115
18115
  };
18116
18116
  const RenderElement = React__default["default"].memo((props) => {
18117
18117
  const { indexRow, row, isSelected, level = 0 } = props;
18118
- return (jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, style: { paddingLeft: 10 * level }, className: classNames$2('r-select-row', { 'last-row': indexRow === (optionsLoad ? optionsLoad : options).length - 1 }, { 'fisrt-row': indexRow === 0 }), children: [isMulti && jsxRuntime.jsx("td", { className: classNames$2(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && value[fieldValue ?? 'value'] === row[fieldValue ?? 'value'] }), style: { width: 40, textAlign: 'center', padding: 0, paddingBottom: 6 }, onClick: (e) => {
18118
+ return (jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, style: { paddingLeft: 10 * level }, className: classNames$2('r-select-row', { 'last-row': indexRow === (optionsLoad ? optionsLoad : options).length - 1 }, { 'fisrt-row': indexRow === 0 }), children: [isMulti && jsxRuntime.jsx("td", { className: classNames$2(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && (compareFunction ? compareFunction(row) : value[fieldValue ?? 'value'] === row[fieldValue ?? 'value']) }), style: { width: 40, textAlign: 'center', padding: 0, paddingBottom: 6 }, onClick: (e) => {
18119
18119
  if (isMulti) {
18120
- const index = value?.findIndex((x) => x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
18120
+ const index = value?.findIndex((x) => (compareFunction ? compareFunction(row) : x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']));
18121
18121
  if (index > -1) {
18122
18122
  value?.splice(index, 1);
18123
18123
  handChange([...value]);
@@ -18146,14 +18146,14 @@ const SelectTable = React$5.forwardRef((props, ref) => {
18146
18146
  }
18147
18147
  return (jsxRuntime.jsxs(React$5.Fragment, { children: [col.visible !== false && jsxRuntime.jsx("td", { id: `select-${id}-${indexRow}-${indexCol}`,
18148
18148
  // ref={refRow}
18149
- className: classNames$2(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && value[fieldValue ?? 'value'] === row[fieldValue ?? 'value'] }), style: {
18149
+ className: classNames$2(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && (compareFunction ? compareFunction(row) : value[fieldValue ?? 'value'] === row[fieldValue ?? 'value']) }), style: {
18150
18150
  minWidth: col.minWidth,
18151
18151
  width: col.width,
18152
18152
  maxWidth: col.maxWidth,
18153
18153
  textAlign: col.textAlign ? col.textAlign : 'left'
18154
18154
  }, onClick: (e) => {
18155
18155
  if (isMulti) {
18156
- const index = value?.findIndex((x) => x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
18156
+ const index = value?.findIndex((x) => (compareFunction ? compareFunction(row) : x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']));
18157
18157
  if (index > -1) {
18158
18158
  value?.splice(index, 1);
18159
18159
  handChange([...value]);
@@ -18198,7 +18198,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
18198
18198
  }, readOnly: true, className: classNames$2('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
18199
18199
  return (renderHeaderCol(col, index));
18200
18200
  })] }) }), ((optionsLoad ? optionsLoad : options) && !isLoading) && jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("tbody", { className: 'r-select-gridcontent', children: [haveCreateNew && jsxRuntime.jsx(RenderElement, { isSelected: false, indexRow: 0, row: { valueCreate: searchTerm, [fieldValue ?? "value"]: searchTerm, [fieldLabel ?? "label"]: `${t('Create')} '${searchTerm}'`, isCreated: true } }), (optionsLoad ? optionsLoad : options)?.map((row, indexRow) => {
18201
- const isSelected = isMulti && value?.some((x) => x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
18201
+ const isSelected = isMulti && value?.some((x) => (compareFunction ? compareFunction(row) : x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']));
18202
18202
  return (jsxRuntime.jsx(RenderElement, { isSelected: isSelected ?? false, indexRow: indexRow + (haveCreateNew ? 1 : 0), row: row }, `select-table-${indexRow}`));
18203
18203
  })] }) })] }), ((((optionsLoad ? optionsLoad : options)?.length ?? 0) === 0) && !haveCreateNew && !isLoading) && jsxRuntime.jsxs("div", { className: "r-no-data", children: [jsxRuntime.jsx("svg", { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg", children: jsxRuntime.jsxs("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [jsxRuntime.jsx("ellipse", { fill: "#f5f5f5", cx: "32", cy: "33", rx: "32", ry: "7" }), jsxRuntime.jsxs("g", { fillRule: "nonzero", stroke: "#d9d9d9", children: [jsxRuntime.jsx("path", { d: "M55 12.76L44.854 1.258C44.367.474 43.656 0 42.907 0H21.093c-.749 0-1.46.474-1.947 1.257L9 12.761V22h46v-9.24z" }), jsxRuntime.jsx("path", { d: "M41.613 15.931c0-1.605.994-2.93 2.227-2.931H55v18.137C55 33.26 53.68 35 52.05 35h-40.1C10.32 35 9 33.259 9 31.137V13h11.16c1.233 0 2.227 1.323 2.227 2.928v.022c0 1.605 1.005 2.901 2.237 2.901h14.752c1.232 0 2.237-1.308 2.237-2.913v-.007z", fill: "#fafafa" })] })] }) }), t('No data available.')] }), isLoading && jsxRuntime.jsxs("div", { className: "r-no-data", children: [jsxRuntime.jsx(Spinner$1, { className: "me-1", children: " " }), t('Loading...')] })] }));
18204
18204
  };
@@ -18464,7 +18464,7 @@ const EditForm = React$5.forwardRef((props, ref) => {
18464
18464
  height: template ? 0 : 28,
18465
18465
  lineHeight: template ? 0 : 19,
18466
18466
  padding: template ? 0 : 'auto',
18467
- backgroundColor: '#FFF',
18467
+ backgroundColor: '$white',
18468
18468
  textAlign: textAlign ?? 'left'
18469
18469
  }, placeholder: placeholder, innerRef: inputRef, onKeyDown: (e) => handleOnKeyDown(e), onPaste: (e) => onPaste && onPaste(e), readOnly: true })] }) }), jsxRuntime.jsx(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown p-0', style: {
18470
18470
  minWidth: minWidth ? minWidth : defaultWidth,
@@ -39753,7 +39753,7 @@ const messageHtmlBoxConfirm = (t, message, handle, data, title = 'Important', bt
39753
39753
  MySwal.fire({
39754
39754
  title: t(title),
39755
39755
  html: message.map((item, index) => {
39756
- return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
39756
+ return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid $border-color${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
39757
39757
  }).join(''),
39758
39758
  allowOutsideClick: false,
39759
39759
  showCancelButton: true,
@@ -39774,7 +39774,7 @@ const messageHtmlBoxError = (t, message, title = 'Important', btnCancel = 'Ok')
39774
39774
  MySwal.fire({
39775
39775
  title: t(title),
39776
39776
  html: message.map((item, index) => {
39777
- return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid #e0e0e0${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
39777
+ return (`<div style="min-width: 448px padding: 7px width:100% border: 1px solid $border-color${index !== 0 ? ' border-top-width: 0px' : ''}">${item}</div>`);
39778
39778
  }).join(''),
39779
39779
  allowOutsideClick: false,
39780
39780
  showCancelButton: true,
@@ -40336,7 +40336,7 @@ const Sidebar = (props) => {
40336
40336
  position: 'fixed',
40337
40337
  top: '50%',
40338
40338
  transform: 'translate(-50%, -50%)',
40339
- background: '#FFF',
40339
+ background: '$white',
40340
40340
  filter: 'drop-shadow(0.9px 0.9px 1.5px)',
40341
40341
  height: 50,
40342
40342
  display: 'flex',
@@ -42650,7 +42650,7 @@ const CommandElement = (props) => {
42650
42650
  return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsx("div", { className: 'd-flex align-items-center', style: { columnGap: 10 }, children: commandItems.map((item, index) => {
42651
42651
  return (jsxRuntime.jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classNames$2('command-item', {
42652
42652
  'btn-icon': item.tooltip === ''
42653
- }), color: item.color ? item.color : '#000', onClick: (e) => {
42653
+ }), color: item.color ? item.color : '$black', onClick: (e) => {
42654
42654
  handleCommandClick(item.id, rowData, indexRow);
42655
42655
  if (indexRow === indexFocus) {
42656
42656
  if (setIndexFocus) {
@@ -42940,10 +42940,10 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42940
42940
  optionsSelect = col.selectSettings?.options ? (col.selectSettings?.validateOption ? col.selectSettings?.options.filter((item) => col.selectSettings?.validateOption(item, row)) : col.selectSettings?.options) : [];
42941
42941
  }
42942
42942
  if (col.selectSettings?.isMulti) {
42943
- valueSelect = optionsSelect.filter((x) => row[col.field].some((y) => x[col.selectSettings?.fieldValue ?? 'value'] === y));
42943
+ valueSelect = optionsSelect.filter((x) => row[col.field].some((y) => col.selectSettings?.compareFunction ? col.selectSettings.compareFunction(x, row) : x[col.selectSettings?.fieldValue ?? 'value'] === y));
42944
42944
  }
42945
42945
  else {
42946
- valueSelect = (!isNullOrUndefined(row[col.field]) && row[col.field] !== '') ? optionsSelect?.find((val) => val[col.selectSettings?.fieldValue ?? 'value'] === row[col.field]) : '';
42946
+ valueSelect = (!isNullOrUndefined(row[col.field]) && row[col.field] !== '') ? optionsSelect?.find((val) => col.selectSettings?.compareFunction ? col.selectSettings.compareFunction(val, row) : val[col.selectSettings?.fieldValue ?? 'value'] === row[col.field]) : '';
42947
42947
  if (!valueSelect && col.selectSettings?.defaultValue) {
42948
42948
  valueSelect = col.selectSettings?.defaultValue(row);
42949
42949
  }
@@ -42973,7 +42973,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42973
42973
  col.callback(val, indexRow, row);
42974
42974
  }
42975
42975
  handleDataChange(row, col, indexRow);
42976
- }, fieldValue: col.selectSettings?.fieldValue, fieldLabel: col.selectSettings?.fieldLabel, component: gridRef, columns: col.selectSettings?.columns, isClearable: col.selectSettings?.isClearable ?? false, formatSetting: formatSetting, placeholder: t('Select'), loadOptions: col.selectSettings?.loadOptions, handleAdd: col.selectSettings?.handAddNew ? (e) => col.selectSettings?.handAddNew(e, indexRow, row) : undefined, isMulti: col.selectSettings?.isMulti, noHeader: col.selectSettings?.noHeader, showFooter: col.selectSettings?.showFooter, formatOptionLabel: col.selectSettings?.formatOptionLabel, footerComponent: col.selectSettings?.footerComponent, invalid: (col.validate && !isNullOrUndefined(col.validate(row[col.field], row))), maxHeight: col.selectSettings?.heightPopup ? Number(col.selectSettings?.heightPopup) : undefined, menuWidth: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : undefined, textAlign: col.textAlign ?? 'left', allowCreate: col.selectSettings?.allowCreate, onKeyDown: (e) => {
42976
+ }, fieldValue: col.selectSettings?.fieldValue, fieldLabel: col.selectSettings?.fieldLabel, component: gridRef, columns: col.selectSettings?.columns, isClearable: col.selectSettings?.isClearable ?? false, formatSetting: formatSetting, placeholder: t('Select'), loadOptions: col.selectSettings?.loadOptions, handleAdd: col.selectSettings?.handAddNew ? (e) => col.selectSettings?.handAddNew(e, indexRow, row) : undefined, isMulti: col.selectSettings?.isMulti, noHeader: col.selectSettings?.noHeader, showFooter: col.selectSettings?.showFooter, formatOptionLabel: col.selectSettings?.formatOptionLabel, footerComponent: col.selectSettings?.footerComponent, invalid: (col.validate && !isNullOrUndefined(col.validate(row[col.field], row))), maxHeight: col.selectSettings?.heightPopup ? Number(col.selectSettings?.heightPopup) : undefined, menuWidth: col.selectSettings?.widthPopup ? Number(col.selectSettings?.widthPopup) : undefined, textAlign: col.textAlign ?? 'left', allowCreate: col.selectSettings?.allowCreate, compareFunction: (e) => col.selectSettings?.compareFunction?.(e, row), onKeyDown: (e) => {
42977
42977
  return checkKeyDown(e, row, col, indexRow + 1, indexCol + 1);
42978
42978
  }, onOpenMenu: () => {
42979
42979
  if (col.selectSettings?.onOpenMenu) {
@@ -43789,7 +43789,7 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
43789
43789
  };
43790
43790
  return (jsxRuntime.jsxs(React$5.Fragment, { children: [renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : '', jsxRuntime.jsxs("div", { className: classNames$2('tab-custom', { 'tab-parent': tabParent }, { 'tab-child': tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [jsxRuntime.jsx("div", { onClick: () => handleScroll(-200), className: classNames$2('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsxRuntime.jsx(SvgChevronLeft, {}) }), jsxRuntime.jsx("div", { ref: tabComponentRef, className: "tab-component", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: jsxRuntime.jsx("div", { ref: contentComponentRef, children: dataMenu.map((item) => {
43791
43791
  if (item?.resAttributes?.IS_MENU === '1') {
43792
- return (jsxRuntime.jsxs(UncontrolledDropdown, { draggable: false, className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: 'down', style: { backgroundColor: openMenu ? '#e0e0e0' : '' }, children: [jsxRuntime.jsx(DropdownToggle$1, { color: "#00000", style: { border: 'none', boxShadow: 'none', margin: 0, padding: 0 }, className: "background-none", children: jsxRuntime.jsx("div", { children: item.name }) }), jsxRuntime.jsx(DropdownMenu$1, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => jsxRuntime.jsx(DropdownItem$1, { style: { borderRadius: '5px', margin: "0 0.5rem", width: "95%" }, onClick: () => {
43792
+ return (jsxRuntime.jsxs(UncontrolledDropdown, { draggable: false, className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: 'down', style: { backgroundColor: openMenu ? '$border-color' : '' }, children: [jsxRuntime.jsx(DropdownToggle$1, { color: "$black00", style: { border: 'none', boxShadow: 'none', margin: 0, padding: 0 }, className: "background-none", children: jsxRuntime.jsx("div", { children: item.name }) }), jsxRuntime.jsx(DropdownMenu$1, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => jsxRuntime.jsx(DropdownItem$1, { style: { borderRadius: '5px', margin: "0 0.5rem", width: "95%" }, onClick: () => {
43793
43793
  if (x.resAttributes.MODAL_VALUE) {
43794
43794
  handleModal(x.resAttributes.MODAL_VALUE);
43795
43795
  }
@@ -44681,8 +44681,8 @@ const InputStyleComponent = (props) => {
44681
44681
  fontWeight: value.bold ? "bold" : 'normal',
44682
44682
  fontStyle: value.italic ? "italic" : 'normal',
44683
44683
  textDecoration: value.underline ? "underline" : 'normal',
44684
- backgroundColor: value.backgroundColor ?? '#ffffff',
44685
- color: value.color ?? '#000000'
44684
+ backgroundColor: value.backgroundColor ?? '$white',
44685
+ color: value.color ?? '$black'
44686
44686
  }, children: props.label }));
44687
44687
  } }), jsxRuntime.jsx("div", { className: classNames$2('ms-25', { 'd-none': disabledFontSize }), style: { width: 60 }, children: jsxRuntime.jsx(SelectTable, { options: Array.from({ length: 100 }, (_, i) => ({ value: i + 1, label: i + 1 })), noHeader: true, isDisabled: disabled, value: value.fontSize ? { value: value.fontSize, label: value.fontSize } : null, onChange: (val) => {
44688
44688
  onChange({ ...value, fontSize: val.value });
@@ -44698,9 +44698,9 @@ const InputStyleComponent = (props) => {
44698
44698
  if (!disabled) {
44699
44699
  onChange({ ...value, underline: !value.underline });
44700
44700
  }
44701
- }, children: jsxRuntime.jsx(SvgUnderline, { fontSize: 18 }) }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledColor }), children: [jsxRuntime.jsx(SvgType, { stroke: value.color ?? '#000000', fontSize: 18 }), jsxRuntime.jsx("input", { type: "color", id: "color", disabled: disabled, value: value.color, style: { color: '#FFF', border: 'none', height: 0, width: 0, outline: 'none', padding: 0 }, onChange: (e) => {
44701
+ }, children: jsxRuntime.jsx(SvgUnderline, { fontSize: 18 }) }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledColor }), children: [jsxRuntime.jsx(SvgType, { stroke: value.color ?? '$black', fontSize: 18 }), jsxRuntime.jsx("input", { type: "color", id: "color", disabled: disabled, value: value.color, style: { color: '$white', border: 'none', height: 0, width: 0, outline: 'none', padding: 0 }, onChange: (e) => {
44702
44702
  onChange({ ...value, color: e.target.value });
44703
- } })] }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsxRuntime.jsx(SvgDroplet, { fill: value.backgroundColor ?? '#ffffff', fontSize: 18 }), jsxRuntime.jsx(Input$1, { id: "backgroundColor", type: "color", disabled: disabled, style: { color: '#FFF', border: 'none', height: 0, width: 0, outline: 'none', padding: 0 }, value: value.backgroundColor, onChange: (e) => {
44703
+ } })] }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$2('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsxRuntime.jsx(SvgDroplet, { fill: value.backgroundColor ?? '$white', fontSize: 18 }), jsxRuntime.jsx(Input$1, { id: "backgroundColor", type: "color", disabled: disabled, style: { color: '$white', border: 'none', height: 0, width: 0, outline: 'none', padding: 0 }, value: value.backgroundColor, onChange: (e) => {
44704
44704
  onChange({ ...value, backgroundColor: e.target.value });
44705
44705
  } })] })] }) }));
44706
44706
  };
@@ -46170,8 +46170,8 @@ const CheckboxInput = (props) => {
46170
46170
 
46171
46171
  const defaultStyleExportSetting = {
46172
46172
  title: {
46173
- color: '#000000',
46174
- backgroundColor: '#ffffff',
46173
+ color: '$black',
46174
+ backgroundColor: '$white',
46175
46175
  fontFamily: 'Times New Roman',
46176
46176
  fontSize: 18,
46177
46177
  row: 2,
@@ -46180,8 +46180,8 @@ const defaultStyleExportSetting = {
46180
46180
  underline: false
46181
46181
  },
46182
46182
  subtitle: {
46183
- color: '#000000',
46184
- backgroundColor: '#ffffff',
46183
+ color: '$black',
46184
+ backgroundColor: '$white',
46185
46185
  fontFamily: 'Times New Roman',
46186
46186
  fontSize: 12,
46187
46187
  row: 3,
@@ -46190,7 +46190,7 @@ const defaultStyleExportSetting = {
46190
46190
  underline: false
46191
46191
  },
46192
46192
  header: {
46193
- color: "#000000",
46193
+ color: "$black",
46194
46194
  backgroundColor: "#ffe0cc",
46195
46195
  fontFamily: 'Times New Roman',
46196
46196
  fontSize: 14,
@@ -46200,7 +46200,7 @@ const defaultStyleExportSetting = {
46200
46200
  underline: false
46201
46201
  },
46202
46202
  group1: {
46203
- color: "#000000",
46203
+ color: "$black",
46204
46204
  backgroundColor: "#bfbfbf",
46205
46205
  fontFamily: 'Times New Roman',
46206
46206
  fontSize: 12,
@@ -46209,7 +46209,7 @@ const defaultStyleExportSetting = {
46209
46209
  underline: false
46210
46210
  },
46211
46211
  group2: {
46212
- color: "#000000",
46212
+ color: "$black",
46213
46213
  backgroundColor: "#d9d9d9",
46214
46214
  fontFamily: 'Times New Roman',
46215
46215
  fontSize: 12,
@@ -46218,7 +46218,7 @@ const defaultStyleExportSetting = {
46218
46218
  underline: false
46219
46219
  },
46220
46220
  group3: {
46221
- color: "#000000",
46221
+ color: "$black",
46222
46222
  backgroundColor: "#f2f2f2",
46223
46223
  fontFamily: 'Times New Roman',
46224
46224
  fontSize: 12,
@@ -46227,8 +46227,8 @@ const defaultStyleExportSetting = {
46227
46227
  underline: false
46228
46228
  },
46229
46229
  content: {
46230
- color: "#000000",
46231
- backgroundColor: '#ffffff',
46230
+ color: "$black",
46231
+ backgroundColor: '$white',
46232
46232
  fontFamily: 'Times New Roman',
46233
46233
  fontSize: 11,
46234
46234
  bold: false,
@@ -46236,7 +46236,7 @@ const defaultStyleExportSetting = {
46236
46236
  underline: false
46237
46237
  },
46238
46238
  summary: {
46239
- color: "#000000",
46239
+ color: "$black",
46240
46240
  backgroundColor: '#ffe0cc',
46241
46241
  fontFamily: 'Times New Roman',
46242
46242
  fontSize: 12,