igniteui-webcomponents 7.3.0-beta.0 → 7.3.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 (375) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/animations/player.d.ts +7 -2
  3. package/animations/player.js +1 -2
  4. package/animations/player.js.map +1 -1
  5. package/components/accordion/accordion.js +4 -16
  6. package/components/accordion/accordion.js.map +1 -1
  7. package/components/avatar/avatar.d.ts +0 -1
  8. package/components/avatar/avatar.js +5 -9
  9. package/components/avatar/avatar.js.map +1 -1
  10. package/components/badge/badge.d.ts +1 -3
  11. package/components/badge/badge.js +4 -8
  12. package/components/badge/badge.js.map +1 -1
  13. package/components/banner/banner.d.ts +6 -5
  14. package/components/banner/banner.js +19 -17
  15. package/components/banner/banner.js.map +1 -1
  16. package/components/button/button-base.d.ts +1 -1
  17. package/components/button/button-base.js.map +1 -1
  18. package/components/button-group/button-group.d.ts +0 -1
  19. package/components/button-group/button-group.js +12 -17
  20. package/components/button-group/button-group.js.map +1 -1
  21. package/components/calendar/base.d.ts +3 -13
  22. package/components/calendar/base.js +10 -31
  23. package/components/calendar/base.js.map +1 -1
  24. package/components/calendar/calendar.d.ts +2 -2
  25. package/components/calendar/months-view/months-view.d.ts +1 -1
  26. package/components/calendar/months-view/months-view.js.map +1 -1
  27. package/components/carousel/carousel-indicator.d.ts +1 -1
  28. package/components/carousel/carousel-indicator.js +13 -13
  29. package/components/carousel/carousel-indicator.js.map +1 -1
  30. package/components/carousel/carousel-slide.d.ts +0 -2
  31. package/components/carousel/carousel-slide.js +7 -9
  32. package/components/carousel/carousel-slide.js.map +1 -1
  33. package/components/carousel/carousel.d.ts +52 -35
  34. package/components/carousel/carousel.js +136 -122
  35. package/components/carousel/carousel.js.map +1 -1
  36. package/components/carousel/themes/carousel.base.css.js +1 -1
  37. package/components/carousel/themes/carousel.base.css.js.map +1 -1
  38. package/components/chat/chat-input.d.ts +1 -1
  39. package/components/chat/chat-input.js +21 -21
  40. package/components/chat/chat-input.js.map +1 -1
  41. package/components/chat/chat.d.ts +0 -2
  42. package/components/chat/chat.js +6 -12
  43. package/components/chat/chat.js.map +1 -1
  44. package/components/checkbox/checkbox-base.d.ts +1 -1
  45. package/components/checkbox/checkbox.d.ts +3 -5
  46. package/components/checkbox/checkbox.js +33 -44
  47. package/components/checkbox/checkbox.js.map +1 -1
  48. package/components/checkbox/switch.d.ts +1 -1
  49. package/components/checkbox/switch.js +23 -34
  50. package/components/checkbox/switch.js.map +1 -1
  51. package/components/chip/chip.d.ts +1 -14
  52. package/components/chip/chip.js +12 -33
  53. package/components/chip/chip.js.map +1 -1
  54. package/components/color-picker/color-picker.d.ts +261 -0
  55. package/components/color-picker/color-picker.js +620 -0
  56. package/components/color-picker/color-picker.js.map +1 -0
  57. package/components/color-picker/common.d.ts +37 -0
  58. package/components/color-picker/common.js +55 -0
  59. package/components/color-picker/common.js.map +1 -0
  60. package/components/color-picker/converters.d.ts +18 -0
  61. package/components/color-picker/converters.js +173 -0
  62. package/components/color-picker/converters.js.map +1 -0
  63. package/components/color-picker/model.d.ts +120 -0
  64. package/components/color-picker/model.js +174 -0
  65. package/components/color-picker/model.js.map +1 -0
  66. package/components/color-picker/picker-canvas.d.ts +95 -0
  67. package/components/color-picker/picker-canvas.js +154 -0
  68. package/components/color-picker/picker-canvas.js.map +1 -0
  69. package/components/color-picker/themes/color-picker.base.css.d.ts +1 -0
  70. package/components/color-picker/themes/color-picker.base.css.js +3 -0
  71. package/components/color-picker/themes/color-picker.base.css.js.map +1 -0
  72. package/components/color-picker/themes/dark/color-picker.bootstrap.css.d.ts +1 -0
  73. package/components/color-picker/themes/dark/color-picker.bootstrap.css.js +3 -0
  74. package/components/color-picker/themes/dark/color-picker.bootstrap.css.js.map +1 -0
  75. package/components/color-picker/themes/dark/color-picker.fluent.css.d.ts +1 -0
  76. package/components/color-picker/themes/dark/color-picker.fluent.css.js +3 -0
  77. package/components/color-picker/themes/dark/color-picker.fluent.css.js.map +1 -0
  78. package/components/color-picker/themes/dark/color-picker.indigo.css.d.ts +1 -0
  79. package/components/color-picker/themes/dark/color-picker.indigo.css.js +3 -0
  80. package/components/color-picker/themes/dark/color-picker.indigo.css.js.map +1 -0
  81. package/components/color-picker/themes/dark/color-picker.material.css.d.ts +1 -0
  82. package/components/color-picker/themes/dark/color-picker.material.css.js +3 -0
  83. package/components/color-picker/themes/dark/color-picker.material.css.js.map +1 -0
  84. package/components/color-picker/themes/light/color-picker.bootstrap.css.d.ts +1 -0
  85. package/components/color-picker/themes/light/color-picker.bootstrap.css.js +3 -0
  86. package/components/color-picker/themes/light/color-picker.bootstrap.css.js.map +1 -0
  87. package/components/color-picker/themes/light/color-picker.fluent.css.d.ts +1 -0
  88. package/components/color-picker/themes/light/color-picker.fluent.css.js +3 -0
  89. package/components/color-picker/themes/light/color-picker.fluent.css.js.map +1 -0
  90. package/components/color-picker/themes/light/color-picker.indigo.css.d.ts +1 -0
  91. package/components/color-picker/themes/light/color-picker.indigo.css.js +3 -0
  92. package/components/color-picker/themes/light/color-picker.indigo.css.js.map +1 -0
  93. package/components/color-picker/themes/light/color-picker.material.css.d.ts +1 -0
  94. package/components/color-picker/themes/light/color-picker.material.css.js +3 -0
  95. package/components/color-picker/themes/light/color-picker.material.css.js.map +1 -0
  96. package/components/color-picker/themes/light/color-picker.shared.css.d.ts +1 -0
  97. package/components/color-picker/themes/light/color-picker.shared.css.js +3 -0
  98. package/components/color-picker/themes/light/color-picker.shared.css.js.map +1 -0
  99. package/components/color-picker/themes/picker-canvas.base.css.d.ts +1 -0
  100. package/components/color-picker/themes/picker-canvas.base.css.js +3 -0
  101. package/components/color-picker/themes/picker-canvas.base.css.js.map +1 -0
  102. package/components/color-picker/themes/shared/color-picker.bootstrap.css.d.ts +1 -0
  103. package/components/color-picker/themes/shared/color-picker.bootstrap.css.js +3 -0
  104. package/components/color-picker/themes/shared/color-picker.bootstrap.css.js.map +1 -0
  105. package/components/color-picker/themes/shared/color-picker.common.css.d.ts +1 -0
  106. package/components/color-picker/themes/shared/color-picker.common.css.js +3 -0
  107. package/components/color-picker/themes/shared/color-picker.common.css.js.map +1 -0
  108. package/components/color-picker/themes/shared/color-picker.fluent.css.d.ts +1 -0
  109. package/components/color-picker/themes/shared/color-picker.fluent.css.js +3 -0
  110. package/components/color-picker/themes/shared/color-picker.fluent.css.js.map +1 -0
  111. package/components/color-picker/themes/shared/color-picker.indigo.css.d.ts +1 -0
  112. package/components/color-picker/themes/shared/color-picker.indigo.css.js +3 -0
  113. package/components/color-picker/themes/shared/color-picker.indigo.css.js.map +1 -0
  114. package/components/color-picker/themes/shared/color-picker.material.css.d.ts +1 -0
  115. package/components/color-picker/themes/shared/color-picker.material.css.js +3 -0
  116. package/components/color-picker/themes/shared/color-picker.material.css.js.map +1 -0
  117. package/components/color-picker/themes/themes.d.ts +2 -0
  118. package/components/color-picker/themes/themes.js +50 -0
  119. package/components/color-picker/themes/themes.js.map +1 -0
  120. package/components/color-picker/validators.d.ts +3 -0
  121. package/components/color-picker/validators.js +5 -0
  122. package/components/color-picker/validators.js.map +1 -0
  123. package/components/combo/combo-item.d.ts +1 -3
  124. package/components/combo/combo-item.js +5 -12
  125. package/components/combo/combo-item.js.map +1 -1
  126. package/components/combo/combo.d.ts +7 -20
  127. package/components/combo/combo.js +59 -81
  128. package/components/combo/combo.js.map +1 -1
  129. package/components/date-picker/date-picker.base.d.ts +12 -9
  130. package/components/date-picker/date-picker.base.js +24 -31
  131. package/components/date-picker/date-picker.base.js.map +1 -1
  132. package/components/date-picker/date-picker.d.ts +1 -1
  133. package/components/date-picker/date-picker.js +3 -5
  134. package/components/date-picker/date-picker.js.map +1 -1
  135. package/components/date-range-picker/date-range-input.d.ts +2 -4
  136. package/components/date-range-picker/date-range-input.js +6 -37
  137. package/components/date-range-picker/date-range-input.js.map +1 -1
  138. package/components/date-range-picker/date-range-picker.d.ts +2 -5
  139. package/components/date-range-picker/date-range-picker.js +15 -28
  140. package/components/date-range-picker/date-range-picker.js.map +1 -1
  141. package/components/date-range-picker/predefined-ranges-area.d.ts +2 -2
  142. package/components/date-range-picker/predefined-ranges-area.js +4 -6
  143. package/components/date-range-picker/predefined-ranges-area.js.map +1 -1
  144. package/components/date-range-picker/validators.d.ts +1 -1
  145. package/components/date-range-picker/validators.js +5 -18
  146. package/components/date-range-picker/validators.js.map +1 -1
  147. package/components/date-time-input/date-part.d.ts +2 -1
  148. package/components/date-time-input/date-part.js +38 -75
  149. package/components/date-time-input/date-part.js.map +1 -1
  150. package/components/date-time-input/date-time-input.base.d.ts +31 -12
  151. package/components/date-time-input/date-time-input.base.js +43 -11
  152. package/components/date-time-input/date-time-input.base.js.map +1 -1
  153. package/components/date-time-input/date-time-input.d.ts +1 -3
  154. package/components/date-time-input/date-time-input.js +7 -40
  155. package/components/date-time-input/date-time-input.js.map +1 -1
  156. package/components/date-time-input/datetime-mask-parser.d.ts +8 -0
  157. package/components/date-time-input/datetime-mask-parser.js +8 -8
  158. package/components/date-time-input/datetime-mask-parser.js.map +1 -1
  159. package/components/date-time-input/validators.js +3 -14
  160. package/components/date-time-input/validators.js.map +1 -1
  161. package/components/dialog/dialog.d.ts +6 -7
  162. package/components/dialog/dialog.js +21 -26
  163. package/components/dialog/dialog.js.map +1 -1
  164. package/components/divider/divider.d.ts +1 -4
  165. package/components/divider/divider.js +8 -17
  166. package/components/divider/divider.js.map +1 -1
  167. package/components/dropdown/dropdown-group.js +1 -6
  168. package/components/dropdown/dropdown-group.js.map +1 -1
  169. package/components/expansion-panel/expansion-panel.d.ts +15 -5
  170. package/components/expansion-panel/expansion-panel.js +23 -34
  171. package/components/expansion-panel/expansion-panel.js.map +1 -1
  172. package/components/file-input/file-input.d.ts +2 -14
  173. package/components/file-input/file-input.js +5 -23
  174. package/components/file-input/file-input.js.map +1 -1
  175. package/components/highlight/highlight.d.ts +6 -8
  176. package/components/highlight/highlight.js +12 -20
  177. package/components/highlight/highlight.js.map +1 -1
  178. package/components/icon/icon-references.js +1 -0
  179. package/components/icon/icon-references.js.map +1 -1
  180. package/components/icon/icon.d.ts +1 -1
  181. package/components/icon/internal-icons-lib.js +3 -0
  182. package/components/icon/internal-icons-lib.js.map +1 -1
  183. package/components/icon/registry/types.d.ts +1 -1
  184. package/components/icon/registry/types.js.map +1 -1
  185. package/components/input/input.d.ts +9 -19
  186. package/components/input/input.js +30 -60
  187. package/components/input/input.js.map +1 -1
  188. package/components/input/themes/shared/input.material.css.js +1 -1
  189. package/components/input/themes/shared/input.material.css.js.map +1 -1
  190. package/components/mask-input/mask-input.d.ts +1 -1
  191. package/components/mask-input/mask-input.js +2 -4
  192. package/components/mask-input/mask-input.js.map +1 -1
  193. package/components/nav-drawer/nav-drawer.d.ts +7 -7
  194. package/components/nav-drawer/nav-drawer.js +12 -23
  195. package/components/nav-drawer/nav-drawer.js.map +1 -1
  196. package/components/progress/base.d.ts +4 -7
  197. package/components/progress/base.js +21 -45
  198. package/components/progress/base.js.map +1 -1
  199. package/components/qr-code/qr-code.d.ts +1 -1
  200. package/components/qr-code/qr-code.js +3 -2
  201. package/components/qr-code/qr-code.js.map +1 -1
  202. package/components/qr-code/types.d.ts +1 -1
  203. package/components/qr-code/types.js.map +1 -1
  204. package/components/radio/controller.d.ts +2 -30
  205. package/components/radio/controller.js +8 -94
  206. package/components/radio/controller.js.map +1 -1
  207. package/components/radio/radio.d.ts +5 -5
  208. package/components/radio/radio.js +48 -58
  209. package/components/radio/radio.js.map +1 -1
  210. package/components/radio-group/radio-group.d.ts +1 -2
  211. package/components/radio-group/radio-group.js +2 -9
  212. package/components/radio-group/radio-group.js.map +1 -1
  213. package/components/rating/rating.d.ts +24 -12
  214. package/components/rating/rating.js +79 -73
  215. package/components/rating/rating.js.map +1 -1
  216. package/components/resize-container/default-ghost.js +4 -3
  217. package/components/resize-container/default-ghost.js.map +1 -1
  218. package/components/resize-container/resize-container.d.ts +1 -1
  219. package/components/resize-container/resize-container.js +5 -3
  220. package/components/resize-container/resize-container.js.map +1 -1
  221. package/components/resize-container/resize-controller.js +4 -3
  222. package/components/resize-container/resize-controller.js.map +1 -1
  223. package/components/select/select-group.d.ts +2 -1
  224. package/components/select/select-group.js +7 -11
  225. package/components/select/select-group.js.map +1 -1
  226. package/components/select/select.d.ts +3 -4
  227. package/components/select/select.js +23 -28
  228. package/components/select/select.js.map +1 -1
  229. package/components/slider/range-slider.d.ts +3 -2
  230. package/components/slider/range-slider.js +22 -70
  231. package/components/slider/range-slider.js.map +1 -1
  232. package/components/slider/slider-base.d.ts +9 -6
  233. package/components/slider/slider-base.js +27 -28
  234. package/components/slider/slider-base.js.map +1 -1
  235. package/components/slider/slider.js +9 -5
  236. package/components/slider/slider.js.map +1 -1
  237. package/components/splitter/splitter.d.ts +1 -1
  238. package/components/splitter/splitter.js.map +1 -1
  239. package/components/stepper/step.d.ts +3 -0
  240. package/components/stepper/step.js +9 -5
  241. package/components/stepper/step.js.map +1 -1
  242. package/components/stepper/stepper.d.ts +0 -11
  243. package/components/stepper/stepper.js +21 -86
  244. package/components/stepper/stepper.js.map +1 -1
  245. package/components/tabs/tab.d.ts +1 -1
  246. package/components/tabs/tab.js +6 -5
  247. package/components/tabs/tab.js.map +1 -1
  248. package/components/tabs/tabs.d.ts +1 -5
  249. package/components/tabs/tabs.js +12 -34
  250. package/components/tabs/tabs.js.map +1 -1
  251. package/components/textarea/textarea.d.ts +6 -7
  252. package/components/textarea/textarea.js +3 -10
  253. package/components/textarea/textarea.js.map +1 -1
  254. package/components/theme-provider/theme-provider.d.ts +2 -4
  255. package/components/theme-provider/theme-provider.js +11 -21
  256. package/components/theme-provider/theme-provider.js.map +1 -1
  257. package/components/tile-manager/tile-manager.d.ts +10 -21
  258. package/components/tile-manager/tile-manager.js +43 -74
  259. package/components/tile-manager/tile-manager.js.map +1 -1
  260. package/components/tile-manager/tile.d.ts +10 -18
  261. package/components/tile-manager/tile.js +50 -67
  262. package/components/tile-manager/tile.js.map +1 -1
  263. package/components/tooltip/tooltip.d.ts +4 -7
  264. package/components/tooltip/tooltip.js +20 -28
  265. package/components/tooltip/tooltip.js.map +1 -1
  266. package/components/tree/tree.d.ts +1 -14
  267. package/components/tree/tree.js +5 -23
  268. package/components/tree/tree.js.map +1 -1
  269. package/components/tree/tree.navigation.d.ts +1 -1
  270. package/components/tree/tree.navigation.js.map +1 -1
  271. package/components/types.d.ts +2 -0
  272. package/components/types.js.map +1 -1
  273. package/components/validation-container/validation-container.d.ts +1 -2
  274. package/components/validation-container/validation-container.js.map +1 -1
  275. package/components/virtualization/engine.d.ts +40 -38
  276. package/components/virtualization/engine.js.map +1 -1
  277. package/components/virtualization/types.d.ts +6 -5
  278. package/components/virtualization/types.js.map +1 -1
  279. package/components/virtualization/virtualization.d.ts +94 -80
  280. package/components/virtualization/virtualization.js +10 -2
  281. package/components/virtualization/virtualization.js.map +1 -1
  282. package/custom-elements.json +31948 -26708
  283. package/igniteui-webcomponents.css-data.json +1 -1
  284. package/igniteui-webcomponents.html-data.json +1 -1
  285. package/index.d.ts +1 -0
  286. package/index.js +1 -0
  287. package/index.js.map +1 -1
  288. package/internals/controllers/aria-projection.d.ts +6 -6
  289. package/internals/controllers/aria-projection.js.map +1 -1
  290. package/internals/controllers/context-provider.d.ts +48 -0
  291. package/internals/controllers/context-provider.js +29 -0
  292. package/internals/controllers/context-provider.js.map +1 -0
  293. package/internals/controllers/drag.js +6 -6
  294. package/internals/controllers/drag.js.map +1 -1
  295. package/internals/controllers/gestures.js +3 -0
  296. package/internals/controllers/gestures.js.map +1 -1
  297. package/internals/controllers/group.d.ts +64 -0
  298. package/internals/controllers/group.js +104 -0
  299. package/internals/controllers/group.js.map +1 -0
  300. package/internals/controllers/internals.d.ts +16 -3
  301. package/internals/controllers/internals.js +10 -3
  302. package/internals/controllers/internals.js.map +1 -1
  303. package/internals/controllers/key-bindings.d.ts +6 -0
  304. package/internals/controllers/key-bindings.js +3 -0
  305. package/internals/controllers/key-bindings.js.map +1 -1
  306. package/internals/controllers/roving-focus.d.ts +72 -0
  307. package/internals/controllers/roving-focus.js +61 -0
  308. package/internals/controllers/roving-focus.js.map +1 -0
  309. package/internals/controllers/slot.d.ts +8 -0
  310. package/internals/controllers/slot.js +4 -0
  311. package/internals/controllers/slot.js.map +1 -1
  312. package/internals/controllers/toggle.d.ts +96 -0
  313. package/internals/controllers/toggle.js +65 -0
  314. package/internals/controllers/toggle.js.map +1 -0
  315. package/internals/date/converters.js +2 -5
  316. package/internals/date/converters.js.map +1 -1
  317. package/internals/date/model.d.ts +4 -0
  318. package/internals/date/model.js +6 -0
  319. package/internals/date/model.js.map +1 -1
  320. package/internals/decorators/coerced-property.d.ts +47 -0
  321. package/internals/decorators/coerced-property.js +36 -0
  322. package/internals/decorators/coerced-property.js.map +1 -0
  323. package/internals/definitions/defineAllComponents.js +2 -0
  324. package/internals/definitions/defineAllComponents.js.map +1 -1
  325. package/internals/i18n/i18n-controller.d.ts +22 -3
  326. package/internals/i18n/i18n-controller.js +28 -6
  327. package/internals/i18n/i18n-controller.js.map +1 -1
  328. package/internals/mixins/alert.d.ts +1 -1
  329. package/internals/mixins/alert.js +5 -3
  330. package/internals/mixins/alert.js.map +1 -1
  331. package/internals/mixins/combo-box.d.ts +3 -12
  332. package/internals/mixins/combo-box.js +6 -32
  333. package/internals/mixins/combo-box.js.map +1 -1
  334. package/internals/mixins/forms/associated.js +18 -0
  335. package/internals/mixins/forms/associated.js.map +1 -1
  336. package/internals/mixins/forms/types.d.ts +20 -1
  337. package/internals/mixins/forms/types.js.map +1 -1
  338. package/internals/mixins/i18n.d.ts +31 -0
  339. package/internals/mixins/i18n.js +36 -0
  340. package/internals/mixins/i18n.js.map +1 -0
  341. package/internals/mixins/mask-behavior.d.ts +6 -5
  342. package/internals/mixins/mask-behavior.js +1 -2
  343. package/internals/mixins/mask-behavior.js.map +1 -1
  344. package/internals/mixins/option.js +4 -2
  345. package/internals/mixins/option.js.map +1 -1
  346. package/internals/templates/masked-input.d.ts +1 -1
  347. package/internals/templates/masked-input.js.map +1 -1
  348. package/internals/templates/slotted-icon.d.ts +32 -0
  349. package/internals/templates/slotted-icon.js +19 -0
  350. package/internals/templates/slotted-icon.js.map +1 -0
  351. package/internals/templates/toggle-shell.d.ts +46 -0
  352. package/internals/templates/toggle-shell.js +38 -0
  353. package/internals/templates/toggle-shell.js.map +1 -0
  354. package/internals/timing.d.ts +32 -0
  355. package/internals/timing.js +20 -0
  356. package/internals/timing.js.map +1 -0
  357. package/internals/utils/arrays.d.ts +2 -2
  358. package/internals/utils/arrays.js.map +1 -1
  359. package/internals/utils/dom.d.ts +22 -0
  360. package/internals/utils/dom.js +15 -1
  361. package/internals/utils/dom.js.map +1 -1
  362. package/internals/utils/math.d.ts +1 -1
  363. package/internals/utils/math.js.map +1 -1
  364. package/internals/utils/types.d.ts +1 -1
  365. package/internals/utils/types.js.map +1 -1
  366. package/internals/validators.d.ts +23 -0
  367. package/internals/validators.js +21 -0
  368. package/internals/validators.js.map +1 -1
  369. package/package.json +3 -1
  370. package/theming/theming-controller.d.ts +3 -3
  371. package/theming/theming-controller.js.map +1 -1
  372. package/web-types.json +2 -2
  373. package/internals/decorators/watch.d.ts +0 -5
  374. package/internals/decorators/watch.js +0 -19
  375. package/internals/decorators/watch.js.map +0 -1
