@react-pakistan/util-functions 1.25.89 → 2.0.0

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 (412) hide show
  1. package/README.md +74 -315
  2. package/constants/api-methods.d.ts +3 -1
  3. package/constants/api-methods.js +1 -15
  4. package/constants/cache-time.d.ts +7 -5
  5. package/constants/cache-time.js +1 -8
  6. package/constants/countries-timezones.d.ts +4 -2
  7. package/constants/countries-timezones.js +1 -1411
  8. package/constants/currencies.d.ts +4 -2
  9. package/constants/currencies.js +1 -1076
  10. package/constants/dial-codes.d.ts +5 -3
  11. package/constants/dial-codes.js +1 -1216
  12. package/constants/layout-direction.d.ts +3 -1
  13. package/constants/layout-direction.js +1 -8
  14. package/constants/react-pakistan-meta.d.ts +4 -2
  15. package/constants/react-pakistan-meta.js +1 -35
  16. package/constants/react-pakistan.d.ts +5 -3
  17. package/constants/react-pakistan.js +12 -104
  18. package/constants/select-value-delimiter.d.ts +3 -1
  19. package/constants/select-value-delimiter.js +1 -13
  20. package/constants/social-media-colors.d.ts +3 -1
  21. package/constants/social-media-colors.js +1 -42
  22. package/constants/social-media-sizes.d.ts +6 -4
  23. package/constants/social-media-sizes.js +1 -327
  24. package/constants/user-roles.d.ts +3 -1
  25. package/constants/user-roles.js +1 -9
  26. package/edu-pilot-pro/types/academics.d.ts +2 -0
  27. package/edu-pilot-pro/types/academics.js +1 -0
  28. package/edu-pilot-pro/types/admission.d.ts +878 -0
  29. package/edu-pilot-pro/types/admission.js +1 -0
  30. package/edu-pilot-pro/types/communication.d.ts +2 -0
  31. package/edu-pilot-pro/types/communication.js +1 -0
  32. package/edu-pilot-pro/types/enums.d.ts +413 -0
  33. package/edu-pilot-pro/types/enums.js +1 -0
  34. package/edu-pilot-pro/types/finance.d.ts +2 -0
  35. package/edu-pilot-pro/types/finance.js +1 -0
  36. package/edu-pilot-pro/types/index.d.ts +2 -0
  37. package/edu-pilot-pro/types/index.js +1 -0
  38. package/edu-pilot-pro/types/user-management.d.ts +2 -0
  39. package/edu-pilot-pro/types/user-management.js +1 -0
  40. package/factory/generic-component-factory.d.ts +12 -9
  41. package/factory/generic-component-factory.js +1 -131
  42. package/factory/generic-module-factory.d.ts +14 -10
  43. package/factory/generic-module-factory.js +1 -190
  44. package/general/basic-get.d.ts +8 -1
  45. package/general/basic-get.js +1 -83
  46. package/general/basic-post.d.ts +8 -1
  47. package/general/basic-post.js +1 -70
  48. package/general/calculate-pages.d.ts +9 -1
  49. package/general/calculate-pages.js +1 -7
  50. package/general/camel-to-sentence-case.d.ts +3 -1
  51. package/general/camel-to-sentence-case.js +1 -20
  52. package/general/check-even-odd-length.d.ts +3 -1
  53. package/general/check-even-odd-length.js +1 -17
  54. package/general/clear-cache.d.ts +7 -2
  55. package/general/clear-cache.js +1 -12
  56. package/general/cnic-formatter.d.ts +16 -3
  57. package/general/cnic-formatter.js +1 -53
  58. package/general/convert-url-to-base64.d.ts +8 -6
  59. package/general/convert-url-to-base64.js +1 -231
  60. package/general/countries.d.ts +5 -3
  61. package/general/countries.js +1 -514
  62. package/general/create-date.d.ts +3 -1
  63. package/general/create-date.js +1 -22
  64. package/general/crypto.d.ts +4 -2
  65. package/general/crypto.js +1 -45
  66. package/general/currencies.d.ts +2 -0
  67. package/general/currencies.js +0 -1077
  68. package/general/delete-image-from-private-supabase.d.ts +10 -2
  69. package/general/delete-image-from-private-supabase.js +1 -66
  70. package/general/delete-image-from-public-supabase.d.ts +10 -2
  71. package/general/delete-image-from-public-supabase.js +1 -66
  72. package/general/download-from-url.d.ts +8 -1
  73. package/general/download-from-url.js +1 -82
  74. package/general/dynamic-page-limit.d.ts +9 -3
  75. package/general/dynamic-page-limit.js +1 -7
  76. package/general/enum-to-text.d.ts +8 -1
  77. package/general/enum-to-text.js +1 -11
  78. package/general/fetch-data.d.ts +16 -4
  79. package/general/fetch-data.js +1 -95
  80. package/general/fetch-supabase-image.d.ts +11 -2
  81. package/general/fetch-supabase-image.js +1 -67
  82. package/general/fetch-supabase-private-assets.d.ts +11 -2
  83. package/general/fetch-supabase-private-assets.js +1 -69
  84. package/general/format-date.d.ts +10 -2
  85. package/general/format-date.js +1 -49
  86. package/general/format-number.d.ts +12 -2
  87. package/general/format-number.js +1 -35
  88. package/general/format-phone-display.d.ts +9 -1
  89. package/general/format-phone-display.js +1 -32
  90. package/general/format-phone.d.ts +10 -2
  91. package/general/format-phone.js +1 -20
  92. package/general/format-pricing.d.ts +8 -1
  93. package/general/format-pricing.js +1 -23
  94. package/general/format-secs.d.ts +8 -1
  95. package/general/format-secs.js +1 -21
  96. package/general/format-time.d.ts +8 -2
  97. package/general/format-time.js +1 -38
  98. package/general/format-value.d.ts +8 -1
  99. package/general/format-value.js +1 -7
  100. package/general/full-month-range.d.ts +3 -2
  101. package/general/full-month-range.js +1 -24
  102. package/general/full-year-range.d.ts +3 -2
  103. package/general/full-year-range.js +1 -20
  104. package/general/generate-article-schema.d.ts +3 -2
  105. package/general/generate-article-schema.js +1 -100
  106. package/general/generate-blog-schema.d.ts +3 -2
  107. package/general/generate-blog-schema.js +1 -32
  108. package/general/generate-book-schema.d.ts +3 -2
  109. package/general/generate-book-schema.js +1 -109
  110. package/general/generate-breadcrumb-schema.d.ts +3 -2
  111. package/general/generate-breadcrumb-schema.js +1 -34
  112. package/general/generate-carousel-schema.d.ts +3 -2
  113. package/general/generate-carousel-schema.js +1 -172
  114. package/general/generate-course-schema.d.ts +3 -2
  115. package/general/generate-course-schema.js +1 -124
  116. package/general/generate-dataset-schema.d.ts +3 -2
  117. package/general/generate-dataset-schema.js +1 -156
  118. package/general/generate-discussion-forum-schema.d.ts +3 -2
  119. package/general/generate-discussion-forum-schema.js +1 -67
  120. package/general/generate-education-schema.d.ts +3 -2
  121. package/general/generate-education-schema.js +1 -137
  122. package/general/generate-employer-aggregate-rating-schema.d.ts +3 -2
  123. package/general/generate-employer-aggregate-rating-schema.js +1 -64
  124. package/general/generate-event-schema.d.ts +3 -2
  125. package/general/generate-event-schema.js +1 -214
  126. package/general/generate-faq-schema.d.ts +3 -2
  127. package/general/generate-faq-schema.js +1 -43
  128. package/general/generate-grid.d.ts +3 -2
  129. package/general/generate-grid.js +1 -55
  130. package/general/generate-image-metadata-schema.d.ts +3 -2
  131. package/general/generate-image-metadata-schema.js +1 -73
  132. package/general/generate-job-posting-schema.d.ts +3 -2
  133. package/general/generate-job-posting-schema.js +1 -120
  134. package/general/generate-local-business-schema.d.ts +3 -2
  135. package/general/generate-local-business-schema.js +1 -75
  136. package/general/generate-math-solver-schema.d.ts +3 -2
  137. package/general/generate-math-solver-schema.js +1 -83
  138. package/general/generate-movie-carousel-schema.d.ts +3 -2
  139. package/general/generate-movie-carousel-schema.js +1 -160
  140. package/general/generate-organization-schema.d.ts +3 -2
  141. package/general/generate-organization-schema.js +1 -39
  142. package/general/generate-profile-page-schema.d.ts +3 -2
  143. package/general/generate-profile-page-schema.js +1 -82
  144. package/general/generate-qa-page-schema.d.ts +3 -2
  145. package/general/generate-qa-page-schema.js +1 -67
  146. package/general/generate-recipe-schema.d.ts +3 -2
  147. package/general/generate-recipe-schema.js +1 -104
  148. package/general/generate-ref.d.ts +8 -2
  149. package/general/generate-ref.js +1 -12
  150. package/general/generate-review-snippet-schema.d.ts +3 -2
  151. package/general/generate-review-snippet-schema.js +1 -137
  152. package/general/generate-shopping-loyalty-program-schema.d.ts +3 -2
  153. package/general/generate-shopping-loyalty-program-schema.js +1 -59
  154. package/general/generate-shopping-merchant-listing-schema.d.ts +3 -2
  155. package/general/generate-shopping-merchant-listing-schema.js +1 -153
  156. package/general/generate-shopping-merchant-return-policy-schema.d.ts +3 -2
  157. package/general/generate-shopping-merchant-return-policy-schema.js +1 -68
  158. package/general/generate-shopping-merchant-shipping-policy-schema.d.ts +3 -2
  159. package/general/generate-shopping-merchant-shipping-policy-schema.js +1 -74
  160. package/general/generate-shopping-overview-schema.d.ts +3 -2
  161. package/general/generate-shopping-overview-schema.js +1 -157
  162. package/general/generate-shopping-product-snippet-schema.d.ts +3 -2
  163. package/general/generate-shopping-product-snippet-schema.js +1 -167
  164. package/general/generate-shopping-variants-schema.d.ts +3 -2
  165. package/general/generate-shopping-variants-schema.js +1 -143
  166. package/general/generate-software-app-schema.d.ts +3 -2
  167. package/general/generate-software-app-schema.js +1 -143
  168. package/general/generate-speakable-schema.d.ts +3 -2
  169. package/general/generate-speakable-schema.js +1 -139
  170. package/general/generate-subscription-schema.d.ts +3 -2
  171. package/general/generate-subscription-schema.js +1 -133
  172. package/general/generate-vacation-rental-schema.d.ts +3 -2
  173. package/general/generate-vacation-rental-schema.js +1 -135
  174. package/general/generate-video-schema.d.ts +3 -2
  175. package/general/generate-video-schema.js +1 -163
  176. package/general/generic-cache.d.ts +17 -15
  177. package/general/generic-cache.js +1 -659
  178. package/general/get-available-page-limit.d.ts +8 -2
  179. package/general/get-available-page-limit.js +1 -31
  180. package/general/get-calendar-current-month.d.ts +11 -3
  181. package/general/get-calendar-current-month.js +1 -31
  182. package/general/get-calendar-dates.d.ts +11 -3
  183. package/general/get-calendar-dates.js +1 -42
  184. package/general/get-calendar-next-month.d.ts +12 -3
  185. package/general/get-calendar-next-month.js +1 -32
  186. package/general/get-calendar-previous-month.d.ts +12 -3
  187. package/general/get-calendar-previous-month.js +1 -36
  188. package/general/get-current-year.d.ts +7 -1
  189. package/general/get-current-year.js +1 -5
  190. package/general/get-day-name.d.ts +5 -3
  191. package/general/get-day-name.js +1 -14
  192. package/general/get-dial-code.d.ts +8 -1
  193. package/general/get-dial-code.js +1 -8
  194. package/general/get-full-name.d.ts +9 -2
  195. package/general/get-full-name.js +1 -8
  196. package/general/get-href.d.ts +3 -1
  197. package/general/get-href.js +1 -13
  198. package/general/get-month-name.d.ts +5 -3
  199. package/general/get-month-name.js +1 -19
  200. package/general/get-month-number.d.ts +5 -3
  201. package/general/get-month-number.js +1 -29
  202. package/general/get-number-of-days-in-month.d.ts +9 -2
  203. package/general/get-number-of-days-in-month.js +1 -12
  204. package/general/get-pathname.d.ts +3 -1
  205. package/general/get-pathname.js +1 -16
  206. package/general/get-week-day.d.ts +8 -1
  207. package/general/get-week-day.js +1 -9
  208. package/general/image-url-to-base64.d.ts +3 -1
  209. package/general/image-url-to-base64.js +1 -80
  210. package/general/is-created-or-updated.d.ts +3 -1
  211. package/general/is-created-or-updated.js +1 -26
  212. package/general/is-next-button-disabled.d.ts +9 -1
  213. package/general/is-next-button-disabled.js +1 -5
  214. package/general/is-odd.d.ts +3 -1
  215. package/general/is-odd.js +1 -13
  216. package/general/is-previous-button-disabled.d.ts +8 -1
  217. package/general/is-previous-button-disabled.js +1 -7
  218. package/general/linear-gradients.d.ts +4 -2
  219. package/general/linear-gradients.js +1 -52
  220. package/general/multi-part-search.d.ts +10 -2
  221. package/general/multi-part-search.js +1 -16
  222. package/general/normalize-phone.d.ts +15 -2
  223. package/general/normalize-phone.js +1 -40
  224. package/general/parse-frontmatter.d.ts +11 -4
  225. package/general/parse-frontmatter.js +2 -35
  226. package/general/remove-data-image-prefix.d.ts +8 -1
  227. package/general/remove-data-image-prefix.js +1 -7
  228. package/general/repeat-times.d.ts +3 -1
  229. package/general/repeat-times.js +1 -21
  230. package/general/resolve-anchor-link.d.ts +3 -1
  231. package/general/resolve-anchor-link.js +1 -26
  232. package/general/resolve-current-date.d.ts +3 -1
  233. package/general/resolve-current-date.js +1 -22
  234. package/general/resolve-grid.d.ts +3 -1
  235. package/general/resolve-grid.js +1 -18
  236. package/general/resolve-initials.d.ts +3 -1
  237. package/general/resolve-initials.js +1 -17
  238. package/general/set-timezone.d.ts +11 -1
  239. package/general/set-timezone.js +1 -12
  240. package/general/slugify.d.ts +3 -1
  241. package/general/slugify.js +1 -24
  242. package/general/text-to-enum.d.ts +8 -1
  243. package/general/text-to-enum.js +1 -10
  244. package/general/text-to-sentence-case.d.ts +3 -1
  245. package/general/text-to-sentence-case.js +1 -16
  246. package/general/time-out.d.ts +3 -1
  247. package/general/time-out.js +1 -16
  248. package/general/time-zones.d.ts +3 -1
  249. package/general/time-zones.js +1 -437
  250. package/general/truncate-text.d.ts +3 -1
  251. package/general/truncate-text.js +1 -18
  252. package/general/type.d.ts +3 -1
  253. package/general/type.js +1 -2
  254. package/general/upload-blob-to-private-supabase.d.ts +14 -2
  255. package/general/upload-blob-to-private-supabase.js +1 -62
  256. package/general/upload-blob-to-public-supabase.d.ts +14 -2
  257. package/general/upload-blob-to-public-supabase.js +1 -62
  258. package/general/upload-image-to-private-supabase.d.ts +15 -3
  259. package/general/upload-image-to-private-supabase.js +1 -66
  260. package/general/upload-image-to-public-supabase.d.ts +15 -3
  261. package/general/upload-image-to-public-supabase.js +1 -66
  262. package/general/url-to-sentence-case.d.ts +3 -1
  263. package/general/url-to-sentence-case.js +1 -19
  264. package/general/validate-comment.d.ts +3 -1
  265. package/general/validate-comment.js +1 -21
  266. package/general/validate-email.d.ts +3 -1
  267. package/general/validate-email.js +1 -24
  268. package/general/validate-form.d.ts +12 -3
  269. package/general/validate-form.js +1 -29
  270. package/general/validate-name.d.ts +3 -1
  271. package/general/validate-name.js +1 -21
  272. package/hooks/use-change.d.ts +11 -2
  273. package/hooks/use-change.js +1 -23
  274. package/hooks/use-debounce.d.ts +10 -1
  275. package/hooks/use-debounce.js +1 -14
  276. package/hooks/use-fetch.d.ts +7 -5
  277. package/hooks/use-fetch.js +1 -239
  278. package/hooks/use-force-render.d.ts +6 -2
  279. package/hooks/use-force-render.js +1 -17
  280. package/hooks/use-ip-geo-location.d.ts +8 -1
  281. package/hooks/use-ip-geo-location.js +1 -79
  282. package/hooks/use-is-mobile.d.ts +8 -1
  283. package/hooks/use-is-mobile.js +1 -22
  284. package/hooks/use-module-entity-v2.d.ts +7 -4
  285. package/hooks/use-module-entity-v2.js +1 -188
  286. package/hooks/use-module-entity.d.ts +7 -4
  287. package/hooks/use-module-entity.js +1 -177
  288. package/hooks/use-phone-formatter.d.ts +10 -2
  289. package/hooks/use-phone-formatter.js +1 -23
  290. package/hooks/use-position.d.ts +6 -3
  291. package/hooks/use-position.js +1 -43
  292. package/hooks/use-rtl.d.ts +4 -2
  293. package/hooks/use-rtl.js +1 -84
  294. package/hooks/use-sticky.d.ts +3 -1
  295. package/hooks/use-sticky.js +1 -39
  296. package/hooks/use-toggle-state.d.ts +3 -2
  297. package/hooks/use-toggle-state.js +1 -26
  298. package/hooks/use-window-event-listener.d.ts +9 -1
  299. package/hooks/use-window-event-listener.js +1 -11
  300. package/hooks/with-seo.d.ts +11 -2
  301. package/hooks/with-seo.js +1 -37
  302. package/local-storage/get-storage-value.d.ts +5 -2
  303. package/local-storage/get-storage-value.js +1 -20
  304. package/local-storage/remove-storage-value.d.ts +3 -1
  305. package/local-storage/remove-storage-value.js +1 -14
  306. package/local-storage/set-storage-value.d.ts +3 -1
  307. package/local-storage/set-storage-value.js +1 -14
  308. package/local-storage/type.d.ts +3 -1
  309. package/local-storage/type.js +1 -2
  310. package/npm.d.d.ts +2 -0
  311. package/npm.d.js +0 -0
  312. package/package.json +20 -18
  313. package/storybook/generate-sitemap.d.ts +3 -1
  314. package/storybook/generate-sitemap.js +17 -26
  315. package/storybook/preview.d.ts +4 -2
  316. package/storybook/preview.js +1 -62
  317. package/storybook/react-design-story-script.d.ts +3 -1
  318. package/storybook/react-design-story-script.js +5 -27
  319. package/storybook/react-emoji-collection.d.ts +3 -1
  320. package/storybook/react-emoji-collection.js +10 -55
  321. package/storybook/react-emoji-story-script.d.ts +3 -1
  322. package/storybook/react-emoji-story-script.js +5 -31
  323. package/storybook/react-emoji-story-template.d.ts +3 -1
  324. package/storybook/react-emoji-story-template.js +45 -15
  325. package/storybook/react-icon-collection.d.ts +3 -1
  326. package/storybook/react-icon-collection.js +10 -42
  327. package/storybook/react-icon-story-script.d.ts +3 -1
  328. package/storybook/react-icon-story-script.js +5 -27
  329. package/storybook/react-icon-story-template.d.ts +3 -1
  330. package/storybook/react-icon-story-template.js +45 -14
  331. package/storybook/react-logo-collection.d.ts +3 -1
  332. package/storybook/react-logo-collection.js +10 -42
  333. package/storybook/react-logo-story-script.d.ts +3 -1
  334. package/storybook/react-logo-story-script.js +5 -27
  335. package/storybook/react-logo-story-template.d.ts +3 -1
  336. package/storybook/react-logo-story-template.js +45 -14
  337. package/storybook/react-pakistan-theme.d.ts +3 -1
  338. package/storybook/react-pakistan-theme.js +1 -31
  339. package/storybook/responsive-args.d.ts +11 -10
  340. package/storybook/responsive-args.js +1 -19
  341. package/storybook/responsive-component.d.ts +4 -2
  342. package/storybook/responsive-component.js +37 -23
  343. package/storybook/responsive-screens.d.ts +3 -1
  344. package/storybook/responsive-screens.js +1 -109
  345. package/storybook/theme.d.ts +17 -15
  346. package/storybook/theme.js +1 -1022
  347. package/api/stellar-solutions/app-user/index.d.ts +0 -51
  348. package/api/stellar-solutions/app-user/index.js +0 -210
  349. package/api/stellar-solutions/bank/index.d.ts +0 -59
  350. package/api/stellar-solutions/bank/index.js +0 -210
  351. package/api/stellar-solutions/branch/index.d.ts +0 -58
  352. package/api/stellar-solutions/branch/index.js +0 -220
  353. package/api/stellar-solutions/company/index.d.ts +0 -57
  354. package/api/stellar-solutions/company/index.js +0 -218
  355. package/api/stellar-solutions/company-report/index.d.ts +0 -15
  356. package/api/stellar-solutions/company-report/index.js +0 -74
  357. package/api/stellar-solutions/constants.d.ts +0 -19
  358. package/api/stellar-solutions/constants.js +0 -22
  359. package/api/stellar-solutions/contact/index.d.ts +0 -56
  360. package/api/stellar-solutions/contact/index.js +0 -217
  361. package/api/stellar-solutions/currency/index.d.ts +0 -55
  362. package/api/stellar-solutions/currency/index.js +0 -212
  363. package/api/stellar-solutions/customer/index.d.ts +0 -68
  364. package/api/stellar-solutions/customer/index.js +0 -249
  365. package/api/stellar-solutions/expense/index.d.ts +0 -58
  366. package/api/stellar-solutions/expense/index.js +0 -229
  367. package/api/stellar-solutions/expense-category/index.d.ts +0 -53
  368. package/api/stellar-solutions/expense-category/index.js +0 -214
  369. package/api/stellar-solutions/lead/index.d.ts +0 -51
  370. package/api/stellar-solutions/lead/index.js +0 -206
  371. package/api/stellar-solutions/menu-order/index.d.ts +0 -53
  372. package/api/stellar-solutions/menu-order/index.js +0 -202
  373. package/api/stellar-solutions/payment/index.d.ts +0 -65
  374. package/api/stellar-solutions/payment/index.js +0 -230
  375. package/api/stellar-solutions/payment-mode/index.d.ts +0 -53
  376. package/api/stellar-solutions/payment-mode/index.js +0 -191
  377. package/api/stellar-solutions/preference/index.d.ts +0 -25
  378. package/api/stellar-solutions/preference/index.js +0 -114
  379. package/api/stellar-solutions/product/index.d.ts +0 -64
  380. package/api/stellar-solutions/product/index.js +0 -235
  381. package/api/stellar-solutions/product-category/index.d.ts +0 -51
  382. package/api/stellar-solutions/product-category/index.js +0 -212
  383. package/api/stellar-solutions/profile/index.d.ts +0 -78
  384. package/api/stellar-solutions/profile/index.js +0 -234
  385. package/api/stellar-solutions/quote-invoice/index.d.ts +0 -97
  386. package/api/stellar-solutions/quote-invoice/index.js +0 -369
  387. package/api/stellar-solutions/quote-invoice-report/index.d.ts +0 -15
  388. package/api/stellar-solutions/quote-invoice-report/index.js +0 -74
  389. package/api/stellar-solutions/tax/index.d.ts +0 -55
  390. package/api/stellar-solutions/tax/index.js +0 -224
  391. package/api/stellar-solutions/types/common.d.ts +0 -24
  392. package/api/stellar-solutions/types/common.js +0 -22
  393. package/api/stellar-solutions/types/erp.d.ts +0 -302
  394. package/api/stellar-solutions/types/erp.js +0 -73
  395. package/api/stellar-solutions/types/index.d.ts +0 -3
  396. package/api/stellar-solutions/types/index.js +0 -19
  397. package/api/stellar-solutions/types/pos.d.ts +0 -176
  398. package/api/stellar-solutions/types/pos.js +0 -61
  399. package/constants/index.d.ts +0 -12
  400. package/constants/index.js +0 -28
  401. package/factory/index.d.ts +0 -2
  402. package/factory/index.js +0 -18
  403. package/general/index.d.ts +0 -95
  404. package/general/index.js +0 -111
  405. package/index.d.ts +0 -28
  406. package/index.js +0 -44
  407. package/local-storage/index.d.ts +0 -4
  408. package/local-storage/index.js +0 -20
  409. package/setupTests.d.ts +0 -1
  410. package/setupTests.js +0 -52
  411. package/storybook/index.d.ts +0 -17
  412. package/storybook/index.js +0 -33
