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.
- package/dist/component/wizard/index.d.ts +22 -2
- package/dist/index.d.ts +22 -1
- package/dist/index.js +10 -462
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -463
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -43178,13 +43178,11 @@ const TableEdit = forwardRef((props, ref) => {
|
|
|
43178
43178
|
return false;
|
|
43179
43179
|
};
|
|
43180
43180
|
const renderData = () => {
|
|
43181
|
-
totalCount = 0;
|
|
43182
43181
|
return (dataSource.map((row, indexRow) => {
|
|
43183
43182
|
const isSelected = selectedRows?.some((x) => x[fieldKey] === row[fieldKey]);
|
|
43184
43183
|
const flagSearch = !searchClient || checkSearch(searchSetting?.searchTerm !== undefined ? searchSetting?.searchTerm : searchTerm, row, searchSetting?.keyField ?? []);
|
|
43185
43184
|
if (flagSearch) {
|
|
43186
|
-
|
|
43187
|
-
const flagDisplay = !pagingClient || (totalCount > ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1)) && totalCount <= ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0))));
|
|
43185
|
+
const flagDisplay = !pagingClient || ((indexRow + 1) > ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0) - 1)) && (indexRow + 1) <= ((pagingSetting.pageSize ?? 0) * ((pagingSetting.currentPage ?? 0))));
|
|
43188
43186
|
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}`) }));
|
|
43189
43187
|
}
|
|
43190
43188
|
}));
|
|
@@ -65034,466 +65032,19 @@ const TabHandleErrorImportExcel = (props) => {
|
|
|
65034
65032
|
} }, 'HandleErrorExcel')] }));
|
|
65035
65033
|
};
|
|
65036
65034
|
|
|
65037
|
-
var bsStepper = {exports: {}};
|
|
65038
|
-
|
|
65039
|
-
/*!
|
|
65040
|
-
* bsStepper v1.7.0 (https://github.com/Johann-S/bs-stepper)
|
|
65041
|
-
* Copyright 2018 - 2019 Johann-S <johann.servoire@gmail.com>
|
|
65042
|
-
* Licensed under MIT (https://github.com/Johann-S/bs-stepper/blob/master/LICENSE)
|
|
65043
|
-
*/
|
|
65044
|
-
|
|
65045
|
-
(function (module, exports) {
|
|
65046
|
-
(function (global, factory) {
|
|
65047
|
-
module.exports = factory() ;
|
|
65048
|
-
}(commonjsGlobal, function () {
|
|
65049
|
-
function _extends() {
|
|
65050
|
-
_extends = Object.assign || function (target) {
|
|
65051
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
65052
|
-
var source = arguments[i];
|
|
65053
|
-
|
|
65054
|
-
for (var key in source) {
|
|
65055
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
65056
|
-
target[key] = source[key];
|
|
65057
|
-
}
|
|
65058
|
-
}
|
|
65059
|
-
}
|
|
65060
|
-
|
|
65061
|
-
return target;
|
|
65062
|
-
};
|
|
65063
|
-
|
|
65064
|
-
return _extends.apply(this, arguments);
|
|
65065
|
-
}
|
|
65066
|
-
|
|
65067
|
-
var matches = window.Element.prototype.matches;
|
|
65068
|
-
|
|
65069
|
-
var closest = function closest(element, selector) {
|
|
65070
|
-
return element.closest(selector);
|
|
65071
|
-
};
|
|
65072
|
-
|
|
65073
|
-
var WinEvent = function WinEvent(inType, params) {
|
|
65074
|
-
return new window.Event(inType, params);
|
|
65075
|
-
};
|
|
65076
|
-
|
|
65077
|
-
var createCustomEvent = function createCustomEvent(eventName, params) {
|
|
65078
|
-
var cEvent = new window.CustomEvent(eventName, params);
|
|
65079
|
-
return cEvent;
|
|
65080
|
-
};
|
|
65081
|
-
/* istanbul ignore next */
|
|
65082
|
-
|
|
65083
|
-
|
|
65084
|
-
function polyfill() {
|
|
65085
|
-
if (!window.Element.prototype.matches) {
|
|
65086
|
-
matches = window.Element.prototype.msMatchesSelector || window.Element.prototype.webkitMatchesSelector;
|
|
65087
|
-
}
|
|
65088
|
-
|
|
65089
|
-
if (!window.Element.prototype.closest) {
|
|
65090
|
-
closest = function closest(element, selector) {
|
|
65091
|
-
if (!document.documentElement.contains(element)) {
|
|
65092
|
-
return null;
|
|
65093
|
-
}
|
|
65094
|
-
|
|
65095
|
-
do {
|
|
65096
|
-
if (matches.call(element, selector)) {
|
|
65097
|
-
return element;
|
|
65098
|
-
}
|
|
65099
|
-
|
|
65100
|
-
element = element.parentElement || element.parentNode;
|
|
65101
|
-
} while (element !== null && element.nodeType === 1);
|
|
65102
|
-
|
|
65103
|
-
return null;
|
|
65104
|
-
};
|
|
65105
|
-
}
|
|
65106
|
-
|
|
65107
|
-
if (!window.Event || typeof window.Event !== 'function') {
|
|
65108
|
-
WinEvent = function WinEvent(inType, params) {
|
|
65109
|
-
params = params || {};
|
|
65110
|
-
var e = document.createEvent('Event');
|
|
65111
|
-
e.initEvent(inType, Boolean(params.bubbles), Boolean(params.cancelable));
|
|
65112
|
-
return e;
|
|
65113
|
-
};
|
|
65114
|
-
}
|
|
65115
|
-
|
|
65116
|
-
if (typeof window.CustomEvent !== 'function') {
|
|
65117
|
-
var originPreventDefault = window.Event.prototype.preventDefault;
|
|
65118
|
-
|
|
65119
|
-
createCustomEvent = function createCustomEvent(eventName, params) {
|
|
65120
|
-
var evt = document.createEvent('CustomEvent');
|
|
65121
|
-
params = params || {
|
|
65122
|
-
bubbles: false,
|
|
65123
|
-
cancelable: false,
|
|
65124
|
-
detail: null
|
|
65125
|
-
};
|
|
65126
|
-
evt.initCustomEvent(eventName, params.bubbles, params.cancelable, params.detail);
|
|
65127
|
-
|
|
65128
|
-
evt.preventDefault = function () {
|
|
65129
|
-
if (!this.cancelable) {
|
|
65130
|
-
return;
|
|
65131
|
-
}
|
|
65132
|
-
|
|
65133
|
-
originPreventDefault.call(this);
|
|
65134
|
-
Object.defineProperty(this, 'defaultPrevented', {
|
|
65135
|
-
get: function get() {
|
|
65136
|
-
return true;
|
|
65137
|
-
}
|
|
65138
|
-
});
|
|
65139
|
-
};
|
|
65140
|
-
|
|
65141
|
-
return evt;
|
|
65142
|
-
};
|
|
65143
|
-
}
|
|
65144
|
-
}
|
|
65145
|
-
|
|
65146
|
-
polyfill();
|
|
65147
|
-
|
|
65148
|
-
var MILLISECONDS_MULTIPLIER = 1000;
|
|
65149
|
-
var ClassName = {
|
|
65150
|
-
ACTIVE: 'active',
|
|
65151
|
-
LINEAR: 'linear',
|
|
65152
|
-
BLOCK: 'dstepper-block',
|
|
65153
|
-
NONE: 'dstepper-none',
|
|
65154
|
-
FADE: 'fade',
|
|
65155
|
-
VERTICAL: 'vertical'
|
|
65156
|
-
};
|
|
65157
|
-
var transitionEndEvent = 'transitionend';
|
|
65158
|
-
var customProperty = 'bsStepper';
|
|
65159
|
-
|
|
65160
|
-
var show = function show(stepperNode, indexStep, options, done) {
|
|
65161
|
-
var stepper = stepperNode[customProperty];
|
|
65162
|
-
|
|
65163
|
-
if (stepper._steps[indexStep].classList.contains(ClassName.ACTIVE) || stepper._stepsContents[indexStep].classList.contains(ClassName.ACTIVE)) {
|
|
65164
|
-
return;
|
|
65165
|
-
}
|
|
65166
|
-
|
|
65167
|
-
var showEvent = createCustomEvent('show.bs-stepper', {
|
|
65168
|
-
cancelable: true,
|
|
65169
|
-
detail: {
|
|
65170
|
-
from: stepper._currentIndex,
|
|
65171
|
-
to: indexStep,
|
|
65172
|
-
indexStep: indexStep
|
|
65173
|
-
}
|
|
65174
|
-
});
|
|
65175
|
-
stepperNode.dispatchEvent(showEvent);
|
|
65176
|
-
|
|
65177
|
-
var activeStep = stepper._steps.filter(function (step) {
|
|
65178
|
-
return step.classList.contains(ClassName.ACTIVE);
|
|
65179
|
-
});
|
|
65180
|
-
|
|
65181
|
-
var activeContent = stepper._stepsContents.filter(function (content) {
|
|
65182
|
-
return content.classList.contains(ClassName.ACTIVE);
|
|
65183
|
-
});
|
|
65184
|
-
|
|
65185
|
-
if (showEvent.defaultPrevented) {
|
|
65186
|
-
return;
|
|
65187
|
-
}
|
|
65188
|
-
|
|
65189
|
-
if (activeStep.length) {
|
|
65190
|
-
activeStep[0].classList.remove(ClassName.ACTIVE);
|
|
65191
|
-
}
|
|
65192
|
-
|
|
65193
|
-
if (activeContent.length) {
|
|
65194
|
-
activeContent[0].classList.remove(ClassName.ACTIVE);
|
|
65195
|
-
|
|
65196
|
-
if (!stepperNode.classList.contains(ClassName.VERTICAL) && !stepper.options.animation) {
|
|
65197
|
-
activeContent[0].classList.remove(ClassName.BLOCK);
|
|
65198
|
-
}
|
|
65199
|
-
}
|
|
65200
|
-
|
|
65201
|
-
showStep(stepperNode, stepper._steps[indexStep], stepper._steps, options);
|
|
65202
|
-
showContent(stepperNode, stepper._stepsContents[indexStep], stepper._stepsContents, activeContent, done);
|
|
65203
|
-
};
|
|
65204
|
-
|
|
65205
|
-
var showStep = function showStep(stepperNode, step, stepList, options) {
|
|
65206
|
-
stepList.forEach(function (step) {
|
|
65207
|
-
var trigger = step.querySelector(options.selectors.trigger);
|
|
65208
|
-
trigger.setAttribute('aria-selected', 'false'); // if stepper is in linear mode, set disabled attribute on the trigger
|
|
65209
|
-
|
|
65210
|
-
if (stepperNode.classList.contains(ClassName.LINEAR)) {
|
|
65211
|
-
trigger.setAttribute('disabled', 'disabled');
|
|
65212
|
-
}
|
|
65213
|
-
});
|
|
65214
|
-
step.classList.add(ClassName.ACTIVE);
|
|
65215
|
-
var currentTrigger = step.querySelector(options.selectors.trigger);
|
|
65216
|
-
currentTrigger.setAttribute('aria-selected', 'true'); // if stepper is in linear mode, remove disabled attribute on current
|
|
65217
|
-
|
|
65218
|
-
if (stepperNode.classList.contains(ClassName.LINEAR)) {
|
|
65219
|
-
currentTrigger.removeAttribute('disabled');
|
|
65220
|
-
}
|
|
65221
|
-
};
|
|
65222
|
-
|
|
65223
|
-
var showContent = function showContent(stepperNode, content, contentList, activeContent, done) {
|
|
65224
|
-
var stepper = stepperNode[customProperty];
|
|
65225
|
-
var toIndex = contentList.indexOf(content);
|
|
65226
|
-
var shownEvent = createCustomEvent('shown.bs-stepper', {
|
|
65227
|
-
cancelable: true,
|
|
65228
|
-
detail: {
|
|
65229
|
-
from: stepper._currentIndex,
|
|
65230
|
-
to: toIndex,
|
|
65231
|
-
indexStep: toIndex
|
|
65232
|
-
}
|
|
65233
|
-
});
|
|
65234
|
-
|
|
65235
|
-
function complete() {
|
|
65236
|
-
content.classList.add(ClassName.BLOCK);
|
|
65237
|
-
content.removeEventListener(transitionEndEvent, complete);
|
|
65238
|
-
stepperNode.dispatchEvent(shownEvent);
|
|
65239
|
-
done();
|
|
65240
|
-
}
|
|
65241
|
-
|
|
65242
|
-
if (content.classList.contains(ClassName.FADE)) {
|
|
65243
|
-
content.classList.remove(ClassName.NONE);
|
|
65244
|
-
var duration = getTransitionDurationFromElement(content);
|
|
65245
|
-
content.addEventListener(transitionEndEvent, complete);
|
|
65246
|
-
|
|
65247
|
-
if (activeContent.length) {
|
|
65248
|
-
activeContent[0].classList.add(ClassName.NONE);
|
|
65249
|
-
}
|
|
65250
|
-
|
|
65251
|
-
content.classList.add(ClassName.ACTIVE);
|
|
65252
|
-
emulateTransitionEnd(content, duration);
|
|
65253
|
-
} else {
|
|
65254
|
-
content.classList.add(ClassName.ACTIVE);
|
|
65255
|
-
content.classList.add(ClassName.BLOCK);
|
|
65256
|
-
stepperNode.dispatchEvent(shownEvent);
|
|
65257
|
-
done();
|
|
65258
|
-
}
|
|
65259
|
-
};
|
|
65260
|
-
|
|
65261
|
-
var getTransitionDurationFromElement = function getTransitionDurationFromElement(element) {
|
|
65262
|
-
if (!element) {
|
|
65263
|
-
return 0;
|
|
65264
|
-
} // Get transition-duration of the element
|
|
65265
|
-
|
|
65266
|
-
|
|
65267
|
-
var transitionDuration = window.getComputedStyle(element).transitionDuration;
|
|
65268
|
-
var floatTransitionDuration = parseFloat(transitionDuration); // Return 0 if element or transition duration is not found
|
|
65269
|
-
|
|
65270
|
-
if (!floatTransitionDuration) {
|
|
65271
|
-
return 0;
|
|
65272
|
-
} // If multiple durations are defined, take the first
|
|
65273
|
-
|
|
65274
|
-
|
|
65275
|
-
transitionDuration = transitionDuration.split(',')[0];
|
|
65276
|
-
return parseFloat(transitionDuration) * MILLISECONDS_MULTIPLIER;
|
|
65277
|
-
};
|
|
65278
|
-
|
|
65279
|
-
var emulateTransitionEnd = function emulateTransitionEnd(element, duration) {
|
|
65280
|
-
var called = false;
|
|
65281
|
-
var durationPadding = 5;
|
|
65282
|
-
var emulatedDuration = duration + durationPadding;
|
|
65283
|
-
|
|
65284
|
-
function listener() {
|
|
65285
|
-
called = true;
|
|
65286
|
-
element.removeEventListener(transitionEndEvent, listener);
|
|
65287
|
-
}
|
|
65288
|
-
|
|
65289
|
-
element.addEventListener(transitionEndEvent, listener);
|
|
65290
|
-
window.setTimeout(function () {
|
|
65291
|
-
if (!called) {
|
|
65292
|
-
element.dispatchEvent(WinEvent(transitionEndEvent));
|
|
65293
|
-
}
|
|
65294
|
-
|
|
65295
|
-
element.removeEventListener(transitionEndEvent, listener);
|
|
65296
|
-
}, emulatedDuration);
|
|
65297
|
-
};
|
|
65298
|
-
|
|
65299
|
-
var detectAnimation = function detectAnimation(contentList, options) {
|
|
65300
|
-
if (options.animation) {
|
|
65301
|
-
contentList.forEach(function (content) {
|
|
65302
|
-
content.classList.add(ClassName.FADE);
|
|
65303
|
-
content.classList.add(ClassName.NONE);
|
|
65304
|
-
});
|
|
65305
|
-
}
|
|
65306
|
-
};
|
|
65307
|
-
|
|
65308
|
-
var buildClickStepLinearListener = function buildClickStepLinearListener() {
|
|
65309
|
-
return function clickStepLinearListener(event) {
|
|
65310
|
-
event.preventDefault();
|
|
65311
|
-
};
|
|
65312
|
-
};
|
|
65313
|
-
|
|
65314
|
-
var buildClickStepNonLinearListener = function buildClickStepNonLinearListener(options) {
|
|
65315
|
-
return function clickStepNonLinearListener(event) {
|
|
65316
|
-
event.preventDefault();
|
|
65317
|
-
var step = closest(event.target, options.selectors.steps);
|
|
65318
|
-
var stepperNode = closest(step, options.selectors.stepper);
|
|
65319
|
-
var stepper = stepperNode[customProperty];
|
|
65320
|
-
|
|
65321
|
-
var stepIndex = stepper._steps.indexOf(step);
|
|
65322
|
-
|
|
65323
|
-
show(stepperNode, stepIndex, options, function () {
|
|
65324
|
-
stepper._currentIndex = stepIndex;
|
|
65325
|
-
});
|
|
65326
|
-
};
|
|
65327
|
-
};
|
|
65328
|
-
|
|
65329
|
-
var DEFAULT_OPTIONS = {
|
|
65330
|
-
linear: true,
|
|
65331
|
-
animation: false,
|
|
65332
|
-
selectors: {
|
|
65333
|
-
steps: '.step',
|
|
65334
|
-
trigger: '.step-trigger',
|
|
65335
|
-
stepper: '.bs-stepper'
|
|
65336
|
-
}
|
|
65337
|
-
};
|
|
65338
|
-
|
|
65339
|
-
var Stepper =
|
|
65340
|
-
/*#__PURE__*/
|
|
65341
|
-
function () {
|
|
65342
|
-
function Stepper(element, _options) {
|
|
65343
|
-
var _this = this;
|
|
65344
|
-
|
|
65345
|
-
if (_options === void 0) {
|
|
65346
|
-
_options = {};
|
|
65347
|
-
}
|
|
65348
|
-
|
|
65349
|
-
this._element = element;
|
|
65350
|
-
this._currentIndex = 0;
|
|
65351
|
-
this._stepsContents = [];
|
|
65352
|
-
this.options = _extends({}, DEFAULT_OPTIONS, {}, _options);
|
|
65353
|
-
this.options.selectors = _extends({}, DEFAULT_OPTIONS.selectors, {}, this.options.selectors);
|
|
65354
|
-
|
|
65355
|
-
if (this.options.linear) {
|
|
65356
|
-
this._element.classList.add(ClassName.LINEAR);
|
|
65357
|
-
}
|
|
65358
|
-
|
|
65359
|
-
this._steps = [].slice.call(this._element.querySelectorAll(this.options.selectors.steps));
|
|
65360
|
-
|
|
65361
|
-
this._steps.filter(function (step) {
|
|
65362
|
-
return step.hasAttribute('data-target');
|
|
65363
|
-
}).forEach(function (step) {
|
|
65364
|
-
_this._stepsContents.push(_this._element.querySelector(step.getAttribute('data-target')));
|
|
65365
|
-
});
|
|
65366
|
-
|
|
65367
|
-
detectAnimation(this._stepsContents, this.options);
|
|
65368
|
-
|
|
65369
|
-
this._setLinkListeners();
|
|
65370
|
-
|
|
65371
|
-
Object.defineProperty(this._element, customProperty, {
|
|
65372
|
-
value: this,
|
|
65373
|
-
writable: true
|
|
65374
|
-
});
|
|
65375
|
-
|
|
65376
|
-
if (this._steps.length) {
|
|
65377
|
-
show(this._element, this._currentIndex, this.options, function () {});
|
|
65378
|
-
}
|
|
65379
|
-
} // Private
|
|
65380
|
-
|
|
65381
|
-
|
|
65382
|
-
var _proto = Stepper.prototype;
|
|
65383
|
-
|
|
65384
|
-
_proto._setLinkListeners = function _setLinkListeners() {
|
|
65385
|
-
var _this2 = this;
|
|
65386
|
-
|
|
65387
|
-
this._steps.forEach(function (step) {
|
|
65388
|
-
var trigger = step.querySelector(_this2.options.selectors.trigger);
|
|
65389
|
-
|
|
65390
|
-
if (_this2.options.linear) {
|
|
65391
|
-
_this2._clickStepLinearListener = buildClickStepLinearListener(_this2.options);
|
|
65392
|
-
trigger.addEventListener('click', _this2._clickStepLinearListener);
|
|
65393
|
-
} else {
|
|
65394
|
-
_this2._clickStepNonLinearListener = buildClickStepNonLinearListener(_this2.options);
|
|
65395
|
-
trigger.addEventListener('click', _this2._clickStepNonLinearListener);
|
|
65396
|
-
}
|
|
65397
|
-
});
|
|
65398
|
-
} // Public
|
|
65399
|
-
;
|
|
65400
|
-
|
|
65401
|
-
_proto.next = function next() {
|
|
65402
|
-
var _this3 = this;
|
|
65403
|
-
|
|
65404
|
-
var nextStep = this._currentIndex + 1 <= this._steps.length - 1 ? this._currentIndex + 1 : this._steps.length - 1;
|
|
65405
|
-
show(this._element, nextStep, this.options, function () {
|
|
65406
|
-
_this3._currentIndex = nextStep;
|
|
65407
|
-
});
|
|
65408
|
-
};
|
|
65409
|
-
|
|
65410
|
-
_proto.previous = function previous() {
|
|
65411
|
-
var _this4 = this;
|
|
65412
|
-
|
|
65413
|
-
var previousStep = this._currentIndex - 1 >= 0 ? this._currentIndex - 1 : 0;
|
|
65414
|
-
show(this._element, previousStep, this.options, function () {
|
|
65415
|
-
_this4._currentIndex = previousStep;
|
|
65416
|
-
});
|
|
65417
|
-
};
|
|
65418
|
-
|
|
65419
|
-
_proto.to = function to(stepNumber) {
|
|
65420
|
-
var _this5 = this;
|
|
65421
|
-
|
|
65422
|
-
var tempIndex = stepNumber - 1;
|
|
65423
|
-
var nextStep = tempIndex >= 0 && tempIndex < this._steps.length ? tempIndex : 0;
|
|
65424
|
-
show(this._element, nextStep, this.options, function () {
|
|
65425
|
-
_this5._currentIndex = nextStep;
|
|
65426
|
-
});
|
|
65427
|
-
};
|
|
65428
|
-
|
|
65429
|
-
_proto.reset = function reset() {
|
|
65430
|
-
var _this6 = this;
|
|
65431
|
-
|
|
65432
|
-
show(this._element, 0, this.options, function () {
|
|
65433
|
-
_this6._currentIndex = 0;
|
|
65434
|
-
});
|
|
65435
|
-
};
|
|
65436
|
-
|
|
65437
|
-
_proto.destroy = function destroy() {
|
|
65438
|
-
var _this7 = this;
|
|
65439
|
-
|
|
65440
|
-
this._steps.forEach(function (step) {
|
|
65441
|
-
var trigger = step.querySelector(_this7.options.selectors.trigger);
|
|
65442
|
-
|
|
65443
|
-
if (_this7.options.linear) {
|
|
65444
|
-
trigger.removeEventListener('click', _this7._clickStepLinearListener);
|
|
65445
|
-
} else {
|
|
65446
|
-
trigger.removeEventListener('click', _this7._clickStepNonLinearListener);
|
|
65447
|
-
}
|
|
65448
|
-
});
|
|
65449
|
-
|
|
65450
|
-
this._element[customProperty] = undefined;
|
|
65451
|
-
this._element = undefined;
|
|
65452
|
-
this._currentIndex = undefined;
|
|
65453
|
-
this._steps = undefined;
|
|
65454
|
-
this._stepsContents = undefined;
|
|
65455
|
-
this._clickStepLinearListener = undefined;
|
|
65456
|
-
this._clickStepNonLinearListener = undefined;
|
|
65457
|
-
};
|
|
65458
|
-
|
|
65459
|
-
return Stepper;
|
|
65460
|
-
}();
|
|
65461
|
-
|
|
65462
|
-
return Stepper;
|
|
65463
|
-
|
|
65464
|
-
}));
|
|
65465
|
-
|
|
65466
|
-
}(bsStepper));
|
|
65467
|
-
|
|
65468
|
-
var Stepper = bsStepper.exports;
|
|
65469
|
-
|
|
65470
65035
|
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}";
|
|
65471
65036
|
styleInject(css_248z);
|
|
65472
65037
|
|
|
65473
65038
|
const Wizard = forwardRef((props, ref) => {
|
|
65474
65039
|
// ** Props
|
|
65475
|
-
const { steps,
|
|
65476
|
-
// ** State
|
|
65477
|
-
const [activeIndex, setActiveIndex] = useState(0);
|
|
65478
|
-
// ** Vars
|
|
65479
|
-
let stepper = null;
|
|
65480
|
-
// ** Step change listener on mount
|
|
65481
|
-
useEffect(() => {
|
|
65482
|
-
stepper = new Stepper(ref.current, options);
|
|
65483
|
-
ref.current.addEventListener('shown.bs-stepper', function (event) {
|
|
65484
|
-
setActiveIndex(event.detail.indexStep);
|
|
65485
|
-
});
|
|
65486
|
-
if (instance) {
|
|
65487
|
-
instance(stepper);
|
|
65488
|
-
}
|
|
65489
|
-
}, []);
|
|
65040
|
+
const { steps, activeStep, setActiveStep, className = '', headerClassName = '', contentClassName = '', contentWrapperClassName = '', type = 'horizontal', separator = jsx(SvgChevronRight, { fontSize: 17 }) } = props;
|
|
65490
65041
|
// ** Renders Wizard Header
|
|
65491
65042
|
const renderHeader = () => {
|
|
65492
65043
|
return steps.map((step, index) => {
|
|
65493
65044
|
return (jsxs(Fragment, { children: [index !== 0 && index !== steps.length ? jsx("div", { className: 'line', children: separator }) : null, jsx("div", { className: classnames('step', {
|
|
65494
|
-
crossed:
|
|
65495
|
-
active: index ===
|
|
65496
|
-
}), "data-target": `#${step.id}`, children: jsxs("button", { type: 'button', className: 'step-trigger', children: [jsx("span", { className: 'bs-stepper-box', children: step.icon ? step.icon : index + 1 }), jsxs("span", { className: 'bs-stepper-label', children: [jsx("span", { className: 'bs-stepper-title', children: step.title }), step.subtitle ? jsx("span", { className: 'bs-stepper-subtitle', children: step.subtitle }) : null] })] }) })] }, step.id));
|
|
65045
|
+
crossed: step.isDone !== undefined ? step.isDone : activeStep > index,
|
|
65046
|
+
active: index === activeStep
|
|
65047
|
+
}), "data-target": `#${step.id}`, children: jsxs("button", { type: 'button', className: 'step-trigger', onClick: () => setActiveStep?.(index), children: [jsx("span", { className: 'bs-stepper-box', children: step.icon ? step.icon : index + 1 }), jsxs("span", { className: 'bs-stepper-label', children: [jsx("span", { className: 'bs-stepper-title', children: step.title }), step.subtitle ? jsx("span", { className: 'bs-stepper-subtitle', children: step.subtitle }) : null] })] }) })] }, step.id));
|
|
65497
65048
|
});
|
|
65498
65049
|
};
|
|
65499
65050
|
// ** Renders Wizard Content
|
|
@@ -65501,7 +65052,7 @@ const Wizard = forwardRef((props, ref) => {
|
|
|
65501
65052
|
return steps.map((step, index) => {
|
|
65502
65053
|
return (jsx("div", { className: classnames('content', {
|
|
65503
65054
|
[contentClassName]: contentClassName,
|
|
65504
|
-
'active dstepper-block':
|
|
65055
|
+
'active dstepper-block': activeStep === index
|
|
65505
65056
|
}), id: step.id, children: step.content }, step.id));
|
|
65506
65057
|
});
|
|
65507
65058
|
};
|
|
@@ -65514,12 +65065,10 @@ const Wizard = forwardRef((props, ref) => {
|
|
|
65514
65065
|
});
|
|
65515
65066
|
|
|
65516
65067
|
const ImportExcelComponent = (props) => {
|
|
65517
|
-
const { setValue, getValues, control, errors, formatNumber, pageOptions, pageSizeDefault, watch,
|
|
65068
|
+
const { setValue, getValues, control, errors, formatNumber, pageOptions, pageSizeDefault, watch, windowSize, optionField, dataInvalid, dataValid, dataValidate, dataError, getExcelTemplate, headerValidateExcelColumns, headerHandleErrorExcelColumns } = props;
|
|
65518
65069
|
const { t } = useTranslation();
|
|
65519
65070
|
const ref = useRef(null);
|
|
65520
|
-
return (jsx("div", { style: { marginTop: '-25px' }, className: 'modern-horizontal-wizard', children: jsx(Wizard, {
|
|
65521
|
-
setStepper(el);
|
|
65522
|
-
}, type: 'modern-horizontal', ref: ref, steps: [
|
|
65071
|
+
return (jsx("div", { style: { marginTop: '-25px' }, className: 'modern-horizontal-wizard', children: jsx(Wizard, { activeStep: watch('step'), type: 'modern-horizontal', ref: ref, steps: [
|
|
65523
65072
|
{
|
|
65524
65073
|
id: 'upload-file',
|
|
65525
65074
|
title: t('Upload file'),
|
|
@@ -65540,10 +65089,8 @@ const ImportExcelComponent = (props) => {
|
|
|
65540
65089
|
title: t('Error result'),
|
|
65541
65090
|
content: jsx(TabHandleErrorImportExcel, { formatNumber: formatNumber, pageOptions: pageOptions, pageSizeDefault: pageSizeDefault, dataError: dataError, headerHandleErrorExcelColumns: headerHandleErrorExcelColumns, windowSize: windowSize })
|
|
65542
65091
|
}
|
|
65543
|
-
]
|
|
65544
|
-
linear: true
|
|
65545
|
-
} }) }));
|
|
65092
|
+
] }) }));
|
|
65546
65093
|
};
|
|
65547
65094
|
|
|
65548
|
-
export { ExportExcelComponent, FindNodeByPath, ImportExcelComponent, InputStyleComponent, SelectTable, SelectTableTree, TabsMenuComponent, checkDecimalSeparator, checkThousandSeparator, TableEdit as default, formartNumberic, formatDateTime, generateUUID, isNullOrUndefined$1 as isNullOrUndefined, messageBoxConfirm, messageBoxConfirm2, messageBoxConfirmDelete, messageBoxError, messageHtmlBoxConfirm, messageHtmlBoxError, notificationError, notificationSuccess, roundNumber, useOnClickOutside };
|
|
65095
|
+
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 };
|
|
65549
65096
|
//# sourceMappingURL=index.mjs.map
|