josenanodev-react-components-library 0.0.26 → 0.0.28
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/dist/cjs/components/Multicalendar/Multicalendar.d.ts +1 -1
- package/dist/cjs/components/Multicalendar/Multicalendar.js +3 -6
- package/dist/cjs/components/Multicalendar/types.d.ts +3 -4
- package/dist/esm/components/Multicalendar/Multicalendar.d.ts +1 -1
- package/dist/esm/components/Multicalendar/Multicalendar.js +3 -6
- package/dist/esm/components/Multicalendar/types.d.ts +3 -4
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./Multicalendar.css";
|
|
3
3
|
import { MulticalendarPropsType } from "./types";
|
|
4
|
-
declare const Multicalendar: ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible, cellsWidth, cellsHeight, verticalAxisWidth, horizontalAxisHeight, pastDaysInitialQuantity, futureDaysInitialQuantity, chunkRenderX, chunkRenderY, dynamicDaysQuantity, draggingOverDateCells, waitTimeForCalls, callsOnInitialView,
|
|
4
|
+
declare const Multicalendar: ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible, cellsWidth, cellsHeight, verticalAxisWidth, horizontalAxisHeight, pastDaysInitialQuantity, futureDaysInitialQuantity, chunkRenderX, chunkRenderY, dynamicDaysQuantity, draggingOverDateCells, waitTimeForCalls, callsOnInitialView, callsOnScrollingStops, aditionalControlsComponents, upperLeftComponent, }: MulticalendarPropsType) => JSX.Element;
|
|
5
5
|
export default Multicalendar;
|
|
@@ -42,7 +42,7 @@ const useWindowsSize_1 = __importDefault(require("../../hooks/useWindowsSize"));
|
|
|
42
42
|
const sqlToJsDate_1 = __importDefault(require("../../utils/sqlToJsDate"));
|
|
43
43
|
//Services
|
|
44
44
|
const MulticalendarStatesAndSettings_1 = require("../../Services/MulticalendarStatesAndSettings");
|
|
45
|
-
const Multicalendar = ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible = true, cellsWidth = 120, cellsHeight = 80, verticalAxisWidth = 280, horizontalAxisHeight = 148, pastDaysInitialQuantity = 365, futureDaysInitialQuantity = 365, chunkRenderX = 0, chunkRenderY = 0, dynamicDaysQuantity = false, draggingOverDateCells = false, waitTimeForCalls = 500, callsOnInitialView,
|
|
45
|
+
const Multicalendar = ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible = true, cellsWidth = 120, cellsHeight = 80, verticalAxisWidth = 280, horizontalAxisHeight = 148, pastDaysInitialQuantity = 365, futureDaysInitialQuantity = 365, chunkRenderX = 0, chunkRenderY = 0, dynamicDaysQuantity = false, draggingOverDateCells = false, waitTimeForCalls = 500, callsOnInitialView, callsOnScrollingStops, aditionalControlsComponents, upperLeftComponent, }) => {
|
|
46
46
|
//Constantes del componente
|
|
47
47
|
const origin = {
|
|
48
48
|
x: pastDatesVisible ? Math.ceil(pastDaysInitialQuantity) * cellsWidth : 0,
|
|
@@ -220,14 +220,11 @@ const Multicalendar = ({ multicalendarId, ReactCellChildren, ReactListElementChi
|
|
|
220
220
|
}
|
|
221
221
|
}, [xPosition, yPosition, idTimeoutForCalls, waitTimeForCalls]);
|
|
222
222
|
(0, react_1.useEffect)(() => {
|
|
223
|
-
if (scrollingOnCourse &&
|
|
224
|
-
callsOnScrollingMoves(visibleListElementsIds, visibleDates);
|
|
225
|
-
}
|
|
226
|
-
else if (!scrollingOnCourse && callsOnScrollingStops) {
|
|
223
|
+
if (!scrollingOnCourse && callsOnScrollingStops) {
|
|
227
224
|
callsOnScrollingStops(visibleListElementsIds, visibleDates);
|
|
228
225
|
}
|
|
229
226
|
// eslint-disable-next-line
|
|
230
|
-
}, [scrollingOnCourse]);
|
|
227
|
+
}, [scrollingOnCourse, visibleListElementsIds, visibleDates]);
|
|
231
228
|
//Cancelar idIntervalo Autoscroll de rango cuando se deja de seleccionar
|
|
232
229
|
(0, react_1.useEffect)(() => {
|
|
233
230
|
if (!draggingOverDateCells) {
|
|
@@ -6,7 +6,7 @@ export interface MulticalendarPropsType {
|
|
|
6
6
|
ReactListElementChildren: ReactListElementChildrenType;
|
|
7
7
|
listElementsIdsArray: string[] | number[];
|
|
8
8
|
language: languageType;
|
|
9
|
-
pastDatesVisible?: boolean
|
|
9
|
+
pastDatesVisible?: boolean;
|
|
10
10
|
cellsWidth?: number;
|
|
11
11
|
cellsHeight?: number;
|
|
12
12
|
verticalAxisWidth?: number;
|
|
@@ -19,10 +19,9 @@ export interface MulticalendarPropsType {
|
|
|
19
19
|
dynamicDaysQuantity?: boolean;
|
|
20
20
|
waitTimeForCalls?: number;
|
|
21
21
|
callsOnInitialView?: (visibleIds: string[] | number[], visibleDates: Date[]) => void;
|
|
22
|
-
callsOnScrollingMoves?: (visibleIds: string[] | number[], visibleDates: Date[]) => void;
|
|
23
22
|
callsOnScrollingStops?: (visibleIds: string[] | number[], visibleDates: Date[]) => void;
|
|
24
|
-
aditionalControlsComponents?: JSX.Element | JSX.Element[]
|
|
25
|
-
upperLeftComponent?: JSX.Element
|
|
23
|
+
aditionalControlsComponents?: JSX.Element | JSX.Element[];
|
|
24
|
+
upperLeftComponent?: JSX.Element;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
export interface RenderCoordinatesType {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import "./Multicalendar.css";
|
|
3
3
|
import { MulticalendarPropsType } from "./types";
|
|
4
|
-
declare const Multicalendar: ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible, cellsWidth, cellsHeight, verticalAxisWidth, horizontalAxisHeight, pastDaysInitialQuantity, futureDaysInitialQuantity, chunkRenderX, chunkRenderY, dynamicDaysQuantity, draggingOverDateCells, waitTimeForCalls, callsOnInitialView,
|
|
4
|
+
declare const Multicalendar: ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible, cellsWidth, cellsHeight, verticalAxisWidth, horizontalAxisHeight, pastDaysInitialQuantity, futureDaysInitialQuantity, chunkRenderX, chunkRenderY, dynamicDaysQuantity, draggingOverDateCells, waitTimeForCalls, callsOnInitialView, callsOnScrollingStops, aditionalControlsComponents, upperLeftComponent, }: MulticalendarPropsType) => JSX.Element;
|
|
5
5
|
export default Multicalendar;
|
|
@@ -14,7 +14,7 @@ import useWindowSize from "../../hooks/useWindowsSize";
|
|
|
14
14
|
import sqlToJsDate from "../../utils/sqlToJsDate";
|
|
15
15
|
//Services
|
|
16
16
|
import { eraseMulticalendarYScrollPosition, getMulticalendarYScrollPosition, } from "../../Services/MulticalendarStatesAndSettings";
|
|
17
|
-
const Multicalendar = ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible = true, cellsWidth = 120, cellsHeight = 80, verticalAxisWidth = 280, horizontalAxisHeight = 148, pastDaysInitialQuantity = 365, futureDaysInitialQuantity = 365, chunkRenderX = 0, chunkRenderY = 0, dynamicDaysQuantity = false, draggingOverDateCells = false, waitTimeForCalls = 500, callsOnInitialView,
|
|
17
|
+
const Multicalendar = ({ multicalendarId, ReactCellChildren, ReactListElementChildren, listElementsIdsArray, language, pastDatesVisible = true, cellsWidth = 120, cellsHeight = 80, verticalAxisWidth = 280, horizontalAxisHeight = 148, pastDaysInitialQuantity = 365, futureDaysInitialQuantity = 365, chunkRenderX = 0, chunkRenderY = 0, dynamicDaysQuantity = false, draggingOverDateCells = false, waitTimeForCalls = 500, callsOnInitialView, callsOnScrollingStops, aditionalControlsComponents, upperLeftComponent, }) => {
|
|
18
18
|
//Constantes del componente
|
|
19
19
|
const origin = {
|
|
20
20
|
x: pastDatesVisible ? Math.ceil(pastDaysInitialQuantity) * cellsWidth : 0,
|
|
@@ -192,14 +192,11 @@ const Multicalendar = ({ multicalendarId, ReactCellChildren, ReactListElementChi
|
|
|
192
192
|
}
|
|
193
193
|
}, [xPosition, yPosition, idTimeoutForCalls, waitTimeForCalls]);
|
|
194
194
|
useEffect(() => {
|
|
195
|
-
if (scrollingOnCourse &&
|
|
196
|
-
callsOnScrollingMoves(visibleListElementsIds, visibleDates);
|
|
197
|
-
}
|
|
198
|
-
else if (!scrollingOnCourse && callsOnScrollingStops) {
|
|
195
|
+
if (!scrollingOnCourse && callsOnScrollingStops) {
|
|
199
196
|
callsOnScrollingStops(visibleListElementsIds, visibleDates);
|
|
200
197
|
}
|
|
201
198
|
// eslint-disable-next-line
|
|
202
|
-
}, [scrollingOnCourse]);
|
|
199
|
+
}, [scrollingOnCourse, visibleListElementsIds, visibleDates]);
|
|
203
200
|
//Cancelar idIntervalo Autoscroll de rango cuando se deja de seleccionar
|
|
204
201
|
useEffect(() => {
|
|
205
202
|
if (!draggingOverDateCells) {
|
|
@@ -6,7 +6,7 @@ export interface MulticalendarPropsType {
|
|
|
6
6
|
ReactListElementChildren: ReactListElementChildrenType;
|
|
7
7
|
listElementsIdsArray: string[] | number[];
|
|
8
8
|
language: languageType;
|
|
9
|
-
pastDatesVisible?: boolean
|
|
9
|
+
pastDatesVisible?: boolean;
|
|
10
10
|
cellsWidth?: number;
|
|
11
11
|
cellsHeight?: number;
|
|
12
12
|
verticalAxisWidth?: number;
|
|
@@ -19,10 +19,9 @@ export interface MulticalendarPropsType {
|
|
|
19
19
|
dynamicDaysQuantity?: boolean;
|
|
20
20
|
waitTimeForCalls?: number;
|
|
21
21
|
callsOnInitialView?: (visibleIds: string[] | number[], visibleDates: Date[]) => void;
|
|
22
|
-
callsOnScrollingMoves?: (visibleIds: string[] | number[], visibleDates: Date[]) => void;
|
|
23
22
|
callsOnScrollingStops?: (visibleIds: string[] | number[], visibleDates: Date[]) => void;
|
|
24
|
-
aditionalControlsComponents?: JSX.Element | JSX.Element[]
|
|
25
|
-
upperLeftComponent?: JSX.Element
|
|
23
|
+
aditionalControlsComponents?: JSX.Element | JSX.Element[];
|
|
24
|
+
upperLeftComponent?: JSX.Element;
|
|
26
25
|
}
|
|
27
26
|
|
|
28
27
|
export interface RenderCoordinatesType {
|