@trackunit/custom-field-components 0.0.127 → 0.0.130

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.
Files changed (2) hide show
  1. package/index.js +125 -88
  2. package/package.json +8 -8
package/index.js CHANGED
@@ -13,7 +13,7 @@ var check = function (it) {
13
13
 
14
14
  // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
15
15
  var global$g =
16
- // eslint-disable-next-line es-x/no-global-this -- safe
16
+ // eslint-disable-next-line es/no-global-this -- safe
17
17
  check(typeof globalThis == 'object' && globalThis) ||
18
18
  check(typeof window == 'object' && window) ||
19
19
  // eslint-disable-next-line no-restricted-globals -- safe
@@ -36,14 +36,14 @@ var fails$f = fails$g;
36
36
 
37
37
  // Detect IE8's incomplete defineProperty implementation
38
38
  var descriptors = !fails$f(function () {
39
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
39
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
40
40
  return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;
41
41
  });
42
42
 
43
43
  var fails$e = fails$g;
44
44
 
45
45
  var functionBindNative = !fails$e(function () {
46
- // eslint-disable-next-line es-x/no-function-prototype-bind -- safe
46
+ // eslint-disable-next-line es/no-function-prototype-bind -- safe
47
47
  var test = (function () { /* empty */ }).bind();
48
48
  // eslint-disable-next-line no-prototype-builtins -- safe
49
49
  return typeof test != 'function' || test.hasOwnProperty('prototype');
@@ -60,7 +60,7 @@ var functionCall = NATIVE_BIND$1 ? call$8.bind(call$8) : function () {
60
60
  var objectPropertyIsEnumerable = {};
61
61
 
62
62
  var $propertyIsEnumerable = {}.propertyIsEnumerable;
63
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
63
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
64
64
  var getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
65
65
 
66
66
  // Nashorn ~ JDK8 bug
@@ -122,12 +122,20 @@ var indexedObject = fails$d(function () {
122
122
  return classof$3(it) == 'String' ? split(it, '') : $Object$4(it);
123
123
  } : $Object$4;
124
124
 
125
+ // we can't use just `it == null` since of `document.all` special case
126
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot-aec
127
+ var isNullOrUndefined$2 = function (it) {
128
+ return it === null || it === undefined;
129
+ };
130
+
131
+ var isNullOrUndefined$1 = isNullOrUndefined$2;
132
+
125
133
  var $TypeError$6 = TypeError;
126
134
 
127
135
  // `RequireObjectCoercible` abstract operation
128
136
  // https://tc39.es/ecma262/#sec-requireobjectcoercible
129
137
  var requireObjectCoercible$2 = function (it) {
130
- if (it == undefined) throw $TypeError$6("Can't call method on " + it);
138
+ if (isNullOrUndefined$1(it)) throw $TypeError$6("Can't call method on " + it);
131
139
  return it;
132
140
  };
133
141
 
@@ -139,15 +147,36 @@ var toIndexedObject$5 = function (it) {
139
147
  return IndexedObject$1(requireObjectCoercible$1(it));
140
148
  };
141
149
 
150
+ var documentAll$2 = typeof document == 'object' && document.all;
151
+
152
+ // https://tc39.es/ecma262/#sec-IsHTMLDDA-internal-slot
153
+ var IS_HTMLDDA = typeof documentAll$2 == 'undefined' && documentAll$2 !== undefined;
154
+
155
+ var documentAll_1 = {
156
+ all: documentAll$2,
157
+ IS_HTMLDDA: IS_HTMLDDA
158
+ };
159
+
160
+ var $documentAll$1 = documentAll_1;
161
+
162
+ var documentAll$1 = $documentAll$1.all;
163
+
142
164
  // `IsCallable` abstract operation
143
165
  // https://tc39.es/ecma262/#sec-iscallable
144
- var isCallable$h = function (argument) {
166
+ var isCallable$h = $documentAll$1.IS_HTMLDDA ? function (argument) {
167
+ return typeof argument == 'function' || argument === documentAll$1;
168
+ } : function (argument) {
145
169
  return typeof argument == 'function';
146
170
  };
147
171
 
148
172
  var isCallable$g = isCallable$h;
173
+ var $documentAll = documentAll_1;
174
+
175
+ var documentAll = $documentAll.all;
149
176
 
150
- var isObject$7 = function (it) {
177
+ var isObject$8 = $documentAll.IS_HTMLDDA ? function (it) {
178
+ return typeof it == 'object' ? it !== null : isCallable$g(it) || it === documentAll;
179
+ } : function (it) {
151
180
  return typeof it == 'object' ? it !== null : isCallable$g(it);
152
181
  };
153
182
 
@@ -198,13 +227,13 @@ if (!version && userAgent) {
198
227
 
199
228
  var engineV8Version = version;
200
229
 
201
- /* eslint-disable es-x/no-symbol -- required for testing */
230
+ /* eslint-disable es/no-symbol -- required for testing */
202
231
 
203
232
  var V8_VERSION = engineV8Version;
204
233
  var fails$c = fails$g;
205
234
 
206
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- required for testing
207
- var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$c(function () {
235
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
236
+ var symbolConstructorDetection = !!Object.getOwnPropertySymbols && !fails$c(function () {
208
237
  var symbol = Symbol();
209
238
  // Chrome 38 Symbol has incorrect toString conversion
210
239
  // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
@@ -213,9 +242,9 @@ var nativeSymbol = !!Object.getOwnPropertySymbols && !fails$c(function () {
213
242
  !Symbol.sham && V8_VERSION && V8_VERSION < 41;
214
243
  });
215
244
 
216
- /* eslint-disable es-x/no-symbol -- required for testing */
245
+ /* eslint-disable es/no-symbol -- required for testing */
217
246
 
218
- var NATIVE_SYMBOL$2 = nativeSymbol;
247
+ var NATIVE_SYMBOL$2 = symbolConstructorDetection;
219
248
 
220
249
  var useSymbolAsUid = NATIVE_SYMBOL$2
221
250
  && !Symbol.sham
@@ -257,17 +286,18 @@ var aCallable$1 = function (argument) {
257
286
  };
258
287
 
259
288
  var aCallable = aCallable$1;
289
+ var isNullOrUndefined = isNullOrUndefined$2;
260
290
 
261
291
  // `GetMethod` abstract operation
262
292
  // https://tc39.es/ecma262/#sec-getmethod
263
293
  var getMethod$1 = function (V, P) {
264
294
  var func = V[P];
265
- return func == null ? undefined : aCallable(func);
295
+ return isNullOrUndefined(func) ? undefined : aCallable(func);
266
296
  };
267
297
 
268
298
  var call$6 = functionCall;
269
299
  var isCallable$c = isCallable$h;
270
- var isObject$6 = isObject$7;
300
+ var isObject$7 = isObject$8;
271
301
 
272
302
  var $TypeError$4 = TypeError;
273
303
 
@@ -275,9 +305,9 @@ var $TypeError$4 = TypeError;
275
305
  // https://tc39.es/ecma262/#sec-ordinarytoprimitive
276
306
  var ordinaryToPrimitive$1 = function (input, pref) {
277
307
  var fn, val;
278
- if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
279
- if (isCallable$c(fn = input.valueOf) && !isObject$6(val = call$6(fn, input))) return val;
280
- if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$6(val = call$6(fn, input))) return val;
308
+ if (pref === 'string' && isCallable$c(fn = input.toString) && !isObject$7(val = call$6(fn, input))) return val;
309
+ if (isCallable$c(fn = input.valueOf) && !isObject$7(val = call$6(fn, input))) return val;
310
+ if (pref !== 'string' && isCallable$c(fn = input.toString) && !isObject$7(val = call$6(fn, input))) return val;
281
311
  throw $TypeError$4("Can't convert object to primitive value");
282
312
  };
283
313
 
@@ -285,7 +315,7 @@ var shared$4 = {exports: {}};
285
315
 
286
316
  var global$d = global$g;
287
317
 
288
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
318
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
289
319
  var defineProperty$7 = Object.defineProperty;
290
320
 
291
321
  var defineGlobalProperty$3 = function (key, value) {
@@ -309,10 +339,10 @@ var store$2 = sharedStore;
309
339
  (shared$4.exports = function (key, value) {
310
340
  return store$2[key] || (store$2[key] = value !== undefined ? value : {});
311
341
  })('versions', []).push({
312
- version: '3.24.1',
342
+ version: '3.25.3',
313
343
  mode: 'global',
314
344
  copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
315
- license: 'https://github.com/zloirock/core-js/blob/v3.24.1/LICENSE',
345
+ license: 'https://github.com/zloirock/core-js/blob/v3.25.3/LICENSE',
316
346
  source: 'https://github.com/zloirock/core-js'
317
347
  });
318
348
 
@@ -333,7 +363,7 @@ var hasOwnProperty = uncurryThis$a({}.hasOwnProperty);
333
363
 
334
364
  // `HasOwnProperty` abstract operation
335
365
  // https://tc39.es/ecma262/#sec-hasownproperty
336
- // eslint-disable-next-line es-x/no-object-hasown -- safe
366
+ // eslint-disable-next-line es/no-object-hasown -- safe
337
367
  var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
338
368
  return hasOwnProperty(toObject$2(it), key);
339
369
  };
@@ -352,7 +382,7 @@ var global$b = global$g;
352
382
  var shared$3 = shared$4.exports;
353
383
  var hasOwn$b = hasOwnProperty_1;
354
384
  var uid$1 = uid$2;
355
- var NATIVE_SYMBOL$1 = nativeSymbol;
385
+ var NATIVE_SYMBOL$1 = symbolConstructorDetection;
356
386
  var USE_SYMBOL_AS_UID = useSymbolAsUid;
357
387
 
358
388
  var WellKnownSymbolsStore = shared$3('wks');
@@ -374,7 +404,7 @@ var wellKnownSymbol$b = function (name) {
374
404
  };
375
405
 
376
406
  var call$5 = functionCall;
377
- var isObject$5 = isObject$7;
407
+ var isObject$6 = isObject$8;
378
408
  var isSymbol$1 = isSymbol$2;
379
409
  var getMethod = getMethod$1;
380
410
  var ordinaryToPrimitive = ordinaryToPrimitive$1;
@@ -386,13 +416,13 @@ var TO_PRIMITIVE = wellKnownSymbol$a('toPrimitive');
386
416
  // `ToPrimitive` abstract operation
387
417
  // https://tc39.es/ecma262/#sec-toprimitive
388
418
  var toPrimitive$1 = function (input, pref) {
389
- if (!isObject$5(input) || isSymbol$1(input)) return input;
419
+ if (!isObject$6(input) || isSymbol$1(input)) return input;
390
420
  var exoticToPrim = getMethod(input, TO_PRIMITIVE);
391
421
  var result;
392
422
  if (exoticToPrim) {
393
423
  if (pref === undefined) pref = 'default';
394
424
  result = call$5(exoticToPrim, input, pref);
395
- if (!isObject$5(result) || isSymbol$1(result)) return result;
425
+ if (!isObject$6(result) || isSymbol$1(result)) return result;
396
426
  throw $TypeError$3("Can't convert object to primitive value");
397
427
  }
398
428
  if (pref === undefined) pref = 'number';
@@ -410,11 +440,11 @@ var toPropertyKey$2 = function (argument) {
410
440
  };
411
441
 
412
442
  var global$a = global$g;
413
- var isObject$4 = isObject$7;
443
+ var isObject$5 = isObject$8;
414
444
 
415
445
  var document$1 = global$a.document;
416
446
  // typeof document.createElement is 'object' in old IE
417
- var EXISTS$1 = isObject$4(document$1) && isObject$4(document$1.createElement);
447
+ var EXISTS$1 = isObject$5(document$1) && isObject$5(document$1.createElement);
418
448
 
419
449
  var documentCreateElement$2 = function (it) {
420
450
  return EXISTS$1 ? document$1.createElement(it) : {};
@@ -426,7 +456,7 @@ var createElement = documentCreateElement$2;
426
456
 
427
457
  // Thanks to IE8 for its funny defineProperty
428
458
  var ie8DomDefine = !DESCRIPTORS$c && !fails$b(function () {
429
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
459
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
430
460
  return Object.defineProperty(createElement('div'), 'a', {
431
461
  get: function () { return 7; }
432
462
  }).a != 7;
@@ -441,7 +471,7 @@ var toPropertyKey$1 = toPropertyKey$2;
441
471
  var hasOwn$a = hasOwnProperty_1;
442
472
  var IE8_DOM_DEFINE$1 = ie8DomDefine;
443
473
 
444
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
474
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
445
475
  var $getOwnPropertyDescriptor$1 = Object.getOwnPropertyDescriptor;
446
476
 
447
477
  // `Object.getOwnPropertyDescriptor` method
@@ -463,21 +493,21 @@ var fails$a = fails$g;
463
493
  // V8 ~ Chrome 36-
464
494
  // https://bugs.chromium.org/p/v8/issues/detail?id=3334
465
495
  var v8PrototypeDefineBug = DESCRIPTORS$a && fails$a(function () {
466
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
496
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
467
497
  return Object.defineProperty(function () { /* empty */ }, 'prototype', {
468
498
  value: 42,
469
499
  writable: false
470
500
  }).prototype != 42;
471
501
  });
472
502
 
473
- var isObject$3 = isObject$7;
503
+ var isObject$4 = isObject$8;
474
504
 
475
505
  var $String$2 = String;
476
506
  var $TypeError$2 = TypeError;
477
507
 
478
508
  // `Assert: Type(argument) is Object`
479
509
  var anObject$7 = function (argument) {
480
- if (isObject$3(argument)) return argument;
510
+ if (isObject$4(argument)) return argument;
481
511
  throw $TypeError$2($String$2(argument) + ' is not an object');
482
512
  };
483
513
 
@@ -488,9 +518,9 @@ var anObject$6 = anObject$7;
488
518
  var toPropertyKey = toPropertyKey$2;
489
519
 
490
520
  var $TypeError$1 = TypeError;
491
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
521
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
492
522
  var $defineProperty = Object.defineProperty;
493
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
523
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
494
524
  var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;
495
525
  var ENUMERABLE = 'enumerable';
496
526
  var CONFIGURABLE$1 = 'configurable';
@@ -542,7 +572,7 @@ var DESCRIPTORS$7 = descriptors;
542
572
  var hasOwn$9 = hasOwnProperty_1;
543
573
 
544
574
  var FunctionPrototype = Function.prototype;
545
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
575
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
546
576
  var getDescriptor = DESCRIPTORS$7 && Object.getOwnPropertyDescriptor;
547
577
 
548
578
  var EXISTS = hasOwn$9(FunctionPrototype, 'name');
@@ -569,15 +599,14 @@ if (!isCallable$b(store$1.inspectSource)) {
569
599
  };
570
600
  }
571
601
 
572
- var inspectSource$2 = store$1.inspectSource;
602
+ var inspectSource$1 = store$1.inspectSource;
573
603
 
574
604
  var global$9 = global$g;
575
605
  var isCallable$a = isCallable$h;
576
- var inspectSource$1 = inspectSource$2;
577
606
 
578
607
  var WeakMap$1 = global$9.WeakMap;
579
608
 
580
- var nativeWeakMap = isCallable$a(WeakMap$1) && /native code/.test(inspectSource$1(WeakMap$1));
609
+ var weakMapBasicDetection = isCallable$a(WeakMap$1) && /native code/.test(String(WeakMap$1));
581
610
 
582
611
  var shared$2 = shared$4.exports;
583
612
  var uid = uid$2;
@@ -590,10 +619,10 @@ var sharedKey$3 = function (key) {
590
619
 
591
620
  var hiddenKeys$4 = {};
592
621
 
593
- var NATIVE_WEAK_MAP = nativeWeakMap;
622
+ var NATIVE_WEAK_MAP = weakMapBasicDetection;
594
623
  var global$8 = global$g;
595
624
  var uncurryThis$7 = functionUncurryThis;
596
- var isObject$2 = isObject$7;
625
+ var isObject$3 = isObject$8;
597
626
  var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
598
627
  var hasOwn$8 = hasOwnProperty_1;
599
628
  var shared$1 = sharedStore;
@@ -612,7 +641,7 @@ var enforce = function (it) {
612
641
  var getterFor = function (TYPE) {
613
642
  return function (it) {
614
643
  var state;
615
- if (!isObject$2(it) || (state = get(it)).type !== TYPE) {
644
+ if (!isObject$3(it) || (state = get(it)).type !== TYPE) {
616
645
  throw TypeError$1('Incompatible receiver, ' + TYPE + ' required');
617
646
  } return state;
618
647
  };
@@ -624,7 +653,7 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
624
653
  var wmhas = uncurryThis$7(store.has);
625
654
  var wmset = uncurryThis$7(store.set);
626
655
  set = function (it, metadata) {
627
- if (wmhas(store, it)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
656
+ if (wmhas(store, it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
628
657
  metadata.facade = it;
629
658
  wmset(store, it, metadata);
630
659
  return metadata;
@@ -639,7 +668,7 @@ if (NATIVE_WEAK_MAP || shared$1.state) {
639
668
  var STATE = sharedKey$2('state');
640
669
  hiddenKeys$3[STATE] = true;
641
670
  set = function (it, metadata) {
642
- if (hasOwn$8(it, STATE)) throw new TypeError$1(OBJECT_ALREADY_INITIALIZED);
671
+ if (hasOwn$8(it, STATE)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
643
672
  metadata.facade = it;
644
673
  createNonEnumerableProperty$4(it, STATE, metadata);
645
674
  return metadata;
@@ -665,12 +694,12 @@ var isCallable$9 = isCallable$h;
665
694
  var hasOwn$7 = hasOwnProperty_1;
666
695
  var DESCRIPTORS$6 = descriptors;
667
696
  var CONFIGURABLE_FUNCTION_NAME$1 = functionName.CONFIGURABLE;
668
- var inspectSource = inspectSource$2;
697
+ var inspectSource = inspectSource$1;
669
698
  var InternalStateModule$1 = internalState;
670
699
 
671
700
  var enforceInternalState$1 = InternalStateModule$1.enforce;
672
701
  var getInternalState$2 = InternalStateModule$1.get;
673
- // eslint-disable-next-line es-x/no-object-defineproperty -- safe
702
+ // eslint-disable-next-line es/no-object-defineproperty -- safe
674
703
  var defineProperty$6 = Object.defineProperty;
675
704
 
676
705
  var CONFIGURABLE_LENGTH = DESCRIPTORS$6 && !fails$9(function () {
@@ -745,7 +774,7 @@ var floor = Math.floor;
745
774
 
746
775
  // `Math.trunc` method
747
776
  // https://tc39.es/ecma262/#sec-math.trunc
748
- // eslint-disable-next-line es-x/no-math-trunc -- safe
777
+ // eslint-disable-next-line es/no-math-trunc -- safe
749
778
  var mathTrunc = Math.trunc || function trunc(x) {
750
779
  var n = +x;
751
780
  return (n > 0 ? floor : ceil)(n);
@@ -864,14 +893,14 @@ var hiddenKeys$1 = enumBugKeys$2.concat('length', 'prototype');
864
893
 
865
894
  // `Object.getOwnPropertyNames` method
866
895
  // https://tc39.es/ecma262/#sec-object.getownpropertynames
867
- // eslint-disable-next-line es-x/no-object-getownpropertynames -- safe
896
+ // eslint-disable-next-line es/no-object-getownpropertynames -- safe
868
897
  objectGetOwnPropertyNames.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
869
898
  return internalObjectKeys$1(O, hiddenKeys$1);
870
899
  };
871
900
 
872
901
  var objectGetOwnPropertySymbols = {};
873
902
 
874
- // eslint-disable-next-line es-x/no-object-getownpropertysymbols -- safe
903
+ // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
875
904
  objectGetOwnPropertySymbols.f = Object.getOwnPropertySymbols;
876
905
 
877
906
  var getBuiltIn$2 = getBuiltIn$5;
@@ -1067,8 +1096,8 @@ if (DESCRIPTORS$5 && isCallable$5(NativeSymbol) && (!('description' in SymbolPro
1067
1096
  SymbolPrototype.constructor = SymbolWrapper;
1068
1097
 
1069
1098
  var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)';
1070
- var symbolToString = uncurryThis$4(SymbolPrototype.toString);
1071
- var symbolValueOf = uncurryThis$4(SymbolPrototype.valueOf);
1099
+ var thisSymbolValue = uncurryThis$4(SymbolPrototype.valueOf);
1100
+ var symbolDescriptiveString = uncurryThis$4(SymbolPrototype.toString);
1072
1101
  var regexp = /^Symbol\((.*)\)[^)]+$/;
1073
1102
  var replace$2 = uncurryThis$4(''.replace);
1074
1103
  var stringSlice$2 = uncurryThis$4(''.slice);
@@ -1076,9 +1105,9 @@ if (DESCRIPTORS$5 && isCallable$5(NativeSymbol) && (!('description' in SymbolPro
1076
1105
  defineProperty$5(SymbolPrototype, 'description', {
1077
1106
  configurable: true,
1078
1107
  get: function description() {
1079
- var symbol = symbolValueOf(this);
1080
- var string = symbolToString(symbol);
1108
+ var symbol = thisSymbolValue(this);
1081
1109
  if (hasOwn$4(EmptyStringDescriptionStore, symbol)) return '';
1110
+ var string = symbolDescriptiveString(symbol);
1082
1111
  var desc = NATIVE_SYMBOL ? stringSlice$2(string, 7, -1) : replace$2(string, regexp, '$1');
1083
1112
  return desc === '' ? undefined : desc;
1084
1113
  }
@@ -1094,7 +1123,7 @@ var enumBugKeys$1 = enumBugKeys$3;
1094
1123
 
1095
1124
  // `Object.keys` method
1096
1125
  // https://tc39.es/ecma262/#sec-object.keys
1097
- // eslint-disable-next-line es-x/no-object-keys -- safe
1126
+ // eslint-disable-next-line es/no-object-keys -- safe
1098
1127
  var objectKeys$2 = Object.keys || function keys(O) {
1099
1128
  return internalObjectKeys(O, enumBugKeys$1);
1100
1129
  };
@@ -1109,9 +1138,9 @@ var propertyIsEnumerableModule = objectPropertyIsEnumerable;
1109
1138
  var toObject$1 = toObject$3;
1110
1139
  var IndexedObject = indexedObject;
1111
1140
 
1112
- // eslint-disable-next-line es-x/no-object-assign -- safe
1141
+ // eslint-disable-next-line es/no-object-assign -- safe
1113
1142
  var $assign = Object.assign;
1114
- // eslint-disable-next-line es-x/no-object-defineproperty -- required for testing
1143
+ // eslint-disable-next-line es/no-object-defineproperty -- required for testing
1115
1144
  var defineProperty$4 = Object.defineProperty;
1116
1145
  var concat = uncurryThis$3([].concat);
1117
1146
 
@@ -1131,7 +1160,7 @@ var objectAssign = !$assign || fails$7(function () {
1131
1160
  // should work with symbols and should have deterministic property order (V8 bug)
1132
1161
  var A = {};
1133
1162
  var B = {};
1134
- // eslint-disable-next-line es-x/no-symbol -- safe
1163
+ // eslint-disable-next-line es/no-symbol -- safe
1135
1164
  var symbol = Symbol();
1136
1165
  var alphabet = 'abcdefghijklmnopqrst';
1137
1166
  A[symbol] = 7;
@@ -1161,7 +1190,7 @@ var assign = objectAssign;
1161
1190
 
1162
1191
  // `Object.assign` method
1163
1192
  // https://tc39.es/ecma262/#sec-object.assign
1164
- // eslint-disable-next-line es-x/no-object-assign -- required for testing
1193
+ // eslint-disable-next-line es/no-object-assign -- required for testing
1165
1194
  $$2({ target: 'Object', stat: true, arity: 2, forced: Object.assign !== assign }, {
1166
1195
  assign: assign
1167
1196
  });
@@ -1177,7 +1206,7 @@ var objectKeys = objectKeys$2;
1177
1206
 
1178
1207
  // `Object.defineProperties` method
1179
1208
  // https://tc39.es/ecma262/#sec-object.defineproperties
1180
- // eslint-disable-next-line es-x/no-object-defineproperties -- safe
1209
+ // eslint-disable-next-line es/no-object-defineproperties -- safe
1181
1210
  objectDefineProperties.f = DESCRIPTORS$3 && !V8_PROTOTYPE_DEFINE_BUG ? Object.defineProperties : function defineProperties(O, Properties) {
1182
1211
  anObject$4(O);
1183
1212
  var props = toIndexedObject$1(Properties);
@@ -1265,7 +1294,7 @@ hiddenKeys[IE_PROTO$1] = true;
1265
1294
 
1266
1295
  // `Object.create` method
1267
1296
  // https://tc39.es/ecma262/#sec-object.create
1268
- // eslint-disable-next-line es-x/no-object-create -- safe
1297
+ // eslint-disable-next-line es/no-object-create -- safe
1269
1298
  var objectCreate = Object.create || function create(O, Properties) {
1270
1299
  var result;
1271
1300
  if (O !== null) {
@@ -1306,7 +1335,7 @@ var fails$6 = fails$g;
1306
1335
  var correctPrototypeGetter = !fails$6(function () {
1307
1336
  function F() { /* empty */ }
1308
1337
  F.prototype.constructor = null;
1309
- // eslint-disable-next-line es-x/no-object-getprototypeof -- required for testing
1338
+ // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
1310
1339
  return Object.getPrototypeOf(new F()) !== F.prototype;
1311
1340
  });
1312
1341
 
@@ -1322,7 +1351,7 @@ var ObjectPrototype = $Object.prototype;
1322
1351
 
1323
1352
  // `Object.getPrototypeOf` method
1324
1353
  // https://tc39.es/ecma262/#sec-object.getprototypeof
1325
- // eslint-disable-next-line es-x/no-object-getprototypeof -- safe
1354
+ // eslint-disable-next-line es/no-object-getprototypeof -- safe
1326
1355
  var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : function (O) {
1327
1356
  var object = toObject(O);
1328
1357
  if (hasOwn$3(object, IE_PROTO)) return object[IE_PROTO];
@@ -1334,6 +1363,7 @@ var objectGetPrototypeOf = CORRECT_PROTOTYPE_GETTER ? $Object.getPrototypeOf : f
1334
1363
 
1335
1364
  var fails$5 = fails$g;
1336
1365
  var isCallable$3 = isCallable$h;
1366
+ var isObject$2 = isObject$8;
1337
1367
  var getPrototypeOf$1 = objectGetPrototypeOf;
1338
1368
  var defineBuiltIn$3 = defineBuiltIn$5;
1339
1369
  var wellKnownSymbol$6 = wellKnownSymbol$b;
@@ -1345,7 +1375,7 @@ var BUGGY_SAFARI_ITERATORS$1 = false;
1345
1375
  // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
1346
1376
  var IteratorPrototype$2, PrototypeOfArrayIteratorPrototype, arrayIterator;
1347
1377
 
1348
- /* eslint-disable es-x/no-array-prototype-keys -- safe */
1378
+ /* eslint-disable es/no-array-prototype-keys -- safe */
1349
1379
  if ([].keys) {
1350
1380
  arrayIterator = [].keys();
1351
1381
  // Safari 8 has buggy iterators w/o `next`
@@ -1356,7 +1386,7 @@ if ([].keys) {
1356
1386
  }
1357
1387
  }
1358
1388
 
1359
- var NEW_ITERATOR_PROTOTYPE = IteratorPrototype$2 == undefined || fails$5(function () {
1389
+ var NEW_ITERATOR_PROTOTYPE = !isObject$2(IteratorPrototype$2) || fails$5(function () {
1360
1390
  var test = {};
1361
1391
  // FF44- legacy iterators case
1362
1392
  return IteratorPrototype$2[ITERATOR$2].call(test) !== test;
@@ -1398,7 +1428,7 @@ var Iterators$2 = iterators;
1398
1428
 
1399
1429
  var returnThis$1 = function () { return this; };
1400
1430
 
1401
- var createIteratorConstructor$1 = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1431
+ var iteratorCreateConstructor = function (IteratorConstructor, NAME, next, ENUMERABLE_NEXT) {
1402
1432
  var TO_STRING_TAG = NAME + ' Iterator';
1403
1433
  IteratorConstructor.prototype = create$1(IteratorPrototype$1, { next: createPropertyDescriptor(+!ENUMERABLE_NEXT, next) });
1404
1434
  setToStringTag$1(IteratorConstructor, TO_STRING_TAG, false);
@@ -1425,13 +1455,13 @@ var aPossiblePrototype = aPossiblePrototype$1;
1425
1455
  // `Object.setPrototypeOf` method
1426
1456
  // https://tc39.es/ecma262/#sec-object.setprototypeof
1427
1457
  // Works with __proto__ only. Old v8 can't work with null proto objects.
1428
- // eslint-disable-next-line es-x/no-object-setprototypeof -- safe
1458
+ // eslint-disable-next-line es/no-object-setprototypeof -- safe
1429
1459
  var objectSetPrototypeOf = Object.setPrototypeOf || ('__proto__' in {} ? function () {
1430
1460
  var CORRECT_SETTER = false;
1431
1461
  var test = {};
1432
1462
  var setter;
1433
1463
  try {
1434
- // eslint-disable-next-line es-x/no-object-getownpropertydescriptor -- safe
1464
+ // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
1435
1465
  setter = uncurryThis$2(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set);
1436
1466
  setter(test, []);
1437
1467
  CORRECT_SETTER = test instanceof Array;
@@ -1449,7 +1479,7 @@ var $$1 = _export;
1449
1479
  var call$2 = functionCall;
1450
1480
  var FunctionName = functionName;
1451
1481
  var isCallable$1 = isCallable$h;
1452
- var createIteratorConstructor = createIteratorConstructor$1;
1482
+ var createIteratorConstructor = iteratorCreateConstructor;
1453
1483
  var getPrototypeOf = objectGetPrototypeOf;
1454
1484
  var setPrototypeOf$1 = objectSetPrototypeOf;
1455
1485
  var setToStringTag = setToStringTag$2;
@@ -1470,7 +1500,7 @@ var ENTRIES = 'entries';
1470
1500
 
1471
1501
  var returnThis = function () { return this; };
1472
1502
 
1473
- var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1503
+ var iteratorDefine = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {
1474
1504
  createIteratorConstructor(IteratorConstructor, NAME, next);
1475
1505
 
1476
1506
  var getIterationMethod = function (KIND) {
@@ -1542,12 +1572,19 @@ var defineIterator$1 = function (Iterable, NAME, IteratorConstructor, next, DEFA
1542
1572
  return methods;
1543
1573
  };
1544
1574
 
1575
+ // `CreateIterResultObject` abstract operation
1576
+ // https://tc39.es/ecma262/#sec-createiterresultobject
1577
+ var createIterResultObject$1 = function (value, done) {
1578
+ return { value: value, done: done };
1579
+ };
1580
+
1545
1581
  var toIndexedObject = toIndexedObject$5;
1546
1582
  var addToUnscopables = addToUnscopables$1;
1547
1583
  var Iterators = iterators;
1548
1584
  var InternalStateModule = internalState;
1549
1585
  var defineProperty$1 = objectDefineProperty.f;
1550
- var defineIterator = defineIterator$1;
1586
+ var defineIterator = iteratorDefine;
1587
+ var createIterResultObject = createIterResultObject$1;
1551
1588
  var DESCRIPTORS$2 = descriptors;
1552
1589
 
1553
1590
  var ARRAY_ITERATOR = 'Array Iterator';
@@ -1580,11 +1617,11 @@ var es_array_iterator = defineIterator(Array, 'Array', function (iterated, kind)
1580
1617
  var index = state.index++;
1581
1618
  if (!target || index >= target.length) {
1582
1619
  state.target = undefined;
1583
- return { value: undefined, done: true };
1620
+ return createIterResultObject(undefined, true);
1584
1621
  }
1585
- if (kind == 'keys') return { value: index, done: false };
1586
- if (kind == 'values') return { value: target[index], done: false };
1587
- return { value: [index, target[index]], done: false };
1622
+ if (kind == 'keys') return createIterResultObject(index, false);
1623
+ if (kind == 'values') return createIterResultObject(target[index], false);
1624
+ return createIterResultObject([index, target[index]], false);
1588
1625
  }, 'values');
1589
1626
 
1590
1627
  // argumentsList[@@iterator] is %ArrayProto_values%
@@ -1725,11 +1762,11 @@ var getRegExpFlags$1 = regexpGetFlags;
1725
1762
 
1726
1763
  var TO_STRING = 'toString';
1727
1764
  var RegExpPrototype$1 = RegExp.prototype;
1728
- var n$ToString = RegExpPrototype$1[TO_STRING];
1765
+ var nativeToString = RegExpPrototype$1[TO_STRING];
1729
1766
 
1730
- var NOT_GENERIC = fails$4(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1767
+ var NOT_GENERIC = fails$4(function () { return nativeToString.call({ source: 'a', flags: 'b' }) != '/a/b'; });
1731
1768
  // FF44- RegExp#toString has a wrong name
1732
- var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING;
1769
+ var INCORRECT_NAME = PROPER_FUNCTION_NAME && nativeToString.name != TO_STRING;
1733
1770
 
1734
1771
  // `RegExp.prototype.toString` method
1735
1772
  // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
@@ -1939,7 +1976,7 @@ const DropdownCustomField = ({
1939
1976
  };
1940
1977
 
1941
1978
  var isCallable = isCallable$h;
1942
- var isObject$1 = isObject$7;
1979
+ var isObject$1 = isObject$8;
1943
1980
  var setPrototypeOf = objectSetPrototypeOf;
1944
1981
 
1945
1982
  // makes subclassing work correct for wrapped built-ins
@@ -1957,7 +1994,7 @@ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
1957
1994
  return $this;
1958
1995
  };
1959
1996
 
1960
- var isObject = isObject$7;
1997
+ var isObject = isObject$8;
1961
1998
  var classof = classofRaw$1;
1962
1999
  var wellKnownSymbol$2 = wellKnownSymbol$b;
1963
2000
 
@@ -2464,7 +2501,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2464
2501
 
2465
2502
  const key = (_b = fieldId !== null && fieldId !== void 0 ? fieldId : field.definition.key) !== null && _b !== void 0 ? _b : "";
2466
2503
  const fieldError = key ? validation.formState.errors[key] : undefined;
2467
- const errorMessage = fieldError === null || fieldError === void 0 ? void 0 : fieldError.message;
2504
+ const errorMessage = fieldError ? fieldError.message + "" : undefined;
2468
2505
  const {
2469
2506
  type,
2470
2507
  description,
@@ -2488,7 +2525,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2488
2525
  type: "WEB_ADDRESS"
2489
2526
  }),
2490
2527
  readOnly: !typedDefinition.uiEditable,
2491
- helpText: description || undefined,
2528
+ helpText: description,
2492
2529
  errorMessage: errorMessage
2493
2530
  }, validation.register(key, rules)));
2494
2531
  }
@@ -2508,7 +2545,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2508
2545
  type: "EMAIL"
2509
2546
  }),
2510
2547
  readOnly: !typedDefinition.uiEditable,
2511
- helpText: description || undefined,
2548
+ helpText: description,
2512
2549
  errorMessage: errorMessage
2513
2550
  }, validation.register(key, rules)));
2514
2551
  }
@@ -2528,7 +2565,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2528
2565
  type: "PHONE_NUMBER"
2529
2566
  }),
2530
2567
  readOnly: !typedDefinition.uiEditable,
2531
- helpText: description || undefined,
2568
+ helpText: description,
2532
2569
  errorMessage: errorMessage === "" ? "Must be a phone number" : undefined
2533
2570
  }, validation.register(key, rules)));
2534
2571
  }
@@ -2544,7 +2581,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2544
2581
  placeholder: (_q = typedDefinition.title) !== null && _q !== void 0 ? _q : "",
2545
2582
  defaultValue: (_s = (_r = typedValue.stringValue) !== null && _r !== void 0 ? _r : typedDefinition.defaultStringValue) !== null && _s !== void 0 ? _s : "",
2546
2583
  readOnly: !typedDefinition.uiEditable,
2547
- helpText: description || undefined,
2584
+ helpText: description,
2548
2585
  errorMessage: errorMessage,
2549
2586
  dataTestId: `stringField`
2550
2587
  }, validation.register(key, rules)));
@@ -2590,7 +2627,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2590
2627
  readOnly: !typedDefinition.uiEditable,
2591
2628
  register: validation.register,
2592
2629
  validationRules: rules,
2593
- helpText: description || undefined,
2630
+ helpText: description,
2594
2631
  setValue: validation.setValue,
2595
2632
  errorMessage: errorMessage,
2596
2633
  dataTestId: "booleanField"
@@ -2611,7 +2648,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2611
2648
  multiSelect: (_4 = typedDefinition.multiSelect) !== null && _4 !== void 0 ? _4 : false,
2612
2649
  register: validation.register,
2613
2650
  validationRules: rules,
2614
- helpText: description || undefined,
2651
+ helpText: description,
2615
2652
  setValue: validation.setValue,
2616
2653
  errorMessage: errorMessage,
2617
2654
  dataTestId: "dropdownField"
@@ -2625,9 +2662,9 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2625
2662
  const rules = getDateValidationRules();
2626
2663
  let defaultValue;
2627
2664
 
2628
- if (typedValue.dateValue !== undefined && typedValue.dateValue !== null && typedValue.dateValue !== "") {
2665
+ if (typedValue.dateValue !== undefined && typedValue.dateValue !== null) {
2629
2666
  defaultValue = new Date(typedValue.dateValue);
2630
- } else if (typedDefinition.defaultDateValue !== undefined && typedDefinition.defaultDateValue !== null && typedDefinition.defaultDateValue !== "") {
2667
+ } else if (typedDefinition.defaultDateValue !== undefined && typedDefinition.defaultDateValue !== null) {
2631
2668
  defaultValue = new Date(typedDefinition.defaultDateValue);
2632
2669
  }
2633
2670
 
@@ -2639,7 +2676,7 @@ const useCustomFieldResolver = (field, validation, unitPreference = "SI", fieldI
2639
2676
  register: validation.register,
2640
2677
  label: typedDefinition.title || "",
2641
2678
  validationRules: rules,
2642
- helpText: description || undefined,
2679
+ helpText: description,
2643
2680
  errorMessage: errorMessage,
2644
2681
  setValue: validation.setValue
2645
2682
  }, key);
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "@trackunit/custom-field-components",
3
- "version": "0.0.127",
3
+ "version": "0.0.130",
4
4
  "repository": "https://github.com/Trackunit/manager",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "dependencies": {
7
- "@trackunit/react-core-contexts-test": "0.0.37",
8
- "@trackunit/react-components": "0.0.139",
9
- "react": "17.0.1",
10
- "react-hook-form": "^7.29.0",
11
- "@trackunit/iris-app-runtime-core": "0.0.67",
12
- "@trackunit/iris-app-runtime-core-api": "0.0.64",
7
+ "@trackunit/react-core-contexts-test": "0.0.38",
8
+ "@trackunit/react-components": "0.0.142",
9
+ "react": "17.0.2",
10
+ "react-hook-form": "^7.36.1",
11
+ "@trackunit/iris-app-runtime-core": "0.0.68",
12
+ "@trackunit/iris-app-runtime-core-api": "0.0.65",
13
13
  "react-select": "^5.4.0",
14
- "libphonenumber-js": "^1.10.7"
14
+ "libphonenumber-js": "^1.10.13"
15
15
  },
16
16
  "module": "./index.js",
17
17
  "main": "./index.js",