@acorex/components 5.0.5 → 5.0.9

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 (498) hide show
  1. package/acorex-components.d.ts +5 -0
  2. package/bundles/acorex-components.umd.js +7633 -0
  3. package/bundles/acorex-components.umd.js.map +1 -0
  4. package/esm2015/acorex-components.js +5 -0
  5. package/esm2015/lib/alert/alert-button.component.js +52 -0
  6. package/esm2015/lib/alert/alert-contnet.component.js +21 -0
  7. package/esm2015/lib/alert/alert-footer.component.js +27 -0
  8. package/esm2015/lib/alert/alert-suffix.component.js +27 -0
  9. package/esm2015/lib/alert/alert-title.component.js +23 -0
  10. package/esm2015/lib/alert/alert.component.js +130 -0
  11. package/esm2015/lib/alert/alert.module.js +43 -0
  12. package/esm2015/lib/alert/index.js +8 -0
  13. package/esm2015/lib/avatar/avatar.component.js +55 -0
  14. package/esm2015/lib/avatar/avatar.module.js +21 -0
  15. package/esm2015/lib/avatar/index.js +3 -0
  16. package/esm2015/lib/badge/badge.component.js +34 -0
  17. package/esm2015/lib/badge/badge.module.js +21 -0
  18. package/esm2015/lib/badge/index.js +3 -0
  19. package/esm2015/lib/base/common.module.js +18 -0
  20. package/esm2015/lib/base/custom-cdk-overlay.service.js +47 -0
  21. package/esm2015/lib/base/drawing.class.js +11 -0
  22. package/esm2015/lib/base/events.class.js +53 -0
  23. package/esm2015/lib/base/index.js +7 -0
  24. package/esm2015/lib/base/mixin/base-components.class.js +86 -0
  25. package/esm2015/lib/base/mixin/button-mixin.class.js +129 -0
  26. package/esm2015/lib/base/mixin/clickable-mixin.class.js +24 -0
  27. package/esm2015/lib/base/mixin/constratctor.js +2 -0
  28. package/esm2015/lib/base/mixin/datalist-component.class.js +97 -0
  29. package/esm2015/lib/base/mixin/dropdown-mixin.class.js +36 -0
  30. package/esm2015/lib/base/mixin/index.js +3 -0
  31. package/esm2015/lib/base/mixin/interactive-mixin.class.js +77 -0
  32. package/esm2015/lib/base/mixin/loading-mixin.class.js +18 -0
  33. package/esm2015/lib/base/mixin/mixin.class.js +22 -0
  34. package/esm2015/lib/base/mixin/selection-component.class.js +158 -0
  35. package/esm2015/lib/base/mixin/sizable-mixin.class.js +18 -0
  36. package/esm2015/lib/base/mixin/textbox-mixin.class.js +38 -0
  37. package/esm2015/lib/base/mixin/value-mixin.class.js +190 -0
  38. package/esm2015/lib/base/overlay.service.js +91 -0
  39. package/esm2015/lib/base/responsive.directive.js +34 -0
  40. package/esm2015/lib/base/styles.class.js +4 -0
  41. package/esm2015/lib/button/button-group.component.js +131 -0
  42. package/esm2015/lib/button/button-item.class.js +2 -0
  43. package/esm2015/lib/button/button-item.component.js +81 -0
  44. package/esm2015/lib/button/button.component.js +73 -0
  45. package/esm2015/lib/button/button.module.js +33 -0
  46. package/esm2015/lib/button/index.js +6 -0
  47. package/esm2015/lib/calendar/calendar.component.js +287 -0
  48. package/esm2015/lib/calendar/calendar.module.js +25 -0
  49. package/esm2015/lib/calendar/index.js +3 -0
  50. package/esm2015/lib/carousel/carousel-arrows.component.js +53 -0
  51. package/esm2015/lib/carousel/carousel-item.component.js +21 -0
  52. package/esm2015/lib/carousel/carousel-pager.component.js +74 -0
  53. package/esm2015/lib/carousel/carousel-splidejs.class.js +82 -0
  54. package/esm2015/lib/carousel/carousel.class.js +10 -0
  55. package/esm2015/lib/carousel/carousel.component.js +246 -0
  56. package/esm2015/lib/carousel/carousel.module.js +24 -0
  57. package/esm2015/lib/carousel/index.js +7 -0
  58. package/esm2015/lib/checkbox/checkbox.component.js +59 -0
  59. package/esm2015/lib/checkbox/checkbox.module.js +20 -0
  60. package/esm2015/lib/checkbox/index.js +3 -0
  61. package/esm2015/lib/datalist/datalist.component.js +81 -0
  62. package/esm2015/lib/datalist/datalist.module.js +22 -0
  63. package/esm2015/lib/datalist/index.js +3 -0
  64. package/esm2015/lib/datepicker/datepicker.component.js +80 -0
  65. package/esm2015/lib/datepicker/datepicker.module.js +23 -0
  66. package/esm2015/lib/datepicker/index.js +3 -0
  67. package/esm2015/lib/decorators/content.component.js +26 -0
  68. package/esm2015/lib/decorators/decorators.module.js +23 -0
  69. package/esm2015/lib/decorators/index.js +5 -0
  70. package/esm2015/lib/decorators/prefix.component.js +26 -0
  71. package/esm2015/lib/decorators/suffix.component.js +26 -0
  72. package/esm2015/lib/dialog/dialog.class.js +2 -0
  73. package/esm2015/lib/dialog/dialog.component.js +45 -0
  74. package/esm2015/lib/dialog/dialog.module.js +26 -0
  75. package/esm2015/lib/dialog/dialog.service.js +146 -0
  76. package/esm2015/lib/dialog/index.js +5 -0
  77. package/esm2015/lib/drawer/drawer-container.component.js +73 -0
  78. package/esm2015/lib/drawer/drawer-content.component.js +27 -0
  79. package/esm2015/lib/drawer/drawer.component.js +145 -0
  80. package/esm2015/lib/drawer/drawer.module.js +23 -0
  81. package/esm2015/lib/drawer/index.js +5 -0
  82. package/esm2015/lib/dropdown/dropdown-base.class.js +98 -0
  83. package/esm2015/lib/dropdown/dropdown-panel.component.js +84 -0
  84. package/esm2015/lib/dropdown/dropdown.component.js +32 -0
  85. package/esm2015/lib/dropdown/dropdown.module.js +25 -0
  86. package/esm2015/lib/dropdown/index.js +4 -0
  87. package/esm2015/lib/form/form-field.component.js +20 -0
  88. package/esm2015/lib/form/form-field.module.js +21 -0
  89. package/esm2015/lib/form/form-hint.component.js +20 -0
  90. package/esm2015/lib/form/form.component.js +51 -0
  91. package/esm2015/lib/form/index.js +5 -0
  92. package/esm2015/lib/icon/icon.component.js +28 -0
  93. package/esm2015/lib/icon/icon.module.js +21 -0
  94. package/esm2015/lib/icon/index.js +3 -0
  95. package/esm2015/lib/input-mask/index.js +3 -0
  96. package/esm2015/lib/input-mask/input-mask.component.js +42 -0
  97. package/esm2015/lib/input-mask/input-mask.module.js +23 -0
  98. package/esm2015/lib/label/index.js +3 -0
  99. package/esm2015/lib/label/label.component.js +20 -0
  100. package/esm2015/lib/label/label.module.js +21 -0
  101. package/esm2015/lib/loading/index.js +6 -0
  102. package/esm2015/lib/loading/loading-spinner.component.js +32 -0
  103. package/esm2015/lib/loading/loading.component.js +54 -0
  104. package/esm2015/lib/loading/loading.directive.js +67 -0
  105. package/esm2015/lib/loading/loading.module.js +35 -0
  106. package/esm2015/lib/loading/loading.service.js +155 -0
  107. package/esm2015/lib/number-box/index.js +3 -0
  108. package/esm2015/lib/number-box/number-box.component.js +289 -0
  109. package/esm2015/lib/number-box/number-box.module.js +32 -0
  110. package/esm2015/lib/page/base-page.class.js +67 -0
  111. package/esm2015/lib/page/index.js +5 -0
  112. package/esm2015/lib/page/page-footer.component.js +28 -0
  113. package/esm2015/lib/page/page.component.js +33 -0
  114. package/esm2015/lib/page/page.module.js +18 -0
  115. package/esm2015/lib/password-box/index.js +3 -0
  116. package/esm2015/lib/password-box/password-box.component.js +74 -0
  117. package/esm2015/lib/password-box/password-box.module.js +35 -0
  118. package/esm2015/lib/popover/index.js +3 -0
  119. package/esm2015/lib/popover/popover.component.js +220 -0
  120. package/esm2015/lib/popover/popover.module.js +19 -0
  121. package/esm2015/lib/popup/index.js +4 -0
  122. package/esm2015/lib/popup/popup.component.js +105 -0
  123. package/esm2015/lib/popup/popup.module.js +26 -0
  124. package/esm2015/lib/popup/popup.service.js +94 -0
  125. package/esm2015/lib/radio/index.js +3 -0
  126. package/esm2015/lib/radio/radio.component.js +22 -0
  127. package/esm2015/lib/radio/radio.module.js +21 -0
  128. package/esm2015/lib/range-slider/index.js +3 -0
  129. package/esm2015/lib/range-slider/range-slider.component.js +22 -0
  130. package/esm2015/lib/range-slider/range-slider.module.js +21 -0
  131. package/esm2015/lib/selectbox/index.js +3 -0
  132. package/esm2015/lib/selectbox/selectbox.component.js +201 -0
  133. package/esm2015/lib/selectbox/selectbox.module.js +25 -0
  134. package/esm2015/lib/selection-list/index.js +3 -0
  135. package/esm2015/lib/selection-list/selection-list.component.js +47 -0
  136. package/esm2015/lib/selection-list/selection-list.module.js +21 -0
  137. package/esm2015/lib/side-menu/index.js +3 -0
  138. package/esm2015/lib/side-menu/side-menu.component.js +21 -0
  139. package/esm2015/lib/side-menu/side-menu.module.js +21 -0
  140. package/esm2015/lib/switch/index.js +3 -0
  141. package/esm2015/lib/switch/switch.component.js +30 -0
  142. package/esm2015/lib/switch/switch.module.js +21 -0
  143. package/esm2015/lib/tabs/index.js +8 -0
  144. package/esm2015/lib/tabs/tab-content.directive.js +29 -0
  145. package/esm2015/lib/tabs/tab-item.component.js +91 -0
  146. package/esm2015/lib/tabs/tab-strip.component.js +69 -0
  147. package/esm2015/lib/tabs/tab-view.component.js +45 -0
  148. package/esm2015/lib/tabs/tab.component.js +58 -0
  149. package/esm2015/lib/tabs/tabs.class.js +4 -0
  150. package/esm2015/lib/tabs/tabs.component.js +67 -0
  151. package/esm2015/lib/tabs/tabs.module.js +25 -0
  152. package/esm2015/lib/textbox/index.js +3 -0
  153. package/esm2015/lib/textbox/textbox.component.js +62 -0
  154. package/esm2015/lib/textbox/textbox.module.js +43 -0
  155. package/esm2015/lib/time-box/index.js +3 -0
  156. package/esm2015/lib/time-box/time-box.component.js +134 -0
  157. package/esm2015/lib/time-box/time-box.module.js +32 -0
  158. package/esm2015/lib/toast/index.js +5 -0
  159. package/esm2015/lib/toast/toast.class.js +2 -0
  160. package/esm2015/lib/toast/toast.component.js +50 -0
  161. package/esm2015/lib/toast/toast.module.js +22 -0
  162. package/esm2015/lib/toast/toast.service.js +114 -0
  163. package/esm2015/lib/tooltip/index.js +4 -0
  164. package/esm2015/lib/tooltip/tooltip.component.js +45 -0
  165. package/esm2015/lib/tooltip/tooltip.directive.js +86 -0
  166. package/esm2015/lib/tooltip/tooltip.module.js +23 -0
  167. package/esm2015/lib/validation/index.js +3 -0
  168. package/esm2015/lib/validation/validation-rule.widget.js +113 -0
  169. package/esm2015/lib/validation/validation.class.js +2 -0
  170. package/esm2015/lib/validation/validation.module.js +32 -0
  171. package/esm2015/public-api.js +42 -0
  172. package/fesm2015/acorex-components.js +6537 -0
  173. package/fesm2015/acorex-components.js.map +1 -0
  174. package/lib/alert/alert-button.component.d.ts +13 -0
  175. package/lib/alert/alert-contnet.component.d.ts +5 -0
  176. package/lib/alert/alert-footer.component.d.ts +5 -0
  177. package/lib/alert/alert-suffix.component.d.ts +5 -0
  178. package/lib/alert/alert-title.component.d.ts +5 -0
  179. package/lib/alert/alert.component.d.ts +46 -0
  180. package/lib/alert/alert.module.d.ts +13 -0
  181. package/{src/lib/alert/index.ts → lib/alert/index.d.ts} +0 -0
  182. package/lib/avatar/avatar.component.d.ts +20 -0
  183. package/lib/avatar/avatar.module.d.ts +8 -0
  184. package/{src/lib/avatar/index.ts → lib/avatar/index.d.ts} +0 -0
  185. package/lib/badge/badge.component.d.ts +11 -0
  186. package/lib/badge/badge.module.d.ts +8 -0
  187. package/lib/badge/index.d.ts +2 -0
  188. package/lib/base/common.module.d.ts +7 -0
  189. package/lib/base/custom-cdk-overlay.service.d.ts +19 -0
  190. package/{src/lib/base/drawing.class.ts → lib/base/drawing.class.d.ts} +1 -12
  191. package/{src/lib/base/events.class.ts → lib/base/events.class.d.ts} +11 -20
  192. package/{src/lib/base/index.ts → lib/base/index.d.ts} +0 -0
  193. package/lib/base/mixin/base-components.class.d.ts +86 -0
  194. package/lib/base/mixin/button-mixin.class.d.ts +82 -0
  195. package/lib/base/mixin/clickable-mixin.class.d.ts +43 -0
  196. package/lib/base/mixin/constratctor.d.ts +4 -0
  197. package/lib/base/mixin/datalist-component.class.d.ts +55 -0
  198. package/lib/base/mixin/dropdown-mixin.class.d.ts +48 -0
  199. package/{src/lib/base/mixin/index.ts → lib/base/mixin/index.d.ts} +1 -1
  200. package/lib/base/mixin/interactive-mixin.class.d.ts +65 -0
  201. package/lib/base/mixin/loading-mixin.class.d.ts +47 -0
  202. package/lib/base/mixin/mixin.class.d.ts +607 -0
  203. package/lib/base/mixin/selection-component.class.d.ts +56 -0
  204. package/lib/base/mixin/sizable-mixin.class.d.ts +41 -0
  205. package/lib/base/mixin/textbox-mixin.class.d.ts +59 -0
  206. package/lib/base/mixin/value-mixin.class.d.ts +71 -0
  207. package/lib/base/overlay.service.d.ts +31 -0
  208. package/lib/base/responsive.directive.d.ts +10 -0
  209. package/lib/base/styles.class.d.ts +17 -0
  210. package/lib/button/button-group.component.d.ts +36 -0
  211. package/{src/lib/button/button-item.class.ts → lib/button/button-item.class.d.ts} +4 -6
  212. package/lib/button/button-item.component.d.ts +94 -0
  213. package/lib/button/button.component.d.ts +21 -0
  214. package/lib/button/button.module.d.ts +12 -0
  215. package/{src/lib/button/index.ts → lib/button/index.d.ts} +1 -1
  216. package/lib/calendar/calendar.component.d.ts +56 -0
  217. package/lib/calendar/calendar.module.d.ts +12 -0
  218. package/{src/lib/calendar/index.ts → lib/calendar/index.d.ts} +0 -0
  219. package/lib/carousel/carousel-arrows.component.d.ts +14 -0
  220. package/lib/carousel/carousel-item.component.d.ts +8 -0
  221. package/lib/carousel/carousel-pager.component.d.ts +22 -0
  222. package/lib/carousel/carousel-splidejs.class.d.ts +18 -0
  223. package/{src/lib/carousel/carousel.class.ts → lib/carousel/carousel.class.d.ts} +13 -32
  224. package/lib/carousel/carousel.component.d.ts +62 -0
  225. package/lib/carousel/carousel.module.d.ts +11 -0
  226. package/{src/lib/carousel/index.ts → lib/carousel/index.d.ts} +0 -0
  227. package/lib/checkbox/checkbox.component.d.ts +13 -0
  228. package/lib/checkbox/checkbox.module.d.ts +9 -0
  229. package/{src/lib/checkbox/index.ts → lib/checkbox/index.d.ts} +1 -1
  230. package/lib/datalist/datalist.component.d.ts +25 -0
  231. package/lib/datalist/datalist.module.d.ts +9 -0
  232. package/{src/lib/datalist/index.ts → lib/datalist/index.d.ts} +0 -0
  233. package/lib/datepicker/datepicker.component.d.ts +18 -0
  234. package/lib/datepicker/datepicker.module.d.ts +10 -0
  235. package/{src/lib/datepicker/index.ts → lib/datepicker/index.d.ts} +0 -0
  236. package/lib/decorators/content.component.d.ts +8 -0
  237. package/lib/decorators/decorators.module.d.ts +10 -0
  238. package/{src/lib/decorators/index.ts → lib/decorators/index.d.ts} +1 -0
  239. package/lib/decorators/prefix.component.d.ts +8 -0
  240. package/lib/decorators/suffix.component.d.ts +8 -0
  241. package/{src/lib/dialog/dialog.class.ts → lib/dialog/dialog.class.d.ts} +1 -2
  242. package/lib/dialog/dialog.component.d.ts +15 -0
  243. package/lib/dialog/dialog.module.d.ts +13 -0
  244. package/lib/dialog/dialog.service.d.ts +36 -0
  245. package/{src/lib/dialog/index.ts → lib/dialog/index.d.ts} +0 -0
  246. package/lib/drawer/drawer-container.component.d.ts +13 -0
  247. package/lib/drawer/drawer-content.component.d.ts +8 -0
  248. package/lib/drawer/drawer.component.d.ts +30 -0
  249. package/lib/drawer/drawer.module.d.ts +10 -0
  250. package/{src/lib/drawer/index.ts → lib/drawer/index.d.ts} +0 -0
  251. package/lib/dropdown/dropdown-base.class.d.ts +94 -0
  252. package/lib/dropdown/dropdown-panel.component.d.ts +28 -0
  253. package/lib/dropdown/dropdown.component.d.ts +13 -0
  254. package/lib/dropdown/dropdown.module.d.ts +14 -0
  255. package/{src/lib/dropdown/index.ts → lib/dropdown/index.d.ts} +1 -1
  256. package/lib/form/form-field.component.d.ts +8 -0
  257. package/lib/form/form-field.module.d.ts +10 -0
  258. package/lib/form/form-hint.component.d.ts +8 -0
  259. package/lib/form/form.component.d.ts +13 -0
  260. package/{src/lib/form/index.ts → lib/form/index.d.ts} +1 -1
  261. package/lib/icon/icon.component.d.ts +10 -0
  262. package/lib/icon/icon.module.d.ts +8 -0
  263. package/{src/lib/icon/index.ts → lib/icon/index.d.ts} +0 -0
  264. package/{src/lib/input-mask/index.ts → lib/input-mask/index.d.ts} +0 -0
  265. package/lib/input-mask/input-mask.component.d.ts +14 -0
  266. package/lib/input-mask/input-mask.module.d.ts +9 -0
  267. package/{src/lib/label/index.ts → lib/label/index.d.ts} +1 -1
  268. package/lib/label/label.component.d.ts +8 -0
  269. package/lib/label/label.module.d.ts +8 -0
  270. package/{src/lib/loading/index.ts → lib/loading/index.d.ts} +0 -0
  271. package/lib/loading/loading-spinner.component.d.ts +5 -0
  272. package/lib/loading/loading.component.d.ts +19 -0
  273. package/lib/loading/loading.directive.d.ts +22 -0
  274. package/lib/loading/loading.module.d.ts +13 -0
  275. package/lib/loading/loading.service.d.ts +48 -0
  276. package/{src/lib/number-box/index.ts → lib/number-box/index.d.ts} +0 -0
  277. package/lib/number-box/number-box.component.d.ts +69 -0
  278. package/lib/number-box/number-box.module.d.ts +11 -0
  279. package/lib/page/base-page.class.d.ts +37 -0
  280. package/{src/lib/page/index.ts → lib/page/index.d.ts} +0 -1
  281. package/lib/page/page-footer.component.d.ts +7 -0
  282. package/lib/page/page.component.d.ts +13 -0
  283. package/lib/page/page.module.d.ts +7 -0
  284. package/lib/password-box/index.d.ts +2 -0
  285. package/lib/password-box/password-box.component.d.ts +24 -0
  286. package/lib/password-box/password-box.module.d.ts +12 -0
  287. package/{src/lib/popover/index.ts → lib/popover/index.d.ts} +1 -2
  288. package/lib/popover/popover.component.d.ts +44 -0
  289. package/lib/popover/popover.module.d.ts +8 -0
  290. package/{src/lib/popup/index.ts → lib/popup/index.d.ts} +0 -0
  291. package/lib/popup/popup.component.d.ts +34 -0
  292. package/lib/popup/popup.module.d.ts +12 -0
  293. package/lib/popup/popup.service.d.ts +37 -0
  294. package/lib/radio/index.d.ts +2 -0
  295. package/lib/radio/radio.component.d.ts +8 -0
  296. package/lib/radio/radio.module.d.ts +8 -0
  297. package/{src/lib/range-slider/index.ts → lib/range-slider/index.d.ts} +0 -0
  298. package/lib/range-slider/range-slider.component.d.ts +8 -0
  299. package/lib/range-slider/range-slider.module.d.ts +8 -0
  300. package/{src/lib/selectbox/index.ts → lib/selectbox/index.d.ts} +1 -1
  301. package/lib/selectbox/selectbox.component.d.ts +29 -0
  302. package/lib/selectbox/selectbox.module.d.ts +14 -0
  303. package/{src/lib/selection-list/index.ts → lib/selection-list/index.d.ts} +1 -1
  304. package/lib/selection-list/selection-list.component.d.ts +10 -0
  305. package/lib/selection-list/selection-list.module.d.ts +10 -0
  306. package/{src/lib/side-menu/index.ts → lib/side-menu/index.d.ts} +0 -0
  307. package/lib/side-menu/side-menu.component.d.ts +8 -0
  308. package/lib/side-menu/side-menu.module.d.ts +8 -0
  309. package/{src/lib/switch/index.ts → lib/switch/index.d.ts} +1 -1
  310. package/lib/switch/switch.component.d.ts +9 -0
  311. package/lib/switch/switch.module.d.ts +9 -0
  312. package/{src/lib/tabs/index.ts → lib/tabs/index.d.ts} +3 -1
  313. package/lib/tabs/tab-content.directive.d.ts +11 -0
  314. package/lib/tabs/tab-item.component.d.ts +17 -0
  315. package/lib/tabs/tab-strip.component.d.ts +19 -0
  316. package/lib/tabs/tab-view.component.d.ts +14 -0
  317. package/lib/tabs/tab.component.d.ts +18 -0
  318. package/{src/lib/tabs/tabs.class.ts → lib/tabs/tabs.class.d.ts} +5 -8
  319. package/lib/tabs/tabs.component.d.ts +17 -0
  320. package/lib/tabs/tabs.module.d.ts +12 -0
  321. package/{src/lib/textbox/index.ts → lib/textbox/index.d.ts} +1 -1
  322. package/lib/textbox/textbox.component.d.ts +19 -0
  323. package/lib/textbox/textbox.module.d.ts +13 -0
  324. package/{src/lib/time-box/index.ts → lib/time-box/index.d.ts} +0 -0
  325. package/lib/time-box/time-box.component.d.ts +29 -0
  326. package/lib/time-box/time-box.module.d.ts +11 -0
  327. package/{src/lib/toast/index.ts → lib/toast/index.d.ts} +0 -0
  328. package/{src/lib/toast/toast.class.ts → lib/toast/toast.class.d.ts} +1 -4
  329. package/lib/toast/toast.component.d.ts +16 -0
  330. package/lib/toast/toast.module.d.ts +9 -0
  331. package/lib/toast/toast.service.d.ts +18 -0
  332. package/{src/lib/tooltip/index.ts → lib/tooltip/index.d.ts} +0 -0
  333. package/lib/tooltip/tooltip.component.d.ts +10 -0
  334. package/lib/tooltip/tooltip.directive.d.ts +18 -0
  335. package/lib/tooltip/tooltip.module.d.ts +10 -0
  336. package/{src/lib/validation/index.ts → lib/validation/index.d.ts} +1 -1
  337. package/lib/validation/validation-rule.widget.d.ts +25 -0
  338. package/lib/validation/validation.class.d.ts +17 -0
  339. package/lib/validation/validation.module.d.ts +9 -0
  340. package/package.json +19 -12
  341. package/{src/public-api.ts → public-api.d.ts} +5 -3
  342. package/karma.conf.js +0 -44
  343. package/ng-package.json +0 -11
  344. package/src/lib/alert/alert-button.component.ts +0 -45
  345. package/src/lib/alert/alert-contnet.component.ts +0 -14
  346. package/src/lib/alert/alert-footer.component.ts +0 -16
  347. package/src/lib/alert/alert-suffix.component.ts +0 -16
  348. package/src/lib/alert/alert-title.component.ts +0 -14
  349. package/src/lib/alert/alert.component.html +0 -13
  350. package/src/lib/alert/alert.component.ts +0 -139
  351. package/src/lib/alert/alert.module.ts +0 -26
  352. package/src/lib/avatar/avatar.component.html +0 -2
  353. package/src/lib/avatar/avatar.component.ts +0 -64
  354. package/src/lib/avatar/avatar.module.ts +0 -14
  355. package/src/lib/base/common.module.ts +0 -13
  356. package/src/lib/base/custom-cdk-overlay.service.ts +0 -83
  357. package/src/lib/base/mixin/base-components.class.ts +0 -112
  358. package/src/lib/base/mixin/button-mixin.class.ts +0 -145
  359. package/src/lib/base/mixin/clickable-mixin.class.ts +0 -33
  360. package/src/lib/base/mixin/constratctor.ts +0 -3
  361. package/src/lib/base/mixin/datalist-component.class.ts +0 -105
  362. package/src/lib/base/mixin/dropdown-mixin.class.ts +0 -55
  363. package/src/lib/base/mixin/interactive-mixin.class.ts +0 -83
  364. package/src/lib/base/mixin/loading-mixin.class.ts +0 -32
  365. package/src/lib/base/mixin/mixin.class.ts +0 -70
  366. package/src/lib/base/mixin/page-component.class.ts +0 -15
  367. package/src/lib/base/mixin/selection-component.class.ts +0 -185
  368. package/src/lib/base/mixin/sizable-mixin.class.ts +0 -30
  369. package/src/lib/base/mixin/textbox-mixin.class.ts +0 -51
  370. package/src/lib/base/mixin/value-mixin.class.ts +0 -215
  371. package/src/lib/base/overlay.service.ts +0 -117
  372. package/src/lib/base/responsive.directive.ts +0 -31
  373. package/src/lib/base/styles.class.ts +0 -24
  374. package/src/lib/button/button-group.component.html +0 -2
  375. package/src/lib/button/button-group.component.ts +0 -142
  376. package/src/lib/button/button-item.component.ts +0 -79
  377. package/src/lib/button/button.component.html +0 -18
  378. package/src/lib/button/button.component.ts +0 -71
  379. package/src/lib/button/button.module.ts +0 -23
  380. package/src/lib/calendar/calendar.component.html +0 -74
  381. package/src/lib/calendar/calendar.component.ts +0 -60
  382. package/src/lib/calendar/calendar.module.ts +0 -17
  383. package/src/lib/carousel/carousel-arrows.component.ts +0 -46
  384. package/src/lib/carousel/carousel-item.component.ts +0 -19
  385. package/src/lib/carousel/carousel-pager.component.ts +0 -83
  386. package/src/lib/carousel/carousel-splidejs.class.ts +0 -104
  387. package/src/lib/carousel/carousel.component.html +0 -11
  388. package/src/lib/carousel/carousel.component.ts +0 -273
  389. package/src/lib/carousel/carousel.module.ts +0 -19
  390. package/src/lib/checkbox/checkbox.component.html +0 -15
  391. package/src/lib/checkbox/checkbox.component.ts +0 -43
  392. package/src/lib/checkbox/checkbox.module.ts +0 -11
  393. package/src/lib/datalist/datalist.component.html +0 -35
  394. package/src/lib/datalist/datalist.component.ts +0 -86
  395. package/src/lib/datalist/datalist.module.ts +0 -17
  396. package/src/lib/datapager/datapager-base.component.ts +0 -29
  397. package/src/lib/datapager/datapager-dots-selector.component.ts +0 -0
  398. package/src/lib/datapager/datapager-info.component.ts +0 -64
  399. package/src/lib/datapager/datapager-input-selector.component.ts +0 -54
  400. package/src/lib/datapager/datapager-next-buttons.components.ts +0 -52
  401. package/src/lib/datapager/datapager-numeric-selector.component.ts +0 -94
  402. package/src/lib/datapager/datapager-pagesize-dropdown.component.ts +0 -77
  403. package/src/lib/datapager/datapager-prev-buttons.component.ts +0 -50
  404. package/src/lib/datapager/datapager.component.html +0 -19
  405. package/src/lib/datapager/datapager.component.ts +0 -146
  406. package/src/lib/datapager/datapager.module.ts +0 -32
  407. package/src/lib/datapager/index.ts +0 -8
  408. package/src/lib/datepicker/datepicker.component.html +0 -11
  409. package/src/lib/datepicker/datepicker.component.ts +0 -86
  410. package/src/lib/datepicker/datepicker.module.ts +0 -16
  411. package/src/lib/decorators/decorators.module.ts +0 -15
  412. package/src/lib/decorators/prefix.component.ts +0 -23
  413. package/src/lib/decorators/suffix.component.ts +0 -25
  414. package/src/lib/dialog/dialog.component.html +0 -22
  415. package/src/lib/dialog/dialog.component.ts +0 -48
  416. package/src/lib/dialog/dialog.module.ts +0 -19
  417. package/src/lib/dialog/dialog.service.ts +0 -154
  418. package/src/lib/drawer/drawer-container.component.ts +0 -69
  419. package/src/lib/drawer/drawer-content.component.ts +0 -24
  420. package/src/lib/drawer/drawer.component.ts +0 -156
  421. package/src/lib/drawer/drawer.module.ts +0 -16
  422. package/src/lib/dropdown/dropdown-base.class.ts +0 -107
  423. package/src/lib/dropdown/dropdown-panel.component.html +0 -15
  424. package/src/lib/dropdown/dropdown-panel.component.ts +0 -105
  425. package/src/lib/dropdown/dropdown.component.html +0 -19
  426. package/src/lib/dropdown/dropdown.component.ts +0 -31
  427. package/src/lib/dropdown/dropdown.module.ts +0 -17
  428. package/src/lib/form/form-field.component.ts +0 -18
  429. package/src/lib/form/form-field.module.ts +0 -14
  430. package/src/lib/form/form-hint.component.ts +0 -18
  431. package/src/lib/form/form.component.ts +0 -54
  432. package/src/lib/icon/icon.component.ts +0 -27
  433. package/src/lib/icon/icon.module.ts +0 -14
  434. package/src/lib/input-mask/input-mask.component.ts +0 -43
  435. package/src/lib/input-mask/input-mask.module.ts +0 -15
  436. package/src/lib/label/label.component.html +0 -3
  437. package/src/lib/label/label.component.ts +0 -16
  438. package/src/lib/label/label.module.ts +0 -14
  439. package/src/lib/loading/loading-spinner.component.ts +0 -17
  440. package/src/lib/loading/loading.component.ts +0 -55
  441. package/src/lib/loading/loading.directive.ts +0 -86
  442. package/src/lib/loading/loading.module.ts +0 -32
  443. package/src/lib/loading/loading.service.ts +0 -172
  444. package/src/lib/number-box/number-box.component.html +0 -15
  445. package/src/lib/number-box/number-box.component.ts +0 -297
  446. package/src/lib/number-box/number-box.module.ts +0 -22
  447. package/src/lib/page/base-page.class.ts +0 -80
  448. package/src/lib/page/page-footer.component.ts +0 -19
  449. package/src/lib/page/page.component.ts +0 -32
  450. package/src/lib/page/page.module.ts +0 -11
  451. package/src/lib/popover/popover.component.html +0 -3
  452. package/src/lib/popover/popover.component.ts +0 -229
  453. package/src/lib/popover/popover.module.ts +0 -11
  454. package/src/lib/popup/popup.component.html +0 -25
  455. package/src/lib/popup/popup.component.ts +0 -118
  456. package/src/lib/popup/popup.module.ts +0 -19
  457. package/src/lib/popup/popup.service.ts +0 -112
  458. package/src/lib/range-slider/range-slider.component.html +0 -1
  459. package/src/lib/range-slider/range-slider.component.ts +0 -21
  460. package/src/lib/range-slider/range-slider.module.ts +0 -14
  461. package/src/lib/selectbox/selectbox.component.html +0 -63
  462. package/src/lib/selectbox/selectbox.component.ts +0 -211
  463. package/src/lib/selectbox/selectbox.module.ts +0 -15
  464. package/src/lib/selection-list/selection-list.component.html +0 -31
  465. package/src/lib/selection-list/selection-list.component.ts +0 -56
  466. package/src/lib/selection-list/selection-list.module.ts +0 -13
  467. package/src/lib/side-menu/side-menu.component.html +0 -2
  468. package/src/lib/side-menu/side-menu.component.ts +0 -20
  469. package/src/lib/side-menu/side-menu.module.ts +0 -14
  470. package/src/lib/switch/switch.component.html +0 -8
  471. package/src/lib/switch/switch.component.ts +0 -25
  472. package/src/lib/switch/switch.module.ts +0 -15
  473. package/src/lib/tabs/tab-strip.component.html +0 -20
  474. package/src/lib/tabs/tab-strip.component.ts +0 -71
  475. package/src/lib/tabs/tab-view.component.html +0 -8
  476. package/src/lib/tabs/tab-view.component.ts +0 -50
  477. package/src/lib/tabs/tab.component.ts +0 -56
  478. package/src/lib/tabs/tabs.module.ts +0 -16
  479. package/src/lib/textbox/textbox.component.html +0 -20
  480. package/src/lib/textbox/textbox.component.ts +0 -64
  481. package/src/lib/textbox/textbox.module.ts +0 -24
  482. package/src/lib/time-box/time-box.component.html +0 -14
  483. package/src/lib/time-box/time-box.component.ts +0 -145
  484. package/src/lib/time-box/time-box.module.ts +0 -22
  485. package/src/lib/toast/toast.component.html +0 -12
  486. package/src/lib/toast/toast.component.ts +0 -57
  487. package/src/lib/toast/toast.module.ts +0 -15
  488. package/src/lib/toast/toast.service.ts +0 -122
  489. package/src/lib/tooltip/tooltip.component.html +0 -6
  490. package/src/lib/tooltip/tooltip.component.ts +0 -36
  491. package/src/lib/tooltip/tooltip.directive.ts +0 -93
  492. package/src/lib/tooltip/tooltip.module.ts +0 -16
  493. package/src/lib/validation/validation-rule.widget.ts +0 -120
  494. package/src/lib/validation/validation.class.ts +0 -23
  495. package/src/lib/validation/validation.module.ts +0 -26
  496. package/tsconfig.lib.json +0 -20
  497. package/tsconfig.lib.prod.json +0 -10
  498. package/tsconfig.spec.json +0 -17