@@ -1,5 +1,11 @@
1
1
  interface Return {
2
2
  option: string;
3
3
  }
4
- export declare const getAvailablePageLimits: (totalRecords: number) => Array<Return>;
5
- export {};
4
+ /**
5
+ * Returns available page-limit dropdown options based on total record count.
6
+ * @param totalRecords - Total number of records.
7
+ * @returns Array of page-limit option objects.
8
+ */
9
+ declare const getAvailablePageLimits: (totalRecords: number) => Array<Return>;
10
+
11
+ export { getAvailablePageLimits };
@@ -1,31 +1 @@
1
- "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.getAvailablePageLimits = void 0;
13
- var dynamic_page_limit_1 = require("./dynamic-page-limit");
14
- var getAvailablePageLimits = function (totalRecords) {
15
- var allOptions = [10, 15, 25, 100];
16
- // If totalRecords is less than the smallest option, return only the smallest option
17
- if (totalRecords < allOptions[0]) {
18
- return (0, dynamic_page_limit_1.dynamicPageLimit)([allOptions[0]]);
19
- }
20
- // Get options less than or equal to totalRecords
21
- var lowerOptions = allOptions.filter(function (opt) { return opt < totalRecords; });
22
- // Find the next higher option
23
- var nextHigherOption = allOptions.find(function (opt) { return opt >= totalRecords; });
24
- // Combine lower options and next higher (if it exists)
25
- var availableOptions = __spreadArray([], lowerOptions, true);
26
- if (nextHigherOption && !availableOptions.includes(nextHigherOption)) {
27
- availableOptions.push(nextHigherOption);
28
- }
29
- return (0, dynamic_page_limit_1.dynamicPageLimit)(availableOptions);
30
- };
31
- exports.getAvailablePageLimits = getAvailablePageLimits;
1
+ var a=Object.defineProperty;var p=Object.getOwnPropertyDescriptor;var s=Object.getOwnPropertyNames;var u=Object.prototype.hasOwnProperty;var g=(n,i)=>{for(var e in i)a(n,e,{get:i[e],enumerable:!0})},l=(n,i,e,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of s(i))!u.call(n,t)&&t!==e&&a(n,t,{get:()=>i[t],enumerable:!(r=p(i,t))||r.enumerable});return n};var c=n=>l(a({},"__esModule",{value:!0}),n);var O={};g(O,{getAvailablePageLimits:()=>f});module.exports=c(O);var m=require("./dynamic-page-limit");const f=n=>{const i=[10,15,25,100];if(n<i[0])return(0,m.dynamicPageLimit)([i[0]]);const e=i.filter(o=>o<n),r=i.find(o=>o>=n),t=[...e];return r&&!t.includes(r)&&t.push(r),(0,m.dynamicPageLimit)(t)};0&&(module.exports={getAvailablePageLimits});
@@ -1,7 +1,15 @@
1
- import { CalendarDay } from './type';
1
+ import { CalendarDay } from './type.js';
2
+
2
3
  interface Params {
3
4
  month: number;
4
5
  year: number;
5
6
  }
