igniteui-webcomponents 6.4.0-alpha.4 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (431) hide show
  1. package/CHANGELOG.md +141 -2
  2. package/README.md +65 -56
  3. package/components/button/themes/button/dark/button.indigo.css.js +1 -1
  4. package/components/button/themes/button/dark/button.indigo.css.js.map +1 -1
  5. package/components/button/themes/button/dark/button.material.css.js +1 -1
  6. package/components/button/themes/button/dark/button.material.css.js.map +1 -1
  7. package/components/button/themes/button/light/button.indigo.css.js +1 -1
  8. package/components/button/themes/button/light/button.indigo.css.js.map +1 -1
  9. package/components/button/themes/button/light/button.material.css.js +1 -1
  10. package/components/button/themes/button/light/button.material.css.js.map +1 -1
  11. package/components/button/themes/button/shared/button.bootstrap.css.js +1 -1
  12. package/components/button/themes/button/shared/button.bootstrap.css.js.map +1 -1
  13. package/components/button/themes/button/shared/button.common.css.js +1 -1
  14. package/components/button/themes/button/shared/button.common.css.js.map +1 -1
  15. package/components/button/themes/button/shared/button.fluent.css.js +1 -1
  16. package/components/button/themes/button/shared/button.fluent.css.js.map +1 -1
  17. package/components/button/themes/button/shared/button.indigo.css.js +1 -1
  18. package/components/button/themes/button/shared/button.indigo.css.js.map +1 -1
  19. package/components/button/themes/button/shared/button.material.css.js +1 -1
  20. package/components/button/themes/button/shared/button.material.css.js.map +1 -1
  21. package/components/button-group/themes/dark/button-group.material.css.js +1 -1
  22. package/components/button-group/themes/dark/button-group.material.css.js.map +1 -1
  23. package/components/button-group/themes/light/button-group.material.css.js +1 -1
  24. package/components/button-group/themes/light/button-group.material.css.js.map +1 -1
  25. package/components/button-group/themes/shared/button/button.bootstrap.css.js +1 -1
  26. package/components/button-group/themes/shared/button/button.bootstrap.css.js.map +1 -1
  27. package/components/button-group/themes/shared/button/button.material.css.js +1 -1
  28. package/components/button-group/themes/shared/button/button.material.css.js.map +1 -1
  29. package/components/calendar/base.d.ts +7 -3
  30. package/components/calendar/base.js +10 -14
  31. package/components/calendar/base.js.map +1 -1
  32. package/components/calendar/calendar.d.ts +48 -44
  33. package/components/calendar/calendar.js +263 -259
  34. package/components/calendar/calendar.js.map +1 -1
  35. package/components/calendar/days-view/days-view.d.ts +49 -27
  36. package/components/calendar/days-view/days-view.js +170 -168
  37. package/components/calendar/days-view/days-view.js.map +1 -1
  38. package/components/calendar/helpers.js +40 -28
  39. package/components/calendar/helpers.js.map +1 -1
  40. package/components/calendar/model.d.ts +9 -3
  41. package/components/calendar/model.js +29 -19
  42. package/components/calendar/model.js.map +1 -1
  43. package/components/calendar/months-view/months-view.d.ts +6 -8
  44. package/components/calendar/months-view/months-view.js +25 -38
  45. package/components/calendar/months-view/months-view.js.map +1 -1
  46. package/components/calendar/themes/dark/calendar.bootstrap.css.js +1 -1
  47. package/components/calendar/themes/dark/calendar.bootstrap.css.js.map +1 -1
  48. package/components/calendar/themes/dark/calendar.fluent.css.js +1 -1
  49. package/components/calendar/themes/dark/calendar.fluent.css.js.map +1 -1
  50. package/components/calendar/themes/dark/calendar.indigo.css.js +1 -1
  51. package/components/calendar/themes/dark/calendar.indigo.css.js.map +1 -1
  52. package/components/calendar/themes/dark/calendar.material.css.js +1 -1
  53. package/components/calendar/themes/dark/calendar.material.css.js.map +1 -1
  54. package/components/calendar/themes/days.js +8 -23
  55. package/components/calendar/themes/days.js.map +1 -1
  56. package/components/calendar/themes/light/calendar.bootstrap.css.js +1 -1
  57. package/components/calendar/themes/light/calendar.bootstrap.css.js.map +1 -1
  58. package/components/calendar/themes/light/calendar.fluent.css.js +1 -1
  59. package/components/calendar/themes/light/calendar.fluent.css.js.map +1 -1
  60. package/components/calendar/themes/light/calendar.indigo.css.js +1 -1
  61. package/components/calendar/themes/light/calendar.indigo.css.js.map +1 -1
  62. package/components/calendar/themes/light/calendar.material.css.js +1 -1
  63. package/components/calendar/themes/light/calendar.material.css.js.map +1 -1
  64. package/components/calendar/themes/shared/bootstrap/days-view.bootstrap.css.js +1 -1
  65. package/components/calendar/themes/shared/bootstrap/days-view.bootstrap.css.js.map +1 -1
  66. package/components/calendar/themes/shared/bootstrap/year-month-view.bootstrap.css.js +1 -1
  67. package/components/calendar/themes/shared/bootstrap/year-month-view.bootstrap.css.js.map +1 -1
  68. package/components/calendar/themes/shared/fluent/days-view.fluent.css.js +1 -1
  69. package/components/calendar/themes/shared/fluent/days-view.fluent.css.js.map +1 -1
  70. package/components/calendar/themes/shared/indigo/days-view.indigo.css.js +1 -1
  71. package/components/calendar/themes/shared/indigo/days-view.indigo.css.js.map +1 -1
  72. package/components/calendar/themes/shared/material/days-view.material.css.js +1 -1
  73. package/components/calendar/themes/shared/material/days-view.material.css.js.map +1 -1
  74. package/components/calendar/themes/year-month.js +8 -23
  75. package/components/calendar/themes/year-month.js.map +1 -1
  76. package/components/calendar/years-view/years-view.d.ts +6 -5
  77. package/components/calendar/years-view/years-view.js +11 -14
  78. package/components/calendar/years-view/years-view.js.map +1 -1
  79. package/components/carousel/carousel.d.ts +2 -1
  80. package/components/carousel/carousel.js.map +1 -1
  81. package/components/checkbox/checkbox-base.d.ts +1 -1
  82. package/components/checkbox/themes/light/checkbox/checkbox.material.css.js +1 -1
  83. package/components/checkbox/themes/light/checkbox/checkbox.material.css.js.map +1 -1
  84. package/components/checkbox/themes/shared/switch/switch.bootstrap.css.js +1 -1
  85. package/components/checkbox/themes/shared/switch/switch.bootstrap.css.js.map +1 -1
  86. package/components/checkbox/themes/shared/switch/switch.common.css.js +1 -1
  87. package/components/checkbox/themes/shared/switch/switch.common.css.js.map +1 -1
  88. package/components/checkbox/themes/shared/switch/switch.fluent.css.js +1 -1
  89. package/components/checkbox/themes/shared/switch/switch.fluent.css.js.map +1 -1
  90. package/components/checkbox/themes/shared/switch/switch.indigo.css.js +1 -1
  91. package/components/checkbox/themes/shared/switch/switch.indigo.css.js.map +1 -1
  92. package/components/checkbox/themes/shared/switch/switch.material.css.js +1 -1
  93. package/components/checkbox/themes/shared/switch/switch.material.css.js.map +1 -1
  94. package/components/chip/chip.d.ts +2 -1
  95. package/components/chip/chip.js.map +1 -1
  96. package/components/chip/themes/dark/chip.fluent.css.js +1 -1
  97. package/components/chip/themes/dark/chip.fluent.css.js.map +1 -1
  98. package/components/chip/themes/dark/chip.indigo.css.js +1 -1
  99. package/components/chip/themes/dark/chip.indigo.css.js.map +1 -1
  100. package/components/chip/themes/light/chip.fluent.css.js +1 -1
  101. package/components/chip/themes/light/chip.fluent.css.js.map +1 -1
  102. package/components/chip/themes/light/chip.indigo.css.js +1 -1
  103. package/components/chip/themes/light/chip.indigo.css.js.map +1 -1
  104. package/components/chip/themes/light/chip.shared.css.js +1 -1
  105. package/components/chip/themes/light/chip.shared.css.js.map +1 -1
  106. package/components/chip/themes/shared/chip.indigo.css.js +1 -1
  107. package/components/chip/themes/shared/chip.indigo.css.js.map +1 -1
  108. package/components/combo/combo.d.ts +3 -2
  109. package/components/combo/combo.js +7 -0
  110. package/components/combo/combo.js.map +1 -1
  111. package/components/combo/controllers/selection.js.map +1 -1
  112. package/components/combo/validators.js +2 -2
  113. package/components/combo/validators.js.map +1 -1
  114. package/components/common/controllers/async-consumer.js.map +1 -1
  115. package/components/common/controllers/focus-ring.js +1 -5
  116. package/components/common/controllers/focus-ring.js.map +1 -1
  117. package/components/common/controllers/root-click.js +46 -21
  118. package/components/common/controllers/root-click.js.map +1 -1
  119. package/components/common/definitions/defineAllComponents.js +2 -0
  120. package/components/common/definitions/defineAllComponents.js.map +1 -1
  121. package/components/common/i18n/EN/calendar.resources.js +4 -1
  122. package/components/common/i18n/EN/calendar.resources.js.map +1 -1
  123. package/components/common/i18n/EN/date-range-picker.resources.js.map +1 -1
  124. package/components/common/i18n/i18n-controller.js +6 -9
  125. package/components/common/i18n/i18n-controller.js.map +1 -1
  126. package/components/common/i18n/utils.d.ts +0 -12
  127. package/components/common/i18n/utils.js +0 -12
  128. package/components/common/i18n/utils.js.map +1 -1
  129. package/components/common/mixins/forms/associated.js +3 -23
  130. package/components/common/mixins/forms/associated.js.map +1 -1
  131. package/components/common/util.d.ts +5 -0
  132. package/components/common/util.js +5 -0
  133. package/components/common/util.js.map +1 -1
  134. package/components/common/validators.d.ts +2 -4
  135. package/components/common/validators.js +13 -19
  136. package/components/common/validators.js.map +1 -1
  137. package/components/date-picker/date-picker.d.ts +7 -3
  138. package/components/date-picker/date-picker.js +2 -2
  139. package/components/date-picker/date-picker.js.map +1 -1
  140. package/components/date-picker/themes/dark/date-picker.bootstrap.css.js +1 -1
  141. package/components/date-picker/themes/dark/date-picker.bootstrap.css.js.map +1 -1
  142. package/components/date-picker/themes/dark/date-picker.fluent.css.js +1 -1
  143. package/components/date-picker/themes/dark/date-picker.fluent.css.js.map +1 -1
  144. package/components/date-picker/themes/dark/date-picker.indigo.css.js +1 -1
  145. package/components/date-picker/themes/dark/date-picker.indigo.css.js.map +1 -1
  146. package/components/date-picker/themes/dark/date-picker.material.css.js +1 -1
  147. package/components/date-picker/themes/dark/date-picker.material.css.js.map +1 -1
  148. package/components/date-picker/themes/light/date-picker.bootstrap.css.js +1 -1
  149. package/components/date-picker/themes/light/date-picker.bootstrap.css.js.map +1 -1
  150. package/components/date-picker/themes/light/date-picker.fluent.css.js +1 -1
  151. package/components/date-picker/themes/light/date-picker.fluent.css.js.map +1 -1
  152. package/components/date-picker/themes/light/date-picker.indigo.css.js +1 -1
  153. package/components/date-picker/themes/light/date-picker.indigo.css.js.map +1 -1
  154. package/components/date-picker/themes/light/date-picker.material.css.js +1 -1
  155. package/components/date-picker/themes/light/date-picker.material.css.js.map +1 -1
  156. package/components/date-picker/validators.js +2 -3
  157. package/components/date-picker/validators.js.map +1 -1
  158. package/components/date-range-picker/date-range-picker.d.ts +7 -2
  159. package/components/date-range-picker/date-range-picker.js +13 -10
  160. package/components/date-range-picker/date-range-picker.js.map +1 -1
  161. package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js +1 -1
  162. package/components/date-range-picker/themes/dark/date-range-picker.bootstrap.css.js.map +1 -1
  163. package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js +1 -1
  164. package/components/date-range-picker/themes/dark/date-range-picker.fluent.css.js.map +1 -1
  165. package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js +1 -1
  166. package/components/date-range-picker/themes/dark/date-range-picker.indigo.css.js.map +1 -1
  167. package/components/date-range-picker/themes/dark/date-range-picker.material.css.js +1 -1
  168. package/components/date-range-picker/themes/dark/date-range-picker.material.css.js.map +1 -1
  169. package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js +1 -1
  170. package/components/date-range-picker/themes/light/date-range-picker.bootstrap.css.js.map +1 -1
  171. package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js +1 -1
  172. package/components/date-range-picker/themes/light/date-range-picker.fluent.css.js.map +1 -1
  173. package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js +1 -1
  174. package/components/date-range-picker/themes/light/date-range-picker.indigo.css.js.map +1 -1
  175. package/components/date-range-picker/themes/light/date-range-picker.material.css.js +1 -1
  176. package/components/date-range-picker/themes/light/date-range-picker.material.css.js.map +1 -1
  177. package/components/date-range-picker/validators.js +5 -8
  178. package/components/date-range-picker/validators.js.map +1 -1
  179. package/components/date-time-input/date-time-input.d.ts +10 -3
  180. package/components/date-time-input/date-time-input.js +39 -21
  181. package/components/date-time-input/date-time-input.js.map +1 -1
  182. package/components/date-time-input/date-util.d.ts +11 -9
  183. package/components/date-time-input/date-util.js +23 -219
  184. package/components/date-time-input/date-util.js.map +1 -1
  185. package/components/dialog/dialog.d.ts +2 -0
  186. package/components/dialog/dialog.js +18 -9
  187. package/components/dialog/dialog.js.map +1 -1
  188. package/components/dialog/themes/dark/dialog.fluent.css.js +1 -1
  189. package/components/dialog/themes/dark/dialog.fluent.css.js.map +1 -1
  190. package/components/dialog/themes/light/dialog.fluent.css.js +1 -1
  191. package/components/dialog/themes/light/dialog.fluent.css.js.map +1 -1
  192. package/components/dialog/themes/shared/dialog.bootstrap.css.js +1 -1
  193. package/components/dialog/themes/shared/dialog.bootstrap.css.js.map +1 -1
  194. package/components/dialog/themes/shared/dialog.indigo.css.js +1 -1
  195. package/components/dialog/themes/shared/dialog.indigo.css.js.map +1 -1
  196. package/components/expansion-panel/themes/light/expansion-panel.bootstrap.css.js +1 -1
  197. package/components/expansion-panel/themes/light/expansion-panel.bootstrap.css.js.map +1 -1
  198. package/components/file-input/file-input.d.ts +28 -13
  199. package/components/file-input/file-input.js +73 -46
  200. package/components/file-input/file-input.js.map +1 -1
  201. package/components/input/input-base.d.ts +31 -34
  202. package/components/input/input-base.js +58 -83
  203. package/components/input/input-base.js.map +1 -1
  204. package/components/input/input.d.ts +18 -7
  205. package/components/input/input.js +34 -19
  206. package/components/input/input.js.map +1 -1
  207. package/components/input/themes/dark/input.indigo.css.js +1 -1
  208. package/components/input/themes/dark/input.indigo.css.js.map +1 -1
  209. package/components/input/themes/light/input.indigo.css.js +1 -1
  210. package/components/input/themes/light/input.indigo.css.js.map +1 -1
  211. package/components/input/themes/light/input.shared.css.js +1 -1
  212. package/components/input/themes/light/input.shared.css.js.map +1 -1
  213. package/components/input/themes/shared/input.bootstrap.css.js +1 -1
  214. package/components/input/themes/shared/input.bootstrap.css.js.map +1 -1
  215. package/components/input/themes/shared/input.common.css.js +1 -1
  216. package/components/input/themes/shared/input.common.css.js.map +1 -1
  217. package/components/input/themes/shared/input.fluent.css.js +1 -1
  218. package/components/input/themes/shared/input.fluent.css.js.map +1 -1
  219. package/components/input/themes/shared/input.indigo.css.js +1 -1
  220. package/components/input/themes/shared/input.indigo.css.js.map +1 -1
  221. package/components/input/themes/shared/input.material.css.js +1 -1
  222. package/components/input/themes/shared/input.material.css.js.map +1 -1
  223. package/components/input/validators.js +3 -3
  224. package/components/input/validators.js.map +1 -1
  225. package/components/list/themes/dark/container/list.bootstrap.css.js +1 -1
  226. package/components/list/themes/dark/container/list.bootstrap.css.js.map +1 -1
  227. package/components/list/themes/light/container/list.fluent.css.js +1 -1
  228. package/components/list/themes/light/container/list.fluent.css.js.map +1 -1
  229. package/components/list/themes/shared/item/list-item.common.css.js +1 -1
  230. package/components/list/themes/shared/item/list-item.common.css.js.map +1 -1
  231. package/components/list/themes/shared/item/list-item.indigo.css.js +1 -1
  232. package/components/list/themes/shared/item/list-item.indigo.css.js.map +1 -1
  233. package/components/mask-input/mask-input-base.d.ts +10 -4
  234. package/components/mask-input/mask-input-base.js +21 -16
  235. package/components/mask-input/mask-input-base.js.map +1 -1
  236. package/components/mask-input/mask-input.d.ts +9 -3
  237. package/components/mask-input/mask-input.js +26 -6
  238. package/components/mask-input/mask-input.js.map +1 -1
  239. package/components/mask-input/mask-parser.d.ts +30 -7
  240. package/components/mask-input/mask-parser.js +70 -42
  241. package/components/mask-input/mask-parser.js.map +1 -1
  242. package/components/mask-input/validators.js +3 -3
  243. package/components/mask-input/validators.js.map +1 -1
  244. package/components/nav-drawer/themes/dark/container/nav-drawer.fluent.css.js +1 -1
  245. package/components/nav-drawer/themes/dark/container/nav-drawer.fluent.css.js.map +1 -1
  246. package/components/nav-drawer/themes/light/container/nav-drawer.fluent.css.js +1 -1
  247. package/components/nav-drawer/themes/light/container/nav-drawer.fluent.css.js.map +1 -1
  248. package/components/nav-drawer/themes/light/container/nav-drawer.material.css.js +1 -1
  249. package/components/nav-drawer/themes/light/container/nav-drawer.material.css.js.map +1 -1
  250. package/components/navbar/themes/shared/navbar.common.css.js +1 -1
  251. package/components/navbar/themes/shared/navbar.common.css.js.map +1 -1
  252. package/components/radio/themes/light/radio.material.css.js +1 -1
  253. package/components/radio/themes/light/radio.material.css.js.map +1 -1
  254. package/components/radio/themes/shared/radio.bootstrap.css.js +1 -1
  255. package/components/radio/themes/shared/radio.bootstrap.css.js.map +1 -1
  256. package/components/radio/themes/shared/radio.common.css.js +1 -1
  257. package/components/radio/themes/shared/radio.common.css.js.map +1 -1
  258. package/components/radio/themes/shared/radio.fluent.css.js +1 -1
  259. package/components/radio/themes/shared/radio.fluent.css.js.map +1 -1
  260. package/components/radio/themes/shared/radio.indigo.css.js +1 -1
  261. package/components/radio/themes/shared/radio.indigo.css.js.map +1 -1
  262. package/components/radio/themes/shared/radio.material.css.js +1 -1
  263. package/components/radio/themes/shared/radio.material.css.js.map +1 -1
  264. package/components/radio/validators.js +2 -2
  265. package/components/radio/validators.js.map +1 -1
  266. package/components/rating/themes/dark/rating.indigo.css.js +1 -1
  267. package/components/rating/themes/dark/rating.indigo.css.js.map +1 -1
  268. package/components/rating/themes/light/rating.indigo.css.js +1 -1
  269. package/components/rating/themes/light/rating.indigo.css.js.map +1 -1
  270. package/components/ripple/ripple.d.ts +3 -3
  271. package/components/ripple/ripple.js +34 -31
  272. package/components/ripple/ripple.js.map +1 -1
  273. package/components/stepper/step.js +2 -2
  274. package/components/stepper/step.js.map +1 -1
  275. package/components/stepper/themes/step/dark/step.bootstrap.css.js +1 -1
  276. package/components/stepper/themes/step/dark/step.bootstrap.css.js.map +1 -1
  277. package/components/stepper/themes/step/dark/step.fluent.css.js +1 -1
  278. package/components/stepper/themes/step/dark/step.fluent.css.js.map +1 -1
  279. package/components/stepper/themes/step/dark/step.indigo.css.js +1 -1
  280. package/components/stepper/themes/step/dark/step.indigo.css.js.map +1 -1
  281. package/components/stepper/themes/step/dark/step.material.css.js +1 -1
  282. package/components/stepper/themes/step/dark/step.material.css.js.map +1 -1
  283. package/components/stepper/themes/step/light/step.bootstrap.css.js +1 -1
  284. package/components/stepper/themes/step/light/step.bootstrap.css.js.map +1 -1
  285. package/components/stepper/themes/step/light/step.fluent.css.js +1 -1
  286. package/components/stepper/themes/step/light/step.fluent.css.js.map +1 -1
  287. package/components/stepper/themes/step/light/step.indigo.css.js +1 -1
  288. package/components/stepper/themes/step/light/step.indigo.css.js.map +1 -1
  289. package/components/stepper/themes/step/light/step.material.css.js +1 -1
  290. package/components/stepper/themes/step/light/step.material.css.js.map +1 -1
  291. package/components/stepper/themes/step/light/step.shared.css.js +1 -1
  292. package/components/stepper/themes/step/light/step.shared.css.js.map +1 -1
  293. package/components/stepper/themes/step/shared/step.common.css.js +1 -1
  294. package/components/stepper/themes/step/shared/step.common.css.js.map +1 -1
  295. package/components/stepper/themes/step/shared/step.indigo.css.js +1 -1
  296. package/components/stepper/themes/step/shared/step.indigo.css.js.map +1 -1
  297. package/components/tabs/tab-dom.js +8 -9
  298. package/components/tabs/tab-dom.js.map +1 -1
  299. package/components/tabs/themes/dark/tab.bootstrap.css.js +1 -1
  300. package/components/tabs/themes/dark/tab.bootstrap.css.js.map +1 -1
  301. package/components/tabs/themes/dark/tab.fluent.css.js +1 -1
  302. package/components/tabs/themes/dark/tab.fluent.css.js.map +1 -1
  303. package/components/tabs/themes/dark/tab.indigo.css.js +1 -1
  304. package/components/tabs/themes/dark/tab.indigo.css.js.map +1 -1
  305. package/components/tabs/themes/dark/tab.material.css.js +1 -1
  306. package/components/tabs/themes/dark/tab.material.css.js.map +1 -1
  307. package/components/tabs/themes/dark/tab.shared.css.js +1 -1
  308. package/components/tabs/themes/dark/tab.shared.css.js.map +1 -1
  309. package/components/tabs/themes/light/tab.bootstrap.css.js +1 -1
  310. package/components/tabs/themes/light/tab.bootstrap.css.js.map +1 -1
  311. package/components/tabs/themes/light/tab.fluent.css.js +1 -1
  312. package/components/tabs/themes/light/tab.fluent.css.js.map +1 -1
  313. package/components/tabs/themes/light/tab.indigo.css.js +1 -1
  314. package/components/tabs/themes/light/tab.indigo.css.js.map +1 -1
  315. package/components/tabs/themes/light/tab.material.css.js +1 -1
  316. package/components/tabs/themes/light/tab.material.css.js.map +1 -1
  317. package/components/tabs/themes/light/tab.shared.css.js +1 -1
  318. package/components/tabs/themes/light/tab.shared.css.js.map +1 -1
  319. package/components/tabs/themes/shared/tab/tab.bootstrap.css.js +1 -1
  320. package/components/tabs/themes/shared/tab/tab.bootstrap.css.js.map +1 -1
  321. package/components/tabs/themes/shared/tab/tab.common.css.js +1 -1
  322. package/components/tabs/themes/shared/tab/tab.common.css.js.map +1 -1
  323. package/components/tabs/themes/shared/tab/tab.fluent.css.js +1 -1
  324. package/components/tabs/themes/shared/tab/tab.fluent.css.js.map +1 -1
  325. package/components/tabs/themes/shared/tab/tab.indigo.css.js +1 -1
  326. package/components/tabs/themes/shared/tab/tab.indigo.css.js.map +1 -1
  327. package/components/tabs/themes/shared/tab/tab.material.css.js +1 -1
  328. package/components/tabs/themes/shared/tab/tab.material.css.js.map +1 -1
  329. package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js +1 -1
  330. package/components/tabs/themes/shared/tabs/tabs.bootstrap.css.js.map +1 -1
  331. package/components/tabs/themes/shared/tabs/tabs.common.css.js +1 -1
  332. package/components/tabs/themes/shared/tabs/tabs.common.css.js.map +1 -1
  333. package/components/tabs/themes/shared/tabs/tabs.indigo.css.js +1 -1
  334. package/components/tabs/themes/shared/tabs/tabs.indigo.css.js.map +1 -1
  335. package/components/tabs/themes/shared/tabs/tabs.material.css.js +1 -1
  336. package/components/tabs/themes/shared/tabs/tabs.material.css.js.map +1 -1
  337. package/components/tabs/themes/tabs.base.css.js +1 -1
  338. package/components/tabs/themes/tabs.base.css.js.map +1 -1
  339. package/components/textarea/themes/dark/textarea.indigo.css.js +1 -1
  340. package/components/textarea/themes/dark/textarea.indigo.css.js.map +1 -1
  341. package/components/textarea/themes/light/textarea.indigo.css.js +1 -1
  342. package/components/textarea/themes/light/textarea.indigo.css.js.map +1 -1
  343. package/components/textarea/themes/light/textarea.shared.css.js +1 -1
  344. package/components/textarea/themes/light/textarea.shared.css.js.map +1 -1
  345. package/components/textarea/themes/shared/textarea.bootstrap.css.js +1 -1
  346. package/components/textarea/themes/shared/textarea.bootstrap.css.js.map +1 -1
  347. package/components/textarea/themes/shared/textarea.common.css.js +1 -1
  348. package/components/textarea/themes/shared/textarea.common.css.js.map +1 -1
  349. package/components/textarea/themes/shared/textarea.fluent.css.js +1 -1
  350. package/components/textarea/themes/shared/textarea.fluent.css.js.map +1 -1
  351. package/components/textarea/themes/shared/textarea.indigo.css.js +1 -1
  352. package/components/textarea/themes/shared/textarea.indigo.css.js.map +1 -1
  353. package/components/textarea/themes/shared/textarea.material.css.js +1 -1
  354. package/components/textarea/themes/shared/textarea.material.css.js.map +1 -1
  355. package/components/theme-provider/theme-provider.d.ts +65 -0
  356. package/components/theme-provider/theme-provider.js +58 -0
  357. package/components/theme-provider/theme-provider.js.map +1 -0
  358. package/components/tile-manager/tile.js +6 -3
  359. package/components/tile-manager/tile.js.map +1 -1
  360. package/components/tree/themes/dark/container.bootstrap.css.js +1 -1
  361. package/components/tree/themes/dark/container.bootstrap.css.js.map +1 -1
  362. package/components/tree/themes/light/container.bootstrap.css.js +1 -1
  363. package/components/tree/themes/light/container.bootstrap.css.js.map +1 -1
  364. package/components/tree/tree-item.js +4 -0
  365. package/components/tree/tree-item.js.map +1 -1
  366. package/components/tree/tree.d.ts +14 -0
  367. package/components/tree/tree.js +23 -0
  368. package/components/tree/tree.js.map +1 -1
  369. package/components/validation-container/validation-container.d.ts +0 -1
  370. package/components/validation-container/validation-container.js +6 -9
  371. package/components/validation-container/validation-container.js.map +1 -1
  372. package/custom-elements.json +3176 -2986
  373. package/extras/chat-markdown-renderer.d.ts +72 -4
  374. package/extras/chat-markdown-renderer.js +19 -7
  375. package/extras/chat-markdown-renderer.js.map +1 -1
  376. package/igniteui-webcomponents.html-data.json +1 -1
  377. package/index.d.ts +5 -1
  378. package/index.js +4 -1
  379. package/index.js.map +1 -1
  380. package/package.json +9 -4
  381. package/themes/dark/bootstrap.css +1 -1
  382. package/themes/dark/fluent.css +1 -1
  383. package/themes/dark/indigo.css +1 -1
  384. package/themes/dark/material.css +1 -1
  385. package/themes/light/bootstrap.css +1 -1
  386. package/themes/light/fluent.css +1 -1
  387. package/themes/light/indigo.css +1 -1
  388. package/themes/light/material.css +1 -1
  389. package/theming/context.d.ts +36 -0
  390. package/theming/context.js +3 -0
  391. package/theming/context.js.map +1 -0
  392. package/theming/theming-controller.d.ts +7 -1
  393. package/theming/theming-controller.js +48 -12
  394. package/theming/theming-controller.js.map +1 -1
  395. package/theming/utils.d.ts +10 -0
  396. package/theming/utils.js +8 -42
  397. package/theming/utils.js.map +1 -1
  398. package/web-types.json +1 -1
  399. package/components/common/localization/intl-formatters.d.ts +0 -17
  400. package/components/common/localization/intl-formatters.js +0 -46
  401. package/components/common/localization/intl-formatters.js.map +0 -1
  402. package/components/validation-container/themes/dark/validator.bootstrap.css.d.ts +0 -1
  403. package/components/validation-container/themes/dark/validator.bootstrap.css.js +0 -3
  404. package/components/validation-container/themes/dark/validator.bootstrap.css.js.map +0 -1
  405. package/components/validation-container/themes/dark/validator.fluent.css.d.ts +0 -1
  406. package/components/validation-container/themes/dark/validator.fluent.css.js +0 -3
  407. package/components/validation-container/themes/dark/validator.fluent.css.js.map +0 -1
  408. package/components/validation-container/themes/dark/validator.indigo.css.d.ts +0 -1
  409. package/components/validation-container/themes/dark/validator.indigo.css.js +0 -3
  410. package/components/validation-container/themes/dark/validator.indigo.css.js.map +0 -1
  411. package/components/validation-container/themes/dark/validator.material.css.d.ts +0 -1
  412. package/components/validation-container/themes/dark/validator.material.css.js +0 -3
  413. package/components/validation-container/themes/dark/validator.material.css.js.map +0 -1
  414. package/components/validation-container/themes/light/validator.bootstrap.css.d.ts +0 -1
  415. package/components/validation-container/themes/light/validator.bootstrap.css.js +0 -3
  416. package/components/validation-container/themes/light/validator.bootstrap.css.js.map +0 -1
  417. package/components/validation-container/themes/light/validator.fluent.css.d.ts +0 -1
  418. package/components/validation-container/themes/light/validator.fluent.css.js +0 -3
  419. package/components/validation-container/themes/light/validator.fluent.css.js.map +0 -1
  420. package/components/validation-container/themes/light/validator.indigo.css.d.ts +0 -1
  421. package/components/validation-container/themes/light/validator.indigo.css.js +0 -3
  422. package/components/validation-container/themes/light/validator.indigo.css.js.map +0 -1
  423. package/components/validation-container/themes/light/validator.material.css.d.ts +0 -1
  424. package/components/validation-container/themes/light/validator.material.css.js +0 -3
  425. package/components/validation-container/themes/light/validator.material.css.js.map +0 -1
  426. package/components/validation-container/themes/light/validator.shared.css.d.ts +0 -1
  427. package/components/validation-container/themes/light/validator.shared.css.js +0 -3
  428. package/components/validation-container/themes/light/validator.shared.css.js.map +0 -1
  429. package/components/validation-container/themes/themes.d.ts +0 -2
  430. package/components/validation-container/themes/themes.js +0 -46
  431. package/components/validation-container/themes/themes.js.map +0 -1
