josenanodev-react-components-library 0.0.12 → 0.0.16

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.
Files changed (188) hide show
  1. package/README.md +4 -4
  2. package/dist/cjs/Services/MulticalendarStatesAndSettings.d.ts +17 -17
  3. package/dist/cjs/Services/MulticalendarStatesAndSettings.js +29 -29
  4. package/dist/cjs/Services/accessToken.d.ts +3 -3
  5. package/dist/cjs/Services/accessToken.js +15 -15
  6. package/dist/cjs/common/constants.d.ts +5 -5
  7. package/dist/cjs/common/constants.js +8 -8
  8. package/dist/cjs/common/turboSuiteUrls.d.ts +7 -7
  9. package/dist/cjs/common/turboSuiteUrls.js +9 -9
  10. package/dist/cjs/common/types.d.ts +113 -113
  11. package/dist/cjs/components/Modal/Modal.css +43 -43
  12. package/dist/cjs/components/Modal/Modal.d.ts +5 -5
  13. package/dist/cjs/components/Modal/Modal.js +82 -82
  14. package/dist/cjs/components/Modal/types.d.ts +9 -9
  15. package/dist/cjs/components/Multicalendar/Multicalendar.css +191 -191
  16. package/dist/cjs/components/Multicalendar/Multicalendar.d.ts +5 -5
  17. package/dist/cjs/components/Multicalendar/Multicalendar.js +302 -302
  18. package/dist/cjs/components/Multicalendar/MulticalendarOwnFunctions.d.ts +86 -86
  19. package/dist/cjs/components/Multicalendar/MulticalendarOwnFunctions.js +192 -192
  20. package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.css +5 -5
  21. package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.d.ts +5 -5
  22. package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.js +20 -20
  23. package/dist/cjs/components/Multicalendar/subcomponents/composites/CellsRow/types.d.ts +11 -11
  24. package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.css +7 -7
  25. package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.d.ts +5 -5
  26. package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.js +20 -20
  27. package/dist/cjs/components/Multicalendar/subcomponents/composites/DatesGrid/types.d.ts +13 -13
  28. package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.css +3 -3
  29. package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.d.ts +5 -5
  30. package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.js +15 -15
  31. package/dist/cjs/components/Multicalendar/subcomponents/composites/ListElementsColumn/types.d.ts +9 -9
  32. package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/Cell.css +7 -7
  33. package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/Cell.d.ts +5 -5
  34. package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/Cell.js +12 -12
  35. package/dist/cjs/components/Multicalendar/subcomponents/individuals/Cell/types.d.ts +10 -10
  36. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.css +60 -60
  37. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.d.ts +5 -5
  38. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.js +56 -56
  39. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DatesRow/types.d.ts +10 -10
  40. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.css +13 -13
  41. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.d.ts +5 -5
  42. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.js +13 -13
  43. package/dist/cjs/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/types.d.ts +5 -5
  44. package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.css +14 -14
  45. package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.d.ts +5 -5
  46. package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.js +14 -14
  47. package/dist/cjs/components/Multicalendar/subcomponents/individuals/ListElement/types.d.ts +7 -7
  48. package/dist/cjs/components/Multicalendar/types.d.ts +45 -45
  49. package/dist/cjs/components/PopUp/PopUp.css +15 -15
  50. package/dist/cjs/components/PopUp/PopUp.d.ts +5 -5
  51. package/dist/cjs/components/PopUp/PopUp.js +50 -50
  52. package/dist/cjs/components/PopUp/types.d.ts +8 -8
  53. package/dist/cjs/components/SearchBar/SearchBar.css +35 -35
  54. package/dist/cjs/components/SearchBar/SearchBar.d.ts +5 -5
  55. package/dist/cjs/components/SearchBar/SearchBar.js +67 -67
  56. package/dist/cjs/components/SearchBar/types.d.ts +10 -10
  57. package/dist/cjs/components/SideBar/SideBar.css +50 -50
  58. package/dist/cjs/components/SideBar/SideBar.d.ts +8 -8
  59. package/dist/cjs/components/SideBar/SideBar.js +70 -70
  60. package/dist/cjs/components/SideBar/types.d.ts +8 -8
  61. package/dist/cjs/hooks/useOutsideClick.d.ts +6 -6
  62. package/dist/cjs/hooks/useOutsideClick.js +25 -25
  63. package/dist/cjs/hooks/useResizeObserver.d.ts +7 -7
  64. package/dist/cjs/hooks/useResizeObserver.js +30 -30
  65. package/dist/cjs/hooks/useWindowsSize.d.ts +6 -6
  66. package/dist/cjs/hooks/useWindowsSize.js +20 -20
  67. package/dist/cjs/index.css +77 -77
  68. package/dist/cjs/index.d.ts +7 -7
  69. package/dist/cjs/index.js +18 -18
  70. package/dist/cjs/languages/en-EN.d.ts +3 -3
  71. package/dist/cjs/languages/en-EN.js +25 -25
  72. package/dist/cjs/languages/es-ES.d.ts +3 -3
  73. package/dist/cjs/languages/es-ES.js +25 -25
  74. package/dist/cjs/languages/it-IT.d.ts +3 -3
  75. package/dist/cjs/languages/it-IT.js +25 -25
  76. package/dist/cjs/languages/types.d.ts +21 -21
  77. package/dist/cjs/mocks/ReactComponentMocksForTesting/CellChildrenMock.d.ts +4 -4
  78. package/dist/cjs/mocks/ReactComponentMocksForTesting/CellChildrenMock.js +13 -13
  79. package/dist/cjs/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.d.ts +4 -4
  80. package/dist/cjs/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.js +10 -10
  81. package/dist/cjs/react-app-env.d.ts +1 -1
  82. package/dist/cjs/setupTests.d.ts +2 -2
  83. package/dist/cjs/setupTests.js +8 -8
  84. package/dist/cjs/stories/css-presets.css +77 -77
  85. package/dist/cjs/utils/datesArray.d.ts +8 -8
  86. package/dist/cjs/utils/datesArray.js +23 -23
  87. package/dist/cjs/utils/jsToSqlDate.d.ts +7 -7
  88. package/dist/cjs/utils/jsToSqlDate.js +22 -22
  89. package/dist/cjs/utils/monthYearString.d.ts +3 -3
  90. package/dist/cjs/utils/monthYearString.js +27 -27
  91. package/dist/cjs/utils/numberOfDaysInAMonth.d.ts +6 -6
  92. package/dist/cjs/utils/numberOfDaysInAMonth.js +12 -12
  93. package/dist/cjs/utils/sqlToJsDate.d.ts +7 -7
  94. package/dist/cjs/utils/sqlToJsDate.js +14 -14
  95. package/dist/esm/Services/MulticalendarStatesAndSettings.d.ts +17 -17
  96. package/dist/esm/Services/MulticalendarStatesAndSettings.js +23 -23
  97. package/dist/esm/Services/accessToken.d.ts +3 -3
  98. package/dist/esm/Services/accessToken.js +9 -9
  99. package/dist/esm/common/constants.d.ts +5 -5
  100. package/dist/esm/common/constants.js +5 -5
  101. package/dist/esm/common/turboSuiteUrls.d.ts +7 -7
  102. package/dist/esm/common/turboSuiteUrls.js +7 -7
  103. package/dist/esm/common/types.d.ts +113 -113
  104. package/dist/esm/components/Modal/Modal.css +43 -43
  105. package/dist/esm/components/Modal/Modal.d.ts +5 -5
  106. package/dist/esm/components/Modal/Modal.js +54 -54
  107. package/dist/esm/components/Modal/types.d.ts +9 -9
  108. package/dist/esm/components/Multicalendar/Multicalendar.css +191 -191
  109. package/dist/esm/components/Multicalendar/Multicalendar.d.ts +5 -5
  110. package/dist/esm/components/Multicalendar/Multicalendar.js +274 -274
  111. package/dist/esm/components/Multicalendar/MulticalendarOwnFunctions.d.ts +86 -86
  112. package/dist/esm/components/Multicalendar/MulticalendarOwnFunctions.js +176 -176
  113. package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.css +5 -5
  114. package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.d.ts +5 -5
  115. package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/CellsRow.js +15 -15
  116. package/dist/esm/components/Multicalendar/subcomponents/composites/CellsRow/types.d.ts +11 -11
  117. package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.css +7 -7
  118. package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.d.ts +5 -5
  119. package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/DatesGrid.js +15 -15
  120. package/dist/esm/components/Multicalendar/subcomponents/composites/DatesGrid/types.d.ts +13 -13
  121. package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.css +3 -3
  122. package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.d.ts +5 -5
  123. package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/ListElementsColumn.js +10 -10
  124. package/dist/esm/components/Multicalendar/subcomponents/composites/ListElementsColumn/types.d.ts +9 -9
  125. package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/Cell.css +7 -7
  126. package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/Cell.d.ts +5 -5
  127. package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/Cell.js +7 -7
  128. package/dist/esm/components/Multicalendar/subcomponents/individuals/Cell/types.d.ts +10 -10
  129. package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.css +60 -60
  130. package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.d.ts +5 -5
  131. package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/DatesRow.js +51 -51
  132. package/dist/esm/components/Multicalendar/subcomponents/individuals/DatesRow/types.d.ts +10 -10
  133. package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.css +13 -13
  134. package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.d.ts +5 -5
  135. package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/DropdownMonthNavigation.js +8 -8
  136. package/dist/esm/components/Multicalendar/subcomponents/individuals/DropdownMonthNavigation/types.d.ts +5 -5
  137. package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.css +14 -14
  138. package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.d.ts +5 -5
  139. package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/ListElement.js +9 -9
  140. package/dist/esm/components/Multicalendar/subcomponents/individuals/ListElement/types.d.ts +7 -7
  141. package/dist/esm/components/Multicalendar/types.d.ts +45 -45
  142. package/dist/esm/components/PopUp/PopUp.css +15 -15
  143. package/dist/esm/components/PopUp/PopUp.d.ts +5 -5
  144. package/dist/esm/components/PopUp/PopUp.js +22 -22
  145. package/dist/esm/components/PopUp/types.d.ts +8 -8
  146. package/dist/esm/components/SearchBar/SearchBar.css +35 -35
  147. package/dist/esm/components/SearchBar/SearchBar.d.ts +5 -5
  148. package/dist/esm/components/SearchBar/SearchBar.js +42 -42
  149. package/dist/esm/components/SearchBar/types.d.ts +10 -10
  150. package/dist/esm/components/SideBar/SideBar.css +50 -50
  151. package/dist/esm/components/SideBar/SideBar.d.ts +8 -8
  152. package/dist/esm/components/SideBar/SideBar.js +42 -42
  153. package/dist/esm/components/SideBar/types.d.ts +8 -8
  154. package/dist/esm/hooks/useOutsideClick.d.ts +6 -6
  155. package/dist/esm/hooks/useOutsideClick.js +23 -23
  156. package/dist/esm/hooks/useResizeObserver.d.ts +7 -7
  157. package/dist/esm/hooks/useResizeObserver.js +28 -28
  158. package/dist/esm/hooks/useWindowsSize.d.ts +6 -6
  159. package/dist/esm/hooks/useWindowsSize.js +18 -18
  160. package/dist/esm/index.css +77 -77
  161. package/dist/esm/index.d.ts +7 -7
  162. package/dist/esm/index.js +7 -7
  163. package/dist/esm/languages/en-EN.d.ts +3 -3
  164. package/dist/esm/languages/en-EN.js +23 -23
  165. package/dist/esm/languages/es-ES.d.ts +3 -3
  166. package/dist/esm/languages/es-ES.js +23 -23
  167. package/dist/esm/languages/it-IT.d.ts +3 -3
  168. package/dist/esm/languages/it-IT.js +23 -23
  169. package/dist/esm/languages/types.d.ts +21 -21
  170. package/dist/esm/mocks/ReactComponentMocksForTesting/CellChildrenMock.d.ts +4 -4
  171. package/dist/esm/mocks/ReactComponentMocksForTesting/CellChildrenMock.js +8 -8
  172. package/dist/esm/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.d.ts +4 -4
  173. package/dist/esm/mocks/ReactComponentMocksForTesting/ListElementChildrenMock.js +5 -5
  174. package/dist/esm/react-app-env.d.ts +1 -1
  175. package/dist/esm/setupTests.d.ts +2 -2
  176. package/dist/esm/setupTests.js +6 -6
  177. package/dist/esm/stories/css-presets.css +77 -77
  178. package/dist/esm/utils/datesArray.d.ts +8 -8
  179. package/dist/esm/utils/datesArray.js +21 -21
  180. package/dist/esm/utils/jsToSqlDate.d.ts +7 -7
  181. package/dist/esm/utils/jsToSqlDate.js +20 -20
  182. package/dist/esm/utils/monthYearString.d.ts +3 -3
  183. package/dist/esm/utils/monthYearString.js +25 -25
  184. package/dist/esm/utils/numberOfDaysInAMonth.d.ts +6 -6
  185. package/dist/esm/utils/numberOfDaysInAMonth.js +8 -8
  186. package/dist/esm/utils/sqlToJsDate.d.ts +7 -7
  187. package/dist/esm/utils/sqlToJsDate.js +12 -12
  188. package/package.json +103 -93
