@acorex/core 16.0.2 → 17.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (311) hide show
  1. package/common/README.md +3 -0
  2. package/common/countries/countries.data.d.ts +2 -0
  3. package/common/countries/country.d.ts +13 -0
  4. package/common/index.d.ts +2 -0
  5. package/config/README.md +3 -0
  6. package/config/index.d.ts +2 -0
  7. package/config/lib/configs.d.ts +6 -0
  8. package/config/lib/configs.service.d.ts +12 -0
  9. package/date-time/README.md +3 -0
  10. package/date-time/index.d.ts +10 -0
  11. package/date-time/lib/calendar.service.d.ts +27 -0
  12. package/date-time/lib/dateTime.config.d.ts +12 -0
  13. package/date-time/lib/datetime.class.d.ts +138 -0
  14. package/date-time/lib/datetime.module.d.ts +8 -0
  15. package/date-time/lib/datetime.pipe.d.ts +12 -0
  16. package/date-time/lib/formatters/datetime-formatter.d.ts +19 -0
  17. package/date-time/lib/formatters/timeleft-formatter.d.ts +16 -0
  18. package/date-time/lib/georgian.calendar.d.ts +21 -0
  19. package/date-time/lib/holidays.loader.d.ts +21 -0
  20. package/date-time/lib/jalali.calendar.d.ts +40 -0
  21. package/esm2022/common/acorex-core-common.mjs +5 -0
  22. package/esm2022/common/countries/countries.data.mjs +2625 -0
  23. package/esm2022/common/countries/country.mjs +2 -0
  24. package/esm2022/common/index.mjs +3 -0
  25. package/esm2022/config/acorex-core-config.mjs +5 -0
  26. package/esm2022/config/index.mjs +3 -0
  27. package/esm2022/config/lib/configs.mjs +7 -0
  28. package/esm2022/config/lib/configs.service.mjs +27 -0
  29. package/esm2022/date-time/acorex-core-date-time.mjs +5 -0
  30. package/esm2022/date-time/index.mjs +11 -0
  31. package/esm2022/date-time/lib/calendar.service.mjs +100 -0
  32. package/esm2022/date-time/lib/dateTime.config.mjs +50 -0
  33. package/esm2022/date-time/lib/datetime.class.mjs +337 -0
  34. package/esm2022/date-time/lib/datetime.module.mjs +27 -0
  35. package/esm2022/date-time/lib/datetime.pipe.mjs +29 -0
  36. package/esm2022/date-time/lib/formatters/datetime-formatter.mjs +32 -0
  37. package/esm2022/date-time/lib/formatters/timeleft-formatter.mjs +91 -0
  38. package/esm2022/date-time/lib/georgian.calendar.mjs +203 -0
  39. package/esm2022/date-time/lib/holidays.loader.mjs +13 -0
  40. package/esm2022/date-time/lib/jalali.calendar.mjs +440 -0
  41. package/esm2022/events/acorex-core-events.mjs +5 -0
  42. package/esm2022/events/index.mjs +3 -0
  43. package/esm2022/events/lib/event.service.mjs +43 -0
  44. package/esm2022/events/lib/event.type.mjs +6 -0
  45. package/esm2022/file/acorex-core-file.mjs +5 -0
  46. package/esm2022/file/index.mjs +7 -0
  47. package/esm2022/file/lib/file-download-ref.class.mjs +12 -0
  48. package/esm2022/file/lib/file-download-result.class.mjs +45 -0
  49. package/esm2022/file/lib/file-size-formatter.mjs +24 -0
  50. package/esm2022/file/lib/file-upload-ref.class.mjs +12 -0
  51. package/esm2022/file/lib/file.module.mjs +20 -0
  52. package/esm2022/file/lib/file.service.mjs +103 -0
  53. package/esm2022/format/acorex-core-format.mjs +5 -0
  54. package/esm2022/format/index.mjs +8 -0
  55. package/esm2022/format/lib/format.config.mjs +3 -0
  56. package/esm2022/format/lib/format.module.mjs +64 -0
  57. package/esm2022/format/lib/format.pipe.mjs +37 -0
  58. package/esm2022/format/lib/format.service.mjs +95 -0
  59. package/esm2022/format/lib/format.types.mjs +2 -0
  60. package/esm2022/format/lib/formatters/number-formatter.mjs +74 -0
  61. package/esm2022/format/lib/formatters/string-formatter.mjs +15 -0
  62. package/esm2022/image/acorex-core-image.mjs +5 -0
  63. package/esm2022/image/index.mjs +2 -0
  64. package/esm2022/image/lib/image.service.mjs +43 -0
  65. package/esm2022/index.mjs +2 -44
  66. package/esm2022/memorize/acorex-core-memorize.mjs +5 -0
  67. package/esm2022/memorize/index.mjs +2 -0
  68. package/esm2022/memorize/lib/memorize.decorator.mjs +19 -0
  69. package/esm2022/pipes/acorex-core-pipes.mjs +5 -0
  70. package/esm2022/pipes/index.mjs +2 -0
  71. package/esm2022/pipes/lib/safe/safe.pipe.mjs +38 -0
  72. package/esm2022/platform/acorex-core-platform.mjs +5 -0
  73. package/esm2022/platform/index.mjs +2 -0
  74. package/esm2022/platform/lib/platform.service.mjs +225 -0
  75. package/esm2022/storage/acorex-core-storage.mjs +5 -0
  76. package/esm2022/storage/cookie-storage.service.mjs +202 -0
  77. package/esm2022/storage/index.mjs +5 -0
  78. package/esm2022/storage/local-storage.service.mjs +58 -0
  79. package/esm2022/storage/session-storage.service.mjs +22 -0
  80. package/esm2022/storage/storage.interface.mjs +2 -0
  81. package/esm2022/translation/acorex-core-translation.mjs +5 -0
  82. package/esm2022/translation/index.mjs +9 -0
  83. package/esm2022/translation/lib/translation-scope.resolver.mjs +11 -0
  84. package/esm2022/translation/lib/translation.config.mjs +20 -0
  85. package/esm2022/translation/lib/translation.loader.mjs +14 -0
  86. package/esm2022/translation/lib/translation.module.mjs +40 -0
  87. package/esm2022/translation/lib/translation.service.mjs +173 -0
  88. package/esm2022/translation/lib/translation.types.mjs +2 -0
  89. package/esm2022/translation/lib/translator.directive.mjs +28 -0
  90. package/esm2022/translation/lib/translator.pipe.mjs +23 -0
  91. package/esm2022/types/acorex-core-types.mjs +5 -0
  92. package/esm2022/types/index.mjs +2 -0
  93. package/esm2022/utils/acorex-core-utils.mjs +5 -0
  94. package/esm2022/utils/index.mjs +6 -0
  95. package/esm2022/utils/lib/auto-unsubscribe.mjs +36 -0
  96. package/esm2022/utils/lib/color-util.mjs +111 -0
  97. package/esm2022/utils/lib/drawing-util.mjs +35 -0
  98. package/esm2022/utils/lib/html-util.mjs +39 -0
  99. package/esm2022/utils/lib/string-util.mjs +19 -0
  100. package/esm2022/validation/acorex-core-validation.mjs +5 -0
  101. package/esm2022/validation/index.mjs +18 -0
  102. package/esm2022/validation/lib/rules/between-rule.mjs +31 -0
  103. package/esm2022/validation/lib/rules/callback-rule.mjs +29 -0
  104. package/esm2022/validation/lib/rules/equal-rule.mjs +26 -0
  105. package/esm2022/validation/lib/rules/greater-than.mjs +29 -0
  106. package/esm2022/validation/lib/rules/length-rule.mjs +26 -0
  107. package/esm2022/validation/lib/rules/less-than-rule.mjs +29 -0
  108. package/esm2022/validation/lib/rules/maxlength-rule.mjs +27 -0
  109. package/esm2022/validation/lib/rules/minlength-rule.mjs +26 -0
  110. package/esm2022/validation/lib/rules/regex-rule.mjs +49 -0
  111. package/esm2022/validation/lib/rules/required-rule.mjs +36 -0
  112. package/esm2022/validation/lib/validation.config.mjs +33 -0
  113. package/esm2022/validation/lib/validation.module.mjs +84 -0
  114. package/esm2022/validation/lib/validation.service.mjs +98 -0
  115. package/esm2022/validation/lib/validation.types.mjs +3 -0
  116. package/events/README.md +3 -0
  117. package/events/index.d.ts +2 -0
  118. package/{lib/services → events/lib}/event.service.d.ts +8 -0
  119. package/events/lib/event.type.d.ts +5 -0
  120. package/fesm2022/acorex-core-common.mjs +2631 -0
  121. package/fesm2022/acorex-core-common.mjs.map +1 -0
  122. package/fesm2022/acorex-core-config.mjs +39 -0
  123. package/fesm2022/acorex-core-config.mjs.map +1 -0
  124. package/fesm2022/acorex-core-date-time.mjs +1305 -0
  125. package/fesm2022/acorex-core-date-time.mjs.map +1 -0
  126. package/fesm2022/acorex-core-events.mjs +56 -0
  127. package/fesm2022/acorex-core-events.mjs.map +1 -0
  128. package/fesm2022/acorex-core-file.mjs +214 -0
  129. package/fesm2022/acorex-core-file.mjs.map +1 -0
  130. package/fesm2022/acorex-core-format.mjs +282 -0
  131. package/fesm2022/acorex-core-format.mjs.map +1 -0
  132. package/fesm2022/acorex-core-image.mjs +50 -0
  133. package/fesm2022/acorex-core-image.mjs.map +1 -0
  134. package/fesm2022/acorex-core-memorize.mjs +26 -0
  135. package/fesm2022/acorex-core-memorize.mjs.map +1 -0
  136. package/fesm2022/acorex-core-pipes.mjs +44 -0
  137. package/fesm2022/acorex-core-pipes.mjs.map +1 -0
  138. package/fesm2022/acorex-core-platform.mjs +232 -0
  139. package/fesm2022/acorex-core-platform.mjs.map +1 -0
  140. package/fesm2022/acorex-core-storage.mjs +285 -0
  141. package/fesm2022/acorex-core-storage.mjs.map +1 -0
  142. package/fesm2022/acorex-core-translation.mjs +293 -0
  143. package/fesm2022/acorex-core-translation.mjs.map +1 -0
  144. package/fesm2022/acorex-core-types.mjs +6 -0
  145. package/fesm2022/acorex-core-types.mjs.map +1 -0
  146. package/fesm2022/acorex-core-utils.mjs +247 -0
  147. package/fesm2022/acorex-core-utils.mjs.map +1 -0
  148. package/fesm2022/acorex-core-validation.mjs +488 -0
  149. package/fesm2022/acorex-core-validation.mjs.map +1 -0
  150. package/fesm2022/acorex-core.mjs +2 -2309
  151. package/fesm2022/acorex-core.mjs.map +1 -1
  152. package/file/README.md +3 -0
  153. package/file/index.d.ts +6 -0
  154. package/file/lib/file-download-ref.class.d.ts +6 -0
  155. package/file/lib/file-download-result.class.d.ts +8 -0
  156. package/file/lib/file-size-formatter.d.ts +16 -0
  157. package/file/lib/file-upload-ref.class.d.ts +5 -0
  158. package/file/lib/file.module.d.ts +7 -0
  159. package/file/lib/file.service.d.ts +18 -0
  160. package/format/README.md +3 -0
  161. package/format/index.d.ts +7 -0
  162. package/format/lib/format.config.d.ts +5 -0
  163. package/format/lib/format.module.d.ts +18 -0
  164. package/format/lib/format.pipe.d.ts +12 -0
  165. package/format/lib/format.service.d.ts +43 -0
  166. package/format/lib/format.types.d.ts +4 -0
  167. package/format/lib/formatters/number-formatter.d.ts +23 -0
  168. package/format/lib/formatters/string-formatter.d.ts +14 -0
  169. package/image/README.md +3 -0
  170. package/image/index.d.ts +1 -0
  171. package/image/lib/image.service.d.ts +11 -0
  172. package/index.d.ts +1 -43
  173. package/memorize/README.md +3 -0
  174. package/memorize/index.d.ts +1 -0
  175. package/memorize/lib/memorize.decorator.d.ts +1 -0
  176. package/package.json +98 -5
  177. package/pipes/README.md +3 -0
  178. package/pipes/index.d.ts +1 -0
  179. package/pipes/lib/safe/safe.pipe.d.ts +10 -0
  180. package/platform/README.md +3 -0
  181. package/platform/index.d.ts +1 -0
  182. package/{lib/platform → platform/lib}/platform.service.d.ts +14 -6
  183. package/storage/README.md +3 -0
  184. package/storage/cookie-storage.service.d.ts +104 -0
  185. package/storage/index.d.ts +4 -0
  186. package/storage/local-storage.service.d.ts +16 -0
  187. package/storage/session-storage.service.d.ts +10 -0
  188. package/storage/storage.interface.d.ts +14 -0
  189. package/translation/README.md +3 -0
  190. package/translation/index.d.ts +8 -0
  191. package/translation/lib/translation-scope.resolver.d.ts +2 -0
  192. package/translation/lib/translation.config.d.ts +14 -0
  193. package/translation/lib/translation.loader.d.ts +14 -0
  194. package/translation/lib/translation.module.d.ts +8 -0
  195. package/translation/lib/translation.service.d.ts +31 -0
  196. package/translation/lib/translation.types.d.ts +10 -0
  197. package/translation/lib/translator.directive.d.ts +12 -0
  198. package/translation/lib/translator.pipe.d.ts +12 -0
  199. package/types/README.md +3 -0
  200. package/types/index.d.ts +2 -0
  201. package/utils/README.md +3 -0
  202. package/utils/index.d.ts +5 -0
  203. package/utils/lib/auto-unsubscribe.d.ts +12 -0
  204. package/utils/lib/color-util.d.ts +24 -0
  205. package/utils/lib/drawing-util.d.ts +18 -0
  206. package/utils/lib/html-util.d.ts +5 -0
  207. package/utils/lib/string-util.d.ts +6 -0
  208. package/validation/README.md +3 -0
  209. package/validation/index.d.ts +14 -0
  210. package/validation/lib/rules/between-rule.d.ts +18 -0
  211. package/validation/lib/rules/callback-rule.d.ts +23 -0
  212. package/validation/lib/rules/equal-rule.d.ts +17 -0
  213. package/validation/lib/rules/greater-than.d.ts +17 -0
  214. package/validation/lib/rules/length-rule.d.ts +17 -0
  215. package/validation/lib/rules/less-than-rule.d.ts +17 -0
  216. package/validation/lib/rules/maxlength-rule.d.ts +16 -0
  217. package/validation/lib/rules/minlength-rule.d.ts +16 -0
  218. package/validation/lib/rules/regex-rule.d.ts +17 -0
  219. package/validation/lib/rules/required-rule.d.ts +16 -0
  220. package/validation/lib/validation.config.d.ts +15 -0
  221. package/validation/lib/validation.module.d.ts +17 -0
  222. package/validation/lib/validation.service.d.ts +35 -0
  223. package/validation/lib/validation.types.d.ts +21 -0
  224. package/esm2022/lib/classes/base-page.class.mjs +0 -26
  225. package/esm2022/lib/classes/color.class.mjs +0 -49
  226. package/esm2022/lib/classes/datetime.class.mjs +0 -323
  227. package/esm2022/lib/classes/menu.class.mjs +0 -35
  228. package/esm2022/lib/classes/navigator.class.mjs +0 -2
  229. package/esm2022/lib/classes/popup.class.mjs +0 -2
  230. package/esm2022/lib/classes/promise.class.mjs +0 -21
  231. package/esm2022/lib/classes/sectionlist.class.mjs +0 -2
  232. package/esm2022/lib/classes/select.class.mjs +0 -8
  233. package/esm2022/lib/core.module.mjs +0 -27
  234. package/esm2022/lib/error/error.class.mjs +0 -2
  235. package/esm2022/lib/error/error.module.mjs +0 -19
  236. package/esm2022/lib/error/error.service.mjs +0 -22
  237. package/esm2022/lib/events/keyboard.mjs +0 -2
  238. package/esm2022/lib/http/http-error.class.mjs +0 -2
  239. package/esm2022/lib/http/http-events.interceptor.mjs +0 -3
  240. package/esm2022/lib/http/http-request.class.mjs +0 -2
  241. package/esm2022/lib/http/http-result.class.mjs +0 -25
  242. package/esm2022/lib/http/http.module.mjs +0 -35
  243. package/esm2022/lib/http/http.service.mjs +0 -148
  244. package/esm2022/lib/locale/en.json +0 -255
  245. package/esm2022/lib/locale/fa.json +0 -245
  246. package/esm2022/lib/pipe/datetime.pipe.mjs +0 -25
  247. package/esm2022/lib/pipe/htmlToText.pipe.mjs +0 -25
  248. package/esm2022/lib/platform/index.mjs +0 -2
  249. package/esm2022/lib/platform/platform.service.mjs +0 -152
  250. package/esm2022/lib/services/config.mjs +0 -29
  251. package/esm2022/lib/services/event.service.mjs +0 -34
  252. package/esm2022/lib/services/navigator.service.mjs +0 -10
  253. package/esm2022/lib/services/storage.service.mjs +0 -16
  254. package/esm2022/lib/translator/translator.mjs +0 -26
  255. package/esm2022/lib/translator/translator.module.mjs +0 -25
  256. package/esm2022/lib/translator/translator.pipe.mjs +0 -24
  257. package/esm2022/lib/translator/translator.service.mjs +0 -21
  258. package/esm2022/lib/utils/array/array-util.mjs +0 -133
  259. package/esm2022/lib/utils/html/html-util.mjs +0 -200
  260. package/esm2022/lib/utils/html/html.module.mjs +0 -19
  261. package/esm2022/lib/utils/math/math-util.mjs +0 -6
  262. package/esm2022/lib/utils/object/object-util.mjs +0 -83
  263. package/esm2022/lib/utils/render/on-demand-preload-strategy.service.mjs +0 -21
  264. package/esm2022/lib/utils/render/render.service.mjs +0 -109
  265. package/esm2022/lib/utils/render/rendering.module.mjs +0 -35
  266. package/esm2022/lib/utils/scroll/scroll.directive.mjs +0 -56
  267. package/esm2022/lib/utils/scroll/scroll.module.mjs +0 -19
  268. package/esm2022/lib/utils/separator/separator.module.mjs +0 -19
  269. package/esm2022/lib/utils/separator/separator.pipe.mjs +0 -33
  270. package/lib/classes/base-page.class.d.ts +0 -13
  271. package/lib/classes/color.class.d.ts +0 -17
  272. package/lib/classes/datetime.class.d.ts +0 -63
  273. package/lib/classes/menu.class.d.ts +0 -34
  274. package/lib/classes/navigator.class.d.ts +0 -5
  275. package/lib/classes/popup.class.d.ts +0 -12
  276. package/lib/classes/promise.class.d.ts +0 -7
  277. package/lib/classes/sectionlist.class.d.ts +0 -8
  278. package/lib/classes/select.class.d.ts +0 -7
  279. package/lib/core.module.d.ts +0 -9
  280. package/lib/error/error.class.d.ts +0 -4
  281. package/lib/error/error.module.d.ts +0 -7
  282. package/lib/error/error.service.d.ts +0 -13
  283. package/lib/events/keyboard.d.ts +0 -2
  284. package/lib/http/http-error.class.d.ts +0 -7
  285. package/lib/http/http-events.interceptor.d.ts +0 -10
  286. package/lib/http/http-request.class.d.ts +0 -14
  287. package/lib/http/http-result.class.d.ts +0 -11
  288. package/lib/http/http.module.d.ts +0 -10
  289. package/lib/http/http.service.d.ts +0 -23
  290. package/lib/pipe/datetime.pipe.d.ts +0 -8
  291. package/lib/pipe/htmlToText.pipe.d.ts +0 -7
  292. package/lib/platform/index.d.ts +0 -1
  293. package/lib/services/config.d.ts +0 -9
  294. package/lib/services/navigator.service.d.ts +0 -8
  295. package/lib/services/storage.service.d.ts +0 -7
  296. package/lib/translator/translator.d.ts +0 -9
  297. package/lib/translator/translator.module.d.ts +0 -8
  298. package/lib/translator/translator.pipe.d.ts +0 -8
  299. package/lib/translator/translator.service.d.ts +0 -8
  300. package/lib/utils/array/array-util.d.ts +0 -6
  301. package/lib/utils/html/html-util.d.ts +0 -62
  302. package/lib/utils/html/html.module.d.ts +0 -8
  303. package/lib/utils/math/math-util.d.ts +0 -3
  304. package/lib/utils/object/object-util.d.ts +0 -7
  305. package/lib/utils/render/on-demand-preload-strategy.service.d.ts +0 -10
  306. package/lib/utils/render/render.service.d.ts +0 -18
  307. package/lib/utils/render/rendering.module.d.ts +0 -8
  308. package/lib/utils/scroll/scroll.directive.d.ts +0 -18
  309. package/lib/utils/scroll/scroll.module.d.ts +0 -8
  310. package/lib/utils/separator/separator.module.d.ts +0 -8
  311. package/lib/utils/separator/separator.pipe.d.ts +0 -8
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY291bnRyeS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9jb21tb24vc3JjL2NvdW50cmllcy9jb3VudHJ5LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiIiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgaW50ZXJmYWNlIENvdW50cnlJdGVtIHtcbiAgbmFtZTogc3RyaW5nO1xuICByZWdpb25zOiBzdHJpbmdbXTtcbiAgaXNvMmNvZGU6IHN0cmluZztcbiAgY29kZTogc3RyaW5nO1xuICBmb3JtYXQ6IHN0cmluZztcbiAgb3JkZXJQcmlvcml0eT86IG51bWJlcjtcbiAgYXJlYUNvZGVzPzogc3RyaW5nW107XG4gIGJrUG9zaXRpb24/OiB7IHg6IHN0cmluZzsgeTogc3RyaW5nIH07XG59XG4iXX0=
@@ -0,0 +1,3 @@
1
+ export * from './countries/countries.data';
2
+ export * from './countries/country';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvY29tbW9uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLDRCQUE0QixDQUFDO0FBQzNDLGNBQWMscUJBQXFCLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL2NvdW50cmllcy9jb3VudHJpZXMuZGF0YSc7XG5leHBvcnQgKiBmcm9tICcuL2NvdW50cmllcy9jb3VudHJ5JztcbiJdfQ==
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2NvbmZpZy9zcmMvYWNvcmV4LWNvcmUtY29uZmlnLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,3 @@
1
+ export * from './lib/configs';
2
+ export * from './lib/configs.service';
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvY29uZmlnL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLGVBQWUsQ0FBQztBQUM5QixjQUFjLHVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvY29uZmlncyc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9jb25maWdzLnNlcnZpY2UnO1xuIl19
@@ -0,0 +1,7 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export const AXGlobalDefaultConfig = {};
3
+ export const AX_GLOBAL_CONFIG = new InjectionToken('AX_GLOBAL_CONFIG', {
4
+ providedIn: 'root',
5
+ factory: () => AXGlobalDefaultConfig,
6
+ });
7
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uZmlncy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9jb25maWcvc3JjL2xpYi9jb25maWdzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxjQUFjLEVBQUUsTUFBTSxlQUFlLENBQUM7QUFNL0MsTUFBTSxDQUFDLE1BQU0scUJBQXFCLEdBQW1CLEVBQUUsQ0FBQztBQUV4RCxNQUFNLENBQUMsTUFBTSxnQkFBZ0IsR0FBRyxJQUFJLGNBQWMsQ0FDaEQsa0JBQWtCLEVBQ2xCO0lBQ0UsVUFBVSxFQUFFLE1BQU07SUFDbEIsT0FBTyxFQUFFLEdBQUcsRUFBRSxDQUFDLHFCQUFxQjtDQUNyQyxDQUNGLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBJbmplY3Rpb25Ub2tlbiB9IGZyb20gJ0Bhbmd1bGFyL2NvcmUnO1xuXG5leHBvcnQgdHlwZSBBWEdsb2JhbENvbmZpZyA9IHtcbiAgW2tleTogc3RyaW5nXTogdW5rbm93bjtcbn07XG5cbmV4cG9ydCBjb25zdCBBWEdsb2JhbERlZmF1bHRDb25maWc6IEFYR2xvYmFsQ29uZmlnID0ge307XG5cbmV4cG9ydCBjb25zdCBBWF9HTE9CQUxfQ09ORklHID0gbmV3IEluamVjdGlvblRva2VuPEFYR2xvYmFsQ29uZmlnPihcbiAgJ0FYX0dMT0JBTF9DT05GSUcnLFxuICB7XG4gICAgcHJvdmlkZWRJbjogJ3Jvb3QnLFxuICAgIGZhY3Rvcnk6ICgpID0+IEFYR2xvYmFsRGVmYXVsdENvbmZpZyxcbiAgfVxuKTtcbiJdfQ==
@@ -0,0 +1,27 @@
1
+ import { Injectable, Injector } from '@angular/core';
2
+ import { get } from 'lodash-es';
3
+ import { AX_GLOBAL_CONFIG } from './configs';
4
+ import * as i0 from "@angular/core";
5
+ export class AXConfigService {
6
+ /**
7
+ * @ignore
8
+ */
9
+ constructor(injector) {
10
+ this.injector = injector;
11
+ }
12
+ get(key, defaultValue) {
13
+ const v1 = this.injector.get(AX_GLOBAL_CONFIG);
14
+ const parts = key.split('.');
15
+ const tokenName = parts.slice(0, parts.length - 1).join('.');
16
+ const providerToken = get(v1, tokenName);
17
+ const v2 = this.injector.get(providerToken);
18
+ return get(v2, parts[parts.length - 1], defaultValue);
19
+ }
20
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXConfigService, deps: [{ token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
21
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXConfigService, providedIn: 'root' }); }
22
+ }
23
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXConfigService, decorators: [{
24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VG9rZW4gPSBnZXQodjEsIHRva2VuTmFtZSk7XG4gICAgY29uc3QgdjIgPSB0aGlzLmluamVjdG9yLmdldChwcm92aWRlclRva2VuIGFzIEluamVjdGlvblRva2VuPHVua25vd24+KTtcbiAgICByZXR1cm4gZ2V0KHYyLCBwYXJ0c1twYXJ0cy5sZW5ndGggLSAxXSwgZGVmYXVsdFZhbHVlKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtZGF0ZS10aW1lLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2RhdGUtdGltZS9zcmMvYWNvcmV4LWNvcmUtZGF0ZS10aW1lLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19
@@ -0,0 +1,11 @@
1
+ export * from './lib/formatters/datetime-formatter';
2
+ export * from './lib/formatters/timeleft-formatter';
3
+ export * from './lib/calendar.service';
4
+ export * from './lib/dateTime.config';
5
+ export * from './lib/datetime.class';
6
+ export * from './lib/datetime.module';
7
+ export * from './lib/datetime.pipe';
8
+ export * from './lib/georgian.calendar';
9
+ export * from './lib/holidays.loader';
10
+ export * from './lib/jalali.calendar';
11
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvZGF0ZS10aW1lL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxjQUFjLHFDQUFxQyxDQUFDO0FBQ3BELGNBQWMscUNBQXFDLENBQUM7QUFDcEQsY0FBYyx3QkFBd0IsQ0FBQztBQUN2QyxjQUFjLHVCQUF1QixDQUFDO0FBQ3RDLGNBQWMsc0JBQXNCLENBQUM7QUFDckMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHFCQUFxQixDQUFDO0FBQ3BDLGNBQWMseUJBQXlCLENBQUM7QUFDeEMsY0FBYyx1QkFBdUIsQ0FBQztBQUN0QyxjQUFjLHVCQUF1QixDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiZXhwb3J0ICogZnJvbSAnLi9saWIvZm9ybWF0dGVycy9kYXRldGltZS1mb3JtYXR0ZXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZm9ybWF0dGVycy90aW1lbGVmdC1mb3JtYXR0ZXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvY2FsZW5kYXIuc2VydmljZSc7XG5leHBvcnQgKiBmcm9tICcuL2xpYi9kYXRlVGltZS5jb25maWcnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGF0ZXRpbWUuY2xhc3MnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZGF0ZXRpbWUubW9kdWxlJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2RhdGV0aW1lLnBpcGUnO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvZ2VvcmdpYW4uY2FsZW5kYXInO1xuZXhwb3J0ICogZnJvbSAnLi9saWIvaG9saWRheXMubG9hZGVyJztcbmV4cG9ydCAqIGZyb20gJy4vbGliL2phbGFsaS5jYWxlbmRhcic7XG4iXX0=
@@ -0,0 +1,100 @@
1
+ import { Injectable, inject } from '@angular/core';
2
+ import { BehaviorSubject, Subject } from 'rxjs';
3
+ import { AX_DATETIME_CONFIG } from './dateTime.config';
4
+ import { AXDateTime } from './datetime.class';
5
+ import { AX_DATETIME_HOLIDAYS_LOADER, } from './holidays.loader';
6
+ import { AXEventService, AXEventTypes } from '@acorex/core/events';
7
+ import * as i0 from "@angular/core";
8
+ export class AXCalendarService {
9
+ get calendar() {
10
+ return this.getActiveCalendar();
11
+ }
12
+ getDefaultCalendar() {
13
+ return this.config.calendars[this.config.calendar];
14
+ }
15
+ getActiveCalendar() {
16
+ return this.activeCalendar.getValue();
17
+ }
18
+ setActiveCalendar(name) {
19
+ if (name != this.calendar.name()) {
20
+ const calendar = this.resolveCalendar(name);
21
+ this.activeCalendar.next(calendar);
22
+ this.eventService.emitEvent({
23
+ type: AXEventTypes.AXCalendarChanged,
24
+ payload: this.getActiveCalendar(),
25
+ });
26
+ }
27
+ }
28
+ get holidays() {
29
+ return this._holidays;
30
+ }
31
+ constructor() {
32
+ this.config = inject(AX_DATETIME_CONFIG);
33
+ this._holidaysLoader = inject(AX_DATETIME_HOLIDAYS_LOADER);
34
+ this.eventService = inject(AXEventService);
35
+ this.activeCalendar = new BehaviorSubject(this.getDefaultCalendar());
36
+ this.calendarChanges$ = this.activeCalendar.asObservable();
37
+ this.onHolidaysChanged = new Subject();
38
+ this._holidays = [];
39
+ this.loadHolidays();
40
+ }
41
+ loadHolidays(options) {
42
+ return this._holidaysLoader.getHolidays(options).then((value) => {
43
+ this._holidays = value;
44
+ this.onHolidaysChanged.next(this._holidays);
45
+ });
46
+ }
47
+ create(value, calendarName) {
48
+ const calendar = calendarName
49
+ ? this.resolveCalendar(calendarName)
50
+ : this.calendar;
51
+ if (value instanceof Date) {
52
+ return new AXDateTime(value, calendar);
53
+ }
54
+ else if (value?.year && value?.month) {
55
+ return calendar.create(value);
56
+ }
57
+ return this.now();
58
+ }
59
+ now(calendarName) {
60
+ const calendar = calendarName
61
+ ? this.resolveCalendar(calendarName)
62
+ : this.calendar;
63
+ return new AXDateTime(new Date(), calendar);
64
+ }
65
+ resolveCalendar(name) {
66
+ const c = this.config.calendars[name];
67
+ if (!c) {
68
+ console.error(`"${name}" is not a valid calendar name!`);
69
+ return this.calendar;
70
+ }
71
+ return c;
72
+ }
73
+ convert(value, calendarName) {
74
+ const isISOString = (str) => {
75
+ if (!/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(.\d{3}Z)?/.test(str))
76
+ return false;
77
+ const d = new Date(str);
78
+ return d instanceof Date && !isNaN(d.getTime()); // valid date
79
+ };
80
+ //
81
+ const calendar = calendarName
82
+ ? this.resolveCalendar(calendarName)
83
+ : this.calendar;
84
+ if (typeof value === 'string') {
85
+ if (isISOString(value))
86
+ return new AXDateTime(new Date(value), calendar);
87
+ else
88
+ return calendar.parse(value);
89
+ }
90
+ const date = value instanceof AXDateTime ? value.date : value;
91
+ return new AXDateTime(date, calendar);
92
+ }
93
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXCalendarService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
94
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXCalendarService, providedIn: 'root' }); }
95
+ }
96
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.2", ngImport: i0, type: AXCalendarService, decorators: [{
97
+ type: Injectable,
98
+ args: [{ providedIn: 'root' }]
99
+ }], ctorParameters: () => [] });
100
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY2FsZW5kYXIuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9kYXRlLXRpbWUvc3JjL2xpYi9jYWxlbmRhci5zZXJ2aWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSxFQUFFLE1BQU0sZUF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7M31aKT8vLnRlc3Qoc3RyKSlcbiAgICAgICAgcmV0dXJuIGZhbHNlO1xuICAgICAgY29uc3QgZCA9IG5ldyBEYXRlKHN0cik7XG4gICAgICByZXR1cm4gZCBpbnN0YW5jZW9mIERhdGUgJiYgIWlzTmFOKGQuZ2V0VGltZSgpKTsgLy8gdmFsaWQgZGF0ZVxuICAgIH07XG4gICAgLy9cbiAgICBjb25zdCBjYWxlbmRhciA9IGNhbGVuZGFyTmFtZVxuICAgICAgPyB0aGlzLnJlc29sdmVDYWxlbmRhcihjYWxlbmRhck5hbWUpXG4gICAgICA6IHRoaXMuY2FsZW5kYXI7XG4gICAgaWYgKHR5cGVvZiB2YWx1ZSA9PT0gJ3N0cmluZycpIHtcbiAgICAgIGlmIChpc0lTT1N0cmluZyh2YWx1ZSkpIHJldHVybiBuZXcgQVhEYXRlVGltZShuZXcgRGF0ZSh2YWx1ZSksIGNhbGVuZGFyKTtcbiAgICAgIGVsc2UgcmV0dXJuIGNhbGVuZGFyLnBhcnNlKHZhbHVlKTtcbiAgICB9XG4gICAgY29uc3QgZGF0ZSA9IHZhbHVlIGluc3RhbmNlb2YgQVhEYXRlVGltZSA/IHZhbHVlLmRhdGUgOiAodmFsdWUgYXMgRGF0ZSk7XG4gICAgcmV0dXJuIG5ldyBBWERhdGVUaW1lKGRhdGUsIGNhbGVuZGFyKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,50 @@
1
+ import { AX_GLOBAL_CONFIG } from '@acorex/core/config';
2
+ import { InjectionToken, inject } from '@angular/core';
3
+ import { set } from 'lodash-es';
4
+ import { GeorgianCalendar } from './georgian.calendar';
5
+ import { JalaliCalendar } from './jalali.calendar';
6
+ export const AX_DATETIME_CONFIG = new InjectionToken('AX_DATETIME_CONFIG', {
7
+ providedIn: 'root',
8
+ factory: () => {
9
+ const global = inject(AX_GLOBAL_CONFIG);
10
+ set(global, 'dateTime', AX_DATETIME_CONFIG);
11
+ return AXDateTimeDefaultConfig;
12
+ },
13
+ });
14
+ export const AXDateTimeDefaultConfig = {
15
+ calendar: 'georgian',
16
+ calendars: {
17
+ georgian: new GeorgianCalendar({
18
+ weekdays: [0, 1, 2, 3, 4, 5, 6],
19
+ weekend: [5, 6],
20
+ formats: {
21
+ dateInput: 'yyyy/MM/dd',
22
+ timeInput: 'HH:mm',
23
+ dateTimeInput: 'yyyy/MM/dd HH:mm',
24
+ dateDisplay: 'DDDD, d MMM yyyy',
25
+ timeDisplay: 'HH:mm',
26
+ dateTimeDisplay: 'DDDD, d MMM yyyy HH:mm',
27
+ },
28
+ }),
29
+ jalali: new JalaliCalendar({
30
+ weekdays: [6, 0, 1, 2, 3, 4, 5],
31
+ weekend: [6],
32
+ formats: {
33
+ dateInput: 'yyyy/MM/dd',
34
+ timeInput: 'HH:mm',
35
+ dateTimeInput: 'yyyy/MM/dd HH:mm',
36
+ dateDisplay: 'DDDD, d MMM yyyy',
37
+ timeDisplay: 'HH:mm',
38
+ dateTimeDisplay: 'DDDD, d MMM yyyy HH:mm',
39
+ },
40
+ }),
41
+ },
42
+ };
43
+ export function dateTimeConfig(config = {}) {
44
+ const result = {
45
+ ...AXDateTimeDefaultConfig,
46
+ ...config,
47
+ };
48
+ return result;
49
+ }
50
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGF0ZVRpbWUuY29uZmlnLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2RhdGUtdGltZS9zcmMvbGliL2RhdGVUaW1lLmNvbmZpZy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsZ0JBQWdCLEVBQUUsTUFBTSxxQkFBcUIsQ0FBQztBQUN2RCxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sRUFBRSxNQUFNLGVBQWUsQ0FBQztBQUN2RCxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0s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