Skip to content

Commit

Permalink
build mock version and update coverages
Browse files Browse the repository at this point in the history
  • Loading branch information
Katsuhiko Maeno committed Jun 10, 2024
1 parent 5538bea commit c777aed
Show file tree
Hide file tree
Showing 88 changed files with 2,877 additions and 3,045 deletions.
3 changes: 3 additions & 0 deletions docs/assets/css/custom-style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.sunorhc-timeline-sidebar span[data-sidebar-item-type="avatar"] img {
border-radius: 4px;
}
296 changes: 296 additions & 0 deletions docs/assets/css/ress.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
/* resset.dev • v5.0.2 */

/* # =================================================================
# Global selectors
# ================================================================= */

html {
box-sizing: border-box;
-webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS */
word-break: normal;
-moz-tab-size: 4;
tab-size: 4;
}

*,
::before,
::after {
background-repeat: no-repeat; /* Set `background-repeat: no-repeat` to all elements and pseudo elements */
box-sizing: inherit;
}

::before,
::after {
text-decoration: inherit; /* Inherit text-decoration and vertical align to ::before and ::after pseudo elements */
vertical-align: inherit;
}

* {
padding: 0; /* Reset `padding` and `margin` of all elements */
margin: 0;
}

/* # =================================================================
# General elements
# ================================================================= */

hr {
overflow: visible; /* Show the overflow in Edge and IE */
height: 0; /* Add the correct box sizing in Firefox */
color: inherit; /* Correct border color in Firefox. */
}

details,
main {
display: block; /* Render the `main` element consistently in IE. */
}

summary {
display: list-item; /* Add the correct display in all browsers */
}

small {
font-size: 80%; /* Set font-size to 80% in `small` elements */
}

[hidden] {
display: none; /* Add the correct display in IE */
}

abbr[title] {
border-bottom: none; /* Remove the bottom border in Chrome 57 */
/* Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari */
text-decoration: underline;
text-decoration: underline dotted;
}

a {
background-color: transparent; /* Remove the gray background on active links in IE 10 */
}

a:active,
a:hover {
outline-width: 0; /* Remove the outline when hovering in all browsers */
}

code,
kbd,
pre,
samp {
font-family: monospace, monospace; /* Specify the font family of code elements */
}

pre {
font-size: 1em; /* Correct the odd `em` font sizing in all browsers */
}

b,
strong {
font-weight: bolder; /* Add the correct font weight in Chrome, Edge, and Safari */
}

/* https://gist.github.com/unruthless/413930 */
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}

sub {
bottom: -0.25em;
}

sup {
top: -0.5em;
}

table {
border-color: inherit; /* Correct border color in all Chrome, Edge, and Safari. */
text-indent: 0; /* Remove text indentation in Chrome, Edge, and Safari */
}

iframe {
border-style: none;
}

/* # =================================================================
# Forms
# ================================================================= */

input {
border-radius: 0;
}

[type='number']::-webkit-inner-spin-button,
[type='number']::-webkit-outer-spin-button {
height: auto; /* Correct the cursor style of increment and decrement buttons in Chrome */
}

[type='search'] {
-webkit-appearance: textfield; /* Correct the odd appearance in Chrome and Safari */
outline-offset: -2px; /* Correct the outline style in Safari */
}

[type='search']::-webkit-search-decoration {
-webkit-appearance: none; /* Remove the inner padding in Chrome and Safari on macOS */
}

textarea {
overflow: auto; /* Internet Explorer 11+ */
resize: vertical; /* Specify textarea resizability */
}

button,
input,
optgroup,
select,
textarea {
font: inherit; /* Specify font inheritance of form elements */
}

optgroup {
font-weight: bold; /* Restore the font weight unset by the previous rule */
}

button {
overflow: visible; /* Address `overflow` set to `hidden` in IE 8/9/10/11 */
}

button,
select {
text-transform: none; /* Firefox 40+, Internet Explorer 11- */
}

/* Apply cursor pointer to button elements */
button,
[type='button'],
[type='reset'],
[type='submit'],
[role='button'] {
cursor: pointer;
}

/* Remove inner padding and border in Firefox 4+ */
button::-moz-focus-inner,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
border-style: none;
padding: 0;
}