@@ -4,15 +4,14 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
4
4
  else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
+ import { getDateFormatter } from 'igniteui-i18n-core';
7
8
  import { html, nothing } from 'lit';
8
9
  import { property, query, queryAll, state } from 'lit/decorators.js';
9
10
  import { choose } from 'lit/directives/choose.js';
10
11
  import { createRef, ref } from 'lit/directives/ref.js';
11
12
  import { addThemingController } from '../../theming/theming-controller.js';
12
13
  import { addKeybindings, arrowDown, arrowLeft, arrowRight, arrowUp, endKey, homeKey, pageDownKey, pageUpKey, shiftKey, } from '../common/controllers/key-bindings.js';
13
- import { watch } from '../common/decorators/watch.js';
14
14
  import { registerComponent } from '../common/definitions/register.js';
15
- import { createDateTimeFormatters } from '../common/localization/intl-formatters.js';
16
15
  import { EventEmitterMixin } from '../common/mixins/event-emitter.js';
17
16
  import { partMap } from '../common/part-map.js';
18
17
  import { clamp, findElementFromEventPath, first, formatString, last, } from '../common/util.js';
@@ -41,164 +40,229 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
41
40
  get _isYearView() {
42
41
  return this.activeView === 'years';
43
42
  }
44
- get previousButtonLabel() {
45
- if (this._isDayView) {
46
- return this.resourceStrings.previousMonth;
47
- }
48
- if (this._isMonthView) {
49
- return this.resourceStrings.previousYear;
50
- }
51
- return formatString(this.resourceStrings.previousYears, YEARS_PER_PAGE);
52
- }
53
- get nextButtonLabel() {
54
- if (this._isDayView) {
55
- return this.resourceStrings.nextMonth;
56
- }
57
- if (this._isMonthView) {
58
- return this.resourceStrings.nextYear;
59
- }
60
- return formatString(this.resourceStrings.nextYears, YEARS_PER_PAGE);
61
- }
62
- localeChange() {
63
- this._intl.locale = this.locale;
64
- }
65
- formatOptionsChange() {
66
- this._intl.update({
67
- month: {
68
- month: this.formatOptions.month,
69
- },
70
- });
71
- }
72
- async [focusActiveDate](options) {
73
- await this.updateComplete;
74
- if (this._isDayView) {
75
- return this.daysViews
76
- .item(this.activeDaysViewIndex)
77
- .focusActiveDate(options);
78
- }
79
- if (this._isMonthView) {
80
- return this.monthsView.focusActiveDate(options);
81
- }
82
- if (this._isYearView) {
83
- return this.yearsView.focusActiveDate(options);
43
+ get _previousButtonLabel() {
44
+ switch (this.activeView) {
45
+ case 'days':
46
+ return this.resourceStrings.previousMonth;
47
+ case 'months':
48
+ return this.resourceStrings.previousYear;
49
+ case 'years':
50
+ return formatString(this.resourceStrings.previousYears, YEARS_PER_PAGE);
51
+ default:
52
+ return '';
84
53
  }
85
54
  }
86
- updateViewIndex(date, delta) {
87
- if (this.visibleMonths === 1)
88
- return;
89
- const index = this.activeDaysViewIndex;
90
- const view = CalendarDay.from(this.daysViews.item(index).activeDate);
91
- if (date.month !== view.month) {
92
- this.activeDaysViewIndex = clamp(index + delta, 0, this.visibleMonths - 1);
55
+ get _nextButtonLabel() {
56
+ switch (this.activeView) {
57
+ case 'days':
58
+ return this.resourceStrings.nextMonth;
59
+ case 'months':
60
+ return this.resourceStrings.nextYear;
61
+ case 'years':
62
+ return formatString(this.resourceStrings.nextYears, YEARS_PER_PAGE);
63
+ default:
64
+ return '';
93
65
  }
94
66
  }
95
- getSubsequentActiveDate(start, delta) {
96
- const disabled = this._disabledDates;
97
- let beginning = start.clone();
98
- while (isDateInRanges(beginning, disabled)) {
99
- beginning = beginning.add('day', delta);
100
- }
101
- return beginning;
67
+ constructor() {
68
+ super();
69
+ this._contentRef = createRef();
70
+ this._activeDaysViewIndex = 0;
71
+ this.hideOutsideDays = false;
72
+ this.hideHeader = false;
73
+ this.headerOrientation = 'horizontal';
74
+ this.orientation = 'horizontal';
75
+ this.visibleMonths = 1;
76
+ this.activeView = 'days';
77
+ this.formatOptions = { month: 'long', weekday: 'narrow' };
78
+ addThemingController(this, all);
79
+ addKeybindings(this, {
80
+ skip: this._shouldSkipKeyboardEvent,
81
+ ref: this._contentRef,
82
+ bindingDefaults: { triggers: ['keydownRepeat'] },
83
+ })
84
+ .set(arrowLeft, this._handleArrowKey.bind(this, 'day', -1))
85
+ .set(arrowRight, this._handleArrowKey.bind(this, 'day', 1))
86
+ .set(arrowUp, this._handleArrowKey.bind(this, 'week', -1))
87
+ .set(arrowDown, this._handleArrowKey.bind(this, 'week', 1))
88
+ .set([shiftKey, pageUpKey], this._handleShiftPageKeys.bind(this, -1))
89
+ .set([shiftKey, pageDownKey], this._handleShiftPageKeys.bind(this, 1))
90
+ .set(pageUpKey, this._handlePageKeys.bind(this, -1))
91
+ .set(pageDownKey, this._handlePageKeys.bind(this, 1))
92
+ .set(homeKey, this._handleHomeKey)
93
+ .set(endKey, this._handleEndKey);
94
+ }
95
+ _shouldSkipKeyboardEvent(_, event) {
96
+ return !findElementFromEventPath(`${IgcDaysViewComponent.tagName}, ${IgcMonthsViewComponent.tagName}, ${IgcYearsViewComponent.tagName}`, event);
102
97
  }
103
- handleArrowKey(period, delta) {
98
+ _handleArrowKey(period, delta) {
104
99
  if (this._isDayView) {
105
- const date = this.getSubsequentActiveDate(this._activeDate.add(period, delta), delta);
106
- this.updateViewIndex(date, delta);
100
+ const date = this._getNextEnabledDate(this._activeDate.add(period, delta), delta);
101
+ this._updateViewIndex(date, delta);
107
102
  this._activeDate = date;
108
103
  }
109
104
  else {
110
105
  const monthOrYear = this._isMonthView ? 'month' : 'year';
111
106
  const monthOrYearDelta = (this._isMonthView ? MONTHS_PER_ROW : YEARS_PER_ROW) * delta;
112
- this._activeDate = this.getSubsequentActiveDate(this._activeDate.add(monthOrYear, period === 'week' ? monthOrYearDelta : delta), delta);
107
+ this._activeDate = this._getNextEnabledDate(this._activeDate.add(monthOrYear, period === 'week' ? monthOrYearDelta : delta), delta);
113
108
  }
114
109
  this[focusActiveDate]();
115
110
  }
116
- onPageKeys(delta) {
111
+ _handlePageKeys(delta) {
117
112
  const unit = this._isDayView ? 'month' : 'year';
118
113
  const increment = (this._isYearView ? YEARS_PER_PAGE : 1) * delta;
119
- this._activeDate = this.getSubsequentActiveDate(this._activeDate.add(unit, increment), increment);
114
+ this._activeDate = this._getNextEnabledDate(this._activeDate.add(unit, increment), increment);
120
115
  this[focusActiveDate]();
121
116
  }
122
- onShiftPageKeys(delta) {
117
+ _handleShiftPageKeys(delta) {
123
118
  if (this._isDayView) {
124
- this._activeDate = this.getSubsequentActiveDate(this._activeDate.add('year', delta), delta);
119
+ this._activeDate = this._getNextEnabledDate(this._activeDate.add('year', delta), delta);
125
120
  this[focusActiveDate]();
126
121
  }
127
122
  }
128
- onHomeKey() {
129
- if (this._isDayView) {
130
- const first = CalendarDay.from(this.daysViews.item(0).activeDate);
131
- this._activeDate = this.getSubsequentActiveDate(first.set({ date: 1 }), 1);
132
- this.activeDaysViewIndex = 0;
123
+ _handleHomeKey() {
124
+ switch (this.activeView) {
125
+ case 'days': {
126
+ const firstView = CalendarDay.from(this._daysViews.item(0).activeDate);
127
+ this._activeDate = this._getNextEnabledDate(firstView.set({ date: 1 }), 1);
128
+ this._activeDaysViewIndex = 0;
129
+ break;
130
+ }
131
+ case 'months':
132
+ this._activeDate = this._getNextEnabledDate(this._activeDate.set({ month: 0 }), 1);
133
+ break;
134
+ case 'years':
135
+ this._activeDate = this._getNextEnabledDate(this._activeDate.set({
136
+ year: getYearRange(this._activeDate, YEARS_PER_PAGE).start,
137
+ }), 1);
138
+ break;
139
+ }
140
+ this[focusActiveDate]();
141
+ }
142
+ _handleEndKey() {
143
+ switch (this.activeView) {
144
+ case 'days': {
145
+ const index = this._daysViews.length - 1;
146
+ const lastView = CalendarDay.from(this._daysViews.item(index).activeDate);
147
+ this._activeDate = this._getNextEnabledDate(lastView.set({ month: lastView.month + 1, date: 0 }), -1);
148
+ this._activeDaysViewIndex = index;
149
+ break;
150
+ }
151
+ case 'months':
152
+ this._activeDate = this._getNextEnabledDate(this._activeDate.set({ month: 11 }), -1);
153
+ break;
154
+ case 'years':
155
+ this._activeDate = this._getNextEnabledDate(this._activeDate.set({
156
+ year: getYearRange(this._activeDate, YEARS_PER_PAGE).end,
157
+ }), -1);
158
+ break;
159
+ }
160
+ this[focusActiveDate]();
161
+ }
162
+ _handleMonthChange(event) {
163
+ event.stopPropagation();
164
+ this.activeDate = event.detail;
165
+ this.activeView = 'days';
166
+ this[focusActiveDate]();
167
+ }
168
+ _handleYearChange(event) {
169
+ event.stopPropagation();
170
+ this.activeDate = event.detail;
171
+ this.activeView = 'months';
172
+ this[focusActiveDate]();
173
+ }
174
+ _handleValueChange(event) {
175
+ event.stopPropagation();
176
+ const view = event.target;
177
+ if (this._isSingle) {
178
+ this.value = view.value;
133
179
  }
134
- if (this._isMonthView) {
135
- this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({ month: 0 }), 1);
180
+ else {
181
+ this.values = view.values;
136
182
  }
137
- if (this._isYearView) {
138
- this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({
139
- year: getYearRange(this._activeDate, YEARS_PER_PAGE).start,
140
- }), 1);
183
+ this.emitEvent('igcChange', {
184
+ detail: this._isSingle ? this.value : this.values,
185
+ });
186
+ }
187
+ _handleActiveDateChange(event) {
188
+ const view = event.target;
189
+ const views = Array.from(this._daysViews);
190
+ this._activeDaysViewIndex = views.indexOf(view);
191
+ this.activeDate = event.detail;
192
+ if (!areSameMonth(this.activeDate, view.activeDate)) {
193
+ this[focusActiveDate]();
141
194
  }
195
+ }
196
+ _handleRangePreviewChange(event) {
197
+ this._rangePreviewDate = event.detail
198
+ ? CalendarDay.from(event.detail)
199
+ : undefined;
200
+ }
201
+ _setActiveDaysView(viewIndex) {
202
+ const view = this._daysViews.item(viewIndex);
203
+ this.activeDate = view.activeDate;
204
+ this._activeDaysViewIndex = viewIndex;
205
+ }
206
+ _navigate(delta) {
207
+ const unit = this._isDayView ? 'month' : 'year';
208
+ const increment = (this._isYearView ? YEARS_PER_PAGE : 1) * delta;
209
+ this._activeDate = this._activeDate.add(unit, increment);
210
+ }
211
+ _navigatePrevious() {
212
+ this._navigate(-1);
213
+ }
214
+ _navigateNext() {
215
+ this._navigate(1);
216
+ }
217
+ _navigateToMonthView(viewIndex) {
218
+ this._setActiveDaysView(viewIndex);
219
+ this.activeView = 'months';
142
220
  this[focusActiveDate]();
143
221
  }
144
- onEndKey() {
222
+ _navigateToYearView(viewIndex) {
145
223
  if (this._isDayView) {
146
- const index = this.daysViews.length - 1;
147
- const last = CalendarDay.from(this.daysViews.item(index).activeDate);
148
- this._activeDate = this.getSubsequentActiveDate(last.set({ month: last.month + 1, date: 0 }), -1);
149
- this.activeDaysViewIndex = index;
224
+ this._setActiveDaysView(viewIndex);
150
225
  }
151
- if (this._isMonthView) {
152
- this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({ month: 11 }), -1);
226
+ this.activeView = 'years';
227
+ this[focusActiveDate]();
228
+ }
229
+ async [focusActiveDate](options) {
230
+ await this.updateComplete;
231
+ switch (this.activeView) {
232
+ case 'days':
233
+ return this._daysViews
234
+ .item(this._activeDaysViewIndex)
235
+ .focusActiveDate(options);
236
+ case 'months':
237
+ return this._monthsView.focusActiveDate(options);
238
+ case 'years':
239
+ return this._yearsView.focusActiveDate(options);
153
240
  }
154
- if (this._isYearView) {
155
- this._activeDate = this.getSubsequentActiveDate(this._activeDate.set({
156
- year: getYearRange(this._activeDate, YEARS_PER_PAGE).end,
157
- }), -1);
241
+ }
242
+ _updateViewIndex(date, delta) {
243
+ if (this.visibleMonths === 1) {
244
+ return;
245
+ }
246
+ const index = this._activeDaysViewIndex;
247
+ const view = CalendarDay.from(this._daysViews.item(index).activeDate);
248
+ if (date.month !== view.month) {
249
+ this._activeDaysViewIndex = clamp(index + delta, 0, this.visibleMonths - 1);
158
250
  }
159
- this[focusActiveDate]();
160
251
  }
161
- isNotFromCalendarView(_, event) {
162
- return !findElementFromEventPath(`${IgcDaysViewComponent.tagName}, ${IgcMonthsViewComponent.tagName}, ${IgcYearsViewComponent.tagName}`, event);
252
+ _getActiveDates() {
253
+ const current = this._activeDaysViewIndex;
254
+ const length = Math.max(this.visibleMonths, 1);
255
+ return Array.from({ length }, (_, i) => this._activeDate.add('month', i - current));
163
256
  }
164
- constructor() {
165
- super();
166
- this.contentRef = createRef();
167
- this.activeDaysViewIndex = 0;
168
- this.hideOutsideDays = false;
169
- this.hideHeader = false;
170
- this.headerOrientation = 'horizontal';
171
- this.orientation = 'horizontal';
172
- this.visibleMonths = 1;
173
- this.activeView = 'days';
174
- this.formatOptions = { month: 'long', weekday: 'narrow' };
175
- this._intl = createDateTimeFormatters(this.locale, {
176
- month: {
177
- month: this.formatOptions.month,
178
- },
179
- monthLabel: { month: 'long' },
180
- weekday: { weekday: 'short' },
181
- monthDay: { month: 'short', day: 'numeric' },
182
- yearLabel: { month: 'long', year: 'numeric' },
183
- });
184
- addThemingController(this, all);
185
- addKeybindings(this, {
186
- skip: this.isNotFromCalendarView,
187
- ref: this.contentRef,
188
- bindingDefaults: { preventDefault: true, triggers: ['keydownRepeat'] },
189
- })
190
- .set(arrowLeft, this.handleArrowKey.bind(this, 'day', -1))
191
- .set(arrowRight, this.handleArrowKey.bind(this, 'day', 1))
192
- .set(arrowUp, this.handleArrowKey.bind(this, 'week', -1))
193
- .set(arrowDown, this.handleArrowKey.bind(this, 'week', 1))
194
- .set([shiftKey, pageUpKey], this.onShiftPageKeys.bind(this, -1))
195
- .set([shiftKey, pageDownKey], this.onShiftPageKeys.bind(this, 1))
196
- .set(pageUpKey, this.onPageKeys.bind(this, -1))
197
- .set(pageDownKey, this.onPageKeys.bind(this, 1))
198
- .set(homeKey, this.onHomeKey)
199
- .set(endKey, this.onEndKey);
200
- }
201
- renderNavigationButtons() {
257
+ _getNextEnabledDate(start, delta) {
258
+ const disabled = this._disabledDates;
259
+ let beginning = start.clone();
260
+ while (isDateInRanges(beginning, disabled)) {
261
+ beginning = beginning.add('day', delta);
262
+ }
263
+ return beginning;
264
+ }
265
+ _renderNavigationButtons() {
202
266
  const parts = {
203
267
  'navigation-button': true,
204
268
  vertical: this.orientation === 'vertical',
@@ -207,8 +271,8 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
207
271
  <div part="navigation-buttons">
208
272
  <button
209
273
  part=${partMap(parts)}
210
- aria-label=${this.previousButtonLabel}
211
- @click=${this.navigatePrevious}
274
+ aria-label=${this._previousButtonLabel}
275
+ @click=${this._navigatePrevious}
212
276
  >
213
277
  <igc-icon
214
278
  aria-hidden="true"
@@ -219,8 +283,8 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
219
283
 
220
284
  <button
221
285
  part=${partMap(parts)}
222
- aria-label=${this.nextButtonLabel}
223
- @click=${this.navigateNext}
286
+ aria-label=${this._nextButtonLabel}
287
+ @click=${this._navigateNext}
224
288
  >
225
289
  <igc-icon
226
290
  aria-hidden="true"
@@ -231,61 +295,69 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
231
295
  </div>
232
296
  `;
233
297
  }
234
- renderMonthButtonNavigation(active, viewIndex) {
235
- const labelFmt = this._intl.get('monthLabel').format;
236
- const valueFmt = this._intl.get('month').format;
237
- const ariaLabel = `${labelFmt(active.native)}, ${this.resourceStrings.selectMonth}`;
298
+ _renderMonthButtonNavigation(active, viewIndex) {
299
+ const formatter = getDateFormatter();
300
+ const label = formatter.formatDateTime(active.native, this.locale, {
301
+ month: 'long',
302
+ });
303
+ const value = formatter.formatDateTime(active.native, this.locale, {
304
+ month: this.formatOptions.month,
305
+ });
306
+ const ariaLabel = `${label}, ${this.resourceStrings.selectMonth}`;
238
307
  return html `
239
308
  <button
240
309
  part="months-navigation"
241
310
  aria-label=${ariaLabel}
242
- @click=${() => this.switchToMonths(viewIndex)}
311
+ @click=${() => this._navigateToMonthView(viewIndex)}
243
312
  >
244
- ${valueFmt(active.native)}
313
+ ${value}
245
314
  </button>
246
315
  `;
247
316
  }
248
- renderYearButtonNavigation(active, viewIndex) {
249
- const fmt = this._intl.get('yearLabel').format;
317
+ _renderYearButtonNavigation(active, viewIndex) {
318
+ const { format } = getDateFormatter().getIntlFormatter(this.locale, {
319
+ month: 'long',
320
+ year: 'numeric',
321
+ });
250
322
  const ariaLabel = `${active.year}, ${this.resourceStrings.selectYear}`;
251
- const ariaSkip = this._isDayView ? fmt(active.native) : active.year;
323
+ const ariaSkip = this._isDayView ? format(active.native) : active.year;
252
324
  return html `
253
325
  <span class="aria-off-screen" aria-live="polite">${ariaSkip}</span>
254
326
  <button
255
327
  part="years-navigation"
256
328
  aria-label=${ariaLabel}
257
- @click=${() => this.switchToYears(viewIndex)}
329
+ @click=${() => this._navigateToYearView(viewIndex)}
258
330
  >
259
331
  ${active.year}
260
332
  </button>
261
333
  `;
262
334
  }
263
- renderYearRangeNavigation(active) {
335
+ _renderYearRangeNavigation(active) {
264
336
  const { start, end } = getYearRange(active, YEARS_PER_PAGE);
265
337
  return html `
266
338
  <span part="years-range" aria-live="polite"> ${start} - ${end} </span>
267
339
  `;
268
340
  }
269
- renderNavigation(date, showButtons = true, viewIndex = 0) {
341
+ _renderNavigation(date, showButtons = true, viewIndex = 0) {
270
342
  const activeDate = date ?? this._activeDate;
271
343
  return html `
272
344
  <div part="navigation">
273
345
  <div part="picker-dates">
274
346
  ${this._isDayView
275
- ? this.renderMonthButtonNavigation(activeDate, viewIndex)
347
+ ? this._renderMonthButtonNavigation(activeDate, viewIndex)
276
348
  : nothing}
277
349
  ${this._isDayView || this._isMonthView
278
- ? this.renderYearButtonNavigation(activeDate, viewIndex)
350
+ ? this._renderYearButtonNavigation(activeDate, viewIndex)
279
351
  : nothing}
280
352
  ${this._isYearView
281
- ? this.renderYearRangeNavigation(activeDate)
353
+ ? this._renderYearRangeNavigation(activeDate)
282
354
  : nothing}
283
355
  </div>
284
- ${showButtons ? this.renderNavigationButtons() : nothing}
356
+ ${showButtons ? this._renderNavigationButtons() : nothing}
285
357
  </div>
286
358
  `;
287
359
  }
288
- renderHeader() {
360
+ _renderHeader() {
289
361
  if (this.hideHeader || this._isMultiple) {
290
362
  return nothing;
291
363
  }
@@ -297,24 +369,33 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
297
369
  <h5 part="header-title">
298
370
  <slot name="title">${title}</slot>
299
371
  </h5>
300
- <h2 part="header-date">${this.renderHeaderDate()}</h2>
372
+ <h2 part="header-date">${this._renderHeaderDate()}</h2>
301
373
  </div>
302
374
  `;
303
375
  }
304
- renderHeaderDateSingle() {
376
+ _renderHeaderDateSingle() {
305
377
  const date = this.value ?? CalendarDay.today.native;
306
- const day = this._intl.get('weekday').format(date);
307
- const month = this._intl.get('monthDay').format(date);
378
+ const formatter = getDateFormatter();
379
+ const weekday = formatter.formatDateTime(date, this.locale, {
380
+ weekday: 'short',
381
+ });
382
+ const monthDay = formatter.formatDateTime(date, this.locale, {
383
+ month: 'short',
384
+ day: 'numeric',
385
+ });
308
386
  const separator = this.headerOrientation === 'vertical' ? html `<br />` : ' ';
309
- const formatted = html `${day},${separator}${month}`;
387
+ const formatted = html `${weekday},${separator}${monthDay}`;
310
388
  return html `<slot name="header-date">${formatted}</slot>`;
311
389
  }
312
- renderHeaderDateRange() {
390
+ _renderHeaderDateRange() {
313
391
  const values = this.values;
314
- const fmt = this._intl.get('monthDay').format;
392
+ const { format } = getDateFormatter().getIntlFormatter(this.locale, {
393
+ month: 'short',
394
+ day: 'numeric',
395
+ });
315
396
  const { startDate, endDate } = this.resourceStrings;
316
- const start = this._hasValues ? fmt(first(values)) : startDate;
317
- const end = this._hasValues && values.length > 1 ? fmt(last(values)) : endDate;
397
+ const start = this._hasValues ? format(first(values)) : startDate;
398
+ const end = this._hasValues && values.length > 1 ? format(last(values)) : endDate;
318
399
  return html `
319
400
  <slot name="header-date">
320
401
  <span>${start}</span>
@@ -323,27 +404,27 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
323
404
  </slot>
324
405
  `;
325
406
  }
326
- renderHeaderDate() {
407
+ _renderHeaderDate() {
327
408
  return this._isSingle
328
- ? this.renderHeaderDateSingle()
329
- : this.renderHeaderDateRange();
409
+ ? this._renderHeaderDateSingle()
410
+ : this._renderHeaderDateRange();
330
411
  }
331
- renderDaysView() {
332
- const activeDates = this.getActiveDates();
412
+ _renderDaysView() {
413
+ const activeDates = this._getActiveDates();
333
414
  const horizontal = this.orientation === 'horizontal';
334
415
  const length = activeDates.length - 1;
335
416
  const format = this.formatOptions
336
417
  .weekday;
337
418
  return html `${activeDates.map((date, idx) => html `
338
419
  <div part="days-view-container">
339
- ${this.renderNavigation(date, horizontal ? idx === length : idx === 0, idx)}
420
+ ${this._renderNavigation(date, horizontal ? idx === length : idx === 0, idx)}
340
421
  <igc-days-view
341
- @igcChange=${this.changeValue}
342
- @igcActiveDateChange=${this.activeDateChanged}
343
- @igcRangePreviewDateChange=${this.rangePreviewDateChanged}
422
+ @igcChange=${this._handleValueChange}
423
+ @igcActiveDateChange=${this._handleActiveDateChange}
424
+ @igcRangePreviewDateChange=${this._handleRangePreviewChange}
344
425
  part="days-view"
345
426
  exportparts="days-row, label, date-inner, week-number-inner, week-number, date, first, last, selected, inactive, hidden, current, content-vertical, weekend, range, special, disabled, single, preview"
346
- .active=${this.activeDaysViewIndex === idx}
427
+ .active=${this._activeDaysViewIndex === idx}
347
428
  .activeDate=${date.native}
348
429
  .disabledDates=${this.disabledDates}
349
430
  .hideLeadingDays=${this.hideOutsideDays || idx !== 0}
@@ -362,28 +443,28 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
362
443
  </div>
363
444
  `)}`;
364
445
  }
365
- renderMonthView() {
446
+ _renderMonthView() {
366
447
  const format = this.formatOptions
367
448
  .month;
368
449
  return html `
369
- ${this.renderNavigation()}
450
+ ${this._renderNavigation()}
370
451
  <igc-months-view
371
452
  part="months-view"
372
453
  exportparts="month, selected, month-inner, current"
373
- @igcChange=${this.changeMonth}
454
+ @igcChange=${this._handleMonthChange}
374
455
  .value=${this.activeDate}
375
456
  .locale=${this.locale}
376
457
  .monthFormat=${format}
377
458
  ></igc-months-view>
378
459
  `;
379
460
  }
380
- renderYearView() {
461
+ _renderYearView() {
381
462
  return html `
382
- ${this.renderNavigation()}
463
+ ${this._renderNavigation()}
383
464
  <igc-years-view
384
465
  part="years-view"
385
466
  exportparts="year, selected, year-inner, current"
386
- @igcChange=${this.changeYear}
467
+ @igcChange=${this._handleYearChange}
387
468
  .value=${this.activeDate}
388
469
  .yearsPerPage=${YEARS_PER_PAGE}
389
470
  ></igc-years-view>
@@ -395,100 +476,29 @@ export default class IgcCalendarComponent extends EventEmitterMixin(IgcCalendarB
395
476
  'content-vertical': this._isDayView && this.orientation === 'vertical',
396
477
  };
397
478
  return html `
398
- ${this.renderHeader()}
399
- <div ${ref(this.contentRef)} part=${partMap(parts)}>
479
+ ${this._renderHeader()}
480
+ <div ${ref(this._contentRef)} part=${partMap(parts)}>
400
481
  ${choose(this.activeView, [
401
- ['days', () => this.renderDaysView()],
402
- ['months', () => this.renderMonthView()],
403
- ['years', () => this.renderYearView()],
482
+ ['days', () => this._renderDaysView()],
483
+ ['months', () => this._renderMonthView()],
484
+ ['years', () => this._renderYearView()],
404
485
  ])}
405
486
  </div>
406
487
  `;
407
488
  }
408
- changeMonth(event) {
409
- event.stopPropagation();
410
- this.activeDate = event.detail;
411
- this.activeView = 'days';
412
- this[focusActiveDate]();
413
- }
414
- changeYear(event) {
415
- event.stopPropagation();
416
- this.activeDate = event.detail;
417
- this.activeView = 'months';
418
- this[focusActiveDate]();
419
- }
420
- changeValue(event) {
421
- event.stopPropagation();
422
- const view = event.target;
423
- if (this._isSingle) {
424
- this.value = view.value;
425
- }
426
- else {
427
- this.values = view.values;
428
- }
429
- this.emitEvent('igcChange', {
430
- detail: this._isSingle ? this.value : this.values,
431
- });
432
- }
433
- activeDateChanged(event) {
434
- const view = event.target;
435
- const views = Array.from(this.daysViews);
436
- this.activeDaysViewIndex = views.indexOf(view);
437
- this.activeDate = event.detail;
438
- if (!areSameMonth(this.activeDate, view.activeDate)) {
439
- this[focusActiveDate]();
440
- }
441
- }
442
- rangePreviewDateChanged(event) {
443
- this._rangePreviewDate = event.detail
444
- ? CalendarDay.from(event.detail)
445
- : undefined;
446
- }
447
- getActiveDates() {
448
- const current = this.activeDaysViewIndex;
449
- const length = Math.max(this.visibleMonths, 1);
450
- return Array.from({ length }, (_, i) => this._activeDate.add('month', i - current));
451
- }
452
- activateDaysView(index) {
453
- const view = this.daysViews.item(index);
454
- this.activeDate = view.activeDate;
455
- this.activeDaysViewIndex = index;
456
- }
457
- navigatePrevious() {
458
- const unit = this._isDayView ? 'month' : 'year';
459
- const delta = this._isYearView ? YEARS_PER_PAGE : 1;
460
- this._activeDate = this._activeDate.add(unit, -delta);
461
- }
462
- navigateNext() {
463
- const unit = this._isDayView ? 'month' : 'year';
464
- const delta = this._isYearView ? YEARS_PER_PAGE : 1;
465
- this._activeDate = this._activeDate.add(unit, delta);
466
- }
467
- switchToMonths(viewIndex) {
468
- this.activateDaysView(viewIndex);
469
- this.activeView = 'months';
470
- this[focusActiveDate]();
471
- }
472
- switchToYears(viewIndex) {
473
- if (this._isDayView) {
474
- this.activateDaysView(viewIndex);
475
- }
476
- this.activeView = 'years';
477
- this[focusActiveDate]();
478
- }
479
489
  }
480
490
  __decorate([
481
491
  state()
482
- ], IgcCalendarComponent.prototype, "activeDaysViewIndex", void 0);
492
+ ], IgcCalendarComponent.prototype, "_activeDaysViewIndex", void 0);
483
493
  __decorate([
484
494
  queryAll(IgcDaysViewComponent.tagName)
485
- ], IgcCalendarComponent.prototype, "daysViews", void 0);
495
+ ], IgcCalendarComponent.prototype, "_daysViews", void 0);
486
496
  __decorate([
487
497
  query(IgcMonthsViewComponent.tagName)
488
- ], IgcCalendarComponent.prototype, "monthsView", void 0);
498
+ ], IgcCalendarComponent.prototype, "_monthsView", void 0);
489
499
  __decorate([
490
500
  query(IgcYearsViewComponent.tagName)
491
- ], IgcCalendarComponent.prototype, "yearsView", void 0);
501
+ ], IgcCalendarComponent.prototype, "_yearsView", void 0);
492
502
  __decorate([
493
503
  property({ type: Boolean, attribute: 'hide-outside-days', reflect: true })
494
504
  ], IgcCalendarComponent.prototype, "hideOutsideDays", void 0);
@@ -510,10 +520,4 @@ __decorate([
510
520
  __decorate([
511
521
  property({ attribute: false })
512
522
  ], IgcCalendarComponent.prototype, "formatOptions", void 0);
513
- __decorate([
514
- watch('locale')
515
- ], IgcCalendarComponent.prototype, "localeChange", null);
516
- __decorate([
517
- watch('formatOptions')
518
- ], IgcCalendarComponent.prototype, "formatOptionsChange", null);
519
523
  //# sourceMappingURL=calendar.js.map