react-table-edit 1.4.18 → 1.4.20

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
@@ -1158,7 +1158,7 @@ if (process.env.NODE_ENV !== 'production') {
1158
1158
 
1159
1159
  var PropTypes = propTypes$1.exports;
1160
1160
 
1161
- var classnames$2 = {exports: {}};
1161
+ var classnames$1 = {exports: {}};
1162
1162
 
1163
1163
  /*!
1164
1164
  Copyright (c) 2018 Jed Watson.
@@ -1233,9 +1233,9 @@ var classnames$2 = {exports: {}};
1233
1233
  window.classNames = classNames;
1234
1234
  }
1235
1235
  }());
1236
- }(classnames$2));
1236
+ }(classnames$1));
1237
1237
 
1238
- var classNames$1 = classnames$2.exports;
1238
+ var classNames$2 = classnames$1.exports;
1239
1239
 
1240
1240
  var ManagerReferenceNodeContext = React__namespace.createContext();
1241
1241
  var ManagerReferenceNodeSetterContext = React__namespace.createContext();
@@ -4587,7 +4587,7 @@ const Row = props => {
4587
4587
  const isXs = !i;
4588
4588
  colClasses.push(isXs ? `row-cols-${colSize}` : `row-cols-${colWidth}-${colSize}`);
4589
4589
  });
4590
- const classes = mapToCssModules(classNames$1(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
4590
+ const classes = mapToCssModules(classNames$2(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
4591
4591
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
4592
4592
  className: classes
4593
4593
  }));
@@ -4647,7 +4647,7 @@ const getColumnClasses = (attributes, cssModule, widths = colWidths$1) => {
4647
4647
  if (isObject$1(columnProp)) {
4648
4648
  const colSizeInterfix = isXs ? '-' : `-${colWidth}-`;
4649
4649
  const colClass = getColumnSizeClass$1(isXs, colWidth, columnProp.size);
4650
- colClasses.push(mapToCssModules(classNames$1({
4650
+ colClasses.push(mapToCssModules(classNames$2({
4651
4651
  [colClass]: columnProp.size || columnProp.size === '',
4652
4652
  [`order${colSizeInterfix}${columnProp.order}`]: columnProp.order || columnProp.order === 0,
4653
4653
  [`offset${colSizeInterfix}${columnProp.offset}`]: columnProp.offset || columnProp.offset === 0
@@ -4681,7 +4681,7 @@ const Col = props => {
4681
4681
  colClasses.push('col');
4682
4682
  }
4683
4683
 
4684
- const classes = mapToCssModules(classNames$1(className, colClasses), cssModule);
4684
+ const classes = mapToCssModules(classNames$2(className, colClasses), cssModule);
4685
4685
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, modifiedAttributes, {
4686
4686
  className: classes
4687
4687
  }));
@@ -4789,7 +4789,7 @@ class NavLink extends React__default["default"].Component {
4789
4789
  } = _this$props,
4790
4790
  attributes = _objectWithoutProperties$1(_this$props, _excluded$15);
4791
4791
 
4792
- const classes = mapToCssModules(classNames$1(className, 'nav-link', {
4792
+ const classes = mapToCssModules(classNames$2(className, 'nav-link', {
4793
4793
  disabled: attributes.disabled,
4794
4794
  active: active
4795
4795
  }), cssModule);
@@ -4877,7 +4877,7 @@ class Button extends React__default["default"].Component {
4877
4877
  attributes = _objectWithoutProperties$1(_this$props, _excluded$12);
4878
4878
 
4879
4879
  const btnOutlineColor = `btn${outline ? '-outline' : ''}-${color}`;
4880
- const classes = mapToCssModules(classNames$1(className, close && 'btn-close', close || 'btn', close || btnOutlineColor, size ? `btn-${size}` : false, block ? 'd-block w-100' : false, {
4880
+ const classes = mapToCssModules(classNames$2(className, close && 'btn-close', close || 'btn', close || btnOutlineColor, size ? `btn-${size}` : false, block ? 'd-block w-100' : false, {
4881
4881
  active,
4882
4882
  disabled: this.props.disabled
4883
4883
  }), cssModule);
@@ -4965,7 +4965,7 @@ class ButtonToggle extends React__default["default"].Component {
4965
4965
  } = _this$props,
4966
4966
  attributes = _objectWithoutProperties$1(_this$props, _excluded$11);
4967
4967
 
4968
- const classes = mapToCssModules(classNames$1(className, {
4968
+ const classes = mapToCssModules(classNames$2(className, {
4969
4969
  focus: this.state.focus
4970
4970
  }), this.props.cssModule);
4971
4971
  return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends$5({
@@ -5239,7 +5239,7 @@ class Dropdown extends React__default["default"].Component {
5239
5239
  });
5240
5240
  }
5241
5241
 
5242
- const classes = mapToCssModules(classNames$1(className, nav && active ? 'active' : false, setActiveFromChild && subItemIsActive ? 'active' : false, {
5242
+ const classes = mapToCssModules(classNames$2(className, nav && active ? 'active' : false, setActiveFromChild && subItemIsActive ? 'active' : false, {
5243
5243
  'btn-group': group,
5244
5244
  [`btn-group-${size}`]: !!size,
5245
5245
  dropdown: !group,
@@ -5380,7 +5380,7 @@ class DropdownItem extends React__default["default"].Component {
5380
5380
  } = _omit,
5381
5381
  props = _objectWithoutProperties$1(_omit, _excluded$Z);
5382
5382
 
5383
- const classes = mapToCssModules(classNames$1(className, {
5383
+ const classes = mapToCssModules(classNames$2(className, {
5384
5384
  disabled: props.disabled,
5385
5385
  'dropdown-item': !divider && !header && !text,
5386
5386
  active: active,
@@ -5473,7 +5473,7 @@ class DropdownMenu extends React__default["default"].Component {
5473
5473
  } = _this$props,
5474
5474
  attrs = _objectWithoutProperties$1(_this$props, _excluded$Y);
5475
5475
 
5476
- const classes = mapToCssModules(classNames$1(className, 'dropdown-menu', {
5476
+ const classes = mapToCssModules(classNames$2(className, 'dropdown-menu', {
5477
5477
  'dropdown-menu-dark': dark,
5478
5478
  'dropdown-menu-end': end || right,
5479
5479
  show: this.context.isOpen
@@ -5606,7 +5606,7 @@ class DropdownToggle extends React__default["default"].Component {
5606
5606
  props = _objectWithoutProperties$1(_this$props, _excluded$X);
5607
5607
 
5608
5608
  const ariaLabel = props['aria-label'] || 'Toggle Dropdown';
5609
- const classes = mapToCssModules(classNames$1(className, {
5609
+ const classes = mapToCssModules(classNames$2(className, {
5610
5610
  'dropdown-toggle': caret || split,
5611
5611
  'dropdown-toggle-split': split,
5612
5612
  'nav-link': nav
@@ -5697,7 +5697,7 @@ function Fade(props) {
5697
5697
  const childProps = omit(otherProps, TransitionPropTypeKeys);
5698
5698
  return /*#__PURE__*/React__default["default"].createElement(Transition$1, transitionProps, status => {
5699
5699
  const isActive = status === 'entered';
5700
- const classes = mapToCssModules(classNames$1(className, baseClass, isActive && baseClassActive), cssModule);
5700
+ const classes = mapToCssModules(classNames$2(className, baseClass, isActive && baseClassActive), cssModule);
5701
5701
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
5702
5702
  className: classes
5703
5703
  }, childProps, {
@@ -5869,7 +5869,7 @@ class Collapse extends React$5.Component {
5869
5869
  onExited: this.onExited
5870
5870
  }), status => {
5871
5871
  let collapseClass = getTransitionClass(status);
5872
- const classes = mapToCssModules(classNames$1(className, horizontal && 'collapse-horizontal', collapseClass, navbar && 'navbar-collapse'), cssModule);
5872
+ const classes = mapToCssModules(classNames$2(className, horizontal && 'collapse-horizontal', collapseClass, navbar && 'navbar-collapse'), cssModule);
5873
5873
  const style = dimension === null ? null : {
5874
5874
  [horizontal ? 'width' : 'height']: dimension
5875
5875
  };
@@ -5922,7 +5922,7 @@ const Badge = props => {
5922
5922
  } = props,
5923
5923
  attributes = _objectWithoutProperties$1(props, _excluded$P);
5924
5924
 
5925
- const classes = mapToCssModules(classNames$1(className, 'badge', 'bg-' + color, pill ? 'rounded-pill' : false), cssModule);
5925
+ const classes = mapToCssModules(classNames$2(className, 'badge', 'bg-' + color, pill ? 'rounded-pill' : false), cssModule);
5926
5926
 
5927
5927
  if (attributes.href && Tag === 'span') {
5928
5928
  Tag = 'a';
@@ -6077,7 +6077,7 @@ class CarouselItem extends React__default["default"].Component {
6077
6077
  const isActive = status === TransitionStatuses.ENTERED || status === TransitionStatuses.EXITING;
6078
6078
  const directionClassName = (status === TransitionStatuses.ENTERING || status === TransitionStatuses.EXITING) && this.state.startAnimation && (direction === 'end' ? 'carousel-item-start' : 'carousel-item-end');
6079
6079
  const orderClassName = status === TransitionStatuses.ENTERING && (direction === 'end' ? 'carousel-item-next' : 'carousel-item-prev');
6080
- const itemClasses = mapToCssModules(classNames$1(className, 'carousel-item', isActive && 'active', directionClassName, orderClassName), cssModule);
6080
+ const itemClasses = mapToCssModules(classNames$2(className, 'carousel-item', isActive && 'active', directionClassName, orderClassName), cssModule);
6081
6081
  return /*#__PURE__*/React__default["default"].createElement(Tag, {
6082
6082
  className: itemClasses
6083
6083
  }, children);
@@ -6291,8 +6291,8 @@ class Carousel extends React__default["default"].Component {
6291
6291
  dark,
6292
6292
  fade
6293
6293
  } = this.props;
6294
- const outerClasses = mapToCssModules(classNames$1(className, 'carousel', fade, slide && 'slide', dark && 'carousel-dark'), cssModule);
6295
- const innerClasses = mapToCssModules(classNames$1('carousel-inner'), cssModule); // filter out booleans, null, or undefined
6294
+ const outerClasses = mapToCssModules(classNames$2(className, 'carousel', fade, slide && 'slide', dark && 'carousel-dark'), cssModule);
6295
+ const innerClasses = mapToCssModules(classNames$2('carousel-inner'), cssModule); // filter out booleans, null, or undefined
6296
6296
 
6297
6297
  const children = this.props.children.filter(child => child !== null && child !== undefined && typeof child !== 'boolean');
6298
6298
  const slidesOnly = children.every(child => child.type === CarouselItem$1); // Rendering only slides
@@ -6405,9 +6405,9 @@ const CarouselControl = props => {
6405
6405
  directionText,
6406
6406
  className
6407
6407
  } = props;
6408
- const anchorClasses = mapToCssModules(classNames$1(className, `carousel-control-${direction}`), cssModule);
6409
- const iconClasses = mapToCssModules(classNames$1(`carousel-control-${direction}-icon`), cssModule);
6410
- const screenReaderClasses = mapToCssModules(classNames$1('visually-hidden'), cssModule);
6408
+ const anchorClasses = mapToCssModules(classNames$2(className, `carousel-control-${direction}`), cssModule);
6409
+ const iconClasses = mapToCssModules(classNames$2(`carousel-control-${direction}-icon`), cssModule);
6410
+ const screenReaderClasses = mapToCssModules(classNames$2('visually-hidden'), cssModule);
6411
6411
  return (
6412
6412
  /*#__PURE__*/
6413
6413
  // We need to disable this linting rule to use an `<a>` instead of
@@ -6451,9 +6451,9 @@ const CarouselIndicators = props => {
6451
6451
  onClickHandler,
6452
6452
  className
6453
6453
  } = props;
6454
- const listClasses = mapToCssModules(classNames$1(className, 'carousel-indicators'), cssModule);
6454
+ const listClasses = mapToCssModules(classNames$2(className, 'carousel-indicators'), cssModule);
6455
6455
  const indicators = items.map((item, idx) => {
6456
- const indicatorClasses = mapToCssModules(classNames$1({
6456
+ const indicatorClasses = mapToCssModules(classNames$2({
6457
6457
  active: activeIndex === idx
6458
6458
  }), cssModule);
6459
6459
  return /*#__PURE__*/React__default["default"].createElement("button", {
@@ -6488,7 +6488,7 @@ const CarouselCaption = props => {
6488
6488
  cssModule,
6489
6489
  className
6490
6490
  } = props;
6491
- const classes = mapToCssModules(classNames$1(className, 'carousel-caption', 'd-none', 'd-md-block'), cssModule);
6491
+ const classes = mapToCssModules(classNames$2(className, 'carousel-caption', 'd-none', 'd-md-block'), cssModule);
6492
6492
  return /*#__PURE__*/React__default["default"].createElement("div", {
6493
6493
  className: classes
6494
6494
  }, /*#__PURE__*/React__default["default"].createElement("h3", null, captionHeader), /*#__PURE__*/React__default["default"].createElement("p", null, captionText));
@@ -6749,8 +6749,8 @@ class PopperContent extends React__default["default"].Component {
6749
6749
  } = _this$props,
6750
6750
  attrs = _objectWithoutProperties$1(_this$props, _excluded$z);
6751
6751
 
6752
- const arrowClassName = mapToCssModules(classNames$1('arrow', _arrowClassName), cssModule);
6753
- const popperClassName = mapToCssModules(classNames$1(_popperClassName, placementPrefix ? `${placementPrefix}-auto` : ''), this.props.cssModule);
6752
+ const arrowClassName = mapToCssModules(classNames$2('arrow', _arrowClassName), cssModule);
6753
+ const popperClassName = mapToCssModules(classNames$2(_popperClassName, placementPrefix ? `${placementPrefix}-auto` : ''), this.props.cssModule);
6754
6754
  const modifierNames = modifiers.map(m => m.name);
6755
6755
  const baseModifiers = [{
6756
6756
  name: 'offset',
@@ -7214,8 +7214,8 @@ const defaultProps$D = {
7214
7214
  };
7215
7215
 
7216
7216
  const Popover = props => {
7217
- const popperClasses = classNames$1('popover', 'show', props.popperClassName);
7218
- const classes = classNames$1('popover-inner', props.innerClassName);
7217
+ const popperClasses = classNames$2('popover', 'show', props.popperClassName);
7218
+ const classes = classNames$2('popover-inner', props.innerClassName);
7219
7219
  return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
7220
7220
  arrowClassName: "popover-arrow",
7221
7221
  popperClassName: popperClasses,
@@ -7640,7 +7640,7 @@ class Modal extends React__default["default"].Component {
7640
7640
  conditionallyUpdateScrollbar();
7641
7641
 
7642
7642
  if (Modal.openCount === 0) {
7643
- document.body.className = classNames$1(document.body.className, mapToCssModules('modal-open', this.props.cssModule));
7643
+ document.body.className = classNames$2(document.body.className, mapToCssModules('modal-open', this.props.cssModule));
7644
7644
  }
7645
7645
 
7646
7646
  this.modalIndex = Modal.openCount;
@@ -7684,7 +7684,7 @@ class Modal extends React__default["default"].Component {
7684
7684
  const attributes = omit(this.props, propsToOmit$1);
7685
7685
  const dialogBaseClass = 'modal-dialog';
7686
7686
  return /*#__PURE__*/React__default["default"].createElement("div", _extends$5({}, attributes, {
7687
- className: mapToCssModules(classNames$1(dialogBaseClass, this.props.className, {
7687
+ className: mapToCssModules(classNames$2(dialogBaseClass, this.props.className, {
7688
7688
  [`modal-${this.props.size}`]: this.props.size,
7689
7689
  [`${dialogBaseClass}-centered`]: this.props.centered,
7690
7690
  [`${dialogBaseClass}-scrollable`]: this.props.scrollable,
@@ -7696,7 +7696,7 @@ class Modal extends React__default["default"].Component {
7696
7696
  this._dialog = c;
7697
7697
  }
7698
7698
  }), /*#__PURE__*/React__default["default"].createElement("div", {
7699
- className: mapToCssModules(classNames$1('modal-content', this.props.contentClassName), this.props.cssModule)
7699
+ className: mapToCssModules(classNames$2('modal-content', this.props.contentClassName), this.props.cssModule)
7700
7700
  }, this.props.children));
7701
7701
  }
7702
7702
 
@@ -7747,9 +7747,9 @@ class Modal extends React__default["default"].Component {
7747
7747
  const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$5({}, backdropTransition, {
7748
7748
  in: isOpen && !!backdrop,
7749
7749
  cssModule: cssModule,
7750
- className: mapToCssModules(classNames$1('modal-backdrop', backdropClassName), cssModule)
7750
+ className: mapToCssModules(classNames$2('modal-backdrop', backdropClassName), cssModule)
7751
7751
  })) : /*#__PURE__*/React__default["default"].createElement("div", {
7752
- className: mapToCssModules(classNames$1('modal-backdrop', 'show', backdropClassName), cssModule)
7752
+ className: mapToCssModules(classNames$2('modal-backdrop', 'show', backdropClassName), cssModule)
7753
7753
  }));
7754
7754
  return /*#__PURE__*/React__default["default"].createElement(Portal$1$1, {
7755
7755
  node: this._element
@@ -7760,7 +7760,7 @@ class Modal extends React__default["default"].Component {
7760
7760
  onEntered: this.onOpened,
7761
7761
  onExited: this.onClosed,
7762
7762
  cssModule: cssModule,
7763
- className: mapToCssModules(classNames$1('modal', modalClassName, this.state.showStaticBackdropAnimation && 'modal-static'), cssModule),
7763
+ className: mapToCssModules(classNames$2('modal', modalClassName, this.state.showStaticBackdropAnimation && 'modal-static'), cssModule),
7764
7764
  innerRef: innerRef
7765
7765
  }), external, this.renderModalDialog()), Backdrop));
7766
7766
  }
@@ -7809,7 +7809,7 @@ const ModalBody = props => {
7809
7809
  } = props,
7810
7810
  attributes = _objectWithoutProperties$1(props, _excluded$u);
7811
7811
 
7812
- const classes = mapToCssModules(classNames$1(className, 'modal-body'), cssModule);
7812
+ const classes = mapToCssModules(classNames$2(className, 'modal-body'), cssModule);
7813
7813
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
7814
7814
  className: classes
7815
7815
  }));
@@ -7832,8 +7832,8 @@ const defaultProps$v = {
7832
7832
  };
7833
7833
 
7834
7834
  const Tooltip = props => {
7835
- const popperClasses = classNames$1('tooltip', 'show', props.popperClassName);
7836
- const classes = classNames$1('tooltip-inner', props.innerClassName);
7835
+ const popperClasses = classNames$2('tooltip', 'show', props.popperClassName);
7836
+ const classes = classNames$2('tooltip-inner', props.innerClassName);
7837
7837
  return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
7838
7838
  arrowClassName: "tooltip-arrow",
7839
7839
  popperClassName: popperClasses,
@@ -7912,7 +7912,7 @@ class Form extends React$5.Component {
7912
7912
  } = _this$props,
7913
7913
  attributes = _objectWithoutProperties$1(_this$props, _excluded$q);
7914
7914
 
7915
- const classes = mapToCssModules(classNames$1(className, inline ? 'form-inline' : false), cssModule);
7915
+ const classes = mapToCssModules(classNames$2(className, inline ? 'form-inline' : false), cssModule);
7916
7916
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
7917
7917
  ref: innerRef,
7918
7918
  className: classes
@@ -7949,7 +7949,7 @@ const FormFeedback = props => {
7949
7949
  attributes = _objectWithoutProperties$1(props, _excluded$p);
7950
7950
 
7951
7951
  const validMode = tooltip ? 'tooltip' : 'feedback';
7952
- const classes = mapToCssModules(classNames$1(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
7952
+ const classes = mapToCssModules(classNames$2(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
7953
7953
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
7954
7954
  className: classes
7955
7955
  }));
@@ -8064,7 +8064,7 @@ class Input extends React__default["default"].Component {
8064
8064
  delete attributes.size;
8065
8065
  }
8066
8066
 
8067
- const classes = mapToCssModules(classNames$1(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? selectInput ? `form-select-${bsSize}` : `form-control-${bsSize}` : false, formControlClass), cssModule);
8067
+ const classes = mapToCssModules(classNames$2(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? selectInput ? `form-select-${bsSize}` : `form-control-${bsSize}` : false, formControlClass), cssModule);
8068
8068
 
8069
8069
  if (Tag === 'input' || tag && typeof tag === 'function') {
8070
8070
  attributes.type = type === 'switch' ? 'checkbox' : type;
@@ -8168,7 +8168,7 @@ const Label = props => {
8168
8168
  if (isObject$1(columnProp)) {
8169
8169
  const colSizeInterfix = isXs ? '-' : `-${colWidth}-`;
8170
8170
  colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
8171
- colClasses.push(mapToCssModules(classNames$1({
8171
+ colClasses.push(mapToCssModules(classNames$2({
8172
8172
  [colClass]: columnProp.size || columnProp.size === '',
8173
8173
  [`order${colSizeInterfix}${columnProp.order}`]: columnProp.order || columnProp.order === 0,
8174
8174
  [`offset${colSizeInterfix}${columnProp.offset}`]: columnProp.offset || columnProp.offset === 0
@@ -8178,7 +8178,7 @@ const Label = props => {
8178
8178
  colClasses.push(colClass);
8179
8179
  }
8180
8180
  });
8181
- const classes = mapToCssModules(classNames$1(className, hidden ? 'visually-hidden' : false, check ? 'form-check-label' : false, size ? `col-form-label-${size}` : false, colClasses, colClasses.length ? 'col-form-label' : 'form-label'), cssModule);
8181
+ const classes = mapToCssModules(classNames$2(className, hidden ? 'visually-hidden' : false, check ? 'form-check-label' : false, size ? `col-form-label-${size}` : false, colClasses, colClasses.length ? 'col-form-label' : 'form-label'), cssModule);
8182
8182
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
8183
8183
  htmlFor: htmlFor
8184
8184
  }, attributes, {
@@ -8577,11 +8577,11 @@ class Offcanvas extends React__default["default"].Component {
8577
8577
  this._backdrop = c;
8578
8578
  },
8579
8579
  cssModule: cssModule,
8580
- className: mapToCssModules(classNames$1('offcanvas-backdrop', backdropClassName), cssModule),
8580
+ className: mapToCssModules(classNames$2('offcanvas-backdrop', backdropClassName), cssModule),
8581
8581
  onClick: this.handleBackdropClick,
8582
8582
  onMouseDown: this.handleBackdropMouseDown
8583
8583
  })) : /*#__PURE__*/React__default["default"].createElement("div", {
8584
- className: mapToCssModules(classNames$1('offcanvas-backdrop', 'show', backdropClassName), cssModule),
8584
+ className: mapToCssModules(classNames$2('offcanvas-backdrop', 'show', backdropClassName), cssModule),
8585
8585
  onClick: this.handleBackdropClick,
8586
8586
  onMouseDown: this.handleBackdropMouseDown
8587
8587
  }));
@@ -8593,7 +8593,7 @@ class Offcanvas extends React__default["default"].Component {
8593
8593
  onEntered: this.onOpened,
8594
8594
  onExited: this.onClosed,
8595
8595
  cssModule: cssModule,
8596
- className: mapToCssModules(classNames$1('offcanvas', className, `offcanvas-${direction}`), cssModule),
8596
+ className: mapToCssModules(classNames$2('offcanvas', className, `offcanvas-${direction}`), cssModule),
8597
8597
  innerRef: c => {
8598
8598
  this._dialog = c;
8599
8599
  },
@@ -8707,7 +8707,7 @@ class TabContent extends React$5.Component {
8707
8707
  tag: Tag
8708
8708
  } = this.props;
8709
8709
  const attributes = omit(this.props, Object.keys(propTypes$e));
8710
- const classes = mapToCssModules(classNames$1('tab-content', className), cssModule);
8710
+ const classes = mapToCssModules(classNames$2('tab-content', className), cssModule);
8711
8711
  return /*#__PURE__*/React__default["default"].createElement(TabContext.Provider, {
8712
8712
  value: {
8713
8713
  activeTabId: this.state.activeTab
@@ -8825,7 +8825,7 @@ const List = React$5.forwardRef((props, ref) => {
8825
8825
  } = props,
8826
8826
  attributes = _objectWithoutProperties$1(props, _excluded$4);
8827
8827
 
8828
- const classes = mapToCssModules(classNames$1(className, type ? `list-${type}` : false), cssModule);
8828
+ const classes = mapToCssModules(classNames$2(className, type ? `list-${type}` : false), cssModule);
8829
8829
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
8830
8830
  className: classes,
8831
8831
  ref: ref
@@ -8852,7 +8852,7 @@ const ListInlineItem = React$5.forwardRef((props, ref) => {
8852
8852
  } = props,
8853
8853
  attributes = _objectWithoutProperties$1(props, _excluded$3);
8854
8854
 
8855
- const classes = mapToCssModules(classNames$1(className, 'list-inline-item'), cssModule);
8855
+ const classes = mapToCssModules(classNames$2(className, 'list-inline-item'), cssModule);
8856
8856
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
8857
8857
  className: classes,
8858
8858
  ref: ref
@@ -9035,7 +9035,7 @@ const Spinner = props => {
9035
9035
  } = props,
9036
9036
  attributes = _objectWithoutProperties$1(props, _excluded$2);
9037
9037
 
9038
- const classes = mapToCssModules(classNames$1(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
9038
+ const classes = mapToCssModules(classNames$2(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
9039
9039
  return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
9040
9040
  role: "status"
9041
9041
  }, attributes, {
@@ -9089,7 +9089,7 @@ _objectSpread2(_objectSpread2({}, Col$1.propTypes), {}, {
9089
9089
  Object.values = values;
9090
9090
  })();
9091
9091
 
9092
- var classnames$1 = {exports: {}};
9092
+ var classnames = {exports: {}};
9093
9093
 
9094
9094
  /*!
9095
9095
  Copyright (c) 2018 Jed Watson.
@@ -9145,9 +9145,9 @@ var classnames$1 = {exports: {}};
9145
9145
  window.classNames = classNames;
9146
9146
  }
9147
9147
  }());
9148
- }(classnames$1));
9148
+ }(classnames));
9149
9149
 
9150
- var classnames = classnames$1.exports;
9150
+ var classNames$1 = classnames.exports;
9151
9151
 
9152
9152
  /******************************************************************************
9153
9153
  Copyright (c) Microsoft Corporation.
@@ -14285,7 +14285,7 @@ const ReactInput = (props) => {
14285
14285
  //{...props}
14286
14286
  , {
14287
14287
  //{...props}
14288
- style: style, placeholder: placeholder, onKeyPress: onKeyPress, className: classnames('input__value', {
14288
+ style: style, placeholder: placeholder, onKeyPress: onKeyPress, className: classNames$1('input__value', {
14289
14289
  'is-clearable': value
14290
14290
  }), value: value, onChange: (val) => setValue(val.target.value) }), value ? jsxRuntime.jsx(SvgX, { className: 'input__clear-icon', onClick: handelClear, strokeWidth: 3, fontSize: 16 }) : ''] }));
14291
14291
  };
@@ -21418,11 +21418,11 @@ const TextInput = (props) => {
21418
21418
  }
21419
21419
  }, 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 })] }));
21420
21420
  };
21421
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames(' align', {
21421
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1(' align', {
21422
21422
  [labelSize ? labelSize : '']: labelSize,
21423
21423
  [classes ? classes : '']: classes,
21424
21424
  'form-row-inline-error': errors
21425
- }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
21425
+ }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
21426
21426
  };
21427
21427
 
21428
21428
  /**
@@ -22661,7 +22661,7 @@ const NumberInput = (props) => {
22661
22661
  decimalScale: fractionCurrency ?? 0,
22662
22662
  fixedDecimalScale
22663
22663
  };
22664
- return (jsxRuntime.jsx(NumericFormat, { id: id, ...numericFormatProps, className: classnames('form-control text-right', {
22664
+ return (jsxRuntime.jsx(NumericFormat, { id: id, ...numericFormatProps, className: classNames$1('form-control text-right', {
22665
22665
  'is-invalid': errors
22666
22666
  }), onValueChange: (values) => {
22667
22667
  floatValue = values?.floatValue;
@@ -22686,11 +22686,11 @@ const NumberInput = (props) => {
22686
22686
  }, placeholder: placeholder, disabled: disabled }));
22687
22687
  } }), errors && jsxRuntime.jsx(FormFeedback$1, { children: errors?.message })] }));
22688
22688
  };
22689
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames(' align', {
22689
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1(' align', {
22690
22690
  [labelSize ? labelSize : '']: labelSize,
22691
22691
  [classes ? classes : '']: classes,
22692
22692
  'form-row-inline-error': errors
22693
- }, 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('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
22693
+ }, 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$1('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
22694
22694
  };
22695
22695
 
22696
22696
  const defaultMaxHeight$1 = 250;
@@ -22917,7 +22917,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
22917
22917
  }, 100);
22918
22918
  };
22919
22919
  const renderHeaderCol = (col, indexCol) => {
22920
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("th", { className: classnames(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
22920
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
22921
22921
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.width,
22922
22922
  minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
22923
22923
  top: `${0 * 35}px`,
@@ -22961,7 +22961,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
22961
22961
  };
22962
22962
  const RenderElement = React__default["default"].memo((props) => {
22963
22963
  const { indexRow, row, isSelected, level = 0 } = props;
22964
- return (jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, style: { paddingLeft: 10 * level }, className: classnames('r-select-row', { 'last-row': indexRow === (optionsLoad ? optionsLoad : options).length - 1 }, { 'fisrt-row': indexRow === 0 }), children: [isMulti && jsxRuntime.jsx("td", { className: classnames(`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) => {
22964
+ return (jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, style: { paddingLeft: 10 * level }, className: classNames$1('r-select-row', { 'last-row': indexRow === (optionsLoad ? optionsLoad : options).length - 1 }, { 'fisrt-row': indexRow === 0 }), children: [isMulti && jsxRuntime.jsx("td", { className: classNames$1(`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) => {
22965
22965
  if (isMulti) {
22966
22966
  const index = value?.findIndex((x) => x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
22967
22967
  if (index > -1) {
@@ -22992,7 +22992,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
22992
22992
  }
22993
22993
  return (jsxRuntime.jsxs(React$5.Fragment, { children: [col.visible !== false && jsxRuntime.jsx("td", { id: `select-${id}-${indexRow}-${indexCol}`,
22994
22994
  // ref={refRow}
22995
- className: classnames(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && value[fieldValue ?? 'value'] === row[fieldValue ?? 'value'] }), style: {
22995
+ className: classNames$1(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && value[fieldValue ?? 'value'] === row[fieldValue ?? 'value'] }), style: {
22996
22996
  minWidth: col.minWidth,
22997
22997
  width: col.width,
22998
22998
  maxWidth: col.maxWidth,
@@ -23031,7 +23031,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
23031
23031
  });
23032
23032
  const RenderTable = (props) => {
23033
23033
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [!(noHeader || (columns?.length ?? 0) === 0) &&
23034
- jsxRuntime.jsx("thead", { className: 'r-select-gridheader', children: jsxRuntime.jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsxRuntime.jsx("th", { className: classnames(`r-select-headercell`), style: { width: 40, top: `0px` }, children: jsxRuntime.jsx("div", { style: { justifyContent: 'center' }, className: classnames('r-select-headercell-div'), children: jsxRuntime.jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
23034
+ jsxRuntime.jsx("thead", { className: 'r-select-gridheader', children: jsxRuntime.jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell`), style: { width: 40, top: `0px` }, children: jsxRuntime.jsx("div", { style: { justifyContent: 'center' }, className: classNames$1('r-select-headercell-div'), children: jsxRuntime.jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
23035
23035
  if (isMulti) {
23036
23036
  if (isSelectedAll) {
23037
23037
  handChange([]);
@@ -23041,22 +23041,22 @@ const SelectTable = React$5.forwardRef((props, ref) => {
23041
23041
  }
23042
23042
  e.stopPropagation();
23043
23043
  }
23044
- }, readOnly: true, className: classnames('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
23044
+ }, readOnly: true, className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
23045
23045
  return (renderHeaderCol(col, index));
23046
23046
  })] }) }), ((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) => {
23047
23047
  const isSelected = isMulti && value?.some((x) => x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
23048
23048
  return (jsxRuntime.jsx(RenderElement, { isSelected: isSelected ?? false, indexRow: indexRow + (haveCreateNew ? 1 : 0), row: row }, `select-table-${indexRow}`));
23049
23049
  })] }) })] }), ((((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...')] })] }));
23050
23050
  };
23051
- return (jsxRuntime.jsx("div", { className: classnames('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxRuntime.jsx("div", { ref: selectTableRef, children: jsxRuntime.jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxRuntime.jsxs(DropdownToggle$1, { onClick: (e) => {
23051
+ return (jsxRuntime.jsx("div", { className: classNames$1('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxRuntime.jsx("div", { ref: selectTableRef, children: jsxRuntime.jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxRuntime.jsxs(DropdownToggle$1, { onClick: (e) => {
23052
23052
  if (!isDisabled) {
23053
23053
  inputRef?.current.focus();
23054
23054
  handleOpenClose();
23055
23055
  }
23056
23056
  e.preventDefault();
23057
- }, tag: 'div', style: { width: width ? width : (selectTableRef?.current?.clientWidth ? selectTableRef?.current?.clientWidth : 'auto') }, className: classnames('select-table-control', { 'r-select-is-disabled': isDisabled }, { 'r-select-is-open': dropdownOpen }, { 'r-select-is-focus': isFocus }, { 'r-select-is-invalid': invalid }), children: [jsxRuntime.jsxs("div", { className: "select-table-container", children: [isMulti ? jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { className: classnames('select-value is-mutil', { 'd-none': searchTerm }), children: value?.map((ele, index) => {
23057
+ }, tag: 'div', style: { width: width ? width : (selectTableRef?.current?.clientWidth ? selectTableRef?.current?.clientWidth : 'auto') }, className: classNames$1('select-table-control', { 'r-select-is-disabled': isDisabled }, { 'r-select-is-open': dropdownOpen }, { 'r-select-is-focus': isFocus }, { 'r-select-is-invalid': invalid }), children: [jsxRuntime.jsxs("div", { className: "select-table-container", children: [isMulti ? jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { className: classNames$1('select-value is-mutil', { 'd-none': searchTerm }), children: value?.map((ele, index) => {
23058
23058
  return (jsxRuntime.jsxs("span", { children: [index === 0 ? '' : ', ', formatOptionLabel ? formatOptionLabel(ele) : ele[fieldLabel ?? 'label']] }, index));
23059
- }) }) }) : jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames('select-value', { 'd-none': searchTerm }), children: [value ? (formatOptionLabel ? formatOptionLabel(value) : value[fieldLabel ?? 'label']) : '', " "] }) }), !((isMulti ? value?.length > 0 : value) || isDisabled || searchTerm) && jsxRuntime.jsx("div", { className: classnames('select-placeholder'), children: placeholder }), jsxRuntime.jsx("div", { className: 'input-container', children: jsxRuntime.jsx("input", { style: { textAlign: textAlign ?? 'left' }, ref: inputRef, className: classnames('select-input'), readOnly: isDisabled, value: searchTerm, onPaste: (e) => (onPaste && !dropdownOpen) && onPaste(e), onChange: (val) => {
23059
+ }) }) }) : jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1('select-value', { 'd-none': searchTerm }), children: [value ? (formatOptionLabel ? formatOptionLabel(value) : value[fieldLabel ?? 'label']) : '', " "] }) }), !((isMulti ? value?.length > 0 : value) || isDisabled || searchTerm) && jsxRuntime.jsx("div", { className: classNames$1('select-placeholder'), children: placeholder }), jsxRuntime.jsx("div", { className: 'input-container', children: jsxRuntime.jsx("input", { style: { textAlign: textAlign ?? 'left' }, ref: inputRef, className: classNames$1('select-input'), readOnly: isDisabled, value: searchTerm, onPaste: (e) => (onPaste && !dropdownOpen) && onPaste(e), onChange: (val) => {
23060
23060
  if (val.target.value) {
23061
23061
  if (loadOptions && val.target.value) {
23062
23062
  setIsLoading(true);
@@ -23070,7 +23070,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
23070
23070
  }
23071
23071
  }
23072
23072
  setSearchTerm(val.target.value);
23073
- }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), isLoading && jsxRuntime.jsxs("div", { className: classnames('select-table-indicator d-flex align-items-center'), children: [jsxRuntime.jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsxRuntime.jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsxRuntime.jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" })] }), (isClearable && value && !isDisabled) && jsxRuntime.jsx("div", { className: classnames('cursor-pointer icon-clear'), onClick: (e) => {
23073
+ }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), isLoading && jsxRuntime.jsxs("div", { className: classNames$1('select-table-indicator d-flex align-items-center'), children: [jsxRuntime.jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsxRuntime.jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsxRuntime.jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" })] }), (isClearable && value && !isDisabled) && jsxRuntime.jsx("div", { className: classNames$1('cursor-pointer icon-clear'), onClick: (e) => {
23074
23074
  handChange(isMulti ? [] : undefined);
23075
23075
  e.stopPropagation();
23076
23076
  }, children: "\u00D7" }), !isDisabled && jsxRuntime.jsx("div", { className: "select-table-indicator", onMouseDown: (e) => e.preventDefault(), children: jsxRuntime.jsx("svg", { height: "20", width: "20", viewBox: "0 0 20 20", children: jsxRuntime.jsx("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" }) }) })] }), jsxRuntime.jsx(DropdownMenu$1, { container: component, className: 'formula-dropdown icon-dropdown p-0', style: {
@@ -23079,12 +23079,12 @@ const SelectTable = React$5.forwardRef((props, ref) => {
23079
23079
  position: 'fixed',
23080
23080
  borderRadius: 4,
23081
23081
  zIndex: 9999
23082
- }, children: jsxRuntime.jsx(DropdownItem$1, { className: classnames('p-0 menu-select-table'), tag: 'div', header: true, children: dropdownOpen && jsxRuntime.jsx("div", { style: { backgroundColor: 'none' }, onMouseDown: (e) => {
23082
+ }, children: jsxRuntime.jsx(DropdownItem$1, { className: classNames$1('p-0 menu-select-table'), tag: 'div', header: true, children: dropdownOpen && jsxRuntime.jsx("div", { style: { backgroundColor: 'none' }, onMouseDown: (e) => {
23083
23083
  if (!isDisabled) {
23084
23084
  inputRef?.current.focus();
23085
23085
  e.preventDefault();
23086
23086
  }
23087
- }, children: jsxRuntime.jsxs("div", { className: 'r-select-grid', children: [jsxRuntime.jsx("div", { className: classnames('r-select-gridtable', { 'no-header': noHeader || (columns?.length ?? 0) === 0 }), ref: selectMenuTableRef, style: { width: menuWidth, minWidth: selectTableRef?.current?.clientWidth, maxHeight: maxHeight ?? defaultMaxHeight$1 }, children: jsxRuntime.jsx(RenderTable, {}) }), jsxRuntime.jsxs("div", { className: classnames('r-select-footer', { 'd-none': !(showFooter === true || handleAdd) }), children: [jsxRuntime.jsxs(Button$1, { outline: true, color: "primary", onClick: () => handleAdd?.(), className: classnames('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsxRuntime.jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), footerComponent ? footerComponent() : null] })] }) }) }) })] }) }) }));
23087
+ }, children: jsxRuntime.jsxs("div", { className: 'r-select-grid', children: [jsxRuntime.jsx("div", { className: classNames$1('r-select-gridtable', { 'no-header': noHeader || (columns?.length ?? 0) === 0 }), ref: selectMenuTableRef, style: { width: menuWidth, minWidth: selectTableRef?.current?.clientWidth, maxHeight: maxHeight ?? defaultMaxHeight$1 }, children: jsxRuntime.jsx(RenderTable, {}) }), jsxRuntime.jsxs("div", { className: classNames$1('r-select-footer', { 'd-none': !(showFooter === true || handleAdd) }), children: [jsxRuntime.jsxs(Button$1, { outline: true, color: "primary", onClick: () => handleAdd?.(), className: classNames$1('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsxRuntime.jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), footerComponent ? footerComponent() : null] })] }) }) }) })] }) }) }));
23088
23088
  });
23089
23089
 
23090
23090
  const SelectTableBox$1 = (props) => {
@@ -23100,10 +23100,10 @@ const SelectTableBox$1 = (props) => {
23100
23100
  const { isLabel, desciptionLabel, id, classLabel, name, label, required } = props;
23101
23101
  return (jsxRuntime.jsxs(React$5.Fragment, { children: [isLabel === false ? '' : jsxRuntime.jsxs(Label$1, { id: `label-${id}`, className: classLabel, for: name, children: [t(label ? label : ''), " ", required ? jsxRuntime.jsx("span", { className: "text-danger", children: "*" }) : ''] }), (!isNullOrUndefined$1(desciptionLabel) && desciptionLabel !== '') ?? jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(UncontrolledTooltip, { target: `label-${id}`, children: t(desciptionLabel ?? '') }) })] }));
23102
23102
  };
23103
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
23103
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
23104
23104
  [labelSize ? labelSize : '']: labelSize,
23105
23105
  'form-row-inline-error': errors
23106
- }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxRuntime.jsxs("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
23106
+ }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxRuntime.jsxs("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
23107
23107
  return (jsxRuntime.jsx(SelectTable, { ...rest, id: id, value: (isMulti ? value?.length > 0 : value) ? (!isMulti ? (options.find((val) => val[fieldValue ?? 'value'] === value) ?? (defaultValue ?? '')) : value) : (isMulti ? [] : undefined),
23108
23108
  // Giá trị của SelectTable, nếu isMulti là true và value có độ dài lớn hơn 0, hoặc nếu isMulti là false và value có giá trị,
23109
23109
  // thì tìm giá trị tương ứng trong options hoặc sử dụng defaultValue. Nếu không, sử dụng giá trị mặc định tùy thuộc vào isMulti.
@@ -23305,7 +23305,7 @@ const EditForm = React$5.forwardRef((props, ref) => {
23305
23305
  });
23306
23306
  }
23307
23307
  }, [inputRef]);
23308
- return (jsxRuntime.jsx("div", { className: "form-edit", ref: ref, id: id, children: jsxRuntime.jsx("div", { ref: editFormRef, children: jsxRuntime.jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', children: jsxRuntime.jsxs("div", { className: classnames('display-value', { 'r-is-focus': isFocus || dropdownOpen }, { 'is-invalid': invalid }), onClick: handleOnClick, children: [template?.(rowData, indexRow) ?? displayValue, jsxRuntime.jsx(Input$1, { style: {
23308
+ return (jsxRuntime.jsx("div", { className: "form-edit", ref: ref, id: id, children: jsxRuntime.jsx("div", { ref: editFormRef, children: jsxRuntime.jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', children: jsxRuntime.jsxs("div", { className: classNames$1('display-value', { 'r-is-focus': isFocus || dropdownOpen }, { 'is-invalid': invalid }), onClick: handleOnClick, children: [template?.(rowData, indexRow) ?? displayValue, jsxRuntime.jsx(Input$1, { style: {
23309
23309
  width: template ? 0 : '100%',
23310
23310
  height: template ? 0 : 28,
23311
23311
  lineHeight: template ? 0 : 19,
@@ -23365,7 +23365,7 @@ const ModalHeader = (props) => {
23365
23365
  return jsxRuntime.jsx(SvgPlus, { fontSize: 17, className: 'me-1' });
23366
23366
  }
23367
23367
  };
23368
- return (jsxRuntime.jsxs("div", { className: 'modal-header d-flex align-items-center justify-content-between mb-1', children: [jsxRuntime.jsxs("div", { className: "d-flex align-items-center justify-content-start", children: [jsxRuntime.jsxs("h5", { className: 'modal-title', children: [handleModalIcon(), " ", t(title)] }), component ? component() : jsxRuntime.jsx(jsxRuntime.Fragment, {})] }), jsxRuntime.jsx("div", { className: 'todo-item-action d-flex align-items-center', children: jsxRuntime.jsx(SvgX, { className: classnames('fw-normal mt-25 cursor-pointer', { 'd-none': !handleModal }), fontSize: 20, onClick: handleModal }) })] }));
23368
+ return (jsxRuntime.jsxs("div", { className: 'modal-header d-flex align-items-center justify-content-between mb-1', children: [jsxRuntime.jsxs("div", { className: "d-flex align-items-center justify-content-start", children: [jsxRuntime.jsxs("h5", { className: 'modal-title', children: [handleModalIcon(), " ", t(title)] }), component ? component() : jsxRuntime.jsx(jsxRuntime.Fragment, {})] }), jsxRuntime.jsx("div", { className: 'todo-item-action d-flex align-items-center', children: jsxRuntime.jsx(SvgX, { className: classNames$1('fw-normal mt-25 cursor-pointer', { 'd-none': !handleModal }), fontSize: 20, onClick: handleModal }) })] }));
23369
23369
  };
23370
23370
 
23371
23371
  const Sidebar = (props) => {
@@ -23391,16 +23391,16 @@ const Sidebar = (props) => {
23391
23391
  toggleSidebar();
23392
23392
  }, 400);
23393
23393
  };
23394
- return (jsxRuntime.jsxs("div", { tabIndex: 0, className: classnames({ 'd-none': !open }), onKeyDown: (e) => {
23394
+ return (jsxRuntime.jsxs("div", { tabIndex: 0, className: classNames$1({ 'd-none': !open }), onKeyDown: (e) => {
23395
23395
  if ((!keyboard) && e.code === 'Escape' && flag) {
23396
23396
  handClose();
23397
23397
  e.stopPropagation();
23398
23398
  e.preventDefault();
23399
23399
  }
23400
- }, children: [jsxRuntime.jsx("div", { className: classnames('offcanvas-backdrop fade', {
23400
+ }, children: [jsxRuntime.jsx("div", { className: classNames$1('offcanvas-backdrop fade', {
23401
23401
  'd-none': !flag || hiddenBackground,
23402
23402
  show: flag
23403
- }), style: { zIndex: 1056 }, onClick: handClose }), jsxRuntime.jsxs("div", { className: classnames('r-sidebar', `customizer-${width ?? 600}`, {
23403
+ }), style: { zIndex: 1056 }, onClick: handClose }), jsxRuntime.jsxs("div", { className: classNames$1('r-sidebar', `customizer-${width ?? 600}`, {
23404
23404
  open: flag,
23405
23405
  fullscreen: isFullScreen
23406
23406
  }), style: { zIndex: 1057 }, children: [jsxRuntime.jsxs("div", { style: {
@@ -23416,7 +23416,7 @@ const Sidebar = (props) => {
23416
23416
  cursor: 'pointer',
23417
23417
  zIndex: 9,
23418
23418
  marginLeft: 7
23419
- }, className: classnames({ 'd-none': hiddenFullScreenButton }), onClick: () => {
23419
+ }, className: classNames$1({ 'd-none': hiddenFullScreenButton }), onClick: () => {
23420
23420
  setIsFullScreen(!isFullScreen);
23421
23421
  }, children: [jsxRuntime.jsx(SvgChevronLeft, { className: `${isFullScreen ? 'd-none' : ''}`, fontSize: 16 }), jsxRuntime.jsx(SvgChevronRight, { className: `${!isFullScreen ? 'd-none' : ''}`, fontSize: 15 })] }), children] })] }));
23422
23422
  };
@@ -23525,7 +23525,7 @@ const SidebarSetColumn = (props) => {
23525
23525
  }
23526
23526
  ];
23527
23527
  const renderHeaderCol = (col, indexCol) => {
23528
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("th", { className: classnames(`r-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
23528
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("th", { className: classNames$1(`r-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
23529
23529
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.width,
23530
23530
  minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
23531
23531
  top: `${0 * 42}px`,
@@ -23538,12 +23538,12 @@ const SidebarSetColumn = (props) => {
23538
23538
  return (jsxRuntime.jsxs(Sidebar, { open: openSidebar, toggleSidebar: handleCancel, width: 700, children: [jsxRuntime.jsx(ModalHeader, { typeModal: 'Edit', handleModal: handleCancel, title: 'Column setup' }), jsxRuntime.jsx("div", { className: "ms-2 react-table-edit", children: jsxRuntime.jsx("div", { className: 'r-grid', children: jsxRuntime.jsx("div", { className: "r-gridtable", style: { height: windowSize.innerHeight - 120 }, children: jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [jsxRuntime.jsx("thead", { className: 'r-gridheader', children: jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: columns.map((col, index) => {
23539
23539
  return (renderHeaderCol(col, index));
23540
23540
  }) }) }), jsxRuntime.jsx("tbody", { className: 'r-gridcontent', children: dataSource?.map((row, indexRow) => {
23541
- return (jsxRuntime.jsx("tr", { className: classnames('r-row', { 'last-row': indexRow === dataSource.length - 1 }, { 'fisrt-row': indexRow === 0 }), children: columns.map((col, indexCol) => {
23541
+ return (jsxRuntime.jsx("tr", { className: classNames$1('r-row', { 'last-row': indexRow === dataSource.length - 1 }, { 'fisrt-row': indexRow === 0 }), children: columns.map((col, indexCol) => {
23542
23542
  let value = row[col.field];
23543
23543
  if (col.editType === 'numeric' || (col.editTypeCondition && col.editTypeCondition(row) === 'numeric')) {
23544
23544
  value = formartNumberic(row[col.field], ',', '.', col.numericSettings?.fraction, true) ?? 0;
23545
23545
  }
23546
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("td", { className: classnames(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'r-active': indexFocus === indexRow }), style: {
23546
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'r-active': indexFocus === indexRow }), style: {
23547
23547
  padding: 0,
23548
23548
  textAlign: col.textAlign ? col.textAlign : 'left'
23549
23549
  }, onFocus: (e) => {
@@ -23558,9 +23558,9 @@ const SidebarSetColumn = (props) => {
23558
23558
  }
23559
23559
  e.stopPropagation();
23560
23560
  }
23561
- }, children: jsxRuntime.jsx("div", { className: classnames('r-rowcell-div'), style: {
23561
+ }, children: jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div'), style: {
23562
23562
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : 'auto'
23563
- }, children: jsxRuntime.jsx("div", { className: classnames('r-rowcell-content'), style: {
23563
+ }, children: jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-content'), style: {
23564
23564
  margin: '7px 9px'
23565
23565
  }, children: jsxRuntime.jsx("div", { className: "r-cell-text", children: col.template ? col.template(row, indexRow) : value }) }) }) }, `col-${indexRow}-${indexCol}`) }, indexCol));
23566
23566
  }) }, `row-${indexRow}`));
@@ -23583,7 +23583,7 @@ const CommandElement = (props) => {
23583
23583
  const { commandItems, rowData, indexRow, handleCommandClick, indexFocus, setIndexFocus } = props;
23584
23584
  const { t } = reactI18next.useTranslation();
23585
23585
  return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsx("div", { className: 'd-flex align-items-center', style: { columnGap: 10 }, children: commandItems.map((item, index) => {
23586
- return (jsxRuntime.jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classnames('command-item', {
23586
+ return (jsxRuntime.jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classNames$1('command-item', {
23587
23587
  'btn-icon': item.tooltip === ''
23588
23588
  }), color: item.color ? item.color : '#000', onClick: (e) => {
23589
23589
  handleCommandClick(item.id, rowData, indexRow);
@@ -41807,7 +41807,7 @@ function styleInject(css, ref) {
41807
41807
  var css_248z$1 = ".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+');\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}";
41808
41808
  styleInject(css_248z$1);
41809
41809
 
41810
- const HeaderTableCol = (props) => {
41810
+ const HeaderTableCol$1 = (props) => {
41811
41811
  const { selectEnable, dataSource, setSelectedRows, col, indexCol, indexParent, objWidthFixLeft, objWidthFixRight, totalCount, selectedRows, column, setColumn, fisrtObjWidthFixRight, lastObjWidthFixLeft, isMulti } = props;
41812
41812
  const { t } = reactI18next.useTranslation();
41813
41813
  const handleResize = (e, { size }) => {
@@ -41825,14 +41825,14 @@ const HeaderTableCol = (props) => {
41825
41825
  setColumn(newColumns);
41826
41826
  }
41827
41827
  };
41828
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx(Resizable, { className: "r-resize", width: typeof col.width === 'number' ? col.width : Number((col.width ?? "").replaceAll(new RegExp(`[^0-9]`, "g"), '')), height: 0, onResize: handleResize, draggableOpts: { enableUserSelectHack: false }, children: jsxRuntime.jsx("th", { rowSpan: col.rowspan !== 1 ? col.rowspan : undefined, colSpan: col.columns?.filter(x => x.visible !== false)?.length ?? 1, className: classnames(`r-headercell fix-${col.fixedType}`, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'cell-fixed': col.fixedType }), style: {
41828
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx(Resizable, { className: "r-resize", width: typeof col.width === 'number' ? col.width : Number((col.width ?? "").replaceAll(new RegExp(`[^0-9]`, "g"), '')), height: 0, onResize: handleResize, draggableOpts: { enableUserSelectHack: false }, children: jsxRuntime.jsx("th", { rowSpan: col.rowspan !== 1 ? col.rowspan : undefined, colSpan: col.columns?.filter(x => x.visible !== false)?.length ?? 1, className: classNames$1(`r-headercell fix-${col.fixedType}`, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'cell-fixed': col.fixedType }), style: {
41829
41829
  top: `${indexParent * 42}px`,
41830
41830
  left: col.fixedType === 'left' ? objWidthFixLeft[col.index ?? 0] : undefined,
41831
41831
  right: col.fixedType === 'right' ? objWidthFixRight[col.index ?? 0] : undefined,
41832
41832
  width: col.width ? typeof col.width === 'number' ? col.width : col.width?.includes('px') || col.width?.includes('%') ? col.width : `${col.width}px` : 'auto',
41833
41833
  minWidth: col.fixedType ? col.width : col.minWidth ? typeof col.minWidth === 'number' ? col.minWidth : col.minWidth?.includes('px') || col.minWidth?.includes('%') ? col.minWidth : `${col.minWidth}px` : 'auto',
41834
41834
  maxWidth: col.fixedType ? col.width : col.maxWidth ? typeof col.maxWidth === 'number' ? col.maxWidth : col.maxWidth?.includes('px') || col.maxWidth?.includes('%') ? col.maxWidth : `${col.maxWidth}px` : 'auto'
41835
- }, children: jsxRuntime.jsxs("div", { style: { justifyContent: col.textAlign ?? 'left' }, className: classnames('r-headercell-div'), children: [col.field === 'checkbox' && (jsxRuntime.jsx(Input$1, { checked: !!(totalCount > 0 && selectedRows?.length >= totalCount), type: "checkbox", className: classnames('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: col.textAlign ?? 'left', marginTop: 6 }, onChange: (e) => {
41835
+ }, children: jsxRuntime.jsxs("div", { style: { justifyContent: col.textAlign ?? 'left' }, className: classNames$1('r-headercell-div'), children: [col.field === 'checkbox' && (jsxRuntime.jsx(Input$1, { checked: !!(totalCount > 0 && selectedRows?.length >= totalCount), type: "checkbox", className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: col.textAlign ?? 'left', marginTop: 6 }, onChange: (e) => {
41836
41836
  if (selectEnable) {
41837
41837
  if (e.target.checked) {
41838
41838
  setSelectedRows(dataSource.map((item) => { return item; }));
@@ -41959,7 +41959,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
41959
41959
  };
41960
41960
  // Hàm để render header của cột
41961
41961
  const renderHeaderCol = (col, indexCol) => {
41962
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx("th", { className: classnames(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
41962
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
41963
41963
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.width,
41964
41964
  minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
41965
41965
  maxWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
@@ -42010,7 +42010,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42010
42010
  const RenderElement = React__default["default"].memo((props) => {
42011
42011
  const { indexRow, row, isSelected, level = 0 } = props;
42012
42012
  const [expanded, setExpanded] = React$5.useState(row.expanded);
42013
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, className: classnames('r-select-row', { 'fisrt-row': indexRow === 0 && level === 0 }), children: [isMulti && jsxRuntime.jsxs("td", { className: classnames(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
42013
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("tr", { id: `row-select-table-${indexRow}`, className: classNames$1('r-select-row', { 'fisrt-row': indexRow === 0 && level === 0 }), children: [isMulti && jsxRuntime.jsxs("td", { className: classNames$1(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
42014
42014
  textAlign: 'center',
42015
42015
  paddingLeft: (level * 15) + (row[fieldChildren ?? 'children']?.length > 0 ? 0 : 10)
42016
42016
  }, onClick: (e) => {
@@ -42057,7 +42057,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42057
42057
  setExpanded(true);
42058
42058
  }
42059
42059
  e.stopPropagation();
42060
- }, fontSize: 18, className: classnames('me-50 pb-0 r-icon-expand', { 'is-open': expanded }) }), jsxRuntime.jsx(Input$1, { checked: isSelected, type: "checkbox", className: "cursor-pointer", onChange: () => { } })] }), (columns ? columns : defaultColumns).map((col, indexCol) => {
42060
+ }, fontSize: 18, className: classNames$1('me-50 pb-0 r-icon-expand', { 'is-open': expanded }) }), jsxRuntime.jsx(Input$1, { checked: isSelected, type: "checkbox", className: "cursor-pointer", onChange: () => { } })] }), (columns ? columns : defaultColumns).map((col, indexCol) => {
42061
42061
  let valueDisplay = row[col.field];
42062
42062
  if (col.type === 'numeric' || (col.typeCondition && col.typeCondition(row) === 'numeric')) {
42063
42063
  valueDisplay = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? '.', formatSetting?.thousandSeparator ?? ',', col.fraction ?? 0, true) ?? 0;
@@ -42068,7 +42068,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42068
42068
  else if (col.type === 'datetime') {
42069
42069
  valueDisplay = valueDisplay ? formatDateTime(valueDisplay, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm') : '';
42070
42070
  }
42071
- return (jsxRuntime.jsxs(React$5.Fragment, { children: [col.visible !== false && jsxRuntime.jsxs("td", { id: `select-${id}-${indexRow}-${indexCol}`, className: classnames(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
42071
+ return (jsxRuntime.jsxs(React$5.Fragment, { children: [col.visible !== false && jsxRuntime.jsxs("td", { id: `select-${id}-${indexRow}-${indexCol}`, className: classNames$1(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
42072
42072
  paddingLeft: 9 + (indexCol === 0 && !isMulti ? (level * 10) + (row[fieldChildren ?? 'children']?.length > 0 || level === 0 ? 0 : 15) : 0),
42073
42073
  textAlign: col.textAlign ? col.textAlign : 'left'
42074
42074
  }, onClick: (e) => {
@@ -42122,7 +42122,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42122
42122
  setExpanded(true);
42123
42123
  }
42124
42124
  e.stopPropagation();
42125
- }, fontSize: 18, className: classnames('me-50 r-icon-expand', { 'is-open': expanded }) }), col.template ? col.template(row, indexRow) : (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay)] }, `col-${indexRow}-${indexCol}`), checkOverflow(indexRow, indexCol) && jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay) })] }, indexCol));
42125
+ }, fontSize: 18, className: classNames$1('me-50 r-icon-expand', { 'is-open': expanded }) }), col.template ? col.template(row, indexRow) : (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay)] }, `col-${indexRow}-${indexCol}`), checkOverflow(indexRow, indexCol) && jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `select-${id}-${indexRow}-${indexCol}`, children: col.template ? col.template(row, indexRow) : (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay) })] }, indexCol));
42126
42126
  })] }, `row-${indexRow}`), row[fieldChildren ?? 'children'] && row.expanded && row[fieldChildren ?? 'children'].map((child, indexChild) => {
42127
42127
  if (checkSearch(searchTerm, child, (columns ? columns : defaultColumns))) {
42128
42128
  const isSelectedChild = value && (isMulti ? value?.some((x) => x === child[fieldValue ?? 'value']) : value[fieldValue ?? 'value'] === child[fieldValue ?? 'value']);
@@ -42133,7 +42133,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42133
42133
  const RenderTable = (props) => {
42134
42134
  let countDisplay = 0;
42135
42135
  return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [!(noHeader && (columns?.length ?? 0) > 0) &&
42136
- jsxRuntime.jsx("thead", { className: 'r-select-gridheader', children: jsxRuntime.jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsxRuntime.jsx("th", { className: classnames(`r-select-headercell checkbox-column`), style: { width: 40, minWidth: 40, maxWidth: 100, top: `0px` }, children: jsxRuntime.jsx("div", { style: { justifyContent: 'center' }, className: classnames('r-select-headercell-div'), children: jsxRuntime.jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
42136
+ jsxRuntime.jsx("thead", { className: 'r-select-gridheader', children: jsxRuntime.jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsxRuntime.jsx("th", { className: classNames$1(`r-select-headercell checkbox-column`), style: { width: 40, minWidth: 40, maxWidth: 100, top: `0px` }, children: jsxRuntime.jsx("div", { style: { justifyContent: 'center' }, className: classNames$1('r-select-headercell-div'), children: jsxRuntime.jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
42137
42137
  if (isMulti) {
42138
42138
  if (isSelectedAll) {
42139
42139
  onChange([]);
@@ -42143,7 +42143,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42143
42143
  }
42144
42144
  e.stopPropagation();
42145
42145
  }
42146
- }, readOnly: true, className: classnames('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
42146
+ }, readOnly: true, className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
42147
42147
  return (renderHeaderCol(col, index));
42148
42148
  })] }) }), (options.length > 0) && jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("tbody", { className: 'r-select-gridcontent', children: options?.map((row, indexRow) => {
42149
42149
  if (checkSearch(searchTerm, row, (columns ? columns : defaultColumns))) {
@@ -42169,17 +42169,17 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42169
42169
  traverse(tree);
42170
42170
  return records;
42171
42171
  };
42172
- return (jsxRuntime.jsx("div", { className: classnames('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxRuntime.jsx("div", { ref: selectTableRef, children: jsxRuntime.jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxRuntime.jsxs(DropdownToggle$1, { onClick: (e) => {
42172
+ return (jsxRuntime.jsx("div", { className: classNames$1('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsxRuntime.jsx("div", { ref: selectTableRef, children: jsxRuntime.jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxRuntime.jsxs(DropdownToggle$1, { onClick: (e) => {
42173
42173
  if (!isDisabled) {
42174
42174
  inputRef?.current.focus();
42175
42175
  handleOpenClose();
42176
42176
  }
42177
42177
  e.preventDefault();
42178
- }, tag: 'div', style: { width: '100%' }, className: classnames('select-table-control', { 'r-select-is-disabled': isDisabled }, { 'r-select-is-open': dropdownOpen }, { 'r-select-is-focus': isFocus }, { 'r-select-is-invalid': invalid }), children: [jsxRuntime.jsxs("div", { className: "select-table-container", children: [isMulti ? jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { className: classnames('select-value is-mutil', { 'd-none': searchTerm }), children: getSelectedRecords(options, value).map((ele, index) => {
42178
+ }, tag: 'div', style: { width: '100%' }, className: classNames$1('select-table-control', { 'r-select-is-disabled': isDisabled }, { 'r-select-is-open': dropdownOpen }, { 'r-select-is-focus': isFocus }, { 'r-select-is-invalid': invalid }), children: [jsxRuntime.jsxs("div", { className: "select-table-container", children: [isMulti ? jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("div", { className: classNames$1('select-value is-mutil', { 'd-none': searchTerm }), children: getSelectedRecords(options, value).map((ele, index) => {
42179
42179
  return (jsxRuntime.jsxs("span", { children: [index === 0 ? '' : ', ', ele[fieldLabel ?? 'label']] }, index));
42180
- }) }) }) : jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames('select-value', { 'd-none': searchTerm }), children: [value ? (formatOptionLabel ? formatOptionLabel(value) : value[fieldLabel ?? 'label']) : '', " "] }) }), !((isMulti ? value?.length > 0 : value) || isDisabled || searchTerm) && jsxRuntime.jsx("div", { className: classnames('select-placeholder'), children: placeholder }), jsxRuntime.jsx("div", { className: 'input-container', children: jsxRuntime.jsx("input", { style: { textAlign: textAlign ?? 'left' }, ref: inputRef, className: classnames('select-input'), readOnly: isDisabled, value: searchTerm, onPaste: (e) => (onPaste && !dropdownOpen) && onPaste(e), onChange: (val) => {
42180
+ }) }) }) : jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1('select-value', { 'd-none': searchTerm }), children: [value ? (formatOptionLabel ? formatOptionLabel(value) : value[fieldLabel ?? 'label']) : '', " "] }) }), !((isMulti ? value?.length > 0 : value) || isDisabled || searchTerm) && jsxRuntime.jsx("div", { className: classNames$1('select-placeholder'), children: placeholder }), jsxRuntime.jsx("div", { className: 'input-container', children: jsxRuntime.jsx("input", { style: { textAlign: textAlign ?? 'left' }, ref: inputRef, className: classNames$1('select-input'), readOnly: isDisabled, value: searchTerm, onPaste: (e) => (onPaste && !dropdownOpen) && onPaste(e), onChange: (val) => {
42181
42181
  setSearchTerm(val.target.value);
42182
- }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), (isClearable && value && !isDisabled) && jsxRuntime.jsx("div", { className: classnames('cursor-pointer icon-clear'), onClick: (e) => {
42182
+ }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), (isClearable && value && !isDisabled) && jsxRuntime.jsx("div", { className: classNames$1('cursor-pointer icon-clear'), onClick: (e) => {
42183
42183
  onChange(isMulti ? [] : undefined);
42184
42184
  e.stopPropagation();
42185
42185
  }, children: "\u00D7" }), !isDisabled && jsxRuntime.jsx("div", { className: "select-table-indicator", onMouseDown: (e) => e.preventDefault(), children: jsxRuntime.jsx("svg", { height: "20", width: "20", viewBox: "0 0 20 20", children: jsxRuntime.jsx("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" }) }) })] }), jsxRuntime.jsx(DropdownMenu$1, { container: component, className: 'formula-dropdown icon-dropdown p-0', style: {
@@ -42187,12 +42187,12 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
42187
42187
  position: 'fixed',
42188
42188
  borderRadius: 4,
42189
42189
  zIndex: 9999
42190
- }, children: jsxRuntime.jsx(DropdownItem$1, { className: classnames('p-0 menu-select-table'), style: { borderRadius: '6px' }, tag: 'div', header: true, children: dropdownOpen && jsxRuntime.jsx("div", { onMouseDown: (e) => {
42190
+ }, children: jsxRuntime.jsx(DropdownItem$1, { className: classNames$1('p-0 menu-select-table'), style: { borderRadius: '6px' }, tag: 'div', header: true, children: dropdownOpen && jsxRuntime.jsx("div", { onMouseDown: (e) => {
42191
42191
  if (!isDisabled) {
42192
42192
  inputRef?.current.focus();
42193
42193
  e.preventDefault();
42194
42194
  }
42195
- }, children: jsxRuntime.jsxs("div", { className: 'r-select-grid r-select-tree-grid', children: [jsxRuntime.jsx("div", { className: "r-select-gridtable ", ref: selectMenuTableRef, style: { width: menuWidth, minWidth: selectTableRef?.current?.clientWidth, maxHeight: maxHeight ?? defaultMaxHeight }, children: jsxRuntime.jsx(RenderTable, {}) }), jsxRuntime.jsxs("div", { className: classnames('r-select-footer', { 'd-none': !(showFooter === true || handleAdd || isMulti) }), children: [jsxRuntime.jsxs(Button$1, { outline: true, color: "primary", onClick: handleAdd, className: classnames('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsxRuntime.jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), isMulti && jsxRuntime.jsx("div", { className: "ms-50 text-primary h-100 d-flex align-items-center", onClick: handleAdd, children: t('countSelected', { item: value?.length ?? 0 }) }), footerComponent ? footerComponent() : null] })] }) }) }) })] }) }) }));
42195
+ }, children: jsxRuntime.jsxs("div", { className: 'r-select-grid r-select-tree-grid', children: [jsxRuntime.jsx("div", { className: "r-select-gridtable ", ref: selectMenuTableRef, style: { width: menuWidth, minWidth: selectTableRef?.current?.clientWidth, maxHeight: maxHeight ?? defaultMaxHeight }, children: jsxRuntime.jsx(RenderTable, {}) }), jsxRuntime.jsxs("div", { className: classNames$1('r-select-footer', { 'd-none': !(showFooter === true || handleAdd || isMulti) }), children: [jsxRuntime.jsxs(Button$1, { outline: true, color: "primary", onClick: handleAdd, className: classNames$1('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsxRuntime.jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), isMulti && jsxRuntime.jsx("div", { className: "ms-50 text-primary h-100 d-flex align-items-center", onClick: handleAdd, children: t('countSelected', { item: value?.length ?? 0 }) }), footerComponent ? footerComponent() : null] })] }) }) }) })] }) }) }));
42196
42196
  });
42197
42197
 
42198
42198
  const PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageOptions, onChangePageSize }) => {
@@ -42208,14 +42208,14 @@ const PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageO
42208
42208
  const renderPageNumber = (number) => {
42209
42209
  const arr = [];
42210
42210
  for (let index = ((number - 1) * 5) + 1; index <= number * 5 && index <= Math.floor(totalItem / pageSize) + (Math.floor(totalItem / pageSize) === totalItem / pageSize ? 0 : 1); index++) {
42211
- arr.push(jsxRuntime.jsx("div", { className: classnames('r-number', { 'r-active': index === currentPage }), onClick: () => { onChangePage({ totalItem, pageSize, currentPage: index, old: currentPage }); }, children: index }, `page-${index}`));
42211
+ arr.push(jsxRuntime.jsx("div", { className: classNames$1('r-number', { 'r-active': index === currentPage }), onClick: () => { onChangePage({ totalItem, pageSize, currentPage: index, old: currentPage }); }, children: index }, `page-${index}`));
42212
42212
  }
42213
42213
  return (arr);
42214
42214
  };
42215
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-pager", children: [jsxRuntime.jsxs("div", { className: "r-pagercontainer", children: [jsxRuntime.jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: 1, old: currentPage }), children: jsxRuntime.jsx(SvgChevronsLeft, { fontSize: 16 }) }), jsxRuntime.jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: currentPage - 1, old: currentPage }), children: jsxRuntime.jsx(SvgChevronLeft, { fontSize: 16 }) }), jsxRuntime.jsx("button", { className: classnames('r-button', { 'd-none': currentPageNumber === 1 }), type: "button", onClick: () => {
42215
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: "r-pager", children: [jsxRuntime.jsxs("div", { className: "r-pagercontainer", children: [jsxRuntime.jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: 1, old: currentPage }), children: jsxRuntime.jsx(SvgChevronsLeft, { fontSize: 16 }) }), jsxRuntime.jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: currentPage - 1, old: currentPage }), children: jsxRuntime.jsx(SvgChevronLeft, { fontSize: 16 }) }), jsxRuntime.jsx("button", { className: classNames$1('r-button', { 'd-none': currentPageNumber === 1 }), type: "button", onClick: () => {
42216
42216
  setCurrentPageNumber(currentPageNumber - 1);
42217
42217
  onChangePage({ totalItem, pageSize, currentPage: ((currentPageNumber - 2) * 5) + 1, old: currentPage });
42218
- }, children: "..." }), renderPageNumber(currentPageNumber), jsxRuntime.jsx("button", { className: classnames('r-button', { 'd-none': currentPageNumber * 5 >= countPage }), type: "button", onClick: () => {
42218
+ }, children: "..." }), renderPageNumber(currentPageNumber), jsxRuntime.jsx("button", { className: classNames$1('r-button', { 'd-none': currentPageNumber * 5 >= countPage }), type: "button", onClick: () => {
42219
42219
  setCurrentPageNumber(currentPageNumber + 1);
42220
42220
  onChangePage({ totalItem, pageSize, currentPage: (currentPageNumber * 5) + 1, old: currentPage });
42221
42221
  }, children: "..." }), jsxRuntime.jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || countPage === currentPage, onClick: () => onChangePage({ totalItem, pageSize, currentPage: currentPage + 1, old: currentPage }), children: jsxRuntime.jsx(SvgChevronRight, { fontSize: 16 }) }), jsxRuntime.jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || countPage === currentPage, onClick: () => onChangePage({ totalItem, pageSize, currentPage: Math.floor(totalItem / pageSize) + (Math.floor(totalItem / pageSize) === totalItem / pageSize ? 0 : 1), old: currentPage }), children: jsxRuntime.jsx(SvgChevronsRight, { fontSize: 16 }) }), jsxRuntime.jsx("div", { className: "r-pagesize", children: jsxRuntime.jsx(SelectTable, { value: { value: pageSize, label: pageSize }, noHeader: true, options: pageOptions.map((item) => ({ value: item, label: item })), onChange: (val) => {
@@ -42330,13 +42330,13 @@ editDisable, addDisable, toolbarSetting, buttonSetting) => {
42330
42330
  };
42331
42331
 
42332
42332
  const ToolbarBottom = ({ handleAdd, handleDuplicate, handleInsertBefore, handleInsertAfter, handleDeleteAll, setOpenPopupSetupColumn, indexFocus, editDisable, addDisable, buttonSetting, toolbarSetting, headerColumns, t }) => {
42333
- return (jsxRuntime.jsx("div", { id: "table_custom_bottom_toolbar", className: "r-toolbar r-toolbar-bottom", role: "toolbar", "aria-disabled": "false", "aria-haspopup": "false", "aria-orientation": "horizontal", children: jsxRuntime.jsxs("div", { className: "r-toolbar-items", children: [jsxRuntime.jsxs("div", { className: "r-toolbar-left", children: [jsxRuntime.jsxs("div", { className: classnames('r-toolbar-item d-flex', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: [jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: () => handleAdd(1), className: 'd-flex', children: t('Add item') }), jsxRuntime.jsxs(UncontrolledDropdown, { className: 'nav-item', children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', className: 'me-0 d-flex', children: jsxRuntime.jsx(Button$1, { type: 'button', color: 'success', outline: true, style: { marginLeft: -1 }, className: 'px-25', children: jsxRuntime.jsx("svg", { fill: '#28c76f', height: "15", width: "20", viewBox: "0 0 20 20", children: jsxRuntime.jsx("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" }) }) }) }), jsxRuntime.jsxs(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown p-0', style: { width: 60 }, children: [jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(10), children: "Th\u00EAm 10 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(20), children: "Th\u00EAm 20 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(30), children: "Th\u00EAm 30 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(40), children: "Th\u00EAm 40 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(50), children: "Th\u00EAm 50 h\u00E0ng" })] })] })] }), (indexFocus ?? -1) > -1 ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: () => { handleDuplicate(); }, className: 'd-flex', children: t('Duplicate') }) }), jsxRuntime.jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertBefore, className: 'd-flex', children: t('Insert item before') }) }), jsxRuntime.jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertAfter, className: 'd-flex', children: t('Insert item after') }) })] }) : jsxRuntime.jsx(jsxRuntime.Fragment, { children: " " }), jsxRuntime.jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'primary', outline: true, onClick: handleDeleteAll, className: 'd-flex', children: t('Delete all item') }) }), toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42333
+ return (jsxRuntime.jsx("div", { id: "table_custom_bottom_toolbar", className: "r-toolbar r-toolbar-bottom", role: "toolbar", "aria-disabled": "false", "aria-haspopup": "false", "aria-orientation": "horizontal", children: jsxRuntime.jsxs("div", { className: "r-toolbar-items", children: [jsxRuntime.jsxs("div", { className: "r-toolbar-left", children: [jsxRuntime.jsxs("div", { className: classNames$1('r-toolbar-item d-flex', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: [jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: () => handleAdd(1), className: 'd-flex', children: t('Add item') }), jsxRuntime.jsxs(UncontrolledDropdown, { className: 'nav-item', children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', className: 'me-0 d-flex', children: jsxRuntime.jsx(Button$1, { type: 'button', color: 'success', outline: true, style: { marginLeft: -1 }, className: 'px-25', children: jsxRuntime.jsx("svg", { fill: '#28c76f', height: "15", width: "20", viewBox: "0 0 20 20", children: jsxRuntime.jsx("path", { d: "M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z" }) }) }) }), jsxRuntime.jsxs(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown p-0', style: { width: 60 }, children: [jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(10), children: "Th\u00EAm 10 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(20), children: "Th\u00EAm 20 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(30), children: "Th\u00EAm 30 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(40), children: "Th\u00EAm 40 h\u00E0ng" }), jsxRuntime.jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(50), children: "Th\u00EAm 50 h\u00E0ng" })] })] })] }), (indexFocus ?? -1) > -1 ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: () => { handleDuplicate(); }, className: 'd-flex', children: t('Duplicate') }) }), jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertBefore, className: 'd-flex', children: t('Insert item before') }) }), jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertAfter, className: 'd-flex', children: t('Insert item after') }) })] }) : jsxRuntime.jsx(jsxRuntime.Fragment, { children: " " }), jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: jsxRuntime.jsx(Button$1, { color: 'primary', outline: true, onClick: handleDeleteAll, className: 'd-flex', children: t('Delete all item') }) }), toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42334
42334
  return ((item.align === 'left') ? jsxRuntime.jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : '');
42335
42335
  })] }), jsxRuntime.jsx("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42336
42336
  return ((item.align === 'center') ? jsxRuntime.jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : '');
42337
42337
  }) }), jsxRuntime.jsxs("div", { className: "r-toolbar-right", children: [toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42338
42338
  return ((item.align === 'right') ? jsxRuntime.jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : '');
42339
- }), jsxRuntime.jsx("div", { className: classnames('r-toolbar-item me-25', { 'd-none': headerColumns.length > 1 }), "aria-disabled": "false", children: jsxRuntime.jsx(SvgSettings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }), jsxRuntime.jsx("div", { className: classnames('r-toolbar-item me-25', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: jsxRuntime.jsxs(UncontrolledDropdown, { className: 'dropdown-user nav-item', children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', color: "primary", onClick: (e) => e.preventDefault(), children: jsxRuntime.jsx(SvgInfo, { className: "cursor-pointer text-primary" }) }), jsxRuntime.jsx(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown', children: jsxRuntime.jsxs("ul", { className: "mb-0 pe-50", children: [jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + D \u0111\u1EC3 nh\u00E2n b\u1EA3n" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \u00F4 v\u00E0 Ctrl + V \u0111\u1EC3 d\u00E1n th\u00F4ng tin t\u1EEB excel" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + C \u0111\u1EC3 sao ch\u00E9p h\u00E0ng" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + V \u0111\u1EC3 d\u00E1n h\u00E0ng" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n Ctrl ho\u1EB7c Alt + Shift + \u2193 \u0111\u1EC3 sao ch\u00E9p d\u1EEF li\u1EC7u \u00F4 cho c\u00E1c d\u00F2ng d\u01B0\u1EDBi" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n Ctrl ho\u1EB7c Alt + Shift + \u2191 \u0111\u1EC3 sao ch\u00E9p d\u1EEF li\u1EC7u \u00F4 cho c\u00E1c d\u00F2ng tr\u00EAn" })] }) })] }) })] })] }) }));
42339
+ }), jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item me-25', { 'd-none': headerColumns.length > 1 }), "aria-disabled": "false", children: jsxRuntime.jsx(SvgSettings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }), jsxRuntime.jsx("div", { className: classNames$1('r-toolbar-item me-25', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: jsxRuntime.jsxs(UncontrolledDropdown, { className: 'dropdown-user nav-item', children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', color: "primary", onClick: (e) => e.preventDefault(), children: jsxRuntime.jsx(SvgInfo, { className: "cursor-pointer text-primary" }) }), jsxRuntime.jsx(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown', children: jsxRuntime.jsxs("ul", { className: "mb-0 pe-50", children: [jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + D \u0111\u1EC3 nh\u00E2n b\u1EA3n" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \u00F4 v\u00E0 Ctrl + V \u0111\u1EC3 d\u00E1n th\u00F4ng tin t\u1EEB excel" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + C \u0111\u1EC3 sao ch\u00E9p h\u00E0ng" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n v\u00E0o c\u1ED9t STT \u0111\u1EC3 ch\u1ECDn h\u00E0ng v\u00E0 nh\u1EA5n Ctrl + V \u0111\u1EC3 d\u00E1n h\u00E0ng" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n Ctrl ho\u1EB7c Alt + Shift + \u2193 \u0111\u1EC3 sao ch\u00E9p d\u1EEF li\u1EC7u \u00F4 cho c\u00E1c d\u00F2ng d\u01B0\u1EDBi" }), jsxRuntime.jsx("li", { style: { fontSize: 13 }, children: "Nh\u1EA5n Ctrl ho\u1EB7c Alt + Shift + \u2191 \u0111\u1EC3 sao ch\u00E9p d\u1EEF li\u1EC7u \u00F4 cho c\u00E1c d\u00F2ng tr\u00EAn" })] }) })] }) })] })] }) }));
42340
42340
  };
42341
42341
 
42342
42342
  const handleArrowRight = (e, params) => {
@@ -42501,10 +42501,10 @@ const SelectTableBox = (props) => {
42501
42501
  const { isLabel, desciptionLabel, id, classLabel, name, label, required } = props;
42502
42502
  return (jsxRuntime.jsxs(React$5.Fragment, { children: [isLabel === false ? '' : jsxRuntime.jsxs(Label$1, { id: `label-${id}`, className: classLabel, for: name, children: [t(label ? label : ''), " ", required ? jsxRuntime.jsx("span", { className: "text-danger", children: "*" }) : ''] }), (!isNullOrUndefined$1(desciptionLabel) && desciptionLabel !== '') ?? jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(UncontrolledTooltip, { target: `label-${id}`, children: t(desciptionLabel ?? '') }) })] }));
42503
42503
  };
42504
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
42504
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
42505
42505
  [labelSize ? labelSize : '']: labelSize,
42506
42506
  'form-row-inline-error': errors
42507
- }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxRuntime.jsxs("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
42507
+ }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxRuntime.jsxs("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: [jsxRuntime.jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
42508
42508
  return (jsxRuntime.jsx(SelectTable, { ...rest, id: id, value: (isMulti ? value?.length > 0 : value) ? (!isMulti ? (options.find((val) => val[fieldValue ?? 'value'] === value) ?? (defaultValue ?? '')) : value) : (isMulti ? [] : undefined),
42509
42509
  // Giá trị của SelectTable, nếu isMulti là true và value có độ dài lớn hơn 0, hoặc nếu isMulti là false và value có giá trị,
42510
42510
  // thì tìm giá trị tương ứng trong options hoặc sử dụng defaultValue. Nếu không, sử dụng giá trị mặc định tùy thuộc vào isMulti.
@@ -42781,7 +42781,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42781
42781
  /*eslint-disable */
42782
42782
  switch (col?.editTypeCondition ? col?.editTypeCondition(row) : col.editType) {
42783
42783
  case 'date':
42784
- return (jsxRuntime.jsx(DateInput, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, className: classnames('form-control border-0 rounded-0 input-numeric', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), value: row[col.field], onChange: (date) => {
42784
+ return (jsxRuntime.jsx(DateInput, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, className: classNames$1('form-control border-0 rounded-0 input-numeric', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), value: row[col.field], onChange: (date) => {
42785
42785
  row[col.field] = date ? new Date(date.getTime() + 7 * 60 * 60 * 1000) : undefined;
42786
42786
  if (col.callback) {
42787
42787
  col.callback(row[col.field], indexRow, row);
@@ -42793,7 +42793,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42793
42793
  }
42794
42794
  } }));
42795
42795
  case 'datetime':
42796
- return (jsxRuntime.jsx(DateInput, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, className: classnames('form-control border-0 rounded-0 input-numeric', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), value: row[col.field], onChange: (date) => {
42796
+ return (jsxRuntime.jsx(DateInput, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, className: classNames$1('form-control border-0 rounded-0 input-numeric', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), value: row[col.field], onChange: (date) => {
42797
42797
  row[col.field] = date;
42798
42798
  if (col.callback) {
42799
42799
  col.callback(row[col.field], indexRow, row);
@@ -42928,7 +42928,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42928
42928
  decimalScale: col.numericSettings?.fraction ?? 0
42929
42929
  };
42930
42930
  let floatValue = parseFloat(row[col.field] ?? '0');
42931
- return (jsxRuntime.jsx(NumericFormat, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, style: { textAlign: col.textAlign, height: 29 }, ...numericFormatProps, defaultValue: formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction), className: classnames('form-control border-0 rounded-0 input-numeric', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), onValueChange: (values) => {
42931
+ return (jsxRuntime.jsx(NumericFormat, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, style: { textAlign: col.textAlign, height: 29 }, ...numericFormatProps, defaultValue: formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction), className: classNames$1('form-control border-0 rounded-0 input-numeric', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), onValueChange: (values) => {
42932
42932
  floatValue = values?.floatValue;
42933
42933
  }, onFocus: (e) => {
42934
42934
  e.target.setSelectionRange(0, e.target.innerText.length - 1);
@@ -42994,7 +42994,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42994
42994
  }
42995
42995
  } }));
42996
42996
  default:
42997
- return (jsxRuntime.jsx(Input$1, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, style: { textAlign: col.textAlign, height: 29 }, value: isNullOrUndefined$1(row[col.field]) ? '' : row[col.field], className: classnames('border-0 rounded-0 input-element', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), onChange: (val) => {
42997
+ return (jsxRuntime.jsx(Input$1, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, style: { textAlign: col.textAlign, height: 29 }, value: isNullOrUndefined$1(row[col.field]) ? '' : row[col.field], className: classNames$1('border-0 rounded-0 input-element', { 'is-invalid': col.validate && col.validate(row[col.field], row) }), onChange: (val) => {
42998
42998
  if (row[col.field] != val.target?.value) {
42999
42999
  row[col.field] = val.target?.value;
43000
43000
  if (col.callback) {
@@ -43337,14 +43337,14 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43337
43337
  }, [selectedItem]);
43338
43338
  const renderContentCol = (col, row, indexRow, indexCol, isSelected) => {
43339
43339
  if (col.field === 'command') {
43340
- return (col.visible !== false && jsxRuntime.jsx("td", { className: classnames(`r-rowcell p-0 fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), style: {
43340
+ return (col.visible !== false && jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell p-0 fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), style: {
43341
43341
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43342
43342
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43343
43343
  textAlign: col.textAlign ? col.textAlign : 'left',
43344
43344
  }, children: jsxRuntime.jsx("div", { className: "r-rowcell-div command", children: jsxRuntime.jsx(CommandElement, { commandItems: col.commandItems ?? [], handleCommandClick: handleCommandClick, indexRow: indexRow, rowData: row, setIndexFocus: setIndexFocus, indexFocus: indexFocus }) }) }, `col-${indexRow}-${indexCol}`));
43345
43345
  }
43346
43346
  else if (col.field === '#') {
43347
- return (col.visible !== false && jsxRuntime.jsx("td", { className: classnames(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), tabIndex: Number(`${indexRow}${indexCol}`), style: {
43347
+ return (col.visible !== false && jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell p-0 cursor-pointer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), tabIndex: Number(`${indexRow}${indexCol}`), style: {
43348
43348
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43349
43349
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43350
43350
  textAlign: 'center',
@@ -43382,7 +43382,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43382
43382
  }, children: jsxRuntime.jsx("div", { className: "r-rowcell-div", children: indexRow + 1 }) }, `col-${indexRow}-${indexCol}`));
43383
43383
  }
43384
43384
  else if (col.field === 'checkbox') {
43385
- return (jsxRuntime.jsx("td", { className: classnames(`r-rowcell p-0 fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), style: {
43385
+ return (jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell p-0 fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), style: {
43386
43386
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43387
43387
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43388
43388
  }, children: jsxRuntime.jsx("div", { className: "r-rowcell-div cursor-pointer", style: { alignItems: 'center' }, onClick: (e) => {
@@ -43422,7 +43422,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43422
43422
  }
43423
43423
  const typeDis = !editDisable && (indexFocus === indexRow || col.editType === 'checkbox') && (!col.disabledCondition || !col.disabledCondition(row)) ? (col.editEnable ? 1 : (col.template ? 2 : 3)) : (col.template ? 2 : 3);
43424
43424
  const errorMessage = typeDis === 1 || col.field === '' || !col.validate ? '' : col.validate(row[col.field], row);
43425
- return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("td", { className: classnames(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), style: {
43425
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': (isSelected && editDisable) || indexFocus === indexRow }), style: {
43426
43426
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43427
43427
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43428
43428
  }, onClick: (e) => {
@@ -43453,9 +43453,9 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43453
43453
  }
43454
43454
  e.stopPropagation();
43455
43455
  }
43456
- }, children: jsxRuntime.jsx("div", { className: classnames('r-rowcell-div'), children: jsxRuntime.jsxs("div", { id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : '', className: classnames('r-rowcell-content', { 'r-is-invalid': errorMessage }), style: {
43456
+ }, children: jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div'), children: jsxRuntime.jsxs("div", { id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : '', className: classNames$1('r-rowcell-content', { 'r-is-invalid': errorMessage }), style: {
43457
43457
  textAlign: col.textAlign ? col.textAlign : 'left'
43458
- }, children: [typeDis === 1 && !refreshRow && jsxRuntime.jsx(jsxRuntime.Fragment, { children: RenderEditCell(row, col, indexCol, indexRow) }), (typeDis !== 1 || refreshRow) && RenderContentCell(row, col, indexCol, indexRow, typeDis, value), jsxRuntime.jsx("span", { id: `error-${indexRow}-${indexCol}`, className: classnames('cursor-pointer text-primary icon-table', { 'd-none': !errorMessage }), children: jsxRuntime.jsx(SvgAlertCircle, { fontSize: 15.5 }) }), jsxRuntime.jsx(UncontrolledTooltip, { target: `error-${indexRow}-${indexCol}`, className: "r-tooltip tooltip-error", children: errorMessage?.toString() ?? '' })] }) }) }, `col-${indexRow}-${indexCol}`) }, indexCol));
43458
+ }, children: [typeDis === 1 && !refreshRow && jsxRuntime.jsx(jsxRuntime.Fragment, { children: RenderEditCell(row, col, indexCol, indexRow) }), (typeDis !== 1 || refreshRow) && RenderContentCell(row, col, indexCol, indexRow, typeDis, value), jsxRuntime.jsx("span", { id: `error-${indexRow}-${indexCol}`, className: classNames$1('cursor-pointer text-primary icon-table', { 'd-none': !errorMessage }), children: jsxRuntime.jsx(SvgAlertCircle, { fontSize: 15.5 }) }), jsxRuntime.jsx(UncontrolledTooltip, { target: `error-${indexRow}-${indexCol}`, className: "r-tooltip tooltip-error", children: errorMessage?.toString() ?? '' })] }) }) }, `col-${indexRow}-${indexCol}`) }, indexCol));
43459
43459
  }
43460
43460
  };
43461
43461
  const RenderContentCell = (row, col, indexCol, indexRow, typeDis, value) => {
@@ -43472,7 +43472,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43472
43472
  };
43473
43473
  const renderFooterCol = (col, indexCol) => {
43474
43474
  const sumValue = (col.haveSum === true && col.editType === "numeric") ? dataSource.reduce(function (accumulator, currentValue) { return (Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0)); }, 0) : 0;
43475
- return (jsxRuntime.jsx(React$5.Fragment, { children: (col.visible !== false) && jsxRuntime.jsx("td", { className: classnames(`p-0 px-50 r-footer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
43475
+ return (jsxRuntime.jsx(React$5.Fragment, { children: (col.visible !== false) && jsxRuntime.jsx("td", { className: classNames$1(`p-0 px-50 r-footer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
43476
43476
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43477
43477
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43478
43478
  textAlign: col.textAlign ? col.textAlign : 'left'
@@ -43496,7 +43496,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43496
43496
  const flagSearch = !searchClient || checkSearch(searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, row, searchSetting?.keyField ?? []);
43497
43497
  if (flagSearch) {
43498
43498
  const flagDisplay = !pagingClient || ((indexRow + 1) > ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1)) && (indexRow + 1) <= ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0))));
43499
- return (flagDisplay && jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("tr", { className: classnames('r-row'), children: contentColumns.map((col, indexCol) => renderContentCol(col, row, indexRow, indexCol, isSelected)) }, `row-${indexRow}`) }));
43499
+ return (flagDisplay && jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("tr", { className: classNames$1('r-row'), children: contentColumns.map((col, indexCol) => renderContentCol(col, row, indexRow, indexCol, isSelected)) }, `row-${indexRow}`) }));
43500
43500
  }
43501
43501
  }));
43502
43502
  };
@@ -43507,7 +43507,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43507
43507
  }, [searchTerm, searchSetting?.searchTerm]);
43508
43508
  return (jsxRuntime.jsxs(React$5.Fragment, { children: [jsxRuntime.jsxs("div", { className: "react-table-edit", children: [jsxRuntime.jsxs("div", { className: 'r-grid', ref: gridRef, children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), jsxRuntime.jsx("div", { ref: tableElement, className: "r-gridtable", style: { height: `${height ? `${height}px` : 'auto'}`, minHeight: `${minHeight ? `${minHeight}px` : ''}`, maxHeight: `${maxHeight ? `${maxHeight}px` : '400px'}` }, children: jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [jsxRuntime.jsx("thead", { className: 'r-gridheader', children: headerColumns.map((element, indexParent) => {
43509
43509
  return (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: element?.map((col, index) => {
43510
- return (jsxRuntime.jsx(HeaderTableCol, { col: col, dataSource: dataSource, indexCol: index, indexParent: indexParent, isMulti: isMulti ?? false, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, column: contentColumns, setColumn: setContentColumns, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, totalCount: totalCount }, `header-${indexParent}-${index}`));
43510
+ return (jsxRuntime.jsx(HeaderTableCol$1, { col: col, dataSource: dataSource, indexCol: index, indexParent: indexParent, isMulti: isMulti ?? false, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, column: contentColumns, setColumn: setContentColumns, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, totalCount: totalCount }, `header-${indexParent}-${index}`));
43511
43511
  }) }, `header-${-indexParent}`));
43512
43512
  }) }), jsxRuntime.jsx("tbody", { className: 'r-gridcontent', children: renderData() }), jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: haveSum == true ? jsxRuntime.jsx("tr", { className: 'r-row', children: contentColumns.map((col, index) => {
43513
43513
  return (renderFooterCol(col, index));
@@ -43615,7 +43615,7 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
43615
43615
  const handleModal = (name) => {
43616
43616
  setOpenModal((old) => ({ ...old, [name]: !(openModal[name] ?? false) }));
43617
43617
  };
43618
- return (jsxRuntime.jsxs(React$5.Fragment, { children: [renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : '', jsxRuntime.jsxs("div", { className: classnames('tab-custom', { 'tab-parent': tabParent }, { 'tab-child': tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [jsxRuntime.jsx("div", { onClick: () => handleScroll(-200), className: classnames('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) => {
43618
+ return (jsxRuntime.jsxs(React$5.Fragment, { children: [renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : '', jsxRuntime.jsxs("div", { className: classNames$1('tab-custom', { 'tab-parent': tabParent }, { 'tab-child': tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [jsxRuntime.jsx("div", { onClick: () => handleScroll(-200), className: classNames$1('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) => {
43619
43619
  if (item?.resAttributes?.IS_MENU === '1') {
43620
43620
  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: () => {
43621
43621
  if (x.resAttributes.MODAL_VALUE) {
@@ -43627,9 +43627,9 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
43627
43627
  }, children: x.name }, x.code)) })] }, item.code));
43628
43628
  }
43629
43629
  else {
43630
- return (jsxRuntime.jsx(reactRouterDom.Link, { draggable: false, to: item.url, className: classnames('tab-custom-item', { active: item.url === url || (tabParent && url?.split('/').length > 3 && item.url.startsWith(url.substring(0, url.lastIndexOf('/')))) }), children: item.name }, item.code));
43630
+ return (jsxRuntime.jsx(reactRouterDom.Link, { draggable: false, to: item.url, className: classNames$1('tab-custom-item', { active: item.url === url || (tabParent && url?.split('/').length > 3 && item.url.startsWith(url.substring(0, url.lastIndexOf('/')))) }), children: item.name }, item.code));
43631
43631
  }
43632
- }) }) }), jsxRuntime.jsx("div", { onClick: () => handleScroll(200), className: classnames('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsxRuntime.jsx(SvgChevronRight, {}) })] })] }));
43632
+ }) }) }), jsxRuntime.jsx("div", { onClick: () => handleScroll(200), className: classNames$1('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsxRuntime.jsx(SvgChevronRight, {}) })] })] }));
43633
43633
  };
43634
43634
 
43635
43635
  const OptionFont = [
@@ -44512,23 +44512,23 @@ const InputStyleComponent = (props) => {
44512
44512
  backgroundColor: value.backgroundColor ?? '#ffffff',
44513
44513
  color: value.color ?? '#000000'
44514
44514
  }, children: props.label }));
44515
- } }), jsxRuntime.jsx("div", { className: classnames('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) => {
44515
+ } }), jsxRuntime.jsx("div", { className: classNames$1('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) => {
44516
44516
  onChange({ ...value, fontSize: val.value });
44517
- } }) }), jsxRuntime.jsx("div", { className: classnames('btn-input-style', { 'active-custom': value.bold }, { 'd-none': disabledBold }), onClick: () => {
44517
+ } }) }), jsxRuntime.jsx("div", { className: classNames$1('btn-input-style', { 'active-custom': value.bold }, { 'd-none': disabledBold }), onClick: () => {
44518
44518
  if (!disabled) {
44519
44519
  onChange({ ...value, bold: !value.bold });
44520
44520
  }
44521
- }, children: jsxRuntime.jsx(SvgBold, { fontSize: 18 }) }), jsxRuntime.jsx("div", { className: classnames('btn-input-style', { 'active-custom': value.italic }, { 'd-none': disabledItalic }), onClick: () => {
44521
+ }, children: jsxRuntime.jsx(SvgBold, { fontSize: 18 }) }), jsxRuntime.jsx("div", { className: classNames$1('btn-input-style', { 'active-custom': value.italic }, { 'd-none': disabledItalic }), onClick: () => {
44522
44522
  if (!disabled) {
44523
44523
  onChange({ ...value, italic: !value.italic });
44524
44524
  }
44525
- }, children: jsxRuntime.jsx(SvgItalic, { fontSize: 18 }) }), jsxRuntime.jsx("div", { className: classnames('btn-input-style', { 'active-custom': value.underline }, { 'd-none': disabledUnderline }), onClick: () => {
44525
+ }, children: jsxRuntime.jsx(SvgItalic, { fontSize: 18 }) }), jsxRuntime.jsx("div", { className: classNames$1('btn-input-style', { 'active-custom': value.underline }, { 'd-none': disabledUnderline }), onClick: () => {
44526
44526
  if (!disabled) {
44527
44527
  onChange({ ...value, underline: !value.underline });
44528
44528
  }
44529
- }, children: jsxRuntime.jsx(SvgUnderline, { fontSize: 18 }) }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classnames('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) => {
44529
+ }, children: jsxRuntime.jsx(SvgUnderline, { fontSize: 18 }) }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$1('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) => {
44530
44530
  onChange({ ...value, color: e.target.value });
44531
- } })] }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classnames('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) => {
44531
+ } })] }), jsxRuntime.jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$1('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) => {
44532
44532
  onChange({ ...value, backgroundColor: e.target.value });
44533
44533
  } })] })] }) }));
44534
44534
  };
@@ -45990,10 +45990,10 @@ const CheckboxInput = (props) => {
45990
45990
  }
45991
45991
  } })) }) }));
45992
45992
  };
45993
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames(inLine === false ? 'form-group ' : 'form-row-inline d-flex', {
45993
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1(inLine === false ? 'form-group ' : 'form-row-inline d-flex', {
45994
45994
  [labelSize ? labelSize : '']: labelSize,
45995
45995
  reverse
45996
- }), children: [renderLabel({ isLabel, name, label: label ?? '' }), jsxRuntime.jsxs("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: [renderInput(), renderText()] })] }) }));
45996
+ }), children: [renderLabel({ isLabel, name, label: label ?? '' }), jsxRuntime.jsxs("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: [renderInput(), renderText()] })] }) }));
45997
45997
  };
45998
45998
 
45999
45999
  const defaultStyleExportSetting = {
@@ -46081,11 +46081,11 @@ const StyleInput = (props) => {
46081
46081
  return (jsxRuntime.jsx(InputStyleComponent, { disabledBackgroundColor: disabledBackgroundColor, disabledFontFamily: disabledFontFamily, disabledFontSize: disabledFontSize, disabledBold: disabledBold, disabledItalic: disabledItalic, disabledUnderline: disabledUnderline, disabled: disabled, value: value, onChange: onChange }));
46082
46082
  } }), errors && jsxRuntime.jsx(FormFeedback$1, { children: errors?.message })] }));
46083
46083
  };
46084
- return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classnames(' align', {
46084
+ return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsxs("div", { className: classNames$1(' align', {
46085
46085
  [labelSize ? labelSize : '']: labelSize,
46086
46086
  [classes ? classes : '']: classes,
46087
46087
  'form-row-inline-error': errors
46088
- }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { style: { height: `${height}px` }, className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
46088
+ }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsxRuntime.jsx("div", { style: { height: `${height}px` }, className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
46089
46089
  };
46090
46090
 
46091
46091
  const ExportExcelComponent = ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }) => {
@@ -65354,7 +65354,7 @@ const Wizard = React$5.forwardRef((props, ref) => {
65354
65354
  // ** Renders Wizard Header
65355
65355
  const renderHeader = () => {
65356
65356
  return steps.map((step, index) => {
65357
- return (jsxRuntime.jsxs(React$5.Fragment, { children: [index !== 0 && index !== steps.length ? jsxRuntime.jsx("div", { className: 'line', children: separator }) : null, jsxRuntime.jsx("div", { className: classnames('step', {
65357
+ return (jsxRuntime.jsxs(React$5.Fragment, { children: [index !== 0 && index !== steps.length ? jsxRuntime.jsx("div", { className: 'line', children: separator }) : null, jsxRuntime.jsx("div", { className: classNames$1('step', {
65358
65358
  crossed: (step.done !== undefined ? step.done : activeStep > (index + 1)),
65359
65359
  disable: step.disable,
65360
65360
  active: (index + 1) === activeStep
@@ -65364,18 +65364,18 @@ const Wizard = React$5.forwardRef((props, ref) => {
65364
65364
  // ** Renders Wizard Content
65365
65365
  const renderContent = () => {
65366
65366
  return steps.map((step, index) => {
65367
- return (jsxRuntime.jsx("div", { className: classnames('content', {
65367
+ return (jsxRuntime.jsx("div", { className: classNames$1('content', {
65368
65368
  [contentClassName]: contentClassName,
65369
65369
  'active dstepper-block': activeStep === (index + 1)
65370
65370
  }), id: step.id, children: step.content }, step.id));
65371
65371
  });
65372
65372
  };
65373
- return (jsxRuntime.jsxs("div", { ref: ref, className: classnames('bs-stepper', {
65373
+ return (jsxRuntime.jsxs("div", { ref: ref, className: classNames$1('bs-stepper', {
65374
65374
  [className]: className,
65375
65375
  vertical: type === 'vertical',
65376
65376
  'vertical wizard-modern': type === 'modern-vertical',
65377
65377
  'wizard-modern': type === 'modern-horizontal'
65378
- }), children: [jsxRuntime.jsx("div", { className: classnames('bs-stepper-header', { [headerClassName]: headerClassName }), children: renderHeader() }), jsxRuntime.jsx("div", { style: { height: heightContent, width: widthContent }, className: classnames('bs-stepper-content', { [contentWrapperClassName]: contentWrapperClassName }), children: renderContent() })] }));
65378
+ }), children: [jsxRuntime.jsx("div", { className: classNames$1('bs-stepper-header', { [headerClassName]: headerClassName }), children: renderHeader() }), jsxRuntime.jsx("div", { style: { height: heightContent, width: widthContent }, className: classNames$1('bs-stepper-content', { [contentWrapperClassName]: contentWrapperClassName }), children: renderContent() })] }));
65379
65379
  });
65380
65380
 
65381
65381
  const ImportExcelComponent = (props) => {
@@ -65406,6 +65406,323 @@ const ImportExcelComponent = (props) => {
65406
65406
  ] }) }));
65407
65407
  };
65408
65408
 
65409
+ const HeaderTableCol = (props) => {
65410
+ const { selectEnable, dataSource, setSelectedRows, col, indexCol, indexParent, objWidthFixLeft, objWidthFixRight, totalCount, selectedRows, columns, setColumns, orderBy, changeFilter, filterBy, changeOrder, allowFilter, allowOrder, container, fisrtObjWidthFixRight, lastObjWidthFixLeft, formatSetting, isMulti } = props;
65411
+ const { t } = reactI18next.useTranslation();
65412
+ const order = orderBy.find((item) => item.key === col.field);
65413
+ const [openFilter, setOpenFilter] = React$5.useState(false);
65414
+ const filter = filterBy.find((item) => item.key === col.field);
65415
+ const handleResize = (e, { size }) => {
65416
+ // Update the column width here
65417
+ // You might need to update the state or call a callback to update the width
65418
+ if (size.width > 50) {
65419
+ const newColumns = [...columns];
65420
+ newColumns[indexCol].width = size.width;
65421
+ if ((columns[indexCol]?.maxWidth ?? 0) < size.width) {
65422
+ newColumns[indexCol].maxWidth = size.width;
65423
+ }
65424
+ if ((columns[indexCol]?.minWidth ?? 0) > size.width) {
65425
+ newColumns[indexCol].minWidth = size.width;
65426
+ }
65427
+ if (setColumns) {
65428
+ setColumns(newColumns);
65429
+ }
65430
+ }
65431
+ };
65432
+ return (jsxRuntime.jsx(React$5.Fragment, { children: col.visible !== false && (jsxRuntime.jsx(Resizable, { className: "r-resize", width: typeof col.width === 'number' ? col.width : Number((col.width ?? "").replaceAll(new RegExp(`[^0-9]`, "g"), '')), height: 0, onResize: handleResize, draggableOpts: { enableUserSelectHack: false }, children: jsxRuntime.jsx("th", { rowSpan: col.rowspan !== 1 ? col.rowspan : 1, colSpan: col.columns?.filter(x => x.visible !== false)?.length ?? 1, className: classNames$1(`r-headercell fix-${col.fixedType}`, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'cell-fixed': col.fixedType }), style: {
65433
+ top: `${indexParent * 42}px`,
65434
+ left: col.fixedType === 'left' ? objWidthFixLeft[indexCol ?? 0] : undefined,
65435
+ right: col.fixedType === 'right' ? objWidthFixRight[indexCol ?? 0] : undefined
65436
+ }, children: jsxRuntime.jsxs("div", { style: { justifyContent: 'space-between' }, onClick: () => {
65437
+ if (order) {
65438
+ if (order.direction === 'asc') {
65439
+ order.direction = 'desc';
65440
+ changeOrder(orderBy);
65441
+ }
65442
+ else {
65443
+ changeOrder(orderBy.filter((x) => x.key !== col.field));
65444
+ }
65445
+ }
65446
+ else {
65447
+ orderBy.push({ direction: 'asc', key: col.field });
65448
+ changeOrder(orderBy);
65449
+ }
65450
+ }, className: classNames$1('r-headercell-div', { 'cursor-pointer': allowOrder }), children: [col.type === 'checkbox' && (jsxRuntime.jsx(Input$1, { checked: !!(totalCount > 0 && selectedRows?.length >= totalCount), type: "checkbox", className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: col.textAlign ?? 'left', marginTop: 6 }, onChange: (e) => {
65451
+ if (selectEnable) {
65452
+ if (e.target.checked) {
65453
+ setSelectedRows(dataSource.map((item) => { return item; }));
65454
+ }
65455
+ else {
65456
+ setSelectedRows([]);
65457
+ }
65458
+ }
65459
+ } })), col.type !== 'checkbox' && jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { className: 'header-content d-flex', style: { justifyContent: col.textAlign ?? 'left', flex: 1 }, children: t(col.headerText ?? '') }), col.type !== '#' && col.type !== 'command' && jsxRuntime.jsxs("div", { className: 'd-flex', children: [allowOrder && order?.direction === 'asc' && jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: 'ms-25', width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_6)", children: jsxRuntime.jsx("path", { d: "M8.70711 0.292893C8.31658 -0.0976311 7.68342 -0.0976311 7.29289 0.292893L0.928932 6.65685C0.538408 7.04738 0.538408 7.68054 0.928932 8.07107C1.31946 8.46159 1.95262 8.46159 2.34315 8.07107L8 2.41421L13.6569 8.07107C14.0474 8.46159 14.6805 8.46159 15.0711 8.07107C15.4616 7.68054 15.4616 7.04738 15.0711 6.65685L8.70711 0.292893ZM8 18H9L9 1H8H7L7 18H8Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_6", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] }), allowOrder && order?.direction === 'desc' && jsxRuntime.jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", className: 'ms-25', width: "10", height: "10", viewBox: "0 0 16 18", fill: "none", children: [jsxRuntime.jsx("g", { "clip-path": "url(#clip0_520_2)", children: jsxRuntime.jsx("path", { d: "M7.29289 17.7071C7.68342 18.0976 8.31658 18.0976 8.70711 17.7071L15.0711 11.3431C15.4616 10.9526 15.4616 10.3195 15.0711 9.92893C14.6805 9.53841 14.0474 9.53841 13.6569 9.92893L8 15.5858L2.34315 9.92893C1.95262 9.53841 1.31946 9.53841 0.928932 9.92893C0.538408 10.3195 0.538408 10.9526 0.928932 11.3431L7.29289 17.7071ZM8 0L7 0L7 17H8H9L9 0L8 0Z", fill: "black" }) }), jsxRuntime.jsx("defs", { children: jsxRuntime.jsx("clipPath", { id: "clip0_520_2", children: jsxRuntime.jsx("rect", { width: "16", height: "18", fill: "white" }) }) })] }), allowFilter && jsxRuntime.jsxs(Dropdown$1, { isOpen: openFilter, toggle: (e) => {
65460
+ setOpenFilter(!openFilter);
65461
+ e.stopPropagation();
65462
+ }, onClick: (e) => {
65463
+ e.stopPropagation();
65464
+ }, children: [jsxRuntime.jsx(DropdownToggle$1, { tag: 'div', className: 'p-0 r-filter', children: jsxRuntime.jsxs("svg", { className: classNames$1('ms-25', { 'active': filter }), width: "10", height: "10", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", "stroke-width": "1.5", "font-size": "12", children: [jsxRuntime.jsx("path", { d: "M14.7 11.998v10.506c.052.4-.08.826-.381 1.106a1.306 1.306 0 0 1-.925.39 1.289 1.289 0 0 1-.926-.39l-2.637-2.68a1.323 1.323 0 0 1-.38-1.106v-7.826h-.04L1.85 2.16A1.348 1.348 0 0 1 2.076.293C2.325.107 2.6 0 2.888 0h18.373c.289 0 .564.107.814.293a1.348 1.348 0 0 1 .223 1.866L14.738 12H14.7Z", fill: "currentColor" }), " "] }) }), jsxRuntime.jsx(DropdownMenu$1, { container: container, className: 'formula-dropdown icon-dropdown p-0', style: {
65465
+ borderRadius: 8,
65466
+ zIndex: 1056
65467
+ }, children: jsxRuntime.jsx(DropdownItem$1, { className: 'p-1', style: { borderRadius: '6px' }, tag: 'div', header: true, children: jsxRuntime.jsx(RenderFilterElement, { setOpenFilter: setOpenFilter, filter: filter, filterBy: filterBy, formatSetting: formatSetting, changeFilter: changeFilter, column: col }) }) })] })] })] })] }) }) })) }, `header-${indexCol}`));
65468
+ };
65469
+ const RenderFilterElement = ({ filter, formatSetting, filterBy, setOpenFilter, changeFilter, column }) => {
65470
+ const { t } = reactI18next.useTranslation();
65471
+ const [operator, setOperator] = React$5.useState(filter?.ope ?? 'contains');
65472
+ const [valueFilter, setValueFilter] = React$5.useState(filter?.value ?? '');
65473
+ const RenderStringFilter = () => {
65474
+ const options = [
65475
+ { label: 'Bắt đầu bởi', value: 'startswith' },
65476
+ { label: 'Kết thúc bởi', value: 'endswith' },
65477
+ { label: 'Chứa', value: 'contains' },
65478
+ { label: 'Bằng', value: 'equal' },
65479
+ { label: 'Không bằng', value: 'notequal' }
65480
+ ];
65481
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === (operator)), options: options, onChange: (val) => {
65482
+ setOperator(val.value);
65483
+ }, placeholder: 'Select' }), jsxRuntime.jsx(Input$1, { className: 'my-1', value: valueFilter, onChange: (val) => {
65484
+ setValueFilter(val.target.value);
65485
+ } })] }));
65486
+ };
65487
+ const RenderNumberFilter = () => {
65488
+ const options = [
65489
+ { label: 'Lớn hơn', value: 'greaterthan' },
65490
+ { label: 'Lớn hơn hoặc bằng', value: 'greaterthanorequal' },
65491
+ { label: 'Bằng', value: 'equal' },
65492
+ { label: 'Bé hơn', value: 'lessthan' },
65493
+ { label: 'Bé hơn hoặc bằng', value: 'lessthanorequal' }
65494
+ ];
65495
+ const numericFormatProps = {
65496
+ value: !isNullOrUndefined$1(valueFilter) ? valueFilter.toString() : '',
65497
+ thousandSeparator: checkThousandSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
65498
+ decimalSeparator: checkDecimalSeparator(formatSetting?.thousandSeparator, formatSetting?.decimalSeparator),
65499
+ allowNegative: column.numericSettings?.allowNegative ?? false,
65500
+ decimalScale: column.numericSettings?.fraction ?? 0
65501
+ };
65502
+ let floatValue = parseFloat(valueFilter ?? '0');
65503
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(SelectTable, { value: options.find((x) => x.value === (operator)), options: options, onChange: (val) => {
65504
+ setOperator(val.value);
65505
+ }, placeholder: 'Select' }), jsxRuntime.jsx(Input$1, { className: 'my-1', value: valueFilter, onChange: (val) => {
65506
+ setValueFilter(val.target.value);
65507
+ } }), jsxRuntime.jsx(NumericFormat, { style: { textAlign: column.textAlign, height: 29 }, ...numericFormatProps, defaultValue: formartNumberic(valueFilter, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', column.numericSettings?.fraction), className: classNames$1('form-control my-1 input-numeric'), onValueChange: (values) => {
65508
+ floatValue = values?.floatValue;
65509
+ }, onFocus: (e) => {
65510
+ e.target.setSelectionRange(0, e.target.innerText.length - 1);
65511
+ }, onBlur: () => {
65512
+ if (floatValue !== valueFilter) {
65513
+ setValueFilter(!isNaN(floatValue) ? floatValue : 0);
65514
+ }
65515
+ } })] }));
65516
+ };
65517
+ const RenderSelectFilter = () => {
65518
+ return (jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(SelectTable, { value: column.settingFilter?.options.find((x) => x.value === (operator)), options: column.settingFilter?.options ?? [], isClearable: true, onChange: (val) => {
65519
+ setOperator(val.value);
65520
+ }, placeholder: 'Select' }) }));
65521
+ };
65522
+ return (jsxRuntime.jsxs("div", { className: 'r-filter-popup', children: [((!column.settingFilter?.filterType && column.type === 'numeric') || column.settingFilter?.filterType === 'numeric') ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [RenderNumberFilter(), " "] }) : (column.settingFilter?.filterType === 'select' ? jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [RenderSelectFilter(), " "] }) : RenderStringFilter()), jsxRuntime.jsxs("div", { className: 'd-flex justify-content-end', children: [jsxRuntime.jsx(Button$1, { outline: true, color: 'primary', style: { borderRadius: 3 }, className: 'me-50 py-25 px-50', onClick: () => {
65523
+ if (filter) {
65524
+ filter.ope = operator;
65525
+ filter.value = valueFilter;
65526
+ }
65527
+ else {
65528
+ filterBy.push({ key: column.field, ope: operator, value: valueFilter });
65529
+ }
65530
+ changeFilter([...filterBy]);
65531
+ setOpenFilter(false);
65532
+ }, children: t('Filter') }), jsxRuntime.jsx(Button$1, { className: 'py-25 px-50', outline: true, style: { borderRadius: 3 }, onClick: () => {
65533
+ if (filterBy) {
65534
+ changeFilter(filterBy.filter((x) => x.key !== column.field));
65535
+ }
65536
+ setOpenFilter(false);
65537
+ }, children: t('Clear') })] })] }));
65538
+ };
65539
+
65540
+ const RenderContentCol = (props) => {
65541
+ const { col, indexCol, indexRow, isSelected, row, formatSetting, idTable, fisrtObjWidthFixRight, lastObjWidthFixLeft, objWidthFixLeft, objWidthFixRight, selectedRows, selectEnable, setSelectedRows, handleCommandClick, fieldKey, isMulti } = props;
65542
+ const RenderElement = () => {
65543
+ if (col.type === 'command') {
65544
+ return jsxRuntime.jsx("div", { className: "r-rowcell-div command", children: jsxRuntime.jsx(CommandElement, { commandItems: col.commandItems ?? [], handleCommandClick: handleCommandClick, indexRow: indexRow, rowData: row }) });
65545
+ }
65546
+ else if (col.type === '#') {
65547
+ jsxRuntime.jsx("div", { className: "r-rowcell-div", children: indexRow + 1 });
65548
+ }
65549
+ else if (col.type === 'checkbox') {
65550
+ return (jsxRuntime.jsx("div", { className: "r-rowcell-div cursor-pointer", style: { alignItems: 'center' }, onClick: (e) => {
65551
+ if (selectEnable) {
65552
+ const index = selectedRows?.findIndex((x) => x[fieldKey] === row[fieldKey]);
65553
+ if (index > -1) {
65554
+ if (isMulti) {
65555
+ selectedRows?.splice(index, 1);
65556
+ setSelectedRows([...selectedRows]);
65557
+ }
65558
+ else {
65559
+ setSelectedRows([]);
65560
+ }
65561
+ }
65562
+ else {
65563
+ if (isMulti) {
65564
+ setSelectedRows([...selectedRows, row]);
65565
+ }
65566
+ else {
65567
+ setSelectedRows([row]);
65568
+ }
65569
+ }
65570
+ e.stopPropagation();
65571
+ }
65572
+ }, children: jsxRuntime.jsx(Input$1, { checked: isSelected, type: "checkbox", className: "cursor-pointer", style: { textAlign: col.textAlign ?? 'center' } }) }));
65573
+ }
65574
+ else {
65575
+ let value = row[col.field];
65576
+ if (col.type === 'numeric') {
65577
+ value = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) ?? 0;
65578
+ }
65579
+ else if (col.type === 'date') {
65580
+ value = value ? formatDateTime(value, formatSetting?.dateFormat) : '';
65581
+ }
65582
+ else if (col.type === 'datetime') {
65583
+ value = value ? formatDateTime(value, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm') : '';
65584
+ }
65585
+ return (jsxRuntime.jsx("div", { className: classNames$1('r-rowcell-div'), children: jsxRuntime.jsxs("div", { className: classNames$1('r-rowcell-content'), style: {
65586
+ textAlign: col.textAlign ? col.textAlign : 'left'
65587
+ }, children: [jsxRuntime.jsx("div", { id: `content-${idTable}-row${indexRow}col-${indexCol}`, className: "r-cell-text", children: (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value) }), col.haveToolTip && jsxRuntime.jsx(UncontrolledTooltip, { className: "r-tooltip", autohide: false, target: `content-${idTable}-row${indexRow}col-${indexCol}`, children: (col.type === 'numeric' && Number(row[col.field]) < 0 ? jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : value) })] }) }));
65588
+ }
65589
+ };
65590
+ return (col.visible !== false && jsxRuntime.jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'fixed-last': (col.fixedType === 'left' && indexCol === lastObjWidthFixLeft) || (col.fixedType === 'right' && indexCol === fisrtObjWidthFixRight) }, { 'r-active': isSelected }), style: {
65591
+ left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
65592
+ right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined
65593
+ }, onClick: (e) => {
65594
+ if (e.target.nodeName === 'DIV' || e.target.nodeName === 'TD') {
65595
+ if (selectEnable) {
65596
+ const index = selectedRows?.findIndex((x) => x[fieldKey] === row[fieldKey]);
65597
+ if (index > -1) {
65598
+ if (isMulti) {
65599
+ selectedRows?.splice(index, 1);
65600
+ setSelectedRows([...selectedRows]);
65601
+ }
65602
+ else {
65603
+ setSelectedRows([]);
65604
+ }
65605
+ }
65606
+ else {
65607
+ if (isMulti) {
65608
+ setSelectedRows([...selectedRows, row]);
65609
+ }
65610
+ else {
65611
+ setSelectedRows([row]);
65612
+ }
65613
+ }
65614
+ }
65615
+ e.stopPropagation();
65616
+ }
65617
+ }, children: RenderElement() }, `col-${indexRow}-${indexCol}`));
65618
+ };
65619
+
65620
+ const RenderColGroup = ({ contentColumns }) => (jsxRuntime.jsx("colgroup", { children: contentColumns.map((col, index) => (jsxRuntime.jsx("col", { style: {
65621
+ width: typeof col.width === 'number' ? `${col.width}px` : col.width || undefined,
65622
+ minWidth: typeof col.minWidth === 'number' ? `${col.minWidth}px` : col.minWidth || undefined,
65623
+ maxWidth: typeof col.maxWidth === 'number' ? `${col.maxWidth}px` : col.maxWidth || undefined
65624
+ } }, index))) }));
65625
+
65626
+ const SkeletonRow = ({ columns, rowHeight }) => (jsxRuntime.jsx("tr", { style: { height: rowHeight }, className: "animate-pulse", children: Array.from({ length: columns }).map((_, colIndex) => (jsxRuntime.jsx("td", { style: { padding: '8px' }, children: jsxRuntime.jsx("div", { style: { height: 12, background: '#e0e0e0', borderRadius: 4 } }) }, colIndex))) }));
65627
+
65628
+ const VirtualTable = ({ idTable, dataSource, rowHeight = 28, height = 400, columns, isMutil, isLoading, selectEnable, formatSetting, commandClick, allowFilter, allowOrder, setColumns, pagingSetting, changeFilter, changeOrder, searchSetting, columnsAggregate, toolbarSetting }) => {
65629
+ const gridRef = React$5.useRef(null);
65630
+ const [startIndex, setStartIndex] = React$5.useState(0);
65631
+ const [selectedRows, setSelectedRows] = React$5.useState([]);
65632
+ const [orderBy, setOrderBy] = React$5.useState([]);
65633
+ const [filterBy, setFilterBy] = React$5.useState([]);
65634
+ const [searchTerm, setSearchTerm] = React$5.useState('');
65635
+ const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ?? 'id';
65636
+ const visibleRowCount = Math.ceil(height / rowHeight) + 5;
65637
+ const countLoading = 10;
65638
+ const { t } = reactI18next.useTranslation();
65639
+ const { levels: headerColumns, flat: contentColumns, flatVisble, objWidthFixLeft, objWidthFixRight, lastObjWidthFixLeft, fisrtObjWidthFixRight } = React$5.useMemo(() => calculateTableStructure(columns), [columns]);
65640
+ const handleScroll = () => {
65641
+ if (gridRef.current) {
65642
+ const scrollTop = gridRef.current.scrollTop;
65643
+ const newStartIndex = Math.floor(scrollTop / rowHeight);
65644
+ if (newStartIndex !== startIndex) {
65645
+ setStartIndex(newStartIndex);
65646
+ }
65647
+ }
65648
+ };
65649
+ const visibleData = dataSource.slice(startIndex, Math.min(startIndex + visibleRowCount, dataSource.length));
65650
+ const handleCommandClick = (id, rowData, index) => {
65651
+ if (commandClick) {
65652
+ commandClick({ id, rowData, index });
65653
+ }
65654
+ };
65655
+ const handleKeyPress = (e) => {
65656
+ if ((e.code === 'Enter' || e.code === 'NumpadEnter')) {
65657
+ if (searchSetting?.setSearchTerm) {
65658
+ searchSetting?.setSearchTerm(e.target.value);
65659
+ }
65660
+ else {
65661
+ setSearchTerm(e.target.value);
65662
+ }
65663
+ e.stopPropagation();
65664
+ e.preventDefault();
65665
+ }
65666
+ };
65667
+ const searchTemplate = () => {
65668
+ return (jsxRuntime.jsx("div", { className: "me-50 r-search", children: jsxRuntime.jsx(ReactInput, { style: { width: '230px' }, value: searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, setSearchTerm: searchSetting?.setSearchTerm ? searchSetting?.setSearchTerm : setSearchTerm, placeholder: t('Search'), onKeyPress: handleKeyPress }) }));
65669
+ };
65670
+ const defaultToolbarOption = searchSetting?.searchEnable ? [{ template: searchTemplate, align: 'left' }] : [];
65671
+ let toolbarTopOption = [];
65672
+ if (toolbarSetting?.toolbarOptions) {
65673
+ toolbarTopOption = [...defaultToolbarOption, ...toolbarSetting?.toolbarOptions];
65674
+ }
65675
+ else {
65676
+ toolbarTopOption = [...defaultToolbarOption];
65677
+ }
65678
+ const onChangePage = (args) => {
65679
+ if (pagingSetting?.setCurrentPage) {
65680
+ if (args.currentPage === args.oldPage) {
65681
+ return;
65682
+ }
65683
+ pagingSetting.setCurrentPage(args.currentPage);
65684
+ }
65685
+ };
65686
+ const onChangePageSize = (args) => {
65687
+ if (pagingSetting?.allowPaging) {
65688
+ if (pagingSetting?.pageSize !== args.pageSize) {
65689
+ if (pagingSetting?.setPageSize) {
65690
+ pagingSetting.setPageSize(args.pageSize);
65691
+ }
65692
+ if (pagingSetting?.setCurrentPage) {
65693
+ pagingSetting.setCurrentPage(1);
65694
+ }
65695
+ }
65696
+ }
65697
+ };
65698
+ return (jsxRuntime.jsxs("div", { className: "react-table-edit", children: [jsxRuntime.jsxs("div", { className: 'r-grid', children: [toolbarSetting?.showTopToolbar && jsxRuntime.jsx(RenderToolbarTop, { toolbarTopOption: toolbarTopOption }), jsxRuntime.jsx("div", { ref: gridRef, className: "r-gridtable", onScroll: handleScroll, style: { height: `${height ? `${height}px` : 'auto'}` }, children: jsxRuntime.jsxs("table", { style: { width: '100%' }, children: [jsxRuntime.jsx(RenderColGroup, { contentColumns: flatVisble }), jsxRuntime.jsx("thead", { className: 'r-gridheader', children: headerColumns.map((rowColumn, indexParent) => (jsxRuntime.jsx("tr", { className: "r-row", role: "row", children: rowColumn.map((column, indexColumn) => (jsxRuntime.jsx(HeaderTableCol, { col: column, dataSource: dataSource, indexCol: indexColumn, indexParent: indexParent, isMulti: isMutil ?? false, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, columns: contentColumns, setColumns: setColumns, objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, orderBy: orderBy, allowFilter: allowFilter, allowOrder: allowOrder, filterBy: filterBy, changeFilter: (val) => {
65699
+ setFilterBy([...val]);
65700
+ if (changeFilter) {
65701
+ changeFilter(val);
65702
+ }
65703
+ }, changeOrder: (val) => {
65704
+ setOrderBy([...val]);
65705
+ if (changeOrder) {
65706
+ changeOrder(val);
65707
+ }
65708
+ }, container: gridRef, totalCount: dataSource.length }, `header-${indexParent}-${indexColumn}`))) }, indexParent))) }), (((dataSource.length ?? 0) === 0) && !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...')] }), jsxRuntime.jsxs("tbody", { className: 'r-gridcontent', children: [jsxRuntime.jsx("tr", { style: { height: (startIndex < countLoading ? startIndex : startIndex - countLoading) * rowHeight }, children: jsxRuntime.jsx("td", { style: { padding: 0 }, colSpan: flatVisble.length }) }), startIndex > countLoading && Array.from({ length: countLoading }).map((_, index) => (jsxRuntime.jsx(SkeletonRow, { columns: flatVisble.length, rowHeight: rowHeight }, `top-${index}`))), visibleData.map((row, index) => {
65709
+ const indexRow = index + startIndex;
65710
+ const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
65711
+ return (jsxRuntime.jsx("tr", { className: classNames$1('r-row'), children: contentColumns.map((column, indexCol) => (jsxRuntime.jsx(RenderContentCol, { idTable: idTable, col: column, fieldKey: 'field', objWidthFixLeft: objWidthFixLeft, objWidthFixRight: objWidthFixRight, fisrtObjWidthFixRight: fisrtObjWidthFixRight, lastObjWidthFixLeft: lastObjWidthFixLeft, isMulti: isMutil ?? false, selectEnable: selectEnable ?? false, selectedRows: selectedRows, setSelectedRows: setSelectedRows, formatSetting: formatSetting, handleCommandClick: handleCommandClick, indexCol: indexCol, indexRow: indexRow, isSelected: isSelected, row: row }, indexCol))) }, `row-${indexRow}`));
65712
+ }), jsxRuntime.jsx("tr", { style: { height: (dataSource.length - (startIndex + visibleData.length)) * rowHeight }, children: jsxRuntime.jsx("td", { style: { padding: 0 }, colSpan: flatVisble.length }) })] }), jsxRuntime.jsx("tfoot", { className: "r-gridfoot", children: (columnsAggregate?.length ?? 0) > 0 ? jsxRuntime.jsx("tr", { className: 'r-row', children: contentColumns.map((col, indexCol) => {
65713
+ const item = columnsAggregate?.find((x) => x.field === col.field);
65714
+ let sumValue = item?.value;
65715
+ if (!item && col.haveSum === true && col.type === "numeric") {
65716
+ sumValue = dataSource.reduce(function (accumulator, currentValue) { return (Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0)); }, 0);
65717
+ }
65718
+ return col.visible !== false && jsxRuntime.jsx("td", { className: classNames$1(`p-0 px-50 r-footer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
65719
+ left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
65720
+ right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
65721
+ textAlign: col.textAlign ? col.textAlign : 'left'
65722
+ }, children: jsxRuntime.jsxs("div", { className: "r-footer-div", children: [(item || (col.haveSum === true && col.type === "numeric")) && col.type === "numeric" && (Number(sumValue) >= 0) && jsxRuntime.jsx(jsxRuntime.Fragment, { children: formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false) }), (item || (col.haveSum === true && col.type === "numeric")) && col.type === "numeric" && (Number(sumValue) < 0) && jsxRuntime.jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${formartNumberic(sumValue, formatSetting?.decimalSeparator ?? ',', formatSetting?.thousandSeparator ?? '.', col.numericSettings?.fraction, true, false)}${formatSetting?.suffixNegative ?? ''}`] })] }) }, `summarycell-${indexCol}`);
65723
+ }) }) : jsxRuntime.jsx(jsxRuntime.Fragment, {}) })] }) })] }), pagingSetting?.allowPaging ? jsxRuntime.jsx(PagingComponent, { onChangePage: onChangePage, pageSize: pagingSetting?.pageSize ?? 0, currentPage: pagingSetting?.currentPage ?? 0, pageOptions: pagingSetting?.pageOptions ?? [20, 30, 50, 100], totalItem: (pagingSetting?.totalItem ?? 0), onChangePageSize: onChangePageSize }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})] }));
65724
+ };
65725
+
65409
65726
  exports.ExportExcelComponent = ExportExcelComponent;
65410
65727
  exports.FindNodeByPath = FindNodeByPath;
65411
65728
  exports.ImportExcelComponent = ImportExcelComponent;
@@ -65413,6 +65730,7 @@ exports.InputStyleComponent = InputStyleComponent;
65413
65730
  exports.SelectTable = SelectTable;
65414
65731
  exports.SelectTableTree = SelectTableTree;
65415
65732
  exports.TabsMenuComponent = TabsMenuComponent;
65733
+ exports.VirtualTable = VirtualTable;
65416
65734
  exports.Wizard = Wizard;
65417
65735
  exports.calculateTableStructure = calculateTableStructure;
65418
65736
  exports.checkDecimalSeparator = checkDecimalSeparator;