@steroidsjs/core 3.0.94 → 3.1.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/actions/list.d.ts +6 -0
- package/actions/list.js +8 -1
- package/components/HtmlComponent.d.ts +3 -3
- package/components/HttpComponent.d.ts +18 -15
- package/components/HttpComponent.js +40 -18
- package/components/LocaleComponent.js +5 -28
- package/components/UiComponent.d.ts +0 -1
- package/components/UiComponent.js +2 -25
- package/docs-autogen-result.json +86 -60
- package/hooks/useAbsolutePositioning.d.ts +2 -2
- package/hooks/useApplication.js +6 -29
- package/hooks/useFetch.d.ts +3 -8
- package/hooks/useFetch.js +18 -12
- package/hooks/useList.js +24 -32
- package/hooks/useListField.js +3 -25
- package/hooks/useTree.d.ts +3 -3
- package/package.json +1 -1
- package/providers/ComponentsProvider.d.ts +1 -2
- package/providers/ComponentsProvider.js +14 -25
- package/providers/ScreenProvider.d.ts +1 -2
- package/providers/ScreenProvider.js +13 -25
- package/providers/SsrProvider.d.ts +1 -2
- package/providers/SsrProvider.js +13 -25
- package/providers/ThemeProvider.d.ts +4 -4
- package/providers/ThemeProvider.js +18 -29
- package/reducers/list.d.ts +0 -1
- package/reducers/list.js +5 -4
- package/ui/content/Accordion/Accordion.d.ts +5 -5
- package/ui/content/Accordion/Accordion.js +5 -28
- package/ui/content/Alert/Alert.d.ts +2 -2
- package/ui/content/Avatar/Avatar.d.ts +2 -2
- package/ui/content/Avatar/AvatarGroup.d.ts +2 -2
- package/ui/content/Avatar/AvatarGroup.js +3 -25
- package/ui/content/CalendarSystem/CalendarSystem.d.ts +5 -5
- package/ui/content/CalendarSystem/CalendarSystem.js +2 -2
- package/ui/content/CalendarSystem/hooks/useCalendarControls.d.ts +3 -3
- package/ui/content/CalendarSystem/hooks/useCalendarControls.js +2 -25
- package/ui/content/CalendarSystem/hooks/useCalendarSystem.d.ts +3 -3
- package/ui/content/CalendarSystem/hooks/useCalendarSystem.js +8 -31
- package/ui/content/CalendarSystem/hooks/useCalendarSystemEventGroupModals.d.ts +0 -1
- package/ui/content/CalendarSystem/hooks/useCalendarSystemEventGroupModals.js +4 -4
- package/ui/content/CalendarSystem/hooks/useCalendarSystemModals.d.ts +2 -2
- package/ui/content/CalendarSystem/hooks/useCalendarSystemModals.js +6 -6
- package/ui/content/CalendarSystem/hooks/useCalendarType.js +3 -3
- package/ui/content/CalendarSystem/hooks/useEventsFromDate.js +2 -2
- package/ui/content/CalendarSystem/hooks/useExpandClickAway.d.ts +3 -3
- package/ui/content/CalendarSystem/hooks/useExpandClickAway.js +3 -6
- package/ui/content/Card/Card.d.ts +3 -3
- package/ui/content/Chat/Chat.d.ts +3 -3
- package/ui/content/Chat/Chat.js +3 -25
- package/ui/content/CopyToClipboard/CopyToClipboard.d.ts +4 -4
- package/ui/content/Dashboard/Dashboard.d.ts +2 -2
- package/ui/content/Dashboard/Dashboard.js +4 -26
- package/ui/content/Detail/Detail.d.ts +3 -3
- package/ui/content/Detail/Detail.js +3 -26
- package/ui/content/Detail/DetailItem.d.ts +3 -3
- package/ui/content/DropDown/DropDown.d.ts +2 -2
- package/ui/content/DropDown/DropDown.js +5 -31
- package/ui/content/Kanban/Kanban.js +15 -26
- package/ui/content/Kanban/hooks/useKanban.js +7 -30
- package/ui/content/Menu/Menu.d.ts +3 -3
- package/ui/content/Slider/Slider.d.ts +2 -2
- package/ui/content/Slider/Slider.js +2 -5
- package/ui/crud/Crud/Crud.d.ts +4 -5
- package/ui/crud/Crud/Crud.js +2 -25
- package/ui/crud/Crud/CrudContent.js +8 -35
- package/ui/crud/Crud/CrudModal.js +2 -26
- package/ui/form/AutoCompleteField/AutoCompleteField.d.ts +2 -2
- package/ui/form/BlankField/BlankField.d.ts +3 -3
- package/ui/form/BlankField/BlankField.js +2 -25
- package/ui/form/Button/Button.d.ts +2 -2
- package/ui/form/Button/Button.js +2 -25
- package/ui/form/CheckboxField/CheckboxField.d.ts +2 -2
- package/ui/form/CheckboxField/CheckboxField.js +2 -25
- package/ui/form/CheckboxListField/CheckboxListField.d.ts +1 -1
- package/ui/form/CheckboxTreeField/CheckboxTreeField.js +3 -25
- package/ui/form/DateField/DateField.d.ts +2 -2
- package/ui/form/DateRangeField/DateRangeField.d.ts +3 -3
- package/ui/form/DateTimeField/DateTimeField.d.ts +2 -2
- package/ui/form/DropDownField/DropDownField.d.ts +3 -3
- package/ui/form/DropDownField/DropDownField.js +3 -26
- package/ui/form/EmailField/EmailField.js +3 -26
- package/ui/form/EmailField/hooks/useInputTypeEmail.d.ts +3 -3
- package/ui/form/EmailField/hooks/useInputTypeEmail.js +3 -6
- package/ui/form/Field/Field.d.ts +2 -2
- package/ui/form/Field/Field.js +3 -26
- package/ui/form/Field/fieldWrapper.js +2 -25
- package/ui/form/FieldLayout/FieldLayout.d.ts +3 -3
- package/ui/form/FieldLayout/FieldLayout.js +1 -25
- package/ui/form/FieldList/FieldList.d.ts +2 -2
- package/ui/form/FieldList/FieldList.js +17 -16
- package/ui/form/FieldSet/FieldSet.d.ts +2 -2
- package/ui/form/FieldSet/FieldSet.js +5 -30
- package/ui/form/FileField/FileField.js +5 -27
- package/ui/form/Form/Form.d.ts +7 -11
- package/ui/form/Form/Form.js +6 -32
- package/ui/form/ImageField/ImageField.js +2 -25
- package/ui/form/InputField/InputField.d.ts +5 -6
- package/ui/form/InputField/InputField.js +2 -26
- package/ui/form/MaskField/MaskField.js +2 -2
- package/ui/form/NavField/NavField.js +3 -25
- package/ui/form/NumberField/NumberField.d.ts +1 -1
- package/ui/form/NumberField/NumberField.js +2 -25
- package/ui/form/NumberField/hooks/useInputTypeNumber.d.ts +3 -3
- package/ui/form/NumberField/hooks/useInputTypeNumber.js +2 -5
- package/ui/form/RadioField/RadioField.js +2 -2
- package/ui/form/RadioListField/RadioListField.js +2 -2
- package/ui/form/SliderField/SliderField.d.ts +2 -2
- package/ui/form/SwitcherField/SwitcherField.js +2 -2
- package/ui/form/SwitcherListField/SwitcherListField.js +2 -2
- package/ui/form/TextField/TextField.d.ts +2 -2
- package/ui/form/WizardForm/WizardForm.d.ts +4 -4
- package/ui/form/WizardForm/WizardForm.js +3 -27
- package/ui/form/WizardForm/utils.d.ts +2 -2
- package/ui/format/BooleanFormatter/BooleanFormatter.d.ts +2 -2
- package/ui/layout/Header/Header.d.ts +3 -3
- package/ui/layout/Meta/Meta.js +6 -15
- package/ui/layout/Notifications/Notifications.d.ts +2 -2
- package/ui/layout/Notifications/Notifications.js +3 -25
- package/ui/layout/Portal.d.ts +3 -3
- package/ui/layout/ProgressBar/ProgressBar.d.ts +3 -3
- package/ui/layout/ProgressBar/ProgressBar.js +4 -26
- package/ui/layout/Sidebar/Sidebar.d.ts +3 -3
- package/ui/layout/Sidebar/Sidebar.js +2 -25
- package/ui/layout/Skeleton/Skeleton.d.ts +3 -3
- package/ui/layout/Tooltip/Tooltip.js +19 -34
- package/ui/layout/Tooltip/TooltipPortalInner.d.ts +3 -3
- package/ui/layout/Tooltip/TooltipPortalInner.js +2 -25
- package/ui/list/Empty/Empty.d.ts +3 -3
- package/ui/list/Empty/Empty.js +2 -25
- package/ui/list/FlexGrid/FlexGrid.d.ts +2 -2
- package/ui/list/Grid/Grid.d.ts +3 -3
- package/ui/list/Grid/Grid.js +5 -27
- package/ui/list/InfiniteScroll/InfiniteScroll.d.ts +2 -2
- package/ui/list/InfiniteScroll/InfiniteScroll.js +3 -25
- package/ui/list/LayoutNames/LayoutNames.d.ts +2 -2
- package/ui/list/LayoutNames/LayoutNames.js +2 -25
- package/ui/list/List/List.js +3 -26
- package/ui/list/Pagination/Pagination.d.ts +2 -2
- package/ui/list/Pagination/Pagination.js +4 -27
- package/ui/list/PaginationSize/PaginationSize.d.ts +2 -2
- package/ui/list/PaginationSize/PaginationSize.js +2 -25
- package/ui/list/SearchForm/SearchForm.d.ts +2 -2
- package/ui/list/SearchForm/SearchForm.js +3 -26
- package/ui/list/Steps/Steps.d.ts +4 -4
- package/ui/list/TreeTable/TreeTable.d.ts +3 -3
- package/ui/list/TreeTable/TreeTable.js +4 -27
- package/ui/modal/Modal/Modal.js +3 -25
- package/ui/modal/ModalPortal/ModalPortal.js +3 -25
- package/ui/modal/TwoFactorModal/TwoFactorModal.js +4 -5
- package/ui/nav/Breadcrumbs/Breadcrumbs.d.ts +2 -2
- package/ui/nav/Link/Link.js +2 -25
- package/ui/nav/Nav/Nav.js +3 -25
- package/ui/nav/Router/Router.d.ts +3 -3
- package/ui/nav/Router/Router.js +14 -35
- package/ui/nav/Tree/Tree.d.ts +4 -4
- package/ui/typography/Text/Text.d.ts +2 -2
- package/ui/typography/Title/Title.d.ts +2 -2
- package/utils/createAxiosError.d.ts +9 -0
- package/utils/createAxiosError.js +39 -0
package/actions/list.d.ts
CHANGED
|
@@ -114,6 +114,7 @@ export declare const LIST_TOGGLE_ITEM = "@list/toggle_item";
|
|
|
114
114
|
export declare const LIST_TOGGLE_ALL = "@list/toggle_all";
|
|
115
115
|
export declare const LIST_SET_LAYOUT = "@list/set_layout";
|
|
116
116
|
export declare const LIST_CHANGE_ACTION = "@list/change_action";
|
|
117
|
+
export declare const LIST_CHANGE_CONFIG = "@list/change_config";
|
|
117
118
|
export declare const LIST_SELECT_ITEM = "@list/select_item";
|
|
118
119
|
export declare const httpFetchHandler: (list: IList, query: any, { http }: {
|
|
119
120
|
http: any;
|
|
@@ -146,6 +147,11 @@ export declare const listChangeAction: (listId: any, action: any) => {
|
|
|
146
147
|
listId: any;
|
|
147
148
|
action: any;
|
|
148
149
|
};
|
|
150
|
+
export declare const listChangeConfig: (listId: any, payload: any) => {
|
|
151
|
+
type: string;
|
|
152
|
+
listId: any;
|
|
153
|
+
payload: any;
|
|
154
|
+
};
|
|
149
155
|
/**
|
|
150
156
|
* Update query values and send request
|
|
151
157
|
* @param listId
|
package/actions/list.js
CHANGED
|
@@ -14,7 +14,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
14
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
15
15
|
};
|
|
16
16
|
exports.__esModule = true;
|
|
17
|
-
exports.selectItem = exports.toggleAll = exports.toggleItem = exports.deleteItem = exports.update = exports.add = exports.listDestroy = exports.listRefresh = exports.listLazyFetch = exports.listFetch = exports.listChangeAction = exports.listSetLayout = exports.listSetItems = exports.listInit = exports.localFetchHandler = exports.httpFetchHandler = exports.LIST_SELECT_ITEM = exports.LIST_CHANGE_ACTION = exports.LIST_SET_LAYOUT = exports.LIST_TOGGLE_ALL = exports.LIST_TOGGLE_ITEM = exports.LIST_DESTROY = exports.LIST_ITEM_DELETE = exports.LIST_ITEM_UPDATE = exports.LIST_ITEM_ADD = exports.LIST_AFTER_FETCH = exports.LIST_BEFORE_FETCH = exports.LIST_SET_ITEMS = exports.LIST_INIT = void 0;
|
|
17
|
+
exports.selectItem = exports.toggleAll = exports.toggleItem = exports.deleteItem = exports.update = exports.add = exports.listDestroy = exports.listRefresh = exports.listLazyFetch = exports.listFetch = exports.listChangeConfig = exports.listChangeAction = exports.listSetLayout = exports.listSetItems = exports.listInit = exports.localFetchHandler = exports.httpFetchHandler = exports.LIST_SELECT_ITEM = exports.LIST_CHANGE_CONFIG = exports.LIST_CHANGE_ACTION = exports.LIST_SET_LAYOUT = exports.LIST_TOGGLE_ALL = exports.LIST_TOGGLE_ITEM = exports.LIST_DESTROY = exports.LIST_ITEM_DELETE = exports.LIST_ITEM_UPDATE = exports.LIST_ITEM_ADD = exports.LIST_AFTER_FETCH = exports.LIST_BEFORE_FETCH = exports.LIST_SET_ITEMS = exports.LIST_INIT = void 0;
|
|
18
18
|
var axios_1 = __importDefault(require("axios"));
|
|
19
19
|
var get_1 = __importDefault(require("lodash-es/get"));
|
|
20
20
|
var isArray_1 = __importDefault(require("lodash-es/isArray"));
|
|
@@ -39,6 +39,7 @@ exports.LIST_TOGGLE_ITEM = '@list/toggle_item';
|
|
|
39
39
|
exports.LIST_TOGGLE_ALL = '@list/toggle_all';
|
|
40
40
|
exports.LIST_SET_LAYOUT = '@list/set_layout';
|
|
41
41
|
exports.LIST_CHANGE_ACTION = '@list/change_action';
|
|
42
|
+
exports.LIST_CHANGE_CONFIG = '@list/change_config';
|
|
42
43
|
exports.LIST_SELECT_ITEM = '@list/select_item';
|
|
43
44
|
//const STORAGE_LAYOUT_KEY_PREFIX = 'listLayout_';
|
|
44
45
|
var lazyTimers = {};
|
|
@@ -134,6 +135,12 @@ var listChangeAction = function (listId, action) { return ({
|
|
|
134
135
|
action: action
|
|
135
136
|
}); };
|
|
136
137
|
exports.listChangeAction = listChangeAction;
|
|
138
|
+
var listChangeConfig = function (listId, payload) { return ({
|
|
139
|
+
type: exports.LIST_CHANGE_CONFIG,
|
|
140
|
+
listId: listId,
|
|
141
|
+
payload: payload
|
|
142
|
+
}); };
|
|
143
|
+
exports.listChangeConfig = listChangeConfig;
|
|
137
144
|
/**
|
|
138
145
|
* Update query values and send request
|
|
139
146
|
* @param listId
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
2
|
export interface IHtmlComponent {
|
|
3
3
|
/**
|
|
4
4
|
* Утилита для создания css-классов по БЭМ
|
|
@@ -15,13 +15,13 @@ export interface IHtmlComponent {
|
|
|
15
15
|
* @param node Элемент, к которому нужно добавить класс.
|
|
16
16
|
* @param className Название класса.
|
|
17
17
|
*/
|
|
18
|
-
addClass(node:
|
|
18
|
+
addClass(node: ReactNode, className: string): void;
|
|
19
19
|
/**
|
|
20
20
|
* Метод для удаления css-класса у элемента
|
|
21
21
|
* @param node Элемент, у которого нужно удалить класс.
|
|
22
22
|
* @param className Название класса.
|
|
23
23
|
*/
|
|
24
|
-
removeClass(node:
|
|
24
|
+
removeClass(node: ReactNode, className: string): void;
|
|
25
25
|
closest(element: any, className: string): any;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
@@ -4,6 +4,9 @@ interface IHttpRequestOptions {
|
|
|
4
4
|
onTwoFactor?: (providerName: string) => Promise<any>;
|
|
5
5
|
responseType?: string;
|
|
6
6
|
}
|
|
7
|
+
interface IHttpRequestOptionsWithQuery extends IHttpRequestOptions {
|
|
8
|
+
query?: Record<string, any>;
|
|
9
|
+
}
|
|
7
10
|
export interface IHttpComponentConfig {
|
|
8
11
|
/**
|
|
9
12
|
* Url для http запросов
|
|
@@ -77,31 +80,31 @@ export interface IHttpComponent extends IHttpComponentConfig {
|
|
|
77
80
|
* Вызов метода get
|
|
78
81
|
* @param url URL для HTTP-запроса.
|
|
79
82
|
* @param params Параметры для запроса.
|
|
80
|
-
* @param options Опции для HTTP-запроса,
|
|
83
|
+
* @param options Опции для HTTP-запроса, заголовки, query-параметры и т.д.
|
|
81
84
|
*/
|
|
82
|
-
get(url: string, params?: Record<string, any>, options?:
|
|
85
|
+
get(url: string, params?: Record<string, any>, options?: IHttpRequestOptionsWithQuery): any;
|
|
83
86
|
/**
|
|
84
87
|
* Вызов метода post
|
|
85
88
|
* @param url URL для HTTP-запроса.
|
|
86
|
-
* @param
|
|
87
|
-
* @param options Опции для HTTP-запроса,
|
|
89
|
+
* @param body Тело запроса.
|
|
90
|
+
* @param options Опции для HTTP-запроса, заголовки, query-параметры и т.д.
|
|
88
91
|
*/
|
|
89
|
-
post(url: string,
|
|
92
|
+
post(url: string, body?: Record<string, any>, options?: IHttpRequestOptionsWithQuery): any;
|
|
90
93
|
/**
|
|
91
94
|
* Вызов метода delete
|
|
92
95
|
* @param url URL для HTTP-запроса.
|
|
93
|
-
* @param
|
|
94
|
-
* @param options Опции для HTTP-запроса,
|
|
96
|
+
* @param body Тело для запроса.
|
|
97
|
+
* @param options Опции для HTTP-запроса, заголовки, query-параметры и т.д.
|
|
95
98
|
*/
|
|
96
|
-
delete(url: string,
|
|
99
|
+
delete(url: string, body?: Record<string, any>, options?: IHttpRequestOptionsWithQuery): any;
|
|
97
100
|
/**
|
|
98
101
|
* Вызов http-метода
|
|
99
102
|
* @param method Метод запроса (GET, POST и т.д.).
|
|
100
103
|
* @param url URL для HTTP-запроса.
|
|
101
|
-
* @param
|
|
102
|
-
* @param options Опции для HTTP-запроса,
|
|
104
|
+
* @param body Тело запроса.
|
|
105
|
+
* @param options Опции для HTTP-запроса, заголовки, query-параметры и т.д.
|
|
103
106
|
*/
|
|
104
|
-
send(method: string, url: string,
|
|
107
|
+
send(method: string, url: string, body?: Record<string, any>, options?: IHttpRequestOptionsWithQuery): any;
|
|
105
108
|
/**
|
|
106
109
|
* Метод, который вызывается после запроса
|
|
107
110
|
* @param response Ответ, полученный после выполнения HTTP-запроса.
|
|
@@ -143,10 +146,10 @@ export default class HttpComponent implements IHttpComponent {
|
|
|
143
146
|
}): void;
|
|
144
147
|
getAxiosInstance(): Promise<any>;
|
|
145
148
|
getUrl(method: string): string;
|
|
146
|
-
get(url: any, params?: {}, options?:
|
|
147
|
-
post(url: any,
|
|
148
|
-
delete(url: any,
|
|
149
|
-
send(method: any, url: any,
|
|
149
|
+
get(url: any, params?: {}, options?: IHttpRequestOptionsWithQuery): any;
|
|
150
|
+
post(url: any, body?: {}, options?: IHttpRequestOptionsWithQuery): any;
|
|
151
|
+
delete(url: any, body?: {}, options?: IHttpRequestOptionsWithQuery): any;
|
|
152
|
+
send(method: any, url: any, body?: {}, options?: IHttpRequestOptionsWithQuery): any;
|
|
150
153
|
protected _send(method: any, config: any, options: IHttpRequestOptions): any;
|
|
151
154
|
protected _sendAxios(config: any, options: IHttpRequestOptions): any;
|
|
152
155
|
afterRequest(response: any, config: any, options: IHttpRequestOptions): any;
|
|
@@ -46,6 +46,17 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
46
46
|
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
47
47
|
}
|
|
48
48
|
};
|
|
49
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
50
|
+
var t = {};
|
|
51
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
52
|
+
t[p] = s[p];
|
|
53
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
54
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
55
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
56
|
+
t[p[i]] = s[p[i]];
|
|
57
|
+
}
|
|
58
|
+
return t;
|
|
59
|
+
};
|
|
49
60
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
50
61
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
51
62
|
};
|
|
@@ -203,37 +214,48 @@ var HttpComponent = /** @class */ (function () {
|
|
|
203
214
|
HttpComponent.prototype.get = function (url, params, options) {
|
|
204
215
|
if (params === void 0) { params = {}; }
|
|
205
216
|
if (options === void 0) { options = {}; }
|
|
217
|
+
var query = options.query, httpRequestOptions = __rest(options, ["query"]);
|
|
206
218
|
return this._send(url, {
|
|
207
219
|
method: 'get',
|
|
208
|
-
params: params
|
|
209
|
-
},
|
|
220
|
+
params: __assign(__assign({}, params), query)
|
|
221
|
+
}, httpRequestOptions).then(function (response) { return response.data; });
|
|
210
222
|
};
|
|
211
|
-
HttpComponent.prototype.post = function (url,
|
|
212
|
-
if (
|
|
223
|
+
HttpComponent.prototype.post = function (url, body, options) {
|
|
224
|
+
if (body === void 0) { body = {}; }
|
|
213
225
|
if (options === void 0) { options = {}; }
|
|
226
|
+
var query = options.query, httpRequestOptions = __rest(options, ["query"]);
|
|
214
227
|
return this._send(url, {
|
|
215
228
|
method: 'post',
|
|
216
|
-
data:
|
|
217
|
-
|
|
229
|
+
data: body,
|
|
230
|
+
params: query
|
|
231
|
+
}, httpRequestOptions).then(function (response) { return response.data; });
|
|
218
232
|
};
|
|
219
|
-
HttpComponent.prototype["delete"] = function (url,
|
|
220
|
-
if (
|
|
233
|
+
HttpComponent.prototype["delete"] = function (url, body, options) {
|
|
234
|
+
if (body === void 0) { body = {}; }
|
|
221
235
|
if (options === void 0) { options = {}; }
|
|
236
|
+
var query = options.query, httpRequestOptions = __rest(options, ["query"]);
|
|
222
237
|
return this._send(url, {
|
|
223
238
|
method: 'delete',
|
|
224
|
-
data:
|
|
225
|
-
|
|
239
|
+
data: body,
|
|
240
|
+
params: query
|
|
241
|
+
}, httpRequestOptions).then(function (response) { return response.data; });
|
|
226
242
|
};
|
|
227
|
-
HttpComponent.prototype.send = function (method, url,
|
|
228
|
-
|
|
229
|
-
if (params === void 0) { params = {}; }
|
|
243
|
+
HttpComponent.prototype.send = function (method, url, body, options) {
|
|
244
|
+
if (body === void 0) { body = {}; }
|
|
230
245
|
if (options === void 0) { options = {}; }
|
|
246
|
+
var query = options.query, httpRequestOptions = __rest(options, ["query"]);
|
|
231
247
|
method = method.toLowerCase();
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
248
|
+
if (method === 'get') {
|
|
249
|
+
return this._send(url, {
|
|
250
|
+
method: method,
|
|
251
|
+
params: __assign(__assign({}, body), query)
|
|
252
|
+
}, httpRequestOptions);
|
|
253
|
+
}
|
|
254
|
+
return this._send(url, {
|
|
255
|
+
method: method,
|
|
256
|
+
data: body,
|
|
257
|
+
params: query
|
|
258
|
+
}, httpRequestOptions);
|
|
237
259
|
};
|
|
238
260
|
HttpComponent.prototype._send = function (method, config, options) {
|
|
239
261
|
var _this = this;
|
|
@@ -1,36 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
-
if (mod && mod.__esModule) return mod;
|
|
20
|
-
var result = {};
|
|
21
|
-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
-
__setModuleDefault(result, mod);
|
|
23
|
-
return result;
|
|
24
|
-
};
|
|
25
2
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
4
|
};
|
|
28
5
|
exports.__esModule = true;
|
|
6
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
29
7
|
/* eslint-disable import/no-extraneous-dependencies */
|
|
30
8
|
var dayjs_1 = __importDefault(require("dayjs"));
|
|
31
9
|
var intl_messageformat_1 = __importDefault(require("intl-messageformat"));
|
|
32
10
|
var isObject_1 = __importDefault(require("lodash-es/isObject"));
|
|
33
|
-
var React = __importStar(require("react"));
|
|
34
11
|
require("dayjs/locale/it");
|
|
35
12
|
require("dayjs/locale/ru");
|
|
36
13
|
/**
|
|
@@ -133,17 +110,17 @@ var LocaleComponent = /** @class */ (function () {
|
|
|
133
110
|
if (j === 0
|
|
134
111
|
&& j < indexedComponents.length
|
|
135
112
|
&& indexedComponents[j].index === 0) {
|
|
136
|
-
result.push(
|
|
113
|
+
result.push((0, jsx_runtime_1.jsx)("span", { children: indexedComponents[j].component }, "element-".concat(j)));
|
|
137
114
|
isComponentAdded = true;
|
|
138
115
|
j += 1;
|
|
139
116
|
}
|
|
140
|
-
result.push(
|
|
117
|
+
result.push((0, jsx_runtime_1.jsx)("span", { children: textParts[i] }, "text-".concat(i)));
|
|
141
118
|
if (!isComponentAdded && j < indexedComponents.length) {
|
|
142
|
-
result.push(
|
|
119
|
+
result.push((0, jsx_runtime_1.jsx)("span", { children: indexedComponents[j].component }, "element".concat(j)));
|
|
143
120
|
j += 1;
|
|
144
121
|
}
|
|
145
122
|
}
|
|
146
|
-
return
|
|
123
|
+
return (0, jsx_runtime_1.jsx)("span", { children: result });
|
|
147
124
|
};
|
|
148
125
|
return LocaleComponent;
|
|
149
126
|
}());
|
|
@@ -10,29 +10,6 @@ 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
|
-
};
|
|
36
13
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
14
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
15
|
};
|
|
@@ -40,7 +17,7 @@ exports.__esModule = true;
|
|
|
40
17
|
var isFunction_1 = __importDefault(require("lodash-es/isFunction"));
|
|
41
18
|
var isObject_1 = __importDefault(require("lodash-es/isObject"));
|
|
42
19
|
var isString_1 = __importDefault(require("lodash-es/isString"));
|
|
43
|
-
var
|
|
20
|
+
var react_1 = require("react");
|
|
44
21
|
/**
|
|
45
22
|
* Ui Component
|
|
46
23
|
* Компонент для подгрузки и конфигурации UI компонентов приложения
|
|
@@ -70,7 +47,7 @@ var UiComponent = /** @class */ (function () {
|
|
|
70
47
|
}
|
|
71
48
|
return Component(props);
|
|
72
49
|
}
|
|
73
|
-
return
|
|
50
|
+
return (0, react_1.createElement)(Component, props);
|
|
74
51
|
};
|
|
75
52
|
UiComponent.prototype.getView = function (path) {
|
|
76
53
|
return this._getComponent('views', path);
|