@natec/mef-dev-ui-kit 20.0.0-beta.1 → 20.0.1

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 (414) hide show
  1. package/fesm2022/natec-mef-dev-ui-kit.mjs +9541 -0
  2. package/fesm2022/natec-mef-dev-ui-kit.mjs.map +1 -0
  3. package/index.d.ts +4418 -0
  4. package/index.d.ts.map +1 -0
  5. package/package.json +44 -48
  6. package/src/lib/styles/core.scss +51 -195
  7. package/src/lib/styles/pg/modules/_typography.scss +1 -8
  8. package/src/lib/styles/pg/vendor/ng-datatable.scss +7 -0
  9. package/src/lib/styles/vars.scss +8 -8
  10. package/documentation/classes/FiltredItemModel.html +0 -358
  11. package/documentation/classes/TabChangeEvent.html +0 -231
  12. package/documentation/components/CardComponent.html +0 -576
  13. package/documentation/components/CardLongComponent.html +0 -712
  14. package/documentation/components/CardSimpleComponent.html +0 -372
  15. package/documentation/components/CentralPageComponent.html +0 -312
  16. package/documentation/components/CentralPageRowComponent.html +0 -244
  17. package/documentation/components/CollapseComponent.html +0 -755
  18. package/documentation/components/CollapseSetComponent.html +0 -767
  19. package/documentation/components/DatepickerComponent.html +0 -1397
  20. package/documentation/components/FillComponent.html +0 -736
  21. package/documentation/components/FilteredFieldContainerComponent.html +0 -513
  22. package/documentation/components/FilteredFieldItemComponent.html +0 -451
  23. package/documentation/components/HelpBlockComponent.html +0 -398
  24. package/documentation/components/ManagePageComponent.html +0 -423
  25. package/documentation/components/MefDevOptionComponent.html +0 -689
  26. package/documentation/components/MefDevProgressComponent.html +0 -562
  27. package/documentation/components/MefDevSelectComponent.html +0 -4797
  28. package/documentation/components/MefDevSliderComponent.html +0 -686
  29. package/documentation/components/MefDevSpecFlowTestComponent.html +0 -474
  30. package/documentation/components/MefDevSwitchComponent.html +0 -1480
  31. package/documentation/components/MefDevTabBodyComponent.html +0 -271
  32. package/documentation/components/MefDevTabComponent.html +0 -681
  33. package/documentation/components/MefDevTabSetComponent.html +0 -1889
  34. package/documentation/components/MefDevTabsNavComponent.html +0 -2013
  35. package/documentation/components/MefdevExecutorPageComponent.html +0 -497
  36. package/documentation/components/ProfileComponent.html +0 -608
  37. package/documentation/components/RightFilterComponent.html +0 -423
  38. package/documentation/components/SlideRightComponent.html +0 -762
  39. package/documentation/components/SlideUpComponent.html +0 -692
  40. package/documentation/components/StepExecutorComponent.html +0 -1437
  41. package/documentation/components/TablePageComponent.html +0 -327
  42. package/documentation/dependencies.html +0 -135
  43. package/documentation/directives/MefDevTabLabelDirective.html +0 -532
  44. package/documentation/directives/MefDevTabsInkBarDirective.html +0 -865
  45. package/documentation/fonts/ionicons.eot +0 -0
  46. package/documentation/fonts/ionicons.svg +0 -2090
  47. package/documentation/fonts/ionicons.ttf +0 -0
  48. package/documentation/fonts/ionicons.woff +0 -0
  49. package/documentation/fonts/ionicons.woff2 +0 -0
  50. package/documentation/fonts/roboto-v15-latin-300.eot +0 -0
  51. package/documentation/fonts/roboto-v15-latin-300.svg +0 -314
  52. package/documentation/fonts/roboto-v15-latin-300.ttf +0 -0
  53. package/documentation/fonts/roboto-v15-latin-300.woff +0 -0
  54. package/documentation/fonts/roboto-v15-latin-300.woff2 +0 -0
  55. package/documentation/fonts/roboto-v15-latin-700.eot +0 -0
  56. package/documentation/fonts/roboto-v15-latin-700.svg +0 -310
  57. package/documentation/fonts/roboto-v15-latin-700.ttf +0 -0
  58. package/documentation/fonts/roboto-v15-latin-700.woff +0 -0
  59. package/documentation/fonts/roboto-v15-latin-700.woff2 +0 -0
  60. package/documentation/fonts/roboto-v15-latin-italic.eot +0 -0
  61. package/documentation/fonts/roboto-v15-latin-italic.svg +0 -323
  62. package/documentation/fonts/roboto-v15-latin-italic.ttf +0 -0
  63. package/documentation/fonts/roboto-v15-latin-italic.woff +0 -0
  64. package/documentation/fonts/roboto-v15-latin-italic.woff2 +0 -0
  65. package/documentation/fonts/roboto-v15-latin-regular.eot +0 -0
  66. package/documentation/fonts/roboto-v15-latin-regular.svg +0 -308
  67. package/documentation/fonts/roboto-v15-latin-regular.ttf +0 -0
  68. package/documentation/fonts/roboto-v15-latin-regular.woff +0 -0
  69. package/documentation/fonts/roboto-v15-latin-regular.woff2 +0 -0
  70. package/documentation/graph/dependencies.svg +0 -1160
  71. package/documentation/images/compodoc-vectorise-inverted.png +0 -0
  72. package/documentation/images/compodoc-vectorise-inverted.svg +0 -201
  73. package/documentation/images/compodoc-vectorise.png +0 -0
  74. package/documentation/images/compodoc-vectorise.svg +0 -201
  75. package/documentation/images/favicon.ico +0 -0
  76. package/documentation/index.html +0 -246
  77. package/documentation/injectables/FilteredFieldService.html +0 -420
  78. package/documentation/injectables/ProgressConfig.html +0 -236
  79. package/documentation/interfaces/AnimatedInterface.html +0 -246
  80. package/documentation/js/compodoc.js +0 -14
  81. package/documentation/js/lazy-load-graphs.js +0 -44
  82. package/documentation/js/libs/EventDispatcher.js +0 -5
  83. package/documentation/js/libs/bootstrap-native.js +0 -1
  84. package/documentation/js/libs/clipboard.min.js +0 -7
  85. package/documentation/js/libs/custom-elements-es5-adapter.js +0 -15
  86. package/documentation/js/libs/custom-elements.min.js +0 -38
  87. package/documentation/js/libs/d3.v3.min.js +0 -2
  88. package/documentation/js/libs/deep-iterator.js +0 -2
  89. package/documentation/js/libs/es6-shim.min.js +0 -11
  90. package/documentation/js/libs/htmlparser.js +0 -23
  91. package/documentation/js/libs/innersvg.js +0 -9
  92. package/documentation/js/libs/lit-html.js +0 -1
  93. package/documentation/js/libs/prism.js +0 -46
  94. package/documentation/js/libs/promise.min.js +0 -6
  95. package/documentation/js/libs/svg-pan-zoom.min.js +0 -3
  96. package/documentation/js/libs/tablesort.min.js +0 -6
  97. package/documentation/js/libs/tablesort.number.min.js +0 -6
  98. package/documentation/js/libs/vis.min.js +0 -47
  99. package/documentation/js/libs/zepto.min.js +0 -2
  100. package/documentation/js/menu-wc.js +0 -455
  101. package/documentation/js/menu-wc_es5.js +0 -42
  102. package/documentation/js/menu.js +0 -325
  103. package/documentation/js/routes.js +0 -301
  104. package/documentation/js/search/lunr.min.js +0 -6
  105. package/documentation/js/search/search-lunr.js +0 -67
  106. package/documentation/js/search/search.js +0 -268
  107. package/documentation/js/search/search_index.js +0 -4
  108. package/documentation/js/sourceCode.js +0 -58
  109. package/documentation/js/svg-pan-zoom.controls.js +0 -53
  110. package/documentation/js/tabs.js +0 -21
  111. package/documentation/js/tree.js +0 -147
  112. package/documentation/miscellaneous/enumerations.html +0 -223
  113. package/documentation/miscellaneous/functions.html +0 -251
  114. package/documentation/miscellaneous/typealiases.html +0 -257
  115. package/documentation/miscellaneous/variables.html +0 -357
  116. package/documentation/modules/MefDevCardModule/dependencies.svg +0 -142
  117. package/documentation/modules/MefDevCardModule.html +0 -349
  118. package/documentation/modules/MefDevCollapseModule/dependencies.svg +0 -90
  119. package/documentation/modules/MefDevCollapseModule.html +0 -316
  120. package/documentation/modules/MefDevDatepickerModule/dependencies.svg +0 -82
  121. package/documentation/modules/MefDevDatepickerModule.html +0 -274
  122. package/documentation/modules/MefDevFilteredFieldModule/dependencies.svg +0 -90
  123. package/documentation/modules/MefDevFilteredFieldModule.html +0 -278
  124. package/documentation/modules/MefDevHelpBlockModule/dependencies.svg +0 -82
  125. package/documentation/modules/MefDevHelpBlockModule.html +0 -274
  126. package/documentation/modules/MefDevModalModule/dependencies.svg +0 -154
  127. package/documentation/modules/MefDevModalModule.html +0 -364
  128. package/documentation/modules/MefDevPageLayoutsModule/dependencies.svg +0 -162
  129. package/documentation/modules/MefDevPageLayoutsModule.html +0 -368
  130. package/documentation/modules/MefDevProgressModule/dependencies.svg +0 -66
  131. package/documentation/modules/MefDevProgressModule.html +0 -286
  132. package/documentation/modules/MefDevSelectModule/dependencies.svg +0 -140
  133. package/documentation/modules/MefDevSelectModule.html +0 -334
  134. package/documentation/modules/MefDevSliderModule/dependencies.svg +0 -66
  135. package/documentation/modules/MefDevSliderModule.html +0 -248
  136. package/documentation/modules/MefDevSpecFlowTestModule/dependencies.svg +0 -66
  137. package/documentation/modules/MefDevSpecFlowTestModule.html +0 -286
  138. package/documentation/modules/MefDevStepExecutorModule/dependencies.svg +0 -106
  139. package/documentation/modules/MefDevStepExecutorModule.html +0 -304
  140. package/documentation/modules/MefDevSwitchModule/dependencies.svg +0 -88
  141. package/documentation/modules/MefDevSwitchModule.html +0 -270
  142. package/documentation/modules/MefDevTabsModule/dependencies.svg +0 -186
  143. package/documentation/modules/MefDevTabsModule.html +0 -398
  144. package/documentation/modules.html +0 -357
  145. package/documentation/overview.html +0 -1351
  146. package/documentation/pipes/OptionPipe.html +0 -238
  147. package/documentation/properties.html +0 -125
  148. package/documentation/styles/bootstrap-card.css +0 -219
  149. package/documentation/styles/bootstrap.min.css +0 -6
  150. package/documentation/styles/compodoc.css +0 -1121
  151. package/documentation/styles/dark.css +0 -121
  152. package/documentation/styles/ionicons.min.css +0 -11
  153. package/documentation/styles/laravel.css +0 -113
  154. package/documentation/styles/material.css +0 -131
  155. package/documentation/styles/original.css +0 -51
  156. package/documentation/styles/postmark.css +0 -238
  157. package/documentation/styles/prism.css +0 -301
  158. package/documentation/styles/readthedocs.css +0 -117
  159. package/documentation/styles/reset.css +0 -129
  160. package/documentation/styles/stripe.css +0 -106
  161. package/documentation/styles/style.css +0 -7
  162. package/documentation/styles/tablesort.css +0 -33
  163. package/documentation/styles/vagrant.css +0 -130
  164. package/karma.conf.js +0 -44
  165. package/ng-package.json +0 -18
  166. package/src/lib/markup-kit/card/card/card.component.html +0 -44
  167. package/src/lib/markup-kit/card/card/card.component.scss +0 -65
  168. package/src/lib/markup-kit/card/card/card.component.ts +0 -109
  169. package/src/lib/markup-kit/card/card-long/card-long.component.html +0 -53
  170. package/src/lib/markup-kit/card/card-long/card-long.component.scss +0 -72
  171. package/src/lib/markup-kit/card/card-long/card-long.component.ts +0 -158
  172. package/src/lib/markup-kit/card/card-long/cart-type-colors.enum.ts +0 -5
  173. package/src/lib/markup-kit/card/card-simple/card-simple.component.html +0 -12
  174. package/src/lib/markup-kit/card/card-simple/card-simple.component.scss +0 -12
  175. package/src/lib/markup-kit/card/card-simple/card-simple.component.ts +0 -48
  176. package/src/lib/markup-kit/card/card.module.ts +0 -21
  177. package/src/lib/markup-kit/card/index.ts +0 -6
  178. package/src/lib/markup-kit/collapse/collapse/collapse.component.html +0 -17
  179. package/src/lib/markup-kit/collapse/collapse/collapse.component.scss +0 -17
  180. package/src/lib/markup-kit/collapse/collapse/collapse.component.ts +0 -131
  181. package/src/lib/markup-kit/collapse/collapse-set/collapse-set.component.html +0 -3
  182. package/src/lib/markup-kit/collapse/collapse-set/collapse-set.component.scss +0 -0
  183. package/src/lib/markup-kit/collapse/collapse-set/collapse-set.component.ts +0 -110
  184. package/src/lib/markup-kit/collapse/collapse.module.ts +0 -20
  185. package/src/lib/markup-kit/collapse/index.ts +0 -3
  186. package/src/lib/markup-kit/executors/index.ts +0 -4
  187. package/src/lib/markup-kit/executors/mefdev-executor-page/mefdev-executor-page.component.ts +0 -111
  188. package/src/lib/markup-kit/executors/stage/stage.component.html +0 -23
  189. package/src/lib/markup-kit/executors/stage/stage.component.scss +0 -9
  190. package/src/lib/markup-kit/executors/stage/stage.component.ts +0 -21
  191. package/src/lib/markup-kit/executors/step-executor/step-executor.component.html +0 -127
  192. package/src/lib/markup-kit/executors/step-executor/step-executor.component.scss +0 -225
  193. package/src/lib/markup-kit/executors/step-executor/step-executor.component.ts +0 -295
  194. package/src/lib/markup-kit/executors/step-executor.module.ts +0 -27
  195. package/src/lib/markup-kit/modals/fill/fill.component.html +0 -15
  196. package/src/lib/markup-kit/modals/fill/fill.component.scss +0 -42
  197. package/src/lib/markup-kit/modals/fill/fill.component.ts +0 -126
  198. package/src/lib/markup-kit/modals/index.ts +0 -6
  199. package/src/lib/markup-kit/modals/markup-kit.module.ts +0 -25
  200. package/src/lib/markup-kit/modals/modal-size.enum.ts +0 -5
  201. package/src/lib/markup-kit/modals/right-filter/right-filter.component.html +0 -11
  202. package/src/lib/markup-kit/modals/right-filter/right-filter.component.scss +0 -15
  203. package/src/lib/markup-kit/modals/right-filter/right-filter.component.ts +0 -49
  204. package/src/lib/markup-kit/modals/slide-right/slide-right.component.html +0 -14
  205. package/src/lib/markup-kit/modals/slide-right/slide-right.component.scss +0 -42
  206. package/src/lib/markup-kit/modals/slide-right/slide-right.component.ts +0 -121
  207. package/src/lib/markup-kit/modals/slide-up/slide-up.component.html +0 -15
  208. package/src/lib/markup-kit/modals/slide-up/slide-up.component.scss +0 -47
  209. package/src/lib/markup-kit/modals/slide-up/slide-up.component.ts +0 -105
  210. package/src/lib/markup-kit/page-layouts/central-page/central-page.component.html +0 -6
  211. package/src/lib/markup-kit/page-layouts/central-page/central-page.component.scss +0 -10
  212. package/src/lib/markup-kit/page-layouts/central-page/central-page.component.ts +0 -58
  213. package/src/lib/markup-kit/page-layouts/central-page-row/central-page-row.component.html +0 -3
  214. package/src/lib/markup-kit/page-layouts/central-page-row/central-page-row.component.scss +0 -5
  215. package/src/lib/markup-kit/page-layouts/central-page-row/central-page-row.component.ts +0 -30
  216. package/src/lib/markup-kit/page-layouts/index.ts +0 -6
  217. package/src/lib/markup-kit/page-layouts/manage-page/manage-page.component.html +0 -10
  218. package/src/lib/markup-kit/page-layouts/manage-page/manage-page.component.scss +0 -33
  219. package/src/lib/markup-kit/page-layouts/manage-page/manage-page.component.ts +0 -70
  220. package/src/lib/markup-kit/page-layouts/page-layouts.module.ts +0 -26
  221. package/src/lib/markup-kit/page-layouts/profile/profile.component.html +0 -31
  222. package/src/lib/markup-kit/page-layouts/profile/profile.component.scss +0 -99
  223. package/src/lib/markup-kit/page-layouts/profile/profile.component.ts +0 -129
  224. package/src/lib/markup-kit/page-layouts/table-page/table-page.component.html +0 -9
  225. package/src/lib/markup-kit/page-layouts/table-page/table-page.component.scss +0 -0
  226. package/src/lib/markup-kit/page-layouts/table-page/table-page.component.ts +0 -42
  227. package/src/lib/markup-kit/slider/index.ts +0 -2
  228. package/src/lib/markup-kit/slider/slider/slider.component.html +0 -11
  229. package/src/lib/markup-kit/slider/slider/slider.component.scss +0 -106
  230. package/src/lib/markup-kit/slider/slider/slider.component.ts +0 -124
  231. package/src/lib/markup-kit/slider/slider.module.ts +0 -20
  232. package/src/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.html +0 -87
  233. package/src/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.scss +0 -132
  234. package/src/lib/markup-kit/utils/datepicker/datepicker/datepicker.component.ts +0 -643
  235. package/src/lib/markup-kit/utils/datepicker/datepicker.module.ts +0 -15
  236. package/src/lib/markup-kit/utils/datepicker/index.ts +0 -2
  237. package/src/lib/markup-kit/utils/filtered-field/filtered-field-container/filtered-field-container.component.html +0 -3
  238. package/src/lib/markup-kit/utils/filtered-field/filtered-field-container/filtered-field-container.component.scss +0 -4
  239. package/src/lib/markup-kit/utils/filtered-field/filtered-field-container/filtered-field-container.component.ts +0 -79
  240. package/src/lib/markup-kit/utils/filtered-field/filtered-field-item/filtered-field-item.component.html +0 -4
  241. package/src/lib/markup-kit/utils/filtered-field/filtered-field-item/filtered-field-item.component.scss +0 -12
  242. package/src/lib/markup-kit/utils/filtered-field/filtered-field-item/filtered-field-item.component.ts +0 -75
  243. package/src/lib/markup-kit/utils/filtered-field/filtered-field.module.ts +0 -19
  244. package/src/lib/markup-kit/utils/filtered-field/filtered-field.service.ts +0 -44
  245. package/src/lib/markup-kit/utils/filtered-field/filtred-item.model.ts +0 -15
  246. package/src/lib/markup-kit/utils/filtered-field/index.ts +0 -5
  247. package/src/lib/markup-kit/utils/help-block/help-block.component.html +0 -19
  248. package/src/lib/markup-kit/utils/help-block/help-block.component.scss +0 -22
  249. package/src/lib/markup-kit/utils/help-block/help-block.component.ts +0 -70
  250. package/src/lib/markup-kit/utils/help-block/hepl-block.module.ts +0 -14
  251. package/src/lib/markup-kit/utils/help-block/index.ts +0 -2
  252. package/src/lib/pg-components/card/card.components.html +0 -66
  253. package/src/lib/pg-components/card/card.components.ts +0 -451
  254. package/src/lib/pg-components/card/card.module.ts +0 -17
  255. package/src/lib/pg-components/card/index.ts +0 -2
  256. package/src/lib/pg-components/progress/index.ts +0 -3
  257. package/src/lib/pg-components/progress/progress.component.html +0 -28
  258. package/src/lib/pg-components/progress/progress.component.ts +0 -73
  259. package/src/lib/pg-components/progress/progress.config.ts +0 -7
  260. package/src/lib/pg-components/progress/progress.module.ts +0 -16
  261. package/src/lib/pg-components/select/index.ts +0 -4
  262. package/src/lib/pg-components/select/option.component.html +0 -1
  263. package/src/lib/pg-components/select/option.component.ts +0 -105
  264. package/src/lib/pg-components/select/option.pipe.ts +0 -44
  265. package/src/lib/pg-components/select/select.component.html +0 -83
  266. package/src/lib/pg-components/select/select.component.ts +0 -814
  267. package/src/lib/pg-components/select/select.module.ts +0 -14
  268. package/src/lib/pg-components/spec-flow-test/index.ts +0 -2
  269. package/src/lib/pg-components/spec-flow-test/spec-flow-test/spec-flow-test.component.html +0 -6
  270. package/src/lib/pg-components/spec-flow-test/spec-flow-test/spec-flow-test.component.scss +0 -0
  271. package/src/lib/pg-components/spec-flow-test/spec-flow-test/spec-flow-test.component.ts +0 -37
  272. package/src/lib/pg-components/spec-flow-test/spec-flow-test.module.ts +0 -18
  273. package/src/lib/pg-components/switch/index.ts +0 -2
  274. package/src/lib/pg-components/switch/switch.component.html +0 -10
  275. package/src/lib/pg-components/switch/switch.component.ts +0 -286
  276. package/src/lib/pg-components/switch/switch.module.ts +0 -11
  277. package/src/lib/pg-components/tabs/index.ts +0 -7
  278. package/src/lib/pg-components/tabs/tab-body.component.html +0 -1
  279. package/src/lib/pg-components/tabs/tab-body.component.ts +0 -17
  280. package/src/lib/pg-components/tabs/tab-label.directive.ts +0 -41
  281. package/src/lib/pg-components/tabs/tab.component.html +0 -3
  282. package/src/lib/pg-components/tabs/tab.component.ts +0 -109
  283. package/src/lib/pg-components/tabs/tabs-ink-bar.directive.ts +0 -78
  284. package/src/lib/pg-components/tabs/tabs-nav.component.html +0 -20
  285. package/src/lib/pg-components/tabs/tabs-nav.component.ts +0 -324
  286. package/src/lib/pg-components/tabs/tabs.module.ts +0 -15
  287. package/src/lib/pg-components/tabs/tabset.component.html +0 -39
  288. package/src/lib/pg-components/tabs/tabset.component.ts +0 -270
  289. package/src/lib/pg-components/util/convert.ts +0 -3
  290. package/src/lib/pg-components/util/request-animation.ts +0 -31
  291. package/src/lib/v2/autocomplete/autocomplete-origin.ts +0 -12
  292. package/src/lib/v2/autocomplete/autocomplete.html +0 -17
  293. package/src/lib/v2/autocomplete/autocomplete.module.ts +0 -28
  294. package/src/lib/v2/autocomplete/autocomplete.scss +0 -62
  295. package/src/lib/v2/autocomplete/autocomplete.trigger.ts +0 -759
  296. package/src/lib/v2/autocomplete/autocomplete.ts +0 -201
  297. package/src/lib/v2/autocomplete/index.ts +0 -1
  298. package/src/lib/v2/card/card-header.html +0 -9
  299. package/src/lib/v2/card/card-title-group.html +0 -15
  300. package/src/lib/v2/card/card.html +0 -1
  301. package/src/lib/v2/card/card.module.ts +0 -40
  302. package/src/lib/v2/card/card.scss +0 -185
  303. package/src/lib/v2/card/card.ts +0 -274
  304. package/src/lib/v2/card/index.ts +0 -2
  305. package/src/lib/v2/checkbox/checkbox.html +0 -38
  306. package/src/lib/v2/checkbox/checkbox.module.ts +0 -8
  307. package/src/lib/v2/checkbox/checkbox.scss +0 -318
  308. package/src/lib/v2/checkbox/checkbox.ts +0 -507
  309. package/src/lib/v2/checkbox/index.ts +0 -1
  310. package/src/lib/v2/chips/chip-action.ts +0 -102
  311. package/src/lib/v2/chips/chip-edit-input.ts +0 -44
  312. package/src/lib/v2/chips/chip-grid.ts +0 -412
  313. package/src/lib/v2/chips/chip-icons.ts +0 -91
  314. package/src/lib/v2/chips/chip-input.ts +0 -208
  315. package/src/lib/v2/chips/chip-listbox.ts +0 -291
  316. package/src/lib/v2/chips/chip-option.html +0 -37
  317. package/src/lib/v2/chips/chip-option.ts +0 -163
  318. package/src/lib/v2/chips/chip-row.html +0 -42
  319. package/src/lib/v2/chips/chip-row.ts +0 -191
  320. package/src/lib/v2/chips/chip-set.scss +0 -86
  321. package/src/lib/v2/chips/chip-set.ts +0 -261
  322. package/src/lib/v2/chips/chip-text-control.ts +0 -15
  323. package/src/lib/v2/chips/chip.html +0 -21
  324. package/src/lib/v2/chips/chip.scss +0 -646
  325. package/src/lib/v2/chips/chip.ts +0 -281
  326. package/src/lib/v2/chips/chips-module.ts +0 -44
  327. package/src/lib/v2/chips/index.ts +0 -12
  328. package/src/lib/v2/chips/tokens.ts +0 -29
  329. package/src/lib/v2/collapse/accordion-base.ts +0 -20
  330. package/src/lib/v2/collapse/accordion.ts +0 -92
  331. package/src/lib/v2/collapse/collapse.module.ts +0 -22
  332. package/src/lib/v2/collapse/expansion-panel-base.ts +0 -10
  333. package/src/lib/v2/collapse/expansion-panel-content.ts +0 -12
  334. package/src/lib/v2/collapse/expansion-panel-header.html +0 -17
  335. package/src/lib/v2/collapse/expansion-panel-header.scss +0 -165
  336. package/src/lib/v2/collapse/expansion-panel-header.ts +0 -237
  337. package/src/lib/v2/collapse/expansion-panel.html +0 -14
  338. package/src/lib/v2/collapse/expansion-panel.scss +0 -113
  339. package/src/lib/v2/collapse/expansion-panel.ts +0 -279
  340. package/src/lib/v2/collapse/index.ts +0 -7
  341. package/src/lib/v2/executors/index.ts +0 -10
  342. package/src/lib/v2/executors/step-content.ts +0 -19
  343. package/src/lib/v2/executors/step-footer.ts +0 -7
  344. package/src/lib/v2/executors/step-header.html +0 -59
  345. package/src/lib/v2/executors/step-header.scss +0 -205
  346. package/src/lib/v2/executors/step-header.ts +0 -151
  347. package/src/lib/v2/executors/step-label.ts +0 -16
  348. package/src/lib/v2/executors/step.html +0 -4
  349. package/src/lib/v2/executors/stepper-button.ts +0 -40
  350. package/src/lib/v2/executors/stepper-icon.ts +0 -42
  351. package/src/lib/v2/executors/stepper-intl.ts +0 -46
  352. package/src/lib/v2/executors/stepper-module.ts +0 -42
  353. package/src/lib/v2/executors/stepper.html +0 -90
  354. package/src/lib/v2/executors/stepper.scss +0 -299
  355. package/src/lib/v2/executors/stepper.ts +0 -360
  356. package/src/lib/v2/modals/dialog-config.ts +0 -56
  357. package/src/lib/v2/modals/dialog-container.html +0 -5
  358. package/src/lib/v2/modals/dialog-container.ts +0 -243
  359. package/src/lib/v2/modals/dialog-content-directives.ts +0 -217
  360. package/src/lib/v2/modals/dialog-ref.ts +0 -242
  361. package/src/lib/v2/modals/dialog.scss +0 -307
  362. package/src/lib/v2/modals/dialog.ts +0 -239
  363. package/src/lib/v2/modals/index.ts +0 -11
  364. package/src/lib/v2/modals/modal-module.ts +0 -23
  365. package/src/lib/v2/radio-button/public-api.ts +0 -2
  366. package/src/lib/v2/radio-button/radio.html +0 -25
  367. package/src/lib/v2/radio-button/radio.module.ts +0 -8
  368. package/src/lib/v2/radio-button/radio.scss +0 -298
  369. package/src/lib/v2/radio-button/radio.ts +0 -640
  370. package/src/lib/v2/select/index.ts +0 -5
  371. package/src/lib/v2/select/option-group.html +0 -9
  372. package/src/lib/v2/select/option-group.scss +0 -33
  373. package/src/lib/v2/select/option-group.ts +0 -66
  374. package/src/lib/v2/select/option-module.ts +0 -11
  375. package/src/lib/v2/select/option.html +0 -22
  376. package/src/lib/v2/select/option.scss +0 -59
  377. package/src/lib/v2/select/option.ts +0 -288
  378. package/src/lib/v2/select/pseudo-checkbox-module.ts +0 -9
  379. package/src/lib/v2/select/pseudo-checkbox.scss +0 -121
  380. package/src/lib/v2/select/pseudo-checkbox.ts +0 -60
  381. package/src/lib/v2/select/select.html +0 -56
  382. package/src/lib/v2/select/select.module.ts +0 -14
  383. package/src/lib/v2/select/select.scss +0 -118
  384. package/src/lib/v2/select/select.ts +0 -824
  385. package/src/lib/v2/switch/base-editor-helper.ts +0 -148
  386. package/src/lib/v2/switch/index.ts +0 -2
  387. package/src/lib/v2/switch/switch.component.html +0 -15
  388. package/src/lib/v2/switch/switch.component.scss +0 -93
  389. package/src/lib/v2/switch/switch.component.ts +0 -203
  390. package/src/lib/v2/switch/switch.module.ts +0 -10
  391. package/src/lib/v2/tabs/config.ts +0 -94
  392. package/src/lib/v2/tabs/index.ts +0 -28
  393. package/src/lib/v2/tabs/ink-bar.ts +0 -226
  394. package/src/lib/v2/tabs/paginated-tab-header.ts +0 -536
  395. package/src/lib/v2/tabs/tab-body.html +0 -9
  396. package/src/lib/v2/tabs/tab-body.scss +0 -60
  397. package/src/lib/v2/tabs/tab-body.ts +0 -310
  398. package/src/lib/v2/tabs/tab-content.ts +0 -12
  399. package/src/lib/v2/tabs/tab-group.html +0 -74
  400. package/src/lib/v2/tabs/tab-group.scss +0 -362
  401. package/src/lib/v2/tabs/tab-group.ts +0 -491
  402. package/src/lib/v2/tabs/tab-header.html +0 -35
  403. package/src/lib/v2/tabs/tab-header.scss +0 -127
  404. package/src/lib/v2/tabs/tab-header.ts +0 -91
  405. package/src/lib/v2/tabs/tab-label-wrapper.ts +0 -49
  406. package/src/lib/v2/tabs/tab-label.ts +0 -34
  407. package/src/lib/v2/tabs/tab.html +0 -1
  408. package/src/lib/v2/tabs/tab.ts +0 -155
  409. package/src/lib/v2/tabs/tabs.module.ts +0 -12
  410. package/src/public-api.ts +0 -33
  411. package/tsconfig.doc.json +0 -4
  412. package/tsconfig.lib.json +0 -19
  413. package/tsconfig.lib.prod.json +0 -10
  414. package/tsconfig.spec.json +0 -17