/* Replace focus style removed in the border reset above */
button:-moz-focusring,
[type='button']::-moz-focus-inner,
[type='reset']::-moz-focus-inner,
[type='submit']::-moz-focus-inner {
outline: 1px dotted ButtonText;
}

button,
html [type='button'], /* Prevent a WebKit bug where (2) destroys native `audio` and `video`controls in Android 4 */
[type='reset'],
[type='submit'] {
-webkit-appearance: button; /* Correct the inability to style clickable types in iOS */
}

/* Remove the default button styling in all browsers */
button,
input,
select,
textarea {
background-color: transparent;
border-style: none;
}

a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
outline-width: 0;
}

/* Style select like a standard input */
select {
-moz-appearance: none; /* Firefox 36+ */
-webkit-appearance: none; /* Chrome 41+ */
}

select::-ms-expand {
display: none; /* Internet Explorer 11+ */
}

select::-ms-value {
color: currentColor; /* Internet Explorer 11+ */
}

legend {
border: 0; /* Correct `color` not being inherited in IE 8/9/10/11 */
color: inherit; /* Correct the color inheritance from `fieldset` elements in IE */
display: table; /* Correct the text wrapping in Edge and IE */
max-width: 100%; /* Correct the text wrapping in Edge and IE */
white-space: normal; /* Correct the text wrapping in Edge and IE */
max-width: 100%; /* Correct the text wrapping in Edge 18- and IE */
}

::-webkit-file-upload-button {
/* Correct the inability to style clickable types in iOS and Safari */
-webkit-appearance: button;
color: inherit;
font: inherit; /* Change font properties to `inherit` in Chrome and Safari */
}

/* Replace pointer cursor in disabled elements */
[disabled] {
cursor: default;
}

/* # =================================================================
# Specify media element style
# ================================================================= */

img {
border-style: none; /* Remove border when inside `a` element in IE 8/9/10 */
}

/* Add the correct vertical alignment in Chrome, Firefox, and Opera */
progress {
vertical-align: baseline;
}

/* # =================================================================
# Accessibility
# ================================================================= */

/* Specify the progress cursor of updating elements */
[aria-busy='true'] {
cursor: progress;
}

/* Specify the pointer cursor of trigger elements */
[aria-controls] {
cursor: pointer;
}

/* Specify the unstyled cursor of disabled, not-editable, or otherwise inoperable elements */
[aria-disabled='true'] {
cursor: default;
}

/* Custom Styles */

.text-lightgray {
color: #CCCCCC;
}

.text-gray {
color: #999999;
}

.text-darkgray {
color: #666666;
}

1 change: 1 addition & 0 deletions docs/assets/css/sunorhc.timeline.min.css

Large diffs are not rendered by default.

Binary file added docs/assets/fonts/mplus-1p-regular.eot
Binary file not shown.
Binary file added docs/assets/fonts/mplus-1p-regular.ttf
Binary file not shown.
Binary file added docs/assets/fonts/mplus-1p-regular.woff
Binary file not shown.
Binary file added docs/assets/images/avatar_01.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_02.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_03.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_04.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_05.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_06.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_07.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_08.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/avatar_09.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/sample_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/sample_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/sample_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/sample_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/sample_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/assets/images/sample_6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions docs/assets/js/sunorhc.timeline.min.js

Large diffs are not rendered by default.

