Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump node-sass from 4.12.0 to 7.0.0 #7

Open
wants to merge 64 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
64 commits
Select commit Hold shift + click to select a range
80fb9ad
Update data for examples to reflect allDay
binh1298 Mar 3, 2021
87bc385
Implement customizable footer
binh1298 Mar 3, 2021
c2947ac
Implement new examples
binh1298 Mar 3, 2021
091691e
Apply suggestions from code review
binh1298 Mar 3, 2021
4dcf253
Remove not all label
binh1298 Mar 3, 2021
43f3ed1
Remove Children.only
binh1298 Mar 3, 2021
749ebfc
Merge pull request #1 from manabie-com/feature/ERP-130/make-header-fo…
binh1298 Mar 3, 2021
22e56dc
Push lib
binh1298 Mar 3, 2021
753fb7e
Merge branch 'master' of https://github.com/manabie-com/react-big-cal…
binh1298 Mar 3, 2021
1ed412f
Configure typings
binh1298 Mar 3, 2021
4ddcc4e
Add typings for header and footer
binh1298 Mar 4, 2021
1f62578
Add reactelement child to event wrapper for customization
binh1298 Mar 4, 2021
e934952
Add reactelement child to event wrapper for customization
binh1298 Mar 4, 2021
3713f8f
Merge branch 'master' of https://github.com/manabie-com/react-big-cal…
binh1298 Mar 4, 2021
11afa02
Upgrade calendar to new version
binh1298 Mar 4, 2021
c86dc9e
Remove padding from date cells
binh1298 Mar 8, 2021
967cb76
Adjust minimum events per row
binh1298 Mar 8, 2021
db71b9e
Update row limit to fixed size
binh1298 Mar 8, 2021
602542c
Update row limit to fixed size: 5
binh1298 Mar 8, 2021
6b7d0dd
Make show more button customizable
binh1298 Mar 9, 2021
30a1ed9
Update build for showMoreButton
binh1298 Mar 9, 2021
9ebbeb0
Add events count for showMore to better customize it
binh1298 Mar 9, 2021
c8ec3bd
Build: Add extra events count prop for showMore
binh1298 Mar 9, 2021
8884a59
Add typings for header
binh1298 Mar 10, 2021
2e38eff
Add events list as props to showMoreButton
binh1298 Mar 11, 2021
bffd6ee
Build: Add events list as props to show more button
binh1298 Mar 11, 2021
ed20348
Fix typings for events
binh1298 Mar 11, 2021
12c1cd9
Remove events as props from show more button
binh1298 Mar 11, 2021
d8e21f0
Revert "Remove events as props from show more button"
binh1298 Mar 11, 2021
70e669f
Revert "Fix typings for events"
binh1298 Mar 11, 2021
036937f
Revert "Build: Add events list as props to show more button"
binh1298 Mar 11, 2021
3d5b3d2
Revert "Add events list as props to showMoreButton"
binh1298 Mar 11, 2021
c016351
feature: pass in daily events as props for popups
binh1298 Mar 12, 2021
4738bb2
build: pass in daily events as props for popups
binh1298 Mar 12, 2021
fa1ea35
feature: Implement children as an optional
binh1298 Mar 12, 2021
3f31ce5
build: implement children as event cells for show more buttons
binh1298 Mar 12, 2021
688f02d
feature: add date of the selected day to show more button
binh1298 Mar 12, 2021
d20a6bc
build: add date to selected day to show more button
binh1298 Mar 12, 2021
31a7c28
fix: typings
binh1298 Mar 12, 2021
785299d
feature: add daily status to calendar
binh1298 Mar 19, 2021
70f0ad8
build: add daily status to calendar
binh1298 Mar 19, 2021
6a00179
feature: Add typings for dailyStatus
binh1298 Mar 19, 2021
b42586d
feature: export functions for first and last visible day
binh1298 Mar 23, 2021
ed2a33b
build: export functions for first and last visible day
binh1298 Mar 23, 2021
99b5b6b
fix: map daily status with monthdate appropriately
binh1298 Mar 24, 2021
55dda13
build: map daily status with monthdate appropriately
binh1298 Mar 24, 2021
f37917b
fix: fix date comparison
binh1298 Mar 24, 2021
f67a5b5
build: fix date comparison
binh1298 Mar 24, 2021
c874feb
build: fix date comparison
binh1298 Mar 24, 2021
5d6cfc2
fix: fix date comparison to same day only
binh1298 Mar 24, 2021
76affb9
build: fix date comparison to same day only
binh1298 Mar 24, 2021
45435df
feature: implement utilities for components
binh1298 Mar 26, 2021
26bfef3
build: implement utilities for components
binh1298 Mar 26, 2021
1fbd33b
fix: typings for calendar
binh1298 Mar 26, 2021
584db50
chore: make utitlities optional
binh1298 Mar 26, 2021
8c58599
chore: add missing typings
binh1298 Mar 26, 2021
4e75110
feature: implement utilities for toolbar
binh1298 Mar 29, 2021
0a6e1d6
build: implement utilities for toolbar
binh1298 Mar 29, 2021
4aea7ab
fix: fix generic
binh1298 Mar 29, 2021
d6b797c
fix: fix undefined dailystatus
binh1298 Mar 30, 2021
b4906b1
build: fix undefined dailystatus
binh1298 Mar 30, 2021
c79a9bc
Update package.json
phi0411141 May 30, 2021
d61cb7f
Merge pull request #5 from phi0411141/patch-1
binh1298 May 30, 2021
ddedda1
chore(deps-dev): bump node-sass from 4.12.0 to 7.0.0
dependabot[bot] Feb 11, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
lib/
# lib/
dist/