@@ -25,7 +25,7 @@ export interface IgcPickerBaseEventMap<T> {
25
25
  /** The parts of the calendar which the pickers re-export to their own consumers. */
26
26
  export declare const calendarExportParts: "header, header-title, header-date, content: calendar-content, navigation, months-navigation,\n years-navigation, years-range, navigation-buttons, navigation-button, days-view-container,\n days-view, months-view, years-view, days-row, months-row, years-row, label: calendar-label,\n label-inner: calendar-label-inner, week-number, week-number-inner, date,\n date-inner, first, last, inactive, hidden, weekend, range, special, disabled, single, preview,\n month, month-inner, year, year-inner, selected, current";
27
27
  /** The components rendered by the picker chrome of every picker. */
28
- export declare const pickerDependencies: (typeof IgcIconComponent | typeof IgcPopoverComponent | typeof IgcValidationContainerComponent | typeof IgcCalendarComponent | typeof IgcDialogComponent | typeof IgcFocusTrapComponent)[];
28
+ export declare const pickerDependencies: (typeof IgcIconComponent | typeof IgcValidationContainerComponent | typeof IgcPopoverComponent | typeof IgcCalendarComponent | typeof IgcFocusTrapComponent | typeof IgcDialogComponent)[];
29
29
  /**
30
30
  * The subset of the slot controller which the base picker queries.
31
31
  * Kept structural so that each picker can declare its own set of slot names.
@@ -47,7 +47,6 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
47
47
  protected _activeDate: Date | null;
48
48
  protected _min: Date | null;
49
49
  protected _max: Date | null;
50
- protected _disabledDates: DateRangeDescriptor[];
51
50
  protected _dateConstraints: DateRangeDescriptor[];
52
51
  protected _displayFormat?: string;
53
52
  protected _inputFormat?: string;
@@ -89,7 +88,7 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
89
88
  /** The localized label of the calendar picker. */
90
89
  protected abstract get _selectDateLabel(): string | undefined;
91
90
  /**
92
- * The editor the host's ARIA state is projected onto its associated
91
+ * The editor the host's ARIA state is projected onto - its associated
93
92
  * labels and the `aria-haspopup="dialog"` semantics of the picker, both of
94
93
  * which must land on the native input assistive technology reports.
95
94
  */
@@ -183,7 +182,8 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
183
182
  set inputFormat(value: string);
184
183
  get inputFormat(): string;
185
184
  /**
186
- * Gets/Sets the locale used for formatting the display value.
185
+ * The locale used to format the display value and to resolve the
186
+ * component's resource strings. Falls back to the global locale when not set.
187
187
  * @attr locale
188
188
  */
189
189
  set locale(value: string);
@@ -201,8 +201,7 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
201
201
  set max(value: Date | string | null | undefined);
202
202
  get max(): Date | null;
203
203
  /** Gets/sets disabled dates. */
204
- set disabledDates(dates: DateRangeDescriptor[]);
205
- get disabledDates(): DateRangeDescriptor[];
204
+ disabledDates: DateRangeDescriptor[];
206
205
  /** Gets/sets special dates. */
207
206
  specialDates: DateRangeDescriptor[];
208
207
  /**
@@ -254,6 +253,11 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
254
253
  protected willUpdate(changedProperties: PropertyValues<this>): void;
255
254
  protected _setDateConstraints(): void;
256
255
  protected _shouldCloseCalendarDropdown(): Promise<void>;
256
+ /**
257
+ * Points the calendar at the first defined of `dates`, keeping its current
258
+ * active date when none is. A no-op until the calendar is rendered.
259
+ */
260
+ protected _setCalendarActiveDate(...dates: (Date | null | undefined)[]): void;
257
261
  /**
258
262
  * Pushes the value of the picker back onto the calendar, which a read-only picker has
259
263
  * to do directly - the binding is left with nothing to re-commit.
@@ -272,7 +276,7 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
272
276
  protected _handleCalendarChangeEvent(event: CustomEvent<Date | Date[]>): Promise<void>;
273
277
  protected _handleDialogClosing(event: Event): void;
274
278
  protected _handleDialogClosed(event: Event): void;
275
- protected _renderClearIcon(part?: string): TemplateResult<1> | typeof nothing;
279
+ protected _renderClearIcon(part?: string): typeof nothing | TemplateResult<1>;
276
280
  protected _renderCalendarIcon(suffix?: string): TemplateResult<1>;
277
281
  /**
278
282
  * The content projected into an editor of the picker - its icons and prefix/suffix slots.
@@ -281,7 +285,7 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
281
285
  * e.g. `-start` and `-end`.
282
286
  */
283
287
  protected _renderEditorSlots(suffix?: string): TemplateResult<1>;
284
- protected _renderCalendarSlots(): TemplateResult<1> | typeof nothing;
288
+ protected _renderCalendarSlots(): typeof nothing | TemplateResult<1>;
285
289
  protected _renderCalendar(id: string): TemplateResult<1>;
286
290
  protected _renderActions(): TemplateResult<1>;
287
291
  /** The content rendered inside the popover/dialog of the picker. */
@@ -289,6 +293,5 @@ export declare abstract class IgcDatePickerBaseComponent<T extends Date | DateRa
289
293
  /** Additional content rendered in the dialog of the picker. */
290
294
  protected _renderDialogFooter(): TemplateResult | typeof nothing;
291
295
  protected _renderPicker(id: string): TemplateResult<1>;
292
- protected _renderHelperText(): TemplateResult;
293
296
  }
