Skip to content
This repository was archived by the owner on Mar 4, 2023. It is now read-only.

Commit 1c77521

Browse files
authored
Merge pull request #10 from eksrvb/bugfix/unification-github-gitlab
Bugfix/unification GitHub gitlab
2 parents df2bdb8 + 2f8a1bf commit 1c77521

28 files changed

+893
-559
lines changed
Lines changed: 16 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,36 @@
11
---
2-
name: Bug report
2+
name: Bug report 🐞
33
about: Create a report to help us improve
4-
title: 'Found a Bug: '
5-
labels: 'bug'
4+
title: ''
5+
labels: bug
66
assignees: ''
7-
87
---
98

109
**Describe the bug**
11-
A clear and concise description of what the bug is.
12-
13-
**Your environment/setup**
14-
In what tool is your pipeline running?
15-
16-
- Jenkins Pipeline
17-
- GitHub Actions
18-
- GitLab CI
19-
20-
How is this tool installed
21-
22-
- Container
23-
- Bare Metal
24-
- Virtual machine
2510

26-
Are alle environment variables set? See README.md
27-
28-
- yes
29-
- no
11+
A clear and concise description of what the bug is.
3012

3113
**To Reproduce**
32-
Paste your executed command here:
3314

34-
Paste your Pipeline log (this is optional, make shure no secrets are visable):
15+
Steps to reproduce the behavior:
3516

36-
```shell
37-
# pipeline log
38-
```
17+
1. Go to '...'
18+
2. Click on '....'
19+
3. Scroll down to '....'
20+
4. See error
3921

4022
**Expected behavior**
23+
4124
A clear and concise description of what you expected to happen.
4225

4326
**Screenshots**
27+
4428
If applicable, add screenshots to help explain your problem.
4529

30+
**Desktop (please complete the following information):**
31+
* Browser [e.g. chrome, safari]
32+
* Version [e.g. 22]
33+
4634
**Additional context**
35+
4736
Add any other context about the problem here.

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 eksrvb
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 12 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -2,122 +2,33 @@
22
Please read this **before** usage!
33
This material calendar is just beginning. As in the angular material components, a beautiful calendar is to be generated by simple integration. Cooperation is welcome.
44