# Logs
Expand Down
24 changes: 12 additions & 12 deletions .size-snapshot.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
{
"./dist/react-big-calendar.js": {
"bundled": 509547,
"minified": 149932,
"gzipped": 45769
"bundled": 502184,
"minified": 158082,
"gzipped": 48281
},
"./dist/react-big-calendar.min.js": {
"bundled": 446246,
"minified": 130919,
"gzipped": 41339
"bundled": 428865,
"minified": 134247,
"gzipped": 42252
},
"dist/react-big-calendar.esm.js": {
"bundled": 176376,
"minified": 84316,
"gzipped": 21023,
"bundled": 189487,
"minified": 90040,
"gzipped": 22252,
"treeshaked": {
"rollup": {
"code": 60196,
"import_statements": 1590
"code": 64404,
"import_statements": 1614
},
"webpack": {
"code": 64714
"code": 69012
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const EXAMPLES = {
dndOutsideSource: 'Addon: Drag and drop (from outside calendar)',
}

const DEFAULT_EXAMPLE = 'basic'
const DEFAULT_EXAMPLE = 'rendering'

class Example extends React.Component {
constructor(...args) {
Expand Down
22 changes: 22 additions & 0 deletions examples/dailyStatuses.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
function getRandomInt(arrayLength) {
return Math.floor(Math.random() * Math.floor(arrayLength - 1))
}

const openingTimes = ['Regular', 'Non-Regular', 'Spare', 'Closed']
const repeatCondition = ['Doesnt Repeat', 'Weekly Until', 'Daily Until']

var times = 3
let dailyStatuses = []

for (var i = 0; i < times; i++) {
const newOpeningTimes = {
id: i,
openingStatus: openingTimes[getRandomInt(openingTimes.length)],
repeatCondition: repeatCondition[getRandomInt(repeatCondition.length)],
start: new Date(2015, 3, i),
end: new Date(2015, 3, i),
}
dailyStatuses.push(newOpeningTimes)
}

export default dailyStatuses
101 changes: 81 additions & 20 deletions examples/demos/rendering.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,17 @@
import React from 'react'
import { Calendar, Views } from 'react-big-calendar'
import React, { Children, useEffect, useState } from 'react'
import { Calendar, Views, firstVisibleDay } from 'react-big-calendar'
import events from '../events'
import dailyStatuses from '../dailyStatuses'

function Event({ event }) {
const utilities = {
onSaved: text => {
console.log(text)
},
}
function Event({ event, utilities }) {
utilities && utilities.onSaved(`Utilities for Event ${event.title}`)
return (
<span>
<span style={{ color: 'black' }}>
<strong>{event.title}</strong>
{event.desc && ': ' + event.desc}
</span>
Expand Down Expand Up @@ -39,21 +46,75 @@ const customSlotPropGetter = date => {
else return {}
}

let Rendering = ({ localizer }) => (
<Calendar
events={events}
localizer={localizer}
defaultDate={new Date(2015, 3, 1)}
defaultView={Views.AGENDA}
dayPropGetter={customDayPropGetter}
slotPropGetter={customSlotPropGetter}
components={{
event: Event,
agenda: {
event: EventAgenda,
},
}}
/>
)
const ColoredEventWrapper = ({ children, event }) => {
return React.cloneElement(children, {
style: {
...children.style,
backgroundColor: event.allDay ? 'lightBlue' : 'transparent',
padding: 0,
},
})
}
const CalendarHeader = ({ label, dailyStatus, utilities }) => {
utilities && utilities.onSaved('Utilities for Header')
const openingStatus = dailyStatus ? dailyStatus.openingStatus : 'hehe'
return (
<div>
<p>
{label} - {openingStatus}
</p>
</div>
)
}
const CalendarFooter = ({ label, utilities }) => {
utilities && utilities.onSaved('Utilities for Footer')
return (
<div style={{ textAlign: 'center' }}>
<button>Add Event</button>
</div>
)
}
const ShowMoreButton = ({ label, events, children, date }) => {
return <button onClick={() => console.log('lmao', date)}>{label}</button>
}

const ToolBar = ({ utilities }) => {
utilities && utilities.onSaved('Utilities for Toolbar')
return <h1>Toolbar</h1>
}
let Rendering = ({ localizer }) => {
const [localEvents, setEvents] = useState([])
console.log(firstVisibleDay(new Date(), localizer))
useEffect(() => {
const allDayEvents = events.filter(event => event.allDay)
const notAllDayEvents = events.filter(event => !event.allDay)
setEvents([...allDayEvents, ...notAllDayEvents])
}, [])
return (
<Calendar
events={localEvents}
dailyStatuses={dailyStatuses}
localizer={localizer}
defaultDate={new Date(2015, 3, 1)}
defaultView={Views.MONTH}
utilities={utilities}
// dayPropGetter={customDayPropGetter}
// slotPropGetter={customSlotPropGetter}
popup
components={{
event: Event,
eventWrapper: ColoredEventWrapper,
month: {
toolbar: ToolBar,
dateHeader: CalendarHeader,
dateFooter: CalendarFooter,
showMoreButton: ShowMoreButton,
},
// agenda: {
// event: EventAgenda,
// },
}}
/>
)
}
export default Rendering
14 changes: 9 additions & 5 deletions examples/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,22 @@ export default [
{
id: 5,
title: 'Conference',
start: new Date(2015, 3, 11),
end: new Date(2015, 3, 13),
start: new Date(2015, 3, 12, 10, 30, 0, 0),
end: new Date(2015, 3, 12, 12, 30, 0, 0),
desc: 'Big conference for important people',
},
{
id: 6,
title: 'Meeting',
start: new Date(2015, 3, 12, 10, 30, 0, 0),
end: new Date(2015, 3, 12, 12, 30, 0, 0),
allDay: true,
start: new Date(2015, 3, 11),
end: new Date(2015, 3, 13),
desc: 'Pre-meeting meeting, to prepare for the meeting',
},
{
id: 7,
title: 'Lunch',
allDay: true,
start: new Date(2015, 3, 12, 12, 0, 0, 0),
end: new Date(2015, 3, 12, 13, 0, 0, 0),
desc: 'Power lunch',
Expand All @@ -77,12 +79,14 @@ export default [
},
{
id: 11,
allDay: true,
title: 'Planning Meeting with Paige',
start: new Date(2015, 3, 13, 8, 0, 0),
end: new Date(2015, 3, 13, 10, 30, 0),
end: new Date(2015, 3, 16, 10, 30, 0),
},
{
id: 11.1,
allDay: true,
title: 'Inconvenient Conference Call',
start: new Date(2015, 3, 13, 9, 30, 0),
end: new Date(2015, 3, 13, 12, 0, 0),
Expand Down
Loading