294
297
  export {};
@@ -11,9 +11,11 @@ import { addAriaProjector } from '#internals/controllers/aria-projection.js';
11
11
  import { addKeybindings, altKey, arrowDown, arrowUp, escapeKey, } from '#internals/controllers/key-bindings.js';
12
12
  import { addRootClickController } from '#internals/controllers/root-click.js';
13
13
  import { convertToDate } from '#internals/date/converters.js';
14
+ import { coercedProperty } from '#internals/decorators/coerced-property.js';
14
15
  import { IgcComboBoxBaseLikeComponent } from '#internals/mixins/combo-box.js';
15
16
  import { EventEmitterMixin } from '#internals/mixins/event-emitter.js';
16
17
  import { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';
18
+ import { renderSlottedIcon } from '#internals/templates/slotted-icon.js';
17
19
  import { asArray } from '#internals/utils/arrays.js';
18
20
  import { addSafeEventListener, focusLeftHost, getElementFromPath, } from '#internals/utils/events.js';
19
21
  import { bindIf } from '#internals/utils/lit.js';
@@ -115,14 +117,6 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
115
117
  get max() {
116
118
  return this._max;
117
119
  }
118
- set disabledDates(dates) {
119
- this._disabledDates = dates;
120
- this._setDateConstraints();
121
- this._validate();
122
- }
123
- get disabledDates() {
124
- return this._disabledDates;
125
- }
126
120
  set activeDate(value) {
127
121
  this._activeDate = convertToDate(value);
128
122
  }
@@ -141,7 +135,6 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
141
135
  this._activeDate = null;
142
136
  this._min = null;
143
137
  this._max = null;
144
- this._disabledDates = [];
145
138
  this._dateConstraints = [];
146
139
  this._visibleMonths = 1;
147
140
  this._rootClickController = addRootClickController(this, { onHide: this._handleClosing });
@@ -150,6 +143,7 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
150
143
  this.nonEditable = false;
151
144
  this.outlined = false;
152
145
  this.prompt = '_';
146
+ this.disabledDates = [];
153
147
  this.headerOrientation = 'horizontal';
154
148
  this.orientation = 'horizontal';
155
149
  this.hideHeader = false;
@@ -183,7 +177,7 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
183
177
  }
184
178
  _setDateConstraints() {
185
179
  this._dateConstraints =
186
- createDateConstraints(this._min, this._max, this._disabledDates) ?? [];
180
+ createDateConstraints(this._min, this._max, this.disabledDates) ?? [];
187
181
  }
188
182
  async _shouldCloseCalendarDropdown() {
189
183
  if (this.keepOpenOnSelect || !this._canCloseOnSelect()) {
@@ -193,6 +187,12 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
193
187
  this._focusAndSelectInput();
194
188
  }
195
189
  }
190
+ _setCalendarActiveDate(...dates) {
191
+ if (this._calendar) {
192
+ this._calendar.activeDate =
193
+ dates.find(Boolean) ?? this._calendar.activeDate;
194
+ }
195
+ }
196
196
  async _restoreCalendarSelection() {
197
197
  await this._calendar.updateComplete;
198
198
  if (this._calendarSelection === 'single') {
@@ -271,26 +271,12 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
271
271
  part=${part}
272
272
  @click=${bindIf(!this.readOnly, this.clear)}
273
273
  >
274
- <slot name=${part}>
275
- <igc-icon
276
- name="input_clear"
277
- collection="default"
278
- aria-hidden="true"
279
- ></igc-icon>
280
- </slot>
274
+ ${renderSlottedIcon({ slot: part, icon: 'input_clear' })}
281
275
  </span>
282
276
  `
283
277
  : nothing;
284
278
  }
285
279
  _renderCalendarIcon(suffix = '') {
286
- const defaultIcon = html `
287
- <igc-icon
288
- name="today"
289
- collection="default"
290
- aria-hidden="true"
291
- title=${ifDefined(this._calendarIconTitle)}
292
- ></igc-icon>
293
- `;
294
280
  const part = `${this.open ? 'calendar-icon-open' : 'calendar-icon'}${suffix}`;
295
281
  return html `
296
282
  <span
@@ -299,7 +285,11 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
299
285
  @pointerdown=${this._handleCalendarIconSlotPointerDown}
300
286
  @click=${bindIf(!this.readOnly, this._handleAnchorClick)}
301
287
  >
302
- <slot name=${part}>${defaultIcon}</slot>
288
+ ${renderSlottedIcon({
289
+ slot: part,
290
+ icon: 'today',
291
+ title: this._calendarIconTitle,
292
+ })}
303
293
  </span>
304
294
  `;
305
295
  }
@@ -404,9 +394,6 @@ export class IgcDatePickerBaseComponent extends FormAssociatedRequiredMixin(Even
404
394
  </igc-dialog>
405
395
  `;
406
396
  }
407
- _renderHelperText() {
408
- return IgcValidationContainerComponent.create(this);
409
- }
410
397
  }
