react-table-edit 1.4.1 → 1.4.3

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.
@@ -1,3 +1,23 @@
1
+ import { JSX } from 'react';
1
2
  import 'bs-stepper/dist/css/bs-stepper.min.css';
2
- declare const Wizard: import("react").ForwardRefExoticComponent<Omit<any, "ref"> & import("react").RefAttributes<unknown>>;
3
- export default Wizard;
3
+ type IFSteps = {
4
+ id: string;
5
+ content: JSX.Element;
6
+ subtitle?: JSX.Element | string;
7
+ title: JSX.Element | string;
8
+ icon?: JSX.Element | string;
9
+ isDone?: boolean;
10
+ };
11
+ type IFProps = {
12
+ steps: IFSteps[];
13
+ activeStep: number;
14
+ setActiveStep?: (stepper: number) => void;
15
+ className?: string;
16
+ headerClassName?: string;
17
+ contentClassName?: string;
18
+ contentWrapperClassName?: string;
19
+ type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
20
+ separator?: JSX.Element;
21
+ };
22
+ declare const Wizard: import("react").ForwardRefExoticComponent<IFProps & import("react").RefAttributes<unknown>>;
23
+ export { Wizard };
package/dist/index.d.ts CHANGED
@@ -438,4 +438,25 @@ interface IFPropsDetail {
438
438
  }
439
439
  declare const ImportExcelComponent: (props: IFPropsDetail) => react_jsx_runtime.JSX.Element;
440
440
 
441
- export { ExportExcelComponent, FindNodeByPath, type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFPropsDetail, type IFTableEditButton, type IFTableEditFormat, type IFTableEditPaging, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFTableSelectFormat, type IFTableTreeSelectFormat, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, ImportExcelComponent, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
441
+ type IFSteps = {
442
+ id: string;
443
+ content: JSX.Element;
444
+ subtitle?: JSX.Element | string;
445
+ title: JSX.Element | string;
446
+ icon?: JSX.Element | string;
447
+ isDone?: boolean;
448
+ };
449
+ type IFProps = {
450
+ steps: IFSteps[];
451
+ activeStep: number;
452
+ setActiveStep?: (stepper: number) => void;
453
+ className?: string;
454
+ headerClassName?: string;
455
+ contentClassName?: string;
456
+ contentWrapperClassName?: string;
457
+ type?: 'vertical' | 'horizontal' | 'modern-horizontal' | 'modern-vertical';
458
+ separator?: JSX.Element;
459
+ };
460
+ declare const Wizard: React.ForwardRefExoticComponent<IFProps & React.RefAttributes<unknown>>;
461
+
462
+ export { ExportExcelComponent, FindNodeByPath, type FromItemsField, type IColumnTable, type ICommandItem, type IFColumnSelectTable, type IFColumnSelectTableTree, type IFCurrentPage, type IFCurrentPageConfig, type IFPageSize, type IFPropsDetail, type IFTableEditButton, type IFTableEditFormat, type IFTableEditPaging, type IFTableEditSearchSetting, type IFTableEditToolbar, type IFTableSelectFormat, type IFTableTreeSelectFormat, type IFToolbarOptions, type IHeaderColumnTable, type ISettingFormElement, type ISettingNumericElement, type ISettingSelectElement, ImportExcelComponent, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, Wizard, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
package/dist/index.js CHANGED
@@ -43206,13 +43206,11 @@ const TableEdit = React$5.forwardRef((props, ref) => {
43206
43206
  return false;
43207
43207
  };
43208
43208
  const renderData = () => {
43209
- totalCount = 0;
43210
43209
  return (dataSource.map((row, indexRow) => {
43211
43210
  const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
43212
43211
  const flagSearch = !searchClient || checkSearch(searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, row, searchSetting?.keyField ?? []);
43213
43212
  if (flagSearch) {
43214
- totalCount += 1;
43215
- const flagDisplay = !pagingClient || (totalCount > ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1)) && totalCount <= ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0))));
43213
+ const flagDisplay = !pagingClient || ((indexRow + 1) > ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1)) && (indexRow + 1) <= ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0))));
43216
43214
  return (flagDisplay && jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx("tr", { className: classnames('r-row'), children: contentColumns.map((col, indexCol) => renderContentCol(col, row, indexRow, indexCol, isSelected)) }, `row-${indexRow}`) }));
