react-table-edit 1.4.17 → 1.4.19

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.mjs CHANGED
@@ -1130,7 +1130,7 @@ if (process.env.NODE_ENV !== 'production') {
1130
1130
 
1131
1131
  var PropTypes = propTypes$1.exports;
1132
1132
 
1133
- var classnames$2 = {exports: {}};
1133
+ var classnames$1 = {exports: {}};
1134
1134
 
1135
1135
  /*!
1136
1136
  Copyright (c) 2018 Jed Watson.
@@ -1205,9 +1205,9 @@ var classnames$2 = {exports: {}};
1205
1205
  window.classNames = classNames;
1206
1206
  }
1207
1207
  }());
1208
- }(classnames$2));
1208
+ }(classnames$1));
1209
1209
 
1210
- var classNames$1 = classnames$2.exports;
1210
+ var classNames$2 = classnames$1.exports;
1211
1211
 
1212
1212
  var ManagerReferenceNodeContext = React$5.createContext();
1213
1213
  var ManagerReferenceNodeSetterContext = React$5.createContext();
@@ -4559,7 +4559,7 @@ const Row = props => {
4559
4559
  const isXs = !i;
4560
4560
  colClasses.push(isXs ? `row-cols-${colSize}` : `row-cols-${colWidth}-${colSize}`);
4561
4561
  });
4562
- const classes = mapToCssModules(classNames$1(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
4562
+ const classes = mapToCssModules(classNames$2(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
4563
4563
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
4564
4564
  className: classes
4565
4565
  }));
@@ -4619,7 +4619,7 @@ const getColumnClasses = (attributes, cssModule, widths = colWidths$1) => {
4619
4619
  if (isObject$1(columnProp)) {
4620
4620
  const colSizeInterfix = isXs ? '-' : `-${colWidth}-`;
4621
4621
  const colClass = getColumnSizeClass$1(isXs, colWidth, columnProp.size);
4622
- colClasses.push(mapToCssModules(classNames$1({
4622
+ colClasses.push(mapToCssModules(classNames$2({
4623
4623
  [colClass]: columnProp.size || columnProp.size === '',
4624
4624
  [`order${colSizeInterfix}${columnProp.order}`]: columnProp.order || columnProp.order === 0,
4625
4625
  [`offset${colSizeInterfix}${columnProp.offset}`]: columnProp.offset || columnProp.offset === 0
@@ -4653,7 +4653,7 @@ const Col = props => {
4653
4653
  colClasses.push('col');
4654
4654
  }
4655
4655
 
4656
- const classes = mapToCssModules(classNames$1(className, colClasses), cssModule);
4656
+ const classes = mapToCssModules(classNames$2(className, colClasses), cssModule);
4657
4657
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, modifiedAttributes, {
4658
4658
  className: classes
4659
4659
  }));
@@ -4761,7 +4761,7 @@ class NavLink extends React__default.Component {
4761
4761
  } = _this$props,
4762
4762
  attributes = _objectWithoutProperties$1(_this$props, _excluded$15);
4763
4763
 
4764
- const classes = mapToCssModules(classNames$1(className, 'nav-link', {
4764
+ const classes = mapToCssModules(classNames$2(className, 'nav-link', {
4765
4765
  disabled: attributes.disabled,
4766
4766
  active: active
4767
4767
  }), cssModule);
@@ -4849,7 +4849,7 @@ class Button extends React__default.Component {
4849
4849
  attributes = _objectWithoutProperties$1(_this$props, _excluded$12);
4850
4850
 
4851
4851
  const btnOutlineColor = `btn${outline ? '-outline' : ''}-${color}`;
4852
- const classes = mapToCssModules(classNames$1(className, close && 'btn-close', close || 'btn', close || btnOutlineColor, size ? `btn-${size}` : false, block ? 'd-block w-100' : false, {
4852
+ const classes = mapToCssModules(classNames$2(className, close && 'btn-close', close || 'btn', close || btnOutlineColor, size ? `btn-${size}` : false, block ? 'd-block w-100' : false, {
4853
4853
  active,
4854
4854
  disabled: this.props.disabled
4855
4855
  }), cssModule);
@@ -4937,7 +4937,7 @@ class ButtonToggle extends React__default.Component {
4937
4937
  } = _this$props,
4938
4938
  attributes = _objectWithoutProperties$1(_this$props, _excluded$11);
4939
4939
 
4940
- const classes = mapToCssModules(classNames$1(className, {
4940
+ const classes = mapToCssModules(classNames$2(className, {
4941
4941
  focus: this.state.focus
4942
4942
  }), this.props.cssModule);
4943
4943
  return /*#__PURE__*/React__default.createElement(Button$1, _extends$5({
@@ -5211,7 +5211,7 @@ class Dropdown extends React__default.Component {
5211
5211
  });
5212
5212
  }
5213
5213
 
5214
- const classes = mapToCssModules(classNames$1(className, nav && active ? 'active' : false, setActiveFromChild && subItemIsActive ? 'active' : false, {
5214
+ const classes = mapToCssModules(classNames$2(className, nav && active ? 'active' : false, setActiveFromChild && subItemIsActive ? 'active' : false, {
5215
5215
  'btn-group': group,
5216
5216
  [`btn-group-${size}`]: !!size,
5217
5217
  dropdown: !group,
@@ -5352,7 +5352,7 @@ class DropdownItem extends React__default.Component {
5352
5352
  } = _omit,
5353
5353
  props = _objectWithoutProperties$1(_omit, _excluded$Z);
5354
5354
 
5355
- const classes = mapToCssModules(classNames$1(className, {
5355
+ const classes = mapToCssModules(classNames$2(className, {
5356
5356
  disabled: props.disabled,
5357
5357
  'dropdown-item': !divider && !header && !text,
5358
5358
  active: active,
@@ -5445,7 +5445,7 @@ class DropdownMenu extends React__default.Component {
5445
5445
  } = _this$props,
5446
5446
  attrs = _objectWithoutProperties$1(_this$props, _excluded$Y);
5447
5447
 
5448
- const classes = mapToCssModules(classNames$1(className, 'dropdown-menu', {
5448
+ const classes = mapToCssModules(classNames$2(className, 'dropdown-menu', {
5449
5449
  'dropdown-menu-dark': dark,
5450
5450
  'dropdown-menu-end': end || right,
5451
5451
  show: this.context.isOpen
@@ -5578,7 +5578,7 @@ class DropdownToggle extends React__default.Component {
5578
5578
  props = _objectWithoutProperties$1(_this$props, _excluded$X);
5579
5579
 
5580
5580
  const ariaLabel = props['aria-label'] || 'Toggle Dropdown';
5581
- const classes = mapToCssModules(classNames$1(className, {
5581
+ const classes = mapToCssModules(classNames$2(className, {
5582
5582
  'dropdown-toggle': caret || split,
5583
5583
  'dropdown-toggle-split': split,
5584
5584
  'nav-link': nav
@@ -5669,7 +5669,7 @@ function Fade(props) {
5669
5669
  const childProps = omit(otherProps, TransitionPropTypeKeys);
5670
5670
  return /*#__PURE__*/React__default.createElement(Transition$1, transitionProps, status => {
5671
5671
  const isActive = status === 'entered';
5672
- const classes = mapToCssModules(classNames$1(className, baseClass, isActive && baseClassActive), cssModule);
5672
+ const classes = mapToCssModules(classNames$2(className, baseClass, isActive && baseClassActive), cssModule);
5673
5673
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
5674
5674
  className: classes
5675
5675
  }, childProps, {
@@ -5841,7 +5841,7 @@ class Collapse extends Component {
5841
5841
  onExited: this.onExited
5842
5842
  }), status => {
5843
5843
  let collapseClass = getTransitionClass(status);
5844
- const classes = mapToCssModules(classNames$1(className, horizontal && 'collapse-horizontal', collapseClass, navbar && 'navbar-collapse'), cssModule);
5844
+ const classes = mapToCssModules(classNames$2(className, horizontal && 'collapse-horizontal', collapseClass, navbar && 'navbar-collapse'), cssModule);
5845
5845
  const style = dimension === null ? null : {
5846
5846
  [horizontal ? 'width' : 'height']: dimension
5847
5847
  };
@@ -5894,7 +5894,7 @@ const Badge = props => {
5894
5894
  } = props,
5895
5895
  attributes = _objectWithoutProperties$1(props, _excluded$P);
5896
5896
 
5897
- const classes = mapToCssModules(classNames$1(className, 'badge', 'bg-' + color, pill ? 'rounded-pill' : false), cssModule);
5897
+ const classes = mapToCssModules(classNames$2(className, 'badge', 'bg-' + color, pill ? 'rounded-pill' : false), cssModule);
5898
5898
 
5899
5899
  if (attributes.href && Tag === 'span') {
5900
5900
  Tag = 'a';
@@ -6049,7 +6049,7 @@ class CarouselItem extends React__default.Component {
6049
6049
  const isActive = status === TransitionStatuses.ENTERED || status === TransitionStatuses.EXITING;
6050
6050
  const directionClassName = (status === TransitionStatuses.ENTERING || status === TransitionStatuses.EXITING) && this.state.startAnimation && (direction === 'end' ? 'carousel-item-start' : 'carousel-item-end');
6051
6051
  const orderClassName = status === TransitionStatuses.ENTERING && (direction === 'end' ? 'carousel-item-next' : 'carousel-item-prev');
6052
- const itemClasses = mapToCssModules(classNames$1(className, 'carousel-item', isActive && 'active', directionClassName, orderClassName), cssModule);
6052
+ const itemClasses = mapToCssModules(classNames$2(className, 'carousel-item', isActive && 'active', directionClassName, orderClassName), cssModule);
6053
6053
  return /*#__PURE__*/React__default.createElement(Tag, {
6054
6054
  className: itemClasses
6055
6055
  }, children);
@@ -6263,8 +6263,8 @@ class Carousel extends React__default.Component {
6263
6263
  dark,
6264
6264
  fade
6265
6265
  } = this.props;
6266
- const outerClasses = mapToCssModules(classNames$1(className, 'carousel', fade, slide && 'slide', dark && 'carousel-dark'), cssModule);
6267
- const innerClasses = mapToCssModules(classNames$1('carousel-inner'), cssModule); // filter out booleans, null, or undefined
6266
+ const outerClasses = mapToCssModules(classNames$2(className, 'carousel', fade, slide && 'slide', dark && 'carousel-dark'), cssModule);
6267
+ const innerClasses = mapToCssModules(classNames$2('carousel-inner'), cssModule); // filter out booleans, null, or undefined
6268
6268
 
6269
6269
  const children = this.props.children.filter(child => child !== null && child !== undefined && typeof child !== 'boolean');
6270
6270
  const slidesOnly = children.every(child => child.type === CarouselItem$1); // Rendering only slides
@@ -6377,9 +6377,9 @@ const CarouselControl = props => {
6377
6377
  directionText,
6378
6378
  className
6379
6379
  } = props;
6380
- const anchorClasses = mapToCssModules(classNames$1(className, `carousel-control-${direction}`), cssModule);
6381
- const iconClasses = mapToCssModules(classNames$1(`carousel-control-${direction}-icon`), cssModule);
6382
- const screenReaderClasses = mapToCssModules(classNames$1('visually-hidden'), cssModule);
6380
+ const anchorClasses = mapToCssModules(classNames$2(className, `carousel-control-${direction}`), cssModule);
6381
+ const iconClasses = mapToCssModules(classNames$2(`carousel-control-${direction}-icon`), cssModule);
6382
+ const screenReaderClasses = mapToCssModules(classNames$2('visually-hidden'), cssModule);
6383
6383
  return (
6384
6384
  /*#__PURE__*/
6385
6385
  // We need to disable this linting rule to use an `<a>` instead of
@@ -6423,9 +6423,9 @@ const CarouselIndicators = props => {
6423
6423
  onClickHandler,
6424
6424
  className
6425
6425
  } = props;
6426
- const listClasses = mapToCssModules(classNames$1(className, 'carousel-indicators'), cssModule);
6426
+ const listClasses = mapToCssModules(classNames$2(className, 'carousel-indicators'), cssModule);
6427
6427
  const indicators = items.map((item, idx) => {
6428
- const indicatorClasses = mapToCssModules(classNames$1({
6428
+ const indicatorClasses = mapToCssModules(classNames$2({
6429
6429
  active: activeIndex === idx
6430
6430
  }), cssModule);
6431
6431
  return /*#__PURE__*/React__default.createElement("button", {
@@ -6460,7 +6460,7 @@ const CarouselCaption = props => {
6460
6460
  cssModule,
6461
6461
  className
6462
6462
  } = props;
6463
- const classes = mapToCssModules(classNames$1(className, 'carousel-caption', 'd-none', 'd-md-block'), cssModule);
6463
+ const classes = mapToCssModules(classNames$2(className, 'carousel-caption', 'd-none', 'd-md-block'), cssModule);
6464
6464
  return /*#__PURE__*/React__default.createElement("div", {
6465
6465
  className: classes
6466
6466
  }, /*#__PURE__*/React__default.createElement("h3", null, captionHeader), /*#__PURE__*/React__default.createElement("p", null, captionText));
@@ -6721,8 +6721,8 @@ class PopperContent extends React__default.Component {
6721
6721
  } = _this$props,
6722
6722
  attrs = _objectWithoutProperties$1(_this$props, _excluded$z);
6723
6723
 
6724
- const arrowClassName = mapToCssModules(classNames$1('arrow', _arrowClassName), cssModule);
6725
- const popperClassName = mapToCssModules(classNames$1(_popperClassName, placementPrefix ? `${placementPrefix}-auto` : ''), this.props.cssModule);
6724
+ const arrowClassName = mapToCssModules(classNames$2('arrow', _arrowClassName), cssModule);
6725
+ const popperClassName = mapToCssModules(classNames$2(_popperClassName, placementPrefix ? `${placementPrefix}-auto` : ''), this.props.cssModule);
6726
6726
  const modifierNames = modifiers.map(m => m.name);
6727
6727
  const baseModifiers = [{
6728
6728
  name: 'offset',
@@ -7186,8 +7186,8 @@ const defaultProps$D = {
7186
7186
  };
7187
7187
 
7188
7188
  const Popover = props => {
7189
- const popperClasses = classNames$1('popover', 'show', props.popperClassName);
7190
- const classes = classNames$1('popover-inner', props.innerClassName);
7189
+ const popperClasses = classNames$2('popover', 'show', props.popperClassName);
7190
+ const classes = classNames$2('popover-inner', props.innerClassName);
7191
7191
  return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
7192
7192
  arrowClassName: "popover-arrow",
7193
7193
  popperClassName: popperClasses,
@@ -7612,7 +7612,7 @@ class Modal extends React__default.Component {
7612
7612
  conditionallyUpdateScrollbar();
7613
7613
 
7614
7614
  if (Modal.openCount === 0) {
7615
- document.body.className = classNames$1(document.body.className, mapToCssModules('modal-open', this.props.cssModule));
7615
+ document.body.className = classNames$2(document.body.className, mapToCssModules('modal-open', this.props.cssModule));
7616
7616
  }
7617
7617
 
7618
7618
  this.modalIndex = Modal.openCount;
@@ -7656,7 +7656,7 @@ class Modal extends React__default.Component {
7656
7656
  const attributes = omit(this.props, propsToOmit$1);
7657
7657
  const dialogBaseClass = 'modal-dialog';
7658
7658
  return /*#__PURE__*/React__default.createElement("div", _extends$5({}, attributes, {
7659
- className: mapToCssModules(classNames$1(dialogBaseClass, this.props.className, {
7659
+ className: mapToCssModules(classNames$2(dialogBaseClass, this.props.className, {
7660
7660
  [`modal-${this.props.size}`]: this.props.size,
7661
7661
  [`${dialogBaseClass}-centered`]: this.props.centered,
7662
7662
  [`${dialogBaseClass}-scrollable`]: this.props.scrollable,
@@ -7668,7 +7668,7 @@ class Modal extends React__default.Component {
7668
7668
  this._dialog = c;
7669
7669
  }
7670
7670
  }), /*#__PURE__*/React__default.createElement("div", {
7671
- className: mapToCssModules(classNames$1('modal-content', this.props.contentClassName), this.props.cssModule)
7671
+ className: mapToCssModules(classNames$2('modal-content', this.props.contentClassName), this.props.cssModule)
7672
7672
  }, this.props.children));
7673
7673
  }
7674
7674
 
@@ -7719,9 +7719,9 @@ class Modal extends React__default.Component {
7719
7719
  const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$5({}, backdropTransition, {
7720
7720
  in: isOpen && !!backdrop,
7721
7721
  cssModule: cssModule,
7722
- className: mapToCssModules(classNames$1('modal-backdrop', backdropClassName), cssModule)
7722
+ className: mapToCssModules(classNames$2('modal-backdrop', backdropClassName), cssModule)
7723
7723
  })) : /*#__PURE__*/React__default.createElement("div", {
7724
- className: mapToCssModules(classNames$1('modal-backdrop', 'show', backdropClassName), cssModule)
7724
+ className: mapToCssModules(classNames$2('modal-backdrop', 'show', backdropClassName), cssModule)
7725
7725
  }));
7726
7726
  return /*#__PURE__*/React__default.createElement(Portal$1$1, {
7727
7727
  node: this._element
@@ -7732,7 +7732,7 @@ class Modal extends React__default.Component {
7732
7732
  onEntered: this.onOpened,
7733
7733
  onExited: this.onClosed,
7734
7734
  cssModule: cssModule,
7735
- className: mapToCssModules(classNames$1('modal', modalClassName, this.state.showStaticBackdropAnimation && 'modal-static'), cssModule),
7735
+ className: mapToCssModules(classNames$2('modal', modalClassName, this.state.showStaticBackdropAnimation && 'modal-static'), cssModule),
7736
7736
  innerRef: innerRef
7737
7737
  }), external, this.renderModalDialog()), Backdrop));
7738
7738
  }
@@ -7781,7 +7781,7 @@ const ModalBody = props => {
7781
7781
  } = props,
7782
7782
  attributes = _objectWithoutProperties$1(props, _excluded$u);
7783
7783
 
7784
- const classes = mapToCssModules(classNames$1(className, 'modal-body'), cssModule);
7784
+ const classes = mapToCssModules(classNames$2(className, 'modal-body'), cssModule);
7785
7785
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
7786
7786
  className: classes
7787
7787
  }));
@@ -7804,8 +7804,8 @@ const defaultProps$v = {
7804
7804
  };
7805
7805
 
7806
7806
  const Tooltip = props => {
7807
- const popperClasses = classNames$1('tooltip', 'show', props.popperClassName);
7808
- const classes = classNames$1('tooltip-inner', props.innerClassName);
7807
+ const popperClasses = classNames$2('tooltip', 'show', props.popperClassName);
7808
+ const classes = classNames$2('tooltip-inner', props.innerClassName);
7809
7809
  return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
7810
7810
  arrowClassName: "tooltip-arrow",
7811
7811
  popperClassName: popperClasses,
@@ -7884,7 +7884,7 @@ class Form extends Component {
7884
7884
  } = _this$props,
7885
7885
  attributes = _objectWithoutProperties$1(_this$props, _excluded$q);
7886
7886
 
7887
- const classes = mapToCssModules(classNames$1(className, inline ? 'form-inline' : false), cssModule);
7887
+ const classes = mapToCssModules(classNames$2(className, inline ? 'form-inline' : false), cssModule);
7888
7888
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
7889
7889
  ref: innerRef,
7890
7890
  className: classes
@@ -7921,7 +7921,7 @@ const FormFeedback = props => {
7921
7921
  attributes = _objectWithoutProperties$1(props, _excluded$p);
7922
7922
 
7923
7923
  const validMode = tooltip ? 'tooltip' : 'feedback';
7924
- const classes = mapToCssModules(classNames$1(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
7924
+ const classes = mapToCssModules(classNames$2(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
7925
7925
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
7926
7926
  className: classes
7927
7927
  }));
@@ -8036,7 +8036,7 @@ class Input extends React__default.Component {
8036
8036
  delete attributes.size;
8037
8037
  }
8038
8038
 
8039
- const classes = mapToCssModules(classNames$1(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? selectInput ? `form-select-${bsSize}` : `form-control-${bsSize}` : false, formControlClass), cssModule);
8039
+ const classes = mapToCssModules(classNames$2(className, invalid && 'is-invalid', valid && 'is-valid', bsSize ? selectInput ? `form-select-${bsSize}` : `form-control-${bsSize}` : false, formControlClass), cssModule);
8040
8040
 
8041
8041
  if (Tag === 'input' || tag && typeof tag === 'function') {
8042
8042
  attributes.type = type === 'switch' ? 'checkbox' : type;
@@ -8140,7 +8140,7 @@ const Label = props => {
8140
8140
  if (isObject$1(columnProp)) {
8141
8141
  const colSizeInterfix = isXs ? '-' : `-${colWidth}-`;
8142
8142
  colClass = getColumnSizeClass(isXs, colWidth, columnProp.size);
8143
- colClasses.push(mapToCssModules(classNames$1({
8143
+ colClasses.push(mapToCssModules(classNames$2({
8144
8144
  [colClass]: columnProp.size || columnProp.size === '',
8145
8145
  [`order${colSizeInterfix}${columnProp.order}`]: columnProp.order || columnProp.order === 0,
8146
8146
  [`offset${colSizeInterfix}${columnProp.offset}`]: columnProp.offset || columnProp.offset === 0
@@ -8150,7 +8150,7 @@ const Label = props => {
8150
8150
  colClasses.push(colClass);
8151
8151
  }
8152
8152
  });
8153
- 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);
8153
+ 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);
8154
8154
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
8155
8155
  htmlFor: htmlFor
8156
8156
  }, attributes, {
@@ -8549,11 +8549,11 @@ class Offcanvas extends React__default.Component {
8549
8549
  this._backdrop = c;
8550
8550
  },
8551
8551
  cssModule: cssModule,
8552
- className: mapToCssModules(classNames$1('offcanvas-backdrop', backdropClassName), cssModule),
8552
+ className: mapToCssModules(classNames$2('offcanvas-backdrop', backdropClassName), cssModule),
8553
8553
  onClick: this.handleBackdropClick,
8554
8554
  onMouseDown: this.handleBackdropMouseDown
8555
8555
  })) : /*#__PURE__*/React__default.createElement("div", {
8556
- className: mapToCssModules(classNames$1('offcanvas-backdrop', 'show', backdropClassName), cssModule),
8556
+ className: mapToCssModules(classNames$2('offcanvas-backdrop', 'show', backdropClassName), cssModule),
8557
8557
  onClick: this.handleBackdropClick,
8558
8558
  onMouseDown: this.handleBackdropMouseDown
8559
8559
  }));
@@ -8565,7 +8565,7 @@ class Offcanvas extends React__default.Component {
8565
8565
  onEntered: this.onOpened,
8566
8566
  onExited: this.onClosed,
8567
8567
  cssModule: cssModule,
8568
- className: mapToCssModules(classNames$1('offcanvas', className, `offcanvas-${direction}`), cssModule),
8568
+ className: mapToCssModules(classNames$2('offcanvas', className, `offcanvas-${direction}`), cssModule),
8569
8569
  innerRef: c => {
8570
8570
  this._dialog = c;
8571
8571
  },
@@ -8679,7 +8679,7 @@ class TabContent extends Component {
8679
8679
  tag: Tag
8680
8680
  } = this.props;
8681
8681
  const attributes = omit(this.props, Object.keys(propTypes$e));
8682
- const classes = mapToCssModules(classNames$1('tab-content', className), cssModule);
8682
+ const classes = mapToCssModules(classNames$2('tab-content', className), cssModule);
8683
8683
  return /*#__PURE__*/React__default.createElement(TabContext.Provider, {
8684
8684
  value: {
8685
8685
  activeTabId: this.state.activeTab
@@ -8797,7 +8797,7 @@ const List = forwardRef((props, ref) => {
8797
8797
  } = props,
8798
8798
  attributes = _objectWithoutProperties$1(props, _excluded$4);
8799
8799
 
8800
- const classes = mapToCssModules(classNames$1(className, type ? `list-${type}` : false), cssModule);
8800
+ const classes = mapToCssModules(classNames$2(className, type ? `list-${type}` : false), cssModule);
8801
8801
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
8802
8802
  className: classes,
8803
8803
  ref: ref
@@ -8824,7 +8824,7 @@ const ListInlineItem = forwardRef((props, ref) => {
8824
8824
  } = props,
8825
8825
  attributes = _objectWithoutProperties$1(props, _excluded$3);
8826
8826
 
8827
- const classes = mapToCssModules(classNames$1(className, 'list-inline-item'), cssModule);
8827
+ const classes = mapToCssModules(classNames$2(className, 'list-inline-item'), cssModule);
8828
8828
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({}, attributes, {
8829
8829
  className: classes,
8830
8830
  ref: ref
@@ -9007,7 +9007,7 @@ const Spinner = props => {
9007
9007
  } = props,
9008
9008
  attributes = _objectWithoutProperties$1(props, _excluded$2);
9009
9009
 
9010
- const classes = mapToCssModules(classNames$1(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
9010
+ const classes = mapToCssModules(classNames$2(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
9011
9011
  return /*#__PURE__*/React__default.createElement(Tag, _extends$5({
9012
9012
  role: "status"
9013
9013
  }, attributes, {
@@ -9061,7 +9061,7 @@ _objectSpread2(_objectSpread2({}, Col$1.propTypes), {}, {
9061
9061
  Object.values = values;
9062
9062
  })();
9063
9063
 
9064
- var classnames$1 = {exports: {}};
9064
+ var classnames = {exports: {}};
9065
9065
 
9066
9066
  /*!
9067
9067
  Copyright (c) 2018 Jed Watson.
@@ -9117,9 +9117,9 @@ var classnames$1 = {exports: {}};
9117
9117
  window.classNames = classNames;
9118
9118
  }
9119
9119
  }());
9120
- }(classnames$1));
9120
+ }(classnames));
9121
9121
 
9122
- var classnames = classnames$1.exports;
9122
+ var classNames$1 = classnames.exports;
9123
9123
 
9124
9124
  /******************************************************************************
9125
9125
  Copyright (c) Microsoft Corporation.
@@ -14257,7 +14257,7 @@ const ReactInput = (props) => {
14257
14257
  //{...props}
14258
14258
  , {
14259
14259
  //{...props}
14260
- style: style, placeholder: placeholder, onKeyPress: onKeyPress, className: classnames('input__value', {
14260
+ style: style, placeholder: placeholder, onKeyPress: onKeyPress, className: classNames$1('input__value', {
14261
14261
  'is-clearable': value
14262
14262
  }), value: value, onChange: (val) => setValue(val.target.value) }), value ? jsx(SvgX, { className: 'input__clear-icon', onClick: handelClear, strokeWidth: 3, fontSize: 16 }) : ''] }));
14263
14263
  };
@@ -19269,6 +19269,77 @@ const FindNodeByPath = (tree, path) => {
19269
19269
  }
19270
19270
  return { parent: current, lastIndex: levels.at(-1), firstIndex: levels.length === 1 ? levels[0] : -1, node };
19271
19271
  };
19272
+ /**
19273
+ * Tính toán cấu trúc bảng từ dữ liệu column dạng cây:
19274
+ * - Tạo header dạng nhiều cấp (header theo chiều dọc)
19275
+ * - Chuyển cột thành dạng phẳng để render nội dung
19276
+ * - Tính toán vị trí cố định trái/phải (fixed column) để hiển thị sticky
19277
+ *
19278
+ * @param columns Mảng cấu trúc cây đại diện cho các cột của bảng
19279
+ * @returns {
19280
+ * levels: IHeaderColumnTable[][] // Các hàng header theo cấp
19281
+ * flat: IColumnVirtualizedTable[] // Danh sách cột phẳng
19282
+ * objWidthFixLeft: Record<number, number> // Offset trái cho cột fixed left
19283
+ * objWidthFixRight: Record<number, number> // Offset phải cho cột fixed right
19284
+ * lastObjWidthFixLeft: number // Chỉ số cột cuối cùng fixed left
19285
+ * fisrtObjWidthFixRight: number // Chỉ số cột đầu tiên fixed right
19286
+ * }
19287
+ */
19288
+ const calculateTableStructure = (columns) => {
19289
+ const levels = [];
19290
+ const flat = [];
19291
+ const objWidthFixLeft = {};
19292
+ const objWidthFixRight = {};
19293
+ let maxDepth = 0;
19294
+ // Tính depth tối đa
19295
+ const calculateDepth = (cols, depth = 1) => (Math.max(...cols.map(col => (col.columns?.length ? calculateDepth(col.columns, depth + 1) : depth))));
19296
+ maxDepth = calculateDepth(columns);
19297
+ let leftTotal = 0;
19298
+ let rightTotal = 0;
19299
+ const traverse = (cols, level = 0) => {
19300
+ levels[level] = levels[level] || [];
19301
+ return cols.reduce((colspanSum, col) => {
19302
+ const hasChildren = (col.columns?.length ?? 0) > 0;
19303
+ const colspan = hasChildren ? traverse(col.columns, level + 1) : 1;
19304
+ const cell = {
19305
+ ...col,
19306
+ columns: col.columns ?? [],
19307
+ colspan,
19308
+ rowspan: hasChildren ? 1 : maxDepth - level
19309
+ };
19310
+ levels[level].push(cell);
19311
+ if (!hasChildren) {
19312
+ const visible = col.visible !== false;
19313
+ const index = flat.length;
19314
+ const width = col.width ?? 40;
19315
+ cell.index = index;
19316
+ flat.push(cell);
19317
+ if (col.fixedType === 'left' && visible) {
19318
+ objWidthFixLeft[index] = leftTotal;
19319
+ leftTotal += width;
19320
+ }
19321
+ if (col.fixedType === 'right' && visible) {
19322
+ objWidthFixRight[index] = rightTotal;
19323
+ rightTotal += width;
19324
+ }
19325
+ }
19326
+ return colspanSum + colspan;
19327
+ }, 0);
19328
+ };
19329
+ traverse(columns);
19330
+ const flatVisble = flat.filter((e) => e.visible !== false);
19331
+ const lastObjWidthFixLeft = Math.max(...Object.keys(objWidthFixLeft).map(Number), 0);
19332
+ const fisrtObjWidthFixRight = Math.min(...Object.keys(objWidthFixRight).map(Number), flat.length);
19333
+ return {
19334
+ levels,
19335
+ flat,
19336
+ flatVisble,
19337
+ objWidthFixLeft,
19338
+ objWidthFixRight,
19339
+ lastObjWidthFixLeft,
19340
+ fisrtObjWidthFixRight
19341
+ };
19342
+ };
19272
19343
 
19273
19344
  var isCheckBoxInput = (element) => element.type === 'checkbox';
19274
19345
 
@@ -21319,11 +21390,11 @@ const TextInput = (props) => {
21319
21390
  }
21320
21391
  }, 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 && jsx(FormFeedback$1, { children: errors?.message })] }));
21321
21392
  };
21322
- return (jsx(Fragment, { children: jsxs("div", { className: classnames(' align', {
21393
+ return (jsx(Fragment, { children: jsxs("div", { className: classNames$1(' align', {
21323
21394
  [labelSize ? labelSize : '']: labelSize,
21324
21395
  [classes ? classes : '']: classes,
21325
21396
  'form-row-inline-error': errors
21326
- }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
21397
+ }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
21327
21398
  };
21328
21399
 
21329
21400
  /**
@@ -22562,7 +22633,7 @@ const NumberInput = (props) => {
22562
22633
  decimalScale: fractionCurrency ?? 0,
22563
22634
  fixedDecimalScale
22564
22635
  };
22565
- return (jsx(NumericFormat, { id: id, ...numericFormatProps, className: classnames('form-control text-right', {
22636
+ return (jsx(NumericFormat, { id: id, ...numericFormatProps, className: classNames$1('form-control text-right', {
22566
22637
  'is-invalid': errors
22567
22638
  }), onValueChange: (values) => {
22568
22639
  floatValue = values?.floatValue;
@@ -22587,11 +22658,11 @@ const NumberInput = (props) => {
22587
22658
  }, placeholder: placeholder, disabled: disabled }));
22588
22659
  } }), errors && jsx(FormFeedback$1, { children: errors?.message })] }));
22589
22660
  };
22590
- return (jsx(Fragment, { children: jsxs("div", { className: classnames(' align', {
22661
+ return (jsx(Fragment, { children: jsxs("div", { className: classNames$1(' align', {
22591
22662
  [labelSize ? labelSize : '']: labelSize,
22592
22663
  [classes ? classes : '']: classes,
22593
22664
  'form-row-inline-error': errors
22594
- }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { style: { width: width ? width : undefined }, className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
22665
+ }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { style: { width: width ? width : undefined }, className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
22595
22666
  };
22596
22667
 
22597
22668
  const defaultMaxHeight$1 = 250;
@@ -22818,7 +22889,7 @@ const SelectTable = forwardRef((props, ref) => {
22818
22889
  }, 100);
22819
22890
  };
22820
22891
  const renderHeaderCol = (col, indexCol) => {
22821
- return (jsx(Fragment, { children: col.visible !== false && jsx("th", { className: classnames(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
22892
+ return (jsx(Fragment, { children: col.visible !== false && jsx("th", { className: classNames$1(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
22822
22893
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.width,
22823
22894
  minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
22824
22895
  top: `${0 * 35}px`,
@@ -22862,7 +22933,7 @@ const SelectTable = forwardRef((props, ref) => {
22862
22933
  };
22863
22934
  const RenderElement = React__default.memo((props) => {
22864
22935
  const { indexRow, row, isSelected, level = 0 } = props;
22865
- return (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 && 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) => {
22936
+ return (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 && 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) => {
22866
22937
  if (isMulti) {
22867
22938
  const index = value?.findIndex((x) => x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
22868
22939
  if (index > -1) {
@@ -22893,7 +22964,7 @@ const SelectTable = forwardRef((props, ref) => {
22893
22964
  }
22894
22965
  return (jsxs(Fragment, { children: [col.visible !== false && jsx("td", { id: `select-${id}-${indexRow}-${indexCol}`,
22895
22966
  // ref={refRow}
22896
- className: classnames(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && value[fieldValue ?? 'value'] === row[fieldValue ?? 'value'] }), style: {
22967
+ className: classNames$1(`r-select-rowcell`, { 'r-select-move': indexFocus === indexRow, 'r-select-active': !isMulti && value && value[fieldValue ?? 'value'] === row[fieldValue ?? 'value'] }), style: {
22897
22968
  minWidth: col.minWidth,
22898
22969
  width: col.width,
22899
22970
  maxWidth: col.maxWidth,
@@ -22932,7 +23003,7 @@ const SelectTable = forwardRef((props, ref) => {
22932
23003
  });
22933
23004
  const RenderTable = (props) => {
22934
23005
  return (jsxs(Fragment$1, { children: [jsxs("table", { style: { width: '100%' }, children: [!(noHeader || (columns?.length ?? 0) === 0) &&
22935
- jsx("thead", { className: 'r-select-gridheader', children: jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsx("th", { className: classnames(`r-select-headercell`), style: { width: 40, top: `0px` }, children: jsx("div", { style: { justifyContent: 'center' }, className: classnames('r-select-headercell-div'), children: jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
23006
+ jsx("thead", { className: 'r-select-gridheader', children: jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsx("th", { className: classNames$1(`r-select-headercell`), style: { width: 40, top: `0px` }, children: jsx("div", { style: { justifyContent: 'center' }, className: classNames$1('r-select-headercell-div'), children: jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
22936
23007
  if (isMulti) {
22937
23008
  if (isSelectedAll) {
22938
23009
  handChange([]);
@@ -22942,22 +23013,22 @@ const SelectTable = forwardRef((props, ref) => {
22942
23013
  }
22943
23014
  e.stopPropagation();
22944
23015
  }
22945
- }, readOnly: true, className: classnames('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
23016
+ }, readOnly: true, className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
22946
23017
  return (renderHeaderCol(col, index));
22947
23018
  })] }) }), ((optionsLoad ? optionsLoad : options) && !isLoading) && jsx(Fragment$1, { children: jsxs("tbody", { className: 'r-select-gridcontent', children: [haveCreateNew && 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) => {
22948
23019
  const isSelected = isMulti && value?.some((x) => x[fieldValue ?? 'value'] === row[fieldValue ?? 'value']);
22949
23020
  return (jsx(RenderElement, { isSelected: isSelected ?? false, indexRow: indexRow + (haveCreateNew ? 1 : 0), row: row }, `select-table-${indexRow}`));
22950
23021
  })] }) })] }), ((((optionsLoad ? optionsLoad : options)?.length ?? 0) === 0) && !haveCreateNew && !isLoading) && jsxs("div", { className: "r-no-data", children: [jsx("svg", { width: "64", height: "41", viewBox: "0 0 64 41", xmlns: "http://www.w3.org/2000/svg", children: jsxs("g", { transform: "translate(0 1)", fill: "none", fillRule: "evenodd", children: [jsx("ellipse", { fill: "#f5f5f5", cx: "32", cy: "33", rx: "32", ry: "7" }), jsxs("g", { fillRule: "nonzero", stroke: "#d9d9d9", children: [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" }), 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 && jsxs("div", { className: "r-no-data", children: [jsx(Spinner$1, { className: "me-1", children: " " }), t('Loading...')] })] }));
22951
23022
  };
22952
- return (jsx("div", { className: classnames('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsx("div", { ref: selectTableRef, children: jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxs(DropdownToggle$1, { onClick: (e) => {
23023
+ return (jsx("div", { className: classNames$1('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsx("div", { ref: selectTableRef, children: jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxs(DropdownToggle$1, { onClick: (e) => {
22953
23024
  if (!isDisabled) {
22954
23025
  inputRef?.current.focus();
22955
23026
  handleOpenClose();
22956
23027
  }
22957
23028
  e.preventDefault();
22958
- }, 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: [jsxs("div", { className: "select-table-container", children: [isMulti ? jsx(Fragment$1, { children: jsx("div", { className: classnames('select-value is-mutil', { 'd-none': searchTerm }), children: value?.map((ele, index) => {
23029
+ }, 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: [jsxs("div", { className: "select-table-container", children: [isMulti ? jsx(Fragment$1, { children: jsx("div", { className: classNames$1('select-value is-mutil', { 'd-none': searchTerm }), children: value?.map((ele, index) => {
22959
23030
  return (jsxs("span", { children: [index === 0 ? '' : ', ', formatOptionLabel ? formatOptionLabel(ele) : ele[fieldLabel ?? 'label']] }, index));
22960
- }) }) }) : jsx(Fragment$1, { children: jsxs("div", { className: classnames('select-value', { 'd-none': searchTerm }), children: [value ? (formatOptionLabel ? formatOptionLabel(value) : value[fieldLabel ?? 'label']) : '', " "] }) }), !((isMulti ? value?.length > 0 : value) || isDisabled || searchTerm) && jsx("div", { className: classnames('select-placeholder'), children: placeholder }), jsx("div", { className: 'input-container', children: jsx("input", { style: { textAlign: textAlign ?? 'left' }, ref: inputRef, className: classnames('select-input'), readOnly: isDisabled, value: searchTerm, onPaste: (e) => (onPaste && !dropdownOpen) && onPaste(e), onChange: (val) => {
23031
+ }) }) }) : jsx(Fragment$1, { children: 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) && jsx("div", { className: classNames$1('select-placeholder'), children: placeholder }), jsx("div", { className: 'input-container', children: 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) => {
22961
23032
  if (val.target.value) {
22962
23033
  if (loadOptions && val.target.value) {
22963
23034
  setIsLoading(true);
@@ -22971,7 +23042,7 @@ const SelectTable = forwardRef((props, ref) => {
22971
23042
  }
22972
23043
  }
22973
23044
  setSearchTerm(val.target.value);
22974
- }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), isLoading && jsxs("div", { className: classnames('select-table-indicator d-flex align-items-center'), children: [jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" })] }), (isClearable && value && !isDisabled) && jsx("div", { className: classnames('cursor-pointer icon-clear'), onClick: (e) => {
23045
+ }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), isLoading && jsxs("div", { className: classNames$1('select-table-indicator d-flex align-items-center'), children: [jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" }), jsx(Spinner$1, { style: { width: 4, height: 4, marginRight: 3 }, type: "grow" })] }), (isClearable && value && !isDisabled) && jsx("div", { className: classNames$1('cursor-pointer icon-clear'), onClick: (e) => {
22975
23046
  handChange(isMulti ? [] : undefined);
22976
23047
  e.stopPropagation();
22977
23048
  }, children: "\u00D7" }), !isDisabled && jsx("div", { className: "select-table-indicator", onMouseDown: (e) => e.preventDefault(), children: jsx("svg", { height: "20", width: "20", viewBox: "0 0 20 20", children: 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" }) }) })] }), jsx(DropdownMenu$1, { container: component, className: 'formula-dropdown icon-dropdown p-0', style: {
@@ -22980,12 +23051,12 @@ const SelectTable = forwardRef((props, ref) => {
22980
23051
  position: 'fixed',
22981
23052
  borderRadius: 4,
22982
23053
  zIndex: 9999
22983
- }, children: jsx(DropdownItem$1, { className: classnames('p-0 menu-select-table'), tag: 'div', header: true, children: dropdownOpen && jsx("div", { style: { backgroundColor: 'none' }, onMouseDown: (e) => {
23054
+ }, children: jsx(DropdownItem$1, { className: classNames$1('p-0 menu-select-table'), tag: 'div', header: true, children: dropdownOpen && jsx("div", { style: { backgroundColor: 'none' }, onMouseDown: (e) => {
22984
23055
  if (!isDisabled) {
22985
23056
  inputRef?.current.focus();
22986
23057
  e.preventDefault();
22987
23058
  }
22988
- }, children: jsxs("div", { className: 'r-select-grid', children: [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: jsx(RenderTable, {}) }), jsxs("div", { className: classnames('r-select-footer', { 'd-none': !(showFooter === true || handleAdd) }), children: [jsxs(Button$1, { outline: true, color: "primary", onClick: () => handleAdd?.(), className: classnames('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), footerComponent ? footerComponent() : null] })] }) }) }) })] }) }) }));
23059
+ }, children: jsxs("div", { className: 'r-select-grid', children: [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: jsx(RenderTable, {}) }), jsxs("div", { className: classNames$1('r-select-footer', { 'd-none': !(showFooter === true || handleAdd) }), children: [jsxs(Button$1, { outline: true, color: "primary", onClick: () => handleAdd?.(), className: classNames$1('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), footerComponent ? footerComponent() : null] })] }) }) }) })] }) }) }));
22989
23060
  });
22990
23061
 
22991
23062
  const SelectTableBox$1 = (props) => {
@@ -23001,10 +23072,10 @@ const SelectTableBox$1 = (props) => {
23001
23072
  const { isLabel, desciptionLabel, id, classLabel, name, label, required } = props;
23002
23073
  return (jsxs(Fragment, { children: [isLabel === false ? '' : jsxs(Label$1, { id: `label-${id}`, className: classLabel, for: name, children: [t(label ? label : ''), " ", required ? jsx("span", { className: "text-danger", children: "*" }) : ''] }), (!isNullOrUndefined$1(desciptionLabel) && desciptionLabel !== '') ?? jsx(Fragment$1, { children: jsx(UncontrolledTooltip, { target: `label-${id}`, children: t(desciptionLabel ?? '') }) })] }));
23003
23074
  };
23004
- return (jsx(Fragment, { children: jsxs("div", { className: classnames(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
23075
+ return (jsx(Fragment, { children: jsxs("div", { className: classNames$1(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
23005
23076
  [labelSize ? labelSize : '']: labelSize,
23006
23077
  'form-row-inline-error': errors
23007
- }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxs("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: [jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
23078
+ }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxs("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: [jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
23008
23079
  return (jsx(SelectTable, { ...rest, id: id, value: (isMulti ? value?.length > 0 : value) ? (!isMulti ? (options.find((val) => val[fieldValue ?? 'value'] === value) ?? (defaultValue ?? '')) : value) : (isMulti ? [] : undefined),
23009
23080
  // 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ị,
23010
23081
  // 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.
@@ -23037,7 +23108,6 @@ const EditForm = forwardRef((props, ref) => {
23037
23108
  const { innerWidth } = window;
23038
23109
  const inputRef = useRef(null);
23039
23110
  const editFormRef = useRef(null);
23040
- const buttonRef = useRef(null);
23041
23111
  const [dropdownOpen, setDropdownOpen] = useState(false);
23042
23112
  const [isFocus, setIsFocus] = useState(false);
23043
23113
  const [itemsField, setItemsField] = useState([]);
@@ -23207,7 +23277,7 @@ const EditForm = forwardRef((props, ref) => {
23207
23277
  });
23208
23278
  }
23209
23279
  }, [inputRef]);
23210
- return (jsx("div", { className: "form-edit", ref: ref, id: id, children: jsx("div", { ref: editFormRef, children: jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, children: [jsx(DropdownToggle$1, { tag: 'div', children: jsxs("div", { className: classnames('display-value', { 'r-is-focus': isFocus || dropdownOpen }, { 'is-invalid': invalid }), onClick: handleOnClick, children: [template?.(rowData, indexRow) ?? displayValue, jsx(Input$1, { style: {
23280
+ return (jsx("div", { className: "form-edit", ref: ref, id: id, children: jsx("div", { ref: editFormRef, children: jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, children: [jsx(DropdownToggle$1, { tag: 'div', children: jsxs("div", { className: classNames$1('display-value', { 'r-is-focus': isFocus || dropdownOpen }, { 'is-invalid': invalid }), onClick: handleOnClick, children: [template?.(rowData, indexRow) ?? displayValue, jsx(Input$1, { style: {
23211
23281
  width: template ? 0 : '100%',
23212
23282
  height: template ? 0 : 28,
23213
23283
  lineHeight: template ? 0 : 19,
@@ -23223,7 +23293,7 @@ const EditForm = forwardRef((props, ref) => {
23223
23293
  }, children: jsxs(DropdownItem$1, { className: 'p-0', style: { borderRadius: '6px' }, tag: 'div', header: true, children: [jsx("div", { onKeyDown: (e) => formKeyDown(e, handleSubmit(handleOnSubmit)), className: 'p-1', style: {
23224
23294
  maxHeight: menuHeight ? menuHeight : 300,
23225
23295
  overflow: "auto"
23226
- }, children: itemsField ? renderForm(itemsField) : '' }), jsxs("div", { className: "d-flex justify-content-between p-50", style: { boxShadow: "0 4px 24px 0 rgb(34 41 47 / 10%)" }, children: [jsx("div", { className: "text-primary py-25", style: { fontSize: 12 }, children: footerTemplate ? footerTemplate(rowData) : '' }), !onChangeField ? jsxs("div", { className: "d-flex justify-content-end", children: [isClearable && jsx(Button$1, { ref: buttonRef, className: 'btn me-50 py-25 px-50', outline: true, onClick: () => {
23296
+ }, children: itemsField ? renderForm(itemsField) : '' }), jsxs("div", { className: "d-flex justify-content-between p-50", style: { boxShadow: "0 4px 24px 0 rgb(34 41 47 / 10%)" }, children: [jsx("div", { className: "text-primary py-25", style: { fontSize: 12 }, children: footerTemplate ? footerTemplate(rowData) : '' }), !onChangeField ? jsxs("div", { className: "d-flex justify-content-end", children: [isClearable && jsx(Button$1, { className: 'btn me-50 py-25 px-50', outline: true, onClick: () => {
23227
23297
  itemsField.forEach((e) => {
23228
23298
  if (e.type === 'numeric') {
23229
23299
  setValue(e.name, 0);
@@ -23236,7 +23306,7 @@ const EditForm = forwardRef((props, ref) => {
23236
23306
  if (e.code === 'Tab') {
23237
23307
  closeMenu();
23238
23308
  }
23239
- }, children: t('Clear') }), jsx(Button$1, { ref: buttonRef, color: 'primary', className: 'btn btn-primary py-25 px-50', onClick: handleSubmit(handleOnSubmit), onKeyDown: (e) => {
23309
+ }, children: t('Clear') }), jsx(Button$1, { color: 'primary', className: 'btn btn-primary py-25 px-50', onClick: handleSubmit(handleOnSubmit), onKeyDown: (e) => {
23240
23310
  if (e.code === 'Tab') {
23241
23311
  closeMenu();
23242
23312
  }
@@ -23267,7 +23337,7 @@ const ModalHeader = (props) => {
23267
23337
  return jsx(SvgPlus, { fontSize: 17, className: 'me-1' });
23268
23338
  }
23269
23339
  };
23270
- return (jsxs("div", { className: 'modal-header d-flex align-items-center justify-content-between mb-1', children: [jsxs("div", { className: "d-flex align-items-center justify-content-start", children: [jsxs("h5", { className: 'modal-title', children: [handleModalIcon(), " ", t(title)] }), component ? component() : jsx(Fragment$1, {})] }), jsx("div", { className: 'todo-item-action d-flex align-items-center', children: jsx(SvgX, { className: classnames('fw-normal mt-25 cursor-pointer', { 'd-none': !handleModal }), fontSize: 20, onClick: handleModal }) })] }));
23340
+ return (jsxs("div", { className: 'modal-header d-flex align-items-center justify-content-between mb-1', children: [jsxs("div", { className: "d-flex align-items-center justify-content-start", children: [jsxs("h5", { className: 'modal-title', children: [handleModalIcon(), " ", t(title)] }), component ? component() : jsx(Fragment$1, {})] }), jsx("div", { className: 'todo-item-action d-flex align-items-center', children: jsx(SvgX, { className: classNames$1('fw-normal mt-25 cursor-pointer', { 'd-none': !handleModal }), fontSize: 20, onClick: handleModal }) })] }));
23271
23341
  };
23272
23342
 
23273
23343
  const Sidebar = (props) => {
@@ -23293,16 +23363,16 @@ const Sidebar = (props) => {
23293
23363
  toggleSidebar();
23294
23364
  }, 400);
23295
23365
  };
23296
- return (jsxs("div", { tabIndex: 0, className: classnames({ 'd-none': !open }), onKeyDown: (e) => {
23366
+ return (jsxs("div", { tabIndex: 0, className: classNames$1({ 'd-none': !open }), onKeyDown: (e) => {
23297
23367
  if ((!keyboard) && e.code === 'Escape' && flag) {
23298
23368
  handClose();
23299
23369
  e.stopPropagation();
23300
23370
  e.preventDefault();
23301
23371
  }
23302
- }, children: [jsx("div", { className: classnames('offcanvas-backdrop fade', {
23372
+ }, children: [jsx("div", { className: classNames$1('offcanvas-backdrop fade', {
23303
23373
  'd-none': !flag || hiddenBackground,
23304
23374
  show: flag
23305
- }), style: { zIndex: 1056 }, onClick: handClose }), jsxs("div", { className: classnames('r-sidebar', `customizer-${width ?? 600}`, {
23375
+ }), style: { zIndex: 1056 }, onClick: handClose }), jsxs("div", { className: classNames$1('r-sidebar', `customizer-${width ?? 600}`, {
23306
23376
  open: flag,
23307
23377
  fullscreen: isFullScreen
23308
23378
  }), style: { zIndex: 1057 }, children: [jsxs("div", { style: {
@@ -23318,7 +23388,7 @@ const Sidebar = (props) => {
23318
23388
  cursor: 'pointer',
23319
23389
  zIndex: 9,
23320
23390
  marginLeft: 7
23321
- }, className: classnames({ 'd-none': hiddenFullScreenButton }), onClick: () => {
23391
+ }, className: classNames$1({ 'd-none': hiddenFullScreenButton }), onClick: () => {
23322
23392
  setIsFullScreen(!isFullScreen);
23323
23393
  }, children: [jsx(SvgChevronLeft, { className: `${isFullScreen ? 'd-none' : ''}`, fontSize: 16 }), jsx(SvgChevronRight, { className: `${!isFullScreen ? 'd-none' : ''}`, fontSize: 15 })] }), children] })] }));
23324
23394
  };
@@ -23427,7 +23497,7 @@ const SidebarSetColumn = (props) => {
23427
23497
  }
23428
23498
  ];
23429
23499
  const renderHeaderCol = (col, indexCol) => {
23430
- return (jsx(Fragment, { children: col.visible !== false && jsx("th", { className: classnames(`r-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
23500
+ return (jsx(Fragment, { children: col.visible !== false && jsx("th", { className: classNames$1(`r-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
23431
23501
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.width,
23432
23502
  minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
23433
23503
  top: `${0 * 42}px`,
@@ -23440,12 +23510,12 @@ const SidebarSetColumn = (props) => {
23440
23510
  return (jsxs(Sidebar, { open: openSidebar, toggleSidebar: handleCancel, width: 700, children: [jsx(ModalHeader, { typeModal: 'Edit', handleModal: handleCancel, title: 'Column setup' }), jsx("div", { className: "ms-2 react-table-edit", children: jsx("div", { className: 'r-grid', children: jsx("div", { className: "r-gridtable", style: { height: windowSize.innerHeight - 120 }, children: jsxs("table", { style: { width: '100%' }, children: [jsx("thead", { className: 'r-gridheader', children: jsx("tr", { className: "r-row", role: "row", children: columns.map((col, index) => {
23441
23511
  return (renderHeaderCol(col, index));
23442
23512
  }) }) }), jsx("tbody", { className: 'r-gridcontent', children: dataSource?.map((row, indexRow) => {
23443
- return (jsx("tr", { className: classnames('r-row', { 'last-row': indexRow === dataSource.length - 1 }, { 'fisrt-row': indexRow === 0 }), children: columns.map((col, indexCol) => {
23513
+ return (jsx("tr", { className: classNames$1('r-row', { 'last-row': indexRow === dataSource.length - 1 }, { 'fisrt-row': indexRow === 0 }), children: columns.map((col, indexCol) => {
23444
23514
  let value = row[col.field];
23445
23515
  if (col.editType === 'numeric' || (col.editTypeCondition && col.editTypeCondition(row) === 'numeric')) {
23446
23516
  value = formartNumberic(row[col.field], ',', '.', col.numericSettings?.fraction, true) ?? 0;
23447
23517
  }
23448
- return (jsx(Fragment, { children: col.visible !== false && jsx("td", { className: classnames(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'r-active': indexFocus === indexRow }), style: {
23518
+ return (jsx(Fragment, { children: col.visible !== false && jsx("td", { className: classNames$1(`r-rowcell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }, { 'r-active': indexFocus === indexRow }), style: {
23449
23519
  padding: 0,
23450
23520
  textAlign: col.textAlign ? col.textAlign : 'left'
23451
23521
  }, onFocus: (e) => {
@@ -23460,9 +23530,9 @@ const SidebarSetColumn = (props) => {
23460
23530
  }
23461
23531
  e.stopPropagation();
23462
23532
  }
23463
- }, children: jsx("div", { className: classnames('r-rowcell-div'), style: {
23533
+ }, children: jsx("div", { className: classNames$1('r-rowcell-div'), style: {
23464
23534
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : 'auto'
23465
- }, children: jsx("div", { className: classnames('r-rowcell-content'), style: {
23535
+ }, children: jsx("div", { className: classNames$1('r-rowcell-content'), style: {
23466
23536
  margin: '7px 9px'
23467
23537
  }, children: jsx("div", { className: "r-cell-text", children: col.template ? col.template(row, indexRow) : value }) }) }) }, `col-${indexRow}-${indexCol}`) }, indexCol));
23468
23538
  }) }, `row-${indexRow}`));
@@ -23485,12 +23555,14 @@ const CommandElement = (props) => {
23485
23555
  const { commandItems, rowData, indexRow, handleCommandClick, indexFocus, setIndexFocus } = props;
23486
23556
  const { t } = useTranslation();
23487
23557
  return (jsx(Fragment, { children: jsx("div", { className: 'd-flex align-items-center', style: { columnGap: 10 }, children: commandItems.map((item, index) => {
23488
- return (jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classnames('command-item', {
23558
+ return (jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classNames$1('command-item', {
23489
23559
  'btn-icon': item.tooltip === ''
23490
23560
  }), color: item.color ? item.color : '#000', onClick: (e) => {
23491
23561
  handleCommandClick(item.id, rowData, indexRow);
23492
23562
  if (indexRow === indexFocus) {
23493
- setIndexFocus(-1);
23563
+ if (setIndexFocus) {
23564
+ setIndexFocus(-1);
23565
+ }
23494
23566
  }
23495
23567
  e.preventDefault();
23496
23568
  }, children: [item.icon && jsx(IconCustom, { iconName: item.icon, size: 16 }), jsx(UncontrolledTooltip, { className: "r-tooltip", target: `command-item-${indexRow}-${index}`, place: "top", children: t(item.tooltip ?? '') })] }, `command-${index}`));
@@ -41725,14 +41797,14 @@ const HeaderTableCol = (props) => {
41725
41797
  setColumn(newColumns);
41726
41798
  }
41727
41799
  };
41728
- return (jsx(Fragment, { children: col.visible !== false && (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: 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: {
41800
+ return (jsx(Fragment, { children: col.visible !== false && (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: 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: {
41729
41801
  top: `${indexParent * 42}px`,
41730
41802
  left: col.fixedType === 'left' ? objWidthFixLeft[col.index ?? 0] : undefined,
41731
41803
  right: col.fixedType === 'right' ? objWidthFixRight[col.index ?? 0] : undefined,
41732
41804
  width: col.width ? typeof col.width === 'number' ? col.width : col.width?.includes('px') || col.width?.includes('%') ? col.width : `${col.width}px` : 'auto',
41733
41805
  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',
41734
41806
  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'
41735
- }, children: jsxs("div", { style: { justifyContent: col.textAlign ?? 'left' }, className: classnames('r-headercell-div'), children: [col.field === 'checkbox' && (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) => {
41807
+ }, children: jsxs("div", { style: { justifyContent: col.textAlign ?? 'left' }, className: classNames$1('r-headercell-div'), children: [col.field === 'checkbox' && (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) => {
41736
41808
  if (selectEnable) {
41737
41809
  if (e.target.checked) {
41738
41810
  setSelectedRows(dataSource.map((item) => { return item; }));
@@ -41859,7 +41931,7 @@ const SelectTableTree = forwardRef((props, ref) => {
41859
41931
  };
41860
41932
  // Hàm để render header của cột
41861
41933
  const renderHeaderCol = (col, indexCol) => {
41862
- return (jsx(Fragment, { children: col.visible !== false && (jsx("th", { className: classnames(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
41934
+ return (jsx(Fragment, { children: col.visible !== false && (jsx("th", { className: classNames$1(`r-select-headercell fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
41863
41935
  width: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.width,
41864
41936
  minWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
41865
41937
  maxWidth: col.fixedType ? Number(col.maxWidth ? col.maxWidth : (col.width ? col.width : (col.minWidth ?? 'auto'))) : col.minWidth,
@@ -41910,7 +41982,7 @@ const SelectTableTree = forwardRef((props, ref) => {
41910
41982
  const RenderElement = React__default.memo((props) => {
41911
41983
  const { indexRow, row, isSelected, level = 0 } = props;
41912
41984
  const [expanded, setExpanded] = useState(row.expanded);
41913
- return (jsxs(Fragment$1, { children: [jsxs("tr", { id: `row-select-table-${indexRow}`, className: classnames('r-select-row', { 'fisrt-row': indexRow === 0 && level === 0 }), children: [isMulti && jsxs("td", { className: classnames(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
41985
+ return (jsxs(Fragment$1, { children: [jsxs("tr", { id: `row-select-table-${indexRow}`, className: classNames$1('r-select-row', { 'fisrt-row': indexRow === 0 && level === 0 }), children: [isMulti && jsxs("td", { className: classNames$1(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
41914
41986
  textAlign: 'center',
41915
41987
  paddingLeft: (level * 15) + (row[fieldChildren ?? 'children']?.length > 0 ? 0 : 10)
41916
41988
  }, onClick: (e) => {
@@ -41957,7 +42029,7 @@ const SelectTableTree = forwardRef((props, ref) => {
41957
42029
  setExpanded(true);
41958
42030
  }
41959
42031
  e.stopPropagation();
41960
- }, fontSize: 18, className: classnames('me-50 pb-0 r-icon-expand', { 'is-open': expanded }) }), jsx(Input$1, { checked: isSelected, type: "checkbox", className: "cursor-pointer", onChange: () => { } })] }), (columns ? columns : defaultColumns).map((col, indexCol) => {
42032
+ }, fontSize: 18, className: classNames$1('me-50 pb-0 r-icon-expand', { 'is-open': expanded }) }), jsx(Input$1, { checked: isSelected, type: "checkbox", className: "cursor-pointer", onChange: () => { } })] }), (columns ? columns : defaultColumns).map((col, indexCol) => {
41961
42033
  let valueDisplay = row[col.field];
41962
42034
  if (col.type === 'numeric' || (col.typeCondition && col.typeCondition(row) === 'numeric')) {
41963
42035
  valueDisplay = formartNumberic(row[col.field], formatSetting?.decimalSeparator ?? '.', formatSetting?.thousandSeparator ?? ',', col.fraction ?? 0, true) ?? 0;
@@ -41968,7 +42040,7 @@ const SelectTableTree = forwardRef((props, ref) => {
41968
42040
  else if (col.type === 'datetime') {
41969
42041
  valueDisplay = valueDisplay ? formatDateTime(valueDisplay, formatSetting?.dateFormat ?? 'DD/MM/yyyy HH:mm') : '';
41970
42042
  }
41971
- return (jsxs(Fragment, { children: [col.visible !== false && jsxs("td", { id: `select-${id}-${indexRow}-${indexCol}`, className: classnames(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
42043
+ return (jsxs(Fragment, { children: [col.visible !== false && jsxs("td", { id: `select-${id}-${indexRow}-${indexCol}`, className: classNames$1(`r-select-rowcell`, { 'r-select-active': !isMulti && value && isSelected }), style: {
41972
42044
  paddingLeft: 9 + (indexCol === 0 && !isMulti ? (level * 10) + (row[fieldChildren ?? 'children']?.length > 0 || level === 0 ? 0 : 15) : 0),
41973
42045
  textAlign: col.textAlign ? col.textAlign : 'left'
41974
42046
  }, onClick: (e) => {
@@ -42022,7 +42094,7 @@ const SelectTableTree = forwardRef((props, ref) => {
42022
42094
  setExpanded(true);
42023
42095
  }
42024
42096
  e.stopPropagation();
42025
- }, 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 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay)] }, `col-${indexRow}-${indexCol}`), checkOverflow(indexRow, indexCol) && 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 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay) })] }, indexCol));
42097
+ }, 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 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay)] }, `col-${indexRow}-${indexCol}`), checkOverflow(indexRow, indexCol) && 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 ? jsxs("div", { style: { color: formatSetting?.colorNegative ?? 'red' }, children: [" ", `${formatSetting?.prefixNegative ?? '-'}${value}${formatSetting?.suffixNegative ?? ''}`] }) : valueDisplay) })] }, indexCol));
42026
42098
  })] }, `row-${indexRow}`), row[fieldChildren ?? 'children'] && row.expanded && row[fieldChildren ?? 'children'].map((child, indexChild) => {
42027
42099
  if (checkSearch(searchTerm, child, (columns ? columns : defaultColumns))) {
42028
42100
  const isSelectedChild = value && (isMulti ? value?.some((x) => x === child[fieldValue ?? 'value']) : value[fieldValue ?? 'value'] === child[fieldValue ?? 'value']);
@@ -42033,7 +42105,7 @@ const SelectTableTree = forwardRef((props, ref) => {
42033
42105
  const RenderTable = (props) => {
42034
42106
  let countDisplay = 0;
42035
42107
  return (jsxs(Fragment$1, { children: [jsxs("table", { style: { width: '100%' }, children: [!(noHeader && (columns?.length ?? 0) > 0) &&
42036
- jsx("thead", { className: 'r-select-gridheader', children: jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsx("th", { className: classnames(`r-select-headercell checkbox-column`), style: { width: 40, minWidth: 40, maxWidth: 100, top: `0px` }, children: jsx("div", { style: { justifyContent: 'center' }, className: classnames('r-select-headercell-div'), children: jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
42108
+ jsx("thead", { className: 'r-select-gridheader', children: jsxs("tr", { className: "r-select-row", role: "row", children: [isMulti && jsx("th", { className: classNames$1(`r-select-headercell checkbox-column`), style: { width: 40, minWidth: 40, maxWidth: 100, top: `0px` }, children: jsx("div", { style: { justifyContent: 'center' }, className: classNames$1('r-select-headercell-div'), children: jsx(Input$1, { checked: isSelectedAll, type: "checkbox", onClick: (e) => {
42037
42109
  if (isMulti) {
42038
42110
  if (isSelectedAll) {
42039
42111
  onChange([]);
@@ -42043,7 +42115,7 @@ const SelectTableTree = forwardRef((props, ref) => {
42043
42115
  }
42044
42116
  e.stopPropagation();
42045
42117
  }
42046
- }, readOnly: true, className: classnames('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
42118
+ }, readOnly: true, className: classNames$1('cursor-pointer', { 'd-none': !isMulti }), style: { textAlign: 'center', marginTop: 6 } }) }) }), (columns ? columns : defaultColumns).map((col, index) => {
42047
42119
  return (renderHeaderCol(col, index));
42048
42120
  })] }) }), (options.length > 0) && jsx(Fragment$1, { children: jsx("tbody", { className: 'r-select-gridcontent', children: options?.map((row, indexRow) => {
42049
42121
  if (checkSearch(searchTerm, row, (columns ? columns : defaultColumns))) {
@@ -42069,17 +42141,17 @@ const SelectTableTree = forwardRef((props, ref) => {
42069
42141
  traverse(tree);
42070
42142
  return records;
42071
42143
  };
42072
- return (jsx("div", { className: classnames('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsx("div", { ref: selectTableRef, children: jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxs(DropdownToggle$1, { onClick: (e) => {
42144
+ return (jsx("div", { className: classNames$1('react-select-table', { 'is-invalid': invalid }), ref: ref, id: id, children: jsx("div", { ref: selectTableRef, children: jsxs(Dropdown$1, { isOpen: dropdownOpen, toggle: () => { }, onMouseDown: (e) => e.preventDefault(), children: [jsxs(DropdownToggle$1, { onClick: (e) => {
42073
42145
  if (!isDisabled) {
42074
42146
  inputRef?.current.focus();
42075
42147
  handleOpenClose();
42076
42148
  }
42077
42149
  e.preventDefault();
42078
- }, 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: [jsxs("div", { className: "select-table-container", children: [isMulti ? jsx(Fragment$1, { children: jsx("div", { className: classnames('select-value is-mutil', { 'd-none': searchTerm }), children: getSelectedRecords(options, value).map((ele, index) => {
42150
+ }, 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: [jsxs("div", { className: "select-table-container", children: [isMulti ? jsx(Fragment$1, { children: jsx("div", { className: classNames$1('select-value is-mutil', { 'd-none': searchTerm }), children: getSelectedRecords(options, value).map((ele, index) => {
42079
42151
  return (jsxs("span", { children: [index === 0 ? '' : ', ', ele[fieldLabel ?? 'label']] }, index));
42080
- }) }) }) : jsx(Fragment$1, { children: jsxs("div", { className: classnames('select-value', { 'd-none': searchTerm }), children: [value ? (formatOptionLabel ? formatOptionLabel(value) : value[fieldLabel ?? 'label']) : '', " "] }) }), !((isMulti ? value?.length > 0 : value) || isDisabled || searchTerm) && jsx("div", { className: classnames('select-placeholder'), children: placeholder }), jsx("div", { className: 'input-container', children: jsx("input", { style: { textAlign: textAlign ?? 'left' }, ref: inputRef, className: classnames('select-input'), readOnly: isDisabled, value: searchTerm, onPaste: (e) => (onPaste && !dropdownOpen) && onPaste(e), onChange: (val) => {
42152
+ }) }) }) : jsx(Fragment$1, { children: 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) && jsx("div", { className: classNames$1('select-placeholder'), children: placeholder }), jsx("div", { className: 'input-container', children: 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) => {
42081
42153
  setSearchTerm(val.target.value);
42082
- }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), (isClearable && value && !isDisabled) && jsx("div", { className: classnames('cursor-pointer icon-clear'), onClick: (e) => {
42154
+ }, onKeyDown: (e) => handleOnKeyDown(e) }) })] }), (isClearable && value && !isDisabled) && jsx("div", { className: classNames$1('cursor-pointer icon-clear'), onClick: (e) => {
42083
42155
  onChange(isMulti ? [] : undefined);
42084
42156
  e.stopPropagation();
42085
42157
  }, children: "\u00D7" }), !isDisabled && jsx("div", { className: "select-table-indicator", onMouseDown: (e) => e.preventDefault(), children: jsx("svg", { height: "20", width: "20", viewBox: "0 0 20 20", children: 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" }) }) })] }), jsx(DropdownMenu$1, { container: component, className: 'formula-dropdown icon-dropdown p-0', style: {
@@ -42087,12 +42159,12 @@ const SelectTableTree = forwardRef((props, ref) => {
42087
42159
  position: 'fixed',
42088
42160
  borderRadius: 4,
42089
42161
  zIndex: 9999
42090
- }, children: jsx(DropdownItem$1, { className: classnames('p-0 menu-select-table'), style: { borderRadius: '6px' }, tag: 'div', header: true, children: dropdownOpen && jsx("div", { onMouseDown: (e) => {
42162
+ }, children: jsx(DropdownItem$1, { className: classNames$1('p-0 menu-select-table'), style: { borderRadius: '6px' }, tag: 'div', header: true, children: dropdownOpen && jsx("div", { onMouseDown: (e) => {
42091
42163
  if (!isDisabled) {
42092
42164
  inputRef?.current.focus();
42093
42165
  e.preventDefault();
42094
42166
  }
42095
- }, children: jsxs("div", { className: 'r-select-grid r-select-tree-grid', children: [jsx("div", { className: "r-select-gridtable ", ref: selectMenuTableRef, style: { width: menuWidth, minWidth: selectTableRef?.current?.clientWidth, maxHeight: maxHeight ?? defaultMaxHeight }, children: jsx(RenderTable, {}) }), jsxs("div", { className: classnames('r-select-footer', { 'd-none': !(showFooter === true || handleAdd || isMulti) }), children: [jsxs(Button$1, { outline: true, color: "primary", onClick: handleAdd, className: classnames('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), isMulti && 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] })] }) }) }) })] }) }) }));
42167
+ }, children: jsxs("div", { className: 'r-select-grid r-select-tree-grid', children: [jsx("div", { className: "r-select-gridtable ", ref: selectMenuTableRef, style: { width: menuWidth, minWidth: selectTableRef?.current?.clientWidth, maxHeight: maxHeight ?? defaultMaxHeight }, children: jsx(RenderTable, {}) }), jsxs("div", { className: classNames$1('r-select-footer', { 'd-none': !(showFooter === true || handleAdd || isMulti) }), children: [jsxs(Button$1, { outline: true, color: "primary", onClick: handleAdd, className: classNames$1('r-btn d-flex align-items-center', { 'd-none': !handleAdd }), children: [jsx(SvgPlus, { className: "me-50", fontSize: 16 }), t('AddNew'), " (F9)"] }), isMulti && 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] })] }) }) }) })] }) }) }));
42096
42168
  });
42097
42169
 
42098
42170
  const PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageOptions, onChangePageSize }) => {
@@ -42108,14 +42180,14 @@ const PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageO
42108
42180
  const renderPageNumber = (number) => {
42109
42181
  const arr = [];
42110
42182
  for (let index = ((number - 1) * 5) + 1; index <= number * 5 && index <= Math.floor(totalItem / pageSize) + (Math.floor(totalItem / pageSize) === totalItem / pageSize ? 0 : 1); index++) {
42111
- arr.push(jsx("div", { className: classnames('r-number', { 'r-active': index === currentPage }), onClick: () => { onChangePage({ totalItem, pageSize, currentPage: index, old: currentPage }); }, children: index }, `page-${index}`));
42183
+ arr.push(jsx("div", { className: classNames$1('r-number', { 'r-active': index === currentPage }), onClick: () => { onChangePage({ totalItem, pageSize, currentPage: index, old: currentPage }); }, children: index }, `page-${index}`));
42112
42184
  }
42113
42185
  return (arr);
42114
42186
  };
42115
- return (jsx(Fragment, { children: jsxs("div", { className: "r-pager", children: [jsxs("div", { className: "r-pagercontainer", children: [jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: 1, old: currentPage }), children: jsx(SvgChevronsLeft, { fontSize: 16 }) }), jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: currentPage - 1, old: currentPage }), children: jsx(SvgChevronLeft, { fontSize: 16 }) }), jsx("button", { className: classnames('r-button', { 'd-none': currentPageNumber === 1 }), type: "button", onClick: () => {
42187
+ return (jsx(Fragment, { children: jsxs("div", { className: "r-pager", children: [jsxs("div", { className: "r-pagercontainer", children: [jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: 1, old: currentPage }), children: jsx(SvgChevronsLeft, { fontSize: 16 }) }), jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || currentPage === 1, onClick: () => onChangePage({ totalItem, pageSize, currentPage: currentPage - 1, old: currentPage }), children: jsx(SvgChevronLeft, { fontSize: 16 }) }), jsx("button", { className: classNames$1('r-button', { 'd-none': currentPageNumber === 1 }), type: "button", onClick: () => {
42116
42188
  setCurrentPageNumber(currentPageNumber - 1);
42117
42189
  onChangePage({ totalItem, pageSize, currentPage: ((currentPageNumber - 2) * 5) + 1, old: currentPage });
42118
- }, children: "..." }), renderPageNumber(currentPageNumber), jsx("button", { className: classnames('r-button', { 'd-none': currentPageNumber * 5 >= countPage }), type: "button", onClick: () => {
42190
+ }, children: "..." }), renderPageNumber(currentPageNumber), jsx("button", { className: classNames$1('r-button', { 'd-none': currentPageNumber * 5 >= countPage }), type: "button", onClick: () => {
42119
42191
  setCurrentPageNumber(currentPageNumber + 1);
42120
42192
  onChangePage({ totalItem, pageSize, currentPage: (currentPageNumber * 5) + 1, old: currentPage });
42121
42193
  }, children: "..." }), jsx("button", { className: "r-button", type: "button", disabled: countPage <= 1 || countPage === currentPage, onClick: () => onChangePage({ totalItem, pageSize, currentPage: currentPage + 1, old: currentPage }), children: jsx(SvgChevronRight, { fontSize: 16 }) }), 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: jsx(SvgChevronsRight, { fontSize: 16 }) }), jsx("div", { className: "r-pagesize", children: jsx(SelectTable, { value: { value: pageSize, label: pageSize }, noHeader: true, options: pageOptions.map((item) => ({ value: item, label: item })), onChange: (val) => {
@@ -42230,13 +42302,13 @@ editDisable, addDisable, toolbarSetting, buttonSetting) => {
42230
42302
  };
42231
42303
 
42232
42304
  const ToolbarBottom = ({ handleAdd, handleDuplicate, handleInsertBefore, handleInsertAfter, handleDeleteAll, setOpenPopupSetupColumn, indexFocus, editDisable, addDisable, buttonSetting, toolbarSetting, headerColumns, t }) => {
42233
- return (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: jsxs("div", { className: "r-toolbar-items", children: [jsxs("div", { className: "r-toolbar-left", children: [jsxs("div", { className: classnames('r-toolbar-item d-flex', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: [jsx(Button$1, { color: 'success', outline: true, onClick: () => handleAdd(1), className: 'd-flex', children: t('Add item') }), jsxs(UncontrolledDropdown, { className: 'nav-item', children: [jsx(DropdownToggle$1, { tag: 'div', className: 'me-0 d-flex', children: jsx(Button$1, { type: 'button', color: 'success', outline: true, style: { marginLeft: -1 }, className: 'px-25', children: jsx("svg", { fill: '#28c76f', height: "15", width: "20", viewBox: "0 0 20 20", children: 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" }) }) }) }), jsxs(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown p-0', style: { width: 60 }, children: [jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(10), children: "Th\u00EAm 10 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(20), children: "Th\u00EAm 20 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(30), children: "Th\u00EAm 30 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(40), children: "Th\u00EAm 40 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(50), children: "Th\u00EAm 50 h\u00E0ng" })] })] })] }), (indexFocus ?? -1) > -1 ? jsxs(Fragment$1, { children: [jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'success', outline: true, onClick: () => { handleDuplicate(); }, className: 'd-flex', children: t('Duplicate') }) }), jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertBefore, className: 'd-flex', children: t('Insert item before') }) }), jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertAfter, className: 'd-flex', children: t('Insert item after') }) })] }) : jsx(Fragment$1, { children: " " }), jsx("div", { className: classnames('r-toolbar-item', { 'd-none': editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'primary', outline: true, onClick: handleDeleteAll, className: 'd-flex', children: t('Delete all item') }) }), toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42305
+ return (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: jsxs("div", { className: "r-toolbar-items", children: [jsxs("div", { className: "r-toolbar-left", children: [jsxs("div", { className: classNames$1('r-toolbar-item d-flex', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: [jsx(Button$1, { color: 'success', outline: true, onClick: () => handleAdd(1), className: 'd-flex', children: t('Add item') }), jsxs(UncontrolledDropdown, { className: 'nav-item', children: [jsx(DropdownToggle$1, { tag: 'div', className: 'me-0 d-flex', children: jsx(Button$1, { type: 'button', color: 'success', outline: true, style: { marginLeft: -1 }, className: 'px-25', children: jsx("svg", { fill: '#28c76f', height: "15", width: "20", viewBox: "0 0 20 20", children: 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" }) }) }) }), jsxs(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown p-0', style: { width: 60 }, children: [jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(10), children: "Th\u00EAm 10 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(20), children: "Th\u00EAm 20 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(30), children: "Th\u00EAm 30 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(40), children: "Th\u00EAm 40 h\u00E0ng" }), jsx(DropdownItem$1, { className: 'py-25', tag: 'div', onClick: () => handleAdd(50), children: "Th\u00EAm 50 h\u00E0ng" })] })] })] }), (indexFocus ?? -1) > -1 ? jsxs(Fragment$1, { children: [jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.duplicateDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'success', outline: true, onClick: () => { handleDuplicate(); }, className: 'd-flex', children: t('Duplicate') }) }), jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertBeforeDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertBefore, className: 'd-flex', children: t('Insert item before') }) }), jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || addDisable || buttonSetting?.insertAfterDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'success', outline: true, onClick: handleInsertAfter, className: 'd-flex', children: t('Insert item after') }) })] }) : jsx(Fragment$1, { children: " " }), jsx("div", { className: classNames$1('r-toolbar-item', { 'd-none': editDisable || buttonSetting?.deleteAllDisable }), "aria-disabled": "false", children: jsx(Button$1, { color: 'primary', outline: true, onClick: handleDeleteAll, className: 'd-flex', children: t('Delete all item') }) }), toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42234
42306
  return ((item.align === 'left') ? jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-left-${index}`) : '');
42235
42307
  })] }), jsx("div", { className: "r-toolbar-center", children: toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42236
42308
  return ((item.align === 'center') ? jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-center-${index}`) : '');
42237
42309
  }) }), jsxs("div", { className: "r-toolbar-right", children: [toolbarSetting?.toolbarBottomOptions?.map((item, index) => {
42238
42310
  return ((item.align === 'right') ? jsx("div", { className: "r-toolbar-item", "aria-disabled": "false", children: item.template() }, `toolbar-bottom-right-${index}`) : '');
42239
- }), jsx("div", { className: classnames('r-toolbar-item me-25', { 'd-none': headerColumns.length > 1 }), "aria-disabled": "false", children: jsx(SvgSettings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }), jsx("div", { className: classnames('r-toolbar-item me-25', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: jsxs(UncontrolledDropdown, { className: 'dropdown-user nav-item', children: [jsx(DropdownToggle$1, { tag: 'div', color: "primary", onClick: (e) => e.preventDefault(), children: jsx(SvgInfo, { className: "cursor-pointer text-primary" }) }), jsx(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown', children: jsxs("ul", { className: "mb-0 pe-50", children: [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" }), jsx("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \u00F4 v\u00E0 Ctrl + V \u0111\u1EC3 d\u00E1n th\u00F4ng tin t\u1EEB excel" }), 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" }), 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" }), 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" }), 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" })] }) })] }) })] })] }) }));
42311
+ }), jsx("div", { className: classNames$1('r-toolbar-item me-25', { 'd-none': headerColumns.length > 1 }), "aria-disabled": "false", children: jsx(SvgSettings, { className: "text-primary cursor-pointer", onClick: () => setOpenPopupSetupColumn(true) }) }), jsx("div", { className: classNames$1('r-toolbar-item me-25', { 'd-none': editDisable || addDisable }), "aria-disabled": "false", children: jsxs(UncontrolledDropdown, { className: 'dropdown-user nav-item', children: [jsx(DropdownToggle$1, { tag: 'div', color: "primary", onClick: (e) => e.preventDefault(), children: jsx(SvgInfo, { className: "cursor-pointer text-primary" }) }), jsx(DropdownMenu$1, { className: 'formula-dropdown icon-dropdown', children: jsxs("ul", { className: "mb-0 pe-50", children: [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" }), jsx("li", { style: { fontSize: 13 }, children: "Ch\u1ECDn \u00F4 v\u00E0 Ctrl + V \u0111\u1EC3 d\u00E1n th\u00F4ng tin t\u1EEB excel" }), 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" }), 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" }), 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" }), 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" })] }) })] }) })] })] }) }));
42240
42312
  };
42241
42313
 
42242
42314
  const handleArrowRight = (e, params) => {
@@ -42401,10 +42473,10 @@ const SelectTableBox = (props) => {
42401
42473
  const { isLabel, desciptionLabel, id, classLabel, name, label, required } = props;
42402
42474
  return (jsxs(Fragment, { children: [isLabel === false ? '' : jsxs(Label$1, { id: `label-${id}`, className: classLabel, for: name, children: [t(label ? label : ''), " ", required ? jsx("span", { className: "text-danger", children: "*" }) : ''] }), (!isNullOrUndefined$1(desciptionLabel) && desciptionLabel !== '') ?? jsx(Fragment$1, { children: jsx(UncontrolledTooltip, { target: `label-${id}`, children: t(desciptionLabel ?? '') }) })] }));
42403
42475
  };
42404
- return (jsx(Fragment, { children: jsxs("div", { className: classnames(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
42476
+ return (jsx(Fragment, { children: jsxs("div", { className: classNames$1(inLine === false ? 'form-group ' : 'form-row-inline d-flex', 'align', {
42405
42477
  [labelSize ? labelSize : '']: labelSize,
42406
42478
  'form-row-inline-error': errors
42407
- }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxs("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: [jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
42479
+ }), children: [renderLabel({ isLabel, desciptionLabel, classLabel, name, label, required, id: id ?? '' }), jsxs("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: [jsx(Controller, { name: name, control: control, render: ({ field: { value, onChange } }) => {
42408
42480
  return (jsx(SelectTable, { ...rest, id: id, value: (isMulti ? value?.length > 0 : value) ? (!isMulti ? (options.find((val) => val[fieldValue ?? 'value'] === value) ?? (defaultValue ?? '')) : value) : (isMulti ? [] : undefined),
42409
42481
  // 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ị,
42410
42482
  // 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.
@@ -42602,24 +42674,6 @@ const TableEdit = forwardRef((props, ref) => {
42602
42674
  setHeaderColumns(arrHeaderColumns);
42603
42675
  setContentColumns(arrContentColumns);
42604
42676
  }, [columns]);
42605
- useEffect(() => {
42606
- const arrHeaderColumns = [];
42607
- const arrContentColumns = [];
42608
- let headerLevelRow = 0;
42609
- if (levelCol) {
42610
- headerLevelRow = levelCol;
42611
- }
42612
- else {
42613
- headerLevelRow = stretchColumn(columns, 0);
42614
- setLevelCol(headerLevelRow);
42615
- }
42616
- for (let i = 0; i < headerLevelRow; i++) {
42617
- arrHeaderColumns.push([]);
42618
- }
42619
- getNestedChildren(columns, arrHeaderColumns, arrContentColumns, 0, headerLevelRow);
42620
- setHeaderColumns(arrHeaderColumns);
42621
- setContentColumns(arrContentColumns);
42622
- }, [columns]);
42623
42677
  const getNestedChildren = (array, arrHeaderColumns, arrContentColumns, level, maxLevelRow) => {
42624
42678
  array.forEach((item) => {
42625
42679
  const ele = { ...item, visible: item.visible, rowspan: 1, index: 0 };
@@ -42699,7 +42753,7 @@ const TableEdit = forwardRef((props, ref) => {
42699
42753
  /*eslint-disable */
42700
42754
  switch (col?.editTypeCondition ? col?.editTypeCondition(row) : col.editType) {
42701
42755
  case 'date':
42702
- return (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) => {
42756
+ return (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) => {
42703
42757
  row[col.field] = date ? new Date(date.getTime() + 7 * 60 * 60 * 1000) : undefined;
42704
42758
  if (col.callback) {
42705
42759
  col.callback(row[col.field], indexRow, row);
@@ -42711,7 +42765,7 @@ const TableEdit = forwardRef((props, ref) => {
42711
42765
  }
42712
42766
  } }));
42713
42767
  case 'datetime':
42714
- return (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) => {
42768
+ return (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) => {
42715
42769
  row[col.field] = date;
42716
42770
  if (col.callback) {
42717
42771
  col.callback(row[col.field], indexRow, row);
@@ -42846,7 +42900,7 @@ const TableEdit = forwardRef((props, ref) => {
42846
42900
  decimalScale: col.numericSettings?.fraction ?? 0
42847
42901
  };
42848
42902
  let floatValue = parseFloat(row[col.field] ?? '0');
42849
- return (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) => {
42903
+ return (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) => {
42850
42904
  floatValue = values?.floatValue;
42851
42905
  }, onFocus: (e) => {
42852
42906
  e.target.setSelectionRange(0, e.target.innerText.length - 1);
@@ -42912,7 +42966,7 @@ const TableEdit = forwardRef((props, ref) => {
42912
42966
  }
42913
42967
  } }));
42914
42968
  default:
42915
- return (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) => {
42969
+ return (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) => {
42916
42970
  if (row[col.field] != val.target?.value) {
42917
42971
  row[col.field] = val.target?.value;
42918
42972
  if (col.callback) {
@@ -43255,14 +43309,14 @@ const TableEdit = forwardRef((props, ref) => {
43255
43309
  }, [selectedItem]);
43256
43310
  const renderContentCol = (col, row, indexRow, indexCol, isSelected) => {
43257
43311
  if (col.field === 'command') {
43258
- return (col.visible !== false && 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: {
43312
+ return (col.visible !== false && 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: {
43259
43313
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43260
43314
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43261
43315
  textAlign: col.textAlign ? col.textAlign : 'left',
43262
43316
  }, children: jsx("div", { className: "r-rowcell-div command", children: jsx(CommandElement, { commandItems: col.commandItems ?? [], handleCommandClick: handleCommandClick, indexRow: indexRow, rowData: row, setIndexFocus: setIndexFocus, indexFocus: indexFocus }) }) }, `col-${indexRow}-${indexCol}`));
43263
43317
  }
43264
43318
  else if (col.field === '#') {
43265
- return (col.visible !== false && 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: {
43319
+ return (col.visible !== false && 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: {
43266
43320
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43267
43321
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43268
43322
  textAlign: 'center',
@@ -43300,7 +43354,7 @@ const TableEdit = forwardRef((props, ref) => {
43300
43354
  }, children: jsx("div", { className: "r-rowcell-div", children: indexRow + 1 }) }, `col-${indexRow}-${indexCol}`));
43301
43355
  }
43302
43356
  else if (col.field === 'checkbox') {
43303
- return (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: {
43357
+ return (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: {
43304
43358
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43305
43359
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43306
43360
  }, children: jsx("div", { className: "r-rowcell-div cursor-pointer", style: { alignItems: 'center' }, onClick: (e) => {
@@ -43340,7 +43394,7 @@ const TableEdit = forwardRef((props, ref) => {
43340
43394
  }
43341
43395
  const typeDis = !editDisable && (indexFocus === indexRow || col.editType === 'checkbox') && (!col.disabledCondition || !col.disabledCondition(row)) ? (col.editEnable ? 1 : (col.template ? 2 : 3)) : (col.template ? 2 : 3);
43342
43396
  const errorMessage = typeDis === 1 || col.field === '' || !col.validate ? '' : col.validate(row[col.field], row);
43343
- return (jsx(Fragment, { children: col.visible !== false && 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: {
43397
+ return (jsx(Fragment, { children: col.visible !== false && 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: {
43344
43398
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43345
43399
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43346
43400
  }, onClick: (e) => {
@@ -43371,9 +43425,9 @@ const TableEdit = forwardRef((props, ref) => {
43371
43425
  }
43372
43426
  e.stopPropagation();
43373
43427
  }
43374
- }, children: jsx("div", { className: classnames('r-rowcell-div'), children: jsxs("div", { id: indexFocus === indexRow && typeDis !== 1 ? `${idTable}-col${indexCol + 1}-row${indexRow + 1}` : '', className: classnames('r-rowcell-content', { 'r-is-invalid': errorMessage }), style: {
43428
+ }, children: jsx("div", { className: classNames$1('r-rowcell-div'), children: 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: {
43375
43429
  textAlign: col.textAlign ? col.textAlign : 'left'
43376
- }, children: [typeDis === 1 && !refreshRow && jsx(Fragment$1, { children: RenderEditCell(row, col, indexCol, indexRow) }), (typeDis !== 1 || refreshRow) && RenderContentCell(row, col, indexCol, indexRow, typeDis, value), jsx("span", { id: `error-${indexRow}-${indexCol}`, className: classnames('cursor-pointer text-primary icon-table', { 'd-none': !errorMessage }), children: jsx(SvgAlertCircle, { fontSize: 15.5 }) }), jsx(UncontrolledTooltip, { target: `error-${indexRow}-${indexCol}`, className: "r-tooltip tooltip-error", children: errorMessage?.toString() ?? '' })] }) }) }, `col-${indexRow}-${indexCol}`) }, indexCol));
43430
+ }, children: [typeDis === 1 && !refreshRow && jsx(Fragment$1, { children: RenderEditCell(row, col, indexCol, indexRow) }), (typeDis !== 1 || refreshRow) && RenderContentCell(row, col, indexCol, indexRow, typeDis, value), jsx("span", { id: `error-${indexRow}-${indexCol}`, className: classNames$1('cursor-pointer text-primary icon-table', { 'd-none': !errorMessage }), children: jsx(SvgAlertCircle, { fontSize: 15.5 }) }), jsx(UncontrolledTooltip, { target: `error-${indexRow}-${indexCol}`, className: "r-tooltip tooltip-error", children: errorMessage?.toString() ?? '' })] }) }) }, `col-${indexRow}-${indexCol}`) }, indexCol));
43377
43431
  }
43378
43432
  };
43379
43433
  const RenderContentCell = (row, col, indexCol, indexRow, typeDis, value) => {
@@ -43390,7 +43444,7 @@ const TableEdit = forwardRef((props, ref) => {
43390
43444
  };
43391
43445
  const renderFooterCol = (col, indexCol) => {
43392
43446
  const sumValue = (col.haveSum === true && col.editType === "numeric") ? dataSource.reduce(function (accumulator, currentValue) { return (Number(accumulator ?? 0) + Number(currentValue[col.field] ?? 0)); }, 0) : 0;
43393
- return (jsx(Fragment, { children: (col.visible !== false) && jsx("td", { className: classnames(`p-0 px-50 r-footer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
43447
+ return (jsx(Fragment, { children: (col.visible !== false) && jsx("td", { className: classNames$1(`p-0 px-50 r-footer fix-${col.fixedType}`, { 'cell-fixed': col.fixedType }), style: {
43394
43448
  left: col.fixedType === 'left' ? objWidthFixLeft[indexCol] : undefined,
43395
43449
  right: col.fixedType === 'right' ? objWidthFixRight[indexCol] : undefined,
43396
43450
  textAlign: col.textAlign ? col.textAlign : 'left'
@@ -43414,7 +43468,7 @@ const TableEdit = forwardRef((props, ref) => {
43414
43468
  const flagSearch = !searchClient || checkSearch(searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, row, searchSetting?.keyField ?? []);
43415
43469
  if (flagSearch) {
43416
43470
  const flagDisplay = !pagingClient || ((indexRow + 1) > ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1)) && (indexRow + 1) <= ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0))));
43417
- return (flagDisplay && jsx(Fragment$1, { children: jsx("tr", { className: classnames('r-row'), children: contentColumns.map((col, indexCol) => renderContentCol(col, row, indexRow, indexCol, isSelected)) }, `row-${indexRow}`) }));
43471
+ return (flagDisplay && jsx(Fragment$1, { children: jsx("tr", { className: classNames$1('r-row'), children: contentColumns.map((col, indexCol) => renderContentCol(col, row, indexRow, indexCol, isSelected)) }, `row-${indexRow}`) }));
43418
43472
  }
43419
43473
  }));
43420
43474
  };
@@ -43533,7 +43587,7 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
43533
43587
  const handleModal = (name) => {
43534
43588
  setOpenModal((old) => ({ ...old, [name]: !(openModal[name] ?? false) }));
43535
43589
  };
43536
- return (jsxs(Fragment, { children: [renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : '', jsxs("div", { className: classnames('tab-custom', { 'tab-parent': tabParent }, { 'tab-child': tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [jsx("div", { onClick: () => handleScroll(-200), className: classnames('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsx(SvgChevronLeft, {}) }), jsx("div", { ref: tabComponentRef, className: "tab-component", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: jsx("div", { ref: contentComponentRef, children: dataMenu.map((item) => {
43590
+ return (jsxs(Fragment, { children: [renderModal ? renderModal({ handleModal, windowSize, openModal, setDataItem, dataItem }) : '', jsxs("div", { className: classNames$1('tab-custom', { 'tab-parent': tabParent }, { 'tab-child': tabChild }), style: { width: `calc(100% - ${buttonWidth ?? 100}px` }, children: [jsx("div", { onClick: () => handleScroll(-200), className: classNames$1('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsx(SvgChevronLeft, {}) }), jsx("div", { ref: tabComponentRef, className: "tab-component", onMouseDown: handleMouseDown, onMouseMove: handleMouseMove, onMouseUp: handleMouseUp, onMouseLeave: handleMouseUp, children: jsx("div", { ref: contentComponentRef, children: dataMenu.map((item) => {
43537
43591
  if (item?.resAttributes?.IS_MENU === '1') {
43538
43592
  return (jsxs(UncontrolledDropdown, { draggable: false, className: "tab-custom-item", isOpen: openMenu, toggle: toggleMenu, direction: 'down', style: { backgroundColor: openMenu ? '#e0e0e0' : '' }, children: [jsx(DropdownToggle$1, { color: "#00000", style: { border: 'none', boxShadow: 'none', margin: 0, padding: 0 }, className: "background-none", children: jsx("div", { children: item.name }) }), jsx(DropdownMenu$1, { container: document.body, end: true, style: { width: 300 }, children: item?.children?.map((x) => jsx(DropdownItem$1, { style: { borderRadius: '5px', margin: "0 0.5rem", width: "95%" }, onClick: () => {
43539
43593
  if (x.resAttributes.MODAL_VALUE) {
@@ -43545,9 +43599,9 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
43545
43599
  }, children: x.name }, x.code)) })] }, item.code));
43546
43600
  }
43547
43601
  else {
43548
- return (jsx(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));
43602
+ return (jsx(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));
43549
43603
  }
43550
- }) }) }), jsx("div", { onClick: () => handleScroll(200), className: classnames('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsx(SvgChevronRight, {}) })] })] }));
43604
+ }) }) }), jsx("div", { onClick: () => handleScroll(200), className: classNames$1('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsx(SvgChevronRight, {}) })] })] }));
43551
43605
  };
43552
43606
 
43553
43607
  const OptionFont = [
@@ -44430,23 +44484,23 @@ const InputStyleComponent = (props) => {
44430
44484
  backgroundColor: value.backgroundColor ?? '#ffffff',
44431
44485
  color: value.color ?? '#000000'
44432
44486
  }, children: props.label }));
44433
- } }), jsx("div", { className: classnames('ms-25', { 'd-none': disabledFontSize }), style: { width: 60 }, children: 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) => {
44487
+ } }), jsx("div", { className: classNames$1('ms-25', { 'd-none': disabledFontSize }), style: { width: 60 }, children: 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) => {
44434
44488
  onChange({ ...value, fontSize: val.value });
44435
- } }) }), jsx("div", { className: classnames('btn-input-style', { 'active-custom': value.bold }, { 'd-none': disabledBold }), onClick: () => {
44489
+ } }) }), jsx("div", { className: classNames$1('btn-input-style', { 'active-custom': value.bold }, { 'd-none': disabledBold }), onClick: () => {
44436
44490
  if (!disabled) {
44437
44491
  onChange({ ...value, bold: !value.bold });
44438
44492
  }
44439
- }, children: jsx(SvgBold, { fontSize: 18 }) }), jsx("div", { className: classnames('btn-input-style', { 'active-custom': value.italic }, { 'd-none': disabledItalic }), onClick: () => {
44493
+ }, children: jsx(SvgBold, { fontSize: 18 }) }), jsx("div", { className: classNames$1('btn-input-style', { 'active-custom': value.italic }, { 'd-none': disabledItalic }), onClick: () => {
44440
44494
  if (!disabled) {
44441
44495
  onChange({ ...value, italic: !value.italic });
44442
44496
  }
44443
- }, children: jsx(SvgItalic, { fontSize: 18 }) }), jsx("div", { className: classnames('btn-input-style', { 'active-custom': value.underline }, { 'd-none': disabledUnderline }), onClick: () => {
44497
+ }, children: jsx(SvgItalic, { fontSize: 18 }) }), jsx("div", { className: classNames$1('btn-input-style', { 'active-custom': value.underline }, { 'd-none': disabledUnderline }), onClick: () => {
44444
44498
  if (!disabled) {
44445
44499
  onChange({ ...value, underline: !value.underline });
44446
44500
  }
44447
- }, children: jsx(SvgUnderline, { fontSize: 18 }) }), jsxs(Button$1, { tag: 'label', color: 'none', className: classnames('btn-input-style', { 'd-none': disabledColor }), children: [jsx(SvgType, { stroke: value.color ?? '#000000', fontSize: 18 }), 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) => {
44501
+ }, children: jsx(SvgUnderline, { fontSize: 18 }) }), jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$1('btn-input-style', { 'd-none': disabledColor }), children: [jsx(SvgType, { stroke: value.color ?? '#000000', fontSize: 18 }), 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) => {
44448
44502
  onChange({ ...value, color: e.target.value });
44449
- } })] }), jsxs(Button$1, { tag: 'label', color: 'none', className: classnames('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsx(SvgDroplet, { fill: value.backgroundColor ?? '#ffffff', fontSize: 18 }), 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) => {
44503
+ } })] }), jsxs(Button$1, { tag: 'label', color: 'none', className: classNames$1('btn-input-style', { 'd-none': disabledBackgroundColor }), children: [jsx(SvgDroplet, { fill: value.backgroundColor ?? '#ffffff', fontSize: 18 }), 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) => {
44450
44504
  onChange({ ...value, backgroundColor: e.target.value });
44451
44505
  } })] })] }) }));
44452
44506
  };
@@ -45908,10 +45962,10 @@ const CheckboxInput = (props) => {
45908
45962
  }
45909
45963
  } })) }) }));
45910
45964
  };
45911
- return (jsx(Fragment, { children: jsxs("div", { className: classnames(inLine === false ? 'form-group ' : 'form-row-inline d-flex', {
45965
+ return (jsx(Fragment, { children: jsxs("div", { className: classNames$1(inLine === false ? 'form-group ' : 'form-row-inline d-flex', {
45912
45966
  [labelSize ? labelSize : '']: labelSize,
45913
45967
  reverse
45914
- }), children: [renderLabel({ isLabel, name, label: label ?? '' }), jsxs("div", { className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: [renderInput(), renderText()] })] }) }));
45968
+ }), children: [renderLabel({ isLabel, name, label: label ?? '' }), jsxs("div", { className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: [renderInput(), renderText()] })] }) }));
45915
45969
  };
45916
45970
 
45917
45971
  const defaultStyleExportSetting = {
@@ -45999,11 +46053,11 @@ const StyleInput = (props) => {
45999
46053
  return (jsx(InputStyleComponent, { disabledBackgroundColor: disabledBackgroundColor, disabledFontFamily: disabledFontFamily, disabledFontSize: disabledFontSize, disabledBold: disabledBold, disabledItalic: disabledItalic, disabledUnderline: disabledUnderline, disabled: disabled, value: value, onChange: onChange }));
46000
46054
  } }), errors && jsx(FormFeedback$1, { children: errors?.message })] }));
46001
46055
  };
46002
- return (jsx(Fragment, { children: jsxs("div", { className: classnames(' align', {
46056
+ return (jsx(Fragment, { children: jsxs("div", { className: classNames$1(' align', {
46003
46057
  [labelSize ? labelSize : '']: labelSize,
46004
46058
  [classes ? classes : '']: classes,
46005
46059
  'form-row-inline-error': errors
46006
- }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { style: { height: `${height}px` }, className: classnames('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
46060
+ }, inLine === false ? 'form-group ' : 'form-row-inline d-flex'), children: [renderLabel({ isLabel, name, label, required }), jsx("div", { style: { height: `${height}px` }, className: classNames$1('form-input-content', { 'hidden-label': isLabel === false }), children: renderInput() })] }) }));
46007
46061
  };
46008
46062
 
46009
46063
  const ExportExcelComponent = ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }) => {
@@ -65272,7 +65326,7 @@ const Wizard = forwardRef((props, ref) => {
65272
65326
  // ** Renders Wizard Header
65273
65327
  const renderHeader = () => {
65274
65328
  return steps.map((step, index) => {
65275
- return (jsxs(Fragment, { children: [index !== 0 && index !== steps.length ? jsx("div", { className: 'line', children: separator }) : null, jsx("div", { className: classnames('step', {
65329
+ return (jsxs(Fragment, { children: [index !== 0 && index !== steps.length ? jsx("div", { className: 'line', children: separator }) : null, jsx("div", { className: classNames$1('step', {
65276
65330
  crossed: (step.done !== undefined ? step.done : activeStep > (index + 1)),
65277
65331
  disable: step.disable,
65278
65332
  active: (index + 1) === activeStep
@@ -65282,18 +65336,18 @@ const Wizard = forwardRef((props, ref) => {
65282
65336
  // ** Renders Wizard Content
65283
65337
  const renderContent = () => {
65284
65338
  return steps.map((step, index) => {
65285
- return (jsx("div", { className: classnames('content', {
65339
+ return (jsx("div", { className: classNames$1('content', {
65286
65340
  [contentClassName]: contentClassName,
65287
65341
  'active dstepper-block': activeStep === (index + 1)
65288
65342
  }), id: step.id, children: step.content }, step.id));
65289
65343
  });
65290
65344
  };
65291
- return (jsxs("div", { ref: ref, className: classnames('bs-stepper', {
65345
+ return (jsxs("div", { ref: ref, className: classNames$1('bs-stepper', {
65292
65346
  [className]: className,
65293
65347
  vertical: type === 'vertical',
65294
65348
  'vertical wizard-modern': type === 'modern-vertical',
65295
65349
  'wizard-modern': type === 'modern-horizontal'
65296
- }), children: [jsx("div", { className: classnames('bs-stepper-header', { [headerClassName]: headerClassName }), children: renderHeader() }), jsx("div", { style: { height: heightContent, width: widthContent }, className: classnames('bs-stepper-content', { [contentWrapperClassName]: contentWrapperClassName }), children: renderContent() })] }));
65350
+ }), children: [jsx("div", { className: classNames$1('bs-stepper-header', { [headerClassName]: headerClassName }), children: renderHeader() }), jsx("div", { style: { height: heightContent, width: widthContent }, className: classNames$1('bs-stepper-content', { [contentWrapperClassName]: contentWrapperClassName }), children: renderContent() })] }));
65297
65351
  });
65298
65352
 
65299
65353
  const ImportExcelComponent = (props) => {
@@ -65324,5 +65378,5 @@ const ImportExcelComponent = (props) => {
65324
65378
  ] }) }));
65325
65379
  };
65326
65380
 
65327
- export { ExportExcelComponent, FindNodeByPath, ImportExcelComponent, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, Wizard, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined$1 as isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
65381
+ export { ExportExcelComponent, FindNodeByPath, ImportExcelComponent, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, Wizard, calculateTableStructure, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined$1 as isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
65328
65382
  //# sourceMappingURL=index.mjs.map