411
398
  __decorate([
412
399
  query(IgcCalendarComponent.tagName)
@@ -448,8 +435,14 @@ __decorate([
448
435
  property({ converter: convertToDate })
449
436
  ], IgcDatePickerBaseComponent.prototype, "max", null);
450
437
  __decorate([
451
- property({ attribute: false })
452
- ], IgcDatePickerBaseComponent.prototype, "disabledDates", null);
438
+ property({ attribute: false }),
439
+ coercedProperty({
440
+ onChange: ({ host }) => {
441
+ host._setDateConstraints();
442
+ host._validate();
443
+ },
444
+ })
445
+ ], IgcDatePickerBaseComponent.prototype, "disabledDates", void 0);
453
446
  __decorate([
454
447
  property({ attribute: false })
455
448
  ], IgcDatePickerBaseComponent.prototype, "specialDates", void 0);
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.base.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAA4C,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EACL,cAAc,EACd,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,4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AGV;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;qDAKtC;AAWD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;qDAKtC;AAQD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;+DAK9B;AAQM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gEACa;AAO5C;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;4DAGhE;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+DAGvD;AAYM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qEACM;AAQ5D;IADN,QAAQ,EAAE;+DAC2C;AAQ/C;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;8DAC3C;AAQnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAQxB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAIxB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6DACA","sourcesContent":["import { html, nothing, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addAriaProjector } from '#internals/controllers/aria-projection.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowUp,\n escapeKey,\n} from '#internals/controllers/key-bindings.js';\nimport { addRootClickController } from '#internals/controllers/root-click.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { IgcComboBoxBaseLikeComponent } from '#internals/mixins/combo-box.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport { asArray } from '#internals/utils/arrays.js';\nimport {\n addSafeEventListener,\n focusLeftHost,\n getElementFromPath,\n} from '#internals/utils/events.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { equal } from '#internals/utils/objects.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\nimport IgcCalendarComponent, { focusActiveDate } from '../calendar/calendar.js';\nimport { createDateConstraints } from '../calendar/helpers.js';\nimport type {\n CalendarHeaderOrientation,\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from '../calendar/types.js';\nimport IgcDialogComponent from '../dialog/dialog.js';\nimport IgcFocusTrapComponent from '../focus-trap/focus-trap.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport type {\n ContentOrientation,\n DateRangeValue,\n PickerMode,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\n\n/**\n * The events emitted by a picker driven by a calendar.\n * `T` is the value type of the picker - a single date or a date range.\n */\nexport interface IgcPickerBaseEventMap<T> {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n igcChange: CustomEvent<T | null>;\n igcInput: CustomEvent<T | null>;\n}\n\n/** The parts of the calendar which the pickers re-export to their own consumers. */\nexport const calendarExportParts =\n `header, header-title, header-date, content: calendar-content, navigation, months-navigation,\n years-navigation, years-range, navigation-buttons, navigation-button, days-view-container,\n days-view, months-view, years-view, days-row, months-row, years-row, label: calendar-label,\n label-inner: calendar-label-inner, week-number, week-number-inner, date,\n date-inner, first, last, inactive, hidden, weekend, range, special, disabled, single, preview,\n month, month-inner, year, year-inner, selected, current` as const;\n\n/** Stable identity for \"no range\", so that the calendar binding is committed only once. */\nconst emptyValues: Date[] = [];\n\n/** The components rendered by the picker chrome of every picker. */\nexport const pickerDependencies = [\n IgcCalendarComponent,\n IgcDialogComponent,\n IgcFocusTrapComponent,\n IgcIconComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent,\n];\n\n/**\n * The subset of the slot controller which the base picker queries.\n * Kept structural so that each picker can declare its own set of slot names.\n */\ntype PickerSlots = {\n hasAssignedElements(slot: string): boolean;\n};\n\n/* blazorIndirectRender */\n/* omitModule */\n/**\n * Common behavior for the pickers which drive an `igc-calendar` from an editor -\n * {@link IgcDatePickerComponent} and {@link IgcDateRangePickerComponent}.\n *\n * It owns the calendar and editor facing properties, the open/close plumbing and the\n * picker chrome - calendar, popover/dialog, icons and actions. The value itself, its\n * form state and the editors are left to the concrete pickers.\n */\nexport abstract class IgcDatePickerBaseComponent<\n T extends Date | DateRangeValue,\n> extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcPickerBaseEventMap<Date | DateRangeValue>,\n AbstractConstructor<IgcComboBoxBaseLikeComponent>\n >(IgcComboBoxBaseLikeComponent)\n) {\n //#region Internal state and properties\n\n protected _oldValue: T | null = null;\n\n protected _activeDate: Date | null = null;\n protected _min: Date | null = null;\n protected _max: Date | null = null;\n protected _disabledDates: DateRangeDescriptor[] = [];\n protected _dateConstraints: DateRangeDescriptor[] = [];\n protected _displayFormat?: string;\n protected _inputFormat?: string;\n protected _visibleMonths = 1;\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n { onHide: this._handleClosing }\n );\n\n @query(IgcCalendarComponent.tagName)\n protected readonly _calendar!: IgcCalendarComponent;\n\n @query('#helper-text')\n protected readonly _helperText!: IgcValidationContainerComponent | null;\n\n protected get _isDropDown(): boolean {\n return this.mode === 'dropdown';\n }\n\n protected get _isMaterial(): boolean {\n return this._themes.theme === 'material';\n }\n\n /** Dialog mode is always read-only, the rest depends on the configuration. */\n protected get _isEditorReadOnly(): boolean {\n return !this._isDropDown || this.readOnly || this.nonEditable;\n }\n\n //#endregion\n\n //#region Abstract members\n\n /** The id of the editor the picker is anchored to. */\n protected abstract readonly _inputId: string;\n\n /** The slots of the concrete picker. */\n protected abstract readonly _slots: PickerSlots;\n\n /** The theming controller of the concrete picker. */\n protected abstract readonly _themes: ThemingController;\n\n /**\n * The localization controller of the concrete picker.\n * Only the locale is shared - the resource strings differ per picker.\n */\n protected abstract readonly _i18nController: { locale: string };\n\n /**\n * The current value of the picker.\n *\n * The public `value` is declared by the concrete pickers, since its type,\n * converter and form state differ between them.\n */\n protected abstract get _value(): T | null;\n protected abstract set _value(value: T | null);\n\n /** Clears any user input left in the editor(s) of the picker. */\n protected abstract _clearEditors(): void;\n\n /** Whether the picker holds a value. */\n protected abstract get _hasValue(): boolean;\n\n /** The selection mode of the underlying calendar. */\n protected abstract get _calendarSelection(): CalendarSelection;\n\n /** The localized label of the calendar picker. */\n protected abstract get _selectDateLabel(): string | undefined;\n\n /**\n * The editor the host's ARIA state is projected onto — its associated\n * labels and the `aria-haspopup=\"dialog\"` semantics of the picker, both of\n * which must land on the native input assistive technology reports.\n */\n protected abstract get _projectionTarget(): Element | null;\n\n /** Moves focus to the editor of the picker. */\n protected abstract _focusInput(): void;\n\n /** Restores focus to the editor after a value has been selected in the calendar. */\n protected abstract _focusAndSelectInput(): void;\n\n /**\n * Resolves the value of the picker from the dates selected in the calendar, which come\n * in ascending order.\n */\n protected abstract _valueFromCalendarSelection(dates: Date[]): T | null;\n\n //#endregion\n\n //#region Overridable hooks\n\n /** The value reflected in the calendar when it is in single selection mode. */\n protected get _calendarValue(): Date | null {\n return null;\n }\n\n /** The values reflected in the calendar when it is in range selection mode. */\n protected get _calendarValues(): Date[] | null {\n return null;\n }\n\n /**\n * Seeds the active date of the calendar on the initial render, when the picker holds\n * a value but no explicit active date. From then on the calendar owns its active date\n * and `activeDate` reads it back, so this is consulted once.\n */\n protected get _defaultActiveDate(): Date | null {\n return this._calendarValue;\n }\n\n /** The title of the calendar icon, if the picker provides one. */\n protected get _calendarIconTitle(): string | undefined {\n return undefined;\n }\n\n /** The accessible name of the picker in dialog mode. */\n protected get _dialogLabel(): string | undefined {\n return this._selectDateLabel;\n }\n\n /** The format the editor(s) fall back to when no display format is set. */\n protected get _defaultDisplayFormat(): string | undefined {\n return undefined;\n }\n\n /** The format the editor(s) fall back to when no input format is set. */\n protected get _defaultInputFormat(): string | undefined {\n return undefined;\n }\n\n /** Whether the current calendar selection is complete enough to close the picker. */\n protected _canCloseOnSelect(): boolean {\n return true;\n }\n\n /** Invoked when the picker is dismissed through the Escape key. */\n protected _handleDismiss(): void {}\n\n /** Invoked when focus has left the picker for good. */\n protected _onBlur(): void {}\n\n /** Invoked when the dialog of the picker is closing, before the picker is hidden. */\n protected _onDialogClosing(): void {}\n\n /** Invoked when the picker is toggled, before the update is awaited. */\n protected _syncCalendarOnToggle(): void {}\n\n /** Whether a selection made in the calendar commits the value of the picker right away. */\n protected _commitsCalendarSelection(): boolean {\n return true;\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Determines whether the calendar is opened in a dropdown or a modal dialog.\n * @attr mode\n * @default dropdown\n */\n @property()\n public mode: PickerMode = 'dropdown';\n\n /**\n * Makes the control a readonly field.\n * @attr readonly\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Whether to allow typing in the input.\n * @attr non-editable\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'non-editable' })\n public nonEditable = false;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The label of the picker.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * The prompt symbol to use for unfilled parts of the mask.\n * @attr\n * @default _\n */\n @property()\n public prompt = '_';\n\n /**\n * Format to display the value in when not editing.\n * Defaults to the locale format if not set.\n * @attr display-format\n */\n @property({ attribute: 'display-format' })\n public set displayFormat(value: string) {\n this._displayFormat = value;\n }\n\n public get displayFormat(): string {\n return (this._displayFormat ?? this._defaultDisplayFormat)!;\n }\n\n /**\n * The date format to apply on the input.\n * Defaults to the current locale Intl.DateTimeFormat\n * @attr input-format\n */\n @property({ attribute: 'input-format' })\n public set inputFormat(value: string) {\n this._inputFormat = value;\n }\n\n public get inputFormat(): string {\n return (this._inputFormat ?? this._defaultInputFormat)!;\n }\n\n /**\n * Gets/Sets the locale used for formatting the display value.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n /**\n * The minimum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set min(value: Date | string | null | undefined) {\n this._min = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get min(): Date | null {\n return this._min;\n }\n\n /**\n * The maximum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set max(value: Date | string | null | undefined) {\n this._max = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get max(): Date | null {\n return this._max;\n }\n\n /** Gets/sets disabled dates. */\n @property({ attribute: false })\n public set disabledDates(dates: DateRangeDescriptor[]) {\n this._disabledDates = dates;\n this._setDateConstraints();\n this._validate();\n }\n\n public get disabledDates(): DateRangeDescriptor[] {\n return this._disabledDates;\n }\n\n /** Gets/sets special dates. */\n @property({ attribute: false })\n public specialDates!: DateRangeDescriptor[];\n\n /**\n * Gets/Sets the date which is shown in the calendar picker and is highlighted.\n * By default it is the current date.\n */\n @property({ attribute: 'active-date', converter: convertToDate })\n public set activeDate(value: Date | string | null | undefined) {\n this._activeDate = convertToDate(value);\n }\n\n public get activeDate(): Date {\n return this._activeDate ?? this._calendar?.activeDate;\n }\n\n /**\n * The number of months displayed in the calendar.\n * @attr visible-months\n * @default 1\n */\n @property({ type: Number, attribute: 'visible-months' })\n public set visibleMonths(value: number) {\n this._visibleMonths = value;\n }\n\n public get visibleMonths(): number {\n return this._visibleMonths;\n }\n\n /**\n * The orientation of the calendar header.\n * @attr header-orientation\n * @default horizontal\n */\n @property({ attribute: 'header-orientation', reflect: true })\n public headerOrientation: CalendarHeaderOrientation = 'horizontal';\n\n /**\n * The orientation of the multiple months displayed in the calendar's days view.\n * @attr\n * @default horizontal\n */\n @property()\n public orientation: ContentOrientation = 'horizontal';\n\n /**\n * Determines whether the calendar hides its header.\n * @attr hide-header\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-header' })\n public hideHeader = false;\n\n /**\n * Controls the visibility of the dates that do not belong to the current month.\n * @attr hide-outside-days\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-outside-days' })\n public hideOutsideDays = false;\n\n /**\n * Whether to show the number of the week in the calendar.\n * @attr show-week-numbers\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\n\n /** Sets the start day of the week for the calendar. */\n @property({ attribute: 'week-start' })\n public weekStart: WeekDays = 'sunday';\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n // Projects the host's labels and popup semantics onto the native input\n // inside the editor (see ProjectedARIA for why the host cannot publish\n // these itself).\n addAriaProjector(this, {\n target: () => this._projectionTarget,\n state: () => ({\n hasPopup: 'dialog',\n labelledBy: this._internals.labels,\n describedBy: this._helperText ? [this._helperText] : null,\n }),\n });\n\n addSafeEventListener(this, 'focusout', this._handleFocusOut);\n\n addKeybindings(this, {\n skip: () => this.disabled || this.readOnly,\n })\n .set([altKey, arrowDown], this._handleAnchorClick)\n .set([altKey, arrowUp], this._onEscapeKey)\n .set(escapeKey, this._onEscapeKey);\n }\n\n protected override willUpdate(changedProperties: PropertyValues<this>): void {\n super.willUpdate(changedProperties);\n\n if (changedProperties.has('open')) {\n this._rootClickController.update();\n\n if (this.open) {\n this._oldValue = this._value;\n }\n }\n }\n\n //#endregion\n\n //#region Internal API\n\n protected _setDateConstraints(): void {\n this._dateConstraints =\n createDateConstraints(this._min, this._max, this._disabledDates) ?? [];\n }\n\n protected async _shouldCloseCalendarDropdown(): Promise<void> {\n if (this.keepOpenOnSelect || !this._canCloseOnSelect()) {\n return;\n }\n\n if (await this._hide(true)) {\n this._focusAndSelectInput();\n }\n }\n\n /**\n * Pushes the value of the picker back onto the calendar, which a read-only picker has\n * to do directly - the binding is left with nothing to re-commit.\n */\n protected async _restoreCalendarSelection(): Promise<void> {\n await this._calendar.updateComplete;\n\n if (this._calendarSelection === 'single') {\n this._calendar.value = this._calendarValue;\n } else {\n this._calendar.values = this._calendarValues ?? emptyValues;\n }\n }\n\n /** Emits `igcChange` if the value has moved away from the last committed one. */\n protected _emitChangeIfDirty(): void {\n if (!equal(this._value, this._oldValue)) {\n this.emitEvent('igcChange', { detail: this._value });\n this._oldValue = this._value;\n }\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Clears the editor(s) of the picker of any user input. */\n public clear(): void {\n this._oldValue = this._value;\n this._value = null;\n this._clearEditors();\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected async _onEscapeKey(): Promise<void> {\n if (await this._hide(true)) {\n this._handleDismiss();\n this._focusInput();\n }\n }\n\n protected override async _handleAnchorClick(): Promise<void> {\n super._handleAnchorClick();\n this._syncCalendarOnToggle();\n await this.updateComplete;\n this._calendar[focusActiveDate]({ preventScroll: true });\n }\n\n protected _handleInputClick(event: Event): void {\n if (getElementFromPath('input', event)) {\n // Open only if the click originates from the underlying input\n this._handleAnchorClick();\n }\n }\n\n protected _handleCalendarIconSlotPointerDown(event: PointerEvent): void {\n // Keeps the `delegatesFocus` of the host from focusing the editor, which would enter\n // an invalid state on blur as focus moves on to the calendar.\n event.preventDefault();\n }\n\n protected _handleFocusOut(event: FocusEvent): void {\n if (focusLeftHost(this, event)) {\n this._handleBlur();\n this._onBlur();\n }\n }\n\n protected _handleClosing(): void {\n this._hide(true);\n }\n\n protected async _handleCalendarChangeEvent(\n event: CustomEvent<Date | Date[]>\n ): Promise<void> {\n event.stopPropagation();\n this._setTouchedState();\n\n if (this.readOnly) {\n await this._restoreCalendarSelection();\n return;\n }\n\n this._value = this._valueFromCalendarSelection(asArray(event.detail));\n\n if (this._commitsCalendarSelection()) {\n this.emitEvent('igcChange', { detail: this._value });\n }\n\n this._shouldCloseCalendarDropdown();\n }\n\n protected _handleDialogClosing(event: Event): void {\n event.stopPropagation();\n this._onDialogClosing();\n this._hide(true);\n }\n\n protected _handleDialogClosed(event: Event): void {\n event.stopPropagation();\n }\n\n //#endregion\n\n //#region Rendering\n\n protected _renderClearIcon(part = 'clear-icon') {\n return this._hasValue\n ? html`\n <span\n slot=\"suffix\"\n part=${part}\n @click=${bindIf(!this.readOnly, this.clear)}\n >\n <slot name=${part}>\n <igc-icon\n name=\"input_clear\"\n collection=\"default\"\n aria-hidden=\"true\"\n ></igc-icon>\n </slot>\n </span>\n `\n : nothing;\n }\n\n protected _renderCalendarIcon(suffix = '') {\n const defaultIcon = html`\n <igc-icon\n name=\"today\"\n collection=\"default\"\n aria-hidden=\"true\"\n title=${ifDefined(this._calendarIconTitle)}\n ></igc-icon>\n `;\n\n const part = `${this.open ? 'calendar-icon-open' : 'calendar-icon'}${suffix}`;\n\n return html`\n <span\n slot=\"prefix\"\n part=${part}\n @pointerdown=${this._handleCalendarIconSlotPointerDown}\n @click=${bindIf(!this.readOnly, this._handleAnchorClick)}\n >\n <slot name=${part}>${defaultIcon}</slot>\n </span>\n `;\n }\n\n /**\n * The content projected into an editor of the picker - its icons and prefix/suffix slots.\n *\n * The suffix distinguishes the editors of a picker which renders more than one,\n * e.g. `-start` and `-end`.\n */\n protected _renderEditorSlots(suffix = '') {\n const prefixSlot = `prefix${suffix}`;\n const suffixSlot = `suffix${suffix}`;\n\n return html`\n ${this._renderCalendarIcon(suffix)}\n <slot\n name=${prefixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(prefixSlot), 'prefix')}\n ></slot>\n ${this._renderClearIcon(`clear-icon${suffix}`)}\n <slot\n name=${suffixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(suffixSlot), 'suffix')}\n ></slot>\n `;\n }\n\n protected _renderCalendarSlots() {\n if (this._isDropDown) {\n return nothing;\n }\n\n const hasHeaderDate = this._slots.hasAssignedElements('header-date');\n\n return html`\n <slot name=\"title\" slot=\"title\">${this._selectDateLabel}</slot>\n <slot\n name=\"header-date\"\n slot=${bindIf(hasHeaderDate, 'header-date')}\n ></slot>\n `;\n }\n\n protected _renderCalendar(id: string) {\n const hideHeader = this._isDropDown ? true : this.hideHeader;\n const isInert = !this.open || this.disabled;\n\n return html`\n <igc-calendar\n aria-labelledby=${id}\n role=\"dialog\"\n selection=${this._calendarSelection}\n .inert=${isInert}\n ?show-week-numbers=${this.showWeekNumbers}\n ?hide-outside-days=${this.hideOutsideDays}\n ?hide-header=${hideHeader}\n .activeDate=${this.activeDate ?? this._defaultActiveDate}\n .value=${this._calendarValue}\n .values=${this._calendarValues ?? emptyValues}\n .headerOrientation=${this.headerOrientation}\n .orientation=${this.orientation}\n .visibleMonths=${this._visibleMonths}\n .locale=${this.locale}\n .disabledDates=${this._dateConstraints}\n .specialDates=${this.specialDates}\n .weekStart=${this.weekStart}\n @igcChange=${this._handleCalendarChangeEvent}\n exportparts=${calendarExportParts}\n >\n ${this._renderCalendarSlots()}\n </igc-calendar>\n `;\n }\n\n protected _renderActions() {\n const hasActions = this._slots.hasAssignedElements('actions');\n\n // If in dialog mode use the dialog footer slot\n return html`\n <div\n part=\"actions\"\n ?hidden=${!hasActions}\n slot=${bindIf(!this._isDropDown && hasActions, 'footer')}\n >\n <slot name=\"actions\"></slot>\n </div>\n `;\n }\n\n /** The content rendered inside the popover/dialog of the picker. */\n protected _renderPickerContent(id: string) {\n return html`${this._renderCalendar(id)}${this._renderActions()}`;\n }\n\n /** Additional content rendered in the dialog of the picker. */\n protected _renderDialogFooter(): TemplateResult | typeof nothing {\n return nothing;\n }\n\n protected _renderPicker(id: string) {\n const isDisabled = !this.open || this.disabled;\n\n return this._isDropDown\n ? html`\n <igc-popover ?open=${this.open} anchor=${id} flip shift>\n <igc-focus-trap ?disabled=${isDisabled}>\n ${this._renderPickerContent(id)}\n </igc-focus-trap>\n </igc-popover>\n `\n : html`\n <igc-dialog\n aria-label=${ifDefined(this._dialogLabel)}\n role=\"dialog\"\n ?open=${this.open}\n ?close-on-outside-click=${!this.keepOpenOnOutsideClick}\n hide-default-action\n @igcClosing=${this._handleDialogClosing}\n @igcClosed=${this._handleDialogClosed}\n exportparts=\"base: dialog-base, title, footer, overlay\"\n >\n ${this._renderPickerContent(id)}${this._renderDialogFooter()}\n </igc-dialog>\n `;\n }\n\n protected _renderHelperText(): TemplateResult {\n return IgcValidationContainerComponent.create(this);\n }\n\n //#endregion\n}\n"]}
1
+ {"version":3,"file":"date-picker.base.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.base.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,IAAI,EAAE,OAAO,EAA4C,MAAM,KAAK,CAAC;AAC9E,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,2CAA2C,CAAC;AAC7E,OAAO,EACL,cAAc,EACd,MAAM,EACN,SAAS,EACT,OAAO,EACP,SAAS,GACV,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,eAAe,EAAE,MAAM,2CAA2C,CAAC;AAC5E,OAAO,EAAE,4BAA4B,EAAE,MAAM,gCAAgC,CAAC;AAE9E,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,2BA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CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;qDAKtC;AAcM;IAPN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;IAC9B,eAAe,CAAuD;QACrE,QAAQ,EAAE,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;YACrB,IAAI,CAAC,mBAAmB,EAAE,CAAC;YAC3B,IAAI,CAAC,SAAS,EAAE,CAAC;QACnB,CAAC;KACF,CAAC;iEAC+C;AAI1C;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;gEACa;AAO5C;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;4DAGhE;AAYD;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;+DAGvD;AAYM;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,oBAAoB,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;qEACM;AAQ5D;IADN,QAAQ,EAAE;+DAC2C;AAQ/C;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;8DAC3C;AAQnB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAQxB;IADN,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,mBAAmB,EAAE,CAAC;mEAC5C;AAIxB;IADN,QAAQ,CAAC,EAAE,SAAS,EAAE,YAAY,EAAE,CAAC;6DACA","sourcesContent":["import { html, nothing, type PropertyValues, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addAriaProjector } from '#internals/controllers/aria-projection.js';\nimport {\n addKeybindings,\n altKey,\n arrowDown,\n arrowUp,\n escapeKey,\n} from '#internals/controllers/key-bindings.js';\nimport { addRootClickController } from '#internals/controllers/root-click.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { coercedProperty } from '#internals/decorators/coerced-property.js';\nimport { IgcComboBoxBaseLikeComponent } from '#internals/mixins/combo-box.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormAssociatedRequiredMixin } from '#internals/mixins/forms/associated-required.js';\nimport { renderSlottedIcon } from '#internals/templates/slotted-icon.js';\nimport { asArray } from '#internals/utils/arrays.js';\nimport {\n addSafeEventListener,\n focusLeftHost,\n getElementFromPath,\n} from '#internals/utils/events.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { equal } from '#internals/utils/objects.js';\nimport type { ThemingController } from '#theming/theming-controller.js';\nimport IgcCalendarComponent, { focusActiveDate } from '../calendar/calendar.js';\nimport { createDateConstraints } from '../calendar/helpers.js';\nimport type {\n CalendarHeaderOrientation,\n CalendarSelection,\n DateRangeDescriptor,\n WeekDays,\n} from '../calendar/types.js';\nimport IgcDialogComponent from '../dialog/dialog.js';\nimport IgcFocusTrapComponent from '../focus-trap/focus-trap.js';\nimport IgcIconComponent from '../icon/icon.js';\nimport IgcPopoverComponent from '../popover/popover.js';\nimport type {\n ContentOrientation,\n DateRangeValue,\n PickerMode,\n} from '../types.js';\nimport IgcValidationContainerComponent from '../validation-container/validation-container.js';\n\n/**\n * The events emitted by a picker driven by a calendar.\n * `T` is the value type of the picker - a single date or a date range.\n */\nexport interface IgcPickerBaseEventMap<T> {\n igcOpening: CustomEvent<void>;\n igcOpened: CustomEvent<void>;\n igcClosing: CustomEvent<void>;\n igcClosed: CustomEvent<void>;\n igcChange: CustomEvent<T | null>;\n igcInput: CustomEvent<T | null>;\n}\n\n/** The parts of the calendar which the pickers re-export to their own consumers. */\nexport const calendarExportParts =\n `header, header-title, header-date, content: calendar-content, navigation, months-navigation,\n years-navigation, years-range, navigation-buttons, navigation-button, days-view-container,\n days-view, months-view, years-view, days-row, months-row, years-row, label: calendar-label,\n label-inner: calendar-label-inner, week-number, week-number-inner, date,\n date-inner, first, last, inactive, hidden, weekend, range, special, disabled, single, preview,\n month, month-inner, year, year-inner, selected, current` as const;\n\n/** Stable identity for \"no range\", so that the calendar binding is committed only once. */\nconst emptyValues: Date[] = [];\n\n/** The components rendered by the picker chrome of every picker. */\nexport const pickerDependencies = [\n IgcCalendarComponent,\n IgcDialogComponent,\n IgcFocusTrapComponent,\n IgcIconComponent,\n IgcPopoverComponent,\n IgcValidationContainerComponent,\n];\n\n/**\n * The subset of the slot controller which the base picker queries.\n * Kept structural so that each picker can declare its own set of slot names.\n */\ntype PickerSlots = {\n hasAssignedElements(slot: string): boolean;\n};\n\n/* blazorIndirectRender */\n/* omitModule */\n/**\n * Common behavior for the pickers which drive an `igc-calendar` from an editor -\n * {@link IgcDatePickerComponent} and {@link IgcDateRangePickerComponent}.\n *\n * It owns the calendar and editor facing properties, the open/close plumbing and the\n * picker chrome - calendar, popover/dialog, icons and actions. The value itself, its\n * form state and the editors are left to the concrete pickers.\n */\nexport abstract class IgcDatePickerBaseComponent<\n T extends Date | DateRangeValue,\n> extends FormAssociatedRequiredMixin(\n EventEmitterMixin<\n IgcPickerBaseEventMap<Date | DateRangeValue>,\n AbstractConstructor<IgcComboBoxBaseLikeComponent>\n >(IgcComboBoxBaseLikeComponent)\n) {\n //#region Internal state and properties\n\n protected _oldValue: T | null = null;\n\n protected _activeDate: Date | null = null;\n protected _min: Date | null = null;\n protected _max: Date | null = null;\n protected _dateConstraints: DateRangeDescriptor[] = [];\n protected _displayFormat?: string;\n protected _inputFormat?: string;\n protected _visibleMonths = 1;\n\n protected override readonly _rootClickController = addRootClickController(\n this,\n { onHide: this._handleClosing }\n );\n\n @query(IgcCalendarComponent.tagName)\n protected readonly _calendar!: IgcCalendarComponent;\n\n @query('#helper-text')\n protected readonly _helperText!: IgcValidationContainerComponent | null;\n\n protected get _isDropDown(): boolean {\n return this.mode === 'dropdown';\n }\n\n protected get _isMaterial(): boolean {\n return this._themes.theme === 'material';\n }\n\n /** Dialog mode is always read-only, the rest depends on the configuration. */\n protected get _isEditorReadOnly(): boolean {\n return !this._isDropDown || this.readOnly || this.nonEditable;\n }\n\n //#endregion\n\n //#region Abstract members\n\n /** The id of the editor the picker is anchored to. */\n protected abstract readonly _inputId: string;\n\n /** The slots of the concrete picker. */\n protected abstract readonly _slots: PickerSlots;\n\n /** The theming controller of the concrete picker. */\n protected abstract readonly _themes: ThemingController;\n\n /**\n * The localization controller of the concrete picker.\n * Only the locale is shared - the resource strings differ per picker.\n */\n protected abstract readonly _i18nController: { locale: string };\n\n /**\n * The current value of the picker.\n *\n * The public `value` is declared by the concrete pickers, since its type,\n * converter and form state differ between them.\n */\n protected abstract get _value(): T | null;\n protected abstract set _value(value: T | null);\n\n /** Clears any user input left in the editor(s) of the picker. */\n protected abstract _clearEditors(): void;\n\n /** Whether the picker holds a value. */\n protected abstract get _hasValue(): boolean;\n\n /** The selection mode of the underlying calendar. */\n protected abstract get _calendarSelection(): CalendarSelection;\n\n /** The localized label of the calendar picker. */\n protected abstract get _selectDateLabel(): string | undefined;\n\n /**\n * The editor the host's ARIA state is projected onto - its associated\n * labels and the `aria-haspopup=\"dialog\"` semantics of the picker, both of\n * which must land on the native input assistive technology reports.\n */\n protected abstract get _projectionTarget(): Element | null;\n\n /** Moves focus to the editor of the picker. */\n protected abstract _focusInput(): void;\n\n /** Restores focus to the editor after a value has been selected in the calendar. */\n protected abstract _focusAndSelectInput(): void;\n\n /**\n * Resolves the value of the picker from the dates selected in the calendar, which come\n * in ascending order.\n */\n protected abstract _valueFromCalendarSelection(dates: Date[]): T | null;\n\n //#endregion\n\n //#region Overridable hooks\n\n /** The value reflected in the calendar when it is in single selection mode. */\n protected get _calendarValue(): Date | null {\n return null;\n }\n\n /** The values reflected in the calendar when it is in range selection mode. */\n protected get _calendarValues(): Date[] | null {\n return null;\n }\n\n /**\n * Seeds the active date of the calendar on the initial render, when the picker holds\n * a value but no explicit active date. From then on the calendar owns its active date\n * and `activeDate` reads it back, so this is consulted once.\n */\n protected get _defaultActiveDate(): Date | null {\n return this._calendarValue;\n }\n\n /** The title of the calendar icon, if the picker provides one. */\n protected get _calendarIconTitle(): string | undefined {\n return undefined;\n }\n\n /** The accessible name of the picker in dialog mode. */\n protected get _dialogLabel(): string | undefined {\n return this._selectDateLabel;\n }\n\n /** The format the editor(s) fall back to when no display format is set. */\n protected get _defaultDisplayFormat(): string | undefined {\n return undefined;\n }\n\n /** The format the editor(s) fall back to when no input format is set. */\n protected get _defaultInputFormat(): string | undefined {\n return undefined;\n }\n\n /** Whether the current calendar selection is complete enough to close the picker. */\n protected _canCloseOnSelect(): boolean {\n return true;\n }\n\n /** Invoked when the picker is dismissed through the Escape key. */\n protected _handleDismiss(): void {}\n\n /** Invoked when focus has left the picker for good. */\n protected _onBlur(): void {}\n\n /** Invoked when the dialog of the picker is closing, before the picker is hidden. */\n protected _onDialogClosing(): void {}\n\n /** Invoked when the picker is toggled, before the update is awaited. */\n protected _syncCalendarOnToggle(): void {}\n\n /** Whether a selection made in the calendar commits the value of the picker right away. */\n protected _commitsCalendarSelection(): boolean {\n return true;\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /**\n * Determines whether the calendar is opened in a dropdown or a modal dialog.\n * @attr mode\n * @default dropdown\n */\n @property()\n public mode: PickerMode = 'dropdown';\n\n /**\n * Makes the control a readonly field.\n * @attr readonly\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'readonly' })\n public readOnly = false;\n\n /**\n * Whether to allow typing in the input.\n * @attr non-editable\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'non-editable' })\n public nonEditable = false;\n\n /**\n * Whether the control will have outlined appearance.\n * @attr\n * @default false\n */\n @property({ type: Boolean, reflect: true })\n public outlined = false;\n\n /**\n * The label of the picker.\n * @attr label\n */\n @property()\n public label!: string;\n\n /**\n * The prompt symbol to use for unfilled parts of the mask.\n * @attr\n * @default _\n */\n @property()\n public prompt = '_';\n\n /**\n * Format to display the value in when not editing.\n * Defaults to the locale format if not set.\n * @attr display-format\n */\n @property({ attribute: 'display-format' })\n public set displayFormat(value: string) {\n this._displayFormat = value;\n }\n\n public get displayFormat(): string {\n return (this._displayFormat ?? this._defaultDisplayFormat)!;\n }\n\n /**\n * The date format to apply on the input.\n * Defaults to the current locale Intl.DateTimeFormat\n * @attr input-format\n */\n @property({ attribute: 'input-format' })\n public set inputFormat(value: string) {\n this._inputFormat = value;\n }\n\n public get inputFormat(): string {\n return (this._inputFormat ?? this._defaultInputFormat)!;\n }\n\n /**\n * The locale used to format the display value and to resolve the\n * component's resource strings. Falls back to the global locale when not set.\n * @attr locale\n */\n @property()\n public set locale(value: string) {\n this._i18nController.locale = value;\n }\n\n public get locale(): string {\n return this._i18nController.locale;\n }\n\n /**\n * The minimum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set min(value: Date | string | null | undefined) {\n this._min = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get min(): Date | null {\n return this._min;\n }\n\n /**\n * The maximum value required for the picker to remain valid.\n * @attr\n */\n @property({ converter: convertToDate })\n public set max(value: Date | string | null | undefined) {\n this._max = convertToDate(value);\n this._setDateConstraints();\n this._validate();\n }\n\n public get max(): Date | null {\n return this._max;\n }\n\n /** Gets/sets disabled dates. */\n @property({ attribute: false })\n @coercedProperty<DateRangeDescriptor[], IgcDatePickerBaseComponent<T>>({\n onChange: ({ host }) => {\n host._setDateConstraints();\n host._validate();\n },\n })\n public disabledDates: DateRangeDescriptor[] = [];\n\n /** Gets/sets special dates. */\n @property({ attribute: false })\n public specialDates!: DateRangeDescriptor[];\n\n /**\n * Gets/Sets the date which is shown in the calendar picker and is highlighted.\n * By default it is the current date.\n */\n @property({ attribute: 'active-date', converter: convertToDate })\n public set activeDate(value: Date | string | null | undefined) {\n this._activeDate = convertToDate(value);\n }\n\n public get activeDate(): Date {\n return this._activeDate ?? this._calendar?.activeDate;\n }\n\n /**\n * The number of months displayed in the calendar.\n * @attr visible-months\n * @default 1\n */\n @property({ type: Number, attribute: 'visible-months' })\n public set visibleMonths(value: number) {\n this._visibleMonths = value;\n }\n\n public get visibleMonths(): number {\n return this._visibleMonths;\n }\n\n /**\n * The orientation of the calendar header.\n * @attr header-orientation\n * @default horizontal\n */\n @property({ attribute: 'header-orientation', reflect: true })\n public headerOrientation: CalendarHeaderOrientation = 'horizontal';\n\n /**\n * The orientation of the multiple months displayed in the calendar's days view.\n * @attr\n * @default horizontal\n */\n @property()\n public orientation: ContentOrientation = 'horizontal';\n\n /**\n * Determines whether the calendar hides its header.\n * @attr hide-header\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-header' })\n public hideHeader = false;\n\n /**\n * Controls the visibility of the dates that do not belong to the current month.\n * @attr hide-outside-days\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'hide-outside-days' })\n public hideOutsideDays = false;\n\n /**\n * Whether to show the number of the week in the calendar.\n * @attr show-week-numbers\n * @default false\n */\n @property({ type: Boolean, reflect: true, attribute: 'show-week-numbers' })\n public showWeekNumbers = false;\n\n /** Sets the start day of the week for the calendar. */\n @property({ attribute: 'week-start' })\n public weekStart: WeekDays = 'sunday';\n\n //#endregion\n\n //#region Life-cycle hooks\n\n constructor() {\n super();\n\n // Projects the host's labels and popup semantics onto the native input\n // inside the editor (see ProjectedARIA for why the host cannot publish\n // these itself).\n addAriaProjector(this, {\n target: () => this._projectionTarget,\n state: () => ({\n hasPopup: 'dialog',\n labelledBy: this._internals.labels,\n describedBy: this._helperText ? [this._helperText] : null,\n }),\n });\n\n addSafeEventListener(this, 'focusout', this._handleFocusOut);\n\n addKeybindings(this, {\n skip: () => this.disabled || this.readOnly,\n })\n .set([altKey, arrowDown], this._handleAnchorClick)\n .set([altKey, arrowUp], this._onEscapeKey)\n .set(escapeKey, this._onEscapeKey);\n }\n\n protected override willUpdate(changedProperties: PropertyValues<this>): void {\n super.willUpdate(changedProperties);\n\n if (changedProperties.has('open')) {\n this._rootClickController.update();\n\n if (this.open) {\n this._oldValue = this._value;\n }\n }\n }\n\n //#endregion\n\n //#region Internal API\n\n protected _setDateConstraints(): void {\n this._dateConstraints =\n createDateConstraints(this._min, this._max, this.disabledDates) ?? [];\n }\n\n protected async _shouldCloseCalendarDropdown(): Promise<void> {\n if (this.keepOpenOnSelect || !this._canCloseOnSelect()) {\n return;\n }\n\n if (await this._hide(true)) {\n this._focusAndSelectInput();\n }\n }\n\n /**\n * Points the calendar at the first defined of `dates`, keeping its current\n * active date when none is. A no-op until the calendar is rendered.\n */\n protected _setCalendarActiveDate(\n ...dates: (Date | null | undefined)[]\n ): void {\n if (this._calendar) {\n this._calendar.activeDate =\n dates.find(Boolean) ?? this._calendar.activeDate;\n }\n }\n\n /**\n * Pushes the value of the picker back onto the calendar, which a read-only picker has\n * to do directly - the binding is left with nothing to re-commit.\n */\n protected async _restoreCalendarSelection(): Promise<void> {\n await this._calendar.updateComplete;\n\n if (this._calendarSelection === 'single') {\n this._calendar.value = this._calendarValue;\n } else {\n this._calendar.values = this._calendarValues ?? emptyValues;\n }\n }\n\n /** Emits `igcChange` if the value has moved away from the last committed one. */\n protected _emitChangeIfDirty(): void {\n if (!equal(this._value, this._oldValue)) {\n this.emitEvent('igcChange', { detail: this._value });\n this._oldValue = this._value;\n }\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Clears the editor(s) of the picker of any user input. */\n public clear(): void {\n this._oldValue = this._value;\n this._value = null;\n this._clearEditors();\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected async _onEscapeKey(): Promise<void> {\n if (await this._hide(true)) {\n this._handleDismiss();\n this._focusInput();\n }\n }\n\n protected override async _handleAnchorClick(): Promise<void> {\n super._handleAnchorClick();\n this._syncCalendarOnToggle();\n await this.updateComplete;\n this._calendar[focusActiveDate]({ preventScroll: true });\n }\n\n protected _handleInputClick(event: Event): void {\n if (getElementFromPath('input', event)) {\n // Open only if the click originates from the underlying input\n this._handleAnchorClick();\n }\n }\n\n protected _handleCalendarIconSlotPointerDown(event: PointerEvent): void {\n // Keeps the `delegatesFocus` of the host from focusing the editor, which would enter\n // an invalid state on blur as focus moves on to the calendar.\n event.preventDefault();\n }\n\n protected _handleFocusOut(event: FocusEvent): void {\n if (focusLeftHost(this, event)) {\n this._handleBlur();\n this._onBlur();\n }\n }\n\n protected _handleClosing(): void {\n this._hide(true);\n }\n\n protected async _handleCalendarChangeEvent(\n event: CustomEvent<Date | Date[]>\n ): Promise<void> {\n event.stopPropagation();\n this._setTouchedState();\n\n if (this.readOnly) {\n await this._restoreCalendarSelection();\n return;\n }\n\n this._value = this._valueFromCalendarSelection(asArray(event.detail));\n\n if (this._commitsCalendarSelection()) {\n this.emitEvent('igcChange', { detail: this._value });\n }\n\n this._shouldCloseCalendarDropdown();\n }\n\n protected _handleDialogClosing(event: Event): void {\n event.stopPropagation();\n this._onDialogClosing();\n this._hide(true);\n }\n\n protected _handleDialogClosed(event: Event): void {\n event.stopPropagation();\n }\n\n //#endregion\n\n //#region Rendering\n\n protected _renderClearIcon(part = 'clear-icon') {\n return this._hasValue\n ? html`\n <span\n slot=\"suffix\"\n part=${part}\n @click=${bindIf(!this.readOnly, this.clear)}\n >\n ${renderSlottedIcon({ slot: part, icon: 'input_clear' })}\n </span>\n `\n : nothing;\n }\n\n protected _renderCalendarIcon(suffix = '') {\n const part = `${this.open ? 'calendar-icon-open' : 'calendar-icon'}${suffix}`;\n\n return html`\n <span\n slot=\"prefix\"\n part=${part}\n @pointerdown=${this._handleCalendarIconSlotPointerDown}\n @click=${bindIf(!this.readOnly, this._handleAnchorClick)}\n >\n ${renderSlottedIcon({\n slot: part,\n icon: 'today',\n title: this._calendarIconTitle,\n })}\n </span>\n `;\n }\n\n /**\n * The content projected into an editor of the picker - its icons and prefix/suffix slots.\n *\n * The suffix distinguishes the editors of a picker which renders more than one,\n * e.g. `-start` and `-end`.\n */\n protected _renderEditorSlots(suffix = '') {\n const prefixSlot = `prefix${suffix}`;\n const suffixSlot = `suffix${suffix}`;\n\n return html`\n ${this._renderCalendarIcon(suffix)}\n <slot\n name=${prefixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(prefixSlot), 'prefix')}\n ></slot>\n ${this._renderClearIcon(`clear-icon${suffix}`)}\n <slot\n name=${suffixSlot}\n slot=${bindIf(this._slots.hasAssignedElements(suffixSlot), 'suffix')}\n ></slot>\n `;\n }\n\n protected _renderCalendarSlots() {\n if (this._isDropDown) {\n return nothing;\n }\n\n const hasHeaderDate = this._slots.hasAssignedElements('header-date');\n\n return html`\n <slot name=\"title\" slot=\"title\">${this._selectDateLabel}</slot>\n <slot\n name=\"header-date\"\n slot=${bindIf(hasHeaderDate, 'header-date')}\n ></slot>\n `;\n }\n\n protected _renderCalendar(id: string) {\n const hideHeader = this._isDropDown ? true : this.hideHeader;\n const isInert = !this.open || this.disabled;\n\n return html`\n <igc-calendar\n aria-labelledby=${id}\n role=\"dialog\"\n selection=${this._calendarSelection}\n .inert=${isInert}\n ?show-week-numbers=${this.showWeekNumbers}\n ?hide-outside-days=${this.hideOutsideDays}\n ?hide-header=${hideHeader}\n .activeDate=${this.activeDate ?? this._defaultActiveDate}\n .value=${this._calendarValue}\n .values=${this._calendarValues ?? emptyValues}\n .headerOrientation=${this.headerOrientation}\n .orientation=${this.orientation}\n .visibleMonths=${this._visibleMonths}\n .locale=${this.locale}\n .disabledDates=${this._dateConstraints}\n .specialDates=${this.specialDates}\n .weekStart=${this.weekStart}\n @igcChange=${this._handleCalendarChangeEvent}\n exportparts=${calendarExportParts}\n >\n ${this._renderCalendarSlots()}\n </igc-calendar>\n `;\n }\n\n protected _renderActions() {\n const hasActions = this._slots.hasAssignedElements('actions');\n\n // If in dialog mode use the dialog footer slot\n return html`\n <div\n part=\"actions\"\n ?hidden=${!hasActions}\n slot=${bindIf(!this._isDropDown && hasActions, 'footer')}\n >\n <slot name=\"actions\"></slot>\n </div>\n `;\n }\n\n /** The content rendered inside the popover/dialog of the picker. */\n protected _renderPickerContent(id: string) {\n return html`${this._renderCalendar(id)}${this._renderActions()}`;\n }\n\n /** Additional content rendered in the dialog of the picker. */\n protected _renderDialogFooter(): TemplateResult | typeof nothing {\n return nothing;\n }\n\n protected _renderPicker(id: string) {\n const isDisabled = !this.open || this.disabled;\n\n return this._isDropDown\n ? html`\n <igc-popover ?open=${this.open} anchor=${id} flip shift>\n <igc-focus-trap ?disabled=${isDisabled}>\n ${this._renderPickerContent(id)}\n </igc-focus-trap>\n </igc-popover>\n `\n : html`\n <igc-dialog\n aria-label=${ifDefined(this._dialogLabel)}\n role=\"dialog\"\n ?open=${this.open}\n ?close-on-outside-click=${!this.keepOpenOnOutsideClick}\n hide-default-action\n @igcClosing=${this._handleDialogClosing}\n @igcClosed=${this._handleDialogClosed}\n exportparts=\"base: dialog-base, title, footer, overlay\"\n >\n ${this._renderPickerContent(id)}${this._renderDialogFooter()}\n </igc-dialog>\n `;\n }\n\n //#endregion\n}\n"]}
@@ -93,7 +93,7 @@ export default class IgcDatePickerComponent extends IgcDatePickerComponent_base
93
93
  protected get __validators(): import("../../internals/validators.js").Validator<IgcDatePickerComponent>[];
