acsi-core 0.1.0 → 0.1.2
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/.DS_Store +0 -0
- package/dist/components/CoreButton/index.d.ts +10 -0
- package/dist/components/CoreCheckbox/index.d.ts +10 -0
- package/dist/components/CoreError/index.d.ts +6 -0
- package/dist/components/CoreInput/index.d.ts +13 -0
- package/dist/components/CoreModal/index.d.ts +9 -0
- package/dist/components/CoreRadio/index.d.ts +14 -0
- package/dist/components/CoreSelect/index.d.ts +18 -0
- package/dist/components/Dialogs/CommonDialog.d.ts +3 -0
- package/dist/components/Paginations/CustomPagination.d.ts +8 -0
- package/dist/components/Selects/CustomAsyncSelect.d.ts +3 -0
- package/dist/components/Selects/CustomCreatable.d.ts +3 -0
- package/dist/components/Selects/CustomSelect.d.ts +3 -0
- package/dist/components/Selects/CustomSelectOption.d.ts +3 -0
- package/dist/components/Selects/partials/index.d.ts +4 -0
- package/dist/components/Selects/theme/styles.d.ts +6 -0
- package/dist/components/index.d.ts +7 -0
- package/dist/configs/constants.d.ts +11 -0
- package/dist/containers/Login/configs/constants.d.ts +9 -0
- package/dist/containers/Login/configs/default.d.ts +1 -0
- package/dist/containers/Login/views/block/BlockLogin.d.ts +1 -5
- package/dist/icons8-google-96~UAyNiMJa.svg +1 -0
- package/dist/index.css +247 -34
- package/dist/index.d.ts +12 -2
- package/dist/index.js +848 -745
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +823 -748
- package/dist/index.modern.js.map +1 -1
- package/dist/layouts/LayoutContext.d.ts +1 -0
- package/dist/layouts/TheLanguageDropdown.d.ts +3 -0
- package/dist/redux/commons/action.d.ts +2 -0
- package/dist/services/accountService.d.ts +5 -0
- package/dist/utils/constants.d.ts +18 -5
- package/dist/utils/getErrorMessage.d.ts +1 -0
- package/dist/utils/hooks/index.d.ts +3 -0
- package/dist/utils/hooks/useGoogleSignOut.d.ts +10 -0
- package/dist/utils/hooks/useLanguage.d.ts +12 -0
- package/dist/utils/hooks/useLogin.d.ts +7 -0
- package/dist/utils/icons.d.ts +3 -0
- package/dist/utils/types/login.d.ts +33 -0
- package/dist/utils/types.d.ts +1 -0
- package/package.json +12 -4
package/dist/index.js
CHANGED
|
@@ -1,613 +1,43 @@
|
|
|
1
1
|
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
|
2
2
|
|
|
3
|
+
var history = require('history');
|
|
3
4
|
var toolkit = require('@reduxjs/toolkit');
|
|
4
5
|
var React = require('react');
|
|
5
6
|
var React__default = _interopDefault(React);
|
|
6
|
-
var reactGoogleRecaptchaV3 = require('react-google-recaptcha-v3');
|
|
7
7
|
var reactstrap = require('reactstrap');
|
|
8
|
-
var
|
|
9
|
-
var
|
|
10
|
-
var GoogleLogin = _interopDefault(require('@leecheuk/react-google-login'));
|
|
8
|
+
var GoogleLogin = require('@leecheuk/react-google-login');
|
|
9
|
+
var GoogleLogin__default = _interopDefault(GoogleLogin);
|
|
11
10
|
var axios = _interopDefault(require('axios'));
|
|
12
11
|
var moment = _interopDefault(require('moment'));
|
|
13
12
|
var reactRouterDom = require('react-router-dom');
|
|
14
13
|
var gapiScript = require('gapi-script');
|
|
15
14
|
var reactRedux = require('react-redux');
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
return n;
|
|
24
|
-
}, _extends.apply(null, arguments);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function isAbsolute(pathname) {
|
|
28
|
-
return pathname.charAt(0) === '/';
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
// About 1.5x faster than the two-arg version of Array#splice()
|
|
32
|
-
function spliceOne(list, index) {
|
|
33
|
-
for (var i = index, k = i + 1, n = list.length; k < n; i += 1, k += 1) {
|
|
34
|
-
list[i] = list[k];
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
list.pop();
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// This implementation is based heavily on node's url.parse
|
|
41
|
-
function resolvePathname(to, from) {
|
|
42
|
-
if (from === undefined) from = '';
|
|
43
|
-
|
|
44
|
-
var toParts = (to && to.split('/')) || [];
|
|
45
|
-
var fromParts = (from && from.split('/')) || [];
|
|
46
|
-
|
|
47
|
-
var isToAbs = to && isAbsolute(to);
|
|
48
|
-
var isFromAbs = from && isAbsolute(from);
|
|
49
|
-
var mustEndAbs = isToAbs || isFromAbs;
|
|
50
|
-
|
|
51
|
-
if (to && isAbsolute(to)) {
|
|
52
|
-
// to is absolute
|
|
53
|
-
fromParts = toParts;
|
|
54
|
-
} else if (toParts.length) {
|
|
55
|
-
// to is relative, drop the filename
|
|
56
|
-
fromParts.pop();
|
|
57
|
-
fromParts = fromParts.concat(toParts);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
if (!fromParts.length) return '/';
|
|
61
|
-
|
|
62
|
-
var hasTrailingSlash;
|
|
63
|
-
if (fromParts.length) {
|
|
64
|
-
var last = fromParts[fromParts.length - 1];
|
|
65
|
-
hasTrailingSlash = last === '.' || last === '..' || last === '';
|
|
66
|
-
} else {
|
|
67
|
-
hasTrailingSlash = false;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
var up = 0;
|
|
71
|
-
for (var i = fromParts.length; i >= 0; i--) {
|
|
72
|
-
var part = fromParts[i];
|
|
73
|
-
|
|
74
|
-
if (part === '.') {
|
|
75
|
-
spliceOne(fromParts, i);
|
|
76
|
-
} else if (part === '..') {
|
|
77
|
-
spliceOne(fromParts, i);
|
|
78
|
-
up++;
|
|
79
|
-
} else if (up) {
|
|
80
|
-
spliceOne(fromParts, i);
|
|
81
|
-
up--;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
if (!mustEndAbs) for (; up--; up) fromParts.unshift('..');
|
|
86
|
-
|
|
87
|
-
if (
|
|
88
|
-
mustEndAbs &&
|
|
89
|
-
fromParts[0] !== '' &&
|
|
90
|
-
(!fromParts[0] || !isAbsolute(fromParts[0]))
|
|
91
|
-
)
|
|
92
|
-
fromParts.unshift('');
|
|
93
|
-
|
|
94
|
-
var result = fromParts.join('/');
|
|
95
|
-
|
|
96
|
-
if (hasTrailingSlash && result.substr(-1) !== '/') result += '/';
|
|
97
|
-
|
|
98
|
-
return result;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
var isProduction = process.env.NODE_ENV === 'production';
|
|
102
|
-
function warning(condition, message) {
|
|
103
|
-
if (!isProduction) {
|
|
104
|
-
if (condition) {
|
|
105
|
-
return;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
var text = "Warning: " + message;
|
|
109
|
-
|
|
110
|
-
if (typeof console !== 'undefined') {
|
|
111
|
-
console.warn(text);
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
try {
|
|
115
|
-
throw Error(text);
|
|
116
|
-
} catch (x) {}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
var isProduction$1 = process.env.NODE_ENV === 'production';
|
|
121
|
-
var prefix = 'Invariant failed';
|
|
122
|
-
function invariant(condition, message) {
|
|
123
|
-
if (condition) {
|
|
124
|
-
return;
|
|
125
|
-
}
|
|
126
|
-
if (isProduction$1) {
|
|
127
|
-
throw new Error(prefix);
|
|
128
|
-
}
|
|
129
|
-
var provided = typeof message === 'function' ? message() : message;
|
|
130
|
-
var value = provided ? "".concat(prefix, ": ").concat(provided) : prefix;
|
|
131
|
-
throw new Error(value);
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
function addLeadingSlash(path) {
|
|
135
|
-
return path.charAt(0) === '/' ? path : '/' + path;
|
|
136
|
-
}
|
|
137
|
-
function hasBasename(path, prefix) {
|
|
138
|
-
return path.toLowerCase().indexOf(prefix.toLowerCase()) === 0 && '/?#'.indexOf(path.charAt(prefix.length)) !== -1;
|
|
139
|
-
}
|
|
140
|
-
function stripBasename(path, prefix) {
|
|
141
|
-
return hasBasename(path, prefix) ? path.substr(prefix.length) : path;
|
|
142
|
-
}
|
|
143
|
-
function stripTrailingSlash(path) {
|
|
144
|
-
return path.charAt(path.length - 1) === '/' ? path.slice(0, -1) : path;
|
|
145
|
-
}
|
|
146
|
-
function parsePath(path) {
|
|
147
|
-
var pathname = path || '/';
|
|
148
|
-
var search = '';
|
|
149
|
-
var hash = '';
|
|
150
|
-
var hashIndex = pathname.indexOf('#');
|
|
151
|
-
|
|
152
|
-
if (hashIndex !== -1) {
|
|
153
|
-
hash = pathname.substr(hashIndex);
|
|
154
|
-
pathname = pathname.substr(0, hashIndex);
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
var searchIndex = pathname.indexOf('?');
|
|
158
|
-
|
|
159
|
-
if (searchIndex !== -1) {
|
|
160
|
-
search = pathname.substr(searchIndex);
|
|
161
|
-
pathname = pathname.substr(0, searchIndex);
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return {
|
|
165
|
-
pathname: pathname,
|
|
166
|
-
search: search === '?' ? '' : search,
|
|
167
|
-
hash: hash === '#' ? '' : hash
|
|
168
|
-
};
|
|
169
|
-
}
|
|
170
|
-
function createPath(location) {
|
|
171
|
-
var pathname = location.pathname,
|
|
172
|
-
search = location.search,
|
|
173
|
-
hash = location.hash;
|
|
174
|
-
var path = pathname || '/';
|
|
175
|
-
if (search && search !== '?') path += search.charAt(0) === '?' ? search : "?" + search;
|
|
176
|
-
if (hash && hash !== '#') path += hash.charAt(0) === '#' ? hash : "#" + hash;
|
|
177
|
-
return path;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
function createLocation(path, state, key, currentLocation) {
|
|
181
|
-
var location;
|
|
182
|
-
|
|
183
|
-
if (typeof path === 'string') {
|
|
184
|
-
// Two-arg form: push(path, state)
|
|
185
|
-
location = parsePath(path);
|
|
186
|
-
location.state = state;
|
|
187
|
-
} else {
|
|
188
|
-
// One-arg form: push(location)
|
|
189
|
-
location = _extends({}, path);
|
|
190
|
-
if (location.pathname === undefined) location.pathname = '';
|
|
191
|
-
|
|
192
|
-
if (location.search) {
|
|
193
|
-
if (location.search.charAt(0) !== '?') location.search = '?' + location.search;
|
|
194
|
-
} else {
|
|
195
|
-
location.search = '';
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
if (location.hash) {
|
|
199
|
-
if (location.hash.charAt(0) !== '#') location.hash = '#' + location.hash;
|
|
200
|
-
} else {
|
|
201
|
-
location.hash = '';
|
|
202
|
-
}
|
|
203
|
-
|
|
204
|
-
if (state !== undefined && location.state === undefined) location.state = state;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
try {
|
|
208
|
-
location.pathname = decodeURI(location.pathname);
|
|
209
|
-
} catch (e) {
|
|
210
|
-
if (e instanceof URIError) {
|
|
211
|
-
throw new URIError('Pathname "' + location.pathname + '" could not be decoded. ' + 'This is likely caused by an invalid percent-encoding.');
|
|
212
|
-
} else {
|
|
213
|
-
throw e;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
if (key) location.key = key;
|
|
218
|
-
|
|
219
|
-
if (currentLocation) {
|
|
220
|
-
// Resolve incomplete/relative pathname relative to current location.
|
|
221
|
-
if (!location.pathname) {
|
|
222
|
-
location.pathname = currentLocation.pathname;
|
|
223
|
-
} else if (location.pathname.charAt(0) !== '/') {
|
|
224
|
-
location.pathname = resolvePathname(location.pathname, currentLocation.pathname);
|
|
225
|
-
}
|
|
226
|
-
} else {
|
|
227
|
-
// When there is no prior location and pathname is empty, set it to /
|
|
228
|
-
if (!location.pathname) {
|
|
229
|
-
location.pathname = '/';
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
|
|
233
|
-
return location;
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function createTransitionManager() {
|
|
237
|
-
var prompt = null;
|
|
238
|
-
|
|
239
|
-
function setPrompt(nextPrompt) {
|
|
240
|
-
process.env.NODE_ENV !== "production" ? warning(prompt == null, 'A history supports only one prompt at a time') : void 0;
|
|
241
|
-
prompt = nextPrompt;
|
|
242
|
-
return function () {
|
|
243
|
-
if (prompt === nextPrompt) prompt = null;
|
|
244
|
-
};
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
function confirmTransitionTo(location, action, getUserConfirmation, callback) {
|
|
248
|
-
// TODO: If another transition starts while we're still confirming
|
|
249
|
-
// the previous one, we may end up in a weird state. Figure out the
|
|
250
|
-
// best way to handle this.
|
|
251
|
-
if (prompt != null) {
|
|
252
|
-
var result = typeof prompt === 'function' ? prompt(location, action) : prompt;
|
|
253
|
-
|
|
254
|
-
if (typeof result === 'string') {
|
|
255
|
-
if (typeof getUserConfirmation === 'function') {
|
|
256
|
-
getUserConfirmation(result, callback);
|
|
257
|
-
} else {
|
|
258
|
-
process.env.NODE_ENV !== "production" ? warning(false, 'A history needs a getUserConfirmation function in order to use a prompt message') : void 0;
|
|
259
|
-
callback(true);
|
|
260
|
-
}
|
|
261
|
-
} else {
|
|
262
|
-
// Return false from a transition hook to cancel the transition.
|
|
263
|
-
callback(result !== false);
|
|
264
|
-
}
|
|
265
|
-
} else {
|
|
266
|
-
callback(true);
|
|
267
|
-
}
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
var listeners = [];
|
|
271
|
-
|
|
272
|
-
function appendListener(fn) {
|
|
273
|
-
var isActive = true;
|
|
274
|
-
|
|
275
|
-
function listener() {
|
|
276
|
-
if (isActive) fn.apply(void 0, arguments);
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
listeners.push(listener);
|
|
280
|
-
return function () {
|
|
281
|
-
isActive = false;
|
|
282
|
-
listeners = listeners.filter(function (item) {
|
|
283
|
-
return item !== listener;
|
|
284
|
-
});
|
|
285
|
-
};
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
function notifyListeners() {
|
|
289
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
290
|
-
args[_key] = arguments[_key];
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
listeners.forEach(function (listener) {
|
|
294
|
-
return listener.apply(void 0, args);
|
|
295
|
-
});
|
|
296
|
-
}
|
|
297
|
-
|
|
298
|
-
return {
|
|
299
|
-
setPrompt: setPrompt,
|
|
300
|
-
confirmTransitionTo: confirmTransitionTo,
|
|
301
|
-
appendListener: appendListener,
|
|
302
|
-
notifyListeners: notifyListeners
|
|
303
|
-
};
|
|
304
|
-
}
|
|
305
|
-
|
|
306
|
-
var canUseDOM = !!(typeof window !== 'undefined' && window.document && window.document.createElement);
|
|
307
|
-
function getConfirmation(message, callback) {
|
|
308
|
-
callback(window.confirm(message)); // eslint-disable-line no-alert
|
|
309
|
-
}
|
|
310
|
-
/**
|
|
311
|
-
* Returns true if the HTML5 history API is supported. Taken from Modernizr.
|
|
312
|
-
*
|
|
313
|
-
* https://github.com/Modernizr/Modernizr/blob/master/LICENSE
|
|
314
|
-
* https://github.com/Modernizr/Modernizr/blob/master/feature-detects/history.js
|
|
315
|
-
* changed to avoid false negatives for Windows Phones: https://github.com/reactjs/react-router/issues/586
|
|
316
|
-
*/
|
|
317
|
-
|
|
318
|
-
function supportsHistory() {
|
|
319
|
-
var ua = window.navigator.userAgent;
|
|
320
|
-
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;
|
|
321
|
-
return window.history && 'pushState' in window.history;
|
|
322
|
-
}
|
|
323
|
-
/**
|
|
324
|
-
* Returns true if browser fires popstate on hash change.
|
|
325
|
-
* IE10 and IE11 do not.
|
|
326
|
-
*/
|
|
327
|
-
|
|
328
|
-
function supportsPopStateOnHashChange() {
|
|
329
|
-
return window.navigator.userAgent.indexOf('Trident') === -1;
|
|
330
|
-
}
|
|
331
|
-
/**
|
|
332
|
-
* Returns true if a given popstate event is an extraneous WebKit event.
|
|
333
|
-
* Accounts for the fact that Chrome on iOS fires real popstate events
|
|
334
|
-
* containing undefined state when pressing the back button.
|
|
335
|
-
*/
|
|
336
|
-
|
|
337
|
-
function isExtraneousPopstateEvent(event) {
|
|
338
|
-
return event.state === undefined && navigator.userAgent.indexOf('CriOS') === -1;
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
var PopStateEvent = 'popstate';
|
|
342
|
-
var HashChangeEvent = 'hashchange';
|
|
343
|
-
|
|
344
|
-
function getHistoryState() {
|
|
345
|
-
try {
|
|
346
|
-
return window.history.state || {};
|
|
347
|
-
} catch (e) {
|
|
348
|
-
// IE 11 sometimes throws when accessing window.history.state
|
|
349
|
-
// See https://github.com/ReactTraining/history/pull/289
|
|
350
|
-
return {};
|
|
351
|
-
}
|
|
352
|
-
}
|
|
353
|
-
/**
|
|
354
|
-
* Creates a history object that uses the HTML5 history API including
|
|
355
|
-
* pushState, replaceState, and the popstate event.
|
|
356
|
-
*/
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
function createBrowserHistory(props) {
|
|
360
|
-
if (props === void 0) {
|
|
361
|
-
props = {};
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
!canUseDOM ? process.env.NODE_ENV !== "production" ? invariant(false, 'Browser history needs a DOM') : invariant(false) : void 0;
|
|
365
|
-
var globalHistory = window.history;
|
|
366
|
-
var canUseHistory = supportsHistory();
|
|
367
|
-
var needsHashChangeListener = !supportsPopStateOnHashChange();
|
|
368
|
-
var _props = props,
|
|
369
|
-
_props$forceRefresh = _props.forceRefresh,
|
|
370
|
-
forceRefresh = _props$forceRefresh === void 0 ? false : _props$forceRefresh,
|
|
371
|
-
_props$getUserConfirm = _props.getUserConfirmation,
|
|
372
|
-
getUserConfirmation = _props$getUserConfirm === void 0 ? getConfirmation : _props$getUserConfirm,
|
|
373
|
-
_props$keyLength = _props.keyLength,
|
|
374
|
-
keyLength = _props$keyLength === void 0 ? 6 : _props$keyLength;
|
|
375
|
-
var basename = props.basename ? stripTrailingSlash(addLeadingSlash(props.basename)) : '';
|
|
376
|
-
|
|
377
|
-
function getDOMLocation(historyState) {
|
|
378
|
-
var _ref = historyState || {},
|
|
379
|
-
key = _ref.key,
|
|
380
|
-
state = _ref.state;
|
|
381
|
-
|
|
382
|
-
var _window$location = window.location,
|
|
383
|
-
pathname = _window$location.pathname,
|
|
384
|
-
search = _window$location.search,
|
|
385
|
-
hash = _window$location.hash;
|
|
386
|
-
var path = pathname + search + hash;
|
|
387
|
-
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;
|
|
388
|
-
if (basename) path = stripBasename(path, basename);
|
|
389
|
-
return createLocation(path, state, key);
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
function createKey() {
|
|
393
|
-
return Math.random().toString(36).substr(2, keyLength);
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
var transitionManager = createTransitionManager();
|
|
397
|
-
|
|
398
|
-
function setState(nextState) {
|
|
399
|
-
_extends(history, nextState);
|
|
400
|
-
|
|
401
|
-
history.length = globalHistory.length;
|
|
402
|
-
transitionManager.notifyListeners(history.location, history.action);
|
|
403
|
-
}
|
|
404
|
-
|
|
405
|
-
function handlePopState(event) {
|
|
406
|
-
// Ignore extraneous popstate events in WebKit.
|
|
407
|
-
if (isExtraneousPopstateEvent(event)) return;
|
|
408
|
-
handlePop(getDOMLocation(event.state));
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
function handleHashChange() {
|
|
412
|
-
handlePop(getDOMLocation(getHistoryState()));
|
|
413
|
-
}
|
|
414
|
-
|
|
415
|
-
var forceNextPop = false;
|
|
416
|
-
|
|
417
|
-
function handlePop(location) {
|
|
418
|
-
if (forceNextPop) {
|
|
419
|
-
forceNextPop = false;
|
|
420
|
-
setState();
|
|
421
|
-
} else {
|
|
422
|
-
var action = 'POP';
|
|
423
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
|
424
|
-
if (ok) {
|
|
425
|
-
setState({
|
|
426
|
-
action: action,
|
|
427
|
-
location: location
|
|
428
|
-
});
|
|
429
|
-
} else {
|
|
430
|
-
revertPop(location);
|
|
431
|
-
}
|
|
432
|
-
});
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
function revertPop(fromLocation) {
|
|
437
|
-
var toLocation = history.location; // TODO: We could probably make this more reliable by
|
|
438
|
-
// keeping a list of keys we've seen in sessionStorage.
|
|
439
|
-
// Instead, we just default to 0 for keys we don't know.
|
|
440
|
-
|
|
441
|
-
var toIndex = allKeys.indexOf(toLocation.key);
|
|
442
|
-
if (toIndex === -1) toIndex = 0;
|
|
443
|
-
var fromIndex = allKeys.indexOf(fromLocation.key);
|
|
444
|
-
if (fromIndex === -1) fromIndex = 0;
|
|
445
|
-
var delta = toIndex - fromIndex;
|
|
446
|
-
|
|
447
|
-
if (delta) {
|
|
448
|
-
forceNextPop = true;
|
|
449
|
-
go(delta);
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
var initialLocation = getDOMLocation(getHistoryState());
|
|
454
|
-
var allKeys = [initialLocation.key]; // Public interface
|
|
455
|
-
|
|
456
|
-
function createHref(location) {
|
|
457
|
-
return basename + createPath(location);
|
|
458
|
-
}
|
|
459
|
-
|
|
460
|
-
function push(path, state) {
|
|
461
|
-
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;
|
|
462
|
-
var action = 'PUSH';
|
|
463
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
464
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
|
465
|
-
if (!ok) return;
|
|
466
|
-
var href = createHref(location);
|
|
467
|
-
var key = location.key,
|
|
468
|
-
state = location.state;
|
|
469
|
-
|
|
470
|
-
if (canUseHistory) {
|
|
471
|
-
globalHistory.pushState({
|
|
472
|
-
key: key,
|
|
473
|
-
state: state
|
|
474
|
-
}, null, href);
|
|
475
|
-
|
|
476
|
-
if (forceRefresh) {
|
|
477
|
-
window.location.href = href;
|
|
478
|
-
} else {
|
|
479
|
-
var prevIndex = allKeys.indexOf(history.location.key);
|
|
480
|
-
var nextKeys = allKeys.slice(0, prevIndex + 1);
|
|
481
|
-
nextKeys.push(location.key);
|
|
482
|
-
allKeys = nextKeys;
|
|
483
|
-
setState({
|
|
484
|
-
action: action,
|
|
485
|
-
location: location
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
} else {
|
|
489
|
-
process.env.NODE_ENV !== "production" ? warning(state === undefined, 'Browser history cannot push state in browsers that do not support HTML5 history') : void 0;
|
|
490
|
-
window.location.href = href;
|
|
491
|
-
}
|
|
492
|
-
});
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
function replace(path, state) {
|
|
496
|
-
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;
|
|
497
|
-
var action = 'REPLACE';
|
|
498
|
-
var location = createLocation(path, state, createKey(), history.location);
|
|
499
|
-
transitionManager.confirmTransitionTo(location, action, getUserConfirmation, function (ok) {
|
|
500
|
-
if (!ok) return;
|
|
501
|
-
var href = createHref(location);
|
|
502
|
-
var key = location.key,
|
|
503
|
-
state = location.state;
|
|
504
|
-
|
|
505
|
-
if (canUseHistory) {
|
|
506
|
-
globalHistory.replaceState({
|
|
507
|
-
key: key,
|
|
508
|
-
state: state
|
|
509
|
-
}, null, href);
|
|
510
|
-
|
|
511
|
-
if (forceRefresh) {
|
|
512
|
-
window.location.replace(href);
|
|
513
|
-
} else {
|
|
514
|
-
var prevIndex = allKeys.indexOf(history.location.key);
|
|
515
|
-
if (prevIndex !== -1) allKeys[prevIndex] = location.key;
|
|
516
|
-
setState({
|
|
517
|
-
action: action,
|
|
518
|
-
location: location
|
|
519
|
-
});
|
|
520
|
-
}
|
|
521
|
-
} else {
|
|
522
|
-
process.env.NODE_ENV !== "production" ? warning(state === undefined, 'Browser history cannot replace state in browsers that do not support HTML5 history') : void 0;
|
|
523
|
-
window.location.replace(href);
|
|
524
|
-
}
|
|
525
|
-
});
|
|
526
|
-
}
|
|
527
|
-
|
|
528
|
-
function go(n) {
|
|
529
|
-
globalHistory.go(n);
|
|
530
|
-
}
|
|
531
|
-
|
|
532
|
-
function goBack() {
|
|
533
|
-
go(-1);
|
|
534
|
-
}
|
|
535
|
-
|
|
536
|
-
function goForward() {
|
|
537
|
-
go(1);
|
|
538
|
-
}
|
|
539
|
-
|
|
540
|
-
var listenerCount = 0;
|
|
541
|
-
|
|
542
|
-
function checkDOMListeners(delta) {
|
|
543
|
-
listenerCount += delta;
|
|
544
|
-
|
|
545
|
-
if (listenerCount === 1 && delta === 1) {
|
|
546
|
-
window.addEventListener(PopStateEvent, handlePopState);
|
|
547
|
-
if (needsHashChangeListener) window.addEventListener(HashChangeEvent, handleHashChange);
|
|
548
|
-
} else if (listenerCount === 0) {
|
|
549
|
-
window.removeEventListener(PopStateEvent, handlePopState);
|
|
550
|
-
if (needsHashChangeListener) window.removeEventListener(HashChangeEvent, handleHashChange);
|
|
551
|
-
}
|
|
552
|
-
}
|
|
553
|
-
|
|
554
|
-
var isBlocked = false;
|
|
555
|
-
|
|
556
|
-
function block(prompt) {
|
|
557
|
-
if (prompt === void 0) {
|
|
558
|
-
prompt = false;
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
var unblock = transitionManager.setPrompt(prompt);
|
|
562
|
-
|
|
563
|
-
if (!isBlocked) {
|
|
564
|
-
checkDOMListeners(1);
|
|
565
|
-
isBlocked = true;
|
|
566
|
-
}
|
|
567
|
-
|
|
568
|
-
return function () {
|
|
569
|
-
if (isBlocked) {
|
|
570
|
-
isBlocked = false;
|
|
571
|
-
checkDOMListeners(-1);
|
|
572
|
-
}
|
|
573
|
-
|
|
574
|
-
return unblock();
|
|
575
|
-
};
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
function listen(listener) {
|
|
579
|
-
var unlisten = transitionManager.appendListener(listener);
|
|
580
|
-
checkDOMListeners(1);
|
|
581
|
-
return function () {
|
|
582
|
-
checkDOMListeners(-1);
|
|
583
|
-
unlisten();
|
|
584
|
-
};
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
var history = {
|
|
588
|
-
length: globalHistory.length,
|
|
589
|
-
action: 'POP',
|
|
590
|
-
location: initialLocation,
|
|
591
|
-
createHref: createHref,
|
|
592
|
-
push: push,
|
|
593
|
-
replace: replace,
|
|
594
|
-
go: go,
|
|
595
|
-
goBack: goBack,
|
|
596
|
-
goForward: goForward,
|
|
597
|
-
block: block,
|
|
598
|
-
listen: listen
|
|
599
|
-
};
|
|
600
|
-
return history;
|
|
601
|
-
}
|
|
15
|
+
var material = require('@mui/material');
|
|
16
|
+
var reactToastify = require('react-toastify');
|
|
17
|
+
var Select = require('react-select');
|
|
18
|
+
var Select__default = _interopDefault(Select);
|
|
19
|
+
var fa = require('react-icons/fa');
|
|
20
|
+
var CreatableSelect = _interopDefault(require('react-select/creatable'));
|
|
602
21
|
|
|
603
22
|
var setLoading = toolkit.createAction("common/setLoading");
|
|
604
23
|
var setAlert = toolkit.createAction("common/setAlert");
|
|
605
24
|
var setUser = toolkit.createAction("common/setUser");
|
|
606
|
-
|
|
607
|
-
var
|
|
608
|
-
|
|
25
|
+
var setLanguage = toolkit.createAction("common/setLanguage");
|
|
26
|
+
var reset = toolkit.createAction("common/reset");
|
|
27
|
+
|
|
28
|
+
var GOOGLE_RECAPTCHA_KEY = process.env.REACT_APP_GOOGLE_RECAPTCHA_KEY || "";
|
|
29
|
+
var GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || "";
|
|
30
|
+
var GOOGLE_RECAPTCHA_ID = process.env.REACT_APP_GOOGLE_RECAPTCHA_ID || "";
|
|
31
|
+
var GOOGLE_RECAPTCHA_SECRET = process.env.REACT_APP_GOOGLE_RECAPTCHA_SECRET || "";
|
|
32
|
+
var BASE_URL = process.env.REACT_APP_BASE_URL || "";
|
|
33
|
+
var SUPER_ADMIN_BASE_URL = process.env.REACT_APP_SUPER_ADMIN_BASE_URL || "";
|
|
34
|
+
var PUSHER_CONFIG = {
|
|
35
|
+
cluster: process.env.REACT_APP_PUSHER_CONFIG_CLUSTER || "",
|
|
36
|
+
key: process.env.REACT_APP_PUSHER_CONFIG_KEY || ""
|
|
37
|
+
};
|
|
609
38
|
var ACCESS_TOKEN = "ACCESS_TOKEN";
|
|
610
|
-
var
|
|
39
|
+
var ACADEMY_DOMAIN = "ACADEMY_DOMAIN";
|
|
40
|
+
var DefaultErrorMessage = "an_unexpected_error_has_occurred";
|
|
611
41
|
var getAccessToken = function getAccessToken() {
|
|
612
42
|
try {
|
|
613
43
|
return localStorage.getItem(ACCESS_TOKEN);
|
|
@@ -628,26 +58,7 @@ var encodeParams = function encodeParams(params) {
|
|
|
628
58
|
}).join('&');
|
|
629
59
|
};
|
|
630
60
|
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
634
|
-
|
|
635
|
-
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
636
|
-
|
|
637
|
-
// Asynchronously call a function and send errors to recovery continuation
|
|
638
|
-
function _catch(body, recover) {
|
|
639
|
-
try {
|
|
640
|
-
var result = body();
|
|
641
|
-
} catch(e) {
|
|
642
|
-
return recover(e);
|
|
643
|
-
}
|
|
644
|
-
if (result && result.then) {
|
|
645
|
-
return result.then(void 0, recover);
|
|
646
|
-
}
|
|
647
|
-
return result;
|
|
648
|
-
}
|
|
649
|
-
|
|
650
|
-
var styles = {"signup_wrap":"_18HOc","back_btn":"_397BX","sign_card":"_2ZRO9","card-header":"_ii7EY","card-body-item":"_LLdCT"};
|
|
61
|
+
var styleGlobal = {"signup_wrap":"_1KLz9","box-signin":"_2Jo1o","signin_title":"_3egBO","signup_link":"_1DoIT","google_button":"_34hK_","box-field":"_2e9xO","box-input":"_3zXRp","box-button-email":"_21FPk","box-signin-container":"_1QERu","box-signin-text":"_2-znH","box-signin-logo":"_1aB2m","box-right":"_3qndF","box-right-body":"_JzdCr","box-right-footer":"_19aCA"};
|
|
651
62
|
|
|
652
63
|
var api = axios.create({
|
|
653
64
|
baseURL: BASE_URL,
|
|
@@ -682,9 +93,6 @@ var apiUpload = axios.create({
|
|
|
682
93
|
return i.interceptors.response.use(function (response) {
|
|
683
94
|
return response;
|
|
684
95
|
}, function (error) {
|
|
685
|
-
console.log({
|
|
686
|
-
error: error
|
|
687
|
-
});
|
|
688
96
|
if (error.response.status === 401) {
|
|
689
97
|
window.location.href = "/login";
|
|
690
98
|
}
|
|
@@ -698,38 +106,16 @@ var apiUpload = axios.create({
|
|
|
698
106
|
});
|
|
699
107
|
|
|
700
108
|
var apiLoginGoogle = function apiLoginGoogle(body) {
|
|
701
|
-
return api.post(BASE_URL + "/api/
|
|
109
|
+
return api.post(BASE_URL + "/api/Auth/login", body);
|
|
702
110
|
};
|
|
703
111
|
|
|
704
|
-
var
|
|
705
|
-
|
|
706
|
-
password: yup.string().required("Password is required"),
|
|
707
|
-
rememberMe: yup.boolean()
|
|
708
|
-
});
|
|
112
|
+
var itemLogin = ['Seamless lesson planning', 'Flexibility and customization', 'Data protection and security', 'Standards alignment', 'AI smart assist'];
|
|
113
|
+
|
|
709
114
|
var BlockLogin = function BlockLogin(_ref) {
|
|
710
|
-
var
|
|
711
|
-
|
|
712
|
-
var _useGoogleReCaptcha = reactGoogleRecaptchaV3.useGoogleReCaptcha(),
|
|
713
|
-
executeRecaptcha = _useGoogleReCaptcha.executeRecaptcha;
|
|
714
|
-
var history = reactRouterDom.useHistory();
|
|
715
|
-
var clickHandler = React.useCallback(function () {
|
|
716
|
-
try {
|
|
717
|
-
if (!executeRecaptcha) {
|
|
718
|
-
console.log("execute recaptcha undefined");
|
|
719
|
-
return Promise.resolve();
|
|
720
|
-
}
|
|
721
|
-
return Promise.resolve(executeRecaptcha("login"));
|
|
722
|
-
} catch (e) {
|
|
723
|
-
return Promise.reject(e);
|
|
724
|
-
}
|
|
725
|
-
}, [executeRecaptcha]);
|
|
726
|
-
var handleVerify = React.useCallback(function () {}, []);
|
|
115
|
+
var onNavigate = _ref.onNavigate,
|
|
116
|
+
role = _ref.role;
|
|
727
117
|
var onSuccessGoogle = function onSuccessGoogle(res) {
|
|
728
118
|
try {
|
|
729
|
-
console.log("success");
|
|
730
|
-
console.log({
|
|
731
|
-
res: res
|
|
732
|
-
});
|
|
733
119
|
var _temp = function () {
|
|
734
120
|
if (!!(res !== null && res !== void 0 && res.accessToken)) {
|
|
735
121
|
var _res$profileObj = res.profileObj,
|
|
@@ -738,7 +124,7 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
738
124
|
familyName = _res$profileObj.familyName,
|
|
739
125
|
givenName = _res$profileObj.givenName,
|
|
740
126
|
name = _res$profileObj.name;
|
|
741
|
-
var accessToken = res.
|
|
127
|
+
var accessToken = res.tokenObj.id_token;
|
|
742
128
|
var googleId = res.googleId;
|
|
743
129
|
var infoLogin = {
|
|
744
130
|
imageUrl: imageUrl,
|
|
@@ -748,13 +134,12 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
748
134
|
email: email,
|
|
749
135
|
token: accessToken,
|
|
750
136
|
googleId: googleId,
|
|
751
|
-
role:
|
|
137
|
+
role: role
|
|
752
138
|
};
|
|
753
139
|
return Promise.resolve(apiLoginGoogle(infoLogin)).then(function (res1) {
|
|
754
140
|
var tokenJWT = res1.data.token;
|
|
755
|
-
localStorage.setItem("USER_INFORMATION", JSON.stringify(infoLogin));
|
|
756
141
|
localStorage.setItem(ACCESS_TOKEN, tokenJWT);
|
|
757
|
-
|
|
142
|
+
onNavigate("/dashboard");
|
|
758
143
|
});
|
|
759
144
|
}
|
|
760
145
|
}();
|
|
@@ -766,61 +151,127 @@ var BlockLogin = function BlockLogin(_ref) {
|
|
|
766
151
|
var onFailureGoogle = function onFailureGoogle() {
|
|
767
152
|
onNavigate("/login");
|
|
768
153
|
};
|
|
769
|
-
return React__default.createElement(reactstrap.
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
154
|
+
return React__default.createElement(reactstrap.Row, {
|
|
155
|
+
style: {
|
|
156
|
+
height: "100%"
|
|
157
|
+
}
|
|
158
|
+
}, React__default.createElement(reactstrap.Col, {
|
|
159
|
+
sm: 12,
|
|
160
|
+
lg: 7
|
|
161
|
+
}, React__default.createElement("div", {
|
|
162
|
+
className: "" + styleGlobal["box-signin-container"]
|
|
163
|
+
}, React__default.createElement("div", {
|
|
164
|
+
className: styleGlobal["box-signin-logo"] + " "
|
|
165
|
+
}, React__default.createElement(reactRouterDom.Link, {
|
|
166
|
+
to: "/",
|
|
167
|
+
className: "d-flex"
|
|
168
|
+
}, React__default.createElement("img", {
|
|
169
|
+
src: "/images/Logo.png",
|
|
170
|
+
alt: "",
|
|
171
|
+
height: 37,
|
|
172
|
+
width: 155,
|
|
173
|
+
className: "my-auto"
|
|
174
|
+
}))), React__default.createElement("div", {
|
|
175
|
+
className: styleGlobal["box-signin"] + " "
|
|
176
|
+
}, React__default.createElement("div", {
|
|
177
|
+
className: "" + styleGlobal["signin_title"]
|
|
178
|
+
}, React__default.createElement("span", null, "Welcome to Edusfere")), React__default.createElement("div", {
|
|
179
|
+
className: "" + styleGlobal["signup_link"]
|
|
180
|
+
}, React__default.createElement("span", null, "Don't have an account?", " ", React__default.createElement(reactRouterDom.Link, {
|
|
181
|
+
to: "/",
|
|
182
|
+
style: {
|
|
183
|
+
color: "#00A0DA"
|
|
184
|
+
},
|
|
185
|
+
className: "text-decoration-none"
|
|
186
|
+
}, "Sign up"))), React__default.createElement(GoogleLogin__default, {
|
|
187
|
+
clientId: GOOGLE_CLIENT_ID,
|
|
188
|
+
render: function render(renderProps) {
|
|
189
|
+
return React__default.createElement("div", {
|
|
190
|
+
className: "" + styleGlobal["google_button"]
|
|
191
|
+
}, React__default.createElement("button", {
|
|
192
|
+
onClick: renderProps.onClick,
|
|
193
|
+
disabled: renderProps.disabled
|
|
194
|
+
}, React__default.createElement("img", {
|
|
195
|
+
width: 24,
|
|
196
|
+
height: 24,
|
|
197
|
+
alt: "Google sign-in",
|
|
198
|
+
src: "/images/icons/Google__G__logo.png"
|
|
199
|
+
}), "Sign in with Google"));
|
|
200
|
+
},
|
|
201
|
+
onSuccess: onSuccessGoogle,
|
|
202
|
+
onFailure: onFailureGoogle,
|
|
203
|
+
cookiePolicy: "single_host_origin"
|
|
204
|
+
}), React__default.createElement("span", {
|
|
205
|
+
className: "" + styleGlobal["box-field"]
|
|
206
|
+
}, "OR"), React__default.createElement(reactstrap.Form, null, React__default.createElement("div", {
|
|
207
|
+
className: "" + styleGlobal["box-input"]
|
|
208
|
+
}, React__default.createElement("input", {
|
|
209
|
+
type: "email",
|
|
210
|
+
placeholder: "Email"
|
|
211
|
+
})), React__default.createElement("button", {
|
|
212
|
+
type: "submit",
|
|
213
|
+
className: "" + styleGlobal["box-button-email"]
|
|
214
|
+
}, React__default.createElement("img", {
|
|
215
|
+
width: 20,
|
|
216
|
+
height: 20,
|
|
217
|
+
alt: "Email sign-in",
|
|
218
|
+
src: "/images/icons/Login_icon.png"
|
|
219
|
+
}), "Sign in with Email"))), React__default.createElement("div", {
|
|
220
|
+
className: styleGlobal["box-signin-text"] + " "
|
|
221
|
+
}, React__default.createElement("span", {
|
|
222
|
+
style: {
|
|
223
|
+
fontSize: "13px",
|
|
224
|
+
color: "#A6A6AD"
|
|
225
|
+
}
|
|
226
|
+
}, "By signing in, you agree to our Terms & Privacy Policy")))), React__default.createElement(reactstrap.Col, {
|
|
227
|
+
sm: 12,
|
|
228
|
+
lg: 5,
|
|
229
|
+
className: "d-none d-lg-block"
|
|
230
|
+
}, React__default.createElement("div", {
|
|
231
|
+
className: "" + styleGlobal["box-right"],
|
|
232
|
+
style: {
|
|
233
|
+
backgroundImage: "url('/images/bg_login.png')"
|
|
234
|
+
}
|
|
235
|
+
}, React__default.createElement("div", {
|
|
236
|
+
className: "" + styleGlobal["box-right-body"]
|
|
237
|
+
}, React__default.createElement("span", {
|
|
238
|
+
style: {
|
|
239
|
+
fontSize: "24px",
|
|
240
|
+
fontWeight: "700"
|
|
241
|
+
}
|
|
242
|
+
}, "As a teacher, your time and energy are too valuable to waste"), React__default.createElement("p", {
|
|
243
|
+
className: " fw-normal ",
|
|
244
|
+
style: {
|
|
245
|
+
marginTop: "12px",
|
|
246
|
+
marginBottom: "24px",
|
|
247
|
+
color: "#03191F"
|
|
248
|
+
}
|
|
249
|
+
}, "So we\u2019re building a curriculum hub and and workspace that puts everything you need to plan and prep within reach."), React__default.createElement("ul", null, itemLogin.map(function (item, it) {
|
|
250
|
+
return React__default.createElement("li", {
|
|
251
|
+
key: it,
|
|
252
|
+
className: "mb-2 ",
|
|
253
|
+
style: {
|
|
254
|
+
color: "#212126"
|
|
786
255
|
}
|
|
256
|
+
}, item);
|
|
257
|
+
})), React__default.createElement("div", {
|
|
258
|
+
className: "" + styleGlobal["box-right-footer"]
|
|
259
|
+
}, React__default.createElement("img", {
|
|
260
|
+
className: "img-fluid",
|
|
261
|
+
alt: "",
|
|
262
|
+
src: "/images/image_login.png",
|
|
263
|
+
style: {
|
|
264
|
+
width: "15vw"
|
|
787
265
|
}
|
|
788
|
-
},
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
onSubmit: handleSubmit
|
|
798
|
-
}, React__default.createElement(reactstrap.FormGroup, null, React__default.createElement(reactGoogleRecaptchaV3.GoogleReCaptcha, {
|
|
799
|
-
action: "login",
|
|
800
|
-
onVerify: handleVerify
|
|
801
|
-
})), React__default.createElement(GoogleLogin, {
|
|
802
|
-
clientId: GOOGLE_CLIENT_ID,
|
|
803
|
-
render: function render(renderProps) {
|
|
804
|
-
return React__default.createElement("div", {
|
|
805
|
-
className: "d-flex justify-content-center mt-5"
|
|
806
|
-
}, React__default.createElement("button", {
|
|
807
|
-
onClick: renderProps.onClick,
|
|
808
|
-
disabled: renderProps.disabled,
|
|
809
|
-
className: "d-flex py-3 text-black align-items-center px-3 justify-content-center"
|
|
810
|
-
}, React__default.createElement("img", {
|
|
811
|
-
width: 30,
|
|
812
|
-
alt: "Google sign-in",
|
|
813
|
-
src: "/images/icons/icons8-google-96.svg"
|
|
814
|
-
}), React__default.createElement("h6", {
|
|
815
|
-
className: "mb-0 ms-3 fw-bold"
|
|
816
|
-
}, "sign in with Google")));
|
|
817
|
-
},
|
|
818
|
-
onSuccess: onSuccessGoogle,
|
|
819
|
-
onFailure: onFailureGoogle,
|
|
820
|
-
cookiePolicy: "single_host_origin",
|
|
821
|
-
className: "" + styles["btn-login-google"]
|
|
822
|
-
}))));
|
|
823
|
-
}));
|
|
266
|
+
}), React__default.createElement("div", null, React__default.createElement("p", null, "As one of our earliest users,", React__default.createElement("br", null), "you are a vital part of this process"), React__default.createElement("div", null, React__default.createElement("span", {
|
|
267
|
+
className: "d-block"
|
|
268
|
+
}, "Thank you!"), React__default.createElement("img", {
|
|
269
|
+
style: {
|
|
270
|
+
marginTop: "-15px"
|
|
271
|
+
},
|
|
272
|
+
alt: "",
|
|
273
|
+
src: "/images/icons/Vector 22.png"
|
|
274
|
+
}))))))));
|
|
824
275
|
};
|
|
825
276
|
|
|
826
277
|
var defaultInfo = {
|
|
@@ -829,7 +280,6 @@ var defaultInfo = {
|
|
|
829
280
|
captcha: "",
|
|
830
281
|
rememberMe: false
|
|
831
282
|
};
|
|
832
|
-
var TITLE = "Log in";
|
|
833
283
|
var useLogin = function useLogin() {
|
|
834
284
|
var _useState = React.useState(false),
|
|
835
285
|
openLogin = _useState[0],
|
|
@@ -843,9 +293,6 @@ var useLogin = function useLogin() {
|
|
|
843
293
|
var _useState3 = React.useState(false),
|
|
844
294
|
isShowPassword = _useState3[0],
|
|
845
295
|
setIsShowPassword = _useState3[1];
|
|
846
|
-
React.useEffect(function () {
|
|
847
|
-
document.title = TITLE;
|
|
848
|
-
}, []);
|
|
849
296
|
React.useEffect(function () {
|
|
850
297
|
var start = function start() {
|
|
851
298
|
gapiScript.gapi.client.init({
|
|
@@ -867,31 +314,17 @@ var useLogin = function useLogin() {
|
|
|
867
314
|
};
|
|
868
315
|
|
|
869
316
|
var Login = function Login(props) {
|
|
870
|
-
var onNavigate = props.onNavigate
|
|
317
|
+
var onNavigate = props.onNavigate,
|
|
318
|
+
role = props.role;
|
|
871
319
|
var _useLogin = useLogin(),
|
|
872
320
|
defaultInfo = _useLogin.defaultInfo;
|
|
873
321
|
return React__default.createElement("div", {
|
|
874
|
-
className:
|
|
875
|
-
}, React__default.createElement("button", {
|
|
876
|
-
className: styles["back_btn"],
|
|
877
|
-
onClick: function onClick() {
|
|
878
|
-
onNavigate("/");
|
|
879
|
-
}
|
|
880
|
-
}, React__default.createElement("img", {
|
|
881
|
-
src: "/images/icons/white-left-arrow.svg",
|
|
882
|
-
alt: ""
|
|
883
|
-
}), " back"), React__default.createElement(reactGoogleRecaptchaV3.GoogleReCaptchaProvider, {
|
|
884
|
-
useRecaptchaNet: true,
|
|
885
|
-
reCaptchaKey: GOOGLE_RECAPTCHA_ID,
|
|
886
|
-
scriptProps: {
|
|
887
|
-
async: true,
|
|
888
|
-
defer: true,
|
|
889
|
-
appendTo: "body"
|
|
890
|
-
}
|
|
322
|
+
className: styleGlobal["signup_wrap"] + " container-fluid font-family-lato"
|
|
891
323
|
}, React__default.createElement(BlockLogin, {
|
|
892
324
|
defaultInfo: defaultInfo,
|
|
893
|
-
onNavigate: onNavigate
|
|
894
|
-
|
|
325
|
+
onNavigate: onNavigate,
|
|
326
|
+
role: role
|
|
327
|
+
}));
|
|
895
328
|
};
|
|
896
329
|
|
|
897
330
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
@@ -989,7 +422,7 @@ function kindOf(val) {
|
|
|
989
422
|
}
|
|
990
423
|
|
|
991
424
|
// src/utils/warning.ts
|
|
992
|
-
function warning
|
|
425
|
+
function warning(message) {
|
|
993
426
|
if (typeof console !== "undefined" && typeof console.error === "function") {
|
|
994
427
|
console.error(message);
|
|
995
428
|
}
|
|
@@ -1042,7 +475,7 @@ function combineReducers(reducers) {
|
|
|
1042
475
|
const key = reducerKeys[i];
|
|
1043
476
|
if (process.env.NODE_ENV !== "production") {
|
|
1044
477
|
if (typeof reducers[key] === "undefined") {
|
|
1045
|
-
warning
|
|
478
|
+
warning(`No reducer provided for key "${key}"`);
|
|
1046
479
|
}
|
|
1047
480
|
}
|
|
1048
481
|
if (typeof reducers[key] === "function") {
|
|
@@ -1067,7 +500,7 @@ function combineReducers(reducers) {
|
|
|
1067
500
|
if (process.env.NODE_ENV !== "production") {
|
|
1068
501
|
const warningMessage = getUnexpectedStateShapeWarningMessage(state, finalReducers, action, unexpectedKeyCache);
|
|
1069
502
|
if (warningMessage) {
|
|
1070
|
-
warning
|
|
503
|
+
warning(warningMessage);
|
|
1071
504
|
}
|
|
1072
505
|
}
|
|
1073
506
|
let hasChanged = false;
|
|
@@ -1095,7 +528,8 @@ var initialState = {
|
|
|
1095
528
|
type: "",
|
|
1096
529
|
message: ""
|
|
1097
530
|
},
|
|
1098
|
-
user: null
|
|
531
|
+
user: null,
|
|
532
|
+
academy: null
|
|
1099
533
|
};
|
|
1100
534
|
var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
1101
535
|
builder.addCase(setLoading, function (state, action) {
|
|
@@ -1104,6 +538,10 @@ var commonReducer = toolkit.createReducer(initialState, function (builder) {
|
|
|
1104
538
|
state.alert = action.payload;
|
|
1105
539
|
}).addCase(setUser, function (state, action) {
|
|
1106
540
|
state.user = action.payload;
|
|
541
|
+
}).addCase(setLanguage, function (state, action) {
|
|
542
|
+
state.language = action.payload;
|
|
543
|
+
}).addCase(reset, function (_state, _action) {
|
|
544
|
+
return initialState;
|
|
1107
545
|
});
|
|
1108
546
|
});
|
|
1109
547
|
|
|
@@ -1120,11 +558,7 @@ var store = toolkit.configureStore({
|
|
|
1120
558
|
}
|
|
1121
559
|
});
|
|
1122
560
|
|
|
1123
|
-
var TITLE$1 = "Not found";
|
|
1124
561
|
var NotFound = function NotFound() {
|
|
1125
|
-
React.useEffect(function () {
|
|
1126
|
-
document.title = TITLE$1;
|
|
1127
|
-
});
|
|
1128
562
|
return React__default.createElement("div", {
|
|
1129
563
|
className: "not-found"
|
|
1130
564
|
}, React__default.createElement("div", {
|
|
@@ -1167,6 +601,25 @@ var Loading = function Loading() {
|
|
|
1167
601
|
}))) : null;
|
|
1168
602
|
};
|
|
1169
603
|
|
|
604
|
+
// A type of promise-like that resolves synchronously and supports only one observer
|
|
605
|
+
|
|
606
|
+
const _iteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.iterator || (Symbol.iterator = Symbol("Symbol.iterator"))) : "@@iterator";
|
|
607
|
+
|
|
608
|
+
const _asyncIteratorSymbol = /*#__PURE__*/ typeof Symbol !== "undefined" ? (Symbol.asyncIterator || (Symbol.asyncIterator = Symbol("Symbol.asyncIterator"))) : "@@asyncIterator";
|
|
609
|
+
|
|
610
|
+
// Asynchronously call a function and send errors to recovery continuation
|
|
611
|
+
function _catch(body, recover) {
|
|
612
|
+
try {
|
|
613
|
+
var result = body();
|
|
614
|
+
} catch(e) {
|
|
615
|
+
return recover(e);
|
|
616
|
+
}
|
|
617
|
+
if (result && result.then) {
|
|
618
|
+
return result.then(void 0, recover);
|
|
619
|
+
}
|
|
620
|
+
return result;
|
|
621
|
+
}
|
|
622
|
+
|
|
1170
623
|
var encodeParams$1 = (function (params) {
|
|
1171
624
|
return Object.keys(params).filter(function (key) {
|
|
1172
625
|
return params[key] || params[key] === 0 || params[key] === false;
|
|
@@ -1232,18 +685,68 @@ var apiUpload$1 = axios.create({
|
|
|
1232
685
|
});
|
|
1233
686
|
});
|
|
1234
687
|
|
|
1235
|
-
var ACCOUNT_URL = BASE_URL + "/api/account";
|
|
1236
688
|
var getInfo = function getInfo() {
|
|
1237
|
-
return api$1.get(
|
|
689
|
+
return api$1.get(BASE_URL + "/api/Auth/info");
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
var useGoogleSignOut = function useGoogleSignOut(props) {
|
|
693
|
+
var dispatch = reactRedux.useDispatch();
|
|
694
|
+
var onLogoutSuccess = props.onLogoutSuccess,
|
|
695
|
+
onFailure = props.onFailure;
|
|
696
|
+
var handleLogoutSuccess = function handleLogoutSuccess() {
|
|
697
|
+
onLogoutSuccess === null || onLogoutSuccess === void 0 ? void 0 : onLogoutSuccess();
|
|
698
|
+
};
|
|
699
|
+
var handleLogoutFailure = function handleLogoutFailure() {
|
|
700
|
+
onFailure === null || onFailure === void 0 ? void 0 : onFailure();
|
|
701
|
+
};
|
|
702
|
+
var _useGoogleLogout = GoogleLogin.useGoogleLogout({
|
|
703
|
+
clientId: GOOGLE_CLIENT_ID,
|
|
704
|
+
onLogoutSuccess: handleLogoutSuccess,
|
|
705
|
+
onFailure: handleLogoutFailure
|
|
706
|
+
}),
|
|
707
|
+
signOut = _useGoogleLogout.signOut,
|
|
708
|
+
loaded = _useGoogleLogout.loaded;
|
|
709
|
+
var handleSignOut = function handleSignOut(isRemoveDomainStorage) {
|
|
710
|
+
if (isRemoveDomainStorage === void 0) {
|
|
711
|
+
isRemoveDomainStorage = false;
|
|
712
|
+
}
|
|
713
|
+
localStorage.removeItem("USER_INFORMATION");
|
|
714
|
+
localStorage.removeItem(ACCESS_TOKEN);
|
|
715
|
+
if (isRemoveDomainStorage) {
|
|
716
|
+
localStorage.removeItem(ACADEMY_DOMAIN);
|
|
717
|
+
}
|
|
718
|
+
try {
|
|
719
|
+
signOut();
|
|
720
|
+
} catch (error) {
|
|
721
|
+
console.log({
|
|
722
|
+
error: error
|
|
723
|
+
});
|
|
724
|
+
}
|
|
725
|
+
dispatch(reset());
|
|
726
|
+
window.location.href = "/login";
|
|
727
|
+
};
|
|
728
|
+
return {
|
|
729
|
+
handleSignOut: handleSignOut,
|
|
730
|
+
loaded: loaded
|
|
731
|
+
};
|
|
1238
732
|
};
|
|
1239
733
|
|
|
1240
734
|
var LayoutContext = function LayoutContext(_ref) {
|
|
1241
735
|
var children = _ref.children,
|
|
736
|
+
role = _ref.role,
|
|
1242
737
|
onNavigate = _ref.onNavigate;
|
|
738
|
+
var _useGoogleSignOut = useGoogleSignOut({
|
|
739
|
+
onNavigate: onNavigate
|
|
740
|
+
}),
|
|
741
|
+
handleSignOut = _useGoogleSignOut.handleSignOut;
|
|
1243
742
|
var dispatch = reactRedux.useDispatch();
|
|
743
|
+
var user = reactRedux.useSelector(function (state) {
|
|
744
|
+
var _state$common;
|
|
745
|
+
return state === null || state === void 0 ? void 0 : (_state$common = state.common) === null || _state$common === void 0 ? void 0 : _state$common.user;
|
|
746
|
+
});
|
|
747
|
+
var roles = (user === null || user === void 0 ? void 0 : user.roles) || [];
|
|
1244
748
|
var resetAuth = function resetAuth() {
|
|
1245
|
-
|
|
1246
|
-
onNavigate("/login");
|
|
749
|
+
handleSignOut();
|
|
1247
750
|
};
|
|
1248
751
|
var loadInfo = function loadInfo() {
|
|
1249
752
|
try {
|
|
@@ -1267,10 +770,17 @@ var LayoutContext = function LayoutContext(_ref) {
|
|
|
1267
770
|
return Promise.reject(e);
|
|
1268
771
|
}
|
|
1269
772
|
};
|
|
1270
|
-
|
|
773
|
+
var checkRoleUser = React.useCallback(function () {
|
|
774
|
+
if (!user) return;
|
|
775
|
+
if (!roles.includes(role) && !!user.academyDomain) {
|
|
776
|
+
alert(user.email + " not allow to register " + role);
|
|
777
|
+
resetAuth();
|
|
778
|
+
}
|
|
779
|
+
}, [role, JSON.stringify(user)]);
|
|
1271
780
|
React.useEffect(function () {
|
|
1272
|
-
loadInfo();
|
|
1273
|
-
|
|
781
|
+
!user && loadInfo();
|
|
782
|
+
!!user && checkRoleUser();
|
|
783
|
+
}, [JSON.stringify(user)]);
|
|
1274
784
|
return React__default.createElement(React.Fragment, null, children);
|
|
1275
785
|
};
|
|
1276
786
|
|
|
@@ -1304,30 +814,623 @@ var CommonDialog = function CommonDialog(_ref) {
|
|
|
1304
814
|
children = _ref.children,
|
|
1305
815
|
centered = _ref.centered,
|
|
1306
816
|
title = _ref.title,
|
|
1307
|
-
|
|
817
|
+
_ref$size = _ref.size,
|
|
818
|
+
size = _ref$size === void 0 ? "xs" : _ref$size,
|
|
819
|
+
_ref$isShowHeader = _ref.isShowHeader,
|
|
820
|
+
isShowHeader = _ref$isShowHeader === void 0 ? true : _ref$isShowHeader,
|
|
821
|
+
onClose = _ref.onClose,
|
|
822
|
+
backdrop = _ref.backdrop;
|
|
1308
823
|
return React__default.createElement(reactstrap.Modal, {
|
|
824
|
+
backdrop: backdrop,
|
|
1309
825
|
isOpen: open,
|
|
1310
826
|
toggle: onClose,
|
|
1311
|
-
centered: centered
|
|
1312
|
-
|
|
827
|
+
centered: centered,
|
|
828
|
+
size: size,
|
|
829
|
+
zIndex: 1102
|
|
830
|
+
}, isShowHeader ? React__default.createElement(reactstrap.ModalHeader, {
|
|
1313
831
|
toggle: onClose
|
|
1314
|
-
}, title),
|
|
832
|
+
}, title) : React__default.createElement(material.Box, {
|
|
833
|
+
className: "p-3"
|
|
834
|
+
}, React__default.createElement(material.Typography, {
|
|
835
|
+
className: "fs-5 text-center fw-bold"
|
|
836
|
+
}, title)), children);
|
|
837
|
+
};
|
|
838
|
+
|
|
839
|
+
var AuthenticationMessage;
|
|
840
|
+
(function (AuthenticationMessage) {
|
|
841
|
+
AuthenticationMessage["NotAllowedToRegister"] = "NotAllowedToRegister";
|
|
842
|
+
AuthenticationMessage["InvalidGoogleToken"] = "InvalidGoogleToken";
|
|
843
|
+
})(AuthenticationMessage || (AuthenticationMessage = {}));
|
|
844
|
+
(function (Role) {
|
|
845
|
+
Role["Student"] = "Student";
|
|
846
|
+
Role["Teacher"] = "Teacher";
|
|
847
|
+
Role["Admin"] = "Admin";
|
|
848
|
+
})(exports.Role || (exports.Role = {}));
|
|
849
|
+
|
|
850
|
+
var CustomPagination = function CustomPagination(_ref) {
|
|
851
|
+
var currentPage = _ref.currentPage,
|
|
852
|
+
totalPage = _ref.totalPage,
|
|
853
|
+
onChangePage = _ref.onChangePage;
|
|
854
|
+
return React__default.createElement(reactstrap.Pagination, {
|
|
855
|
+
className: "w-fit"
|
|
856
|
+
}, React__default.createElement(reactstrap.PaginationItem, {
|
|
857
|
+
disabled: currentPage <= 1
|
|
858
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
859
|
+
onClick: function onClick(e) {
|
|
860
|
+
e.preventDefault();
|
|
861
|
+
onChangePage(currentPage - 1);
|
|
862
|
+
},
|
|
863
|
+
previous: true,
|
|
864
|
+
href: "#"
|
|
865
|
+
})), React__default.createElement(reactstrap.PaginationItem, {
|
|
866
|
+
active: 1 === currentPage,
|
|
867
|
+
key: 1
|
|
868
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
869
|
+
onClick: function onClick(e) {
|
|
870
|
+
e.preventDefault();
|
|
871
|
+
onChangePage(1);
|
|
872
|
+
},
|
|
873
|
+
href: "#"
|
|
874
|
+
}, 1)), totalPage > 2 && React__default.createElement(reactstrap.PaginationItem, {
|
|
875
|
+
active: 2 === currentPage,
|
|
876
|
+
key: 1
|
|
877
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
878
|
+
onClick: function onClick(e) {
|
|
879
|
+
e.preventDefault();
|
|
880
|
+
onChangePage(2);
|
|
881
|
+
},
|
|
882
|
+
href: "#"
|
|
883
|
+
}, 2)), currentPage > 4 && currentPage !== totalPage && totalPage !== 5 && React__default.createElement(reactstrap.PaginationItem, {
|
|
884
|
+
disabled: true,
|
|
885
|
+
key: "first"
|
|
886
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
887
|
+
href: "#"
|
|
888
|
+
}, "...")), (currentPage === 1 || currentPage === totalPage) && totalPage === 5 && React__default.createElement(reactstrap.PaginationItem, {
|
|
889
|
+
key: 3
|
|
890
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
891
|
+
onClick: function onClick(e) {
|
|
892
|
+
e.preventDefault();
|
|
893
|
+
onChangePage(3);
|
|
894
|
+
},
|
|
895
|
+
href: "#"
|
|
896
|
+
}, "3")), [currentPage - 1, currentPage, currentPage + 1].filter(function (page) {
|
|
897
|
+
return page > 2 && page < totalPage - 1;
|
|
898
|
+
}).map(function (page) {
|
|
899
|
+
return React__default.createElement(reactstrap.PaginationItem, {
|
|
900
|
+
active: page === currentPage,
|
|
901
|
+
key: page
|
|
902
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
903
|
+
onClick: function onClick(e) {
|
|
904
|
+
e.preventDefault();
|
|
905
|
+
onChangePage(page);
|
|
906
|
+
},
|
|
907
|
+
href: "#"
|
|
908
|
+
}, page));
|
|
909
|
+
}), totalPage - currentPage > 4 && React__default.createElement(reactstrap.PaginationItem, {
|
|
910
|
+
disabled: true,
|
|
911
|
+
key: "last"
|
|
912
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
913
|
+
href: "#"
|
|
914
|
+
}, "...")), totalPage > 3 && React__default.createElement(reactstrap.PaginationItem, {
|
|
915
|
+
active: totalPage - 1 === currentPage,
|
|
916
|
+
key: totalPage - 1
|
|
917
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
918
|
+
onClick: function onClick(e) {
|
|
919
|
+
e.preventDefault();
|
|
920
|
+
onChangePage(totalPage - 1);
|
|
921
|
+
},
|
|
922
|
+
href: "#"
|
|
923
|
+
}, totalPage - 1)), totalPage > 1 && React__default.createElement(reactstrap.PaginationItem, {
|
|
924
|
+
active: totalPage === currentPage,
|
|
925
|
+
key: totalPage
|
|
926
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
927
|
+
onClick: function onClick(e) {
|
|
928
|
+
e.preventDefault();
|
|
929
|
+
onChangePage(totalPage);
|
|
930
|
+
},
|
|
931
|
+
href: "#"
|
|
932
|
+
}, totalPage)), React__default.createElement(reactstrap.PaginationItem, {
|
|
933
|
+
disabled: currentPage >= totalPage
|
|
934
|
+
}, React__default.createElement(reactstrap.PaginationLink, {
|
|
935
|
+
onClick: function onClick(e) {
|
|
936
|
+
e.preventDefault();
|
|
937
|
+
onChangePage(currentPage + 1);
|
|
938
|
+
},
|
|
939
|
+
next: true,
|
|
940
|
+
href: "#"
|
|
941
|
+
})));
|
|
942
|
+
};
|
|
943
|
+
|
|
944
|
+
var styles = {"core-button":"_xvNBN","primary":"_U9Qyp","secondary":"_1VzMy","text":"_pZNuj"};
|
|
945
|
+
|
|
946
|
+
var CoreButton = function CoreButton(props) {
|
|
947
|
+
var _props$type = props.type,
|
|
948
|
+
type = _props$type === void 0 ? "primary" : _props$type,
|
|
949
|
+
children = props.children,
|
|
950
|
+
onClick = props.onClick,
|
|
951
|
+
icon = props.icon,
|
|
952
|
+
_props$disabled = props.disabled,
|
|
953
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
954
|
+
return React__default.createElement("button", {
|
|
955
|
+
className: styles["core-button"] + " " + styles[type],
|
|
956
|
+
onClick: onClick,
|
|
957
|
+
disabled: disabled
|
|
958
|
+
}, icon && icon, children);
|
|
959
|
+
};
|
|
960
|
+
|
|
961
|
+
var styles$1 = {"core-input":"_1WdX2","error":"_n7n3Q"};
|
|
962
|
+
|
|
963
|
+
var CoreInput = function CoreInput(props) {
|
|
964
|
+
var name = props.name,
|
|
965
|
+
value = props.value,
|
|
966
|
+
_onChange = props.onChange,
|
|
967
|
+
_props$disabled = props.disabled,
|
|
968
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
969
|
+
label = props.label,
|
|
970
|
+
width = props.width,
|
|
971
|
+
_props$placeholder = props.placeholder,
|
|
972
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
973
|
+
error = props.error;
|
|
974
|
+
return React__default.createElement("div", {
|
|
975
|
+
className: styles$1["core-input"] + " " + (error ? styles$1["error"] : ""),
|
|
976
|
+
style: {
|
|
977
|
+
width: width != null ? width : "100%"
|
|
978
|
+
}
|
|
979
|
+
}, label && React__default.createElement("label", null, label), React__default.createElement("input", {
|
|
980
|
+
name: name,
|
|
981
|
+
value: value,
|
|
982
|
+
onChange: function onChange(e) {
|
|
983
|
+
return _onChange(name, e.target.value);
|
|
984
|
+
},
|
|
985
|
+
disabled: disabled,
|
|
986
|
+
placeholder: placeholder
|
|
987
|
+
}));
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
function _extends() {
|
|
991
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
992
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
993
|
+
var t = arguments[e];
|
|
994
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
995
|
+
}
|
|
996
|
+
return n;
|
|
997
|
+
}, _extends.apply(null, arguments);
|
|
998
|
+
}
|
|
999
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
1000
|
+
if (null == r) return {};
|
|
1001
|
+
var t = {};
|
|
1002
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
1003
|
+
if (e.includes(n)) continue;
|
|
1004
|
+
t[n] = r[n];
|
|
1005
|
+
}
|
|
1006
|
+
return t;
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
var styles$2 = {"core-select":"_2sg12"};
|
|
1010
|
+
|
|
1011
|
+
var CoreSelect = function CoreSelect(props) {
|
|
1012
|
+
var _options$find;
|
|
1013
|
+
var name = props.name,
|
|
1014
|
+
options = props.options,
|
|
1015
|
+
value = props.value,
|
|
1016
|
+
_onChange = props.onChange,
|
|
1017
|
+
_props$disabled = props.disabled,
|
|
1018
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1019
|
+
label = props.label,
|
|
1020
|
+
width = props.width,
|
|
1021
|
+
_props$placeholder = props.placeholder,
|
|
1022
|
+
placeholder = _props$placeholder === void 0 ? "" : _props$placeholder,
|
|
1023
|
+
error = props.error;
|
|
1024
|
+
return React__default.createElement("div", {
|
|
1025
|
+
className: "" + styles$2["core-select"],
|
|
1026
|
+
style: {
|
|
1027
|
+
width: width != null ? width : "100%"
|
|
1028
|
+
}
|
|
1029
|
+
}, label && React__default.createElement("label", null, label), React__default.createElement(Select__default, {
|
|
1030
|
+
name: name,
|
|
1031
|
+
value: (_options$find = options.find(function (i) {
|
|
1032
|
+
return i.value === value;
|
|
1033
|
+
})) != null ? _options$find : null,
|
|
1034
|
+
onChange: function onChange(e) {
|
|
1035
|
+
return _onChange(name, e === null || e === void 0 ? void 0 : e.value);
|
|
1036
|
+
},
|
|
1037
|
+
placeholder: placeholder,
|
|
1038
|
+
isDisabled: disabled,
|
|
1039
|
+
options: options,
|
|
1040
|
+
styles: {
|
|
1041
|
+
control: function control(base, state) {
|
|
1042
|
+
return _extends({}, base, {
|
|
1043
|
+
borderRadius: "8px",
|
|
1044
|
+
border: state.isFocused ? "2px solid " + (!error ? "#00AFDA" : "#CE3636") : "1px solid " + (!error ? "#E6E6EB" : "#CE3636"),
|
|
1045
|
+
height: "32px",
|
|
1046
|
+
minHeight: 0,
|
|
1047
|
+
fontSize: "14px",
|
|
1048
|
+
fontWeight: "400",
|
|
1049
|
+
padding: "0 4px",
|
|
1050
|
+
backgroundColor: state.isDisabled ? "#F5F9FA)" : "#FFF",
|
|
1051
|
+
boxShadow: "none",
|
|
1052
|
+
"&:hover": {
|
|
1053
|
+
backgroundColor: "#F5F9FA"
|
|
1054
|
+
}
|
|
1055
|
+
});
|
|
1056
|
+
},
|
|
1057
|
+
input: function input(base) {
|
|
1058
|
+
return _extends({}, base, {
|
|
1059
|
+
margin: "0",
|
|
1060
|
+
padding: "0",
|
|
1061
|
+
color: "inherit"
|
|
1062
|
+
});
|
|
1063
|
+
},
|
|
1064
|
+
placeholder: function placeholder(base) {
|
|
1065
|
+
return _extends({}, base, {
|
|
1066
|
+
color: "#A6A6AD",
|
|
1067
|
+
position: "relative",
|
|
1068
|
+
top: "-4px"
|
|
1069
|
+
});
|
|
1070
|
+
},
|
|
1071
|
+
dropdownIndicator: function dropdownIndicator(base) {
|
|
1072
|
+
return _extends({}, base, {
|
|
1073
|
+
position: "relative",
|
|
1074
|
+
top: "-4px"
|
|
1075
|
+
});
|
|
1076
|
+
},
|
|
1077
|
+
indicatorSeparator: function indicatorSeparator() {
|
|
1078
|
+
return {
|
|
1079
|
+
display: "none"
|
|
1080
|
+
};
|
|
1081
|
+
},
|
|
1082
|
+
valueContainer: function valueContainer(base) {
|
|
1083
|
+
return _extends({}, base, {
|
|
1084
|
+
height: "32px"
|
|
1085
|
+
});
|
|
1086
|
+
},
|
|
1087
|
+
singleValue: function singleValue(base) {
|
|
1088
|
+
return _extends({}, base, {
|
|
1089
|
+
position: "relative",
|
|
1090
|
+
top: "-4px"
|
|
1091
|
+
});
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
}));
|
|
1095
|
+
};
|
|
1096
|
+
|
|
1097
|
+
var styles$3 = {"core-checkbox":"_3HY4f"};
|
|
1098
|
+
|
|
1099
|
+
var CoreInput$1 = function CoreInput(props) {
|
|
1100
|
+
var name = props.name,
|
|
1101
|
+
checked = props.checked,
|
|
1102
|
+
_onChange = props.onChange,
|
|
1103
|
+
_props$disabled = props.disabled,
|
|
1104
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled,
|
|
1105
|
+
label = props.label;
|
|
1106
|
+
return React__default.createElement("div", {
|
|
1107
|
+
className: "" + styles$3["core-checkbox"]
|
|
1108
|
+
}, React__default.createElement(reactstrap.FormGroup, {
|
|
1109
|
+
check: true,
|
|
1110
|
+
inline: true
|
|
1111
|
+
}, React__default.createElement(reactstrap.Input, {
|
|
1112
|
+
id: "core-checkbox-" + name,
|
|
1113
|
+
type: "checkbox",
|
|
1114
|
+
name: name,
|
|
1115
|
+
checked: checked,
|
|
1116
|
+
onChange: function onChange(e) {
|
|
1117
|
+
return _onChange(name, e.target.checked);
|
|
1118
|
+
},
|
|
1119
|
+
disabled: disabled
|
|
1120
|
+
}), React__default.createElement(reactstrap.Label, {
|
|
1121
|
+
htmlFor: "core-checkbox-" + name,
|
|
1122
|
+
check: true
|
|
1123
|
+
}, label)));
|
|
1315
1124
|
};
|
|
1316
1125
|
|
|
1317
|
-
var
|
|
1126
|
+
var styles$4 = {"core-radio":"_kvUpe","form-check":"_3ToPe"};
|
|
1318
1127
|
|
|
1128
|
+
var CoreRadio = function CoreRadio(props) {
|
|
1129
|
+
var name = props.name,
|
|
1130
|
+
value = props.value,
|
|
1131
|
+
options = props.options,
|
|
1132
|
+
onChange = props.onChange,
|
|
1133
|
+
_props$disabled = props.disabled,
|
|
1134
|
+
disabled = _props$disabled === void 0 ? false : _props$disabled;
|
|
1135
|
+
return React__default.createElement("div", {
|
|
1136
|
+
className: "" + styles$4["core-radio"]
|
|
1137
|
+
}, React__default.createElement(reactstrap.FormGroup, {
|
|
1138
|
+
check: true
|
|
1139
|
+
}, options.map(function (i) {
|
|
1140
|
+
return React__default.createElement("div", {
|
|
1141
|
+
key: i.value
|
|
1142
|
+
}, React__default.createElement(reactstrap.Input, {
|
|
1143
|
+
id: "core-radio-" + i.value,
|
|
1144
|
+
type: "radio",
|
|
1145
|
+
checked: value === i.value,
|
|
1146
|
+
onClick: function onClick() {
|
|
1147
|
+
onChange(name, i.value);
|
|
1148
|
+
},
|
|
1149
|
+
onChange: function onChange() {
|
|
1150
|
+
return;
|
|
1151
|
+
},
|
|
1152
|
+
disabled: disabled
|
|
1153
|
+
}), React__default.createElement(reactstrap.Label, {
|
|
1154
|
+
htmlFor: "core-radio-" + i.value
|
|
1155
|
+
}, i.label));
|
|
1156
|
+
})));
|
|
1157
|
+
};
|
|
1158
|
+
|
|
1159
|
+
var styles$5 = {"core-error":"_1Mmxr"};
|
|
1160
|
+
|
|
1161
|
+
var icons = {
|
|
1162
|
+
ErrorRedIcon: "/images/icons/error_red.svg"
|
|
1163
|
+
};
|
|
1164
|
+
|
|
1165
|
+
var CoreError = function CoreError(props) {
|
|
1166
|
+
var message = props.message;
|
|
1167
|
+
return React__default.createElement("div", {
|
|
1168
|
+
className: "" + styles$5["core-error"]
|
|
1169
|
+
}, React__default.createElement("img", {
|
|
1170
|
+
src: icons.ErrorRedIcon,
|
|
1171
|
+
alt: "error-icon"
|
|
1172
|
+
}), React__default.createElement("p", null, message));
|
|
1173
|
+
};
|
|
1174
|
+
|
|
1175
|
+
var styles$6 = {"core-modal-header":"_2y5ln"};
|
|
1176
|
+
|
|
1177
|
+
var CoreModal = function CoreModal(props) {
|
|
1178
|
+
var open = props.open,
|
|
1179
|
+
onClose = props.onClose,
|
|
1180
|
+
children = props.children,
|
|
1181
|
+
title = props.title;
|
|
1182
|
+
return React__default.createElement(reactstrap.Modal, {
|
|
1183
|
+
isOpen: open,
|
|
1184
|
+
toggle: onClose,
|
|
1185
|
+
centered: true,
|
|
1186
|
+
className: styles$6["core-modal"]
|
|
1187
|
+
}, React__default.createElement(reactstrap.ModalHeader, {
|
|
1188
|
+
toggle: onClose,
|
|
1189
|
+
className: styles$6["core-modal-header"]
|
|
1190
|
+
}, title), React__default.createElement(reactstrap.ModalBody, null, children));
|
|
1191
|
+
};
|
|
1192
|
+
|
|
1193
|
+
var getErrorMessage = function getErrorMessage(error, defaultErrorMessage) {
|
|
1194
|
+
var _error$response, _error$response$data, _error$response2, _error$response3, _error$response3$data;
|
|
1195
|
+
var errorMessage = error === null || error === void 0 ? void 0 : (_error$response = error.response) === null || _error$response === void 0 ? void 0 : (_error$response$data = _error$response.data) === null || _error$response$data === void 0 ? void 0 : _error$response$data.title;
|
|
1196
|
+
if ((error === null || error === void 0 ? void 0 : (_error$response2 = error.response) === null || _error$response2 === void 0 ? void 0 : _error$response2.status) === 500) return defaultErrorMessage || DefaultErrorMessage;
|
|
1197
|
+
if (typeof errorMessage === "string") return decodeURIComponent(errorMessage);
|
|
1198
|
+
errorMessage = (error === null || error === void 0 ? void 0 : error.message) || (error === null || error === void 0 ? void 0 : (_error$response3 = error.response) === null || _error$response3 === void 0 ? void 0 : (_error$response3$data = _error$response3.data) === null || _error$response3$data === void 0 ? void 0 : _error$response3$data.message);
|
|
1199
|
+
if (typeof errorMessage === "string") return errorMessage;
|
|
1200
|
+
return defaultErrorMessage || DefaultErrorMessage;
|
|
1201
|
+
};
|
|
1202
|
+
|
|
1203
|
+
var customStyles = {
|
|
1204
|
+
control: function control(baseStyles, state) {
|
|
1205
|
+
return _extends({}, baseStyles, {
|
|
1206
|
+
fontSize: "14px",
|
|
1207
|
+
fontWeight: 700,
|
|
1208
|
+
color: styleGlobal.darker,
|
|
1209
|
+
borderColor: state.isFocused || state.hasValue ? styleGlobal.dark : styleGlobal.less_dark,
|
|
1210
|
+
boxShadow: state.isFocused ? "0 0 0 1px " + styleGlobal.dark + "4D" : baseStyles.boxShadow,
|
|
1211
|
+
"&:active": {
|
|
1212
|
+
borderColor: state.isFocused || state.hasValue ? styleGlobal.dark : styleGlobal.less_dark
|
|
1213
|
+
},
|
|
1214
|
+
"&:hover": {
|
|
1215
|
+
borderColor: state.isFocused || state.hasValue ? styleGlobal.dark : styleGlobal.less_dark
|
|
1216
|
+
}
|
|
1217
|
+
});
|
|
1218
|
+
},
|
|
1219
|
+
input: function input(baseStyles, _) {
|
|
1220
|
+
return _extends({}, baseStyles, {
|
|
1221
|
+
fontSize: "14px",
|
|
1222
|
+
fontWeight: 700,
|
|
1223
|
+
color: styleGlobal.darker
|
|
1224
|
+
});
|
|
1225
|
+
},
|
|
1226
|
+
singleValue: function singleValue(baseStyles) {
|
|
1227
|
+
return _extends({}, baseStyles, {
|
|
1228
|
+
fontSize: "14px",
|
|
1229
|
+
fontWeight: 700,
|
|
1230
|
+
color: styleGlobal.darker
|
|
1231
|
+
});
|
|
1232
|
+
},
|
|
1233
|
+
option: function option(baseStyles, state) {
|
|
1234
|
+
return _extends({}, baseStyles, {
|
|
1235
|
+
backgroundColor: state.isSelected ? styleGlobal.dark : state.isFocused ? styleGlobal.light : 'white',
|
|
1236
|
+
"&:active": {
|
|
1237
|
+
backgroundColor: state.isSelected ? styleGlobal.dark : state.isFocused ? styleGlobal.less_dark : baseStyles.backgroundColor
|
|
1238
|
+
}
|
|
1239
|
+
});
|
|
1240
|
+
}
|
|
1241
|
+
};
|
|
1242
|
+
|
|
1243
|
+
var DropdownIndicator = function DropdownIndicator(props) {
|
|
1244
|
+
return React__default.createElement(Select.components.DropdownIndicator, Object.assign({}, props), React__default.createElement(fa.FaCaretDown, {
|
|
1245
|
+
size: 20,
|
|
1246
|
+
color: styleGlobal.darker
|
|
1247
|
+
}));
|
|
1248
|
+
};
|
|
1249
|
+
var CustomOption = function CustomOption(props) {
|
|
1250
|
+
return React__default.createElement(Select.components.Option, Object.assign({}, props), React__default.createElement("div", {
|
|
1251
|
+
style: {
|
|
1252
|
+
fontSize: "14px",
|
|
1253
|
+
fontWeight: 500
|
|
1254
|
+
}
|
|
1255
|
+
}, props.data.label));
|
|
1256
|
+
};
|
|
1257
|
+
|
|
1258
|
+
var _excluded = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
1259
|
+
var CustomSelect = function CustomSelect(_ref) {
|
|
1260
|
+
var isDefault = _ref.isDefault,
|
|
1261
|
+
options = _ref.options,
|
|
1262
|
+
isDisabled = _ref.isDisabled,
|
|
1263
|
+
scrollBottom = _ref.scrollBottom,
|
|
1264
|
+
value = _ref.value,
|
|
1265
|
+
isMulti = _ref.isMulti,
|
|
1266
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1267
|
+
var initialValues = Array.isArray(value) ? options.filter(function (i) {
|
|
1268
|
+
return value.includes(i.value);
|
|
1269
|
+
}) : isMulti ? options === null || options === void 0 ? void 0 : options.filter(function (i) {
|
|
1270
|
+
return i.value == value;
|
|
1271
|
+
}) : options === null || options === void 0 ? void 0 : options.find(function (i) {
|
|
1272
|
+
return i.value == value;
|
|
1273
|
+
});
|
|
1274
|
+
return React__default.createElement(Select__default, Object.assign({
|
|
1275
|
+
isDisabled: isDisabled,
|
|
1276
|
+
options: options,
|
|
1277
|
+
value: !isDefault ? initialValues != null ? initialValues : null : undefined,
|
|
1278
|
+
defaultValue: isDefault ? initialValues : undefined,
|
|
1279
|
+
menuPlacement: scrollBottom ? "top" : "auto",
|
|
1280
|
+
isMulti: isMulti,
|
|
1281
|
+
components: {
|
|
1282
|
+
IndicatorSeparator: function IndicatorSeparator() {
|
|
1283
|
+
return null;
|
|
1284
|
+
},
|
|
1285
|
+
DropdownIndicator: DropdownIndicator,
|
|
1286
|
+
Option: CustomOption
|
|
1287
|
+
},
|
|
1288
|
+
styles: customStyles,
|
|
1289
|
+
placeholder: "Select..."
|
|
1290
|
+
}, rest));
|
|
1291
|
+
};
|
|
1292
|
+
|
|
1293
|
+
var _excluded$1 = ["isDefault", "defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
1294
|
+
var CustomAsyncSelect = function CustomAsyncSelect(_ref) {
|
|
1295
|
+
var isDefault = _ref.isDefault,
|
|
1296
|
+
options = _ref.options,
|
|
1297
|
+
isDisabled = _ref.isDisabled,
|
|
1298
|
+
scrollBottom = _ref.scrollBottom,
|
|
1299
|
+
value = _ref.value,
|
|
1300
|
+
isMulti = _ref.isMulti,
|
|
1301
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$1);
|
|
1302
|
+
var initialValues = Array.isArray(value) ? options.filter(function (i) {
|
|
1303
|
+
return value.includes(i.value);
|
|
1304
|
+
}) : isMulti ? options.filter(function (i) {
|
|
1305
|
+
return i.value == value;
|
|
1306
|
+
}) : options.find(function (i) {
|
|
1307
|
+
return i.value == value;
|
|
1308
|
+
});
|
|
1309
|
+
return React__default.createElement(Select__default, Object.assign({
|
|
1310
|
+
isDisabled: isDisabled,
|
|
1311
|
+
options: options,
|
|
1312
|
+
value: !isDefault ? initialValues : undefined,
|
|
1313
|
+
defaultValue: isDefault ? initialValues : undefined,
|
|
1314
|
+
menuPlacement: scrollBottom ? "top" : "auto",
|
|
1315
|
+
isMulti: isMulti,
|
|
1316
|
+
components: {
|
|
1317
|
+
IndicatorSeparator: function IndicatorSeparator() {
|
|
1318
|
+
return null;
|
|
1319
|
+
},
|
|
1320
|
+
DropdownIndicator: DropdownIndicator,
|
|
1321
|
+
Option: CustomOption
|
|
1322
|
+
},
|
|
1323
|
+
styles: customStyles,
|
|
1324
|
+
placeholder: "Select..."
|
|
1325
|
+
}, rest));
|
|
1326
|
+
};
|
|
1327
|
+
|
|
1328
|
+
var _excluded$2 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
1329
|
+
var CustomCreatable = function CustomCreatable(_ref) {
|
|
1330
|
+
var options = _ref.options,
|
|
1331
|
+
isDisabled = _ref.isDisabled,
|
|
1332
|
+
scrollBottom = _ref.scrollBottom,
|
|
1333
|
+
value = _ref.value,
|
|
1334
|
+
isMulti = _ref.isMulti,
|
|
1335
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
1336
|
+
var initialValues = Array.isArray(value) ? options.filter(function (i) {
|
|
1337
|
+
return value.includes(i.value);
|
|
1338
|
+
}) : isMulti ? options.filter(function (i) {
|
|
1339
|
+
return i.value == value;
|
|
1340
|
+
}) : options.find(function (i) {
|
|
1341
|
+
return i.value == value;
|
|
1342
|
+
});
|
|
1343
|
+
return React__default.createElement(CreatableSelect, Object.assign({
|
|
1344
|
+
isClearable: true,
|
|
1345
|
+
isDisabled: isDisabled,
|
|
1346
|
+
options: options,
|
|
1347
|
+
value: initialValues,
|
|
1348
|
+
menuPlacement: scrollBottom ? "top" : "auto",
|
|
1349
|
+
isMulti: isMulti,
|
|
1350
|
+
components: {
|
|
1351
|
+
IndicatorSeparator: function IndicatorSeparator() {
|
|
1352
|
+
return null;
|
|
1353
|
+
},
|
|
1354
|
+
DropdownIndicator: DropdownIndicator,
|
|
1355
|
+
Option: CustomOption
|
|
1356
|
+
},
|
|
1357
|
+
styles: customStyles,
|
|
1358
|
+
placeholder: "Select..."
|
|
1359
|
+
}, rest));
|
|
1360
|
+
};
|
|
1361
|
+
|
|
1362
|
+
var _excluded$3 = ["defaultValue", "options", "isDisabled", "scrollBottom", "value", "isMulti"];
|
|
1363
|
+
var CustomSelectOption = function CustomSelectOption(_ref) {
|
|
1364
|
+
var defaultValue = _ref.defaultValue,
|
|
1365
|
+
options = _ref.options,
|
|
1366
|
+
isDisabled = _ref.isDisabled,
|
|
1367
|
+
scrollBottom = _ref.scrollBottom,
|
|
1368
|
+
value = _ref.value,
|
|
1369
|
+
isMulti = _ref.isMulti,
|
|
1370
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
1371
|
+
var initialValues = defaultValue !== null && typeof defaultValue !== "undefined" ? options.find(function (option) {
|
|
1372
|
+
return option.value === defaultValue;
|
|
1373
|
+
}) || null : null;
|
|
1374
|
+
return React__default.createElement(Select__default, Object.assign({
|
|
1375
|
+
isDisabled: isDisabled,
|
|
1376
|
+
options: options,
|
|
1377
|
+
value: value,
|
|
1378
|
+
defaultValue: initialValues,
|
|
1379
|
+
menuPlacement: scrollBottom ? "top" : "auto",
|
|
1380
|
+
isMulti: isMulti,
|
|
1381
|
+
components: {
|
|
1382
|
+
IndicatorSeparator: function IndicatorSeparator() {
|
|
1383
|
+
return null;
|
|
1384
|
+
},
|
|
1385
|
+
DropdownIndicator: DropdownIndicator,
|
|
1386
|
+
Option: CustomOption
|
|
1387
|
+
},
|
|
1388
|
+
styles: customStyles,
|
|
1389
|
+
placeholder: "Select..."
|
|
1390
|
+
}, rest));
|
|
1391
|
+
};
|
|
1392
|
+
|
|
1393
|
+
var historyCore = history.createBrowserHistory();
|
|
1394
|
+
|
|
1395
|
+
Object.defineProperty(exports, 'ToastContainer', {
|
|
1396
|
+
enumerable: true,
|
|
1397
|
+
get: function () {
|
|
1398
|
+
return reactToastify.ToastContainer;
|
|
1399
|
+
}
|
|
1400
|
+
});
|
|
1401
|
+
Object.defineProperty(exports, 'toast', {
|
|
1402
|
+
enumerable: true,
|
|
1403
|
+
get: function () {
|
|
1404
|
+
return reactToastify.toast;
|
|
1405
|
+
}
|
|
1406
|
+
});
|
|
1319
1407
|
exports.ACCESS_TOKEN = ACCESS_TOKEN;
|
|
1320
1408
|
exports.BASE_URL = BASE_URL;
|
|
1321
1409
|
exports.CommonDialog = CommonDialog;
|
|
1322
1410
|
exports.ConfirmDialog = ConfirmDialog;
|
|
1411
|
+
exports.CoreButton = CoreButton;
|
|
1412
|
+
exports.CoreCheckbox = CoreInput$1;
|
|
1413
|
+
exports.CoreError = CoreError;
|
|
1414
|
+
exports.CoreInput = CoreInput;
|
|
1415
|
+
exports.CoreModal = CoreModal;
|
|
1416
|
+
exports.CoreRadio = CoreRadio;
|
|
1417
|
+
exports.CoreSelect = CoreSelect;
|
|
1418
|
+
exports.CustomAsyncSelect = CustomAsyncSelect;
|
|
1419
|
+
exports.CustomCreatable = CustomCreatable;
|
|
1420
|
+
exports.CustomPagination = CustomPagination;
|
|
1421
|
+
exports.CustomSelect = CustomSelect;
|
|
1422
|
+
exports.CustomSelectOption = CustomSelectOption;
|
|
1323
1423
|
exports.LayoutContext = LayoutContext;
|
|
1324
1424
|
exports.Loading = Loading;
|
|
1325
1425
|
exports.Login = Login;
|
|
1326
1426
|
exports.NotFound = NotFound;
|
|
1327
1427
|
exports.api = api$1;
|
|
1428
|
+
exports.apiUpload = apiUpload$1;
|
|
1429
|
+
exports.getErrorMessage = getErrorMessage;
|
|
1328
1430
|
exports.historyCore = historyCore;
|
|
1329
1431
|
exports.setAlert = setAlert;
|
|
1330
1432
|
exports.setLoading = setLoading;
|
|
1331
1433
|
exports.setUser = setUser;
|
|
1332
1434
|
exports.store = store;
|
|
1435
|
+
exports.useGoogleSignOut = useGoogleSignOut;
|
|
1333
1436
|
//# sourceMappingURL=index.js.map
|