gwchq-textjam 0.3.17 → 0.3.18
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 +40 -2209
- package/dist/style.css +10 -4
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -76331,7 +76331,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
76331
76331
|
/* harmony import */ var _home_runner_work_gwchq_textjam_gwchq_textjam_node_modules_babel_runtime_helpers_esm_objectWithoutProperties_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(53986);
|
|
76332
76332
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(51649);
|
|
76333
76333
|
/* harmony import */ var _hello_pangea_dnd__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(44754);
|
|
76334
|
-
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(
|
|
76334
|
+
/* harmony import */ var react_tabs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(60627);
|
|
76335
76335
|
/* harmony import */ var _assets_stylesheets_DraggableTabs_scss__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(44221);
|
|
76336
76336
|
/* harmony import */ var react_jsx_runtime__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(74848);
|
|
76337
76337
|
|
|
@@ -114177,8 +114177,8 @@ var CloseIcon = props => {
|
|
|
114177
114177
|
children: /*#__PURE__*/(0,react_jsx_runtime__WEBPACK_IMPORTED_MODULE_1__.jsx)("path", {
|
|
114178
114178
|
d: "M8.5 0.5L0.5 8.5M0.5 0.5L8.5 8.5",
|
|
114179
114179
|
stroke: "#33625E",
|
|
114180
|
-
|
|
114181
|
-
|
|
114180
|
+
strokeLinecap: "round",
|
|
114181
|
+
strokeLinejoin: "round"
|
|
114182
114182
|
})
|
|
114183
114183
|
});
|
|
114184
114184
|
};
|
|
@@ -118527,17 +118527,6 @@ function clamp(value, min, max) {
|
|
|
118527
118527
|
}
|
|
118528
118528
|
|
|
118529
118529
|
|
|
118530
|
-
/***/ }),
|
|
118531
|
-
|
|
118532
|
-
/***/ 20053:
|
|
118533
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
118534
|
-
|
|
118535
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
118536
|
-
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
118537
|
-
/* harmony export */ });
|
|
118538
|
-
/* unused harmony export clsx */
|
|
118539
|
-
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
|
|
118540
|
-
|
|
118541
118530
|
/***/ }),
|
|
118542
118531
|
|
|
118543
118532
|
/***/ 7678:
|
|
@@ -345923,7 +345912,8 @@ exports["default"] = findTabbableDescendants;
|
|
|
345923
345912
|
var DISPLAY_NONE = "none";
|
|
345924
345913
|
var DISPLAY_CONTENTS = "contents";
|
|
345925
345914
|
|
|
345926
|
-
|
|
345915
|
+
// match the whole word to prevent fuzzy searching
|
|
345916
|
+
var tabbableNode = /^(input|select|textarea|button|object|iframe)$/;
|
|
345927
345917
|
|
|
345928
345918
|
function isNotOverflowing(element, style) {
|
|
345929
345919
|
return style.getPropertyValue("overflow") !== "visible" ||
|
|
@@ -355893,7 +355883,7 @@ function useViewTransitionState(to, opts) {
|
|
|
355893
355883
|
|
|
355894
355884
|
/***/ }),
|
|
355895
355885
|
|
|
355896
|
-
/***/
|
|
355886
|
+
/***/ 60627:
|
|
355897
355887
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
355898
355888
|
|
|
355899
355889
|
// ESM COMPAT FLAG
|
|
@@ -355904,2219 +355894,57 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
355904
355894
|
Tab: () => (/* reexport */ components_Tab),
|
|
355905
355895
|
TabList: () => (/* reexport */ components_TabList),
|
|
355906
355896
|
TabPanel: () => (/* reexport */ components_TabPanel),
|
|
355907
|
-
Tabs: () => (/* reexport */ components_Tabs)
|
|
355908
|
-
resetIdCounter: () => (/* reexport */ uuid_reset)
|
|
355897
|
+
Tabs: () => (/* reexport */ components_Tabs)
|
|
355909
355898
|
});
|
|
355910
355899
|
|
|
355900
|
+
// EXTERNAL MODULE: ./node_modules/prop-types/index.js
|
|
355901
|
+
var prop_types = __webpack_require__(5556);
|
|
355911
355902
|
// EXTERNAL MODULE: external "react"
|
|
355912
355903
|
var external_react_ = __webpack_require__(51649);
|
|
355913
355904
|
;// ./node_modules/react-tabs/esm/helpers/elementTypes.js
|
|
355914
|
-
function makeTypeChecker(tabsRole)
|
|
355915
|
-
return function (element) {
|
|
355916
|
-
return !!element.type && element.type.tabsRole === tabsRole;
|
|
355917
|
-
};
|
|
355918
|
-
}
|
|
355919
|
-
|
|
355920
|
-
var elementTypes_isTab = makeTypeChecker('Tab');
|
|
355921
|
-
var elementTypes_isTabList = makeTypeChecker('TabList');
|
|
355922
|
-
var elementTypes_isTabPanel = makeTypeChecker('TabPanel');
|
|
355905
|
+
function makeTypeChecker(tabsRole){return element=>!!element.type&&element.type.tabsRole===tabsRole}const isTab=makeTypeChecker("Tab");const isTabList=makeTypeChecker("TabList");const isTabPanel=makeTypeChecker("TabPanel");
|
|
355923
355906
|
;// ./node_modules/react-tabs/esm/helpers/childrenDeepMap.js
|
|
355924
|
-
function
|
|
355925
|
-
|
|
355926
|
-
|
|
355927
|
-
|
|
355928
|
-
|
|
355929
|
-
function isTabChild(child) {
|
|
355930
|
-
return elementTypes_isTab(child) || elementTypes_isTabList(child) || elementTypes_isTabPanel(child);
|
|
355931
|
-
}
|
|
355932
|
-
|
|
355933
|
-
function deepMap(children, callback) {
|
|
355934
|
-
return external_react_.Children.map(children, function (child) {
|
|
355935
|
-
// null happens when conditionally rendering TabPanel/Tab
|
|
355936
|
-
// see https://github.com/reactjs/react-tabs/issues/37
|
|
355937
|
-
if (child === null) return null;
|
|
355938
|
-
|
|
355939
|
-
if (isTabChild(child)) {
|
|
355940
|
-
return callback(child);
|
|
355941
|
-
}
|
|
355942
|
-
|
|
355943
|
-
if (child.props && child.props.children && typeof child.props.children === 'object') {
|
|
355944
|
-
// Clone the child that has children and map them too
|
|
355945
|
-
return /*#__PURE__*/(0,external_react_.cloneElement)(child, _extends({}, child.props, {
|
|
355946
|
-
children: deepMap(child.props.children, callback)
|
|
355947
|
-
}));
|
|
355948
|
-
}
|
|
355949
|
-
|
|
355950
|
-
return child;
|
|
355951
|
-
});
|
|
355952
|
-
}
|
|
355953
|
-
function childrenDeepMap_deepForEach(children, callback) {
|
|
355954
|
-
return external_react_.Children.forEach(children, function (child) {
|
|
355955
|
-
// null happens when conditionally rendering TabPanel/Tab
|
|
355956
|
-
// see https://github.com/reactjs/react-tabs/issues/37
|
|
355957
|
-
if (child === null) return;
|
|
355958
|
-
|
|
355959
|
-
if (elementTypes_isTab(child) || elementTypes_isTabPanel(child)) {
|
|
355960
|
-
callback(child);
|
|
355961
|
-
} else if (child.props && child.props.children && typeof child.props.children === 'object') {
|
|
355962
|
-
if (elementTypes_isTabList(child)) callback(child);
|
|
355963
|
-
childrenDeepMap_deepForEach(child.props.children, callback);
|
|
355964
|
-
}
|
|
355965
|
-
});
|
|
355966
|
-
}
|
|
355907
|
+
function isTabChild(child){return isTab(child)||isTabList(child)||isTabPanel(child)}function deepMap(children,callback){return external_react_.Children.map(children,child=>{if(child===null)return null;if(isTabChild(child)){return callback(child)}if(child.props&&child.props.children&&typeof child.props.children==="object"){return (0,external_react_.cloneElement)(child,{...child.props,children:deepMap(child.props.children,callback)})}return child})}function deepForEach(children,callback){return external_react_.Children.forEach(children,child=>{if(child===null)return;if(isTab(child)||isTabPanel(child)){callback(child)}else if(child.props&&child.props.children&&typeof child.props.children==="object"){if(isTabList(child))callback(child);deepForEach(child.props.children,callback)}})}
|
|
355967
355908
|
;// ./node_modules/react-tabs/esm/helpers/propTypes.js
|
|
355968
|
-
|
|
355969
|
-
|
|
355970
|
-
function
|
|
355971
|
-
var error;
|
|
355972
|
-
var tabsCount = 0;
|
|
355973
|
-
var panelsCount = 0;
|
|
355974
|
-
var tabListFound = false;
|
|
355975
|
-
var listTabs = [];
|
|
355976
|
-
var children = props[propName];
|
|
355977
|
-
deepForEach(children, function (child) {
|
|
355978
|
-
if (isTabList(child)) {
|
|
355979
|
-
if (child.props && child.props.children && typeof child.props.children === 'object') {
|
|
355980
|
-
deepForEach(child.props.children, function (listChild) {
|
|
355981
|
-
return listTabs.push(listChild);
|
|
355982
|
-
});
|
|
355983
|
-
}
|
|
355984
|
-
|
|
355985
|
-
if (tabListFound) {
|
|
355986
|
-
error = new Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.");
|
|
355987
|
-
}
|
|
355988
|
-
|
|
355989
|
-
tabListFound = true;
|
|
355990
|
-
}
|
|
355991
|
-
|
|
355992
|
-
if (isTab(child)) {
|
|
355993
|
-
if (!tabListFound || listTabs.indexOf(child) === -1) {
|
|
355994
|
-
error = new Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components " + "have to be inside the 'TabList' component.");
|
|
355995
|
-
}
|
|
355996
|
-
|
|
355997
|
-
tabsCount++;
|
|
355998
|
-
} else if (isTabPanel(child)) {
|
|
355999
|
-
panelsCount++;
|
|
356000
|
-
}
|
|
356001
|
-
});
|
|
356002
|
-
|
|
356003
|
-
if (!error && tabsCount !== panelsCount) {
|
|
356004
|
-
error = new Error("There should be an equal number of 'Tab' and 'TabPanel' in `" + componentName + "`. " + ("Received " + tabsCount + " 'Tab' and " + panelsCount + " 'TabPanel'."));
|
|
356005
|
-
}
|
|
356006
|
-
|
|
356007
|
-
return error;
|
|
356008
|
-
}
|
|
356009
|
-
function onSelectPropType(props, propName, componentName, location, propFullName) {
|
|
356010
|
-
var prop = props[propName];
|
|
356011
|
-
var name = propFullName || propName;
|
|
356012
|
-
var error = null;
|
|
356013
|
-
|
|
356014
|
-
if (prop && typeof prop !== 'function') {
|
|
356015
|
-
error = new Error("Invalid " + location + " `" + name + "` of type `" + typeof prop + "` supplied " + ("to `" + componentName + "`, expected `function`."));
|
|
356016
|
-
} else if (props.selectedIndex != null && prop == null) {
|
|
356017
|
-
error = new Error("The " + location + " `" + name + "` is marked as required in `" + componentName + "`, but " + "its value is `undefined` or `null`.\n" + "`onSelect` is required when `selectedIndex` is also set. Not doing so will " + "make the tabs not do anything, as `selectedIndex` indicates that you want to " + "handle the selected tab yourself.\n" + "If you only want to set the inital tab replace `selectedIndex` with `defaultIndex`.");
|
|
356018
|
-
}
|
|
356019
|
-
|
|
356020
|
-
return error;
|
|
356021
|
-
}
|
|
356022
|
-
function selectedIndexPropType(props, propName, componentName, location, propFullName) {
|
|
356023
|
-
var prop = props[propName];
|
|
356024
|
-
var name = propFullName || propName;
|
|
356025
|
-
var error = null;
|
|
356026
|
-
|
|
356027
|
-
if (prop != null && typeof prop !== 'number') {
|
|
356028
|
-
error = new Error("Invalid " + location + " `" + name + "` of type `" + typeof prop + "` supplied to " + ("`" + componentName + "`, expected `number`."));
|
|
356029
|
-
} else if (props.defaultIndex != null && prop != null) {
|
|
356030
|
-
return new Error("The " + location + " `" + name + "` cannot be used together with `defaultIndex` " + ("in `" + componentName + "`.\n") + ("Either remove `" + name + "` to let `" + componentName + "` handle the selected ") + "tab internally or remove `defaultIndex` to handle it yourself.");
|
|
356031
|
-
}
|
|
356032
|
-
|
|
356033
|
-
return error;
|
|
356034
|
-
}
|
|
356035
|
-
// EXTERNAL MODULE: ./node_modules/clsx/dist/clsx.m.js
|
|
356036
|
-
var clsx_m = __webpack_require__(20053);
|
|
356037
|
-
;// ./node_modules/react-tabs/esm/helpers/uuid.js
|
|
356038
|
-
// Get a universally unique identifier
|
|
356039
|
-
var count = 0;
|
|
356040
|
-
function uuid() {
|
|
356041
|
-
return "react-tabs-" + count++;
|
|
356042
|
-
}
|
|
356043
|
-
function uuid_reset() {
|
|
356044
|
-
count = 0;
|
|
356045
|
-
}
|
|
355909
|
+
function childrenPropType(props,propName,componentName){let error;let tabsCount=0;let panelsCount=0;let tabListFound=false;const listTabs=[];const children=props[propName];deepForEach(children,child=>{if(isTabList(child)){if(child.props&&child.props.children&&typeof child.props.children==="object"){deepForEach(child.props.children,listChild=>listTabs.push(listChild))}if(tabListFound){error=new Error("Found multiple 'TabList' components inside 'Tabs'. Only one is allowed.")}tabListFound=true}if(isTab(child)){if(!tabListFound||listTabs.indexOf(child)===-1){error=new Error("Found a 'Tab' component outside of the 'TabList' component. 'Tab' components "+"have to be inside the 'TabList' component.")}tabsCount++}else if(isTabPanel(child)){panelsCount++}});if(!error&&tabsCount!==panelsCount){error=new Error(`There should be an equal number of 'Tab' and 'TabPanel' in \`${componentName}\`. `+`Received ${tabsCount} 'Tab' and ${panelsCount} 'TabPanel'.`)}return error}function onSelectPropType(props,propName,componentName,location,propFullName){const prop=props[propName];const name=propFullName||propName;let error=null;if(prop&&typeof prop!=="function"){error=new Error(`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied `+`to \`${componentName}\`, expected \`function\`.`)}else if(props.selectedIndex!=null&&prop==null){error=new Error(`The ${location} \`${name}\` is marked as required in \`${componentName}\`, but `+`its value is \`undefined\` or \`null\`.\n`+`\`onSelect\` is required when \`selectedIndex\` is also set. Not doing so will `+`make the tabs not do anything, as \`selectedIndex\` indicates that you want to `+`handle the selected tab yourself.\n`+`If you only want to set the inital tab replace \`selectedIndex\` with \`defaultIndex\`.`)}return error}function selectedIndexPropType(props,propName,componentName,location,propFullName){const prop=props[propName];const name=propFullName||propName;let error=null;if(prop!=null&&typeof prop!=="number"){error=new Error(`Invalid ${location} \`${name}\` of type \`${typeof prop}\` supplied to `+`\`${componentName}\`, expected \`number\`.`)}else if(props.defaultIndex!=null&&prop!=null){return new Error(`The ${location} \`${name}\` cannot be used together with \`defaultIndex\` `+`in \`${componentName}\`.\n`+`Either remove \`${name}\` to let \`${componentName}\` handle the selected `+`tab internally or remove \`defaultIndex\` to handle it yourself.`)}return error}
|
|
355910
|
+
;// ./node_modules/clsx/dist/clsx.mjs
|
|
355911
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f)}else for(f in e)e[f]&&(n&&(n+=" "),n+=f);return n}function clsx(){for(var e,t,f=0,n="",o=arguments.length;f<o;f++)(e=arguments[f])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const dist_clsx = (clsx);
|
|
356046
355912
|
;// ./node_modules/react-tabs/esm/helpers/count.js
|
|
356047
|
-
|
|
356048
|
-
|
|
356049
|
-
function count_getTabsCount(children) {
|
|
356050
|
-
var tabCount = 0;
|
|
356051
|
-
childrenDeepMap_deepForEach(children, function (child) {
|
|
356052
|
-
if (elementTypes_isTab(child)) tabCount++;
|
|
356053
|
-
});
|
|
356054
|
-
return tabCount;
|
|
356055
|
-
}
|
|
355913
|
+
function count_getTabsCount(children){let tabCount=0;deepForEach(children,child=>{if(isTab(child))tabCount++});return tabCount}
|
|
356056
355914
|
;// ./node_modules/react-tabs/esm/components/UncontrolledTabs.js
|
|
356057
|
-
|
|
356058
|
-
|
|
356059
|
-
function UncontrolledTabs_extends() { UncontrolledTabs_extends = Object.assign || 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 UncontrolledTabs_extends.apply(this, arguments); }
|
|
356060
|
-
|
|
356061
|
-
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; }
|
|
356062
|
-
|
|
356063
|
-
|
|
356064
|
-
|
|
356065
|
-
|
|
356066
|
-
|
|
356067
|
-
|
|
356068
|
-
|
|
356069
|
-
|
|
356070
|
-
|
|
356071
|
-
|
|
356072
|
-
function isNode(node) {
|
|
356073
|
-
return node && 'getAttribute' in node;
|
|
356074
|
-
} // Determine if a node from event.target is a Tab element
|
|
356075
|
-
|
|
356076
|
-
|
|
356077
|
-
function isTabNode(node) {
|
|
356078
|
-
return isNode(node) && node.getAttribute('data-rttab');
|
|
356079
|
-
} // Determine if a tab node is disabled
|
|
356080
|
-
|
|
356081
|
-
|
|
356082
|
-
function isTabDisabled(node) {
|
|
356083
|
-
return isNode(node) && node.getAttribute('aria-disabled') === 'true';
|
|
356084
|
-
}
|
|
356085
|
-
|
|
356086
|
-
var canUseActiveElement;
|
|
356087
|
-
|
|
356088
|
-
function determineCanUseActiveElement(environment) {
|
|
356089
|
-
var env = environment || (typeof window !== 'undefined' ? window : undefined);
|
|
356090
|
-
|
|
356091
|
-
try {
|
|
356092
|
-
canUseActiveElement = !!(typeof env !== 'undefined' && env.document && env.document.activeElement);
|
|
356093
|
-
} catch (e) {
|
|
356094
|
-
// Work around for IE bug when accessing document.activeElement in an iframe
|
|
356095
|
-
// Refer to the following resources:
|
|
356096
|
-
// http://stackoverflow.com/a/10982960/369687
|
|
356097
|
-
// https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12733599
|
|
356098
|
-
// istanbul ignore next
|
|
356099
|
-
canUseActiveElement = false;
|
|
356100
|
-
}
|
|
356101
|
-
}
|
|
356102
|
-
|
|
356103
|
-
var defaultProps = {
|
|
356104
|
-
className: 'react-tabs',
|
|
356105
|
-
focus: false
|
|
356106
|
-
};
|
|
356107
|
-
var propTypes = false ? 0 : {};
|
|
356108
|
-
|
|
356109
|
-
var UncontrolledTabs = function UncontrolledTabs(props) {
|
|
356110
|
-
var tabNodes = (0,external_react_.useRef)([]);
|
|
356111
|
-
var tabIds = (0,external_react_.useRef)([]);
|
|
356112
|
-
var panelIds = (0,external_react_.useRef)([]);
|
|
356113
|
-
|
|
356114
|
-
var _ref = (0,external_react_.useRef)();
|
|
356115
|
-
|
|
356116
|
-
function setSelected(index, event) {
|
|
356117
|
-
// Check index boundary
|
|
356118
|
-
if (index < 0 || index >= getTabsCount()) return;
|
|
356119
|
-
var onSelect = props.onSelect,
|
|
356120
|
-
selectedIndex = props.selectedIndex; // Call change event handler
|
|
356121
|
-
|
|
356122
|
-
onSelect(index, selectedIndex, event);
|
|
356123
|
-
}
|
|
356124
|
-
|
|
356125
|
-
function getNextTab(index) {
|
|
356126
|
-
var count = getTabsCount(); // Look for non-disabled tab from index to the last tab on the right
|
|
356127
|
-
|
|
356128
|
-
for (var i = index + 1; i < count; i++) {
|
|
356129
|
-
if (!isTabDisabled(getTab(i))) {
|
|
356130
|
-
return i;
|
|
356131
|
-
}
|
|
356132
|
-
} // If no tab found, continue searching from first on left to index
|
|
356133
|
-
|
|
356134
|
-
|
|
356135
|
-
for (var _i = 0; _i < index; _i++) {
|
|
356136
|
-
if (!isTabDisabled(getTab(_i))) {
|
|
356137
|
-
return _i;
|
|
356138
|
-
}
|
|
356139
|
-
} // All tabs are disabled, return index
|
|
356140
|
-
|
|
356141
|
-
/* istanbul ignore next */
|
|
356142
|
-
|
|
356143
|
-
|
|
356144
|
-
return index;
|
|
356145
|
-
}
|
|
356146
|
-
|
|
356147
|
-
function getPrevTab(index) {
|
|
356148
|
-
var i = index; // Look for non-disabled tab from index to first tab on the left
|
|
356149
|
-
|
|
356150
|
-
while (i--) {
|
|
356151
|
-
if (!isTabDisabled(getTab(i))) {
|
|
356152
|
-
return i;
|
|
356153
|
-
}
|
|
356154
|
-
} // If no tab found, continue searching from last tab on right to index
|
|
356155
|
-
|
|
356156
|
-
|
|
356157
|
-
i = getTabsCount();
|
|
356158
|
-
|
|
356159
|
-
while (i-- > index) {
|
|
356160
|
-
if (!isTabDisabled(getTab(i))) {
|
|
356161
|
-
return i;
|
|
356162
|
-
}
|
|
356163
|
-
} // All tabs are disabled, return index
|
|
356164
|
-
|
|
356165
|
-
/* istanbul ignore next */
|
|
356166
|
-
|
|
356167
|
-
|
|
356168
|
-
return index;
|
|
356169
|
-
}
|
|
356170
|
-
|
|
356171
|
-
function getFirstTab() {
|
|
356172
|
-
var count = getTabsCount(); // Look for non disabled tab from the first tab
|
|
356173
|
-
|
|
356174
|
-
for (var i = 0; i < count; i++) {
|
|
356175
|
-
if (!isTabDisabled(getTab(i))) {
|
|
356176
|
-
return i;
|
|
356177
|
-
}
|
|
356178
|
-
}
|
|
356179
|
-
/* istanbul ignore next */
|
|
356180
|
-
|
|
356181
|
-
|
|
356182
|
-
return null;
|
|
356183
|
-
}
|
|
356184
|
-
|
|
356185
|
-
function getLastTab() {
|
|
356186
|
-
var i = getTabsCount(); // Look for non disabled tab from the last tab
|
|
356187
|
-
|
|
356188
|
-
while (i--) {
|
|
356189
|
-
if (!isTabDisabled(getTab(i))) {
|
|
356190
|
-
return i;
|
|
356191
|
-
}
|
|
356192
|
-
}
|
|
356193
|
-
/* istanbul ignore next */
|
|
356194
|
-
|
|
356195
|
-
|
|
356196
|
-
return null;
|
|
356197
|
-
}
|
|
356198
|
-
|
|
356199
|
-
function getTabsCount() {
|
|
356200
|
-
var children = props.children;
|
|
356201
|
-
return count_getTabsCount(children);
|
|
356202
|
-
}
|
|
356203
|
-
|
|
356204
|
-
function getTab(index) {
|
|
356205
|
-
return tabNodes.current["tabs-" + index];
|
|
356206
|
-
}
|
|
356207
|
-
|
|
356208
|
-
function getChildren() {
|
|
356209
|
-
var index = 0;
|
|
356210
|
-
var children = props.children,
|
|
356211
|
-
disabledTabClassName = props.disabledTabClassName,
|
|
356212
|
-
focus = props.focus,
|
|
356213
|
-
forceRenderTabPanel = props.forceRenderTabPanel,
|
|
356214
|
-
selectedIndex = props.selectedIndex,
|
|
356215
|
-
selectedTabClassName = props.selectedTabClassName,
|
|
356216
|
-
selectedTabPanelClassName = props.selectedTabPanelClassName,
|
|
356217
|
-
environment = props.environment;
|
|
356218
|
-
tabIds.current = tabIds.current || [];
|
|
356219
|
-
panelIds.current = panelIds.current || [];
|
|
356220
|
-
var diff = tabIds.current.length - getTabsCount(); // Add ids if new tabs have been added
|
|
356221
|
-
// Don't bother removing ids, just keep them in case they are added again
|
|
356222
|
-
// This is more efficient, and keeps the uuid counter under control
|
|
356223
|
-
|
|
356224
|
-
while (diff++ < 0) {
|
|
356225
|
-
tabIds.current.push(uuid());
|
|
356226
|
-
panelIds.current.push(uuid());
|
|
356227
|
-
} // Map children to dynamically setup refs
|
|
356228
|
-
|
|
356229
|
-
|
|
356230
|
-
return deepMap(children, function (child) {
|
|
356231
|
-
var result = child; // Clone TabList and Tab components to have refs
|
|
356232
|
-
|
|
356233
|
-
if (elementTypes_isTabList(child)) {
|
|
356234
|
-
var listIndex = 0; // Figure out if the current focus in the DOM is set on a Tab
|
|
356235
|
-
// If it is we should keep the focus on the next selected tab
|
|
356236
|
-
|
|
356237
|
-
var wasTabFocused = false;
|
|
356238
|
-
|
|
356239
|
-
if (canUseActiveElement == null) {
|
|
356240
|
-
determineCanUseActiveElement(environment);
|
|
356241
|
-
}
|
|
356242
|
-
|
|
356243
|
-
var env = environment || (typeof window !== 'undefined' ? window : undefined);
|
|
356244
|
-
|
|
356245
|
-
if (canUseActiveElement && env) {
|
|
356246
|
-
wasTabFocused = external_react_["default"].Children.toArray(child.props.children).filter(elementTypes_isTab).some(function (tab, i) {
|
|
356247
|
-
return env.document.activeElement === getTab(i);
|
|
356248
|
-
});
|
|
356249
|
-
}
|
|
356250
|
-
|
|
356251
|
-
result = /*#__PURE__*/(0,external_react_.cloneElement)(child, {
|
|
356252
|
-
children: deepMap(child.props.children, function (tab) {
|
|
356253
|
-
var key = "tabs-" + listIndex;
|
|
356254
|
-
var selected = selectedIndex === listIndex;
|
|
356255
|
-
var props = {
|
|
356256
|
-
tabRef: function tabRef(node) {
|
|
356257
|
-
tabNodes.current[key] = node;
|
|
356258
|
-
},
|
|
356259
|
-
id: tabIds.current[listIndex],
|
|
356260
|
-
panelId: panelIds.current[listIndex],
|
|
356261
|
-
selected: selected,
|
|
356262
|
-
focus: selected && (focus || wasTabFocused)
|
|
356263
|
-
};
|
|
356264
|
-
if (selectedTabClassName) props.selectedClassName = selectedTabClassName;
|
|
356265
|
-
if (disabledTabClassName) props.disabledClassName = disabledTabClassName;
|
|
356266
|
-
listIndex++;
|
|
356267
|
-
return /*#__PURE__*/(0,external_react_.cloneElement)(tab, props);
|
|
356268
|
-
})
|
|
356269
|
-
});
|
|
356270
|
-
} else if (elementTypes_isTabPanel(child)) {
|
|
356271
|
-
var _props = {
|
|
356272
|
-
id: panelIds.current[index],
|
|
356273
|
-
tabId: tabIds.current[index],
|
|
356274
|
-
selected: selectedIndex === index
|
|
356275
|
-
};
|
|
356276
|
-
if (forceRenderTabPanel) _props.forceRender = forceRenderTabPanel;
|
|
356277
|
-
if (selectedTabPanelClassName) _props.selectedClassName = selectedTabPanelClassName;
|
|
356278
|
-
index++;
|
|
356279
|
-
result = /*#__PURE__*/(0,external_react_.cloneElement)(child, _props);
|
|
356280
|
-
}
|
|
356281
|
-
|
|
356282
|
-
return result;
|
|
356283
|
-
});
|
|
356284
|
-
}
|
|
356285
|
-
|
|
356286
|
-
function handleKeyDown(e) {
|
|
356287
|
-
var direction = props.direction,
|
|
356288
|
-
disableUpDownKeys = props.disableUpDownKeys;
|
|
356289
|
-
|
|
356290
|
-
if (isTabFromContainer(e.target)) {
|
|
356291
|
-
var index = props.selectedIndex;
|
|
356292
|
-
var preventDefault = false;
|
|
356293
|
-
var useSelectedIndex = false;
|
|
356294
|
-
|
|
356295
|
-
if (e.code === 'Space' || e.keyCode === 32
|
|
356296
|
-
/* space */
|
|
356297
|
-
|| e.code === 'Enter' || e.keyCode === 13
|
|
356298
|
-
/* enter */
|
|
356299
|
-
) {
|
|
356300
|
-
preventDefault = true;
|
|
356301
|
-
useSelectedIndex = false;
|
|
356302
|
-
handleClick(e);
|
|
356303
|
-
} // keyCode is deprecated and only used here for IE
|
|
356304
|
-
|
|
356305
|
-
|
|
356306
|
-
if (e.code === 'ArrowLeft' || e.keyCode === 37
|
|
356307
|
-
/* arrow left */
|
|
356308
|
-
|| !disableUpDownKeys && (e.keyCode === 38 || e.code === 'ArrowUp')
|
|
356309
|
-
/* arrow up */
|
|
356310
|
-
) {
|
|
356311
|
-
// Select next tab to the left, validate if up arrow is not disabled
|
|
356312
|
-
if (direction === 'rtl') {
|
|
356313
|
-
index = getNextTab(index);
|
|
356314
|
-
} else {
|
|
356315
|
-
index = getPrevTab(index);
|
|
356316
|
-
}
|
|
356317
|
-
|
|
356318
|
-
preventDefault = true;
|
|
356319
|
-
useSelectedIndex = true;
|
|
356320
|
-
} else if (e.code === 'ArrowRight' || e.keyCode === 39
|
|
356321
|
-
/* arrow right */
|
|
356322
|
-
|| !disableUpDownKeys && (e.keyCode === 40 || e.code === 'ArrowDown')
|
|
356323
|
-
/* arrow down */
|
|
356324
|
-
) {
|
|
356325
|
-
// Select next tab to the right, validate if down arrow is not disabled
|
|
356326
|
-
if (direction === 'rtl') {
|
|
356327
|
-
index = getPrevTab(index);
|
|
356328
|
-
} else {
|
|
356329
|
-
index = getNextTab(index);
|
|
356330
|
-
}
|
|
356331
|
-
|
|
356332
|
-
preventDefault = true;
|
|
356333
|
-
useSelectedIndex = true;
|
|
356334
|
-
} else if (e.keyCode === 35 || e.code === 'End') {
|
|
356335
|
-
// Select last tab (End key)
|
|
356336
|
-
index = getLastTab();
|
|
356337
|
-
preventDefault = true;
|
|
356338
|
-
useSelectedIndex = true;
|
|
356339
|
-
} else if (e.keyCode === 36 || e.code === 'Home') {
|
|
356340
|
-
// Select first tab (Home key)
|
|
356341
|
-
index = getFirstTab();
|
|
356342
|
-
preventDefault = true;
|
|
356343
|
-
useSelectedIndex = true;
|
|
356344
|
-
} // This prevents scrollbars from moving around
|
|
356345
|
-
|
|
356346
|
-
|
|
356347
|
-
if (preventDefault) {
|
|
356348
|
-
e.preventDefault();
|
|
356349
|
-
} // Only use the selected index in the state if we're not using the tabbed index
|
|
356350
|
-
|
|
356351
|
-
|
|
356352
|
-
if (useSelectedIndex) {
|
|
356353
|
-
setSelected(index, e);
|
|
356354
|
-
}
|
|
356355
|
-
}
|
|
356356
|
-
}
|
|
356357
|
-
|
|
356358
|
-
function handleClick(e) {
|
|
356359
|
-
var node = e.target;
|
|
356360
|
-
|
|
356361
|
-
do {
|
|
356362
|
-
if (isTabFromContainer(node)) {
|
|
356363
|
-
if (isTabDisabled(node)) {
|
|
356364
|
-
return;
|
|
356365
|
-
}
|
|
356366
|
-
|
|
356367
|
-
var index = [].slice.call(node.parentNode.children).filter(isTabNode).indexOf(node);
|
|
356368
|
-
setSelected(index, e);
|
|
356369
|
-
return;
|
|
356370
|
-
}
|
|
356371
|
-
} while ((node = node.parentNode) != null);
|
|
356372
|
-
}
|
|
356373
|
-
/**
|
|
356374
|
-
* Determine if a node from event.target is a Tab element for the current Tabs container.
|
|
356375
|
-
* If the clicked element is not a Tab, it returns false.
|
|
356376
|
-
* If it finds another Tabs container between the Tab and `this`, it returns false.
|
|
356377
|
-
*/
|
|
356378
|
-
|
|
356379
|
-
|
|
356380
|
-
function isTabFromContainer(node) {
|
|
356381
|
-
// return immediately if the clicked element is not a Tab.
|
|
356382
|
-
if (!isTabNode(node)) {
|
|
356383
|
-
return false;
|
|
356384
|
-
} // Check if the first occurrence of a Tabs container is `this` one.
|
|
356385
|
-
|
|
356386
|
-
|
|
356387
|
-
var nodeAncestor = node.parentElement;
|
|
356388
|
-
|
|
356389
|
-
do {
|
|
356390
|
-
if (nodeAncestor === _ref.current) return true;
|
|
356391
|
-
if (nodeAncestor.getAttribute('data-rttabs')) break;
|
|
356392
|
-
nodeAncestor = nodeAncestor.parentElement;
|
|
356393
|
-
} while (nodeAncestor);
|
|
356394
|
-
|
|
356395
|
-
return false;
|
|
356396
|
-
}
|
|
356397
|
-
|
|
356398
|
-
var children = props.children,
|
|
356399
|
-
className = props.className,
|
|
356400
|
-
disabledTabClassName = props.disabledTabClassName,
|
|
356401
|
-
domRef = props.domRef,
|
|
356402
|
-
focus = props.focus,
|
|
356403
|
-
forceRenderTabPanel = props.forceRenderTabPanel,
|
|
356404
|
-
onSelect = props.onSelect,
|
|
356405
|
-
selectedIndex = props.selectedIndex,
|
|
356406
|
-
selectedTabClassName = props.selectedTabClassName,
|
|
356407
|
-
selectedTabPanelClassName = props.selectedTabPanelClassName,
|
|
356408
|
-
environment = props.environment,
|
|
356409
|
-
disableUpDownKeys = props.disableUpDownKeys,
|
|
356410
|
-
attributes = _objectWithoutPropertiesLoose(props, _excluded);
|
|
356411
|
-
|
|
356412
|
-
return /*#__PURE__*/external_react_["default"].createElement("div", UncontrolledTabs_extends({}, attributes, {
|
|
356413
|
-
className: (0,clsx_m/* default */.A)(className),
|
|
356414
|
-
onClick: handleClick,
|
|
356415
|
-
onKeyDown: handleKeyDown,
|
|
356416
|
-
ref: function ref(node) {
|
|
356417
|
-
_ref.current = node;
|
|
356418
|
-
if (domRef) domRef(node);
|
|
356419
|
-
},
|
|
356420
|
-
"data-rttabs": true
|
|
356421
|
-
}), getChildren());
|
|
356422
|
-
};
|
|
356423
|
-
|
|
356424
|
-
UncontrolledTabs.defaultProps = defaultProps;
|
|
356425
|
-
UncontrolledTabs.propTypes = false ? 0 : {};
|
|
356426
|
-
/* harmony default export */ const components_UncontrolledTabs = (UncontrolledTabs);
|
|
355915
|
+
function isNode(node){return node&&"getAttribute"in node}function isTabNode(node){return isNode(node)&&node.getAttribute("data-rttab")}function isTabDisabled(node){return isNode(node)&&node.getAttribute("aria-disabled")==="true"}let canUseActiveElement;function determineCanUseActiveElement(environment){const env=environment||(typeof window!=="undefined"?window:undefined);try{canUseActiveElement=!!(typeof env!=="undefined"&&env.document&&env.document.activeElement)}catch(e){canUseActiveElement=false}}const defaultProps={className:"react-tabs",focus:false};const propTypes={children:childrenPropType};const UncontrolledTabs=props=>{(0,prop_types.checkPropTypes)(propTypes,props,"prop","UncontrolledTabs");let tabNodes=(0,external_react_.useRef)([]);let tabIds=(0,external_react_.useRef)([]);const ref=(0,external_react_.useRef)();function setSelected(index,event){if(index<0||index>=getTabsCount())return;const{onSelect,selectedIndex}=props;onSelect(index,selectedIndex,event)}function getNextTab(index){const count=getTabsCount();for(let i=index+1;i<count;i++){if(!isTabDisabled(getTab(i))){return i}}for(let i=0;i<index;i++){if(!isTabDisabled(getTab(i))){return i}}return index}function getPrevTab(index){let i=index;while(i--){if(!isTabDisabled(getTab(i))){return i}}i=getTabsCount();while(i-->index){if(!isTabDisabled(getTab(i))){return i}}return index}function getFirstTab(){const count=getTabsCount();for(let i=0;i<count;i++){if(!isTabDisabled(getTab(i))){return i}}return null}function getLastTab(){let i=getTabsCount();while(i--){if(!isTabDisabled(getTab(i))){return i}}return null}function getTabsCount(){const{children}=props;return count_getTabsCount(children)}function getTab(index){return tabNodes.current[`tabs-${index}`]}function getChildren(){let index=0;const{children,disabledTabClassName,focus,forceRenderTabPanel,selectedIndex,selectedTabClassName,selectedTabPanelClassName,environment}=props;tabIds.current=tabIds.current||[];let diff=tabIds.current.length-getTabsCount();const id=(0,external_react_.useId)();while(diff++<0){tabIds.current.push(`${id}${tabIds.current.length}`)}return deepMap(children,child=>{let result=child;if(isTabList(child)){let listIndex=0;let wasTabFocused=false;if(canUseActiveElement==null){determineCanUseActiveElement(environment)}const env=environment||(typeof window!=="undefined"?window:undefined);if(canUseActiveElement&&env){wasTabFocused=external_react_["default"].Children.toArray(child.props.children).filter(isTab).some((tab,i)=>env.document.activeElement===getTab(i))}result=(0,external_react_.cloneElement)(child,{children:deepMap(child.props.children,tab=>{const key=`tabs-${listIndex}`;const selected=selectedIndex===listIndex;const props={tabRef:node=>{tabNodes.current[key]=node},id:tabIds.current[listIndex],selected,focus:selected&&(focus||wasTabFocused)};if(selectedTabClassName)props.selectedClassName=selectedTabClassName;if(disabledTabClassName)props.disabledClassName=disabledTabClassName;listIndex++;return (0,external_react_.cloneElement)(tab,props)})})}else if(isTabPanel(child)){const props={id:tabIds.current[index],selected:selectedIndex===index};if(forceRenderTabPanel)props.forceRender=forceRenderTabPanel;if(selectedTabPanelClassName)props.selectedClassName=selectedTabPanelClassName;index++;result=(0,external_react_.cloneElement)(child,props)}return result})}function handleKeyDown(e){const{direction,disableUpDownKeys,disableLeftRightKeys}=props;if(isTabFromContainer(e.target)){let{selectedIndex:index}=props;let preventDefault=false;let useSelectedIndex=false;if(e.code==="Space"||e.keyCode===32||e.code==="Enter"||e.keyCode===13){preventDefault=true;useSelectedIndex=false;handleClick(e)}if(!disableLeftRightKeys&&(e.keyCode===37||e.code==="ArrowLeft")||!disableUpDownKeys&&(e.keyCode===38||e.code==="ArrowUp")){if(direction==="rtl"){index=getNextTab(index)}else{index=getPrevTab(index)}preventDefault=true;useSelectedIndex=true}else if(!disableLeftRightKeys&&(e.keyCode===39||e.code==="ArrowRight")||!disableUpDownKeys&&(e.keyCode===40||e.code==="ArrowDown")){if(direction==="rtl"){index=getPrevTab(index)}else{index=getNextTab(index)}preventDefault=true;useSelectedIndex=true}else if(e.keyCode===35||e.code==="End"){index=getLastTab();preventDefault=true;useSelectedIndex=true}else if(e.keyCode===36||e.code==="Home"){index=getFirstTab();preventDefault=true;useSelectedIndex=true}if(preventDefault){e.preventDefault()}if(useSelectedIndex){setSelected(index,e)}}}function handleClick(e){let node=e.target;do{if(isTabFromContainer(node)){if(isTabDisabled(node)){return}const index=[].slice.call(node.parentNode.children).filter(isTabNode).indexOf(node);setSelected(index,e);return}}while((node=node.parentNode)!=null)}function isTabFromContainer(node){if(!isTabNode(node)){return false}let nodeAncestor=node.parentElement;do{if(nodeAncestor===ref.current)return true;if(nodeAncestor.getAttribute("data-rttabs"))break;nodeAncestor=nodeAncestor.parentElement}while(nodeAncestor);return false}const{children,className,disabledTabClassName,domRef,focus,forceRenderTabPanel,onSelect,selectedIndex,selectedTabClassName,selectedTabPanelClassName,environment,disableUpDownKeys,disableLeftRightKeys,...attributes}={...defaultProps,...props};return external_react_["default"].createElement("div",Object.assign({},attributes,{className:dist_clsx(className),onClick:handleClick,onKeyDown:handleKeyDown,ref:node=>{ref.current=node;if(domRef)domRef(node)},"data-rttabs":true}),getChildren())};/* harmony default export */ const components_UncontrolledTabs = (UncontrolledTabs);
|
|
356427
355916
|
;// ./node_modules/react-tabs/esm/components/Tabs.js
|
|
356428
|
-
|
|
356429
|
-
|
|
356430
|
-
|
|
356431
|
-
|
|
356432
|
-
|
|
356433
|
-
|
|
356434
|
-
|
|
356435
|
-
var MODE_CONTROLLED = 0;
|
|
356436
|
-
var MODE_UNCONTROLLED = 1;
|
|
356437
|
-
var Tabs_propTypes = false ? 0 : {};
|
|
356438
|
-
var Tabs_defaultProps = {
|
|
356439
|
-
defaultFocus: false,
|
|
356440
|
-
focusTabOnClick: true,
|
|
356441
|
-
forceRenderTabPanel: false,
|
|
356442
|
-
selectedIndex: null,
|
|
356443
|
-
defaultIndex: null,
|
|
356444
|
-
environment: null,
|
|
356445
|
-
disableUpDownKeys: false
|
|
356446
|
-
};
|
|
356447
|
-
|
|
356448
|
-
var getModeFromProps = function getModeFromProps(props) {
|
|
356449
|
-
return props.selectedIndex === null ? MODE_UNCONTROLLED : MODE_CONTROLLED;
|
|
356450
|
-
};
|
|
356451
|
-
|
|
356452
|
-
var checkForIllegalModeChange = function checkForIllegalModeChange(props, mode) {
|
|
356453
|
-
if (false) {}
|
|
356454
|
-
};
|
|
356455
|
-
/**
|
|
356456
|
-
* State:
|
|
356457
|
-
* mode: Initialized only once from props and never changes
|
|
356458
|
-
* selectedIndex: null if controlled mode, otherwise initialized with prop defaultIndex, changed on selection of tabs, has effect to ensure it never gets out of bound
|
|
356459
|
-
* focus: Because we never remove focus from the Tabs this state is only used to indicate that we should focus the current tab.
|
|
356460
|
-
* It is initialized from the prop defaultFocus, and after the first render it is reset back to false. Later it can become true again when using keys to navigate the tabs.
|
|
356461
|
-
*/
|
|
356462
|
-
|
|
356463
|
-
|
|
356464
|
-
var Tabs = function Tabs(props) {
|
|
356465
|
-
var children = props.children,
|
|
356466
|
-
defaultFocus = props.defaultFocus,
|
|
356467
|
-
defaultIndex = props.defaultIndex,
|
|
356468
|
-
focusTabOnClick = props.focusTabOnClick,
|
|
356469
|
-
onSelect = props.onSelect;
|
|
356470
|
-
|
|
356471
|
-
var _useState = (0,external_react_.useState)(defaultFocus),
|
|
356472
|
-
focus = _useState[0],
|
|
356473
|
-
setFocus = _useState[1];
|
|
356474
|
-
|
|
356475
|
-
var _useState2 = (0,external_react_.useState)(getModeFromProps(props)),
|
|
356476
|
-
mode = _useState2[0];
|
|
356477
|
-
|
|
356478
|
-
var _useState3 = (0,external_react_.useState)(mode === MODE_UNCONTROLLED ? defaultIndex || 0 : null),
|
|
356479
|
-
selectedIndex = _useState3[0],
|
|
356480
|
-
setSelectedIndex = _useState3[1];
|
|
356481
|
-
|
|
356482
|
-
(0,external_react_.useEffect)(function () {
|
|
356483
|
-
// Reset focus after initial render, see comment above
|
|
356484
|
-
setFocus(false);
|
|
356485
|
-
}, []);
|
|
356486
|
-
|
|
356487
|
-
if (mode === MODE_UNCONTROLLED) {
|
|
356488
|
-
// Ensure that we handle removed tabs and don't let selectedIndex get out of bounds
|
|
356489
|
-
var tabsCount = count_getTabsCount(children);
|
|
356490
|
-
(0,external_react_.useEffect)(function () {
|
|
356491
|
-
if (selectedIndex != null) {
|
|
356492
|
-
var maxTabIndex = Math.max(0, tabsCount - 1);
|
|
356493
|
-
setSelectedIndex(Math.min(selectedIndex, maxTabIndex));
|
|
356494
|
-
}
|
|
356495
|
-
}, [tabsCount]);
|
|
356496
|
-
}
|
|
356497
|
-
|
|
356498
|
-
checkForIllegalModeChange(props, mode);
|
|
356499
|
-
|
|
356500
|
-
var handleSelected = function handleSelected(index, last, event) {
|
|
356501
|
-
// Call change event handler
|
|
356502
|
-
if (typeof onSelect === 'function') {
|
|
356503
|
-
// Check if the change event handler cancels the tab change
|
|
356504
|
-
if (onSelect(index, last, event) === false) return;
|
|
356505
|
-
} // Always set focus on tabs unless it is disabled
|
|
356506
|
-
|
|
356507
|
-
|
|
356508
|
-
if (focusTabOnClick) {
|
|
356509
|
-
setFocus(true);
|
|
356510
|
-
}
|
|
356511
|
-
|
|
356512
|
-
if (mode === MODE_UNCONTROLLED) {
|
|
356513
|
-
// Update selected index
|
|
356514
|
-
setSelectedIndex(index);
|
|
356515
|
-
}
|
|
356516
|
-
};
|
|
356517
|
-
|
|
356518
|
-
var subProps = Tabs_extends({}, props);
|
|
356519
|
-
|
|
356520
|
-
subProps.focus = focus;
|
|
356521
|
-
subProps.onSelect = handleSelected;
|
|
356522
|
-
|
|
356523
|
-
if (selectedIndex != null) {
|
|
356524
|
-
subProps.selectedIndex = selectedIndex;
|
|
356525
|
-
}
|
|
356526
|
-
|
|
356527
|
-
delete subProps.defaultFocus;
|
|
356528
|
-
delete subProps.defaultIndex;
|
|
356529
|
-
delete subProps.focusTabOnClick;
|
|
356530
|
-
return /*#__PURE__*/external_react_["default"].createElement(components_UncontrolledTabs, subProps, children);
|
|
356531
|
-
};
|
|
356532
|
-
|
|
356533
|
-
Tabs.propTypes = false ? 0 : {};
|
|
356534
|
-
Tabs.defaultProps = Tabs_defaultProps;
|
|
356535
|
-
Tabs.tabsRole = 'Tabs';
|
|
356536
|
-
/* harmony default export */ const components_Tabs = (Tabs);
|
|
355917
|
+
const MODE_CONTROLLED=0;const MODE_UNCONTROLLED=1;const Tabs_propTypes={children:childrenPropType,onSelect:onSelectPropType,selectedIndex:selectedIndexPropType};const Tabs_defaultProps={defaultFocus:false,focusTabOnClick:true,forceRenderTabPanel:false,selectedIndex:null,defaultIndex:null,environment:null,disableUpDownKeys:false,disableLeftRightKeys:false};const getModeFromProps=props=>{return props.selectedIndex===null?MODE_UNCONTROLLED:MODE_CONTROLLED};const checkForIllegalModeChange=(props,mode)=>{if(false){}};const Tabs=props=>{(0,prop_types.checkPropTypes)(Tabs_propTypes,props,"prop","Tabs");const{children,defaultFocus,defaultIndex,focusTabOnClick,onSelect,...attributes}={...Tabs_defaultProps,...props};const[focus,setFocus]=(0,external_react_.useState)(defaultFocus);const[mode]=(0,external_react_.useState)(getModeFromProps(attributes));const[selectedIndex,setSelectedIndex]=(0,external_react_.useState)(mode===MODE_UNCONTROLLED?defaultIndex||0:null);(0,external_react_.useEffect)(()=>{setFocus(false)},[]);if(mode===MODE_UNCONTROLLED){const tabsCount=count_getTabsCount(children);(0,external_react_.useEffect)(()=>{if(selectedIndex!=null){const maxTabIndex=Math.max(0,tabsCount-1);setSelectedIndex(Math.min(selectedIndex,maxTabIndex))}},[tabsCount])}checkForIllegalModeChange(attributes,mode);const handleSelected=(index,last,event)=>{if(typeof onSelect==="function"){if(onSelect(index,last,event)===false)return}if(focusTabOnClick){setFocus(true)}if(mode===MODE_UNCONTROLLED){setSelectedIndex(index)}};let subProps={...props,...attributes};subProps.focus=focus;subProps.onSelect=handleSelected;if(selectedIndex!=null){subProps.selectedIndex=selectedIndex}delete subProps.defaultFocus;delete subProps.defaultIndex;delete subProps.focusTabOnClick;return external_react_["default"].createElement(components_UncontrolledTabs,subProps,children)};Tabs.tabsRole="Tabs";/* harmony default export */ const components_Tabs = (Tabs);
|
|
356537
355918
|
;// ./node_modules/react-tabs/esm/components/TabList.js
|
|
356538
|
-
|
|
356539
|
-
|
|
356540
|
-
function TabList_extends() { TabList_extends = Object.assign || 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 TabList_extends.apply(this, arguments); }
|
|
356541
|
-
|
|
356542
|
-
function TabList_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; }
|
|
356543
|
-
|
|
356544
|
-
|
|
356545
|
-
|
|
356546
|
-
|
|
356547
|
-
var TabList_defaultProps = {
|
|
356548
|
-
className: 'react-tabs__tab-list'
|
|
356549
|
-
};
|
|
356550
|
-
var TabList_propTypes = false ? 0 : {};
|
|
356551
|
-
|
|
356552
|
-
var TabList = function TabList(props) {
|
|
356553
|
-
var children = props.children,
|
|
356554
|
-
className = props.className,
|
|
356555
|
-
attributes = TabList_objectWithoutPropertiesLoose(props, TabList_excluded);
|
|
356556
|
-
|
|
356557
|
-
return /*#__PURE__*/external_react_["default"].createElement("ul", TabList_extends({}, attributes, {
|
|
356558
|
-
className: (0,clsx_m/* default */.A)(className),
|
|
356559
|
-
role: "tablist"
|
|
356560
|
-
}), children);
|
|
356561
|
-
};
|
|
356562
|
-
|
|
356563
|
-
TabList.tabsRole = 'TabList';
|
|
356564
|
-
TabList.propTypes = false ? 0 : {};
|
|
356565
|
-
TabList.defaultProps = TabList_defaultProps;
|
|
356566
|
-
/* harmony default export */ const components_TabList = (TabList);
|
|
355919
|
+
const TabList_defaultProps={className:"react-tabs__tab-list"};const TabList=props=>{const{children,className,...attributes}={...TabList_defaultProps,...props};return external_react_["default"].createElement("ul",Object.assign({},attributes,{className:dist_clsx(className),role:"tablist"}),children)};TabList.tabsRole="TabList";/* harmony default export */ const components_TabList = (TabList);
|
|
356567
355920
|
;// ./node_modules/react-tabs/esm/components/Tab.js
|
|
356568
|
-
|
|
356569
|
-
|
|
356570
|
-
function Tab_extends() { Tab_extends = Object.assign || 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 Tab_extends.apply(this, arguments); }
|
|
356571
|
-
|
|
356572
|
-
function Tab_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; }
|
|
356573
|
-
|
|
356574
|
-
|
|
356575
|
-
|
|
356576
|
-
|
|
356577
|
-
var DEFAULT_CLASS = 'react-tabs__tab';
|
|
356578
|
-
var DEFAULT_PROPS = {
|
|
356579
|
-
className: DEFAULT_CLASS,
|
|
356580
|
-
disabledClassName: DEFAULT_CLASS + "--disabled",
|
|
356581
|
-
focus: false,
|
|
356582
|
-
id: null,
|
|
356583
|
-
panelId: null,
|
|
356584
|
-
selected: false,
|
|
356585
|
-
selectedClassName: DEFAULT_CLASS + "--selected"
|
|
356586
|
-
};
|
|
356587
|
-
var Tab_propTypes = false ? 0 : {};
|
|
356588
|
-
|
|
356589
|
-
var Tab = function Tab(props) {
|
|
356590
|
-
var _cx;
|
|
356591
|
-
|
|
356592
|
-
var nodeRef = (0,external_react_.useRef)();
|
|
356593
|
-
|
|
356594
|
-
var children = props.children,
|
|
356595
|
-
className = props.className,
|
|
356596
|
-
disabled = props.disabled,
|
|
356597
|
-
disabledClassName = props.disabledClassName,
|
|
356598
|
-
focus = props.focus,
|
|
356599
|
-
id = props.id,
|
|
356600
|
-
panelId = props.panelId,
|
|
356601
|
-
selected = props.selected,
|
|
356602
|
-
selectedClassName = props.selectedClassName,
|
|
356603
|
-
tabIndex = props.tabIndex,
|
|
356604
|
-
tabRef = props.tabRef,
|
|
356605
|
-
attributes = Tab_objectWithoutPropertiesLoose(props, Tab_excluded);
|
|
356606
|
-
|
|
356607
|
-
(0,external_react_.useEffect)(function () {
|
|
356608
|
-
if (selected && focus) {
|
|
356609
|
-
nodeRef.current.focus();
|
|
356610
|
-
}
|
|
356611
|
-
}, [selected, focus]);
|
|
356612
|
-
return /*#__PURE__*/external_react_["default"].createElement("li", Tab_extends({}, attributes, {
|
|
356613
|
-
className: (0,clsx_m/* default */.A)(className, (_cx = {}, _cx[selectedClassName] = selected, _cx[disabledClassName] = disabled, _cx)),
|
|
356614
|
-
ref: function ref(node) {
|
|
356615
|
-
nodeRef.current = node;
|
|
356616
|
-
if (tabRef) tabRef(node);
|
|
356617
|
-
},
|
|
356618
|
-
role: "tab",
|
|
356619
|
-
id: id,
|
|
356620
|
-
"aria-selected": selected ? 'true' : 'false',
|
|
356621
|
-
"aria-disabled": disabled ? 'true' : 'false',
|
|
356622
|
-
"aria-controls": panelId,
|
|
356623
|
-
tabIndex: tabIndex || (selected ? '0' : null),
|
|
356624
|
-
"data-rttab": true
|
|
356625
|
-
}), children);
|
|
356626
|
-
};
|
|
356627
|
-
|
|
356628
|
-
Tab.propTypes = false ? 0 : {};
|
|
356629
|
-
Tab.tabsRole = 'Tab';
|
|
356630
|
-
Tab.defaultProps = DEFAULT_PROPS;
|
|
356631
|
-
/* harmony default export */ const components_Tab = (Tab);
|
|
355921
|
+
const DEFAULT_CLASS="react-tabs__tab";const Tab_defaultProps={className:DEFAULT_CLASS,disabledClassName:`${DEFAULT_CLASS}--disabled`,focus:false,id:null,selected:false,selectedClassName:`${DEFAULT_CLASS}--selected`};const Tab=props=>{let nodeRef=(0,external_react_.useRef)();const{children,className,disabled,disabledClassName,focus,id,selected,selectedClassName,tabIndex,tabRef,...attributes}={...Tab_defaultProps,...props};(0,external_react_.useEffect)(()=>{if(selected&&focus){nodeRef.current.focus()}},[selected,focus]);return external_react_["default"].createElement("li",Object.assign({},attributes,{className:dist_clsx(className,{[selectedClassName]:selected,[disabledClassName]:disabled}),ref:node=>{nodeRef.current=node;if(tabRef)tabRef(node)},role:"tab",id:`tab${id}`,"aria-selected":selected?"true":"false","aria-disabled":disabled?"true":"false","aria-controls":`panel${id}`,tabIndex:tabIndex||(selected?"0":null),"data-rttab":true}),children)};Tab.tabsRole="Tab";/* harmony default export */ const components_Tab = (Tab);
|
|
356632
355922
|
;// ./node_modules/react-tabs/esm/components/TabPanel.js
|
|
356633
|
-
|
|
356634
|
-
|
|
356635
|
-
function TabPanel_extends() { TabPanel_extends = Object.assign || 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 TabPanel_extends.apply(this, arguments); }
|
|
356636
|
-
|
|
356637
|
-
function TabPanel_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; }
|
|
356638
|
-
|
|
356639
|
-
|
|
356640
|
-
|
|
356641
|
-
|
|
356642
|
-
var TabPanel_DEFAULT_CLASS = 'react-tabs__tab-panel';
|
|
356643
|
-
var TabPanel_defaultProps = {
|
|
356644
|
-
className: TabPanel_DEFAULT_CLASS,
|
|
356645
|
-
forceRender: false,
|
|
356646
|
-
selectedClassName: TabPanel_DEFAULT_CLASS + "--selected"
|
|
356647
|
-
};
|
|
356648
|
-
var TabPanel_propTypes = false ? 0 : {};
|
|
356649
|
-
|
|
356650
|
-
var TabPanel = function TabPanel(props) {
|
|
356651
|
-
var _cx;
|
|
356652
|
-
|
|
356653
|
-
var children = props.children,
|
|
356654
|
-
className = props.className,
|
|
356655
|
-
forceRender = props.forceRender,
|
|
356656
|
-
id = props.id,
|
|
356657
|
-
selected = props.selected,
|
|
356658
|
-
selectedClassName = props.selectedClassName,
|
|
356659
|
-
tabId = props.tabId,
|
|
356660
|
-
attributes = TabPanel_objectWithoutPropertiesLoose(props, TabPanel_excluded);
|
|
356661
|
-
|
|
356662
|
-
return /*#__PURE__*/external_react_["default"].createElement("div", TabPanel_extends({}, attributes, {
|
|
356663
|
-
className: (0,clsx_m/* default */.A)(className, (_cx = {}, _cx[selectedClassName] = selected, _cx)),
|
|
356664
|
-
role: "tabpanel",
|
|
356665
|
-
id: id,
|
|
356666
|
-
"aria-labelledby": tabId
|
|
356667
|
-
}), forceRender || selected ? children : null);
|
|
356668
|
-
};
|
|
356669
|
-
|
|
356670
|
-
TabPanel.tabsRole = 'TabPanel';
|
|
356671
|
-
TabPanel.propTypes = false ? 0 : {};
|
|
356672
|
-
TabPanel.defaultProps = TabPanel_defaultProps;
|
|
356673
|
-
/* harmony default export */ const components_TabPanel = (TabPanel);
|
|
355923
|
+
const TabPanel_DEFAULT_CLASS="react-tabs__tab-panel";const TabPanel_defaultProps={className:TabPanel_DEFAULT_CLASS,forceRender:false,selectedClassName:`${TabPanel_DEFAULT_CLASS}--selected`};const TabPanel=props=>{const{children,className,forceRender,id,selected,selectedClassName,...attributes}={...TabPanel_defaultProps,...props};return external_react_["default"].createElement("div",Object.assign({},attributes,{className:dist_clsx(className,{[selectedClassName]:selected}),role:"tabpanel",id:`panel${id}`,"aria-labelledby":`tab${id}`}),forceRender||selected?children:null)};TabPanel.tabsRole="TabPanel";/* harmony default export */ const components_TabPanel = (TabPanel);
|
|
356674
355924
|
;// ./node_modules/react-tabs/esm/index.js
|
|
356675
355925
|
|
|
356676
355926
|
|
|
355927
|
+
/***/ }),
|
|
356677
355928
|
|
|
355929
|
+
/***/ 34168:
|
|
355930
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
356678
355931
|
|
|
355932
|
+
'use client';
|
|
355933
|
+
var e=__webpack_require__(51649),t=__webpack_require__(64976);function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=/*#__PURE__*/n(e),s=/*#__PURE__*/n(t);const a=e=>"number"==typeof e&&!isNaN(e),r=e=>"string"==typeof e,i=e=>"function"==typeof e,l=e=>r(e)||i(e)?e:null,c=t=>e.isValidElement(t)||r(t)||i(t)||a(t);function u(e,t,n){void 0===n&&(n=300);const{scrollHeight:o,style:s}=e;requestAnimationFrame(()=>{s.minHeight="initial",s.height=o+"px",s.transition=`all ${n}ms`,requestAnimationFrame(()=>{s.height="0",s.padding="0",s.margin="0",setTimeout(t,n)})})}function d(t){let{enter:n,exit:s,appendPosition:a=!1,collapse:r=!0,collapseDuration:i=300}=t;return function(t){let{children:l,position:c,preventExitTransition:d,done:f,nodeRef:p,isIn:m}=t;const g=a?`${n}--${c}`:n,h=a?`${s}--${c}`:s,y=e.useRef(0);return e.useLayoutEffect(()=>{const e=p.current,t=g.split(" "),n=o=>{o.target===p.current&&(e.dispatchEvent(new Event("d")),e.removeEventListener("animationend",n),e.removeEventListener("animationcancel",n),0===y.current&&"animationcancel"!==o.type&&e.classList.remove(...t))};e.classList.add(...t),e.addEventListener("animationend",n),e.addEventListener("animationcancel",n)},[]),e.useEffect(()=>{const e=p.current,t=()=>{e.removeEventListener("animationend",t),r?u(e,f,i):f()};m||(d?t():(y.current=1,e.className+=` ${h}`,e.addEventListener("animationend",t)))},[m]),o.default.createElement(o.default.Fragment,null,l)}}function f(e,t){return null!=e?{content:e.content,containerId:e.props.containerId,id:e.props.toastId,theme:e.props.theme,type:e.props.type,data:e.props.data||{},isLoading:e.props.isLoading,icon:e.props.icon,status:t}:{}}const p={list:new Map,emitQueue:new Map,on(e,t){return this.list.has(e)||this.list.set(e,[]),this.list.get(e).push(t),this},off(e,t){if(t){const n=this.list.get(e).filter(e=>e!==t);return this.list.set(e,n),this}return this.list.delete(e),this},cancelEmit(e){const t=this.emitQueue.get(e);return t&&(t.forEach(clearTimeout),this.emitQueue.delete(e)),this},emit(e){this.list.has(e)&&this.list.get(e).forEach(t=>{const n=setTimeout(()=>{t(...[].slice.call(arguments,1))},0);this.emitQueue.has(e)||this.emitQueue.set(e,[]),this.emitQueue.get(e).push(n)})}},m=e=>{let{theme:t,type:n,...s}=e;return o.default.createElement("svg",{viewBox:"0 0 24 24",width:"100%",height:"100%",fill:"colored"===t?"currentColor":`var(--toastify-icon-color-${n})`,...s})},g={info:function(e){return o.default.createElement(m,{...e},o.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"}))},warning:function(e){return o.default.createElement(m,{...e},o.default.createElement("path",{d:"M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"}))},success:function(e){return o.default.createElement(m,{...e},o.default.createElement("path",{d:"M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"}))},error:function(e){return o.default.createElement(m,{...e},o.default.createElement("path",{d:"M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"}))},spinner:function(){return o.default.createElement("div",{className:"Toastify__spinner"})}};function h(t){const[,n]=e.useReducer(e=>e+1,0),[o,s]=e.useState([]),u=e.useRef(null),d=e.useRef(new Map).current,m=e=>-1!==o.indexOf(e),h=e.useRef({toastKey:1,displayedToast:0,count:0,queue:[],props:t,containerId:null,isToastActive:m,getToast:e=>d.get(e)}).current;function y(e){let{containerId:t}=e;const{limit:n}=h.props;!n||t&&h.containerId!==t||(h.count-=h.queue.length,h.queue=[])}function v(e){s(t=>null==e?[]:t.filter(t=>t!==e))}function T(){const{toastContent:e,toastProps:t,staleId:n}=h.queue.shift();C(e,t,n)}function E(t,o){let{delay:s,staleId:m,...y}=o;if(!c(t)||function(e){return!u.current||h.props.enableMultiContainer&&e.containerId!==h.props.containerId||d.has(e.toastId)&&null==e.updateId}(y))return;const{toastId:E,updateId:b,data:I}=y,{props:_}=h,L=()=>v(E),O=null==b;O&&h.count++;const N={..._,style:_.toastStyle,key:h.toastKey++,...Object.fromEntries(Object.entries(y).filter(e=>{let[t,n]=e;return null!=n})),toastId:E,updateId:b,data:I,closeToast:L,isIn:!1,className:l(y.className||_.toastClassName),bodyClassName:l(y.bodyClassName||_.bodyClassName),progressClassName:l(y.progressClassName||_.progressClassName),autoClose:!y.isLoading&&(x=y.autoClose,R=_.autoClose,!1===x||a(x)&&x>0?x:R),deleteToast(){const e=f(d.get(E),"removed");d.delete(E),p.emit(4,e);const t=h.queue.length;if(h.count=null==E?h.count-h.displayedToast:h.count-1,h.count<0&&(h.count=0),t>0){const e=null==E?h.props.limit:1;if(1===t||1===e)h.displayedToast++,T();else{const n=e>t?t:e;h.displayedToast=n;for(let e=0;e<n;e++)T()}}else n()}};var x,R;N.iconOut=function(t){let{theme:n,type:o,isLoading:s,icon:l}=t,c=null;const u={theme:n,type:o};return!1===l||(i(l)?c=l(u):e.isValidElement(l)?c=e.cloneElement(l,u):r(l)||a(l)?c=l:s?c=g.spinner():(e=>e in g)(o)&&(c=g[o](u))),c}(N),i(y.onOpen)&&(N.onOpen=y.onOpen),i(y.onClose)&&(N.onClose=y.onClose),N.closeButton=_.closeButton,!1===y.closeButton||c(y.closeButton)?N.closeButton=y.closeButton:!0===y.closeButton&&(N.closeButton=!c(_.closeButton)||_.closeButton);let w=t;e.isValidElement(t)&&!r(t.type)?w=e.cloneElement(t,{closeToast:L,toastProps:N,data:I}):i(t)&&(w=t({closeToast:L,toastProps:N,data:I})),_.limit&&_.limit>0&&h.count>_.limit&&O?h.queue.push({toastContent:w,toastProps:N,staleId:m}):a(s)?setTimeout(()=>{C(w,N,m)},s):C(w,N,m)}function C(e,t,n){const{toastId:o}=t;n&&d.delete(n);const a={content:e,props:t};d.set(o,a),s(e=>[...e,o].filter(e=>e!==n)),p.emit(4,f(a,null==a.props.updateId?"added":"updated"))}return e.useEffect(()=>(h.containerId=t.containerId,p.cancelEmit(3).on(0,E).on(1,e=>u.current&&v(e)).on(5,y).emit(2,h),()=>{d.clear(),p.emit(3,h)}),[]),e.useEffect(()=>{h.props=t,h.isToastActive=m,h.displayedToast=o.length}),{getToastToRender:function(e){const n=new Map,o=Array.from(d.values());return t.newestOnTop&&o.reverse(),o.forEach(e=>{const{position:t}=e.props;n.has(t)||n.set(t,[]),n.get(t).push(e)}),Array.from(n,t=>e(t[0],t[1]))},containerRef:u,isToastActive:m}}function y(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientX:e.clientX}function v(e){return e.targetTouches&&e.targetTouches.length>=1?e.targetTouches[0].clientY:e.clientY}function T(t){const[n,o]=e.useState(!1),[s,a]=e.useState(!1),r=e.useRef(null),l=e.useRef({start:0,x:0,y:0,delta:0,removalDistance:0,canCloseOnClick:!0,canDrag:!1,boundingRect:null,didMove:!1}).current,c=e.useRef(t),{autoClose:u,pauseOnHover:d,closeToast:f,onClick:p,closeOnClick:m}=t;function g(e){if(t.draggable){"touchstart"===e.nativeEvent.type&&e.nativeEvent.preventDefault(),l.didMove=!1,document.addEventListener("mousemove",C),document.addEventListener("mouseup",b),document.addEventListener("touchmove",C),document.addEventListener("touchend",b);const n=r.current;l.canCloseOnClick=!0,l.canDrag=!0,l.boundingRect=n.getBoundingClientRect(),n.style.transition="",l.x=y(e.nativeEvent),l.y=v(e.nativeEvent),"x"===t.draggableDirection?(l.start=l.x,l.removalDistance=n.offsetWidth*(t.draggablePercent/100)):(l.start=l.y,l.removalDistance=n.offsetHeight*(80===t.draggablePercent?1.5*t.draggablePercent:t.draggablePercent/100))}}function h(e){if(l.boundingRect){const{top:n,bottom:o,left:s,right:a}=l.boundingRect;"touchend"!==e.nativeEvent.type&&t.pauseOnHover&&l.x>=s&&l.x<=a&&l.y>=n&&l.y<=o?E():T()}}function T(){o(!0)}function E(){o(!1)}function C(e){const o=r.current;l.canDrag&&o&&(l.didMove=!0,n&&E(),l.x=y(e),l.y=v(e),l.delta="x"===t.draggableDirection?l.x-l.start:l.y-l.start,l.start!==l.x&&(l.canCloseOnClick=!1),o.style.transform=`translate${t.draggableDirection}(${l.delta}px)`,o.style.opacity=""+(1-Math.abs(l.delta/l.removalDistance)))}function b(){document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",b),document.removeEventListener("touchmove",C),document.removeEventListener("touchend",b);const e=r.current;if(l.canDrag&&l.didMove&&e){if(l.canDrag=!1,Math.abs(l.delta)>l.removalDistance)return a(!0),void t.closeToast();e.style.transition="transform 0.2s, opacity 0.2s",e.style.transform=`translate${t.draggableDirection}(0)`,e.style.opacity="1"}}e.useEffect(()=>{c.current=t}),e.useEffect(()=>(r.current&&r.current.addEventListener("d",T,{once:!0}),i(t.onOpen)&&t.onOpen(e.isValidElement(t.children)&&t.children.props),()=>{const t=c.current;i(t.onClose)&&t.onClose(e.isValidElement(t.children)&&t.children.props)}),[]),e.useEffect(()=>(t.pauseOnFocusLoss&&(document.hasFocus()||E(),window.addEventListener("focus",T),window.addEventListener("blur",E)),()=>{t.pauseOnFocusLoss&&(window.removeEventListener("focus",T),window.removeEventListener("blur",E))}),[t.pauseOnFocusLoss]);const I={onMouseDown:g,onTouchStart:g,onMouseUp:h,onTouchEnd:h};return u&&d&&(I.onMouseEnter=E,I.onMouseLeave=T),m&&(I.onClick=e=>{p&&p(e),l.canCloseOnClick&&f()}),{playToast:T,pauseToast:E,isRunning:n,preventExitTransition:s,toastRef:r,eventHandlers:I}}function E(e){let{closeToast:t,theme:n,ariaLabel:s="close"}=e;return o.default.createElement("button",{className:`Toastify__close-button Toastify__close-button--${n}`,type:"button",onClick:e=>{e.stopPropagation(),t(e)},"aria-label":s},o.default.createElement("svg",{"aria-hidden":"true",viewBox:"0 0 14 16"},o.default.createElement("path",{fillRule:"evenodd",d:"M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"})))}function C(e){let{delay:t,isRunning:n,closeToast:a,type:r="default",hide:l,className:c,style:u,controlledProgress:d,progress:f,rtl:p,isIn:m,theme:g}=e;const h=l||d&&0===f,y={...u,animationDuration:`${t}ms`,animationPlayState:n?"running":"paused",opacity:h?0:1};d&&(y.transform=`scaleX(${f})`);const v=s.default("Toastify__progress-bar",d?"Toastify__progress-bar--controlled":"Toastify__progress-bar--animated",`Toastify__progress-bar-theme--${g}`,`Toastify__progress-bar--${r}`,{"Toastify__progress-bar--rtl":p}),T=i(c)?c({rtl:p,type:r,defaultClassName:v}):s.default(v,c);return o.default.createElement("div",{role:"progressbar","aria-hidden":h?"true":"false","aria-label":"notification timer",className:T,style:y,[d&&f>=1?"onTransitionEnd":"onAnimationEnd"]:d&&f<1?null:()=>{m&&a()}})}const b=t=>{const{isRunning:n,preventExitTransition:a,toastRef:r,eventHandlers:l}=T(t),{closeButton:c,children:u,autoClose:d,onClick:f,type:p,hideProgressBar:m,closeToast:g,transition:h,position:y,className:v,style:b,bodyClassName:I,bodyStyle:_,progressClassName:L,progressStyle:O,updateId:N,role:x,progress:R,rtl:w,toastId:M,deleteToast:$,isIn:k,isLoading:B,iconOut:P,closeOnClick:D,theme:A}=t,z=s.default("Toastify__toast",`Toastify__toast-theme--${A}`,`Toastify__toast--${p}`,{"Toastify__toast--rtl":w},{"Toastify__toast--close-on-click":D}),F=i(v)?v({rtl:w,position:y,type:p,defaultClassName:z}):s.default(z,v),S=!!R||!d,q={closeToast:g,type:p,theme:A};let H=null;return!1===c||(H=i(c)?c(q):e.isValidElement(c)?e.cloneElement(c,q):E(q)),o.default.createElement(h,{isIn:k,done:$,position:y,preventExitTransition:a,nodeRef:r},o.default.createElement("div",{id:M,onClick:f,className:F,...l,style:b,ref:r},o.default.createElement("div",{...k&&{role:x},className:i(I)?I({type:p}):s.default("Toastify__toast-body",I),style:_},null!=P&&o.default.createElement("div",{className:s.default("Toastify__toast-icon",{"Toastify--animate-icon Toastify__zoom-enter":!B})},P),o.default.createElement("div",null,u)),H,o.default.createElement(C,{...N&&!S?{key:`pb-${N}`}:{},rtl:w,theme:A,delay:d,isRunning:n,isIn:k,closeToast:g,hide:m,type:p,style:O,className:L,controlledProgress:S,progress:R||0})))},I=function(e,t){return void 0===t&&(t=!1),{enter:`Toastify--animate Toastify__${e}-enter`,exit:`Toastify--animate Toastify__${e}-exit`,appendPosition:t}},_=d(I("bounce",!0)),L=d(I("slide",!0)),O=d(I("zoom")),N=d(I("flip")),x=e.forwardRef((t,n)=>{const{getToastToRender:a,containerRef:r,isToastActive:c}=h(t),{className:u,style:d,rtl:f,containerId:p}=t;function m(e){const t=s.default("Toastify__toast-container",`Toastify__toast-container--${e}`,{"Toastify__toast-container--rtl":f});return i(u)?u({position:e,rtl:f,defaultClassName:t}):s.default(t,l(u))}return e.useEffect(()=>{n&&(n.current=r.current)},[]),o.default.createElement("div",{ref:r,className:"Toastify",id:p},a((e,t)=>{const n=t.length?{...d}:{...d,pointerEvents:"none"};return o.default.createElement("div",{className:m(e),style:n,key:`container-${e}`},t.map((e,n)=>{let{content:s,props:a}=e;return o.default.createElement(b,{...a,isIn:c(a.toastId),style:{...a.style,"--nth":n+1,"--len":t.length},key:`toast-${a.key}`},s)}))}))});x.displayName="ToastContainer",x.defaultProps={position:"top-right",transition:_,autoClose:5e3,closeButton:E,pauseOnHover:!0,pauseOnFocusLoss:!0,closeOnClick:!0,draggable:!0,draggablePercent:80,draggableDirection:"x",role:"alert",theme:"light"};let R,w=new Map,M=[],$=1;function k(){return""+$++}function B(e){return e&&(r(e.toastId)||a(e.toastId))?e.toastId:k()}function P(e,t){return w.size>0?p.emit(0,e,t):M.push({content:e,options:t}),t.toastId}function D(e,t){return{...t,type:t&&t.type||e,toastId:B(t)}}function A(e){return(t,n)=>P(t,D(e,n))}function z(e,t){return P(e,D("default",t))}z.loading=(e,t)=>P(e,D("default",{isLoading:!0,autoClose:!1,closeOnClick:!1,closeButton:!1,draggable:!1,...t})),z.promise=function(e,t,n){let o,{pending:s,error:a,success:l}=t;s&&(o=r(s)?z.loading(s,n):z.loading(s.render,{...n,...s}));const c={isLoading:null,autoClose:null,closeOnClick:null,closeButton:null,draggable:null},u=(e,t,s)=>{if(null==t)return void z.dismiss(o);const a={type:e,...c,...n,data:s},i=r(t)?{render:t}:t;return o?z.update(o,{...a,...i}):z(i.render,{...a,...i}),s},d=i(e)?e():e;return d.then(e=>u("success",l,e)).catch(e=>u("error",a,e)),d},z.success=A("success"),z.info=A("info"),z.error=A("error"),z.warning=A("warning"),z.warn=z.warning,z.dark=(e,t)=>P(e,D("default",{theme:"dark",...t})),z.dismiss=e=>{w.size>0?p.emit(1,e):M=M.filter(t=>null!=e&&t.options.toastId!==e)},z.clearWaitingQueue=function(e){return void 0===e&&(e={}),p.emit(5,e)},z.isActive=e=>{let t=!1;return w.forEach(n=>{n.isToastActive&&n.isToastActive(e)&&(t=!0)}),t},z.update=function(e,t){void 0===t&&(t={}),setTimeout(()=>{const n=function(e,t){let{containerId:n}=t;const o=w.get(n||R);return o&&o.getToast(e)}(e,t);if(n){const{props:o,content:s}=n,a={delay:100,...o,...t,toastId:t.toastId||e,updateId:k()};a.toastId!==e&&(a.staleId=e);const r=a.render||s;delete a.render,P(r,a)}},0)},z.done=e=>{z.update(e,{progress:1})},z.onChange=e=>(p.on(4,e),()=>{p.off(4,e)}),z.POSITION={TOP_LEFT:"top-left",TOP_RIGHT:"top-right",TOP_CENTER:"top-center",BOTTOM_LEFT:"bottom-left",BOTTOM_RIGHT:"bottom-right",BOTTOM_CENTER:"bottom-center"},z.TYPE={INFO:"info",SUCCESS:"success",WARNING:"warning",ERROR:"error",DEFAULT:"default"},p.on(2,e=>{R=e.containerId||e,w.set(R,e),M.forEach(e=>{p.emit(0,e.content,e.options)}),M=[]}).on(3,e=>{w.delete(e.containerId||e),0===w.size&&p.off(0).off(1).off(5)}),exports.Bounce=_,exports.Flip=N,exports.Icons=g,exports.Slide=L,exports.ToastContainer=x,exports.Zoom=O,exports.collapseToast=u,exports.cssTransition=d,exports.toast=z,exports.useToast=T,exports.useToastContainer=h;
|
|
355934
|
+
//# sourceMappingURL=react-toastify.js.map
|
|
356679
355935
|
|
|
356680
355936
|
|
|
356681
355937
|
/***/ }),
|
|
356682
355938
|
|
|
356683
|
-
/***/
|
|
355939
|
+
/***/ 64976:
|
|
356684
355940
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
356685
355941
|
|
|
356686
355942
|
__webpack_require__.r(__webpack_exports__);
|
|
356687
355943
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
356688
|
-
/* harmony export */
|
|
356689
|
-
/* harmony export */
|
|
356690
|
-
/* harmony export */ Icons: () => (/* binding */ Icons),
|
|
356691
|
-
/* harmony export */ Slide: () => (/* binding */ Slide),
|
|
356692
|
-
/* harmony export */ ToastContainer: () => (/* binding */ ToastContainer),
|
|
356693
|
-
/* harmony export */ Zoom: () => (/* binding */ Zoom),
|
|
356694
|
-
/* harmony export */ collapseToast: () => (/* binding */ collapseToast),
|
|
356695
|
-
/* harmony export */ cssTransition: () => (/* binding */ cssTransition),
|
|
356696
|
-
/* harmony export */ toast: () => (/* binding */ toast),
|
|
356697
|
-
/* harmony export */ useToast: () => (/* binding */ useToast),
|
|
356698
|
-
/* harmony export */ useToastContainer: () => (/* binding */ useToastContainer)
|
|
355944
|
+
/* harmony export */ clsx: () => (/* binding */ clsx),
|
|
355945
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
356699
355946
|
/* harmony export */ });
|
|
356700
|
-
/* harmony
|
|
356701
|
-
/* harmony import */ var clsx__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(20053);
|
|
356702
|
-
/* harmony import */ var react_dom__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(7516);
|
|
356703
|
-
|
|
356704
|
-
|
|
356705
|
-
|
|
356706
|
-
|
|
356707
|
-
function _extends() {
|
|
356708
|
-
_extends = Object.assign || function (target) {
|
|
356709
|
-
for (var i = 1; i < arguments.length; i++) {
|
|
356710
|
-
var source = arguments[i];
|
|
356711
|
-
|
|
356712
|
-
for (var key in source) {
|
|
356713
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
356714
|
-
target[key] = source[key];
|
|
356715
|
-
}
|
|
356716
|
-
}
|
|
356717
|
-
}
|
|
356718
|
-
|
|
356719
|
-
return target;
|
|
356720
|
-
};
|
|
356721
|
-
|
|
356722
|
-
return _extends.apply(this, arguments);
|
|
356723
|
-
}
|
|
356724
|
-
|
|
356725
|
-
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
356726
|
-
if (source == null) return {};
|
|
356727
|
-
var target = {};
|
|
356728
|
-
var sourceKeys = Object.keys(source);
|
|
356729
|
-
var key, i;
|
|
356730
|
-
|
|
356731
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
356732
|
-
key = sourceKeys[i];
|
|
356733
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
356734
|
-
target[key] = source[key];
|
|
356735
|
-
}
|
|
356736
|
-
|
|
356737
|
-
return target;
|
|
356738
|
-
}
|
|
356739
|
-
|
|
356740
|
-
function isNum(v) {
|
|
356741
|
-
return typeof v === 'number' && !isNaN(v);
|
|
356742
|
-
}
|
|
356743
|
-
function isBool(v) {
|
|
356744
|
-
return typeof v === 'boolean';
|
|
356745
|
-
}
|
|
356746
|
-
function isStr(v) {
|
|
356747
|
-
return typeof v === 'string';
|
|
356748
|
-
}
|
|
356749
|
-
function isFn(v) {
|
|
356750
|
-
return typeof v === 'function';
|
|
356751
|
-
}
|
|
356752
|
-
function parseClassName(v) {
|
|
356753
|
-
return isStr(v) || isFn(v) ? v : null;
|
|
356754
|
-
}
|
|
356755
|
-
function isToastIdValid(toastId) {
|
|
356756
|
-
return toastId === 0 || toastId;
|
|
356757
|
-
}
|
|
356758
|
-
function getAutoCloseDelay(toastAutoClose, containerAutoClose) {
|
|
356759
|
-
return toastAutoClose === false || isNum(toastAutoClose) && toastAutoClose > 0 ? toastAutoClose : containerAutoClose;
|
|
356760
|
-
}
|
|
356761
|
-
var canUseDom = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
356762
|
-
function canBeRendered(content) {
|
|
356763
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(content) || isStr(content) || isFn(content) || isNum(content);
|
|
356764
|
-
}
|
|
356765
|
-
|
|
356766
|
-
var POSITION = {
|
|
356767
|
-
TOP_LEFT: 'top-left',
|
|
356768
|
-
TOP_RIGHT: 'top-right',
|
|
356769
|
-
TOP_CENTER: 'top-center',
|
|
356770
|
-
BOTTOM_LEFT: 'bottom-left',
|
|
356771
|
-
BOTTOM_RIGHT: 'bottom-right',
|
|
356772
|
-
BOTTOM_CENTER: 'bottom-center'
|
|
356773
|
-
};
|
|
356774
|
-
var TYPE = {
|
|
356775
|
-
INFO: 'info',
|
|
356776
|
-
SUCCESS: 'success',
|
|
356777
|
-
WARNING: 'warning',
|
|
356778
|
-
ERROR: 'error',
|
|
356779
|
-
DEFAULT: 'default'
|
|
356780
|
-
};
|
|
356781
|
-
|
|
356782
|
-
/**
|
|
356783
|
-
* Used to collapse toast after exit animation
|
|
356784
|
-
*/
|
|
356785
|
-
function collapseToast(node, done, duration
|
|
356786
|
-
/* COLLAPSE_DURATION */
|
|
356787
|
-
) {
|
|
356788
|
-
if (duration === void 0) {
|
|
356789
|
-
duration = 300;
|
|
356790
|
-
}
|
|
356791
|
-
|
|
356792
|
-
var scrollHeight = node.scrollHeight,
|
|
356793
|
-
style = node.style;
|
|
356794
|
-
requestAnimationFrame(function () {
|
|
356795
|
-
style.minHeight = 'initial';
|
|
356796
|
-
style.height = scrollHeight + 'px';
|
|
356797
|
-
style.transition = "all " + duration + "ms";
|
|
356798
|
-
requestAnimationFrame(function () {
|
|
356799
|
-
style.height = '0';
|
|
356800
|
-
style.padding = '0';
|
|
356801
|
-
style.margin = '0';
|
|
356802
|
-
setTimeout(done, duration);
|
|
356803
|
-
});
|
|
356804
|
-
});
|
|
356805
|
-
}
|
|
356806
|
-
|
|
356807
|
-
/**
|
|
356808
|
-
* Css animation that just work.
|
|
356809
|
-
* You could use animate.css for instance
|
|
356810
|
-
*
|
|
356811
|
-
*
|
|
356812
|
-
* ```
|
|
356813
|
-
* cssTransition({
|
|
356814
|
-
* enter: "animate__animated animate__bounceIn",
|
|
356815
|
-
* exit: "animate__animated animate__bounceOut"
|
|
356816
|
-
* })
|
|
356817
|
-
* ```
|
|
356818
|
-
*
|
|
356819
|
-
*/
|
|
356820
|
-
|
|
356821
|
-
function cssTransition(_ref) {
|
|
356822
|
-
var enter = _ref.enter,
|
|
356823
|
-
exit = _ref.exit,
|
|
356824
|
-
_ref$appendPosition = _ref.appendPosition,
|
|
356825
|
-
appendPosition = _ref$appendPosition === void 0 ? false : _ref$appendPosition,
|
|
356826
|
-
_ref$collapse = _ref.collapse,
|
|
356827
|
-
collapse = _ref$collapse === void 0 ? true : _ref$collapse,
|
|
356828
|
-
_ref$collapseDuration = _ref.collapseDuration,
|
|
356829
|
-
collapseDuration = _ref$collapseDuration === void 0 ? 300 : _ref$collapseDuration;
|
|
356830
|
-
return function ToastTransition(_ref2) {
|
|
356831
|
-
var children = _ref2.children,
|
|
356832
|
-
position = _ref2.position,
|
|
356833
|
-
preventExitTransition = _ref2.preventExitTransition,
|
|
356834
|
-
done = _ref2.done,
|
|
356835
|
-
nodeRef = _ref2.nodeRef,
|
|
356836
|
-
isIn = _ref2.isIn;
|
|
356837
|
-
var enterClassName = appendPosition ? enter + "--" + position : enter;
|
|
356838
|
-
var exitClassName = appendPosition ? exit + "--" + position : exit;
|
|
356839
|
-
var baseClassName = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)();
|
|
356840
|
-
var animationStep = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(0
|
|
356841
|
-
/* Enter */
|
|
356842
|
-
);
|
|
356843
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useLayoutEffect)(function () {
|
|
356844
|
-
onEnter();
|
|
356845
|
-
}, []);
|
|
356846
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
356847
|
-
if (!isIn) preventExitTransition ? onExited() : onExit();
|
|
356848
|
-
}, [isIn]);
|
|
356849
|
-
|
|
356850
|
-
function onEnter() {
|
|
356851
|
-
var node = nodeRef.current;
|
|
356852
|
-
baseClassName.current = node.className;
|
|
356853
|
-
node.className += " " + enterClassName;
|
|
356854
|
-
node.addEventListener('animationend', onEntered);
|
|
356855
|
-
node.addEventListener('animationcancel', onEntered);
|
|
356856
|
-
}
|
|
356857
|
-
|
|
356858
|
-
function onEntered(e) {
|
|
356859
|
-
if (e.target !== nodeRef.current) return;
|
|
356860
|
-
var node = nodeRef.current;
|
|
356861
|
-
node.dispatchEvent(new Event("d"
|
|
356862
|
-
/* ENTRANCE_ANIMATION_END */
|
|
356863
|
-
));
|
|
356864
|
-
node.removeEventListener('animationend', onEntered);
|
|
356865
|
-
node.removeEventListener('animationcancel', onEntered);
|
|
356866
|
-
|
|
356867
|
-
if (animationStep.current === 0
|
|
356868
|
-
/* Enter */
|
|
356869
|
-
) {
|
|
356870
|
-
node.className = baseClassName.current;
|
|
356871
|
-
}
|
|
356872
|
-
}
|
|
356873
|
-
|
|
356874
|
-
function onExit() {
|
|
356875
|
-
animationStep.current = 1
|
|
356876
|
-
/* Exit */
|
|
356877
|
-
;
|
|
356878
|
-
var node = nodeRef.current;
|
|
356879
|
-
node.className += " " + exitClassName;
|
|
356880
|
-
node.addEventListener('animationend', onExited);
|
|
356881
|
-
}
|
|
356882
|
-
|
|
356883
|
-
function onExited() {
|
|
356884
|
-
var node = nodeRef.current;
|
|
356885
|
-
node.removeEventListener('animationend', onExited);
|
|
356886
|
-
collapse ? collapseToast(node, done, collapseDuration) : done();
|
|
356887
|
-
}
|
|
356888
|
-
|
|
356889
|
-
return react__WEBPACK_IMPORTED_MODULE_0__["default"].createElement(react__WEBPACK_IMPORTED_MODULE_0__["default"].Fragment, null, children);
|
|
356890
|
-
};
|
|
356891
|
-
}
|
|
356892
|
-
|
|
356893
|
-
var eventManager = {
|
|
356894
|
-
list: /*#__PURE__*/new Map(),
|
|
356895
|
-
emitQueue: /*#__PURE__*/new Map(),
|
|
356896
|
-
on: function on(event, callback) {
|
|
356897
|
-
this.list.has(event) || this.list.set(event, []);
|
|
356898
|
-
this.list.get(event).push(callback);
|
|
356899
|
-
return this;
|
|
356900
|
-
},
|
|
356901
|
-
off: function off(event, callback) {
|
|
356902
|
-
if (callback) {
|
|
356903
|
-
var cb = this.list.get(event).filter(function (cb) {
|
|
356904
|
-
return cb !== callback;
|
|
356905
|
-
});
|
|
356906
|
-
this.list.set(event, cb);
|
|
356907
|
-
return this;
|
|
356908
|
-
}
|
|
356909
|
-
|
|
356910
|
-
this.list["delete"](event);
|
|
356911
|
-
return this;
|
|
356912
|
-
},
|
|
356913
|
-
cancelEmit: function cancelEmit(event) {
|
|
356914
|
-
var timers = this.emitQueue.get(event);
|
|
356915
|
-
|
|
356916
|
-
if (timers) {
|
|
356917
|
-
timers.forEach(clearTimeout);
|
|
356918
|
-
this.emitQueue["delete"](event);
|
|
356919
|
-
}
|
|
356920
|
-
|
|
356921
|
-
return this;
|
|
356922
|
-
},
|
|
356923
|
-
|
|
356924
|
-
/**
|
|
356925
|
-
* Enqueue the event at the end of the call stack
|
|
356926
|
-
* Doing so let the user call toast as follow:
|
|
356927
|
-
* toast('1')
|
|
356928
|
-
* toast('2')
|
|
356929
|
-
* toast('3')
|
|
356930
|
-
* Without setTimemout the code above will not work
|
|
356931
|
-
*/
|
|
356932
|
-
emit: function emit(event) {
|
|
356933
|
-
var _this = this;
|
|
356934
|
-
|
|
356935
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
356936
|
-
args[_key - 1] = arguments[_key];
|
|
356937
|
-
}
|
|
356938
|
-
|
|
356939
|
-
this.list.has(event) && this.list.get(event).forEach(function (callback) {
|
|
356940
|
-
var timer = setTimeout(function () {
|
|
356941
|
-
// @ts-ignore
|
|
356942
|
-
callback.apply(void 0, args);
|
|
356943
|
-
}, 0);
|
|
356944
|
-
_this.emitQueue.has(event) || _this.emitQueue.set(event, []);
|
|
356945
|
-
|
|
356946
|
-
_this.emitQueue.get(event).push(timer);
|
|
356947
|
-
});
|
|
356948
|
-
}
|
|
356949
|
-
};
|
|
356950
|
-
|
|
356951
|
-
var _excluded = ["delay", "staleId"];
|
|
356952
|
-
function useToastContainer(props) {
|
|
356953
|
-
var _useReducer = (0,react__WEBPACK_IMPORTED_MODULE_0__.useReducer)(function (x) {
|
|
356954
|
-
return x + 1;
|
|
356955
|
-
}, 0),
|
|
356956
|
-
forceUpdate = _useReducer[1];
|
|
356957
|
-
|
|
356958
|
-
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
|
|
356959
|
-
toastIds = _useState[0],
|
|
356960
|
-
setToastIds = _useState[1];
|
|
356961
|
-
|
|
356962
|
-
var containerRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
356963
|
-
var toastToRender = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(new Map()).current;
|
|
356964
|
-
|
|
356965
|
-
var isToastActive = function isToastActive(id) {
|
|
356966
|
-
return toastIds.indexOf(id) !== -1;
|
|
356967
|
-
};
|
|
356968
|
-
|
|
356969
|
-
var instance = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
|
|
356970
|
-
toastKey: 1,
|
|
356971
|
-
displayedToast: 0,
|
|
356972
|
-
count: 0,
|
|
356973
|
-
queue: [],
|
|
356974
|
-
props: props,
|
|
356975
|
-
containerId: null,
|
|
356976
|
-
isToastActive: isToastActive,
|
|
356977
|
-
getToast: function getToast(id) {
|
|
356978
|
-
return toastToRender.get(id);
|
|
356979
|
-
}
|
|
356980
|
-
}).current;
|
|
356981
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
356982
|
-
instance.containerId = props.containerId;
|
|
356983
|
-
eventManager.cancelEmit(3
|
|
356984
|
-
/* WillUnmount */
|
|
356985
|
-
).on(0
|
|
356986
|
-
/* Show */
|
|
356987
|
-
, buildToast).on(1
|
|
356988
|
-
/* Clear */
|
|
356989
|
-
, function (toastId) {
|
|
356990
|
-
return containerRef.current && removeToast(toastId);
|
|
356991
|
-
}).on(5
|
|
356992
|
-
/* ClearWaitingQueue */
|
|
356993
|
-
, clearWaitingQueue).emit(2
|
|
356994
|
-
/* DidMount */
|
|
356995
|
-
, instance);
|
|
356996
|
-
return function () {
|
|
356997
|
-
return eventManager.emit(3
|
|
356998
|
-
/* WillUnmount */
|
|
356999
|
-
, instance);
|
|
357000
|
-
};
|
|
357001
|
-
}, []);
|
|
357002
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
357003
|
-
instance.isToastActive = isToastActive;
|
|
357004
|
-
instance.displayedToast = toastIds.length;
|
|
357005
|
-
eventManager.emit(4
|
|
357006
|
-
/* Change */
|
|
357007
|
-
, toastIds.length, props.containerId);
|
|
357008
|
-
}, [toastIds]);
|
|
357009
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
357010
|
-
instance.props = props;
|
|
357011
|
-
});
|
|
357012
|
-
|
|
357013
|
-
function clearWaitingQueue(_ref) {
|
|
357014
|
-
var containerId = _ref.containerId;
|
|
357015
|
-
var limit = instance.props.limit;
|
|
357016
|
-
|
|
357017
|
-
if (limit && (!containerId || instance.containerId === containerId)) {
|
|
357018
|
-
instance.count -= instance.queue.length;
|
|
357019
|
-
instance.queue = [];
|
|
357020
|
-
}
|
|
357021
|
-
}
|
|
357022
|
-
|
|
357023
|
-
function removeToast(toastId) {
|
|
357024
|
-
setToastIds(function (state) {
|
|
357025
|
-
return isToastIdValid(toastId) ? state.filter(function (id) {
|
|
357026
|
-
return id !== toastId;
|
|
357027
|
-
}) : [];
|
|
357028
|
-
});
|
|
357029
|
-
}
|
|
357030
|
-
|
|
357031
|
-
function dequeueToast() {
|
|
357032
|
-
var _instance$queue$shift = instance.queue.shift(),
|
|
357033
|
-
toastContent = _instance$queue$shift.toastContent,
|
|
357034
|
-
toastProps = _instance$queue$shift.toastProps,
|
|
357035
|
-
staleId = _instance$queue$shift.staleId;
|
|
357036
|
-
|
|
357037
|
-
appendToast(toastContent, toastProps, staleId);
|
|
357038
|
-
}
|
|
357039
|
-
/**
|
|
357040
|
-
* check if a container is attached to the dom
|
|
357041
|
-
* check for multi-container, build only if associated
|
|
357042
|
-
* check for duplicate toastId if no update
|
|
357043
|
-
*/
|
|
357044
|
-
|
|
357045
|
-
|
|
357046
|
-
function isNotValid(options) {
|
|
357047
|
-
return !containerRef.current || instance.props.enableMultiContainer && options.containerId !== instance.props.containerId || toastToRender.has(options.toastId) && options.updateId == null;
|
|
357048
|
-
} // this function and all the function called inside needs to rely on refs
|
|
357049
|
-
|
|
357050
|
-
|
|
357051
|
-
function buildToast(content, _ref2) {
|
|
357052
|
-
var delay = _ref2.delay,
|
|
357053
|
-
staleId = _ref2.staleId,
|
|
357054
|
-
options = _objectWithoutPropertiesLoose(_ref2, _excluded);
|
|
357055
|
-
|
|
357056
|
-
if (!canBeRendered(content) || isNotValid(options)) return;
|
|
357057
|
-
var toastId = options.toastId,
|
|
357058
|
-
updateId = options.updateId,
|
|
357059
|
-
data = options.data;
|
|
357060
|
-
var props = instance.props;
|
|
357061
|
-
|
|
357062
|
-
var closeToast = function closeToast() {
|
|
357063
|
-
return removeToast(toastId);
|
|
357064
|
-
};
|
|
357065
|
-
|
|
357066
|
-
var isNotAnUpdate = updateId == null;
|
|
357067
|
-
if (isNotAnUpdate) instance.count++;
|
|
357068
|
-
var toastProps = {
|
|
357069
|
-
toastId: toastId,
|
|
357070
|
-
updateId: updateId,
|
|
357071
|
-
isLoading: options.isLoading,
|
|
357072
|
-
theme: options.theme || props.theme,
|
|
357073
|
-
icon: options.icon != null ? options.icon : props.icon,
|
|
357074
|
-
isIn: false,
|
|
357075
|
-
key: options.key || instance.toastKey++,
|
|
357076
|
-
type: options.type,
|
|
357077
|
-
closeToast: closeToast,
|
|
357078
|
-
closeButton: options.closeButton,
|
|
357079
|
-
rtl: props.rtl,
|
|
357080
|
-
position: options.position || props.position,
|
|
357081
|
-
transition: options.transition || props.transition,
|
|
357082
|
-
className: parseClassName(options.className || props.toastClassName),
|
|
357083
|
-
bodyClassName: parseClassName(options.bodyClassName || props.bodyClassName),
|
|
357084
|
-
style: options.style || props.toastStyle,
|
|
357085
|
-
bodyStyle: options.bodyStyle || props.bodyStyle,
|
|
357086
|
-
onClick: options.onClick || props.onClick,
|
|
357087
|
-
pauseOnHover: isBool(options.pauseOnHover) ? options.pauseOnHover : props.pauseOnHover,
|
|
357088
|
-
pauseOnFocusLoss: isBool(options.pauseOnFocusLoss) ? options.pauseOnFocusLoss : props.pauseOnFocusLoss,
|
|
357089
|
-
draggable: isBool(options.draggable) ? options.draggable : props.draggable,
|
|
357090
|
-
draggablePercent: options.draggablePercent || props.draggablePercent,
|
|
357091
|
-
draggableDirection: options.draggableDirection || props.draggableDirection,
|
|
357092
|
-
closeOnClick: isBool(options.closeOnClick) ? options.closeOnClick : props.closeOnClick,
|
|
357093
|
-
progressClassName: parseClassName(options.progressClassName || props.progressClassName),
|
|
357094
|
-
progressStyle: options.progressStyle || props.progressStyle,
|
|
357095
|
-
autoClose: options.isLoading ? false : getAutoCloseDelay(options.autoClose, props.autoClose),
|
|
357096
|
-
hideProgressBar: isBool(options.hideProgressBar) ? options.hideProgressBar : props.hideProgressBar,
|
|
357097
|
-
progress: options.progress,
|
|
357098
|
-
role: options.role || props.role,
|
|
357099
|
-
deleteToast: function deleteToast() {
|
|
357100
|
-
toastToRender["delete"](toastId);
|
|
357101
|
-
var queueLen = instance.queue.length;
|
|
357102
|
-
instance.count = isToastIdValid(toastId) ? instance.count - 1 : instance.count - instance.displayedToast;
|
|
357103
|
-
if (instance.count < 0) instance.count = 0;
|
|
357104
|
-
|
|
357105
|
-
if (queueLen > 0) {
|
|
357106
|
-
var freeSlot = isToastIdValid(toastId) ? 1 : instance.props.limit;
|
|
357107
|
-
|
|
357108
|
-
if (queueLen === 1 || freeSlot === 1) {
|
|
357109
|
-
instance.displayedToast++;
|
|
357110
|
-
dequeueToast();
|
|
357111
|
-
} else {
|
|
357112
|
-
var toDequeue = freeSlot > queueLen ? queueLen : freeSlot;
|
|
357113
|
-
instance.displayedToast = toDequeue;
|
|
357114
|
-
|
|
357115
|
-
for (var i = 0; i < toDequeue; i++) {
|
|
357116
|
-
dequeueToast();
|
|
357117
|
-
}
|
|
357118
|
-
}
|
|
357119
|
-
} else {
|
|
357120
|
-
forceUpdate();
|
|
357121
|
-
}
|
|
357122
|
-
}
|
|
357123
|
-
};
|
|
357124
|
-
if (isFn(options.onOpen)) toastProps.onOpen = options.onOpen;
|
|
357125
|
-
if (isFn(options.onClose)) toastProps.onClose = options.onClose;
|
|
357126
|
-
toastProps.closeButton = props.closeButton;
|
|
357127
|
-
|
|
357128
|
-
if (options.closeButton === false || canBeRendered(options.closeButton)) {
|
|
357129
|
-
toastProps.closeButton = options.closeButton;
|
|
357130
|
-
} else if (options.closeButton === true) {
|
|
357131
|
-
toastProps.closeButton = canBeRendered(props.closeButton) ? props.closeButton : true;
|
|
357132
|
-
}
|
|
357133
|
-
|
|
357134
|
-
var toastContent = content;
|
|
357135
|
-
|
|
357136
|
-
if ((0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(content) && !isStr(content.type)) {
|
|
357137
|
-
toastContent = (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(content, {
|
|
357138
|
-
closeToast: closeToast,
|
|
357139
|
-
toastProps: toastProps,
|
|
357140
|
-
data: data
|
|
357141
|
-
});
|
|
357142
|
-
} else if (isFn(content)) {
|
|
357143
|
-
toastContent = content({
|
|
357144
|
-
closeToast: closeToast,
|
|
357145
|
-
toastProps: toastProps,
|
|
357146
|
-
data: data
|
|
357147
|
-
});
|
|
357148
|
-
} // not handling limit + delay by design. Waiting for user feedback first
|
|
357149
|
-
|
|
357150
|
-
|
|
357151
|
-
if (props.limit && props.limit > 0 && instance.count > props.limit && isNotAnUpdate) {
|
|
357152
|
-
instance.queue.push({
|
|
357153
|
-
toastContent: toastContent,
|
|
357154
|
-
toastProps: toastProps,
|
|
357155
|
-
staleId: staleId
|
|
357156
|
-
});
|
|
357157
|
-
} else if (isNum(delay) && delay > 0) {
|
|
357158
|
-
setTimeout(function () {
|
|
357159
|
-
appendToast(toastContent, toastProps, staleId);
|
|
357160
|
-
}, delay);
|
|
357161
|
-
} else {
|
|
357162
|
-
appendToast(toastContent, toastProps, staleId);
|
|
357163
|
-
}
|
|
357164
|
-
}
|
|
357165
|
-
|
|
357166
|
-
function appendToast(content, toastProps, staleId) {
|
|
357167
|
-
var toastId = toastProps.toastId;
|
|
357168
|
-
if (staleId) toastToRender["delete"](staleId);
|
|
357169
|
-
toastToRender.set(toastId, {
|
|
357170
|
-
content: content,
|
|
357171
|
-
props: toastProps
|
|
357172
|
-
});
|
|
357173
|
-
setToastIds(function (state) {
|
|
357174
|
-
return [].concat(state, [toastId]).filter(function (id) {
|
|
357175
|
-
return id !== staleId;
|
|
357176
|
-
});
|
|
357177
|
-
});
|
|
357178
|
-
}
|
|
357179
|
-
|
|
357180
|
-
function getToastToRender(cb) {
|
|
357181
|
-
var toRender = new Map();
|
|
357182
|
-
var collection = Array.from(toastToRender.values());
|
|
357183
|
-
if (props.newestOnTop) collection.reverse();
|
|
357184
|
-
collection.forEach(function (toast) {
|
|
357185
|
-
var position = toast.props.position;
|
|
357186
|
-
toRender.has(position) || toRender.set(position, []);
|
|
357187
|
-
toRender.get(position).push(toast);
|
|
357188
|
-
});
|
|
357189
|
-
return Array.from(toRender, function (p) {
|
|
357190
|
-
return cb(p[0], p[1]);
|
|
357191
|
-
});
|
|
357192
|
-
}
|
|
357193
|
-
|
|
357194
|
-
return {
|
|
357195
|
-
getToastToRender: getToastToRender,
|
|
357196
|
-
containerRef: containerRef,
|
|
357197
|
-
isToastActive: isToastActive
|
|
357198
|
-
};
|
|
357199
|
-
}
|
|
357200
|
-
|
|
357201
|
-
function getX(e) {
|
|
357202
|
-
return e.targetTouches && e.targetTouches.length >= 1 ? e.targetTouches[0].clientX : e.clientX;
|
|
357203
|
-
}
|
|
357204
|
-
|
|
357205
|
-
function getY(e) {
|
|
357206
|
-
return e.targetTouches && e.targetTouches.length >= 1 ? e.targetTouches[0].clientY : e.clientY;
|
|
357207
|
-
}
|
|
357208
|
-
|
|
357209
|
-
function useToast(props) {
|
|
357210
|
-
var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
357211
|
-
isRunning = _useState[0],
|
|
357212
|
-
setIsRunning = _useState[1];
|
|
357213
|
-
|
|
357214
|
-
var _useState2 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
|
|
357215
|
-
preventExitTransition = _useState2[0],
|
|
357216
|
-
setPreventExitTransition = _useState2[1];
|
|
357217
|
-
|
|
357218
|
-
var toastRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
|
|
357219
|
-
var drag = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)({
|
|
357220
|
-
start: 0,
|
|
357221
|
-
x: 0,
|
|
357222
|
-
y: 0,
|
|
357223
|
-
delta: 0,
|
|
357224
|
-
removalDistance: 0,
|
|
357225
|
-
canCloseOnClick: true,
|
|
357226
|
-
canDrag: false,
|
|
357227
|
-
boundingRect: null,
|
|
357228
|
-
didMove: false
|
|
357229
|
-
}).current;
|
|
357230
|
-
var syncProps = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(props);
|
|
357231
|
-
var autoClose = props.autoClose,
|
|
357232
|
-
pauseOnHover = props.pauseOnHover,
|
|
357233
|
-
closeToast = props.closeToast,
|
|
357234
|
-
onClick = props.onClick,
|
|
357235
|
-
closeOnClick = props.closeOnClick;
|
|
357236
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
357237
|
-
syncProps.current = props;
|
|
357238
|
-
});
|
|
357239
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
357240
|
-
if (toastRef.current) toastRef.current.addEventListener("d"
|
|
357241
|
-
/* ENTRANCE_ANIMATION_END */
|
|
357242
|
-
, playToast, {
|
|
357243
|
-
once: true
|
|
357244
|
-
});
|
|
357245
|
-
if (isFn(props.onOpen)) props.onOpen((0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(props.children) && props.children.props);
|
|
357246
|
-
return function () {
|
|
357247
|
-
var props = syncProps.current;
|
|
357248
|
-
if (isFn(props.onClose)) props.onClose((0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(props.children) && props.children.props);
|
|
357249
|
-
};
|
|
357250
|
-
}, []);
|
|
357251
|
-
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
|
357252
|
-
props.pauseOnFocusLoss && bindFocusEvents();
|
|
357253
|
-
return function () {
|
|
357254
|
-
props.pauseOnFocusLoss && unbindFocusEvents();
|
|
357255
|
-
};
|
|
357256
|
-
}, [props.pauseOnFocusLoss]);
|
|
357257
|
-
|
|
357258
|
-
function onDragStart(e) {
|
|
357259
|
-
if (props.draggable) {
|
|
357260
|
-
bindDragEvents();
|
|
357261
|
-
var toast = toastRef.current;
|
|
357262
|
-
drag.canCloseOnClick = true;
|
|
357263
|
-
drag.canDrag = true;
|
|
357264
|
-
drag.boundingRect = toast.getBoundingClientRect();
|
|
357265
|
-
toast.style.transition = '';
|
|
357266
|
-
drag.x = getX(e.nativeEvent);
|
|
357267
|
-
drag.y = getY(e.nativeEvent);
|
|
357268
|
-
|
|
357269
|
-
if (props.draggableDirection === "x"
|
|
357270
|
-
/* X */
|
|
357271
|
-
) {
|
|
357272
|
-
drag.start = drag.x;
|
|
357273
|
-
drag.removalDistance = toast.offsetWidth * (props.draggablePercent / 100);
|
|
357274
|
-
} else {
|
|
357275
|
-
drag.start = drag.y;
|
|
357276
|
-
drag.removalDistance = toast.offsetHeight * (props.draggablePercent === 80
|
|
357277
|
-
/* DRAGGABLE_PERCENT */
|
|
357278
|
-
? props.draggablePercent * 1.5 : props.draggablePercent / 100);
|
|
357279
|
-
}
|
|
357280
|
-
}
|
|
357281
|
-
}
|
|
357282
|
-
|
|
357283
|
-
function onDragTransitionEnd() {
|
|
357284
|
-
if (drag.boundingRect) {
|
|
357285
|
-
var _drag$boundingRect = drag.boundingRect,
|
|
357286
|
-
top = _drag$boundingRect.top,
|
|
357287
|
-
bottom = _drag$boundingRect.bottom,
|
|
357288
|
-
left = _drag$boundingRect.left,
|
|
357289
|
-
right = _drag$boundingRect.right;
|
|
357290
|
-
|
|
357291
|
-
if (props.pauseOnHover && drag.x >= left && drag.x <= right && drag.y >= top && drag.y <= bottom) {
|
|
357292
|
-
pauseToast();
|
|
357293
|
-
} else {
|
|
357294
|
-
playToast();
|
|
357295
|
-
}
|
|
357296
|
-
}
|
|
357297
|
-
}
|
|
357298
|
-
|
|
357299
|
-
function playToast() {
|
|
357300
|
-
setIsRunning(true);
|
|
357301
|
-
}
|
|
357302
|
-
|
|
357303
|
-
function pauseToast() {
|
|
357304
|
-
setIsRunning(false);
|
|
357305
|
-
}
|
|
357306
|
-
|
|
357307
|
-
function bindFocusEvents() {
|
|
357308
|
-
if (!document.hasFocus()) pauseToast();
|
|
357309
|
-
window.addEventListener('focus', playToast);
|
|
357310
|
-
window.addEventListener('blur', pauseToast);
|
|
357311
|
-
}
|
|
357312
|
-
|
|
357313
|
-
function unbindFocusEvents() {
|
|
357314
|
-
window.removeEventListener('focus', playToast);
|
|
357315
|
-
window.removeEventListener('blur', pauseToast);
|
|
357316
|
-
}
|
|
357317
|
-
|
|
357318
|
-
function bindDragEvents() {
|
|
357319
|
-
drag.didMove = false;
|
|
357320
|
-
document.addEventListener('mousemove', onDragMove);
|
|
357321
|
-
document.addEventListener('mouseup', onDragEnd);
|
|
357322
|
-
document.addEventListener('touchmove', onDragMove);
|
|
357323
|
-
document.addEventListener('touchend', onDragEnd);
|
|
357324
|
-
}
|
|
357325
|
-
|
|
357326
|
-
function unbindDragEvents() {
|
|
357327
|
-
document.removeEventListener('mousemove', onDragMove);
|
|
357328
|
-
document.removeEventListener('mouseup', onDragEnd);
|
|
357329
|
-
document.removeEventListener('touchmove', onDragMove);
|
|
357330
|
-
document.removeEventListener('touchend', onDragEnd);
|
|
357331
|
-
}
|
|
357332
|
-
|
|
357333
|
-
function onDragMove(e) {
|
|
357334
|
-
var toast = toastRef.current;
|
|
357335
|
-
|
|
357336
|
-
if (drag.canDrag && toast) {
|
|
357337
|
-
drag.didMove = true;
|
|
357338
|
-
if (isRunning) pauseToast();
|
|
357339
|
-
drag.x = getX(e);
|
|
357340
|
-
drag.y = getY(e);
|
|
357341
|
-
|
|
357342
|
-
if (props.draggableDirection === "x"
|
|
357343
|
-
/* X */
|
|
357344
|
-
) {
|
|
357345
|
-
drag.delta = drag.x - drag.start;
|
|
357346
|
-
} else {
|
|
357347
|
-
drag.delta = drag.y - drag.start;
|
|
357348
|
-
} // prevent false positif during a toast click
|
|
357349
|
-
|
|
357350
|
-
|
|
357351
|
-
if (drag.start !== drag.x) drag.canCloseOnClick = false;
|
|
357352
|
-
toast.style.transform = "translate" + props.draggableDirection + "(" + drag.delta + "px)";
|
|
357353
|
-
toast.style.opacity = "" + (1 - Math.abs(drag.delta / drag.removalDistance));
|
|
357354
|
-
}
|
|
357355
|
-
}
|
|
357356
|
-
|
|
357357
|
-
function onDragEnd() {
|
|
357358
|
-
unbindDragEvents();
|
|
357359
|
-
var toast = toastRef.current;
|
|
357360
|
-
|
|
357361
|
-
if (drag.canDrag && drag.didMove && toast) {
|
|
357362
|
-
drag.canDrag = false;
|
|
357363
|
-
|
|
357364
|
-
if (Math.abs(drag.delta) > drag.removalDistance) {
|
|
357365
|
-
setPreventExitTransition(true);
|
|
357366
|
-
props.closeToast();
|
|
357367
|
-
return;
|
|
357368
|
-
}
|
|
357369
|
-
|
|
357370
|
-
toast.style.transition = 'transform 0.2s, opacity 0.2s';
|
|
357371
|
-
toast.style.transform = "translate" + props.draggableDirection + "(0)";
|
|
357372
|
-
toast.style.opacity = '1';
|
|
357373
|
-
}
|
|
357374
|
-
}
|
|
357375
|
-
|
|
357376
|
-
var eventHandlers = {
|
|
357377
|
-
onMouseDown: onDragStart,
|
|
357378
|
-
onTouchStart: onDragStart,
|
|
357379
|
-
onMouseUp: onDragTransitionEnd,
|
|
357380
|
-
onTouchEnd: onDragTransitionEnd
|
|
357381
|
-
};
|
|
357382
|
-
|
|
357383
|
-
if (autoClose && pauseOnHover) {
|
|
357384
|
-
eventHandlers.onMouseEnter = pauseToast;
|
|
357385
|
-
eventHandlers.onMouseLeave = playToast;
|
|
357386
|
-
} // prevent toast from closing when user drags the toast
|
|
357387
|
-
|
|
357388
|
-
|
|
357389
|
-
if (closeOnClick) {
|
|
357390
|
-
eventHandlers.onClick = function (e) {
|
|
357391
|
-
onClick && onClick(e);
|
|
357392
|
-
drag.canCloseOnClick && closeToast();
|
|
357393
|
-
};
|
|
357394
|
-
}
|
|
357395
|
-
|
|
357396
|
-
return {
|
|
357397
|
-
playToast: playToast,
|
|
357398
|
-
pauseToast: pauseToast,
|
|
357399
|
-
isRunning: isRunning,
|
|
357400
|
-
preventExitTransition: preventExitTransition,
|
|
357401
|
-
toastRef: toastRef,
|
|
357402
|
-
eventHandlers: eventHandlers
|
|
357403
|
-
};
|
|
357404
|
-
}
|
|
357405
|
-
|
|
357406
|
-
function CloseButton(_ref) {
|
|
357407
|
-
var closeToast = _ref.closeToast,
|
|
357408
|
-
theme = _ref.theme,
|
|
357409
|
-
_ref$ariaLabel = _ref.ariaLabel,
|
|
357410
|
-
ariaLabel = _ref$ariaLabel === void 0 ? 'close' : _ref$ariaLabel;
|
|
357411
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", {
|
|
357412
|
-
className: "Toastify"
|
|
357413
|
-
/* CSS_NAMESPACE */
|
|
357414
|
-
+ "__close-button " + "Toastify"
|
|
357415
|
-
/* CSS_NAMESPACE */
|
|
357416
|
-
+ "__close-button--" + theme,
|
|
357417
|
-
type: "button",
|
|
357418
|
-
onClick: function onClick(e) {
|
|
357419
|
-
e.stopPropagation();
|
|
357420
|
-
closeToast(e);
|
|
357421
|
-
},
|
|
357422
|
-
"aria-label": ariaLabel
|
|
357423
|
-
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", {
|
|
357424
|
-
"aria-hidden": "true",
|
|
357425
|
-
viewBox: "0 0 14 16"
|
|
357426
|
-
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
|
357427
|
-
fillRule: "evenodd",
|
|
357428
|
-
d: "M7.71 8.23l3.75 3.75-1.48 1.48-3.75-3.75-3.75 3.75L1 11.98l3.75-3.75L1 4.48 2.48 3l3.75 3.75L9.98 3l1.48 1.48-3.75 3.75z"
|
|
357429
|
-
})));
|
|
357430
|
-
}
|
|
357431
|
-
|
|
357432
|
-
function ProgressBar(_ref) {
|
|
357433
|
-
var _cx, _animationEvent;
|
|
357434
|
-
|
|
357435
|
-
var delay = _ref.delay,
|
|
357436
|
-
isRunning = _ref.isRunning,
|
|
357437
|
-
closeToast = _ref.closeToast,
|
|
357438
|
-
type = _ref.type,
|
|
357439
|
-
hide = _ref.hide,
|
|
357440
|
-
className = _ref.className,
|
|
357441
|
-
userStyle = _ref.style,
|
|
357442
|
-
controlledProgress = _ref.controlledProgress,
|
|
357443
|
-
progress = _ref.progress,
|
|
357444
|
-
rtl = _ref.rtl,
|
|
357445
|
-
isIn = _ref.isIn,
|
|
357446
|
-
theme = _ref.theme;
|
|
357447
|
-
|
|
357448
|
-
var style = _extends({}, userStyle, {
|
|
357449
|
-
animationDuration: delay + "ms",
|
|
357450
|
-
animationPlayState: isRunning ? 'running' : 'paused',
|
|
357451
|
-
opacity: hide ? 0 : 1
|
|
357452
|
-
});
|
|
357453
|
-
|
|
357454
|
-
if (controlledProgress) style.transform = "scaleX(" + progress + ")";
|
|
357455
|
-
var defaultClassName = (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)("Toastify"
|
|
357456
|
-
/* CSS_NAMESPACE */
|
|
357457
|
-
+ "__progress-bar", controlledProgress ? "Toastify"
|
|
357458
|
-
/* CSS_NAMESPACE */
|
|
357459
|
-
+ "__progress-bar--controlled" : "Toastify"
|
|
357460
|
-
/* CSS_NAMESPACE */
|
|
357461
|
-
+ "__progress-bar--animated", "Toastify"
|
|
357462
|
-
/* CSS_NAMESPACE */
|
|
357463
|
-
+ "__progress-bar-theme--" + theme, "Toastify"
|
|
357464
|
-
/* CSS_NAMESPACE */
|
|
357465
|
-
+ "__progress-bar--" + type, (_cx = {}, _cx["Toastify"
|
|
357466
|
-
/* CSS_NAMESPACE */
|
|
357467
|
-
+ "__progress-bar--rtl"] = rtl, _cx));
|
|
357468
|
-
var classNames = isFn(className) ? className({
|
|
357469
|
-
rtl: rtl,
|
|
357470
|
-
type: type,
|
|
357471
|
-
defaultClassName: defaultClassName
|
|
357472
|
-
}) : (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(defaultClassName, className); // 🧐 controlledProgress is derived from progress
|
|
357473
|
-
// so if controlledProgress is set
|
|
357474
|
-
// it means that this is also the case for progress
|
|
357475
|
-
|
|
357476
|
-
var animationEvent = (_animationEvent = {}, _animationEvent[controlledProgress && progress >= 1 ? 'onTransitionEnd' : 'onAnimationEnd'] = controlledProgress && progress < 1 ? null : function () {
|
|
357477
|
-
isIn && closeToast();
|
|
357478
|
-
}, _animationEvent); // TODO: add aria-valuenow, aria-valuemax, aria-valuemin
|
|
357479
|
-
|
|
357480
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", Object.assign({
|
|
357481
|
-
role: "progressbar",
|
|
357482
|
-
"aria-hidden": hide ? 'true' : 'false',
|
|
357483
|
-
"aria-label": "notification timer",
|
|
357484
|
-
className: classNames,
|
|
357485
|
-
style: style
|
|
357486
|
-
}, animationEvent));
|
|
357487
|
-
}
|
|
357488
|
-
ProgressBar.defaultProps = {
|
|
357489
|
-
type: TYPE.DEFAULT,
|
|
357490
|
-
hide: false
|
|
357491
|
-
};
|
|
357492
|
-
|
|
357493
|
-
var _excluded$1 = ["theme", "type"];
|
|
357494
|
-
|
|
357495
|
-
var Svg = function Svg(_ref) {
|
|
357496
|
-
var theme = _ref.theme,
|
|
357497
|
-
type = _ref.type,
|
|
357498
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
357499
|
-
|
|
357500
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", Object.assign({
|
|
357501
|
-
viewBox: "0 0 24 24",
|
|
357502
|
-
width: "100%",
|
|
357503
|
-
height: "100%",
|
|
357504
|
-
fill: theme === 'colored' ? 'currentColor' : "var(--toastify-icon-color-" + type + ")"
|
|
357505
|
-
}, rest));
|
|
357506
|
-
};
|
|
357507
|
-
|
|
357508
|
-
function Warning(props) {
|
|
357509
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Svg, Object.assign({}, props), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
|
357510
|
-
d: "M23.32 17.191L15.438 2.184C14.728.833 13.416 0 11.996 0c-1.42 0-2.733.833-3.443 2.184L.533 17.448a4.744 4.744 0 000 4.368C1.243 23.167 2.555 24 3.975 24h16.05C22.22 24 24 22.044 24 19.632c0-.904-.251-1.746-.68-2.44zm-9.622 1.46c0 1.033-.724 1.823-1.698 1.823s-1.698-.79-1.698-1.822v-.043c0-1.028.724-1.822 1.698-1.822s1.698.79 1.698 1.822v.043zm.039-12.285l-.84 8.06c-.057.581-.408.943-.897.943-.49 0-.84-.367-.896-.942l-.84-8.065c-.057-.624.25-1.095.779-1.095h1.91c.528.005.84.476.784 1.1z"
|
|
357511
|
-
}));
|
|
357512
|
-
}
|
|
357513
|
-
|
|
357514
|
-
function Info(props) {
|
|
357515
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Svg, Object.assign({}, props), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
|
357516
|
-
d: "M12 0a12 12 0 1012 12A12.013 12.013 0 0012 0zm.25 5a1.5 1.5 0 11-1.5 1.5 1.5 1.5 0 011.5-1.5zm2.25 13.5h-4a1 1 0 010-2h.75a.25.25 0 00.25-.25v-4.5a.25.25 0 00-.25-.25h-.75a1 1 0 010-2h1a2 2 0 012 2v4.75a.25.25 0 00.25.25h.75a1 1 0 110 2z"
|
|
357517
|
-
}));
|
|
357518
|
-
}
|
|
357519
|
-
|
|
357520
|
-
function Success(props) {
|
|
357521
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Svg, Object.assign({}, props), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
|
357522
|
-
d: "M12 0a12 12 0 1012 12A12.014 12.014 0 0012 0zm6.927 8.2l-6.845 9.289a1.011 1.011 0 01-1.43.188l-4.888-3.908a1 1 0 111.25-1.562l4.076 3.261 6.227-8.451a1 1 0 111.61 1.183z"
|
|
357523
|
-
}));
|
|
357524
|
-
}
|
|
357525
|
-
|
|
357526
|
-
function Error(props) {
|
|
357527
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Svg, Object.assign({}, props), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", {
|
|
357528
|
-
d: "M11.983 0a12.206 12.206 0 00-8.51 3.653A11.8 11.8 0 000 12.207 11.779 11.779 0 0011.8 24h.214A12.111 12.111 0 0024 11.791 11.766 11.766 0 0011.983 0zM10.5 16.542a1.476 1.476 0 011.449-1.53h.027a1.527 1.527 0 011.523 1.47 1.475 1.475 0 01-1.449 1.53h-.027a1.529 1.529 0 01-1.523-1.47zM11 12.5v-6a1 1 0 012 0v6a1 1 0 11-2 0z"
|
|
357529
|
-
}));
|
|
357530
|
-
}
|
|
357531
|
-
|
|
357532
|
-
function Spinner() {
|
|
357533
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
|
357534
|
-
className: "Toastify"
|
|
357535
|
-
/* CSS_NAMESPACE */
|
|
357536
|
-
+ "__spinner"
|
|
357537
|
-
});
|
|
357538
|
-
}
|
|
357539
|
-
|
|
357540
|
-
var Icons = {
|
|
357541
|
-
info: Info,
|
|
357542
|
-
warning: Warning,
|
|
357543
|
-
success: Success,
|
|
357544
|
-
error: Error,
|
|
357545
|
-
spinner: Spinner
|
|
357546
|
-
};
|
|
357547
|
-
|
|
357548
|
-
var Toast = function Toast(props) {
|
|
357549
|
-
var _cx, _cx2;
|
|
357550
|
-
|
|
357551
|
-
var _useToast = useToast(props),
|
|
357552
|
-
isRunning = _useToast.isRunning,
|
|
357553
|
-
preventExitTransition = _useToast.preventExitTransition,
|
|
357554
|
-
toastRef = _useToast.toastRef,
|
|
357555
|
-
eventHandlers = _useToast.eventHandlers;
|
|
357556
|
-
|
|
357557
|
-
var closeButton = props.closeButton,
|
|
357558
|
-
children = props.children,
|
|
357559
|
-
autoClose = props.autoClose,
|
|
357560
|
-
onClick = props.onClick,
|
|
357561
|
-
type = props.type,
|
|
357562
|
-
hideProgressBar = props.hideProgressBar,
|
|
357563
|
-
closeToast = props.closeToast,
|
|
357564
|
-
Transition = props.transition,
|
|
357565
|
-
position = props.position,
|
|
357566
|
-
className = props.className,
|
|
357567
|
-
style = props.style,
|
|
357568
|
-
bodyClassName = props.bodyClassName,
|
|
357569
|
-
bodyStyle = props.bodyStyle,
|
|
357570
|
-
progressClassName = props.progressClassName,
|
|
357571
|
-
progressStyle = props.progressStyle,
|
|
357572
|
-
updateId = props.updateId,
|
|
357573
|
-
role = props.role,
|
|
357574
|
-
progress = props.progress,
|
|
357575
|
-
rtl = props.rtl,
|
|
357576
|
-
toastId = props.toastId,
|
|
357577
|
-
deleteToast = props.deleteToast,
|
|
357578
|
-
isIn = props.isIn,
|
|
357579
|
-
isLoading = props.isLoading,
|
|
357580
|
-
icon = props.icon,
|
|
357581
|
-
theme = props.theme;
|
|
357582
|
-
var defaultClassName = (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)("Toastify"
|
|
357583
|
-
/* CSS_NAMESPACE */
|
|
357584
|
-
+ "__toast", "Toastify"
|
|
357585
|
-
/* CSS_NAMESPACE */
|
|
357586
|
-
+ "__toast-theme--" + theme, "Toastify"
|
|
357587
|
-
/* CSS_NAMESPACE */
|
|
357588
|
-
+ "__toast--" + type, (_cx = {}, _cx["Toastify"
|
|
357589
|
-
/* CSS_NAMESPACE */
|
|
357590
|
-
+ "__toast--rtl"] = rtl, _cx));
|
|
357591
|
-
var cssClasses = isFn(className) ? className({
|
|
357592
|
-
rtl: rtl,
|
|
357593
|
-
position: position,
|
|
357594
|
-
type: type,
|
|
357595
|
-
defaultClassName: defaultClassName
|
|
357596
|
-
}) : (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(defaultClassName, className);
|
|
357597
|
-
var isProgressControlled = !!progress;
|
|
357598
|
-
var maybeIcon = Icons[type];
|
|
357599
|
-
var iconProps = {
|
|
357600
|
-
theme: theme,
|
|
357601
|
-
type: type
|
|
357602
|
-
};
|
|
357603
|
-
var Icon = maybeIcon && maybeIcon(iconProps);
|
|
357604
|
-
|
|
357605
|
-
if (icon === false) {
|
|
357606
|
-
Icon = void 0;
|
|
357607
|
-
} else if (isFn(icon)) {
|
|
357608
|
-
Icon = icon(iconProps);
|
|
357609
|
-
} else if ((0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(icon)) {
|
|
357610
|
-
Icon = (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(icon, iconProps);
|
|
357611
|
-
} else if (isStr(icon)) {
|
|
357612
|
-
Icon = icon;
|
|
357613
|
-
} else if (isLoading) {
|
|
357614
|
-
Icon = Icons.spinner();
|
|
357615
|
-
}
|
|
357616
|
-
|
|
357617
|
-
function renderCloseButton(closeButton) {
|
|
357618
|
-
if (!closeButton) return;
|
|
357619
|
-
var props = {
|
|
357620
|
-
closeToast: closeToast,
|
|
357621
|
-
type: type,
|
|
357622
|
-
theme: theme
|
|
357623
|
-
};
|
|
357624
|
-
if (isFn(closeButton)) return closeButton(props);
|
|
357625
|
-
if ((0,react__WEBPACK_IMPORTED_MODULE_0__.isValidElement)(closeButton)) return (0,react__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(closeButton, props);
|
|
357626
|
-
}
|
|
357627
|
-
|
|
357628
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Transition, {
|
|
357629
|
-
isIn: isIn,
|
|
357630
|
-
done: deleteToast,
|
|
357631
|
-
position: position,
|
|
357632
|
-
preventExitTransition: preventExitTransition,
|
|
357633
|
-
nodeRef: toastRef
|
|
357634
|
-
}, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", Object.assign({
|
|
357635
|
-
id: toastId,
|
|
357636
|
-
onClick: onClick,
|
|
357637
|
-
className: cssClasses
|
|
357638
|
-
}, eventHandlers, {
|
|
357639
|
-
style: style,
|
|
357640
|
-
ref: toastRef
|
|
357641
|
-
}), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", Object.assign({}, isIn && {
|
|
357642
|
-
role: role
|
|
357643
|
-
}, {
|
|
357644
|
-
className: isFn(bodyClassName) ? bodyClassName({
|
|
357645
|
-
type: type
|
|
357646
|
-
}) : (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)("Toastify"
|
|
357647
|
-
/* CSS_NAMESPACE */
|
|
357648
|
-
+ "__toast-body", bodyClassName),
|
|
357649
|
-
style: bodyStyle
|
|
357650
|
-
}), Icon && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
|
357651
|
-
className: (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)("Toastify"
|
|
357652
|
-
/* CSS_NAMESPACE */
|
|
357653
|
-
+ "__toast-icon", (_cx2 = {}, _cx2["Toastify"
|
|
357654
|
-
/* CSS_NAMESPACE */
|
|
357655
|
-
+ "--animate-icon " + "Toastify"
|
|
357656
|
-
/* CSS_NAMESPACE */
|
|
357657
|
-
+ "__zoom-enter"] = !isLoading, _cx2))
|
|
357658
|
-
}, Icon), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, children)), renderCloseButton(closeButton), (autoClose || isProgressControlled) && (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ProgressBar, Object.assign({}, updateId && !isProgressControlled ? {
|
|
357659
|
-
key: "pb-" + updateId
|
|
357660
|
-
} : {}, {
|
|
357661
|
-
rtl: rtl,
|
|
357662
|
-
theme: theme,
|
|
357663
|
-
delay: autoClose,
|
|
357664
|
-
isRunning: isRunning,
|
|
357665
|
-
isIn: isIn,
|
|
357666
|
-
closeToast: closeToast,
|
|
357667
|
-
hide: hideProgressBar,
|
|
357668
|
-
type: type,
|
|
357669
|
-
style: progressStyle,
|
|
357670
|
-
className: progressClassName,
|
|
357671
|
-
controlledProgress: isProgressControlled,
|
|
357672
|
-
progress: progress
|
|
357673
|
-
}))));
|
|
357674
|
-
};
|
|
357675
|
-
|
|
357676
|
-
var Bounce = /*#__PURE__*/cssTransition({
|
|
357677
|
-
enter: "Toastify"
|
|
357678
|
-
/* CSS_NAMESPACE */
|
|
357679
|
-
+ "--animate " + "Toastify"
|
|
357680
|
-
/* CSS_NAMESPACE */
|
|
357681
|
-
+ "__bounce-enter",
|
|
357682
|
-
exit: "Toastify"
|
|
357683
|
-
/* CSS_NAMESPACE */
|
|
357684
|
-
+ "--animate " + "Toastify"
|
|
357685
|
-
/* CSS_NAMESPACE */
|
|
357686
|
-
+ "__bounce-exit",
|
|
357687
|
-
appendPosition: true
|
|
357688
|
-
});
|
|
357689
|
-
var Slide = /*#__PURE__*/cssTransition({
|
|
357690
|
-
enter: "Toastify"
|
|
357691
|
-
/* CSS_NAMESPACE */
|
|
357692
|
-
+ "--animate " + "Toastify"
|
|
357693
|
-
/* CSS_NAMESPACE */
|
|
357694
|
-
+ "__slide-enter",
|
|
357695
|
-
exit: "Toastify"
|
|
357696
|
-
/* CSS_NAMESPACE */
|
|
357697
|
-
+ "--animate " + "Toastify"
|
|
357698
|
-
/* CSS_NAMESPACE */
|
|
357699
|
-
+ "__slide-exit",
|
|
357700
|
-
appendPosition: true
|
|
357701
|
-
});
|
|
357702
|
-
var Zoom = /*#__PURE__*/cssTransition({
|
|
357703
|
-
enter: "Toastify"
|
|
357704
|
-
/* CSS_NAMESPACE */
|
|
357705
|
-
+ "--animate " + "Toastify"
|
|
357706
|
-
/* CSS_NAMESPACE */
|
|
357707
|
-
+ "__zoom-enter",
|
|
357708
|
-
exit: "Toastify"
|
|
357709
|
-
/* CSS_NAMESPACE */
|
|
357710
|
-
+ "--animate " + "Toastify"
|
|
357711
|
-
/* CSS_NAMESPACE */
|
|
357712
|
-
+ "__zoom-exit"
|
|
357713
|
-
});
|
|
357714
|
-
var Flip = /*#__PURE__*/cssTransition({
|
|
357715
|
-
enter: "Toastify"
|
|
357716
|
-
/* CSS_NAMESPACE */
|
|
357717
|
-
+ "--animate " + "Toastify"
|
|
357718
|
-
/* CSS_NAMESPACE */
|
|
357719
|
-
+ "__flip-enter",
|
|
357720
|
-
exit: "Toastify"
|
|
357721
|
-
/* CSS_NAMESPACE */
|
|
357722
|
-
+ "--animate " + "Toastify"
|
|
357723
|
-
/* CSS_NAMESPACE */
|
|
357724
|
-
+ "__flip-exit"
|
|
357725
|
-
});
|
|
357726
|
-
|
|
357727
|
-
var ToastContainer = function ToastContainer(props) {
|
|
357728
|
-
var _useToastContainer = useToastContainer(props),
|
|
357729
|
-
getToastToRender = _useToastContainer.getToastToRender,
|
|
357730
|
-
containerRef = _useToastContainer.containerRef,
|
|
357731
|
-
isToastActive = _useToastContainer.isToastActive;
|
|
357732
|
-
|
|
357733
|
-
var className = props.className,
|
|
357734
|
-
style = props.style,
|
|
357735
|
-
rtl = props.rtl,
|
|
357736
|
-
containerId = props.containerId;
|
|
357737
|
-
|
|
357738
|
-
function getClassName(position) {
|
|
357739
|
-
var _cx;
|
|
357740
|
-
|
|
357741
|
-
var defaultClassName = (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)("Toastify"
|
|
357742
|
-
/* CSS_NAMESPACE */
|
|
357743
|
-
+ "__toast-container", "Toastify"
|
|
357744
|
-
/* CSS_NAMESPACE */
|
|
357745
|
-
+ "__toast-container--" + position, (_cx = {}, _cx["Toastify"
|
|
357746
|
-
/* CSS_NAMESPACE */
|
|
357747
|
-
+ "__toast-container--rtl"] = rtl, _cx));
|
|
357748
|
-
return isFn(className) ? className({
|
|
357749
|
-
position: position,
|
|
357750
|
-
rtl: rtl,
|
|
357751
|
-
defaultClassName: defaultClassName
|
|
357752
|
-
}) : (0,clsx__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(defaultClassName, parseClassName(className));
|
|
357753
|
-
}
|
|
357754
|
-
|
|
357755
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
|
357756
|
-
ref: containerRef,
|
|
357757
|
-
className: "Toastify"
|
|
357758
|
-
/* CSS_NAMESPACE */
|
|
357759
|
-
,
|
|
357760
|
-
id: containerId
|
|
357761
|
-
}, getToastToRender(function (position, toastList) {
|
|
357762
|
-
var containerStyle = !toastList.length ? _extends({}, style, {
|
|
357763
|
-
pointerEvents: 'none'
|
|
357764
|
-
}) : _extends({}, style);
|
|
357765
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", {
|
|
357766
|
-
className: getClassName(position),
|
|
357767
|
-
style: containerStyle,
|
|
357768
|
-
key: "container-" + position
|
|
357769
|
-
}, toastList.map(function (_ref) {
|
|
357770
|
-
var content = _ref.content,
|
|
357771
|
-
toastProps = _ref.props;
|
|
357772
|
-
return (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(Toast, Object.assign({}, toastProps, {
|
|
357773
|
-
isIn: isToastActive(toastProps.toastId),
|
|
357774
|
-
key: "toast-" + toastProps.key,
|
|
357775
|
-
closeButton: toastProps.closeButton === true ? CloseButton : toastProps.closeButton
|
|
357776
|
-
}), content);
|
|
357777
|
-
}));
|
|
357778
|
-
}));
|
|
357779
|
-
};
|
|
357780
|
-
ToastContainer.defaultProps = {
|
|
357781
|
-
position: POSITION.TOP_RIGHT,
|
|
357782
|
-
transition: Bounce,
|
|
357783
|
-
rtl: false,
|
|
357784
|
-
autoClose: 5000,
|
|
357785
|
-
hideProgressBar: false,
|
|
357786
|
-
closeButton: CloseButton,
|
|
357787
|
-
pauseOnHover: true,
|
|
357788
|
-
pauseOnFocusLoss: true,
|
|
357789
|
-
closeOnClick: true,
|
|
357790
|
-
newestOnTop: false,
|
|
357791
|
-
draggable: true,
|
|
357792
|
-
draggablePercent: 80
|
|
357793
|
-
/* DRAGGABLE_PERCENT */
|
|
357794
|
-
,
|
|
357795
|
-
draggableDirection: "x"
|
|
357796
|
-
/* X */
|
|
357797
|
-
,
|
|
357798
|
-
role: 'alert',
|
|
357799
|
-
theme: 'light'
|
|
357800
|
-
};
|
|
357801
|
-
|
|
357802
|
-
var containers = /*#__PURE__*/new Map();
|
|
357803
|
-
var latestInstance;
|
|
357804
|
-
var containerDomNode;
|
|
357805
|
-
var containerConfig;
|
|
357806
|
-
var queue = [];
|
|
357807
|
-
var lazy = false;
|
|
357808
|
-
/**
|
|
357809
|
-
* Get the toast by id, given it's in the DOM, otherwise returns null
|
|
357810
|
-
*/
|
|
357811
|
-
|
|
357812
|
-
function getToast(toastId, _ref) {
|
|
357813
|
-
var containerId = _ref.containerId;
|
|
357814
|
-
var container = containers.get(containerId || latestInstance);
|
|
357815
|
-
if (!container) return null;
|
|
357816
|
-
return container.getToast(toastId);
|
|
357817
|
-
}
|
|
357818
|
-
/**
|
|
357819
|
-
* Generate a random toastId
|
|
357820
|
-
*/
|
|
357821
|
-
|
|
357822
|
-
|
|
357823
|
-
function generateToastId() {
|
|
357824
|
-
return Math.random().toString(36).substring(2, 9);
|
|
357825
|
-
}
|
|
357826
|
-
/**
|
|
357827
|
-
* Generate a toastId or use the one provided
|
|
357828
|
-
*/
|
|
357829
|
-
|
|
357830
|
-
|
|
357831
|
-
function getToastId(options) {
|
|
357832
|
-
if (options && (isStr(options.toastId) || isNum(options.toastId))) {
|
|
357833
|
-
return options.toastId;
|
|
357834
|
-
}
|
|
357835
|
-
|
|
357836
|
-
return generateToastId();
|
|
357837
|
-
}
|
|
357838
|
-
/**
|
|
357839
|
-
* If the container is not mounted, the toast is enqueued and
|
|
357840
|
-
* the container lazy mounted
|
|
357841
|
-
*/
|
|
357842
|
-
|
|
357843
|
-
|
|
357844
|
-
function dispatchToast(content, options) {
|
|
357845
|
-
if (containers.size > 0) {
|
|
357846
|
-
eventManager.emit(0
|
|
357847
|
-
/* Show */
|
|
357848
|
-
, content, options);
|
|
357849
|
-
} else {
|
|
357850
|
-
queue.push({
|
|
357851
|
-
content: content,
|
|
357852
|
-
options: options
|
|
357853
|
-
});
|
|
357854
|
-
|
|
357855
|
-
if (lazy && canUseDom) {
|
|
357856
|
-
lazy = false;
|
|
357857
|
-
containerDomNode = document.createElement('div');
|
|
357858
|
-
document.body.appendChild(containerDomNode);
|
|
357859
|
-
(0,react_dom__WEBPACK_IMPORTED_MODULE_1__.render)((0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(ToastContainer, Object.assign({}, containerConfig)), containerDomNode);
|
|
357860
|
-
}
|
|
357861
|
-
}
|
|
357862
|
-
|
|
357863
|
-
return options.toastId;
|
|
357864
|
-
}
|
|
357865
|
-
/**
|
|
357866
|
-
* Merge provided options with the defaults settings and generate the toastId
|
|
357867
|
-
*/
|
|
357868
|
-
|
|
357869
|
-
|
|
357870
|
-
function mergeOptions(type, options) {
|
|
357871
|
-
return _extends({}, options, {
|
|
357872
|
-
type: options && options.type || type,
|
|
357873
|
-
toastId: getToastId(options)
|
|
357874
|
-
});
|
|
357875
|
-
}
|
|
357876
|
-
|
|
357877
|
-
function createToastByType(type) {
|
|
357878
|
-
return function (content, options) {
|
|
357879
|
-
return dispatchToast(content, mergeOptions(type, options));
|
|
357880
|
-
};
|
|
357881
|
-
}
|
|
357882
|
-
|
|
357883
|
-
function toast(content, options) {
|
|
357884
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, options));
|
|
357885
|
-
}
|
|
357886
|
-
|
|
357887
|
-
toast.loading = function (content, options) {
|
|
357888
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends({
|
|
357889
|
-
isLoading: true,
|
|
357890
|
-
autoClose: false,
|
|
357891
|
-
closeOnClick: false,
|
|
357892
|
-
closeButton: false,
|
|
357893
|
-
draggable: false
|
|
357894
|
-
}, options)));
|
|
357895
|
-
};
|
|
357896
|
-
|
|
357897
|
-
function handlePromise(promise, _ref2, options) {
|
|
357898
|
-
var pending = _ref2.pending,
|
|
357899
|
-
error = _ref2.error,
|
|
357900
|
-
success = _ref2.success;
|
|
357901
|
-
var id;
|
|
357902
|
-
|
|
357903
|
-
if (pending) {
|
|
357904
|
-
id = isStr(pending) ? toast.loading(pending, options) : toast.loading(pending.render, _extends({}, options, pending));
|
|
357905
|
-
}
|
|
357906
|
-
|
|
357907
|
-
var resetParams = {
|
|
357908
|
-
isLoading: null,
|
|
357909
|
-
autoClose: null,
|
|
357910
|
-
closeOnClick: null,
|
|
357911
|
-
closeButton: null,
|
|
357912
|
-
draggable: null
|
|
357913
|
-
};
|
|
357914
|
-
|
|
357915
|
-
var resolver = function resolver(type, input, result) {
|
|
357916
|
-
// Remove the toast if the input has not been provided. This prevents the toast from hanging
|
|
357917
|
-
// in the pending state if a success/error toast has not been provided.
|
|
357918
|
-
if (input == null) {
|
|
357919
|
-
toast.dismiss(id);
|
|
357920
|
-
return;
|
|
357921
|
-
}
|
|
357922
|
-
|
|
357923
|
-
var baseParams = _extends({
|
|
357924
|
-
type: type
|
|
357925
|
-
}, resetParams, options, {
|
|
357926
|
-
data: result
|
|
357927
|
-
});
|
|
357928
|
-
|
|
357929
|
-
var params = isStr(input) ? {
|
|
357930
|
-
render: input
|
|
357931
|
-
} : input; // if the id is set we know that it's an update
|
|
357932
|
-
|
|
357933
|
-
if (id) {
|
|
357934
|
-
toast.update(id, _extends({}, baseParams, params));
|
|
357935
|
-
} else {
|
|
357936
|
-
// using toast.promise without loading
|
|
357937
|
-
toast(params.render, _extends({}, baseParams, params));
|
|
357938
|
-
}
|
|
357939
|
-
|
|
357940
|
-
return result;
|
|
357941
|
-
};
|
|
357942
|
-
|
|
357943
|
-
var p = isFn(promise) ? promise() : promise; //call the resolvers only when needed
|
|
357944
|
-
|
|
357945
|
-
p.then(function (result) {
|
|
357946
|
-
return resolver('success', success, result);
|
|
357947
|
-
})["catch"](function (err) {
|
|
357948
|
-
return resolver('error', error, err);
|
|
357949
|
-
});
|
|
357950
|
-
return p;
|
|
357951
|
-
}
|
|
357952
|
-
|
|
357953
|
-
toast.promise = handlePromise;
|
|
357954
|
-
toast.success = /*#__PURE__*/createToastByType(TYPE.SUCCESS);
|
|
357955
|
-
toast.info = /*#__PURE__*/createToastByType(TYPE.INFO);
|
|
357956
|
-
toast.error = /*#__PURE__*/createToastByType(TYPE.ERROR);
|
|
357957
|
-
toast.warning = /*#__PURE__*/createToastByType(TYPE.WARNING);
|
|
357958
|
-
toast.warn = toast.warning;
|
|
357959
|
-
|
|
357960
|
-
toast.dark = function (content, options) {
|
|
357961
|
-
return dispatchToast(content, mergeOptions(TYPE.DEFAULT, _extends({
|
|
357962
|
-
theme: 'dark'
|
|
357963
|
-
}, options)));
|
|
357964
|
-
};
|
|
357965
|
-
/**
|
|
357966
|
-
* Remove toast programmaticaly
|
|
357967
|
-
*/
|
|
357968
|
-
|
|
357969
|
-
|
|
357970
|
-
toast.dismiss = function (id) {
|
|
357971
|
-
return eventManager.emit(1
|
|
357972
|
-
/* Clear */
|
|
357973
|
-
, id);
|
|
357974
|
-
};
|
|
357975
|
-
/**
|
|
357976
|
-
* Clear waiting queue when limit is used
|
|
357977
|
-
*/
|
|
357978
|
-
|
|
357979
|
-
|
|
357980
|
-
toast.clearWaitingQueue = function (params) {
|
|
357981
|
-
if (params === void 0) {
|
|
357982
|
-
params = {};
|
|
357983
|
-
}
|
|
357984
|
-
|
|
357985
|
-
return eventManager.emit(5
|
|
357986
|
-
/* ClearWaitingQueue */
|
|
357987
|
-
, params);
|
|
357988
|
-
};
|
|
357989
|
-
/**
|
|
357990
|
-
* return true if one container is displaying the toast
|
|
357991
|
-
*/
|
|
357992
|
-
|
|
357993
|
-
|
|
357994
|
-
toast.isActive = function (id) {
|
|
357995
|
-
var isToastActive = false;
|
|
357996
|
-
containers.forEach(function (container) {
|
|
357997
|
-
if (container.isToastActive && container.isToastActive(id)) {
|
|
357998
|
-
isToastActive = true;
|
|
357999
|
-
}
|
|
358000
|
-
});
|
|
358001
|
-
return isToastActive;
|
|
358002
|
-
};
|
|
358003
|
-
|
|
358004
|
-
toast.update = function (toastId, options) {
|
|
358005
|
-
if (options === void 0) {
|
|
358006
|
-
options = {};
|
|
358007
|
-
}
|
|
358008
|
-
|
|
358009
|
-
// if you call toast and toast.update directly nothing will be displayed
|
|
358010
|
-
// this is why I defered the update
|
|
358011
|
-
setTimeout(function () {
|
|
358012
|
-
var toast = getToast(toastId, options);
|
|
358013
|
-
|
|
358014
|
-
if (toast) {
|
|
358015
|
-
var oldOptions = toast.props,
|
|
358016
|
-
oldContent = toast.content;
|
|
358017
|
-
|
|
358018
|
-
var nextOptions = _extends({}, oldOptions, options, {
|
|
358019
|
-
toastId: options.toastId || toastId,
|
|
358020
|
-
updateId: generateToastId()
|
|
358021
|
-
});
|
|
358022
|
-
|
|
358023
|
-
if (nextOptions.toastId !== toastId) nextOptions.staleId = toastId;
|
|
358024
|
-
var content = nextOptions.render || oldContent;
|
|
358025
|
-
delete nextOptions.render;
|
|
358026
|
-
dispatchToast(content, nextOptions);
|
|
358027
|
-
}
|
|
358028
|
-
}, 0);
|
|
358029
|
-
};
|
|
358030
|
-
/**
|
|
358031
|
-
* Used for controlled progress bar.
|
|
358032
|
-
*/
|
|
358033
|
-
|
|
358034
|
-
|
|
358035
|
-
toast.done = function (id) {
|
|
358036
|
-
toast.update(id, {
|
|
358037
|
-
progress: 1
|
|
358038
|
-
});
|
|
358039
|
-
};
|
|
358040
|
-
/**
|
|
358041
|
-
* @deprecated
|
|
358042
|
-
* API will change in the next major release
|
|
358043
|
-
*
|
|
358044
|
-
* Track changes. The callback get the number of toast displayed
|
|
358045
|
-
*/
|
|
358046
|
-
|
|
358047
|
-
|
|
358048
|
-
toast.onChange = function (callback) {
|
|
358049
|
-
if (isFn(callback)) {
|
|
358050
|
-
eventManager.on(4
|
|
358051
|
-
/* Change */
|
|
358052
|
-
, callback);
|
|
358053
|
-
}
|
|
358054
|
-
|
|
358055
|
-
return function () {
|
|
358056
|
-
isFn(callback) && eventManager.off(4
|
|
358057
|
-
/* Change */
|
|
358058
|
-
, callback);
|
|
358059
|
-
};
|
|
358060
|
-
};
|
|
358061
|
-
/**
|
|
358062
|
-
* @deprecated
|
|
358063
|
-
* will be removed in the next major release
|
|
358064
|
-
*
|
|
358065
|
-
* Configure the ToastContainer when lazy mounted
|
|
358066
|
-
* Prefer ToastContainer over this one
|
|
358067
|
-
*/
|
|
358068
|
-
|
|
358069
|
-
|
|
358070
|
-
toast.configure = function (config) {
|
|
358071
|
-
if (config === void 0) {
|
|
358072
|
-
config = {};
|
|
358073
|
-
}
|
|
358074
|
-
|
|
358075
|
-
lazy = true;
|
|
358076
|
-
containerConfig = config;
|
|
358077
|
-
};
|
|
358078
|
-
|
|
358079
|
-
toast.POSITION = POSITION;
|
|
358080
|
-
toast.TYPE = TYPE;
|
|
358081
|
-
/**
|
|
358082
|
-
* Wait until the ToastContainer is mounted to dispatch the toast
|
|
358083
|
-
* and attach isActive method
|
|
358084
|
-
*/
|
|
358085
|
-
|
|
358086
|
-
eventManager.on(2
|
|
358087
|
-
/* DidMount */
|
|
358088
|
-
, function (containerInstance) {
|
|
358089
|
-
latestInstance = containerInstance.containerId || containerInstance;
|
|
358090
|
-
containers.set(latestInstance, containerInstance);
|
|
358091
|
-
queue.forEach(function (item) {
|
|
358092
|
-
eventManager.emit(0
|
|
358093
|
-
/* Show */
|
|
358094
|
-
, item.content, item.options);
|
|
358095
|
-
});
|
|
358096
|
-
queue = [];
|
|
358097
|
-
}).on(3
|
|
358098
|
-
/* WillUnmount */
|
|
358099
|
-
, function (containerInstance) {
|
|
358100
|
-
containers["delete"](containerInstance.containerId || containerInstance);
|
|
358101
|
-
|
|
358102
|
-
if (containers.size === 0) {
|
|
358103
|
-
eventManager.off(0
|
|
358104
|
-
/* Show */
|
|
358105
|
-
).off(1
|
|
358106
|
-
/* Clear */
|
|
358107
|
-
).off(5
|
|
358108
|
-
/* ClearWaitingQueue */
|
|
358109
|
-
);
|
|
358110
|
-
}
|
|
358111
|
-
|
|
358112
|
-
if (canUseDom && containerDomNode) {
|
|
358113
|
-
document.body.removeChild(containerDomNode);
|
|
358114
|
-
}
|
|
358115
|
-
});
|
|
358116
|
-
|
|
358117
|
-
|
|
358118
|
-
//# sourceMappingURL=react-toastify.esm.js.map
|
|
358119
|
-
|
|
355947
|
+
function r(e){var t,f,n="";if("string"==typeof e||"number"==typeof e)n+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(f=r(e[t]))&&(n&&(n+=" "),n+=f);else for(t in e)e[t]&&(n&&(n+=" "),n+=t);return n}function clsx(){for(var e,t,f=0,n="";f<arguments.length;)(e=arguments[f++])&&(t=r(e))&&(n&&(n+=" "),n+=t);return n}/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (clsx);
|
|
358120
355948
|
|
|
358121
355949
|
/***/ }),
|
|
358122
355950
|
|
|
@@ -377301,7 +375129,7 @@ const jsx_runtime_1 = __webpack_require__(74848);
|
|
|
377301
375129
|
const dnd_1 = __webpack_require__(44754);
|
|
377302
375130
|
const react_1 = __webpack_require__(51649);
|
|
377303
375131
|
const react_responsive_1 = __webpack_require__(17988);
|
|
377304
|
-
const react_tabs_1 = __webpack_require__(
|
|
375132
|
+
const react_tabs_1 = __webpack_require__(60627);
|
|
377305
375133
|
const Button_1 = __importDefault(__webpack_require__(79428));
|
|
377306
375134
|
const DraggableTab_1 = __importDefault(__webpack_require__(74215));
|
|
377307
375135
|
const DroppableTabList_1 = __importDefault(__webpack_require__(48339));
|
|
@@ -379037,7 +376865,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
|
379037
376865
|
exports.OutputTabPanel = void 0;
|
|
379038
376866
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
379039
376867
|
const classnames_1 = __importDefault(__webpack_require__(46942));
|
|
379040
|
-
const react_tabs_1 = __webpack_require__(
|
|
376868
|
+
const react_tabs_1 = __webpack_require__(60627);
|
|
379041
376869
|
const Text_1 = __webpack_require__(82803);
|
|
379042
376870
|
const SvgIcon_1 = __webpack_require__(82917);
|
|
379043
376871
|
const styles_module_scss_1 = __importDefault(__webpack_require__(12914));
|
|
@@ -380521,7 +378349,7 @@ exports.useRunnerFactory = useRunnerFactory;
|
|
|
380521
378349
|
|
|
380522
378350
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
380523
378351
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
380524
|
-
const react_tabs_1 = __webpack_require__(
|
|
378352
|
+
const react_tabs_1 = __webpack_require__(60627);
|
|
380525
378353
|
const dnd_1 = __webpack_require__(44754);
|
|
380526
378354
|
__webpack_require__(44221);
|
|
380527
378355
|
const DraggableTabWrapper = ({ draggableId, index, isDragDisabled = false, children, ...otherProps }) => {
|
|
@@ -380663,7 +378491,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
380663
378491
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
380664
378492
|
exports.tabKey = void 0;
|
|
380665
378493
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
380666
|
-
const react_tabs_1 = __webpack_require__(
|
|
378494
|
+
const react_tabs_1 = __webpack_require__(60627);
|
|
380667
378495
|
const EditorTypes_1 = __webpack_require__(42108);
|
|
380668
378496
|
const TabContent_1 = __importDefault(__webpack_require__(14802));
|
|
380669
378497
|
const styles_module_scss_1 = __importDefault(__webpack_require__(44502));
|
|
@@ -380722,7 +378550,7 @@ const jsx_runtime_1 = __webpack_require__(74848);
|
|
|
380722
378550
|
const dnd_1 = __webpack_require__(44754);
|
|
380723
378551
|
const react_1 = __webpack_require__(51649);
|
|
380724
378552
|
const react_redux_1 = __webpack_require__(14062);
|
|
380725
|
-
const react_tabs_1 = __webpack_require__(
|
|
378553
|
+
const react_tabs_1 = __webpack_require__(60627);
|
|
380726
378554
|
const Tooltip_1 = __importDefault(__webpack_require__(26982));
|
|
380727
378555
|
const stores_1 = __webpack_require__(32132);
|
|
380728
378556
|
const EditorTypes_1 = __webpack_require__(42108);
|
|
@@ -382636,7 +380464,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
382636
380464
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
382637
380465
|
exports.ToastMessagesProvider = void 0;
|
|
382638
380466
|
const jsx_runtime_1 = __webpack_require__(74848);
|
|
382639
|
-
const react_toastify_1 = __webpack_require__(
|
|
380467
|
+
const react_toastify_1 = __webpack_require__(34168);
|
|
382640
380468
|
const styles_module_scss_1 = __importDefault(__webpack_require__(27112));
|
|
382641
380469
|
const ToastMessagesProvider = () => {
|
|
382642
380470
|
return ((0, jsx_runtime_1.jsx)(react_toastify_1.ToastContainer, { theme: "colored", position: "bottom-right", hideProgressBar: true, icon: false, closeButton: false, closeOnClick: false, pauseOnHover: true, toastClassName: styles_module_scss_1.default.toast, bodyClassName: styles_module_scss_1.default.toastBody, className: styles_module_scss_1.default.toastList }));
|
|
@@ -382653,7 +380481,7 @@ exports.ToastMessagesProvider = ToastMessagesProvider;
|
|
|
382653
380481
|
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
382654
380482
|
exports.showInfo = exports.showError = exports.showSuccess = void 0;
|
|
382655
380483
|
const ToastItem_1 = __webpack_require__(10151);
|
|
382656
|
-
const react_toastify_1 = __webpack_require__(
|
|
380484
|
+
const react_toastify_1 = __webpack_require__(34168);
|
|
382657
380485
|
const showSuccess = (message) => {
|
|
382658
380486
|
react_toastify_1.toast.success(ToastItem_1.ToastItem, {
|
|
382659
380487
|
data: { message },
|
|
@@ -385366,11 +383194,14 @@ const react_redux_1 = __webpack_require__(14062);
|
|
|
385366
383194
|
const RootSlice_1 = __importDefault(__webpack_require__(38343));
|
|
385367
383195
|
const listeners_1 = __webpack_require__(73132);
|
|
385368
383196
|
const EditorSlice_1 = __webpack_require__(68512);
|
|
383197
|
+
const modalCallbackPaths = ["onUpload", "onRemove", "onContinue", "onStartNew"];
|
|
385369
383198
|
const createAppStore = () => (0, toolkit_1.configureStore)({
|
|
385370
383199
|
reducer: RootSlice_1.default,
|
|
385371
383200
|
middleware: (getDefaultMiddleware) => getDefaultMiddleware({
|
|
385372
383201
|
serializableCheck: {
|
|
385373
383202
|
ignoredActions: [EditorSlice_1.queueBinaryWrites.type],
|
|
383203
|
+
ignoredActionPaths: modalCallbackPaths.map((callback) => `payload.args.${callback}`),
|
|
383204
|
+
ignoredPaths: modalCallbackPaths.map((callback) => `editor.modalWindowArgs.${callback}`),
|
|
385374
383205
|
},
|
|
385375
383206
|
}).prepend(listeners_1.listenerMiddleware.middleware),
|
|
385376
383207
|
});
|