@steroidsjs/core 3.0.0-beta.99 → 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 +15147 -6371
- package/en.json +151 -92
- 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 +40 -18
- package/ui/content/CalendarSystem/CalendarSystem.js +65 -76
- 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.js +11 -3
- 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 +90 -5
- package/ui/content/Chat/Chat.js +40 -14
- package/ui/content/Chat/constants/timeTemplatesAndUnits.d.ts +1 -0
- package/ui/content/Chat/constants/timeTemplatesAndUnits.js +2 -1
- package/ui/content/Chat/hooks/useChat.d.ts +5 -6
- package/ui/content/Chat/hooks/useChat.js +49 -3
- package/ui/content/Chat/utils/addNewMessageIntoGroupedMessages.d.ts +5 -0
- package/ui/content/Chat/utils/addNewMessageIntoGroupedMessages.js +61 -0
- package/ui/content/Chat/utils/getMessagesGroupedByDate.d.ts +1 -0
- package/ui/content/Chat/utils/getMessagesGroupedByDate.js +3 -2
- package/ui/content/Chat/utils/index.d.ts +4 -2
- package/ui/content/Chat/utils/index.js +6 -1
- 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/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/actions/notifications.js
CHANGED
|
@@ -26,7 +26,13 @@ var showNotification = function (message, level, params) {
|
|
|
26
26
|
return function (dispatch) {
|
|
27
27
|
var _a = params, position = _a.position, timeOut = _a.timeOut;
|
|
28
28
|
var id = (0, uniqueId_1["default"])();
|
|
29
|
-
dispatch({
|
|
29
|
+
dispatch({
|
|
30
|
+
type: exports.NOTIFICATIONS_SHOW,
|
|
31
|
+
id: id,
|
|
32
|
+
message: message,
|
|
33
|
+
level: level || 'success',
|
|
34
|
+
position: position
|
|
35
|
+
});
|
|
30
36
|
if (timeOut > 0) {
|
|
31
37
|
setTimeout(function () { return dispatch((0, exports.closeNotification)(id)); }, timeOut);
|
|
32
38
|
}
|
package/actions/router.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
exports.__esModule = true;
|
|
3
3
|
exports.goToParent = exports.goToRoute = exports.initParams = exports.initRoutes = exports.ROUTER_SET_DATA = exports.ROUTER_SET_PARAMS = exports.ROUTER_INIT_ROUTES = void 0;
|
|
4
4
|
var connected_react_router_1 = require("connected-react-router");
|
|
5
|
+
var path_to_regexp_1 = require("path-to-regexp");
|
|
5
6
|
exports.ROUTER_INIT_ROUTES = 'ROUTER_INIT_ROUTES';
|
|
6
7
|
exports.ROUTER_SET_PARAMS = 'ROUTER_SET_PARAMS';
|
|
7
8
|
exports.ROUTER_SET_DATA = 'ROUTER_SET_DATA';
|
|
@@ -15,6 +16,17 @@ var initParams = function (params) { return ({
|
|
|
15
16
|
params: params
|
|
16
17
|
}); };
|
|
17
18
|
exports.initParams = initParams;
|
|
19
|
+
// Include in the result only those parameters that are present as route parameters in the path
|
|
20
|
+
// For example, given the path '/users/:id' and the parameters { id: 1, page: 3, totalPages: 10 }, the function will return { id: 1 }.
|
|
21
|
+
var filterParamsForPath = function (path, params) {
|
|
22
|
+
var parsedPath = (0, path_to_regexp_1.parse)(path);
|
|
23
|
+
return parsedPath.reduce(function (filteredParams, param) {
|
|
24
|
+
if (typeof param === 'object' && params[param.name]) {
|
|
25
|
+
filteredParams[param.name] = params[param.name];
|
|
26
|
+
}
|
|
27
|
+
return filteredParams;
|
|
28
|
+
}, {});
|
|
29
|
+
};
|
|
18
30
|
var goToRoute = function (routeId, params, isReplace) {
|
|
19
31
|
if (params === void 0) { params = null; }
|
|
20
32
|
if (isReplace === void 0) { isReplace = false; }
|
|
@@ -27,8 +39,10 @@ var goToRoute = function (routeId, params, isReplace) {
|
|
|
27
39
|
var getRouteProp = require('../reducers/router').getRouteProp;
|
|
28
40
|
var buildUrl = require('../reducers/router').buildUrl;
|
|
29
41
|
var path = getRouteProp(getState(), routeId, 'path');
|
|
30
|
-
var
|
|
31
|
-
|
|
42
|
+
var filteredParams = filterParamsForPath(path, params);
|
|
43
|
+
var routeUrl = buildUrl(path, filteredParams);
|
|
44
|
+
var reduxAction = isReplace ? (0, connected_react_router_1.replace)(routeUrl) : (0, connected_react_router_1.push)(routeUrl);
|
|
45
|
+
return dispatch(reduxAction);
|
|
32
46
|
};
|
|
33
47
|
};
|
|
34
48
|
exports.goToRoute = goToRoute;
|
|
@@ -100,10 +100,10 @@ export interface IHttpComponent extends IHttpComponentConfig {
|
|
|
100
100
|
* Обертка над Axios для запросов на бекенд. Поддерживает токен авторизации, CSRF и обработку ошибок.
|
|
101
101
|
*/
|
|
102
102
|
export default class HttpComponent implements IHttpComponent {
|
|
103
|
-
accessTokenKey
|
|
104
|
-
apiUrl
|
|
105
|
-
clientStorageName
|
|
106
|
-
clientStorageExpiresIn
|
|
103
|
+
accessTokenKey?: string;
|
|
104
|
+
apiUrl?: string;
|
|
105
|
+
clientStorageName?: string;
|
|
106
|
+
clientStorageExpiresIn?: number;
|
|
107
107
|
_accessToken: any;
|
|
108
108
|
_axios: any;
|
|
109
109
|
_components: any;
|
|
@@ -131,9 +131,9 @@ export default class HttpComponent implements IHttpComponent {
|
|
|
131
131
|
post(url: any, params?: {}, options?: IHttpRequestOptions): any;
|
|
132
132
|
delete(url: any, params?: {}, options?: IHttpRequestOptions): any;
|
|
133
133
|
send(method: any, url: any, params?: {}, options?: IHttpRequestOptions): any;
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
protected _send(method: any, config: any, options: IHttpRequestOptions): any;
|
|
135
|
+
protected _sendAxios(config: any, options: IHttpRequestOptions): any;
|
|
136
136
|
afterRequest(response: any, config: any, options: IHttpRequestOptions): any;
|
|
137
|
-
|
|
137
|
+
protected _onTwoFactor(providerName: any): Promise<unknown>;
|
|
138
138
|
}
|
|
139
139
|
export {};
|
|
@@ -18,8 +18,8 @@ export interface IJwtHttpComponentConfig {
|
|
|
18
18
|
* Вариация HttpComponent с функционалом обновления токена авторизации
|
|
19
19
|
*/
|
|
20
20
|
export default class JwtHttpComponent extends BaseHttpComponent implements IJwtHttpComponentConfig {
|
|
21
|
-
refreshTokenRequest
|
|
22
|
-
refreshTokenKey
|
|
21
|
+
refreshTokenRequest?: IRefreshTokenRequest;
|
|
22
|
+
refreshTokenKey?: string;
|
|
23
23
|
_refreshToken: any;
|
|
24
24
|
constructor(components: any, config?: any);
|
|
25
25
|
getAxiosConfig(): Promise<{
|
|
@@ -55,15 +55,15 @@ export interface ILocaleComponent extends ILocaleComponentConfig {
|
|
|
55
55
|
* Компонент для локализации приложения. Поддерживает конфигурацию языка и временной зоны
|
|
56
56
|
*/
|
|
57
57
|
export default class LocaleComponent implements ILocaleComponent {
|
|
58
|
-
backendTimeDiff
|
|
59
|
-
backendTimeZone
|
|
58
|
+
backendTimeDiff?: null;
|
|
59
|
+
backendTimeZone?: any;
|
|
60
60
|
/**
|
|
61
61
|
* Язык приложения
|
|
62
62
|
* @example ru
|
|
63
63
|
*/
|
|
64
|
-
language
|
|
65
|
-
sourceLanguage
|
|
66
|
-
translations
|
|
64
|
+
language?: string;
|
|
65
|
+
sourceLanguage?: string;
|
|
66
|
+
translations?: any;
|
|
67
67
|
constructor(components: any, config: any);
|
|
68
68
|
/**
|
|
69
69
|
* Получение экземпляра `dayjs` с учетом временной зоны бекенда
|
|
@@ -73,5 +73,5 @@ export default class LocaleComponent implements ILocaleComponent {
|
|
|
73
73
|
dayjs(date?: string, format?: string): dayjs.Dayjs;
|
|
74
74
|
t(message: any, params?: {}): any;
|
|
75
75
|
translate(message: any, params?: {}): any;
|
|
76
|
-
|
|
76
|
+
protected _pasteComponents(message: any, components: any): any;
|
|
77
77
|
}
|
|
@@ -69,5 +69,94 @@ export default class MetaComponent implements IMetaComponent {
|
|
|
69
69
|
primaryKey: any;
|
|
70
70
|
attributes: any[];
|
|
71
71
|
};
|
|
72
|
-
|
|
72
|
+
protected _defaultTypes(): {
|
|
73
|
+
autoTime: {
|
|
74
|
+
jsType: string;
|
|
75
|
+
field: string;
|
|
76
|
+
formatter: string;
|
|
77
|
+
};
|
|
78
|
+
boolean: {
|
|
79
|
+
jsType: string;
|
|
80
|
+
field: string;
|
|
81
|
+
formatter: string;
|
|
82
|
+
};
|
|
83
|
+
dateTime: {
|
|
84
|
+
jsType: string;
|
|
85
|
+
field: string;
|
|
86
|
+
formatter: string;
|
|
87
|
+
};
|
|
88
|
+
date: {
|
|
89
|
+
jsType: string;
|
|
90
|
+
field: string;
|
|
91
|
+
formatter: string;
|
|
92
|
+
};
|
|
93
|
+
double: {
|
|
94
|
+
jsType: string;
|
|
95
|
+
field: string;
|
|
96
|
+
};
|
|
97
|
+
email: {
|
|
98
|
+
jsType: string;
|
|
99
|
+
field: string;
|
|
100
|
+
fieldProps: {
|
|
101
|
+
type: string;
|
|
102
|
+
};
|
|
103
|
+
};
|
|
104
|
+
enum: {
|
|
105
|
+
jsType: string;
|
|
106
|
+
field: string;
|
|
107
|
+
formatter: string;
|
|
108
|
+
};
|
|
109
|
+
file: {
|
|
110
|
+
jsType: string;
|
|
111
|
+
field: string;
|
|
112
|
+
};
|
|
113
|
+
files: {
|
|
114
|
+
jsType: string;
|
|
115
|
+
field: string;
|
|
116
|
+
fieldProps: {
|
|
117
|
+
multiple: boolean;
|
|
118
|
+
};
|
|
119
|
+
};
|
|
120
|
+
html: {
|
|
121
|
+
jsType: string;
|
|
122
|
+
field: string;
|
|
123
|
+
};
|
|
124
|
+
integer: {
|
|
125
|
+
jsType: string;
|
|
126
|
+
field: string;
|
|
127
|
+
};
|
|
128
|
+
password: {
|
|
129
|
+
jsType: string;
|
|
130
|
+
field: string;
|
|
131
|
+
};
|
|
132
|
+
phone: {
|
|
133
|
+
jsType: string;
|
|
134
|
+
field: string;
|
|
135
|
+
fieldProps: {
|
|
136
|
+
type: string;
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
primaryKey: {
|
|
140
|
+
jsType: string;
|
|
141
|
+
field: string;
|
|
142
|
+
fieldProps: {
|
|
143
|
+
type: string;
|
|
144
|
+
};
|
|
145
|
+
searchFieldProps: {
|
|
146
|
+
type: string;
|
|
147
|
+
};
|
|
148
|
+
};
|
|
149
|
+
string: {
|
|
150
|
+
jsType: string;
|
|
151
|
+
field: string;
|
|
152
|
+
};
|
|
153
|
+
text: {
|
|
154
|
+
jsType: string;
|
|
155
|
+
field: string;
|
|
156
|
+
};
|
|
157
|
+
time: {
|
|
158
|
+
jsType: string;
|
|
159
|
+
field: string;
|
|
160
|
+
};
|
|
161
|
+
};
|
|
73
162
|
}
|
|
@@ -84,7 +84,8 @@ var MetricsComponent = /** @class */ (function () {
|
|
|
84
84
|
(function (w, d, s, l, i) {
|
|
85
85
|
w[l] = w[l] || [];
|
|
86
86
|
w[l].push({
|
|
87
|
-
'gtm.start': new Date().getTime(),
|
|
87
|
+
'gtm.start': new Date().getTime(),
|
|
88
|
+
event: 'gtm.js'
|
|
88
89
|
});
|
|
89
90
|
var f = d.getElementsByTagName(s)[0];
|
|
90
91
|
var j = d.createElement(s);
|
|
@@ -87,11 +87,11 @@ export interface IResourceComponent extends IResourceComponentConfig {
|
|
|
87
87
|
* Компонент для подгрузки внешних API: Google Maps, Yandex Maps, Twitter, ...
|
|
88
88
|
*/
|
|
89
89
|
export default class ResourceComponent implements IResourceComponent {
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
googleApiKey
|
|
90
|
+
protected _callbacks: any;
|
|
91
|
+
protected _components: any;
|
|
92
|
+
googleApiKey?: string;
|
|
93
93
|
googleCaptchaSiteKey: string;
|
|
94
|
-
language
|
|
94
|
+
language?: string;
|
|
95
95
|
readonly RESOURCE_GOOGLE_MAP_API = "//maps.googleapis.com/maps/api/js";
|
|
96
96
|
readonly RESOURCE_YANDEX_MAP_API = "https://api-maps.yandex.ru/2.1/";
|
|
97
97
|
readonly RESOURCE_TWITTER_WIDGET = "https://platform.twitter.com/widgets.js";
|
|
@@ -127,15 +127,15 @@ export interface IUiApplicationComponent {
|
|
|
127
127
|
*/
|
|
128
128
|
export default class UiComponent implements IUiApplicationComponent {
|
|
129
129
|
components: IComponents;
|
|
130
|
-
|
|
131
|
-
|
|
130
|
+
protected _components: any;
|
|
131
|
+
protected _models: any;
|
|
132
132
|
icons: {
|
|
133
133
|
[name: string]: string | number | ReactNode;
|
|
134
134
|
} | any;
|
|
135
135
|
fields: any;
|
|
136
136
|
formatters: any;
|
|
137
|
-
|
|
138
|
-
|
|
137
|
+
protected _registeredFields: any;
|
|
138
|
+
protected _portalElement: HTMLDivElement;
|
|
139
139
|
constructor(components: any);
|
|
140
140
|
addViews(components: any): void;
|
|
141
141
|
renderView(Component: any, props: any, forceNode?: boolean): any;
|
|
@@ -151,9 +151,9 @@ export default class UiComponent implements IUiApplicationComponent {
|
|
|
151
151
|
addModels(models: any): void;
|
|
152
152
|
registerField(formId: any, attribute: any, type: any): void;
|
|
153
153
|
getRegisteredFields(formId: any): any;
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
protected _add(group: any, items: any, defaultNamespace?: any): void;
|
|
155
|
+
protected _getComponent(group: any, path: any): any;
|
|
156
|
+
protected _getPropsConfig(group: any, path: any): any;
|
|
157
157
|
setPortalElement(element: any): void;
|
|
158
158
|
getPortalElement(): HTMLDivElement;
|
|
159
159
|
}
|
|
@@ -63,12 +63,12 @@ export interface IWebSocketComponent extends IWebSocketComponentConfig {
|
|
|
63
63
|
* Компонент для создания websocket взаимодействия
|
|
64
64
|
*/
|
|
65
65
|
export default class WebSocketComponent implements IWebSocketComponent {
|
|
66
|
-
wsUrl
|
|
67
|
-
streams
|
|
68
|
-
authHandler
|
|
69
|
-
onOpen
|
|
70
|
-
onClose
|
|
71
|
-
onMessage
|
|
66
|
+
wsUrl?: string;
|
|
67
|
+
streams?: TStreams;
|
|
68
|
+
authHandler?: (components: IComponents) => Promise<string>;
|
|
69
|
+
onOpen?: (event: any, components: IComponents) => any;
|
|
70
|
+
onClose?: (event: any, components: IComponents) => any;
|
|
71
|
+
onMessage?: (data: Record<string, unknown>, components: IComponents) => any;
|
|
72
72
|
_components: IComponents;
|
|
73
73
|
_connection: any;
|
|
74
74
|
_tryCount: any;
|
|
@@ -81,10 +81,10 @@ export default class WebSocketComponent implements IWebSocketComponent {
|
|
|
81
81
|
subscribe(streams: any): void;
|
|
82
82
|
unsubscribeStream(stream: any, id: any): void;
|
|
83
83
|
unsubscribe(streams: any): void;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
84
|
+
protected _connect(): Promise<void>;
|
|
85
|
+
protected _reConnect(): void;
|
|
86
|
+
protected _onOpen(event: any): void;
|
|
87
|
+
protected _onMessage(message: any): void;
|
|
88
|
+
protected _onClose(event: any): void;
|
|
89
89
|
}
|
|
90
90
|
export {};
|