@acorex/components 4.1.6 → 4.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (599) hide show
  1. package/karma.conf.js +32 -0
  2. package/ng-package.json +10 -0
  3. package/package.json +13 -33
  4. package/src/lib/accordion/accordion.component.ts +43 -0
  5. package/src/lib/accordion/accordion.module.ts +11 -0
  6. package/src/lib/accordion/api.ts +2 -0
  7. package/src/lib/base/base-page.class.ts +115 -0
  8. package/src/lib/base/element.class.ts +344 -0
  9. package/src/lib/base/events.class.ts +32 -0
  10. package/src/lib/button/button.component.html +17 -0
  11. package/src/lib/button/button.component.ts +72 -0
  12. package/src/lib/button/button.module.ts +14 -0
  13. package/src/lib/calendar/calendar-box/calendar-box.component.html +68 -0
  14. package/src/lib/calendar/calendar-box/calendar-box.component.ts +461 -0
  15. package/src/lib/calendar/calendar-box/calendar-box.module.ts +16 -0
  16. package/src/lib/calendar/scheduler/scheduler-views.property.ts +38 -0
  17. package/{lib/calendar/scheduler/scheduler.class.d.ts → src/lib/calendar/scheduler/scheduler.class.ts} +20 -6
  18. package/src/lib/calendar/scheduler/scheduler.component.html +9 -0
  19. package/src/lib/calendar/scheduler/scheduler.component.scss +181 -0
  20. package/src/lib/calendar/scheduler/scheduler.component.ts +249 -0
  21. package/src/lib/calendar/scheduler/scheduler.module.ts +45 -0
  22. package/src/lib/calendar/scheduler/toolbars/scheduler-toolbar-navigator.ts +133 -0
  23. package/src/lib/calendar/scheduler/toolbars/scheduler-toolbar-views.ts +33 -0
  24. package/src/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.html +43 -0
  25. package/src/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.scss +66 -0
  26. package/src/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.ts +50 -0
  27. package/src/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.html +45 -0
  28. package/src/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.scss +19 -0
  29. package/src/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.ts +103 -0
  30. package/src/lib/calendar/scheduler/views/month/scheduler-month-view.component.html +39 -0
  31. package/src/lib/calendar/scheduler/views/month/scheduler-month-view.component.scss +55 -0
  32. package/src/lib/calendar/scheduler/views/month/scheduler-month-view.component.ts +233 -0
  33. package/src/lib/calendar/scheduler/views/scheduler-view.component.ts +124 -0
  34. package/src/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.html +50 -0
  35. package/src/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.scss +4 -0
  36. package/src/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.ts +92 -0
  37. package/src/lib/checkbox/checkbox.component.html +22 -0
  38. package/src/lib/checkbox/checkbox.component.ts +106 -0
  39. package/src/lib/checkbox/checkbox.module.ts +11 -0
  40. package/src/lib/color-picker/color-box/color-box.component.html +37 -0
  41. package/src/lib/color-picker/color-box/color-box.component.scss +60 -0
  42. package/src/lib/color-picker/color-box/color-box.component.ts +438 -0
  43. package/src/lib/color-picker/color-picker.component.html +31 -0
  44. package/src/lib/color-picker/color-picker.component.ts +87 -0
  45. package/src/lib/color-picker/color-picker.module.ts +16 -0
  46. package/src/lib/context-menu/context-menu.component.html +42 -0
  47. package/src/lib/context-menu/context-menu.component.ts +78 -0
  48. package/src/lib/context-menu/context-menu.directive.ts +159 -0
  49. package/src/lib/context-menu/context-menu.module.ts +15 -0
  50. package/src/lib/data-filter/columns/filter-column-date.component.ts +123 -0
  51. package/src/lib/data-filter/columns/filter-column-number.component.ts +100 -0
  52. package/src/lib/data-filter/columns/filter-column-selection.component.ts +69 -0
  53. package/src/lib/data-filter/columns/filter-column-string.component.ts +100 -0
  54. package/src/lib/data-filter/filter-panel/filter-panel.component.html +120 -0
  55. package/src/lib/data-filter/filter-panel/filter-panel.component.scss +143 -0
  56. package/src/lib/data-filter/filter-panel/filter-panel.component.ts +266 -0
  57. package/src/lib/data-filter/filter.class.ts +73 -0
  58. package/src/lib/data-filter/filter.module.ts +52 -0
  59. package/src/lib/data-filter/toolbar/filter-toolbar.component.html +5 -0
  60. package/src/lib/data-filter/toolbar/filter-toolbar.component.scss +17 -0
  61. package/src/lib/data-filter/toolbar/filter-toolbar.component.ts +179 -0
  62. package/src/lib/data-list/core/data-list.component.ts +62 -0
  63. package/src/lib/data-list/list/list.component.html +32 -0
  64. package/src/lib/data-list/list/list.component.scss +64 -0
  65. package/src/lib/data-list/list/list.component.ts +149 -0
  66. package/src/lib/data-list/list/list.module.ts +14 -0
  67. package/src/lib/data-list/list/toolbar-list-view.component.ts +63 -0
  68. package/src/lib/data-source/datasource.component.ts +50 -0
  69. package/src/lib/data-source/datasource.module.ts +11 -0
  70. package/{lib/data-source/read-param.d.ts → src/lib/data-source/read-param.ts} +13 -3
  71. package/src/lib/date-picker/date-picker.component.html +30 -0
  72. package/src/lib/date-picker/date-picker.component.scss +5 -0
  73. package/src/lib/date-picker/date-picker.component.ts +723 -0
  74. package/src/lib/date-picker/date-picker.module.ts +17 -0
  75. package/src/lib/dialog/dialog.component.html +5 -0
  76. package/src/lib/dialog/dialog.component.scss +32 -0
  77. package/src/lib/dialog/dialog.component.ts +32 -0
  78. package/src/lib/dialog/dialog.module.ts +13 -0
  79. package/src/lib/dialog/dialog.service.ts +178 -0
  80. package/src/lib/drawer/drawer.component.html +5 -0
  81. package/src/lib/drawer/drawer.component.ts +53 -0
  82. package/src/lib/drawer/drawer.module.ts +11 -0
  83. package/src/lib/dropdown/dropdown.component.html +25 -0
  84. package/src/lib/dropdown/dropdown.component.scss +9 -0
  85. package/src/lib/dropdown/dropdown.component.ts +200 -0
  86. package/src/lib/dropdown/dropdown.module.ts +19 -0
  87. package/src/lib/fieldset/fieldset.component.html +6 -0
  88. package/src/lib/fieldset/fieldset.component.ts +49 -0
  89. package/src/lib/fieldset/fieldset.module.ts +11 -0
  90. package/src/lib/form-group/form-group.component.html +15 -0
  91. package/src/lib/form-group/form-group.component.ts +39 -0
  92. package/src/lib/form-group/form-group.module.ts +14 -0
  93. package/src/lib/label/label.component.html +5 -0
  94. package/src/lib/label/label.component.ts +18 -0
  95. package/src/lib/label/label.module.ts +14 -0
  96. package/src/lib/loading/loading-indicator.component.html +27 -0
  97. package/src/lib/loading/loading-indicator.component.ts +16 -0
  98. package/src/lib/loading/loading-panel.component.ts +37 -0
  99. package/src/lib/loading/loading.module.ts +13 -0
  100. package/src/lib/loading/loading.service.ts +44 -0
  101. package/src/lib/menu/menu-item.component.ts +41 -0
  102. package/src/lib/menu/menu.component.html +65 -0
  103. package/src/lib/menu/menu.component.ts +111 -0
  104. package/src/lib/menu/menu.module.ts +13 -0
  105. package/src/lib/menu/menu2.component.scss +59 -0
  106. package/src/lib/menu/menu2.component.ts +98 -0
  107. package/src/lib/number-box/number-box.component.html +32 -0
  108. package/src/lib/number-box/number-box.component.ts +641 -0
  109. package/src/lib/number-box/number-box.module.ts +13 -0
  110. package/src/lib/page/content.component.ts +18 -0
  111. package/src/lib/page/footer.component.ts +13 -0
  112. package/src/lib/page/page.component.ts +43 -0
  113. package/src/lib/page/page.module.ts +14 -0
  114. package/src/lib/panel-box/panel-box.component.html +19 -0
  115. package/src/lib/panel-box/panel-box.component.scss +25 -0
  116. package/src/lib/panel-box/panel-box.component.ts +87 -0
  117. package/src/lib/panel-box/panel-box.module.ts +10 -0
  118. package/src/lib/password-box/password-box.component.html +22 -0
  119. package/src/lib/password-box/password-box.component.ts +30 -0
  120. package/src/lib/password-box/password-box.module.ts +16 -0
  121. package/src/lib/popover/custom-cdk-overlay.service.ts +82 -0
  122. package/src/lib/popover/overlay.service.ts +110 -0
  123. package/src/lib/popover/popover.component.html +5 -0
  124. package/src/lib/popover/popover.component.scss +9 -0
  125. package/src/lib/popover/popover.component.ts +117 -0
  126. package/src/lib/popover/popover.module.ts +11 -0
  127. package/src/lib/popup/popup.component.html +33 -0
  128. package/src/lib/popup/popup.component.scss +173 -0
  129. package/src/lib/popup/popup.component.ts +182 -0
  130. package/src/lib/popup/popup.module.ts +16 -0
  131. package/src/lib/popup/popup.service.ts +103 -0
  132. package/src/lib/progress-bar/progress-bar.component.html +5 -0
  133. package/src/lib/progress-bar/progress-bar.component.ts +10 -0
  134. package/src/lib/progress-bar/progress-bar.module.ts +11 -0
  135. package/src/lib/property-editor/editors/color-editor/color.editor.ts +30 -0
  136. package/src/lib/property-editor/editors/color-editor/color.module.ts +20 -0
  137. package/src/lib/property-editor/editors/column-editor/column.editor.html +75 -0
  138. package/src/lib/property-editor/editors/column-editor/column.editor.scss +193 -0
  139. package/src/lib/property-editor/editors/column-editor/column.editor.ts +124 -0
  140. package/src/lib/property-editor/editors/column-editor/column.module.ts +28 -0
  141. package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.html +80 -0
  142. package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.scss +71 -0
  143. package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.ts +232 -0
  144. package/src/lib/property-editor/editors/conditional-color-editor/conditional-color.module.ts +52 -0
  145. package/src/lib/property-editor/editors/date-editor/date.editor.ts +49 -0
  146. package/src/lib/property-editor/editors/date-editor/date.module.ts +20 -0
  147. package/src/lib/property-editor/editors/number-editor/number.editor.ts +47 -0
  148. package/src/lib/property-editor/editors/number-editor/number.module.ts +20 -0
  149. package/src/lib/property-editor/editors/range-editor/range.editor.html +67 -0
  150. package/src/lib/property-editor/editors/range-editor/range.editor.scss +68 -0
  151. package/src/lib/property-editor/editors/range-editor/range.editor.ts +153 -0
  152. package/src/lib/property-editor/editors/range-editor/range.module.ts +37 -0
  153. package/src/lib/property-editor/editors/selectbox-editor/selectbox.editor.html +15 -0
  154. package/src/lib/property-editor/editors/selectbox-editor/selectbox.editor.ts +77 -0
  155. package/src/lib/property-editor/editors/selectbox-editor/selectbox.module.ts +21 -0
  156. package/src/lib/property-editor/editors/switch-editor/number.editor.ts +26 -0
  157. package/src/lib/property-editor/editors/switch-editor/number.module.ts +21 -0
  158. package/src/lib/property-editor/editors/text-editor/text.editor.html +4 -0
  159. package/src/lib/property-editor/editors/text-editor/text.editor.ts +35 -0
  160. package/src/lib/property-editor/editors/text-editor/text.module.ts +20 -0
  161. package/src/lib/property-editor/editors/textarea-editor/textarea.editor.html +9 -0
  162. package/src/lib/property-editor/editors/textarea-editor/textarea.editor.ts +37 -0
  163. package/src/lib/property-editor/editors/textarea-editor/textarea.module.ts +20 -0
  164. package/src/lib/property-editor/editors/time-editor/time.editor.ts +38 -0
  165. package/src/lib/property-editor/editors/time-editor/time.module.ts +20 -0
  166. package/src/lib/property-editor/property-editor-renderer.directive.ts +181 -0
  167. package/src/lib/property-editor/property-editor.class.ts +178 -0
  168. package/src/lib/property-editor/property-editor.module.ts +97 -0
  169. package/src/lib/query-builder/query-builder-group.component.html +68 -0
  170. package/src/lib/query-builder/query-builder-group.component.ts +122 -0
  171. package/src/lib/query-builder/query-builder-popup/query-builder-popup.component.html +82 -0
  172. package/src/lib/query-builder/query-builder-popup/query-builder-popup.component.ts +178 -0
  173. package/src/lib/query-builder/query-builder-rule.component.html +134 -0
  174. package/src/lib/query-builder/query-builder-rule.component.ts +353 -0
  175. package/src/lib/query-builder/query-builder.class.ts +53 -0
  176. package/src/lib/query-builder/query-builder.component.html +3 -0
  177. package/src/lib/query-builder/query-builder.component.scss +286 -0
  178. package/src/lib/query-builder/query-builder.component.ts +220 -0
  179. package/src/lib/query-builder/query-builder.module.ts +42 -0
  180. package/src/lib/query-builder/query-builder.service.ts +181 -0
  181. package/src/lib/searchbox/searchbox.component.html +25 -0
  182. package/src/lib/searchbox/searchbox.component.ts +85 -0
  183. package/src/lib/searchbox/searchbox.module.ts +17 -0
  184. package/src/lib/selectbox/selectbox.component.html +98 -0
  185. package/src/lib/selectbox/selectbox.component.ts +980 -0
  186. package/src/lib/selectbox/selectbox.module.ts +31 -0
  187. package/src/lib/selectbox/selectbox2.component.html +78 -0
  188. package/src/lib/selectbox/selectbox2.component.ts +603 -0
  189. package/src/lib/selection-list/selection-list.component.html +21 -0
  190. package/src/lib/selection-list/selection-list.component.ts +103 -0
  191. package/src/lib/selection-list/selection-list.module.ts +13 -0
  192. package/src/lib/switch/switch.component.html +4 -0
  193. package/src/lib/switch/switch.component.scss +65 -0
  194. package/src/lib/switch/switch.component.ts +57 -0
  195. package/src/lib/switch/switch.module.ts +14 -0
  196. package/src/lib/tab-page/tab-page-Renderer.component.ts +68 -0
  197. package/src/lib/tab-page/tab-page-host.component.ts +103 -0
  198. package/src/lib/tab-page/tab-page.module.ts +13 -0
  199. package/src/lib/tab-page/tab-page.service.ts +176 -0
  200. package/src/lib/tab-strip/tab-strip.component.html +6 -0
  201. package/src/lib/tab-strip/tab-strip.component.ts +47 -0
  202. package/src/lib/tab-strip/tab-strip.module.ts +11 -0
  203. package/src/lib/tab-view/dynamic-tabs.directive.ts +17 -0
  204. package/src/lib/tab-view/tab-view.component.html +33 -0
  205. package/src/lib/tab-view/tab-view.component.scss +0 -0
  206. package/src/lib/tab-view/tab-view.component.ts +129 -0
  207. package/src/lib/tab-view/tab-view.module.ts +12 -0
  208. package/src/lib/tab-view/tab.component.html +8 -0
  209. package/src/lib/tab-view/tab.component.ts +15 -0
  210. package/src/lib/textarea/textarea.component.html +13 -0
  211. package/src/lib/textarea/textarea.component.ts +24 -0
  212. package/src/lib/textarea/textarea.module.ts +14 -0
  213. package/src/lib/textbox/textbox.component.html +22 -0
  214. package/src/lib/textbox/textbox.component.ts +38 -0
  215. package/src/lib/textbox/textbox.module.ts +16 -0
  216. package/src/lib/time-picker/time-picker.component.html +21 -0
  217. package/src/lib/time-picker/time-picker.component.ts +1003 -0
  218. package/src/lib/time-picker/time-picker.module.ts +15 -0
  219. package/src/lib/toast/toast-message/toast-message.component.html +17 -0
  220. package/src/lib/toast/toast-message/toast-message.component.scss +75 -0
  221. package/src/lib/toast/toast-message/toast-message.component.ts +64 -0
  222. package/src/lib/toast/toast-wrapper/toast-wrapper.component.scss +15 -0
  223. package/src/lib/toast/toast-wrapper/toast-wrapper.component.ts +13 -0
  224. package/src/lib/toast/toast.module.ts +12 -0
  225. package/src/lib/toast/toast.service.ts +64 -0
  226. package/src/lib/toolbar/group-button/toolbar-group-button.component.ts +54 -0
  227. package/src/lib/toolbar/menu/toolbar-menu.component.html +4 -0
  228. package/src/lib/toolbar/menu/toolbar-menu.component.ts +81 -0
  229. package/src/lib/toolbar/search/toolbar-search.component.html +4 -0
  230. package/src/lib/toolbar/search/toolbar-search.component.scss +24 -0
  231. package/src/lib/toolbar/search/toolbar-search.component.ts +61 -0
  232. package/src/lib/toolbar/title/toolbar-title.component.ts +35 -0
  233. package/src/lib/toolbar/toolbar-item.ts +4 -0
  234. package/src/lib/toolbar/toolbar.component.html +4 -0
  235. package/src/lib/toolbar/toolbar.component.scss +9 -0
  236. package/src/lib/toolbar/toolbar.component.ts +16 -0
  237. package/src/lib/toolbar/toolbar.module.ts +25 -0
  238. package/src/lib/tooltip/tooltip.directive.ts +101 -0
  239. package/src/lib/tooltip/tooltip.module.ts +11 -0
  240. package/src/lib/tree-side-menu/tree-side-menu.component.html +43 -0
  241. package/src/lib/tree-side-menu/tree-side-menu.component.ts +698 -0
  242. package/src/lib/tree-side-menu/tree-side-menu.module.ts +19 -0
  243. package/src/lib/tree-view/tree-view.component.html +45 -0
  244. package/src/lib/tree-view/tree-view.component.ts +781 -0
  245. package/src/lib/tree-view/tree-view.module.ts +16 -0
  246. package/src/lib/upload-file/upload-file.component.html +16 -0
  247. package/src/lib/upload-file/upload-file.component.ts +189 -0
  248. package/src/lib/upload-file/upload-file.events.ts +11 -0
  249. package/src/lib/upload-file/upload-file.module.ts +16 -0
  250. package/src/lib/validation/validation-form.component.ts +77 -0
  251. package/src/lib/validation/validation-rule.widget.ts +112 -0
  252. package/src/lib/validation/validation.class.ts +22 -0
  253. package/src/lib/validation/validation.component.ts +92 -0
  254. package/src/lib/validation/validation.module.ts +28 -0
  255. package/{public-api.d.ts → src/public-api.ts} +61 -2
  256. package/src/test.ts +28 -0
  257. package/tsconfig.lib.json +25 -0
  258. package/tsconfig.lib.prod.json +6 -0
  259. package/tsconfig.spec.json +17 -0
  260. package/tslint.json +17 -0
  261. package/acorex-components.d.ts +0 -5
  262. package/esm2020/acorex-components.mjs +0 -5
  263. package/esm2020/lib/accordion/accordion.component.mjs +0 -44
  264. package/esm2020/lib/accordion/accordion.module.mjs +0 -20
  265. package/esm2020/lib/base/base-page.class.mjs +0 -92
  266. package/esm2020/lib/base/element.class.mjs +0 -294
  267. package/esm2020/lib/base/events.class.mjs +0 -11
  268. package/esm2020/lib/button/button.component.mjs +0 -71
  269. package/esm2020/lib/button/button.module.mjs +0 -21
  270. package/esm2020/lib/calendar/calendar-box/calendar-box.component.mjs +0 -413
  271. package/esm2020/lib/calendar/calendar-box/calendar-box.module.mjs +0 -22
  272. package/esm2020/lib/calendar/scheduler/scheduler-views.property.mjs +0 -54
  273. package/esm2020/lib/calendar/scheduler/scheduler.class.mjs +0 -18
  274. package/esm2020/lib/calendar/scheduler/scheduler.component.mjs +0 -213
  275. package/esm2020/lib/calendar/scheduler/scheduler.module.mjs +0 -68
  276. package/esm2020/lib/calendar/scheduler/toolbars/scheduler-toolbar-navigator.mjs +0 -132
  277. package/esm2020/lib/calendar/scheduler/toolbars/scheduler-toolbar-views.mjs +0 -37
  278. package/esm2020/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.mjs +0 -47
  279. package/esm2020/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.mjs +0 -95
  280. package/esm2020/lib/calendar/scheduler/views/month/scheduler-month-view.component.mjs +0 -204
  281. package/esm2020/lib/calendar/scheduler/views/scheduler-view.component.mjs +0 -99
  282. package/esm2020/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.mjs +0 -77
  283. package/esm2020/lib/checkbox/checkbox.component.mjs +0 -98
  284. package/esm2020/lib/checkbox/checkbox.module.mjs +0 -20
  285. package/esm2020/lib/color-picker/color-box/color-box.component.mjs +0 -422
  286. package/esm2020/lib/color-picker/color-picker.component.mjs +0 -82
  287. package/esm2020/lib/color-picker/color-picker.module.mjs +0 -24
  288. package/esm2020/lib/context-menu/context-menu.component.mjs +0 -65
  289. package/esm2020/lib/context-menu/context-menu.directive.mjs +0 -135
  290. package/esm2020/lib/context-menu/context-menu.module.mjs +0 -20
  291. package/esm2020/lib/data-filter/columns/filter-column-date.component.mjs +0 -138
  292. package/esm2020/lib/data-filter/columns/filter-column-number.component.mjs +0 -117
  293. package/esm2020/lib/data-filter/columns/filter-column-selection.component.mjs +0 -74
  294. package/esm2020/lib/data-filter/columns/filter-column-string.component.mjs +0 -117
  295. package/esm2020/lib/data-filter/filter-panel/filter-panel.component.mjs +0 -258
  296. package/esm2020/lib/data-filter/filter.class.mjs +0 -44
  297. package/esm2020/lib/data-filter/filter.module.mjs +0 -90
  298. package/esm2020/lib/data-filter/toolbar/filter-toolbar.component.mjs +0 -166
  299. package/esm2020/lib/data-list/core/data-list.component.mjs +0 -40
  300. package/esm2020/lib/data-list/list/list.component.mjs +0 -124
  301. package/esm2020/lib/data-list/list/list.module.mjs +0 -22
  302. package/esm2020/lib/data-list/list/toolbar-list-view.component.mjs +0 -85
  303. package/esm2020/lib/data-source/datasource.component.mjs +0 -47
  304. package/esm2020/lib/data-source/datasource.module.mjs +0 -18
  305. package/esm2020/lib/data-source/read-param.mjs +0 -5
  306. package/esm2020/lib/date-picker/date-picker.component.mjs +0 -705
  307. package/esm2020/lib/date-picker/date-picker.module.mjs +0 -25
  308. package/esm2020/lib/dialog/dialog.component.mjs +0 -24
  309. package/esm2020/lib/dialog/dialog.module.mjs +0 -21
  310. package/esm2020/lib/dialog/dialog.service.mjs +0 -150
  311. package/esm2020/lib/drawer/drawer.component.mjs +0 -54
  312. package/esm2020/lib/drawer/drawer.module.mjs +0 -20
  313. package/esm2020/lib/dropdown/dropdown.component.mjs +0 -177
  314. package/esm2020/lib/dropdown/dropdown.module.mjs +0 -26
  315. package/esm2020/lib/fieldset/fieldset.component.mjs +0 -59
  316. package/esm2020/lib/fieldset/fieldset.module.mjs +0 -19
  317. package/esm2020/lib/form-group/form-group.component.mjs +0 -33
  318. package/esm2020/lib/form-group/form-group.module.mjs +0 -21
  319. package/esm2020/lib/label/label.component.mjs +0 -19
  320. package/esm2020/lib/label/label.module.mjs +0 -21
  321. package/esm2020/lib/loading/loading-indicator.component.mjs +0 -17
  322. package/esm2020/lib/loading/loading-panel.component.mjs +0 -44
  323. package/esm2020/lib/loading/loading.module.mjs +0 -21
  324. package/esm2020/lib/loading/loading.service.mjs +0 -45
  325. package/esm2020/lib/menu/menu-item.component.mjs +0 -47
  326. package/esm2020/lib/menu/menu.component.mjs +0 -86
  327. package/esm2020/lib/menu/menu.module.mjs +0 -22
  328. package/esm2020/lib/menu/menu2.component.mjs +0 -96
  329. package/esm2020/lib/number-box/number-box.component.mjs +0 -622
  330. package/esm2020/lib/number-box/number-box.module.mjs +0 -21
  331. package/esm2020/lib/page/content.component.mjs +0 -32
  332. package/esm2020/lib/page/footer.component.mjs +0 -19
  333. package/esm2020/lib/page/page.component.mjs +0 -53
  334. package/esm2020/lib/page/page.module.mjs +0 -22
  335. package/esm2020/lib/panel-box/panel-box.component.mjs +0 -88
  336. package/esm2020/lib/panel-box/panel-box.module.mjs +0 -19
  337. package/esm2020/lib/password-box/password-box.component.mjs +0 -31
  338. package/esm2020/lib/password-box/password-box.module.mjs +0 -23
  339. package/esm2020/lib/popover/custom-cdk-overlay.service.mjs +0 -48
  340. package/esm2020/lib/popover/overlay.service.mjs +0 -87
  341. package/esm2020/lib/popover/popover.component.mjs +0 -115
  342. package/esm2020/lib/popover/popover.module.mjs +0 -19
  343. package/esm2020/lib/popup/popup.component.mjs +0 -146
  344. package/esm2020/lib/popup/popup.module.mjs +0 -25
  345. package/esm2020/lib/popup/popup.service.mjs +0 -93
  346. package/esm2020/lib/progress-bar/progress-bar.component.mjs +0 -19
  347. package/esm2020/lib/progress-bar/progress-bar.module.mjs +0 -19
  348. package/esm2020/lib/property-editor/editors/color-editor/color.editor.mjs +0 -38
  349. package/esm2020/lib/property-editor/editors/color-editor/color.module.mjs +0 -24
  350. package/esm2020/lib/property-editor/editors/column-editor/column.editor.mjs +0 -115
  351. package/esm2020/lib/property-editor/editors/column-editor/column.module.mjs +0 -32
  352. package/esm2020/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.mjs +0 -211
  353. package/esm2020/lib/property-editor/editors/conditional-color-editor/conditional-color.module.mjs +0 -78
  354. package/esm2020/lib/property-editor/editors/date-editor/date.editor.mjs +0 -51
  355. package/esm2020/lib/property-editor/editors/date-editor/date.module.mjs +0 -24
  356. package/esm2020/lib/property-editor/editors/number-editor/number.editor.mjs +0 -60
  357. package/esm2020/lib/property-editor/editors/number-editor/number.module.mjs +0 -24
  358. package/esm2020/lib/property-editor/editors/range-editor/range.editor.mjs +0 -140
  359. package/esm2020/lib/property-editor/editors/range-editor/range.module.mjs +0 -61
  360. package/esm2020/lib/property-editor/editors/selectbox-editor/selectbox.editor.mjs +0 -71
  361. package/esm2020/lib/property-editor/editors/selectbox-editor/selectbox.module.mjs +0 -25
  362. package/esm2020/lib/property-editor/editors/switch-editor/number.editor.mjs +0 -29
  363. package/esm2020/lib/property-editor/editors/switch-editor/number.module.mjs +0 -25
  364. package/esm2020/lib/property-editor/editors/text-editor/text.editor.mjs +0 -30
  365. package/esm2020/lib/property-editor/editors/text-editor/text.module.mjs +0 -24
  366. package/esm2020/lib/property-editor/editors/textarea-editor/textarea.editor.mjs +0 -32
  367. package/esm2020/lib/property-editor/editors/textarea-editor/textarea.module.mjs +0 -24
  368. package/esm2020/lib/property-editor/editors/time-editor/time.editor.mjs +0 -43
  369. package/esm2020/lib/property-editor/editors/time-editor/time.module.mjs +0 -24
  370. package/esm2020/lib/property-editor/property-editor-renderer.directive.mjs +0 -152
  371. package/esm2020/lib/property-editor/property-editor.class.mjs +0 -101
  372. package/esm2020/lib/property-editor/property-editor.module.mjs +0 -161
  373. package/esm2020/lib/query-builder/query-builder-group.component.mjs +0 -124
  374. package/esm2020/lib/query-builder/query-builder-popup/query-builder-popup.component.mjs +0 -171
  375. package/esm2020/lib/query-builder/query-builder-rule.component.mjs +0 -357
  376. package/esm2020/lib/query-builder/query-builder.class.mjs +0 -20
  377. package/esm2020/lib/query-builder/query-builder.component.mjs +0 -82
  378. package/esm2020/lib/query-builder/query-builder.module.mjs +0 -59
  379. package/esm2020/lib/query-builder/query-builder.service.mjs +0 -191
  380. package/esm2020/lib/searchbox/searchbox.component.mjs +0 -79
  381. package/esm2020/lib/searchbox/searchbox.module.mjs +0 -24
  382. package/esm2020/lib/selectbox/selectbox.component.mjs +0 -955
  383. package/esm2020/lib/selectbox/selectbox.module.mjs +0 -44
  384. package/esm2020/lib/selectbox/selectbox2.component.mjs +0 -574
  385. package/esm2020/lib/selection-list/selection-list.component.mjs +0 -101
  386. package/esm2020/lib/selection-list/selection-list.module.mjs +0 -21
  387. package/esm2020/lib/switch/switch.component.mjs +0 -51
  388. package/esm2020/lib/switch/switch.module.mjs +0 -20
  389. package/esm2020/lib/tab-page/tab-page-Renderer.component.mjs +0 -69
  390. package/esm2020/lib/tab-page/tab-page-host.component.mjs +0 -109
  391. package/esm2020/lib/tab-page/tab-page.module.mjs +0 -21
  392. package/esm2020/lib/tab-page/tab-page.service.mjs +0 -156
  393. package/esm2020/lib/tab-strip/tab-strip.component.mjs +0 -36
  394. package/esm2020/lib/tab-strip/tab-strip.module.mjs +0 -19
  395. package/esm2020/lib/tab-view/dynamic-tabs.directive.mjs +0 -24
  396. package/esm2020/lib/tab-view/tab-view.component.mjs +0 -105
  397. package/esm2020/lib/tab-view/tab-view.module.mjs +0 -21
  398. package/esm2020/lib/tab-view/tab.component.mjs +0 -30
  399. package/esm2020/lib/textarea/textarea.component.mjs +0 -26
  400. package/esm2020/lib/textarea/textarea.module.mjs +0 -21
  401. package/esm2020/lib/textbox/textbox.component.mjs +0 -39
  402. package/esm2020/lib/textbox/textbox.module.mjs +0 -24
  403. package/esm2020/lib/time-picker/time-picker.component.mjs +0 -943
  404. package/esm2020/lib/time-picker/time-picker.module.mjs +0 -22
  405. package/esm2020/lib/toast/toast-message/toast-message.component.mjs +0 -74
  406. package/esm2020/lib/toast/toast-wrapper/toast-wrapper.component.mjs +0 -13
  407. package/esm2020/lib/toast/toast.module.mjs +0 -21
  408. package/esm2020/lib/toast/toast.service.mjs +0 -44
  409. package/esm2020/lib/toolbar/group-button/toolbar-group-button.component.mjs +0 -78
  410. package/esm2020/lib/toolbar/menu/toolbar-menu.component.mjs +0 -57
  411. package/esm2020/lib/toolbar/search/toolbar-search.component.mjs +0 -54
  412. package/esm2020/lib/toolbar/title/toolbar-title.component.mjs +0 -47
  413. package/esm2020/lib/toolbar/toolbar-item.mjs +0 -6
  414. package/esm2020/lib/toolbar/toolbar.component.mjs +0 -13
  415. package/esm2020/lib/toolbar/toolbar.module.mjs +0 -40
  416. package/esm2020/lib/tooltip/tooltip.directive.mjs +0 -100
  417. package/esm2020/lib/tooltip/tooltip.module.mjs +0 -19
  418. package/esm2020/lib/tree-side-menu/tree-side-menu.component.mjs +0 -646
  419. package/esm2020/lib/tree-side-menu/tree-side-menu.module.mjs +0 -35
  420. package/esm2020/lib/tree-view/tree-view.component.mjs +0 -726
  421. package/esm2020/lib/tree-view/tree-view.module.mjs +0 -22
  422. package/esm2020/lib/upload-file/upload-file.component.mjs +0 -170
  423. package/esm2020/lib/upload-file/upload-file.events.mjs +0 -2
  424. package/esm2020/lib/upload-file/upload-file.module.mjs +0 -24
  425. package/esm2020/lib/validation/validation-form.component.mjs +0 -64
  426. package/esm2020/lib/validation/validation-rule.widget.mjs +0 -111
  427. package/esm2020/lib/validation/validation.class.mjs +0 -2
  428. package/esm2020/lib/validation/validation.component.mjs +0 -89
  429. package/esm2020/lib/validation/validation.module.mjs +0 -34
  430. package/esm2020/public-api.mjs +0 -154
  431. package/fesm2015/acorex-components.mjs +0 -15087
  432. package/fesm2015/acorex-components.mjs.map +0 -1
  433. package/fesm2020/acorex-components.mjs +0 -15034
  434. package/fesm2020/acorex-components.mjs.map +0 -1
  435. package/lib/accordion/accordion.component.d.ts +0 -13
  436. package/lib/accordion/accordion.module.d.ts +0 -9
  437. package/lib/base/base-page.class.d.ts +0 -45
  438. package/lib/base/element.class.d.ts +0 -106
  439. package/lib/base/events.class.d.ts +0 -18
  440. package/lib/button/button.component.d.ts +0 -21
  441. package/lib/button/button.module.d.ts +0 -8
  442. package/lib/calendar/calendar-box/calendar-box.component.d.ts +0 -81
  443. package/lib/calendar/calendar-box/calendar-box.module.d.ts +0 -11
  444. package/lib/calendar/scheduler/scheduler-views.property.d.ts +0 -19
  445. package/lib/calendar/scheduler/scheduler.component.d.ts +0 -39
  446. package/lib/calendar/scheduler/scheduler.module.d.ts +0 -21
  447. package/lib/calendar/scheduler/toolbars/scheduler-toolbar-navigator.d.ts +0 -25
  448. package/lib/calendar/scheduler/toolbars/scheduler-toolbar-views.d.ts +0 -14
  449. package/lib/calendar/scheduler/views/agenda/scheduler-agenda-view.component.d.ts +0 -16
  450. package/lib/calendar/scheduler/views/daytime/scheduler-daytime-view.component.d.ts +0 -26
  451. package/lib/calendar/scheduler/views/month/scheduler-month-view.component.d.ts +0 -37
  452. package/lib/calendar/scheduler/views/scheduler-view.component.d.ts +0 -28
  453. package/lib/calendar/scheduler/views/timeline/scheduler-timeline-view.component.d.ts +0 -24
  454. package/lib/checkbox/checkbox.component.d.ts +0 -30
  455. package/lib/checkbox/checkbox.module.d.ts +0 -9
  456. package/lib/color-picker/color-box/color-box.component.d.ts +0 -25
  457. package/lib/color-picker/color-picker.component.d.ts +0 -30
  458. package/lib/color-picker/color-picker.module.d.ts +0 -13
  459. package/lib/context-menu/context-menu.component.d.ts +0 -22
  460. package/lib/context-menu/context-menu.directive.d.ts +0 -38
  461. package/lib/context-menu/context-menu.module.d.ts +0 -9
  462. package/lib/data-filter/columns/filter-column-date.component.d.ts +0 -22
  463. package/lib/data-filter/columns/filter-column-number.component.d.ts +0 -15
  464. package/lib/data-filter/columns/filter-column-selection.component.d.ts +0 -18
  465. package/lib/data-filter/columns/filter-column-string.component.d.ts +0 -15
  466. package/lib/data-filter/filter-panel/filter-panel.component.d.ts +0 -45
  467. package/lib/data-filter/filter.class.d.ts +0 -40
  468. package/lib/data-filter/filter.module.d.ts +0 -24
  469. package/lib/data-filter/toolbar/filter-toolbar.component.d.ts +0 -25
  470. package/lib/data-list/core/data-list.component.d.ts +0 -15
  471. package/lib/data-list/list/list.component.d.ts +0 -40
  472. package/lib/data-list/list/list.module.d.ts +0 -11
  473. package/lib/data-list/list/toolbar-list-view.component.d.ts +0 -17
  474. package/lib/data-source/datasource.component.d.ts +0 -16
  475. package/lib/data-source/datasource.module.d.ts +0 -7
  476. package/lib/date-picker/date-picker.component.d.ts +0 -81
  477. package/lib/date-picker/date-picker.module.d.ts +0 -14
  478. package/lib/dialog/dialog.component.d.ts +0 -14
  479. package/lib/dialog/dialog.module.d.ts +0 -10
  480. package/lib/dialog/dialog.service.d.ts +0 -36
  481. package/lib/drawer/drawer.component.d.ts +0 -10
  482. package/lib/drawer/drawer.module.d.ts +0 -9
  483. package/lib/dropdown/dropdown.component.d.ts +0 -38
  484. package/lib/dropdown/dropdown.module.d.ts +0 -13
  485. package/lib/fieldset/fieldset.component.d.ts +0 -11
  486. package/lib/fieldset/fieldset.module.d.ts +0 -8
  487. package/lib/form-group/form-group.component.d.ts +0 -14
  488. package/lib/form-group/form-group.module.d.ts +0 -8
  489. package/lib/label/label.component.d.ts +0 -9
  490. package/lib/label/label.module.d.ts +0 -8
  491. package/lib/loading/loading-indicator.component.d.ts +0 -9
  492. package/lib/loading/loading-panel.component.d.ts +0 -13
  493. package/lib/loading/loading.module.d.ts +0 -10
  494. package/lib/loading/loading.service.d.ts +0 -13
  495. package/lib/menu/menu-item.component.d.ts +0 -18
  496. package/lib/menu/menu.component.d.ts +0 -35
  497. package/lib/menu/menu.module.d.ts +0 -11
  498. package/lib/menu/menu2.component.d.ts +0 -21
  499. package/lib/number-box/number-box.component.d.ts +0 -52
  500. package/lib/number-box/number-box.module.d.ts +0 -10
  501. package/lib/page/content.component.d.ts +0 -8
  502. package/lib/page/footer.component.d.ts +0 -5
  503. package/lib/page/page.component.d.ts +0 -16
  504. package/lib/page/page.module.d.ts +0 -11
  505. package/lib/panel-box/panel-box.component.d.ts +0 -19
  506. package/lib/panel-box/panel-box.module.d.ts +0 -8
  507. package/lib/password-box/password-box.component.d.ts +0 -12
  508. package/lib/password-box/password-box.module.d.ts +0 -10
  509. package/lib/popover/custom-cdk-overlay.service.d.ts +0 -19
  510. package/lib/popover/overlay.service.d.ts +0 -30
  511. package/lib/popover/popover.component.d.ts +0 -30
  512. package/lib/popover/popover.module.d.ts +0 -8
  513. package/lib/popup/popup.component.d.ts +0 -39
  514. package/lib/popup/popup.module.d.ts +0 -13
  515. package/lib/popup/popup.service.d.ts +0 -22
  516. package/lib/progress-bar/progress-bar.component.d.ts +0 -7
  517. package/lib/progress-bar/progress-bar.module.d.ts +0 -8
  518. package/lib/property-editor/editors/color-editor/color.editor.d.ts +0 -13
  519. package/lib/property-editor/editors/color-editor/color.module.d.ts +0 -12
  520. package/lib/property-editor/editors/column-editor/column.editor.d.ts +0 -34
  521. package/lib/property-editor/editors/column-editor/column.module.d.ts +0 -20
  522. package/lib/property-editor/editors/conditional-color-editor/conditional-color.editor.d.ts +0 -44
  523. package/lib/property-editor/editors/conditional-color-editor/conditional-color.module.d.ts +0 -19
  524. package/lib/property-editor/editors/date-editor/date.editor.d.ts +0 -28
  525. package/lib/property-editor/editors/date-editor/date.module.d.ts +0 -12
  526. package/lib/property-editor/editors/number-editor/number.editor.d.ts +0 -19
  527. package/lib/property-editor/editors/number-editor/number.module.d.ts +0 -12
  528. package/lib/property-editor/editors/range-editor/range.editor.d.ts +0 -29
  529. package/lib/property-editor/editors/range-editor/range.module.d.ts +0 -18
  530. package/lib/property-editor/editors/selectbox-editor/selectbox.editor.d.ts +0 -28
  531. package/lib/property-editor/editors/selectbox-editor/selectbox.module.d.ts +0 -13
  532. package/lib/property-editor/editors/switch-editor/number.editor.d.ts +0 -11
  533. package/lib/property-editor/editors/switch-editor/number.module.d.ts +0 -13
  534. package/lib/property-editor/editors/text-editor/text.editor.d.ts +0 -15
  535. package/lib/property-editor/editors/text-editor/text.module.d.ts +0 -12
  536. package/lib/property-editor/editors/textarea-editor/textarea.editor.d.ts +0 -17
  537. package/lib/property-editor/editors/textarea-editor/textarea.module.d.ts +0 -12
  538. package/lib/property-editor/editors/time-editor/time.editor.d.ts +0 -17
  539. package/lib/property-editor/editors/time-editor/time.module.d.ts +0 -12
  540. package/lib/property-editor/property-editor-renderer.directive.d.ts +0 -30
  541. package/lib/property-editor/property-editor.class.d.ts +0 -67
  542. package/lib/property-editor/property-editor.module.d.ts +0 -19
  543. package/lib/query-builder/query-builder-group.component.d.ts +0 -33
  544. package/lib/query-builder/query-builder-popup/query-builder-popup.component.d.ts +0 -35
  545. package/lib/query-builder/query-builder-rule.component.d.ts +0 -45
  546. package/lib/query-builder/query-builder.class.d.ts +0 -45
  547. package/lib/query-builder/query-builder.component.d.ts +0 -27
  548. package/lib/query-builder/query-builder.module.d.ts +0 -22
  549. package/lib/query-builder/query-builder.service.d.ts +0 -18
  550. package/lib/searchbox/searchbox.component.d.ts +0 -22
  551. package/lib/searchbox/searchbox.module.d.ts +0 -13
  552. package/lib/selectbox/selectbox.component.d.ts +0 -116
  553. package/lib/selectbox/selectbox.module.d.ts +0 -15
  554. package/lib/selectbox/selectbox2.component.d.ts +0 -103
  555. package/lib/selection-list/selection-list.component.d.ts +0 -30
  556. package/lib/selection-list/selection-list.module.d.ts +0 -10
  557. package/lib/switch/switch.component.d.ts +0 -20
  558. package/lib/switch/switch.module.d.ts +0 -9
  559. package/lib/tab-page/tab-page-Renderer.component.d.ts +0 -16
  560. package/lib/tab-page/tab-page-host.component.d.ts +0 -26
  561. package/lib/tab-page/tab-page.module.d.ts +0 -10
  562. package/lib/tab-page/tab-page.service.d.ts +0 -30
  563. package/lib/tab-strip/tab-strip.component.d.ts +0 -28
  564. package/lib/tab-strip/tab-strip.module.d.ts +0 -8
  565. package/lib/tab-view/dynamic-tabs.directive.d.ts +0 -16
  566. package/lib/tab-view/tab-view.component.d.ts +0 -26
  567. package/lib/tab-view/tab-view.module.d.ts +0 -10
  568. package/lib/tab-view/tab.component.d.ts +0 -12
  569. package/lib/textarea/textarea.component.d.ts +0 -12
  570. package/lib/textarea/textarea.module.d.ts +0 -8
  571. package/lib/textbox/textbox.component.d.ts +0 -16
  572. package/lib/textbox/textbox.module.d.ts +0 -11
  573. package/lib/time-picker/time-picker.component.d.ts +0 -52
  574. package/lib/time-picker/time-picker.module.d.ts +0 -11
  575. package/lib/toast/toast-message/toast-message.component.d.ts +0 -18
  576. package/lib/toast/toast-wrapper/toast-wrapper.component.d.ts +0 -8
  577. package/lib/toast/toast.module.d.ts +0 -9
  578. package/lib/toast/toast.service.d.ts +0 -18
  579. package/lib/toolbar/group-button/toolbar-group-button.component.d.ts +0 -12
  580. package/lib/toolbar/menu/toolbar-menu.component.d.ts +0 -24
  581. package/lib/toolbar/search/toolbar-search.component.d.ts +0 -16
  582. package/lib/toolbar/title/toolbar-title.component.d.ts +0 -9
  583. package/lib/toolbar/toolbar-item.d.ts +0 -3
  584. package/lib/toolbar/toolbar.component.d.ts +0 -8
  585. package/lib/toolbar/toolbar.module.d.ts +0 -14
  586. package/lib/tooltip/tooltip.directive.d.ts +0 -21
  587. package/lib/tooltip/tooltip.module.d.ts +0 -8
  588. package/lib/tree-side-menu/tree-side-menu.component.d.ts +0 -111
  589. package/lib/tree-side-menu/tree-side-menu.module.d.ts +0 -11
  590. package/lib/tree-view/tree-view.component.d.ts +0 -117
  591. package/lib/tree-view/tree-view.module.d.ts +0 -11
  592. package/lib/upload-file/upload-file.component.d.ts +0 -38
  593. package/lib/upload-file/upload-file.events.d.ts +0 -10
  594. package/lib/upload-file/upload-file.module.d.ts +0 -13
  595. package/lib/validation/validation-form.component.d.ts +0 -19
  596. package/lib/validation/validation-rule.widget.d.ts +0 -23
  597. package/lib/validation/validation.class.d.ts +0 -16
  598. package/lib/validation/validation.component.d.ts +0 -25
  599. package/lib/validation/validation.module.d.ts +0 -11
