@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,3 @@
1
+ # @acorex/core/common
2
+
3
+ Secondary entry point of `@acorex/core`. It can be used by importing from `@acorex/core/common`.
@@ -0,0 +1,2 @@
1
+ import { CountryItem } from './country';
2
+ export declare const COUNTRIES: CountryItem[];
@@ -0,0 +1,13 @@
1
+ export interface CountryItem {
2
+ name: string;
3
+ regions: string[];
4
+ iso2code: string;
5
+ code: string;
6
+ format: string;
7
+ orderPriority?: number;
8
+ areaCodes?: string[];
9
+ bkPosition?: {
10
+ x: string;
11
+ y: string;
12
+ };
13
+ }
@@ -0,0 +1,2 @@
1
+ export * from './countries/countries.data';
2
+ export * from './countries/country';
@@ -0,0 +1,3 @@
1
+ # @acorex/core/config
2
+
3
+ Secondary entry point of `@acorex/core`. It can be used by importing from `@acorex/core/config`.
@@ -0,0 +1,2 @@
1
+ export * from './lib/configs';
2
+ export * from './lib/configs.service';
@@ -0,0 +1,6 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export type AXGlobalConfig = {
3
+ [key: string]: unknown;
4
+ };
5
+ export declare const AXGlobalDefaultConfig: AXGlobalConfig;
6
+ export declare const AX_GLOBAL_CONFIG: InjectionToken<AXGlobalConfig>;
@@ -0,0 +1,12 @@
1
+ import { Injector } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class AXConfigService {
4
+ private injector;
5
+ /**
6
+ * @ignore
7
+ */
8
+ constructor(injector: Injector);
9
+ get<T = string>(key: string, defaultValue?: T): T;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXConfigService, never>;
11
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXConfigService>;
12
+ }
@@ -0,0 +1,3 @@
1
+ # @acorex/core/date-time
2
+
3
+ Secondary entry point of `@acorex/core`. It can be used by importing from `@acorex/core/date-time`.
@@ -0,0 +1,10 @@
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';
@@ -0,0 +1,27 @@
1
+ import { Subject } from 'rxjs';
2
+ import { AXCalendar, AXDateTime, AXDateValue } from './datetime.class';
3
+ import { AXHolidayDate, AXHolidaysLoaderOptions } from './holidays.loader';
4
+ import * as i0 from "@angular/core";
5
+ export declare class AXCalendarService {
6
+ private config;
7
+ private _holidaysLoader;
8
+ private eventService;
9
+ get calendar(): AXCalendar;
10
+ private activeCalendar;
11
+ calendarChanges$: import("rxjs").Observable<AXCalendar>;
12
+ getDefaultCalendar(): AXCalendar;
13
+ getActiveCalendar(): AXCalendar;
14
+ setActiveCalendar(name: string): void;
15
+ onHolidaysChanged: Subject<AXHolidayDate[]>;
16
+ private _holidays;
17
+ get holidays(): AXHolidayDate[];
18
+ constructor();
19
+ loadHolidays(options?: AXHolidaysLoaderOptions): Promise<void>;
20
+ create(value: AXDateValue, calendarName?: string): AXDateTime;
21
+ create(value: Date, calendarName?: string): AXDateTime;
22
+ now(calendarName?: string): AXDateTime;
23
+ resolveCalendar(name: string): AXCalendar;
24
+ convert(value: Date | AXDateTime | string, calendarName?: string): AXDateTime;
25
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXCalendarService, never>;
26
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXCalendarService>;
27
+ }
@@ -0,0 +1,12 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ import { AXCalendar } from './datetime.class';
3
+ export interface AXDateTimeConfig {
4
+ calendar: string;
5
+ calendars: {
6
+ [key: string]: AXCalendar;
7
+ };
8
+ }
9
+ export declare const AX_DATETIME_CONFIG: InjectionToken<AXDateTimeConfig>;
10
+ export declare const AXDateTimeDefaultConfig: AXDateTimeConfig;
11
+ export type PartialDateTimeConfig = Partial<AXDateTimeConfig>;
12
+ export declare function dateTimeConfig(config?: PartialDateTimeConfig): AXDateTimeConfig;
@@ -0,0 +1,138 @@
1
+ export type TimeUnit = 'ms' | 'second' | 'minute' | 'hour' | 'day' | 'month' | 'year' | 'week';
2
+ export interface AXDateValue {
3
+ year: number;
4
+ month: number;
5
+ date: number;
6
+ hours?: number;
7
+ minutes?: number;
8
+ seconds?: number;
9
+ ms?: number;
10
+ }
11
+ export interface AXDateTimeDisplayFormats {
12
+ dateInput: string;
13
+ timeInput: string;
14
+ dateTimeInput: string;
15
+ dateDisplay: string;
16
+ timeDisplay: string;
17
+ dateTimeDisplay: string;
18
+ }
19
+ export type AXDateTimeUnitNames = {
20
+ long: string;
21
+ short: string;
22
+ letter: string;
23
+ }[];
24
+ export type AXDateTimePart = {
25
+ key: string;
26
+ placeholder: string;
27
+ placeholders: string[];
28
+ typedValue?: string | null;
29
+ default: number;
30
+ enabled: boolean;
31
+ realValue: () => string;
32
+ };
33
+ export type AXDateTimeParts = {
34
+ year: AXDateTimePart;
35
+ month: AXDateTimePart;
36
+ day: AXDateTimePart;
37
+ hour: AXDateTimePart;
38
+ minute: AXDateTimePart;
39
+ second: AXDateTimePart;
40
+ };
41
+ export interface AXCalendarConfig {
42
+ weekdays: number[];
43
+ weekend: number[];
44
+ formats: AXDateTimeDisplayFormats;
45
+ }
46
+ export declare abstract class AXCalendar {
47
+ private _config;
48
+ /**
49
+ * @ignore
50
+ */
51
+ constructor(config: AXCalendarConfig);
52
+ get weekend(): number[];
53
+ get formats(): AXDateTimeDisplayFormats;
54
+ get weekdays(): number[];
55
+ abstract name(): string;
56
+ abstract dayOfMonth(date: Date): number;
57
+ abstract dayOfYear(date: Date): number;
58
+ abstract dayOfWeek(date: Date): number;
59
+ abstract monthOfYear(date: Date): number;
60
+ abstract weekOfYear(date: Date): number;
61
+ abstract year(date: Date): number;
62
+ abstract add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
63
+ abstract set(date: Date, unit: TimeUnit, value: number): AXDateTime;
64
+ abstract startOf(date: Date, unit: TimeUnit): AXDateTime;
65
+ abstract endOf(date: Date, unit: TimeUnit): AXDateTime;
66
+ abstract create(value: AXDateValue): AXDateTime;
67
+ abstract parse(value: string): AXDateTime;
68
+ }
69
+ export declare class AXDateTime {
70
+ private _date;
71
+ get date(): Date;
72
+ private _calendar;
73
+ get calendar(): AXCalendar;
74
+ constructor(value: Date, calendar: AXCalendar);
75
+ clone(): AXDateTime;
76
+ get dayOfMonth(): number;
77
+ get dayOfYear(): number;
78
+ get dayOfWeek(): number;
79
+ get hour(): number;
80
+ get minute(): number;
81
+ get second(): number;
82
+ get year(): number;
83
+ get monthOfYear(): number;
84
+ get weekOfYear(): number;
85
+ get month(): AXCalendarMonth;
86
+ add(unit: TimeUnit, amount: number): AXDateTime;
87
+ set(unit: TimeUnit, value: number): AXDateTime;
88
+ duration(end: Date | AXDateTime): AXTimeSpan;
89
+ startOf(unit?: TimeUnit): AXDateTime;
90
+ endOf(unit?: TimeUnit): AXDateTime;
91
+ private _formatKeys;
92
+ protected _language: () => string;
93
+ format(format?: string, options?: {
94
+ locale?: string;
95
+ }): string;
96
+ getDateTimeFormatByLocale(locale: string, style: 'shortDate' | 'longDate' | 'shortTime' | 'longTime'): string;
97
+ private pad;
98
+ equal(value: Date | AXDateTime, unit?: TimeUnit): boolean;
99
+ compare(value: Date | AXDateTime, unit?: TimeUnit): number;
100
+ }
101
+ export declare class AXCalendarMonth {
102
+ private _range;
103
+ get range(): AXDateTimeRange;
104
+ set range(v: AXDateTimeRange);
105
+ get totalDays(): number;
106
+ constructor(date: AXDateTime);
107
+ private readonly index;
108
+ private readonly name;
109
+ }
110
+ export interface AXTimeSpanTotal {
111
+ miliseconds: number;
112
+ seconds: number;
113
+ minutes: number;
114
+ hours: number;
115
+ days: number;
116
+ weeks: number;
117
+ months: number;
118
+ years: number;
119
+ }
120
+ export interface AXTimeSpan {
121
+ miliseconds: number;
122
+ seconds: number;
123
+ minutes: number;
124
+ hours: number;
125
+ days: number;
126
+ months: number;
127
+ years: number;
128
+ total: AXTimeSpanTotal;
129
+ }
130
+ export declare class AXDateTimeRange {
131
+ private _startTime;
132
+ private _endTime;
133
+ get startTime(): AXDateTime;
134
+ get endTime(): AXDateTime;
135
+ constructor(startTime: AXDateTime, endTime: AXDateTime);
136
+ duration(): AXTimeSpan;
137
+ enumurate(unit?: TimeUnit, amount?: number): AXDateTime[];
138
+ }
@@ -0,0 +1,8 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./datetime.pipe";
3
+ import * as i2 from "@acorex/core/format";
4
+ export declare class AXDateTimeModule {
5
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimeModule, never>;
6
+ static ɵmod: i0.ɵɵNgModuleDeclaration<AXDateTimeModule, [typeof i1.AXDateTimePipe], [typeof i2.AXFormatModule], [typeof i1.AXDateTimePipe]>;
7
+ static ɵinj: i0.ɵɵInjectorDeclaration<AXDateTimeModule>;
8
+ }
@@ -0,0 +1,12 @@
1
+ import { PipeTransform } from '@angular/core';
2
+ import { AXDateTime } from './datetime.class';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * @deprecated The pipe should not be used, use format instead
6
+ */
7
+ export declare class AXDateTimePipe implements PipeTransform {
8
+ private _calendarService;
9
+ transform(value: Date | AXDateTime | string, format?: string, calendarName?: string): string;
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimePipe, never>;
11
+ static ɵpipe: i0.ɵɵPipeDeclaration<AXDateTimePipe, "axDate", false>;
12
+ }
@@ -0,0 +1,19 @@
1
+ import { AXFormatOptions, AXFormatter } from '@acorex/core/format';
2
+ import * as i0 from "@angular/core";
3
+ export interface AXDateTimeFormatterOptions extends AXFormatOptions {
4
+ format?: string;
5
+ calendar?: string;
6
+ locale?: string;
7
+ }
8
+ declare module '@acorex/core/format' {
9
+ interface AXFormatOptionsMap {
10
+ datetime: AXDateTimeFormatterOptions;
11
+ }
12
+ }
13
+ export declare class AXDateTimeFormatter implements AXFormatter {
14
+ private calendarService;
15
+ get name(): string;
16
+ format(value: unknown, options?: AXDateTimeFormatterOptions | string): string;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXDateTimeFormatter, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXDateTimeFormatter>;
19
+ }
@@ -0,0 +1,16 @@
1
+ import { AXFormatOptions, AXFormatter } from '@acorex/core/format';
2
+ import * as i0 from "@angular/core";
3
+ export interface AXTimeLeftFormatterOptions extends AXFormatOptions {
4
+ format: string;
5
+ }
6
+ declare module '@acorex/core/format' {
7
+ interface AXFormatOptionsMap {
8
+ timeleft: AXTimeLeftFormatterOptions;
9
+ }
10
+ }
11
+ export declare class AXTimeLeftFormatter implements AXFormatter {
12
+ get name(): string;
13
+ format(value: number | string, options?: AXTimeLeftFormatterOptions): string;
14
+ static ɵfac: i0.ɵɵFactoryDeclaration<AXTimeLeftFormatter, never>;
15
+ static ɵprov: i0.ɵɵInjectableDeclaration<AXTimeLeftFormatter>;
16
+ }
@@ -0,0 +1,21 @@
1
+ import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';
2
+ export declare class GeorgianCalendar extends AXCalendar {
3
+ /**
4
+ * @ignore
5
+ */
6
+ constructor(config: AXCalendarConfig);
7
+ create(value: AXDateValue): AXDateTime;
8
+ name(): string;
9
+ dayOfMonth(date: Date): number;
10
+ dayOfYear(date: Date): number;
11
+ dayOfWeek(date: Date): number;
12
+ weekOfYear(date: Date): number;
13
+ year(date: Date): number;
14
+ monthOfYear(date: Date): number;
15
+ add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
16
+ set(date: Date, unit: TimeUnit, value: number): AXDateTime;
17
+ startOf(date: Date, unit: TimeUnit): AXDateTime;
18
+ endOf(date: Date, unit: TimeUnit): AXDateTime;
19
+ isLeap(date: Date): boolean;
20
+ parse(value: string): AXDateTime;
21
+ }
@@ -0,0 +1,21 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export interface AXHolidayDate {
3
+ date: Date;
4
+ title: string;
5
+ description?: string;
6
+ [key: string]: unknown;
7
+ }
8
+ export interface AXHolidaysLoaderOptions {
9
+ calendar?: string;
10
+ range?: {
11
+ start: Date;
12
+ end: Date;
13
+ };
14
+ }
15
+ export interface AXHolidaysLoader {
16
+ getHolidays(options?: AXHolidaysLoaderOptions): Promise<AXHolidayDate[]>;
17
+ }
18
+ export declare class AXHolidaysLoaderDefault implements AXHolidaysLoader {
19
+ getHolidays(options?: AXHolidaysLoaderOptions | undefined): Promise<AXHolidayDate[]>;
20
+ }
21
+ export declare const AX_DATETIME_HOLIDAYS_LOADER: InjectionToken<AXHolidaysLoader>;
@@ -0,0 +1,40 @@
1
+ import { AXCalendar, AXCalendarConfig, AXDateTime, AXDateValue, TimeUnit } from './datetime.class';
2
+ export declare class JalaliCalendar extends AXCalendar {
3
+ /**
4
+ * @ignore
5
+ */
6
+ constructor(config: AXCalendarConfig);
7
+ private breaks;
8
+ create(value: AXDateValue): AXDateTime;
9
+ name(): string;
10
+ dayOfMonth(date: Date): number;
11
+ dayOfYear(date: Date): number;
12
+ dayOfWeek(date: Date): number;
13
+ weekOfYear(date: Date): number;
14
+ year(date: Date): number;
15
+ monthOfYear(date: Date): number;
16
+ add(date: Date, unit: TimeUnit, amount: number): AXDateTime;
17
+ set(date: Date, unit: TimeUnit, value: number): AXDateTime;
18
+ startOf(date: Date, unit: TimeUnit): AXDateTime;
19
+ endOf(date: Date, unit: TimeUnit): AXDateTime;
20
+ parse(value: string): AXDateTime;
21
+ toJalaali(date: Date): {
22
+ year: number;
23
+ month: number;
24
+ day: number;
25
+ };
26
+ toGregorian(jy: any, jm: any, jd: any): Date;
27
+ isValidJalaaliDate(jy: any, jm: any, jd: any): boolean;
28
+ isLeapJalaaliYear(jy: any): boolean;
29
+ jalaaliMonthLength(jy: any, jm: any): 31 | 30 | 29;
30
+ private jalCalLeap;
31
+ private jalCal;
32
+ private j2d;
33
+ private d2j;
34
+ private g2d;
35
+ private d2g;
36
+ private jalaaliWeek;
37
+ private jalaaliToDateObject;
38
+ private div;
39
+ private mod;
40
+ }
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Generated bundle index. Do not edit.
3
+ */
4
+ export * from './index';
5
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYWNvcmV4LWNvcmUtY29tbW9uLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vbGlicy9jb3JlL2NvbW1vbi9zcmMvYWNvcmV4LWNvcmUtY29tbW9uLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBRUgsY0FBYyxTQUFTLENBQUMiLCJzb3VyY2VzQ29udGVudCI6WyIvKipcbiAqIEdlbmVyYXRlZCBidW5kbGUgaW5kZXguIERvIG5vdCBlZGl0LlxuICovXG5cbmV4cG9ydCAqIGZyb20gJy4vaW5kZXgnO1xuIl19