@tsed/react-formio 1.11.2 → 1.13.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +2 -1
- package/craco.config.js +11 -1
- package/dist/components/alert/alert.component.spec.d.ts +1 -0
- package/dist/components/alert/alert.stories.d.ts +15 -0
- package/dist/components/form/form.component.d.ts +2 -0
- package/dist/components/form/form.stories.d.ts +37 -0
- package/dist/components/form/useForm.hook.d.ts +1 -0
- package/dist/components/form-action/formAction.stories.d.ts +90 -414
- package/dist/components/input-text/inputText.component.d.ts +1 -1
- package/dist/components/input-text/inputText.component.spec.d.ts +1 -0
- package/dist/components/select/select.component.spec.d.ts +1 -0
- package/dist/components/tabs/tabs.component.spec.d.ts +1 -0
- package/dist/index.js +110 -33
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +83 -32
- package/dist/index.modern.js.map +1 -1
- package/jest.config.js +1 -1
- package/package.json +5 -9
- package/readme.md +114 -86
- package/src/components/__fixtures__/form-schema.json +10 -42
- package/src/components/__fixtures__/form.fixture.json +1 -1
- package/src/components/actions-table/actionsTable.component.spec.tsx +4 -13
- package/src/components/actions-table/actionsTable.component.tsx +3 -11
- package/src/components/alert/alert.component.spec.tsx +97 -0
- package/src/components/alert/alert.component.tsx +2 -8
- package/src/components/alert/alert.stories.tsx +17 -0
- package/src/components/card/card.component.tsx +1 -5
- package/src/components/form/form.component.tsx +4 -8
- package/src/components/form/form.stories.tsx +66 -2
- package/src/components/form/useForm.hook.ts +29 -14
- package/src/components/form-access/formAccess.component.tsx +19 -82
- package/src/components/form-access/formAccess.schema.ts +7 -23
- package/src/components/form-access/formAccess.stories.tsx +2 -9
- package/src/components/form-access/formAccess.utils.spec.ts +4 -22
- package/src/components/form-access/formAccess.utils.ts +7 -29
- package/src/components/form-action/formAction.component.tsx +3 -19
- package/src/components/form-action/formAction.stories.tsx +251 -672
- package/src/components/form-builder/formBuilder.component.tsx +4 -13
- package/src/components/form-builder/formBuilder.stories.tsx +12 -24
- package/src/components/form-control/formControl.component.tsx +2 -8
- package/src/components/form-edit/formCtas.component.tsx +5 -23
- package/src/components/form-edit/formEdit.component.tsx +2 -20
- package/src/components/form-edit/formEdit.reducer.ts +2 -8
- package/src/components/form-edit/formEdit.stories.tsx +3 -15
- package/src/components/form-edit/formParameters.component.tsx +3 -20
- package/src/components/form-edit/useFormEdit.hook.ts +2 -9
- package/src/components/form-settings/formSettings.component.spec.tsx +2 -9
- package/src/components/form-settings/formSettings.component.tsx +6 -34
- package/src/components/form-settings/formSettings.stories.tsx +1 -6
- package/src/components/form-settings/formSettings.utils.spec.ts +1 -4
- package/src/components/form-settings/formSettings.utils.ts +2 -7
- package/src/components/forms-table/components/formCell.component.tsx +2 -6
- package/src/components/forms-table/formsTable.component.tsx +2 -7
- package/src/components/input-tags/inputTags.component.tsx +10 -34
- package/src/components/input-tags/inputTags.stories.tsx +4 -14
- package/src/components/input-text/inputText.component.spec.tsx +56 -0
- package/src/components/input-text/inputText.component.tsx +3 -4
- package/src/components/input-text/inputText.stories.tsx +6 -26
- package/src/components/loader/loader.component.tsx +2 -11
- package/src/components/modal/modal.component.spec.tsx +8 -14
- package/src/components/modal/modal.component.tsx +6 -27
- package/src/components/modal/modal.stories.tsx +1 -5
- package/src/components/modal/removeModal.component.tsx +4 -22
- package/src/components/pagination/pagination.component.spec.tsx +12 -38
- package/src/components/pagination/pagination.component.tsx +8 -41
- package/src/components/pagination/pagination.stories.tsx +1 -5
- package/src/components/react-component/reactComponent.component.tsx +3 -11
- package/src/components/select/select.component.spec.tsx +86 -0
- package/src/components/select/select.component.tsx +11 -15
- package/src/components/select/select.stories.tsx +6 -26
- package/src/components/submissions-table/submissionsTable.component.tsx +1 -3
- package/src/components/submissions-table/submissionsTable.stories.tsx +1 -1
- package/src/components/table/components/defaultArrowSort.component.tsx +1 -10
- package/src/components/table/components/defaultCell.component.tsx +1 -4
- package/src/components/table/components/defaultCellHeader.component.tsx +4 -14
- package/src/components/table/components/defaultCellOperations.component.tsx +14 -25
- package/src/components/table/components/defaultOperationButton.component.tsx +2 -10
- package/src/components/table/filters/defaultColumnFilter.component.spec.tsx +1 -1
- package/src/components/table/filters/selectColumnFilter.component.spec.tsx +2 -10
- package/src/components/table/filters/selectColumnFilter.component.tsx +2 -6
- package/src/components/table/table.component.tsx +13 -53
- package/src/components/table/table.stories.tsx +1 -1
- package/src/components/table/utils/getPageNumbers.ts +3 -11
- package/src/components/table/utils/mapFormToColumns.tsx +14 -22
- package/src/components/table/utils/useOperations.hook.tsx +2 -12
- package/src/components/tabs/tabs.component.spec.tsx +86 -0
- package/src/components/tabs/tabs.component.stories.tsx +2 -9
- package/src/components/tabs/tabs.component.tsx +9 -43
- package/src/interfaces/Operation.ts +1 -4
- package/src/react-table.d.ts +9 -28
- package/src/stores/action/action.actions.ts +31 -33
- package/src/stores/action/action.reducers.spec.ts +1 -8
- package/src/stores/action/action.reducers.ts +1 -8
- package/src/stores/action/action.selectors.ts +1 -2
- package/src/stores/action-info/action-info.actions.spec.ts +1 -5
- package/src/stores/action-info/action-info.actions.ts +16 -19
- package/src/stores/action-info/action-info.reducers.spec.ts +1 -6
- package/src/stores/action-info/action-info.reducers.ts +1 -6
- package/src/stores/action-info/action-info.selectors.ts +1 -4
- package/src/stores/actions/actions.actions.spec.ts +1 -6
- package/src/stores/actions/actions.actions.ts +16 -19
- package/src/stores/actions/actions.reducers.spec.ts +1 -6
- package/src/stores/actions/actions.reducers.ts +1 -6
- package/src/stores/actions/actions.selectors.ts +2 -4
- package/src/stores/auth/auth.reducers.ts +1 -4
- package/src/stores/auth/auth.selectors.spec.ts +1 -5
- package/src/stores/auth/auth.selectors.ts +3 -6
- package/src/stores/auth/auth.utils.tsx +2 -8
- package/src/stores/auth/getAccess.action.spec.ts +11 -54
- package/src/stores/auth/getAccess.action.ts +1 -6
- package/src/stores/auth/initAuth.action.ts +15 -17
- package/src/stores/form/form.actions.spec.ts +8 -39
- package/src/stores/form/form.actions.ts +55 -64
- package/src/stores/form/form.reducers.spec.ts +1 -7
- package/src/stores/form/form.reducers.ts +1 -8
- package/src/stores/form/form.selectors.ts +1 -2
- package/src/stores/forms/forms.actions.spec.ts +5 -18
- package/src/stores/forms/forms.actions.ts +17 -21
- package/src/stores/forms/forms.reducers.spec.ts +1 -6
- package/src/stores/forms/forms.reducers.ts +2 -13
- package/src/stores/forms/forms.selectors.ts +2 -4
- package/src/stores/index.spec.ts +6 -9
- package/src/stores/root/root.selectors.spec.ts +1 -6
- package/src/stores/root/root.selectors.ts +6 -24
- package/src/stores/submission/submission.actions.spec.ts +11 -33
- package/src/stores/submission/submission.actions.ts +57 -66
- package/src/stores/submission/submission.reducers.spec.ts +17 -27
- package/src/stores/submission/submission.reducers.ts +1 -4
- package/src/stores/submission/submission.selectors.ts +1 -4
- package/src/stores/submissions/submissions.actions.spec.ts +5 -18
- package/src/stores/submissions/submissions.actions.ts +17 -26
- package/src/stores/submissions/submissions.reducers.spec.ts +3 -12
- package/src/stores/submissions/submissions.reducers.ts +3 -17
- package/src/stores/submissions/submissions.selectors.spec.ts +1 -4
- package/src/stores/submissions/submissions.selectors.ts +2 -4
- package/src/utils/getEventValue.ts +1 -4
- package/src/utils/iconClass.ts +2 -10
- package/src/utils/mapPagination.ts +1 -6
- package/src/utils/mapRequestParams.ts +2 -12
- package/src/utils/url.test.ts +4 -12
- package/src/utils/url.ts +2 -7
- package/tsconfig.json +4 -12
- package/tsconfig.test.json +1 -1
- package/.eslintrc +0 -47
- package/.prettierrc +0 -10
package/dist/index.modern.js
CHANGED
|
@@ -1227,7 +1227,7 @@ function Select(_ref) {
|
|
|
1227
1227
|
onChange,
|
|
1228
1228
|
required,
|
|
1229
1229
|
value,
|
|
1230
|
-
choices
|
|
1230
|
+
choices,
|
|
1231
1231
|
description,
|
|
1232
1232
|
placeholder,
|
|
1233
1233
|
prefix,
|
|
@@ -1490,9 +1490,10 @@ function InputText(_ref) {
|
|
|
1490
1490
|
prefix,
|
|
1491
1491
|
suffix,
|
|
1492
1492
|
description,
|
|
1493
|
-
className
|
|
1493
|
+
className,
|
|
1494
|
+
placeholder
|
|
1494
1495
|
} = _ref,
|
|
1495
|
-
props = _objectWithoutPropertiesLoose(_ref, ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className"]);
|
|
1496
|
+
props = _objectWithoutPropertiesLoose(_ref, ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className", "placeholder"]);
|
|
1496
1497
|
|
|
1497
1498
|
const [localValue, setValue] = useState(value);
|
|
1498
1499
|
const change = useMemo(() => callLast(onChange, 300), [onChange]);
|
|
@@ -1515,6 +1516,7 @@ function InputText(_ref) {
|
|
|
1515
1516
|
id: name,
|
|
1516
1517
|
required: required,
|
|
1517
1518
|
value: localValue || "",
|
|
1519
|
+
placeholder: placeholder,
|
|
1518
1520
|
onChange: event => {
|
|
1519
1521
|
const value = getEventValue(event);
|
|
1520
1522
|
setValue(value);
|
|
@@ -1601,7 +1603,7 @@ function DefaultCellOperations({
|
|
|
1601
1603
|
className: 'btn-group'
|
|
1602
1604
|
}, operations.filter(({
|
|
1603
1605
|
permissionsResolver
|
|
1604
|
-
}) => !permissionsResolver || permissionsResolver(data, ctx)).map(
|
|
1606
|
+
}) => !permissionsResolver || permissionsResolver(data, ctx)).map(_ref => {
|
|
1605
1607
|
let {
|
|
1606
1608
|
OperationButton = DefaultOperationButton
|
|
1607
1609
|
} = _ref,
|
|
@@ -1926,12 +1928,29 @@ function useForm(props) {
|
|
|
1926
1928
|
const instance = useRef();
|
|
1927
1929
|
const events = useRef(new Map());
|
|
1928
1930
|
|
|
1931
|
+
async function customValidation(submission, callback) {
|
|
1932
|
+
if (events.current.has("onAsyncSubmit")) {
|
|
1933
|
+
try {
|
|
1934
|
+
await events.current.get("onAsyncSubmit")(submission);
|
|
1935
|
+
} catch (err) {
|
|
1936
|
+
callback((err == null ? void 0 : err.errors) || err);
|
|
1937
|
+
}
|
|
1938
|
+
} else {
|
|
1939
|
+
callback(null);
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
|
|
1929
1943
|
const createWebForm = (srcOrForm, options) => {
|
|
1930
1944
|
options = Object.assign({}, options);
|
|
1931
1945
|
srcOrForm = typeof srcOrForm === "string" ? srcOrForm : cloneDeep(srcOrForm);
|
|
1932
1946
|
|
|
1933
1947
|
if (!instance.current) {
|
|
1948
|
+
var _options, _options$hooks;
|
|
1949
|
+
|
|
1934
1950
|
isLoaded.current = false;
|
|
1951
|
+
options.hooks = _extends({}, options.hooks || {}, {
|
|
1952
|
+
customValidation: ((_options = options) == null ? void 0 : (_options$hooks = _options.hooks) == null ? void 0 : _options$hooks.customValidation) || customValidation
|
|
1953
|
+
});
|
|
1935
1954
|
instance.current = new Form$1(element.current, srcOrForm, options);
|
|
1936
1955
|
instance.current.onAny((event, ...args) => {
|
|
1937
1956
|
if (!instance.current) {
|
|
@@ -1954,7 +1973,8 @@ function useForm(props) {
|
|
|
1954
1973
|
events.current.set(funcName, fn);
|
|
1955
1974
|
}
|
|
1956
1975
|
|
|
1957
|
-
|
|
1976
|
+
instance.current.instance.setAlert("success", "");
|
|
1977
|
+
events.current.get(funcName)(...args, instance.current);
|
|
1958
1978
|
}
|
|
1959
1979
|
}
|
|
1960
1980
|
});
|
|
@@ -2013,6 +2033,9 @@ function useForm(props) {
|
|
|
2013
2033
|
useEffect(() => {
|
|
2014
2034
|
props.onSubmit && events.current.set("onSubmit", props.onSubmit);
|
|
2015
2035
|
}, [props.onSubmit, events]);
|
|
2036
|
+
useEffect(() => {
|
|
2037
|
+
props.onAsyncSubmit && events.current.set("onAsyncSubmit", props.onAsyncSubmit);
|
|
2038
|
+
}, [props.onAsyncSubmit, events]);
|
|
2016
2039
|
useEffect(() => {
|
|
2017
2040
|
props.onSubmitDone && events.current.set("onSubmitDone", props.onSubmitDone);
|
|
2018
2041
|
}, [props.onSubmitDone, events]);
|
|
@@ -2064,7 +2087,8 @@ Form.propTypes = {
|
|
|
2064
2087
|
noAlerts: PropTypes.bool,
|
|
2065
2088
|
i18n: PropTypes.any,
|
|
2066
2089
|
template: PropTypes.string,
|
|
2067
|
-
saveDraft: PropTypes.bool
|
|
2090
|
+
saveDraft: PropTypes.bool,
|
|
2091
|
+
hooks: PropTypes.any
|
|
2068
2092
|
}),
|
|
2069
2093
|
onPrevPage: PropTypes.func,
|
|
2070
2094
|
onNextPage: PropTypes.func,
|
|
@@ -2073,6 +2097,7 @@ Form.propTypes = {
|
|
|
2073
2097
|
onCustomEvent: PropTypes.func,
|
|
2074
2098
|
onComponentChange: PropTypes.func,
|
|
2075
2099
|
onSubmit: PropTypes.func,
|
|
2100
|
+
onAsyncSubmit: PropTypes.func,
|
|
2076
2101
|
onSubmitDone: PropTypes.func,
|
|
2077
2102
|
onFormLoad: PropTypes.func,
|
|
2078
2103
|
onError: PropTypes.func,
|
|
@@ -2564,7 +2589,8 @@ class FormBuilder extends React.Component {
|
|
|
2564
2589
|
var _this$builderRef;
|
|
2565
2590
|
|
|
2566
2591
|
(_this$builderRef = this.builderRef) == null ? void 0 : _this$builderRef.destroy();
|
|
2567
|
-
}
|
|
2592
|
+
} // eslint-disable-next-line react/no-deprecated
|
|
2593
|
+
|
|
2568
2594
|
|
|
2569
2595
|
async componentWillReceiveProps(nextProps) {
|
|
2570
2596
|
if (this.builderRef) {
|
|
@@ -3303,9 +3329,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
3303
3329
|
|
|
3304
3330
|
function map(arr, fn) {
|
|
3305
3331
|
var res = [],
|
|
3306
|
-
i
|
|
3332
|
+
i,
|
|
3333
|
+
arrLen = arr.length;
|
|
3307
3334
|
|
|
3308
|
-
for (i = 0; i <
|
|
3335
|
+
for (i = 0; i < arrLen; ++i) {
|
|
3309
3336
|
res.push(fn(arr[i], i));
|
|
3310
3337
|
}
|
|
3311
3338
|
|
|
@@ -3424,7 +3451,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
3424
3451
|
updateInProgress = false;
|
|
3425
3452
|
|
|
3426
3453
|
function copyConfig(to, from) {
|
|
3427
|
-
var i,
|
|
3454
|
+
var i,
|
|
3455
|
+
prop,
|
|
3456
|
+
val,
|
|
3457
|
+
momentPropertiesLen = momentProperties.length;
|
|
3428
3458
|
|
|
3429
3459
|
if (!isUndefined(from._isAMomentObject)) {
|
|
3430
3460
|
to._isAMomentObject = from._isAMomentObject;
|
|
@@ -3466,8 +3496,8 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
3466
3496
|
to._locale = from._locale;
|
|
3467
3497
|
}
|
|
3468
3498
|
|
|
3469
|
-
if (
|
|
3470
|
-
for (i = 0; i <
|
|
3499
|
+
if (momentPropertiesLen > 0) {
|
|
3500
|
+
for (i = 0; i < momentPropertiesLen; i++) {
|
|
3471
3501
|
prop = momentProperties[i];
|
|
3472
3502
|
val = from[prop];
|
|
3473
3503
|
|
|
@@ -3519,9 +3549,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
3519
3549
|
var args = [],
|
|
3520
3550
|
arg,
|
|
3521
3551
|
i,
|
|
3522
|
-
key
|
|
3552
|
+
key,
|
|
3553
|
+
argLen = arguments.length;
|
|
3523
3554
|
|
|
3524
|
-
for (i = 0; i <
|
|
3555
|
+
for (i = 0; i < argLen; i++) {
|
|
3525
3556
|
arg = '';
|
|
3526
3557
|
|
|
3527
3558
|
if (typeof arguments[i] === 'object') {
|
|
@@ -3951,9 +3982,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
3951
3982
|
if (typeof units === 'object') {
|
|
3952
3983
|
units = normalizeObjectUnits(units);
|
|
3953
3984
|
var prioritized = getPrioritizedUnits(units),
|
|
3954
|
-
i
|
|
3985
|
+
i,
|
|
3986
|
+
prioritizedLen = prioritized.length;
|
|
3955
3987
|
|
|
3956
|
-
for (i = 0; i <
|
|
3988
|
+
for (i = 0; i < prioritizedLen; i++) {
|
|
3957
3989
|
this[prioritized[i].unit](units[prioritized[i].unit]);
|
|
3958
3990
|
}
|
|
3959
3991
|
} else {
|
|
@@ -4034,7 +4066,8 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4034
4066
|
|
|
4035
4067
|
function addParseToken(token, callback) {
|
|
4036
4068
|
var i,
|
|
4037
|
-
func = callback
|
|
4069
|
+
func = callback,
|
|
4070
|
+
tokenLen;
|
|
4038
4071
|
|
|
4039
4072
|
if (typeof token === 'string') {
|
|
4040
4073
|
token = [token];
|
|
@@ -4046,7 +4079,9 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4046
4079
|
};
|
|
4047
4080
|
}
|
|
4048
4081
|
|
|
4049
|
-
|
|
4082
|
+
tokenLen = token.length;
|
|
4083
|
+
|
|
4084
|
+
for (i = 0; i < tokenLen; i++) {
|
|
4050
4085
|
tokens[token[i]] = func;
|
|
4051
4086
|
}
|
|
4052
4087
|
}
|
|
@@ -5132,11 +5167,16 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5132
5167
|
return globalLocale;
|
|
5133
5168
|
}
|
|
5134
5169
|
|
|
5170
|
+
function isLocaleNameSane(name) {
|
|
5171
|
+
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
|
|
5172
|
+
return name.match('^[^/\\\\]*$') != null;
|
|
5173
|
+
}
|
|
5174
|
+
|
|
5135
5175
|
function loadLocale(name) {
|
|
5136
5176
|
var oldLocale = null,
|
|
5137
5177
|
aliasedRequire; // TODO: Find a better way to register and load all the locales in Node
|
|
5138
5178
|
|
|
5139
|
-
if (locales[name] === undefined && 'object' !== 'undefined' && module && module.exports) {
|
|
5179
|
+
if (locales[name] === undefined && 'object' !== 'undefined' && module && module.exports && isLocaleNameSane(name)) {
|
|
5140
5180
|
try {
|
|
5141
5181
|
oldLocale = globalLocale._abbr;
|
|
5142
5182
|
aliasedRequire = commonjsRequire;
|
|
@@ -5368,12 +5408,14 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5368
5408
|
allowTime,
|
|
5369
5409
|
dateFormat,
|
|
5370
5410
|
timeFormat,
|
|
5371
|
-
tzFormat
|
|
5411
|
+
tzFormat,
|
|
5412
|
+
isoDatesLen = isoDates.length,
|
|
5413
|
+
isoTimesLen = isoTimes.length;
|
|
5372
5414
|
|
|
5373
5415
|
if (match) {
|
|
5374
5416
|
getParsingFlags(config).iso = true;
|
|
5375
5417
|
|
|
5376
|
-
for (i = 0, l =
|
|
5418
|
+
for (i = 0, l = isoDatesLen; i < l; i++) {
|
|
5377
5419
|
if (isoDates[i][1].exec(match[1])) {
|
|
5378
5420
|
dateFormat = isoDates[i][0];
|
|
5379
5421
|
allowTime = isoDates[i][2] !== false;
|
|
@@ -5387,7 +5429,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5387
5429
|
}
|
|
5388
5430
|
|
|
5389
5431
|
if (match[3]) {
|
|
5390
|
-
for (i = 0, l =
|
|
5432
|
+
for (i = 0, l = isoTimesLen; i < l; i++) {
|
|
5391
5433
|
if (isoTimes[i][1].exec(match[3])) {
|
|
5392
5434
|
// match[2] should be 'T' or space
|
|
5393
5435
|
timeFormat = (match[2] || ' ') + isoTimes[i][0];
|
|
@@ -5723,10 +5765,12 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5723
5765
|
skipped,
|
|
5724
5766
|
stringLength = string.length,
|
|
5725
5767
|
totalParsedInputLength = 0,
|
|
5726
|
-
era
|
|
5768
|
+
era,
|
|
5769
|
+
tokenLen;
|
|
5727
5770
|
tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
|
|
5771
|
+
tokenLen = tokens.length;
|
|
5728
5772
|
|
|
5729
|
-
for (i = 0; i <
|
|
5773
|
+
for (i = 0; i < tokenLen; i++) {
|
|
5730
5774
|
token = tokens[i];
|
|
5731
5775
|
parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
|
|
5732
5776
|
|
|
@@ -5819,15 +5863,16 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5819
5863
|
i,
|
|
5820
5864
|
currentScore,
|
|
5821
5865
|
validFormatFound,
|
|
5822
|
-
bestFormatIsValid = false
|
|
5866
|
+
bestFormatIsValid = false,
|
|
5867
|
+
configfLen = config._f.length;
|
|
5823
5868
|
|
|
5824
|
-
if (
|
|
5869
|
+
if (configfLen === 0) {
|
|
5825
5870
|
getParsingFlags(config).invalidFormat = true;
|
|
5826
5871
|
config._d = new Date(NaN);
|
|
5827
5872
|
return;
|
|
5828
5873
|
}
|
|
5829
5874
|
|
|
5830
|
-
for (i = 0; i <
|
|
5875
|
+
for (i = 0; i < configfLen; i++) {
|
|
5831
5876
|
currentScore = 0;
|
|
5832
5877
|
validFormatFound = false;
|
|
5833
5878
|
tempConfig = copyConfig({}, config);
|
|
@@ -6049,7 +6094,8 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6049
6094
|
function isDurationValid(m) {
|
|
6050
6095
|
var key,
|
|
6051
6096
|
unitHasDecimal = false,
|
|
6052
|
-
i
|
|
6097
|
+
i,
|
|
6098
|
+
orderLen = ordering.length;
|
|
6053
6099
|
|
|
6054
6100
|
for (key in m) {
|
|
6055
6101
|
if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
|
|
@@ -6057,7 +6103,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6057
6103
|
}
|
|
6058
6104
|
}
|
|
6059
6105
|
|
|
6060
|
-
for (i = 0; i <
|
|
6106
|
+
for (i = 0; i < orderLen; ++i) {
|
|
6061
6107
|
if (m[ordering[i]]) {
|
|
6062
6108
|
if (unitHasDecimal) {
|
|
6063
6109
|
return false; // only allow non-integers for smallest unit
|
|
@@ -6545,9 +6591,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6545
6591
|
propertyTest = false,
|
|
6546
6592
|
properties = ['years', 'year', 'y', 'months', 'month', 'M', 'days', 'day', 'd', 'dates', 'date', 'D', 'hours', 'hour', 'h', 'minutes', 'minute', 'm', 'seconds', 'second', 's', 'milliseconds', 'millisecond', 'ms'],
|
|
6547
6593
|
i,
|
|
6548
|
-
property
|
|
6594
|
+
property,
|
|
6595
|
+
propertyLen = properties.length;
|
|
6549
6596
|
|
|
6550
|
-
for (i = 0; i <
|
|
6597
|
+
for (i = 0; i < propertyLen; i += 1) {
|
|
6551
6598
|
property = properties[i];
|
|
6552
6599
|
propertyTest = propertyTest || hasOwnProp(input, property);
|
|
6553
6600
|
}
|
|
@@ -8289,7 +8336,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
8289
8336
|
config._d = new Date(toInt(input));
|
|
8290
8337
|
}); //! moment.js
|
|
8291
8338
|
|
|
8292
|
-
hooks.version = '2.29.
|
|
8339
|
+
hooks.version = '2.29.3';
|
|
8293
8340
|
setHookCallback(createLocal);
|
|
8294
8341
|
hooks.fn = proto;
|
|
8295
8342
|
hooks.min = min;
|
|
@@ -8856,8 +8903,10 @@ function ButtonTab({
|
|
|
8856
8903
|
after
|
|
8857
8904
|
}) {
|
|
8858
8905
|
return React.createElement("div", {
|
|
8906
|
+
title: 'button-wrapper',
|
|
8859
8907
|
className: classnames("tw-tabs__button-wrapper", isActive ? "-active" : "", back ? "-back" : "", className)
|
|
8860
8908
|
}, React.createElement("button", {
|
|
8909
|
+
title: 'button-tab',
|
|
8861
8910
|
className: classnames("tw-tabs__button", reverse ? "-reverse" : "", isActive ? "-active" : "", back ? "-back" : ""),
|
|
8862
8911
|
onClick: onClick
|
|
8863
8912
|
}, icon && React.createElement("i", {
|
|
@@ -8884,6 +8933,7 @@ function Tabs(_ref) {
|
|
|
8884
8933
|
additionalProps = _objectWithoutPropertiesLoose(_ref, ["style", "current", "items", "children", "HeaderChildren", "AddButton", "Button", "className", "onClick", "i18n"]);
|
|
8885
8934
|
|
|
8886
8935
|
return React.createElement("div", {
|
|
8936
|
+
"data-testid": 'tabs-comp',
|
|
8887
8937
|
className: `tw-tabs ${className}`,
|
|
8888
8938
|
style: style
|
|
8889
8939
|
}, React.createElement("div", null, React.createElement("nav", {
|
|
@@ -8907,6 +8957,7 @@ function Tabs(_ref) {
|
|
|
8907
8957
|
})))), HeaderChildren && React.createElement(HeaderChildren, Object.assign({}, additionalProps, {
|
|
8908
8958
|
current: current
|
|
8909
8959
|
}))), React.createElement("div", {
|
|
8960
|
+
title: "tab-body",
|
|
8910
8961
|
className: "tw-tabs__body"
|
|
8911
8962
|
}, children));
|
|
8912
8963
|
}
|