43217
43215
  }
43218
43216
  }));
@@ -65062,466 +65060,19 @@ const TabHandleErrorImportExcel = (props) => {
65062
65060
  } }, 'HandleErrorExcel')] }));
65063
65061
  };
65064
65062
 
65065
- var bsStepper = {exports: {}};
65066
-
65067
- /*!
65068
- * bsStepper v1.7.0 (https://github.com/Johann-S/bs-stepper)
65069
- * Copyright 2018 - 2019 Johann-S <johann.servoire@gmail.com>
65070
- * Licensed under MIT (https://github.com/Johann-S/bs-stepper/blob/master/LICENSE)
65071
- */
65072
-
65073
- (function (module, exports) {
65074
- (function (global, factory) {
65075
- module.exports = factory() ;
65076
- }(commonjsGlobal, function () {
65077
- function _extends() {
65078
- _extends = Object.assign || function (target) {
65079
- for (var i = 1; i < arguments.length; i++) {
65080
- var source = arguments[i];
65081
-
65082
- for (var key in source) {
65083
- if (Object.prototype.hasOwnProperty.call(source, key)) {
65084
- target[key] = source[key];
65085
- }
65086
- }
65087
- }
65088
-
65089
- return target;
65090
- };
65091
-
65092
- return _extends.apply(this, arguments);
65093
- }
65094
-
65095
- var matches = window.Element.prototype.matches;
65096
-
65097
- var closest = function closest(element, selector) {
65098
- return element.closest(selector);
65099
- };
65100
-
65101
- var WinEvent = function WinEvent(inType, params) {
65102
- return new window.Event(inType, params);
65103
- };
65104
-
65105
- var createCustomEvent = function createCustomEvent(eventName, params) {
65106
- var cEvent = new window.CustomEvent(eventName, params);
65107
- return cEvent;
65108
- };
65109
- /* istanbul ignore next */
65110
-
65111
-
65112
- function polyfill() {
65113
- if (!window.Element.prototype.matches) {
65114
- matches = window.Element.prototype.msMatchesSelector || window.Element.prototype.webkitMatchesSelector;
65115
- }
65116
-
65117
- if (!window.Element.prototype.closest) {
65118
- closest = function closest(element, selector) {
65119
- if (!document.documentElement.contains(element)) {
65120
- return null;
65121
- }
65122
-
65123
- do {
65124
- if (matches.call(element, selector)) {
65125
- return element;
65126
- }
65127
-
65128
- element = element.parentElement || element.parentNode;
65129
- } while (element !== null && element.nodeType === 1);
65130
-
65131
- return null;
65132
- };
65133
- }
65134
-
65135
- if (!window.Event || typeof window.Event !== 'function') {
65136
- WinEvent = function WinEvent(inType, params) {
65137
- params = params || {};
65138
- var e = document.createEvent('Event');
65139
- e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
65140
- return e;
65141
- };
65142
- }
65143
-
65144
- if (typeof window.CustomEvent !== 'function') {
65145
- var originPreventDefault = window.Event.prototype.preventDefault;
65146
-
65147
- createCustomEvent = function createCustomEvent(eventName, params) {
65148
- var evt = document.createEvent('CustomEvent');
65149
- params = params || {
65150
- bubbles: false,
65151
- cancelable: false,
65152
- detail: null
65153
- };
65154
- evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
65155
-
65156
- evt.preventDefault = function () {
65157
- if (!this.cancelable) {
65158
- return;
65159
- }
65160
-
65161
- originPreventDefault.call(this);
65162
- Object.defineProperty(this, 'defaultPrevented', {
65163
- get: function get() {
65164
- return true;
65165
- }
65166
- });
65167
- };
65168
-
65169
- return evt;
65170
- };
65171
- }
65172
- }
65173
-
65174
- polyfill();
65175
-
65176
- var MILLISECONDS_MULTIPLIER = 1000;
65177
- var ClassName = {
65178
- ACTIVE: 'active',
65179
- LINEAR: 'linear',
65180
- BLOCK: 'dstepper-block',
65181
- NONE: 'dstepper-none',
65182
- FADE: 'fade',
65183
- VERTICAL: 'vertical'
65184
- };
65185
- var transitionEndEvent = 'transitionend';
65186
- var customProperty = 'bsStepper';
65187
-
65188
- var show = function show(stepperNode, indexStep, options, done) {
65189
- var stepper = stepperNode[customProperty];
65190
-
65191
- if (stepper._steps[indexStep].classList.contains(ClassName.ACTIVE) || stepper._stepsContents[indexStep].classList.contains(ClassName.ACTIVE)) {
65192
- return;
65193
- }
65194
-
65195
- var showEvent = createCustomEvent('show.bs-stepper', {
65196
- cancelable: true,
65197
- detail: {
65198
- from: stepper._currentIndex,
65199
- to: indexStep,
65200
- indexStep: indexStep
65201
- }
65202
- });
65203
- stepperNode.dispatchEvent(showEvent);
65204
-
65205
- var activeStep = stepper._steps.filter(function (step) {
65206
- return step.classList.contains(ClassName.ACTIVE);
65207
- });
65208
-
65209
- var activeContent = stepper._stepsContents.filter(function (content) {
65210
- return content.classList.contains(ClassName.ACTIVE);
65211
- });
65212
-
65213
- if (showEvent.defaultPrevented) {
65214
- return;
65215
- }
65216
-
65217
- if (activeStep.length) {
65218
- activeStep[0].classList.remove(ClassName.ACTIVE);
65219
- }
65220
-
65221
- if (activeContent.length) {
65222
- activeContent[0].classList.remove(ClassName.ACTIVE);
65223
-
65224
- if (!stepperNode.classList.contains(ClassName.VERTICAL) && !stepper.options.animation) {
65225
- activeContent[0].classList.remove(ClassName.BLOCK);
65226
- }
65227
- }
65228
-
65229
- showStep(stepperNode, stepper._steps[indexStep], stepper._steps, options);
65230
- showContent(stepperNode, stepper._stepsContents[indexStep], stepper._stepsContents, activeContent, done);
65231
- };
65232
-
65233
- var showStep = function showStep(stepperNode, step, stepList, options) {
65234
- stepList.forEach(function (step) {
65235
- var trigger = step.querySelector(options.selectors.trigger);
65236
- trigger.setAttribute('aria-selected', 'false'); // if stepper is in linear mode, set disabled attribute on the trigger
65237
-
65238
- if (stepperNode.classList.contains(ClassName.LINEAR)) {
65239
- trigger.setAttribute('disabled', 'disabled');
65240
- }
65241
- });
65242
- step.classList.add(ClassName.ACTIVE);
65243
- var currentTrigger = step.querySelector(options.selectors.trigger);
65244
- currentTrigger.setAttribute('aria-selected', 'true'); // if stepper is in linear mode, remove disabled attribute on current
65245
-
65246
- if (stepperNode.classList.contains(ClassName.LINEAR)) {
65247
- currentTrigger.removeAttribute('disabled');
65248
- }
65249
- };
65250
-
65251
- var showContent = function showContent(stepperNode, content, contentList, activeContent, done) {
65252
- var stepper = stepperNode[customProperty];
65253
- var toIndex = contentList.indexOf(content);
65254
- var shownEvent = createCustomEvent('shown.bs-stepper', {
65255
- cancelable: true,
65256
- detail: {
65257
- from: stepper._currentIndex,
65258
- to: toIndex,
65259
- indexStep: toIndex
65260
- }
65261
- });
65262
-
65263
- function complete() {
65264
- content.classList.add(ClassName.BLOCK);
65265
- content.removeEventListener(transitionEndEvent, complete);
65266
- stepperNode.dispatchEvent(shownEvent);
65267
- done();
65268
- }
65269
-
65270
- if (content.classList.contains(ClassName.FADE)) {
65271
- content.classList.remove(ClassName.NONE);
65272
- var duration = getTransitionDurationFromElement(content);
65273
- content.addEventListener(transitionEndEvent, complete);
65274
-
65275
- if (activeContent.length) {
65276
- activeContent[0].classList.add(ClassName.NONE);
65277
- }
65278
-
65279
- content.classList.add(ClassName.ACTIVE);
65280
- emulateTransitionEnd(content, duration);
65281
- } else {
65282
- content.classList.add(ClassName.ACTIVE);
65283
- content.classList.add(ClassName.BLOCK);
65284
- stepperNode.dispatchEvent(shownEvent);
65285
- done();
65286
- }
65287
- };
65288
-
65289
- var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
65290
- if (!element) {
65291
- return 0;
65292
- } // Get transition-duration of the element
65293
-
65294
-
65295
- var transitionDuration = window.getComputedStyle(element).transitionDuration;
65296
- var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found
65297
-
65298
- if (!floatTransitionDuration) {
65299
- return 0;
65300
- } // If multiple durations are defined, take the first
65301
-
65302
-
65303
- transitionDuration = transitionDuration.split(',')[0];
65304
- return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
65305
- };
65306
-
65307
- var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
65308
- var called = false;
65309
- var durationPadding = 5;
65310
- var emulatedDuration = duration + durationPadding;
65311
-
65312
- function listener() {
65313
- called = true;
65314
- element.removeEventListener(transitionEndEvent, listener);
65315
- }
65316
-
65317
- element.addEventListener(transitionEndEvent, listener);
65318
- window.setTimeout(function () {
65319
- if (!called) {
65320
- element.dispatchEvent(WinEvent(transitionEndEvent));
65321
- }
65322
-
65323
- element.removeEventListener(transitionEndEvent, listener);
65324
- }, emulatedDuration);
65325
- };
65326
-
65327
- var detectAnimation = function detectAnimation(contentList, options) {
65328
- if (options.animation) {
65329
- contentList.forEach(function (content) {
65330
- content.classList.add(ClassName.FADE);
65331
- content.classList.add(ClassName.NONE);
65332
- });
65333
- }
65334
- };
65335
-
65336
- var buildClickStepLinearListener = function buildClickStepLinearListener() {
65337
- return function clickStepLinearListener(event) {
65338
- event.preventDefault();
65339
- };
65340
- };
65341
-
65342
- var buildClickStepNonLinearListener = function buildClickStepNonLinearListener(options) {
65343
- return function clickStepNonLinearListener(event) {
65344
- event.preventDefault();
65345
- var step = closest(event.target, options.selectors.steps);
65346
- var stepperNode = closest(step, options.selectors.stepper);
65347
- var stepper = stepperNode[customProperty];
65348
-
65349
- var stepIndex = stepper._steps.indexOf(step);
65350
-
65351
- show(stepperNode, stepIndex, options, function () {
65352
- stepper._currentIndex = stepIndex;
65353
- });
65354
- };
65355
- };
65356
-
65357
- var DEFAULT_OPTIONS = {
65358
- linear: true,
65359
- animation: false,
65360
- selectors: {
65361
- steps: '.step',
65362
- trigger: '.step-trigger',
65363
- stepper: '.bs-stepper'
65364
- }
65365
- };
65366
-
65367
- var Stepper =
65368
- /*#__PURE__*/
65369
- function () {
65370
- function Stepper(element, _options) {
65371
- var _this = this;
65372
-
65373
- if (_options === void 0) {
65374
- _options = {};
65375
- }
65376
-
65377
- this._element = element;
65378
- this._currentIndex = 0;
65379
- this._stepsContents = [];
65380
- this.options = _extends({}, DEFAULT_OPTIONS, {}, _options);
65381
- this.options.selectors = _extends({}, DEFAULT_OPTIONS.selectors, {}, this.options.selectors);
65382
-
65383
- if (this.options.linear) {
65384
- this._element.classList.add(ClassName.LINEAR);
65385
- }
65386
-
65387
- this._steps = [].slice.call(this._element.querySelectorAll(this.options.selectors.steps));
65388
-
65389
- this._steps.filter(function (step) {
65390
- return step.hasAttribute('data-target');
65391
- }).forEach(function (step) {
65392
- _this._stepsContents.push(_this._element.querySelector(step.getAttribute('data-target')));
65393
- });
65394
-
65395
- detectAnimation(this._stepsContents, this.options);
65396
-
65397
- this._setLinkListeners();
65398
-
65399
- Object.defineProperty(this._element, customProperty, {
65400
- value: this,
65401
- writable: true
65402
- });
65403
-
65404
- if (this._steps.length) {
65405
- show(this._element, this._currentIndex, this.options, function () {});
65406
- }
65407
- } // Private
65408
-
65409
-
65410
- var _proto = Stepper.prototype;
65411
-
65412
- _proto._setLinkListeners = function _setLinkListeners() {
65413
- var _this2 = this;
65414
-
65415
- this._steps.forEach(function (step) {
65416
- var trigger = step.querySelector(_this2.options.selectors.trigger);
65417
-
65418
- if (_this2.options.linear) {
65419
- _this2._clickStepLinearListener = buildClickStepLinearListener(_this2.options);
65420
- trigger.addEventListener('click', _this2._clickStepLinearListener);
65421
- } else {
65422
- _this2._clickStepNonLinearListener = buildClickStepNonLinearListener(_this2.options);
65423
- trigger.addEventListener('click', _this2._clickStepNonLinearListener);
65424
- }
65425
- });
65426
- } // Public
65427
- ;
65428
-
65429
- _proto.next = function next() {
65430
- var _this3 = this;
65431
-
65432
- var nextStep = this._currentIndex + 1 <= this._steps.length - 1 ? this._currentIndex + 1 : this._steps.length - 1;
65433
- show(this._element, nextStep, this.options, function () {
65434
- _this3._currentIndex = nextStep;
65435
- });
65436
- };
65437
-
65438
- _proto.previous = function previous() {
65439
- var _this4 = this;
65440
-
65441
- var previousStep = this._currentIndex - 1 >= 0 ? this._currentIndex - 1 : 0;
65442
- show(this._element, previousStep, this.options, function () {
65443
- _this4._currentIndex = previousStep;
65444
- });
65445
- };
65446
-
65447
- _proto.to = function to(stepNumber) {
65448
- var _this5 = this;
65449
-
65450
- var tempIndex = stepNumber - 1;
65451
- var nextStep = tempIndex >= 0 && tempIndex < this._steps.length ? tempIndex : 0;
65452
- show(this._element, nextStep, this.options, function () {
65453
- _this5._currentIndex = nextStep;
65454
- });
65455
- };
65456
-
65457
- _proto.reset = function reset() {
65458
- var _this6 = this;
65459
-
65460
- show(this._element, 0, this.options, function () {
65461
- _this6._currentIndex = 0;
65462
- });
65463
- };
65464
-
65465
- _proto.destroy = function destroy() {
65466
- var _this7 = this;
65467
-
65468
- this._steps.forEach(function (step) {
65469
- var trigger = step.querySelector(_this7.options.selectors.trigger);
65470
-
65471
- if (_this7.options.linear) {
65472
- trigger.removeEventListener('click', _this7._clickStepLinearListener);
65473
- } else {
65474
- trigger.removeEventListener('click', _this7._clickStepNonLinearListener);
65475
- }
65476
- });
65477
-
65478
- this._element[customProperty] = undefined;
65479
- this._element = undefined;
65480
- this._currentIndex = undefined;
65481
- this._steps = undefined;
65482
- this._stepsContents = undefined;
65483
- this._clickStepLinearListener = undefined;
65484
- this._clickStepNonLinearListener = undefined;
65485
- };
65486
-
65487
- return Stepper;
65488
- }();
65489
-
65490
- return Stepper;
65491
-
65492
- }));
65493
-
65494
- }(bsStepper));
65495
-
65496
- var Stepper = bsStepper.exports;
65497
-
65498
65063
  var css_248z = "/*!\r\n * bsStepper v1.7.0 (https://github.com/Johann-S/bs-stepper)\r\n * Copyright 2018 - 2019 Johann-S <johann.servoire@gmail.com>\r\n * Licensed under MIT (https://github.com/Johann-S/bs-stepper/blob/master/LICENSE)\r\n */.bs-stepper .step-trigger{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-wrap:wrap;flex-wrap:wrap;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;padding:20px;font-size:1rem;font-weight:700;line-height:1.5;color:#6c757d;text-align:center;text-decoration:none;white-space:nowrap;vertical-align:middle;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-color:transparent;border:none;border-radius:.25rem;transition:background-color .15s ease-out,color .15s ease-out}.bs-stepper .step-trigger:not(:disabled):not(.disabled){cursor:pointer}.bs-stepper .step-trigger.disabled,.bs-stepper .step-trigger:disabled{pointer-events:none;opacity:.65}.bs-stepper .step-trigger:focus{color:#007bff;outline:0}.bs-stepper .step-trigger:hover{text-decoration:none;background-color:rgba(0,0,0,.06)}@media (max-width:520px){.bs-stepper .step-trigger{-ms-flex-direction:column;flex-direction:column;padding:10px}}.bs-stepper-label{display:inline-block;margin:.25rem}.bs-stepper-header{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}@media (max-width:520px){.bs-stepper-header{margin:0 -10px;text-align:center}}.bs-stepper .line,.bs-stepper-line{-ms-flex:1 0 32px;flex:1 0 32px;min-width:1px;min-height:1px;margin:auto;background-color:rgba(0,0,0,.12)}@media (max-width:400px){.bs-stepper .line,.bs-stepper-line{-ms-flex-preferred-size:20px;flex-basis:20px}}.bs-stepper-circle{display:-ms-inline-flexbox;display:inline-flex;-ms-flex-line-pack:center;align-content:center;-ms-flex-pack:center;justify-content:center;width:2em;height:2em;padding:.5em 0;margin:.25rem;line-height:1em;color:#fff;background-color:#6c757d;border-radius:1em}.active .bs-stepper-circle{background-color:#007bff}.bs-stepper-content{padding:0 20px 20px}@media (max-width:520px){.bs-stepper-content{padding:0}}.bs-stepper.vertical{display:-ms-flexbox;display:flex}.bs-stepper.vertical .bs-stepper-header{-ms-flex-direction:column;flex-direction:column;-ms-flex-align:stretch;align-items:stretch;margin:0}.bs-stepper.vertical .bs-stepper-pane,.bs-stepper.vertical .content{display:block}.bs-stepper.vertical .bs-stepper-pane:not(.fade),.bs-stepper.vertical .content:not(.fade){display:block;visibility:hidden}.bs-stepper .content:not(.fade),.bs-stepper-pane:not(.fade){display:none}.bs-stepper .content.fade,.bs-stepper-pane.fade{visibility:hidden;transition-duration:.3s;transition-property:opacity}.bs-stepper .content.fade.active,.bs-stepper-pane.fade.active{visibility:visible;opacity:1}.bs-stepper .content.active:not(.fade),.bs-stepper-pane.active:not(.fade){display:block;visibility:visible}.bs-stepper .content.dstepper-block,.bs-stepper-pane.dstepper-block{display:block}.bs-stepper:not(.vertical) .bs-stepper-pane.dstepper-none,.bs-stepper:not(.vertical) .content.dstepper-none{display:none}.vertical .bs-stepper-pane.fade.dstepper-none,.vertical .content.fade.dstepper-none{visibility:hidden}";
