@trackunit/custom-field-components 0.0.134 → 0.0.139
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.js +47 -49
- package/package.json +5 -5
package/index.js
CHANGED
|
@@ -85,33 +85,40 @@ var createPropertyDescriptor$3 = function (bitmap, value) {
|
|
|
85
85
|
var NATIVE_BIND = functionBindNative;
|
|
86
86
|
|
|
87
87
|
var FunctionPrototype$1 = Function.prototype;
|
|
88
|
-
var bind = FunctionPrototype$1.bind;
|
|
89
88
|
var call$7 = FunctionPrototype$1.call;
|
|
90
|
-
var
|
|
89
|
+
var uncurryThisWithBind = NATIVE_BIND && FunctionPrototype$1.bind.bind(call$7, call$7);
|
|
91
90
|
|
|
92
|
-
var
|
|
93
|
-
return
|
|
94
|
-
} : function (fn) {
|
|
95
|
-
return fn && function () {
|
|
91
|
+
var functionUncurryThisRaw = function (fn) {
|
|
92
|
+
return NATIVE_BIND ? uncurryThisWithBind(fn) : function () {
|
|
96
93
|
return call$7.apply(fn, arguments);
|
|
97
94
|
};
|
|
98
95
|
};
|
|
99
96
|
|
|
100
|
-
var
|
|
97
|
+
var uncurryThisRaw$1 = functionUncurryThisRaw;
|
|
101
98
|
|
|
102
|
-
var toString$5 =
|
|
103
|
-
var stringSlice$3 =
|
|
99
|
+
var toString$5 = uncurryThisRaw$1({}.toString);
|
|
100
|
+
var stringSlice$3 = uncurryThisRaw$1(''.slice);
|
|
104
101
|
|
|
105
|
-
var classofRaw$
|
|
102
|
+
var classofRaw$2 = function (it) {
|
|
106
103
|
return stringSlice$3(toString$5(it), 8, -1);
|
|
107
104
|
};
|
|
108
105
|
|
|
109
|
-
var
|
|
106
|
+
var classofRaw$1 = classofRaw$2;
|
|
107
|
+
var uncurryThisRaw = functionUncurryThisRaw;
|
|
108
|
+
|
|
109
|
+
var functionUncurryThis = function (fn) {
|
|
110
|
+
// Nashorn bug:
|
|
111
|
+
// https://github.com/zloirock/core-js/issues/1128
|
|
112
|
+
// https://github.com/zloirock/core-js/issues/1130
|
|
113
|
+
if (classofRaw$1(fn) === 'Function') return uncurryThisRaw(fn);
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
var uncurryThis$b = functionUncurryThis;
|
|
110
117
|
var fails$d = fails$g;
|
|
111
|
-
var classof$3 = classofRaw$
|
|
118
|
+
var classof$3 = classofRaw$2;
|
|
112
119
|
|
|
113
120
|
var $Object$4 = Object;
|
|
114
|
-
var split = uncurryThis$
|
|
121
|
+
var split = uncurryThis$b(''.split);
|
|
115
122
|
|
|
116
123
|
// fallback for non-array-like ES3 and non-enumerable old V8 strings
|
|
117
124
|
var indexedObject = fails$d(function () {
|
|
@@ -191,9 +198,9 @@ var getBuiltIn$5 = function (namespace, method) {
|
|
|
191
198
|
return arguments.length < 2 ? aFunction(global$f[namespace]) : global$f[namespace] && global$f[namespace][method];
|
|
192
199
|
};
|
|
193
200
|
|
|
194
|
-
var uncurryThis$
|
|
201
|
+
var uncurryThis$a = functionUncurryThis;
|
|
195
202
|
|
|
196
|
-
var objectIsPrototypeOf = uncurryThis$
|
|
203
|
+
var objectIsPrototypeOf = uncurryThis$a({}.isPrototypeOf);
|
|
197
204
|
|
|
198
205
|
var getBuiltIn$4 = getBuiltIn$5;
|
|
199
206
|
|
|
@@ -339,10 +346,10 @@ var store$2 = sharedStore;
|
|
|
339
346
|
(shared$4.exports = function (key, value) {
|
|
340
347
|
return store$2[key] || (store$2[key] = value !== undefined ? value : {});
|
|
341
348
|
})('versions', []).push({
|
|
342
|
-
version: '3.25.
|
|
349
|
+
version: '3.25.5',
|
|
343
350
|
mode: 'global',
|
|
344
351
|
copyright: '© 2014-2022 Denis Pushkarev (zloirock.ru)',
|
|
345
|
-
license: 'https://github.com/zloirock/core-js/blob/v3.25.
|
|
352
|
+
license: 'https://github.com/zloirock/core-js/blob/v3.25.5/LICENSE',
|
|
346
353
|
source: 'https://github.com/zloirock/core-js'
|
|
347
354
|
});
|
|
348
355
|
|
|
@@ -356,10 +363,10 @@ var toObject$3 = function (argument) {
|
|
|
356
363
|
return $Object$2(requireObjectCoercible(argument));
|
|
357
364
|
};
|
|
358
365
|
|
|
359
|
-
var uncurryThis$
|
|
366
|
+
var uncurryThis$9 = functionUncurryThis;
|
|
360
367
|
var toObject$2 = toObject$3;
|
|
361
368
|
|
|
362
|
-
var hasOwnProperty = uncurryThis$
|
|
369
|
+
var hasOwnProperty = uncurryThis$9({}.hasOwnProperty);
|
|
363
370
|
|
|
364
371
|
// `HasOwnProperty` abstract operation
|
|
365
372
|
// https://tc39.es/ecma262/#sec-hasownproperty
|
|
@@ -368,11 +375,11 @@ var hasOwnProperty_1 = Object.hasOwn || function hasOwn(it, key) {
|
|
|
368
375
|
return hasOwnProperty(toObject$2(it), key);
|
|
369
376
|
};
|
|
370
377
|
|
|
371
|
-
var uncurryThis$
|
|
378
|
+
var uncurryThis$8 = functionUncurryThis;
|
|
372
379
|
|
|
373
380
|
var id = 0;
|
|
374
381
|
var postfix = Math.random();
|
|
375
|
-
var toString$4 = uncurryThis$
|
|
382
|
+
var toString$4 = uncurryThis$8(1.0.toString);
|
|
376
383
|
|
|
377
384
|
var uid$2 = function (key) {
|
|
378
385
|
return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString$4(++id + postfix, 36);
|
|
@@ -586,11 +593,11 @@ var functionName = {
|
|
|
586
593
|
CONFIGURABLE: CONFIGURABLE
|
|
587
594
|
};
|
|
588
595
|
|
|
589
|
-
var uncurryThis$
|
|
596
|
+
var uncurryThis$7 = functionUncurryThis;
|
|
590
597
|
var isCallable$b = isCallable$h;
|
|
591
598
|
var store$1 = sharedStore;
|
|
592
599
|
|
|
593
|
-
var functionToString = uncurryThis$
|
|
600
|
+
var functionToString = uncurryThis$7(Function.toString);
|
|
594
601
|
|
|
595
602
|
// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
|
|
596
603
|
if (!isCallable$b(store$1.inspectSource)) {
|
|
@@ -621,7 +628,6 @@ var hiddenKeys$4 = {};
|
|
|
621
628
|
|
|
622
629
|
var NATIVE_WEAK_MAP = weakMapBasicDetection;
|
|
623
630
|
var global$8 = global$g;
|
|
624
|
-
var uncurryThis$7 = functionUncurryThis;
|
|
625
631
|
var isObject$3 = isObject$8;
|
|
626
632
|
var createNonEnumerableProperty$4 = createNonEnumerableProperty$5;
|
|
627
633
|
var hasOwn$8 = hasOwnProperty_1;
|
|
@@ -649,20 +655,22 @@ var getterFor = function (TYPE) {
|
|
|
649
655
|
|
|
650
656
|
if (NATIVE_WEAK_MAP || shared$1.state) {
|
|
651
657
|
var store = shared$1.state || (shared$1.state = new WeakMap());
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
658
|
+
/* eslint-disable no-self-assign -- prototype methods protection */
|
|
659
|
+
store.get = store.get;
|
|
660
|
+
store.has = store.has;
|
|
661
|
+
store.set = store.set;
|
|
662
|
+
/* eslint-enable no-self-assign -- prototype methods protection */
|
|
655
663
|
set = function (it, metadata) {
|
|
656
|
-
if (
|
|
664
|
+
if (store.has(it)) throw TypeError$1(OBJECT_ALREADY_INITIALIZED);
|
|
657
665
|
metadata.facade = it;
|
|
658
|
-
|
|
666
|
+
store.set(it, metadata);
|
|
659
667
|
return metadata;
|
|
660
668
|
};
|
|
661
669
|
get = function (it) {
|
|
662
|
-
return
|
|
670
|
+
return store.get(it) || {};
|
|
663
671
|
};
|
|
664
672
|
has = function (it) {
|
|
665
|
-
return
|
|
673
|
+
return store.has(it);
|
|
666
674
|
};
|
|
667
675
|
} else {
|
|
668
676
|
var STATE = sharedKey$2('state');
|
|
@@ -1024,7 +1032,7 @@ var toStringTagSupport = String(test) === '[object z]';
|
|
|
1024
1032
|
|
|
1025
1033
|
var TO_STRING_TAG_SUPPORT = toStringTagSupport;
|
|
1026
1034
|
var isCallable$6 = isCallable$h;
|
|
1027
|
-
var classofRaw = classofRaw$
|
|
1035
|
+
var classofRaw = classofRaw$2;
|
|
1028
1036
|
var wellKnownSymbol$8 = wellKnownSymbol$b;
|
|
1029
1037
|
|
|
1030
1038
|
var TO_STRING_TAG$2 = wellKnownSymbol$8('toStringTag');
|
|
@@ -1869,15 +1877,6 @@ const BooleanCustomField = _a => {
|
|
|
1869
1877
|
}));
|
|
1870
1878
|
};
|
|
1871
1879
|
|
|
1872
|
-
const formatDateToString = date => {
|
|
1873
|
-
const month = date.getMonth() + 1;
|
|
1874
|
-
const mm = month.toString(10).length === 1 ? `0${month}` : month;
|
|
1875
|
-
const day = date.getDate();
|
|
1876
|
-
const dd = day.toString(10).length === 1 ? `0${day}` : day;
|
|
1877
|
-
const year = date.getFullYear();
|
|
1878
|
-
return `${year}-${mm}-${dd}`;
|
|
1879
|
-
};
|
|
1880
|
-
|
|
1881
1880
|
const DateCustomField = props => {
|
|
1882
1881
|
const {
|
|
1883
1882
|
setValue,
|
|
@@ -1888,10 +1887,10 @@ const DateCustomField = props => {
|
|
|
1888
1887
|
} = props,
|
|
1889
1888
|
rest = __rest(props, ["setValue", "defaultValue", "register", "id", "validationRules"]);
|
|
1890
1889
|
|
|
1891
|
-
const onChangeHandler = useCallback(
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1890
|
+
const onChangeHandler = useCallback(e => {
|
|
1891
|
+
var _a;
|
|
1892
|
+
|
|
1893
|
+
setValue && setValue(id, (_a = e.target.valueAsDate) === null || _a === void 0 ? void 0 : _a.toISOString());
|
|
1895
1894
|
}, [setValue, id]);
|
|
1896
1895
|
useEffect(() => {
|
|
1897
1896
|
const value = defaultValue && new Date(defaultValue);
|
|
@@ -1900,10 +1899,9 @@ const DateCustomField = props => {
|
|
|
1900
1899
|
}));
|
|
1901
1900
|
}, [register, validationRules, defaultValue, id]);
|
|
1902
1901
|
return jsx(DateField, Object.assign({}, rest, {
|
|
1903
|
-
|
|
1904
|
-
|
|
1902
|
+
helpAddon: props.helpAddon || null,
|
|
1903
|
+
helpText: props.errorMessage || props.helpText,
|
|
1905
1904
|
onChange: onChangeHandler,
|
|
1906
|
-
disabled: props.readOnly,
|
|
1907
1905
|
label: undefined
|
|
1908
1906
|
}));
|
|
1909
1907
|
};
|
|
@@ -1995,7 +1993,7 @@ var inheritIfRequired$1 = function ($this, dummy, Wrapper) {
|
|
|
1995
1993
|
};
|
|
1996
1994
|
|
|
1997
1995
|
var isObject = isObject$8;
|
|
1998
|
-
var classof = classofRaw$
|
|
1996
|
+
var classof = classofRaw$2;
|
|
1999
1997
|
var wellKnownSymbol$2 = wellKnownSymbol$b;
|
|
2000
1998
|
|
|
2001
1999
|
var MATCH$1 = wellKnownSymbol$2('match');
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trackunit/custom-field-components",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.139",
|
|
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.
|
|
8
|
-
"@trackunit/react-components": "0.0.
|
|
7
|
+
"@trackunit/react-core-contexts-test": "0.0.40",
|
|
8
|
+
"@trackunit/react-components": "0.0.151",
|
|
9
9
|
"react": "17.0.2",
|
|
10
10
|
"react-hook-form": "^7.36.1",
|
|
11
|
-
"@trackunit/iris-app-runtime-core": "0.0.
|
|
12
|
-
"@trackunit/iris-app-runtime-core-api": "0.0.
|
|
11
|
+
"@trackunit/iris-app-runtime-core": "0.0.69",
|
|
12
|
+
"@trackunit/iris-app-runtime-core-api": "0.0.66",
|
|
13
13
|
"react-select": "^5.4.0",
|
|
14
14
|
"libphonenumber-js": "^1.10.13"
|
|
15
15
|
},
|