@@ -0,0 +1,723 @@
1
+ import {
2
+ Input,
3
+ ViewChild,
4
+ Output,
5
+ EventEmitter,
6
+ ViewEncapsulation,
7
+ Component,
8
+ ElementRef,
9
+ ContentChild,
10
+ AfterViewInit,
11
+ ChangeDetectorRef
12
+ } from '@angular/core';
13
+ import { AXDropdownComponent } from '../dropdown/dropdown.component';
14
+ import { AXTextBoxComponent } from '../textbox/textbox.component';
15
+ import { AXValidatableComponent, AXBaseSizableComponent, AXElementSize, AXBaseValueComponent } from '../base/element.class';
16
+ import { AXCalendarType, AXDateTime, AXConfig } from '@acorex/core';
17
+ import { AXValueEvent } from '../base/events.class';
18
+ import { AXValidation } from '../validation/validation.component';
19
+
20
+ export class AXDataPickerChangeEvent extends AXValueEvent<Date> {
21
+ isUserChange: boolean;
22
+ }
23
+
24
+ @Component({
25
+ selector: 'ax-date-picker',
26
+ templateUrl: './date-picker.component.html',
27
+ styleUrls: ['./date-picker.component.scss'],
28
+ encapsulation: ViewEncapsulation.None,
29
+ providers: [{ provide: AXValidatableComponent, useExisting: AXDatePickerComponent }],
30
+ host: { style: 'width: 100%' }
31
+ })
32
+ export class AXDatePickerComponent extends AXValidatableComponent implements AXBaseSizableComponent {
33
+ @ViewChild('dropdown', { static: true })
34
+ dropdown: AXDropdownComponent;
35
+
36
+ @ViewChild('input', { static: true })
37
+ input: AXTextBoxComponent;
38
+
39
+ @Input()
40
+ dayStyle = [];
41
+
42
+ @Input()
43
+ dayMinMaxResoan = '';
44
+
45
+ // mmddyyyy: any = [/[0-1]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[0-9]/, /[0-9]/, /[0-9]/, /[0-9]/];
46
+ yyyyMMdd: any = [/[1-2]/, /[0-9]/, /[0-9]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[0-3]/, /[0-9]/];
47
+ ddMMyyyy: any = [/[0-3]/, /[0-9]/, '-', /[0-1]/, /[0-9]/, '-', /[1-9]/, /[0-9]/, /[0-9]/, /[0-9]/];
48
+ yyyyddMM: any = [/[1-9]/, /[0-9]/, /[0-9]/, /[0-9]/, '-', /[0-3]/, /[0-9]/, '-', /[0-1]/, /[0-9]/];
49
+ // yyyyMMdd1: any = [/[0-9]/, /[0-9]/, /[0-9]/, /[0-9]/, '/', /[0-1]/, /[0-9]/, '/', /[0-3]/, /[0-9]/];
50
+ // ddMMyyyy2: any = [/[0-3]/, /[0-9]/, '/', /[0-1]/, /[0-9]/, '/', /[0-9]/, /[0-9]/, /[0-9]/, /[0-9]/];
51
+ // yyyyddMM3: any = [/[0-9]/, /[0-9]/, /[0-9]/, /[0-9]/, '/', /[0-3]/, /[0-9]/, '/', /[0-1]/, /[0-9]/];
52
+
53
+ @ContentChild(AXValidation, { static: true })
54
+ private _contentValidation: AXValidation;
55
+ private _validation: AXValidation;
56
+
57
+ @Input()
58
+ public get validation(): AXValidation {
59
+ return this._validation ? this._validation : this._contentValidation;
60
+ }
61
+
62
+ public set validation(v: AXValidation) {
63
+ this._validation = v;
64
+ }
65
+
66
+ @Input() placeholder: string = '';
67
+
68
+ @Input()
69
+ min: Date;
70
+
71
+ @Input()
72
+ max: Date;
73
+
74
+ @Input()
75
+ readonly: boolean;
76
+
77
+ @Input()
78
+ disabled: boolean;
79
+
80
+ @Input()
81
+ allowClear: boolean = false;
82
+
83
+ @Input()
84
+ textAlign: 'right' | 'left' | null = null;
85
+
86
+ @Input()
87
+ showToday: boolean = false;
88
+
89
+ @Input()
90
+ selectableHoliday: boolean = true;
91
+
92
+ @Input()
93
+ dateType: any;
94
+
95
+ @Input()
96
+ showTodayButton: boolean = true;
97
+
98
+ @Input()
99
+ openByClick: boolean = false;
100
+
101
+ cursorPosition: number = 0;
102
+
103
+ model: any = null;
104
+ text: string;
105
+
106
+ _renderPicker: boolean = false;
107
+
108
+ constructor(private ref: ElementRef, private cdr: ChangeDetectorRef) {
109
+ super();
110
+ // set defaults
111
+ if (AXConfig.get('dateTime.type')) {
112
+ this.type = AXConfig.get('dateTime.type');
113
+ }
114
+ }
115
+
116
+ @Input()
117
+ size: AXElementSize = 'md';
118
+
119
+ @Output()
120
+ typeChange: EventEmitter<AXCalendarType> = new EventEmitter<AXCalendarType>();
121
+
122
+ private _type: AXCalendarType = 'gregorian';
123
+
124
+ @Input()
125
+ public get type(): AXCalendarType {
126
+ return this._type;
127
+ }
128
+
129
+ public set type(v: AXCalendarType) {
130
+ if (v != this._type) {
131
+ this._type = v;
132
+ if (this._value) {
133
+ this.value = this._value.date;
134
+ }
135
+ this._setDateType();
136
+ this.typeChange.emit(v);
137
+ }
138
+ }
139
+
140
+ selectToday() {
141
+ this.value = new Date();
142
+ }
143
+
144
+ focus(): void {
145
+ // this.dropdown.focus();
146
+ this.input.focus();
147
+ }
148
+
149
+ convertMaskToDate(text: string) {
150
+ if (this.type == 'jalali') {
151
+ var d = new AXDateTime().convertStringToGregorian(text, 'YYYY/M/D');
152
+ } else {
153
+ var d = new Date(new AXDateTime(text, 'gregorian').toISOString());
154
+ }
155
+
156
+ return d;
157
+ }
158
+
159
+ convertMask(date: string) {
160
+ let y;
161
+ let m;
162
+ let d;
163
+ switch (this.dateType.mask) {
164
+ case this.yyyyMMdd:
165
+ y = date.slice(0, 4);
166
+ m = date.slice(5, 7);
167
+ d = date.slice(8, 10);
168
+ break;
169
+ case this.ddMMyyyy:
170
+ y = date.slice(6, 10);
171
+ m = date.slice(3, 5);
172
+ d = date.slice(0, 2);
173
+ break;
174
+ case this.yyyyddMM:
175
+ y = date.slice(0, 4);
176
+ m = date.slice(8, 10);
177
+ d = date.slice(5, 7);
178
+ break;
179
+ }
180
+
181
+ return { year: y, monnth: m, day: d };
182
+ }
183
+
184
+ textChange(e) {
185
+ this.text = e.value;
186
+ const date = this.convertMask(this.text);
187
+
188
+ if (this.text && this.text.indexOf('_') === -1 && this.text.length == 10 && this.type == 'jalali') {
189
+ this.userChange = e.isUserChange;
190
+
191
+ this.value = this.convertMaskToDate(date.year + '-' + date.monnth + '-' + date.day);
192
+ } else if (this.text && this.text.indexOf('_') === -1 && this.text.length == 10 && this.type == 'gregorian') {
193
+ this.userChange = e.isUserChange;
194
+ this.value = this.convertMaskToDate(date.year + '-' + date.monnth + '-' + date.day);
195
+ }
196
+ }
197
+
198
+ ngOnInit(): void {
199
+ this._setDateType();
200
+ }
201
+
202
+ ngAfterViewInit(): void {
203
+ setTimeout(() => {
204
+ this.text = this._value?.toString();
205
+ if (this.showToday && !this.value) {
206
+ this.selectToday();
207
+ }
208
+ if (this.dropdown.dropdownWidth > 200 || this.dropdown.dropdownWidth < 200) {
209
+ this.dropdown.dropdownWidth = 250;
210
+ }
211
+ this.cdr.markForCheck();
212
+ });
213
+ }
214
+
215
+ ngAfterContentInit(): void {
216
+ this.initValidation(this.ref, 'value', this.validation);
217
+ }
218
+
219
+ clear() {
220
+ this.userChange = true;
221
+ this.value = null;
222
+ }
223
+
224
+ userChange: boolean = false;
225
+
226
+ @Output()
227
+ onValueChanged: EventEmitter<AXDataPickerChangeEvent> = new EventEmitter<AXDataPickerChangeEvent>();
228
+
229
+ @Output()
230
+ valueChange: EventEmitter<Date> = new EventEmitter<Date>();
231
+
232
+ private _value: AXDateTime;
233
+ @Input()
234
+ public get value(): Date {
235
+ return this._value?.date;
236
+ }
237
+ public set value(v: Date) {
238
+ this.validate();
239
+ const oldValue = this._value;
240
+ const old = this.value;
241
+
242
+ if (v) {
243
+ this._value = new AXDateTime(v, this.type);
244
+ } else {
245
+ this._value = null;
246
+ }
247
+ let unValidDate = false;
248
+ if (this.max || this.min) {
249
+ unValidDate = this.isInMInMaxRange(AXDateTime.convert(v));
250
+ }
251
+
252
+ if (!unValidDate) {
253
+ if ((!v && oldValue) || (this._value && !this._value.equal(oldValue, 'day'))) {
254
+ this.text = this._value?.toString();
255
+ setTimeout(() => {
256
+ this.valueChange.emit(v);
257
+ this.onValueChanged.emit({
258
+ component: this,
259
+ oldValue: old,
260
+ value: v,
261
+ isUserChange: this.userChange
262
+ });
263
+ }, 100);
264
+ }
265
+ } else {
266
+ this.text = '';
267
+ }
268
+ this.userChange = false;
269
+ }
270
+
271
+ private _setDateType() {
272
+ switch (this.dateType) {
273
+ case 'yyyyMMdd':
274
+ this.dateType = {
275
+ guide: true,
276
+ showMask: true,
277
+ mask: this.yyyyMMdd,
278
+ keepCharPositions: true
279
+ };
280
+ break;
281
+ case 'ddMMyyyy':
282
+ this.dateType = {
283
+ guide: true,
284
+ showMask: true,
285
+ mask: this.ddMMyyyy,
286
+ keepCharPositions: true
287
+ };
288
+ break;
289
+ case 'yyyyddMM':
290
+ this.dateType = {
291
+ guide: true,
292
+ showMask: true,
293
+ mask: this.yyyyddMM,
294
+ keepCharPositions: true
295
+ };
296
+ break;
297
+
298
+ default:
299
+ if (this.type == 'gregorian') {
300
+ this.dateType = {
301
+ guide: true,
302
+ showMask: true,
303
+ mask: this.ddMMyyyy,
304
+ keepCharPositions: true
305
+ };
306
+ } else if (this.type == 'jalali') {
307
+ this.dateType = {
308
+ guide: true,
309
+ showMask: true,
310
+ mask: this.yyyyMMdd,
311
+ keepCharPositions: true
312
+ };
313
+ }
314
+ break;
315
+ }
316
+ }
317
+
318
+ isInMInMaxRange(d) {
319
+ let r = false;
320
+ if (d !== undefined) {
321
+ if (this.min && !this.max) {
322
+ r = d.compaireNew(new AXDateTime(this.min, this.type), 'YMD', this.type) === -1;
323
+ }
324
+ if (this.max && !this.min) {
325
+ r = d.compaireNew(new AXDateTime(this.max, this.type), 'YMD', this.type) === 1;
326
+ }
327
+ if (this.min && this.max) {
328
+ r =
329
+ d.compaireNew(new AXDateTime(this.min, this.type), 'YMD', this.type) === -1 ||
330
+ d.compaireNew(new AXDateTime(this.max, this.type), 'YMD', this.type) === 1;
331
+ }
332
+ }
333
+ return r;
334
+ }
335
+
336
+ onDateChange(e) {
337
+ this.userChange = true;
338
+ this.dropdown.close();
339
+
340
+ //this.clearValidationStyle(this.ref.nativeElement);
341
+ }
342
+
343
+ onClick(e) {
344
+ this.userChange = true;
345
+ this.dropdown.close();
346
+ }
347
+
348
+ onStartfocus() {
349
+ if (this.text == undefined || this.text == null || this.text == '') {
350
+ this.input.input.nativeElement.style.caretColor = 'transparent';
351
+ setTimeout(() => {
352
+ this.setCaretPosition(this.input.input.nativeElement, 0);
353
+ this.cursorPosition = 0;
354
+ this.input.input.nativeElement.style.caretColor = 'auto';
355
+ }, 0);
356
+ }
357
+ }
358
+
359
+ handleInputFocus() {
360
+ if (this.openByClick) {
361
+ this._renderPicker = true;
362
+ this.dropdown.open();
363
+ } else {
364
+ this.onStartfocus();
365
+ }
366
+
367
+ // this.input.input.nativeElement.focus();
368
+ }
369
+ handleInputBlur() {
370
+ if (this.text && this.text.indexOf('_') != -1) {
371
+ this.text = '';
372
+ this.value = null;
373
+ }
374
+ }
375
+
376
+ handleButtonClick() {
377
+ this._renderPicker = true;
378
+ setTimeout(() => {
379
+ this.dropdown.toggle();
380
+ });
381
+ }
382
+
383
+ handleKeyPress(e: KeyboardEvent) {
384
+ if (e.type == 'keydown' || e.type == 'keypress' || e.type == 'keyup') {
385
+ if (e.key === 'Delete') {
386
+ e.preventDefault();
387
+ }
388
+ if (e.key === 'Backspace') {
389
+ }
390
+ if (e.key === 'ArrowLeft' || e.key === 'ArrowRight') {
391
+ if (this.input.input.nativeElement.selectionStart || this.input.input.nativeElement.selectionStart === 0) {
392
+ this.cursorPosition = this.input.input.nativeElement.selectionStart;
393
+ }
394
+ }
395
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
396
+ e.preventDefault();
397
+ e.stopPropagation();
398
+ }
399
+ }
400
+
401
+ const inputChar = String.fromCharCode(e.charCode);
402
+ if (this.text != undefined) {
403
+ const ind1 = this.text.charAt(0);
404
+ const ind2 = this.text.charAt(1);
405
+ const ind3 = this.text.charAt(2);
406
+ const ind4 = this.text.charAt(3);
407
+ const ind5 = this.text.charAt(4);
408
+ const ind6 = this.text.charAt(5);
409
+ const ind7 = this.text.charAt(6);
410
+ const ind8 = this.text.charAt(7);
411
+ const ind9 = this.text.charAt(8);
412
+ const ind10 = this.text.charAt(9);
413
+ switch (this.dateType.mask) {
414
+ case this.yyyyMMdd:
415
+ if (e.type == 'keypress') {
416
+ this.handleClick();
417
+ if (
418
+ (ind6 == '1' && ind7 == '_' && inputChar >= '3') ||
419
+ (((ind6 == '0' && ind7 == '_') || (ind9 == '0' && ind10 == '_')) && inputChar == '0')
420
+ ) {
421
+ e.preventDefault();
422
+ } else if (ind9 == '3' && ind10 == '_') {
423
+ if (ind6 + ind7 <= '06' && inputChar >= '2') {
424
+ e.preventDefault();
425
+ } else if (ind6 + ind7 > '06' && inputChar >= '1') {
426
+ e.preventDefault();
427
+ }
428
+ }
429
+ }
430
+ if (this.text.indexOf('_') === -1 && this.text !== '') {
431
+ if (e.type === 'keydown') {
432
+ if (e.key === 'ArrowUp') {
433
+ if (this.cursorPosition <= 4) {
434
+ this.text = String(Number(ind1 + ind2 + ind3 + ind4) + 1) + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
435
+ }
436
+ if (this.cursorPosition >= 5 && this.cursorPosition <= 7) {
437
+ if (Number(ind6 + ind7) < 12) {
438
+ if (Number(ind6 + ind7) < 9) {
439
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '0' + String(Number(ind6 + ind7) + 1) + ind8 + ind9 + ind10;
440
+ } else {
441
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + String(Number(ind6 + ind7) + 1) + ind8 + ind9 + ind10;
442
+ }
443
+ } else {
444
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '01' + ind8 + ind9 + ind10;
445
+ }
446
+ }
447
+ if (this.cursorPosition >= 8) {
448
+ if (Number(ind9 + ind10) < 31) {
449
+ if (Number(ind9 + ind10) < 9) {
450
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '0' + String(Number(ind9 + ind10) + 1);
451
+ } else {
452
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + String(Number(ind9 + ind10) + 1);
453
+ }
454
+ } else {
455
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '01';
456
+ }
457
+ }
458
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
459
+ // setTimeout(() => {
460
+ // this.setCaret();
461
+ // e.preventDefault();
462
+ // this.input.input.nativeElement.style.caretColor = 'auto';
463
+ // }, 0);
464
+ // e.preventDefault();
465
+ } else if (e.key === 'ArrowDown') {
466
+ if (this.cursorPosition <= 4) {
467
+ this.text = String(Number(ind1 + ind2 + ind3 + ind4) - 1) + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
468
+ } else if (this.cursorPosition > 4 && this.cursorPosition <= 7) {
469
+ if (Number(ind6 + ind7) > 1) {
470
+ if (Number(ind6 + ind7) < 11) {
471
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '0' + String(Number(ind6 + ind7) - 1) + ind8 + ind9 + ind10;
472
+ } else {
473
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + String(Number(ind6 + ind7) - 1) + ind8 + ind9 + ind10;
474
+ }
475
+ } else {
476
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '12' + ind8 + ind9 + ind10;
477
+ }
478
+ } else if (this.cursorPosition >= 8) {
479
+ if (Number(ind9 + ind10) > 1) {
480
+ if (Number(ind9 + ind10) < 11) {
481
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '0' + String(Number(ind9 + ind10) - 1);
482
+ } else {
483
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + String(Number(ind9 + ind10) - 1);
484
+ }
485
+ } else {
486
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '31';
487
+ }
488
+ }
489
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
490
+
491
+ // setTimeout(() => {
492
+ // this.setCaret();
493
+ // this.input.input.nativeElement.style.caretColor = 'auto';
494
+ // }, 0);
495
+ }
496
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
497
+ this.input.input.nativeElement.style.caretColor = 'transparent';
498
+ e.preventDefault();
499
+ e.stopPropagation();
500
+ return false;
501
+ }
502
+ }
503
+ }
504
+ if (e.type === 'keyup') {
505
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
506
+ this.setCaret();
507
+ this.input.input.nativeElement.style.caretColor = 'auto';
508
+ e.preventDefault();
509
+ e.stopPropagation();
510
+ }
511
+ }
512
+ break;
513
+ case this.ddMMyyyy:
514
+ if (e.type === 'keypress') {
515
+ this.handleClick();
516
+ if (
517
+ (ind4 == '1' && ind5 == '_' && inputChar >= '3') ||
518
+ (((ind1 == '0' && ind2 == '_') || (ind4 == '0' && ind5 == '_')) && inputChar == '0')
519
+ ) {
520
+ e.preventDefault();
521
+ } else {
522
+ if (ind1 == '3' && ind2 == '_' && inputChar >= '2') {
523
+ e.preventDefault();
524
+ }
525
+ }
526
+ }
527
+ if (this.text.indexOf('_') === -1 && this.text !== '') {
528
+ if (e.type === 'keydown') {
529
+ if (e.key === 'ArrowUp') {
530
+ if (this.cursorPosition >= 6) {
531
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + String(Number(ind7 + ind8 + ind9 + ind10) + 1);
532
+ }
533
+ if (this.cursorPosition > 2 && this.cursorPosition <= 5) {
534
+ if (Number(ind4 + ind5) < 12) {
535
+ if (Number(ind4 + ind5) < 9) {
536
+ this.text = ind1 + ind2 + ind3 + '0' + String(Number(ind4 + ind5) + 1) + ind6 + ind7 + ind8 + ind9 + ind10;
537
+ } else {
538
+ this.text = ind1 + ind2 + ind3 + String(Number(ind4 + ind5) + 1) + ind6 + ind7 + ind8 + ind9 + ind10;
539
+ }
540
+ } else {
541
+ this.text = ind1 + ind2 + ind3 + '01' + ind6 + ind7 + ind8 + ind9 + ind10;
542
+ }
543
+ }
544
+ if (this.cursorPosition <= 2) {
545
+ if (Number(ind1 + ind2) < 31) {
546
+ if (Number(ind1 + ind2) < 9) {
547
+ this.text = '0' + String(Number(ind1 + ind2) + 1) + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
548
+ } else {
549
+ this.text = String(Number(ind1 + ind2) + 1) + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
550
+ }
551
+ } else {
552
+ this.text = '01' + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
553
+ }
554
+ }
555
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
556
+ // setTimeout(() => {
557
+ // this.setCaret();
558
+ // this.input.input.nativeElement.style.caretColor = 'auto';
559
+ // }, 0);
560
+ } else if (e.key === 'ArrowDown') {
561
+ if (this.cursorPosition >= 6) {
562
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + String(Number(ind7 + ind8 + ind9 + ind10) - 1);
563
+ } else if (this.cursorPosition > 2 && this.cursorPosition <= 5) {
564
+ if (Number(ind4 + ind5) > 1) {
565
+ if (Number(ind4 + ind5) < 11) {
566
+ this.text = ind1 + ind2 + ind3 + '0' + String(Number(ind4 + ind5) - 1) + ind6 + ind7 + ind8 + ind9 + ind10;
567
+ } else {
568
+ this.text = ind1 + ind2 + ind3 + String(Number(ind4 + ind5) - 1) + ind6 + ind7 + ind8 + ind9 + ind10;
569
+ }
570
+ } else {
571
+ this.text = ind1 + ind2 + ind3 + '12' + ind6 + ind7 + ind8 + ind9 + ind10;
572
+ }
573
+ } else if (this.cursorPosition <= 2) {
574
+ if (Number(ind1 + ind2) > 1) {
575
+ if (Number(ind1 + ind2) < 11) {
576
+ this.text = '0' + String(Number(ind1 + ind2) - 1) + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
577
+ } else {
578
+ this.text = String(Number(ind1 + ind2) - 1) + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
579
+ }
580
+ } else {
581
+ this.text = '31' + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
582
+ }
583
+ }
584
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
585
+ // setTimeout(() => {
586
+ // this.setCaret();
587
+ // this.input.input.nativeElement.style.caretColor = 'auto';
588
+ // }, 0);
589
+ }
590
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
591
+ this.input.input.nativeElement.style.caretColor = 'transparent';
592
+ e.preventDefault();
593
+ e.stopPropagation();
594
+ return false;
595
+ }
596
+ }
597
+ }
598
+ if (e.type === 'keyup') {
599
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
600
+ this.setCaret();
601
+ this.input.input.nativeElement.style.caretColor = 'auto';
602
+ e.preventDefault();
603
+ e.stopPropagation();
604
+ }
605
+ }
606
+ break;
607
+
608
+ case this.yyyyddMM:
609
+ if (e.type === 'keypress') {
610
+ if (
611
+ (ind9 === '1' && ind10 == '_' && inputChar >= '3') ||
612
+ (((ind6 == '0' && ind7 == '_') || (ind9 == '0' && ind10)) && inputChar == '0')
613
+ ) {
614
+ e.preventDefault();
615
+ } else if (ind6 == '3' && ind7 == '_' && inputChar >= '2') {
616
+ e.preventDefault();
617
+ }
618
+ setTimeout(() => {
619
+ this.handleClick();
620
+ }, 0);
621
+ }
622
+ if (this.text.indexOf('_') === -1 && this.text !== '') {
623
+ if (e.type === 'keydown') {
624
+ if (e.key === 'ArrowUp') {
625
+ if (this.cursorPosition <= 4) {
626
+ this.text = String(Number(ind1 + ind2 + ind3 + ind4) + 1) + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
627
+ }
628
+ if (this.cursorPosition > 4 && this.cursorPosition <= 7) {
629
+ if (Number(ind6 + ind7) < 31) {
630
+ if (Number(ind6 + ind7) < 9) {
631
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '0' + String(Number(ind6 + ind7) + 1) + ind8 + ind9 + ind10;
632
+ } else {
633
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + String(Number(ind6 + ind7) + 1) + ind8 + ind9 + ind10;
634
+ }
635
+ } else {
636
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '01' + ind8 + ind9 + ind10;
637
+ }
638
+ }
639
+ if (this.cursorPosition >= 8) {
640
+ if (Number(ind9 + ind10) < 12) {
641
+ if (Number(ind9 + ind10) < 9) {
642
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '0' + String(Number(ind9 + ind10) + 1);
643
+ } else {
644
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + String(Number(ind9 + ind10) + 1);
645
+ }
646
+ } else {
647
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '01';
648
+ }
649
+ }
650
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
651
+ // setTimeout(() => {
652
+ // this.setCaret();
653
+ // this.input.input.nativeElement.style.caretColor = 'auto';
654
+ // }, 0);
655
+ } else if (e.key === 'ArrowDown') {
656
+ if (this.cursorPosition <= 4) {
657
+ this.text = String(Number(ind1 + ind2 + ind3 + ind4) - 1) + ind5 + ind6 + ind7 + ind8 + ind9 + ind10;
658
+ } else if (this.cursorPosition > 4 && this.cursorPosition <= 7) {
659
+ if (Number(ind6 + ind7) > 1) {
660
+ if (Number(ind6 + ind7) < 11) {
661
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '0' + String(Number(ind6 + ind7) - 1) + ind8 + ind9 + ind10;
662
+ } else {
663
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + String(Number(ind6 + ind7) - 1) + ind8 + ind9 + ind10;
664
+ }
665
+ } else {
666
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + '31' + ind8 + ind9 + ind10;
667
+ }
668
+ } else if (this.cursorPosition >= 8) {
669
+ if (Number(ind9 + ind10) > 1) {
670
+ if (Number(ind9 + ind10) < 11) {
671
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '0' + String(Number(ind9 + ind10) - 1);
672
+ } else {
673
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + String(Number(ind9 + ind10) - 1);
674
+ }
675
+ } else {
676
+ this.text = ind1 + ind2 + ind3 + ind4 + ind5 + ind6 + ind7 + ind8 + '12';
677
+ }
678
+ }
679
+ // this.input.input.nativeElement.style.caretColor = 'transparent';
680
+ // setTimeout(() => {
681
+ // this.setCaret();
682
+ // this.input.input.nativeElement.style.caretColor = 'auto';
683
+ // }, 0);
684
+ }
685
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
686
+ this.input.input.nativeElement.style.caretColor = 'transparent';
687
+ e.preventDefault();
688
+ e.stopPropagation();
689
+ return false;
690
+ }
691
+ }
692
+ }
693
+ if (e.type === 'keyup') {
694
+ if (e.key === 'ArrowUp' || e.key === 'ArrowDown') {
695
+ this.setCaret();
696
+ this.input.input.nativeElement.style.caretColor = 'auto';
697
+ e.preventDefault();
698
+ e.stopPropagation();
699
+ }
700
+ }
701
+ break;
702
+ default:
703
+ break;
704
+ }
705
+ }
706
+ }
707
+ handleClick() {
708
+ if (this.input.input.nativeElement.selectionStart || this.input.input.nativeElement.selectionStart === 0) {
709
+ this.cursorPosition = this.input.input.nativeElement.selectionStart;
710
+ }
711
+ }
712
+
713
+ setCaretPosition(ctrl, pos) {
714
+ if (ctrl.setSelectionRange) {
715
+ ctrl.focus();
716
+ ctrl.setSelectionRange(pos, pos);
717
+ }
718
+ }
719
+
720
+ setCaret() {
721
+ this.setCaretPosition(this.input.input.nativeElement, this.cursorPosition);
722
+ }
723
+ }