@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.
Files changed (345) hide show
  1. package/css/_lexical.css +10 -13
  2. package/dist/cjs/{packages/lexical/src/editor → editor}/LexicalEditor.js +2 -2
  3. package/dist/cjs/{packages/lexical/src/hooks → hooks}/useFormatWatcher.js +54 -56
  4. package/dist/cjs/{packages/lexical/src/plugins → plugins}/CommentPlugin.js +12 -18
  5. package/dist/cjs/{packages/lexical/src/plugins → plugins}/DraggableBlockPlugin.js +2 -2
  6. package/dist/esm/{packages/lexical/src/editor → editor}/LexicalEditor.js +2 -2
  7. package/dist/esm/{packages/lexical/src/hooks → hooks}/useFormatWatcher.js +54 -56
  8. package/dist/esm/{packages/lexical/src/plugins → plugins}/CommentPlugin.js +10 -16
  9. package/dist/esm/{packages/lexical/src/plugins → plugins}/DraggableBlockPlugin.js +2 -2
  10. package/dist/types/editor/LexicalEditor.d.ts +1 -1
  11. package/dist/types/plugins/CommentPlugin.d.ts +1 -1
  12. package/dist/types/plugins/DraggableBlockPlugin.d.ts +1 -1
  13. package/package.json +14 -13
  14. package/src/editor/LexicalEditor.tsx +2 -2
  15. package/src/hooks/useFormatWatcher.ts +0 -2
  16. package/src/plugins/CommentPlugin.tsx +3 -3
  17. package/src/plugins/DraggableBlockPlugin.tsx +3 -3
  18. package/dist/cjs/node_modules/date-fns/_lib/addLeadingZeros.js +0 -9
  19. package/dist/cjs/node_modules/date-fns/_lib/defaultOptions.js +0 -9
  20. package/dist/cjs/node_modules/date-fns/_lib/format/formatters.js +0 -779
  21. package/dist/cjs/node_modules/date-fns/_lib/format/lightFormatters.js +0 -96
  22. package/dist/cjs/node_modules/date-fns/_lib/format/longFormatters.js +0 -68
  23. package/dist/cjs/node_modules/date-fns/_lib/getRoundingMethod.js +0 -12
  24. package/dist/cjs/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -33
  25. package/dist/cjs/node_modules/date-fns/_lib/normalizeDates.js +0 -13
  26. package/dist/cjs/node_modules/date-fns/_lib/normalizeInterval.js +0 -10
  27. package/dist/cjs/node_modules/date-fns/_lib/protectedTokens.js +0 -29
  28. package/dist/cjs/node_modules/date-fns/add.js +0 -73
  29. package/dist/cjs/node_modules/date-fns/addDays.js +0 -46
  30. package/dist/cjs/node_modules/date-fns/addHours.js +0 -39
  31. package/dist/cjs/node_modules/date-fns/addMilliseconds.js +0 -39
  32. package/dist/cjs/node_modules/date-fns/addMinutes.js +0 -41
  33. package/dist/cjs/node_modules/date-fns/addMonths.js +0 -80
  34. package/dist/cjs/node_modules/date-fns/addQuarters.js +0 -38
  35. package/dist/cjs/node_modules/date-fns/addWeeks.js +0 -38
  36. package/dist/cjs/node_modules/date-fns/addYears.js +0 -38
  37. package/dist/cjs/node_modules/date-fns/compareAsc.js +0 -50
  38. package/dist/cjs/node_modules/date-fns/constants.js +0 -66
  39. package/dist/cjs/node_modules/date-fns/constructFrom.js +0 -54
  40. package/dist/cjs/node_modules/date-fns/differenceInCalendarDays.js +0 -67
  41. package/dist/cjs/node_modules/date-fns/differenceInCalendarMonths.js +0 -47
  42. package/dist/cjs/node_modules/date-fns/differenceInCalendarYears.js +0 -43
  43. package/dist/cjs/node_modules/date-fns/differenceInDays.js +0 -112
  44. package/dist/cjs/node_modules/date-fns/differenceInHours.js +0 -46
  45. package/dist/cjs/node_modules/date-fns/differenceInMilliseconds.js +0 -34
  46. package/dist/cjs/node_modules/date-fns/differenceInMinutes.js +0 -50
  47. package/dist/cjs/node_modules/date-fns/differenceInMonths.js +0 -65
  48. package/dist/cjs/node_modules/date-fns/differenceInSeconds.js +0 -41
  49. package/dist/cjs/node_modules/date-fns/differenceInYears.js +0 -67
  50. package/dist/cjs/node_modules/date-fns/endOfDay.js +0 -40
  51. package/dist/cjs/node_modules/date-fns/endOfDecade.js +0 -45
  52. package/dist/cjs/node_modules/date-fns/endOfHour.js +0 -40
  53. package/dist/cjs/node_modules/date-fns/endOfMinute.js +0 -40
  54. package/dist/cjs/node_modules/date-fns/endOfMonth.js +0 -42
  55. package/dist/cjs/node_modules/date-fns/endOfQuarter.js +0 -43
  56. package/dist/cjs/node_modules/date-fns/endOfWeek.js +0 -58
  57. package/dist/cjs/node_modules/date-fns/endOfYear.js +0 -42
  58. package/dist/cjs/node_modules/date-fns/format.js +0 -431
  59. package/dist/cjs/node_modules/date-fns/getDayOfYear.js +0 -39
  60. package/dist/cjs/node_modules/date-fns/getISOWeek.js +0 -45
  61. package/dist/cjs/node_modules/date-fns/getISOWeekYear.js +0 -57
  62. package/dist/cjs/node_modules/date-fns/getWeek.js +0 -59
  63. package/dist/cjs/node_modules/date-fns/getWeekYear.js +0 -80
  64. package/dist/cjs/node_modules/date-fns/intervalToDuration.js +0 -70
  65. package/dist/cjs/node_modules/date-fns/isAfter.js +0 -30
  66. package/dist/cjs/node_modules/date-fns/isBefore.js +0 -30
  67. package/dist/cjs/node_modules/date-fns/isDate.js +0 -46
  68. package/dist/cjs/node_modules/date-fns/isLastDayOfMonth.js +0 -33
  69. package/dist/cjs/node_modules/date-fns/isSameMonth.js +0 -48
  70. package/dist/cjs/node_modules/date-fns/isSameWeek.js +0 -56
  71. package/dist/cjs/node_modules/date-fns/isSameYear.js +0 -40
  72. package/dist/cjs/node_modules/date-fns/isValid.js +0 -44
  73. package/dist/cjs/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -12
  74. package/dist/cjs/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -66
  75. package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -61
  76. package/dist/cjs/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -24
  77. package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js +0 -139
  78. package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatLong.js +0 -43
  79. package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/formatRelative.js +0 -15
  80. package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/localize.js +0 -166
  81. package/dist/cjs/node_modules/date-fns/locale/ar-SA/_lib/match.js +0 -146
  82. package/dist/cjs/node_modules/date-fns/locale/ar-SA.js +0 -32
  83. package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatDistance.js +0 -200
  84. package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatLong.js +0 -44
  85. package/dist/cjs/node_modules/date-fns/locale/de/_lib/formatRelative.js +0 -15
  86. package/dist/cjs/node_modules/date-fns/locale/de/_lib/localize.js +0 -195
  87. package/dist/cjs/node_modules/date-fns/locale/de/_lib/match.js +0 -138
  88. package/dist/cjs/node_modules/date-fns/locale/de.js +0 -36
  89. package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -105
  90. package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -43
  91. package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -15
  92. package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -191
  93. package/dist/cjs/node_modules/date-fns/locale/en-US/_lib/match.js +0 -136
  94. package/dist/cjs/node_modules/date-fns/locale/en-US.js +0 -33
  95. package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -105
  96. package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -43
  97. package/dist/cjs/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -29
  98. package/dist/cjs/node_modules/date-fns/locale/es/_lib/localize.js +0 -168
  99. package/dist/cjs/node_modules/date-fns/locale/es/_lib/match.js +0 -142
  100. package/dist/cjs/node_modules/date-fns/locale/es.js +0 -36
  101. package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatDistance.js +0 -104
  102. package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatLong.js +0 -43
  103. package/dist/cjs/node_modules/date-fns/locale/fr/_lib/formatRelative.js +0 -15
  104. package/dist/cjs/node_modules/date-fns/locale/fr/_lib/localize.js +0 -169
  105. package/dist/cjs/node_modules/date-fns/locale/fr/_lib/match.js +0 -137
  106. package/dist/cjs/node_modules/date-fns/locale/fr.js +0 -33
  107. package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatDistance.js +0 -109
  108. package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatLong.js +0 -43
  109. package/dist/cjs/node_modules/date-fns/locale/hi/_lib/formatRelative.js +0 -15
  110. package/dist/cjs/node_modules/date-fns/locale/hi/_lib/localize.js +0 -233
  111. package/dist/cjs/node_modules/date-fns/locale/hi/_lib/match.js +0 -141
  112. package/dist/cjs/node_modules/date-fns/locale/hi.js +0 -32
  113. package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatDistance.js +0 -105
  114. package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatLong.js +0 -43
  115. package/dist/cjs/node_modules/date-fns/locale/it/_lib/formatRelative.js +0 -70
  116. package/dist/cjs/node_modules/date-fns/locale/it/_lib/localize.js +0 -168
  117. package/dist/cjs/node_modules/date-fns/locale/it/_lib/match.js +0 -137
  118. package/dist/cjs/node_modules/date-fns/locale/it.js +0 -34
  119. package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatDistance.js +0 -119
  120. package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatLong.js +0 -43
  121. package/dist/cjs/node_modules/date-fns/locale/ja/_lib/formatRelative.js +0 -16
  122. package/dist/cjs/node_modules/date-fns/locale/ja/_lib/localize.js +0 -181
  123. package/dist/cjs/node_modules/date-fns/locale/ja/_lib/match.js +0 -122
  124. package/dist/cjs/node_modules/date-fns/locale/ja.js +0 -36
  125. package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatDistance.js +0 -105
  126. package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatLong.js +0 -43
  127. package/dist/cjs/node_modules/date-fns/locale/ko/_lib/formatRelative.js +0 -15
  128. package/dist/cjs/node_modules/date-fns/locale/ko/_lib/localize.js +0 -171
  129. package/dist/cjs/node_modules/date-fns/locale/ko/_lib/match.js +0 -119
  130. package/dist/cjs/node_modules/date-fns/locale/ko.js +0 -34
  131. package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatDistance.js +0 -105
  132. package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatLong.js +0 -43
  133. package/dist/cjs/node_modules/date-fns/locale/pt/_lib/formatRelative.js +0 -26
  134. package/dist/cjs/node_modules/date-fns/locale/pt/_lib/localize.js +0 -168
  135. package/dist/cjs/node_modules/date-fns/locale/pt/_lib/match.js +0 -141
  136. package/dist/cjs/node_modules/date-fns/locale/pt.js +0 -33
  137. package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatDistance.js +0 -250
  138. package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatLong.js +0 -40
  139. package/dist/cjs/node_modules/date-fns/locale/ru/_lib/formatRelative.js +0 -92
  140. package/dist/cjs/node_modules/date-fns/locale/ru/_lib/localize.js +0 -214
  141. package/dist/cjs/node_modules/date-fns/locale/ru/_lib/match.js +0 -142
  142. package/dist/cjs/node_modules/date-fns/locale/ru.js +0 -33
  143. package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +0 -105
  144. package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +0 -43
  145. package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +0 -35
  146. package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/localize.js +0 -187
  147. package/dist/cjs/node_modules/date-fns/locale/zh-CN/_lib/match.js +0 -134
  148. package/dist/cjs/node_modules/date-fns/locale/zh-CN.js +0 -36
  149. package/dist/cjs/node_modules/date-fns/startOfDay.js +0 -40
  150. package/dist/cjs/node_modules/date-fns/startOfDecade.js +0 -45
  151. package/dist/cjs/node_modules/date-fns/startOfHour.js +0 -40
  152. package/dist/cjs/node_modules/date-fns/startOfISOWeek.js +0 -40
  153. package/dist/cjs/node_modules/date-fns/startOfISOWeekYear.js +0 -47
  154. package/dist/cjs/node_modules/date-fns/startOfMinute.js +0 -40
  155. package/dist/cjs/node_modules/date-fns/startOfMonth.js +0 -42
  156. package/dist/cjs/node_modules/date-fns/startOfQuarter.js +0 -43
  157. package/dist/cjs/node_modules/date-fns/startOfWeek.js +0 -58
  158. package/dist/cjs/node_modules/date-fns/startOfWeekYear.js +0 -69
  159. package/dist/cjs/node_modules/date-fns/startOfYear.js +0 -41
  160. package/dist/cjs/node_modules/date-fns/toDate.js +0 -51
  161. package/dist/cjs/packages/date/dist/esm/display/DateDuration.js +0 -178
  162. package/dist/cjs/packages/date/dist/esm/hijri/DateConverter.js +0 -154
  163. package/dist/cjs/packages/date/dist/esm/hijri/FormatDate.js +0 -116
  164. package/dist/cjs/packages/date/dist/esm/hijri/HijriDate.js +0 -531
  165. package/dist/cjs/packages/date/dist/esm/hijri/StringDateParser.js +0 -74
  166. package/dist/cjs/packages/date/dist/esm/hijri/index.js +0 -21
  167. package/dist/cjs/packages/date/dist/esm/hijri/initializer.js +0 -113
  168. package/dist/cjs/packages/date/dist/esm/hijri/locales.js +0 -19
  169. package/dist/cjs/packages/date/dist/esm/hijri/safe.js +0 -17
  170. package/dist/cjs/packages/date/dist/esm/i18n/ar/date.json.js +0 -213
  171. package/dist/cjs/packages/date/dist/esm/i18n/en/date.json.js +0 -83
  172. package/dist/cjs/packages/date/dist/esm/i18n/index.js +0 -33
  173. package/dist/cjs/packages/date/dist/esm/types/index.js +0 -46
  174. package/dist/cjs/packages/date/dist/esm/utils/dateUtil.js +0 -472
  175. package/dist/esm/node_modules/date-fns/_lib/addLeadingZeros.js +0 -9
  176. package/dist/esm/node_modules/date-fns/_lib/defaultOptions.js +0 -9
  177. package/dist/esm/node_modules/date-fns/_lib/format/formatters.js +0 -779
  178. package/dist/esm/node_modules/date-fns/_lib/format/lightFormatters.js +0 -96
  179. package/dist/esm/node_modules/date-fns/_lib/format/longFormatters.js +0 -68
  180. package/dist/esm/node_modules/date-fns/_lib/getRoundingMethod.js +0 -12
  181. package/dist/esm/node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js +0 -33
  182. package/dist/esm/node_modules/date-fns/_lib/normalizeDates.js +0 -13
  183. package/dist/esm/node_modules/date-fns/_lib/normalizeInterval.js +0 -10
  184. package/dist/esm/node_modules/date-fns/_lib/protectedTokens.js +0 -27
  185. package/dist/esm/node_modules/date-fns/add.js +0 -70
  186. package/dist/esm/node_modules/date-fns/addDays.js +0 -43
  187. package/dist/esm/node_modules/date-fns/addHours.js +0 -36
  188. package/dist/esm/node_modules/date-fns/addMilliseconds.js +0 -36
  189. package/dist/esm/node_modules/date-fns/addMinutes.js +0 -38
  190. package/dist/esm/node_modules/date-fns/addMonths.js +0 -77
  191. package/dist/esm/node_modules/date-fns/addQuarters.js +0 -35
  192. package/dist/esm/node_modules/date-fns/addWeeks.js +0 -35
  193. package/dist/esm/node_modules/date-fns/addYears.js +0 -35
  194. package/dist/esm/node_modules/date-fns/compareAsc.js +0 -47
  195. package/dist/esm/node_modules/date-fns/constants.js +0 -62
  196. package/dist/esm/node_modules/date-fns/constructFrom.js +0 -51
  197. package/dist/esm/node_modules/date-fns/differenceInCalendarDays.js +0 -64
  198. package/dist/esm/node_modules/date-fns/differenceInCalendarMonths.js +0 -44
  199. package/dist/esm/node_modules/date-fns/differenceInCalendarYears.js +0 -40
  200. package/dist/esm/node_modules/date-fns/differenceInDays.js +0 -109
  201. package/dist/esm/node_modules/date-fns/differenceInHours.js +0 -43
  202. package/dist/esm/node_modules/date-fns/differenceInMilliseconds.js +0 -31
  203. package/dist/esm/node_modules/date-fns/differenceInMinutes.js +0 -47
  204. package/dist/esm/node_modules/date-fns/differenceInMonths.js +0 -62
  205. package/dist/esm/node_modules/date-fns/differenceInSeconds.js +0 -38
  206. package/dist/esm/node_modules/date-fns/differenceInYears.js +0 -64
  207. package/dist/esm/node_modules/date-fns/endOfDay.js +0 -37
  208. package/dist/esm/node_modules/date-fns/endOfDecade.js +0 -42
  209. package/dist/esm/node_modules/date-fns/endOfHour.js +0 -37
  210. package/dist/esm/node_modules/date-fns/endOfMinute.js +0 -37
  211. package/dist/esm/node_modules/date-fns/endOfMonth.js +0 -39
  212. package/dist/esm/node_modules/date-fns/endOfQuarter.js +0 -40
  213. package/dist/esm/node_modules/date-fns/endOfWeek.js +0 -55
  214. package/dist/esm/node_modules/date-fns/endOfYear.js +0 -39
  215. package/dist/esm/node_modules/date-fns/format.js +0 -425
  216. package/dist/esm/node_modules/date-fns/getDayOfYear.js +0 -36
  217. package/dist/esm/node_modules/date-fns/getISOWeek.js +0 -42
  218. package/dist/esm/node_modules/date-fns/getISOWeekYear.js +0 -54
  219. package/dist/esm/node_modules/date-fns/getWeek.js +0 -56
  220. package/dist/esm/node_modules/date-fns/getWeekYear.js +0 -77
  221. package/dist/esm/node_modules/date-fns/intervalToDuration.js +0 -67
  222. package/dist/esm/node_modules/date-fns/isAfter.js +0 -27
  223. package/dist/esm/node_modules/date-fns/isBefore.js +0 -27
  224. package/dist/esm/node_modules/date-fns/isDate.js +0 -43
  225. package/dist/esm/node_modules/date-fns/isLastDayOfMonth.js +0 -30
  226. package/dist/esm/node_modules/date-fns/isSameMonth.js +0 -45
  227. package/dist/esm/node_modules/date-fns/isSameWeek.js +0 -53
  228. package/dist/esm/node_modules/date-fns/isSameYear.js +0 -37
  229. package/dist/esm/node_modules/date-fns/isValid.js +0 -41
  230. package/dist/esm/node_modules/date-fns/locale/_lib/buildFormatLongFn.js +0 -12
  231. package/dist/esm/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +0 -66
  232. package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchFn.js +0 -61
  233. package/dist/esm/node_modules/date-fns/locale/_lib/buildMatchPatternFn.js +0 -24
  234. package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatDistance.js +0 -139
  235. package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatLong.js +0 -43
  236. package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/formatRelative.js +0 -15
  237. package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/localize.js +0 -166
  238. package/dist/esm/node_modules/date-fns/locale/ar-SA/_lib/match.js +0 -146
  239. package/dist/esm/node_modules/date-fns/locale/ar-SA.js +0 -29
  240. package/dist/esm/node_modules/date-fns/locale/de/_lib/formatDistance.js +0 -200
  241. package/dist/esm/node_modules/date-fns/locale/de/_lib/formatLong.js +0 -44
  242. package/dist/esm/node_modules/date-fns/locale/de/_lib/formatRelative.js +0 -15
  243. package/dist/esm/node_modules/date-fns/locale/de/_lib/localize.js +0 -195
  244. package/dist/esm/node_modules/date-fns/locale/de/_lib/match.js +0 -138
  245. package/dist/esm/node_modules/date-fns/locale/de.js +0 -33
  246. package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +0 -105
  247. package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatLong.js +0 -43
  248. package/dist/esm/node_modules/date-fns/locale/en-US/_lib/formatRelative.js +0 -15
  249. package/dist/esm/node_modules/date-fns/locale/en-US/_lib/localize.js +0 -191
  250. package/dist/esm/node_modules/date-fns/locale/en-US/_lib/match.js +0 -136
  251. package/dist/esm/node_modules/date-fns/locale/en-US.js +0 -30
  252. package/dist/esm/node_modules/date-fns/locale/es/_lib/formatDistance.js +0 -105
  253. package/dist/esm/node_modules/date-fns/locale/es/_lib/formatLong.js +0 -43
  254. package/dist/esm/node_modules/date-fns/locale/es/_lib/formatRelative.js +0 -29
  255. package/dist/esm/node_modules/date-fns/locale/es/_lib/localize.js +0 -168
  256. package/dist/esm/node_modules/date-fns/locale/es/_lib/match.js +0 -142
  257. package/dist/esm/node_modules/date-fns/locale/es.js +0 -33
  258. package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatDistance.js +0 -104
  259. package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatLong.js +0 -43
  260. package/dist/esm/node_modules/date-fns/locale/fr/_lib/formatRelative.js +0 -15
  261. package/dist/esm/node_modules/date-fns/locale/fr/_lib/localize.js +0 -169
  262. package/dist/esm/node_modules/date-fns/locale/fr/_lib/match.js +0 -137
  263. package/dist/esm/node_modules/date-fns/locale/fr.js +0 -30
  264. package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatDistance.js +0 -109
  265. package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatLong.js +0 -43
  266. package/dist/esm/node_modules/date-fns/locale/hi/_lib/formatRelative.js +0 -15
  267. package/dist/esm/node_modules/date-fns/locale/hi/_lib/localize.js +0 -231
  268. package/dist/esm/node_modules/date-fns/locale/hi/_lib/match.js +0 -141
  269. package/dist/esm/node_modules/date-fns/locale/hi.js +0 -29
  270. package/dist/esm/node_modules/date-fns/locale/it/_lib/formatDistance.js +0 -105
  271. package/dist/esm/node_modules/date-fns/locale/it/_lib/formatLong.js +0 -43
  272. package/dist/esm/node_modules/date-fns/locale/it/_lib/formatRelative.js +0 -70
  273. package/dist/esm/node_modules/date-fns/locale/it/_lib/localize.js +0 -168
  274. package/dist/esm/node_modules/date-fns/locale/it/_lib/match.js +0 -137
  275. package/dist/esm/node_modules/date-fns/locale/it.js +0 -31
  276. package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatDistance.js +0 -119
  277. package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatLong.js +0 -43
  278. package/dist/esm/node_modules/date-fns/locale/ja/_lib/formatRelative.js +0 -16
  279. package/dist/esm/node_modules/date-fns/locale/ja/_lib/localize.js +0 -181
  280. package/dist/esm/node_modules/date-fns/locale/ja/_lib/match.js +0 -122
  281. package/dist/esm/node_modules/date-fns/locale/ja.js +0 -33
  282. package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatDistance.js +0 -105
  283. package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatLong.js +0 -43
  284. package/dist/esm/node_modules/date-fns/locale/ko/_lib/formatRelative.js +0 -15
  285. package/dist/esm/node_modules/date-fns/locale/ko/_lib/localize.js +0 -171
  286. package/dist/esm/node_modules/date-fns/locale/ko/_lib/match.js +0 -119
  287. package/dist/esm/node_modules/date-fns/locale/ko.js +0 -31
  288. package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatDistance.js +0 -105
  289. package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatLong.js +0 -43
  290. package/dist/esm/node_modules/date-fns/locale/pt/_lib/formatRelative.js +0 -26
  291. package/dist/esm/node_modules/date-fns/locale/pt/_lib/localize.js +0 -168
  292. package/dist/esm/node_modules/date-fns/locale/pt/_lib/match.js +0 -141
  293. package/dist/esm/node_modules/date-fns/locale/pt.js +0 -30
  294. package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatDistance.js +0 -250
  295. package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatLong.js +0 -40
  296. package/dist/esm/node_modules/date-fns/locale/ru/_lib/formatRelative.js +0 -92
  297. package/dist/esm/node_modules/date-fns/locale/ru/_lib/localize.js +0 -214
  298. package/dist/esm/node_modules/date-fns/locale/ru/_lib/match.js +0 -142
  299. package/dist/esm/node_modules/date-fns/locale/ru.js +0 -30
  300. package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +0 -105
  301. package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatLong.js +0 -43
  302. package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/formatRelative.js +0 -35
  303. package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/localize.js +0 -187
  304. package/dist/esm/node_modules/date-fns/locale/zh-CN/_lib/match.js +0 -134
  305. package/dist/esm/node_modules/date-fns/locale/zh-CN.js +0 -33
  306. package/dist/esm/node_modules/date-fns/startOfDay.js +0 -37
  307. package/dist/esm/node_modules/date-fns/startOfDecade.js +0 -42
  308. package/dist/esm/node_modules/date-fns/startOfHour.js +0 -37
  309. package/dist/esm/node_modules/date-fns/startOfISOWeek.js +0 -37
  310. package/dist/esm/node_modules/date-fns/startOfISOWeekYear.js +0 -44
  311. package/dist/esm/node_modules/date-fns/startOfMinute.js +0 -37
  312. package/dist/esm/node_modules/date-fns/startOfMonth.js +0 -39
  313. package/dist/esm/node_modules/date-fns/startOfQuarter.js +0 -40
  314. package/dist/esm/node_modules/date-fns/startOfWeek.js +0 -55
  315. package/dist/esm/node_modules/date-fns/startOfWeekYear.js +0 -66
  316. package/dist/esm/node_modules/date-fns/startOfYear.js +0 -38
  317. package/dist/esm/node_modules/date-fns/toDate.js +0 -48
  318. package/dist/esm/packages/date/dist/esm/display/DateDuration.js +0 -178
  319. package/dist/esm/packages/date/dist/esm/hijri/DateConverter.js +0 -152
  320. package/dist/esm/packages/date/dist/esm/hijri/FormatDate.js +0 -113
  321. package/dist/esm/packages/date/dist/esm/hijri/HijriDate.js +0 -528
  322. package/dist/esm/packages/date/dist/esm/hijri/StringDateParser.js +0 -74
  323. package/dist/esm/packages/date/dist/esm/hijri/index.js +0 -21
  324. package/dist/esm/packages/date/dist/esm/hijri/initializer.js +0 -113
  325. package/dist/esm/packages/date/dist/esm/hijri/locales.js +0 -18
  326. package/dist/esm/packages/date/dist/esm/hijri/safe.js +0 -14
  327. package/dist/esm/packages/date/dist/esm/i18n/ar/date.json.js +0 -209
  328. package/dist/esm/packages/date/dist/esm/i18n/en/date.json.js +0 -79
  329. package/dist/esm/packages/date/dist/esm/i18n/index.js +0 -33
  330. package/dist/esm/packages/date/dist/esm/types/index.js +0 -45
  331. package/dist/esm/packages/date/dist/esm/utils/dateUtil.js +0 -474
  332. /package/dist/cjs/{packages/lexical/src/editor → editor}/theme.js +0 -0
  333. /package/dist/cjs/{packages/lexical/src/i18n → i18n}/ar/lexical.json.js +0 -0
  334. /package/dist/cjs/{packages/lexical/src/i18n → i18n}/en/lexical.json.js +0 -0
  335. /package/dist/cjs/{packages/lexical/src/i18n → i18n}/index.js +0 -0
  336. /package/dist/cjs/{packages/lexical/src/index.js → index.js} +0 -0
  337. /package/dist/cjs/{packages/lexical/src/plugins → plugins}/ToolbarPlugin.js +0 -0
  338. /package/dist/cjs/{packages/lexical/src/utils → utils}/index.js +0 -0
  339. /package/dist/esm/{packages/lexical/src/editor → editor}/theme.js +0 -0
  340. /package/dist/esm/{packages/lexical/src/i18n → i18n}/ar/lexical.json.js +0 -0
  341. /package/dist/esm/{packages/lexical/src/i18n → i18n}/en/lexical.json.js +0 -0
  342. /package/dist/esm/{packages/lexical/src/i18n → i18n}/index.js +0 -0
  343. /package/dist/esm/{packages/lexical/src/index.js → index.js} +0 -0
  344. /package/dist/esm/{packages/lexical/src/plugins → plugins}/ToolbarPlugin.js +0 -0
  345. /package/dist/esm/{packages/lexical/src/utils → utils}/index.js +0 -0