65499
65064
  styleInject(css_248z);
65500
65065
 
65501
65066
  const Wizard = React$5.forwardRef((props, ref) => {
65502
65067
  // ** Props
65503
- const { steps, instance, className, headerClassName, contentClassName, contentWrapperClassName, options = {}, type = 'horizontal', separator = jsxRuntime.jsx(SvgChevronRight, { fontSize: 17 }) } = props;
65504
- // ** State
65505
- const [activeIndex, setActiveIndex] = React$5.useState(0);
65506
- // ** Vars
65507
- let stepper = null;
65508
- // ** Step change listener on mount
65509
- React$5.useEffect(() => {
65510
- stepper = new Stepper(ref.current, options);
65511
- ref.current.addEventListener('shown.bs-stepper', function (event) {
65512
- setActiveIndex(event.detail.indexStep);
65513
- });
65514
- if (instance) {
65515
- instance(stepper);
65516
- }
65517
- }, []);
65068
+ const { steps, activeStep, setActiveStep, className = '', headerClassName = '', contentClassName = '', contentWrapperClassName = '', type = 'horizontal', separator = jsxRuntime.jsx(SvgChevronRight, { fontSize: 17 }) } = props;
65518
65069
  // ** Renders Wizard Header
65519
65070
  const renderHeader = () => {
65520
65071
  return steps.map((step, index) => {
65521
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', {
65522
- crossed: activeIndex > index,
65523
- active: index === activeIndex
65524
- }), "data-target": `#${step.id}`, children: jsxRuntime.jsxs("button", { type: 'button', className: 'step-trigger', 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));
65073
+ crossed: step.isDone !== undefined ? step.isDone : activeStep > index,
65074
+ 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));
65525
65076
  });
