react-table-edit 1.2.61 → 1.2.62
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 +90 -1384
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +88 -1382
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -6,6 +6,7 @@ var jsxRuntime = require('react/jsx-runtime');
|
|
|
6
6
|
var React$3 = require('react');
|
|
7
7
|
var ReactDOM = require('react-dom');
|
|
8
8
|
var client = require('react-dom/client');
|
|
9
|
+
var reactRouterDom = require('react-router-dom');
|
|
9
10
|
|
|
10
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
11
12
|
|
|
@@ -1289,7 +1290,7 @@ var fromEntries = function fromEntries(entries) {
|
|
|
1289
1290
|
* Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
|
|
1290
1291
|
*/
|
|
1291
1292
|
|
|
1292
|
-
var useIsomorphicLayoutEffect
|
|
1293
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React__namespace.useLayoutEffect : React__namespace.useEffect;
|
|
1293
1294
|
|
|
1294
1295
|
var top = 'top';
|
|
1295
1296
|
var bottom = 'bottom';
|
|
@@ -3293,12 +3294,12 @@ var usePopper = function usePopper(referenceElement, popperElement, options) {
|
|
|
3293
3294
|
}
|
|
3294
3295
|
}, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);
|
|
3295
3296
|
var popperInstanceRef = React__namespace.useRef();
|
|
3296
|
-
useIsomorphicLayoutEffect
|
|
3297
|
+
useIsomorphicLayoutEffect(function () {
|
|
3297
3298
|
if (popperInstanceRef.current) {
|
|
3298
3299
|
popperInstanceRef.current.setOptions(popperOptions);
|
|
3299
3300
|
}
|
|
3300
3301
|
}, [popperOptions]);
|
|
3301
|
-
useIsomorphicLayoutEffect
|
|
3302
|
+
useIsomorphicLayoutEffect(function () {
|
|
3302
3303
|
if (referenceElement == null || popperElement == null) {
|
|
3303
3304
|
return;
|
|
3304
3305
|
}
|
|
@@ -3408,7 +3409,7 @@ function Popper(_ref) {
|
|
|
3408
3409
|
|
|
3409
3410
|
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
3410
3411
|
|
|
3411
|
-
var warning
|
|
3412
|
+
var warning = function() {};
|
|
3412
3413
|
|
|
3413
3414
|
if (__DEV__) {
|
|
3414
3415
|
var printWarning = function printWarning(format, args) {
|
|
@@ -3433,7 +3434,7 @@ if (__DEV__) {
|
|
|
3433
3434
|
} catch (x) {}
|
|
3434
3435
|
};
|
|
3435
3436
|
|
|
3436
|
-
warning
|
|
3437
|
+
warning = function(condition, format, args) {
|
|
3437
3438
|
var len = arguments.length;
|
|
3438
3439
|
args = new Array(len > 2 ? len - 2 : 0);
|
|
3439
3440
|
for (var key = 2; key < len; key++) {
|
|
@@ -3451,7 +3452,7 @@ if (__DEV__) {
|
|
|
3451
3452
|
};
|
|
3452
3453
|
}
|
|
3453
3454
|
|
|
3454
|
-
var warning_1 = warning
|
|
3455
|
+
var warning_1 = warning;
|
|
3455
3456
|
|
|
3456
3457
|
function Reference(_ref) {
|
|
3457
3458
|
var children = _ref.children,
|
|
@@ -3476,7 +3477,7 @@ function Reference(_ref) {
|
|
|
3476
3477
|
});
|
|
3477
3478
|
}
|
|
3478
3479
|
|
|
3479
|
-
function _objectWithoutPropertiesLoose$
|
|
3480
|
+
function _objectWithoutPropertiesLoose$3(r, e) {
|
|
3480
3481
|
if (null == r) return {};
|
|
3481
3482
|
var t = {};
|
|
3482
3483
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
@@ -3915,7 +3916,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
3915
3916
|
_this$props.onExiting;
|
|
3916
3917
|
_this$props.onExited;
|
|
3917
3918
|
_this$props.nodeRef;
|
|
3918
|
-
var childProps = _objectWithoutPropertiesLoose$
|
|
3919
|
+
var childProps = _objectWithoutPropertiesLoose$3(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
3919
3920
|
|
|
3920
3921
|
return (
|
|
3921
3922
|
/*#__PURE__*/
|
|
@@ -4194,8 +4195,8 @@ function _defineProperty$5(obj, key, value) {
|
|
|
4194
4195
|
return obj;
|
|
4195
4196
|
}
|
|
4196
4197
|
|
|
4197
|
-
function _extends$
|
|
4198
|
-
_extends$
|
|
4198
|
+
function _extends$3() {
|
|
4199
|
+
_extends$3 = Object.assign || function (target) {
|
|
4199
4200
|
for (var i = 1; i < arguments.length; i++) {
|
|
4200
4201
|
var source = arguments[i];
|
|
4201
4202
|
|
|
@@ -4209,10 +4210,10 @@ function _extends$6() {
|
|
|
4209
4210
|
return target;
|
|
4210
4211
|
};
|
|
4211
4212
|
|
|
4212
|
-
return _extends$
|
|
4213
|
+
return _extends$3.apply(this, arguments);
|
|
4213
4214
|
}
|
|
4214
4215
|
|
|
4215
|
-
function _objectWithoutPropertiesLoose$
|
|
4216
|
+
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
4216
4217
|
if (source == null) return {};
|
|
4217
4218
|
var target = {};
|
|
4218
4219
|
var sourceKeys = Object.keys(source);
|
|
@@ -4230,7 +4231,7 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
|
4230
4231
|
function _objectWithoutProperties(source, excluded) {
|
|
4231
4232
|
if (source == null) return {};
|
|
4232
4233
|
|
|
4233
|
-
var target = _objectWithoutPropertiesLoose$
|
|
4234
|
+
var target = _objectWithoutPropertiesLoose$2(source, excluded);
|
|
4234
4235
|
|
|
4235
4236
|
var key, i;
|
|
4236
4237
|
|
|
@@ -4563,7 +4564,7 @@ const Row = props => {
|
|
|
4563
4564
|
colClasses.push(isXs ? `row-cols-${colSize}` : `row-cols-${colWidth}-${colSize}`);
|
|
4564
4565
|
});
|
|
4565
4566
|
const classes = mapToCssModules(classnames(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
|
|
4566
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4567
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
4567
4568
|
className: classes
|
|
4568
4569
|
}));
|
|
4569
4570
|
};
|
|
@@ -4657,7 +4658,7 @@ const Col = props => {
|
|
|
4657
4658
|
}
|
|
4658
4659
|
|
|
4659
4660
|
const classes = mapToCssModules(classnames(className, colClasses), cssModule);
|
|
4660
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4661
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, modifiedAttributes, {
|
|
4661
4662
|
className: classes
|
|
4662
4663
|
}));
|
|
4663
4664
|
};
|
|
@@ -4732,7 +4733,7 @@ const defaultProps$19 = {
|
|
|
4732
4733
|
tag: 'a'
|
|
4733
4734
|
};
|
|
4734
4735
|
|
|
4735
|
-
class NavLink
|
|
4736
|
+
class NavLink extends React__default["default"].Component {
|
|
4736
4737
|
constructor(props) {
|
|
4737
4738
|
super(props);
|
|
4738
4739
|
this.onClick = this.onClick.bind(this);
|
|
@@ -4768,7 +4769,7 @@ class NavLink$1 extends React__default["default"].Component {
|
|
|
4768
4769
|
disabled: attributes.disabled,
|
|
4769
4770
|
active: active
|
|
4770
4771
|
}), cssModule);
|
|
4771
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4772
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
4772
4773
|
ref: innerRef,
|
|
4773
4774
|
onClick: this.onClick,
|
|
4774
4775
|
className: classes
|
|
@@ -4777,8 +4778,8 @@ class NavLink$1 extends React__default["default"].Component {
|
|
|
4777
4778
|
|
|
4778
4779
|
}
|
|
4779
4780
|
|
|
4780
|
-
NavLink
|
|
4781
|
-
NavLink
|
|
4781
|
+
NavLink.propTypes = propTypes$1b;
|
|
4782
|
+
NavLink.defaultProps = defaultProps$19;
|
|
4782
4783
|
({
|
|
4783
4784
|
tag: tagPropType,
|
|
4784
4785
|
listTag: tagPropType,
|
|
@@ -4862,7 +4863,7 @@ class Button extends React__default["default"].Component {
|
|
|
4862
4863
|
}
|
|
4863
4864
|
|
|
4864
4865
|
const defaultAriaLabel = close ? 'Close' : null;
|
|
4865
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
4866
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({
|
|
4866
4867
|
type: Tag === 'button' && attributes.onClick ? 'button' : undefined
|
|
4867
4868
|
}, attributes, {
|
|
4868
4869
|
className: classes,
|
|
@@ -4943,7 +4944,7 @@ class ButtonToggle extends React__default["default"].Component {
|
|
|
4943
4944
|
const classes = mapToCssModules(classnames(className, {
|
|
4944
4945
|
focus: this.state.focus
|
|
4945
4946
|
}), this.props.cssModule);
|
|
4946
|
-
return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends$
|
|
4947
|
+
return /*#__PURE__*/React__default["default"].createElement(Button$1, _extends$3({
|
|
4947
4948
|
active: this.state.toggled,
|
|
4948
4949
|
onBlur: this.onBlur,
|
|
4949
4950
|
onFocus: this.onFocus,
|
|
@@ -5226,7 +5227,7 @@ class Dropdown extends React__default["default"].Component {
|
|
|
5226
5227
|
}), cssModule);
|
|
5227
5228
|
return /*#__PURE__*/React__default["default"].createElement(DropdownContext.Provider, {
|
|
5228
5229
|
value: this.getContextValue()
|
|
5229
|
-
}, /*#__PURE__*/React__default["default"].createElement(Manager, null, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5230
|
+
}, /*#__PURE__*/React__default["default"].createElement(Manager, null, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attrs, {
|
|
5230
5231
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: this.containerRef,
|
|
5231
5232
|
onKeyDown: this.handleKeyDown,
|
|
5232
5233
|
className: classes
|
|
@@ -5244,7 +5245,7 @@ const propTypes$15 = {
|
|
|
5244
5245
|
};
|
|
5245
5246
|
|
|
5246
5247
|
const ButtonDropdown = props => {
|
|
5247
|
-
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$
|
|
5248
|
+
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$3({
|
|
5248
5249
|
group: true
|
|
5249
5250
|
}, props));
|
|
5250
5251
|
};
|
|
@@ -5376,7 +5377,7 @@ class DropdownItem extends React__default["default"].Component {
|
|
|
5376
5377
|
}
|
|
5377
5378
|
}
|
|
5378
5379
|
|
|
5379
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5380
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({
|
|
5380
5381
|
type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
|
|
5381
5382
|
}, props, {
|
|
5382
5383
|
tabIndex: tabIndex,
|
|
@@ -5485,7 +5486,7 @@ class DropdownMenu extends React__default["default"].Component {
|
|
|
5485
5486
|
if (onMenuRef) onMenuRef(tagRef);
|
|
5486
5487
|
};
|
|
5487
5488
|
|
|
5488
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5489
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({
|
|
5489
5490
|
tabIndex: "-1",
|
|
5490
5491
|
role: this.getRole(),
|
|
5491
5492
|
ref: handleRef
|
|
@@ -5504,7 +5505,7 @@ class DropdownMenu extends React__default["default"].Component {
|
|
|
5504
5505
|
}
|
|
5505
5506
|
}
|
|
5506
5507
|
|
|
5507
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5508
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({
|
|
5508
5509
|
tabIndex: "-1",
|
|
5509
5510
|
role: this.getRole()
|
|
5510
5511
|
}, attrs, {
|
|
@@ -5603,7 +5604,7 @@ class DropdownToggle extends React__default["default"].Component {
|
|
|
5603
5604
|
}
|
|
5604
5605
|
|
|
5605
5606
|
if (this.context.inNavbar) {
|
|
5606
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5607
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, props, {
|
|
5607
5608
|
className: classes,
|
|
5608
5609
|
onClick: this.onClick,
|
|
5609
5610
|
"aria-expanded": this.context.isOpen,
|
|
@@ -5616,7 +5617,7 @@ class DropdownToggle extends React__default["default"].Component {
|
|
|
5616
5617
|
innerRef: innerRef
|
|
5617
5618
|
}, ({
|
|
5618
5619
|
ref
|
|
5619
|
-
}) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5620
|
+
}) => /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, props, {
|
|
5620
5621
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: ref,
|
|
5621
5622
|
className: classes,
|
|
5622
5623
|
onClick: this.onClick,
|
|
@@ -5673,7 +5674,7 @@ function Fade(props) {
|
|
|
5673
5674
|
return /*#__PURE__*/React__default["default"].createElement(Transition$1, transitionProps, status => {
|
|
5674
5675
|
const isActive = status === 'entered';
|
|
5675
5676
|
const classes = mapToCssModules(classnames(className, baseClass, isActive && baseClassActive), cssModule);
|
|
5676
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5677
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({
|
|
5677
5678
|
className: classes
|
|
5678
5679
|
}, childProps, {
|
|
5679
5680
|
ref: innerRef
|
|
@@ -5835,7 +5836,7 @@ class Collapse extends React$3.Component {
|
|
|
5835
5836
|
} = this.state;
|
|
5836
5837
|
const transitionProps = pick(otherProps, TransitionPropTypeKeys);
|
|
5837
5838
|
const childProps = omit(otherProps, TransitionPropTypeKeys);
|
|
5838
|
-
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$
|
|
5839
|
+
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$3({}, transitionProps, {
|
|
5839
5840
|
in: isOpen,
|
|
5840
5841
|
onEntering: this.onEntering,
|
|
5841
5842
|
onEntered: this.onEntered,
|
|
@@ -5848,7 +5849,7 @@ class Collapse extends React$3.Component {
|
|
|
5848
5849
|
const style = dimension === null ? null : {
|
|
5849
5850
|
[horizontal ? 'width' : 'height']: dimension
|
|
5850
5851
|
};
|
|
5851
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
5852
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, childProps, {
|
|
5852
5853
|
style: _objectSpread2(_objectSpread2({}, childProps.style), style),
|
|
5853
5854
|
className: classes,
|
|
5854
5855
|
ref: this.props.innerRef
|
|
@@ -6002,7 +6003,7 @@ class CarouselItem extends React__default["default"].Component {
|
|
|
6002
6003
|
} = _this$props,
|
|
6003
6004
|
transitionProps = _objectWithoutProperties(_this$props, _excluded$E);
|
|
6004
6005
|
|
|
6005
|
-
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$
|
|
6006
|
+
return /*#__PURE__*/React__default["default"].createElement(Transition$1, _extends$3({}, transitionProps, {
|
|
6006
6007
|
enter: slide,
|
|
6007
6008
|
exit: slide,
|
|
6008
6009
|
in: isIn,
|
|
@@ -6531,7 +6532,7 @@ class UncontrolledCarousel extends React$3.Component {
|
|
|
6531
6532
|
captionHeader: item.header || item.caption
|
|
6532
6533
|
}));
|
|
6533
6534
|
});
|
|
6534
|
-
return /*#__PURE__*/React__default["default"].createElement(Carousel$1, _extends$
|
|
6535
|
+
return /*#__PURE__*/React__default["default"].createElement(Carousel$1, _extends$3({
|
|
6535
6536
|
activeIndex: activeIndex,
|
|
6536
6537
|
next: this.next,
|
|
6537
6538
|
previous: this.previous,
|
|
@@ -6717,7 +6718,7 @@ class PopperContent extends React__default["default"].Component {
|
|
|
6717
6718
|
timeout: fade ? transition.timeout : 0
|
|
6718
6719
|
});
|
|
6719
6720
|
|
|
6720
|
-
return /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
6721
|
+
return /*#__PURE__*/React__default["default"].createElement(Fade, _extends$3({}, popperTransition, attrs, {
|
|
6721
6722
|
in: isOpen,
|
|
6722
6723
|
onExited: this.onClosed,
|
|
6723
6724
|
tag: tag
|
|
@@ -7129,7 +7130,7 @@ class TooltipPopoverWrapper extends React__default["default"].Component {
|
|
|
7129
7130
|
flip: flip
|
|
7130
7131
|
}, ({
|
|
7131
7132
|
update
|
|
7132
|
-
}) => /*#__PURE__*/React__default["default"].createElement("div", _extends$
|
|
7133
|
+
}) => /*#__PURE__*/React__default["default"].createElement("div", _extends$3({}, attributes, {
|
|
7133
7134
|
ref: this.getRef,
|
|
7134
7135
|
className: classes,
|
|
7135
7136
|
role: "tooltip",
|
|
@@ -7157,7 +7158,7 @@ const defaultProps$D = {
|
|
|
7157
7158
|
const Popover = props => {
|
|
7158
7159
|
const popperClasses = classnames('popover', 'show', props.popperClassName);
|
|
7159
7160
|
const classes = classnames('popover-inner', props.innerClassName);
|
|
7160
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$
|
|
7161
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$3({}, props, {
|
|
7161
7162
|
arrowClassName: "popover-arrow",
|
|
7162
7163
|
popperClassName: popperClasses,
|
|
7163
7164
|
innerClassName: classes
|
|
@@ -7185,7 +7186,7 @@ class UncontrolledPopover extends React$3.Component {
|
|
|
7185
7186
|
}
|
|
7186
7187
|
|
|
7187
7188
|
render() {
|
|
7188
|
-
return /*#__PURE__*/React__default["default"].createElement(Popover$1, _extends$
|
|
7189
|
+
return /*#__PURE__*/React__default["default"].createElement(Popover$1, _extends$3({
|
|
7189
7190
|
isOpen: this.state.isOpen,
|
|
7190
7191
|
toggle: this.toggle
|
|
7191
7192
|
}, omit(this.props, omitKeys$4)));
|
|
@@ -7624,7 +7625,7 @@ class Modal extends React__default["default"].Component {
|
|
|
7624
7625
|
renderModalDialog() {
|
|
7625
7626
|
const attributes = omit(this.props, propsToOmit$1);
|
|
7626
7627
|
const dialogBaseClass = 'modal-dialog';
|
|
7627
|
-
return /*#__PURE__*/React__default["default"].createElement("div", _extends$
|
|
7628
|
+
return /*#__PURE__*/React__default["default"].createElement("div", _extends$3({}, attributes, {
|
|
7628
7629
|
className: mapToCssModules(classnames(dialogBaseClass, this.props.className, {
|
|
7629
7630
|
[`modal-${this.props.size}`]: this.props.size,
|
|
7630
7631
|
[`${dialogBaseClass}-centered`]: this.props.centered,
|
|
@@ -7685,7 +7686,7 @@ class Modal extends React__default["default"].Component {
|
|
|
7685
7686
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
7686
7687
|
});
|
|
7687
7688
|
|
|
7688
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
7689
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$3({}, backdropTransition, {
|
|
7689
7690
|
in: isOpen && !!backdrop,
|
|
7690
7691
|
cssModule: cssModule,
|
|
7691
7692
|
className: mapToCssModules(classnames('modal-backdrop', backdropClassName), cssModule)
|
|
@@ -7696,7 +7697,7 @@ class Modal extends React__default["default"].Component {
|
|
|
7696
7697
|
node: this._element
|
|
7697
7698
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
7698
7699
|
className: mapToCssModules(wrapClassName)
|
|
7699
|
-
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
7700
|
+
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$3({}, modalAttributes, modalTransition, {
|
|
7700
7701
|
in: isOpen,
|
|
7701
7702
|
onEntered: this.onOpened,
|
|
7702
7703
|
onExited: this.onClosed,
|
|
@@ -7752,7 +7753,7 @@ const defaultProps$v = {
|
|
|
7752
7753
|
const Tooltip = props => {
|
|
7753
7754
|
const popperClasses = classnames('tooltip', 'show', props.popperClassName);
|
|
7754
7755
|
const classes = classnames('tooltip-inner', props.innerClassName);
|
|
7755
|
-
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$
|
|
7756
|
+
return /*#__PURE__*/React__default["default"].createElement(TooltipPopoverWrapper$1, _extends$3({}, props, {
|
|
7756
7757
|
arrowClassName: "tooltip-arrow",
|
|
7757
7758
|
popperClassName: popperClasses,
|
|
7758
7759
|
innerClassName: classes
|
|
@@ -7798,7 +7799,7 @@ const defaultProps$s = {
|
|
|
7798
7799
|
tag: 'form'
|
|
7799
7800
|
};
|
|
7800
7801
|
|
|
7801
|
-
class Form
|
|
7802
|
+
class Form extends React$3.Component {
|
|
7802
7803
|
constructor(props) {
|
|
7803
7804
|
super(props);
|
|
7804
7805
|
this.getRef = this.getRef.bind(this);
|
|
@@ -7831,7 +7832,7 @@ class Form$1 extends React$3.Component {
|
|
|
7831
7832
|
attributes = _objectWithoutProperties(_this$props, _excluded$q);
|
|
7832
7833
|
|
|
7833
7834
|
const classes = mapToCssModules(classnames(className, inline ? 'form-inline' : false), cssModule);
|
|
7834
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
7835
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
7835
7836
|
ref: innerRef,
|
|
7836
7837
|
className: classes
|
|
7837
7838
|
}));
|
|
@@ -7839,8 +7840,8 @@ class Form$1 extends React$3.Component {
|
|
|
7839
7840
|
|
|
7840
7841
|
}
|
|
7841
7842
|
|
|
7842
|
-
Form
|
|
7843
|
-
Form
|
|
7843
|
+
Form.propTypes = propTypes$t;
|
|
7844
|
+
Form.defaultProps = defaultProps$s;
|
|
7844
7845
|
|
|
7845
7846
|
const _excluded$p = ["className", "cssModule", "valid", "tooltip", "tag"];
|
|
7846
7847
|
const propTypes$s = {
|
|
@@ -7868,7 +7869,7 @@ const FormFeedback = props => {
|
|
|
7868
7869
|
|
|
7869
7870
|
const validMode = tooltip ? 'tooltip' : 'feedback';
|
|
7870
7871
|
const classes = mapToCssModules(classnames(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
|
|
7871
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
7872
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
7872
7873
|
className: classes
|
|
7873
7874
|
}));
|
|
7874
7875
|
};
|
|
@@ -7993,7 +7994,7 @@ class Input extends React__default["default"].Component {
|
|
|
7993
7994
|
delete attributes.children;
|
|
7994
7995
|
}
|
|
7995
7996
|
|
|
7996
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
7997
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
7997
7998
|
ref: innerRef,
|
|
7998
7999
|
className: classes,
|
|
7999
8000
|
"aria-invalid": invalid
|
|
@@ -8097,7 +8098,7 @@ const Label = props => {
|
|
|
8097
8098
|
}
|
|
8098
8099
|
});
|
|
8099
8100
|
const classes = mapToCssModules(classnames(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);
|
|
8100
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8101
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({
|
|
8101
8102
|
htmlFor: htmlFor
|
|
8102
8103
|
}, attributes, {
|
|
8103
8104
|
className: classes
|
|
@@ -8489,7 +8490,7 @@ class Offcanvas extends React__default["default"].Component {
|
|
|
8489
8490
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
8490
8491
|
});
|
|
8491
8492
|
|
|
8492
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
8493
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default["default"].createElement(Fade, _extends$3({}, backdropTransition, {
|
|
8493
8494
|
in: isOpen && !!backdrop,
|
|
8494
8495
|
innerRef: c => {
|
|
8495
8496
|
this._backdrop = c;
|
|
@@ -8506,7 +8507,7 @@ class Offcanvas extends React__default["default"].Component {
|
|
|
8506
8507
|
const attributes = omit(this.props, propsToOmit);
|
|
8507
8508
|
return /*#__PURE__*/React__default["default"].createElement(Portal$1, {
|
|
8508
8509
|
node: this._element
|
|
8509
|
-
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$
|
|
8510
|
+
}, /*#__PURE__*/React__default["default"].createElement(Fade, _extends$3({}, attributes, offcanvasAttributes, offcanvasTransition, {
|
|
8510
8511
|
in: isOpen,
|
|
8511
8512
|
onEntered: this.onOpened,
|
|
8512
8513
|
onExited: this.onClosed,
|
|
@@ -8630,7 +8631,7 @@ class TabContent extends React$3.Component {
|
|
|
8630
8631
|
value: {
|
|
8631
8632
|
activeTabId: this.state.activeTab
|
|
8632
8633
|
}
|
|
8633
|
-
}, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8634
|
+
}, /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
8634
8635
|
className: classes
|
|
8635
8636
|
})));
|
|
8636
8637
|
}
|
|
@@ -8744,7 +8745,7 @@ const List = React$3.forwardRef((props, ref) => {
|
|
|
8744
8745
|
attributes = _objectWithoutProperties(props, _excluded$4);
|
|
8745
8746
|
|
|
8746
8747
|
const classes = mapToCssModules(classnames(className, type ? `list-${type}` : false), cssModule);
|
|
8747
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8748
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
8748
8749
|
className: classes,
|
|
8749
8750
|
ref: ref
|
|
8750
8751
|
}));
|
|
@@ -8771,7 +8772,7 @@ const ListInlineItem = React$3.forwardRef((props, ref) => {
|
|
|
8771
8772
|
attributes = _objectWithoutProperties(props, _excluded$3);
|
|
8772
8773
|
|
|
8773
8774
|
const classes = mapToCssModules(classnames(className, 'list-inline-item'), cssModule);
|
|
8774
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8775
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({}, attributes, {
|
|
8775
8776
|
className: classes,
|
|
8776
8777
|
ref: ref
|
|
8777
8778
|
}));
|
|
@@ -8797,7 +8798,7 @@ class UncontrolledButtonDropdown extends React$3.Component {
|
|
|
8797
8798
|
}
|
|
8798
8799
|
|
|
8799
8800
|
render() {
|
|
8800
|
-
return /*#__PURE__*/React__default["default"].createElement(ButtonDropdown$1, _extends$
|
|
8801
|
+
return /*#__PURE__*/React__default["default"].createElement(ButtonDropdown$1, _extends$3({
|
|
8801
8802
|
isOpen: this.state.isOpen,
|
|
8802
8803
|
toggle: this.toggle
|
|
8803
8804
|
}, omit(this.props, omitKeys$3)));
|
|
@@ -8853,7 +8854,7 @@ class UncontrolledCollapse extends React$3.Component {
|
|
|
8853
8854
|
}
|
|
8854
8855
|
|
|
8855
8856
|
render() {
|
|
8856
|
-
return /*#__PURE__*/React__default["default"].createElement(Collapse$1, _extends$
|
|
8857
|
+
return /*#__PURE__*/React__default["default"].createElement(Collapse$1, _extends$3({
|
|
8857
8858
|
isOpen: this.state.isOpen
|
|
8858
8859
|
}, omit(this.props, omitKeys$2)));
|
|
8859
8860
|
}
|
|
@@ -8885,7 +8886,7 @@ class UncontrolledDropdown extends React$3.Component {
|
|
|
8885
8886
|
}
|
|
8886
8887
|
|
|
8887
8888
|
render() {
|
|
8888
|
-
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$
|
|
8889
|
+
return /*#__PURE__*/React__default["default"].createElement(Dropdown$1, _extends$3({
|
|
8889
8890
|
isOpen: this.state.isOpen,
|
|
8890
8891
|
toggle: this.toggle
|
|
8891
8892
|
}, omit(this.props, omitKeys$1)));
|
|
@@ -8914,7 +8915,7 @@ class UncontrolledTooltip extends React$3.Component {
|
|
|
8914
8915
|
}
|
|
8915
8916
|
|
|
8916
8917
|
render() {
|
|
8917
|
-
return /*#__PURE__*/React__default["default"].createElement(Tooltip$1, _extends$
|
|
8918
|
+
return /*#__PURE__*/React__default["default"].createElement(Tooltip$1, _extends$3({
|
|
8918
8919
|
isOpen: this.state.isOpen,
|
|
8919
8920
|
toggle: this.toggle
|
|
8920
8921
|
}, omit(this.props, omitKeys)));
|
|
@@ -8925,7 +8926,7 @@ UncontrolledTooltip.propTypes = _objectSpread2({
|
|
|
8925
8926
|
defaultOpen: PropTypes.bool
|
|
8926
8927
|
}, Tooltip$1.propTypes);
|
|
8927
8928
|
|
|
8928
|
-
const _excluded$2
|
|
8929
|
+
const _excluded$2 = ["className", "cssModule", "type", "size", "color", "children", "tag"];
|
|
8929
8930
|
const propTypes$2 = {
|
|
8930
8931
|
tag: tagPropType,
|
|
8931
8932
|
type: PropTypes.string,
|
|
@@ -8951,10 +8952,10 @@ const Spinner = props => {
|
|
|
8951
8952
|
children,
|
|
8952
8953
|
tag: Tag
|
|
8953
8954
|
} = props,
|
|
8954
|
-
attributes = _objectWithoutProperties(props, _excluded$2
|
|
8955
|
+
attributes = _objectWithoutProperties(props, _excluded$2);
|
|
8955
8956
|
|
|
8956
8957
|
const classes = mapToCssModules(classnames(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
|
|
8957
|
-
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$
|
|
8958
|
+
return /*#__PURE__*/React__default["default"].createElement(Tag, _extends$3({
|
|
8958
8959
|
role: "status"
|
|
8959
8960
|
}, attributes, {
|
|
8960
8961
|
className: classes
|
|
@@ -19136,8 +19137,8 @@ function withReactContent(ParentSwal) {
|
|
|
19136
19137
|
|
|
19137
19138
|
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=(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(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;}
|
|
19138
19139
|
|
|
19139
|
-
function _extends$
|
|
19140
|
-
_extends$
|
|
19140
|
+
function _extends$2() {
|
|
19141
|
+
_extends$2 = Object.assign || function (target) {
|
|
19141
19142
|
for (var i = 1; i < arguments.length; i++) {
|
|
19142
19143
|
var source = arguments[i];
|
|
19143
19144
|
|
|
@@ -19151,7 +19152,7 @@ function _extends$5() {
|
|
|
19151
19152
|
return target;
|
|
19152
19153
|
};
|
|
19153
19154
|
|
|
19154
|
-
return _extends$
|
|
19155
|
+
return _extends$2.apply(this, arguments);
|
|
19155
19156
|
}
|
|
19156
19157
|
|
|
19157
19158
|
var isFunction$2 = function isFunction(valOrFunction) {
|
|
@@ -19210,7 +19211,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
19210
19211
|
var reducer = function reducer(state, action) {
|
|
19211
19212
|
switch (action.type) {
|
|
19212
19213
|
case ActionType.ADD_TOAST:
|
|
19213
|
-
return _extends$
|
|
19214
|
+
return _extends$2({}, state, {
|
|
19214
19215
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
19215
19216
|
});
|
|
19216
19217
|
|
|
@@ -19220,9 +19221,9 @@ var reducer = function reducer(state, action) {
|
|
|
19220
19221
|
clearFromRemoveQueue(action.toast.id);
|
|
19221
19222
|
}
|
|
19222
19223
|
|
|
19223
|
-
return _extends$
|
|
19224
|
+
return _extends$2({}, state, {
|
|
19224
19225
|
toasts: state.toasts.map(function (t) {
|
|
19225
|
-
return t.id === action.toast.id ? _extends$
|
|
19226
|
+
return t.id === action.toast.id ? _extends$2({}, t, action.toast) : t;
|
|
19226
19227
|
})
|
|
19227
19228
|
});
|
|
19228
19229
|
|
|
@@ -19249,9 +19250,9 @@ var reducer = function reducer(state, action) {
|
|
|
19249
19250
|
});
|
|
19250
19251
|
}
|
|
19251
19252
|
|
|
19252
|
-
return _extends$
|
|
19253
|
+
return _extends$2({}, state, {
|
|
19253
19254
|
toasts: state.toasts.map(function (t) {
|
|
19254
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
19255
|
+
return t.id === toastId || toastId === undefined ? _extends$2({}, t, {
|
|
19255
19256
|
visible: false
|
|
19256
19257
|
}) : t;
|
|
19257
19258
|
})
|
|
@@ -19259,28 +19260,28 @@ var reducer = function reducer(state, action) {
|
|
|
19259
19260
|
|
|
19260
19261
|
case ActionType.REMOVE_TOAST:
|
|
19261
19262
|
if (action.toastId === undefined) {
|
|
19262
|
-
return _extends$
|
|
19263
|
+
return _extends$2({}, state, {
|
|
19263
19264
|
toasts: []
|
|
19264
19265
|
});
|
|
19265
19266
|
}
|
|
19266
19267
|
|
|
19267
|
-
return _extends$
|
|
19268
|
+
return _extends$2({}, state, {
|
|
19268
19269
|
toasts: state.toasts.filter(function (t) {
|
|
19269
19270
|
return t.id !== action.toastId;
|
|
19270
19271
|
})
|
|
19271
19272
|
});
|
|
19272
19273
|
|
|
19273
19274
|
case ActionType.START_PAUSE:
|
|
19274
|
-
return _extends$
|
|
19275
|
+
return _extends$2({}, state, {
|
|
19275
19276
|
pausedAt: action.time
|
|
19276
19277
|
});
|
|
19277
19278
|
|
|
19278
19279
|
case ActionType.END_PAUSE:
|
|
19279
19280
|
var diff = action.time - (state.pausedAt || 0);
|
|
19280
|
-
return _extends$
|
|
19281
|
+
return _extends$2({}, state, {
|
|
19281
19282
|
pausedAt: undefined,
|
|
19282
19283
|
toasts: state.toasts.map(function (t) {
|
|
19283
|
-
return _extends$
|
|
19284
|
+
return _extends$2({}, t, {
|
|
19284
19285
|
pauseDuration: t.pauseDuration + diff
|
|
19285
19286
|
});
|
|
19286
19287
|
})
|
|
@@ -19304,7 +19305,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
19304
19305
|
type = 'blank';
|
|
19305
19306
|
}
|
|
19306
19307
|
|
|
19307
|
-
return _extends$
|
|
19308
|
+
return _extends$2({
|
|
19308
19309
|
createdAt: Date.now(),
|
|
19309
19310
|
visible: true,
|
|
19310
19311
|
type: type,
|
|
@@ -19354,14 +19355,14 @@ toast.remove = function (toastId) {
|
|
|
19354
19355
|
};
|
|
19355
19356
|
|
|
19356
19357
|
toast.promise = function (promise, msgs, opts) {
|
|
19357
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
19358
|
+
var id = toast.loading(msgs.loading, _extends$2({}, opts, opts == null ? void 0 : opts.loading));
|
|
19358
19359
|
promise.then(function (p) {
|
|
19359
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
19360
|
+
toast.success(resolveValue(msgs.success, p), _extends$2({
|
|
19360
19361
|
id: id
|
|
19361
19362
|
}, opts, opts == null ? void 0 : opts.success));
|
|
19362
19363
|
return p;
|
|
19363
19364
|
})["catch"](function (e) {
|
|
19364
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
19365
|
+
toast.error(resolveValue(msgs.error, e), _extends$2({
|
|
19365
19366
|
id: id
|
|
19366
19367
|
}, opts, opts == null ? void 0 : opts.error));
|
|
19367
19368
|
});
|
|
@@ -21539,11 +21540,11 @@ var React$1 = _interopRequireWildcard$1(React__default["default"]);
|
|
|
21539
21540
|
var _reactDraggable = cjs.exports;
|
|
21540
21541
|
var _utils = utils;
|
|
21541
21542
|
var _propTypes$1 = propTypes;
|
|
21542
|
-
var _excluded$
|
|
21543
|
+
var _excluded$1 = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
|
|
21543
21544
|
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); }
|
|
21544
21545
|
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; }
|
|
21545
|
-
function _extends$
|
|
21546
|
-
function _objectWithoutPropertiesLoose$
|
|
21546
|
+
function _extends$1() { _extends$1 = 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$1.apply(this, arguments); }
|
|
21547
|
+
function _objectWithoutPropertiesLoose$1(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; }
|
|
21547
21548
|
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; }
|
|
21548
21549
|
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; }
|
|
21549
21550
|
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; }
|
|
@@ -21752,7 +21753,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
21752
21753
|
_this$props2.onResizeStart;
|
|
21753
21754
|
var resizeHandles = _this$props2.resizeHandles;
|
|
21754
21755
|
_this$props2.transformScale;
|
|
21755
|
-
var p = _objectWithoutPropertiesLoose$
|
|
21756
|
+
var p = _objectWithoutPropertiesLoose$1(_this$props2, _excluded$1);
|
|
21756
21757
|
|
|
21757
21758
|
// What we're doing here is getting the child of this element, and cloning it with this element's props.
|
|
21758
21759
|
// We are then defining its children as:
|
|
@@ -21764,7 +21765,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
21764
21765
|
var _this3$handleRefs$han;
|
|
21765
21766
|
// Create a ref to the handle so that `<DraggableCore>` doesn't have to use ReactDOM.findDOMNode().
|
|
21766
21767
|
var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /*#__PURE__*/React$1.createRef();
|
|
21767
|
-
return /*#__PURE__*/React$1.createElement(_reactDraggable.DraggableCore, _extends$
|
|
21768
|
+
return /*#__PURE__*/React$1.createElement(_reactDraggable.DraggableCore, _extends$1({}, draggableOpts, {
|
|
21768
21769
|
nodeRef: ref,
|
|
21769
21770
|
key: "resizableHandle-" + handleAxis,
|
|
21770
21771
|
onStop: _this3.resizeHandler('onResizeStop', handleAxis),
|
|
@@ -21796,17 +21797,17 @@ var React = _interopRequireWildcard(React__default["default"]);
|
|
|
21796
21797
|
var _propTypes = _interopRequireDefault(propTypes$1.exports);
|
|
21797
21798
|
var _Resizable = _interopRequireDefault(Resizable$2);
|
|
21798
21799
|
var _propTypes2 = propTypes;
|
|
21799
|
-
var _excluded
|
|
21800
|
+
var _excluded = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
|
|
21800
21801
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21801
21802
|
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); }
|
|
21802
21803
|
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; }
|
|
21803
|
-
function _extends
|
|
21804
|
+
function _extends() { _extends = 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.apply(this, arguments); }
|
|
21804
21805
|
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; }
|
|
21805
21806
|
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; }
|
|
21806
21807
|
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; }
|
|
21807
21808
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
21808
21809
|
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); }
|
|
21809
|
-
function _objectWithoutPropertiesLoose
|
|
21810
|
+
function _objectWithoutPropertiesLoose(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; }
|
|
21810
21811
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
21811
21812
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21812
21813
|
var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
@@ -21869,7 +21870,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
21869
21870
|
var resizeHandles = _this$props.resizeHandles,
|
|
21870
21871
|
style = _this$props.style,
|
|
21871
21872
|
transformScale = _this$props.transformScale,
|
|
21872
|
-
props = _objectWithoutPropertiesLoose
|
|
21873
|
+
props = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
21873
21874
|
return /*#__PURE__*/React.createElement(_Resizable.default, {
|
|
21874
21875
|
axis: axis,
|
|
21875
21876
|
draggableOpts: draggableOpts,
|
|
@@ -21885,7 +21886,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
21885
21886
|
resizeHandles: resizeHandles,
|
|
21886
21887
|
transformScale: transformScale,
|
|
21887
21888
|
width: this.state.width
|
|
21888
|
-
}, /*#__PURE__*/React.createElement("div", _extends
|
|
21889
|
+
}, /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
21889
21890
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
21890
21891
|
width: this.state.width + 'px',
|
|
21891
21892
|
height: this.state.height + 'px'
|
|
@@ -27178,1303 +27179,8 @@ const TableEdit = React$3.forwardRef((props, ref) => {
|
|
|
27178
27179
|
}) }) : 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: [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 })] }));
|
|
27179
27180
|
});
|
|
27180
27181
|
|
|
27181
|
-
/**
|
|
27182
|
-
* @remix-run/router v1.21.0
|
|
27183
|
-
*
|
|
27184
|
-
* Copyright (c) Remix Software Inc.
|
|
27185
|
-
*
|
|
27186
|
-
* This source code is licensed under the MIT license found in the
|
|
27187
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
27188
|
-
*
|
|
27189
|
-
* @license MIT
|
|
27190
|
-
*/
|
|
27191
|
-
function _extends$2() {
|
|
27192
|
-
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
27193
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
27194
|
-
var source = arguments[i];
|
|
27195
|
-
for (var key in source) {
|
|
27196
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
27197
|
-
target[key] = source[key];
|
|
27198
|
-
}
|
|
27199
|
-
}
|
|
27200
|
-
}
|
|
27201
|
-
return target;
|
|
27202
|
-
};
|
|
27203
|
-
return _extends$2.apply(this, arguments);
|
|
27204
|
-
}
|
|
27205
|
-
|
|
27206
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
27207
|
-
//#region Types and Constants
|
|
27208
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
27209
|
-
/**
|
|
27210
|
-
* Actions represent the type of change to a location value.
|
|
27211
|
-
*/
|
|
27212
|
-
var Action;
|
|
27213
|
-
(function (Action) {
|
|
27214
|
-
/**
|
|
27215
|
-
* A POP indicates a change to an arbitrary index in the history stack, such
|
|
27216
|
-
* as a back or forward navigation. It does not describe the direction of the
|
|
27217
|
-
* navigation, only that the current index changed.
|
|
27218
|
-
*
|
|
27219
|
-
* Note: This is the default action for newly created history objects.
|
|
27220
|
-
*/
|
|
27221
|
-
Action["Pop"] = "POP";
|
|
27222
|
-
/**
|
|
27223
|
-
* A PUSH indicates a new entry being added to the history stack, such as when
|
|
27224
|
-
* a link is clicked and a new page loads. When this happens, all subsequent
|
|
27225
|
-
* entries in the stack are lost.
|
|
27226
|
-
*/
|
|
27227
|
-
Action["Push"] = "PUSH";
|
|
27228
|
-
/**
|
|
27229
|
-
* A REPLACE indicates the entry at the current index in the history stack
|
|
27230
|
-
* being replaced by a new one.
|
|
27231
|
-
*/
|
|
27232
|
-
Action["Replace"] = "REPLACE";
|
|
27233
|
-
})(Action || (Action = {}));
|
|
27234
|
-
function invariant(value, message) {
|
|
27235
|
-
if (value === false || value === null || typeof value === "undefined") {
|
|
27236
|
-
throw new Error(message);
|
|
27237
|
-
}
|
|
27238
|
-
}
|
|
27239
|
-
function warning(cond, message) {
|
|
27240
|
-
if (!cond) {
|
|
27241
|
-
// eslint-disable-next-line no-console
|
|
27242
|
-
if (typeof console !== "undefined") console.warn(message);
|
|
27243
|
-
try {
|
|
27244
|
-
// Welcome to debugging history!
|
|
27245
|
-
//
|
|
27246
|
-
// This error is thrown as a convenience, so you can more easily
|
|
27247
|
-
// find the source for a warning that appears in the console by
|
|
27248
|
-
// enabling "pause on exceptions" in your JavaScript debugger.
|
|
27249
|
-
throw new Error(message);
|
|
27250
|
-
// eslint-disable-next-line no-empty
|
|
27251
|
-
} catch (e) {}
|
|
27252
|
-
}
|
|
27253
|
-
}
|
|
27254
|
-
/**
|
|
27255
|
-
* Creates a string URL path from the given pathname, search, and hash components.
|
|
27256
|
-
*/
|
|
27257
|
-
function createPath(_ref) {
|
|
27258
|
-
let {
|
|
27259
|
-
pathname = "/",
|
|
27260
|
-
search = "",
|
|
27261
|
-
hash = ""
|
|
27262
|
-
} = _ref;
|
|
27263
|
-
if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
|
|
27264
|
-
if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
27265
|
-
return pathname;
|
|
27266
|
-
}
|
|
27267
|
-
/**
|
|
27268
|
-
* Parses a string URL path into its separate pathname, search, and hash components.
|
|
27269
|
-
*/
|
|
27270
|
-
function parsePath(path) {
|
|
27271
|
-
let parsedPath = {};
|
|
27272
|
-
if (path) {
|
|
27273
|
-
let hashIndex = path.indexOf("#");
|
|
27274
|
-
if (hashIndex >= 0) {
|
|
27275
|
-
parsedPath.hash = path.substr(hashIndex);
|
|
27276
|
-
path = path.substr(0, hashIndex);
|
|
27277
|
-
}
|
|
27278
|
-
let searchIndex = path.indexOf("?");
|
|
27279
|
-
if (searchIndex >= 0) {
|
|
27280
|
-
parsedPath.search = path.substr(searchIndex);
|
|
27281
|
-
path = path.substr(0, searchIndex);
|
|
27282
|
-
}
|
|
27283
|
-
if (path) {
|
|
27284
|
-
parsedPath.pathname = path;
|
|
27285
|
-
}
|
|
27286
|
-
}
|
|
27287
|
-
return parsedPath;
|
|
27288
|
-
}
|
|
27289
|
-
//#endregion
|
|
27290
|
-
|
|
27291
|
-
var ResultType;
|
|
27292
|
-
(function (ResultType) {
|
|
27293
|
-
ResultType["data"] = "data";
|
|
27294
|
-
ResultType["deferred"] = "deferred";
|
|
27295
|
-
ResultType["redirect"] = "redirect";
|
|
27296
|
-
ResultType["error"] = "error";
|
|
27297
|
-
})(ResultType || (ResultType = {}));
|
|
27298
|
-
/**
|
|
27299
|
-
* Performs pattern matching on a URL pathname and returns information about
|
|
27300
|
-
* the match.
|
|
27301
|
-
*
|
|
27302
|
-
* @see https://reactrouter.com/v6/utils/match-path
|
|
27303
|
-
*/
|
|
27304
|
-
function matchPath(pattern, pathname) {
|
|
27305
|
-
if (typeof pattern === "string") {
|
|
27306
|
-
pattern = {
|
|
27307
|
-
path: pattern,
|
|
27308
|
-
caseSensitive: false,
|
|
27309
|
-
end: true
|
|
27310
|
-
};
|
|
27311
|
-
}
|
|
27312
|
-
let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
|
|
27313
|
-
let match = pathname.match(matcher);
|
|
27314
|
-
if (!match) return null;
|
|
27315
|
-
let matchedPathname = match[0];
|
|
27316
|
-
let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
|
|
27317
|
-
let captureGroups = match.slice(1);
|
|
27318
|
-
let params = compiledParams.reduce((memo, _ref, index) => {
|
|
27319
|
-
let {
|
|
27320
|
-
paramName,
|
|
27321
|
-
isOptional
|
|
27322
|
-
} = _ref;
|
|
27323
|
-
// We need to compute the pathnameBase here using the raw splat value
|
|
27324
|
-
// instead of using params["*"] later because it will be decoded then
|
|
27325
|
-
if (paramName === "*") {
|
|
27326
|
-
let splatValue = captureGroups[index] || "";
|
|
27327
|
-
pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
|
|
27328
|
-
}
|
|
27329
|
-
const value = captureGroups[index];
|
|
27330
|
-
if (isOptional && !value) {
|
|
27331
|
-
memo[paramName] = undefined;
|
|
27332
|
-
} else {
|
|
27333
|
-
memo[paramName] = (value || "").replace(/%2F/g, "/");
|
|
27334
|
-
}
|
|
27335
|
-
return memo;
|
|
27336
|
-
}, {});
|
|
27337
|
-
return {
|
|
27338
|
-
params,
|
|
27339
|
-
pathname: matchedPathname,
|
|
27340
|
-
pathnameBase,
|
|
27341
|
-
pattern
|
|
27342
|
-
};
|
|
27343
|
-
}
|
|
27344
|
-
function compilePath(path, caseSensitive, end) {
|
|
27345
|
-
if (caseSensitive === void 0) {
|
|
27346
|
-
caseSensitive = false;
|
|
27347
|
-
}
|
|
27348
|
-
if (end === void 0) {
|
|
27349
|
-
end = true;
|
|
27350
|
-
}
|
|
27351
|
-
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(/\*$/, "/*") + "\"."));
|
|
27352
|
-
let params = [];
|
|
27353
|
-
let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
|
|
27354
|
-
.replace(/^\/*/, "/") // Make sure it has a leading /
|
|
27355
|
-
.replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
|
|
27356
|
-
.replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
|
|
27357
|
-
params.push({
|
|
27358
|
-
paramName,
|
|
27359
|
-
isOptional: isOptional != null
|
|
27360
|
-
});
|
|
27361
|
-
return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
|
|
27362
|
-
});
|
|
27363
|
-
if (path.endsWith("*")) {
|
|
27364
|
-
params.push({
|
|
27365
|
-
paramName: "*"
|
|
27366
|
-
});
|
|
27367
|
-
regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
|
|
27368
|
-
: "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
|
|
27369
|
-
} else if (end) {
|
|
27370
|
-
// When matching to the end, ignore trailing slashes
|
|
27371
|
-
regexpSource += "\\/*$";
|
|
27372
|
-
} else if (path !== "" && path !== "/") {
|
|
27373
|
-
// If our path is non-empty and contains anything beyond an initial slash,
|
|
27374
|
-
// then we have _some_ form of path in our regex, so we should expect to
|
|
27375
|
-
// match only if we find the end of this path segment. Look for an optional
|
|
27376
|
-
// non-captured trailing slash (to match a portion of the URL) or the end
|
|
27377
|
-
// of the path (if we've matched to the end). We used to do this with a
|
|
27378
|
-
// word boundary but that gives false positives on routes like
|
|
27379
|
-
// /user-preferences since `-` counts as a word boundary.
|
|
27380
|
-
regexpSource += "(?:(?=\\/|$))";
|
|
27381
|
-
} else ;
|
|
27382
|
-
let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
|
|
27383
|
-
return [matcher, params];
|
|
27384
|
-
}
|
|
27385
|
-
/**
|
|
27386
|
-
* @private
|
|
27387
|
-
*/
|
|
27388
|
-
function stripBasename(pathname, basename) {
|
|
27389
|
-
if (basename === "/") return pathname;
|
|
27390
|
-
if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
|
|
27391
|
-
return null;
|
|
27392
|
-
}
|
|
27393
|
-
// We want to leave trailing slash behavior in the user's control, so if they
|
|
27394
|
-
// specify a basename with a trailing slash, we should support it
|
|
27395
|
-
let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
|
|
27396
|
-
let nextChar = pathname.charAt(startIndex);
|
|
27397
|
-
if (nextChar && nextChar !== "/") {
|
|
27398
|
-
// pathname does not start with basename/
|
|
27399
|
-
return null;
|
|
27400
|
-
}
|
|
27401
|
-
return pathname.slice(startIndex) || "/";
|
|
27402
|
-
}
|
|
27403
|
-
/**
|
|
27404
|
-
* Returns a resolved path object relative to the given pathname.
|
|
27405
|
-
*
|
|
27406
|
-
* @see https://reactrouter.com/v6/utils/resolve-path
|
|
27407
|
-
*/
|
|
27408
|
-
function resolvePath(to, fromPathname) {
|
|
27409
|
-
if (fromPathname === void 0) {
|
|
27410
|
-
fromPathname = "/";
|
|
27411
|
-
}
|
|
27412
|
-
let {
|
|
27413
|
-
pathname: toPathname,
|
|
27414
|
-
search = "",
|
|
27415
|
-
hash = ""
|
|
27416
|
-
} = typeof to === "string" ? parsePath(to) : to;
|
|
27417
|
-
let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
|
|
27418
|
-
return {
|
|
27419
|
-
pathname,
|
|
27420
|
-
search: normalizeSearch(search),
|
|
27421
|
-
hash: normalizeHash(hash)
|
|
27422
|
-
};
|
|
27423
|
-
}
|
|
27424
|
-
function resolvePathname(relativePath, fromPathname) {
|
|
27425
|
-
let segments = fromPathname.replace(/\/+$/, "").split("/");
|
|
27426
|
-
let relativeSegments = relativePath.split("/");
|
|
27427
|
-
relativeSegments.forEach(segment => {
|
|
27428
|
-
if (segment === "..") {
|
|
27429
|
-
// Keep the root "" segment so the pathname starts at /
|
|
27430
|
-
if (segments.length > 1) segments.pop();
|
|
27431
|
-
} else if (segment !== ".") {
|
|
27432
|
-
segments.push(segment);
|
|
27433
|
-
}
|
|
27434
|
-
});
|
|
27435
|
-
return segments.length > 1 ? segments.join("/") : "/";
|
|
27436
|
-
}
|
|
27437
|
-
function getInvalidPathError(char, field, dest, path) {
|
|
27438
|
-
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.";
|
|
27439
|
-
}
|
|
27440
|
-
/**
|
|
27441
|
-
* @private
|
|
27442
|
-
*
|
|
27443
|
-
* When processing relative navigation we want to ignore ancestor routes that
|
|
27444
|
-
* do not contribute to the path, such that index/pathless layout routes don't
|
|
27445
|
-
* interfere.
|
|
27446
|
-
*
|
|
27447
|
-
* For example, when moving a route element into an index route and/or a
|
|
27448
|
-
* pathless layout route, relative link behavior contained within should stay
|
|
27449
|
-
* the same. Both of the following examples should link back to the root:
|
|
27450
|
-
*
|
|
27451
|
-
* <Route path="/">
|
|
27452
|
-
* <Route path="accounts" element={<Link to=".."}>
|
|
27453
|
-
* </Route>
|
|
27454
|
-
*
|
|
27455
|
-
* <Route path="/">
|
|
27456
|
-
* <Route path="accounts">
|
|
27457
|
-
* <Route element={<AccountsLayout />}> // <-- Does not contribute
|
|
27458
|
-
* <Route index element={<Link to=".."} /> // <-- Does not contribute
|
|
27459
|
-
* </Route
|
|
27460
|
-
* </Route>
|
|
27461
|
-
* </Route>
|
|
27462
|
-
*/
|
|
27463
|
-
function getPathContributingMatches(matches) {
|
|
27464
|
-
return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
|
|
27465
|
-
}
|
|
27466
|
-
// Return the array of pathnames for the current route matches - used to
|
|
27467
|
-
// generate the routePathnames input for resolveTo()
|
|
27468
|
-
function getResolveToMatches(matches, v7_relativeSplatPath) {
|
|
27469
|
-
let pathMatches = getPathContributingMatches(matches);
|
|
27470
|
-
// When v7_relativeSplatPath is enabled, use the full pathname for the leaf
|
|
27471
|
-
// match so we include splat values for "." links. See:
|
|
27472
|
-
// https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
|
|
27473
|
-
if (v7_relativeSplatPath) {
|
|
27474
|
-
return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);
|
|
27475
|
-
}
|
|
27476
|
-
return pathMatches.map(match => match.pathnameBase);
|
|
27477
|
-
}
|
|
27478
|
-
/**
|
|
27479
|
-
* @private
|
|
27480
|
-
*/
|
|
27481
|
-
function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
|
|
27482
|
-
if (isPathRelative === void 0) {
|
|
27483
|
-
isPathRelative = false;
|
|
27484
|
-
}
|
|
27485
|
-
let to;
|
|
27486
|
-
if (typeof toArg === "string") {
|
|
27487
|
-
to = parsePath(toArg);
|
|
27488
|
-
} else {
|
|
27489
|
-
to = _extends$2({}, toArg);
|
|
27490
|
-
invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
|
|
27491
|
-
invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
|
|
27492
|
-
invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
|
|
27493
|
-
}
|
|
27494
|
-
let isEmptyPath = toArg === "" || to.pathname === "";
|
|
27495
|
-
let toPathname = isEmptyPath ? "/" : to.pathname;
|
|
27496
|
-
let from;
|
|
27497
|
-
// Routing is relative to the current pathname if explicitly requested.
|
|
27498
|
-
//
|
|
27499
|
-
// If a pathname is explicitly provided in `to`, it should be relative to the
|
|
27500
|
-
// route context. This is explained in `Note on `<Link to>` values` in our
|
|
27501
|
-
// migration guide from v5 as a means of disambiguation between `to` values
|
|
27502
|
-
// that begin with `/` and those that do not. However, this is problematic for
|
|
27503
|
-
// `to` values that do not provide a pathname. `to` can simply be a search or
|
|
27504
|
-
// hash string, in which case we should assume that the navigation is relative
|
|
27505
|
-
// to the current location's pathname and *not* the route pathname.
|
|
27506
|
-
if (toPathname == null) {
|
|
27507
|
-
from = locationPathname;
|
|
27508
|
-
} else {
|
|
27509
|
-
let routePathnameIndex = routePathnames.length - 1;
|
|
27510
|
-
// With relative="route" (the default), each leading .. segment means
|
|
27511
|
-
// "go up one route" instead of "go up one URL segment". This is a key
|
|
27512
|
-
// difference from how <a href> works and a major reason we call this a
|
|
27513
|
-
// "to" value instead of a "href".
|
|
27514
|
-
if (!isPathRelative && toPathname.startsWith("..")) {
|
|
27515
|
-
let toSegments = toPathname.split("/");
|
|
27516
|
-
while (toSegments[0] === "..") {
|
|
27517
|
-
toSegments.shift();
|
|
27518
|
-
routePathnameIndex -= 1;
|
|
27519
|
-
}
|
|
27520
|
-
to.pathname = toSegments.join("/");
|
|
27521
|
-
}
|
|
27522
|
-
from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
|
|
27523
|
-
}
|
|
27524
|
-
let path = resolvePath(to, from);
|
|
27525
|
-
// Ensure the pathname has a trailing slash if the original "to" had one
|
|
27526
|
-
let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
|
|
27527
|
-
// Or if this was a link to the current path which has a trailing slash
|
|
27528
|
-
let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
|
|
27529
|
-
if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
|
|
27530
|
-
path.pathname += "/";
|
|
27531
|
-
}
|
|
27532
|
-
return path;
|
|
27533
|
-
}
|
|
27534
|
-
/**
|
|
27535
|
-
* @private
|
|
27536
|
-
*/
|
|
27537
|
-
const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
|
|
27538
|
-
/**
|
|
27539
|
-
* @private
|
|
27540
|
-
*/
|
|
27541
|
-
const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
27542
|
-
/**
|
|
27543
|
-
* @private
|
|
27544
|
-
*/
|
|
27545
|
-
const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
27546
|
-
|
|
27547
|
-
const validMutationMethodsArr = ["post", "put", "patch", "delete"];
|
|
27548
|
-
["get", ...validMutationMethodsArr];
|
|
27549
|
-
|
|
27550
|
-
/**
|
|
27551
|
-
* React Router v6.28.0
|
|
27552
|
-
*
|
|
27553
|
-
* Copyright (c) Remix Software Inc.
|
|
27554
|
-
*
|
|
27555
|
-
* This source code is licensed under the MIT license found in the
|
|
27556
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
27557
|
-
*
|
|
27558
|
-
* @license MIT
|
|
27559
|
-
*/
|
|
27560
|
-
|
|
27561
|
-
function _extends$1() {
|
|
27562
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
27563
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
27564
|
-
var source = arguments[i];
|
|
27565
|
-
for (var key in source) {
|
|
27566
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
27567
|
-
target[key] = source[key];
|
|
27568
|
-
}
|
|
27569
|
-
}
|
|
27570
|
-
}
|
|
27571
|
-
return target;
|
|
27572
|
-
};
|
|
27573
|
-
return _extends$1.apply(this, arguments);
|
|
27574
|
-
}
|
|
27575
|
-
|
|
27576
|
-
// Create react-specific types from the agnostic types in @remix-run/router to
|
|
27577
|
-
// export from react-router
|
|
27578
|
-
const DataRouterContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
27579
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27580
|
-
DataRouterContext.displayName = "DataRouter";
|
|
27581
|
-
}
|
|
27582
|
-
const DataRouterStateContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
27583
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27584
|
-
DataRouterStateContext.displayName = "DataRouterState";
|
|
27585
|
-
}
|
|
27586
|
-
const AwaitContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
27587
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27588
|
-
AwaitContext.displayName = "Await";
|
|
27589
|
-
}
|
|
27590
|
-
|
|
27591
|
-
/**
|
|
27592
|
-
* A Navigator is a "location changer"; it's how you get to different locations.
|
|
27593
|
-
*
|
|
27594
|
-
* Every history instance conforms to the Navigator interface, but the
|
|
27595
|
-
* distinction is useful primarily when it comes to the low-level `<Router>` API
|
|
27596
|
-
* where both the location and a navigator must be provided separately in order
|
|
27597
|
-
* to avoid "tearing" that may occur in a suspense-enabled app if the action
|
|
27598
|
-
* and/or location were to be read directly from the history instance.
|
|
27599
|
-
*/
|
|
27600
|
-
|
|
27601
|
-
const NavigationContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
27602
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27603
|
-
NavigationContext.displayName = "Navigation";
|
|
27604
|
-
}
|
|
27605
|
-
const LocationContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
27606
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27607
|
-
LocationContext.displayName = "Location";
|
|
27608
|
-
}
|
|
27609
|
-
const RouteContext = /*#__PURE__*/React__namespace.createContext({
|
|
27610
|
-
outlet: null,
|
|
27611
|
-
matches: [],
|
|
27612
|
-
isDataRoute: false
|
|
27613
|
-
});
|
|
27614
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27615
|
-
RouteContext.displayName = "Route";
|
|
27616
|
-
}
|
|
27617
|
-
const RouteErrorContext = /*#__PURE__*/React__namespace.createContext(null);
|
|
27618
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27619
|
-
RouteErrorContext.displayName = "RouteError";
|
|
27620
|
-
}
|
|
27621
|
-
|
|
27622
|
-
/**
|
|
27623
|
-
* Returns the full href for the given "to" value. This is useful for building
|
|
27624
|
-
* custom links that are also accessible and preserve right-click behavior.
|
|
27625
|
-
*
|
|
27626
|
-
* @see https://reactrouter.com/v6/hooks/use-href
|
|
27627
|
-
*/
|
|
27628
|
-
function useHref(to, _temp) {
|
|
27629
|
-
let {
|
|
27630
|
-
relative
|
|
27631
|
-
} = _temp === void 0 ? {} : _temp;
|
|
27632
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
27633
|
-
// router loaded. We can help them understand how to avoid that.
|
|
27634
|
-
"useHref() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
27635
|
-
let {
|
|
27636
|
-
basename,
|
|
27637
|
-
navigator
|
|
27638
|
-
} = React__namespace.useContext(NavigationContext);
|
|
27639
|
-
let {
|
|
27640
|
-
hash,
|
|
27641
|
-
pathname,
|
|
27642
|
-
search
|
|
27643
|
-
} = useResolvedPath(to, {
|
|
27644
|
-
relative
|
|
27645
|
-
});
|
|
27646
|
-
let joinedPathname = pathname;
|
|
27647
|
-
|
|
27648
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
27649
|
-
// to creating the href. If this is a root navigation, then just use the raw
|
|
27650
|
-
// basename which allows the basename to have full control over the presence
|
|
27651
|
-
// of a trailing slash on root links
|
|
27652
|
-
if (basename !== "/") {
|
|
27653
|
-
joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
27654
|
-
}
|
|
27655
|
-
return navigator.createHref({
|
|
27656
|
-
pathname: joinedPathname,
|
|
27657
|
-
search,
|
|
27658
|
-
hash
|
|
27659
|
-
});
|
|
27660
|
-
}
|
|
27661
|
-
|
|
27662
|
-
/**
|
|
27663
|
-
* Returns true if this component is a descendant of a `<Router>`.
|
|
27664
|
-
*
|
|
27665
|
-
* @see https://reactrouter.com/v6/hooks/use-in-router-context
|
|
27666
|
-
*/
|
|
27667
|
-
function useInRouterContext() {
|
|
27668
|
-
return React__namespace.useContext(LocationContext) != null;
|
|
27669
|
-
}
|
|
27670
|
-
|
|
27671
|
-
/**
|
|
27672
|
-
* Returns the current location object, which represents the current URL in web
|
|
27673
|
-
* browsers.
|
|
27674
|
-
*
|
|
27675
|
-
* Note: If you're using this it may mean you're doing some of your own
|
|
27676
|
-
* "routing" in your app, and we'd like to know what your use case is. We may
|
|
27677
|
-
* be able to provide something higher-level to better suit your needs.
|
|
27678
|
-
*
|
|
27679
|
-
* @see https://reactrouter.com/v6/hooks/use-location
|
|
27680
|
-
*/
|
|
27681
|
-
function useLocation() {
|
|
27682
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
27683
|
-
// router loaded. We can help them understand how to avoid that.
|
|
27684
|
-
"useLocation() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
27685
|
-
return React__namespace.useContext(LocationContext).location;
|
|
27686
|
-
}
|
|
27687
|
-
|
|
27688
|
-
/**
|
|
27689
|
-
* The interface for the navigate() function returned from useNavigate().
|
|
27690
|
-
*/
|
|
27691
|
-
|
|
27692
|
-
const navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";
|
|
27693
|
-
|
|
27694
|
-
// Mute warnings for calls to useNavigate in SSR environments
|
|
27695
|
-
function useIsomorphicLayoutEffect(cb) {
|
|
27696
|
-
let isStatic = React__namespace.useContext(NavigationContext).static;
|
|
27697
|
-
if (!isStatic) {
|
|
27698
|
-
// We should be able to get rid of this once react 18.3 is released
|
|
27699
|
-
// See: https://github.com/facebook/react/pull/26395
|
|
27700
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
27701
|
-
React__namespace.useLayoutEffect(cb);
|
|
27702
|
-
}
|
|
27703
|
-
}
|
|
27704
|
-
|
|
27705
|
-
/**
|
|
27706
|
-
* Returns an imperative method for changing the location. Used by `<Link>`s, but
|
|
27707
|
-
* may also be used by other elements to change the location.
|
|
27708
|
-
*
|
|
27709
|
-
* @see https://reactrouter.com/v6/hooks/use-navigate
|
|
27710
|
-
*/
|
|
27711
|
-
function useNavigate() {
|
|
27712
|
-
let {
|
|
27713
|
-
isDataRoute
|
|
27714
|
-
} = React__namespace.useContext(RouteContext);
|
|
27715
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
27716
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
27717
|
-
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
27718
|
-
}
|
|
27719
|
-
function useNavigateUnstable() {
|
|
27720
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
27721
|
-
// router loaded. We can help them understand how to avoid that.
|
|
27722
|
-
"useNavigate() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
27723
|
-
let dataRouterContext = React__namespace.useContext(DataRouterContext);
|
|
27724
|
-
let {
|
|
27725
|
-
basename,
|
|
27726
|
-
future,
|
|
27727
|
-
navigator
|
|
27728
|
-
} = React__namespace.useContext(NavigationContext);
|
|
27729
|
-
let {
|
|
27730
|
-
matches
|
|
27731
|
-
} = React__namespace.useContext(RouteContext);
|
|
27732
|
-
let {
|
|
27733
|
-
pathname: locationPathname
|
|
27734
|
-
} = useLocation();
|
|
27735
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
27736
|
-
let activeRef = React__namespace.useRef(false);
|
|
27737
|
-
useIsomorphicLayoutEffect(() => {
|
|
27738
|
-
activeRef.current = true;
|
|
27739
|
-
});
|
|
27740
|
-
let navigate = React__namespace.useCallback(function (to, options) {
|
|
27741
|
-
if (options === void 0) {
|
|
27742
|
-
options = {};
|
|
27743
|
-
}
|
|
27744
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
27745
|
-
|
|
27746
|
-
// Short circuit here since if this happens on first render the navigate
|
|
27747
|
-
// is useless because we haven't wired up our history listener yet
|
|
27748
|
-
if (!activeRef.current) return;
|
|
27749
|
-
if (typeof to === "number") {
|
|
27750
|
-
navigator.go(to);
|
|
27751
|
-
return;
|
|
27752
|
-
}
|
|
27753
|
-
let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
|
|
27754
|
-
|
|
27755
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
27756
|
-
// to handing off to history (but only if we're not in a data router,
|
|
27757
|
-
// otherwise it'll prepend the basename inside of the router).
|
|
27758
|
-
// If this is a root navigation, then we navigate to the raw basename
|
|
27759
|
-
// which allows the basename to have full control over the presence of a
|
|
27760
|
-
// trailing slash on root links
|
|
27761
|
-
if (dataRouterContext == null && basename !== "/") {
|
|
27762
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
27763
|
-
}
|
|
27764
|
-
(!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);
|
|
27765
|
-
}, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);
|
|
27766
|
-
return navigate;
|
|
27767
|
-
}
|
|
27768
|
-
|
|
27769
|
-
/**
|
|
27770
|
-
* Resolves the pathname of the given `to` value against the current location.
|
|
27771
|
-
*
|
|
27772
|
-
* @see https://reactrouter.com/v6/hooks/use-resolved-path
|
|
27773
|
-
*/
|
|
27774
|
-
function useResolvedPath(to, _temp2) {
|
|
27775
|
-
let {
|
|
27776
|
-
relative
|
|
27777
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
27778
|
-
let {
|
|
27779
|
-
future
|
|
27780
|
-
} = React__namespace.useContext(NavigationContext);
|
|
27781
|
-
let {
|
|
27782
|
-
matches
|
|
27783
|
-
} = React__namespace.useContext(RouteContext);
|
|
27784
|
-
let {
|
|
27785
|
-
pathname: locationPathname
|
|
27786
|
-
} = useLocation();
|
|
27787
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
27788
|
-
return React__namespace.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
|
|
27789
|
-
}
|
|
27790
|
-
var DataRouterHook$1 = /*#__PURE__*/function (DataRouterHook) {
|
|
27791
|
-
DataRouterHook["UseBlocker"] = "useBlocker";
|
|
27792
|
-
DataRouterHook["UseRevalidator"] = "useRevalidator";
|
|
27793
|
-
DataRouterHook["UseNavigateStable"] = "useNavigate";
|
|
27794
|
-
return DataRouterHook;
|
|
27795
|
-
}(DataRouterHook$1 || {});
|
|
27796
|
-
var DataRouterStateHook$1 = /*#__PURE__*/function (DataRouterStateHook) {
|
|
27797
|
-
DataRouterStateHook["UseBlocker"] = "useBlocker";
|
|
27798
|
-
DataRouterStateHook["UseLoaderData"] = "useLoaderData";
|
|
27799
|
-
DataRouterStateHook["UseActionData"] = "useActionData";
|
|
27800
|
-
DataRouterStateHook["UseRouteError"] = "useRouteError";
|
|
27801
|
-
DataRouterStateHook["UseNavigation"] = "useNavigation";
|
|
27802
|
-
DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData";
|
|
27803
|
-
DataRouterStateHook["UseMatches"] = "useMatches";
|
|
27804
|
-
DataRouterStateHook["UseRevalidator"] = "useRevalidator";
|
|
27805
|
-
DataRouterStateHook["UseNavigateStable"] = "useNavigate";
|
|
27806
|
-
DataRouterStateHook["UseRouteId"] = "useRouteId";
|
|
27807
|
-
return DataRouterStateHook;
|
|
27808
|
-
}(DataRouterStateHook$1 || {});
|
|
27809
|
-
function getDataRouterConsoleError$1(hookName) {
|
|
27810
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
27811
|
-
}
|
|
27812
|
-
function useDataRouterContext$1(hookName) {
|
|
27813
|
-
let ctx = React__namespace.useContext(DataRouterContext);
|
|
27814
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
27815
|
-
return ctx;
|
|
27816
|
-
}
|
|
27817
|
-
function useRouteContext(hookName) {
|
|
27818
|
-
let route = React__namespace.useContext(RouteContext);
|
|
27819
|
-
!route ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
27820
|
-
return route;
|
|
27821
|
-
}
|
|
27822
|
-
|
|
27823
|
-
// Internal version with hookName-aware debugging
|
|
27824
|
-
function useCurrentRouteId(hookName) {
|
|
27825
|
-
let route = useRouteContext(hookName);
|
|
27826
|
-
let thisRoute = route.matches[route.matches.length - 1];
|
|
27827
|
-
!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;
|
|
27828
|
-
return thisRoute.route.id;
|
|
27829
|
-
}
|
|
27830
|
-
|
|
27831
|
-
/**
|
|
27832
|
-
* Returns the ID for the nearest contextual route
|
|
27833
|
-
*/
|
|
27834
|
-
function useRouteId() {
|
|
27835
|
-
return useCurrentRouteId(DataRouterStateHook$1.UseRouteId);
|
|
27836
|
-
}
|
|
27837
|
-
|
|
27838
|
-
/**
|
|
27839
|
-
* Stable version of useNavigate that is used when we are in the context of
|
|
27840
|
-
* a RouterProvider.
|
|
27841
|
-
*/
|
|
27842
|
-
function useNavigateStable() {
|
|
27843
|
-
let {
|
|
27844
|
-
router
|
|
27845
|
-
} = useDataRouterContext$1(DataRouterHook$1.UseNavigateStable);
|
|
27846
|
-
let id = useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable);
|
|
27847
|
-
let activeRef = React__namespace.useRef(false);
|
|
27848
|
-
useIsomorphicLayoutEffect(() => {
|
|
27849
|
-
activeRef.current = true;
|
|
27850
|
-
});
|
|
27851
|
-
let navigate = React__namespace.useCallback(function (to, options) {
|
|
27852
|
-
if (options === void 0) {
|
|
27853
|
-
options = {};
|
|
27854
|
-
}
|
|
27855
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
27856
|
-
|
|
27857
|
-
// Short circuit here since if this happens on first render the navigate
|
|
27858
|
-
// is useless because we haven't wired up our router subscriber yet
|
|
27859
|
-
if (!activeRef.current) return;
|
|
27860
|
-
if (typeof to === "number") {
|
|
27861
|
-
router.navigate(to);
|
|
27862
|
-
} else {
|
|
27863
|
-
router.navigate(to, _extends$1({
|
|
27864
|
-
fromRouteId: id
|
|
27865
|
-
}, options));
|
|
27866
|
-
}
|
|
27867
|
-
}, [router, id]);
|
|
27868
|
-
return navigate;
|
|
27869
|
-
}
|
|
27870
|
-
new Promise(() => {});
|
|
27871
|
-
|
|
27872
|
-
/**
|
|
27873
|
-
* React Router DOM v6.28.0
|
|
27874
|
-
*
|
|
27875
|
-
* Copyright (c) Remix Software Inc.
|
|
27876
|
-
*
|
|
27877
|
-
* This source code is licensed under the MIT license found in the
|
|
27878
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
27879
|
-
*
|
|
27880
|
-
* @license MIT
|
|
27881
|
-
*/
|
|
27882
|
-
|
|
27883
|
-
function _extends() {
|
|
27884
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
27885
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
27886
|
-
var source = arguments[i];
|
|
27887
|
-
for (var key in source) {
|
|
27888
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
27889
|
-
target[key] = source[key];
|
|
27890
|
-
}
|
|
27891
|
-
}
|
|
27892
|
-
}
|
|
27893
|
-
return target;
|
|
27894
|
-
};
|
|
27895
|
-
return _extends.apply(this, arguments);
|
|
27896
|
-
}
|
|
27897
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
27898
|
-
if (source == null) return {};
|
|
27899
|
-
var target = {};
|
|
27900
|
-
var sourceKeys = Object.keys(source);
|
|
27901
|
-
var key, i;
|
|
27902
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
27903
|
-
key = sourceKeys[i];
|
|
27904
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
27905
|
-
target[key] = source[key];
|
|
27906
|
-
}
|
|
27907
|
-
return target;
|
|
27908
|
-
}
|
|
27909
|
-
|
|
27910
|
-
const defaultMethod = "get";
|
|
27911
|
-
const defaultEncType = "application/x-www-form-urlencoded";
|
|
27912
|
-
function isHtmlElement(object) {
|
|
27913
|
-
return object != null && typeof object.tagName === "string";
|
|
27914
|
-
}
|
|
27915
|
-
function isButtonElement(object) {
|
|
27916
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
|
|
27917
|
-
}
|
|
27918
|
-
function isFormElement(object) {
|
|
27919
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
|
|
27920
|
-
}
|
|
27921
|
-
function isInputElement(object) {
|
|
27922
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
|
|
27923
|
-
}
|
|
27924
|
-
function isModifiedEvent(event) {
|
|
27925
|
-
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
27926
|
-
}
|
|
27927
|
-
function shouldProcessLinkClick(event, target) {
|
|
27928
|
-
return event.button === 0 && (
|
|
27929
|
-
// Ignore everything but left clicks
|
|
27930
|
-
!target || target === "_self") &&
|
|
27931
|
-
// Let browser handle "target=_blank" etc.
|
|
27932
|
-
!isModifiedEvent(event) // Ignore clicks with modifier keys
|
|
27933
|
-
;
|
|
27934
|
-
}
|
|
27935
|
-
// One-time check for submitter support
|
|
27936
|
-
let _formDataSupportsSubmitter = null;
|
|
27937
|
-
function isFormDataSubmitterSupported() {
|
|
27938
|
-
if (_formDataSupportsSubmitter === null) {
|
|
27939
|
-
try {
|
|
27940
|
-
new FormData(document.createElement("form"),
|
|
27941
|
-
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
27942
|
-
0);
|
|
27943
|
-
_formDataSupportsSubmitter = false;
|
|
27944
|
-
} catch (e) {
|
|
27945
|
-
_formDataSupportsSubmitter = true;
|
|
27946
|
-
}
|
|
27947
|
-
}
|
|
27948
|
-
return _formDataSupportsSubmitter;
|
|
27949
|
-
}
|
|
27950
|
-
const supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
27951
|
-
function getFormEncType(encType) {
|
|
27952
|
-
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
27953
|
-
process.env.NODE_ENV !== "production" ? warning(false, "\"" + encType + "\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \"" + defaultEncType + "\"")) : void 0;
|
|
27954
|
-
return null;
|
|
27955
|
-
}
|
|
27956
|
-
return encType;
|
|
27957
|
-
}
|
|
27958
|
-
function getFormSubmissionInfo(target, basename) {
|
|
27959
|
-
let method;
|
|
27960
|
-
let action;
|
|
27961
|
-
let encType;
|
|
27962
|
-
let formData;
|
|
27963
|
-
let body;
|
|
27964
|
-
if (isFormElement(target)) {
|
|
27965
|
-
// When grabbing the action from the element, it will have had the basename
|
|
27966
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
27967
|
-
// re-prefix in the router
|
|
27968
|
-
let attr = target.getAttribute("action");
|
|
27969
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
27970
|
-
method = target.getAttribute("method") || defaultMethod;
|
|
27971
|
-
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
27972
|
-
formData = new FormData(target);
|
|
27973
|
-
} else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
|
|
27974
|
-
let form = target.form;
|
|
27975
|
-
if (form == null) {
|
|
27976
|
-
throw new Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
27977
|
-
}
|
|
27978
|
-
// <button>/<input type="submit"> may override attributes of <form>
|
|
27979
|
-
// When grabbing the action from the element, it will have had the basename
|
|
27980
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
27981
|
-
// re-prefix in the router
|
|
27982
|
-
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
27983
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
27984
|
-
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
27985
|
-
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
27986
|
-
// Build a FormData object populated from a form and submitter
|
|
27987
|
-
formData = new FormData(form, target);
|
|
27988
|
-
// If this browser doesn't support the `FormData(el, submitter)` format,
|
|
27989
|
-
// then tack on the submitter value at the end. This is a lightweight
|
|
27990
|
-
// solution that is not 100% spec compliant. For complete support in older
|
|
27991
|
-
// browsers, consider using the `formdata-submitter-polyfill` package
|
|
27992
|
-
if (!isFormDataSubmitterSupported()) {
|
|
27993
|
-
let {
|
|
27994
|
-
name,
|
|
27995
|
-
type,
|
|
27996
|
-
value
|
|
27997
|
-
} = target;
|
|
27998
|
-
if (type === "image") {
|
|
27999
|
-
let prefix = name ? name + "." : "";
|
|
28000
|
-
formData.append(prefix + "x", "0");
|
|
28001
|
-
formData.append(prefix + "y", "0");
|
|
28002
|
-
} else if (name) {
|
|
28003
|
-
formData.append(name, value);
|
|
28004
|
-
}
|
|
28005
|
-
}
|
|
28006
|
-
} else if (isHtmlElement(target)) {
|
|
28007
|
-
throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\"submit|image\">");
|
|
28008
|
-
} else {
|
|
28009
|
-
method = defaultMethod;
|
|
28010
|
-
action = null;
|
|
28011
|
-
encType = defaultEncType;
|
|
28012
|
-
body = target;
|
|
28013
|
-
}
|
|
28014
|
-
// Send body for <Form encType="text/plain" so we encode it into text
|
|
28015
|
-
if (formData && encType === "text/plain") {
|
|
28016
|
-
body = formData;
|
|
28017
|
-
formData = undefined;
|
|
28018
|
-
}
|
|
28019
|
-
return {
|
|
28020
|
-
action,
|
|
28021
|
-
method: method.toLowerCase(),
|
|
28022
|
-
encType,
|
|
28023
|
-
formData,
|
|
28024
|
-
body
|
|
28025
|
-
};
|
|
28026
|
-
}
|
|
28027
|
-
|
|
28028
|
-
const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"],
|
|
28029
|
-
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"],
|
|
28030
|
-
_excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"];
|
|
28031
|
-
// HEY YOU! DON'T TOUCH THIS VARIABLE!
|
|
28032
|
-
//
|
|
28033
|
-
// It is replaced with the proper version at build time via a babel plugin in
|
|
28034
|
-
// the rollup config.
|
|
28035
|
-
//
|
|
28036
|
-
// Export a global property onto the window for React Router detection by the
|
|
28037
|
-
// Core Web Vitals Technology Report. This way they can configure the `wappalyzer`
|
|
28038
|
-
// to detect and properly classify live websites as being built with React Router:
|
|
28039
|
-
// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
|
|
28040
|
-
const REACT_ROUTER_VERSION = "6";
|
|
28041
|
-
try {
|
|
28042
|
-
window.__reactRouterVersion = REACT_ROUTER_VERSION;
|
|
28043
|
-
} catch (e) {
|
|
28044
|
-
// no-op
|
|
28045
|
-
}
|
|
28046
|
-
const ViewTransitionContext = /*#__PURE__*/React__namespace.createContext({
|
|
28047
|
-
isTransitioning: false
|
|
28048
|
-
});
|
|
28049
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28050
|
-
ViewTransitionContext.displayName = "ViewTransition";
|
|
28051
|
-
}
|
|
28052
|
-
const FetchersContext = /*#__PURE__*/React__namespace.createContext(new Map());
|
|
28053
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28054
|
-
FetchersContext.displayName = "Fetchers";
|
|
28055
|
-
}
|
|
28056
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
28057
|
-
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
28058
|
-
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
28059
|
-
/**
|
|
28060
|
-
* The public API for rendering a history-aware `<a>`.
|
|
28061
|
-
*/
|
|
28062
|
-
const Link = /*#__PURE__*/React__namespace.forwardRef(function LinkWithRef(_ref7, ref) {
|
|
28063
|
-
let {
|
|
28064
|
-
onClick,
|
|
28065
|
-
relative,
|
|
28066
|
-
reloadDocument,
|
|
28067
|
-
replace,
|
|
28068
|
-
state,
|
|
28069
|
-
target,
|
|
28070
|
-
to,
|
|
28071
|
-
preventScrollReset,
|
|
28072
|
-
viewTransition
|
|
28073
|
-
} = _ref7,
|
|
28074
|
-
rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
28075
|
-
let {
|
|
28076
|
-
basename
|
|
28077
|
-
} = React__namespace.useContext(NavigationContext);
|
|
28078
|
-
// Rendered into <a href> for absolute URLs
|
|
28079
|
-
let absoluteHref;
|
|
28080
|
-
let isExternal = false;
|
|
28081
|
-
if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
|
|
28082
|
-
// Render the absolute href server- and client-side
|
|
28083
|
-
absoluteHref = to;
|
|
28084
|
-
// Only check for external origins client-side
|
|
28085
|
-
if (isBrowser) {
|
|
28086
|
-
try {
|
|
28087
|
-
let currentUrl = new URL(window.location.href);
|
|
28088
|
-
let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
28089
|
-
let path = stripBasename(targetUrl.pathname, basename);
|
|
28090
|
-
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
28091
|
-
// Strip the protocol/origin/basename for same-origin absolute URLs
|
|
28092
|
-
to = path + targetUrl.search + targetUrl.hash;
|
|
28093
|
-
} else {
|
|
28094
|
-
isExternal = true;
|
|
28095
|
-
}
|
|
28096
|
-
} catch (e) {
|
|
28097
|
-
// We can't do external URL detection without a valid URL
|
|
28098
|
-
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;
|
|
28099
|
-
}
|
|
28100
|
-
}
|
|
28101
|
-
}
|
|
28102
|
-
// Rendered into <a href> for relative URLs
|
|
28103
|
-
let href = useHref(to, {
|
|
28104
|
-
relative
|
|
28105
|
-
});
|
|
28106
|
-
let internalOnClick = useLinkClickHandler(to, {
|
|
28107
|
-
replace,
|
|
28108
|
-
state,
|
|
28109
|
-
target,
|
|
28110
|
-
preventScrollReset,
|
|
28111
|
-
relative,
|
|
28112
|
-
viewTransition
|
|
28113
|
-
});
|
|
28114
|
-
function handleClick(event) {
|
|
28115
|
-
if (onClick) onClick(event);
|
|
28116
|
-
if (!event.defaultPrevented) {
|
|
28117
|
-
internalOnClick(event);
|
|
28118
|
-
}
|
|
28119
|
-
}
|
|
28120
|
-
return (
|
|
28121
|
-
/*#__PURE__*/
|
|
28122
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
28123
|
-
React__namespace.createElement("a", _extends({}, rest, {
|
|
28124
|
-
href: absoluteHref || href,
|
|
28125
|
-
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
28126
|
-
ref: ref,
|
|
28127
|
-
target: target
|
|
28128
|
-
}))
|
|
28129
|
-
);
|
|
28130
|
-
});
|
|
28131
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28132
|
-
Link.displayName = "Link";
|
|
28133
|
-
}
|
|
28134
|
-
/**
|
|
28135
|
-
* A `<Link>` wrapper that knows if it's "active" or not.
|
|
28136
|
-
*/
|
|
28137
|
-
const NavLink = /*#__PURE__*/React__namespace.forwardRef(function NavLinkWithRef(_ref8, ref) {
|
|
28138
|
-
let {
|
|
28139
|
-
"aria-current": ariaCurrentProp = "page",
|
|
28140
|
-
caseSensitive = false,
|
|
28141
|
-
className: classNameProp = "",
|
|
28142
|
-
end = false,
|
|
28143
|
-
style: styleProp,
|
|
28144
|
-
to,
|
|
28145
|
-
viewTransition,
|
|
28146
|
-
children
|
|
28147
|
-
} = _ref8,
|
|
28148
|
-
rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
|
|
28149
|
-
let path = useResolvedPath(to, {
|
|
28150
|
-
relative: rest.relative
|
|
28151
|
-
});
|
|
28152
|
-
let location = useLocation();
|
|
28153
|
-
let routerState = React__namespace.useContext(DataRouterStateContext);
|
|
28154
|
-
let {
|
|
28155
|
-
navigator,
|
|
28156
|
-
basename
|
|
28157
|
-
} = React__namespace.useContext(NavigationContext);
|
|
28158
|
-
let isTransitioning = routerState != null &&
|
|
28159
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
28160
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
28161
|
-
useViewTransitionState(path) && viewTransition === true;
|
|
28162
|
-
let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
|
|
28163
|
-
let locationPathname = location.pathname;
|
|
28164
|
-
let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
|
|
28165
|
-
if (!caseSensitive) {
|
|
28166
|
-
locationPathname = locationPathname.toLowerCase();
|
|
28167
|
-
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
28168
|
-
toPathname = toPathname.toLowerCase();
|
|
28169
|
-
}
|
|
28170
|
-
if (nextLocationPathname && basename) {
|
|
28171
|
-
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
28172
|
-
}
|
|
28173
|
-
// If the `to` has a trailing slash, look at that exact spot. Otherwise,
|
|
28174
|
-
// we're looking for a slash _after_ what's in `to`. For example:
|
|
28175
|
-
//
|
|
28176
|
-
// <NavLink to="/users"> and <NavLink to="/users/">
|
|
28177
|
-
// both want to look for a / at index 6 to match URL `/users/matt`
|
|
28178
|
-
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
28179
|
-
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
28180
|
-
let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
|
|
28181
|
-
let renderProps = {
|
|
28182
|
-
isActive,
|
|
28183
|
-
isPending,
|
|
28184
|
-
isTransitioning
|
|
28185
|
-
};
|
|
28186
|
-
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
|
|
28187
|
-
let className;
|
|
28188
|
-
if (typeof classNameProp === "function") {
|
|
28189
|
-
className = classNameProp(renderProps);
|
|
28190
|
-
} else {
|
|
28191
|
-
// If the className prop is not a function, we use a default `active`
|
|
28192
|
-
// class for <NavLink />s that are active. In v5 `active` was the default
|
|
28193
|
-
// value for `activeClassName`, but we are removing that API and can still
|
|
28194
|
-
// use the old default behavior for a cleaner upgrade path and keep the
|
|
28195
|
-
// simple styling rules working as they currently do.
|
|
28196
|
-
className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
|
|
28197
|
-
}
|
|
28198
|
-
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
28199
|
-
return /*#__PURE__*/React__namespace.createElement(Link, _extends({}, rest, {
|
|
28200
|
-
"aria-current": ariaCurrent,
|
|
28201
|
-
className: className,
|
|
28202
|
-
ref: ref,
|
|
28203
|
-
style: style,
|
|
28204
|
-
to: to,
|
|
28205
|
-
viewTransition: viewTransition
|
|
28206
|
-
}), typeof children === "function" ? children(renderProps) : children);
|
|
28207
|
-
});
|
|
28208
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28209
|
-
NavLink.displayName = "NavLink";
|
|
28210
|
-
}
|
|
28211
|
-
/**
|
|
28212
|
-
* A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
|
|
28213
|
-
* that the interaction with the server is with `fetch` instead of new document
|
|
28214
|
-
* requests, allowing components to add nicer UX to the page as the form is
|
|
28215
|
-
* submitted and returns with data.
|
|
28216
|
-
*/
|
|
28217
|
-
const Form = /*#__PURE__*/React__namespace.forwardRef((_ref9, forwardedRef) => {
|
|
28218
|
-
let {
|
|
28219
|
-
fetcherKey,
|
|
28220
|
-
navigate,
|
|
28221
|
-
reloadDocument,
|
|
28222
|
-
replace,
|
|
28223
|
-
state,
|
|
28224
|
-
method = defaultMethod,
|
|
28225
|
-
action,
|
|
28226
|
-
onSubmit,
|
|
28227
|
-
relative,
|
|
28228
|
-
preventScrollReset,
|
|
28229
|
-
viewTransition
|
|
28230
|
-
} = _ref9,
|
|
28231
|
-
props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
|
|
28232
|
-
let submit = useSubmit();
|
|
28233
|
-
let formAction = useFormAction(action, {
|
|
28234
|
-
relative
|
|
28235
|
-
});
|
|
28236
|
-
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
28237
|
-
let submitHandler = event => {
|
|
28238
|
-
onSubmit && onSubmit(event);
|
|
28239
|
-
if (event.defaultPrevented) return;
|
|
28240
|
-
event.preventDefault();
|
|
28241
|
-
let submitter = event.nativeEvent.submitter;
|
|
28242
|
-
let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
|
|
28243
|
-
submit(submitter || event.currentTarget, {
|
|
28244
|
-
fetcherKey,
|
|
28245
|
-
method: submitMethod,
|
|
28246
|
-
navigate,
|
|
28247
|
-
replace,
|
|
28248
|
-
state,
|
|
28249
|
-
relative,
|
|
28250
|
-
preventScrollReset,
|
|
28251
|
-
viewTransition
|
|
28252
|
-
});
|
|
28253
|
-
};
|
|
28254
|
-
return /*#__PURE__*/React__namespace.createElement("form", _extends({
|
|
28255
|
-
ref: forwardedRef,
|
|
28256
|
-
method: formMethod,
|
|
28257
|
-
action: formAction,
|
|
28258
|
-
onSubmit: reloadDocument ? onSubmit : submitHandler
|
|
28259
|
-
}, props));
|
|
28260
|
-
});
|
|
28261
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28262
|
-
Form.displayName = "Form";
|
|
28263
|
-
}
|
|
28264
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
28265
|
-
//#endregion
|
|
28266
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
28267
|
-
//#region Hooks
|
|
28268
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
28269
|
-
var DataRouterHook;
|
|
28270
|
-
(function (DataRouterHook) {
|
|
28271
|
-
DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
28272
|
-
DataRouterHook["UseSubmit"] = "useSubmit";
|
|
28273
|
-
DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";
|
|
28274
|
-
DataRouterHook["UseFetcher"] = "useFetcher";
|
|
28275
|
-
DataRouterHook["useViewTransitionState"] = "useViewTransitionState";
|
|
28276
|
-
})(DataRouterHook || (DataRouterHook = {}));
|
|
28277
|
-
var DataRouterStateHook;
|
|
28278
|
-
(function (DataRouterStateHook) {
|
|
28279
|
-
DataRouterStateHook["UseFetcher"] = "useFetcher";
|
|
28280
|
-
DataRouterStateHook["UseFetchers"] = "useFetchers";
|
|
28281
|
-
DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
28282
|
-
})(DataRouterStateHook || (DataRouterStateHook = {}));
|
|
28283
|
-
// Internal hooks
|
|
28284
|
-
function getDataRouterConsoleError(hookName) {
|
|
28285
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
28286
|
-
}
|
|
28287
|
-
function useDataRouterContext(hookName) {
|
|
28288
|
-
let ctx = React__namespace.useContext(DataRouterContext);
|
|
28289
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
|
|
28290
|
-
return ctx;
|
|
28291
|
-
}
|
|
28292
|
-
// External hooks
|
|
28293
|
-
/**
|
|
28294
|
-
* Handles the click behavior for router `<Link>` components. This is useful if
|
|
28295
|
-
* you need to create custom `<Link>` components with the same click behavior we
|
|
28296
|
-
* use in our exported `<Link>`.
|
|
28297
|
-
*/
|
|
28298
|
-
function useLinkClickHandler(to, _temp) {
|
|
28299
|
-
let {
|
|
28300
|
-
target,
|
|
28301
|
-
replace: replaceProp,
|
|
28302
|
-
state,
|
|
28303
|
-
preventScrollReset,
|
|
28304
|
-
relative,
|
|
28305
|
-
viewTransition
|
|
28306
|
-
} = _temp === void 0 ? {} : _temp;
|
|
28307
|
-
let navigate = useNavigate();
|
|
28308
|
-
let location = useLocation();
|
|
28309
|
-
let path = useResolvedPath(to, {
|
|
28310
|
-
relative
|
|
28311
|
-
});
|
|
28312
|
-
return React__namespace.useCallback(event => {
|
|
28313
|
-
if (shouldProcessLinkClick(event, target)) {
|
|
28314
|
-
event.preventDefault();
|
|
28315
|
-
// If the URL hasn't changed, a regular <a> will do a replace instead of
|
|
28316
|
-
// a push, so do the same here unless the replace prop is explicitly set
|
|
28317
|
-
let replace = replaceProp !== undefined ? replaceProp : createPath(location) === createPath(path);
|
|
28318
|
-
navigate(to, {
|
|
28319
|
-
replace,
|
|
28320
|
-
state,
|
|
28321
|
-
preventScrollReset,
|
|
28322
|
-
relative,
|
|
28323
|
-
viewTransition
|
|
28324
|
-
});
|
|
28325
|
-
}
|
|
28326
|
-
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);
|
|
28327
|
-
}
|
|
28328
|
-
function validateClientSideSubmission() {
|
|
28329
|
-
if (typeof document === "undefined") {
|
|
28330
|
-
throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead.");
|
|
28331
|
-
}
|
|
28332
|
-
}
|
|
28333
|
-
let fetcherId = 0;
|
|
28334
|
-
let getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";
|
|
28335
|
-
/**
|
|
28336
|
-
* Returns a function that may be used to programmatically submit a form (or
|
|
28337
|
-
* some arbitrary data) to the server.
|
|
28338
|
-
*/
|
|
28339
|
-
function useSubmit() {
|
|
28340
|
-
let {
|
|
28341
|
-
router
|
|
28342
|
-
} = useDataRouterContext(DataRouterHook.UseSubmit);
|
|
28343
|
-
let {
|
|
28344
|
-
basename
|
|
28345
|
-
} = React__namespace.useContext(NavigationContext);
|
|
28346
|
-
let currentRouteId = useRouteId();
|
|
28347
|
-
return React__namespace.useCallback(function (target, options) {
|
|
28348
|
-
if (options === void 0) {
|
|
28349
|
-
options = {};
|
|
28350
|
-
}
|
|
28351
|
-
validateClientSideSubmission();
|
|
28352
|
-
let {
|
|
28353
|
-
action,
|
|
28354
|
-
method,
|
|
28355
|
-
encType,
|
|
28356
|
-
formData,
|
|
28357
|
-
body
|
|
28358
|
-
} = getFormSubmissionInfo(target, basename);
|
|
28359
|
-
if (options.navigate === false) {
|
|
28360
|
-
let key = options.fetcherKey || getUniqueFetcherId();
|
|
28361
|
-
router.fetch(key, currentRouteId, options.action || action, {
|
|
28362
|
-
preventScrollReset: options.preventScrollReset,
|
|
28363
|
-
formData,
|
|
28364
|
-
body,
|
|
28365
|
-
formMethod: options.method || method,
|
|
28366
|
-
formEncType: options.encType || encType,
|
|
28367
|
-
flushSync: options.flushSync
|
|
28368
|
-
});
|
|
28369
|
-
} else {
|
|
28370
|
-
router.navigate(options.action || action, {
|
|
28371
|
-
preventScrollReset: options.preventScrollReset,
|
|
28372
|
-
formData,
|
|
28373
|
-
body,
|
|
28374
|
-
formMethod: options.method || method,
|
|
28375
|
-
formEncType: options.encType || encType,
|
|
28376
|
-
replace: options.replace,
|
|
28377
|
-
state: options.state,
|
|
28378
|
-
fromRouteId: currentRouteId,
|
|
28379
|
-
flushSync: options.flushSync,
|
|
28380
|
-
viewTransition: options.viewTransition
|
|
28381
|
-
});
|
|
28382
|
-
}
|
|
28383
|
-
}, [router, basename, currentRouteId]);
|
|
28384
|
-
}
|
|
28385
|
-
// v7: Eventually we should deprecate this entirely in favor of using the
|
|
28386
|
-
// router method directly?
|
|
28387
|
-
function useFormAction(action, _temp2) {
|
|
28388
|
-
let {
|
|
28389
|
-
relative
|
|
28390
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
28391
|
-
let {
|
|
28392
|
-
basename
|
|
28393
|
-
} = React__namespace.useContext(NavigationContext);
|
|
28394
|
-
let routeContext = React__namespace.useContext(RouteContext);
|
|
28395
|
-
!routeContext ? process.env.NODE_ENV !== "production" ? invariant(false, "useFormAction must be used inside a RouteContext") : invariant(false) : void 0;
|
|
28396
|
-
let [match] = routeContext.matches.slice(-1);
|
|
28397
|
-
// Shallow clone path so we can modify it below, otherwise we modify the
|
|
28398
|
-
// object referenced by useMemo inside useResolvedPath
|
|
28399
|
-
let path = _extends({}, useResolvedPath(action ? action : ".", {
|
|
28400
|
-
relative
|
|
28401
|
-
}));
|
|
28402
|
-
// If no action was specified, browsers will persist current search params
|
|
28403
|
-
// when determining the path, so match that behavior
|
|
28404
|
-
// https://github.com/remix-run/remix/issues/927
|
|
28405
|
-
let location = useLocation();
|
|
28406
|
-
if (action == null) {
|
|
28407
|
-
// Safe to write to this directly here since if action was undefined, we
|
|
28408
|
-
// would have called useResolvedPath(".") which will never include a search
|
|
28409
|
-
path.search = location.search;
|
|
28410
|
-
// When grabbing search params from the URL, remove any included ?index param
|
|
28411
|
-
// since it might not apply to our contextual route. We add it back based
|
|
28412
|
-
// on match.route.index below
|
|
28413
|
-
let params = new URLSearchParams(path.search);
|
|
28414
|
-
let indexValues = params.getAll("index");
|
|
28415
|
-
let hasNakedIndexParam = indexValues.some(v => v === "");
|
|
28416
|
-
if (hasNakedIndexParam) {
|
|
28417
|
-
params.delete("index");
|
|
28418
|
-
indexValues.filter(v => v).forEach(v => params.append("index", v));
|
|
28419
|
-
let qs = params.toString();
|
|
28420
|
-
path.search = qs ? "?" + qs : "";
|
|
28421
|
-
}
|
|
28422
|
-
}
|
|
28423
|
-
if ((!action || action === ".") && match.route.index) {
|
|
28424
|
-
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
28425
|
-
}
|
|
28426
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
28427
|
-
// to creating the form action. If this is a root navigation, then just use
|
|
28428
|
-
// the raw basename which allows the basename to have full control over the
|
|
28429
|
-
// presence of a trailing slash on root actions
|
|
28430
|
-
if (basename !== "/") {
|
|
28431
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
28432
|
-
}
|
|
28433
|
-
return createPath(path);
|
|
28434
|
-
}
|
|
28435
|
-
/**
|
|
28436
|
-
* Return a boolean indicating if there is an active view transition to the
|
|
28437
|
-
* given href. You can use this value to render CSS classes or viewTransitionName
|
|
28438
|
-
* styles onto your elements
|
|
28439
|
-
*
|
|
28440
|
-
* @param href The destination href
|
|
28441
|
-
* @param [opts.relative] Relative routing type ("route" | "path")
|
|
28442
|
-
*/
|
|
28443
|
-
function useViewTransitionState(to, opts) {
|
|
28444
|
-
if (opts === void 0) {
|
|
28445
|
-
opts = {};
|
|
28446
|
-
}
|
|
28447
|
-
let vtContext = React__namespace.useContext(ViewTransitionContext);
|
|
28448
|
-
!(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;
|
|
28449
|
-
let {
|
|
28450
|
-
basename
|
|
28451
|
-
} = useDataRouterContext(DataRouterHook.useViewTransitionState);
|
|
28452
|
-
let path = useResolvedPath(to, {
|
|
28453
|
-
relative: opts.relative
|
|
28454
|
-
});
|
|
28455
|
-
if (!vtContext.isTransitioning) {
|
|
28456
|
-
return false;
|
|
28457
|
-
}
|
|
28458
|
-
let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
28459
|
-
let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
28460
|
-
// Transition is active if we're going to or coming from the indicated
|
|
28461
|
-
// destination. This ensures that other PUSH navigations that reverse
|
|
28462
|
-
// an indicated transition apply. I.e., on the list view you have:
|
|
28463
|
-
//
|
|
28464
|
-
// <NavLink to="/details/1" viewTransition>
|
|
28465
|
-
//
|
|
28466
|
-
// If you click the breadcrumb back to the list view:
|
|
28467
|
-
//
|
|
28468
|
-
// <NavLink to="/list" viewTransition>
|
|
28469
|
-
//
|
|
28470
|
-
// We should apply the transition because it's indicated as active going
|
|
28471
|
-
// from /list -> /details/1 and therefore should be active on the reverse
|
|
28472
|
-
// (even though this isn't strictly a POP reverse)
|
|
28473
|
-
return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
|
|
28474
|
-
}
|
|
28475
|
-
|
|
28476
27182
|
const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }) => {
|
|
28477
|
-
const navigate = useNavigate();
|
|
27183
|
+
const navigate = reactRouterDom.useNavigate();
|
|
28478
27184
|
const [dataMenu, setDataMenu] = React$3.useState([]);
|
|
28479
27185
|
const [openMenu, setOpenMenu] = React$3.useState(false);
|
|
28480
27186
|
const [url, setUrl] = React$3.useState('');
|
|
@@ -28551,7 +27257,7 @@ const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParen
|
|
|
28551
27257
|
}, children: x.name }, x.code)) })] }, item.code));
|
|
28552
27258
|
}
|
|
28553
27259
|
else {
|
|
28554
|
-
return (jsxRuntime.jsx(Link, { 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));
|
|
27260
|
+
return (jsxRuntime.jsx(reactRouterDom.Link, { 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));
|
|
28555
27261
|
}
|
|
28556
27262
|
}) }) }), jsxRuntime.jsx("div", { onClick: () => handleScroll(200), className: classnames('btn-scroll', { 'd-none': componentWidth >= contentWidth - 20 }), children: jsxRuntime.jsx(SvgChevronRight, {}) })] })] }));
|
|
28557
27263
|
};
|