5-
> Warning: during the migration to github parts of the project were mixed up !!
6-
All features can be lost after an update from 2.1.2 to> 2.1.2.
7-
This will be solved in version 3.0.0, which will come as soon as I can.
8-
From version 3.0.0 onwards there will be a stable API with extensive features and its own documentation
5+
> Warning: all version before 3.0.0 are deprecated, please update to any version higher than 3.0.0!
96
107
### Working demo
118
[demo github project](https://github.com/eksrvb/material-calendar-demo)
129

13-
![material-calendar-single-month](https://github.com/eksrvb/material-calendar/raw/main/docs/material-calendar-single-month.png)
14-
![material-calendar-three-months](https://github.com/eksrvb/material-calendar/raw/main/docs/material-calendar-three-months.png)
15-
![material-calendar-two-months-with-placeholder](https://github.com/eksrvb/material-calendar/raw/main/docs/material-calendar-two-months-with-placeholder.png)
16-
17-
## Installing
18-
`npm i material-calendar`
19-
20-
## Usage
21-
app.module.ts
22-
``` typescript
23-
import { BrowserModule } from '@angular/platform-browser';
24-
import { NgModule, LOCALE_ID } from '@angular/core';
25-
26-
import { AppComponent } from './app.component';
27-
import { MaterialCalendarModule } from 'material-calendar';
28-
29-
@NgModule({
30-
declarations: [
31-
AppComponent
32-
],
33-
imports: [
34-
BrowserModule,
35-
MaterialCalendarModule
36-
],
37-
providers: [
38-
{provide: LOCALE_ID, useValue: 'de-DE' }
39-
],
40-
bootstrap: [AppComponent]
41-
})
42-
export class AppModule { }
43-
```
44-
import the `MaterialCalendarModule` and optional provide your location.
45-
In my case: `{provide: LOCALE_ID, useValue: 'de-DE' }`
46-
47-
In your html:
48-
``` html
49-
<calendar-panels></calendar-panels>
50-
```
51-
and you are good to go ;)
52-
53-
All options are shown here:
54-
55-
``` html
56-
<calendar-panels
57-
[mode]="mode"
58-
[placeholderDay]="placeholder"
59-
year="2020"
60-
month="3"
61-
monthsBefore="1"
62-
monthsAfter="1"
63-
[config]="calendarConfig"
64-
(clickDate)="yourMethod($event)">
65-
</calendar-panels>
66-
<!--
67-
default mode = monthly
68-
default placeholderDay = false
69-
default year = current year
70-
default month = current month
71-
default monthsBefore = 1
72-
default monthsAfter = 1
73-
-->
74-
```
75-
``` typescript
76-
import { CalendarConfig } from 'material-calendar';
77-
78-
placeholder = false // boolean ...can be hardcoded in html
79-
mode = 'monthly' // 'annual' | 'monthly' ...can be hardcoded in html
80-
81-
calendarConfig: CalendarConfig = {
82-
panelBgColor: '#00677f', // use only hex or rbg colors
83-
autoTextColor: true,
84-
textColor: '#fff', // use only hex or rbg colors
85-
displayYear: true,
86-
firstDayOfWeekMonday: true,
87-
todayColor: '#fff',
88-
panelWidth: '100%', // can also be fix values such as 350px
89-
calendarWeek: true,
90-
switches: false,
91-
}
92-
```
93-
``` javascript
94-
/**
95-
* @param {boolean} autoTextColor Sets the text color automatically, based on the backgroud colors
96-
* @param {boolean} calendarWeek display the calendar week
97-
* @param {boolean} displayYear displays the year next to the Month name
98-
* @param {boolean} switches display switches in calendar component or not
99-
* @param {string} panelBgColor sets the background color of the panel
100-
* @param {string} textColor if autoTextColor false this must be set to a custom color
101-
*
102-
*/
103-
```
104-
105-
## Planned features
10+
If you want to give me feedback and don't want to open an issue on github, please fill out the [form](https://forms.gle/W9TygXf65Yru3VHi7)
10611

107-
- insert your own calendar data and render the new template
108-
- multiselect days optional (returns the daily span)
12+
### Documentation
13+
14+
[See the manual](https://eksrvb.github.io/material-calendar/) for setup, usage instructions and a lot more. (the documentation is still rising)
10915

110-
and many more...
11116

11217
## Features
11318

11419
- generate a nice calendar in material design
11520
- get a date back with the annotation "clickDate" (see example)
21+
- insert your own calendar data and render the new template
22+
- multiselect days optional (returns the daily span)
23+
more in the docs... ;)
24+
25+
## Getting help
26+
27+
If you have questions, concerns, bug reports, etc, please file an issue in this repository's Issue Tracker.
11628

11729
## Code scaffolding
11830

11931
For code scaffolding, the project can be checked out from the public repository and pull requests can be made.
120-
12132

12233
## Build
12334

docs/_config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
remote_theme: pmarsceill/just-the-docs

docs/api.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
layout: default
3+
title: API
4+
nav_order: 2
5+
---
6+
7+
# Configuration
8+
9+
{: .no_toc }
10+
11+
<details open markdown="block">
12+
<summary>
13+
14+
Table of contents
15+
16+
</summary>
17+
{: .text-delta }
18+
1. TOC
19+
{:toc}
20+
</details>
21+
22+
You can operate the material calendar in two different modes.
23+
24+
The first and most common is the [monthly](https://eksrvb.github.io/material-calendar/configuration/monthly) Mode. The second is an [annual](https://eksrvb.github.io/material-calendar/configuration/annual) mode that shows every 12 months of the year.
25+
26+
In addition to this modes, there is also a basic configuration, as shown below.
27+
28+
## API reference for material-calendar
29+
30+
import the `MaterialCalendarModule` and optional provide your location.<br>
31+
In my case: `{provide: LOCALE_ID, useValue: 'de-DE' }`
32+
33+
File: app.module.ts
34+
35+
```typescript
36+
import { MaterialCalendarModule } from 'material-calendar'; // <-- add this line
37+
```
38+
39+
Optionally provide your location:
40+
```typescript
41+
[...]
42+
providers: [
43+
{provide: LOCALE_ID, useValue: 'de-DE' } // <-- add this line (depending on your location)
44+
],
45+
[...]
46+
```
47+
48+
## selectors
49+
50+
### calendar-panel
51+
52+
| Name | Default | Description |
53+
| ---- | ------- | ----------- |
54+
| placeholderDay: boolean | false | show a day that does not occur directly in the month and serves as a visual placeholder |
55+
| dataSource: DayC[] | null | transfer own days to equip the existing days in the component with data |
56+
| year: number | current year | select the start year |
57+
| month: number | current month | select the start month |
58+
| monthsBefore: number | 0 | how many months should be displayed before the selected month |
59+
| monthsAfter: number | 0 | how many months should be displayed after the selected month |
60+
| config: CalendarConfig | null | overwrite configuration for the component |
61+
| (clickDate) | - | returns an event with selected days depending on the selected mode (single click or range of days) |
62+
63+
## interfaces
64+
65+
### CalendarConfig
66+
67+
| Name | Default | Description |
68+
| ---- | ------- | ----------- |
69+
| {string} renderMode | monthly | choose render mode ('annual' or 'monthly') |
70+
| {string} selectMode | click | choose select mode ('click' or 'range') |
71+
| {boolean} calendarWeek | false | display the calendar week |
72+
| {boolean} displayYear | true | displays the year next to the Month name |
73+
| {boolean} switches | true | show arrows to navigate an month forward or backwards |
74+
| {boolean} bluredDays | false | make an circle around the number of the day |
75+
| {boolean} markWeekend | true | highlight weekends |
76+
| {boolean} firstDayOfWeekMonday | true | set first day of week (monday or sunday) |
77+
| {string} panelWidth | 350px | set a with for an single panel |
78+
79+
### DayC
80+
81+
| Name | Default | Description |
82+
| ---- | ------- | ----------- |
83+
| {Date} date | null | Date to match |
84+
| {string} color | null | set a custom color (hex, string, or var) |
85+
| {string} backgroundColor | null | set a custom Background Color (hex, string, or var) |
86+
| {string} badgeMode | null | badgeMode options: 'Int' or 'Icon' |
87+
| {number} badgeInt | null | if badgeMode == 'Int', set our Number here |
88+
| {string} badgeIcon | null | if badgeMode == 'Icon', set Icon (Matireal-Icons) |
89+
| {string} toolTip | null | if set, this displays a mat-tooltip |

0 commit comments

Comments
 (0)