@@ -1,643 +0,0 @@
1
- import {
2
- Component,
3
- ElementRef,
4
- HostListener,
5
- Input,
6
- OnChanges,
7
- OnInit,
8
- Output,
9
- EventEmitter,
10
- } from '@angular/core';
11
- import { DatePipe } from '@angular/common';
12
-
13
- /**
14
- * Datepicker Component for selecting dates.
15
- *
16
- * This component allows users to pick a date from a calendar interface.
17
- * It supports various configuration options such as language, date format, and date range.
18
- *
19
- * @example
20
- * <mefdev-datepicker
21
- * [labelContentText]="'Select your date'"
22
- * [lang]="'uk'"
23
- * [dateFormat]="'dd/MM/yyyy'"
24
- * [range]="{startYear: 1900, toYear: 300}"
25
- * [disabled]="false"
26
- * (dateChanged)="onDateChanged($event)"
27
- * [topOffset]="'20'"
28
- * [leftOffset]="'10'">
29
- * </mefdev-datepicker>
30
- *
31
- * <example-url>https://platform.mef.dev/ui_kit_demo/view/utils/datepicker</example-url>
32
- */
33
-
34
- @Component({
35
- selector: 'mefdev-datepicker',
36
- templateUrl: './datepicker.component.html',
37
- styleUrls: ['./datepicker.component.scss'],
38
- standalone: false
39
- })
40
-
41
- export class DatepickerComponent implements OnChanges, OnInit {
42
-
43
- /**
44
- * A flag that checks whether a valid date has been entered and whether the entered date exists.
45
- * If the two previous conditions are not true, the datepicker will be highlighted in red
46
- */
47
- isUserDateValid: boolean = true;
48
-
49
- /**
50
- * Flag to determine if the calendar is open or closed.
51
- * Default value: false (closed).
52
- */
53
- isCalendarOpen: boolean = false;
54
-
55
- /**
56
- * The currently selected date.
57
- * Default value: Today's date.
58
- */
59
- selectedDate: Date = new Date();
60
-
61
- /**
62
- * The formatted date for display in the input.
63
- * Default value: Formatted representation of the selected date.
64
- */
65
- formattedDate: any ;
66
-
67
- /**
68
- * Track the edited date separately when in editing mode.
69
- * Default value: An empty string.
70
- */
71
- editedDate: string = '';
72
-
73
- /**
74
- * Flag to determine if the month dropdown is open or closed.
75
- * Default value: true (open).
76
- */
77
- isMonthDropdownOpen: boolean = true;
78
-
79
- /**
80
- * Flag to determine if the year dropdown is open or closed.
81
- * Default value: true (open).
82
- */
83
- isYearDropdownOpen: boolean = true;
84
-
85
- /**
86
- * The selected month (0-11).
87
- * Default value: The month of the selected date.
88
- */
89
- selectedDateMonth: number = this.selectedDate.getMonth();
90
-
91
- /**
92
- * The selected year.
93
- * Default value: The year of the selected date.
94
- */
95
- selectedDateYear: number = this.selectedDate.getFullYear();
96
-
97
- /**
98
- * An array of years for the year dropdown.
99
- * Default value: An array of years within the specified range.
100
- */
101
- years: number[]
102
-
103
- /**
104
- * Label text for the datepicker.
105
- * Default value: 'en' (English).
106
- * @example
107
- * <mefdev-datepicker
108
- * [labelContentText] = "'Chose your date'">
109
- * </mefdev-datepicker>
110
- */
111
- @Input() labelContentText: string;
112
-
113
- /**
114
- * The language/locale for the datepicker.
115
- * Default value: 'en' (English).
116
- * @example
117
- * <mefdev-datepicker
118
- * [lang] = "'uk'">
119
- * </mefdev-datepicker>
120
- */
121
- @Input() lang: string = 'en';
122
-
123
- /**
124
- * The date format for displaying the selected date.
125
- * Default value: 'EEE MMM dd yyyy'.
126
- * @example
127
- * <mefdev-datepicker
128
- * [dateFormat]="'dd/MM/yyyy'">
129
- * </mefdev-datepicker>
130
- */
131
- @Input() dateFormat: string = 'EEE MMM dd yyyy';
132
-
133
- /**
134
- * The range of years available in the year dropdown.
135
- * Default value: { startYear: 1900, toYear: 300 }.
136
- * @example
137
- * <mefdev-datepicker
138
- * [range]="{startYear: 1900, toYear: 300}">
139
- * </mefdev-datepicker>
140
- */
141
- @Input('range') yearsRange:{startYear:number, toYear:number} = {startYear:1900, toYear:300};
142
-
143
- /**
144
- * Whether the datepicker is disabled or not.
145
- * Default value: false (enabled).
146
- * @example
147
- * <mefdev-datepicker
148
- * [disabled]="false">
149
- * </mefdev-datepicker>
150
- */
151
- @Input() disabled: boolean = false;
152
-
153
- /**
154
- * The top offset for positioning the datepicker.
155
- * Default value: '20'.
156
- * @example
157
- * <mefdev-datepicker
158
- * [topOffset]="'20'">
159
- * </mefdev-datepicker>
160
- */
161
- @Input() topOffset: string = '20';
162
-
163
- /**
164
- * The left offset for positioning the datepicker.
165
- * Default value: '10'.
166
- * @example
167
- * <mefdev-datepicker
168
- * [leftOffset]="'10'">
169
- * </mefdev-datepicker>
170
- */
171
- @Input() leftOffset: string = '10'; //Default value
172
-
173
- /**
174
- * Event emitted when the selected date in the datepicker changes.
175
- * It emits a `Date` object representing the selected date.
176
- * @example
177
- * <mefdev-datepicker
178
- * (dateChanged)="onDateChanged($event)">
179
- * </mefdev-datepicker>
180
- */
181
- @Output() dateChanged: EventEmitter<Date> = new EventEmitter<Date>();
182
-
183
- /**
184
- * Regular expression to validate user input for date in the format "dd/MM/yyyy".
185
- * - The day (dd) should be between 01 and 31.
186
- * - The month (MM) should be between 01 and 12.
187
- * - The year (yyyy) should be a 4-digit number.
188
- */
189
- private dateRegExp: RegExp = /^(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[0-2])\/\d{4}$/;
190
-
191
- /**
192
- * The string entered by the user for date input.
193
- * This variable stores the user's input as they type in the date field.
194
- */
195
- userInput: string = '';
196
-
197
- /**
198
- * Host listener for document click events to handle calendar interaction.
199
- * This function checks if a click event occurred within the calendar or input elements.
200
- * - If the click occurred within the calendar, no action is taken.
201
- * - If the click occurred within the input element and the component is not in editing mode,
202
- * it opens the calendar.
203
- * @param event The MouseEvent object representing the click event.
204
- */
205
- @HostListener('document:click', ['$event'])
206
- onClick(event: MouseEvent) {
207
- const targetElement = event.target as HTMLElement;
208
- const datepickerContainer = this.elementRef.nativeElement.querySelector('.datepicker-container');
209
- const calendar = this.elementRef.nativeElement.querySelector('.calendar');
210
- const monthDropdown = this.elementRef.nativeElement.querySelector('.monthDropdown');
211
- const yearDropdown = this.elementRef.nativeElement.querySelector('.yearDropdown');
212
- const inputElement = this.elementRef.nativeElement.querySelector('input');
213
-
214
- if (datepickerContainer && datepickerContainer.contains(calendar)) {
215
- if (calendar && calendar.contains(targetElement)) return;
216
- if (this.isMonthDropdownOpen && !calendar.contains(targetElement)) return;
217
- if (this.isYearDropdownOpen && !calendar.contains(targetElement)) return;
218
- if ((monthDropdown && monthDropdown.contains(targetElement)) && (yearDropdown && yearDropdown.contains(targetElement))) {
219
- this.toggleMonthDropdown(event)
220
- this.toggleYearDropdown(event)
221
- }
222
- }
223
- }
224
-
225
- /**
226
- * Constructor for the DatepickerComponent class.
227
- * @param datePipe A service for formatting and parsing dates.
228
- * @param elementRef A reference to the element on which this component is attached.
229
- * It is used to access DOM elements.
230
- */
231
- constructor(private datePipe: DatePipe, private elementRef: ElementRef) {
232
- this.updateInputValue()
233
- }
234
-
235
- /**
236
- * Lifecycle hook called after the component is initialized.
237
- * It initializes the years for the year select dropdown.
238
- */
239
- ngOnInit(){
240
- this.initializeYears();
241
- }
242
-
243
- /**
244
- * Lifecycle hook called whenever the input properties of the component change.
245
- * It updates the input value.
246
- */
247
- ngOnChanges() {
248
- this.updateInputValue();
249
- }
250
-
251
- /**
252
- * An array of month names based on the selected language.
253
- * It provides localized month names for display in the datepicker.
254
- */
255
- private get months(){
256
- return this.getMonthList(this.lang);
257
- }
258
-
259
- /**
260
- * An array of weekday names based on the selected language.
261
- * It provides localized weekday names for display in the datepicker.
262
- */
263
- private get weekdays() {
264
- return this.getWeekdayList(this.lang);
265
- }
266
-
267
- /**
268
- * Initialize the list of years to be displayed in the year dropdown.
269
- * This method populates the 'years' array with a range of years based on the provided 'yearsRange' configuration.
270
- * @example
271
- * ```
272
- * // Assuming 'yearsRange' is { startYear: 1900, toYear: 300 }
273
- * // After calling initializeYears(), 'years' might contain [1900, 1901, ..., 300]
274
- * this.initializeYears();
275
- * ```
276
- */
277
- private initializeYears() {
278
- this.years = Array.from({ length: this.yearsRange.toYear }, (_, index) => index + this.yearsRange.startYear);
279
- }
280
-
281
- /**
282
- * Toggle the editing mode for the date input. When enabled, the user can edit the date directly in the input field.
283
- */
284
- toggleEdit() {
285
- this.editedDate = this.formatSelectedDate(); // Store the current formatted date for editing
286
- this.isCalendarOpen = false;
287
- }
288
-
289
- /**
290
- * Get a list of month names in the specified language and format.
291
- * @param locales - An optional parameter specifying the locale or locales to use for formatting.
292
- * @param format - The format for month names, either "long" (default) or "short".
293
- * @returns An array of month names based on the provided format and locale.
294
- * ```
295
- * // Get a list of month names in the default language and long format
296
- * const months = this.getMonthList(this.lang);
297
- * ```
298
- */
299
- private getMonthList( locales?: string | string[], format: "long" | "short" = "long"): string[] {
300
- const year = new Date().getFullYear();
301
- const monthList = [...Array(12).keys()];
302
- const formatter = new Intl.DateTimeFormat(locales, { month: format });
303
- const getMonthName = (monthIndex: number) => formatter.format(new Date(year, monthIndex));
304
- return monthList.map(getMonthName);
305
- }
306
-
307
- /**
308
- * Get a list of weekday names in the specified language and format.
309
- * @param locales - An optional parameter specifying the locale or locales to use for formatting.
310
- * @param format - The format for weekday names, either "short" (default) or "long".
311
- * @returns An array of weekday names based on the provided format and locale.
312
- * ```
313
- * // Get a list of weekday names in the default language and short format
314
- * const weekdays = this.getWeekdayList();
315
- * ```
316
- */
317
- private getWeekdayList(locales?: string | string[], format: "short" | "long" = "short"): string[] {
318
- const weekdays = [...Array(7).keys()];
319
- const mondayIndex = weekdays.indexOf(0);
320
- weekdays.splice(mondayIndex, 1);
321
- weekdays.push(0);
322
- const formatter = new Intl.DateTimeFormat(locales, { weekday: format });
323
- const getWeekdayName = (weekdayIndex: number) => {
324
- return formatter.format(new Date(2023, 9, weekdayIndex + 1));
325
- };
326
- return weekdays.map(getWeekdayName);
327
- }
328
-
329
- /**
330
- * Save the edited date input by the user, provided it matches the specified date format.
331
- * This method checks if the entered date is in a valid format, disables the editing mode, and applies
332
- * the edited date to the 'selectedDate'. It then reformats the selected date and closes the calendar.
333
- * ```
334
- * // Save the edited date and update the selected date
335
- * this.saveEditedDate();
336
- * ```
337
- */
338
- private saveEditedDate() {
339
- if (this.isDateValid(this.editedDate)) {
340
- const [day, month, year] = this.editedDate.split('/');
341
- this.selectedDate = new Date(+year, +month - 1, +day);
342
- this.formatDate();
343
- }
344
- }
345
-
346
- /**
347
- * Handle user input in the editable input field for date editing. This method captures the input value
348
- * and stores it in the 'editedDate' variable. If the input matches the valid date format, it updates
349
- * 'selectedDateMonth' and 'selectedDateYear' accordingly.
350
- * @param event - The input event containing the user's input.
351
- * ```
352
- * // Handle user input in the editable input field
353
- * this.onDateInput(event);
354
- * ```
355
- */
356
- public onDateInput(event: any) {
357
- const inputDate: string = event.target.value;
358
- if (this.isDateValid(inputDate)) {
359
- this.editedDate = inputDate;
360
- const parsedDate = inputDate.split('/');
361
- this.selectedDateMonth = +parsedDate[1] - 1;
362
- this.selectedDateYear = +parsedDate[2];
363
- this.selectedDate = new Date(+parsedDate[2], +parsedDate[1] - 1, +parsedDate[0]);
364
- this.calculateFirstDayOfCalendar();
365
- }
366
- this.isUserDateValid = this.isDateValid(inputDate);
367
- }
368
-
369
- /**
370
- * Toggle the visibility of the month dropdown in the calendar interface.
371
- * This method is used to open or close the dropdown for selecting months.
372
- * @param event - The event triggering the toggle action (e.g., a click event).
373
- * ```
374
- * // Toggle the visibility of the month dropdown
375
- * this.toggleMonthDropdown(event);
376
- * ```
377
- */
378
- private toggleMonthDropdown(event: Event) {
379
- this.isMonthDropdownOpen = !this.isMonthDropdownOpen;
380
- }
381
-
382
- /**
383
- * Toggle the visibility of the year dropdown in the calendar interface.
384
- * This method is used to open or close the dropdown for selecting years.
385
- * @param event - The event triggering the toggle action (e.g., a click event).
386
- * ```
387
- * // Toggle the visibility of the year dropdown
388
- * this.toggleYearDropdown(event);
389
- * ```
390
- */
391
- private toggleYearDropdown(event: Event) {
392
- this.isYearDropdownOpen = !this.isYearDropdownOpen;
393
- }
394
-
395
- /**
396
- * Handle the change of the selected month in the calendar interface.
397
- * This method updates the input value, sets the selected date to the first day of the chosen month,
398
- * and recalculates the calendar display accordingly.
399
- * ```
400
- * // Handle the change of the selected month
401
- * this.onMonthChange();
402
- * ```
403
- */
404
- private onMonthChange() {
405
- this.updateInputValue();
406
- this.selectedDate = new Date(this.selectedDateYear, this.selectedDateMonth, 1);
407
- this.formatDate();
408
- this.calculateFirstDayOfCalendar();
409
- }
410
-
411
- /**
412
- * Handle the change of the selected year in the calendar interface.
413
- * This method updates the input value, sets the selected date to the first day of the chosen year,
414
- * reformats the selected date, and recalculates the calendar display.
415
- * ```
416
- * // Handle the change of the selected year
417
- * this.onYearChange();
418
- * ```
419
- */
420
- private onYearChange() {
421
- this.updateInputValue();
422
- this.selectedDate = new Date(this.selectedDateYear, this.selectedDateMonth, 1);
423
- this.formatDate();
424
- this.calculateFirstDayOfCalendar();
425
- }
426
-
427
-
428
- /**
429
- * Select a date in the calendar interface and perform necessary updates.
430
- * This method sets the selected date, formats it, closes the calendar, and emits a dateChanged event.
431
- * It also updates the selected month and year dropdown values.
432
- * @param date - The date to be selected in the calendar.
433
- */
434
- selectDate(date: Date) {
435
- this.selectedDate = date;
436
- this.formatDate();
437
- this.isCalendarOpen = false;
438
- this.dateChanged.next(this.selectedDate);
439
- this.selectedDateMonth = this.selectedDate.getMonth();
440
- this.selectedDateYear = this.selectedDate.getFullYear();
441
- }
442
-
443
- /**
444
- * Format the selected date based on the chosen date format and language.
445
- * This method uses the Angular DatePipe to format the selected date and updates the formattedDate variable.
446
- * ```
447
- * // Format the selected date
448
- * this.formatDate();
449
- * ```
450
- */
451
- private formatDate() {
452
- this.formattedDate = this.datePipe.transform(this.selectedDate, this.dateFormat) || '';
453
- }
454
-
455
- /**
456
- * Format the selected date based on the chosen date format, language, and locale.
457
- * This method uses the Angular DatePipe to format the selected date with the specified language and updates the formatted date as a string.
458
- * @returns A formatted date string.
459
- * ```
460
- * // Format the selected date with language
461
- * const formatted = this.formatSelectedDate();
462
- * ```
463
- */
464
- private formatSelectedDate(): string {
465
- return this.datePipe.transform(this.selectedDate, this.dateFormat, this.lang) || '';
466
- }
467
-
468
- /**
469
- * Update the input value displayed in the calendar interface.
470
- * This method updates the input value to either the edited date or the formatted selected date,
471
- * depending on whether the user is in edit mode or not.
472
- * ```
473
- * // Update the input value
474
- * this.updateInputValue();
475
- * ```
476
- */
477
- private updateInputValue() {
478
- this.formattedDate = this.isCalendarOpen ? this.editedDate : this.formatSelectedDate();
479
- }
480
-
481
- /**
482
- * Get an array of arrays representing the days of the current month.
483
- * Each sub-array contains the day data for a week, and each day data object includes the date and whether it belongs to the current month.
484
- * @returns An array of arrays representing the days of the current month.
485
- * ```
486
- * // Get an array of arrays representing the days of the current month
487
- * const calendar = this.calendarDays;
488
- * ```
489
- */
490
- private get calendarDays() {
491
- return this.calculateFirstDayOfCalendar();
492
- }
493
-
494
- /**
495
- * Get the date of the previous month to display in empty cells of the current month.
496
- * This method returns the date of the previous month if the provided date is not in the current month.
497
- * If the provided date is in the current month, it returns the date's day as a string.
498
- * @param date - The date to evaluate.
499
- * @returns The date of the previous month or a day string.
500
- * ```
501
- * // Get the previous month's date to display in empty cells
502
- * const previousMonthDate = this.getPreviousMonthDate(new Date(2023, 8, 1));
503
- * ```
504
- */
505
- private getPreviousMonthDate(date: Date): any {
506
- if (!date) {
507
- return '';
508
- }
509
- const currentDate = new Date();
510
- if (date.getMonth() === currentDate.getMonth() && date.getFullYear() === currentDate.getFullYear()) {
511
- return date.getDate().toString();
512
- } else {
513
- return this.datePipe.transform(date, 'dd');
514
- }
515
- }
516
-
517
-
518
- /**
519
- * Navigate to the previous month in the calendar interface.
520
- * This method updates the selectedDate, formats it, and recalculates the first day of the calendar.
521
- * ```
522
- * // Navigate to the previous month
523
- * this.getPreviousMonth();
524
- * ```
525
- */
526
- private getPreviousMonth() {
527
- const currentMonth = this.selectedDate.getMonth();
528
- this.selectedDate = new Date(this.selectedDate.getFullYear(), currentMonth - 1, 1);
529
- this.formatDate();
530
- this.calculateFirstDayOfCalendar();
531
- }
532
-
533
- /**
534
- * Navigate to the next month in the calendar interface.
535
- * This method updates the selectedDate, formats it, and recalculates the first day of the calendar.
536
- * ```
537
- * // Navigate to the next month
538
- * this.getNextMonth();
539
- * ```
540
- */
541
- private getNextMonth() {
542
- const currentMonth = this.selectedDate.getMonth();
543
- this.selectedDate = new Date(this.selectedDate.getFullYear(), currentMonth + 1, 1);
544
- this.formatDate();
545
- this.calculateFirstDayOfCalendar();
546
- }
547
-
548
-
549
- /**
550
- * Get the number of days in a given month of a specific year.
551
- * @param year - The year for which you want to determine the number of days.
552
- * @param month - The month (0-based index) for which you want to determine the number of days.
553
- * @returns The number of days in the specified month of the given year.
554
- */
555
- private daysInMonth(year: number, month: number): number {
556
- return new Date(year, month + 1, 0).getDate();
557
- }
558
-
559
- /**
560
- * Calculate the structure of days in a month for the calendar display.
561
- * This method generates a matrix of day data objects representing the days in the calendar.
562
- * Each day data object contains the date and whether it belongs to the current month.
563
- * @returns A matrix of day data objects for the calendar display.
564
- */
565
- private calculateFirstDayOfCalendar() {
566
- const year = this.selectedDate.getFullYear();
567
- const month = this.selectedDate.getMonth();
568
- const firstDayOfMonth = new Date(year, month, 1);
569
- const firstWeekday = firstDayOfMonth.getDay();
570
- const startDay = firstWeekday === 0 ? -5 : 2 - firstWeekday;
571
- const calendarDays = [];
572
- let currentDay = startDay;
573
- for (let i = 0; i < 6; i++) {
574
- const week = [];
575
- for (let j = 0; j < 7; j++) {
576
- const day = new Date(year, month, currentDay);
577
- const dayData = {
578
- date: day,
579
- isCurrentMonth: currentDay >= 1 && currentDay <= this.daysInMonth(year, month),
580
- };
581
- week.push(dayData);
582
- currentDay++;
583
- }
584
- calendarDays.push(week);
585
- }
586
- return calendarDays;
587
- }
588
-
589
- /**
590
- * Check if a given date is the currently selected date in the calendar.
591
- * @param date - The date to check.
592
- * @returns `true` if the provided date matches the selected date, otherwise `false`.
593
- * ```
594
- * // Check if a date is selected
595
- * const isSelected = this.isDateSelected(someDate);
596
- * ```
597
- */
598
- private isDateSelected(date: Date) {
599
- return date.toDateString() === this.selectedDate.toDateString();
600
- }
601
-
602
- /**
603
- * Check if a date string is valid based on the specified date format.
604
- * It also checks whether the specified number, month is correct and whether the specified one exists among calendar years
605
- * @param inputDate - The date string to validate.
606
- * @returns `true` if the input date string is valid, otherwise `false`.
607
- * ```
608
- * // Check if a date string is valid
609
- * const isValidDate = this.isDateValid('05/25/2023');
610
- * ```
611
- */
612
- private isDateValid(inputDate: string) {
613
- if (!this.dateRegExp.test(inputDate)) {
614
- return false;
615
- }
616
-
617
- const parts = inputDate.split('/');
618
- const day = parseInt(parts[0], 10);
619
- const month = parseInt(parts[1], 10);
620
- const year = parseInt(parts[2], 10);
621
-
622
- if (year > this.years[this.years.length - 1] || year < this.years[0]) {
623
- return false
624
- }
625
-
626
- const daysInMonth = new Date(year, month, 0).getDate();
627
- return day <= daysInMonth;
628
- }
629
-
630
- /**
631
- * Check if a given date is today's date.
632
- * @param date - The date to check.
633
- * @returns `true` if the provided date is today's date, otherwise `false`.
634
- * ```
635
- * // Check if a date is today's date
636
- * const isToday = this.isDateToday(someDate);
637
- * ```
638
- */
639
- private isDateToday(date: Date) {
640
- const today = new Date();
641
- return date.toDateString() === today.toDateString();
642
- }
643
- }
@@ -1,15 +0,0 @@
1
- import { NgModule } from '@angular/core';
2
- import { CommonModule, DatePipe } from '@angular/common';
3
- import { DatepickerComponent } from './datepicker/datepicker.component';
4
- import { FormsModule } from '@angular/forms';
5
- import { MefDevSelectModule } from '../../../pg-components/select';
6
-
7
-
8
-
9
- @NgModule({
10
- declarations: [DatepickerComponent],
11
- exports: [DatepickerComponent],
12
- imports: [CommonModule, FormsModule, DatePipe, MefDevSelectModule],
13
- providers:[DatePipe]
14
- })
15
- export class MefDevDatepickerModule { }
@@ -1,2 +0,0 @@
1
- export * from './datepicker/datepicker.component'
2
- export * from './datepicker.module'
@@ -1,3 +0,0 @@
1
- <div class="item-container">
2
- <mefdev-filtered-field-item *ngFor="let item of items" [item]="item" (discard)="onDiscard(item)" (openFilter)="onOpenFilter(item)"></mefdev-filtered-field-item>
3
- </div>
@@ -1,4 +0,0 @@
1
- .item-container{
2
- display: flex;
3
- cursor: context-menu;
4
- }