react-weekly-planning 1.0.28 → 1.0.30

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 (55) hide show
  1. package/README.md +3 -1
  2. package/__tests__/page.test.js +106 -46
  3. package/__tests__/page.test.tsx +117 -45
  4. package/babel.config.js +1 -0
  5. package/components/AddTask/index.js +17 -0
  6. package/components/AddTask/index.tsx +43 -0
  7. package/components/CalendarForWeek.js +50 -0
  8. package/components/CalendarForWeek.tsx +229 -0
  9. package/components/CalendarForday.js +34 -0
  10. package/components/CalendarForday.tsx +130 -0
  11. package/components/DayContainer/index.js +15 -0
  12. package/components/DayContainer/index.tsx +36 -0
  13. package/components/GroupContainer/index.js +15 -0
  14. package/components/GroupContainer/index.tsx +42 -0
  15. package/components/GroupsHeadContainer/index.js +9 -0
  16. package/components/GroupsHeadContainer/index.tsx +19 -0
  17. package/components/SumHoursContainer/index.js +15 -0
  18. package/components/SumHoursContainer/index.tsx +38 -0
  19. package/components/SumHoursHead/index.js +9 -0
  20. package/components/SumHoursHead/index.tsx +22 -0
  21. package/components/TaskContainer/index.js +35 -0
  22. package/components/TaskContainer/index.tsx +86 -0
  23. package/components/TaskList/index.js +5 -0
  24. package/components/TaskList/index.tsx +20 -0
  25. package/contexts/CalendarContext.js +12 -12
  26. package/contexts/CalendarContext.tsx +4 -0
  27. package/definitions/index.js +1 -1
  28. package/definitions/index.ts +668 -7
  29. package/docs/global.html +4982 -4982
  30. package/docs/index.html +474 -474
  31. package/docs/index.ts.html +121 -121
  32. package/docs/scripts/linenumber.js +26 -26
  33. package/docs/scripts/search.js +38 -38
  34. package/docs/styles/iframe.css +12 -12
  35. package/docs/styles/prettify-jsdoc.css +111 -111
  36. package/docs/styles/prettify-tomorrow.css +132 -132
  37. package/docs/styles/reset.css +44 -44
  38. package/hooks/useCalendarDateState.js +19 -0
  39. package/hooks/useCalendarDateState.ts +44 -0
  40. package/index.js +70 -248
  41. package/index.tsx +59 -605
  42. package/jest.config.js +9 -9
  43. package/lib/slyles.js +21 -0
  44. package/lib/slyles.ts +25 -0
  45. package/lib/utils.js +619 -490
  46. package/lib/utils.ts +687 -383
  47. package/out/index.html +128 -128
  48. package/out/scripts/linenumber.js +26 -26
  49. package/out/scripts/search.js +38 -38
  50. package/out/styles/iframe.css +12 -12
  51. package/out/styles/prettify-jsdoc.css +111 -111
  52. package/out/styles/prettify-tomorrow.css +132 -132
  53. package/out/styles/reset.css +44 -44
  54. package/package.json +81 -71
  55. package/style.css +26 -4
