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.mjs
CHANGED
|
@@ -4,6 +4,7 @@ import React__default, { forwardRef, Component, createContext, useContext, useSt
|
|
|
4
4
|
import * as ReactDOM from 'react-dom';
|
|
5
5
|
import ReactDOM__default from 'react-dom';
|
|
6
6
|
import { createRoot } from 'react-dom/client';
|
|
7
|
+
import { useNavigate, Link } from 'react-router-dom';
|
|
7
8
|
|
|
8
9
|
function getAugmentedNamespace(n) {
|
|
9
10
|
if (n.__esModule) return n;
|
|
@@ -1262,7 +1263,7 @@ var fromEntries = function fromEntries(entries) {
|
|
|
1262
1263
|
* Small wrapper around `useLayoutEffect` to get rid of the warning on SSR envs
|
|
1263
1264
|
*/
|
|
1264
1265
|
|
|
1265
|
-
var useIsomorphicLayoutEffect
|
|
1266
|
+
var useIsomorphicLayoutEffect = typeof window !== 'undefined' && window.document && window.document.createElement ? React$3.useLayoutEffect : React$3.useEffect;
|
|
1266
1267
|
|
|
1267
1268
|
var top = 'top';
|
|
1268
1269
|
var bottom = 'bottom';
|
|
@@ -3266,12 +3267,12 @@ var usePopper = function usePopper(referenceElement, popperElement, options) {
|
|
|
3266
3267
|
}
|
|
3267
3268
|
}, [optionsWithDefaults.onFirstUpdate, optionsWithDefaults.placement, optionsWithDefaults.strategy, optionsWithDefaults.modifiers, updateStateModifier]);
|
|
3268
3269
|
var popperInstanceRef = React$3.useRef();
|
|
3269
|
-
useIsomorphicLayoutEffect
|
|
3270
|
+
useIsomorphicLayoutEffect(function () {
|
|
3270
3271
|
if (popperInstanceRef.current) {
|
|
3271
3272
|
popperInstanceRef.current.setOptions(popperOptions);
|
|
3272
3273
|
}
|
|
3273
3274
|
}, [popperOptions]);
|
|
3274
|
-
useIsomorphicLayoutEffect
|
|
3275
|
+
useIsomorphicLayoutEffect(function () {
|
|
3275
3276
|
if (referenceElement == null || popperElement == null) {
|
|
3276
3277
|
return;
|
|
3277
3278
|
}
|
|
@@ -3381,7 +3382,7 @@ function Popper(_ref) {
|
|
|
3381
3382
|
|
|
3382
3383
|
var __DEV__ = process.env.NODE_ENV !== 'production';
|
|
3383
3384
|
|
|
3384
|
-
var warning
|
|
3385
|
+
var warning = function() {};
|
|
3385
3386
|
|
|
3386
3387
|
if (__DEV__) {
|
|
3387
3388
|
var printWarning = function printWarning(format, args) {
|
|
@@ -3406,7 +3407,7 @@ if (__DEV__) {
|
|
|
3406
3407
|
} catch (x) {}
|
|
3407
3408
|
};
|
|
3408
3409
|
|
|
3409
|
-
warning
|
|
3410
|
+
warning = function(condition, format, args) {
|
|
3410
3411
|
var len = arguments.length;
|
|
3411
3412
|
args = new Array(len > 2 ? len - 2 : 0);
|
|
3412
3413
|
for (var key = 2; key < len; key++) {
|
|
@@ -3424,7 +3425,7 @@ if (__DEV__) {
|
|
|
3424
3425
|
};
|
|
3425
3426
|
}
|
|
3426
3427
|
|
|
3427
|
-
var warning_1 = warning
|
|
3428
|
+
var warning_1 = warning;
|
|
3428
3429
|
|
|
3429
3430
|
function Reference(_ref) {
|
|
3430
3431
|
var children = _ref.children,
|
|
@@ -3449,7 +3450,7 @@ function Reference(_ref) {
|
|
|
3449
3450
|
});
|
|
3450
3451
|
}
|
|
3451
3452
|
|
|
3452
|
-
function _objectWithoutPropertiesLoose$
|
|
3453
|
+
function _objectWithoutPropertiesLoose$3(r, e) {
|
|
3453
3454
|
if (null == r) return {};
|
|
3454
3455
|
var t = {};
|
|
3455
3456
|
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
@@ -3888,7 +3889,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
3888
3889
|
_this$props.onExiting;
|
|
3889
3890
|
_this$props.onExited;
|
|
3890
3891
|
_this$props.nodeRef;
|
|
3891
|
-
var childProps = _objectWithoutPropertiesLoose$
|
|
3892
|
+
var childProps = _objectWithoutPropertiesLoose$3(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
3892
3893
|
|
|
3893
3894
|
return (
|
|
3894
3895
|
/*#__PURE__*/
|
|
@@ -4167,8 +4168,8 @@ function _defineProperty$5(obj, key, value) {
|
|
|
4167
4168
|
return obj;
|
|
4168
4169
|
}
|
|
4169
4170
|
|
|
4170
|
-
function _extends$
|
|
4171
|
-
_extends$
|
|
4171
|
+
function _extends$3() {
|
|
4172
|
+
_extends$3 = Object.assign || function (target) {
|
|
4172
4173
|
for (var i = 1; i < arguments.length; i++) {
|
|
4173
4174
|
var source = arguments[i];
|
|
4174
4175
|
|
|
@@ -4182,10 +4183,10 @@ function _extends$6() {
|
|
|
4182
4183
|
return target;
|
|
4183
4184
|
};
|
|
4184
4185
|
|
|
4185
|
-
return _extends$
|
|
4186
|
+
return _extends$3.apply(this, arguments);
|
|
4186
4187
|
}
|
|
4187
4188
|
|
|
4188
|
-
function _objectWithoutPropertiesLoose$
|
|
4189
|
+
function _objectWithoutPropertiesLoose$2(source, excluded) {
|
|
4189
4190
|
if (source == null) return {};
|
|
4190
4191
|
var target = {};
|
|
4191
4192
|
var sourceKeys = Object.keys(source);
|
|
@@ -4203,7 +4204,7 @@ function _objectWithoutPropertiesLoose$3(source, excluded) {
|
|
|
4203
4204
|
function _objectWithoutProperties(source, excluded) {
|
|
4204
4205
|
if (source == null) return {};
|
|
4205
4206
|
|
|
4206
|
-
var target = _objectWithoutPropertiesLoose$
|
|
4207
|
+
var target = _objectWithoutPropertiesLoose$2(source, excluded);
|
|
4207
4208
|
|
|
4208
4209
|
var key, i;
|
|
4209
4210
|
|
|
@@ -4536,7 +4537,7 @@ const Row = props => {
|
|
|
4536
4537
|
colClasses.push(isXs ? `row-cols-${colSize}` : `row-cols-${colWidth}-${colSize}`);
|
|
4537
4538
|
});
|
|
4538
4539
|
const classes = mapToCssModules(classnames(className, noGutters ? 'gx-0' : null, form ? 'form-row' : 'row', colClasses), cssModule);
|
|
4539
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4540
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
4540
4541
|
className: classes
|
|
4541
4542
|
}));
|
|
4542
4543
|
};
|
|
@@ -4630,7 +4631,7 @@ const Col = props => {
|
|
|
4630
4631
|
}
|
|
4631
4632
|
|
|
4632
4633
|
const classes = mapToCssModules(classnames(className, colClasses), cssModule);
|
|
4633
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4634
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, modifiedAttributes, {
|
|
4634
4635
|
className: classes
|
|
4635
4636
|
}));
|
|
4636
4637
|
};
|
|
@@ -4705,7 +4706,7 @@ const defaultProps$19 = {
|
|
|
4705
4706
|
tag: 'a'
|
|
4706
4707
|
};
|
|
4707
4708
|
|
|
4708
|
-
class NavLink
|
|
4709
|
+
class NavLink extends React__default.Component {
|
|
4709
4710
|
constructor(props) {
|
|
4710
4711
|
super(props);
|
|
4711
4712
|
this.onClick = this.onClick.bind(this);
|
|
@@ -4741,7 +4742,7 @@ class NavLink$1 extends React__default.Component {
|
|
|
4741
4742
|
disabled: attributes.disabled,
|
|
4742
4743
|
active: active
|
|
4743
4744
|
}), cssModule);
|
|
4744
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4745
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
4745
4746
|
ref: innerRef,
|
|
4746
4747
|
onClick: this.onClick,
|
|
4747
4748
|
className: classes
|
|
@@ -4750,8 +4751,8 @@ class NavLink$1 extends React__default.Component {
|
|
|
4750
4751
|
|
|
4751
4752
|
}
|
|
4752
4753
|
|
|
4753
|
-
NavLink
|
|
4754
|
-
NavLink
|
|
4754
|
+
NavLink.propTypes = propTypes$1b;
|
|
4755
|
+
NavLink.defaultProps = defaultProps$19;
|
|
4755
4756
|
({
|
|
4756
4757
|
tag: tagPropType,
|
|
4757
4758
|
listTag: tagPropType,
|
|
@@ -4835,7 +4836,7 @@ class Button extends React__default.Component {
|
|
|
4835
4836
|
}
|
|
4836
4837
|
|
|
4837
4838
|
const defaultAriaLabel = close ? 'Close' : null;
|
|
4838
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
4839
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({
|
|
4839
4840
|
type: Tag === 'button' && attributes.onClick ? 'button' : undefined
|
|
4840
4841
|
}, attributes, {
|
|
4841
4842
|
className: classes,
|
|
@@ -4916,7 +4917,7 @@ class ButtonToggle extends React__default.Component {
|
|
|
4916
4917
|
const classes = mapToCssModules(classnames(className, {
|
|
4917
4918
|
focus: this.state.focus
|
|
4918
4919
|
}), this.props.cssModule);
|
|
4919
|
-
return /*#__PURE__*/React__default.createElement(Button$1, _extends$
|
|
4920
|
+
return /*#__PURE__*/React__default.createElement(Button$1, _extends$3({
|
|
4920
4921
|
active: this.state.toggled,
|
|
4921
4922
|
onBlur: this.onBlur,
|
|
4922
4923
|
onFocus: this.onFocus,
|
|
@@ -5199,7 +5200,7 @@ class Dropdown extends React__default.Component {
|
|
|
5199
5200
|
}), cssModule);
|
|
5200
5201
|
return /*#__PURE__*/React__default.createElement(DropdownContext.Provider, {
|
|
5201
5202
|
value: this.getContextValue()
|
|
5202
|
-
}, /*#__PURE__*/React__default.createElement(Manager, null, /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5203
|
+
}, /*#__PURE__*/React__default.createElement(Manager, null, /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attrs, {
|
|
5203
5204
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: this.containerRef,
|
|
5204
5205
|
onKeyDown: this.handleKeyDown,
|
|
5205
5206
|
className: classes
|
|
@@ -5217,7 +5218,7 @@ const propTypes$15 = {
|
|
|
5217
5218
|
};
|
|
5218
5219
|
|
|
5219
5220
|
const ButtonDropdown = props => {
|
|
5220
|
-
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$
|
|
5221
|
+
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$3({
|
|
5221
5222
|
group: true
|
|
5222
5223
|
}, props));
|
|
5223
5224
|
};
|
|
@@ -5349,7 +5350,7 @@ class DropdownItem extends React__default.Component {
|
|
|
5349
5350
|
}
|
|
5350
5351
|
}
|
|
5351
5352
|
|
|
5352
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5353
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({
|
|
5353
5354
|
type: Tag === 'button' && (props.onClick || this.props.toggle) ? 'button' : undefined
|
|
5354
5355
|
}, props, {
|
|
5355
5356
|
tabIndex: tabIndex,
|
|
@@ -5458,7 +5459,7 @@ class DropdownMenu extends React__default.Component {
|
|
|
5458
5459
|
if (onMenuRef) onMenuRef(tagRef);
|
|
5459
5460
|
};
|
|
5460
5461
|
|
|
5461
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5462
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({
|
|
5462
5463
|
tabIndex: "-1",
|
|
5463
5464
|
role: this.getRole(),
|
|
5464
5465
|
ref: handleRef
|
|
@@ -5477,7 +5478,7 @@ class DropdownMenu extends React__default.Component {
|
|
|
5477
5478
|
}
|
|
5478
5479
|
}
|
|
5479
5480
|
|
|
5480
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5481
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({
|
|
5481
5482
|
tabIndex: "-1",
|
|
5482
5483
|
role: this.getRole()
|
|
5483
5484
|
}, attrs, {
|
|
@@ -5576,7 +5577,7 @@ class DropdownToggle extends React__default.Component {
|
|
|
5576
5577
|
}
|
|
5577
5578
|
|
|
5578
5579
|
if (this.context.inNavbar) {
|
|
5579
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5580
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, props, {
|
|
5580
5581
|
className: classes,
|
|
5581
5582
|
onClick: this.onClick,
|
|
5582
5583
|
"aria-expanded": this.context.isOpen,
|
|
@@ -5589,7 +5590,7 @@ class DropdownToggle extends React__default.Component {
|
|
|
5589
5590
|
innerRef: innerRef
|
|
5590
5591
|
}, ({
|
|
5591
5592
|
ref
|
|
5592
|
-
}) => /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5593
|
+
}) => /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, props, {
|
|
5593
5594
|
[typeof Tag === 'string' ? 'ref' : 'innerRef']: ref,
|
|
5594
5595
|
className: classes,
|
|
5595
5596
|
onClick: this.onClick,
|
|
@@ -5646,7 +5647,7 @@ function Fade(props) {
|
|
|
5646
5647
|
return /*#__PURE__*/React__default.createElement(Transition$1, transitionProps, status => {
|
|
5647
5648
|
const isActive = status === 'entered';
|
|
5648
5649
|
const classes = mapToCssModules(classnames(className, baseClass, isActive && baseClassActive), cssModule);
|
|
5649
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5650
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({
|
|
5650
5651
|
className: classes
|
|
5651
5652
|
}, childProps, {
|
|
5652
5653
|
ref: innerRef
|
|
@@ -5808,7 +5809,7 @@ class Collapse extends Component {
|
|
|
5808
5809
|
} = this.state;
|
|
5809
5810
|
const transitionProps = pick(otherProps, TransitionPropTypeKeys);
|
|
5810
5811
|
const childProps = omit(otherProps, TransitionPropTypeKeys);
|
|
5811
|
-
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$
|
|
5812
|
+
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$3({}, transitionProps, {
|
|
5812
5813
|
in: isOpen,
|
|
5813
5814
|
onEntering: this.onEntering,
|
|
5814
5815
|
onEntered: this.onEntered,
|
|
@@ -5821,7 +5822,7 @@ class Collapse extends Component {
|
|
|
5821
5822
|
const style = dimension === null ? null : {
|
|
5822
5823
|
[horizontal ? 'width' : 'height']: dimension
|
|
5823
5824
|
};
|
|
5824
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
5825
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, childProps, {
|
|
5825
5826
|
style: _objectSpread2(_objectSpread2({}, childProps.style), style),
|
|
5826
5827
|
className: classes,
|
|
5827
5828
|
ref: this.props.innerRef
|
|
@@ -5975,7 +5976,7 @@ class CarouselItem extends React__default.Component {
|
|
|
5975
5976
|
} = _this$props,
|
|
5976
5977
|
transitionProps = _objectWithoutProperties(_this$props, _excluded$E);
|
|
5977
5978
|
|
|
5978
|
-
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$
|
|
5979
|
+
return /*#__PURE__*/React__default.createElement(Transition$1, _extends$3({}, transitionProps, {
|
|
5979
5980
|
enter: slide,
|
|
5980
5981
|
exit: slide,
|
|
5981
5982
|
in: isIn,
|
|
@@ -6504,7 +6505,7 @@ class UncontrolledCarousel extends Component {
|
|
|
6504
6505
|
captionHeader: item.header || item.caption
|
|
6505
6506
|
}));
|
|
6506
6507
|
});
|
|
6507
|
-
return /*#__PURE__*/React__default.createElement(Carousel$1, _extends$
|
|
6508
|
+
return /*#__PURE__*/React__default.createElement(Carousel$1, _extends$3({
|
|
6508
6509
|
activeIndex: activeIndex,
|
|
6509
6510
|
next: this.next,
|
|
6510
6511
|
previous: this.previous,
|
|
@@ -6690,7 +6691,7 @@ class PopperContent extends React__default.Component {
|
|
|
6690
6691
|
timeout: fade ? transition.timeout : 0
|
|
6691
6692
|
});
|
|
6692
6693
|
|
|
6693
|
-
return /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
6694
|
+
return /*#__PURE__*/React__default.createElement(Fade, _extends$3({}, popperTransition, attrs, {
|
|
6694
6695
|
in: isOpen,
|
|
6695
6696
|
onExited: this.onClosed,
|
|
6696
6697
|
tag: tag
|
|
@@ -7102,7 +7103,7 @@ class TooltipPopoverWrapper extends React__default.Component {
|
|
|
7102
7103
|
flip: flip
|
|
7103
7104
|
}, ({
|
|
7104
7105
|
update
|
|
7105
|
-
}) => /*#__PURE__*/React__default.createElement("div", _extends$
|
|
7106
|
+
}) => /*#__PURE__*/React__default.createElement("div", _extends$3({}, attributes, {
|
|
7106
7107
|
ref: this.getRef,
|
|
7107
7108
|
className: classes,
|
|
7108
7109
|
role: "tooltip",
|
|
@@ -7130,7 +7131,7 @@ const defaultProps$D = {
|
|
|
7130
7131
|
const Popover = props => {
|
|
7131
7132
|
const popperClasses = classnames('popover', 'show', props.popperClassName);
|
|
7132
7133
|
const classes = classnames('popover-inner', props.innerClassName);
|
|
7133
|
-
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$
|
|
7134
|
+
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$3({}, props, {
|
|
7134
7135
|
arrowClassName: "popover-arrow",
|
|
7135
7136
|
popperClassName: popperClasses,
|
|
7136
7137
|
innerClassName: classes
|
|
@@ -7158,7 +7159,7 @@ class UncontrolledPopover extends Component {
|
|
|
7158
7159
|
}
|
|
7159
7160
|
|
|
7160
7161
|
render() {
|
|
7161
|
-
return /*#__PURE__*/React__default.createElement(Popover$1, _extends$
|
|
7162
|
+
return /*#__PURE__*/React__default.createElement(Popover$1, _extends$3({
|
|
7162
7163
|
isOpen: this.state.isOpen,
|
|
7163
7164
|
toggle: this.toggle
|
|
7164
7165
|
}, omit(this.props, omitKeys$4)));
|
|
@@ -7597,7 +7598,7 @@ class Modal extends React__default.Component {
|
|
|
7597
7598
|
renderModalDialog() {
|
|
7598
7599
|
const attributes = omit(this.props, propsToOmit$1);
|
|
7599
7600
|
const dialogBaseClass = 'modal-dialog';
|
|
7600
|
-
return /*#__PURE__*/React__default.createElement("div", _extends$
|
|
7601
|
+
return /*#__PURE__*/React__default.createElement("div", _extends$3({}, attributes, {
|
|
7601
7602
|
className: mapToCssModules(classnames(dialogBaseClass, this.props.className, {
|
|
7602
7603
|
[`modal-${this.props.size}`]: this.props.size,
|
|
7603
7604
|
[`${dialogBaseClass}-centered`]: this.props.centered,
|
|
@@ -7658,7 +7659,7 @@ class Modal extends React__default.Component {
|
|
|
7658
7659
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
7659
7660
|
});
|
|
7660
7661
|
|
|
7661
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
7662
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$3({}, backdropTransition, {
|
|
7662
7663
|
in: isOpen && !!backdrop,
|
|
7663
7664
|
cssModule: cssModule,
|
|
7664
7665
|
className: mapToCssModules(classnames('modal-backdrop', backdropClassName), cssModule)
|
|
@@ -7669,7 +7670,7 @@ class Modal extends React__default.Component {
|
|
|
7669
7670
|
node: this._element
|
|
7670
7671
|
}, /*#__PURE__*/React__default.createElement("div", {
|
|
7671
7672
|
className: mapToCssModules(wrapClassName)
|
|
7672
|
-
}, /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
7673
|
+
}, /*#__PURE__*/React__default.createElement(Fade, _extends$3({}, modalAttributes, modalTransition, {
|
|
7673
7674
|
in: isOpen,
|
|
7674
7675
|
onEntered: this.onOpened,
|
|
7675
7676
|
onExited: this.onClosed,
|
|
@@ -7725,7 +7726,7 @@ const defaultProps$v = {
|
|
|
7725
7726
|
const Tooltip = props => {
|
|
7726
7727
|
const popperClasses = classnames('tooltip', 'show', props.popperClassName);
|
|
7727
7728
|
const classes = classnames('tooltip-inner', props.innerClassName);
|
|
7728
|
-
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$
|
|
7729
|
+
return /*#__PURE__*/React__default.createElement(TooltipPopoverWrapper$1, _extends$3({}, props, {
|
|
7729
7730
|
arrowClassName: "tooltip-arrow",
|
|
7730
7731
|
popperClassName: popperClasses,
|
|
7731
7732
|
innerClassName: classes
|
|
@@ -7771,7 +7772,7 @@ const defaultProps$s = {
|
|
|
7771
7772
|
tag: 'form'
|
|
7772
7773
|
};
|
|
7773
7774
|
|
|
7774
|
-
class Form
|
|
7775
|
+
class Form extends Component {
|
|
7775
7776
|
constructor(props) {
|
|
7776
7777
|
super(props);
|
|
7777
7778
|
this.getRef = this.getRef.bind(this);
|
|
@@ -7804,7 +7805,7 @@ class Form$1 extends Component {
|
|
|
7804
7805
|
attributes = _objectWithoutProperties(_this$props, _excluded$q);
|
|
7805
7806
|
|
|
7806
7807
|
const classes = mapToCssModules(classnames(className, inline ? 'form-inline' : false), cssModule);
|
|
7807
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
7808
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
7808
7809
|
ref: innerRef,
|
|
7809
7810
|
className: classes
|
|
7810
7811
|
}));
|
|
@@ -7812,8 +7813,8 @@ class Form$1 extends Component {
|
|
|
7812
7813
|
|
|
7813
7814
|
}
|
|
7814
7815
|
|
|
7815
|
-
Form
|
|
7816
|
-
Form
|
|
7816
|
+
Form.propTypes = propTypes$t;
|
|
7817
|
+
Form.defaultProps = defaultProps$s;
|
|
7817
7818
|
|
|
7818
7819
|
const _excluded$p = ["className", "cssModule", "valid", "tooltip", "tag"];
|
|
7819
7820
|
const propTypes$s = {
|
|
@@ -7841,7 +7842,7 @@ const FormFeedback = props => {
|
|
|
7841
7842
|
|
|
7842
7843
|
const validMode = tooltip ? 'tooltip' : 'feedback';
|
|
7843
7844
|
const classes = mapToCssModules(classnames(className, valid ? `valid-${validMode}` : `invalid-${validMode}`), cssModule);
|
|
7844
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
7845
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
7845
7846
|
className: classes
|
|
7846
7847
|
}));
|
|
7847
7848
|
};
|
|
@@ -7966,7 +7967,7 @@ class Input extends React__default.Component {
|
|
|
7966
7967
|
delete attributes.children;
|
|
7967
7968
|
}
|
|
7968
7969
|
|
|
7969
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
7970
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
7970
7971
|
ref: innerRef,
|
|
7971
7972
|
className: classes,
|
|
7972
7973
|
"aria-invalid": invalid
|
|
@@ -8070,7 +8071,7 @@ const Label = props => {
|
|
|
8070
8071
|
}
|
|
8071
8072
|
});
|
|
8072
8073
|
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);
|
|
8073
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8074
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({
|
|
8074
8075
|
htmlFor: htmlFor
|
|
8075
8076
|
}, attributes, {
|
|
8076
8077
|
className: classes
|
|
@@ -8462,7 +8463,7 @@ class Offcanvas extends React__default.Component {
|
|
|
8462
8463
|
timeout: hasTransition ? this.props.backdropTransition.timeout : 0
|
|
8463
8464
|
});
|
|
8464
8465
|
|
|
8465
|
-
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
8466
|
+
const Backdrop = backdrop && (hasTransition ? /*#__PURE__*/React__default.createElement(Fade, _extends$3({}, backdropTransition, {
|
|
8466
8467
|
in: isOpen && !!backdrop,
|
|
8467
8468
|
innerRef: c => {
|
|
8468
8469
|
this._backdrop = c;
|
|
@@ -8479,7 +8480,7 @@ class Offcanvas extends React__default.Component {
|
|
|
8479
8480
|
const attributes = omit(this.props, propsToOmit);
|
|
8480
8481
|
return /*#__PURE__*/React__default.createElement(Portal$1, {
|
|
8481
8482
|
node: this._element
|
|
8482
|
-
}, /*#__PURE__*/React__default.createElement(Fade, _extends$
|
|
8483
|
+
}, /*#__PURE__*/React__default.createElement(Fade, _extends$3({}, attributes, offcanvasAttributes, offcanvasTransition, {
|
|
8483
8484
|
in: isOpen,
|
|
8484
8485
|
onEntered: this.onOpened,
|
|
8485
8486
|
onExited: this.onClosed,
|
|
@@ -8603,7 +8604,7 @@ class TabContent extends Component {
|
|
|
8603
8604
|
value: {
|
|
8604
8605
|
activeTabId: this.state.activeTab
|
|
8605
8606
|
}
|
|
8606
|
-
}, /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8607
|
+
}, /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
8607
8608
|
className: classes
|
|
8608
8609
|
})));
|
|
8609
8610
|
}
|
|
@@ -8717,7 +8718,7 @@ const List = forwardRef((props, ref) => {
|
|
|
8717
8718
|
attributes = _objectWithoutProperties(props, _excluded$4);
|
|
8718
8719
|
|
|
8719
8720
|
const classes = mapToCssModules(classnames(className, type ? `list-${type}` : false), cssModule);
|
|
8720
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8721
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
8721
8722
|
className: classes,
|
|
8722
8723
|
ref: ref
|
|
8723
8724
|
}));
|
|
@@ -8744,7 +8745,7 @@ const ListInlineItem = forwardRef((props, ref) => {
|
|
|
8744
8745
|
attributes = _objectWithoutProperties(props, _excluded$3);
|
|
8745
8746
|
|
|
8746
8747
|
const classes = mapToCssModules(classnames(className, 'list-inline-item'), cssModule);
|
|
8747
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8748
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({}, attributes, {
|
|
8748
8749
|
className: classes,
|
|
8749
8750
|
ref: ref
|
|
8750
8751
|
}));
|
|
@@ -8770,7 +8771,7 @@ class UncontrolledButtonDropdown extends Component {
|
|
|
8770
8771
|
}
|
|
8771
8772
|
|
|
8772
8773
|
render() {
|
|
8773
|
-
return /*#__PURE__*/React__default.createElement(ButtonDropdown$1, _extends$
|
|
8774
|
+
return /*#__PURE__*/React__default.createElement(ButtonDropdown$1, _extends$3({
|
|
8774
8775
|
isOpen: this.state.isOpen,
|
|
8775
8776
|
toggle: this.toggle
|
|
8776
8777
|
}, omit(this.props, omitKeys$3)));
|
|
@@ -8826,7 +8827,7 @@ class UncontrolledCollapse extends Component {
|
|
|
8826
8827
|
}
|
|
8827
8828
|
|
|
8828
8829
|
render() {
|
|
8829
|
-
return /*#__PURE__*/React__default.createElement(Collapse$1, _extends$
|
|
8830
|
+
return /*#__PURE__*/React__default.createElement(Collapse$1, _extends$3({
|
|
8830
8831
|
isOpen: this.state.isOpen
|
|
8831
8832
|
}, omit(this.props, omitKeys$2)));
|
|
8832
8833
|
}
|
|
@@ -8858,7 +8859,7 @@ class UncontrolledDropdown extends Component {
|
|
|
8858
8859
|
}
|
|
8859
8860
|
|
|
8860
8861
|
render() {
|
|
8861
|
-
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$
|
|
8862
|
+
return /*#__PURE__*/React__default.createElement(Dropdown$1, _extends$3({
|
|
8862
8863
|
isOpen: this.state.isOpen,
|
|
8863
8864
|
toggle: this.toggle
|
|
8864
8865
|
}, omit(this.props, omitKeys$1)));
|
|
@@ -8887,7 +8888,7 @@ class UncontrolledTooltip extends Component {
|
|
|
8887
8888
|
}
|
|
8888
8889
|
|
|
8889
8890
|
render() {
|
|
8890
|
-
return /*#__PURE__*/React__default.createElement(Tooltip$1, _extends$
|
|
8891
|
+
return /*#__PURE__*/React__default.createElement(Tooltip$1, _extends$3({
|
|
8891
8892
|
isOpen: this.state.isOpen,
|
|
8892
8893
|
toggle: this.toggle
|
|
8893
8894
|
}, omit(this.props, omitKeys)));
|
|
@@ -8898,7 +8899,7 @@ UncontrolledTooltip.propTypes = _objectSpread2({
|
|
|
8898
8899
|
defaultOpen: PropTypes.bool
|
|
8899
8900
|
}, Tooltip$1.propTypes);
|
|
8900
8901
|
|
|
8901
|
-
const _excluded$2
|
|
8902
|
+
const _excluded$2 = ["className", "cssModule", "type", "size", "color", "children", "tag"];
|
|
8902
8903
|
const propTypes$2 = {
|
|
8903
8904
|
tag: tagPropType,
|
|
8904
8905
|
type: PropTypes.string,
|
|
@@ -8924,10 +8925,10 @@ const Spinner = props => {
|
|
|
8924
8925
|
children,
|
|
8925
8926
|
tag: Tag
|
|
8926
8927
|
} = props,
|
|
8927
|
-
attributes = _objectWithoutProperties(props, _excluded$2
|
|
8928
|
+
attributes = _objectWithoutProperties(props, _excluded$2);
|
|
8928
8929
|
|
|
8929
8930
|
const classes = mapToCssModules(classnames(className, size ? `spinner-${type}-${size}` : false, `spinner-${type}`, color ? `text-${color}` : false), cssModule);
|
|
8930
|
-
return /*#__PURE__*/React__default.createElement(Tag, _extends$
|
|
8931
|
+
return /*#__PURE__*/React__default.createElement(Tag, _extends$3({
|
|
8931
8932
|
role: "status"
|
|
8932
8933
|
}, attributes, {
|
|
8933
8934
|
className: classes
|
|
@@ -19109,8 +19110,8 @@ function withReactContent(ParentSwal) {
|
|
|
19109
19110
|
|
|
19110
19111
|
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;}
|
|
19111
19112
|
|
|
19112
|
-
function _extends$
|
|
19113
|
-
_extends$
|
|
19113
|
+
function _extends$2() {
|
|
19114
|
+
_extends$2 = Object.assign || function (target) {
|
|
19114
19115
|
for (var i = 1; i < arguments.length; i++) {
|
|
19115
19116
|
var source = arguments[i];
|
|
19116
19117
|
|
|
@@ -19124,7 +19125,7 @@ function _extends$5() {
|
|
|
19124
19125
|
return target;
|
|
19125
19126
|
};
|
|
19126
19127
|
|
|
19127
|
-
return _extends$
|
|
19128
|
+
return _extends$2.apply(this, arguments);
|
|
19128
19129
|
}
|
|
19129
19130
|
|
|
19130
19131
|
var isFunction$2 = function isFunction(valOrFunction) {
|
|
@@ -19183,7 +19184,7 @@ var clearFromRemoveQueue = function clearFromRemoveQueue(toastId) {
|
|
|
19183
19184
|
var reducer = function reducer(state, action) {
|
|
19184
19185
|
switch (action.type) {
|
|
19185
19186
|
case ActionType.ADD_TOAST:
|
|
19186
|
-
return _extends$
|
|
19187
|
+
return _extends$2({}, state, {
|
|
19187
19188
|
toasts: [action.toast].concat(state.toasts).slice(0, TOAST_LIMIT)
|
|
19188
19189
|
});
|
|
19189
19190
|
|
|
@@ -19193,9 +19194,9 @@ var reducer = function reducer(state, action) {
|
|
|
19193
19194
|
clearFromRemoveQueue(action.toast.id);
|
|
19194
19195
|
}
|
|
19195
19196
|
|
|
19196
|
-
return _extends$
|
|
19197
|
+
return _extends$2({}, state, {
|
|
19197
19198
|
toasts: state.toasts.map(function (t) {
|
|
19198
|
-
return t.id === action.toast.id ? _extends$
|
|
19199
|
+
return t.id === action.toast.id ? _extends$2({}, t, action.toast) : t;
|
|
19199
19200
|
})
|
|
19200
19201
|
});
|
|
19201
19202
|
|
|
@@ -19222,9 +19223,9 @@ var reducer = function reducer(state, action) {
|
|
|
19222
19223
|
});
|
|
19223
19224
|
}
|
|
19224
19225
|
|
|
19225
|
-
return _extends$
|
|
19226
|
+
return _extends$2({}, state, {
|
|
19226
19227
|
toasts: state.toasts.map(function (t) {
|
|
19227
|
-
return t.id === toastId || toastId === undefined ? _extends$
|
|
19228
|
+
return t.id === toastId || toastId === undefined ? _extends$2({}, t, {
|
|
19228
19229
|
visible: false
|
|
19229
19230
|
}) : t;
|
|
19230
19231
|
})
|
|
@@ -19232,28 +19233,28 @@ var reducer = function reducer(state, action) {
|
|
|
19232
19233
|
|
|
19233
19234
|
case ActionType.REMOVE_TOAST:
|
|
19234
19235
|
if (action.toastId === undefined) {
|
|
19235
|
-
return _extends$
|
|
19236
|
+
return _extends$2({}, state, {
|
|
19236
19237
|
toasts: []
|
|
19237
19238
|
});
|
|
19238
19239
|
}
|
|
19239
19240
|
|
|
19240
|
-
return _extends$
|
|
19241
|
+
return _extends$2({}, state, {
|
|
19241
19242
|
toasts: state.toasts.filter(function (t) {
|
|
19242
19243
|
return t.id !== action.toastId;
|
|
19243
19244
|
})
|
|
19244
19245
|
});
|
|
19245
19246
|
|
|
19246
19247
|
case ActionType.START_PAUSE:
|
|
19247
|
-
return _extends$
|
|
19248
|
+
return _extends$2({}, state, {
|
|
19248
19249
|
pausedAt: action.time
|
|
19249
19250
|
});
|
|
19250
19251
|
|
|
19251
19252
|
case ActionType.END_PAUSE:
|
|
19252
19253
|
var diff = action.time - (state.pausedAt || 0);
|
|
19253
|
-
return _extends$
|
|
19254
|
+
return _extends$2({}, state, {
|
|
19254
19255
|
pausedAt: undefined,
|
|
19255
19256
|
toasts: state.toasts.map(function (t) {
|
|
19256
|
-
return _extends$
|
|
19257
|
+
return _extends$2({}, t, {
|
|
19257
19258
|
pauseDuration: t.pauseDuration + diff
|
|
19258
19259
|
});
|
|
19259
19260
|
})
|
|
@@ -19277,7 +19278,7 @@ var createToast = function createToast(message, type, opts) {
|
|
|
19277
19278
|
type = 'blank';
|
|
19278
19279
|
}
|
|
19279
19280
|
|
|
19280
|
-
return _extends$
|
|
19281
|
+
return _extends$2({
|
|
19281
19282
|
createdAt: Date.now(),
|
|
19282
19283
|
visible: true,
|
|
19283
19284
|
type: type,
|
|
@@ -19327,14 +19328,14 @@ toast.remove = function (toastId) {
|
|
|
19327
19328
|
};
|
|
19328
19329
|
|
|
19329
19330
|
toast.promise = function (promise, msgs, opts) {
|
|
19330
|
-
var id = toast.loading(msgs.loading, _extends$
|
|
19331
|
+
var id = toast.loading(msgs.loading, _extends$2({}, opts, opts == null ? void 0 : opts.loading));
|
|
19331
19332
|
promise.then(function (p) {
|
|
19332
|
-
toast.success(resolveValue(msgs.success, p), _extends$
|
|
19333
|
+
toast.success(resolveValue(msgs.success, p), _extends$2({
|
|
19333
19334
|
id: id
|
|
19334
19335
|
}, opts, opts == null ? void 0 : opts.success));
|
|
19335
19336
|
return p;
|
|
19336
19337
|
})["catch"](function (e) {
|
|
19337
|
-
toast.error(resolveValue(msgs.error, e), _extends$
|
|
19338
|
+
toast.error(resolveValue(msgs.error, e), _extends$2({
|
|
19338
19339
|
id: id
|
|
19339
19340
|
}, opts, opts == null ? void 0 : opts.error));
|
|
19340
19341
|
});
|
|
@@ -21512,11 +21513,11 @@ var React$1 = _interopRequireWildcard$1(React__default);
|
|
|
21512
21513
|
var _reactDraggable = cjs.exports;
|
|
21513
21514
|
var _utils = utils;
|
|
21514
21515
|
var _propTypes$1 = propTypes;
|
|
21515
|
-
var _excluded$
|
|
21516
|
+
var _excluded$1 = ["children", "className", "draggableOpts", "width", "height", "handle", "handleSize", "lockAspectRatio", "axis", "minConstraints", "maxConstraints", "onResize", "onResizeStop", "onResizeStart", "resizeHandles", "transformScale"];
|
|
21516
21517
|
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); }
|
|
21517
21518
|
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; }
|
|
21518
|
-
function _extends$
|
|
21519
|
-
function _objectWithoutPropertiesLoose$
|
|
21519
|
+
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); }
|
|
21520
|
+
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; }
|
|
21520
21521
|
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; }
|
|
21521
21522
|
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; }
|
|
21522
21523
|
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; }
|
|
@@ -21725,7 +21726,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
21725
21726
|
_this$props2.onResizeStart;
|
|
21726
21727
|
var resizeHandles = _this$props2.resizeHandles;
|
|
21727
21728
|
_this$props2.transformScale;
|
|
21728
|
-
var p = _objectWithoutPropertiesLoose$
|
|
21729
|
+
var p = _objectWithoutPropertiesLoose$1(_this$props2, _excluded$1);
|
|
21729
21730
|
|
|
21730
21731
|
// What we're doing here is getting the child of this element, and cloning it with this element's props.
|
|
21731
21732
|
// We are then defining its children as:
|
|
@@ -21737,7 +21738,7 @@ var Resizable$1 = /*#__PURE__*/function (_React$Component) {
|
|
|
21737
21738
|
var _this3$handleRefs$han;
|
|
21738
21739
|
// Create a ref to the handle so that `<DraggableCore>` doesn't have to use ReactDOM.findDOMNode().
|
|
21739
21740
|
var ref = (_this3$handleRefs$han = _this3.handleRefs[handleAxis]) != null ? _this3$handleRefs$han : _this3.handleRefs[handleAxis] = /*#__PURE__*/React$1.createRef();
|
|
21740
|
-
return /*#__PURE__*/React$1.createElement(_reactDraggable.DraggableCore, _extends$
|
|
21741
|
+
return /*#__PURE__*/React$1.createElement(_reactDraggable.DraggableCore, _extends$1({}, draggableOpts, {
|
|
21741
21742
|
nodeRef: ref,
|
|
21742
21743
|
key: "resizableHandle-" + handleAxis,
|
|
21743
21744
|
onStop: _this3.resizeHandler('onResizeStop', handleAxis),
|
|
@@ -21769,17 +21770,17 @@ var React = _interopRequireWildcard(React__default);
|
|
|
21769
21770
|
var _propTypes = _interopRequireDefault(propTypes$1.exports);
|
|
21770
21771
|
var _Resizable = _interopRequireDefault(Resizable$2);
|
|
21771
21772
|
var _propTypes2 = propTypes;
|
|
21772
|
-
var _excluded
|
|
21773
|
+
var _excluded = ["handle", "handleSize", "onResize", "onResizeStart", "onResizeStop", "draggableOpts", "minConstraints", "maxConstraints", "lockAspectRatio", "axis", "width", "height", "resizeHandles", "style", "transformScale"];
|
|
21773
21774
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21774
21775
|
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); }
|
|
21775
21776
|
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; }
|
|
21776
|
-
function _extends
|
|
21777
|
+
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); }
|
|
21777
21778
|
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; }
|
|
21778
21779
|
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; }
|
|
21779
21780
|
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; }
|
|
21780
21781
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
21781
21782
|
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); }
|
|
21782
|
-
function _objectWithoutPropertiesLoose
|
|
21783
|
+
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; }
|
|
21783
21784
|
function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); }
|
|
21784
21785
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
21785
21786
|
var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
@@ -21842,7 +21843,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
21842
21843
|
var resizeHandles = _this$props.resizeHandles,
|
|
21843
21844
|
style = _this$props.style,
|
|
21844
21845
|
transformScale = _this$props.transformScale,
|
|
21845
|
-
props = _objectWithoutPropertiesLoose
|
|
21846
|
+
props = _objectWithoutPropertiesLoose(_this$props, _excluded);
|
|
21846
21847
|
return /*#__PURE__*/React.createElement(_Resizable.default, {
|
|
21847
21848
|
axis: axis,
|
|
21848
21849
|
draggableOpts: draggableOpts,
|
|
@@ -21858,7 +21859,7 @@ var ResizableBox = /*#__PURE__*/function (_React$Component) {
|
|
|
21858
21859
|
resizeHandles: resizeHandles,
|
|
21859
21860
|
transformScale: transformScale,
|
|
21860
21861
|
width: this.state.width
|
|
21861
|
-
}, /*#__PURE__*/React.createElement("div", _extends
|
|
21862
|
+
}, /*#__PURE__*/React.createElement("div", _extends({}, props, {
|
|
21862
21863
|
style: _objectSpread(_objectSpread({}, style), {}, {
|
|
21863
21864
|
width: this.state.width + 'px',
|
|
21864
21865
|
height: this.state.height + 'px'
|
|
@@ -27151,1301 +27152,6 @@ const TableEdit = forwardRef((props, ref) => {
|
|
|
27151
27152
|
}) }) : jsx(Fragment$1, {}) })] }) }), toolbarSetting?.showBottomToolbar ? jsx(Fragment$1, { children: renderToolbarBottom() }) : jsx(Fragment$1, {})] }), pagingSetting?.allowPaging ? 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 }) : jsx(Fragment$1, {})] }), jsx(SidebarSetColumn, { handleSidebar: () => { setOpenPopupSetupColumn(!openPopupSetupColumn); }, openSidebar: openPopupSetupColumn, column: [...contentColumns], setColumn: setContentColumns })] }));
|
|
27152
27153
|
});
|
|
27153
27154
|
|
|
27154
|
-
/**
|
|
27155
|
-
* @remix-run/router v1.21.0
|
|
27156
|
-
*
|
|
27157
|
-
* Copyright (c) Remix Software Inc.
|
|
27158
|
-
*
|
|
27159
|
-
* This source code is licensed under the MIT license found in the
|
|
27160
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
27161
|
-
*
|
|
27162
|
-
* @license MIT
|
|
27163
|
-
*/
|
|
27164
|
-
function _extends$2() {
|
|
27165
|
-
_extends$2 = Object.assign ? Object.assign.bind() : function (target) {
|
|
27166
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
27167
|
-
var source = arguments[i];
|
|
27168
|
-
for (var key in source) {
|
|
27169
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
27170
|
-
target[key] = source[key];
|
|
27171
|
-
}
|
|
27172
|
-
}
|
|
27173
|
-
}
|
|
27174
|
-
return target;
|
|
27175
|
-
};
|
|
27176
|
-
return _extends$2.apply(this, arguments);
|
|
27177
|
-
}
|
|
27178
|
-
|
|
27179
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
27180
|
-
//#region Types and Constants
|
|
27181
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
27182
|
-
/**
|
|
27183
|
-
* Actions represent the type of change to a location value.
|
|
27184
|
-
*/
|
|
27185
|
-
var Action;
|
|
27186
|
-
(function (Action) {
|
|
27187
|
-
/**
|
|
27188
|
-
* A POP indicates a change to an arbitrary index in the history stack, such
|
|
27189
|
-
* as a back or forward navigation. It does not describe the direction of the
|
|
27190
|
-
* navigation, only that the current index changed.
|
|
27191
|
-
*
|
|
27192
|
-
* Note: This is the default action for newly created history objects.
|
|
27193
|
-
*/
|
|
27194
|
-
Action["Pop"] = "POP";
|
|
27195
|
-
/**
|
|
27196
|
-
* A PUSH indicates a new entry being added to the history stack, such as when
|
|
27197
|
-
* a link is clicked and a new page loads. When this happens, all subsequent
|
|
27198
|
-
* entries in the stack are lost.
|
|
27199
|
-
*/
|
|
27200
|
-
Action["Push"] = "PUSH";
|
|
27201
|
-
/**
|
|
27202
|
-
* A REPLACE indicates the entry at the current index in the history stack
|
|
27203
|
-
* being replaced by a new one.
|
|
27204
|
-
*/
|
|
27205
|
-
Action["Replace"] = "REPLACE";
|
|
27206
|
-
})(Action || (Action = {}));
|
|
27207
|
-
function invariant(value, message) {
|
|
27208
|
-
if (value === false || value === null || typeof value === "undefined") {
|
|
27209
|
-
throw new Error(message);
|
|
27210
|
-
}
|
|
27211
|
-
}
|
|
27212
|
-
function warning(cond, message) {
|
|
27213
|
-
if (!cond) {
|
|
27214
|
-
// eslint-disable-next-line no-console
|
|
27215
|
-
if (typeof console !== "undefined") console.warn(message);
|
|
27216
|
-
try {
|
|
27217
|
-
// Welcome to debugging history!
|
|
27218
|
-
//
|
|
27219
|
-
// This error is thrown as a convenience, so you can more easily
|
|
27220
|
-
// find the source for a warning that appears in the console by
|
|
27221
|
-
// enabling "pause on exceptions" in your JavaScript debugger.
|
|
27222
|
-
throw new Error(message);
|
|
27223
|
-
// eslint-disable-next-line no-empty
|
|
27224
|
-
} catch (e) {}
|
|
27225
|
-
}
|
|
27226
|
-
}
|
|
27227
|
-
/**
|
|
27228
|
-
* Creates a string URL path from the given pathname, search, and hash components.
|
|
27229
|
-
*/
|
|
27230
|
-
function createPath(_ref) {
|
|
27231
|
-
let {
|
|
27232
|
-
pathname = "/",
|
|
27233
|
-
search = "",
|
|
27234
|
-
hash = ""
|
|
27235
|
-
} = _ref;
|
|
27236
|
-
if (search && search !== "?") pathname += search.charAt(0) === "?" ? search : "?" + search;
|
|
27237
|
-
if (hash && hash !== "#") pathname += hash.charAt(0) === "#" ? hash : "#" + hash;
|
|
27238
|
-
return pathname;
|
|
27239
|
-
}
|
|
27240
|
-
/**
|
|
27241
|
-
* Parses a string URL path into its separate pathname, search, and hash components.
|
|
27242
|
-
*/
|
|
27243
|
-
function parsePath(path) {
|
|
27244
|
-
let parsedPath = {};
|
|
27245
|
-
if (path) {
|
|
27246
|
-
let hashIndex = path.indexOf("#");
|
|
27247
|
-
if (hashIndex >= 0) {
|
|
27248
|
-
parsedPath.hash = path.substr(hashIndex);
|
|
27249
|
-
path = path.substr(0, hashIndex);
|
|
27250
|
-
}
|
|
27251
|
-
let searchIndex = path.indexOf("?");
|
|
27252
|
-
if (searchIndex >= 0) {
|
|
27253
|
-
parsedPath.search = path.substr(searchIndex);
|
|
27254
|
-
path = path.substr(0, searchIndex);
|
|
27255
|
-
}
|
|
27256
|
-
if (path) {
|
|
27257
|
-
parsedPath.pathname = path;
|
|
27258
|
-
}
|
|
27259
|
-
}
|
|
27260
|
-
return parsedPath;
|
|
27261
|
-
}
|
|
27262
|
-
//#endregion
|
|
27263
|
-
|
|
27264
|
-
var ResultType;
|
|
27265
|
-
(function (ResultType) {
|
|
27266
|
-
ResultType["data"] = "data";
|
|
27267
|
-
ResultType["deferred"] = "deferred";
|
|
27268
|
-
ResultType["redirect"] = "redirect";
|
|
27269
|
-
ResultType["error"] = "error";
|
|
27270
|
-
})(ResultType || (ResultType = {}));
|
|
27271
|
-
/**
|
|
27272
|
-
* Performs pattern matching on a URL pathname and returns information about
|
|
27273
|
-
* the match.
|
|
27274
|
-
*
|
|
27275
|
-
* @see https://reactrouter.com/v6/utils/match-path
|
|
27276
|
-
*/
|
|
27277
|
-
function matchPath(pattern, pathname) {
|
|
27278
|
-
if (typeof pattern === "string") {
|
|
27279
|
-
pattern = {
|
|
27280
|
-
path: pattern,
|
|
27281
|
-
caseSensitive: false,
|
|
27282
|
-
end: true
|
|
27283
|
-
};
|
|
27284
|
-
}
|
|
27285
|
-
let [matcher, compiledParams] = compilePath(pattern.path, pattern.caseSensitive, pattern.end);
|
|
27286
|
-
let match = pathname.match(matcher);
|
|
27287
|
-
if (!match) return null;
|
|
27288
|
-
let matchedPathname = match[0];
|
|
27289
|
-
let pathnameBase = matchedPathname.replace(/(.)\/+$/, "$1");
|
|
27290
|
-
let captureGroups = match.slice(1);
|
|
27291
|
-
let params = compiledParams.reduce((memo, _ref, index) => {
|
|
27292
|
-
let {
|
|
27293
|
-
paramName,
|
|
27294
|
-
isOptional
|
|
27295
|
-
} = _ref;
|
|
27296
|
-
// We need to compute the pathnameBase here using the raw splat value
|
|
27297
|
-
// instead of using params["*"] later because it will be decoded then
|
|
27298
|
-
if (paramName === "*") {
|
|
27299
|
-
let splatValue = captureGroups[index] || "";
|
|
27300
|
-
pathnameBase = matchedPathname.slice(0, matchedPathname.length - splatValue.length).replace(/(.)\/+$/, "$1");
|
|
27301
|
-
}
|
|
27302
|
-
const value = captureGroups[index];
|
|
27303
|
-
if (isOptional && !value) {
|
|
27304
|
-
memo[paramName] = undefined;
|
|
27305
|
-
} else {
|
|
27306
|
-
memo[paramName] = (value || "").replace(/%2F/g, "/");
|
|
27307
|
-
}
|
|
27308
|
-
return memo;
|
|
27309
|
-
}, {});
|
|
27310
|
-
return {
|
|
27311
|
-
params,
|
|
27312
|
-
pathname: matchedPathname,
|
|
27313
|
-
pathnameBase,
|
|
27314
|
-
pattern
|
|
27315
|
-
};
|
|
27316
|
-
}
|
|
27317
|
-
function compilePath(path, caseSensitive, end) {
|
|
27318
|
-
if (caseSensitive === void 0) {
|
|
27319
|
-
caseSensitive = false;
|
|
27320
|
-
}
|
|
27321
|
-
if (end === void 0) {
|
|
27322
|
-
end = true;
|
|
27323
|
-
}
|
|
27324
|
-
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(/\*$/, "/*") + "\"."));
|
|
27325
|
-
let params = [];
|
|
27326
|
-
let regexpSource = "^" + path.replace(/\/*\*?$/, "") // Ignore trailing / and /*, we'll handle it below
|
|
27327
|
-
.replace(/^\/*/, "/") // Make sure it has a leading /
|
|
27328
|
-
.replace(/[\\.*+^${}|()[\]]/g, "\\$&") // Escape special regex chars
|
|
27329
|
-
.replace(/\/:([\w-]+)(\?)?/g, (_, paramName, isOptional) => {
|
|
27330
|
-
params.push({
|
|
27331
|
-
paramName,
|
|
27332
|
-
isOptional: isOptional != null
|
|
27333
|
-
});
|
|
27334
|
-
return isOptional ? "/?([^\\/]+)?" : "/([^\\/]+)";
|
|
27335
|
-
});
|
|
27336
|
-
if (path.endsWith("*")) {
|
|
27337
|
-
params.push({
|
|
27338
|
-
paramName: "*"
|
|
27339
|
-
});
|
|
27340
|
-
regexpSource += path === "*" || path === "/*" ? "(.*)$" // Already matched the initial /, just match the rest
|
|
27341
|
-
: "(?:\\/(.+)|\\/*)$"; // Don't include the / in params["*"]
|
|
27342
|
-
} else if (end) {
|
|
27343
|
-
// When matching to the end, ignore trailing slashes
|
|
27344
|
-
regexpSource += "\\/*$";
|
|
27345
|
-
} else if (path !== "" && path !== "/") {
|
|
27346
|
-
// If our path is non-empty and contains anything beyond an initial slash,
|
|
27347
|
-
// then we have _some_ form of path in our regex, so we should expect to
|
|
27348
|
-
// match only if we find the end of this path segment. Look for an optional
|
|
27349
|
-
// non-captured trailing slash (to match a portion of the URL) or the end
|
|
27350
|
-
// of the path (if we've matched to the end). We used to do this with a
|
|
27351
|
-
// word boundary but that gives false positives on routes like
|
|
27352
|
-
// /user-preferences since `-` counts as a word boundary.
|
|
27353
|
-
regexpSource += "(?:(?=\\/|$))";
|
|
27354
|
-
} else ;
|
|
27355
|
-
let matcher = new RegExp(regexpSource, caseSensitive ? undefined : "i");
|
|
27356
|
-
return [matcher, params];
|
|
27357
|
-
}
|
|
27358
|
-
/**
|
|
27359
|
-
* @private
|
|
27360
|
-
*/
|
|
27361
|
-
function stripBasename(pathname, basename) {
|
|
27362
|
-
if (basename === "/") return pathname;
|
|
27363
|
-
if (!pathname.toLowerCase().startsWith(basename.toLowerCase())) {
|
|
27364
|
-
return null;
|
|
27365
|
-
}
|
|
27366
|
-
// We want to leave trailing slash behavior in the user's control, so if they
|
|
27367
|
-
// specify a basename with a trailing slash, we should support it
|
|
27368
|
-
let startIndex = basename.endsWith("/") ? basename.length - 1 : basename.length;
|
|
27369
|
-
let nextChar = pathname.charAt(startIndex);
|
|
27370
|
-
if (nextChar && nextChar !== "/") {
|
|
27371
|
-
// pathname does not start with basename/
|
|
27372
|
-
return null;
|
|
27373
|
-
}
|
|
27374
|
-
return pathname.slice(startIndex) || "/";
|
|
27375
|
-
}
|
|
27376
|
-
/**
|
|
27377
|
-
* Returns a resolved path object relative to the given pathname.
|
|
27378
|
-
*
|
|
27379
|
-
* @see https://reactrouter.com/v6/utils/resolve-path
|
|
27380
|
-
*/
|
|
27381
|
-
function resolvePath(to, fromPathname) {
|
|
27382
|
-
if (fromPathname === void 0) {
|
|
27383
|
-
fromPathname = "/";
|
|
27384
|
-
}
|
|
27385
|
-
let {
|
|
27386
|
-
pathname: toPathname,
|
|
27387
|
-
search = "",
|
|
27388
|
-
hash = ""
|
|
27389
|
-
} = typeof to === "string" ? parsePath(to) : to;
|
|
27390
|
-
let pathname = toPathname ? toPathname.startsWith("/") ? toPathname : resolvePathname(toPathname, fromPathname) : fromPathname;
|
|
27391
|
-
return {
|
|
27392
|
-
pathname,
|
|
27393
|
-
search: normalizeSearch(search),
|
|
27394
|
-
hash: normalizeHash(hash)
|
|
27395
|
-
};
|
|
27396
|
-
}
|
|
27397
|
-
function resolvePathname(relativePath, fromPathname) {
|
|
27398
|
-
let segments = fromPathname.replace(/\/+$/, "").split("/");
|
|
27399
|
-
let relativeSegments = relativePath.split("/");
|
|
27400
|
-
relativeSegments.forEach(segment => {
|
|
27401
|
-
if (segment === "..") {
|
|
27402
|
-
// Keep the root "" segment so the pathname starts at /
|
|
27403
|
-
if (segments.length > 1) segments.pop();
|
|
27404
|
-
} else if (segment !== ".") {
|
|
27405
|
-
segments.push(segment);
|
|
27406
|
-
}
|
|
27407
|
-
});
|
|
27408
|
-
return segments.length > 1 ? segments.join("/") : "/";
|
|
27409
|
-
}
|
|
27410
|
-
function getInvalidPathError(char, field, dest, path) {
|
|
27411
|
-
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.";
|
|
27412
|
-
}
|
|
27413
|
-
/**
|
|
27414
|
-
* @private
|
|
27415
|
-
*
|
|
27416
|
-
* When processing relative navigation we want to ignore ancestor routes that
|
|
27417
|
-
* do not contribute to the path, such that index/pathless layout routes don't
|
|
27418
|
-
* interfere.
|
|
27419
|
-
*
|
|
27420
|
-
* For example, when moving a route element into an index route and/or a
|
|
27421
|
-
* pathless layout route, relative link behavior contained within should stay
|
|
27422
|
-
* the same. Both of the following examples should link back to the root:
|
|
27423
|
-
*
|
|
27424
|
-
* <Route path="/">
|
|
27425
|
-
* <Route path="accounts" element={<Link to=".."}>
|
|
27426
|
-
* </Route>
|
|
27427
|
-
*
|
|
27428
|
-
* <Route path="/">
|
|
27429
|
-
* <Route path="accounts">
|
|
27430
|
-
* <Route element={<AccountsLayout />}> // <-- Does not contribute
|
|
27431
|
-
* <Route index element={<Link to=".."} /> // <-- Does not contribute
|
|
27432
|
-
* </Route
|
|
27433
|
-
* </Route>
|
|
27434
|
-
* </Route>
|
|
27435
|
-
*/
|
|
27436
|
-
function getPathContributingMatches(matches) {
|
|
27437
|
-
return matches.filter((match, index) => index === 0 || match.route.path && match.route.path.length > 0);
|
|
27438
|
-
}
|
|
27439
|
-
// Return the array of pathnames for the current route matches - used to
|
|
27440
|
-
// generate the routePathnames input for resolveTo()
|
|
27441
|
-
function getResolveToMatches(matches, v7_relativeSplatPath) {
|
|
27442
|
-
let pathMatches = getPathContributingMatches(matches);
|
|
27443
|
-
// When v7_relativeSplatPath is enabled, use the full pathname for the leaf
|
|
27444
|
-
// match so we include splat values for "." links. See:
|
|
27445
|
-
// https://github.com/remix-run/react-router/issues/11052#issuecomment-1836589329
|
|
27446
|
-
if (v7_relativeSplatPath) {
|
|
27447
|
-
return pathMatches.map((match, idx) => idx === pathMatches.length - 1 ? match.pathname : match.pathnameBase);
|
|
27448
|
-
}
|
|
27449
|
-
return pathMatches.map(match => match.pathnameBase);
|
|
27450
|
-
}
|
|
27451
|
-
/**
|
|
27452
|
-
* @private
|
|
27453
|
-
*/
|
|
27454
|
-
function resolveTo(toArg, routePathnames, locationPathname, isPathRelative) {
|
|
27455
|
-
if (isPathRelative === void 0) {
|
|
27456
|
-
isPathRelative = false;
|
|
27457
|
-
}
|
|
27458
|
-
let to;
|
|
27459
|
-
if (typeof toArg === "string") {
|
|
27460
|
-
to = parsePath(toArg);
|
|
27461
|
-
} else {
|
|
27462
|
-
to = _extends$2({}, toArg);
|
|
27463
|
-
invariant(!to.pathname || !to.pathname.includes("?"), getInvalidPathError("?", "pathname", "search", to));
|
|
27464
|
-
invariant(!to.pathname || !to.pathname.includes("#"), getInvalidPathError("#", "pathname", "hash", to));
|
|
27465
|
-
invariant(!to.search || !to.search.includes("#"), getInvalidPathError("#", "search", "hash", to));
|
|
27466
|
-
}
|
|
27467
|
-
let isEmptyPath = toArg === "" || to.pathname === "";
|
|
27468
|
-
let toPathname = isEmptyPath ? "/" : to.pathname;
|
|
27469
|
-
let from;
|
|
27470
|
-
// Routing is relative to the current pathname if explicitly requested.
|
|
27471
|
-
//
|
|
27472
|
-
// If a pathname is explicitly provided in `to`, it should be relative to the
|
|
27473
|
-
// route context. This is explained in `Note on `<Link to>` values` in our
|
|
27474
|
-
// migration guide from v5 as a means of disambiguation between `to` values
|
|
27475
|
-
// that begin with `/` and those that do not. However, this is problematic for
|
|
27476
|
-
// `to` values that do not provide a pathname. `to` can simply be a search or
|
|
27477
|
-
// hash string, in which case we should assume that the navigation is relative
|
|
27478
|
-
// to the current location's pathname and *not* the route pathname.
|
|
27479
|
-
if (toPathname == null) {
|
|
27480
|
-
from = locationPathname;
|
|
27481
|
-
} else {
|
|
27482
|
-
let routePathnameIndex = routePathnames.length - 1;
|
|
27483
|
-
// With relative="route" (the default), each leading .. segment means
|
|
27484
|
-
// "go up one route" instead of "go up one URL segment". This is a key
|
|
27485
|
-
// difference from how <a href> works and a major reason we call this a
|
|
27486
|
-
// "to" value instead of a "href".
|
|
27487
|
-
if (!isPathRelative && toPathname.startsWith("..")) {
|
|
27488
|
-
let toSegments = toPathname.split("/");
|
|
27489
|
-
while (toSegments[0] === "..") {
|
|
27490
|
-
toSegments.shift();
|
|
27491
|
-
routePathnameIndex -= 1;
|
|
27492
|
-
}
|
|
27493
|
-
to.pathname = toSegments.join("/");
|
|
27494
|
-
}
|
|
27495
|
-
from = routePathnameIndex >= 0 ? routePathnames[routePathnameIndex] : "/";
|
|
27496
|
-
}
|
|
27497
|
-
let path = resolvePath(to, from);
|
|
27498
|
-
// Ensure the pathname has a trailing slash if the original "to" had one
|
|
27499
|
-
let hasExplicitTrailingSlash = toPathname && toPathname !== "/" && toPathname.endsWith("/");
|
|
27500
|
-
// Or if this was a link to the current path which has a trailing slash
|
|
27501
|
-
let hasCurrentTrailingSlash = (isEmptyPath || toPathname === ".") && locationPathname.endsWith("/");
|
|
27502
|
-
if (!path.pathname.endsWith("/") && (hasExplicitTrailingSlash || hasCurrentTrailingSlash)) {
|
|
27503
|
-
path.pathname += "/";
|
|
27504
|
-
}
|
|
27505
|
-
return path;
|
|
27506
|
-
}
|
|
27507
|
-
/**
|
|
27508
|
-
* @private
|
|
27509
|
-
*/
|
|
27510
|
-
const joinPaths = paths => paths.join("/").replace(/\/\/+/g, "/");
|
|
27511
|
-
/**
|
|
27512
|
-
* @private
|
|
27513
|
-
*/
|
|
27514
|
-
const normalizeSearch = search => !search || search === "?" ? "" : search.startsWith("?") ? search : "?" + search;
|
|
27515
|
-
/**
|
|
27516
|
-
* @private
|
|
27517
|
-
*/
|
|
27518
|
-
const normalizeHash = hash => !hash || hash === "#" ? "" : hash.startsWith("#") ? hash : "#" + hash;
|
|
27519
|
-
|
|
27520
|
-
const validMutationMethodsArr = ["post", "put", "patch", "delete"];
|
|
27521
|
-
["get", ...validMutationMethodsArr];
|
|
27522
|
-
|
|
27523
|
-
/**
|
|
27524
|
-
* React Router v6.28.0
|
|
27525
|
-
*
|
|
27526
|
-
* Copyright (c) Remix Software Inc.
|
|
27527
|
-
*
|
|
27528
|
-
* This source code is licensed under the MIT license found in the
|
|
27529
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
27530
|
-
*
|
|
27531
|
-
* @license MIT
|
|
27532
|
-
*/
|
|
27533
|
-
|
|
27534
|
-
function _extends$1() {
|
|
27535
|
-
_extends$1 = Object.assign ? Object.assign.bind() : function (target) {
|
|
27536
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
27537
|
-
var source = arguments[i];
|
|
27538
|
-
for (var key in source) {
|
|
27539
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
27540
|
-
target[key] = source[key];
|
|
27541
|
-
}
|
|
27542
|
-
}
|
|
27543
|
-
}
|
|
27544
|
-
return target;
|
|
27545
|
-
};
|
|
27546
|
-
return _extends$1.apply(this, arguments);
|
|
27547
|
-
}
|
|
27548
|
-
|
|
27549
|
-
// Create react-specific types from the agnostic types in @remix-run/router to
|
|
27550
|
-
// export from react-router
|
|
27551
|
-
const DataRouterContext = /*#__PURE__*/React$3.createContext(null);
|
|
27552
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27553
|
-
DataRouterContext.displayName = "DataRouter";
|
|
27554
|
-
}
|
|
27555
|
-
const DataRouterStateContext = /*#__PURE__*/React$3.createContext(null);
|
|
27556
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27557
|
-
DataRouterStateContext.displayName = "DataRouterState";
|
|
27558
|
-
}
|
|
27559
|
-
const AwaitContext = /*#__PURE__*/React$3.createContext(null);
|
|
27560
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27561
|
-
AwaitContext.displayName = "Await";
|
|
27562
|
-
}
|
|
27563
|
-
|
|
27564
|
-
/**
|
|
27565
|
-
* A Navigator is a "location changer"; it's how you get to different locations.
|
|
27566
|
-
*
|
|
27567
|
-
* Every history instance conforms to the Navigator interface, but the
|
|
27568
|
-
* distinction is useful primarily when it comes to the low-level `<Router>` API
|
|
27569
|
-
* where both the location and a navigator must be provided separately in order
|
|
27570
|
-
* to avoid "tearing" that may occur in a suspense-enabled app if the action
|
|
27571
|
-
* and/or location were to be read directly from the history instance.
|
|
27572
|
-
*/
|
|
27573
|
-
|
|
27574
|
-
const NavigationContext = /*#__PURE__*/React$3.createContext(null);
|
|
27575
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27576
|
-
NavigationContext.displayName = "Navigation";
|
|
27577
|
-
}
|
|
27578
|
-
const LocationContext = /*#__PURE__*/React$3.createContext(null);
|
|
27579
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27580
|
-
LocationContext.displayName = "Location";
|
|
27581
|
-
}
|
|
27582
|
-
const RouteContext = /*#__PURE__*/React$3.createContext({
|
|
27583
|
-
outlet: null,
|
|
27584
|
-
matches: [],
|
|
27585
|
-
isDataRoute: false
|
|
27586
|
-
});
|
|
27587
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27588
|
-
RouteContext.displayName = "Route";
|
|
27589
|
-
}
|
|
27590
|
-
const RouteErrorContext = /*#__PURE__*/React$3.createContext(null);
|
|
27591
|
-
if (process.env.NODE_ENV !== "production") {
|
|
27592
|
-
RouteErrorContext.displayName = "RouteError";
|
|
27593
|
-
}
|
|
27594
|
-
|
|
27595
|
-
/**
|
|
27596
|
-
* Returns the full href for the given "to" value. This is useful for building
|
|
27597
|
-
* custom links that are also accessible and preserve right-click behavior.
|
|
27598
|
-
*
|
|
27599
|
-
* @see https://reactrouter.com/v6/hooks/use-href
|
|
27600
|
-
*/
|
|
27601
|
-
function useHref(to, _temp) {
|
|
27602
|
-
let {
|
|
27603
|
-
relative
|
|
27604
|
-
} = _temp === void 0 ? {} : _temp;
|
|
27605
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
27606
|
-
// router loaded. We can help them understand how to avoid that.
|
|
27607
|
-
"useHref() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
27608
|
-
let {
|
|
27609
|
-
basename,
|
|
27610
|
-
navigator
|
|
27611
|
-
} = React$3.useContext(NavigationContext);
|
|
27612
|
-
let {
|
|
27613
|
-
hash,
|
|
27614
|
-
pathname,
|
|
27615
|
-
search
|
|
27616
|
-
} = useResolvedPath(to, {
|
|
27617
|
-
relative
|
|
27618
|
-
});
|
|
27619
|
-
let joinedPathname = pathname;
|
|
27620
|
-
|
|
27621
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
27622
|
-
// to creating the href. If this is a root navigation, then just use the raw
|
|
27623
|
-
// basename which allows the basename to have full control over the presence
|
|
27624
|
-
// of a trailing slash on root links
|
|
27625
|
-
if (basename !== "/") {
|
|
27626
|
-
joinedPathname = pathname === "/" ? basename : joinPaths([basename, pathname]);
|
|
27627
|
-
}
|
|
27628
|
-
return navigator.createHref({
|
|
27629
|
-
pathname: joinedPathname,
|
|
27630
|
-
search,
|
|
27631
|
-
hash
|
|
27632
|
-
});
|
|
27633
|
-
}
|
|
27634
|
-
|
|
27635
|
-
/**
|
|
27636
|
-
* Returns true if this component is a descendant of a `<Router>`.
|
|
27637
|
-
*
|
|
27638
|
-
* @see https://reactrouter.com/v6/hooks/use-in-router-context
|
|
27639
|
-
*/
|
|
27640
|
-
function useInRouterContext() {
|
|
27641
|
-
return React$3.useContext(LocationContext) != null;
|
|
27642
|
-
}
|
|
27643
|
-
|
|
27644
|
-
/**
|
|
27645
|
-
* Returns the current location object, which represents the current URL in web
|
|
27646
|
-
* browsers.
|
|
27647
|
-
*
|
|
27648
|
-
* Note: If you're using this it may mean you're doing some of your own
|
|
27649
|
-
* "routing" in your app, and we'd like to know what your use case is. We may
|
|
27650
|
-
* be able to provide something higher-level to better suit your needs.
|
|
27651
|
-
*
|
|
27652
|
-
* @see https://reactrouter.com/v6/hooks/use-location
|
|
27653
|
-
*/
|
|
27654
|
-
function useLocation() {
|
|
27655
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
27656
|
-
// router loaded. We can help them understand how to avoid that.
|
|
27657
|
-
"useLocation() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
27658
|
-
return React$3.useContext(LocationContext).location;
|
|
27659
|
-
}
|
|
27660
|
-
|
|
27661
|
-
/**
|
|
27662
|
-
* The interface for the navigate() function returned from useNavigate().
|
|
27663
|
-
*/
|
|
27664
|
-
|
|
27665
|
-
const navigateEffectWarning = "You should call navigate() in a React.useEffect(), not when " + "your component is first rendered.";
|
|
27666
|
-
|
|
27667
|
-
// Mute warnings for calls to useNavigate in SSR environments
|
|
27668
|
-
function useIsomorphicLayoutEffect(cb) {
|
|
27669
|
-
let isStatic = React$3.useContext(NavigationContext).static;
|
|
27670
|
-
if (!isStatic) {
|
|
27671
|
-
// We should be able to get rid of this once react 18.3 is released
|
|
27672
|
-
// See: https://github.com/facebook/react/pull/26395
|
|
27673
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
27674
|
-
React$3.useLayoutEffect(cb);
|
|
27675
|
-
}
|
|
27676
|
-
}
|
|
27677
|
-
|
|
27678
|
-
/**
|
|
27679
|
-
* Returns an imperative method for changing the location. Used by `<Link>`s, but
|
|
27680
|
-
* may also be used by other elements to change the location.
|
|
27681
|
-
*
|
|
27682
|
-
* @see https://reactrouter.com/v6/hooks/use-navigate
|
|
27683
|
-
*/
|
|
27684
|
-
function useNavigate() {
|
|
27685
|
-
let {
|
|
27686
|
-
isDataRoute
|
|
27687
|
-
} = React$3.useContext(RouteContext);
|
|
27688
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
27689
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
27690
|
-
return isDataRoute ? useNavigateStable() : useNavigateUnstable();
|
|
27691
|
-
}
|
|
27692
|
-
function useNavigateUnstable() {
|
|
27693
|
-
!useInRouterContext() ? process.env.NODE_ENV !== "production" ? invariant(false, // TODO: This error is probably because they somehow have 2 versions of the
|
|
27694
|
-
// router loaded. We can help them understand how to avoid that.
|
|
27695
|
-
"useNavigate() may be used only in the context of a <Router> component.") : invariant(false) : void 0;
|
|
27696
|
-
let dataRouterContext = React$3.useContext(DataRouterContext);
|
|
27697
|
-
let {
|
|
27698
|
-
basename,
|
|
27699
|
-
future,
|
|
27700
|
-
navigator
|
|
27701
|
-
} = React$3.useContext(NavigationContext);
|
|
27702
|
-
let {
|
|
27703
|
-
matches
|
|
27704
|
-
} = React$3.useContext(RouteContext);
|
|
27705
|
-
let {
|
|
27706
|
-
pathname: locationPathname
|
|
27707
|
-
} = useLocation();
|
|
27708
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
27709
|
-
let activeRef = React$3.useRef(false);
|
|
27710
|
-
useIsomorphicLayoutEffect(() => {
|
|
27711
|
-
activeRef.current = true;
|
|
27712
|
-
});
|
|
27713
|
-
let navigate = React$3.useCallback(function (to, options) {
|
|
27714
|
-
if (options === void 0) {
|
|
27715
|
-
options = {};
|
|
27716
|
-
}
|
|
27717
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
27718
|
-
|
|
27719
|
-
// Short circuit here since if this happens on first render the navigate
|
|
27720
|
-
// is useless because we haven't wired up our history listener yet
|
|
27721
|
-
if (!activeRef.current) return;
|
|
27722
|
-
if (typeof to === "number") {
|
|
27723
|
-
navigator.go(to);
|
|
27724
|
-
return;
|
|
27725
|
-
}
|
|
27726
|
-
let path = resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, options.relative === "path");
|
|
27727
|
-
|
|
27728
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
27729
|
-
// to handing off to history (but only if we're not in a data router,
|
|
27730
|
-
// otherwise it'll prepend the basename inside of the router).
|
|
27731
|
-
// If this is a root navigation, then we navigate to the raw basename
|
|
27732
|
-
// which allows the basename to have full control over the presence of a
|
|
27733
|
-
// trailing slash on root links
|
|
27734
|
-
if (dataRouterContext == null && basename !== "/") {
|
|
27735
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
27736
|
-
}
|
|
27737
|
-
(!!options.replace ? navigator.replace : navigator.push)(path, options.state, options);
|
|
27738
|
-
}, [basename, navigator, routePathnamesJson, locationPathname, dataRouterContext]);
|
|
27739
|
-
return navigate;
|
|
27740
|
-
}
|
|
27741
|
-
|
|
27742
|
-
/**
|
|
27743
|
-
* Resolves the pathname of the given `to` value against the current location.
|
|
27744
|
-
*
|
|
27745
|
-
* @see https://reactrouter.com/v6/hooks/use-resolved-path
|
|
27746
|
-
*/
|
|
27747
|
-
function useResolvedPath(to, _temp2) {
|
|
27748
|
-
let {
|
|
27749
|
-
relative
|
|
27750
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
27751
|
-
let {
|
|
27752
|
-
future
|
|
27753
|
-
} = React$3.useContext(NavigationContext);
|
|
27754
|
-
let {
|
|
27755
|
-
matches
|
|
27756
|
-
} = React$3.useContext(RouteContext);
|
|
27757
|
-
let {
|
|
27758
|
-
pathname: locationPathname
|
|
27759
|
-
} = useLocation();
|
|
27760
|
-
let routePathnamesJson = JSON.stringify(getResolveToMatches(matches, future.v7_relativeSplatPath));
|
|
27761
|
-
return React$3.useMemo(() => resolveTo(to, JSON.parse(routePathnamesJson), locationPathname, relative === "path"), [to, routePathnamesJson, locationPathname, relative]);
|
|
27762
|
-
}
|
|
27763
|
-
var DataRouterHook$1 = /*#__PURE__*/function (DataRouterHook) {
|
|
27764
|
-
DataRouterHook["UseBlocker"] = "useBlocker";
|
|
27765
|
-
DataRouterHook["UseRevalidator"] = "useRevalidator";
|
|
27766
|
-
DataRouterHook["UseNavigateStable"] = "useNavigate";
|
|
27767
|
-
return DataRouterHook;
|
|
27768
|
-
}(DataRouterHook$1 || {});
|
|
27769
|
-
var DataRouterStateHook$1 = /*#__PURE__*/function (DataRouterStateHook) {
|
|
27770
|
-
DataRouterStateHook["UseBlocker"] = "useBlocker";
|
|
27771
|
-
DataRouterStateHook["UseLoaderData"] = "useLoaderData";
|
|
27772
|
-
DataRouterStateHook["UseActionData"] = "useActionData";
|
|
27773
|
-
DataRouterStateHook["UseRouteError"] = "useRouteError";
|
|
27774
|
-
DataRouterStateHook["UseNavigation"] = "useNavigation";
|
|
27775
|
-
DataRouterStateHook["UseRouteLoaderData"] = "useRouteLoaderData";
|
|
27776
|
-
DataRouterStateHook["UseMatches"] = "useMatches";
|
|
27777
|
-
DataRouterStateHook["UseRevalidator"] = "useRevalidator";
|
|
27778
|
-
DataRouterStateHook["UseNavigateStable"] = "useNavigate";
|
|
27779
|
-
DataRouterStateHook["UseRouteId"] = "useRouteId";
|
|
27780
|
-
return DataRouterStateHook;
|
|
27781
|
-
}(DataRouterStateHook$1 || {});
|
|
27782
|
-
function getDataRouterConsoleError$1(hookName) {
|
|
27783
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
27784
|
-
}
|
|
27785
|
-
function useDataRouterContext$1(hookName) {
|
|
27786
|
-
let ctx = React$3.useContext(DataRouterContext);
|
|
27787
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
27788
|
-
return ctx;
|
|
27789
|
-
}
|
|
27790
|
-
function useRouteContext(hookName) {
|
|
27791
|
-
let route = React$3.useContext(RouteContext);
|
|
27792
|
-
!route ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError$1(hookName)) : invariant(false) : void 0;
|
|
27793
|
-
return route;
|
|
27794
|
-
}
|
|
27795
|
-
|
|
27796
|
-
// Internal version with hookName-aware debugging
|
|
27797
|
-
function useCurrentRouteId(hookName) {
|
|
27798
|
-
let route = useRouteContext(hookName);
|
|
27799
|
-
let thisRoute = route.matches[route.matches.length - 1];
|
|
27800
|
-
!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;
|
|
27801
|
-
return thisRoute.route.id;
|
|
27802
|
-
}
|
|
27803
|
-
|
|
27804
|
-
/**
|
|
27805
|
-
* Returns the ID for the nearest contextual route
|
|
27806
|
-
*/
|
|
27807
|
-
function useRouteId() {
|
|
27808
|
-
return useCurrentRouteId(DataRouterStateHook$1.UseRouteId);
|
|
27809
|
-
}
|
|
27810
|
-
|
|
27811
|
-
/**
|
|
27812
|
-
* Stable version of useNavigate that is used when we are in the context of
|
|
27813
|
-
* a RouterProvider.
|
|
27814
|
-
*/
|
|
27815
|
-
function useNavigateStable() {
|
|
27816
|
-
let {
|
|
27817
|
-
router
|
|
27818
|
-
} = useDataRouterContext$1(DataRouterHook$1.UseNavigateStable);
|
|
27819
|
-
let id = useCurrentRouteId(DataRouterStateHook$1.UseNavigateStable);
|
|
27820
|
-
let activeRef = React$3.useRef(false);
|
|
27821
|
-
useIsomorphicLayoutEffect(() => {
|
|
27822
|
-
activeRef.current = true;
|
|
27823
|
-
});
|
|
27824
|
-
let navigate = React$3.useCallback(function (to, options) {
|
|
27825
|
-
if (options === void 0) {
|
|
27826
|
-
options = {};
|
|
27827
|
-
}
|
|
27828
|
-
process.env.NODE_ENV !== "production" ? warning(activeRef.current, navigateEffectWarning) : void 0;
|
|
27829
|
-
|
|
27830
|
-
// Short circuit here since if this happens on first render the navigate
|
|
27831
|
-
// is useless because we haven't wired up our router subscriber yet
|
|
27832
|
-
if (!activeRef.current) return;
|
|
27833
|
-
if (typeof to === "number") {
|
|
27834
|
-
router.navigate(to);
|
|
27835
|
-
} else {
|
|
27836
|
-
router.navigate(to, _extends$1({
|
|
27837
|
-
fromRouteId: id
|
|
27838
|
-
}, options));
|
|
27839
|
-
}
|
|
27840
|
-
}, [router, id]);
|
|
27841
|
-
return navigate;
|
|
27842
|
-
}
|
|
27843
|
-
new Promise(() => {});
|
|
27844
|
-
|
|
27845
|
-
/**
|
|
27846
|
-
* React Router DOM v6.28.0
|
|
27847
|
-
*
|
|
27848
|
-
* Copyright (c) Remix Software Inc.
|
|
27849
|
-
*
|
|
27850
|
-
* This source code is licensed under the MIT license found in the
|
|
27851
|
-
* LICENSE.md file in the root directory of this source tree.
|
|
27852
|
-
*
|
|
27853
|
-
* @license MIT
|
|
27854
|
-
*/
|
|
27855
|
-
|
|
27856
|
-
function _extends() {
|
|
27857
|
-
_extends = Object.assign ? Object.assign.bind() : function (target) {
|
|
27858
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
27859
|
-
var source = arguments[i];
|
|
27860
|
-
for (var key in source) {
|
|
27861
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
27862
|
-
target[key] = source[key];
|
|
27863
|
-
}
|
|
27864
|
-
}
|
|
27865
|
-
}
|
|
27866
|
-
return target;
|
|
27867
|
-
};
|
|
27868
|
-
return _extends.apply(this, arguments);
|
|
27869
|
-
}
|
|
27870
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
27871
|
-
if (source == null) return {};
|
|
27872
|
-
var target = {};
|
|
27873
|
-
var sourceKeys = Object.keys(source);
|
|
27874
|
-
var key, i;
|
|
27875
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
27876
|
-
key = sourceKeys[i];
|
|
27877
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
27878
|
-
target[key] = source[key];
|
|
27879
|
-
}
|
|
27880
|
-
return target;
|
|
27881
|
-
}
|
|
27882
|
-
|
|
27883
|
-
const defaultMethod = "get";
|
|
27884
|
-
const defaultEncType = "application/x-www-form-urlencoded";
|
|
27885
|
-
function isHtmlElement(object) {
|
|
27886
|
-
return object != null && typeof object.tagName === "string";
|
|
27887
|
-
}
|
|
27888
|
-
function isButtonElement(object) {
|
|
27889
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "button";
|
|
27890
|
-
}
|
|
27891
|
-
function isFormElement(object) {
|
|
27892
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "form";
|
|
27893
|
-
}
|
|
27894
|
-
function isInputElement(object) {
|
|
27895
|
-
return isHtmlElement(object) && object.tagName.toLowerCase() === "input";
|
|
27896
|
-
}
|
|
27897
|
-
function isModifiedEvent(event) {
|
|
27898
|
-
return !!(event.metaKey || event.altKey || event.ctrlKey || event.shiftKey);
|
|
27899
|
-
}
|
|
27900
|
-
function shouldProcessLinkClick(event, target) {
|
|
27901
|
-
return event.button === 0 && (
|
|
27902
|
-
// Ignore everything but left clicks
|
|
27903
|
-
!target || target === "_self") &&
|
|
27904
|
-
// Let browser handle "target=_blank" etc.
|
|
27905
|
-
!isModifiedEvent(event) // Ignore clicks with modifier keys
|
|
27906
|
-
;
|
|
27907
|
-
}
|
|
27908
|
-
// One-time check for submitter support
|
|
27909
|
-
let _formDataSupportsSubmitter = null;
|
|
27910
|
-
function isFormDataSubmitterSupported() {
|
|
27911
|
-
if (_formDataSupportsSubmitter === null) {
|
|
27912
|
-
try {
|
|
27913
|
-
new FormData(document.createElement("form"),
|
|
27914
|
-
// @ts-expect-error if FormData supports the submitter parameter, this will throw
|
|
27915
|
-
0);
|
|
27916
|
-
_formDataSupportsSubmitter = false;
|
|
27917
|
-
} catch (e) {
|
|
27918
|
-
_formDataSupportsSubmitter = true;
|
|
27919
|
-
}
|
|
27920
|
-
}
|
|
27921
|
-
return _formDataSupportsSubmitter;
|
|
27922
|
-
}
|
|
27923
|
-
const supportedFormEncTypes = new Set(["application/x-www-form-urlencoded", "multipart/form-data", "text/plain"]);
|
|
27924
|
-
function getFormEncType(encType) {
|
|
27925
|
-
if (encType != null && !supportedFormEncTypes.has(encType)) {
|
|
27926
|
-
process.env.NODE_ENV !== "production" ? warning(false, "\"" + encType + "\" is not a valid `encType` for `<Form>`/`<fetcher.Form>` " + ("and will default to \"" + defaultEncType + "\"")) : void 0;
|
|
27927
|
-
return null;
|
|
27928
|
-
}
|
|
27929
|
-
return encType;
|
|
27930
|
-
}
|
|
27931
|
-
function getFormSubmissionInfo(target, basename) {
|
|
27932
|
-
let method;
|
|
27933
|
-
let action;
|
|
27934
|
-
let encType;
|
|
27935
|
-
let formData;
|
|
27936
|
-
let body;
|
|
27937
|
-
if (isFormElement(target)) {
|
|
27938
|
-
// When grabbing the action from the element, it will have had the basename
|
|
27939
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
27940
|
-
// re-prefix in the router
|
|
27941
|
-
let attr = target.getAttribute("action");
|
|
27942
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
27943
|
-
method = target.getAttribute("method") || defaultMethod;
|
|
27944
|
-
encType = getFormEncType(target.getAttribute("enctype")) || defaultEncType;
|
|
27945
|
-
formData = new FormData(target);
|
|
27946
|
-
} else if (isButtonElement(target) || isInputElement(target) && (target.type === "submit" || target.type === "image")) {
|
|
27947
|
-
let form = target.form;
|
|
27948
|
-
if (form == null) {
|
|
27949
|
-
throw new Error("Cannot submit a <button> or <input type=\"submit\"> without a <form>");
|
|
27950
|
-
}
|
|
27951
|
-
// <button>/<input type="submit"> may override attributes of <form>
|
|
27952
|
-
// When grabbing the action from the element, it will have had the basename
|
|
27953
|
-
// prefixed to ensure non-JS scenarios work, so strip it since we'll
|
|
27954
|
-
// re-prefix in the router
|
|
27955
|
-
let attr = target.getAttribute("formaction") || form.getAttribute("action");
|
|
27956
|
-
action = attr ? stripBasename(attr, basename) : null;
|
|
27957
|
-
method = target.getAttribute("formmethod") || form.getAttribute("method") || defaultMethod;
|
|
27958
|
-
encType = getFormEncType(target.getAttribute("formenctype")) || getFormEncType(form.getAttribute("enctype")) || defaultEncType;
|
|
27959
|
-
// Build a FormData object populated from a form and submitter
|
|
27960
|
-
formData = new FormData(form, target);
|
|
27961
|
-
// If this browser doesn't support the `FormData(el, submitter)` format,
|
|
27962
|
-
// then tack on the submitter value at the end. This is a lightweight
|
|
27963
|
-
// solution that is not 100% spec compliant. For complete support in older
|
|
27964
|
-
// browsers, consider using the `formdata-submitter-polyfill` package
|
|
27965
|
-
if (!isFormDataSubmitterSupported()) {
|
|
27966
|
-
let {
|
|
27967
|
-
name,
|
|
27968
|
-
type,
|
|
27969
|
-
value
|
|
27970
|
-
} = target;
|
|
27971
|
-
if (type === "image") {
|
|
27972
|
-
let prefix = name ? name + "." : "";
|
|
27973
|
-
formData.append(prefix + "x", "0");
|
|
27974
|
-
formData.append(prefix + "y", "0");
|
|
27975
|
-
} else if (name) {
|
|
27976
|
-
formData.append(name, value);
|
|
27977
|
-
}
|
|
27978
|
-
}
|
|
27979
|
-
} else if (isHtmlElement(target)) {
|
|
27980
|
-
throw new Error("Cannot submit element that is not <form>, <button>, or " + "<input type=\"submit|image\">");
|
|
27981
|
-
} else {
|
|
27982
|
-
method = defaultMethod;
|
|
27983
|
-
action = null;
|
|
27984
|
-
encType = defaultEncType;
|
|
27985
|
-
body = target;
|
|
27986
|
-
}
|
|
27987
|
-
// Send body for <Form encType="text/plain" so we encode it into text
|
|
27988
|
-
if (formData && encType === "text/plain") {
|
|
27989
|
-
body = formData;
|
|
27990
|
-
formData = undefined;
|
|
27991
|
-
}
|
|
27992
|
-
return {
|
|
27993
|
-
action,
|
|
27994
|
-
method: method.toLowerCase(),
|
|
27995
|
-
encType,
|
|
27996
|
-
formData,
|
|
27997
|
-
body
|
|
27998
|
-
};
|
|
27999
|
-
}
|
|
28000
|
-
|
|
28001
|
-
const _excluded = ["onClick", "relative", "reloadDocument", "replace", "state", "target", "to", "preventScrollReset", "viewTransition"],
|
|
28002
|
-
_excluded2 = ["aria-current", "caseSensitive", "className", "end", "style", "to", "viewTransition", "children"],
|
|
28003
|
-
_excluded3 = ["fetcherKey", "navigate", "reloadDocument", "replace", "state", "method", "action", "onSubmit", "relative", "preventScrollReset", "viewTransition"];
|
|
28004
|
-
// HEY YOU! DON'T TOUCH THIS VARIABLE!
|
|
28005
|
-
//
|
|
28006
|
-
// It is replaced with the proper version at build time via a babel plugin in
|
|
28007
|
-
// the rollup config.
|
|
28008
|
-
//
|
|
28009
|
-
// Export a global property onto the window for React Router detection by the
|
|
28010
|
-
// Core Web Vitals Technology Report. This way they can configure the `wappalyzer`
|
|
28011
|
-
// to detect and properly classify live websites as being built with React Router:
|
|
28012
|
-
// https://github.com/HTTPArchive/wappalyzer/blob/main/src/technologies/r.json
|
|
28013
|
-
const REACT_ROUTER_VERSION = "6";
|
|
28014
|
-
try {
|
|
28015
|
-
window.__reactRouterVersion = REACT_ROUTER_VERSION;
|
|
28016
|
-
} catch (e) {
|
|
28017
|
-
// no-op
|
|
28018
|
-
}
|
|
28019
|
-
const ViewTransitionContext = /*#__PURE__*/React$3.createContext({
|
|
28020
|
-
isTransitioning: false
|
|
28021
|
-
});
|
|
28022
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28023
|
-
ViewTransitionContext.displayName = "ViewTransition";
|
|
28024
|
-
}
|
|
28025
|
-
const FetchersContext = /*#__PURE__*/React$3.createContext(new Map());
|
|
28026
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28027
|
-
FetchersContext.displayName = "Fetchers";
|
|
28028
|
-
}
|
|
28029
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
28030
|
-
const isBrowser = typeof window !== "undefined" && typeof window.document !== "undefined" && typeof window.document.createElement !== "undefined";
|
|
28031
|
-
const ABSOLUTE_URL_REGEX = /^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;
|
|
28032
|
-
/**
|
|
28033
|
-
* The public API for rendering a history-aware `<a>`.
|
|
28034
|
-
*/
|
|
28035
|
-
const Link = /*#__PURE__*/React$3.forwardRef(function LinkWithRef(_ref7, ref) {
|
|
28036
|
-
let {
|
|
28037
|
-
onClick,
|
|
28038
|
-
relative,
|
|
28039
|
-
reloadDocument,
|
|
28040
|
-
replace,
|
|
28041
|
-
state,
|
|
28042
|
-
target,
|
|
28043
|
-
to,
|
|
28044
|
-
preventScrollReset,
|
|
28045
|
-
viewTransition
|
|
28046
|
-
} = _ref7,
|
|
28047
|
-
rest = _objectWithoutPropertiesLoose(_ref7, _excluded);
|
|
28048
|
-
let {
|
|
28049
|
-
basename
|
|
28050
|
-
} = React$3.useContext(NavigationContext);
|
|
28051
|
-
// Rendered into <a href> for absolute URLs
|
|
28052
|
-
let absoluteHref;
|
|
28053
|
-
let isExternal = false;
|
|
28054
|
-
if (typeof to === "string" && ABSOLUTE_URL_REGEX.test(to)) {
|
|
28055
|
-
// Render the absolute href server- and client-side
|
|
28056
|
-
absoluteHref = to;
|
|
28057
|
-
// Only check for external origins client-side
|
|
28058
|
-
if (isBrowser) {
|
|
28059
|
-
try {
|
|
28060
|
-
let currentUrl = new URL(window.location.href);
|
|
28061
|
-
let targetUrl = to.startsWith("//") ? new URL(currentUrl.protocol + to) : new URL(to);
|
|
28062
|
-
let path = stripBasename(targetUrl.pathname, basename);
|
|
28063
|
-
if (targetUrl.origin === currentUrl.origin && path != null) {
|
|
28064
|
-
// Strip the protocol/origin/basename for same-origin absolute URLs
|
|
28065
|
-
to = path + targetUrl.search + targetUrl.hash;
|
|
28066
|
-
} else {
|
|
28067
|
-
isExternal = true;
|
|
28068
|
-
}
|
|
28069
|
-
} catch (e) {
|
|
28070
|
-
// We can't do external URL detection without a valid URL
|
|
28071
|
-
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;
|
|
28072
|
-
}
|
|
28073
|
-
}
|
|
28074
|
-
}
|
|
28075
|
-
// Rendered into <a href> for relative URLs
|
|
28076
|
-
let href = useHref(to, {
|
|
28077
|
-
relative
|
|
28078
|
-
});
|
|
28079
|
-
let internalOnClick = useLinkClickHandler(to, {
|
|
28080
|
-
replace,
|
|
28081
|
-
state,
|
|
28082
|
-
target,
|
|
28083
|
-
preventScrollReset,
|
|
28084
|
-
relative,
|
|
28085
|
-
viewTransition
|
|
28086
|
-
});
|
|
28087
|
-
function handleClick(event) {
|
|
28088
|
-
if (onClick) onClick(event);
|
|
28089
|
-
if (!event.defaultPrevented) {
|
|
28090
|
-
internalOnClick(event);
|
|
28091
|
-
}
|
|
28092
|
-
}
|
|
28093
|
-
return (
|
|
28094
|
-
/*#__PURE__*/
|
|
28095
|
-
// eslint-disable-next-line jsx-a11y/anchor-has-content
|
|
28096
|
-
React$3.createElement("a", _extends({}, rest, {
|
|
28097
|
-
href: absoluteHref || href,
|
|
28098
|
-
onClick: isExternal || reloadDocument ? onClick : handleClick,
|
|
28099
|
-
ref: ref,
|
|
28100
|
-
target: target
|
|
28101
|
-
}))
|
|
28102
|
-
);
|
|
28103
|
-
});
|
|
28104
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28105
|
-
Link.displayName = "Link";
|
|
28106
|
-
}
|
|
28107
|
-
/**
|
|
28108
|
-
* A `<Link>` wrapper that knows if it's "active" or not.
|
|
28109
|
-
*/
|
|
28110
|
-
const NavLink = /*#__PURE__*/React$3.forwardRef(function NavLinkWithRef(_ref8, ref) {
|
|
28111
|
-
let {
|
|
28112
|
-
"aria-current": ariaCurrentProp = "page",
|
|
28113
|
-
caseSensitive = false,
|
|
28114
|
-
className: classNameProp = "",
|
|
28115
|
-
end = false,
|
|
28116
|
-
style: styleProp,
|
|
28117
|
-
to,
|
|
28118
|
-
viewTransition,
|
|
28119
|
-
children
|
|
28120
|
-
} = _ref8,
|
|
28121
|
-
rest = _objectWithoutPropertiesLoose(_ref8, _excluded2);
|
|
28122
|
-
let path = useResolvedPath(to, {
|
|
28123
|
-
relative: rest.relative
|
|
28124
|
-
});
|
|
28125
|
-
let location = useLocation();
|
|
28126
|
-
let routerState = React$3.useContext(DataRouterStateContext);
|
|
28127
|
-
let {
|
|
28128
|
-
navigator,
|
|
28129
|
-
basename
|
|
28130
|
-
} = React$3.useContext(NavigationContext);
|
|
28131
|
-
let isTransitioning = routerState != null &&
|
|
28132
|
-
// Conditional usage is OK here because the usage of a data router is static
|
|
28133
|
-
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
28134
|
-
useViewTransitionState(path) && viewTransition === true;
|
|
28135
|
-
let toPathname = navigator.encodeLocation ? navigator.encodeLocation(path).pathname : path.pathname;
|
|
28136
|
-
let locationPathname = location.pathname;
|
|
28137
|
-
let nextLocationPathname = routerState && routerState.navigation && routerState.navigation.location ? routerState.navigation.location.pathname : null;
|
|
28138
|
-
if (!caseSensitive) {
|
|
28139
|
-
locationPathname = locationPathname.toLowerCase();
|
|
28140
|
-
nextLocationPathname = nextLocationPathname ? nextLocationPathname.toLowerCase() : null;
|
|
28141
|
-
toPathname = toPathname.toLowerCase();
|
|
28142
|
-
}
|
|
28143
|
-
if (nextLocationPathname && basename) {
|
|
28144
|
-
nextLocationPathname = stripBasename(nextLocationPathname, basename) || nextLocationPathname;
|
|
28145
|
-
}
|
|
28146
|
-
// If the `to` has a trailing slash, look at that exact spot. Otherwise,
|
|
28147
|
-
// we're looking for a slash _after_ what's in `to`. For example:
|
|
28148
|
-
//
|
|
28149
|
-
// <NavLink to="/users"> and <NavLink to="/users/">
|
|
28150
|
-
// both want to look for a / at index 6 to match URL `/users/matt`
|
|
28151
|
-
const endSlashPosition = toPathname !== "/" && toPathname.endsWith("/") ? toPathname.length - 1 : toPathname.length;
|
|
28152
|
-
let isActive = locationPathname === toPathname || !end && locationPathname.startsWith(toPathname) && locationPathname.charAt(endSlashPosition) === "/";
|
|
28153
|
-
let isPending = nextLocationPathname != null && (nextLocationPathname === toPathname || !end && nextLocationPathname.startsWith(toPathname) && nextLocationPathname.charAt(toPathname.length) === "/");
|
|
28154
|
-
let renderProps = {
|
|
28155
|
-
isActive,
|
|
28156
|
-
isPending,
|
|
28157
|
-
isTransitioning
|
|
28158
|
-
};
|
|
28159
|
-
let ariaCurrent = isActive ? ariaCurrentProp : undefined;
|
|
28160
|
-
let className;
|
|
28161
|
-
if (typeof classNameProp === "function") {
|
|
28162
|
-
className = classNameProp(renderProps);
|
|
28163
|
-
} else {
|
|
28164
|
-
// If the className prop is not a function, we use a default `active`
|
|
28165
|
-
// class for <NavLink />s that are active. In v5 `active` was the default
|
|
28166
|
-
// value for `activeClassName`, but we are removing that API and can still
|
|
28167
|
-
// use the old default behavior for a cleaner upgrade path and keep the
|
|
28168
|
-
// simple styling rules working as they currently do.
|
|
28169
|
-
className = [classNameProp, isActive ? "active" : null, isPending ? "pending" : null, isTransitioning ? "transitioning" : null].filter(Boolean).join(" ");
|
|
28170
|
-
}
|
|
28171
|
-
let style = typeof styleProp === "function" ? styleProp(renderProps) : styleProp;
|
|
28172
|
-
return /*#__PURE__*/React$3.createElement(Link, _extends({}, rest, {
|
|
28173
|
-
"aria-current": ariaCurrent,
|
|
28174
|
-
className: className,
|
|
28175
|
-
ref: ref,
|
|
28176
|
-
style: style,
|
|
28177
|
-
to: to,
|
|
28178
|
-
viewTransition: viewTransition
|
|
28179
|
-
}), typeof children === "function" ? children(renderProps) : children);
|
|
28180
|
-
});
|
|
28181
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28182
|
-
NavLink.displayName = "NavLink";
|
|
28183
|
-
}
|
|
28184
|
-
/**
|
|
28185
|
-
* A `@remix-run/router`-aware `<form>`. It behaves like a normal form except
|
|
28186
|
-
* that the interaction with the server is with `fetch` instead of new document
|
|
28187
|
-
* requests, allowing components to add nicer UX to the page as the form is
|
|
28188
|
-
* submitted and returns with data.
|
|
28189
|
-
*/
|
|
28190
|
-
const Form = /*#__PURE__*/React$3.forwardRef((_ref9, forwardedRef) => {
|
|
28191
|
-
let {
|
|
28192
|
-
fetcherKey,
|
|
28193
|
-
navigate,
|
|
28194
|
-
reloadDocument,
|
|
28195
|
-
replace,
|
|
28196
|
-
state,
|
|
28197
|
-
method = defaultMethod,
|
|
28198
|
-
action,
|
|
28199
|
-
onSubmit,
|
|
28200
|
-
relative,
|
|
28201
|
-
preventScrollReset,
|
|
28202
|
-
viewTransition
|
|
28203
|
-
} = _ref9,
|
|
28204
|
-
props = _objectWithoutPropertiesLoose(_ref9, _excluded3);
|
|
28205
|
-
let submit = useSubmit();
|
|
28206
|
-
let formAction = useFormAction(action, {
|
|
28207
|
-
relative
|
|
28208
|
-
});
|
|
28209
|
-
let formMethod = method.toLowerCase() === "get" ? "get" : "post";
|
|
28210
|
-
let submitHandler = event => {
|
|
28211
|
-
onSubmit && onSubmit(event);
|
|
28212
|
-
if (event.defaultPrevented) return;
|
|
28213
|
-
event.preventDefault();
|
|
28214
|
-
let submitter = event.nativeEvent.submitter;
|
|
28215
|
-
let submitMethod = (submitter == null ? void 0 : submitter.getAttribute("formmethod")) || method;
|
|
28216
|
-
submit(submitter || event.currentTarget, {
|
|
28217
|
-
fetcherKey,
|
|
28218
|
-
method: submitMethod,
|
|
28219
|
-
navigate,
|
|
28220
|
-
replace,
|
|
28221
|
-
state,
|
|
28222
|
-
relative,
|
|
28223
|
-
preventScrollReset,
|
|
28224
|
-
viewTransition
|
|
28225
|
-
});
|
|
28226
|
-
};
|
|
28227
|
-
return /*#__PURE__*/React$3.createElement("form", _extends({
|
|
28228
|
-
ref: forwardedRef,
|
|
28229
|
-
method: formMethod,
|
|
28230
|
-
action: formAction,
|
|
28231
|
-
onSubmit: reloadDocument ? onSubmit : submitHandler
|
|
28232
|
-
}, props));
|
|
28233
|
-
});
|
|
28234
|
-
if (process.env.NODE_ENV !== "production") {
|
|
28235
|
-
Form.displayName = "Form";
|
|
28236
|
-
}
|
|
28237
|
-
if (process.env.NODE_ENV !== "production") ;
|
|
28238
|
-
//#endregion
|
|
28239
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
28240
|
-
//#region Hooks
|
|
28241
|
-
////////////////////////////////////////////////////////////////////////////////
|
|
28242
|
-
var DataRouterHook;
|
|
28243
|
-
(function (DataRouterHook) {
|
|
28244
|
-
DataRouterHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
28245
|
-
DataRouterHook["UseSubmit"] = "useSubmit";
|
|
28246
|
-
DataRouterHook["UseSubmitFetcher"] = "useSubmitFetcher";
|
|
28247
|
-
DataRouterHook["UseFetcher"] = "useFetcher";
|
|
28248
|
-
DataRouterHook["useViewTransitionState"] = "useViewTransitionState";
|
|
28249
|
-
})(DataRouterHook || (DataRouterHook = {}));
|
|
28250
|
-
var DataRouterStateHook;
|
|
28251
|
-
(function (DataRouterStateHook) {
|
|
28252
|
-
DataRouterStateHook["UseFetcher"] = "useFetcher";
|
|
28253
|
-
DataRouterStateHook["UseFetchers"] = "useFetchers";
|
|
28254
|
-
DataRouterStateHook["UseScrollRestoration"] = "useScrollRestoration";
|
|
28255
|
-
})(DataRouterStateHook || (DataRouterStateHook = {}));
|
|
28256
|
-
// Internal hooks
|
|
28257
|
-
function getDataRouterConsoleError(hookName) {
|
|
28258
|
-
return hookName + " must be used within a data router. See https://reactrouter.com/v6/routers/picking-a-router.";
|
|
28259
|
-
}
|
|
28260
|
-
function useDataRouterContext(hookName) {
|
|
28261
|
-
let ctx = React$3.useContext(DataRouterContext);
|
|
28262
|
-
!ctx ? process.env.NODE_ENV !== "production" ? invariant(false, getDataRouterConsoleError(hookName)) : invariant(false) : void 0;
|
|
28263
|
-
return ctx;
|
|
28264
|
-
}
|
|
28265
|
-
// External hooks
|
|
28266
|
-
/**
|
|
28267
|
-
* Handles the click behavior for router `<Link>` components. This is useful if
|
|
28268
|
-
* you need to create custom `<Link>` components with the same click behavior we
|
|
28269
|
-
* use in our exported `<Link>`.
|
|
28270
|
-
*/
|
|
28271
|
-
function useLinkClickHandler(to, _temp) {
|
|
28272
|
-
let {
|
|
28273
|
-
target,
|
|
28274
|
-
replace: replaceProp,
|
|
28275
|
-
state,
|
|
28276
|
-
preventScrollReset,
|
|
28277
|
-
relative,
|
|
28278
|
-
viewTransition
|
|
28279
|
-
} = _temp === void 0 ? {} : _temp;
|
|
28280
|
-
let navigate = useNavigate();
|
|
28281
|
-
let location = useLocation();
|
|
28282
|
-
let path = useResolvedPath(to, {
|
|
28283
|
-
relative
|
|
28284
|
-
});
|
|
28285
|
-
return React$3.useCallback(event => {
|
|
28286
|
-
if (shouldProcessLinkClick(event, target)) {
|
|
28287
|
-
event.preventDefault();
|
|
28288
|
-
// If the URL hasn't changed, a regular <a> will do a replace instead of
|
|
28289
|
-
// a push, so do the same here unless the replace prop is explicitly set
|
|
28290
|
-
let replace = replaceProp !== undefined ? replaceProp : createPath(location) === createPath(path);
|
|
28291
|
-
navigate(to, {
|
|
28292
|
-
replace,
|
|
28293
|
-
state,
|
|
28294
|
-
preventScrollReset,
|
|
28295
|
-
relative,
|
|
28296
|
-
viewTransition
|
|
28297
|
-
});
|
|
28298
|
-
}
|
|
28299
|
-
}, [location, navigate, path, replaceProp, state, target, to, preventScrollReset, relative, viewTransition]);
|
|
28300
|
-
}
|
|
28301
|
-
function validateClientSideSubmission() {
|
|
28302
|
-
if (typeof document === "undefined") {
|
|
28303
|
-
throw new Error("You are calling submit during the server render. " + "Try calling submit within a `useEffect` or callback instead.");
|
|
28304
|
-
}
|
|
28305
|
-
}
|
|
28306
|
-
let fetcherId = 0;
|
|
28307
|
-
let getUniqueFetcherId = () => "__" + String(++fetcherId) + "__";
|
|
28308
|
-
/**
|
|
28309
|
-
* Returns a function that may be used to programmatically submit a form (or
|
|
28310
|
-
* some arbitrary data) to the server.
|
|
28311
|
-
*/
|
|
28312
|
-
function useSubmit() {
|
|
28313
|
-
let {
|
|
28314
|
-
router
|
|
28315
|
-
} = useDataRouterContext(DataRouterHook.UseSubmit);
|
|
28316
|
-
let {
|
|
28317
|
-
basename
|
|
28318
|
-
} = React$3.useContext(NavigationContext);
|
|
28319
|
-
let currentRouteId = useRouteId();
|
|
28320
|
-
return React$3.useCallback(function (target, options) {
|
|
28321
|
-
if (options === void 0) {
|
|
28322
|
-
options = {};
|
|
28323
|
-
}
|
|
28324
|
-
validateClientSideSubmission();
|
|
28325
|
-
let {
|
|
28326
|
-
action,
|
|
28327
|
-
method,
|
|
28328
|
-
encType,
|
|
28329
|
-
formData,
|
|
28330
|
-
body
|
|
28331
|
-
} = getFormSubmissionInfo(target, basename);
|
|
28332
|
-
if (options.navigate === false) {
|
|
28333
|
-
let key = options.fetcherKey || getUniqueFetcherId();
|
|
28334
|
-
router.fetch(key, currentRouteId, options.action || action, {
|
|
28335
|
-
preventScrollReset: options.preventScrollReset,
|
|
28336
|
-
formData,
|
|
28337
|
-
body,
|
|
28338
|
-
formMethod: options.method || method,
|
|
28339
|
-
formEncType: options.encType || encType,
|
|
28340
|
-
flushSync: options.flushSync
|
|
28341
|
-
});
|
|
28342
|
-
} else {
|
|
28343
|
-
router.navigate(options.action || action, {
|
|
28344
|
-
preventScrollReset: options.preventScrollReset,
|
|
28345
|
-
formData,
|
|
28346
|
-
body,
|
|
28347
|
-
formMethod: options.method || method,
|
|
28348
|
-
formEncType: options.encType || encType,
|
|
28349
|
-
replace: options.replace,
|
|
28350
|
-
state: options.state,
|
|
28351
|
-
fromRouteId: currentRouteId,
|
|
28352
|
-
flushSync: options.flushSync,
|
|
28353
|
-
viewTransition: options.viewTransition
|
|
28354
|
-
});
|
|
28355
|
-
}
|
|
28356
|
-
}, [router, basename, currentRouteId]);
|
|
28357
|
-
}
|
|
28358
|
-
// v7: Eventually we should deprecate this entirely in favor of using the
|
|
28359
|
-
// router method directly?
|
|
28360
|
-
function useFormAction(action, _temp2) {
|
|
28361
|
-
let {
|
|
28362
|
-
relative
|
|
28363
|
-
} = _temp2 === void 0 ? {} : _temp2;
|
|
28364
|
-
let {
|
|
28365
|
-
basename
|
|
28366
|
-
} = React$3.useContext(NavigationContext);
|
|
28367
|
-
let routeContext = React$3.useContext(RouteContext);
|
|
28368
|
-
!routeContext ? process.env.NODE_ENV !== "production" ? invariant(false, "useFormAction must be used inside a RouteContext") : invariant(false) : void 0;
|
|
28369
|
-
let [match] = routeContext.matches.slice(-1);
|
|
28370
|
-
// Shallow clone path so we can modify it below, otherwise we modify the
|
|
28371
|
-
// object referenced by useMemo inside useResolvedPath
|
|
28372
|
-
let path = _extends({}, useResolvedPath(action ? action : ".", {
|
|
28373
|
-
relative
|
|
28374
|
-
}));
|
|
28375
|
-
// If no action was specified, browsers will persist current search params
|
|
28376
|
-
// when determining the path, so match that behavior
|
|
28377
|
-
// https://github.com/remix-run/remix/issues/927
|
|
28378
|
-
let location = useLocation();
|
|
28379
|
-
if (action == null) {
|
|
28380
|
-
// Safe to write to this directly here since if action was undefined, we
|
|
28381
|
-
// would have called useResolvedPath(".") which will never include a search
|
|
28382
|
-
path.search = location.search;
|
|
28383
|
-
// When grabbing search params from the URL, remove any included ?index param
|
|
28384
|
-
// since it might not apply to our contextual route. We add it back based
|
|
28385
|
-
// on match.route.index below
|
|
28386
|
-
let params = new URLSearchParams(path.search);
|
|
28387
|
-
let indexValues = params.getAll("index");
|
|
28388
|
-
let hasNakedIndexParam = indexValues.some(v => v === "");
|
|
28389
|
-
if (hasNakedIndexParam) {
|
|
28390
|
-
params.delete("index");
|
|
28391
|
-
indexValues.filter(v => v).forEach(v => params.append("index", v));
|
|
28392
|
-
let qs = params.toString();
|
|
28393
|
-
path.search = qs ? "?" + qs : "";
|
|
28394
|
-
}
|
|
28395
|
-
}
|
|
28396
|
-
if ((!action || action === ".") && match.route.index) {
|
|
28397
|
-
path.search = path.search ? path.search.replace(/^\?/, "?index&") : "?index";
|
|
28398
|
-
}
|
|
28399
|
-
// If we're operating within a basename, prepend it to the pathname prior
|
|
28400
|
-
// to creating the form action. If this is a root navigation, then just use
|
|
28401
|
-
// the raw basename which allows the basename to have full control over the
|
|
28402
|
-
// presence of a trailing slash on root actions
|
|
28403
|
-
if (basename !== "/") {
|
|
28404
|
-
path.pathname = path.pathname === "/" ? basename : joinPaths([basename, path.pathname]);
|
|
28405
|
-
}
|
|
28406
|
-
return createPath(path);
|
|
28407
|
-
}
|
|
28408
|
-
/**
|
|
28409
|
-
* Return a boolean indicating if there is an active view transition to the
|
|
28410
|
-
* given href. You can use this value to render CSS classes or viewTransitionName
|
|
28411
|
-
* styles onto your elements
|
|
28412
|
-
*
|
|
28413
|
-
* @param href The destination href
|
|
28414
|
-
* @param [opts.relative] Relative routing type ("route" | "path")
|
|
28415
|
-
*/
|
|
28416
|
-
function useViewTransitionState(to, opts) {
|
|
28417
|
-
if (opts === void 0) {
|
|
28418
|
-
opts = {};
|
|
28419
|
-
}
|
|
28420
|
-
let vtContext = React$3.useContext(ViewTransitionContext);
|
|
28421
|
-
!(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;
|
|
28422
|
-
let {
|
|
28423
|
-
basename
|
|
28424
|
-
} = useDataRouterContext(DataRouterHook.useViewTransitionState);
|
|
28425
|
-
let path = useResolvedPath(to, {
|
|
28426
|
-
relative: opts.relative
|
|
28427
|
-
});
|
|
28428
|
-
if (!vtContext.isTransitioning) {
|
|
28429
|
-
return false;
|
|
28430
|
-
}
|
|
28431
|
-
let currentPath = stripBasename(vtContext.currentLocation.pathname, basename) || vtContext.currentLocation.pathname;
|
|
28432
|
-
let nextPath = stripBasename(vtContext.nextLocation.pathname, basename) || vtContext.nextLocation.pathname;
|
|
28433
|
-
// Transition is active if we're going to or coming from the indicated
|
|
28434
|
-
// destination. This ensures that other PUSH navigations that reverse
|
|
28435
|
-
// an indicated transition apply. I.e., on the list view you have:
|
|
28436
|
-
//
|
|
28437
|
-
// <NavLink to="/details/1" viewTransition>
|
|
28438
|
-
//
|
|
28439
|
-
// If you click the breadcrumb back to the list view:
|
|
28440
|
-
//
|
|
28441
|
-
// <NavLink to="/list" viewTransition>
|
|
28442
|
-
//
|
|
28443
|
-
// We should apply the transition because it's indicated as active going
|
|
28444
|
-
// from /list -> /details/1 and therefore should be active on the reverse
|
|
28445
|
-
// (even though this isn't strictly a POP reverse)
|
|
28446
|
-
return matchPath(path.pathname, nextPath) != null || matchPath(path.pathname, currentPath) != null;
|
|
28447
|
-
}
|
|
28448
|
-
|
|
28449
27155
|
const TabsMenuComponent = ({ buttonWidth, tabParent, tabChild, resourceCodeParent, resources, resourceCode, windowSize, renderModal }) => {
|
|
28450
27156
|
const navigate = useNavigate();
|
|
28451
27157
|
const [dataMenu, setDataMenu] = useState([]);
|