@@ -1,528 +0,0 @@
1
- 'use client';
2
-
3
- import _typeof from '@babel/runtime/helpers/typeof';
4
- import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
5
- import _createClass from '@babel/runtime/helpers/createClass';
6
- import { HijriToGreg, weekDay } from './DateConverter.js';
7
- import Initializer from './initializer.js';
8
- import dateFormat from './FormatDate.js';
9
- import { ar, en } from './locales.js';
10
-
11
- /**
12
- The class which handles Hijri 🌙 instances
13
-
14
- @example new HijriDate(); //now
15
- new HijriDate(1438, 12, 10) ; // يوم عيد الأضحى لسنة ١٤٣٨
16
- new HijriDate(1438,7, 20, 18, 50, 44, 333); // Monday Rajab 20 1438 18:50:44
17
- new HijriDate({year:1355, hours:17}); // Tue Muharram 01 1355 17:00:00
18
- new HijriDate(1484408713014);
19
-
20
-
21
- new HijriDate().toGregorian(); // === new Date();
22
- new Date().toHijri(); // === new HijriDate();
23
- */
24
- var HijriDate = /*#__PURE__*/function () {
25
- /**
26
- *
27
- * @param {number} time numeric value of the specified date as the number of milliseconds since Shawwal 23, 1389, 00:00:00 UTC (January 1, 1970, 00:00:00 UTC)
28
- * @example new HijriDate(1435454346342) // Sunday Ramadan 12 1436 04:19:06
29
- */
30
-
31
- /**
32
- * @param {number} year the hijri year .
33
- * @param {number} month [1, 12] range .
34
- * @param {number} [date=1] the date of the month🌔 ∈ {1, 30} .
35
- * @param {number} [hours=0] ⏰ ∈ {0, 23} .
36
- * @param {number} [minutes=0] 🕔 ∈ {0,59} .
37
- * @param {number} [seconds=0] 🕰 ∈ {0,59} .
38
- * @param {number} [milliseconds 0] 🕰 ∈ {0,999} .
39
- *
40
- * @example new HijriDate(1450, 3) ; //Sun Rabee1 01 1450 00:00:00
41
- new HijriDate(1450, 3, 5) ; //Thu Rabee1 05 1450 00:00:00
42
- new HijriDate(1450, 3, 5, 17) ; //Thu Rabee1 05 1450 17:00:00
43
- new HijriDate(1450, 3, 5, 16, 44) ; //Thu Rabee1 05 1450 16:44:00
44
- new HijriDate(1450, 3, 5, 16, 44, 58) ; //Thu Rabee1 05 1450 16:44:58
45
- */
46
-
47
- /**
48
- * @param {string} date stringified date
49
- * @param {string} [format = 'yyyy/mm/dd'] a compatible format with the date passed as string in the 1ˢᵗ argument.
50
- * @example new HijriDate('10-09-1538', 'dd-mm-yyyy'); // Thu Rmdn 10 1538 00:00:00
51
- new HijriDate('100 years since 04-1348','100 years since mm-yyyy' ); // Wed Rab2 01 1338 00:00:00
52
- */
53
- /**
54
- * @param {Object} dateProps literal object contains date properties .
55
- * @param {number} dateProps.year the year is required .
56
- * @param {number} [dateProps.month = 1] [1, 12] range .
57
- * @param {number} [dateProps.date = 1] the date of the month🌔 ∈ {1, 30} .
58
- * @param {number} [dateProps.hours = 0] ⏰ ∈ {0, 23} .
59
- * @param {number} [dateProps.minutes = 0] 🕔 ∈ {0,59} .
60
- * @param {number} [dateProps.seconds = 0] 🕰 ∈ {0,59} .
61
- * @param {number} [dateProps.milliseconds = 0] 🕰 ∈ {0,999} .
62
- *
63
- * @example new HijriDate({year: 1430, minutes: 54}) // 01-01-1430 00:54:00
64
- new HijriDate({year: 1504, hours: 17, seconds:44}) // 01-01-1504 17:00:44
65
- */
66
- function HijriDate() {
67
- _classCallCheck(this, HijriDate);
68
- return this.init.apply(this, arguments);
69
- }
70
- return _createClass(HijriDate, [{
71
- key: "init",
72
- value: function init() {
73
- var _this = this;
74
- var props = {};
75
- if (!arguments.length) {
76
- props = Initializer.initDefault();
77
- } else {
78
- try {
79
- var methodNameSuffix = Array.from(arguments).map(function (arg) {
80
- return _typeof(arg);
81
- }).join('_');
82
- props = Initializer['init_' + methodNameSuffix].apply(Initializer, arguments);
83
- } catch (e) {
84
- throw new TypeError(hijriTypeErrorMessage + '\n--- Details:\n' + e);
85
- }
86
- }
87
- Object.keys(props).forEach(function (prop) {
88
- _this['_' + prop] = props[prop];
89
- });
90
- this.__proxy__ = HijriToGreg(this);
91
- this.initDayOfWeek();
92
- return this;
93
- }
94
- }, {
95
- key: "initDayOfWeek",
96
- value: function initDayOfWeek() {
97
- if (!this.__proxy__) return;
98
- this._day = this._day || this.__proxy__.getDay();
99
- this._dayName = this._dayName || weekDay(this._day);
100
- }
101
- /**
102
- * Get the year
103
- * @returns {number} the year
104
- */
105
- }, {
106
- key: "year",
107
- get: function get() {
108
- return this._year;
109
- }
110
-
111
- /**
112
- * Set the year
113
- * @param {number} newYear year modifier of the instance.
114
- * @returns {undefined} nothing
115
- *
116
- * @example const d1 = new HijriDate(1399, 10, 25);
117
- d1.year += 2;
118
- assertEqual(d1.year === 1401);
119
- */,
120
- set: function set(newYear) {
121
- this._year = newYear;
122
- this.updateProxy();
123
- }
124
- }, {
125
- key: "month",
126
- get: function get() {
127
- return this._month;
128
- },
129
- set: function set(newMonth) {
130
- this._month = newMonth;
131
- this.updateProxy();
132
- }
133
- }, {
134
- key: "date",
135
- get: function get() {
136
- return this._date;
137
- },
138
- set: function set(newDate) {
139
- this._date = newDate;
140
- this.updateProxy();
141
- }
142
- //---time getters and setters
143
- }, {
144
- key: "time",
145
- get: function get() {
146
- return this.__proxy__.getTime();
147
- },
148
- set: function set(newTime) {
149
- var _this2 = this;
150
- var props = Initializer.init_number(newTime);
151
- Object.keys(props).forEach(function (prop) {
152
- _this2['_' + prop] = props[prop];
153
- });
154
- this.__proxy__ = new Date(newTime);
155
- }
156
- }, {
157
- key: "hours",
158
- get: function get() {
159
- return this._hours || 0;
160
- },
161
- set: function set(hours) {
162
- this._hours = hours;
163
- this.updateProxy();
164
- }
165
- }, {
166
- key: "minutes",
167
- get: function get() {
168
- return this._minutes || 0;
169
- },
170
- set: function set(minutes) {
171
- this._minutes = minutes;
172
- this.updateProxy();
173
- }
174
- }, {
175
- key: "seconds",
176
- get: function get() {
177
- return this._seconds || 0;
178
- },
179
- set: function set(seconds) {
180
- this._seconds = seconds;
181
- this.updateProxy();
182
- }
183
- }, {
184
- key: "milliseconds",
185
- get: function get() {
186
- return this._milliseconds || 0;
187
- },
188
- set: function set(milliseconds) {
189
- this._milliseconds = milliseconds;
190
- this.updateProxy();
191
- }
192
- }, {
193
- key: "timezoneOffset",
194
- get: function get() {
195
- return this.__proxy__.getTimezoneOffset();
196
- }
197
- }, {
198
- key: "day",
199
- get: function get() {
200
- return this._day;
201
- }
202
- }, {
203
- key: "dayName",
204
- get: function get() {
205
- return this._dayName;
206
- }
207
- }, {
208
- key: "getFullYear",
209
- value: function getFullYear() {
210
- return this.year;
211
- }
212
- }, {
213
- key: "getMonthIndex",
214
- value: function getMonthIndex() {
215
- return this.month - 1;
216
- }
217
- }, {
218
- key: "getMonth",
219
- value: function getMonth() {
220
- return this.month;
221
- }
222
- }, {
223
- key: "getDate",
224
- value: function getDate() {
225
- return this.date;
226
- }
227
- }, {
228
- key: "getDay",
229
- value: function getDay() {
230
- return this.day;
231
- }
232
- }, {
233
- key: "getHours",
234
- value: function getHours() {
235
- return this.hours;
236
- }
237
- }, {
238
- key: "getMinutes",
239
- value: function getMinutes() {
240
- return this.minutes;
241
- }
242
- }, {
243
- key: "getSeconds",
244
- value: function getSeconds() {
245
- return this.seconds;
246
- }
247
- }, {
248
- key: "getMilliseconds",
249
- value: function getMilliseconds() {
250
- return this.milliseconds;
251
- }
252
- }, {
253
- key: "getTime",
254
- value: function getTime() {
255
- return this.time;
256
- }
257
- }, {
258
- key: "getTimezoneOffset",
259
- value: function getTimezoneOffset() {
260
- return this.timezoneOffset;
261
- }
262
-
263
- /**
264
- * This method adds 1 day (24 hours) to the instance.
265
- * @returns {HijriDate} the instance itself after adding 1 day.
266
- */
267
- }, {
268
- key: "addDay",
269
- value: function addDay() {
270
- return this.addHours(24);
271
- }
272
- /**
273
- * This method adds n day(s) to the instance.
274
- * @param {number} days number of days to add .
275
- * @returns {HijriDate} the instance itself after adding n day(s).
276
- */
277
- }, {
278
- key: "addDays",
279
- value: function addDays(days) {
280
- var _this3 = this;
281
- if (typeof days === 'number') Array.from({
282
- length: days
283
- }, function (v, k) {
284
- return k + 1;
285
- }).forEach(function (i) {
286
- return _this3.addDay();
287
- });
288
- return this;
289
- }
290
- /**
291
- * TODO
292
- */
293
- }, {
294
- key: "addHours",
295
- value: function addHours(n) {
296
- return this.addMinutes(n * 60);
297
- }
298
-
299
- /**
300
- * TODO
301
- */
302
- }, {
303
- key: "addMinutes",
304
- value: function addMinutes(n) {
305
- return this.addSeconds(n * 60);
306
- }
307
-
308
- /**
309
- * TODO
310
- */
311
- }, {
312
- key: "addSeconds",
313
- value: function addSeconds(n) {
314
- return this.addMilliseconds(1000 * n);
315
- }
316
-
317
- /**
318
- * TODO
319
- */
320
- }, {
321
- key: "addMilliseconds",
322
- value: function addMilliseconds(n) {
323
- this.time += n;
324
- return this;
325
- }
326
-
327
- /**
328
- * TODO
329
- */
330
- }, {
331
- key: "subtractDays",
332
- value: function subtractDays(days) {
333
- var _this4 = this;
334
- Array.from({
335
- length: days
336
- }, function (v, k) {
337
- return k + 1;
338
- }).forEach(function (i) {
339
- return _this4.subtractDay();
340
- });
341
- return this;
342
- }
343
-
344
- /**
345
- * TODO
346
- */
347
- }, {
348
- key: "subtractDay",
349
- value: function subtractDay() {
350
- return this.subtractHours(24);
351
- }
352
-
353
- /**
354
- * TODO
355
- */
356
- }, {
357
- key: "subtractHours",
358
- value: function subtractHours(n) {
359
- return this.subtractMinutes(n * 60);
360
- }
361
-
362
- /**
363
- * TODO
364
- */
365
- }, {
366
- key: "subtractMinutes",
367
- value: function subtractMinutes(n) {
368
- return this.subtractSeconds(n * 60);
369
- }
370
-
371
- /**
372
- * TODO
373
- */
374
- }, {
375
- key: "subtractSeconds",
376
- value: function subtractSeconds(n) {
377
- return this.subtractMilliseconds(1000 * n);
378
- }
379
-
380
- /**
381
- * TODO
382
- */
383
- }, {
384
- key: "subtractMilliseconds",
385
- value: function subtractMilliseconds(n) {
386
- return this.addMilliseconds(-n);
387
- }
388
-
389
- /**
390
- * TODO
391
- */
392
- }, {
393
- key: "updateProxy",
394
- value: function updateProxy() {
395
- this.__proxy__ = HijriToGreg(this);
396
- return this;
397
- }
398
-
399
- /**
400
- * TODO
401
- */
402
- }, {
403
- key: "toGregorian",
404
- value: function toGregorian() {
405
- return this.__proxy__;
406
- }
407
-
408
- /**
409
- * TODO
410
- */
411
- }, {
412
- key: "format",
413
- value: function format(mask, options) {
414
- return dateFormat.apply(void 0, [this].concat(Array.prototype.slice.call(arguments)));
415
- }
416
-
417
- /**
418
- * TODO
419
- */
420
- }, {
421
- key: "ignoreTime",
422
- value: function ignoreTime() {
423
- this.hours = 0;
424
- this.minutes = 0;
425
- this.seconds = 0;
426
- this.milliseconds = 0;
427
- this.updateProxy();
428
- return this;
429
- }
430
-
431
- /**
432
- * TODO
433
- */
434
- }, {
435
- key: "clone",
436
- value: function clone() {
437
- return new HijriDate(this.time);
438
- }
439
-
440
- /**
441
- * TODO
442
- */
443
- }, {
444
- key: "is",
445
- value: function is() {
446
- var _arguments = arguments,
447
- _this5 = this;
448
- if (!arguments.length) throw new Error("function cannot be called without arguments");
449
- if (arguments.length === 1 && _typeof(arguments[0]) === 'object' && Object.keys(arguments[0]).length) return Object.keys(arguments[0]).every(function (prop) {
450
- return parseInt(_arguments[0][prop]) === parseInt(_this5[prop]);
451
- });
452
- return Array.from(arguments).every(function (arg, i) {
453
- return arg === _this5[dateProps[i]];
454
- });
455
- }
456
-
457
- /**
458
- * TODO
459
- */
460
- }, {
461
- key: "isToday",
462
- value: function isToday() {
463
- return HijriDate.today().time == this.clone().ignoreTime().time;
464
- }
465
-
466
- /**
467
- * TODO
468
- */
469
- }, {
470
- key: "isYesterday",
471
- value: function isYesterday() {
472
- return HijriDate.yesterday().time == this.clone().ignoreTime().time;
473
- }
474
-
475
- /**
476
- * TODO
477
- */
478
- }, {
479
- key: "isTomorrow",
480
- value: function isTomorrow() {
481
- return HijriDate.tomorrow().time == this.clone().ignoreTime().time;
482
- }
483
- }, {
484
- key: "valueOf",
485
- value: function valueOf() {
486
- return this.getTime();
487
- }
488
- }, {
489
- key: "toString",
490
- value: function toString() {
491
- return this.format('default');
492
- }
493
- }], [{
494
- key: "now",
495
- value: function now() {
496
- return Date.now();
497
- }
498
- }, {
499
- key: "today",
500
- value: function today() {
501
- return new HijriDate().ignoreTime();
502
- }
503
- }, {
504
- key: "yesterday",
505
- value: function yesterday() {
506
- return this.today().subtractDay();
507
- }
508
- }, {
509
- key: "tomorrow",
510
- value: function tomorrow() {
511
- return this.today().addDay();
512
- }
513
-
514
- ////TODO
515
- // static addDay() {
516
- //
517
- // }
518
- }]);
519
- }();
520
- HijriDate.locales = {
521
- ar: ar,
522
- en: en
523
- };
524
- HijriDate.defaultLocale = 'ar';
525
- var hijriTypeErrorMessage = "\n Wrong call of constructor !\n Please, try to use of the following constructors:\n \u21E2 new HijriDate() ; //current date\n or\n \u21E2 new HijriDate(year, month, day [, hour][, minutes][, seconds][, milliseconds]);\n .i.e: new HijriDate(1438, 12, 23)\n or\n \u21E2 new HijriDate(date[, format])\n .i.e: new HijriDate('1438-12-23', 'yyyy-mm-dd')\n ";
526
- var dateProps = ['year', 'month', 'date', 'hours', 'minutes', 'seconds', 'milliseconds'];
527
-
528
- export { dateProps, HijriDate as default };
@@ -1,74 +0,0 @@
1
- 'use client';
2
-
3
- import _classCallCheck from '@babel/runtime/helpers/classCallCheck';
4
- import _createClass from '@babel/runtime/helpers/createClass';
5
-
6
- var StringDateParser = /*#__PURE__*/function () {
7
- function StringDateParser() {
8
- _classCallCheck(this, StringDateParser);
9
- }
10
- return _createClass(StringDateParser, null, [{
11
- key: "extract",
12
- value: function extract(string, format, formatChunk) {
13
- var ignoreCase = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
14
- var targetFormat = ignoreCase ? format.toLowerCase() : format;
15
- if (targetFormat.includes(formatChunk)) {
16
- return parseInt(string.substr(targetFormat.indexOf(formatChunk), formatChunk.length));
17
- }
18
- }
19
- }, {
20
- key: "extractYear",
21
- value: function extractYear(dateString, format) {
22
- var year = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['yyyy']));
23
- if (!year) {
24
- year = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['yy']));
25
- if (year) year = Number('14' + year);
26
- }
27
- return year;
28
- }
29
- }, {
30
- key: "extractMonth",
31
- value: function extractMonth(dateString, format) {
32
- var month = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['mm', false]));
33
- if (month) return month;
34
- return 1;
35
- }
36
- }, {
37
- key: "extractDate",
38
- value: function extractDate(dateString, format) {
39
- var date = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['dd', false]));
40
- if (date) return date;
41
- return 1;
42
- }
43
- }, {
44
- key: "extractHours",
45
- value: function extractHours(dateString, format) {
46
- var hours = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['hh']));
47
- if (hours) return hours;
48
- return 0;
49
- }
50
- }, {
51
- key: "extractMinutes",
52
- value: function extractMinutes(dateString, format) {
53
- var minutes = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['MM', false]));
54
- if (minutes) return minutes;
55
- return 0;
56
- }
57
- }, {
58
- key: "extractSeconds",
59
- value: function extractSeconds(dateString, format) {
60
- var seconds = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['ss', false]));
61
- if (seconds) return seconds;
62
- return 0;
63
- }
64
- }, {
65
- key: "extractMilliseconds",
66
- value: function extractMilliseconds(dateString, format) {
67
- var milliseconds = this.extract.apply(this, Array.prototype.slice.call(arguments).concat(['SS', false]));
68
- if (milliseconds) return milliseconds;
69
- return 0;
70
- }
71
- }]);
72
- }();
73
-
74
- export { StringDateParser as default };
@@ -1,21 +0,0 @@
1
- 'use client';
2
-
3
- import _typeof from '@babel/runtime/helpers/typeof';
4
- import { toHijri } from './safe.js';
5
- import HijriDate from './HijriDate.js';
6
-
7
- var globalScope = function () {
8
- if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === 'object') {
9
- return window;
10
- }
11
- if ((typeof global === "undefined" ? "undefined" : _typeof(global)) === 'object') {
12
- return global;
13
- }
14
- return {};
15
- }();
16
- globalScope.HijriDate = HijriDate;
17
- Date.prototype.toHijri = function () {
18
- return toHijri(this);
19
- };
20
-
21
- export { HijriDate as default };