@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,203 @@
1
+ import { AXCalendar, AXDateTime, } from './datetime.class';
2
+ export class GeorgianCalendar extends AXCalendar {
3
+ /**
4
+ * @ignore
5
+ */
6
+ constructor(config) {
7
+ super(config);
8
+ }
9
+ create(value) {
10
+ return new AXDateTime(new Date(value.year, value.month - 1, value.date, value.hours || 0, value.minutes || 0, value.seconds || 0, value.ms || 0), this);
11
+ }
12
+ name() {
13
+ return 'georgian';
14
+ }
15
+ dayOfMonth(date) {
16
+ return date.getDate();
17
+ }
18
+ dayOfYear(date) {
19
+ let result = 0;
20
+ let m = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
21
+ if (this.isLeap(date)) {
22
+ m[1] = 29;
23
+ }
24
+ for (let i = 0; i < date.getMonth(); i++) {
25
+ result = result + m[i];
26
+ }
27
+ result += date.getDate();
28
+ return result;
29
+ }
30
+ dayOfWeek(date) {
31
+ return date.getDay() + 1;
32
+ }
33
+ weekOfYear(date) {
34
+ const firstDay = new AXDateTime(date, this).startOf('year');
35
+ return Math.ceil(((date.getTime() - firstDay.date.getTime()) / 86400000 +
36
+ firstDay.date.getDay() +
37
+ 1) /
38
+ 7);
39
+ }
40
+ year(date) {
41
+ return date.getFullYear();
42
+ }
43
+ monthOfYear(date) {
44
+ return date.getMonth() + 1;
45
+ }
46
+ add(date, unit, amount) {
47
+ let value = date.valueOf();
48
+ switch (unit) {
49
+ case 'second':
50
+ value += 1000 * amount;
51
+ break;
52
+ case 'minute':
53
+ value += 60000 * amount;
54
+ break;
55
+ case 'hour':
56
+ value += 3600000 * amount;
57
+ break;
58
+ case 'month': {
59
+ const v = new Date(value);
60
+ // Calculate the new year and month considering the amount
61
+ let newYear = v.getFullYear();
62
+ let newMonth = v.getMonth() + amount;
63
+ // Adjust for year overflow or underflow
64
+ while (newMonth > 11) {
65
+ newMonth -= 12;
66
+ newYear++;
67
+ }
68
+ while (newMonth < 0) {
69
+ newMonth += 12;
70
+ newYear--;
71
+ }
72
+ // Set the date to the first of the month to prevent overflow
73
+ v.setDate(1);
74
+ v.setFullYear(newYear);
75
+ v.setMonth(newMonth);
76
+ // Get the last day of the new month
77
+ const lastDayOfMonth = new Date(newYear, newMonth + 1, 0).getDate();
78
+ // Set the date to either the original day or the last day of the new month, whichever is smaller
79
+ const originalDay = date.getDate();
80
+ v.setDate(Math.min(originalDay, lastDayOfMonth));
81
+ value = v.valueOf();
82
+ break;
83
+ }
84
+ case 'week':
85
+ value += 7 * 86400000 * amount;
86
+ break;
87
+ case 'year': {
88
+ const newDate = new Date(value);
89
+ newDate.setFullYear(newDate.getFullYear() + amount);
90
+ // Handling for leap years: if the original date is February 29th, and the new year is not a leap year,
91
+ // set the date to February 28th.
92
+ if (date.getMonth() === 1 &&
93
+ date.getDate() === 29 &&
94
+ newDate.getMonth() !== 1) {
95
+ newDate.setMonth(1);
96
+ newDate.setDate(28);
97
+ }
98
+ value = newDate.valueOf();
99
+ break;
100
+ }
101
+ case 'day':
102
+ default:
103
+ value += 86400000 * amount;
104
+ }
105
+ return new AXDateTime(new Date(value), this);
106
+ }
107
+ set(date, unit, value) {
108
+ const clone = new Date(date.valueOf());
109
+ switch (unit) {
110
+ case 'second':
111
+ clone.setHours(clone.getHours(), clone.getMinutes(), value, clone.getMilliseconds());
112
+ break;
113
+ case 'minute':
114
+ clone.setHours(clone.getHours(), value, clone.getSeconds(), clone.getMilliseconds());
115
+ break;
116
+ case 'hour':
117
+ clone.setHours(value, clone.getMinutes(), clone.getSeconds(), clone.getMilliseconds());
118
+ break;
119
+ default:
120
+ case 'day':
121
+ clone.setDate(value);
122
+ break;
123
+ case 'week':
124
+ break;
125
+ case 'month':
126
+ clone.setMonth(Math.max(0, value - 1));
127
+ break;
128
+ case 'year':
129
+ clone.setFullYear(value);
130
+ break;
131
+ }
132
+ return new AXDateTime(clone, this);
133
+ }
134
+ startOf(date, unit) {
135
+ const clone = new Date(date.valueOf());
136
+ switch (unit) {
137
+ case 'second':
138
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 0);
139
+ return new AXDateTime(clone, this);
140
+ case 'minute':
141
+ clone.setHours(clone.getHours(), clone.getMinutes(), 0, 0);
142
+ return new AXDateTime(clone, this);
143
+ case 'hour':
144
+ clone.setHours(clone.getHours(), 0, 0, 0);
145
+ return new AXDateTime(clone, this);
146
+ default:
147
+ case 'day':
148
+ clone.setHours(0, 0, 0, 0);
149
+ return new AXDateTime(clone, this);
150
+ case 'week': {
151
+ const start = 1; // Week starts on Monday
152
+ const day = clone.getDay();
153
+ const diff = clone.getDate() - day + (day == 0 ? -6 : start - day);
154
+ clone.setDate(diff);
155
+ clone.setHours(0, 0, 0, 0);
156
+ return new AXDateTime(clone, this);
157
+ }
158
+ case 'month':
159
+ clone.setDate(1);
160
+ return new AXDateTime(clone, this).startOf('day');
161
+ case 'year':
162
+ clone.setMonth(0);
163
+ clone.setDate(1);
164
+ return new AXDateTime(clone, this).startOf('day');
165
+ }
166
+ }
167
+ endOf(date, unit) {
168
+ const clone = new Date(date.valueOf());
169
+ switch (unit) {
170
+ case 'second':
171
+ clone.setHours(clone.getHours(), clone.getMinutes(), clone.getSeconds(), 999);
172
+ return new AXDateTime(clone, this);
173
+ case 'minute':
174
+ clone.setHours(clone.getHours(), clone.getMinutes(), 59, 999);
175
+ return new AXDateTime(clone, this);
176
+ case 'hour':
177
+ clone.setHours(clone.getHours(), 59, 59, 999);
178
+ return new AXDateTime(clone, this);
179
+ default:
180
+ case 'day':
181
+ clone.setHours(23, 59, 59, 999);
182
+ return new AXDateTime(clone, this);
183
+ case 'week':
184
+ return this.startOf(date, 'week').add('day', 6).endOf('day');
185
+ case 'month': {
186
+ const dateObj = new Date(date.getFullYear(), date.getMonth() + 1, 0);
187
+ dateObj.setHours(23, 59, 59, 999);
188
+ return new AXDateTime(dateObj, this);
189
+ }
190
+ case 'year':
191
+ clone.setMonth(11);
192
+ return new AXDateTime(clone, this).endOf('month');
193
+ }
194
+ }
195
+ isLeap(date) {
196
+ let leapYear = new Date(date.getFullYear(), 1, 29);
197
+ return leapYear.getDate() == 29;
198
+ }
199
+ parse(value) {
200
+ return new AXDateTime(new Date(value), this);
201
+ }
202
+ }
203
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2VvcmdpYW4uY2FsZW5kYXIuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9saWJzL2NvcmUvZGF0ZS10aW1lL3NyYy9saWIvZ2VvcmdpYW4uY2FsZW5kYXIudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUNMLFVBQVUsRUFFVixVQUFVLEdBR1gsTUFBTSxrQkFBa0IsQ0FBQztBQUUxQixNQUFNLE9BQU8sZ0JBQWlCLFNBQVEsVUFBVTtJQUM5Qzs7T0FFRztJQUNILFlBQVksTUFBd0I7UUFDbEMsS0FBSyxDQUFD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yIHVuZGVyZmxvd1xuICAgICAgICB3aGlsZSAobmV3TW9udGggPiAxMSkge1xuICAgICAgICAgIG5ld01vbnRoIC09IDEyO1xuICAgICAgICAgIG5ld1llYXIrKztcbiAgICAgICAgfVxuICAgICAgICB3aGlsZSAobmV3TW9udGggPCAwKSB7XG4gICAgICAgICAgbmV3TW9udGggKz0gMTI7XG4gICAgICAgICAgbmV3WWVhci0tO1xuICAgICAgICB9XG5cbiAgICAgICAgLy8gU2V0IHRoZSBkYXRlIHRvIHRoZSBmaXJzdCBvZiB0aGUgbW9udGggdG8gcHJldmVudCBvdmVyZmxvd1xuICAgICAgICB2LnNldERhdGUoMSk7XG4gICAgICAgIHYuc2V0RnVsbFllYXIobmV3WWVhcik7XG4gICAgICAgIHYuc2V0TW9udGgobmV3TW9udGgpO1xuXG4gICAgICAgIC8vIEdldCB0aGUgbGFzdCBkYXkgb2YgdGhlIG5ldyBtb250aFxuICAgICAgICBjb25zdCBsYXN0RGF5T2ZNb250aCA9IG5ldyBEYXRlKG5ld1llYXIsIG5ld01vbnRoICsgMSwgMCkuZ2V0RGF0ZSgpO1xuXG4gICAgICAgIC8vIFNldCB0aGUgZGF0ZSB0byBlaXRoZXIgdGhlIG9yaWdpbmFsIGRheSBvciB0aGUgbGFzdCBkYXkgb2YgdGhlIG5ldyBtb250aCwgd2hpY2hldmVyIGlzIHNtYWxsZXJcbiAgICAgICAgY29uc3Qgb3JpZ2luYWxEYXkgPSBkYXRlLmdldERhdGUoKTtcbiAgICAgICAgdi5zZXREYXRlKE1hdGgubWluKG9yaWdpbmFsRGF5LCBsYXN0RGF5T2ZNb250aCkpO1xuXG4gICAgICAgIHZhbHVlID0gdi52YWx1ZU9mKCk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgfVxuICAgICAgY2FzZSAnd2Vlayc6XG4gICAgICAgIHZhbHVlICs9IDcgKiA4NjQwMDAwMCAqIGFtb3VudDtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICd5ZWF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AgICAgY2xvbmUuc2V0SG91cnMoXG4gICAgICAgICAgY2xvbmUuZ2V0SG91cnMoKSxcbiAgICAgICAgICBjbG9uZS5nZXRNaW51dGVzKCksXG4gICAgICAgICAgdmFsdWUsXG4gICAgICAgICAgY2xvbmUuZ2V0TWlsbGlzZWNvbmRzKClcbiAgICAgICAgKTtcbiAgICAgICAgYnJlYWs7XG4gICAgICBjYXNlICdtaW51dGUnOlxuICAgICAgICBjbG9uZS5zZXRIb3VycyhcbiAgICAgICAgICBjbG9uZS5nZXRIb3VycygpLFxuICAgICAgICAgIHZhbHVlLFxuICAgICAgICAgIGNsb25lLmdldFNlY29uZHMoKSxcbiAgICAgICAgICBjbG9uZS5nZXRNaWxsaXNlY29uZHMoKVxuICAgICAgICApO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ2hvdXInOlxuICAgICAgICBjbG9uZS5zZXRIb3VycyhcbiAgICAgICAgICB2YWx1ZSxcbiAgICAgICAgICBjbG9uZS5nZXRNaW51dGVzKCksXG4gICAgICAgICAgY2xvbmUuZ2V0U2Vjb25kcygpLFxuICAgICAgICAgIGNsb25lLmdldE1pbGxpc2Vjb25kcygpXG4gICAgICAgICk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgZGVmYXVsdDpcbiAgICAgIGNhc2UgJ2RheSc6XG4gICAgICAgIGNsb25lLnNldERhdGUodmFsdWUpO1xuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ3dlZWsnOlxuICAgICAgICBicmVhaztcbiAgICAgIGNhc2UgJ21vbnRoJzpcbiAgICAgICAgY2xvbmUuc2V0TW9udGgoTWF0aC5tYXgoMCwgdmFsdWUgLSAxKSk7XG4gICAgICAgIGJyZWFrO1xuICAgICAgY2FzZSAneWVhcic6XG4gICAgICAgIGNsb25lLnNldEZ1bGxZZWFyKHZhbHVlKTtcbiAgICAgICAgYnJlYWs7XG4gICAgfVxuICAgIHJldHVybiBuZXcgQVhEYXRlVGltZShjbG9uZSwgdGhpcyk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dGUoKSA9PSAyOTtcbiAgfVxuXG4gIHBhcnNlKHZhbHVlOiBzdHJpbmcpOiBBWERhdGVUaW1lIHtcbiAgICByZXR1cm4gbmV3IEFYRGF0ZVRpbWUobmV3IERhdGUodmFsdWUpLCB0aGlzKTtcbiAgfVxufVxuIl19
@@ -0,0 +1,13 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export class AXHolidaysLoaderDefault {
3
+ getHolidays(options) {
4
+ return Promise.resolve([]);
5
+ }
6
+ }
7
+ export const AX_DATETIME_HOLIDAYS_LOADER = new InjectionToken('AX_DATETIME_HOLIDAYS_LOADER', {
8
+ providedIn: 'root',
9
+ factory: () => {
10
+ return new AXHolidaysLoaderDefault();
11
+ },
12
+ });
13
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaG9saWRheXMubG9hZGVyLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2RhdGUtdGltZS9zcmMvbGliL2hvbGlkYXlzLmxvYWRlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsY0FBYyxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBa0IvQyxNQUFNLE9BQU8sdUJBQXVCO0lBQ2xDLFdBQVcsQ0FDVCxPQUE2QztRQUU3QyxPQUFPLE9BQU8sQ0FBQyxPQUFPLENBQUMsRUFBRSxDQUFDLENBQUM7SUFDN0IsQ0FBQztDQUNGO0FBRUQsTUFBTSxDQUFDLE1BQU0sMkJBQTJCLEdBQUcsSUFBSSxjQUFjLENBQzNELDZCQUE2QixFQUM3QjtJQUNFLFVBQVUsRUFBRSxNQUFNO0lBQ2xCLE9BQU8sRUFBRSxHQUFHLEVBQUU7UUFDWixPQUFPLElBQUksdUJBQXVCLEVBQUUsQ0FBQztJQUN2QyxDQUFDO0NBQ0YsQ0FDRixDQUFDIiwic291cmNlc0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