From 135c331731ce0e93f8fe939f34eca718ef637a7f Mon Sep 17 00:00:00 2001 From: Yury Uvarov Date: Fri, 1 Dec 2023 18:39:25 +0300 Subject: [PATCH] replace js with ts --- ...rs-change-of-time.js => action-handlers-change-of-time.ts} | 4 ++-- ...-a-day-ranged.js => action-handlers-click-a-day-ranged.ts} | 4 ++-- ...handlers-click-a-day.js => action-handlers-click-a-day.ts} | 4 ++-- ...ction-handlers-click-on-a-month-in-the-month-selection.ts} | 4 ++-- ...n-the-arrows.js => action-handlers-click-on-the-arrows.ts} | 4 ++-- ...> action-handlers-click-on-the-week-number-select-days.ts} | 4 ++-- ...-number.js => action-handlers-click-on-the-week-number.ts} | 4 ++-- ...ction-handlers-click-on-the-year-in-the-year-selection.ts} | 4 ++-- ...ery-day.js => action-handlers-get-and-change-every-day.ts} | 4 ++-- ...div.js => additional-features-date-picker-in-input-div.ts} | 4 ++-- ...s => additional-features-date-picker-in-input-multiple.ts} | 4 ++-- ...n-input.js => additional-features-date-picker-in-input.ts} | 4 ++-- ...ker-12.js => additional-features-enable-time-picker-12.ts} | 4 ++-- ...ker-24.js => additional-features-enable-time-picker-24.ts} | 4 ++-- ...l.js => additional-features-enable-time-picker-control.ts} | 4 ++-- ...js => additional-features-enable-time-picker-your-time.ts} | 4 ++-- ...asses.js => customization-and-modification-css-classes.ts} | 4 ++-- ...popups.js => customization-and-modification-dom-popups.ts} | 4 ++-- ...tes.js => customization-and-modification-dom-templates.ts} | 4 ++-- ...-dark.js => customization-and-modification-themes-dark.ts} | 4 ++-- ...ight.js => customization-and-modification-themes-light.ts} | 4 ++-- ...nt-disable-the-ability-to-select-days-months-and-years.ts} | 4 ++-- ... => date-management-do-not-highlight-the-weekend-today.ts} | 4 ++-- ...nagement-other-today.js => date-management-other-today.ts} | 4 ++-- ...=> date-management-selected-days-month-year-by-default.ts} | 4 ++-- ...ate-management-specify-additional-weekends-or-holidays.ts} | 4 ++-- ...{date-range-disable-days.js => date-range-disable-days.ts} | 4 ++-- .../{date-range-enable-days.js => date-range-enable-days.ts} | 4 ++-- ...y.js => date-range-maximum-and-minimum-date-to-display.ts} | 4 ++-- ...dates.js => date-range-start-and-end-of-existing-dates.ts} | 4 ++-- ...gn-manually.js => internationalization-assign-manually.ts} | 4 ++-- ...alization-iso-8601.js => internationalization-iso-8601.ts} | 4 ++-- ...tionalization-locale.js => internationalization-locale.ts} | 4 ++-- ...n-week-numbers.js => internationalization-week-numbers.ts} | 4 ++-- examples/{try-vanilla-calendar.js => try-vanilla-calendar.ts} | 0 ...ype-of-calendar-default.js => type-of-calendar-default.ts} | 4 ++-- .../{type-of-calendar-month.js => type-of-calendar-month.ts} | 4 ++-- ...multiple-ranged.js => type-of-calendar-multiple-ranged.ts} | 4 ++-- ...e-of-calendar-multiple.js => type-of-calendar-multiple.ts} | 4 ++-- .../{type-of-calendar-year.js => type-of-calendar-year.ts} | 4 ++-- tsconfig.json | 2 +- 41 files changed, 79 insertions(+), 79 deletions(-) rename examples/{action-handlers-change-of-time.js => action-handlers-change-of-time.ts} (77%) rename examples/{action-handlers-click-a-day-ranged.js => action-handlers-click-a-day-ranged.ts} (76%) rename examples/{action-handlers-click-a-day.js => action-handlers-click-a-day.ts} (70%) rename examples/{action-handlers-click-on-a-month-in-the-month-selection.js => action-handlers-click-on-a-month-in-the-month-selection.ts} (72%) rename examples/{action-handlers-click-on-the-arrows.js => action-handlers-click-on-the-arrows.ts} (72%) rename examples/{action-handlers-click-on-the-week-number-select-days.js => action-handlers-click-on-the-week-number-select-days.ts} (83%) rename examples/{action-handlers-click-on-the-week-number.js => action-handlers-click-on-the-week-number.ts} (82%) rename examples/{action-handlers-click-on-the-year-in-the-year-selection.js => action-handlers-click-on-the-year-in-the-year-selection.ts} (72%) rename examples/{action-handlers-get-and-change-every-day.js => action-handlers-get-and-change-every-day.ts} (86%) rename examples/{additional-features-date-picker-in-input-div.js => additional-features-date-picker-in-input-div.ts} (87%) rename examples/{additional-features-date-picker-in-input-multiple.js => additional-features-date-picker-in-input-multiple.ts} (90%) rename examples/{additional-features-date-picker-in-input.js => additional-features-date-picker-in-input.ts} (87%) rename examples/{additional-features-enable-time-picker-12.js => additional-features-enable-time-picker-12.ts} (69%) rename examples/{additional-features-enable-time-picker-24.js => additional-features-enable-time-picker-24.ts} (68%) rename examples/{additional-features-enable-time-picker-control.js => additional-features-enable-time-picker-control.ts} (74%) rename examples/{additional-features-enable-time-picker-your-time.js => additional-features-enable-time-picker-your-time.ts} (73%) rename examples/{customization-and-modification-css-classes.js => customization-and-modification-css-classes.ts} (67%) rename examples/{customization-and-modification-dom-popups.js => customization-and-modification-dom-popups.ts} (86%) rename examples/{customization-and-modification-dom-templates.js => customization-and-modification-dom-templates.ts} (86%) rename examples/{customization-and-modification-themes-dark.js => customization-and-modification-themes-dark.ts} (69%) rename examples/{customization-and-modification-themes-light.js => customization-and-modification-themes-light.ts} (69%) rename examples/{date-management-disable-the-ability-to-select-days-months-and-years.js => date-management-disable-the-ability-to-select-days-months-and-years.ts} (72%) rename examples/{date-management-do-not-highlight-the-weekend-today.js => date-management-do-not-highlight-the-weekend-today.ts} (71%) rename examples/{date-management-other-today.js => date-management-other-today.ts} (67%) rename examples/{date-management-selected-days-month-year-by-default.js => date-management-selected-days-month-year-by-default.ts} (77%) rename examples/{date-management-specify-additional-weekends-or-holidays.js => date-management-specify-additional-weekends-or-holidays.ts} (75%) rename examples/{date-range-disable-days.js => date-range-disable-days.ts} (79%) rename examples/{date-range-enable-days.js => date-range-enable-days.ts} (77%) rename examples/{date-range-maximum-and-minimum-date-to-display.js => date-range-maximum-and-minimum-date-to-display.ts} (78%) rename examples/{date-range-start-and-end-of-existing-dates.js => date-range-start-and-end-of-existing-dates.ts} (69%) rename examples/{internationalization-assign-manually.js => internationalization-assign-manually.ts} (81%) rename examples/{internationalization-iso-8601.js => internationalization-iso-8601.ts} (66%) rename examples/{internationalization-locale.js => internationalization-locale.ts} (68%) rename examples/{internationalization-week-numbers.js => internationalization-week-numbers.ts} (69%) rename examples/{try-vanilla-calendar.js => try-vanilla-calendar.ts} (100%) rename examples/{type-of-calendar-default.js => type-of-calendar-default.ts} (63%) rename examples/{type-of-calendar-month.js => type-of-calendar-month.ts} (63%) rename examples/{type-of-calendar-multiple-ranged.js => type-of-calendar-multiple-ranged.ts} (79%) rename examples/{type-of-calendar-multiple.js => type-of-calendar-multiple.ts} (73%) rename examples/{type-of-calendar-year.js => type-of-calendar-year.ts} (63%) diff --git a/examples/action-handlers-change-of-time.js b/examples/action-handlers-change-of-time.ts similarity index 77% rename from examples/action-handlers-change-of-time.js rename to examples/action-handlers-change-of-time.ts index 0658cf4d..c5d95dde 100644 --- a/examples/action-handlers-change-of-time.js +++ b/examples/action-handlers-change-of-time.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { time: true, diff --git a/examples/action-handlers-click-a-day-ranged.js b/examples/action-handlers-click-a-day-ranged.ts similarity index 76% rename from examples/action-handlers-click-a-day-ranged.js rename to examples/action-handlers-click-a-day-ranged.ts index a0e147c8..f4568404 100644 --- a/examples/action-handlers-click-a-day-ranged.js +++ b/examples/action-handlers-click-a-day-ranged.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { day: 'multiple-ranged', diff --git a/examples/action-handlers-click-a-day.js b/examples/action-handlers-click-a-day.ts similarity index 70% rename from examples/action-handlers-click-a-day.js rename to examples/action-handlers-click-a-day.ts index 7bc1c43e..0a593dfb 100644 --- a/examples/action-handlers-click-a-day.js +++ b/examples/action-handlers-click-a-day.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { actions: { clickDay(event, dates) { console.log(dates); diff --git a/examples/action-handlers-click-on-a-month-in-the-month-selection.js b/examples/action-handlers-click-on-a-month-in-the-month-selection.ts similarity index 72% rename from examples/action-handlers-click-on-a-month-in-the-month-selection.js rename to examples/action-handlers-click-on-a-month-in-the-month-selection.ts index 885e184a..5bb36ae1 100644 --- a/examples/action-handlers-click-on-a-month-in-the-month-selection.js +++ b/examples/action-handlers-click-on-a-month-in-the-month-selection.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { type: 'month', actions: { clickMonth(e, month) { diff --git a/examples/action-handlers-click-on-the-arrows.js b/examples/action-handlers-click-on-the-arrows.ts similarity index 72% rename from examples/action-handlers-click-on-the-arrows.js rename to examples/action-handlers-click-on-the-arrows.ts index d7b2b5a7..61e9a272 100644 --- a/examples/action-handlers-click-on-the-arrows.js +++ b/examples/action-handlers-click-on-the-arrows.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { actions: { clickArrow(event, year, month) { console.log(year, month); diff --git a/examples/action-handlers-click-on-the-week-number-select-days.js b/examples/action-handlers-click-on-the-week-number-select-days.ts similarity index 83% rename from examples/action-handlers-click-on-the-week-number-select-days.js rename to examples/action-handlers-click-on-the-week-number-select-days.ts index fd5392f8..ec802ce6 100644 --- a/examples/action-handlers-click-on-the-week-number-select-days.js +++ b/examples/action-handlers-click-on-the-week-number-select-days.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { day: 'multiple-ranged', diff --git a/examples/action-handlers-click-on-the-week-number.js b/examples/action-handlers-click-on-the-week-number.ts similarity index 82% rename from examples/action-handlers-click-on-the-week-number.js rename to examples/action-handlers-click-on-the-week-number.ts index 2c4b9327..88686a09 100644 --- a/examples/action-handlers-click-on-the-week-number.js +++ b/examples/action-handlers-click-on-the-week-number.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { visibility: { weekNumbers: true, diff --git a/examples/action-handlers-click-on-the-year-in-the-year-selection.js b/examples/action-handlers-click-on-the-year-in-the-year-selection.ts similarity index 72% rename from examples/action-handlers-click-on-the-year-in-the-year-selection.js rename to examples/action-handlers-click-on-the-year-in-the-year-selection.ts index 73960947..66253823 100644 --- a/examples/action-handlers-click-on-the-year-in-the-year-selection.js +++ b/examples/action-handlers-click-on-the-year-in-the-year-selection.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { type: 'year', actions: { clickYear(event, year) { diff --git a/examples/action-handlers-get-and-change-every-day.js b/examples/action-handlers-get-and-change-every-day.ts similarity index 86% rename from examples/action-handlers-get-and-change-every-day.js rename to examples/action-handlers-get-and-change-every-day.ts index 6205b53b..b7f0b235 100644 --- a/examples/action-handlers-get-and-change-every-day.js +++ b/examples/action-handlers-get-and-change-every-day.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { actions: { getDays(day, date, HTMLElement, HTMLButtonElement) { const randomBoolean = Math.random() < 0.5; diff --git a/examples/additional-features-date-picker-in-input-div.js b/examples/additional-features-date-picker-in-input-div.ts similarity index 87% rename from examples/additional-features-date-picker-in-input-div.js rename to examples/additional-features-date-picker-in-input-div.ts index 079caa09..a89443aa 100644 --- a/examples/additional-features-date-picker-in-input-div.js +++ b/examples/additional-features-date-picker-in-input-div.ts @@ -1,11 +1,11 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; // start irrelevant code document.querySelector('#calendar-input-div').style.display = 'flex'; // end irrelevant code -const options = { +const options: Options = { input: true, actions: { changeToInput(e, calendar, dates, time, hours, minutes, keeping) { diff --git a/examples/additional-features-date-picker-in-input-multiple.js b/examples/additional-features-date-picker-in-input-multiple.ts similarity index 90% rename from examples/additional-features-date-picker-in-input-multiple.js rename to examples/additional-features-date-picker-in-input-multiple.ts index 4f3ad899..b4b6eb52 100644 --- a/examples/additional-features-date-picker-in-input-multiple.js +++ b/examples/additional-features-date-picker-in-input-multiple.ts @@ -1,11 +1,11 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; // start irrelevant code document.querySelector('#calendar-input').style.display = 'flex'; // end irrelevant code -const options = { +const options: Options = { input: true, type: 'multiple', settings: { diff --git a/examples/additional-features-date-picker-in-input.js b/examples/additional-features-date-picker-in-input.ts similarity index 87% rename from examples/additional-features-date-picker-in-input.js rename to examples/additional-features-date-picker-in-input.ts index 377bbc85..c5b25de5 100644 --- a/examples/additional-features-date-picker-in-input.js +++ b/examples/additional-features-date-picker-in-input.ts @@ -1,11 +1,11 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; // start irrelevant code document.querySelector('#calendar-input').style.display = 'flex'; // end irrelevant code -const options = { +const options: Options = { input: true, actions: { changeToInput(e, calendar, dates, time, hours, minutes, keeping) { diff --git a/examples/additional-features-enable-time-picker-12.js b/examples/additional-features-enable-time-picker-12.ts similarity index 69% rename from examples/additional-features-enable-time-picker-12.js rename to examples/additional-features-enable-time-picker-12.ts index cc6feed4..5e492209 100644 --- a/examples/additional-features-enable-time-picker-12.js +++ b/examples/additional-features-enable-time-picker-12.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { time: true, // or 12 diff --git a/examples/additional-features-enable-time-picker-24.js b/examples/additional-features-enable-time-picker-24.ts similarity index 68% rename from examples/additional-features-enable-time-picker-24.js rename to examples/additional-features-enable-time-picker-24.ts index c7460f55..b5b459aa 100644 --- a/examples/additional-features-enable-time-picker-24.js +++ b/examples/additional-features-enable-time-picker-24.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { time: 24, diff --git a/examples/additional-features-enable-time-picker-control.js b/examples/additional-features-enable-time-picker-control.ts similarity index 74% rename from examples/additional-features-enable-time-picker-control.js rename to examples/additional-features-enable-time-picker-control.ts index 806e3ca1..59567aa5 100644 --- a/examples/additional-features-enable-time-picker-control.js +++ b/examples/additional-features-enable-time-picker-control.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { time: true, diff --git a/examples/additional-features-enable-time-picker-your-time.js b/examples/additional-features-enable-time-picker-your-time.ts similarity index 73% rename from examples/additional-features-enable-time-picker-your-time.js rename to examples/additional-features-enable-time-picker-your-time.ts index 9b7fcf97..00092513 100644 --- a/examples/additional-features-enable-time-picker-your-time.js +++ b/examples/additional-features-enable-time-picker-your-time.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { time: true, diff --git a/examples/customization-and-modification-css-classes.js b/examples/customization-and-modification-css-classes.ts similarity index 67% rename from examples/customization-and-modification-css-classes.js rename to examples/customization-and-modification-css-classes.ts index 04817746..5671efb6 100644 --- a/examples/customization-and-modification-css-classes.js +++ b/examples/customization-and-modification-css-classes.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { CSSClasses: { arrow: 'arrow-smile', }, diff --git a/examples/customization-and-modification-dom-popups.js b/examples/customization-and-modification-dom-popups.ts similarity index 86% rename from examples/customization-and-modification-dom-popups.js rename to examples/customization-and-modification-dom-popups.ts index 76ed8191..6c16d5e7 100644 --- a/examples/customization-and-modification-dom-popups.js +++ b/examples/customization-and-modification-dom-popups.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selected: { month: 6, diff --git a/examples/customization-and-modification-dom-templates.js b/examples/customization-and-modification-dom-templates.ts similarity index 86% rename from examples/customization-and-modification-dom-templates.js rename to examples/customization-and-modification-dom-templates.ts index 86cbda5b..c9e53b27 100644 --- a/examples/customization-and-modification-dom-templates.js +++ b/examples/customization-and-modification-dom-templates.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { DOMTemplates: { default: `
diff --git a/examples/customization-and-modification-themes-dark.js b/examples/customization-and-modification-themes-dark.ts similarity index 69% rename from examples/customization-and-modification-themes-dark.js rename to examples/customization-and-modification-themes-dark.ts index 009a3a8b..189ac090 100644 --- a/examples/customization-and-modification-themes-dark.js +++ b/examples/customization-and-modification-themes-dark.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { visibility: { theme: 'dark', diff --git a/examples/customization-and-modification-themes-light.js b/examples/customization-and-modification-themes-light.ts similarity index 69% rename from examples/customization-and-modification-themes-light.js rename to examples/customization-and-modification-themes-light.ts index 33ef5775..185945e0 100644 --- a/examples/customization-and-modification-themes-light.js +++ b/examples/customization-and-modification-themes-light.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { visibility: { theme: 'light', diff --git a/examples/date-management-disable-the-ability-to-select-days-months-and-years.js b/examples/date-management-disable-the-ability-to-select-days-months-and-years.ts similarity index 72% rename from examples/date-management-disable-the-ability-to-select-days-months-and-years.js rename to examples/date-management-disable-the-ability-to-select-days-months-and-years.ts index 3e78e6a1..f7f869f4 100644 --- a/examples/date-management-disable-the-ability-to-select-days-months-and-years.js +++ b/examples/date-management-disable-the-ability-to-select-days-months-and-years.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { day: false, diff --git a/examples/date-management-do-not-highlight-the-weekend-today.js b/examples/date-management-do-not-highlight-the-weekend-today.ts similarity index 71% rename from examples/date-management-do-not-highlight-the-weekend-today.js rename to examples/date-management-do-not-highlight-the-weekend-today.ts index 9287f2ea..86424be3 100644 --- a/examples/date-management-do-not-highlight-the-weekend-today.js +++ b/examples/date-management-do-not-highlight-the-weekend-today.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { visibility: { weekend: false, diff --git a/examples/date-management-other-today.js b/examples/date-management-other-today.ts similarity index 67% rename from examples/date-management-other-today.js rename to examples/date-management-other-today.ts index d90cff02..f538d66a 100644 --- a/examples/date-management-other-today.js +++ b/examples/date-management-other-today.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { date: { today: new Date('2022-01-07'), }, diff --git a/examples/date-management-selected-days-month-year-by-default.js b/examples/date-management-selected-days-month-year-by-default.ts similarity index 77% rename from examples/date-management-selected-days-month-year-by-default.js rename to examples/date-management-selected-days-month-year-by-default.ts index 1bf83a8f..d19eda8f 100644 --- a/examples/date-management-selected-days-month-year-by-default.js +++ b/examples/date-management-selected-days-month-year-by-default.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selection: { day: 'multiple', diff --git a/examples/date-management-specify-additional-weekends-or-holidays.js b/examples/date-management-specify-additional-weekends-or-holidays.ts similarity index 75% rename from examples/date-management-specify-additional-weekends-or-holidays.js rename to examples/date-management-specify-additional-weekends-or-holidays.ts index 66e40ee1..7e60c2aa 100644 --- a/examples/date-management-specify-additional-weekends-or-holidays.js +++ b/examples/date-management-specify-additional-weekends-or-holidays.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { selected: { month: 0, diff --git a/examples/date-range-disable-days.js b/examples/date-range-disable-days.ts similarity index 79% rename from examples/date-range-disable-days.js rename to examples/date-range-disable-days.ts index 77683773..cedf3054 100644 --- a/examples/date-range-disable-days.js +++ b/examples/date-range-disable-days.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { range: { min: '2022-07-01', diff --git a/examples/date-range-enable-days.js b/examples/date-range-enable-days.ts similarity index 77% rename from examples/date-range-enable-days.js rename to examples/date-range-enable-days.ts index 442265fc..2104158c 100644 --- a/examples/date-range-enable-days.js +++ b/examples/date-range-enable-days.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { range: { disableAllDays: true, diff --git a/examples/date-range-maximum-and-minimum-date-to-display.js b/examples/date-range-maximum-and-minimum-date-to-display.ts similarity index 78% rename from examples/date-range-maximum-and-minimum-date-to-display.js rename to examples/date-range-maximum-and-minimum-date-to-display.ts index 02b89332..4f8dc2ab 100644 --- a/examples/date-range-maximum-and-minimum-date-to-display.js +++ b/examples/date-range-maximum-and-minimum-date-to-display.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { date: { min: '1920-01-01', max: '2038-12-31', diff --git a/examples/date-range-start-and-end-of-existing-dates.js b/examples/date-range-start-and-end-of-existing-dates.ts similarity index 69% rename from examples/date-range-start-and-end-of-existing-dates.js rename to examples/date-range-start-and-end-of-existing-dates.ts index 992fe83d..464963ae 100644 --- a/examples/date-range-start-and-end-of-existing-dates.js +++ b/examples/date-range-start-and-end-of-existing-dates.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { date: { min: '1920-01-01', max: '2038-12-31', diff --git a/examples/internationalization-assign-manually.js b/examples/internationalization-assign-manually.ts similarity index 81% rename from examples/internationalization-assign-manually.js rename to examples/internationalization-assign-manually.ts index bf8a930c..c0b78688 100644 --- a/examples/internationalization-assign-manually.js +++ b/examples/internationalization-assign-manually.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { lang: 'define', }, diff --git a/examples/internationalization-iso-8601.js b/examples/internationalization-iso-8601.ts similarity index 66% rename from examples/internationalization-iso-8601.js rename to examples/internationalization-iso-8601.ts index 18028d4a..bb6513ef 100644 --- a/examples/internationalization-iso-8601.js +++ b/examples/internationalization-iso-8601.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { iso8601: false, }, diff --git a/examples/internationalization-locale.js b/examples/internationalization-locale.ts similarity index 68% rename from examples/internationalization-locale.js rename to examples/internationalization-locale.ts index bd510656..a53bf337 100644 --- a/examples/internationalization-locale.js +++ b/examples/internationalization-locale.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { lang: 'de-AT', // Austrian-German }, diff --git a/examples/internationalization-week-numbers.js b/examples/internationalization-week-numbers.ts similarity index 69% rename from examples/internationalization-week-numbers.js rename to examples/internationalization-week-numbers.ts index 983ab65f..0c92c0ea 100644 --- a/examples/internationalization-week-numbers.js +++ b/examples/internationalization-week-numbers.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { settings: { visibility: { weekNumbers: true, diff --git a/examples/try-vanilla-calendar.js b/examples/try-vanilla-calendar.ts similarity index 100% rename from examples/try-vanilla-calendar.js rename to examples/try-vanilla-calendar.ts diff --git a/examples/type-of-calendar-default.js b/examples/type-of-calendar-default.ts similarity index 63% rename from examples/type-of-calendar-default.js rename to examples/type-of-calendar-default.ts index 4f5e059b..b5a322dd 100644 --- a/examples/type-of-calendar-default.js +++ b/examples/type-of-calendar-default.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { type: 'default', }; diff --git a/examples/type-of-calendar-month.js b/examples/type-of-calendar-month.ts similarity index 63% rename from examples/type-of-calendar-month.js rename to examples/type-of-calendar-month.ts index 98d69195..5b3e95bb 100644 --- a/examples/type-of-calendar-month.js +++ b/examples/type-of-calendar-month.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { type: 'month', }; diff --git a/examples/type-of-calendar-multiple-ranged.js b/examples/type-of-calendar-multiple-ranged.ts similarity index 79% rename from examples/type-of-calendar-multiple-ranged.js rename to examples/type-of-calendar-multiple-ranged.ts index 3e7d4eb1..b85d9501 100644 --- a/examples/type-of-calendar-multiple-ranged.js +++ b/examples/type-of-calendar-multiple-ranged.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { type: 'multiple', months: 2, jumpMonths: 2, diff --git a/examples/type-of-calendar-multiple.js b/examples/type-of-calendar-multiple.ts similarity index 73% rename from examples/type-of-calendar-multiple.js rename to examples/type-of-calendar-multiple.ts index 20989dac..5eed5e01 100644 --- a/examples/type-of-calendar-multiple.js +++ b/examples/type-of-calendar-multiple.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { type: 'multiple', months: 2, jumpMonths: 1, diff --git a/examples/type-of-calendar-year.js b/examples/type-of-calendar-year.ts similarity index 63% rename from examples/type-of-calendar-year.js rename to examples/type-of-calendar-year.ts index 2465c92f..b338104a 100644 --- a/examples/type-of-calendar-year.js +++ b/examples/type-of-calendar-year.ts @@ -1,7 +1,7 @@ -import VanillaCalendar from 'vanilla-calendar-pro'; +import VanillaCalendar, { Options } from 'vanilla-calendar-pro'; import 'vanilla-calendar-pro/build/vanilla-calendar.min.css'; -const options = { +const options: Options = { type: 'year', }; diff --git a/tsconfig.json b/tsconfig.json index 692283e0..9ccdb61c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -23,5 +23,5 @@ } }, "include": ["**/*.ts", "**/*.js", "**/*.cy.ts"], - "exclude": ["node_modules", "next/*"] + "exclude": ["node_modules", "next/*", "examples/*"] }