6
- export declare const getCalendarCurrentMonth: ({ month, year, }: Params) => Array<CalendarDay>;
7
- export {};
7
+ /**
8
+ * Generates an array of CalendarDay objects for the current month.
9
+ * @param params.month - Month number (1-based).
10
+ * @param params.year - Full year number.
11
+ * @returns Array of CalendarDay objects for the month.
12
+ */
13
+ declare const getCalendarCurrentMonth: ({ month, year, }: Params) => Array<CalendarDay>;
14
+
15
+ export { getCalendarCurrentMonth };
@@ -1,31 +1 @@
1
- "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getCalendarCurrentMonth = void 0;
16
- var dayjs_1 = __importDefault(require("dayjs"));
17
- var get_number_of_days_in_month_1 = require("./get-number-of-days-in-month");
18
- var getCalendarCurrentMonth = function (_a) {
19
- var month = _a.month, year = _a.year;
20
- var today = new Date().getDate();
21
- return __spreadArray([], Array((0, get_number_of_days_in_month_1.getNumberOfDaysInMonth)({
22
- year: year,
23
- month: month,
24
- })), true).map(function (_, index) { return ({
25
- date: (0, dayjs_1.default)("".concat(year, "-").concat(month, "-").concat(index + 1)).format('YYYY-MM-DD'),
26
- dayOfMonth: index + 1,
27
- isCurrentMonth: true,
28
- isToday: !!(today === index + 1),
29
- }); });
30
- };
31
- exports.getCalendarCurrentMonth = getCalendarCurrentMonth;
1
+ var f=Object.create;var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var D=Object.getOwnPropertyNames;var d=Object.getPrototypeOf,M=Object.prototype.hasOwnProperty;var p=(r,a)=>{for(var t in a)o(r,t,{get:a[t],enumerable:!0})},m=(r,a,t,n)=>{if(a&&typeof a=="object"||typeof a=="function")for(let e of D(a))!M.call(r,e)&&e!==t&&o(r,e,{get:()=>a[e],enumerable:!(n=u(a,e))||n.enumerable});return r};var C=(r,a,t)=>(t=r!=null?f(d(r)):{},m(a||!r||!r.__esModule?o(t,"default",{value:r,enumerable:!0}):t,r)),h=r=>m(o({},"__esModule",{value:!0}),r);var Y={};p(Y,{getCalendarCurrentMonth:()=>i});module.exports=h(Y);var y=C(require("dayjs")),s=require("./get-number-of-days-in-month");const i=({month:r,year:a})=>{const t=new Date().getDate();return[...Array((0,s.getNumberOfDaysInMonth)({year:a,month:r}))].map((n,e)=>({date:(0,y.default)(`${a}-${r}-${e+1}`).format("YYYY-MM-DD"),dayOfMonth:e+1,isCurrentMonth:!0,isToday:t===e+1}))};0&&(module.exports={getCalendarCurrentMonth});
@@ -1,7 +1,15 @@
1
- import { CalendarDay } from './type';
1
+ import { CalendarDay } from './type.js';
2
+
2
3
  interface Params {
3
4
  month: number;
4
5
  year: number;
5
6
  }
