acsi-core 1.2.0 → 1.2.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/dist/index.js +49 -634
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +36 -621
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
- package/dist/components/MSALRedirectHandler/index.d.ts +0 -14
- package/dist/components/UpdateNotifier.d.ts +0 -3
- package/dist/configs/api.d.ts +0 -3
- package/dist/configs/api_removed.d.ts +0 -3
- package/dist/utils/configLoader.d.ts +0 -2
- package/dist/utils/hooks/useServiceWorker.d.ts +0 -1
- package/dist/utils/msalInstance.d.ts +0 -38
package/dist/index.modern.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createBrowserHistory } from 'history';
|
|
1
2
|
import { createAction, createReducer, configureStore } from '@reduxjs/toolkit';
|
|
2
3
|
import React, { useState, useRef, useEffect, useCallback, Fragment } from 'react';
|
|
3
4
|
import { useGoogleLogin } from '@react-oauth/google';
|
|
@@ -27,592 +28,6 @@ import { init as init$1, replayIntegration } from '@sentry/react';
|
|
|
27
28
|
import { FaCaretDown } from 'react-icons/fa';
|
|
28
29
|
import CreatableSelect from 'react-select/creatable';
|
|
29
30
|
|
|
30
|
-
function _extends() {
|
|
31
|
-
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
32
|
-
for (var e = 1; e < arguments.length; e++) {
|
|
33
|
-
var t = arguments[e];
|
|
34
|
-
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
35
|
-
}
|
|
36
|
-
return n;
|
|
37
|
-
}, _extends.apply(null, arguments);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
function isAbsolute(pathname) {
|
|
41
|
-
return pathname.charAt(0) === '/';
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
// About 1.5x faster than the two-arg version of Array#splice()
|
|
45
|
-
function spliceOne(list, index) {
|
|
46
|
-
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
|
|
47
|
-
list[i] = list[k];
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
list.pop();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// This implementation is based heavily on node's url.parse
|
|
54
|
-
function resolvePathname(to, from) {
|
|
55
|
-
if (from === undefined) from = '';
|
|
56
|
-
|
|
57
|
-
var toParts = (to && to.split('/')) || [];
|
|
58
|
-
var fromParts = (from && from.split('/')) || [];
|
|
59
|
-
|
|
60
|
-
var isToAbs = to && isAbsolute(to);
|
|
61
|
-
var isFromAbs = from && isAbsolute(from);
|
|
62
|
-
var mustEndAbs = isToAbs || isFromAbs;
|
|
63
|
-
|
|
64
|
-
if (to && isAbsolute(to)) {
|
|
65
|
-
// to is absolute
|
|
66
|
-
fromParts = toParts;
|
|
67
|
-
} else if (toParts.length) {
|
|
68
|
-
// to is relative, drop the filename
|
|
69
|
-
fromParts.pop();
|
|
70
|
-
fromParts = fromParts.concat(toParts);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
if (!fromParts.length) return '/';
|
|
74
|
-
|
|
75
|
-
var hasTrailingSlash;
|
|
76
|
-
if (fromParts.length) {
|
|
77
|
-
var last = fromParts[fromParts.length - 1];
|
|
78
|
-
hasTrailingSlash = last === '.' || last === '..' || last === '';
|
|
79
|
-
} else {
|
|
80
|
-
hasTrailingSlash = false;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
var up = 0;
|
|
84
|
-
for (var i = fromParts.length; i >= 0; i--) {
|
|
85
|
-
var part = fromParts[i];
|
|
86
|
-
|
|
87
|
-
if (part === '.') {
|
|
88
|
-
spliceOne(fromParts, i);
|
|
89
|
-
} else if (part === '..') {
|
|
90
|
-
spliceOne(fromParts, i);
|
|
91
|
-
up++;
|
|
92
|
-
} else if (up) {
|
|
93
|
-
spliceOne(fromParts, i);
|
|
94
|
-
up--;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');
|
|
99
|
-
|
|
100
|
-
if (
|
|
101
|
-
mustEndAbs &&
|
|
102
|
-
fromParts[0] !== '' &&
|
|
103
|
-
(!fromParts[0] || !isAbsolute(fromParts[0]))
|
|
104
|
-
)
|
|
105
|
-
fromParts.unshift('');
|
|
106
|
-
|
|
107
|
-
var result = fromParts.join('/');
|
|
108
|
-
|
|
109
|
-
if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
|
|
110
|
-
|
|
111
|
-
return result;
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
var isProduction = process.env.NODE_ENV === 'production';
|
|
115
|
-
function warning(condition, message) {
|
|
116
|
-
if (!isProduction) {
|
|
117
|
-
if (condition) {
|
|
118
|
-
return;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
var text = "Warning: " + message;
|
|
122
|
-
|
|
123
|
-
if (typeof console !== 'undefined') {
|
|
124
|
-
console.warn(text);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
try {
|
|
128
|
-
throw Error(text);
|
|
129
|
-
} catch (x) {}
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
var isProduction$1 = process.env.NODE_ENV === 'production';
|
|
134
|
-
var prefix = 'Invariant failed';
|
|
135
|
-
function invariant(condition, message) {
|
|
136
|
-
if (condition) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
if (isProduction$1) {
|
|
140
|
-
throw new Error(prefix);
|
|
141
|
-
}
|
|
142
|
-
var provided = typeof message === 'function' ? message() : message;
|
|
143
|
-
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
144
|
-
throw new Error(value);
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
function addLeadingSlash(path) {
|
|
148
|
-
return path.charAt(0) === '/' ? path : '/' + path;
|
|
149
|
-
}
|
|
150
|
-
function hasBasename(path, prefix) {
|
|
151
|
-
return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
|
|
152
|
-
}
|
|
153
|
-
function stripBasename(path, prefix) {
|
|
154
|
-
return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
|
|
155
|
-
}
|
|
156
|
-
function stripTrailingSlash(path) {
|
|
157
|
-
return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
|
|
158
|
-
}
|
|
159
|
-
function parsePath(path) {
|
|
160
|
-
var pathname = path || '/';
|
|
161
|
-
var search = '';
|
|
162
|
-
var hash = '';
|
|
163
|
-
var hashIndex = pathname.indexOf('#');
|
|
164
|
-
|
|
165
|
-
if (hashIndex !== -1) {
|
|
166
|
-
hash = pathname.substr(hashIndex);
|
|
167
|
-
pathname = pathname.substr(0, hashIndex);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
var searchIndex = pathname.indexOf('?');
|
|
171
|
-
|
|
172
|
-
if (searchIndex !== -1) {
|
|
173
|
-
search = pathname.substr(searchIndex);
|
|
174
|
-
pathname = pathname.substr(0, searchIndex);
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
return {
|
|
178
|
-
pathname: pathname,
|
|
179
|
-
search: search === '?' ? '' : search,
|
|
180
|
-
hash: hash === '#' ? '' : hash
|
|
181
|
-
};
|
|
182
|
-
}
|
|
183
|
-
function createPath(location) {
|
|
184
|
-
var pathname = location.pathname,
|
|
185
|
-
search = location.search,
|
|
186
|
-
hash = location.hash;
|
|
187
|
-
var path = pathname || '/';
|
|
188
|
-
if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
|
|
189
|
-
if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
|
|
190
|
-
return path;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function createLocation(path, state, key, currentLocation) {
|
|
194
|
-
var location;
|
|
195
|
-
|
|
196
|
-
if (typeof path === 'string') {
|
|
197
|
-
// Two-arg form: push(path, state)
|
|
198
|
-
location = parsePath(path);
|
|
199
|
-
location.state = state;
|
|
200
|
-
} else {
|
|
201
|
-
// One-arg form: push(location)
|
|
202
|
-
location = _extends({}, path);
|
|
203
|
-
if (location.pathname === undefined) location.pathname = '';
|
|
204
|
-
|
|
205
|
-
if (location.search) {
|
|
206
|
-
if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
|
|
207
|
-
} else {
|
|
208
|
-
location.search = '';
|
|
209
|
-
}
|
|
210
|
-
|
|
211
|
-
if (location.hash) {
|
|
212
|
-
if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
|
|
213
|
-
} else {
|
|
214
|
-
location.hash = '';
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (state !== undefined && location.state === undefined) location.state = state;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
try {
|
|
221
|
-
location.pathname = decodeURI(location.pathname);
|
|
222
|
-
} catch (e) {
|
|
223
|
-
if (e instanceof URIError) {
|
|
224
|
-
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
|
|
225
|
-
} else {
|
|
226
|
-
throw e;
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
if (key) location.key = key;
|
|
231
|
-
|
|
232
|
-
if (currentLocation) {
|
|
233
|
-
// Resolve incomplete/relative pathname relative to current location.
|
|
234
|
-
if (!location.pathname) {
|
|
235
|
-
location.pathname = currentLocation.pathname;
|
|
236
|
-
} else if (location.pathname.charAt(0) !== '/') {
|
|
237
|
-
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
|
238
|
-
}
|
|
239
|
-
} else {
|
|
240
|
-
// When there is no prior location and pathname is empty, set it to /
|
|
241
|
-
if (!location.pathname) {
|
|
242
|
-
location.pathname = '/';
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
return location;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
function createTransitionManager() {
|
|
250
|
-
var prompt = null;
|
|
251
|
-
|
|
252
|
-
function setPrompt(nextPrompt) {
|
|
253
|
-
process.env.NODE_ENV !== "production" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;
|
|
254
|
-
prompt = nextPrompt;
|
|
255
|
-
return function () {
|
|
256
|
-
if (prompt === nextPrompt) prompt = null;
|
|
257
|
-
};
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
function confirmTransitionTo(location, action, getUserConfirmation, callback) {
|
|
261
|
-
// TODO: If another transition starts while we're still confirming
|
|
262
|
-
// the previous one, we may end up in a weird state. Figure out the
|
|
263
|
-
// best way to handle this.
|
|
264
|
-
if (prompt != null) {
|
|
265
|
-
var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
|
|
266
|
-
|
|
267
|
-
if (typeof result === 'string') {
|
|
268
|
-
if (typeof getUserConfirmation === 'function') {
|
|
269
|
-
getUserConfirmation(result, callback);
|
|
270
|
-
} else {
|
|
271
|
-
process.env.NODE_ENV !== "production" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;
|
|
272
|
-
callback(true);
|
|
273
|
-
}
|
|
274
|
-
} else {
|
|
275
|
-
// Return false from a transition hook to cancel the transition.
|
|
276
|
-
callback(result !== false);
|
|
277
|
-
}
|
|
278
|
-
} else {
|
|
279
|
-
callback(true);
|
|
280
|
-
}
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
var listeners = [];
|
|
284
|
-
|
|
285
|
-
function appendListener(fn) {
|
|
286
|
-
var isActive = true;
|
|
287
|
-
|
|
288
|
-
function listener() {
|
|
289
|
-
if (isActive) fn.apply(void 0, arguments);
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
listeners.push(listener);
|
|
293
|
-
return function () {
|
|
294
|
-
isActive = false;
|
|
295
|
-
listeners = listeners.filter(function (item) {
|
|
296
|
-
return item !== listener;
|
|
297
|
-
});
|
|
298
|
-
};
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
function notifyListeners() {
|
|
302
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
303
|
-
args[_key] = arguments[_key];
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
listeners.forEach(function (listener) {
|
|
307
|
-
return listener.apply(void 0, args);
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return {
|
|
312
|
-
setPrompt: setPrompt,
|
|
313
|
-
confirmTransitionTo: confirmTransitionTo,
|
|
314
|
-
appendListener: appendListener,
|
|
315
|
-
notifyListeners: notifyListeners
|
|
316
|
-
};
|
|
317
|
-
}
|
|
318
|
-
|
|
319
|
-
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
320
|
-
function getConfirmation(message, callback) {
|
|
321
|
-
callback(window.confirm(message)); // eslint-disable-line no-alert
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Returns true if the HTML5 history API is supported. Taken from Modernizr.
|
|
325
|
-
*
|
|
326
|
-
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
|
|
327
|
-
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
|
|
328
|
-
* changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
|
|
329
|
-
*/
|
|
330
|
-
|
|
331
|
-
function supportsHistory() {
|
|
332
|
-
var ua = window.navigator.userAgent;
|
|
333
|
-
if ((ua.indexOf('Android 2.') !== -1 || ua.indexOf('Android 4.0') !== -1) && ua.indexOf('Mobile Safari') !== -1 && ua.indexOf('Chrome') === -1 && ua.indexOf('Windows Phone') === -1) return false;
|
|
334
|
-
return window.history && 'pushState' in window.history;
|
|
335
|
-
}
|
|
336
|
-
/**
|
|
337
|
-
* Returns true if browser fires popstate on hash change.
|
|
338
|
-
* IE10 and IE11 do not.
|
|
339
|
-
*/
|
|
340
|
-
|
|
341
|
-
function supportsPopStateOnHashChange() {
|
|
342
|
-
return window.navigator.userAgent.indexOf('Trident') === -1;
|
|
343
|
-
}
|
|
344
|
-
/**
|
|
345
|
-
* Returns true if a given popstate event is an extraneous WebKit event.
|
|
346
|
-
* Accounts for the fact that Chrome on iOS fires real popstate events
|
|
347
|
-
* containing undefined state when pressing the back button.
|
|
348
|
-
*/
|
|
349
|
-
|
|
350
|
-
function isExtraneousPopstateEvent(event) {
|
|
351
|
-
return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
var PopStateEvent = 'popstate';
|
|
355
|
-
var HashChangeEvent = 'hashchange';
|
|
356
|
-
|
|
357
|
-
function getHistoryState() {
|
|
358
|
-
try {
|
|
359
|
-
return window.history.state || {};
|
|
360
|
-
} catch (e) {
|
|
361
|
-
// IE 11 sometimes throws when accessing window.history.state
|
|
362
|
-
// See https://github.com/ReactTraining/history/pull/289
|
|
363
|
-
return {};
|
|
364
|
-
}
|
|
365
|
-
}
|
|
366
|
-
/**
|
|
367
|
-
* Creates a history object that uses the HTML5 history API including
|
|
368
|
-
* pushState, replaceState, and the popstate event.
|
|
369
|
-
*/
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
function createBrowserHistory(props) {
|
|
373
|
-
if (props === void 0) {
|
|
374
|
-
props = {};
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
!canUseDOM ? process.env.NODE_ENV !== "production" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;
|
|
378
|
-
var globalHistory = window.history;
|
|
379
|
-
var canUseHistory = supportsHistory();
|
|
380
|
-
var needsHashChangeListener = !supportsPopStateOnHashChange();
|
|
381
|
-
var _props = props,
|
|
382
|
-
_props$forceRefresh = _props.forceRefresh,
|
|
383
|
-
forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
|
|
384
|
-
_props$getUserConfirm = _props.getUserConfirmation,
|
|
385
|
-
getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
|
|
386
|
-
_props$keyLength = _props.keyLength,
|
|
387
|
-
keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
|
|
388
|
-
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
|
|
389
|
-
|
|
390
|
-
function getDOMLocation(historyState) {
|
|
391
|
-
var _ref = historyState || {},
|
|
392
|
-
key = _ref.key,
|
|
393
|
-
state = _ref.state;
|
|
394
|
-
|
|
395
|
-
var _window$location = window.location,
|
|
396
|
-
pathname = _window$location.pathname,
|
|
397
|
-
search = _window$location.search,
|
|
398
|
-
hash = _window$location.hash;
|
|
399
|
-
var path = pathname + search + hash;
|
|
400
|
-
process.env.NODE_ENV !== "production" ? warning(!basename || hasBasename(path, basename), 'You are attempting to use a basename on a page whose URL path does not begin ' + 'with the basename. Expected path "' + path + '" to begin with "' + basename + '".') : void 0;
|
|
401
|
-
if (basename) path = stripBasename(path, basename);
|
|
402
|
-
return createLocation(path, state, key);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
function createKey() {
|
|
406
|
-
return Math.random().toString(36).substr(2, keyLength);
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
var transitionManager = createTransitionManager();
|
|
410
|
-
|
|
411
|
-
function setState(nextState) {
|
|
412
|
-
_extends(history, nextState);
|
|
413
|
-
|
|
414
|
-
history.length = globalHistory.length;
|
|
415
|
-
transitionManager.notifyListeners(history.location, history.action);
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
function handlePopState(event) {
|
|
419
|
-
// Ignore extraneous popstate events in WebKit.
|
|
420
|
-
if (isExtraneousPopstateEvent(event)) return;
|
|
421
|
-
handlePop(getDOMLocation(event.state));
|
|
422
|
-
}
|
|
423
|
-
|
|
424
|
-
function handleHashChange() {
|
|
425
|
-
handlePop(getDOMLocation(getHistoryState()));
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
var forceNextPop = false;
|
|
429
|
-
|
|
430
|
-
function handlePop(location) {
|
|
431
|
-
if (forceNextPop) {
|
|
432
|
-
forceNextPop = false;
|
|
433
|
-
setState();
|
|
434
|
-
} else {
|
|
435
|
-
var action = 'POP';
|
|
436
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
|
437
|
-
if (ok) {
|
|
438
|
-
setState({
|
|
439
|
-
action: action,
|
|
440
|
-
location: location
|
|
441
|
-
});
|
|
442
|
-
} else {
|
|
443
|
-
revertPop(location);
|
|
444
|
-
}
|
|
445
|
-
});
|
|
446
|
-
}
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
function revertPop(fromLocation) {
|
|
450
|
-
var toLocation = history.location; // TODO: We could probably make this more reliable by
|
|
451
|
-
// keeping a list of keys we've seen in sessionStorage.
|
|
452
|
-
// Instead, we just default to 0 for keys we don't know.
|
|
453
|
-
|
|
454
|
-
var toIndex = allKeys.indexOf(toLocation.key);
|
|
455
|
-
if (toIndex === -1) toIndex = 0;
|
|
456
|
-
var fromIndex = allKeys.indexOf(fromLocation.key);
|
|
457
|
-
if (fromIndex === -1) fromIndex = 0;
|
|
458
|
-
var delta = toIndex - fromIndex;
|
|
459
|
-
|
|
460
|
-
if (delta) {
|
|
461
|
-
forceNextPop = true;
|
|
462
|
-
go(delta);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
|
|
466
|
-
var initialLocation = getDOMLocation(getHistoryState());
|
|
467
|
-
var allKeys = [initialLocation.key]; // Public interface
|
|
468
|
-
|
|
469
|
-
function createHref(location) {
|
|
470
|
-
return basename + createPath(location);
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
function push(path, state) {
|
|
474
|
-
process.env.NODE_ENV !== "production" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to push when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
|
|
475
|
-
var action = 'PUSH';
|
|
476
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
477
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
|
478
|
-
if (!ok) return;
|
|
479
|
-
var href = createHref(location);
|
|
480
|
-
var key = location.key,
|
|
481
|
-
state = location.state;
|
|
482
|
-
|
|
483
|
-
if (canUseHistory) {
|
|
484
|
-
globalHistory.pushState({
|
|
485
|
-
key: key,
|
|
486
|
-
state: state
|
|
487
|
-
}, null, href);
|
|
488
|
-
|
|
489
|
-
if (forceRefresh) {
|
|
490
|
-
window.location.href = href;
|
|
491
|
-
} else {
|
|
492
|
-
var prevIndex = allKeys.indexOf(history.location.key);
|
|
493
|
-
var nextKeys = allKeys.slice(0, prevIndex + 1);
|
|
494
|
-
nextKeys.push(location.key);
|
|
495
|
-
allKeys = nextKeys;
|
|
496
|
-
setState({
|
|
497
|
-
action: action,
|
|
498
|
-
location: location
|
|
499
|
-
});
|
|
500
|
-
}
|
|
501
|
-
} else {
|
|
502
|
-
process.env.NODE_ENV !== "production" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;
|
|
503
|
-
window.location.href = href;
|
|
504
|
-
}
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
function replace(path, state) {
|
|
509
|
-
process.env.NODE_ENV !== "production" ? warning(!(typeof path === 'object' && path.state !== undefined && state !== undefined), 'You should avoid providing a 2nd state argument to replace when the 1st ' + 'argument is a location-like object that already has state; it is ignored') : void 0;
|
|
510
|
-
var action = 'REPLACE';
|
|
511
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
512
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
|
513
|
-
if (!ok) return;
|
|
514
|
-
var href = createHref(location);
|
|
515
|
-
var key = location.key,
|
|
516
|
-
state = location.state;
|
|
517
|
-
|
|
518
|
-
if (canUseHistory) {
|
|
519
|
-
globalHistory.replaceState({
|
|
520
|
-
key: key,
|
|
521
|
-
state: state
|
|
522
|
-
}, null, href);
|
|
523
|
-
|
|
524
|
-
if (forceRefresh) {
|
|
525
|
-
window.location.replace(href);
|
|
526
|
-
} else {
|
|
527
|
-
var prevIndex = allKeys.indexOf(history.location.key);
|
|
528
|
-
if (prevIndex !== -1) allKeys[prevIndex] = location.key;
|
|
529
|
-
setState({
|
|
530
|
-
action: action,
|
|
531
|
-
location: location
|
|
532
|
-
});
|
|
533
|
-
}
|
|
534
|
-
} else {
|
|
535
|
-
process.env.NODE_ENV !== "production" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;
|
|
536
|
-
window.location.replace(href);
|
|
537
|
-
}
|
|
538
|
-
});
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
function go(n) {
|
|
542
|
-
globalHistory.go(n);
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
function goBack() {
|
|
546
|
-
go(-1);
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
function goForward() {
|
|
550
|
-
go(1);
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
var listenerCount = 0;
|
|
554
|
-
|
|
555
|
-
function checkDOMListeners(delta) {
|
|
556
|
-
listenerCount += delta;
|
|
557
|
-
|
|
558
|
-
if (listenerCount === 1 && delta === 1) {
|
|
559
|
-
window.addEventListener(PopStateEvent, handlePopState);
|
|
560
|
-
if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
|
|
561
|
-
} else if (listenerCount === 0) {
|
|
562
|
-
window.removeEventListener(PopStateEvent, handlePopState);
|
|
563
|
-
if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
|
|
564
|
-
}
|
|
565
|
-
}
|
|
566
|
-
|
|
567
|
-
var isBlocked = false;
|
|
568
|
-
|
|
569
|
-
function block(prompt) {
|
|
570
|
-
if (prompt === void 0) {
|
|
571
|
-
prompt = false;
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
var unblock = transitionManager.setPrompt(prompt);
|
|
575
|
-
|
|
576
|
-
if (!isBlocked) {
|
|
577
|
-
checkDOMListeners(1);
|
|
578
|
-
isBlocked = true;
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
return function () {
|
|
582
|
-
if (isBlocked) {
|
|
583
|
-
isBlocked = false;
|
|
584
|
-
checkDOMListeners(-1);
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
return unblock();
|
|
588
|
-
};
|
|
589
|
-
}
|
|
590
|
-
|
|
591
|
-
function listen(listener) {
|
|
592
|
-
var unlisten = transitionManager.appendListener(listener);
|
|
593
|
-
checkDOMListeners(1);
|
|
594
|
-
return function () {
|
|
595
|
-
checkDOMListeners(-1);
|
|
596
|
-
unlisten();
|
|
597
|
-
};
|
|
598
|
-
}
|
|
599
|
-
|
|
600
|
-
var history = {
|
|
601
|
-
length: globalHistory.length,
|
|
602
|
-
action: 'POP',
|
|
603
|
-
location: initialLocation,
|
|
604
|
-
createHref: createHref,
|
|
605
|
-
push: push,
|
|
606
|
-
replace: replace,
|
|
607
|
-
go: go,
|
|
608
|
-
goBack: goBack,
|
|
609
|
-
goForward: goForward,
|
|
610
|
-
block: block,
|
|
611
|
-
listen: listen
|
|
612
|
-
};
|
|
613
|
-
return history;
|
|
614
|
-
}
|
|
615
|
-
|
|
616
31
|
var setLoading = createAction("common/setLoading");
|
|
617
32
|
var setLoadingPage = createAction("common/setLoadingPage");
|
|
618
33
|
var setAlert = createAction("common/setAlert");
|
|
@@ -695,14 +110,14 @@ function _createForOfIteratorHelperLoose(r, e) {
|
|
|
695
110
|
}
|
|
696
111
|
throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
697
112
|
}
|
|
698
|
-
function _extends
|
|
699
|
-
return _extends
|
|
113
|
+
function _extends() {
|
|
114
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
700
115
|
for (var e = 1; e < arguments.length; e++) {
|
|
701
116
|
var t = arguments[e];
|
|
702
117
|
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
703
118
|
}
|
|
704
119
|
return n;
|
|
705
|
-
}, _extends
|
|
120
|
+
}, _extends.apply(null, arguments);
|
|
706
121
|
}
|
|
707
122
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
708
123
|
if (null == r) return {};
|
|
@@ -867,7 +282,7 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
867
282
|
onChange(name, newValue);
|
|
868
283
|
};
|
|
869
284
|
var controlStyle = function controlStyle(base, state) {
|
|
870
|
-
var styles = _extends
|
|
285
|
+
var styles = _extends({}, base, {
|
|
871
286
|
fontSize: "14px",
|
|
872
287
|
fontWeight: "400",
|
|
873
288
|
padding: "0 4px",
|
|
@@ -896,7 +311,7 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
896
311
|
return styles;
|
|
897
312
|
};
|
|
898
313
|
var inputStyles = function inputStyles(base) {
|
|
899
|
-
var styles = _extends
|
|
314
|
+
var styles = _extends({}, base, {
|
|
900
315
|
margin: "0",
|
|
901
316
|
padding: "0",
|
|
902
317
|
color: "inherit"
|
|
@@ -904,13 +319,13 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
904
319
|
return styles;
|
|
905
320
|
};
|
|
906
321
|
var placeholderStyles = function placeholderStyles(base) {
|
|
907
|
-
var styles = _extends
|
|
322
|
+
var styles = _extends({}, base, {
|
|
908
323
|
color: COLORS.lightGray
|
|
909
324
|
});
|
|
910
325
|
return styles;
|
|
911
326
|
};
|
|
912
327
|
var dropdownIndicatorStyles = function dropdownIndicatorStyles(base) {
|
|
913
|
-
var styles = _extends
|
|
328
|
+
var styles = _extends({}, base, {
|
|
914
329
|
position: "relative",
|
|
915
330
|
top: "-4px",
|
|
916
331
|
padding: "8px 0"
|
|
@@ -918,7 +333,7 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
918
333
|
return styles;
|
|
919
334
|
};
|
|
920
335
|
var valueContainerStyles = function valueContainerStyles(base) {
|
|
921
|
-
var styles = _extends
|
|
336
|
+
var styles = _extends({}, base, {
|
|
922
337
|
height: isMulti ? undefined : "32px",
|
|
923
338
|
position: "relative",
|
|
924
339
|
top: "-3px"
|
|
@@ -926,11 +341,11 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
926
341
|
return styles;
|
|
927
342
|
};
|
|
928
343
|
var singleValueStyles = function singleValueStyles(base) {
|
|
929
|
-
var styles = _extends
|
|
344
|
+
var styles = _extends({}, base);
|
|
930
345
|
return styles;
|
|
931
346
|
};
|
|
932
347
|
var optionStyles = function optionStyles(base, state) {
|
|
933
|
-
var styles = _extends
|
|
348
|
+
var styles = _extends({}, base, {
|
|
934
349
|
padding: "8px",
|
|
935
350
|
borderRadius: "8px",
|
|
936
351
|
cursor: "pointer",
|
|
@@ -944,13 +359,13 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
944
359
|
return styles;
|
|
945
360
|
};
|
|
946
361
|
var indicatorsContainerStyles = function indicatorsContainerStyles(base) {
|
|
947
|
-
var styles = _extends
|
|
362
|
+
var styles = _extends({}, base, {
|
|
948
363
|
display: type === "no-outline" ? "none" : "block"
|
|
949
364
|
});
|
|
950
365
|
return styles;
|
|
951
366
|
};
|
|
952
367
|
var multiValueStyles = function multiValueStyles(base) {
|
|
953
|
-
var styles = _extends
|
|
368
|
+
var styles = _extends({}, base, {
|
|
954
369
|
backgroundColor: COLORS.lightBlue,
|
|
955
370
|
borderRadius: "4px",
|
|
956
371
|
padding: "2px 8px",
|
|
@@ -962,14 +377,14 @@ var CoreSelect = function CoreSelect(props) {
|
|
|
962
377
|
return styles;
|
|
963
378
|
};
|
|
964
379
|
var multiValueRemoveStyles = function multiValueRemoveStyles(base) {
|
|
965
|
-
var styles = _extends
|
|
380
|
+
var styles = _extends({}, base, {
|
|
966
381
|
color: COLORS.lightGray,
|
|
967
382
|
cursor: "pointer"
|
|
968
383
|
});
|
|
969
384
|
return styles;
|
|
970
385
|
};
|
|
971
386
|
var multiValueLabelStyles = function multiValueLabelStyles(base) {
|
|
972
|
-
var styles = _extends
|
|
387
|
+
var styles = _extends({}, base, {
|
|
973
388
|
color: COLORS.blackText,
|
|
974
389
|
fontWeight: "400",
|
|
975
390
|
fontSize: "13px",
|
|
@@ -1412,7 +827,7 @@ var CoreSelectCompact = function CoreSelectCompact(props) {
|
|
|
1412
827
|
onChange(name, newValue);
|
|
1413
828
|
};
|
|
1414
829
|
var controlStyle = function controlStyle(base, state) {
|
|
1415
|
-
var styles = _extends
|
|
830
|
+
var styles = _extends({}, base, {
|
|
1416
831
|
fontSize: "14px",
|
|
1417
832
|
fontWeight: "400",
|
|
1418
833
|
backgroundColor: state.isDisabled ? "transparent" : error ? COLORS.lightYellow : COLORS.white,
|
|
@@ -1433,7 +848,7 @@ var CoreSelectCompact = function CoreSelectCompact(props) {
|
|
|
1433
848
|
return styles;
|
|
1434
849
|
};
|
|
1435
850
|
var inputStyles = function inputStyles(base) {
|
|
1436
|
-
var styles = _extends
|
|
851
|
+
var styles = _extends({}, base, {
|
|
1437
852
|
margin: "0",
|
|
1438
853
|
padding: "0",
|
|
1439
854
|
color: "inherit",
|
|
@@ -1443,37 +858,37 @@ var CoreSelectCompact = function CoreSelectCompact(props) {
|
|
|
1443
858
|
return styles;
|
|
1444
859
|
};
|
|
1445
860
|
var placeholderStyles = function placeholderStyles(base) {
|
|
1446
|
-
var styles = _extends
|
|
861
|
+
var styles = _extends({}, base, {
|
|
1447
862
|
color: COLORS.lightGray
|
|
1448
863
|
});
|
|
1449
864
|
return styles;
|
|
1450
865
|
};
|
|
1451
866
|
var dropdownIndicatorStyles = function dropdownIndicatorStyles(base) {
|
|
1452
|
-
var styles = _extends
|
|
867
|
+
var styles = _extends({}, base, {
|
|
1453
868
|
position: "relative",
|
|
1454
869
|
padding: "2px 0"
|
|
1455
870
|
});
|
|
1456
871
|
return styles;
|
|
1457
872
|
};
|
|
1458
873
|
var indicatorsContainerStyles = function indicatorsContainerStyles(base) {
|
|
1459
|
-
var styles = _extends
|
|
874
|
+
var styles = _extends({}, base, {
|
|
1460
875
|
display: isShowDropdown && !isMulti ? "block" : "none"
|
|
1461
876
|
});
|
|
1462
877
|
return styles;
|
|
1463
878
|
};
|
|
1464
879
|
var valueContainerStyles = function valueContainerStyles(base) {
|
|
1465
|
-
var styles = _extends
|
|
880
|
+
var styles = _extends({}, base, {
|
|
1466
881
|
height: isMulti ? undefined : "26px",
|
|
1467
882
|
position: "relative"
|
|
1468
883
|
});
|
|
1469
884
|
return styles;
|
|
1470
885
|
};
|
|
1471
886
|
var singleValueStyles = function singleValueStyles(base) {
|
|
1472
|
-
var styles = _extends
|
|
887
|
+
var styles = _extends({}, base);
|
|
1473
888
|
return styles;
|
|
1474
889
|
};
|
|
1475
890
|
var optionStyles = function optionStyles(base, state) {
|
|
1476
|
-
var styles = _extends
|
|
891
|
+
var styles = _extends({}, base, {
|
|
1477
892
|
padding: "8px",
|
|
1478
893
|
borderRadius: "8px",
|
|
1479
894
|
cursor: "pointer",
|
|
@@ -1492,7 +907,7 @@ var CoreSelectCompact = function CoreSelectCompact(props) {
|
|
|
1492
907
|
return styles;
|
|
1493
908
|
};
|
|
1494
909
|
var multiValueStyles = function multiValueStyles(base) {
|
|
1495
|
-
var styles = _extends
|
|
910
|
+
var styles = _extends({}, base, {
|
|
1496
911
|
backgroundColor: COLORS.lightBlue,
|
|
1497
912
|
borderRadius: "4px",
|
|
1498
913
|
padding: "0 4px",
|
|
@@ -1504,14 +919,14 @@ var CoreSelectCompact = function CoreSelectCompact(props) {
|
|
|
1504
919
|
return styles;
|
|
1505
920
|
};
|
|
1506
921
|
var multiValueRemoveStyles = function multiValueRemoveStyles(base) {
|
|
1507
|
-
var styles = _extends
|
|
922
|
+
var styles = _extends({}, base, {
|
|
1508
923
|
color: COLORS.lightGray,
|
|
1509
924
|
cursor: "pointer"
|
|
1510
925
|
});
|
|
1511
926
|
return styles;
|
|
1512
927
|
};
|
|
1513
928
|
var multiValueLabelStyles = function multiValueLabelStyles(base) {
|
|
1514
|
-
var styles = _extends
|
|
929
|
+
var styles = _extends({}, base, {
|
|
1515
930
|
color: COLORS.blackText,
|
|
1516
931
|
fontWeight: "400",
|
|
1517
932
|
fontSize: "13px",
|
|
@@ -2530,7 +1945,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
2530
1945
|
scopes: ["openid", "profile", "email"],
|
|
2531
1946
|
redirectUri: redirectUri
|
|
2532
1947
|
};
|
|
2533
|
-
var silentRequest = _extends
|
|
1948
|
+
var silentRequest = _extends({}, loginRequest, {
|
|
2534
1949
|
prompt: "select_account"
|
|
2535
1950
|
});
|
|
2536
1951
|
return Promise.resolve(msalInstance.loginPopup(silentRequest)).then(function (response) {
|
|
@@ -3211,7 +2626,7 @@ function kindOf(val) {
|
|
|
3211
2626
|
}
|
|
3212
2627
|
|
|
3213
2628
|
// src/utils/warning.ts
|
|
3214
|
-
function warning
|
|
2629
|
+
function warning(message) {
|
|
3215
2630
|
if (typeof console !== "undefined" && typeof console.error === "function") {
|
|
3216
2631
|
console.error(message);
|
|
3217
2632
|
}
|
|
@@ -3264,7 +2679,7 @@ function combineReducers(reducers) {
|
|
|
3264
2679
|
const key = reducerKeys[i];
|
|
3265
2680
|
if (process.env.NODE_ENV !== "production") {
|
|
3266
2681
|
if (typeof reducers[key] === "undefined") {
|
|
3267
|
-
warning
|
|
2682
|
+
warning(`No reducer provided for key "${key}"`);
|
|
3268
2683
|
}
|
|
3269
2684
|
}
|
|
3270
2685
|
if (typeof reducers[key] === "function") {
|
|
@@ -3289,7 +2704,7 @@ function combineReducers(reducers) {
|
|
|
3289
2704
|
if (process.env.NODE_ENV !== "production") {
|
|
3290
2705
|
const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
|
3291
2706
|
if (warningMessage) {
|
|
3292
|
-
warning
|
|
2707
|
+
warning(warningMessage);
|
|
3293
2708
|
}
|
|
3294
2709
|
}
|
|
3295
2710
|
let hasChanged = false;
|
|
@@ -3661,7 +3076,7 @@ var useAmplitude = function useAmplitude() {
|
|
|
3661
3076
|
var savedUserProperties = useRef({});
|
|
3662
3077
|
var hasTrackedInitialSession = useRef(false);
|
|
3663
3078
|
var setUserProperties = useCallback(function (properties) {
|
|
3664
|
-
savedUserProperties.current = _extends
|
|
3079
|
+
savedUserProperties.current = _extends({}, savedUserProperties.current, properties);
|
|
3665
3080
|
var identify$1 = new Identify();
|
|
3666
3081
|
Object.entries(properties).forEach(function (_ref) {
|
|
3667
3082
|
var key = _ref[0],
|
|
@@ -3673,7 +3088,7 @@ var useAmplitude = function useAmplitude() {
|
|
|
3673
3088
|
var trackEvent = useCallback(function (_ref2) {
|
|
3674
3089
|
var eventName = _ref2.eventName,
|
|
3675
3090
|
eventProperties = _ref2.eventProperties;
|
|
3676
|
-
track(eventName, _extends
|
|
3091
|
+
track(eventName, _extends({}, savedUserProperties.current, eventProperties, {
|
|
3677
3092
|
timestamp: new Date().toISOString()
|
|
3678
3093
|
}));
|
|
3679
3094
|
}, []);
|
|
@@ -3860,7 +3275,7 @@ var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
|
3860
3275
|
|
|
3861
3276
|
var customStyles = {
|
|
3862
3277
|
control: function control(baseStyles, state) {
|
|
3863
|
-
return _extends
|
|
3278
|
+
return _extends({}, baseStyles, {
|
|
3864
3279
|
fontSize: "14px",
|
|
3865
3280
|
fontWeight: 700,
|
|
3866
3281
|
color: styleGlobal.darker,
|
|
@@ -3875,21 +3290,21 @@ var customStyles = {
|
|
|
3875
3290
|
});
|
|
3876
3291
|
},
|
|
3877
3292
|
input: function input(baseStyles, _) {
|
|
3878
|
-
return _extends
|
|
3293
|
+
return _extends({}, baseStyles, {
|
|
3879
3294
|
fontSize: "14px",
|
|
3880
3295
|
fontWeight: 700,
|
|
3881
3296
|
color: styleGlobal.darker
|
|
3882
3297
|
});
|
|
3883
3298
|
},
|
|
3884
3299
|
singleValue: function singleValue(baseStyles) {
|
|
3885
|
-
return _extends
|
|
3300
|
+
return _extends({}, baseStyles, {
|
|
3886
3301
|
fontSize: "14px",
|
|
3887
3302
|
fontWeight: 700,
|
|
3888
3303
|
color: styleGlobal.darker
|
|
3889
3304
|
});
|
|
3890
3305
|
},
|
|
3891
3306
|
option: function option(baseStyles, state) {
|
|
3892
|
-
return _extends
|
|
3307
|
+
return _extends({}, baseStyles, {
|
|
3893
3308
|
backgroundColor: state.isSelected ? styleGlobal.dark : state.isFocused ? styleGlobal.light : 'white',
|
|
3894
3309
|
"&:active": {
|
|
3895
3310
|
backgroundColor: state.isSelected ? styleGlobal.dark : state.isFocused ? styleGlobal.less_dark : baseStyles.backgroundColor
|