@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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/index.js
CHANGED
|
@@ -130,6 +130,9 @@ function _defineProperties(target, props) {
|
|
|
130
130
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
131
131
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
132
132
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
133
|
+
Object.defineProperty(Constructor, "prototype", {
|
|
134
|
+
writable: false
|
|
135
|
+
});
|
|
133
136
|
return Constructor;
|
|
134
137
|
}
|
|
135
138
|
|
|
@@ -1725,8 +1728,7 @@ function Select(_ref) {
|
|
|
1725
1728
|
_onChange = _ref.onChange,
|
|
1726
1729
|
required = _ref.required,
|
|
1727
1730
|
value = _ref.value,
|
|
1728
|
-
|
|
1729
|
-
choices = _ref$choices === void 0 ? [] : _ref$choices,
|
|
1731
|
+
choices = _ref.choices,
|
|
1730
1732
|
description = _ref.description,
|
|
1731
1733
|
placeholder = _ref.placeholder,
|
|
1732
1734
|
prefix = _ref.prefix,
|
|
@@ -2001,7 +2003,8 @@ function InputText(_ref) {
|
|
|
2001
2003
|
suffix = _ref.suffix,
|
|
2002
2004
|
description = _ref.description,
|
|
2003
2005
|
className = _ref.className,
|
|
2004
|
-
|
|
2006
|
+
placeholder = _ref.placeholder,
|
|
2007
|
+
props = _objectWithoutPropertiesLoose(_ref, ["name", "value", "label", "onChange", "required", "size", "type", "prefix", "suffix", "description", "className", "placeholder"]);
|
|
2005
2008
|
|
|
2006
2009
|
var _useState = React.useState(value),
|
|
2007
2010
|
localValue = _useState[0],
|
|
@@ -2029,6 +2032,7 @@ function InputText(_ref) {
|
|
|
2029
2032
|
id: name,
|
|
2030
2033
|
required: required,
|
|
2031
2034
|
value: localValue || "",
|
|
2035
|
+
placeholder: placeholder,
|
|
2032
2036
|
onChange: function onChange(event) {
|
|
2033
2037
|
var value = getEventValue(event);
|
|
2034
2038
|
setValue(value);
|
|
@@ -2477,7 +2481,43 @@ function Card(_ref) {
|
|
|
2477
2481
|
}, children));
|
|
2478
2482
|
}
|
|
2479
2483
|
|
|
2484
|
+
function _catch$a(body, recover) {
|
|
2485
|
+
try {
|
|
2486
|
+
var result = body();
|
|
2487
|
+
} catch (e) {
|
|
2488
|
+
return recover(e);
|
|
2489
|
+
}
|
|
2490
|
+
|
|
2491
|
+
if (result && result.then) {
|
|
2492
|
+
return result.then(void 0, recover);
|
|
2493
|
+
}
|
|
2494
|
+
|
|
2495
|
+
return result;
|
|
2496
|
+
}
|
|
2497
|
+
|
|
2480
2498
|
function useForm(props) {
|
|
2499
|
+
var customValidation = function customValidation(submission, callback) {
|
|
2500
|
+
try {
|
|
2501
|
+
var _temp3 = function () {
|
|
2502
|
+
if (events.current.has("onAsyncSubmit")) {
|
|
2503
|
+
var _temp4 = _catch$a(function () {
|
|
2504
|
+
return Promise.resolve(events.current.get("onAsyncSubmit")(submission)).then(function () {});
|
|
2505
|
+
}, function (err) {
|
|
2506
|
+
callback((err == null ? void 0 : err.errors) || err);
|
|
2507
|
+
});
|
|
2508
|
+
|
|
2509
|
+
if (_temp4 && _temp4.then) return _temp4.then(function () {});
|
|
2510
|
+
} else {
|
|
2511
|
+
callback(null);
|
|
2512
|
+
}
|
|
2513
|
+
}();
|
|
2514
|
+
|
|
2515
|
+
return Promise.resolve(_temp3 && _temp3.then ? _temp3.then(function () {}) : void 0);
|
|
2516
|
+
} catch (e) {
|
|
2517
|
+
return Promise.reject(e);
|
|
2518
|
+
}
|
|
2519
|
+
};
|
|
2520
|
+
|
|
2481
2521
|
var src = props.src,
|
|
2482
2522
|
form = props.form,
|
|
2483
2523
|
_props$options = props.options,
|
|
@@ -2496,7 +2536,12 @@ function useForm(props) {
|
|
|
2496
2536
|
srcOrForm = typeof srcOrForm === "string" ? srcOrForm : cloneDeep__default['default'](srcOrForm);
|
|
2497
2537
|
|
|
2498
2538
|
if (!instance.current) {
|
|
2539
|
+
var _options, _options$hooks;
|
|
2540
|
+
|
|
2499
2541
|
isLoaded.current = false;
|
|
2542
|
+
options.hooks = _extends({}, options.hooks || {}, {
|
|
2543
|
+
customValidation: ((_options = options) == null ? void 0 : (_options$hooks = _options.hooks) == null ? void 0 : _options$hooks.customValidation) || customValidation
|
|
2544
|
+
});
|
|
2500
2545
|
instance.current = new formiojs.Form(element.current, srcOrForm, options);
|
|
2501
2546
|
instance.current.onAny(function (event) {
|
|
2502
2547
|
var args = [].slice.call(arguments, 1);
|
|
@@ -2521,7 +2566,8 @@ function useForm(props) {
|
|
|
2521
2566
|
events.current.set(funcName, fn);
|
|
2522
2567
|
}
|
|
2523
2568
|
|
|
2524
|
-
|
|
2569
|
+
instance.current.instance.setAlert("success", "");
|
|
2570
|
+
events.current.get(funcName).apply(void 0, args.concat([instance.current]));
|
|
2525
2571
|
}
|
|
2526
2572
|
}
|
|
2527
2573
|
});
|
|
@@ -2580,6 +2626,9 @@ function useForm(props) {
|
|
|
2580
2626
|
React.useEffect(function () {
|
|
2581
2627
|
props.onSubmit && events.current.set("onSubmit", props.onSubmit);
|
|
2582
2628
|
}, [props.onSubmit, events]);
|
|
2629
|
+
React.useEffect(function () {
|
|
2630
|
+
props.onAsyncSubmit && events.current.set("onAsyncSubmit", props.onAsyncSubmit);
|
|
2631
|
+
}, [props.onAsyncSubmit, events]);
|
|
2583
2632
|
React.useEffect(function () {
|
|
2584
2633
|
props.onSubmitDone && events.current.set("onSubmitDone", props.onSubmitDone);
|
|
2585
2634
|
}, [props.onSubmitDone, events]);
|
|
@@ -2631,7 +2680,8 @@ Form.propTypes = {
|
|
|
2631
2680
|
noAlerts: PropTypes__default['default'].bool,
|
|
2632
2681
|
i18n: PropTypes__default['default'].any,
|
|
2633
2682
|
template: PropTypes__default['default'].string,
|
|
2634
|
-
saveDraft: PropTypes__default['default'].bool
|
|
2683
|
+
saveDraft: PropTypes__default['default'].bool,
|
|
2684
|
+
hooks: PropTypes__default['default'].any
|
|
2635
2685
|
}),
|
|
2636
2686
|
onPrevPage: PropTypes__default['default'].func,
|
|
2637
2687
|
onNextPage: PropTypes__default['default'].func,
|
|
@@ -2640,6 +2690,7 @@ Form.propTypes = {
|
|
|
2640
2690
|
onCustomEvent: PropTypes__default['default'].func,
|
|
2641
2691
|
onComponentChange: PropTypes__default['default'].func,
|
|
2642
2692
|
onSubmit: PropTypes__default['default'].func,
|
|
2693
|
+
onAsyncSubmit: PropTypes__default['default'].func,
|
|
2643
2694
|
onSubmitDone: PropTypes__default['default'].func,
|
|
2644
2695
|
onFormLoad: PropTypes__default['default'].func,
|
|
2645
2696
|
onError: PropTypes__default['default'].func,
|
|
@@ -3062,7 +3113,7 @@ function FormAction(_ref2) {
|
|
|
3062
3113
|
}), children);
|
|
3063
3114
|
}
|
|
3064
3115
|
|
|
3065
|
-
function _catch$
|
|
3116
|
+
function _catch$b(body, recover) {
|
|
3066
3117
|
try {
|
|
3067
3118
|
var result = body();
|
|
3068
3119
|
} catch (e) {
|
|
@@ -3090,7 +3141,7 @@ var createBuilder = function createBuilder(el, _ref2) {
|
|
|
3090
3141
|
display: display,
|
|
3091
3142
|
components: [].concat(components)
|
|
3092
3143
|
};
|
|
3093
|
-
return Promise.resolve(_catch$
|
|
3144
|
+
return Promise.resolve(_catch$b(function () {
|
|
3094
3145
|
return Promise.resolve(new FormioFormBuilder__default['default'](el, form, _extends({}, options)).ready).then(function (builder) {
|
|
3095
3146
|
var handleEvent = function handleEvent(event) {
|
|
3096
3147
|
return function () {
|
|
@@ -3192,7 +3243,8 @@ var FormBuilder = /*#__PURE__*/function (_React$Component) {
|
|
|
3192
3243
|
var _this$builderRef;
|
|
3193
3244
|
|
|
3194
3245
|
(_this$builderRef = this.builderRef) == null ? void 0 : _this$builderRef.destroy();
|
|
3195
|
-
}
|
|
3246
|
+
} // eslint-disable-next-line react/no-deprecated
|
|
3247
|
+
;
|
|
3196
3248
|
|
|
3197
3249
|
_proto.componentWillReceiveProps = function componentWillReceiveProps(nextProps) {
|
|
3198
3250
|
try {
|
|
@@ -3986,9 +4038,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
3986
4038
|
|
|
3987
4039
|
function map(arr, fn) {
|
|
3988
4040
|
var res = [],
|
|
3989
|
-
i
|
|
4041
|
+
i,
|
|
4042
|
+
arrLen = arr.length;
|
|
3990
4043
|
|
|
3991
|
-
for (i = 0; i <
|
|
4044
|
+
for (i = 0; i < arrLen; ++i) {
|
|
3992
4045
|
res.push(fn(arr[i], i));
|
|
3993
4046
|
}
|
|
3994
4047
|
|
|
@@ -4107,7 +4160,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4107
4160
|
updateInProgress = false;
|
|
4108
4161
|
|
|
4109
4162
|
function copyConfig(to, from) {
|
|
4110
|
-
var i,
|
|
4163
|
+
var i,
|
|
4164
|
+
prop,
|
|
4165
|
+
val,
|
|
4166
|
+
momentPropertiesLen = momentProperties.length;
|
|
4111
4167
|
|
|
4112
4168
|
if (!isUndefined(from._isAMomentObject)) {
|
|
4113
4169
|
to._isAMomentObject = from._isAMomentObject;
|
|
@@ -4149,8 +4205,8 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4149
4205
|
to._locale = from._locale;
|
|
4150
4206
|
}
|
|
4151
4207
|
|
|
4152
|
-
if (
|
|
4153
|
-
for (i = 0; i <
|
|
4208
|
+
if (momentPropertiesLen > 0) {
|
|
4209
|
+
for (i = 0; i < momentPropertiesLen; i++) {
|
|
4154
4210
|
prop = momentProperties[i];
|
|
4155
4211
|
val = from[prop];
|
|
4156
4212
|
|
|
@@ -4202,9 +4258,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4202
4258
|
var args = [],
|
|
4203
4259
|
arg,
|
|
4204
4260
|
i,
|
|
4205
|
-
key
|
|
4261
|
+
key,
|
|
4262
|
+
argLen = arguments.length;
|
|
4206
4263
|
|
|
4207
|
-
for (i = 0; i <
|
|
4264
|
+
for (i = 0; i < argLen; i++) {
|
|
4208
4265
|
arg = '';
|
|
4209
4266
|
|
|
4210
4267
|
if (typeof arguments[i] === 'object') {
|
|
@@ -4634,9 +4691,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4634
4691
|
if (typeof units === 'object') {
|
|
4635
4692
|
units = normalizeObjectUnits(units);
|
|
4636
4693
|
var prioritized = getPrioritizedUnits(units),
|
|
4637
|
-
i
|
|
4694
|
+
i,
|
|
4695
|
+
prioritizedLen = prioritized.length;
|
|
4638
4696
|
|
|
4639
|
-
for (i = 0; i <
|
|
4697
|
+
for (i = 0; i < prioritizedLen; i++) {
|
|
4640
4698
|
this[prioritized[i].unit](units[prioritized[i].unit]);
|
|
4641
4699
|
}
|
|
4642
4700
|
} else {
|
|
@@ -4717,7 +4775,8 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4717
4775
|
|
|
4718
4776
|
function addParseToken(token, callback) {
|
|
4719
4777
|
var i,
|
|
4720
|
-
func = callback
|
|
4778
|
+
func = callback,
|
|
4779
|
+
tokenLen;
|
|
4721
4780
|
|
|
4722
4781
|
if (typeof token === 'string') {
|
|
4723
4782
|
token = [token];
|
|
@@ -4729,7 +4788,9 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
4729
4788
|
};
|
|
4730
4789
|
}
|
|
4731
4790
|
|
|
4732
|
-
|
|
4791
|
+
tokenLen = token.length;
|
|
4792
|
+
|
|
4793
|
+
for (i = 0; i < tokenLen; i++) {
|
|
4733
4794
|
tokens[token[i]] = func;
|
|
4734
4795
|
}
|
|
4735
4796
|
}
|
|
@@ -5815,11 +5876,16 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
5815
5876
|
return globalLocale;
|
|
5816
5877
|
}
|
|
5817
5878
|
|
|
5879
|
+
function isLocaleNameSane(name) {
|
|
5880
|
+
// Prevent names that look like filesystem paths, i.e contain '/' or '\'
|
|
5881
|
+
return name.match('^[^/\\\\]*$') != null;
|
|
5882
|
+
}
|
|
5883
|
+
|
|
5818
5884
|
function loadLocale(name) {
|
|
5819
5885
|
var oldLocale = null,
|
|
5820
5886
|
aliasedRequire; // TODO: Find a better way to register and load all the locales in Node
|
|
5821
5887
|
|
|
5822
|
-
if (locales[name] === undefined && 'object' !== 'undefined' && module && module.exports) {
|
|
5888
|
+
if (locales[name] === undefined && 'object' !== 'undefined' && module && module.exports && isLocaleNameSane(name)) {
|
|
5823
5889
|
try {
|
|
5824
5890
|
oldLocale = globalLocale._abbr;
|
|
5825
5891
|
aliasedRequire = commonjsRequire;
|
|
@@ -6051,12 +6117,14 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6051
6117
|
allowTime,
|
|
6052
6118
|
dateFormat,
|
|
6053
6119
|
timeFormat,
|
|
6054
|
-
tzFormat
|
|
6120
|
+
tzFormat,
|
|
6121
|
+
isoDatesLen = isoDates.length,
|
|
6122
|
+
isoTimesLen = isoTimes.length;
|
|
6055
6123
|
|
|
6056
6124
|
if (match) {
|
|
6057
6125
|
getParsingFlags(config).iso = true;
|
|
6058
6126
|
|
|
6059
|
-
for (i = 0, l =
|
|
6127
|
+
for (i = 0, l = isoDatesLen; i < l; i++) {
|
|
6060
6128
|
if (isoDates[i][1].exec(match[1])) {
|
|
6061
6129
|
dateFormat = isoDates[i][0];
|
|
6062
6130
|
allowTime = isoDates[i][2] !== false;
|
|
@@ -6070,7 +6138,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6070
6138
|
}
|
|
6071
6139
|
|
|
6072
6140
|
if (match[3]) {
|
|
6073
|
-
for (i = 0, l =
|
|
6141
|
+
for (i = 0, l = isoTimesLen; i < l; i++) {
|
|
6074
6142
|
if (isoTimes[i][1].exec(match[3])) {
|
|
6075
6143
|
// match[2] should be 'T' or space
|
|
6076
6144
|
timeFormat = (match[2] || ' ') + isoTimes[i][0];
|
|
@@ -6406,10 +6474,12 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6406
6474
|
skipped,
|
|
6407
6475
|
stringLength = string.length,
|
|
6408
6476
|
totalParsedInputLength = 0,
|
|
6409
|
-
era
|
|
6477
|
+
era,
|
|
6478
|
+
tokenLen;
|
|
6410
6479
|
tokens = expandFormat(config._f, config._locale).match(formattingTokens) || [];
|
|
6480
|
+
tokenLen = tokens.length;
|
|
6411
6481
|
|
|
6412
|
-
for (i = 0; i <
|
|
6482
|
+
for (i = 0; i < tokenLen; i++) {
|
|
6413
6483
|
token = tokens[i];
|
|
6414
6484
|
parsedInput = (string.match(getParseRegexForToken(token, config)) || [])[0];
|
|
6415
6485
|
|
|
@@ -6502,15 +6572,16 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6502
6572
|
i,
|
|
6503
6573
|
currentScore,
|
|
6504
6574
|
validFormatFound,
|
|
6505
|
-
bestFormatIsValid = false
|
|
6575
|
+
bestFormatIsValid = false,
|
|
6576
|
+
configfLen = config._f.length;
|
|
6506
6577
|
|
|
6507
|
-
if (
|
|
6578
|
+
if (configfLen === 0) {
|
|
6508
6579
|
getParsingFlags(config).invalidFormat = true;
|
|
6509
6580
|
config._d = new Date(NaN);
|
|
6510
6581
|
return;
|
|
6511
6582
|
}
|
|
6512
6583
|
|
|
6513
|
-
for (i = 0; i <
|
|
6584
|
+
for (i = 0; i < configfLen; i++) {
|
|
6514
6585
|
currentScore = 0;
|
|
6515
6586
|
validFormatFound = false;
|
|
6516
6587
|
tempConfig = copyConfig({}, config);
|
|
@@ -6732,7 +6803,8 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6732
6803
|
function isDurationValid(m) {
|
|
6733
6804
|
var key,
|
|
6734
6805
|
unitHasDecimal = false,
|
|
6735
|
-
i
|
|
6806
|
+
i,
|
|
6807
|
+
orderLen = ordering.length;
|
|
6736
6808
|
|
|
6737
6809
|
for (key in m) {
|
|
6738
6810
|
if (hasOwnProp(m, key) && !(indexOf.call(ordering, key) !== -1 && (m[key] == null || !isNaN(m[key])))) {
|
|
@@ -6740,7 +6812,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
6740
6812
|
}
|
|
6741
6813
|
}
|
|
6742
6814
|
|
|
6743
|
-
for (i = 0; i <
|
|
6815
|
+
for (i = 0; i < orderLen; ++i) {
|
|
6744
6816
|
if (m[ordering[i]]) {
|
|
6745
6817
|
if (unitHasDecimal) {
|
|
6746
6818
|
return false; // only allow non-integers for smallest unit
|
|
@@ -7228,9 +7300,10 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
7228
7300
|
propertyTest = false,
|
|
7229
7301
|
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'],
|
|
7230
7302
|
i,
|
|
7231
|
-
property
|
|
7303
|
+
property,
|
|
7304
|
+
propertyLen = properties.length;
|
|
7232
7305
|
|
|
7233
|
-
for (i = 0; i <
|
|
7306
|
+
for (i = 0; i < propertyLen; i += 1) {
|
|
7234
7307
|
property = properties[i];
|
|
7235
7308
|
propertyTest = propertyTest || hasOwnProp(input, property);
|
|
7236
7309
|
}
|
|
@@ -8972,7 +9045,7 @@ var moment = createCommonjsModule(function (module, exports) {
|
|
|
8972
9045
|
config._d = new Date(toInt(input));
|
|
8973
9046
|
}); //! moment.js
|
|
8974
9047
|
|
|
8975
|
-
hooks.version = '2.29.
|
|
9048
|
+
hooks.version = '2.29.3';
|
|
8976
9049
|
setHookCallback(createLocal);
|
|
8977
9050
|
hooks.fn = proto;
|
|
8978
9051
|
hooks.min = min;
|
|
@@ -9586,8 +9659,10 @@ function ButtonTab(_ref) {
|
|
|
9586
9659
|
className = _ref.className,
|
|
9587
9660
|
after = _ref.after;
|
|
9588
9661
|
return React__default['default'].createElement("div", {
|
|
9662
|
+
title: 'button-wrapper',
|
|
9589
9663
|
className: classnames("tw-tabs__button-wrapper", isActive ? "-active" : "", back ? "-back" : "", className)
|
|
9590
9664
|
}, React__default['default'].createElement("button", {
|
|
9665
|
+
title: 'button-tab',
|
|
9591
9666
|
className: classnames("tw-tabs__button", reverse ? "-reverse" : "", isActive ? "-active" : "", back ? "-back" : ""),
|
|
9592
9667
|
onClick: onClick
|
|
9593
9668
|
}, icon && React__default['default'].createElement("i", {
|
|
@@ -9617,6 +9692,7 @@ function Tabs(_ref2) {
|
|
|
9617
9692
|
additionalProps = _objectWithoutPropertiesLoose(_ref2, ["style", "current", "items", "children", "HeaderChildren", "AddButton", "Button", "className", "onClick", "i18n"]);
|
|
9618
9693
|
|
|
9619
9694
|
return React__default['default'].createElement("div", {
|
|
9695
|
+
"data-testid": 'tabs-comp',
|
|
9620
9696
|
className: "tw-tabs " + className,
|
|
9621
9697
|
style: style
|
|
9622
9698
|
}, React__default['default'].createElement("div", null, React__default['default'].createElement("nav", {
|
|
@@ -9642,6 +9718,7 @@ function Tabs(_ref2) {
|
|
|
9642
9718
|
})))), HeaderChildren && React__default['default'].createElement(HeaderChildren, Object.assign({}, additionalProps, {
|
|
9643
9719
|
current: current
|
|
9644
9720
|
}))), React__default['default'].createElement("div", {
|
|
9721
|
+
title: "tab-body",
|
|
9645
9722
|
className: "tw-tabs__body"
|
|
9646
9723
|
}, children));
|
|
9647
9724
|
}
|