6
- export declare const getCalendarDates: ({ month, year, }: Params) => Array<CalendarDay>;
7
- export {};
7
+ /**
8
+ * Generates a full calendar month grid including overflow days from adjacent months.
9
+ * @param params.month - Month index (0-based).
10
+ * @param params.year - Full year number.
11
+ * @returns Array of CalendarDay objects for the entire grid.
12
+ */
13
+ declare const getCalendarDates: ({ month, year, }: Params) => Array<CalendarDay>;
14
+
15
+ export { getCalendarDates };
@@ -1,42 +1 @@
1
- "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getCalendarDates = void 0;
16
- var dayjs_1 = __importDefault(require("dayjs"));
17
- var weekday_1 = __importDefault(require("dayjs/plugin/weekday"));
18
- var get_calendar_previous_month_1 = require("./get-calendar-previous-month");
19
- var get_calendar_next_month_1 = require("./get-calendar-next-month");
20
- var get_calendar_current_month_1 = require("./get-calendar-current-month");
21
- dayjs_1.default.extend(weekday_1.default);
22
- var getCalendarDates = function (_a) {
23
- var month = _a.month, year = _a.year;
24
- var updatedMonth = month + 1;
25
- var currentMonthDays = (0, get_calendar_current_month_1.getCalendarCurrentMonth)({
26
- month: updatedMonth,
27
- year: year,
28
- });
29
- var previousMonthDays = (0, get_calendar_previous_month_1.getCalendarPreviousMonth)({
30
- currentMonthDays: currentMonthDays,
31
- month: updatedMonth,
32
- year: year,
33
- });
34
- var nextMonthDays = (0, get_calendar_next_month_1.getCalendarNextMonth)({
35
- currentMonthDays: currentMonthDays,
36
- month: updatedMonth,
37
- year: year,
38
- });
39
- var days = __spreadArray(__spreadArray(__spreadArray([], previousMonthDays, true), currentMonthDays, true), nextMonthDays, true);
40
- return days;
41
- };
42
- exports.getCalendarDates = getCalendarDates;
1
+ var u=Object.create;var e=Object.defineProperty;var f=Object.getOwnPropertyDescriptor;var C=Object.getOwnPropertyNames;var M=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty;var D=(t,r)=>{for(var o in r)e(t,o,{get:r[o],enumerable:!0})},m=(t,r,o,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of C(r))!l.call(t,n)&&n!==o&&e(t,n,{get:()=>r[n],enumerable:!(a=f(r,n))||a.enumerable});return t};var s=(t,r,o)=>(o=t!=null?u(M(t)):{},m(r||!t||!t.__esModule?e(o,"default",{value:t,enumerable:!0}):o,t)),g=t=>m(e({},"__esModule",{value:!0}),t);var P={};D(P,{getCalendarDates:()=>x});module.exports=g(P);var d=s(require("dayjs")),h=s(require("dayjs/plugin/weekday")),i=require("./get-calendar-previous-month"),p=require("./get-calendar-next-month"),y=require("./get-calendar-current-month");d.default.extend(h.default);const x=({month:t,year:r})=>{const o=t+1,a=(0,y.getCalendarCurrentMonth)({month:o,year:r}),n=(0,i.getCalendarPreviousMonth)({currentMonthDays:a,month:o,year:r}),c=(0,p.getCalendarNextMonth)({currentMonthDays:a,month:o,year:r});return[...n,...a,...c]};0&&(module.exports={getCalendarDates});
@@ -1,8 +1,17 @@
1
- import { CalendarDay } from './type';
1
+ import { CalendarDay } from './type.js';
2
+
2
3
  interface Params {
3
4
  currentMonthDays: Array<CalendarDay>;
4
5
  month: number;
5
6
  year: number;
6
7
  }
