@iabbb/bds-react 0.40.0-beta.3 → 0.40.0-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ErrorSummary/index.cjs +4 -327
- package/ErrorSummary/index.cjs.map +1 -1
- package/ErrorSummary/index.mjs +3 -326
- package/ErrorSummary/index.mjs.map +1 -1
- package/ErrorSummary/package.json +4 -1
- package/index.cjs +54 -55
- package/index.cjs.map +1 -1
- package/index.mjs +54 -55
- package/index.mjs.map +1 -1
- package/package.json +1 -1
package/ErrorSummary/index.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var ssrDomShim = require('@lit-labs/ssr-dom-shim');
|
|
6
6
|
var React = require('react');
|
|
7
7
|
|
|
8
8
|
function _interopNamespaceDefault(e) {
|
|
@@ -72,28 +72,6 @@ function _objectSpread2(e) {
|
|
|
72
72
|
}
|
|
73
73
|
return e;
|
|
74
74
|
}
|
|
75
|
-
function _classCallCheck(instance, Constructor) {
|
|
76
|
-
if (!(instance instanceof Constructor)) {
|
|
77
|
-
throw new TypeError("Cannot call a class as a function");
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
function _defineProperties(target, props) {
|
|
81
|
-
for (var i = 0; i < props.length; i++) {
|
|
82
|
-
var descriptor = props[i];
|
|
83
|
-
descriptor.enumerable = descriptor.enumerable || false;
|
|
84
|
-
descriptor.configurable = true;
|
|
85
|
-
if ("value" in descriptor) descriptor.writable = true;
|
|
86
|
-
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
function _createClass(Constructor, protoProps, staticProps) {
|
|
90
|
-
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
91
|
-
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
92
|
-
Object.defineProperty(Constructor, "prototype", {
|
|
93
|
-
writable: false
|
|
94
|
-
});
|
|
95
|
-
return Constructor;
|
|
96
|
-
}
|
|
97
75
|
function _defineProperty(obj, key, value) {
|
|
98
76
|
key = _toPropertyKey(key);
|
|
99
77
|
if (key in obj) {
|
|
@@ -122,46 +100,6 @@ function _extends() {
|
|
|
122
100
|
};
|
|
123
101
|
return _extends.apply(this, arguments);
|
|
124
102
|
}
|
|
125
|
-
function _inherits(subClass, superClass) {
|
|
126
|
-
if (typeof superClass !== "function" && superClass !== null) {
|
|
127
|
-
throw new TypeError("Super expression must either be null or a function");
|
|
128
|
-
}
|
|
129
|
-
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
130
|
-
constructor: {
|
|
131
|
-
value: subClass,
|
|
132
|
-
writable: true,
|
|
133
|
-
configurable: true
|
|
134
|
-
}
|
|
135
|
-
});
|
|
136
|
-
Object.defineProperty(subClass, "prototype", {
|
|
137
|
-
writable: false
|
|
138
|
-
});
|
|
139
|
-
if (superClass) _setPrototypeOf(subClass, superClass);
|
|
140
|
-
}
|
|
141
|
-
function _getPrototypeOf(o) {
|
|
142
|
-
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
143
|
-
return o.__proto__ || Object.getPrototypeOf(o);
|
|
144
|
-
};
|
|
145
|
-
return _getPrototypeOf(o);
|
|
146
|
-
}
|
|
147
|
-
function _setPrototypeOf(o, p) {
|
|
148
|
-
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
149
|
-
o.__proto__ = p;
|
|
150
|
-
return o;
|
|
151
|
-
};
|
|
152
|
-
return _setPrototypeOf(o, p);
|
|
153
|
-
}
|
|
154
|
-
function _isNativeReflectConstruct() {
|
|
155
|
-
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
156
|
-
if (Reflect.construct.sham) return false;
|
|
157
|
-
if (typeof Proxy === "function") return true;
|
|
158
|
-
try {
|
|
159
|
-
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
160
|
-
return true;
|
|
161
|
-
} catch (e) {
|
|
162
|
-
return false;
|
|
163
|
-
}
|
|
164
|
-
}
|
|
165
103
|
function _objectWithoutPropertiesLoose(source, excluded) {
|
|
166
104
|
if (source == null) return {};
|
|
167
105
|
var target = {};
|
|
@@ -189,34 +127,6 @@ function _objectWithoutProperties(source, excluded) {
|
|
|
189
127
|
}
|
|
190
128
|
return target;
|
|
191
129
|
}
|
|
192
|
-
function _assertThisInitialized(self) {
|
|
193
|
-
if (self === void 0) {
|
|
194
|
-
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
195
|
-
}
|
|
196
|
-
return self;
|
|
197
|
-
}
|
|
198
|
-
function _possibleConstructorReturn(self, call) {
|
|
199
|
-
if (call && (typeof call === "object" || typeof call === "function")) {
|
|
200
|
-
return call;
|
|
201
|
-
} else if (call !== void 0) {
|
|
202
|
-
throw new TypeError("Derived constructors may only return object or undefined");
|
|
203
|
-
}
|
|
204
|
-
return _assertThisInitialized(self);
|
|
205
|
-
}
|
|
206
|
-
function _createSuper(Derived) {
|
|
207
|
-
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
208
|
-
return function _createSuperInternal() {
|
|
209
|
-
var Super = _getPrototypeOf(Derived),
|
|
210
|
-
result;
|
|
211
|
-
if (hasNativeReflectConstruct) {
|
|
212
|
-
var NewTarget = _getPrototypeOf(this).constructor;
|
|
213
|
-
result = Reflect.construct(Super, arguments, NewTarget);
|
|
214
|
-
} else {
|
|
215
|
-
result = Super.apply(this, arguments);
|
|
216
|
-
}
|
|
217
|
-
return _possibleConstructorReturn(this, result);
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
130
|
function _slicedToArray(arr, i) {
|
|
221
131
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
|
222
132
|
}
|
|
@@ -307,251 +217,18 @@ var e = new Set(["children", "localName", "ref", "style", "className"]),
|
|
|
307
217
|
return c.displayName = null != i ? i : o.name, c;
|
|
308
218
|
};
|
|
309
219
|
|
|
310
|
-
// Shim the global element internals object
|
|
311
|
-
// Methods should be fine as noops and properties can generally
|
|
312
|
-
// be while on the server.
|
|
313
|
-
var ElementInternalsShim = /*#__PURE__*/function () {
|
|
314
|
-
function ElementInternals(_host) {
|
|
315
|
-
_classCallCheck(this, ElementInternals);
|
|
316
|
-
this.ariaAtomic = '';
|
|
317
|
-
this.ariaAutoComplete = '';
|
|
318
|
-
this.ariaBraileLabel = '';
|
|
319
|
-
this.ariaBraileRoleDescription = '';
|
|
320
|
-
this.ariaBusy = '';
|
|
321
|
-
this.ariaChecked = '';
|
|
322
|
-
this.ariaColCount = '';
|
|
323
|
-
this.ariaColIndex = '';
|
|
324
|
-
this.ariaColSpan = '';
|
|
325
|
-
this.ariaCurrent = '';
|
|
326
|
-
this.ariaDescription = '';
|
|
327
|
-
this.ariaDisabled = '';
|
|
328
|
-
this.ariaExpanded = '';
|
|
329
|
-
this.ariaHasPopup = '';
|
|
330
|
-
this.ariaHidden = '';
|
|
331
|
-
this.ariaInvalid = '';
|
|
332
|
-
this.ariaKeyShortcuts = '';
|
|
333
|
-
this.ariaLabel = '';
|
|
334
|
-
this.ariaLevel = '';
|
|
335
|
-
this.ariaLive = '';
|
|
336
|
-
this.ariaModal = '';
|
|
337
|
-
this.ariaMultiLine = '';
|
|
338
|
-
this.ariaMultiSelectable = '';
|
|
339
|
-
this.ariaOrientation = '';
|
|
340
|
-
this.ariaPlaceholder = '';
|
|
341
|
-
this.ariaPosInSet = '';
|
|
342
|
-
this.ariaPressed = '';
|
|
343
|
-
this.ariaReadOnly = '';
|
|
344
|
-
this.ariaRequired = '';
|
|
345
|
-
this.ariaRoleDescription = '';
|
|
346
|
-
this.ariaRowCount = '';
|
|
347
|
-
this.ariaRowIndex = '';
|
|
348
|
-
this.ariaRowSpan = '';
|
|
349
|
-
this.ariaSelected = '';
|
|
350
|
-
this.ariaSetSize = '';
|
|
351
|
-
this.ariaSort = '';
|
|
352
|
-
this.ariaValueMax = '';
|
|
353
|
-
this.ariaValueMin = '';
|
|
354
|
-
this.ariaValueNow = '';
|
|
355
|
-
this.ariaValueText = '';
|
|
356
|
-
this.role = '';
|
|
357
|
-
this.form = null;
|
|
358
|
-
this.labels = [];
|
|
359
|
-
this.states = new Set();
|
|
360
|
-
this.validationMessage = '';
|
|
361
|
-
this.validity = {};
|
|
362
|
-
this.willValidate = true;
|
|
363
|
-
this.__host = _host;
|
|
364
|
-
}
|
|
365
|
-
_createClass(ElementInternals, [{
|
|
366
|
-
key: "shadowRoot",
|
|
367
|
-
get: function get() {
|
|
368
|
-
// Grab the shadow root instance from the Element shim
|
|
369
|
-
// to ensure that the shadow root is always available
|
|
370
|
-
// to the internals instance even if the mode is 'closed'
|
|
371
|
-
return this.__host.__shadowRoot;
|
|
372
|
-
}
|
|
373
|
-
}, {
|
|
374
|
-
key: "checkValidity",
|
|
375
|
-
value: function checkValidity() {
|
|
376
|
-
// TODO(augustjk) Consider actually implementing logic.
|
|
377
|
-
// See https://github.com/lit/lit/issues/3740
|
|
378
|
-
console.warn('`ElementInternals.checkValidity()` was called on the server.' + 'This method always returns true.');
|
|
379
|
-
return true;
|
|
380
|
-
}
|
|
381
|
-
}, {
|
|
382
|
-
key: "reportValidity",
|
|
383
|
-
value: function reportValidity() {
|
|
384
|
-
return true;
|
|
385
|
-
}
|
|
386
|
-
}, {
|
|
387
|
-
key: "setFormValue",
|
|
388
|
-
value: function setFormValue() {}
|
|
389
|
-
}, {
|
|
390
|
-
key: "setValidity",
|
|
391
|
-
value: function setValidity() {}
|
|
392
|
-
}]);
|
|
393
|
-
return ElementInternals;
|
|
394
|
-
}();
|
|
395
|
-
|
|
396
|
-
var attributes = new WeakMap();
|
|
397
|
-
var attributesForElement = function attributesForElement(element) {
|
|
398
|
-
var attrs = attributes.get(element);
|
|
399
|
-
if (attrs === undefined) {
|
|
400
|
-
attributes.set(element, attrs = new Map());
|
|
401
|
-
}
|
|
402
|
-
return attrs;
|
|
403
|
-
};
|
|
404
|
-
// The typings around the exports below are a little funky:
|
|
405
|
-
//
|
|
406
|
-
// 1. We want the `name` of the shim classes to match the real ones at runtime,
|
|
407
|
-
// hence e.g. `class Element`.
|
|
408
|
-
// 2. We can't shadow the global types with a simple class declaration, because
|
|
409
|
-
// then we can't reference the global types for casting, hence e.g.
|
|
410
|
-
// `const ElementShim = class Element`.
|
|
411
|
-
// 3. We want to export the classes typed as the real ones, hence e.g.
|
|
412
|
-
// `const ElementShimWithRealType = ElementShim as object as typeof Element;`.
|
|
413
|
-
// 4. We want the exported names to match the real ones, hence e.g.
|
|
414
|
-
// `export {ElementShimWithRealType as Element}`.
|
|
415
|
-
var ElementShim = /*#__PURE__*/function () {
|
|
416
|
-
function Element() {
|
|
417
|
-
_classCallCheck(this, Element);
|
|
418
|
-
this.__shadowRootMode = null;
|
|
419
|
-
this.__shadowRoot = null;
|
|
420
|
-
this.__internals = null;
|
|
421
|
-
}
|
|
422
|
-
_createClass(Element, [{
|
|
423
|
-
key: "attributes",
|
|
424
|
-
get: function get() {
|
|
425
|
-
return Array.from(attributesForElement(this)).map(function (_ref) {
|
|
426
|
-
var _ref2 = _slicedToArray(_ref, 2),
|
|
427
|
-
name = _ref2[0],
|
|
428
|
-
value = _ref2[1];
|
|
429
|
-
return {
|
|
430
|
-
name: name,
|
|
431
|
-
value: value
|
|
432
|
-
};
|
|
433
|
-
});
|
|
434
|
-
}
|
|
435
|
-
}, {
|
|
436
|
-
key: "shadowRoot",
|
|
437
|
-
get: function get() {
|
|
438
|
-
if (this.__shadowRootMode === 'closed') {
|
|
439
|
-
return null;
|
|
440
|
-
}
|
|
441
|
-
return this.__shadowRoot;
|
|
442
|
-
}
|
|
443
|
-
}, {
|
|
444
|
-
key: "setAttribute",
|
|
445
|
-
value: function setAttribute(name, value) {
|
|
446
|
-
// Emulate browser behavior that silently casts all values to string. E.g.
|
|
447
|
-
// `42` becomes `"42"` and `{}` becomes `"[object Object]""`.
|
|
448
|
-
attributesForElement(this).set(name, String(value));
|
|
449
|
-
}
|
|
450
|
-
}, {
|
|
451
|
-
key: "removeAttribute",
|
|
452
|
-
value: function removeAttribute(name) {
|
|
453
|
-
attributesForElement(this)["delete"](name);
|
|
454
|
-
}
|
|
455
|
-
}, {
|
|
456
|
-
key: "hasAttribute",
|
|
457
|
-
value: function hasAttribute(name) {
|
|
458
|
-
return attributesForElement(this).has(name);
|
|
459
|
-
}
|
|
460
|
-
}, {
|
|
461
|
-
key: "attachShadow",
|
|
462
|
-
value: function attachShadow(init) {
|
|
463
|
-
var shadowRoot = {
|
|
464
|
-
host: this
|
|
465
|
-
};
|
|
466
|
-
this.__shadowRootMode = init.mode;
|
|
467
|
-
if (init && init.mode === 'open') {
|
|
468
|
-
this.__shadowRoot = shadowRoot;
|
|
469
|
-
}
|
|
470
|
-
return shadowRoot;
|
|
471
|
-
}
|
|
472
|
-
}, {
|
|
473
|
-
key: "attachInternals",
|
|
474
|
-
value: function attachInternals() {
|
|
475
|
-
if (this.__internals !== null) {
|
|
476
|
-
throw new Error("Failed to execute 'attachInternals' on 'HTMLElement': " + "ElementInternals for the specified element was already attached.");
|
|
477
|
-
}
|
|
478
|
-
var internals = new ElementInternalsShim(this);
|
|
479
|
-
this.__internals = internals;
|
|
480
|
-
return internals;
|
|
481
|
-
}
|
|
482
|
-
}, {
|
|
483
|
-
key: "getAttribute",
|
|
484
|
-
value: function getAttribute(name) {
|
|
485
|
-
var value = attributesForElement(this).get(name);
|
|
486
|
-
return value !== null && value !== void 0 ? value : null;
|
|
487
|
-
}
|
|
488
|
-
}]);
|
|
489
|
-
return Element;
|
|
490
|
-
}();
|
|
491
|
-
var HTMLElementShim = /*#__PURE__*/function (_ElementShim) {
|
|
492
|
-
_inherits(HTMLElement, _ElementShim);
|
|
493
|
-
var _super = _createSuper(HTMLElement);
|
|
494
|
-
function HTMLElement() {
|
|
495
|
-
_classCallCheck(this, HTMLElement);
|
|
496
|
-
return _super.apply(this, arguments);
|
|
497
|
-
}
|
|
498
|
-
return _createClass(HTMLElement);
|
|
499
|
-
}(ElementShim);
|
|
500
|
-
var HTMLElementShimWithRealType = HTMLElementShim;
|
|
501
|
-
var CustomElementRegistryShim = /*#__PURE__*/function () {
|
|
502
|
-
function CustomElementRegistry() {
|
|
503
|
-
_classCallCheck(this, CustomElementRegistry);
|
|
504
|
-
this.__definitions = new Map();
|
|
505
|
-
}
|
|
506
|
-
_createClass(CustomElementRegistry, [{
|
|
507
|
-
key: "define",
|
|
508
|
-
value: function define(name, ctor) {
|
|
509
|
-
var _ctor$observedAttribu;
|
|
510
|
-
if (this.__definitions.has(name)) {
|
|
511
|
-
if (process.env.NODE_ENV === 'development') {
|
|
512
|
-
console.warn("'CustomElementRegistry' already has \"".concat(name, "\" defined. ") + "This may have been caused by live reload or hot module " + "replacement in which case it can be safely ignored.\n" + "Make sure to test your application with a production build as " + "repeat registrations will throw in production.");
|
|
513
|
-
} else {
|
|
514
|
-
throw new Error("Failed to execute 'define' on 'CustomElementRegistry': " + "the name \"".concat(name, "\" has already been used with this registry"));
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
this.__definitions.set(name, {
|
|
518
|
-
ctor: ctor,
|
|
519
|
-
// Note it's important we read `observedAttributes` in case it is a getter
|
|
520
|
-
// with side-effects, as is the case in Lit, where it triggers class
|
|
521
|
-
// finalization.
|
|
522
|
-
//
|
|
523
|
-
// TODO(aomarks) To be spec compliant, we should also capture the
|
|
524
|
-
// registration-time lifecycle methods like `connectedCallback`. For them
|
|
525
|
-
// to be actually accessible to e.g. the Lit SSR element renderer, though,
|
|
526
|
-
// we'd need to introduce a new API for accessing them (since `get` only
|
|
527
|
-
// returns the constructor).
|
|
528
|
-
observedAttributes: (_ctor$observedAttribu = ctor.observedAttributes) !== null && _ctor$observedAttribu !== void 0 ? _ctor$observedAttribu : []
|
|
529
|
-
});
|
|
530
|
-
}
|
|
531
|
-
}, {
|
|
532
|
-
key: "get",
|
|
533
|
-
value: function get(name) {
|
|
534
|
-
var definition = this.__definitions.get(name);
|
|
535
|
-
return definition === null || definition === void 0 ? void 0 : definition.ctor;
|
|
536
|
-
}
|
|
537
|
-
}]);
|
|
538
|
-
return CustomElementRegistry;
|
|
539
|
-
}();
|
|
540
|
-
var CustomElementRegistryShimWithRealType = CustomElementRegistryShim;
|
|
541
|
-
var customElements = new CustomElementRegistryShimWithRealType();
|
|
542
|
-
|
|
543
220
|
var _excluded = ["className", "errors", "mapNameToId"];
|
|
544
221
|
if (globalThis.window === undefined) {
|
|
545
222
|
var window = {
|
|
546
|
-
customElements: customElements,
|
|
547
|
-
HTMLElement:
|
|
223
|
+
customElements: ssrDomShim.customElements,
|
|
224
|
+
HTMLElement: ssrDomShim.HTMLElement
|
|
548
225
|
};
|
|
549
226
|
// Copy initial window globals to node global
|
|
550
227
|
Object.assign(globalThis, window);
|
|
551
228
|
}
|
|
552
229
|
var ReactErrorSummary = t({
|
|
553
230
|
tagName: 'bds-error-summary',
|
|
554
|
-
elementClass: ErrorSummary,
|
|
231
|
+
elementClass: require('@iabbb/bds/ErrorSummary'),
|
|
555
232
|
react: React__namespace
|
|
556
233
|
});
|
|
557
234
|
var FormErrorKey = '_form';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","sources":["../../../../.yarn/__virtual__/@lit-labs-react-virtual-4509891a2a/0/cache/@lit-labs-react-npm-2.0.0-0a425990f1-28737941de.zip/node_modules/@lit-labs/react/create-component.js","../../../../.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.1.1-8b753a4141-7a7add78e3.zip/node_modules/@lit-labs/ssr-dom-shim/lib/element-internals.js","../../../../.yarn/cache/@lit-labs-ssr-dom-shim-npm-1.1.1-8b753a4141-7a7add78e3.zip/node_modules/@lit-labs/ssr-dom-shim/index.js","../../src/ErrorSummary/ErrorSummary.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=new Set([\"children\",\"localName\",\"ref\",\"style\",\"className\"]),n=new WeakMap,l=(e,l,t,o,a)=>{const i=null==a?void 0:a[l];void 0===i||t===o?(e[l]=t,null==t&&l in HTMLElement.prototype&&e.removeAttribute(l)):((e,l,t)=>{let o=n.get(e);void 0===o&&n.set(e,o=new Map);let a=o.get(l);void 0!==t?void 0===a?(o.set(l,a={handleEvent:t}),e.addEventListener(l,a)):a.handleEvent=t:void 0!==a&&(o.delete(l),e.removeEventListener(l,a))})(e,i,t)},t=({react:n,tagName:t,elementClass:o,events:a,displayName:i})=>{const s=new Set(Object.keys(null!=a?a:{})),c=n.forwardRef(((i,c)=>{const r=n.useRef(null),d=n.useRef(null),u={},v={};for(const[n,l]of Object.entries(i))e.has(n)?u[\"className\"===n?\"class\":n]=l:s.has(n)||n in o.prototype?v[n]=l:u[n]=l;return n.useLayoutEffect((()=>{if(null!==d.current){for(const e in v)l(d.current,e,i[e],r.current?r.current[e]:void 0,a);r.current=i}})),n.useLayoutEffect((()=>{var e;null===(e=d.current)||void 0===e||e.removeAttribute(\"defer-hydration\")}),[]),u.suppressHydrationWarning=!0,n.createElement(t,{...u,ref:e=>{d.current=e,\"function\"==typeof c?c(e):null!==c&&(c.current=e)}})}));return c.displayName=null!=i?i:o.name,c};export{t as createComponent};\n//# sourceMappingURL=create-component.js.map\n","/**\n * @license\n * Copyright 2023 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\n/**\n * Map of ARIAMixin properties to attributes\n */\nexport const ariaMixinAttributes = {\n ariaAtomic: 'aria-atomic',\n ariaAutoComplete: 'aria-autocomplete',\n ariaBraileLabel: 'aria-brailelabel',\n ariaBraileRoleDescription: 'aria-braileroledescription',\n ariaBusy: 'aria-busy',\n ariaChecked: 'aria-checked',\n ariaColCount: 'aria-colcount',\n ariaColIndex: 'aria-colindex',\n ariaColSpan: 'aria-colspan',\n ariaCurrent: 'aria-current',\n ariaDescription: 'aria-description',\n ariaDisabled: 'aria-disabled',\n ariaExpanded: 'aria-expanded',\n ariaHasPopup: 'aria-haspopup',\n ariaHidden: 'aria-hidden',\n ariaInvalid: 'aria-invalid',\n ariaKeyShortcuts: 'aria-keyshortcuts',\n ariaLabel: 'aria-label',\n ariaLevel: 'aria-level',\n ariaLive: 'aria-live',\n ariaModal: 'aria-modal',\n ariaMultiLine: 'aria-multiline',\n ariaMultiSelectable: 'aria-multiselectable',\n ariaOrientation: 'aria-orientation',\n ariaPlaceholder: 'aria-placeholder',\n ariaPosInSet: 'aria-posinset',\n ariaPressed: 'aria-pressed',\n ariaReadOnly: 'aria-readonly',\n ariaRequired: 'aria-required',\n ariaRoleDescription: 'aria-roledescription',\n ariaRowCount: 'aria-rowcount',\n ariaRowIndex: 'aria-rowindex',\n ariaRowSpan: 'aria-rowspan',\n ariaSelected: 'aria-selected',\n ariaSetSize: 'aria-setsize',\n ariaSort: 'aria-sort',\n ariaValueMax: 'aria-valuemax',\n ariaValueMin: 'aria-valuemin',\n ariaValueNow: 'aria-valuenow',\n ariaValueText: 'aria-valuetext',\n role: 'role',\n};\n// Shim the global element internals object\n// Methods should be fine as noops and properties can generally\n// be while on the server.\nexport const ElementInternalsShim = class ElementInternals {\n constructor(_host) {\n this.ariaAtomic = '';\n this.ariaAutoComplete = '';\n this.ariaBraileLabel = '';\n this.ariaBraileRoleDescription = '';\n this.ariaBusy = '';\n this.ariaChecked = '';\n this.ariaColCount = '';\n this.ariaColIndex = '';\n this.ariaColSpan = '';\n this.ariaCurrent = '';\n this.ariaDescription = '';\n this.ariaDisabled = '';\n this.ariaExpanded = '';\n this.ariaHasPopup = '';\n this.ariaHidden = '';\n this.ariaInvalid = '';\n this.ariaKeyShortcuts = '';\n this.ariaLabel = '';\n this.ariaLevel = '';\n this.ariaLive = '';\n this.ariaModal = '';\n this.ariaMultiLine = '';\n this.ariaMultiSelectable = '';\n this.ariaOrientation = '';\n this.ariaPlaceholder = '';\n this.ariaPosInSet = '';\n this.ariaPressed = '';\n this.ariaReadOnly = '';\n this.ariaRequired = '';\n this.ariaRoleDescription = '';\n this.ariaRowCount = '';\n this.ariaRowIndex = '';\n this.ariaRowSpan = '';\n this.ariaSelected = '';\n this.ariaSetSize = '';\n this.ariaSort = '';\n this.ariaValueMax = '';\n this.ariaValueMin = '';\n this.ariaValueNow = '';\n this.ariaValueText = '';\n this.role = '';\n this.form = null;\n this.labels = [];\n this.states = new Set();\n this.validationMessage = '';\n this.validity = {};\n this.willValidate = true;\n this.__host = _host;\n }\n get shadowRoot() {\n // Grab the shadow root instance from the Element shim\n // to ensure that the shadow root is always available\n // to the internals instance even if the mode is 'closed'\n return this.__host\n .__shadowRoot;\n }\n checkValidity() {\n // TODO(augustjk) Consider actually implementing logic.\n // See https://github.com/lit/lit/issues/3740\n console.warn('`ElementInternals.checkValidity()` was called on the server.' +\n 'This method always returns true.');\n return true;\n }\n reportValidity() {\n return true;\n }\n setFormValue() { }\n setValidity() { }\n};\nconst ElementInternalsShimWithRealType = ElementInternalsShim;\nexport { ElementInternalsShimWithRealType as ElementInternals };\nexport const HYDRATE_INTERNALS_ATTR_PREFIX = 'hydrate-internals-';\n//# sourceMappingURL=element-internals.js.map","/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nimport { ElementInternalsShim } from './lib/element-internals.js';\nexport { ariaMixinAttributes, ElementInternals, HYDRATE_INTERNALS_ATTR_PREFIX, } from './lib/element-internals.js';\nconst attributes = new WeakMap();\nconst attributesForElement = (element) => {\n let attrs = attributes.get(element);\n if (attrs === undefined) {\n attributes.set(element, (attrs = new Map()));\n }\n return attrs;\n};\n// The typings around the exports below are a little funky:\n//\n// 1. We want the `name` of the shim classes to match the real ones at runtime,\n// hence e.g. `class Element`.\n// 2. We can't shadow the global types with a simple class declaration, because\n// then we can't reference the global types for casting, hence e.g.\n// `const ElementShim = class Element`.\n// 3. We want to export the classes typed as the real ones, hence e.g.\n// `const ElementShimWithRealType = ElementShim as object as typeof Element;`.\n// 4. We want the exported names to match the real ones, hence e.g.\n// `export {ElementShimWithRealType as Element}`.\nconst ElementShim = class Element {\n constructor() {\n this.__shadowRootMode = null;\n this.__shadowRoot = null;\n this.__internals = null;\n }\n get attributes() {\n return Array.from(attributesForElement(this)).map(([name, value]) => ({\n name,\n value,\n }));\n }\n get shadowRoot() {\n if (this.__shadowRootMode === 'closed') {\n return null;\n }\n return this.__shadowRoot;\n }\n setAttribute(name, value) {\n // Emulate browser behavior that silently casts all values to string. E.g.\n // `42` becomes `\"42\"` and `{}` becomes `\"[object Object]\"\"`.\n attributesForElement(this).set(name, String(value));\n }\n removeAttribute(name) {\n attributesForElement(this).delete(name);\n }\n hasAttribute(name) {\n return attributesForElement(this).has(name);\n }\n attachShadow(init) {\n const shadowRoot = { host: this };\n this.__shadowRootMode = init.mode;\n if (init && init.mode === 'open') {\n this.__shadowRoot = shadowRoot;\n }\n return shadowRoot;\n }\n attachInternals() {\n if (this.__internals !== null) {\n throw new Error(`Failed to execute 'attachInternals' on 'HTMLElement': ` +\n `ElementInternals for the specified element was already attached.`);\n }\n const internals = new ElementInternalsShim(this);\n this.__internals = internals;\n return internals;\n }\n getAttribute(name) {\n const value = attributesForElement(this).get(name);\n return value ?? null;\n }\n};\nconst ElementShimWithRealType = ElementShim;\nexport { ElementShimWithRealType as Element };\nconst HTMLElementShim = class HTMLElement extends ElementShim {\n};\nconst HTMLElementShimWithRealType = HTMLElementShim;\nexport { HTMLElementShimWithRealType as HTMLElement };\nconst CustomElementRegistryShim = class CustomElementRegistry {\n constructor() {\n this.__definitions = new Map();\n }\n define(name, ctor) {\n if (this.__definitions.has(name)) {\n if (process.env.NODE_ENV === 'development') {\n console.warn(`'CustomElementRegistry' already has \"${name}\" defined. ` +\n `This may have been caused by live reload or hot module ` +\n `replacement in which case it can be safely ignored.\\n` +\n `Make sure to test your application with a production build as ` +\n `repeat registrations will throw in production.`);\n }\n else {\n throw new Error(`Failed to execute 'define' on 'CustomElementRegistry': ` +\n `the name \"${name}\" has already been used with this registry`);\n }\n }\n this.__definitions.set(name, {\n ctor,\n // Note it's important we read `observedAttributes` in case it is a getter\n // with side-effects, as is the case in Lit, where it triggers class\n // finalization.\n //\n // TODO(aomarks) To be spec compliant, we should also capture the\n // registration-time lifecycle methods like `connectedCallback`. For them\n // to be actually accessible to e.g. the Lit SSR element renderer, though,\n // we'd need to introduce a new API for accessing them (since `get` only\n // returns the constructor).\n observedAttributes: ctor.observedAttributes ?? [],\n });\n }\n get(name) {\n const definition = this.__definitions.get(name);\n return definition?.ctor;\n }\n};\nconst CustomElementRegistryShimWithRealType = CustomElementRegistryShim;\nexport { CustomElementRegistryShimWithRealType as CustomElementRegistry };\nexport const customElements = new CustomElementRegistryShimWithRealType();\n//# sourceMappingURL=index.js.map","import ErrorSummary from '@iabbb/bds/ErrorSummary';\r\nimport { createComponent } from '@lit-labs/react';\r\nimport { customElements, HTMLElement } from '@lit-labs/ssr-dom-shim';\r\nimport * as React from 'react';\r\n\r\nif (globalThis.window === undefined) {\r\n const window = { customElements, HTMLElement };\r\n // Copy initial window globals to node global\r\n Object.assign(globalThis, window);\r\n}\r\n\r\nconst ReactErrorSummary = createComponent({\r\n tagName: 'bds-error-summary',\r\n elementClass: ErrorSummary,\r\n react: React,\r\n});\r\n\r\ndeclare global {\r\n namespace JSX {\r\n interface IntrinsicElements {\r\n 'bds-error-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\r\n }\r\n }\r\n}\r\n\r\nexport const FormErrorKey = '_form';\r\n\r\nconst FINAL_FORM_ERROR = 'FINAL_FORM/form-error';\r\n\r\nexport type ErrorSummaryProps = {\r\n errors: Record<string, Array<string> | string> | null;\r\n mapNameToId?: (name: string) => string;\r\n};\r\n\r\nexport default function BdsErrorSummary({\r\n className,\r\n errors,\r\n mapNameToId = (name) => name,\r\n ...props\r\n}: ErrorSummaryProps & React.ComponentPropsWithoutRef<'div'>) {\r\n const headingId = React.useId();\r\n const groupRef = React.useRef<HTMLElement>(null);\r\n\r\n React.useEffect(() => {\r\n if (!errors || Object.keys(errors).length === 0) return;\r\n if (!groupRef.current) return;\r\n\r\n groupRef.current.focus();\r\n }, [errors]);\r\n\r\n if (!errors || Object.keys(errors).length === 0) return null;\r\n\r\n return (\r\n <ReactErrorSummary\r\n className={['stack', className].filter((x) => x).join(' ')}\r\n role=\"group\"\r\n aria-labelledby={headingId}\r\n ref={groupRef}\r\n tabIndex={-1}\r\n {...props}\r\n >\r\n <h2 className=\"bds-h5\" id={headingId}>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 512 512\"\r\n aria-hidden=\"true\"\r\n height=\"1em\"\r\n width=\"1em\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z\" />\r\n </svg>\r\n Issue\r\n </h2>\r\n <ul>\r\n {Object.keys(errors).map((errorKey) => {\r\n const message = errors[errorKey];\r\n const isFormError = [FINAL_FORM_ERROR, FormErrorKey].includes(errorKey);\r\n\r\n if (isFormError) {\r\n return <li key={errorKey} dangerouslySetInnerHTML={{ __html: message }} />;\r\n }\r\n\r\n const isArrayField = Array.isArray(message);\r\n\r\n const messages = isArrayField ? message : [message];\r\n\r\n return (\r\n <React.Fragment key={errorKey}>\r\n {messages.map((fieldMessage, index) => {\r\n const inputId = `${mapNameToId(errorKey)}${isArrayField ? `[${index}]` : ''}`;\r\n\r\n return (\r\n <li key={inputId}>\r\n <a href={`#${inputId}`}>\r\n {fieldMessage}\r\n {messages.length > 1 ? ` (${index + 1} of ${messages.length})` : undefined}\r\n </a>\r\n </li>\r\n );\r\n })}\r\n </React.Fragment>\r\n );\r\n })}\r\n </ul>\r\n </ReactErrorSummary>\r\n );\r\n}\r\n"],"names":["e","Set","n","WeakMap","l","t","o","a","i","HTMLElement","prototype","removeAttribute","get","set","Map","handleEvent","addEventListener","removeEventListener","_ref","react","tagName","elementClass","events","displayName","s","Object","keys","c","forwardRef","r","useRef","d","u","v","_i","_Object$entries","entries","length","_Object$entries$_i","_slicedToArray","has","useLayoutEffect","current","suppressHydrationWarning","createElement","_objectSpread","ref","name","ElementInternalsShim","ElementInternals","_host","_classCallCheck","ariaAtomic","ariaAutoComplete","ariaBraileLabel","ariaBraileRoleDescription","ariaBusy","ariaChecked","ariaColCount","ariaColIndex","ariaColSpan","ariaCurrent","ariaDescription","ariaDisabled","ariaExpanded","ariaHasPopup","ariaHidden","ariaInvalid","ariaKeyShortcuts","ariaLabel","ariaLevel","ariaLive","ariaModal","ariaMultiLine","ariaMultiSelectable","ariaOrientation","ariaPlaceholder","ariaPosInSet","ariaPressed","ariaReadOnly","ariaRequired","ariaRoleDescription","ariaRowCount","ariaRowIndex","ariaRowSpan","ariaSelected","ariaSetSize","ariaSort","ariaValueMax","ariaValueMin","ariaValueNow","ariaValueText","role","form","labels","states","validationMessage","validity","willValidate","__host","_createClass","key","__shadowRoot","value","checkValidity","console","warn","reportValidity","setFormValue","setValidity","attributes","attributesForElement","element","attrs","undefined","ElementShim","Element","__shadowRootMode","__internals","Array","from","map","_ref2","setAttribute","String","hasAttribute","attachShadow","init","shadowRoot","host","mode","attachInternals","Error","internals","getAttribute","HTMLElementShim","_ElementShim","_inherits","_super","_createSuper","apply","arguments","HTMLElementShimWithRealType","CustomElementRegistryShim","CustomElementRegistry","__definitions","define","ctor","_ctor$observedAttribu","process","env","NODE_ENV","concat","observedAttributes","definition","CustomElementRegistryShimWithRealType","customElements","globalThis","window","assign","ReactErrorSummary","createComponent","ErrorSummary","React","FormErrorKey","FINAL_FORM_ERROR","BdsErrorSummary","className","errors","_ref$mapNameToId","mapNameToId","props","_objectWithoutProperties","_excluded","headingId","useId","groupRef","useEffect","focus","_extends","filter","x","join","tabIndex","id","xmlns","viewBox","height","width","fill","errorKey","message","isFormError","includes","dangerouslySetInnerHTML","__html","isArrayField","isArray","messages","Fragment","fieldMessage","index","inputId","href"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,IAAMA,CAAA,GAA0B,IAAIC,GAAA,CAAI,CACtC,UAAA,EACA,WACA,EAAA,KAAA,EACA,OACA,EAAA,WAAA,CAAA,CAAA;EAGIC,CAAA,GAGF,IAAIC,OAAA,EAAA;EAsCFC,CAAA,GAAc,SAAAA,CAAAA,CAClBJ,CAAA,EACAI,EAAA,EACAC,CAAA,EACAC,CAAA,EACAC,CAAA,EAAA;AAEA,IAAA,IAAMC,CAAA,GAAQ,IAAA,IAAAD,CAAA,GAAAA,KAAAA,CAAAA,GAAAA,CAAA,CAASH,EAAA,CAAA,CAAA;AAAA,IAAA,KAET,CAAVI,KAAAA,CAAA,IAAuBH,CAAA,KAAUC,CAAA,IAKrCN,CAAA,CAAKI,EAAA,CAAA,GAAmBC,CAAA,EAWtB,QAACA,CAAA,IACDD,EAAA,IAAQK,WAAA,CAAYC,SAAA,IAEpBV,CAAA,CAAKW,eAAA,CAAgBP,EAAA,KA1DQ,UAC/BJ,CAAA,EACAI,CAAA,EACAC,CAAA,EAAA;AAEA,MAAA,IAAIC,CAA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|
|
1
|
+
{"version":3,"file":"index.cjs","sources":["../../../../.yarn/__virtual__/@lit-labs-react-virtual-4509891a2a/0/cache/@lit-labs-react-npm-2.0.0-0a425990f1-28737941de.zip/node_modules/@lit-labs/react/create-component.js","../../src/ErrorSummary/ErrorSummary.tsx"],"sourcesContent":["/**\n * @license\n * Copyright 2018 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst e=new Set([\"children\",\"localName\",\"ref\",\"style\",\"className\"]),n=new WeakMap,l=(e,l,t,o,a)=>{const i=null==a?void 0:a[l];void 0===i||t===o?(e[l]=t,null==t&&l in HTMLElement.prototype&&e.removeAttribute(l)):((e,l,t)=>{let o=n.get(e);void 0===o&&n.set(e,o=new Map);let a=o.get(l);void 0!==t?void 0===a?(o.set(l,a={handleEvent:t}),e.addEventListener(l,a)):a.handleEvent=t:void 0!==a&&(o.delete(l),e.removeEventListener(l,a))})(e,i,t)},t=({react:n,tagName:t,elementClass:o,events:a,displayName:i})=>{const s=new Set(Object.keys(null!=a?a:{})),c=n.forwardRef(((i,c)=>{const r=n.useRef(null),d=n.useRef(null),u={},v={};for(const[n,l]of Object.entries(i))e.has(n)?u[\"className\"===n?\"class\":n]=l:s.has(n)||n in o.prototype?v[n]=l:u[n]=l;return n.useLayoutEffect((()=>{if(null!==d.current){for(const e in v)l(d.current,e,i[e],r.current?r.current[e]:void 0,a);r.current=i}})),n.useLayoutEffect((()=>{var e;null===(e=d.current)||void 0===e||e.removeAttribute(\"defer-hydration\")}),[]),u.suppressHydrationWarning=!0,n.createElement(t,{...u,ref:e=>{d.current=e,\"function\"==typeof c?c(e):null!==c&&(c.current=e)}})}));return c.displayName=null!=i?i:o.name,c};export{t as createComponent};\n//# sourceMappingURL=create-component.js.map\n","import { customElements, HTMLElement } from '@lit-labs/ssr-dom-shim';\r\nimport { createComponent } from '@lit-labs/react';\r\nimport * as React from 'react';\r\n\r\nif (globalThis.window === undefined) {\r\n const window = { customElements, HTMLElement };\r\n // Copy initial window globals to node global\r\n Object.assign(globalThis, window);\r\n}\r\n\r\nconst ReactErrorSummary = createComponent({\r\n tagName: 'bds-error-summary',\r\n elementClass: require('@iabbb/bds/ErrorSummary'),\r\n react: React,\r\n});\r\n\r\ndeclare global {\r\n namespace JSX {\r\n interface IntrinsicElements {\r\n 'bds-error-summary': React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;\r\n }\r\n }\r\n}\r\n\r\nexport const FormErrorKey = '_form';\r\n\r\nconst FINAL_FORM_ERROR = 'FINAL_FORM/form-error';\r\n\r\nexport type ErrorSummaryProps = {\r\n errors: Record<string, Array<string> | string> | null;\r\n mapNameToId?: (name: string) => string;\r\n};\r\n\r\nexport default function BdsErrorSummary({\r\n className,\r\n errors,\r\n mapNameToId = (name) => name,\r\n ...props\r\n}: ErrorSummaryProps & React.ComponentPropsWithoutRef<'div'>) {\r\n const headingId = React.useId();\r\n const groupRef = React.useRef<HTMLElement>(null);\r\n\r\n React.useEffect(() => {\r\n if (!errors || Object.keys(errors).length === 0) return;\r\n if (!groupRef.current) return;\r\n\r\n groupRef.current.focus();\r\n }, [errors]);\r\n\r\n if (!errors || Object.keys(errors).length === 0) return null;\r\n\r\n return (\r\n <ReactErrorSummary\r\n className={['stack', className].filter((x) => x).join(' ')}\r\n role=\"group\"\r\n aria-labelledby={headingId}\r\n ref={groupRef}\r\n tabIndex={-1}\r\n {...props}\r\n >\r\n <h2 className=\"bds-h5\" id={headingId}>\r\n <svg\r\n xmlns=\"http://www.w3.org/2000/svg\"\r\n viewBox=\"0 0 512 512\"\r\n aria-hidden=\"true\"\r\n height=\"1em\"\r\n width=\"1em\"\r\n fill=\"currentColor\"\r\n >\r\n <path d=\"M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7.2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8.2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24v112c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32 14.3 32 32 32 32-14.3 32-32z\" />\r\n </svg>\r\n Issue\r\n </h2>\r\n <ul>\r\n {Object.keys(errors).map((errorKey) => {\r\n const message = errors[errorKey];\r\n const isFormError = [FINAL_FORM_ERROR, FormErrorKey].includes(errorKey);\r\n\r\n if (isFormError) {\r\n return <li key={errorKey} dangerouslySetInnerHTML={{ __html: message }} />;\r\n }\r\n\r\n const isArrayField = Array.isArray(message);\r\n\r\n const messages = isArrayField ? message : [message];\r\n\r\n return (\r\n <React.Fragment key={errorKey}>\r\n {messages.map((fieldMessage, index) => {\r\n const inputId = `${mapNameToId(errorKey)}${isArrayField ? `[${index}]` : ''}`;\r\n\r\n return (\r\n <li key={inputId}>\r\n <a href={`#${inputId}`}>\r\n {fieldMessage}\r\n {messages.length > 1 ? ` (${index + 1} of ${messages.length})` : undefined}\r\n </a>\r\n </li>\r\n );\r\n })}\r\n </React.Fragment>\r\n );\r\n })}\r\n </ul>\r\n </ReactErrorSummary>\r\n );\r\n}\r\n"],"names":["e","Set","n","WeakMap","l","t","o","a","i","HTMLElement","prototype","removeAttribute","get","set","Map","handleEvent","addEventListener","removeEventListener","_ref","react","tagName","elementClass","events","displayName","s","Object","keys","c","forwardRef","r","useRef","d","u","v","_i","_Object$entries","entries","length","_Object$entries$_i","_slicedToArray","has","useLayoutEffect","current","suppressHydrationWarning","createElement","_objectSpread","ref","name","globalThis","window","undefined","customElements","assign","ReactErrorSummary","createComponent","require","React","FormErrorKey","FINAL_FORM_ERROR","BdsErrorSummary","className","errors","_ref$mapNameToId","mapNameToId","props","_objectWithoutProperties","_excluded","headingId","useId","groupRef","useEffect","focus","_extends","filter","x","join","role","tabIndex","id","xmlns","viewBox","height","width","fill","map","errorKey","message","isFormError","includes","key","dangerouslySetInnerHTML","__html","isArrayField","Array","isArray","messages","Fragment","fieldMessage","index","inputId","concat","href"],"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