Skip to content

Commit

Permalink
core lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
arshaw committed Nov 10, 2020
1 parent c265b7e commit 8acef2f
Show file tree
Hide file tree
Showing 71 changed files with 865 additions and 884 deletions.
24 changes: 3 additions & 21 deletions packages/core/src/Calendar.tsx
@@ -1,12 +1,10 @@
import {
CalendarOptions, Action, CalendarContent, render, createElement, DelayedRunner, CssDimValue, applyStyleProp,
CalendarApi, CalendarRoot, isArraysEqual, CalendarDataManager, CalendarData,
CustomContentRenderContext, flushToDom, unmountComponentAtNode
CustomContentRenderContext, flushToDom, unmountComponentAtNode,
} from '@fullcalendar/common'


export class Calendar extends CalendarApi {

currentData: CalendarData
renderRunner: DelayedRunner
el: HTMLElement
Expand All @@ -17,7 +15,6 @@ export class Calendar extends CalendarApi {

get view() { return this.currentData.viewApi } // for public API


constructor(el: HTMLElement, optionOverrides: CalendarOptions = {}) {
super()

Expand All @@ -28,11 +25,10 @@ export class Calendar extends CalendarApi {
optionOverrides,
calendarApi: this,
onAction: this.handleAction,
onData: this.handleData
onData: this.handleData,
})
}


handleAction = (action: Action) => {
// actions we know we want to render immediately
switch (action.type) {
Expand All @@ -42,15 +38,12 @@ export class Calendar extends CalendarApi {
}
}


handleData = (data: CalendarData) => {
this.currentData = data
this.renderRunner.request(data.calendarOptions.rerenderDelay)
}


handleRenderRequest = () => {

if (this.isRendering) {
this.isRendered = true
let { currentData } = this
Expand All @@ -72,9 +65,8 @@ export class Calendar extends CalendarApi {
)
}}
</CalendarRoot>,
this.el
this.el,
)

} else if (this.isRendered) {
this.isRendered = false
unmountComponentAtNode(this.el)
Expand All @@ -85,7 +77,6 @@ export class Calendar extends CalendarApi {
flushToDom()
}


render() {
let wasRendering = this.isRendering

Expand All @@ -102,43 +93,36 @@ export class Calendar extends CalendarApi {
}
}


destroy() {
if (this.isRendering) {
this.isRendering = false
this.renderRunner.request()
}
}


updateSize() {
super.updateSize()
flushToDom()
}


batchRendering(func) {
this.renderRunner.pause('batchRendering')
func()
this.renderRunner.resume('batchRendering')
}


pauseRendering() { // available to plugins
this.renderRunner.pause('pauseRendering')
}


resumeRendering() { // available to plugins
this.renderRunner.resume('pauseRendering', true)
}


resetOptions(optionOverrides, append?) {
this.currentDataManager.resetOptions(optionOverrides, append)
}


setClassNames(classNames: string[]) {
if (!isArraysEqual(classNames, this.currentClassNames)) {
let { classList } = this.el
Expand All @@ -155,9 +139,7 @@ export class Calendar extends CalendarApi {
}
}


setHeight(height: CssDimValue) {
applyStyleProp(this.el, 'height', height)
}

}
26 changes: 13 additions & 13 deletions packages/core/src/locales/af.ts
@@ -1,22 +1,22 @@
import { LocaleInput } from '@fullcalendar/common'

export default {
code: "af",
code: 'af',
week: {
dow: 1, // Maandag is die eerste dag van die week.
doy: 4 // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
doy: 4, // Die week wat die 4de Januarie bevat is die eerste week van die jaar.
},
buttonText: {
prev: "Vorige",
next: "Volgende",
today: "Vandag",
year: "Jaar",
month: "Maand",
week: "Week",
day: "Dag",
list: "Agenda"
prev: 'Vorige',
next: 'Volgende',
today: 'Vandag',
year: 'Jaar',
month: 'Maand',
week: 'Week',
day: 'Dag',
list: 'Agenda',
},
allDayText: "Heeldag",
moreLinkText: "Addisionele",
noEventsText: "Daar is geen gebeurtenisse nie"
allDayText: 'Heeldag',
moreLinkText: 'Addisionele',
noEventsText: 'Daar is geen gebeurtenisse nie',
} as LocaleInput
26 changes: 13 additions & 13 deletions packages/core/src/locales/ar-dz.ts
@@ -1,23 +1,23 @@
import { LocaleInput } from '@fullcalendar/common'

export default {
code: "ar-dz",
code: 'ar-dz',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 4 // The week that contains Jan 1st is the first week of the year.
doy: 4, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: "أسبوع",
allDayText: "اليوم كله",
moreLinkText: "أخرى",
noEventsText: "أي أحداث لعرض"
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
} as LocaleInput
26 changes: 13 additions & 13 deletions packages/core/src/locales/ar-kw.ts
@@ -1,23 +1,23 @@
import { LocaleInput } from '@fullcalendar/common'

export default {
code: "ar-kw",
code: 'ar-kw',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 12 // The week that contains Jan 1st is the first week of the year.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: "أسبوع",
allDayText: "اليوم كله",
moreLinkText: "أخرى",
noEventsText: "أي أحداث لعرض"
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
} as LocaleInput
26 changes: 13 additions & 13 deletions packages/core/src/locales/ar-ly.ts
@@ -1,23 +1,23 @@
import { LocaleInput } from '@fullcalendar/common'

export default {
code: "ar-ly",
code: 'ar-ly',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12 // The week that contains Jan 1st is the first week of the year.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: "أسبوع",
allDayText: "اليوم كله",
moreLinkText: "أخرى",
noEventsText: "أي أحداث لعرض"
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
} as LocaleInput
26 changes: 13 additions & 13 deletions packages/core/src/locales/ar-ma.ts
@@ -1,23 +1,23 @@
import { LocaleInput } from '@fullcalendar/common'

export default {
code: "ar-ma",
code: 'ar-ma',
week: {
dow: 6, // Saturday is the first day of the week.
doy: 12 // The week that contains Jan 1st is the first week of the year.
doy: 12, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: "أسبوع",
allDayText: "اليوم كله",
moreLinkText: "أخرى",
noEventsText: "أي أحداث لعرض"
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
} as LocaleInput
26 changes: 13 additions & 13 deletions packages/core/src/locales/ar-sa.ts
@@ -1,23 +1,23 @@
import { LocaleInput } from '@fullcalendar/common'

export default {
code: "ar-sa",
code: 'ar-sa',
week: {
dow: 0, // Sunday is the first day of the week.
doy: 6 // The week that contains Jan 1st is the first week of the year.
doy: 6, // The week that contains Jan 1st is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: "أسبوع",
allDayText: "اليوم كله",
moreLinkText: "أخرى",
noEventsText: "أي أحداث لعرض"
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
} as LocaleInput
26 changes: 13 additions & 13 deletions packages/core/src/locales/ar-tn.ts
@@ -1,23 +1,23 @@
import { LocaleInput } from '@fullcalendar/common'

export default {
code: "ar-tn",
code: 'ar-tn',
week: {
dow: 1, // Monday is the first day of the week.
doy: 4 // The week that contains Jan 4th is the first week of the year.
doy: 4, // The week that contains Jan 4th is the first week of the year.
},
direction: 'rtl',
buttonText: {
prev: "السابق",
next: "التالي",
today: "اليوم",
month: "شهر",
week: "أسبوع",
day: "يوم",
list: "أجندة"
prev: 'السابق',
next: 'التالي',
today: 'اليوم',
month: 'شهر',
week: 'أسبوع',
day: 'يوم',
list: 'أجندة',
},
weekText: "أسبوع",
allDayText: "اليوم كله",
moreLinkText: "أخرى",
noEventsText: "أي أحداث لعرض"
weekText: 'أسبوع',
allDayText: 'اليوم كله',
moreLinkText: 'أخرى',
noEventsText: 'أي أحداث لعرض',
} as LocaleInput

0 comments on commit 8acef2f

Please sign in to comment.