@@ -1,86 +1,86 @@
1
- import React from "react";
2
- import { languageType } from "../../languages/types";
3
- /**
4
- *
5
- * @param dateObject Date Object
6
- * @param elementRef ref of the element that will be scrolled
7
- * @param leftPagination number of cells to the left
8
- * @param cellsWidth width of cells
9
- */
10
- export declare function scrollByDate(dateObject: Date, elementRef: React.RefObject<HTMLDivElement>, leftPagination: number, cellsWidth: number): void;
11
- /**
12
- *
13
- * @param xPosition position X of grid
14
- * @param cellsWidth width of grid cells
15
- * @param leftPagination number of cells to the left
16
- * @param initialDateOffset offset of cells for the initial date
17
- * @returns milliseconds of the minimal date
18
- */
19
- export declare function minimalDateMilliseconds(xPosition: number, cellsWidth: number, leftPagination: number, initialDateOffset: number): number;
20
- /**
21
- *
22
- * @param millisecondsOfMinimalDate milliseconds of the minimal date
23
- * @param initialDateOffset offset of number of cells for initial date
24
- * @returns The minimal visible date object
25
- */
26
- export declare function defineMinimalVisibleDate(millisecondsOfMinimalDate: number, initialDateOffset: number): Date;
27
- /**
28
- *
29
- * @param xPosition current x position in the grid horizontal scroll
30
- * @param cellsWidth width of grid cells
31
- * @param chunkRenderX extra rendered cells in a row
32
- * @returns number X offset
33
- */
34
- export declare function defineXOffset(xPosition: number, cellsWidth: number, chunkRenderX: number): number;
35
- /**
36
- *
37
- * @param paginationWidth width of pagination of horizontal axis of the grid
38
- * @param chunkRenderX extra rendered cells in every row
39
- * @param minimalDateMilliseconds milliseconds of the minimal date
40
- * @returns an array containing all the dates that should be rendered base on position of x scroll
41
- */
42
- export declare function defineVisibleDatesArray(paginationWidth: number, chunkRenderX: number, minimalDateMilliseconds: number): Date[];
43
- /**
44
- *
45
- * @param yPosition current y position in the grid vertical scroll
46
- * @param cellsHeight height of grid cells
47
- * @param chunkRenderY extra rendered cells in every column
48
- * @returns number Y offset
49
- */
50
- export declare function defineYOffset(yPosition: number, cellsHeight: number, chunkRenderY: number): number;
51
- /**
52
- *
53
- * @param paginationHeight height of pagination of the vertical axis of the grid
54
- * @param chunkRenderY extra rendered cells in every column
55
- * @param offset offset from top of the list
56
- * @param listElementsIds all ids array
57
- * @returns Array of the destinies that will be rendered
58
- */
59
- export declare function defineListElementsArrayVisibleList(paginationHeight: number, chunkRenderY: number, offset: number, listElementsIds: string[] | number[]): string[] | number[];
60
- /**
61
- *
62
- * @param leftPagination number of cells to the left
63
- * @param language language object for traductions
64
- * @returns string of the date, month followed by year
65
- */
66
- export declare function defineMonthsArray(leftPagination: number, rightPagination: number, language: languageType): JSX.Element[];
67
- /**
68
- *
69
- * @param holdingClic boolean to know if mouse id down
70
- * @param xClientPosition position x of the client
71
- * @param yClientPosition position y of the client
72
- * @param widthHorizontalBorder horizontal border of activation
73
- * @param widthVerticalBorder vertical border of activation
74
- * @param gridRef ref ofthe grid container
75
- */
76
- export declare function startAuthomaticScrollInGrid(holdingClic: boolean, xClientPosition: number, yClientPosition: number, widthHorizontalBorder: number, widthVerticalBorder: number, gridRef: React.RefObject<HTMLDivElement>): void;
77
- /**
78
- *
79
- * @param holdingClic boolean to know if mouse id down
80
- * @param xClientPosition position x of the client
81
- * @param yClientPosition position y of the client
82
- * @param widthHorizontalBorder horizontal border of activation
83
- * @param widthVerticalBorder vertical border of activation
84
- * @param gridContainer grid container
85
- */
86
- export declare function authomaticScrollInGrid(holdingClic: boolean, xClientPosition: number | undefined, yClientPosition: number | undefined, widthHorizontalBorder: number, widthVerticalBorder: number, gridContainer: HTMLDivElement): void;
1
+ import React from "react";
2
+ import { languageType } from "../../languages/types";
3
+ /**
4
+ *
5
+ * @param dateObject Date Object
6
+ * @param elementRef ref of the element that will be scrolled
7
+ * @param leftPagination number of cells to the left
8
+ * @param cellsWidth width of cells
9
+ */
10
+ export declare function scrollByDate(dateObject: Date, elementRef: React.RefObject<HTMLDivElement>, leftPagination: number, cellsWidth: number): void;
11
+ /**
12
+ *
13
+ * @param xPosition position X of grid
14
+ * @param cellsWidth width of grid cells
15
+ * @param leftPagination number of cells to the left
16
+ * @param initialDateOffset offset of cells for the initial date
17
+ * @returns milliseconds of the minimal date
18
+ */
19
+ export declare function minimalDateMilliseconds(xPosition: number, cellsWidth: number, leftPagination: number, initialDateOffset: number): number;
20
+ /**
21
+ *
22
+ * @param millisecondsOfMinimalDate milliseconds of the minimal date
23
+ * @param initialDateOffset offset of number of cells for initial date
24
+ * @returns The minimal visible date object
25
+ */
26
+ export declare function defineMinimalVisibleDate(millisecondsOfMinimalDate: number, initialDateOffset: number): Date;
27
+ /**
28
+ *
29
+ * @param xPosition current x position in the grid horizontal scroll
30
+ * @param cellsWidth width of grid cells
31
+ * @param chunkRenderX extra rendered cells in a row
32
+ * @returns number X offset
33
+ */
34
+ export declare function defineXOffset(xPosition: number, cellsWidth: number, chunkRenderX: number): number;
35
+ /**
36
+ *
37
+ * @param paginationWidth width of pagination of horizontal axis of the grid
38
+ * @param chunkRenderX extra rendered cells in every row
39
+ * @param minimalDateMilliseconds milliseconds of the minimal date
40
+ * @returns an array containing all the dates that should be rendered base on position of x scroll
41
+ */
42
+ export declare function defineVisibleDatesArray(paginationWidth: number, chunkRenderX: number, minimalDateMilliseconds: number): Date[];
43
+ /**
44
+ *
45
+ * @param yPosition current y position in the grid vertical scroll
46
+ * @param cellsHeight height of grid cells
47
+ * @param chunkRenderY extra rendered cells in every column
48
+ * @returns number Y offset
49
+ */
50
+ export declare function defineYOffset(yPosition: number, cellsHeight: number, chunkRenderY: number): number;
51
+ /**
52
+ *
53
+ * @param paginationHeight height of pagination of the vertical axis of the grid
54
+ * @param chunkRenderY extra rendered cells in every column
55
+ * @param offset offset from top of the list
56
+ * @param listElementsIds all ids array
57
+ * @returns Array of the destinies that will be rendered
58
+ */
59
+ export declare function defineListElementsArrayVisibleList(paginationHeight: number, chunkRenderY: number, offset: number, listElementsIds: string[] | number[]): string[] | number[];
60
+ /**
61
+ *
62
+ * @param leftPagination number of cells to the left
63
+ * @param language language object for traductions
64
+ * @returns string of the date, month followed by year
65
+ */
66
+ export declare function defineMonthsArray(leftPagination: number, rightPagination: number, language: languageType): JSX.Element[];
67
+ /**
68
+ *
69
+ * @param holdingClic boolean to know if mouse id down
70
+ * @param xClientPosition position x of the client
71
+ * @param yClientPosition position y of the client
72
+ * @param widthHorizontalBorder horizontal border of activation
73
+ * @param widthVerticalBorder vertical border of activation
74
+ * @param gridRef ref ofthe grid container
75
+ */
76
+ export declare function startAuthomaticScrollInGrid(holdingClic: boolean, xClientPosition: number, yClientPosition: number, widthHorizontalBorder: number, widthVerticalBorder: number, gridRef: React.RefObject<HTMLDivElement>): void;
77
+ /**
78
+ *
79
+ * @param holdingClic boolean to know if mouse id down
80
+ * @param xClientPosition position x of the client
81
+ * @param yClientPosition position y of the client
82
+ * @param widthHorizontalBorder horizontal border of activation
83
+ * @param widthVerticalBorder vertical border of activation
84
+ * @param gridContainer grid container
85
+ */
86
+ export declare function authomaticScrollInGrid(holdingClic: boolean, xClientPosition: number | undefined, yClientPosition: number | undefined, widthHorizontalBorder: number, widthVerticalBorder: number, gridContainer: HTMLDivElement): void;
@@ -1,176 +1,176 @@
1
- import React from "react";
2
- //Utils
3
- import jsToSqlDate from "../../utils/jsToSqlDate";
4
- import monthYearString from "../../utils/monthYearString";
5
- //Variables
6
- import { millisecondsOfOneDay } from "../../common/constants";
7
- /**
8
- *
9
- * @param dateObject Date Object
10
- * @param elementRef ref of the element that will be scrolled
11
- * @param leftPagination number of cells to the left
12
- * @param cellsWidth width of cells
13
- */
14
- export function scrollByDate(dateObject, elementRef, leftPagination, cellsWidth) {
15
- //nueva posicion de scroll horizontal = cantidad de dias hasta hoy * ancho de celda
16
- if (elementRef.current !== null) {
17
- elementRef.current.scrollLeft =
18
- ((Date.parse(dateObject.toString()) -
19
- (Date.parse(new Date().toString()) -
20
- (leftPagination + 1) * millisecondsOfOneDay)) /
21
- millisecondsOfOneDay) *
22
- cellsWidth;
23
- }
24
- }
25
- /**
26
- *
27
- * @param xPosition position X of grid
28
- * @param cellsWidth width of grid cells
29
- * @param leftPagination number of cells to the left
30
- * @param initialDateOffset offset of cells for the initial date
31
- * @returns milliseconds of the minimal date
32
- */
33
- export function minimalDateMilliseconds(xPosition, cellsWidth, leftPagination, initialDateOffset) {
34
- let minimalDate = new Date(Date.parse(new Date().toString()) +
35
- millisecondsOfOneDay *
36
- (Math.floor(xPosition / cellsWidth) - leftPagination - initialDateOffset));
37
- minimalDate.setHours(12, 0, 0, 0);
38
- return Date.parse(minimalDate.toString());
39
- }
40
- /**
41
- *
42
- * @param millisecondsOfMinimalDate milliseconds of the minimal date
43
- * @param initialDateOffset offset of number of cells for initial date
44
- * @returns The minimal visible date object
45
- */
46
- export function defineMinimalVisibleDate(millisecondsOfMinimalDate, initialDateOffset) {
47
- return new Date(millisecondsOfMinimalDate + initialDateOffset * millisecondsOfOneDay);
48
- }
49
- /**
50
- *
51
- * @param xPosition current x position in the grid horizontal scroll
52
- * @param cellsWidth width of grid cells
53
- * @param chunkRenderX extra rendered cells in a row
54
- * @returns number X offset
55
- */
56
- export function defineXOffset(xPosition, cellsWidth, chunkRenderX) {
57
- return Math.floor(xPosition / cellsWidth) - chunkRenderX;
58
- }
59
- /**
60
- *
61
- * @param paginationWidth width of pagination of horizontal axis of the grid
62
- * @param chunkRenderX extra rendered cells in every row
63
- * @param minimalDateMilliseconds milliseconds of the minimal date
64
- * @returns an array containing all the dates that should be rendered base on position of x scroll
65
- */
66
- export function defineVisibleDatesArray(paginationWidth, chunkRenderX, minimalDateMilliseconds) {
67
- let array = [];
68
- for (let index = 0; index < paginationWidth + chunkRenderX * 2; index++) {
69
- array[index] = new Date(minimalDateMilliseconds + millisecondsOfOneDay * (index + 1));
70
- }
71
- return array;
72
- }
73
- /**
74
- *
75
- * @param yPosition current y position in the grid vertical scroll
76
- * @param cellsHeight height of grid cells
77
- * @param chunkRenderY extra rendered cells in every column
78
- * @returns number Y offset
79
- */
80
- export function defineYOffset(yPosition, cellsHeight, chunkRenderY) {
81
- let desfase = Math.floor(yPosition / cellsHeight) - chunkRenderY;
82
- if (desfase < 0)
83
- desfase = 0;
84
- return desfase;
85
- }
86
- /**
87
- *
88
- * @param paginationHeight height of pagination of the vertical axis of the grid
89
- * @param chunkRenderY extra rendered cells in every column
90
- * @param offset offset from top of the list
91
- * @param listElementsIds all ids array
92
- * @returns Array of the destinies that will be rendered
93
- */
94
- export function defineListElementsArrayVisibleList(paginationHeight, chunkRenderY, offset, listElementsIds) {
95
- let array = [];
96
- for (let index = 0; index < paginationHeight + chunkRenderY * 2; index++) {
97
- if (listElementsIds[index + offset] && index + offset >= 0)
98
- array[index] = listElementsIds[index + offset];
99
- }
100
- return array;
101
- }
102
- /**
103
- *
104
- * @param leftPagination number of cells to the left
105
- * @param language language object for traductions
106
- * @returns string of the date, month followed by year
107
- */
108
- export function defineMonthsArray(leftPagination, rightPagination, language) {
109
- let minimumDateMilliseconds = Date.parse(new Date().toString()) - leftPagination * millisecondsOfOneDay;
110
- let maximumDateMilliseconds = Date.parse(new Date().toString()) + rightPagination * millisecondsOfOneDay;
111
- let array = [];
112
- let sideArray = [];
113
- for (let index = 0; index * millisecondsOfOneDay + minimumDateMilliseconds < maximumDateMilliseconds; index++) {
114
- let dateObject = new Date(millisecondsOfOneDay * index + minimumDateMilliseconds);
115
- let firstDayOfTheMonth = dateObject;
116
- firstDayOfTheMonth.setDate(1);
117
- firstDayOfTheMonth.setHours(12, 0, 0, 0);
118
- let dateString = monthYearString(dateObject, language);
119
- if (!sideArray.includes(dateString)) {
120
- sideArray.push(dateString);
121
- array.push(React.createElement("option", {
122
- key: jsToSqlDate(firstDayOfTheMonth),
123
- value: jsToSqlDate(firstDayOfTheMonth),
124
- }, dateString));
125
- }
126
- }
127
- return array;
128
- }
129
- /**
130
- *
131
- * @param holdingClic boolean to know if mouse id down
132
- * @param xClientPosition position x of the client
133
- * @param yClientPosition position y of the client
134
- * @param widthHorizontalBorder horizontal border of activation
135
- * @param widthVerticalBorder vertical border of activation
136
- * @param gridRef ref ofthe grid container
137
- */
138
- export function startAuthomaticScrollInGrid(holdingClic, xClientPosition, yClientPosition, widthHorizontalBorder, widthVerticalBorder, gridRef) {
139
- if (holdingClic && gridRef.current !== null) {
140
- if (xClientPosition < widthHorizontalBorder)
141
- gridRef.current.scrollLeft -= 10;
142
- if (xClientPosition > gridRef.current.offsetWidth - widthHorizontalBorder)
143
- gridRef.current.scrollLeft += 10;
144
- if (yClientPosition < widthVerticalBorder)
145
- gridRef.current.scrollTop -= 10;
146
- if (yClientPosition > gridRef.current.offsetHeight - widthVerticalBorder)
147
- gridRef.current.scrollTop += 10;
148
- }
149
- }
150
- /**
151
- *
152
- * @param holdingClic boolean to know if mouse id down
153
- * @param xClientPosition position x of the client
154
- * @param yClientPosition position y of the client
155
- * @param widthHorizontalBorder horizontal border of activation
156
- * @param widthVerticalBorder vertical border of activation
157
- * @param gridContainer grid container
158
- */
159
- export function authomaticScrollInGrid(holdingClic, xClientPosition, yClientPosition, widthHorizontalBorder, widthVerticalBorder, gridContainer) {
160
- if (holdingClic) {
161
- if (xClientPosition) {
162
- if (xClientPosition < widthHorizontalBorder)
163
- gridContainer.scrollLeft -= widthHorizontalBorder - xClientPosition;
164
- if (xClientPosition > gridContainer.offsetWidth - widthHorizontalBorder)
165
- gridContainer.scrollLeft +=
166
- xClientPosition + widthHorizontalBorder - gridContainer.offsetWidth;
167
- }
168
- if (yClientPosition) {
169
- if (yClientPosition < widthVerticalBorder)
170
- gridContainer.scrollTop -= widthVerticalBorder - yClientPosition;
171
- if (yClientPosition > gridContainer.offsetHeight - widthVerticalBorder)
172
- gridContainer.scrollTop +=
173
- yClientPosition + widthVerticalBorder - gridContainer.offsetHeight;
174
- }
175
- }
176
- }
1
+ import React from "react";
2
+ //Utils
3
+ import jsToSqlDate from "../../utils/jsToSqlDate";
4
+ import monthYearString from "../../utils/monthYearString";
5
+ //Variables
6
+ import { millisecondsOfOneDay } from "../../common/constants";
7
+ /**
8
+ *
9
+ * @param dateObject Date Object
10
+ * @param elementRef ref of the element that will be scrolled
11
+ * @param leftPagination number of cells to the left
12
+ * @param cellsWidth width of cells
13
+ */
14
+ export function scrollByDate(dateObject, elementRef, leftPagination, cellsWidth) {
15
+ //nueva posicion de scroll horizontal = cantidad de dias hasta hoy * ancho de celda
16
+ if (elementRef.current !== null) {
17
+ elementRef.current.scrollLeft =
18
+ ((Date.parse(dateObject.toString()) -
19
+ (Date.parse(new Date().toString()) -
20
+ (leftPagination + 1) * millisecondsOfOneDay)) /
21
+ millisecondsOfOneDay) *
22
+ cellsWidth;
23
+ }
24
+ }
25
+ /**
26
+ *
27
+ * @param xPosition position X of grid
28
+ * @param cellsWidth width of grid cells
29
+ * @param leftPagination number of cells to the left
30
+ * @param initialDateOffset offset of cells for the initial date
31
+ * @returns milliseconds of the minimal date
32
+ */
33
+ export function minimalDateMilliseconds(xPosition, cellsWidth, leftPagination, initialDateOffset) {
34
+ let minimalDate = new Date(Date.parse(new Date().toString()) +
35
+ millisecondsOfOneDay *
36
+ (Math.floor(xPosition / cellsWidth) - leftPagination - initialDateOffset));
37
+ minimalDate.setHours(12, 0, 0, 0);
38
+ return Date.parse(minimalDate.toString());
39
+ }
40
+ /**
41
+ *
42
+ * @param millisecondsOfMinimalDate milliseconds of the minimal date
43
+ * @param initialDateOffset offset of number of cells for initial date
44
+ * @returns The minimal visible date object
45
+ */
46
+ export function defineMinimalVisibleDate(millisecondsOfMinimalDate, initialDateOffset) {
47
+ return new Date(millisecondsOfMinimalDate + initialDateOffset * millisecondsOfOneDay);
48
+ }
49
+ /**
50
+ *
51
+ * @param xPosition current x position in the grid horizontal scroll
52
+ * @param cellsWidth width of grid cells
53
+ * @param chunkRenderX extra rendered cells in a row
54
+ * @returns number X offset
55
+ */
56
+ export function defineXOffset(xPosition, cellsWidth, chunkRenderX) {
57
+ return Math.floor(xPosition / cellsWidth) - chunkRenderX;
58
+ }
59
+ /**
60
+ *
61
+ * @param paginationWidth width of pagination of horizontal axis of the grid
62
+ * @param chunkRenderX extra rendered cells in every row
63
+ * @param minimalDateMilliseconds milliseconds of the minimal date
64
+ * @returns an array containing all the dates that should be rendered base on position of x scroll
65
+ */
66
+ export function defineVisibleDatesArray(paginationWidth, chunkRenderX, minimalDateMilliseconds) {
67
+ let array = [];
68
+ for (let index = 0; index < paginationWidth + chunkRenderX * 2; index++) {
69
+ array[index] = new Date(minimalDateMilliseconds + millisecondsOfOneDay * (index + 1));
70
+ }
71
+ return array;
72
+ }
73
+ /**
74
+ *
75
+ * @param yPosition current y position in the grid vertical scroll
76
+ * @param cellsHeight height of grid cells
77
+ * @param chunkRenderY extra rendered cells in every column
78
+ * @returns number Y offset
79
+ */
80
+ export function defineYOffset(yPosition, cellsHeight, chunkRenderY) {
81
+ let desfase = Math.floor(yPosition / cellsHeight) - chunkRenderY;
82
+ if (desfase < 0)
83
+ desfase = 0;
84
+ return desfase;
85
+ }
86
+ /**
87
+ *
88
+ * @param paginationHeight height of pagination of the vertical axis of the grid
89
+ * @param chunkRenderY extra rendered cells in every column
90
+ * @param offset offset from top of the list
91
+ * @param listElementsIds all ids array
92
+ * @returns Array of the destinies that will be rendered
93
+ */
94
+ export function defineListElementsArrayVisibleList(paginationHeight, chunkRenderY, offset, listElementsIds) {
95
+ let array = [];
96
+ for (let index = 0; index < paginationHeight + chunkRenderY * 2; index++) {
97
+ if (listElementsIds[index + offset] && index + offset >= 0)
98
+ array[index] = listElementsIds[index + offset];
99
+ }
100
+ return array;
101
+ }
102
+ /**
103
+ *
104
+ * @param leftPagination number of cells to the left
105
+ * @param language language object for traductions
106
+ * @returns string of the date, month followed by year
107
+ */
108
+ export function defineMonthsArray(leftPagination, rightPagination, language) {
109
+ let minimumDateMilliseconds = Date.parse(new Date().toString()) - leftPagination * millisecondsOfOneDay;
110
+ let maximumDateMilliseconds = Date.parse(new Date().toString()) + rightPagination * millisecondsOfOneDay;
111
+ let array = [];
112
+ let sideArray = [];
113
+ for (let index = 0; index * millisecondsOfOneDay + minimumDateMilliseconds < maximumDateMilliseconds; index++) {
114
+ let dateObject = new Date(millisecondsOfOneDay * index + minimumDateMilliseconds);
115
+ let firstDayOfTheMonth = dateObject;
116
+ firstDayOfTheMonth.setDate(1);
117
+ firstDayOfTheMonth.setHours(12, 0, 0, 0);
118
+ let dateString = monthYearString(dateObject, language);
119
+ if (!sideArray.includes(dateString)) {
120
+ sideArray.push(dateString);
121
+ array.push(React.createElement("option", {
122
+ key: jsToSqlDate(firstDayOfTheMonth),
123
+ value: jsToSqlDate(firstDayOfTheMonth),
124
+ }, dateString));
125
+ }
126
+ }
127
+ return array;
128
+ }
129
+ /**
130
+ *
131
+ * @param holdingClic boolean to know if mouse id down
132
+ * @param xClientPosition position x of the client
133
+ * @param yClientPosition position y of the client
134
+ * @param widthHorizontalBorder horizontal border of activation
135
+ * @param widthVerticalBorder vertical border of activation
136
+ * @param gridRef ref ofthe grid container
137
+ */
138
+ export function startAuthomaticScrollInGrid(holdingClic, xClientPosition, yClientPosition, widthHorizontalBorder, widthVerticalBorder, gridRef) {
139
+ if (holdingClic && gridRef.current !== null) {
140
+ if (xClientPosition < widthHorizontalBorder)
141
+ gridRef.current.scrollLeft -= 10;
142
+ if (xClientPosition > gridRef.current.offsetWidth - widthHorizontalBorder)
143
+ gridRef.current.scrollLeft += 10;
144
+ if (yClientPosition < widthVerticalBorder)
145
+ gridRef.current.scrollTop -= 10;
146
+ if (yClientPosition > gridRef.current.offsetHeight - widthVerticalBorder)
147
+ gridRef.current.scrollTop += 10;
148
+ }
149
+ }
150
+ /**
151
+ *
152
+ * @param holdingClic boolean to know if mouse id down
153
+ * @param xClientPosition position x of the client
154
+ * @param yClientPosition position y of the client
155
+ * @param widthHorizontalBorder horizontal border of activation
156
+ * @param widthVerticalBorder vertical border of activation
157
+ * @param gridContainer grid container
158
+ */
159
+ export function authomaticScrollInGrid(holdingClic, xClientPosition, yClientPosition, widthHorizontalBorder, widthVerticalBorder, gridContainer) {
160
+ if (holdingClic) {
161
+ if (xClientPosition) {
162
+ if (xClientPosition < widthHorizontalBorder)
163
+ gridContainer.scrollLeft -= widthHorizontalBorder - xClientPosition;
164
+ if (xClientPosition > gridContainer.offsetWidth - widthHorizontalBorder)
165
+ gridContainer.scrollLeft +=
166
+ xClientPosition + widthHorizontalBorder - gridContainer.offsetWidth;
167
+ }
168
+ if (yClientPosition) {
169
+ if (yClientPosition < widthVerticalBorder)
170
+ gridContainer.scrollTop -= widthVerticalBorder - yClientPosition;
171
+ if (yClientPosition > gridContainer.offsetHeight - widthVerticalBorder)
172
+ gridContainer.scrollTop +=
173
+ yClientPosition + widthVerticalBorder - gridContainer.offsetHeight;
174
+ }
175
+ }
176
+ }
@@ -1,5 +1,5 @@
1
- .cells-row {
2
- display: flex;
3
- flex-flow: row;
4
- }
5
-
1
+ .cells-row {
2
+ display: flex;
3
+ flex-flow: row;
4
+ }
5
+
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import "./CellsRow.css";
3
- import { CellsRowsPropsType } from "./types";
4
- declare const CellsRow: ({ listElementId, visibleDatesArray, width, height, cellsWidth, cellsHeight, ReactCellChildren, }: CellsRowsPropsType) => JSX.Element;
5
- export default CellsRow;
1
+ /// <reference types="react" />
2
+ import "./CellsRow.css";
3
+ import { CellsRowsPropsType } from "./types";
4
+ declare const CellsRow: ({ listElementId, visibleDatesArray, width, height, cellsWidth, cellsHeight, ReactCellChildren, }: CellsRowsPropsType) => JSX.Element;
5
+ export default CellsRow;
@@ -1,15 +1,15 @@
1
- import React from "react";
2
- import "./CellsRow.css";
3
- //Componentes
4
- import Cell from "../../individuals/Cell/Cell";
5
- //Utils
6
- import jsToSqlDate from "../../../../../utils/jsToSqlDate";
7
- const CellsRow = ({ listElementId, visibleDatesArray, width, height, cellsWidth, cellsHeight, ReactCellChildren, }) => {
8
- //Render
9
- return (React.createElement("div", { className: "cells-row", style: {
10
- width: width,
11
- height: height,
12
- } }, visibleDatesArray.length > 0 &&
13
- visibleDatesArray.map((date) => (React.createElement(Cell, { key: listElementId + date.toString(), date: jsToSqlDate(date), listElementId: listElementId, width: cellsWidth, heigth: cellsHeight, ReactCellChildren: ReactCellChildren })))));
14
- };
15
- export default CellsRow;
1
+ import React from "react";
2
+ import "./CellsRow.css";
3
+ //Componentes
4
+ import Cell from "../../individuals/Cell/Cell";
5
+ //Utils
6
+ import jsToSqlDate from "../../../../../utils/jsToSqlDate";
7
+ const CellsRow = ({ listElementId, visibleDatesArray, width, height, cellsWidth, cellsHeight, ReactCellChildren, }) => {
8
+ //Render
9
+ return (React.createElement("div", { className: "cells-row", style: {
10
+ width: width,
11
+ height: height,
12
+ } }, visibleDatesArray.length > 0 &&
13
+ visibleDatesArray.map((date) => (React.createElement(Cell, { key: listElementId + date.toString(), date: jsToSqlDate(date), listElementId: listElementId, width: cellsWidth, heigth: cellsHeight, ReactCellChildren: ReactCellChildren })))));
14
+ };
15
+ export default CellsRow;
@@ -1,11 +1,11 @@
1
- import { ReactCellChildrenType } from "../../../types";
2
-
3
- export interface CellsRowsPropsType {
4
- listElementId: string | number;
5
- visibleDatesArray: Date[];
6
- width: number;
7
- height: number;
8
- cellsWidth: number;
9
- cellsHeight: number;
10
- ReactCellChildren: ReactCellChildrenType;
11
- }
1
+ import { ReactCellChildrenType } from "../../../types";
2
+
3
+ export interface CellsRowsPropsType {
4
+ listElementId: string | number;
5
+ visibleDatesArray: Date[];
6
+ width: number;
7
+ height: number;
8
+ cellsWidth: number;
9
+ cellsHeight: number;
10
+ ReactCellChildren: ReactCellChildrenType;
11
+ }
@@ -1,7 +1,7 @@
1
- .dates-grid {
2
- box-sizing: border-box;
3
- overflow: hidden;
4
- }
5
- .dates-grid .div-cells-row-height {
6
- box-sizing: border-box;
7
- }
1
+ .dates-grid {
2
+ box-sizing: border-box;
3
+ overflow: hidden;
4
+ }
5
+ .dates-grid .div-cells-row-height {
6
+ box-sizing: border-box;
7
+ }
@@ -1,5 +1,5 @@
1
- /// <reference types="react" />
2
- import "./DatesGrid.css";
3
- import { DatesGridPropTypes } from "./types";
4
- declare const DatesGrid: ({ gridWidth, gridHeight, xOffset, yOffset, cellsWidth, cellsHeight, visibleListElementsIdsArray, visibleDates, ReactCellChildren, }: DatesGridPropTypes) => JSX.Element;
5
- export default DatesGrid;
1
+ /// <reference types="react" />
2
+ import "./DatesGrid.css";
3
+ import { DatesGridPropTypes } from "./types";
4
+ declare const DatesGrid: ({ gridWidth, gridHeight, xOffset, yOffset, cellsWidth, cellsHeight, visibleListElementsIdsArray, visibleDates, ReactCellChildren, }: DatesGridPropTypes) => JSX.Element;
5
+ export default DatesGrid;