package/out/index.html CHANGED
@@ -1,129 +1,129 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
-
4
- <head>
5
-
6
- <meta charset="utf-8">
7
- <meta name="viewport" content="width=device-width, initial-scale=1">
8
- <title> Home</title>
9
-
10
- <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
11
- <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
12
- <script src="./build/entry.js"></script>
13
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
14
- <!--[if lt IE 9]>
15
- <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16
- <![endif]-->
17
- <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
18
- <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
19
- <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
20
- <link type="text/css" rel="stylesheet" href="styles/app.min.css">
21
- <link type="text/css" rel="stylesheet" href="styles/iframe.css">
22
- <link type="text/css" rel="stylesheet" href="">
23
- <script async defer src="https://buttons.github.io/buttons.js"></script>
24
-
25
-
26
- </head>
27
-
28
-
29
-
30
- <body class="layout small-header">
31
- <div id="stickyNavbarOverlay"></div>
32
-
33
-
34
- <div class="top-nav">
35
- <div class="inner">
36
- <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
37
- <span aria-hidden="true"></span>
38
- <span aria-hidden="true"></span>
39
- <span aria-hidden="true"></span>
40
- </a>
41
- <div class="logo">
42
-
43
-
44
- </div>
45
- <div class="menu">
46
-
47
- <div class="navigation">
48
- <a
49
- href="index.html"
50
- class="link"
51
- >
52
- Documentation
53
- </a>
54
-
55
-
56
-
57
- </div>
58
- </div>
59
- </div>
60
- </div>
61
- <div id="main">
62
- <div
63
- class="sidebar "
64
- id="sidebarNav"
65
- >
66
-
67
- <nav>
68
-
69
- <h2><a href="index.html">Documentation</a></h2><div class="category"></div>
70
-
71
- </nav>
72
- </div>
73
- <div class="core" id="main-content-wrapper">
74
- <div class="content">
75
- <header class="page-title">
76
- <p></p>
77
- <h1>Home</h1>
78
- </header>
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
- <h3> </h3>
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
- </div>
108
-
109
- <footer class="footer">
110
- <div class="content has-text-centered">
111
- <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a></p>
112
- <p class="sidebar-created-by">
113
- <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
114
- <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
115
- </p>
116
- </div>
117
- </footer>
118
-
119
- </div>
120
- <div id="side-nav" class="side-nav">
121
- </div>
122
- </div>
123
- <script src="scripts/app.min.js"></script>
124
- <script>PR.prettyPrint();</script>
125
- <script src="scripts/linenumber.js"> </script>
126
-
127
-
128
- </body>
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+
6
+ <meta charset="utf-8">
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <title> Home</title>
9
+
10
+ <script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js"></script>
11
+ <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script>
12
+ <script src="./build/entry.js"></script>
13
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
14
+ <!--[if lt IE 9]>
15
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
16
+ <![endif]-->
17
+ <link href="https://fonts.googleapis.com/css?family=Roboto:100,400,700|Inconsolata,700" rel="stylesheet">
18
+ <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.6.3/css/all.css" integrity="sha384-UHRtZLI+pbxtHCWp1t77Bi1L4ZtiqrqD80Kn4Z8NTSRyMA2Fd33n5dQ8lWUE00s/" crossorigin="anonymous">
19
+ <link type="text/css" rel="stylesheet" href="https://jmblog.github.io/color-themes-for-google-code-prettify/themes/tomorrow-night.min.css">
20
+ <link type="text/css" rel="stylesheet" href="styles/app.min.css">
21
+ <link type="text/css" rel="stylesheet" href="styles/iframe.css">
22
+ <link type="text/css" rel="stylesheet" href="">
23
+ <script async defer src="https://buttons.github.io/buttons.js"></script>
24
+
25
+
26
+ </head>
27
+
28
+
29
+
30
+ <body class="layout small-header">
31
+ <div id="stickyNavbarOverlay"></div>
32
+
33
+
34
+ <div class="top-nav">
35
+ <div class="inner">
36
+ <a id="hamburger" role="button" class="navbar-burger" aria-label="menu" aria-expanded="false">
37
+ <span aria-hidden="true"></span>
38
+ <span aria-hidden="true"></span>
39
+ <span aria-hidden="true"></span>
40
+ </a>
41
+ <div class="logo">
42
+
43
+
44
+ </div>
45
+ <div class="menu">
46
+
47
+ <div class="navigation">
48
+ <a
49
+ href="index.html"
50
+ class="link"
51
+ >
52
+ Documentation
53
+ </a>
54
+
55
+
56
+
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </div>
61
+ <div id="main">
62
+ <div
63
+ class="sidebar "
64
+ id="sidebarNav"
65
+ >
66
+
67
+ <nav>
68
+
69
+ <h2><a href="index.html">Documentation</a></h2><div class="category"></div>
70
+
71
+ </nav>
72
+ </div>
73
+ <div class="core" id="main-content-wrapper">
74
+ <div class="content">
75
+ <header class="page-title">
76
+ <p></p>
77
+ <h1>Home</h1>
78
+ </header>
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+ <h3> </h3>
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ </div>
108
+
109
+ <footer class="footer">
110
+ <div class="content has-text-centered">
111
+ <p>Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.3</a></p>
112
+ <p class="sidebar-created-by">
113
+ <a href="https://github.com/SoftwareBrothers/better-docs" target="_blank">BetterDocs theme</a> provided with <i class="fas fa-heart"></i> by
114
+ <a href="http://softwarebrothers.co" target="_blank">SoftwareBrothers - JavaScript Development Agency</a>
115
+ </p>
116
+ </div>
117
+ </footer>
118
+
119
+ </div>
120
+ <div id="side-nav" class="side-nav">
121
+ </div>
122
+ </div>
123
+ <script src="scripts/app.min.js"></script>
124
+ <script>PR.prettyPrint();</script>
125
+ <script src="scripts/linenumber.js"> </script>
126
+
127
+
128
+ </body>
129
129
  </html>
