From 2735e9f9436bedf559168dd086fba9a5381b30c1 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Mon, 31 Oct 2022 18:18:54 +0900 Subject: [PATCH 01/17] nyago --- .vscode/settings.json | 4 +- package.json | 1 + .../DatePicker/DatePicker.stories.tsx | 18 ++++----- src/components/DatePicker/DatePicker.tsx | 40 +++++++++++++++---- src/utils/time.ts | 16 ++++++++ yarn.lock | 5 +++ 6 files changed, 67 insertions(+), 17 deletions(-) create mode 100644 src/utils/time.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 264db2ed1..e7a81196d 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,7 @@ }, "eslint.options": { "extensions": [".js", ".jsx", ".md", ".ts", ".tsx"] - } + }, + "editor.formatOnSave": true, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" } diff --git a/package.json b/package.json index bdf9b6aa4..d750658b8 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ }, "dependencies": { "@popperjs/core": "^2.4.0", + "dayjs": "^1.11.6", "moment": "^2.29.3", "react-dates": "^21.8.0", "react-popper": "^2.3.0", diff --git a/src/components/DatePicker/DatePicker.stories.tsx b/src/components/DatePicker/DatePicker.stories.tsx index 2fa19b9e3..d029ec2df 100644 --- a/src/components/DatePicker/DatePicker.stories.tsx +++ b/src/components/DatePicker/DatePicker.stories.tsx @@ -1,6 +1,6 @@ import { ArgsTable, Description, Stories, Title } from "@storybook/addon-docs"; import { Story } from "@storybook/react/types-6-0"; -import moment from "moment"; +import dayjs from "dayjs"; import React from "react"; import DatePicker from "./DatePicker"; @@ -41,9 +41,9 @@ export default { }; export const Basic: Story = () => { - moment.locale("en"); - const [date, setDate] = React.useState(moment()); - const handleChangeDate = (date: moment.Moment | null) => { + dayjs.locale("en"); + const [date, setDate] = React.useState(dayjs()); + const handleChangeDate = (date: dayjs.Dayjs | null) => { if (date === null) { return; } @@ -57,17 +57,17 @@ export const Basic: Story = () => { }; export const Error: Story = () => { - return {}} />; + return {}} />; }; export const Localize: Story = () => { - moment.locale("ja", { + dayjs.locale("ja", { weekdaysShort: ["日", "月", "火", "水", "木", "金", "土"], }); - const renderMonthText = (day: moment.Moment) => day.format("YYYY年M月"); + const renderMonthText = (day: dayjs.Dayjs) => day.format("YYYY年M月"); const displayFormat = () => "YYYY/MM/DD"; - const [date, setDate] = React.useState(moment()); - const handleChangeDate = (date: moment.Moment | null) => { + const [date, setDate] = React.useState(dayjs()); + const handleChangeDate = (date: dayjs.Dayjs | null) => { if (date === null) { return; } diff --git a/src/components/DatePicker/DatePicker.tsx b/src/components/DatePicker/DatePicker.tsx index ef6f30a4e..aaf2d172b 100644 --- a/src/components/DatePicker/DatePicker.tsx +++ b/src/components/DatePicker/DatePicker.tsx @@ -1,7 +1,8 @@ import * as React from "react"; import * as Styled from "./styled"; import "react-dates/initialize"; -import moment from "moment"; +import dayjs from "dayjs"; +import { dayjsToMoment, momentToDayjs } from "../../utils/time"; import { RenderMonthProps, SingleDatePicker, @@ -16,31 +17,53 @@ function isOutsideRange() { } export type DatePickerProps = Partial< - Omit + Omit< + SingleDatePickerShape, + "date" | "onFocusChange" | "onDateChange" | "renderMonthText" + > > & // MEMO: Add RenderMonthProps to pass type check. - RenderMonthProps & { - date: moment.Moment | null; - onDateChange: (date: moment.Moment | null) => void; + Omit & { + date: dayjs.Dayjs | null; + onDateChange: (date: dayjs.Dayjs | null) => void; + renderMonthText?: + | ((month: dayjs.Dayjs) => React.ReactNode) + | null + | undefined; error?: boolean; }; const DatePicker = React.forwardRef( (inProps, ref) => { const props = useLocaleProps({ props: inProps, name: "DatePicker" }); - const { date, error = false, ...rest } = props; + const { + date, + error = false, + onDateChange, + renderMonthText, + ...rest + } = props; const [focused, setFocused] = React.useState(false); const onFocusChange = ({ focused }: { focused: boolean }) => { setFocused(focused); }; + const handleDateChange = (date: moment.Moment | null) => { + const dayjsize = momentToDayjs(date); + onDateChange(dayjsize); + }; + const handleRenderMonthText = (month: moment.Moment) => { + const dayjsize = momentToDayjs(month); + if (!renderMonthText || !dayjsize) return; + return renderMonthText(dayjsize); + }; return ( ( } + // eslint-disable-next-line react/jsx-handler-names + renderMonthText={handleRenderMonthText} onFocusChange={onFocusChange} + onDateChange={handleDateChange} {...rest} /> diff --git a/src/utils/time.ts b/src/utils/time.ts new file mode 100644 index 000000000..40db23d39 --- /dev/null +++ b/src/utils/time.ts @@ -0,0 +1,16 @@ +import dayjs from "dayjs"; +import moment from "moment"; + +// moment.jsで動いているreact-datesと互換性を持たせるためのメソッド +// DatePickerとDateRangePickerのリニューアルが完了したら除去する +export function dayjsToMoment(date: dayjs.Dayjs | null): moment.Moment | null { + if (!date) return null; + const dateString = date.format(); + return moment(dateString); +} + +export function momentToDayjs(date: moment.Moment | null): dayjs.Dayjs | null { + if (!date) return null; + const dateString = date.format(); + return dayjs(dateString); +} diff --git a/yarn.lock b/yarn.lock index 040d11be0..299dd674c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6446,6 +6446,11 @@ dayjs@^1.10.4: resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258" integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A== +dayjs@^1.11.6: + version "1.11.6" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.6.tgz#2e79a226314ec3ec904e3ee1dd5a4f5e5b1c7afb" + integrity sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ== + debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" From 112bf4f198a628f821c194ac59c4bcade347d80d Mon Sep 17 00:00:00 2001 From: Takehiro Makita Date: Mon, 31 Oct 2022 18:20:57 +0900 Subject: [PATCH 02/17] Update settings.json --- .vscode/settings.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index e7a81196d..283cb3b5e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,7 +4,4 @@ }, "eslint.options": { "extensions": [".js", ".jsx", ".md", ".ts", ".tsx"] - }, - "editor.formatOnSave": true, - "editor.defaultFormatter": "dbaeumer.vscode-eslint" } From ad4c49de6fe49cb57edb0db2d016290c5873eb09 Mon Sep 17 00:00:00 2001 From: Takehiro Makita Date: Mon, 31 Oct 2022 18:21:15 +0900 Subject: [PATCH 03/17] Update settings.json --- .vscode/settings.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.vscode/settings.json b/.vscode/settings.json index 283cb3b5e..264db2ed1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,4 +4,5 @@ }, "eslint.options": { "extensions": [".js", ".jsx", ".md", ".ts", ".tsx"] + } } From e88d160b231e3b3ecb1be799ab644b2c38ebd0f6 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Tue, 1 Nov 2022 18:38:11 +0900 Subject: [PATCH 04/17] nyasu --- src/components/DatePicker/DatePicker.tsx | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/src/components/DatePicker/DatePicker.tsx b/src/components/DatePicker/DatePicker.tsx index aaf2d172b..4b6525530 100644 --- a/src/components/DatePicker/DatePicker.tsx +++ b/src/components/DatePicker/DatePicker.tsx @@ -26,10 +26,7 @@ export type DatePickerProps = Partial< Omit & { date: dayjs.Dayjs | null; onDateChange: (date: dayjs.Dayjs | null) => void; - renderMonthText?: - | ((month: dayjs.Dayjs) => React.ReactNode) - | null - | undefined; + renderMonthText?: ((month: dayjs.Dayjs) => React.ReactNode) | null; error?: boolean; }; @@ -40,7 +37,8 @@ const DatePicker = React.forwardRef( date, error = false, onDateChange, - renderMonthText, + renderMonthText: renderMonthTextProps, + renderMonthElement, ...rest } = props; @@ -54,8 +52,8 @@ const DatePicker = React.forwardRef( }; const handleRenderMonthText = (month: moment.Moment) => { const dayjsize = momentToDayjs(month); - if (!renderMonthText || !dayjsize) return; - return renderMonthText(dayjsize); + if (!renderMonthTextProps || !dayjsize) return; + return renderMonthTextProps(dayjsize); }; return ( @@ -85,7 +83,10 @@ const DatePicker = React.forwardRef( } // eslint-disable-next-line react/jsx-handler-names - renderMonthText={handleRenderMonthText} + renderMonthText={ + renderMonthTextProps ? handleRenderMonthText : renderMonthTextProps + } + renderMonthElement={renderMonthElement as never} onFocusChange={onFocusChange} onDateChange={handleDateChange} {...rest} From c38ca3957d14c208a15a8630ecfbbfa03ec03932 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Mon, 7 Nov 2022 18:50:26 +0900 Subject: [PATCH 05/17] nyago --- .vscode/settings.json | 3 ++- src/components/DatePicker/DatePicker.stories.tsx | 7 ++++--- src/components/DatePicker/DatePicker.tsx | 13 +++++++++++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 264db2ed1..ecf025c2e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,6 @@ }, "eslint.options": { "extensions": [".js", ".jsx", ".md", ".ts", ".tsx"] - } + }, + "editor.defaultFormatter": "dbaeumer.vscode-eslint" } diff --git a/src/components/DatePicker/DatePicker.stories.tsx b/src/components/DatePicker/DatePicker.stories.tsx index d029ec2df..b111b973c 100644 --- a/src/components/DatePicker/DatePicker.stories.tsx +++ b/src/components/DatePicker/DatePicker.stories.tsx @@ -3,6 +3,7 @@ import { Story } from "@storybook/react/types-6-0"; import dayjs from "dayjs"; import React from "react"; import DatePicker from "./DatePicker"; +import "dayjs/locale/ja"; export default { title: "Components/Inputs/DatePicker", @@ -61,9 +62,7 @@ export const Error: Story = () => { }; export const Localize: Story = () => { - dayjs.locale("ja", { - weekdaysShort: ["日", "月", "火", "水", "木", "金", "土"], - }); + dayjs.locale("ja"); const renderMonthText = (day: dayjs.Dayjs) => day.format("YYYY年M月"); const displayFormat = () => "YYYY/MM/DD"; const [date, setDate] = React.useState(dayjs()); @@ -77,6 +76,8 @@ export const Localize: Story = () => {
void; renderMonthText?: ((month: dayjs.Dayjs) => React.ReactNode) | null; + locale?: string; + weekdaysShort?: string[]; error?: boolean; }; @@ -39,6 +42,8 @@ const DatePicker = React.forwardRef( onDateChange, renderMonthText: renderMonthTextProps, renderMonthElement, + locale = "en", + weekdaysShort, ...rest } = props; @@ -56,6 +61,14 @@ const DatePicker = React.forwardRef( return renderMonthTextProps(dayjsize); }; + if (weekdaysShort) { + moment.locale(locale, { + weekdaysShort: weekdaysShort, + }); + } else { + moment.locale(locale); + } + return ( Date: Tue, 8 Nov 2022 16:55:58 +0900 Subject: [PATCH 06/17] =?UTF-8?q?dayjs=E3=81=AElocaleData=E3=82=92?= =?UTF-8?q?=E6=B8=A1=E3=81=99=E3=82=B9=E3=82=BF=E3=82=A4=E3=83=AB=E3=81=AB?= =?UTF-8?q?=E3=81=97=E3=81=A6=E3=81=BF=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DatePicker/DatePicker.stories.tsx | 4 +++- src/components/DatePicker/DatePicker.tsx | 18 ++++++++++-------- src/utils/time.ts | 16 +++++++++++++++- 3 files changed, 28 insertions(+), 10 deletions(-) diff --git a/src/components/DatePicker/DatePicker.stories.tsx b/src/components/DatePicker/DatePicker.stories.tsx index b111b973c..dded31ea0 100644 --- a/src/components/DatePicker/DatePicker.stories.tsx +++ b/src/components/DatePicker/DatePicker.stories.tsx @@ -4,6 +4,7 @@ import dayjs from "dayjs"; import React from "react"; import DatePicker from "./DatePicker"; import "dayjs/locale/ja"; +import localeData from "dayjs/plugin/localeData"; export default { title: "Components/Inputs/DatePicker", @@ -63,6 +64,7 @@ export const Error: Story = () => { export const Localize: Story = () => { dayjs.locale("ja"); + dayjs.extend(localeData); const renderMonthText = (day: dayjs.Dayjs) => day.format("YYYY年M月"); const displayFormat = () => "YYYY/MM/DD"; const [date, setDate] = React.useState(dayjs()); @@ -77,7 +79,7 @@ export const Localize: Story = () => { void; renderMonthText?: ((month: dayjs.Dayjs) => React.ReactNode) | null; locale?: string; - weekdaysShort?: string[]; + localeData?: InstanceLocaleDataReturn; error?: boolean; }; @@ -43,7 +47,7 @@ const DatePicker = React.forwardRef( renderMonthText: renderMonthTextProps, renderMonthElement, locale = "en", - weekdaysShort, + localeData, ...rest } = props; @@ -61,10 +65,8 @@ const DatePicker = React.forwardRef( return renderMonthTextProps(dayjsize); }; - if (weekdaysShort) { - moment.locale(locale, { - weekdaysShort: weekdaysShort, - }); + if (localeData) { + moment.locale(locale, convertDayjsLocaleDataToObject(localeData)); } else { moment.locale(locale); } diff --git a/src/utils/time.ts b/src/utils/time.ts index 40db23d39..523515008 100644 --- a/src/utils/time.ts +++ b/src/utils/time.ts @@ -1,4 +1,4 @@ -import dayjs from "dayjs"; +import dayjs, { InstanceLocaleDataReturn } from "dayjs"; import moment from "moment"; // moment.jsで動いているreact-datesと互換性を持たせるためのメソッド @@ -14,3 +14,17 @@ export function momentToDayjs(date: moment.Moment | null): dayjs.Dayjs | null { const dateString = date.format(); return dayjs(dateString); } + +export function convertDayjsLocaleDataToObject( + localeData: InstanceLocaleDataReturn, +) { + return { + months: localeData.months(), + monthsShort: localeData.monthsShort(), + weekdays: localeData.weekdays(), + weekdaysShort: localeData.weekdaysShort(), + weekdaysMin: localeData.weekdaysMin(), + meridiem: localeData.meridiem, + ordinal: localeData.ordinal, + }; +} From 6c5f737fcf1cb289d37717747f973a7369f7f1d5 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Tue, 8 Nov 2022 16:57:38 +0900 Subject: [PATCH 07/17] nya --- src/utils/time.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/time.ts b/src/utils/time.ts index 523515008..77809f58c 100644 --- a/src/utils/time.ts +++ b/src/utils/time.ts @@ -15,6 +15,7 @@ export function momentToDayjs(date: moment.Moment | null): dayjs.Dayjs | null { return dayjs(dateString); } +// dayjsのlocaleDataをmomentjs用に変換するメソッド export function convertDayjsLocaleDataToObject( localeData: InstanceLocaleDataReturn, ) { From 4beb7e4b2594120fe1b314be9215ea934c1ffa58 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Thu, 10 Nov 2022 16:41:25 +0900 Subject: [PATCH 08/17] nyasu --- .../DateRangePicker.stories.tsx | 37 +++++----- .../DateRangePicker/DateRangePicker.tsx | 70 ++++++++++++++++--- 2 files changed, 81 insertions(+), 26 deletions(-) diff --git a/src/components/DateRangePicker/DateRangePicker.stories.tsx b/src/components/DateRangePicker/DateRangePicker.stories.tsx index 11dca38bb..b5ef64711 100644 --- a/src/components/DateRangePicker/DateRangePicker.stories.tsx +++ b/src/components/DateRangePicker/DateRangePicker.stories.tsx @@ -1,9 +1,11 @@ import React, { useState } from "react"; import { Story } from "@storybook/react/types-6-0"; -import moment from "moment"; +import dayjs from "dayjs"; import { Title, Description, ArgsTable, Stories } from "@storybook/addon-docs"; import DateRangePicker, { DateRangePickerProps } from "./DateRangePicker"; import "react-dates/lib/css/_datepicker.css"; +import "dayjs/locale/ja"; +import localeData from "dayjs/plugin/localeData"; export default { title: "Components/Inputs/DateRangePicker", @@ -43,14 +45,14 @@ export default { export const Basic: Story = () => { // MEMO: To be unaffected by "Localize" story. - moment.locale("en"); + dayjs.locale("en"); const [date, setDate] = useState({ - startDate: moment().set("date", 1), - endDate: moment(), + startDate: dayjs().set("date", 1), + endDate: dayjs(), }); const handleChangeDates = (arg: { - startDate: moment.Moment; - endDate: moment.Moment; + startDate: dayjs.Dayjs; + endDate: dayjs.Dayjs; }) => { setDate(arg); }; @@ -67,11 +69,11 @@ export const Basic: Story = () => { export const Error: Story = () => { // MEMO: To be unaffected by "Localize" story. - moment.locale("en"); + dayjs.locale("en"); return ( {}} /> @@ -79,18 +81,17 @@ export const Error: Story = () => { }; export const Localize: Story = () => { - moment.locale("ja", { - weekdaysShort: ["日", "月", "火", "水", "木", "金", "土"], - }); - const renderMonthText = (day: moment.Moment) => day.format("YYYY年M月"); + dayjs.locale("ja"); + dayjs.extend(localeData); + const renderMonthText = (day: dayjs.Dayjs) => day.format("YYYY年M月"); const displayFormat = () => "YYYY/MM/DD"; const [date, setDate] = useState({ - startDate: moment().set("date", 1), - endDate: moment(), + startDate: dayjs().set("date", 1), + endDate: dayjs(), }); const handleChangeDates = (arg: { - startDate: moment.Moment; - endDate: moment.Moment; + startDate: dayjs.Dayjs; + endDate: dayjs.Dayjs; }) => { setDate(arg); }; @@ -99,6 +100,8 @@ export const Localize: Story = () => { & { - startDate: moment.Moment | null; - endDate: moment.Moment | null; +export type DateRangePickerProps = Partial< + Omit< + DateRangePickerShape, + "startDate" | "endDate" | "onDatesChange" | "renderMonthText" + > +> & { + startDate: dayjs.Dayjs | null; + endDate: dayjs.Dayjs | null; onDatesChange: (arg: { - startDate: moment.Moment | null; - endDate: moment.Moment | null; + startDate: dayjs.Dayjs | null; + endDate: dayjs.Dayjs | null; }) => void; + renderMonthText?: ((month: dayjs.Dayjs) => React.ReactNode) | null; + locale?: string; + localeData?: InstanceLocaleDataReturn; error?: boolean; }; const DateRangePicker = React.forwardRef( (inProps, ref) => { const props = useLocaleProps({ props: inProps, name: "DateRangePicker" }); - const { startDate, endDate, error = false, ...rest } = props; + const { + startDate, + endDate, + error = false, + onDatesChange, + renderMonthText: renderMonthTextProps, + renderMonthElement, + locale = "en", + localeData, + ...rest + } = props; const [focusedInput, setFocusedInput] = React.useState(null); + const handleDatesChange = (arg: { + startDate: moment.Moment | null; + endDate: moment.Moment | null; + }) => { + const dayjsize = { + startDate: momentToDayjs(arg.startDate), + endDate: momentToDayjs(arg.endDate), + }; + onDatesChange(dayjsize); + }; + const handleRenderMonthText = (month: moment.Moment) => { + const dayjsize = momentToDayjs(month); + if (!renderMonthTextProps || !dayjsize) return; + return renderMonthTextProps(dayjsize); + }; + + if (localeData) { + moment.locale(locale, convertDayjsLocaleDataToObject(localeData)); + } else { + moment.locale(locale); + } + return ( ( } - {...rest} - startDate={startDate} - endDate={endDate} + startDate={dayjsToMoment(startDate)} + endDate={dayjsToMoment(endDate)} + // eslint-disable-next-line react/jsx-handler-names + renderMonthText={ + renderMonthTextProps ? handleRenderMonthText : renderMonthTextProps + } + renderMonthElement={renderMonthElement as never} focusedInput={focusedInput} onFocusChange={setFocusedInput} + onDatesChange={handleDatesChange} + {...rest} /> ); From 2f503db80e14906e9f455191a8e9bf8a07e9fe51 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Thu, 10 Nov 2022 17:34:51 +0900 Subject: [PATCH 09/17] =?UTF-8?q?=E5=A4=89=E3=81=88=E6=BC=8F=E3=82=8C?= =?UTF-8?q?=E3=82=92=E7=9B=B4=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/LocaleProvider/LocaleProvider.stories.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/LocaleProvider/LocaleProvider.stories.tsx b/src/components/LocaleProvider/LocaleProvider.stories.tsx index af952cb2a..108509798 100644 --- a/src/components/LocaleProvider/LocaleProvider.stories.tsx +++ b/src/components/LocaleProvider/LocaleProvider.stories.tsx @@ -17,7 +17,7 @@ import * as locales from "../../constants/locale"; import FileUploader from "../FileUploader"; import ItemEmpty from "../ItemEmpty"; import { FilterPackType, ReferredFilterType } from "../MultipleFilter/types"; -import moment from "moment"; +import dayjs from "dayjs"; export default { title: "Components/Utils/LocaleProvider", @@ -170,7 +170,7 @@ export const Example: Story = (args) => { ※ Needs locale import (e.g. import 'moment/locale/ja'). - {}} /> + {}} /> ); From f2bdb7511f1a9992d74096ab4730dde679330bae Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 16:46:24 +0900 Subject: [PATCH 10/17] nyago --- .vscode/settings.json | 1 - 1 file changed, 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index ecf025c2e..76513c486 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,5 +5,4 @@ "eslint.options": { "extensions": [".js", ".jsx", ".md", ".ts", ".tsx"] }, - "editor.defaultFormatter": "dbaeumer.vscode-eslint" } From a6c606be816d61f64fd7a0efd0854358d3c9074d Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 16:47:16 +0900 Subject: [PATCH 11/17] nyanya --- .vscode/settings.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 76513c486..264db2ed1 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -4,5 +4,5 @@ }, "eslint.options": { "extensions": [".js", ".jsx", ".md", ".ts", ".tsx"] - }, + } } From 3a5e650468f2164e351ab6caa1968da47383c8ca Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 16:50:53 +0900 Subject: [PATCH 12/17] =?UTF-8?q?=E3=81=B1=E3=81=91=E3=81=98=E3=81=AA?= =?UTF-8?q?=E3=81=8A=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/package.json b/package.json index 797c2fb6d..2cec70be5 100644 --- a/package.json +++ b/package.json @@ -25,17 +25,17 @@ "generate": "yarn scaffdog generate" }, "dependencies": { - "@popperjs/core": "^2.4.0", - "dayjs": "^1.11.6", - "moment": "^2.29.3", - "react-dates": "^21.8.0", - "react-popper": "^2.3.0", - "react-select": "^5.3.0", - "react-transition-group": "^4.4.1" + "@popperjs/core": "2.4.0", + "dayjs": "1.11.6", + "moment": "2.29.3", + "react-dates": "21.8.0", + "react-popper": "2.3.0", + "react-select": "5.3.0", + "react-transition-group": "4.4.1" }, "peerDependencies": { - "react": "^17.0.0 || ^18.0.0", - "react-dom": "^17.0.0 || ^18.0.0", + "react": "17.0.0 || 18.0.0", + "react-dom": "17.0.0 || 18.0.0", "styled-components": ">= 5.X" }, "devDependencies": { From 7ba31c9e4bcd72990e5ff4622b0177e7adc8c548 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 16:56:53 +0900 Subject: [PATCH 13/17] =?UTF-8?q?DatePicker=E3=81=AA=E3=81=8A=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DatePicker/DatePicker.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/DatePicker/DatePicker.tsx b/src/components/DatePicker/DatePicker.tsx index 061ac82af..fede546cc 100644 --- a/src/components/DatePicker/DatePicker.tsx +++ b/src/components/DatePicker/DatePicker.tsx @@ -44,7 +44,7 @@ const DatePicker = React.forwardRef( date, error = false, onDateChange, - renderMonthText: renderMonthTextProps, + renderMonthText, renderMonthElement, locale = "en", localeData, @@ -60,9 +60,10 @@ const DatePicker = React.forwardRef( onDateChange(dayjsize); }; const handleRenderMonthText = (month: moment.Moment) => { + if (renderMonthText == undefined || null) return; const dayjsize = momentToDayjs(month); - if (!renderMonthTextProps || !dayjsize) return; - return renderMonthTextProps(dayjsize); + if (dayjsize == null) return; + return renderMonthText(dayjsize); }; if (localeData) { @@ -97,9 +98,8 @@ const DatePicker = React.forwardRef( } - // eslint-disable-next-line react/jsx-handler-names renderMonthText={ - renderMonthTextProps ? handleRenderMonthText : renderMonthTextProps + renderMonthText ? handleRenderMonthText : renderMonthText } renderMonthElement={renderMonthElement as never} onFocusChange={onFocusChange} From fa679752b210ea63ea3d65481f8eb9f1d19120a3 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 16:58:25 +0900 Subject: [PATCH 14/17] =?UTF-8?q?DateRangePicker=E3=81=AA=E3=81=8A?= =?UTF-8?q?=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/DateRangePicker/DateRangePicker.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/DateRangePicker/DateRangePicker.tsx b/src/components/DateRangePicker/DateRangePicker.tsx index 8430bb2ef..11fc122f1 100644 --- a/src/components/DateRangePicker/DateRangePicker.tsx +++ b/src/components/DateRangePicker/DateRangePicker.tsx @@ -47,7 +47,7 @@ const DateRangePicker = React.forwardRef( endDate, error = false, onDatesChange, - renderMonthText: renderMonthTextProps, + renderMonthText, renderMonthElement, locale = "en", localeData, @@ -67,9 +67,10 @@ const DateRangePicker = React.forwardRef( onDatesChange(dayjsize); }; const handleRenderMonthText = (month: moment.Moment) => { + if (renderMonthText == undefined || null) return; const dayjsize = momentToDayjs(month); - if (!renderMonthTextProps || !dayjsize) return; - return renderMonthTextProps(dayjsize); + if (dayjsize == null) return; + return renderMonthText(dayjsize); }; if (localeData) { @@ -108,9 +109,8 @@ const DateRangePicker = React.forwardRef( } startDate={dayjsToMoment(startDate)} endDate={dayjsToMoment(endDate)} - // eslint-disable-next-line react/jsx-handler-names renderMonthText={ - renderMonthTextProps ? handleRenderMonthText : renderMonthTextProps + renderMonthText ? handleRenderMonthText : renderMonthText } renderMonthElement={renderMonthElement as never} focusedInput={focusedInput} From 2e1b445fe6a2b893343e97a7ee6b2008f63f9b25 Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 16:59:52 +0900 Subject: [PATCH 15/17] =?UTF-8?q?=E3=82=84=E3=83=BC=E3=82=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- yarn.lock | 234 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 140 insertions(+), 94 deletions(-) diff --git a/yarn.lock b/yarn.lock index 879cdfd38..4e53edbe7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -819,7 +819,7 @@ dependencies: "@babel/helper-plugin-utils" "^7.10.4" -"@babel/plugin-syntax-jsx@^7.12.13", "@babel/plugin-syntax-jsx@^7.17.12": +"@babel/plugin-syntax-jsx@^7.17.12": version "7.17.12" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.17.12.tgz#834035b45061983a491f60096f61a2e7c5674a47" integrity sha512-spyY3E3AURfxh/RHtjx5j6hs8am5NbUBGfcZ2vB3uShSpZdQyXSf5rR5Mk76vbtlAZOelyVQ71Fg0x9SG4fsog== @@ -1437,13 +1437,20 @@ core-js-pure "^3.25.1" regenerator-runtime "^0.13.4" -"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.2", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.0.0", "@babel/runtime@^7.10.2", "@babel/runtime@^7.12.0", "@babel/runtime@^7.12.5", "@babel/runtime@^7.17.8", "@babel/runtime@^7.18.9", "@babel/runtime@^7.3.1", "@babel/runtime@^7.5.0", "@babel/runtime@^7.5.5", "@babel/runtime@^7.7.6", "@babel/runtime@^7.8.4", "@babel/runtime@^7.8.7", "@babel/runtime@^7.9.2": version "7.19.0" resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.19.0.tgz#22b11c037b094d27a8a2504ea4dcff00f50e2259" integrity sha512-eR8Lo9hnDS7tqkO7NsV+mKvCmv5boaXFSZ70DnfhcgiEne8hv9oCEd36Klw74EtizEqLsy4YnW8UWwpBVolHZA== dependencies: regenerator-runtime "^0.13.4" +"@babel/runtime@^7.18.3": + version "7.20.1" + resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.20.1.tgz#1148bb33ab252b165a06698fde7576092a78b4a9" + integrity sha512-mrzLkl6U9YLF8qpqI7TB82PESyEGjm/0Ly91jG575eVxMMlb8fYfOXFZIJ8XfLrJZQbm7dlKry2bJmXBUEkdFg== + dependencies: + regenerator-runtime "^0.13.10" + "@babel/template@^7.12.7", "@babel/template@^7.16.7", "@babel/template@^7.3.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" @@ -1539,25 +1546,36 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" integrity sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw== -"@emotion/babel-plugin@^11.7.1": - version "11.9.2" - resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.9.2.tgz#723b6d394c89fb2ef782229d92ba95a740576e95" - integrity sha512-Pr/7HGH6H6yKgnVFNEj2MVlreu3ADqftqjqwUvDy/OJzKFgxKeTQ+eeUf20FOTuHVkDON2iNa25rAXVYtWJCjw== +"@emotion/babel-plugin@^11.10.5": + version "11.10.5" + resolved "https://registry.yarnpkg.com/@emotion/babel-plugin/-/babel-plugin-11.10.5.tgz#65fa6e1790ddc9e23cc22658a4c5dea423c55c3c" + integrity sha512-xE7/hyLHJac7D2Ve9dKroBBZqBT7WuPQmWcq7HSGb84sUuP4mlOWoB8dvVfD9yk5DHkU1m6RW7xSoDtnQHNQeA== dependencies: - "@babel/helper-module-imports" "^7.12.13" - "@babel/plugin-syntax-jsx" "^7.12.13" - "@babel/runtime" "^7.13.10" - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.5" - "@emotion/serialize" "^1.0.2" - babel-plugin-macros "^2.6.1" + "@babel/helper-module-imports" "^7.16.7" + "@babel/plugin-syntax-jsx" "^7.17.12" + "@babel/runtime" "^7.18.3" + "@emotion/hash" "^0.9.0" + "@emotion/memoize" "^0.8.0" + "@emotion/serialize" "^1.1.1" + babel-plugin-macros "^3.1.0" convert-source-map "^1.5.0" escape-string-regexp "^4.0.0" find-root "^1.1.0" source-map "^0.5.7" - stylis "4.0.13" + stylis "4.1.3" + +"@emotion/cache@^11.10.5": + version "11.10.5" + resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.10.5.tgz#c142da9351f94e47527ed458f7bbbbe40bb13c12" + integrity sha512-dGYHWyzTdmK+f2+EnIGBpkz1lKc4Zbj2KHd4cX3Wi8/OWr5pKslNjc3yABKH4adRGCvSX4VDC0i04mrrq0aiRA== + dependencies: + "@emotion/memoize" "^0.8.0" + "@emotion/sheet" "^1.2.1" + "@emotion/utils" "^1.2.0" + "@emotion/weak-memoize" "^0.3.0" + stylis "4.1.3" -"@emotion/cache@^11.4.0", "@emotion/cache@^11.9.3": +"@emotion/cache@^11.4.0": version "11.9.3" resolved "https://registry.yarnpkg.com/@emotion/cache/-/cache-11.9.3.tgz#96638449f6929fd18062cfe04d79b29b44c0d6cb" integrity sha512-0dgkI/JKlCXa+lEXviaMtGBL0ynpx4osh7rjOXE71q9bIF8G+XhJgvi+wDu0B0IdCVx37BffiwXlN9I3UuzFvg== @@ -1568,10 +1586,10 @@ "@emotion/weak-memoize" "^0.2.5" stylis "4.0.13" -"@emotion/hash@^0.8.0": - version "0.8.0" - resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.8.0.tgz#bbbff68978fefdbe68ccb533bc8cbe1d1afb5413" - integrity sha512-kBJtf7PH6aWwZ6fka3zQ0p6SBYzx4fl1LoZXE2RrnYST9Xljm7WfKJrU4g/Xr3Beg72MLrp1AWNUmuYJTL7Cow== +"@emotion/hash@^0.9.0": + version "0.9.0" + resolved "https://registry.yarnpkg.com/@emotion/hash/-/hash-0.9.0.tgz#c5153d50401ee3c027a57a177bc269b16d889cb7" + integrity sha512-14FtKiHhy2QoPIzdTcvh//8OyBlknNs2nXRwIhG904opCby3l+9Xaf/wuPvICBF0rc1ZCNBd3nKe9cd2mecVkQ== "@emotion/is-prop-valid@^1.1.0": version "1.1.3" @@ -1580,33 +1598,39 @@ dependencies: "@emotion/memoize" "^0.7.4" -"@emotion/memoize@^0.7.4", "@emotion/memoize@^0.7.5": +"@emotion/memoize@^0.7.4": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.7.5.tgz#2c40f81449a4e554e9fc6396910ed4843ec2be50" integrity sha512-igX9a37DR2ZPGYtV6suZ6whr8pTFtyHL3K/oLUotxpSVO2ASaprmAe2Dkq7tBo7CRY7MMDrAa9nuQP9/YG8FxQ== -"@emotion/react@^11.8.1": - version "11.9.3" - resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.9.3.tgz#f4f4f34444f6654a2e550f5dab4f2d360c101df9" - integrity sha512-g9Q1GcTOlzOEjqwuLF/Zd9LC+4FljjPjDfxSM7KmEakm+hsHXk+bYZ2q+/hTJzr0OUNkujo72pXLQvXj6H+GJQ== - dependencies: - "@babel/runtime" "^7.13.10" - "@emotion/babel-plugin" "^11.7.1" - "@emotion/cache" "^11.9.3" - "@emotion/serialize" "^1.0.4" - "@emotion/utils" "^1.1.0" - "@emotion/weak-memoize" "^0.2.5" +"@emotion/memoize@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/memoize/-/memoize-0.8.0.tgz#f580f9beb67176fa57aae70b08ed510e1b18980f" + integrity sha512-G/YwXTkv7Den9mXDO7AhLWkE3q+I92B+VqAE+dYG4NGPaHZGvt3G8Q0p9vmE+sq7rTGphUbAvmQ9YpbfMQGGlA== + +"@emotion/react@^11.1.1": + version "11.10.5" + resolved "https://registry.yarnpkg.com/@emotion/react/-/react-11.10.5.tgz#95fff612a5de1efa9c0d535384d3cfa115fe175d" + integrity sha512-TZs6235tCJ/7iF6/rvTaOH4oxQg2gMAcdHemjwLKIjKz4rRuYe1HJ2TQJKnAcRAfOUDdU8XoDadCe1rl72iv8A== + dependencies: + "@babel/runtime" "^7.18.3" + "@emotion/babel-plugin" "^11.10.5" + "@emotion/cache" "^11.10.5" + "@emotion/serialize" "^1.1.1" + "@emotion/use-insertion-effect-with-fallbacks" "^1.0.0" + "@emotion/utils" "^1.2.0" + "@emotion/weak-memoize" "^0.3.0" hoist-non-react-statics "^3.3.1" -"@emotion/serialize@^1.0.2", "@emotion/serialize@^1.0.4": - version "1.0.4" - resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.0.4.tgz#ff31fd11bb07999611199c2229e152faadc21a3c" - integrity sha512-1JHamSpH8PIfFwAMryO2bNka+y8+KA5yga5Ocf2d7ZEiJjb7xlLW7aknBGZqJLajuLOvJ+72vN+IBSwPlXD1Pg== +"@emotion/serialize@^1.1.1": + version "1.1.1" + resolved "https://registry.yarnpkg.com/@emotion/serialize/-/serialize-1.1.1.tgz#0595701b1902feded8a96d293b26be3f5c1a5cf0" + integrity sha512-Zl/0LFggN7+L1liljxXdsVSVlg6E/Z/olVWpfxUTxOAmi8NU7YoeWeLfi1RmnB2TATHoaWwIBRoL+FvAJiTUQA== dependencies: - "@emotion/hash" "^0.8.0" - "@emotion/memoize" "^0.7.4" - "@emotion/unitless" "^0.7.5" - "@emotion/utils" "^1.0.0" + "@emotion/hash" "^0.9.0" + "@emotion/memoize" "^0.8.0" + "@emotion/unitless" "^0.8.0" + "@emotion/utils" "^1.2.0" csstype "^3.0.2" "@emotion/sheet@^1.1.1": @@ -1614,26 +1638,51 @@ resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.1.1.tgz#015756e2a9a3c7c5f11d8ec22966a8dbfbfac787" integrity sha512-J3YPccVRMiTZxYAY0IOq3kd+hUP8idY8Kz6B/Cyo+JuXq52Ek+zbPbSQUrVQp95aJ+lsAW7DPL1P2Z+U1jGkKA== +"@emotion/sheet@^1.2.1": + version "1.2.1" + resolved "https://registry.yarnpkg.com/@emotion/sheet/-/sheet-1.2.1.tgz#0767e0305230e894897cadb6c8df2c51e61a6c2c" + integrity sha512-zxRBwl93sHMsOj4zs+OslQKg/uhF38MB+OMKoCrVuS0nyTkqnau+BM3WGEoOptg9Oz45T/aIGs1qbVAsEFo3nA== + "@emotion/stylis@^0.8.4": version "0.8.5" resolved "https://registry.yarnpkg.com/@emotion/stylis/-/stylis-0.8.5.tgz#deacb389bd6ee77d1e7fcaccce9e16c5c7e78e04" integrity sha512-h6KtPihKFn3T9fuIrwvXXUOwlx3rfUvfZIcP5a6rh8Y7zjE3O06hT5Ss4S/YI1AYhuZ1kjaE/5EaOOI2NqSylQ== -"@emotion/unitless@^0.7.4", "@emotion/unitless@^0.7.5": +"@emotion/unitless@^0.7.4": version "0.7.5" resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.7.5.tgz#77211291c1900a700b8a78cfafda3160d76949ed" integrity sha512-OWORNpfjMsSSUBVrRBVGECkhWcULOAJz9ZW8uK9qgxD+87M7jHRcvh/A96XXNhXTLmKcoYSQtBEX7lHMO7YRwg== -"@emotion/utils@^1.0.0", "@emotion/utils@^1.1.0": +"@emotion/unitless@^0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@emotion/unitless/-/unitless-0.8.0.tgz#a4a36e9cbdc6903737cd20d38033241e1b8833db" + integrity sha512-VINS5vEYAscRl2ZUDiT3uMPlrFQupiKgHz5AA4bCH1miKBg4qtwkim1qPmJj/4WG6TreYMY111rEFsjupcOKHw== + +"@emotion/use-insertion-effect-with-fallbacks@^1.0.0": + version "1.0.0" + resolved "https://registry.yarnpkg.com/@emotion/use-insertion-effect-with-fallbacks/-/use-insertion-effect-with-fallbacks-1.0.0.tgz#ffadaec35dbb7885bd54de3fa267ab2f860294df" + integrity sha512-1eEgUGmkaljiBnRMTdksDV1W4kUnmwgp7X9G8B++9GYwl1lUdqSndSriIrTJ0N7LQaoauY9JJ2yhiOYK5+NI4A== + +"@emotion/utils@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.1.0.tgz#86b0b297f3f1a0f2bdb08eeac9a2f49afd40d0cf" integrity sha512-iRLa/Y4Rs5H/f2nimczYmS5kFJEbpiVvgN3XVfZ022IYhuNA1IRSHEizcof88LtCTXtl9S2Cxt32KgaXEu72JQ== +"@emotion/utils@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@emotion/utils/-/utils-1.2.0.tgz#9716eaccbc6b5ded2ea5a90d65562609aab0f561" + integrity sha512-sn3WH53Kzpw8oQ5mgMmIzzyAaH2ZqFEbozVVBSYp538E06OSE6ytOp7pRAjNQR+Q/orwqdQYJSe2m3hCOeznkw== + "@emotion/weak-memoize@^0.2.5": version "0.2.5" resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== +"@emotion/weak-memoize@^0.3.0": + version "0.3.0" + resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.3.0.tgz#ea89004119dc42db2e1dba0f97d553f7372f6fcb" + integrity sha512-AHPmaAx+RYfZz0eYu6Gviiagpmiyw98ySSlQvCUhVGDRtDFe4DBS0x1bSjdF3gqUDYOczB+yYvBTtEylYSdRhg== + "@eslint/eslintrc@^1.3.3": version "1.3.3" resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.3.tgz#2b044ab39fdfa75b4688184f9e573ce3c5b0ff95" @@ -1649,18 +1698,6 @@ minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@floating-ui/core@^1.0.1": - version "1.0.1" - resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.0.1.tgz#00e64d74e911602c8533957af0cce5af6b2e93c8" - integrity sha512-bO37brCPfteXQfFY0DyNDGB3+IMe4j150KFQcgJ5aBP295p9nBGeHEs/p0czrRbtlHq4Px/yoPXO/+dOCcF4uA== - -"@floating-ui/dom@^1.0.1": - version "1.0.2" - resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.0.2.tgz#c5184c52c6f50abd11052d71204f4be2d9245237" - integrity sha512-5X9WSvZ8/fjy3gDu8yx9HAA4KG1lazUN2P4/VnaXLxTO9Dz53HI1oYoh1OlhqFNlHgGDiwFX5WhFCc2ljbW3yA== - dependencies: - "@floating-ui/core" "^1.0.1" - "@gar/promisify@^1.0.1": version "1.1.3" resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.3.tgz#555193ab2e3bb3b6adc3d551c9c030d9e860daf6" @@ -2137,10 +2174,10 @@ schema-utils "^3.0.0" source-map "^0.7.3" -"@popperjs/core@^2.4.0": - version "2.11.5" - resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.11.5.tgz#db5a11bf66bdab39569719555b0f76e138d7bd64" - integrity sha512-9X2obfABZuDVLCgPK9aX0a/x4jaOEweTTWE2+9sr0Qqqevj2Uv5XorvusThmc9XGYpS9yI+fhh8RTafBtGposw== +"@popperjs/core@2.4.0": + version "2.4.0" + resolved "https://registry.yarnpkg.com/@popperjs/core/-/core-2.4.0.tgz#0e1bdf8d021e7ea58affade33d9d607e11365915" + integrity sha512-NMrDy6EWh9TPdSRiHmHH2ye1v5U0gBD7pRYwSwJvomx7Bm4GG04vu63dYiVzebLOx2obPpJugew06xVP0Nk7hA== "@rollup/plugin-commonjs@23.0.0": version "23.0.0" @@ -4893,16 +4930,7 @@ babel-plugin-jest-hoist@^28.1.1: "@types/babel__core" "^7.1.14" "@types/babel__traverse" "^7.0.6" -babel-plugin-macros@^2.6.1: - version "2.8.0" - resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.8.0.tgz#0f958a7cc6556b1e65344465d99111a1e5e10138" - integrity sha512-SEP5kJpfGYqYKpBrj5XU3ahw5p5GOHJ0U5ssOSQ/WBVdwkD2Dzlce95exQTs3jOVWPPKLBN2rlEWkCK7dSmLvg== - dependencies: - "@babel/runtime" "^7.7.2" - cosmiconfig "^6.0.0" - resolve "^1.12.0" - -babel-plugin-macros@^3.0.1: +babel-plugin-macros@^3.0.1, babel-plugin-macros@^3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-3.1.0.tgz#9ef6dc74deb934b4db344dc973ee851d148c50c1" integrity sha512-Cg7TFGpIr01vOQNODXOOaGz2NpCU5gl8x1qJFbb6hbZxR7XrcE2vtbAsTAbJ7/xwJtUuJEw8K8Zr/AE0LHlesg== @@ -6482,16 +6510,16 @@ data-urls@^3.0.2: whatwg-mimetype "^3.0.0" whatwg-url "^11.0.0" +dayjs@1.11.6: + version "1.11.6" + resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.6.tgz#2e79a226314ec3ec904e3ee1dd5a4f5e5b1c7afb" + integrity sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ== + dayjs@^1.10.4: version "1.11.3" resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.3.tgz#4754eb694a624057b9ad2224b67b15d552589258" integrity sha512-xxwlswWOlGhzgQ4TKzASQkUhqERI3egRNqgV4ScR8wlANA/A9tZ7miXa44vTTKEq5l7vWoL5G57bG3zA+Kow0A== -dayjs@^1.11.6: - version "1.11.6" - resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.6.tgz#2e79a226314ec3ec904e3ee1dd5a4f5e5b1c7afb" - integrity sha512-zZbY5giJAinCG+7AGaw0wIhNZ6J8AhWuSXKvuc1KAyMiRsvGQWqh4L+MomvhdAYjN+lqvVCMq1I41e3YHvXkyQ== - debug@2.6.9, debug@^2.2.0, debug@^2.3.3, debug@^2.6.0, debug@^2.6.9: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" @@ -10787,10 +10815,10 @@ memfs@^3.2.2: dependencies: fs-monkey "^1.0.3" -memoize-one@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-6.0.0.tgz#b2591b871ed82948aee4727dc6abceeeac8c1045" - integrity sha512-rkpe71W0N0c0Xz6QD0eJETuWAJGnJ9afsl1srmwPrI+yBCkge5EycXXbYRyvL29zZVUWQCY7InPRCv3GDXuZNw== +memoize-one@^5.0.0: + version "5.2.1" + resolved "https://registry.yarnpkg.com/memoize-one/-/memoize-one-5.2.1.tgz#8337aa3c4335581839ec01c3d594090cebe8f00e" + integrity sha512-zYiwtZUcYyXKo/np96AGZAckk+FWWsUdJ3cHGGmld7+AhvcWmQyGCYUh1hc4Q/pkOhb65dQR/pqCyK0cOaHz4Q== memoizerific@^1.11.3: version "1.11.3" @@ -11071,7 +11099,12 @@ mkpath@^1.0.0: resolved "https://registry.yarnpkg.com/mkpath/-/mkpath-1.0.0.tgz#ebb3a977e7af1c683ae6fda12b545a6ba6c5853d" integrity sha512-PbNHr7Y/9Y/2P5pKFv5XOGBfNQqZ+fdiHWcuf7swLACN5ZW5LU7J5tMU8LSBjpluAxAxKYGD9nnaIbdRy9+m1w== -moment@>=1.6.0, moment@^2.26.0, moment@^2.29.3: +moment@2.29.3: + version "2.29.3" + resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.3.tgz#edd47411c322413999f7a5940d526de183c031f3" + integrity sha512-c6YRvhEo//6T2Jz/vVtYzqBzwvPT95JBQ+smCytzf7c50oMZRsR/a4w88aD34I+/QVSfnoAnSBFPJHItlOMJVw== + +moment@>=1.6.0, moment@^2.26.0: version "2.29.4" resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.4.tgz#3dbe052889fe7c1b2ed966fcb3a77328964ef108" integrity sha512-5LC9SOxjSc2HF6vO2CyuTDNivEdoz2IvyJJGj6X8DJ0eFyfszE0QiEd+iXmBvUP3WHxSjFH/vIsA0EN00cgr8w== @@ -12754,7 +12787,7 @@ rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-dates@^21.8.0: +react-dates@21.8.0: version "21.8.0" resolved "https://registry.yarnpkg.com/react-dates/-/react-dates-21.8.0.tgz#355c3c7a243a7c29568fe00aca96231e171a5e94" integrity sha512-PPriGqi30CtzZmoHiGdhlA++YPYPYGCZrhydYmXXQ6RAvAsaONcPtYgXRTLozIOrsQ5mSo40+DiA5eOFHnZ6xw== @@ -12860,7 +12893,7 @@ react-outside-click-handler@^1.2.4: object.values "^1.1.0" prop-types "^15.7.2" -react-popper@^2.3.0: +react-popper@2.3.0: version "2.3.0" resolved "https://registry.yarnpkg.com/react-popper/-/react-popper-2.3.0.tgz#17891c620e1320dce318bad9fede46a5f71c70ba" integrity sha512-e1hj8lL3uM+sgSR4Lxzn5h1GxBlpa4CQz0XLF8kx4MDrDRWY0Ena4c97PUeSX9i5W3UAfDP0z0FXCTQkoXUl3Q== @@ -12880,20 +12913,18 @@ react-refresh@^0.11.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046" integrity sha512-F27qZr8uUqwhWZboondsPx8tnC3Ct3SxZA3V5WyEvujRyyNv0VYPhoBg1gZ8/MV5tubQp76Trw8lTv9hzRBa+A== -react-select@^5.3.0: - version "5.6.0" - resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.6.0.tgz#d987f4c86b3dcd32307a0104e503e4e8a9777a34" - integrity sha512-uUvP/72rA8NGhOL16RVBaeC12Wa4NUE0iXIa6hz0YRno9ZgxTmpuMeKzjR7vHcwmigpVCoe0prP+3NVb6Obq8Q== +react-select@5.3.0: + version "5.3.0" + resolved "https://registry.yarnpkg.com/react-select/-/react-select-5.3.0.tgz#dc77c1f95e1037ec4cb01c5e5d6272d80be8d3f6" + integrity sha512-GM6Fbv1+X+kb3e5Fc4oNeyOJkCIesY/D4NBiReKlGY4RxoeztFYm3J0KREgwMaIKQqwTiuLqTlpUBY3SYw5goQ== dependencies: "@babel/runtime" "^7.12.0" "@emotion/cache" "^11.4.0" - "@emotion/react" "^11.8.1" - "@floating-ui/dom" "^1.0.1" + "@emotion/react" "^11.1.1" "@types/react-transition-group" "^4.4.0" - memoize-one "^6.0.0" + memoize-one "^5.0.0" prop-types "^15.6.0" react-transition-group "^4.3.0" - use-isomorphic-layout-effect "^1.1.2" react-syntax-highlighter@^15.4.5: version "15.5.0" @@ -12906,7 +12937,17 @@ react-syntax-highlighter@^15.4.5: prismjs "^1.27.0" refractor "^3.6.0" -react-transition-group@^4.3.0, react-transition-group@^4.4.1: +react-transition-group@4.4.1: + version "4.4.1" + resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.1.tgz#63868f9325a38ea5ee9535d828327f85773345c9" + integrity sha512-Djqr7OQ2aPUiYurhPalTrVy9ddmFCCzwhqQmtN+J3+3DzLO209Fdr70QrN8Z3DsglWql6iY1lDWAfpFiBtuKGw== + dependencies: + "@babel/runtime" "^7.5.5" + dom-helpers "^5.0.1" + loose-envify "^1.4.0" + prop-types "^15.6.2" + +react-transition-group@^4.3.0: version "4.4.2" resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-4.4.2.tgz#8b59a56f09ced7b55cbd53c36768b922890d5470" integrity sha512-/RNYfRAMlZwDSr6z4zNKV6xu53/e2BuaBbGhbyYIXTrmgu/bGHzmqOs7mJSJBHy9Ud+ApHx3QjrkKSp1pxvlFg== @@ -13072,6 +13113,11 @@ regenerate@^1.4.2: resolved "https://registry.yarnpkg.com/regenerate/-/regenerate-1.4.2.tgz#b9346d8827e8f5a32f7ba29637d398b69014848a" integrity sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A== +regenerator-runtime@^0.13.10: + version "0.13.10" + resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.10.tgz#ed07b19616bcbec5da6274ebc75ae95634bfc2ee" + integrity sha512-KepLsg4dU12hryUO7bp/axHAKvwGOCV0sGloQtpagJ12ai+ojVDqkeGSiRX1zlq+kjIMZ1t7gpze+26QqtdGqw== + regenerator-runtime@^0.13.4, regenerator-runtime@^0.13.7: version "0.13.9" resolved "https://registry.yarnpkg.com/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz#8925742a98ffd90814988d7566ad30ca3b263b52" @@ -13317,7 +13363,7 @@ resolve.exports@^1.1.0: resolved "https://registry.yarnpkg.com/resolve.exports/-/resolve.exports-1.1.0.tgz#5ce842b94b05146c0e03076985d1d0e7e48c90c9" integrity sha512-J1l+Zxxp4XK3LUDZ9m60LRJF/mAe4z6a4xyabPHk7pvK5t35dACV32iIjJDFeWZFfZlO29w6SZ67knR0tHzJtQ== -resolve@^1.10.0, resolve@^1.12.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.3.2: +resolve@^1.10.0, resolve@^1.14.2, resolve@^1.19.0, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.22.1, resolve@^1.3.2: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" integrity sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw== @@ -14341,6 +14387,11 @@ stylis@4.0.13: resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.0.13.tgz#f5db332e376d13cc84ecfe5dace9a2a51d954c91" integrity sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag== +stylis@4.1.3: + version "4.1.3" + resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.3.tgz#fd2fbe79f5fed17c55269e16ed8da14c84d069f7" + integrity sha512-GP6WDNWf+o403jrEp9c5jibKavrtLW+/qYGhFxFrG8maXhwTBI7gLLhiBb0o7uFccWN+EOS9aMO6cGHWAO07OA== + supports-color@^5.3.0, supports-color@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" @@ -15146,11 +15197,6 @@ url@^0.11.0: punycode "1.3.2" querystring "0.2.0" -use-isomorphic-layout-effect@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb" - integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA== - use@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" From 11c9b96b496edc96bb42520ecec037a47501508f Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 18:08:39 +0900 Subject: [PATCH 16/17] =?UTF-8?q?=E3=81=B4=E3=81=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 2cec70be5..0495bbb2e 100644 --- a/package.json +++ b/package.json @@ -34,8 +34,8 @@ "react-transition-group": "4.4.1" }, "peerDependencies": { - "react": "17.0.0 || 18.0.0", - "react-dom": "17.0.0 || 18.0.0", + "react": "^17.0.0 || ^18.0.0", + "react-dom": "^17.0.0 || ^18.0.0", "styled-components": ">= 5.X" }, "devDependencies": { From 95dbf97c046a7021713e5779c9c856ca00f814cd Mon Sep 17 00:00:00 2001 From: maktak1995 Date: Fri, 11 Nov 2022 18:17:54 +0900 Subject: [PATCH 17/17] nya --- src/components/DatePicker/DatePicker.tsx | 4 ++-- src/components/DateRangePicker/DateRangePicker.tsx | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/DatePicker/DatePicker.tsx b/src/components/DatePicker/DatePicker.tsx index fede546cc..1937daf22 100644 --- a/src/components/DatePicker/DatePicker.tsx +++ b/src/components/DatePicker/DatePicker.tsx @@ -60,9 +60,9 @@ const DatePicker = React.forwardRef( onDateChange(dayjsize); }; const handleRenderMonthText = (month: moment.Moment) => { - if (renderMonthText == undefined || null) return; + if (renderMonthText == undefined) return; const dayjsize = momentToDayjs(month); - if (dayjsize == null) return; + if (dayjsize === null) return; return renderMonthText(dayjsize); }; diff --git a/src/components/DateRangePicker/DateRangePicker.tsx b/src/components/DateRangePicker/DateRangePicker.tsx index 11fc122f1..e69851af3 100644 --- a/src/components/DateRangePicker/DateRangePicker.tsx +++ b/src/components/DateRangePicker/DateRangePicker.tsx @@ -67,9 +67,9 @@ const DateRangePicker = React.forwardRef( onDatesChange(dayjsize); }; const handleRenderMonthText = (month: moment.Moment) => { - if (renderMonthText == undefined || null) return; + if (renderMonthText == undefined) return; const dayjsize = momentToDayjs(month); - if (dayjsize == null) return; + if (dayjsize === null) return; return renderMonthText(dayjsize); };