94
94
  protected readonly _inputId: string;
95
95
  protected readonly _themes: import("#theming/theming-controller.js").ThemingController;
96
- protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "title" | "prefix" | "[default]" | "actions" | "suffix" | "helper-text" | "value-missing" | "custom-error" | "range-overflow" | "range-underflow" | "clear-icon" | "calendar-icon-open" | "calendar-icon" | "header-date" | "bad-input">;
96
+ protected readonly _slots: import("#internals/controllers/slot.js").SlotController<"invalid" | "title" | "prefix" | "helper-text" | "[default]" | "actions" | "suffix" | "value-missing" | "custom-error" | "range-overflow" | "range-underflow" | "clear-icon" | "calendar-icon-open" | "calendar-icon" | "header-date" | "bad-input">;
97
97
  /**
98
98
  * For now we use the core validation strings internally only, to avoid mixing with old resources by users.
99
99
  * To Do: Update resourceStrings type when the IgcCalendarResourceStrings is changed to ICalendarResourceStrings
@@ -99,7 +99,7 @@ let IgcDatePickerComponent = class IgcDatePickerComponent extends EventEmitterMi
99
99
  this._input.select();
100
100
  }
101
101
  _syncCalendarOnToggle() {
102
- this._calendar.activeDate = this.value ?? this._calendar.activeDate;
102
+ this._setCalendarActiveDate(this.value);
103
103
  }
104
104
  _clearEditors() {
105
105
  this._input?.clear();
@@ -129,9 +129,7 @@ let IgcDatePickerComponent = class IgcDatePickerComponent extends EventEmitterMi
129
129
  }
130
130
  _handleInputChangeEvent(event) {
131
131
  event.stopPropagation();
132
- this._setTouchedState();
133
- this.value = event.target.value;
134
- this.emitEvent('igcChange', { detail: this.value });
132
+ this._commitValue(event.target.value, 'igcChange');
135
133
  }
136
134
  _handleInputEvent(event) {
137
135
  event.stopPropagation();
@@ -213,7 +211,7 @@ let IgcDatePickerComponent = class IgcDatePickerComponent extends EventEmitterMi
213
211
  return html `
214
212
  ${this._isMaterial ? nothing : this._renderLabel(id)}
215
213
  ${this._renderInput(id)} ${this._renderPicker(id)}
216
- ${this._renderHelperText()}
214
+ ${this._renderValidationContainer()}
217
215
  `;
218
216
  }
219
217
  };
@@ -1 +1 @@
1
- {"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAG5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,+B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1C,4BAA4B,CAC3B,uFAAuF,CACxF;IACA,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,sBAAsB,CAyU1C;eAzUoB,sBAAsB","sourcesContent":["import {\n CalendarResourceStringsEN,\n DatePickerResourceStringsEN,\n type ICalendarResourceStrings,\n type IDatePickerResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html, nothing, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { blazorAdditionalDependencies } from '#internals/decorators/blazorAdditionalDependencies.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { IgcCalendarResourceStrings } from '#internals/i18n/EN/calendar.resources.js';\nimport {\n addI18nController,\n getDateTimeFormat,\n} from '#internals/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormValueDateTimeTransformers } from '#internals/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { firstOf } from '#internals/utils/arrays.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { createIdGenerator } from '#internals/utils/strings.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport type { CalendarSelection } from '../calendar/types.js';\nimport type { DatePart } from '../date-time-input/date-part.js';\nimport IgcDateTimeInputComponent from '../date-time-input/date-time-input.js';\nimport type { RangeTextSelectMode, SelectionRangeDirection } from '../types.js';\nimport {\n IgcDatePickerBaseComponent,\n type IgcPickerBaseEventMap,\n pickerDependencies,\n} from './date-picker.base.js';\nimport { styles } from './themes/date-picker.base.css.js';\nimport { styles as shared } from './themes/shared/date-picker.common.css.js';\nimport { all } from './themes/themes.js';\nimport { datePickerValidators } from './validators.js';\n\nexport type IgcDatePickerComponentEventMap = IgcPickerBaseEventMap<Date>;\n\nconst nextId = createIdGenerator('date-picker');\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'bad-input',\n 'value-missing',\n 'range-overflow',\n 'range-underflow',\n 'custom-error',\n 'invalid',\n 'title',\n 'header-date',\n 'clear-icon',\n 'calendar-icon',\n 'calendar-icon-open',\n 'actions'\n);\ntype DatePickerResourceStringsType = IDatePickerResourceStrings &\n ICalendarResourceStrings;\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/**\n * The date picker is a feature rich component used for entering a date through manual text input or\n * choosing date values from a calendar dialog that pops up.\n *\n * @element igc-date-picker\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after the input.\n * @slot helper-text - Renders content below the input.\n * @slot bad-input - Renders content when the value is in the disabledDates ranges.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot range-overflow - Renders content when the max validation fails.\n * @slot range-underflow - Renders content when the min validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n * @slot title - Renders content in the calendar title.\n * @slot header-date - Renders content instead of the current date/range in the calendar header.\n * @slot clear-icon - Renders a clear icon template.\n * @slot calendar-icon - Renders the icon/content for the calendar picker.\n * @slot calendar-icon-open - Renders the icon/content for the picker in open state.\n * @slot actions - Renders content in the action part of the picker in open state.\n *\n * @fires igcOpening - Emitted just before the calendar popover is shown.\n * @fires igcOpened - Emitted after the calendar popover is shown.\n * @fires igcClosing - Emitted just before the calendar popover is hidden.\n * @fires igcClosed - Emitted after the calendar popover is hidden.\n * @fires igcChange - Emitted when the user modifies and commits the elements's value.\n * @fires igcInput - Emitted when when the user types in the element.\n *\n * @csspart label - The label wrapper that renders content above the target input.\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart calendar-icon - The calendar icon wrapper for closed state.\n * @csspart calendar-icon-open - The calendar icon wrapper for opened state.\n * @csspart clear-icon - The clear icon wrapper.\n * @csspart actions - The actions wrapper.\n * @csspart helper-text - The helper-text wrapper that renders content below the target input.\n * @csspart header - The calendar header element.\n * @csspart header-title - The calendar header title element.\n * @csspart header-date - The calendar header date element.\n * @csspart calendar-content - The calendar content element which contains the views and navigation elements.\n * @csspart navigation - The calendar navigation container element.\n * @csspart months-navigation - The calendar months navigation button element.\n * @csspart years-navigation - The calendar years navigation button element.\n * @csspart years-range - The calendar years range element.\n * @csspart navigation-buttons - The calendar navigation buttons container.\n * @csspart navigation-button - The calendar previous/next navigation button.\n * @csspart days-view-container - The calendar days view container element.\n * @csspart days-view - The calendar days view element.\n * @csspart months-view - The calendar months view element.\n * @csspart years-view - The calendar years view element.\n * @csspart days-row - The calendar days row element.\n * @csspart calendar-label - The calendar week header label element.\n * @csspart week-number - The calendar week number element.\n * @csspart week-number-inner - The calendar week number inner element.\n * @csspart date - The calendar date element.\n * @csspart date-inner - The calendar date inner element.\n * @csspart first - The calendar first selected date element in range selection.\n * @csspart last - The calendar last selected date element in range selection.\n * @csspart inactive - The calendar inactive date element.\n * @csspart hidden - The calendar hidden date element.\n * @csspart weekend - The calendar weekend date element.\n * @csspart range - The calendar range selected element.\n * @csspart special - The calendar special date element.\n * @csspart disabled - The calendar disabled date element.\n * @csspart single - The calendar single selected date element.\n * @csspart preview - The calendar range selection preview date element.\n * @csspart month - The calendar month element.\n * @csspart month-inner - The calendar month inner element.\n * @csspart year - The calendar year element.\n * @csspart year-inner - The calendar year inner element.\n * @csspart selected - The calendar selected state for element(s). Applies to date, month and year elements.\n * @csspart current - The calendar current state for element(s). Applies to date, month and year elements.\n */\n@blazorAdditionalDependencies(\n 'IgcCalendarComponent, IgcDateTimeInputComponent, IgcDialogComponent, IgcIconComponent'\n)\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcDatePickerComponent extends EventEmitterMixin<\n IgcDatePickerComponentEventMap,\n AbstractConstructor<IgcDatePickerBaseComponent<Date>>\n>(IgcDatePickerBaseComponent) {\n public static readonly tagName = 'igc-date-picker';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcDatePickerComponent,\n IgcDateTimeInputComponent,\n ...pickerDependencies\n );\n }\n\n //#region Private properties and state\n\n protected override get __validators() {\n return datePickerValidators;\n }\n\n protected override readonly _inputId = nextId();\n protected override readonly _themes = addThemingController(this, all);\n protected override readonly _slots = addSlotController(this, {\n slots: Slots,\n });\n\n /**\n * For now we use the core validation strings internally only, to avoid mixing with old resources by users.\n * To Do: Update resourceStrings type when the IgcCalendarResourceStrings is changed to ICalendarResourceStrings\n */\n protected override readonly _i18nController = addI18nController<\n IgcCalendarResourceStrings | DatePickerResourceStringsType\n >(this, {\n defaultEN: Object.assign(\n {},\n DatePickerResourceStringsEN,\n CalendarResourceStringsEN\n ),\n resourceMapName: 'date-picker',\n });\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueDateTimeTransformers,\n });\n\n @query(IgcDateTimeInputComponent.tagName)\n private readonly _input!: IgcDateTimeInputComponent;\n\n //#endregion\n\n //#region Base class hooks\n\n protected override get _value(): Date | null {\n return this.value;\n }\n\n protected override set _value(value: Date | null) {\n this.value = value;\n }\n\n protected override get _hasValue(): boolean {\n return this.value !== null;\n }\n\n protected override get _calendarSelection(): CalendarSelection {\n return 'single';\n }\n\n protected override get _calendarValue(): Date | null {\n return this.value;\n }\n\n protected override get _selectDateLabel(): string | undefined {\n return this.resourceStrings.calendar_select_date;\n }\n\n protected override get _calendarIconTitle(): string | undefined {\n return this.value\n ? this.resourceStrings.date_picker_change_date\n : this.resourceStrings.date_picker_choose_date;\n }\n\n protected override get _dialogLabel(): string | undefined {\n return this._calendarIconTitle;\n }\n\n protected override get _defaultDisplayFormat(): string | undefined {\n return this._input?.displayFormat;\n }\n\n protected override get _defaultInputFormat(): string | undefined {\n return this._input?.inputFormat;\n }\n\n protected override get _projectionTarget() {\n return this._input ?? null;\n }\n\n protected override _focusInput(): void {\n this._input.focus();\n }\n\n protected override _focusAndSelectInput(): void {\n this._input.focus();\n this._input.select();\n }\n\n protected override _syncCalendarOnToggle(): void {\n this._calendar.activeDate = this.value ?? this._calendar.activeDate;\n }\n\n protected override _clearEditors(): void {\n this._input?.clear();\n }\n\n protected override _valueFromCalendarSelection(dates: Date[]): Date | null {\n return firstOf(dates) ?? null;\n }\n\n /**\n * A committed edit in the input already emits `igcChange` on its own, so only a\n * value which the picker itself has changed is left to notify about here.\n */\n protected override _onBlur(): void {\n if (this._isEditorReadOnly) {\n this._emitChangeIfDirty();\n }\n }\n\n protected override _onDialogClosing(): void {\n this._oldValue = this.value;\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the picker.\n *\n * Only ever holds a committed value. While the user is typing in the input, the\n * intermediate state stays in the editor and is committed - together with an\n * `igcChange` event - when the edit is committed on blur. Use the `igcInput` event\n * to observe the value as it is being typed.\n *\n * @attr\n */\n @property({ converter: convertToDate })\n public set value(value: Date | string | null | undefined) {\n this._formValue.setValueAndFormState(value as Date | null);\n }\n\n public get value(): Date | null {\n return this._formValue.value;\n }\n\n /**\n * The placeholder text of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(\n value: IgcCalendarResourceStrings | DatePickerResourceStringsType\n ) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IgcCalendarResourceStrings &\n DatePickerResourceStringsType {\n return this._i18nController.resourceStrings;\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected _handleInputChangeEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._setTouchedState();\n this.value = (event.target as IgcDateTimeInputComponent).value!;\n this.emitEvent('igcChange', { detail: this.value });\n }\n\n protected _handleInputEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._setTouchedState();\n\n if (this.nonEditable) {\n event.preventDefault();\n return;\n }\n\n const draft = (event.target as IgcDateTimeInputComponent)._uncommittedValue;\n\n this._calendar.activeDate = draft ?? this._calendar.activeDate;\n this.emitEvent('igcInput', { detail: draft });\n }\n\n //#endregion\n\n //#region Form associated overrides\n\n protected override formResetCallback(): void {\n super.formResetCallback();\n\n // The inner editor is not associated with the outer form (shadow\n // boundary), so the browser never resets it. Since it runs its own\n // constraint validation against the forwarded `required`/`min`/`max`,\n // a touched editor would otherwise keep its invalid styles after the\n // form reset.\n this._input?.['formResetCallback']();\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Increments the passed in date part */\n public stepUp(datePart?: DatePart, delta?: number): void {\n this._input.stepUp(datePart, delta);\n }\n\n /** Decrements the passed in date part */\n public stepDown(datePart?: DatePart, delta?: number): void {\n this._input.stepDown(datePart, delta);\n }\n\n /** Selects the text in the input of the component */\n public select(): void {\n this._input.select();\n }\n\n /* blazorSuppress */\n /** Sets the text selection range in the input of the component */\n public setSelectionRange(\n start: number,\n end: number,\n direction?: SelectionRangeDirection\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /* blazorSuppress */\n /* Replaces the selected text in the input and re-applies the mask */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n mode?: RangeTextSelectMode\n ): void {\n this._input.setRangeText(replacement, start, end, mode);\n this.value = this._input.value;\n }\n\n //#endregion\n\n //#region Render methods\n\n private _renderLabel(id: string) {\n const isDisabled = this._isDropDown || this.readOnly;\n\n return this.label\n ? html`\n <label\n part=\"label\"\n for=${id}\n @click=${bindIf(!isDisabled, this._handleAnchorClick)}\n >\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderInput(id: string) {\n const format = getDateTimeFormat(this._displayFormat);\n const hasClickHandler = !(this._isDropDown || this.readOnly);\n\n return html`\n <igc-date-time-input\n id=${id}\n label=${bindIf(this._isMaterial, this.label)}\n input-format=${ifDefined(this._inputFormat)}\n display-format=${ifDefined(format)}\n ?disabled=${this.disabled}\n ?readonly=${this._isEditorReadOnly}\n ?required=${this.required}\n .value=${this.value}\n .locale=${this.locale}\n .prompt=${this.prompt}\n .outlined=${this.outlined}\n .placeholder=${this.placeholder}\n .min=${this.min}\n .max=${this.max}\n .invalid=${this.invalid}\n @igcChange=${this._handleInputChangeEvent}\n @igcInput=${this._handleInputEvent}\n @keydown=${this._handleEnterKeydown}\n @click=${bindIf(hasClickHandler, this._handleInputClick)}\n exportparts=\"input, label, prefix, suffix\"\n >\n ${this._renderEditorSlots()}\n </igc-date-time-input>\n `;\n }\n\n protected override render(): TemplateResult {\n const id = this.id || this._inputId;\n\n return html`\n ${this._isMaterial ? nothing : this._renderLabel(id)}\n ${this._renderInput(id)} ${this._renderPicker(id)}\n ${this._renderHelperText()}\n `;\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-date-picker': IgcDatePickerComponent;\n }\n}\n"]}
1
+ {"version":3,"file":"date-picker.js","sourceRoot":"","sources":["../../../src/components/date-picker/date-picker.ts"],"names":[],"mappings":";;;;;;;AAAA,OAAO,EACL,yBAAyB,EACzB,2BAA2B,GAG5B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,IAAI,EAAE,OAAO,EAAuB,MAAM,KAAK,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EAAE,aAAa,EAAE,MAAM,yCAAyC,CAAC;AACxE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAEvE,OAAO,EACL,iBAAiB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B,IAAI,CAAC,GAAG;eACR,IAAI,CAAC,GAAG;mBACJ,IAAI,CAAC,OAAO;qBACV,IAAI,CAAC,uBAAuB;oBAC7B,IAAI,CAAC,iBAAiB;mBACvB,IAAI,CAAC,mBAAmB;iBAC1B,MAAM,CAAC,eAAe,EAAE,IAAI,CAAC,iBAAiB,CAAC;;;UAGtD,IAAI,CAAC,kBAAkB,EAAE;;KAE9B,CAAC;IACJ,CAAC;IAEkB,MAAM;QACvB,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,IAAI,IAAI,CAAC,QAAQ,CAAC;QAEpC,OAAO,IAAI,CAAA;QACP,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC;QAClD,IAAI,CAAC,YAAY,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,aAAa,CAAC,EAAE,CAAC;QAC/C,IAAI,CAAC,0BAA0B,EAAE;KACpC,CAAC;IACJ,CAAC;;AAtRgB;IADhB,KAAK,CAAC,yBAAyB,CAAC,OAAO,CAAC;sDACW;AAuGpD;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC;mDAGtC;AAWM;IADN,QAAQ,EAAE;2DACiB;AAM5B;IADC,QAAQ,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;6DAK9B;AA/KkB,sBAAsB;IAJ1C,4BAA4B,CAC3B,uFAAuF,CACxF;IACA,aAAa,CAAC,EAAE,cAAc,EAAE,IAAI,EAAE,CAAC;GACnB,sBAAsB,CA0U1C;eA1UoB,sBAAsB","sourcesContent":["import {\n CalendarResourceStringsEN,\n DatePickerResourceStringsEN,\n type ICalendarResourceStrings,\n type IDatePickerResourceStrings,\n} from 'igniteui-i18n-core';\nimport { html, nothing, type TemplateResult } from 'lit';\nimport { property, query } from 'lit/decorators.js';\nimport { ifDefined } from 'lit/directives/if-defined.js';\nimport { addSlotController, setSlots } from '#internals/controllers/slot.js';\nimport { convertToDate } from '#internals/date/converters.js';\nimport { blazorAdditionalDependencies } from '#internals/decorators/blazorAdditionalDependencies.js';\nimport { shadowOptions } from '#internals/decorators/shadow-options.js';\nimport { registerComponent } from '#internals/definitions/register.js';\nimport type { IgcCalendarResourceStrings } from '#internals/i18n/EN/calendar.resources.js';\nimport {\n addI18nController,\n getDateTimeFormat,\n} from '#internals/i18n/i18n-controller.js';\nimport type { AbstractConstructor } from '#internals/mixins/constructor.js';\nimport { EventEmitterMixin } from '#internals/mixins/event-emitter.js';\nimport { FormValueDateTimeTransformers } from '#internals/mixins/forms/form-transformers.js';\nimport { createFormValueState } from '#internals/mixins/forms/form-value.js';\nimport { firstOf } from '#internals/utils/arrays.js';\nimport { bindIf } from '#internals/utils/lit.js';\nimport { createIdGenerator } from '#internals/utils/strings.js';\nimport { addThemingController } from '#theming/theming-controller.js';\nimport type { CalendarSelection } from '../calendar/types.js';\nimport type { DatePart } from '../date-time-input/date-part.js';\nimport IgcDateTimeInputComponent from '../date-time-input/date-time-input.js';\nimport type { RangeTextSelectMode, SelectionRangeDirection } from '../types.js';\nimport {\n IgcDatePickerBaseComponent,\n type IgcPickerBaseEventMap,\n pickerDependencies,\n} from './date-picker.base.js';\nimport { styles } from './themes/date-picker.base.css.js';\nimport { styles as shared } from './themes/shared/date-picker.common.css.js';\nimport { all } from './themes/themes.js';\nimport { datePickerValidators } from './validators.js';\n\nexport type IgcDatePickerComponentEventMap = IgcPickerBaseEventMap<Date>;\n\nconst nextId = createIdGenerator('date-picker');\nconst Slots = setSlots(\n 'prefix',\n 'suffix',\n 'helper-text',\n 'bad-input',\n 'value-missing',\n 'range-overflow',\n 'range-underflow',\n 'custom-error',\n 'invalid',\n 'title',\n 'header-date',\n 'clear-icon',\n 'calendar-icon',\n 'calendar-icon-open',\n 'actions'\n);\ntype DatePickerResourceStringsType = IDatePickerResourceStrings &\n ICalendarResourceStrings;\n\n/* blazorIndirectRender */\n/* blazorSupportsVisualChildren */\n/**\n * The date picker is a feature rich component used for entering a date through manual text input or\n * choosing date values from a calendar dialog that pops up.\n *\n * @element igc-date-picker\n *\n * @slot prefix - Renders content before the input.\n * @slot suffix - Renders content after the input.\n * @slot helper-text - Renders content below the input.\n * @slot bad-input - Renders content when the value is in the disabledDates ranges.\n * @slot value-missing - Renders content when the required validation fails.\n * @slot range-overflow - Renders content when the max validation fails.\n * @slot range-underflow - Renders content when the min validation fails.\n * @slot custom-error - Renders content when setCustomValidity(message) is set.\n * @slot invalid - Renders content when the component is in invalid state (validity.valid = false).\n * @slot title - Renders content in the calendar title.\n * @slot header-date - Renders content instead of the current date/range in the calendar header.\n * @slot clear-icon - Renders a clear icon template.\n * @slot calendar-icon - Renders the icon/content for the calendar picker.\n * @slot calendar-icon-open - Renders the icon/content for the picker in open state.\n * @slot actions - Renders content in the action part of the picker in open state.\n *\n * @fires igcOpening - Emitted just before the calendar popover is shown.\n * @fires igcOpened - Emitted after the calendar popover is shown.\n * @fires igcClosing - Emitted just before the calendar popover is hidden.\n * @fires igcClosed - Emitted after the calendar popover is hidden.\n * @fires igcChange - Emitted when the user modifies and commits the elements's value.\n * @fires igcInput - Emitted when when the user types in the element.\n *\n * @csspart label - The label wrapper that renders content above the target input.\n * @csspart container - The main wrapper that holds all main input elements.\n * @csspart input - The native input element.\n * @csspart prefix - The prefix wrapper.\n * @csspart suffix - The suffix wrapper.\n * @csspart calendar-icon - The calendar icon wrapper for closed state.\n * @csspart calendar-icon-open - The calendar icon wrapper for opened state.\n * @csspart clear-icon - The clear icon wrapper.\n * @csspart actions - The actions wrapper.\n * @csspart helper-text - The helper-text wrapper that renders content below the target input.\n * @csspart header - The calendar header element.\n * @csspart header-title - The calendar header title element.\n * @csspart header-date - The calendar header date element.\n * @csspart calendar-content - The calendar content element which contains the views and navigation elements.\n * @csspart navigation - The calendar navigation container element.\n * @csspart months-navigation - The calendar months navigation button element.\n * @csspart years-navigation - The calendar years navigation button element.\n * @csspart years-range - The calendar years range element.\n * @csspart navigation-buttons - The calendar navigation buttons container.\n * @csspart navigation-button - The calendar previous/next navigation button.\n * @csspart days-view-container - The calendar days view container element.\n * @csspart days-view - The calendar days view element.\n * @csspart months-view - The calendar months view element.\n * @csspart years-view - The calendar years view element.\n * @csspart days-row - The calendar days row element.\n * @csspart calendar-label - The calendar week header label element.\n * @csspart week-number - The calendar week number element.\n * @csspart week-number-inner - The calendar week number inner element.\n * @csspart date - The calendar date element.\n * @csspart date-inner - The calendar date inner element.\n * @csspart first - The calendar first selected date element in range selection.\n * @csspart last - The calendar last selected date element in range selection.\n * @csspart inactive - The calendar inactive date element.\n * @csspart hidden - The calendar hidden date element.\n * @csspart weekend - The calendar weekend date element.\n * @csspart range - The calendar range selected element.\n * @csspart special - The calendar special date element.\n * @csspart disabled - The calendar disabled date element.\n * @csspart single - The calendar single selected date element.\n * @csspart preview - The calendar range selection preview date element.\n * @csspart month - The calendar month element.\n * @csspart month-inner - The calendar month inner element.\n * @csspart year - The calendar year element.\n * @csspart year-inner - The calendar year inner element.\n * @csspart selected - The calendar selected state for element(s). Applies to date, month and year elements.\n * @csspart current - The calendar current state for element(s). Applies to date, month and year elements.\n */\n@blazorAdditionalDependencies(\n 'IgcCalendarComponent, IgcDateTimeInputComponent, IgcDialogComponent, IgcIconComponent'\n)\n@shadowOptions({ delegatesFocus: true })\nexport default class IgcDatePickerComponent extends EventEmitterMixin<\n IgcDatePickerComponentEventMap,\n AbstractConstructor<IgcDatePickerBaseComponent<Date>>\n>(IgcDatePickerBaseComponent) {\n public static readonly tagName = 'igc-date-picker';\n public static styles = [styles, shared];\n\n /* blazorSuppress */\n public static register(): void {\n registerComponent(\n IgcDatePickerComponent,\n IgcDateTimeInputComponent,\n ...pickerDependencies\n );\n }\n\n //#region Private properties and state\n\n protected override get __validators() {\n return datePickerValidators;\n }\n\n protected override readonly _inputId = nextId();\n protected override readonly _themes = addThemingController(this, all);\n protected override readonly _slots = addSlotController(this, {\n slots: Slots,\n });\n\n /**\n * For now we use the core validation strings internally only, to avoid mixing with old resources by users.\n * To Do: Update resourceStrings type when the IgcCalendarResourceStrings is changed to ICalendarResourceStrings\n */\n protected override readonly _i18nController = addI18nController<\n IgcCalendarResourceStrings | DatePickerResourceStringsType\n >(this, {\n defaultEN: Object.assign(\n {},\n DatePickerResourceStringsEN,\n CalendarResourceStringsEN\n ),\n resourceMapName: 'date-picker',\n });\n\n protected override readonly _formValue = createFormValueState(this, {\n initialValue: null,\n transformers: FormValueDateTimeTransformers,\n });\n\n @query(IgcDateTimeInputComponent.tagName)\n private readonly _input!: IgcDateTimeInputComponent;\n\n //#endregion\n\n //#region Base class hooks\n\n protected override get _value(): Date | null {\n return this.value;\n }\n\n protected override set _value(value: Date | null) {\n this.value = value;\n }\n\n protected override get _hasValue(): boolean {\n return this.value !== null;\n }\n\n protected override get _calendarSelection(): CalendarSelection {\n return 'single';\n }\n\n protected override get _calendarValue(): Date | null {\n return this.value;\n }\n\n protected override get _selectDateLabel(): string | undefined {\n return this.resourceStrings.calendar_select_date;\n }\n\n protected override get _calendarIconTitle(): string | undefined {\n return this.value\n ? this.resourceStrings.date_picker_change_date\n : this.resourceStrings.date_picker_choose_date;\n }\n\n protected override get _dialogLabel(): string | undefined {\n return this._calendarIconTitle;\n }\n\n protected override get _defaultDisplayFormat(): string | undefined {\n return this._input?.displayFormat;\n }\n\n protected override get _defaultInputFormat(): string | undefined {\n return this._input?.inputFormat;\n }\n\n protected override get _projectionTarget() {\n return this._input ?? null;\n }\n\n protected override _focusInput(): void {\n this._input.focus();\n }\n\n protected override _focusAndSelectInput(): void {\n this._input.focus();\n this._input.select();\n }\n\n protected override _syncCalendarOnToggle(): void {\n this._setCalendarActiveDate(this.value);\n }\n\n protected override _clearEditors(): void {\n this._input?.clear();\n }\n\n protected override _valueFromCalendarSelection(dates: Date[]): Date | null {\n return firstOf(dates) ?? null;\n }\n\n /**\n * A committed edit in the input already emits `igcChange` on its own, so only a\n * value which the picker itself has changed is left to notify about here.\n */\n protected override _onBlur(): void {\n if (this._isEditorReadOnly) {\n this._emitChangeIfDirty();\n }\n }\n\n protected override _onDialogClosing(): void {\n this._oldValue = this.value;\n }\n\n //#endregion\n\n //#region Public properties and attributes\n\n /* @tsTwoWayProperty(true, \"igcChange\", \"detail\", false) */\n /**\n * The value of the picker.\n *\n * Only ever holds a committed value. While the user is typing in the input, the\n * intermediate state stays in the editor and is committed - together with an\n * `igcChange` event - when the edit is committed on blur. Use the `igcInput` event\n * to observe the value as it is being typed.\n *\n * @attr\n */\n @property({ converter: convertToDate })\n public set value(value: Date | string | null | undefined) {\n this._formValue.setValueAndFormState(value as Date | null);\n }\n\n public get value(): Date | null {\n return this._formValue.value;\n }\n\n /**\n * The placeholder text of the control.\n * @attr\n */\n @property()\n public placeholder!: string;\n\n /**\n * The resource strings for localization.\n */\n @property({ attribute: false })\n public set resourceStrings(\n value: IgcCalendarResourceStrings | DatePickerResourceStringsType\n ) {\n this._i18nController.resourceStrings = value;\n }\n\n public get resourceStrings(): IgcCalendarResourceStrings &\n DatePickerResourceStringsType {\n return this._i18nController.resourceStrings;\n }\n\n //#endregion\n\n //#region Event handlers\n\n protected _handleInputChangeEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._commitValue(\n (event.target as IgcDateTimeInputComponent).value,\n 'igcChange'\n );\n }\n\n protected _handleInputEvent(event: CustomEvent<Date>): void {\n event.stopPropagation();\n\n this._setTouchedState();\n\n if (this.nonEditable) {\n event.preventDefault();\n return;\n }\n\n const draft = (event.target as IgcDateTimeInputComponent)._uncommittedValue;\n\n this._calendar.activeDate = draft ?? this._calendar.activeDate;\n this.emitEvent('igcInput', { detail: draft });\n }\n\n //#endregion\n\n //#region Form associated overrides\n\n protected override formResetCallback(): void {\n super.formResetCallback();\n\n // The inner editor is not associated with the outer form (shadow\n // boundary), so the browser never resets it. Since it runs its own\n // constraint validation against the forwarded `required`/`min`/`max`,\n // a touched editor would otherwise keep its invalid styles after the\n // form reset.\n this._input?.['formResetCallback']();\n }\n\n //#endregion\n\n //#region Public methods\n\n /** Increments the passed in date part */\n public stepUp(datePart?: DatePart, delta?: number): void {\n this._input.stepUp(datePart, delta);\n }\n\n /** Decrements the passed in date part */\n public stepDown(datePart?: DatePart, delta?: number): void {\n this._input.stepDown(datePart, delta);\n }\n\n /** Selects the text in the input of the component */\n public select(): void {\n this._input.select();\n }\n\n /* blazorSuppress */\n /** Sets the text selection range in the input of the component */\n public setSelectionRange(\n start: number,\n end: number,\n direction?: SelectionRangeDirection\n ): void {\n this._input.setSelectionRange(start, end, direction);\n }\n\n /* blazorSuppress */\n /* Replaces the selected text in the input and re-applies the mask */\n public setRangeText(\n replacement: string,\n start: number,\n end: number,\n mode?: RangeTextSelectMode\n ): void {\n this._input.setRangeText(replacement, start, end, mode);\n this.value = this._input.value;\n }\n\n //#endregion\n\n //#region Render methods\n\n private _renderLabel(id: string) {\n const isDisabled = this._isDropDown || this.readOnly;\n\n return this.label\n ? html`\n <label\n part=\"label\"\n for=${id}\n @click=${bindIf(!isDisabled, this._handleAnchorClick)}\n >\n ${this.label}\n </label>\n `\n : nothing;\n }\n\n protected _renderInput(id: string) {\n const format = getDateTimeFormat(this._displayFormat);\n const hasClickHandler = !(this._isDropDown || this.readOnly);\n\n return html`\n <igc-date-time-input\n id=${id}\n label=${bindIf(this._isMaterial, this.label)}\n input-format=${ifDefined(this._inputFormat)}\n display-format=${ifDefined(format)}\n ?disabled=${this.disabled}\n ?readonly=${this._isEditorReadOnly}\n ?required=${this.required}\n .value=${this.value}\n .locale=${this.locale}\n .prompt=${this.prompt}\n .outlined=${this.outlined}\n .placeholder=${this.placeholder}\n .min=${this.min}\n .max=${this.max}\n .invalid=${this.invalid}\n @igcChange=${this._handleInputChangeEvent}\n @igcInput=${this._handleInputEvent}\n @keydown=${this._handleEnterKeydown}\n @click=${bindIf(hasClickHandler, this._handleInputClick)}\n exportparts=\"input, label, prefix, suffix\"\n >\n ${this._renderEditorSlots()}\n </igc-date-time-input>\n `;\n }\n\n protected override render(): TemplateResult {\n const id = this.id || this._inputId;\n\n return html`\n ${this._isMaterial ? nothing : this._renderLabel(id)}\n ${this._renderInput(id)} ${this._renderPicker(id)}\n ${this._renderValidationContainer()}\n `;\n }\n\n //#endregion\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'igc-date-picker': IgcDatePickerComponent;\n }\n}\n"]}
@@ -1,5 +1,4 @@
1
1
  import type { AbstractConstructor } from '#internals/mixins/constructor.js';
