@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/package.json
CHANGED
|
@@ -1,95 +1,96 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
2
|
+
"name": "@steroidsjs/core",
|
|
3
|
+
"version": "3.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Vladimir Kozhin <hello@kozhindev.com>",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/steroids/react"
|
|
9
|
+
},
|
|
10
|
+
"main": "dist/index.ts",
|
|
11
|
+
"types": "dist/index.d.ts",
|
|
12
|
+
"exports": {
|
|
13
|
+
"./": "./dist"
|
|
14
|
+
},
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"homepage": "https://github.com/steroids/react",
|
|
17
|
+
"bugs": {
|
|
18
|
+
"url": "https://github.com/steroids/react/issues"
|
|
19
|
+
},
|
|
20
|
+
"scripts": {
|
|
21
|
+
"docs": "node docs/docs-autogen.js",
|
|
22
|
+
"test": "jest",
|
|
23
|
+
"lint": "eslint -c ./.eslintrc --ext .js,.jsx,.ts,.tsx ./src ./tests --quiet",
|
|
24
|
+
"build": "tsc && cp ./{package.json,LICENSE,README.md} dist/ && cp src/index.d.ts dist/ && cp docs/docs-autogen-result.json dist/ && cp docs/locales/en.json dist/",
|
|
25
|
+
"watch": "tsc -p tsconfig-debug.json"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"@maskito/core": "1.7.0",
|
|
29
|
+
"@maskito/kit": "1.7.0",
|
|
30
|
+
"@maskito/react": "^0.12.1",
|
|
31
|
+
"@splidejs/react-splide": "^0.7.12",
|
|
32
|
+
"axios": "^0.21.1",
|
|
33
|
+
"connected-react-router": "^6.9.3",
|
|
34
|
+
"dayjs": "^1.11.9",
|
|
35
|
+
"domready": "^1.0.8",
|
|
36
|
+
"dot-prop-immutable": "^2.1.0",
|
|
37
|
+
"fileup-core": "^1.2.7",
|
|
38
|
+
"history": "^4.10.1",
|
|
39
|
+
"intl-messageformat": "^10.1.4",
|
|
40
|
+
"js-cookie": "^2.2.1",
|
|
41
|
+
"load-js": "^3.0.3",
|
|
42
|
+
"lodash": "^4.17.21",
|
|
43
|
+
"lodash-es": "^4.17.21",
|
|
44
|
+
"path-to-regexp": "^1.7.0",
|
|
45
|
+
"qs": "^6.9.4",
|
|
46
|
+
"query-string": "^6.14.0",
|
|
47
|
+
"react": "^18.2.0",
|
|
48
|
+
"react-click-outside": "^3.0.1",
|
|
49
|
+
"react-day-picker": "^8.7.1",
|
|
50
|
+
"react-dom": "^18.2.0",
|
|
51
|
+
"react-grid-gallery": "^0.4.8",
|
|
52
|
+
"react-helmet": "^6.1.0",
|
|
53
|
+
"react-image-crop": "^9.0.2",
|
|
54
|
+
"react-redux": "^8.0.5",
|
|
55
|
+
"react-router": "^5.2.0",
|
|
56
|
+
"react-router-dom": "^5.2.0",
|
|
57
|
+
"react-use": "^17.4.0",
|
|
58
|
+
"redux": "^4.0.4",
|
|
59
|
+
"redux-mock-store": "^1.5.4",
|
|
60
|
+
"set-cookie-parser": "^2.4.8"
|
|
61
|
+
},
|
|
62
|
+
"devDependencies": {
|
|
63
|
+
"@babel/cli": "^7.13.14",
|
|
64
|
+
"@babel/core": "^7.13.15",
|
|
65
|
+
"@babel/preset-env": "^7.13.15",
|
|
66
|
+
"@babel/preset-react": "^7.13.13",
|
|
67
|
+
"@babel/preset-typescript": "^7.13.0",
|
|
68
|
+
"@steroidsjs/eslint-config": "^2.1.6",
|
|
69
|
+
"@testing-library/dom": "^8.20.0",
|
|
70
|
+
"@testing-library/jest-dom": "^5.16.5",
|
|
71
|
+
"@testing-library/react": "^13.4.0",
|
|
72
|
+
"@testing-library/user-event": "^14.4.3",
|
|
73
|
+
"@types/enzyme": "^3.10.8",
|
|
74
|
+
"@types/enzyme-adapter-react-16": "^1.0.6",
|
|
75
|
+
"@types/jest": "^26.0.22",
|
|
76
|
+
"@types/markdown-to-jsx": "^7.0.1",
|
|
77
|
+
"@types/reach__router": "^1.3.7",
|
|
78
|
+
"@types/react": "^18.0.20",
|
|
79
|
+
"@types/react-color": "^3.0.4",
|
|
80
|
+
"@types/react-dom": "^18.0.6",
|
|
81
|
+
"@types/react-syntax-highlighter": "^13.5.0",
|
|
82
|
+
"@types/webpack-env": "^1.16.0",
|
|
83
|
+
"@typescript-eslint/eslint-plugin": "^5.51.0",
|
|
84
|
+
"@typescript-eslint/parser": "^4.15.0",
|
|
85
|
+
"@wojtekmaj/enzyme-adapter-react-17": "^0.4.1",
|
|
86
|
+
"enzyme": "^3.11.0",
|
|
87
|
+
"eslint": "^8.34.0",
|
|
88
|
+
"jest": "^26.6.3",
|
|
89
|
+
"jest-environment-jsdom-fifteen": "^1.0.2",
|
|
90
|
+
"jest-enzyme": "^7.1.2",
|
|
91
|
+
"rc-slider": "9.7.4",
|
|
92
|
+
"ts-jest": "^26.5.1",
|
|
93
|
+
"typedoc": "^0.21.0",
|
|
94
|
+
"typescript": "^4.9.5"
|
|
95
|
+
}
|
|
95
96
|
}
|
package/reducers/router.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { IRouteItem } from '../ui/nav/Router/Router';
|
|
2
3
|
type TRouteIdArg = string | null;
|
|
3
4
|
export interface IRouterInitialState {
|
|
@@ -43,7 +44,7 @@ export declare const normalizeRoutes: (state: any, item: IRouteItem, activeIds:
|
|
|
43
44
|
id: string;
|
|
44
45
|
title: string;
|
|
45
46
|
label: string;
|
|
46
|
-
icon: any
|
|
47
|
+
icon: string | import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
47
48
|
exact: boolean;
|
|
48
49
|
strict: boolean;
|
|
49
50
|
path: string;
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
export interface IAccordionIcon {
|
|
3
3
|
/**
|
|
4
4
|
* Пользовательская иконка открытия
|
|
5
|
-
* @example 'user
|
|
5
|
+
* @example 'user'
|
|
6
6
|
*/
|
|
7
7
|
open: React.ReactElement | string;
|
|
8
8
|
/**
|
|
@@ -64,7 +64,10 @@ export interface IAccordionProps extends IUiComponent {
|
|
|
64
64
|
activeKey?: number;
|
|
65
65
|
/**
|
|
66
66
|
* Вызываемая функция при каждом изменении состояния
|
|
67
|
-
* @example
|
|
67
|
+
* @example
|
|
68
|
+
* {
|
|
69
|
+
* () => { console.log('success') }
|
|
70
|
+
* }
|
|
68
71
|
*/
|
|
69
72
|
onChange?: () => void;
|
|
70
73
|
/**
|
|
@@ -78,13 +81,13 @@ export interface IAccordionProps extends IUiComponent {
|
|
|
78
81
|
*/
|
|
79
82
|
showIcon?: boolean;
|
|
80
83
|
}
|
|
81
|
-
export interface
|
|
84
|
+
export interface IAccordionItemProps extends Omit<IAccordionProps, 'onChange'> {
|
|
82
85
|
toggleAccordion?: (number: any) => void;
|
|
83
86
|
toggleCollapse?: (number: any) => void;
|
|
84
87
|
childIndex?: number;
|
|
85
88
|
isShowMore?: boolean;
|
|
86
89
|
}
|
|
87
|
-
export type
|
|
88
|
-
export type IAccordionItemViewProps =
|
|
90
|
+
export type IAccordionViewProps = Pick<IAccordionProps, 'children' | 'className'>;
|
|
91
|
+
export type IAccordionItemViewProps = IAccordionItemProps & IUiComponent;
|
|
89
92
|
declare function Accordion(props: IAccordionProps): JSX.Element;
|
|
90
93
|
export default Accordion;
|
|
@@ -44,6 +44,7 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
44
44
|
};
|
|
45
45
|
exports.__esModule = true;
|
|
46
46
|
var React = __importStar(require("react"));
|
|
47
|
+
var react_1 = require("react");
|
|
47
48
|
var hooks_1 = require("../../../hooks");
|
|
48
49
|
function Accordion(props) {
|
|
49
50
|
var _a = React.useState([]), selectedAccordionItems = _a[0], setSelectedAccordionItems = _a[1];
|
|
@@ -77,7 +78,11 @@ function Accordion(props) {
|
|
|
77
78
|
}
|
|
78
79
|
};
|
|
79
80
|
var components = (0, hooks_1.useComponents)();
|
|
81
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
82
|
+
className: props.className,
|
|
83
|
+
children: props.children
|
|
84
|
+
}); }, [props.children, props.className]);
|
|
80
85
|
var AccordionView = components.ui.getView(props.view || 'content.AccordionView');
|
|
81
|
-
return (React.createElement(AccordionView, __assign({},
|
|
86
|
+
return (React.createElement(AccordionView, __assign({}, viewProps), React.Children.map(props.children, function (child, index) { return React.cloneElement(child, __assign({ style: props.style, activeKey: props.activeKey, childIndex: index, toggleCollapse: toggleCollapse, toggleAccordion: toggleAccordion, hasOneOpenItem: props.hasOneOpenItem, isShowMore: (selectedAccordionItems || []).includes(index), icon: props.icon, showIcon: props.showIcon }, child.props)); })));
|
|
82
87
|
}
|
|
83
88
|
exports["default"] = Accordion;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IAccordionItemProps } from './Accordion';
|
|
2
|
+
import { IAccordionItemProps, IAccordionItemViewProps } from './Accordion';
|
|
3
3
|
declare function AccordionItem(props: IAccordionItemProps): import("react").ReactElement<any, string | import("react").JSXElementConstructor<any>>;
|
|
4
4
|
declare namespace AccordionItem {
|
|
5
|
-
var defaultProps:
|
|
5
|
+
var defaultProps: IAccordionItemViewProps;
|
|
6
6
|
}
|
|
7
7
|
export default AccordionItem;
|
|
@@ -1,20 +1,9 @@
|
|
|
1
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
2
|
exports.__esModule = true;
|
|
14
3
|
var hooks_1 = require("../../../hooks");
|
|
15
4
|
function AccordionItem(props) {
|
|
16
5
|
var components = (0, hooks_1.useComponents)();
|
|
17
|
-
return components.ui.renderView(props.view || 'content.AccordionItemView',
|
|
6
|
+
return components.ui.renderView(props.view || 'content.AccordionItemView', props);
|
|
18
7
|
}
|
|
19
8
|
AccordionItem.defaultProps = {
|
|
20
9
|
title: 'Accordion',
|
|
@@ -18,7 +18,7 @@ import React from 'react';
|
|
|
18
18
|
export interface IAlertProps extends IUiComponent {
|
|
19
19
|
/**
|
|
20
20
|
* Дочерние элементы
|
|
21
|
-
* @example {<span>children</span>}
|
|
21
|
+
* @example { <span>children</span> }
|
|
22
22
|
*/
|
|
23
23
|
children?: React.ReactNode;
|
|
24
24
|
/**
|
|
@@ -45,7 +45,10 @@ export interface IAlertProps extends IUiComponent {
|
|
|
45
45
|
showIcon?: boolean;
|
|
46
46
|
/**
|
|
47
47
|
* Callback функция вызываемая при нажатии на кнопку закрытия
|
|
48
|
-
* @example
|
|
48
|
+
* @example
|
|
49
|
+
* {
|
|
50
|
+
* () => console.log('this is callback')
|
|
51
|
+
* }
|
|
49
52
|
*/
|
|
50
53
|
onClose?: () => void;
|
|
51
54
|
/**
|
|
@@ -1,15 +1,4 @@
|
|
|
1
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
2
|
exports.__esModule = true;
|
|
14
3
|
var react_1 = require("react");
|
|
15
4
|
var hooks_1 = require("../../../hooks");
|
|
@@ -24,7 +13,19 @@ function Alert(props) {
|
|
|
24
13
|
props.onClose();
|
|
25
14
|
}
|
|
26
15
|
}, [props]);
|
|
27
|
-
|
|
16
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
17
|
+
type: props.type,
|
|
18
|
+
showIcon: props.showIcon,
|
|
19
|
+
message: props.message,
|
|
20
|
+
description: props.description,
|
|
21
|
+
showClose: props.showClose,
|
|
22
|
+
className: props.className,
|
|
23
|
+
style: props.style,
|
|
24
|
+
isExist: isExist,
|
|
25
|
+
isVisible: isVisible,
|
|
26
|
+
onClose: onClose
|
|
27
|
+
}); }, [isExist, isVisible, onClose, props.className, props.description, props.message, props.showClose, props.showIcon, props.style, props.type]);
|
|
28
|
+
return components.ui.renderView(props.view || 'content.AlertView', viewProps);
|
|
28
29
|
}
|
|
29
30
|
Alert.defaultProps = {
|
|
30
31
|
type: 'default',
|
|
@@ -1,15 +1,4 @@
|
|
|
1
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
2
|
exports.__esModule = true;
|
|
14
3
|
var react_1 = require("react");
|
|
15
4
|
var hooks_1 = require("../../../hooks");
|
|
@@ -32,7 +21,24 @@ function Avatar(props) {
|
|
|
32
21
|
}
|
|
33
22
|
return resultTitle;
|
|
34
23
|
}, [props.title]);
|
|
35
|
-
|
|
24
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
25
|
+
alt: props.alt,
|
|
26
|
+
size: props.size,
|
|
27
|
+
shape: props.shape,
|
|
28
|
+
src: props.src,
|
|
29
|
+
srcSet: props.srcSet,
|
|
30
|
+
status: props.status,
|
|
31
|
+
title: props.title,
|
|
32
|
+
children: props.children,
|
|
33
|
+
hasBorder: props.hasBorder,
|
|
34
|
+
className: props.className,
|
|
35
|
+
style: props.style,
|
|
36
|
+
isError: isError,
|
|
37
|
+
onError: onError,
|
|
38
|
+
formattedTitle: formattedTitle
|
|
39
|
+
}); }, [props.alt, props.size, props.shape, props.src, props.srcSet, props.status, props.title,
|
|
40
|
+
props.children, props.hasBorder, props.className, props.style, isError, onError, formattedTitle]);
|
|
41
|
+
return components.ui.renderView(props.view || 'content.AvatarView', viewProps);
|
|
36
42
|
}
|
|
37
43
|
Avatar.defaultProps = {
|
|
38
44
|
size: 'md',
|
|
@@ -47,7 +47,11 @@ export interface IBadgeProps extends IUiComponent {
|
|
|
47
47
|
message?: string;
|
|
48
48
|
/**
|
|
49
49
|
* Нужно ли отображать счетчик
|
|
50
|
-
* @example
|
|
50
|
+
* @example
|
|
51
|
+
* {
|
|
52
|
+
* isEnable: true,
|
|
53
|
+
* content: 'Hello from counter!',
|
|
54
|
+
* }
|
|
51
55
|
*/
|
|
52
56
|
counter: boolean | ICounter;
|
|
53
57
|
/**
|
|
@@ -1,15 +1,4 @@
|
|
|
1
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
2
|
exports.__esModule = true;
|
|
14
3
|
var react_1 = require("react");
|
|
15
4
|
var hooks_1 = require("../../../hooks");
|
|
@@ -22,7 +11,20 @@ function Badge(props) {
|
|
|
22
11
|
props.onClose();
|
|
23
12
|
}
|
|
24
13
|
}, [props]);
|
|
25
|
-
|
|
14
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
15
|
+
type: props.type,
|
|
16
|
+
size: props.size,
|
|
17
|
+
showClose: props.showClose,
|
|
18
|
+
roundingStyle: props.roundingStyle,
|
|
19
|
+
counter: props.counter,
|
|
20
|
+
message: props.message,
|
|
21
|
+
className: props.className,
|
|
22
|
+
style: props.style,
|
|
23
|
+
onClose: onClose,
|
|
24
|
+
isExist: isExist
|
|
25
|
+
}); }, [props.type, props.size, props.showClose, props.roundingStyle, props.counter, props.message,
|
|
26
|
+
props.className, props.style, onClose, isExist]);
|
|
27
|
+
return components.ui.renderView(props.view || 'content.BadgeView', viewProps);
|
|
26
28
|
}
|
|
27
29
|
Badge.defaultProps = {
|
|
28
30
|
type: 'primary',
|
|
@@ -29,7 +29,12 @@ export interface ICalendarProps extends IUiComponent {
|
|
|
29
29
|
onChange?: (date: string) => void;
|
|
30
30
|
/**
|
|
31
31
|
* Свойства для компонента DayPickerInput
|
|
32
|
-
* @example
|
|
32
|
+
* @example
|
|
33
|
+
* {
|
|
34
|
+
* dayPickerProps: {
|
|
35
|
+
* showWeekNumbers: true
|
|
36
|
+
* }
|
|
37
|
+
* }
|
|
33
38
|
*/
|
|
34
39
|
pickerProps?: DayPickerProps | any;
|
|
35
40
|
/**
|
|
@@ -1,15 +1,4 @@
|
|
|
1
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
2
|
exports.__esModule = true;
|
|
14
3
|
var react_1 = require("react");
|
|
15
4
|
var hooks_1 = require("../../../hooks");
|
|
@@ -45,7 +34,25 @@ function Calendar(props) {
|
|
|
45
34
|
props.onMonthChange(newMonth);
|
|
46
35
|
}
|
|
47
36
|
}, [props]);
|
|
48
|
-
|
|
37
|
+
var viewProps = (0, react_1.useMemo)(function () { return ({
|
|
38
|
+
month: month,
|
|
39
|
+
toYear: toYear,
|
|
40
|
+
fromYear: fromYear,
|
|
41
|
+
onDaySelect: onDaySelect,
|
|
42
|
+
onMonthSelect: onMonthSelect,
|
|
43
|
+
selectedDates: selectedDates,
|
|
44
|
+
toggleCaptionPanel: toggleCaptionPanel,
|
|
45
|
+
isCaptionPanelVisible: isCaptionPanelVisible,
|
|
46
|
+
style: props.style,
|
|
47
|
+
className: props.className,
|
|
48
|
+
viewProps: props.viewProps,
|
|
49
|
+
showFooter: props.showFooter,
|
|
50
|
+
pickerProps: props.pickerProps,
|
|
51
|
+
numberOfMonths: props.numberOfMonths
|
|
52
|
+
}); }, [fromYear, isCaptionPanelVisible, month, onDaySelect, onMonthSelect, props.className,
|
|
53
|
+
props.numberOfMonths, props.pickerProps, props.showFooter, props.style, props.viewProps,
|
|
54
|
+
selectedDates, toYear, toggleCaptionPanel]);
|
|
55
|
+
return components.ui.renderView(props.view || 'content.CalendarView', viewProps);
|
|
49
56
|
}
|
|
50
57
|
Calendar.defaultProps = {
|
|
51
58
|
numberOfMonths: 1,
|