@@ -1,26 +1,26 @@
1
- /*global document */
2
-
3
- (function() {
4
- var source = document.getElementsByClassName('prettyprint source linenums');
5
- var i = 0;
6
- var lineNumber = 0;
7
- var lineId;
8
- var lines;
9
- var totalLines;
10
- var anchorHash;
11
-
12
- if (source && source[0]) {
13
- anchorHash = document.location.hash.substring(1);
14
- lines = source[0].getElementsByTagName('li');
15
- totalLines = lines.length;
16
-
17
- for (; i < totalLines; i++) {
18
- lineNumber++;
19
- lineId = 'line' + lineNumber;
20
- lines[i].id = lineId;
21
- if (lineId === anchorHash) {
22
- lines[i].className += ' selected';
23
- }
24
- }
25
- }
26
- })();
1
+ /*global document */
2
+
3
+ (function() {
4
+ var source = document.getElementsByClassName('prettyprint source linenums');
5
+ var i = 0;
6
+ var lineNumber = 0;
7
+ var lineId;
8
+ var lines;
9
+ var totalLines;
10
+ var anchorHash;
11
+
12
+ if (source && source[0]) {
13
+ anchorHash = document.location.hash.substring(1);
14
+ lines = source[0].getElementsByTagName('li');
15
+ totalLines = lines.length;
16
+
17
+ for (; i < totalLines; i++) {
18
+ lineNumber++;
19
+ lineId = 'line' + lineNumber;
20
+ lines[i].id = lineId;
21
+ if (lineId === anchorHash) {
22
+ lines[i].className += ' selected';
23
+ }
24
+ }
25
+ }
26
+ })();
@@ -1,39 +1,39 @@
1
- (function() {
2
- const input = document.querySelector('#search')
3
- const targets = [ ...document.querySelectorAll('#sidebarNav li')]
4
- input.addEventListener('keyup', () => {
5
- // loop over each targets and hide the not corresponding ones
6
- targets.forEach(target => {
7
- if (!target.innerText.toLowerCase().includes(input.value.toLowerCase())) {
8
- target.style.display = 'none'
9
-
10
- /**
11
- * Detects an empty list
12
- * Remove the list and the list's title if the list is not displayed
13
- */
14
- const list = [...target.parentNode.childNodes].filter( elem => elem.style.display !== 'none')
15
-
16
- if (!list.length) {
17
- target.parentNode.style.display = 'none'
18
- target.parentNode.previousSibling.style.display = 'none'
19
- }
20
-
21
- /**
22
- * Detects empty category
23
- * Remove the entire category if no item is displayed
24
- */
25
- const category = [...target.parentNode.parentNode.childNodes]
26
- .filter( elem => elem.tagName !== 'H2' && elem.style.display !== 'none')
27
-
28
- if (!category.length) {
29
- target.parentNode.parentNode.style.display = 'none'
30
- }
31
- } else {
32
- target.parentNode.style.display = 'block'
33
- target.parentNode.previousSibling.style.display = 'block'
34
- target.parentNode.parentNode.style.display = 'block'
35
- target.style.display = 'block'
36
- }
37
- })
38
- })
1
+ (function() {
2
+ const input = document.querySelector('#search')
3
+ const targets = [ ...document.querySelectorAll('#sidebarNav li')]
4
+ input.addEventListener('keyup', () => {
5
+ // loop over each targets and hide the not corresponding ones
6
+ targets.forEach(target => {
7
+ if (!target.innerText.toLowerCase().includes(input.value.toLowerCase())) {
8
+ target.style.display = 'none'
9
+
10
+ /**
11
+ * Detects an empty list
12
+ * Remove the list and the list's title if the list is not displayed
13
+ */
14
+ const list = [...target.parentNode.childNodes].filter( elem => elem.style.display !== 'none')
15
+
16
+ if (!list.length) {
17
+ target.parentNode.style.display = 'none'
18
+ target.parentNode.previousSibling.style.display = 'none'
19
+ }
20
+
21
+ /**
22
+ * Detects empty category
23
+ * Remove the entire category if no item is displayed
24
+ */
25
+ const category = [...target.parentNode.parentNode.childNodes]
26
+ .filter( elem => elem.tagName !== 'H2' && elem.style.display !== 'none')
27
+
28
+ if (!category.length) {
29
+ target.parentNode.parentNode.style.display = 'none'
30
+ }
31
+ } else {
32
+ target.parentNode.style.display = 'block'
33
+ target.parentNode.previousSibling.style.display = 'block'
34
+ target.parentNode.parentNode.style.display = 'block'
35
+ target.style.display = 'block'
36
+ }
37
+ })
38
+ })
39
39
  })()
@@ -1,13 +1,13 @@
1
- .bd__button {
2
- padding: 10px 0;
3
- text-align: right;
4
- }
5
- .bd__button > a{
6
- font-weight: 100;
7
- text-decoration: none;
8
- color: #BDC3CB;
9
- font-family: sans-serif;
10
- }
11
- .bd__button > a:hover {
12
- color: #798897;
1
+ .bd__button {
2
+ padding: 10px 0;
3
+ text-align: right;
4
+ }
5
+ .bd__button > a{
6
+ font-weight: 100;
7
+ text-decoration: none;
8
+ color: #BDC3CB;
9
+ font-family: sans-serif;
10
+ }
11
+ .bd__button > a:hover {
12
+ color: #798897;
13
13
  }
@@ -1,111 +1,111 @@
1
- /* JSDoc prettify.js theme */
2
-
3
- /* plain text */
4
- .pln {
5
- color: #000000;
6
- font-weight: normal;
7
- font-style: normal;
8
- }
9
-
10
- /* string content */
11
- .str {
12
- color: #006400;
13
- font-weight: normal;
14
- font-style: normal;
15
- }
16
-
17
- /* a keyword */
18
- .kwd {
19
- color: #000000;
20
- font-weight: bold;
21
- font-style: normal;
22
- }
23
-
24
- /* a comment */
25
- .com {
26
- font-weight: normal;
27
- font-style: italic;
28
- }
29
-
30
- /* a type name */
31
- .typ {
32
- color: #000000;
33
- font-weight: normal;
34
- font-style: normal;
35
- }
36
-
37
- /* a literal value */
38
- .lit {
39
- color: #006400;
40
- font-weight: normal;
41
- font-style: normal;
42
- }
43
-
44
- /* punctuation */
45
- .pun {
46
- color: #000000;
47
- font-weight: bold;
48
- font-style: normal;
49
- }
50
-
51
- /* lisp open bracket */
52
- .opn {
53
- color: #000000;
54
- font-weight: bold;
55
- font-style: normal;
56
- }
57
-
58
- /* lisp close bracket */
59
- .clo {
60
- color: #000000;
61
- font-weight: bold;
62
- font-style: normal;
63
- }
64
-
65
- /* a markup tag name */
66
- .tag {
67
- color: #006400;
68
- font-weight: normal;
69
- font-style: normal;
70
- }
71
-
72
- /* a markup attribute name */
73
- .atn {
74
- color: #006400;
75
- font-weight: normal;
76
- font-style: normal;
77
- }
78
-
79
- /* a markup attribute value */
80
- .atv {
81
- color: #006400;
82
- font-weight: normal;
83
- font-style: normal;
84
- }
85
-
86
- /* a declaration */
87
- .dec {
88
- color: #000000;
89
- font-weight: bold;
90
- font-style: normal;
91
- }
92
-
93
- /* a variable name */
94
- .var {
95
- color: #000000;
96
- font-weight: normal;
97
- font-style: normal;
98
- }
99
-
100
- /* a function name */
101
- .fun {
102
- color: #000000;
103
- font-weight: bold;
104
- font-style: normal;
105
- }
106
-
107
- /* Specify class=linenums on a pre to get line numbering */
108
- ol.linenums {
109
- margin-top: 0;
110
- margin-bottom: 0;
111
- }
1
+ /* JSDoc prettify.js theme */
2
+
3
+ /* plain text */
4
+ .pln {
5
+ color: #000000;
6
+ font-weight: normal;
7
+ font-style: normal;
8
+ }
9
+
10
+ /* string content */
11
+ .str {
12
+ color: #006400;
13
+ font-weight: normal;
14
+ font-style: normal;
15
+ }
16
+
17
+ /* a keyword */
18
+ .kwd {
19
+ color: #000000;
20
+ font-weight: bold;
21
+ font-style: normal;
22
+ }
23
+
24
+ /* a comment */
25
+ .com {
26
+ font-weight: normal;
27
+ font-style: italic;
28
+ }
29
+
30
+ /* a type name */
31
+ .typ {
32
+ color: #000000;
33
+ font-weight: normal;
34
+ font-style: normal;
35
+ }
36
+
37
+ /* a literal value */
38
+ .lit {
39
+ color: #006400;
40
+ font-weight: normal;
41
+ font-style: normal;
42
+ }
43
+
44
+ /* punctuation */
45
+ .pun {
46
+ color: #000000;
47
+ font-weight: bold;
48
+ font-style: normal;
49
+ }
50
+
51
+ /* lisp open bracket */
52
+ .opn {
53
+ color: #000000;
54
+ font-weight: bold;
55
+ font-style: normal;
56
+ }
57
+
58
+ /* lisp close bracket */
59
+ .clo {
60
+ color: #000000;
61
+ font-weight: bold;
62
+ font-style: normal;
63
+ }
64
+
65
+ /* a markup tag name */
66
+ .tag {
67
+ color: #006400;
68
+ font-weight: normal;
69
+ font-style: normal;
70
+ }
71
+
72
+ /* a markup attribute name */
73
+ .atn {
74
+ color: #006400;
75
+ font-weight: normal;
76
+ font-style: normal;
77
+ }
78
+
79
+ /* a markup attribute value */
80
+ .atv {
81
+ color: #006400;
82
+ font-weight: normal;
83
+ font-style: normal;
84
+ }
85
+
86
+ /* a declaration */
87
+ .dec {
88
+ color: #000000;
89
+ font-weight: bold;
90
+ font-style: normal;
91
+ }
92
+
93
+ /* a variable name */
94
+ .var {
95
+ color: #000000;
96
+ font-weight: normal;
97
+ font-style: normal;
98
+ }
99
+
100
+ /* a function name */
101
+ .fun {
102
+ color: #000000;
103
+ font-weight: bold;
104
+ font-style: normal;
105
+ }
106
+
107
+ /* Specify class=linenums on a pre to get line numbering */
108
+ ol.linenums {
109
+ margin-top: 0;
110
+ margin-bottom: 0;
111
+ }