2
- import { type DatePartDeltas } from '../date-time-input/date-part.js';
3
2
  import { IgcDateTimeInputBaseComponent } from '../date-time-input/date-time-input.base.js';
4
3
  import type { DateRangeValue } from '../types.js';
5
4
  import { DateRangeMaskParser, type DateRangePart } from './date-range-mask-parser.js';
@@ -17,7 +16,6 @@ export default class IgcDateRangeInputComponent extends IgcDateRangeInputCompone
17
16
  protected readonly _formValue: import("#internals/mixins/forms/form-value.js").FormValue<DateRangeValue | null>;
18
17
  protected readonly _themes: import("#theming/theming-controller.js").ThemingController;
19
18
  protected readonly _parser: DateRangeMaskParser;
20
- protected get _datePartDeltas(): DatePartDeltas;
21
19
  /**
22
20
  * The value of the date range input.
23
21
  *
@@ -30,7 +28,7 @@ export default class IgcDateRangeInputComponent extends IgcDateRangeInputCompone
30
28
  set value(value: DateRangeValue | null);
31
29
  get value(): DateRangeValue | null;
32
30
  connectedCallback(): void;
33
- protected _handleFocus(): Promise<void>;
31
+ protected _isValueEmpty(): boolean;
34
32
  protected _setCurrentDateTime(): void;
35
33
  protected _calculatePartNavigationPosition(inputValue: string, direction: number): number;
36
34
  protected _performStep(datePart: unknown, delta: number | undefined, isDecrement: boolean): void;
@@ -48,7 +46,7 @@ export default class IgcDateRangeInputComponent extends IgcDateRangeInputCompone
48
46
  protected _getDefaultDatePart(): DateRangePart | undefined;
49
47
  protected _parseMask(strict: boolean): DateRangeValue | null;
50
48
  protected _formatValue(value: DateRangeValue | null): string;
51
- protected _applyMask(string: string): void;
49
+ protected _applyMask(formatString: string): void;
52
50
  /** Increments a date/time portion. */
53
51
  stepUp(datePart?: DateRangePart, delta?: number): void;
54
52
  /** Decrements a date/time portion. */