@steroidsjs/core 3.0.0-beta.98 → 3.0.0
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/actions/notifications.js +7 -1
- package/actions/router.js +16 -2
- package/components/HttpComponent.d.ts +7 -7
- package/components/JwtHttpComponent.d.ts +2 -2
- package/components/LocaleComponent.d.ts +6 -6
- package/components/MetaComponent.d.ts +90 -1
- package/components/MetricsComponent.js +2 -1
- package/components/ResourceComponent.d.ts +4 -4
- package/components/UiComponent.d.ts +7 -7
- package/components/WebSocketComponent.d.ts +11 -11
- package/docs-autogen-result.json +15226 -6277
- package/en.json +151 -84
- package/hooks/index.d.ts +4 -3
- package/hooks/index.js +7 -5
- package/hooks/useAbsolutePositioning.js +0 -1
- package/hooks/useAddressBar.js +0 -1
- package/hooks/useApplication.js +8 -1
- package/hooks/useDataProvider.d.ts +17 -2
- package/hooks/useDataSelect.js +21 -4
- package/hooks/useFetch.js +6 -1
- package/hooks/useFile.d.ts +1 -0
- package/hooks/useFile.js +2 -0
- package/hooks/useList.d.ts +53 -14
- package/hooks/useList.js +31 -70
- package/hooks/useTree.d.ts +104 -0
- package/hooks/useTree.js +169 -0
- package/index.d.ts +3 -3
- package/package.json +94 -93
- package/reducers/router.d.ts +2 -1
- package/ui/content/Accordion/Accordion.d.ts +8 -5
- package/ui/content/Accordion/Accordion.js +6 -1
- package/ui/content/Accordion/AccordionItem.d.ts +2 -2
- package/ui/content/Accordion/AccordionItem.js +1 -12
- package/ui/content/Alert/Alert.d.ts +5 -2
- package/ui/content/Alert/Alert.js +13 -12
- package/ui/content/Avatar/Avatar.js +18 -12
- package/ui/content/Badge/Badge.d.ts +5 -1
- package/ui/content/Badge/Badge.js +14 -12
- package/ui/content/Calendar/Calendar.d.ts +6 -1
- package/ui/content/Calendar/Calendar.js +19 -12
- package/ui/content/CalendarSystem/CalendarSystem.d.ts +94 -17
- package/ui/content/CalendarSystem/CalendarSystem.js +66 -77
- package/ui/content/CalendarSystem/hooks/useCalendarControls.d.ts +1 -2
- package/ui/content/CalendarSystem/hooks/useCalendarControls.js +14 -17
- package/ui/content/CalendarSystem/hooks/useCalendarSystemEventGroupModals.d.ts +2 -1
- package/ui/content/CalendarSystem/hooks/useCalendarSystemEventGroupModals.js +13 -5
- package/ui/content/CalendarSystem/hooks/useCalendarSystemModals.js +2 -2
- package/ui/content/CalendarSystem/hooks/useCalendarType.d.ts +5 -0
- package/ui/content/CalendarSystem/hooks/useCalendarType.js +22 -0
- package/ui/content/CalendarSystem/hooks/useEventsFromDate.d.ts +5 -0
- package/ui/content/CalendarSystem/hooks/useEventsFromDate.js +49 -0
- package/ui/content/CalendarSystem/hooks/{useMonthCalendar.d.ts → useMonthGrid.d.ts} +4 -5
- package/ui/content/CalendarSystem/hooks/{useMonthCalendar.js → useMonthGrid.js} +24 -15
- package/ui/content/CalendarSystem/hooks/{useWeekCalendar.d.ts → useWeekGrid.d.ts} +6 -5
- package/ui/content/CalendarSystem/hooks/useWeekGrid.js +72 -0
- package/ui/content/CalendarSystem/utils/utils.d.ts +8 -0
- package/ui/content/CalendarSystem/utils/utils.js +27 -1
- package/ui/content/Card/Card.d.ts +33 -27
- package/ui/content/Card/Card.js +1 -12
- package/ui/content/Chart/Chart.d.ts +38 -8
- package/ui/content/Chart/Chart.js +16 -12
- package/ui/content/Chat/Chat.d.ts +109 -0
- package/ui/content/Chat/Chat.js +52 -0
- package/ui/content/Chat/constants/timeTemplatesAndUnits.d.ts +8 -0
- package/ui/content/Chat/constants/timeTemplatesAndUnits.js +11 -0
- package/ui/content/Chat/hooks/useChat.d.ts +12 -0
- package/ui/content/Chat/hooks/useChat.js +58 -0
- package/ui/content/Chat/index.d.ts +2 -0
- package/ui/content/Chat/index.js +7 -0
- package/ui/content/Chat/utils/addNewMessageIntoGroupedMessages.d.ts +5 -0
- package/ui/content/Chat/utils/addNewMessageIntoGroupedMessages.js +61 -0
- package/ui/content/Chat/utils/calculateMessageTimeAgo.d.ts +1 -0
- package/ui/content/Chat/utils/calculateMessageTimeAgo.js +26 -0
- package/ui/content/Chat/utils/getMessagesGroupedByDate.d.ts +4 -0
- package/ui/content/Chat/utils/getMessagesGroupedByDate.js +56 -0
- package/ui/content/Chat/utils/index.d.ts +5 -0
- package/ui/content/Chat/utils/index.js +12 -0
- package/ui/content/Chat/utils/isTodayMessage.d.ts +1 -0
- package/ui/content/Chat/utils/isTodayMessage.js +13 -0
- package/ui/content/CopyToClipboard/CopyToClipboard.d.ts +3 -3
- package/ui/content/CopyToClipboard/CopyToClipboard.js +10 -12
- package/ui/content/Dashboard/Dashboard.d.ts +5 -2
- package/ui/content/Dashboard/Dashboard.js +27 -3
- package/ui/content/Detail/Detail.d.ts +15 -2
- package/ui/content/Detail/Detail.js +12 -1
- package/ui/content/DropDown/DropDown.d.ts +1 -1
- package/ui/content/DropDown/DropDown.js +16 -4
- package/ui/content/Icon/Icon.js +13 -15
- package/ui/content/Kanban/Kanban.d.ts +15 -4
- package/ui/content/Kanban/Kanban.js +8 -12
- package/ui/content/Kanban/hooks/useKanban.d.ts +33 -26
- package/ui/content/Menu/Menu.js +10 -12
- package/ui/content/Slider/Slider.js +1 -12
- package/ui/content/index.d.ts +2 -1
- package/ui/content/index.js +3 -1
- package/ui/crud/index.d.ts +3 -0
- package/ui/form/AutoCompleteField/AutoCompleteField.js +1 -1
- package/ui/form/Button/Button.js +8 -2
- package/ui/form/CheckboxField/CheckboxField.d.ts +1 -0
- package/ui/form/CheckboxField/CheckboxField.js +2 -2
- package/ui/form/CheckboxListField/CheckboxListField.d.ts +18 -2
- package/ui/form/CheckboxListField/CheckboxListField.js +1 -1
- package/ui/form/CheckboxTreeField/CheckboxTreeField.d.ts +67 -0
- package/ui/form/CheckboxTreeField/CheckboxTreeField.js +126 -0
- package/ui/form/CheckboxTreeField/index.d.ts +2 -0
- package/ui/form/CheckboxTreeField/index.js +7 -0
- package/ui/form/DateField/DateField.js +4 -1
- package/ui/form/DateField/useDateRange.d.ts +1 -0
- package/ui/form/DateField/useDateRange.js +13 -2
- package/ui/form/DateRangeField/DateRangeField.d.ts +34 -1
- package/ui/form/DateRangeField/DateRangeField.js +59 -8
- package/ui/form/DateTimeField/DateTimeField.d.ts +10 -0
- package/ui/form/DateTimeField/DateTimeField.js +11 -3
- package/ui/form/DateTimeRangeField/DateTimeRangeField.d.ts +25 -1
- package/ui/form/DateTimeRangeField/DateTimeRangeField.js +66 -13
- package/ui/form/DropDownField/DropDownField.d.ts +23 -3
- package/ui/form/DropDownField/DropDownField.js +1 -1
- package/ui/form/EmailField/EmailField.d.ts +6 -0
- package/ui/form/EmailField/EmailField.js +0 -4
- package/ui/form/Field/Field.d.ts +9 -1
- package/ui/form/Field/Field.js +1 -1
- package/ui/form/Field/fieldWrapper.d.ts +9 -1
- package/ui/form/FieldList/FieldList.d.ts +13 -7
- package/ui/form/FieldList/FieldList.js +30 -4
- package/ui/form/FileField/FileField.js +5 -0
- package/ui/form/Form/Form.d.ts +26 -3
- package/ui/form/Form/Form.js +5 -3
- package/ui/form/ImageField/ImageField.d.ts +9 -1
- package/ui/form/InputField/InputField.d.ts +5 -2
- package/ui/form/InputField/hooks/useInputFieldWarningByType.js +1 -0
- package/ui/form/NumberField/NumberField.js +34 -7
- package/ui/form/SliderField/SliderField.d.ts +10 -2
- package/ui/form/TimeRangeField/TimeRangeField.d.ts +10 -1
- package/ui/form/TimeRangeField/TimeRangeField.js +3 -1
- package/ui/form/WizardForm/WizardForm.d.ts +119 -0
- package/ui/form/WizardForm/WizardForm.js +167 -0
- package/ui/form/WizardForm/index.d.ts +2 -0
- package/ui/form/WizardForm/index.js +7 -0
- package/ui/form/WizardForm/utils.d.ts +12 -0
- package/ui/form/WizardForm/utils.js +111 -0
- package/ui/form/index.d.ts +3 -1
- package/ui/form/index.js +4 -1
- package/ui/layout/ProgressBar/ProgressBar.js +8 -2
- package/ui/layout/Skeleton/Skeleton.d.ts +3 -1
- package/ui/layout/Tooltip/Tooltip.d.ts +4 -1
- package/ui/list/ControlsColumn/ControlsColumn.d.ts +17 -3
- package/ui/list/FlexGrid/FlexGrid.d.ts +11 -1
- package/ui/list/Grid/Grid.d.ts +42 -6
- package/ui/list/Grid/Grid.js +1 -2
- package/ui/list/LayoutNames/LayoutNames.d.ts +11 -1
- package/ui/list/Steps/Steps.d.ts +19 -7
- package/ui/list/Steps/Steps.js +46 -26
- package/ui/list/TreeTable/TreeTable.d.ts +34 -33
- package/ui/list/TreeTable/TreeTable.js +19 -8
- package/ui/modal/Modal/Modal.d.ts +7 -1
- package/ui/nav/Breadcrumbs/Breadcrumbs.d.ts +11 -1
- package/ui/nav/ButtonGroup/ButtonGroup.d.ts +13 -4
- package/ui/nav/Controls/Controls.d.ts +7 -1
- package/ui/nav/Link/Link.d.ts +1 -1
- package/ui/nav/Nav/Nav.d.ts +19 -4
- package/ui/nav/Router/Router.d.ts +19 -3
- package/ui/nav/Router/Router.js +11 -6
- package/ui/nav/Router/helpers.d.ts +2 -2
- package/ui/nav/Router/helpers.js +39 -7
- package/ui/nav/Tree/Tree.d.ts +32 -62
- package/ui/nav/Tree/Tree.js +18 -165
- package/utils/calculateComponentAbsolutePosition.js +74 -24
- package/utils/calendar.d.ts +8 -0
- package/utils/calendar.js +76 -1
- package/utils/data.js +1 -0
- package/utils/form.d.ts +1 -0
- package/utils/form.js +16 -1
- package/ui/content/CalendarSystem/hooks/useWeekCalendar.js +0 -86
- package/utils/list.d.ts +0 -1
- package/utils/list.js +0 -5
package/ui/form/Form/Form.d.ts
CHANGED
|
@@ -19,7 +19,15 @@ export interface IFormProps extends IUiComponent {
|
|
|
19
19
|
prefix?: string;
|
|
20
20
|
/**
|
|
21
21
|
* Модель с полями формы
|
|
22
|
-
* @example
|
|
22
|
+
* @example
|
|
23
|
+
* {
|
|
24
|
+
* attributes: [
|
|
25
|
+
* {
|
|
26
|
+
* attribute: 'category',
|
|
27
|
+
* field: 'DropDownField'
|
|
28
|
+
* }
|
|
29
|
+
* ]
|
|
30
|
+
* }
|
|
23
31
|
*/
|
|
24
32
|
model?: string | ((...args: any[]) => any) | any;
|
|
25
33
|
/**
|
|
@@ -45,7 +53,11 @@ export interface IFormProps extends IUiComponent {
|
|
|
45
53
|
/**
|
|
46
54
|
* Набор с правилами для проверки соответствия значений полей формы определенному формату.
|
|
47
55
|
* Проверка запускается в момент отправки формы (в обработчике onSubmit).
|
|
48
|
-
* @example
|
|
56
|
+
* @example
|
|
57
|
+
* [
|
|
58
|
+
* ['name', 'required'],
|
|
59
|
+
* ['age', 'integer']
|
|
60
|
+
* ]
|
|
49
61
|
*/
|
|
50
62
|
validators?: any[];
|
|
51
63
|
/**
|
|
@@ -97,7 +109,13 @@ export interface IFormProps extends IUiComponent {
|
|
|
97
109
|
viewProps?: any;
|
|
98
110
|
/**
|
|
99
111
|
* Поля, которые необходимо поместить в форму
|
|
100
|
-
* @example
|
|
112
|
+
* @example
|
|
113
|
+
* [
|
|
114
|
+
* {
|
|
115
|
+
* attribute: 'category',
|
|
116
|
+
* component: 'DropDownField'
|
|
117
|
+
* }
|
|
118
|
+
* ]
|
|
101
119
|
*/
|
|
102
120
|
fields?: (string | IFieldProps)[];
|
|
103
121
|
/**
|
|
@@ -131,6 +149,10 @@ export interface IFormProps extends IUiComponent {
|
|
|
131
149
|
* @example false
|
|
132
150
|
*/
|
|
133
151
|
autoDestroy?: boolean;
|
|
152
|
+
/**
|
|
153
|
+
* Дополнительные кнопки
|
|
154
|
+
*/
|
|
155
|
+
buttons?: React.ReactNode;
|
|
134
156
|
[key: string]: any;
|
|
135
157
|
}
|
|
136
158
|
export interface IFormViewProps {
|
|
@@ -141,6 +163,7 @@ export interface IFormViewProps {
|
|
|
141
163
|
autoFocus?: boolean;
|
|
142
164
|
style?: CustomStyle;
|
|
143
165
|
children?: React.ReactNode;
|
|
166
|
+
buttons?: React.ReactNode;
|
|
144
167
|
}
|
|
145
168
|
export interface IFormReducerState {
|
|
146
169
|
values: any;
|
package/ui/form/Form/Form.js
CHANGED
|
@@ -129,7 +129,7 @@ function Form(props) {
|
|
|
129
129
|
}
|
|
130
130
|
// Init data provider
|
|
131
131
|
var provider = props.useRedux ? form_1.providers.redux : form_1.providers.reducer;
|
|
132
|
-
var _b = provider.useForm(props.formId, initialValues), values = _b.values, submitCounter = _b.submitCounter, isInvalid = _b.isInvalid, isSubmitting = _b.isSubmitting, setErrors = _b.setErrors, reducer = _b.reducer, dispatch = _b.dispatch;
|
|
132
|
+
var _b = provider.useForm(props.formId, initialValues), values = _b.values, submitCounter = _b.submitCounter, isInvalid = _b.isInvalid, isSubmitting = _b.isSubmitting, errors = _b.errors, setErrors = _b.setErrors, reducer = _b.reducer, dispatch = _b.dispatch;
|
|
133
133
|
// Sync with address bar
|
|
134
134
|
(0, react_use_1.useUpdateEffect)(function () {
|
|
135
135
|
updateQuery(values);
|
|
@@ -147,6 +147,9 @@ function Form(props) {
|
|
|
147
147
|
dispatch((0, form_2.formDestroy)(props.formId));
|
|
148
148
|
}
|
|
149
149
|
});
|
|
150
|
+
// Clear Errors
|
|
151
|
+
var prevValues = (0, react_use_1.usePrevious)(values);
|
|
152
|
+
(0, react_use_1.useUpdateEffect)(function () { return (0, form_1.clearErrors)(values, prevValues, errors, setErrors); }, [errors, prevValues, setErrors, values]);
|
|
150
153
|
// OnChange handler
|
|
151
154
|
(0, react_use_1.useUpdateEffect)(function () {
|
|
152
155
|
if (props.onChange) {
|
|
@@ -164,7 +167,6 @@ function Form(props) {
|
|
|
164
167
|
switch (_b.label) {
|
|
165
168
|
case 0:
|
|
166
169
|
dispatch((0, form_2.formSetSubmitting)(props.formId, true));
|
|
167
|
-
// TODO
|
|
168
170
|
if (e) {
|
|
169
171
|
e.preventDefault();
|
|
170
172
|
}
|
|
@@ -329,7 +331,7 @@ function Form(props) {
|
|
|
329
331
|
}
|
|
330
332
|
// Render context and form
|
|
331
333
|
return (React.createElement(exports.FormContext.Provider, { value: formContextValue }, props.view !== false
|
|
332
|
-
? components.ui.renderView(props.view || 'form.FormView', __assign(__assign({}, props.viewProps), { isSubmitting: isSubmitting, onSubmit: onSubmit, submitLabel: props.submitLabel, fields: props.fields, children: props.children, className: props.className, style: props.style, autoFocus: props.autoFocus }))
|
|
334
|
+
? components.ui.renderView(props.view || 'form.FormView', __assign(__assign({}, props.viewProps), { isSubmitting: isSubmitting, onSubmit: onSubmit, submitLabel: props.submitLabel, fields: props.fields, children: props.children, buttons: props.buttons, className: props.className, style: props.style, autoFocus: props.autoFocus }))
|
|
333
335
|
: props.children));
|
|
334
336
|
}
|
|
335
337
|
Form.defaultProps = {
|
|
@@ -6,7 +6,15 @@ import { IButtonProps } from '../Button/Button';
|
|
|
6
6
|
export interface ICropConfig {
|
|
7
7
|
/**
|
|
8
8
|
* Изначальные параметры обрезки изображения
|
|
9
|
-
* @example
|
|
9
|
+
* @example
|
|
10
|
+
* {
|
|
11
|
+
* unit: 'px',
|
|
12
|
+
* aspect: 1,
|
|
13
|
+
* x: 0,
|
|
14
|
+
* y: 0,
|
|
15
|
+
* width: 200,
|
|
16
|
+
* height: 200
|
|
17
|
+
* }
|
|
10
18
|
*/
|
|
11
19
|
initialValues?: Crop;
|
|
12
20
|
/**
|
|
@@ -15,7 +15,7 @@ export type IElementInputType = 'button' | 'checkbox' | 'color' | 'date' | 'date
|
|
|
15
15
|
export interface IBaseFieldProps extends IFieldWrapperInputProps, IUiComponent {
|
|
16
16
|
/**
|
|
17
17
|
* Свойства для элемента input
|
|
18
|
-
* @example {onKeyDown: ...}
|
|
18
|
+
* @example { onKeyDown: ... }
|
|
19
19
|
*/
|
|
20
20
|
inputProps?: InputHTMLAttributes<HTMLInputElement>;
|
|
21
21
|
/**
|
|
@@ -25,7 +25,10 @@ export interface IBaseFieldProps extends IFieldWrapperInputProps, IUiComponent {
|
|
|
25
25
|
showClear?: boolean;
|
|
26
26
|
/**
|
|
27
27
|
* Свойства для компонента отображения
|
|
28
|
-
* @example
|
|
28
|
+
* @example
|
|
29
|
+
* {
|
|
30
|
+
* customHandler: () => {...}
|
|
31
|
+
* }
|
|
29
32
|
*/
|
|
30
33
|
viewProps?: {
|
|
31
34
|
[key: string]: any;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
exports.__esModule = true;
|
|
3
3
|
exports.useInputFieldWarningByType = exports.INPUT_TYPES_SUPPORTED_SELECTION = void 0;
|
|
4
|
+
/* eslint-disable no-console */
|
|
4
5
|
/* eslint-disable max-len */
|
|
5
6
|
/* eslint-disable no-unused-expressions */
|
|
6
7
|
var react_use_1 = require("react-use");
|
|
@@ -10,12 +10,35 @@ var __assign = (this && this.__assign) || function () {
|
|
|
10
10
|
};
|
|
11
11
|
return __assign.apply(this, arguments);
|
|
12
12
|
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
13
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
14
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
38
|
};
|
|
16
39
|
exports.__esModule = true;
|
|
17
40
|
/* eslint-disable max-len */
|
|
18
|
-
var react_1 = require("react");
|
|
41
|
+
var react_1 = __importStar(require("react"));
|
|
19
42
|
var hooks_1 = require("../../../hooks");
|
|
20
43
|
var fieldWrapper_1 = __importDefault(require("../Field/fieldWrapper"));
|
|
21
44
|
var useInputTypeNumber_1 = __importDefault(require("./hooks/useInputTypeNumber"));
|
|
@@ -23,6 +46,7 @@ var DEFAULT_STEP = 1;
|
|
|
23
46
|
function NumberField(props) {
|
|
24
47
|
var components = (0, hooks_1.useComponents)();
|
|
25
48
|
var _a = (0, hooks_1.useSaveCursorPosition)(props.input), currentInputRef = _a.inputRef, onChange = _a.onChange;
|
|
49
|
+
var step = react_1["default"].useMemo(function () { var _a; return (_a = props.step) !== null && _a !== void 0 ? _a : DEFAULT_STEP; }, [props.step]);
|
|
26
50
|
var onInputChange = (0, useInputTypeNumber_1["default"])(currentInputRef, {
|
|
27
51
|
max: props.max,
|
|
28
52
|
min: props.min,
|
|
@@ -30,15 +54,18 @@ function NumberField(props) {
|
|
|
30
54
|
}, onChange).onInputChange;
|
|
31
55
|
var onStep = (0, react_1.useCallback)(function (isIncrement) {
|
|
32
56
|
var _a;
|
|
33
|
-
var step = props.step || DEFAULT_STEP;
|
|
34
57
|
onChange(null, String(Number((_a = currentInputRef === null || currentInputRef === void 0 ? void 0 : currentInputRef.current) === null || _a === void 0 ? void 0 : _a.value) + (isIncrement ? step : -step)));
|
|
35
|
-
}, [currentInputRef, onChange,
|
|
58
|
+
}, [currentInputRef, onChange, step]);
|
|
36
59
|
var onStepUp = (0, react_1.useCallback)(function () {
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
if (!(Number(currentInputRef.current.value) + step > props.max)) {
|
|
61
|
+
onStep(true);
|
|
62
|
+
}
|
|
63
|
+
}, [currentInputRef, onStep, props.max, step]);
|
|
39
64
|
var onStepDown = (0, react_1.useCallback)(function () {
|
|
40
|
-
|
|
41
|
-
|
|
65
|
+
if (!(Number(currentInputRef.current.value) - step < props.min)) {
|
|
66
|
+
onStep(false);
|
|
67
|
+
}
|
|
68
|
+
}, [currentInputRef, onStep, props.min, step]);
|
|
42
69
|
var onKeyDown = (0, react_1.useCallback)(function (event) {
|
|
43
70
|
if (event.key === 'ArrowUp') {
|
|
44
71
|
onStepUp();
|
|
@@ -43,7 +43,12 @@ export interface ISliderFieldProps extends IFieldWrapperInputProps, IUiComponent
|
|
|
43
43
|
* Метки на ползунке. В объекте '{'key: value'}' key определяет положение, а value определяет, что будет отображаться.
|
|
44
44
|
* Если вы хотите задать стиль определенной точки метки, значением должен быть объект,
|
|
45
45
|
* содержащий свойства style и label.
|
|
46
|
-
* @example
|
|
46
|
+
* @example
|
|
47
|
+
* {
|
|
48
|
+
* min: 20,
|
|
49
|
+
* 40: 40,
|
|
50
|
+
* max: 100
|
|
51
|
+
* }
|
|
47
52
|
*/
|
|
48
53
|
marks?: Record<string, {
|
|
49
54
|
style: {
|
|
@@ -54,7 +59,10 @@ export interface ISliderFieldProps extends IFieldWrapperInputProps, IUiComponent
|
|
|
54
59
|
/**
|
|
55
60
|
* Функция, вызываемая после отпускания tip'а у слайдера (при событии onmouseup)
|
|
56
61
|
* @see https://github.com/schrodinger/rc-slider
|
|
57
|
-
* @example
|
|
62
|
+
* @example
|
|
63
|
+
* {
|
|
64
|
+
* () => console.log('Slider handler is released')
|
|
65
|
+
* }
|
|
58
66
|
*/
|
|
59
67
|
onAfterChange?: (value: any) => void;
|
|
60
68
|
[key: string]: any;
|
|
@@ -40,9 +40,18 @@ export interface ITimeRangeFieldProps extends IDateInputStateInput, Omit<IFieldW
|
|
|
40
40
|
placeholder?: any;
|
|
41
41
|
/**
|
|
42
42
|
* Свойства для компонента DayPickerInput
|
|
43
|
-
* @example
|
|
43
|
+
* @example
|
|
44
|
+
* {
|
|
45
|
+
* dayPickerProps: {
|
|
46
|
+
* showWeekNumbers: true
|
|
47
|
+
* }
|
|
44
48
|
*/
|
|
45
49
|
pickerProps?: any;
|
|
50
|
+
/**
|
|
51
|
+
* Устанавливать ли фокус и показывать панель времени сразу после рендера страницы
|
|
52
|
+
* @example true
|
|
53
|
+
*/
|
|
54
|
+
hasInitialFocus?: boolean;
|
|
46
55
|
[key: string]: any;
|
|
47
56
|
}
|
|
48
57
|
export interface ITimeRangeFieldViewProps extends IDateInputStateOutput, Pick<ITimeRangeFieldProps, 'size' | 'errors' | 'showRemove' | 'className' | 'timePanelViewProps' | 'disabled' | 'style' | 'icon'>, Omit<IFieldWrapperOutputProps, 'input'> {
|
|
@@ -62,7 +62,8 @@ function TimeRangeField(props) {
|
|
|
62
62
|
inputPropsTo: inputPropsTo,
|
|
63
63
|
inputFrom: props.inputFrom,
|
|
64
64
|
inputTo: props.inputTo,
|
|
65
|
-
useSmartFocus:
|
|
65
|
+
useSmartFocus: false,
|
|
66
|
+
hasInitialFocus: props.hasInitialFocus
|
|
66
67
|
}), focus = _c.focus, onClose = _c.onClose, onClear = _c.onClear, extendedInputPropsFrom = _c.extendedInputPropsFrom, extendedInputPropsTo = _c.extendedInputPropsTo;
|
|
67
68
|
var timePanelFromViewProps = (0, react_1.useMemo)(function () { return (__assign({ onNow: onNowFrom, onClose: onCloseFrom, value: inputPropsFrom.value, onSelect: inputPropsFrom.onChange }, props.timePanelViewProps)); }, [inputPropsFrom.onChange, inputPropsFrom.value, onCloseFrom, onNowFrom, props.timePanelViewProps]);
|
|
68
69
|
var timePanelToViewProps = (0, react_1.useMemo)(function () { return (__assign({ onNow: onNowTo, onClose: onCloseTo, value: inputPropsTo.value, onSelect: inputPropsTo.onChange }, props.timePanelViewProps)); }, [inputPropsTo.onChange, inputPropsTo.value, onCloseTo, onNowTo, props.timePanelViewProps]);
|
|
@@ -73,6 +74,7 @@ TimeRangeField.defaultProps = {
|
|
|
73
74
|
displayFormat: 'HH:mm',
|
|
74
75
|
required: false,
|
|
75
76
|
showRemove: true,
|
|
77
|
+
hasInitialFocus: false,
|
|
76
78
|
type: 'text',
|
|
77
79
|
valueFormat: 'HH:mm',
|
|
78
80
|
useUTC: true,
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IFieldProps } from '@steroidsjs/core/ui/form/Field/Field';
|
|
3
|
+
import { IStepsProps, IStepItem } from '../../list/Steps/Steps';
|
|
4
|
+
import { IButtonProps } from '../Button/Button';
|
|
5
|
+
import { IFormProps } from '../Form/Form';
|
|
6
|
+
export interface IWizardStepItem extends Partial<IStepItem> {
|
|
7
|
+
fields?: IFieldProps[];
|
|
8
|
+
component?: React.ReactNode;
|
|
9
|
+
stepLabel?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* WizardForm
|
|
13
|
+
*
|
|
14
|
+
* Компонент для создания пошаговой формы. Предоставляет управление и синхронизацию состояния формы,
|
|
15
|
+
* а также список шагов формы для удобной навигации.
|
|
16
|
+
* Поля для шагов можно передавать как в виде компонентов, так и в виде объекта с названием поля.
|
|
17
|
+
* Позволяет выполнять отправку данных формы на сервер с возможностью валидации и перехода к неверно заполненным полям.
|
|
18
|
+
*
|
|
19
|
+
*/
|
|
20
|
+
export interface IWizardFormProps extends IUiComponent {
|
|
21
|
+
/**
|
|
22
|
+
* Идентификатор формы
|
|
23
|
+
* @example WizardForm
|
|
24
|
+
*/
|
|
25
|
+
formId: string;
|
|
26
|
+
/**
|
|
27
|
+
* Коллекция полей и аттрибутов для каждого шага формы. Можно передавать как компонент, так и объект с полями.
|
|
28
|
+
* Главное, чтобы внутри шага использовался один из способов.
|
|
29
|
+
* @example
|
|
30
|
+
* [
|
|
31
|
+
* {
|
|
32
|
+
* title: 'Step 1',
|
|
33
|
+
* fields: [
|
|
34
|
+
* {
|
|
35
|
+
* attribute: 'category',
|
|
36
|
+
* component: 'DropDownField'
|
|
37
|
+
* },
|
|
38
|
+
* ],
|
|
39
|
+
* },
|
|
40
|
+
* {
|
|
41
|
+
* title: 'Step 2',
|
|
42
|
+
* component: (
|
|
43
|
+
* <InputField
|
|
44
|
+
* attribute='address'
|
|
45
|
+
* />
|
|
46
|
+
* )
|
|
47
|
+
* }
|
|
48
|
+
* ]
|
|
49
|
+
*/
|
|
50
|
+
steps: IWizardStepItem[];
|
|
51
|
+
/**
|
|
52
|
+
* Свойства для Form
|
|
53
|
+
*/
|
|
54
|
+
formProps: Omit<IFormProps, 'formId' | 'fields' | 'useRedux'> & {
|
|
55
|
+
submitButtonLabel: string;
|
|
56
|
+
};
|
|
57
|
+
/**
|
|
58
|
+
* Обработчик, который вызывается после перехода на следующий шаг формы
|
|
59
|
+
* @param {number} value
|
|
60
|
+
* @return {void}
|
|
61
|
+
*/
|
|
62
|
+
onNextStep?: (nextStep: number) => void;
|
|
63
|
+
/**
|
|
64
|
+
* Обработчик, который вызывается после возврата на предыдущий шаг формы
|
|
65
|
+
* @param {number} value
|
|
66
|
+
* @return {void}
|
|
67
|
+
*/
|
|
68
|
+
onPrevStep?: (prevStep: number) => void;
|
|
69
|
+
/**
|
|
70
|
+
* Свойства для кнопки возврата
|
|
71
|
+
*/
|
|
72
|
+
prevStepButtonProps?: IButtonProps;
|
|
73
|
+
/**
|
|
74
|
+
* Свойства для кнопки продолжить/отправить
|
|
75
|
+
*/
|
|
76
|
+
nextStepButtonProps?: IButtonProps;
|
|
77
|
+
/**
|
|
78
|
+
* Свойства для Steps
|
|
79
|
+
*/
|
|
80
|
+
stepsProps?: Pick<IStepsProps, 'stepItems'>;
|
|
81
|
+
/**
|
|
82
|
+
* Ориентация списка шагов формы
|
|
83
|
+
* @example 'horizontal'
|
|
84
|
+
*/
|
|
85
|
+
stepTitleOrientation?: Orientation;
|
|
86
|
+
/**
|
|
87
|
+
* Показывать ли шаги
|
|
88
|
+
* @example true
|
|
89
|
+
*/
|
|
90
|
+
showSteps?: boolean;
|
|
91
|
+
}
|
|
92
|
+
export interface IWizardFormViewProps extends Pick<IWizardFormProps, 'prevStepButtonProps' | 'nextStepButtonProps' | 'stepsProps' | 'showSteps'> {
|
|
93
|
+
currentStep: number;
|
|
94
|
+
stepTitle: string;
|
|
95
|
+
stepItems: IStepItem[];
|
|
96
|
+
renderStep: (header: React.ReactNode, buttons: React.ReactNode, viewProps?: IUiComponent) => JSX.Element;
|
|
97
|
+
isLastStep?: boolean;
|
|
98
|
+
onPrevStep?: () => void;
|
|
99
|
+
totalSteps?: number;
|
|
100
|
+
}
|
|
101
|
+
declare function WizardForm(props: IWizardFormProps): React.ReactElement<any, string | React.JSXElementConstructor<any>>;
|
|
102
|
+
declare namespace WizardForm {
|
|
103
|
+
var defaultProps: {
|
|
104
|
+
formProps: {
|
|
105
|
+
label: string;
|
|
106
|
+
};
|
|
107
|
+
prevStepButtonProps: {
|
|
108
|
+
color: string;
|
|
109
|
+
icon: string;
|
|
110
|
+
outline: boolean;
|
|
111
|
+
label: string;
|
|
112
|
+
};
|
|
113
|
+
nextStepButtonProps: {
|
|
114
|
+
label: string;
|
|
115
|
+
};
|
|
116
|
+
showSteps: boolean;
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
export default WizardForm;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
37
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
38
|
+
if (ar || !(i in from)) {
|
|
39
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
40
|
+
ar[i] = from[i];
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
44
|
+
};
|
|
45
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
46
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
47
|
+
};
|
|
48
|
+
exports.__esModule = true;
|
|
49
|
+
var react_1 = __importStar(require("react"));
|
|
50
|
+
var has_1 = __importDefault(require("lodash-es/has"));
|
|
51
|
+
var isEmpty_1 = __importDefault(require("lodash-es/isEmpty"));
|
|
52
|
+
var indexOf_1 = __importDefault(require("lodash-es/indexOf"));
|
|
53
|
+
var Steps_1 = require("../../list/Steps/Steps");
|
|
54
|
+
var hooks_1 = require("../../../hooks");
|
|
55
|
+
var Form_1 = __importDefault(require("../Form/Form"));
|
|
56
|
+
var utils_1 = require("./utils");
|
|
57
|
+
var INITIAL_STEP = 0;
|
|
58
|
+
function WizardForm(props) {
|
|
59
|
+
var components = (0, hooks_1.useComponents)();
|
|
60
|
+
var _a = (0, react_1.useState)(INITIAL_STEP), currentStep = _a[0], setCurrentStep = _a[1];
|
|
61
|
+
var _b = (0, react_1.useState)([]), errorSteps = _b[0], setErrorSteps = _b[1];
|
|
62
|
+
var _c = (0, react_1.useState)((0, utils_1.normalizeSteps)(props.steps)), steps = _c[0], setSteps = _c[1];
|
|
63
|
+
var totalSteps = (0, react_1.useMemo)(function () { return props.steps.length || 0; }, [props.steps.length]);
|
|
64
|
+
var isLastStep = (0, react_1.useMemo)(function () { return currentStep === totalSteps - 1; }, [currentStep, totalSteps]);
|
|
65
|
+
var activeStep = (0, react_1.useMemo)(function () { return props.steps[currentStep]; }, [currentStep, props.steps]);
|
|
66
|
+
var fieldStepMap = (0, react_1.useMemo)(function () { return (0, utils_1.generateFieldStepMap)(props.steps || []); }, [props.steps]);
|
|
67
|
+
(0, react_1.useEffect)(function () {
|
|
68
|
+
if (!(0, isEmpty_1["default"])(errorSteps)) {
|
|
69
|
+
setCurrentStep(errorSteps[0]);
|
|
70
|
+
}
|
|
71
|
+
}, [errorSteps]);
|
|
72
|
+
var onNextStep = (0, react_1.useCallback)(function () {
|
|
73
|
+
var nextStep = Math.min(currentStep + 1, totalSteps - 1);
|
|
74
|
+
if (props.onNextStep) {
|
|
75
|
+
props.onNextStep(nextStep);
|
|
76
|
+
}
|
|
77
|
+
setSteps(function (prevStepsState) { return (0, utils_1.getModifiedSteps)(prevStepsState, errorSteps, currentStep, nextStep); });
|
|
78
|
+
setCurrentStep(nextStep);
|
|
79
|
+
}, [currentStep, totalSteps, props, errorSteps]);
|
|
80
|
+
var onPrevStep = (0, react_1.useCallback)(function () {
|
|
81
|
+
var prevStep = Math.max(currentStep - 1, INITIAL_STEP);
|
|
82
|
+
if (props.onPrevStep) {
|
|
83
|
+
props.onPrevStep(prevStep);
|
|
84
|
+
}
|
|
85
|
+
setSteps(function (prevStepsState) { return (0, utils_1.getModifiedSteps)(prevStepsState, errorSteps, currentStep, prevStep); });
|
|
86
|
+
setCurrentStep(prevStep);
|
|
87
|
+
}, [currentStep, props, errorSteps]);
|
|
88
|
+
var onSubmit = (0, react_1.useCallback)(function (data) {
|
|
89
|
+
if (isLastStep) {
|
|
90
|
+
return props.formProps.onSubmit ? props.formProps.onSubmit(data) : null;
|
|
91
|
+
}
|
|
92
|
+
return onNextStep();
|
|
93
|
+
}, [isLastStep, onNextStep, props.formProps]);
|
|
94
|
+
var onAfterSubmit = (0, react_1.useCallback)(function (cleanedValues, data, response) {
|
|
95
|
+
if (props.formProps.onAfterSubmit && !!props.formProps.onAfterSubmit(cleanedValues, data, response)) {
|
|
96
|
+
return false;
|
|
97
|
+
}
|
|
98
|
+
if (data.errors) {
|
|
99
|
+
var stepsIdsWithErrorFields_1 = Object.keys(data.errors)
|
|
100
|
+
.reduce(function (acc, errorField) {
|
|
101
|
+
if ((0, has_1["default"])(fieldStepMap, errorField)) {
|
|
102
|
+
acc.push(fieldStepMap[errorField]);
|
|
103
|
+
}
|
|
104
|
+
return acc;
|
|
105
|
+
}, [])
|
|
106
|
+
.sort();
|
|
107
|
+
if (!(0, isEmpty_1["default"])(stepsIdsWithErrorFields_1)) {
|
|
108
|
+
var firstStepErrorField_1 = stepsIdsWithErrorFields_1[0];
|
|
109
|
+
setSteps(function (prevStepsState) { return __spreadArray([], prevStepsState, true).map(function (step) {
|
|
110
|
+
if ((0, indexOf_1["default"])(stepsIdsWithErrorFields_1, step.id) !== -1) {
|
|
111
|
+
step.status = step.id === firstStepErrorField_1 ? Steps_1.ACTIVE_STATUS : Steps_1.ERROR_STATUS;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
step.status = Steps_1.FINISH_STATUS;
|
|
115
|
+
}
|
|
116
|
+
return step;
|
|
117
|
+
}); });
|
|
118
|
+
setErrorSteps(stepsIdsWithErrorFields_1);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return true;
|
|
122
|
+
}, [fieldStepMap, props.formProps]);
|
|
123
|
+
var commonFormProps = (0, react_1.useMemo)(function () {
|
|
124
|
+
var _a;
|
|
125
|
+
return ({
|
|
126
|
+
formId: props.formId,
|
|
127
|
+
onSubmit: (!isLastStep || props.formProps.onSubmit) && onSubmit,
|
|
128
|
+
onAfterSubmit: onAfterSubmit,
|
|
129
|
+
fields: (_a = activeStep === null || activeStep === void 0 ? void 0 : activeStep.fields) !== null && _a !== void 0 ? _a : null,
|
|
130
|
+
useRedux: true
|
|
131
|
+
});
|
|
132
|
+
}, [activeStep === null || activeStep === void 0 ? void 0 : activeStep.fields, isLastStep, onAfterSubmit, onSubmit, props.formProps.onSubmit, props.formId]);
|
|
133
|
+
var renderStep = (0, react_1.useCallback)(function (header, buttons, viewProps) { return (react_1["default"].createElement(Form_1["default"], __assign({}, props.formProps, viewProps, commonFormProps, { buttons: buttons }),
|
|
134
|
+
header,
|
|
135
|
+
(activeStep === null || activeStep === void 0 ? void 0 : activeStep.component) && props.steps[currentStep].component)); }, [activeStep === null || activeStep === void 0 ? void 0 : activeStep.component, commonFormProps, currentStep, props.formProps, props.steps]);
|
|
136
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
137
|
+
renderStep: renderStep,
|
|
138
|
+
currentStep: currentStep,
|
|
139
|
+
isLastStep: isLastStep,
|
|
140
|
+
totalSteps: totalSteps,
|
|
141
|
+
onPrevStep: onPrevStep,
|
|
142
|
+
prevStepButtonProps: props.prevStepButtonProps,
|
|
143
|
+
nextStepButtonProps: __assign(__assign({}, props.nextStepButtonProps), { label: isLastStep ? props.formProps.submitButtonLabel : props.nextStepButtonProps.label }),
|
|
144
|
+
showSteps: props.showSteps,
|
|
145
|
+
stepsProps: __assign(__assign({}, props.stepsProps), { stepTitleOrientation: props.stepTitleOrientation }),
|
|
146
|
+
stepItems: steps,
|
|
147
|
+
stepTitle: activeStep.title
|
|
148
|
+
}); }, [renderStep, currentStep, isLastStep, totalSteps, onPrevStep, props.prevStepButtonProps, props.nextStepButtonProps,
|
|
149
|
+
props.formProps.submitButtonLabel, props.showSteps, props.stepsProps, props.stepTitleOrientation, steps, activeStep.title]);
|
|
150
|
+
return components.ui.renderView(props.view || 'form.WizardFormView', viewProps);
|
|
151
|
+
}
|
|
152
|
+
exports["default"] = WizardForm;
|
|
153
|
+
WizardForm.defaultProps = {
|
|
154
|
+
formProps: {
|
|
155
|
+
label: __('Отправить')
|
|
156
|
+
},
|
|
157
|
+
prevStepButtonProps: {
|
|
158
|
+
color: 'primary',
|
|
159
|
+
icon: 'left_12x12',
|
|
160
|
+
outline: true,
|
|
161
|
+
label: __('Назад')
|
|
162
|
+
},
|
|
163
|
+
nextStepButtonProps: {
|
|
164
|
+
label: __('Далее')
|
|
165
|
+
},
|
|
166
|
+
showSteps: true
|
|
167
|
+
};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
exports.__esModule = true;
|
|
6
|
+
var WizardForm_1 = __importDefault(require("./WizardForm"));
|
|
7
|
+
exports["default"] = WizardForm_1["default"];
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IWizardStepItem } from '@steroidsjs/core/ui/form/WizardForm/WizardForm';
|
|
3
|
+
export declare const generateFieldStepMap: (arr?: any[]) => any;
|
|
4
|
+
export declare const normalizeSteps: (steps: IWizardStepItem[]) => {
|
|
5
|
+
id: number;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
subtitle: string;
|
|
9
|
+
icon: string | number | true | React.ReactElement<any, string | React.JSXElementConstructor<any>> | React.ReactFragment;
|
|
10
|
+
status: string;
|
|
11
|
+
}[];
|
|
12
|
+
export declare const getModifiedSteps: (prevStepsState: any, errorSteps: any, currentStep: number, nextStep: number) => any[];
|