Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
motss committed May 28, 2021
1 parent 2e155d6 commit 24588b6
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 33 deletions.
26 changes: 13 additions & 13 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@material/mwc-button": "^0.21.0",
"@material/mwc-icon-button": "^0.21.0",
"lit": "^2.0.0-rc.2",
"nodemod": "^2.8.3",
"nodemod": "^2.8.4",
"tslib": "^2.2.0"
},
"devDependencies": {
Expand Down
9 changes: 5 additions & 4 deletions src/date-picker/date-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,7 @@ export class DatePicker extends DatePickerMixin(DatePickerMinMaxMixin(LitElement
}

#renderCalendar = (): TemplateResult => {
const currentDate = this._currentDate;
const firstDayOfWeek = this.firstDayOfWeek;
const formatters = this.#formatters;
const max = this._max;
Expand All @@ -269,25 +270,25 @@ export class DatePicker extends DatePickerMixin(DatePickerMinMaxMixin(LitElement
disabledDatesSet,
disabledDaysSet,
} = calendar({
date: currentDate,
dayFormat,
fullDateFormat,
locale: this.locale,
disabledDates: splitString(this.disabledDates, toResolvedDate),
disabledDays: splitString(this.disabledDays, Number),
firstDayOfWeek,
fullDateFormat,
locale: this.locale,
max,
min,
showWeekNumber,
weekNumberType: this.weekNumberType,
selectedDate: this._currentDate,
});

return html`
<app-month-calendar
class=calendar
.data=${{
calendar: calendarMonth,
currentDate: this._currentDate,
currentDate,
date: selectedDate,
disabledDatesSet,
disabledDaysSet,
Expand Down
8 changes: 4 additions & 4 deletions src/helpers/to-multi-calendars.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Calendar } from 'nodemod/dist/calendar/calendar_typing';
import { getWeekdays } from 'nodemod/dist/calendar/helpers/get-weekdays.js';
import { toUTCDate } from 'nodemod/dist/calendar/helpers/to-utc-date.js';
import { calendar } from 'nodemod/dist/calendar/index.js';
import type { Calendar } from 'nodemod/dist/calendar/typings.js';

import type { MultiCalendars, ToMultiCalendarsInit } from './typings.js';

Expand Down Expand Up @@ -81,17 +81,17 @@ export function toMultiCalendars(
}

const calendarDays = calendar({
date: firstDayOfMonth,
dayFormat,
fullDateFormat,
locale,
disabledDates,
disabledDays,
firstDayOfWeek,
fullDateFormat,
locale,
max,
min,
showWeekNumber,
weekNumberType,
selectedDate: firstDayOfMonth,
});

return { ...calendarDays, key };
Expand Down
10 changes: 3 additions & 7 deletions src/helpers/typings.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
import type {
Calendar,
CalendarOptions,
CalendarWeekday,
} from 'nodemod/dist/calendar/calendar_typing.js';
import type { Calendar, CalendarInit, CalendarWeekday } from 'nodemod/dist/calendar/typings.js';

import type { DatePickerProperties, Formatters, SupportedKeyCode } from '../typings.js';

Expand Down Expand Up @@ -35,9 +31,9 @@ Partial<Pick<
DatePickerProperties, 'firstDayOfWeek' | 'showWeekNumber' | 'weekLabel' | 'weekNumberType'
>>,
Pick<DatePickerProperties, 'locale'>,
Pick<CalendarOptions, 'disabledDates' | 'disabledDays' | 'max' | 'min'> {
Pick<CalendarInit, 'disabledDates' | 'disabledDays' | 'max' | 'min'> {
count?: number;
currentDate: CalendarOptions['selectedDate'];
currentDate: CalendarInit['date'];
}

export interface ToNextSelectableDateInit {
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/date-picker-mixin.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { LitElement } from 'lit';
import { property } from 'lit/decorators.js';
import type { WeekNumberType } from 'nodemod/dist/calendar/calendar_typing';
import type { WeekNumberType } from 'nodemod/dist/calendar/typings.js';

import { nullishAttributeConverter } from '../helpers/nullish-attribute-converter.js';
import { toDateString } from '../helpers/to-date-string.js';
Expand Down
2 changes: 1 addition & 1 deletion src/mixins/typings.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { LitElement } from 'lit';
import type { WeekNumberType } from 'nodemod/dist/calendar/calendar_typing';
import type { WeekNumberType } from 'nodemod/dist/calendar/typings.js';

import type { CalendarView, Constructor } from '../typings.js';

Expand Down
2 changes: 1 addition & 1 deletion src/month-calendar/typings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { Calendar, CalendarWeekday } from 'nodemod/dist/calendar/calendar_typing.js';
import type { Calendar, CalendarWeekday } from 'nodemod/dist/calendar/typings.js';

import type { ChangedProperties, Formatters } from '../typings.js';

Expand Down
2 changes: 1 addition & 1 deletion src/typings.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import type { DateTimeFormatter } from 'nodemod/dist/calendar/calendar_typing';
import type { DateTimeFormatter } from 'nodemod/dist/calendar/typings.js';

import type { keyCodesRecord } from './constants.js';
import type { DatePickerMinMaxProperties, DatePickerMixinProperties } from './mixins/typings.js';
Expand Down

0 comments on commit 24588b6

Please sign in to comment.