7
- export declare const getCalendarNextMonth: ({ year, month, currentMonthDays, }: Params) => Array<CalendarDay>;
8
- export {};
8
+ /**
9
+ * Generates the overflow CalendarDay entries from the next month to fill the grid.
10
+ * @param params.currentMonthDays - Days of the current month.
11
+ * @param params.month - Month number (1-based).
12
+ * @param params.year - Full year number.
13
+ * @returns Array of CalendarDay objects for the overflow days.
14
+ */
15
+ declare const getCalendarNextMonth: ({ year, month, currentMonthDays, }: Params) => Array<CalendarDay>;
16
+
17
+ export { getCalendarNextMonth };
@@ -1,32 +1 @@
1
- "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getCalendarNextMonth = void 0;
16
- var dayjs_1 = __importDefault(require("dayjs"));
17
- var get_week_day_1 = require("./get-week-day");
18
- var getCalendarNextMonth = function (_a) {
19
- var year = _a.year, month = _a.month, currentMonthDays = _a.currentMonthDays;
20
- var lastDayOfTheMonthWeekday = (0, get_week_day_1.getWeekday)("".concat(year, "-").concat(month, "-").concat(currentMonthDays.length));
21
- var nextMonth = (0, dayjs_1.default)("".concat(year, "-").concat(month, "-01")).add(1, 'month');
22
- var visibleNumberOfDaysFromNextMonth = lastDayOfTheMonthWeekday
23
- ? 7 - lastDayOfTheMonthWeekday
24
- : lastDayOfTheMonthWeekday;
25
- return __spreadArray([], Array(visibleNumberOfDaysFromNextMonth), true).map(function (day, index) { return ({
26
- date: (0, dayjs_1.default)("".concat(nextMonth.year(), "-").concat(nextMonth.month() + 1, "-").concat(index + 1)).format('YYYY-MM-DD'),
27
- dayOfMonth: index + 1,
28
- isCurrentMonth: false,
29
- isToday: false,
30
- }); });
31
- };
32
- exports.getCalendarNextMonth = getCalendarNextMonth;
1
+ var f=Object.create;var o=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var D=Object.getPrototypeOf,$=Object.prototype.hasOwnProperty;var i=(a,r)=>{for(var t in r)o(a,t,{get:r[t],enumerable:!0})},s=(a,r,t,n)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of M(r))!$.call(a,e)&&e!==t&&o(a,e,{get:()=>r[e],enumerable:!(n=l(r,e))||n.enumerable});return a};var c=(a,r,t)=>(t=a!=null?f(D(a)):{},s(r||!a||!a.__esModule?o(t,"default",{value:a,enumerable:!0}):t,a)),u=a=>s(o({},"__esModule",{value:!0}),a);var C={};i(C,{getCalendarNextMonth:()=>p});module.exports=u(C);var m=c(require("dayjs")),d=require("./get-week-day");const p=({year:a,month:r,currentMonthDays:t})=>{const n=(0,d.getWeekday)(`${a}-${r}-${t.length}`),e=(0,m.default)(`${a}-${r}-01`).add(1,"month"),h=n&&7-n;return[...Array(h)].map((b,y)=>({date:(0,m.default)(`${e.year()}-${e.month()+1}-${y+1}`).format("YYYY-MM-DD"),dayOfMonth:y+1,isCurrentMonth:!1,isToday:!1}))};0&&(module.exports={getCalendarNextMonth});
@@ -1,8 +1,17 @@
1
- import { CalendarDay } from './type';
1
+ import { CalendarDay } from './type.js';
2
+
2
3
  interface Params {
3
4
  currentMonthDays: Array<CalendarDay>;
4
5
  month: number;
5
6
  year: number;
6
7
  }
