@secondstaxorg/sscomp 1.3.4 → 1.3.5
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/LICENSE +15 -15
- package/dist/index.es.js +709 -709
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +3274 -463
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +709 -709
- package/dist/index.min.js.map +1 -1
- package/package.json +84 -82
- package/types/components/ActionFailed/ActionFailed.d.ts +3 -0
- package/types/components/ActionFailed/type.d.ts +6 -0
- package/types/components/Button/Button.d.ts +22 -2
- package/types/components/Button/type.d.ts +12 -0
- package/types/ui-documentation/colours/style.d.ts +2 -0
package/dist/index.js
CHANGED
|
@@ -1,93 +1,2885 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var React$1 = require('react');
|
|
4
3
|
var styled = require('styled-components');
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
5
|
+
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
|
+
|
|
7
|
+
function getDefaultExportFromCjs (x) {
|
|
8
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
var reactExports = {};
|
|
12
|
+
var react = {
|
|
13
|
+
get exports(){ return reactExports; },
|
|
14
|
+
set exports(v){ reactExports = v; },
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
var react_production_min = {};
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @license React
|
|
21
|
+
* react.production.min.js
|
|
22
|
+
*
|
|
23
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
24
|
+
*
|
|
25
|
+
* This source code is licensed under the MIT license found in the
|
|
26
|
+
* LICENSE file in the root directory of this source tree.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
var hasRequiredReact_production_min;
|
|
30
|
+
|
|
31
|
+
function requireReact_production_min () {
|
|
32
|
+
if (hasRequiredReact_production_min) return react_production_min;
|
|
33
|
+
hasRequiredReact_production_min = 1;
|
|
34
|
+
var l=Symbol.for("react.element"),n=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),q=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),t=Symbol.for("react.provider"),u=Symbol.for("react.context"),v=Symbol.for("react.forward_ref"),w=Symbol.for("react.suspense"),x=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),z=Symbol.iterator;function A(a){if(null===a||"object"!==typeof a)return null;a=z&&a[z]||a["@@iterator"];return "function"===typeof a?a:null}
|
|
35
|
+
var B={isMounted:function(){return !1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,D={};function E(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B;}E.prototype.isReactComponent={};
|
|
36
|
+
E.prototype.setState=function(a,b){if("object"!==typeof a&&"function"!==typeof a&&null!=a)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,a,b,"setState");};E.prototype.forceUpdate=function(a){this.updater.enqueueForceUpdate(this,a,"forceUpdate");};function F(){}F.prototype=E.prototype;function G(a,b,e){this.props=a;this.context=b;this.refs=D;this.updater=e||B;}var H=G.prototype=new F;
|
|
37
|
+
H.constructor=G;C(H,E.prototype);H.isPureReactComponent=!0;var I=Array.isArray,J=Object.prototype.hasOwnProperty,K={current:null},L={key:!0,ref:!0,__self:!0,__source:!0};
|
|
38
|
+
function M(a,b,e){var d,c={},k=null,h=null;if(null!=b)for(d in void 0!==b.ref&&(h=b.ref),void 0!==b.key&&(k=""+b.key),b)J.call(b,d)&&!L.hasOwnProperty(d)&&(c[d]=b[d]);var g=arguments.length-2;if(1===g)c.children=e;else if(1<g){for(var f=Array(g),m=0;m<g;m++)f[m]=arguments[m+2];c.children=f;}if(a&&a.defaultProps)for(d in g=a.defaultProps,g)void 0===c[d]&&(c[d]=g[d]);return {$$typeof:l,type:a,key:k,ref:h,props:c,_owner:K.current}}
|
|
39
|
+
function N(a,b){return {$$typeof:l,type:a.type,key:b,ref:a.ref,props:a.props,_owner:a._owner}}function O(a){return "object"===typeof a&&null!==a&&a.$$typeof===l}function escape(a){var b={"=":"=0",":":"=2"};return "$"+a.replace(/[=:]/g,function(a){return b[a]})}var P=/\/+/g;function Q(a,b){return "object"===typeof a&&null!==a&&null!=a.key?escape(""+a.key):b.toString(36)}
|
|
40
|
+
function R(a,b,e,d,c){var k=typeof a;if("undefined"===k||"boolean"===k)a=null;var h=!1;if(null===a)h=!0;else switch(k){case "string":case "number":h=!0;break;case "object":switch(a.$$typeof){case l:case n:h=!0;}}if(h)return h=a,c=c(h),a=""===d?"."+Q(h,0):d,I(c)?(e="",null!=a&&(e=a.replace(P,"$&/")+"/"),R(c,b,e,"",function(a){return a})):null!=c&&(O(c)&&(c=N(c,e+(!c.key||h&&h.key===c.key?"":(""+c.key).replace(P,"$&/")+"/")+a)),b.push(c)),1;h=0;d=""===d?".":d+":";if(I(a))for(var g=0;g<a.length;g++){k=
|
|
41
|
+
a[g];var f=d+Q(k,g);h+=R(k,b,e,f,c);}else if(f=A(a),"function"===typeof f)for(a=f.call(a),g=0;!(k=a.next()).done;)k=k.value,f=d+Q(k,g++),h+=R(k,b,e,f,c);else if("object"===k)throw b=String(a),Error("Objects are not valid as a React child (found: "+("[object Object]"===b?"object with keys {"+Object.keys(a).join(", ")+"}":b)+"). If you meant to render a collection of children, use an array instead.");return h}
|
|
42
|
+
function S(a,b,e){if(null==a)return a;var d=[],c=0;R(a,d,"","",function(a){return b.call(e,a,c++)});return d}function T(a){if(-1===a._status){var b=a._result;b=b();b.then(function(b){if(0===a._status||-1===a._status)a._status=1,a._result=b;},function(b){if(0===a._status||-1===a._status)a._status=2,a._result=b;});-1===a._status&&(a._status=0,a._result=b);}if(1===a._status)return a._result.default;throw a._result;}
|
|
43
|
+
var U={current:null},V={transition:null},W={ReactCurrentDispatcher:U,ReactCurrentBatchConfig:V,ReactCurrentOwner:K};react_production_min.Children={map:S,forEach:function(a,b,e){S(a,function(){b.apply(this,arguments);},e);},count:function(a){var b=0;S(a,function(){b++;});return b},toArray:function(a){return S(a,function(a){return a})||[]},only:function(a){if(!O(a))throw Error("React.Children.only expected to receive a single React element child.");return a}};react_production_min.Component=E;react_production_min.Fragment=p;
|
|
44
|
+
react_production_min.Profiler=r;react_production_min.PureComponent=G;react_production_min.StrictMode=q;react_production_min.Suspense=w;react_production_min.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=W;
|
|
45
|
+
react_production_min.cloneElement=function(a,b,e){if(null===a||void 0===a)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+a+".");var d=C({},a.props),c=a.key,k=a.ref,h=a._owner;if(null!=b){void 0!==b.ref&&(k=b.ref,h=K.current);void 0!==b.key&&(c=""+b.key);if(a.type&&a.type.defaultProps)var g=a.type.defaultProps;for(f in b)J.call(b,f)&&!L.hasOwnProperty(f)&&(d[f]=void 0===b[f]&&void 0!==g?g[f]:b[f]);}var f=arguments.length-2;if(1===f)d.children=e;else if(1<f){g=Array(f);
|
|
46
|
+
for(var m=0;m<f;m++)g[m]=arguments[m+2];d.children=g;}return {$$typeof:l,type:a.type,key:c,ref:k,props:d,_owner:h}};react_production_min.createContext=function(a){a={$$typeof:u,_currentValue:a,_currentValue2:a,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null};a.Provider={$$typeof:t,_context:a};return a.Consumer=a};react_production_min.createElement=M;react_production_min.createFactory=function(a){var b=M.bind(null,a);b.type=a;return b};react_production_min.createRef=function(){return {current:null}};
|
|
47
|
+
react_production_min.forwardRef=function(a){return {$$typeof:v,render:a}};react_production_min.isValidElement=O;react_production_min.lazy=function(a){return {$$typeof:y,_payload:{_status:-1,_result:a},_init:T}};react_production_min.memo=function(a,b){return {$$typeof:x,type:a,compare:void 0===b?null:b}};react_production_min.startTransition=function(a){var b=V.transition;V.transition={};try{a();}finally{V.transition=b;}};react_production_min.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.");};
|
|
48
|
+
react_production_min.useCallback=function(a,b){return U.current.useCallback(a,b)};react_production_min.useContext=function(a){return U.current.useContext(a)};react_production_min.useDebugValue=function(){};react_production_min.useDeferredValue=function(a){return U.current.useDeferredValue(a)};react_production_min.useEffect=function(a,b){return U.current.useEffect(a,b)};react_production_min.useId=function(){return U.current.useId()};react_production_min.useImperativeHandle=function(a,b,e){return U.current.useImperativeHandle(a,b,e)};
|
|
49
|
+
react_production_min.useInsertionEffect=function(a,b){return U.current.useInsertionEffect(a,b)};react_production_min.useLayoutEffect=function(a,b){return U.current.useLayoutEffect(a,b)};react_production_min.useMemo=function(a,b){return U.current.useMemo(a,b)};react_production_min.useReducer=function(a,b,e){return U.current.useReducer(a,b,e)};react_production_min.useRef=function(a){return U.current.useRef(a)};react_production_min.useState=function(a){return U.current.useState(a)};react_production_min.useSyncExternalStore=function(a,b,e){return U.current.useSyncExternalStore(a,b,e)};
|
|
50
|
+
react_production_min.useTransition=function(){return U.current.useTransition()};react_production_min.version="18.2.0";
|
|
51
|
+
return react_production_min;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
var react_developmentExports = {};
|
|
55
|
+
var react_development = {
|
|
56
|
+
get exports(){ return react_developmentExports; },
|
|
57
|
+
set exports(v){ react_developmentExports = v; },
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* @license React
|
|
62
|
+
* react.development.js
|
|
63
|
+
*
|
|
64
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
65
|
+
*
|
|
66
|
+
* This source code is licensed under the MIT license found in the
|
|
67
|
+
* LICENSE file in the root directory of this source tree.
|
|
68
|
+
*/
|
|
69
|
+
|
|
70
|
+
var hasRequiredReact_development;
|
|
71
|
+
|
|
72
|
+
function requireReact_development () {
|
|
73
|
+
if (hasRequiredReact_development) return react_developmentExports;
|
|
74
|
+
hasRequiredReact_development = 1;
|
|
75
|
+
(function (module, exports) {
|
|
76
|
+
|
|
77
|
+
if (process.env.NODE_ENV !== "production") {
|
|
78
|
+
(function() {
|
|
79
|
+
|
|
80
|
+
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
81
|
+
if (
|
|
82
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
83
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===
|
|
84
|
+
'function'
|
|
85
|
+
) {
|
|
86
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
87
|
+
}
|
|
88
|
+
var ReactVersion = '18.2.0';
|
|
89
|
+
|
|
90
|
+
// ATTENTION
|
|
91
|
+
// When adding new symbols to this file,
|
|
92
|
+
// Please consider also adding to 'react-devtools-shared/src/backend/ReactSymbols'
|
|
93
|
+
// The Symbol used to tag the ReactElement-like types.
|
|
94
|
+
var REACT_ELEMENT_TYPE = Symbol.for('react.element');
|
|
95
|
+
var REACT_PORTAL_TYPE = Symbol.for('react.portal');
|
|
96
|
+
var REACT_FRAGMENT_TYPE = Symbol.for('react.fragment');
|
|
97
|
+
var REACT_STRICT_MODE_TYPE = Symbol.for('react.strict_mode');
|
|
98
|
+
var REACT_PROFILER_TYPE = Symbol.for('react.profiler');
|
|
99
|
+
var REACT_PROVIDER_TYPE = Symbol.for('react.provider');
|
|
100
|
+
var REACT_CONTEXT_TYPE = Symbol.for('react.context');
|
|
101
|
+
var REACT_FORWARD_REF_TYPE = Symbol.for('react.forward_ref');
|
|
102
|
+
var REACT_SUSPENSE_TYPE = Symbol.for('react.suspense');
|
|
103
|
+
var REACT_SUSPENSE_LIST_TYPE = Symbol.for('react.suspense_list');
|
|
104
|
+
var REACT_MEMO_TYPE = Symbol.for('react.memo');
|
|
105
|
+
var REACT_LAZY_TYPE = Symbol.for('react.lazy');
|
|
106
|
+
var REACT_OFFSCREEN_TYPE = Symbol.for('react.offscreen');
|
|
107
|
+
var MAYBE_ITERATOR_SYMBOL = Symbol.iterator;
|
|
108
|
+
var FAUX_ITERATOR_SYMBOL = '@@iterator';
|
|
109
|
+
function getIteratorFn(maybeIterable) {
|
|
110
|
+
if (maybeIterable === null || typeof maybeIterable !== 'object') {
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
var maybeIterator = MAYBE_ITERATOR_SYMBOL && maybeIterable[MAYBE_ITERATOR_SYMBOL] || maybeIterable[FAUX_ITERATOR_SYMBOL];
|
|
115
|
+
|
|
116
|
+
if (typeof maybeIterator === 'function') {
|
|
117
|
+
return maybeIterator;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* Keeps track of the current dispatcher.
|
|
125
|
+
*/
|
|
126
|
+
var ReactCurrentDispatcher = {
|
|
127
|
+
/**
|
|
128
|
+
* @internal
|
|
129
|
+
* @type {ReactComponent}
|
|
130
|
+
*/
|
|
131
|
+
current: null
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Keeps track of the current batch's configuration such as how long an update
|
|
136
|
+
* should suspend for if it needs to.
|
|
137
|
+
*/
|
|
138
|
+
var ReactCurrentBatchConfig = {
|
|
139
|
+
transition: null
|
|
140
|
+
};
|
|
141
|
+
|
|
142
|
+
var ReactCurrentActQueue = {
|
|
143
|
+
current: null,
|
|
144
|
+
// Used to reproduce behavior of `batchedUpdates` in legacy mode.
|
|
145
|
+
isBatchingLegacy: false,
|
|
146
|
+
didScheduleLegacyUpdate: false
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Keeps track of the current owner.
|
|
151
|
+
*
|
|
152
|
+
* The current owner is the component who should own any components that are
|
|
153
|
+
* currently being constructed.
|
|
154
|
+
*/
|
|
155
|
+
var ReactCurrentOwner = {
|
|
156
|
+
/**
|
|
157
|
+
* @internal
|
|
158
|
+
* @type {ReactComponent}
|
|
159
|
+
*/
|
|
160
|
+
current: null
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
var ReactDebugCurrentFrame = {};
|
|
164
|
+
var currentExtraStackFrame = null;
|
|
165
|
+
function setExtraStackFrame(stack) {
|
|
166
|
+
{
|
|
167
|
+
currentExtraStackFrame = stack;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
{
|
|
172
|
+
ReactDebugCurrentFrame.setExtraStackFrame = function (stack) {
|
|
173
|
+
{
|
|
174
|
+
currentExtraStackFrame = stack;
|
|
175
|
+
}
|
|
176
|
+
}; // Stack implementation injected by the current renderer.
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
ReactDebugCurrentFrame.getCurrentStack = null;
|
|
180
|
+
|
|
181
|
+
ReactDebugCurrentFrame.getStackAddendum = function () {
|
|
182
|
+
var stack = ''; // Add an extra top frame while an element is being validated
|
|
183
|
+
|
|
184
|
+
if (currentExtraStackFrame) {
|
|
185
|
+
stack += currentExtraStackFrame;
|
|
186
|
+
} // Delegate to the injected renderer-specific implementation
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
var impl = ReactDebugCurrentFrame.getCurrentStack;
|
|
190
|
+
|
|
191
|
+
if (impl) {
|
|
192
|
+
stack += impl() || '';
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
return stack;
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// -----------------------------------------------------------------------------
|
|
200
|
+
|
|
201
|
+
var enableScopeAPI = false; // Experimental Create Event Handle API.
|
|
202
|
+
var enableCacheElement = false;
|
|
203
|
+
var enableTransitionTracing = false; // No known bugs, but needs performance testing
|
|
204
|
+
|
|
205
|
+
var enableLegacyHidden = false; // Enables unstable_avoidThisFallback feature in Fiber
|
|
206
|
+
// stuff. Intended to enable React core members to more easily debug scheduling
|
|
207
|
+
// issues in DEV builds.
|
|
208
|
+
|
|
209
|
+
var enableDebugTracing = false; // Track which Fiber(s) schedule render work.
|
|
210
|
+
|
|
211
|
+
var ReactSharedInternals = {
|
|
212
|
+
ReactCurrentDispatcher: ReactCurrentDispatcher,
|
|
213
|
+
ReactCurrentBatchConfig: ReactCurrentBatchConfig,
|
|
214
|
+
ReactCurrentOwner: ReactCurrentOwner
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
{
|
|
218
|
+
ReactSharedInternals.ReactDebugCurrentFrame = ReactDebugCurrentFrame;
|
|
219
|
+
ReactSharedInternals.ReactCurrentActQueue = ReactCurrentActQueue;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
// by calls to these methods by a Babel plugin.
|
|
223
|
+
//
|
|
224
|
+
// In PROD (or in packages without access to React internals),
|
|
225
|
+
// they are left as they are instead.
|
|
226
|
+
|
|
227
|
+
function warn(format) {
|
|
228
|
+
{
|
|
229
|
+
{
|
|
230
|
+
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
231
|
+
args[_key - 1] = arguments[_key];
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
printWarning('warn', format, args);
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
function error(format) {
|
|
239
|
+
{
|
|
240
|
+
{
|
|
241
|
+
for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
242
|
+
args[_key2 - 1] = arguments[_key2];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
printWarning('error', format, args);
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
function printWarning(level, format, args) {
|
|
251
|
+
// When changing this logic, you might want to also
|
|
252
|
+
// update consoleWithStackDev.www.js as well.
|
|
253
|
+
{
|
|
254
|
+
var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
255
|
+
var stack = ReactDebugCurrentFrame.getStackAddendum();
|
|
256
|
+
|
|
257
|
+
if (stack !== '') {
|
|
258
|
+
format += '%s';
|
|
259
|
+
args = args.concat([stack]);
|
|
260
|
+
} // eslint-disable-next-line react-internal/safe-string-coercion
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
var argsWithFormat = args.map(function (item) {
|
|
264
|
+
return String(item);
|
|
265
|
+
}); // Careful: RN currently depends on this prefix
|
|
266
|
+
|
|
267
|
+
argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it
|
|
268
|
+
// breaks IE9: https://github.com/facebook/react/issues/13610
|
|
269
|
+
// eslint-disable-next-line react-internal/no-production-logging
|
|
270
|
+
|
|
271
|
+
Function.prototype.apply.call(console[level], console, argsWithFormat);
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
var didWarnStateUpdateForUnmountedComponent = {};
|
|
276
|
+
|
|
277
|
+
function warnNoop(publicInstance, callerName) {
|
|
278
|
+
{
|
|
279
|
+
var _constructor = publicInstance.constructor;
|
|
280
|
+
var componentName = _constructor && (_constructor.displayName || _constructor.name) || 'ReactClass';
|
|
281
|
+
var warningKey = componentName + "." + callerName;
|
|
282
|
+
|
|
283
|
+
if (didWarnStateUpdateForUnmountedComponent[warningKey]) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
error("Can't call %s on a component that is not yet mounted. " + 'This is a no-op, but it might indicate a bug in your application. ' + 'Instead, assign to `this.state` directly or define a `state = {};` ' + 'class property with the desired state in the %s component.', callerName, componentName);
|
|
288
|
+
|
|
289
|
+
didWarnStateUpdateForUnmountedComponent[warningKey] = true;
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
/**
|
|
293
|
+
* This is the abstract API for an update queue.
|
|
294
|
+
*/
|
|
295
|
+
|
|
296
|
+
|
|
297
|
+
var ReactNoopUpdateQueue = {
|
|
298
|
+
/**
|
|
299
|
+
* Checks whether or not this composite component is mounted.
|
|
300
|
+
* @param {ReactClass} publicInstance The instance we want to test.
|
|
301
|
+
* @return {boolean} True if mounted, false otherwise.
|
|
302
|
+
* @protected
|
|
303
|
+
* @final
|
|
304
|
+
*/
|
|
305
|
+
isMounted: function (publicInstance) {
|
|
306
|
+
return false;
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
/**
|
|
310
|
+
* Forces an update. This should only be invoked when it is known with
|
|
311
|
+
* certainty that we are **not** in a DOM transaction.
|
|
312
|
+
*
|
|
313
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
314
|
+
* component's state has changed but `setState` was not called.
|
|
315
|
+
*
|
|
316
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
317
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
318
|
+
*
|
|
319
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
320
|
+
* @param {?function} callback Called after component is updated.
|
|
321
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
322
|
+
* @internal
|
|
323
|
+
*/
|
|
324
|
+
enqueueForceUpdate: function (publicInstance, callback, callerName) {
|
|
325
|
+
warnNoop(publicInstance, 'forceUpdate');
|
|
326
|
+
},
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* Replaces all of the state. Always use this or `setState` to mutate state.
|
|
330
|
+
* You should treat `this.state` as immutable.
|
|
331
|
+
*
|
|
332
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
333
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
334
|
+
*
|
|
335
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
336
|
+
* @param {object} completeState Next state.
|
|
337
|
+
* @param {?function} callback Called after component is updated.
|
|
338
|
+
* @param {?string} callerName name of the calling function in the public API.
|
|
339
|
+
* @internal
|
|
340
|
+
*/
|
|
341
|
+
enqueueReplaceState: function (publicInstance, completeState, callback, callerName) {
|
|
342
|
+
warnNoop(publicInstance, 'replaceState');
|
|
343
|
+
},
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* Sets a subset of the state. This only exists because _pendingState is
|
|
347
|
+
* internal. This provides a merging strategy that is not available to deep
|
|
348
|
+
* properties which is confusing. TODO: Expose pendingState or don't use it
|
|
349
|
+
* during the merge.
|
|
350
|
+
*
|
|
351
|
+
* @param {ReactClass} publicInstance The instance that should rerender.
|
|
352
|
+
* @param {object} partialState Next partial state to be merged with state.
|
|
353
|
+
* @param {?function} callback Called after component is updated.
|
|
354
|
+
* @param {?string} Name of the calling function in the public API.
|
|
355
|
+
* @internal
|
|
356
|
+
*/
|
|
357
|
+
enqueueSetState: function (publicInstance, partialState, callback, callerName) {
|
|
358
|
+
warnNoop(publicInstance, 'setState');
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
var assign = Object.assign;
|
|
363
|
+
|
|
364
|
+
var emptyObject = {};
|
|
365
|
+
|
|
366
|
+
{
|
|
367
|
+
Object.freeze(emptyObject);
|
|
368
|
+
}
|
|
369
|
+
/**
|
|
370
|
+
* Base class helpers for the updating state of a component.
|
|
371
|
+
*/
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
function Component(props, context, updater) {
|
|
375
|
+
this.props = props;
|
|
376
|
+
this.context = context; // If a component has string refs, we will assign a different object later.
|
|
377
|
+
|
|
378
|
+
this.refs = emptyObject; // We initialize the default updater but the real one gets injected by the
|
|
379
|
+
// renderer.
|
|
380
|
+
|
|
381
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
Component.prototype.isReactComponent = {};
|
|
385
|
+
/**
|
|
386
|
+
* Sets a subset of the state. Always use this to mutate
|
|
387
|
+
* state. You should treat `this.state` as immutable.
|
|
388
|
+
*
|
|
389
|
+
* There is no guarantee that `this.state` will be immediately updated, so
|
|
390
|
+
* accessing `this.state` after calling this method may return the old value.
|
|
391
|
+
*
|
|
392
|
+
* There is no guarantee that calls to `setState` will run synchronously,
|
|
393
|
+
* as they may eventually be batched together. You can provide an optional
|
|
394
|
+
* callback that will be executed when the call to setState is actually
|
|
395
|
+
* completed.
|
|
396
|
+
*
|
|
397
|
+
* When a function is provided to setState, it will be called at some point in
|
|
398
|
+
* the future (not synchronously). It will be called with the up to date
|
|
399
|
+
* component arguments (state, props, context). These values can be different
|
|
400
|
+
* from this.* because your function may be called after receiveProps but before
|
|
401
|
+
* shouldComponentUpdate, and this new state, props, and context will not yet be
|
|
402
|
+
* assigned to this.
|
|
403
|
+
*
|
|
404
|
+
* @param {object|function} partialState Next partial state or function to
|
|
405
|
+
* produce next partial state to be merged with current state.
|
|
406
|
+
* @param {?function} callback Called after state is updated.
|
|
407
|
+
* @final
|
|
408
|
+
* @protected
|
|
409
|
+
*/
|
|
410
|
+
|
|
411
|
+
Component.prototype.setState = function (partialState, callback) {
|
|
412
|
+
if (typeof partialState !== 'object' && typeof partialState !== 'function' && partialState != null) {
|
|
413
|
+
throw new Error('setState(...): takes an object of state variables to update or a ' + 'function which returns an object of state variables.');
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
this.updater.enqueueSetState(this, partialState, callback, 'setState');
|
|
417
|
+
};
|
|
418
|
+
/**
|
|
419
|
+
* Forces an update. This should only be invoked when it is known with
|
|
420
|
+
* certainty that we are **not** in a DOM transaction.
|
|
421
|
+
*
|
|
422
|
+
* You may want to call this when you know that some deeper aspect of the
|
|
423
|
+
* component's state has changed but `setState` was not called.
|
|
424
|
+
*
|
|
425
|
+
* This will not invoke `shouldComponentUpdate`, but it will invoke
|
|
426
|
+
* `componentWillUpdate` and `componentDidUpdate`.
|
|
427
|
+
*
|
|
428
|
+
* @param {?function} callback Called after update is complete.
|
|
429
|
+
* @final
|
|
430
|
+
* @protected
|
|
431
|
+
*/
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
Component.prototype.forceUpdate = function (callback) {
|
|
435
|
+
this.updater.enqueueForceUpdate(this, callback, 'forceUpdate');
|
|
436
|
+
};
|
|
437
|
+
/**
|
|
438
|
+
* Deprecated APIs. These APIs used to exist on classic React classes but since
|
|
439
|
+
* we would like to deprecate them, we're not going to move them over to this
|
|
440
|
+
* modern base class. Instead, we define a getter that warns if it's accessed.
|
|
441
|
+
*/
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
{
|
|
445
|
+
var deprecatedAPIs = {
|
|
446
|
+
isMounted: ['isMounted', 'Instead, make sure to clean up subscriptions and pending requests in ' + 'componentWillUnmount to prevent memory leaks.'],
|
|
447
|
+
replaceState: ['replaceState', 'Refactor your code to use setState instead (see ' + 'https://github.com/facebook/react/issues/3236).']
|
|
448
|
+
};
|
|
449
|
+
|
|
450
|
+
var defineDeprecationWarning = function (methodName, info) {
|
|
451
|
+
Object.defineProperty(Component.prototype, methodName, {
|
|
452
|
+
get: function () {
|
|
453
|
+
warn('%s(...) is deprecated in plain JavaScript React classes. %s', info[0], info[1]);
|
|
454
|
+
|
|
455
|
+
return undefined;
|
|
456
|
+
}
|
|
457
|
+
});
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
for (var fnName in deprecatedAPIs) {
|
|
461
|
+
if (deprecatedAPIs.hasOwnProperty(fnName)) {
|
|
462
|
+
defineDeprecationWarning(fnName, deprecatedAPIs[fnName]);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
function ComponentDummy() {}
|
|
468
|
+
|
|
469
|
+
ComponentDummy.prototype = Component.prototype;
|
|
470
|
+
/**
|
|
471
|
+
* Convenience component with default shallow equality check for sCU.
|
|
472
|
+
*/
|
|
473
|
+
|
|
474
|
+
function PureComponent(props, context, updater) {
|
|
475
|
+
this.props = props;
|
|
476
|
+
this.context = context; // If a component has string refs, we will assign a different object later.
|
|
477
|
+
|
|
478
|
+
this.refs = emptyObject;
|
|
479
|
+
this.updater = updater || ReactNoopUpdateQueue;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
var pureComponentPrototype = PureComponent.prototype = new ComponentDummy();
|
|
483
|
+
pureComponentPrototype.constructor = PureComponent; // Avoid an extra prototype jump for these methods.
|
|
484
|
+
|
|
485
|
+
assign(pureComponentPrototype, Component.prototype);
|
|
486
|
+
pureComponentPrototype.isPureReactComponent = true;
|
|
487
|
+
|
|
488
|
+
// an immutable object with a single mutable value
|
|
489
|
+
function createRef() {
|
|
490
|
+
var refObject = {
|
|
491
|
+
current: null
|
|
492
|
+
};
|
|
493
|
+
|
|
494
|
+
{
|
|
495
|
+
Object.seal(refObject);
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
return refObject;
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
var isArrayImpl = Array.isArray; // eslint-disable-next-line no-redeclare
|
|
502
|
+
|
|
503
|
+
function isArray(a) {
|
|
504
|
+
return isArrayImpl(a);
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
/*
|
|
508
|
+
* The `'' + value` pattern (used in in perf-sensitive code) throws for Symbol
|
|
509
|
+
* and Temporal.* types. See https://github.com/facebook/react/pull/22064.
|
|
510
|
+
*
|
|
511
|
+
* The functions in this module will throw an easier-to-understand,
|
|
512
|
+
* easier-to-debug exception with a clear errors message message explaining the
|
|
513
|
+
* problem. (Instead of a confusing exception thrown inside the implementation
|
|
514
|
+
* of the `value` object).
|
|
515
|
+
*/
|
|
516
|
+
// $FlowFixMe only called in DEV, so void return is not possible.
|
|
517
|
+
function typeName(value) {
|
|
518
|
+
{
|
|
519
|
+
// toStringTag is needed for namespaced types like Temporal.Instant
|
|
520
|
+
var hasToStringTag = typeof Symbol === 'function' && Symbol.toStringTag;
|
|
521
|
+
var type = hasToStringTag && value[Symbol.toStringTag] || value.constructor.name || 'Object';
|
|
522
|
+
return type;
|
|
523
|
+
}
|
|
524
|
+
} // $FlowFixMe only called in DEV, so void return is not possible.
|
|
525
|
+
|
|
526
|
+
|
|
527
|
+
function willCoercionThrow(value) {
|
|
528
|
+
{
|
|
529
|
+
try {
|
|
530
|
+
testStringCoercion(value);
|
|
531
|
+
return false;
|
|
532
|
+
} catch (e) {
|
|
533
|
+
return true;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
function testStringCoercion(value) {
|
|
539
|
+
// If you ended up here by following an exception call stack, here's what's
|
|
540
|
+
// happened: you supplied an object or symbol value to React (as a prop, key,
|
|
541
|
+
// DOM attribute, CSS property, string ref, etc.) and when React tried to
|
|
542
|
+
// coerce it to a string using `'' + value`, an exception was thrown.
|
|
543
|
+
//
|
|
544
|
+
// The most common types that will cause this exception are `Symbol` instances
|
|
545
|
+
// and Temporal objects like `Temporal.Instant`. But any object that has a
|
|
546
|
+
// `valueOf` or `[Symbol.toPrimitive]` method that throws will also cause this
|
|
547
|
+
// exception. (Library authors do this to prevent users from using built-in
|
|
548
|
+
// numeric operators like `+` or comparison operators like `>=` because custom
|
|
549
|
+
// methods are needed to perform accurate arithmetic or comparison.)
|
|
550
|
+
//
|
|
551
|
+
// To fix the problem, coerce this object or symbol value to a string before
|
|
552
|
+
// passing it to React. The most reliable way is usually `String(value)`.
|
|
553
|
+
//
|
|
554
|
+
// To find which value is throwing, check the browser or debugger console.
|
|
555
|
+
// Before this exception was thrown, there should be `console.error` output
|
|
556
|
+
// that shows the type (Symbol, Temporal.PlainDate, etc.) that caused the
|
|
557
|
+
// problem and how that type was used: key, atrribute, input value prop, etc.
|
|
558
|
+
// In most cases, this console output also shows the component and its
|
|
559
|
+
// ancestor components where the exception happened.
|
|
560
|
+
//
|
|
561
|
+
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
562
|
+
return '' + value;
|
|
563
|
+
}
|
|
564
|
+
function checkKeyStringCoercion(value) {
|
|
565
|
+
{
|
|
566
|
+
if (willCoercionThrow(value)) {
|
|
567
|
+
error('The provided key is an unsupported type %s.' + ' This value must be coerced to a string before before using it here.', typeName(value));
|
|
568
|
+
|
|
569
|
+
return testStringCoercion(value); // throw (to help callers find troubleshooting comments)
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
function getWrappedName(outerType, innerType, wrapperName) {
|
|
575
|
+
var displayName = outerType.displayName;
|
|
576
|
+
|
|
577
|
+
if (displayName) {
|
|
578
|
+
return displayName;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
var functionName = innerType.displayName || innerType.name || '';
|
|
582
|
+
return functionName !== '' ? wrapperName + "(" + functionName + ")" : wrapperName;
|
|
583
|
+
} // Keep in sync with react-reconciler/getComponentNameFromFiber
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
function getContextName(type) {
|
|
587
|
+
return type.displayName || 'Context';
|
|
588
|
+
} // Note that the reconciler package should generally prefer to use getComponentNameFromFiber() instead.
|
|
589
|
+
|
|
590
|
+
|
|
591
|
+
function getComponentNameFromType(type) {
|
|
592
|
+
if (type == null) {
|
|
593
|
+
// Host root, text node or just invalid type.
|
|
594
|
+
return null;
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
{
|
|
598
|
+
if (typeof type.tag === 'number') {
|
|
599
|
+
error('Received an unexpected object in getComponentNameFromType(). ' + 'This is likely a bug in React. Please file an issue.');
|
|
600
|
+
}
|
|
601
|
+
}
|
|
602
|
+
|
|
603
|
+
if (typeof type === 'function') {
|
|
604
|
+
return type.displayName || type.name || null;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
if (typeof type === 'string') {
|
|
608
|
+
return type;
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
switch (type) {
|
|
612
|
+
case REACT_FRAGMENT_TYPE:
|
|
613
|
+
return 'Fragment';
|
|
614
|
+
|
|
615
|
+
case REACT_PORTAL_TYPE:
|
|
616
|
+
return 'Portal';
|
|
617
|
+
|
|
618
|
+
case REACT_PROFILER_TYPE:
|
|
619
|
+
return 'Profiler';
|
|
620
|
+
|
|
621
|
+
case REACT_STRICT_MODE_TYPE:
|
|
622
|
+
return 'StrictMode';
|
|
623
|
+
|
|
624
|
+
case REACT_SUSPENSE_TYPE:
|
|
625
|
+
return 'Suspense';
|
|
626
|
+
|
|
627
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
628
|
+
return 'SuspenseList';
|
|
629
|
+
|
|
630
|
+
}
|
|
631
|
+
|
|
632
|
+
if (typeof type === 'object') {
|
|
633
|
+
switch (type.$$typeof) {
|
|
634
|
+
case REACT_CONTEXT_TYPE:
|
|
635
|
+
var context = type;
|
|
636
|
+
return getContextName(context) + '.Consumer';
|
|
637
|
+
|
|
638
|
+
case REACT_PROVIDER_TYPE:
|
|
639
|
+
var provider = type;
|
|
640
|
+
return getContextName(provider._context) + '.Provider';
|
|
641
|
+
|
|
642
|
+
case REACT_FORWARD_REF_TYPE:
|
|
643
|
+
return getWrappedName(type, type.render, 'ForwardRef');
|
|
644
|
+
|
|
645
|
+
case REACT_MEMO_TYPE:
|
|
646
|
+
var outerName = type.displayName || null;
|
|
647
|
+
|
|
648
|
+
if (outerName !== null) {
|
|
649
|
+
return outerName;
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
return getComponentNameFromType(type.type) || 'Memo';
|
|
653
|
+
|
|
654
|
+
case REACT_LAZY_TYPE:
|
|
655
|
+
{
|
|
656
|
+
var lazyComponent = type;
|
|
657
|
+
var payload = lazyComponent._payload;
|
|
658
|
+
var init = lazyComponent._init;
|
|
659
|
+
|
|
660
|
+
try {
|
|
661
|
+
return getComponentNameFromType(init(payload));
|
|
662
|
+
} catch (x) {
|
|
663
|
+
return null;
|
|
664
|
+
}
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
// eslint-disable-next-line no-fallthrough
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
return null;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
var hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
675
|
+
|
|
676
|
+
var RESERVED_PROPS = {
|
|
677
|
+
key: true,
|
|
678
|
+
ref: true,
|
|
679
|
+
__self: true,
|
|
680
|
+
__source: true
|
|
681
|
+
};
|
|
682
|
+
var specialPropKeyWarningShown, specialPropRefWarningShown, didWarnAboutStringRefs;
|
|
683
|
+
|
|
684
|
+
{
|
|
685
|
+
didWarnAboutStringRefs = {};
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
function hasValidRef(config) {
|
|
689
|
+
{
|
|
690
|
+
if (hasOwnProperty.call(config, 'ref')) {
|
|
691
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'ref').get;
|
|
692
|
+
|
|
693
|
+
if (getter && getter.isReactWarning) {
|
|
694
|
+
return false;
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
}
|
|
698
|
+
|
|
699
|
+
return config.ref !== undefined;
|
|
700
|
+
}
|
|
701
|
+
|
|
702
|
+
function hasValidKey(config) {
|
|
703
|
+
{
|
|
704
|
+
if (hasOwnProperty.call(config, 'key')) {
|
|
705
|
+
var getter = Object.getOwnPropertyDescriptor(config, 'key').get;
|
|
706
|
+
|
|
707
|
+
if (getter && getter.isReactWarning) {
|
|
708
|
+
return false;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
return config.key !== undefined;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
function defineKeyPropWarningGetter(props, displayName) {
|
|
717
|
+
var warnAboutAccessingKey = function () {
|
|
718
|
+
{
|
|
719
|
+
if (!specialPropKeyWarningShown) {
|
|
720
|
+
specialPropKeyWarningShown = true;
|
|
721
|
+
|
|
722
|
+
error('%s: `key` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
};
|
|
726
|
+
|
|
727
|
+
warnAboutAccessingKey.isReactWarning = true;
|
|
728
|
+
Object.defineProperty(props, 'key', {
|
|
729
|
+
get: warnAboutAccessingKey,
|
|
730
|
+
configurable: true
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
function defineRefPropWarningGetter(props, displayName) {
|
|
735
|
+
var warnAboutAccessingRef = function () {
|
|
736
|
+
{
|
|
737
|
+
if (!specialPropRefWarningShown) {
|
|
738
|
+
specialPropRefWarningShown = true;
|
|
739
|
+
|
|
740
|
+
error('%s: `ref` is not a prop. Trying to access it will result ' + 'in `undefined` being returned. If you need to access the same ' + 'value within the child component, you should pass it as a different ' + 'prop. (https://reactjs.org/link/special-props)', displayName);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
};
|
|
744
|
+
|
|
745
|
+
warnAboutAccessingRef.isReactWarning = true;
|
|
746
|
+
Object.defineProperty(props, 'ref', {
|
|
747
|
+
get: warnAboutAccessingRef,
|
|
748
|
+
configurable: true
|
|
749
|
+
});
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
function warnIfStringRefCannotBeAutoConverted(config) {
|
|
753
|
+
{
|
|
754
|
+
if (typeof config.ref === 'string' && ReactCurrentOwner.current && config.__self && ReactCurrentOwner.current.stateNode !== config.__self) {
|
|
755
|
+
var componentName = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
756
|
+
|
|
757
|
+
if (!didWarnAboutStringRefs[componentName]) {
|
|
758
|
+
error('Component "%s" contains the string ref "%s". ' + 'Support for string refs will be removed in a future major release. ' + 'This case cannot be automatically converted to an arrow function. ' + 'We ask you to manually fix this case by using useRef() or createRef() instead. ' + 'Learn more about using refs safely here: ' + 'https://reactjs.org/link/strict-mode-string-ref', componentName, config.ref);
|
|
759
|
+
|
|
760
|
+
didWarnAboutStringRefs[componentName] = true;
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}
|
|
764
|
+
}
|
|
765
|
+
/**
|
|
766
|
+
* Factory method to create a new React element. This no longer adheres to
|
|
767
|
+
* the class pattern, so do not use new to call it. Also, instanceof check
|
|
768
|
+
* will not work. Instead test $$typeof field against Symbol.for('react.element') to check
|
|
769
|
+
* if something is a React Element.
|
|
770
|
+
*
|
|
771
|
+
* @param {*} type
|
|
772
|
+
* @param {*} props
|
|
773
|
+
* @param {*} key
|
|
774
|
+
* @param {string|object} ref
|
|
775
|
+
* @param {*} owner
|
|
776
|
+
* @param {*} self A *temporary* helper to detect places where `this` is
|
|
777
|
+
* different from the `owner` when React.createElement is called, so that we
|
|
778
|
+
* can warn. We want to get rid of owner and replace string `ref`s with arrow
|
|
779
|
+
* functions, and as long as `this` and owner are the same, there will be no
|
|
780
|
+
* change in behavior.
|
|
781
|
+
* @param {*} source An annotation object (added by a transpiler or otherwise)
|
|
782
|
+
* indicating filename, line number, and/or other information.
|
|
783
|
+
* @internal
|
|
784
|
+
*/
|
|
785
|
+
|
|
786
|
+
|
|
787
|
+
var ReactElement = function (type, key, ref, self, source, owner, props) {
|
|
788
|
+
var element = {
|
|
789
|
+
// This tag allows us to uniquely identify this as a React Element
|
|
790
|
+
$$typeof: REACT_ELEMENT_TYPE,
|
|
791
|
+
// Built-in properties that belong on the element
|
|
792
|
+
type: type,
|
|
793
|
+
key: key,
|
|
794
|
+
ref: ref,
|
|
795
|
+
props: props,
|
|
796
|
+
// Record the component responsible for creating this element.
|
|
797
|
+
_owner: owner
|
|
798
|
+
};
|
|
799
|
+
|
|
800
|
+
{
|
|
801
|
+
// The validation flag is currently mutative. We put it on
|
|
802
|
+
// an external backing store so that we can freeze the whole object.
|
|
803
|
+
// This can be replaced with a WeakMap once they are implemented in
|
|
804
|
+
// commonly used development environments.
|
|
805
|
+
element._store = {}; // To make comparing ReactElements easier for testing purposes, we make
|
|
806
|
+
// the validation flag non-enumerable (where possible, which should
|
|
807
|
+
// include every environment we run tests in), so the test framework
|
|
808
|
+
// ignores it.
|
|
809
|
+
|
|
810
|
+
Object.defineProperty(element._store, 'validated', {
|
|
811
|
+
configurable: false,
|
|
812
|
+
enumerable: false,
|
|
813
|
+
writable: true,
|
|
814
|
+
value: false
|
|
815
|
+
}); // self and source are DEV only properties.
|
|
816
|
+
|
|
817
|
+
Object.defineProperty(element, '_self', {
|
|
818
|
+
configurable: false,
|
|
819
|
+
enumerable: false,
|
|
820
|
+
writable: false,
|
|
821
|
+
value: self
|
|
822
|
+
}); // Two elements created in two different places should be considered
|
|
823
|
+
// equal for testing purposes and therefore we hide it from enumeration.
|
|
824
|
+
|
|
825
|
+
Object.defineProperty(element, '_source', {
|
|
826
|
+
configurable: false,
|
|
827
|
+
enumerable: false,
|
|
828
|
+
writable: false,
|
|
829
|
+
value: source
|
|
830
|
+
});
|
|
831
|
+
|
|
832
|
+
if (Object.freeze) {
|
|
833
|
+
Object.freeze(element.props);
|
|
834
|
+
Object.freeze(element);
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
return element;
|
|
839
|
+
};
|
|
840
|
+
/**
|
|
841
|
+
* Create and return a new ReactElement of the given type.
|
|
842
|
+
* See https://reactjs.org/docs/react-api.html#createelement
|
|
843
|
+
*/
|
|
844
|
+
|
|
845
|
+
function createElement(type, config, children) {
|
|
846
|
+
var propName; // Reserved names are extracted
|
|
847
|
+
|
|
848
|
+
var props = {};
|
|
849
|
+
var key = null;
|
|
850
|
+
var ref = null;
|
|
851
|
+
var self = null;
|
|
852
|
+
var source = null;
|
|
853
|
+
|
|
854
|
+
if (config != null) {
|
|
855
|
+
if (hasValidRef(config)) {
|
|
856
|
+
ref = config.ref;
|
|
857
|
+
|
|
858
|
+
{
|
|
859
|
+
warnIfStringRefCannotBeAutoConverted(config);
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
if (hasValidKey(config)) {
|
|
864
|
+
{
|
|
865
|
+
checkKeyStringCoercion(config.key);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
key = '' + config.key;
|
|
869
|
+
}
|
|
870
|
+
|
|
871
|
+
self = config.__self === undefined ? null : config.__self;
|
|
872
|
+
source = config.__source === undefined ? null : config.__source; // Remaining properties are added to a new props object
|
|
873
|
+
|
|
874
|
+
for (propName in config) {
|
|
875
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
876
|
+
props[propName] = config[propName];
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
} // Children can be more than one argument, and those are transferred onto
|
|
880
|
+
// the newly allocated props object.
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
var childrenLength = arguments.length - 2;
|
|
884
|
+
|
|
885
|
+
if (childrenLength === 1) {
|
|
886
|
+
props.children = children;
|
|
887
|
+
} else if (childrenLength > 1) {
|
|
888
|
+
var childArray = Array(childrenLength);
|
|
889
|
+
|
|
890
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
891
|
+
childArray[i] = arguments[i + 2];
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
{
|
|
895
|
+
if (Object.freeze) {
|
|
896
|
+
Object.freeze(childArray);
|
|
897
|
+
}
|
|
898
|
+
}
|
|
899
|
+
|
|
900
|
+
props.children = childArray;
|
|
901
|
+
} // Resolve default props
|
|
902
|
+
|
|
903
|
+
|
|
904
|
+
if (type && type.defaultProps) {
|
|
905
|
+
var defaultProps = type.defaultProps;
|
|
906
|
+
|
|
907
|
+
for (propName in defaultProps) {
|
|
908
|
+
if (props[propName] === undefined) {
|
|
909
|
+
props[propName] = defaultProps[propName];
|
|
910
|
+
}
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
|
|
914
|
+
{
|
|
915
|
+
if (key || ref) {
|
|
916
|
+
var displayName = typeof type === 'function' ? type.displayName || type.name || 'Unknown' : type;
|
|
917
|
+
|
|
918
|
+
if (key) {
|
|
919
|
+
defineKeyPropWarningGetter(props, displayName);
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
if (ref) {
|
|
923
|
+
defineRefPropWarningGetter(props, displayName);
|
|
924
|
+
}
|
|
925
|
+
}
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
return ReactElement(type, key, ref, self, source, ReactCurrentOwner.current, props);
|
|
929
|
+
}
|
|
930
|
+
function cloneAndReplaceKey(oldElement, newKey) {
|
|
931
|
+
var newElement = ReactElement(oldElement.type, newKey, oldElement.ref, oldElement._self, oldElement._source, oldElement._owner, oldElement.props);
|
|
932
|
+
return newElement;
|
|
933
|
+
}
|
|
934
|
+
/**
|
|
935
|
+
* Clone and return a new ReactElement using element as the starting point.
|
|
936
|
+
* See https://reactjs.org/docs/react-api.html#cloneelement
|
|
937
|
+
*/
|
|
938
|
+
|
|
939
|
+
function cloneElement(element, config, children) {
|
|
940
|
+
if (element === null || element === undefined) {
|
|
941
|
+
throw new Error("React.cloneElement(...): The argument must be a React element, but you passed " + element + ".");
|
|
942
|
+
}
|
|
943
|
+
|
|
944
|
+
var propName; // Original props are copied
|
|
945
|
+
|
|
946
|
+
var props = assign({}, element.props); // Reserved names are extracted
|
|
947
|
+
|
|
948
|
+
var key = element.key;
|
|
949
|
+
var ref = element.ref; // Self is preserved since the owner is preserved.
|
|
950
|
+
|
|
951
|
+
var self = element._self; // Source is preserved since cloneElement is unlikely to be targeted by a
|
|
952
|
+
// transpiler, and the original source is probably a better indicator of the
|
|
953
|
+
// true owner.
|
|
954
|
+
|
|
955
|
+
var source = element._source; // Owner will be preserved, unless ref is overridden
|
|
956
|
+
|
|
957
|
+
var owner = element._owner;
|
|
958
|
+
|
|
959
|
+
if (config != null) {
|
|
960
|
+
if (hasValidRef(config)) {
|
|
961
|
+
// Silently steal the ref from the parent.
|
|
962
|
+
ref = config.ref;
|
|
963
|
+
owner = ReactCurrentOwner.current;
|
|
964
|
+
}
|
|
965
|
+
|
|
966
|
+
if (hasValidKey(config)) {
|
|
967
|
+
{
|
|
968
|
+
checkKeyStringCoercion(config.key);
|
|
969
|
+
}
|
|
970
|
+
|
|
971
|
+
key = '' + config.key;
|
|
972
|
+
} // Remaining properties override existing props
|
|
973
|
+
|
|
974
|
+
|
|
975
|
+
var defaultProps;
|
|
976
|
+
|
|
977
|
+
if (element.type && element.type.defaultProps) {
|
|
978
|
+
defaultProps = element.type.defaultProps;
|
|
979
|
+
}
|
|
980
|
+
|
|
981
|
+
for (propName in config) {
|
|
982
|
+
if (hasOwnProperty.call(config, propName) && !RESERVED_PROPS.hasOwnProperty(propName)) {
|
|
983
|
+
if (config[propName] === undefined && defaultProps !== undefined) {
|
|
984
|
+
// Resolve default props
|
|
985
|
+
props[propName] = defaultProps[propName];
|
|
986
|
+
} else {
|
|
987
|
+
props[propName] = config[propName];
|
|
988
|
+
}
|
|
989
|
+
}
|
|
990
|
+
}
|
|
991
|
+
} // Children can be more than one argument, and those are transferred onto
|
|
992
|
+
// the newly allocated props object.
|
|
993
|
+
|
|
994
|
+
|
|
995
|
+
var childrenLength = arguments.length - 2;
|
|
996
|
+
|
|
997
|
+
if (childrenLength === 1) {
|
|
998
|
+
props.children = children;
|
|
999
|
+
} else if (childrenLength > 1) {
|
|
1000
|
+
var childArray = Array(childrenLength);
|
|
1001
|
+
|
|
1002
|
+
for (var i = 0; i < childrenLength; i++) {
|
|
1003
|
+
childArray[i] = arguments[i + 2];
|
|
1004
|
+
}
|
|
1005
|
+
|
|
1006
|
+
props.children = childArray;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
return ReactElement(element.type, key, ref, self, source, owner, props);
|
|
1010
|
+
}
|
|
1011
|
+
/**
|
|
1012
|
+
* Verifies the object is a ReactElement.
|
|
1013
|
+
* See https://reactjs.org/docs/react-api.html#isvalidelement
|
|
1014
|
+
* @param {?object} object
|
|
1015
|
+
* @return {boolean} True if `object` is a ReactElement.
|
|
1016
|
+
* @final
|
|
1017
|
+
*/
|
|
1018
|
+
|
|
1019
|
+
function isValidElement(object) {
|
|
1020
|
+
return typeof object === 'object' && object !== null && object.$$typeof === REACT_ELEMENT_TYPE;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
var SEPARATOR = '.';
|
|
1024
|
+
var SUBSEPARATOR = ':';
|
|
1025
|
+
/**
|
|
1026
|
+
* Escape and wrap key so it is safe to use as a reactid
|
|
1027
|
+
*
|
|
1028
|
+
* @param {string} key to be escaped.
|
|
1029
|
+
* @return {string} the escaped key.
|
|
1030
|
+
*/
|
|
1031
|
+
|
|
1032
|
+
function escape(key) {
|
|
1033
|
+
var escapeRegex = /[=:]/g;
|
|
1034
|
+
var escaperLookup = {
|
|
1035
|
+
'=': '=0',
|
|
1036
|
+
':': '=2'
|
|
1037
|
+
};
|
|
1038
|
+
var escapedString = key.replace(escapeRegex, function (match) {
|
|
1039
|
+
return escaperLookup[match];
|
|
1040
|
+
});
|
|
1041
|
+
return '$' + escapedString;
|
|
1042
|
+
}
|
|
1043
|
+
/**
|
|
1044
|
+
* TODO: Test that a single child and an array with one item have the same key
|
|
1045
|
+
* pattern.
|
|
1046
|
+
*/
|
|
1047
|
+
|
|
1048
|
+
|
|
1049
|
+
var didWarnAboutMaps = false;
|
|
1050
|
+
var userProvidedKeyEscapeRegex = /\/+/g;
|
|
1051
|
+
|
|
1052
|
+
function escapeUserProvidedKey(text) {
|
|
1053
|
+
return text.replace(userProvidedKeyEscapeRegex, '$&/');
|
|
1054
|
+
}
|
|
1055
|
+
/**
|
|
1056
|
+
* Generate a key string that identifies a element within a set.
|
|
1057
|
+
*
|
|
1058
|
+
* @param {*} element A element that could contain a manual key.
|
|
1059
|
+
* @param {number} index Index that is used if a manual key is not provided.
|
|
1060
|
+
* @return {string}
|
|
1061
|
+
*/
|
|
1062
|
+
|
|
1063
|
+
|
|
1064
|
+
function getElementKey(element, index) {
|
|
1065
|
+
// Do some typechecking here since we call this blindly. We want to ensure
|
|
1066
|
+
// that we don't block potential future ES APIs.
|
|
1067
|
+
if (typeof element === 'object' && element !== null && element.key != null) {
|
|
1068
|
+
// Explicit key
|
|
1069
|
+
{
|
|
1070
|
+
checkKeyStringCoercion(element.key);
|
|
1071
|
+
}
|
|
1072
|
+
|
|
1073
|
+
return escape('' + element.key);
|
|
1074
|
+
} // Implicit key determined by the index in the set
|
|
1075
|
+
|
|
1076
|
+
|
|
1077
|
+
return index.toString(36);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
function mapIntoArray(children, array, escapedPrefix, nameSoFar, callback) {
|
|
1081
|
+
var type = typeof children;
|
|
1082
|
+
|
|
1083
|
+
if (type === 'undefined' || type === 'boolean') {
|
|
1084
|
+
// All of the above are perceived as null.
|
|
1085
|
+
children = null;
|
|
1086
|
+
}
|
|
1087
|
+
|
|
1088
|
+
var invokeCallback = false;
|
|
1089
|
+
|
|
1090
|
+
if (children === null) {
|
|
1091
|
+
invokeCallback = true;
|
|
1092
|
+
} else {
|
|
1093
|
+
switch (type) {
|
|
1094
|
+
case 'string':
|
|
1095
|
+
case 'number':
|
|
1096
|
+
invokeCallback = true;
|
|
1097
|
+
break;
|
|
1098
|
+
|
|
1099
|
+
case 'object':
|
|
1100
|
+
switch (children.$$typeof) {
|
|
1101
|
+
case REACT_ELEMENT_TYPE:
|
|
1102
|
+
case REACT_PORTAL_TYPE:
|
|
1103
|
+
invokeCallback = true;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
}
|
|
1107
|
+
}
|
|
1108
|
+
|
|
1109
|
+
if (invokeCallback) {
|
|
1110
|
+
var _child = children;
|
|
1111
|
+
var mappedChild = callback(_child); // If it's the only child, treat the name as if it was wrapped in an array
|
|
1112
|
+
// so that it's consistent if the number of children grows:
|
|
1113
|
+
|
|
1114
|
+
var childKey = nameSoFar === '' ? SEPARATOR + getElementKey(_child, 0) : nameSoFar;
|
|
1115
|
+
|
|
1116
|
+
if (isArray(mappedChild)) {
|
|
1117
|
+
var escapedChildKey = '';
|
|
1118
|
+
|
|
1119
|
+
if (childKey != null) {
|
|
1120
|
+
escapedChildKey = escapeUserProvidedKey(childKey) + '/';
|
|
1121
|
+
}
|
|
1122
|
+
|
|
1123
|
+
mapIntoArray(mappedChild, array, escapedChildKey, '', function (c) {
|
|
1124
|
+
return c;
|
|
1125
|
+
});
|
|
1126
|
+
} else if (mappedChild != null) {
|
|
1127
|
+
if (isValidElement(mappedChild)) {
|
|
1128
|
+
{
|
|
1129
|
+
// The `if` statement here prevents auto-disabling of the safe
|
|
1130
|
+
// coercion ESLint rule, so we must manually disable it below.
|
|
1131
|
+
// $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
1132
|
+
if (mappedChild.key && (!_child || _child.key !== mappedChild.key)) {
|
|
1133
|
+
checkKeyStringCoercion(mappedChild.key);
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
mappedChild = cloneAndReplaceKey(mappedChild, // Keep both the (mapped) and old keys if they differ, just as
|
|
1138
|
+
// traverseAllChildren used to do for objects as children
|
|
1139
|
+
escapedPrefix + ( // $FlowFixMe Flow incorrectly thinks React.Portal doesn't have a key
|
|
1140
|
+
mappedChild.key && (!_child || _child.key !== mappedChild.key) ? // $FlowFixMe Flow incorrectly thinks existing element's key can be a number
|
|
1141
|
+
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
1142
|
+
escapeUserProvidedKey('' + mappedChild.key) + '/' : '') + childKey);
|
|
1143
|
+
}
|
|
1144
|
+
|
|
1145
|
+
array.push(mappedChild);
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
return 1;
|
|
1149
|
+
}
|
|
1150
|
+
|
|
1151
|
+
var child;
|
|
1152
|
+
var nextName;
|
|
1153
|
+
var subtreeCount = 0; // Count of children found in the current subtree.
|
|
1154
|
+
|
|
1155
|
+
var nextNamePrefix = nameSoFar === '' ? SEPARATOR : nameSoFar + SUBSEPARATOR;
|
|
1156
|
+
|
|
1157
|
+
if (isArray(children)) {
|
|
1158
|
+
for (var i = 0; i < children.length; i++) {
|
|
1159
|
+
child = children[i];
|
|
1160
|
+
nextName = nextNamePrefix + getElementKey(child, i);
|
|
1161
|
+
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
|
1162
|
+
}
|
|
1163
|
+
} else {
|
|
1164
|
+
var iteratorFn = getIteratorFn(children);
|
|
1165
|
+
|
|
1166
|
+
if (typeof iteratorFn === 'function') {
|
|
1167
|
+
var iterableChildren = children;
|
|
1168
|
+
|
|
1169
|
+
{
|
|
1170
|
+
// Warn about using Maps as children
|
|
1171
|
+
if (iteratorFn === iterableChildren.entries) {
|
|
1172
|
+
if (!didWarnAboutMaps) {
|
|
1173
|
+
warn('Using Maps as children is not supported. ' + 'Use an array of keyed ReactElements instead.');
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
didWarnAboutMaps = true;
|
|
1177
|
+
}
|
|
1178
|
+
}
|
|
1179
|
+
|
|
1180
|
+
var iterator = iteratorFn.call(iterableChildren);
|
|
1181
|
+
var step;
|
|
1182
|
+
var ii = 0;
|
|
1183
|
+
|
|
1184
|
+
while (!(step = iterator.next()).done) {
|
|
1185
|
+
child = step.value;
|
|
1186
|
+
nextName = nextNamePrefix + getElementKey(child, ii++);
|
|
1187
|
+
subtreeCount += mapIntoArray(child, array, escapedPrefix, nextName, callback);
|
|
1188
|
+
}
|
|
1189
|
+
} else if (type === 'object') {
|
|
1190
|
+
// eslint-disable-next-line react-internal/safe-string-coercion
|
|
1191
|
+
var childrenString = String(children);
|
|
1192
|
+
throw new Error("Objects are not valid as a React child (found: " + (childrenString === '[object Object]' ? 'object with keys {' + Object.keys(children).join(', ') + '}' : childrenString) + "). " + 'If you meant to render a collection of children, use an array ' + 'instead.');
|
|
1193
|
+
}
|
|
1194
|
+
}
|
|
1195
|
+
|
|
1196
|
+
return subtreeCount;
|
|
1197
|
+
}
|
|
1198
|
+
|
|
1199
|
+
/**
|
|
1200
|
+
* Maps children that are typically specified as `props.children`.
|
|
1201
|
+
*
|
|
1202
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenmap
|
|
1203
|
+
*
|
|
1204
|
+
* The provided mapFunction(child, index) will be called for each
|
|
1205
|
+
* leaf child.
|
|
1206
|
+
*
|
|
1207
|
+
* @param {?*} children Children tree container.
|
|
1208
|
+
* @param {function(*, int)} func The map function.
|
|
1209
|
+
* @param {*} context Context for mapFunction.
|
|
1210
|
+
* @return {object} Object containing the ordered map of results.
|
|
1211
|
+
*/
|
|
1212
|
+
function mapChildren(children, func, context) {
|
|
1213
|
+
if (children == null) {
|
|
1214
|
+
return children;
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
var result = [];
|
|
1218
|
+
var count = 0;
|
|
1219
|
+
mapIntoArray(children, result, '', '', function (child) {
|
|
1220
|
+
return func.call(context, child, count++);
|
|
1221
|
+
});
|
|
1222
|
+
return result;
|
|
1223
|
+
}
|
|
1224
|
+
/**
|
|
1225
|
+
* Count the number of children that are typically specified as
|
|
1226
|
+
* `props.children`.
|
|
1227
|
+
*
|
|
1228
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrencount
|
|
1229
|
+
*
|
|
1230
|
+
* @param {?*} children Children tree container.
|
|
1231
|
+
* @return {number} The number of children.
|
|
1232
|
+
*/
|
|
1233
|
+
|
|
1234
|
+
|
|
1235
|
+
function countChildren(children) {
|
|
1236
|
+
var n = 0;
|
|
1237
|
+
mapChildren(children, function () {
|
|
1238
|
+
n++; // Don't return anything
|
|
1239
|
+
});
|
|
1240
|
+
return n;
|
|
1241
|
+
}
|
|
1242
|
+
|
|
1243
|
+
/**
|
|
1244
|
+
* Iterates through children that are typically specified as `props.children`.
|
|
1245
|
+
*
|
|
1246
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenforeach
|
|
1247
|
+
*
|
|
1248
|
+
* The provided forEachFunc(child, index) will be called for each
|
|
1249
|
+
* leaf child.
|
|
1250
|
+
*
|
|
1251
|
+
* @param {?*} children Children tree container.
|
|
1252
|
+
* @param {function(*, int)} forEachFunc
|
|
1253
|
+
* @param {*} forEachContext Context for forEachContext.
|
|
1254
|
+
*/
|
|
1255
|
+
function forEachChildren(children, forEachFunc, forEachContext) {
|
|
1256
|
+
mapChildren(children, function () {
|
|
1257
|
+
forEachFunc.apply(this, arguments); // Don't return anything.
|
|
1258
|
+
}, forEachContext);
|
|
1259
|
+
}
|
|
1260
|
+
/**
|
|
1261
|
+
* Flatten a children object (typically specified as `props.children`) and
|
|
1262
|
+
* return an array with appropriately re-keyed children.
|
|
1263
|
+
*
|
|
1264
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrentoarray
|
|
1265
|
+
*/
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
function toArray(children) {
|
|
1269
|
+
return mapChildren(children, function (child) {
|
|
1270
|
+
return child;
|
|
1271
|
+
}) || [];
|
|
1272
|
+
}
|
|
1273
|
+
/**
|
|
1274
|
+
* Returns the first child in a collection of children and verifies that there
|
|
1275
|
+
* is only one child in the collection.
|
|
1276
|
+
*
|
|
1277
|
+
* See https://reactjs.org/docs/react-api.html#reactchildrenonly
|
|
1278
|
+
*
|
|
1279
|
+
* The current implementation of this function assumes that a single child gets
|
|
1280
|
+
* passed without a wrapper, but the purpose of this helper function is to
|
|
1281
|
+
* abstract away the particular structure of children.
|
|
1282
|
+
*
|
|
1283
|
+
* @param {?object} children Child collection structure.
|
|
1284
|
+
* @return {ReactElement} The first and only `ReactElement` contained in the
|
|
1285
|
+
* structure.
|
|
1286
|
+
*/
|
|
1287
|
+
|
|
1288
|
+
|
|
1289
|
+
function onlyChild(children) {
|
|
1290
|
+
if (!isValidElement(children)) {
|
|
1291
|
+
throw new Error('React.Children.only expected to receive a single React element child.');
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
return children;
|
|
1295
|
+
}
|
|
1296
|
+
|
|
1297
|
+
function createContext(defaultValue) {
|
|
1298
|
+
// TODO: Second argument used to be an optional `calculateChangedBits`
|
|
1299
|
+
// function. Warn to reserve for future use?
|
|
1300
|
+
var context = {
|
|
1301
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1302
|
+
// As a workaround to support multiple concurrent renderers, we categorize
|
|
1303
|
+
// some renderers as primary and others as secondary. We only expect
|
|
1304
|
+
// there to be two concurrent renderers at most: React Native (primary) and
|
|
1305
|
+
// Fabric (secondary); React DOM (primary) and React ART (secondary).
|
|
1306
|
+
// Secondary renderers store their context values on separate fields.
|
|
1307
|
+
_currentValue: defaultValue,
|
|
1308
|
+
_currentValue2: defaultValue,
|
|
1309
|
+
// Used to track how many concurrent renderers this context currently
|
|
1310
|
+
// supports within in a single renderer. Such as parallel server rendering.
|
|
1311
|
+
_threadCount: 0,
|
|
1312
|
+
// These are circular
|
|
1313
|
+
Provider: null,
|
|
1314
|
+
Consumer: null,
|
|
1315
|
+
// Add these to use same hidden class in VM as ServerContext
|
|
1316
|
+
_defaultValue: null,
|
|
1317
|
+
_globalName: null
|
|
1318
|
+
};
|
|
1319
|
+
context.Provider = {
|
|
1320
|
+
$$typeof: REACT_PROVIDER_TYPE,
|
|
1321
|
+
_context: context
|
|
1322
|
+
};
|
|
1323
|
+
var hasWarnedAboutUsingNestedContextConsumers = false;
|
|
1324
|
+
var hasWarnedAboutUsingConsumerProvider = false;
|
|
1325
|
+
var hasWarnedAboutDisplayNameOnConsumer = false;
|
|
1326
|
+
|
|
1327
|
+
{
|
|
1328
|
+
// A separate object, but proxies back to the original context object for
|
|
1329
|
+
// backwards compatibility. It has a different $$typeof, so we can properly
|
|
1330
|
+
// warn for the incorrect usage of Context as a Consumer.
|
|
1331
|
+
var Consumer = {
|
|
1332
|
+
$$typeof: REACT_CONTEXT_TYPE,
|
|
1333
|
+
_context: context
|
|
1334
|
+
}; // $FlowFixMe: Flow complains about not setting a value, which is intentional here
|
|
1335
|
+
|
|
1336
|
+
Object.defineProperties(Consumer, {
|
|
1337
|
+
Provider: {
|
|
1338
|
+
get: function () {
|
|
1339
|
+
if (!hasWarnedAboutUsingConsumerProvider) {
|
|
1340
|
+
hasWarnedAboutUsingConsumerProvider = true;
|
|
1341
|
+
|
|
1342
|
+
error('Rendering <Context.Consumer.Provider> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Provider> instead?');
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
return context.Provider;
|
|
1346
|
+
},
|
|
1347
|
+
set: function (_Provider) {
|
|
1348
|
+
context.Provider = _Provider;
|
|
1349
|
+
}
|
|
1350
|
+
},
|
|
1351
|
+
_currentValue: {
|
|
1352
|
+
get: function () {
|
|
1353
|
+
return context._currentValue;
|
|
1354
|
+
},
|
|
1355
|
+
set: function (_currentValue) {
|
|
1356
|
+
context._currentValue = _currentValue;
|
|
1357
|
+
}
|
|
1358
|
+
},
|
|
1359
|
+
_currentValue2: {
|
|
1360
|
+
get: function () {
|
|
1361
|
+
return context._currentValue2;
|
|
1362
|
+
},
|
|
1363
|
+
set: function (_currentValue2) {
|
|
1364
|
+
context._currentValue2 = _currentValue2;
|
|
1365
|
+
}
|
|
1366
|
+
},
|
|
1367
|
+
_threadCount: {
|
|
1368
|
+
get: function () {
|
|
1369
|
+
return context._threadCount;
|
|
1370
|
+
},
|
|
1371
|
+
set: function (_threadCount) {
|
|
1372
|
+
context._threadCount = _threadCount;
|
|
1373
|
+
}
|
|
1374
|
+
},
|
|
1375
|
+
Consumer: {
|
|
1376
|
+
get: function () {
|
|
1377
|
+
if (!hasWarnedAboutUsingNestedContextConsumers) {
|
|
1378
|
+
hasWarnedAboutUsingNestedContextConsumers = true;
|
|
1379
|
+
|
|
1380
|
+
error('Rendering <Context.Consumer.Consumer> is not supported and will be removed in ' + 'a future major release. Did you mean to render <Context.Consumer> instead?');
|
|
1381
|
+
}
|
|
1382
|
+
|
|
1383
|
+
return context.Consumer;
|
|
1384
|
+
}
|
|
1385
|
+
},
|
|
1386
|
+
displayName: {
|
|
1387
|
+
get: function () {
|
|
1388
|
+
return context.displayName;
|
|
1389
|
+
},
|
|
1390
|
+
set: function (displayName) {
|
|
1391
|
+
if (!hasWarnedAboutDisplayNameOnConsumer) {
|
|
1392
|
+
warn('Setting `displayName` on Context.Consumer has no effect. ' + "You should set it directly on the context with Context.displayName = '%s'.", displayName);
|
|
1393
|
+
|
|
1394
|
+
hasWarnedAboutDisplayNameOnConsumer = true;
|
|
1395
|
+
}
|
|
1396
|
+
}
|
|
1397
|
+
}
|
|
1398
|
+
}); // $FlowFixMe: Flow complains about missing properties because it doesn't understand defineProperty
|
|
1399
|
+
|
|
1400
|
+
context.Consumer = Consumer;
|
|
1401
|
+
}
|
|
1402
|
+
|
|
1403
|
+
{
|
|
1404
|
+
context._currentRenderer = null;
|
|
1405
|
+
context._currentRenderer2 = null;
|
|
1406
|
+
}
|
|
1407
|
+
|
|
1408
|
+
return context;
|
|
1409
|
+
}
|
|
1410
|
+
|
|
1411
|
+
var Uninitialized = -1;
|
|
1412
|
+
var Pending = 0;
|
|
1413
|
+
var Resolved = 1;
|
|
1414
|
+
var Rejected = 2;
|
|
1415
|
+
|
|
1416
|
+
function lazyInitializer(payload) {
|
|
1417
|
+
if (payload._status === Uninitialized) {
|
|
1418
|
+
var ctor = payload._result;
|
|
1419
|
+
var thenable = ctor(); // Transition to the next state.
|
|
1420
|
+
// This might throw either because it's missing or throws. If so, we treat it
|
|
1421
|
+
// as still uninitialized and try again next time. Which is the same as what
|
|
1422
|
+
// happens if the ctor or any wrappers processing the ctor throws. This might
|
|
1423
|
+
// end up fixing it if the resolution was a concurrency bug.
|
|
1424
|
+
|
|
1425
|
+
thenable.then(function (moduleObject) {
|
|
1426
|
+
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
1427
|
+
// Transition to the next state.
|
|
1428
|
+
var resolved = payload;
|
|
1429
|
+
resolved._status = Resolved;
|
|
1430
|
+
resolved._result = moduleObject;
|
|
1431
|
+
}
|
|
1432
|
+
}, function (error) {
|
|
1433
|
+
if (payload._status === Pending || payload._status === Uninitialized) {
|
|
1434
|
+
// Transition to the next state.
|
|
1435
|
+
var rejected = payload;
|
|
1436
|
+
rejected._status = Rejected;
|
|
1437
|
+
rejected._result = error;
|
|
1438
|
+
}
|
|
1439
|
+
});
|
|
1440
|
+
|
|
1441
|
+
if (payload._status === Uninitialized) {
|
|
1442
|
+
// In case, we're still uninitialized, then we're waiting for the thenable
|
|
1443
|
+
// to resolve. Set it as pending in the meantime.
|
|
1444
|
+
var pending = payload;
|
|
1445
|
+
pending._status = Pending;
|
|
1446
|
+
pending._result = thenable;
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
|
|
1450
|
+
if (payload._status === Resolved) {
|
|
1451
|
+
var moduleObject = payload._result;
|
|
1452
|
+
|
|
1453
|
+
{
|
|
1454
|
+
if (moduleObject === undefined) {
|
|
1455
|
+
error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
|
|
1456
|
+
'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))\n\n" + 'Did you accidentally put curly braces around the import?', moduleObject);
|
|
1457
|
+
}
|
|
1458
|
+
}
|
|
1459
|
+
|
|
1460
|
+
{
|
|
1461
|
+
if (!('default' in moduleObject)) {
|
|
1462
|
+
error('lazy: Expected the result of a dynamic imp' + 'ort() call. ' + 'Instead received: %s\n\nYour code should look like: \n ' + // Break up imports to avoid accidentally parsing them as dependencies.
|
|
1463
|
+
'const MyComponent = lazy(() => imp' + "ort('./MyComponent'))", moduleObject);
|
|
1464
|
+
}
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1467
|
+
return moduleObject.default;
|
|
1468
|
+
} else {
|
|
1469
|
+
throw payload._result;
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
function lazy(ctor) {
|
|
1474
|
+
var payload = {
|
|
1475
|
+
// We use these fields to store the result.
|
|
1476
|
+
_status: Uninitialized,
|
|
1477
|
+
_result: ctor
|
|
1478
|
+
};
|
|
1479
|
+
var lazyType = {
|
|
1480
|
+
$$typeof: REACT_LAZY_TYPE,
|
|
1481
|
+
_payload: payload,
|
|
1482
|
+
_init: lazyInitializer
|
|
1483
|
+
};
|
|
1484
|
+
|
|
1485
|
+
{
|
|
1486
|
+
// In production, this would just set it on the object.
|
|
1487
|
+
var defaultProps;
|
|
1488
|
+
var propTypes; // $FlowFixMe
|
|
1489
|
+
|
|
1490
|
+
Object.defineProperties(lazyType, {
|
|
1491
|
+
defaultProps: {
|
|
1492
|
+
configurable: true,
|
|
1493
|
+
get: function () {
|
|
1494
|
+
return defaultProps;
|
|
1495
|
+
},
|
|
1496
|
+
set: function (newDefaultProps) {
|
|
1497
|
+
error('React.lazy(...): It is not supported to assign `defaultProps` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
|
1498
|
+
|
|
1499
|
+
defaultProps = newDefaultProps; // Match production behavior more closely:
|
|
1500
|
+
// $FlowFixMe
|
|
1501
|
+
|
|
1502
|
+
Object.defineProperty(lazyType, 'defaultProps', {
|
|
1503
|
+
enumerable: true
|
|
1504
|
+
});
|
|
1505
|
+
}
|
|
1506
|
+
},
|
|
1507
|
+
propTypes: {
|
|
1508
|
+
configurable: true,
|
|
1509
|
+
get: function () {
|
|
1510
|
+
return propTypes;
|
|
1511
|
+
},
|
|
1512
|
+
set: function (newPropTypes) {
|
|
1513
|
+
error('React.lazy(...): It is not supported to assign `propTypes` to ' + 'a lazy component import. Either specify them where the component ' + 'is defined, or create a wrapping component around it.');
|
|
1514
|
+
|
|
1515
|
+
propTypes = newPropTypes; // Match production behavior more closely:
|
|
1516
|
+
// $FlowFixMe
|
|
1517
|
+
|
|
1518
|
+
Object.defineProperty(lazyType, 'propTypes', {
|
|
1519
|
+
enumerable: true
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
}
|
|
1523
|
+
});
|
|
1524
|
+
}
|
|
1525
|
+
|
|
1526
|
+
return lazyType;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1529
|
+
function forwardRef(render) {
|
|
1530
|
+
{
|
|
1531
|
+
if (render != null && render.$$typeof === REACT_MEMO_TYPE) {
|
|
1532
|
+
error('forwardRef requires a render function but received a `memo` ' + 'component. Instead of forwardRef(memo(...)), use ' + 'memo(forwardRef(...)).');
|
|
1533
|
+
} else if (typeof render !== 'function') {
|
|
1534
|
+
error('forwardRef requires a render function but was given %s.', render === null ? 'null' : typeof render);
|
|
1535
|
+
} else {
|
|
1536
|
+
if (render.length !== 0 && render.length !== 2) {
|
|
1537
|
+
error('forwardRef render functions accept exactly two parameters: props and ref. %s', render.length === 1 ? 'Did you forget to use the ref parameter?' : 'Any additional parameter will be undefined.');
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1540
|
+
|
|
1541
|
+
if (render != null) {
|
|
1542
|
+
if (render.defaultProps != null || render.propTypes != null) {
|
|
1543
|
+
error('forwardRef render functions do not support propTypes or defaultProps. ' + 'Did you accidentally pass a React component?');
|
|
1544
|
+
}
|
|
1545
|
+
}
|
|
1546
|
+
}
|
|
1547
|
+
|
|
1548
|
+
var elementType = {
|
|
1549
|
+
$$typeof: REACT_FORWARD_REF_TYPE,
|
|
1550
|
+
render: render
|
|
1551
|
+
};
|
|
1552
|
+
|
|
1553
|
+
{
|
|
1554
|
+
var ownName;
|
|
1555
|
+
Object.defineProperty(elementType, 'displayName', {
|
|
1556
|
+
enumerable: false,
|
|
1557
|
+
configurable: true,
|
|
1558
|
+
get: function () {
|
|
1559
|
+
return ownName;
|
|
1560
|
+
},
|
|
1561
|
+
set: function (name) {
|
|
1562
|
+
ownName = name; // The inner component shouldn't inherit this display name in most cases,
|
|
1563
|
+
// because the component may be used elsewhere.
|
|
1564
|
+
// But it's nice for anonymous functions to inherit the name,
|
|
1565
|
+
// so that our component-stack generation logic will display their frames.
|
|
1566
|
+
// An anonymous function generally suggests a pattern like:
|
|
1567
|
+
// React.forwardRef((props, ref) => {...});
|
|
1568
|
+
// This kind of inner function is not used elsewhere so the side effect is okay.
|
|
1569
|
+
|
|
1570
|
+
if (!render.name && !render.displayName) {
|
|
1571
|
+
render.displayName = name;
|
|
1572
|
+
}
|
|
1573
|
+
}
|
|
1574
|
+
});
|
|
1575
|
+
}
|
|
1576
|
+
|
|
1577
|
+
return elementType;
|
|
1578
|
+
}
|
|
1579
|
+
|
|
1580
|
+
var REACT_MODULE_REFERENCE;
|
|
1581
|
+
|
|
1582
|
+
{
|
|
1583
|
+
REACT_MODULE_REFERENCE = Symbol.for('react.module.reference');
|
|
1584
|
+
}
|
|
1585
|
+
|
|
1586
|
+
function isValidElementType(type) {
|
|
1587
|
+
if (typeof type === 'string' || typeof type === 'function') {
|
|
1588
|
+
return true;
|
|
1589
|
+
} // Note: typeof might be other than 'symbol' or 'number' (e.g. if it's a polyfill).
|
|
1590
|
+
|
|
1591
|
+
|
|
1592
|
+
if (type === REACT_FRAGMENT_TYPE || type === REACT_PROFILER_TYPE || enableDebugTracing || type === REACT_STRICT_MODE_TYPE || type === REACT_SUSPENSE_TYPE || type === REACT_SUSPENSE_LIST_TYPE || enableLegacyHidden || type === REACT_OFFSCREEN_TYPE || enableScopeAPI || enableCacheElement || enableTransitionTracing ) {
|
|
1593
|
+
return true;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
if (typeof type === 'object' && type !== null) {
|
|
1597
|
+
if (type.$$typeof === REACT_LAZY_TYPE || type.$$typeof === REACT_MEMO_TYPE || type.$$typeof === REACT_PROVIDER_TYPE || type.$$typeof === REACT_CONTEXT_TYPE || type.$$typeof === REACT_FORWARD_REF_TYPE || // This needs to include all possible module reference object
|
|
1598
|
+
// types supported by any Flight configuration anywhere since
|
|
1599
|
+
// we don't know which Flight build this will end up being used
|
|
1600
|
+
// with.
|
|
1601
|
+
type.$$typeof === REACT_MODULE_REFERENCE || type.getModuleId !== undefined) {
|
|
1602
|
+
return true;
|
|
1603
|
+
}
|
|
1604
|
+
}
|
|
1605
|
+
|
|
1606
|
+
return false;
|
|
1607
|
+
}
|
|
1608
|
+
|
|
1609
|
+
function memo(type, compare) {
|
|
1610
|
+
{
|
|
1611
|
+
if (!isValidElementType(type)) {
|
|
1612
|
+
error('memo: The first argument must be a component. Instead ' + 'received: %s', type === null ? 'null' : typeof type);
|
|
1613
|
+
}
|
|
1614
|
+
}
|
|
1615
|
+
|
|
1616
|
+
var elementType = {
|
|
1617
|
+
$$typeof: REACT_MEMO_TYPE,
|
|
1618
|
+
type: type,
|
|
1619
|
+
compare: compare === undefined ? null : compare
|
|
1620
|
+
};
|
|
1621
|
+
|
|
1622
|
+
{
|
|
1623
|
+
var ownName;
|
|
1624
|
+
Object.defineProperty(elementType, 'displayName', {
|
|
1625
|
+
enumerable: false,
|
|
1626
|
+
configurable: true,
|
|
1627
|
+
get: function () {
|
|
1628
|
+
return ownName;
|
|
1629
|
+
},
|
|
1630
|
+
set: function (name) {
|
|
1631
|
+
ownName = name; // The inner component shouldn't inherit this display name in most cases,
|
|
1632
|
+
// because the component may be used elsewhere.
|
|
1633
|
+
// But it's nice for anonymous functions to inherit the name,
|
|
1634
|
+
// so that our component-stack generation logic will display their frames.
|
|
1635
|
+
// An anonymous function generally suggests a pattern like:
|
|
1636
|
+
// React.memo((props) => {...});
|
|
1637
|
+
// This kind of inner function is not used elsewhere so the side effect is okay.
|
|
1638
|
+
|
|
1639
|
+
if (!type.name && !type.displayName) {
|
|
1640
|
+
type.displayName = name;
|
|
1641
|
+
}
|
|
1642
|
+
}
|
|
1643
|
+
});
|
|
1644
|
+
}
|
|
1645
|
+
|
|
1646
|
+
return elementType;
|
|
1647
|
+
}
|
|
1648
|
+
|
|
1649
|
+
function resolveDispatcher() {
|
|
1650
|
+
var dispatcher = ReactCurrentDispatcher.current;
|
|
1651
|
+
|
|
1652
|
+
{
|
|
1653
|
+
if (dispatcher === null) {
|
|
1654
|
+
error('Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for' + ' one of the following reasons:\n' + '1. You might have mismatching versions of React and the renderer (such as React DOM)\n' + '2. You might be breaking the Rules of Hooks\n' + '3. You might have more than one copy of React in the same app\n' + 'See https://reactjs.org/link/invalid-hook-call for tips about how to debug and fix this problem.');
|
|
1655
|
+
}
|
|
1656
|
+
} // Will result in a null access error if accessed outside render phase. We
|
|
1657
|
+
// intentionally don't throw our own error because this is in a hot path.
|
|
1658
|
+
// Also helps ensure this is inlined.
|
|
1659
|
+
|
|
1660
|
+
|
|
1661
|
+
return dispatcher;
|
|
1662
|
+
}
|
|
1663
|
+
function useContext(Context) {
|
|
1664
|
+
var dispatcher = resolveDispatcher();
|
|
1665
|
+
|
|
1666
|
+
{
|
|
1667
|
+
// TODO: add a more generic warning for invalid values.
|
|
1668
|
+
if (Context._context !== undefined) {
|
|
1669
|
+
var realContext = Context._context; // Don't deduplicate because this legitimately causes bugs
|
|
1670
|
+
// and nobody should be using this in existing code.
|
|
1671
|
+
|
|
1672
|
+
if (realContext.Consumer === Context) {
|
|
1673
|
+
error('Calling useContext(Context.Consumer) is not supported, may cause bugs, and will be ' + 'removed in a future major release. Did you mean to call useContext(Context) instead?');
|
|
1674
|
+
} else if (realContext.Provider === Context) {
|
|
1675
|
+
error('Calling useContext(Context.Provider) is not supported. ' + 'Did you mean to call useContext(Context) instead?');
|
|
1676
|
+
}
|
|
1677
|
+
}
|
|
1678
|
+
}
|
|
1679
|
+
|
|
1680
|
+
return dispatcher.useContext(Context);
|
|
1681
|
+
}
|
|
1682
|
+
function useState(initialState) {
|
|
1683
|
+
var dispatcher = resolveDispatcher();
|
|
1684
|
+
return dispatcher.useState(initialState);
|
|
1685
|
+
}
|
|
1686
|
+
function useReducer(reducer, initialArg, init) {
|
|
1687
|
+
var dispatcher = resolveDispatcher();
|
|
1688
|
+
return dispatcher.useReducer(reducer, initialArg, init);
|
|
1689
|
+
}
|
|
1690
|
+
function useRef(initialValue) {
|
|
1691
|
+
var dispatcher = resolveDispatcher();
|
|
1692
|
+
return dispatcher.useRef(initialValue);
|
|
1693
|
+
}
|
|
1694
|
+
function useEffect(create, deps) {
|
|
1695
|
+
var dispatcher = resolveDispatcher();
|
|
1696
|
+
return dispatcher.useEffect(create, deps);
|
|
1697
|
+
}
|
|
1698
|
+
function useInsertionEffect(create, deps) {
|
|
1699
|
+
var dispatcher = resolveDispatcher();
|
|
1700
|
+
return dispatcher.useInsertionEffect(create, deps);
|
|
1701
|
+
}
|
|
1702
|
+
function useLayoutEffect(create, deps) {
|
|
1703
|
+
var dispatcher = resolveDispatcher();
|
|
1704
|
+
return dispatcher.useLayoutEffect(create, deps);
|
|
1705
|
+
}
|
|
1706
|
+
function useCallback(callback, deps) {
|
|
1707
|
+
var dispatcher = resolveDispatcher();
|
|
1708
|
+
return dispatcher.useCallback(callback, deps);
|
|
1709
|
+
}
|
|
1710
|
+
function useMemo(create, deps) {
|
|
1711
|
+
var dispatcher = resolveDispatcher();
|
|
1712
|
+
return dispatcher.useMemo(create, deps);
|
|
1713
|
+
}
|
|
1714
|
+
function useImperativeHandle(ref, create, deps) {
|
|
1715
|
+
var dispatcher = resolveDispatcher();
|
|
1716
|
+
return dispatcher.useImperativeHandle(ref, create, deps);
|
|
1717
|
+
}
|
|
1718
|
+
function useDebugValue(value, formatterFn) {
|
|
1719
|
+
{
|
|
1720
|
+
var dispatcher = resolveDispatcher();
|
|
1721
|
+
return dispatcher.useDebugValue(value, formatterFn);
|
|
1722
|
+
}
|
|
1723
|
+
}
|
|
1724
|
+
function useTransition() {
|
|
1725
|
+
var dispatcher = resolveDispatcher();
|
|
1726
|
+
return dispatcher.useTransition();
|
|
1727
|
+
}
|
|
1728
|
+
function useDeferredValue(value) {
|
|
1729
|
+
var dispatcher = resolveDispatcher();
|
|
1730
|
+
return dispatcher.useDeferredValue(value);
|
|
1731
|
+
}
|
|
1732
|
+
function useId() {
|
|
1733
|
+
var dispatcher = resolveDispatcher();
|
|
1734
|
+
return dispatcher.useId();
|
|
1735
|
+
}
|
|
1736
|
+
function useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot) {
|
|
1737
|
+
var dispatcher = resolveDispatcher();
|
|
1738
|
+
return dispatcher.useSyncExternalStore(subscribe, getSnapshot, getServerSnapshot);
|
|
1739
|
+
}
|
|
1740
|
+
|
|
1741
|
+
// Helpers to patch console.logs to avoid logging during side-effect free
|
|
1742
|
+
// replaying on render function. This currently only patches the object
|
|
1743
|
+
// lazily which won't cover if the log function was extracted eagerly.
|
|
1744
|
+
// We could also eagerly patch the method.
|
|
1745
|
+
var disabledDepth = 0;
|
|
1746
|
+
var prevLog;
|
|
1747
|
+
var prevInfo;
|
|
1748
|
+
var prevWarn;
|
|
1749
|
+
var prevError;
|
|
1750
|
+
var prevGroup;
|
|
1751
|
+
var prevGroupCollapsed;
|
|
1752
|
+
var prevGroupEnd;
|
|
1753
|
+
|
|
1754
|
+
function disabledLog() {}
|
|
1755
|
+
|
|
1756
|
+
disabledLog.__reactDisabledLog = true;
|
|
1757
|
+
function disableLogs() {
|
|
1758
|
+
{
|
|
1759
|
+
if (disabledDepth === 0) {
|
|
1760
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
1761
|
+
prevLog = console.log;
|
|
1762
|
+
prevInfo = console.info;
|
|
1763
|
+
prevWarn = console.warn;
|
|
1764
|
+
prevError = console.error;
|
|
1765
|
+
prevGroup = console.group;
|
|
1766
|
+
prevGroupCollapsed = console.groupCollapsed;
|
|
1767
|
+
prevGroupEnd = console.groupEnd; // https://github.com/facebook/react/issues/19099
|
|
1768
|
+
|
|
1769
|
+
var props = {
|
|
1770
|
+
configurable: true,
|
|
1771
|
+
enumerable: true,
|
|
1772
|
+
value: disabledLog,
|
|
1773
|
+
writable: true
|
|
1774
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
1775
|
+
|
|
1776
|
+
Object.defineProperties(console, {
|
|
1777
|
+
info: props,
|
|
1778
|
+
log: props,
|
|
1779
|
+
warn: props,
|
|
1780
|
+
error: props,
|
|
1781
|
+
group: props,
|
|
1782
|
+
groupCollapsed: props,
|
|
1783
|
+
groupEnd: props
|
|
1784
|
+
});
|
|
1785
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
1786
|
+
}
|
|
1787
|
+
|
|
1788
|
+
disabledDepth++;
|
|
1789
|
+
}
|
|
1790
|
+
}
|
|
1791
|
+
function reenableLogs() {
|
|
1792
|
+
{
|
|
1793
|
+
disabledDepth--;
|
|
1794
|
+
|
|
1795
|
+
if (disabledDepth === 0) {
|
|
1796
|
+
/* eslint-disable react-internal/no-production-logging */
|
|
1797
|
+
var props = {
|
|
1798
|
+
configurable: true,
|
|
1799
|
+
enumerable: true,
|
|
1800
|
+
writable: true
|
|
1801
|
+
}; // $FlowFixMe Flow thinks console is immutable.
|
|
1802
|
+
|
|
1803
|
+
Object.defineProperties(console, {
|
|
1804
|
+
log: assign({}, props, {
|
|
1805
|
+
value: prevLog
|
|
1806
|
+
}),
|
|
1807
|
+
info: assign({}, props, {
|
|
1808
|
+
value: prevInfo
|
|
1809
|
+
}),
|
|
1810
|
+
warn: assign({}, props, {
|
|
1811
|
+
value: prevWarn
|
|
1812
|
+
}),
|
|
1813
|
+
error: assign({}, props, {
|
|
1814
|
+
value: prevError
|
|
1815
|
+
}),
|
|
1816
|
+
group: assign({}, props, {
|
|
1817
|
+
value: prevGroup
|
|
1818
|
+
}),
|
|
1819
|
+
groupCollapsed: assign({}, props, {
|
|
1820
|
+
value: prevGroupCollapsed
|
|
1821
|
+
}),
|
|
1822
|
+
groupEnd: assign({}, props, {
|
|
1823
|
+
value: prevGroupEnd
|
|
1824
|
+
})
|
|
1825
|
+
});
|
|
1826
|
+
/* eslint-enable react-internal/no-production-logging */
|
|
1827
|
+
}
|
|
1828
|
+
|
|
1829
|
+
if (disabledDepth < 0) {
|
|
1830
|
+
error('disabledDepth fell below zero. ' + 'This is a bug in React. Please file an issue.');
|
|
1831
|
+
}
|
|
1832
|
+
}
|
|
1833
|
+
}
|
|
1834
|
+
|
|
1835
|
+
var ReactCurrentDispatcher$1 = ReactSharedInternals.ReactCurrentDispatcher;
|
|
1836
|
+
var prefix;
|
|
1837
|
+
function describeBuiltInComponentFrame(name, source, ownerFn) {
|
|
1838
|
+
{
|
|
1839
|
+
if (prefix === undefined) {
|
|
1840
|
+
// Extract the VM specific prefix used by each line.
|
|
1841
|
+
try {
|
|
1842
|
+
throw Error();
|
|
1843
|
+
} catch (x) {
|
|
1844
|
+
var match = x.stack.trim().match(/\n( *(at )?)/);
|
|
1845
|
+
prefix = match && match[1] || '';
|
|
1846
|
+
}
|
|
1847
|
+
} // We use the prefix to ensure our stacks line up with native stack frames.
|
|
1848
|
+
|
|
1849
|
+
|
|
1850
|
+
return '\n' + prefix + name;
|
|
1851
|
+
}
|
|
1852
|
+
}
|
|
1853
|
+
var reentry = false;
|
|
1854
|
+
var componentFrameCache;
|
|
1855
|
+
|
|
1856
|
+
{
|
|
1857
|
+
var PossiblyWeakMap = typeof WeakMap === 'function' ? WeakMap : Map;
|
|
1858
|
+
componentFrameCache = new PossiblyWeakMap();
|
|
1859
|
+
}
|
|
1860
|
+
|
|
1861
|
+
function describeNativeComponentFrame(fn, construct) {
|
|
1862
|
+
// If something asked for a stack inside a fake render, it should get ignored.
|
|
1863
|
+
if ( !fn || reentry) {
|
|
1864
|
+
return '';
|
|
1865
|
+
}
|
|
1866
|
+
|
|
1867
|
+
{
|
|
1868
|
+
var frame = componentFrameCache.get(fn);
|
|
1869
|
+
|
|
1870
|
+
if (frame !== undefined) {
|
|
1871
|
+
return frame;
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
|
|
1875
|
+
var control;
|
|
1876
|
+
reentry = true;
|
|
1877
|
+
var previousPrepareStackTrace = Error.prepareStackTrace; // $FlowFixMe It does accept undefined.
|
|
1878
|
+
|
|
1879
|
+
Error.prepareStackTrace = undefined;
|
|
1880
|
+
var previousDispatcher;
|
|
1881
|
+
|
|
1882
|
+
{
|
|
1883
|
+
previousDispatcher = ReactCurrentDispatcher$1.current; // Set the dispatcher in DEV because this might be call in the render function
|
|
1884
|
+
// for warnings.
|
|
1885
|
+
|
|
1886
|
+
ReactCurrentDispatcher$1.current = null;
|
|
1887
|
+
disableLogs();
|
|
1888
|
+
}
|
|
1889
|
+
|
|
1890
|
+
try {
|
|
1891
|
+
// This should throw.
|
|
1892
|
+
if (construct) {
|
|
1893
|
+
// Something should be setting the props in the constructor.
|
|
1894
|
+
var Fake = function () {
|
|
1895
|
+
throw Error();
|
|
1896
|
+
}; // $FlowFixMe
|
|
1897
|
+
|
|
1898
|
+
|
|
1899
|
+
Object.defineProperty(Fake.prototype, 'props', {
|
|
1900
|
+
set: function () {
|
|
1901
|
+
// We use a throwing setter instead of frozen or non-writable props
|
|
1902
|
+
// because that won't throw in a non-strict mode function.
|
|
1903
|
+
throw Error();
|
|
1904
|
+
}
|
|
1905
|
+
});
|
|
1906
|
+
|
|
1907
|
+
if (typeof Reflect === 'object' && Reflect.construct) {
|
|
1908
|
+
// We construct a different control for this case to include any extra
|
|
1909
|
+
// frames added by the construct call.
|
|
1910
|
+
try {
|
|
1911
|
+
Reflect.construct(Fake, []);
|
|
1912
|
+
} catch (x) {
|
|
1913
|
+
control = x;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
1916
|
+
Reflect.construct(fn, [], Fake);
|
|
1917
|
+
} else {
|
|
1918
|
+
try {
|
|
1919
|
+
Fake.call();
|
|
1920
|
+
} catch (x) {
|
|
1921
|
+
control = x;
|
|
1922
|
+
}
|
|
1923
|
+
|
|
1924
|
+
fn.call(Fake.prototype);
|
|
1925
|
+
}
|
|
1926
|
+
} else {
|
|
1927
|
+
try {
|
|
1928
|
+
throw Error();
|
|
1929
|
+
} catch (x) {
|
|
1930
|
+
control = x;
|
|
1931
|
+
}
|
|
1932
|
+
|
|
1933
|
+
fn();
|
|
1934
|
+
}
|
|
1935
|
+
} catch (sample) {
|
|
1936
|
+
// This is inlined manually because closure doesn't do it for us.
|
|
1937
|
+
if (sample && control && typeof sample.stack === 'string') {
|
|
1938
|
+
// This extracts the first frame from the sample that isn't also in the control.
|
|
1939
|
+
// Skipping one frame that we assume is the frame that calls the two.
|
|
1940
|
+
var sampleLines = sample.stack.split('\n');
|
|
1941
|
+
var controlLines = control.stack.split('\n');
|
|
1942
|
+
var s = sampleLines.length - 1;
|
|
1943
|
+
var c = controlLines.length - 1;
|
|
1944
|
+
|
|
1945
|
+
while (s >= 1 && c >= 0 && sampleLines[s] !== controlLines[c]) {
|
|
1946
|
+
// We expect at least one stack frame to be shared.
|
|
1947
|
+
// Typically this will be the root most one. However, stack frames may be
|
|
1948
|
+
// cut off due to maximum stack limits. In this case, one maybe cut off
|
|
1949
|
+
// earlier than the other. We assume that the sample is longer or the same
|
|
1950
|
+
// and there for cut off earlier. So we should find the root most frame in
|
|
1951
|
+
// the sample somewhere in the control.
|
|
1952
|
+
c--;
|
|
1953
|
+
}
|
|
1954
|
+
|
|
1955
|
+
for (; s >= 1 && c >= 0; s--, c--) {
|
|
1956
|
+
// Next we find the first one that isn't the same which should be the
|
|
1957
|
+
// frame that called our sample function and the control.
|
|
1958
|
+
if (sampleLines[s] !== controlLines[c]) {
|
|
1959
|
+
// In V8, the first line is describing the message but other VMs don't.
|
|
1960
|
+
// If we're about to return the first line, and the control is also on the same
|
|
1961
|
+
// line, that's a pretty good indicator that our sample threw at same line as
|
|
1962
|
+
// the control. I.e. before we entered the sample frame. So we ignore this result.
|
|
1963
|
+
// This can happen if you passed a class to function component, or non-function.
|
|
1964
|
+
if (s !== 1 || c !== 1) {
|
|
1965
|
+
do {
|
|
1966
|
+
s--;
|
|
1967
|
+
c--; // We may still have similar intermediate frames from the construct call.
|
|
1968
|
+
// The next one that isn't the same should be our match though.
|
|
1969
|
+
|
|
1970
|
+
if (c < 0 || sampleLines[s] !== controlLines[c]) {
|
|
1971
|
+
// V8 adds a "new" prefix for native classes. Let's remove it to make it prettier.
|
|
1972
|
+
var _frame = '\n' + sampleLines[s].replace(' at new ', ' at '); // If our component frame is labeled "<anonymous>"
|
|
1973
|
+
// but we have a user-provided "displayName"
|
|
1974
|
+
// splice it in to make the stack more readable.
|
|
1975
|
+
|
|
1976
|
+
|
|
1977
|
+
if (fn.displayName && _frame.includes('<anonymous>')) {
|
|
1978
|
+
_frame = _frame.replace('<anonymous>', fn.displayName);
|
|
1979
|
+
}
|
|
1980
|
+
|
|
1981
|
+
{
|
|
1982
|
+
if (typeof fn === 'function') {
|
|
1983
|
+
componentFrameCache.set(fn, _frame);
|
|
1984
|
+
}
|
|
1985
|
+
} // Return the line we found.
|
|
1986
|
+
|
|
1987
|
+
|
|
1988
|
+
return _frame;
|
|
1989
|
+
}
|
|
1990
|
+
} while (s >= 1 && c >= 0);
|
|
1991
|
+
}
|
|
1992
|
+
|
|
1993
|
+
break;
|
|
1994
|
+
}
|
|
1995
|
+
}
|
|
1996
|
+
}
|
|
1997
|
+
} finally {
|
|
1998
|
+
reentry = false;
|
|
1999
|
+
|
|
2000
|
+
{
|
|
2001
|
+
ReactCurrentDispatcher$1.current = previousDispatcher;
|
|
2002
|
+
reenableLogs();
|
|
2003
|
+
}
|
|
2004
|
+
|
|
2005
|
+
Error.prepareStackTrace = previousPrepareStackTrace;
|
|
2006
|
+
} // Fallback to just using the name if we couldn't make it throw.
|
|
2007
|
+
|
|
2008
|
+
|
|
2009
|
+
var name = fn ? fn.displayName || fn.name : '';
|
|
2010
|
+
var syntheticFrame = name ? describeBuiltInComponentFrame(name) : '';
|
|
2011
|
+
|
|
2012
|
+
{
|
|
2013
|
+
if (typeof fn === 'function') {
|
|
2014
|
+
componentFrameCache.set(fn, syntheticFrame);
|
|
2015
|
+
}
|
|
2016
|
+
}
|
|
2017
|
+
|
|
2018
|
+
return syntheticFrame;
|
|
2019
|
+
}
|
|
2020
|
+
function describeFunctionComponentFrame(fn, source, ownerFn) {
|
|
2021
|
+
{
|
|
2022
|
+
return describeNativeComponentFrame(fn, false);
|
|
2023
|
+
}
|
|
2024
|
+
}
|
|
2025
|
+
|
|
2026
|
+
function shouldConstruct(Component) {
|
|
2027
|
+
var prototype = Component.prototype;
|
|
2028
|
+
return !!(prototype && prototype.isReactComponent);
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2031
|
+
function describeUnknownElementTypeFrameInDEV(type, source, ownerFn) {
|
|
2032
|
+
|
|
2033
|
+
if (type == null) {
|
|
2034
|
+
return '';
|
|
2035
|
+
}
|
|
2036
|
+
|
|
2037
|
+
if (typeof type === 'function') {
|
|
2038
|
+
{
|
|
2039
|
+
return describeNativeComponentFrame(type, shouldConstruct(type));
|
|
2040
|
+
}
|
|
2041
|
+
}
|
|
2042
|
+
|
|
2043
|
+
if (typeof type === 'string') {
|
|
2044
|
+
return describeBuiltInComponentFrame(type);
|
|
2045
|
+
}
|
|
2046
|
+
|
|
2047
|
+
switch (type) {
|
|
2048
|
+
case REACT_SUSPENSE_TYPE:
|
|
2049
|
+
return describeBuiltInComponentFrame('Suspense');
|
|
2050
|
+
|
|
2051
|
+
case REACT_SUSPENSE_LIST_TYPE:
|
|
2052
|
+
return describeBuiltInComponentFrame('SuspenseList');
|
|
2053
|
+
}
|
|
2054
|
+
|
|
2055
|
+
if (typeof type === 'object') {
|
|
2056
|
+
switch (type.$$typeof) {
|
|
2057
|
+
case REACT_FORWARD_REF_TYPE:
|
|
2058
|
+
return describeFunctionComponentFrame(type.render);
|
|
2059
|
+
|
|
2060
|
+
case REACT_MEMO_TYPE:
|
|
2061
|
+
// Memo may contain any component type so we recursively resolve it.
|
|
2062
|
+
return describeUnknownElementTypeFrameInDEV(type.type, source, ownerFn);
|
|
2063
|
+
|
|
2064
|
+
case REACT_LAZY_TYPE:
|
|
2065
|
+
{
|
|
2066
|
+
var lazyComponent = type;
|
|
2067
|
+
var payload = lazyComponent._payload;
|
|
2068
|
+
var init = lazyComponent._init;
|
|
2069
|
+
|
|
2070
|
+
try {
|
|
2071
|
+
// Lazy may contain any component type so we recursively resolve it.
|
|
2072
|
+
return describeUnknownElementTypeFrameInDEV(init(payload), source, ownerFn);
|
|
2073
|
+
} catch (x) {}
|
|
2074
|
+
}
|
|
2075
|
+
}
|
|
2076
|
+
}
|
|
2077
|
+
|
|
2078
|
+
return '';
|
|
2079
|
+
}
|
|
2080
|
+
|
|
2081
|
+
var loggedTypeFailures = {};
|
|
2082
|
+
var ReactDebugCurrentFrame$1 = ReactSharedInternals.ReactDebugCurrentFrame;
|
|
2083
|
+
|
|
2084
|
+
function setCurrentlyValidatingElement(element) {
|
|
2085
|
+
{
|
|
2086
|
+
if (element) {
|
|
2087
|
+
var owner = element._owner;
|
|
2088
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2089
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(stack);
|
|
2090
|
+
} else {
|
|
2091
|
+
ReactDebugCurrentFrame$1.setExtraStackFrame(null);
|
|
2092
|
+
}
|
|
2093
|
+
}
|
|
2094
|
+
}
|
|
2095
|
+
|
|
2096
|
+
function checkPropTypes(typeSpecs, values, location, componentName, element) {
|
|
2097
|
+
{
|
|
2098
|
+
// $FlowFixMe This is okay but Flow doesn't know it.
|
|
2099
|
+
var has = Function.call.bind(hasOwnProperty);
|
|
2100
|
+
|
|
2101
|
+
for (var typeSpecName in typeSpecs) {
|
|
2102
|
+
if (has(typeSpecs, typeSpecName)) {
|
|
2103
|
+
var error$1 = void 0; // Prop type validation may throw. In case they do, we don't want to
|
|
2104
|
+
// fail the render phase where it didn't fail before. So we log it.
|
|
2105
|
+
// After these have been cleaned up, we'll let them throw.
|
|
2106
|
+
|
|
2107
|
+
try {
|
|
2108
|
+
// This is intentionally an invariant that gets caught. It's the same
|
|
2109
|
+
// behavior as without this statement except with a better message.
|
|
2110
|
+
if (typeof typeSpecs[typeSpecName] !== 'function') {
|
|
2111
|
+
// eslint-disable-next-line react-internal/prod-error-codes
|
|
2112
|
+
var err = Error((componentName || 'React class') + ': ' + location + ' type `' + typeSpecName + '` is invalid; ' + 'it must be a function, usually from the `prop-types` package, but received `' + typeof typeSpecs[typeSpecName] + '`.' + 'This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.');
|
|
2113
|
+
err.name = 'Invariant Violation';
|
|
2114
|
+
throw err;
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
error$1 = typeSpecs[typeSpecName](values, typeSpecName, componentName, location, null, 'SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED');
|
|
2118
|
+
} catch (ex) {
|
|
2119
|
+
error$1 = ex;
|
|
2120
|
+
}
|
|
2121
|
+
|
|
2122
|
+
if (error$1 && !(error$1 instanceof Error)) {
|
|
2123
|
+
setCurrentlyValidatingElement(element);
|
|
2124
|
+
|
|
2125
|
+
error('%s: type specification of %s' + ' `%s` is invalid; the type checker ' + 'function must return `null` or an `Error` but returned a %s. ' + 'You may have forgotten to pass an argument to the type checker ' + 'creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and ' + 'shape all require an argument).', componentName || 'React class', location, typeSpecName, typeof error$1);
|
|
2126
|
+
|
|
2127
|
+
setCurrentlyValidatingElement(null);
|
|
2128
|
+
}
|
|
2129
|
+
|
|
2130
|
+
if (error$1 instanceof Error && !(error$1.message in loggedTypeFailures)) {
|
|
2131
|
+
// Only monitor this failure once because there tends to be a lot of the
|
|
2132
|
+
// same error.
|
|
2133
|
+
loggedTypeFailures[error$1.message] = true;
|
|
2134
|
+
setCurrentlyValidatingElement(element);
|
|
2135
|
+
|
|
2136
|
+
error('Failed %s type: %s', location, error$1.message);
|
|
2137
|
+
|
|
2138
|
+
setCurrentlyValidatingElement(null);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
}
|
|
2142
|
+
}
|
|
2143
|
+
}
|
|
2144
|
+
|
|
2145
|
+
function setCurrentlyValidatingElement$1(element) {
|
|
2146
|
+
{
|
|
2147
|
+
if (element) {
|
|
2148
|
+
var owner = element._owner;
|
|
2149
|
+
var stack = describeUnknownElementTypeFrameInDEV(element.type, element._source, owner ? owner.type : null);
|
|
2150
|
+
setExtraStackFrame(stack);
|
|
2151
|
+
} else {
|
|
2152
|
+
setExtraStackFrame(null);
|
|
2153
|
+
}
|
|
2154
|
+
}
|
|
2155
|
+
}
|
|
2156
|
+
|
|
2157
|
+
var propTypesMisspellWarningShown;
|
|
2158
|
+
|
|
2159
|
+
{
|
|
2160
|
+
propTypesMisspellWarningShown = false;
|
|
2161
|
+
}
|
|
2162
|
+
|
|
2163
|
+
function getDeclarationErrorAddendum() {
|
|
2164
|
+
if (ReactCurrentOwner.current) {
|
|
2165
|
+
var name = getComponentNameFromType(ReactCurrentOwner.current.type);
|
|
2166
|
+
|
|
2167
|
+
if (name) {
|
|
2168
|
+
return '\n\nCheck the render method of `' + name + '`.';
|
|
2169
|
+
}
|
|
2170
|
+
}
|
|
2171
|
+
|
|
2172
|
+
return '';
|
|
2173
|
+
}
|
|
2174
|
+
|
|
2175
|
+
function getSourceInfoErrorAddendum(source) {
|
|
2176
|
+
if (source !== undefined) {
|
|
2177
|
+
var fileName = source.fileName.replace(/^.*[\\\/]/, '');
|
|
2178
|
+
var lineNumber = source.lineNumber;
|
|
2179
|
+
return '\n\nCheck your code at ' + fileName + ':' + lineNumber + '.';
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
return '';
|
|
2183
|
+
}
|
|
2184
|
+
|
|
2185
|
+
function getSourceInfoErrorAddendumForProps(elementProps) {
|
|
2186
|
+
if (elementProps !== null && elementProps !== undefined) {
|
|
2187
|
+
return getSourceInfoErrorAddendum(elementProps.__source);
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
return '';
|
|
2191
|
+
}
|
|
2192
|
+
/**
|
|
2193
|
+
* Warn if there's no key explicitly set on dynamic arrays of children or
|
|
2194
|
+
* object keys are not valid. This allows us to keep track of children between
|
|
2195
|
+
* updates.
|
|
2196
|
+
*/
|
|
2197
|
+
|
|
2198
|
+
|
|
2199
|
+
var ownerHasKeyUseWarning = {};
|
|
2200
|
+
|
|
2201
|
+
function getCurrentComponentErrorInfo(parentType) {
|
|
2202
|
+
var info = getDeclarationErrorAddendum();
|
|
2203
|
+
|
|
2204
|
+
if (!info) {
|
|
2205
|
+
var parentName = typeof parentType === 'string' ? parentType : parentType.displayName || parentType.name;
|
|
2206
|
+
|
|
2207
|
+
if (parentName) {
|
|
2208
|
+
info = "\n\nCheck the top-level render call using <" + parentName + ">.";
|
|
2209
|
+
}
|
|
2210
|
+
}
|
|
2211
|
+
|
|
2212
|
+
return info;
|
|
2213
|
+
}
|
|
2214
|
+
/**
|
|
2215
|
+
* Warn if the element doesn't have an explicit key assigned to it.
|
|
2216
|
+
* This element is in an array. The array could grow and shrink or be
|
|
2217
|
+
* reordered. All children that haven't already been validated are required to
|
|
2218
|
+
* have a "key" property assigned to it. Error statuses are cached so a warning
|
|
2219
|
+
* will only be shown once.
|
|
2220
|
+
*
|
|
2221
|
+
* @internal
|
|
2222
|
+
* @param {ReactElement} element Element that requires a key.
|
|
2223
|
+
* @param {*} parentType element's parent's type.
|
|
2224
|
+
*/
|
|
2225
|
+
|
|
2226
|
+
|
|
2227
|
+
function validateExplicitKey(element, parentType) {
|
|
2228
|
+
if (!element._store || element._store.validated || element.key != null) {
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2231
|
+
|
|
2232
|
+
element._store.validated = true;
|
|
2233
|
+
var currentComponentErrorInfo = getCurrentComponentErrorInfo(parentType);
|
|
2234
|
+
|
|
2235
|
+
if (ownerHasKeyUseWarning[currentComponentErrorInfo]) {
|
|
2236
|
+
return;
|
|
2237
|
+
}
|
|
2238
|
+
|
|
2239
|
+
ownerHasKeyUseWarning[currentComponentErrorInfo] = true; // Usually the current owner is the offender, but if it accepts children as a
|
|
2240
|
+
// property, it may be the creator of the child that's responsible for
|
|
2241
|
+
// assigning it a key.
|
|
2242
|
+
|
|
2243
|
+
var childOwner = '';
|
|
2244
|
+
|
|
2245
|
+
if (element && element._owner && element._owner !== ReactCurrentOwner.current) {
|
|
2246
|
+
// Give the component that originally created this child.
|
|
2247
|
+
childOwner = " It was passed a child from " + getComponentNameFromType(element._owner.type) + ".";
|
|
2248
|
+
}
|
|
2249
|
+
|
|
2250
|
+
{
|
|
2251
|
+
setCurrentlyValidatingElement$1(element);
|
|
2252
|
+
|
|
2253
|
+
error('Each child in a list should have a unique "key" prop.' + '%s%s See https://reactjs.org/link/warning-keys for more information.', currentComponentErrorInfo, childOwner);
|
|
2254
|
+
|
|
2255
|
+
setCurrentlyValidatingElement$1(null);
|
|
2256
|
+
}
|
|
2257
|
+
}
|
|
2258
|
+
/**
|
|
2259
|
+
* Ensure that every element either is passed in a static location, in an
|
|
2260
|
+
* array with an explicit keys property defined, or in an object literal
|
|
2261
|
+
* with valid key property.
|
|
2262
|
+
*
|
|
2263
|
+
* @internal
|
|
2264
|
+
* @param {ReactNode} node Statically passed child of any type.
|
|
2265
|
+
* @param {*} parentType node's parent's type.
|
|
2266
|
+
*/
|
|
2267
|
+
|
|
2268
|
+
|
|
2269
|
+
function validateChildKeys(node, parentType) {
|
|
2270
|
+
if (typeof node !== 'object') {
|
|
2271
|
+
return;
|
|
2272
|
+
}
|
|
2273
|
+
|
|
2274
|
+
if (isArray(node)) {
|
|
2275
|
+
for (var i = 0; i < node.length; i++) {
|
|
2276
|
+
var child = node[i];
|
|
2277
|
+
|
|
2278
|
+
if (isValidElement(child)) {
|
|
2279
|
+
validateExplicitKey(child, parentType);
|
|
2280
|
+
}
|
|
2281
|
+
}
|
|
2282
|
+
} else if (isValidElement(node)) {
|
|
2283
|
+
// This element was passed in a valid location.
|
|
2284
|
+
if (node._store) {
|
|
2285
|
+
node._store.validated = true;
|
|
2286
|
+
}
|
|
2287
|
+
} else if (node) {
|
|
2288
|
+
var iteratorFn = getIteratorFn(node);
|
|
2289
|
+
|
|
2290
|
+
if (typeof iteratorFn === 'function') {
|
|
2291
|
+
// Entry iterators used to provide implicit keys,
|
|
2292
|
+
// but now we print a separate warning for them later.
|
|
2293
|
+
if (iteratorFn !== node.entries) {
|
|
2294
|
+
var iterator = iteratorFn.call(node);
|
|
2295
|
+
var step;
|
|
2296
|
+
|
|
2297
|
+
while (!(step = iterator.next()).done) {
|
|
2298
|
+
if (isValidElement(step.value)) {
|
|
2299
|
+
validateExplicitKey(step.value, parentType);
|
|
2300
|
+
}
|
|
2301
|
+
}
|
|
2302
|
+
}
|
|
2303
|
+
}
|
|
2304
|
+
}
|
|
2305
|
+
}
|
|
2306
|
+
/**
|
|
2307
|
+
* Given an element, validate that its props follow the propTypes definition,
|
|
2308
|
+
* provided by the type.
|
|
2309
|
+
*
|
|
2310
|
+
* @param {ReactElement} element
|
|
2311
|
+
*/
|
|
2312
|
+
|
|
2313
|
+
|
|
2314
|
+
function validatePropTypes(element) {
|
|
2315
|
+
{
|
|
2316
|
+
var type = element.type;
|
|
2317
|
+
|
|
2318
|
+
if (type === null || type === undefined || typeof type === 'string') {
|
|
2319
|
+
return;
|
|
2320
|
+
}
|
|
2321
|
+
|
|
2322
|
+
var propTypes;
|
|
2323
|
+
|
|
2324
|
+
if (typeof type === 'function') {
|
|
2325
|
+
propTypes = type.propTypes;
|
|
2326
|
+
} else if (typeof type === 'object' && (type.$$typeof === REACT_FORWARD_REF_TYPE || // Note: Memo only checks outer props here.
|
|
2327
|
+
// Inner props are checked in the reconciler.
|
|
2328
|
+
type.$$typeof === REACT_MEMO_TYPE)) {
|
|
2329
|
+
propTypes = type.propTypes;
|
|
2330
|
+
} else {
|
|
2331
|
+
return;
|
|
2332
|
+
}
|
|
2333
|
+
|
|
2334
|
+
if (propTypes) {
|
|
2335
|
+
// Intentionally inside to avoid triggering lazy initializers:
|
|
2336
|
+
var name = getComponentNameFromType(type);
|
|
2337
|
+
checkPropTypes(propTypes, element.props, 'prop', name, element);
|
|
2338
|
+
} else if (type.PropTypes !== undefined && !propTypesMisspellWarningShown) {
|
|
2339
|
+
propTypesMisspellWarningShown = true; // Intentionally inside to avoid triggering lazy initializers:
|
|
2340
|
+
|
|
2341
|
+
var _name = getComponentNameFromType(type);
|
|
2342
|
+
|
|
2343
|
+
error('Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?', _name || 'Unknown');
|
|
2344
|
+
}
|
|
2345
|
+
|
|
2346
|
+
if (typeof type.getDefaultProps === 'function' && !type.getDefaultProps.isReactClassApproved) {
|
|
2347
|
+
error('getDefaultProps is only used on classic React.createClass ' + 'definitions. Use a static property named `defaultProps` instead.');
|
|
2348
|
+
}
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
/**
|
|
2352
|
+
* Given a fragment, validate that it can only be provided with fragment props
|
|
2353
|
+
* @param {ReactElement} fragment
|
|
2354
|
+
*/
|
|
2355
|
+
|
|
2356
|
+
|
|
2357
|
+
function validateFragmentProps(fragment) {
|
|
2358
|
+
{
|
|
2359
|
+
var keys = Object.keys(fragment.props);
|
|
2360
|
+
|
|
2361
|
+
for (var i = 0; i < keys.length; i++) {
|
|
2362
|
+
var key = keys[i];
|
|
2363
|
+
|
|
2364
|
+
if (key !== 'children' && key !== 'key') {
|
|
2365
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
2366
|
+
|
|
2367
|
+
error('Invalid prop `%s` supplied to `React.Fragment`. ' + 'React.Fragment can only have `key` and `children` props.', key);
|
|
2368
|
+
|
|
2369
|
+
setCurrentlyValidatingElement$1(null);
|
|
2370
|
+
break;
|
|
2371
|
+
}
|
|
2372
|
+
}
|
|
2373
|
+
|
|
2374
|
+
if (fragment.ref !== null) {
|
|
2375
|
+
setCurrentlyValidatingElement$1(fragment);
|
|
2376
|
+
|
|
2377
|
+
error('Invalid attribute `ref` supplied to `React.Fragment`.');
|
|
2378
|
+
|
|
2379
|
+
setCurrentlyValidatingElement$1(null);
|
|
2380
|
+
}
|
|
2381
|
+
}
|
|
2382
|
+
}
|
|
2383
|
+
function createElementWithValidation(type, props, children) {
|
|
2384
|
+
var validType = isValidElementType(type); // We warn in this case but don't throw. We expect the element creation to
|
|
2385
|
+
// succeed and there will likely be errors in render.
|
|
2386
|
+
|
|
2387
|
+
if (!validType) {
|
|
2388
|
+
var info = '';
|
|
2389
|
+
|
|
2390
|
+
if (type === undefined || typeof type === 'object' && type !== null && Object.keys(type).length === 0) {
|
|
2391
|
+
info += ' You likely forgot to export your component from the file ' + "it's defined in, or you might have mixed up default and named imports.";
|
|
2392
|
+
}
|
|
2393
|
+
|
|
2394
|
+
var sourceInfo = getSourceInfoErrorAddendumForProps(props);
|
|
2395
|
+
|
|
2396
|
+
if (sourceInfo) {
|
|
2397
|
+
info += sourceInfo;
|
|
2398
|
+
} else {
|
|
2399
|
+
info += getDeclarationErrorAddendum();
|
|
2400
|
+
}
|
|
2401
|
+
|
|
2402
|
+
var typeString;
|
|
2403
|
+
|
|
2404
|
+
if (type === null) {
|
|
2405
|
+
typeString = 'null';
|
|
2406
|
+
} else if (isArray(type)) {
|
|
2407
|
+
typeString = 'array';
|
|
2408
|
+
} else if (type !== undefined && type.$$typeof === REACT_ELEMENT_TYPE) {
|
|
2409
|
+
typeString = "<" + (getComponentNameFromType(type.type) || 'Unknown') + " />";
|
|
2410
|
+
info = ' Did you accidentally export a JSX literal instead of a component?';
|
|
2411
|
+
} else {
|
|
2412
|
+
typeString = typeof type;
|
|
2413
|
+
}
|
|
2414
|
+
|
|
2415
|
+
{
|
|
2416
|
+
error('React.createElement: type is invalid -- expected a string (for ' + 'built-in components) or a class/function (for composite ' + 'components) but got: %s.%s', typeString, info);
|
|
2417
|
+
}
|
|
2418
|
+
}
|
|
2419
|
+
|
|
2420
|
+
var element = createElement.apply(this, arguments); // The result can be nullish if a mock or a custom function is used.
|
|
2421
|
+
// TODO: Drop this when these are no longer allowed as the type argument.
|
|
2422
|
+
|
|
2423
|
+
if (element == null) {
|
|
2424
|
+
return element;
|
|
2425
|
+
} // Skip key warning if the type isn't valid since our key validation logic
|
|
2426
|
+
// doesn't expect a non-string/function type and can throw confusing errors.
|
|
2427
|
+
// We don't want exception behavior to differ between dev and prod.
|
|
2428
|
+
// (Rendering will throw with a helpful message and as soon as the type is
|
|
2429
|
+
// fixed, the key warnings will appear.)
|
|
2430
|
+
|
|
2431
|
+
|
|
2432
|
+
if (validType) {
|
|
2433
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
2434
|
+
validateChildKeys(arguments[i], type);
|
|
2435
|
+
}
|
|
2436
|
+
}
|
|
2437
|
+
|
|
2438
|
+
if (type === REACT_FRAGMENT_TYPE) {
|
|
2439
|
+
validateFragmentProps(element);
|
|
2440
|
+
} else {
|
|
2441
|
+
validatePropTypes(element);
|
|
2442
|
+
}
|
|
2443
|
+
|
|
2444
|
+
return element;
|
|
2445
|
+
}
|
|
2446
|
+
var didWarnAboutDeprecatedCreateFactory = false;
|
|
2447
|
+
function createFactoryWithValidation(type) {
|
|
2448
|
+
var validatedFactory = createElementWithValidation.bind(null, type);
|
|
2449
|
+
validatedFactory.type = type;
|
|
2450
|
+
|
|
2451
|
+
{
|
|
2452
|
+
if (!didWarnAboutDeprecatedCreateFactory) {
|
|
2453
|
+
didWarnAboutDeprecatedCreateFactory = true;
|
|
2454
|
+
|
|
2455
|
+
warn('React.createFactory() is deprecated and will be removed in ' + 'a future major release. Consider using JSX ' + 'or use React.createElement() directly instead.');
|
|
2456
|
+
} // Legacy hook: remove it
|
|
2457
|
+
|
|
2458
|
+
|
|
2459
|
+
Object.defineProperty(validatedFactory, 'type', {
|
|
2460
|
+
enumerable: false,
|
|
2461
|
+
get: function () {
|
|
2462
|
+
warn('Factory.type is deprecated. Access the class directly ' + 'before passing it to createFactory.');
|
|
2463
|
+
|
|
2464
|
+
Object.defineProperty(this, 'type', {
|
|
2465
|
+
value: type
|
|
2466
|
+
});
|
|
2467
|
+
return type;
|
|
2468
|
+
}
|
|
2469
|
+
});
|
|
2470
|
+
}
|
|
2471
|
+
|
|
2472
|
+
return validatedFactory;
|
|
2473
|
+
}
|
|
2474
|
+
function cloneElementWithValidation(element, props, children) {
|
|
2475
|
+
var newElement = cloneElement.apply(this, arguments);
|
|
2476
|
+
|
|
2477
|
+
for (var i = 2; i < arguments.length; i++) {
|
|
2478
|
+
validateChildKeys(arguments[i], newElement.type);
|
|
2479
|
+
}
|
|
2480
|
+
|
|
2481
|
+
validatePropTypes(newElement);
|
|
2482
|
+
return newElement;
|
|
2483
|
+
}
|
|
2484
|
+
|
|
2485
|
+
function startTransition(scope, options) {
|
|
2486
|
+
var prevTransition = ReactCurrentBatchConfig.transition;
|
|
2487
|
+
ReactCurrentBatchConfig.transition = {};
|
|
2488
|
+
var currentTransition = ReactCurrentBatchConfig.transition;
|
|
2489
|
+
|
|
2490
|
+
{
|
|
2491
|
+
ReactCurrentBatchConfig.transition._updatedFibers = new Set();
|
|
2492
|
+
}
|
|
2493
|
+
|
|
2494
|
+
try {
|
|
2495
|
+
scope();
|
|
2496
|
+
} finally {
|
|
2497
|
+
ReactCurrentBatchConfig.transition = prevTransition;
|
|
2498
|
+
|
|
2499
|
+
{
|
|
2500
|
+
if (prevTransition === null && currentTransition._updatedFibers) {
|
|
2501
|
+
var updatedFibersCount = currentTransition._updatedFibers.size;
|
|
2502
|
+
|
|
2503
|
+
if (updatedFibersCount > 10) {
|
|
2504
|
+
warn('Detected a large number of updates inside startTransition. ' + 'If this is due to a subscription please re-write it to use React provided hooks. ' + 'Otherwise concurrent mode guarantees are off the table.');
|
|
2505
|
+
}
|
|
2506
|
+
|
|
2507
|
+
currentTransition._updatedFibers.clear();
|
|
2508
|
+
}
|
|
2509
|
+
}
|
|
2510
|
+
}
|
|
2511
|
+
}
|
|
2512
|
+
|
|
2513
|
+
var didWarnAboutMessageChannel = false;
|
|
2514
|
+
var enqueueTaskImpl = null;
|
|
2515
|
+
function enqueueTask(task) {
|
|
2516
|
+
if (enqueueTaskImpl === null) {
|
|
2517
|
+
try {
|
|
2518
|
+
// read require off the module object to get around the bundlers.
|
|
2519
|
+
// we don't want them to detect a require and bundle a Node polyfill.
|
|
2520
|
+
var requireString = ('require' + Math.random()).slice(0, 7);
|
|
2521
|
+
var nodeRequire = module && module[requireString]; // assuming we're in node, let's try to get node's
|
|
2522
|
+
// version of setImmediate, bypassing fake timers if any.
|
|
2523
|
+
|
|
2524
|
+
enqueueTaskImpl = nodeRequire.call(module, 'timers').setImmediate;
|
|
2525
|
+
} catch (_err) {
|
|
2526
|
+
// we're in a browser
|
|
2527
|
+
// we can't use regular timers because they may still be faked
|
|
2528
|
+
// so we try MessageChannel+postMessage instead
|
|
2529
|
+
enqueueTaskImpl = function (callback) {
|
|
2530
|
+
{
|
|
2531
|
+
if (didWarnAboutMessageChannel === false) {
|
|
2532
|
+
didWarnAboutMessageChannel = true;
|
|
2533
|
+
|
|
2534
|
+
if (typeof MessageChannel === 'undefined') {
|
|
2535
|
+
error('This browser does not have a MessageChannel implementation, ' + 'so enqueuing tasks via await act(async () => ...) will fail. ' + 'Please file an issue at https://github.com/facebook/react/issues ' + 'if you encounter this warning.');
|
|
2536
|
+
}
|
|
2537
|
+
}
|
|
2538
|
+
}
|
|
2539
|
+
|
|
2540
|
+
var channel = new MessageChannel();
|
|
2541
|
+
channel.port1.onmessage = callback;
|
|
2542
|
+
channel.port2.postMessage(undefined);
|
|
2543
|
+
};
|
|
2544
|
+
}
|
|
2545
|
+
}
|
|
2546
|
+
|
|
2547
|
+
return enqueueTaskImpl(task);
|
|
2548
|
+
}
|
|
2549
|
+
|
|
2550
|
+
var actScopeDepth = 0;
|
|
2551
|
+
var didWarnNoAwaitAct = false;
|
|
2552
|
+
function act(callback) {
|
|
2553
|
+
{
|
|
2554
|
+
// `act` calls can be nested, so we track the depth. This represents the
|
|
2555
|
+
// number of `act` scopes on the stack.
|
|
2556
|
+
var prevActScopeDepth = actScopeDepth;
|
|
2557
|
+
actScopeDepth++;
|
|
2558
|
+
|
|
2559
|
+
if (ReactCurrentActQueue.current === null) {
|
|
2560
|
+
// This is the outermost `act` scope. Initialize the queue. The reconciler
|
|
2561
|
+
// will detect the queue and use it instead of Scheduler.
|
|
2562
|
+
ReactCurrentActQueue.current = [];
|
|
2563
|
+
}
|
|
2564
|
+
|
|
2565
|
+
var prevIsBatchingLegacy = ReactCurrentActQueue.isBatchingLegacy;
|
|
2566
|
+
var result;
|
|
2567
|
+
|
|
2568
|
+
try {
|
|
2569
|
+
// Used to reproduce behavior of `batchedUpdates` in legacy mode. Only
|
|
2570
|
+
// set to `true` while the given callback is executed, not for updates
|
|
2571
|
+
// triggered during an async event, because this is how the legacy
|
|
2572
|
+
// implementation of `act` behaved.
|
|
2573
|
+
ReactCurrentActQueue.isBatchingLegacy = true;
|
|
2574
|
+
result = callback(); // Replicate behavior of original `act` implementation in legacy mode,
|
|
2575
|
+
// which flushed updates immediately after the scope function exits, even
|
|
2576
|
+
// if it's an async function.
|
|
2577
|
+
|
|
2578
|
+
if (!prevIsBatchingLegacy && ReactCurrentActQueue.didScheduleLegacyUpdate) {
|
|
2579
|
+
var queue = ReactCurrentActQueue.current;
|
|
2580
|
+
|
|
2581
|
+
if (queue !== null) {
|
|
2582
|
+
ReactCurrentActQueue.didScheduleLegacyUpdate = false;
|
|
2583
|
+
flushActQueue(queue);
|
|
2584
|
+
}
|
|
2585
|
+
}
|
|
2586
|
+
} catch (error) {
|
|
2587
|
+
popActScope(prevActScopeDepth);
|
|
2588
|
+
throw error;
|
|
2589
|
+
} finally {
|
|
2590
|
+
ReactCurrentActQueue.isBatchingLegacy = prevIsBatchingLegacy;
|
|
2591
|
+
}
|
|
2592
|
+
|
|
2593
|
+
if (result !== null && typeof result === 'object' && typeof result.then === 'function') {
|
|
2594
|
+
var thenableResult = result; // The callback is an async function (i.e. returned a promise). Wait
|
|
2595
|
+
// for it to resolve before exiting the current scope.
|
|
2596
|
+
|
|
2597
|
+
var wasAwaited = false;
|
|
2598
|
+
var thenable = {
|
|
2599
|
+
then: function (resolve, reject) {
|
|
2600
|
+
wasAwaited = true;
|
|
2601
|
+
thenableResult.then(function (returnValue) {
|
|
2602
|
+
popActScope(prevActScopeDepth);
|
|
2603
|
+
|
|
2604
|
+
if (actScopeDepth === 0) {
|
|
2605
|
+
// We've exited the outermost act scope. Recursively flush the
|
|
2606
|
+
// queue until there's no remaining work.
|
|
2607
|
+
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
2608
|
+
} else {
|
|
2609
|
+
resolve(returnValue);
|
|
2610
|
+
}
|
|
2611
|
+
}, function (error) {
|
|
2612
|
+
// The callback threw an error.
|
|
2613
|
+
popActScope(prevActScopeDepth);
|
|
2614
|
+
reject(error);
|
|
2615
|
+
});
|
|
2616
|
+
}
|
|
2617
|
+
};
|
|
2618
|
+
|
|
2619
|
+
{
|
|
2620
|
+
if (!didWarnNoAwaitAct && typeof Promise !== 'undefined') {
|
|
2621
|
+
// eslint-disable-next-line no-undef
|
|
2622
|
+
Promise.resolve().then(function () {}).then(function () {
|
|
2623
|
+
if (!wasAwaited) {
|
|
2624
|
+
didWarnNoAwaitAct = true;
|
|
2625
|
+
|
|
2626
|
+
error('You called act(async () => ...) without await. ' + 'This could lead to unexpected testing behaviour, ' + 'interleaving multiple act calls and mixing their ' + 'scopes. ' + 'You should - await act(async () => ...);');
|
|
2627
|
+
}
|
|
2628
|
+
});
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
|
|
2632
|
+
return thenable;
|
|
2633
|
+
} else {
|
|
2634
|
+
var returnValue = result; // The callback is not an async function. Exit the current scope
|
|
2635
|
+
// immediately, without awaiting.
|
|
2636
|
+
|
|
2637
|
+
popActScope(prevActScopeDepth);
|
|
2638
|
+
|
|
2639
|
+
if (actScopeDepth === 0) {
|
|
2640
|
+
// Exiting the outermost act scope. Flush the queue.
|
|
2641
|
+
var _queue = ReactCurrentActQueue.current;
|
|
2642
|
+
|
|
2643
|
+
if (_queue !== null) {
|
|
2644
|
+
flushActQueue(_queue);
|
|
2645
|
+
ReactCurrentActQueue.current = null;
|
|
2646
|
+
} // Return a thenable. If the user awaits it, we'll flush again in
|
|
2647
|
+
// case additional work was scheduled by a microtask.
|
|
2648
|
+
|
|
2649
|
+
|
|
2650
|
+
var _thenable = {
|
|
2651
|
+
then: function (resolve, reject) {
|
|
2652
|
+
// Confirm we haven't re-entered another `act` scope, in case
|
|
2653
|
+
// the user does something weird like await the thenable
|
|
2654
|
+
// multiple times.
|
|
2655
|
+
if (ReactCurrentActQueue.current === null) {
|
|
2656
|
+
// Recursively flush the queue until there's no remaining work.
|
|
2657
|
+
ReactCurrentActQueue.current = [];
|
|
2658
|
+
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
2659
|
+
} else {
|
|
2660
|
+
resolve(returnValue);
|
|
2661
|
+
}
|
|
2662
|
+
}
|
|
2663
|
+
};
|
|
2664
|
+
return _thenable;
|
|
2665
|
+
} else {
|
|
2666
|
+
// Since we're inside a nested `act` scope, the returned thenable
|
|
2667
|
+
// immediately resolves. The outer scope will flush the queue.
|
|
2668
|
+
var _thenable2 = {
|
|
2669
|
+
then: function (resolve, reject) {
|
|
2670
|
+
resolve(returnValue);
|
|
2671
|
+
}
|
|
2672
|
+
};
|
|
2673
|
+
return _thenable2;
|
|
2674
|
+
}
|
|
2675
|
+
}
|
|
2676
|
+
}
|
|
2677
|
+
}
|
|
2678
|
+
|
|
2679
|
+
function popActScope(prevActScopeDepth) {
|
|
2680
|
+
{
|
|
2681
|
+
if (prevActScopeDepth !== actScopeDepth - 1) {
|
|
2682
|
+
error('You seem to have overlapping act() calls, this is not supported. ' + 'Be sure to await previous act() calls before making a new one. ');
|
|
2683
|
+
}
|
|
2684
|
+
|
|
2685
|
+
actScopeDepth = prevActScopeDepth;
|
|
2686
|
+
}
|
|
2687
|
+
}
|
|
2688
|
+
|
|
2689
|
+
function recursivelyFlushAsyncActWork(returnValue, resolve, reject) {
|
|
2690
|
+
{
|
|
2691
|
+
var queue = ReactCurrentActQueue.current;
|
|
2692
|
+
|
|
2693
|
+
if (queue !== null) {
|
|
2694
|
+
try {
|
|
2695
|
+
flushActQueue(queue);
|
|
2696
|
+
enqueueTask(function () {
|
|
2697
|
+
if (queue.length === 0) {
|
|
2698
|
+
// No additional work was scheduled. Finish.
|
|
2699
|
+
ReactCurrentActQueue.current = null;
|
|
2700
|
+
resolve(returnValue);
|
|
2701
|
+
} else {
|
|
2702
|
+
// Keep flushing work until there's none left.
|
|
2703
|
+
recursivelyFlushAsyncActWork(returnValue, resolve, reject);
|
|
2704
|
+
}
|
|
2705
|
+
});
|
|
2706
|
+
} catch (error) {
|
|
2707
|
+
reject(error);
|
|
2708
|
+
}
|
|
2709
|
+
} else {
|
|
2710
|
+
resolve(returnValue);
|
|
2711
|
+
}
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
|
|
2715
|
+
var isFlushing = false;
|
|
2716
|
+
|
|
2717
|
+
function flushActQueue(queue) {
|
|
2718
|
+
{
|
|
2719
|
+
if (!isFlushing) {
|
|
2720
|
+
// Prevent re-entrance.
|
|
2721
|
+
isFlushing = true;
|
|
2722
|
+
var i = 0;
|
|
2723
|
+
|
|
2724
|
+
try {
|
|
2725
|
+
for (; i < queue.length; i++) {
|
|
2726
|
+
var callback = queue[i];
|
|
2727
|
+
|
|
2728
|
+
do {
|
|
2729
|
+
callback = callback(true);
|
|
2730
|
+
} while (callback !== null);
|
|
2731
|
+
}
|
|
2732
|
+
|
|
2733
|
+
queue.length = 0;
|
|
2734
|
+
} catch (error) {
|
|
2735
|
+
// If something throws, leave the remaining callbacks on the queue.
|
|
2736
|
+
queue = queue.slice(i + 1);
|
|
2737
|
+
throw error;
|
|
2738
|
+
} finally {
|
|
2739
|
+
isFlushing = false;
|
|
2740
|
+
}
|
|
2741
|
+
}
|
|
2742
|
+
}
|
|
2743
|
+
}
|
|
2744
|
+
|
|
2745
|
+
var createElement$1 = createElementWithValidation ;
|
|
2746
|
+
var cloneElement$1 = cloneElementWithValidation ;
|
|
2747
|
+
var createFactory = createFactoryWithValidation ;
|
|
2748
|
+
var Children = {
|
|
2749
|
+
map: mapChildren,
|
|
2750
|
+
forEach: forEachChildren,
|
|
2751
|
+
count: countChildren,
|
|
2752
|
+
toArray: toArray,
|
|
2753
|
+
only: onlyChild
|
|
2754
|
+
};
|
|
2755
|
+
|
|
2756
|
+
exports.Children = Children;
|
|
2757
|
+
exports.Component = Component;
|
|
2758
|
+
exports.Fragment = REACT_FRAGMENT_TYPE;
|
|
2759
|
+
exports.Profiler = REACT_PROFILER_TYPE;
|
|
2760
|
+
exports.PureComponent = PureComponent;
|
|
2761
|
+
exports.StrictMode = REACT_STRICT_MODE_TYPE;
|
|
2762
|
+
exports.Suspense = REACT_SUSPENSE_TYPE;
|
|
2763
|
+
exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = ReactSharedInternals;
|
|
2764
|
+
exports.cloneElement = cloneElement$1;
|
|
2765
|
+
exports.createContext = createContext;
|
|
2766
|
+
exports.createElement = createElement$1;
|
|
2767
|
+
exports.createFactory = createFactory;
|
|
2768
|
+
exports.createRef = createRef;
|
|
2769
|
+
exports.forwardRef = forwardRef;
|
|
2770
|
+
exports.isValidElement = isValidElement;
|
|
2771
|
+
exports.lazy = lazy;
|
|
2772
|
+
exports.memo = memo;
|
|
2773
|
+
exports.startTransition = startTransition;
|
|
2774
|
+
exports.unstable_act = act;
|
|
2775
|
+
exports.useCallback = useCallback;
|
|
2776
|
+
exports.useContext = useContext;
|
|
2777
|
+
exports.useDebugValue = useDebugValue;
|
|
2778
|
+
exports.useDeferredValue = useDeferredValue;
|
|
2779
|
+
exports.useEffect = useEffect;
|
|
2780
|
+
exports.useId = useId;
|
|
2781
|
+
exports.useImperativeHandle = useImperativeHandle;
|
|
2782
|
+
exports.useInsertionEffect = useInsertionEffect;
|
|
2783
|
+
exports.useLayoutEffect = useLayoutEffect;
|
|
2784
|
+
exports.useMemo = useMemo;
|
|
2785
|
+
exports.useReducer = useReducer;
|
|
2786
|
+
exports.useRef = useRef;
|
|
2787
|
+
exports.useState = useState;
|
|
2788
|
+
exports.useSyncExternalStore = useSyncExternalStore;
|
|
2789
|
+
exports.useTransition = useTransition;
|
|
2790
|
+
exports.version = ReactVersion;
|
|
2791
|
+
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
|
|
2792
|
+
if (
|
|
2793
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&
|
|
2794
|
+
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===
|
|
2795
|
+
'function'
|
|
2796
|
+
) {
|
|
2797
|
+
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());
|
|
2798
|
+
}
|
|
2799
|
+
|
|
2800
|
+
})();
|
|
2801
|
+
}
|
|
2802
|
+
} (react_development, react_developmentExports));
|
|
2803
|
+
return react_developmentExports;
|
|
2804
|
+
}
|
|
2805
|
+
|
|
2806
|
+
(function (module) {
|
|
2807
|
+
|
|
2808
|
+
if (process.env.NODE_ENV === 'production') {
|
|
2809
|
+
module.exports = requireReact_production_min();
|
|
2810
|
+
} else {
|
|
2811
|
+
module.exports = requireReact_development();
|
|
2812
|
+
}
|
|
2813
|
+
} (react));
|
|
2814
|
+
|
|
2815
|
+
var React$1 = /*@__PURE__*/getDefaultExportFromCjs(reactExports);
|
|
2816
|
+
|
|
2817
|
+
const theme = {
|
|
2818
|
+
colors: {
|
|
2819
|
+
'white':'#FFFFFF',
|
|
2820
|
+
'black':'#000000',
|
|
2821
|
+
'black-100':'#09101D',
|
|
2822
|
+
|
|
2823
|
+
//neutral
|
|
2824
|
+
'neutral-50':'#F7F9FC',
|
|
2825
|
+
'neutral-100':'#E8EEF7',
|
|
2826
|
+
'neutral-200':'#D2DDEE',
|
|
2827
|
+
'neutral-300':'#BBCCE6',
|
|
2828
|
+
'neutral-400':'#A4BBDD',
|
|
2829
|
+
'neutral-500':'#365B91',
|
|
2830
|
+
'neutral-600':'#29446D',
|
|
2831
|
+
'neutral-700':'#1B2D49',
|
|
2832
|
+
'neutral-800':'#0E1724',
|
|
2833
|
+
'neutral-900':'#070B12',
|
|
2834
|
+
|
|
2835
|
+
//primary
|
|
2836
|
+
'primary-50':'#F5F5FE',
|
|
2837
|
+
'primary-100':'#E2E2FD',
|
|
2838
|
+
'primary-200':'#C6C6FB',
|
|
2839
|
+
'primary-300':'#A9A9F9',
|
|
2840
|
+
'primary-400':'#8C8CF7',
|
|
2841
|
+
'primary-500':'#4040F2',
|
|
2842
|
+
'primary-600':'#0F0FD7',
|
|
2843
|
+
'primary-700':'#0A0A8F',
|
|
2844
|
+
'primary-800':'#050548',
|
|
2845
|
+
'primary-900':'#020224',
|
|
2846
|
+
|
|
2847
|
+
//success
|
|
2848
|
+
'success-50':'#F0FFF7',
|
|
2849
|
+
'success-100':'#D1FEE8',
|
|
2850
|
+
'success-200':'#A3FCD1',
|
|
2851
|
+
'success-300':'#74FBBA',
|
|
2852
|
+
'success-400':'#46F9A3',
|
|
2853
|
+
'success-500':'#06BA63',
|
|
2854
|
+
'success-600':'#058B4A',
|
|
2855
|
+
'success-700':'#035D32',
|
|
2856
|
+
'success-800':'#022F19',
|
|
2857
|
+
'success-900':'#01170C',
|
|
2858
|
+
|
|
2859
|
+
//warning
|
|
2860
|
+
'warning-50':'#FFFAF2',
|
|
2861
|
+
'warning-100':'#FFEFD8',
|
|
2862
|
+
'warning-200':'#FFE0B0',
|
|
2863
|
+
'warning-300':'#FFD089',
|
|
2864
|
+
'warning-400':'#FFC062',
|
|
2865
|
+
'warning-500':'#F89500',
|
|
2866
|
+
'warning-600':'#BA7000',
|
|
2867
|
+
'warning-700':'#7C4A00',
|
|
2868
|
+
'warning-800':'#3E2500',
|
|
2869
|
+
'warning-900':'#1F1300',
|
|
2870
|
+
|
|
2871
|
+
//error
|
|
2872
|
+
'error-50':'#FFF2F2',
|
|
2873
|
+
'error-100':'#FFD8D8',
|
|
2874
|
+
'error-200':'#FFB0B0',
|
|
2875
|
+
'error-300':'#FF8989',
|
|
2876
|
+
'error-400':'#FF6262',
|
|
2877
|
+
'error-500':'#F80000',
|
|
2878
|
+
'error-600':'#BA0000',
|
|
2879
|
+
'error-700':'#7C0000',
|
|
2880
|
+
'error-800':'#3E0000',
|
|
2881
|
+
'error-900':'#1F0000',
|
|
2882
|
+
},
|
|
91
2883
|
};
|
|
92
2884
|
|
|
93
2885
|
const ButtonComp = styled.button`
|
|
@@ -216,9 +3008,32 @@ const ButtonComp = styled.button`
|
|
|
216
3008
|
`;
|
|
217
3009
|
|
|
218
3010
|
const _jsxFileName$$ = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\Button\\Button.tsx";
|
|
3011
|
+
|
|
3012
|
+
|
|
3013
|
+
|
|
3014
|
+
|
|
3015
|
+
|
|
3016
|
+
|
|
3017
|
+
|
|
3018
|
+
|
|
3019
|
+
|
|
3020
|
+
|
|
3021
|
+
|
|
3022
|
+
|
|
3023
|
+
|
|
3024
|
+
|
|
3025
|
+
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
|
|
3030
|
+
|
|
3031
|
+
/**
|
|
3032
|
+
* Solid and Outline buttons
|
|
3033
|
+
*/
|
|
219
3034
|
const Button$1 = (props) => {
|
|
220
3035
|
const {variant, size, disabled,children} = props;
|
|
221
|
-
return React$1.createElement(ButtonComp, { className: `${variant} ${size}`, disabled: disabled, ...props, __self: undefined, __source: {fileName: _jsxFileName$$, lineNumber:
|
|
3036
|
+
return React$1.createElement(ButtonComp, { className: `${variant} ${size}`, disabled: disabled, ...props, __self: undefined, __source: {fileName: _jsxFileName$$, lineNumber: 30}}, children)
|
|
222
3037
|
};
|
|
223
3038
|
|
|
224
3039
|
const Container$b = styled.div`
|
|
@@ -300,40 +3115,43 @@ const TextArea$5 = styled.div`
|
|
|
300
3115
|
|
|
301
3116
|
const _jsxFileName$_ = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\ActionFailed\\ActionFailed.tsx";
|
|
302
3117
|
|
|
3118
|
+
|
|
3119
|
+
/**
|
|
3120
|
+
* Solid button
|
|
3121
|
+
*/
|
|
303
3122
|
const ActionFailed = (props) => {
|
|
304
3123
|
const {subText,headingText} = props;
|
|
305
|
-
|
|
306
3124
|
return (
|
|
307
|
-
React$1.createElement(Container$b, {__self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
308
|
-
, React$1.createElement('span', { className: "mb8", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
309
|
-
, React$1.createElement('svg', { width: "64", height: "64", viewBox: "0 0 64 64" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
310
|
-
, React$1.createElement('g', { clipPath: "url(#clip0_453_10020)", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3125
|
+
React$1.createElement(Container$b, {__self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 12}}
|
|
3126
|
+
, React$1.createElement('span', { className: "mb8", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 13}}
|
|
3127
|
+
, React$1.createElement('svg', { width: "64", height: "64", viewBox: "0 0 64 64" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 14}}
|
|
3128
|
+
, React$1.createElement('g', { clipPath: "url(#clip0_453_10020)", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 15}}
|
|
311
3129
|
, React$1.createElement('path', { fillRule: "evenodd", clipRule: "evenodd",
|
|
312
3130
|
d: "M30.181 8.068C30.781 8.023 31.388 8 32 8C45.246 8 56 18.754 56 32C56 45.246 45.246 56 32 56C18.754 56 8 45.246 8 32C8 31.388 8.02299 30.781 8.06799 30.181C8.92399 40.71 17.751 49 28.5 49C39.814 49 49 39.814 49 28.5C49 17.751 40.71 8.924 30.181 8.068Z" ,
|
|
313
|
-
fill: "#FFD8D8", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3131
|
+
fill: "#FFD8D8", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 16}})
|
|
314
3132
|
, React$1.createElement('path', { fillRule: "evenodd", clipRule: "evenodd",
|
|
315
3133
|
d: "M22.0992 24.9293L39.0697 41.8998C39.8504 42.6805 41.1181 42.6805 41.8987 41.8998C42.6794 41.1192 42.6794 39.8515 41.8987 39.0709L24.9282 22.1003C24.1475 21.3196 22.8798 21.3196 22.0992 22.1003C21.3185 22.8809 21.3185 24.1486 22.0992 24.9293Z" ,
|
|
316
|
-
fill: "#F80000", className: "svg-checkmark", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3134
|
+
fill: "#F80000", className: "svg-checkmark", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 19}})
|
|
317
3135
|
, React$1.createElement('path', { fillRule: "evenodd", clipRule: "evenodd",
|
|
318
3136
|
d: "M39.069 22.1006L22.0984 39.0712C21.3178 39.8519 21.3178 41.1195 22.0985 41.9002C22.8791 42.6808 24.1468 42.6808 24.9274 41.9002L41.898 24.9296C42.6786 24.149 42.6786 22.8813 41.898 22.1006C41.1174 21.32 39.8497 21.32 39.069 22.1006Z" ,
|
|
319
|
-
fill: "#F80000", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3137
|
+
fill: "#F80000", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 22}})
|
|
320
3138
|
, React$1.createElement('path', { fillRule: "evenodd", clipRule: "evenodd",
|
|
321
3139
|
d: "M47.5567 47.5561C38.9713 56.1415 25.0299 56.1415 16.4445 47.5561C7.85911 38.9707 7.85912 25.0294 16.4445 16.444C25.0299 7.85855 38.9713 7.85853 47.5567 16.4439C54.3245 23.2118 55.7585 33.3076 51.8562 41.4848C51.3801 42.4819 51.8035 43.6758 52.7988 44.1518C53.795 44.627 54.9906 44.2035 55.4658 43.2074C60.0767 33.5443 58.3839 21.6132 50.3856 13.615C40.2389 3.46826 23.7622 3.46825 13.6155 13.6149C3.46882 23.7616 3.46883 40.2384 13.6155 50.3851C23.7622 60.5318 40.2389 60.5318 50.3856 50.3851C51.1663 49.6044 51.1663 48.3367 50.3856 47.5561C49.605 46.7754 48.3373 46.7754 47.5567 47.5561Z" ,
|
|
322
|
-
fill: "#F80000", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3140
|
+
fill: "#F80000", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 25}})
|
|
323
3141
|
)
|
|
324
|
-
, React$1.createElement('defs', {__self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
325
|
-
, React$1.createElement('clipPath', { id: "clip0_453_10020", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
326
|
-
, React$1.createElement('rect', { width: "64", height: "64", fill: "white", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3142
|
+
, React$1.createElement('defs', {__self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 29}}
|
|
3143
|
+
, React$1.createElement('clipPath', { id: "clip0_453_10020", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 30}}
|
|
3144
|
+
, React$1.createElement('rect', { width: "64", height: "64", fill: "white", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 31}})
|
|
327
3145
|
)
|
|
328
3146
|
)
|
|
329
3147
|
)
|
|
330
3148
|
)
|
|
331
|
-
, React$1.createElement(TextArea$5, {__self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3149
|
+
, React$1.createElement(TextArea$5, {__self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 36}}
|
|
332
3150
|
, headingText &&
|
|
333
|
-
React$1.createElement('h3', { className: "heading-text", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3151
|
+
React$1.createElement('h3', { className: "heading-text", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 38}}, headingText)
|
|
334
3152
|
|
|
335
3153
|
, subText &&
|
|
336
|
-
React$1.createElement('p', { className: "sub-text", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber:
|
|
3154
|
+
React$1.createElement('p', { className: "sub-text", __self: undefined, __source: {fileName: _jsxFileName$_, lineNumber: 41}}, subText)
|
|
337
3155
|
|
|
338
3156
|
)
|
|
339
3157
|
)
|
|
@@ -577,7 +3395,7 @@ const _jsxFileName$Y = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
577
3395
|
|
|
578
3396
|
const Pagination = (props) => {
|
|
579
3397
|
const {itemsPerPage,totalItems,returnedPageNum,currPageNum} = props;
|
|
580
|
-
const [pageNum,setPageNum] =
|
|
3398
|
+
const [pageNum,setPageNum] = reactExports.useState(1);
|
|
581
3399
|
|
|
582
3400
|
const pageNumbers = [];
|
|
583
3401
|
|
|
@@ -585,7 +3403,7 @@ const Pagination = (props) => {
|
|
|
585
3403
|
pageNumbers.push(i);
|
|
586
3404
|
}
|
|
587
3405
|
|
|
588
|
-
|
|
3406
|
+
reactExports.useEffect(()=>{
|
|
589
3407
|
setPageNum(currPageNum);
|
|
590
3408
|
},[currPageNum]);
|
|
591
3409
|
|
|
@@ -638,14 +3456,14 @@ const Pagination = (props) => {
|
|
|
638
3456
|
const _jsxFileName$X = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\AppActionsTable\\AppActionsTable.tsx";
|
|
639
3457
|
const AppActionsTable = (props) => {
|
|
640
3458
|
const {actions,callback,srchActive} = props;
|
|
641
|
-
const [currentPage,setCurrentPage] =
|
|
642
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
643
|
-
const [dispActions,setDispActions] =
|
|
644
|
-
const [dispActionsOri,setDispActionsOri] =
|
|
645
|
-
const [displayContent,setDisplayContent] =
|
|
646
|
-
const [sortDir,setSortDir] =
|
|
647
|
-
|
|
648
|
-
|
|
3459
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
3460
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
3461
|
+
const [dispActions,setDispActions] = reactExports.useState([]);
|
|
3462
|
+
const [dispActionsOri,setDispActionsOri] = reactExports.useState(actions);
|
|
3463
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
3464
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
3465
|
+
|
|
3466
|
+
reactExports.useEffect(()=>{
|
|
649
3467
|
//pagination
|
|
650
3468
|
if (dispActionsOri.length > 0){
|
|
651
3469
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -658,14 +3476,14 @@ const AppActionsTable = (props) => {
|
|
|
658
3476
|
setDisplayContent(true);
|
|
659
3477
|
},[dispActionsOri,currentPage]);
|
|
660
3478
|
|
|
661
|
-
|
|
3479
|
+
reactExports.useEffect(()=>{
|
|
662
3480
|
setDispActionsOri(actions.sort((a,b) => {
|
|
663
3481
|
if(a.title < b.title) return -1
|
|
664
3482
|
return 1
|
|
665
3483
|
}));
|
|
666
3484
|
},[actions]);
|
|
667
3485
|
|
|
668
|
-
|
|
3486
|
+
reactExports.useEffect(()=>{
|
|
669
3487
|
if (srchActive) setCurrentPage(1);
|
|
670
3488
|
},[srchActive]);
|
|
671
3489
|
|
|
@@ -853,14 +3671,14 @@ const NothingContent$9 = styled.div`
|
|
|
853
3671
|
const _jsxFileName$W = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\AppFormsTable\\AppFormsTable.tsx";
|
|
854
3672
|
const AppFormsTable = (props) => {
|
|
855
3673
|
const {forms,callback,srchActive} = props;
|
|
856
|
-
const [currentPage,setCurrentPage] =
|
|
857
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
858
|
-
const [dispForms,setDispForms] =
|
|
859
|
-
const [dispFormsOri,setDispFormsOri] =
|
|
860
|
-
const [displayContent,setDisplayContent] =
|
|
861
|
-
const [sortDir,setSortDir] =
|
|
862
|
-
|
|
863
|
-
|
|
3674
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
3675
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
3676
|
+
const [dispForms,setDispForms] = reactExports.useState([]);
|
|
3677
|
+
const [dispFormsOri,setDispFormsOri] = reactExports.useState(forms);
|
|
3678
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
3679
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
3680
|
+
|
|
3681
|
+
reactExports.useEffect(()=>{
|
|
864
3682
|
//pagination
|
|
865
3683
|
if (dispFormsOri.length > 0){
|
|
866
3684
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -873,14 +3691,14 @@ const AppFormsTable = (props) => {
|
|
|
873
3691
|
setDisplayContent(true);
|
|
874
3692
|
},[dispFormsOri,currentPage]);
|
|
875
3693
|
|
|
876
|
-
|
|
3694
|
+
reactExports.useEffect(()=>{
|
|
877
3695
|
setDispFormsOri(forms.sort((a,b) => {
|
|
878
3696
|
if(a.formName < b.formName) return -1
|
|
879
3697
|
return 1
|
|
880
3698
|
}));
|
|
881
3699
|
},[forms]);
|
|
882
3700
|
|
|
883
|
-
|
|
3701
|
+
reactExports.useEffect(()=>{
|
|
884
3702
|
if (srchActive) setCurrentPage(1);
|
|
885
3703
|
},[srchActive]);
|
|
886
3704
|
|
|
@@ -1063,14 +3881,14 @@ const NothingContent$8 = styled.div`
|
|
|
1063
3881
|
const _jsxFileName$V = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\AppModulesTable\\AppModulesTable.tsx";
|
|
1064
3882
|
const AppModulesTable = (props) => {
|
|
1065
3883
|
const {modules,callback,srchActive} = props;
|
|
1066
|
-
const [currentPage,setCurrentPage] =
|
|
1067
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
1068
|
-
const [dispModules,setDispModules] =
|
|
1069
|
-
const [dispModulesOri,setDispModulesOri] =
|
|
1070
|
-
const [displayContent,setDisplayContent] =
|
|
1071
|
-
const [sortDir,setSortDir] =
|
|
1072
|
-
|
|
1073
|
-
|
|
3884
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
3885
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
3886
|
+
const [dispModules,setDispModules] = reactExports.useState([]);
|
|
3887
|
+
const [dispModulesOri,setDispModulesOri] = reactExports.useState(modules);
|
|
3888
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
3889
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
3890
|
+
|
|
3891
|
+
reactExports.useEffect(()=>{
|
|
1074
3892
|
//pagination
|
|
1075
3893
|
if (dispModulesOri.length > 0){
|
|
1076
3894
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -1083,14 +3901,14 @@ const AppModulesTable = (props) => {
|
|
|
1083
3901
|
setDisplayContent(true);
|
|
1084
3902
|
},[dispModulesOri,currentPage]);
|
|
1085
3903
|
|
|
1086
|
-
|
|
3904
|
+
reactExports.useEffect(()=>{
|
|
1087
3905
|
setDispModulesOri(modules.sort((a,b) => {
|
|
1088
3906
|
if(a.moduleName < b.moduleName) return -1
|
|
1089
3907
|
return 1
|
|
1090
3908
|
}));
|
|
1091
3909
|
},[modules]);
|
|
1092
3910
|
|
|
1093
|
-
|
|
3911
|
+
reactExports.useEffect(()=>{
|
|
1094
3912
|
if (srchActive) setCurrentPage(1);
|
|
1095
3913
|
},[srchActive]);
|
|
1096
3914
|
|
|
@@ -1544,8 +4362,8 @@ const Loader = (props) => {
|
|
|
1544
4362
|
const _jsxFileName$R = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\BankAccounts\\BankAccounts.tsx";
|
|
1545
4363
|
const BankAccounts = (props) => {
|
|
1546
4364
|
const {acctDets,loading} = props;
|
|
1547
|
-
const [acctBtnNum,setAcctBtnNum] =
|
|
1548
|
-
const [clickedBtn,setClickedBtn] =
|
|
4365
|
+
const [acctBtnNum,setAcctBtnNum] = reactExports.useState(null); //index of the account whose button was clicked. Used to trigger the loading spinner for that account
|
|
4366
|
+
const [clickedBtn,setClickedBtn] = reactExports.useState(null);
|
|
1549
4367
|
|
|
1550
4368
|
return (
|
|
1551
4369
|
React$1.createElement(BankAcctsWrapper, {__self: undefined, __source: {fileName: _jsxFileName$R, lineNumber: 15}}
|
|
@@ -1679,7 +4497,7 @@ const _jsxFileName$Q = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
1679
4497
|
|
|
1680
4498
|
const BankSelector = (props) => {
|
|
1681
4499
|
const {bankAcct,selectedBank} = props;
|
|
1682
|
-
const [selIndex,setSelIndex] =
|
|
4500
|
+
const [selIndex,setSelIndex] = reactExports.useState(null);
|
|
1683
4501
|
|
|
1684
4502
|
return (
|
|
1685
4503
|
React$1.createElement(MapContainer, {__self: undefined, __source: {fileName: _jsxFileName$Q, lineNumber: 10}}
|
|
@@ -1884,14 +4702,14 @@ const BrokerCountry = styled.div`
|
|
|
1884
4702
|
const _jsxFileName$O = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\BrokersTable\\BrokersTable.tsx";
|
|
1885
4703
|
const BrokersTable = (props) => {
|
|
1886
4704
|
const {brokers,callback,srchActive} = props;
|
|
1887
|
-
const [currentPage,setCurrentPage] =
|
|
1888
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
1889
|
-
const [dispBrokers,setDispBrokers] =
|
|
1890
|
-
const [dispBrokersOri,setDispBrokersOri] =
|
|
1891
|
-
const [displayContent,setDisplayContent] =
|
|
1892
|
-
const [sortDir,setSortDir] =
|
|
1893
|
-
|
|
1894
|
-
|
|
4705
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
4706
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
4707
|
+
const [dispBrokers,setDispBrokers] = reactExports.useState([]);
|
|
4708
|
+
const [dispBrokersOri,setDispBrokersOri] = reactExports.useState(brokers);
|
|
4709
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
4710
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
4711
|
+
|
|
4712
|
+
reactExports.useEffect(()=>{
|
|
1895
4713
|
//pagination
|
|
1896
4714
|
if (dispBrokersOri.length > 0){
|
|
1897
4715
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -1904,14 +4722,14 @@ const BrokersTable = (props) => {
|
|
|
1904
4722
|
setDisplayContent(true);
|
|
1905
4723
|
},[dispBrokersOri,currentPage]);
|
|
1906
4724
|
|
|
1907
|
-
|
|
4725
|
+
reactExports.useEffect(()=>{
|
|
1908
4726
|
setDispBrokersOri(brokers.sort((a,b) => {
|
|
1909
4727
|
if(a.name < b.name) return -1
|
|
1910
4728
|
return 1
|
|
1911
4729
|
}));
|
|
1912
4730
|
},[brokers]);
|
|
1913
4731
|
|
|
1914
|
-
|
|
4732
|
+
reactExports.useEffect(()=>{
|
|
1915
4733
|
if (srchActive) setCurrentPage(1);
|
|
1916
4734
|
},[srchActive]);
|
|
1917
4735
|
|
|
@@ -15427,8 +18245,8 @@ function cloneData(data) {
|
|
|
15427
18245
|
|
|
15428
18246
|
function ChartComponent(param, ref) {
|
|
15429
18247
|
let { height =150 , width =300 , redraw =false , datasetIdKey , type , data , options , plugins =[] , fallbackContent , updateMode , ...props } = param;
|
|
15430
|
-
const canvasRef =
|
|
15431
|
-
const chartRef =
|
|
18248
|
+
const canvasRef = reactExports.useRef(null);
|
|
18249
|
+
const chartRef = reactExports.useRef();
|
|
15432
18250
|
const renderChart = ()=>{
|
|
15433
18251
|
if (!canvasRef.current) return;
|
|
15434
18252
|
chartRef.current = new Chart$2(canvasRef.current, {
|
|
@@ -15448,7 +18266,7 @@ function ChartComponent(param, ref) {
|
|
|
15448
18266
|
chartRef.current = null;
|
|
15449
18267
|
}
|
|
15450
18268
|
};
|
|
15451
|
-
|
|
18269
|
+
reactExports.useEffect(()=>{
|
|
15452
18270
|
if (!redraw && chartRef.current && options) {
|
|
15453
18271
|
setOptions(chartRef.current, options);
|
|
15454
18272
|
}
|
|
@@ -15456,7 +18274,7 @@ function ChartComponent(param, ref) {
|
|
|
15456
18274
|
redraw,
|
|
15457
18275
|
options
|
|
15458
18276
|
]);
|
|
15459
|
-
|
|
18277
|
+
reactExports.useEffect(()=>{
|
|
15460
18278
|
if (!redraw && chartRef.current) {
|
|
15461
18279
|
setLabels(chartRef.current.config.data, data.labels);
|
|
15462
18280
|
}
|
|
@@ -15464,7 +18282,7 @@ function ChartComponent(param, ref) {
|
|
|
15464
18282
|
redraw,
|
|
15465
18283
|
data.labels
|
|
15466
18284
|
]);
|
|
15467
|
-
|
|
18285
|
+
reactExports.useEffect(()=>{
|
|
15468
18286
|
if (!redraw && chartRef.current && data.datasets) {
|
|
15469
18287
|
setDatasets(chartRef.current.config.data, data.datasets, datasetIdKey);
|
|
15470
18288
|
}
|
|
@@ -15472,7 +18290,7 @@ function ChartComponent(param, ref) {
|
|
|
15472
18290
|
redraw,
|
|
15473
18291
|
data.datasets
|
|
15474
18292
|
]);
|
|
15475
|
-
|
|
18293
|
+
reactExports.useEffect(()=>{
|
|
15476
18294
|
if (!chartRef.current) return;
|
|
15477
18295
|
if (redraw) {
|
|
15478
18296
|
destroyChart();
|
|
@@ -15487,14 +18305,14 @@ function ChartComponent(param, ref) {
|
|
|
15487
18305
|
data.datasets,
|
|
15488
18306
|
updateMode
|
|
15489
18307
|
]);
|
|
15490
|
-
|
|
18308
|
+
reactExports.useEffect(()=>{
|
|
15491
18309
|
if (!chartRef.current) return;
|
|
15492
18310
|
destroyChart();
|
|
15493
18311
|
setTimeout(renderChart);
|
|
15494
18312
|
}, [
|
|
15495
18313
|
type
|
|
15496
18314
|
]);
|
|
15497
|
-
|
|
18315
|
+
reactExports.useEffect(()=>{
|
|
15498
18316
|
renderChart();
|
|
15499
18317
|
return ()=>destroyChart()
|
|
15500
18318
|
;
|
|
@@ -15506,11 +18324,11 @@ function ChartComponent(param, ref) {
|
|
|
15506
18324
|
width: width
|
|
15507
18325
|
}, props), fallbackContent));
|
|
15508
18326
|
}
|
|
15509
|
-
const Chart$1 = /*#__PURE__*/
|
|
18327
|
+
const Chart$1 = /*#__PURE__*/ reactExports.forwardRef(ChartComponent);
|
|
15510
18328
|
|
|
15511
18329
|
function createTypedChart(type, registerables) {
|
|
15512
18330
|
Chart$2.register(registerables);
|
|
15513
|
-
return(/*#__PURE__*/
|
|
18331
|
+
return(/*#__PURE__*/ reactExports.forwardRef((props, ref)=>/*#__PURE__*/ React$1.createElement(Chart$1, Object.assign({}, props, {
|
|
15514
18332
|
ref: ref,
|
|
15515
18333
|
type: type
|
|
15516
18334
|
}))
|
|
@@ -15518,8 +18336,6 @@ function createTypedChart(type, registerables) {
|
|
|
15518
18336
|
}
|
|
15519
18337
|
const Line = /* #__PURE__ */ createTypedChart('line', LineController);
|
|
15520
18338
|
|
|
15521
|
-
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
15522
|
-
|
|
15523
18339
|
var dayjs_minExports = {};
|
|
15524
18340
|
var dayjs_min = {
|
|
15525
18341
|
get exports(){ return dayjs_minExports; },
|
|
@@ -15632,9 +18448,9 @@ const _jsxFileName$N = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
15632
18448
|
|
|
15633
18449
|
const Chart = (props) => {
|
|
15634
18450
|
const {ratesData,exchCurrFlag,baseCurrCode,exchCurrName,exchCurrCode} = props;
|
|
15635
|
-
const [graphData,setGraphData] =
|
|
18451
|
+
const [graphData,setGraphData] = reactExports.useState({});
|
|
15636
18452
|
|
|
15637
|
-
const [change,setChange] =
|
|
18453
|
+
const [change,setChange] = reactExports.useState(0);
|
|
15638
18454
|
|
|
15639
18455
|
//generate graph colour based on performance of the currency
|
|
15640
18456
|
const performanceColor = (rateChange) => {
|
|
@@ -15656,7 +18472,7 @@ const Chart = (props) => {
|
|
|
15656
18472
|
}
|
|
15657
18473
|
};
|
|
15658
18474
|
|
|
15659
|
-
|
|
18475
|
+
reactExports.useEffect(()=>{
|
|
15660
18476
|
let curr = {
|
|
15661
18477
|
dates:[],
|
|
15662
18478
|
data:[],
|
|
@@ -15870,9 +18686,9 @@ const _jsxFileName$M = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
15870
18686
|
|
|
15871
18687
|
const ChartMedium = (props) => {
|
|
15872
18688
|
const {ratesData,exchCurrFlag,baseCurrCode,exchCurrName,exchCurrCode} = props;
|
|
15873
|
-
const [graphData,setGraphData] =
|
|
18689
|
+
const [graphData,setGraphData] = reactExports.useState({});
|
|
15874
18690
|
|
|
15875
|
-
const [change,setChange] =
|
|
18691
|
+
const [change,setChange] = reactExports.useState(0);
|
|
15876
18692
|
|
|
15877
18693
|
//generate graph colour based on performance of the currency
|
|
15878
18694
|
const performanceColor = (rateChange) => {
|
|
@@ -15894,7 +18710,7 @@ const ChartMedium = (props) => {
|
|
|
15894
18710
|
}
|
|
15895
18711
|
};
|
|
15896
18712
|
|
|
15897
|
-
|
|
18713
|
+
reactExports.useEffect(()=>{
|
|
15898
18714
|
let curr = {
|
|
15899
18715
|
dates:[],
|
|
15900
18716
|
data:[],
|
|
@@ -16107,9 +18923,9 @@ const _jsxFileName$L = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
16107
18923
|
|
|
16108
18924
|
const ChartSmall = (props) => {
|
|
16109
18925
|
const {ratesData,exchCurrFlag,baseCurrCode,exchCurrName,exchCurrCode} = props;
|
|
16110
|
-
const [graphData,setGraphData] =
|
|
18926
|
+
const [graphData,setGraphData] = reactExports.useState({});
|
|
16111
18927
|
|
|
16112
|
-
const [change,setChange] =
|
|
18928
|
+
const [change,setChange] = reactExports.useState(0);
|
|
16113
18929
|
|
|
16114
18930
|
//generate graph colour based on performance of the currency
|
|
16115
18931
|
const performanceColor = (rateChange) => {
|
|
@@ -16131,7 +18947,7 @@ const ChartSmall = (props) => {
|
|
|
16131
18947
|
}
|
|
16132
18948
|
};
|
|
16133
18949
|
|
|
16134
|
-
|
|
18950
|
+
reactExports.useEffect(()=>{
|
|
16135
18951
|
let curr = {
|
|
16136
18952
|
dates:[],
|
|
16137
18953
|
data:[],
|
|
@@ -16513,16 +19329,16 @@ const _jsxFileName$J = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
16513
19329
|
|
|
16514
19330
|
const CountrySelector = (props) => {
|
|
16515
19331
|
const {options,selectedOption,initialText,initialFlag,label,placeholder,searchable,sectionTitle} = props;
|
|
16516
|
-
const [opened,setOpened] =
|
|
16517
|
-
const [passedOption,setPassedOption] =
|
|
16518
|
-
const [optionsOri,setOptionsOri] =
|
|
16519
|
-
const [optionsRec,setOptionsRec] =
|
|
16520
|
-
const [qryStr,setQryStr] =
|
|
16521
|
-
const buttonRef =
|
|
19332
|
+
const [opened,setOpened] = reactExports.useState(false);
|
|
19333
|
+
const [passedOption,setPassedOption] = reactExports.useState({});
|
|
19334
|
+
const [optionsOri,setOptionsOri] = reactExports.useState([]);
|
|
19335
|
+
const [optionsRec,setOptionsRec] = reactExports.useState([]);
|
|
19336
|
+
const [qryStr,setQryStr] = reactExports.useState('');
|
|
19337
|
+
const buttonRef = reactExports.useRef();
|
|
16522
19338
|
|
|
16523
19339
|
let imgFile = initialFlag ? initialFlag : img$2;
|
|
16524
19340
|
|
|
16525
|
-
|
|
19341
|
+
reactExports.useEffect(()=>{
|
|
16526
19342
|
document.addEventListener('keyup',function(e){
|
|
16527
19343
|
if (opened && e.key === 'Escape') setOpened(false);
|
|
16528
19344
|
if (!opened && (document ).activeElement.classList.value.includes('country-selector') && e.code === 'Enter' ||
|
|
@@ -16535,7 +19351,7 @@ const CountrySelector = (props) => {
|
|
|
16535
19351
|
}
|
|
16536
19352
|
},[opened]);
|
|
16537
19353
|
|
|
16538
|
-
|
|
19354
|
+
reactExports.useEffect(()=>{
|
|
16539
19355
|
setOptionsOri(options);
|
|
16540
19356
|
setOptionsRec(options);
|
|
16541
19357
|
},[options]);
|
|
@@ -16734,16 +19550,16 @@ const NothingContent$6 = styled.div`
|
|
|
16734
19550
|
const _jsxFileName$I = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\CurrencyPairs\\CurrencyPairsTable.tsx";
|
|
16735
19551
|
const CurrencyPairsTable = (props) => {
|
|
16736
19552
|
const {pairs,callback,srchActive} = props;
|
|
16737
|
-
const [currentPage,setCurrentPage] =
|
|
16738
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
16739
|
-
const [dispPairs,setDispPairs] =
|
|
16740
|
-
const [dispPairsOri,setDispPairsOri] =
|
|
16741
|
-
const [displayContent,setDisplayContent] =
|
|
16742
|
-
const [sortPairDir,setSortPairDir] =
|
|
16743
|
-
const [sortBaseDir,setSortBaseDir] =
|
|
16744
|
-
const [sortExchDir,setSortExchDir] =
|
|
16745
|
-
|
|
16746
|
-
|
|
19553
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
19554
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
19555
|
+
const [dispPairs,setDispPairs] = reactExports.useState([]);
|
|
19556
|
+
const [dispPairsOri,setDispPairsOri] = reactExports.useState(pairs);
|
|
19557
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
19558
|
+
const [sortPairDir,setSortPairDir] = reactExports.useState('desc');
|
|
19559
|
+
const [sortBaseDir,setSortBaseDir] = reactExports.useState('desc');
|
|
19560
|
+
const [sortExchDir,setSortExchDir] = reactExports.useState('desc');
|
|
19561
|
+
|
|
19562
|
+
reactExports.useEffect(()=>{
|
|
16747
19563
|
//pagination
|
|
16748
19564
|
if (dispPairsOri.length > 0){
|
|
16749
19565
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -16756,14 +19572,14 @@ const CurrencyPairsTable = (props) => {
|
|
|
16756
19572
|
setDisplayContent(true);
|
|
16757
19573
|
},[dispPairsOri,currentPage]);
|
|
16758
19574
|
|
|
16759
|
-
|
|
19575
|
+
reactExports.useEffect(()=>{
|
|
16760
19576
|
setDispPairsOri(pairs.sort((a,b) => {
|
|
16761
19577
|
if(a.pairCode < b.pairCode) return -1
|
|
16762
19578
|
return 1
|
|
16763
19579
|
}));
|
|
16764
19580
|
},[pairs]);
|
|
16765
19581
|
|
|
16766
|
-
|
|
19582
|
+
reactExports.useEffect(()=>{
|
|
16767
19583
|
if (srchActive) setCurrentPage(1);
|
|
16768
19584
|
},[srchActive]);
|
|
16769
19585
|
|
|
@@ -17138,12 +19954,12 @@ const _jsxFileName$H = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
17138
19954
|
|
|
17139
19955
|
const DatePicker = (props) => {
|
|
17140
19956
|
const { onChange, label, subtext,disablePastDays,disableFutureDays ,placeholder} = props;
|
|
17141
|
-
const [selectedDate, setSelectedDate] =
|
|
17142
|
-
const [isCalendarOpen, setIsCalendarOpen] =
|
|
19957
|
+
const [selectedDate, setSelectedDate] = reactExports.useState(null);
|
|
19958
|
+
const [isCalendarOpen, setIsCalendarOpen] = reactExports.useState(false);
|
|
17143
19959
|
|
|
17144
|
-
const calendarRef =
|
|
19960
|
+
const calendarRef = reactExports.useRef(null);
|
|
17145
19961
|
|
|
17146
|
-
|
|
19962
|
+
reactExports.useEffect(()=>{
|
|
17147
19963
|
document.addEventListener('click',function(e){
|
|
17148
19964
|
setIsCalendarOpen(calendarRef.current.contains(e.target));
|
|
17149
19965
|
});
|
|
@@ -17214,9 +20030,9 @@ const DatePicker = (props) => {
|
|
|
17214
20030
|
|
|
17215
20031
|
|
|
17216
20032
|
const Calendar = ({ onChange, selected,disablePastDaysProp,disableFutureDaysProp}) => {
|
|
17217
|
-
const [currentDate, setCurrentDate] =
|
|
17218
|
-
const [currentYear,setCurrentYear] =
|
|
17219
|
-
const [calendarView,setCalendarView] =
|
|
20033
|
+
const [currentDate, setCurrentDate] = reactExports.useState(selected || new Date());
|
|
20034
|
+
const [currentYear,setCurrentYear] = reactExports.useState(new Date().getFullYear());
|
|
20035
|
+
const [calendarView,setCalendarView] = reactExports.useState(true);
|
|
17220
20036
|
|
|
17221
20037
|
const daysOfWeek = ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'];
|
|
17222
20038
|
|
|
@@ -17684,33 +20500,34 @@ const YearPickerContainer = styled.div`
|
|
|
17684
20500
|
|
|
17685
20501
|
const _jsxFileName$G = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\DateRangePicker\\DateRangePicker.tsx";
|
|
17686
20502
|
const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
17687
|
-
const [startMonth, setStartMonth] =
|
|
17688
|
-
const [endMonth, setEndMonth] =
|
|
20503
|
+
const [startMonth, setStartMonth] = reactExports.useState(new Date());
|
|
20504
|
+
const [endMonth, setEndMonth] = reactExports.useState(() => {
|
|
17689
20505
|
const nextMonth = new Date();
|
|
17690
20506
|
nextMonth.setMonth(nextMonth.getMonth() + 1);
|
|
17691
|
-
return nextMonth
|
|
20507
|
+
return nextMonth
|
|
17692
20508
|
});
|
|
17693
|
-
const [startDate, setStartDate] =
|
|
17694
|
-
const [endDate, setEndDate] =
|
|
17695
|
-
const [showCalendar,setShowCalendar] =
|
|
20509
|
+
const [startDate, setStartDate] = reactExports.useState(null);
|
|
20510
|
+
const [endDate, setEndDate] = reactExports.useState(null);
|
|
20511
|
+
const [showCalendar,setShowCalendar] = reactExports.useState(false);
|
|
17696
20512
|
|
|
17697
|
-
const [toggleStartYearPicker,setToggleStartYearPicker] =
|
|
17698
|
-
const [toggleEndYearPicker,setToggleEndYearPicker] =
|
|
20513
|
+
const [toggleStartYearPicker,setToggleStartYearPicker] = reactExports.useState(false);
|
|
20514
|
+
const [toggleEndYearPicker,setToggleEndYearPicker] = reactExports.useState(false);
|
|
17699
20515
|
|
|
17700
20516
|
function clickOutside(e) {
|
|
17701
20517
|
const calenderComponent = document.querySelector('.datepicker-comp');
|
|
17702
|
-
|
|
20518
|
+
const yearMonthHeader = document.querySelector('.year-view');
|
|
20519
|
+
if (calenderComponent.contains(e.target ) || yearMonthHeader.contains(e.target )) {
|
|
17703
20520
|
setShowCalendar(true);
|
|
17704
20521
|
} else {
|
|
17705
20522
|
setShowCalendar(false);
|
|
17706
|
-
if (!endDate) {
|
|
17707
|
-
setStartDate(null)
|
|
17708
|
-
selectedDateRange({startDate:null, endDate:null})
|
|
17709
|
-
}
|
|
20523
|
+
/*if (!endDate) {
|
|
20524
|
+
setStartDate(null)
|
|
20525
|
+
selectedDateRange({startDate:null, endDate:null})
|
|
20526
|
+
}*/
|
|
17710
20527
|
}
|
|
17711
20528
|
}
|
|
17712
20529
|
|
|
17713
|
-
|
|
20530
|
+
reactExports.useEffect(() => {
|
|
17714
20531
|
document.addEventListener('click', clickOutside);
|
|
17715
20532
|
return () => {
|
|
17716
20533
|
document.removeEventListener('click', clickOutside);
|
|
@@ -17748,7 +20565,6 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17748
20565
|
newEndMonth.setMonth(newEndMonth.getMonth() + 1);
|
|
17749
20566
|
setEndMonth(newEndMonth);
|
|
17750
20567
|
}
|
|
17751
|
-
|
|
17752
20568
|
setStartMonth(newStartMonth);
|
|
17753
20569
|
};
|
|
17754
20570
|
|
|
@@ -17762,7 +20578,6 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17762
20578
|
newStartMonth.setMonth(newStartMonth.getMonth() - 1);
|
|
17763
20579
|
setStartMonth(newStartMonth);
|
|
17764
20580
|
}
|
|
17765
|
-
|
|
17766
20581
|
setEndMonth(newEndMonth);
|
|
17767
20582
|
};
|
|
17768
20583
|
|
|
@@ -17775,7 +20590,7 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17775
20590
|
const YearPicker = (props) => {
|
|
17776
20591
|
const {selYear,monthYear,isVisible} = props;
|
|
17777
20592
|
const yearRange = 10;
|
|
17778
|
-
const [calendarYear, setCalendarYear] =
|
|
20593
|
+
const [calendarYear, setCalendarYear] = reactExports.useState(new Date().getFullYear());
|
|
17779
20594
|
|
|
17780
20595
|
const handleNextRange = () => {
|
|
17781
20596
|
setCalendarYear(prevYear => prevYear + (yearRange * 2 + 1));
|
|
@@ -17792,36 +20607,36 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17792
20607
|
years.push(React$1.createElement('div', { className: `year-option ${i === new Date().getFullYear() ? 'curr-year' : ''}`, key: i, onClick: ()=>{
|
|
17793
20608
|
selYear(i);
|
|
17794
20609
|
isVisible(false);
|
|
17795
|
-
}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20610
|
+
}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 113}}, i));
|
|
17796
20611
|
}
|
|
17797
20612
|
return years
|
|
17798
20613
|
};
|
|
17799
20614
|
|
|
17800
20615
|
return (
|
|
17801
|
-
React$1.createElement(YearPickerContainer, {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17802
|
-
, React$1.createElement('div', { className: "header", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17803
|
-
, React$1.createElement('button', { type: "button", onClick: handlePreviousRange, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17804
|
-
, React$1.createElement('svg', { width: "20", height: "20", viewBox: "0 0 20 20" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17805
|
-
, React$1.createElement('path', { d: "M6.29 9.29C6.19896 9.3851 6.12759 9.49725 6.08 9.62C5.97998 9.86346 5.97998 10.1365 6.08 10.38C6.12759 10.5028 6.19896 10.6149 6.29 10.71L9.29 13.71C9.4783 13.8983 9.7337 14.0041 10 14.0041C10.2663 14.0041 10.5217 13.8983 10.71 13.71C10.8983 13.5217 11.0041 13.2663 11.0041 13C11.0041 12.7337 10.8983 12.4783 10.71 12.29L9.41 11H13C13.2652 11 13.5196 10.8946 13.7071 10.7071C13.8946 10.5196 14 10.2652 14 10C14 9.73478 13.8946 9.48043 13.7071 9.29289C13.5196 9.10536 13.2652 9 13 9H9.41L10.71 7.71C10.8037 7.61704 10.8781 7.50644 10.9289 7.38458C10.9797 7.26272 11.0058 7.13201 11.0058 7C11.0058 6.86799 10.9797 6.73728 10.9289 6.61542C10.8781 6.49356 10.8037 6.38296 10.71 6.29C10.617 6.19627 10.5064 6.12188 10.3846 6.07111C10.2627 6.02034 10.132 5.9942 10 5.9942C9.86799 5.9942 9.73728 6.02034 9.61542 6.07111C9.49356 6.12188 9.38296 6.19627 9.29 6.29L6.29 9.29ZM0 10C0 11.9778 0.58649 13.9112 1.6853 15.5557C2.78412 17.2002 4.3459 18.4819 6.17317 19.2388C8.00043 19.9957 10.0111 20.1937 11.9509 19.8079C13.8907 19.422 15.6725 18.4696 17.0711 17.0711C18.4696 15.6725 19.422 13.8907 19.8079 11.9509C20.1937 10.0111 19.9957 8.00043 19.2388 6.17317C18.4819 4.3459 17.2002 2.78412 15.5557 1.6853C13.9112 0.58649 11.9778 0 10 0C8.68678 0 7.38642 0.258658 6.17317 0.761205C4.95991 1.26375 3.85752 2.00035 2.92893 2.92893C1.05357 4.8043 0 7.34784 0 10ZM18 10C18 11.5823 17.5308 13.129 16.6518 14.4446C15.7727 15.7602 14.5233 16.7855 13.0615 17.391C11.5997 17.9965 9.99113 18.155 8.43928 17.8463C6.88743 17.5376 5.46197 16.7757 4.34315 15.6569C3.22433 14.538 2.4624 13.1126 2.15372 11.5607C1.84504 10.0089 2.00346 8.40034 2.60896 6.93853C3.21447 5.47672 4.23984 4.22729 5.55544 3.34824C6.87103 2.46919 8.41775 2 10 2C12.1217 2 14.1566 2.84285 15.6569 4.34315C17.1571 5.84344 18 7.87827 18 10Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20616
|
+
React$1.createElement(YearPickerContainer, {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 122}}
|
|
20617
|
+
, React$1.createElement('div', { className: "header cal-header" , __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 123}}
|
|
20618
|
+
, React$1.createElement('button', { type: "button", onClick: handlePreviousRange, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 124}}
|
|
20619
|
+
, React$1.createElement('svg', { width: "20", height: "20", viewBox: "0 0 20 20" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 125}}
|
|
20620
|
+
, React$1.createElement('path', { d: "M6.29 9.29C6.19896 9.3851 6.12759 9.49725 6.08 9.62C5.97998 9.86346 5.97998 10.1365 6.08 10.38C6.12759 10.5028 6.19896 10.6149 6.29 10.71L9.29 13.71C9.4783 13.8983 9.7337 14.0041 10 14.0041C10.2663 14.0041 10.5217 13.8983 10.71 13.71C10.8983 13.5217 11.0041 13.2663 11.0041 13C11.0041 12.7337 10.8983 12.4783 10.71 12.29L9.41 11H13C13.2652 11 13.5196 10.8946 13.7071 10.7071C13.8946 10.5196 14 10.2652 14 10C14 9.73478 13.8946 9.48043 13.7071 9.29289C13.5196 9.10536 13.2652 9 13 9H9.41L10.71 7.71C10.8037 7.61704 10.8781 7.50644 10.9289 7.38458C10.9797 7.26272 11.0058 7.13201 11.0058 7C11.0058 6.86799 10.9797 6.73728 10.9289 6.61542C10.8781 6.49356 10.8037 6.38296 10.71 6.29C10.617 6.19627 10.5064 6.12188 10.3846 6.07111C10.2627 6.02034 10.132 5.9942 10 5.9942C9.86799 5.9942 9.73728 6.02034 9.61542 6.07111C9.49356 6.12188 9.38296 6.19627 9.29 6.29L6.29 9.29ZM0 10C0 11.9778 0.58649 13.9112 1.6853 15.5557C2.78412 17.2002 4.3459 18.4819 6.17317 19.2388C8.00043 19.9957 10.0111 20.1937 11.9509 19.8079C13.8907 19.422 15.6725 18.4696 17.0711 17.0711C18.4696 15.6725 19.422 13.8907 19.8079 11.9509C20.1937 10.0111 19.9957 8.00043 19.2388 6.17317C18.4819 4.3459 17.2002 2.78412 15.5557 1.6853C13.9112 0.58649 11.9778 0 10 0C8.68678 0 7.38642 0.258658 6.17317 0.761205C4.95991 1.26375 3.85752 2.00035 2.92893 2.92893C1.05357 4.8043 0 7.34784 0 10ZM18 10C18 11.5823 17.5308 13.129 16.6518 14.4446C15.7727 15.7602 14.5233 16.7855 13.0615 17.391C11.5997 17.9965 9.99113 18.155 8.43928 17.8463C6.88743 17.5376 5.46197 16.7757 4.34315 15.6569C3.22433 14.538 2.4624 13.1126 2.15372 11.5607C1.84504 10.0089 2.00346 8.40034 2.60896 6.93853C3.21447 5.47672 4.23984 4.22729 5.55544 3.34824C6.87103 2.46919 8.41775 2 10 2C12.1217 2 14.1566 2.84285 15.6569 4.34315C17.1571 5.84344 18 7.87827 18 10Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 126}})
|
|
17806
20621
|
)
|
|
17807
20622
|
)
|
|
17808
|
-
, React$1.createElement('button', { type: "button", className: "month-year", onClick: ()=>{isVisible(false);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20623
|
+
, React$1.createElement('button', { type: "button", className: "month-year", onClick: ()=>{isVisible(false);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 129}}
|
|
17809
20624
|
, monthYear
|
|
17810
|
-
, React$1.createElement('svg', { className: "year-view", width: "12", height: "8", viewBox: "0 0 12 8" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17811
|
-
, React$1.createElement('path', { d: "M11 1.17C10.8126 0.983753 10.5592 0.879211 10.295 0.879211C10.0308 0.879211 9.77737 0.983753 9.59001 1.17L6.00001 4.71L2.46001 1.17C2.27265 0.983753 2.0192 0.879211 1.75501 0.879211C1.49082 0.879211 1.23737 0.983753 1.05001 1.17C0.956281 1.26297 0.881887 1.37357 0.831118 1.49543C0.780349 1.61729 0.754211 1.74799 0.754211 1.88C0.754211 2.01202 0.780349 2.14272 0.831118 2.26458C0.881887 2.38644 0.956281 2.49704 1.05001 2.59L5.29001 6.83C5.38297 6.92373 5.49357 6.99813 5.61543 7.04889C5.73729 7.09966 5.868 7.1258 6.00001 7.1258C6.13202 7.1258 6.26273 7.09966 6.38459 7.04889C6.50645 6.99813 6.61705 6.92373 6.71001 6.83L11 2.59C11.0937 2.49704 11.1681 2.38644 11.2189 2.26458C11.2697 2.14272 11.2958 2.01202 11.2958 1.88C11.2958 1.74799 11.2697 1.61729 11.2189 1.49543C11.1681 1.37357 11.0937 1.26297 11 1.17Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20625
|
+
, React$1.createElement('svg', { className: "year-view", width: "12", height: "8", viewBox: "0 0 12 8" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 131}}
|
|
20626
|
+
, React$1.createElement('path', { d: "M11 1.17C10.8126 0.983753 10.5592 0.879211 10.295 0.879211C10.0308 0.879211 9.77737 0.983753 9.59001 1.17L6.00001 4.71L2.46001 1.17C2.27265 0.983753 2.0192 0.879211 1.75501 0.879211C1.49082 0.879211 1.23737 0.983753 1.05001 1.17C0.956281 1.26297 0.881887 1.37357 0.831118 1.49543C0.780349 1.61729 0.754211 1.74799 0.754211 1.88C0.754211 2.01202 0.780349 2.14272 0.831118 2.26458C0.881887 2.38644 0.956281 2.49704 1.05001 2.59L5.29001 6.83C5.38297 6.92373 5.49357 6.99813 5.61543 7.04889C5.73729 7.09966 5.868 7.1258 6.00001 7.1258C6.13202 7.1258 6.26273 7.09966 6.38459 7.04889C6.50645 6.99813 6.61705 6.92373 6.71001 6.83L11 2.59C11.0937 2.49704 11.1681 2.38644 11.2189 2.26458C11.2697 2.14272 11.2958 2.01202 11.2958 1.88C11.2958 1.74799 11.2697 1.61729 11.2189 1.49543C11.1681 1.37357 11.0937 1.26297 11 1.17Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 132}})
|
|
17812
20627
|
)
|
|
17813
20628
|
)
|
|
17814
|
-
, React$1.createElement('button', { type: "button", onClick: handleNextRange, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17815
|
-
, React$1.createElement('svg', { width: "20", height: "20", viewBox: "0 0 20 20" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17816
|
-
, React$1.createElement('path', { d: "M13.71 10.71C13.801 10.6149 13.8724 10.5028 13.92 10.38C14.02 10.1365 14.02 9.86347 13.92 9.62C13.8724 9.49725 13.801 9.38511 13.71 9.29L10.71 6.29C10.5217 6.1017 10.2663 5.99591 10 5.99591C9.7337 5.99591 9.47831 6.1017 9.29 6.29C9.1017 6.47831 8.99591 6.7337 8.99591 7C8.99591 7.26631 9.1017 7.5217 9.29 7.71L10.59 9H7C6.73479 9 6.48043 9.10536 6.2929 9.2929C6.10536 9.48043 6 9.73479 6 10C6 10.2652 6.10536 10.5196 6.2929 10.7071C6.48043 10.8946 6.73479 11 7 11H10.59L9.29 12.29C9.19628 12.383 9.12188 12.4936 9.07111 12.6154C9.02034 12.7373 8.99421 12.868 8.99421 13C8.99421 13.132 9.02034 13.2627 9.07111 13.3846C9.12188 13.5064 9.19628 13.617 9.29 13.71C9.38297 13.8037 9.49357 13.8781 9.61543 13.9289C9.73729 13.9797 9.86799 14.0058 10 14.0058C10.132 14.0058 10.2627 13.9797 10.3846 13.9289C10.5064 13.8781 10.617 13.8037 10.71 13.71L13.71 10.71ZM20 10C20 8.02219 19.4135 6.08879 18.3147 4.4443C17.2159 2.79981 15.6541 1.51809 13.8268 0.761209C11.9996 0.00433284 9.98891 -0.193701 8.0491 0.192152C6.10929 0.578004 4.32746 1.53041 2.92894 2.92894C1.53041 4.32746 0.578004 6.10929 0.192152 8.0491C-0.193701 9.98891 0.00433284 11.9996 0.761209 13.8268C1.51809 15.6541 2.79981 17.2159 4.4443 18.3147C6.08879 19.4135 8.02219 20 10 20C12.6522 20 15.1957 18.9464 17.0711 17.0711C18.9464 15.1957 20 12.6522 20 10ZM2 10C2 8.41775 2.4692 6.87104 3.34825 5.55544C4.2273 4.23985 5.47673 3.21447 6.93854 2.60897C8.40035 2.00347 10.0089 1.84504 11.5607 2.15372C13.1126 2.4624 14.538 3.22433 15.6569 4.34315C16.7757 5.46197 17.5376 6.88743 17.8463 8.43928C18.155 9.99113 17.9965 11.5997 17.391 13.0615C16.7855 14.5233 15.7602 15.7727 14.4446 16.6518C13.129 17.5308 11.5823 18 10 18C7.87827 18 5.84344 17.1572 4.34315 15.6569C2.84286 14.1566 2 12.1217 2 10Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20629
|
+
, React$1.createElement('button', { type: "button", onClick: handleNextRange, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 135}}
|
|
20630
|
+
, React$1.createElement('svg', { width: "20", height: "20", viewBox: "0 0 20 20" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 136}}
|
|
20631
|
+
, React$1.createElement('path', { d: "M13.71 10.71C13.801 10.6149 13.8724 10.5028 13.92 10.38C14.02 10.1365 14.02 9.86347 13.92 9.62C13.8724 9.49725 13.801 9.38511 13.71 9.29L10.71 6.29C10.5217 6.1017 10.2663 5.99591 10 5.99591C9.7337 5.99591 9.47831 6.1017 9.29 6.29C9.1017 6.47831 8.99591 6.7337 8.99591 7C8.99591 7.26631 9.1017 7.5217 9.29 7.71L10.59 9H7C6.73479 9 6.48043 9.10536 6.2929 9.2929C6.10536 9.48043 6 9.73479 6 10C6 10.2652 6.10536 10.5196 6.2929 10.7071C6.48043 10.8946 6.73479 11 7 11H10.59L9.29 12.29C9.19628 12.383 9.12188 12.4936 9.07111 12.6154C9.02034 12.7373 8.99421 12.868 8.99421 13C8.99421 13.132 9.02034 13.2627 9.07111 13.3846C9.12188 13.5064 9.19628 13.617 9.29 13.71C9.38297 13.8037 9.49357 13.8781 9.61543 13.9289C9.73729 13.9797 9.86799 14.0058 10 14.0058C10.132 14.0058 10.2627 13.9797 10.3846 13.9289C10.5064 13.8781 10.617 13.8037 10.71 13.71L13.71 10.71ZM20 10C20 8.02219 19.4135 6.08879 18.3147 4.4443C17.2159 2.79981 15.6541 1.51809 13.8268 0.761209C11.9996 0.00433284 9.98891 -0.193701 8.0491 0.192152C6.10929 0.578004 4.32746 1.53041 2.92894 2.92894C1.53041 4.32746 0.578004 6.10929 0.192152 8.0491C-0.193701 9.98891 0.00433284 11.9996 0.761209 13.8268C1.51809 15.6541 2.79981 17.2159 4.4443 18.3147C6.08879 19.4135 8.02219 20 10 20C12.6522 20 15.1957 18.9464 17.0711 17.0711C18.9464 15.1957 20 12.6522 20 10ZM2 10C2 8.41775 2.4692 6.87104 3.34825 5.55544C4.2273 4.23985 5.47673 3.21447 6.93854 2.60897C8.40035 2.00347 10.0089 1.84504 11.5607 2.15372C13.1126 2.4624 14.538 3.22433 15.6569 4.34315C16.7757 5.46197 17.5376 6.88743 17.8463 8.43928C18.155 9.99113 17.9965 11.5997 17.391 13.0615C16.7855 14.5233 15.7602 15.7727 14.4446 16.6518C13.129 17.5308 11.5823 18 10 18C7.87827 18 5.84344 17.1572 4.34315 15.6569C2.84286 14.1566 2 12.1217 2 10Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 137}})
|
|
17817
20632
|
)
|
|
17818
20633
|
)
|
|
17819
20634
|
)
|
|
17820
|
-
, React$1.createElement('div', { className: "years-grid", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20635
|
+
, React$1.createElement('div', { className: "years-grid", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 141}}
|
|
17821
20636
|
, renderYears()
|
|
17822
20637
|
)
|
|
17823
20638
|
)
|
|
17824
|
-
)
|
|
20639
|
+
)
|
|
17825
20640
|
};
|
|
17826
20641
|
|
|
17827
20642
|
|
|
@@ -17865,11 +20680,11 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17865
20680
|
}
|
|
17866
20681
|
|
|
17867
20682
|
calendar.push(
|
|
17868
|
-
React$1.createElement('div', { key: i, className: additionalClasses, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20683
|
+
React$1.createElement('div', { key: i, className: additionalClasses, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 190}}
|
|
17869
20684
|
, otherMonthDate.getDate()
|
|
17870
20685
|
)
|
|
17871
20686
|
);
|
|
17872
|
-
continue
|
|
20687
|
+
continue
|
|
17873
20688
|
}
|
|
17874
20689
|
|
|
17875
20690
|
const handleClick = () => handleDateClick(currentDate);
|
|
@@ -17892,7 +20707,7 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17892
20707
|
React$1.createElement('div', {
|
|
17893
20708
|
key: i,
|
|
17894
20709
|
className: `day ${additionalClasses} ${isWithinRange ? 'within-range' : ''}`,
|
|
17895
|
-
onClick: handleClick, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20710
|
+
onClick: handleClick, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 214}}
|
|
17896
20711
|
|
|
17897
20712
|
, day
|
|
17898
20713
|
)
|
|
@@ -17903,14 +20718,14 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17903
20718
|
|
|
17904
20719
|
return (
|
|
17905
20720
|
React$1.createElement(React$1.Fragment, null
|
|
17906
|
-
, React$1.createElement('div', { className: "weekdays", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20721
|
+
, React$1.createElement('div', { className: "weekdays", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 228}}
|
|
17907
20722
|
, shortWeekdays.map((weekday, index) => (
|
|
17908
|
-
React$1.createElement('div', { key: index, className: "weekday", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20723
|
+
React$1.createElement('div', { key: index, className: "weekday", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 230}}
|
|
17909
20724
|
, weekday
|
|
17910
20725
|
)
|
|
17911
20726
|
))
|
|
17912
20727
|
)
|
|
17913
|
-
, React$1.createElement('div', { className: "calendar-grid", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20728
|
+
, React$1.createElement('div', { className: "calendar-grid", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 235}}, calendar)
|
|
17914
20729
|
)
|
|
17915
20730
|
)
|
|
17916
20731
|
};
|
|
@@ -17928,119 +20743,113 @@ const DateRangePicker = ({ selectedDateRange,label,subtext ,placeholder}) => {
|
|
|
17928
20743
|
const options = {day:'2-digit',month:'short',year:'numeric'};
|
|
17929
20744
|
|
|
17930
20745
|
return (
|
|
17931
|
-
React$1.createElement(DateRangePickerComp, { className: "datepicker-comp", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17932
|
-
, React$1.createElement('div', { className: "input-field", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20746
|
+
React$1.createElement(DateRangePickerComp, { className: "datepicker-comp", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 253}}
|
|
20747
|
+
, React$1.createElement('div', { className: "input-field", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 254}}
|
|
17933
20748
|
, label &&
|
|
17934
|
-
React$1.createElement(InputLabel$3, {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17935
|
-
, React$1.createElement('label', {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17936
|
-
, subtext && React$1.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20749
|
+
React$1.createElement(InputLabel$3, {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 256}}
|
|
20750
|
+
, React$1.createElement('label', {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 257}}, label)
|
|
20751
|
+
, subtext && React$1.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 258}}, subtext)
|
|
17937
20752
|
)
|
|
17938
20753
|
|
|
17939
|
-
, React$1.createElement(InputField$2, { className: `${showCalendar ? 'focused' : ''} ${startDate && endDate ? 'success' : ''}`, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20754
|
+
, React$1.createElement(InputField$2, { className: `${showCalendar ? 'focused' : ''} ${startDate && endDate ? 'success' : ''}`, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 261}}
|
|
17940
20755
|
, React$1.createElement('input', {
|
|
17941
20756
|
type: "text",
|
|
17942
20757
|
value: startDate ? `${startDate.toLocaleDateString('en-GB',options)} - ${endDate ? endDate.toLocaleDateString('en-GB',options) : ''}` : '',
|
|
17943
20758
|
readOnly: true,
|
|
17944
20759
|
placeholder: placeholder ? placeholder : 'Select a date range',
|
|
17945
|
-
onClick: ()=>{setShowCalendar(true);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20760
|
+
onClick: ()=>{setShowCalendar(true);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 262}}
|
|
17946
20761
|
)
|
|
17947
|
-
, React$1.createElement('button', { type: "button", onClick: ()=>{setShowCalendar(!showCalendar);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20762
|
+
, React$1.createElement('button', { type: "button", onClick: ()=>{setShowCalendar(!showCalendar);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 269}}
|
|
17948
20763
|
/*calendar icon*/
|
|
17949
|
-
, React$1.createElement('svg', { width: "21", height: "22", viewBox: "0 0 21 22" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17950
|
-
, React$1.createElement('path', { d: "M10.5 18C10.6978 18 10.8911 17.9414 11.0556 17.8315C11.22 17.7216 11.3482 17.5654 11.4239 17.3827C11.4996 17.2 11.5194 16.9989 11.4808 16.8049C11.4422 16.6109 11.347 16.4327 11.2071 16.2929C11.0673 16.153 10.8891 16.0578 10.6951 16.0192C10.5011 15.9806 10.3 16.0004 10.1173 16.0761C9.93459 16.1518 9.77841 16.28 9.66853 16.4444C9.55865 16.6089 9.5 16.8022 9.5 17C9.5 17.2652 9.60536 17.5196 9.79289 17.7071C9.98043 17.8946 10.2348 18 10.5 18ZM15.5 18C15.6978 18 15.8911 17.9414 16.0556 17.8315C16.22 17.7216 16.3482 17.5654 16.4239 17.3827C16.4996 17.2 16.5194 16.9989 16.4808 16.8049C16.4422 16.6109 16.347 16.4327 16.2071 16.2929C16.0673 16.153 15.8891 16.0578 15.6951 16.0192C15.5011 15.9806 15.3 16.0004 15.1173 16.0761C14.9346 16.1518 14.7784 16.28 14.6685 16.4444C14.5586 16.6089 14.5 16.8022 14.5 17C14.5 17.2652 14.6054 17.5196 14.7929 17.7071C14.9804 17.8946 15.2348 18 15.5 18ZM15.5 14C15.6978 14 15.8911 13.9414 16.0556 13.8315C16.22 13.7216 16.3482 13.5654 16.4239 13.3827C16.4996 13.2 16.5194 12.9989 16.4808 12.8049C16.4422 12.6109 16.347 12.4327 16.2071 12.2929C16.0673 12.153 15.8891 12.0578 15.6951 12.0192C15.5011 11.9806 15.3 12.0004 15.1173 12.0761C14.9346 12.1518 14.7784 12.28 14.6685 12.4444C14.5586 12.6089 14.5 12.8022 14.5 13C14.5 13.2652 14.6054 13.5196 14.7929 13.7071C14.9804 13.8946 15.2348 14 15.5 14ZM10.5 14C10.6978 14 10.8911 13.9414 11.0556 13.8315C11.22 13.7216 11.3482 13.5654 11.4239 13.3827C11.4996 13.2 11.5194 12.9989 11.4808 12.8049C11.4422 12.6109 11.347 12.4327 11.2071 12.2929C11.0673 12.153 10.8891 12.0578 10.6951 12.0192C10.5011 11.9806 10.3 12.0004 10.1173 12.0761C9.93459 12.1518 9.77841 12.28 9.66853 12.4444C9.55865 12.6089 9.5 12.8022 9.5 13C9.5 13.2652 9.60536 13.5196 9.79289 13.7071C9.98043 13.8946 10.2348 14 10.5 14ZM17.5 2H16.5V1C16.5 0.734784 16.3946 0.48043 16.2071 0.292893C16.0196 0.105357 15.7652 0 15.5 0C15.2348 0 14.9804 0.105357 14.7929 0.292893C14.6054 0.48043 14.5 0.734784 14.5 1V2H6.5V1C6.5 0.734784 6.39464 0.48043 6.20711 0.292893C6.01957 0.105357 5.76522 0 5.5 0C5.23478 0 4.98043 0.105357 4.79289 0.292893C4.60536 0.48043 4.5 0.734784 4.5 1V2H3.5C2.70435 2 1.94129 2.31607 1.37868 2.87868C0.816071 3.44129 0.5 4.20435 0.5 5V19C0.5 19.7956 0.816071 20.5587 1.37868 21.1213C1.94129 21.6839 2.70435 22 3.5 22H17.5C18.2956 22 19.0587 21.6839 19.6213 21.1213C20.1839 20.5587 20.5 19.7956 20.5 19V5C20.5 4.20435 20.1839 3.44129 19.6213 2.87868C19.0587 2.31607 18.2956 2 17.5 2ZM18.5 19C18.5 19.2652 18.3946 19.5196 18.2071 19.7071C18.0196 19.8946 17.7652 20 17.5 20H3.5C3.23478 20 2.98043 19.8946 2.79289 19.7071C2.60536 19.5196 2.5 19.2652 2.5 19V10H18.5V19ZM18.5 8H2.5V5C2.5 4.73478 2.60536 4.48043 2.79289 4.29289C2.98043 4.10536 3.23478 4 3.5 4H4.5V5C4.5 5.26522 4.60536 5.51957 4.79289 5.70711C4.98043 5.89464 5.23478 6 5.5 6C5.76522 6 6.01957 5.89464 6.20711 5.70711C6.39464 5.51957 6.5 5.26522 6.5 5V4H14.5V5C14.5 5.26522 14.6054 5.51957 14.7929 5.70711C14.9804 5.89464 15.2348 6 15.5 6C15.7652 6 16.0196 5.89464 16.2071 5.70711C16.3946 5.51957 16.5 5.26522 16.5 5V4H17.5C17.7652 4 18.0196 4.10536 18.2071 4.29289C18.3946 4.48043 18.5 4.73478 18.5 5V8ZM5.5 14C5.69778 14 5.89112 13.9414 6.05557 13.8315C6.22002 13.7216 6.34819 13.5654 6.42388 13.3827C6.49957 13.2 6.51937 12.9989 6.48079 12.8049C6.4422 12.6109 6.34696 12.4327 6.20711 12.2929C6.06725 12.153 5.88907 12.0578 5.69509 12.0192C5.50111 11.9806 5.30004 12.0004 5.11732 12.0761C4.93459 12.1518 4.77841 12.28 4.66853 12.4444C4.55865 12.6089 4.5 12.8022 4.5 13C4.5 13.2652 4.60536 13.5196 4.79289 13.7071C4.98043 13.8946 5.23478 14 5.5 14ZM5.5 18C5.69778 18 5.89112 17.9414 6.05557 17.8315C6.22002 17.7216 6.34819 17.5654 6.42388 17.3827C6.49957 17.2 6.51937 16.9989 6.48079 16.8049C6.4422 16.6109 6.34696 16.4327 6.20711 16.2929C6.06725 16.153 5.88907 16.0578 5.69509 16.0192C5.50111 15.9806 5.30004 16.0004 5.11732 16.0761C4.93459 16.1518 4.77841 16.28 4.66853 16.4444C4.55865 16.6089 4.5 16.8022 4.5 17C4.5 17.2652 4.60536 17.5196 4.79289 17.7071C4.98043 17.8946 5.23478 18 5.5 18Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20764
|
+
, React$1.createElement('svg', { width: "21", height: "22", viewBox: "0 0 21 22" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 271}}
|
|
20765
|
+
, React$1.createElement('path', { d: "M10.5 18C10.6978 18 10.8911 17.9414 11.0556 17.8315C11.22 17.7216 11.3482 17.5654 11.4239 17.3827C11.4996 17.2 11.5194 16.9989 11.4808 16.8049C11.4422 16.6109 11.347 16.4327 11.2071 16.2929C11.0673 16.153 10.8891 16.0578 10.6951 16.0192C10.5011 15.9806 10.3 16.0004 10.1173 16.0761C9.93459 16.1518 9.77841 16.28 9.66853 16.4444C9.55865 16.6089 9.5 16.8022 9.5 17C9.5 17.2652 9.60536 17.5196 9.79289 17.7071C9.98043 17.8946 10.2348 18 10.5 18ZM15.5 18C15.6978 18 15.8911 17.9414 16.0556 17.8315C16.22 17.7216 16.3482 17.5654 16.4239 17.3827C16.4996 17.2 16.5194 16.9989 16.4808 16.8049C16.4422 16.6109 16.347 16.4327 16.2071 16.2929C16.0673 16.153 15.8891 16.0578 15.6951 16.0192C15.5011 15.9806 15.3 16.0004 15.1173 16.0761C14.9346 16.1518 14.7784 16.28 14.6685 16.4444C14.5586 16.6089 14.5 16.8022 14.5 17C14.5 17.2652 14.6054 17.5196 14.7929 17.7071C14.9804 17.8946 15.2348 18 15.5 18ZM15.5 14C15.6978 14 15.8911 13.9414 16.0556 13.8315C16.22 13.7216 16.3482 13.5654 16.4239 13.3827C16.4996 13.2 16.5194 12.9989 16.4808 12.8049C16.4422 12.6109 16.347 12.4327 16.2071 12.2929C16.0673 12.153 15.8891 12.0578 15.6951 12.0192C15.5011 11.9806 15.3 12.0004 15.1173 12.0761C14.9346 12.1518 14.7784 12.28 14.6685 12.4444C14.5586 12.6089 14.5 12.8022 14.5 13C14.5 13.2652 14.6054 13.5196 14.7929 13.7071C14.9804 13.8946 15.2348 14 15.5 14ZM10.5 14C10.6978 14 10.8911 13.9414 11.0556 13.8315C11.22 13.7216 11.3482 13.5654 11.4239 13.3827C11.4996 13.2 11.5194 12.9989 11.4808 12.8049C11.4422 12.6109 11.347 12.4327 11.2071 12.2929C11.0673 12.153 10.8891 12.0578 10.6951 12.0192C10.5011 11.9806 10.3 12.0004 10.1173 12.0761C9.93459 12.1518 9.77841 12.28 9.66853 12.4444C9.55865 12.6089 9.5 12.8022 9.5 13C9.5 13.2652 9.60536 13.5196 9.79289 13.7071C9.98043 13.8946 10.2348 14 10.5 14ZM17.5 2H16.5V1C16.5 0.734784 16.3946 0.48043 16.2071 0.292893C16.0196 0.105357 15.7652 0 15.5 0C15.2348 0 14.9804 0.105357 14.7929 0.292893C14.6054 0.48043 14.5 0.734784 14.5 1V2H6.5V1C6.5 0.734784 6.39464 0.48043 6.20711 0.292893C6.01957 0.105357 5.76522 0 5.5 0C5.23478 0 4.98043 0.105357 4.79289 0.292893C4.60536 0.48043 4.5 0.734784 4.5 1V2H3.5C2.70435 2 1.94129 2.31607 1.37868 2.87868C0.816071 3.44129 0.5 4.20435 0.5 5V19C0.5 19.7956 0.816071 20.5587 1.37868 21.1213C1.94129 21.6839 2.70435 22 3.5 22H17.5C18.2956 22 19.0587 21.6839 19.6213 21.1213C20.1839 20.5587 20.5 19.7956 20.5 19V5C20.5 4.20435 20.1839 3.44129 19.6213 2.87868C19.0587 2.31607 18.2956 2 17.5 2ZM18.5 19C18.5 19.2652 18.3946 19.5196 18.2071 19.7071C18.0196 19.8946 17.7652 20 17.5 20H3.5C3.23478 20 2.98043 19.8946 2.79289 19.7071C2.60536 19.5196 2.5 19.2652 2.5 19V10H18.5V19ZM18.5 8H2.5V5C2.5 4.73478 2.60536 4.48043 2.79289 4.29289C2.98043 4.10536 3.23478 4 3.5 4H4.5V5C4.5 5.26522 4.60536 5.51957 4.79289 5.70711C4.98043 5.89464 5.23478 6 5.5 6C5.76522 6 6.01957 5.89464 6.20711 5.70711C6.39464 5.51957 6.5 5.26522 6.5 5V4H14.5V5C14.5 5.26522 14.6054 5.51957 14.7929 5.70711C14.9804 5.89464 15.2348 6 15.5 6C15.7652 6 16.0196 5.89464 16.2071 5.70711C16.3946 5.51957 16.5 5.26522 16.5 5V4H17.5C17.7652 4 18.0196 4.10536 18.2071 4.29289C18.3946 4.48043 18.5 4.73478 18.5 5V8ZM5.5 14C5.69778 14 5.89112 13.9414 6.05557 13.8315C6.22002 13.7216 6.34819 13.5654 6.42388 13.3827C6.49957 13.2 6.51937 12.9989 6.48079 12.8049C6.4422 12.6109 6.34696 12.4327 6.20711 12.2929C6.06725 12.153 5.88907 12.0578 5.69509 12.0192C5.50111 11.9806 5.30004 12.0004 5.11732 12.0761C4.93459 12.1518 4.77841 12.28 4.66853 12.4444C4.55865 12.6089 4.5 12.8022 4.5 13C4.5 13.2652 4.60536 13.5196 4.79289 13.7071C4.98043 13.8946 5.23478 14 5.5 14ZM5.5 18C5.69778 18 5.89112 17.9414 6.05557 17.8315C6.22002 17.7216 6.34819 17.5654 6.42388 17.3827C6.49957 17.2 6.51937 16.9989 6.48079 16.8049C6.4422 16.6109 6.34696 16.4327 6.20711 16.2929C6.06725 16.153 5.88907 16.0578 5.69509 16.0192C5.50111 15.9806 5.30004 16.0004 5.11732 16.0761C4.93459 16.1518 4.77841 16.28 4.66853 16.4444C4.55865 16.6089 4.5 16.8022 4.5 17C4.5 17.2652 4.60536 17.5196 4.79289 17.7071C4.98043 17.8946 5.23478 18 5.5 18Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 272}})
|
|
17951
20766
|
)
|
|
17952
20767
|
)
|
|
17953
20768
|
)
|
|
17954
20769
|
)
|
|
17955
20770
|
, showCalendar &&
|
|
17956
|
-
React$1.createElement(CalendarContainer, {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17957
|
-
, React$1.createElement('div', { className: "calendars", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17958
|
-
, React$1.createElement('div', { className: "calendar", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17959
|
-
,
|
|
17960
|
-
React$1.createElement(
|
|
17961
|
-
, React$1.createElement('
|
|
17962
|
-
, React$1.createElement('
|
|
17963
|
-
, React$1.createElement('
|
|
17964
|
-
, React$1.createElement('path', { d: "M3.28982 5.99995L6.82982 2.45995C7.01607 2.27259 7.12061 2.01913 7.12061 1.75495C7.12061 1.49076 7.01607 1.23731 6.82982 1.04995C6.73686 0.95622 6.62626 0.881826 6.5044 0.831057C6.38254 0.780288 6.25183 0.75415 6.11982 0.75415C5.98781 0.75415 5.8571 0.780288 5.73524 0.831057C5.61339 0.881826 5.50278 0.95622 5.40982 1.04995L1.16982 5.28995C1.07609 5.38291 1.0017 5.49351 0.950931 5.61537C0.900162 5.73723 0.874023 5.86794 0.874023 5.99995C0.874023 6.13196 0.900162 6.26267 0.950931 6.38453C1.0017 6.50638 1.07609 6.61699 1.16982 6.70995L5.40982 10.9999C5.50326 11.0926 5.61408 11.166 5.73592 11.2157C5.85775 11.2655 5.98821 11.2907 6.11982 11.2899C6.25143 11.2907 6.38189 11.2655 6.50373 11.2157C6.62557 11.166 6.73638 11.0926 6.82982 10.9999C7.01607 10.8126 7.12061 10.5591 7.12061 10.2949C7.12061 10.0308 7.01607 9.77731 6.82982 9.58995L3.28982 5.99995Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 287}})
|
|
17965
|
-
)
|
|
20771
|
+
React$1.createElement(CalendarContainer, {__self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 278}}
|
|
20772
|
+
, React$1.createElement('div', { className: "calendars", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 279}}
|
|
20773
|
+
, React$1.createElement('div', { className: "calendar", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 280}}
|
|
20774
|
+
, React$1.createElement('div', { style: {display:!toggleStartYearPicker ? 'block' : 'none'}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 281}}
|
|
20775
|
+
, React$1.createElement('div', { className: "header cal-header" , __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 282}}
|
|
20776
|
+
, React$1.createElement('button', { type: "button", className: "prev-button", onClick: () => handleStartMonthChange(-1), __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 283}}
|
|
20777
|
+
, React$1.createElement('svg', { width: "8", height: "12", viewBox: "0 0 8 12" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 284}}
|
|
20778
|
+
, React$1.createElement('path', { d: "M3.28982 5.99995L6.82982 2.45995C7.01607 2.27259 7.12061 2.01913 7.12061 1.75495C7.12061 1.49076 7.01607 1.23731 6.82982 1.04995C6.73686 0.95622 6.62626 0.881826 6.5044 0.831057C6.38254 0.780288 6.25183 0.75415 6.11982 0.75415C5.98781 0.75415 5.8571 0.780288 5.73524 0.831057C5.61339 0.881826 5.50278 0.95622 5.40982 1.04995L1.16982 5.28995C1.07609 5.38291 1.0017 5.49351 0.950931 5.61537C0.900162 5.73723 0.874023 5.86794 0.874023 5.99995C0.874023 6.13196 0.900162 6.26267 0.950931 6.38453C1.0017 6.50638 1.07609 6.61699 1.16982 6.70995L5.40982 10.9999C5.50326 11.0926 5.61408 11.166 5.73592 11.2157C5.85775 11.2655 5.98821 11.2907 6.11982 11.2899C6.25143 11.2907 6.38189 11.2655 6.50373 11.2157C6.62557 11.166 6.73638 11.0926 6.82982 10.9999C7.01607 10.8126 7.12061 10.5591 7.12061 10.2949C7.12061 10.0308 7.01607 9.77731 6.82982 9.58995L3.28982 5.99995Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 285}})
|
|
17966
20779
|
)
|
|
17967
|
-
|
|
17968
|
-
|
|
17969
|
-
|
|
17970
|
-
|
|
17971
|
-
)
|
|
20780
|
+
)
|
|
20781
|
+
, React$1.createElement('button', { type: "button", className: "month-year", onClick: ()=>{setToggleStartYearPicker(true);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 288}}
|
|
20782
|
+
, `${startMonthName} ${startYear}`
|
|
20783
|
+
, React$1.createElement('svg', { className: toggleStartYearPicker ? 'year-view' : '', width: "12", height: "8", viewBox: "0 0 12 8" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 290}}
|
|
20784
|
+
, React$1.createElement('path', { d: "M11 1.17C10.8126 0.983753 10.5592 0.879211 10.295 0.879211C10.0308 0.879211 9.77737 0.983753 9.59001 1.17L6.00001 4.71L2.46001 1.17C2.27265 0.983753 2.0192 0.879211 1.75501 0.879211C1.49082 0.879211 1.23737 0.983753 1.05001 1.17C0.956281 1.26297 0.881887 1.37357 0.831118 1.49543C0.780349 1.61729 0.754211 1.74799 0.754211 1.88C0.754211 2.01202 0.780349 2.14272 0.831118 2.26458C0.881887 2.38644 0.956281 2.49704 1.05001 2.59L5.29001 6.83C5.38297 6.92373 5.49357 6.99813 5.61543 7.04889C5.73729 7.09966 5.868 7.1258 6.00001 7.1258C6.13202 7.1258 6.26273 7.09966 6.38459 7.04889C6.50645 6.99813 6.61705 6.92373 6.71001 6.83L11 2.59C11.0937 2.49704 11.1681 2.38644 11.2189 2.26458C11.2697 2.14272 11.2958 2.01202 11.2958 1.88C11.2958 1.74799 11.2697 1.61729 11.2189 1.49543C11.1681 1.37357 11.0937 1.26297 11 1.17Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 291}})
|
|
17972
20785
|
)
|
|
17973
|
-
|
|
17974
|
-
|
|
17975
|
-
|
|
17976
|
-
)
|
|
20786
|
+
)
|
|
20787
|
+
, React$1.createElement('button', { type: "button", className: "next-button", onClick: () => handleStartMonthChange(1), __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 294}}
|
|
20788
|
+
, React$1.createElement('svg', { width: "8", height: "12", viewBox: "0 0 8 12" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 295}}
|
|
20789
|
+
, React$1.createElement('path', { d: "M6.83019 5.28995L2.59019 1.04995C2.49722 0.95622 2.38662 0.881826 2.26476 0.831057C2.1429 0.780288 2.0122 0.75415 1.88019 0.75415C1.74818 0.75415 1.61747 0.780288 1.49561 0.831057C1.37375 0.881826 1.26315 0.95622 1.17019 1.04995C0.983936 1.23731 0.879395 1.49076 0.879395 1.75495C0.879395 2.01913 0.983936 2.27259 1.17019 2.45995L4.71019 5.99995L1.17019 9.53995C0.983936 9.72731 0.879395 9.98076 0.879395 10.2449C0.879395 10.5091 0.983936 10.7626 1.17019 10.9499C1.26363 11.0426 1.37444 11.116 1.49628 11.1657C1.61812 11.2155 1.74858 11.2407 1.88019 11.2399C2.01179 11.2407 2.14226 11.2155 2.26409 11.1657C2.38593 11.116 2.49675 11.0426 2.59019 10.9499L6.83019 6.70995C6.92392 6.61699 6.99831 6.50638 7.04908 6.38453C7.09985 6.26267 7.12599 6.13196 7.12599 5.99995C7.12599 5.86794 7.09985 5.73723 7.04908 5.61537C6.99831 5.49351 6.92392 5.38291 6.83019 5.28995Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 296}})
|
|
17977
20790
|
)
|
|
17978
20791
|
)
|
|
17979
|
-
|
|
17980
|
-
)
|
|
17981
|
-
|
|
17982
|
-
, toggleStartYearPicker
|
|
17983
|
-
React$1.createElement(YearPicker, { selYear: (a)=>{
|
|
20792
|
+
)
|
|
20793
|
+
, renderCalendar(startMonth, true)
|
|
20794
|
+
)
|
|
20795
|
+
, React$1.createElement('div', { style: {display:toggleStartYearPicker ? 'block' : 'none'}, className: "year-view", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 302}}
|
|
20796
|
+
, React$1.createElement(YearPicker, { selYear: (a)=>{
|
|
17984
20797
|
const newDate = new Date(startMonth);
|
|
17985
20798
|
newDate.setFullYear(a);
|
|
17986
20799
|
setStartMonth(newDate);
|
|
17987
|
-
}, monthYear: `${startMonthName} ${startYear}`, isVisible: (a)=>{setToggleStartYearPicker(a);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17988
|
-
|
|
20800
|
+
}, monthYear: `${startMonthName} ${startYear}`, isVisible: (a)=>{setToggleStartYearPicker(a);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 303}})
|
|
20801
|
+
)
|
|
17989
20802
|
)
|
|
17990
|
-
, React$1.createElement('div', { className: "calendar", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
17991
|
-
,
|
|
17992
|
-
React$1.createElement(
|
|
17993
|
-
, React$1.createElement('
|
|
17994
|
-
, React$1.createElement('
|
|
17995
|
-
, React$1.createElement('
|
|
17996
|
-
, React$1.createElement('path', { d: "M3.28982 5.99995L6.82982 2.45995C7.01607 2.27259 7.12061 2.01913 7.12061 1.75495C7.12061 1.49076 7.01607 1.23731 6.82982 1.04995C6.73686 0.95622 6.62626 0.881826 6.5044 0.831057C6.38254 0.780288 6.25183 0.75415 6.11982 0.75415C5.98781 0.75415 5.8571 0.780288 5.73524 0.831057C5.61339 0.881826 5.50278 0.95622 5.40982 1.04995L1.16982 5.28995C1.07609 5.38291 1.0017 5.49351 0.950931 5.61537C0.900162 5.73723 0.874023 5.86794 0.874023 5.99995C0.874023 6.13196 0.900162 6.26267 0.950931 6.38453C1.0017 6.50638 1.07609 6.61699 1.16982 6.70995L5.40982 10.9999C5.50326 11.0926 5.61408 11.166 5.73592 11.2157C5.85775 11.2655 5.98821 11.2907 6.11982 11.2899C6.25143 11.2907 6.38189 11.2655 6.50373 11.2157C6.62557 11.166 6.73638 11.0926 6.82982 10.9999C7.01607 10.8126 7.12061 10.5591 7.12061 10.2949C7.12061 10.0308 7.01607 9.77731 6.82982 9.58995L3.28982 5.99995Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 319}})
|
|
17997
|
-
)
|
|
20803
|
+
, React$1.createElement('div', { className: "calendar", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 310}}
|
|
20804
|
+
, React$1.createElement('div', { style: {display:!toggleEndYearPicker ? 'block' : 'none'}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 311}}
|
|
20805
|
+
, React$1.createElement('div', { className: "header cal-header" , __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 312}}
|
|
20806
|
+
, React$1.createElement('button', { type: "button", className: "prev-button", onClick: () => handleEndMonthChange(-1), __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 313}}
|
|
20807
|
+
, React$1.createElement('svg', { width: "8", height: "12", viewBox: "0 0 8 12" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 314}}
|
|
20808
|
+
, React$1.createElement('path', { d: "M3.28982 5.99995L6.82982 2.45995C7.01607 2.27259 7.12061 2.01913 7.12061 1.75495C7.12061 1.49076 7.01607 1.23731 6.82982 1.04995C6.73686 0.95622 6.62626 0.881826 6.5044 0.831057C6.38254 0.780288 6.25183 0.75415 6.11982 0.75415C5.98781 0.75415 5.8571 0.780288 5.73524 0.831057C5.61339 0.881826 5.50278 0.95622 5.40982 1.04995L1.16982 5.28995C1.07609 5.38291 1.0017 5.49351 0.950931 5.61537C0.900162 5.73723 0.874023 5.86794 0.874023 5.99995C0.874023 6.13196 0.900162 6.26267 0.950931 6.38453C1.0017 6.50638 1.07609 6.61699 1.16982 6.70995L5.40982 10.9999C5.50326 11.0926 5.61408 11.166 5.73592 11.2157C5.85775 11.2655 5.98821 11.2907 6.11982 11.2899C6.25143 11.2907 6.38189 11.2655 6.50373 11.2157C6.62557 11.166 6.73638 11.0926 6.82982 10.9999C7.01607 10.8126 7.12061 10.5591 7.12061 10.2949C7.12061 10.0308 7.01607 9.77731 6.82982 9.58995L3.28982 5.99995Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 315}})
|
|
17998
20809
|
)
|
|
17999
|
-
|
|
18000
|
-
|
|
18001
|
-
|
|
18002
|
-
|
|
18003
|
-
)
|
|
20810
|
+
)
|
|
20811
|
+
, React$1.createElement('button', { type: "button", className: "month-year", onClick: ()=>{setToggleEndYearPicker(true);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 318}}
|
|
20812
|
+
, `${endMonthName} ${endYear}`
|
|
20813
|
+
, React$1.createElement('svg', { className: toggleEndYearPicker ? 'year-view' : '', width: "12", height: "8", viewBox: "0 0 12 8" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 320}}
|
|
20814
|
+
, React$1.createElement('path', { d: "M11 1.17C10.8126 0.983753 10.5592 0.879211 10.295 0.879211C10.0308 0.879211 9.77737 0.983753 9.59001 1.17L6.00001 4.71L2.46001 1.17C2.27265 0.983753 2.0192 0.879211 1.75501 0.879211C1.49082 0.879211 1.23737 0.983753 1.05001 1.17C0.956281 1.26297 0.881887 1.37357 0.831118 1.49543C0.780349 1.61729 0.754211 1.74799 0.754211 1.88C0.754211 2.01202 0.780349 2.14272 0.831118 2.26458C0.881887 2.38644 0.956281 2.49704 1.05001 2.59L5.29001 6.83C5.38297 6.92373 5.49357 6.99813 5.61543 7.04889C5.73729 7.09966 5.868 7.1258 6.00001 7.1258C6.13202 7.1258 6.26273 7.09966 6.38459 7.04889C6.50645 6.99813 6.61705 6.92373 6.71001 6.83L11 2.59C11.0937 2.49704 11.1681 2.38644 11.2189 2.26458C11.2697 2.14272 11.2958 2.01202 11.2958 1.88C11.2958 1.74799 11.2697 1.61729 11.2189 1.49543C11.1681 1.37357 11.0937 1.26297 11 1.17Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 321}})
|
|
18004
20815
|
)
|
|
18005
|
-
|
|
18006
|
-
|
|
18007
|
-
|
|
18008
|
-
)
|
|
20816
|
+
)
|
|
20817
|
+
, React$1.createElement('button', { type: "button", className: "next-button", onClick: () => handleEndMonthChange(1), __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 324}}
|
|
20818
|
+
, React$1.createElement('svg', { width: "8", height: "12", viewBox: "0 0 8 12" , fill: "none", xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 325}}
|
|
20819
|
+
, React$1.createElement('path', { d: "M6.83019 5.28995L2.59019 1.04995C2.49722 0.95622 2.38662 0.881826 2.26476 0.831057C2.1429 0.780288 2.0122 0.75415 1.88019 0.75415C1.74818 0.75415 1.61747 0.780288 1.49561 0.831057C1.37375 0.881826 1.26315 0.95622 1.17019 1.04995C0.983936 1.23731 0.879395 1.49076 0.879395 1.75495C0.879395 2.01913 0.983936 2.27259 1.17019 2.45995L4.71019 5.99995L1.17019 9.53995C0.983936 9.72731 0.879395 9.98076 0.879395 10.2449C0.879395 10.5091 0.983936 10.7626 1.17019 10.9499C1.26363 11.0426 1.37444 11.116 1.49628 11.1657C1.61812 11.2155 1.74858 11.2407 1.88019 11.2399C2.01179 11.2407 2.14226 11.2155 2.26409 11.1657C2.38593 11.116 2.49675 11.0426 2.59019 10.9499L6.83019 6.70995C6.92392 6.61699 6.99831 6.50638 7.04908 6.38453C7.09985 6.26267 7.12599 6.13196 7.12599 5.99995C7.12599 5.86794 7.09985 5.73723 7.04908 5.61537C6.99831 5.49351 6.92392 5.38291 6.83019 5.28995Z" , fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 326}})
|
|
18009
20820
|
)
|
|
18010
20821
|
)
|
|
18011
|
-
|
|
18012
|
-
)
|
|
18013
|
-
|
|
18014
|
-
, toggleEndYearPicker
|
|
18015
|
-
React$1.createElement(YearPicker, { selYear: (a)=>{
|
|
20822
|
+
)
|
|
20823
|
+
, renderCalendar(endMonth, false)
|
|
20824
|
+
)
|
|
20825
|
+
, React$1.createElement('div', { style: {display:toggleEndYearPicker ? 'block' : 'none'}, className: "year-view", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 332}}
|
|
20826
|
+
, React$1.createElement(YearPicker, { selYear: (a)=>{
|
|
18016
20827
|
const newDate = new Date(endMonth);
|
|
18017
20828
|
newDate.setFullYear(a);
|
|
18018
20829
|
setEndMonth(newDate);
|
|
18019
|
-
}, monthYear: `${endMonthName} ${endYear}`, isVisible: (a)=>{setToggleEndYearPicker(a);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
18020
|
-
|
|
20830
|
+
}, monthYear: `${endMonthName} ${endYear}`, isVisible: (a)=>{setToggleEndYearPicker(a);}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 333}})
|
|
20831
|
+
)
|
|
18021
20832
|
)
|
|
18022
20833
|
)
|
|
18023
|
-
, React$1.createElement('div', { className: "action-buttons", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
20834
|
+
, React$1.createElement('div', { className: "action-buttons", __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 341}}
|
|
18024
20835
|
, !startDate || !endDate ? React$1.createElement(OutlineButton, { type: "button", size: "sm", variant: "primary", style: { width: 71 }, onClick: () => {
|
|
18025
20836
|
setStartDate(null);
|
|
18026
20837
|
setEndDate(null);
|
|
18027
20838
|
selectedDateRange({ startDate: null, endDate: null });
|
|
18028
20839
|
setShowCalendar(false);
|
|
18029
|
-
}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber:
|
|
18030
|
-
|
|
18031
|
-
|
|
18032
|
-
|
|
18033
|
-
|
|
18034
|
-
|
|
20840
|
+
}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 342}}, "Cancel") :
|
|
20841
|
+
React$1.createElement(OutlineButton, { type: "button", size: "sm", variant: "primary", style: {width:71}, onClick: ()=>{
|
|
20842
|
+
setStartDate(null);
|
|
20843
|
+
setEndDate(null);
|
|
20844
|
+
selectedDateRange({startDate:null, endDate:null});
|
|
20845
|
+
}, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 348}}, "Reset")
|
|
18035
20846
|
|
|
18036
|
-
|
|
18037
|
-
, React$1.createElement(Button$1, { type: "button", size: "sm", variant: "primary", style: {width:71}, onClick: ()=>{setShowCalendar(false);}, disabled: !startDate || !endDate, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 360}}, "Apply")
|
|
20847
|
+
, React$1.createElement(Button$1, { type: "button", size: "sm", variant: "primary", style: {width:71}, onClick: ()=>{setShowCalendar(false);}, disabled: !startDate || !endDate, __self: undefined, __source: {fileName: _jsxFileName$G, lineNumber: 354}}, "Apply")
|
|
18038
20848
|
)
|
|
18039
20849
|
)
|
|
18040
20850
|
|
|
18041
20851
|
)
|
|
18042
|
-
|
|
18043
|
-
);
|
|
20852
|
+
)
|
|
18044
20853
|
};
|
|
18045
20854
|
|
|
18046
20855
|
const DisplayFieldContainer = styled.div`
|
|
@@ -18223,15 +21032,15 @@ const DropdownOption = styled.div`
|
|
|
18223
21032
|
const _jsxFileName$E = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\DropdownList\\DropdownList.tsx";
|
|
18224
21033
|
const DropdownList = (props) => {
|
|
18225
21034
|
const {options,returnedSelection,initialText,disabled,label,placeholder,searchable} = props;
|
|
18226
|
-
const [opened,setOpened] =
|
|
18227
|
-
const [passedOption,setPassedOption] =
|
|
18228
|
-
const [err,setErr] =
|
|
18229
|
-
const [optionsOri,setOptionsOri] =
|
|
18230
|
-
const [optionsRec,setOptionsRec] =
|
|
18231
|
-
const [qryStr,setQryStr] =
|
|
18232
|
-
const buttonRef =
|
|
18233
|
-
|
|
18234
|
-
|
|
21035
|
+
const [opened,setOpened] = reactExports.useState(false);
|
|
21036
|
+
const [passedOption,setPassedOption] = reactExports.useState({});
|
|
21037
|
+
const [err,setErr] = reactExports.useState(false);
|
|
21038
|
+
const [optionsOri,setOptionsOri] = reactExports.useState([]);
|
|
21039
|
+
const [optionsRec,setOptionsRec] = reactExports.useState([]);
|
|
21040
|
+
const [qryStr,setQryStr] = reactExports.useState('');
|
|
21041
|
+
const buttonRef = reactExports.useRef();
|
|
21042
|
+
|
|
21043
|
+
reactExports.useEffect(()=>{
|
|
18235
21044
|
document.addEventListener('keyup',function(e){
|
|
18236
21045
|
if (opened && e.code === 'Escape') setOpened(false);
|
|
18237
21046
|
if (!opened && (document ).activeElement.classList.value.includes('dropdown-field') && e.code === 'Enter' ||
|
|
@@ -18244,7 +21053,7 @@ const DropdownList = (props) => {
|
|
|
18244
21053
|
}
|
|
18245
21054
|
},[opened]);
|
|
18246
21055
|
|
|
18247
|
-
|
|
21056
|
+
reactExports.useEffect(()=>{
|
|
18248
21057
|
setOptionsOri(options);
|
|
18249
21058
|
setOptionsRec(options);
|
|
18250
21059
|
},[options]);
|
|
@@ -19495,11 +22304,11 @@ const _jsxFileName$x = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
19495
22304
|
|
|
19496
22305
|
const LPTopBar = (props) => {
|
|
19497
22306
|
const {userName,requestLpUrl,notifications, myProfileUrl, signOutApiUrl} = props;
|
|
19498
|
-
const [toggleBugReporting,setToggleBugReporting] =
|
|
19499
|
-
const [toggleNotifications,setToggleNotifications] =
|
|
19500
|
-
const [toggleProfileCard,setToggleProfileCard] =
|
|
19501
|
-
const [bugReportStage,setBugReportStage] =
|
|
19502
|
-
const [sendingBR,setSendingBR] =
|
|
22307
|
+
const [toggleBugReporting,setToggleBugReporting] = reactExports.useState(false);
|
|
22308
|
+
const [toggleNotifications,setToggleNotifications] = reactExports.useState(false);
|
|
22309
|
+
const [toggleProfileCard,setToggleProfileCard] = reactExports.useState(false);
|
|
22310
|
+
const [bugReportStage,setBugReportStage] = reactExports.useState(1);
|
|
22311
|
+
const [sendingBR,setSendingBR] = reactExports.useState(false);
|
|
19503
22312
|
|
|
19504
22313
|
function submitBug(){
|
|
19505
22314
|
setSendingBR(true);
|
|
@@ -19966,7 +22775,7 @@ const _jsxFileName$v = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
19966
22775
|
|
|
19967
22776
|
const Tab = (props) => {
|
|
19968
22777
|
const {tabs,bgHexColor,inactiveTabBgHexColor,selectedTab} = props;
|
|
19969
|
-
const [tabIndex,setTabIndex] =
|
|
22778
|
+
const [tabIndex,setTabIndex] = reactExports.useState(0);
|
|
19970
22779
|
|
|
19971
22780
|
return (
|
|
19972
22781
|
React$1.createElement(React$1.Fragment, null
|
|
@@ -20449,12 +23258,12 @@ const _jsxFileName$o = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
20449
23258
|
const PasswordField = (props) => {
|
|
20450
23259
|
const {label,subtext,disabled,errMsg,setValue,placeholder} = props;
|
|
20451
23260
|
|
|
20452
|
-
const [passString,setPassString] =
|
|
20453
|
-
const [borderColor,setBorderColor] =
|
|
20454
|
-
const [err,setErr] =
|
|
20455
|
-
const [showPw,setShowPw] =
|
|
23261
|
+
const [passString,setPassString] = reactExports.useState('');
|
|
23262
|
+
const [borderColor,setBorderColor] = reactExports.useState('');
|
|
23263
|
+
const [err,setErr] = reactExports.useState(false);
|
|
23264
|
+
const [showPw,setShowPw] = reactExports.useState(false);
|
|
20456
23265
|
|
|
20457
|
-
|
|
23266
|
+
reactExports.useEffect(()=>{
|
|
20458
23267
|
setValue('');
|
|
20459
23268
|
setPassString('');
|
|
20460
23269
|
},[]);
|
|
@@ -20598,14 +23407,14 @@ const NothingContent$4 = styled.div`
|
|
|
20598
23407
|
const _jsxFileName$n = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\PaymentMethodsTable\\PaymentMethods.tsx";
|
|
20599
23408
|
const PaymentMethodsTable = (props) => {
|
|
20600
23409
|
const {methods,callback,srchActive} = props;
|
|
20601
|
-
const [currentPage,setCurrentPage] =
|
|
20602
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
20603
|
-
const [dispMethods,setDispMethods] =
|
|
20604
|
-
const [dispMethodsori,setDispMethodsori] =
|
|
20605
|
-
const [displayContent,setDisplayContent] =
|
|
20606
|
-
const [sortDir,setSortDir] =
|
|
20607
|
-
|
|
20608
|
-
|
|
23410
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
23411
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
23412
|
+
const [dispMethods,setDispMethods] = reactExports.useState([]);
|
|
23413
|
+
const [dispMethodsori,setDispMethodsori] = reactExports.useState(methods);
|
|
23414
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
23415
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
23416
|
+
|
|
23417
|
+
reactExports.useEffect(()=>{
|
|
20609
23418
|
//pagination
|
|
20610
23419
|
if (dispMethodsori.length > 0){
|
|
20611
23420
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -20618,14 +23427,14 @@ const PaymentMethodsTable = (props) => {
|
|
|
20618
23427
|
setDisplayContent(true);
|
|
20619
23428
|
},[dispMethodsori,currentPage]);
|
|
20620
23429
|
|
|
20621
|
-
|
|
23430
|
+
reactExports.useEffect(()=>{
|
|
20622
23431
|
setDispMethodsori(methods.sort((a,b) => {
|
|
20623
23432
|
if(a.pymtModeName < b.pymtModeName) return -1
|
|
20624
23433
|
return 1
|
|
20625
23434
|
}));
|
|
20626
23435
|
},[methods]);
|
|
20627
23436
|
|
|
20628
|
-
|
|
23437
|
+
reactExports.useEffect(()=>{
|
|
20629
23438
|
if (srchActive) setCurrentPage(1);
|
|
20630
23439
|
},[srchActive]);
|
|
20631
23440
|
|
|
@@ -20855,14 +23664,14 @@ const StatusBadge = (props) => {
|
|
|
20855
23664
|
const _jsxFileName$l = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\ProvidersTable\\ProvidersTable.tsx";
|
|
20856
23665
|
const ProvidersTable = (props) => {
|
|
20857
23666
|
const {providers,callback,srchActive} = props;
|
|
20858
|
-
const [currentPage,setCurrentPage] =
|
|
20859
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
20860
|
-
const [dispProvs,setDispProvs] =
|
|
20861
|
-
const [dispProvsOri,setDispProvsOri] =
|
|
20862
|
-
const [displayContent,setDisplayContent] =
|
|
20863
|
-
const [sortDir,setSortDir] =
|
|
20864
|
-
|
|
20865
|
-
|
|
23667
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
23668
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
23669
|
+
const [dispProvs,setDispProvs] = reactExports.useState([]);
|
|
23670
|
+
const [dispProvsOri,setDispProvsOri] = reactExports.useState(providers);
|
|
23671
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
23672
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
23673
|
+
|
|
23674
|
+
reactExports.useEffect(()=>{
|
|
20866
23675
|
//pagination
|
|
20867
23676
|
if (dispProvsOri.length > 0){
|
|
20868
23677
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -20875,14 +23684,14 @@ const ProvidersTable = (props) => {
|
|
|
20875
23684
|
setDisplayContent(true);
|
|
20876
23685
|
},[dispProvsOri,currentPage]);
|
|
20877
23686
|
|
|
20878
|
-
|
|
23687
|
+
reactExports.useEffect(()=>{
|
|
20879
23688
|
setDispProvsOri(providers.sort((a,b) => {
|
|
20880
23689
|
if(a.name < b.name) return -1
|
|
20881
23690
|
return 1
|
|
20882
23691
|
}));
|
|
20883
23692
|
},[providers]);
|
|
20884
23693
|
|
|
20885
|
-
|
|
23694
|
+
reactExports.useEffect(()=>{
|
|
20886
23695
|
if (srchActive) setCurrentPage(1);
|
|
20887
23696
|
},[srchActive]);
|
|
20888
23697
|
|
|
@@ -21227,7 +24036,7 @@ const TextField = (props) => {
|
|
|
21227
24036
|
|
|
21228
24037
|
const [borderColor,setBorderColor] = React$1.useState('');
|
|
21229
24038
|
const [err,setErr] = React$1.useState(false);
|
|
21230
|
-
const textFieldRef =
|
|
24039
|
+
const textFieldRef = reactExports.useRef();
|
|
21231
24040
|
|
|
21232
24041
|
function validate(){
|
|
21233
24042
|
if (value){
|
|
@@ -21275,15 +24084,15 @@ const _jsxFileName$i = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
21275
24084
|
|
|
21276
24085
|
const RequestForm = (props) => {
|
|
21277
24086
|
const {symbols,currencies,returnedData} = props;
|
|
21278
|
-
const [selSymbol,setSelSymbol] =
|
|
21279
|
-
const [qty,setQty] =
|
|
21280
|
-
const [baseCurrency,setBaseCurrency] =
|
|
21281
|
-
const [price,setPrice] =
|
|
24087
|
+
const [selSymbol,setSelSymbol] = reactExports.useState({});
|
|
24088
|
+
const [qty,setQty] = reactExports.useState('');
|
|
24089
|
+
const [baseCurrency,setBaseCurrency] = reactExports.useState({});
|
|
24090
|
+
const [price,setPrice] = reactExports.useState('');
|
|
21282
24091
|
|
|
21283
|
-
const [fmtdSymbl,setFmtdSymbl] =
|
|
21284
|
-
const [fmtdCurr,setFmtdCurr] =
|
|
24092
|
+
const [fmtdSymbl,setFmtdSymbl] = reactExports.useState([]);
|
|
24093
|
+
const [fmtdCurr,setFmtdCurr] = reactExports.useState([]);
|
|
21285
24094
|
|
|
21286
|
-
|
|
24095
|
+
reactExports.useEffect(()=>{
|
|
21287
24096
|
let tempFmtd = [];
|
|
21288
24097
|
symbols.forEach((symbol) => {
|
|
21289
24098
|
let temp = {
|
|
@@ -21297,7 +24106,7 @@ const RequestForm = (props) => {
|
|
|
21297
24106
|
setFmtdSymbl(tempFmtd);
|
|
21298
24107
|
},[symbols]);
|
|
21299
24108
|
|
|
21300
|
-
|
|
24109
|
+
reactExports.useEffect(()=>{
|
|
21301
24110
|
let tempFmtd = [];
|
|
21302
24111
|
currencies.forEach((currency) => {
|
|
21303
24112
|
let temp = {
|
|
@@ -21704,7 +24513,7 @@ function ___$insertStyle(css) {
|
|
|
21704
24513
|
|
|
21705
24514
|
Object.defineProperty(dist, '__esModule', { value: true });
|
|
21706
24515
|
|
|
21707
|
-
var React =
|
|
24516
|
+
var React = reactExports;
|
|
21708
24517
|
|
|
21709
24518
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
21710
24519
|
|
|
@@ -21992,14 +24801,14 @@ const NothingContent$2 = styled.div`
|
|
|
21992
24801
|
const _jsxFileName$b = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\SystemConfigTable\\SystemConfigTable.tsx";
|
|
21993
24802
|
const SystemConfigTable = (props) => {
|
|
21994
24803
|
const {configs,callback,srchActive} = props;
|
|
21995
|
-
const [currentPage,setCurrentPage] =
|
|
21996
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
21997
|
-
const [dispConfigs,setDispConfigs] =
|
|
21998
|
-
const [dispConfigsOri,setDispConfigsOri] =
|
|
21999
|
-
const [displayContent,setDisplayContent] =
|
|
22000
|
-
const [sortDir,setSortDir] =
|
|
22001
|
-
|
|
22002
|
-
|
|
24804
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
24805
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
24806
|
+
const [dispConfigs,setDispConfigs] = reactExports.useState([]);
|
|
24807
|
+
const [dispConfigsOri,setDispConfigsOri] = reactExports.useState(configs);
|
|
24808
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
24809
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
24810
|
+
|
|
24811
|
+
reactExports.useEffect(()=>{
|
|
22003
24812
|
//pagination
|
|
22004
24813
|
if (dispConfigsOri.length > 0){
|
|
22005
24814
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -22012,14 +24821,14 @@ const SystemConfigTable = (props) => {
|
|
|
22012
24821
|
setDisplayContent(true);
|
|
22013
24822
|
},[dispConfigsOri,currentPage]);
|
|
22014
24823
|
|
|
22015
|
-
|
|
24824
|
+
reactExports.useEffect(()=>{
|
|
22016
24825
|
setDispConfigsOri(configs.sort((a,b) => {
|
|
22017
24826
|
if(a.configName < b.configName) return -1
|
|
22018
24827
|
return 1
|
|
22019
24828
|
}));
|
|
22020
24829
|
},[configs]);
|
|
22021
24830
|
|
|
22022
|
-
|
|
24831
|
+
reactExports.useEffect(()=>{
|
|
22023
24832
|
if (srchActive) setCurrentPage(1);
|
|
22024
24833
|
},[srchActive]);
|
|
22025
24834
|
|
|
@@ -22211,22 +25020,23 @@ function ChevronDownIcon({
|
|
|
22211
25020
|
titleId,
|
|
22212
25021
|
...props
|
|
22213
25022
|
}, svgRef) {
|
|
22214
|
-
return /*#__PURE__*/
|
|
25023
|
+
return /*#__PURE__*/reactExports.createElement("svg", Object.assign({
|
|
22215
25024
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22216
25025
|
viewBox: "0 0 24 24",
|
|
22217
25026
|
fill: "currentColor",
|
|
22218
25027
|
"aria-hidden": "true",
|
|
22219
25028
|
ref: svgRef,
|
|
22220
25029
|
"aria-labelledby": titleId
|
|
22221
|
-
}, props), title ? /*#__PURE__*/
|
|
25030
|
+
}, props), title ? /*#__PURE__*/reactExports.createElement("title", {
|
|
22222
25031
|
id: titleId
|
|
22223
|
-
}, title) : null, /*#__PURE__*/
|
|
25032
|
+
}, title) : null, /*#__PURE__*/reactExports.createElement("path", {
|
|
22224
25033
|
fillRule: "evenodd",
|
|
22225
25034
|
d: "M12.53 16.28a.75.75 0 01-1.06 0l-7.5-7.5a.75.75 0 011.06-1.06L12 14.69l6.97-6.97a.75.75 0 111.06 1.06l-7.5 7.5z",
|
|
22226
25035
|
clipRule: "evenodd"
|
|
22227
25036
|
}));
|
|
22228
25037
|
}
|
|
22229
|
-
|
|
25038
|
+
|
|
25039
|
+
const ForwardRef$1 = reactExports.forwardRef(ChevronDownIcon);
|
|
22230
25040
|
var ChevronDownIcon$1 = ForwardRef$1;
|
|
22231
25041
|
|
|
22232
25042
|
function XMarkIcon({
|
|
@@ -22234,22 +25044,23 @@ function XMarkIcon({
|
|
|
22234
25044
|
titleId,
|
|
22235
25045
|
...props
|
|
22236
25046
|
}, svgRef) {
|
|
22237
|
-
return /*#__PURE__*/
|
|
25047
|
+
return /*#__PURE__*/reactExports.createElement("svg", Object.assign({
|
|
22238
25048
|
xmlns: "http://www.w3.org/2000/svg",
|
|
22239
25049
|
viewBox: "0 0 24 24",
|
|
22240
25050
|
fill: "currentColor",
|
|
22241
25051
|
"aria-hidden": "true",
|
|
22242
25052
|
ref: svgRef,
|
|
22243
25053
|
"aria-labelledby": titleId
|
|
22244
|
-
}, props), title ? /*#__PURE__*/
|
|
25054
|
+
}, props), title ? /*#__PURE__*/reactExports.createElement("title", {
|
|
22245
25055
|
id: titleId
|
|
22246
|
-
}, title) : null, /*#__PURE__*/
|
|
25056
|
+
}, title) : null, /*#__PURE__*/reactExports.createElement("path", {
|
|
22247
25057
|
fillRule: "evenodd",
|
|
22248
25058
|
d: "M5.47 5.47a.75.75 0 011.06 0L12 10.94l5.47-5.47a.75.75 0 111.06 1.06L13.06 12l5.47 5.47a.75.75 0 11-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 01-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 010-1.06z",
|
|
22249
25059
|
clipRule: "evenodd"
|
|
22250
25060
|
}));
|
|
22251
25061
|
}
|
|
22252
|
-
|
|
25062
|
+
|
|
25063
|
+
const ForwardRef = reactExports.forwardRef(XMarkIcon);
|
|
22253
25064
|
var XMarkIcon$1 = ForwardRef;
|
|
22254
25065
|
|
|
22255
25066
|
const _jsxFileName$a = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\Table\\table.tsx";//create react component
|
|
@@ -22268,18 +25079,18 @@ const Table$2 = (props) => {
|
|
|
22268
25079
|
hasSearch = false,
|
|
22269
25080
|
formatData,
|
|
22270
25081
|
} = props;
|
|
22271
|
-
const [dataToShow, setDataToShow] =
|
|
22272
|
-
const [allData, setAllData] =
|
|
22273
|
-
const [currentPage, setCurrentPage] =
|
|
22274
|
-
const [itemsPerPage, setItemsPerPage] =
|
|
22275
|
-
const [search, setSearch] =
|
|
22276
|
-
const [selectedColumn, setSelectedColumn] =
|
|
22277
|
-
const [searchResults, setSearchResults] =
|
|
22278
|
-
const [refresh, setRefresh] =
|
|
22279
|
-
const [secondaryColumns, setSecondaryColumns] =
|
|
25082
|
+
const [dataToShow, setDataToShow] = reactExports.useState([]);
|
|
25083
|
+
const [allData, setAllData] = reactExports.useState([]);
|
|
25084
|
+
const [currentPage, setCurrentPage] = reactExports.useState(1);
|
|
25085
|
+
const [itemsPerPage, setItemsPerPage] = reactExports.useState(10);
|
|
25086
|
+
const [search, setSearch] = reactExports.useState("");
|
|
25087
|
+
const [selectedColumn, setSelectedColumn] = reactExports.useState("");
|
|
25088
|
+
const [searchResults, setSearchResults] = reactExports.useState([]);
|
|
25089
|
+
const [refresh, setRefresh] = reactExports.useState(false);
|
|
25090
|
+
const [secondaryColumns, setSecondaryColumns] = reactExports.useState
|
|
22280
25091
|
|
|
22281
25092
|
([]);
|
|
22282
|
-
const [rowsToExpand, setRowsToExpand] =
|
|
25093
|
+
const [rowsToExpand, setRowsToExpand] = reactExports.useState([]);
|
|
22283
25094
|
|
|
22284
25095
|
const rowClick = function (row) {
|
|
22285
25096
|
if (onRowClick) {
|
|
@@ -22300,7 +25111,7 @@ const Table$2 = (props) => {
|
|
|
22300
25111
|
setCurrentPage(page);
|
|
22301
25112
|
};
|
|
22302
25113
|
|
|
22303
|
-
|
|
25114
|
+
reactExports.useEffect(() => {
|
|
22304
25115
|
if (searchResults.length > 0) {
|
|
22305
25116
|
setDataToShow(
|
|
22306
25117
|
searchResults.slice(
|
|
@@ -22317,7 +25128,7 @@ const Table$2 = (props) => {
|
|
|
22317
25128
|
setDataToShow(y);
|
|
22318
25129
|
}, [currentPage]);
|
|
22319
25130
|
|
|
22320
|
-
|
|
25131
|
+
reactExports.useEffect(() => {
|
|
22321
25132
|
let y = allData.slice(
|
|
22322
25133
|
(currentPage - 1) * itemsPerPage,
|
|
22323
25134
|
currentPage * itemsPerPage
|
|
@@ -22362,21 +25173,21 @@ const Table$2 = (props) => {
|
|
|
22362
25173
|
setCurrentPage(1);
|
|
22363
25174
|
};
|
|
22364
25175
|
|
|
22365
|
-
|
|
25176
|
+
reactExports.useEffect(() => {
|
|
22366
25177
|
if (search) {
|
|
22367
25178
|
setDataToShow(searchResults.slice(0, itemsPerPage));
|
|
22368
25179
|
}
|
|
22369
25180
|
}, [searchResults]);
|
|
22370
25181
|
|
|
22371
|
-
|
|
25182
|
+
reactExports.useEffect(() => {
|
|
22372
25183
|
setDataToShow(allData.slice(0, itemsPerPage));
|
|
22373
25184
|
}, [secondaryColumns]);
|
|
22374
25185
|
|
|
22375
|
-
|
|
25186
|
+
reactExports.useEffect(() => {
|
|
22376
25187
|
onSearchChange(search);
|
|
22377
25188
|
}, [search]);
|
|
22378
25189
|
|
|
22379
|
-
|
|
25190
|
+
reactExports.useEffect(() => {
|
|
22380
25191
|
// check if itemsPerPage is a number
|
|
22381
25192
|
if (itemsPerPageProp) {
|
|
22382
25193
|
setItemsPerPage(itemsPerPageProp);
|
|
@@ -22385,7 +25196,7 @@ const Table$2 = (props) => {
|
|
|
22385
25196
|
}
|
|
22386
25197
|
}, []);
|
|
22387
25198
|
|
|
22388
|
-
|
|
25199
|
+
reactExports.useEffect(() => {
|
|
22389
25200
|
getData(data, config)
|
|
22390
25201
|
.then((data) => {
|
|
22391
25202
|
if (formatData) {
|
|
@@ -22420,13 +25231,13 @@ const Table$2 = (props) => {
|
|
|
22420
25231
|
|
|
22421
25232
|
// console.log(dataToShow);
|
|
22422
25233
|
return (
|
|
22423
|
-
|
|
22424
|
-
,
|
|
22425
|
-
,
|
|
25234
|
+
reactExports.createElement('div', { className: "s-data-table", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 178}}
|
|
25235
|
+
, reactExports.createElement('div', { className: "s-data-table_header", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 179}}
|
|
25236
|
+
, reactExports.createElement('h5', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 180}}, title)
|
|
22426
25237
|
/* search input for table */
|
|
22427
25238
|
, hasSearch && (
|
|
22428
|
-
|
|
22429
|
-
,
|
|
25239
|
+
reactExports.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 183}}
|
|
25240
|
+
, reactExports.createElement('input', {
|
|
22430
25241
|
type: "text",
|
|
22431
25242
|
value: search,
|
|
22432
25243
|
placeholder: "Search",
|
|
@@ -22435,7 +25246,7 @@ const Table$2 = (props) => {
|
|
|
22435
25246
|
}, __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 184}}
|
|
22436
25247
|
)
|
|
22437
25248
|
, search && (
|
|
22438
|
-
|
|
25249
|
+
reactExports.createElement(XMarkIcon$1, {
|
|
22439
25250
|
onClick: clearSearchData,
|
|
22440
25251
|
className: "s-datatable-icon", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 193}}
|
|
22441
25252
|
)
|
|
@@ -22443,14 +25254,14 @@ const Table$2 = (props) => {
|
|
|
22443
25254
|
)
|
|
22444
25255
|
)
|
|
22445
25256
|
)
|
|
22446
|
-
,
|
|
22447
|
-
,
|
|
22448
|
-
,
|
|
25257
|
+
, reactExports.createElement(TableStyled, {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 201}}
|
|
25258
|
+
, reactExports.createElement('thead', { className: "s-data-table_head h-[66px]" , __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 202}}
|
|
25259
|
+
, reactExports.createElement('tr', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 203}}
|
|
22449
25260
|
, secondaryColumns &&
|
|
22450
25261
|
secondaryColumns.length > 0 &&
|
|
22451
25262
|
secondaryColumns.map((column, index) => {
|
|
22452
25263
|
return (
|
|
22453
|
-
|
|
25264
|
+
reactExports.createElement('th', {
|
|
22454
25265
|
style: {
|
|
22455
25266
|
width: column.width
|
|
22456
25267
|
? column.width
|
|
@@ -22466,11 +25277,11 @@ const Table$2 = (props) => {
|
|
|
22466
25277
|
setSelectedColumn(column.field);
|
|
22467
25278
|
}, __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 208}}
|
|
22468
25279
|
|
|
22469
|
-
,
|
|
22470
|
-
,
|
|
22471
|
-
,
|
|
25280
|
+
, reactExports.createElement('div', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 224}}
|
|
25281
|
+
, reactExports.createElement('span', { className: "text-white", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 225}}, column.title)
|
|
25282
|
+
, reactExports.createElement('span', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 226}}
|
|
22472
25283
|
, column.sortable && (
|
|
22473
|
-
|
|
25284
|
+
reactExports.createElement(ChevronDownIcon$1, { className: "s-datatable-icon", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 228}} )
|
|
22474
25285
|
)
|
|
22475
25286
|
)
|
|
22476
25287
|
)
|
|
@@ -22479,13 +25290,13 @@ const Table$2 = (props) => {
|
|
|
22479
25290
|
})
|
|
22480
25291
|
)
|
|
22481
25292
|
)
|
|
22482
|
-
,
|
|
25293
|
+
, reactExports.createElement('tbody', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 237}}
|
|
22483
25294
|
, dataToShow &&
|
|
22484
25295
|
dataToShow.length > 0 &&
|
|
22485
25296
|
dataToShow.map((item, index) => {
|
|
22486
25297
|
return (
|
|
22487
|
-
|
|
22488
|
-
,
|
|
25298
|
+
reactExports.createElement(reactExports.Fragment, null
|
|
25299
|
+
, reactExports.createElement('tr', {
|
|
22489
25300
|
className: "h-[62px]",
|
|
22490
25301
|
style: { cursor: onRowClick ? "pointer" : "" },
|
|
22491
25302
|
onClick: () => rowClick(item),
|
|
@@ -22493,7 +25304,7 @@ const Table$2 = (props) => {
|
|
|
22493
25304
|
|
|
22494
25305
|
, secondaryColumns.map((column, index) => {
|
|
22495
25306
|
return (
|
|
22496
|
-
|
|
25307
|
+
reactExports.createElement('td', { className: "font-semibold", key: index, __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 251}}
|
|
22497
25308
|
, item[column.field]
|
|
22498
25309
|
)
|
|
22499
25310
|
);
|
|
@@ -22503,9 +25314,9 @@ const Table$2 = (props) => {
|
|
|
22503
25314
|
rowsToExpand.length > 0 &&
|
|
22504
25315
|
rowsToExpand.indexOf(item.id) > -1 &&
|
|
22505
25316
|
onRowExpandComponent && (
|
|
22506
|
-
|
|
22507
|
-
,
|
|
22508
|
-
,
|
|
25317
|
+
reactExports.createElement('tr', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 261}}
|
|
25318
|
+
, reactExports.createElement('td', { colSpan: secondaryColumns.length, __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 262}}
|
|
25319
|
+
, reactExports.createElement('div', { key: index, __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 263}}, onRowExpandComponent(item))
|
|
22509
25320
|
)
|
|
22510
25321
|
)
|
|
22511
25322
|
)
|
|
@@ -22513,16 +25324,16 @@ const Table$2 = (props) => {
|
|
|
22513
25324
|
);
|
|
22514
25325
|
})
|
|
22515
25326
|
, dataToShow && dataToShow.length === 0 && (
|
|
22516
|
-
|
|
22517
|
-
,
|
|
25327
|
+
reactExports.createElement('tr', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 271}}
|
|
25328
|
+
, reactExports.createElement('td', { colSpan: columns.length, __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 272}}, "No data found" )
|
|
22518
25329
|
)
|
|
22519
25330
|
)
|
|
22520
25331
|
)
|
|
22521
|
-
,
|
|
22522
|
-
,
|
|
22523
|
-
,
|
|
22524
|
-
,
|
|
22525
|
-
,
|
|
25332
|
+
, reactExports.createElement('tfoot', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 276}}
|
|
25333
|
+
, reactExports.createElement('tr', {__self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 277}}
|
|
25334
|
+
, reactExports.createElement('td', { colSpan: columns.length, __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 278}}
|
|
25335
|
+
, reactExports.createElement('div', { className: "s-datatable-foot_summary w-full flex" , __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 279}}
|
|
25336
|
+
, reactExports.createElement('button', {
|
|
22526
25337
|
onClick: () => {
|
|
22527
25338
|
goToPrevious();
|
|
22528
25339
|
},
|
|
@@ -22530,27 +25341,27 @@ const Table$2 = (props) => {
|
|
|
22530
25341
|
className: "bg-white p-1 rounded-sm" , __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 280}}
|
|
22531
25342
|
|
|
22532
25343
|
, currentPage == 1 ? (
|
|
22533
|
-
|
|
25344
|
+
reactExports.createElement('svg', {
|
|
22534
25345
|
width: "24",
|
|
22535
25346
|
height: "24",
|
|
22536
25347
|
viewBox: "0 0 24 24" ,
|
|
22537
25348
|
fill: "none",
|
|
22538
25349
|
xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 288}}
|
|
22539
25350
|
|
|
22540
|
-
,
|
|
25351
|
+
, reactExports.createElement('path', {
|
|
22541
25352
|
d: "M11.29 12L14.83 8.46001C15.0163 8.27265 15.1208 8.0192 15.1208 7.75501C15.1208 7.49082 15.0163 7.23737 14.83 7.05001C14.737 6.95628 14.6264 6.88189 14.5046 6.83112C14.3827 6.78035 14.252 6.75421 14.12 6.75421C13.988 6.75421 13.8573 6.78035 13.7354 6.83112C13.6136 6.88189 13.503 6.95628 13.41 7.05001L9.17 11.29C9.07628 11.383 9.00188 11.4936 8.95111 11.6154C8.90035 11.7373 8.87421 11.868 8.87421 12C8.87421 12.132 8.90035 12.2627 8.95111 12.3846C9.00188 12.5064 9.07628 12.617 9.17 12.71L13.41 17C13.5034 17.0927 13.6143 17.166 13.7361 17.2158C13.8579 17.2655 13.9884 17.2908 14.12 17.29C14.2516 17.2908 14.3821 17.2655 14.5039 17.2158C14.6257 17.166 14.7366 17.0927 14.83 17C15.0163 16.8126 15.1208 16.5592 15.1208 16.295C15.1208 16.0308 15.0163 15.7774 14.83 15.59L11.29 12Z" ,
|
|
22542
25353
|
fill: "#E8EEF7", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 295}}
|
|
22543
25354
|
)
|
|
22544
25355
|
)
|
|
22545
25356
|
) : (
|
|
22546
|
-
|
|
25357
|
+
reactExports.createElement('svg', {
|
|
22547
25358
|
width: "24",
|
|
22548
25359
|
height: "24",
|
|
22549
25360
|
viewBox: "0 0 24 24" ,
|
|
22550
25361
|
fill: "none",
|
|
22551
25362
|
xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 301}}
|
|
22552
25363
|
|
|
22553
|
-
,
|
|
25364
|
+
, reactExports.createElement('path', {
|
|
22554
25365
|
d: "M11.29 12L14.83 8.46001C15.0163 8.27265 15.1208 8.0192 15.1208 7.75501C15.1208 7.49082 15.0163 7.23737 14.83 7.05001C14.737 6.95628 14.6264 6.88189 14.5046 6.83112C14.3827 6.78035 14.252 6.75421 14.12 6.75421C13.988 6.75421 13.8573 6.78035 13.7354 6.83112C13.6136 6.88189 13.503 6.95628 13.41 7.05001L9.17 11.29C9.07628 11.383 9.00188 11.4936 8.95111 11.6154C8.90035 11.7373 8.87421 11.868 8.87421 12C8.87421 12.132 8.90035 12.2627 8.95111 12.3846C9.00188 12.5064 9.07628 12.617 9.17 12.71L13.41 17C13.5034 17.0927 13.6143 17.166 13.7361 17.2158C13.8579 17.2655 13.9884 17.2908 14.12 17.29C14.2516 17.2908 14.3821 17.2655 14.5039 17.2158C14.6257 17.166 14.7366 17.0927 14.83 17C15.0163 16.8126 15.1208 16.5592 15.1208 16.295C15.1208 16.0308 15.0163 15.7774 14.83 15.59L11.29 12Z" ,
|
|
22555
25366
|
fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 308}}
|
|
22556
25367
|
)
|
|
@@ -22570,7 +25381,7 @@ const Table$2 = (props) => {
|
|
|
22570
25381
|
return null;
|
|
22571
25382
|
}
|
|
22572
25383
|
return (
|
|
22573
|
-
|
|
25384
|
+
reactExports.createElement('button', {
|
|
22574
25385
|
key: item,
|
|
22575
25386
|
onClick: () => {
|
|
22576
25387
|
goToPage(item);
|
|
@@ -22585,7 +25396,7 @@ const Table$2 = (props) => {
|
|
|
22585
25396
|
)
|
|
22586
25397
|
);
|
|
22587
25398
|
})
|
|
22588
|
-
,
|
|
25399
|
+
, reactExports.createElement('button', {
|
|
22589
25400
|
onClick: () => {
|
|
22590
25401
|
goToNext();
|
|
22591
25402
|
},
|
|
@@ -22595,27 +25406,27 @@ const Table$2 = (props) => {
|
|
|
22595
25406
|
className: "bg-white p-1 rounded-sm" , __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 343}}
|
|
22596
25407
|
|
|
22597
25408
|
, currentPage == Math.ceil(allData.length / itemsPerPage) ? (
|
|
22598
|
-
|
|
25409
|
+
reactExports.createElement('svg', {
|
|
22599
25410
|
width: "24",
|
|
22600
25411
|
height: "24",
|
|
22601
25412
|
viewBox: "0 0 24 24" ,
|
|
22602
25413
|
fill: "none",
|
|
22603
25414
|
xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 353}}
|
|
22604
25415
|
|
|
22605
|
-
,
|
|
25416
|
+
, reactExports.createElement('path', {
|
|
22606
25417
|
d: "M14.83 11.29L10.59 7.05001C10.497 6.95628 10.3864 6.88189 10.2646 6.83112C10.1427 6.78035 10.012 6.75421 9.88 6.75421C9.74799 6.75421 9.61729 6.78035 9.49543 6.83112C9.37357 6.88189 9.26297 6.95628 9.17 7.05001C8.98375 7.23737 8.87921 7.49082 8.87921 7.75501C8.87921 8.0192 8.98375 8.27265 9.17 8.46001L12.71 12L9.17 15.54C8.98375 15.7274 8.87921 15.9808 8.87921 16.245C8.87921 16.5092 8.98375 16.7626 9.17 16.95C9.26344 17.0427 9.37426 17.116 9.4961 17.1658C9.61794 17.2155 9.7484 17.2408 9.88 17.24C10.0116 17.2408 10.1421 17.2155 10.2639 17.1658C10.3857 17.116 10.4966 17.0427 10.59 16.95L14.83 12.71C14.9237 12.617 14.9981 12.5064 15.0489 12.3846C15.0997 12.2627 15.1258 12.132 15.1258 12C15.1258 11.868 15.0997 11.7373 15.0489 11.6154C14.9981 11.4936 14.9237 11.383 14.83 11.29Z" ,
|
|
22607
25418
|
fill: "#E8EEF7", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 360}}
|
|
22608
25419
|
)
|
|
22609
25420
|
)
|
|
22610
25421
|
) : (
|
|
22611
|
-
|
|
25422
|
+
reactExports.createElement('svg', {
|
|
22612
25423
|
width: "24",
|
|
22613
25424
|
height: "24",
|
|
22614
25425
|
viewBox: "0 0 24 24" ,
|
|
22615
25426
|
fill: "none",
|
|
22616
25427
|
xmlns: "http://www.w3.org/2000/svg", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 366}}
|
|
22617
25428
|
|
|
22618
|
-
,
|
|
25429
|
+
, reactExports.createElement('path', {
|
|
22619
25430
|
d: "M14.83 11.29L10.59 7.05001C10.497 6.95628 10.3864 6.88189 10.2646 6.83112C10.1427 6.78035 10.012 6.75421 9.88 6.75421C9.74799 6.75421 9.61729 6.78035 9.49543 6.83112C9.37357 6.88189 9.26297 6.95628 9.17 7.05001C8.98375 7.23737 8.87921 7.49082 8.87921 7.75501C8.87921 8.0192 8.98375 8.27265 9.17 8.46001L12.71 12L9.17 15.54C8.98375 15.7274 8.87921 15.9808 8.87921 16.245C8.87921 16.5092 8.98375 16.7626 9.17 16.95C9.26344 17.0427 9.37426 17.116 9.4961 17.1658C9.61794 17.2155 9.7484 17.2408 9.88 17.24C10.0116 17.2408 10.1421 17.2155 10.2639 17.1658C10.3857 17.116 10.4966 17.0427 10.59 16.95L14.83 12.71C14.9237 12.617 14.9981 12.5064 15.0489 12.3846C15.0997 12.2627 15.1258 12.132 15.1258 12C15.1258 11.868 15.0997 11.7373 15.0489 11.6154C14.9981 11.4936 14.9237 11.383 14.83 11.29Z" ,
|
|
22620
25431
|
fill: "#070B12", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 373}}
|
|
22621
25432
|
)
|
|
@@ -22626,7 +25437,7 @@ const Table$2 = (props) => {
|
|
|
22626
25437
|
{dataToShow.length * currentPage} of {allData.length - 1}
|
|
22627
25438
|
</span> */
|
|
22628
25439
|
)
|
|
22629
|
-
,
|
|
25440
|
+
, reactExports.createElement('div', { className: "s-datable-foot_pagination", __self: undefined, __source: {fileName: _jsxFileName$a, lineNumber: 384}}
|
|
22630
25441
|
|
|
22631
25442
|
)
|
|
22632
25443
|
)
|
|
@@ -22716,9 +25527,9 @@ const TextArea = (props) => {
|
|
|
22716
25527
|
let {label,subtext,errMsg,disabled,required,value} = props;
|
|
22717
25528
|
|
|
22718
25529
|
// const [value,setValue]:any = useState('')
|
|
22719
|
-
const [borderColor,setBorderColor] =
|
|
22720
|
-
const [err,setErr] =
|
|
22721
|
-
const textFieldRef =
|
|
25530
|
+
const [borderColor,setBorderColor] = reactExports.useState('');
|
|
25531
|
+
const [err,setErr] = reactExports.useState(false);
|
|
25532
|
+
const textFieldRef = reactExports.useRef();
|
|
22722
25533
|
|
|
22723
25534
|
function validate(){
|
|
22724
25535
|
if (value){
|
|
@@ -23143,15 +25954,15 @@ const _jsxFileName$6 = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
23143
25954
|
|
|
23144
25955
|
const UpdateUserActions$1 = (props) => {
|
|
23145
25956
|
const {currentOptions,availableOptions,selOptions,titleAvailable,titleCurrent} = props;
|
|
23146
|
-
const [available,setAvailable] =
|
|
23147
|
-
const [currentUserOptions,setCurrentUserOptions] =
|
|
23148
|
-
const [selections,setSelections] =
|
|
25957
|
+
const [available,setAvailable] = reactExports.useState(availableOptions);
|
|
25958
|
+
const [currentUserOptions,setCurrentUserOptions] = reactExports.useState(currentOptions);
|
|
25959
|
+
const [selections,setSelections] = reactExports.useState({added:[],removed:[]});
|
|
23149
25960
|
|
|
23150
|
-
|
|
25961
|
+
reactExports.useEffect(()=>{
|
|
23151
25962
|
selOptions(selections);
|
|
23152
25963
|
},[]);
|
|
23153
25964
|
|
|
23154
|
-
|
|
25965
|
+
reactExports.useEffect(()=>{
|
|
23155
25966
|
const actionsListContainer = document.querySelectorAll('.actionsList');
|
|
23156
25967
|
actionsListContainer.forEach((container)=>{
|
|
23157
25968
|
container.addEventListener('mouseover',function(){
|
|
@@ -23395,16 +26206,16 @@ const _jsxFileName$5 = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compon
|
|
|
23395
26206
|
|
|
23396
26207
|
const UpdateUserActions = (props) => {
|
|
23397
26208
|
const {currentOptions,availableOptions,supplementaryOptions,selOptions,titleAvailable,titleCurrent} = props;
|
|
23398
|
-
const [available,setAvailable] =
|
|
23399
|
-
const [supOptions,setSupOptions] =
|
|
23400
|
-
const [currentUserOptions,setCurrentUserOptions] =
|
|
23401
|
-
const [selections,setSelections] =
|
|
26209
|
+
const [available,setAvailable] = reactExports.useState(availableOptions);
|
|
26210
|
+
const [supOptions,setSupOptions] = reactExports.useState(supplementaryOptions);
|
|
26211
|
+
const [currentUserOptions,setCurrentUserOptions] = reactExports.useState(currentOptions);
|
|
26212
|
+
const [selections,setSelections] = reactExports.useState({added:[],removed:[]});
|
|
23402
26213
|
|
|
23403
|
-
|
|
26214
|
+
reactExports.useEffect(()=>{
|
|
23404
26215
|
selOptions(selections);
|
|
23405
26216
|
},[]);
|
|
23406
26217
|
|
|
23407
|
-
|
|
26218
|
+
reactExports.useEffect(()=>{
|
|
23408
26219
|
const actionsListContainer = document.querySelectorAll('.actionsList');
|
|
23409
26220
|
actionsListContainer.forEach((container)=>{
|
|
23410
26221
|
container.addEventListener('mouseover',function(){
|
|
@@ -23641,14 +26452,14 @@ const NothingContent$1 = styled.div`
|
|
|
23641
26452
|
const _jsxFileName$4 = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\UserRolesTable\\UserRolesTable.tsx";
|
|
23642
26453
|
const UserRolesTable = (props) => {
|
|
23643
26454
|
const {roles,callback,srchActive} = props;
|
|
23644
|
-
const [currentPage,setCurrentPage] =
|
|
23645
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
23646
|
-
const [dispRoles,setDispRoles] =
|
|
23647
|
-
const [dispRolesOri,setDispRolesOri] =
|
|
23648
|
-
const [displayContent,setDisplayContent] =
|
|
23649
|
-
const [sortDir,setSortDir] =
|
|
23650
|
-
|
|
23651
|
-
|
|
26455
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
26456
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
26457
|
+
const [dispRoles,setDispRoles] = reactExports.useState([]);
|
|
26458
|
+
const [dispRolesOri,setDispRolesOri] = reactExports.useState(roles);
|
|
26459
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
26460
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
26461
|
+
|
|
26462
|
+
reactExports.useEffect(()=>{
|
|
23652
26463
|
//pagination
|
|
23653
26464
|
if (dispRolesOri.length > 0){
|
|
23654
26465
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -23661,14 +26472,14 @@ const UserRolesTable = (props) => {
|
|
|
23661
26472
|
setDisplayContent(true);
|
|
23662
26473
|
},[dispRolesOri,currentPage]);
|
|
23663
26474
|
|
|
23664
|
-
|
|
26475
|
+
reactExports.useEffect(()=>{
|
|
23665
26476
|
setDispRolesOri(roles.sort((a,b) => {
|
|
23666
26477
|
if(a.roleName < b.roleName) return -1
|
|
23667
26478
|
return 1
|
|
23668
26479
|
}));
|
|
23669
26480
|
},[roles]);
|
|
23670
26481
|
|
|
23671
|
-
|
|
26482
|
+
reactExports.useEffect(()=>{
|
|
23672
26483
|
if (srchActive) setCurrentPage(1);
|
|
23673
26484
|
},[srchActive]);
|
|
23674
26485
|
|
|
@@ -23850,14 +26661,14 @@ const NothingContent = styled.div`
|
|
|
23850
26661
|
const _jsxFileName$3 = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\UsersTable\\UsersTable.tsx";
|
|
23851
26662
|
const UsersTable = (props) => {
|
|
23852
26663
|
const {users,callback,srchActive} = props;
|
|
23853
|
-
const [currentPage,setCurrentPage] =
|
|
23854
|
-
const [itemsPerPage,setItemsPerPage] =
|
|
23855
|
-
const [dispUsers,setDispUsers] =
|
|
23856
|
-
const [dispUsersOri,setDispUsersOri] =
|
|
23857
|
-
const [displayContent,setDisplayContent] =
|
|
23858
|
-
const [sortDir,setSortDir] =
|
|
23859
|
-
|
|
23860
|
-
|
|
26664
|
+
const [currentPage,setCurrentPage] = reactExports.useState(1);
|
|
26665
|
+
const [itemsPerPage,setItemsPerPage] = reactExports.useState(10);
|
|
26666
|
+
const [dispUsers,setDispUsers] = reactExports.useState([]);
|
|
26667
|
+
const [dispUsersOri,setDispUsersOri] = reactExports.useState(users);
|
|
26668
|
+
const [displayContent,setDisplayContent] = reactExports.useState(false); //for handling the display of page content after data is available
|
|
26669
|
+
const [sortDir,setSortDir] = reactExports.useState('desc');
|
|
26670
|
+
|
|
26671
|
+
reactExports.useEffect(()=>{
|
|
23861
26672
|
//pagination
|
|
23862
26673
|
if (dispUsersOri.length > 0){
|
|
23863
26674
|
const lastItemIndex = currentPage * itemsPerPage;
|
|
@@ -23870,14 +26681,14 @@ const UsersTable = (props) => {
|
|
|
23870
26681
|
setDisplayContent(true);
|
|
23871
26682
|
},[dispUsersOri,currentPage]);
|
|
23872
26683
|
|
|
23873
|
-
|
|
26684
|
+
reactExports.useEffect(()=>{
|
|
23874
26685
|
setDispUsersOri(users.sort((a,b) => {
|
|
23875
26686
|
if(a.name < b.name) return -1
|
|
23876
26687
|
return 1
|
|
23877
26688
|
}));
|
|
23878
26689
|
},[users]);
|
|
23879
26690
|
|
|
23880
|
-
|
|
26691
|
+
reactExports.useEffect(()=>{
|
|
23881
26692
|
if (srchActive) setCurrentPage(1);
|
|
23882
26693
|
},[srchActive]);
|
|
23883
26694
|
|
|
@@ -24088,7 +26899,7 @@ const _jsxFileName = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\componen
|
|
|
24088
26899
|
const PopupModal = (props) => {
|
|
24089
26900
|
const {title,content,secondaryAction,primaryAction,closeFxn,primaryBtnText,secondaryBtnText} = props;
|
|
24090
26901
|
|
|
24091
|
-
|
|
26902
|
+
reactExports.useEffect(()=>{
|
|
24092
26903
|
(document.querySelector('body') ).classList.add('side-panel-open');
|
|
24093
26904
|
},[]);
|
|
24094
26905
|
|