65526
65077
  };
65527
65078
  // ** Renders Wizard Content
@@ -65529,7 +65080,7 @@ const Wizard = React$5.forwardRef((props, ref) => {
65529
65080
  return steps.map((step, index) => {
65530
65081
  return (jsxRuntime.jsx("div", { className: classnames('content', {
65531
65082
  [contentClassName]: contentClassName,
65532
- 'active dstepper-block': activeIndex === index
65083
+ 'active dstepper-block': activeStep === index
65533
65084
  }), id: step.id, children: step.content }, step.id));
65534
65085
  });
65535
65086
  };
@@ -65542,12 +65093,10 @@ const Wizard = React$5.forwardRef((props, ref) => {
65542
65093
  });
65543
65094
 
65544
65095
  const ImportExcelComponent = (props) => {
65545
- const { setValue, getValues, control, errors, formatNumber, pageOptions, pageSizeDefault, watch, setStepper, windowSize, optionField, dataInvalid, dataValid, dataValidate, dataError, getExcelTemplate, headerValidateExcelColumns, headerHandleErrorExcelColumns } = props;
65096
+ const { setValue, getValues, control, errors, formatNumber, pageOptions, pageSizeDefault, watch, windowSize, optionField, dataInvalid, dataValid, dataValidate, dataError, getExcelTemplate, headerValidateExcelColumns, headerHandleErrorExcelColumns } = props;
65546
65097
  const { t } = reactI18next.useTranslation();
65547
65098
  const ref = React$5.useRef(null);
65548
- return (jsxRuntime.jsx("div", { style: { marginTop: '-25px' }, className: 'modern-horizontal-wizard', children: jsxRuntime.jsx(Wizard, { instance: (el) => {
65549
- setStepper(el);
65550
- }, type: 'modern-horizontal', ref: ref, steps: [
65099
+ return (jsxRuntime.jsx("div", { style: { marginTop: '-25px' }, className: 'modern-horizontal-wizard', children: jsxRuntime.jsx(Wizard, { activeStep: watch('step'), type: 'modern-horizontal', ref: ref, steps: [
65551
65100
  {
65552
65101
  id: 'upload-file',
65553
65102
  title: t('Upload file'),
@@ -65568,9 +65117,7 @@ const ImportExcelComponent = (props) => {
65568
65117
  title: t('Error result'),
65569
65118
  content: jsxRuntime.jsx(TabHandleErrorImportExcel, { formatNumber: formatNumber, pageOptions: pageOptions, pageSizeDefault: pageSizeDefault, dataError: dataError, headerHandleErrorExcelColumns: headerHandleErrorExcelColumns, windowSize: windowSize })
65570
65119
  }
65571
- ], options: {
65572
- linear: true
65573
- } }) }));
65120
+ ] }) }));
65574
65121
  };
65575
65122
 
65576
65123
  exports.ExportExcelComponent = ExportExcelComponent;
@@ -65580,6 +65127,7 @@ exports.InputStyleComponent = InputStyleComponent;
65580
65127
  exports.SelectTable = SelectTable;
65581
65128
  exports.SelectTableTree = SelectTableTree;
65582
65129
  exports.TabsMenuComponent = TabsMenuComponent;
65130
+ exports.Wizard = Wizard;
65583
65131
  exports.checkDecimalSeparator = checkDecimalSeparator;
65584
65132
  exports.checkThousandSeparator = checkThousandSeparator;
65585
65133
  exports["default"] = TableEdit;