react-table-edit 1.4.4 → 1.4.6

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.
@@ -6,7 +6,9 @@ type IFSteps = {
6
6
  subtitle?: JSX.Element | string;
7
7
  title: JSX.Element | string;
8
8
  icon?: JSX.Element | string;
9
- isDone?: boolean;
9
+ done?: boolean;
10
+ loading?: boolean;
11
+ disable?: boolean;
10
12
  };
11
13
  type IFProps = {
12
14
  steps: IFSteps[];
@@ -16,6 +18,8 @@ type IFProps = {
16
18
  headerClassName?: string;
17
19
  contentClassName?: string;
18
20
  contentWrapperClassName?: string;
21
+ heightContent?: number | string;
22
+ widthContent?: number | string;
19
23
  type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
20
24
  separator?: JSX.Element;
21
25
  };
package/dist/index.d.ts CHANGED
@@ -443,7 +443,9 @@ type IFSteps = {
443
443
  subtitle?: JSX.Element | string;
444
444
  title: JSX.Element | string;
445
445
  icon?: JSX.Element | string;
446
- isDone?: boolean;
446
+ done?: boolean;
447
+ loading?: boolean;
448
+ disable?: boolean;
447
449
  };
448
450
  type IFProps = {
449
451
  steps: IFSteps[];
@@ -453,6 +455,8 @@ type IFProps = {
453
455
  headerClassName?: string;
454
456
  contentClassName?: string;
455
457
  contentWrapperClassName?: string;
458
+ heightContent?: number | string;
459
+ widthContent?: number | string;
456
460
  type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
457
461
  separator?: JSX.Element;
458
462
  };
package/dist/index.js CHANGED
@@ -42371,7 +42371,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42371
42371
  const [searchTerm, setSearchTerm] = React$5.useState('');
42372
42372
  const tableElement = React$5.useRef(null);
42373
42373
  const gridRef = React$5.useRef(null);
42374
- let totalCount = dataSource.length;
42374
+ const totalCount = dataSource.length;
42375
42375
  const pagingClient = pagingSetting?.allowPaging && (pagingSetting?.pagingClient || !(editDisable || addDisable));
42376
42376
  const searchClient = searchSetting?.searchEnable && (searchSetting?.searchClient || !(editDisable || addDisable));
42377
42377
  const fieldKey = columns.find((item) => item.isPrimarykey === true)?.field ?? 'id';
@@ -42724,7 +42724,7 @@ const TableEdit = React$5.forwardRef((props, ref) => {
42724
42724
  } }, `col-${indexRow}-${indexCol}`) }));
42725
42725
  case 'form':
42726
42726
  return (jsxRuntime.jsx(EditForm, { id: `${idTable}-col${indexCol + 1}-row${indexRow + 1}`, ...col.formSettings, field: col.field, displayValue: col.formSettings?.displayValue ? col.formSettings?.displayValue(row) : '', placeholder: col.placeholder ? t(col.placeholder) : '', rowData: row, indexRow: indexRow, onChange: (val) => {
42727
- row = { ...row, ...val };
42727
+ Object.assign(row, val);
42728
42728
  handleDataChange(row, col, indexRow);
42729
42729
  }, invalid: col.validate && col.validate(row[col.field], row), textAlign: col.textAlign, onKeyDown: (e) => {
42730
42730
  return checkKeyDown(e, row, col, indexRow + 1, indexCol + 1);
@@ -65065,14 +65065,15 @@ styleInject(css_248z);
65065
65065
 
65066
65066
  const Wizard = React$5.forwardRef((props, ref) => {
65067
65067
  // ** Props
65068
- const { steps, activeStep, setActiveStep, className = '', headerClassName = '', contentClassName = '', contentWrapperClassName = '', type = 'horizontal', separator = jsxRuntime.jsx(SvgChevronRight, { fontSize: 17 }) } = props;
65068
+ const { steps, activeStep, setActiveStep, className = '', headerClassName = '', contentClassName = '', contentWrapperClassName = '', type = 'horizontal', heightContent = 'auto', widthContent = '100%', separator = jsxRuntime.jsx(SvgChevronRight, { fontSize: 17 }) } = props;
65069
65069
  // ** Renders Wizard Header
65070
65070
  const renderHeader = () => {
65071
65071
  return steps.map((step, index) => {
65072
65072
  return (jsxRuntime.jsxs(React$5.Fragment, { children: [index !== 0 && index !== steps.length ? jsxRuntime.jsx("div", { className: 'line', children: separator }) : null, jsxRuntime.jsx("div", { className: classnames('step', {
65073
- crossed: step.isDone !== undefined ? step.isDone : activeStep > index,
65073
+ crossed: (step.done !== undefined ? step.done : activeStep > index),
65074
+ disable: step.disable,
65074
65075
  active: index === activeStep
65075
- }), "data-target": `#${step.id}`, children: jsxRuntime.jsxs("button", { type: 'button', className: 'step-trigger', onClick: () => setActiveStep?.(index), children: [jsxRuntime.jsx("span", { className: 'bs-stepper-box', children: step.icon ? step.icon : index + 1 }), jsxRuntime.jsxs("span", { className: 'bs-stepper-label', children: [jsxRuntime.jsx("span", { className: 'bs-stepper-title', children: step.title }), step.subtitle ? jsxRuntime.jsx("span", { className: 'bs-stepper-subtitle', children: step.subtitle }) : null] })] }) })] }, step.id));
65076
+ }), "data-target": `#${step.id}`, children: jsxRuntime.jsxs("button", { type: 'button', disabled: step.disable, className: 'step-trigger', onClick: () => setActiveStep?.(index), children: [jsxRuntime.jsx("span", { className: 'bs-stepper-box', children: step.icon ? step.icon : index + 1 }), jsxRuntime.jsxs("span", { className: 'bs-stepper-label', children: [jsxRuntime.jsxs("span", { className: 'bs-stepper-title', children: [step.title, " "] }), step.loading && jsxRuntime.jsx(Spinner$1, { className: 'text-info', style: { borderWidth: 2, height: 15, width: 15, marginRight: 3 } }), " ", step.subtitle ? jsxRuntime.jsx("span", { className: 'bs-stepper-subtitle', children: step.subtitle }) : null] })] }) })] }, step.id));
65076
65077
  });
65077
65078
  };
65078
65079
  // ** Renders Wizard Content
@@ -65089,7 +65090,7 @@ const Wizard = React$5.forwardRef((props, ref) => {
65089
65090
  vertical: type === 'vertical',
65090
65091
  'vertical wizard-modern': type === 'modern-vertical',
65091
65092
  'wizard-modern': type === 'modern-horizontal'
65092
- }), children: [jsxRuntime.jsx("div", { className: classnames('bs-stepper-header', { [headerClassName]: headerClassName }), children: renderHeader() }), jsxRuntime.jsx("div", { className: classnames('bs-stepper-content', { [contentWrapperClassName]: contentWrapperClassName }), children: renderContent() })] }));
65093
+ }), children: [jsxRuntime.jsx("div", { className: classnames('bs-stepper-header', { [headerClassName]: headerClassName }), children: renderHeader() }), jsxRuntime.jsx("div", { style: { height: heightContent, width: widthContent }, className: classnames('bs-stepper-content', { [contentWrapperClassName]: contentWrapperClassName }), children: renderContent() })] }));
65093
65094
  });
65094
65095
 
65095
65096
  const ImportExcelComponent = (props) => {