7
- export declare const getCalendarPreviousMonth: ({ currentMonthDays, month, year, }: Params) => Array<CalendarDay>;
8
- export {};
8
+ /**
9
+ * Generates the overflow CalendarDay entries from the previous month to fill the grid.
10
+ * @param params.currentMonthDays - Days of the current month.
11
+ * @param params.month - Month number (1-based).
12
+ * @param params.year - Full year number.
13
+ * @returns Array of CalendarDay objects for the overflow days.
14
+ */
15
+ declare const getCalendarPreviousMonth: ({ currentMonthDays, month, year, }: Params) => Array<CalendarDay>;
16
+
17
+ export { getCalendarPreviousMonth };
@@ -1,36 +1 @@
1
- "use strict";
2
- var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
3
- if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
4
- if (ar || !(i in from)) {
5
- if (!ar) ar = Array.prototype.slice.call(from, 0, i);
6
- ar[i] = from[i];
7
- }
8
- }
9
- return to.concat(ar || Array.prototype.slice.call(from));
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getCalendarPreviousMonth = void 0;
16
- var dayjs_1 = __importDefault(require("dayjs"));
17
- var get_week_day_1 = require("./get-week-day");
18
- var getCalendarPreviousMonth = function (_a) {
19
- var currentMonthDays = _a.currentMonthDays, month = _a.month, year = _a.year;
20
- var firstDayOfTheMonthWeekday = (0, get_week_day_1.getWeekday)(currentMonthDays[0].date);
21
- var previousMonth = (0, dayjs_1.default)("".concat(year, "-").concat(month, "-01")).subtract(1, 'month');
22
- // Cover first day of the month being sunday (firstDayOfTheMonthWeekday === 0)
23
- var visibleNumberOfDaysFromPreviousMonth = firstDayOfTheMonthWeekday
24
- ? firstDayOfTheMonthWeekday - 1
25
- : 6;
26
- var previousMonthLastMondayDayOfMonth = (0, dayjs_1.default)(currentMonthDays[0].date)
27
- .subtract(visibleNumberOfDaysFromPreviousMonth, 'day')
28
- .date();
29
- return __spreadArray([], Array(visibleNumberOfDaysFromPreviousMonth), true).map(function (day, index) { return ({
30
- date: (0, dayjs_1.default)("".concat(previousMonth.year(), "-").concat(previousMonth.month() + 1, "-").concat(previousMonthLastMondayDayOfMonth + index)).format('YYYY-MM-DD'),
31
- dayOfMonth: previousMonthLastMondayDayOfMonth + index,
32
- isCurrentMonth: false,
33
- isToday: false,
34
- }); });
35
- };
36
- exports.getCalendarPreviousMonth = getCalendarPreviousMonth;
1
+ var i=Object.create;var n=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var c=Object.getPrototypeOf,D=Object.prototype.hasOwnProperty;var l=(a,r)=>{for(var t in r)n(a,t,{get:r[t],enumerable:!0})},f=(a,r,t,o)=>{if(r&&typeof r=="object"||typeof r=="function")for(let e of M(r))!D.call(a,e)&&e!==t&&n(a,e,{get:()=>r[e],enumerable:!(o=u(r,e))||o.enumerable});return a};var p=(a,r,t)=>(t=a!=null?i(c(a)):{},f(r||!a||!a.__esModule?n(t,"default",{value:a,enumerable:!0}):t,a)),b=a=>f(n({},"__esModule",{value:!0}),a);var C={};l(C,{getCalendarPreviousMonth:()=>v});module.exports=b(C);var s=p(require("dayjs")),h=require("./get-week-day");const v=({currentMonthDays:a,month:r,year:t})=>{const o=(0,h.getWeekday)(a[0].date),e=(0,s.default)(`${t}-${r}-01`).subtract(1,"month"),y=o?o-1:6,m=(0,s.default)(a[0].date).subtract(y,"day").date();return[...Array(y)].map(($,d)=>({date:(0,s.default)(`${e.year()}-${e.month()+1}-${m+d}`).format("YYYY-MM-DD"),dayOfMonth:m+d,isCurrentMonth:!1,isToday:!1}))};0&&(module.exports={getCalendarPreviousMonth});
@@ -1 +1,7 @@
1
- export declare const getCurrentYear: () => number;
1
+ /**
2
+ * Returns the current 4-digit year.
3
+ * @returns The current year as a number.
4
+ */
5
+ declare const getCurrentYear: () => number;
6
+
7
+ export { getCurrentYear };
@@ -1,5 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCurrentYear = void 0;
4
- var getCurrentYear = function () { return new Date().getFullYear(); };
5
- exports.getCurrentYear = getCurrentYear;
1
+ var a=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var o=Object.prototype.hasOwnProperty;var Y=(r,e)=>{for(var n in e)a(r,n,{get:e[n],enumerable:!0})},b=(r,e,n,u)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of l(e))!o.call(r,t)&&t!==n&&a(r,t,{get:()=>e[t],enumerable:!(u=g(e,t))||u.enumerable});return r};var c=r=>b(a({},"__esModule",{value:!0}),r);var p={};Y(p,{getCurrentYear:()=>m});module.exports=c(p);const m=()=>new Date().getFullYear();0&&(module.exports={getCurrentYear});
@@ -1,8 +1,10 @@
1
- export interface IDayMap {
1
+ interface IDayMap {
2
2
  /**
3
3
  *
4
4
  */
5
5
  [key: number]: string;
6
6
  }
7
- export declare const dayMap: IDayMap;
8
- export declare const getDayName: (num: number) => string;
7
+ declare const dayMap: IDayMap;
8
+ declare const getDayName: (num: number) => string;
9
+
10
+ export { type IDayMap, dayMap, getDayName };
@@ -1,14 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDayName = exports.dayMap = void 0;
4
- exports.dayMap = {
5
- 0: 'Sunday',
6
- 1: 'Monday',
7
- 2: 'Tuesday',
8
- 3: 'Wednesday',
9
- 4: 'Thursday',
10
- 5: 'Friday',
11
- 6: 'Saturday',
12
- };
13
- var getDayName = function (num) { return exports.dayMap[num]; };
14
- exports.getDayName = getDayName;
1
+ var n=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(a,e)=>{for(var r in e)n(a,r,{get:e[r],enumerable:!0})},i=(a,e,r,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let y of o(e))!p.call(a,y)&&y!==r&&n(a,y,{get:()=>e[y],enumerable:!(t=s(e,y))||t.enumerable});return a};var M=a=>i(n({},"__esModule",{value:!0}),a);var g={};u(g,{dayMap:()=>d,getDayName:()=>c});module.exports=M(g);const d={0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"},c=a=>d[a];0&&(module.exports={dayMap,getDayName});
@@ -1 +1,8 @@
1
- export declare const getDialCode: (countryCode: string) => string | undefined;
1
+ /**
2
+ * Returns the dial code for a given ISO country code.
3
+ * @param countryCode - The ISO country code.
4
+ * @returns The dial code string, or undefined if not found.
5
+ */
6
+ declare const getDialCode: (countryCode: string) => string | undefined;
7
+
8
+ export { getDialCode };
@@ -1,8 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getDialCode = void 0;
4
- var dial_codes_1 = require("../constants/dial-codes");
5
- var getDialCode = function (countryCode) {
6
- return dial_codes_1.dialCodeMap.get(countryCode);
7
- };
8
- exports.getDialCode = getDialCode;
1
+ var n=Object.defineProperty;var g=Object.getOwnPropertyDescriptor;var a=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var s=(e,t)=>{for(var i in t)n(e,i,{get:t[i],enumerable:!0})},f=(e,t,i,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of a(t))!p.call(e,r)&&r!==i&&n(e,r,{get:()=>t[r],enumerable:!(o=g(t,r))||o.enumerable});return e};var l=e=>f(n({},"__esModule",{value:!0}),e);var u={};s(u,{getDialCode:()=>m});module.exports=l(u);var d=require("../constants/dial-codes");const m=e=>d.dialCodeMap.get(e);0&&(module.exports={getDialCode});
@@ -2,5 +2,12 @@ interface Params {
2
2
  firstName: string;
3
3
  lastName: string;
4
4
  }
