@react-fabric/lexical 1.0.0-beta.62 → 1.0.0-beta.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/_lexical.css +10 -13
- package/dist/cjs/{packages/lexical/src/editor → editor}/LexicalEditor.js +2 -2
- package/dist/cjs/{packages/lexical/src/hooks → hooks}/useFormatWatcher.js +54 -56
- package/dist/cjs/{packages/lexical/src/plugins → plugins}/CommentPlugin.js +12 -18
- package/dist/cjs/{packages/lexical/src/plugins → plugins}/DraggableBlockPlugin.js +2 -2
- package/dist/esm/{packages/lexical/src/editor → editor}/LexicalEditor.js +2 -2
- package/dist/esm/{packages/lexical/src/hooks → hooks}/useFormatWatcher.js +54 -56
- package/dist/esm/{packages/lexical/src/plugins → plugins}/CommentPlugin.js +10 -16
- package/dist/esm/{packages/lexical/src/plugins → plugins}/DraggableBlockPlugin.js +2 -2
- package/dist/types/editor/LexicalEditor.d.ts +1 -1
- package/dist/types/plugins/CommentPlugin.d.ts +1 -1
- package/dist/types/plugins/DraggableBlockPlugin.d.ts +1 -1
- package/package.json +14 -13
- package/src/editor/LexicalEditor.tsx +2 -2
- package/src/hooks/useFormatWatcher.ts +0 -2
- package/src/plugins/CommentPlugin.tsx +3 -3
- package/src/plugins/DraggableBlockPlugin.tsx +3 -3
- package/dist/cjs/node_modules/date-fns/_lib/addLeadingZeros.js +0 -9
- package/dist/cjs/node_modules/date-fns/_lib/defaultOptions.js +0 -9
- package/dist/cjs/node_modules/date-fns/_lib/format/formatters.js +0 -779
- package/dist/cjs/node_modules/date-fns/_lib/format/lightFormatters.js +0 -96
- package/dist/cjs/node_modules/date-fns/_lib/format/longFormatters.js +0 -68
- package/dist/cjs/node_modules/date-fns/_lib/getRoundingMethod.js +0 -12
- package/dist/cjs/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -33
- package/dist/cjs/node_modules/date-fns/_lib/normalizeDates.js +0 -13
- package/dist/cjs/node_modules/date-fns/_lib/normalizeInterval.js +0 -10
- package/dist/cjs/node_modules/date-fns/_lib/protectedTokens.js +0 -29
- package/dist/cjs/node_modules/date-fns/add.js +0 -73
- package/dist/cjs/node_modules/date-fns/addDays.js +0 -46
- package/dist/cjs/node_modules/date-fns/addHours.js +0 -39
- package/dist/cjs/node_modules/date-fns/addMilliseconds.js +0 -39
- package/dist/cjs/node_modules/date-fns/addMinutes.js +0 -41
- package/dist/cjs/node_modules/date-fns/addMonths.js +0 -80
- package/dist/cjs/node_modules/date-fns/addQuarters.js +0 -38
- package/dist/cjs/node_modules/date-fns/addWeeks.js +0 -38
- package/dist/cjs/node_modules/date-fns/addYears.js +0 -38
- package/dist/cjs/node_modules/date-fns/compareAsc.js +0 -50
- package/dist/cjs/node_modules/date-fns/constants.js +0 -66
- package/dist/cjs/node_modules/date-fns/constructFrom.js +0 -54
- package/dist/cjs/node_modules/date-fns/differenceInCalendarDays.js +0 -67
- package/dist/cjs/node_modules/date-fns/differenceInCalendarMonths.js +0 -47
- package/dist/cjs/node_modules/date-fns/differenceInCalendarYears.js +0 -43
- package/dist/cjs/node_modules/date-fns/differenceInDays.js +0 -112
- package/dist/cjs/node_modules/date-fns/differenceInHours.js +0 -46
- package/dist/cjs/node_modules/date-fns/differenceInMilliseconds.js +0 -34
- package/dist/cjs/node_modules/date-fns/differenceInMinutes.js +0 -50
- package/dist/cjs/node_modules/date-fns/differenceInMonths.js +0 -65
- package/dist/cjs/node_modules/date-fns/differenceInSeconds.js +0 -41
- package/dist/cjs/node_modules/date-fns/differenceInYears.js +0 -67
- package/dist/cjs/node_modules/date-fns/endOfDay.js +0 -40
- package/dist/cjs/node_modules/date-fns/endOfDecade.js +0 -45
- package/dist/cjs/node_modules/date-fns/endOfHour.js +0 -40
- package/dist/cjs/node_modules/date-fns/endOfMinute.js +0 -40
- package/dist/cjs/node_modules/date-fns/endOfMonth.js +0 -42
- package/dist/cjs/node_modules/date-fns/endOfQuarter.js +0 -43
- package/dist/cjs/node_modules/date-fns/endOfWeek.js +0 -58
- package/dist/cjs/node_modules/date-fns/endOfYear.js +0 -42
- package/dist/cjs/node_modules/date-fns/format.js +0 -431
- package/dist/cjs/node_modules/date-fns/getDayOfYear.js +0 -39
- package/dist/cjs/node_modules/date-fns/getISOWeek.js +0 -45
- package/dist/cjs/node_modules/date-fns/getISOWeekYear.js +0 -57
- package/dist/cjs/node_modules/date-fns/getWeek.js +0 -59
- package/dist/cjs/node_modules/date-fns/getWeekYear.js +0 -80
- package/dist/cjs/node_modules/date-fns/intervalToDuration.js +0 -70
- package/dist/cjs/node_modules/date-fns/isAfter.js +0 -30
- package/dist/cjs/node_modules/date-fns/isBefore.js +0 -30
- package/dist/cjs/node_modules/date-fns/isDate.js +0 -46
- package/dist/cjs/node_modules/date-fns/isLastDayOfMonth.js +0 -33
- package/dist/cjs/node_modules/date-fns/isSameMonth.js +0 -48
- package/dist/cjs/node_modules/date-fns/isSameWeek.js +0 -56
- package/dist/cjs/node_modules/date-fns/isSameYear.js +0 -40
- package/dist/cjs/node_modules/date-fns/isValid.js +0 -44
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -12
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -66
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -61
- package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -24
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js +0 -139
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatRelative.js +0 -15
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/localize.js +0 -166
- package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/match.js +0 -146
- package/dist/cjs/node_modules/date-fns/locale/ar-SA.js +0 -32
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatDistance.js +0 -200
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatLong.js +0 -44
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatRelative.js +0 -15
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/localize.js +0 -195
- package/dist/cjs/node_modules/date-fns/locale/de/_lib/match.js +0 -138
- package/dist/cjs/node_modules/date-fns/locale/de.js +0 -36
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -105
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -15
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -191
- package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/match.js +0 -136
- package/dist/cjs/node_modules/date-fns/locale/en-US.js +0 -33
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -105
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -29
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/localize.js +0 -168
- package/dist/cjs/node_modules/date-fns/locale/es/_lib/match.js +0 -142
- package/dist/cjs/node_modules/date-fns/locale/es.js +0 -36
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatDistance.js +0 -104
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatRelative.js +0 -15
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/localize.js +0 -169
- package/dist/cjs/node_modules/date-fns/locale/fr/_lib/match.js +0 -137
- package/dist/cjs/node_modules/date-fns/locale/fr.js +0 -33
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatDistance.js +0 -109
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatRelative.js +0 -15
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/localize.js +0 -233
- package/dist/cjs/node_modules/date-fns/locale/hi/_lib/match.js +0 -141
- package/dist/cjs/node_modules/date-fns/locale/hi.js +0 -32
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatDistance.js +0 -105
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatRelative.js +0 -70
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/localize.js +0 -168
- package/dist/cjs/node_modules/date-fns/locale/it/_lib/match.js +0 -137
- package/dist/cjs/node_modules/date-fns/locale/it.js +0 -34
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatDistance.js +0 -119
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatRelative.js +0 -16
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/localize.js +0 -181
- package/dist/cjs/node_modules/date-fns/locale/ja/_lib/match.js +0 -122
- package/dist/cjs/node_modules/date-fns/locale/ja.js +0 -36
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatDistance.js +0 -105
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatRelative.js +0 -15
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/localize.js +0 -171
- package/dist/cjs/node_modules/date-fns/locale/ko/_lib/match.js +0 -119
- package/dist/cjs/node_modules/date-fns/locale/ko.js +0 -34
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatDistance.js +0 -105
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatRelative.js +0 -26
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/localize.js +0 -168
- package/dist/cjs/node_modules/date-fns/locale/pt/_lib/match.js +0 -141
- package/dist/cjs/node_modules/date-fns/locale/pt.js +0 -33
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatDistance.js +0 -250
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatLong.js +0 -40
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatRelative.js +0 -92
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/localize.js +0 -214
- package/dist/cjs/node_modules/date-fns/locale/ru/_lib/match.js +0 -142
- package/dist/cjs/node_modules/date-fns/locale/ru.js +0 -33
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +0 -105
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +0 -43
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +0 -35
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/localize.js +0 -187
- package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/match.js +0 -134
- package/dist/cjs/node_modules/date-fns/locale/zh-CN.js +0 -36
- package/dist/cjs/node_modules/date-fns/startOfDay.js +0 -40
- package/dist/cjs/node_modules/date-fns/startOfDecade.js +0 -45
- package/dist/cjs/node_modules/date-fns/startOfHour.js +0 -40
- package/dist/cjs/node_modules/date-fns/startOfISOWeek.js +0 -40
- package/dist/cjs/node_modules/date-fns/startOfISOWeekYear.js +0 -47
- package/dist/cjs/node_modules/date-fns/startOfMinute.js +0 -40
- package/dist/cjs/node_modules/date-fns/startOfMonth.js +0 -42
- package/dist/cjs/node_modules/date-fns/startOfQuarter.js +0 -43
- package/dist/cjs/node_modules/date-fns/startOfWeek.js +0 -58
- package/dist/cjs/node_modules/date-fns/startOfWeekYear.js +0 -69
- package/dist/cjs/node_modules/date-fns/startOfYear.js +0 -41
- package/dist/cjs/node_modules/date-fns/toDate.js +0 -51
- package/dist/cjs/packages/date/dist/esm/display/DateDuration.js +0 -178
- package/dist/cjs/packages/date/dist/esm/hijri/DateConverter.js +0 -154
- package/dist/cjs/packages/date/dist/esm/hijri/FormatDate.js +0 -116
- package/dist/cjs/packages/date/dist/esm/hijri/HijriDate.js +0 -531
- package/dist/cjs/packages/date/dist/esm/hijri/StringDateParser.js +0 -74
- package/dist/cjs/packages/date/dist/esm/hijri/index.js +0 -21
- package/dist/cjs/packages/date/dist/esm/hijri/initializer.js +0 -113
- package/dist/cjs/packages/date/dist/esm/hijri/locales.js +0 -19
- package/dist/cjs/packages/date/dist/esm/hijri/safe.js +0 -17
- package/dist/cjs/packages/date/dist/esm/i18n/ar/date.json.js +0 -213
- package/dist/cjs/packages/date/dist/esm/i18n/en/date.json.js +0 -83
- package/dist/cjs/packages/date/dist/esm/i18n/index.js +0 -33
- package/dist/cjs/packages/date/dist/esm/types/index.js +0 -46
- package/dist/cjs/packages/date/dist/esm/utils/dateUtil.js +0 -472
- package/dist/esm/node_modules/date-fns/_lib/addLeadingZeros.js +0 -9
- package/dist/esm/node_modules/date-fns/_lib/defaultOptions.js +0 -9
- package/dist/esm/node_modules/date-fns/_lib/format/formatters.js +0 -779
- package/dist/esm/node_modules/date-fns/_lib/format/lightFormatters.js +0 -96
- package/dist/esm/node_modules/date-fns/_lib/format/longFormatters.js +0 -68
- package/dist/esm/node_modules/date-fns/_lib/getRoundingMethod.js +0 -12
- package/dist/esm/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -33
- package/dist/esm/node_modules/date-fns/_lib/normalizeDates.js +0 -13
- package/dist/esm/node_modules/date-fns/_lib/normalizeInterval.js +0 -10
- package/dist/esm/node_modules/date-fns/_lib/protectedTokens.js +0 -27
- package/dist/esm/node_modules/date-fns/add.js +0 -70
- package/dist/esm/node_modules/date-fns/addDays.js +0 -43
- package/dist/esm/node_modules/date-fns/addHours.js +0 -36
- package/dist/esm/node_modules/date-fns/addMilliseconds.js +0 -36
- package/dist/esm/node_modules/date-fns/addMinutes.js +0 -38
- package/dist/esm/node_modules/date-fns/addMonths.js +0 -77
- package/dist/esm/node_modules/date-fns/addQuarters.js +0 -35
- package/dist/esm/node_modules/date-fns/addWeeks.js +0 -35
- package/dist/esm/node_modules/date-fns/addYears.js +0 -35
- package/dist/esm/node_modules/date-fns/compareAsc.js +0 -47
- package/dist/esm/node_modules/date-fns/constants.js +0 -62
- package/dist/esm/node_modules/date-fns/constructFrom.js +0 -51
- package/dist/esm/node_modules/date-fns/differenceInCalendarDays.js +0 -64
- package/dist/esm/node_modules/date-fns/differenceInCalendarMonths.js +0 -44
- package/dist/esm/node_modules/date-fns/differenceInCalendarYears.js +0 -40
- package/dist/esm/node_modules/date-fns/differenceInDays.js +0 -109
- package/dist/esm/node_modules/date-fns/differenceInHours.js +0 -43
- package/dist/esm/node_modules/date-fns/differenceInMilliseconds.js +0 -31
- package/dist/esm/node_modules/date-fns/differenceInMinutes.js +0 -47
- package/dist/esm/node_modules/date-fns/differenceInMonths.js +0 -62
- package/dist/esm/node_modules/date-fns/differenceInSeconds.js +0 -38
- package/dist/esm/node_modules/date-fns/differenceInYears.js +0 -64
- package/dist/esm/node_modules/date-fns/endOfDay.js +0 -37
- package/dist/esm/node_modules/date-fns/endOfDecade.js +0 -42
- package/dist/esm/node_modules/date-fns/endOfHour.js +0 -37
- package/dist/esm/node_modules/date-fns/endOfMinute.js +0 -37
- package/dist/esm/node_modules/date-fns/endOfMonth.js +0 -39
- package/dist/esm/node_modules/date-fns/endOfQuarter.js +0 -40
- package/dist/esm/node_modules/date-fns/endOfWeek.js +0 -55
- package/dist/esm/node_modules/date-fns/endOfYear.js +0 -39
- package/dist/esm/node_modules/date-fns/format.js +0 -425
- package/dist/esm/node_modules/date-fns/getDayOfYear.js +0 -36
- package/dist/esm/node_modules/date-fns/getISOWeek.js +0 -42
- package/dist/esm/node_modules/date-fns/getISOWeekYear.js +0 -54
- package/dist/esm/node_modules/date-fns/getWeek.js +0 -56
- package/dist/esm/node_modules/date-fns/getWeekYear.js +0 -77
- package/dist/esm/node_modules/date-fns/intervalToDuration.js +0 -67
- package/dist/esm/node_modules/date-fns/isAfter.js +0 -27
- package/dist/esm/node_modules/date-fns/isBefore.js +0 -27
- package/dist/esm/node_modules/date-fns/isDate.js +0 -43
- package/dist/esm/node_modules/date-fns/isLastDayOfMonth.js +0 -30
- package/dist/esm/node_modules/date-fns/isSameMonth.js +0 -45
- package/dist/esm/node_modules/date-fns/isSameWeek.js +0 -53
- package/dist/esm/node_modules/date-fns/isSameYear.js +0 -37
- package/dist/esm/node_modules/date-fns/isValid.js +0 -41
- package/dist/esm/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -12
- package/dist/esm/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -66
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -61
- package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -24
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js +0 -139
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatRelative.js +0 -15
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/localize.js +0 -166
- package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/match.js +0 -146
- package/dist/esm/node_modules/date-fns/locale/ar-SA.js +0 -29
- package/dist/esm/node_modules/date-fns/locale/de/_lib/formatDistance.js +0 -200
- package/dist/esm/node_modules/date-fns/locale/de/_lib/formatLong.js +0 -44
- package/dist/esm/node_modules/date-fns/locale/de/_lib/formatRelative.js +0 -15
- package/dist/esm/node_modules/date-fns/locale/de/_lib/localize.js +0 -195
- package/dist/esm/node_modules/date-fns/locale/de/_lib/match.js +0 -138
- package/dist/esm/node_modules/date-fns/locale/de.js +0 -33
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -105
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -15
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -191
- package/dist/esm/node_modules/date-fns/locale/en-US/_lib/match.js +0 -136
- package/dist/esm/node_modules/date-fns/locale/en-US.js +0 -30
- package/dist/esm/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -105
- package/dist/esm/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -29
- package/dist/esm/node_modules/date-fns/locale/es/_lib/localize.js +0 -168
- package/dist/esm/node_modules/date-fns/locale/es/_lib/match.js +0 -142
- package/dist/esm/node_modules/date-fns/locale/es.js +0 -33
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatDistance.js +0 -104
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatRelative.js +0 -15
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/localize.js +0 -169
- package/dist/esm/node_modules/date-fns/locale/fr/_lib/match.js +0 -137
- package/dist/esm/node_modules/date-fns/locale/fr.js +0 -30
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatDistance.js +0 -109
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatRelative.js +0 -15
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/localize.js +0 -231
- package/dist/esm/node_modules/date-fns/locale/hi/_lib/match.js +0 -141
- package/dist/esm/node_modules/date-fns/locale/hi.js +0 -29
- package/dist/esm/node_modules/date-fns/locale/it/_lib/formatDistance.js +0 -105
- package/dist/esm/node_modules/date-fns/locale/it/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/it/_lib/formatRelative.js +0 -70
- package/dist/esm/node_modules/date-fns/locale/it/_lib/localize.js +0 -168
- package/dist/esm/node_modules/date-fns/locale/it/_lib/match.js +0 -137
- package/dist/esm/node_modules/date-fns/locale/it.js +0 -31
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatDistance.js +0 -119
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatRelative.js +0 -16
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/localize.js +0 -181
- package/dist/esm/node_modules/date-fns/locale/ja/_lib/match.js +0 -122
- package/dist/esm/node_modules/date-fns/locale/ja.js +0 -33
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatDistance.js +0 -105
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatRelative.js +0 -15
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/localize.js +0 -171
- package/dist/esm/node_modules/date-fns/locale/ko/_lib/match.js +0 -119
- package/dist/esm/node_modules/date-fns/locale/ko.js +0 -31
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatDistance.js +0 -105
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatRelative.js +0 -26
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/localize.js +0 -168
- package/dist/esm/node_modules/date-fns/locale/pt/_lib/match.js +0 -141
- package/dist/esm/node_modules/date-fns/locale/pt.js +0 -30
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatDistance.js +0 -250
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatLong.js +0 -40
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatRelative.js +0 -92
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/localize.js +0 -214
- package/dist/esm/node_modules/date-fns/locale/ru/_lib/match.js +0 -142
- package/dist/esm/node_modules/date-fns/locale/ru.js +0 -30
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +0 -105
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +0 -43
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +0 -35
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/localize.js +0 -187
- package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/match.js +0 -134
- package/dist/esm/node_modules/date-fns/locale/zh-CN.js +0 -33
- package/dist/esm/node_modules/date-fns/startOfDay.js +0 -37
- package/dist/esm/node_modules/date-fns/startOfDecade.js +0 -42
- package/dist/esm/node_modules/date-fns/startOfHour.js +0 -37
- package/dist/esm/node_modules/date-fns/startOfISOWeek.js +0 -37
- package/dist/esm/node_modules/date-fns/startOfISOWeekYear.js +0 -44
- package/dist/esm/node_modules/date-fns/startOfMinute.js +0 -37
- package/dist/esm/node_modules/date-fns/startOfMonth.js +0 -39
- package/dist/esm/node_modules/date-fns/startOfQuarter.js +0 -40
- package/dist/esm/node_modules/date-fns/startOfWeek.js +0 -55
- package/dist/esm/node_modules/date-fns/startOfWeekYear.js +0 -66
- package/dist/esm/node_modules/date-fns/startOfYear.js +0 -38
- package/dist/esm/node_modules/date-fns/toDate.js +0 -48
- package/dist/esm/packages/date/dist/esm/display/DateDuration.js +0 -178
- package/dist/esm/packages/date/dist/esm/hijri/DateConverter.js +0 -152
- package/dist/esm/packages/date/dist/esm/hijri/FormatDate.js +0 -113
- package/dist/esm/packages/date/dist/esm/hijri/HijriDate.js +0 -528
- package/dist/esm/packages/date/dist/esm/hijri/StringDateParser.js +0 -74
- package/dist/esm/packages/date/dist/esm/hijri/index.js +0 -21
- package/dist/esm/packages/date/dist/esm/hijri/initializer.js +0 -113
- package/dist/esm/packages/date/dist/esm/hijri/locales.js +0 -18
- package/dist/esm/packages/date/dist/esm/hijri/safe.js +0 -14
- package/dist/esm/packages/date/dist/esm/i18n/ar/date.json.js +0 -209
- package/dist/esm/packages/date/dist/esm/i18n/en/date.json.js +0 -79
- package/dist/esm/packages/date/dist/esm/i18n/index.js +0 -33
- package/dist/esm/packages/date/dist/esm/types/index.js +0 -45
- package/dist/esm/packages/date/dist/esm/utils/dateUtil.js +0 -474
- /package/dist/cjs/{packages/lexical/src/editor → editor}/theme.js +0 -0
- /package/dist/cjs/{packages/lexical/src/i18n → i18n}/ar/lexical.json.js +0 -0
- /package/dist/cjs/{packages/lexical/src/i18n → i18n}/en/lexical.json.js +0 -0
- /package/dist/cjs/{packages/lexical/src/i18n → i18n}/index.js +0 -0
- /package/dist/cjs/{packages/lexical/src/index.js → index.js} +0 -0
- /package/dist/cjs/{packages/lexical/src/plugins → plugins}/ToolbarPlugin.js +0 -0
- /package/dist/cjs/{packages/lexical/src/utils → utils}/index.js +0 -0
- /package/dist/esm/{packages/lexical/src/editor → editor}/theme.js +0 -0
- /package/dist/esm/{packages/lexical/src/i18n → i18n}/ar/lexical.json.js +0 -0
- /package/dist/esm/{packages/lexical/src/i18n → i18n}/en/lexical.json.js +0 -0
- /package/dist/esm/{packages/lexical/src/i18n → i18n}/index.js +0 -0
- /package/dist/esm/{packages/lexical/src/index.js → index.js} +0 -0
- /package/dist/esm/{packages/lexical/src/plugins → plugins}/ToolbarPlugin.js +0 -0
- /package/dist/esm/{packages/lexical/src/utils → utils}/index.js +0 -0
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { getDefaultOptions } from './_lib/defaultOptions.js';
|
|
4
|
-
import { toDate } from './toDate.js';
|
|
5
|
-
|
|
6
|
-
/**
|
|
7
|
-
* The {@link startOfWeek} function options.
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
/**
|
|
11
|
-
* @name startOfWeek
|
|
12
|
-
* @category Week Helpers
|
|
13
|
-
* @summary Return the start of a week for the given date.
|
|
14
|
-
*
|
|
15
|
-
* @description
|
|
16
|
-
* Return the start of a week for the given date.
|
|
17
|
-
* The result will be in the local timezone.
|
|
18
|
-
*
|
|
19
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
20
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
21
|
-
*
|
|
22
|
-
* @param date - The original date
|
|
23
|
-
* @param options - An object with options
|
|
24
|
-
*
|
|
25
|
-
* @returns The start of a week
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* // The start of a week for 2 September 2014 11:55:00:
|
|
29
|
-
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0))
|
|
30
|
-
* //=> Sun Aug 31 2014 00:00:00
|
|
31
|
-
*
|
|
32
|
-
* @example
|
|
33
|
-
* // If the week starts on Monday, the start of the week for 2 September 2014 11:55:00:
|
|
34
|
-
* const result = startOfWeek(new Date(2014, 8, 2, 11, 55, 0), { weekStartsOn: 1 })
|
|
35
|
-
* //=> Mon Sep 01 2014 00:00:00
|
|
36
|
-
*/
|
|
37
|
-
function startOfWeek(date, options) {
|
|
38
|
-
const defaultOptions = getDefaultOptions();
|
|
39
|
-
const weekStartsOn =
|
|
40
|
-
options?.weekStartsOn ??
|
|
41
|
-
options?.locale?.options?.weekStartsOn ??
|
|
42
|
-
defaultOptions.weekStartsOn ??
|
|
43
|
-
defaultOptions.locale?.options?.weekStartsOn ??
|
|
44
|
-
0;
|
|
45
|
-
|
|
46
|
-
const _date = toDate(date, options?.in);
|
|
47
|
-
const day = _date.getDay();
|
|
48
|
-
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
49
|
-
|
|
50
|
-
_date.setDate(_date.getDate() - diff);
|
|
51
|
-
_date.setHours(0, 0, 0, 0);
|
|
52
|
-
return _date;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
export { startOfWeek as default, startOfWeek };
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { getDefaultOptions } from './_lib/defaultOptions.js';
|
|
4
|
-
import { constructFrom } from './constructFrom.js';
|
|
5
|
-
import { getWeekYear } from './getWeekYear.js';
|
|
6
|
-
import { startOfWeek } from './startOfWeek.js';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* The {@link startOfWeekYear} function options.
|
|
10
|
-
*/
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @name startOfWeekYear
|
|
14
|
-
* @category Week-Numbering Year Helpers
|
|
15
|
-
* @summary Return the start of a local week-numbering year for the given date.
|
|
16
|
-
*
|
|
17
|
-
* @description
|
|
18
|
-
* Return the start of a local week-numbering year.
|
|
19
|
-
* The exact calculation depends on the values of
|
|
20
|
-
* `options.weekStartsOn` (which is the index of the first day of the week)
|
|
21
|
-
* and `options.firstWeekContainsDate` (which is the day of January, which is always in
|
|
22
|
-
* the first week of the week-numbering year)
|
|
23
|
-
*
|
|
24
|
-
* Week numbering: https://en.wikipedia.org/wiki/Week#The_ISO_week_date_system
|
|
25
|
-
*
|
|
26
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
27
|
-
* @typeParam ResultDate - The result `Date` type.
|
|
28
|
-
*
|
|
29
|
-
* @param date - The original date
|
|
30
|
-
* @param options - An object with options
|
|
31
|
-
*
|
|
32
|
-
* @returns The start of a week-numbering year
|
|
33
|
-
*
|
|
34
|
-
* @example
|
|
35
|
-
* // The start of an a week-numbering year for 2 July 2005 with default settings:
|
|
36
|
-
* const result = startOfWeekYear(new Date(2005, 6, 2))
|
|
37
|
-
* //=> Sun Dec 26 2004 00:00:00
|
|
38
|
-
*
|
|
39
|
-
* @example
|
|
40
|
-
* // The start of a week-numbering year for 2 July 2005
|
|
41
|
-
* // if Monday is the first day of week
|
|
42
|
-
* // and 4 January is always in the first week of the year:
|
|
43
|
-
* const result = startOfWeekYear(new Date(2005, 6, 2), {
|
|
44
|
-
* weekStartsOn: 1,
|
|
45
|
-
* firstWeekContainsDate: 4
|
|
46
|
-
* })
|
|
47
|
-
* //=> Mon Jan 03 2005 00:00:00
|
|
48
|
-
*/
|
|
49
|
-
function startOfWeekYear(date, options) {
|
|
50
|
-
const defaultOptions = getDefaultOptions();
|
|
51
|
-
const firstWeekContainsDate =
|
|
52
|
-
options?.firstWeekContainsDate ??
|
|
53
|
-
options?.locale?.options?.firstWeekContainsDate ??
|
|
54
|
-
defaultOptions.firstWeekContainsDate ??
|
|
55
|
-
defaultOptions.locale?.options?.firstWeekContainsDate ??
|
|
56
|
-
1;
|
|
57
|
-
|
|
58
|
-
const year = getWeekYear(date, options);
|
|
59
|
-
const firstWeek = constructFrom(options?.in || date, 0);
|
|
60
|
-
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
61
|
-
firstWeek.setHours(0, 0, 0, 0);
|
|
62
|
-
const _date = startOfWeek(firstWeek, options);
|
|
63
|
-
return _date;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
export { startOfWeekYear as default, startOfWeekYear };
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { toDate } from './toDate.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* The {@link startOfYear} function options.
|
|
7
|
-
*/
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* @name startOfYear
|
|
11
|
-
* @category Year Helpers
|
|
12
|
-
* @summary Return the start of a year for the given date.
|
|
13
|
-
*
|
|
14
|
-
* @description
|
|
15
|
-
* Return the start of a year for the given date.
|
|
16
|
-
* The result will be in the local timezone.
|
|
17
|
-
*
|
|
18
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
19
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
20
|
-
*
|
|
21
|
-
* @param date - The original date
|
|
22
|
-
* @param options - The options
|
|
23
|
-
*
|
|
24
|
-
* @returns The start of a year
|
|
25
|
-
*
|
|
26
|
-
* @example
|
|
27
|
-
* // The start of a year for 2 September 2014 11:55:00:
|
|
28
|
-
* const result = startOfYear(new Date(2014, 8, 2, 11, 55, 00))
|
|
29
|
-
* //=> Wed Jan 01 2014 00:00:00
|
|
30
|
-
*/
|
|
31
|
-
function startOfYear(date, options) {
|
|
32
|
-
const date_ = toDate(date, options?.in);
|
|
33
|
-
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
34
|
-
date_.setHours(0, 0, 0, 0);
|
|
35
|
-
return date_;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export { startOfYear as default, startOfYear };
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import { constructFrom } from './constructFrom.js';
|
|
4
|
-
|
|
5
|
-
/**
|
|
6
|
-
* @name toDate
|
|
7
|
-
* @category Common Helpers
|
|
8
|
-
* @summary Convert the given argument to an instance of Date.
|
|
9
|
-
*
|
|
10
|
-
* @description
|
|
11
|
-
* Convert the given argument to an instance of Date.
|
|
12
|
-
*
|
|
13
|
-
* If the argument is an instance of Date, the function returns its clone.
|
|
14
|
-
*
|
|
15
|
-
* If the argument is a number, it is treated as a timestamp.
|
|
16
|
-
*
|
|
17
|
-
* If the argument is none of the above, the function returns Invalid Date.
|
|
18
|
-
*
|
|
19
|
-
* Starting from v3.7.0, it clones a date using `[Symbol.for("constructDateFrom")]`
|
|
20
|
-
* enabling to transfer extra properties from the reference date to the new date.
|
|
21
|
-
* It's useful for extensions like [`TZDate`](https://github.com/date-fns/tz)
|
|
22
|
-
* that accept a time zone as a constructor argument.
|
|
23
|
-
*
|
|
24
|
-
* **Note**: *all* Date arguments passed to any *date-fns* function is processed by `toDate`.
|
|
25
|
-
*
|
|
26
|
-
* @typeParam DateType - The `Date` type, the function operates on. Gets inferred from passed arguments. Allows to use extensions like [`UTCDate`](https://github.com/date-fns/utc).
|
|
27
|
-
* @typeParam ResultDate - The result `Date` type, it is the type returned from the context function if it is passed, or inferred from the arguments.
|
|
28
|
-
*
|
|
29
|
-
* @param argument - The value to convert
|
|
30
|
-
*
|
|
31
|
-
* @returns The parsed date in the local time zone
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* // Clone the date:
|
|
35
|
-
* const result = toDate(new Date(2014, 1, 11, 11, 30, 30))
|
|
36
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
37
|
-
*
|
|
38
|
-
* @example
|
|
39
|
-
* // Convert the timestamp to date:
|
|
40
|
-
* const result = toDate(1392098430000)
|
|
41
|
-
* //=> Tue Feb 11 2014 11:30:30
|
|
42
|
-
*/
|
|
43
|
-
function toDate(argument, context) {
|
|
44
|
-
// [TODO] Get rid of `toDate` or `constructFrom`?
|
|
45
|
-
return constructFrom(context || argument, argument);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export { toDate as default, toDate };
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import _defineProperty from '@babel/runtime/helpers/defineProperty';
|
|
4
|
-
import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
|
|
5
|
-
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
|
|
6
|
-
import { Tooltip, Dropdown } from '@react-fabric/core';
|
|
7
|
-
import { Format } from '@react-fabric/utilities';
|
|
8
|
-
import classNames from 'classnames';
|
|
9
|
-
import { useState, useEffect, useMemo } from 'react';
|
|
10
|
-
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import { DateUtil } from '../utils/dateUtil.js';
|
|
12
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
13
|
-
import { intervalToDuration } from '../../../../../node_modules/date-fns/intervalToDuration.js';
|
|
14
|
-
import { isBefore } from '../../../../../node_modules/date-fns/isBefore.js';
|
|
15
|
-
|
|
16
|
-
var _excluded = ["date", "children", "className", "format"];
|
|
17
|
-
function ownKeys(e, r) {
|
|
18
|
-
var t = Object.keys(e);
|
|
19
|
-
if (Object.getOwnPropertySymbols) {
|
|
20
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
21
|
-
r && (o = o.filter(function (r) {
|
|
22
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
23
|
-
})), t.push.apply(t, o);
|
|
24
|
-
}
|
|
25
|
-
return t;
|
|
26
|
-
}
|
|
27
|
-
function _objectSpread(e) {
|
|
28
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
29
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
30
|
-
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
31
|
-
_defineProperty(e, r, t[r]);
|
|
32
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
33
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
34
|
-
});
|
|
35
|
-
}
|
|
36
|
-
return e;
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* DateDuration component to display the duration from a given date to now.
|
|
40
|
-
* It calculates the difference in years, months, weeks, days, hours, minutes, and seconds,
|
|
41
|
-
* and displays it in a human-readable format.
|
|
42
|
-
* It uses the current locale for translations.
|
|
43
|
-
*
|
|
44
|
-
* @param {Props} props - The properties for the component.
|
|
45
|
-
* @returns {JSX.Element} The rendered component.
|
|
46
|
-
*
|
|
47
|
-
* @example
|
|
48
|
-
* ```jsx
|
|
49
|
-
* <DateDuration date={new Date("2020-01-01")} />
|
|
50
|
-
* ```
|
|
51
|
-
*
|
|
52
|
-
* @see {@link https://adarshpastakia.github.io/react-fabric/?path=/docs/date-date-display--docs}
|
|
53
|
-
*/
|
|
54
|
-
var DateDuration = function DateDuration(_ref) {
|
|
55
|
-
var date = _ref.date,
|
|
56
|
-
children = _ref.children,
|
|
57
|
-
className = _ref.className,
|
|
58
|
-
_ref$format = _ref.format,
|
|
59
|
-
format = _ref$format === void 0 ? "PPpp" : _ref$format,
|
|
60
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
61
|
-
var _useTranslation = useTranslation("date"),
|
|
62
|
-
t = _useTranslation.t;
|
|
63
|
-
var _useState = useState({}),
|
|
64
|
-
_useState2 = _slicedToArray(_useState, 2),
|
|
65
|
-
interval = _useState2[0],
|
|
66
|
-
setDateInterval = _useState2[1];
|
|
67
|
-
useEffect(function () {
|
|
68
|
-
setDateInterval(intervalToDuration({
|
|
69
|
-
start: new Date(date),
|
|
70
|
-
end: new Date()
|
|
71
|
-
}));
|
|
72
|
-
// update interval every minute
|
|
73
|
-
var tmr = setInterval(function () {
|
|
74
|
-
setDateInterval(intervalToDuration({
|
|
75
|
-
start: new Date(date),
|
|
76
|
-
end: new Date()
|
|
77
|
-
}));
|
|
78
|
-
}, 60 * 1000);
|
|
79
|
-
return function () {
|
|
80
|
-
return clearInterval(tmr);
|
|
81
|
-
};
|
|
82
|
-
}, [date]);
|
|
83
|
-
var label = useMemo(function () {
|
|
84
|
-
var before = isBefore(DateUtil.parseDate(date), new Date());
|
|
85
|
-
var tkey = before ? "relative.before" : "relative.after";
|
|
86
|
-
var part = "now";
|
|
87
|
-
var count = 0;
|
|
88
|
-
if (interval.years && interval.years > 0) {
|
|
89
|
-
var _interval$months;
|
|
90
|
-
part = "years";
|
|
91
|
-
count = interval.years;
|
|
92
|
-
if (((_interval$months = interval.months) !== null && _interval$months !== void 0 ? _interval$months : 0) > 10) {
|
|
93
|
-
part = "yearsX";
|
|
94
|
-
count += 1;
|
|
95
|
-
}
|
|
96
|
-
} else if (interval.months && interval.months > 0) {
|
|
97
|
-
var _interval$weeks;
|
|
98
|
-
part = "months";
|
|
99
|
-
count = interval.months;
|
|
100
|
-
if (interval.months > 10) {
|
|
101
|
-
part = "yearsX";
|
|
102
|
-
count = 1;
|
|
103
|
-
} else if (((_interval$weeks = interval.weeks) !== null && _interval$weeks !== void 0 ? _interval$weeks : 0) > 3) {
|
|
104
|
-
part = "monthsX";
|
|
105
|
-
count += 1;
|
|
106
|
-
}
|
|
107
|
-
} else if (interval.weeks && interval.weeks > 0) {
|
|
108
|
-
var _interval$days;
|
|
109
|
-
part = "weeks";
|
|
110
|
-
count = interval.weeks;
|
|
111
|
-
if (interval.weeks > 3) {
|
|
112
|
-
part = "monthsX";
|
|
113
|
-
count = 1;
|
|
114
|
-
} else if (((_interval$days = interval.days) !== null && _interval$days !== void 0 ? _interval$days : 0) > 5) {
|
|
115
|
-
part = "weeksX";
|
|
116
|
-
count += 1;
|
|
117
|
-
}
|
|
118
|
-
} else if (interval.days && interval.days > 0) {
|
|
119
|
-
var _interval$hours;
|
|
120
|
-
part = "days";
|
|
121
|
-
count = interval.days;
|
|
122
|
-
if (interval.days > 5) {
|
|
123
|
-
part = "weeksX";
|
|
124
|
-
count = 1;
|
|
125
|
-
} else if (((_interval$hours = interval.hours) !== null && _interval$hours !== void 0 ? _interval$hours : 0) > 20) {
|
|
126
|
-
part = "daysX";
|
|
127
|
-
count += 1;
|
|
128
|
-
}
|
|
129
|
-
} else if (interval.hours && interval.hours > 0) {
|
|
130
|
-
var _interval$minutes;
|
|
131
|
-
part = "hours";
|
|
132
|
-
count = interval.hours;
|
|
133
|
-
if (interval.hours > 20) {
|
|
134
|
-
part = "daysX";
|
|
135
|
-
count = 1;
|
|
136
|
-
} else if (((_interval$minutes = interval.minutes) !== null && _interval$minutes !== void 0 ? _interval$minutes : 0) > 45) {
|
|
137
|
-
part = "hoursX";
|
|
138
|
-
count += 1;
|
|
139
|
-
}
|
|
140
|
-
} else if (interval.minutes && interval.minutes > 0) {
|
|
141
|
-
var _interval$seconds;
|
|
142
|
-
part = "minutes";
|
|
143
|
-
count = interval.minutes;
|
|
144
|
-
if (interval.minutes > 45) {
|
|
145
|
-
part = "hoursX";
|
|
146
|
-
count = 1;
|
|
147
|
-
} else if (((_interval$seconds = interval.seconds) !== null && _interval$seconds !== void 0 ? _interval$seconds : 0) > 45) {
|
|
148
|
-
part = "minuteX";
|
|
149
|
-
count += 1;
|
|
150
|
-
}
|
|
151
|
-
} else if (interval.seconds && interval.seconds > 15) {
|
|
152
|
-
part = "seconds";
|
|
153
|
-
count = interval.seconds;
|
|
154
|
-
if (interval.seconds > 45) {
|
|
155
|
-
part = "minutesX";
|
|
156
|
-
count = 1;
|
|
157
|
-
}
|
|
158
|
-
}
|
|
159
|
-
return t("".concat(tkey, ".").concat(part), {
|
|
160
|
-
count: count
|
|
161
|
-
});
|
|
162
|
-
}, [interval, date]);
|
|
163
|
-
var dtLabel = /*#__PURE__*/jsx(Tooltip, {
|
|
164
|
-
content: Format.date(date, format),
|
|
165
|
-
children: /*#__PURE__*/jsx("span", _objectSpread(_objectSpread({
|
|
166
|
-
className: classNames(className, !!children && "underline decoration-dotted cursor-pointer")
|
|
167
|
-
}, props), {}, {
|
|
168
|
-
children: label
|
|
169
|
-
}))
|
|
170
|
-
});
|
|
171
|
-
return children ? /*#__PURE__*/jsxs(Dropdown, {
|
|
172
|
-
showArrow: true,
|
|
173
|
-
closeOnClick: true,
|
|
174
|
-
children: [dtLabel, children]
|
|
175
|
-
}) : dtLabel;
|
|
176
|
-
};
|
|
177
|
-
|
|
178
|
-
export { DateDuration };
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
function intPart(floatNum) {
|
|
4
|
-
if (floatNum < -0.0000001) {
|
|
5
|
-
return Math.ceil(floatNum - 0.0000001);
|
|
6
|
-
}
|
|
7
|
-
return Math.floor(floatNum + 0.0000001);
|
|
8
|
-
}
|
|
9
|
-
var delta = 1;
|
|
10
|
-
function GregToIsl(arg) {
|
|
11
|
-
var d = parseInt(arg.CDay.value);
|
|
12
|
-
var m = parseInt(arg.CMonth.value);
|
|
13
|
-
var y = parseInt(arg.CYear.value);
|
|
14
|
-
var jd,
|
|
15
|
-
l,
|
|
16
|
-
jd1,
|
|
17
|
-
n,
|
|
18
|
-
j,
|
|
19
|
-
delta = 1;
|
|
20
|
-
if (y > 1582 || y == 1582 && m > 10 || y == 1582 && m == 10 && d > 14) {
|
|
21
|
-
//added delta=1 on jd to comply isna rulling 2007
|
|
22
|
-
jd = intPart(1461 * (y + 4800 + intPart((m - 14) / 12)) / 4) + intPart(367 * (m - 2 - 12 * intPart((m - 14) / 12)) / 12) - intPart(3 * intPart((y + 4900 + intPart((m - 14) / 12)) / 100) / 4) + d - 32075 + delta;
|
|
23
|
-
} else {
|
|
24
|
-
//added +1 on jd to comply isna rulling
|
|
25
|
-
jd = 367 * y - intPart(7 * (y + 5001 + intPart((m - 9) / 7)) / 4) + intPart(275 * m / 9) + d + 1729777 + delta;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
//added -1 on jd1 to comply isna rulling
|
|
29
|
-
jd1 = jd - delta;
|
|
30
|
-
l = jd - 1948440 + 10632;
|
|
31
|
-
n = intPart((l - 1) / 10631);
|
|
32
|
-
l = l - 10631 * n + 354;
|
|
33
|
-
j = intPart((10985 - l) / 5316) * intPart(50 * l / 17719) + intPart(l / 5670) * intPart(43 * l / 15238);
|
|
34
|
-
l = l - intPart((30 - j) / 15) * intPart(17719 * j / 50) - intPart(j / 16) * intPart(15238 * j / 43) + 29;
|
|
35
|
-
m = intPart(24 * l / 709);
|
|
36
|
-
d = l - intPart(709 * m / 24);
|
|
37
|
-
y = 30 * n + j - 30;
|
|
38
|
-
return {
|
|
39
|
-
d: d,
|
|
40
|
-
m: m,
|
|
41
|
-
y: y,
|
|
42
|
-
dateOfWeek: jd1 % 7,
|
|
43
|
-
dayName: weekDay(jd1 % 7)
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
function IslToGreg(arg) {
|
|
47
|
-
var d = parseInt(arg.HDay.value);
|
|
48
|
-
var m = parseInt(arg.HMonth.value);
|
|
49
|
-
var y = parseInt(arg.HYear.value);
|
|
50
|
-
//added - delta=1 on jd to comply isna rulling
|
|
51
|
-
var jd = intPart((11 * y + 3) / 30) + 354 * y + 30 * m - intPart((m - 1) / 2) + d + 1948440 - 385 - delta;
|
|
52
|
-
var l, n, i, j, k;
|
|
53
|
-
if (jd > 2299160) {
|
|
54
|
-
l = jd + 68569;
|
|
55
|
-
n = intPart(4 * l / 146097);
|
|
56
|
-
l = l - intPart((146097 * n + 3) / 4);
|
|
57
|
-
i = intPart(4000 * (l + 1) / 1461001);
|
|
58
|
-
l = l - intPart(1461 * i / 4) + 31;
|
|
59
|
-
j = intPart(80 * l / 2447);
|
|
60
|
-
d = l - intPart(2447 * j / 80);
|
|
61
|
-
l = intPart(j / 11);
|
|
62
|
-
m = j + 2 - 12 * l;
|
|
63
|
-
y = 100 * (n - 49) + i + l;
|
|
64
|
-
} else {
|
|
65
|
-
j = jd + 1402;
|
|
66
|
-
k = intPart((j - 1) / 1461);
|
|
67
|
-
l = j - 1461 * k;
|
|
68
|
-
n = intPart((l - 1) / 365) - intPart(l / 1461);
|
|
69
|
-
i = l - 365 * n + 30;
|
|
70
|
-
j = intPart(80 * i / 2447);
|
|
71
|
-
d = i - intPart(2447 * j / 80);
|
|
72
|
-
i = intPart(j / 11);
|
|
73
|
-
m = j + 2 - 12 * i;
|
|
74
|
-
y = 4 * k + n + i - 4716;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
//arg.CDay.value=d
|
|
78
|
-
//arg.CMonth.value=m
|
|
79
|
-
//arg.CYear.value=y
|
|
80
|
-
|
|
81
|
-
return {
|
|
82
|
-
d: d,
|
|
83
|
-
m: m,
|
|
84
|
-
y: y,
|
|
85
|
-
dateOfWeek: jd % 7,
|
|
86
|
-
dayName: weekDay(jd % 7)
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
function weekDay(wdn) {
|
|
90
|
-
if (wdn == 0) {
|
|
91
|
-
return "Mon";
|
|
92
|
-
}
|
|
93
|
-
if (wdn == 1) {
|
|
94
|
-
return "Tue";
|
|
95
|
-
}
|
|
96
|
-
if (wdn == 2) {
|
|
97
|
-
return "Wed";
|
|
98
|
-
}
|
|
99
|
-
if (wdn == 3) {
|
|
100
|
-
return "Thu";
|
|
101
|
-
}
|
|
102
|
-
if (wdn == 4) {
|
|
103
|
-
return "Fri";
|
|
104
|
-
}
|
|
105
|
-
if (wdn == 5) {
|
|
106
|
-
return "Sat";
|
|
107
|
-
}
|
|
108
|
-
if (wdn == 6) {
|
|
109
|
-
return "Sun";
|
|
110
|
-
}
|
|
111
|
-
return "";
|
|
112
|
-
}
|
|
113
|
-
function GregToHijri(gregDate) {
|
|
114
|
-
var hijriDate = GregToIsl({
|
|
115
|
-
CDay: {
|
|
116
|
-
value: gregDate.getDate()
|
|
117
|
-
},
|
|
118
|
-
CYear: {
|
|
119
|
-
value: gregDate.getFullYear()
|
|
120
|
-
},
|
|
121
|
-
CMonth: {
|
|
122
|
-
value: gregDate.getMonth() + 1
|
|
123
|
-
}
|
|
124
|
-
});
|
|
125
|
-
return {
|
|
126
|
-
year: hijriDate.y,
|
|
127
|
-
month: hijriDate.m,
|
|
128
|
-
date: hijriDate.d,
|
|
129
|
-
hours: gregDate.getHours(),
|
|
130
|
-
minutes: gregDate.getMinutes(),
|
|
131
|
-
seconds: gregDate.getSeconds(),
|
|
132
|
-
milliseconds: gregDate.getMilliseconds(),
|
|
133
|
-
day: hijriDate.dateOfWeek,
|
|
134
|
-
dayName: hijriDate.dayName
|
|
135
|
-
};
|
|
136
|
-
}
|
|
137
|
-
function HijriToGreg(hijriDate) {
|
|
138
|
-
var gregDate = IslToGreg({
|
|
139
|
-
HDay: {
|
|
140
|
-
value: hijriDate._date || hijriDate.date
|
|
141
|
-
},
|
|
142
|
-
HYear: {
|
|
143
|
-
value: hijriDate._year || hijriDate.year
|
|
144
|
-
},
|
|
145
|
-
HMonth: {
|
|
146
|
-
value: hijriDate._month || hijriDate.month
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
return new Date(gregDate.y, gregDate.m - 1, gregDate.d, hijriDate.getHours(), hijriDate.getMinutes(), hijriDate.getSeconds(), hijriDate.getMilliseconds());
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
export { GregToHijri, HijriToGreg, weekDay };
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
'use client';
|
|
2
|
-
|
|
3
|
-
import HijriDate from './HijriDate.js';
|
|
4
|
-
|
|
5
|
-
var dateFormat = function () {
|
|
6
|
-
var token = /P{1,4}|p{1,4}|d{1,2}|e{3,6}|M{1,4}|yy(?:yy)?|([Hhms])\1?|[a]{1,4}|[LloSZ]|('at')|"[^"]*"|'[^']*'/g,
|
|
7
|
-
pad = function pad(val, len) {
|
|
8
|
-
val = String(val);
|
|
9
|
-
len = len || 2;
|
|
10
|
-
while (val.length < len) val = "0" + val;
|
|
11
|
-
return val;
|
|
12
|
-
};
|
|
13
|
-
|
|
14
|
-
// Regexes and supporting functions are cached through closure
|
|
15
|
-
return function (date, mask) {
|
|
16
|
-
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {
|
|
17
|
-
utc: false
|
|
18
|
-
};
|
|
19
|
-
var locales = HijriDate.locales,
|
|
20
|
-
defaultLocale = HijriDate.defaultLocale;
|
|
21
|
-
options.locale = options.locale || defaultLocale;
|
|
22
|
-
if (!locales[options.locale]) {
|
|
23
|
-
throw new Error("Locale ".concat(options.locale, " is not supported yet .\n Please, try to extend \"HijriDate.locales\" :\n i.e: HijriDate.locales.").concat(options.locale, " = {dayNames:[..14 items..], monthNames:[..24 items..]}\n "));
|
|
24
|
-
}
|
|
25
|
-
// You can't provide utc if you skip other args (use the "UTC:" mask prefix)
|
|
26
|
-
if (arguments.length == 1 && Object.prototype.toString.call(date) == "[object String]" && !/\d/.test(date)) {
|
|
27
|
-
mask = date;
|
|
28
|
-
date = undefined;
|
|
29
|
-
}
|
|
30
|
-
mask = String(masks[mask] || mask || masks["default"]);
|
|
31
|
-
|
|
32
|
-
// Allow setting the utc argument via the mask
|
|
33
|
-
if (mask.slice(0, 4) == "UTC:") {
|
|
34
|
-
mask = mask.slice(4);
|
|
35
|
-
options.utc = true;
|
|
36
|
-
}
|
|
37
|
-
var _ = options.utc ? "getUTC" : "get",
|
|
38
|
-
d = date[_ + "Date"](),
|
|
39
|
-
D = date[_ + "Day"](),
|
|
40
|
-
M = date[_ + "Month"](),
|
|
41
|
-
mIndex = date[_ + "MonthIndex"](),
|
|
42
|
-
y = date[_ + "FullYear"](),
|
|
43
|
-
H = date[_ + "Hours"](),
|
|
44
|
-
m = date[_ + "Minutes"](),
|
|
45
|
-
s = date[_ + "Seconds"](),
|
|
46
|
-
L = date[_ + "Milliseconds"](),
|
|
47
|
-
o = options.utc ? 0 : date.getTimezoneOffset(),
|
|
48
|
-
flags = {
|
|
49
|
-
d: d,
|
|
50
|
-
dd: pad(d),
|
|
51
|
-
ddd: locales[options.locale].dayNames[D === 7 ? 0 : D + 1],
|
|
52
|
-
dddd: locales[options.locale].dayNames[(D === 7 ? 0 : D + 1) + 7],
|
|
53
|
-
ee: locales[options.locale].dayNames[D],
|
|
54
|
-
eee: locales[options.locale].dayNames[D + 7],
|
|
55
|
-
eeee: locales[options.locale].dayNames[D + 14],
|
|
56
|
-
eeeeee: locales[options.locale].dayNames[D],
|
|
57
|
-
M: M,
|
|
58
|
-
MM: pad(M),
|
|
59
|
-
MMM: locales[options.locale].monthNames[mIndex],
|
|
60
|
-
MMMM: locales[options.locale].monthNames[mIndex + 12],
|
|
61
|
-
yy: String(y).slice(2),
|
|
62
|
-
yyyy: y,
|
|
63
|
-
h: H % 12 || 12,
|
|
64
|
-
hh: pad(H % 12 || 12),
|
|
65
|
-
H: H,
|
|
66
|
-
HH: pad(H),
|
|
67
|
-
m: m,
|
|
68
|
-
mm: pad(m),
|
|
69
|
-
s: s,
|
|
70
|
-
ss: pad(s),
|
|
71
|
-
l: pad(L, 3),
|
|
72
|
-
L: pad(L > 99 ? Math.round(L / 10) : L),
|
|
73
|
-
a: H < 12 ? locales[options.locale].am : locales[options.locale].pm,
|
|
74
|
-
aa: H < 12 ? locales[options.locale].am : locales[options.locale].pm,
|
|
75
|
-
aaa: H < 12 ? locales[options.locale].am : locales[options.locale].pm,
|
|
76
|
-
aaaa: H < 12 ? locales[options.locale].am : locales[options.locale].pm,
|
|
77
|
-
aaaaa: H < 12 ? locales[options.locale].am : locales[options.locale].pm,
|
|
78
|
-
"'at'": locales[options.locale].separator,
|
|
79
|
-
t: H < 12 ? "a" : "p",
|
|
80
|
-
tt: H < 12 ? "am" : "pm",
|
|
81
|
-
T: H < 12 ? "A" : "P",
|
|
82
|
-
TT: H < 12 ? "AM" : "PM",
|
|
83
|
-
// Z: options.utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, ""),
|
|
84
|
-
o: (o > 0 ? "-" : "+") + pad(Math.floor(Math.abs(o) / 60) * 100 + Math.abs(o) % 60, 4),
|
|
85
|
-
S: ["th", "st", "nd", "rd"][d % 10 > 3 ? 0 : (d % 100 - d % 10 != 10) * d % 10]
|
|
86
|
-
};
|
|
87
|
-
return mask.replace(token, function ($0) {
|
|
88
|
-
if ($0 === "P") return "".concat(flags.d, "/").concat(flags.M, "/").concat(flags.yyyy, " ");
|
|
89
|
-
if ($0.startsWith("PP")) return "".concat(flags.MMM, " ").concat(flags.dd, ", ").concat(flags.yyyy, " ");
|
|
90
|
-
if ($0 === "p") return "".concat(flags.h, ":").concat(flags.m, " ").concat(flags.a);
|
|
91
|
-
if ($0.startsWith("pp")) return "".concat(flags.hh, ":").concat(flags.mm, ":").concat(flags.ss, " ").concat(flags.a);
|
|
92
|
-
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
}();
|
|
96
|
-
|
|
97
|
-
// Some common format strings
|
|
98
|
-
var masks = {
|
|
99
|
-
"default": "ddd MMM dd yyyy HH:mm:ss",
|
|
100
|
-
shortDate: "M/d/yy",
|
|
101
|
-
mediumDate: "MMM d, yyyy",
|
|
102
|
-
longDate: "MMMM d, yyyy",
|
|
103
|
-
fullDate: "dddd, MMMM d, yyyy",
|
|
104
|
-
shortTime: "h:mm TT",
|
|
105
|
-
mediumTime: "h:mm:ss TT",
|
|
106
|
-
longTime: "h:mm:ss TT Z",
|
|
107
|
-
isoDate: "yyyy-MM-dd",
|
|
108
|
-
isoTime: "HH:mm:ss",
|
|
109
|
-
isoDateTime: "yyyy-MM-dd'T'HH:mm:ss",
|
|
110
|
-
isoUtcDateTime: "UTC:yyyy-MM-dd'T'HH:mm:ss'Z'"
|
|
111
|
-
};
|
|
112
|
-
|
|
113
|
-
export { dateFormat as default, masks };
|