@sebgroup/green-react 1.2.0 → 1.2.1
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/index.esm.js +563 -561
- package/index.umd.js +563 -561
- package/package.json +1 -1
package/index.umd.js
CHANGED
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
19
|
-
var global$
|
|
20
|
-
// eslint-disable-next-line es
|
|
19
|
+
var global$c =
|
|
20
|
+
// eslint-disable-next-line es/no-global-this -- safe
|
|
21
21
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
22
22
|
check(typeof window == 'object' && window) ||
|
|
23
23
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
|
|
29
29
|
var objectGetOwnPropertyDescriptor = {};
|
|
30
30
|
|
|
31
|
-
var fails$
|
|
31
|
+
var fails$b = function (exec) {
|
|
32
32
|
try {
|
|
33
33
|
return !!exec();
|
|
34
34
|
} catch (error) {
|
|
@@ -36,18 +36,18 @@
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
|
|
39
|
-
var fails$
|
|
39
|
+
var fails$a = fails$b;
|
|
40
40
|
|
|
41
41
|
// Detect IE8's incomplete defineProperty implementation
|
|
42
|
-
var descriptors = !fails$
|
|
43
|
-
// eslint-disable-next-line es
|
|
42
|
+
var descriptors = !fails$a(function () {
|
|
43
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
44
44
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
45
45
|
});
|
|
46
46
|
|
|
47
|
-
var fails$
|
|
47
|
+
var fails$9 = fails$b;
|
|
48
48
|
|
|
49
|
-
var functionBindNative = !fails$
|
|
50
|
-
// eslint-disable-next-line es
|
|
49
|
+
var functionBindNative = !fails$9(function () {
|
|
50
|
+
// eslint-disable-next-line es/no-function-prototype-bind -- safe
|
|
51
51
|
var test = (function () { /* empty */ }).bind();
|
|
52
52
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
53
53
|
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
var objectPropertyIsEnumerable = {};
|
|
65
65
|
|
|
66
66
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
67
|
-
// eslint-disable-next-line es
|
|
67
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
68
68
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
69
69
|
|
|
70
70
|
// Nashorn ~ JDK8 bug
|
|
@@ -89,14 +89,11 @@
|
|
|
89
89
|
var NATIVE_BIND = functionBindNative;
|
|
90
90
|
|
|
91
91
|
var FunctionPrototype$1 = Function.prototype;
|
|
92
|
-
var bind = FunctionPrototype$1.bind;
|
|
93
92
|
var call$5 = FunctionPrototype$1.call;
|
|
94
|
-
var
|
|
93
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$5, call$5);
|
|
95
94
|
|
|
96
|
-
var functionUncurryThis = NATIVE_BIND ? function (fn) {
|
|
97
|
-
return
|
|
98
|
-
} : function (fn) {
|
|
99
|
-
return fn && function () {
|
|
95
|
+
var functionUncurryThis = NATIVE_BIND ? uncurryThisWithBind : function (fn) {
|
|
96
|
+
return function () {
|
|
100
97
|
return call$5.apply(fn, arguments);
|
|
101
98
|
};
|
|
102
99
|
};
|
|
@@ -104,37 +101,42 @@
|
|
|
104
101
|
var uncurryThis$b = functionUncurryThis;
|
|
105
102
|
|
|
106
103
|
var toString$3 = uncurryThis$b({}.toString);
|
|
107
|
-
var stringSlice$
|
|
104
|
+
var stringSlice$2 = uncurryThis$b(''.slice);
|
|
108
105
|
|
|
109
106
|
var classofRaw$1 = function (it) {
|
|
110
|
-
return stringSlice$
|
|
107
|
+
return stringSlice$2(toString$3(it), 8, -1);
|
|
111
108
|
};
|
|
112
109
|
|
|
113
|
-
var global$q = global$r;
|
|
114
110
|
var uncurryThis$a = functionUncurryThis;
|
|
115
|
-
var fails$
|
|
111
|
+
var fails$8 = fails$b;
|
|
116
112
|
var classof$2 = classofRaw$1;
|
|
117
113
|
|
|
118
|
-
var Object$
|
|
114
|
+
var $Object$4 = Object;
|
|
119
115
|
var split = uncurryThis$a(''.split);
|
|
120
116
|
|
|
121
117
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
122
|
-
var indexedObject = fails$
|
|
118
|
+
var indexedObject = fails$8(function () {
|
|
123
119
|
// throws an error in rhino, see https://github.com/mozilla/rhino/issues/346
|
|
124
120
|
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
125
|
-
return
|
|
121
|
+
return !$Object$4('z').propertyIsEnumerable(0);
|
|
126
122
|
}) ? function (it) {
|
|
127
|
-
return classof$2(it) == 'String' ? split(it, '') : Object$
|
|
128
|
-
} : Object$
|
|
123
|
+
return classof$2(it) == 'String' ? split(it, '') : $Object$4(it);
|
|
124
|
+
} : $Object$4;
|
|
129
125
|
|
|
130
|
-
|
|
126
|
+
// we can't use just `it == null` since of `document.all` special case
|
|
127
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
|
|
128
|
+
var isNullOrUndefined$2 = function (it) {
|
|
129
|
+
return it === null || it === undefined;
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
var isNullOrUndefined$1 = isNullOrUndefined$2;
|
|
131
133
|
|
|
132
|
-
var TypeError$
|
|
134
|
+
var $TypeError$6 = TypeError;
|
|
133
135
|
|
|
134
136
|
// `RequireObjectCoercible` abstract operation
|
|
135
137
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
136
138
|
var requireObjectCoercible$2 = function (it) {
|
|
137
|
-
if (it
|
|
139
|
+
if (isNullOrUndefined$1(it)) throw $TypeError$6("Can't call method on " + it);
|
|
138
140
|
return it;
|
|
139
141
|
};
|
|
140
142
|
|
|
@@ -146,42 +148,62 @@
|
|
|
146
148
|
return IndexedObject$1(requireObjectCoercible$1(it));
|
|
147
149
|
};
|
|
148
150
|
|
|
151
|
+
var documentAll$2 = typeof document == 'object' && document.all;
|
|
152
|
+
|
|
153
|
+
// https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
|
|
154
|
+
// eslint-disable-next-line unicorn/no-typeof-undefined -- required for testing
|
|
155
|
+
var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
|
|
156
|
+
|
|
157
|
+
var documentAll_1 = {
|
|
158
|
+
all: documentAll$2,
|
|
159
|
+
IS_HTMLDDA: IS_HTMLDDA
|
|
160
|
+
};
|
|
161
|
+
|
|
162
|
+
var $documentAll$1 = documentAll_1;
|
|
163
|
+
|
|
164
|
+
var documentAll$1 = $documentAll$1.all;
|
|
165
|
+
|
|
149
166
|
// `IsCallable` abstract operation
|
|
150
167
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
151
|
-
var isCallable$
|
|
168
|
+
var isCallable$g = $documentAll$1.IS_HTMLDDA ? function (argument) {
|
|
169
|
+
return typeof argument == 'function' || argument === documentAll$1;
|
|
170
|
+
} : function (argument) {
|
|
152
171
|
return typeof argument == 'function';
|
|
153
172
|
};
|
|
154
173
|
|
|
155
|
-
var isCallable$
|
|
174
|
+
var isCallable$f = isCallable$g;
|
|
175
|
+
var $documentAll = documentAll_1;
|
|
156
176
|
|
|
157
|
-
var
|
|
158
|
-
|
|
177
|
+
var documentAll = $documentAll.all;
|
|
178
|
+
|
|
179
|
+
var isObject$6 = $documentAll.IS_HTMLDDA ? function (it) {
|
|
180
|
+
return typeof it == 'object' ? it !== null : isCallable$f(it) || it === documentAll;
|
|
181
|
+
} : function (it) {
|
|
182
|
+
return typeof it == 'object' ? it !== null : isCallable$f(it);
|
|
159
183
|
};
|
|
160
184
|
|
|
161
|
-
var global$
|
|
162
|
-
var isCallable$
|
|
185
|
+
var global$b = global$c;
|
|
186
|
+
var isCallable$e = isCallable$g;
|
|
163
187
|
|
|
164
188
|
var aFunction = function (argument) {
|
|
165
|
-
return isCallable$
|
|
189
|
+
return isCallable$e(argument) ? argument : undefined;
|
|
166
190
|
};
|
|
167
191
|
|
|
168
|
-
var getBuiltIn$
|
|
169
|
-
return arguments.length < 2 ? aFunction(global$
|
|
192
|
+
var getBuiltIn$3 = function (namespace, method) {
|
|
193
|
+
return arguments.length < 2 ? aFunction(global$b[namespace]) : global$b[namespace] && global$b[namespace][method];
|
|
170
194
|
};
|
|
171
195
|
|
|
172
196
|
var uncurryThis$9 = functionUncurryThis;
|
|
173
197
|
|
|
174
198
|
var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
|
|
175
199
|
|
|
176
|
-
var
|
|
200
|
+
var engineUserAgent = typeof navigator != 'undefined' && String(navigator.userAgent) || '';
|
|
177
201
|
|
|
178
|
-
var
|
|
179
|
-
|
|
180
|
-
var global$n = global$r;
|
|
202
|
+
var global$a = global$c;
|
|
181
203
|
var userAgent = engineUserAgent;
|
|
182
204
|
|
|
183
|
-
var process = global$
|
|
184
|
-
var Deno = global$
|
|
205
|
+
var process = global$a.process;
|
|
206
|
+
var Deno = global$a.Deno;
|
|
185
207
|
var versions = process && process.versions || Deno && Deno.version;
|
|
186
208
|
var v8 = versions && versions.v8;
|
|
187
209
|
var match, version;
|
|
@@ -205,13 +227,13 @@
|
|
|
205
227
|
|
|
206
228
|
var engineV8Version = version;
|
|
207
229
|
|
|
208
|
-
/* eslint-disable es
|
|
230
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
209
231
|
|
|
210
232
|
var V8_VERSION = engineV8Version;
|
|
211
|
-
var fails$
|
|
233
|
+
var fails$7 = fails$b;
|
|
212
234
|
|
|
213
|
-
// eslint-disable-next-line es
|
|
214
|
-
var
|
|
235
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
236
|
+
var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$7(function () {
|
|
215
237
|
var symbol = Symbol();
|
|
216
238
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
217
239
|
// `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
|
|
@@ -220,99 +242,95 @@
|
|
|
220
242
|
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
221
243
|
});
|
|
222
244
|
|
|
223
|
-
/* eslint-disable es
|
|
245
|
+
/* eslint-disable es/no-symbol -- required for testing */
|
|
224
246
|
|
|
225
|
-
var NATIVE_SYMBOL$2 =
|
|
247
|
+
var NATIVE_SYMBOL$2 = symbolConstructorDetection;
|
|
226
248
|
|
|
227
249
|
var useSymbolAsUid = NATIVE_SYMBOL$2
|
|
228
250
|
&& !Symbol.sham
|
|
229
251
|
&& typeof Symbol.iterator == 'symbol';
|
|
230
252
|
|
|
231
|
-
var
|
|
232
|
-
var
|
|
233
|
-
var isCallable$c = isCallable$f;
|
|
253
|
+
var getBuiltIn$2 = getBuiltIn$3;
|
|
254
|
+
var isCallable$d = isCallable$g;
|
|
234
255
|
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
235
256
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
236
257
|
|
|
237
|
-
var Object$
|
|
258
|
+
var $Object$3 = Object;
|
|
238
259
|
|
|
239
260
|
var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
240
261
|
return typeof it == 'symbol';
|
|
241
262
|
} : function (it) {
|
|
242
263
|
var $Symbol = getBuiltIn$2('Symbol');
|
|
243
|
-
return isCallable$
|
|
264
|
+
return isCallable$d($Symbol) && isPrototypeOf$1($Symbol.prototype, $Object$3(it));
|
|
244
265
|
};
|
|
245
266
|
|
|
246
|
-
var
|
|
247
|
-
|
|
248
|
-
var String$4 = global$l.String;
|
|
267
|
+
var $String$4 = String;
|
|
249
268
|
|
|
250
269
|
var tryToString$1 = function (argument) {
|
|
251
270
|
try {
|
|
252
|
-
return String$4(argument);
|
|
271
|
+
return $String$4(argument);
|
|
253
272
|
} catch (error) {
|
|
254
273
|
return 'Object';
|
|
255
274
|
}
|
|
256
275
|
};
|
|
257
276
|
|
|
258
|
-
var
|
|
259
|
-
var isCallable$b = isCallable$f;
|
|
277
|
+
var isCallable$c = isCallable$g;
|
|
260
278
|
var tryToString = tryToString$1;
|
|
261
279
|
|
|
262
|
-
var TypeError$
|
|
280
|
+
var $TypeError$5 = TypeError;
|
|
263
281
|
|
|
264
282
|
// `Assert: IsCallable(argument) is true`
|
|
265
|
-
var aCallable$
|
|
266
|
-
if (isCallable$
|
|
267
|
-
throw TypeError$
|
|
283
|
+
var aCallable$2 = function (argument) {
|
|
284
|
+
if (isCallable$c(argument)) return argument;
|
|
285
|
+
throw $TypeError$5(tryToString(argument) + ' is not a function');
|
|
268
286
|
};
|
|
269
287
|
|
|
270
|
-
var aCallable = aCallable$
|
|
288
|
+
var aCallable$1 = aCallable$2;
|
|
289
|
+
var isNullOrUndefined = isNullOrUndefined$2;
|
|
271
290
|
|
|
272
291
|
// `GetMethod` abstract operation
|
|
273
292
|
// https://tc39.es/ecma262/#sec-getmethod
|
|
274
293
|
var getMethod$1 = function (V, P) {
|
|
275
294
|
var func = V[P];
|
|
276
|
-
return func
|
|
295
|
+
return isNullOrUndefined(func) ? undefined : aCallable$1(func);
|
|
277
296
|
};
|
|
278
297
|
|
|
279
|
-
var global$j = global$r;
|
|
280
298
|
var call$4 = functionCall;
|
|
281
|
-
var isCallable$
|
|
282
|
-
var isObject$
|
|
299
|
+
var isCallable$b = isCallable$g;
|
|
300
|
+
var isObject$5 = isObject$6;
|
|
283
301
|
|
|
284
|
-
var TypeError$
|
|
302
|
+
var $TypeError$4 = TypeError;
|
|
285
303
|
|
|
286
304
|
// `OrdinaryToPrimitive` abstract operation
|
|
287
305
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
288
306
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
289
307
|
var fn, val;
|
|
290
|
-
if (pref === 'string' && isCallable$
|
|
291
|
-
if (isCallable$
|
|
292
|
-
if (pref !== 'string' && isCallable$
|
|
293
|
-
throw TypeError$
|
|
308
|
+
if (pref === 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
|
|
309
|
+
if (isCallable$b(fn = input.valueOf) && !isObject$5(val = call$4(fn, input))) return val;
|
|
310
|
+
if (pref !== 'string' && isCallable$b(fn = input.toString) && !isObject$5(val = call$4(fn, input))) return val;
|
|
311
|
+
throw $TypeError$4("Can't convert object to primitive value");
|
|
294
312
|
};
|
|
295
313
|
|
|
296
314
|
var shared$3 = {exports: {}};
|
|
297
315
|
|
|
298
|
-
var global$
|
|
316
|
+
var global$9 = global$c;
|
|
299
317
|
|
|
300
|
-
// eslint-disable-next-line es
|
|
301
|
-
var defineProperty$
|
|
318
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
319
|
+
var defineProperty$6 = Object.defineProperty;
|
|
302
320
|
|
|
303
|
-
var
|
|
321
|
+
var defineGlobalProperty$3 = function (key, value) {
|
|
304
322
|
try {
|
|
305
|
-
defineProperty$
|
|
323
|
+
defineProperty$6(global$9, key, { value: value, configurable: true, writable: true });
|
|
306
324
|
} catch (error) {
|
|
307
|
-
global$
|
|
325
|
+
global$9[key] = value;
|
|
308
326
|
} return value;
|
|
309
327
|
};
|
|
310
328
|
|
|
311
|
-
var global$
|
|
312
|
-
var
|
|
329
|
+
var global$8 = global$c;
|
|
330
|
+
var defineGlobalProperty$2 = defineGlobalProperty$3;
|
|
313
331
|
|
|
314
332
|
var SHARED = '__core-js_shared__';
|
|
315
|
-
var store$3 = global$
|
|
333
|
+
var store$3 = global$8[SHARED] || defineGlobalProperty$2(SHARED, {});
|
|
316
334
|
|
|
317
335
|
var sharedStore = store$3;
|
|
318
336
|
|
|
@@ -321,22 +339,21 @@
|
|
|
321
339
|
(shared$3.exports = function (key, value) {
|
|
322
340
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
323
341
|
})('versions', []).push({
|
|
324
|
-
version: '3.
|
|
342
|
+
version: '3.29.0',
|
|
325
343
|
mode: 'global',
|
|
326
|
-
copyright: '© 2014-
|
|
327
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.
|
|
344
|
+
copyright: '© 2014-2023 Denis Pushkarev (zloirock.ru)',
|
|
345
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.29.0/LICENSE',
|
|
328
346
|
source: 'https://github.com/zloirock/core-js'
|
|
329
347
|
});
|
|
330
348
|
|
|
331
|
-
var global$g = global$r;
|
|
332
349
|
var requireObjectCoercible = requireObjectCoercible$2;
|
|
333
350
|
|
|
334
|
-
var Object$
|
|
351
|
+
var $Object$2 = Object;
|
|
335
352
|
|
|
336
353
|
// `ToObject` abstract operation
|
|
337
354
|
// https://tc39.es/ecma262/#sec-toobject
|
|
338
355
|
var toObject$3 = function (argument) {
|
|
339
|
-
return Object$
|
|
356
|
+
return $Object$2(requireObjectCoercible(argument));
|
|
340
357
|
};
|
|
341
358
|
|
|
342
359
|
var uncurryThis$8 = functionUncurryThis;
|
|
@@ -346,7 +363,7 @@
|
|
|
346
363
|
|
|
347
364
|
// `HasOwnProperty` abstract operation
|
|
348
365
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
349
|
-
// eslint-disable-next-line es
|
|
366
|
+
// eslint-disable-next-line es/no-object-hasown -- safe
|
|
350
367
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
351
368
|
return hasOwnProperty(toObject$2(it), key);
|
|
352
369
|
};
|
|
@@ -361,53 +378,46 @@
|
|
|
361
378
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
|
|
362
379
|
};
|
|
363
380
|
|
|
364
|
-
var global$
|
|
381
|
+
var global$7 = global$c;
|
|
365
382
|
var shared$2 = shared$3.exports;
|
|
366
383
|
var hasOwn$9 = hasOwnProperty_1;
|
|
367
384
|
var uid$1 = uid$2;
|
|
368
|
-
var NATIVE_SYMBOL$1 =
|
|
385
|
+
var NATIVE_SYMBOL$1 = symbolConstructorDetection;
|
|
369
386
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
370
387
|
|
|
388
|
+
var Symbol$1 = global$7.Symbol;
|
|
371
389
|
var WellKnownSymbolsStore = shared$2('wks');
|
|
372
|
-
var Symbol$1
|
|
373
|
-
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
374
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
390
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1['for'] || Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
375
391
|
|
|
376
392
|
var wellKnownSymbol$8 = function (name) {
|
|
377
|
-
if (!hasOwn$9(WellKnownSymbolsStore, name)
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
382
|
-
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
383
|
-
} else {
|
|
384
|
-
WellKnownSymbolsStore[name] = createWellKnownSymbol(description);
|
|
385
|
-
}
|
|
393
|
+
if (!hasOwn$9(WellKnownSymbolsStore, name)) {
|
|
394
|
+
WellKnownSymbolsStore[name] = NATIVE_SYMBOL$1 && hasOwn$9(Symbol$1, name)
|
|
395
|
+
? Symbol$1[name]
|
|
396
|
+
: createWellKnownSymbol('Symbol.' + name);
|
|
386
397
|
} return WellKnownSymbolsStore[name];
|
|
387
398
|
};
|
|
388
399
|
|
|
389
|
-
var global$e = global$r;
|
|
390
400
|
var call$3 = functionCall;
|
|
391
|
-
var isObject$
|
|
401
|
+
var isObject$4 = isObject$6;
|
|
392
402
|
var isSymbol$1 = isSymbol$2;
|
|
393
403
|
var getMethod = getMethod$1;
|
|
394
404
|
var ordinaryToPrimitive = ordinaryToPrimitive$1;
|
|
395
405
|
var wellKnownSymbol$7 = wellKnownSymbol$8;
|
|
396
406
|
|
|
397
|
-
var TypeError$
|
|
407
|
+
var $TypeError$3 = TypeError;
|
|
398
408
|
var TO_PRIMITIVE = wellKnownSymbol$7('toPrimitive');
|
|
399
409
|
|
|
400
410
|
// `ToPrimitive` abstract operation
|
|
401
411
|
// https://tc39.es/ecma262/#sec-toprimitive
|
|
402
412
|
var toPrimitive$1 = function (input, pref) {
|
|
403
|
-
if (!isObject$
|
|
413
|
+
if (!isObject$4(input) || isSymbol$1(input)) return input;
|
|
404
414
|
var exoticToPrim = getMethod(input, TO_PRIMITIVE);
|
|
405
415
|
var result;
|
|
406
416
|
if (exoticToPrim) {
|
|
407
417
|
if (pref === undefined) pref = 'default';
|
|
408
418
|
result = call$3(exoticToPrim, input, pref);
|
|
409
|
-
if (!isObject$
|
|
410
|
-
throw TypeError$
|
|
419
|
+
if (!isObject$4(result) || isSymbol$1(result)) return result;
|
|
420
|
+
throw $TypeError$3("Can't convert object to primitive value");
|
|
411
421
|
}
|
|
412
422
|
if (pref === undefined) pref = 'number';
|
|
413
423
|
return ordinaryToPrimitive(input, pref);
|
|
@@ -423,30 +433,30 @@
|
|
|
423
433
|
return isSymbol(key) ? key : key + '';
|
|
424
434
|
};
|
|
425
435
|
|
|
426
|
-
var global$
|
|
427
|
-
var isObject$
|
|
436
|
+
var global$6 = global$c;
|
|
437
|
+
var isObject$3 = isObject$6;
|
|
428
438
|
|
|
429
|
-
var document$1 = global$
|
|
439
|
+
var document$1 = global$6.document;
|
|
430
440
|
// typeof document.createElement is 'object' in old IE
|
|
431
|
-
var EXISTS$1 = isObject$
|
|
441
|
+
var EXISTS$1 = isObject$3(document$1) && isObject$3(document$1.createElement);
|
|
432
442
|
|
|
433
443
|
var documentCreateElement$2 = function (it) {
|
|
434
444
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
435
445
|
};
|
|
436
446
|
|
|
437
|
-
var DESCRIPTORS$
|
|
438
|
-
var fails$
|
|
447
|
+
var DESCRIPTORS$a = descriptors;
|
|
448
|
+
var fails$6 = fails$b;
|
|
439
449
|
var createElement = documentCreateElement$2;
|
|
440
450
|
|
|
441
451
|
// Thanks to IE8 for its funny defineProperty
|
|
442
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
443
|
-
// eslint-disable-next-line es
|
|
452
|
+
var ie8DomDefine = !DESCRIPTORS$a && !fails$6(function () {
|
|
453
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
444
454
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
445
455
|
get: function () { return 7; }
|
|
446
456
|
}).a != 7;
|
|
447
457
|
});
|
|
448
458
|
|
|
449
|
-
var DESCRIPTORS$
|
|
459
|
+
var DESCRIPTORS$9 = descriptors;
|
|
450
460
|
var call$2 = functionCall;
|
|
451
461
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
452
462
|
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
@@ -455,12 +465,12 @@
|
|
|
455
465
|
var hasOwn$8 = hasOwnProperty_1;
|
|
456
466
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
457
467
|
|
|
458
|
-
// eslint-disable-next-line es
|
|
468
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
459
469
|
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
460
470
|
|
|
461
471
|
// `Object.getOwnPropertyDescriptor` method
|
|
462
472
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
463
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
473
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$9 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
464
474
|
O = toIndexedObject$4(O);
|
|
465
475
|
P = toPropertyKey$1(P);
|
|
466
476
|
if (IE8_DOM_DEFINE$1) try {
|
|
@@ -471,42 +481,40 @@
|
|
|
471
481
|
|
|
472
482
|
var objectDefineProperty = {};
|
|
473
483
|
|
|
474
|
-
var DESCRIPTORS$
|
|
475
|
-
var fails$
|
|
484
|
+
var DESCRIPTORS$8 = descriptors;
|
|
485
|
+
var fails$5 = fails$b;
|
|
476
486
|
|
|
477
487
|
// V8 ~ Chrome 36-
|
|
478
488
|
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
479
|
-
var v8PrototypeDefineBug = DESCRIPTORS$
|
|
480
|
-
// eslint-disable-next-line es
|
|
489
|
+
var v8PrototypeDefineBug = DESCRIPTORS$8 && fails$5(function () {
|
|
490
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
481
491
|
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
482
492
|
value: 42,
|
|
483
493
|
writable: false
|
|
484
494
|
}).prototype != 42;
|
|
485
495
|
});
|
|
486
496
|
|
|
487
|
-
var
|
|
488
|
-
var isObject$1 = isObject$5;
|
|
497
|
+
var isObject$2 = isObject$6;
|
|
489
498
|
|
|
490
|
-
var String$3 =
|
|
491
|
-
var TypeError$
|
|
499
|
+
var $String$3 = String;
|
|
500
|
+
var $TypeError$2 = TypeError;
|
|
492
501
|
|
|
493
502
|
// `Assert: Type(argument) is Object`
|
|
494
503
|
var anObject$5 = function (argument) {
|
|
495
|
-
if (isObject$
|
|
496
|
-
throw TypeError$
|
|
504
|
+
if (isObject$2(argument)) return argument;
|
|
505
|
+
throw $TypeError$2($String$3(argument) + ' is not an object');
|
|
497
506
|
};
|
|
498
507
|
|
|
499
|
-
var
|
|
500
|
-
var DESCRIPTORS$6 = descriptors;
|
|
508
|
+
var DESCRIPTORS$7 = descriptors;
|
|
501
509
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
502
510
|
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
503
511
|
var anObject$4 = anObject$5;
|
|
504
512
|
var toPropertyKey = toPropertyKey$2;
|
|
505
513
|
|
|
506
|
-
var TypeError$
|
|
507
|
-
// eslint-disable-next-line es
|
|
514
|
+
var $TypeError$1 = TypeError;
|
|
515
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
508
516
|
var $defineProperty = Object.defineProperty;
|
|
509
|
-
// eslint-disable-next-line es
|
|
517
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
510
518
|
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
511
519
|
var ENUMERABLE = 'enumerable';
|
|
512
520
|
var CONFIGURABLE$1 = 'configurable';
|
|
@@ -514,7 +522,7 @@
|
|
|
514
522
|
|
|
515
523
|
// `Object.defineProperty` method
|
|
516
524
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
517
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
525
|
+
objectDefineProperty.f = DESCRIPTORS$7 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
518
526
|
anObject$4(O);
|
|
519
527
|
P = toPropertyKey(P);
|
|
520
528
|
anObject$4(Attributes);
|
|
@@ -536,46 +544,63 @@
|
|
|
536
544
|
if (IE8_DOM_DEFINE) try {
|
|
537
545
|
return $defineProperty(O, P, Attributes);
|
|
538
546
|
} catch (error) { /* empty */ }
|
|
539
|
-
if ('get' in Attributes || 'set' in Attributes) throw TypeError$
|
|
547
|
+
if ('get' in Attributes || 'set' in Attributes) throw $TypeError$1('Accessors not supported');
|
|
540
548
|
if ('value' in Attributes) O[P] = Attributes.value;
|
|
541
549
|
return O;
|
|
542
550
|
};
|
|
543
551
|
|
|
544
|
-
var DESCRIPTORS$
|
|
552
|
+
var DESCRIPTORS$6 = descriptors;
|
|
545
553
|
var definePropertyModule$3 = objectDefineProperty;
|
|
546
554
|
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
547
555
|
|
|
548
|
-
var createNonEnumerableProperty$
|
|
556
|
+
var createNonEnumerableProperty$4 = DESCRIPTORS$6 ? function (object, key, value) {
|
|
549
557
|
return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
|
|
550
558
|
} : function (object, key, value) {
|
|
551
559
|
object[key] = value;
|
|
552
560
|
return object;
|
|
553
561
|
};
|
|
554
562
|
|
|
555
|
-
var
|
|
563
|
+
var makeBuiltIn$3 = {exports: {}};
|
|
564
|
+
|
|
565
|
+
var DESCRIPTORS$5 = descriptors;
|
|
566
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
567
|
+
|
|
568
|
+
var FunctionPrototype = Function.prototype;
|
|
569
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
570
|
+
var getDescriptor = DESCRIPTORS$5 && Object.getOwnPropertyDescriptor;
|
|
571
|
+
|
|
572
|
+
var EXISTS = hasOwn$7(FunctionPrototype, 'name');
|
|
573
|
+
// additional protection from minified / mangled / dropped function names
|
|
574
|
+
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
575
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$5 || (DESCRIPTORS$5 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
576
|
+
|
|
577
|
+
var functionName = {
|
|
578
|
+
EXISTS: EXISTS,
|
|
579
|
+
PROPER: PROPER,
|
|
580
|
+
CONFIGURABLE: CONFIGURABLE
|
|
581
|
+
};
|
|
556
582
|
|
|
557
583
|
var uncurryThis$6 = functionUncurryThis;
|
|
558
|
-
var isCallable$
|
|
584
|
+
var isCallable$a = isCallable$g;
|
|
559
585
|
var store$1 = sharedStore;
|
|
560
586
|
|
|
561
587
|
var functionToString = uncurryThis$6(Function.toString);
|
|
562
588
|
|
|
563
589
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
564
|
-
if (!isCallable$
|
|
590
|
+
if (!isCallable$a(store$1.inspectSource)) {
|
|
565
591
|
store$1.inspectSource = function (it) {
|
|
566
592
|
return functionToString(it);
|
|
567
593
|
};
|
|
568
594
|
}
|
|
569
595
|
|
|
570
|
-
var inspectSource$
|
|
596
|
+
var inspectSource$1 = store$1.inspectSource;
|
|
571
597
|
|
|
572
|
-
var global$
|
|
573
|
-
var isCallable$
|
|
574
|
-
var inspectSource$1 = inspectSource$2;
|
|
598
|
+
var global$5 = global$c;
|
|
599
|
+
var isCallable$9 = isCallable$g;
|
|
575
600
|
|
|
576
|
-
var WeakMap$1 = global$
|
|
601
|
+
var WeakMap$1 = global$5.WeakMap;
|
|
577
602
|
|
|
578
|
-
var
|
|
603
|
+
var weakMapBasicDetection = isCallable$9(WeakMap$1) && /native code/.test(String(WeakMap$1));
|
|
579
604
|
|
|
580
605
|
var shared$1 = shared$3.exports;
|
|
581
606
|
var uid = uid$2;
|
|
@@ -588,19 +613,18 @@
|
|
|
588
613
|
|
|
589
614
|
var hiddenKeys$4 = {};
|
|
590
615
|
|
|
591
|
-
var NATIVE_WEAK_MAP =
|
|
592
|
-
var global$
|
|
593
|
-
var
|
|
594
|
-
var
|
|
595
|
-
var
|
|
596
|
-
var hasOwn$7 = hasOwnProperty_1;
|
|
616
|
+
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
617
|
+
var global$4 = global$c;
|
|
618
|
+
var isObject$1 = isObject$6;
|
|
619
|
+
var createNonEnumerableProperty$3 = createNonEnumerableProperty$4;
|
|
620
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
597
621
|
var shared = sharedStore;
|
|
598
622
|
var sharedKey$2 = sharedKey$3;
|
|
599
623
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
600
624
|
|
|
601
625
|
var OBJECT_ALREADY_INITIALIZED = 'Object already initialized';
|
|
602
|
-
var TypeError$
|
|
603
|
-
var WeakMap = global$
|
|
626
|
+
var TypeError$1 = global$4.TypeError;
|
|
627
|
+
var WeakMap = global$4.WeakMap;
|
|
604
628
|
var set, get, has;
|
|
605
629
|
|
|
606
630
|
var enforce = function (it) {
|
|
@@ -610,43 +634,45 @@
|
|
|
610
634
|
var getterFor = function (TYPE) {
|
|
611
635
|
return function (it) {
|
|
612
636
|
var state;
|
|
613
|
-
if (!isObject(it) || (state = get(it)).type !== TYPE) {
|
|
614
|
-
throw TypeError$
|
|
637
|
+
if (!isObject$1(it) || (state = get(it)).type !== TYPE) {
|
|
638
|
+
throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
|
|
615
639
|
} return state;
|
|
616
640
|
};
|
|
617
641
|
};
|
|
618
642
|
|
|
619
643
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
620
644
|
var store = shared.state || (shared.state = new WeakMap());
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
645
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
646
|
+
store.get = store.get;
|
|
647
|
+
store.has = store.has;
|
|
648
|
+
store.set = store.set;
|
|
649
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
624
650
|
set = function (it, metadata) {
|
|
625
|
-
if (
|
|
651
|
+
if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
626
652
|
metadata.facade = it;
|
|
627
|
-
|
|
653
|
+
store.set(it, metadata);
|
|
628
654
|
return metadata;
|
|
629
655
|
};
|
|
630
656
|
get = function (it) {
|
|
631
|
-
return
|
|
657
|
+
return store.get(it) || {};
|
|
632
658
|
};
|
|
633
659
|
has = function (it) {
|
|
634
|
-
return
|
|
660
|
+
return store.has(it);
|
|
635
661
|
};
|
|
636
662
|
} else {
|
|
637
663
|
var STATE = sharedKey$2('state');
|
|
638
664
|
hiddenKeys$3[STATE] = true;
|
|
639
665
|
set = function (it, metadata) {
|
|
640
|
-
if (hasOwn$
|
|
666
|
+
if (hasOwn$6(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
641
667
|
metadata.facade = it;
|
|
642
|
-
createNonEnumerableProperty$
|
|
668
|
+
createNonEnumerableProperty$3(it, STATE, metadata);
|
|
643
669
|
return metadata;
|
|
644
670
|
};
|
|
645
671
|
get = function (it) {
|
|
646
|
-
return hasOwn$
|
|
672
|
+
return hasOwn$6(it, STATE) ? it[STATE] : {};
|
|
647
673
|
};
|
|
648
674
|
has = function (it) {
|
|
649
|
-
return hasOwn$
|
|
675
|
+
return hasOwn$6(it, STATE);
|
|
650
676
|
};
|
|
651
677
|
}
|
|
652
678
|
|
|
@@ -658,82 +684,110 @@
|
|
|
658
684
|
getterFor: getterFor
|
|
659
685
|
};
|
|
660
686
|
|
|
661
|
-
var
|
|
662
|
-
var
|
|
663
|
-
|
|
664
|
-
var FunctionPrototype = Function.prototype;
|
|
665
|
-
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
666
|
-
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
667
|
-
|
|
668
|
-
var EXISTS = hasOwn$6(FunctionPrototype, 'name');
|
|
669
|
-
// additional protection from minified / mangled / dropped function names
|
|
670
|
-
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
671
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
672
|
-
|
|
673
|
-
var functionName = {
|
|
674
|
-
EXISTS: EXISTS,
|
|
675
|
-
PROPER: PROPER,
|
|
676
|
-
CONFIGURABLE: CONFIGURABLE
|
|
677
|
-
};
|
|
678
|
-
|
|
679
|
-
var global$8 = global$r;
|
|
680
|
-
var isCallable$7 = isCallable$f;
|
|
687
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
688
|
+
var fails$4 = fails$b;
|
|
689
|
+
var isCallable$8 = isCallable$g;
|
|
681
690
|
var hasOwn$5 = hasOwnProperty_1;
|
|
682
|
-
var
|
|
683
|
-
var setGlobal$1 = setGlobal$3;
|
|
684
|
-
var inspectSource = inspectSource$2;
|
|
685
|
-
var InternalStateModule$1 = internalState;
|
|
691
|
+
var DESCRIPTORS$4 = descriptors;
|
|
686
692
|
var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
|
|
693
|
+
var inspectSource = inspectSource$1;
|
|
694
|
+
var InternalStateModule$1 = internalState;
|
|
687
695
|
|
|
688
|
-
var getInternalState$1 = InternalStateModule$1.get;
|
|
689
696
|
var enforceInternalState = InternalStateModule$1.enforce;
|
|
697
|
+
var getInternalState$1 = InternalStateModule$1.get;
|
|
698
|
+
var $String$2 = String;
|
|
699
|
+
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
700
|
+
var defineProperty$5 = Object.defineProperty;
|
|
701
|
+
var stringSlice$1 = uncurryThis$5(''.slice);
|
|
702
|
+
var replace$1 = uncurryThis$5(''.replace);
|
|
703
|
+
var join = uncurryThis$5([].join);
|
|
704
|
+
|
|
705
|
+
var CONFIGURABLE_LENGTH = DESCRIPTORS$4 && !fails$4(function () {
|
|
706
|
+
return defineProperty$5(function () { /* empty */ }, 'length', { value: 8 }).length !== 8;
|
|
707
|
+
});
|
|
708
|
+
|
|
690
709
|
var TEMPLATE = String(String).split('String');
|
|
691
710
|
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
696
|
-
var name = options && options.name !== undefined ? options.name : key;
|
|
697
|
-
var state;
|
|
698
|
-
if (isCallable$7(value)) {
|
|
699
|
-
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
700
|
-
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
701
|
-
}
|
|
702
|
-
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
703
|
-
createNonEnumerableProperty$3(value, 'name', name);
|
|
704
|
-
}
|
|
705
|
-
state = enforceInternalState(value);
|
|
706
|
-
if (!state.source) {
|
|
707
|
-
state.source = TEMPLATE.join(typeof name == 'string' ? name : '');
|
|
708
|
-
}
|
|
711
|
+
var makeBuiltIn$2 = makeBuiltIn$3.exports = function (value, name, options) {
|
|
712
|
+
if (stringSlice$1($String$2(name), 0, 7) === 'Symbol(') {
|
|
713
|
+
name = '[' + replace$1($String$2(name), /^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
709
714
|
}
|
|
710
|
-
if (
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
715
|
+
if (options && options.getter) name = 'get ' + name;
|
|
716
|
+
if (options && options.setter) name = 'set ' + name;
|
|
717
|
+
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
718
|
+
if (DESCRIPTORS$4) defineProperty$5(value, 'name', { value: name, configurable: true });
|
|
719
|
+
else value.name = name;
|
|
720
|
+
}
|
|
721
|
+
if (CONFIGURABLE_LENGTH && options && hasOwn$5(options, 'arity') && value.length !== options.arity) {
|
|
722
|
+
defineProperty$5(value, 'length', { value: options.arity });
|
|
718
723
|
}
|
|
719
|
-
|
|
720
|
-
|
|
724
|
+
try {
|
|
725
|
+
if (options && hasOwn$5(options, 'constructor') && options.constructor) {
|
|
726
|
+
if (DESCRIPTORS$4) defineProperty$5(value, 'prototype', { writable: false });
|
|
727
|
+
// in V8 ~ Chrome 53, prototypes of some methods, like `Array.prototype.values`, are non-writable
|
|
728
|
+
} else if (value.prototype) value.prototype = undefined;
|
|
729
|
+
} catch (error) { /* empty */ }
|
|
730
|
+
var state = enforceInternalState(value);
|
|
731
|
+
if (!hasOwn$5(state, 'source')) {
|
|
732
|
+
state.source = join(TEMPLATE, typeof name == 'string' ? name : '');
|
|
733
|
+
} return value;
|
|
734
|
+
};
|
|
735
|
+
|
|
721
736
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
737
|
+
// eslint-disable-next-line no-extend-native -- required
|
|
738
|
+
Function.prototype.toString = makeBuiltIn$2(function toString() {
|
|
739
|
+
return isCallable$8(this) && getInternalState$1(this).source || inspectSource(this);
|
|
740
|
+
}, 'toString');
|
|
741
|
+
|
|
742
|
+
var isCallable$7 = isCallable$g;
|
|
743
|
+
var definePropertyModule$2 = objectDefineProperty;
|
|
744
|
+
var makeBuiltIn$1 = makeBuiltIn$3.exports;
|
|
745
|
+
var defineGlobalProperty$1 = defineGlobalProperty$3;
|
|
746
|
+
|
|
747
|
+
var defineBuiltIn$3 = function (O, key, value, options) {
|
|
748
|
+
if (!options) options = {};
|
|
749
|
+
var simple = options.enumerable;
|
|
750
|
+
var name = options.name !== undefined ? options.name : key;
|
|
751
|
+
if (isCallable$7(value)) makeBuiltIn$1(value, name, options);
|
|
752
|
+
if (options.global) {
|
|
753
|
+
if (simple) O[key] = value;
|
|
754
|
+
else defineGlobalProperty$1(key, value);
|
|
755
|
+
} else {
|
|
756
|
+
try {
|
|
757
|
+
if (!options.unsafe) delete O[key];
|
|
758
|
+
else if (O[key]) simple = true;
|
|
759
|
+
} catch (error) { /* empty */ }
|
|
760
|
+
if (simple) O[key] = value;
|
|
761
|
+
else definePropertyModule$2.f(O, key, {
|
|
762
|
+
value: value,
|
|
763
|
+
enumerable: false,
|
|
764
|
+
configurable: !options.nonConfigurable,
|
|
765
|
+
writable: !options.nonWritable
|
|
766
|
+
});
|
|
767
|
+
} return O;
|
|
768
|
+
};
|
|
725
769
|
|
|
726
770
|
var objectGetOwnPropertyNames = {};
|
|
727
771
|
|
|
728
772
|
var ceil = Math.ceil;
|
|
729
773
|
var floor = Math.floor;
|
|
730
774
|
|
|
775
|
+
// `Math.trunc` method
|
|
776
|
+
// https://tc39.es/ecma262/#sec-math.trunc
|
|
777
|
+
// eslint-disable-next-line es/no-math-trunc -- safe
|
|
778
|
+
var mathTrunc = Math.trunc || function trunc(x) {
|
|
779
|
+
var n = +x;
|
|
780
|
+
return (n > 0 ? floor : ceil)(n);
|
|
781
|
+
};
|
|
782
|
+
|
|
783
|
+
var trunc = mathTrunc;
|
|
784
|
+
|
|
731
785
|
// `ToIntegerOrInfinity` abstract operation
|
|
732
786
|
// https://tc39.es/ecma262/#sec-tointegerorinfinity
|
|
733
787
|
var toIntegerOrInfinity$2 = function (argument) {
|
|
734
788
|
var number = +argument;
|
|
735
|
-
// eslint-disable-next-line no-self-compare --
|
|
736
|
-
return number !== number || number === 0 ? 0 : (number
|
|
789
|
+
// eslint-disable-next-line no-self-compare -- NaN check
|
|
790
|
+
return number !== number || number === 0 ? 0 : trunc(number);
|
|
737
791
|
};
|
|
738
792
|
|
|
739
793
|
var toIntegerOrInfinity$1 = toIntegerOrInfinity$2;
|
|
@@ -839,17 +893,17 @@
|
|
|
839
893
|
|
|
840
894
|
// `Object.getOwnPropertyNames` method
|
|
841
895
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
842
|
-
// eslint-disable-next-line es
|
|
896
|
+
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
843
897
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
844
898
|
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
845
899
|
};
|
|
846
900
|
|
|
847
901
|
var objectGetOwnPropertySymbols = {};
|
|
848
902
|
|
|
849
|
-
// eslint-disable-next-line es
|
|
903
|
+
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
850
904
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
851
905
|
|
|
852
|
-
var getBuiltIn$1 = getBuiltIn$
|
|
906
|
+
var getBuiltIn$1 = getBuiltIn$3;
|
|
853
907
|
var uncurryThis$3 = functionUncurryThis;
|
|
854
908
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
855
909
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
@@ -867,11 +921,11 @@
|
|
|
867
921
|
var hasOwn$3 = hasOwnProperty_1;
|
|
868
922
|
var ownKeys = ownKeys$1;
|
|
869
923
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
870
|
-
var definePropertyModule$
|
|
924
|
+
var definePropertyModule$1 = objectDefineProperty;
|
|
871
925
|
|
|
872
926
|
var copyConstructorProperties$2 = function (target, source, exceptions) {
|
|
873
927
|
var keys = ownKeys(source);
|
|
874
|
-
var defineProperty = definePropertyModule$
|
|
928
|
+
var defineProperty = definePropertyModule$1.f;
|
|
875
929
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
876
930
|
for (var i = 0; i < keys.length; i++) {
|
|
877
931
|
var key = keys[i];
|
|
@@ -881,8 +935,8 @@
|
|
|
881
935
|
}
|
|
882
936
|
};
|
|
883
937
|
|
|
884
|
-
var fails$3 = fails$
|
|
885
|
-
var isCallable$6 = isCallable$
|
|
938
|
+
var fails$3 = fails$b;
|
|
939
|
+
var isCallable$6 = isCallable$g;
|
|
886
940
|
|
|
887
941
|
var replacement = /#|\.prototype\./;
|
|
888
942
|
|
|
@@ -904,28 +958,28 @@
|
|
|
904
958
|
|
|
905
959
|
var isForced_1 = isForced$1;
|
|
906
960
|
|
|
907
|
-
var global$
|
|
961
|
+
var global$3 = global$c;
|
|
908
962
|
var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
909
|
-
var createNonEnumerableProperty$2 = createNonEnumerableProperty$
|
|
910
|
-
var
|
|
911
|
-
var
|
|
963
|
+
var createNonEnumerableProperty$2 = createNonEnumerableProperty$4;
|
|
964
|
+
var defineBuiltIn$2 = defineBuiltIn$3;
|
|
965
|
+
var defineGlobalProperty = defineGlobalProperty$3;
|
|
912
966
|
var copyConstructorProperties$1 = copyConstructorProperties$2;
|
|
913
967
|
var isForced = isForced_1;
|
|
914
968
|
|
|
915
969
|
/*
|
|
916
|
-
options.target
|
|
917
|
-
options.global
|
|
918
|
-
options.stat
|
|
919
|
-
options.proto
|
|
920
|
-
options.real
|
|
921
|
-
options.forced
|
|
922
|
-
options.bind
|
|
923
|
-
options.wrap
|
|
924
|
-
options.unsafe
|
|
925
|
-
options.sham
|
|
926
|
-
options.enumerable
|
|
927
|
-
options.
|
|
928
|
-
options.name
|
|
970
|
+
options.target - name of the target object
|
|
971
|
+
options.global - target is the global object
|
|
972
|
+
options.stat - export as static methods of target
|
|
973
|
+
options.proto - export as prototype methods of target
|
|
974
|
+
options.real - real prototype method for the `pure` version
|
|
975
|
+
options.forced - export even if the native feature is available
|
|
976
|
+
options.bind - bind methods to the target, required for the `pure` version
|
|
977
|
+
options.wrap - wrap constructors to preventing global pollution, required for the `pure` version
|
|
978
|
+
options.unsafe - use the simple assignment of property instead of delete + defineProperty
|
|
979
|
+
options.sham - add a flag to not completely full polyfills
|
|
980
|
+
options.enumerable - export as enumerable property
|
|
981
|
+
options.dontCallGetSet - prevent calling a getter on target
|
|
982
|
+
options.name - the .name of the function if it does not match the key
|
|
929
983
|
*/
|
|
930
984
|
var _export = function (options, source) {
|
|
931
985
|
var TARGET = options.target;
|
|
@@ -933,15 +987,15 @@
|
|
|
933
987
|
var STATIC = options.stat;
|
|
934
988
|
var FORCED, target, key, targetProperty, sourceProperty, descriptor;
|
|
935
989
|
if (GLOBAL) {
|
|
936
|
-
target = global$
|
|
990
|
+
target = global$3;
|
|
937
991
|
} else if (STATIC) {
|
|
938
|
-
target = global$
|
|
992
|
+
target = global$3[TARGET] || defineGlobalProperty(TARGET, {});
|
|
939
993
|
} else {
|
|
940
|
-
target = (global$
|
|
994
|
+
target = (global$3[TARGET] || {}).prototype;
|
|
941
995
|
}
|
|
942
996
|
if (target) for (key in source) {
|
|
943
997
|
sourceProperty = source[key];
|
|
944
|
-
if (options.
|
|
998
|
+
if (options.dontCallGetSet) {
|
|
945
999
|
descriptor = getOwnPropertyDescriptor(target, key);
|
|
946
1000
|
targetProperty = descriptor && descriptor.value;
|
|
947
1001
|
} else targetProperty = target[key];
|
|
@@ -955,8 +1009,7 @@
|
|
|
955
1009
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
956
1010
|
createNonEnumerableProperty$2(sourceProperty, 'sham', true);
|
|
957
1011
|
}
|
|
958
|
-
|
|
959
|
-
redefine$2(target, key, sourceProperty, options);
|
|
1012
|
+
defineBuiltIn$2(target, key, sourceProperty, options);
|
|
960
1013
|
}
|
|
961
1014
|
};
|
|
962
1015
|
|
|
@@ -965,7 +1018,7 @@
|
|
|
965
1018
|
|
|
966
1019
|
// `Object.keys` method
|
|
967
1020
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
968
|
-
// eslint-disable-next-line es
|
|
1021
|
+
// eslint-disable-next-line es/no-object-keys -- safe
|
|
969
1022
|
var objectKeys$2 = Object.keys || function keys(O) {
|
|
970
1023
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
971
1024
|
};
|
|
@@ -973,27 +1026,27 @@
|
|
|
973
1026
|
var DESCRIPTORS$3 = descriptors;
|
|
974
1027
|
var uncurryThis$2 = functionUncurryThis;
|
|
975
1028
|
var call$1 = functionCall;
|
|
976
|
-
var fails$2 = fails$
|
|
1029
|
+
var fails$2 = fails$b;
|
|
977
1030
|
var objectKeys$1 = objectKeys$2;
|
|
978
1031
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
979
1032
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
980
1033
|
var toObject$1 = toObject$3;
|
|
981
1034
|
var IndexedObject = indexedObject;
|
|
982
1035
|
|
|
983
|
-
// eslint-disable-next-line es
|
|
1036
|
+
// eslint-disable-next-line es/no-object-assign -- safe
|
|
984
1037
|
var $assign = Object.assign;
|
|
985
|
-
// eslint-disable-next-line es
|
|
986
|
-
var defineProperty$
|
|
1038
|
+
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
1039
|
+
var defineProperty$4 = Object.defineProperty;
|
|
987
1040
|
var concat = uncurryThis$2([].concat);
|
|
988
1041
|
|
|
989
1042
|
// `Object.assign` method
|
|
990
1043
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
991
1044
|
var objectAssign = !$assign || fails$2(function () {
|
|
992
1045
|
// should have correct order of operations (Edge bug)
|
|
993
|
-
if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$
|
|
1046
|
+
if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$4({}, 'a', {
|
|
994
1047
|
enumerable: true,
|
|
995
1048
|
get: function () {
|
|
996
|
-
defineProperty$
|
|
1049
|
+
defineProperty$4(this, 'b', {
|
|
997
1050
|
value: 3,
|
|
998
1051
|
enumerable: false
|
|
999
1052
|
});
|
|
@@ -1002,7 +1055,7 @@
|
|
|
1002
1055
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
1003
1056
|
var A = {};
|
|
1004
1057
|
var B = {};
|
|
1005
|
-
// eslint-disable-next-line es
|
|
1058
|
+
// eslint-disable-next-line es/no-symbol -- safe
|
|
1006
1059
|
var symbol = Symbol();
|
|
1007
1060
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
1008
1061
|
A[symbol] = 7;
|
|
@@ -1032,8 +1085,8 @@
|
|
|
1032
1085
|
|
|
1033
1086
|
// `Object.assign` method
|
|
1034
1087
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
1035
|
-
// eslint-disable-next-line es
|
|
1036
|
-
$$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
1088
|
+
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1089
|
+
$$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
|
|
1037
1090
|
assign: assign
|
|
1038
1091
|
});
|
|
1039
1092
|
|
|
@@ -1105,7 +1158,6 @@
|
|
|
1105
1158
|
const handleClose = event => {
|
|
1106
1159
|
if (onClose) onClose(event);
|
|
1107
1160
|
};
|
|
1108
|
-
|
|
1109
1161
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
1110
1162
|
className: "header"
|
|
1111
1163
|
}, {
|
|
@@ -1123,7 +1175,6 @@
|
|
|
1123
1175
|
}))]
|
|
1124
1176
|
}));
|
|
1125
1177
|
};
|
|
1126
|
-
|
|
1127
1178
|
const ModalBody = ({
|
|
1128
1179
|
children
|
|
1129
1180
|
}) => {
|
|
@@ -1133,7 +1184,6 @@
|
|
|
1133
1184
|
children: children
|
|
1134
1185
|
}));
|
|
1135
1186
|
};
|
|
1136
|
-
|
|
1137
1187
|
const ModalFooter = ({
|
|
1138
1188
|
confirm,
|
|
1139
1189
|
dismiss,
|
|
@@ -1145,12 +1195,10 @@
|
|
|
1145
1195
|
if (onConfirm) onConfirm(event);
|
|
1146
1196
|
if (onClose) onClose(event);
|
|
1147
1197
|
};
|
|
1148
|
-
|
|
1149
1198
|
const handleDismiss = event => {
|
|
1150
1199
|
if (onDismiss) onDismiss(event);
|
|
1151
1200
|
if (onClose) onClose(event);
|
|
1152
1201
|
};
|
|
1153
|
-
|
|
1154
1202
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
1155
1203
|
className: "footer"
|
|
1156
1204
|
}, {
|
|
@@ -1167,14 +1215,12 @@
|
|
|
1167
1215
|
}))]
|
|
1168
1216
|
}));
|
|
1169
1217
|
};
|
|
1170
|
-
|
|
1171
1218
|
const Modal = _a => {
|
|
1172
1219
|
var {
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1220
|
+
type = 'default',
|
|
1221
|
+
isOpen
|
|
1222
|
+
} = _a,
|
|
1223
|
+
props = __rest(_a, ["type", "isOpen"]);
|
|
1178
1224
|
const modalContent = () => {
|
|
1179
1225
|
switch (type) {
|
|
1180
1226
|
case 'slideout':
|
|
@@ -1185,7 +1231,6 @@
|
|
|
1185
1231
|
children: [jsxRuntime.jsx(ModalHeader, Object.assign({}, props)), jsxRuntime.jsx(ModalBody, Object.assign({}, props)), jsxRuntime.jsx(ModalFooter, Object.assign({}, props))]
|
|
1186
1232
|
}));
|
|
1187
1233
|
}
|
|
1188
|
-
|
|
1189
1234
|
case 'takeover':
|
|
1190
1235
|
{
|
|
1191
1236
|
return jsxRuntime.jsxs("main", Object.assign({
|
|
@@ -1194,7 +1239,6 @@
|
|
|
1194
1239
|
children: [jsxRuntime.jsx(ModalHeader, Object.assign({}, props)), jsxRuntime.jsx(ModalBody, Object.assign({}, props)), jsxRuntime.jsx(ModalFooter, Object.assign({}, props))]
|
|
1195
1240
|
}));
|
|
1196
1241
|
}
|
|
1197
|
-
|
|
1198
1242
|
default:
|
|
1199
1243
|
{
|
|
1200
1244
|
return jsxRuntime.jsxs("section", Object.assign({
|
|
@@ -1205,7 +1249,6 @@
|
|
|
1205
1249
|
}
|
|
1206
1250
|
}
|
|
1207
1251
|
};
|
|
1208
|
-
|
|
1209
1252
|
return isOpen ? modalContent() : null;
|
|
1210
1253
|
};
|
|
1211
1254
|
|
|
@@ -1213,14 +1256,14 @@
|
|
|
1213
1256
|
|
|
1214
1257
|
var DESCRIPTORS$2 = descriptors;
|
|
1215
1258
|
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1216
|
-
var definePropertyModule
|
|
1259
|
+
var definePropertyModule = objectDefineProperty;
|
|
1217
1260
|
var anObject$2 = anObject$5;
|
|
1218
1261
|
var toIndexedObject$1 = toIndexedObject$5;
|
|
1219
1262
|
var objectKeys = objectKeys$2;
|
|
1220
1263
|
|
|
1221
1264
|
// `Object.defineProperties` method
|
|
1222
1265
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1223
|
-
// eslint-disable-next-line es
|
|
1266
|
+
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1224
1267
|
objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1225
1268
|
anObject$2(O);
|
|
1226
1269
|
var props = toIndexedObject$1(Properties);
|
|
@@ -1228,11 +1271,11 @@
|
|
|
1228
1271
|
var length = keys.length;
|
|
1229
1272
|
var index = 0;
|
|
1230
1273
|
var key;
|
|
1231
|
-
while (length > index) definePropertyModule
|
|
1274
|
+
while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]);
|
|
1232
1275
|
return O;
|
|
1233
1276
|
};
|
|
1234
1277
|
|
|
1235
|
-
var getBuiltIn = getBuiltIn$
|
|
1278
|
+
var getBuiltIn = getBuiltIn$3;
|
|
1236
1279
|
|
|
1237
1280
|
var html$1 = getBuiltIn('document', 'documentElement');
|
|
1238
1281
|
|
|
@@ -1308,7 +1351,7 @@
|
|
|
1308
1351
|
|
|
1309
1352
|
// `Object.create` method
|
|
1310
1353
|
// https://tc39.es/ecma262/#sec-object.create
|
|
1311
|
-
// eslint-disable-next-line es
|
|
1354
|
+
// eslint-disable-next-line es/no-object-create -- safe
|
|
1312
1355
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1313
1356
|
var result;
|
|
1314
1357
|
if (O !== null) {
|
|
@@ -1323,7 +1366,7 @@
|
|
|
1323
1366
|
|
|
1324
1367
|
var wellKnownSymbol$6 = wellKnownSymbol$8;
|
|
1325
1368
|
var create$1 = objectCreate;
|
|
1326
|
-
var
|
|
1369
|
+
var defineProperty$3 = objectDefineProperty.f;
|
|
1327
1370
|
|
|
1328
1371
|
var UNSCOPABLES = wellKnownSymbol$6('unscopables');
|
|
1329
1372
|
var ArrayPrototype = Array.prototype;
|
|
@@ -1331,7 +1374,7 @@
|
|
|
1331
1374
|
// Array.prototype[@@unscopables]
|
|
1332
1375
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1333
1376
|
if (ArrayPrototype[UNSCOPABLES] == undefined) {
|
|
1334
|
-
|
|
1377
|
+
defineProperty$3(ArrayPrototype, UNSCOPABLES, {
|
|
1335
1378
|
configurable: true,
|
|
1336
1379
|
value: create$1(null)
|
|
1337
1380
|
});
|
|
@@ -1344,41 +1387,42 @@
|
|
|
1344
1387
|
|
|
1345
1388
|
var iterators = {};
|
|
1346
1389
|
|
|
1347
|
-
var fails$1 = fails$
|
|
1390
|
+
var fails$1 = fails$b;
|
|
1348
1391
|
|
|
1349
1392
|
var correctPrototypeGetter = !fails$1(function () {
|
|
1350
1393
|
function F() { /* empty */ }
|
|
1351
1394
|
F.prototype.constructor = null;
|
|
1352
|
-
// eslint-disable-next-line es
|
|
1395
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1353
1396
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1354
1397
|
});
|
|
1355
1398
|
|
|
1356
|
-
var global$6 = global$r;
|
|
1357
1399
|
var hasOwn$2 = hasOwnProperty_1;
|
|
1358
|
-
var isCallable$5 = isCallable$
|
|
1400
|
+
var isCallable$5 = isCallable$g;
|
|
1359
1401
|
var toObject = toObject$3;
|
|
1360
1402
|
var sharedKey = sharedKey$3;
|
|
1361
1403
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
1362
1404
|
|
|
1363
1405
|
var IE_PROTO = sharedKey('IE_PROTO');
|
|
1364
|
-
var Object$
|
|
1365
|
-
var ObjectPrototype = Object$
|
|
1406
|
+
var $Object$1 = Object;
|
|
1407
|
+
var ObjectPrototype = $Object$1.prototype;
|
|
1366
1408
|
|
|
1367
1409
|
// `Object.getPrototypeOf` method
|
|
1368
1410
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1369
|
-
|
|
1411
|
+
// eslint-disable-next-line es/no-object-getprototypeof -- safe
|
|
1412
|
+
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object$1.getPrototypeOf : function (O) {
|
|
1370
1413
|
var object = toObject(O);
|
|
1371
1414
|
if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
|
|
1372
1415
|
var constructor = object.constructor;
|
|
1373
1416
|
if (isCallable$5(constructor) && object instanceof constructor) {
|
|
1374
1417
|
return constructor.prototype;
|
|
1375
|
-
} return object instanceof Object$
|
|
1418
|
+
} return object instanceof $Object$1 ? ObjectPrototype : null;
|
|
1376
1419
|
};
|
|
1377
1420
|
|
|
1378
|
-
var fails = fails$
|
|
1379
|
-
var isCallable$4 = isCallable$
|
|
1421
|
+
var fails = fails$b;
|
|
1422
|
+
var isCallable$4 = isCallable$g;
|
|
1423
|
+
var isObject = isObject$6;
|
|
1380
1424
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1381
|
-
var
|
|
1425
|
+
var defineBuiltIn$1 = defineBuiltIn$3;
|
|
1382
1426
|
var wellKnownSymbol$5 = wellKnownSymbol$8;
|
|
1383
1427
|
|
|
1384
1428
|
var ITERATOR$2 = wellKnownSymbol$5('iterator');
|
|
@@ -1388,7 +1432,7 @@
|
|
|
1388
1432
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1389
1433
|
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1390
1434
|
|
|
1391
|
-
/* eslint-disable es
|
|
1435
|
+
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1392
1436
|
if ([].keys) {
|
|
1393
1437
|
arrayIterator = [].keys();
|
|
1394
1438
|
// Safari 8 has buggy iterators w/o `next`
|
|
@@ -1399,7 +1443,7 @@
|
|
|
1399
1443
|
}
|
|
1400
1444
|
}
|
|
1401
1445
|
|
|
1402
|
-
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2
|
|
1446
|
+
var NEW_ITERATOR_PROTOTYPE = !isObject(IteratorPrototype$2) || fails(function () {
|
|
1403
1447
|
var test = {};
|
|
1404
1448
|
// FF44- legacy iterators case
|
|
1405
1449
|
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
@@ -1410,7 +1454,7 @@
|
|
|
1410
1454
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
1411
1455
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1412
1456
|
if (!isCallable$4(IteratorPrototype$2[ITERATOR$2])) {
|
|
1413
|
-
|
|
1457
|
+
defineBuiltIn$1(IteratorPrototype$2, ITERATOR$2, function () {
|
|
1414
1458
|
return this;
|
|
1415
1459
|
});
|
|
1416
1460
|
}
|
|
@@ -1441,7 +1485,7 @@
|
|
|
1441
1485
|
|
|
1442
1486
|
var returnThis$1 = function () { return this; };
|
|
1443
1487
|
|
|
1444
|
-
var
|
|
1488
|
+
var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
|
|
1445
1489
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1446
1490
|
IteratorConstructor.prototype = create(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
|
|
1447
1491
|
setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
|
|
@@ -1449,34 +1493,42 @@
|
|
|
1449
1493
|
return IteratorConstructor;
|
|
1450
1494
|
};
|
|
1451
1495
|
|
|
1452
|
-
var
|
|
1453
|
-
var
|
|
1496
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1497
|
+
var aCallable = aCallable$2;
|
|
1498
|
+
|
|
1499
|
+
var functionUncurryThisAccessor = function (object, key, method) {
|
|
1500
|
+
try {
|
|
1501
|
+
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1502
|
+
return uncurryThis$1(aCallable(Object.getOwnPropertyDescriptor(object, key)[method]));
|
|
1503
|
+
} catch (error) { /* empty */ }
|
|
1504
|
+
};
|
|
1505
|
+
|
|
1506
|
+
var isCallable$3 = isCallable$g;
|
|
1454
1507
|
|
|
1455
|
-
var String$
|
|
1456
|
-
var TypeError
|
|
1508
|
+
var $String$1 = String;
|
|
1509
|
+
var $TypeError = TypeError;
|
|
1457
1510
|
|
|
1458
1511
|
var aPossiblePrototype$1 = function (argument) {
|
|
1459
1512
|
if (typeof argument == 'object' || isCallable$3(argument)) return argument;
|
|
1460
|
-
throw TypeError
|
|
1513
|
+
throw $TypeError("Can't set " + $String$1(argument) + ' as a prototype');
|
|
1461
1514
|
};
|
|
1462
1515
|
|
|
1463
1516
|
/* eslint-disable no-proto -- safe */
|
|
1464
1517
|
|
|
1465
|
-
var
|
|
1518
|
+
var uncurryThisAccessor = functionUncurryThisAccessor;
|
|
1466
1519
|
var anObject = anObject$5;
|
|
1467
1520
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1468
1521
|
|
|
1469
1522
|
// `Object.setPrototypeOf` method
|
|
1470
1523
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1471
1524
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1472
|
-
// eslint-disable-next-line es
|
|
1525
|
+
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1473
1526
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1474
1527
|
var CORRECT_SETTER = false;
|
|
1475
1528
|
var test = {};
|
|
1476
1529
|
var setter;
|
|
1477
1530
|
try {
|
|
1478
|
-
|
|
1479
|
-
setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1531
|
+
setter = uncurryThisAccessor(Object.prototype, '__proto__', 'set');
|
|
1480
1532
|
setter(test, []);
|
|
1481
1533
|
CORRECT_SETTER = test instanceof Array;
|
|
1482
1534
|
} catch (error) { /* empty */ }
|
|
@@ -1492,13 +1544,13 @@
|
|
|
1492
1544
|
var $$1 = _export;
|
|
1493
1545
|
var call = functionCall;
|
|
1494
1546
|
var FunctionName = functionName;
|
|
1495
|
-
var isCallable$2 = isCallable$
|
|
1496
|
-
var createIteratorConstructor =
|
|
1547
|
+
var isCallable$2 = isCallable$g;
|
|
1548
|
+
var createIteratorConstructor = iteratorCreateConstructor;
|
|
1497
1549
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
1498
1550
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
1499
1551
|
var setToStringTag = setToStringTag$2;
|
|
1500
|
-
var createNonEnumerableProperty$1 = createNonEnumerableProperty$
|
|
1501
|
-
var
|
|
1552
|
+
var createNonEnumerableProperty$1 = createNonEnumerableProperty$4;
|
|
1553
|
+
var defineBuiltIn = defineBuiltIn$3;
|
|
1502
1554
|
var wellKnownSymbol$3 = wellKnownSymbol$8;
|
|
1503
1555
|
var Iterators$1 = iterators;
|
|
1504
1556
|
var IteratorsCore = iteratorsCore;
|
|
@@ -1514,7 +1566,7 @@
|
|
|
1514
1566
|
|
|
1515
1567
|
var returnThis = function () { return this; };
|
|
1516
1568
|
|
|
1517
|
-
var
|
|
1569
|
+
var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
|
|
1518
1570
|
createIteratorConstructor(IteratorConstructor, NAME, next);
|
|
1519
1571
|
|
|
1520
1572
|
var getIterationMethod = function (KIND) {
|
|
@@ -1545,7 +1597,7 @@
|
|
|
1545
1597
|
if (setPrototypeOf) {
|
|
1546
1598
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1547
1599
|
} else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1548
|
-
|
|
1600
|
+
defineBuiltIn(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1549
1601
|
}
|
|
1550
1602
|
}
|
|
1551
1603
|
// Set @@toStringTag to native iterators
|
|
@@ -1572,26 +1624,33 @@
|
|
|
1572
1624
|
};
|
|
1573
1625
|
if (FORCED) for (KEY in methods) {
|
|
1574
1626
|
if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {
|
|
1575
|
-
|
|
1627
|
+
defineBuiltIn(IterablePrototype, KEY, methods[KEY]);
|
|
1576
1628
|
}
|
|
1577
1629
|
} else $$1({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);
|
|
1578
1630
|
}
|
|
1579
1631
|
|
|
1580
1632
|
// define iterator
|
|
1581
1633
|
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1582
|
-
|
|
1634
|
+
defineBuiltIn(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
1583
1635
|
}
|
|
1584
1636
|
Iterators$1[NAME] = defaultIterator;
|
|
1585
1637
|
|
|
1586
1638
|
return methods;
|
|
1587
1639
|
};
|
|
1588
1640
|
|
|
1641
|
+
// `CreateIterResultObject` abstract operation
|
|
1642
|
+
// https://tc39.es/ecma262/#sec-createiterresultobject
|
|
1643
|
+
var createIterResultObject$1 = function (value, done) {
|
|
1644
|
+
return { value: value, done: done };
|
|
1645
|
+
};
|
|
1646
|
+
|
|
1589
1647
|
var toIndexedObject = toIndexedObject$5;
|
|
1590
1648
|
var addToUnscopables = addToUnscopables$1;
|
|
1591
1649
|
var Iterators = iterators;
|
|
1592
1650
|
var InternalStateModule = internalState;
|
|
1593
1651
|
var defineProperty$1 = objectDefineProperty.f;
|
|
1594
|
-
var defineIterator =
|
|
1652
|
+
var defineIterator = iteratorDefine;
|
|
1653
|
+
var createIterResultObject = createIterResultObject$1;
|
|
1595
1654
|
var DESCRIPTORS$1 = descriptors;
|
|
1596
1655
|
|
|
1597
1656
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
@@ -1624,11 +1683,11 @@
|
|
|
1624
1683
|
var index = state.index++;
|
|
1625
1684
|
if (!target || index >= target.length) {
|
|
1626
1685
|
state.target = undefined;
|
|
1627
|
-
return
|
|
1686
|
+
return createIterResultObject(undefined, true);
|
|
1628
1687
|
}
|
|
1629
|
-
if (kind == 'keys') return
|
|
1630
|
-
if (kind == 'values') return
|
|
1631
|
-
return
|
|
1688
|
+
if (kind == 'keys') return createIterResultObject(index, false);
|
|
1689
|
+
if (kind == 'values') return createIterResultObject(target[index], false);
|
|
1690
|
+
return createIterResultObject([index, target[index]], false);
|
|
1632
1691
|
}, 'values');
|
|
1633
1692
|
|
|
1634
1693
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
@@ -1690,11 +1749,11 @@
|
|
|
1690
1749
|
|
|
1691
1750
|
var domTokenListPrototype = DOMTokenListPrototype$1 === Object.prototype ? undefined : DOMTokenListPrototype$1;
|
|
1692
1751
|
|
|
1693
|
-
var global$
|
|
1752
|
+
var global$2 = global$c;
|
|
1694
1753
|
var DOMIterables = domIterables;
|
|
1695
1754
|
var DOMTokenListPrototype = domTokenListPrototype;
|
|
1696
1755
|
var ArrayIteratorMethods = es_array_iterator;
|
|
1697
|
-
var createNonEnumerableProperty = createNonEnumerableProperty$
|
|
1756
|
+
var createNonEnumerableProperty = createNonEnumerableProperty$4;
|
|
1698
1757
|
var wellKnownSymbol$2 = wellKnownSymbol$8;
|
|
1699
1758
|
|
|
1700
1759
|
var ITERATOR = wellKnownSymbol$2('iterator');
|
|
@@ -1724,32 +1783,31 @@
|
|
|
1724
1783
|
};
|
|
1725
1784
|
|
|
1726
1785
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
1727
|
-
handlePrototype(global$
|
|
1786
|
+
handlePrototype(global$2[COLLECTION_NAME] && global$2[COLLECTION_NAME].prototype, COLLECTION_NAME);
|
|
1728
1787
|
}
|
|
1729
1788
|
|
|
1730
1789
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1731
1790
|
|
|
1732
1791
|
const Flexbox = _a => {
|
|
1733
1792
|
var {
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1793
|
+
alignContent,
|
|
1794
|
+
alignItems,
|
|
1795
|
+
alignSelf,
|
|
1796
|
+
children,
|
|
1797
|
+
justifyContent,
|
|
1798
|
+
flexDirection,
|
|
1799
|
+
flexWrap,
|
|
1800
|
+
className
|
|
1801
|
+
} = _a,
|
|
1802
|
+
props = __rest(_a, ["alignContent", "alignItems", "alignSelf", "children", "justifyContent", "flexDirection", "flexWrap", "className"]);
|
|
1745
1803
|
const [classes, setClasses] = React.useState(['d-flex']);
|
|
1746
|
-
const [flexClassName, setFlexClassName] = React.useState('d-flex');
|
|
1747
|
-
|
|
1804
|
+
const [flexClassName, setFlexClassName] = React.useState('d-flex');
|
|
1805
|
+
// // update className when classes change
|
|
1748
1806
|
React.useLayoutEffect(() => {
|
|
1749
1807
|
const newClassName = classes.join(' ');
|
|
1750
1808
|
if (newClassName !== flexClassName) setFlexClassName(newClassName);
|
|
1751
|
-
}, [classes, flexClassName]);
|
|
1752
|
-
|
|
1809
|
+
}, [classes, flexClassName]);
|
|
1810
|
+
// // update classes when props change
|
|
1753
1811
|
React.useLayoutEffect(() => {
|
|
1754
1812
|
const newClasses = ['d-flex'];
|
|
1755
1813
|
alignItems && newClasses.push(`align-items-${alignItems}`);
|
|
@@ -1835,11 +1893,10 @@
|
|
|
1835
1893
|
|
|
1836
1894
|
const SquareExclamation = _a => {
|
|
1837
1895
|
var {
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1896
|
+
focusable = false,
|
|
1897
|
+
title
|
|
1898
|
+
} = _a,
|
|
1899
|
+
props = __rest(_a, ["focusable", "title"]);
|
|
1843
1900
|
let id;
|
|
1844
1901
|
if (title) id = extract.randomId();
|
|
1845
1902
|
return jsxRuntime.jsxs("svg", Object.assign({
|
|
@@ -1865,11 +1922,10 @@
|
|
|
1865
1922
|
|
|
1866
1923
|
const SquareInfo = _a => {
|
|
1867
1924
|
var {
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1925
|
+
focusable = false,
|
|
1926
|
+
title
|
|
1927
|
+
} = _a,
|
|
1928
|
+
props = __rest(_a, ["focusable", "title"]);
|
|
1873
1929
|
let id;
|
|
1874
1930
|
if (title) id = extract.randomId();
|
|
1875
1931
|
return jsxRuntime.jsx("svg", Object.assign({
|
|
@@ -1911,11 +1967,10 @@
|
|
|
1911
1967
|
|
|
1912
1968
|
const InfoCircle = _a => {
|
|
1913
1969
|
var {
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1970
|
+
focusable = false,
|
|
1971
|
+
title
|
|
1972
|
+
} = _a,
|
|
1973
|
+
props = __rest(_a, ["focusable", "title"]);
|
|
1919
1974
|
let id;
|
|
1920
1975
|
if (title) id = extract.randomId();
|
|
1921
1976
|
return jsxRuntime.jsxs("svg", Object.assign({
|
|
@@ -1971,7 +2026,6 @@
|
|
|
1971
2026
|
})));
|
|
1972
2027
|
}
|
|
1973
2028
|
}, [isCloseable, closeText]);
|
|
1974
|
-
|
|
1975
2029
|
const renderIcon = () => {
|
|
1976
2030
|
switch (type) {
|
|
1977
2031
|
case 'danger':
|
|
@@ -1979,19 +2033,16 @@
|
|
|
1979
2033
|
return jsxRuntime.jsx(SquareExclamation, {
|
|
1980
2034
|
"aria-hidden": true
|
|
1981
2035
|
});
|
|
1982
|
-
|
|
1983
2036
|
case 'success':
|
|
1984
2037
|
return jsxRuntime.jsx(Check, {
|
|
1985
2038
|
"aria-hidden": true
|
|
1986
2039
|
});
|
|
1987
|
-
|
|
1988
2040
|
default:
|
|
1989
2041
|
return jsxRuntime.jsx(SquareInfo, {
|
|
1990
2042
|
"aria-hidden": true
|
|
1991
2043
|
});
|
|
1992
2044
|
}
|
|
1993
2045
|
};
|
|
1994
|
-
|
|
1995
2046
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
1996
2047
|
className: `alert-ribbon ${type}`,
|
|
1997
2048
|
role: role,
|
|
@@ -2030,11 +2081,10 @@
|
|
|
2030
2081
|
|
|
2031
2082
|
const IconButton = _a => {
|
|
2032
2083
|
var {
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2084
|
+
children,
|
|
2085
|
+
onClick
|
|
2086
|
+
} = _a,
|
|
2087
|
+
props = __rest(_a, ["children", "onClick"]);
|
|
2038
2088
|
return jsxRuntime.jsx("button", Object.assign({
|
|
2039
2089
|
className: "icon",
|
|
2040
2090
|
onClick: onClick,
|
|
@@ -2079,21 +2129,16 @@
|
|
|
2079
2129
|
errorMessage ? setErrorInsert(setError, target.name) : setErrorRemove(setError, target.name);
|
|
2080
2130
|
return errorMessage;
|
|
2081
2131
|
};
|
|
2082
|
-
|
|
2083
2132
|
const validateInputValueErrors = (rules, target) => {
|
|
2084
2133
|
const {
|
|
2085
2134
|
value
|
|
2086
2135
|
} = target;
|
|
2087
|
-
|
|
2088
2136
|
if ((rules === null || rules === void 0 ? void 0 : rules.custom) instanceof Function) {
|
|
2089
2137
|
return rules === null || rules === void 0 ? void 0 : rules.custom();
|
|
2090
2138
|
}
|
|
2091
|
-
|
|
2092
2139
|
return validateTextInputValues(value, rules);
|
|
2093
2140
|
};
|
|
2094
2141
|
/* eslint-disable-next-line */
|
|
2095
|
-
|
|
2096
|
-
|
|
2097
2142
|
const setErrorInsert = (setError, name) => {
|
|
2098
2143
|
/* eslint-disable-next-line */
|
|
2099
2144
|
setError(errors => {
|
|
@@ -2103,8 +2148,6 @@
|
|
|
2103
2148
|
});
|
|
2104
2149
|
};
|
|
2105
2150
|
/* eslint-disable-next-line */
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
2151
|
const setErrorRemove = (setError, name) => {
|
|
2109
2152
|
/* eslint-disable-next-line */
|
|
2110
2153
|
setError(errors => {
|
|
@@ -2114,14 +2157,12 @@
|
|
|
2114
2157
|
return newError;
|
|
2115
2158
|
});
|
|
2116
2159
|
};
|
|
2117
|
-
|
|
2118
2160
|
const validateTextInputValues = (value, rules) => {
|
|
2119
2161
|
switch (rules === null || rules === void 0 ? void 0 : rules.type) {
|
|
2120
2162
|
case 'Required':
|
|
2121
2163
|
{
|
|
2122
2164
|
return value === '' || value === undefined || value === null ? 'error' : null;
|
|
2123
2165
|
}
|
|
2124
|
-
|
|
2125
2166
|
default:
|
|
2126
2167
|
{
|
|
2127
2168
|
return;
|
|
@@ -2135,24 +2176,19 @@
|
|
|
2135
2176
|
};
|
|
2136
2177
|
const FormProvider = _a => {
|
|
2137
2178
|
var {
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2144
|
-
|
|
2179
|
+
children,
|
|
2180
|
+
direction = 'vertical',
|
|
2181
|
+
formSize = 'md',
|
|
2182
|
+
onSubmit,
|
|
2183
|
+
onFormSubmit
|
|
2184
|
+
} = _a,
|
|
2185
|
+
props = __rest(_a, ["children", "direction", "formSize", "onSubmit", "onFormSubmit"]);
|
|
2145
2186
|
/* eslint-disable-next-line */
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
2187
|
const [values, setValues] = React__default["default"].useState();
|
|
2149
2188
|
/* eslint-disable-next-line */
|
|
2150
|
-
|
|
2151
2189
|
const [errors, setErrors] = React__default["default"].useState();
|
|
2152
2190
|
/* eslint-disable-next-line */
|
|
2153
|
-
|
|
2154
2191
|
const [fields, setFields] = React__default["default"].useState({});
|
|
2155
|
-
|
|
2156
2192
|
const formSubmit = event => {
|
|
2157
2193
|
let hasError = false;
|
|
2158
2194
|
event.preventDefault();
|
|
@@ -2163,17 +2199,14 @@
|
|
|
2163
2199
|
}, fields[key], setErrors);
|
|
2164
2200
|
hasError = hasError || !!errorMessage;
|
|
2165
2201
|
});
|
|
2166
|
-
|
|
2167
2202
|
if (!hasError) {
|
|
2168
2203
|
onFormSubmit && onFormSubmit(values);
|
|
2169
2204
|
}
|
|
2170
2205
|
};
|
|
2171
|
-
|
|
2172
2206
|
const resetForm = () => {
|
|
2173
2207
|
setValues({});
|
|
2174
2208
|
setErrors({});
|
|
2175
2209
|
};
|
|
2176
|
-
|
|
2177
2210
|
return jsxRuntime.jsx(FormContext.Provider, Object.assign({
|
|
2178
2211
|
value: {
|
|
2179
2212
|
setValues,
|
|
@@ -2215,26 +2248,22 @@
|
|
|
2215
2248
|
[name]: validate === null || validate === void 0 ? void 0 : validate.rules
|
|
2216
2249
|
}));
|
|
2217
2250
|
/* eslint-disable-next-line */
|
|
2218
|
-
|
|
2219
2251
|
const removeValues = values => {
|
|
2220
2252
|
/* eslint-disable-next-line */
|
|
2221
2253
|
const newValues = Object.assign({}, values);
|
|
2222
2254
|
delete newValues[name];
|
|
2223
2255
|
return newValues;
|
|
2224
2256
|
};
|
|
2225
|
-
|
|
2226
2257
|
return () => {
|
|
2227
2258
|
/* eslint-disable-next-line */
|
|
2228
2259
|
setFields(fields => removeValues(fields));
|
|
2229
2260
|
/* eslint-disable-next-line */
|
|
2230
|
-
|
|
2231
2261
|
setValues(values => removeValues(values));
|
|
2232
2262
|
/* eslint-disable-next-line */
|
|
2233
|
-
|
|
2234
2263
|
setErrors(errors => removeValues(errors));
|
|
2235
|
-
};
|
|
2264
|
+
};
|
|
2265
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2236
2266
|
}, []);
|
|
2237
|
-
|
|
2238
2267
|
const onChange = event => {
|
|
2239
2268
|
if (!event.target) return;
|
|
2240
2269
|
const {
|
|
@@ -2244,11 +2273,9 @@
|
|
|
2244
2273
|
checked
|
|
2245
2274
|
} = event.target;
|
|
2246
2275
|
let inputValue;
|
|
2247
|
-
|
|
2248
2276
|
if (type === 'checkbox') {
|
|
2249
2277
|
inputValue = checked ? value : null;
|
|
2250
2278
|
/* eslint-disable-next-line */
|
|
2251
|
-
|
|
2252
2279
|
checked ? setValues(values => Object.assign(Object.assign({}, values), {
|
|
2253
2280
|
[name]: value
|
|
2254
2281
|
})) : setValues(values => Object.assign(Object.assign({}, values), {
|
|
@@ -2257,12 +2284,10 @@
|
|
|
2257
2284
|
} else {
|
|
2258
2285
|
inputValue = value;
|
|
2259
2286
|
/* eslint-disable-next-line */
|
|
2260
|
-
|
|
2261
2287
|
setValues(values => Object.assign(Object.assign({}, values), {
|
|
2262
2288
|
[name]: value
|
|
2263
2289
|
}));
|
|
2264
2290
|
}
|
|
2265
|
-
|
|
2266
2291
|
validateInputValue({
|
|
2267
2292
|
value: inputValue,
|
|
2268
2293
|
name,
|
|
@@ -2271,8 +2296,6 @@
|
|
|
2271
2296
|
}, validate === null || validate === void 0 ? void 0 : validate.rules, setErrors);
|
|
2272
2297
|
};
|
|
2273
2298
|
/* eslint-disable-next-line */
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
2299
|
return /*#__PURE__*/React__default["default"].cloneElement(children, {
|
|
2277
2300
|
validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
|
|
2278
2301
|
name,
|
|
@@ -2325,11 +2348,9 @@
|
|
|
2325
2348
|
const handleResize = extract.debounce(function setExpandableHeightAfterResize() {
|
|
2326
2349
|
isExpanded && expandableInnerRef.current && setExpandableHeight(expandableInnerRef.current['clientHeight']);
|
|
2327
2350
|
}, 300);
|
|
2328
|
-
|
|
2329
2351
|
if (expandableRef.current) {
|
|
2330
2352
|
window.addEventListener('resize', handleResize);
|
|
2331
2353
|
}
|
|
2332
|
-
|
|
2333
2354
|
return () => {
|
|
2334
2355
|
window.removeEventListener('resize', handleResize);
|
|
2335
2356
|
};
|
|
@@ -2419,7 +2440,6 @@
|
|
|
2419
2440
|
setValue(props.value ? props.value : '');
|
|
2420
2441
|
setChecked(props.checked ? props.checked : false);
|
|
2421
2442
|
};
|
|
2422
|
-
|
|
2423
2443
|
const form = ref.current.form;
|
|
2424
2444
|
form.addEventListener('reset', resetListener);
|
|
2425
2445
|
return () => form.removeEventListener('reset', resetListener);
|
|
@@ -2428,14 +2448,12 @@
|
|
|
2428
2448
|
return () => {};
|
|
2429
2449
|
}
|
|
2430
2450
|
}, [props]);
|
|
2431
|
-
|
|
2432
2451
|
const onChange = event => {
|
|
2433
2452
|
setValue(event.target.value);
|
|
2434
2453
|
setChecked(event.currentTarget.checked);
|
|
2435
2454
|
onChanges && onChanges(event);
|
|
2436
2455
|
onChangeInput && onChangeInput(event.target.value);
|
|
2437
2456
|
};
|
|
2438
|
-
|
|
2439
2457
|
return Object.assign(Object.assign({}, props), {
|
|
2440
2458
|
id,
|
|
2441
2459
|
ref,
|
|
@@ -2447,15 +2465,14 @@
|
|
|
2447
2465
|
|
|
2448
2466
|
const RenderInput = (type, props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel) => {
|
|
2449
2467
|
const _a = useInput(props, onChange, onChangeInput),
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2468
|
+
{
|
|
2469
|
+
value
|
|
2470
|
+
} = _a,
|
|
2471
|
+
inputProps = __rest(_a, ["value"]);
|
|
2455
2472
|
const propsWithDescription = info ? Object.assign(Object.assign({}, inputProps), {
|
|
2456
2473
|
'aria-describedby': `${inputProps.id}_info`
|
|
2457
|
-
}) : inputProps;
|
|
2458
|
-
|
|
2474
|
+
}) : inputProps;
|
|
2475
|
+
// Render naked
|
|
2459
2476
|
if (!label && !info && !expandableInfo) return jsxRuntime.jsx("input", Object.assign({
|
|
2460
2477
|
type: type,
|
|
2461
2478
|
value: value
|
|
@@ -2482,52 +2499,48 @@
|
|
|
2482
2499
|
};
|
|
2483
2500
|
const TextInput = _a => {
|
|
2484
2501
|
var {
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2502
|
+
label,
|
|
2503
|
+
info,
|
|
2504
|
+
onChange,
|
|
2505
|
+
onChangeInput,
|
|
2506
|
+
validator,
|
|
2507
|
+
expandableInfo,
|
|
2508
|
+
expandableInfoButtonLabel
|
|
2509
|
+
} = _a,
|
|
2510
|
+
props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator", "expandableInfo", "expandableInfoButtonLabel"]);
|
|
2495
2511
|
return RenderInput('text', props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel);
|
|
2496
2512
|
};
|
|
2497
2513
|
const EmailInput = _a => {
|
|
2498
2514
|
var {
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2515
|
+
label,
|
|
2516
|
+
info,
|
|
2517
|
+
onChange,
|
|
2518
|
+
onChangeInput,
|
|
2519
|
+
validator
|
|
2520
|
+
} = _a,
|
|
2521
|
+
props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
|
|
2507
2522
|
return RenderInput('email', props, onChange, onChangeInput, label, info, validator);
|
|
2508
2523
|
};
|
|
2509
2524
|
const NumberInput = _a => {
|
|
2510
2525
|
var {
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2526
|
+
label,
|
|
2527
|
+
info,
|
|
2528
|
+
onChange,
|
|
2529
|
+
onChangeInput,
|
|
2530
|
+
validator,
|
|
2531
|
+
expandableInfo,
|
|
2532
|
+
expandableInfoButtonLabel
|
|
2533
|
+
} = _a,
|
|
2534
|
+
props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator", "expandableInfo", "expandableInfoButtonLabel"]);
|
|
2521
2535
|
return RenderInput('number', props, onChange, onChangeInput, label, info, validator, expandableInfo, expandableInfoButtonLabel);
|
|
2522
2536
|
};
|
|
2523
2537
|
const Checkbox = _a => {
|
|
2524
2538
|
var {
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2539
|
+
label,
|
|
2540
|
+
onChange,
|
|
2541
|
+
validator
|
|
2542
|
+
} = _a,
|
|
2543
|
+
props = __rest(_a, ["label", "onChange", "validator"]);
|
|
2531
2544
|
const inputProps = useInput(props, onChange);
|
|
2532
2545
|
const labelClassNames = classNames__default["default"]('form-control', validator && extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator));
|
|
2533
2546
|
const inputClassNames = classNames__default["default"](validator && extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator));
|
|
@@ -2552,11 +2565,10 @@
|
|
|
2552
2565
|
};
|
|
2553
2566
|
const RadioButton = /*#__PURE__*/React__default["default"].forwardRef((_a, ref) => {
|
|
2554
2567
|
var {
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2568
|
+
label,
|
|
2569
|
+
validator
|
|
2570
|
+
} = _a,
|
|
2571
|
+
props = __rest(_a, ["label", "validator"]);
|
|
2560
2572
|
const {
|
|
2561
2573
|
id
|
|
2562
2574
|
} = useInput(props);
|
|
@@ -2594,14 +2606,13 @@
|
|
|
2594
2606
|
|
|
2595
2607
|
var toStringTagSupport = String(test) === '[object z]';
|
|
2596
2608
|
|
|
2597
|
-
var global$3 = global$r;
|
|
2598
2609
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
2599
|
-
var isCallable$1 = isCallable$
|
|
2610
|
+
var isCallable$1 = isCallable$g;
|
|
2600
2611
|
var classofRaw = classofRaw$1;
|
|
2601
2612
|
var wellKnownSymbol = wellKnownSymbol$8;
|
|
2602
2613
|
|
|
2603
2614
|
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
2604
|
-
var Object
|
|
2615
|
+
var $Object = Object;
|
|
2605
2616
|
|
|
2606
2617
|
// ES3 wrong here
|
|
2607
2618
|
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
@@ -2618,32 +2629,40 @@
|
|
|
2618
2629
|
var O, tag, result;
|
|
2619
2630
|
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
2620
2631
|
// @@toStringTag case
|
|
2621
|
-
: typeof (tag = tryGet(O = Object
|
|
2632
|
+
: typeof (tag = tryGet(O = $Object(it), TO_STRING_TAG)) == 'string' ? tag
|
|
2622
2633
|
// builtinTag case
|
|
2623
2634
|
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
2624
2635
|
// ES3 arguments fallback
|
|
2625
2636
|
: (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
|
|
2626
2637
|
};
|
|
2627
2638
|
|
|
2628
|
-
var global$2 = global$r;
|
|
2629
2639
|
var classof = classof$1;
|
|
2630
2640
|
|
|
2631
|
-
var String
|
|
2641
|
+
var $String = String;
|
|
2632
2642
|
|
|
2633
2643
|
var toString$1 = function (argument) {
|
|
2634
2644
|
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
2635
|
-
return String
|
|
2645
|
+
return $String(argument);
|
|
2646
|
+
};
|
|
2647
|
+
|
|
2648
|
+
var makeBuiltIn = makeBuiltIn$3.exports;
|
|
2649
|
+
var defineProperty = objectDefineProperty;
|
|
2650
|
+
|
|
2651
|
+
var defineBuiltInAccessor$1 = function (target, name, descriptor) {
|
|
2652
|
+
if (descriptor.get) makeBuiltIn(descriptor.get, name, { getter: true });
|
|
2653
|
+
if (descriptor.set) makeBuiltIn(descriptor.set, name, { setter: true });
|
|
2654
|
+
return defineProperty.f(target, name, descriptor);
|
|
2636
2655
|
};
|
|
2637
2656
|
|
|
2638
2657
|
var $ = _export;
|
|
2639
2658
|
var DESCRIPTORS = descriptors;
|
|
2640
|
-
var global$1 = global$
|
|
2659
|
+
var global$1 = global$c;
|
|
2641
2660
|
var uncurryThis = functionUncurryThis;
|
|
2642
2661
|
var hasOwn = hasOwnProperty_1;
|
|
2643
|
-
var isCallable = isCallable$
|
|
2662
|
+
var isCallable = isCallable$g;
|
|
2644
2663
|
var isPrototypeOf = objectIsPrototypeOf;
|
|
2645
2664
|
var toString = toString$1;
|
|
2646
|
-
var
|
|
2665
|
+
var defineBuiltInAccessor = defineBuiltInAccessor$1;
|
|
2647
2666
|
var copyConstructorProperties = copyConstructorProperties$2;
|
|
2648
2667
|
|
|
2649
2668
|
var NativeSymbol = global$1.Symbol;
|
|
@@ -2670,24 +2689,24 @@
|
|
|
2670
2689
|
SymbolPrototype.constructor = SymbolWrapper;
|
|
2671
2690
|
|
|
2672
2691
|
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
2673
|
-
var
|
|
2674
|
-
var
|
|
2692
|
+
var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
|
|
2693
|
+
var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
|
|
2675
2694
|
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
2676
2695
|
var replace = uncurryThis(''.replace);
|
|
2677
2696
|
var stringSlice = uncurryThis(''.slice);
|
|
2678
2697
|
|
|
2679
|
-
|
|
2698
|
+
defineBuiltInAccessor(SymbolPrototype, 'description', {
|
|
2680
2699
|
configurable: true,
|
|
2681
2700
|
get: function description() {
|
|
2682
|
-
var symbol =
|
|
2683
|
-
var string = symbolToString(symbol);
|
|
2701
|
+
var symbol = thisSymbolValue(this);
|
|
2684
2702
|
if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
|
|
2703
|
+
var string = symbolDescriptiveString(symbol);
|
|
2685
2704
|
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
2686
2705
|
return desc === '' ? undefined : desc;
|
|
2687
2706
|
}
|
|
2688
2707
|
});
|
|
2689
2708
|
|
|
2690
|
-
$({ global: true, forced: true }, {
|
|
2709
|
+
$({ global: true, constructor: true, forced: true }, {
|
|
2691
2710
|
Symbol: SymbolWrapper
|
|
2692
2711
|
});
|
|
2693
2712
|
}
|
|
@@ -2712,14 +2731,11 @@
|
|
|
2712
2731
|
if (description) console.warn('"description" prop is deprecated. Please use "labelInformation" instead.');
|
|
2713
2732
|
const [selected, setSelected] = React.useState(valueSelected !== null && valueSelected !== void 0 ? valueSelected : defaultSelected);
|
|
2714
2733
|
const [prevValueSelected, setPrevValueSelected] = React.useState(valueSelected);
|
|
2715
|
-
|
|
2716
2734
|
if (valueSelected !== prevValueSelected) {
|
|
2717
2735
|
setSelected(valueSelected);
|
|
2718
2736
|
setPrevValueSelected(valueSelected);
|
|
2719
2737
|
}
|
|
2720
|
-
|
|
2721
2738
|
extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
|
|
2722
|
-
|
|
2723
2739
|
const handleOnChange = event => {
|
|
2724
2740
|
if (event.target.value !== selected) {
|
|
2725
2741
|
setSelected(event.target.value);
|
|
@@ -2727,25 +2743,21 @@
|
|
|
2727
2743
|
onChange && onChange(event);
|
|
2728
2744
|
}
|
|
2729
2745
|
};
|
|
2730
|
-
|
|
2731
2746
|
const radioBtnRef = React.useRef(null);
|
|
2732
2747
|
React__default["default"].useEffect(() => {
|
|
2733
2748
|
var _a;
|
|
2734
|
-
|
|
2735
2749
|
if (radioBtnRef && radioBtnRef.current) {
|
|
2736
2750
|
const form = (_a = radioBtnRef === null || radioBtnRef === void 0 ? void 0 : radioBtnRef.current) === null || _a === void 0 ? void 0 : _a.form;
|
|
2737
|
-
|
|
2738
2751
|
const resetListner = () => {
|
|
2739
2752
|
setSelected(undefined);
|
|
2740
2753
|
};
|
|
2741
|
-
|
|
2742
2754
|
form === null || form === void 0 ? void 0 : form.addEventListener('reset', resetListner);
|
|
2743
2755
|
return () => form === null || form === void 0 ? void 0 : form.removeEventListener('reset', resetListner);
|
|
2744
2756
|
} else {
|
|
2745
2757
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2746
2758
|
return () => {};
|
|
2747
|
-
}
|
|
2748
|
-
|
|
2759
|
+
}
|
|
2760
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2749
2761
|
}, []);
|
|
2750
2762
|
const labelFromTitle = label || title;
|
|
2751
2763
|
const labelInformationFromDescription = labelInformation || description;
|
|
@@ -2780,12 +2792,11 @@
|
|
|
2780
2792
|
|
|
2781
2793
|
const ListItem = _a => {
|
|
2782
2794
|
var {
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2795
|
+
listType,
|
|
2796
|
+
tableRowData,
|
|
2797
|
+
children
|
|
2798
|
+
} = _a,
|
|
2799
|
+
props = __rest(_a, ["listType", "tableRowData", "children"]);
|
|
2789
2800
|
if (listType === 'table') {
|
|
2790
2801
|
return jsxRuntime.jsx("dl", {
|
|
2791
2802
|
children: jsxRuntime.jsxs("div", {
|
|
@@ -2805,13 +2816,12 @@
|
|
|
2805
2816
|
|
|
2806
2817
|
const List$1 = _a => {
|
|
2807
2818
|
var {
|
|
2808
|
-
|
|
2809
|
-
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
|
|
2814
|
-
|
|
2819
|
+
listType,
|
|
2820
|
+
tableCaption,
|
|
2821
|
+
tableData,
|
|
2822
|
+
children
|
|
2823
|
+
} = _a,
|
|
2824
|
+
props = __rest(_a, ["listType", "tableCaption", "tableData", "children"]);
|
|
2815
2825
|
if (listType === 'ordered') {
|
|
2816
2826
|
return jsxRuntime.jsx("ol", Object.assign({}, props, {
|
|
2817
2827
|
children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsxRuntime.jsx(ListItem, {
|
|
@@ -2884,11 +2894,10 @@
|
|
|
2884
2894
|
|
|
2885
2895
|
const Link = _a => {
|
|
2886
2896
|
var {
|
|
2887
|
-
|
|
2888
|
-
|
|
2889
|
-
|
|
2890
|
-
|
|
2891
|
-
|
|
2897
|
+
button,
|
|
2898
|
+
children
|
|
2899
|
+
} = _a,
|
|
2900
|
+
props = __rest(_a, ["button", "children"]);
|
|
2892
2901
|
const [anchorProps, setAnchorProps] = React.useState({});
|
|
2893
2902
|
React.useEffect(() => {
|
|
2894
2903
|
const className = button ? typeof button === 'string' ? `button ${button}` : 'button' : undefined;
|
|
@@ -2896,13 +2905,15 @@
|
|
|
2896
2905
|
role: button ? 'button' : undefined,
|
|
2897
2906
|
className: className
|
|
2898
2907
|
}, props);
|
|
2899
|
-
setAnchorProps(newProps);
|
|
2908
|
+
setAnchorProps(newProps);
|
|
2909
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2900
2910
|
}, [button]);
|
|
2901
2911
|
return jsxRuntime.jsx("a", Object.assign({}, anchorProps, {
|
|
2902
2912
|
children: children
|
|
2903
2913
|
}));
|
|
2904
2914
|
};
|
|
2905
2915
|
|
|
2916
|
+
//TODO: Add variants
|
|
2906
2917
|
const Navbar = ({
|
|
2907
2918
|
children,
|
|
2908
2919
|
variant,
|
|
@@ -2917,7 +2928,8 @@
|
|
|
2917
2928
|
if (variant) classNames.push(variant);
|
|
2918
2929
|
setProps(Object.assign(Object.assign({}, props), {
|
|
2919
2930
|
className: classNames.join(' ')
|
|
2920
|
-
}));
|
|
2931
|
+
}));
|
|
2932
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2921
2933
|
}, [variant]);
|
|
2922
2934
|
return jsxRuntime.jsxs("nav", Object.assign({
|
|
2923
2935
|
role: "navigation"
|
|
@@ -2962,22 +2974,20 @@
|
|
|
2962
2974
|
|
|
2963
2975
|
function Badge(_a) {
|
|
2964
2976
|
var {
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
2977
|
+
children,
|
|
2978
|
+
badgeType,
|
|
2979
|
+
isCloseable,
|
|
2980
|
+
closeText,
|
|
2981
|
+
customColor,
|
|
2982
|
+
customBackgroundColor
|
|
2983
|
+
} = _a,
|
|
2984
|
+
props = __rest(_a, ["children", "badgeType", "isCloseable", "closeText", "customColor", "customBackgroundColor"]);
|
|
2974
2985
|
const [isClosed, setIsClosed] = React__default["default"].useState(false);
|
|
2975
2986
|
const [type, setType] = React__default["default"].useState('');
|
|
2976
2987
|
React__default["default"].useEffect(() => {
|
|
2977
2988
|
if (badgeType) {
|
|
2978
2989
|
setType(badgeType);
|
|
2979
2990
|
}
|
|
2980
|
-
|
|
2981
2991
|
if (!!customColor || !!customBackgroundColor) {
|
|
2982
2992
|
setType('');
|
|
2983
2993
|
}
|
|
@@ -3001,8 +3011,8 @@
|
|
|
3001
3011
|
})) : null;
|
|
3002
3012
|
}
|
|
3003
3013
|
|
|
3014
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
3004
3015
|
const noop = () => {};
|
|
3005
|
-
|
|
3006
3016
|
const useStepper = ({
|
|
3007
3017
|
min,
|
|
3008
3018
|
max,
|
|
@@ -3026,20 +3036,20 @@
|
|
|
3026
3036
|
min,
|
|
3027
3037
|
max,
|
|
3028
3038
|
step: _step
|
|
3029
|
-
});
|
|
3030
|
-
|
|
3039
|
+
});
|
|
3040
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3031
3041
|
React.useEffect(() => {
|
|
3032
3042
|
if (max !== data.max) stepper.setMax(max);
|
|
3033
|
-
}, [stepper, max]);
|
|
3034
|
-
|
|
3043
|
+
}, [stepper, max]);
|
|
3044
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3035
3045
|
React.useEffect(() => {
|
|
3036
3046
|
if (min !== data.min) stepper.setMin(min);
|
|
3037
|
-
}, [stepper, min]);
|
|
3038
|
-
|
|
3047
|
+
}, [stepper, min]);
|
|
3048
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3039
3049
|
React.useEffect(() => {
|
|
3040
3050
|
if (_step !== data.step) stepper.setStep(_step || 1);
|
|
3041
|
-
}, [stepper, _step]);
|
|
3042
|
-
|
|
3051
|
+
}, [stepper, _step]);
|
|
3052
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3043
3053
|
React.useEffect(() => {
|
|
3044
3054
|
if (_value !== data.value) stepper.setValue(_value || 0, false);
|
|
3045
3055
|
}, [stepper, _value]);
|
|
@@ -3051,26 +3061,25 @@
|
|
|
3051
3061
|
max,
|
|
3052
3062
|
step: _step,
|
|
3053
3063
|
onChange
|
|
3054
|
-
}, setData));
|
|
3064
|
+
}, setData));
|
|
3065
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3055
3066
|
}, []);
|
|
3056
3067
|
return [stepper, data];
|
|
3057
3068
|
};
|
|
3058
3069
|
|
|
3070
|
+
// TODO: Should be named "Numeric input" instead of stepper?
|
|
3059
3071
|
function Stepper(_a) {
|
|
3060
3072
|
var {
|
|
3061
|
-
|
|
3062
|
-
|
|
3063
|
-
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3073
|
+
label,
|
|
3074
|
+
description,
|
|
3075
|
+
statusMessage,
|
|
3076
|
+
validator
|
|
3077
|
+
} = _a,
|
|
3078
|
+
stepperArgs = __rest(_a, ["label", "description", "statusMessage", "validator"]);
|
|
3068
3079
|
const [stepper, data] = useStepper(stepperArgs);
|
|
3069
|
-
|
|
3070
3080
|
const onChangeEvent = e => {
|
|
3071
3081
|
stepper.setValue(e.target.valueAsNumber);
|
|
3072
3082
|
};
|
|
3073
|
-
|
|
3074
3083
|
const PrimitiveStepper = jsxRuntime.jsxs("div", Object.assign({
|
|
3075
3084
|
className: `group group-border group-stepper ${validator && extract.validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)}`
|
|
3076
3085
|
}, {
|
|
@@ -3093,7 +3102,6 @@
|
|
|
3093
3102
|
children: "+"
|
|
3094
3103
|
}))]
|
|
3095
3104
|
}));
|
|
3096
|
-
|
|
3097
3105
|
if (!label && !description && !statusMessage && !validator) return PrimitiveStepper;
|
|
3098
3106
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
3099
3107
|
className: "form-group"
|
|
@@ -3164,11 +3172,10 @@
|
|
|
3164
3172
|
});
|
|
3165
3173
|
const Option = _a => {
|
|
3166
3174
|
var {
|
|
3167
|
-
|
|
3168
|
-
|
|
3169
|
-
|
|
3170
|
-
|
|
3171
|
-
|
|
3175
|
+
value,
|
|
3176
|
+
children
|
|
3177
|
+
} = _a,
|
|
3178
|
+
rest = __rest(_a, ["value", "children"]);
|
|
3172
3179
|
return jsxRuntime.jsx("option", Object.assign({
|
|
3173
3180
|
value: value
|
|
3174
3181
|
}, rest, {
|
|
@@ -3210,11 +3217,10 @@
|
|
|
3210
3217
|
const [togglerProps, setTogglerProps] = React.useState({});
|
|
3211
3218
|
const [listboxProps, setListboxProps] = React.useState({});
|
|
3212
3219
|
const [listItems, setListItems] = React.useState([]);
|
|
3213
|
-
const [multiSelectProps, setMultiSelectProps] = React.useState({});
|
|
3214
|
-
|
|
3220
|
+
const [multiSelectProps, setMultiSelectProps] = React.useState({});
|
|
3221
|
+
// When dropdown data changes
|
|
3215
3222
|
React.useEffect(() => {
|
|
3216
3223
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
3217
|
-
|
|
3218
3224
|
if (!dropdown) return;
|
|
3219
3225
|
const {
|
|
3220
3226
|
elements: {
|
|
@@ -3232,11 +3238,9 @@
|
|
|
3232
3238
|
className: (_c = listbox === null || listbox === void 0 ? void 0 : listbox.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
|
|
3233
3239
|
});
|
|
3234
3240
|
setListboxProps(newListboxProps);
|
|
3235
|
-
|
|
3236
3241
|
if (!dropdown.isMultiSelect) {
|
|
3237
3242
|
const newListItems = dropdown.options.map(o => {
|
|
3238
3243
|
var _a;
|
|
3239
|
-
|
|
3240
3244
|
return Object.assign(Object.assign({}, o.attributes), {
|
|
3241
3245
|
className: (_a = o.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
|
|
3242
3246
|
children: o[dropdown.display],
|
|
@@ -3274,10 +3278,10 @@
|
|
|
3274
3278
|
checkboxes
|
|
3275
3279
|
};
|
|
3276
3280
|
setMultiSelectProps(newMultiselect);
|
|
3277
|
-
}
|
|
3278
|
-
|
|
3279
|
-
}, [dropdown]);
|
|
3280
|
-
|
|
3281
|
+
}
|
|
3282
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3283
|
+
}, [dropdown]);
|
|
3284
|
+
// When dropdown properties change
|
|
3281
3285
|
React.useEffect(() => {
|
|
3282
3286
|
if (!dropdown) return;
|
|
3283
3287
|
handler === null || handler === void 0 ? void 0 : handler.update({
|
|
@@ -3293,19 +3297,22 @@
|
|
|
3293
3297
|
useValue,
|
|
3294
3298
|
display,
|
|
3295
3299
|
validator
|
|
3296
|
-
});
|
|
3300
|
+
});
|
|
3301
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3297
3302
|
}, [id, texts, options, loop, multiSelect, searchable, searchFilter, compareWith, useValue, display]);
|
|
3298
3303
|
React.useEffect(() => {
|
|
3299
3304
|
if (!dropdown) return;
|
|
3300
3305
|
handler === null || handler === void 0 ? void 0 : handler.selectByValue(value);
|
|
3301
|
-
console.log('new value');
|
|
3302
|
-
|
|
3303
|
-
|
|
3306
|
+
console.log('new value');
|
|
3307
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3308
|
+
}, [value]);
|
|
3309
|
+
// When validator changes
|
|
3304
3310
|
React.useEffect(() => {
|
|
3305
3311
|
if (!dropdown) return;
|
|
3306
|
-
if (validator) handler === null || handler === void 0 ? void 0 : handler.validate(validator);
|
|
3307
|
-
|
|
3308
|
-
|
|
3312
|
+
if (validator) handler === null || handler === void 0 ? void 0 : handler.validate(validator);
|
|
3313
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3314
|
+
}, [validator]);
|
|
3315
|
+
// Create dropdown handler
|
|
3309
3316
|
React.useEffect(() => {
|
|
3310
3317
|
if (!handler && togglerRef.current && listboxRef.current) {
|
|
3311
3318
|
setHandler(extract.createDropdown({
|
|
@@ -3323,8 +3330,8 @@
|
|
|
3323
3330
|
validator
|
|
3324
3331
|
}, togglerRef.current, listboxRef.current, listboxRef.current, dd => setDropdown(dd), value => onChange === null || onChange === void 0 ? void 0 : onChange(value)));
|
|
3325
3332
|
}
|
|
3326
|
-
|
|
3327
|
-
|
|
3333
|
+
return () => handler === null || handler === void 0 ? void 0 : handler.destroy();
|
|
3334
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
3328
3335
|
}, [togglerRef, listboxRef]);
|
|
3329
3336
|
return {
|
|
3330
3337
|
dropdown: handler,
|
|
@@ -3353,7 +3360,6 @@
|
|
|
3353
3360
|
value
|
|
3354
3361
|
}) => {
|
|
3355
3362
|
var _a;
|
|
3356
|
-
|
|
3357
3363
|
const togglerRef = React.useRef(null);
|
|
3358
3364
|
const listboxRef = React.useRef(null);
|
|
3359
3365
|
const {
|
|
@@ -3379,10 +3385,8 @@
|
|
|
3379
3385
|
onChange,
|
|
3380
3386
|
validator
|
|
3381
3387
|
});
|
|
3382
|
-
|
|
3383
3388
|
const getListBoxProps = props => {
|
|
3384
3389
|
var _a, _b, _c;
|
|
3385
|
-
|
|
3386
3390
|
if (Object.keys(props).length === 0) return {
|
|
3387
3391
|
role: 'listbox',
|
|
3388
3392
|
tabIndex: -1,
|
|
@@ -3390,7 +3394,6 @@
|
|
|
3390
3394
|
};
|
|
3391
3395
|
return props;
|
|
3392
3396
|
};
|
|
3393
|
-
|
|
3394
3397
|
return jsxRuntime.jsxs("div", Object.assign({
|
|
3395
3398
|
className: "form-group"
|
|
3396
3399
|
}, {
|
|
@@ -3487,17 +3490,14 @@
|
|
|
3487
3490
|
} = useDatepicker(datepickerRef, datepickerDialogRef, dateInputRef, datepickerTriggerRef, options);
|
|
3488
3491
|
React.useEffect(() => {
|
|
3489
3492
|
var _a;
|
|
3490
|
-
|
|
3491
3493
|
const selDateSub = (_a = datepicker.selectedDate$) === null || _a === void 0 ? void 0 : _a.subscribe(newDate => options.onChange && options.onChange(newDate));
|
|
3492
3494
|
return () => selDateSub === null || selDateSub === void 0 ? void 0 : selDateSub.unsubscribe();
|
|
3493
3495
|
}, [datepicker, options]);
|
|
3494
|
-
|
|
3495
3496
|
const classNames = day => Object.entries({
|
|
3496
3497
|
disabled: !day.currentMonth,
|
|
3497
|
-
'sg-date-today': day.today
|
|
3498
|
-
|
|
3498
|
+
'sg-date-today': day.today
|
|
3499
|
+
// 'sg-date-holiday': day.holiday,
|
|
3499
3500
|
}).map(([className, add]) => add ? className : '').join(' ');
|
|
3500
|
-
|
|
3501
3501
|
return jsxRuntime.jsxs(jsxRuntime.Fragment, {
|
|
3502
3502
|
children: [jsxRuntime.jsxs("div", Object.assign({
|
|
3503
3503
|
className: "form-group"
|
|
@@ -3556,11 +3556,13 @@
|
|
|
3556
3556
|
}))
|
|
3557
3557
|
})), jsxRuntime.jsx(Dropdown, {
|
|
3558
3558
|
options: extract.months({}),
|
|
3559
|
+
display: "key",
|
|
3559
3560
|
texts: {
|
|
3560
3561
|
placeholder: data.monthName
|
|
3561
3562
|
}
|
|
3562
3563
|
}), jsxRuntime.jsx(Dropdown, {
|
|
3563
3564
|
options: extract.years({}),
|
|
3565
|
+
display: "key",
|
|
3564
3566
|
texts: {
|
|
3565
3567
|
placeholder: data.year + ''
|
|
3566
3568
|
}
|