5
- export declare const getFullName: ({ firstName, lastName }: Params) => string;
6
- export {};
5
+ /**
6
+ * Combines first and last name into a full name string.
7
+ * @param params.firstName - The first name.
8
+ * @param params.lastName - The last name.
9
+ * @returns The combined full name.
10
+ */
11
+ declare const getFullName: ({ firstName, lastName }: Params) => string;
12
+
13
+ export { getFullName };
@@ -1,8 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getFullName = void 0;
4
- var getFullName = function (_a) {
5
- var firstName = _a.firstName, lastName = _a.lastName;
6
- return "".concat(firstName, " ").concat(lastName);
7
- };
8
- exports.getFullName = getFullName;
1
+ var e=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var l=(t,a)=>{for(var s in a)e(t,s,{get:a[s],enumerable:!0})},N=(t,a,s,i)=>{if(a&&typeof a=="object"||typeof a=="function")for(let r of n(a))!g.call(t,r)&&r!==s&&e(t,r,{get:()=>a[r],enumerable:!(i=m(a,r))||i.enumerable});return t};var c=t=>N(e({},"__esModule",{value:!0}),t);var o={};l(o,{getFullName:()=>f});module.exports=c(o);const f=({firstName:t,lastName:a})=>`${t} ${a}`;0&&(module.exports={getFullName});
@@ -6,4 +6,6 @@
6
6
  * @remarks Taimoor Resume 4
7
7
  */
8
8
  /** End file docs */