@@ -1,185 +0,0 @@
1
- import { AXObjectUtil } from '@acorex/core';
2
- import { EventEmitter } from '@angular/core';
3
- import { AXSelectionValueChangedEvent } from '../events.class';
4
- import { AXBaseComponent } from './base-components.class';
5
- import { Constructor } from './constratctor';
6
-
7
- export function _SelectionComponenetMixin<TBase extends Constructor<AXBaseComponent>>(Base: TBase) {
8
- return class extends Base {
9
-
10
- valueField: string = 'id';
11
- textField: string | string[] = 'text';
12
- multiple: boolean = false;
13
- selectionMode: 'value' | 'item' = 'value';
14
-
15
- // for data-list
16
- get items(): any[] {
17
- return [];
18
- }
19
-
20
- get displayItems(): any[] {
21
- return [];
22
- }
23
-
24
-
25
- public valueChange: EventEmitter<any> = new EventEmitter<any>();
26
- public onValueChanged: EventEmitter<AXSelectionValueChangedEvent> = new EventEmitter<AXSelectionValueChangedEvent>();
27
-
28
-
29
- constructor(...args: any[]) {
30
- super(...args)
31
- }
32
-
33
- _onInternalInit() {
34
- super._onInternalInit();
35
- }
36
-
37
-
38
- _value: any | any[];
39
- get value(): any | any[] {
40
- return this._value;
41
- }
42
- set value(v: any | any[]) {
43
- if (v !== this._value) {
44
- const oldValue = AXObjectUtil.deepJSONClone(this._value);
45
- if (this.multiple) {
46
- this._value = Array.isArray(v) ? v : (v ? [v] : []);
47
- } else {
48
- this._value = Array.isArray(v) ? v[0] : v;
49
- }
50
- this.valueChange.emit(this._value);
51
- this.onValueChanged.emit({
52
- component: this,
53
- htmlElement: this._getHostElement(),
54
- isUserInput: false,
55
- oldValue,
56
- value: this._value,
57
- selectedKeys: this.selectedItems.map(c => c[this.valueField]),
58
- selectedItems: this.selectedItems.slice()
59
- });
60
- if (v == null || v == undefined || v == "") {
61
- (this as any)._setErrorState('clear');
62
- }
63
- else {
64
- if (this._isInited) {
65
- (this as any).validate();
66
- }
67
- }
68
- this._renderSelection();
69
- }
70
- }
71
-
72
- _selectedItems: any[];
73
- get selectedItems(): any[] {
74
- return this._selectedItems || [];
75
- }
76
-
77
- _renderSelection() {
78
- const func = () => {
79
- if (this.value == null || this.value == undefined) {
80
- return [];
81
- }
82
- if (this.displayItems.length > 0) {
83
- return this.displayItems.filter(i => {
84
-
85
- if (Array.isArray(this.value)) {
86
- return this.value.some(ii => {
87
- if (typeof ii === 'object') {
88
- return i[this.valueField] === ii[this.valueField];
89
- }
90
- else {
91
- return i[this.valueField] === ii;
92
- }
93
- });
94
- }
95
- else {
96
- if (typeof this.value === 'object') {
97
- return i[this.valueField] === this.value[this.valueField];
98
- }
99
- else {
100
- return i[this.valueField] === this.value;
101
- }
102
- }
103
- });
104
- }
105
- if (Array.isArray(this.value)) {
106
- return this.value.map(ii => () => {
107
- //&& ii[this.textField]
108
- if (typeof ii === 'object') {
109
- return ii;
110
- }
111
- else {
112
- const fake: any = {};
113
- fake[this.valueField] = this.value;
114
- return fake;
115
- }
116
- });
117
- }
118
- else {
119
- //&& this.value[this.textField]
120
- if (typeof this.value === 'object') {
121
- return [this.value];
122
- }
123
- else {
124
- const fake: any = {};
125
- fake[this.valueField] = this.value;
126
- return [fake];
127
- }
128
- }
129
- };
130
- this._selectedItems = func();
131
- }
132
-
133
- _getItemByDataMode(item: any) {
134
- return this.selectionMode === 'item' ? item : item[this.valueField];
135
- }
136
-
137
- _getItemValue(item: any) {
138
- return typeof item === 'object' ? item[this.valueField] : item;
139
- }
140
-
141
-
142
-
143
- unselectItems(...items: any[]) {
144
- if (!items || items.length === 0) {
145
- this.value = null;
146
- }
147
- else if (Array.isArray(this.value)) {
148
- this.value = this.value.filter(c => !items.some(d =>
149
- this._getItemValue(c) === this._getItemValue(d))
150
- );
151
- }
152
- else {
153
- this.value = null;
154
- }
155
- }
156
-
157
- selectItems(...items: any[]) {
158
- if (items && items.length) {
159
- if (this.multiple) {
160
- this.value = (this.value || []).concat(items.map(c => this._getItemByDataMode(c)));
161
- }
162
- else {
163
- this.value = this._getItemByDataMode(items[0]);
164
- }
165
- }
166
- }
167
-
168
- toggleSelect(...items: any[]) {
169
- if (items && items.length) {
170
- items.forEach(item => {
171
- if (this.multiple) {
172
- this.selectedItems.includes(item) ? this.unselectItems(item) : this.selectItems(item);
173
- }
174
- else {
175
- this.selectItems(item)
176
- }
177
- });
178
- }
179
- }
180
-
181
- isItemSelected(item: any): boolean {
182
- return this.selectedItems.some(c => c[this.valueField] === item[this.valueField]);
183
- }
184
- }
185
- }
@@ -1,30 +0,0 @@
1
- import { AXConfig } from '@acorex/core';
2
- import { AXBaseComponent, AXElementSize } from './base-components.class';
3
- import { Constructor } from './constratctor';
4
-
5
- export function _SizableComponenetMixin<TBase extends Constructor<AXBaseComponent>>(Base: TBase) {
6
- return class extends Base {
7
-
8
- /**
9
- * A token that specifies the size of component.
10
- */
11
- size: AXElementSize;
12
-
13
- /**
14
- * @ignore
15
- */
16
- constructor(...args: any[]) {
17
- super(...args.slice(0, 2))
18
- }
19
-
20
- _onInternalInit() {
21
- super._onInternalInit();
22
- }
23
- }
24
- }
25
-
26
-
27
- export const SIZABLE_INPUTS = [
28
- 'size',
29
- ];
30
- export const SIZABLE_OUTPUT = [];
@@ -1,51 +0,0 @@
1
- import { EventEmitter } from '@angular/core';
2
- import { AXHtmlEvent } from '../events.class';
3
- import { AXBaseComponent } from './base-components.class';
4
- import { Constructor } from './constratctor';
5
- import { VALUE_INPUTS, VALUE_OUTPUT } from './value-mixin.class';
6
-
7
- export function _TextboxComponenetMixin<TBase extends Constructor<AXBaseComponent>>(Base: TBase) {
8
- return class extends Base {
9
-
10
- /**
11
- * A string value that specifies the placeholder of text box.
12
- */
13
- placeholder: string = null;
14
-
15
- /**
16
- * A number value that specifies the maximum characters of text box.
17
- */
18
- maxLength: number = 100;
19
-
20
- /**
21
- * Specifies that autocomplete is on or off.
22
- */
23
- autoComplete: boolean = false;
24
-
25
-
26
- /**
27
- * Fires each time the user press a key.
28
- * @event
29
- */
30
- onKeyDown: EventEmitter<AXHtmlEvent<KeyboardEvent>> = new EventEmitter<AXHtmlEvent<KeyboardEvent>>();
31
-
32
-
33
- _emitOnKeydownEvent(e: KeyboardEvent) {
34
- this.onKeyDown.emit({
35
- component: this,
36
- nativeEvent: e
37
- });
38
- }
39
-
40
-
41
- /**
42
- * @ignore
43
- */
44
- constructor(...args: any[]) {
45
- super(...args.slice(0, 2))
46
- }
47
- }
48
- }
49
-
50
- export const TEXTBOX_INPUTS = ['placeholder', 'maxLength', 'allowNull', 'debounceTime', ...VALUE_INPUTS]
51
- export const TEXTBOX_OUTPUT = [...VALUE_OUTPUT]
@@ -1,215 +0,0 @@
1
- import {
2
- coerceBooleanProperty,
3
- coerceNumberProperty,
4
- } from '@angular/cdk/coercion';
5
- import { EventEmitter } from '@angular/core';
6
- import { AXBaseComponent } from './base-components.class';
7
- import { Constructor } from './constratctor';
8
- import { AXValueChangedEvent } from '../events.class';
9
- import { AXValidationRuleResult } from '../../validation/validation.class';
10
- import { Subject, Subscription } from 'rxjs';
11
- import { debounceTime, distinctUntilChanged } from 'rxjs/operators';
12
-
13
- export function _ValueComponenetMixin<TBase extends Constructor<AXBaseComponent>>(Base: TBase) {
14
-
15
- return class extends Base {
16
-
17
- /**
18
- * Fires each time the user press a key.
19
- * @event
20
- */
21
- onValueChanged: EventEmitter<AXValueChangedEvent<any>> = new EventEmitter<AXValueChangedEvent<any>>();
22
-
23
- valueChange: EventEmitter<any> = new EventEmitter<any>();
24
-
25
-
26
- #readonly: boolean = false;
27
-
28
- /**
29
- * If set to true, user cannot change the value of component.
30
- */
31
- get readonly() {
32
- return this.#readonly;
33
- }
34
- set readonly(value: boolean) {
35
- this.#readonly = coerceBooleanProperty(value);
36
- }
37
-
38
- #allowNull: boolean = true;
39
- get allowNull() {
40
- return this.#allowNull;
41
- }
42
- set allowNull(value: boolean) {
43
- this.#allowNull = coerceBooleanProperty(value);
44
- }
45
-
46
-
47
- #name: string;
48
- get name() {
49
- return this.#name;
50
- }
51
- set name(value: string) {
52
- this.#name = value;
53
- }
54
-
55
- #debounceTime: number = 0;
56
- get debounceTime() {
57
- return this.#debounceTime;
58
- }
59
- set debounceTime(value: number) {
60
- this.#debounceTime = coerceNumberProperty(value);
61
- }
62
-
63
- #valueSubscription = new Subscription();
64
- #valueSubject = new Subject();
65
-
66
- #value: any;
67
- public get value(): any {
68
- return this.#value;
69
- }
70
- public set value(v: any) {
71
- v = this._onValueChanging(v);
72
- if (!this._isInited || this.debounceTime == 0) {
73
- this._setValue(v);
74
- } else {
75
- this.#valueSubject.next(v);
76
- }
77
- }
78
-
79
- _emitOnValueChangedEvent(oldValue?: any, newValue?: any) {
80
- this.valueChange.emit(newValue);
81
- this.onValueChanged.emit({
82
- component: this,
83
- value: newValue,
84
- oldValue: oldValue,
85
- name: this.name
86
- });
87
- this._onValueChanged(oldValue, this.#value);
88
- }
89
-
90
- _onValueChanging(value: any) {
91
- return value;
92
- }
93
- _onValueChanged(oldValue: any, newValue: any): void { }
94
-
95
- _onInternalInit() {
96
- this._getHostElement().setAttribute('ax-form-input', 'true');
97
- this.#valueSubscription = this.#valueSubject
98
- .pipe(debounceTime(this.#debounceTime))
99
- .pipe(distinctUntilChanged())
100
- .subscribe((v) => {
101
- this._setValue(v);
102
- });
103
- super._onInternalInit();
104
- }
105
-
106
- _onInternalDestroy() {
107
- this.#valueSubscription.unsubscribe();
108
- super.onDestroy();
109
- }
110
-
111
- _setValue(v: any) {
112
- const old = this.#value;
113
- // TODO: check real equality
114
- if (v != old) {
115
- this.#value = v;
116
- this._emitOnValueChangedEvent(old, this.#value);
117
- this._cdr.markForCheck();
118
- if (v == null || v == undefined || v == '') {
119
- this._setErrorState('clear');
120
- } else {
121
- if (this._isInited) {
122
- this.validate();
123
- }
124
- }
125
- }
126
- }
127
-
128
- clear() {
129
- this.value = null;
130
- }
131
-
132
- validate(): Promise<AXValidationRuleResult> {
133
- const rules = Array.from(
134
- this._getHostElement().querySelectorAll('ax-validation-rule')
135
- ).filter((c) => (c as any).__axContext__.enabled);
136
- //
137
- if (!rules || rules.length === 0) {
138
- this._setErrorState('clear');
139
- return Promise.resolve({ result: true, value: this.value });
140
- }
141
-
142
- return new Promise<AXValidationRuleResult>((resolve) => {
143
- Promise.all(
144
- rules
145
- .filter((c) => typeof (c as any)?.validate === 'function')
146
- .map((c) => {
147
- return (c as any).validate(this.value);
148
- })
149
- ).then((d) => {
150
- const error = d.find((c) => c.result === false);
151
- if (error) {
152
- this._setErrorState('error', error.message);
153
- resolve({ result: false, value: this.value });
154
- } else {
155
- this._setErrorState('success');
156
- resolve({ result: true, value: this.value });
157
- }
158
- });
159
- });
160
- }
161
-
162
-
163
- /**
164
- * @ignore
165
- */
166
- constructor(...args: any[]) {
167
- super(...args);
168
- }
169
-
170
- _setErrorState(state: 'clear' | 'success' | 'error', ...args) {
171
- const container = this._getHostElement().classList.contains('ax-editor-container') ?
172
- this._getHostElement() :
173
- this._getHostElement().querySelector('.ax-editor-container');
174
- const formField = container?.closest('.ax-form-field');
175
- const label = formField?.querySelector('.ax-label');
176
- const target = container || this._getInnerElement();
177
- const parent = target.parentElement;
178
-
179
- switch (state) {
180
- case 'clear':
181
- if (parent.querySelector('span.ax-error-msg')) {
182
- parent.removeChild(parent.querySelector('span.ax-error-msg'));
183
- }
184
- label?.classList.remove('ax-state-error');
185
- target.classList.remove('ax-state-error', 'ax-state-success');
186
- break;
187
- case 'success':
188
- this._setErrorState('clear');
189
- target.classList.add('ax-state-success');
190
- break;
191
- case 'error':
192
- this._setErrorState('clear');
193
- if (args[0]) {
194
- const span = document.createElement('span');
195
- span.innerText = args[0];
196
- span.classList.add('ax-error-msg');
197
- parent.appendChild(span);
198
- }
199
- label?.classList.add('ax-state-error');
200
- target.classList.add('ax-state-error');
201
- break;
202
- }
203
- }
204
- }
205
- }
206
-
207
-
208
- export const VALUE_INPUTS = [
209
- 'readonly',
210
- 'allowNull',
211
- 'value',
212
- 'debounceTime',
213
- 'name'
214
- ];
215
- export const VALUE_OUTPUT = ['valueChange', 'onValueChanged'];
@@ -1,117 +0,0 @@
1
- import { Injectable, ApplicationRef, ViewContainerRef, TemplateRef, EventEmitter } from '@angular/core';
2
- import { Overlay, PositionStrategy, ScrollStrategy } from '@angular/cdk/overlay';
3
- import { TemplatePortal, Portal, ComponentPortal } from '@angular/cdk/portal';
4
- import { AXConnectedPosition } from '.';
5
- import { merge } from 'rxjs';
6
- import { DynamicOverlay } from './custom-cdk-overlay.service';
7
-
8
- export interface AXOverlayViewRef {
9
- instance: any;
10
- dispose: () => void;
11
- isOpen: () => boolean;
12
- }
13
-
14
- export interface AXOverlayConfigs {
15
- position?: AXConnectedPosition | AXConnectedPosition[];
16
- hasBackdrop?: boolean;
17
- transparentBackdrop?: boolean;
18
- closeOnClickOutside?: boolean;
19
- targetElement?: HTMLElement;
20
- containerElement?: HTMLElement;
21
- onBackdropClick?: () => void;
22
- panelClass?: string[] | string;
23
- backdropClass?: string[] | string;
24
- scroll?: 'auto' | 'block' | 'close';
25
- }
26
-
27
- @Injectable({ providedIn: 'root' })
28
- export class AXOverlayService {
29
- constructor(
30
- private overlayService: DynamicOverlay,
31
- private overlayService2: Overlay,
32
- private appRef: ApplicationRef) {
33
-
34
- }
35
-
36
- show(content: any, context?: any, configs?: AXOverlayConfigs): AXOverlayViewRef {
37
- configs = Object.assign({
38
- hasBackdrop: true,
39
- transparentBackdrop: true,
40
- closeOnClickOutside: true
41
- }, configs || {});
42
- // get root viewref
43
- const viewRef: ViewContainerRef = this.appRef.components[0].instance.viewRef;
44
-
45
- let portal: Portal<any>;
46
- // get component by route
47
- if (typeof content === 'string') {
48
- // TODO
49
- }
50
- // create portal from component
51
- else if (content instanceof TemplateRef) {
52
- portal = new TemplatePortal(content, viewRef, context);
53
- }
54
- else if (typeof content === 'function') {
55
- portal = new ComponentPortal(content, viewRef);
56
- }
57
- let positionStrategy: PositionStrategy;
58
- if (configs.position && configs.targetElement) {
59
- positionStrategy = this.overlayService.position()
60
- .flexibleConnectedTo(configs.targetElement)
61
- .withPositions(
62
- Array.isArray(configs.position) ? configs.position : [configs.position]
63
- )
64
- .withPush(true);
65
- }
66
- else {
67
- positionStrategy = this.overlayService.position().global().centerHorizontally().centerVertically();
68
- }
69
- let scrollStrategy: ScrollStrategy = this.overlayService.scrollStrategies.reposition({ autoClose: true });
70
- if (configs.scroll === 'block') {
71
- scrollStrategy = this.overlayService.scrollStrategies.block();
72
- }
73
- if (configs.scroll === 'close') {
74
- scrollStrategy = this.overlayService.scrollStrategies.close();
75
- }
76
-
77
- const config = {
78
- positionStrategy,
79
- scrollStrategy,
80
- hasBackdrop: configs.hasBackdrop,
81
- disposeOnNavigation: true,
82
- backdropClass: configs.backdropClass ? configs.backdropClass : (configs.transparentBackdrop ? 'cdk-overlay-transparent-backdrop' : undefined),
83
- panelClass: configs.panelClass ? configs.panelClass : ['animate__animated', 'animate__fadeIn','animate__faster']
84
- };
85
- // joon nanat dorost sho
86
- let overlayRef = configs.containerElement ? this.overlayService.createOn(configs.containerElement, config) : this.overlayService2.create(config);
87
-
88
- const host = overlayRef.attach(portal);
89
- if (host.instance) {
90
- Object.assign(host.instance, context);
91
- setTimeout(() => {
92
- host.changeDetectorRef.detectChanges();
93
- }, 0);
94
- }
95
- if (configs.closeOnClickOutside) {
96
- merge(
97
- overlayRef.backdropClick(),
98
- overlayRef.detachments(),
99
- ).subscribe(() => {
100
- overlayRef.dispose();
101
- overlayRef = undefined;
102
- if (configs.onBackdropClick) {
103
- configs.onBackdropClick();
104
- }
105
- });
106
-
107
- }
108
- return {
109
- instance: host.instance,
110
- dispose: overlayRef.dispose.bind(overlayRef),
111
- isOpen: () => {
112
- return overlayRef.hasAttached();
113
- }
114
- };
115
- }
116
-
117
- }
@@ -1,31 +0,0 @@
1
- import { Directive, ElementRef, OnDestroy } from '@angular/core';
2
-
3
- @Directive({ selector: '[ax-responsive]' })
4
- export class AXResponsiveDirective implements OnDestroy {
5
-
6
- private _observer: ResizeObserver = new ResizeObserver(entries => {
7
- for (let entry of entries) {
8
-
9
- if (entry.target) {
10
- const e = entry.target;
11
- const elements = [e, ...Array.from(e.querySelectorAll(`[class*='sm:']`))];
12
- elements.map(c => ({
13
- element: c,
14
- classList: Array.from(c.classList).filter(c => c.includes('sm')).map(c => c.slice(3))
15
- })).forEach(c => {
16
- e.clientWidth < 320 ? c.element.classList.add(...c.classList) : c.element.classList.remove(...c.classList);
17
- });
18
- }
19
- }
20
- });;
21
-
22
- constructor(private _elementRef: ElementRef<HTMLDivElement>) {
23
- this._observer.observe(_elementRef.nativeElement);
24
- }
25
-
26
- ngOnDestroy() {
27
- this._observer.disconnect();
28
- this._observer.unobserve(this._elementRef.nativeElement);
29
- }
30
-
31
- }
@@ -1,24 +0,0 @@
1
-
2
- export const AX_STYLE_TYPES = ['info', 'danger', 'success', 'warning'];
3
-
4
- /**
5
- * A token that specifies the color style of component.
6
- */
7
- export type AXStyleColorType = 'primary' | 'secondary' | 'info' | 'danger' | 'success' | 'warning' | 'light' | 'dark';
8
- export type AXStyleButtonLook = 'blank' | 'outline' | 'twotone' | 'link';
9
-
10
- export const AX_LOCATIONS = ['bottom-start', 'bottom-center', 'bottom-end', 'top-start', 'top-center', 'top-end'];
11
- export type AXLocation = 'bottom-start' | 'bottom-center' | 'bottom-end' | 'top-start' | 'top-center' | 'top-end';
12
-
13
-
14
- export const AX_DIRECTIONS = ['vertical', 'horizontal'];
15
- /**
16
- * A token that specifies the direction of component.
17
- */
18
- export type AXDirection = 'vertical' | 'horizontal';
19
-
20
-
21
- /**
22
- * A token that specifies the selection mode of component.
23
- */
24
- export type AXSelectionMode = 'single' | 'multiple';
@@ -1,2 +0,0 @@
1
- <ng-content select="ax-button">
2
- </ng-content>