@steroidsjs/core 3.0.0-beta.94 → 3.0.0-beta.96
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/hooks/useApplication.d.ts +5 -5
- package/package.json +1 -1
- package/providers/ComponentsProvider.d.ts +5 -5
- package/ui/content/CalendarSystem/CalendarSystem.d.ts +1 -1
- package/ui/content/CalendarSystem/hooks/useCalendarSystemModals.d.ts +4 -4
- package/ui/content/CalendarSystem/hooks/useCalendarSystemModals.js +6 -3
- package/ui/content/Kanban/Kanban.d.ts +2 -2
- package/ui/content/Kanban/hooks/useKanban.d.ts +1 -1
- package/ui/content/Kanban/hooks/useKanban.js +1 -1
- package/ui/content/Kanban/reducers/index.d.ts +2 -2
- package/ui/content/Kanban/reducers/index.js +1 -2
- package/ui/content/Kanban/reducers/kanban.d.ts +0 -1
- package/ui/content/Kanban/reducers/kanban.js +1 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { IHttpComponentConfig } from '
|
|
3
|
-
import { IWebSocketComponentConfig } from '
|
|
4
|
-
import { ILocaleComponentConfig } from '
|
|
5
|
-
import { IJwtHttpComponentConfig } from '
|
|
6
|
-
import { IResourceComponentConfig } from '
|
|
2
|
+
import { IHttpComponentConfig } from '../components/HttpComponent';
|
|
3
|
+
import { IWebSocketComponentConfig } from '../components/WebSocketComponent';
|
|
4
|
+
import { ILocaleComponentConfig } from '../components/LocaleComponent';
|
|
5
|
+
import { IJwtHttpComponentConfig } from '../components/JwtHttpComponent';
|
|
6
|
+
import { IResourceComponentConfig } from '../components/ResourceComponent';
|
|
7
7
|
import { IThemeProviderProps } from '../providers/ThemeProvider';
|
|
8
8
|
import ClientStorageComponent, { IClientStorageComponentConfig } from '../components/ClientStorageComponent';
|
|
9
9
|
import HtmlComponent from '../components/HtmlComponent';
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { PropsWithChildren } from 'react';
|
|
3
|
-
import { IHttpComponent } from '
|
|
4
|
-
import { IHtmlComponent } from '
|
|
5
|
-
import { IWebSocketComponent } from '
|
|
6
|
-
import { IMetaComponent } from '
|
|
7
|
-
import { IStoreComponent } from '
|
|
3
|
+
import { IHttpComponent } from '../components/HttpComponent';
|
|
4
|
+
import { IHtmlComponent } from '../components/HtmlComponent';
|
|
5
|
+
import { IWebSocketComponent } from '../components/WebSocketComponent';
|
|
6
|
+
import { IMetaComponent } from '../components/MetaComponent';
|
|
7
|
+
import { IStoreComponent } from '../components/StoreComponent';
|
|
8
8
|
import { IClientStorageComponent } from '../components/ClientStorageComponent';
|
|
9
9
|
import { ILocaleComponent } from '../components/LocaleComponent';
|
|
10
10
|
import { IUiApplicationComponent } from '../components/UiComponent';
|
|
@@ -53,7 +53,7 @@ export interface ICalendarSystemViewProps extends Omit<ICalendarSystemProps, 'ca
|
|
|
53
53
|
onChangeCalendarType: (newType: string) => void;
|
|
54
54
|
onMonthChange: (newDate: Date) => void;
|
|
55
55
|
applyControl: (event: React.MouseEvent<HTMLElement>) => void;
|
|
56
|
-
openCreateModal:
|
|
56
|
+
openCreateModal: (eventInitialDay?: IDay) => void;
|
|
57
57
|
openEditModal: (event: IEvent) => void;
|
|
58
58
|
getEventsFromDate: (dateFromDay: Date, isMonth: boolean) => IEvent[];
|
|
59
59
|
onChangeEventGroupsIds: (selectedIds: number[]) => void;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IModalProps } from '../../../modal/Modal/Modal';
|
|
3
|
-
import { ICalendarSystemModalViewProps, IEvent, IEventGroup } from '../CalendarSystem';
|
|
3
|
+
import { ICalendarSystemModalViewProps, IDay, IEvent, IEventGroup } from '../CalendarSystem';
|
|
4
4
|
declare const useCalendarSystemModals: (calendarModalProps: IModalProps, innerEventGroups: IEventGroup[], setInnerEventGroups: React.Dispatch<React.SetStateAction<IEventGroup[]>>) => {
|
|
5
|
-
openCreateModal: () => void;
|
|
5
|
+
openCreateModal: (eventInitialDay?: IDay) => void;
|
|
6
6
|
openEditModal: (event: IEvent) => void;
|
|
7
7
|
getEventFromGroup: (event: IEvent) => IEventGroup;
|
|
8
|
-
getModalProps: (isCreate: boolean, eventInitialValues?: IEvent & {
|
|
8
|
+
getModalProps: (isCreate: boolean, eventInitialValues?: Partial<IEvent & {
|
|
9
9
|
eventGroupId: number;
|
|
10
|
-
}) => ICalendarSystemModalViewProps;
|
|
10
|
+
}>) => ICalendarSystemModalViewProps;
|
|
11
11
|
};
|
|
12
12
|
export default useCalendarSystemModals;
|
|
@@ -67,9 +67,12 @@ var useCalendarSystemModals = function (calendarModalProps, innerEventGroups, se
|
|
|
67
67
|
var getEventFromGroup = react_1["default"].useCallback(function (event) { return innerEventGroups
|
|
68
68
|
.find(function (group) { return group.events
|
|
69
69
|
.some(function (groupEvent) { return (0, isEqual_1["default"])((0, utils_1.getOmittedEvent)(groupEvent), (0, utils_1.getOmittedEvent)(event)); }); }); }, [innerEventGroups]);
|
|
70
|
-
var openCreateModal = react_1["default"].useCallback(function () {
|
|
71
|
-
|
|
72
|
-
|
|
70
|
+
var openCreateModal = react_1["default"].useCallback(function (eventInitialDay) {
|
|
71
|
+
if (eventInitialDay === void 0) { eventInitialDay = null; }
|
|
72
|
+
var modalProps = eventInitialDay
|
|
73
|
+
? getModalProps(true, { date: eventInitialDay.date }) : getModalProps(true);
|
|
74
|
+
dispatch((0, modal_1.openModal)(calendarModalView, modalProps));
|
|
75
|
+
}, [calendarModalView, dispatch, getModalProps]);
|
|
73
76
|
var openEditModal = react_1["default"].useCallback(function (event) {
|
|
74
77
|
var _a;
|
|
75
78
|
var eventGroupId = ((_a = getEventFromGroup(event)) === null || _a === void 0 ? void 0 : _a.id) || 0;
|
|
@@ -56,7 +56,7 @@ export interface IKanbanConfig {
|
|
|
56
56
|
/**
|
|
57
57
|
* Обработчик события редактирования карточки
|
|
58
58
|
*/
|
|
59
|
-
onEditTask?: (task: IKanbanTask) => void;
|
|
59
|
+
onEditTask?: (kanbanId: string, columnId: number, task: IKanbanTask) => void;
|
|
60
60
|
/**
|
|
61
61
|
* Идентификатор последней созданной задачи, нужен для определения последовательности id для новых задач
|
|
62
62
|
*/
|
|
@@ -94,7 +94,7 @@ function useKanban(config) {
|
|
|
94
94
|
var onEditTask = react_1["default"].useCallback(function (id, data, prevColumnId) {
|
|
95
95
|
var editedTask = normalizeEditTaskFormForState(id, data, config.assigners, tags);
|
|
96
96
|
if (config.onEditTask) {
|
|
97
|
-
config.onEditTask(editedTask);
|
|
97
|
+
config.onEditTask(config.kanbanId, data.columnId, editedTask);
|
|
98
98
|
}
|
|
99
99
|
var toDispatch = [
|
|
100
100
|
(0, actions_1.kanbanEditTask)(config.kanbanId, data.columnId, prevColumnId, editedTask),
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import kanban, { getKanban, getLastTaskId, getKanbanTags
|
|
2
|
-
export { getKanban, getLastTaskId, getKanbanTags
|
|
1
|
+
import kanban, { getKanban, getLastTaskId, getKanbanTags } from './kanban';
|
|
2
|
+
export { getKanban, getLastTaskId, getKanbanTags };
|
|
3
3
|
export default kanban;
|
|
@@ -23,10 +23,9 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
25
|
exports.__esModule = true;
|
|
26
|
-
exports.
|
|
26
|
+
exports.getKanbanTags = exports.getLastTaskId = exports.getKanban = void 0;
|
|
27
27
|
var kanban_1 = __importStar(require("./kanban"));
|
|
28
28
|
exports.getKanban = kanban_1.getKanban;
|
|
29
29
|
exports.getLastTaskId = kanban_1.getLastTaskId;
|
|
30
30
|
exports.getKanbanTags = kanban_1.getKanbanTags;
|
|
31
|
-
exports.getKanbanPriorities = kanban_1.getKanbanPriorities;
|
|
32
31
|
exports["default"] = kanban_1["default"];
|
|
@@ -6,4 +6,3 @@ export default _default;
|
|
|
6
6
|
export declare const getKanban: (state: any, kanbanId: any) => any;
|
|
7
7
|
export declare const getLastTaskId: (state: any, kanbanId: any) => any;
|
|
8
8
|
export declare const getKanbanTags: (state: any, kanbanId: any) => any;
|
|
9
|
-
export declare const getKanbanPriorities: (state: any, kanbanId: any) => any;
|
|
@@ -24,7 +24,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
24
24
|
};
|
|
25
25
|
var _a;
|
|
26
26
|
exports.__esModule = true;
|
|
27
|
-
exports.
|
|
27
|
+
exports.getKanbanTags = exports.getLastTaskId = exports.getKanban = exports.getKanbanColumns = void 0;
|
|
28
28
|
var get_1 = __importDefault(require("lodash-es/get"));
|
|
29
29
|
var actions_1 = require("../actions");
|
|
30
30
|
var initialState = {
|
|
@@ -118,5 +118,3 @@ var getLastTaskId = function (state, kanbanId) { return (0, get_1["default"])(st
|
|
|
118
118
|
exports.getLastTaskId = getLastTaskId;
|
|
119
119
|
var getKanbanTags = function (state, kanbanId) { return (0, get_1["default"])(state, ['kanban', 'kanbans', kanbanId, 'tags']) || null; };
|
|
120
120
|
exports.getKanbanTags = getKanbanTags;
|
|
121
|
-
var getKanbanPriorities = function (state, kanbanId) { return (0, get_1["default"])(state, ['kanban', 'kanbans', kanbanId, 'priorities']) || null; };
|
|
122
|
-
exports.getKanbanPriorities = getKanbanPriorities;
|