@sebgroup/green-react 1.0.0-beta.4 → 1.0.0-beta.40
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.d.ts +3 -0
- package/index.esm.js +1197 -410
- package/index.umd.js +2951 -1626
- package/lib/badge/badge.d.ts +12 -0
- package/lib/datepicker/datepicker.d.ts +2 -0
- package/lib/datepicker/hook.d.ts +12 -0
- package/lib/dropdown/dropdown.d.ts +4 -7
- package/lib/dropdown/hooks.d.ts +18 -8
- package/lib/form/button/button.d.ts +2 -1
- package/lib/form/form.d.ts +2 -1
- package/lib/form/formContext.d.ts +13 -0
- package/lib/form/formItems.d.ts +9 -0
- package/lib/form/group/group.d.ts +9 -0
- package/lib/form/index.d.ts +3 -0
- package/lib/form/input/input.d.ts +11 -5
- package/lib/form/radioButton/radioGroup.d.ts +13 -0
- package/lib/form/types.d.ts +14 -16
- package/lib/form/useInput.d.ts +2 -3
- package/lib/form/validateInput.d.ts +9 -0
- package/lib/layout/flexbox/flexbox.d.ts +11 -7
- package/lib/layout/flexbox/types.d.ts +5 -0
- package/lib/layout/index.d.ts +0 -1
- package/lib/stepper/hook.d.ts +3 -0
- package/lib/stepper/stepper.d.ts +7 -0
- package/lib/tabs/tabs.d.ts +4 -3
- package/package.json +5 -8
- package/lib/layout/group/group.d.ts +0 -6
package/index.esm.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
1
|
+
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
2
|
+
import React, { useState, useLayoutEffect, useEffect, useMemo, useRef } from 'react';
|
|
3
|
+
import { randomId, validateClassName, createStepper, createDropdown, dropdownValues } from '@sebgroup/extract';
|
|
4
4
|
|
|
5
5
|
var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ var check = function (it) {
|
|
|
10
10
|
|
|
11
11
|
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
|
|
12
12
|
var global$r =
|
|
13
|
-
// eslint-disable-next-line es/no-global-this -- safe
|
|
13
|
+
// eslint-disable-next-line es-x/no-global-this -- safe
|
|
14
14
|
check(typeof globalThis == 'object' && globalThis) ||
|
|
15
15
|
check(typeof window == 'object' && window) ||
|
|
16
16
|
// eslint-disable-next-line no-restricted-globals -- safe
|
|
@@ -21,7 +21,7 @@ var global$r =
|
|
|
21
21
|
|
|
22
22
|
var objectGetOwnPropertyDescriptor = {};
|
|
23
23
|
|
|
24
|
-
var fails$
|
|
24
|
+
var fails$a = function (exec) {
|
|
25
25
|
try {
|
|
26
26
|
return !!exec();
|
|
27
27
|
} catch (error) {
|
|
@@ -29,24 +29,35 @@ var fails$9 = function (exec) {
|
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
31
|
|
|
32
|
-
var fails$
|
|
32
|
+
var fails$9 = fails$a;
|
|
33
33
|
|
|
34
34
|
// Detect IE8's incomplete defineProperty implementation
|
|
35
|
-
var descriptors = !fails$
|
|
36
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
35
|
+
var descriptors = !fails$9(function () {
|
|
36
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
37
37
|
return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
|
|
38
38
|
});
|
|
39
39
|
|
|
40
|
+
var fails$8 = fails$a;
|
|
41
|
+
|
|
42
|
+
var functionBindNative = !fails$8(function () {
|
|
43
|
+
// eslint-disable-next-line es-x/no-function-prototype-bind -- safe
|
|
44
|
+
var test = (function () { /* empty */ }).bind();
|
|
45
|
+
// eslint-disable-next-line no-prototype-builtins -- safe
|
|
46
|
+
return typeof test != 'function' || test.hasOwnProperty('prototype');
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
var NATIVE_BIND$1 = functionBindNative;
|
|
50
|
+
|
|
40
51
|
var call$6 = Function.prototype.call;
|
|
41
52
|
|
|
42
|
-
var functionCall =
|
|
53
|
+
var functionCall = NATIVE_BIND$1 ? call$6.bind(call$6) : function () {
|
|
43
54
|
return call$6.apply(call$6, arguments);
|
|
44
55
|
};
|
|
45
56
|
|
|
46
57
|
var objectPropertyIsEnumerable = {};
|
|
47
58
|
|
|
48
59
|
var $propertyIsEnumerable = {}.propertyIsEnumerable;
|
|
49
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
60
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
50
61
|
var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
51
62
|
|
|
52
63
|
// Nashorn ~ JDK8 bug
|
|
@@ -68,35 +79,37 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
|
68
79
|
};
|
|
69
80
|
};
|
|
70
81
|
|
|
82
|
+
var NATIVE_BIND = functionBindNative;
|
|
83
|
+
|
|
71
84
|
var FunctionPrototype$1 = Function.prototype;
|
|
72
85
|
var bind = FunctionPrototype$1.bind;
|
|
73
86
|
var call$5 = FunctionPrototype$1.call;
|
|
74
|
-
var
|
|
87
|
+
var uncurryThis$c = NATIVE_BIND && bind.bind(call$5, call$5);
|
|
75
88
|
|
|
76
|
-
var functionUncurryThis =
|
|
77
|
-
return fn &&
|
|
89
|
+
var functionUncurryThis = NATIVE_BIND ? function (fn) {
|
|
90
|
+
return fn && uncurryThis$c(fn);
|
|
78
91
|
} : function (fn) {
|
|
79
92
|
return fn && function () {
|
|
80
93
|
return call$5.apply(fn, arguments);
|
|
81
94
|
};
|
|
82
95
|
};
|
|
83
96
|
|
|
84
|
-
var uncurryThis$
|
|
97
|
+
var uncurryThis$b = functionUncurryThis;
|
|
85
98
|
|
|
86
|
-
var toString$
|
|
87
|
-
var stringSlice = uncurryThis$
|
|
99
|
+
var toString$3 = uncurryThis$b({}.toString);
|
|
100
|
+
var stringSlice$1 = uncurryThis$b(''.slice);
|
|
88
101
|
|
|
89
102
|
var classofRaw$1 = function (it) {
|
|
90
|
-
return stringSlice(toString$
|
|
103
|
+
return stringSlice$1(toString$3(it), 8, -1);
|
|
91
104
|
};
|
|
92
105
|
|
|
93
106
|
var global$q = global$r;
|
|
94
|
-
var uncurryThis$
|
|
95
|
-
var fails$7 = fails$
|
|
107
|
+
var uncurryThis$a = functionUncurryThis;
|
|
108
|
+
var fails$7 = fails$a;
|
|
96
109
|
var classof$2 = classofRaw$1;
|
|
97
110
|
|
|
98
111
|
var Object$5 = global$q.Object;
|
|
99
|
-
var split = uncurryThis$
|
|
112
|
+
var split = uncurryThis$a(''.split);
|
|
100
113
|
|
|
101
114
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
102
115
|
var indexedObject = fails$7(function () {
|
|
@@ -113,45 +126,45 @@ var TypeError$8 = global$p.TypeError;
|
|
|
113
126
|
|
|
114
127
|
// `RequireObjectCoercible` abstract operation
|
|
115
128
|
// https://tc39.es/ecma262/#sec-requireobjectcoercible
|
|
116
|
-
var requireObjectCoercible$
|
|
129
|
+
var requireObjectCoercible$2 = function (it) {
|
|
117
130
|
if (it == undefined) throw TypeError$8("Can't call method on " + it);
|
|
118
131
|
return it;
|
|
119
132
|
};
|
|
120
133
|
|
|
121
134
|
// toObject with fallback for non-array-like ES3 strings
|
|
122
135
|
var IndexedObject$1 = indexedObject;
|
|
123
|
-
var requireObjectCoercible$
|
|
136
|
+
var requireObjectCoercible$1 = requireObjectCoercible$2;
|
|
124
137
|
|
|
125
138
|
var toIndexedObject$5 = function (it) {
|
|
126
|
-
return IndexedObject$1(requireObjectCoercible$
|
|
139
|
+
return IndexedObject$1(requireObjectCoercible$1(it));
|
|
127
140
|
};
|
|
128
141
|
|
|
129
142
|
// `IsCallable` abstract operation
|
|
130
143
|
// https://tc39.es/ecma262/#sec-iscallable
|
|
131
|
-
var isCallable$
|
|
144
|
+
var isCallable$f = function (argument) {
|
|
132
145
|
return typeof argument == 'function';
|
|
133
146
|
};
|
|
134
147
|
|
|
135
|
-
var isCallable$
|
|
148
|
+
var isCallable$e = isCallable$f;
|
|
136
149
|
|
|
137
150
|
var isObject$5 = function (it) {
|
|
138
|
-
return typeof it == 'object' ? it !== null : isCallable$
|
|
151
|
+
return typeof it == 'object' ? it !== null : isCallable$e(it);
|
|
139
152
|
};
|
|
140
153
|
|
|
141
154
|
var global$o = global$r;
|
|
142
|
-
var isCallable$
|
|
155
|
+
var isCallable$d = isCallable$f;
|
|
143
156
|
|
|
144
157
|
var aFunction = function (argument) {
|
|
145
|
-
return isCallable$
|
|
158
|
+
return isCallable$d(argument) ? argument : undefined;
|
|
146
159
|
};
|
|
147
160
|
|
|
148
161
|
var getBuiltIn$4 = function (namespace, method) {
|
|
149
162
|
return arguments.length < 2 ? aFunction(global$o[namespace]) : global$o[namespace] && global$o[namespace][method];
|
|
150
163
|
};
|
|
151
164
|
|
|
152
|
-
var uncurryThis$
|
|
165
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
153
166
|
|
|
154
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
167
|
+
var objectIsPrototypeOf = uncurryThis$9({}.isPrototypeOf);
|
|
155
168
|
|
|
156
169
|
var getBuiltIn$3 = getBuiltIn$4;
|
|
157
170
|
|
|
@@ -185,12 +198,12 @@ if (!version && userAgent) {
|
|
|
185
198
|
|
|
186
199
|
var engineV8Version = version;
|
|
187
200
|
|
|
188
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
201
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
189
202
|
|
|
190
203
|
var V8_VERSION = engineV8Version;
|
|
191
|
-
var fails$6 = fails$
|
|
204
|
+
var fails$6 = fails$a;
|
|
192
205
|
|
|
193
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
|
|
206
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
|
|
194
207
|
var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
|
|
195
208
|
var symbol = Symbol();
|
|
196
209
|
// Chrome 38 Symbol has incorrect toString conversion
|
|
@@ -200,18 +213,18 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$6(function () {
|
|
|
200
213
|
!Symbol.sham && V8_VERSION && V8_VERSION < 41;
|
|
201
214
|
});
|
|
202
215
|
|
|
203
|
-
/* eslint-disable es/no-symbol -- required for testing */
|
|
216
|
+
/* eslint-disable es-x/no-symbol -- required for testing */
|
|
204
217
|
|
|
205
|
-
var NATIVE_SYMBOL$
|
|
218
|
+
var NATIVE_SYMBOL$2 = nativeSymbol;
|
|
206
219
|
|
|
207
|
-
var useSymbolAsUid = NATIVE_SYMBOL$
|
|
220
|
+
var useSymbolAsUid = NATIVE_SYMBOL$2
|
|
208
221
|
&& !Symbol.sham
|
|
209
222
|
&& typeof Symbol.iterator == 'symbol';
|
|
210
223
|
|
|
211
224
|
var global$m = global$r;
|
|
212
225
|
var getBuiltIn$2 = getBuiltIn$4;
|
|
213
|
-
var isCallable$
|
|
214
|
-
var isPrototypeOf = objectIsPrototypeOf;
|
|
226
|
+
var isCallable$c = isCallable$f;
|
|
227
|
+
var isPrototypeOf$1 = objectIsPrototypeOf;
|
|
215
228
|
var USE_SYMBOL_AS_UID$1 = useSymbolAsUid;
|
|
216
229
|
|
|
217
230
|
var Object$4 = global$m.Object;
|
|
@@ -220,7 +233,7 @@ var isSymbol$2 = USE_SYMBOL_AS_UID$1 ? function (it) {
|
|
|
220
233
|
return typeof it == 'symbol';
|
|
221
234
|
} : function (it) {
|
|
222
235
|
var $Symbol = getBuiltIn$2('Symbol');
|
|
223
|
-
return isCallable$
|
|
236
|
+
return isCallable$c($Symbol) && isPrototypeOf$1($Symbol.prototype, Object$4(it));
|
|
224
237
|
};
|
|
225
238
|
|
|
226
239
|
var global$l = global$r;
|
|
@@ -236,14 +249,14 @@ var tryToString$1 = function (argument) {
|
|
|
236
249
|
};
|
|
237
250
|
|
|
238
251
|
var global$k = global$r;
|
|
239
|
-
var isCallable$
|
|
252
|
+
var isCallable$b = isCallable$f;
|
|
240
253
|
var tryToString = tryToString$1;
|
|
241
254
|
|
|
242
255
|
var TypeError$7 = global$k.TypeError;
|
|
243
256
|
|
|
244
257
|
// `Assert: IsCallable(argument) is true`
|
|
245
258
|
var aCallable$1 = function (argument) {
|
|
246
|
-
if (isCallable$
|
|
259
|
+
if (isCallable$b(argument)) return argument;
|
|
247
260
|
throw TypeError$7(tryToString(argument) + ' is not a function');
|
|
248
261
|
};
|
|
249
262
|
|
|
@@ -258,7 +271,7 @@ var getMethod$1 = function (V, P) {
|
|
|
258
271
|
|
|
259
272
|
var global$j = global$r;
|
|
260
273
|
var call$4 = functionCall;
|
|
261
|
-
var isCallable$
|
|
274
|
+
var isCallable$a = isCallable$f;
|
|
262
275
|
var isObject$4 = isObject$5;
|
|
263
276
|
|
|
264
277
|
var TypeError$6 = global$j.TypeError;
|
|
@@ -267,9 +280,9 @@ var TypeError$6 = global$j.TypeError;
|
|
|
267
280
|
// https://tc39.es/ecma262/#sec-ordinarytoprimitive
|
|
268
281
|
var ordinaryToPrimitive$1 = function (input, pref) {
|
|
269
282
|
var fn, val;
|
|
270
|
-
if (pref === 'string' && isCallable$
|
|
271
|
-
if (isCallable$
|
|
272
|
-
if (pref !== 'string' && isCallable$
|
|
283
|
+
if (pref === 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$4(fn, input))) return val;
|
|
284
|
+
if (isCallable$a(fn = input.valueOf) && !isObject$4(val = call$4(fn, input))) return val;
|
|
285
|
+
if (pref !== 'string' && isCallable$a(fn = input.toString) && !isObject$4(val = call$4(fn, input))) return val;
|
|
273
286
|
throw TypeError$6("Can't convert object to primitive value");
|
|
274
287
|
};
|
|
275
288
|
|
|
@@ -277,12 +290,12 @@ var shared$3 = {exports: {}};
|
|
|
277
290
|
|
|
278
291
|
var global$i = global$r;
|
|
279
292
|
|
|
280
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
281
|
-
var defineProperty$
|
|
293
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
294
|
+
var defineProperty$4 = Object.defineProperty;
|
|
282
295
|
|
|
283
296
|
var setGlobal$3 = function (key, value) {
|
|
284
297
|
try {
|
|
285
|
-
defineProperty$
|
|
298
|
+
defineProperty$4(global$i, key, { value: value, configurable: true, writable: true });
|
|
286
299
|
} catch (error) {
|
|
287
300
|
global$i[key] = value;
|
|
288
301
|
} return value;
|
|
@@ -301,60 +314,63 @@ var store$2 = sharedStore;
|
|
|
301
314
|
(shared$3.exports = function (key, value) {
|
|
302
315
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
303
316
|
})('versions', []).push({
|
|
304
|
-
version: '3.
|
|
317
|
+
version: '3.22.2',
|
|
305
318
|
mode: 'global',
|
|
306
|
-
copyright: '©
|
|
319
|
+
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
320
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.22.2/LICENSE',
|
|
321
|
+
source: 'https://github.com/zloirock/core-js'
|
|
307
322
|
});
|
|
308
323
|
|
|
309
324
|
var global$g = global$r;
|
|
310
|
-
var requireObjectCoercible
|
|
325
|
+
var requireObjectCoercible = requireObjectCoercible$2;
|
|
311
326
|
|
|
312
327
|
var Object$3 = global$g.Object;
|
|
313
328
|
|
|
314
329
|
// `ToObject` abstract operation
|
|
315
330
|
// https://tc39.es/ecma262/#sec-toobject
|
|
316
331
|
var toObject$3 = function (argument) {
|
|
317
|
-
return Object$3(requireObjectCoercible
|
|
332
|
+
return Object$3(requireObjectCoercible(argument));
|
|
318
333
|
};
|
|
319
334
|
|
|
320
|
-
var uncurryThis$
|
|
335
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
321
336
|
var toObject$2 = toObject$3;
|
|
322
337
|
|
|
323
|
-
var hasOwnProperty = uncurryThis$
|
|
338
|
+
var hasOwnProperty = uncurryThis$8({}.hasOwnProperty);
|
|
324
339
|
|
|
325
340
|
// `HasOwnProperty` abstract operation
|
|
326
341
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
342
|
+
// eslint-disable-next-line es-x/no-object-hasown -- safe
|
|
327
343
|
var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
328
344
|
return hasOwnProperty(toObject$2(it), key);
|
|
329
345
|
};
|
|
330
346
|
|
|
331
|
-
var uncurryThis$
|
|
347
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
332
348
|
|
|
333
349
|
var id = 0;
|
|
334
350
|
var postfix = Math.random();
|
|
335
|
-
var toString$
|
|
351
|
+
var toString$2 = uncurryThis$7(1.0.toString);
|
|
336
352
|
|
|
337
353
|
var uid$2 = function (key) {
|
|
338
|
-
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$
|
|
354
|
+
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$2(++id + postfix, 36);
|
|
339
355
|
};
|
|
340
356
|
|
|
341
357
|
var global$f = global$r;
|
|
342
358
|
var shared$2 = shared$3.exports;
|
|
343
|
-
var hasOwn$
|
|
359
|
+
var hasOwn$9 = hasOwnProperty_1;
|
|
344
360
|
var uid$1 = uid$2;
|
|
345
|
-
var NATIVE_SYMBOL = nativeSymbol;
|
|
361
|
+
var NATIVE_SYMBOL$1 = nativeSymbol;
|
|
346
362
|
var USE_SYMBOL_AS_UID = useSymbolAsUid;
|
|
347
363
|
|
|
348
364
|
var WellKnownSymbolsStore = shared$2('wks');
|
|
349
|
-
var Symbol$
|
|
350
|
-
var symbolFor = Symbol$
|
|
351
|
-
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$
|
|
365
|
+
var Symbol$1 = global$f.Symbol;
|
|
366
|
+
var symbolFor = Symbol$1 && Symbol$1['for'];
|
|
367
|
+
var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol$1 : Symbol$1 && Symbol$1.withoutSetter || uid$1;
|
|
352
368
|
|
|
353
369
|
var wellKnownSymbol$8 = function (name) {
|
|
354
|
-
if (!hasOwn$
|
|
370
|
+
if (!hasOwn$9(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL$1 || typeof WellKnownSymbolsStore[name] == 'string')) {
|
|
355
371
|
var description = 'Symbol.' + name;
|
|
356
|
-
if (NATIVE_SYMBOL && hasOwn$
|
|
357
|
-
WellKnownSymbolsStore[name] = Symbol$
|
|
372
|
+
if (NATIVE_SYMBOL$1 && hasOwn$9(Symbol$1, name)) {
|
|
373
|
+
WellKnownSymbolsStore[name] = Symbol$1[name];
|
|
358
374
|
} else if (USE_SYMBOL_AS_UID && symbolFor) {
|
|
359
375
|
WellKnownSymbolsStore[name] = symbolFor(description);
|
|
360
376
|
} else {
|
|
@@ -411,43 +427,56 @@ var documentCreateElement$2 = function (it) {
|
|
|
411
427
|
return EXISTS$1 ? document$1.createElement(it) : {};
|
|
412
428
|
};
|
|
413
429
|
|
|
414
|
-
var DESCRIPTORS$
|
|
415
|
-
var fails$5 = fails$
|
|
430
|
+
var DESCRIPTORS$9 = descriptors;
|
|
431
|
+
var fails$5 = fails$a;
|
|
416
432
|
var createElement = documentCreateElement$2;
|
|
417
433
|
|
|
418
|
-
//
|
|
419
|
-
var ie8DomDefine = !DESCRIPTORS$
|
|
420
|
-
// eslint-disable-next-line es/no-object-defineproperty --
|
|
434
|
+
// Thanks to IE8 for its funny defineProperty
|
|
435
|
+
var ie8DomDefine = !DESCRIPTORS$9 && !fails$5(function () {
|
|
436
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
421
437
|
return Object.defineProperty(createElement('div'), 'a', {
|
|
422
438
|
get: function () { return 7; }
|
|
423
439
|
}).a != 7;
|
|
424
440
|
});
|
|
425
441
|
|
|
426
|
-
var DESCRIPTORS$
|
|
442
|
+
var DESCRIPTORS$8 = descriptors;
|
|
427
443
|
var call$2 = functionCall;
|
|
428
444
|
var propertyIsEnumerableModule$1 = objectPropertyIsEnumerable;
|
|
429
445
|
var createPropertyDescriptor$2 = createPropertyDescriptor$3;
|
|
430
446
|
var toIndexedObject$4 = toIndexedObject$5;
|
|
431
447
|
var toPropertyKey$1 = toPropertyKey$2;
|
|
432
|
-
var hasOwn$
|
|
448
|
+
var hasOwn$8 = hasOwnProperty_1;
|
|
433
449
|
var IE8_DOM_DEFINE$1 = ie8DomDefine;
|
|
434
450
|
|
|
435
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
436
|
-
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
451
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
452
|
+
var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
|
|
437
453
|
|
|
438
454
|
// `Object.getOwnPropertyDescriptor` method
|
|
439
455
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
440
|
-
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$
|
|
456
|
+
objectGetOwnPropertyDescriptor.f = DESCRIPTORS$8 ? $getOwnPropertyDescriptor$1 : function getOwnPropertyDescriptor(O, P) {
|
|
441
457
|
O = toIndexedObject$4(O);
|
|
442
458
|
P = toPropertyKey$1(P);
|
|
443
459
|
if (IE8_DOM_DEFINE$1) try {
|
|
444
|
-
return $getOwnPropertyDescriptor(O, P);
|
|
460
|
+
return $getOwnPropertyDescriptor$1(O, P);
|
|
445
461
|
} catch (error) { /* empty */ }
|
|
446
|
-
if (hasOwn$
|
|
462
|
+
if (hasOwn$8(O, P)) return createPropertyDescriptor$2(!call$2(propertyIsEnumerableModule$1.f, O, P), O[P]);
|
|
447
463
|
};
|
|
448
464
|
|
|
449
465
|
var objectDefineProperty = {};
|
|
450
466
|
|
|
467
|
+
var DESCRIPTORS$7 = descriptors;
|
|
468
|
+
var fails$4 = fails$a;
|
|
469
|
+
|
|
470
|
+
// V8 ~ Chrome 36-
|
|
471
|
+
// https://bugs.chromium.org/p/v8/issues/detail?id=3334
|
|
472
|
+
var v8PrototypeDefineBug = DESCRIPTORS$7 && fails$4(function () {
|
|
473
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
474
|
+
return Object.defineProperty(function () { /* empty */ }, 'prototype', {
|
|
475
|
+
value: 42,
|
|
476
|
+
writable: false
|
|
477
|
+
}).prototype != 42;
|
|
478
|
+
});
|
|
479
|
+
|
|
451
480
|
var global$c = global$r;
|
|
452
481
|
var isObject$1 = isObject$5;
|
|
453
482
|
|
|
@@ -461,18 +490,39 @@ var anObject$5 = function (argument) {
|
|
|
461
490
|
};
|
|
462
491
|
|
|
463
492
|
var global$b = global$r;
|
|
464
|
-
var DESCRIPTORS$
|
|
493
|
+
var DESCRIPTORS$6 = descriptors;
|
|
465
494
|
var IE8_DOM_DEFINE = ie8DomDefine;
|
|
495
|
+
var V8_PROTOTYPE_DEFINE_BUG$1 = v8PrototypeDefineBug;
|
|
466
496
|
var anObject$4 = anObject$5;
|
|
467
497
|
var toPropertyKey = toPropertyKey$2;
|
|
468
498
|
|
|
469
499
|
var TypeError$3 = global$b.TypeError;
|
|
470
|
-
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
500
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- safe
|
|
471
501
|
var $defineProperty = Object.defineProperty;
|
|
502
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
503
|
+
var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
|
|
504
|
+
var ENUMERABLE = 'enumerable';
|
|
505
|
+
var CONFIGURABLE$1 = 'configurable';
|
|
506
|
+
var WRITABLE = 'writable';
|
|
472
507
|
|
|
473
508
|
// `Object.defineProperty` method
|
|
474
509
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
475
|
-
objectDefineProperty.f = DESCRIPTORS$
|
|
510
|
+
objectDefineProperty.f = DESCRIPTORS$6 ? V8_PROTOTYPE_DEFINE_BUG$1 ? function defineProperty(O, P, Attributes) {
|
|
511
|
+
anObject$4(O);
|
|
512
|
+
P = toPropertyKey(P);
|
|
513
|
+
anObject$4(Attributes);
|
|
514
|
+
if (typeof O === 'function' && P === 'prototype' && 'value' in Attributes && WRITABLE in Attributes && !Attributes[WRITABLE]) {
|
|
515
|
+
var current = $getOwnPropertyDescriptor(O, P);
|
|
516
|
+
if (current && current[WRITABLE]) {
|
|
517
|
+
O[P] = Attributes.value;
|
|
518
|
+
Attributes = {
|
|
519
|
+
configurable: CONFIGURABLE$1 in Attributes ? Attributes[CONFIGURABLE$1] : current[CONFIGURABLE$1],
|
|
520
|
+
enumerable: ENUMERABLE in Attributes ? Attributes[ENUMERABLE] : current[ENUMERABLE],
|
|
521
|
+
writable: false
|
|
522
|
+
};
|
|
523
|
+
}
|
|
524
|
+
} return $defineProperty(O, P, Attributes);
|
|
525
|
+
} : $defineProperty : function defineProperty(O, P, Attributes) {
|
|
476
526
|
anObject$4(O);
|
|
477
527
|
P = toPropertyKey(P);
|
|
478
528
|
anObject$4(Attributes);
|
|
@@ -484,11 +534,11 @@ objectDefineProperty.f = DESCRIPTORS$4 ? $defineProperty : function defineProper
|
|
|
484
534
|
return O;
|
|
485
535
|
};
|
|
486
536
|
|
|
487
|
-
var DESCRIPTORS$
|
|
537
|
+
var DESCRIPTORS$5 = descriptors;
|
|
488
538
|
var definePropertyModule$3 = objectDefineProperty;
|
|
489
539
|
var createPropertyDescriptor$1 = createPropertyDescriptor$3;
|
|
490
540
|
|
|
491
|
-
var createNonEnumerableProperty$5 = DESCRIPTORS$
|
|
541
|
+
var createNonEnumerableProperty$5 = DESCRIPTORS$5 ? function (object, key, value) {
|
|
492
542
|
return definePropertyModule$3.f(object, key, createPropertyDescriptor$1(1, value));
|
|
493
543
|
} : function (object, key, value) {
|
|
494
544
|
object[key] = value;
|
|
@@ -497,14 +547,14 @@ var createNonEnumerableProperty$5 = DESCRIPTORS$3 ? function (object, key, value
|
|
|
497
547
|
|
|
498
548
|
var redefine$3 = {exports: {}};
|
|
499
549
|
|
|
500
|
-
var uncurryThis$
|
|
501
|
-
var isCallable$
|
|
550
|
+
var uncurryThis$6 = functionUncurryThis;
|
|
551
|
+
var isCallable$9 = isCallable$f;
|
|
502
552
|
var store$1 = sharedStore;
|
|
503
553
|
|
|
504
|
-
var functionToString = uncurryThis$
|
|
554
|
+
var functionToString = uncurryThis$6(Function.toString);
|
|
505
555
|
|
|
506
556
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
507
|
-
if (!isCallable$
|
|
557
|
+
if (!isCallable$9(store$1.inspectSource)) {
|
|
508
558
|
store$1.inspectSource = function (it) {
|
|
509
559
|
return functionToString(it);
|
|
510
560
|
};
|
|
@@ -513,12 +563,12 @@ if (!isCallable$8(store$1.inspectSource)) {
|
|
|
513
563
|
var inspectSource$2 = store$1.inspectSource;
|
|
514
564
|
|
|
515
565
|
var global$a = global$r;
|
|
516
|
-
var isCallable$
|
|
566
|
+
var isCallable$8 = isCallable$f;
|
|
517
567
|
var inspectSource$1 = inspectSource$2;
|
|
518
568
|
|
|
519
569
|
var WeakMap$1 = global$a.WeakMap;
|
|
520
570
|
|
|
521
|
-
var nativeWeakMap = isCallable$
|
|
571
|
+
var nativeWeakMap = isCallable$8(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
|
|
522
572
|
|
|
523
573
|
var shared$1 = shared$3.exports;
|
|
524
574
|
var uid = uid$2;
|
|
@@ -533,10 +583,10 @@ var hiddenKeys$4 = {};
|
|
|
533
583
|
|
|
534
584
|
var NATIVE_WEAK_MAP = nativeWeakMap;
|
|
535
585
|
var global$9 = global$r;
|
|
536
|
-
var uncurryThis$
|
|
586
|
+
var uncurryThis$5 = functionUncurryThis;
|
|
537
587
|
var isObject = isObject$5;
|
|
538
588
|
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
539
|
-
var hasOwn$
|
|
589
|
+
var hasOwn$7 = hasOwnProperty_1;
|
|
540
590
|
var shared = sharedStore;
|
|
541
591
|
var sharedKey$2 = sharedKey$3;
|
|
542
592
|
var hiddenKeys$3 = hiddenKeys$4;
|
|
@@ -561,9 +611,9 @@ var getterFor = function (TYPE) {
|
|
|
561
611
|
|
|
562
612
|
if (NATIVE_WEAK_MAP || shared.state) {
|
|
563
613
|
var store = shared.state || (shared.state = new WeakMap());
|
|
564
|
-
var wmget = uncurryThis$
|
|
565
|
-
var wmhas = uncurryThis$
|
|
566
|
-
var wmset = uncurryThis$
|
|
614
|
+
var wmget = uncurryThis$5(store.get);
|
|
615
|
+
var wmhas = uncurryThis$5(store.has);
|
|
616
|
+
var wmset = uncurryThis$5(store.set);
|
|
567
617
|
set = function (it, metadata) {
|
|
568
618
|
if (wmhas(store, it)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
569
619
|
metadata.facade = it;
|
|
@@ -580,16 +630,16 @@ if (NATIVE_WEAK_MAP || shared.state) {
|
|
|
580
630
|
var STATE = sharedKey$2('state');
|
|
581
631
|
hiddenKeys$3[STATE] = true;
|
|
582
632
|
set = function (it, metadata) {
|
|
583
|
-
if (hasOwn$
|
|
633
|
+
if (hasOwn$7(it, STATE)) throw new TypeError$2(OBJECT_ALREADY_INITIALIZED);
|
|
584
634
|
metadata.facade = it;
|
|
585
635
|
createNonEnumerableProperty$4(it, STATE, metadata);
|
|
586
636
|
return metadata;
|
|
587
637
|
};
|
|
588
638
|
get = function (it) {
|
|
589
|
-
return hasOwn$
|
|
639
|
+
return hasOwn$7(it, STATE) ? it[STATE] : {};
|
|
590
640
|
};
|
|
591
641
|
has = function (it) {
|
|
592
|
-
return hasOwn$
|
|
642
|
+
return hasOwn$7(it, STATE);
|
|
593
643
|
};
|
|
594
644
|
}
|
|
595
645
|
|
|
@@ -601,17 +651,17 @@ var internalState = {
|
|
|
601
651
|
getterFor: getterFor
|
|
602
652
|
};
|
|
603
653
|
|
|
604
|
-
var DESCRIPTORS$
|
|
605
|
-
var hasOwn$
|
|
654
|
+
var DESCRIPTORS$4 = descriptors;
|
|
655
|
+
var hasOwn$6 = hasOwnProperty_1;
|
|
606
656
|
|
|
607
657
|
var FunctionPrototype = Function.prototype;
|
|
608
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
609
|
-
var getDescriptor = DESCRIPTORS$
|
|
658
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
659
|
+
var getDescriptor = DESCRIPTORS$4 && Object.getOwnPropertyDescriptor;
|
|
610
660
|
|
|
611
|
-
var EXISTS = hasOwn$
|
|
661
|
+
var EXISTS = hasOwn$6(FunctionPrototype, 'name');
|
|
612
662
|
// additional protection from minified / mangled / dropped function names
|
|
613
663
|
var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something';
|
|
614
|
-
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$
|
|
664
|
+
var CONFIGURABLE = EXISTS && (!DESCRIPTORS$4 || (DESCRIPTORS$4 && getDescriptor(FunctionPrototype, 'name').configurable));
|
|
615
665
|
|
|
616
666
|
var functionName = {
|
|
617
667
|
EXISTS: EXISTS,
|
|
@@ -620,8 +670,8 @@ var functionName = {
|
|
|
620
670
|
};
|
|
621
671
|
|
|
622
672
|
var global$8 = global$r;
|
|
623
|
-
var isCallable$
|
|
624
|
-
var hasOwn$
|
|
673
|
+
var isCallable$7 = isCallable$f;
|
|
674
|
+
var hasOwn$5 = hasOwnProperty_1;
|
|
625
675
|
var createNonEnumerableProperty$3 = createNonEnumerableProperty$5;
|
|
626
676
|
var setGlobal$1 = setGlobal$3;
|
|
627
677
|
var inspectSource = inspectSource$2;
|
|
@@ -638,11 +688,11 @@ var TEMPLATE = String(String).split('String');
|
|
|
638
688
|
var noTargetGet = options ? !!options.noTargetGet : false;
|
|
639
689
|
var name = options && options.name !== undefined ? options.name : key;
|
|
640
690
|
var state;
|
|
641
|
-
if (isCallable$
|
|
691
|
+
if (isCallable$7(value)) {
|
|
642
692
|
if (String(name).slice(0, 7) === 'Symbol(') {
|
|
643
693
|
name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']';
|
|
644
694
|
}
|
|
645
|
-
if (!hasOwn$
|
|
695
|
+
if (!hasOwn$5(value, 'name') || (CONFIGURABLE_FUNCTION_NAME$1 && value.name !== name)) {
|
|
646
696
|
createNonEnumerableProperty$3(value, 'name', name);
|
|
647
697
|
}
|
|
648
698
|
state = enforceInternalState(value);
|
|
@@ -663,7 +713,7 @@ var TEMPLATE = String(String).split('String');
|
|
|
663
713
|
else createNonEnumerableProperty$3(O, key, value);
|
|
664
714
|
// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative
|
|
665
715
|
})(Function.prototype, 'toString', function toString() {
|
|
666
|
-
return isCallable$
|
|
716
|
+
return isCallable$7(this) && getInternalState$1(this).source || inspectSource(this);
|
|
667
717
|
});
|
|
668
718
|
|
|
669
719
|
var objectGetOwnPropertyNames = {};
|
|
@@ -715,7 +765,7 @@ var toAbsoluteIndex = toAbsoluteIndex$1;
|
|
|
715
765
|
var lengthOfArrayLike = lengthOfArrayLike$1;
|
|
716
766
|
|
|
717
767
|
// `Array.prototype.{ indexOf, includes }` methods implementation
|
|
718
|
-
var createMethod
|
|
768
|
+
var createMethod = function (IS_INCLUDES) {
|
|
719
769
|
return function ($this, el, fromIndex) {
|
|
720
770
|
var O = toIndexedObject$3($this);
|
|
721
771
|
var length = lengthOfArrayLike(O);
|
|
@@ -737,28 +787,28 @@ var createMethod$1 = function (IS_INCLUDES) {
|
|
|
737
787
|
var arrayIncludes = {
|
|
738
788
|
// `Array.prototype.includes` method
|
|
739
789
|
// https://tc39.es/ecma262/#sec-array.prototype.includes
|
|
740
|
-
includes: createMethod
|
|
790
|
+
includes: createMethod(true),
|
|
741
791
|
// `Array.prototype.indexOf` method
|
|
742
792
|
// https://tc39.es/ecma262/#sec-array.prototype.indexof
|
|
743
|
-
indexOf: createMethod
|
|
793
|
+
indexOf: createMethod(false)
|
|
744
794
|
};
|
|
745
795
|
|
|
746
|
-
var uncurryThis$
|
|
747
|
-
var hasOwn$
|
|
796
|
+
var uncurryThis$4 = functionUncurryThis;
|
|
797
|
+
var hasOwn$4 = hasOwnProperty_1;
|
|
748
798
|
var toIndexedObject$2 = toIndexedObject$5;
|
|
749
799
|
var indexOf = arrayIncludes.indexOf;
|
|
750
800
|
var hiddenKeys$2 = hiddenKeys$4;
|
|
751
801
|
|
|
752
|
-
var push = uncurryThis$
|
|
802
|
+
var push = uncurryThis$4([].push);
|
|
753
803
|
|
|
754
804
|
var objectKeysInternal = function (object, names) {
|
|
755
805
|
var O = toIndexedObject$2(object);
|
|
756
806
|
var i = 0;
|
|
757
807
|
var result = [];
|
|
758
808
|
var key;
|
|
759
|
-
for (key in O) !hasOwn$
|
|
809
|
+
for (key in O) !hasOwn$4(hiddenKeys$2, key) && hasOwn$4(O, key) && push(result, key);
|
|
760
810
|
// Don't enum bug & hidden keys
|
|
761
|
-
while (names.length > i) if (hasOwn$
|
|
811
|
+
while (names.length > i) if (hasOwn$4(O, key = names[i++])) {
|
|
762
812
|
~indexOf(result, key) || push(result, key);
|
|
763
813
|
}
|
|
764
814
|
return result;
|
|
@@ -782,23 +832,23 @@ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
|
|
|
782
832
|
|
|
783
833
|
// `Object.getOwnPropertyNames` method
|
|
784
834
|
// https://tc39.es/ecma262/#sec-object.getownpropertynames
|
|
785
|
-
// eslint-disable-next-line es/no-object-getownpropertynames -- safe
|
|
835
|
+
// eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
|
|
786
836
|
objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
|
|
787
837
|
return internalObjectKeys$1(O, hiddenKeys$1);
|
|
788
838
|
};
|
|
789
839
|
|
|
790
840
|
var objectGetOwnPropertySymbols = {};
|
|
791
841
|
|
|
792
|
-
// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
|
|
842
|
+
// eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
|
|
793
843
|
objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
|
|
794
844
|
|
|
795
845
|
var getBuiltIn$1 = getBuiltIn$4;
|
|
796
|
-
var uncurryThis$
|
|
846
|
+
var uncurryThis$3 = functionUncurryThis;
|
|
797
847
|
var getOwnPropertyNamesModule = objectGetOwnPropertyNames;
|
|
798
848
|
var getOwnPropertySymbolsModule$1 = objectGetOwnPropertySymbols;
|
|
799
849
|
var anObject$3 = anObject$5;
|
|
800
850
|
|
|
801
|
-
var concat$1 = uncurryThis$
|
|
851
|
+
var concat$1 = uncurryThis$3([].concat);
|
|
802
852
|
|
|
803
853
|
// all object keys, includes non-enumerable and symbols
|
|
804
854
|
var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
@@ -807,23 +857,25 @@ var ownKeys$1 = getBuiltIn$1('Reflect', 'ownKeys') || function ownKeys(it) {
|
|
|
807
857
|
return getOwnPropertySymbols ? concat$1(keys, getOwnPropertySymbols(it)) : keys;
|
|
808
858
|
};
|
|
809
859
|
|
|
810
|
-
var hasOwn$
|
|
860
|
+
var hasOwn$3 = hasOwnProperty_1;
|
|
811
861
|
var ownKeys = ownKeys$1;
|
|
812
862
|
var getOwnPropertyDescriptorModule = objectGetOwnPropertyDescriptor;
|
|
813
863
|
var definePropertyModule$2 = objectDefineProperty;
|
|
814
864
|
|
|
815
|
-
var copyConstructorProperties$
|
|
865
|
+
var copyConstructorProperties$2 = function (target, source, exceptions) {
|
|
816
866
|
var keys = ownKeys(source);
|
|
817
867
|
var defineProperty = definePropertyModule$2.f;
|
|
818
868
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
819
869
|
for (var i = 0; i < keys.length; i++) {
|
|
820
870
|
var key = keys[i];
|
|
821
|
-
if (!hasOwn$
|
|
871
|
+
if (!hasOwn$3(target, key) && !(exceptions && hasOwn$3(exceptions, key))) {
|
|
872
|
+
defineProperty(target, key, getOwnPropertyDescriptor(source, key));
|
|
873
|
+
}
|
|
822
874
|
}
|
|
823
875
|
};
|
|
824
876
|
|
|
825
|
-
var fails$
|
|
826
|
-
var isCallable$
|
|
877
|
+
var fails$3 = fails$a;
|
|
878
|
+
var isCallable$6 = isCallable$f;
|
|
827
879
|
|
|
828
880
|
var replacement = /#|\.prototype\./;
|
|
829
881
|
|
|
@@ -831,7 +883,7 @@ var isForced$1 = function (feature, detection) {
|
|
|
831
883
|
var value = data[normalize(feature)];
|
|
832
884
|
return value == POLYFILL ? true
|
|
833
885
|
: value == NATIVE ? false
|
|
834
|
-
: isCallable$
|
|
886
|
+
: isCallable$6(detection) ? fails$3(detection)
|
|
835
887
|
: !!detection;
|
|
836
888
|
};
|
|
837
889
|
|
|
@@ -850,7 +902,7 @@ var getOwnPropertyDescriptor = objectGetOwnPropertyDescriptor.f;
|
|
|
850
902
|
var createNonEnumerableProperty$2 = createNonEnumerableProperty$5;
|
|
851
903
|
var redefine$2 = redefine$3.exports;
|
|
852
904
|
var setGlobal = setGlobal$3;
|
|
853
|
-
var copyConstructorProperties = copyConstructorProperties$
|
|
905
|
+
var copyConstructorProperties$1 = copyConstructorProperties$2;
|
|
854
906
|
var isForced = isForced_1;
|
|
855
907
|
|
|
856
908
|
/*
|
|
@@ -890,7 +942,7 @@ var _export = function (options, source) {
|
|
|
890
942
|
// contained in target
|
|
891
943
|
if (!FORCED && targetProperty !== undefined) {
|
|
892
944
|
if (typeof sourceProperty == typeof targetProperty) continue;
|
|
893
|
-
copyConstructorProperties(sourceProperty, targetProperty);
|
|
945
|
+
copyConstructorProperties$1(sourceProperty, targetProperty);
|
|
894
946
|
}
|
|
895
947
|
// add a flag to not completely full polyfills
|
|
896
948
|
if (options.sham || (targetProperty && targetProperty.sham)) {
|
|
@@ -906,35 +958,35 @@ var enumBugKeys$1 = enumBugKeys$3;
|
|
|
906
958
|
|
|
907
959
|
// `Object.keys` method
|
|
908
960
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
909
|
-
// eslint-disable-next-line es/no-object-keys -- safe
|
|
961
|
+
// eslint-disable-next-line es-x/no-object-keys -- safe
|
|
910
962
|
var objectKeys$2 = Object.keys || function keys(O) {
|
|
911
963
|
return internalObjectKeys(O, enumBugKeys$1);
|
|
912
964
|
};
|
|
913
965
|
|
|
914
|
-
var DESCRIPTORS$
|
|
915
|
-
var uncurryThis$
|
|
966
|
+
var DESCRIPTORS$3 = descriptors;
|
|
967
|
+
var uncurryThis$2 = functionUncurryThis;
|
|
916
968
|
var call$1 = functionCall;
|
|
917
|
-
var fails$
|
|
969
|
+
var fails$2 = fails$a;
|
|
918
970
|
var objectKeys$1 = objectKeys$2;
|
|
919
971
|
var getOwnPropertySymbolsModule = objectGetOwnPropertySymbols;
|
|
920
972
|
var propertyIsEnumerableModule = objectPropertyIsEnumerable;
|
|
921
973
|
var toObject$1 = toObject$3;
|
|
922
974
|
var IndexedObject = indexedObject;
|
|
923
975
|
|
|
924
|
-
// eslint-disable-next-line es/no-object-assign -- safe
|
|
976
|
+
// eslint-disable-next-line es-x/no-object-assign -- safe
|
|
925
977
|
var $assign = Object.assign;
|
|
926
|
-
// eslint-disable-next-line es/no-object-defineproperty -- required for testing
|
|
927
|
-
var defineProperty$
|
|
928
|
-
var concat = uncurryThis$
|
|
978
|
+
// eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
|
|
979
|
+
var defineProperty$3 = Object.defineProperty;
|
|
980
|
+
var concat = uncurryThis$2([].concat);
|
|
929
981
|
|
|
930
982
|
// `Object.assign` method
|
|
931
983
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
932
|
-
var objectAssign = !$assign || fails$
|
|
984
|
+
var objectAssign = !$assign || fails$2(function () {
|
|
933
985
|
// should have correct order of operations (Edge bug)
|
|
934
|
-
if (DESCRIPTORS$
|
|
986
|
+
if (DESCRIPTORS$3 && $assign({ b: 1 }, $assign(defineProperty$3({}, 'a', {
|
|
935
987
|
enumerable: true,
|
|
936
988
|
get: function () {
|
|
937
|
-
defineProperty$
|
|
989
|
+
defineProperty$3(this, 'b', {
|
|
938
990
|
value: 3,
|
|
939
991
|
enumerable: false
|
|
940
992
|
});
|
|
@@ -943,7 +995,7 @@ var objectAssign = !$assign || fails$3(function () {
|
|
|
943
995
|
// should work with symbols and should have deterministic property order (V8 bug)
|
|
944
996
|
var A = {};
|
|
945
997
|
var B = {};
|
|
946
|
-
// eslint-disable-next-line es/no-symbol -- safe
|
|
998
|
+
// eslint-disable-next-line es-x/no-symbol -- safe
|
|
947
999
|
var symbol = Symbol();
|
|
948
1000
|
var alphabet = 'abcdefghijklmnopqrst';
|
|
949
1001
|
A[symbol] = 7;
|
|
@@ -963,7 +1015,7 @@ var objectAssign = !$assign || fails$3(function () {
|
|
|
963
1015
|
var key;
|
|
964
1016
|
while (length > j) {
|
|
965
1017
|
key = keys[j++];
|
|
966
|
-
if (!DESCRIPTORS$
|
|
1018
|
+
if (!DESCRIPTORS$3 || call$1(propertyIsEnumerable, S, key)) T[key] = S[key];
|
|
967
1019
|
}
|
|
968
1020
|
} return T;
|
|
969
1021
|
} : $assign;
|
|
@@ -973,12 +1025,12 @@ var assign = objectAssign;
|
|
|
973
1025
|
|
|
974
1026
|
// `Object.assign` method
|
|
975
1027
|
// https://tc39.es/ecma262/#sec-object.assign
|
|
976
|
-
// eslint-disable-next-line es/no-object-assign -- required for testing
|
|
1028
|
+
// eslint-disable-next-line es-x/no-object-assign -- required for testing
|
|
977
1029
|
$$2({ target: 'Object', stat: true, forced: Object.assign !== assign }, {
|
|
978
1030
|
assign: assign
|
|
979
1031
|
});
|
|
980
1032
|
|
|
981
|
-
|
|
1033
|
+
/******************************************************************************
|
|
982
1034
|
Copyright (c) Microsoft Corporation.
|
|
983
1035
|
|
|
984
1036
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -1009,11 +1061,13 @@ function Button({
|
|
|
1009
1061
|
children,
|
|
1010
1062
|
variant,
|
|
1011
1063
|
onClick,
|
|
1064
|
+
disabled,
|
|
1012
1065
|
active = false,
|
|
1013
1066
|
type = 'button'
|
|
1014
1067
|
}) {
|
|
1015
1068
|
const props = {
|
|
1016
|
-
type
|
|
1069
|
+
type,
|
|
1070
|
+
disabled
|
|
1017
1071
|
};
|
|
1018
1072
|
const classNames = [];
|
|
1019
1073
|
if (variant) classNames.push(variant);
|
|
@@ -1022,7 +1076,7 @@ function Button({
|
|
|
1022
1076
|
if (onClick) props.onClick = onClick;
|
|
1023
1077
|
return jsx("button", Object.assign({}, props, {
|
|
1024
1078
|
children: children
|
|
1025
|
-
})
|
|
1079
|
+
}));
|
|
1026
1080
|
}
|
|
1027
1081
|
|
|
1028
1082
|
const ModalHeader = ({
|
|
@@ -1038,7 +1092,7 @@ const ModalHeader = ({
|
|
|
1038
1092
|
}, {
|
|
1039
1093
|
children: [jsx("h3", {
|
|
1040
1094
|
children: _header
|
|
1041
|
-
}
|
|
1095
|
+
}), jsx("button", Object.assign({
|
|
1042
1096
|
className: "close",
|
|
1043
1097
|
onClick: handleClose
|
|
1044
1098
|
}, {
|
|
@@ -1046,9 +1100,9 @@ const ModalHeader = ({
|
|
|
1046
1100
|
className: "sr-only"
|
|
1047
1101
|
}, {
|
|
1048
1102
|
children: "Close"
|
|
1049
|
-
})
|
|
1050
|
-
})
|
|
1051
|
-
})
|
|
1103
|
+
}))
|
|
1104
|
+
}))]
|
|
1105
|
+
}));
|
|
1052
1106
|
};
|
|
1053
1107
|
|
|
1054
1108
|
const ModalBody = ({
|
|
@@ -1058,7 +1112,7 @@ const ModalBody = ({
|
|
|
1058
1112
|
className: "body"
|
|
1059
1113
|
}, {
|
|
1060
1114
|
children: children
|
|
1061
|
-
})
|
|
1115
|
+
}));
|
|
1062
1116
|
};
|
|
1063
1117
|
|
|
1064
1118
|
const ModalFooter = ({
|
|
@@ -1086,13 +1140,13 @@ const ModalFooter = ({
|
|
|
1086
1140
|
onClick: handleDismiss
|
|
1087
1141
|
}, {
|
|
1088
1142
|
children: dismiss
|
|
1089
|
-
})
|
|
1143
|
+
})), confirm && jsx(Button, Object.assign({
|
|
1090
1144
|
variant: "primary",
|
|
1091
1145
|
onClick: handleConfirm
|
|
1092
1146
|
}, {
|
|
1093
1147
|
children: confirm
|
|
1094
|
-
})
|
|
1095
|
-
})
|
|
1148
|
+
}))]
|
|
1149
|
+
}));
|
|
1096
1150
|
};
|
|
1097
1151
|
|
|
1098
1152
|
const Modal = _a => {
|
|
@@ -1102,14 +1156,44 @@ const Modal = _a => {
|
|
|
1102
1156
|
} = _a,
|
|
1103
1157
|
props = __rest(_a, ["type", "isOpen"]);
|
|
1104
1158
|
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1159
|
+
const modalContent = () => {
|
|
1160
|
+
switch (type) {
|
|
1161
|
+
case 'slideout':
|
|
1162
|
+
{
|
|
1163
|
+
return jsxs("aside", Object.assign({
|
|
1164
|
+
role: "dialog"
|
|
1165
|
+
}, {
|
|
1166
|
+
children: [jsx(ModalHeader, Object.assign({}, props)), jsx(ModalBody, Object.assign({}, props)), jsx(ModalFooter, Object.assign({}, props))]
|
|
1167
|
+
}));
|
|
1168
|
+
}
|
|
1169
|
+
|
|
1170
|
+
case 'takeover':
|
|
1171
|
+
{
|
|
1172
|
+
return jsxs("main", Object.assign({
|
|
1173
|
+
role: "dialog"
|
|
1174
|
+
}, {
|
|
1175
|
+
children: [jsx(ModalHeader, Object.assign({}, props)), jsx(ModalBody, Object.assign({}, props)), jsx(ModalFooter, Object.assign({}, props))]
|
|
1176
|
+
}));
|
|
1177
|
+
}
|
|
1178
|
+
|
|
1179
|
+
default:
|
|
1180
|
+
{
|
|
1181
|
+
return jsxs("section", Object.assign({
|
|
1182
|
+
role: "dialog"
|
|
1183
|
+
}, {
|
|
1184
|
+
children: [jsx(ModalHeader, Object.assign({}, props)), jsx(ModalBody, Object.assign({}, props)), jsx(ModalFooter, Object.assign({}, props))]
|
|
1185
|
+
}));
|
|
1186
|
+
}
|
|
1187
|
+
}
|
|
1188
|
+
};
|
|
1189
|
+
|
|
1190
|
+
return isOpen ? modalContent() : null;
|
|
1110
1191
|
};
|
|
1111
1192
|
|
|
1112
|
-
var
|
|
1193
|
+
var objectDefineProperties = {};
|
|
1194
|
+
|
|
1195
|
+
var DESCRIPTORS$2 = descriptors;
|
|
1196
|
+
var V8_PROTOTYPE_DEFINE_BUG = v8PrototypeDefineBug;
|
|
1113
1197
|
var definePropertyModule$1 = objectDefineProperty;
|
|
1114
1198
|
var anObject$2 = anObject$5;
|
|
1115
1199
|
var toIndexedObject$1 = toIndexedObject$5;
|
|
@@ -1117,8 +1201,8 @@ var objectKeys = objectKeys$2;
|
|
|
1117
1201
|
|
|
1118
1202
|
// `Object.defineProperties` method
|
|
1119
1203
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
1120
|
-
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
1121
|
-
|
|
1204
|
+
// eslint-disable-next-line es-x/no-object-defineproperties -- safe
|
|
1205
|
+
objectDefineProperties.f = DESCRIPTORS$2 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
|
|
1122
1206
|
anObject$2(O);
|
|
1123
1207
|
var props = toIndexedObject$1(Properties);
|
|
1124
1208
|
var keys = objectKeys(Properties);
|
|
@@ -1136,7 +1220,7 @@ var html$1 = getBuiltIn('document', 'documentElement');
|
|
|
1136
1220
|
/* global ActiveXObject -- old IE, WSH */
|
|
1137
1221
|
|
|
1138
1222
|
var anObject$1 = anObject$5;
|
|
1139
|
-
var
|
|
1223
|
+
var definePropertiesModule = objectDefineProperties;
|
|
1140
1224
|
var enumBugKeys = enumBugKeys$3;
|
|
1141
1225
|
var hiddenKeys = hiddenKeys$4;
|
|
1142
1226
|
var html = html$1;
|
|
@@ -1205,6 +1289,7 @@ hiddenKeys[IE_PROTO$1] = true;
|
|
|
1205
1289
|
|
|
1206
1290
|
// `Object.create` method
|
|
1207
1291
|
// https://tc39.es/ecma262/#sec-object.create
|
|
1292
|
+
// eslint-disable-next-line es-x/no-object-create -- safe
|
|
1208
1293
|
var objectCreate = Object.create || function create(O, Properties) {
|
|
1209
1294
|
var result;
|
|
1210
1295
|
if (O !== null) {
|
|
@@ -1214,7 +1299,7 @@ var objectCreate = Object.create || function create(O, Properties) {
|
|
|
1214
1299
|
// add "__proto__" for Object.getPrototypeOf polyfill
|
|
1215
1300
|
result[IE_PROTO$1] = O;
|
|
1216
1301
|
} else result = NullProtoObject();
|
|
1217
|
-
return Properties === undefined ? result :
|
|
1302
|
+
return Properties === undefined ? result : definePropertiesModule.f(result, Properties);
|
|
1218
1303
|
};
|
|
1219
1304
|
|
|
1220
1305
|
var wellKnownSymbol$6 = wellKnownSymbol$8;
|
|
@@ -1240,18 +1325,18 @@ var addToUnscopables$1 = function (key) {
|
|
|
1240
1325
|
|
|
1241
1326
|
var iterators = {};
|
|
1242
1327
|
|
|
1243
|
-
var fails$
|
|
1328
|
+
var fails$1 = fails$a;
|
|
1244
1329
|
|
|
1245
|
-
var correctPrototypeGetter = !fails$
|
|
1330
|
+
var correctPrototypeGetter = !fails$1(function () {
|
|
1246
1331
|
function F() { /* empty */ }
|
|
1247
1332
|
F.prototype.constructor = null;
|
|
1248
|
-
// eslint-disable-next-line es/no-object-getprototypeof -- required for testing
|
|
1333
|
+
// eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
|
|
1249
1334
|
return Object.getPrototypeOf(new F()) !== F.prototype;
|
|
1250
1335
|
});
|
|
1251
1336
|
|
|
1252
1337
|
var global$6 = global$r;
|
|
1253
|
-
var hasOwn$
|
|
1254
|
-
var isCallable$
|
|
1338
|
+
var hasOwn$2 = hasOwnProperty_1;
|
|
1339
|
+
var isCallable$5 = isCallable$f;
|
|
1255
1340
|
var toObject = toObject$3;
|
|
1256
1341
|
var sharedKey = sharedKey$3;
|
|
1257
1342
|
var CORRECT_PROTOTYPE_GETTER = correctPrototypeGetter;
|
|
@@ -1264,27 +1349,27 @@ var ObjectPrototype = Object$2.prototype;
|
|
|
1264
1349
|
// https://tc39.es/ecma262/#sec-object.getprototypeof
|
|
1265
1350
|
var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? Object$2.getPrototypeOf : function (O) {
|
|
1266
1351
|
var object = toObject(O);
|
|
1267
|
-
if (hasOwn$
|
|
1352
|
+
if (hasOwn$2(object, IE_PROTO)) return object[IE_PROTO];
|
|
1268
1353
|
var constructor = object.constructor;
|
|
1269
|
-
if (isCallable$
|
|
1354
|
+
if (isCallable$5(constructor) && object instanceof constructor) {
|
|
1270
1355
|
return constructor.prototype;
|
|
1271
1356
|
} return object instanceof Object$2 ? ObjectPrototype : null;
|
|
1272
1357
|
};
|
|
1273
1358
|
|
|
1274
|
-
var fails
|
|
1275
|
-
var isCallable$
|
|
1359
|
+
var fails = fails$a;
|
|
1360
|
+
var isCallable$4 = isCallable$f;
|
|
1276
1361
|
var getPrototypeOf$1 = objectGetPrototypeOf;
|
|
1277
1362
|
var redefine$1 = redefine$3.exports;
|
|
1278
1363
|
var wellKnownSymbol$5 = wellKnownSymbol$8;
|
|
1279
1364
|
|
|
1280
|
-
var ITERATOR$
|
|
1365
|
+
var ITERATOR$2 = wellKnownSymbol$5('iterator');
|
|
1281
1366
|
var BUGGY_SAFARI_ITERATORS$1 = false;
|
|
1282
1367
|
|
|
1283
1368
|
// `%IteratorPrototype%` object
|
|
1284
1369
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-object
|
|
1285
1370
|
var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
|
|
1286
1371
|
|
|
1287
|
-
/* eslint-disable es/no-array-prototype-keys -- safe */
|
|
1372
|
+
/* eslint-disable es-x/no-array-prototype-keys -- safe */
|
|
1288
1373
|
if ([].keys) {
|
|
1289
1374
|
arrayIterator = [].keys();
|
|
1290
1375
|
// Safari 8 has buggy iterators w/o `next`
|
|
@@ -1295,18 +1380,18 @@ if ([].keys) {
|
|
|
1295
1380
|
}
|
|
1296
1381
|
}
|
|
1297
1382
|
|
|
1298
|
-
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails
|
|
1383
|
+
var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails(function () {
|
|
1299
1384
|
var test = {};
|
|
1300
1385
|
// FF44- legacy iterators case
|
|
1301
|
-
return IteratorPrototype$2[ITERATOR$
|
|
1386
|
+
return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
|
|
1302
1387
|
});
|
|
1303
1388
|
|
|
1304
1389
|
if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype$2 = {};
|
|
1305
1390
|
|
|
1306
1391
|
// `%IteratorPrototype%[@@iterator]()` method
|
|
1307
1392
|
// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
|
|
1308
|
-
if (!isCallable$
|
|
1309
|
-
redefine$1(IteratorPrototype$2, ITERATOR$
|
|
1393
|
+
if (!isCallable$4(IteratorPrototype$2[ITERATOR$2])) {
|
|
1394
|
+
redefine$1(IteratorPrototype$2, ITERATOR$2, function () {
|
|
1310
1395
|
return this;
|
|
1311
1396
|
});
|
|
1312
1397
|
}
|
|
@@ -1316,15 +1401,16 @@ var iteratorsCore = {
|
|
|
1316
1401
|
BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS$1
|
|
1317
1402
|
};
|
|
1318
1403
|
|
|
1319
|
-
var defineProperty = objectDefineProperty.f;
|
|
1320
|
-
var hasOwn = hasOwnProperty_1;
|
|
1404
|
+
var defineProperty$2 = objectDefineProperty.f;
|
|
1405
|
+
var hasOwn$1 = hasOwnProperty_1;
|
|
1321
1406
|
var wellKnownSymbol$4 = wellKnownSymbol$8;
|
|
1322
1407
|
|
|
1323
1408
|
var TO_STRING_TAG$3 = wellKnownSymbol$4('toStringTag');
|
|
1324
1409
|
|
|
1325
|
-
var setToStringTag$2 = function (
|
|
1326
|
-
if (
|
|
1327
|
-
|
|
1410
|
+
var setToStringTag$2 = function (target, TAG, STATIC) {
|
|
1411
|
+
if (target && !STATIC) target = target.prototype;
|
|
1412
|
+
if (target && !hasOwn$1(target, TO_STRING_TAG$3)) {
|
|
1413
|
+
defineProperty$2(target, TO_STRING_TAG$3, { configurable: true, value: TAG });
|
|
1328
1414
|
}
|
|
1329
1415
|
};
|
|
1330
1416
|
|
|
@@ -1345,33 +1431,33 @@ var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENU
|
|
|
1345
1431
|
};
|
|
1346
1432
|
|
|
1347
1433
|
var global$5 = global$r;
|
|
1348
|
-
var isCallable$
|
|
1434
|
+
var isCallable$3 = isCallable$f;
|
|
1349
1435
|
|
|
1350
1436
|
var String$2 = global$5.String;
|
|
1351
1437
|
var TypeError$1 = global$5.TypeError;
|
|
1352
1438
|
|
|
1353
1439
|
var aPossiblePrototype$1 = function (argument) {
|
|
1354
|
-
if (typeof argument == 'object' || isCallable$
|
|
1440
|
+
if (typeof argument == 'object' || isCallable$3(argument)) return argument;
|
|
1355
1441
|
throw TypeError$1("Can't set " + String$2(argument) + ' as a prototype');
|
|
1356
1442
|
};
|
|
1357
1443
|
|
|
1358
1444
|
/* eslint-disable no-proto -- safe */
|
|
1359
1445
|
|
|
1360
|
-
var uncurryThis$
|
|
1446
|
+
var uncurryThis$1 = functionUncurryThis;
|
|
1361
1447
|
var anObject = anObject$5;
|
|
1362
1448
|
var aPossiblePrototype = aPossiblePrototype$1;
|
|
1363
1449
|
|
|
1364
1450
|
// `Object.setPrototypeOf` method
|
|
1365
1451
|
// https://tc39.es/ecma262/#sec-object.setprototypeof
|
|
1366
1452
|
// Works with __proto__ only. Old v8 can't work with null proto objects.
|
|
1367
|
-
// eslint-disable-next-line es/no-object-setprototypeof -- safe
|
|
1453
|
+
// eslint-disable-next-line es-x/no-object-setprototypeof -- safe
|
|
1368
1454
|
var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
|
|
1369
1455
|
var CORRECT_SETTER = false;
|
|
1370
1456
|
var test = {};
|
|
1371
1457
|
var setter;
|
|
1372
1458
|
try {
|
|
1373
|
-
// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
|
|
1374
|
-
setter = uncurryThis$
|
|
1459
|
+
// eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
|
|
1460
|
+
setter = uncurryThis$1(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
|
|
1375
1461
|
setter(test, []);
|
|
1376
1462
|
CORRECT_SETTER = test instanceof Array;
|
|
1377
1463
|
} catch (error) { /* empty */ }
|
|
@@ -1387,7 +1473,7 @@ var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? functio
|
|
|
1387
1473
|
var $$1 = _export;
|
|
1388
1474
|
var call = functionCall;
|
|
1389
1475
|
var FunctionName = functionName;
|
|
1390
|
-
var isCallable$
|
|
1476
|
+
var isCallable$2 = isCallable$f;
|
|
1391
1477
|
var createIteratorConstructor = createIteratorConstructor$1;
|
|
1392
1478
|
var getPrototypeOf = objectGetPrototypeOf;
|
|
1393
1479
|
var setPrototypeOf = objectSetPrototypeOf;
|
|
@@ -1402,7 +1488,7 @@ var PROPER_FUNCTION_NAME = FunctionName.PROPER;
|
|
|
1402
1488
|
var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE;
|
|
1403
1489
|
var IteratorPrototype = IteratorsCore.IteratorPrototype;
|
|
1404
1490
|
var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;
|
|
1405
|
-
var ITERATOR$
|
|
1491
|
+
var ITERATOR$1 = wellKnownSymbol$3('iterator');
|
|
1406
1492
|
var KEYS = 'keys';
|
|
1407
1493
|
var VALUES = 'values';
|
|
1408
1494
|
var ENTRIES = 'entries';
|
|
@@ -1425,7 +1511,7 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1425
1511
|
var TO_STRING_TAG = NAME + ' Iterator';
|
|
1426
1512
|
var INCORRECT_VALUES_NAME = false;
|
|
1427
1513
|
var IterablePrototype = Iterable.prototype;
|
|
1428
|
-
var nativeIterator = IterablePrototype[ITERATOR$
|
|
1514
|
+
var nativeIterator = IterablePrototype[ITERATOR$1]
|
|
1429
1515
|
|| IterablePrototype['@@iterator']
|
|
1430
1516
|
|| DEFAULT && IterablePrototype[DEFAULT];
|
|
1431
1517
|
var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);
|
|
@@ -1439,8 +1525,8 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1439
1525
|
if (getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {
|
|
1440
1526
|
if (setPrototypeOf) {
|
|
1441
1527
|
setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);
|
|
1442
|
-
} else if (!isCallable$
|
|
1443
|
-
redefine(CurrentIteratorPrototype, ITERATOR$
|
|
1528
|
+
} else if (!isCallable$2(CurrentIteratorPrototype[ITERATOR$1])) {
|
|
1529
|
+
redefine(CurrentIteratorPrototype, ITERATOR$1, returnThis);
|
|
1444
1530
|
}
|
|
1445
1531
|
}
|
|
1446
1532
|
// Set @@toStringTag to native iterators
|
|
@@ -1473,8 +1559,8 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
|
|
|
1473
1559
|
}
|
|
1474
1560
|
|
|
1475
1561
|
// define iterator
|
|
1476
|
-
if (IterablePrototype[ITERATOR$
|
|
1477
|
-
redefine(IterablePrototype, ITERATOR$
|
|
1562
|
+
if (IterablePrototype[ITERATOR$1] !== defaultIterator) {
|
|
1563
|
+
redefine(IterablePrototype, ITERATOR$1, defaultIterator, { name: DEFAULT });
|
|
1478
1564
|
}
|
|
1479
1565
|
Iterators$1[NAME] = defaultIterator;
|
|
1480
1566
|
|
|
@@ -1485,7 +1571,9 @@ var toIndexedObject = toIndexedObject$5;
|
|
|
1485
1571
|
var addToUnscopables = addToUnscopables$1;
|
|
1486
1572
|
var Iterators = iterators;
|
|
1487
1573
|
var InternalStateModule = internalState;
|
|
1574
|
+
var defineProperty$1 = objectDefineProperty.f;
|
|
1488
1575
|
var defineIterator = defineIterator$1;
|
|
1576
|
+
var DESCRIPTORS$1 = descriptors;
|
|
1489
1577
|
|
|
1490
1578
|
var ARRAY_ITERATOR = 'Array Iterator';
|
|
1491
1579
|
var setInternalState = InternalStateModule.set;
|
|
@@ -1527,13 +1615,18 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
|
|
|
1527
1615
|
// argumentsList[@@iterator] is %ArrayProto_values%
|
|
1528
1616
|
// https://tc39.es/ecma262/#sec-createunmappedargumentsobject
|
|
1529
1617
|
// https://tc39.es/ecma262/#sec-createmappedargumentsobject
|
|
1530
|
-
Iterators.Arguments = Iterators.Array;
|
|
1618
|
+
var values = Iterators.Arguments = Iterators.Array;
|
|
1531
1619
|
|
|
1532
1620
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
1533
1621
|
addToUnscopables('keys');
|
|
1534
1622
|
addToUnscopables('values');
|
|
1535
1623
|
addToUnscopables('entries');
|
|
1536
1624
|
|
|
1625
|
+
// V8 ~ Chrome 45- bug
|
|
1626
|
+
if (DESCRIPTORS$1 && values.name !== 'values') try {
|
|
1627
|
+
defineProperty$1(values, 'name', { value: 'values' });
|
|
1628
|
+
} catch (error) { /* empty */ }
|
|
1629
|
+
|
|
1537
1630
|
// iterable DOM collections
|
|
1538
1631
|
// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
|
|
1539
1632
|
var domIterables = {
|
|
@@ -1585,17 +1678,17 @@ var ArrayIteratorMethods = es_array_iterator;
|
|
|
1585
1678
|
var createNonEnumerableProperty = createNonEnumerableProperty$5;
|
|
1586
1679
|
var wellKnownSymbol$2 = wellKnownSymbol$8;
|
|
1587
1680
|
|
|
1588
|
-
var ITERATOR
|
|
1681
|
+
var ITERATOR = wellKnownSymbol$2('iterator');
|
|
1589
1682
|
var TO_STRING_TAG$2 = wellKnownSymbol$2('toStringTag');
|
|
1590
1683
|
var ArrayValues = ArrayIteratorMethods.values;
|
|
1591
1684
|
|
|
1592
1685
|
var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) {
|
|
1593
1686
|
if (CollectionPrototype) {
|
|
1594
1687
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
1595
|
-
if (CollectionPrototype[ITERATOR
|
|
1596
|
-
createNonEnumerableProperty(CollectionPrototype, ITERATOR
|
|
1688
|
+
if (CollectionPrototype[ITERATOR] !== ArrayValues) try {
|
|
1689
|
+
createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues);
|
|
1597
1690
|
} catch (error) {
|
|
1598
|
-
CollectionPrototype[ITERATOR
|
|
1691
|
+
CollectionPrototype[ITERATOR] = ArrayValues;
|
|
1599
1692
|
}
|
|
1600
1693
|
if (!CollectionPrototype[TO_STRING_TAG$2]) {
|
|
1601
1694
|
createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG$2, COLLECTION_NAME);
|
|
@@ -1617,46 +1710,45 @@ for (var COLLECTION_NAME in DOMIterables) {
|
|
|
1617
1710
|
|
|
1618
1711
|
handlePrototype(DOMTokenListPrototype, 'DOMTokenList');
|
|
1619
1712
|
|
|
1620
|
-
const Flexbox =
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1713
|
+
const Flexbox = _a => {
|
|
1714
|
+
var {
|
|
1715
|
+
alignContent,
|
|
1716
|
+
alignItems,
|
|
1717
|
+
alignSelf,
|
|
1718
|
+
children,
|
|
1719
|
+
justifyContent,
|
|
1720
|
+
flexDirection,
|
|
1721
|
+
flexWrap,
|
|
1722
|
+
className
|
|
1723
|
+
} = _a,
|
|
1724
|
+
props = __rest(_a, ["alignContent", "alignItems", "alignSelf", "children", "justifyContent", "flexDirection", "flexWrap", "className"]);
|
|
1725
|
+
|
|
1627
1726
|
const [classes, setClasses] = useState(['d-flex']);
|
|
1628
|
-
const [
|
|
1727
|
+
const [flexClassName, setFlexClassName] = useState('d-flex'); // // update className when classes change
|
|
1629
1728
|
|
|
1630
|
-
|
|
1729
|
+
useLayoutEffect(() => {
|
|
1631
1730
|
const newClassName = classes.join(' ');
|
|
1632
|
-
if (newClassName !==
|
|
1633
|
-
}, [classes,
|
|
1731
|
+
if (newClassName !== flexClassName) setFlexClassName(newClassName);
|
|
1732
|
+
}, [classes, flexClassName]); // // update classes when props change
|
|
1634
1733
|
|
|
1635
|
-
|
|
1734
|
+
useLayoutEffect(() => {
|
|
1636
1735
|
const newClasses = ['d-flex'];
|
|
1637
|
-
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1736
|
+
alignItems && newClasses.push(`align-items-${alignItems}`);
|
|
1737
|
+
alignContent && newClasses.push(`align-content-${alignContent}`);
|
|
1738
|
+
alignSelf && newClasses.push(`align-self-${alignSelf}`);
|
|
1739
|
+
justifyContent && newClasses.push(`justify-content-${justifyContent}`);
|
|
1740
|
+
flexDirection && newClasses.push(`flex-${flexDirection}`);
|
|
1741
|
+
flexWrap && newClasses.push(`flex-${flexWrap}`);
|
|
1742
|
+
className && newClasses.push(className);
|
|
1641
1743
|
setClasses(newClasses);
|
|
1642
|
-
}, [alignContent, alignItems, alignSelf, justifyContent]);
|
|
1744
|
+
}, [alignContent, alignItems, alignSelf, justifyContent, flexDirection, flexWrap, className]);
|
|
1643
1745
|
return jsx("div", Object.assign({
|
|
1644
|
-
className:
|
|
1645
|
-
}, {
|
|
1746
|
+
className: flexClassName
|
|
1747
|
+
}, props, {
|
|
1646
1748
|
children: children
|
|
1647
|
-
})
|
|
1749
|
+
}));
|
|
1648
1750
|
};
|
|
1649
1751
|
|
|
1650
|
-
function Group({
|
|
1651
|
-
children
|
|
1652
|
-
}) {
|
|
1653
|
-
return jsx("div", Object.assign({
|
|
1654
|
-
className: "group"
|
|
1655
|
-
}, {
|
|
1656
|
-
children: children
|
|
1657
|
-
}), void 0);
|
|
1658
|
-
}
|
|
1659
|
-
|
|
1660
1752
|
function Card({
|
|
1661
1753
|
children,
|
|
1662
1754
|
header,
|
|
@@ -1667,12 +1759,10 @@ function Card({
|
|
|
1667
1759
|
}, {
|
|
1668
1760
|
children: [jsx("header", {
|
|
1669
1761
|
children: header
|
|
1670
|
-
},
|
|
1671
|
-
children: children
|
|
1672
|
-
}, void 0), jsx("footer", {
|
|
1762
|
+
}), children, jsx("footer", {
|
|
1673
1763
|
children: footer
|
|
1674
|
-
}
|
|
1675
|
-
})
|
|
1764
|
+
})]
|
|
1765
|
+
}));
|
|
1676
1766
|
}
|
|
1677
1767
|
|
|
1678
1768
|
function Alert({
|
|
@@ -1695,10 +1785,10 @@ function Alert({
|
|
|
1695
1785
|
className: "sr-only"
|
|
1696
1786
|
}, {
|
|
1697
1787
|
children: closeText
|
|
1698
|
-
})
|
|
1699
|
-
})
|
|
1788
|
+
}))
|
|
1789
|
+
})));else setCloseButton(jsx("button", {
|
|
1700
1790
|
className: "close"
|
|
1701
|
-
}
|
|
1791
|
+
}));
|
|
1702
1792
|
}
|
|
1703
1793
|
}, [isCloseable, closeText]);
|
|
1704
1794
|
return jsxs("div", Object.assign({
|
|
@@ -1708,13 +1798,13 @@ function Alert({
|
|
|
1708
1798
|
children: [header && jsxs("header", {
|
|
1709
1799
|
children: [/*#__PURE__*/React.isValidElement(header) ? header : jsx("h3", {
|
|
1710
1800
|
children: header
|
|
1711
|
-
}
|
|
1712
|
-
}
|
|
1801
|
+
}), closeButton]
|
|
1802
|
+
}), jsx("p", {
|
|
1713
1803
|
children: children
|
|
1714
|
-
}
|
|
1804
|
+
}), footer && jsx("footer", {
|
|
1715
1805
|
children: footer
|
|
1716
|
-
}
|
|
1717
|
-
})
|
|
1806
|
+
})]
|
|
1807
|
+
}));
|
|
1718
1808
|
}
|
|
1719
1809
|
|
|
1720
1810
|
const ButtonGroup = ({
|
|
@@ -1742,149 +1832,220 @@ const ButtonGroup = ({
|
|
|
1742
1832
|
}, [children, selected, variant]);
|
|
1743
1833
|
return jsx(Group, {
|
|
1744
1834
|
children: buttons.map(props => jsx(Button, Object.assign({}, props), props.key))
|
|
1745
|
-
}
|
|
1835
|
+
});
|
|
1746
1836
|
};
|
|
1747
1837
|
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
}
|
|
1753
|
-
return jsx("form", Object.assign({
|
|
1754
|
-
className: [direction, `size-${formSize}`].join(' ')
|
|
1755
|
-
}, {
|
|
1756
|
-
children: children
|
|
1757
|
-
}), void 0);
|
|
1758
|
-
}
|
|
1759
|
-
|
|
1760
|
-
var wellKnownSymbol$1 = wellKnownSymbol$8;
|
|
1761
|
-
|
|
1762
|
-
var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
|
|
1763
|
-
var test = {};
|
|
1764
|
-
|
|
1765
|
-
test[TO_STRING_TAG$1] = 'z';
|
|
1766
|
-
|
|
1767
|
-
var toStringTagSupport = String(test) === '[object z]';
|
|
1838
|
+
const validateInputValue = (target, rules, setError) => {
|
|
1839
|
+
const errorMessage = validateInputValueErrors(rules, target);
|
|
1840
|
+
errorMessage ? setErrorInsert(setError, target.name) : setErrorRemove(setError, target.name);
|
|
1841
|
+
return errorMessage;
|
|
1842
|
+
};
|
|
1768
1843
|
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
var wellKnownSymbol = wellKnownSymbol$8;
|
|
1844
|
+
const validateInputValueErrors = (rules, target) => {
|
|
1845
|
+
const {
|
|
1846
|
+
value
|
|
1847
|
+
} = target;
|
|
1774
1848
|
|
|
1775
|
-
|
|
1776
|
-
|
|
1849
|
+
if ((rules === null || rules === void 0 ? void 0 : rules.custom) instanceof Function) {
|
|
1850
|
+
return rules === null || rules === void 0 ? void 0 : rules.custom();
|
|
1851
|
+
}
|
|
1777
1852
|
|
|
1778
|
-
|
|
1779
|
-
|
|
1853
|
+
return validateTextInputValues(value, rules);
|
|
1854
|
+
};
|
|
1780
1855
|
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1856
|
+
const setErrorInsert = (setError, name) => {
|
|
1857
|
+
setError(errors => {
|
|
1858
|
+
return Object.assign(Object.assign({}, errors), {
|
|
1859
|
+
[name]: true
|
|
1860
|
+
});
|
|
1861
|
+
});
|
|
1786
1862
|
};
|
|
1787
1863
|
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
// builtinTag case
|
|
1795
|
-
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
1796
|
-
// ES3 arguments fallback
|
|
1797
|
-
: (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result;
|
|
1864
|
+
const setErrorRemove = (setError, name) => {
|
|
1865
|
+
setError(errors => {
|
|
1866
|
+
const newError = Object.assign({}, errors);
|
|
1867
|
+
delete newError[name];
|
|
1868
|
+
return newError;
|
|
1869
|
+
});
|
|
1798
1870
|
};
|
|
1799
1871
|
|
|
1800
|
-
|
|
1801
|
-
|
|
1872
|
+
const validateTextInputValues = (value, rules) => {
|
|
1873
|
+
switch (rules === null || rules === void 0 ? void 0 : rules.type) {
|
|
1874
|
+
case 'Required':
|
|
1875
|
+
{
|
|
1876
|
+
return value === '' || value === undefined || value === null ? 'error' : null;
|
|
1877
|
+
}
|
|
1802
1878
|
|
|
1803
|
-
|
|
1879
|
+
default:
|
|
1880
|
+
{
|
|
1881
|
+
return;
|
|
1882
|
+
}
|
|
1883
|
+
}
|
|
1884
|
+
};
|
|
1804
1885
|
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
return
|
|
1886
|
+
const FormContext = /*#__PURE__*/React.createContext({});
|
|
1887
|
+
const useFormContext = () => {
|
|
1888
|
+
return React.useContext(FormContext);
|
|
1808
1889
|
};
|
|
1890
|
+
const FormProvider = _a => {
|
|
1891
|
+
var {
|
|
1892
|
+
children,
|
|
1893
|
+
direction = 'vertical',
|
|
1894
|
+
formSize = 'md',
|
|
1895
|
+
onSubmit,
|
|
1896
|
+
onFormSubmit
|
|
1897
|
+
} = _a,
|
|
1898
|
+
props = __rest(_a, ["children", "direction", "formSize", "onSubmit", "onFormSubmit"]);
|
|
1899
|
+
|
|
1900
|
+
const [values, setValues] = React.useState();
|
|
1901
|
+
const [errors, setErrors] = React.useState();
|
|
1902
|
+
const [fields, setFields] = React.useState({});
|
|
1903
|
+
|
|
1904
|
+
const formSubmit = event => {
|
|
1905
|
+
let hasError = false;
|
|
1906
|
+
event.preventDefault();
|
|
1907
|
+
Object.keys(fields).forEach(key => {
|
|
1908
|
+
const errorMessage = validateInputValue({
|
|
1909
|
+
name: key,
|
|
1910
|
+
value: values === null || values === void 0 ? void 0 : values[key]
|
|
1911
|
+
}, fields[key], setErrors);
|
|
1912
|
+
hasError = hasError || !!errorMessage;
|
|
1913
|
+
});
|
|
1809
1914
|
|
|
1810
|
-
|
|
1811
|
-
|
|
1812
|
-
|
|
1915
|
+
if (!hasError) {
|
|
1916
|
+
onFormSubmit && onFormSubmit(values);
|
|
1917
|
+
}
|
|
1918
|
+
};
|
|
1813
1919
|
|
|
1814
|
-
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
var whitespaces$1 = whitespaces$2;
|
|
1818
|
-
|
|
1819
|
-
var replace = uncurryThis$1(''.replace);
|
|
1820
|
-
var whitespace = '[' + whitespaces$1 + ']';
|
|
1821
|
-
var ltrim = RegExp('^' + whitespace + whitespace + '*');
|
|
1822
|
-
var rtrim = RegExp(whitespace + whitespace + '*$');
|
|
1823
|
-
|
|
1824
|
-
// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation
|
|
1825
|
-
var createMethod = function (TYPE) {
|
|
1826
|
-
return function ($this) {
|
|
1827
|
-
var string = toString$1(requireObjectCoercible($this));
|
|
1828
|
-
if (TYPE & 1) string = replace(string, ltrim, '');
|
|
1829
|
-
if (TYPE & 2) string = replace(string, rtrim, '');
|
|
1830
|
-
return string;
|
|
1920
|
+
const resetForm = () => {
|
|
1921
|
+
setValues({});
|
|
1922
|
+
setErrors({});
|
|
1831
1923
|
};
|
|
1924
|
+
|
|
1925
|
+
return jsx(FormContext.Provider, Object.assign({
|
|
1926
|
+
value: {
|
|
1927
|
+
setValues,
|
|
1928
|
+
setErrors,
|
|
1929
|
+
setFields,
|
|
1930
|
+
errors,
|
|
1931
|
+
values
|
|
1932
|
+
}
|
|
1933
|
+
}, {
|
|
1934
|
+
children: jsx("form", Object.assign({
|
|
1935
|
+
className: [direction, `size-${formSize}`].join(' '),
|
|
1936
|
+
onSubmit: formSubmit
|
|
1937
|
+
}, props, {
|
|
1938
|
+
onReset: resetForm
|
|
1939
|
+
}, {
|
|
1940
|
+
children: children
|
|
1941
|
+
}))
|
|
1942
|
+
}));
|
|
1832
1943
|
};
|
|
1833
1944
|
|
|
1834
|
-
|
|
1835
|
-
|
|
1836
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimstart
|
|
1837
|
-
start: createMethod(1),
|
|
1838
|
-
// `String.prototype.{ trimRight, trimEnd }` methods
|
|
1839
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trimend
|
|
1840
|
-
end: createMethod(2),
|
|
1841
|
-
// `String.prototype.trim` method
|
|
1842
|
-
// https://tc39.es/ecma262/#sec-string.prototype.trim
|
|
1843
|
-
trim: createMethod(3)
|
|
1945
|
+
const Form = props => {
|
|
1946
|
+
return jsx(FormProvider, Object.assign({}, props));
|
|
1844
1947
|
};
|
|
1845
1948
|
|
|
1846
|
-
|
|
1847
|
-
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
|
|
1861
|
-
|
|
1862
|
-
|
|
1863
|
-
|
|
1864
|
-
|
|
1865
|
-
|
|
1866
|
-
|
|
1867
|
-
} : $parseInt$1;
|
|
1949
|
+
const FormItems = ({
|
|
1950
|
+
children,
|
|
1951
|
+
validate,
|
|
1952
|
+
name
|
|
1953
|
+
}) => {
|
|
1954
|
+
const {
|
|
1955
|
+
setValues,
|
|
1956
|
+
setErrors,
|
|
1957
|
+
setFields,
|
|
1958
|
+
errors
|
|
1959
|
+
} = useFormContext();
|
|
1960
|
+
React.useEffect(() => {
|
|
1961
|
+
setFields(fields => Object.assign(Object.assign({}, fields), {
|
|
1962
|
+
[name]: validate === null || validate === void 0 ? void 0 : validate.rules
|
|
1963
|
+
}));
|
|
1964
|
+
|
|
1965
|
+
const removeValues = values => {
|
|
1966
|
+
const newValues = Object.assign({}, values);
|
|
1967
|
+
delete newValues[name];
|
|
1968
|
+
return newValues;
|
|
1969
|
+
};
|
|
1868
1970
|
|
|
1869
|
-
|
|
1870
|
-
|
|
1971
|
+
return () => {
|
|
1972
|
+
setFields(fields => removeValues(fields));
|
|
1973
|
+
setValues(values => removeValues(values));
|
|
1974
|
+
setErrors(errors => removeValues(errors));
|
|
1975
|
+
};
|
|
1976
|
+
}, []);
|
|
1871
1977
|
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1978
|
+
const onChange = event => {
|
|
1979
|
+
if (!event.target) return;
|
|
1980
|
+
const {
|
|
1981
|
+
value,
|
|
1982
|
+
name,
|
|
1983
|
+
type,
|
|
1984
|
+
checked
|
|
1985
|
+
} = event.target;
|
|
1986
|
+
let inputValue;
|
|
1987
|
+
|
|
1988
|
+
if (type === 'checkbox') {
|
|
1989
|
+
inputValue = checked ? value : null;
|
|
1990
|
+
checked ? setValues(values => Object.assign(Object.assign({}, values), {
|
|
1991
|
+
[name]: value
|
|
1992
|
+
})) : setValues(values => Object.assign(Object.assign({}, values), {
|
|
1993
|
+
[name]: null
|
|
1994
|
+
}));
|
|
1995
|
+
} else {
|
|
1996
|
+
inputValue = value;
|
|
1997
|
+
setValues(values => Object.assign(Object.assign({}, values), {
|
|
1998
|
+
[name]: value
|
|
1999
|
+
}));
|
|
2000
|
+
}
|
|
2001
|
+
|
|
2002
|
+
validateInputValue({
|
|
2003
|
+
value: inputValue,
|
|
2004
|
+
name,
|
|
2005
|
+
type,
|
|
2006
|
+
checked
|
|
2007
|
+
}, validate === null || validate === void 0 ? void 0 : validate.rules, setErrors);
|
|
2008
|
+
};
|
|
2009
|
+
|
|
2010
|
+
return /*#__PURE__*/React.cloneElement(children, {
|
|
2011
|
+
validator: (errors === null || errors === void 0 ? void 0 : errors[name]) && validate,
|
|
2012
|
+
name,
|
|
2013
|
+
onChange
|
|
2014
|
+
});
|
|
2015
|
+
};
|
|
2016
|
+
|
|
2017
|
+
function Group({
|
|
2018
|
+
children,
|
|
2019
|
+
error,
|
|
2020
|
+
groupBorder = false
|
|
2021
|
+
}) {
|
|
2022
|
+
const groupClassName = `group ${groupBorder ? 'group-border' : ''} ${error ? 'is-invalid' : ''}`;
|
|
2023
|
+
const errorMessage = error ? error.message || error : '';
|
|
2024
|
+
return jsxs("div", Object.assign({
|
|
2025
|
+
className: "form-group"
|
|
2026
|
+
}, {
|
|
2027
|
+
children: [jsx("div", Object.assign({
|
|
2028
|
+
className: groupClassName
|
|
2029
|
+
}, {
|
|
2030
|
+
children: children
|
|
2031
|
+
})), error && jsx("span", Object.assign({
|
|
2032
|
+
className: "form-info"
|
|
2033
|
+
}, {
|
|
2034
|
+
children: errorMessage
|
|
2035
|
+
}))]
|
|
2036
|
+
}));
|
|
2037
|
+
}
|
|
1877
2038
|
|
|
1878
|
-
const useInput = (props,
|
|
2039
|
+
const useInput = (props, onChanges, onChangeInput) => {
|
|
1879
2040
|
const id = useMemo(() => props.id || randomId(), [props.id]);
|
|
1880
2041
|
const ref = useRef(null);
|
|
1881
|
-
const [value, setValue] = useState(props.value);
|
|
1882
|
-
const [checked, setChecked] = useState(props.checked);
|
|
2042
|
+
const [value, setValue] = useState(props.value ? props.value : '');
|
|
2043
|
+
const [checked, setChecked] = useState(props.checked ? props.checked : false);
|
|
1883
2044
|
useEffect(() => {
|
|
1884
2045
|
if (ref.current && ref.current.form) {
|
|
1885
2046
|
const resetListener = () => {
|
|
1886
|
-
setValue(props.value);
|
|
1887
|
-
setChecked(props.checked);
|
|
2047
|
+
setValue(props.value ? props.value : '');
|
|
2048
|
+
setChecked(props.checked ? props.checked : false);
|
|
1888
2049
|
};
|
|
1889
2050
|
|
|
1890
2051
|
const form = ref.current.form;
|
|
@@ -1898,8 +2059,9 @@ const useInput = (props, evaluator, notify) => {
|
|
|
1898
2059
|
|
|
1899
2060
|
const onChange = event => {
|
|
1900
2061
|
setValue(event.target.value);
|
|
1901
|
-
setChecked(event.
|
|
1902
|
-
|
|
2062
|
+
setChecked(event.currentTarget.checked);
|
|
2063
|
+
onChanges && onChanges(event);
|
|
2064
|
+
onChangeInput && onChangeInput(event.target.value);
|
|
1903
2065
|
};
|
|
1904
2066
|
|
|
1905
2067
|
return Object.assign(Object.assign({}, props), {
|
|
@@ -1911,8 +2073,8 @@ const useInput = (props, evaluator, notify) => {
|
|
|
1911
2073
|
});
|
|
1912
2074
|
};
|
|
1913
2075
|
|
|
1914
|
-
const RenderInput = (type, props,
|
|
1915
|
-
const _a = useInput(props,
|
|
2076
|
+
const RenderInput = (type, props, onChange, onChangeInput, label, info, validator) => {
|
|
2077
|
+
const _a = useInput(props, onChange, onChangeInput),
|
|
1916
2078
|
{
|
|
1917
2079
|
value
|
|
1918
2080
|
} = _a,
|
|
@@ -1920,73 +2082,128 @@ const RenderInput = (type, props, evaluator, label, info, listener) => {
|
|
|
1920
2082
|
|
|
1921
2083
|
const propsWithDescription = info ? Object.assign(Object.assign({}, inputProps), {
|
|
1922
2084
|
'aria-describedby': `${inputProps.id}_info`
|
|
1923
|
-
}) : inputProps;
|
|
2085
|
+
}) : inputProps; // Render naked
|
|
2086
|
+
|
|
2087
|
+
if (!label && !info) return jsx("input", Object.assign({
|
|
2088
|
+
type: type,
|
|
2089
|
+
value: value
|
|
2090
|
+
}, propsWithDescription));
|
|
1924
2091
|
return jsxs("div", Object.assign({
|
|
1925
|
-
className: "form-
|
|
2092
|
+
className: "form-group"
|
|
1926
2093
|
}, {
|
|
1927
2094
|
children: [label && jsx("label", Object.assign({
|
|
1928
2095
|
htmlFor: inputProps.id
|
|
1929
2096
|
}, {
|
|
1930
2097
|
children: label
|
|
1931
|
-
})
|
|
2098
|
+
})), info && jsx("span", Object.assign({
|
|
1932
2099
|
className: "form-info",
|
|
1933
|
-
id:
|
|
2100
|
+
id: `${inputProps.id}_info`
|
|
1934
2101
|
}, {
|
|
1935
2102
|
children: info
|
|
1936
|
-
})
|
|
2103
|
+
})), jsx("input", Object.assign({
|
|
1937
2104
|
type: type,
|
|
1938
2105
|
value: value
|
|
1939
|
-
}, propsWithDescription
|
|
1940
|
-
|
|
2106
|
+
}, propsWithDescription, {
|
|
2107
|
+
className: validator && validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator)
|
|
2108
|
+
})), validator && jsx("span", Object.assign({
|
|
2109
|
+
className: "form-info"
|
|
2110
|
+
}, {
|
|
2111
|
+
children: validator.message
|
|
2112
|
+
}))]
|
|
2113
|
+
}));
|
|
1941
2114
|
};
|
|
1942
|
-
|
|
1943
2115
|
const TextInput = _a => {
|
|
1944
2116
|
var {
|
|
1945
2117
|
label,
|
|
1946
2118
|
info,
|
|
1947
|
-
|
|
2119
|
+
onChange,
|
|
2120
|
+
onChangeInput,
|
|
2121
|
+
validator
|
|
1948
2122
|
} = _a,
|
|
1949
|
-
props = __rest(_a, ["label", "info", "
|
|
2123
|
+
props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
|
|
1950
2124
|
|
|
1951
|
-
return RenderInput('text', props,
|
|
2125
|
+
return RenderInput('text', props, onChange, onChangeInput, label, info, validator);
|
|
1952
2126
|
};
|
|
1953
2127
|
const EmailInput = _a => {
|
|
1954
2128
|
var {
|
|
1955
2129
|
label,
|
|
1956
2130
|
info,
|
|
1957
|
-
|
|
2131
|
+
onChange,
|
|
2132
|
+
onChangeInput,
|
|
2133
|
+
validator
|
|
1958
2134
|
} = _a,
|
|
1959
|
-
props = __rest(_a, ["label", "info", "
|
|
2135
|
+
props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
|
|
1960
2136
|
|
|
1961
|
-
return RenderInput('email', props,
|
|
2137
|
+
return RenderInput('email', props, onChange, onChangeInput, label, info, validator);
|
|
1962
2138
|
};
|
|
1963
2139
|
const NumberInput = _a => {
|
|
1964
2140
|
var {
|
|
1965
2141
|
label,
|
|
1966
2142
|
info,
|
|
1967
|
-
|
|
2143
|
+
onChange,
|
|
2144
|
+
onChangeInput,
|
|
2145
|
+
validator
|
|
1968
2146
|
} = _a,
|
|
1969
|
-
props = __rest(_a, ["label", "info", "
|
|
2147
|
+
props = __rest(_a, ["label", "info", "onChange", "onChangeInput", "validator"]);
|
|
1970
2148
|
|
|
1971
|
-
return RenderInput('number', props,
|
|
2149
|
+
return RenderInput('number', props, onChange, onChangeInput, label, info, validator);
|
|
1972
2150
|
};
|
|
1973
2151
|
const Checkbox = _a => {
|
|
1974
2152
|
var {
|
|
1975
2153
|
label,
|
|
1976
|
-
|
|
2154
|
+
onChange,
|
|
2155
|
+
validator
|
|
1977
2156
|
} = _a,
|
|
1978
|
-
props = __rest(_a, ["label", "
|
|
2157
|
+
props = __rest(_a, ["label", "onChange", "validator"]);
|
|
1979
2158
|
|
|
1980
|
-
const inputProps = useInput(props,
|
|
2159
|
+
const inputProps = useInput(props, onChange);
|
|
2160
|
+
const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
|
|
2161
|
+
return jsx(Fragment, {
|
|
2162
|
+
children: jsxs("div", Object.assign({
|
|
2163
|
+
className: "form-group"
|
|
2164
|
+
}, {
|
|
2165
|
+
children: [jsxs("label", Object.assign({
|
|
2166
|
+
htmlFor: inputProps.id,
|
|
2167
|
+
className: `form-control ${validatorClassName}`
|
|
2168
|
+
}, {
|
|
2169
|
+
children: [label, jsx("input", Object.assign({
|
|
2170
|
+
type: "checkbox"
|
|
2171
|
+
}, inputProps, {
|
|
2172
|
+
className: validatorClassName
|
|
2173
|
+
})), jsx("i", {})]
|
|
2174
|
+
})), validator && jsx("span", Object.assign({
|
|
2175
|
+
className: "form-info"
|
|
2176
|
+
}, {
|
|
2177
|
+
children: validator.message
|
|
2178
|
+
}))]
|
|
2179
|
+
}))
|
|
2180
|
+
});
|
|
2181
|
+
};
|
|
2182
|
+
const RadioButton = /*#__PURE__*/React.forwardRef((_a, ref) => {
|
|
2183
|
+
var {
|
|
2184
|
+
label,
|
|
2185
|
+
validator
|
|
2186
|
+
} = _a,
|
|
2187
|
+
props = __rest(_a, ["label", "validator"]);
|
|
2188
|
+
|
|
2189
|
+
const {
|
|
2190
|
+
id
|
|
2191
|
+
} = useInput(props);
|
|
1981
2192
|
return jsxs("label", Object.assign({
|
|
1982
|
-
htmlFor:
|
|
2193
|
+
htmlFor: id,
|
|
1983
2194
|
className: "form-control"
|
|
1984
2195
|
}, {
|
|
1985
|
-
children: [
|
|
1986
|
-
|
|
1987
|
-
|
|
1988
|
-
|
|
1989
|
-
|
|
2196
|
+
children: [jsx("input", Object.assign({
|
|
2197
|
+
id: id,
|
|
2198
|
+
type: "radio"
|
|
2199
|
+
}, props, {
|
|
2200
|
+
className: validator,
|
|
2201
|
+
ref: ref
|
|
2202
|
+
})), jsx("span", {
|
|
2203
|
+
children: label
|
|
2204
|
+
}), jsx("i", {})]
|
|
2205
|
+
}));
|
|
2206
|
+
});
|
|
1990
2207
|
|
|
1991
2208
|
const Text = ({
|
|
1992
2209
|
children
|
|
@@ -1994,7 +2211,183 @@ const Text = ({
|
|
|
1994
2211
|
className: "form-text"
|
|
1995
2212
|
}, {
|
|
1996
2213
|
children: children
|
|
1997
|
-
})
|
|
2214
|
+
}));
|
|
2215
|
+
|
|
2216
|
+
var wellKnownSymbol$1 = wellKnownSymbol$8;
|
|
2217
|
+
|
|
2218
|
+
var TO_STRING_TAG$1 = wellKnownSymbol$1('toStringTag');
|
|
2219
|
+
var test = {};
|
|
2220
|
+
|
|
2221
|
+
test[TO_STRING_TAG$1] = 'z';
|
|
2222
|
+
|
|
2223
|
+
var toStringTagSupport = String(test) === '[object z]';
|
|
2224
|
+
|
|
2225
|
+
var global$3 = global$r;
|
|
2226
|
+
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
2227
|
+
var isCallable$1 = isCallable$f;
|
|
2228
|
+
var classofRaw = classofRaw$1;
|
|
2229
|
+
var wellKnownSymbol = wellKnownSymbol$8;
|
|
2230
|
+
|
|
2231
|
+
var TO_STRING_TAG = wellKnownSymbol('toStringTag');
|
|
2232
|
+
var Object$1 = global$3.Object;
|
|
2233
|
+
|
|
2234
|
+
// ES3 wrong here
|
|
2235
|
+
var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';
|
|
2236
|
+
|
|
2237
|
+
// fallback for IE11 Script Access Denied error
|
|
2238
|
+
var tryGet = function (it, key) {
|
|
2239
|
+
try {
|
|
2240
|
+
return it[key];
|
|
2241
|
+
} catch (error) { /* empty */ }
|
|
2242
|
+
};
|
|
2243
|
+
|
|
2244
|
+
// getting tag from ES6+ `Object.prototype.toString`
|
|
2245
|
+
var classof$1 = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {
|
|
2246
|
+
var O, tag, result;
|
|
2247
|
+
return it === undefined ? 'Undefined' : it === null ? 'Null'
|
|
2248
|
+
// @@toStringTag case
|
|
2249
|
+
: typeof (tag = tryGet(O = Object$1(it), TO_STRING_TAG)) == 'string' ? tag
|
|
2250
|
+
// builtinTag case
|
|
2251
|
+
: CORRECT_ARGUMENTS ? classofRaw(O)
|
|
2252
|
+
// ES3 arguments fallback
|
|
2253
|
+
: (result = classofRaw(O)) == 'Object' && isCallable$1(O.callee) ? 'Arguments' : result;
|
|
2254
|
+
};
|
|
2255
|
+
|
|
2256
|
+
var global$2 = global$r;
|
|
2257
|
+
var classof = classof$1;
|
|
2258
|
+
|
|
2259
|
+
var String$1 = global$2.String;
|
|
2260
|
+
|
|
2261
|
+
var toString$1 = function (argument) {
|
|
2262
|
+
if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string');
|
|
2263
|
+
return String$1(argument);
|
|
2264
|
+
};
|
|
2265
|
+
|
|
2266
|
+
var $ = _export;
|
|
2267
|
+
var DESCRIPTORS = descriptors;
|
|
2268
|
+
var global$1 = global$r;
|
|
2269
|
+
var uncurryThis = functionUncurryThis;
|
|
2270
|
+
var hasOwn = hasOwnProperty_1;
|
|
2271
|
+
var isCallable = isCallable$f;
|
|
2272
|
+
var isPrototypeOf = objectIsPrototypeOf;
|
|
2273
|
+
var toString = toString$1;
|
|
2274
|
+
var defineProperty = objectDefineProperty.f;
|
|
2275
|
+
var copyConstructorProperties = copyConstructorProperties$2;
|
|
2276
|
+
|
|
2277
|
+
var NativeSymbol = global$1.Symbol;
|
|
2278
|
+
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
2279
|
+
|
|
2280
|
+
if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
2281
|
+
// Safari 12 bug
|
|
2282
|
+
NativeSymbol().description !== undefined
|
|
2283
|
+
)) {
|
|
2284
|
+
var EmptyStringDescriptionStore = {};
|
|
2285
|
+
// wrap Symbol constructor for correct work with undefined description
|
|
2286
|
+
var SymbolWrapper = function Symbol() {
|
|
2287
|
+
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
2288
|
+
var result = isPrototypeOf(SymbolPrototype, this)
|
|
2289
|
+
? new NativeSymbol(description)
|
|
2290
|
+
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
2291
|
+
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
2292
|
+
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
2293
|
+
return result;
|
|
2294
|
+
};
|
|
2295
|
+
|
|
2296
|
+
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
2297
|
+
SymbolWrapper.prototype = SymbolPrototype;
|
|
2298
|
+
SymbolPrototype.constructor = SymbolWrapper;
|
|
2299
|
+
|
|
2300
|
+
var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
|
|
2301
|
+
var symbolToString = uncurryThis(SymbolPrototype.toString);
|
|
2302
|
+
var symbolValueOf = uncurryThis(SymbolPrototype.valueOf);
|
|
2303
|
+
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
2304
|
+
var replace = uncurryThis(''.replace);
|
|
2305
|
+
var stringSlice = uncurryThis(''.slice);
|
|
2306
|
+
|
|
2307
|
+
defineProperty(SymbolPrototype, 'description', {
|
|
2308
|
+
configurable: true,
|
|
2309
|
+
get: function description() {
|
|
2310
|
+
var symbol = symbolValueOf(this);
|
|
2311
|
+
var string = symbolToString(symbol);
|
|
2312
|
+
if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
|
|
2313
|
+
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
2314
|
+
return desc === '' ? undefined : desc;
|
|
2315
|
+
}
|
|
2316
|
+
});
|
|
2317
|
+
|
|
2318
|
+
$({ global: true, forced: true }, {
|
|
2319
|
+
Symbol: SymbolWrapper
|
|
2320
|
+
});
|
|
2321
|
+
}
|
|
2322
|
+
|
|
2323
|
+
const RadioGroup = ({
|
|
2324
|
+
defaultSelected,
|
|
2325
|
+
description,
|
|
2326
|
+
title,
|
|
2327
|
+
validator,
|
|
2328
|
+
onChangeRadio,
|
|
2329
|
+
onChange,
|
|
2330
|
+
name,
|
|
2331
|
+
children
|
|
2332
|
+
}) => {
|
|
2333
|
+
const [checked, setChecked] = React.useState();
|
|
2334
|
+
const validatorClassName = validateClassName(validator === null || validator === void 0 ? void 0 : validator.indicator);
|
|
2335
|
+
|
|
2336
|
+
const onChanges = event => {
|
|
2337
|
+
setChecked(event.target.value);
|
|
2338
|
+
onChangeRadio && onChangeRadio(event.target.value);
|
|
2339
|
+
onChange && onChange(event);
|
|
2340
|
+
};
|
|
2341
|
+
|
|
2342
|
+
const radioBtnRef = React.useRef(null);
|
|
2343
|
+
React.useEffect(() => {
|
|
2344
|
+
var _a;
|
|
2345
|
+
|
|
2346
|
+
if (radioBtnRef && radioBtnRef.current) {
|
|
2347
|
+
if (defaultSelected) setChecked(defaultSelected);
|
|
2348
|
+
const form = (_a = radioBtnRef === null || radioBtnRef === void 0 ? void 0 : radioBtnRef.current) === null || _a === void 0 ? void 0 : _a.form;
|
|
2349
|
+
|
|
2350
|
+
const resetListner = () => {
|
|
2351
|
+
setChecked(undefined);
|
|
2352
|
+
};
|
|
2353
|
+
|
|
2354
|
+
form === null || form === void 0 ? void 0 : form.addEventListener('reset', resetListner);
|
|
2355
|
+
return () => form === null || form === void 0 ? void 0 : form.removeEventListener('reset', resetListner);
|
|
2356
|
+
} else {
|
|
2357
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2358
|
+
return () => {};
|
|
2359
|
+
}
|
|
2360
|
+
}, []);
|
|
2361
|
+
return jsxs("div", Object.assign({
|
|
2362
|
+
className: "form-group"
|
|
2363
|
+
}, {
|
|
2364
|
+
children: [jsxs("fieldset", Object.assign({
|
|
2365
|
+
className: validatorClassName
|
|
2366
|
+
}, {
|
|
2367
|
+
children: [title && jsx("legend", {
|
|
2368
|
+
children: title
|
|
2369
|
+
}), description && jsx("span", Object.assign({
|
|
2370
|
+
className: "form-info"
|
|
2371
|
+
}, {
|
|
2372
|
+
children: description
|
|
2373
|
+
})), jsx("div", {
|
|
2374
|
+
children: React.Children.map(children, Child => {
|
|
2375
|
+
return /*#__PURE__*/React.isValidElement(Child) ? /*#__PURE__*/React.cloneElement(Child, {
|
|
2376
|
+
validator: validatorClassName,
|
|
2377
|
+
onChange: onChanges,
|
|
2378
|
+
checked: checked === Child.props.value,
|
|
2379
|
+
name,
|
|
2380
|
+
ref: radioBtnRef
|
|
2381
|
+
}) : Child;
|
|
2382
|
+
})
|
|
2383
|
+
})]
|
|
2384
|
+
})), (validator === null || validator === void 0 ? void 0 : validator.message) && jsx("span", Object.assign({
|
|
2385
|
+
className: "form-info"
|
|
2386
|
+
}, {
|
|
2387
|
+
children: validator === null || validator === void 0 ? void 0 : validator.message
|
|
2388
|
+
}))]
|
|
2389
|
+
}));
|
|
2390
|
+
};
|
|
1998
2391
|
|
|
1999
2392
|
const ListItem = _a => {
|
|
2000
2393
|
var {
|
|
@@ -2009,15 +2402,15 @@ const ListItem = _a => {
|
|
|
2009
2402
|
children: jsxs("div", {
|
|
2010
2403
|
children: [jsx("dt", {
|
|
2011
2404
|
children: tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.title
|
|
2012
|
-
}
|
|
2405
|
+
}), tableRowData === null || tableRowData === void 0 ? void 0 : tableRowData.definition.map((item, index) => jsx("dd", {
|
|
2013
2406
|
children: item
|
|
2014
2407
|
}, index))]
|
|
2015
|
-
}
|
|
2016
|
-
}
|
|
2408
|
+
})
|
|
2409
|
+
});
|
|
2017
2410
|
} else {
|
|
2018
2411
|
return jsx("li", Object.assign({}, props, {
|
|
2019
2412
|
children: children
|
|
2020
|
-
})
|
|
2413
|
+
}));
|
|
2021
2414
|
}
|
|
2022
2415
|
};
|
|
2023
2416
|
|
|
@@ -2035,7 +2428,7 @@ const List = _a => {
|
|
|
2035
2428
|
children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
|
|
2036
2429
|
children: child
|
|
2037
2430
|
}, index))
|
|
2038
|
-
})
|
|
2431
|
+
}));
|
|
2039
2432
|
} else if (listType !== 'table') {
|
|
2040
2433
|
return jsx("ul", Object.assign({}, props, {
|
|
2041
2434
|
className: listType
|
|
@@ -2043,20 +2436,20 @@ const List = _a => {
|
|
|
2043
2436
|
children: children === null || children === void 0 ? void 0 : children.map((child, index) => jsx(ListItem, {
|
|
2044
2437
|
children: child
|
|
2045
2438
|
}, index))
|
|
2046
|
-
})
|
|
2439
|
+
}));
|
|
2047
2440
|
} else {
|
|
2048
2441
|
return jsxs("figure", {
|
|
2049
2442
|
children: [jsx("figcaption", Object.assign({
|
|
2050
2443
|
className: "table-list-caption"
|
|
2051
2444
|
}, {
|
|
2052
2445
|
children: tableCaption
|
|
2053
|
-
})
|
|
2446
|
+
})), jsx("dl", {
|
|
2054
2447
|
children: tableData === null || tableData === void 0 ? void 0 : tableData.map((data, index) => jsx(ListItem, {
|
|
2055
2448
|
listType: listType,
|
|
2056
2449
|
tableRowData: data
|
|
2057
2450
|
}, index))
|
|
2058
|
-
}
|
|
2059
|
-
}
|
|
2451
|
+
})]
|
|
2452
|
+
});
|
|
2060
2453
|
}
|
|
2061
2454
|
};
|
|
2062
2455
|
|
|
@@ -2078,7 +2471,7 @@ const Link = _a => {
|
|
|
2078
2471
|
}, [button]);
|
|
2079
2472
|
return jsx("a", Object.assign({}, anchorProps, {
|
|
2080
2473
|
children: children
|
|
2081
|
-
})
|
|
2474
|
+
}));
|
|
2082
2475
|
};
|
|
2083
2476
|
|
|
2084
2477
|
const Navbar = ({
|
|
@@ -2105,7 +2498,7 @@ const Navbar = ({
|
|
|
2105
2498
|
href: _brandLink,
|
|
2106
2499
|
target: "_blank",
|
|
2107
2500
|
className: "brand"
|
|
2108
|
-
}
|
|
2501
|
+
}), jsx("div", Object.assign({
|
|
2109
2502
|
className: "container-fluid"
|
|
2110
2503
|
}, {
|
|
2111
2504
|
children: jsxs("div", Object.assign({
|
|
@@ -2120,22 +2513,416 @@ const Navbar = ({
|
|
|
2120
2513
|
}, {
|
|
2121
2514
|
children: jsx("h1", {
|
|
2122
2515
|
children: title
|
|
2123
|
-
}
|
|
2124
|
-
})
|
|
2516
|
+
})
|
|
2517
|
+
})) : jsx("h1", {
|
|
2125
2518
|
children: title
|
|
2126
|
-
}
|
|
2127
|
-
})
|
|
2519
|
+
})
|
|
2520
|
+
})), jsx("div", Object.assign({
|
|
2128
2521
|
className: "col-auto"
|
|
2129
2522
|
}, {
|
|
2130
2523
|
children: jsx("div", Object.assign({
|
|
2131
2524
|
className: "group size-sm"
|
|
2132
2525
|
}, {
|
|
2133
2526
|
children: children
|
|
2134
|
-
})
|
|
2135
|
-
})
|
|
2136
|
-
})
|
|
2137
|
-
})
|
|
2138
|
-
})
|
|
2527
|
+
}))
|
|
2528
|
+
}))]
|
|
2529
|
+
}))
|
|
2530
|
+
}))]
|
|
2531
|
+
}));
|
|
2532
|
+
};
|
|
2533
|
+
|
|
2534
|
+
function Badge(_a) {
|
|
2535
|
+
var {
|
|
2536
|
+
children,
|
|
2537
|
+
badgeType,
|
|
2538
|
+
isCloseable,
|
|
2539
|
+
closeText,
|
|
2540
|
+
customColor,
|
|
2541
|
+
customBackgroundColor
|
|
2542
|
+
} = _a,
|
|
2543
|
+
props = __rest(_a, ["children", "badgeType", "isCloseable", "closeText", "customColor", "customBackgroundColor"]);
|
|
2544
|
+
|
|
2545
|
+
const [isClosed, setIsClosed] = React.useState(false);
|
|
2546
|
+
const [type, setType] = React.useState('');
|
|
2547
|
+
React.useEffect(() => {
|
|
2548
|
+
if (badgeType) {
|
|
2549
|
+
setType(badgeType);
|
|
2550
|
+
}
|
|
2551
|
+
|
|
2552
|
+
if (!!customColor || !!customBackgroundColor) {
|
|
2553
|
+
setType('');
|
|
2554
|
+
}
|
|
2555
|
+
}, []);
|
|
2556
|
+
return !isClosed ? jsxs("span", Object.assign({}, props, {
|
|
2557
|
+
className: `badge ${type}`,
|
|
2558
|
+
style: {
|
|
2559
|
+
color: customColor,
|
|
2560
|
+
backgroundColor: customBackgroundColor
|
|
2561
|
+
}
|
|
2562
|
+
}, {
|
|
2563
|
+
children: [jsx("strong", {
|
|
2564
|
+
children: children
|
|
2565
|
+
}), isCloseable && jsx("button", Object.assign({
|
|
2566
|
+
type: "button",
|
|
2567
|
+
className: "close",
|
|
2568
|
+
onClick: () => setIsClosed(true)
|
|
2569
|
+
}, {
|
|
2570
|
+
children: closeText
|
|
2571
|
+
}))]
|
|
2572
|
+
})) : null;
|
|
2573
|
+
}
|
|
2574
|
+
|
|
2575
|
+
const noop = () => {};
|
|
2576
|
+
|
|
2577
|
+
const useStepper = ({
|
|
2578
|
+
min,
|
|
2579
|
+
max,
|
|
2580
|
+
value: _value = 0,
|
|
2581
|
+
step: _step = 1,
|
|
2582
|
+
id: _id = randomId(),
|
|
2583
|
+
onChange
|
|
2584
|
+
}) => {
|
|
2585
|
+
const pStepper = {
|
|
2586
|
+
down: noop,
|
|
2587
|
+
setMax: noop,
|
|
2588
|
+
setMin: noop,
|
|
2589
|
+
setStep: noop,
|
|
2590
|
+
setValue: noop,
|
|
2591
|
+
up: noop
|
|
2592
|
+
};
|
|
2593
|
+
const [stepper, setStepper] = useState(pStepper);
|
|
2594
|
+
const [data, setData] = useState({
|
|
2595
|
+
id: _id,
|
|
2596
|
+
value: _value,
|
|
2597
|
+
min,
|
|
2598
|
+
max,
|
|
2599
|
+
step: _step
|
|
2600
|
+
});
|
|
2601
|
+
useEffect(() => {
|
|
2602
|
+
if (max !== data.max) stepper.setMax(max);
|
|
2603
|
+
}, [stepper, max]);
|
|
2604
|
+
useEffect(() => {
|
|
2605
|
+
if (min !== data.min) stepper.setMin(min);
|
|
2606
|
+
}, [stepper, min]);
|
|
2607
|
+
useEffect(() => {
|
|
2608
|
+
if (_step !== data.step) stepper.setStep(_step || 1);
|
|
2609
|
+
}, [stepper, _step]);
|
|
2610
|
+
useEffect(() => {
|
|
2611
|
+
if (_value !== data.value) stepper.setValue(_value || 0, false);
|
|
2612
|
+
}, [stepper, _value]);
|
|
2613
|
+
useEffect(() => {
|
|
2614
|
+
setStepper(createStepper({
|
|
2615
|
+
id: _id,
|
|
2616
|
+
value: _value,
|
|
2617
|
+
min,
|
|
2618
|
+
max,
|
|
2619
|
+
step: _step,
|
|
2620
|
+
onChange
|
|
2621
|
+
}, setData));
|
|
2622
|
+
}, []);
|
|
2623
|
+
return [stepper, data];
|
|
2624
|
+
};
|
|
2625
|
+
|
|
2626
|
+
function Stepper(_a) {
|
|
2627
|
+
var {
|
|
2628
|
+
label,
|
|
2629
|
+
description,
|
|
2630
|
+
statusMessage
|
|
2631
|
+
} = _a,
|
|
2632
|
+
stepperArgs = __rest(_a, ["label", "description", "statusMessage"]);
|
|
2633
|
+
|
|
2634
|
+
const [stepper, data] = useStepper(stepperArgs);
|
|
2635
|
+
|
|
2636
|
+
const onChangeEvent = e => {
|
|
2637
|
+
stepper.setValue(e.target.valueAsNumber);
|
|
2638
|
+
};
|
|
2639
|
+
|
|
2640
|
+
return jsxs("div", Object.assign({
|
|
2641
|
+
className: "form-group"
|
|
2642
|
+
}, {
|
|
2643
|
+
children: [label && jsx("label", Object.assign({
|
|
2644
|
+
htmlFor: data.id
|
|
2645
|
+
}, {
|
|
2646
|
+
children: label
|
|
2647
|
+
})), description && jsx("span", Object.assign({
|
|
2648
|
+
className: "form-info"
|
|
2649
|
+
}, {
|
|
2650
|
+
children: description
|
|
2651
|
+
})), jsxs("div", Object.assign({
|
|
2652
|
+
className: "group group-border group-stepper"
|
|
2653
|
+
}, {
|
|
2654
|
+
children: [jsx("button", Object.assign({
|
|
2655
|
+
onClick: () => stepper.down()
|
|
2656
|
+
}, {
|
|
2657
|
+
children: "-"
|
|
2658
|
+
})), jsx("input", {
|
|
2659
|
+
id: data.id,
|
|
2660
|
+
type: "number",
|
|
2661
|
+
onChange: onChangeEvent,
|
|
2662
|
+
onFocus: ({
|
|
2663
|
+
target
|
|
2664
|
+
}) => target.select(),
|
|
2665
|
+
placeholder: "0",
|
|
2666
|
+
value: data.value
|
|
2667
|
+
}), jsx("button", Object.assign({
|
|
2668
|
+
onClick: () => stepper.up()
|
|
2669
|
+
}, {
|
|
2670
|
+
children: "+"
|
|
2671
|
+
}))]
|
|
2672
|
+
})), statusMessage && jsx("span", Object.assign({
|
|
2673
|
+
className: "form-info"
|
|
2674
|
+
}, {
|
|
2675
|
+
children: statusMessage
|
|
2676
|
+
}))]
|
|
2677
|
+
}));
|
|
2678
|
+
}
|
|
2679
|
+
|
|
2680
|
+
const useDropdown = ({
|
|
2681
|
+
id,
|
|
2682
|
+
value,
|
|
2683
|
+
texts,
|
|
2684
|
+
options,
|
|
2685
|
+
loop,
|
|
2686
|
+
multiSelect,
|
|
2687
|
+
searchable,
|
|
2688
|
+
searchFilter,
|
|
2689
|
+
compareWith,
|
|
2690
|
+
useValue,
|
|
2691
|
+
display,
|
|
2692
|
+
togglerRef,
|
|
2693
|
+
listboxRef,
|
|
2694
|
+
onChange,
|
|
2695
|
+
validator
|
|
2696
|
+
}) => {
|
|
2697
|
+
const [handler, setHandler] = useState();
|
|
2698
|
+
const [dropdown, setDropdown] = useState();
|
|
2699
|
+
const [togglerProps, setTogglerProps] = useState({});
|
|
2700
|
+
const [listboxProps, setListboxProps] = useState({});
|
|
2701
|
+
const [listItems, setListItems] = useState([]);
|
|
2702
|
+
const [multiSelectProps, setMultiSelectProps] = useState({}); // When dropdown data changes
|
|
2703
|
+
|
|
2704
|
+
useEffect(() => {
|
|
2705
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2706
|
+
|
|
2707
|
+
if (!dropdown) return;
|
|
2708
|
+
const {
|
|
2709
|
+
elements: {
|
|
2710
|
+
toggler,
|
|
2711
|
+
listbox
|
|
2712
|
+
}
|
|
2713
|
+
} = dropdown;
|
|
2714
|
+
const newToggleProps = Object.assign(Object.assign({}, toggler === null || toggler === void 0 ? void 0 : toggler.attributes), {
|
|
2715
|
+
className: (_a = toggler === null || toggler === void 0 ? void 0 : toggler.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
|
|
2716
|
+
children: (_b = dropdown === null || dropdown === void 0 ? void 0 : dropdown.texts) === null || _b === void 0 ? void 0 : _b.select,
|
|
2717
|
+
onClick: () => handler === null || handler === void 0 ? void 0 : handler.toggle()
|
|
2718
|
+
});
|
|
2719
|
+
setTogglerProps(newToggleProps);
|
|
2720
|
+
const newListboxProps = Object.assign(Object.assign({}, listbox === null || listbox === void 0 ? void 0 : listbox.attributes), {
|
|
2721
|
+
className: (_c = listbox === null || listbox === void 0 ? void 0 : listbox.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
|
|
2722
|
+
});
|
|
2723
|
+
setListboxProps(newListboxProps);
|
|
2724
|
+
|
|
2725
|
+
if (!dropdown.isMultiSelect) {
|
|
2726
|
+
const newListItems = dropdown.options.map(o => {
|
|
2727
|
+
var _a;
|
|
2728
|
+
|
|
2729
|
+
return Object.assign(Object.assign({}, o.attributes), {
|
|
2730
|
+
className: (_a = o.classes) === null || _a === void 0 ? void 0 : _a.join(' '),
|
|
2731
|
+
children: o[dropdown.display],
|
|
2732
|
+
selected: o.selected,
|
|
2733
|
+
onClick: () => handler === null || handler === void 0 ? void 0 : handler.select(o)
|
|
2734
|
+
});
|
|
2735
|
+
});
|
|
2736
|
+
setListItems(newListItems);
|
|
2737
|
+
} else {
|
|
2738
|
+
const checkboxes = dropdown.options.map(o => ({
|
|
2739
|
+
labelProps: Object.assign(Object.assign({}, o.attributes), {
|
|
2740
|
+
className: ['form-control', ...o.classes].join(' ')
|
|
2741
|
+
}),
|
|
2742
|
+
inputProps: {
|
|
2743
|
+
defaultChecked: o.selected,
|
|
2744
|
+
type: 'checkbox',
|
|
2745
|
+
onClick: () => handler === null || handler === void 0 ? void 0 : handler.select(o, false)
|
|
2746
|
+
},
|
|
2747
|
+
spanProps: {
|
|
2748
|
+
children: o[dropdown.display]
|
|
2749
|
+
}
|
|
2750
|
+
}));
|
|
2751
|
+
const newMultiselect = {
|
|
2752
|
+
fieldsetProps: {
|
|
2753
|
+
'aria-describedby': (_f = (_e = (_d = dropdown === null || dropdown === void 0 ? void 0 : dropdown.elements) === null || _d === void 0 ? void 0 : _d.fieldset) === null || _e === void 0 ? void 0 : _e.attributes) === null || _f === void 0 ? void 0 : _f.id,
|
|
2754
|
+
'aria-multiselectable': true,
|
|
2755
|
+
role: 'listbox',
|
|
2756
|
+
tabIndex: -1
|
|
2757
|
+
},
|
|
2758
|
+
legendProps: {
|
|
2759
|
+
className: 'sr-only',
|
|
2760
|
+
id: (_j = (_h = (_g = dropdown === null || dropdown === void 0 ? void 0 : dropdown.elements) === null || _g === void 0 ? void 0 : _g.fieldset) === null || _h === void 0 ? void 0 : _h.attributes) === null || _j === void 0 ? void 0 : _j.id,
|
|
2761
|
+
children: dropdown.texts.optionsDescription
|
|
2762
|
+
},
|
|
2763
|
+
checkboxes
|
|
2764
|
+
};
|
|
2765
|
+
setMultiSelectProps(newMultiselect);
|
|
2766
|
+
} // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2767
|
+
|
|
2768
|
+
}, [dropdown]); // When dropdown properties change
|
|
2769
|
+
|
|
2770
|
+
useEffect(() => {
|
|
2771
|
+
if (!dropdown) return;
|
|
2772
|
+
handler === null || handler === void 0 ? void 0 : handler.update({
|
|
2773
|
+
id,
|
|
2774
|
+
value,
|
|
2775
|
+
texts,
|
|
2776
|
+
options,
|
|
2777
|
+
loop,
|
|
2778
|
+
multiSelect,
|
|
2779
|
+
searchable,
|
|
2780
|
+
searchFilter,
|
|
2781
|
+
compareWith,
|
|
2782
|
+
useValue,
|
|
2783
|
+
display,
|
|
2784
|
+
validator
|
|
2785
|
+
}); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2786
|
+
}, [id, texts, options, loop, multiSelect, searchable, searchFilter, compareWith, useValue, display]);
|
|
2787
|
+
useEffect(() => {
|
|
2788
|
+
if (!dropdown) return;
|
|
2789
|
+
handler === null || handler === void 0 ? void 0 : handler.selectByValue(value);
|
|
2790
|
+
console.log('new value'); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2791
|
+
}, [value]); // When validator changes
|
|
2792
|
+
|
|
2793
|
+
useEffect(() => {
|
|
2794
|
+
if (!dropdown) return;
|
|
2795
|
+
if (validator) handler === null || handler === void 0 ? void 0 : handler.validate(validator); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2796
|
+
}, [validator]); // Create dropdown handler
|
|
2797
|
+
|
|
2798
|
+
useEffect(() => {
|
|
2799
|
+
if (!handler && togglerRef.current && listboxRef.current) {
|
|
2800
|
+
setHandler(createDropdown({
|
|
2801
|
+
id,
|
|
2802
|
+
value,
|
|
2803
|
+
texts,
|
|
2804
|
+
options,
|
|
2805
|
+
loop,
|
|
2806
|
+
multiSelect,
|
|
2807
|
+
searchable,
|
|
2808
|
+
searchFilter,
|
|
2809
|
+
compareWith,
|
|
2810
|
+
useValue,
|
|
2811
|
+
display,
|
|
2812
|
+
validator
|
|
2813
|
+
}, togglerRef.current, listboxRef.current, listboxRef.current, dd => setDropdown(dd), value => onChange === null || onChange === void 0 ? void 0 : onChange(value)));
|
|
2814
|
+
}
|
|
2815
|
+
|
|
2816
|
+
return () => handler === null || handler === void 0 ? void 0 : handler.destroy(); // eslint-disable-next-line react-hooks/exhaustive-deps
|
|
2817
|
+
}, [togglerRef, listboxRef]);
|
|
2818
|
+
return {
|
|
2819
|
+
dropdown: handler,
|
|
2820
|
+
togglerProps,
|
|
2821
|
+
listboxProps,
|
|
2822
|
+
listItems,
|
|
2823
|
+
multiSelectProps
|
|
2824
|
+
};
|
|
2825
|
+
};
|
|
2826
|
+
|
|
2827
|
+
const Dropdown = ({
|
|
2828
|
+
id,
|
|
2829
|
+
value,
|
|
2830
|
+
options,
|
|
2831
|
+
loop,
|
|
2832
|
+
multiSelect,
|
|
2833
|
+
searchable,
|
|
2834
|
+
searchFilter,
|
|
2835
|
+
compareWith,
|
|
2836
|
+
useValue,
|
|
2837
|
+
display,
|
|
2838
|
+
texts,
|
|
2839
|
+
onChange,
|
|
2840
|
+
validator
|
|
2841
|
+
}) => {
|
|
2842
|
+
var _a;
|
|
2843
|
+
|
|
2844
|
+
const togglerRef = useRef(null);
|
|
2845
|
+
const listboxRef = useRef(null);
|
|
2846
|
+
const {
|
|
2847
|
+
dropdown,
|
|
2848
|
+
listboxProps,
|
|
2849
|
+
togglerProps,
|
|
2850
|
+
listItems,
|
|
2851
|
+
multiSelectProps
|
|
2852
|
+
} = useDropdown({
|
|
2853
|
+
id,
|
|
2854
|
+
value,
|
|
2855
|
+
options,
|
|
2856
|
+
loop,
|
|
2857
|
+
multiSelect,
|
|
2858
|
+
searchable,
|
|
2859
|
+
searchFilter,
|
|
2860
|
+
compareWith,
|
|
2861
|
+
useValue,
|
|
2862
|
+
display,
|
|
2863
|
+
togglerRef,
|
|
2864
|
+
listboxRef,
|
|
2865
|
+
texts,
|
|
2866
|
+
onChange,
|
|
2867
|
+
validator
|
|
2868
|
+
});
|
|
2869
|
+
|
|
2870
|
+
const getListBoxProps = props => {
|
|
2871
|
+
var _a, _b, _c;
|
|
2872
|
+
|
|
2873
|
+
if (Object.keys(props).length === 0) return {
|
|
2874
|
+
role: 'listbox',
|
|
2875
|
+
tabIndex: -1,
|
|
2876
|
+
className: (_c = (_b = (_a = dropdownValues.elements) === null || _a === void 0 ? void 0 : _a.listbox) === null || _b === void 0 ? void 0 : _b.classes) === null || _c === void 0 ? void 0 : _c.join(' ')
|
|
2877
|
+
};
|
|
2878
|
+
return props;
|
|
2879
|
+
};
|
|
2880
|
+
|
|
2881
|
+
return jsxs("div", Object.assign({
|
|
2882
|
+
className: "form-group"
|
|
2883
|
+
}, {
|
|
2884
|
+
children: [jsx("button", Object.assign({
|
|
2885
|
+
type: "button"
|
|
2886
|
+
}, togglerProps, {
|
|
2887
|
+
ref: togglerRef
|
|
2888
|
+
}, {
|
|
2889
|
+
children: jsx("span", {
|
|
2890
|
+
children: togglerProps.children
|
|
2891
|
+
})
|
|
2892
|
+
})), jsxs("div", Object.assign({}, getListBoxProps(listboxProps), {
|
|
2893
|
+
ref: listboxRef
|
|
2894
|
+
}, {
|
|
2895
|
+
children: [jsxs("button", Object.assign({
|
|
2896
|
+
type: "button",
|
|
2897
|
+
className: "close m-4 m-sm-2 d-block d-sm-none",
|
|
2898
|
+
onClick: dropdown === null || dropdown === void 0 ? void 0 : dropdown.close
|
|
2899
|
+
}, {
|
|
2900
|
+
children: [jsx("span", Object.assign({
|
|
2901
|
+
className: "sr-only"
|
|
2902
|
+
}, {
|
|
2903
|
+
children: dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.texts.close
|
|
2904
|
+
})), jsx("i", {})]
|
|
2905
|
+
})), (dropdown === null || dropdown === void 0 ? void 0 : dropdown.dropdown.isMultiSelect) ? jsx("div", Object.assign({
|
|
2906
|
+
className: "sg-fieldset-container"
|
|
2907
|
+
}, {
|
|
2908
|
+
children: jsxs("fieldset", Object.assign({}, multiSelectProps.fieldsetProps, {
|
|
2909
|
+
children: [jsx("legend", Object.assign({}, multiSelectProps.legendProps)), jsx("div", {
|
|
2910
|
+
children: (_a = multiSelectProps.checkboxes) === null || _a === void 0 ? void 0 : _a.map(checkboxItem => jsxs("label", Object.assign({}, checkboxItem.labelProps, {
|
|
2911
|
+
children: [jsx("input", Object.assign({}, checkboxItem.inputProps)), jsx("span", Object.assign({}, checkboxItem.spanProps)), jsx("i", {})]
|
|
2912
|
+
}), checkboxItem.labelProps.id))
|
|
2913
|
+
})]
|
|
2914
|
+
}))
|
|
2915
|
+
})) : jsx("ul", Object.assign({
|
|
2916
|
+
role: "listbox"
|
|
2917
|
+
}, {
|
|
2918
|
+
children: listItems.map(liProps => jsx("li", Object.assign({}, liProps), liProps.id))
|
|
2919
|
+
}))]
|
|
2920
|
+
})), validator && jsx("span", Object.assign({
|
|
2921
|
+
className: "form-info"
|
|
2922
|
+
}, {
|
|
2923
|
+
children: validator === null || validator === void 0 ? void 0 : validator.message
|
|
2924
|
+
}))]
|
|
2925
|
+
}));
|
|
2139
2926
|
};
|
|
2140
2927
|
|
|
2141
|
-
export { Alert, Button, ButtonGroup, Card, Checkbox, EmailInput, Flexbox, Form, Group, Link, List, Modal, Navbar, NumberInput, Text, TextInput };
|
|
2928
|
+
export { Alert, Badge, Button, ButtonGroup, Card, Checkbox, Dropdown, EmailInput, Flexbox, Form, FormItems, Group, Link, List, Modal, Navbar, NumberInput, RadioButton, RadioGroup, RenderInput, Stepper, Text, TextInput };
|