9
- export declare const getHref: () => string;
9
+ declare const getHref: () => string;
10
+
11
+ export { getHref };
@@ -1,13 +1 @@
1
- "use strict";
2
- /**
3
- * A util function to get current window href
4
- *
5
- * @returns string - https://taimoor.io/
6
- * @author Taimoor Khan
7
- * @remarks Taimoor Resume 4
8
- */
9
- /** End file docs */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.getHref = void 0;
12
- var getHref = function () { return window && window.location.href; };
13
- exports.getHref = getHref;
1
+ var i=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var f=(n,o)=>{for(var e in o)i(n,e,{get:o[e],enumerable:!0})},g=(n,o,e,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let t of c(o))!d.call(n,t)&&t!==e&&i(n,t,{get:()=>o[t],enumerable:!(r=w(o,t))||r.enumerable});return n};var s=n=>g(i({},"__esModule",{value:!0}),n);var h={};f(h,{getHref:()=>a});module.exports=s(h);const a=()=>window&&window.location.href;0&&(module.exports={getHref});
@@ -1,8 +1,10 @@
1
- export interface IMonthMap {
1
+ interface IMonthMap {
2
2
  /**
3
3
  *
4
4
  */
5
5
  [key: number]: string;
6
6
  }
7
- export declare const monthMap: IMonthMap;
8
- export declare const getMonthName: (num: number) => string;
7
+ declare const monthMap: IMonthMap;
8
+ declare const getMonthName: (num: number) => string;
9
+
10
+ export { type IMonthMap, getMonthName, monthMap };
@@ -1,19 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMonthName = exports.monthMap = void 0;
4
- exports.monthMap = {
5
- 0: 'January',
6
- 1: 'February',
7
- 2: 'March',
8
- 3: 'April',
9
- 4: 'May',
10
- 5: 'June',
11
- 6: 'July',
12
- 7: 'August',
13
- 8: 'September',
14
- 9: 'October',
15
- 10: 'November',
16
- 11: 'December',
17
- };
18
- var getMonthName = function (num) { return exports.monthMap[num]; };
19
- exports.getMonthName = getMonthName;
1
+ var o=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var M=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var m=(e,r)=>{for(var n in r)o(e,n,{get:r[n],enumerable:!0})},c=(e,r,n,a)=>{if(r&&typeof r=="object"||typeof r=="function")for(let t of M(r))!b.call(e,t)&&t!==n&&o(e,t,{get:()=>r[t],enumerable:!(a=u(r,t))||a.enumerable});return e};var h=e=>c(o({},"__esModule",{value:!0}),e);var y={};m(y,{getMonthName:()=>s,monthMap:()=>p});module.exports=h(y);const p={0:"January",1:"February",2:"March",3:"April",4:"May",5:"June",6:"July",7:"August",8:"September",9:"October",10:"November",11:"December"},s=e=>p[e];0&&(module.exports={getMonthName,monthMap});
@@ -1,13 +1,15 @@
1
- export interface IMonthNameMap {
1
+ interface IMonthNameMap {
2
2
  /**
3
3
  *
4
4
  */
5
5
  [key: string]: number;
6
6
  }
7
- export declare const monthNameMap: IMonthNameMap;
7
+ declare const monthNameMap: IMonthNameMap;
8
8
  /**
9
9
  * Get the UTC month number (0-11) from a month name
10
10
  * @param monthName - The name of the month (case-insensitive)
11
11
  * @returns The UTC month number (0-11), or -1 if the month name is invalid
12
12
  */
13
- export declare const getMonthNumber: (monthName: string) => number;
13
+ declare const getMonthNumber: (monthName: string) => number;
14
+
15
+ export { type IMonthNameMap, getMonthNumber, monthNameMap };
@@ -1,29 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMonthNumber = exports.monthNameMap = void 0;
4
- exports.monthNameMap = {
5
- january: 0,
6
- february: 1,
7
- march: 2,
8
- april: 3,
9
- may: 4,
10
- june: 5,
11
- july: 6,
12
- august: 7,
13
- september: 8,
14
- october: 9,
15
- november: 10,
16
- december: 11,
17
- };
18
- /**
19
- * Get the UTC month number (0-11) from a month name
20
- * @param monthName - The name of the month (case-insensitive)
21
- * @returns The UTC month number (0-11), or -1 if the month name is invalid
22
- */
23
- var getMonthNumber = function (monthName) {
24
- var normalizedName = monthName.toLowerCase().trim();
25
- return exports.monthNameMap[normalizedName] !== undefined
26
- ? exports.monthNameMap[normalizedName]
27
- : -1;
28
- };
29
- exports.getMonthNumber = getMonthNumber;
1
+ var a=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var b=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var s=(r,e)=>{for(var n in e)a(r,n,{get:e[n],enumerable:!0})},c=(r,e,n,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of b(e))!p.call(r,t)&&t!==n&&a(r,t,{get:()=>e[t],enumerable:!(m=u(e,t))||m.enumerable});return r};var i=r=>c(a({},"__esModule",{value:!0}),r);var h={};s(h,{getMonthNumber:()=>M,monthNameMap:()=>o});module.exports=i(h);const o={january:0,february:1,march:2,april:3,may:4,june:5,july:6,august:7,september:8,october:9,november:10,december:11},M=r=>{const e=r.toLowerCase().trim();return o[e]!==void 0?o[e]:-1};0&&(module.exports={getMonthNumber,monthNameMap});
@@ -2,5 +2,12 @@ interface Params {
2
2
  year: number;
3
3
  month: number;
4
4
  }
5
- export declare const getNumberOfDaysInMonth: ({ year, month }: Params) => number;
6
- export {};
5
+ /**
6
+ * Returns the number of days in a given month and year.
7
+ * @param params.year - The year.
8
+ * @param params.month - The month number (1-based).
9
+ * @returns Number of days in the month.
10
+ */
11
+ declare const getNumberOfDaysInMonth: ({ year, month }: Params) => number;
12
+
13
+ export { getNumberOfDaysInMonth };
@@ -1,12 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getNumberOfDaysInMonth = void 0;
7
- var dayjs_1 = __importDefault(require("dayjs"));
8
- var getNumberOfDaysInMonth = function (_a) {
9
- var year = _a.year, month = _a.month;
10
- return (0, dayjs_1.default)("".concat(year, "-").concat(month, "-01")).daysInMonth();
11
- };
12
- exports.getNumberOfDaysInMonth = getNumberOfDaysInMonth;
1
+ var b=Object.create;var m=Object.defineProperty;var u=Object.getOwnPropertyDescriptor;var y=Object.getOwnPropertyNames;var f=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var c=(r,n)=>{for(var a in n)m(r,a,{get:n[a],enumerable:!0})},o=(r,n,a,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let e of y(n))!h.call(r,e)&&e!==a&&m(r,e,{get:()=>n[e],enumerable:!(t=u(n,e))||t.enumerable});return r};var d=(r,n,a)=>(a=r!=null?b(f(r)):{},o(n||!r||!r.__esModule?m(a,"default",{value:r,enumerable:!0}):a,r)),i=r=>o(m({},"__esModule",{value:!0}),r);var I={};c(I,{getNumberOfDaysInMonth:()=>p});module.exports=i(I);var s=d(require("dayjs"));const p=({year:r,month:n})=>(0,s.default)(`${r}-${n}-01`).daysInMonth();0&&(module.exports={getNumberOfDaysInMonth});
@@ -6,4 +6,6 @@
6
6
  * @remarks Taimoor Resume 4
7
7
  */
8
8
  /** End file docs */
9
- export declare const getPathname: () => string;
9
+ declare const getPathname: () => string;
10
+
11
+ export { getPathname };
@@ -1,16 +1 @@
1
- "use strict";
2
- /**
3
- * A util function to get current window pathname
4
- *
5
- * @returns string - /index
6
- * @author Taimoor Khan
7
- * @remarks Taimoor Resume 4
8
- */
9
- /** End file docs */
10
- Object.defineProperty(exports, "__esModule", { value: true });
11
- exports.getPathname = void 0;
12
- var getPathname = function () {
13
- return window &&
14
- window.location.pathname.substring(0, window.location.pathname.length - 1);
15
- };
16
- exports.getPathname = getPathname;
1
+ var i=Object.defineProperty;var w=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var s=(t,n)=>{for(var a in n)i(t,a,{get:n[a],enumerable:!0})},c=(t,n,a,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of g(n))!h.call(t,o)&&o!==a&&i(t,o,{get:()=>n[o],enumerable:!(e=w(n,o))||e.enumerable});return t};var d=t=>c(i({},"__esModule",{value:!0}),t);var m={};s(m,{getPathname:()=>l});module.exports=d(m);const l=()=>window&&window.location.pathname.substring(0,window.location.pathname.length-1);0&&(module.exports={getPathname});
@@ -1 +1,8 @@
1
- export declare const getWeekday: (date: string) => number;
1
+ /**
2
+ * Returns the weekday number (0-6) for a given date string.
3
+ * @param date - A date string parsable by dayjs.
4
+ * @returns The weekday number (0=Sunday, 6=Saturday).
5
+ */
6
+ declare const getWeekday: (date: string) => number;
7
+
8
+ export { getWeekday };
@@ -1,9 +1 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getWeekday = void 0;
7
- var dayjs_1 = __importDefault(require("dayjs"));
8
- var getWeekday = function (date) { return (0, dayjs_1.default)(date).weekday(); };
9
- exports.getWeekday = getWeekday;
1
+ var s=Object.create;var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var g=Object.getOwnPropertyNames;var i=Object.getPrototypeOf,k=Object.prototype.hasOwnProperty;var p=(e,r)=>{for(var t in r)a(e,t,{get:r[t],enumerable:!0})},m=(e,r,t,d)=>{if(r&&typeof r=="object"||typeof r=="function")for(let o of g(r))!k.call(e,o)&&o!==t&&a(e,o,{get:()=>r[o],enumerable:!(d=y(r,o))||d.enumerable});return e};var b=(e,r,t)=>(t=e!=null?s(i(e)):{},m(r||!e||!e.__esModule?a(t,"default",{value:e,enumerable:!0}):t,e)),c=e=>m(a({},"__esModule",{value:!0}),e);var j={};p(j,{getWeekday:()=>f});module.exports=c(j);var n=b(require("dayjs"));const f=e=>(0,n.default)(e).weekday();0&&(module.exports={getWeekday});
@@ -4,4 +4,6 @@
4
4
  * @returns Promise<string> - The base64 encoded string of the image
5
5
  * @throws Error if the image cannot be fetched or converted
6
6
  */
7
- export declare const imageUrlToBase64: (url: string) => Promise<string>;
7
+ declare const imageUrlToBase64: (url: string) => Promise<string>;
8
+
9
+ export { imageUrlToBase64 };