react-table-edit 1.3.2 → 1.3.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/index.js +131 -2034
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +111 -2015
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5,7 +5,10 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
5
5
|
var jsxRuntime = require('react/jsx-runtime');
|
|
6
6
|
var React$5 = require('react');
|
|
7
7
|
var ReactDOM = require('react-dom');
|
|
8
|
+
var reactI18next = require('react-i18next');
|
|
8
9
|
var client = require('react-dom/client');
|
|
10
|
+
var toast = require('react-hot-toast');
|
|
11
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
12
|
|
|
10
13
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
14
|
|
|
@@ -31,6 +34,7 @@ var React__namespace = /*#__PURE__*/_interopNamespace(React$5);
|
|
|
31
34
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React$5);
|
|
32
35
|
var ReactDOM__namespace = /*#__PURE__*/_interopNamespace(ReactDOM);
|
|
33
36
|
var ReactDOM__default = /*#__PURE__*/_interopDefaultLegacy(ReactDOM);
|
|
37
|
+
var toast__default = /*#__PURE__*/_interopDefaultLegacy(toast);
|
|
34
38
|
|
|
35
39
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
36
40
|
|
|
@@ -63,12 +67,12 @@ var reactIs_production_min = {};
|
|
|
63
67
|
* This source code is licensed under the MIT license found in the
|
|
64
68
|
* LICENSE file in the root directory of this source tree.
|
|
65
69
|
*/
|
|
66
|
-
var b="function"===typeof Symbol&&Symbol.for,c
|
|
67
|
-
Symbol.for("react.suspense_list"):60120,r$2=b?Symbol.for("react.memo"):60115,t$
|
|
68
|
-
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c
|
|
69
|
-
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f$1;reactIs_production_min.Suspense=p
|
|
70
|
-
reactIs_production_min.isMemo=function(a){return z(a)===r$2};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f$1};reactIs_production_min.isSuspense=function(a){return z(a)===p
|
|
71
|
-
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$
|
|
70
|
+
var b="function"===typeof Symbol&&Symbol.for,c=b?Symbol.for("react.element"):60103,d=b?Symbol.for("react.portal"):60106,e$1=b?Symbol.for("react.fragment"):60107,f$1=b?Symbol.for("react.strict_mode"):60108,g=b?Symbol.for("react.profiler"):60114,h=b?Symbol.for("react.provider"):60109,k=b?Symbol.for("react.context"):60110,l=b?Symbol.for("react.async_mode"):60111,m=b?Symbol.for("react.concurrent_mode"):60111,n=b?Symbol.for("react.forward_ref"):60112,p=b?Symbol.for("react.suspense"):60113,q=b?
|
|
71
|
+
Symbol.for("react.suspense_list"):60120,r$2=b?Symbol.for("react.memo"):60115,t$1=b?Symbol.for("react.lazy"):60116,v=b?Symbol.for("react.block"):60121,w=b?Symbol.for("react.fundamental"):60117,x=b?Symbol.for("react.responder"):60118,y=b?Symbol.for("react.scope"):60119;
|
|
72
|
+
function z(a){if("object"===typeof a&&null!==a){var u=a.$$typeof;switch(u){case c:switch(a=a.type,a){case l:case m:case e$1:case g:case f$1:case p:return a;default:switch(a=a&&a.$$typeof,a){case k:case n:case t$1:case r$2:case h:return a;default:return u}}case d:return u}}}function A(a){return z(a)===m}reactIs_production_min.AsyncMode=l;reactIs_production_min.ConcurrentMode=m;reactIs_production_min.ContextConsumer=k;reactIs_production_min.ContextProvider=h;reactIs_production_min.Element=c;reactIs_production_min.ForwardRef=n;reactIs_production_min.Fragment=e$1;reactIs_production_min.Lazy=t$1;reactIs_production_min.Memo=r$2;reactIs_production_min.Portal=d;
|
|
73
|
+
reactIs_production_min.Profiler=g;reactIs_production_min.StrictMode=f$1;reactIs_production_min.Suspense=p;reactIs_production_min.isAsyncMode=function(a){return A(a)||z(a)===l};reactIs_production_min.isConcurrentMode=A;reactIs_production_min.isContextConsumer=function(a){return z(a)===k};reactIs_production_min.isContextProvider=function(a){return z(a)===h};reactIs_production_min.isElement=function(a){return "object"===typeof a&&null!==a&&a.$$typeof===c};reactIs_production_min.isForwardRef=function(a){return z(a)===n};reactIs_production_min.isFragment=function(a){return z(a)===e$1};reactIs_production_min.isLazy=function(a){return z(a)===t$1};
|
|
74
|
+
reactIs_production_min.isMemo=function(a){return z(a)===r$2};reactIs_production_min.isPortal=function(a){return z(a)===d};reactIs_production_min.isProfiler=function(a){return z(a)===g};reactIs_production_min.isStrictMode=function(a){return z(a)===f$1};reactIs_production_min.isSuspense=function(a){return z(a)===p};
|
|
75
|
+
reactIs_production_min.isValidElementType=function(a){return "string"===typeof a||"function"===typeof a||a===e$1||a===m||a===g||a===f$1||a===p||a===q||"object"===typeof a&&null!==a&&(a.$$typeof===t$1||a.$$typeof===r$2||a.$$typeof===h||a.$$typeof===k||a.$$typeof===n||a.$$typeof===w||a.$$typeof===x||a.$$typeof===y||a.$$typeof===v)};reactIs_production_min.typeOf=z;
|
|
72
76
|
|
|
73
77
|
var reactIs_development = {};
|
|
74
78
|
|
|
@@ -1310,7 +1314,7 @@ var fromEntries = function fromEntries(entries) {
|
|
|
1310
1314
|
* Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
|
|
1311
1315
|
*/
|
|
1312
1316
|
|
|
1313
|
-
var useIsomorphicLayoutEffect
|
|
1317
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React__namespace.useLayoutEffect : React__namespace.useEffect;
|
|
1314
1318
|
|
|
1315
1319
|
var top = 'top';
|
|
1316
1320
|
var bottom = 'bottom';
|
|
@@ -3314,12 +3318,12 @@ var usePopper = function usePopper(referenceElement, popperElement, options) {
|
|
|
3314
3318
|
}
|
|
3315
3319
|
}, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);
|
|
3316
3320
|
var popperInstanceRef = React__namespace.useRef();
|
|
3317
|
-
useIsomorphicLayoutEffect
|
|
3321
|
+
useIsomorphicLayoutEffect(function () {
|
|
3318
3322
|
if (popperInstanceRef.current) {
|
|
3319
3323
|
popperInstanceRef.current.setOptions(popperOptions);
|
|
3320
3324
|
}
|
|
3321
3325
|
}, [popperOptions]);
|
|
3322
|
-
useIsomorphicLayoutEffect
|
|
3326
|
+
useIsomorphicLayoutEffect(function () {
|
|
3323
3327
|
if (referenceElement == null || popperElement == null) {
|
|
3324
3328
|
return;
|
|
3325
3329
|
}
|
|
@@ -3429,7 +3433,7 @@ function Popper(_ref) {
|
|
|
3429
3433
|
|
|
3430
3434
|
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
3431
3435
|
|
|
3432
|
-
var warning$
|
|
3436
|
+
var warning$1 = function() {};
|
|
3433
3437
|
|
|
3434
3438
|
if (__DEV__) {
|
|
3435
3439
|
var printWarning = function printWarning(format, args) {
|
|
@@ -3454,7 +3458,7 @@ if (__DEV__) {
|
|
|
3454
3458
|
} catch (x) {}
|
|
3455
3459
|
};
|
|
3456
3460
|
|
|
3457
|
-
warning$
|
|
3461
|
+
warning$1 = function(condition, format, args) {
|
|
3458
3462
|
var len = arguments.length;
|
|
3459
3463
|
args = new Array(len > 2 ? len - 2 : 0);
|
|
3460
3464
|
for (var key = 2; key < len; key++) {
|
|
@@ -3472,7 +3476,7 @@ if (__DEV__) {
|
|
|
3472
3476
|
};
|
|
3473
3477
|
}
|
|
3474
3478
|
|
|
3475
|
-
var warning_1 = warning$
|
|
3479
|
+
var warning_1 = warning$1;
|
|
3476
3480
|
|
|
3477
3481
|
function Reference(_ref) {
|
|
3478
3482
|
var children = _ref.children,
|
|
@@ -3497,7 +3501,7 @@ function Reference(_ref) {
|
|
|
3497
3501
|
});
|
|
3498
3502
|
}
|
|
3499
3503
|
|
|
3500
|
-
function _objectWithoutPropertiesLoose$
|
|
3504
|
+
function _objectWithoutPropertiesLoose$5(r, e) {
|
|
3501
3505
|
if (null == r) return {};
|
|
3502
3506
|
var t = {};
|
|
3503
3507
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
@@ -3936,7 +3940,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
3936
3940
|
_this$props.onExiting;
|
|
3937
3941
|
_this$props.onExited;
|
|
3938
3942
|
_this$props.nodeRef;
|
|
3939
|
-
var childProps = _objectWithoutPropertiesLoose$
|
|
3943
|
+
var childProps = _objectWithoutPropertiesLoose$5(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
3940
3944
|
|
|
3941
3945
|
return (
|
|
3942
3946
|
/*#__PURE__*/
|
|
@@ -4162,7 +4166,7 @@ Transition.ENTERED = ENTERED;
|
|
|
4162
4166
|
Transition.EXITING = EXITING;
|
|
4163
4167
|
var Transition$1 = Transition;
|
|
4164
4168
|
|
|
4165
|
-
function ownKeys$
|
|
4169
|
+
function ownKeys$3(object, enumerableOnly) {
|
|
4166
4170
|
var keys = Object.keys(object);
|
|
4167
4171
|
|
|
4168
4172
|
if (Object.getOwnPropertySymbols) {
|
|
@@ -4185,13 +4189,13 @@ function _objectSpread2(target) {
|
|
|
4185
4189
|
var source = arguments[i] != null ? arguments[i] : {};
|
|
4186
4190
|
|
|
4187
4191
|
if (i % 2) {
|
|
4188
|
-
ownKeys$
|
|
4189
|
-
_defineProperty$
|
|
4192
|
+
ownKeys$3(Object(source), true).forEach(function (key) {
|
|
4193
|
+
_defineProperty$4(target, key, source[key]);
|
|
4190
4194
|
});
|
|
4191
4195
|
} else if (Object.getOwnPropertyDescriptors) {
|
|
4192
4196
|
Object.defineProperties(target, Object.getOwnPropertyDescriptors(source));
|
|
4193
4197
|
} else {
|
|
4194
|
-
ownKeys$
|
|
4198
|
+
ownKeys$3(Object(source)).forEach(function (key) {
|
|
4195
4199
|
Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
|
|
4196
4200
|
});
|
|
4197
4201
|
}
|
|
@@ -4200,7 +4204,7 @@ function _objectSpread2(target) {
|
|
|
4200
4204
|
return target;
|
|
4201
4205
|
}
|
|
4202
4206
|
|
|
4203
|
-
function _defineProperty$
|
|
4207
|
+
function _defineProperty$4(obj, key, value) {
|
|
4204
4208
|
if (key in obj) {
|
|
4205
4209
|
Object.defineProperty(obj, key, {
|
|
4206
4210
|
value: value,
|
|
@@ -4215,8 +4219,8 @@ function _defineProperty$5(obj, key, value) {
|
|
|
4215
4219
|
return obj;
|
|
4216
4220
|
}
|
|
4217
4221
|
|
|
4218
|
-
function _extends$
|
|
4219
|
-
_extends$
|
|
4222
|
+
function _extends$5() {
|
|
4223
|
+
_extends$5 = Object.assign || function (target) {
|
|
4220
4224
|
for (var i = 1; i < arguments.length; i++) {
|
|
4221
4225
|
var source = arguments[i];
|
|
4222
4226
|
|
|
@@ -4230,10 +4234,10 @@ function _extends$9() {
|
|
|
4230
4234
|
return target;
|
|
4231
4235
|
};
|
|
4232
4236
|
|
|
4233
|
-
return _extends$
|
|
4237
|
+
return _extends$5.apply(this, arguments);
|
|
4234
4238
|
}
|
|
4235
4239
|
|
|
4236
|
-
function _objectWithoutPropertiesLoose$
|
|
4240
|
+
function _objectWithoutPropertiesLoose$4(source, excluded) {
|
|
4237
4241
|
if (source == null) return {};
|
|
4238
4242
|
var target = {};
|
|
4239
4243
|
var sourceKeys = Object.keys(source);
|
|
@@ -4251,7 +4255,7 @@ function _objectWithoutPropertiesLoose$5(source, excluded) {
|
|
|
4251
4255
|
function _objectWithoutProperties$1(source, excluded) {
|
|
4252
4256
|
if (source == null) return {};
|
|
4253
4257
|
|
|
4254
|
-
var target = _objectWithoutPropertiesLoose$
|
|
4258
|
+
var target = _objectWithoutPropertiesLoose$4(source, excluded);
|
|
4255
4259
|
|
|
4256
4260
|
var key, i;
|
|
4257
4261
|
|
|
@@ -4339,7 +4343,7 @@ function pick(obj, keys) {
|
|
|
4339
4343
|
return result;
|
|
4340
4344
|
}
|
|
4341
4345
|
let warned = {};
|
|
4342
|
-
function warnOnce$
|
|
4346
|
+
function warnOnce$1(message) {
|
|
4343
4347
|
if (!warned[message]) {
|
|
4344
4348
|
/* istanbul ignore else */
|
|
4345
4349
|
if (typeof console !== 'undefined') {
|
|
@@ -4352,7 +4356,7 @@ function warnOnce$2(message) {
|
|
|
4352
4356
|
function deprecated(propType, explanation) {
|
|
4353
4357
|
return function validate(props, propName, componentName, ...rest) {
|
|
4354
4358
|
if (props[propName] !== null && typeof props[propName] !== 'undefined') {
|
|
4355
|
-
warnOnce$
|
|
4359
|
+
warnOnce$1(`"${propName}" property of "${componentName}" has been deprecated.\n${explanation}`);
|
|
4356
4360
|
}
|
|
4357
4361
|
|
|
4358
4362
|
return propType(props, propName, componentName, ...rest);
|
|
@@ -4435,7 +4439,7 @@ function isObject$1(value) {
|
|
|
4435
4439
|
const type = typeof value;
|
|
4436
4440
|
return value != null && (type === 'object' || type === 'function');
|
|
4437
4441
|
}
|
|
4438
|
-
function isFunction$
|
|
4442
|
+
function isFunction$4(value) {
|
|
4439
4443
|
if (!isObject$1(value)) {
|
|
4440
4444
|
return false;
|
|
4441
4445
|
}
|
|
@@ -4448,7 +4452,7 @@ function findDOMElements(target) {
|
|
|
4448
4452
|
return target.current;
|
|
4449
4453
|
}
|
|
4450
4454
|
|
|
4451
|
-
if (isFunction$
|
|
4455
|
+
if (isFunction$4(target)) {
|
|
4452
4456
|
return target();
|
|
4453
4457
|
}
|
|
4454
4458
|
|
|
@@ -4584,7 +4588,7 @@ const Row = props => {
|
|
|
4584
4588
|
colClasses.push(isXs ? `row-cols-${colSize}` : `row-cols-${colWidth}-${colSize}`);
|
|
4585
4589
|
});
|
|
4586
4590
|
const classes = mapToCssModules(classNames$1(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
|
|
4587
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4591
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
4588
4592
|
className: classes
|
|
4589
4593
|
}));
|
|
4590
4594
|
};
|
|
@@ -4678,7 +4682,7 @@ const Col = props => {
|
|
|
4678
4682
|
}
|
|
4679
4683
|
|
|
4680
4684
|
const classes = mapToCssModules(classNames$1(className, colClasses), cssModule);
|
|
4681
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4685
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, modifiedAttributes, {
|
|
4682
4686
|
className: classes
|
|
4683
4687
|
}));
|
|
4684
4688
|
};
|
|
@@ -4753,7 +4757,7 @@ const defaultProps$19 = {
|
|
|
4753
4757
|
tag: 'a'
|
|
4754
4758
|
};
|
|
4755
4759
|
|
|
4756
|
-
class NavLink
|
|
4760
|
+
class NavLink extends React__default["default"].Component {
|
|
4757
4761
|
constructor(props) {
|
|
4758
4762
|
super(props);
|
|
4759
4763
|
this.onClick = this.onClick.bind(this);
|
|
@@ -4789,7 +4793,7 @@ class NavLink$1 extends React__default["default"].Component {
|
|
|
4789
4793
|
disabled: attributes.disabled,
|
|
4790
4794
|
active: active
|
|
4791
4795
|
}), cssModule);
|
|
4792
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4796
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
4793
4797
|
ref: innerRef,
|
|
4794
4798
|
onClick: this.onClick,
|
|
4795
4799
|
className: classes
|
|
@@ -4798,8 +4802,8 @@ class NavLink$1 extends React__default["default"].Component {
|
|
|
4798
4802
|
|
|
4799
4803
|
}
|
|
4800
4804
|
|
|
4801
|
-
NavLink
|
|
4802
|
-
NavLink
|
|
4805
|
+
NavLink.propTypes = propTypes$1b;
|
|
4806
|
+
NavLink.defaultProps = defaultProps$19;
|
|
4803
4807
|
({
|
|
4804
4808
|
tag: tagPropType,
|
|
4805
4809
|
listTag: tagPropType,
|
|
@@ -4883,7 +4887,7 @@ class Button extends React__default["default"].Component {
|
|
|
4883
4887
|
}
|
|
4884
4888
|
|
|
4885
4889
|
const defaultAriaLabel = close ? 'Close' : null;
|
|
4886
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4890
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
|
|
4887
4891
|
type: Tag === 'button' && attributes.onClick ? 'button' : undefined
|
|
4888
4892
|
}, attributes, {
|
|
4889
4893
|
className: classes,
|
|
@@ -4964,7 +4968,7 @@ class ButtonToggle extends React__default["default"].Component {
|
|
|
4964
4968
|
const classes = mapToCssModules(classNames$1(className, {
|
|
4965
4969
|
focus: this.state.focus
|
|
4966
4970
|
}), this.props.cssModule);
|
|
4967
|
-
return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends$
|
|
4971
|
+
return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends$5({
|
|
4968
4972
|
active: this.state.toggled,
|
|
4969
4973
|
onBlur: this.onBlur,
|
|
4970
4974
|
onFocus: this.onFocus,
|
|
@@ -5247,7 +5251,7 @@ class Dropdown extends React__default["default"].Component {
|
|
|
5247
5251
|
}), cssModule);
|
|
5248
5252
|
return /*#__PURE__*/React__default["default"].createElement(DropdownContext.Provider, {
|
|
5249
5253
|
value: this.getContextValue()
|
|
5250
|
-
}, /*#__PURE__*/React__default["default"].createElement(Manager, null, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5254
|
+
}, /*#__PURE__*/React__default["default"].createElement(Manager, null, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attrs, {
|
|
5251
5255
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: this.containerRef,
|
|
5252
5256
|
onKeyDown: this.handleKeyDown,
|
|
5253
5257
|
className: classes
|
|
@@ -5265,7 +5269,7 @@ const propTypes$15 = {
|
|
|
5265
5269
|
};
|
|
5266
5270
|
|
|
5267
5271
|
const ButtonDropdown = props => {
|
|
5268
|
-
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$
|
|
5272
|
+
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$5({
|
|
5269
5273
|
group: true
|
|
5270
5274
|
}, props));
|
|
5271
5275
|
};
|
|
@@ -5397,7 +5401,7 @@ class DropdownItem extends React__default["default"].Component {
|
|
|
5397
5401
|
}
|
|
5398
5402
|
}
|
|
5399
5403
|
|
|
5400
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5404
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
|
|
5401
5405
|
type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
|
|
5402
5406
|
}, props, {
|
|
5403
5407
|
tabIndex: tabIndex,
|
|
@@ -5506,7 +5510,7 @@ class DropdownMenu extends React__default["default"].Component {
|
|
|
5506
5510
|
if (onMenuRef) onMenuRef(tagRef);
|
|
5507
5511
|
};
|
|
5508
5512
|
|
|
5509
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5513
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
|
|
5510
5514
|
tabIndex: "-1",
|
|
5511
5515
|
role: this.getRole(),
|
|
5512
5516
|
ref: handleRef
|
|
@@ -5525,7 +5529,7 @@ class DropdownMenu extends React__default["default"].Component {
|
|
|
5525
5529
|
}
|
|
5526
5530
|
}
|
|
5527
5531
|
|
|
5528
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5532
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
|
|
5529
5533
|
tabIndex: "-1",
|
|
5530
5534
|
role: this.getRole()
|
|
5531
5535
|
}, attrs, {
|
|
@@ -5624,7 +5628,7 @@ class DropdownToggle extends React__default["default"].Component {
|
|
|
5624
5628
|
}
|
|
5625
5629
|
|
|
5626
5630
|
if (this.context.inNavbar) {
|
|
5627
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5631
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, props, {
|
|
5628
5632
|
className: classes,
|
|
5629
5633
|
onClick: this.onClick,
|
|
5630
5634
|
"aria-expanded": this.context.isOpen,
|
|
@@ -5637,7 +5641,7 @@ class DropdownToggle extends React__default["default"].Component {
|
|
|
5637
5641
|
innerRef: innerRef
|
|
5638
5642
|
}, ({
|
|
5639
5643
|
ref
|
|
5640
|
-
}) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5644
|
+
}) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, props, {
|
|
5641
5645
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: ref,
|
|
5642
5646
|
className: classes,
|
|
5643
5647
|
onClick: this.onClick,
|
|
@@ -5694,7 +5698,7 @@ function Fade(props) {
|
|
|
5694
5698
|
return /*#__PURE__*/React__default["default"].createElement(Transition$1, transitionProps, status => {
|
|
5695
5699
|
const isActive = status === 'entered';
|
|
5696
5700
|
const classes = mapToCssModules(classNames$1(className, baseClass, isActive && baseClassActive), cssModule);
|
|
5697
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5701
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
|
|
5698
5702
|
className: classes
|
|
5699
5703
|
}, childProps, {
|
|
5700
5704
|
ref: innerRef
|
|
@@ -5856,7 +5860,7 @@ class Collapse extends React$5.Component {
|
|
|
5856
5860
|
} = this.state;
|
|
5857
5861
|
const transitionProps = pick(otherProps, TransitionPropTypeKeys);
|
|
5858
5862
|
const childProps = omit(otherProps, TransitionPropTypeKeys);
|
|
5859
|
-
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$
|
|
5863
|
+
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$5({}, transitionProps, {
|
|
5860
5864
|
in: isOpen,
|
|
5861
5865
|
onEntering: this.onEntering,
|
|
5862
5866
|
onEntered: this.onEntered,
|
|
@@ -5869,7 +5873,7 @@ class Collapse extends React$5.Component {
|
|
|
5869
5873
|
const style = dimension === null ? null : {
|
|
5870
5874
|
[horizontal ? 'width' : 'height']: dimension
|
|
5871
5875
|
};
|
|
5872
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5876
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, childProps, {
|
|
5873
5877
|
style: _objectSpread2(_objectSpread2({}, childProps.style), style),
|
|
5874
5878
|
className: classes,
|
|
5875
5879
|
ref: this.props.innerRef
|
|
@@ -5924,7 +5928,7 @@ const Badge = props => {
|
|
|
5924
5928
|
Tag = 'a';
|
|
5925
5929
|
}
|
|
5926
5930
|
|
|
5927
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5931
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
5928
5932
|
className: classes,
|
|
5929
5933
|
ref: innerRef
|
|
5930
5934
|
}));
|
|
@@ -6057,7 +6061,7 @@ class CarouselItem extends React__default["default"].Component {
|
|
|
6057
6061
|
} = _this$props,
|
|
6058
6062
|
transitionProps = _objectWithoutProperties$1(_this$props, _excluded$E);
|
|
6059
6063
|
|
|
6060
|
-
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$
|
|
6064
|
+
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$5({}, transitionProps, {
|
|
6061
6065
|
enter: slide,
|
|
6062
6066
|
exit: slide,
|
|
6063
6067
|
in: isIn,
|
|
@@ -6586,7 +6590,7 @@ class UncontrolledCarousel extends React$5.Component {
|
|
|
6586
6590
|
captionHeader: item.header || item.caption
|
|
6587
6591
|
}));
|
|
6588
6592
|
});
|
|
6589
|
-
return /*#__PURE__*/React__default["default"].createElement(Carousel$1, _extends$
|
|
6593
|
+
return /*#__PURE__*/React__default["default"].createElement(Carousel$1, _extends$5({
|
|
6590
6594
|
activeIndex: activeIndex,
|
|
6591
6595
|
next: this.next,
|
|
6592
6596
|
previous: this.previous,
|
|
@@ -6772,7 +6776,7 @@ class PopperContent extends React__default["default"].Component {
|
|
|
6772
6776
|
timeout: fade ? transition.timeout : 0
|
|
6773
6777
|
});
|
|
6774
6778
|
|
|
6775
|
-
return /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
6779
|
+
return /*#__PURE__*/React__default["default"].createElement(Fade, _extends$5({}, popperTransition, attrs, {
|
|
6776
6780
|
in: isOpen,
|
|
6777
6781
|
onExited: this.onClosed,
|
|
6778
6782
|
tag: tag
|
|
@@ -7184,7 +7188,7 @@ class TooltipPopoverWrapper extends React__default["default"].Component {
|
|
|
7184
7188
|
flip: flip
|
|
7185
7189
|
}, ({
|
|
7186
7190
|
update
|
|
7187
|
-
}) => /*#__PURE__*/React__default["default"].createElement("div", _extends$
|
|
7191
|
+
}) => /*#__PURE__*/React__default["default"].createElement("div", _extends$5({}, attributes, {
|
|
7188
7192
|
ref: this.getRef,
|
|
7189
7193
|
className: classes,
|
|
7190
7194
|
role: "tooltip",
|
|
@@ -7212,7 +7216,7 @@ const defaultProps$D = {
|
|
|
7212
7216
|
const Popover = props => {
|
|
7213
7217
|
const popperClasses = classNames$1('popover', 'show', props.popperClassName);
|
|
7214
7218
|
const classes = classNames$1('popover-inner', props.innerClassName);
|
|
7215
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$
|
|
7219
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
|
|
7216
7220
|
arrowClassName: "popover-arrow",
|
|
7217
7221
|
popperClassName: popperClasses,
|
|
7218
7222
|
innerClassName: classes
|
|
@@ -7240,7 +7244,7 @@ class UncontrolledPopover extends React$5.Component {
|
|
|
7240
7244
|
}
|
|
7241
7245
|
|
|
7242
7246
|
render() {
|
|
7243
|
-
return /*#__PURE__*/React__default["default"].createElement(Popover$1, _extends$
|
|
7247
|
+
return /*#__PURE__*/React__default["default"].createElement(Popover$1, _extends$5({
|
|
7244
7248
|
isOpen: this.state.isOpen,
|
|
7245
7249
|
toggle: this.toggle
|
|
7246
7250
|
}, omit(this.props, omitKeys$4)));
|
|
@@ -7679,7 +7683,7 @@ class Modal extends React__default["default"].Component {
|
|
|
7679
7683
|
renderModalDialog() {
|
|
7680
7684
|
const attributes = omit(this.props, propsToOmit$1);
|
|
7681
7685
|
const dialogBaseClass = 'modal-dialog';
|
|
7682
|
-
return /*#__PURE__*/React__default["default"].createElement("div", _extends$
|
|
7686
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends$5({}, attributes, {
|
|
7683
7687
|
className: mapToCssModules(classNames$1(dialogBaseClass, this.props.className, {
|
|
7684
7688
|
[`modal-${this.props.size}`]: this.props.size,
|
|
7685
7689
|
[`${dialogBaseClass}-centered`]: this.props.centered,
|
|
@@ -7740,7 +7744,7 @@ class Modal extends React__default["default"].Component {
|
|
|
7740
7744
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
7741
7745
|
});
|
|
7742
7746
|
|
|
7743
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
7747
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$5({}, backdropTransition, {
|
|
7744
7748
|
in: isOpen && !!backdrop,
|
|
7745
7749
|
cssModule: cssModule,
|
|
7746
7750
|
className: mapToCssModules(classNames$1('modal-backdrop', backdropClassName), cssModule)
|
|
@@ -7751,7 +7755,7 @@ class Modal extends React__default["default"].Component {
|
|
|
7751
7755
|
node: this._element
|
|
7752
7756
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7753
7757
|
className: mapToCssModules(wrapClassName)
|
|
7754
|
-
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
7758
|
+
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$5({}, modalAttributes, modalTransition, {
|
|
7755
7759
|
in: isOpen,
|
|
7756
7760
|
onEntered: this.onOpened,
|
|
7757
7761
|
onExited: this.onClosed,
|
|
@@ -7806,7 +7810,7 @@ const ModalBody = props => {
|
|
|
7806
7810
|
attributes = _objectWithoutProperties$1(props, _excluded$u);
|
|
7807
7811
|
|
|
7808
7812
|
const classes = mapToCssModules(classNames$1(className, 'modal-body'), cssModule);
|
|
7809
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
7813
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
7810
7814
|
className: classes
|
|
7811
7815
|
}));
|
|
7812
7816
|
};
|
|
@@ -7830,7 +7834,7 @@ const defaultProps$v = {
|
|
|
7830
7834
|
const Tooltip = props => {
|
|
7831
7835
|
const popperClasses = classNames$1('tooltip', 'show', props.popperClassName);
|
|
7832
7836
|
const classes = classNames$1('tooltip-inner', props.innerClassName);
|
|
7833
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$
|
|
7837
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$5({}, props, {
|
|
7834
7838
|
arrowClassName: "tooltip-arrow",
|
|
7835
7839
|
popperClassName: popperClasses,
|
|
7836
7840
|
innerClassName: classes
|
|
@@ -7876,7 +7880,7 @@ const defaultProps$s = {
|
|
|
7876
7880
|
tag: 'form'
|
|
7877
7881
|
};
|
|
7878
7882
|
|
|
7879
|
-
class Form
|
|
7883
|
+
class Form extends React$5.Component {
|
|
7880
7884
|
constructor(props) {
|
|
7881
7885
|
super(props);
|
|
7882
7886
|
this.getRef = this.getRef.bind(this);
|
|
@@ -7909,7 +7913,7 @@ class Form$1 extends React$5.Component {
|
|
|
7909
7913
|
attributes = _objectWithoutProperties$1(_this$props, _excluded$q);
|
|
7910
7914
|
|
|
7911
7915
|
const classes = mapToCssModules(classNames$1(className, inline ? 'form-inline' : false), cssModule);
|
|
7912
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
7916
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
7913
7917
|
ref: innerRef,
|
|
7914
7918
|
className: classes
|
|
7915
7919
|
}));
|
|
@@ -7917,8 +7921,8 @@ class Form$1 extends React$5.Component {
|
|
|
7917
7921
|
|
|
7918
7922
|
}
|
|
7919
7923
|
|
|
7920
|
-
Form
|
|
7921
|
-
Form
|
|
7924
|
+
Form.propTypes = propTypes$t;
|
|
7925
|
+
Form.defaultProps = defaultProps$s;
|
|
7922
7926
|
|
|
7923
7927
|
const _excluded$p = ["className", "cssModule", "valid", "tooltip", "tag"];
|
|
7924
7928
|
const propTypes$s = {
|
|
@@ -7946,7 +7950,7 @@ const FormFeedback = props => {
|
|
|
7946
7950
|
|
|
7947
7951
|
const validMode = tooltip ? 'tooltip' : 'feedback';
|
|
7948
7952
|
const classes = mapToCssModules(classNames$1(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
|
|
7949
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
7953
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
7950
7954
|
className: classes
|
|
7951
7955
|
}));
|
|
7952
7956
|
};
|
|
@@ -8055,7 +8059,7 @@ class Input extends React__default["default"].Component {
|
|
|
8055
8059
|
}
|
|
8056
8060
|
|
|
8057
8061
|
if (attributes.size && isNotaNumber.test(attributes.size)) {
|
|
8058
|
-
warnOnce$
|
|
8062
|
+
warnOnce$1('Please use the prop "bsSize" instead of the "size" to bootstrap\'s input sizing.');
|
|
8059
8063
|
bsSize = attributes.size;
|
|
8060
8064
|
delete attributes.size;
|
|
8061
8065
|
}
|
|
@@ -8067,11 +8071,11 @@ class Input extends React__default["default"].Component {
|
|
|
8067
8071
|
}
|
|
8068
8072
|
|
|
8069
8073
|
if (attributes.children && !(plaintext || type === 'select' || typeof Tag !== 'string' || Tag === 'select')) {
|
|
8070
|
-
warnOnce$
|
|
8074
|
+
warnOnce$1(`Input with a type of "${type}" cannot have children. Please use "value"/"defaultValue" instead.`);
|
|
8071
8075
|
delete attributes.children;
|
|
8072
8076
|
}
|
|
8073
8077
|
|
|
8074
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8078
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
8075
8079
|
ref: innerRef,
|
|
8076
8080
|
className: classes,
|
|
8077
8081
|
"aria-invalid": invalid
|
|
@@ -8175,7 +8179,7 @@ const Label = props => {
|
|
|
8175
8179
|
}
|
|
8176
8180
|
});
|
|
8177
8181
|
const classes = mapToCssModules(classNames$1(className, hidden ? 'visually-hidden' : false, check ? 'form-check-label' : false, size ? `col-form-label-${size}` : false, colClasses, colClasses.length ? 'col-form-label' : 'form-label'), cssModule);
|
|
8178
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8182
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
|
|
8179
8183
|
htmlFor: htmlFor
|
|
8180
8184
|
}, attributes, {
|
|
8181
8185
|
className: classes
|
|
@@ -8567,7 +8571,7 @@ class Offcanvas extends React__default["default"].Component {
|
|
|
8567
8571
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
8568
8572
|
});
|
|
8569
8573
|
|
|
8570
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
8574
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$5({}, backdropTransition, {
|
|
8571
8575
|
in: isOpen && !!backdrop,
|
|
8572
8576
|
innerRef: c => {
|
|
8573
8577
|
this._backdrop = c;
|
|
@@ -8584,7 +8588,7 @@ class Offcanvas extends React__default["default"].Component {
|
|
|
8584
8588
|
const attributes = omit(this.props, propsToOmit);
|
|
8585
8589
|
return /*#__PURE__*/React__default["default"].createElement(Portal$1$1, {
|
|
8586
8590
|
node: this._element
|
|
8587
|
-
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
8591
|
+
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$5({}, attributes, offcanvasAttributes, offcanvasTransition, {
|
|
8588
8592
|
in: isOpen,
|
|
8589
8593
|
onEntered: this.onOpened,
|
|
8590
8594
|
onExited: this.onClosed,
|
|
@@ -8708,7 +8712,7 @@ class TabContent extends React$5.Component {
|
|
|
8708
8712
|
value: {
|
|
8709
8713
|
activeTabId: this.state.activeTab
|
|
8710
8714
|
}
|
|
8711
|
-
}, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8715
|
+
}, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
8712
8716
|
className: classes
|
|
8713
8717
|
})));
|
|
8714
8718
|
}
|
|
@@ -8822,7 +8826,7 @@ const List = React$5.forwardRef((props, ref) => {
|
|
|
8822
8826
|
attributes = _objectWithoutProperties$1(props, _excluded$4);
|
|
8823
8827
|
|
|
8824
8828
|
const classes = mapToCssModules(classNames$1(className, type ? `list-${type}` : false), cssModule);
|
|
8825
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8829
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
8826
8830
|
className: classes,
|
|
8827
8831
|
ref: ref
|
|
8828
8832
|
}));
|
|
@@ -8849,7 +8853,7 @@ const ListInlineItem = React$5.forwardRef((props, ref) => {
|
|
|
8849
8853
|
attributes = _objectWithoutProperties$1(props, _excluded$3);
|
|
8850
8854
|
|
|
8851
8855
|
const classes = mapToCssModules(classNames$1(className, 'list-inline-item'), cssModule);
|
|
8852
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8856
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({}, attributes, {
|
|
8853
8857
|
className: classes,
|
|
8854
8858
|
ref: ref
|
|
8855
8859
|
}));
|
|
@@ -8875,7 +8879,7 @@ class UncontrolledButtonDropdown extends React$5.Component {
|
|
|
8875
8879
|
}
|
|
8876
8880
|
|
|
8877
8881
|
render() {
|
|
8878
|
-
return /*#__PURE__*/React__default["default"].createElement(ButtonDropdown$1, _extends$
|
|
8882
|
+
return /*#__PURE__*/React__default["default"].createElement(ButtonDropdown$1, _extends$5({
|
|
8879
8883
|
isOpen: this.state.isOpen,
|
|
8880
8884
|
toggle: this.toggle
|
|
8881
8885
|
}, omit(this.props, omitKeys$3)));
|
|
@@ -8931,7 +8935,7 @@ class UncontrolledCollapse extends React$5.Component {
|
|
|
8931
8935
|
}
|
|
8932
8936
|
|
|
8933
8937
|
render() {
|
|
8934
|
-
return /*#__PURE__*/React__default["default"].createElement(Collapse$1, _extends$
|
|
8938
|
+
return /*#__PURE__*/React__default["default"].createElement(Collapse$1, _extends$5({
|
|
8935
8939
|
isOpen: this.state.isOpen
|
|
8936
8940
|
}, omit(this.props, omitKeys$2)));
|
|
8937
8941
|
}
|
|
@@ -8963,7 +8967,7 @@ class UncontrolledDropdown extends React$5.Component {
|
|
|
8963
8967
|
}
|
|
8964
8968
|
|
|
8965
8969
|
render() {
|
|
8966
|
-
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$
|
|
8970
|
+
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$5({
|
|
8967
8971
|
isOpen: this.state.isOpen,
|
|
8968
8972
|
toggle: this.toggle
|
|
8969
8973
|
}, omit(this.props, omitKeys$1)));
|
|
@@ -8992,7 +8996,7 @@ class UncontrolledTooltip extends React$5.Component {
|
|
|
8992
8996
|
}
|
|
8993
8997
|
|
|
8994
8998
|
render() {
|
|
8995
|
-
return /*#__PURE__*/React__default["default"].createElement(Tooltip$1, _extends$
|
|
8999
|
+
return /*#__PURE__*/React__default["default"].createElement(Tooltip$1, _extends$5({
|
|
8996
9000
|
isOpen: this.state.isOpen,
|
|
8997
9001
|
toggle: this.toggle
|
|
8998
9002
|
}, omit(this.props, omitKeys)));
|
|
@@ -9003,7 +9007,7 @@ UncontrolledTooltip.propTypes = _objectSpread2({
|
|
|
9003
9007
|
defaultOpen: PropTypes.bool
|
|
9004
9008
|
}, Tooltip$1.propTypes);
|
|
9005
9009
|
|
|
9006
|
-
const _excluded$2
|
|
9010
|
+
const _excluded$2 = ["className", "cssModule", "type", "size", "color", "children", "tag"];
|
|
9007
9011
|
const propTypes$2 = {
|
|
9008
9012
|
tag: tagPropType,
|
|
9009
9013
|
type: PropTypes.string,
|
|
@@ -9029,10 +9033,10 @@ const Spinner = props => {
|
|
|
9029
9033
|
children,
|
|
9030
9034
|
tag: Tag
|
|
9031
9035
|
} = props,
|
|
9032
|
-
attributes = _objectWithoutProperties$1(props, _excluded$2
|
|
9036
|
+
attributes = _objectWithoutProperties$1(props, _excluded$2);
|
|
9033
9037
|
|
|
9034
9038
|
const classes = mapToCssModules(classNames$1(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
|
|
9035
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
9039
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$5({
|
|
9036
9040
|
role: "status"
|
|
9037
9041
|
}, attributes, {
|
|
9038
9042
|
className: classes
|
|
@@ -9145,381 +9149,6 @@ var classnames$1 = {exports: {}};
|
|
|
9145
9149
|
|
|
9146
9150
|
var classnames = classnames$1.exports;
|
|
9147
9151
|
|
|
9148
|
-
function _typeof(o) {
|
|
9149
|
-
"@babel/helpers - typeof";
|
|
9150
|
-
|
|
9151
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
9152
|
-
return typeof o;
|
|
9153
|
-
} : function (o) {
|
|
9154
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
9155
|
-
}, _typeof(o);
|
|
9156
|
-
}
|
|
9157
|
-
|
|
9158
|
-
function toPrimitive(t, r) {
|
|
9159
|
-
if ("object" != _typeof(t) || !t) return t;
|
|
9160
|
-
var e = t[Symbol.toPrimitive];
|
|
9161
|
-
if (void 0 !== e) {
|
|
9162
|
-
var i = e.call(t, r || "default");
|
|
9163
|
-
if ("object" != _typeof(i)) return i;
|
|
9164
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
9165
|
-
}
|
|
9166
|
-
return ("string" === r ? String : Number)(t);
|
|
9167
|
-
}
|
|
9168
|
-
|
|
9169
|
-
function toPropertyKey(t) {
|
|
9170
|
-
var i = toPrimitive(t, "string");
|
|
9171
|
-
return "symbol" == _typeof(i) ? i : i + "";
|
|
9172
|
-
}
|
|
9173
|
-
|
|
9174
|
-
function _defineProperty$4(e, r, t) {
|
|
9175
|
-
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
9176
|
-
value: t,
|
|
9177
|
-
enumerable: !0,
|
|
9178
|
-
configurable: !0,
|
|
9179
|
-
writable: !0
|
|
9180
|
-
}) : e[r] = t, e;
|
|
9181
|
-
}
|
|
9182
|
-
|
|
9183
|
-
function _classCallCheck(a, n) {
|
|
9184
|
-
if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function");
|
|
9185
|
-
}
|
|
9186
|
-
|
|
9187
|
-
function _defineProperties(e, r) {
|
|
9188
|
-
for (var t = 0; t < r.length; t++) {
|
|
9189
|
-
var o = r[t];
|
|
9190
|
-
o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, toPropertyKey(o.key), o);
|
|
9191
|
-
}
|
|
9192
|
-
}
|
|
9193
|
-
function _createClass(e, r, t) {
|
|
9194
|
-
return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", {
|
|
9195
|
-
writable: !1
|
|
9196
|
-
}), e;
|
|
9197
|
-
}
|
|
9198
|
-
|
|
9199
|
-
var matchHtmlEntity = /&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g;
|
|
9200
|
-
var htmlEntities = {
|
|
9201
|
-
'&': '&',
|
|
9202
|
-
'&': '&',
|
|
9203
|
-
'<': '<',
|
|
9204
|
-
'<': '<',
|
|
9205
|
-
'>': '>',
|
|
9206
|
-
'>': '>',
|
|
9207
|
-
''': "'",
|
|
9208
|
-
''': "'",
|
|
9209
|
-
'"': '"',
|
|
9210
|
-
'"': '"',
|
|
9211
|
-
' ': ' ',
|
|
9212
|
-
' ': ' ',
|
|
9213
|
-
'©': '©',
|
|
9214
|
-
'©': '©',
|
|
9215
|
-
'®': '®',
|
|
9216
|
-
'®': '®',
|
|
9217
|
-
'…': '…',
|
|
9218
|
-
'…': '…',
|
|
9219
|
-
'/': '/',
|
|
9220
|
-
'/': '/'
|
|
9221
|
-
};
|
|
9222
|
-
|
|
9223
|
-
var unescapeHtmlEntity = function unescapeHtmlEntity(m) {
|
|
9224
|
-
return htmlEntities[m];
|
|
9225
|
-
};
|
|
9226
|
-
|
|
9227
|
-
var unescape = function unescape(text) {
|
|
9228
|
-
return text.replace(matchHtmlEntity, unescapeHtmlEntity);
|
|
9229
|
-
};
|
|
9230
|
-
|
|
9231
|
-
var defaultOptions$2 = {
|
|
9232
|
-
bindI18n: 'languageChanged',
|
|
9233
|
-
bindI18nStore: '',
|
|
9234
|
-
transEmptyNodeValue: '',
|
|
9235
|
-
transSupportBasicHtmlNodes: true,
|
|
9236
|
-
transWrapTextNodes: '',
|
|
9237
|
-
transKeepBasicHtmlNodesFor: ['br', 'strong', 'i', 'p'],
|
|
9238
|
-
useSuspense: true,
|
|
9239
|
-
unescape: unescape
|
|
9240
|
-
};
|
|
9241
|
-
var i18nInstance;
|
|
9242
|
-
var I18nContext = React$5.createContext();
|
|
9243
|
-
function getDefaults() {
|
|
9244
|
-
return defaultOptions$2;
|
|
9245
|
-
}
|
|
9246
|
-
var ReportNamespaces = function () {
|
|
9247
|
-
function ReportNamespaces() {
|
|
9248
|
-
_classCallCheck(this, ReportNamespaces);
|
|
9249
|
-
|
|
9250
|
-
this.usedNamespaces = {};
|
|
9251
|
-
}
|
|
9252
|
-
|
|
9253
|
-
_createClass(ReportNamespaces, [{
|
|
9254
|
-
key: "addUsedNamespaces",
|
|
9255
|
-
value: function addUsedNamespaces(namespaces) {
|
|
9256
|
-
var _this = this;
|
|
9257
|
-
|
|
9258
|
-
namespaces.forEach(function (ns) {
|
|
9259
|
-
if (!_this.usedNamespaces[ns]) _this.usedNamespaces[ns] = true;
|
|
9260
|
-
});
|
|
9261
|
-
}
|
|
9262
|
-
}, {
|
|
9263
|
-
key: "getUsedNamespaces",
|
|
9264
|
-
value: function getUsedNamespaces() {
|
|
9265
|
-
return Object.keys(this.usedNamespaces);
|
|
9266
|
-
}
|
|
9267
|
-
}]);
|
|
9268
|
-
|
|
9269
|
-
return ReportNamespaces;
|
|
9270
|
-
}();
|
|
9271
|
-
function getI18n() {
|
|
9272
|
-
return i18nInstance;
|
|
9273
|
-
}
|
|
9274
|
-
|
|
9275
|
-
function warn$2() {
|
|
9276
|
-
if (console && console.warn) {
|
|
9277
|
-
var _console;
|
|
9278
|
-
|
|
9279
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
9280
|
-
args[_key] = arguments[_key];
|
|
9281
|
-
}
|
|
9282
|
-
|
|
9283
|
-
if (typeof args[0] === 'string') args[0] = "react-i18next:: ".concat(args[0]);
|
|
9284
|
-
|
|
9285
|
-
(_console = console).warn.apply(_console, args);
|
|
9286
|
-
}
|
|
9287
|
-
}
|
|
9288
|
-
var alreadyWarned = {};
|
|
9289
|
-
function warnOnce$1() {
|
|
9290
|
-
for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
9291
|
-
args[_key2] = arguments[_key2];
|
|
9292
|
-
}
|
|
9293
|
-
|
|
9294
|
-
if (typeof args[0] === 'string' && alreadyWarned[args[0]]) return;
|
|
9295
|
-
if (typeof args[0] === 'string') alreadyWarned[args[0]] = new Date();
|
|
9296
|
-
warn$2.apply(void 0, args);
|
|
9297
|
-
}
|
|
9298
|
-
function loadNamespaces(i18n, ns, cb) {
|
|
9299
|
-
i18n.loadNamespaces(ns, function () {
|
|
9300
|
-
if (i18n.isInitialized) {
|
|
9301
|
-
cb();
|
|
9302
|
-
} else {
|
|
9303
|
-
var initialized = function initialized() {
|
|
9304
|
-
setTimeout(function () {
|
|
9305
|
-
i18n.off('initialized', initialized);
|
|
9306
|
-
}, 0);
|
|
9307
|
-
cb();
|
|
9308
|
-
};
|
|
9309
|
-
|
|
9310
|
-
i18n.on('initialized', initialized);
|
|
9311
|
-
}
|
|
9312
|
-
});
|
|
9313
|
-
}
|
|
9314
|
-
|
|
9315
|
-
function oldI18nextHasLoadedNamespace(ns, i18n) {
|
|
9316
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9317
|
-
var lng = i18n.languages[0];
|
|
9318
|
-
var fallbackLng = i18n.options ? i18n.options.fallbackLng : false;
|
|
9319
|
-
var lastLng = i18n.languages[i18n.languages.length - 1];
|
|
9320
|
-
if (lng.toLowerCase() === 'cimode') return true;
|
|
9321
|
-
|
|
9322
|
-
var loadNotPending = function loadNotPending(l, n) {
|
|
9323
|
-
var loadState = i18n.services.backendConnector.state["".concat(l, "|").concat(n)];
|
|
9324
|
-
return loadState === -1 || loadState === 2;
|
|
9325
|
-
};
|
|
9326
|
-
|
|
9327
|
-
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18n.services.backendConnector.backend && i18n.isLanguageChangingTo && !loadNotPending(i18n.isLanguageChangingTo, ns)) return false;
|
|
9328
|
-
if (i18n.hasResourceBundle(lng, ns)) return true;
|
|
9329
|
-
if (!i18n.services.backendConnector.backend || i18n.options.resources && !i18n.options.partialBundledLanguages) return true;
|
|
9330
|
-
if (loadNotPending(lng, ns) && (!fallbackLng || loadNotPending(lastLng, ns))) return true;
|
|
9331
|
-
return false;
|
|
9332
|
-
}
|
|
9333
|
-
|
|
9334
|
-
function hasLoadedNamespace(ns, i18n) {
|
|
9335
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
|
|
9336
|
-
|
|
9337
|
-
if (!i18n.languages || !i18n.languages.length) {
|
|
9338
|
-
warnOnce$1('i18n.languages were undefined or empty', i18n.languages);
|
|
9339
|
-
return true;
|
|
9340
|
-
}
|
|
9341
|
-
|
|
9342
|
-
var isNewerI18next = i18n.options.ignoreJSONStructure !== undefined;
|
|
9343
|
-
|
|
9344
|
-
if (!isNewerI18next) {
|
|
9345
|
-
return oldI18nextHasLoadedNamespace(ns, i18n, options);
|
|
9346
|
-
}
|
|
9347
|
-
|
|
9348
|
-
return i18n.hasLoadedNamespace(ns, {
|
|
9349
|
-
precheck: function precheck(i18nInstance, loadNotPending) {
|
|
9350
|
-
if (options.bindI18n && options.bindI18n.indexOf('languageChanging') > -1 && i18nInstance.services.backendConnector.backend && i18nInstance.isLanguageChangingTo && !loadNotPending(i18nInstance.isLanguageChangingTo, ns)) return false;
|
|
9351
|
-
}
|
|
9352
|
-
});
|
|
9353
|
-
}
|
|
9354
|
-
|
|
9355
|
-
function _arrayWithHoles(r) {
|
|
9356
|
-
if (Array.isArray(r)) return r;
|
|
9357
|
-
}
|
|
9358
|
-
|
|
9359
|
-
function _iterableToArrayLimit(r, l) {
|
|
9360
|
-
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
9361
|
-
if (null != t) {
|
|
9362
|
-
var e,
|
|
9363
|
-
n,
|
|
9364
|
-
i,
|
|
9365
|
-
u,
|
|
9366
|
-
a = [],
|
|
9367
|
-
f = !0,
|
|
9368
|
-
o = !1;
|
|
9369
|
-
try {
|
|
9370
|
-
if (i = (t = t.call(r)).next, 0 === l) {
|
|
9371
|
-
if (Object(t) !== t) return;
|
|
9372
|
-
f = !1;
|
|
9373
|
-
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
9374
|
-
} catch (r) {
|
|
9375
|
-
o = !0, n = r;
|
|
9376
|
-
} finally {
|
|
9377
|
-
try {
|
|
9378
|
-
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
9379
|
-
} finally {
|
|
9380
|
-
if (o) throw n;
|
|
9381
|
-
}
|
|
9382
|
-
}
|
|
9383
|
-
return a;
|
|
9384
|
-
}
|
|
9385
|
-
}
|
|
9386
|
-
|
|
9387
|
-
function _arrayLikeToArray(r, a) {
|
|
9388
|
-
(null == a || a > r.length) && (a = r.length);
|
|
9389
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
9390
|
-
return n;
|
|
9391
|
-
}
|
|
9392
|
-
|
|
9393
|
-
function _unsupportedIterableToArray(r, a) {
|
|
9394
|
-
if (r) {
|
|
9395
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
9396
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
9397
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
9398
|
-
}
|
|
9399
|
-
}
|
|
9400
|
-
|
|
9401
|
-
function _nonIterableRest() {
|
|
9402
|
-
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
9403
|
-
}
|
|
9404
|
-
|
|
9405
|
-
function _slicedToArray(r, e) {
|
|
9406
|
-
return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest();
|
|
9407
|
-
}
|
|
9408
|
-
|
|
9409
|
-
function ownKeys$3(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
9410
|
-
|
|
9411
|
-
function _objectSpread$3(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys$3(Object(source), true).forEach(function (key) { _defineProperty$4(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys$3(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
9412
|
-
|
|
9413
|
-
var usePrevious = function usePrevious(value, ignore) {
|
|
9414
|
-
var ref = React$5.useRef();
|
|
9415
|
-
React$5.useEffect(function () {
|
|
9416
|
-
ref.current = ignore ? ref.current : value;
|
|
9417
|
-
}, [value, ignore]);
|
|
9418
|
-
return ref.current;
|
|
9419
|
-
};
|
|
9420
|
-
|
|
9421
|
-
function useTranslation(ns) {
|
|
9422
|
-
var props = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
9423
|
-
var i18nFromProps = props.i18n;
|
|
9424
|
-
|
|
9425
|
-
var _ref = React$5.useContext(I18nContext) || {},
|
|
9426
|
-
i18nFromContext = _ref.i18n,
|
|
9427
|
-
defaultNSFromContext = _ref.defaultNS;
|
|
9428
|
-
|
|
9429
|
-
var i18n = i18nFromProps || i18nFromContext || getI18n();
|
|
9430
|
-
if (i18n && !i18n.reportNamespaces) i18n.reportNamespaces = new ReportNamespaces();
|
|
9431
|
-
|
|
9432
|
-
if (!i18n) {
|
|
9433
|
-
warnOnce$1('You will need to pass in an i18next instance by using initReactI18next');
|
|
9434
|
-
|
|
9435
|
-
var notReadyT = function notReadyT(k) {
|
|
9436
|
-
return Array.isArray(k) ? k[k.length - 1] : k;
|
|
9437
|
-
};
|
|
9438
|
-
|
|
9439
|
-
var retNotReady = [notReadyT, {}, false];
|
|
9440
|
-
retNotReady.t = notReadyT;
|
|
9441
|
-
retNotReady.i18n = {};
|
|
9442
|
-
retNotReady.ready = false;
|
|
9443
|
-
return retNotReady;
|
|
9444
|
-
}
|
|
9445
|
-
|
|
9446
|
-
if (i18n.options.react && i18n.options.react.wait !== undefined) warnOnce$1('It seems you are still using the old wait option, you may migrate to the new useSuspense behaviour.');
|
|
9447
|
-
|
|
9448
|
-
var i18nOptions = _objectSpread$3(_objectSpread$3(_objectSpread$3({}, getDefaults()), i18n.options.react), props);
|
|
9449
|
-
|
|
9450
|
-
var useSuspense = i18nOptions.useSuspense,
|
|
9451
|
-
keyPrefix = i18nOptions.keyPrefix;
|
|
9452
|
-
var namespaces = ns || defaultNSFromContext || i18n.options && i18n.options.defaultNS;
|
|
9453
|
-
namespaces = typeof namespaces === 'string' ? [namespaces] : namespaces || ['translation'];
|
|
9454
|
-
if (i18n.reportNamespaces.addUsedNamespaces) i18n.reportNamespaces.addUsedNamespaces(namespaces);
|
|
9455
|
-
var ready = (i18n.isInitialized || i18n.initializedStoreOnce) && namespaces.every(function (n) {
|
|
9456
|
-
return hasLoadedNamespace(n, i18n, i18nOptions);
|
|
9457
|
-
});
|
|
9458
|
-
|
|
9459
|
-
function getT() {
|
|
9460
|
-
return i18n.getFixedT(null, i18nOptions.nsMode === 'fallback' ? namespaces : namespaces[0], keyPrefix);
|
|
9461
|
-
}
|
|
9462
|
-
|
|
9463
|
-
var _useState = React$5.useState(getT),
|
|
9464
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
9465
|
-
t = _useState2[0],
|
|
9466
|
-
setT = _useState2[1];
|
|
9467
|
-
|
|
9468
|
-
var joinedNS = namespaces.join();
|
|
9469
|
-
var previousJoinedNS = usePrevious(joinedNS);
|
|
9470
|
-
var isMounted = React$5.useRef(true);
|
|
9471
|
-
React$5.useEffect(function () {
|
|
9472
|
-
var bindI18n = i18nOptions.bindI18n,
|
|
9473
|
-
bindI18nStore = i18nOptions.bindI18nStore;
|
|
9474
|
-
isMounted.current = true;
|
|
9475
|
-
|
|
9476
|
-
if (!ready && !useSuspense) {
|
|
9477
|
-
loadNamespaces(i18n, namespaces, function () {
|
|
9478
|
-
if (isMounted.current) setT(getT);
|
|
9479
|
-
});
|
|
9480
|
-
}
|
|
9481
|
-
|
|
9482
|
-
if (ready && previousJoinedNS && previousJoinedNS !== joinedNS && isMounted.current) {
|
|
9483
|
-
setT(getT);
|
|
9484
|
-
}
|
|
9485
|
-
|
|
9486
|
-
function boundReset() {
|
|
9487
|
-
if (isMounted.current) setT(getT);
|
|
9488
|
-
}
|
|
9489
|
-
|
|
9490
|
-
if (bindI18n && i18n) i18n.on(bindI18n, boundReset);
|
|
9491
|
-
if (bindI18nStore && i18n) i18n.store.on(bindI18nStore, boundReset);
|
|
9492
|
-
return function () {
|
|
9493
|
-
isMounted.current = false;
|
|
9494
|
-
if (bindI18n && i18n) bindI18n.split(' ').forEach(function (e) {
|
|
9495
|
-
return i18n.off(e, boundReset);
|
|
9496
|
-
});
|
|
9497
|
-
if (bindI18nStore && i18n) bindI18nStore.split(' ').forEach(function (e) {
|
|
9498
|
-
return i18n.store.off(e, boundReset);
|
|
9499
|
-
});
|
|
9500
|
-
};
|
|
9501
|
-
}, [i18n, joinedNS]);
|
|
9502
|
-
var isInitial = React$5.useRef(true);
|
|
9503
|
-
React$5.useEffect(function () {
|
|
9504
|
-
if (isMounted.current && !isInitial.current) {
|
|
9505
|
-
setT(getT);
|
|
9506
|
-
}
|
|
9507
|
-
|
|
9508
|
-
isInitial.current = false;
|
|
9509
|
-
}, [i18n, keyPrefix]);
|
|
9510
|
-
var ret = [t, i18n, ready];
|
|
9511
|
-
ret.t = t;
|
|
9512
|
-
ret.i18n = i18n;
|
|
9513
|
-
ret.ready = ready;
|
|
9514
|
-
if (ready) return ret;
|
|
9515
|
-
if (!ready && !useSuspense) return ret;
|
|
9516
|
-
throw new Promise(function (resolve) {
|
|
9517
|
-
loadNamespaces(i18n, namespaces, function () {
|
|
9518
|
-
resolve();
|
|
9519
|
-
});
|
|
9520
|
-
});
|
|
9521
|
-
}
|
|
9522
|
-
|
|
9523
9152
|
/******************************************************************************
|
|
9524
9153
|
Copyright (c) Microsoft Corporation.
|
|
9525
9154
|
|
|
@@ -19377,243 +19006,6 @@ function withReactContent(ParentSwal) {
|
|
|
19377
19006
|
};
|
|
19378
19007
|
}
|
|
19379
19008
|
|
|
19380
|
-
let e$1={data:""},t$1=t=>"object"==typeof window?((t?t.querySelector("#_goober"):window._goober)||Object.assign((t||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:t||e$1,l=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,a=/\/\*[^]*?\*\/| +/g,n=/\n+/g,o$1=(e,t)=>{let r="",l="",a="";for(let n in e){let c=e[n];"@"==n[0]?"i"==n[1]?r=n+" "+c+";":l+="f"==n[1]?o$1(c,n):n+"{"+o$1(c,"k"==n[1]?"":t)+"}":"object"==typeof c?l+=o$1(c,t?t.replace(/([^,])+/g,e=>n.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)):n):null!=c&&(n=/^--/.test(n)?n:n.replace(/[A-Z]/g,"-$&").toLowerCase(),a+=o$1.p?o$1.p(n,c):n+":"+c+";");}return r+(t&&a?t+"{"+a+"}":a)+l},c={},s=e=>{if("object"==typeof e){let t="";for(let r in e)t+=r+s(e[r]);return t}return e},i$1=(e,t,r,i,p)=>{let u=s(e),d=c[u]||(c[u]=(e=>{let t=0,r=11;for(;t<e.length;)r=101*r+e.charCodeAt(t++)>>>0;return "go"+r})(u));if(!c[d]){let t=u!==e?e:(e=>{let t,r,o=[{}];for(;t=l.exec(e.replace(a,""));)t[4]?o.shift():t[3]?(r=t[3].replace(n," ").trim(),o.unshift(o[0][r]=o[0][r]||{})):o[0][t[1]]=t[2].replace(n," ").trim();return o[0]})(e);c[d]=o$1(p?{["@keyframes "+d]:t}:t,r?"":"."+d);}let f=r&&c.g?c.g:null;return r&&(c.g=c[d]),((e,t,r,l)=>{l?t.data=t.data.replace(l,e):-1===t.data.indexOf(e)&&(t.data=r?e+t.data:t.data+e);})(c[d],t,i,f),d},p=(e,t,r)=>e.reduce((e,l,a)=>{let n=t[a];if(n&&n.call){let e=n(r),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;n=t?"."+t:e&&"object"==typeof e?e.props?"":o$1(e,""):!1===e?"":e;}return e+l+(null==n?"":n)},"");function u(e){let r=this||{},l=e.call?e(r.p):e;return i$1(l.unshift?l.raw?p(l,[].slice.call(arguments,1),r.p):l.reduce((e,t)=>Object.assign(e,t&&t.call?t(r.p):t),{}):l,t$1(r.target),r.g,r.o,r.k)}u.bind({g:1});u.bind({k:1});function m(e,t,r,l){o$1.p=t;}
|
|
19381
|
-
|
|
19382
|
-
function _extends$8() {
|
|
19383
|
-
_extends$8 = Object.assign || function (target) {
|
|
19384
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
19385
|
-
var source = arguments[i];
|
|
19386
|
-
|
|
19387
|
-
for (var key in source) {
|
|
19388
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
19389
|
-
target[key] = source[key];
|
|
19390
|
-
}
|
|
19391
|
-
}
|
|
19392
|
-
}
|
|
19393
|
-
|
|
19394
|
-
return target;
|
|
19395
|
-
};
|
|
19396
|
-
|
|
19397
|
-
return _extends$8.apply(this, arguments);
|
|
19398
|
-
}
|
|
19399
|
-
|
|
19400
|
-
var isFunction$4 = function isFunction(valOrFunction) {
|
|
19401
|
-
return typeof valOrFunction === 'function';
|
|
19402
|
-
};
|
|
19403
|
-
|
|
19404
|
-
var resolveValue = function resolveValue(valOrFunction, arg) {
|
|
19405
|
-
return isFunction$4(valOrFunction) ? valOrFunction(arg) : valOrFunction;
|
|
19406
|
-
};
|
|
19407
|
-
|
|
19408
|
-
var genId$1 = /*#__PURE__*/function () {
|
|
19409
|
-
var count = 0;
|
|
19410
|
-
return function () {
|
|
19411
|
-
return (++count).toString();
|
|
19412
|
-
};
|
|
19413
|
-
}();
|
|
19414
|
-
|
|
19415
|
-
var TOAST_LIMIT = 20;
|
|
19416
|
-
var ActionType;
|
|
19417
|
-
|
|
19418
|
-
(function (ActionType) {
|
|
19419
|
-
ActionType[ActionType["ADD_TOAST"] = 0] = "ADD_TOAST";
|
|
19420
|
-
ActionType[ActionType["UPDATE_TOAST"] = 1] = "UPDATE_TOAST";
|
|
19421
|
-
ActionType[ActionType["UPSERT_TOAST"] = 2] = "UPSERT_TOAST";
|
|
19422
|
-
ActionType[ActionType["DISMISS_TOAST"] = 3] = "DISMISS_TOAST";
|
|
19423
|
-
ActionType[ActionType["REMOVE_TOAST"] = 4] = "REMOVE_TOAST";
|
|
19424
|
-
ActionType[ActionType["START_PAUSE"] = 5] = "START_PAUSE";
|
|
19425
|
-
ActionType[ActionType["END_PAUSE"] = 6] = "END_PAUSE";
|
|
19426
|
-
})(ActionType || (ActionType = {}));
|
|
19427
|
-
|
|
19428
|
-
var toastTimeouts = /*#__PURE__*/new Map();
|
|
19429
|
-
|
|
19430
|
-
var addToRemoveQueue = function addToRemoveQueue(toastId) {
|
|
19431
|
-
if (toastTimeouts.has(toastId)) {
|
|
19432
|
-
return;
|
|
19433
|
-
}
|
|
19434
|
-
|
|
19435
|
-
var timeout = setTimeout(function () {
|
|
19436
|
-
toastTimeouts["delete"](toastId);
|
|
19437
|
-
dispatch({
|
|
19438
|
-
type: ActionType.REMOVE_TOAST,
|
|
19439
|
-
toastId: toastId
|
|
19440
|
-
});
|
|
19441
|
-
}, 1000);
|
|
19442
|
-
toastTimeouts.set(toastId, timeout);
|
|
19443
|
-
};
|
|
19444
|
-
|
|
19445
|
-
var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
19446
|
-
var timeout = toastTimeouts.get(toastId);
|
|
19447
|
-
|
|
19448
|
-
if (timeout) {
|
|
19449
|
-
clearTimeout(timeout);
|
|
19450
|
-
}
|
|
19451
|
-
};
|
|
19452
|
-
|
|
19453
|
-
var reducer = function reducer(state, action) {
|
|
19454
|
-
switch (action.type) {
|
|
19455
|
-
case ActionType.ADD_TOAST:
|
|
19456
|
-
return _extends$8({}, state, {
|
|
19457
|
-
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
19458
|
-
});
|
|
19459
|
-
|
|
19460
|
-
case ActionType.UPDATE_TOAST:
|
|
19461
|
-
// ! Side effects !
|
|
19462
|
-
if (action.toast.id) {
|
|
19463
|
-
clearFromRemoveQueue(action.toast.id);
|
|
19464
|
-
}
|
|
19465
|
-
|
|
19466
|
-
return _extends$8({}, state, {
|
|
19467
|
-
toasts: state.toasts.map(function (t) {
|
|
19468
|
-
return t.id === action.toast.id ? _extends$8({}, t, action.toast) : t;
|
|
19469
|
-
})
|
|
19470
|
-
});
|
|
19471
|
-
|
|
19472
|
-
case ActionType.UPSERT_TOAST:
|
|
19473
|
-
var toast = action.toast;
|
|
19474
|
-
return state.toasts.find(function (t) {
|
|
19475
|
-
return t.id === toast.id;
|
|
19476
|
-
}) ? reducer(state, {
|
|
19477
|
-
type: ActionType.UPDATE_TOAST,
|
|
19478
|
-
toast: toast
|
|
19479
|
-
}) : reducer(state, {
|
|
19480
|
-
type: ActionType.ADD_TOAST,
|
|
19481
|
-
toast: toast
|
|
19482
|
-
});
|
|
19483
|
-
|
|
19484
|
-
case ActionType.DISMISS_TOAST:
|
|
19485
|
-
var toastId = action.toastId; // ! Side effects ! - This could be execrated into a dismissToast() action, but I'll keep it here for simplicity
|
|
19486
|
-
|
|
19487
|
-
if (toastId) {
|
|
19488
|
-
addToRemoveQueue(toastId);
|
|
19489
|
-
} else {
|
|
19490
|
-
state.toasts.forEach(function (toast) {
|
|
19491
|
-
addToRemoveQueue(toast.id);
|
|
19492
|
-
});
|
|
19493
|
-
}
|
|
19494
|
-
|
|
19495
|
-
return _extends$8({}, state, {
|
|
19496
|
-
toasts: state.toasts.map(function (t) {
|
|
19497
|
-
return t.id === toastId || toastId === undefined ? _extends$8({}, t, {
|
|
19498
|
-
visible: false
|
|
19499
|
-
}) : t;
|
|
19500
|
-
})
|
|
19501
|
-
});
|
|
19502
|
-
|
|
19503
|
-
case ActionType.REMOVE_TOAST:
|
|
19504
|
-
if (action.toastId === undefined) {
|
|
19505
|
-
return _extends$8({}, state, {
|
|
19506
|
-
toasts: []
|
|
19507
|
-
});
|
|
19508
|
-
}
|
|
19509
|
-
|
|
19510
|
-
return _extends$8({}, state, {
|
|
19511
|
-
toasts: state.toasts.filter(function (t) {
|
|
19512
|
-
return t.id !== action.toastId;
|
|
19513
|
-
})
|
|
19514
|
-
});
|
|
19515
|
-
|
|
19516
|
-
case ActionType.START_PAUSE:
|
|
19517
|
-
return _extends$8({}, state, {
|
|
19518
|
-
pausedAt: action.time
|
|
19519
|
-
});
|
|
19520
|
-
|
|
19521
|
-
case ActionType.END_PAUSE:
|
|
19522
|
-
var diff = action.time - (state.pausedAt || 0);
|
|
19523
|
-
return _extends$8({}, state, {
|
|
19524
|
-
pausedAt: undefined,
|
|
19525
|
-
toasts: state.toasts.map(function (t) {
|
|
19526
|
-
return _extends$8({}, t, {
|
|
19527
|
-
pauseDuration: t.pauseDuration + diff
|
|
19528
|
-
});
|
|
19529
|
-
})
|
|
19530
|
-
});
|
|
19531
|
-
}
|
|
19532
|
-
};
|
|
19533
|
-
var listeners = [];
|
|
19534
|
-
var memoryState = {
|
|
19535
|
-
toasts: [],
|
|
19536
|
-
pausedAt: undefined
|
|
19537
|
-
};
|
|
19538
|
-
var dispatch = function dispatch(action) {
|
|
19539
|
-
memoryState = reducer(memoryState, action);
|
|
19540
|
-
listeners.forEach(function (listener) {
|
|
19541
|
-
listener(memoryState);
|
|
19542
|
-
});
|
|
19543
|
-
};
|
|
19544
|
-
|
|
19545
|
-
var createToast = function createToast(message, type, opts) {
|
|
19546
|
-
if (type === void 0) {
|
|
19547
|
-
type = 'blank';
|
|
19548
|
-
}
|
|
19549
|
-
|
|
19550
|
-
return _extends$8({
|
|
19551
|
-
createdAt: Date.now(),
|
|
19552
|
-
visible: true,
|
|
19553
|
-
type: type,
|
|
19554
|
-
ariaProps: {
|
|
19555
|
-
role: 'status',
|
|
19556
|
-
'aria-live': 'polite'
|
|
19557
|
-
},
|
|
19558
|
-
message: message,
|
|
19559
|
-
pauseDuration: 0
|
|
19560
|
-
}, opts, {
|
|
19561
|
-
id: (opts == null ? void 0 : opts.id) || genId$1()
|
|
19562
|
-
});
|
|
19563
|
-
};
|
|
19564
|
-
|
|
19565
|
-
var createHandler = function createHandler(type) {
|
|
19566
|
-
return function (message, options) {
|
|
19567
|
-
var toast = createToast(message, type, options);
|
|
19568
|
-
dispatch({
|
|
19569
|
-
type: ActionType.UPSERT_TOAST,
|
|
19570
|
-
toast: toast
|
|
19571
|
-
});
|
|
19572
|
-
return toast.id;
|
|
19573
|
-
};
|
|
19574
|
-
};
|
|
19575
|
-
|
|
19576
|
-
var toast = function toast(message, opts) {
|
|
19577
|
-
return createHandler('blank')(message, opts);
|
|
19578
|
-
};
|
|
19579
|
-
|
|
19580
|
-
toast.error = /*#__PURE__*/createHandler('error');
|
|
19581
|
-
toast.success = /*#__PURE__*/createHandler('success');
|
|
19582
|
-
toast.loading = /*#__PURE__*/createHandler('loading');
|
|
19583
|
-
toast.custom = /*#__PURE__*/createHandler('custom');
|
|
19584
|
-
|
|
19585
|
-
toast.dismiss = function (toastId) {
|
|
19586
|
-
dispatch({
|
|
19587
|
-
type: ActionType.DISMISS_TOAST,
|
|
19588
|
-
toastId: toastId
|
|
19589
|
-
});
|
|
19590
|
-
};
|
|
19591
|
-
|
|
19592
|
-
toast.remove = function (toastId) {
|
|
19593
|
-
return dispatch({
|
|
19594
|
-
type: ActionType.REMOVE_TOAST,
|
|
19595
|
-
toastId: toastId
|
|
19596
|
-
});
|
|
19597
|
-
};
|
|
19598
|
-
|
|
19599
|
-
toast.promise = function (promise, msgs, opts) {
|
|
19600
|
-
var id = toast.loading(msgs.loading, _extends$8({}, opts, opts == null ? void 0 : opts.loading));
|
|
19601
|
-
promise.then(function (p) {
|
|
19602
|
-
toast.success(resolveValue(msgs.success, p), _extends$8({
|
|
19603
|
-
id: id
|
|
19604
|
-
}, opts, opts == null ? void 0 : opts.success));
|
|
19605
|
-
return p;
|
|
19606
|
-
})["catch"](function (e) {
|
|
19607
|
-
toast.error(resolveValue(msgs.error, e), _extends$8({
|
|
19608
|
-
id: id
|
|
19609
|
-
}, opts, opts == null ? void 0 : opts.error));
|
|
19610
|
-
});
|
|
19611
|
-
return promise;
|
|
19612
|
-
};
|
|
19613
|
-
m();
|
|
19614
|
-
|
|
19615
|
-
var toast$1 = toast;
|
|
19616
|
-
|
|
19617
19009
|
const MySwal = withReactContent(Swal);
|
|
19618
19010
|
const messageHtmlBoxConfirm = (t, message, handle, data, title = 'Important', btnOk = 'Ok', btnCancel = 'Cancel') => {
|
|
19619
19011
|
MySwal.fire({
|
|
@@ -19706,10 +19098,10 @@ const messageBoxError = (t, message, title = 'Important', btnCancel = 'Ok') => {
|
|
|
19706
19098
|
});
|
|
19707
19099
|
};
|
|
19708
19100
|
const notificationError = (param) => {
|
|
19709
|
-
return (
|
|
19101
|
+
return (toast__default["default"].error(jsxRuntime.jsxs(React$5.Fragment, { children: [jsxRuntime.jsx("div", { className: "toastify-header", children: jsxRuntime.jsx("div", { className: "title-wrapper", children: jsxRuntime.jsx("h6", { className: "toast-title", children: param }) }) }), jsxRuntime.jsx("div", { className: "toastify-body", children: jsxRuntime.jsx("ul", { className: "list-unstyled mb-0", children: jsxRuntime.jsx("li", {}) }) })] })));
|
|
19710
19102
|
};
|
|
19711
19103
|
const notificationSuccess = (param) => {
|
|
19712
|
-
return (
|
|
19104
|
+
return (toast__default["default"].success(jsxRuntime.jsxs(React$5.Fragment, { children: [jsxRuntime.jsx("div", { className: "toastify-header", children: jsxRuntime.jsx("div", { className: "title-wrapper", children: jsxRuntime.jsx("h6", { className: "toast-title", children: param }) }) }), jsxRuntime.jsx("div", { className: "toastify-body", children: jsxRuntime.jsx("ul", { className: "list-unstyled mb-0", children: jsxRuntime.jsx("li", {}) }) })] })));
|
|
19713
19105
|
};
|
|
19714
19106
|
const messageBoxConfirm2 = async (t, data, data2, message) => {
|
|
19715
19107
|
return new Promise((resolve) => {
|
|
@@ -21909,7 +21301,7 @@ var e=function(i,e,t){if(i&&"reportValidity"in i){var f=get(t,e);i.setCustomVali
|
|
|
21909
21301
|
var o=function(o,n,a){return void 0===n&&(n={}),void 0===a&&(a={}),function(s,i,c){try{return Promise.resolve(function(t$1,r){try{var u=(n.context&&"development"===process.env.NODE_ENV&&console.warn("You should not used the yup options context. Please, use the 'useForm' context object instead"),Promise.resolve(o["sync"===a.mode?"validateSync":"validate"](s,Object.assign({abortEarly:!1},n,{context:i}))).then(function(t$1){return c.shouldUseNativeValidation&&t({},c),{values:a.rawValues?s:t$1,errors:{}}}));}catch(e){return r(e)}return u&&u.then?u.then(void 0,r):u}(0,function(e){if(!e.inner)throw e;return {values:{},errors:f((o=e,n=!c.shouldUseNativeValidation&&"all"===c.criteriaMode,(o.inner||[]).reduce(function(e,t){if(e[t.path]||(e[t.path]={message:t.message,type:t.type}),n){var o=e[t.path].types,a=o&&o[t.type];e[t.path]=appendErrors(t.path,n,e,t.type,a?[].concat(a,t.message):t.message);}return e},{})),c)};var o,n;}))}catch(e){return Promise.reject(e)}}};
|
|
21910
21302
|
|
|
21911
21303
|
const renderLabel = (props) => {
|
|
21912
|
-
const { t } = useTranslation();
|
|
21304
|
+
const { t } = reactI18next.useTranslation();
|
|
21913
21305
|
const { isLabel, name, label, required } = props;
|
|
21914
21306
|
return (jsxRuntime.jsx(React$5.Fragment, { children: isLabel === false ? '' : jsxRuntime.jsxs(Label$1, { for: name, children: [t(label ? label : ''), " ", required ? jsxRuntime.jsx("span", { className: "text-danger", children: "*" }) : '', " "] }) }));
|
|
21915
21307
|
};
|
|
@@ -23228,7 +22620,7 @@ const SelectTable = React$5.forwardRef((props, ref) => {
|
|
|
23228
22620
|
const [searchTerm, setSearchTerm] = React$5.useState('');
|
|
23229
22621
|
const [optionsLoad, setOptionsLoad] = React$5.useState();
|
|
23230
22622
|
const [haveCreateNew, setHaveCreateNew] = React$5.useState(false);
|
|
23231
|
-
const { t } = useTranslation();
|
|
22623
|
+
const { t } = reactI18next.useTranslation();
|
|
23232
22624
|
const isSelectedAll = React$5.useMemo(() => {
|
|
23233
22625
|
return isMulti === true && (optionsLoad ? optionsLoad : options).length > 0 && value?.length >= (optionsLoad ? optionsLoad : options).length;
|
|
23234
22626
|
}, [optionsLoad, options, value]);
|
|
@@ -23618,7 +23010,7 @@ const SelectTableBox = (props) => {
|
|
|
23618
23010
|
}
|
|
23619
23011
|
};
|
|
23620
23012
|
const renderLabel = (props) => {
|
|
23621
|
-
const { t } = useTranslation();
|
|
23013
|
+
const { t } = reactI18next.useTranslation();
|
|
23622
23014
|
const { isLabel, desciptionLabel, id, classLabel, name, label, required } = props;
|
|
23623
23015
|
return (jsxRuntime.jsxs(React$5.Fragment, { children: [isLabel === false ? '' : jsxRuntime.jsxs(Label$1, { id: `label-${id}`, className: classLabel, for: name, children: [t(label ? label : ''), " ", required ? jsxRuntime.jsx("span", { className: "text-danger", children: "*" }) : ''] }), (!isNullOrUndefined$1(desciptionLabel) && desciptionLabel !== '') ?? jsxRuntime.jsx(jsxRuntime.Fragment, { children: jsxRuntime.jsx(UncontrolledTooltip, { target: `label-${id}`, children: t(desciptionLabel ?? '') }) })] }));
|
|
23624
23016
|
};
|
|
@@ -23661,7 +23053,7 @@ const EditForm = React$5.forwardRef((props, ref) => {
|
|
|
23661
23053
|
const buttonRef = React$5.useRef(null);
|
|
23662
23054
|
const [dropdownOpen, setDropdownOpen] = React$5.useState(false);
|
|
23663
23055
|
const [itemsField, setItemsField] = React$5.useState([]);
|
|
23664
|
-
const { t } = useTranslation();
|
|
23056
|
+
const { t } = reactI18next.useTranslation();
|
|
23665
23057
|
useOnClickOutside(editFormRef, () => {
|
|
23666
23058
|
closeMenu();
|
|
23667
23059
|
});
|
|
@@ -23846,7 +23238,7 @@ const EditForm = React$5.forwardRef((props, ref) => {
|
|
|
23846
23238
|
const ModalHeader = (props) => {
|
|
23847
23239
|
// ** Props
|
|
23848
23240
|
const { title, handleModal, typeModal = 'Edit', component } = props;
|
|
23849
|
-
const { t } = useTranslation();
|
|
23241
|
+
const { t } = reactI18next.useTranslation();
|
|
23850
23242
|
const handleModalIcon = () => {
|
|
23851
23243
|
if (typeModal === 'Edit' || typeModal === 'Approval') {
|
|
23852
23244
|
return jsxRuntime.jsx(SvgEdit, { fontSize: 17, className: 'me-1' });
|
|
@@ -23925,7 +23317,7 @@ const Sidebar = (props) => {
|
|
|
23925
23317
|
|
|
23926
23318
|
const SidebarSetColumn = (props) => {
|
|
23927
23319
|
const { column, setColumn, openSidebar, handleSidebar } = props;
|
|
23928
|
-
const { t } = useTranslation();
|
|
23320
|
+
const { t } = reactI18next.useTranslation();
|
|
23929
23321
|
const [dataSource, setDataSource] = React$5.useState([]);
|
|
23930
23322
|
const [indexFocus, setIndexFocus] = React$5.useState();
|
|
23931
23323
|
React$5.useEffect(() => {
|
|
@@ -24070,7 +23462,7 @@ const SidebarSetColumn = (props) => {
|
|
|
24070
23462
|
};
|
|
24071
23463
|
|
|
24072
23464
|
const PagingComponent = ({ totalItem, pageSize, currentPage, onChangePage, pageOptions, onChangePageSize }) => {
|
|
24073
|
-
const { t } = useTranslation();
|
|
23465
|
+
const { t } = reactI18next.useTranslation();
|
|
24074
23466
|
const [countPage, setCountPage] = React$5.useState(0);
|
|
24075
23467
|
const [currentPageNumber, setCurrentPageNumber] = React$5.useState(1);
|
|
24076
23468
|
React$5.useEffect(() => {
|
|
@@ -25568,11 +24960,11 @@ var React$3 = _interopRequireWildcard$1(React__default["default"]);
|
|
|
25568
24960
|
var _reactDraggable = cjs.exports;
|
|
25569
24961
|
var _utils = utils;
|
|
25570
24962
|
var _propTypes$1 = propTypes;
|
|
25571
|
-
var _excluded$
|
|
24963
|
+
var _excluded$1 = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
|
|
25572
24964
|
function _getRequireWildcardCache$1(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache$1 = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25573
24965
|
function _interopRequireWildcard$1(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache$1(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25574
|
-
function _extends$
|
|
25575
|
-
function _objectWithoutPropertiesLoose$
|
|
24966
|
+
function _extends$4() { _extends$4 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$4.apply(this, arguments); }
|
|
24967
|
+
function _objectWithoutPropertiesLoose$3(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25576
24968
|
function ownKeys$1(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25577
24969
|
function _objectSpread$1(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys$1(Object(source), !0).forEach(function (key) { _defineProperty$1(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys$1(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25578
24970
|
function _defineProperty$1(obj, key, value) { key = _toPropertyKey$1(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
@@ -25781,7 +25173,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
25781
25173
|
_this$props2.onResizeStart;
|
|
25782
25174
|
var resizeHandles = _this$props2.resizeHandles;
|
|
25783
25175
|
_this$props2.transformScale;
|
|
25784
|
-
var p = _objectWithoutPropertiesLoose$
|
|
25176
|
+
var p = _objectWithoutPropertiesLoose$3(_this$props2, _excluded$1);
|
|
25785
25177
|
|
|
25786
25178
|
// What we're doing here is getting the child of this element, and cloning it with this element's props.
|
|
25787
25179
|
// We are then defining its children as:
|
|
@@ -25793,7 +25185,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
25793
25185
|
var _this3$handleRefs$han;
|
|
25794
25186
|
// Create a ref to the handle so that `<DraggableCore>` doesn't have to use ReactDOM.findDOMNode().
|
|
25795
25187
|
var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /*#__PURE__*/React$3.createRef();
|
|
25796
|
-
return /*#__PURE__*/React$3.createElement(_reactDraggable.DraggableCore, _extends$
|
|
25188
|
+
return /*#__PURE__*/React$3.createElement(_reactDraggable.DraggableCore, _extends$4({}, draggableOpts, {
|
|
25797
25189
|
nodeRef: ref,
|
|
25798
25190
|
key: "resizableHandle-" + handleAxis,
|
|
25799
25191
|
onStop: _this3.resizeHandler('onResizeStop', handleAxis),
|
|
@@ -25825,17 +25217,17 @@ var React$2 = _interopRequireWildcard(React__default["default"]);
|
|
|
25825
25217
|
var _propTypes = _interopRequireDefault$1(propTypes$1.exports);
|
|
25826
25218
|
var _Resizable = _interopRequireDefault$1(Resizable$2);
|
|
25827
25219
|
var _propTypes2 = propTypes;
|
|
25828
|
-
var _excluded
|
|
25220
|
+
var _excluded = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
|
|
25829
25221
|
function _interopRequireDefault$1(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25830
25222
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
25831
25223
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
25832
|
-
function _extends$
|
|
25224
|
+
function _extends$3() { _extends$3 = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends$3.apply(this, arguments); }
|
|
25833
25225
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
25834
25226
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25835
25227
|
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25836
25228
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
25837
25229
|
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
25838
|
-
function _objectWithoutPropertiesLoose$
|
|
25230
|
+
function _objectWithoutPropertiesLoose$2(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
25839
25231
|
function _inheritsLoose$2(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
25840
25232
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
25841
25233
|
var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
@@ -25898,7 +25290,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
25898
25290
|
var resizeHandles = _this$props.resizeHandles,
|
|
25899
25291
|
style = _this$props.style,
|
|
25900
25292
|
transformScale = _this$props.transformScale,
|
|
25901
|
-
props = _objectWithoutPropertiesLoose$
|
|
25293
|
+
props = _objectWithoutPropertiesLoose$2(_this$props, _excluded);
|
|
25902
25294
|
return /*#__PURE__*/React$2.createElement(_Resizable.default, {
|
|
25903
25295
|
axis: axis,
|
|
25904
25296
|
draggableOpts: draggableOpts,
|
|
@@ -25914,7 +25306,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
25914
25306
|
resizeHandles: resizeHandles,
|
|
25915
25307
|
transformScale: transformScale,
|
|
25916
25308
|
width: this.state.width
|
|
25917
|
-
}, /*#__PURE__*/React$2.createElement("div", _extends$
|
|
25309
|
+
}, /*#__PURE__*/React$2.createElement("div", _extends$3({}, props, {
|
|
25918
25310
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
25919
25311
|
width: this.state.width + 'px',
|
|
25920
25312
|
height: this.state.height + 'px'
|
|
@@ -25968,7 +25360,7 @@ styleInject(css_248z$1);
|
|
|
25968
25360
|
|
|
25969
25361
|
const HeaderTableCol = (props) => {
|
|
25970
25362
|
const { selectEnable, dataSource, setSelectedRows, col, indexCol, indexParent, objWidthFix, totalCount, selectedRows, column, setColumn, isMulti } = props;
|
|
25971
|
-
const { t } = useTranslation();
|
|
25363
|
+
const { t } = reactI18next.useTranslation();
|
|
25972
25364
|
const handleResize = (e, { size }) => {
|
|
25973
25365
|
// Update the column width here
|
|
25974
25366
|
// You might need to update the state or call a callback to update the width
|
|
@@ -26011,7 +25403,7 @@ const IconCustom = (props) => {
|
|
|
26011
25403
|
|
|
26012
25404
|
const CommandElement = (props) => {
|
|
26013
25405
|
const { commandItems, rowData, indexRow, handleCommandClick, indexFocus, setIndexFocus } = props;
|
|
26014
|
-
const { t } = useTranslation();
|
|
25406
|
+
const { t } = reactI18next.useTranslation();
|
|
26015
25407
|
return (jsxRuntime.jsx(React$5.Fragment, { children: jsxRuntime.jsx("div", { className: 'd-flex align-items-center', style: { columnGap: 10 }, children: commandItems.map((item, index) => {
|
|
26016
25408
|
return (jsxRuntime.jsxs(Button$1, { id: `command-item-${indexRow}-${index}`, tabIndex: -1, style: { padding: '5px', minWidth: 45, height: '100%' }, className: classnames('command-item', {
|
|
26017
25409
|
'btn-icon': item.tooltip === ''
|
|
@@ -26034,7 +25426,7 @@ const SelectTableTree = React$5.forwardRef((props, ref) => {
|
|
|
26034
25426
|
const [dropdownOpen, setDropdownOpen] = React$5.useState(false);
|
|
26035
25427
|
const [isFocus, setIsFocus] = React$5.useState(false);
|
|
26036
25428
|
const [searchTerm, setSearchTerm] = React$5.useState('');
|
|
26037
|
-
const { t } = useTranslation();
|
|
25429
|
+
const { t } = reactI18next.useTranslation();
|
|
26038
25430
|
// Hàm đệ quy để kiểm tra xem tất cả các mục trong cây có được chọn hay không
|
|
26039
25431
|
const areAllItemsSelected = (value, options, fieldValue) => {
|
|
26040
25432
|
const checkAllSelected = (nodes) => {
|
|
@@ -41514,7 +40906,7 @@ var PRESELECT_CHANGE_VIA_NAVIGATE = "navigate";
|
|
|
41514
40906
|
|
|
41515
40907
|
var reactInputMask = {exports: {}};
|
|
41516
40908
|
|
|
41517
|
-
function _interopDefault$2(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}var React$1=_interopDefault$2(React__default["default"]),reactDom$1=ReactDOM__default["default"];function _defaults2$1(e,t){for(var n=Object.getOwnPropertyNames(t),a=0;a<n.length;a++){var i=n[a],r=Object.getOwnPropertyDescriptor(t,i);r&&r.configurable&&e[i]===undefined&&Object.defineProperty(e,i,r);}return e}function _extends$5(){return (_extends$5=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);}return e}).apply(this,arguments)}function _inheritsLoose$1(e,t){e.prototype=Object.create(t.prototype),_defaults2$1(e.prototype.constructor=e,t);}function _objectWithoutPropertiesLoose$2(e,t){if(null==e)return {};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var invariant$3=function(e,t,n,a,i,r,o,s){if(!e){var l;if(t===undefined)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else {var u=[n,a,i,r,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation";}throw l.framesToPop=1,l}},invariant_1$1=invariant$3;function setInputSelection$1(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else {var a=e.createTextRange();a.collapse(!0),a.moveStart("character",t),a.moveEnd("character",n-t),a.select();}}function getInputSelection$1(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else {var a=document.selection.createRange();a.parentElement()===e&&(t=-a.moveStart("character",-e.value.length),n=-a.moveEnd("character",-e.value.length));}return {start:t,end:n,length:n-t}}var defaultFormatChars$1={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},defaultMaskChar$1="_";function parseMask$1(e,t,n){var a="",i="",r=null,o=[];if(t===undefined&&(t=defaultMaskChar$1),null==n&&(n=defaultFormatChars$1),!e||"string"!=typeof e)return {maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var s=!1;return e.split("").forEach(function(e){s=!s&&"\\"===e||(s||!n[e]?(o.push(a.length),a.length===o.length-1&&(i+=e)):r=a.length+1,a+=e,!1);}),{maskChar:t,formatChars:n,prefix:i,mask:a,lastEditablePosition:r,permanents:o}}function isPermanentCharacter$1(e,t){return -1!==e.permanents.indexOf(t)}function isAllowedCharacter$1(e,t,n){var a=e.mask,i=e.formatChars;if(!n)return !1;if(isPermanentCharacter$1(e,t))return a[t]===n;var r=i[a[t]];return new RegExp(r).test(n)}function isEmpty$1(n,e){return e.split("").every(function(e,t){return isPermanentCharacter$1(n,t)||!isAllowedCharacter$1(n,t,e)})}function getFilledLength$1(e,t){var n=e.maskChar,a=e.prefix;if(!n){for(;t.length>a.length&&isPermanentCharacter$1(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var i=a.length,r=t.length;r>=a.length;r--){var o=t[r];if(!isPermanentCharacter$1(e,r)&&isAllowedCharacter$1(e,r,o)){i=r+1;break}}return i}function isFilled$1(e,t){return getFilledLength$1(e,t)===e.mask.length}function formatValue$1(e,t){var n=e.maskChar,a=e.mask,i=e.prefix;if(!n){for((t=insertString$1(e,"",t,0)).length<i.length&&(t=i);t.length<a.length&&isPermanentCharacter$1(e,t.length);)t+=a[t.length];return t}if(t)return insertString$1(e,formatValue$1(e,""),t,0);for(var r=0;r<a.length;r++)isPermanentCharacter$1(e,r)?t+=a[r]:t+=n;return t}function clearRange$1(n,e,a,t){var i=a+t,r=n.maskChar,o=n.mask,s=n.prefix,l=e.split("");if(r)return l.map(function(e,t){return t<a||i<=t?e:isPermanentCharacter$1(n,t)?o[t]:r}).join("");for(var u=i;u<l.length;u++)isPermanentCharacter$1(n,u)&&(l[u]="");return a=Math.max(s.length,a),l.splice(a,i-a),e=l.join(""),formatValue$1(n,e)}function insertString$1(r,o,e,s){var l=r.mask,u=r.maskChar,c=r.prefix,t=e.split(""),h=isFilled$1(r,o);return !u&&s>o.length&&(o+=l.slice(o.length,s)),t.every(function(e){for(;i=e,isPermanentCharacter$1(r,a=s)&&i!==l[a];){if(s>=o.length&&(o+=l[s]),t=e,n=s,u&&isPermanentCharacter$1(r,n)&&t===u)return !0;if(++s>=l.length)return !1}var t,n,a,i;return !isAllowedCharacter$1(r,s,e)&&e!==u||(s<o.length?o=u||h||s<c.length?o.slice(0,s)+e+o.slice(s+1):(o=o.slice(0,s)+e+o.slice(s),formatValue$1(r,o)):u||(o+=e),++s<l.length)}),o}function getInsertStringLength$1(a,e,t,i){var r=a.mask,o=a.maskChar,n=t.split(""),s=i;return n.every(function(e){for(;n=e,isPermanentCharacter$1(a,t=i)&&n!==r[t];)if(++i>=r.length)return !1;var t,n;return (isAllowedCharacter$1(a,i,e)||e===o)&&i++,i<r.length}),i-s}function getLeftEditablePosition$1(e,t){for(var n=t;0<=n;--n)if(!isPermanentCharacter$1(e,n))return n;return null}function getRightEditablePosition$1(e,t){for(var n=e.mask,a=t;a<n.length;++a)if(!isPermanentCharacter$1(e,a))return a;return null}function getStringValue$1(e){return e||0===e?e+"":""}function processChange$1(e,t,n,a,i){var r=e.mask,o=e.prefix,s=e.lastEditablePosition,l=t,u="",c=0,h=0,f=Math.min(i.start,n.start);if(n.end>i.start?h=(c=getInsertStringLength$1(e,a,u=l.slice(i.start,n.end),f))?i.length:0:l.length<a.length&&(h=a.length-l.length),l=a,h){if(1===h&&!i.length)f=i.start===n.start?getRightEditablePosition$1(e,n.start):getLeftEditablePosition$1(e,n.start);l=clearRange$1(e,l,f,h);}return l=insertString$1(e,l,u,f),(f+=c)>=r.length?f=r.length:f<o.length&&!c?f=o.length:f>=o.length&&f<s&&c&&(f=getRightEditablePosition$1(e,f)),u||(u=null),{value:l=formatValue$1(e,l),enteredString:u,selection:{start:f,end:f}}}function isWindowsPhoneBrowser$1(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}function isFunction$1(e){return "function"==typeof e}function getRequestAnimationFrame$1(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function getCancelAnimationFrame$1(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function defer$1(e){return (!!getCancelAnimationFrame$1()?getRequestAnimationFrame$1():function(){return setTimeout(e,1e3/60)})(e)}function cancelDefer$1(e){(getCancelAnimationFrame$1()||clearTimeout)(e);}var InputElement$1=function(c){function e(e){var f=c.call(this,e)||this;f.focused=!1,f.mounted=!1,f.previousSelection=null,f.selectionDeferId=null,f.saveSelectionLoopDeferId=null,f.saveSelectionLoop=function(){f.previousSelection=f.getSelection(),f.saveSelectionLoopDeferId=defer$1(f.saveSelectionLoop);},f.runSaveSelectionLoop=function(){null===f.saveSelectionLoopDeferId&&f.saveSelectionLoop();},f.stopSaveSelectionLoop=function(){null!==f.saveSelectionLoopDeferId&&(cancelDefer$1(f.saveSelectionLoopDeferId),f.saveSelectionLoopDeferId=null,f.previousSelection=null);},f.getInputDOMNode=function(){if(!f.mounted)return null;var e=reactDom$1.findDOMNode(_assertThisInitialized$1(_assertThisInitialized$1(f))),t="undefined"!=typeof window&&e instanceof window.Element;if(e&&!t)return null;if("INPUT"!==e.nodeName&&(e=e.querySelector("input")),!e)throw new Error("react-input-mask: inputComponent doesn't contain input node");return e},f.getInputValue=function(){var e=f.getInputDOMNode();return e?e.value:null},f.setInputValue=function(e){var t=f.getInputDOMNode();t&&(f.value=e,t.value=e);},f.setCursorToEnd=function(){var e=getFilledLength$1(f.maskOptions,f.value),t=getRightEditablePosition$1(f.maskOptions,e);null!==t&&f.setCursorPosition(t);},f.setSelection=function(e,t,n){void 0===n&&(n={});var a=f.getInputDOMNode(),i=f.isFocused();a&&i&&(n.deferred||setInputSelection$1(a,e,t),null!==f.selectionDeferId&&cancelDefer$1(f.selectionDeferId),f.selectionDeferId=defer$1(function(){f.selectionDeferId=null,setInputSelection$1(a,e,t);}),f.previousSelection={start:e,end:t,length:Math.abs(t-e)});},f.getSelection=function(){return getInputSelection$1(f.getInputDOMNode())},f.getCursorPosition=function(){return f.getSelection().start},f.setCursorPosition=function(e){f.setSelection(e,e);},f.isFocused=function(){return f.focused},f.getBeforeMaskedValueChangeConfig=function(){var e=f.maskOptions,t=e.mask,n=e.maskChar,a=e.permanents,i=e.formatChars;return {mask:t,maskChar:n,permanents:a,alwaysShowMask:!!f.props.alwaysShowMask,formatChars:i}},f.isInputAutofilled=function(e,t,n,a){var i=f.getInputDOMNode();try{if(i.matches(":-webkit-autofill"))return !0}catch(r){}return !f.focused||a.end<n.length&&t.end===e.length},f.onChange=function(e){var t=_assertThisInitialized$1(_assertThisInitialized$1(f)).beforePasteState,n=_assertThisInitialized$1(_assertThisInitialized$1(f)).previousSelection,a=f.props.beforeMaskedValueChange,i=f.getInputValue(),r=f.value,o=f.getSelection();f.isInputAutofilled(i,o,r,n)&&(r=formatValue$1(f.maskOptions,""),n={start:0,end:0,length:0}),t&&(n=t.selection,r=t.value,o={start:n.start+i.length,end:n.start+i.length,length:0},i=r.slice(0,n.start)+i+r.slice(n.end),f.beforePasteState=null);var s=processChange$1(f.maskOptions,i,o,r,n),l=s.enteredString,u=s.selection,c=s.value;if(isFunction$1(a)){var h=a({value:c,selection:u},{value:r,selection:n},l,f.getBeforeMaskedValueChangeConfig());c=h.value,u=h.selection;}f.setInputValue(c),isFunction$1(f.props.onChange)&&f.props.onChange(e),f.isWindowsPhoneBrowser?f.setSelection(u.start,u.end,{deferred:!0}):f.setSelection(u.start,u.end);},f.onFocus=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions,a=n.mask,i=n.prefix;if(f.focused=!0,f.mounted=!0,a){if(f.value)getFilledLength$1(f.maskOptions,f.value)<f.maskOptions.mask.length&&f.setCursorToEnd();else {var r=formatValue$1(f.maskOptions,i),o=formatValue$1(f.maskOptions,r),s=getFilledLength$1(f.maskOptions,o),l=getRightEditablePosition$1(f.maskOptions,s),u={start:l,end:l};if(isFunction$1(t)){var c=t({value:o,selection:u},{value:f.value,selection:null},null,f.getBeforeMaskedValueChangeConfig());o=c.value,u=c.selection;}var h=o!==f.getInputValue();h&&f.setInputValue(o),h&&isFunction$1(f.props.onChange)&&f.props.onChange(e),f.setSelection(u.start,u.end);}f.runSaveSelectionLoop();}isFunction$1(f.props.onFocus)&&f.props.onFocus(e);},f.onBlur=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions.mask;if(f.stopSaveSelectionLoop(),f.focused=!1,n&&!f.props.alwaysShowMask&&isEmpty$1(f.maskOptions,f.value)){var a="";if(isFunction$1(t))a=t({value:a,selection:null},{value:f.value,selection:f.previousSelection},null,f.getBeforeMaskedValueChangeConfig()).value;var i=a!==f.getInputValue();i&&f.setInputValue(a),i&&isFunction$1(f.props.onChange)&&f.props.onChange(e);}isFunction$1(f.props.onBlur)&&f.props.onBlur(e);},f.onMouseDown=function(e){if(!f.focused&&document.addEventListener){f.mouseDownX=e.clientX,f.mouseDownY=e.clientY,f.mouseDownTime=(new Date).getTime();var r=function r(e){if(document.removeEventListener("mouseup",r),f.focused){var t=Math.abs(e.clientX-f.mouseDownX),n=Math.abs(e.clientY-f.mouseDownY),a=Math.max(t,n),i=(new Date).getTime()-f.mouseDownTime;(a<=10&&i<=200||a<=5&&i<=300)&&f.setCursorToEnd();}};document.addEventListener("mouseup",r);}isFunction$1(f.props.onMouseDown)&&f.props.onMouseDown(e);},f.onPaste=function(e){isFunction$1(f.props.onPaste)&&f.props.onPaste(e),e.defaultPrevented||(f.beforePasteState={value:f.getInputValue(),selection:f.getSelection()},f.setInputValue(""));},f.handleRef=function(e){null==f.props.children&&isFunction$1(f.props.inputRef)&&f.props.inputRef(e);};var t=e.mask,n=e.maskChar,a=e.formatChars,i=e.alwaysShowMask,r=e.beforeMaskedValueChange,o=e.defaultValue,s=e.value;f.maskOptions=parseMask$1(t,n,a),null==o&&(o=""),null==s&&(s=o);var l=getStringValue$1(s);if(f.maskOptions.mask&&(i||l)&&(l=formatValue$1(f.maskOptions,l),isFunction$1(r))){var u=e.value;null==e.value&&(u=o),l=r({value:l,selection:null},{value:u=getStringValue$1(u),selection:null},null,f.getBeforeMaskedValueChangeConfig()).value;}return f.value=l,f}_inheritsLoose$1(e,c);var t=e.prototype;return t.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=isWindowsPhoneBrowser$1(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value));},t.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,n=t.beforeMaskedValueChange,a=t.alwaysShowMask,i=t.mask,r=t.maskChar,o=t.formatChars,s=this.maskOptions,l=a||this.isFocused(),u=null!=this.props.value,c=u?getStringValue$1(this.props.value):this.value,h=e?e.start:null;if(this.maskOptions=parseMask$1(i,r,o),this.maskOptions.mask){!s.mask&&this.isFocused()&&this.runSaveSelectionLoop();var f=this.maskOptions.mask&&this.maskOptions.mask!==s.mask;if(s.mask||u||(c=this.getInputValue()),(f||this.maskOptions.mask&&(c||l))&&(c=formatValue$1(this.maskOptions,c)),f){var p=getFilledLength$1(this.maskOptions,c);(null===h||p<h)&&(h=isFilled$1(this.maskOptions,c)?p:getRightEditablePosition$1(this.maskOptions,p));}!this.maskOptions.mask||!isEmpty$1(this.maskOptions,c)||l||u&&this.props.value||(c="");var d={start:h,end:h};if(isFunction$1(n)){var m=n({value:c,selection:d},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());c=m.value,d=m.selection;}this.value=c;var g=this.getInputValue()!==this.value;g?(this.setInputValue(this.value),this.forceUpdate()):f&&this.forceUpdate();var v=!1;null!=d.start&&null!=d.end&&(v=!e||e.start!==d.start||e.end!==d.end),(v||g)&&this.setSelection(d.start,d.end);}else s.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate());},t.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&cancelDefer$1(this.selectionDeferId),this.stopSaveSelectionLoop();},t.render=function(){var t,e=this.props,n=(e.mask,e.alwaysShowMask,e.maskChar,e.formatChars,e.inputRef,e.beforeMaskedValueChange,e.children),a=_objectWithoutPropertiesLoose$2(e,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){isFunction$1(n)||invariant_1$1(!1);var i=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],r=_extends$5({},a);i.forEach(function(e){return delete r[e]}),t=n(r),i.filter(function(e){return null!=t.props[e]&&t.props[e]!==a[e]}).length&&invariant_1$1(!1);}else t=React$1.createElement("input",_extends$5({ref:this.handleRef},a));var o={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(a.disabled||a.readOnly||(o.onChange=this.onChange,o.onPaste=this.onPaste,o.onMouseDown=this.onMouseDown),null!=a.value&&(o.value=this.value)),t=React$1.cloneElement(t,o)},e}(React$1.Component);var reactInputMask_production_min=InputElement$1;
|
|
40909
|
+
function _interopDefault$2(e){return e&&"object"==typeof e&&"default"in e?e["default"]:e}var React$1=_interopDefault$2(React__default["default"]),reactDom$1=ReactDOM__default["default"];function _defaults2$1(e,t){for(var n=Object.getOwnPropertyNames(t),a=0;a<n.length;a++){var i=n[a],r=Object.getOwnPropertyDescriptor(t,i);r&&r.configurable&&e[i]===undefined&&Object.defineProperty(e,i,r);}return e}function _extends$2(){return (_extends$2=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a]);}return e}).apply(this,arguments)}function _inheritsLoose$1(e,t){e.prototype=Object.create(t.prototype),_defaults2$1(e.prototype.constructor=e,t);}function _objectWithoutPropertiesLoose$1(e,t){if(null==e)return {};var n,a,i={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],0<=t.indexOf(n)||(i[n]=e[n]);return i}function _assertThisInitialized$1(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var invariant$2=function(e,t,n,a,i,r,o,s){if(!e){var l;if(t===undefined)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else {var u=[n,a,i,r,o,s],c=0;(l=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation";}throw l.framesToPop=1,l}},invariant_1$1=invariant$2;function setInputSelection$1(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else {var a=e.createTextRange();a.collapse(!0),a.moveStart("character",t),a.moveEnd("character",n-t),a.select();}}function getInputSelection$1(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else {var a=document.selection.createRange();a.parentElement()===e&&(t=-a.moveStart("character",-e.value.length),n=-a.moveEnd("character",-e.value.length));}return {start:t,end:n,length:n-t}}var defaultFormatChars$1={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},defaultMaskChar$1="_";function parseMask$1(e,t,n){var a="",i="",r=null,o=[];if(t===undefined&&(t=defaultMaskChar$1),null==n&&(n=defaultFormatChars$1),!e||"string"!=typeof e)return {maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var s=!1;return e.split("").forEach(function(e){s=!s&&"\\"===e||(s||!n[e]?(o.push(a.length),a.length===o.length-1&&(i+=e)):r=a.length+1,a+=e,!1);}),{maskChar:t,formatChars:n,prefix:i,mask:a,lastEditablePosition:r,permanents:o}}function isPermanentCharacter$1(e,t){return -1!==e.permanents.indexOf(t)}function isAllowedCharacter$1(e,t,n){var a=e.mask,i=e.formatChars;if(!n)return !1;if(isPermanentCharacter$1(e,t))return a[t]===n;var r=i[a[t]];return new RegExp(r).test(n)}function isEmpty$1(n,e){return e.split("").every(function(e,t){return isPermanentCharacter$1(n,t)||!isAllowedCharacter$1(n,t,e)})}function getFilledLength$1(e,t){var n=e.maskChar,a=e.prefix;if(!n){for(;t.length>a.length&&isPermanentCharacter$1(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var i=a.length,r=t.length;r>=a.length;r--){var o=t[r];if(!isPermanentCharacter$1(e,r)&&isAllowedCharacter$1(e,r,o)){i=r+1;break}}return i}function isFilled$1(e,t){return getFilledLength$1(e,t)===e.mask.length}function formatValue$1(e,t){var n=e.maskChar,a=e.mask,i=e.prefix;if(!n){for((t=insertString$1(e,"",t,0)).length<i.length&&(t=i);t.length<a.length&&isPermanentCharacter$1(e,t.length);)t+=a[t.length];return t}if(t)return insertString$1(e,formatValue$1(e,""),t,0);for(var r=0;r<a.length;r++)isPermanentCharacter$1(e,r)?t+=a[r]:t+=n;return t}function clearRange$1(n,e,a,t){var i=a+t,r=n.maskChar,o=n.mask,s=n.prefix,l=e.split("");if(r)return l.map(function(e,t){return t<a||i<=t?e:isPermanentCharacter$1(n,t)?o[t]:r}).join("");for(var u=i;u<l.length;u++)isPermanentCharacter$1(n,u)&&(l[u]="");return a=Math.max(s.length,a),l.splice(a,i-a),e=l.join(""),formatValue$1(n,e)}function insertString$1(r,o,e,s){var l=r.mask,u=r.maskChar,c=r.prefix,t=e.split(""),h=isFilled$1(r,o);return !u&&s>o.length&&(o+=l.slice(o.length,s)),t.every(function(e){for(;i=e,isPermanentCharacter$1(r,a=s)&&i!==l[a];){if(s>=o.length&&(o+=l[s]),t=e,n=s,u&&isPermanentCharacter$1(r,n)&&t===u)return !0;if(++s>=l.length)return !1}var t,n,a,i;return !isAllowedCharacter$1(r,s,e)&&e!==u||(s<o.length?o=u||h||s<c.length?o.slice(0,s)+e+o.slice(s+1):(o=o.slice(0,s)+e+o.slice(s),formatValue$1(r,o)):u||(o+=e),++s<l.length)}),o}function getInsertStringLength$1(a,e,t,i){var r=a.mask,o=a.maskChar,n=t.split(""),s=i;return n.every(function(e){for(;n=e,isPermanentCharacter$1(a,t=i)&&n!==r[t];)if(++i>=r.length)return !1;var t,n;return (isAllowedCharacter$1(a,i,e)||e===o)&&i++,i<r.length}),i-s}function getLeftEditablePosition$1(e,t){for(var n=t;0<=n;--n)if(!isPermanentCharacter$1(e,n))return n;return null}function getRightEditablePosition$1(e,t){for(var n=e.mask,a=t;a<n.length;++a)if(!isPermanentCharacter$1(e,a))return a;return null}function getStringValue$1(e){return e||0===e?e+"":""}function processChange$1(e,t,n,a,i){var r=e.mask,o=e.prefix,s=e.lastEditablePosition,l=t,u="",c=0,h=0,f=Math.min(i.start,n.start);if(n.end>i.start?h=(c=getInsertStringLength$1(e,a,u=l.slice(i.start,n.end),f))?i.length:0:l.length<a.length&&(h=a.length-l.length),l=a,h){if(1===h&&!i.length)f=i.start===n.start?getRightEditablePosition$1(e,n.start):getLeftEditablePosition$1(e,n.start);l=clearRange$1(e,l,f,h);}return l=insertString$1(e,l,u,f),(f+=c)>=r.length?f=r.length:f<o.length&&!c?f=o.length:f>=o.length&&f<s&&c&&(f=getRightEditablePosition$1(e,f)),u||(u=null),{value:l=formatValue$1(e,l),enteredString:u,selection:{start:f,end:f}}}function isWindowsPhoneBrowser$1(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}function isFunction$1(e){return "function"==typeof e}function getRequestAnimationFrame$1(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame}function getCancelAnimationFrame$1(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function defer$1(e){return (!!getCancelAnimationFrame$1()?getRequestAnimationFrame$1():function(){return setTimeout(e,1e3/60)})(e)}function cancelDefer$1(e){(getCancelAnimationFrame$1()||clearTimeout)(e);}var InputElement$1=function(c){function e(e){var f=c.call(this,e)||this;f.focused=!1,f.mounted=!1,f.previousSelection=null,f.selectionDeferId=null,f.saveSelectionLoopDeferId=null,f.saveSelectionLoop=function(){f.previousSelection=f.getSelection(),f.saveSelectionLoopDeferId=defer$1(f.saveSelectionLoop);},f.runSaveSelectionLoop=function(){null===f.saveSelectionLoopDeferId&&f.saveSelectionLoop();},f.stopSaveSelectionLoop=function(){null!==f.saveSelectionLoopDeferId&&(cancelDefer$1(f.saveSelectionLoopDeferId),f.saveSelectionLoopDeferId=null,f.previousSelection=null);},f.getInputDOMNode=function(){if(!f.mounted)return null;var e=reactDom$1.findDOMNode(_assertThisInitialized$1(_assertThisInitialized$1(f))),t="undefined"!=typeof window&&e instanceof window.Element;if(e&&!t)return null;if("INPUT"!==e.nodeName&&(e=e.querySelector("input")),!e)throw new Error("react-input-mask: inputComponent doesn't contain input node");return e},f.getInputValue=function(){var e=f.getInputDOMNode();return e?e.value:null},f.setInputValue=function(e){var t=f.getInputDOMNode();t&&(f.value=e,t.value=e);},f.setCursorToEnd=function(){var e=getFilledLength$1(f.maskOptions,f.value),t=getRightEditablePosition$1(f.maskOptions,e);null!==t&&f.setCursorPosition(t);},f.setSelection=function(e,t,n){void 0===n&&(n={});var a=f.getInputDOMNode(),i=f.isFocused();a&&i&&(n.deferred||setInputSelection$1(a,e,t),null!==f.selectionDeferId&&cancelDefer$1(f.selectionDeferId),f.selectionDeferId=defer$1(function(){f.selectionDeferId=null,setInputSelection$1(a,e,t);}),f.previousSelection={start:e,end:t,length:Math.abs(t-e)});},f.getSelection=function(){return getInputSelection$1(f.getInputDOMNode())},f.getCursorPosition=function(){return f.getSelection().start},f.setCursorPosition=function(e){f.setSelection(e,e);},f.isFocused=function(){return f.focused},f.getBeforeMaskedValueChangeConfig=function(){var e=f.maskOptions,t=e.mask,n=e.maskChar,a=e.permanents,i=e.formatChars;return {mask:t,maskChar:n,permanents:a,alwaysShowMask:!!f.props.alwaysShowMask,formatChars:i}},f.isInputAutofilled=function(e,t,n,a){var i=f.getInputDOMNode();try{if(i.matches(":-webkit-autofill"))return !0}catch(r){}return !f.focused||a.end<n.length&&t.end===e.length},f.onChange=function(e){var t=_assertThisInitialized$1(_assertThisInitialized$1(f)).beforePasteState,n=_assertThisInitialized$1(_assertThisInitialized$1(f)).previousSelection,a=f.props.beforeMaskedValueChange,i=f.getInputValue(),r=f.value,o=f.getSelection();f.isInputAutofilled(i,o,r,n)&&(r=formatValue$1(f.maskOptions,""),n={start:0,end:0,length:0}),t&&(n=t.selection,r=t.value,o={start:n.start+i.length,end:n.start+i.length,length:0},i=r.slice(0,n.start)+i+r.slice(n.end),f.beforePasteState=null);var s=processChange$1(f.maskOptions,i,o,r,n),l=s.enteredString,u=s.selection,c=s.value;if(isFunction$1(a)){var h=a({value:c,selection:u},{value:r,selection:n},l,f.getBeforeMaskedValueChangeConfig());c=h.value,u=h.selection;}f.setInputValue(c),isFunction$1(f.props.onChange)&&f.props.onChange(e),f.isWindowsPhoneBrowser?f.setSelection(u.start,u.end,{deferred:!0}):f.setSelection(u.start,u.end);},f.onFocus=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions,a=n.mask,i=n.prefix;if(f.focused=!0,f.mounted=!0,a){if(f.value)getFilledLength$1(f.maskOptions,f.value)<f.maskOptions.mask.length&&f.setCursorToEnd();else {var r=formatValue$1(f.maskOptions,i),o=formatValue$1(f.maskOptions,r),s=getFilledLength$1(f.maskOptions,o),l=getRightEditablePosition$1(f.maskOptions,s),u={start:l,end:l};if(isFunction$1(t)){var c=t({value:o,selection:u},{value:f.value,selection:null},null,f.getBeforeMaskedValueChangeConfig());o=c.value,u=c.selection;}var h=o!==f.getInputValue();h&&f.setInputValue(o),h&&isFunction$1(f.props.onChange)&&f.props.onChange(e),f.setSelection(u.start,u.end);}f.runSaveSelectionLoop();}isFunction$1(f.props.onFocus)&&f.props.onFocus(e);},f.onBlur=function(e){var t=f.props.beforeMaskedValueChange,n=f.maskOptions.mask;if(f.stopSaveSelectionLoop(),f.focused=!1,n&&!f.props.alwaysShowMask&&isEmpty$1(f.maskOptions,f.value)){var a="";if(isFunction$1(t))a=t({value:a,selection:null},{value:f.value,selection:f.previousSelection},null,f.getBeforeMaskedValueChangeConfig()).value;var i=a!==f.getInputValue();i&&f.setInputValue(a),i&&isFunction$1(f.props.onChange)&&f.props.onChange(e);}isFunction$1(f.props.onBlur)&&f.props.onBlur(e);},f.onMouseDown=function(e){if(!f.focused&&document.addEventListener){f.mouseDownX=e.clientX,f.mouseDownY=e.clientY,f.mouseDownTime=(new Date).getTime();var r=function r(e){if(document.removeEventListener("mouseup",r),f.focused){var t=Math.abs(e.clientX-f.mouseDownX),n=Math.abs(e.clientY-f.mouseDownY),a=Math.max(t,n),i=(new Date).getTime()-f.mouseDownTime;(a<=10&&i<=200||a<=5&&i<=300)&&f.setCursorToEnd();}};document.addEventListener("mouseup",r);}isFunction$1(f.props.onMouseDown)&&f.props.onMouseDown(e);},f.onPaste=function(e){isFunction$1(f.props.onPaste)&&f.props.onPaste(e),e.defaultPrevented||(f.beforePasteState={value:f.getInputValue(),selection:f.getSelection()},f.setInputValue(""));},f.handleRef=function(e){null==f.props.children&&isFunction$1(f.props.inputRef)&&f.props.inputRef(e);};var t=e.mask,n=e.maskChar,a=e.formatChars,i=e.alwaysShowMask,r=e.beforeMaskedValueChange,o=e.defaultValue,s=e.value;f.maskOptions=parseMask$1(t,n,a),null==o&&(o=""),null==s&&(s=o);var l=getStringValue$1(s);if(f.maskOptions.mask&&(i||l)&&(l=formatValue$1(f.maskOptions,l),isFunction$1(r))){var u=e.value;null==e.value&&(u=o),l=r({value:l,selection:null},{value:u=getStringValue$1(u),selection:null},null,f.getBeforeMaskedValueChangeConfig()).value;}return f.value=l,f}_inheritsLoose$1(e,c);var t=e.prototype;return t.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=isWindowsPhoneBrowser$1(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value));},t.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,n=t.beforeMaskedValueChange,a=t.alwaysShowMask,i=t.mask,r=t.maskChar,o=t.formatChars,s=this.maskOptions,l=a||this.isFocused(),u=null!=this.props.value,c=u?getStringValue$1(this.props.value):this.value,h=e?e.start:null;if(this.maskOptions=parseMask$1(i,r,o),this.maskOptions.mask){!s.mask&&this.isFocused()&&this.runSaveSelectionLoop();var f=this.maskOptions.mask&&this.maskOptions.mask!==s.mask;if(s.mask||u||(c=this.getInputValue()),(f||this.maskOptions.mask&&(c||l))&&(c=formatValue$1(this.maskOptions,c)),f){var p=getFilledLength$1(this.maskOptions,c);(null===h||p<h)&&(h=isFilled$1(this.maskOptions,c)?p:getRightEditablePosition$1(this.maskOptions,p));}!this.maskOptions.mask||!isEmpty$1(this.maskOptions,c)||l||u&&this.props.value||(c="");var d={start:h,end:h};if(isFunction$1(n)){var m=n({value:c,selection:d},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());c=m.value,d=m.selection;}this.value=c;var g=this.getInputValue()!==this.value;g?(this.setInputValue(this.value),this.forceUpdate()):f&&this.forceUpdate();var v=!1;null!=d.start&&null!=d.end&&(v=!e||e.start!==d.start||e.end!==d.end),(v||g)&&this.setSelection(d.start,d.end);}else s.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate());},t.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&cancelDefer$1(this.selectionDeferId),this.stopSaveSelectionLoop();},t.render=function(){var t,e=this.props,n=(e.mask,e.alwaysShowMask,e.maskChar,e.formatChars,e.inputRef,e.beforeMaskedValueChange,e.children),a=_objectWithoutPropertiesLoose$1(e,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){isFunction$1(n)||invariant_1$1(!1);var i=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],r=_extends$2({},a);i.forEach(function(e){return delete r[e]}),t=n(r),i.filter(function(e){return null!=t.props[e]&&t.props[e]!==a[e]}).length&&invariant_1$1(!1);}else t=React$1.createElement("input",_extends$2({ref:this.handleRef},a));var o={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(a.disabled||a.readOnly||(o.onChange=this.onChange,o.onPaste=this.onPaste,o.onMouseDown=this.onMouseDown),null!=a.value&&(o.value=this.value)),t=React$1.cloneElement(t,o)},e}(React$1.Component);var reactInputMask_production_min=InputElement$1;
|
|
41518
40910
|
|
|
41519
40911
|
/**
|
|
41520
40912
|
* Copyright (c) 2013-present, Facebook, Inc.
|
|
@@ -41536,7 +40928,7 @@ function _interopDefault$2(e){return e&&"object"==typeof e&&"default"in e?e["def
|
|
|
41536
40928
|
|
|
41537
40929
|
var NODE_ENV = process.env.NODE_ENV;
|
|
41538
40930
|
|
|
41539
|
-
var invariant$
|
|
40931
|
+
var invariant$1 = function(condition, format, a, b, c, d, e, f) {
|
|
41540
40932
|
if (NODE_ENV !== 'production') {
|
|
41541
40933
|
if (format === undefined) {
|
|
41542
40934
|
throw new Error('invariant requires an error message argument');
|
|
@@ -41564,19 +40956,19 @@ var invariant$2 = function(condition, format, a, b, c, d, e, f) {
|
|
|
41564
40956
|
}
|
|
41565
40957
|
};
|
|
41566
40958
|
|
|
41567
|
-
var invariant_1 = invariant$
|
|
40959
|
+
var invariant_1 = invariant$1;
|
|
41568
40960
|
|
|
41569
40961
|
function _interopDefault$1 (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
41570
40962
|
|
|
41571
40963
|
var React = _interopDefault$1(React__default["default"]);
|
|
41572
40964
|
var reactDom = ReactDOM__default["default"];
|
|
41573
|
-
var invariant
|
|
41574
|
-
var warning
|
|
40965
|
+
var invariant = _interopDefault$1(invariant_1);
|
|
40966
|
+
var warning = _interopDefault$1(warning_1);
|
|
41575
40967
|
|
|
41576
40968
|
function _defaults2(obj, defaults) { var keys = Object.getOwnPropertyNames(defaults); for (var i = 0; i < keys.length; i++) { var key = keys[i]; var value = Object.getOwnPropertyDescriptor(defaults, key); if (value && value.configurable && obj[key] === undefined) { Object.defineProperty(obj, key, value); } } return obj; }
|
|
41577
40969
|
|
|
41578
|
-
function _extends$
|
|
41579
|
-
_extends$
|
|
40970
|
+
function _extends$1() {
|
|
40971
|
+
_extends$1 = Object.assign || function (target) {
|
|
41580
40972
|
for (var i = 1; i < arguments.length; i++) {
|
|
41581
40973
|
var source = arguments[i];
|
|
41582
40974
|
|
|
@@ -41590,7 +40982,7 @@ function _extends$4() {
|
|
|
41590
40982
|
return target;
|
|
41591
40983
|
};
|
|
41592
40984
|
|
|
41593
|
-
return _extends$
|
|
40985
|
+
return _extends$1.apply(this, arguments);
|
|
41594
40986
|
}
|
|
41595
40987
|
|
|
41596
40988
|
function _inheritsLoose(subClass, superClass) {
|
|
@@ -41600,7 +40992,7 @@ function _inheritsLoose(subClass, superClass) {
|
|
|
41600
40992
|
_defaults2(subClass, superClass);
|
|
41601
40993
|
}
|
|
41602
40994
|
|
|
41603
|
-
function _objectWithoutPropertiesLoose
|
|
40995
|
+
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
41604
40996
|
if (source == null) return {};
|
|
41605
40997
|
var target = {};
|
|
41606
40998
|
var sourceKeys = Object.keys(source);
|
|
@@ -42637,18 +42029,18 @@ function (_React$Component) {
|
|
|
42637
42029
|
inputRef = _this$props2.inputRef;
|
|
42638
42030
|
_this$props2.beforeMaskedValueChange;
|
|
42639
42031
|
var children = _this$props2.children,
|
|
42640
|
-
restProps = _objectWithoutPropertiesLoose
|
|
42032
|
+
restProps = _objectWithoutPropertiesLoose(_this$props2, ["mask", "alwaysShowMask", "maskChar", "formatChars", "inputRef", "beforeMaskedValueChange", "children"]);
|
|
42641
42033
|
|
|
42642
42034
|
var inputElement;
|
|
42643
|
-
process.env.NODE_ENV !== "production" ? warning
|
|
42035
|
+
process.env.NODE_ENV !== "production" ? warning( // parse mask to test against actual mask prop as this.maskOptions
|
|
42644
42036
|
// will be updated later in componentDidUpdate
|
|
42645
42037
|
!restProps.maxLength || !parseMask(mask, maskChar, formatChars).mask, 'react-input-mask: maxLength property shouldn\'t be passed to the masked input. It breaks masking and unnecessary because length is limited by the mask length.') : void 0;
|
|
42646
42038
|
|
|
42647
42039
|
if (children) {
|
|
42648
|
-
!isFunction(children) ? process.env.NODE_ENV !== "production" ? invariant
|
|
42040
|
+
!isFunction(children) ? process.env.NODE_ENV !== "production" ? invariant(false, 'react-input-mask: children must be a function') : invariant(false) : void 0;
|
|
42649
42041
|
var controlledProps = ['onChange', 'onPaste', 'onMouseDown', 'onFocus', 'onBlur', 'value', 'disabled', 'readOnly'];
|
|
42650
42042
|
|
|
42651
|
-
var childrenProps = _extends$
|
|
42043
|
+
var childrenProps = _extends$1({}, restProps);
|
|
42652
42044
|
|
|
42653
42045
|
controlledProps.forEach(function (propId) {
|
|
42654
42046
|
return delete childrenProps[propId];
|
|
@@ -42657,10 +42049,10 @@ function (_React$Component) {
|
|
|
42657
42049
|
var conflictProps = controlledProps.filter(function (propId) {
|
|
42658
42050
|
return inputElement.props[propId] != null && inputElement.props[propId] !== restProps[propId];
|
|
42659
42051
|
});
|
|
42660
|
-
!!conflictProps.length ? process.env.NODE_ENV !== "production" ? invariant
|
|
42661
|
-
process.env.NODE_ENV !== "production" ? warning
|
|
42052
|
+
!!conflictProps.length ? process.env.NODE_ENV !== "production" ? invariant(false, "react-input-mask: the following props should be passed to the react-input-mask's component and should not be altered in children's function: " + conflictProps.join(', ')) : invariant(false) : void 0;
|
|
42053
|
+
process.env.NODE_ENV !== "production" ? warning(!inputRef, 'react-input-mask: inputRef is ignored when children is passed, attach ref to the children instead') : void 0;
|
|
42662
42054
|
} else {
|
|
42663
|
-
inputElement = React.createElement("input", _extends$
|
|
42055
|
+
inputElement = React.createElement("input", _extends$1({
|
|
42664
42056
|
ref: this.handleRef
|
|
42665
42057
|
}, restProps));
|
|
42666
42058
|
}
|
|
@@ -42728,7 +42120,7 @@ const DateInput = (props) => {
|
|
|
42728
42120
|
};
|
|
42729
42121
|
|
|
42730
42122
|
const TableEdit = React$5.forwardRef((props, ref) => {
|
|
42731
|
-
const { t } = useTranslation();
|
|
42123
|
+
const { t } = reactI18next.useTranslation();
|
|
42732
42124
|
const { idTable, dataSource, columns, commandClick, dataSourceChange, rowChange, pagingSetting, setDataSource, height, maxHeight, minHeight, defaultValue, toolbarSetting, searchSetting, setSelectedItem, selectedItem, selectEnable, editDisable, addDisable, buttonSetting, formatSetting, handleSelect, haveSum, isMulti, disableAutoKey, onDuplicate } = props;
|
|
42733
42125
|
React$5.useImperativeHandle(ref, () => {
|
|
42734
42126
|
return {
|
|
@@ -43779,1303 +43171,8 @@ const TableEdit = React$5.forwardRef((props, ref) => {
|
|
|
43779
43171
|
}) }) : jsxRuntime.jsx(jsxRuntime.Fragment, {}) })] }) }), toolbarSetting?.showBottomToolbar ? jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderToolbarBottom() }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})] }), pagingSetting?.allowPaging ? jsxRuntime.jsx(PagingComponent, { onChangePage: onChangePage, pageSize: pagingSetting?.pageSize ?? 0, currentPage: pagingSetting?.currentPage ?? 0, pageOptions: pagingSetting?.pageOptions ?? [20, 30, 50, 100], totalItem: pagingClient ? totalCount : (pagingSetting?.totalItem ?? 0), onChangePageSize: onChangePageSize }) : jsxRuntime.jsx(jsxRuntime.Fragment, {})] }), jsxRuntime.jsx(SidebarSetColumn, { handleSidebar: () => { setOpenPopupSetupColumn(!openPopupSetupColumn); }, openSidebar: openPopupSetupColumn, column: [...contentColumns], setColumn: setContentColumns })] }));
|
|
43780
43172
|
});
|
|
43781
43173
|
|
|
43782
|
-
/**
|
|
43783
|
-
* @remix-run/router v1.23.0
|
|
43784
|
-
*
|
|
43785
|
-
* Copyright (c) Remix Software Inc.
|
|
43786
|
-
*
|
|
43787
|
-
* This source code is licensed under the MIT license found in the
|
|
43788
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
43789
|
-
*
|
|
43790
|
-
* @license MIT
|
|
43791
|
-
*/
|
|
43792
|
-
function _extends$3() {
|
|
43793
|
-
_extends$3 = Object.assign ? Object.assign.bind() : function (target) {
|
|
43794
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
43795
|
-
var source = arguments[i];
|
|
43796
|
-
for (var key in source) {
|
|
43797
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
43798
|
-
target[key] = source[key];
|
|
43799
|
-
}
|
|
43800
|
-
}
|
|
43801
|
-
}
|
|
43802
|
-
return target;
|
|
43803
|
-
};
|
|
43804
|
-
return _extends$3.apply(this, arguments);
|
|
43805
|
-
}
|
|
43806
|
-
|
|
43807
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
43808
|
-
//#region Types and Constants
|
|
43809
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
43810
|
-
/**
|
|
43811
|
-
* Actions represent the type of change to a location value.
|
|
43812
|
-
*/
|
|
43813
|
-
var Action;
|
|
43814
|
-
(function (Action) {
|
|
43815
|
-
/**
|
|
43816
|
-
* A POP indicates a change to an arbitrary index in the history stack, such
|
|
43817
|
-
* as a back or forward navigation. It does not describe the direction of the
|
|
43818
|
-
* navigation, only that the current index changed.
|
|
43819
|
-
*
|
|
43820
|
-
* Note: This is the default action for newly created history objects.
|
|
43821
|
-
*/
|
|
43822
|
-
Action["Pop"] = "POP";
|
|
43823
|
-
/**
|
|
43824
|
-
* A PUSH indicates a new entry being added to the history stack, such as when
|
|
43825
|
-
* a link is clicked and a new page loads. When this happens, all subsequent
|
|
43826
|
-
* entries in the stack are lost.
|
|
43827
|
-
*/
|
|
43828
|
-
Action["Push"] = "PUSH";
|
|
43829
|
-
/**
|
|
43830
|
-
* A REPLACE indicates the entry at the current index in the history stack
|
|
43831
|
-
* being replaced by a new one.
|
|
43832
|
-
*/
|
|
43833
|
-
Action["Replace"] = "REPLACE";
|
|
43834
|
-
})(Action || (Action = {}));
|
|
43835
|
-
function invariant(value, message) {
|
|
43836
|
-
if (value === false || value === null || typeof value === "undefined") {
|
|
43837
|
-
throw new Error(message);
|
|
43838
|
-
}
|
|
43839
|
-
}
|
|
43840
|
-
function warning(cond, message) {
|
|
43841
|
-
if (!cond) {
|
|
43842
|
-
// eslint-disable-next-line no-console
|
|
43843
|
-
if (typeof console !== "undefined") console.warn(message);
|
|
43844
|
-
try {
|
|
43845
|
-
// Welcome to debugging history!
|
|
43846
|
-
//
|
|
43847
|
-
// This error is thrown as a convenience, so you can more easily
|
|
43848
|
-
// find the source for a warning that appears in the console by
|
|
43849
|
-
// enabling "pause on exceptions" in your JavaScript debugger.
|
|
43850
|
-
throw new Error(message);
|
|
43851
|
-
// eslint-disable-next-line no-empty
|
|
43852
|
-
} catch (e) {}
|
|
43853
|
-
}
|
|
43854
|
-
}
|
|
43855
|
-
/**
|
|
43856
|
-
* Creates a string URL path from the given pathname, search, and hash components.
|
|
43857
|
-
*/
|
|
43858
|
-
function createPath(_ref) {
|
|
43859
|
-
let {
|
|
43860
|
-
pathname = "/",
|
|
43861
|
-
search = "",
|
|
43862
|
-
hash = ""
|
|
43863
|
-
} = _ref;
|
|
43864
|
-
if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
|
|
43865
|
-
if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
43866
|
-
return pathname;
|
|
43867
|
-
}
|
|
43868
|
-
/**
|
|
43869
|
-
* Parses a string URL path into its separate pathname, search, and hash components.
|
|
43870
|
-
*/
|
|
43871
|
-
function parsePath(path) {
|
|
43872
|
-
let parsedPath = {};
|
|
43873
|
-
if (path) {
|
|
43874
|
-
let hashIndex = path.indexOf("#");
|
|
43875
|
-
if (hashIndex >= 0) {
|
|
43876
|
-
parsedPath.hash = path.substr(hashIndex);
|
|
43877
|
-
path = path.substr(0, hashIndex);
|
|
43878
|
-
}
|
|
43879
|
-
let searchIndex = path.indexOf("?");
|
|
43880
|
-
if (searchIndex >= 0) {
|
|
43881
|
-
parsedPath.search = path.substr(searchIndex);
|
|
43882
|
-
path = path.substr(0, searchIndex);
|
|
43883
|
-
}
|
|
43884
|
-
if (path) {
|
|
43885
|
-
parsedPath.pathname = path;
|
|
43886
|
-
}
|
|
43887
|
-
}
|
|
43888
|
-
return parsedPath;
|
|
43889
|
-
}
|
|
43890
|
-
//#endregion
|
|
43891
|
-
|
|
43892
|
-
var ResultType;
|
|
43893
|
-
(function (ResultType) {
|
|
43894
|
-
ResultType["data"] = "data";
|
|
43895
|
-
ResultType["deferred"] = "deferred";
|
|
43896
|
-
ResultType["redirect"] = "redirect";
|
|
43897
|
-
ResultType["error"] = "error";
|
|
43898
|
-
})(ResultType || (ResultType = {}));
|
|
43899
|
-
/**
|
|
43900
|
-
* Performs pattern matching on a URL pathname and returns information about
|
|
43901
|
-
* the match.
|
|
43902
|
-
*
|
|
43903
|
-
* @see https://reactrouter.com/v6/utils/match-path
|
|
43904
|
-
*/
|
|
43905
|
-
function matchPath(pattern, pathname) {
|
|
43906
|
-
if (typeof pattern === "string") {
|
|
43907
|
-
pattern = {
|
|
43908
|
-
path: pattern,
|
|
43909
|
-
caseSensitive: false,
|
|
43910
|
-
end: true
|
|
43911
|
-
};
|
|
43912
|
-
}
|
|
43913
|
-
let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
|
|
43914
|
-
let match = pathname.match(matcher);
|
|
43915
|
-
if (!match) return null;
|
|
43916
|
-
let matchedPathname = match[0];
|
|
43917
|
-
let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
|
|
43918
|
-
let captureGroups = match.slice(1);
|
|
43919
|
-
let params = compiledParams.reduce((memo, _ref, index) => {
|
|
43920
|
-
let {
|
|
43921
|
-
paramName,
|
|
43922
|
-
isOptional
|
|
43923
|
-
} = _ref;
|
|
43924
|
-
// We need to compute the pathnameBase here using the raw splat value
|
|
43925
|
-
// instead of using params["*"] later because it will be decoded then
|
|
43926
|
-
if (paramName === "*") {
|
|
43927
|
-
let splatValue = captureGroups[index] || "";
|
|
43928
|
-
pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
|
|
43929
|
-
}
|
|
43930
|
-
const value = captureGroups[index];
|
|
43931
|
-
if (isOptional && !value) {
|
|
43932
|
-
memo[paramName] = undefined;
|
|
43933
|
-
} else {
|
|
43934
|
-
memo[paramName] = (value || "").replace(/%2F/g, "/");
|
|
43935
|
-
}
|
|
43936
|
-
return memo;
|
|
43937
|
-
}, {});
|
|
43938
|
-
return {
|
|
43939
|
-
params,
|
|
43940
|
-
pathname: matchedPathname,
|
|
43941
|
-
pathnameBase,
|
|
43942
|
-
pattern
|
|
43943
|
-
};
|
|
43944
|
-
}
|
|
43945
|
-
function compilePath(path, caseSensitive, end) {
|
|
43946
|
-
if (caseSensitive === void 0) {
|
|
43947
|
-
caseSensitive = false;
|
|
43948
|
-
}
|
|
43949
|
-
if (end === void 0) {
|
|
43950
|
-
end = true;
|
|
43951
|
-
}
|
|
43952
|
-
warning(path === "*" || !path.endsWith("*") || path.endsWith("/*"), "Route path \"" + path + "\" will be treated as if it were " + ("\"" + path.replace(/\*$/, "/*") + "\" because the `*` character must ") + "always follow a `/` in the pattern. To get rid of this warning, " + ("please change the route path to \"" + path.replace(/\*$/, "/*") + "\"."));
|
|
43953
|
-
let params = [];
|
|
43954
|
-
let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
|
|
43955
|
-
.replace(/^\/*/, "/") // Make sure it has a leading /
|
|
43956
|
-
.replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
|
|
43957
|
-
.replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
|
|
43958
|
-
params.push({
|
|
43959
|
-
paramName,
|
|
43960
|
-
isOptional: isOptional != null
|
|
43961
|
-
});
|
|
43962
|
-
return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
|
|
43963
|
-
});
|
|
43964
|
-
if (path.endsWith("*")) {
|
|
43965
|
-
params.push({
|
|
43966
|
-
paramName: "*"
|
|
43967
|
-
});
|
|
43968
|
-
regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
|
|
43969
|
-
: "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
|
|
43970
|
-
} else if (end) {
|
|
43971
|
-
// When matching to the end, ignore trailing slashes
|
|
43972
|
-
regexpSource += "\\/*$";
|
|
43973
|
-
} else if (path !== "" && path !== "/") {
|
|
43974
|
-
// If our path is non-empty and contains anything beyond an initial slash,
|
|
43975
|
-
// then we have _some_ form of path in our regex, so we should expect to
|
|
43976
|
-
// match only if we find the end of this path segment. Look for an optional
|
|
43977
|
-
// non-captured trailing slash (to match a portion of the URL) or the end
|
|
43978
|
-
// of the path (if we've matched to the end). We used to do this with a
|
|
43979
|
-
// word boundary but that gives false positives on routes like
|
|
43980
|
-
// /user-preferences since `-` counts as a word boundary.
|
|
43981
|
-
regexpSource += "(?:(?=\\/|$))";
|
|
43982
|
-
} else ;
|
|
43983
|
-
let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
|
|
43984
|
-
return [matcher, params];
|
|
43985
|
-
}
|
|
43986
|
-
/**
|
|
43987
|
-
* @private
|
|
43988
|
-
*/
|
|
43989
|
-
function stripBasename(pathname, basename) {
|
|
43990
|
-
if (basename === "/") return pathname;
|
|
43991
|
-
if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
|
|
43992
|
-
return null;
|
|
43993
|
-
}
|
|
43994
|
-
// We want to leave trailing slash behavior in the user's control, so if they
|
|
43995
|
-
// specify a basename with a trailing slash, we should support it
|
|
43996
|
-
let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
|
|
43997
|
-
let nextChar = pathname.charAt(startIndex);
|
|
43998
|
-
if (nextChar && nextChar !== "/") {
|
|
43999
|
-
// pathname does not start with basename/
|
|
44000
|
-
return null;
|
|
44001
|
-
}
|
|
44002
|
-
return pathname.slice(startIndex) || "/";
|
|
44003
|
-
}
|
|
44004
|
-
/**
|
|
44005
|
-
* Returns a resolved path object relative to the given pathname.
|
|
44006
|
-
*
|
|
44007
|
-
* @see https://reactrouter.com/v6/utils/resolve-path
|
|
44008
|
-
*/
|
|
44009
|
-
function resolvePath(to, fromPathname) {
|
|
44010
|
-
if (fromPathname === void 0) {
|
|
44011
|
-
fromPathname = "/";
|
|
44012
|
-
}
|
|
44013
|
-
let {
|
|
44014
|
-
pathname: toPathname,
|
|
44015
|
-
search = "",
|
|
44016
|
-
hash = ""
|
|
44017
|
-
} = typeof to === "string" ? parsePath(to) : to;
|
|
44018
|
-
let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
|
|
44019
|
-
return {
|
|
44020
|
-
pathname,
|
|
44021
|
-
search: normalizeSearch(search),
|
|
44022
|
-
hash: normalizeHash(hash)
|
|
44023
|
-
};
|
|
44024
|
-
}
|
|
44025
|
-
function resolvePathname(relativePath, fromPathname) {
|
|
44026
|
-
let segments = fromPathname.replace(/\/+$/, "").split("/");
|
|
44027
|
-
let relativeSegments = relativePath.split("/");
|
|
44028
|
-
relativeSegments.forEach(segment => {
|
|
44029
|
-
if (segment === "..") {
|
|
44030
|
-
// Keep the root "" segment so the pathname starts at /
|
|
44031
|
-
if (segments.length > 1) segments.pop();
|
|
44032
|
-
} else if (segment !== ".") {
|
|
44033
|
-
segments.push(segment);
|
|
44034
|
-
}
|
|
44035
|
-
});
|
|
44036
|
-
return segments.length > 1 ? segments.join("/") : "/";
|
|
44037
|
-
}
|
|
44038
|
-
function getInvalidPathError(char, field, dest, path) {
|
|
44039
|
-
return "Cannot include a '" + char + "' character in a manually specified " + ("`to." + field + "` field [" + JSON.stringify(path) + "]. Please separate it out to the ") + ("`to." + dest + "` field. Alternatively you may provide the full path as ") + "a string in <Link to=\"...\"> and the router will parse it for you.";
|
|
44040
|
-
}
|
|
44041
|
-
/**
|
|
44042
|
-
* @private
|
|
44043
|
-
*
|
|
44044
|
-
* When processing relative navigation we want to ignore ancestor routes that
|
|
44045
|
-
* do not contribute to the path, such that index/pathless layout routes don't
|
|
44046
|
-
* interfere.
|
|
44047
|
-
*
|
|
44048
|
-
* For example, when moving a route element into an index route and/or a
|
|
44049
|
-
* pathless layout route, relative link behavior contained within should stay
|
|
44050
|
-
* the same. Both of the following examples should link back to the root:
|
|
44051
|
-
*
|
|
44052
|
-
* <Route path="/">
|
|
44053
|
-
* <Route path="accounts" element={<Link to=".."}>
|
|
44054
|
-
* </Route>
|
|
44055
|
-
*
|
|
44056
|
-
* <Route path="/">
|
|
44057
|
-
* <Route path="accounts">
|
|
44058
|
-
* <Route element={<AccountsLayout />}> // <-- Does not contribute
|
|
44059
|
-
* <Route index element={<Link to=".."} /> // <-- Does not contribute
|
|
44060
|
-
* </Route
|
|
44061
|
-
* </Route>
|
|
44062
|
-
* </Route>
|
|
44063
|
-
*/
|
|
44064
|
-
function getPathContributingMatches(matches) {
|
|
44065
|
-
return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
|
|
44066
|
-
}
|
|
44067
|
-
// Return the array of pathnames for the current route matches - used to
|
|
44068
|
-
// generate the routePathnames input for resolveTo()
|
|
44069
|
-
function getResolveToMatches(matches, v7_relativeSplatPath) {
|
|
44070
|
-
let pathMatches = getPathContributingMatches(matches);
|
|
44071
|
-
// When v7_relativeSplatPath is enabled, use the full pathname for the leaf
|
|
44072
|
-
// match so we include splat values for "." links. See:
|
|
44073
|
-
// https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
|
|
44074
|
-
if (v7_relativeSplatPath) {
|
|
44075
|
-
return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);
|
|
44076
|
-
}
|
|
44077
|
-
return pathMatches.map(match => match.pathnameBase);
|
|
44078
|
-
}
|
|
44079
|
-
/**
|
|
44080
|
-
* @private
|
|
44081
|
-
*/
|
|
44082
|
-
function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
|
|
44083
|
-
if (isPathRelative === void 0) {
|
|
44084
|
-
isPathRelative = false;
|
|
44085
|
-
}
|
|
44086
|
-
let to;
|
|
44087
|
-
if (typeof toArg === "string") {
|
|
44088
|
-
to = parsePath(toArg);
|
|
44089
|
-
} else {
|
|
44090
|
-
to = _extends$3({}, toArg);
|
|
44091
|
-
invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
|
|
44092
|
-
invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
|
|
44093
|
-
invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
|
|
44094
|
-
}
|
|
44095
|
-
let isEmptyPath = toArg === "" || to.pathname === "";
|
|
44096
|
-
let toPathname = isEmptyPath ? "/" : to.pathname;
|
|
44097
|
-
let from;
|
|
44098
|
-
// Routing is relative to the current pathname if explicitly requested.
|
|
44099
|
-
//
|
|
44100
|
-
// If a pathname is explicitly provided in `to`, it should be relative to the
|
|
44101
|
-
// route context. This is explained in `Note on `<Link to>` values` in our
|
|
44102
|
-
// migration guide from v5 as a means of disambiguation between `to` values
|
|
44103
|
-
// that begin with `/` and those that do not. However, this is problematic for
|
|
44104
|
-
// `to` values that do not provide a pathname. `to` can simply be a search or
|
|
44105
|
-
// hash string, in which case we should assume that the navigation is relative
|
|
44106
|
-
// to the current location's pathname and *not* the route pathname.
|
|
44107
|
-
if (toPathname == null) {
|
|
44108
|
-
from = locationPathname;
|
|
44109
|
-
} else {
|
|
44110
|
-
let routePathnameIndex = routePathnames.length - 1;
|
|
44111
|
-
// With relative="route" (the default), each leading .. segment means
|
|
44112
|
-
// "go up one route" instead of "go up one URL segment". This is a key
|
|
44113
|
-
// difference from how <a href> works and a major reason we call this a
|
|
44114
|
-
// "to" value instead of a "href".
|
|
44115
|
-
if (!isPathRelative && toPathname.startsWith("..")) {
|
|
44116
|
-
let toSegments = toPathname.split("/");
|
|
44117
|
-
while (toSegments[0] === "..") {
|
|
44118
|
-
toSegments.shift();
|
|
44119
|
-
routePathnameIndex -= 1;
|
|
44120
|
-
}
|
|
44121
|
-
to.pathname = toSegments.join("/");
|
|
44122
|
-
}
|
|
44123
|
-
from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
|
|
44124
|
-
}
|
|
44125
|
-
let path = resolvePath(to, from);
|
|
44126
|
-
// Ensure the pathname has a trailing slash if the original "to" had one
|
|
44127
|
-
let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
|
|
44128
|
-
// Or if this was a link to the current path which has a trailing slash
|
|
44129
|
-
let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
|
|
44130
|
-
if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
|
|
44131
|
-
path.pathname += "/";
|
|
44132
|
-
}
|
|
44133
|
-
return path;
|
|
44134
|
-
}
|
|
44135
|
-
/**
|
|
44136
|
-
* @private
|
|
44137
|
-
*/
|
|
44138
|
-
const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
|
|
44139
|
-
/**
|
|
44140
|
-
* @private
|
|
44141
|
-
*/
|
|
44142
|
-
const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
44143
|
-
/**
|
|
44144
|
-
* @private
|
|
44145
|
-
*/
|
|
44146
|
-
const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
44147
|
-
|
|
44148
|
-
const validMutationMethodsArr = ["post", "put", "patch", "delete"];
|
|
44149
|
-
["get", ...validMutationMethodsArr];
|
|
44150
|
-
|
|
44151
|
-
/**
|
|
44152
|
-
* React Router v6.30.0
|
|
44153
|
-
*
|
|
44154
|
-
* Copyright (c) Remix Software Inc.
|
|
44155
|
-
*
|
|
44156
|
-
* This source code is licensed under the MIT license found in the
|
|
44157
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
44158
|
-
*
|
|
44159
|
-
* @license MIT
|
|
44160
|
-
*/
|
|
44161
|
-
|
|
44162
|
-
function _extends$2() {
|
|
44163
|
-
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
44164
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
44165
|
-
var source = arguments[i];
|
|
44166
|
-
for (var key in source) {
|
|
44167
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
44168
|
-
target[key] = source[key];
|
|
44169
|
-
}
|
|
44170
|
-
}
|
|
44171
|
-
}
|
|
44172
|
-
return target;
|
|
44173
|
-
};
|
|
44174
|
-
return _extends$2.apply(this, arguments);
|
|
44175
|
-
}
|
|
44176
|
-
|
|
44177
|
-
// Create react-specific types from the agnostic types in @remix-run/router to
|
|
44178
|
-
// export from react-router
|
|
44179
|
-
const DataRouterContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
44180
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44181
|
-
DataRouterContext.displayName = "DataRouter";
|
|
44182
|
-
}
|
|
44183
|
-
const DataRouterStateContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
44184
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44185
|
-
DataRouterStateContext.displayName = "DataRouterState";
|
|
44186
|
-
}
|
|
44187
|
-
const AwaitContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
44188
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44189
|
-
AwaitContext.displayName = "Await";
|
|
44190
|
-
}
|
|
44191
|
-
|
|
44192
|
-
/**
|
|
44193
|
-
* A Navigator is a "location changer"; it's how you get to different locations.
|
|
44194
|
-
*
|
|
44195
|
-
* Every history instance conforms to the Navigator interface, but the
|
|
44196
|
-
* distinction is useful primarily when it comes to the low-level `<Router>` API
|
|
44197
|
-
* where both the location and a navigator must be provided separately in order
|
|
44198
|
-
* to avoid "tearing" that may occur in a suspense-enabled app if the action
|
|
44199
|
-
* and/or location were to be read directly from the history instance.
|
|
44200
|
-
*/
|
|
44201
|
-
|
|
44202
|
-
const NavigationContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
44203
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44204
|
-
NavigationContext.displayName = "Navigation";
|
|
44205
|
-
}
|
|
44206
|
-
const LocationContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
44207
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44208
|
-
LocationContext.displayName = "Location";
|
|
44209
|
-
}
|
|
44210
|
-
const RouteContext = /*#__PURE__*/React__namespace.createContext({
|
|
44211
|
-
outlet: null,
|
|
44212
|
-
matches: [],
|
|
44213
|
-
isDataRoute: false
|
|
44214
|
-
});
|
|
44215
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44216
|
-
RouteContext.displayName = "Route";
|
|
44217
|
-
}
|
|
44218
|
-
const RouteErrorContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
44219
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44220
|
-
RouteErrorContext.displayName = "RouteError";
|
|
44221
|
-
}
|
|
44222
|
-
|
|
44223
|
-
/**
|
|
44224
|
-
* Returns the full href for the given "to" value. This is useful for building
|
|
44225
|
-
* custom links that are also accessible and preserve right-click behavior.
|
|
44226
|
-
*
|
|
44227
|
-
* @see https://reactrouter.com/v6/hooks/use-href
|
|
44228
|
-
*/
|
|
44229
|
-
function useHref(to, _temp) {
|
|
44230
|
-
let {
|
|
44231
|
-
relative
|
|
44232
|
-
} = _temp === void 0 ? {} : _temp;
|
|
44233
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
44234
|
-
// router loaded. We can help them understand how to avoid that.
|
|
44235
|
-
"useHref() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
44236
|
-
let {
|
|
44237
|
-
basename,
|
|
44238
|
-
navigator
|
|
44239
|
-
} = React__namespace.useContext(NavigationContext);
|
|
44240
|
-
let {
|
|
44241
|
-
hash,
|
|
44242
|
-
pathname,
|
|
44243
|
-
search
|
|
44244
|
-
} = useResolvedPath(to, {
|
|
44245
|
-
relative
|
|
44246
|
-
});
|
|
44247
|
-
let joinedPathname = pathname;
|
|
44248
|
-
|
|
44249
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
44250
|
-
// to creating the href. If this is a root navigation, then just use the raw
|
|
44251
|
-
// basename which allows the basename to have full control over the presence
|
|
44252
|
-
// of a trailing slash on root links
|
|
44253
|
-
if (basename !== "/") {
|
|
44254
|
-
joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
44255
|
-
}
|
|
44256
|
-
return navigator.createHref({
|
|
44257
|
-
pathname: joinedPathname,
|
|
44258
|
-
search,
|
|
44259
|
-
hash
|
|
44260
|
-
});
|
|
44261
|
-
}
|
|
44262
|
-
|
|
44263
|
-
/**
|
|
44264
|
-
* Returns true if this component is a descendant of a `<Router>`.
|
|
44265
|
-
*
|
|
44266
|
-
* @see https://reactrouter.com/v6/hooks/use-in-router-context
|
|
44267
|
-
*/
|
|
44268
|
-
function useInRouterContext() {
|
|
44269
|
-
return React__namespace.useContext(LocationContext) != null;
|
|
44270
|
-
}
|
|
44271
|
-
|
|
44272
|
-
/**
|
|
44273
|
-
* Returns the current location object, which represents the current URL in web
|
|
44274
|
-
* browsers.
|
|
44275
|
-
*
|
|
44276
|
-
* Note: If you're using this it may mean you're doing some of your own
|
|
44277
|
-
* "routing" in your app, and we'd like to know what your use case is. We may
|
|
44278
|
-
* be able to provide something higher-level to better suit your needs.
|
|
44279
|
-
*
|
|
44280
|
-
* @see https://reactrouter.com/v6/hooks/use-location
|
|
44281
|
-
*/
|
|
44282
|
-
function useLocation() {
|
|
44283
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
44284
|
-
// router loaded. We can help them understand how to avoid that.
|
|
44285
|
-
"useLocation() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
44286
|
-
return React__namespace.useContext(LocationContext).location;
|
|
44287
|
-
}
|
|
44288
|
-
|
|
44289
|
-
/**
|
|
44290
|
-
* The interface for the navigate() function returned from useNavigate().
|
|
44291
|
-
*/
|
|
44292
|
-
|
|
44293
|
-
const navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";
|
|
44294
|
-
|
|
44295
|
-
// Mute warnings for calls to useNavigate in SSR environments
|
|
44296
|
-
function useIsomorphicLayoutEffect(cb) {
|
|
44297
|
-
let isStatic = React__namespace.useContext(NavigationContext).static;
|
|
44298
|
-
if (!isStatic) {
|
|
44299
|
-
// We should be able to get rid of this once react 18.3 is released
|
|
44300
|
-
// See: https://github.com/facebook/react/pull/26395
|
|
44301
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44302
|
-
React__namespace.useLayoutEffect(cb);
|
|
44303
|
-
}
|
|
44304
|
-
}
|
|
44305
|
-
|
|
44306
|
-
/**
|
|
44307
|
-
* Returns an imperative method for changing the location. Used by `<Link>`s, but
|
|
44308
|
-
* may also be used by other elements to change the location.
|
|
44309
|
-
*
|
|
44310
|
-
* @see https://reactrouter.com/v6/hooks/use-navigate
|
|
44311
|
-
*/
|
|
44312
|
-
function useNavigate() {
|
|
44313
|
-
let {
|
|
44314
|
-
isDataRoute
|
|
44315
|
-
} = React__namespace.useContext(RouteContext);
|
|
44316
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
44317
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44318
|
-
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
44319
|
-
}
|
|
44320
|
-
function useNavigateUnstable() {
|
|
44321
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
44322
|
-
// router loaded. We can help them understand how to avoid that.
|
|
44323
|
-
"useNavigate() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
44324
|
-
let dataRouterContext = React__namespace.useContext(DataRouterContext);
|
|
44325
|
-
let {
|
|
44326
|
-
basename,
|
|
44327
|
-
future,
|
|
44328
|
-
navigator
|
|
44329
|
-
} = React__namespace.useContext(NavigationContext);
|
|
44330
|
-
let {
|
|
44331
|
-
matches
|
|
44332
|
-
} = React__namespace.useContext(RouteContext);
|
|
44333
|
-
let {
|
|
44334
|
-
pathname: locationPathname
|
|
44335
|
-
} = useLocation();
|
|
44336
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
44337
|
-
let activeRef = React__namespace.useRef(false);
|
|
44338
|
-
useIsomorphicLayoutEffect(() => {
|
|
44339
|
-
activeRef.current = true;
|
|
44340
|
-
});
|
|
44341
|
-
let navigate = React__namespace.useCallback(function (to, options) {
|
|
44342
|
-
if (options === void 0) {
|
|
44343
|
-
options = {};
|
|
44344
|
-
}
|
|
44345
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
44346
|
-
|
|
44347
|
-
// Short circuit here since if this happens on first render the navigate
|
|
44348
|
-
// is useless because we haven't wired up our history listener yet
|
|
44349
|
-
if (!activeRef.current) return;
|
|
44350
|
-
if (typeof to === "number") {
|
|
44351
|
-
navigator.go(to);
|
|
44352
|
-
return;
|
|
44353
|
-
}
|
|
44354
|
-
let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
|
|
44355
|
-
|
|
44356
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
44357
|
-
// to handing off to history (but only if we're not in a data router,
|
|
44358
|
-
// otherwise it'll prepend the basename inside of the router).
|
|
44359
|
-
// If this is a root navigation, then we navigate to the raw basename
|
|
44360
|
-
// which allows the basename to have full control over the presence of a
|
|
44361
|
-
// trailing slash on root links
|
|
44362
|
-
if (dataRouterContext == null && basename !== "/") {
|
|
44363
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
44364
|
-
}
|
|
44365
|
-
(!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);
|
|
44366
|
-
}, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);
|
|
44367
|
-
return navigate;
|
|
44368
|
-
}
|
|
44369
|
-
|
|
44370
|
-
/**
|
|
44371
|
-
* Resolves the pathname of the given `to` value against the current location.
|
|
44372
|
-
*
|
|
44373
|
-
* @see https://reactrouter.com/v6/hooks/use-resolved-path
|
|
44374
|
-
*/
|
|
44375
|
-
function useResolvedPath(to, _temp2) {
|
|
44376
|
-
let {
|
|
44377
|
-
relative
|
|
44378
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
44379
|
-
let {
|
|
44380
|
-
future
|
|
44381
|
-
} = React__namespace.useContext(NavigationContext);
|
|
44382
|
-
let {
|
|
44383
|
-
matches
|
|
44384
|
-
} = React__namespace.useContext(RouteContext);
|
|
44385
|
-
let {
|
|
44386
|
-
pathname: locationPathname
|
|
44387
|
-
} = useLocation();
|
|
44388
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
44389
|
-
return React__namespace.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
|
|
44390
|
-
}
|
|
44391
|
-
var DataRouterHook$1 = /*#__PURE__*/function (DataRouterHook) {
|
|
44392
|
-
DataRouterHook["UseBlocker"] = "useBlocker";
|
|
44393
|
-
DataRouterHook["UseRevalidator"] = "useRevalidator";
|
|
44394
|
-
DataRouterHook["UseNavigateStable"] = "useNavigate";
|
|
44395
|
-
return DataRouterHook;
|
|
44396
|
-
}(DataRouterHook$1 || {});
|
|
44397
|
-
var DataRouterStateHook$1 = /*#__PURE__*/function (DataRouterStateHook) {
|
|
44398
|
-
DataRouterStateHook["UseBlocker"] = "useBlocker";
|
|
44399
|
-
DataRouterStateHook["UseLoaderData"] = "useLoaderData";
|
|
44400
|
-
DataRouterStateHook["UseActionData"] = "useActionData";
|
|
44401
|
-
DataRouterStateHook["UseRouteError"] = "useRouteError";
|
|
44402
|
-
DataRouterStateHook["UseNavigation"] = "useNavigation";
|
|
44403
|
-
DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData";
|
|
44404
|
-
DataRouterStateHook["UseMatches"] = "useMatches";
|
|
44405
|
-
DataRouterStateHook["UseRevalidator"] = "useRevalidator";
|
|
44406
|
-
DataRouterStateHook["UseNavigateStable"] = "useNavigate";
|
|
44407
|
-
DataRouterStateHook["UseRouteId"] = "useRouteId";
|
|
44408
|
-
return DataRouterStateHook;
|
|
44409
|
-
}(DataRouterStateHook$1 || {});
|
|
44410
|
-
function getDataRouterConsoleError$1(hookName) {
|
|
44411
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
44412
|
-
}
|
|
44413
|
-
function useDataRouterContext$1(hookName) {
|
|
44414
|
-
let ctx = React__namespace.useContext(DataRouterContext);
|
|
44415
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
44416
|
-
return ctx;
|
|
44417
|
-
}
|
|
44418
|
-
function useRouteContext(hookName) {
|
|
44419
|
-
let route = React__namespace.useContext(RouteContext);
|
|
44420
|
-
!route ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
44421
|
-
return route;
|
|
44422
|
-
}
|
|
44423
|
-
|
|
44424
|
-
// Internal version with hookName-aware debugging
|
|
44425
|
-
function useCurrentRouteId(hookName) {
|
|
44426
|
-
let route = useRouteContext(hookName);
|
|
44427
|
-
let thisRoute = route.matches[route.matches.length - 1];
|
|
44428
|
-
!thisRoute.route.id ? process.env.NODE_ENV !== "production" ? invariant(false, hookName + " can only be used on routes that contain a unique \"id\"") : invariant(false) : void 0;
|
|
44429
|
-
return thisRoute.route.id;
|
|
44430
|
-
}
|
|
44431
|
-
|
|
44432
|
-
/**
|
|
44433
|
-
* Returns the ID for the nearest contextual route
|
|
44434
|
-
*/
|
|
44435
|
-
function useRouteId() {
|
|
44436
|
-
return useCurrentRouteId(DataRouterStateHook$1.UseRouteId);
|
|
44437
|
-
}
|
|
44438
|
-
|
|
44439
|
-
/**
|
|
44440
|
-
* Stable version of useNavigate that is used when we are in the context of
|
|
44441
|
-
* a RouterProvider.
|
|
44442
|
-
*/
|
|
44443
|
-
function useNavigateStable() {
|
|
44444
|
-
let {
|
|
44445
|
-
router
|
|
44446
|
-
} = useDataRouterContext$1(DataRouterHook$1.UseNavigateStable);
|
|
44447
|
-
let id = useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable);
|
|
44448
|
-
let activeRef = React__namespace.useRef(false);
|
|
44449
|
-
useIsomorphicLayoutEffect(() => {
|
|
44450
|
-
activeRef.current = true;
|
|
44451
|
-
});
|
|
44452
|
-
let navigate = React__namespace.useCallback(function (to, options) {
|
|
44453
|
-
if (options === void 0) {
|
|
44454
|
-
options = {};
|
|
44455
|
-
}
|
|
44456
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
44457
|
-
|
|
44458
|
-
// Short circuit here since if this happens on first render the navigate
|
|
44459
|
-
// is useless because we haven't wired up our router subscriber yet
|
|
44460
|
-
if (!activeRef.current) return;
|
|
44461
|
-
if (typeof to === "number") {
|
|
44462
|
-
router.navigate(to);
|
|
44463
|
-
} else {
|
|
44464
|
-
router.navigate(to, _extends$2({
|
|
44465
|
-
fromRouteId: id
|
|
44466
|
-
}, options));
|
|
44467
|
-
}
|
|
44468
|
-
}, [router, id]);
|
|
44469
|
-
return navigate;
|
|
44470
|
-
}
|
|
44471
|
-
new Promise(() => {});
|
|
44472
|
-
|
|
44473
|
-
/**
|
|
44474
|
-
* React Router DOM v6.30.0
|
|
44475
|
-
*
|
|
44476
|
-
* Copyright (c) Remix Software Inc.
|
|
44477
|
-
*
|
|
44478
|
-
* This source code is licensed under the MIT license found in the
|
|
44479
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
44480
|
-
*
|
|
44481
|
-
* @license MIT
|
|
44482
|
-
*/
|
|
44483
|
-
|
|
44484
|
-
function _extends$1() {
|
|
44485
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
44486
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
44487
|
-
var source = arguments[i];
|
|
44488
|
-
for (var key in source) {
|
|
44489
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
44490
|
-
target[key] = source[key];
|
|
44491
|
-
}
|
|
44492
|
-
}
|
|
44493
|
-
}
|
|
44494
|
-
return target;
|
|
44495
|
-
};
|
|
44496
|
-
return _extends$1.apply(this, arguments);
|
|
44497
|
-
}
|
|
44498
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
44499
|
-
if (source == null) return {};
|
|
44500
|
-
var target = {};
|
|
44501
|
-
var sourceKeys = Object.keys(source);
|
|
44502
|
-
var key, i;
|
|
44503
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
44504
|
-
key = sourceKeys[i];
|
|
44505
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
44506
|
-
target[key] = source[key];
|
|
44507
|
-
}
|
|
44508
|
-
return target;
|
|
44509
|
-
}
|
|
44510
|
-
|
|
44511
|
-
const defaultMethod = "get";
|
|
44512
|
-
const defaultEncType = "application/x-www-form-urlencoded";
|
|
44513
|
-
function isHtmlElement(object) {
|
|
44514
|
-
return object != null && typeof object.tagName === "string";
|
|
44515
|
-
}
|
|
44516
|
-
function isButtonElement(object) {
|
|
44517
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
|
|
44518
|
-
}
|
|
44519
|
-
function isFormElement(object) {
|
|
44520
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
|
|
44521
|
-
}
|
|
44522
|
-
function isInputElement(object) {
|
|
44523
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
|
|
44524
|
-
}
|
|
44525
|
-
function isModifiedEvent(event) {
|
|
44526
|
-
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
44527
|
-
}
|
|
44528
|
-
function shouldProcessLinkClick(event, target) {
|
|
44529
|
-
return event.button === 0 && (
|
|
44530
|
-
// Ignore everything but left clicks
|
|
44531
|
-
!target || target === "_self") &&
|
|
44532
|
-
// Let browser handle "target=_blank" etc.
|
|
44533
|
-
!isModifiedEvent(event) // Ignore clicks with modifier keys
|
|
44534
|
-
;
|
|
44535
|
-
}
|
|
44536
|
-
// One-time check for submitter support
|
|
44537
|
-
let _formDataSupportsSubmitter = null;
|
|
44538
|
-
function isFormDataSubmitterSupported() {
|
|
44539
|
-
if (_formDataSupportsSubmitter === null) {
|
|
44540
|
-
try {
|
|
44541
|
-
new FormData(document.createElement("form"),
|
|
44542
|
-
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
44543
|
-
0);
|
|
44544
|
-
_formDataSupportsSubmitter = false;
|
|
44545
|
-
} catch (e) {
|
|
44546
|
-
_formDataSupportsSubmitter = true;
|
|
44547
|
-
}
|
|
44548
|
-
}
|
|
44549
|
-
return _formDataSupportsSubmitter;
|
|
44550
|
-
}
|
|
44551
|
-
const supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
44552
|
-
function getFormEncType(encType) {
|
|
44553
|
-
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
44554
|
-
process.env.NODE_ENV !== "production" ? warning(false, "\"" + encType + "\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \"" + defaultEncType + "\"")) : void 0;
|
|
44555
|
-
return null;
|
|
44556
|
-
}
|
|
44557
|
-
return encType;
|
|
44558
|
-
}
|
|
44559
|
-
function getFormSubmissionInfo(target, basename) {
|
|
44560
|
-
let method;
|
|
44561
|
-
let action;
|
|
44562
|
-
let encType;
|
|
44563
|
-
let formData;
|
|
44564
|
-
let body;
|
|
44565
|
-
if (isFormElement(target)) {
|
|
44566
|
-
// When grabbing the action from the element, it will have had the basename
|
|
44567
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
44568
|
-
// re-prefix in the router
|
|
44569
|
-
let attr = target.getAttribute("action");
|
|
44570
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
44571
|
-
method = target.getAttribute("method") || defaultMethod;
|
|
44572
|
-
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
44573
|
-
formData = new FormData(target);
|
|
44574
|
-
} else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
|
|
44575
|
-
let form = target.form;
|
|
44576
|
-
if (form == null) {
|
|
44577
|
-
throw new Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
44578
|
-
}
|
|
44579
|
-
// <button>/<input type="submit"> may override attributes of <form>
|
|
44580
|
-
// When grabbing the action from the element, it will have had the basename
|
|
44581
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
44582
|
-
// re-prefix in the router
|
|
44583
|
-
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
44584
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
44585
|
-
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
44586
|
-
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
44587
|
-
// Build a FormData object populated from a form and submitter
|
|
44588
|
-
formData = new FormData(form, target);
|
|
44589
|
-
// If this browser doesn't support the `FormData(el, submitter)` format,
|
|
44590
|
-
// then tack on the submitter value at the end. This is a lightweight
|
|
44591
|
-
// solution that is not 100% spec compliant. For complete support in older
|
|
44592
|
-
// browsers, consider using the `formdata-submitter-polyfill` package
|
|
44593
|
-
if (!isFormDataSubmitterSupported()) {
|
|
44594
|
-
let {
|
|
44595
|
-
name,
|
|
44596
|
-
type,
|
|
44597
|
-
value
|
|
44598
|
-
} = target;
|
|
44599
|
-
if (type === "image") {
|
|
44600
|
-
let prefix = name ? name + "." : "";
|
|
44601
|
-
formData.append(prefix + "x", "0");
|
|
44602
|
-
formData.append(prefix + "y", "0");
|
|
44603
|
-
} else if (name) {
|
|
44604
|
-
formData.append(name, value);
|
|
44605
|
-
}
|
|
44606
|
-
}
|
|
44607
|
-
} else if (isHtmlElement(target)) {
|
|
44608
|
-
throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\"submit|image\">");
|
|
44609
|
-
} else {
|
|
44610
|
-
method = defaultMethod;
|
|
44611
|
-
action = null;
|
|
44612
|
-
encType = defaultEncType;
|
|
44613
|
-
body = target;
|
|
44614
|
-
}
|
|
44615
|
-
// Send body for <Form encType="text/plain" so we encode it into text
|
|
44616
|
-
if (formData && encType === "text/plain") {
|
|
44617
|
-
body = formData;
|
|
44618
|
-
formData = undefined;
|
|
44619
|
-
}
|
|
44620
|
-
return {
|
|
44621
|
-
action,
|
|
44622
|
-
method: method.toLowerCase(),
|
|
44623
|
-
encType,
|
|
44624
|
-
formData,
|
|
44625
|
-
body
|
|
44626
|
-
};
|
|
44627
|
-
}
|
|
44628
|
-
|
|
44629
|
-
const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"],
|
|
44630
|
-
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"],
|
|
44631
|
-
_excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"];
|
|
44632
|
-
// HEY YOU! DON'T TOUCH THIS VARIABLE!
|
|
44633
|
-
//
|
|
44634
|
-
// It is replaced with the proper version at build time via a babel plugin in
|
|
44635
|
-
// the rollup config.
|
|
44636
|
-
//
|
|
44637
|
-
// Export a global property onto the window for React Router detection by the
|
|
44638
|
-
// Core Web Vitals Technology Report. This way they can configure the `wappalyzer`
|
|
44639
|
-
// to detect and properly classify live websites as being built with React Router:
|
|
44640
|
-
// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
|
|
44641
|
-
const REACT_ROUTER_VERSION = "6";
|
|
44642
|
-
try {
|
|
44643
|
-
window.__reactRouterVersion = REACT_ROUTER_VERSION;
|
|
44644
|
-
} catch (e) {
|
|
44645
|
-
// no-op
|
|
44646
|
-
}
|
|
44647
|
-
const ViewTransitionContext = /*#__PURE__*/React__namespace.createContext({
|
|
44648
|
-
isTransitioning: false
|
|
44649
|
-
});
|
|
44650
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44651
|
-
ViewTransitionContext.displayName = "ViewTransition";
|
|
44652
|
-
}
|
|
44653
|
-
const FetchersContext = /*#__PURE__*/React__namespace.createContext(new Map());
|
|
44654
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44655
|
-
FetchersContext.displayName = "Fetchers";
|
|
44656
|
-
}
|
|
44657
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
44658
|
-
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
44659
|
-
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
44660
|
-
/**
|
|
44661
|
-
* The public API for rendering a history-aware `<a>`.
|
|
44662
|
-
*/
|
|
44663
|
-
const Link = /*#__PURE__*/React__namespace.forwardRef(function LinkWithRef(_ref7, ref) {
|
|
44664
|
-
let {
|
|
44665
|
-
onClick,
|
|
44666
|
-
relative,
|
|
44667
|
-
reloadDocument,
|
|
44668
|
-
replace,
|
|
44669
|
-
state,
|
|
44670
|
-
target,
|
|
44671
|
-
to,
|
|
44672
|
-
preventScrollReset,
|
|
44673
|
-
viewTransition
|
|
44674
|
-
} = _ref7,
|
|
44675
|
-
rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
44676
|
-
let {
|
|
44677
|
-
basename
|
|
44678
|
-
} = React__namespace.useContext(NavigationContext);
|
|
44679
|
-
// Rendered into <a href> for absolute URLs
|
|
44680
|
-
let absoluteHref;
|
|
44681
|
-
let isExternal = false;
|
|
44682
|
-
if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
|
|
44683
|
-
// Render the absolute href server- and client-side
|
|
44684
|
-
absoluteHref = to;
|
|
44685
|
-
// Only check for external origins client-side
|
|
44686
|
-
if (isBrowser) {
|
|
44687
|
-
try {
|
|
44688
|
-
let currentUrl = new URL(window.location.href);
|
|
44689
|
-
let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
44690
|
-
let path = stripBasename(targetUrl.pathname, basename);
|
|
44691
|
-
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
44692
|
-
// Strip the protocol/origin/basename for same-origin absolute URLs
|
|
44693
|
-
to = path + targetUrl.search + targetUrl.hash;
|
|
44694
|
-
} else {
|
|
44695
|
-
isExternal = true;
|
|
44696
|
-
}
|
|
44697
|
-
} catch (e) {
|
|
44698
|
-
// We can't do external URL detection without a valid URL
|
|
44699
|
-
process.env.NODE_ENV !== "production" ? warning(false, "<Link to=\"" + to + "\"> contains an invalid URL which will probably break " + "when clicked - please update to a valid URL path.") : void 0;
|
|
44700
|
-
}
|
|
44701
|
-
}
|
|
44702
|
-
}
|
|
44703
|
-
// Rendered into <a href> for relative URLs
|
|
44704
|
-
let href = useHref(to, {
|
|
44705
|
-
relative
|
|
44706
|
-
});
|
|
44707
|
-
let internalOnClick = useLinkClickHandler(to, {
|
|
44708
|
-
replace,
|
|
44709
|
-
state,
|
|
44710
|
-
target,
|
|
44711
|
-
preventScrollReset,
|
|
44712
|
-
relative,
|
|
44713
|
-
viewTransition
|
|
44714
|
-
});
|
|
44715
|
-
function handleClick(event) {
|
|
44716
|
-
if (onClick) onClick(event);
|
|
44717
|
-
if (!event.defaultPrevented) {
|
|
44718
|
-
internalOnClick(event);
|
|
44719
|
-
}
|
|
44720
|
-
}
|
|
44721
|
-
return (
|
|
44722
|
-
/*#__PURE__*/
|
|
44723
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
44724
|
-
React__namespace.createElement("a", _extends$1({}, rest, {
|
|
44725
|
-
href: absoluteHref || href,
|
|
44726
|
-
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
44727
|
-
ref: ref,
|
|
44728
|
-
target: target
|
|
44729
|
-
}))
|
|
44730
|
-
);
|
|
44731
|
-
});
|
|
44732
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44733
|
-
Link.displayName = "Link";
|
|
44734
|
-
}
|
|
44735
|
-
/**
|
|
44736
|
-
* A `<Link>` wrapper that knows if it's "active" or not.
|
|
44737
|
-
*/
|
|
44738
|
-
const NavLink = /*#__PURE__*/React__namespace.forwardRef(function NavLinkWithRef(_ref8, ref) {
|
|
44739
|
-
let {
|
|
44740
|
-
"aria-current": ariaCurrentProp = "page",
|
|
44741
|
-
caseSensitive = false,
|
|
44742
|
-
className: classNameProp = "",
|
|
44743
|
-
end = false,
|
|
44744
|
-
style: styleProp,
|
|
44745
|
-
to,
|
|
44746
|
-
viewTransition,
|
|
44747
|
-
children
|
|
44748
|
-
} = _ref8,
|
|
44749
|
-
rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
|
|
44750
|
-
let path = useResolvedPath(to, {
|
|
44751
|
-
relative: rest.relative
|
|
44752
|
-
});
|
|
44753
|
-
let location = useLocation();
|
|
44754
|
-
let routerState = React__namespace.useContext(DataRouterStateContext);
|
|
44755
|
-
let {
|
|
44756
|
-
navigator,
|
|
44757
|
-
basename
|
|
44758
|
-
} = React__namespace.useContext(NavigationContext);
|
|
44759
|
-
let isTransitioning = routerState != null &&
|
|
44760
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
44761
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
44762
|
-
useViewTransitionState(path) && viewTransition === true;
|
|
44763
|
-
let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
|
|
44764
|
-
let locationPathname = location.pathname;
|
|
44765
|
-
let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
|
|
44766
|
-
if (!caseSensitive) {
|
|
44767
|
-
locationPathname = locationPathname.toLowerCase();
|
|
44768
|
-
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
44769
|
-
toPathname = toPathname.toLowerCase();
|
|
44770
|
-
}
|
|
44771
|
-
if (nextLocationPathname && basename) {
|
|
44772
|
-
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
44773
|
-
}
|
|
44774
|
-
// If the `to` has a trailing slash, look at that exact spot. Otherwise,
|
|
44775
|
-
// we're looking for a slash _after_ what's in `to`. For example:
|
|
44776
|
-
//
|
|
44777
|
-
// <NavLink to="/users"> and <NavLink to="/users/">
|
|
44778
|
-
// both want to look for a / at index 6 to match URL `/users/matt`
|
|
44779
|
-
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
44780
|
-
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
44781
|
-
let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
|
|
44782
|
-
let renderProps = {
|
|
44783
|
-
isActive,
|
|
44784
|
-
isPending,
|
|
44785
|
-
isTransitioning
|
|
44786
|
-
};
|
|
44787
|
-
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
|
|
44788
|
-
let className;
|
|
44789
|
-
if (typeof classNameProp === "function") {
|
|
44790
|
-
className = classNameProp(renderProps);
|
|
44791
|
-
} else {
|
|
44792
|
-
// If the className prop is not a function, we use a default `active`
|
|
44793
|
-
// class for <NavLink />s that are active. In v5 `active` was the default
|
|
44794
|
-
// value for `activeClassName`, but we are removing that API and can still
|
|
44795
|
-
// use the old default behavior for a cleaner upgrade path and keep the
|
|
44796
|
-
// simple styling rules working as they currently do.
|
|
44797
|
-
className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
|
|
44798
|
-
}
|
|
44799
|
-
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
44800
|
-
return /*#__PURE__*/React__namespace.createElement(Link, _extends$1({}, rest, {
|
|
44801
|
-
"aria-current": ariaCurrent,
|
|
44802
|
-
className: className,
|
|
44803
|
-
ref: ref,
|
|
44804
|
-
style: style,
|
|
44805
|
-
to: to,
|
|
44806
|
-
viewTransition: viewTransition
|
|
44807
|
-
}), typeof children === "function" ? children(renderProps) : children);
|
|
44808
|
-
});
|
|
44809
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44810
|
-
NavLink.displayName = "NavLink";
|
|
44811
|
-
}
|
|
44812
|
-
/**
|
|
44813
|
-
* A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
|
|
44814
|
-
* that the interaction with the server is with `fetch` instead of new document
|
|
44815
|
-
* requests, allowing components to add nicer UX to the page as the form is
|
|
44816
|
-
* submitted and returns with data.
|
|
44817
|
-
*/
|
|
44818
|
-
const Form = /*#__PURE__*/React__namespace.forwardRef((_ref9, forwardedRef) => {
|
|
44819
|
-
let {
|
|
44820
|
-
fetcherKey,
|
|
44821
|
-
navigate,
|
|
44822
|
-
reloadDocument,
|
|
44823
|
-
replace,
|
|
44824
|
-
state,
|
|
44825
|
-
method = defaultMethod,
|
|
44826
|
-
action,
|
|
44827
|
-
onSubmit,
|
|
44828
|
-
relative,
|
|
44829
|
-
preventScrollReset,
|
|
44830
|
-
viewTransition
|
|
44831
|
-
} = _ref9,
|
|
44832
|
-
props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
|
|
44833
|
-
let submit = useSubmit();
|
|
44834
|
-
let formAction = useFormAction(action, {
|
|
44835
|
-
relative
|
|
44836
|
-
});
|
|
44837
|
-
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
44838
|
-
let submitHandler = event => {
|
|
44839
|
-
onSubmit && onSubmit(event);
|
|
44840
|
-
if (event.defaultPrevented) return;
|
|
44841
|
-
event.preventDefault();
|
|
44842
|
-
let submitter = event.nativeEvent.submitter;
|
|
44843
|
-
let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
|
|
44844
|
-
submit(submitter || event.currentTarget, {
|
|
44845
|
-
fetcherKey,
|
|
44846
|
-
method: submitMethod,
|
|
44847
|
-
navigate,
|
|
44848
|
-
replace,
|
|
44849
|
-
state,
|
|
44850
|
-
relative,
|
|
44851
|
-
preventScrollReset,
|
|
44852
|
-
viewTransition
|
|
44853
|
-
});
|
|
44854
|
-
};
|
|
44855
|
-
return /*#__PURE__*/React__namespace.createElement("form", _extends$1({
|
|
44856
|
-
ref: forwardedRef,
|
|
44857
|
-
method: formMethod,
|
|
44858
|
-
action: formAction,
|
|
44859
|
-
onSubmit: reloadDocument ? onSubmit : submitHandler
|
|
44860
|
-
}, props));
|
|
44861
|
-
});
|
|
44862
|
-
if (process.env.NODE_ENV !== "production") {
|
|
44863
|
-
Form.displayName = "Form";
|
|
44864
|
-
}
|
|
44865
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
44866
|
-
//#endregion
|
|
44867
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
44868
|
-
//#region Hooks
|
|
44869
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
44870
|
-
var DataRouterHook;
|
|
44871
|
-
(function (DataRouterHook) {
|
|
44872
|
-
DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
44873
|
-
DataRouterHook["UseSubmit"] = "useSubmit";
|
|
44874
|
-
DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";
|
|
44875
|
-
DataRouterHook["UseFetcher"] = "useFetcher";
|
|
44876
|
-
DataRouterHook["useViewTransitionState"] = "useViewTransitionState";
|
|
44877
|
-
})(DataRouterHook || (DataRouterHook = {}));
|
|
44878
|
-
var DataRouterStateHook;
|
|
44879
|
-
(function (DataRouterStateHook) {
|
|
44880
|
-
DataRouterStateHook["UseFetcher"] = "useFetcher";
|
|
44881
|
-
DataRouterStateHook["UseFetchers"] = "useFetchers";
|
|
44882
|
-
DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
44883
|
-
})(DataRouterStateHook || (DataRouterStateHook = {}));
|
|
44884
|
-
// Internal hooks
|
|
44885
|
-
function getDataRouterConsoleError(hookName) {
|
|
44886
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
44887
|
-
}
|
|
44888
|
-
function useDataRouterContext(hookName) {
|
|
44889
|
-
let ctx = React__namespace.useContext(DataRouterContext);
|
|
44890
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
|
|
44891
|
-
return ctx;
|
|
44892
|
-
}
|
|
44893
|
-
// External hooks
|
|
44894
|
-
/**
|
|
44895
|
-
* Handles the click behavior for router `<Link>` components. This is useful if
|
|
44896
|
-
* you need to create custom `<Link>` components with the same click behavior we
|
|
44897
|
-
* use in our exported `<Link>`.
|
|
44898
|
-
*/
|
|
44899
|
-
function useLinkClickHandler(to, _temp) {
|
|
44900
|
-
let {
|
|
44901
|
-
target,
|
|
44902
|
-
replace: replaceProp,
|
|
44903
|
-
state,
|
|
44904
|
-
preventScrollReset,
|
|
44905
|
-
relative,
|
|
44906
|
-
viewTransition
|
|
44907
|
-
} = _temp === void 0 ? {} : _temp;
|
|
44908
|
-
let navigate = useNavigate();
|
|
44909
|
-
let location = useLocation();
|
|
44910
|
-
let path = useResolvedPath(to, {
|
|
44911
|
-
relative
|
|
44912
|
-
});
|
|
44913
|
-
return React__namespace.useCallback(event => {
|
|
44914
|
-
if (shouldProcessLinkClick(event, target)) {
|
|
44915
|
-
event.preventDefault();
|
|
44916
|
-
// If the URL hasn't changed, a regular <a> will do a replace instead of
|
|
44917
|
-
// a push, so do the same here unless the replace prop is explicitly set
|
|
44918
|
-
let replace = replaceProp !== undefined ? replaceProp : createPath(location) === createPath(path);
|
|
44919
|
-
navigate(to, {
|
|
44920
|
-
replace,
|
|
44921
|
-
state,
|
|
44922
|
-
preventScrollReset,
|
|
44923
|
-
relative,
|
|
44924
|
-
viewTransition
|
|
44925
|
-
});
|
|
44926
|
-
}
|
|
44927
|
-
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);
|
|
44928
|
-
}
|
|
44929
|
-
function validateClientSideSubmission() {
|
|
44930
|
-
if (typeof document === "undefined") {
|
|
44931
|
-
throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead.");
|
|
44932
|
-
}
|
|
44933
|
-
}
|
|
44934
|
-
let fetcherId = 0;
|
|
44935
|
-
let getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";
|
|
44936
|
-
/**
|
|
44937
|
-
* Returns a function that may be used to programmatically submit a form (or
|
|
44938
|
-
* some arbitrary data) to the server.
|
|
44939
|
-
*/
|
|
44940
|
-
function useSubmit() {
|
|
44941
|
-
let {
|
|
44942
|
-
router
|
|
44943
|
-
} = useDataRouterContext(DataRouterHook.UseSubmit);
|
|
44944
|
-
let {
|
|
44945
|
-
basename
|
|
44946
|
-
} = React__namespace.useContext(NavigationContext);
|
|
44947
|
-
let currentRouteId = useRouteId();
|
|
44948
|
-
return React__namespace.useCallback(function (target, options) {
|
|
44949
|
-
if (options === void 0) {
|
|
44950
|
-
options = {};
|
|
44951
|
-
}
|
|
44952
|
-
validateClientSideSubmission();
|
|
44953
|
-
let {
|
|
44954
|
-
action,
|
|
44955
|
-
method,
|
|
44956
|
-
encType,
|
|
44957
|
-
formData,
|
|
44958
|
-
body
|
|
44959
|
-
} = getFormSubmissionInfo(target, basename);
|
|
44960
|
-
if (options.navigate === false) {
|
|
44961
|
-
let key = options.fetcherKey || getUniqueFetcherId();
|
|
44962
|
-
router.fetch(key, currentRouteId, options.action || action, {
|
|
44963
|
-
preventScrollReset: options.preventScrollReset,
|
|
44964
|
-
formData,
|
|
44965
|
-
body,
|
|
44966
|
-
formMethod: options.method || method,
|
|
44967
|
-
formEncType: options.encType || encType,
|
|
44968
|
-
flushSync: options.flushSync
|
|
44969
|
-
});
|
|
44970
|
-
} else {
|
|
44971
|
-
router.navigate(options.action || action, {
|
|
44972
|
-
preventScrollReset: options.preventScrollReset,
|
|
44973
|
-
formData,
|
|
44974
|
-
body,
|
|
44975
|
-
formMethod: options.method || method,
|
|
44976
|
-
formEncType: options.encType || encType,
|
|
44977
|
-
replace: options.replace,
|
|
44978
|
-
state: options.state,
|
|
44979
|
-
fromRouteId: currentRouteId,
|
|
44980
|
-
flushSync: options.flushSync,
|
|
44981
|
-
viewTransition: options.viewTransition
|
|
44982
|
-
});
|
|
44983
|
-
}
|
|
44984
|
-
}, [router, basename, currentRouteId]);
|
|
44985
|
-
}
|
|
44986
|
-
// v7: Eventually we should deprecate this entirely in favor of using the
|
|
44987
|
-
// router method directly?
|
|
44988
|
-
function useFormAction(action, _temp2) {
|
|
44989
|
-
let {
|
|
44990
|
-
relative
|
|
44991
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
44992
|
-
let {
|
|
44993
|
-
basename
|
|
44994
|
-
} = React__namespace.useContext(NavigationContext);
|
|
44995
|
-
let routeContext = React__namespace.useContext(RouteContext);
|
|
44996
|
-
!routeContext ? process.env.NODE_ENV !== "production" ? invariant(false, "useFormAction must be used inside a RouteContext") : invariant(false) : void 0;
|
|
44997
|
-
let [match] = routeContext.matches.slice(-1);
|
|
44998
|
-
// Shallow clone path so we can modify it below, otherwise we modify the
|
|
44999
|
-
// object referenced by useMemo inside useResolvedPath
|
|
45000
|
-
let path = _extends$1({}, useResolvedPath(action ? action : ".", {
|
|
45001
|
-
relative
|
|
45002
|
-
}));
|
|
45003
|
-
// If no action was specified, browsers will persist current search params
|
|
45004
|
-
// when determining the path, so match that behavior
|
|
45005
|
-
// https://github.com/remix-run/remix/issues/927
|
|
45006
|
-
let location = useLocation();
|
|
45007
|
-
if (action == null) {
|
|
45008
|
-
// Safe to write to this directly here since if action was undefined, we
|
|
45009
|
-
// would have called useResolvedPath(".") which will never include a search
|
|
45010
|
-
path.search = location.search;
|
|
45011
|
-
// When grabbing search params from the URL, remove any included ?index param
|
|
45012
|
-
// since it might not apply to our contextual route. We add it back based
|
|
45013
|
-
// on match.route.index below
|
|
45014
|
-
let params = new URLSearchParams(path.search);
|
|
45015
|
-
let indexValues = params.getAll("index");
|
|
45016
|
-
let hasNakedIndexParam = indexValues.some(v => v === "");
|
|
45017
|
-
if (hasNakedIndexParam) {
|
|
45018
|
-
params.delete("index");
|
|
45019
|
-
indexValues.filter(v => v).forEach(v => params.append("index", v));
|
|
45020
|
-
let qs = params.toString();
|
|
45021
|
-
path.search = qs ? "?" + qs : "";
|
|
45022
|
-
}
|
|
45023
|
-
}
|
|
45024
|
-
if ((!action || action === ".") && match.route.index) {
|
|
45025
|
-
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
45026
|
-
}
|
|
45027
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
45028
|
-
// to creating the form action. If this is a root navigation, then just use
|
|
45029
|
-
// the raw basename which allows the basename to have full control over the
|
|
45030
|
-
// presence of a trailing slash on root actions
|
|
45031
|
-
if (basename !== "/") {
|
|
45032
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
45033
|
-
}
|
|
45034
|
-
return createPath(path);
|
|
45035
|
-
}
|
|
45036
|
-
/**
|
|
45037
|
-
* Return a boolean indicating if there is an active view transition to the
|
|
45038
|
-
* given href. You can use this value to render CSS classes or viewTransitionName
|
|
45039
|
-
* styles onto your elements
|
|
45040
|
-
*
|
|
45041
|
-
* @param href The destination href
|
|
45042
|
-
* @param [opts.relative] Relative routing type ("route" | "path")
|
|
45043
|
-
*/
|
|
45044
|
-
function useViewTransitionState(to, opts) {
|
|
45045
|
-
if (opts === void 0) {
|
|
45046
|
-
opts = {};
|
|
45047
|
-
}
|
|
45048
|
-
let vtContext = React__namespace.useContext(ViewTransitionContext);
|
|
45049
|
-
!(vtContext != null) ? process.env.NODE_ENV !== "production" ? invariant(false, "`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. " + "Did you accidentally import `RouterProvider` from `react-router`?") : invariant(false) : void 0;
|
|
45050
|
-
let {
|
|
45051
|
-
basename
|
|
45052
|
-
} = useDataRouterContext(DataRouterHook.useViewTransitionState);
|
|
45053
|
-
let path = useResolvedPath(to, {
|
|
45054
|
-
relative: opts.relative
|
|
45055
|
-
});
|
|
45056
|
-
if (!vtContext.isTransitioning) {
|
|
45057
|
-
return false;
|
|
45058
|
-
}
|
|
45059
|
-
let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
45060
|
-
let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
45061
|
-
// Transition is active if we're going to or coming from the indicated
|
|
45062
|
-
// destination. This ensures that other PUSH navigations that reverse
|
|
45063
|
-
// an indicated transition apply. I.e., on the list view you have:
|
|
45064
|
-
//
|
|
45065
|
-
// <NavLink to="/details/1" viewTransition>
|
|
45066
|
-
//
|
|
45067
|
-
// If you click the breadcrumb back to the list view:
|
|
45068
|
-
//
|
|
45069
|
-
// <NavLink to="/list" viewTransition>
|
|
45070
|
-
//
|
|
45071
|
-
// We should apply the transition because it's indicated as active going
|
|
45072
|
-
// from /list -> /details/1 and therefore should be active on the reverse
|
|
45073
|
-
// (even though this isn't strictly a POP reverse)
|
|
45074
|
-
return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
|
|
45075
|
-
}
|
|
45076
|
-
|
|
45077
43174
|
const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }) => {
|
|
45078
|
-
const navigate = useNavigate();
|
|
43175
|
+
const navigate = reactRouterDom.useNavigate();
|
|
45079
43176
|
const [dataMenu, setDataMenu] = React$5.useState([]);
|
|
45080
43177
|
const [openMenu, setOpenMenu] = React$5.useState(false);
|
|
45081
43178
|
const [url, setUrl] = React$5.useState('');
|
|
@@ -45177,7 +43274,7 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
|
|
|
45177
43274
|
}, children: x.name }, x.code)) })] }, item.code));
|
|
45178
43275
|
}
|
|
45179
43276
|
else {
|
|
45180
|
-
return (jsxRuntime.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));
|
|
43277
|
+
return (jsxRuntime.jsx(reactRouterDom.Link, { draggable: false, to: item.url, className: classnames('tab-custom-item', { active: item.url === url || (tabParent && url?.split('/').length > 3 && item.url.startsWith(url.substring(0, url.lastIndexOf('/')))) }), children: item.name }, item.code));
|
|
45181
43278
|
}
|
|
45182
43279
|
}) }) }), jsxRuntime.jsx("div", { onClick: () => handleScroll(200), className: classnames('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsxRuntime.jsx(SvgChevronRight, {}) })] })] }));
|
|
45183
43280
|
};
|
|
@@ -47516,7 +45613,7 @@ exports.Scrollbars = _Scrollbars2["default"];
|
|
|
47516
45613
|
}(lib));
|
|
47517
45614
|
|
|
47518
45615
|
const CheckboxInput = (props) => {
|
|
47519
|
-
const { t } = useTranslation();
|
|
45616
|
+
const { t } = reactI18next.useTranslation();
|
|
47520
45617
|
const { control, name, label, desciptionLabel, confirmHandle, labelSize, disabled, callback, isLabel, inLine, reverse, text, ...rest } = props;
|
|
47521
45618
|
const renderText = () => {
|
|
47522
45619
|
return (jsxRuntime.jsx(React$5.Fragment, { children: text ? jsxRuntime.jsxs(Label$1, { className: "form-label ms-1 me-0", style: { textAlign: 'left' }, for: name, children: [t(text), " "] }) : '' }));
|
|
@@ -47639,7 +45736,7 @@ const StyleInput = (props) => {
|
|
|
47639
45736
|
};
|
|
47640
45737
|
|
|
47641
45738
|
const ExportExcelComponent = ({ openModal, typeModal, handleModal, windowSize, dataItem, columns, columnGroups }) => {
|
|
47642
|
-
const { t } = useTranslation();
|
|
45739
|
+
const { t } = reactI18next.useTranslation();
|
|
47643
45740
|
const [dataSelected, setDataSelected] = React$5.useState([]);
|
|
47644
45741
|
const [selectedGroups, setSelectedGroups] = React$5.useState([]);
|
|
47645
45742
|
const { control, reset, handleSubmit, clearErrors, getValues, setValue } = useForm({
|
|
@@ -47752,7 +45849,7 @@ const ExportExcelComponent = ({ openModal, typeModal, handleModal, windowSize, d
|
|
|
47752
45849
|
const TabValidateImportExcel = (props) => {
|
|
47753
45850
|
const { dataInvalid, dataValid, dataValidate, windowSize, formatNumber, pageSizeDefault, pageOptions, headerValidateExcelColumns } = props;
|
|
47754
45851
|
const [resultView, setResultView] = React$5.useState(0);
|
|
47755
|
-
const { t } = useTranslation();
|
|
45852
|
+
const { t } = reactI18next.useTranslation();
|
|
47756
45853
|
const [currentPage, setCurrentPage] = React$5.useState(1);
|
|
47757
45854
|
const [pageSize, setPageSize] = React$5.useState(pageSizeDefault);
|
|
47758
45855
|
const dataTemplate = () => {
|
|
@@ -66775,7 +64872,7 @@ const TabSelectFileImportExcel = (props) => {
|
|
|
66775
64872
|
const { getExcelTemplate, setValue, getValues, control, errors } = props;
|
|
66776
64873
|
const [isDragging, setIsDragging] = React$5.useState(false);
|
|
66777
64874
|
const [optionSheetName, setOptionSheetName] = React$5.useState([]);
|
|
66778
|
-
const { t } = useTranslation();
|
|
64875
|
+
const { t } = reactI18next.useTranslation();
|
|
66779
64876
|
const hanldDrag = (e) => {
|
|
66780
64877
|
e.preventDefault();
|
|
66781
64878
|
e.stopPropagation();
|
|
@@ -66813,7 +64910,7 @@ const TabSelectFileImportExcel = (props) => {
|
|
|
66813
64910
|
|
|
66814
64911
|
const TabMergeImportExcel = (props) => {
|
|
66815
64912
|
const { setValue, watch, windowSize, optionField, formatNumber } = props;
|
|
66816
|
-
const { t } = useTranslation();
|
|
64913
|
+
const { t } = reactI18next.useTranslation();
|
|
66817
64914
|
return (jsxRuntime.jsxs("div", { className: 'box form-box__border', children: [jsxRuntime.jsx("h5", { className: 'm-0 form-box__border--title', children: t('Merge data fields') }), jsxRuntime.jsx(TableEdit, { formatSetting: {
|
|
66818
64915
|
decimalSeparator: formatNumber?.decimalSeparator,
|
|
66819
64916
|
thousandSeparator: formatNumber?.thousandSeparator,
|
|
@@ -66865,7 +64962,7 @@ const TabMergeImportExcel = (props) => {
|
|
|
66865
64962
|
|
|
66866
64963
|
const TabHandleErrorImportExcel = (props) => {
|
|
66867
64964
|
const { dataError, windowSize, formatNumber, pageSizeDefault, pageOptions, headerHandleErrorExcelColumns } = props;
|
|
66868
|
-
const { t } = useTranslation();
|
|
64965
|
+
const { t } = reactI18next.useTranslation();
|
|
66869
64966
|
const [currentPage, setCurrentPage] = React$5.useState(1);
|
|
66870
64967
|
const [pageSize, setPageSize] = React$5.useState(pageSizeDefault);
|
|
66871
64968
|
const errorTemplate = () => {
|
|
@@ -67376,7 +65473,7 @@ const Wizard = React$5.forwardRef((props, ref) => {
|
|
|
67376
65473
|
|
|
67377
65474
|
const ImportExcelComponent = (props) => {
|
|
67378
65475
|
const { setValue, getValues, control, errors, formatNumber, pageOptions, pageSizeDefault, watch, setStepper, windowSize, optionField, dataInvalid, dataValid, dataValidate, dataError, getExcelTemplate, headerValidateExcelColumns, headerHandleErrorExcelColumns } = props;
|
|
67379
|
-
const { t } = useTranslation();
|
|
65476
|
+
const { t } = reactI18next.useTranslation();
|
|
67380
65477
|
const ref = React$5.useRef(null);
|
|
67381
65478
|
return (jsxRuntime.jsx("div", { style: { marginTop: '-25px' }, className: 'modern-horizontal-wizard', children: jsxRuntime.jsx(Wizard, { instance: (el) => {
|
|
67382
65479
|
setStepper(el);
|