From cf07c6d5a9d80bb77124f81681d2637b483d98b1 Mon Sep 17 00:00:00 2001 From: Wojciech Maj Date: Thu, 27 Jan 2022 17:13:21 +0100 Subject: [PATCH] Update ESLint, update ESLint config, configure Prettier, format all files using new config --- .babelrc | 14 +- .eslintrc.json | 11 +- .husky/pre-commit | 4 + .prettierignore | 5 + .prettierrc.json | 5 + .vscode/extensions.json | 9 +- .vscode/settings.json | 2 + README.md | 152 ++-- jest.config.json | 9 +- package.json | 9 +- sample/.babelrc | 9 +- sample/Sample.jsx | 6 +- sample/Sample.less | 9 +- sample/index.html | 2 +- sample/webpack.config.js | 15 +- src/Calendar.jsx | 219 ++--- src/Calendar.less | 34 +- src/Calendar.spec.jsx | 381 ++------- src/Calendar/Navigation.jsx | 43 +- src/Calendar/Navigation.spec.jsx | 163 +--- src/CenturyView.jsx | 10 +- src/CenturyView.spec.jsx | 33 +- src/CenturyView/Decade.jsx | 6 +- src/CenturyView/Decade.spec.jsx | 86 +- src/DecadeView.jsx | 10 +- src/DecadeView.spec.jsx | 27 +- src/DecadeView/Year.jsx | 6 +- src/DecadeView/Year.spec.jsx | 88 +- src/Flex.jsx | 30 +- src/Flex.spec.jsx | 48 +- src/MonthView.jsx | 24 +- src/MonthView.spec.jsx | 86 +- src/MonthView/Day.spec.jsx | 105 +-- src/MonthView/Days.jsx | 19 +- src/MonthView/WeekNumber.jsx | 39 +- src/MonthView/WeekNumber.spec.jsx | 16 +- src/MonthView/WeekNumbers.jsx | 44 +- src/MonthView/WeekNumbers.spec.jsx | 25 +- src/MonthView/Weekdays.jsx | 27 +- src/MonthView/Weekdays.spec.jsx | 21 +- src/Tile.jsx | 32 +- src/Tile.spec.jsx | 77 +- src/TileGroup.jsx | 13 +- src/YearView.jsx | 10 +- src/YearView.spec.jsx | 40 +- src/YearView/Month.spec.jsx | 95 +-- src/index.js | 8 +- src/shared/const.js | 5 +- src/shared/dateFormatter.js | 5 +- src/shared/dates.js | 156 ++-- src/shared/dates.spec.js | 20 +- src/shared/propTypes.js | 52 +- src/shared/utils.js | 27 +- src/shared/utils.spec.js | 8 +- test/.babelrc | 9 +- test/DateBonduariesOptions.jsx | 29 +- test/LocaleOptions.jsx | 40 +- test/MaxDetailOptions.jsx | 14 +- test/MinDetailOptions.jsx | 14 +- test/Test.jsx | 98 +-- test/Test.less | 13 +- test/ValueOptions.jsx | 48 +- test/ViewOptions.jsx | 20 +- test/index.html | 2 +- test/package.json | 2 +- test/shared/dateFormatter.js | 5 +- test/webpack.config.js | 14 +- test/yarn.lock | 383 ++++----- yarn.lock | 1241 ++++++++++++++-------------- 69 files changed, 1577 insertions(+), 2754 deletions(-) create mode 100755 .husky/pre-commit create mode 100644 .prettierignore create mode 100644 .prettierrc.json diff --git a/.babelrc b/.babelrc index 55445ead..395ba194 100644 --- a/.babelrc +++ b/.babelrc @@ -1,14 +1,14 @@ { - "presets": [ - "@babel/env", - "@babel/react" - ], + "presets": ["@babel/env", "@babel/react"], "env": { "production-esm": { "presets": [ - ["@babel/env", { - "modules": false - }], + [ + "@babel/env", + { + "modules": false + } + ], "@babel/react" ] } diff --git a/.eslintrc.json b/.eslintrc.json index f9043163..381b230e 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -1,15 +1,8 @@ { - "extends": "wojtekmaj/react", - "parser": "babel-eslint", - "rules": { - "no-restricted-globals": "off" - }, + "extends": "wojtekmaj/react-no-automatic-runtime", "overrides": [ { - "files": [ - "sample/**", - "test/**" - ], + "files": ["sample/**", "test/**"], "rules": { "import/no-unresolved": "off" } diff --git a/.husky/pre-commit b/.husky/pre-commit new file mode 100755 index 00000000..f3a67960 --- /dev/null +++ b/.husky/pre-commit @@ -0,0 +1,4 @@ +#!/bin/sh +. "$(dirname "$0")/_/husky.sh" + +yarn pretty-quick --staged diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000..5da724a6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +.cache +.yarn +coverage +dist +*.yml diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 00000000..5e2863a1 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,5 @@ +{ + "printWidth": 100, + "singleQuote": true, + "trailingComma": "all" +} diff --git a/.vscode/extensions.json b/.vscode/extensions.json index 8b983a7b..75326f34 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -1,9 +1,4 @@ { - "recommendations": [ - "dbaeumer.vscode-eslint", - "eamodio.gitlens" - ], - "unwantedRecommendations": [ - "dbaeumer.jshint" - ] + "recommendations": ["dbaeumer.vscode-eslint", "eamodio.gitlens", "esbenp.prettier-vscode"], + "unwantedRecommendations": ["dbaeumer.jshint"] } diff --git a/.vscode/settings.json b/.vscode/settings.json index fe4b7dd3..e3696725 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,4 +1,6 @@ { + "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, "search.exclude": { "**/.yarn": true } diff --git a/README.md b/README.md index 82ba1382..020c68fa 100644 --- a/README.md +++ b/README.md @@ -8,15 +8,16 @@ Ultimate calendar for your React app. -* Pick days, months, years, or even decades -* Supports range selection -* Supports virtually any language -* No moment.js needed +- Pick days, months, years, or even decades +- Supports range selection +- Supports virtually any language +- No moment.js needed ## tl;dr -* Install by executing `npm install react-calendar` or `yarn add react-calendar`. -* Import by adding `import Calendar from 'react-calendar'`. -* Use by adding ``. Use `onChange` prop for getting new values. + +- Install by executing `npm install react-calendar` or `yarn add react-calendar`. +- Import by adding `import Calendar from 'react-calendar'`. +- Use by adding ``. Use `onChange` prop for getting new values. ## Demo @@ -28,7 +29,7 @@ A minimal demo page can be found in `sample` directory. React-Calendar is under constant development. This documentation is written for React-Calendar 3.x branch. If you want to see documentation for other versions of React-Calendar, use dropdown on top of GitHub page to switch to an appropriate tag. Here are quick links to the newest docs from each branch: -* [v2.x](https://github.com/wojtekmaj/react-calendar/blob/v2.x/README.md) +- [v2.x](https://github.com/wojtekmaj/react-calendar/blob/v2.x/README.md) ## Getting started @@ -59,10 +60,7 @@ function MyApp() { return (
- +
); } @@ -86,60 +84,60 @@ Displays a complete, interactive calendar. #### Props -|Prop name|Description|Default value|Example values| -|----|----|----|----| -|activeStartDate|The beginning of a period that shall be displayed. If you wish to use React-Calendar in an uncontrolled way, use `defaultActiveStartDate` instead.|(today)|`new Date(2017, 0, 1)`| -|allowPartialRange|Whether to call onChange with only partial result given `selectRange` prop.|`false`|`true`| -|calendarType|Type of calendar that should be used. Can be `"ISO 8601"`, `"US"`, `"Arabic"`, or `"Hebrew"`. Setting to `"US"` or `"Hebrew"` will change the first day of the week to Sunday. Setting to `"Arabic"` will change the first day of the week to Saturday. Setting to `"Arabic"` or `"Hebrew"` will make weekends appear on Friday to Saturday.|Type of calendar most commonly used in a given locale|`"ISO 8601"`| -|className|Class name(s) that will be added along with `"react-calendar"` to the main React-Calendar `
` element.|n/a|
  • String: `"class1 class2"`
  • Array of strings: `["class1", "class2 class3"]`
| -|defaultActiveStartDate|The beginning of a period that shall be displayed by default. If you wish to use React-Calendar in a controlled way, use `activeStartDate` instead.|(today)|`new Date(2017, 0, 1)`| -|defaultValue|Calendar value that shall be selected initially. Can be either one value or an array of two values. If you wish to use React-Calendar in a controlled way, use `value` instead.|n/a|
  • Date: `new Date()`
  • An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]`| -|defaultView|Determines which calendar view shall be opened initially. Does not disable navigation. Can be `"month"`, `"year"`, `"decade"` or `"century"`. If you wish to use React-Calendar in a controlled way, use `view` instead.|The most detailed view allowed|`"year"`| -|formatDay|Function called to override default formatting of day tile labels. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'd')`| -|formatLongDate|Function called to override default formatting of day tile `abbr` labels. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'dd MMM YYYY')`| -|formatMonth|Function called to override default formatting of month names. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'MMM')`| -|formatMonthYear|Function called to override default formatting of months and years. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'MMMM YYYY')`| -|formatShortWeekday|Function called to override default formatting of weekday names. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'dd')`| -|formatYear|Function called to override default formatting of year in the top navigation section. Can be used to use your own formatting function.|(default formatter)|`(locale, date) => formatDate(date, 'YYYY')`| -|inputRef|A prop that behaves like [ref](https://reactjs.org/docs/refs-and-the-dom.html), but it's passed to main `
    ` rendered by `` component.|n/a|
    • Function:
      `(ref) => { this.myCalendar = ref; }`
    • Ref created using `React.createRef`:
      `this.ref = React.createRef();`

      `inputRef={this.ref}`
    • Ref created using `React.useRef`:
      `const ref = React.useRef();`

      `inputRef={ref}`
    | -|locale|Locale that should be used by the calendar. Can be any [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag).|User's browser settings|`"hu-HU"`| -|maxDate|Maximum date that the user can select. Periods partially overlapped by maxDate will also be selectable, although React-Calendar will ensure that no later date is selected.|n/a|Date: `new Date()`| -|maxDetail|The most detailed view that the user shall see. View defined here also becomes the one on which clicking an item will select a date and pass it to onChange. Can be `"month"`, `"year"`, `"decade"` or `"century"`.|`"month"`|`"year"`| -|minDate|Minimum date that the user can select. Periods partially overlapped by minDate will also be selectable, although React-Calendar will ensure that no earlier date is selected.|n/a|Date: `new Date()`| -|minDetail|The least detailed view that the user shall see. Can be `"month"`, `"year"`, `"decade"` or `"century"`.|`"century"`|`"decade"`| -|navigationAriaLabel|`aria-label` attribute of a label rendered on calendar navigation bar.|n/a|`"Go up"`| -|navigationAriaLive|`aria-live` attribute of a label rendered on calendar navigation bar.|`undefined`|`"polite"`| -|navigationLabel|Content of a label rendered on calendar navigation bar.|(default label)|``({ date, label, locale, view }) => `Current view: ${view}, date: ${date.toLocaleDateString(locale)}` ``| -|nextAriaLabel|`aria-label` attribute of the "next" button on the navigation pane.|n/a|`"Next"`| -|nextLabel|Content of the "next" button on the navigation pane. Setting the value explicitly to null will hide the icon.|`"›"`|
    • String: `"›"`
    • React element: ``
    | -|next2AriaLabel|`aria-label` attribute of the "next on higher level" button on the navigation pane.|n/a|`"Jump forwards"`| -|next2Label|Content of the "next on higher level" button on the navigation pane. Setting the value explicitly to null will hide the icon.|`"»"`|
    • String: `"»"`
    • React element: ``
    | -|onActiveStartDateChange|Function called when the user navigates from one view to another using previous/next button. Note that this function will not be called when e.g. drilling up from January 2021 to 2021 or drilling down the other way around.
    `action` signifies the reason for active start date change and can be one of the following values: `"prev"`, `"prev2"`, `"next"`, `"next2"`, `"drillUp"`, `"drillDown"`, `"onChange"`.|n/a|`({ action, activeStartDate, value, view }) => alert('Changed view to: ', activeStartDate, view)`| -|onChange|Function called when the user clicks an item (day on month view, month on year view and so on) on the most detailed view available.|n/a|`(value, event) => alert('New date is: ', value)`| -|onViewChange|Function called when the user navigates from one view to another using drill up button or by clicking a tile.
    `action` signifies the reason for view change and can be one of the following values: `"prev"`, `"prev2"`, `"next"`, `"next2"`, `"drillUp"`, `"drillDown"`, `"onChange"`.|n/a|`({ action, activeStartDate, value, view }) => alert('New view is: ', view)`| -|onClickDay|Function called when the user clicks a day.|n/a|`(value, event) => alert('Clicked day: ', value)`| -|onClickDecade|Function called when the user clicks a decade.|n/a|`(value, event) => alert('Clicked decade: ', value)`| -|onClickMonth|Function called when the user clicks a month.|n/a|`(value, event) => alert('Clicked month: ', value)`| -|onClickWeekNumber|Function called when the user clicks a week number.|n/a|`(weekNumber, date, event) => alert('Clicked week: ', weekNumber, 'that starts on: ', date)`| -|onClickYear|Function called when the user clicks a year.|n/a|`(value, event) => alert('Clicked year: ', value)`| -|onDrillDown|Function called when the user drills down by clicking a tile.|n/a|`({ activeStartDate, view }) => alert('Drilled down to: ', activeStartDate, view)`| -|onDrillUp|Function called when the user drills up by clicking drill up button.|n/a|`({ activeStartDate, view }) => alert('Drilled up to: ', activeStartDate, view)`| -|prevAriaLabel|`aria-label` attribute of the "previous" button on the navigation pane.|n/a|`"Previous"`| -|prevLabel|Content of the "previous" button on the navigation pane. Setting the value explicitly to null will hide the icon.|`"‹"`|
    • String: `"‹"`
    • React element: ``
    | -|prev2AriaLabel|`aria-label` attribute of the "previous on higher level" button on the navigation pane.|n/a|`"Jump backwards"`| -|prev2Label|Content of the "previous on higher level" button on the navigation pane. Setting the value explicitly to null will hide the icon.|`"«"`|
    • String: `"«"`
    • React element: ``
    | -|returnValue|Which dates shall be passed by the calendar to the onChange function and onClick{Period} functions. Can be `"start"`, `"end"` or `"range"`. The latter will cause an array with start and end values to be passed.|`"start"`|`"range"`| -|showDoubleView|Whether to show two months/years/… at a time instead of one. Defaults `showFixedNumberOfWeeks` prop to be `true`.|`false`|`true`| -|showFixedNumberOfWeeks|Whether to always show fixed number of weeks (6). Forces `showNeighboringMonth` prop to be `true`.|`false`|`true`| -|showNavigation|Whether a navigation bar with arrows and title shall be rendered.|`true`|`false`| -|showNeighboringMonth|Whether days from previous or next month shall be rendered if the month doesn't start on the first day of the week or doesn't end on the last day of the week, respectively.|`true`|`false`| -|selectRange|Whether the user shall select two dates forming a range instead of just one. Note: This feature will make React-Calendar return array with two dates regardless of returnValue setting.|`false`|`true`| -|showWeekNumbers|Whether week numbers shall be shown at the left of MonthView or not.|`false`|`true`| -|tileClassName|Class name(s) that will be applied to a given calendar item (day on month view, month on year view and so on).|n/a|
    • String: `"class1 class2"`
    • Array of strings: `["class1", "class2 class3"]`
    • Function: `({ activeStartDate, date, view }) => view === 'month' && date.getDay() === 3 ? 'wednesday' : null`
    | -|tileContent|Allows to render custom content within a given calendar item (day on month view, month on year view and so on).|n/a|
    • String: `"Sample"`
    • React element: ``
    • Function: `({ activeStartDate, date, view }) => view === 'month' && date.getDay() === 0 ?

      It's Sunday!

      : null`
    | -|tileDisabled|Pass a function to determine if a certain day should be displayed as disabled.|n/a|
    • Function: `({activeStartDate, date, view }) => date.getDay() === 0`
    | -|value|Calendar value. Can be either one value or an array of two values. If you wish to use React-Calendar in an uncontrolled way, use `defaultValue` instead.|n/a|
    • Date: `new Date()`
    • An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]`| -|view|Determines which calendar view shall be opened. Does not disable navigation. Can be `"month"`, `"year"`, `"decade"` or `"century"`. If you wish to use React-Calendar in an uncontrolled way, use `defaultView` instead.|The most detailed view allowed|`"year"`| +| Prop name | Description | Default value | Example values | +| ----------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| activeStartDate | The beginning of a period that shall be displayed. If you wish to use React-Calendar in an uncontrolled way, use `defaultActiveStartDate` instead. | (today) | `new Date(2017, 0, 1)` | +| allowPartialRange | Whether to call onChange with only partial result given `selectRange` prop. | `false` | `true` | +| calendarType | Type of calendar that should be used. Can be `"ISO 8601"`, `"US"`, `"Arabic"`, or `"Hebrew"`. Setting to `"US"` or `"Hebrew"` will change the first day of the week to Sunday. Setting to `"Arabic"` will change the first day of the week to Saturday. Setting to `"Arabic"` or `"Hebrew"` will make weekends appear on Friday to Saturday. | Type of calendar most commonly used in a given locale | `"ISO 8601"` | +| className | Class name(s) that will be added along with `"react-calendar"` to the main React-Calendar `
      ` element. | n/a |
      • String: `"class1 class2"`
      • Array of strings: `["class1", "class2 class3"]`
      | +| defaultActiveStartDate | The beginning of a period that shall be displayed by default. If you wish to use React-Calendar in a controlled way, use `activeStartDate` instead. | (today) | `new Date(2017, 0, 1)` | +| defaultValue | Calendar value that shall be selected initially. Can be either one value or an array of two values. If you wish to use React-Calendar in a controlled way, use `value` instead. | n/a |
      • Date: `new Date()`
      • An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]` | +| defaultView | Determines which calendar view shall be opened initially. Does not disable navigation. Can be `"month"`, `"year"`, `"decade"` or `"century"`. If you wish to use React-Calendar in a controlled way, use `view` instead. | The most detailed view allowed | `"year"` | +| formatDay | Function called to override default formatting of day tile labels. Can be used to use your own formatting function. | (default formatter) | `(locale, date) => formatDate(date, 'd')` | +| formatLongDate | Function called to override default formatting of day tile `abbr` labels. Can be used to use your own formatting function. | (default formatter) | `(locale, date) => formatDate(date, 'dd MMM YYYY')` | +| formatMonth | Function called to override default formatting of month names. Can be used to use your own formatting function. | (default formatter) | `(locale, date) => formatDate(date, 'MMM')` | +| formatMonthYear | Function called to override default formatting of months and years. Can be used to use your own formatting function. | (default formatter) | `(locale, date) => formatDate(date, 'MMMM YYYY')` | +| formatShortWeekday | Function called to override default formatting of weekday names. Can be used to use your own formatting function. | (default formatter) | `(locale, date) => formatDate(date, 'dd')` | +| formatYear | Function called to override default formatting of year in the top navigation section. Can be used to use your own formatting function. | (default formatter) | `(locale, date) => formatDate(date, 'YYYY')` | +| inputRef | A prop that behaves like [ref](https://reactjs.org/docs/refs-and-the-dom.html), but it's passed to main `
        ` rendered by `` component. | n/a |
        • Function:
          `(ref) => { this.myCalendar = ref; }`
        • Ref created using `React.createRef`:
          `this.ref = React.createRef();`

          `inputRef={this.ref}`
        • Ref created using `React.useRef`:
          `const ref = React.useRef();`

          `inputRef={ref}`
        | +| locale | Locale that should be used by the calendar. Can be any [IETF language tag](https://en.wikipedia.org/wiki/IETF_language_tag). | User's browser settings | `"hu-HU"` | +| maxDate | Maximum date that the user can select. Periods partially overlapped by maxDate will also be selectable, although React-Calendar will ensure that no later date is selected. | n/a | Date: `new Date()` | +| maxDetail | The most detailed view that the user shall see. View defined here also becomes the one on which clicking an item will select a date and pass it to onChange. Can be `"month"`, `"year"`, `"decade"` or `"century"`. | `"month"` | `"year"` | +| minDate | Minimum date that the user can select. Periods partially overlapped by minDate will also be selectable, although React-Calendar will ensure that no earlier date is selected. | n/a | Date: `new Date()` | +| minDetail | The least detailed view that the user shall see. Can be `"month"`, `"year"`, `"decade"` or `"century"`. | `"century"` | `"decade"` | +| navigationAriaLabel | `aria-label` attribute of a label rendered on calendar navigation bar. | n/a | `"Go up"` | +| navigationAriaLive | `aria-live` attribute of a label rendered on calendar navigation bar. | `undefined` | `"polite"` | +| navigationLabel | Content of a label rendered on calendar navigation bar. | (default label) | `` ({ date, label, locale, view }) => `Current view: ${view}, date: ${date.toLocaleDateString(locale)}` `` | +| nextAriaLabel | `aria-label` attribute of the "next" button on the navigation pane. | n/a | `"Next"` | +| nextLabel | Content of the "next" button on the navigation pane. Setting the value explicitly to null will hide the icon. | `"›"` |
        • String: `"›"`
        • React element: ``
        | +| next2AriaLabel | `aria-label` attribute of the "next on higher level" button on the navigation pane. | n/a | `"Jump forwards"` | +| next2Label | Content of the "next on higher level" button on the navigation pane. Setting the value explicitly to null will hide the icon. | `"»"` |
        • String: `"»"`
        • React element: ``
        | +| onActiveStartDateChange | Function called when the user navigates from one view to another using previous/next button. Note that this function will not be called when e.g. drilling up from January 2021 to 2021 or drilling down the other way around.
        `action` signifies the reason for active start date change and can be one of the following values: `"prev"`, `"prev2"`, `"next"`, `"next2"`, `"drillUp"`, `"drillDown"`, `"onChange"`. | n/a | `({ action, activeStartDate, value, view }) => alert('Changed view to: ', activeStartDate, view)` | +| onChange | Function called when the user clicks an item (day on month view, month on year view and so on) on the most detailed view available. | n/a | `(value, event) => alert('New date is: ', value)` | +| onViewChange | Function called when the user navigates from one view to another using drill up button or by clicking a tile.
        `action` signifies the reason for view change and can be one of the following values: `"prev"`, `"prev2"`, `"next"`, `"next2"`, `"drillUp"`, `"drillDown"`, `"onChange"`. | n/a | `({ action, activeStartDate, value, view }) => alert('New view is: ', view)` | +| onClickDay | Function called when the user clicks a day. | n/a | `(value, event) => alert('Clicked day: ', value)` | +| onClickDecade | Function called when the user clicks a decade. | n/a | `(value, event) => alert('Clicked decade: ', value)` | +| onClickMonth | Function called when the user clicks a month. | n/a | `(value, event) => alert('Clicked month: ', value)` | +| onClickWeekNumber | Function called when the user clicks a week number. | n/a | `(weekNumber, date, event) => alert('Clicked week: ', weekNumber, 'that starts on: ', date)` | +| onClickYear | Function called when the user clicks a year. | n/a | `(value, event) => alert('Clicked year: ', value)` | +| onDrillDown | Function called when the user drills down by clicking a tile. | n/a | `({ activeStartDate, view }) => alert('Drilled down to: ', activeStartDate, view)` | +| onDrillUp | Function called when the user drills up by clicking drill up button. | n/a | `({ activeStartDate, view }) => alert('Drilled up to: ', activeStartDate, view)` | +| prevAriaLabel | `aria-label` attribute of the "previous" button on the navigation pane. | n/a | `"Previous"` | +| prevLabel | Content of the "previous" button on the navigation pane. Setting the value explicitly to null will hide the icon. | `"‹"` |
        • String: `"‹"`
        • React element: ``
        | +| prev2AriaLabel | `aria-label` attribute of the "previous on higher level" button on the navigation pane. | n/a | `"Jump backwards"` | +| prev2Label | Content of the "previous on higher level" button on the navigation pane. Setting the value explicitly to null will hide the icon. | `"«"` |
        • String: `"«"`
        • React element: ``
        | +| returnValue | Which dates shall be passed by the calendar to the onChange function and onClick{Period} functions. Can be `"start"`, `"end"` or `"range"`. The latter will cause an array with start and end values to be passed. | `"start"` | `"range"` | +| showDoubleView | Whether to show two months/years/… at a time instead of one. Defaults `showFixedNumberOfWeeks` prop to be `true`. | `false` | `true` | +| showFixedNumberOfWeeks | Whether to always show fixed number of weeks (6). Forces `showNeighboringMonth` prop to be `true`. | `false` | `true` | +| showNavigation | Whether a navigation bar with arrows and title shall be rendered. | `true` | `false` | +| showNeighboringMonth | Whether days from previous or next month shall be rendered if the month doesn't start on the first day of the week or doesn't end on the last day of the week, respectively. | `true` | `false` | +| selectRange | Whether the user shall select two dates forming a range instead of just one. Note: This feature will make React-Calendar return array with two dates regardless of returnValue setting. | `false` | `true` | +| showWeekNumbers | Whether week numbers shall be shown at the left of MonthView or not. | `false` | `true` | +| tileClassName | Class name(s) that will be applied to a given calendar item (day on month view, month on year view and so on). | n/a |
        • String: `"class1 class2"`
        • Array of strings: `["class1", "class2 class3"]`
        • Function: `({ activeStartDate, date, view }) => view === 'month' && date.getDay() === 3 ? 'wednesday' : null`
        | +| tileContent | Allows to render custom content within a given calendar item (day on month view, month on year view and so on). | n/a |
        • String: `"Sample"`
        • React element: ``
        • Function: `({ activeStartDate, date, view }) => view === 'month' && date.getDay() === 0 ?

          It's Sunday!

          : null`
        | +| tileDisabled | Pass a function to determine if a certain day should be displayed as disabled. | n/a |
        • Function: `({activeStartDate, date, view }) => date.getDay() === 0`
        | +| value | Calendar value. Can be either one value or an array of two values. If you wish to use React-Calendar in an uncontrolled way, use `defaultValue` instead. | n/a |
        • Date: `new Date()`
        • An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]` | +| view | Determines which calendar view shall be opened. Does not disable navigation. Can be `"month"`, `"year"`, `"decade"` or `"century"`. If you wish to use React-Calendar in an uncontrolled way, use `defaultView` instead. | The most detailed view allowed | `"year"` | ### MonthView, YearView, DecadeView, CenturyView @@ -147,20 +145,20 @@ Displays a given month, year, decade and a century, respectively. #### Props -|Prop name|Description|Default value|Example values| -|----|----|----|----| -|activeStartDate|The beginning of a period that shall be displayed.|n/a|`new Date(2017, 0, 1)`| -|hover|The date over which the user is hovering. Used only when `selectRange` is enabled, to render a “WIP” range when the user is selecting range.|n/a|`new Date(2017, 0, 1)`| -|maxDate|Maximum date that the user can select. Periods partially overlapped by maxDate will also be selectable, although react-calendar will ensure that no later date is selected.|n/a|Date: `new Date()`| -|minDate|Minimum date that the user can select. Periods partially overlapped by minDate will also be selectable, although react-calendar will ensure that no earlier date is selected.|n/a|Date: `new Date()`| -|onClick|Function called when the user clicks an item (day on month view, month on year view and so on).|n/a|`(value) => alert('New date is: ', value)`| -|tileClassName|Class name(s) that will be applied to a given calendar item (day on month view, month on year view and so on).|n/a|
          • String: `"class1 class2"`
          • Array of strings: `["class1", "class2 class3"]`
          • Function: `({ date, view }) => view === 'month' && date.getDay() === 3 ? 'saturday' : null`
          | -|tileContent|Allows to render custom content within a given item (day on month view, month on year view and so on). Note: For tiles with custom content you might want to set fixed height of `react-calendar__tile` to ensure consistent layout.|n/a|`({ date, view }) => view === 'month' && date.getDay() === 0 ?

          It's Sunday!

          : null`| -|value|Calendar value. Can be either one value or an array of two values.|n/a|
          • Date: `new Date()`
          • An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]`
          • String: `2017-01-01`
          • An array of strings: `['2017-01-01', '2017-08-01']`
          | +| Prop name | Description | Default value | Example values | +| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| activeStartDate | The beginning of a period that shall be displayed. | n/a | `new Date(2017, 0, 1)` | +| hover | The date over which the user is hovering. Used only when `selectRange` is enabled, to render a “WIP” range when the user is selecting range. | n/a | `new Date(2017, 0, 1)` | +| maxDate | Maximum date that the user can select. Periods partially overlapped by maxDate will also be selectable, although react-calendar will ensure that no later date is selected. | n/a | Date: `new Date()` | +| minDate | Minimum date that the user can select. Periods partially overlapped by minDate will also be selectable, although react-calendar will ensure that no earlier date is selected. | n/a | Date: `new Date()` | +| onClick | Function called when the user clicks an item (day on month view, month on year view and so on). | n/a | `(value) => alert('New date is: ', value)` | +| tileClassName | Class name(s) that will be applied to a given calendar item (day on month view, month on year view and so on). | n/a |
          • String: `"class1 class2"`
          • Array of strings: `["class1", "class2 class3"]`
          • Function: `({ date, view }) => view === 'month' && date.getDay() === 3 ? 'saturday' : null`
          | +| tileContent | Allows to render custom content within a given item (day on month view, month on year view and so on). Note: For tiles with custom content you might want to set fixed height of `react-calendar__tile` to ensure consistent layout. | n/a | `({ date, view }) => view === 'month' && date.getDay() === 0 ?

          It's Sunday!

          : null` | +| value | Calendar value. Can be either one value or an array of two values. | n/a |
          • Date: `new Date()`
          • An array of dates: `[new Date(2017, 0, 1), new Date(2017, 7, 1)]`
          • String: `2017-01-01`
          • An array of strings: `['2017-01-01', '2017-08-01']`
          | ## Useful links -* [React-Calendar Wiki](https://github.com/wojtekmaj/react-calendar/wiki) +- [React-Calendar Wiki](https://github.com/wojtekmaj/react-calendar/wiki) ## License diff --git a/jest.config.json b/jest.config.json index 5a6cfbe6..429558d3 100644 --- a/jest.config.json +++ b/jest.config.json @@ -1,10 +1,5 @@ { - "collectCoverageFrom": [ - "**/src/**.{js,jsx}", - "!**/src/index.js" - ], - "setupFiles": [ - "/jest.setup.js" - ], + "collectCoverageFrom": ["**/src/**.{js,jsx}", "!**/src/index.js"], + "setupFiles": ["/jest.setup.js"], "testEnvironment": "jsdom" } diff --git a/package.json b/package.json index 374f401f..d3ef4a4f 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "copy-styles": "node ./copy-styles.js", "jest": "jest", "lint": "eslint sample/ src/ test/ --ext .jsx,.js", + "postinstall": "husky install", "prepack": "yarn clean && yarn build", "test": "yarn lint && yarn jest" }, @@ -77,12 +78,14 @@ "@babel/preset-env": "^7.15.0", "@babel/preset-react": "^7.14.0", "@wojtekmaj/enzyme-adapter-react-17": "^0.6.0", - "babel-eslint": "^10.0.0", "enzyme": "^3.10.0", - "eslint": "~7.19.0", - "eslint-config-wojtekmaj": "^0.5.0", + "eslint": "^8.5.0", + "eslint-config-wojtekmaj": "^0.6.5", + "husky": "^7.0.0", "jest": "^27.0.0", "less": "^4.0.0", + "prettier": "^2.5.0", + "pretty-quick": "^3.1.0", "react": "^17.0.0", "react-dom": "^17.0.0", "rimraf": "^3.0.0" diff --git a/sample/.babelrc b/sample/.babelrc index 070a188c..bdbb016b 100644 --- a/sample/.babelrc +++ b/sample/.babelrc @@ -1,8 +1,11 @@ { "presets": [ - ["@babel/preset-env", { - "modules": false - }], + [ + "@babel/preset-env", + { + "modules": false + } + ], "@babel/react" ] } diff --git a/sample/Sample.jsx b/sample/Sample.jsx index 1b3ecfc4..167cd5c0 100644 --- a/sample/Sample.jsx +++ b/sample/Sample.jsx @@ -13,11 +13,7 @@ export default function Sample() {
          - +
        diff --git a/sample/Sample.less b/sample/Sample.less index 0d9cb587..62a2865a 100644 --- a/sample/Sample.less +++ b/sample/Sample.less @@ -1,6 +1,6 @@ html, body { - height: 100%; + height: 100%; } body { @@ -9,13 +9,14 @@ body { } .Sample { - input, button { + input, + button { font: inherit; } header { background-color: rgb(50, 54, 57); - box-shadow: 0 0 8px rgba(0, 0, 0, .5); + box-shadow: 0 0 8px rgba(0, 0, 0, 0.5); padding: 20px; color: white; @@ -53,4 +54,4 @@ body { } } } -} \ No newline at end of file +} diff --git a/sample/index.html b/sample/index.html index 77f455de..ca244c2e 100644 --- a/sample/index.html +++ b/sample/index.html @@ -2,7 +2,7 @@ - + react-calendar sample page diff --git a/sample/webpack.config.js b/sample/webpack.config.js index 3480039e..ada71426 100644 --- a/sample/webpack.config.js +++ b/sample/webpack.config.js @@ -21,24 +21,15 @@ module.exports = { rules: [ { test: /\.jsx?$/, - use: [ - 'babel-loader', - ], + use: ['babel-loader'], }, { test: /\.less$/, - use: [ - 'style-loader', - 'css-loader', - 'less-loader', - ], + use: ['style-loader', 'css-loader', 'less-loader'], }, { test: /\.css$/, - use: [ - 'style-loader', - 'css-loader', - ], + use: ['style-loader', 'css-loader'], }, ], }, diff --git a/src/Calendar.jsx b/src/Calendar.jsx index adf7be3b..3e1f53df 100644 --- a/src/Calendar.jsx +++ b/src/Calendar.jsx @@ -8,11 +8,15 @@ import DecadeView from './DecadeView'; import YearView from './YearView'; import MonthView from './MonthView'; +import { getBegin, getBeginNext, getEnd, getValueRange } from './shared/dates'; import { - getBegin, getBeginNext, getEnd, getValueRange, -} from './shared/dates'; -import { - isCalendarType, isClassName, isMaxDate, isMinDate, isRef, isValue, isView, + isCalendarType, + isClassName, + isMaxDate, + isMinDate, + isRef, + isValue, + isView, } from './shared/propTypes'; import { between } from './shared/utils'; @@ -88,9 +92,7 @@ function getValue(value, index) { return valueDate; } -function getDetailValue({ - value, minDate, maxDate, maxDetail, -}, index) { +function getDetailValue({ value, minDate, maxDate, maxDetail }, index) { const valuePiece = getValue(value, index); if (!valuePiece) { @@ -118,22 +120,16 @@ const getDetailValueArray = (args) => { }; function getActiveStartDate(props) { - const { - maxDate, - maxDetail, - minDate, - minDetail, - value, - view, - } = props; + const { maxDate, maxDetail, minDate, minDetail, value, view } = props; const rangeType = getView(view, minDetail, maxDetail); - const valueFrom = ( + const valueFrom = getDetailValueFrom({ - value, minDate, maxDate, maxDetail, - }) - || new Date() - ); + value, + minDate, + maxDate, + maxDetail, + }) || new Date(); return getBegin(rangeType, valueFrom); } @@ -171,11 +167,9 @@ const getIsSingleValue = (value) => value && [].concat(value).length === 1; export default class Calendar extends Component { state = { - /* eslint-disable react/destructuring-assignment */ activeStartDate: this.props.defaultActiveStartDate, value: this.props.defaultValue, view: this.props.defaultView, - /* eslint-enable react/destructuring-assignment */ }; get activeStartDate() { @@ -239,37 +233,34 @@ export default class Calendar extends Component { * Gets current value in a desired format. */ getProcessedValue(value) { - const { - minDate, maxDate, maxDetail, returnValue, - } = this.props; + const { minDate, maxDate, maxDetail, returnValue } = this.props; const processFunction = (() => { switch (returnValue) { - case 'start': return getDetailValueFrom; - case 'end': return getDetailValueTo; - case 'range': return getDetailValueArray; - default: throw new Error('Invalid returnValue.'); + case 'start': + return getDetailValueFrom; + case 'end': + return getDetailValueTo; + case 'range': + return getDetailValueArray; + default: + throw new Error('Invalid returnValue.'); } })(); return processFunction({ - value, minDate, maxDate, maxDetail, + value, + minDate, + maxDate, + maxDetail, }); } setStateAndCallCallbacks = (nextState, event, callback) => { - const { - activeStartDate: previousActiveStartDate, - view: previousView, - } = this; + const { activeStartDate: previousActiveStartDate, view: previousView } = this; - const { - allowPartialRange, - onActiveStartDateChange, - onChange, - onViewChange, - selectRange, - } = this.props; + const { allowPartialRange, onActiveStartDateChange, onChange, onViewChange, selectRange } = + this.props; const prevArgs = { activeStartDate: previousActiveStartDate, @@ -287,17 +278,13 @@ export default class Calendar extends Component { function shouldUpdate(key) { return ( // Key must exist, and… - key in nextState - && ( - // …key changed from undefined to defined or the other way around, or… - typeof nextState[key] !== typeof prevArgs[key] + key in nextState && + // …key changed from undefined to defined or the other way around, or… + (typeof nextState[key] !== typeof prevArgs[key] || // …value changed. - || ( - nextState[key] instanceof Date - ? nextState[key].getTime() !== prevArgs[key].getTime() - : nextState[key] !== prevArgs[key] - ) - ) + (nextState[key] instanceof Date + ? nextState[key].getTime() !== prevArgs[key].getTime() + : nextState[key] !== prevArgs[key])) ); } @@ -327,7 +314,7 @@ export default class Calendar extends Component { if (callback) callback(args); }); - } + }; /** * Called when the user uses navigation buttons. @@ -337,7 +324,7 @@ export default class Calendar extends Component { action, activeStartDate: nextActiveStartDate, }); - } + }; drillDown = (nextActiveStartDate, event) => { if (!this.drillDownAvailable) { @@ -351,12 +338,16 @@ export default class Calendar extends Component { const nextView = views[views.indexOf(view) + 1]; - this.setStateAndCallCallbacks({ - action: 'drillDown', - activeStartDate: nextActiveStartDate, - view: nextView, - }, undefined, onDrillDown); - } + this.setStateAndCallCallbacks( + { + action: 'drillDown', + activeStartDate: nextActiveStartDate, + view: nextView, + }, + undefined, + onDrillDown, + ); + }; drillUp = () => { if (!this.drillUpAvailable) { @@ -369,12 +360,16 @@ export default class Calendar extends Component { const nextView = views[views.indexOf(view) - 1]; const nextActiveStartDate = getBegin(nextView, activeStartDate); - this.setStateAndCallCallbacks({ - action: 'drillUp', - activeStartDate: nextActiveStartDate, - view: nextView, - }, undefined, onDrillUp); - } + this.setStateAndCallCallbacks( + { + action: 'drillUp', + activeStartDate: nextActiveStartDate, + view: nextView, + }, + undefined, + onDrillUp, + ); + }; onChange = (value, event) => { const { selectRange } = this.props; @@ -405,21 +400,19 @@ export default class Calendar extends Component { event.persist(); - this.setStateAndCallCallbacks({ - action: 'onChange', - activeStartDate: nextActiveStartDate, - value: nextValue, - }, event); - } + this.setStateAndCallCallbacks( + { + action: 'onChange', + activeStartDate: nextActiveStartDate, + value: nextValue, + }, + event, + ); + }; onClickTile = (value, event) => { const { view } = this; - const { - onClickDay, - onClickDecade, - onClickMonth, - onClickYear, - } = this.props; + const { onClickDay, onClickDecade, onClickMonth, onClickYear } = this.props; const callback = (() => { switch (view) { @@ -437,30 +430,24 @@ export default class Calendar extends Component { })(); if (callback) callback(value, event); - } + }; onMouseOver = (value) => { this.setState((prevState) => { - if (prevState.hover && (prevState.hover.getTime() === value.getTime())) { + if (prevState.hover && prevState.hover.getTime() === value.getTime()) { return null; } return { hover: value }; }); - } + }; onMouseLeave = () => { this.setState({ hover: null }); - } + }; renderContent(next) { - const { - activeStartDate: currentActiveStartDate, - onMouseOver, - valueType, - value, - view, - } = this; + const { activeStartDate: currentActiveStartDate, onMouseOver, valueType, value, view } = this; const { calendarType, locale, @@ -473,11 +460,9 @@ export default class Calendar extends Component { } = this.props; const { hover } = this; - const activeStartDate = ( - next - ? getBeginNext(view, currentActiveStartDate) - : getBegin(view, currentActiveStartDate) - ); + const activeStartDate = next + ? getBeginNext(view, currentActiveStartDate) + : getBegin(view, currentActiveStartDate); const onClick = this.drillDownAvailable ? this.drillDown : this.onChange; @@ -500,32 +485,18 @@ export default class Calendar extends Component { case 'century': { const { formatYear } = this.props; - return ( - - ); + return ; } case 'decade': { const { formatYear } = this.props; - return ( - - ); + return ; } case 'year': { const { formatMonth, formatMonthYear } = this.props; return ( - + ); } case 'month': { @@ -549,7 +520,11 @@ export default class Calendar extends Component { formatShortWeekday={formatShortWeekday} onClickWeekNumber={onClickWeekNumber} onMouseLeave={selectRange ? onMouseLeave : null} - showFixedNumberOfWeeks={typeof showFixedNumberOfWeeks !== 'undefined' ? showFixedNumberOfWeeks : showDoubleView} + showFixedNumberOfWeeks={ + typeof showFixedNumberOfWeeks !== 'undefined' + ? showFixedNumberOfWeeks + : showDoubleView + } showNeighboringMonth={showNeighboringMonth} showWeekNumbers={showWeekNumbers} {...commonProps} @@ -618,12 +593,7 @@ export default class Calendar extends Component { } render() { - const { - className, - inputRef, - selectRange, - showDoubleView, - } = this.props; + const { className, inputRef, selectRange, showDoubleView } = this.props; const { onMouseLeave, value } = this; const valueArray = [].concat(value); @@ -662,10 +632,7 @@ Calendar.defaultProps = { }; const isActiveStartDate = PropTypes.instanceOf(Date); -const isLooseValue = PropTypes.oneOfType([ - PropTypes.string, - isValue, -]); +const isLooseValue = PropTypes.oneOfType([PropTypes.string, isValue]); Calendar.propTypes = { activeStartDate: isActiveStartDate, @@ -715,14 +682,8 @@ Calendar.propTypes = { showNavigation: PropTypes.bool, showNeighboringMonth: PropTypes.bool, showWeekNumbers: PropTypes.bool, - tileClassName: PropTypes.oneOfType([ - PropTypes.func, - isClassName, - ]), - tileContent: PropTypes.oneOfType([ - PropTypes.func, - PropTypes.node, - ]), + tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]), + tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), tileDisabled: PropTypes.func, value: isLooseValue, view: isView, diff --git a/src/Calendar.less b/src/Calendar.less index b3cb5ffa..dfb5e4d8 100644 --- a/src/Calendar.less +++ b/src/Calendar.less @@ -11,16 +11,19 @@ .react-calendar__viewContainer { display: flex; - margin: -.5em; + margin: -0.5em; > * { width: 50%; - margin: .5em; + margin: 0.5em; } } } - &, & *, & *:before, & *:after { + &, + & *, + & *:before, + & *:after { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; @@ -52,7 +55,8 @@ } &:enabled { - &:hover, &:focus { + &:hover, + &:focus { background-color: rgb(230, 230, 230); } } @@ -64,10 +68,10 @@ text-align: center; text-transform: uppercase; font-weight: bold; - font-size: .75em; + font-size: 0.75em; &__weekday { - padding: .5em; + padding: 0.5em; } } @@ -76,7 +80,7 @@ display: flex; align-items: center; justify-content: center; - font-size: .75em; + font-size: 0.75em; font-weight: bold; } } @@ -88,7 +92,7 @@ } &--neighboringMonth { - color: rgb(117, 117, 117) + color: rgb(117, 117, 117); } } } @@ -98,7 +102,7 @@ &__decade-view, &__century-view { .react-calendar__tile { - padding: 2em .5em; + padding: 2em 0.5em; } } @@ -114,7 +118,8 @@ } &:enabled { - &:hover, &:focus { + &:hover, + &:focus { background-color: rgb(230, 230, 230); } } @@ -124,7 +129,8 @@ background: @bgcolor; &:enabled { - &:hover, &:focus { + &:hover, + &:focus { background: lighten(@bgcolor, 10%); } } @@ -135,7 +141,8 @@ background: @bgcolor; &:enabled { - &:hover, &:focus { + &:hover, + &:focus { background: lighten(@bgcolor, 10%); } } @@ -147,7 +154,8 @@ color: white; &:enabled { - &:hover, &:focus { + &:hover, + &:focus { background: lighten(@bgcolor, 10%); } } diff --git a/src/Calendar.spec.jsx b/src/Calendar.spec.jsx index 1d3fe664..07082096 100644 --- a/src/Calendar.spec.jsx +++ b/src/Calendar.spec.jsx @@ -4,7 +4,11 @@ import { getMonthStart } from '@wojtekmaj/date-utils'; import Calendar from './Calendar'; -const { format } = new Intl.DateTimeFormat('en-US', { day: 'numeric', month: 'long', year: 'numeric' }); +const { format } = new Intl.DateTimeFormat('en-US', { + day: 'numeric', + month: 'long', + year: 'numeric', +}); const event = document.createEvent('MouseEvent'); event.initEvent('click', true, true); @@ -14,9 +18,7 @@ describe('Calendar', () => { it('applies className to its wrapper when given a string', () => { const className = 'testClassName'; - const component = shallow( - , - ); + const component = shallow(); const wrapperClassName = component.find('.react-calendar').prop('className'); @@ -26,18 +28,14 @@ describe('Calendar', () => { it('passes container element to inputRef properly', () => { const inputRef = jest.fn(); - mount( - , - ); + mount(); expect(inputRef).toHaveBeenCalled(); expect(inputRef.mock.calls[0][0]).toBeInstanceOf(HTMLElement); }); it('renders Navigation by default', () => { - const component = shallow( - , - ); + const component = shallow(); const navigation = component.find('Navigation'); @@ -45,9 +43,7 @@ describe('Calendar', () => { }); it('does not render Navigation when showNavigation flag is set to false', () => { - const component = shallow( - , - ); + const component = shallow(); const navigation = component.find('Navigation'); @@ -55,49 +51,37 @@ describe('Calendar', () => { }); it('uses given value when passed value using value prop', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.instance().value).toEqual(new Date(2019, 0, 1)); }); it('uses given value when passed value using defaultValue prop', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.instance().value).toEqual(new Date(2019, 0, 1)); }); it('renders given view when passed view using view prop', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.instance().view).toBe('century'); }); it('renders given view when passed view using defaultView prop', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.instance().view).toBe('century'); }); it('renders given active start date when passed active start date using activeStartDate prop', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.instance().activeStartDate).toEqual(new Date(2019, 0, 1)); }); it('renders given active start date when passed active start date using activeStartDate prop', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.instance().activeStartDate).toEqual(new Date(2019, 0, 1)); }); @@ -107,9 +91,7 @@ describe('Calendar', () => { const newValue = new Date(2018, 0, 15); const newActiveStartDate = new Date(2018, 0, 1); - const component = shallow( - , - ); + const component = shallow(); component.setProps({ value: newValue }); @@ -121,9 +103,7 @@ describe('Calendar', () => { const newValue = new Date(2018, 0, 15); const newActiveStartDate = new Date(2018, 0, 1); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(newValue, event); @@ -133,9 +113,7 @@ describe('Calendar', () => { it('changes Calendar view given new activeStartDate value', () => { const activeStartDate = new Date(2017, 0, 1); const newActiveStartDate = new Date(2018, 0, 1); - const component = shallow( - , - ); + const component = shallow(); component.setProps({ activeStartDate: newActiveStartDate }); @@ -144,9 +122,7 @@ describe('Calendar', () => { describe('renders views properly', () => { it('renders MonthView by default', () => { - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -154,9 +130,7 @@ describe('Calendar', () => { }); it('renders MonthView when given view = "month"', () => { - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -164,9 +138,7 @@ describe('Calendar', () => { }); it('renders YearView when given view = "year"', () => { - const component = shallow( - , - ); + const component = shallow(); const yearView = component.find('YearView'); @@ -174,9 +146,7 @@ describe('Calendar', () => { }); it('renders DecadeView when given view = "decade"', () => { - const component = shallow( - , - ); + const component = shallow(); const decadeView = component.find('DecadeView'); @@ -184,9 +154,7 @@ describe('Calendar', () => { }); it('renders CenturyView when given view = "century"', () => { - const component = shallow( - , - ); + const component = shallow(); const centuryView = component.find('CenturyView'); @@ -194,9 +162,7 @@ describe('Calendar', () => { }); it('renders maximum allowed view when given maxDetail', () => { - const component = shallow( - , - ); + const component = shallow(); const yearView = component.find('YearView'); @@ -204,12 +170,7 @@ describe('Calendar', () => { }); it('renders maximum allowed view when given view that is not allowed', () => { - const component = shallow( - , - ); + const component = shallow(); const yearView = component.find('YearView'); @@ -217,12 +178,7 @@ describe('Calendar', () => { }); it('renders maximum allowed view when attempting to externally switch to a view that is not allowed', () => { - const component = shallow( - , - ); + const component = shallow(); component.setProps({ view: 'month' }); @@ -232,12 +188,7 @@ describe('Calendar', () => { }); it('renders maximum allowed view when given changed maxDetail', () => { - const component = shallow( - , - ); + const component = shallow(); component.setProps({ maxDetail: 'year' }); component.update(); @@ -249,11 +200,7 @@ describe('Calendar', () => { }); it('does not pass showWeekNumbers flag to MonthView component by default', () => { - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -261,12 +208,7 @@ describe('Calendar', () => { }); it('passes showWeekNumbers flag to MonthView component given showWeekNumbers flag', () => { - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -274,12 +216,7 @@ describe('Calendar', () => { }); it('passes showNeighboringMonth flag to MonthView component given showNeighboringMonth flag', () => { - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -289,11 +226,7 @@ describe('Calendar', () => { describe('displays initial view properly', () => { it('displays a view with a given value when defaultValue is given', () => { const defaultValue = new Date(2017, 0, 15); - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -302,11 +235,7 @@ describe('Calendar', () => { it('displays a view with a given value when value is given', () => { const value = new Date(2017, 0, 15); - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -317,10 +246,7 @@ describe('Calendar', () => { const defaultActiveStartDate = new Date(2017, 0, 1); const value = new Date(2018, 0, 15); const component = shallow( - , + , ); const monthView = component.find('MonthView'); @@ -330,11 +256,7 @@ describe('Calendar', () => { it('displays a view with defaultActiveStartDate when no value is given and defaultActiveStartDate is given', () => { const defaultActiveStartDate = new Date(2017, 0, 1); - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -343,23 +265,17 @@ describe('Calendar', () => { it('displays a view with activeStartDate when no value is given and activeStartDate is given', () => { const activeStartDate = new Date(2017, 0, 1); - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); expect(monthView.prop('activeStartDate')).toEqual(activeStartDate); }); - it('displays a view with today\'s date when no value and no activeStartDate is given', () => { + it("displays a view with today's date when no value and no activeStartDate is given", () => { const today = new Date(); const beginOfCurrentMonth = getMonthStart(today); - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -368,9 +284,7 @@ describe('Calendar', () => { it('displays days on the correct weekdays when given a defaultActiveStartDate', () => { const defaultActiveStartDate = new Date(2012, 5, 6); - const component = mount( - , - ); + const component = mount(); const firstDayTile = component.find('.react-calendar__tile').first(); const firstDayTileTimeAbbr = firstDayTile.find('abbr').prop('aria-label'); @@ -381,9 +295,7 @@ describe('Calendar', () => { it('displays days on the correct weekdays when given an activeStartDate', () => { const activeStartDate = new Date(2012, 5, 6); - const component = mount( - , - ); + const component = mount(); const firstDayTile = component.find('.react-calendar__tile').first(); const firstDayTileTimeAbbr = firstDayTile.find('abbr').prop('aria-label'); @@ -395,9 +307,7 @@ describe('Calendar', () => { describe('handles drill up properly', () => { it('drills up when allowed', () => { - const component = shallow( - , - ); + const component = shallow(); component.setState({ view: 'month' }); @@ -410,11 +320,7 @@ describe('Calendar', () => { const onDrillUp = jest.fn(); const component = shallow( - , + , ); component.instance().drillUp(); @@ -430,10 +336,7 @@ describe('Calendar', () => { const onDrillUp = jest.fn(); const component = shallow( - , + , ); component.setState({ view: 'month' }); @@ -450,12 +353,7 @@ describe('Calendar', () => { it('refuses to drill up when already on minimum allowed detail', () => { const onDrillUp = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().drillUp(); @@ -465,9 +363,7 @@ describe('Calendar', () => { describe('handles drill down properly', () => { it('drills down when allowed', () => { - const component = shallow( - , - ); + const component = shallow(); component.setState({ view: 'century' }); @@ -500,10 +396,7 @@ describe('Calendar', () => { const onDrillDown = jest.fn(); const component = shallow( - , + , ); component.setState({ view: 'century' }); @@ -520,12 +413,7 @@ describe('Calendar', () => { it('refuses to drill down when already on minimum allowed detail', () => { const onDrillDown = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().drillUp(); @@ -535,9 +423,7 @@ describe('Calendar', () => { describe('handles active start date change properly', () => { it('changes active start date when allowed', () => { - const component = shallow( - , - ); + const component = shallow(); component.instance().setActiveStartDate(new Date(2019, 0, 1)); @@ -549,11 +435,7 @@ describe('Calendar', () => { const newActiveStartDate = new Date(2018, 0, 1); const onActiveStartDateChange = jest.fn(); const component = shallow( - , + , ); component.instance().setActiveStartDate(newActiveStartDate); @@ -610,11 +492,7 @@ describe('Calendar', () => { const newActiveStartDate = new Date(2017, 0, 1); const onActiveStartDateChange = jest.fn(); const component = shallow( - , + , ); component.instance().setActiveStartDate(newActiveStartDate); @@ -630,11 +508,7 @@ describe('Calendar', () => { const newView = 'year'; const onViewChange = jest.fn(); const component = shallow( - , + , ); component.instance().setStateAndCallCallbacks({ view: newView }); @@ -674,12 +548,7 @@ describe('Calendar', () => { const view = 'year'; const newView = 'year'; const onViewChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().setStateAndCallCallbacks({ view: newView }); @@ -690,12 +559,7 @@ describe('Calendar', () => { describe('calls onChange properly', () => { it('calls onChange function returning the beginning of selected period by default', () => { const onChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(new Date(2017, 0, 1), event); @@ -704,13 +568,7 @@ describe('Calendar', () => { it('calls onChange function returning the beginning of the selected period when returnValue is set to "start"', () => { const onChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(new Date(2017, 0, 1), event); @@ -719,13 +577,7 @@ describe('Calendar', () => { it('calls onChange function returning the end of the selected period when returnValue is set to "end"', () => { const onChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(new Date(2017, 0, 1), event); @@ -734,20 +586,14 @@ describe('Calendar', () => { it('calls onChange function returning the beginning of selected period when returnValue is set to "range"', () => { const onChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(new Date(2017, 0, 1), event); - expect(onChange).toHaveBeenCalledWith([ - new Date(2017, 0, 1), - new Date(2017, 0, 1, 23, 59, 59, 999), - ], event); + expect(onChange).toHaveBeenCalledWith( + [new Date(2017, 0, 1), new Date(2017, 0, 1, 23, 59, 59, 999)], + event, + ); }); it('calls onChange function returning the beginning of selected period, but no earlier than minDate', () => { @@ -816,13 +662,7 @@ describe('Calendar', () => { it('does not call onChange function returning a range when selected one piece of a range by default', () => { const onChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(new Date(2018, 0, 1), event); @@ -832,12 +672,7 @@ describe('Calendar', () => { it('does not call onChange function returning a range when selected one piece of a range given allowPartialRange = false', () => { const onChange = jest.fn(); const component = shallow( - , + , ); component.instance().onChange(new Date(2018, 0, 1), event); @@ -848,70 +683,47 @@ describe('Calendar', () => { it('calls onChange function returning a partial range when selected one piece of a range given allowPartialRange = true', () => { const onChange = jest.fn(); const component = shallow( - , + , ); component.instance().onChange(new Date(2018, 0, 1), event); expect(onChange).toHaveBeenCalledTimes(1); - expect(onChange).toHaveBeenCalledWith([ - new Date(2018, 0, 1), - ], event); + expect(onChange).toHaveBeenCalledWith([new Date(2018, 0, 1)], event); }); it('calls onChange function returning a range when selected two pieces of a range', () => { const onChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(new Date(2018, 0, 1), event); component.instance().onChange(new Date(2018, 6, 1), event); expect(onChange).toHaveBeenCalledTimes(1); - expect(onChange).toHaveBeenCalledWith([ - new Date(2018, 0, 1), - new Date(2018, 6, 1, 23, 59, 59, 999), - ], event); + expect(onChange).toHaveBeenCalledWith( + [new Date(2018, 0, 1), new Date(2018, 6, 1, 23, 59, 59, 999)], + event, + ); }); it('calls onChange function returning a range when selected reversed two pieces of a range', () => { const onChange = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); component.instance().onChange(new Date(2018, 6, 1), event); component.instance().onChange(new Date(2018, 0, 1), event); expect(onChange).toHaveBeenCalledTimes(1); - expect(onChange).toHaveBeenCalledWith([ - new Date(2018, 0, 1), - new Date(2018, 6, 1, 23, 59, 59, 999), - ], event); + expect(onChange).toHaveBeenCalledWith( + [new Date(2018, 0, 1), new Date(2018, 6, 1, 23, 59, 59, 999)], + event, + ); }); }); it('passes formatMonthYear to Navigation component', () => { const formatMonthYear = () => 'Month year'; - const component = shallow( - , - ); + const component = shallow(); const navigation = component.find('Navigation'); @@ -920,11 +732,7 @@ describe('Calendar', () => { it('passes formatYear to Navigation component', () => { const formatYear = () => 'Year'; - const component = shallow( - , - ); + const component = shallow(); const navigation = component.find('Navigation'); @@ -933,11 +741,7 @@ describe('Calendar', () => { it('passes formatDay to MonthView component', () => { const formatDay = () => 'Day'; - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -946,11 +750,7 @@ describe('Calendar', () => { it('passes formatLongDate to MonthView component', () => { const formatLongDate = () => 'Long date'; - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -959,11 +759,7 @@ describe('Calendar', () => { it('passes formatShortWeekday to MonthView component', () => { const formatShortWeekday = () => 'Weekday'; - const component = shallow( - , - ); + const component = shallow(); const monthView = component.find('MonthView'); @@ -972,12 +768,7 @@ describe('Calendar', () => { it('passes formatMonth to YearView component', () => { const formatMonth = () => 'Month'; - const component = shallow( - , - ); + const component = shallow(); const yearView = component.find('YearView'); @@ -986,12 +777,7 @@ describe('Calendar', () => { it('passes formatYear to DecadeView component', () => { const formatYear = () => 'Year'; - const component = shallow( - , - ); + const component = shallow(); const decadeView = component.find('DecadeView'); @@ -1000,12 +786,7 @@ describe('Calendar', () => { it('passes formatYear to CenturyView component', () => { const formatYear = () => 'Year'; - const component = shallow( - , - ); + const component = shallow(); const centuryView = component.find('CenturyView'); diff --git a/src/Calendar/Navigation.jsx b/src/Calendar/Navigation.jsx index bface35d..db118293 100644 --- a/src/Calendar/Navigation.jsx +++ b/src/Calendar/Navigation.jsx @@ -48,10 +48,8 @@ export default function Navigation({ const shouldShowPrevNext2Buttons = view !== 'century'; const previousActiveStartDate = getBeginPrevious(view, activeStartDate); - const previousActiveStartDate2 = ( - shouldShowPrevNext2Buttons - && getBeginPrevious2(view, activeStartDate) - ); + const previousActiveStartDate2 = + shouldShowPrevNext2Buttons && getBeginPrevious2(view, activeStartDate); const nextActiveStartDate = getBeginNext(view, activeStartDate); const nextActiveStartDate2 = shouldShowPrevNext2Buttons && getBeginNext2(view, activeStartDate); @@ -63,21 +61,20 @@ export default function Navigation({ return minDate && minDate >= previousActiveEndDate; })(); - const prev2ButtonDisabled = shouldShowPrevNext2Buttons && (() => { - if (previousActiveStartDate2.getFullYear() < 0) { - return true; - } - const previousActiveEndDate = getEndPrevious2(view, activeStartDate); - return minDate && minDate >= previousActiveEndDate; - })(); + const prev2ButtonDisabled = + shouldShowPrevNext2Buttons && + (() => { + if (previousActiveStartDate2.getFullYear() < 0) { + return true; + } + const previousActiveEndDate = getEndPrevious2(view, activeStartDate); + return minDate && minDate >= previousActiveEndDate; + })(); const nextButtonDisabled = maxDate && maxDate < nextActiveStartDate; - const next2ButtonDisabled = ( - shouldShowPrevNext2Buttons - && maxDate - && maxDate < nextActiveStartDate2 - ); + const next2ButtonDisabled = + shouldShowPrevNext2Buttons && maxDate && maxDate < nextActiveStartDate2; function onClickPrevious() { setActiveStartDate(previousActiveStartDate, 'prev'); @@ -111,16 +108,14 @@ export default function Navigation({ } })(); - return ( - navigationLabel - ? navigationLabel({ + return navigationLabel + ? navigationLabel({ date, label, locale: locale || getUserLocale(), view, }) - : label - ); + : label; } function renderButton() { @@ -140,11 +135,7 @@ export default function Navigation({ {showDoubleView && ( <> - - {' '} - – - {' '} - + {renderLabel(nextActiveStartDate)} diff --git a/src/Calendar/Navigation.spec.jsx b/src/Calendar/Navigation.spec.jsx index 0013778b..5ef0f1f0 100644 --- a/src/Calendar/Navigation.spec.jsx +++ b/src/Calendar/Navigation.spec.jsx @@ -14,12 +14,7 @@ describe('Navigation', () => { }; it('renders prev2, prev, drill up, next and next2 buttons', () => { - const component = shallow( - , - ); + const component = shallow(); const children = component.children(); @@ -34,12 +29,7 @@ describe('Navigation', () => { }); it('renders prev, drill up, next and buttons only for century view', () => { - const component = shallow( - , - ); + const component = shallow(); const children = component.children(); @@ -52,12 +42,7 @@ describe('Navigation', () => { }); it('displays proper title for month view', () => { - const component = shallow( - , - ); + const component = shallow(); const drillUp = component.find('.react-calendar__navigation__label'); @@ -65,12 +50,7 @@ describe('Navigation', () => { }); it('displays proper title for year view', () => { - const component = shallow( - , - ); + const component = shallow(); const drillUp = component.find('.react-calendar__navigation__label'); @@ -78,12 +58,7 @@ describe('Navigation', () => { }); it('displays proper title for decade view', () => { - const component = shallow( - , - ); + const component = shallow(); const drillUp = component.find('.react-calendar__navigation__label'); @@ -91,12 +66,7 @@ describe('Navigation', () => { }); it('displays proper title for century view', () => { - const component = shallow( - , - ); + const component = shallow(); const drillUp = component.find('.react-calendar__navigation__label'); @@ -104,13 +74,7 @@ describe('Navigation', () => { }); it('displays proper title for month view given showDouble flags is set to true', () => { - const component = shallow( - , - ); + const component = shallow(); const drillUp = component.find('.react-calendar__navigation__label'); @@ -139,11 +103,7 @@ describe('Navigation', () => { it('uses proper user-defined ARIA live on navigation button', () => { const component = shallow( - , + , ); const [, , navigation] = component.children(); @@ -175,13 +135,7 @@ describe('Navigation', () => { it('calls drillUp function on drill up button click', () => { const drillUpFn = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button.react-calendar__navigation__label'); @@ -193,11 +147,7 @@ describe('Navigation', () => { it('calls setActiveStartDate on prev2, prev, next and next2 buttons click', () => { const setActiveStartDateFn = jest.fn(); const component = shallow( - , + , ); const arrows = component.find('button.react-calendar__navigation__arrow'); @@ -218,11 +168,7 @@ describe('Navigation', () => { const monthSetActiveStartDateFn = jest.fn(); const monthViewComponent = shallow( - , + , ); const monthViewArrows = monthViewComponent.find('button.react-calendar__navigation__arrow'); @@ -262,11 +208,7 @@ describe('Navigation', () => { const yearSetActiveStartDateFn = jest.fn(); const yearViewComponent = shallow( - , + , ); const yearViewArrows = yearViewComponent.find('button.react-calendar__navigation__arrow'); @@ -306,11 +248,7 @@ describe('Navigation', () => { const decadeSetActiveStartDateFn = jest.fn(); const decadeViewComponent = shallow( - , + , ); const decadeViewArrows = decadeViewComponent.find('button.react-calendar__navigation__arrow'); @@ -376,12 +314,7 @@ describe('Navigation', () => { }); it('correctly marks drillUp button as disabled when already on top allowed view', () => { - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button.react-calendar__navigation__label'); @@ -390,11 +323,7 @@ describe('Navigation', () => { it('disallows navigating before minDate', () => { const component = shallow( - , + , ); const arrows = component.find('button.react-calendar__navigation__arrow'); @@ -407,12 +336,7 @@ describe('Navigation', () => { }); it('disallows navigating before dynamically set minDate', () => { - const component = shallow( - , - ); + const component = shallow(); component.setProps({ minDate: new Date(2017, 0, 1), @@ -429,11 +353,7 @@ describe('Navigation', () => { it('disallows navigating after maxDate', () => { const component = shallow( - , + , ); const arrows = component.find('button.react-calendar__navigation__arrow'); @@ -447,11 +367,7 @@ describe('Navigation', () => { it('does not disallow navigating to next month when maxDate is set to first day of the next month', () => { const component = shallow( - , + , ); const arrows = component.find('button.react-calendar__navigation__arrow'); @@ -465,11 +381,7 @@ describe('Navigation', () => { it('does not disallow navigating to next year when maxDate is set to first day of the next year', () => { const component = shallow( - , + , ); const arrows = component.find('button.react-calendar__navigation__arrow'); @@ -482,12 +394,7 @@ describe('Navigation', () => { }); it('disallows navigating after dynamically set maxDate', () => { - const component = shallow( - , - ); + const component = shallow(); component.setProps({ maxDate: new Date(2017, 0, 31), @@ -507,11 +414,7 @@ describe('Navigation', () => { activeStartDate.setFullYear(0, 0, 1); const component = shallow( - , + , ); const arrows = component.find('button.react-calendar__navigation__arrow'); @@ -555,11 +458,7 @@ describe('Navigation', () => { describe('formats navigation label properly', () => { it('displays calendar with custom month year navigation label', () => { const component = shallow( - 'MonthYear'} - view="month" - />, + 'MonthYear'} view="month" />, ); const navigationLabel = component.find('.react-calendar__navigation__label').first(); @@ -569,11 +468,7 @@ describe('Navigation', () => { it('displays calendar with custom year navigation label', () => { const component = shallow( - 'Year'} - view="year" - />, + 'Year'} view="year" />, ); const navigationLabel = component.find('.react-calendar__navigation__label').first(); @@ -583,11 +478,7 @@ describe('Navigation', () => { it('displays calendar with custom decade navigation label', () => { const component = shallow( - 'Year'} - view="decade" - />, + 'Year'} view="decade" />, ); const navigationLabel = component.find('.react-calendar__navigation__label').first(); @@ -597,11 +488,7 @@ describe('Navigation', () => { it('displays calendar with custom century navigation label', () => { const component = shallow( - 'Year'} - view="century" - />, + 'Year'} view="century" />, ); const navigationLabel = component.find('.react-calendar__navigation__label').first(); diff --git a/src/CenturyView.jsx b/src/CenturyView.jsx index 8dc264a1..4a3720d5 100644 --- a/src/CenturyView.jsx +++ b/src/CenturyView.jsx @@ -4,14 +4,8 @@ import Decades from './CenturyView/Decades'; export default function CenturyView(props) { function renderDecades() { - return ( - - ); + return ; } - return ( -
        - {renderDecades()} -
        - ); + return
        {renderDecades()}
        ; } diff --git a/src/CenturyView.spec.jsx b/src/CenturyView.spec.jsx index d20f2b23..e898d4d5 100644 --- a/src/CenturyView.spec.jsx +++ b/src/CenturyView.spec.jsx @@ -21,17 +21,17 @@ describe('CenturyView', () => { const firstDayTile = component.find('.react-calendar__tile').first(); - expect(firstDayTile.text()).toBe(`${getDecadeStart(activeStartDate).getFullYear()} – ${getDecadeEnd(activeStartDate).getFullYear()}`); + expect(firstDayTile.text()).toBe( + `${getDecadeStart(activeStartDate).getFullYear()} – ${getDecadeEnd( + activeStartDate, + ).getFullYear()}`, + ); }); it('applies tileClassName to its tiles when given a string', () => { const tileClassName = 'testClassName'; const component = mount( - , + , ); const firstDayTile = component.find('.react-calendar__tile').first(); @@ -70,15 +70,9 @@ describe('CenturyView', () => { }); it('renders tileContent in its tiles when given a node', () => { - const tileContent = ( -
        - ); + const tileContent =
        ; const component = mount( - , + , ); const tiles = component.find('.react-calendar__tile'); @@ -93,9 +87,7 @@ describe('CenturyView', () => { const activeStartDate = new Date(2001, 0, 1); const tileContentFn = ({ date }) => { if (date.getTime() === activeStartDate.getTime()) { - return ( -
        - ); + return
        ; } return null; @@ -123,12 +115,7 @@ describe('CenturyView', () => { it('passes formatYear flag to Decades component', () => { const formatYear = () => 'Year'; - const component = shallow( - , - ); + const component = shallow(); const years = component.find('Decades'); diff --git a/src/CenturyView/Decade.jsx b/src/CenturyView/Decade.jsx index aa24d089..7c494b70 100644 --- a/src/CenturyView/Decade.jsx +++ b/src/CenturyView/Decade.jsx @@ -10,11 +10,7 @@ import { tileProps } from '../shared/propTypes'; const className = 'react-calendar__century-view__decades__decade'; -export default function Decade({ - classes, - formatYear = defaultFormatYear, - ...otherProps -}) { +export default function Decade({ classes, formatYear = defaultFormatYear, ...otherProps }) { const { date, locale } = otherProps; return ( diff --git a/src/CenturyView/Decade.spec.jsx b/src/CenturyView/Decade.spec.jsx index 469b46d8..32a9162e 100644 --- a/src/CenturyView/Decade.spec.jsx +++ b/src/CenturyView/Decade.spec.jsx @@ -3,8 +3,6 @@ import { mount } from 'enzyme'; import Decade from './Decade'; -/* eslint-disable jsx-a11y/mouse-events-have-key-events */ - const tileProps = { activeStartDate: new Date(2018, 0, 1), classes: ['react-calendar__tile'], @@ -31,13 +29,7 @@ describe('Decade', () => { }); it('renders component without abbreviation', () => { - const component = mount( - , - ); + const component = mount(); const abbr = component.find('abbr'); @@ -45,49 +37,33 @@ describe('Decade', () => { expect(component.text()).toBe('2011 – 2020'); }); - it('is disabled when date is before beginning of minDate\'s decade', () => { + it("is disabled when date is before beginning of minDate's decade", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is after beginning of minDate\'s decade', () => { + it("is not disabled when date is after beginning of minDate's decade", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); }); - it('is disabled when date is after end of maxDate\'s decade', () => { + it("is disabled when date is after end of maxDate's decade", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is before end of maxDate\'s decade', () => { + it("is not disabled when date is before end of maxDate's decade", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); @@ -97,13 +73,7 @@ describe('Decade', () => { const date = new Date(2010, 0, 1); const onClick = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('click'); @@ -115,13 +85,7 @@ describe('Decade', () => { const date = new Date(2010, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('mouseOver'); @@ -133,13 +97,7 @@ describe('Decade', () => { const date = new Date(2010, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('focus'); @@ -149,10 +107,7 @@ describe('Decade', () => { it('renders tileContent properly', () => { const component = mount( - } - />, + } />, ); const testContent = component.find('.testContent'); @@ -165,13 +120,7 @@ describe('Decade', () => { const tileContent = jest.fn(); tileContent.mockReturnValue(
        ); - const component = mount( - , - ); + const component = mount(); const testContent = component.find('.testContent'); @@ -191,12 +140,7 @@ describe('Decade', () => { formatYear.mockReturnValue('Mock format'); const component = mount( - , + , ); const tile = component.find('Tile'); diff --git a/src/DecadeView.jsx b/src/DecadeView.jsx index 7f63e129..ed6936a0 100644 --- a/src/DecadeView.jsx +++ b/src/DecadeView.jsx @@ -4,14 +4,8 @@ import Years from './DecadeView/Years'; export default function DecadeView(props) { function renderYears() { - return ( - - ); + return ; } - return ( -
        - {renderYears()} -
        - ); + return
        {renderYears()}
        ; } diff --git a/src/DecadeView.spec.jsx b/src/DecadeView.spec.jsx index 072999a8..09e42d8f 100644 --- a/src/DecadeView.spec.jsx +++ b/src/DecadeView.spec.jsx @@ -26,11 +26,7 @@ describe('DecadeView', () => { it('applies tileClassName to its tiles when given a string', () => { const tileClassName = 'testClassName'; const component = mount( - , + , ); const firstDayTile = component.find('.react-calendar__tile').first(); @@ -69,15 +65,9 @@ describe('DecadeView', () => { }); it('renders tileContent in its tiles when given a node', () => { - const tileContent = ( -
        - ); + const tileContent =
        ; const component = mount( - , + , ); const tiles = component.find('.react-calendar__tile'); @@ -92,9 +82,7 @@ describe('DecadeView', () => { const activeStartDate = new Date(2011, 0, 1); const tileContentFn = ({ date }) => { if (date.getTime() === activeStartDate.getTime()) { - return ( -
        - ); + return
        ; } return null; @@ -122,12 +110,7 @@ describe('DecadeView', () => { it('passes formatYear flag to Years component', () => { const formatYear = () => 'Year'; - const component = shallow( - , - ); + const component = shallow(); const years = component.find('Years'); diff --git a/src/DecadeView/Year.jsx b/src/DecadeView/Year.jsx index d21e3eab..047cd005 100644 --- a/src/DecadeView/Year.jsx +++ b/src/DecadeView/Year.jsx @@ -9,11 +9,7 @@ import { tileProps } from '../shared/propTypes'; const className = 'react-calendar__decade-view__years__year'; -export default function Year({ - classes, - formatYear = defaultFormatYear, - ...otherProps -}) { +export default function Year({ classes, formatYear = defaultFormatYear, ...otherProps }) { const { date, locale } = otherProps; return ( diff --git a/src/DecadeView/Year.spec.jsx b/src/DecadeView/Year.spec.jsx index ed8863c9..f1e477f4 100644 --- a/src/DecadeView/Year.spec.jsx +++ b/src/DecadeView/Year.spec.jsx @@ -3,8 +3,6 @@ import { mount } from 'enzyme'; import Year from './Year'; -/* eslint-disable jsx-a11y/mouse-events-have-key-events */ - const tileProps = { activeStartDate: new Date(2018, 0, 1), classes: ['react-calendar__tile'], @@ -31,13 +29,7 @@ describe('Year', () => { }); it('renders component without abbreviation', () => { - const component = mount( - , - ); + const component = mount(); const abbr = component.find('abbr'); @@ -45,49 +37,33 @@ describe('Year', () => { expect(component.text()).toBe('2018'); }); - it('is disabled when date is before beginning of minDate\'s year', () => { + it("is disabled when date is before beginning of minDate's year", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is after beginning of minDate\'s year', () => { + it("is not disabled when date is after beginning of minDate's year", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); }); - it('is disabled when date is after end of maxDate\'s year', () => { + it("is disabled when date is after end of maxDate's year", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is before end of maxDate\'s year', () => { + it("is not disabled when date is before end of maxDate's year", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); @@ -97,13 +73,7 @@ describe('Year', () => { const date = new Date(2018, 0, 1); const onClick = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('click'); @@ -115,13 +85,7 @@ describe('Year', () => { const date = new Date(2018, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('mouseOver'); @@ -133,13 +97,7 @@ describe('Year', () => { const date = new Date(2018, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('focus'); @@ -148,12 +106,7 @@ describe('Year', () => { }); it('renders tileContent properly', () => { - const component = mount( - } - />, - ); + const component = mount(} />); const testContent = component.find('.testContent'); @@ -165,13 +118,7 @@ describe('Year', () => { const tileContent = jest.fn(); tileContent.mockReturnValue(
        ); - const component = mount( - , - ); + const component = mount(); const testContent = component.find('.testContent'); @@ -191,12 +138,7 @@ describe('Year', () => { formatYear.mockReturnValue('Mock format'); const component = mount( - , + , ); const tile = component.find('Tile'); diff --git a/src/Flex.jsx b/src/Flex.jsx index 16914c0d..415a028f 100644 --- a/src/Flex.jsx +++ b/src/Flex.jsx @@ -26,21 +26,18 @@ export default function Flex({ }} {...otherProps} > - {React.Children.map(children, (child, index) => ( - React.cloneElement( - child, - { - ...child.props, - style: { - flexBasis: toPercent(100 / count), - flexShrink: 0, - flexGrow: 0, - overflow: 'hidden', - marginLeft: offset && (index === 0) ? toPercent((100 * offset) / count) : null, - }, + {React.Children.map(children, (child, index) => + React.cloneElement(child, { + ...child.props, + style: { + flexBasis: toPercent(100 / count), + flexShrink: 0, + flexGrow: 0, + overflow: 'hidden', + marginLeft: offset && index === 0 ? toPercent((100 * offset) / count) : null, }, - ) - ))} + }), + )}
        ); } @@ -51,9 +48,6 @@ Flex.propTypes = { count: PropTypes.number.isRequired, direction: PropTypes.string, offset: PropTypes.number, - style: PropTypes.objectOf(PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - ])), + style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), wrap: PropTypes.bool, }; diff --git a/src/Flex.spec.jsx b/src/Flex.spec.jsx index 91c7aaa9..44352d78 100644 --- a/src/Flex.spec.jsx +++ b/src/Flex.spec.jsx @@ -7,15 +7,9 @@ describe('Flex', () => { it('styles itself properly with wrap flag set to false', () => { const noWrapComponent = shallow( -
        - Hey -
        -
        - Hi -
        -
        - Hello -
        +
        Hey
        +
        Hi
        +
        Hello
        , ); @@ -26,15 +20,9 @@ describe('Flex', () => { it('styles itself properly with wrap flag set to true', () => { const wrapComponent = shallow( -
        - Hey -
        -
        - Hi -
        -
        - Hello -
        +
        Hey
        +
        Hi
        +
        Hello
        , ); @@ -45,15 +33,9 @@ describe('Flex', () => { it('renders all given children', () => { const component = shallow( -
        - Hey -
        -
        - Hi -
        -
        - Hello -
        +
        Hey
        +
        Hi
        +
        Hello
        , ); @@ -68,18 +50,16 @@ describe('Flex', () => { it('properly sizes and positions all the elements', () => { const component = shallow( -
        - Hey -
        -
        - Hi -
        +
        Hey
        +
        Hi
        , ); const children = component.children(); - children.forEach((child) => expect(parseFloat(child.prop('style').flexBasis)).toBeCloseTo(33.33)); + children.forEach((child) => + expect(parseFloat(child.prop('style').flexBasis)).toBeCloseTo(33.33), + ); expect(parseFloat(children.first().prop('style').marginLeft)).toBeCloseTo(33.33); }); }); diff --git a/src/MonthView.jsx b/src/MonthView.jsx index 0f4d0d11..6340c2c1 100644 --- a/src/MonthView.jsx +++ b/src/MonthView.jsx @@ -11,19 +11,14 @@ import { isCalendarType } from './shared/propTypes'; function getCalendarTypeFromLocale(locale) { return ( - Object.keys(CALENDAR_TYPE_LOCALES) - .find((calendarType) => CALENDAR_TYPE_LOCALES[calendarType].includes(locale)) - || CALENDAR_TYPES.ISO_8601 + Object.keys(CALENDAR_TYPE_LOCALES).find((calendarType) => + CALENDAR_TYPE_LOCALES[calendarType].includes(locale), + ) || CALENDAR_TYPES.ISO_8601 ); } export default function MonthView(props) { - const { - activeStartDate, - locale, - onMouseLeave, - showFixedNumberOfWeeks, - } = props; + const { activeStartDate, locale, onMouseLeave, showFixedNumberOfWeeks } = props; const { calendarType = getCalendarTypeFromLocale(locale), formatShortWeekday, @@ -60,20 +55,13 @@ export default function MonthView(props) { } function renderDays() { - return ( - - ); + return ; } const className = 'react-calendar__month-view'; return ( -
        +
        { const defaultProps = { @@ -29,11 +33,7 @@ describe('MonthView', () => { it('applies tileClassName to its tiles when given a string', () => { const tileClassName = 'testClassName'; const component = mount( - , + , ); const firstDayTile = component.find('.react-calendar__tile').first(); @@ -72,15 +72,9 @@ describe('MonthView', () => { }); it('renders tileContent in its tiles when given a node', () => { - const tileContent = ( -
        - ); + const tileContent =
        ; const component = mount( - , + , ); const tiles = component.find('.react-calendar__tile'); @@ -95,9 +89,7 @@ describe('MonthView', () => { const activeStartDate = new Date(2017, 0, 1); const tileContentFn = ({ date }) => { if (date.getTime() === activeStartDate.getTime()) { - return ( -
        - ); + return
        ; } return null; @@ -124,22 +116,13 @@ describe('MonthView', () => { }); it('does not render WeekNumbers component by default', () => { - const component = mount( - , - ); + const component = mount(); expect(component.find('WeekNumbers')).toHaveLength(0); }); it('renders WeekNumbers component by given showWeekNumbers flag', () => { - const component = mount( - , - ); + const component = mount(); expect(component.find('WeekNumbers')).toHaveLength(1); }); @@ -147,12 +130,7 @@ describe('MonthView', () => { it('passes calendarType to Weekdays component', () => { const calendarType = 'ISO 8601'; - const component = shallow( - , - ); + const component = shallow(); const weekdays = component.find('Weekdays'); @@ -162,12 +140,7 @@ describe('MonthView', () => { it('passes derived calendarType to Weekdays component if calendarType is not given', () => { const locale = 'en-US'; - const component = shallow( - , - ); + const component = shallow(); const weekdays = component.find('Weekdays'); @@ -178,10 +151,7 @@ describe('MonthView', () => { const formatShortWeekday = () => 'Weekday'; const component = shallow( - , + , ); const weekdays = component.find('Weekdays'); @@ -192,12 +162,7 @@ describe('MonthView', () => { it('passes calendarType to Days component', () => { const calendarType = 'ISO 8601'; - const component = shallow( - , - ); + const component = shallow(); const days = component.find('Days'); @@ -207,12 +172,7 @@ describe('MonthView', () => { it('passes derived calendarType to Days component if calendarType is not given', () => { const locale = 'en-US'; - const component = shallow( - , - ); + const component = shallow(); const days = component.find('Days'); @@ -222,12 +182,7 @@ describe('MonthView', () => { it('passes formatDay flag to Days component', () => { const formatDay = () => 'Day'; - const component = shallow( - , - ); + const component = shallow(); const days = component.find('Days'); @@ -237,12 +192,7 @@ describe('MonthView', () => { it('passes formatLongDate flag to Days component', () => { const formatLongDate = () => 'Long date'; - const component = shallow( - , - ); + const component = shallow(); const days = component.find('Days'); diff --git a/src/MonthView/Day.spec.jsx b/src/MonthView/Day.spec.jsx index 4d529b8c..2e51ea57 100644 --- a/src/MonthView/Day.spec.jsx +++ b/src/MonthView/Day.spec.jsx @@ -3,8 +3,6 @@ import { mount } from 'enzyme'; import Day from './Day'; -/* eslint-disable jsx-a11y/mouse-events-have-key-events */ - const tileProps = { activeStartDate: new Date(2018, 0, 1), classes: ['react-calendar__tile'], @@ -44,25 +42,17 @@ describe('Day', () => { }); it('applies additional classNames for neighboring months', () => { - const component = mount( - , - ); + const component = mount(); const wrapperClassName = component.find('.react-calendar__tile').prop('className'); - expect(wrapperClassName.includes('react-calendar__month-view__days__day--neighboringMonth')).toBe(true); + expect( + wrapperClassName.includes('react-calendar__month-view__days__day--neighboringMonth'), + ).toBe(true); }); it('renders component with proper abbreviation', () => { - const component = mount( - , - ); + const component = mount(); const abbr = component.find('abbr'); @@ -71,49 +61,33 @@ describe('Day', () => { expect(component.text()).toBe('1'); }); - it('is disabled when date is before beginning of minDate\'s day', () => { + it("is disabled when date is before beginning of minDate's day", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is after beginning of minDate\'s day', () => { + it("is not disabled when date is after beginning of minDate's day", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); }); - it('is disabled when date is after end of maxDate\'s day', () => { + it("is disabled when date is after end of maxDate's day", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is before end of maxDate\'s day', () => { + it("is not disabled when date is before end of maxDate's day", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); @@ -123,13 +97,7 @@ describe('Day', () => { const date = new Date(2018, 0, 1); const onClick = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('click'); @@ -141,13 +109,7 @@ describe('Day', () => { const date = new Date(2018, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('mouseOver'); @@ -159,13 +121,7 @@ describe('Day', () => { const date = new Date(2018, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('focus'); @@ -174,12 +130,7 @@ describe('Day', () => { }); it('renders tileContent properly', () => { - const component = mount( - } - />, - ); + const component = mount(} />); const testContent = component.find('.testContent'); @@ -191,13 +142,7 @@ describe('Day', () => { const tileContent = jest.fn(); tileContent.mockReturnValue(
        ); - const component = mount( - , - ); + const component = mount(); const testContent = component.find('.testContent'); @@ -217,12 +162,7 @@ describe('Day', () => { formatDay.mockReturnValue('Mock format'); const component = mount( - , + , ); const tile = component.find('Tile'); @@ -239,12 +179,7 @@ describe('Day', () => { formatLongDate.mockReturnValue('Mock format'); const component = mount( - , + , ); const abbr = component.find('abbr'); diff --git a/src/MonthView/Days.jsx b/src/MonthView/Days.jsx index 0e74ff6d..e2770531 100644 --- a/src/MonthView/Days.jsx +++ b/src/MonthView/Days.jsx @@ -1,10 +1,6 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { - getYear, - getMonth, - getDaysInMonth, -} from '@wojtekmaj/date-utils'; +import { getYear, getMonth, getDaysInMonth } from '@wojtekmaj/date-utils'; import TileGroup from '../TileGroup'; import Day from './Day'; @@ -13,15 +9,8 @@ import { getDayOfWeek } from '../shared/dates'; import { isCalendarType, tileGroupProps } from '../shared/propTypes'; export default function Days(props) { - const { - activeStartDate, - calendarType, - } = props; - const { - showFixedNumberOfWeeks, - showNeighboringMonth, - ...otherProps - } = props; + const { activeStartDate, calendarType } = props; + const { showFixedNumberOfWeeks, showNeighboringMonth, ...otherProps } = props; const year = getYear(activeStartDate); const monthIndex = getMonth(activeStartDate); @@ -46,7 +35,7 @@ export default function Days(props) { const end = (() => { if (showFixedNumberOfWeeks) { // Always show 6 weeks - return start + (6 * 7) - 1; + return start + 6 * 7 - 1; } const daysInMonth = getDaysInMonth(activeStartDate); diff --git a/src/MonthView/WeekNumber.jsx b/src/MonthView/WeekNumber.jsx index 4ccd390e..289d0c0e 100644 --- a/src/MonthView/WeekNumber.jsx +++ b/src/MonthView/WeekNumber.jsx @@ -3,39 +3,24 @@ import PropTypes from 'prop-types'; const className = 'react-calendar__tile'; -export default function WeekNumber({ - date, - onClickWeekNumber, - weekNumber, - ...otherProps -}) { +export default function WeekNumber({ date, onClickWeekNumber, weekNumber, ...otherProps }) { const props = { className, ...otherProps, }; - const children = ( - - {weekNumber} - - ); + const children = {weekNumber}; - return ( - onClickWeekNumber - ? ( - - ) - : ( -
        - {children} -
        - ) + return onClickWeekNumber ? ( + + ) : ( +
        {children}
        ); } diff --git a/src/MonthView/WeekNumber.spec.jsx b/src/MonthView/WeekNumber.spec.jsx index 565496fe..473f2c3e 100644 --- a/src/MonthView/WeekNumber.spec.jsx +++ b/src/MonthView/WeekNumber.spec.jsx @@ -10,9 +10,7 @@ describe(' component', () => { }; it('renders div by default', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.find('div')).toHaveLength(1); }); @@ -21,10 +19,7 @@ describe(' component', () => { const onClickWeekNumber = () => {}; const component = shallow( - , + , ); expect(component.find('button')).toHaveLength(1); @@ -33,12 +28,7 @@ describe(' component', () => { it('renders weekNumber properly', () => { const weekNumber = '42'; - const component = shallow( - , - ); + const component = shallow(); expect(component.text()).toBe(weekNumber); }); diff --git a/src/MonthView/WeekNumbers.jsx b/src/MonthView/WeekNumbers.jsx index 465d1d7c..d3fcc225 100644 --- a/src/MonthView/WeekNumbers.jsx +++ b/src/MonthView/WeekNumbers.jsx @@ -1,30 +1,16 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { - getYear, - getMonth, - getDate, - getDaysInMonth, -} from '@wojtekmaj/date-utils'; +import { getYear, getMonth, getDate, getDaysInMonth } from '@wojtekmaj/date-utils'; import WeekNumber from './WeekNumber'; import Flex from '../Flex'; -import { - getBeginOfWeek, - getDayOfWeek, - getWeekNumber, -} from '../shared/dates'; +import { getBeginOfWeek, getDayOfWeek, getWeekNumber } from '../shared/dates'; import { isCalendarType } from '../shared/propTypes'; export default function WeekNumbers(props) { - const { - activeStartDate, - calendarType, - onClickWeekNumber, - onMouseLeave, - showFixedNumberOfWeeks, - } = props; + const { activeStartDate, calendarType, onClickWeekNumber, onMouseLeave, showFixedNumberOfWeeks } = + props; const numberOfWeeks = (() => { if (showFixedNumberOfWeeks) { @@ -45,9 +31,7 @@ export default function WeekNumbers(props) { const result = []; for (let index = 0; index < numberOfWeeks; index += 1) { - result.push( - getBeginOfWeek(new Date(year, monthIndex, day + (index * 7)), calendarType), - ); + result.push(getBeginOfWeek(new Date(year, monthIndex, day + index * 7), calendarType)); } return result; })(); @@ -63,16 +47,14 @@ export default function WeekNumbers(props) { onMouseOver={onMouseLeave} style={{ flexBasis: 'calc(100% * (1 / 8)', flexShrink: 0 }} > - { - weekNumbers.map((weekNumber, weekIndex) => ( - - )) - } + {weekNumbers.map((weekNumber, weekIndex) => ( + + ))} ); } diff --git a/src/MonthView/WeekNumbers.spec.jsx b/src/MonthView/WeekNumbers.spec.jsx index 2e57a49b..44aab98d 100644 --- a/src/MonthView/WeekNumbers.spec.jsx +++ b/src/MonthView/WeekNumbers.spec.jsx @@ -55,11 +55,7 @@ describe('WeekNumbers', () => { it('renders proper weekNumbers for a year that starts in week 1 (US)', () => { const component = mount( - , + , ); const weekNumbers = component.find('WeekNumber'); @@ -86,12 +82,7 @@ describe('WeekNumbers', () => { }); it('renders static divs as children when not given onClickWeekNumber', () => { - const component = mount( - , - ); + const component = mount(); const children = component.find('div.react-calendar__tile'); @@ -100,11 +91,7 @@ describe('WeekNumbers', () => { it('renders buttons as children when given onClickWeekNumber', () => { const component = mount( - , + , ); const children = component.find('button.react-calendar__tile'); @@ -131,11 +118,7 @@ describe('WeekNumbers', () => { it('calls onClickWeekNumber function with proper arguments when clicked a week number (US)', () => { const onClickWeekNumber = jest.fn(); const component = mount( - , + , ); const children = component.find('button.react-calendar__tile'); diff --git a/src/MonthView/Weekdays.jsx b/src/MonthView/Weekdays.jsx index a52dab39..67cbf9c0 100644 --- a/src/MonthView/Weekdays.jsx +++ b/src/MonthView/Weekdays.jsx @@ -1,15 +1,14 @@ import React from 'react'; import PropTypes from 'prop-types'; -import { - getYear, - getMonth, - getMonthStart, -} from '@wojtekmaj/date-utils'; +import { getYear, getMonth, getMonthStart } from '@wojtekmaj/date-utils'; import Flex from '../Flex'; import { getDayOfWeek } from '../shared/dates'; -import { formatWeekday, formatShortWeekday as defaultFormatShortWeekday } from '../shared/dateFormatter'; +import { + formatWeekday, + formatShortWeekday as defaultFormatShortWeekday, +} from '../shared/dateFormatter'; import { isCalendarType } from '../shared/propTypes'; const className = 'react-calendar__month-view__weekdays'; @@ -31,16 +30,15 @@ export default function Weekdays(props) { for (let weekday = 1; weekday <= 7; weekday += 1) { const weekdayDate = new Date( - year, monthIndex, weekday - getDayOfWeek(beginOfMonth, calendarType), + year, + monthIndex, + weekday - getDayOfWeek(beginOfMonth, calendarType), ); const abbr = formatWeekday(locale, weekdayDate); weekdays.push( -
        +
        {formatShortWeekday(locale, weekdayDate).replace('.', '')} @@ -49,12 +47,7 @@ export default function Weekdays(props) { } return ( - + {weekdays} ); diff --git a/src/MonthView/Weekdays.spec.jsx b/src/MonthView/Weekdays.spec.jsx index f02b042f..a6f124e2 100644 --- a/src/MonthView/Weekdays.spec.jsx +++ b/src/MonthView/Weekdays.spec.jsx @@ -9,12 +9,7 @@ describe('Weekdays', () => { }; it('renders proper weekdays (ISO 8601)', () => { - const component = mount( - , - ); + const component = mount(); const weekdays = component.find('.react-calendar__month-view__weekdays__weekday'); const firstWeekday = weekdays.first(); @@ -26,12 +21,7 @@ describe('Weekdays', () => { }); it('renders proper weekdays (US)', () => { - const component = mount( - , - ); + const component = mount(); const weekdays = component.find('.react-calendar__month-view__weekdays__weekday'); const firstWeekday = weekdays.first(); @@ -43,12 +33,7 @@ describe('Weekdays', () => { }); it('renders weekdays with custom weekdays formatting', () => { - const component = mount( - 'Weekday'} - />, - ); + const component = mount( 'Weekday'} />); const weekdays = component.find('.react-calendar__month-view__weekdays__weekday'); const firstWeekday = weekdays.first(); diff --git a/src/Tile.jsx b/src/Tile.jsx index 843aeaf0..8d6c3692 100644 --- a/src/Tile.jsx +++ b/src/Tile.jsx @@ -6,18 +6,16 @@ import { tileProps } from './shared/propTypes'; function datesAreDifferent(date1, date2) { return ( - (date1 && !date2) - || (!date1 && date2) - || (date1 && date2 && date1.getTime() !== date2.getTime()) + (date1 && !date2) || + (!date1 && date2) || + (date1 && date2 && date1.getTime() !== date2.getTime()) ); } function getValue(nextProps, prop) { const { activeStartDate, date, view } = nextProps; - return typeof prop === 'function' - ? prop({ activeStartDate, date, view }) - : prop; + return typeof prop === 'function' ? prop({ activeStartDate, date, view }) : prop; } export default class Tile extends Component { @@ -27,16 +25,16 @@ export default class Tile extends Component { const nextState = {}; if ( - tileClassName !== prevState.tileClassNameProps - || datesAreDifferent(activeStartDate, prevState.activeStartDateProps) + tileClassName !== prevState.tileClassNameProps || + datesAreDifferent(activeStartDate, prevState.activeStartDateProps) ) { nextState.tileClassName = getValue(nextProps, tileClassName); nextState.tileClassNameProps = tileClassName; } if ( - tileContent !== prevState.tileContentProps - || datesAreDifferent(activeStartDate, prevState.activeStartDateProps) + tileContent !== prevState.tileContentProps || + datesAreDifferent(activeStartDate, prevState.activeStartDateProps) ) { nextState.tileContent = getValue(nextProps, tileContent); nextState.tileContentProps = tileContent; @@ -73,9 +71,9 @@ export default class Tile extends Component { ); diff --git a/src/Tile.spec.jsx b/src/Tile.spec.jsx index aa37ceeb..e4b8983b 100644 --- a/src/Tile.spec.jsx +++ b/src/Tile.spec.jsx @@ -14,9 +14,7 @@ describe(' component', () => { }; it('renders button properly', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.find('button')).toHaveLength(1); }); @@ -24,12 +22,7 @@ describe(' component', () => { it('passes onClick to button', () => { const onClick = jest.fn(); - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button'); @@ -41,12 +34,7 @@ describe(' component', () => { it('passes classes to button properly', () => { const classes = ['a', 'b', 'c']; - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button'); @@ -58,19 +46,13 @@ describe(' component', () => { it('renders children properly', () => { const children = 'Hello'; - const component = shallow( - - {children} - , - ); + const component = shallow({children}); expect(component.text()).toBe(children); }); it('does not render abbr by default', () => { - const component = shallow( - , - ); + const component = shallow(); expect(component.find('abbr')).toHaveLength(0); }); @@ -80,14 +62,7 @@ describe(' component', () => { const formatAbbr = jest.fn(); const locale = 'en-US'; - shallow( - , - ); + shallow(); expect(formatAbbr).toHaveBeenCalledTimes(1); expect(formatAbbr).toHaveBeenCalledWith(locale, date); @@ -99,10 +74,7 @@ describe(' component', () => { const formatAbbr = () => ariaLabel; const component = shallow( - + {children} , ); @@ -147,12 +119,7 @@ describe(' component', () => { const className = 'className'; const tileClassName = () => className; - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button'); @@ -162,12 +129,7 @@ describe(' component', () => { it('applies tileClassName to button properly given string', () => { const className = 'className'; - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button'); @@ -207,12 +169,7 @@ describe(' component', () => { const content = 'content'; const tileContent = () => content; - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button'); @@ -222,12 +179,7 @@ describe(' component', () => { it('applies tileContent to button properly given string', () => { const content = 'className'; - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button'); @@ -261,12 +213,7 @@ describe(' component', () => { it('disables button properly given tileDisabled returning true', () => { const tileDisabled = () => true; - const component = shallow( - , - ); + const component = shallow(); const button = component.find('button'); diff --git a/src/TileGroup.jsx b/src/TileGroup.jsx index 824e2077..38f07c90 100644 --- a/src/TileGroup.jsx +++ b/src/TileGroup.jsx @@ -29,7 +29,11 @@ export default function TileGroup({ + {tiles} ); diff --git a/src/YearView.jsx b/src/YearView.jsx index d6cff255..05cc9c66 100644 --- a/src/YearView.jsx +++ b/src/YearView.jsx @@ -4,14 +4,8 @@ import Months from './YearView/Months'; export default function YearView(props) { function renderMonths() { - return ( - - ); + return ; } - return ( -
        - {renderMonths()} -
        - ); + return
        {renderMonths()}
        ; } diff --git a/src/YearView.spec.jsx b/src/YearView.spec.jsx index 8a6fb9d0..8655fee4 100644 --- a/src/YearView.spec.jsx +++ b/src/YearView.spec.jsx @@ -13,11 +13,7 @@ describe('YearView', () => { it('renders proper view when given activeStartDate', () => { const activeStartDate = new Date(2017, 0, 1); const component = mount( - , + , ); const firstDayTile = component.find('.react-calendar__tile').first(); @@ -29,11 +25,7 @@ describe('YearView', () => { it('applies tileClassName to its tiles when given a string', () => { const tileClassName = 'testClassName'; const component = mount( - , + , ); const firstDayTile = component.find('.react-calendar__tile').first(); @@ -72,15 +64,9 @@ describe('YearView', () => { }); it('renders tileContent in its tiles when given a node', () => { - const tileContent = ( -
        - ); + const tileContent =
        ; const component = mount( - , + , ); const tiles = component.find('.react-calendar__tile'); @@ -95,9 +81,7 @@ describe('YearView', () => { const activeStartDate = new Date(2017, 0, 1); const tileContentFn = ({ date }) => { if (date.getTime() === activeStartDate.getTime()) { - return ( -
        - ); + return
        ; } return null; @@ -123,12 +107,7 @@ describe('YearView', () => { }); it('displays year view with custom month formatting', () => { - const component = mount( - 'Month'} - />, - ); + const component = mount( 'Month'} />); const month = component.find('.react-calendar__year-view__months__month').first(); @@ -138,12 +117,7 @@ describe('YearView', () => { it('passes formatMonth flag to Days component', () => { const formatMonth = () => 'Month'; - const component = shallow( - , - ); + const component = shallow(); const months = component.find('Months'); diff --git a/src/YearView/Month.spec.jsx b/src/YearView/Month.spec.jsx index 78b79518..665cdd9b 100644 --- a/src/YearView/Month.spec.jsx +++ b/src/YearView/Month.spec.jsx @@ -3,8 +3,6 @@ import { mount } from 'enzyme'; import Month from './Month'; -/* eslint-disable jsx-a11y/mouse-events-have-key-events */ - const tileProps = { activeStartDate: new Date(2018, 0, 1), classes: ['react-calendar__tile'], @@ -30,13 +28,7 @@ describe('Month', () => { }); it('renders component with proper abbreviation', () => { - const component = mount( - , - ); + const component = mount(); const abbr = component.find('abbr'); @@ -45,49 +37,33 @@ describe('Month', () => { expect(component.text()).toBe('January'); }); - it('is disabled when date is before beginning of minDate\'s month', () => { + it("is disabled when date is before beginning of minDate's month", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is after beginning of minDate\'s month', () => { + it("is not disabled when date is after beginning of minDate's month", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); }); - it('is disabled when date is after end of maxDate\'s month', () => { + it("is disabled when date is after end of maxDate's month", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeTruthy(); }); - it('is not disabled when date is before end of maxDate\'s month', () => { + it("is not disabled when date is before end of maxDate's month", () => { const component = mount( - , + , ); expect(component.find('.react-calendar__tile').prop('disabled')).toBeFalsy(); @@ -97,13 +73,7 @@ describe('Month', () => { const date = new Date(2018, 0, 1); const onClick = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('click'); @@ -115,13 +85,7 @@ describe('Month', () => { const date = new Date(2018, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('mouseOver'); @@ -133,13 +97,7 @@ describe('Month', () => { const date = new Date(2018, 0, 1); const onMouseOver = jest.fn(); - const component = mount( - , - ); + const component = mount(); component.find('.react-calendar__tile').simulate('focus'); @@ -148,12 +106,7 @@ describe('Month', () => { }); it('renders tileContent properly', () => { - const component = mount( - } - />, - ); + const component = mount(} />); const testContent = component.find('.testContent'); @@ -165,13 +118,7 @@ describe('Month', () => { const tileContent = jest.fn(); tileContent.mockReturnValue(
        ); - const component = mount( - , - ); + const component = mount(); const testContent = component.find('.testContent'); @@ -191,12 +138,7 @@ describe('Month', () => { formatMonth.mockReturnValue('Mock format'); const component = mount( - , + , ); const tile = component.find('Tile'); @@ -213,12 +155,7 @@ describe('Month', () => { formatMonthYear.mockReturnValue('Mock format'); const component = mount( - , + , ); const abbr = component.find('abbr'); diff --git a/src/index.js b/src/index.js index 351a047f..1f77ed3e 100644 --- a/src/index.js +++ b/src/index.js @@ -6,10 +6,4 @@ import MonthView from './MonthView'; export default Calendar; -export { - Calendar, - CenturyView, - DecadeView, - YearView, - MonthView, -}; +export { Calendar, CenturyView, DecadeView, YearView, MonthView }; diff --git a/src/shared/const.js b/src/shared/const.js index 2b119af8..7468421e 100644 --- a/src/shared/const.js +++ b/src/shared/const.js @@ -49,10 +49,7 @@ export const CALENDAR_TYPE_LOCALES = { 'ps', 'ps-AR', ], - [CALENDAR_TYPES.HEBREW]: [ - 'he', - 'he-IL', - ], + [CALENDAR_TYPES.HEBREW]: ['he', 'he-IL'], }; export const WEEKDAYS = [...Array(7)].map((el, index) => index); diff --git a/src/shared/dateFormatter.js b/src/shared/dateFormatter.js index e62b3656..9c64e3c0 100644 --- a/src/shared/dateFormatter.js +++ b/src/shared/dateFormatter.js @@ -13,10 +13,7 @@ function getFormatter(options) { const formatterCacheLocale = formatterCache.get(localeWithDefault); if (!formatterCacheLocale.has(options)) { - formatterCacheLocale.set( - options, - new Intl.DateTimeFormat(localeWithDefault, options).format, - ); + formatterCacheLocale.set(options, new Intl.DateTimeFormat(localeWithDefault, options).format); } return formatterCacheLocale.get(options)(date); diff --git a/src/shared/dates.js b/src/shared/dates.js index 8113d5e3..744f1e93 100644 --- a/src/shared/dates.js +++ b/src/shared/dates.js @@ -1,35 +1,30 @@ import { getYear, getMonth as getMonthIndex, - getCenturyStart, getPreviousCenturyStart, getNextCenturyStart, getCenturyEnd, getPreviousCenturyEnd, getCenturyRange, - getDecadeStart, getPreviousDecadeStart, getNextDecadeStart, getDecadeEnd, getPreviousDecadeEnd, getDecadeRange, - getYearStart, getPreviousYearStart, getNextYearStart, getYearEnd, getPreviousYearEnd, getYearRange, - getMonthStart, getPreviousMonthStart, getNextMonthStart, getMonthEnd, getPreviousMonthEnd, getMonthRange, - getDayStart, getDayEnd, getDayRange, @@ -104,11 +99,8 @@ export function getBeginOfWeek(date, calendarType = CALENDAR_TYPES.ISO_8601) { * @param {string} calendarType Calendar type. Can be ISO 8601 or US. */ export function getWeekNumber(date, calendarType = CALENDAR_TYPES.ISO_8601) { - const calendarTypeForWeekNumber = ( - calendarType === CALENDAR_TYPES.US - ? CALENDAR_TYPES.US - : CALENDAR_TYPES.ISO_8601 - ); + const calendarTypeForWeekNumber = + calendarType === CALENDAR_TYPES.US ? CALENDAR_TYPES.US : CALENDAR_TYPES.ISO_8601; const beginOfWeek = getBeginOfWeek(date, calendarType); let year = getYear(date) + 1; let dayInWeekOne; @@ -136,50 +128,74 @@ export function getWeekNumber(date, calendarType = CALENDAR_TYPES.ISO_8601) { */ export function getBegin(rangeType, date) { switch (rangeType) { - case 'century': return getCenturyStart(date); - case 'decade': return getDecadeStart(date); - case 'year': return getYearStart(date); - case 'month': return getMonthStart(date); - case 'day': return getDayStart(date); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'century': + return getCenturyStart(date); + case 'decade': + return getDecadeStart(date); + case 'year': + return getYearStart(date); + case 'month': + return getMonthStart(date); + case 'day': + return getDayStart(date); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } } export function getBeginPrevious(rangeType, date) { switch (rangeType) { - case 'century': return getPreviousCenturyStart(date); - case 'decade': return getPreviousDecadeStart(date); - case 'year': return getPreviousYearStart(date); - case 'month': return getPreviousMonthStart(date); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'century': + return getPreviousCenturyStart(date); + case 'decade': + return getPreviousDecadeStart(date); + case 'year': + return getPreviousYearStart(date); + case 'month': + return getPreviousMonthStart(date); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } } export function getBeginNext(rangeType, date) { switch (rangeType) { - case 'century': return getNextCenturyStart(date); - case 'decade': return getNextDecadeStart(date); - case 'year': return getNextYearStart(date); - case 'month': return getNextMonthStart(date); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'century': + return getNextCenturyStart(date); + case 'decade': + return getNextDecadeStart(date); + case 'year': + return getNextYearStart(date); + case 'month': + return getNextMonthStart(date); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } } export const getBeginPrevious2 = (rangeType, date) => { switch (rangeType) { - case 'decade': return getPreviousDecadeStart(date, -100); - case 'year': return getPreviousYearStart(date, -10); - case 'month': return getPreviousMonthStart(date, -12); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'decade': + return getPreviousDecadeStart(date, -100); + case 'year': + return getPreviousYearStart(date, -10); + case 'month': + return getPreviousMonthStart(date, -12); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } }; export const getBeginNext2 = (rangeType, date) => { switch (rangeType) { - case 'decade': return getNextDecadeStart(date, 100); - case 'year': return getNextYearStart(date, 10); - case 'month': return getNextMonthStart(date, 12); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'decade': + return getNextDecadeStart(date, 100); + case 'year': + return getNextYearStart(date, 10); + case 'month': + return getNextMonthStart(date, 12); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } }; @@ -191,31 +207,46 @@ export const getBeginNext2 = (rangeType, date) => { */ export function getEnd(rangeType, date) { switch (rangeType) { - case 'century': return getCenturyEnd(date); - case 'decade': return getDecadeEnd(date); - case 'year': return getYearEnd(date); - case 'month': return getMonthEnd(date); - case 'day': return getDayEnd(date); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'century': + return getCenturyEnd(date); + case 'decade': + return getDecadeEnd(date); + case 'year': + return getYearEnd(date); + case 'month': + return getMonthEnd(date); + case 'day': + return getDayEnd(date); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } } export function getEndPrevious(rangeType, date) { switch (rangeType) { - case 'century': return getPreviousCenturyEnd(date); - case 'decade': return getPreviousDecadeEnd(date); - case 'year': return getPreviousYearEnd(date); - case 'month': return getPreviousMonthEnd(date); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'century': + return getPreviousCenturyEnd(date); + case 'decade': + return getPreviousDecadeEnd(date); + case 'year': + return getPreviousYearEnd(date); + case 'month': + return getPreviousMonthEnd(date); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } } export const getEndPrevious2 = (rangeType, date) => { switch (rangeType) { - case 'decade': return getPreviousDecadeEnd(date, -100); - case 'year': return getPreviousYearEnd(date, -10); - case 'month': return getPreviousMonthEnd(date, -12); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'decade': + return getPreviousDecadeEnd(date, -100); + case 'year': + return getPreviousYearEnd(date, -10); + case 'month': + return getPreviousMonthEnd(date, -12); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } }; @@ -227,12 +258,18 @@ export const getEndPrevious2 = (rangeType, date) => { */ export function getRange(rangeType, date) { switch (rangeType) { - case 'century': return getCenturyRange(date); - case 'decade': return getDecadeRange(date); - case 'year': return getYearRange(date); - case 'month': return getMonthRange(date); - case 'day': return getDayRange(date); - default: throw new Error(`Invalid rangeType: ${rangeType}`); + case 'century': + return getCenturyRange(date); + case 'decade': + return getDecadeRange(date); + case 'year': + return getYearRange(date); + case 'month': + return getMonthRange(date); + case 'day': + return getDayRange(date); + default: + throw new Error(`Invalid rangeType: ${rangeType}`); } } @@ -245,16 +282,11 @@ export function getRange(rangeType, date) { */ export function getValueRange(rangeType, date1, date2) { const rawNextValue = [date1, date2].sort((a, b) => a - b); - return [ - getBegin(rangeType, rawNextValue[0]), - getEnd(rangeType, rawNextValue[1]), - ]; + return [getBegin(rangeType, rawNextValue[0]), getEnd(rangeType, rawNextValue[1])]; } function toYearLabel(locale, formatYear = defaultFormatYear, dates) { - return dates - .map((date) => formatYear(locale, date)) - .join(' – '); + return dates.map((date) => formatYear(locale, date)).join(' – '); } /** diff --git a/src/shared/dates.spec.js b/src/shared/dates.spec.js index 0e22404b..28d38238 100644 --- a/src/shared/dates.spec.js +++ b/src/shared/dates.spec.js @@ -832,9 +832,7 @@ describe('isWeekend', () => { ${new Date(2016, 11, 31)} | ${true} ${new Date(2017, 0, 1)} | ${true} ${new Date(2017, 0, 2)} | ${false} - `('returns $flag for $date', ({ - date, flag, - }) => { + `('returns $flag for $date', ({ date, flag }) => { expect(isWeekend(date, 'ISO 8601')).toBe(flag); }); }); @@ -846,9 +844,7 @@ describe('isWeekend', () => { ${new Date(2016, 11, 31)} | ${true} ${new Date(2017, 0, 1)} | ${true} ${new Date(2017, 0, 2)} | ${false} - `('returns $flag for $date', ({ - date, flag, - }) => { + `('returns $flag for $date', ({ date, flag }) => { expect(isWeekend(date, 'US')).toBe(flag); }); }); @@ -860,9 +856,7 @@ describe('isWeekend', () => { ${new Date(2016, 11, 31)} | ${true} ${new Date(2017, 0, 1)} | ${false} ${new Date(2017, 0, 2)} | ${false} - `('returns $flag for $date', ({ - date, flag, - }) => { + `('returns $flag for $date', ({ date, flag }) => { expect(isWeekend(date, 'Arabic')).toBe(flag); }); }); @@ -874,9 +868,7 @@ describe('isWeekend', () => { ${new Date(2016, 11, 31)} | ${true} ${new Date(2017, 0, 1)} | ${false} ${new Date(2017, 0, 2)} | ${false} - `('returns $flag for $date', ({ - date, flag, - }) => { + `('returns $flag for $date', ({ date, flag }) => { expect(isWeekend(date, 'Hebrew')).toBe(flag); }); }); @@ -888,9 +880,7 @@ describe('isWeekend', () => { ${new Date(2016, 11, 31)} | ${true} ${new Date(2017, 0, 1)} | ${true} ${new Date(2017, 0, 2)} | ${false} - `('returns $flag for $date', ({ - date, flag, - }) => { + `('returns $flag for $date', ({ date, flag }) => { expect(isWeekend(date)).toBe(flag); }); }); diff --git a/src/shared/propTypes.js b/src/shared/propTypes.js index f3e545bd..f8e535e2 100644 --- a/src/shared/propTypes.js +++ b/src/shared/propTypes.js @@ -20,13 +20,17 @@ export const isMinDate = (props, propName, componentName) => { } if (!(minDate instanceof Date)) { - return new Error(`Invalid prop \`${propName}\` of type \`${typeof minDate}\` supplied to \`${componentName}\`, expected instance of \`Date\`.`); + return new Error( + `Invalid prop \`${propName}\` of type \`${typeof minDate}\` supplied to \`${componentName}\`, expected instance of \`Date\`.`, + ); } const { maxDate } = props; if (maxDate && minDate > maxDate) { - return new Error(`Invalid prop \`${propName}\` of type \`${typeof minDate}\` supplied to \`${componentName}\`, minDate cannot be larger than maxDate.`); + return new Error( + `Invalid prop \`${propName}\` of type \`${typeof minDate}\` supplied to \`${componentName}\`, minDate cannot be larger than maxDate.`, + ); } return null; @@ -40,13 +44,17 @@ export const isMaxDate = (props, propName, componentName) => { } if (!(maxDate instanceof Date)) { - return new Error(`Invalid prop \`${propName}\` of type \`${typeof maxDate}\` supplied to \`${componentName}\`, expected instance of \`Date\`.`); + return new Error( + `Invalid prop \`${propName}\` of type \`${typeof maxDate}\` supplied to \`${componentName}\`, expected instance of \`Date\`.`, + ); } const { minDate } = props; if (minDate && maxDate < minDate) { - return new Error(`Invalid prop \`${propName}\` of type \`${typeof maxDate}\` supplied to \`${componentName}\`, maxDate cannot be smaller than minDate.`); + return new Error( + `Invalid prop \`${propName}\` of type \`${typeof maxDate}\` supplied to \`${componentName}\`, maxDate cannot be smaller than minDate.`, + ); } return null; @@ -55,7 +63,6 @@ export const isMaxDate = (props, propName, componentName) => { export const isRef = PropTypes.oneOfType([ PropTypes.func, PropTypes.shape({ - // eslint-disable-next-line react/forbid-prop-types current: PropTypes.any, }), ]); @@ -74,7 +81,11 @@ export const isView = (props, propName, componentName) => { const allowedViews = views || allViews; if (view !== undefined && allowedViews.indexOf(view) === -1) { - return new Error(`Invalid prop \`${propName}\` of value \`${view}\` supplied to \`${componentName}\`, expected one of [${allowedViews.map((a) => `"${a}"`).join(', ')}].`); + return new Error( + `Invalid prop \`${propName}\` of value \`${view}\` supplied to \`${componentName}\`, expected one of [${allowedViews + .map((a) => `"${a}"`) + .join(', ')}].`, + ); } // Everything is fine @@ -85,7 +96,9 @@ isView.isRequired = (props, propName, componentName) => { const { [propName]: view } = props; if (!view) { - return new Error(`The prop \`${propName}\` is marked as required in \`${componentName}\`, but its value is \`${view}\`.`); + return new Error( + `The prop \`${propName}\` is marked as required in \`${componentName}\`, but its value is \`${view}\`.`, + ); } return isView(props, propName, componentName); @@ -99,14 +112,8 @@ export const tileGroupProps = { minDate: isMinDate, onClick: PropTypes.func, onMouseOver: PropTypes.func, - tileClassName: PropTypes.oneOfType([ - PropTypes.func, - isClassName, - ]), - tileContent: PropTypes.oneOfType([ - PropTypes.func, - PropTypes.node, - ]), + tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]), + tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), value: isValue, valueType: PropTypes.string, }; @@ -120,17 +127,8 @@ export const tileProps = { minDate: isMinDate, onClick: PropTypes.func, onMouseOver: PropTypes.func, - style: PropTypes.objectOf(PropTypes.oneOfType([ - PropTypes.string, - PropTypes.number, - ])), - tileClassName: PropTypes.oneOfType([ - PropTypes.func, - isClassName, - ]), - tileContent: PropTypes.oneOfType([ - PropTypes.func, - PropTypes.node, - ]), + style: PropTypes.objectOf(PropTypes.oneOfType([PropTypes.string, PropTypes.number])), + tileClassName: PropTypes.oneOfType([PropTypes.func, isClassName]), + tileContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]), tileDisabled: PropTypes.func, }; diff --git a/src/shared/utils.js b/src/shared/utils.js index 4e1d495e..8c1db712 100644 --- a/src/shared/utils.js +++ b/src/shared/utils.js @@ -18,24 +18,15 @@ export function between(value, min, max) { } export function isValueWithinRange(value, range) { - return ( - range[0] <= value - && range[1] >= value - ); + return range[0] <= value && range[1] >= value; } export function isRangeWithinRange(greaterRange, smallerRange) { - return ( - greaterRange[0] <= smallerRange[0] - && greaterRange[1] >= smallerRange[1] - ); + return greaterRange[0] <= smallerRange[0] && greaterRange[1] >= smallerRange[1]; } export function doRangesOverlap(range1, range2) { - return ( - isValueWithinRange(range1[0], range2) - || isValueWithinRange(range1[1], range2) - ); + return isValueWithinRange(range1[0], range2) || isValueWithinRange(range1[1], range2); } function getRangeClassNames(valueRange, dateRange, baseClassName) { @@ -65,9 +56,7 @@ function getRangeClassNames(valueRange, dateRange, baseClassName) { return classes; } -export function getTileClasses({ - value, valueType, date, dateType, hover, -} = {}) { +export function getTileClasses({ value, valueType, date, dateType, hover } = {}) { const className = 'react-calendar__tile'; const classes = [className]; @@ -76,7 +65,9 @@ export function getTileClasses({ } if (!Array.isArray(date) && !dateType) { - throw new Error('getTileClasses(): Unable to get tile activity classes because one or more required arguments were not passed.'); + throw new Error( + 'getTileClasses(): Unable to get tile activity classes because one or more required arguments were not passed.', + ); } const now = new Date(); @@ -91,7 +82,9 @@ export function getTileClasses({ } if (!Array.isArray(value) && !valueType) { - throw new Error('getTileClasses(): Unable to get tile activity classes because one or more required arguments were not passed.'); + throw new Error( + 'getTileClasses(): Unable to get tile activity classes because one or more required arguments were not passed.', + ); } const valueRange = Array.isArray(value) ? value : getRange(valueType, value); diff --git a/src/shared/utils.spec.js b/src/shared/utils.spec.js index d9874998..81f0370b 100644 --- a/src/shared/utils.spec.js +++ b/src/shared/utils.spec.js @@ -172,14 +172,12 @@ describe('getTileClasses', () => { }); it('throws an error when given date but not given dateType parameter ', () => { - expect( - () => getTileClasses({ date: new Date(2017, 0, 1) }), - ).toThrow(); + expect(() => getTileClasses({ date: new Date(2017, 0, 1) })).toThrow(); }); it('throws an error when given date and value but not given valueType parameter ', () => { - expect( - () => getTileClasses({ + expect(() => + getTileClasses({ date: new Date(2017, 0, 1), dateType: 'month', value: new Date(2017, 0, 1), diff --git a/test/.babelrc b/test/.babelrc index e8a0dc48..72e49ed7 100644 --- a/test/.babelrc +++ b/test/.babelrc @@ -1,8 +1,11 @@ { "presets": [ - ["@babel/env", { - "modules": false - }], + [ + "@babel/env", + { + "modules": false + } + ], "@babel/react" ] } diff --git a/test/DateBonduariesOptions.jsx b/test/DateBonduariesOptions.jsx index 48cccee4..b592d674 100644 --- a/test/DateBonduariesOptions.jsx +++ b/test/DateBonduariesOptions.jsx @@ -2,12 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { getISOLocalDateTime } from '@wojtekmaj/date-utils'; -export default function DateBonduariesOptions({ - maxDate, - minDate, - setMaxDate, - setMinDate, -}) { +export default function DateBonduariesOptions({ maxDate, minDate, setMaxDate, setMinDate }) { function onMinChange(event) { const { value } = event.target; @@ -22,14 +17,10 @@ export default function DateBonduariesOptions({ return (
        - - Minimum and maximum date - + Minimum and maximum date
        - +   -
        - +   -
        diff --git a/test/LocaleOptions.jsx b/test/LocaleOptions.jsx index 1ab248c5..fb6f09b4 100644 --- a/test/LocaleOptions.jsx +++ b/test/LocaleOptions.jsx @@ -1,10 +1,7 @@ import React from 'react'; import PropTypes from 'prop-types'; -export default function LocaleOptions({ - locale, - setLocale, -}) { +export default function LocaleOptions({ locale, setLocale }) { function onChange(event) { let { value: nextLocale } = event.target; @@ -29,9 +26,7 @@ export default function LocaleOptions({ return (
        - - Locale - + Locale
        - +
        - +
        - +
        - +
        - +     - -
        diff --git a/test/MaxDetailOptions.jsx b/test/MaxDetailOptions.jsx index 1e99d391..13fa17dd 100644 --- a/test/MaxDetailOptions.jsx +++ b/test/MaxDetailOptions.jsx @@ -7,11 +7,7 @@ function upperCaseFirstLetter(str) { return str.slice(0, 1).toUpperCase() + str.slice(1); } -export default function MaxDetailOptions({ - maxDetail, - minDetail, - setMaxDetail, -}) { +export default function MaxDetailOptions({ maxDetail, minDetail, setMaxDetail }) { function onChange(event) { const { value } = event.target; @@ -22,9 +18,7 @@ export default function MaxDetailOptions({ return (
        - - Maximum detail - + Maximum detail {allViews.map((view, index) => (
        @@ -37,9 +31,7 @@ export default function MaxDetailOptions({ type="radio" value={view} /> - +
        ))}
        diff --git a/test/MinDetailOptions.jsx b/test/MinDetailOptions.jsx index 90c30f40..06bc6fa8 100644 --- a/test/MinDetailOptions.jsx +++ b/test/MinDetailOptions.jsx @@ -7,11 +7,7 @@ function upperCaseFirstLetter(str) { return str.slice(0, 1).toUpperCase() + str.slice(1); } -export default function MinDetailOptions({ - maxDetail, - minDetail, - setMinDetail, -}) { +export default function MinDetailOptions({ maxDetail, minDetail, setMinDetail }) { function onChange(event) { const { value } = event.target; @@ -22,9 +18,7 @@ export default function MinDetailOptions({ return (
        - - Minimum detail - + Minimum detail {allViews.map((view, index) => (
        @@ -37,9 +31,7 @@ export default function MinDetailOptions({ type="radio" value={view} /> - +
        ))}
        diff --git a/test/Test.jsx b/test/Test.jsx index 49363e8f..c17dea60 100644 --- a/test/Test.jsx +++ b/test/Test.jsx @@ -15,22 +15,16 @@ import './Test.less'; const now = new Date(); -/* eslint-disable no-console, react/prop-types */ - const tileClassName = ({ date, view }) => { switch (view) { case 'month': - return date.getDay() === 0 || date.getDay() === 6 - ? 'red' : null; + return date.getDay() === 0 || date.getDay() === 6 ? 'red' : null; case 'year': - return date.getMonth() === 5 || date.getMonth() === 6 - ? 'green' : null; + return date.getMonth() === 5 || date.getMonth() === 6 ? 'green' : null; case 'decade': - return date.getFullYear() === 1991 - ? 'pink' : null; + return date.getFullYear() === 1991 ? 'pink' : null; case 'century': - return date.getFullYear() === 1991 - ? 'brown' : null; + return date.getFullYear() === 1991 ? 'brown' : null; default: return null; } @@ -39,45 +33,29 @@ const tileClassName = ({ date, view }) => { const tileContent = ({ date, view }) => { switch (view) { case 'month': - return date.getDay() === 0 - ? ( -

        - - {'It\'s Sunday!'} - -

        - ) - : null; + return date.getDay() === 0 ? ( +

        + {"It's Sunday!"} +

        + ) : null; case 'year': - return date.getMonth() === 5 || date.getMonth() === 6 - ? ( -

        - - Holidays - -

        - ) - : null; + return date.getMonth() === 5 || date.getMonth() === 6 ? ( +

        + Holidays +

        + ) : null; case 'decade': - return date.getFullYear() === 1991 - ? ( -

        - - {'Developer\'s birthday!'} - -

        - ) - : null; + return date.getFullYear() === 1991 ? ( +

        + {"Developer's birthday!"} +

        + ) : null; case 'century': - return date.getFullYear() === 1991 - ? ( -

        - - {'The 90\'s'} - -

        - ) - : null; + return date.getFullYear() === 1991 ? ( +

        + {"The 90's"} +

        + ) : null; default: return null; } @@ -86,6 +64,8 @@ const tileContent = ({ date, view }) => { const nineteenNinetyFive = new Date(1995, now.getUTCMonth() + 1, 15, 12); const fifteenthOfNextMonth = new Date(now.getUTCFullYear(), now.getUTCMonth() + 1, 15, 12); +/* eslint-disable no-console */ + export default function Test() { const [activeStartDate, setActiveStartDate] = useState( new Date(now.getFullYear(), now.getMonth()), @@ -95,7 +75,7 @@ export default function Test() { const [maxDetail, setMaxDetail] = useState('month'); const [minDate, setMinDate] = useState(nineteenNinetyFive); const [minDetail, setMinDetail] = useState('century'); - const [returnValue/* , setReturnValue */] = useState('start'); + const [returnValue /* , setReturnValue */] = useState('start'); const [selectRange, setSelectRange] = useState(false); const [showDoubleView, setShowDoubleView] = useState(false); const [showFixedNumberOfWeeks, setShowFixedNumberOfWeeks] = useState(false); @@ -109,7 +89,8 @@ export default function Test() { console.log('Changed view to', nextView, nextActiveStartDate); setActiveStartDate(nextActiveStartDate); setView(nextView); - }, [], + }, + [], ); function renderDebugInfo() { @@ -121,18 +102,10 @@ export default function Test() { }; if (Array.isArray(value)) { - return ( -

        - {`Chosen date range: ${renderDate(value[0])} - ${renderDate(value[1])}`} -

        - ); + return

        {`Chosen date range: ${renderDate(value[0])} - ${renderDate(value[1])}`}

        ; } - return ( -

        - {`Chosen date: ${value ? renderDate(value) : '(none)'}`} -

        - ); + return

        {`Chosen date: ${value ? renderDate(value) : '(none)'}`}

        ; } const commonProps = { @@ -167,9 +140,7 @@ export default function Test() { return (
        -

        - react-calendar test page -

        +

        react-calendar test page

        ); @@ -130,8 +105,5 @@ ValueOptions.propTypes = { selectRange: PropTypes.bool, setSelectRange: PropTypes.func.isRequired, setValue: PropTypes.func.isRequired, - value: PropTypes.oneOfType([ - PropTypes.string, - isValue, - ]), + value: PropTypes.oneOfType([PropTypes.string, isValue]), }; diff --git a/test/ViewOptions.jsx b/test/ViewOptions.jsx index 75b16f36..a8a52c0f 100644 --- a/test/ViewOptions.jsx +++ b/test/ViewOptions.jsx @@ -37,9 +37,7 @@ export default function ViewOptions({ return (
        - - View options - + View options
        - +
        @@ -61,9 +57,7 @@ export default function ViewOptions({ onChange={onShowFixedNumberOfWeeksChange} type="checkbox" /> - +
        @@ -74,9 +68,7 @@ export default function ViewOptions({ onChange={onShowNeighboringMonthChange} type="checkbox" /> - +
        @@ -86,9 +78,7 @@ export default function ViewOptions({ onChange={onShowWeekNumbersChange} type="checkbox" /> - +
        ); diff --git a/test/index.html b/test/index.html index d839e1f0..3a4e766e 100644 --- a/test/index.html +++ b/test/index.html @@ -2,7 +2,7 @@ - + react-calendar test page diff --git a/test/package.json b/test/package.json index f5b09949..ae87eaa4 100644 --- a/test/package.json +++ b/test/package.json @@ -27,7 +27,7 @@ "@pmmmwh/react-refresh-webpack-plugin": "^0.5.0", "babel-loader": "^8.0.0", "css-loader": "^6.0.0", - "eslint": "~7.19.0", + "eslint": "^8.5.0", "html-webpack-plugin": "^5.1.0", "less": "^4.0.0", "less-loader": "^10.0.0", diff --git a/test/shared/dateFormatter.js b/test/shared/dateFormatter.js index 4b8f390d..dc960ed7 100644 --- a/test/shared/dateFormatter.js +++ b/test/shared/dateFormatter.js @@ -13,10 +13,7 @@ function getFormatter(options) { const formatterCacheLocale = formatterCache.get(localeWithDefault); if (!formatterCacheLocale.has(options)) { - formatterCacheLocale.set( - options, - new Intl.DateTimeFormat(localeWithDefault, options).format, - ); + formatterCacheLocale.set(options, new Intl.DateTimeFormat(localeWithDefault, options).format); } return formatterCacheLocale.get(options)(date); diff --git a/test/webpack.config.js b/test/webpack.config.js index 80642411..ece632d1 100644 --- a/test/webpack.config.js +++ b/test/webpack.config.js @@ -46,10 +46,7 @@ module.exports = { }, { test: /\.css$/, - use: [ - isProduction ? MiniCssExtractPlugin.loader : 'style-loader', - 'css-loader', - ], + use: [isProduction ? MiniCssExtractPlugin.loader : 'style-loader', 'css-loader'], }, ].filter(Boolean), }, @@ -57,10 +54,11 @@ module.exports = { new HtmlWebpackPlugin({ template: 'index.html', }), - isProduction && new MiniCssExtractPlugin({ - filename: '[name].[chunkhash:8].css', - chunkFilename: '[name].[chunkhash:8].css', - }), + isProduction && + new MiniCssExtractPlugin({ + filename: '[name].[chunkhash:8].css', + chunkFilename: '[name].[chunkhash:8].css', + }), isDevelopment && new ReactRefreshWebpackPlugin(), ].filter(Boolean), optimization: { diff --git a/test/yarn.lock b/test/yarn.lock index ac0a9ead..7415c9cb 100644 --- a/test/yarn.lock +++ b/test/yarn.lock @@ -5,7 +5,7 @@ __metadata: version: 5 cacheKey: 8 -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.14.5": +"@babel/code-frame@npm:^7.14.5": version: 7.14.5 resolution: "@babel/code-frame@npm:7.14.5" dependencies: @@ -1288,21 +1288,38 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^0.3.0": - version: 0.3.0 - resolution: "@eslint/eslintrc@npm:0.3.0" +"@eslint/eslintrc@npm:^1.0.5": + version: 1.0.5 + resolution: "@eslint/eslintrc@npm:1.0.5" dependencies: ajv: ^6.12.4 - debug: ^4.1.1 - espree: ^7.3.0 - globals: ^12.1.0 + debug: ^4.3.2 + espree: ^9.2.0 + globals: ^13.9.0 ignore: ^4.0.6 import-fresh: ^3.2.1 - js-yaml: ^3.13.1 - lodash: ^4.17.20 + js-yaml: ^4.1.0 minimatch: ^3.0.4 strip-json-comments: ^3.1.1 - checksum: a8148d3868893c251c72b2674a3d57c04deda7afe8208a8f4306d129017f21bbe800a493dda9b46957d39325d28378bd48c0a10d25c89aa5516dc8691ef7ca95 + checksum: b35b50d7b65bd8acd92a05b6fb15ac62c0cefa40dfef0324ca5bf8632bf3679bab6e173c53b3ad1e1d837701cecdbd9c144b35f46588cdf4e046a9caa272488d + languageName: node + linkType: hard + +"@humanwhocodes/config-array@npm:^0.9.2": + version: 0.9.3 + resolution: "@humanwhocodes/config-array@npm:0.9.3" + dependencies: + "@humanwhocodes/object-schema": ^1.2.1 + debug: ^4.1.1 + minimatch: ^3.0.4 + checksum: 6e5d7d274941c459bab0a14a87e372206d89fad3e4879d982edc942e8cc34da6510ea3644b8535a2a9edaa6527e91dccceabc6837ffa8ee506d66bca5d269ebc + languageName: node + linkType: hard + +"@humanwhocodes/object-schema@npm:^1.2.1": + version: 1.2.1 + resolution: "@humanwhocodes/object-schema@npm:1.2.1" + checksum: a824a1ec31591231e4bad5787641f59e9633827d0a2eaae131a288d33c9ef0290bd16fda8da6f7c0fcb014147865d12118df10db57f27f41e20da92369fcb3f1 languageName: node linkType: hard @@ -1793,21 +1810,12 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^7.4.0": - version: 7.4.0 - resolution: "acorn@npm:7.4.0" +"acorn@npm:^8.0.4, acorn@npm:^8.7.0": + version: 8.7.0 + resolution: "acorn@npm:8.7.0" bin: acorn: bin/acorn - checksum: 1cbf7cae01f8fdc9ee2c65294b7f0a741a67760b22fee4ea3bbbffd0102fc76b07cd7437494221df7f7e51e75fdff3dae4bf11763d29e310e779fc61d3378ad5 - languageName: node - linkType: hard - -"acorn@npm:^8.0.4": - version: 8.0.4 - resolution: "acorn@npm:8.0.4" - bin: - acorn: bin/acorn - checksum: 6f161c19abc7449345a458ba3b7a7eac3429d4dbce95708475f6bac088ea901f066c8a1101f0f6b575552ecf026fbc1235c85c1ba34a7aeb388e15aba0e33d0d + checksum: e0f79409d68923fbf1aa6d4166f3eedc47955320d25c89a20cc822e6ba7c48c5963d5bc657bc242d68f7a4ac9faf96eef033e8f73656da6c640d4219935fdfd0 languageName: node linkType: hard @@ -1867,7 +1875,7 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.0, ajv@npm:^8.0.1, ajv@npm:^8.8.0": +"ajv@npm:^8.0.0, ajv@npm:^8.8.0": version: 8.9.0 resolution: "ajv@npm:8.9.0" dependencies: @@ -1879,13 +1887,6 @@ __metadata: languageName: node linkType: hard -"ansi-colors@npm:^4.1.1": - version: 4.1.1 - resolution: "ansi-colors@npm:4.1.1" - checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 - languageName: node - linkType: hard - "ansi-html-community@npm:^0.0.8": version: 0.0.8 resolution: "ansi-html-community@npm:0.0.8" @@ -1902,7 +1903,7 @@ __metadata: languageName: node linkType: hard -"ansi-regex@npm:^5.0.0": +"ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b @@ -1925,7 +1926,7 @@ __metadata: languageName: node linkType: hard -"ansi-styles@npm:^4.0.0, ansi-styles@npm:^4.1.0": +"ansi-styles@npm:^4.1.0": version: 4.2.1 resolution: "ansi-styles@npm:4.2.1" dependencies: @@ -1962,12 +1963,10 @@ __metadata: languageName: node linkType: hard -"argparse@npm:^1.0.7": - version: 1.0.10 - resolution: "argparse@npm:1.0.10" - dependencies: - sprintf-js: ~1.0.2 - checksum: 7ca6e45583a28de7258e39e13d81e925cfa25d7d4aacbf806a382d3c02fcb13403a07fb8aeef949f10a7cfe4a62da0e2e807b348a5980554cc28ee573ef95945 +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 83644b56493e89a254bae05702abf3a1101b4fa4d0ca31df1c9985275a5a5bd47b3c27b7fa0b71098d41114d8ca000e6ed90cad764b306f8a503665e4d517ced languageName: node linkType: hard @@ -2008,13 +2007,6 @@ __metadata: languageName: node linkType: hard -"astral-regex@npm:^2.0.0": - version: 2.0.0 - resolution: "astral-regex@npm:2.0.0" - checksum: 876231688c66400473ba505731df37ea436e574dd524520294cc3bbc54ea40334865e01fa0d074d74d036ee874ee7e62f486ea38bc421ee8e6a871c06f011766 - languageName: node - linkType: hard - "async@npm:^2.6.2": version: 2.6.3 resolution: "async@npm:2.6.3" @@ -2667,15 +2659,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1": - version: 4.2.0 - resolution: "debug@npm:4.2.0" +"debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2": + version: 4.3.3 + resolution: "debug@npm:4.3.3" dependencies: ms: 2.1.2 peerDependenciesMeta: supports-color: optional: true - checksum: f901c2a64e5db14068145ebc82ff263aa484d2285fe11ff7c561827df2024d05dcaf3f320c85b519b7b77369e513eb0a46e206c6364ae6819a87d29b0284403b + checksum: 14472d56fe4a94dbcfaa6dbed2dd3849f1d72ba78104a1a328047bb564643ca49df0224c3a17fa63533fd11dd3d4c8636cd861191232a2c6735af00cc2d4de16 languageName: node linkType: hard @@ -2901,13 +2893,6 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^8.0.0": - version: 8.0.0 - resolution: "emoji-regex@npm:8.0.0" - checksum: d4c5c39d5a9868b5fa152f00cada8a936868fd3367f33f71be515ecee4c803132d11b31a6222b2571b1e5f7e13890156a94880345594d0ce7e3c9895f560f192 - languageName: node - linkType: hard - "emojis-list@npm:^3.0.0": version: 3.0.0 resolution: "emojis-list@npm:3.0.0" @@ -2932,15 +2917,6 @@ __metadata: languageName: node linkType: hard -"enquirer@npm:^2.3.5": - version: 2.3.6 - resolution: "enquirer@npm:2.3.6" - dependencies: - ansi-colors: ^4.1.1 - checksum: 1c0911e14a6f8d26721c91e01db06092a5f7675159f0261d69c403396a385afd13dd76825e7678f66daffa930cfaa8d45f506fb35f818a2788463d022af1b884 - languageName: node - linkType: hard - "entities@npm:^2.0.0": version: 2.2.0 resolution: "entities@npm:2.2.0" @@ -3047,6 +3023,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + "eslint-scope@npm:^5.1.1": version: 5.1.1 resolution: "eslint-scope@npm:5.1.1" @@ -3057,19 +3040,24 @@ __metadata: languageName: node linkType: hard -"eslint-utils@npm:^2.1.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" +"eslint-scope@npm:^7.1.0": + version: 7.1.0 + resolution: "eslint-scope@npm:7.1.0" dependencies: - eslint-visitor-keys: ^1.1.0 - checksum: 27500938f348da42100d9e6ad03ae29b3de19ba757ae1a7f4a087bdcf83ac60949bbb54286492ca61fac1f5f3ac8692dd21537ce6214240bf95ad0122f24d71d + esrecurse: ^4.3.0 + estraverse: ^5.2.0 + checksum: 2070470a0725438ed47075b2574a4c03cf59aa32648da8cff9e3548c84f6b0079cfdb9ee1dd7ab0bfe97011f64b2af5bfd4b69cf14a1292130dec661eec7914a languageName: node linkType: hard -"eslint-visitor-keys@npm:^1.1.0, eslint-visitor-keys@npm:^1.3.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 37a19b712f42f4c9027e8ba98c2b06031c17e0c0a4c696cd429bd9ee04eb43889c446f2cd545e1ff51bef9593fcec94ecd2c2ef89129fcbbf3adadbef520376a +"eslint-utils@npm:^3.0.0": + version: 3.0.0 + resolution: "eslint-utils@npm:3.0.0" + dependencies: + eslint-visitor-keys: ^2.0.0 + peerDependencies: + eslint: ">=5" + checksum: 0668fe02f5adab2e5a367eee5089f4c39033af20499df88fe4e6aba2015c20720404d8c3d6349b6f716b08fdf91b9da4e5d5481f265049278099c4c836ccb619 languageName: node linkType: hard @@ -3080,80 +3068,75 @@ __metadata: languageName: node linkType: hard -"eslint@npm:~7.19.0": - version: 7.19.0 - resolution: "eslint@npm:7.19.0" +"eslint-visitor-keys@npm:^3.1.0, eslint-visitor-keys@npm:^3.2.0": + version: 3.2.0 + resolution: "eslint-visitor-keys@npm:3.2.0" + checksum: fdadbb26f9e6417d3db7ad4f00bb0d573b6031c32fa72e8cdae32d038223faaeddff2ee443c90cb489bf774e75bff765c00912b8f9106d65e4f202ccd78c1b18 + languageName: node + linkType: hard + +"eslint@npm:^8.5.0": + version: 8.8.0 + resolution: "eslint@npm:8.8.0" dependencies: - "@babel/code-frame": ^7.0.0 - "@eslint/eslintrc": ^0.3.0 + "@eslint/eslintrc": ^1.0.5 + "@humanwhocodes/config-array": ^0.9.2 ajv: ^6.10.0 chalk: ^4.0.0 cross-spawn: ^7.0.2 - debug: ^4.0.1 + debug: ^4.3.2 doctrine: ^3.0.0 - enquirer: ^2.3.5 - eslint-scope: ^5.1.1 - eslint-utils: ^2.1.0 - eslint-visitor-keys: ^2.0.0 - espree: ^7.3.1 - esquery: ^1.2.0 + escape-string-regexp: ^4.0.0 + eslint-scope: ^7.1.0 + eslint-utils: ^3.0.0 + eslint-visitor-keys: ^3.2.0 + espree: ^9.3.0 + esquery: ^1.4.0 esutils: ^2.0.2 - file-entry-cache: ^6.0.0 + fast-deep-equal: ^3.1.3 + file-entry-cache: ^6.0.1 functional-red-black-tree: ^1.0.1 - glob-parent: ^5.0.0 - globals: ^12.1.0 - ignore: ^4.0.6 + glob-parent: ^6.0.1 + globals: ^13.6.0 + ignore: ^5.2.0 import-fresh: ^3.0.0 imurmurhash: ^0.1.4 is-glob: ^4.0.0 - js-yaml: ^3.13.1 + js-yaml: ^4.1.0 json-stable-stringify-without-jsonify: ^1.0.1 levn: ^0.4.1 - lodash: ^4.17.20 + lodash.merge: ^4.6.2 minimatch: ^3.0.4 natural-compare: ^1.4.0 optionator: ^0.9.1 - progress: ^2.0.0 - regexpp: ^3.1.0 - semver: ^7.2.1 - strip-ansi: ^6.0.0 + regexpp: ^3.2.0 + strip-ansi: ^6.0.1 strip-json-comments: ^3.1.0 - table: ^6.0.4 text-table: ^0.2.0 v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: 56f05e1e00d0fa6a2583485c270f828165ede5853d7b96ca6a092ab39c74362edaa9a213019aa8b89624ecc703f6d23c1c77bfe61fa74ba249edaea80f0e1619 + checksum: 41a7e85bf84cf9f2d758ef3e8d08020a39a2836703728b59535684681349bd021c2c6e24174462b844a914870d707d2151e0371198899d957b444de91adaa435 languageName: node linkType: hard -"espree@npm:^7.3.0, espree@npm:^7.3.1": - version: 7.3.1 - resolution: "espree@npm:7.3.1" +"espree@npm:^9.2.0, espree@npm:^9.3.0": + version: 9.3.0 + resolution: "espree@npm:9.3.0" dependencies: - acorn: ^7.4.0 + acorn: ^8.7.0 acorn-jsx: ^5.3.1 - eslint-visitor-keys: ^1.3.0 - checksum: aa9b50dcce883449af2e23bc2b8d9abb77118f96f4cb313935d6b220f77137eaef7724a83c3f6243b96bc0e4ab14766198e60818caad99f9519ae5a336a39b45 - languageName: node - linkType: hard - -"esprima@npm:^4.0.0": - version: 4.0.1 - resolution: "esprima@npm:4.0.1" - bin: - esparse: ./bin/esparse.js - esvalidate: ./bin/esvalidate.js - checksum: b45bc805a613dbea2835278c306b91aff6173c8d034223fa81498c77dcbce3b2931bf6006db816f62eacd9fd4ea975dfd85a5b7f3c6402cfd050d4ca3c13a628 + eslint-visitor-keys: ^3.1.0 + checksum: c0f1885c4eab652f9be08eb9228cea0df046b559b29d4aed8d6590ea9bd60177d4cb245d204a6f737a79a096861bb4ab8e480aeb8c1dbafef5beec1157353ce4 languageName: node linkType: hard -"esquery@npm:^1.2.0": - version: 1.3.1 - resolution: "esquery@npm:1.3.1" +"esquery@npm:^1.4.0": + version: 1.4.0 + resolution: "esquery@npm:1.4.0" dependencies: estraverse: ^5.1.0 - checksum: 2f13235c775acf79489dd18a1a81e2a1e940b02f80994e051d0a68036cbe87c2bcbedf549c747bc4c4776f5a04f839355a344cebe31d84fb75d3fbc27f12b340 + checksum: a0807e17abd7fbe5fbd4fab673038d6d8a50675cdae6b04fbaa520c34581be0c5fa24582990e8acd8854f671dd291c78bb2efb9e0ed5b62f33bac4f9cf820210 languageName: node linkType: hard @@ -3336,7 +3319,7 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.0": +"file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" dependencies: @@ -3583,7 +3566,7 @@ fsevents@~2.3.2: languageName: node linkType: hard -"glob-parent@npm:^5.0.0, glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": +"glob-parent@npm:^5.1.2, glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -3592,6 +3575,15 @@ fsevents@~2.3.2: languageName: node linkType: hard +"glob-parent@npm:^6.0.1": + version: 6.0.2 + resolution: "glob-parent@npm:6.0.2" + dependencies: + is-glob: ^4.0.3 + checksum: c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 + languageName: node + linkType: hard + "glob-to-regexp@npm:^0.4.1": version: 0.4.1 resolution: "glob-to-regexp@npm:0.4.1" @@ -3620,12 +3612,12 @@ fsevents@~2.3.2: languageName: node linkType: hard -"globals@npm:^12.1.0": - version: 12.4.0 - resolution: "globals@npm:12.4.0" +"globals@npm:^13.6.0, globals@npm:^13.9.0": + version: 13.12.0 + resolution: "globals@npm:13.12.0" dependencies: - type-fest: ^0.8.1 - checksum: 7ae5ee16a96f1e8d71065405f57da0e33267f6b070cd36a5444c7780dd28639b48b92413698ac64f04bf31594f9108878bd8cb158ecdf759c39e05634fefcca6 + type-fest: ^0.20.2 + checksum: 1f959abb11117916468a1afcba527eead152900cad652c8383c4e8976daea7ec55e1ee30c086f48d1b8655719f214e9d92eca083c3a43b5543bc4056e7e5fccf languageName: node linkType: hard @@ -3910,10 +3902,10 @@ fsevents@~2.3.2: languageName: node linkType: hard -"ignore@npm:^5.1.4": - version: 5.1.8 - resolution: "ignore@npm:5.1.8" - checksum: 967abadb61e2cb0e5c5e8c4e1686ab926f91bc1a4680d994b91947d3c65d04c3ae126dcdf67f08e0feeb8ff8407d453e641aeeddcc47a3a3cca359f283cf6121 +"ignore@npm:^5.1.4, ignore@npm:^5.2.0": + version: 5.2.0 + resolution: "ignore@npm:5.2.0" + checksum: 6b1f926792d614f64c6c83da3a1f9c83f6196c2839aa41e1e32dd7b8d174cef2e329d75caabb62cb61ce9dc432f75e67d07d122a037312db7caa73166a1bdb77 languageName: node linkType: hard @@ -4094,19 +4086,12 @@ fsevents@~2.3.2: languageName: node linkType: hard -"is-fullwidth-code-point@npm:^3.0.0": - version: 3.0.0 - resolution: "is-fullwidth-code-point@npm:3.0.0" - checksum: 44a30c29457c7fb8f00297bce733f0a64cd22eca270f83e58c105e0d015e45c019491a4ab2faef91ab51d4738c670daff901c799f6a700e27f7314029e99e348 - languageName: node - linkType: hard - -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": - version: 4.0.1 - resolution: "is-glob@npm:4.0.1" +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" dependencies: is-extglob: ^2.1.1 - checksum: 84627cad11b4e745f5db5a163f32c47b711585a5ff6e14f8f8d026db87f4cdd3e2c95f6fa1f94ad22e469f36d819ae2814f03f9c668b164422ac3354a94672d3 + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 languageName: node linkType: hard @@ -4263,15 +4248,14 @@ fsevents@~2.3.2: languageName: node linkType: hard -"js-yaml@npm:^3.13.1": - version: 3.14.0 - resolution: "js-yaml@npm:3.14.0" +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" dependencies: - argparse: ^1.0.7 - esprima: ^4.0.0 + argparse: ^2.0.1 bin: js-yaml: bin/js-yaml.js - checksum: a1a47c912ba20956f96cb0998dea2e74c7f7129d831fe33d3c5a16f3f83712ce405172a8dd1c26bf2b3ad74b54016d432ff727928670ae5a50a57a677c387949 + checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a languageName: node linkType: hard @@ -4504,13 +4488,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"lodash.clonedeep@npm:^4.5.0": - version: 4.5.0 - resolution: "lodash.clonedeep@npm:4.5.0" - checksum: 92c46f094b064e876a23c97f57f81fbffd5d760bf2d8a1c61d85db6d1e488c66b0384c943abee4f6af7debf5ad4e4282e74ff83177c9e63d8ff081a4837c3489 - languageName: node - linkType: hard - "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -4518,6 +4495,13 @@ fsevents@~2.3.2: languageName: node linkType: hard +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: ad580b4bdbb7ca1f7abf7e1bce63a9a0b98e370cf40194b03380a46b4ed799c9573029599caebc1b14e3f24b111aef72b96674a56cfa105e0f5ac70546cdc005 + languageName: node + linkType: hard + "lodash.once@npm:^4.1.1": version: 4.1.1 resolution: "lodash.once@npm:4.1.1" @@ -4525,13 +4509,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"lodash.truncate@npm:^4.4.2": - version: 4.4.2 - resolution: "lodash.truncate@npm:4.4.2" - checksum: b463d8a382cfb5f0e71c504dcb6f807a7bd379ff1ea216669aa42c52fc28c54e404bfbd96791aa09e6df0de2c1d7b8f1b7f4b1a61f324d38fe98bc535aeee4f5 - languageName: node - linkType: hard - "lodash@npm:^4.17.14, lodash@npm:^4.17.20, lodash@npm:^4.17.21": version: 4.17.21 resolution: "lodash@npm:4.17.21" @@ -5376,13 +5353,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"progress@npm:^2.0.0": - version: 2.0.3 - resolution: "progress@npm:2.0.3" - checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 - languageName: node - linkType: hard - "prop-types@npm:^15.6.0, prop-types@npm:^15.6.2": version: 15.7.2 resolution: "prop-types@npm:15.7.2" @@ -5485,7 +5455,7 @@ fsevents@~2.3.2: "@wojtekmaj/date-utils": ^1.0.2 babel-loader: ^8.0.0 css-loader: ^6.0.0 - eslint: ~7.19.0 + eslint: ^8.5.0 get-user-locale: ^1.4.0 html-webpack-plugin: ^5.1.0 less: ^4.0.0 @@ -5512,8 +5482,8 @@ fsevents@~2.3.2: merge-class-names: ^1.1.1 prop-types: ^15.6.0 peerDependencies: - react: ^16.3.0 || ^17.0.0-0 - react-dom: ^16.3.0 || ^17.0.0-0 + react: ^16.3.0 || ^17.0.0 || ^18.0.0 + react-dom: ^16.3.0 || ^17.0.0 || ^18.0.0 languageName: node linkType: soft @@ -5640,10 +5610,10 @@ fsevents@~2.3.2: languageName: node linkType: hard -"regexpp@npm:^3.1.0": - version: 3.1.0 - resolution: "regexpp@npm:3.1.0" - checksum: 63bcb2c98d63274774c79bef256e03f716d25f1fa8427267d0302d1436a83fa0d905f4e8a172fdfa99fb4d84833df2fb3bf7da2a1a868f156e913174c32b1139 +"regexpp@npm:^3.2.0": + version: 3.2.0 + resolution: "regexpp@npm:3.2.0" + checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8 languageName: node linkType: hard @@ -5935,7 +5905,7 @@ fsevents@~2.3.2: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.2.1, semver@npm:^7.3.2, semver@npm:^7.3.5": +"semver@npm:^7.0.0, semver@npm:^7.3.2, semver@npm:^7.3.5": version: 7.3.5 resolution: "semver@npm:7.3.5" dependencies: @@ -6063,17 +6033,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"slice-ansi@npm:^4.0.0": - version: 4.0.0 - resolution: "slice-ansi@npm:4.0.0" - dependencies: - ansi-styles: ^4.0.0 - astral-regex: ^2.0.0 - is-fullwidth-code-point: ^3.0.0 - checksum: 4a82d7f085b0e1b070e004941ada3c40d3818563ac44766cca4ceadd2080427d337554f9f99a13aaeb3b4a94d9964d9466c807b3d7b7541d1ec37ee32d308756 - languageName: node - linkType: hard - "sockjs@npm:^0.3.21": version: 0.3.21 resolution: "sockjs@npm:0.3.21" @@ -6157,13 +6116,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"sprintf-js@npm:~1.0.2": - version: 1.0.3 - resolution: "sprintf-js@npm:1.0.3" - checksum: 19d79aec211f09b99ec3099b5b2ae2f6e9cdefe50bc91ac4c69144b6d3928a640bb6ae5b3def70c2e85a2c3d9f5ec2719921e3a59d3ca3ef4b2fd1a4656a0df3 - languageName: node - linkType: hard - "sshpk@npm:^1.7.0": version: 1.16.1 resolution: "sshpk@npm:1.16.1" @@ -6210,17 +6162,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"string-width@npm:^4.2.0": - version: 4.2.0 - resolution: "string-width@npm:4.2.0" - dependencies: - emoji-regex: ^8.0.0 - is-fullwidth-code-point: ^3.0.0 - strip-ansi: ^6.0.0 - checksum: ee2c68df9a3ce4256565d2bdc8490f5706f195f88e799d3d425889264d3eff3d7984fe8b38dfc983dac948e03d8cdc737294b1c81f1528c37c9935d86b67593d - languageName: node - linkType: hard - "string.prototype.trimend@npm:^1.0.4": version: 1.0.4 resolution: "string.prototype.trimend@npm:1.0.4" @@ -6268,12 +6209,12 @@ fsevents@~2.3.2: languageName: node linkType: hard -"strip-ansi@npm:^6.0.0": - version: 6.0.0 - resolution: "strip-ansi@npm:6.0.0" +"strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" dependencies: - ansi-regex: ^5.0.0 - checksum: 04c3239ede44c4d195b0e66c0ad58b932f08bec7d05290416d361ff908ad282ecdaf5d9731e322c84f151d427436bde01f05b7422c3ec26dd927586736b0e5d0 + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c languageName: node linkType: hard @@ -6327,20 +6268,6 @@ fsevents@~2.3.2: languageName: node linkType: hard -"table@npm:^6.0.4": - version: 6.7.1 - resolution: "table@npm:6.7.1" - dependencies: - ajv: ^8.0.1 - lodash.clonedeep: ^4.5.0 - lodash.truncate: ^4.4.2 - slice-ansi: ^4.0.0 - string-width: ^4.2.0 - strip-ansi: ^6.0.0 - checksum: 053b61fa4e8f8396c65ff7a95da90e85620370932652d501ff7a0a3ed7317f1cc549702bd2abf2bd9ed01e20757b73a8b57374f8a8a2ac02fbe0550276263fb6 - languageName: node - linkType: hard - "tapable@npm:^2.0.0, tapable@npm:^2.1.1, tapable@npm:^2.2.0": version: 2.2.0 resolution: "tapable@npm:2.2.0" @@ -6483,10 +6410,10 @@ fsevents@~2.3.2: languageName: node linkType: hard -"type-fest@npm:^0.8.1": - version: 0.8.1 - resolution: "type-fest@npm:0.8.1" - checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 +"type-fest@npm:^0.20.2": + version: 0.20.2 + resolution: "type-fest@npm:0.20.2" + checksum: 4fb3272df21ad1c552486f8a2f8e115c09a521ad7a8db3d56d53718d0c907b62c6e9141ba5f584af3f6830d0872c521357e512381f24f7c44acae583ad517d73 languageName: node linkType: hard diff --git a/yarn.lock b/yarn.lock index 5115ea8f..bf29cf58 100644 --- a/yarn.lock +++ b/yarn.lock @@ -32,7 +32,7 @@ __metadata: languageName: node linkType: hard -"@babel/code-frame@npm:^7.0.0, @babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.14.5": +"@babel/code-frame@npm:^7.12.13, @babel/code-frame@npm:^7.14.5": version: 7.14.5 resolution: "@babel/code-frame@npm:7.14.5" dependencies: @@ -347,7 +347,7 @@ __metadata: languageName: node linkType: hard -"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.15.4, @babel/parser@npm:^7.15.5, @babel/parser@npm:^7.7.0, @babel/parser@npm:^7.7.2": +"@babel/parser@npm:^7.1.0, @babel/parser@npm:^7.15.4, @babel/parser@npm:^7.15.5, @babel/parser@npm:^7.7.2": version: 7.15.7 resolution: "@babel/parser@npm:7.15.7" bin: @@ -1304,12 +1304,12 @@ __metadata: languageName: node linkType: hard -"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.11.2, @babel/runtime@npm:^7.8.4": - version: 7.12.5 - resolution: "@babel/runtime@npm:7.12.5" +"@babel/runtime@npm:^7.10.2, @babel/runtime@npm:^7.16.3, @babel/runtime@npm:^7.8.4": + version: 7.16.7 + resolution: "@babel/runtime@npm:7.16.7" dependencies: regenerator-runtime: ^0.13.4 - checksum: 64964a0fd172917fc5faac56bea5f0e6ec6200973e4ed6373e114f23f8cd6f113be31a6559fadfdd4f62071559e05d00a391760876a00345ea7813356c880209 + checksum: 47912f0aaacd1cab2e2552aaf3e6eaffbcaf2d5ac9b07a89a12ac0d42029cb92c070b0d16f825e4277c4a34677c54d8ffe85e1f7c6feb57de58f700eec67ce2f languageName: node linkType: hard @@ -1324,7 +1324,7 @@ __metadata: languageName: node linkType: hard -"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.15.4, @babel/traverse@npm:^7.7.0, @babel/traverse@npm:^7.7.2": +"@babel/traverse@npm:^7.1.0, @babel/traverse@npm:^7.13.0, @babel/traverse@npm:^7.15.4, @babel/traverse@npm:^7.7.2": version: 7.15.4 resolution: "@babel/traverse@npm:7.15.4" dependencies: @@ -1341,7 +1341,7 @@ __metadata: languageName: node linkType: hard -"@babel/types@npm:^7.0.0, @babel/types@npm:^7.14.9, @babel/types@npm:^7.15.4, @babel/types@npm:^7.15.6, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.7.0, @babel/types@npm:^7.8.3": +"@babel/types@npm:^7.0.0, @babel/types@npm:^7.14.9, @babel/types@npm:^7.15.4, @babel/types@npm:^7.15.6, @babel/types@npm:^7.3.0, @babel/types@npm:^7.3.3, @babel/types@npm:^7.4.4, @babel/types@npm:^7.8.3": version: 7.15.6 resolution: "@babel/types@npm:7.15.6" dependencies: @@ -1358,21 +1358,38 @@ __metadata: languageName: node linkType: hard -"@eslint/eslintrc@npm:^0.3.0": - version: 0.3.0 - resolution: "@eslint/eslintrc@npm:0.3.0" +"@eslint/eslintrc@npm:^1.0.5": + version: 1.0.5 + resolution: "@eslint/eslintrc@npm:1.0.5" dependencies: ajv: ^6.12.4 - debug: ^4.1.1 - espree: ^7.3.0 - globals: ^12.1.0 + debug: ^4.3.2 + espree: ^9.2.0 + globals: ^13.9.0 ignore: ^4.0.6 import-fresh: ^3.2.1 - js-yaml: ^3.13.1 - lodash: ^4.17.20 + js-yaml: ^4.1.0 minimatch: ^3.0.4 strip-json-comments: ^3.1.1 - checksum: a8148d3868893c251c72b2674a3d57c04deda7afe8208a8f4306d129017f21bbe800a493dda9b46957d39325d28378bd48c0a10d25c89aa5516dc8691ef7ca95 + checksum: b35b50d7b65bd8acd92a05b6fb15ac62c0cefa40dfef0324ca5bf8632bf3679bab6e173c53b3ad1e1d837701cecdbd9c144b35f46588cdf4e046a9caa272488d + languageName: node + linkType: hard + +"@humanwhocodes/config-array@npm:^0.9.2": + version: 0.9.3 + resolution: "@humanwhocodes/config-array@npm:0.9.3" + dependencies: + "@humanwhocodes/object-schema": ^1.2.1 + debug: ^4.1.1 + minimatch: ^3.0.4 + checksum: 6e5d7d274941c459bab0a14a87e372206d89fad3e4879d982edc942e8cc34da6510ea3644b8535a2a9edaa6527e91dccceabc6837ffa8ee506d66bca5d269ebc + languageName: node + linkType: hard + +"@humanwhocodes/object-schema@npm:^1.2.1": + version: 1.2.1 + resolution: "@humanwhocodes/object-schema@npm:1.2.1" + checksum: a824a1ec31591231e4bad5787641f59e9633827d0a2eaae131a288d33c9ef0290bd16fda8da6f7c0fcb014147865d12118df10db57f27f41e20da92369fcb3f1 languageName: node linkType: hard @@ -1717,6 +1734,13 @@ __metadata: languageName: node linkType: hard +"@types/minimatch@npm:^3.0.3": + version: 3.0.5 + resolution: "@types/minimatch@npm:3.0.5" + checksum: c41d136f67231c3131cf1d4ca0b06687f4a322918a3a5adddc87ce90ed9dbd175a3610adee36b106ae68c0b92c637c35e02b58c8a56c424f71d30993ea220b92 + languageName: node + linkType: hard + "@types/node@npm:*": version: 13.9.1 resolution: "@types/node@npm:13.9.1" @@ -1836,7 +1860,7 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^7.1.1, acorn@npm:^7.4.0": +"acorn@npm:^7.1.1": version: 7.4.1 resolution: "acorn@npm:7.4.1" bin: @@ -1845,12 +1869,12 @@ __metadata: languageName: node linkType: hard -"acorn@npm:^8.2.4": - version: 8.5.0 - resolution: "acorn@npm:8.5.0" +"acorn@npm:^8.2.4, acorn@npm:^8.7.0": + version: 8.7.0 + resolution: "acorn@npm:8.7.0" bin: acorn: bin/acorn - checksum: 2e4c1dbed3da327684863debf31d341bf8882c6893c506653872c00977eee45675feb9129255d6c74c88424d2b20d889ca6de5b39776e5e3cccfc756b3ca1da8 + checksum: e0f79409d68923fbf1aa6d4166f3eedc47955320d25c89a20cc822e6ba7c48c5963d5bc657bc242d68f7a4ac9faf96eef033e8f73656da6c640d4219935fdfd0 languageName: node linkType: hard @@ -1875,25 +1899,6 @@ __metadata: languageName: node linkType: hard -"ajv@npm:^8.0.1": - version: 8.6.1 - resolution: "ajv@npm:8.6.1" - dependencies: - fast-deep-equal: ^3.1.1 - json-schema-traverse: ^1.0.0 - require-from-string: ^2.0.2 - uri-js: ^4.2.2 - checksum: e091264ff6c8134d9072e804f6f1d56e8dacc143537852d9afb456f0bb6c4eff98307e152da2faf7afef2ebf665278316aa5cf30f7d81ccecc9654c11629e2a6 - languageName: node - linkType: hard - -"ansi-colors@npm:^4.1.1": - version: 4.1.1 - resolution: "ansi-colors@npm:4.1.1" - checksum: 138d04a51076cb085da0a7e2d000c5c0bb09f6e772ed5c65c53cb118d37f6c5f1637506d7155fb5f330f0abcf6f12fa2e489ac3f8cdab9da393bf1bb4f9a32b0 - languageName: node - linkType: hard - "ansi-escapes@npm:^4.2.1": version: 4.3.1 resolution: "ansi-escapes@npm:4.3.1" @@ -1910,7 +1915,7 @@ __metadata: languageName: node linkType: hard -"ansi-regex@npm:^5.0.0": +"ansi-regex@npm:^5.0.0, ansi-regex@npm:^5.0.1": version: 5.0.1 resolution: "ansi-regex@npm:5.0.1" checksum: 2aa4bb54caf2d622f1afdad09441695af2a83aa3fe8b8afa581d205e57ed4261c183c4d3877cee25794443fde5876417d859c108078ab788d6af7e4fe52eb66b @@ -1979,6 +1984,13 @@ __metadata: languageName: node linkType: hard +"argparse@npm:^2.0.1": + version: 2.0.1 + resolution: "argparse@npm:2.0.1" + checksum: 83644b56493e89a254bae05702abf3a1101b4fa4d0ca31df1c9985275a5a5bd47b3c27b7fa0b71098d41114d8ca000e6ed90cad764b306f8a503665e4d517ced + languageName: node + linkType: hard + "aria-query@npm:^4.2.2": version: 4.2.2 resolution: "aria-query@npm:4.2.2" @@ -1989,6 +2001,13 @@ __metadata: languageName: node linkType: hard +"array-differ@npm:^3.0.0": + version: 3.0.0 + resolution: "array-differ@npm:3.0.0" + checksum: 117edd9df5c1530bd116c6e8eea891d4bd02850fd89b1b36e532b6540e47ca620a373b81feca1c62d1395d9ae601516ba538abe5e8172d41091da2c546b05fb7 + languageName: node + linkType: hard + "array-filter@npm:^1.0.0": version: 1.0.0 resolution: "array-filter@npm:1.0.0" @@ -1996,35 +2015,52 @@ __metadata: languageName: node linkType: hard -"array-includes@npm:^3.1.1": - version: 3.1.1 - resolution: "array-includes@npm:3.1.1" +"array-includes@npm:^3.1.3, array-includes@npm:^3.1.4": + version: 3.1.4 + resolution: "array-includes@npm:3.1.4" dependencies: + call-bind: ^1.0.2 define-properties: ^1.1.3 - es-abstract: ^1.17.0 - is-string: ^1.0.5 - checksum: e6d35d400c156a7242eb7fdeac5a64fe2d2c96613c55daea015d828691d8f26c2bd1b34f9786728fb3b00f2d0211374ecf2e1c5f8a56beb434bf8b2a9725235f + es-abstract: ^1.19.1 + get-intrinsic: ^1.1.1 + is-string: ^1.0.7 + checksum: 69967c38c52698f84b50a7aed5554aadc89c6ac6399b6d92ad061a5952f8423b4bba054c51d40963f791dfa294d7247cdd7988b6b1f2c5861477031c6386e1c0 languageName: node linkType: hard -"array.prototype.flat@npm:^1.2.3": - version: 1.2.3 - resolution: "array.prototype.flat@npm:1.2.3" +"array-union@npm:^2.1.0": + version: 2.1.0 + resolution: "array-union@npm:2.1.0" + checksum: 5bee12395cba82da674931df6d0fea23c4aa4660cb3b338ced9f828782a65caa232573e6bf3968f23e0c5eb301764a382cef2f128b170a9dc59de0e36c39f98d + languageName: node + linkType: hard + +"array.prototype.flat@npm:^1.2.3, array.prototype.flat@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.flat@npm:1.2.5" dependencies: + call-bind: ^1.0.2 define-properties: ^1.1.3 - es-abstract: ^1.17.0-next.1 - checksum: ba4cf6e53871902a09fa7f56ff097e836f18d59de0219fe271e3d1a895a7ea98a62fa946cbdae95e73b774991206a32a26822227d081bd2cc5c771b95f851753 + es-abstract: ^1.19.0 + checksum: 9cc6414b111abfc7717e39546e4887b1e5ec74df8f1618d83425deaa95752bf05d475d1d241253b4d88d4a01f8e1bc84845ad5b7cc2047f8db2f614512acd40e languageName: node linkType: hard -"array.prototype.flatmap@npm:^1.2.3": - version: 1.2.3 - resolution: "array.prototype.flatmap@npm:1.2.3" +"array.prototype.flatmap@npm:^1.2.5": + version: 1.2.5 + resolution: "array.prototype.flatmap@npm:1.2.5" dependencies: + call-bind: ^1.0.0 define-properties: ^1.1.3 - es-abstract: ^1.17.0-next.1 - function-bind: ^1.1.1 - checksum: d0f96793d3763cb3aa48a0a9860255c2f10eeaa9584a6e6e2315db67a2088a4a6a27e62ae5fdd3f49a1a61b4f481ed4991d95c9e752d581bae2ff73fff446607 + es-abstract: ^1.19.0 + checksum: a14119a28e5687a13cf3fd6756a8e7810563a9e81cd4227e27a25c31d362df47ac72553f06a271fd728741e199047933ad43d561d64a28da0b4e1a26f74e939e + languageName: node + linkType: hard + +"arrify@npm:^2.0.1": + version: 2.0.1 + resolution: "arrify@npm:2.0.1" + checksum: 067c4c1afd182806a82e4c1cb8acee16ab8b5284fbca1ce29408e6e91281c36bb5b612f6ddfbd40a0f7a7e0c75bf2696eb94c027f6e328d6e9c52465c98e4209 languageName: node linkType: hard @@ -2051,13 +2087,6 @@ __metadata: languageName: node linkType: hard -"astral-regex@npm:^2.0.0": - version: 2.0.0 - resolution: "astral-regex@npm:2.0.0" - checksum: 876231688c66400473ba505731df37ea436e574dd524520294cc3bbc54ea40334865e01fa0d074d74d036ee874ee7e62f486ea38bc421ee8e6a871c06f011766 - languageName: node - linkType: hard - "asynckit@npm:^0.4.0": version: 0.4.0 resolution: "asynckit@npm:0.4.0" @@ -2079,10 +2108,10 @@ __metadata: languageName: node linkType: hard -"axe-core@npm:^4.0.2": - version: 4.0.2 - resolution: "axe-core@npm:4.0.2" - checksum: 56a0203d3e39091ff7886a8b22f7790187db88171863cbd487ee71b733143556ad2eb50c542dc1bd3f519de25cc3a238cf6627e5d00535483f2cd07aef7d27fb +"axe-core@npm:^4.3.5": + version: 4.3.5 + resolution: "axe-core@npm:4.3.5" + checksum: 973c6a80f0aaa663820b209d4202de7a0c240a2dea2f3cff168b09c0f221b27179b1f0988f00ad11ed63cbc50535920f8ca779de1c60dc82090ab2d275f71fdd languageName: node linkType: hard @@ -2093,22 +2122,6 @@ __metadata: languageName: node linkType: hard -"babel-eslint@npm:^10.0.0": - version: 10.1.0 - resolution: "babel-eslint@npm:10.1.0" - dependencies: - "@babel/code-frame": ^7.0.0 - "@babel/parser": ^7.7.0 - "@babel/traverse": ^7.7.0 - "@babel/types": ^7.7.0 - eslint-visitor-keys: ^1.0.0 - resolve: ^1.12.0 - peerDependencies: - eslint: ">= 4.12.1" - checksum: bdc1f62b6b0f9c4d5108c96d835dad0c0066bc45b7c020fcb2d6a08107cf69c9217a99d3438dbd701b2816896190c4283ba04270ed9a8349ee07bd8dafcdc050 - languageName: node - linkType: hard - "babel-jest@npm:^27.2.1": version: 27.2.1 resolution: "babel-jest@npm:27.2.1" @@ -2374,6 +2387,16 @@ __metadata: languageName: node linkType: hard +"chalk@npm:^3.0.0": + version: 3.0.0 + resolution: "chalk@npm:3.0.0" + dependencies: + ansi-styles: ^4.1.0 + supports-color: ^7.1.0 + checksum: 8e3ddf3981c4da405ddbd7d9c8d91944ddf6e33d6837756979f7840a29272a69a5189ecae0ff84006750d6d1e92368d413335eab4db5476db6e6703a1d1e0505 + languageName: node + linkType: hard + "chalk@npm:^4.0.0": version: 4.0.0 resolution: "chalk@npm:4.0.0" @@ -2560,13 +2583,6 @@ __metadata: languageName: node linkType: hard -"confusing-browser-globals@npm:^1.0.9": - version: 1.0.9 - resolution: "confusing-browser-globals@npm:1.0.9" - checksum: 585f244fc05bdcede9bd8831c41ff22b3fb0629e3ac6a495330a59c1aa9c30f3c1544498b6ff4f5a0bb302f7bedfbbb3f59d591556856e80622fd51b1dff351c - languageName: node - linkType: hard - "console-control-strings@npm:^1.0.0, console-control-strings@npm:~1.1.0": version: 1.1.0 resolution: "console-control-strings@npm:1.1.0" @@ -2574,13 +2590,6 @@ __metadata: languageName: node linkType: hard -"contains-path@npm:^0.1.0": - version: 0.1.0 - resolution: "contains-path@npm:0.1.0" - checksum: 94ecfd944e0bc51be8d3fc596dcd17d705bd4c8a1a627952a3a8c5924bac01c7ea19034cf40b4b4f89e576cdead130a7e5fd38f5f7f07ef67b4b261d875871e3 - languageName: node - linkType: hard - "convert-source-map@npm:^1.1.0, convert-source-map@npm:^1.4.0, convert-source-map@npm:^1.6.0, convert-source-map@npm:^1.7.0": version: 1.7.0 resolution: "convert-source-map@npm:1.7.0" @@ -2623,7 +2632,7 @@ __metadata: languageName: node linkType: hard -"cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": +"cross-spawn@npm:^7.0.0, cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3": version: 7.0.3 resolution: "cross-spawn@npm:7.0.3" dependencies: @@ -2677,10 +2686,10 @@ __metadata: languageName: node linkType: hard -"damerau-levenshtein@npm:^1.0.6": - version: 1.0.6 - resolution: "damerau-levenshtein@npm:1.0.6" - checksum: 4746e69c33e83038cac1f26100be6eb6a1cc1e52bdbf6d1c14a91aa0323cac35aea7e4f2bedf53e39db80c08853c88ec64b0e8b1622f05c80281636d4da7d139 +"damerau-levenshtein@npm:^1.0.7": + version: 1.0.8 + resolution: "damerau-levenshtein@npm:1.0.8" + checksum: d240b7757544460ae0586a341a53110ab0a61126570ef2d8c731e3eab3f0cb6e488e2609e6a69b46727635de49be20b071688698744417ff1b6c1d7ccd03e0de languageName: node linkType: hard @@ -2704,15 +2713,15 @@ __metadata: languageName: node linkType: hard -"debug@npm:4, debug@npm:^4.0.1, debug@npm:^4.1.0, debug@npm:^4.1.1": - version: 4.3.2 - resolution: "debug@npm:4.3.2" +"debug@npm:4, debug@npm:^4.1.0, debug@npm:^4.1.1, debug@npm:^4.3.2": + version: 4.3.3 + resolution: "debug@npm:4.3.3" dependencies: ms: 2.1.2 peerDependenciesMeta: supports-color: optional: true - checksum: 820ea160e267e23c953c9ed87e7ad93494d8cda2f7349af5e7e3bb236d23707ee3022f477d5a7d2ee86ef2bf7d60aa9ab22d1f58080d7deb9dccd073585e1e43 + checksum: 14472d56fe4a94dbcfaa6dbed2dd3849f1d72ba78104a1a328047bb564643ca49df0224c3a17fa63533fd11dd3d4c8636cd861191232a2c6735af00cc2d4de16 languageName: node linkType: hard @@ -2725,12 +2734,12 @@ __metadata: languageName: node linkType: hard -"debug@npm:^3.2.6": - version: 3.2.6 - resolution: "debug@npm:3.2.6" +"debug@npm:^3.2.6, debug@npm:^3.2.7": + version: 3.2.7 + resolution: "debug@npm:3.2.7" dependencies: ms: ^2.1.1 - checksum: 07bc8b3a13ef3cfa6c06baf7871dfb174c291e5f85dbf566f086620c16b9c1a0e93bb8f1935ebbd07a683249e7e30286f2966e2ef461e8fd17b1b60732062d6b + checksum: b3d8c5940799914d30314b7c3304a43305fd0715581a919dacb8b3176d024a782062368405b47491516d2091d6462d4d11f2f4974a405048094f8bfebfa3071c languageName: node linkType: hard @@ -2806,16 +2815,6 @@ __metadata: languageName: node linkType: hard -"doctrine@npm:1.5.0": - version: 1.5.0 - resolution: "doctrine@npm:1.5.0" - dependencies: - esutils: ^2.0.2 - isarray: ^1.0.0 - checksum: 7ce8102a05cbb9d942d49db5461d2f3dd1208ebfed929bf1c04770a1ef6ef540b792e63c45eae4c51f8b16075e0af4a73581a06bad31c37ceb0988f2e398509b - languageName: node - linkType: hard - "doctrine@npm:^2.1.0": version: 2.1.0 resolution: "doctrine@npm:2.1.0" @@ -2912,19 +2911,19 @@ __metadata: languageName: node linkType: hard -"emoji-regex@npm:^9.0.0": - version: 9.0.0 - resolution: "emoji-regex@npm:9.0.0" - checksum: 632f1b824a6d0b9ba70a471e01ff3fe787d809cfea721542b220096ce1e02eac50a4d4147d7fff434ff46d0fb5e62a97875404dbaea471a48f1f9232b75f9434 +"emoji-regex@npm:^9.2.2": + version: 9.2.2 + resolution: "emoji-regex@npm:9.2.2" + checksum: 8487182da74aabd810ac6d6f1994111dfc0e331b01271ae01ec1eb0ad7b5ecc2bbbbd2f053c05cb55a1ac30449527d819bbfbf0e3de1023db308cbcb47f86601 languageName: node linkType: hard -"enquirer@npm:^2.3.5": - version: 2.3.6 - resolution: "enquirer@npm:2.3.6" +"end-of-stream@npm:^1.1.0": + version: 1.4.4 + resolution: "end-of-stream@npm:1.4.4" dependencies: - ansi-colors: ^4.1.1 - checksum: 1c0911e14a6f8d26721c91e01db06092a5f7675159f0261d69c403396a385afd13dd76825e7678f66daffa930cfaa8d45f506fb35f818a2788463d022af1b884 + once: ^1.4.0 + checksum: 530a5a5a1e517e962854a31693dbb5c0b2fc40b46dad2a56a2deec656ca040631124f4795823acc68238147805f8b021abbe221f4afed5ef3c8e8efc2024908b languageName: node linkType: hard @@ -2993,36 +2992,31 @@ __metadata: languageName: node linkType: hard -"error-ex@npm:^1.2.0": - version: 1.3.2 - resolution: "error-ex@npm:1.3.2" - dependencies: - is-arrayish: ^0.2.1 - checksum: c1c2b8b65f9c91b0f9d75f0debaa7ec5b35c266c2cac5de412c1a6de86d4cbae04ae44e510378cb14d032d0645a36925d0186f8bb7367bcc629db256b743a001 - languageName: node - linkType: hard - -"es-abstract@npm:^1.17.0, es-abstract@npm:^1.17.0-next.1, es-abstract@npm:^1.17.5, es-abstract@npm:^1.18.0-next.1, es-abstract@npm:^1.18.0-next.2": - version: 1.18.0 - resolution: "es-abstract@npm:1.18.0" +"es-abstract@npm:^1.17.0-next.1, es-abstract@npm:^1.18.0-next.1, es-abstract@npm:^1.18.0-next.2, es-abstract@npm:^1.19.0, es-abstract@npm:^1.19.1": + version: 1.19.1 + resolution: "es-abstract@npm:1.19.1" dependencies: call-bind: ^1.0.2 es-to-primitive: ^1.2.1 function-bind: ^1.1.1 get-intrinsic: ^1.1.1 + get-symbol-description: ^1.0.0 has: ^1.0.3 has-symbols: ^1.0.2 - is-callable: ^1.2.3 + internal-slot: ^1.0.3 + is-callable: ^1.2.4 is-negative-zero: ^2.0.1 - is-regex: ^1.1.2 - is-string: ^1.0.5 - object-inspect: ^1.9.0 + is-regex: ^1.1.4 + is-shared-array-buffer: ^1.0.1 + is-string: ^1.0.7 + is-weakref: ^1.0.1 + object-inspect: ^1.11.0 object-keys: ^1.1.1 object.assign: ^4.1.2 string.prototype.trimend: ^1.0.4 string.prototype.trimstart: ^1.0.4 - unbox-primitive: ^1.0.0 - checksum: 6783bea97f372fd4f1fc77e4e294d024b9f40559a83b40c46b69565511cf13d462a6189b822228c6bb818bd09d2f23b33500206d39bbdc69f7cc7ffebf6640a1 + unbox-primitive: ^1.0.1 + checksum: b6be8410672c5364db3fb01eb786e30c7b4bb32b4af63d381c08840f4382c4a168e7855cd338bf59d4f1a1a1138f4d748d1fd40ec65aaa071876f9e9fbfed949 languageName: node linkType: hard @@ -3058,6 +3052,13 @@ __metadata: languageName: node linkType: hard +"escape-string-regexp@npm:^4.0.0": + version: 4.0.0 + resolution: "escape-string-regexp@npm:4.0.0" + checksum: 98b48897d93060f2322108bf29db0feba7dd774be96cd069458d1453347b25ce8682ecc39859d4bca2203cc0ab19c237bcc71755eff49a0f8d90beadeeba5cc5 + languageName: node + linkType: hard + "escodegen@npm:^2.0.0": version: 2.0.0 resolution: "escodegen@npm:2.0.0" @@ -3077,170 +3078,136 @@ __metadata: languageName: node linkType: hard -"eslint-config-airbnb-base@npm:^14.2.0": - version: 14.2.0 - resolution: "eslint-config-airbnb-base@npm:14.2.0" +"eslint-config-wojtekmaj@npm:^0.6.5": + version: 0.6.5 + resolution: "eslint-config-wojtekmaj@npm:0.6.5" dependencies: - confusing-browser-globals: ^1.0.9 - object.assign: ^4.1.0 - object.entries: ^1.1.2 + eslint-plugin-import: ^2.25.0 + eslint-plugin-jsx-a11y: ^6.5.0 + eslint-plugin-react: ^7.28.0 + eslint-plugin-react-hooks: ^4.3.0 peerDependencies: - eslint: ^5.16.0 || ^6.8.0 || ^7.2.0 - eslint-plugin-import: ^2.21.2 - checksum: c59856fc840e321bcd8c300a65742f9c71dc9e2a10a0d0e810ee3f27575da970ba75c01311c246dca513770ea128ce22984c0271b1bf45f9cea53fe9f13b4a39 + eslint: ^7.0.0 || ^8.0.0 + checksum: c856213f1cad2020b715df081cba255ea4e9ebed18f3a4c12b39bb87ae20fe8545518172c62a01cd5e2c7f8793265cf87f2535e57326b8b21cc2fc4717274c94 languageName: node linkType: hard -"eslint-config-airbnb@npm:^18.2.0": - version: 18.2.0 - resolution: "eslint-config-airbnb@npm:18.2.0" +"eslint-import-resolver-node@npm:^0.3.6": + version: 0.3.6 + resolution: "eslint-import-resolver-node@npm:0.3.6" dependencies: - eslint-config-airbnb-base: ^14.2.0 - object.assign: ^4.1.0 - object.entries: ^1.1.2 - peerDependencies: - eslint: ^5.16.0 || ^6.8.0 || ^7.2.0 - eslint-plugin-import: ^2.21.2 - eslint-plugin-jsx-a11y: ^6.3.0 - eslint-plugin-react: ^7.20.0 - eslint-plugin-react-hooks: ^4 || ^3 || ^2.3.0 || ^1.7.0 - checksum: 2979d93609cea6d4b8f9965416125e82d081e2aab0dfcd867a371a0ee482d42d5d6f520243c128b8ab1ce995835d05f4c4bc3a020d26922ce8abab41c65b9129 - languageName: node - linkType: hard - -"eslint-config-wojtekmaj@npm:^0.5.0": - version: 0.5.0 - resolution: "eslint-config-wojtekmaj@npm:0.5.0" - dependencies: - eslint-config-airbnb: ^18.2.0 - eslint-config-airbnb-base: ^14.2.0 - eslint-plugin-import: ^2.22.0 - eslint-plugin-jsx-a11y: ^6.4.0 - eslint-plugin-react: ^7.21.0 - eslint-plugin-react-hooks: ^4.2.0 - peerDependencies: - eslint: ^7.0.0 - checksum: 0ec4fd99a6b38473cbe1a2dd9218c9138b3b33ae73fa3b201cdff53712bb9deb2edf1a800a45c89942f7c09e2ed03287fcf515eb8b53c7f162bd421b524100c4 - languageName: node - linkType: hard - -"eslint-import-resolver-node@npm:^0.3.4": - version: 0.3.4 - resolution: "eslint-import-resolver-node@npm:0.3.4" - dependencies: - debug: ^2.6.9 - resolve: ^1.13.1 - checksum: a0db55ec26c5bb385c8681af6b8d6dee16768d5f27dff72c3113407d0f028f28e56dcb1cc3a4689c79396a5f6a9c24bd0cac9a2c9c588c7d7357d24a42bec876 + debug: ^3.2.7 + resolve: ^1.20.0 + checksum: 6266733af1e112970e855a5bcc2d2058fb5ae16ad2a6d400705a86b29552b36131ffc5581b744c23d550de844206fb55e9193691619ee4dbf225c4bde526b1c8 languageName: node linkType: hard -"eslint-module-utils@npm:^2.6.0": - version: 2.6.0 - resolution: "eslint-module-utils@npm:2.6.0" +"eslint-module-utils@npm:^2.7.2": + version: 2.7.2 + resolution: "eslint-module-utils@npm:2.7.2" dependencies: - debug: ^2.6.9 - pkg-dir: ^2.0.0 - checksum: 489bb82248e1090515701cc9614a6e183dac34805bc1cb205cf411a875b8db756b0c05141f9ddb64395ec1d518a99c7f113ac181929a0e995968b8584d7f5a63 + debug: ^3.2.7 + find-up: ^2.1.0 + checksum: 3e6407461d12b1568556fc9a84668415693ecce92d17d7407353defcfcafec5d3d8dfa2d9eda3743b3b53ef04101d8aa69072b3d634d92e766c3dfa10505542d languageName: node linkType: hard -"eslint-plugin-import@npm:^2.22.0": - version: 2.22.1 - resolution: "eslint-plugin-import@npm:2.22.1" +"eslint-plugin-import@npm:^2.25.0": + version: 2.25.4 + resolution: "eslint-plugin-import@npm:2.25.4" dependencies: - array-includes: ^3.1.1 - array.prototype.flat: ^1.2.3 - contains-path: ^0.1.0 + array-includes: ^3.1.4 + array.prototype.flat: ^1.2.5 debug: ^2.6.9 - doctrine: 1.5.0 - eslint-import-resolver-node: ^0.3.4 - eslint-module-utils: ^2.6.0 + doctrine: ^2.1.0 + eslint-import-resolver-node: ^0.3.6 + eslint-module-utils: ^2.7.2 has: ^1.0.3 + is-core-module: ^2.8.0 + is-glob: ^4.0.3 minimatch: ^3.0.4 - object.values: ^1.1.1 - read-pkg-up: ^2.0.0 - resolve: ^1.17.0 - tsconfig-paths: ^3.9.0 + object.values: ^1.1.5 + resolve: ^1.20.0 + tsconfig-paths: ^3.12.0 peerDependencies: - eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 - checksum: b043d5b67c0130545bfb7695abcd28fd605e4ccac580ec937217d078c5361800d3626a45dec43c2c697431c4c657b83be504e07605da1afb4a2ebc894a661f19 + eslint: ^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 + checksum: 0af24f5c7c6ca692f42e3947127f0ae7dfe44f1e02740f7cbe988b510a9c52bab0065d7df04e2d953dcc88a4595a00cbdcf14018acf8cd75cfd47b72efcbb734 languageName: node linkType: hard -"eslint-plugin-jsx-a11y@npm:^6.4.0": - version: 6.4.1 - resolution: "eslint-plugin-jsx-a11y@npm:6.4.1" +"eslint-plugin-jsx-a11y@npm:^6.5.0": + version: 6.5.1 + resolution: "eslint-plugin-jsx-a11y@npm:6.5.1" dependencies: - "@babel/runtime": ^7.11.2 + "@babel/runtime": ^7.16.3 aria-query: ^4.2.2 - array-includes: ^3.1.1 + array-includes: ^3.1.4 ast-types-flow: ^0.0.7 - axe-core: ^4.0.2 + axe-core: ^4.3.5 axobject-query: ^2.2.0 - damerau-levenshtein: ^1.0.6 - emoji-regex: ^9.0.0 + damerau-levenshtein: ^1.0.7 + emoji-regex: ^9.2.2 has: ^1.0.3 - jsx-ast-utils: ^3.1.0 + jsx-ast-utils: ^3.2.1 language-tags: ^1.0.5 + minimatch: ^3.0.4 peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 - checksum: 30326276385b6029754fbca0a25140be0f2f84d263b38f794651acf973399ea316ab1b9d69dffb9b9807d2b47592ba4bc271a242edbb15abfc05d07b08060a7e + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: 311ab993ed982d0cc7cb0ba02fbc4b36c4a94e9434f31e97f13c4d67e8ecb8aec36baecfd759ff70498846e7e11d7a197eb04c39ad64934baf3354712fd0bc9d languageName: node linkType: hard -"eslint-plugin-react-hooks@npm:^4.2.0": - version: 4.2.0 - resolution: "eslint-plugin-react-hooks@npm:4.2.0" +"eslint-plugin-react-hooks@npm:^4.3.0": + version: 4.3.0 + resolution: "eslint-plugin-react-hooks@npm:4.3.0" peerDependencies: - eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - checksum: ead5c5be3ded82a0cf295b064376adb1998a43e2262b605eecc0efc88283dec4e159ca39307fafb3d8e661dd08e5a4c8cdfed97eea78f923954f72bad6e20397 + eslint: ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0-0 + checksum: 0ba1566ba0780bbc75a5921f49188edf232db2085ab32c8d3889592f0db9d6fadc97fcf639775e0101dec6b5409ca3c803ec44213b90c8bacaf0bdf921871c2e languageName: node linkType: hard -"eslint-plugin-react@npm:^7.21.0": - version: 7.21.5 - resolution: "eslint-plugin-react@npm:7.21.5" +"eslint-plugin-react@npm:^7.28.0": + version: 7.28.0 + resolution: "eslint-plugin-react@npm:7.28.0" dependencies: - array-includes: ^3.1.1 - array.prototype.flatmap: ^1.2.3 + array-includes: ^3.1.4 + array.prototype.flatmap: ^1.2.5 doctrine: ^2.1.0 - has: ^1.0.3 + estraverse: ^5.3.0 jsx-ast-utils: ^2.4.1 || ^3.0.0 - object.entries: ^1.1.2 - object.fromentries: ^2.0.2 - object.values: ^1.1.1 + minimatch: ^3.0.4 + object.entries: ^1.1.5 + object.fromentries: ^2.0.5 + object.hasown: ^1.1.0 + object.values: ^1.1.5 prop-types: ^15.7.2 - resolve: ^1.18.1 - string.prototype.matchall: ^4.0.2 + resolve: ^2.0.0-next.3 + semver: ^6.3.0 + string.prototype.matchall: ^4.0.6 peerDependencies: - eslint: ^3 || ^4 || ^5 || ^6 || ^7 - checksum: 93a006413ce057b08bfedae4581c32c28f6f42f86823e7c991321c8a1e178787424368472c657594a9c4c9291c9e870c72288931948b2af23840031433074a22 + eslint: ^3 || ^4 || ^5 || ^6 || ^7 || ^8 + checksum: 90293d0fd53bb1f735ffd32141cdd211fb1120c9f7bbe5342f9e923261a39e52a2b2575d4e46c9cd77d257f42db4a99b8b339689fc5b5c1c26048929f69b1784 languageName: node linkType: hard -"eslint-scope@npm:^5.1.1": - version: 5.1.1 - resolution: "eslint-scope@npm:5.1.1" +"eslint-scope@npm:^7.1.0": + version: 7.1.0 + resolution: "eslint-scope@npm:7.1.0" dependencies: esrecurse: ^4.3.0 - estraverse: ^4.1.1 - checksum: 47e4b6a3f0cc29c7feedee6c67b225a2da7e155802c6ea13bbef4ac6b9e10c66cd2dcb987867ef176292bf4e64eccc680a49e35e9e9c669f4a02bac17e86abdb + estraverse: ^5.2.0 + checksum: 2070470a0725438ed47075b2574a4c03cf59aa32648da8cff9e3548c84f6b0079cfdb9ee1dd7ab0bfe97011f64b2af5bfd4b69cf14a1292130dec661eec7914a languageName: node linkType: hard -"eslint-utils@npm:^2.1.0": - version: 2.1.0 - resolution: "eslint-utils@npm:2.1.0" +"eslint-utils@npm:^3.0.0": + version: 3.0.0 + resolution: "eslint-utils@npm:3.0.0" dependencies: - eslint-visitor-keys: ^1.1.0 - checksum: 27500938f348da42100d9e6ad03ae29b3de19ba757ae1a7f4a087bdcf83ac60949bbb54286492ca61fac1f5f3ac8692dd21537ce6214240bf95ad0122f24d71d - languageName: node - linkType: hard - -"eslint-visitor-keys@npm:^1.0.0, eslint-visitor-keys@npm:^1.1.0, eslint-visitor-keys@npm:^1.3.0": - version: 1.3.0 - resolution: "eslint-visitor-keys@npm:1.3.0" - checksum: 37a19b712f42f4c9027e8ba98c2b06031c17e0c0a4c696cd429bd9ee04eb43889c446f2cd545e1ff51bef9593fcec94ecd2c2ef89129fcbbf3adadbef520376a + eslint-visitor-keys: ^2.0.0 + peerDependencies: + eslint: ">=5" + checksum: 0668fe02f5adab2e5a367eee5089f4c39033af20499df88fe4e6aba2015c20720404d8c3d6349b6f716b08fdf91b9da4e5d5481f265049278099c4c836ccb619 languageName: node linkType: hard @@ -3251,61 +3218,66 @@ __metadata: languageName: node linkType: hard -"eslint@npm:~7.19.0": - version: 7.19.0 - resolution: "eslint@npm:7.19.0" +"eslint-visitor-keys@npm:^3.1.0, eslint-visitor-keys@npm:^3.2.0": + version: 3.2.0 + resolution: "eslint-visitor-keys@npm:3.2.0" + checksum: fdadbb26f9e6417d3db7ad4f00bb0d573b6031c32fa72e8cdae32d038223faaeddff2ee443c90cb489bf774e75bff765c00912b8f9106d65e4f202ccd78c1b18 + languageName: node + linkType: hard + +"eslint@npm:^8.5.0": + version: 8.7.0 + resolution: "eslint@npm:8.7.0" dependencies: - "@babel/code-frame": ^7.0.0 - "@eslint/eslintrc": ^0.3.0 + "@eslint/eslintrc": ^1.0.5 + "@humanwhocodes/config-array": ^0.9.2 ajv: ^6.10.0 chalk: ^4.0.0 cross-spawn: ^7.0.2 - debug: ^4.0.1 + debug: ^4.3.2 doctrine: ^3.0.0 - enquirer: ^2.3.5 - eslint-scope: ^5.1.1 - eslint-utils: ^2.1.0 - eslint-visitor-keys: ^2.0.0 - espree: ^7.3.1 - esquery: ^1.2.0 + escape-string-regexp: ^4.0.0 + eslint-scope: ^7.1.0 + eslint-utils: ^3.0.0 + eslint-visitor-keys: ^3.2.0 + espree: ^9.3.0 + esquery: ^1.4.0 esutils: ^2.0.2 - file-entry-cache: ^6.0.0 + fast-deep-equal: ^3.1.3 + file-entry-cache: ^6.0.1 functional-red-black-tree: ^1.0.1 - glob-parent: ^5.0.0 - globals: ^12.1.0 - ignore: ^4.0.6 + glob-parent: ^6.0.1 + globals: ^13.6.0 + ignore: ^5.2.0 import-fresh: ^3.0.0 imurmurhash: ^0.1.4 is-glob: ^4.0.0 - js-yaml: ^3.13.1 + js-yaml: ^4.1.0 json-stable-stringify-without-jsonify: ^1.0.1 levn: ^0.4.1 - lodash: ^4.17.20 + lodash.merge: ^4.6.2 minimatch: ^3.0.4 natural-compare: ^1.4.0 optionator: ^0.9.1 - progress: ^2.0.0 - regexpp: ^3.1.0 - semver: ^7.2.1 - strip-ansi: ^6.0.0 + regexpp: ^3.2.0 + strip-ansi: ^6.0.1 strip-json-comments: ^3.1.0 - table: ^6.0.4 text-table: ^0.2.0 v8-compile-cache: ^2.0.3 bin: eslint: bin/eslint.js - checksum: 56f05e1e00d0fa6a2583485c270f828165ede5853d7b96ca6a092ab39c74362edaa9a213019aa8b89624ecc703f6d23c1c77bfe61fa74ba249edaea80f0e1619 + checksum: 1c80375a48b0fe3ccae3c6354323e4f0e92e970f23abc5b9705b90b7aef514b69ebd0a63e74962d30789986c91fa41c0e25cd2f98f19e9e2a2d36aafdfc9ccc9 languageName: node linkType: hard -"espree@npm:^7.3.0, espree@npm:^7.3.1": - version: 7.3.1 - resolution: "espree@npm:7.3.1" +"espree@npm:^9.2.0, espree@npm:^9.3.0": + version: 9.3.0 + resolution: "espree@npm:9.3.0" dependencies: - acorn: ^7.4.0 + acorn: ^8.7.0 acorn-jsx: ^5.3.1 - eslint-visitor-keys: ^1.3.0 - checksum: aa9b50dcce883449af2e23bc2b8d9abb77118f96f4cb313935d6b220f77137eaef7724a83c3f6243b96bc0e4ab14766198e60818caad99f9519ae5a336a39b45 + eslint-visitor-keys: ^3.1.0 + checksum: c0f1885c4eab652f9be08eb9228cea0df046b559b29d4aed8d6590ea9bd60177d4cb245d204a6f737a79a096861bb4ab8e480aeb8c1dbafef5beec1157353ce4 languageName: node linkType: hard @@ -3319,12 +3291,12 @@ __metadata: languageName: node linkType: hard -"esquery@npm:^1.2.0": - version: 1.3.1 - resolution: "esquery@npm:1.3.1" +"esquery@npm:^1.4.0": + version: 1.4.0 + resolution: "esquery@npm:1.4.0" dependencies: estraverse: ^5.1.0 - checksum: 2f13235c775acf79489dd18a1a81e2a1e940b02f80994e051d0a68036cbe87c2bcbedf549c747bc4c4776f5a04f839355a344cebe31d84fb75d3fbc27f12b340 + checksum: a0807e17abd7fbe5fbd4fab673038d6d8a50675cdae6b04fbaa520c34581be0c5fa24582990e8acd8854f671dd291c78bb2efb9e0ed5b62f33bac4f9cf820210 languageName: node linkType: hard @@ -3337,17 +3309,10 @@ __metadata: languageName: node linkType: hard -"estraverse@npm:^4.1.1": - version: 4.3.0 - resolution: "estraverse@npm:4.3.0" - checksum: a6299491f9940bb246124a8d44b7b7a413a8336f5436f9837aaa9330209bd9ee8af7e91a654a3545aee9c54b3308e78ee360cef1d777d37cfef77d2fa33b5827 - languageName: node - linkType: hard - -"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0": - version: 5.2.0 - resolution: "estraverse@npm:5.2.0" - checksum: ec11b70d946bf5d7f76f91db38ef6f08109ac1b36cda293a26e678e58df4719f57f67b9ec87042afdd1f0267cee91865be3aa48d2161765a93defab5431be7b8 +"estraverse@npm:^5.1.0, estraverse@npm:^5.2.0, estraverse@npm:^5.3.0": + version: 5.3.0 + resolution: "estraverse@npm:5.3.0" + checksum: 072780882dc8416ad144f8fe199628d2b3e7bbc9989d9ed43795d2c90309a2047e6bc5979d7e2322a341163d22cfad9e21f4110597fe487519697389497e4e2b languageName: node linkType: hard @@ -3358,6 +3323,23 @@ __metadata: languageName: node linkType: hard +"execa@npm:^4.0.0": + version: 4.1.0 + resolution: "execa@npm:4.1.0" + dependencies: + cross-spawn: ^7.0.0 + get-stream: ^5.0.0 + human-signals: ^1.1.1 + is-stream: ^2.0.0 + merge-stream: ^2.0.0 + npm-run-path: ^4.0.0 + onetime: ^5.1.0 + signal-exit: ^3.0.2 + strip-final-newline: ^2.0.0 + checksum: e30d298934d9c52f90f3847704fd8224e849a081ab2b517bbc02f5f7732c24e56a21f14cb96a08256deffeb2d12b2b7cb7e2b014a12fb36f8d3357e06417ed55 + languageName: node + linkType: hard + "execa@npm:^5.0.0": version: 5.1.1 resolution: "execa@npm:5.1.1" @@ -3417,10 +3399,10 @@ __metadata: languageName: node linkType: hard -"fast-deep-equal@npm:^3.1.1": - version: 3.1.1 - resolution: "fast-deep-equal@npm:3.1.1" - checksum: 98bcc0eecef31601173aa82257f61c09789b3bd05673c0a602b449b70461ae087d6f38b3f77f9445ec79ab2f6c1ff8b6a525a2450b617b7f415a46b7c4ed691a +"fast-deep-equal@npm:^3.1.1, fast-deep-equal@npm:^3.1.3": + version: 3.1.3 + resolution: "fast-deep-equal@npm:3.1.3" + checksum: e21a9d8d84f53493b6aa15efc9cfd53dd5b714a1f23f67fb5dc8f574af80df889b3bce25dc081887c6d25457cce704e636395333abad896ccdec03abaf1f3f9d languageName: node linkType: hard @@ -3447,7 +3429,7 @@ __metadata: languageName: node linkType: hard -"file-entry-cache@npm:^6.0.0": +"file-entry-cache@npm:^6.0.1": version: 6.0.1 resolution: "file-entry-cache@npm:6.0.1" dependencies: @@ -3465,7 +3447,7 @@ __metadata: languageName: node linkType: hard -"find-up@npm:^2.0.0, find-up@npm:^2.1.0": +"find-up@npm:^2.1.0": version: 2.1.0 resolution: "find-up@npm:2.1.0" dependencies: @@ -3635,7 +3617,7 @@ __metadata: languageName: node linkType: hard -"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.1": +"get-intrinsic@npm:^1.0.2, get-intrinsic@npm:^1.1.0, get-intrinsic@npm:^1.1.1": version: 1.1.1 resolution: "get-intrinsic@npm:1.1.1" dependencies: @@ -3646,6 +3628,15 @@ __metadata: languageName: node linkType: hard +"get-stream@npm:^5.0.0": + version: 5.2.0 + resolution: "get-stream@npm:5.2.0" + dependencies: + pump: ^3.0.0 + checksum: 8bc1a23174a06b2b4ce600df38d6c98d2ef6d84e020c1ddad632ad75bac4e092eeb40e4c09e0761c35fc2dbc5e7fff5dab5e763a383582c4a167dd69a905bd12 + languageName: node + linkType: hard + "get-stream@npm:^6.0.0": version: 6.0.1 resolution: "get-stream@npm:6.0.1" @@ -3653,6 +3644,16 @@ __metadata: languageName: node linkType: hard +"get-symbol-description@npm:^1.0.0": + version: 1.0.0 + resolution: "get-symbol-description@npm:1.0.0" + dependencies: + call-bind: ^1.0.2 + get-intrinsic: ^1.1.1 + checksum: 9ceff8fe968f9270a37a1f73bf3f1f7bda69ca80f4f80850670e0e7b9444ff99323f7ac52f96567f8b5f5fbe7ac717a0d81d3407c7313e82810c6199446a5247 + languageName: node + linkType: hard + "get-user-locale@npm:^1.2.0": version: 1.3.0 resolution: "get-user-locale@npm:1.3.0" @@ -3671,7 +3672,16 @@ __metadata: languageName: node linkType: hard -"glob-parent@npm:^5.0.0, glob-parent@npm:~5.1.2": +"glob-parent@npm:^6.0.1": + version: 6.0.2 + resolution: "glob-parent@npm:6.0.2" + dependencies: + is-glob: ^4.0.3 + checksum: c13ee97978bef4f55106b71e66428eb1512e71a7466ba49025fc2aec59a5bfb0954d5abd58fc5ee6c9b076eef4e1f6d3375c2e964b88466ca390da4419a786a8 + languageName: node + linkType: hard + +"glob-parent@npm:~5.1.2": version: 5.1.2 resolution: "glob-parent@npm:5.1.2" dependencies: @@ -3701,12 +3711,12 @@ __metadata: languageName: node linkType: hard -"globals@npm:^12.1.0": - version: 12.4.0 - resolution: "globals@npm:12.4.0" +"globals@npm:^13.6.0, globals@npm:^13.9.0": + version: 13.12.0 + resolution: "globals@npm:13.12.0" dependencies: - type-fest: ^0.8.1 - checksum: 7ae5ee16a96f1e8d71065405f57da0e33267f6b070cd36a5444c7780dd28639b48b92413698ac64f04bf31594f9108878bd8cb158ecdf759c39e05634fefcca6 + type-fest: ^0.20.2 + checksum: 1f959abb11117916468a1afcba527eead152900cad652c8383c4e8976daea7ec55e1ee30c086f48d1b8655719f214e9d92eca083c3a43b5543bc4056e7e5fccf languageName: node linkType: hard @@ -3734,7 +3744,7 @@ __metadata: languageName: node linkType: hard -"has-bigints@npm:^1.0.0": +"has-bigints@npm:^1.0.1": version: 1.0.1 resolution: "has-bigints@npm:1.0.1" checksum: 44ab55868174470065d2e0f8f6def1c990d12b82162a8803c679699fa8a39f966e336f2a33c185092fe8aea7e8bf2e85f1c26add5f29d98f2318bd270096b183 @@ -3755,13 +3765,22 @@ __metadata: languageName: node linkType: hard -"has-symbols@npm:^1.0.0, has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": +"has-symbols@npm:^1.0.1, has-symbols@npm:^1.0.2": version: 1.0.2 resolution: "has-symbols@npm:1.0.2" checksum: 2309c426071731be792b5be43b3da6fb4ed7cbe8a9a6bcfca1862587709f01b33d575ce8f5c264c1eaad09fca2f9a8208c0a2be156232629daa2dd0c0740976b languageName: node linkType: hard +"has-tostringtag@npm:^1.0.0": + version: 1.0.0 + resolution: "has-tostringtag@npm:1.0.0" + dependencies: + has-symbols: ^1.0.2 + checksum: cc12eb28cb6ae22369ebaad3a8ab0799ed61270991be88f208d508076a1e99abe4198c965935ce85ea90b60c94ddda73693b0920b58e7ead048b4a391b502c1c + languageName: node + linkType: hard + "has-unicode@npm:^2.0.0": version: 2.0.1 resolution: "has-unicode@npm:2.0.1" @@ -3778,13 +3797,6 @@ __metadata: languageName: node linkType: hard -"hosted-git-info@npm:^2.1.4": - version: 2.8.9 - resolution: "hosted-git-info@npm:2.8.9" - checksum: c955394bdab888a1e9bb10eb33029e0f7ce5a2ac7b3f158099dc8c486c99e73809dca609f5694b223920ca2174db33d32b12f9a2a47141dc59607c29da5a62dd - languageName: node - linkType: hard - "html-element-map@npm:^1.2.0": version: 1.2.0 resolution: "html-element-map@npm:1.2.0" @@ -3854,6 +3866,13 @@ __metadata: languageName: node linkType: hard +"human-signals@npm:^1.1.1": + version: 1.1.1 + resolution: "human-signals@npm:1.1.1" + checksum: d587647c9e8ec24e02821b6be7de5a0fc37f591f6c4e319b3054b43fd4c35a70a94c46fc74d8c1a43c47fde157d23acd7421f375e1c1365b09a16835b8300205 + languageName: node + linkType: hard + "human-signals@npm:^2.1.0": version: 2.1.0 resolution: "human-signals@npm:2.1.0" @@ -3861,6 +3880,15 @@ __metadata: languageName: node linkType: hard +"husky@npm:^7.0.0": + version: 7.0.4 + resolution: "husky@npm:7.0.4" + bin: + husky: lib/bin.js + checksum: c6ec4af63da2c9522da8674a20ad9b48362cc92704896cc8a58c6a2a39d797feb2b806f93fbd83a6d653fbdceb2c3b6e0b602c6b2e8565206ffc2882ef7db9e9 + languageName: node + linkType: hard + "iconv-lite@npm:0.4.24, iconv-lite@npm:^0.4.4": version: 0.4.24 resolution: "iconv-lite@npm:0.4.24" @@ -3877,6 +3905,13 @@ __metadata: languageName: node linkType: hard +"ignore@npm:^5.1.4, ignore@npm:^5.2.0": + version: 5.2.0 + resolution: "ignore@npm:5.2.0" + checksum: 6b1f926792d614f64c6c83da3a1f9c83f6196c2839aa41e1e32dd7b8d174cef2e329d75caabb62cb61ce9dc432f75e67d07d122a037312db7caa73166a1bdb77 + languageName: node + linkType: hard + "image-size@npm:~0.5.0": version: 0.5.5 resolution: "image-size@npm:0.5.5" @@ -3932,21 +3967,14 @@ __metadata: languageName: node linkType: hard -"internal-slot@npm:^1.0.2": - version: 1.0.2 - resolution: "internal-slot@npm:1.0.2" +"internal-slot@npm:^1.0.3": + version: 1.0.3 + resolution: "internal-slot@npm:1.0.3" dependencies: - es-abstract: ^1.17.0-next.1 + get-intrinsic: ^1.1.0 has: ^1.0.3 - side-channel: ^1.0.2 - checksum: 4689d3254997371ae4af3ae7ced3ac393b04bea23d01ea08c7abfdabe938e5bc676544d4dfe1c6b20aa549ee8d681bd23e02a3223659933670aa6f39a5bf6fb7 - languageName: node - linkType: hard - -"is-arrayish@npm:^0.2.1": - version: 0.2.1 - resolution: "is-arrayish@npm:0.2.1" - checksum: eef4417e3c10e60e2c810b6084942b3ead455af16c4509959a27e490e7aee87cfb3f38e01bbde92220b528a0ee1a18d52b787e1458ee86174d8c7f0e58cd488f + side-channel: ^1.0.4 + checksum: 1944f92e981e47aebc98a88ff0db579fd90543d937806104d0b96557b10c1f170c51fb777b97740a8b6ddeec585fca8c39ae99fd08a8e058dfc8ab70937238bf languageName: node linkType: hard @@ -3975,10 +4003,10 @@ __metadata: languageName: node linkType: hard -"is-callable@npm:^1.1.4, is-callable@npm:^1.1.5, is-callable@npm:^1.2.3": - version: 1.2.3 - resolution: "is-callable@npm:1.2.3" - checksum: 084a732afd78e14a40cd5f6f34001edd500f43bb542991c1305b88842cab5f2fb6b48f0deed4cd72270b2e71cab3c3a56c69b324e3a02d486f937824bb7de553 +"is-callable@npm:^1.1.4, is-callable@npm:^1.1.5, is-callable@npm:^1.2.4": + version: 1.2.4 + resolution: "is-callable@npm:1.2.4" + checksum: 1a28d57dc435797dae04b173b65d6d1e77d4f16276e9eff973f994eadcfdc30a017e6a597f092752a083c1103cceb56c91e3dadc6692fedb9898dfaba701575f languageName: node linkType: hard @@ -3993,12 +4021,12 @@ __metadata: languageName: node linkType: hard -"is-core-module@npm:^2.2.0": - version: 2.6.0 - resolution: "is-core-module@npm:2.6.0" +"is-core-module@npm:^2.2.0, is-core-module@npm:^2.8.0": + version: 2.8.1 + resolution: "is-core-module@npm:2.8.1" dependencies: has: ^1.0.3 - checksum: 183b3b96fed19822b13959876b0317e61fc2cb5ebcbc21639904c81f7ae328af57f8e18cc4750a9c4abebd686130c70d34a89521e57dbe002edfa4614507ce18 + checksum: 418b7bc10768a73c41c7ef497e293719604007f88934a6ffc5f7c78702791b8528102fb4c9e56d006d69361549b3d9519440214a74aefc7e0b79e5e4411d377f languageName: node linkType: hard @@ -4039,12 +4067,12 @@ __metadata: languageName: node linkType: hard -"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:~4.0.1": - version: 4.0.1 - resolution: "is-glob@npm:4.0.1" +"is-glob@npm:^4.0.0, is-glob@npm:^4.0.1, is-glob@npm:^4.0.3, is-glob@npm:~4.0.1": + version: 4.0.3 + resolution: "is-glob@npm:4.0.3" dependencies: is-extglob: ^2.1.1 - checksum: 84627cad11b4e745f5db5a163f32c47b711585a5ff6e14f8f8d026db87f4cdd3e2c95f6fa1f94ad22e469f36d819ae2814f03f9c668b164422ac3354a94672d3 + checksum: d381c1319fcb69d341cc6e6c7cd588e17cd94722d9a32dbd60660b993c4fb7d0f19438674e68dfec686d09b7c73139c9166b47597f846af387450224a8101ab4 languageName: node linkType: hard @@ -4076,13 +4104,20 @@ __metadata: languageName: node linkType: hard -"is-regex@npm:^1.0.5, is-regex@npm:^1.1.2": - version: 1.1.2 - resolution: "is-regex@npm:1.1.2" +"is-regex@npm:^1.0.5, is-regex@npm:^1.1.4": + version: 1.1.4 + resolution: "is-regex@npm:1.1.4" dependencies: call-bind: ^1.0.2 - has-symbols: ^1.0.1 - checksum: a1e5a451b6b2207c04e2591417499fed013630dbe96c051f0a39a3b266b16ab691c0345128223573f3cd45796e0f561a2241f4a7f1840b06574eebb7100b68aa + has-tostringtag: ^1.0.0 + checksum: 362399b33535bc8f386d96c45c9feb04cf7f8b41c182f54174c1a45c9abbbe5e31290bbad09a458583ff6bf3b2048672cdb1881b13289569a7c548370856a652 + languageName: node + linkType: hard + +"is-shared-array-buffer@npm:^1.0.1": + version: 1.0.1 + resolution: "is-shared-array-buffer@npm:1.0.1" + checksum: 2ffb92533e64e2876e6cfe6906871d28400b6f1a53130fe652ec8007bc0e5044d05e7af8e31bdc992fbba520bd92938cfbeedd0f286be92f250c7c76191c4d90 languageName: node linkType: hard @@ -4093,10 +4128,12 @@ __metadata: languageName: node linkType: hard -"is-string@npm:^1.0.5": - version: 1.0.5 - resolution: "is-string@npm:1.0.5" - checksum: 68d77a991f55592721cc7d5800ff95cdb2c4f242e3a98fdc939c409879f7b8f297b8352184032b6b2183994b4c457f42df8de004c58b5b43655c8b2f3e3ecc17 +"is-string@npm:^1.0.5, is-string@npm:^1.0.7": + version: 1.0.7 + resolution: "is-string@npm:1.0.7" + dependencies: + has-tostringtag: ^1.0.0 + checksum: 323b3d04622f78d45077cf89aab783b2f49d24dc641aa89b5ad1a72114cfeff2585efc8c12ef42466dff32bde93d839ad321b26884cf75e5a7892a938b089989 languageName: node linkType: hard @@ -4123,6 +4160,15 @@ __metadata: languageName: node linkType: hard +"is-weakref@npm:^1.0.1": + version: 1.0.2 + resolution: "is-weakref@npm:1.0.2" + dependencies: + call-bind: ^1.0.2 + checksum: 95bd9a57cdcb58c63b1c401c60a474b0f45b94719c30f548c891860f051bc2231575c290a6b420c6bc6e7ed99459d424c652bd5bf9a1d5259505dc35b4bf83de + languageName: node + linkType: hard + "is-what@npm:^3.12.0": version: 3.14.1 resolution: "is-what@npm:3.14.1" @@ -4130,7 +4176,7 @@ __metadata: languageName: node linkType: hard -"isarray@npm:^1.0.0, isarray@npm:~1.0.0": +"isarray@npm:~1.0.0": version: 1.0.0 resolution: "isarray@npm:1.0.0" checksum: f032df8e02dce8ec565cf2eb605ea939bdccea528dbcf565cdf92bfa2da9110461159d86a537388ef1acef8815a330642d7885b29010e8f7eac967c9993b65ab @@ -4716,6 +4762,17 @@ __metadata: languageName: node linkType: hard +"js-yaml@npm:^4.1.0": + version: 4.1.0 + resolution: "js-yaml@npm:4.1.0" + dependencies: + argparse: ^2.0.1 + bin: + js-yaml: bin/js-yaml.js + checksum: c7830dfd456c3ef2c6e355cc5a92e6700ceafa1d14bba54497b34a99f0376cecbb3e9ac14d3e5849b426d5a5140709a66237a8c991c675431271c4ce5504151a + languageName: node + linkType: hard + "jsbn@npm:~0.1.0": version: 0.1.1 resolution: "jsbn@npm:0.1.1" @@ -4788,13 +4845,6 @@ __metadata: languageName: node linkType: hard -"json-schema-traverse@npm:^1.0.0": - version: 1.0.0 - resolution: "json-schema-traverse@npm:1.0.0" - checksum: 02f2f466cdb0362558b2f1fd5e15cce82ef55d60cd7f8fa828cf35ba74330f8d767fcae5c5c2adb7851fa811766c694b9405810879bc4e1ddd78a7c0e03658ad - languageName: node - linkType: hard - "json-schema@npm:0.2.3": version: 0.2.3 resolution: "json-schema@npm:0.2.3" @@ -4850,13 +4900,13 @@ __metadata: languageName: node linkType: hard -"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.1.0": - version: 3.1.0 - resolution: "jsx-ast-utils@npm:3.1.0" +"jsx-ast-utils@npm:^2.4.1 || ^3.0.0, jsx-ast-utils@npm:^3.2.1": + version: 3.2.1 + resolution: "jsx-ast-utils@npm:3.2.1" dependencies: - array-includes: ^3.1.1 - object.assign: ^4.1.1 - checksum: 180f173949ce7f8ffb6d97efed7d809a90f80261ab9c7a4c9cc458cffcb80659be9cc57000bf39356f9cac5e3971109c76f2a325383f29637ac9f4c1e116751e + array-includes: ^3.1.3 + object.assign: ^4.1.2 + checksum: dcee22e6382ee5a6bd4187333a44b6420d9d079838119a07055d6e88d137dd0afadc97a2246152b0b65006bd5fc393112dc0cef01956a01a66c1713913953c66 languageName: node linkType: hard @@ -4945,18 +4995,6 @@ __metadata: languageName: node linkType: hard -"load-json-file@npm:^2.0.0": - version: 2.0.0 - resolution: "load-json-file@npm:2.0.0" - dependencies: - graceful-fs: ^4.1.2 - parse-json: ^2.2.0 - pify: ^2.0.0 - strip-bom: ^3.0.0 - checksum: 7f212bbf08a8c9aab087ead07aa220d1f43d83ec1c4e475a00a8d9bf3014eb29ebe901db8554627dcfb70184c274d05b7379f1e9678fe8297ae74dc495212049 - languageName: node - linkType: hard - "locate-path@npm:^2.0.0": version: 2.0.0 resolution: "locate-path@npm:2.0.0" @@ -4976,13 +5014,6 @@ __metadata: languageName: node linkType: hard -"lodash.clonedeep@npm:^4.5.0": - version: 4.5.0 - resolution: "lodash.clonedeep@npm:4.5.0" - checksum: 92c46f094b064e876a23c97f57f81fbffd5d760bf2d8a1c61d85db6d1e488c66b0384c943abee4f6af7debf5ad4e4282e74ff83177c9e63d8ff081a4837c3489 - languageName: node - linkType: hard - "lodash.debounce@npm:^4.0.8": version: 4.0.8 resolution: "lodash.debounce@npm:4.0.8" @@ -5011,6 +5042,13 @@ __metadata: languageName: node linkType: hard +"lodash.merge@npm:^4.6.2": + version: 4.6.2 + resolution: "lodash.merge@npm:4.6.2" + checksum: ad580b4bdbb7ca1f7abf7e1bce63a9a0b98e370cf40194b03380a46b4ed799c9573029599caebc1b14e3f24b111aef72b96674a56cfa105e0f5ac70546cdc005 + languageName: node + linkType: hard + "lodash.once@npm:^4.1.1": version: 4.1.1 resolution: "lodash.once@npm:4.1.1" @@ -5018,14 +5056,7 @@ __metadata: languageName: node linkType: hard -"lodash.truncate@npm:^4.4.2": - version: 4.4.2 - resolution: "lodash.truncate@npm:4.4.2" - checksum: b463d8a382cfb5f0e71c504dcb6f807a7bd379ff1ea216669aa42c52fc28c54e404bfbd96791aa09e6df0de2c1d7b8f1b7f4b1a61f324d38fe98bc535aeee4f5 - languageName: node - linkType: hard - -"lodash@npm:^4.17.20, lodash@npm:^4.7.0": +"lodash@npm:^4.7.0": version: 4.17.21 resolution: "lodash@npm:4.17.21" checksum: eb835a2e51d381e561e508ce932ea50a8e5a68f4ebdd771ea240d3048244a8d13658acbd502cd4829768c56f2e16bdd4340b9ea141297d472517b83868e677f7 @@ -5187,6 +5218,13 @@ __metadata: languageName: node linkType: hard +"mri@npm:^1.1.5": + version: 1.2.0 + resolution: "mri@npm:1.2.0" + checksum: 83f515abbcff60150873e424894a2f65d68037e5a7fcde8a9e2b285ee9c13ac581b63cfc1e6826c4732de3aeb84902f7c1e16b7aff46cd3f897a0f757a894e85 + languageName: node + linkType: hard + "ms@npm:2.0.0": version: 2.0.0 resolution: "ms@npm:2.0.0" @@ -5201,6 +5239,19 @@ __metadata: languageName: node linkType: hard +"multimatch@npm:^4.0.0": + version: 4.0.0 + resolution: "multimatch@npm:4.0.0" + dependencies: + "@types/minimatch": ^3.0.3 + array-differ: ^3.0.0 + array-union: ^2.1.0 + arrify: ^2.0.1 + minimatch: ^3.0.4 + checksum: bdb6a98dad4e919d9a1a2a0db872f44fa2337315f2fd5827d91ae005cf22f4425782bdfa97c10b80d567f0cb3c226c31f4e85f8f6a4a4be4facf9af0de1bb0c2 + languageName: node + linkType: hard + "natural-compare@npm:^1.4.0": version: 1.4.0 resolution: "natural-compare@npm:1.4.0" @@ -5292,18 +5343,6 @@ __metadata: languageName: node linkType: hard -"normalize-package-data@npm:^2.3.2": - version: 2.5.0 - resolution: "normalize-package-data@npm:2.5.0" - dependencies: - hosted-git-info: ^2.1.4 - resolve: ^1.10.0 - semver: 2 || 3 || 4 || 5 - validate-npm-package-license: ^3.0.1 - checksum: 7999112efc35a6259bc22db460540cae06564aa65d0271e3bdfa86876d08b0e578b7b5b0028ee61b23f1cae9fc0e7847e4edc0948d3068a39a2a82853efc8499 - languageName: node - linkType: hard - "normalize-path@npm:^3.0.0, normalize-path@npm:~3.0.0": version: 3.0.0 resolution: "normalize-path@npm:3.0.0" @@ -5311,7 +5350,7 @@ __metadata: languageName: node linkType: hard -"npm-run-path@npm:^4.0.1": +"npm-run-path@npm:^4.0.0, npm-run-path@npm:^4.0.1": version: 4.0.1 resolution: "npm-run-path@npm:4.0.1" dependencies: @@ -5369,10 +5408,10 @@ __metadata: languageName: node linkType: hard -"object-inspect@npm:^1.7.0, object-inspect@npm:^1.9.0": - version: 1.9.0 - resolution: "object-inspect@npm:1.9.0" - checksum: 715d2ef5beebfecd5c6d5b29dd370b11bb37d46284d4c1e38463c1ab5dd182cb9d1b543b3f0ea682c84a1883863ea2fe6e6b7599a65a6ab043545189b06e8800 +"object-inspect@npm:^1.11.0, object-inspect@npm:^1.7.0, object-inspect@npm:^1.9.0": + version: 1.12.0 + resolution: "object-inspect@npm:1.12.0" + checksum: 2b36d4001a9c921c6b342e2965734519c9c58c355822243c3207fbf0aac271f8d44d30d2d570d450b2cc6f0f00b72bcdba515c37827d2560e5f22b1899a31cf4 languageName: node linkType: hard @@ -5393,7 +5432,7 @@ __metadata: languageName: node linkType: hard -"object.assign@npm:^4.1.0, object.assign@npm:^4.1.1, object.assign@npm:^4.1.2": +"object.assign@npm:^4.1.0, object.assign@npm:^4.1.2": version: 4.1.2 resolution: "object.assign@npm:4.1.2" dependencies: @@ -5405,42 +5444,50 @@ __metadata: languageName: node linkType: hard -"object.entries@npm:^1.1.1, object.entries@npm:^1.1.2": - version: 1.1.2 - resolution: "object.entries@npm:1.1.2" +"object.entries@npm:^1.1.1, object.entries@npm:^1.1.5": + version: 1.1.5 + resolution: "object.entries@npm:1.1.5" dependencies: + call-bind: ^1.0.2 define-properties: ^1.1.3 - es-abstract: ^1.17.5 - has: ^1.0.3 - checksum: fa97173d30312086b6adbff2b87b60799656c7aca5016f2bc69b20f313125e7763ca5bc1c1cbfd0949942291cc1b5d4cdfd362817dc6ab79f136c0e5df072e64 + es-abstract: ^1.19.1 + checksum: d658696f74fd222060d8428d2a9fda2ce736b700cb06f6bdf4a16a1892d145afb746f453502b2fa55d1dca8ead6f14ddbcf66c545df45adadea757a6c4cd86c7 languageName: node linkType: hard -"object.fromentries@npm:^2.0.0, object.fromentries@npm:^2.0.2": - version: 2.0.4 - resolution: "object.fromentries@npm:2.0.4" +"object.fromentries@npm:^2.0.0, object.fromentries@npm:^2.0.5": + version: 2.0.5 + resolution: "object.fromentries@npm:2.0.5" dependencies: call-bind: ^1.0.2 define-properties: ^1.1.3 - es-abstract: ^1.18.0-next.2 - has: ^1.0.3 - checksum: 1e8e991c43a463a6389c6ee6935ef3843931fb012c5eed2ec30e3d5cf3760cb853f527723cdc98fb770d9c0cd068449448b03c303f527e7926a97d43daaa5c66 + es-abstract: ^1.19.1 + checksum: 61a0b565ded97b76df9e30b569729866e1824cce902f98e90bb106e84f378aea20163366f66dc75c9000e2aad2ed0caf65c6f530cb2abc4c0c0f6c982102db4b languageName: node linkType: hard -"object.values@npm:^1.1.0, object.values@npm:^1.1.1": - version: 1.1.3 - resolution: "object.values@npm:1.1.3" +"object.hasown@npm:^1.1.0": + version: 1.1.0 + resolution: "object.hasown@npm:1.1.0" + dependencies: + define-properties: ^1.1.3 + es-abstract: ^1.19.1 + checksum: 5c5d0b1b793514609f7a635f3110fbd346e142c9afd2485b802775e1ef6c90e48ff6e8e8744927933370ba30964e21af9c5fcf782b47f34d650aa6b277565330 + languageName: node + linkType: hard + +"object.values@npm:^1.1.0, object.values@npm:^1.1.1, object.values@npm:^1.1.5": + version: 1.1.5 + resolution: "object.values@npm:1.1.5" dependencies: call-bind: ^1.0.2 define-properties: ^1.1.3 - es-abstract: ^1.18.0-next.2 - has: ^1.0.3 - checksum: 8b29bd0936a32c2c5dfeb39389f65c7c3f32253a2ad3e4605726cac6bda8f642b4f8ab1ef58279851b86b7ae7322b3cf9a464c346498a7deb8f0c3a0554015f0 + es-abstract: ^1.19.1 + checksum: 0f17e99741ebfbd0fa55ce942f6184743d3070c61bd39221afc929c8422c4907618c8da694c6915bc04a83ab3224260c779ba37fc07bb668bdc5f33b66a902a4 languageName: node linkType: hard -"once@npm:^1.3.0": +"once@npm:^1.3.0, once@npm:^1.3.1, once@npm:^1.4.0": version: 1.4.0 resolution: "once@npm:1.4.0" dependencies: @@ -5449,7 +5496,7 @@ __metadata: languageName: node linkType: hard -"onetime@npm:^5.1.2": +"onetime@npm:^5.1.0, onetime@npm:^5.1.2": version: 5.1.2 resolution: "onetime@npm:5.1.2" dependencies: @@ -5576,15 +5623,6 @@ __metadata: languageName: node linkType: hard -"parse-json@npm:^2.2.0": - version: 2.2.0 - resolution: "parse-json@npm:2.2.0" - dependencies: - error-ex: ^1.2.0 - checksum: dda78a63e57a47b713a038630868538f718a7ca0cd172a36887b0392ccf544ed0374902eb28f8bf3409e8b71d62b79d17062f8543afccf2745f9b0b2d2bb80ca - languageName: node - linkType: hard - "parse-node-version@npm:^1.0.1": version: 1.0.1 resolution: "parse-node-version@npm:1.0.1" @@ -5643,15 +5681,6 @@ __metadata: languageName: node linkType: hard -"path-type@npm:^2.0.0": - version: 2.0.0 - resolution: "path-type@npm:2.0.0" - dependencies: - pify: ^2.0.0 - checksum: 749dc0c32d4ebe409da155a0022f9be3d08e6fd276adb3dfa27cb2486519ab2aa277d1453b3fde050831e0787e07b0885a75653fefcc82d883753c5b91121b1c - languageName: node - linkType: hard - "performance-now@npm:^2.1.0": version: 2.1.0 resolution: "performance-now@npm:2.1.0" @@ -5666,13 +5695,6 @@ __metadata: languageName: node linkType: hard -"pify@npm:^2.0.0": - version: 2.3.0 - resolution: "pify@npm:2.3.0" - checksum: 9503aaeaf4577acc58642ad1d25c45c6d90288596238fb68f82811c08104c800e5a7870398e9f015d82b44ecbcbef3dc3d4251a1cbb582f6e5959fe09884b2ba - languageName: node - linkType: hard - "pify@npm:^4.0.1": version: 4.0.1 resolution: "pify@npm:4.0.1" @@ -5689,15 +5711,6 @@ __metadata: languageName: node linkType: hard -"pkg-dir@npm:^2.0.0": - version: 2.0.0 - resolution: "pkg-dir@npm:2.0.0" - dependencies: - find-up: ^2.1.0 - checksum: 8c72b712305b51e1108f0ffda5ec1525a8307e54a5855db8fb1dcf77561a5ae98e2ba3b4814c9806a679f76b2f7e5dd98bde18d07e594ddd9fdd25e9cf242ea1 - languageName: node - linkType: hard - "pkg-dir@npm:^4.2.0": version: 4.2.0 resolution: "pkg-dir@npm:4.2.0" @@ -5721,6 +5734,15 @@ __metadata: languageName: node linkType: hard +"prettier@npm:^2.5.0": + version: 2.5.1 + resolution: "prettier@npm:2.5.1" + bin: + prettier: bin-prettier.js + checksum: 21b9408476ea1c544b0e45d51ceb94a84789ff92095abb710942d780c862d0daebdb29972d47f6b4d0f7ebbfb0ffbf56cc2cfa3e3e9d1cca54864af185b15b66 + languageName: node + linkType: hard + "pretty-format@npm:^27.2.0": version: 27.2.0 resolution: "pretty-format@npm:27.2.0" @@ -5733,6 +5755,24 @@ __metadata: languageName: node linkType: hard +"pretty-quick@npm:^3.1.0": + version: 3.1.3 + resolution: "pretty-quick@npm:3.1.3" + dependencies: + chalk: ^3.0.0 + execa: ^4.0.0 + find-up: ^4.1.0 + ignore: ^5.1.4 + mri: ^1.1.5 + multimatch: ^4.0.0 + peerDependencies: + prettier: ">=2.0.0" + bin: + pretty-quick: bin/pretty-quick.js + checksum: 28bdc32571e6308e049497f58a9245f272275973782b6ed7fbcf98937101cc605a81b3ab48629dba4687b7e86c87a3733febacdc0746ca4da5d1c80a0b88cf45 + languageName: node + linkType: hard + "private@npm:^0.1.8": version: 0.1.8 resolution: "private@npm:0.1.8" @@ -5747,13 +5787,6 @@ __metadata: languageName: node linkType: hard -"progress@npm:^2.0.0": - version: 2.0.3 - resolution: "progress@npm:2.0.3" - checksum: f67403fe7b34912148d9252cb7481266a354bd99ce82c835f79070643bb3c6583d10dbcfda4d41e04bbc1d8437e9af0fb1e1f2135727878f5308682a579429b7 - languageName: node - linkType: hard - "prompts@npm:^2.0.1": version: 2.3.1 resolution: "prompts@npm:2.3.1" @@ -5789,6 +5822,16 @@ __metadata: languageName: node linkType: hard +"pump@npm:^3.0.0": + version: 3.0.0 + resolution: "pump@npm:3.0.0" + dependencies: + end-of-stream: ^1.1.0 + once: ^1.3.1 + checksum: e42e9229fba14732593a718b04cb5e1cfef8254544870997e0ecd9732b189a48e1256e4e5478148ecb47c8511dca2b09eae56b4d0aad8009e6fac8072923cfc9 + languageName: node + linkType: hard + "punycode@npm:^2.1.0, punycode@npm:^2.1.1": version: 2.1.1 resolution: "punycode@npm:2.1.1" @@ -5839,14 +5882,16 @@ __metadata: "@babel/preset-react": ^7.14.0 "@wojtekmaj/date-utils": ^1.0.2 "@wojtekmaj/enzyme-adapter-react-17": ^0.6.0 - babel-eslint: ^10.0.0 enzyme: ^3.10.0 - eslint: ~7.19.0 - eslint-config-wojtekmaj: ^0.5.0 + eslint: ^8.5.0 + eslint-config-wojtekmaj: ^0.6.5 get-user-locale: ^1.2.0 + husky: ^7.0.0 jest: ^27.0.0 less: ^4.0.0 merge-class-names: ^1.1.1 + prettier: ^2.5.0 + pretty-quick: ^3.1.0 prop-types: ^15.6.0 react: ^17.0.0 react-dom: ^17.0.0 @@ -5920,27 +5965,6 @@ __metadata: languageName: node linkType: hard -"read-pkg-up@npm:^2.0.0": - version: 2.0.0 - resolution: "read-pkg-up@npm:2.0.0" - dependencies: - find-up: ^2.0.0 - read-pkg: ^2.0.0 - checksum: 22f9026fb72219ecd165f94f589461c70a88461dc7ea0d439a310ef2a5271ff176a4df4e5edfad087d8ac89b8553945eb209476b671e8ed081c990f30fc40b27 - languageName: node - linkType: hard - -"read-pkg@npm:^2.0.0": - version: 2.0.0 - resolution: "read-pkg@npm:2.0.0" - dependencies: - load-json-file: ^2.0.0 - normalize-package-data: ^2.3.2 - path-type: ^2.0.0 - checksum: 85c5bf35f2d96acdd756151ba83251831bb2b1040b7d96adce70b2cb119b5320417f34876de0929f2d06c67f3df33ef4636427df3533913876f9ef2487a6f48f - languageName: node - linkType: hard - "readable-stream@npm:^2.0.6": version: 2.3.7 resolution: "readable-stream@npm:2.3.7" @@ -5998,20 +6022,20 @@ __metadata: languageName: node linkType: hard -"regexp.prototype.flags@npm:^1.3.0": - version: 1.3.0 - resolution: "regexp.prototype.flags@npm:1.3.0" +"regexp.prototype.flags@npm:^1.3.1": + version: 1.4.1 + resolution: "regexp.prototype.flags@npm:1.4.1" dependencies: + call-bind: ^1.0.2 define-properties: ^1.1.3 - es-abstract: ^1.17.0-next.1 - checksum: b6b985a6d5e78b79f9da6b40a775979a9f972569243799ec8dcaa2c5c14eb1e41b2a14acb1b7216378dddafa8156ed820ab68d4b2ac600fb0a7670dda04b45b4 + checksum: 77944a3ea5ae84f391fa80bff9babfedc47eadc9dc38e282b5fd746368fb787deec89c68ce3114195bf6b5782b160280a278b62d41ccc6e125afab1a7f816de8 languageName: node linkType: hard -"regexpp@npm:^3.1.0": - version: 3.1.0 - resolution: "regexpp@npm:3.1.0" - checksum: 63bcb2c98d63274774c79bef256e03f716d25f1fa8427267d0302d1436a83fa0d905f4e8a172fdfa99fb4d84833df2fb3bf7da2a1a868f156e913174c32b1139 +"regexpp@npm:^3.2.0": + version: 3.2.0 + resolution: "regexpp@npm:3.2.0" + checksum: a78dc5c7158ad9ddcfe01aa9144f46e192ddbfa7b263895a70a5c6c73edd9ce85faf7c0430e59ac38839e1734e275b9c3de5c57ee3ab6edc0e0b1bdebefccef8 languageName: node linkType: hard @@ -6082,13 +6106,6 @@ __metadata: languageName: node linkType: hard -"require-from-string@npm:^2.0.2": - version: 2.0.2 - resolution: "require-from-string@npm:2.0.2" - checksum: a03ef6895445f33a4015300c426699bc66b2b044ba7b670aa238610381b56d3f07c686251740d575e22f4c87531ba662d06937508f0f3c0f1ddc04db3130560b - languageName: node - linkType: hard - "resolve-cwd@npm:^3.0.0": version: 3.0.0 resolution: "resolve-cwd@npm:3.0.0" @@ -6112,7 +6129,7 @@ __metadata: languageName: node linkType: hard -"resolve@^1.10.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.20.0": +"resolve@^1.14.2, resolve@^1.20.0": version: 1.20.0 resolution: "resolve@npm:1.20.0" dependencies: @@ -6122,7 +6139,17 @@ __metadata: languageName: node linkType: hard -"resolve@patch:resolve@^1.10.0#~builtin, resolve@patch:resolve@^1.12.0#~builtin, resolve@patch:resolve@^1.13.1#~builtin, resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.17.0#~builtin, resolve@patch:resolve@^1.18.1#~builtin, resolve@patch:resolve@^1.20.0#~builtin": +"resolve@npm:^2.0.0-next.3": + version: 2.0.0-next.3 + resolution: "resolve@npm:2.0.0-next.3" + dependencies: + is-core-module: ^2.2.0 + path-parse: ^1.0.6 + checksum: f34b3b93ada77d64a6d590c06a83e198f3a827624c4ec972260905fa6c4d612164fbf0200d16d2beefea4ad1755b001f4a9a1293d8fc2322a8f7d6bf692c4ff5 + languageName: node + linkType: hard + +"resolve@patch:resolve@^1.14.2#~builtin, resolve@patch:resolve@^1.20.0#~builtin": version: 1.20.0 resolution: "resolve@patch:resolve@npm%3A1.20.0#~builtin::version=1.20.0&hash=07638b" dependencies: @@ -6132,6 +6159,16 @@ __metadata: languageName: node linkType: hard +"resolve@patch:resolve@^2.0.0-next.3#~builtin": + version: 2.0.0-next.3 + resolution: "resolve@patch:resolve@npm%3A2.0.0-next.3#~builtin::version=2.0.0-next.3&hash=07638b" + dependencies: + is-core-module: ^2.2.0 + path-parse: ^1.0.6 + checksum: 21684b4d99a4877337cdbd5484311c811b3e8910edb5d868eec85c6e6550b0f570d911f9a384f9e176172d6713f2715bd0b0887fa512cb8c6aeece018de6a9f8 + languageName: node + linkType: hard + "ret@npm:~0.1.10": version: 0.1.15 resolution: "ret@npm:0.1.15" @@ -6218,7 +6255,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:2 || 3 || 4 || 5, semver@npm:^5.4.1, semver@npm:^5.6.0": +"semver@npm:^5.4.1, semver@npm:^5.6.0": version: 5.7.1 resolution: "semver@npm:5.7.1" bin: @@ -6236,7 +6273,7 @@ __metadata: languageName: node linkType: hard -"semver@npm:^7.0.0, semver@npm:^7.2.1, semver@npm:^7.3.2": +"semver@npm:^7.0.0, semver@npm:^7.3.2": version: 7.3.4 resolution: "semver@npm:7.3.4" dependencies: @@ -6270,13 +6307,14 @@ __metadata: languageName: node linkType: hard -"side-channel@npm:^1.0.2": - version: 1.0.2 - resolution: "side-channel@npm:1.0.2" +"side-channel@npm:^1.0.4": + version: 1.0.4 + resolution: "side-channel@npm:1.0.4" dependencies: - es-abstract: ^1.17.0-next.1 - object-inspect: ^1.7.0 - checksum: ddadc833752d47bad47a518b9cb7999e03e1139834ae2ce3d34dcde01b19c3b0a3895a1536f830ebf7ce5bf0033785739aefe3453f37cf70bb8f692ebe798269 + call-bind: ^1.0.0 + get-intrinsic: ^1.0.2 + object-inspect: ^1.9.0 + checksum: 351e41b947079c10bd0858364f32bb3a7379514c399edb64ab3dce683933483fc63fb5e4efe0a15a2e8a7e3c436b6a91736ddb8d8c6591b0460a24bb4a1ee245 languageName: node linkType: hard @@ -6308,17 +6346,6 @@ __metadata: languageName: node linkType: hard -"slice-ansi@npm:^4.0.0": - version: 4.0.0 - resolution: "slice-ansi@npm:4.0.0" - dependencies: - ansi-styles: ^4.0.0 - astral-regex: ^2.0.0 - is-fullwidth-code-point: ^3.0.0 - checksum: 4a82d7f085b0e1b070e004941ada3c40d3818563ac44766cca4ceadd2080427d337554f9f99a13aaeb3b4a94d9964d9466c807b3d7b7541d1ec37ee32d308756 - languageName: node - linkType: hard - "source-map-support@npm:^0.5.6": version: 0.5.19 resolution: "source-map-support@npm:0.5.19" @@ -6350,40 +6377,6 @@ __metadata: languageName: node linkType: hard -"spdx-correct@npm:^3.0.0": - version: 3.1.0 - resolution: "spdx-correct@npm:3.1.0" - dependencies: - spdx-expression-parse: ^3.0.0 - spdx-license-ids: ^3.0.0 - checksum: fda9fc191e8e45209049054119e1343f4a449d54b677f38bd7b47956eac47d31d065d8fb7a58d2430d5974fcb6d88c9faada02e935847f9ed386073c18ba5c8a - languageName: node - linkType: hard - -"spdx-exceptions@npm:^2.1.0": - version: 2.2.0 - resolution: "spdx-exceptions@npm:2.2.0" - checksum: 29189de3f60ac6d74d84fa85cfc49ca6a838f710242db99d9414461c2c1717ca3f4aae59b2ce57a99cf6427adc62bdcc4c198fb7ae17383497e5e85cc851f8d7 - languageName: node - linkType: hard - -"spdx-expression-parse@npm:^3.0.0": - version: 3.0.0 - resolution: "spdx-expression-parse@npm:3.0.0" - dependencies: - spdx-exceptions: ^2.1.0 - spdx-license-ids: ^3.0.0 - checksum: 308c8c4925f3a584d5740e2d13615aa90e800fc16f9f794195723c9a3f56030096bf5cf34f68b2b05aedac292edd48fe7d51bac13e77e6f94abf921044e40248 - languageName: node - linkType: hard - -"spdx-license-ids@npm:^3.0.0": - version: 3.0.5 - resolution: "spdx-license-ids@npm:3.0.5" - checksum: b1ceea3f87407ec375d1de90f6fc7610d6c845ff5f8db21d4d752b3d4e121df563c78113df7c564daff4e8778ad54b9a9024a7e9ea3779f13a43dd0e9128c08e - languageName: node - linkType: hard - "sprintf-js@npm:~1.0.2": version: 1.0.3 resolution: "sprintf-js@npm:1.0.3" @@ -6453,17 +6446,19 @@ __metadata: languageName: node linkType: hard -"string.prototype.matchall@npm:^4.0.2": - version: 4.0.2 - resolution: "string.prototype.matchall@npm:4.0.2" +"string.prototype.matchall@npm:^4.0.6": + version: 4.0.6 + resolution: "string.prototype.matchall@npm:4.0.6" dependencies: + call-bind: ^1.0.2 define-properties: ^1.1.3 - es-abstract: ^1.17.0 - has-symbols: ^1.0.1 - internal-slot: ^1.0.2 - regexp.prototype.flags: ^1.3.0 - side-channel: ^1.0.2 - checksum: c08c0db9aadc47b82c43444c3d1a733ac2b12f00348177d1a17e573b8fbaeceab40bc1ae5ed0cbca03691de4b8471039b17b60b86eea69872a3eae469c9e6b5a + es-abstract: ^1.19.1 + get-intrinsic: ^1.1.1 + has-symbols: ^1.0.2 + internal-slot: ^1.0.3 + regexp.prototype.flags: ^1.3.1 + side-channel: ^1.0.4 + checksum: 07aca53ddd8a096a8bd0560eb8574386c6b3887a6a06b40a98abd42c94dadeed3296261fca22fec59a1ed970d199bdeb450fcb6a7390193588d9c6b5f48fe842 languageName: node linkType: hard @@ -6516,12 +6511,12 @@ __metadata: languageName: node linkType: hard -"strip-ansi@npm:^6.0.0": - version: 6.0.0 - resolution: "strip-ansi@npm:6.0.0" +"strip-ansi@npm:^6.0.0, strip-ansi@npm:^6.0.1": + version: 6.0.1 + resolution: "strip-ansi@npm:6.0.1" dependencies: - ansi-regex: ^5.0.0 - checksum: 04c3239ede44c4d195b0e66c0ad58b932f08bec7d05290416d361ff908ad282ecdaf5d9731e322c84f151d427436bde01f05b7422c3ec26dd927586736b0e5d0 + ansi-regex: ^5.0.1 + checksum: f3cd25890aef3ba6e1a74e20896c21a46f482e93df4a06567cebf2b57edabb15133f1f94e57434e0a958d61186087b1008e89c94875d019910a213181a14fc8c languageName: node linkType: hard @@ -6597,20 +6592,6 @@ __metadata: languageName: node linkType: hard -"table@npm:^6.0.4": - version: 6.7.1 - resolution: "table@npm:6.7.1" - dependencies: - ajv: ^8.0.1 - lodash.clonedeep: ^4.5.0 - lodash.truncate: ^4.4.2 - slice-ansi: ^4.0.0 - string-width: ^4.2.0 - strip-ansi: ^6.0.0 - checksum: 053b61fa4e8f8396c65ff7a95da90e85620370932652d501ff7a0a3ed7317f1cc549702bd2abf2bd9ed01e20757b73a8b57374f8a8a2ac02fbe0550276263fb6 - languageName: node - linkType: hard - "tar@npm:^6.0.1": version: 6.1.10 resolution: "tar@npm:6.1.10" @@ -6713,15 +6694,15 @@ __metadata: languageName: node linkType: hard -"tsconfig-paths@npm:^3.9.0": - version: 3.9.0 - resolution: "tsconfig-paths@npm:3.9.0" +"tsconfig-paths@npm:^3.12.0": + version: 3.12.0 + resolution: "tsconfig-paths@npm:3.12.0" dependencies: "@types/json5": ^0.0.29 json5: ^1.0.1 minimist: ^1.2.0 strip-bom: ^3.0.0 - checksum: 243b3b098c76a4ca90ea0431683f3755a4ff175c6123bcba5f7b4bd80fe2ef8fa9bdc8f4d525148a1e71ade7f3e037e7c0313ae177fd12398ab68f05c2c7f25d + checksum: 4999ec6cd1c7cc06750a460dbc0d39fe3595a4308cb5f1d0d0a8283009cf9c0a30d5a156508c28fe3a47760508af5263ab288fc23d71e9762779674257a95d3b languageName: node linkType: hard @@ -6787,10 +6768,10 @@ __metadata: languageName: node linkType: hard -"type-fest@npm:^0.8.1": - version: 0.8.1 - resolution: "type-fest@npm:0.8.1" - checksum: d61c4b2eba24009033ae4500d7d818a94fd6d1b481a8111612ee141400d5f1db46f199c014766b9fa9b31a6a7374d96fc748c6d688a78a3ce5a33123839becb7 +"type-fest@npm:^0.20.2": + version: 0.20.2 + resolution: "type-fest@npm:0.20.2" + checksum: 4fb3272df21ad1c552486f8a2f8e115c09a521ad7a8db3d56d53718d0c907b62c6e9141ba5f584af3f6830d0872c521357e512381f24f7c44acae583ad517d73 languageName: node linkType: hard @@ -6803,15 +6784,15 @@ __metadata: languageName: node linkType: hard -"unbox-primitive@npm:^1.0.0": - version: 1.0.0 - resolution: "unbox-primitive@npm:1.0.0" +"unbox-primitive@npm:^1.0.1": + version: 1.0.1 + resolution: "unbox-primitive@npm:1.0.1" dependencies: function-bind: ^1.1.1 - has-bigints: ^1.0.0 - has-symbols: ^1.0.0 - which-boxed-primitive: ^1.0.1 - checksum: b3c63f8f7cd77fdb4f33b2af38407369d9d1b392b73506e0f61dc1ac92a81edeb2a4e4bc062241ee0ac05f946fcd01a558dfb6f54be56ccc5938aa296abb2e2a + has-bigints: ^1.0.1 + has-symbols: ^1.0.2 + which-boxed-primitive: ^1.0.2 + checksum: 89d950e18fb45672bc6b3c961f1e72c07beb9640c7ceed847b571ba6f7d2af570ae1a2584cfee268b9d9ea1e3293f7e33e0bc29eaeb9f8e8a0bab057ff9e6bba languageName: node linkType: hard @@ -6896,16 +6877,6 @@ __metadata: languageName: node linkType: hard -"validate-npm-package-license@npm:^3.0.1": - version: 3.0.4 - resolution: "validate-npm-package-license@npm:3.0.4" - dependencies: - spdx-correct: ^3.0.0 - spdx-expression-parse: ^3.0.0 - checksum: 35703ac889d419cf2aceef63daeadbe4e77227c39ab6287eeb6c1b36a746b364f50ba22e88591f5d017bc54685d8137bc2d328d0a896e4d3fd22093c0f32a9ad - languageName: node - linkType: hard - "verror@npm:1.10.0": version: 1.10.0 resolution: "verror@npm:1.10.0" @@ -6985,7 +6956,7 @@ __metadata: languageName: node linkType: hard -"which-boxed-primitive@npm:^1.0.1": +"which-boxed-primitive@npm:^1.0.2": version: 1.0.2 resolution: "which-boxed-primitive@npm:1.0.2" dependencies: