@react-pakistan/util-functions 1.25.90 → 2.0.2

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 (417) 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 -266
  27. package/edu-pilot-pro/types/academics.js +1 -9
  28. package/edu-pilot-pro/types/admission.d.ts +803 -10
  29. package/edu-pilot-pro/types/admission.js +1 -7
  30. package/edu-pilot-pro/types/communication.d.ts +2 -165
  31. package/edu-pilot-pro/types/communication.js +1 -8
  32. package/edu-pilot-pro/types/enums.d.ts +30 -28
  33. package/edu-pilot-pro/types/enums.js +1 -445
  34. package/edu-pilot-pro/types/finance.d.ts +2 -128
  35. package/edu-pilot-pro/types/finance.js +1 -8
  36. package/edu-pilot-pro/types/index.d.ts +2 -12
  37. package/edu-pilot-pro/types/index.js +1 -28
  38. package/edu-pilot-pro/types/user-management.d.ts +2 -236
  39. package/edu-pilot-pro/types/user-management.js +1 -8
  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 +21 -19
  313. package/{api/stellar-solutions → stellar-solution}/types/common.d.ts +4 -2
  314. package/stellar-solution/types/common.js +1 -0
  315. package/{api/stellar-solutions → stellar-solution}/types/erp.d.ts +36 -33
  316. package/stellar-solution/types/erp.js +1 -0
  317. package/stellar-solution/types/index.d.ts +3 -0
  318. package/stellar-solution/types/index.js +1 -0
  319. package/{api/stellar-solutions → stellar-solution}/types/pos.d.ts +27 -24
  320. package/stellar-solution/types/pos.js +1 -0
  321. package/storybook/generate-sitemap.d.ts +3 -1
  322. package/storybook/generate-sitemap.js +17 -26
  323. package/storybook/preview.d.ts +4 -2
  324. package/storybook/preview.js +1 -62
  325. package/storybook/react-design-story-script.d.ts +3 -1
  326. package/storybook/react-design-story-script.js +5 -27
  327. package/storybook/react-emoji-collection.d.ts +3 -1
  328. package/storybook/react-emoji-collection.js +10 -55
  329. package/storybook/react-emoji-story-script.d.ts +3 -1
  330. package/storybook/react-emoji-story-script.js +5 -31
  331. package/storybook/react-emoji-story-template.d.ts +3 -1
  332. package/storybook/react-emoji-story-template.js +45 -15
  333. package/storybook/react-icon-collection.d.ts +3 -1
  334. package/storybook/react-icon-collection.js +10 -42
  335. package/storybook/react-icon-story-script.d.ts +3 -1
  336. package/storybook/react-icon-story-script.js +5 -27
  337. package/storybook/react-icon-story-template.d.ts +3 -1
  338. package/storybook/react-icon-story-template.js +45 -14
  339. package/storybook/react-logo-collection.d.ts +3 -1
  340. package/storybook/react-logo-collection.js +10 -42
  341. package/storybook/react-logo-story-script.d.ts +3 -1
  342. package/storybook/react-logo-story-script.js +5 -27
  343. package/storybook/react-logo-story-template.d.ts +3 -1
  344. package/storybook/react-logo-story-template.js +45 -14
  345. package/storybook/react-pakistan-theme.d.ts +3 -1
  346. package/storybook/react-pakistan-theme.js +1 -31
  347. package/storybook/responsive-args.d.ts +11 -10
  348. package/storybook/responsive-args.js +1 -19
  349. package/storybook/responsive-component.d.ts +4 -2
  350. package/storybook/responsive-component.js +37 -23
  351. package/storybook/responsive-screens.d.ts +3 -1
  352. package/storybook/responsive-screens.js +1 -109
  353. package/storybook/theme.d.ts +17 -15
  354. package/storybook/theme.js +1 -1022
  355. package/api/stellar-solutions/app-user/index.d.ts +0 -51
  356. package/api/stellar-solutions/app-user/index.js +0 -210
  357. package/api/stellar-solutions/bank/index.d.ts +0 -59
  358. package/api/stellar-solutions/bank/index.js +0 -210
  359. package/api/stellar-solutions/branch/index.d.ts +0 -58
  360. package/api/stellar-solutions/branch/index.js +0 -220
  361. package/api/stellar-solutions/company/index.d.ts +0 -57
  362. package/api/stellar-solutions/company/index.js +0 -218
  363. package/api/stellar-solutions/company-report/index.d.ts +0 -15
  364. package/api/stellar-solutions/company-report/index.js +0 -74
  365. package/api/stellar-solutions/constants.d.ts +0 -19
  366. package/api/stellar-solutions/constants.js +0 -22
  367. package/api/stellar-solutions/contact/index.d.ts +0 -56
  368. package/api/stellar-solutions/contact/index.js +0 -217
  369. package/api/stellar-solutions/currency/index.d.ts +0 -55
  370. package/api/stellar-solutions/currency/index.js +0 -212
  371. package/api/stellar-solutions/customer/index.d.ts +0 -68
  372. package/api/stellar-solutions/customer/index.js +0 -249
  373. package/api/stellar-solutions/expense/index.d.ts +0 -58
  374. package/api/stellar-solutions/expense/index.js +0 -229
  375. package/api/stellar-solutions/expense-category/index.d.ts +0 -53
  376. package/api/stellar-solutions/expense-category/index.js +0 -214
  377. package/api/stellar-solutions/lead/index.d.ts +0 -51
  378. package/api/stellar-solutions/lead/index.js +0 -206
  379. package/api/stellar-solutions/menu-order/index.d.ts +0 -53
  380. package/api/stellar-solutions/menu-order/index.js +0 -202
  381. package/api/stellar-solutions/payment/index.d.ts +0 -65
  382. package/api/stellar-solutions/payment/index.js +0 -230
  383. package/api/stellar-solutions/payment-mode/index.d.ts +0 -53
  384. package/api/stellar-solutions/payment-mode/index.js +0 -191
  385. package/api/stellar-solutions/preference/index.d.ts +0 -25
  386. package/api/stellar-solutions/preference/index.js +0 -114
  387. package/api/stellar-solutions/product/index.d.ts +0 -64
  388. package/api/stellar-solutions/product/index.js +0 -235
  389. package/api/stellar-solutions/product-category/index.d.ts +0 -51
  390. package/api/stellar-solutions/product-category/index.js +0 -212
  391. package/api/stellar-solutions/profile/index.d.ts +0 -78
  392. package/api/stellar-solutions/profile/index.js +0 -234
  393. package/api/stellar-solutions/quote-invoice/index.d.ts +0 -97
  394. package/api/stellar-solutions/quote-invoice/index.js +0 -369
  395. package/api/stellar-solutions/quote-invoice-report/index.d.ts +0 -15
  396. package/api/stellar-solutions/quote-invoice-report/index.js +0 -74
  397. package/api/stellar-solutions/tax/index.d.ts +0 -55
  398. package/api/stellar-solutions/tax/index.js +0 -224
  399. package/api/stellar-solutions/types/common.js +0 -22
  400. package/api/stellar-solutions/types/erp.js +0 -73
  401. package/api/stellar-solutions/types/index.d.ts +0 -3
  402. package/api/stellar-solutions/types/index.js +0 -19
  403. package/api/stellar-solutions/types/pos.js +0 -61
  404. package/constants/index.d.ts +0 -12
  405. package/constants/index.js +0 -28
  406. package/factory/index.d.ts +0 -2
  407. package/factory/index.js +0 -18
  408. package/general/index.d.ts +0 -95
  409. package/general/index.js +0 -111
  410. package/index.d.ts +0 -28
  411. package/index.js +0 -44
  412. package/local-storage/index.d.ts +0 -4
  413. package/local-storage/index.js +0 -20
  414. package/setupTests.d.ts +0 -1
  415. package/setupTests.js +0 -52
  416. package/storybook/index.d.ts +0 -17
  417. package/storybook/index.js +0 -33
@@ -1,39 +1 @@
1
- "use strict";
2
- /**
3
- * A util hook to stickyness in the app.
4
- *
5
- * @param offset - number of pixel which is offset
6
- * @default offset = 0
7
- * @returns isSticky as boolean
8
- * @author Taimoor Khan
9
- * @remarks
10
- */
11
- /** End file docs */
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.useSticky = void 0;
14
- var react_1 = require("react");
15
- var use_toggle_state_1 = require("./use-toggle-state");
16
- var useSticky = function (offset) {
17
- if (offset === void 0) { offset = 0; }
18
- var _a = (0, use_toggle_state_1.useToggleState)(), isSticky = _a[0], setSticky = _a[1], clearSticky = _a[2];
19
- (0, react_1.useLayoutEffect)(function () {
20
- var onScroll = function () {
21
- window.requestAnimationFrame(function () {
22
- if (window.pageYOffset > offset) {
23
- setSticky();
24
- }
25
- else {
26
- clearSticky();
27
- }
28
- });
29
- };
30
- if (window) {
31
- window.addEventListener('scroll', onScroll);
32
- return function () {
33
- window.removeEventListener('scroll', onScroll);
34
- };
35
- }
36
- }, [setSticky, offset, clearSticky]);
37
- return isSticky;
38
- };
39
- exports.useSticky = useSticky;
1
+ var r=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var w=Object.getOwnPropertyNames;var a=Object.prototype.hasOwnProperty;var d=(o,e)=>{for(var i in e)r(o,i,{get:e[i],enumerable:!0})},m=(o,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let t of w(e))!a.call(o,t)&&t!==i&&r(o,t,{get:()=>e[t],enumerable:!(n=l(e,t))||n.enumerable});return o};var u=o=>m(r({},"__esModule",{value:!0}),o);var S={};d(S,{useSticky:()=>f});module.exports=u(S);var s=require("react"),c=require("./use-toggle-state");const f=(o=0)=>{const[e,i,n]=(0,c.useToggleState)();return(0,s.useLayoutEffect)(()=>{const t=()=>{window.requestAnimationFrame(()=>{window.pageYOffset>o?i():n()})};if(window)return window.addEventListener("scroll",t),()=>{window.removeEventListener("scroll",t)}},[i,o,n]),e};0&&(module.exports={useSticky});
@@ -9,5 +9,6 @@
9
9
  */
10
10
  /** End file docs */
11
11
  type ReturnType = [boolean, () => void, () => void];
12
- export declare const useToggleState: (defaultValue?: boolean) => ReturnType;
13
- export {};
12
+ declare const useToggleState: (defaultValue?: boolean) => ReturnType;
13
+
14
+ export { useToggleState };
@@ -1,26 +1 @@
1
- "use strict";
2
- /**
3
- * A util hook to enable toggle state.
4
- *
5
- * @param defaultValue as an initial state toggle value
6
- * @default defaultValue as false
7
- * @returns [state, toggleOn, toggleOff]
8
- * @author Taimoor Khan
9
- * @remarks
10
- */
11
- /** End file docs */
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.useToggleState = void 0;
14
- var react_1 = require("react");
15
- var useToggleState = function (defaultValue) {
16
- if (defaultValue === void 0) { defaultValue = false; }
17
- var _a = (0, react_1.useState)(defaultValue), state = _a[0], setState = _a[1];
18
- var toggleOn = (0, react_1.useCallback)(function () {
19
- setState(true);
20
- }, [setState]);
21
- var toggleOff = (0, react_1.useCallback)(function () {
22
- setState(false);
23
- }, [setState]);
24
- return [state, toggleOn, toggleOff];
25
- };
26
- exports.useToggleState = useToggleState;
1
+ var l=Object.defineProperty;var r=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var g=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var o in e)l(t,o,{get:e[o],enumerable:!0})},f=(t,e,o,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of u(e))!g.call(t,s)&&s!==o&&l(t,s,{get:()=>e[s],enumerable:!(n=r(e,s))||n.enumerable});return t};var i=t=>f(l({},"__esModule",{value:!0}),t);var d={};c(d,{useToggleState:()=>p});module.exports=i(d);var a=require("react");const p=(t=!1)=>{const[e,o]=(0,a.useState)(t),n=(0,a.useCallback)(()=>{o(!0)},[o]),s=(0,a.useCallback)(()=>{o(!1)},[o]);return[e,n,s]};0&&(module.exports={useToggleState});
@@ -1 +1,9 @@
1
- export declare const useWindowEventListener: <T extends keyof WindowEventMap>(eventName: T, callback: (event: WindowEventMap[T]) => void) => void;
1
+ /**
2
+ * Attaches a listener to a window event and cleans up on unmount or dependency change.
3
+ *
4
+ * @param eventName - The name of the window event to listen for.
5
+ * @param callback - The event handler callback.
6
+ */
7
+ declare const useWindowEventListener: <T extends keyof WindowEventMap>(eventName: T, callback: (event: WindowEventMap[T]) => void) => void;
8
+
9
+ export { useWindowEventListener };
@@ -1,11 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.useWindowEventListener = void 0;
4
- var react_1 = require("react");
5
- var useWindowEventListener = function (eventName, callback) {
6
- (0, react_1.useEffect)(function () {
7
- window.addEventListener(eventName, callback);
8
- return function () { return window.removeEventListener(eventName, callback); };
9
- }, [eventName, callback]);
10
- };
11
- exports.useWindowEventListener = useWindowEventListener;
1
+ var i=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var w=Object.prototype.hasOwnProperty;var E=(n,e)=>{for(var t in e)i(n,t,{get:e[t],enumerable:!0})},f=(n,e,t,d)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of v(e))!w.call(n,o)&&o!==t&&i(n,o,{get:()=>e[o],enumerable:!(d=s(e,o))||d.enumerable});return n};var p=n=>f(i({},"__esModule",{value:!0}),n);var L={};E(L,{useWindowEventListener:()=>u});module.exports=p(L);var r=require("react");const u=(n,e)=>{(0,r.useEffect)(()=>(window.addEventListener(n,e),()=>window.removeEventListener(n,e)),[n,e])};0&&(module.exports={useWindowEventListener});
@@ -1,4 +1,5 @@
1
1
  import { ComponentType, JSX } from 'react';
2
+
2
3
  interface WrapperProps {
3
4
  organizationJsonLd?: any;
4
5
  breadcrumbJsonLd?: any;
@@ -6,5 +7,13 @@ interface WrapperProps {
6
7
  localBusinessJsonLd?: any;
7
8
  [key: string]: any;
8
9
  }
9
- export declare const withSEO: (Component: ComponentType<WrapperProps>, rest: WrapperProps) => (() => JSX.Element);
10
- export {};
10
+ /**
11
+ * Wraps a component with JSON-LD structured data scripts for SEO.
12
+ *
13
+ * @param Component - The component to enhance.
14
+ * @param rest - Props containing optional JSON-LD objects (organization, breadcrumb, FAQ, local business).
15
+ * @returns A new component that renders the wrapped component alongside structured-data script tags.
16
+ */
17
+ declare const withSEO: (Component: ComponentType<WrapperProps>, rest: WrapperProps) => (() => JSX.Element);
18
+
19
+ export { withSEO };
package/hooks/with-seo.js CHANGED
@@ -1,37 +1 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var __importDefault = (this && this.__importDefault) || function (mod) {
14
- return (mod && mod.__esModule) ? mod : { "default": mod };
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.withSEO = void 0;
18
- var react_1 = __importDefault(require("react"));
19
- var script_1 = __importDefault(require("next/script"));
20
- var withSEO = function (Component, rest) {
21
- var EnhancedComponent = function () { return (react_1.default.createElement(react_1.default.Fragment, null,
22
- react_1.default.createElement(Component, __assign({}, rest)),
23
- rest.organizationJsonLd && (react_1.default.createElement(script_1.default, { id: "organization-schema", type: "application/ld+json", dangerouslySetInnerHTML: {
24
- __html: JSON.stringify(rest.organizationJsonLd),
25
- } })),
26
- rest.breadcrumbJsonLd && (react_1.default.createElement(script_1.default, { id: "breadcrumb-schema", type: "application/ld+json", dangerouslySetInnerHTML: {
27
- __html: JSON.stringify(rest.breadcrumbJsonLd),
28
- } })),
29
- rest.faqJsonLd && (react_1.default.createElement(script_1.default, { id: "faq-schema", type: "application/ld+json", dangerouslySetInnerHTML: {
30
- __html: JSON.stringify(rest.faqJsonLd),
31
- } })),
32
- rest.localBusinessJsonLd && (react_1.default.createElement(script_1.default, { id: "local-business-schema", type: "application/ld+json", dangerouslySetInnerHTML: {
33
- __html: JSON.stringify(rest.localBusinessJsonLd),
34
- } })))); };
35
- return EnhancedComponent;
36
- };
37
- exports.withSEO = withSEO;
1
+ var d=Object.create;var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var m=Object.getPrototypeOf,y=Object.prototype.hasOwnProperty;var c=(o,n)=>{for(var s in n)r(o,s,{get:n[s],enumerable:!0})},p=(o,n,s,e)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of l(n))!y.call(o,i)&&i!==s&&r(o,i,{get:()=>n[i],enumerable:!(e=t(n,i))||e.enumerable});return o};var J=(o,n,s)=>(s=o!=null?d(m(o)):{},p(n||!o||!o.__esModule?r(s,"default",{value:o,enumerable:!0}):s,o)),L=o=>p(r({},"__esModule",{value:!0}),o);var u={};c(u,{withSEO:()=>g});module.exports=L(u);var a=J(require("react"));const g=(o,n)=>()=>a.default.createElement(a.default.Fragment,null,a.default.createElement(o,{...n}),n.organizationJsonLd&&a.default.createElement("script",{id:"organization-schema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n.organizationJsonLd)}}),n.breadcrumbJsonLd&&a.default.createElement("script",{id:"breadcrumb-schema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n.breadcrumbJsonLd)}}),n.faqJsonLd&&a.default.createElement("script",{id:"faq-schema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n.faqJsonLd)}}),n.localBusinessJsonLd&&a.default.createElement("script",{id:"local-business-schema",type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(n.localBusinessJsonLd)}}));0&&(module.exports={withSEO});
@@ -1,2 +1,5 @@
1
- import { AllowedTypes } from './type';
2
- export declare const getStorageValue: <T extends AllowedTypes>(key: string) => AllowedTypes;
1
+ import { AllowedTypes } from './type.js';
2
+
3
+ declare const getStorageValue: <T extends AllowedTypes>(key: string) => AllowedTypes;
4
+
5
+ export { getStorageValue };
@@ -1,20 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getStorageValue = void 0;
4
- var getStorageValue = function (key) {
5
- try {
6
- var value = localStorage.getItem(key);
7
- try {
8
- return value === null ? value : JSON.parse(value);
9
- }
10
- catch (_a) {
11
- return value;
12
- }
13
- }
14
- catch (e) {
15
- if (e instanceof Error && e.name === 'NS_ERROR_FILE_CORRUPTED') {
16
- localStorage.clear();
17
- }
18
- }
19
- };
20
- exports.getStorageValue = getStorageValue;
1
+ var l=Object.defineProperty;var s=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var n=Object.prototype.hasOwnProperty;var T=(t,e)=>{for(var a in e)l(t,a,{get:e[a],enumerable:!0})},g=(t,e,a,o)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of c(e))!n.call(t,r)&&r!==a&&l(t,r,{get:()=>e[r],enumerable:!(o=s(e,r))||o.enumerable});return t};var p=t=>g(l({},"__esModule",{value:!0}),t);var y={};T(y,{getStorageValue:()=>u});module.exports=p(y);const u=t=>{try{const e=localStorage.getItem(t);try{return e===null?e:JSON.parse(e)}catch{return e}}catch(e){e instanceof Error&&e.name==="NS_ERROR_FILE_CORRUPTED"&&localStorage.clear()}};0&&(module.exports={getStorageValue});
@@ -1 +1,3 @@
1
- export declare const removeStorageValue: (key: string) => void;
1
+ declare const removeStorageValue: (key: string) => void;
2
+
3
+ export { removeStorageValue };
@@ -1,14 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.removeStorageValue = void 0;
4
- var removeStorageValue = function (key) {
5
- try {
6
- localStorage.removeItem(key);
7
- }
8
- catch (e) {
9
- if (e instanceof Error && e.name === 'NS_ERROR_FILE_CORRUPTED') {
10
- localStorage.clear();
11
- }
12
- }
13
- };
14
- exports.removeStorageValue = removeStorageValue;
1
+ var t=Object.defineProperty;var l=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var R=Object.prototype.hasOwnProperty;var g=(o,e)=>{for(var a in e)t(o,a,{get:e[a],enumerable:!0})},i=(o,e,a,c)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of n(e))!R.call(o,r)&&r!==a&&t(o,r,{get:()=>e[r],enumerable:!(c=l(e,r))||c.enumerable});return o};var m=o=>i(t({},"__esModule",{value:!0}),o);var S={};g(S,{removeStorageValue:()=>E});module.exports=m(S);const E=o=>{try{localStorage.removeItem(o)}catch(e){e instanceof Error&&e.name==="NS_ERROR_FILE_CORRUPTED"&&localStorage.clear()}};0&&(module.exports={removeStorageValue});
@@ -1 +1,3 @@
1
- export declare const setStorageValue: (key: string, value: unknown) => void;
1
+ declare const setStorageValue: (key: string, value: unknown) => void;
2
+
3
+ export { setStorageValue };
@@ -1,14 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.setStorageValue = void 0;
4
- var setStorageValue = function (key, value) {
5
- try {
6
- localStorage.setItem(key, JSON.stringify(value));
7
- }
8
- catch (e) {
9
- if (e instanceof Error && e.name === 'NS_ERROR_FILE_CORRUPTED') {
10
- localStorage.clear();
11
- }
12
- }
13
- };
14
- exports.setStorageValue = setStorageValue;
1
+ var a=Object.defineProperty;var c=Object.getOwnPropertyDescriptor;var i=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var s=(e,t)=>{for(var o in t)a(e,o,{get:t[o],enumerable:!0})},g=(e,t,o,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of i(t))!l.call(e,r)&&r!==o&&a(e,r,{get:()=>t[r],enumerable:!(n=c(t,r))||n.enumerable});return e};var R=e=>g(a({},"__esModule",{value:!0}),e);var E={};s(E,{setStorageValue:()=>S});module.exports=R(E);const S=(e,t)=>{try{localStorage.setItem(e,JSON.stringify(t))}catch(o){o instanceof Error&&o.name==="NS_ERROR_FILE_CORRUPTED"&&localStorage.clear()}};0&&(module.exports={setStorageValue});
@@ -1 +1,3 @@
1
- export type AllowedTypes = boolean | string | number | Record<string, unknown> | null | undefined;
1
+ type AllowedTypes = boolean | string | number | Record<string, unknown> | null | undefined;
2
+
3
+ export type { AllowedTypes };
@@ -1,2 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ var r=Object.defineProperty;var t=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var i=Object.prototype.hasOwnProperty;var p=(e,n,d,l)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of u(n))!i.call(e,o)&&o!==d&&r(e,o,{get:()=>n[o],enumerable:!(l=t(n,o))||l.enumerable});return e};var s=e=>p(r({},"__esModule",{value:!0}),e);var b={};module.exports=s(b);
package/npm.d.d.ts ADDED
@@ -0,0 +1,2 @@
1
+
2
+ export { }
package/npm.d.js ADDED
File without changes
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "@react-pakistan/util-functions",
3
- "version": "1.25.90",
3
+ "version": "2.0.2",
4
4
  "description": "A library of all util functions",
5
- "main": "index.js",
5
+ "exports": {
6
+ "./*": {
7
+ "types": "./*.d.ts",
8
+ "import": "./*.js",
9
+ "default": "./*.js"
10
+ }
11
+ },
6
12
  "scripts": {
7
13
  "add:tags": "scripts/add-tags.sh",
8
14
  "build": "yarn clean:build && yarn build:ts && cp package.json lib && cp README.md lib && cp yarn.lock lib",
9
- "build:ts": "tsc --project tsconfig.json",
15
+ "build:ts": "tsup",
10
16
  "clean:badges": "yarn rimraf ./badges",
11
17
  "clean:build": "yarn rimraf ./lib",
12
18
  "format": "prettier --write \"**/*.{ts,tsx,js,jsx,json,md}\"",
@@ -22,7 +28,8 @@
22
28
  "prepare": "husky",
23
29
  "publish:github": "yarn build && cd lib && npm publish && cd ..",
24
30
  "publish:npm": "yarn build && cd lib && npm publish --access public && cd ..",
25
- "test": "jest --coverage --config jest.config.js",
31
+ "test": "vitest run --coverage",
32
+ "test:watch": "vitest",
26
33
  "test:badges": "yarn test && yarn clean:badges && mkdir -p badges && cp ./coverage/*badge*.svg ./badges/",
27
34
  "upgrade": "ncu -u"
28
35
  },
@@ -46,20 +53,15 @@
46
53
  },
47
54
  "homepage": "https://github.com/react-pakistan/util-functions#readme",
48
55
  "devDependencies": {
49
- "@appcorp/app-corp-vista": "^1.0.0",
50
- "@appcorp/shadcn": "^1.1.83",
51
- "@babel/core": "^7.24.5",
52
- "@babel/preset-typescript": "^7.24.1",
56
+ "@appcorp/shadcn": "^1.2.0",
53
57
  "@eslint/js": "^9.17.0",
54
- "@microsoft/tsdoc": "^0.16.0",
55
58
  "@testing-library/react": "^14.0.0",
56
59
  "@testing-library/react-hooks": "^8.0.1",
57
60
  "@types/eslint__js": "^8.42.3",
58
- "@types/jest": "^30.0.0",
59
61
  "@types/lodash.curry": "^4.1.9",
60
- "@types/mocha": "^10.0.10",
61
62
  "@types/node": "^25",
62
- "@types/styled-components": "^5.1.34",
63
+ "@types/react": "^19.2.17",
64
+ "@vitest/coverage-v8": "^4.1.10",
63
65
  "date-fns": "^2.30.0",
64
66
  "date-fns-tz": "^2.0.0",
65
67
  "dayjs": "^1",
@@ -68,24 +70,20 @@
68
70
  "eslint-plugin-prettier": "^5.2.1",
69
71
  "globals": "^15.13.0",
70
72
  "husky": "^9.1.7",
71
- "jest": "^29.7.0",
72
- "jest-environment-jsdom": "^30",
73
+ "jsdom": "^29.1.1",
73
74
  "libphonenumber-js": "^1",
74
75
  "lint-staged": "^15.2.2",
75
76
  "lodash.curry": "^4.1.1",
76
- "next": "^16",
77
77
  "next-intl": "^4",
78
78
  "prettier": "^3.4.2",
79
79
  "react": "^19",
80
80
  "react-dom": "^19",
81
- "react-use": "^17",
82
81
  "rimraf": "^5.0.5",
83
- "ts-jest": "^29",
84
- "ts-loader": "^9",
85
- "ts-node": "^10",
82
+ "tsup": "^8.5.1",
86
83
  "typescript": "^5",
87
84
  "typescript-eslint": "^8.18.1",
88
85
  "uuid": "^11",
86
+ "vitest": "^4.1.10",
89
87
  "zod": "^4"
90
88
  },
91
89
  "resolutions": {
@@ -93,6 +91,10 @@
93
91
  "postcss": "8.5.10",
94
92
  "@react-pakistan/util-functions": "workspace:."
95
93
  },
94
+ "peerDependencies": {
95
+ "react": "^19",
96
+ "react-dom": "^19"
97
+ },
96
98
  "engines": {
97
99
  "npm": ">=10.0.0",
98
100
  "node": ">=20.0.0"
@@ -1,4 +1,4 @@
1
- export declare enum LS_KEYS {
1
+ declare enum LS_KEYS {
2
2
  BANKS = "stellar_banks_cache",
3
3
  BRANCHES = "stellar_branches_cache",
4
4
  COMPANIES = "stellar_companies_cache",
@@ -16,9 +16,11 @@ export declare enum LS_KEYS {
16
16
  /**
17
17
  * Base entity interface with common audit fields and meta support
18
18
  */
19
- export interface BaseEntity {
19
+ interface BaseEntity {
20
20
  id: string;
21
21
  createdAt: Date;
22
22
  updatedAt: Date;
23
23
  meta?: any;
24
24
  }
25
+
26
+ export { type BaseEntity, LS_KEYS };
@@ -0,0 +1 @@
1
+ var r=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var n=Object.getOwnPropertyNames;var C=Object.prototype.hasOwnProperty;var o=(c,a)=>{for(var s in a)r(c,s,{get:a[s],enumerable:!0})},p=(c,a,s,l)=>{if(a&&typeof a=="object"||typeof a=="function")for(let t of n(a))!C.call(c,t)&&t!==s&&r(c,t,{get:()=>a[t],enumerable:!(l=h(a,t))||l.enumerable});return c};var A=c=>p(r({},"__esModule",{value:!0}),c);var E={};o(E,{LS_KEYS:()=>_});module.exports=A(E);var _=(e=>(e.BANKS="stellar_banks_cache",e.BRANCHES="stellar_branches_cache",e.COMPANIES="stellar_companies_cache",e.CONTACTS="stellar_contacts_cache",e.CURRENCIES="stellar_currencies_cache",e.CUSTOMERS="stellar_customers_cache",e.EXPENSE_CATEGORIES="stellar_expense_categories_cache",e.EXPENSES="stellar_expenses_cache",e.PAYMENT_MODES="stellar_payment_modes_cache",e.PREFERENCES="stellar_preferences_cache",e.PRODUCT_CATEGORIES="stellar_product_categories_cache",e.PRODUCTS="stellar_products_cache",e.TAXES="stellar_taxes_cache",e))(_||{});0&&(module.exports={LS_KEYS});
@@ -1,36 +1,37 @@
1
- import { BaseEntity } from './common';
2
- export declare enum GENDER {
1
+ import { BaseEntity } from './common.js';
2
+
3
+ declare enum GENDER {
3
4
  MALE = "MALE",
4
5
  FEMALE = "FEMALE"
5
6
  }
6
- export declare enum QUOTE_INVOICE_CATEGORY {
7
+ declare enum QUOTE_INVOICE_CATEGORY {
7
8
  QUOTE = "QUOTE",
8
9
  INVOICE = "INVOICE"
9
10
  }
10
- export declare enum QUOTE_INVOICE_MODE {
11
+ declare enum QUOTE_INVOICE_MODE {
11
12
  COMPANY = "COMPANY",
12
13
  CUSTOMER = "CUSTOMER"
13
14
  }
14
- export declare enum DISCOUNT_UNIT {
15
+ declare enum DISCOUNT_UNIT {
15
16
  FIXED_VALUE = "FIXED_VALUE",
16
17
  PERCENTAGE_VALUE = "PERCENTAGE_VALUE"
17
18
  }
18
- export declare enum INVOICE_STATUS {
19
+ declare enum INVOICE_STATUS {
19
20
  UNPAID = "UNPAID",
20
21
  PAID = "PAID"
21
22
  }
22
- export declare enum QUOTE_STATUS {
23
+ declare enum QUOTE_STATUS {
23
24
  DRAFT = "DRAFT",
24
25
  PENDING = "PENDING",
25
26
  SENT = "SENT",
26
27
  ACCEPTED = "ACCEPTED",
27
28
  DECLINED = "DECLINED"
28
29
  }
29
- export declare enum PAYMENT_TYPE {
30
+ declare enum PAYMENT_TYPE {
30
31
  FULL_AMOUNT = "FULL_AMOUNT",
31
32
  PARTIAL_AMOUNT = "PARTIAL_AMOUNT"
32
33
  }
33
- export declare enum LEAD_SOURCE {
34
+ declare enum LEAD_SOURCE {
34
35
  WEBSITE = "WEBSITE",
35
36
  SOCIAL_MEDIA = "SOCIAL_MEDIA",
36
37
  LINKEDIN = "LINKEDIN",
@@ -41,11 +42,11 @@ export declare enum LEAD_SOURCE {
41
42
  FRIEND = "FRIEND",
42
43
  OTHER = "OTHER"
43
44
  }
44
- export declare enum LEAD_TYPE {
45
+ declare enum LEAD_TYPE {
45
46
  COMPANY = "COMPANY",
46
47
  CONTACT = "CONTACT"
47
48
  }
48
- export declare enum LEAD_STATUS {
49
+ declare enum LEAD_STATUS {
49
50
  NEW = "NEW",
50
51
  ASSIGNED = "ASSIGNED",
51
52
  IN_NEGOTIATION = "IN_NEGOTIATION",
@@ -59,7 +60,7 @@ export declare enum LEAD_STATUS {
59
60
  /**
60
61
  * Profile model type
61
62
  */
62
- export interface ProfileBE extends BaseEntity {
63
+ interface ProfileBE extends BaseEntity {
63
64
  avatar?: string;
64
65
  dob?: Date;
65
66
  email: string;
@@ -75,7 +76,7 @@ export interface ProfileBE extends BaseEntity {
75
76
  /**
76
77
  * Product model type
77
78
  */
78
- export interface ProductBE extends BaseEntity {
79
+ interface ProductBE extends BaseEntity {
79
80
  currency: string;
80
81
  description?: string;
81
82
  images: string[];
@@ -88,14 +89,14 @@ export interface ProductBE extends BaseEntity {
88
89
  /**
89
90
  * ProductCategory model type
90
91
  */
91
- export interface ProductCategoryBE extends BaseEntity {
92
+ interface ProductCategoryBE extends BaseEntity {
92
93
  description?: string;
93
94
  name: string;
94
95
  }
95
96
  /**
96
97
  * Company model type
97
98
  */
98
- export interface CompanyBE extends BaseEntity {
99
+ interface CompanyBE extends BaseEntity {
99
100
  country: string;
100
101
  email: string;
101
102
  name: string;
@@ -105,7 +106,7 @@ export interface CompanyBE extends BaseEntity {
105
106
  /**
106
107
  * Contact model type
107
108
  */
108
- export interface ContactBE extends BaseEntity {
109
+ interface ContactBE extends BaseEntity {
109
110
  companyId: string;
110
111
  country: string;
111
112
  email: string;
@@ -116,14 +117,14 @@ export interface ContactBE extends BaseEntity {
116
117
  /**
117
118
  * ExpenseCategory model type
118
119
  */
119
- export interface ExpenseCategoryBE extends BaseEntity {
120
+ interface ExpenseCategoryBE extends BaseEntity {
120
121
  description?: string;
121
122
  name: string;
122
123
  }
123
124
  /**
124
125
  * Expense model type
125
126
  */
126
- export interface ExpenseBE extends BaseEntity {
127
+ interface ExpenseBE extends BaseEntity {
127
128
  currency: string;
128
129
  description: string;
129
130
  expenseCategoryId: string;
@@ -134,7 +135,7 @@ export interface ExpenseBE extends BaseEntity {
134
135
  /**
135
136
  * QuoteInvoice model type
136
137
  */
137
- export interface QuoteInvoiceBE extends BaseEntity {
138
+ interface QuoteInvoiceBE extends BaseEntity {
138
139
  category: QUOTE_INVOICE_CATEGORY;
139
140
  companyId?: string;
140
141
  currency: string;
@@ -154,7 +155,7 @@ export interface QuoteInvoiceBE extends BaseEntity {
154
155
  /**
155
156
  * Service model type
156
157
  */
157
- export interface ServiceBE extends BaseEntity {
158
+ interface ServiceBE extends BaseEntity {
158
159
  description?: string;
159
160
  name: string;
160
161
  price: number;
@@ -164,7 +165,7 @@ export interface ServiceBE extends BaseEntity {
164
165
  /**
165
166
  * Payment model type
166
167
  */
167
- export interface PaymentBE extends BaseEntity {
168
+ interface PaymentBE extends BaseEntity {
168
169
  amount: number;
169
170
  attachment?: string;
170
171
  balance: number;
@@ -179,13 +180,13 @@ export interface PaymentBE extends BaseEntity {
179
180
  /**
180
181
  * Preference model type
181
182
  */
182
- export interface PreferenceBE extends BaseEntity {
183
+ interface PreferenceBE extends BaseEntity {
183
184
  onboarding: boolean;
184
185
  }
185
186
  /**
186
187
  * AppUser model type
187
188
  */
188
- export interface AppUserBE extends BaseEntity {
189
+ interface AppUserBE extends BaseEntity {
189
190
  email: string;
190
191
  firstName: string;
191
192
  lastName: string;
@@ -193,7 +194,7 @@ export interface AppUserBE extends BaseEntity {
193
194
  /**
194
195
  * MenuOrder model type
195
196
  */
196
- export interface MenuOrderBE extends BaseEntity {
197
+ interface MenuOrderBE extends BaseEntity {
197
198
  label: string;
198
199
  order: number;
199
200
  preferenceId: string;
@@ -201,7 +202,7 @@ export interface MenuOrderBE extends BaseEntity {
201
202
  /**
202
203
  * PaymentMode model type
203
204
  */
204
- export interface PaymentModeBE extends BaseEntity {
205
+ interface PaymentModeBE extends BaseEntity {
205
206
  enabled: boolean;
206
207
  isDefault: boolean;
207
208
  label: string;
@@ -210,7 +211,7 @@ export interface PaymentModeBE extends BaseEntity {
210
211
  /**
211
212
  * Bank model type
212
213
  */
213
- export interface BankBE extends BaseEntity {
214
+ interface BankBE extends BaseEntity {
214
215
  accountNumber: string;
215
216
  accountTitle: string;
216
217
  bankAddress?: string;
@@ -224,7 +225,7 @@ export interface BankBE extends BaseEntity {
224
225
  /**
225
226
  * Tax model type
226
227
  */
227
- export interface TaxBE extends BaseEntity {
228
+ interface TaxBE extends BaseEntity {
228
229
  description?: string;
229
230
  enabled: boolean;
230
231
  isDefault: boolean;
@@ -235,7 +236,7 @@ export interface TaxBE extends BaseEntity {
235
236
  /**
236
237
  * Branch model type
237
238
  */
238
- export interface BranchBE extends BaseEntity {
239
+ interface BranchBE extends BaseEntity {
239
240
  branchAddress: string;
240
241
  branchName: string;
241
242
  enabled: boolean;
@@ -248,7 +249,7 @@ export interface BranchBE extends BaseEntity {
248
249
  /**
249
250
  * Currency model type
250
251
  */
251
- export interface CurrencyBE extends BaseEntity {
252
+ interface CurrencyBE extends BaseEntity {
252
253
  code: string;
253
254
  enabled: boolean;
254
255
  isDefault: boolean;
@@ -258,7 +259,7 @@ export interface CurrencyBE extends BaseEntity {
258
259
  /**
259
260
  * Customer model type
260
261
  */
261
- export interface CustomerBE extends BaseEntity {
262
+ interface CustomerBE extends BaseEntity {
262
263
  address?: string;
263
264
  city: string;
264
265
  country: string;
@@ -270,7 +271,7 @@ export interface CustomerBE extends BaseEntity {
270
271
  /**
271
272
  * RequestForm model type
272
273
  */
273
- export interface RequestFormBE extends BaseEntity {
274
+ interface RequestFormBE extends BaseEntity {
274
275
  businessType: string;
275
276
  companyName: string;
276
277
  companySize?: string;
@@ -285,7 +286,7 @@ export interface RequestFormBE extends BaseEntity {
285
286
  /**
286
287
  * Lead model type
287
288
  */
288
- export interface LeadBE extends BaseEntity {
289
+ interface LeadBE extends BaseEntity {
289
290
  notes?: string;
290
291
  source: LEAD_SOURCE;
291
292
  status: LEAD_STATUS;
@@ -294,9 +295,11 @@ export interface LeadBE extends BaseEntity {
294
295
  /**
295
296
  * Join table for QuoteInvoice and Product many-to-many relationship
296
297
  */
297
- export interface QuotesInvoicesOnStellarProducts {
298
+ interface QuotesInvoicesOnStellarProducts {
298
299
  meta?: any;
299
300
  productId: string;
300
301
  quantity: number;
301
302
  quoteInvoiceId: string;
302
303
  }
304
+
305
+ export { type AppUserBE, type BankBE, type BranchBE, type CompanyBE, type ContactBE, type CurrencyBE, type CustomerBE, DISCOUNT_UNIT, type ExpenseBE, type ExpenseCategoryBE, GENDER, INVOICE_STATUS, LEAD_SOURCE, LEAD_STATUS, LEAD_TYPE, type LeadBE, type MenuOrderBE, PAYMENT_TYPE, type PaymentBE, type PaymentModeBE, type PreferenceBE, type ProductBE, type ProductCategoryBE, type ProfileBE, QUOTE_INVOICE_CATEGORY, QUOTE_INVOICE_MODE, QUOTE_STATUS, type QuoteInvoiceBE, type QuotesInvoicesOnStellarProducts, type RequestFormBE, type ServiceBE, type TaxBE };
@@ -0,0 +1 @@
1
+ var a=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var f=Object.prototype.hasOwnProperty;var b=(r,n)=>{for(var e in n)a(r,e,{get:n[e],enumerable:!0})},B=(r,n,e,o)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of l(n))!f.call(r,i)&&i!==e&&a(r,i,{get:()=>n[i],enumerable:!(o=y(n,i))||o.enumerable});return r};var A=r=>B(a({},"__esModule",{value:!0}),r);var C={};b(C,{DISCOUNT_UNIT:()=>E,GENDER:()=>g,INVOICE_STATUS:()=>p,LEAD_SOURCE:()=>N,LEAD_STATUS:()=>I,LEAD_TYPE:()=>x,PAYMENT_TYPE:()=>u,QUOTE_INVOICE_CATEGORY:()=>c,QUOTE_INVOICE_MODE:()=>d,QUOTE_STATUS:()=>m});module.exports=A(C);var g=(e=>(e.MALE="MALE",e.FEMALE="FEMALE",e))(g||{}),c=(e=>(e.QUOTE="QUOTE",e.INVOICE="INVOICE",e))(c||{}),d=(e=>(e.COMPANY="COMPANY",e.CUSTOMER="CUSTOMER",e))(d||{}),E=(e=>(e.FIXED_VALUE="FIXED_VALUE",e.PERCENTAGE_VALUE="PERCENTAGE_VALUE",e))(E||{}),p=(e=>(e.UNPAID="UNPAID",e.PAID="PAID",e))(p||{}),m=(s=>(s.DRAFT="DRAFT",s.PENDING="PENDING",s.SENT="SENT",s.ACCEPTED="ACCEPTED",s.DECLINED="DECLINED",s))(m||{}),u=(e=>(e.FULL_AMOUNT="FULL_AMOUNT",e.PARTIAL_AMOUNT="PARTIAL_AMOUNT",e))(u||{}),N=(t=>(t.WEBSITE="WEBSITE",t.SOCIAL_MEDIA="SOCIAL_MEDIA",t.LINKEDIN="LINKEDIN",t.PROFESSIONAL_NETWORK="PROFESSIONAL_NETWORK",t.CUSTOMER_REFERRAL="CUSTOMER_REFERRAL",t.SALES="SALES",t.ADVERTISING="ADVERTISING",t.FRIEND="FRIEND",t.OTHER="OTHER",t))(N||{}),x=(e=>(e.COMPANY="COMPANY",e.CONTACT="CONTACT",e))(x||{}),I=(t=>(t.NEW="NEW",t.ASSIGNED="ASSIGNED",t.IN_NEGOTIATION="IN_NEGOTIATION",t.ON_HOLD="ON_HOLD",t.WON="WON",t.LOOSE="LOOSE",t.CANCELLED="CANCELLED",t.DRAFT="DRAFT",t.WAITING="WAITING",t))(I||{});0&&(module.exports={DISCOUNT_UNIT,GENDER,INVOICE_STATUS,LEAD_SOURCE,LEAD_STATUS,LEAD_TYPE,PAYMENT_TYPE,QUOTE_INVOICE_CATEGORY,QUOTE_INVOICE_MODE,QUOTE_STATUS});
@@ -0,0 +1,3 @@
1
+ export { BaseEntity, LS_KEYS } from './common.js';
2
+ export { AppUserBE, BankBE, BranchBE, CompanyBE, ContactBE, CurrencyBE, CustomerBE, DISCOUNT_UNIT, ExpenseBE, ExpenseCategoryBE, GENDER, INVOICE_STATUS, LEAD_SOURCE, LEAD_STATUS, LEAD_TYPE, LeadBE, MenuOrderBE, PAYMENT_TYPE, PaymentBE, PaymentModeBE, PreferenceBE, ProductBE, ProductCategoryBE, ProfileBE, QUOTE_INVOICE_CATEGORY, QUOTE_INVOICE_MODE, QUOTE_STATUS, QuoteInvoiceBE, QuotesInvoicesOnStellarProducts, RequestFormBE, ServiceBE, TaxBE } from './erp.js';
3
+ export { POSCategoryBE, POSCustomerBE, POSDiscountBE, POSOrderBE, POSOrderItemBE, POSPaymentBE, POSProductBE, POSProductVariantBE, POSRegisterBE, POSReservationBE, POSShiftBE, POSStoreBE, POSTableBE, POSTaxBE, POS_DISCOUNT_TYPE, POS_ORDER_STATUS, POS_PAYMENT_METHOD_TYPE, POS_PAYMENT_STATUS, POS_REGISTER_STATUS, POS_RESERVATION_STATUS, POS_SHIFT_STATUS, POS_TABLE_STATUS, POS_TAX_TYPE } from './pos.js';
@@ -0,0 +1 @@
1
+ var a=Object.defineProperty;var b=Object.getOwnPropertyDescriptor;var c=Object.getOwnPropertyNames;var d=Object.prototype.hasOwnProperty;var t=(f,r,p,x)=>{if(r&&typeof r=="object"||typeof r=="function")for(let m of c(r))!d.call(f,m)&&m!==p&&a(f,m,{get:()=>r[m],enumerable:!(x=b(r,m))||x.enumerable});return f},e=(f,r,p)=>(t(f,r,"default"),p&&t(p,r,"default"));var g=f=>t(a({},"__esModule",{value:!0}),f);var o={};module.exports=g(o);e(o,require("./common"),module.exports);e(o,require("./erp"),module.exports);e(o,require("./pos"),module.exports);0&&(module.exports={...require("./common"),...require("./erp"),...require("./pos")});