43 changes: 43 additions & 0 deletions docs/assets/jsons/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"type": "bar",
"start": "2024-04-28",
"sidebar": {
"placement": "left",
"items": [
{ "type": "avatar", "label": "Lorem Ipsum", "src": "/avatar_example.png", "action": "./", "onClick": true, "textOverflow": false, "textPosition": "center", "textColor": "cyan" },
{ "type": "text", "label": "Sie können mit \"textOverflow\" umgehen, wenn die Beschriftung von Langtext überlaufen könnte.", "textOverflow": true, "textColor": "violet" },
{ "type": "text", "label": "Vollständiger Text wird angezeigt, wenn \"textOverflow\" falsch ist.", "textOverflow": false, "textPosition": "bottom right", "textColor": "teal", "textStyles": "font-size: 9.5pt; line-height: 1.4;" }
]
},
"ruler": {
"placement": "both",
"filters": {
"decorations": {
"year": { "prefix": "n. Chr. " },
"week": { "suffix": "." }
},
"monthFormat": "name",
"monthNames": [ "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember" ],
"dayNames": [ "Sonntag", "Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag" ],
"abbreviateMonthNameLength": 3,
"abbreviateDayNameLength": 2,
"fullStop": true,
"dayBackgroundColor": true
},
"top": { "rows": [ "year", "month", "day", "weekday" ] },
"bottom": { "rows": [ "day", "week" ] }
},
"layout": {
"elevation": 1,
"outlined": "inside",
"outlineCorner": "rounded",
"outlineStyle": "dotted",
"hideScrollbar": true,
"eventsBackground": "grid",
"width": "auto",
"height": "auto"
},
"theme": {
"hookChangeModeClass": "darkmode--activated"
}
}
22 changes: 22 additions & 0 deletions docs/assets/jsons/events.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[
{ "eventId": "1", "end": "2024/5/26", "_": "Events with only end datetime are invalid." },
{ "invalid": true, "_": "Events that do not have properties defined in the interface are invalid." },
{ "eventId": "1", "start": "May 28, 2024", "_": "An event is valid if it has at least a start datetime." },
{ "start": "2023-17-39", "_": "Events with invalid start datestimes are invalid." },
{ "eventId": "1", "start": "2024/5/27", "end": "invalid-date", "_": "Even if the end datetime are invalid, it is still a valid event if it has a start datetime." },
{ "start": "2024-5-30", "end": "2024-6-9", "row": 2, "size": "md", "_": "Is set correct row only." },
{ "start": "2024-5-21", "end": "2024-5-24", "row": 3, "group": "invalid", "_": "Is set correct row and invalid group." },
{ "start": "2024-5-30 12:00", "end": "2024-6-1 6:00", "row": 0, "label": "Is set 0 row.", "size": "xs" },
{ "start": "2024-6-2 8:47:21", "end": "2024-6-3 19:13:12", "row": 0, "group": "invalid", "label": "Is set 0 row and invalid group.", "content": "Text...", "size": "sm" },
{ "start": "2024-05-17", "end": "2024-05-27", "row": 10, "group": "invalid", "label": "Is set row of over number and invalid group.", "content": "Text...", "textColor": "teal" },
{ "start": "2024-05-22", "end": "2024-05-26", "row": 10, "group": "H.X.", "label": "Is set row of over number and correct group.", "content": "Text...", "textColor": "#66CCFF", "backgroundColor": "orange" },
{ "start": "2024-5-1", "end": "2024-5-17", "row": 2, "group": "N.O.", "label": "Event started out of range", "content": "Text...", "textColor": "red" },
{ "start": "2024-6-8", "end": "2024-7-31", "row": 3, "group": "N.O.", "label": "Event ended out of range", "content": "Text...", "textColor": "#33FF66", "backgroundColor": "pink" },
{ "start": "2024/3/1", "end": "2024/3/31 23:59:59.999", "row": 4, "group": "R.H.", "label": "Entire event is out of range (before)", "content": "Text...", "textColor": "rgba(255,255,255)", "backgroundColor": "#33f", "borderColor": "gray" },
{ "start": "2024/8/1", "end": "2024/8/14", "row": 4, "group": "R.H.", "label": "Entire event is out of range (after)", "content": "Text...", "textColor": "rgba(255,255,255)", "backgroundColor": "#33f", "borderColor": "gray" },
{ "start": "2024/3/1", "end": "2024/8/1", "row": 5, "group": "C.T.", "label": "Both edges of event is out of range", "content": "Text...", "textColor": "rgba(255,255,255)", "backgroundColor": "#33f", "borderColor": "gray" },
{ "start": "2024/5/30", "end": "2024/6/3", "group": "E.L.", "label": "Is set correct group only", "content": "Text...", "textColor": "white", "backgroundColor": "#3f3", "borderColor": "red", "size": "xl" },
{ "start": "2024/6/2", "row": 2, "label": "Is set correct start only", "content": "Text...", "textColor": "rgba(255,255,255)", "backgroundColor": "#33f", "borderColor": "gray", "size": "lg" },
{ "start": "2023/12/2", "end": "2023-12-31", "row": 1, "label": "test", "content": "Text...", "textColor": "rgba(255,255,255)", "backgroundColor": "#33f", "borderColor": "gray", "size": "lg" }

]
13 changes: 13 additions & 0 deletions docs/assets/jsons/testDay.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{ "start": "2024-06-01 12:00", "end": "2024-06-2 6:00", "row": 1, "label": "test1 <b style=\"color:#4ade80;\">Ok!</b>", "backgroundColor": "#dcfce7", "borderColor": "#22c55e", "size": "xl" },
{ "start": "2024-06-2", "end": "2024-06-2 23:59", "row": 2, "label": "test2", "size": "sm" },
{ "start": "2024/6/6 00:00", "end": "2024/6/7 0:00", "row": 3, "label": "test3 <b style=\"color:#4ade80;\">Ok!</b>", "backgroundColor": "#dcfce7", "borderColor": "#22c55e" },
{ "start": "May 30, 2024", "end": "June 1, 2024", "row": 3, "label": "test4" },
{ "start": "2024-06-06 10:23", "end": "2024-06-10 5:55", "row": 2, "label": "test5" },
{ "start": "2024-06-08 12:00:00.999", "end": "2024-06-12 23:59:59.999", "row": 5, "label": "test6" },
{ "start": "2024-06-01 00:00", "end": "2024-07-01 0:00", "row": 4, "label": "test7" },
{ "start": "2024-05-01 00:00", "end": "2024-08-01 0:00", "row": 6, "label": "test8" },
{ "start": "2024-05-01 00:00", "end": "2024-06-01 13:00", "row": 5, "label": "test9" },
{ "start": "2024-06-03 20:11", "row": 3, "label": "test10", "backgroundColor": "#fecdd3", "borderColor": "#f43f5e", "borderWidth": 2, "size": "xs" },
{ "start": "2024-06-05", "row": 1, "label": "test11", "backgroundColor": "#fecdd3", "borderColor": "#f43f5e", "borderWidth": 2, "size": "sm" }
]
13 changes: 13 additions & 0 deletions docs/assets/jsons/testHour.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[
{ "start": "2024-06-08 4:30", "end": "2024-06-8 5:15", "row": 1, "label": "test1 <b style=\"color:#4ade80;\">Ok!</b>", "backgroundColor": "#dcfce7", "borderColor": "#22c55e", "size": "xl" },
{ "start": "2024-06-03", "end": "2024-06-4", "row": 2, "label": "test2", "size": "sm" },
{ "start": "2024/6/3 22:57", "end": "2024/6/3 23:57", "row": 3, "label": "test3 <b style=\"color:#4ade80;\">Ok!</b>", "backgroundColor": "#dcfce7", "borderColor": "#22c55e" },
{ "start": "19:38 June 3, 2024", "end": "21:10 June 3, 2024", "row": 5, "label": "test4" },
{ "start": "2024-06-03 21:23", "end": "2024-06-04 5:55", "row": 1, "label": "test5" },
{ "start": "2024-06-08 12:00:00.999", "end": "2024-06-12 23:59:59.999", "row": 5, "label": "test6" },
{ "start": "2024-06-03 00:00 am", "end": "2024-06-03 5:00 pm", "row": 4, "label": "test7" },
{ "start": "2024-05-01 00:00", "end": "2024-08-01 0:00", "row": 6, "label": "test8" },
{ "start": "2024-06-04 04:30 am", "end": "2024-06-04 1:00 pm", "row": 4, "label": "test9" },
{ "start": "2024-06-03 20:11", "row": 3, "label": "test10", "backgroundColor": "#fecdd3", "borderColor": "#f43f5e", "borderWidth": 2, "size": "xs" },
{ "start": "2024-06-05", "row": 1, "label": "test11", "backgroundColor": "#fecdd3", "borderColor": "#f43f5e", "borderWidth": 2, "size": "sm" }
]
Loading

0 comments on commit c777aed

Please sign in to comment.