@odx/angular 2.6.0 → 2.7.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 (179) hide show
  1. package/CHANGELOG.md +45 -0
  2. package/cdk/autocomplete-control/index.d.ts +0 -1
  3. package/cdk/autocomplete-control/lib/autocomplete-control.d.ts +2 -3
  4. package/cdk/autocomplete-control/lib/pipes/base-search-filter-pipe.d.ts +15 -7
  5. package/cdk/custom-form-control/index.d.ts +1 -0
  6. package/cdk/{autocomplete-control/lib/abstract/base-search-field.directive.d.ts → custom-form-control/lib/input-control.directive.d.ts} +3 -3
  7. package/charts-config/lib/charts-theme.directive.d.ts +1 -1
  8. package/charts-config/lib/charts-theme.service.d.ts +3 -3
  9. package/components/autocomplete/lib/autocomplete.component.d.ts +2 -2
  10. package/components/autocomplete/lib/autocomplete.module.d.ts +2 -2
  11. package/components/autocomplete/lib/directives/autocomplete-input-control.directive.d.ts +9 -0
  12. package/components/autocomplete/lib/directives/index.d.ts +1 -1
  13. package/components/autocomplete/lib/pipes/autocomplete-search-filter.pipe.d.ts +4 -9
  14. package/components/calendar/README.md +3 -0
  15. package/components/calendar/index.d.ts +5 -0
  16. package/components/calendar/lib/calendar.component.d.ts +18 -0
  17. package/components/calendar/lib/calendar.config.d.ts +100 -0
  18. package/components/calendar/lib/components/calendar-header/calendar-header.component.d.ts +27 -0
  19. package/components/calendar/lib/components/calendar-header/index.d.ts +1 -0
  20. package/components/calendar/lib/components/calendar-month/calendar-month.component.d.ts +21 -0
  21. package/components/calendar/lib/components/calendar-month/index.d.ts +1 -0
  22. package/components/calendar/lib/components/calendar-year/calendar-year.component.d.ts +18 -0
  23. package/components/calendar/lib/components/calendar-year/index.d.ts +1 -0
  24. package/components/calendar/lib/components/calendar-years/calendar-years.component.d.ts +20 -0
  25. package/components/calendar/lib/components/calendar-years/index.d.ts +1 -0
  26. package/components/calendar/lib/components/index.d.ts +4 -0
  27. package/components/calendar/lib/directives/calendar-cell.directive.d.ts +34 -0
  28. package/components/calendar/lib/directives/calendar-view.directive.d.ts +29 -0
  29. package/components/calendar/lib/directives/index.d.ts +2 -0
  30. package/components/calendar/lib/enums/calendar-view.enum.d.ts +5 -0
  31. package/components/calendar/lib/enums/index.d.ts +1 -0
  32. package/components/calendar/lib/models/date-filter.d.ts +1 -0
  33. package/components/calendar/lib/models/date-type.d.ts +1 -0
  34. package/components/calendar/lib/models/date-validator.d.ts +1 -0
  35. package/components/calendar/lib/models/index.d.ts +3 -0
  36. package/components/calendar/lib/pipes/date-label.pipe.d.ts +18 -0
  37. package/components/calendar/lib/pipes/index.d.ts +1 -0
  38. package/components/calendar/lib/services/calendar-month.service.d.ts +13 -0
  39. package/components/calendar/lib/services/calendar-year.service.d.ts +11 -0
  40. package/components/calendar/lib/services/calendar-years.service.d.ts +9 -0
  41. package/components/calendar/lib/services/calendar.service.d.ts +25 -0
  42. package/components/calendar/lib/services/index.d.ts +4 -0
  43. package/components/calendar/lib/utils/check-identical-date.d.ts +2 -0
  44. package/components/calendar/lib/utils/get-A11y-label.d.ts +3 -0
  45. package/components/calendar/lib/utils/index.d.ts +7 -0
  46. package/components/calendar/lib/utils/parse-date.d.ts +2 -0
  47. package/components/calendar/lib/utils/validate-max-date.d.ts +2 -0
  48. package/components/calendar/lib/utils/validate-min-date.d.ts +2 -0
  49. package/components/calendar/lib/utils/validate-next-date-set.d.ts +2 -0
  50. package/components/calendar/lib/utils/validate-previous-date-set.d.ts +2 -0
  51. package/components/datepicker/README.md +3 -0
  52. package/components/datepicker/index.d.ts +5 -0
  53. package/components/datepicker/lib/datepicker.component.d.ts +37 -0
  54. package/components/datepicker/lib/datepicker.config.d.ts +29 -0
  55. package/components/datepicker/lib/datepicker.module.d.ts +9 -0
  56. package/components/datepicker/lib/directives/datepicker-input-control.directive.d.ts +24 -0
  57. package/components/datepicker/lib/directives/index.d.ts +1 -0
  58. package/components/datepicker/lib/models/datepicker-input-date-order.d.ts +6 -0
  59. package/components/datepicker/lib/models/datepicker-input-pattern.d.ts +11 -0
  60. package/components/datepicker/lib/models/index.d.ts +2 -0
  61. package/components/datepicker/lib/utils/get-datepicker-input-pattern.d.ts +3 -0
  62. package/components/datepicker/lib/utils/get-datepicker-input-value-as-date.d.ts +2 -0
  63. package/components/datepicker/lib/utils/index.d.ts +2 -0
  64. package/components/select/lib/directives/index.d.ts +1 -1
  65. package/components/select/lib/directives/select-input-control.directive.d.ts +9 -0
  66. package/components/select/lib/pipes/select-search-filter.pipe.d.ts +3 -9
  67. package/components/select/lib/select.component.d.ts +2 -2
  68. package/components/select/lib/select.module.d.ts +2 -2
  69. package/esm2020/cdk/autocomplete-control/index.mjs +1 -2
  70. package/esm2020/cdk/autocomplete-control/lib/autocomplete-control.mjs +1 -1
  71. package/esm2020/cdk/autocomplete-control/lib/pipes/base-search-filter-pipe.mjs +15 -4
  72. package/esm2020/cdk/custom-form-control/index.mjs +2 -1
  73. package/esm2020/cdk/custom-form-control/lib/input-control.directive.mjs +35 -0
  74. package/esm2020/charts-config/lib/charts-theme.directive.mjs +5 -5
  75. package/esm2020/charts-config/lib/charts-theme.module.mjs +4 -4
  76. package/esm2020/charts-config/lib/charts-theme.service.mjs +5 -5
  77. package/esm2020/components/autocomplete/lib/autocomplete.component.mjs +13 -6
  78. package/esm2020/components/autocomplete/lib/autocomplete.module.mjs +4 -4
  79. package/esm2020/components/autocomplete/lib/directives/autocomplete-input-control.directive.mjs +32 -0
  80. package/esm2020/components/autocomplete/lib/directives/index.mjs +2 -2
  81. package/esm2020/components/autocomplete/lib/pipes/autocomplete-search-filter.pipe.mjs +2 -16
  82. package/esm2020/components/calendar/index.mjs +6 -0
  83. package/esm2020/components/calendar/lib/calendar.component.mjs +57 -0
  84. package/esm2020/components/calendar/lib/calendar.config.mjs +15 -0
  85. package/esm2020/components/calendar/lib/components/calendar-header/calendar-header.component.mjs +51 -0
  86. package/esm2020/components/calendar/lib/components/calendar-header/index.mjs +2 -0
  87. package/esm2020/components/calendar/lib/components/calendar-month/calendar-month.component.mjs +59 -0
  88. package/esm2020/components/calendar/lib/components/calendar-month/index.mjs +2 -0
  89. package/esm2020/components/calendar/lib/components/calendar-year/calendar-year.component.mjs +57 -0
  90. package/esm2020/components/calendar/lib/components/calendar-year/index.mjs +2 -0
  91. package/esm2020/components/calendar/lib/components/calendar-years/calendar-years.component.mjs +65 -0
  92. package/esm2020/components/calendar/lib/components/calendar-years/index.mjs +2 -0
  93. package/esm2020/components/calendar/lib/components/index.mjs +5 -0
  94. package/esm2020/components/calendar/lib/directives/calendar-cell.directive.mjs +92 -0
  95. package/esm2020/components/calendar/lib/directives/calendar-view.directive.mjs +39 -0
  96. package/esm2020/components/calendar/lib/directives/index.mjs +3 -0
  97. package/esm2020/components/calendar/lib/enums/calendar-view.enum.mjs +7 -0
  98. package/esm2020/components/calendar/lib/enums/index.mjs +2 -0
  99. package/esm2020/components/calendar/lib/models/date-filter.mjs +2 -0
  100. package/esm2020/components/calendar/lib/models/date-type.mjs +2 -0
  101. package/esm2020/components/calendar/lib/models/date-validator.mjs +2 -0
  102. package/esm2020/components/calendar/lib/models/index.mjs +4 -0
  103. package/esm2020/components/calendar/lib/pipes/date-label.pipe.mjs +25 -0
  104. package/esm2020/components/calendar/lib/pipes/index.mjs +2 -0
  105. package/esm2020/components/calendar/lib/services/calendar-month.service.mjs +38 -0
  106. package/esm2020/components/calendar/lib/services/calendar-year.service.mjs +31 -0
  107. package/esm2020/components/calendar/lib/services/calendar-years.service.mjs +33 -0
  108. package/esm2020/components/calendar/lib/services/calendar.service.mjs +74 -0
  109. package/esm2020/components/calendar/lib/services/index.mjs +5 -0
  110. package/esm2020/components/calendar/lib/utils/check-identical-date.mjs +11 -0
  111. package/esm2020/components/calendar/lib/utils/get-A11y-label.mjs +10 -0
  112. package/esm2020/components/calendar/lib/utils/index.mjs +8 -0
  113. package/esm2020/components/calendar/lib/utils/parse-date.mjs +15 -0
  114. package/esm2020/components/calendar/lib/utils/validate-max-date.mjs +11 -0
  115. package/esm2020/components/calendar/lib/utils/validate-min-date.mjs +11 -0
  116. package/esm2020/components/calendar/lib/utils/validate-next-date-set.mjs +12 -0
  117. package/esm2020/components/calendar/lib/utils/validate-previous-date-set.mjs +12 -0
  118. package/esm2020/components/calendar/odx-angular-components-calendar.mjs +5 -0
  119. package/esm2020/components/datepicker/index.mjs +6 -0
  120. package/esm2020/components/datepicker/lib/datepicker.component.mjs +118 -0
  121. package/esm2020/components/datepicker/lib/datepicker.config.mjs +7 -0
  122. package/esm2020/components/datepicker/lib/datepicker.module.mjs +19 -0
  123. package/esm2020/components/datepicker/lib/directives/datepicker-input-control.directive.mjs +60 -0
  124. package/esm2020/components/datepicker/lib/directives/index.mjs +2 -0
  125. package/esm2020/components/datepicker/lib/models/datepicker-input-date-order.mjs +6 -0
  126. package/esm2020/components/datepicker/lib/models/datepicker-input-pattern.mjs +11 -0
  127. package/esm2020/components/datepicker/lib/models/index.mjs +3 -0
  128. package/esm2020/components/datepicker/lib/utils/get-datepicker-input-pattern.mjs +16 -0
  129. package/esm2020/components/datepicker/lib/utils/get-datepicker-input-value-as-date.mjs +30 -0
  130. package/esm2020/components/datepicker/lib/utils/index.mjs +3 -0
  131. package/esm2020/components/datepicker/odx-angular-components-datepicker.mjs +5 -0
  132. package/esm2020/components/select/lib/components/select-option/select-option.component.mjs +3 -3
  133. package/esm2020/components/select/lib/directives/index.mjs +2 -2
  134. package/esm2020/components/select/lib/directives/select-input-control.directive.mjs +35 -0
  135. package/esm2020/components/select/lib/pipes/select-search-filter.pipe.mjs +2 -16
  136. package/esm2020/components/select/lib/select.component.mjs +15 -7
  137. package/esm2020/components/select/lib/select.module.mjs +4 -4
  138. package/esm2020/utils/lib/helpers/index.mjs +2 -2
  139. package/fesm2015/odx-angular-cdk-autocomplete-control.mjs +19 -41
  140. package/fesm2015/odx-angular-cdk-autocomplete-control.mjs.map +1 -1
  141. package/fesm2015/odx-angular-cdk-custom-form-control.mjs +34 -2
  142. package/fesm2015/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  143. package/fesm2015/odx-angular-charts-config.mjs +10 -10
  144. package/fesm2015/odx-angular-charts-config.mjs.map +1 -1
  145. package/fesm2015/odx-angular-components-autocomplete.mjs +23 -27
  146. package/fesm2015/odx-angular-components-autocomplete.mjs.map +1 -1
  147. package/fesm2015/odx-angular-components-calendar.mjs +623 -0
  148. package/fesm2015/odx-angular-components-calendar.mjs.map +1 -0
  149. package/fesm2015/odx-angular-components-datepicker.mjs +249 -0
  150. package/fesm2015/odx-angular-components-datepicker.mjs.map +1 -0
  151. package/fesm2015/odx-angular-components-select.mjs +22 -28
  152. package/fesm2015/odx-angular-components-select.mjs.map +1 -1
  153. package/fesm2015/odx-angular-utils.mjs +21 -21
  154. package/fesm2015/odx-angular-utils.mjs.map +1 -1
  155. package/fesm2020/odx-angular-cdk-autocomplete-control.mjs +17 -41
  156. package/fesm2020/odx-angular-cdk-autocomplete-control.mjs.map +1 -1
  157. package/fesm2020/odx-angular-cdk-custom-form-control.mjs +34 -2
  158. package/fesm2020/odx-angular-cdk-custom-form-control.mjs.map +1 -1
  159. package/fesm2020/odx-angular-charts-config.mjs +10 -10
  160. package/fesm2020/odx-angular-charts-config.mjs.map +1 -1
  161. package/fesm2020/odx-angular-components-autocomplete.mjs +23 -25
  162. package/fesm2020/odx-angular-components-autocomplete.mjs.map +1 -1
  163. package/fesm2020/odx-angular-components-calendar.mjs +621 -0
  164. package/fesm2020/odx-angular-components-calendar.mjs.map +1 -0
  165. package/fesm2020/odx-angular-components-datepicker.mjs +249 -0
  166. package/fesm2020/odx-angular-components-datepicker.mjs.map +1 -0
  167. package/fesm2020/odx-angular-components-select.mjs +22 -26
  168. package/fesm2020/odx-angular-components-select.mjs.map +1 -1
  169. package/fesm2020/odx-angular-utils.mjs +21 -21
  170. package/fesm2020/odx-angular-utils.mjs.map +1 -1
  171. package/package.json +21 -3
  172. package/utils/lib/helpers/index.d.ts +1 -1
  173. package/cdk/autocomplete-control/lib/abstract/index.d.ts +0 -1
  174. package/components/autocomplete/lib/directives/autocomplete-search-field.directive.d.ts +0 -9
  175. package/components/select/lib/directives/select-search-field.directive.d.ts +0 -9
  176. package/esm2020/cdk/autocomplete-control/lib/abstract/base-search-field.directive.mjs +0 -38
  177. package/esm2020/cdk/autocomplete-control/lib/abstract/index.mjs +0 -2
  178. package/esm2020/components/autocomplete/lib/directives/autocomplete-search-field.directive.mjs +0 -26
  179. package/esm2020/components/select/lib/directives/select-search-field.directive.mjs +0 -35
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odx-angular-components-calendar.mjs","sources":["../../../../libs/angular/components/calendar/src/lib/calendar.config.ts","../../../../libs/angular/components/calendar/src/lib/enums/calendar-view.enum.ts","../../../../libs/angular/components/calendar/src/lib/utils/check-identical-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/get-A11y-label.ts","../../../../libs/angular/components/calendar/src/lib/utils/parse-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-max-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-min-date.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-next-date-set.ts","../../../../libs/angular/components/calendar/src/lib/utils/validate-previous-date-set.ts","../../../../libs/angular/components/calendar/src/lib/services/calendar.service.ts","../../../../libs/angular/components/calendar/src/lib/services/calendar-month.service.ts","../../../../libs/angular/components/calendar/src/lib/services/calendar-year.service.ts","../../../../libs/angular/components/calendar/src/lib/services/calendar-years.service.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-header/calendar-header.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-header/calendar-header.component.html","../../../../libs/angular/components/calendar/src/lib/pipes/date-label.pipe.ts","../../../../libs/angular/components/calendar/src/lib/directives/calendar-cell.directive.ts","../../../../libs/angular/components/calendar/src/lib/directives/calendar-view.directive.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-month/calendar-month.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-month/calendar-month.component.html","../../../../libs/angular/components/calendar/src/lib/components/calendar-year/calendar-year.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-year/calendar-year.component.html","../../../../libs/angular/components/calendar/src/lib/components/calendar-years/calendar-years.component.ts","../../../../libs/angular/components/calendar/src/lib/components/calendar-years/calendar-years.component.html","../../../../libs/angular/components/calendar/src/lib/calendar.component.ts","../../../../libs/angular/components/calendar/src/lib/calendar.component.html","../../../../libs/angular/components/calendar/src/odx-angular-components-calendar.ts"],"sourcesContent":["import { createConfigTokens } from '@odx/angular/utils';\nimport { Locale } from 'date-fns';\nimport { enGB } from 'date-fns/locale';\nimport { BehaviorSubject } from 'rxjs';\n\nexport interface CalendarConfig {\n /**\n * Pattern by which month-year label is transformed\n * @default 'LLLL yyyy'\n */\n monthYearLabel: string;\n /**\n * Pattern by which month label is transformed\n * @default 'LLL'\n */\n monthLabel: string;\n /**\n * Pattern by which week label is transformed\n * @default 'EEEEE'\n */\n weekLabel: string;\n /**\n * Pattern by which day label is transformed\n * @default 'd'\n */\n dayLabel: string;\n /**\n * Pattern by which Year label is transformed\n * @default 'yyyy'\n */\n yearLabel: string;\n /**\n * Pattern by which A11y day label is transformed\n * @default 'MMMM dd, yyyy'\n */\n dayA11yLabel: string;\n /**\n * Pattern by which A11y month label is transformed\n * @default 'MMMM, yyyy'\n */\n monthA11yLabel: string;\n /**\n * Pattern by which A11y year label is transformed\n * @default 'yyyy'\n */\n yearA11yLabel: string;\n /**\n * Locale by which calendar labels are transformed\n * @default enGB\n */\n locale: BehaviorSubject<Locale>;\n}\n\nexport const { CalendarConfig, CalendarDefaultConfig, injectCalendarConfig, provideCalendarConfig } = createConfigTokens(\n 'Calendar',\n '@odx/angular/components/calendar',\n {\n monthYearLabel: 'LLLL yyyy',\n monthLabel: 'LLL',\n weekLabel: 'EEEEE',\n dayLabel: 'd',\n yearLabel: 'yyyy',\n dayA11yLabel: 'MMMM dd, yyyy',\n monthA11yLabel: 'MMMM, yyyy',\n yearA11yLabel: 'yyyy',\n locale: new BehaviorSubject<Locale>(enGB),\n },\n);\n","export enum CalendarViewEnum {\n Month = 'month',\n Year = 'year',\n Years = 'years',\n}\n","import { isSameDay, isSameMonth, isSameYear } from 'date-fns';\nimport { CalendarViewEnum } from '../enums';\nimport { DateValidator } from '../models';\n\nconst functionList: Record<CalendarViewEnum, DateValidator> = {\n [CalendarViewEnum.Month]: (currentDate: Date, date: Date) => isSameDay(currentDate, date),\n [CalendarViewEnum.Year]: (currentDate: Date, date: Date) => isSameMonth(currentDate, date),\n [CalendarViewEnum.Years]: (currentDate: Date, date: Date) => isSameYear(currentDate, date),\n};\n\nexport function checkIdenticalDate(currentDate: Date, date: Date, calendarView: CalendarViewEnum): boolean {\n return functionList[calendarView](currentDate, date);\n}\n","import { CalendarConfig } from '../calendar.config';\nimport { CalendarViewEnum } from '../enums';\n\nconst functionList: Record<CalendarViewEnum, (config: CalendarConfig) => string> = {\n [CalendarViewEnum.Month]: (config: CalendarConfig) => config.dayA11yLabel,\n [CalendarViewEnum.Year]: (config: CalendarConfig) => config.monthA11yLabel,\n [CalendarViewEnum.Years]: (config: CalendarConfig) => config.yearA11yLabel,\n};\n\nexport function getA11yLabel(calendarView: CalendarViewEnum, config: CalendarConfig): string {\n return functionList[calendarView](config);\n}\n","import { isString } from '@odx/angular/utils';\nimport { isValid, toDate } from 'date-fns';\nimport { DateType } from '../models';\n\nexport function parseDate(value: DateType): Date {\n try {\n const timestamp = isString(value) ? Date.parse(value) : value;\n\n if (!isValid(timestamp)) {\n return new Date();\n }\n\n return toDate(timestamp);\n } catch {\n return new Date();\n }\n}\n","import { endOfDay, endOfMonth, endOfYear } from 'date-fns';\nimport { CalendarViewEnum } from '../enums';\nimport { DateValidator } from '../models';\n\nconst functionList: Record<CalendarViewEnum, DateValidator> = {\n [CalendarViewEnum.Month]: (maxDate: Date, date: Date) => endOfDay(maxDate) < endOfDay(date),\n [CalendarViewEnum.Year]: (maxDate: Date, date: Date) => endOfMonth(maxDate) < endOfMonth(date),\n [CalendarViewEnum.Years]: (maxDate: Date, date: Date) => endOfYear(maxDate) < endOfYear(date),\n};\n\nexport function validateMaxDate(maxDate: Date, date: Date, calendarView: CalendarViewEnum): boolean {\n return functionList[calendarView](maxDate, date);\n}\n","import { startOfDay, startOfMonth, startOfYear } from 'date-fns';\nimport { CalendarViewEnum } from '../enums';\nimport { DateValidator } from '../models';\n\nconst functionList: Record<CalendarViewEnum, DateValidator> = {\n [CalendarViewEnum.Month]: (minDate: Date, date: Date) => startOfDay(minDate) > startOfDay(date),\n [CalendarViewEnum.Year]: (minDate: Date, date: Date) => startOfMonth(minDate) > startOfMonth(date),\n [CalendarViewEnum.Years]: (minDate: Date, date: Date) => startOfYear(minDate) > startOfYear(date),\n};\n\nexport function validateMinDate(maxDate: Date, date: Date, calendarView: CalendarViewEnum): boolean {\n return functionList[calendarView](maxDate, date);\n}\n","import { addMonths, startOfMonth, startOfYear } from 'date-fns';\nimport { CalendarViewEnum } from '../enums';\nimport { DateValidator } from '../models';\n\nconst functionList: Record<CalendarViewEnum, DateValidator> = {\n [CalendarViewEnum.Month]: (maxDate: Date, date: Date) => maxDate < startOfMonth(addMonths(date, 1)),\n [CalendarViewEnum.Year]: (maxDate: Date, date: Date) => maxDate < startOfYear(addMonths(date, 12)),\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [CalendarViewEnum.Years]: (maxDate: Date, date: Date) => false,\n};\n\nexport function validateNextDateSet(maxDate: Date, date: Date, calendarView: CalendarViewEnum): boolean {\n return functionList[calendarView](maxDate, date);\n}\n","import { endOfMonth, endOfYear, subMonths } from 'date-fns';\nimport { CalendarViewEnum } from '../enums';\nimport { DateValidator } from '../models';\n\nconst functionList: Record<CalendarViewEnum, DateValidator> = {\n [CalendarViewEnum.Month]: (minDate: Date, date: Date) => minDate > endOfMonth(subMonths(date, 1)),\n [CalendarViewEnum.Year]: (minDate: Date, date: Date) => minDate > endOfYear(subMonths(date, 12)),\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n [CalendarViewEnum.Years]: () => false,\n};\n\nexport function validatePreviousDateSet(minDate: Date, date: Date, calendarView: CalendarViewEnum): boolean {\n return functionList[calendarView](minDate, date);\n}\n","import { Injectable } from '@angular/core';\nimport { isPresent, Pure } from '@odx/angular/utils';\nimport { startOfDay } from 'date-fns';\nimport { BehaviorSubject, shareReplay, tap } from 'rxjs';\nimport { CalendarViewEnum } from '../enums';\nimport { DateFilter, DateType } from '../models';\nimport { parseDate, validateMaxDate, validateMinDate, validateNextDateSet, validatePreviousDateSet } from '../utils';\n\n@Injectable()\nexport class CalendarService {\n private readonly calendarView$$ = new BehaviorSubject<CalendarViewEnum>(CalendarViewEnum.Month);\n private readonly activeDate$$ = new BehaviorSubject<Date>(startOfDay(new Date()));\n private readonly selectedDate$$ = new BehaviorSubject<Date | null>(null);\n\n public minDate: Date | null = null;\n public maxDate: Date | null = null;\n public filterFn?: DateFilter | null = null;\n\n public readonly calendarView$ = this.calendarView$$.pipe(shareReplay({ refCount: true }));\n\n public readonly activeDate$ = this.activeDate$$.pipe(shareReplay({ refCount: true }));\n public readonly selectedDate$ = this.selectedDate$$.pipe(\n tap((date) => isPresent(date) && this.setActiveDate(date)),\n shareReplay({ refCount: true }),\n );\n\n public setActiveDate(value: DateType | null): void {\n if (isPresent(value)) {\n this.activeDate$$.next(parseDate(value));\n }\n }\n\n public selectDate(value: DateType | null): void {\n if (isPresent(value)) {\n this.activeDate$$.next(parseDate(value));\n this.selectedDate$$.next(parseDate(value));\n } else {\n this.selectedDate$$.next(null);\n }\n }\n\n public get activeDate(): Date {\n return this.activeDate$$.getValue();\n }\n\n public get selectedDate(): Date | null {\n return this.selectedDate$$.getValue();\n }\n\n public changeView(view: CalendarViewEnum): void {\n this.calendarView$$.next(view);\n }\n\n public get calendarCurrentView(): CalendarViewEnum {\n return this.calendarView$$.getValue();\n }\n\n @Pure\n public isDateDisabled(date: Date): boolean {\n const minDate = this.minDate && validateMinDate(this.minDate, date, this.calendarCurrentView);\n const maxDate = this.maxDate && validateMaxDate(this.maxDate, date, this.calendarCurrentView);\n let isDateFiltered = false;\n\n if (this.calendarCurrentView === CalendarViewEnum.Month) {\n isDateFiltered = this.filterFn?.(date) ?? false;\n }\n\n return minDate || maxDate || isDateFiltered;\n }\n\n public isPreviousDateSetDisabled(): boolean {\n return this.minDate ? validatePreviousDateSet(this.minDate, this.activeDate, this.calendarCurrentView) : false;\n }\n\n public isNextDateSetDisabled(): boolean {\n return this.maxDate ? validateNextDateSet(this.maxDate, this.activeDate, this.calendarCurrentView) : false;\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { addDays, endOfMonth, endOfWeek, startOfMonth, startOfWeek } from 'date-fns';\nimport { map, Observable } from 'rxjs';\nimport { CalendarService } from './calendar.service';\n\n@Injectable()\nexport class CalendarMonthService {\n protected readonly calendar = inject(CalendarService);\n\n public readonly weekDays$: Observable<Date[]> = this.calendar.activeDate$.pipe(map((date) => this.generateWeekDays(date)));\n public readonly weeks$: Observable<Date[][]> = this.calendar.activeDate$.pipe(map((date) => this.generateWeeks(date)));\n\n public generateWeekDays(date: Date): Date[] {\n const firstWeekDay = startOfWeek(date, { weekStartsOn: 1 });\n\n return Array.from({ length: 7 }, (_, i) => addDays(firstWeekDay, i));\n }\n\n public generateWeeks(date: Date): Date[][] {\n const startOfTheSelectedMonth = startOfMonth(date);\n const endOfTheSelectedMonth = endOfMonth(date);\n const startDate = startOfWeek(startOfTheSelectedMonth, { weekStartsOn: 1 });\n const endDate = endOfWeek(endOfTheSelectedMonth);\n const allWeeks = [];\n\n let currentDate = startDate;\n while (currentDate <= endDate) {\n allWeeks.push(this.generateDaysForWeek(currentDate, date));\n currentDate = addDays(currentDate, 7);\n }\n\n return allWeeks;\n }\n\n public generateDaysForWeek(date: Date, currentDate: Date): Date[] {\n return Array.from({ length: 7 }).map((_, i) => addDays(date, i), currentDate);\n }\n}\n","import { inject, Injectable } from '@angular/core';\nimport { eachMonthOfInterval, endOfYear, startOfYear } from 'date-fns';\nimport { map, Observable } from 'rxjs';\nimport { CalendarService } from './calendar.service';\n\n@Injectable()\nexport class CalendarYearService {\n protected readonly calendar = inject(CalendarService);\n\n public readonly seasonSeparator = 3;\n\n public readonly seasons$: Observable<Date[][]> = this.calendar.activeDate$.pipe(map((selectedDate) => this.generateSeasons(selectedDate)));\n\n public generateSeasons(date: Date): Date[][] {\n const seasons = [];\n const months = eachMonthOfInterval({\n start: startOfYear(date),\n end: endOfYear(date),\n });\n\n let index = 0;\n while (index < months.length) {\n seasons.push(months.slice(index, index + this.seasonSeparator));\n index += this.seasonSeparator;\n }\n\n return seasons;\n }\n}\n","import { Injectable } from '@angular/core';\nimport { addYears, getYear, setYear, startOfYear } from 'date-fns';\n\n@Injectable()\nexport class CalendarYearsService {\n public readonly yearsSeparator = 3;\n public readonly yearsLimit = 100;\n public readonly date = new Date();\n\n public get years(): Date[][] {\n const startDate = startOfYear(addYears(this.date, -this.yearsLimit));\n const startYear = getYear(startDate);\n const endDate = startOfYear(addYears(this.date, this.yearsLimit));\n const endYear = getYear(endDate);\n\n const years: Date[] = [];\n const yearRows: Date[][] = [];\n\n for (let i = startYear; i <= endYear; i++) {\n years.push(setYear(startDate, i));\n }\n\n let index = 0;\n while (index < years.length) {\n yearRows.push(years.slice(index, index + this.yearsSeparator));\n index += this.yearsSeparator;\n }\n\n return yearRows;\n }\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, inject, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { injectElement } from '@odx/angular/utils';\nimport { injectCalendarConfig } from '../../calendar.config';\nimport { CalendarService } from '../../services';\n\n@CSSComponent('calendar-header')\n@Component({\n selector: 'odx-calendar-header',\n standalone: true,\n imports: [CoreModule, ActionGroupComponent, ButtonComponent, IconComponent],\n templateUrl: './calendar-header.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n})\nexport class CalendarHeaderComponent {\n protected readonly calendar = inject(CalendarService);\n\n public readonly element = injectElement();\n\n @Output()\n public previous = new EventEmitter<Event>();\n\n @Output()\n public next = new EventEmitter<Event>();\n\n @Output()\n public changeView = new EventEmitter<null>();\n\n public readonly config = injectCalendarConfig();\n\n protected previousClicked(event: Event): void {\n !this.isPreviousDisabled && this.previous.emit(event);\n }\n\n protected nextClicked(event: Event): void {\n !this.isNextDisabled && this.next.emit(event);\n }\n\n protected get isPreviousDisabled(): boolean {\n return this.calendar.isPreviousDateSetDisabled();\n }\n\n protected get isNextDisabled(): boolean {\n return this.calendar.isNextDateSetDisabled();\n }\n}\n","<odx-action-group>\n <button odxButton (click)=\"previousClicked($event)\" [disabled]=\"isPreviousDisabled\">\n <odx-icon name=\"chevron-left\"></odx-icon>\n </button>\n\n <button class=\"odx-calendar-header__title\" odxButton (click)=\"changeView.emit()\">\n <ng-content></ng-content>\n </button>\n\n <button odxButton (click)=\"nextClicked($event)\" [disabled]=\"isNextDisabled\">\n <odx-icon name=\"chevron-right\"></odx-icon>\n </button>\n</odx-action-group>\n","import { Pipe, PipeTransform } from '@angular/core';\nimport { format } from 'date-fns';\nimport { injectCalendarConfig } from '../calendar.config';\n\n@Pipe({\n pure: false,\n name: 'odxDateLabel',\n standalone: true,\n})\nexport class DateLabelPipe implements PipeTransform {\n public readonly config = injectCalendarConfig();\n\n public transform(value: Date | null, dateFormat: string): string {\n if (!value) return '';\n\n return format(value, dateFormat, { locale: this.config.locale.getValue() });\n }\n}\n","import { Directive, inject, Input, OnChanges } from '@angular/core';\nimport { DisabledController } from '@odx/angular';\nimport { CSSComponent, CSSModifier } from '@odx/angular/internal';\nimport { deferFn, hasChanged, injectElement, NgChanges } from '@odx/angular/utils';\nimport { isSameMonth } from 'date-fns';\nimport { injectCalendarConfig } from '../calendar.config';\nimport { CalendarViewEnum } from '../enums';\nimport { DateLabelPipe } from '../pipes';\nimport { checkIdenticalDate, getA11yLabel } from '../utils';\n\n@CSSComponent('calendar-cell')\n@Directive({\n selector: '[odxCalendarCell]',\n standalone: true,\n providers: [DisabledController.connect(), DateLabelPipe],\n host: {\n '[class.is-disabled]': 'isDisabled',\n '[class.is-selected]': 'isSelected',\n '[tabindex]': 'isActive ? 0 : -1',\n '[attr.aria-label]': 'ariaLabel',\n '[attr.aria-disabled]': 'isDisabled',\n },\n})\nexport class CalendarCellDirective implements OnChanges {\n private readonly disabledController = DisabledController.inject();\n\n protected isActive = false;\n protected isSelected = false;\n\n @CSSModifier()\n protected isCurrent = false;\n\n @CSSModifier()\n protected adjacent = false;\n\n protected get isDisabled(): boolean {\n return !!this.disabledController?.disabled;\n }\n\n public readonly element = injectElement();\n public readonly dateLabelPipe = inject(DateLabelPipe);\n\n public readonly config = injectCalendarConfig();\n\n @Input('odxCalendarCell')\n public date!: Date;\n\n @Input('odxCalendarCellCalendarView')\n public calendarView: CalendarViewEnum = CalendarViewEnum.Month;\n\n @Input('odxCalendarCellActiveDate')\n public activeDate: Date | null = null;\n\n @Input('odxCalendarCellSelectedDate')\n public selectedDate: Date | null = null;\n\n public ngOnChanges(changes: NgChanges<CalendarCellDirective>): void {\n if (hasChanged(changes, ['date'], false)) {\n this.isCurrent = checkIdenticalDate(this.date, new Date(), this.calendarView);\n }\n\n if (this.activeDate && hasChanged(changes, ['date', 'activeDate'], false)) {\n this.isActive = checkIdenticalDate(this.date, this.activeDate, this.calendarView);\n\n if (this.calendarView === CalendarViewEnum.Month) {\n this.adjacent = !isSameMonth(this.date, this.activeDate);\n }\n }\n\n if (this.selectedDate && hasChanged(changes, ['date', 'selectedDate'], false)) {\n this.isSelected = checkIdenticalDate(this.date, this.selectedDate, this.calendarView);\n }\n\n if (this.isActive) {\n deferFn(() => this.element.nativeElement.focus());\n }\n }\n\n public get ariaLabel(): string {\n const dateFormat = getA11yLabel(this.calendarView, this.config);\n return this.dateLabelPipe.transform(this.date, dateFormat);\n }\n}\n","import { Directive, inject } from '@angular/core';\nimport { injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { injectCalendarConfig } from '../calendar.config';\nimport { CalendarViewEnum } from '../enums';\nimport { CalendarService } from '../services';\n\n@Directive({\n standalone: true,\n})\nexport abstract class CalendarViewDirective {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly calendar = inject(CalendarService);\n\n protected abstract readonly calendarNextView: CalendarViewEnum;\n\n protected abstract readonly calendarCurrentView: CalendarViewEnum;\n\n public readonly config = injectCalendarConfig();\n\n public readonly element = injectElement();\n\n public get activeDate(): Date {\n return this.calendar.activeDate;\n }\n\n public trackByIndex(index: number): number {\n return index;\n }\n\n public isDateDisabled(value: Date): boolean {\n return this.calendar.isDateDisabled(value);\n }\n\n public changeView(): void {\n this.calendar.changeView(this.calendarNextView);\n }\n\n public updateActiveDate(event: Event, date: Date): void {\n event.preventDefault();\n event.stopPropagation();\n\n this.calendar.setActiveDate(date);\n }\n\n protected abstract selectDate(event: Date): void;\n}\n","import { ChangeDetectionStrategy, Component, EventEmitter, inject, Output, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { addDays, addMonths, addWeeks, subDays, subMonths, subWeeks } from 'date-fns';\nimport { CalendarCellDirective, CalendarViewDirective } from '../../directives';\nimport { CalendarViewEnum } from '../../enums';\nimport { DateType } from '../../models';\nimport { DateLabelPipe } from '../../pipes';\nimport { CalendarMonthService } from '../../services';\nimport { CalendarHeaderComponent } from '../calendar-header';\n\n@CSSComponent('calendar-month')\n@Component({\n selector: 'odx-calendar-month',\n standalone: true,\n imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe],\n templateUrl: './calendar-month.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [CalendarMonthService],\n})\nexport class CalendarMonthComponent extends CalendarViewDirective {\n protected readonly calendarMonth = inject(CalendarMonthService);\n\n protected readonly calendarNextView = CalendarViewEnum.Years;\n protected readonly calendarCurrentView = CalendarViewEnum.Month;\n\n @Output()\n public selectedChange = new EventEmitter<DateType | null>();\n\n public previousDay(event: Event): void {\n this.updateActiveDate(event, subDays(this.activeDate, 1));\n }\n\n public nextDay(event: Event): void {\n this.updateActiveDate(event, addDays(this.activeDate, 1));\n }\n\n public previousWeek(event: Event): void {\n this.updateActiveDate(event, subWeeks(this.activeDate, 1));\n }\n\n public nextWeek(event: Event): void {\n this.updateActiveDate(event, addWeeks(this.activeDate, 1));\n }\n\n public previousMonth(event: Event): void {\n this.updateActiveDate(event, subMonths(this.activeDate, 1));\n }\n\n public nextMonth(event: Event): void {\n this.updateActiveDate(event, addMonths(this.activeDate, 1));\n }\n\n public selectDate(value: Date): void {\n if (this.isDateDisabled(value)) return;\n\n this.calendar.selectDate(value);\n this.selectedChange.emit(value);\n }\n}\n","<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"7\">\n <odx-calendar-header (previous)=\"previousMonth($event)\" (next)=\"nextMonth($event)\" (changeView)=\"changeView()\">\n {{ calendar.activeDate$ | async | odxDateLabel: config.monthYearLabel }}\n </odx-calendar-header>\n </th>\n </tr>\n\n <tr class=\"odx-calendar__weekdays\">\n <td *ngFor=\"let day of calendarMonth.weekDays$ | async\">\n {{ day | odxDateLabel: config.weekLabel }}\n </td>\n </tr>\n </thead>\n\n <tbody\n *ngIf=\"calendar.activeDate$ | async as activeDate\"\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousDay($event)\"\n (keydown.ArrowRight)=\"nextDay($event)\"\n (keydown.ArrowUp)=\"previousWeek($event)\"\n (keydown.ArrowDown)=\"nextWeek($event)\"\n (keydown.PageUp)=\"previousMonth($event)\"\n (keydown.PageDown)=\"nextMonth($event)\"\n >\n <tr *ngFor=\"let week of calendarMonth.weeks$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let day of week; let i = index; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(day)\"\n [odxCalendarCell]=\"day\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellSelectedDate]=\"calendar.selectedDate$ | async\"\n (click)=\"selectDate(day)\"\n >\n {{ day | odxDateLabel: config.dayLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n","import { ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { addMonths, getMonth, setMonth, subMonths } from 'date-fns';\nimport { CalendarCellDirective, CalendarViewDirective } from '../../directives';\nimport { CalendarViewEnum } from '../../enums';\nimport { DateLabelPipe } from '../../pipes';\nimport { CalendarYearService } from '../../services';\nimport { CalendarHeaderComponent } from '../calendar-header';\n\n@CSSComponent('calendar-year')\n@Component({\n selector: 'odx-calendar-year',\n standalone: true,\n imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe],\n templateUrl: './calendar-year.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [CalendarYearService],\n})\nexport class CalendarYearComponent extends CalendarViewDirective {\n protected readonly calendarYear = inject(CalendarYearService);\n\n protected readonly calendarNextView = CalendarViewEnum.Month;\n protected readonly calendarCurrentView = CalendarViewEnum.Year;\n\n public previousMonth(event: Event): void {\n this.updateActiveDate(event, subMonths(this.activeDate, 1));\n }\n\n public nextMonth(event: Event): void {\n this.updateActiveDate(event, addMonths(this.activeDate, 1));\n }\n\n public previousSeason(event: Event): void {\n this.updateActiveDate(event, subMonths(this.activeDate, 3));\n }\n\n public nextSeason(event: Event): void {\n this.updateActiveDate(event, addMonths(this.activeDate, 3));\n }\n\n public previousYear(event: Event): void {\n this.updateActiveDate(event, subMonths(this.activeDate, 12));\n }\n\n public nextYear(event: Event): void {\n this.updateActiveDate(event, addMonths(this.activeDate, 12));\n }\n\n public selectDate(value: Date): void {\n if (this.isDateDisabled(value)) return;\n\n const date = setMonth(this.calendar.activeDate, getMonth(value));\n this.calendar.selectDate(date);\n\n this.changeView();\n }\n}\n","<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead>\n <tr>\n <th colspan=\"3\">\n <odx-calendar-header (previous)=\"previousYear($event)\" (next)=\"nextYear($event)\" (changeView)=\"changeView()\">\n {{ calendar.activeDate$ | async | odxDateLabel: config.yearLabel }}\n </odx-calendar-header>\n </th>\n </tr>\n </thead>\n\n <tbody\n *ngIf=\"calendar.activeDate$ | async as activeDate\"\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousMonth($event)\"\n (keydown.ArrowRight)=\"nextMonth($event)\"\n (keydown.ArrowUp)=\"previousSeason($event)\"\n (keydown.ArrowDown)=\"nextSeason($event)\"\n (keydown.PageDown)=\"nextYear($event)\"\n (keydown.PageUp)=\"previousYear($event)\"\n >\n <tr class=\"odx-calendar__season\" *ngFor=\"let season of calendarYear.seasons$ | async; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let month of season; let i = index; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(month)\"\n [odxCalendarCell]=\"month\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellSelectedDate]=\"calendar.selectedDate$ | async\"\n [odxCalendarCellCalendarView]=\"calendarCurrentView\"\n (click)=\"selectDate(month)\"\n >\n {{ month | odxDateLabel: config.monthLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n","import { DOCUMENT } from '@angular/common';\nimport { AfterViewInit, ChangeDetectionStrategy, Component, inject, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, isFunction } from '@odx/angular/utils';\nimport { addMonths, getYear, setYear, subMonths } from 'date-fns';\nimport { CalendarCellDirective, CalendarViewDirective } from '../../directives';\nimport { CalendarViewEnum } from '../../enums';\nimport { DateLabelPipe } from '../../pipes';\nimport { CalendarYearsService } from '../../services';\nimport { CalendarHeaderComponent } from '../calendar-header';\n\n@CSSComponent('calendar-years')\n@Component({\n selector: 'odx-calendar-years',\n standalone: true,\n imports: [CoreModule, CalendarCellDirective, CalendarHeaderComponent, DateLabelPipe],\n templateUrl: './calendar-years.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [CalendarYearsService],\n})\nexport class CalendarYearsComponent extends CalendarViewDirective implements AfterViewInit {\n private readonly document = inject(DOCUMENT);\n\n protected readonly calendarYears = inject(CalendarYearsService);\n\n protected readonly calendarNextView = CalendarViewEnum.Year;\n protected readonly calendarCurrentView = CalendarViewEnum.Years;\n\n public ngAfterViewInit(): void {\n deferFn(() => this.scrollCurrentYearIntoView());\n }\n\n public previousYear(event: Event): void {\n this.updateActiveDate(event, subMonths(this.activeDate, 12));\n }\n\n public nextYear(event: Event): void {\n this.updateActiveDate(event, addMonths(this.activeDate, 12));\n }\n\n public previousRow(event: Event): void {\n this.updateActiveDate(event, subMonths(this.activeDate, 12 * 3));\n }\n\n public nextRow(event: Event): void {\n this.updateActiveDate(event, addMonths(this.activeDate, 12 * 3));\n }\n\n public selectDate(value: Date): void {\n if (this.isDateDisabled(value)) return;\n\n const date = setYear(this.calendar.activeDate, getYear(value));\n this.calendar.selectDate(date);\n\n this.changeView();\n }\n\n public scrollCurrentYearIntoView(): void {\n const selectedYear = this.document.querySelector('.odx-calendar-cell.is-selected');\n const currentYear = this.document.querySelector('.odx-calendar-cell--is-current');\n\n const element = selectedYear || currentYear;\n\n if (element && isFunction(element.scrollIntoView)) {\n element.scrollIntoView({ block: 'center', behavior: 'smooth' });\n }\n }\n}\n","<table class=\"odx-calendar__table\" role=\"grid\" aria-describedby=\"odx-calendar\">\n <thead aria-hidden=\"true\">\n <th></th>\n </thead>\n\n <tbody\n *ngIf=\"calendar.activeDate$ | async as activeDate\"\n class=\"odx-calendar__body\"\n (keydown.ArrowLeft)=\"previousYear($event)\"\n (keydown.ArrowRight)=\"nextYear($event)\"\n (keydown.ArrowUp)=\"previousRow($event)\"\n (keydown.ArrowDown)=\"nextRow($event)\"\n >\n <tr class=\"odx-calendar__year-row\" *ngFor=\"let yearRow of calendarYears.years; trackBy: trackByIndex\">\n <td role=\"gridcell\" *ngFor=\"let year of yearRow; let i = index; trackBy: trackByIndex\">\n <button\n [disabled]=\"isDateDisabled(year)\"\n [odxCalendarCell]=\"year\"\n [odxCalendarCellActiveDate]=\"activeDate\"\n [odxCalendarCellSelectedDate]=\"calendar.selectedDate$ | async\"\n [odxCalendarCellCalendarView]=\"calendarCurrentView\"\n (click)=\"selectDate(year)\"\n >\n {{ year | odxDateLabel: config.yearLabel }}\n </button>\n </td>\n </tr>\n </tbody>\n</table>\n","import { A11yModule } from '@angular/cdk/a11y';\nimport { ChangeDetectionStrategy, Component, EventEmitter, inject, Input, OnChanges, Output, SimpleChanges, ViewEncapsulation } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { hasChanged, injectElement } from '@odx/angular/utils';\nimport { CalendarMonthComponent, CalendarYearComponent, CalendarYearsComponent } from './components';\nimport { CalendarViewEnum } from './enums';\nimport { DateFilter, DateType } from './models';\nimport { CalendarService } from './services';\n\n@CSSComponent('calendar')\n@Component({\n selector: 'odx-calendar',\n standalone: true,\n imports: [CoreModule, A11yModule, CalendarMonthComponent, CalendarYearComponent, CalendarYearsComponent],\n templateUrl: './calendar.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n providers: [CalendarService],\n})\nexport class CalendarComponent implements OnChanges {\n protected readonly calendar = inject(CalendarService);\n\n public readonly element = injectElement();\n\n public readonly calendarView = CalendarViewEnum;\n\n @Input()\n public set selectedDate(value: DateType | null) {\n this.calendar.selectDate(value);\n }\n\n @Input()\n public minDate: Date | null = null;\n\n @Input()\n public maxDate: Date | null = null;\n\n @Input()\n public filterFn?: DateFilter | null = null;\n\n @Output()\n public selectedChange = new EventEmitter<DateType | null>();\n\n public ngOnChanges(changes: SimpleChanges): void {\n if (hasChanged(changes, 'minDate', false)) {\n this.calendar.minDate = this.minDate;\n }\n\n if (hasChanged(changes, 'maxDate', false)) {\n this.calendar.maxDate = this.maxDate;\n }\n\n if (hasChanged(changes, 'filterFn', false)) {\n this.calendar.filterFn = this.filterFn;\n }\n }\n}\n","<ng-container [ngSwitch]=\"calendar.calendarCurrentView\">\n <odx-calendar-year *ngSwitchCase=\"calendarView.Year\"></odx-calendar-year>\n <odx-calendar-years *ngSwitchCase=\"calendarView.Years\"></odx-calendar-years>\n <odx-calendar-month *ngSwitchDefault (selectedChange)=\"selectedChange.emit($event)\"></odx-calendar-month>\n</ng-container>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["functionList"],"mappings":";;;;;;;;;;;;;;;;;AAqDa,MAAA,EAAE,cAAc,EAAE,qBAAqB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,GAAG,kBAAkB,CACtH,UAAU,EACV,kCAAkC,EAClC;AACE,IAAA,cAAc,EAAE,WAAW;AAC3B,IAAA,UAAU,EAAE,KAAK;AACjB,IAAA,SAAS,EAAE,OAAO;AAClB,IAAA,QAAQ,EAAE,GAAG;AACb,IAAA,SAAS,EAAE,MAAM;AACjB,IAAA,YAAY,EAAE,eAAe;AAC7B,IAAA,cAAc,EAAE,YAAY;AAC5B,IAAA,aAAa,EAAE,MAAM;AACrB,IAAA,MAAM,EAAE,IAAI,eAAe,CAAS,IAAI,CAAC;AAC1C,CAAA;;AClES,IAAA,iBAIX;AAJD,CAAA,UAAY,gBAAgB,EAAA;AAC1B,IAAA,gBAAA,CAAA,OAAA,CAAA,GAAA,OAAe,CAAA;AACf,IAAA,gBAAA,CAAA,MAAA,CAAA,GAAA,MAAa,CAAA;AACb,IAAA,gBAAA,CAAA,OAAA,CAAA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IAAA,EAAA,sBAAsB,EAAE,QAAA,EAAA,oBAAA,EAAA,OAAA,EAAA,CAAA,gBAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,qBAAqB,8DAAE,sBAAsB,EAAA,QAAA,EAAA,oBAAA,EAAA,CAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,aAAA,EAAA,EAAA,CAAA,iBAAA,CAAA,IAAA,EAAA,CAAA,CAAA;AAM5F,iBAAiB,GAAA,UAAA,CAAA;IAV7B,YAAY,CAAC,UAAU,CAAC;CAUZ,EAAA,iBAAiB,CAqC7B,CAAA;2FArCY,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;+BACE,cAAc,EAAA,UAAA,EACZ,IAAI,EAAA,OAAA,EACP,CAAC,UAAU,EAAE,UAAU,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,sBAAsB,CAAC,EAAA,eAAA,EAEvF,uBAAuB,CAAC,MAAM,EAAA,aAAA,EAChC,iBAAiB,CAAC,IAAI,EAAA,SAAA,EAC1B,CAAC,eAAe,CAAC,EAAA,QAAA,EAAA,+VAAA,EAAA,CAAA;8BAUjB,YAAY,EAAA,CAAA;sBADtB,KAAK;gBAMC,OAAO,EAAA,CAAA;sBADb,KAAK;gBAIC,OAAO,EAAA,CAAA;sBADb,KAAK;gBAIC,QAAQ,EAAA,CAAA;sBADd,KAAK;gBAIC,cAAc,EAAA,CAAA;sBADpB,MAAM;;;AEzCT;;AAEG;;;;"}
@@ -0,0 +1,249 @@
1
+ import { __decorate, __metadata } from 'tslib';
2
+ import * as i2 from '@angular/cdk/a11y';
3
+ import { A11yModule } from '@angular/cdk/a11y';
4
+ import * as i0 from '@angular/core';
5
+ import { inject, EventEmitter, Directive, Output, HostListener, ElementRef, Component, ChangeDetectionStrategy, ViewEncapsulation, Input, ViewChild, ContentChild, NgModule } from '@angular/core';
6
+ import * as i1 from '@odx/angular';
7
+ import { ReadonlyController, WithTabIndex, ClickOutsideDirective, detectControllerChanges, CoreModule } from '@odx/angular';
8
+ import { InputControlDirective, CustomFormControl } from '@odx/angular/cdk/custom-form-control';
9
+ import { ActionGroupComponent } from '@odx/angular/components/action-group';
10
+ import { ButtonComponent } from '@odx/angular/components/button';
11
+ import { CalendarComponent } from '@odx/angular/components/calendar';
12
+ import * as i3 from '@odx/angular/components/dropdown';
13
+ import { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';
14
+ import { IconComponent } from '@odx/angular/components/icon';
15
+ import { CSSComponent } from '@odx/angular/internal';
16
+ import { createConfigTokens, untilDestroyed, injectElement, deferFn } from '@odx/angular/utils';
17
+ import { toDate, isValid, startOfDay, format } from 'date-fns';
18
+ import { fromEvent, distinctUntilChanged, tap, map, filter } from 'rxjs';
19
+ import { NgxMaskPipe, provideNgxMask } from 'ngx-mask';
20
+
21
+ const DatepickerInputDateOrder = {
22
+ DMY: 'DMY',
23
+ MDY: 'MDY',
24
+ YMD: 'YMD',
25
+ };
26
+
27
+ const DatepickerInputFormat = {
28
+ DAYS: 'dd',
29
+ MONTH: 'MM',
30
+ YEAR: 'yyyy',
31
+ };
32
+ const DatepickerInputMask = {
33
+ DAYS: 'd0',
34
+ MONTH: 'M0',
35
+ YEAR: '0000',
36
+ };
37
+
38
+ const { DatepickerConfig, DatepickerDefaultConfig, injectDatepickerConfig, provideDatepickerConfig } = createConfigTokens('Datepicker', '@odx/angular/components/datepicker', {
39
+ inputDateOrder: DatepickerInputDateOrder.DMY,
40
+ inputDateSeparator: '.',
41
+ });
42
+
43
+ function getDatepickerInputPattern({ inputDateOrder, inputDateSeparator }, pattern) {
44
+ const patternList = {
45
+ [DatepickerInputDateOrder.DMY]: `${pattern.DAYS}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.YEAR}`,
46
+ [DatepickerInputDateOrder.MDY]: `${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}${inputDateSeparator}${pattern.YEAR}`,
47
+ [DatepickerInputDateOrder.YMD]: `${pattern.YEAR}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}`,
48
+ };
49
+ return patternList[inputDateOrder];
50
+ }
51
+ function getDatepickerInputFormat(config) {
52
+ return getDatepickerInputPattern(config, DatepickerInputFormat);
53
+ }
54
+ function getDatepickerInputMask(config) {
55
+ return getDatepickerInputPattern(config, DatepickerInputMask);
56
+ }
57
+
58
+ const functionList = {
59
+ [DatepickerInputDateOrder.DMY]: (splittedValue) => {
60
+ const [day, month, year] = splittedValue;
61
+ return { month, day, year };
62
+ },
63
+ [DatepickerInputDateOrder.MDY]: (splittedValue) => {
64
+ const [month, day, year] = splittedValue;
65
+ return { month, day, year };
66
+ },
67
+ [DatepickerInputDateOrder.YMD]: (splittedValue) => {
68
+ const [year, month, day] = splittedValue;
69
+ return { month, day, year };
70
+ },
71
+ };
72
+ function getDateCandidate({ inputDateOrder, inputDateSeparator }, value) {
73
+ const splittedValue = value.split(inputDateSeparator);
74
+ const { month, day, year } = functionList[inputDateOrder](splittedValue);
75
+ const isDateCandidateInvalid = !month || !day || !year;
76
+ return isDateCandidateInvalid ? null : `${month}.${day}.${year}`;
77
+ }
78
+ function getDatepickerInputValueAsDate(config, value) {
79
+ const dateCandidate = getDateCandidate(config, value);
80
+ if (!dateCandidate)
81
+ return null;
82
+ const date = toDate(Date.parse(dateCandidate));
83
+ return isValid(date) ? date : null;
84
+ }
85
+
86
+ let DatepickerInputControlDirective = class DatepickerInputControlDirective extends InputControlDirective {
87
+ constructor() {
88
+ super(...arguments);
89
+ this.maskConfig = { validation: false, leadZeroDateTime: true };
90
+ this.readonlyController = ReadonlyController.inject();
91
+ this.config = injectDatepickerConfig();
92
+ this.inputMask = getDatepickerInputMask(this.config);
93
+ this.ngxMaskPipe = inject(NgxMaskPipe);
94
+ this.focused = new EventEmitter();
95
+ this.valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(distinctUntilChanged(), tap(() => this.applyMask()), map(() => this.nativeElementValue));
96
+ }
97
+ applyMask() {
98
+ this.nativeElementValue = this.ngxMaskPipe.transform(this.nativeElementValue, this.inputMask, this.maskConfig);
99
+ }
100
+ get valueAsDate() {
101
+ return getDatepickerInputValueAsDate(this.config, this.nativeElementValue);
102
+ }
103
+ get placeholder() {
104
+ return getDatepickerInputFormat(this.config).toUpperCase();
105
+ }
106
+ handleFocus(event) {
107
+ this.focused.emit(event);
108
+ }
109
+ };
110
+ DatepickerInputControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerInputControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
111
+ DatepickerInputControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: DatepickerInputControlDirective, isStandalone: true, selector: "input[odxDatepickerControl]", outputs: { focused: "focused" }, host: { listeners: { "focus": "handleFocus($event)" }, properties: { "attr.readonly": "readonlyController?.readonly || null", "attr.placeholder": "placeholder" } }, providers: [ReadonlyController.connect(), provideNgxMask(), NgxMaskPipe], usesInheritance: true, hostDirectives: [{ directive: i1.WithTabIndex }], ngImport: i0 });
112
+ DatepickerInputControlDirective = __decorate([
113
+ CSSComponent('datepicker__control')
114
+ ], DatepickerInputControlDirective);
115
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerInputControlDirective, decorators: [{
116
+ type: Directive,
117
+ args: [{
118
+ standalone: true,
119
+ selector: 'input[odxDatepickerControl]',
120
+ host: {
121
+ '[attr.readonly]': 'readonlyController?.readonly || null',
122
+ '[attr.placeholder]': 'placeholder',
123
+ },
124
+ providers: [ReadonlyController.connect(), provideNgxMask(), NgxMaskPipe],
125
+ hostDirectives: [WithTabIndex],
126
+ }]
127
+ }], propDecorators: { focused: [{
128
+ type: Output
129
+ }], handleFocus: [{
130
+ type: HostListener,
131
+ args: ['focus', ['$event']]
132
+ }] } });
133
+
134
+ let DatepickerComponent = class DatepickerComponent extends CustomFormControl {
135
+ get isOpen() {
136
+ return !!this.dropdown.isOpen;
137
+ }
138
+ constructor() {
139
+ super(null);
140
+ this.takeUntilDestroyed = untilDestroyed();
141
+ this.clickOutsideDirective = inject(ClickOutsideDirective, { host: true });
142
+ this.config = injectDatepickerConfig();
143
+ this.element = injectElement();
144
+ this.filterFn = null;
145
+ this.minDate = null;
146
+ this.maxDate = null;
147
+ this.selectedChange = new EventEmitter();
148
+ detectControllerChanges(this).subscribe();
149
+ }
150
+ ngAfterViewInit() {
151
+ this.handleDateFieldChanges();
152
+ this.handleDateFieldFocus();
153
+ this.handleClickOutside();
154
+ deferFn(() => {
155
+ if (!this.value)
156
+ return;
157
+ this.updateValue(startOfDay(this.value));
158
+ this.updateDateField(this.value);
159
+ });
160
+ }
161
+ selectDate(value) {
162
+ if (!value)
163
+ return;
164
+ this.updateValue(value);
165
+ this.updateDateField(value);
166
+ this.selectedChange.emit(value);
167
+ this.closeDropdown();
168
+ }
169
+ handleDateFieldChanges() {
170
+ var _a;
171
+ (_a = this.dateField) === null || _a === void 0 ? void 0 : _a.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => { var _a, _b; return this.updateValue((_b = (_a = this.dateField) === null || _a === void 0 ? void 0 : _a.valueAsDate) !== null && _b !== void 0 ? _b : null); });
172
+ }
173
+ handleDateFieldFocus() {
174
+ var _a;
175
+ (_a = this.dateField) === null || _a === void 0 ? void 0 : _a.focused.pipe(filter(() => this.isOpen), this.takeUntilDestroyed()).subscribe(() => this.closeDropdown());
176
+ }
177
+ handleClickOutside() {
178
+ this.clickOutsideDirective.odxClickOutside.pipe(this.takeUntilDestroyed()).subscribe(() => this.clickOutside());
179
+ }
180
+ closeDropdown() {
181
+ this.dropdown.close();
182
+ }
183
+ clickOutside() {
184
+ this.closeDropdown();
185
+ }
186
+ openDatepicker(event) {
187
+ event.stopPropagation();
188
+ if (this.isReadonly || this.isDisabled)
189
+ return;
190
+ this.dropdown.open(event);
191
+ }
192
+ updateDateField(date) {
193
+ if (!this.dateField)
194
+ return;
195
+ const dateFormat = getDatepickerInputFormat(this.config);
196
+ this.dateField.nativeElementValue = format(date, dateFormat);
197
+ }
198
+ };
199
+ DatepickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
200
+ DatepickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.9", type: DatepickerComponent, isStandalone: true, selector: "odx-datepicker", inputs: { filterFn: "filterFn", minDate: "minDate", maxDate: "maxDate" }, outputs: { selectedChange: "selectedChange" }, host: { listeners: { "keydown.alt.ArrowDown": "openDatepicker($event)" } }, queries: [{ propertyName: "dateField", first: true, predicate: DatepickerInputControlDirective, descendants: true }], viewQueries: [{ propertyName: "dropdown", first: true, predicate: DropdownDirective, descendants: true }, { propertyName: "dropdownTriggerElement", first: true, predicate: ["dropdownTrigger"], descendants: true, read: ElementRef, static: true }], usesInheritance: true, hostDirectives: [{ directive: i1.ClickOutsideDirective }], ngImport: i0, template: "<ng-content select=\"input[odxDatepickerControl]\"></ng-content>\n\n<odx-action-group class=\"odx-no-margin\">\n <button\n #dropdownTrigger\n class=\"odx-datepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: 'bottom-end' }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownClickOutsideActive]=\"false\"\n >\n <odx-icon name=\"calendar\"></odx-icon>\n </button>\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedChange)=\"selectDate($any($event))\"\n ></odx-calendar>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: A11yModule }, { kind: "directive", type: i2.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "component", type: ActionGroupComponent, selector: "odx-action-group", inputs: ["reverse"] }, { kind: "component", type: ButtonComponent, selector: "button[odxButton], a[odxButton]", inputs: ["variant", "size"] }, { kind: "component", type: CalendarComponent, selector: "odx-calendar", inputs: ["selectedDate", "minDate", "maxDate", "filterFn"], outputs: ["selectedChange"] }, { kind: "ngmodule", type: DropdownModule }, { kind: "directive", type: i3.DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
201
+ DatepickerComponent = __decorate([
202
+ CSSComponent('datepicker'),
203
+ __metadata("design:paramtypes", [])
204
+ ], DatepickerComponent);
205
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerComponent, decorators: [{
206
+ type: Component,
207
+ args: [{ selector: 'odx-datepicker', standalone: true, imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, hostDirectives: [ClickOutsideDirective], template: "<ng-content select=\"input[odxDatepickerControl]\"></ng-content>\n\n<odx-action-group class=\"odx-no-margin\">\n <button\n #dropdownTrigger\n class=\"odx-datepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: 'bottom-end' }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownClickOutsideActive]=\"false\"\n >\n <odx-icon name=\"calendar\"></odx-icon>\n </button>\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedChange)=\"selectDate($any($event))\"\n ></odx-calendar>\n</ng-template>\n" }]
208
+ }], ctorParameters: function () { return []; }, propDecorators: { filterFn: [{
209
+ type: Input
210
+ }], minDate: [{
211
+ type: Input
212
+ }], maxDate: [{
213
+ type: Input
214
+ }], selectedChange: [{
215
+ type: Output
216
+ }], dropdown: [{
217
+ type: ViewChild,
218
+ args: [DropdownDirective]
219
+ }], dropdownTriggerElement: [{
220
+ type: ViewChild,
221
+ args: ['dropdownTrigger', { read: ElementRef, static: true }]
222
+ }], dateField: [{
223
+ type: ContentChild,
224
+ args: [DatepickerInputControlDirective]
225
+ }], openDatepicker: [{
226
+ type: HostListener,
227
+ args: ['keydown.alt.ArrowDown', ['$event']]
228
+ }] } });
229
+
230
+ const modules = [DatepickerComponent, DatepickerInputControlDirective];
231
+ class DatepickerModule {
232
+ }
233
+ DatepickerModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
234
+ DatepickerModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: DatepickerModule, imports: [DatepickerComponent, DatepickerInputControlDirective], exports: [CoreModule, DatepickerComponent, DatepickerInputControlDirective] });
235
+ DatepickerModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerModule, imports: [DatepickerComponent, CoreModule] });
236
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: DatepickerModule, decorators: [{
237
+ type: NgModule,
238
+ args: [{
239
+ imports: modules,
240
+ exports: [CoreModule, ...modules],
241
+ }]
242
+ }] });
243
+
244
+ /**
245
+ * Generated bundle index. Do not edit.
246
+ */
247
+
248
+ export { DatepickerComponent, DatepickerConfig, DatepickerDefaultConfig, DatepickerInputControlDirective, DatepickerInputDateOrder, DatepickerInputFormat, DatepickerInputMask, DatepickerModule, injectDatepickerConfig, provideDatepickerConfig };
249
+ //# sourceMappingURL=odx-angular-components-datepicker.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"odx-angular-components-datepicker.mjs","sources":["../../../../libs/angular/components/datepicker/src/lib/models/datepicker-input-date-order.ts","../../../../libs/angular/components/datepicker/src/lib/models/datepicker-input-pattern.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.config.ts","../../../../libs/angular/components/datepicker/src/lib/utils/get-datepicker-input-pattern.ts","../../../../libs/angular/components/datepicker/src/lib/utils/get-datepicker-input-value-as-date.ts","../../../../libs/angular/components/datepicker/src/lib/directives/datepicker-input-control.directive.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.ts","../../../../libs/angular/components/datepicker/src/lib/datepicker.component.html","../../../../libs/angular/components/datepicker/src/lib/datepicker.module.ts","../../../../libs/angular/components/datepicker/src/odx-angular-components-datepicker.ts"],"sourcesContent":["export type DatepickerInputDateOrder = (typeof DatepickerInputDateOrder)[keyof typeof DatepickerInputDateOrder];\n\nexport const DatepickerInputDateOrder = {\n DMY: 'DMY',\n MDY: 'MDY',\n YMD: 'YMD',\n};\n","export type DatepickerInputPattern = typeof DatepickerInputFormat | typeof DatepickerInputMask;\n\nexport const DatepickerInputFormat = {\n DAYS: 'dd',\n MONTH: 'MM',\n YEAR: 'yyyy',\n};\n\nexport const DatepickerInputMask = {\n DAYS: 'd0',\n MONTH: 'M0',\n YEAR: '0000',\n};\n","import { createConfigTokens } from '@odx/angular/utils';\nimport { DatepickerInputDateOrder } from './models';\n\nexport interface DatepickerConfig {\n /**\n * Date's order ('DMY' | 'MDY' | 'YMD').\n * @default DatepickerInputDateOrder.DMY\n */\n inputDateOrder: DatepickerInputDateOrder;\n /**\n * Single-character date's separator (dot, slash etc.).\n * @default '.'\n */\n inputDateSeparator: string;\n}\n\nexport const { DatepickerConfig, DatepickerDefaultConfig, injectDatepickerConfig, provideDatepickerConfig } = createConfigTokens(\n 'Datepicker',\n '@odx/angular/components/datepicker',\n {\n inputDateOrder: DatepickerInputDateOrder.DMY,\n inputDateSeparator: '.',\n },\n);\n","import { DatepickerConfig } from '../datepicker.config';\nimport { DatepickerInputDateOrder, DatepickerInputFormat, DatepickerInputMask, DatepickerInputPattern } from '../models';\n\nfunction getDatepickerInputPattern({ inputDateOrder, inputDateSeparator }: DatepickerConfig, pattern: DatepickerInputPattern): string {\n const patternList: Record<DatepickerInputDateOrder, string> = {\n [DatepickerInputDateOrder.DMY]: `${pattern.DAYS}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.YEAR}`,\n [DatepickerInputDateOrder.MDY]: `${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}${inputDateSeparator}${pattern.YEAR}`,\n [DatepickerInputDateOrder.YMD]: `${pattern.YEAR}${inputDateSeparator}${pattern.MONTH}${inputDateSeparator}${pattern.DAYS}`,\n };\n\n return patternList[inputDateOrder];\n}\n\nexport function getDatepickerInputFormat(config: DatepickerConfig): string {\n return getDatepickerInputPattern(config, DatepickerInputFormat);\n}\n\nexport function getDatepickerInputMask(config: DatepickerConfig): string {\n return getDatepickerInputPattern(config, DatepickerInputMask);\n}\n","import { isValid, toDate } from 'date-fns';\nimport { DatepickerConfig } from '../datepicker.config';\nimport { DatepickerInputDateOrder } from '../models';\n\ninterface DateCandidateInterface {\n month: string;\n day: string;\n year: string;\n}\n\nconst functionList: Record<DatepickerInputDateOrder, (splittedValue: string[]) => DateCandidateInterface> = {\n [DatepickerInputDateOrder.DMY]: (splittedValue: string[]) => {\n const [day, month, year] = splittedValue;\n return { month, day, year };\n },\n [DatepickerInputDateOrder.MDY]: (splittedValue: string[]) => {\n const [month, day, year] = splittedValue;\n return { month, day, year };\n },\n [DatepickerInputDateOrder.YMD]: (splittedValue: string[]) => {\n const [year, month, day] = splittedValue;\n return { month, day, year };\n },\n};\n\nfunction getDateCandidate({ inputDateOrder, inputDateSeparator }: DatepickerConfig, value: string): string | null {\n const splittedValue = value.split(inputDateSeparator);\n\n const { month, day, year }: DateCandidateInterface = functionList[inputDateOrder](splittedValue);\n\n const isDateCandidateInvalid = !month || !day || !year;\n\n return isDateCandidateInvalid ? null : `${month}.${day}.${year}`;\n}\n\nexport function getDatepickerInputValueAsDate(config: DatepickerConfig, value: string): Date | null {\n const dateCandidate: string | null = getDateCandidate(config, value);\n\n if (!dateCandidate) return null;\n\n const date = toDate(Date.parse(dateCandidate));\n\n return isValid(date) ? date : null;\n}\n","import { Directive, EventEmitter, HostListener, inject, Output } from '@angular/core';\nimport { ReadonlyController, WithTabIndex } from '@odx/angular';\nimport { InputControlDirective } from '@odx/angular/cdk/custom-form-control';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { IConfig, NgxMaskPipe, provideNgxMask } from 'ngx-mask';\nimport { distinctUntilChanged, fromEvent, map, tap } from 'rxjs';\nimport { injectDatepickerConfig } from '../datepicker.config';\nimport { getDatepickerInputFormat, getDatepickerInputMask, getDatepickerInputValueAsDate } from '../utils';\n\n@CSSComponent('datepicker__control')\n@Directive({\n standalone: true,\n selector: 'input[odxDatepickerControl]',\n host: {\n '[attr.readonly]': 'readonlyController?.readonly || null',\n '[attr.placeholder]': 'placeholder',\n },\n providers: [ReadonlyController.connect(), provideNgxMask(), NgxMaskPipe],\n hostDirectives: [WithTabIndex],\n})\nexport class DatepickerInputControlDirective extends InputControlDirective {\n private readonly maskConfig: Partial<IConfig> = { validation: false, leadZeroDateTime: true };\n\n protected readonly readonlyController = ReadonlyController.inject();\n\n protected readonly config = injectDatepickerConfig();\n\n protected readonly inputMask = getDatepickerInputMask(this.config);\n\n protected readonly ngxMaskPipe = inject(NgxMaskPipe);\n\n @Output()\n public focused = new EventEmitter<FocusEvent>();\n\n public override valueChange$ = fromEvent(this.element.nativeElement, 'input').pipe(\n distinctUntilChanged(),\n tap(() => this.applyMask()),\n map(() => this.nativeElementValue),\n );\n\n public applyMask(): void {\n this.nativeElementValue = this.ngxMaskPipe.transform(this.nativeElementValue, this.inputMask, this.maskConfig);\n }\n\n public get valueAsDate(): Date | null {\n return getDatepickerInputValueAsDate(this.config, this.nativeElementValue);\n }\n\n public get placeholder(): string {\n return getDatepickerInputFormat(this.config).toUpperCase();\n }\n\n @HostListener('focus', ['$event'])\n protected handleFocus(event: FocusEvent): void {\n this.focused.emit(event);\n }\n}\n","import { A11yModule } from '@angular/cdk/a11y';\nimport {\n AfterViewInit,\n ChangeDetectionStrategy,\n Component,\n ContentChild,\n ElementRef,\n EventEmitter,\n HostListener,\n inject,\n Input,\n Output,\n ViewChild,\n ViewEncapsulation,\n} from '@angular/core';\nimport { ClickOutsideDirective, detectControllerChanges } from '@odx/angular';\nimport { CustomFormControl } from '@odx/angular/cdk/custom-form-control';\nimport { ActionGroupComponent } from '@odx/angular/components/action-group';\nimport { ButtonComponent } from '@odx/angular/components/button';\nimport { CalendarComponent, DateFilter } from '@odx/angular/components/calendar';\nimport { DropdownDirective, DropdownModule } from '@odx/angular/components/dropdown';\nimport { IconComponent } from '@odx/angular/components/icon';\nimport { CSSComponent } from '@odx/angular/internal';\nimport { deferFn, injectElement, untilDestroyed } from '@odx/angular/utils';\nimport { format, startOfDay } from 'date-fns';\nimport { filter } from 'rxjs';\nimport { injectDatepickerConfig } from './datepicker.config';\nimport { DatepickerInputControlDirective } from './directives';\nimport { getDatepickerInputFormat } from './utils';\n\n@CSSComponent('datepicker')\n@Component({\n selector: 'odx-datepicker',\n standalone: true,\n imports: [A11yModule, ActionGroupComponent, ButtonComponent, CalendarComponent, DropdownModule, IconComponent],\n templateUrl: './datepicker.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n encapsulation: ViewEncapsulation.None,\n hostDirectives: [ClickOutsideDirective],\n})\nexport class DatepickerComponent extends CustomFormControl<Date | null> implements AfterViewInit {\n protected readonly takeUntilDestroyed = untilDestroyed();\n\n protected readonly clickOutsideDirective = inject(ClickOutsideDirective, { host: true });\n\n protected readonly config = injectDatepickerConfig();\n\n public readonly element = injectElement();\n\n public get isOpen(): boolean {\n return !!this.dropdown.isOpen;\n }\n\n @Input()\n public filterFn: DateFilter | null = null;\n\n @Input()\n public minDate: Date | null = null;\n\n @Input()\n public maxDate: Date | null = null;\n\n @Output()\n public selectedChange = new EventEmitter<Date>();\n\n @ViewChild(DropdownDirective)\n public dropdown!: DropdownDirective;\n\n @ViewChild('dropdownTrigger', { read: ElementRef, static: true })\n public dropdownTriggerElement!: ElementRef<HTMLElement>;\n\n @ContentChild(DatepickerInputControlDirective)\n public dateField?: DatepickerInputControlDirective;\n\n constructor() {\n super(null);\n detectControllerChanges(this).subscribe();\n }\n\n public ngAfterViewInit(): void {\n this.handleDateFieldChanges();\n this.handleDateFieldFocus();\n this.handleClickOutside();\n\n deferFn(() => {\n if (!this.value) return;\n this.updateValue(startOfDay(this.value));\n this.updateDateField(this.value);\n });\n }\n\n public selectDate(value: Date | null): void {\n if (!value) return;\n\n this.updateValue(value);\n this.updateDateField(value);\n\n this.selectedChange.emit(value);\n\n this.closeDropdown();\n }\n\n protected handleDateFieldChanges(): void {\n this.dateField?.valueChange$.pipe(this.takeUntilDestroyed()).subscribe(() => this.updateValue(this.dateField?.valueAsDate ?? null));\n }\n\n protected handleDateFieldFocus(): void {\n this.dateField?.focused\n .pipe(\n filter(() => this.isOpen),\n this.takeUntilDestroyed(),\n )\n .subscribe(() => this.closeDropdown());\n }\n\n protected handleClickOutside(): void {\n this.clickOutsideDirective.odxClickOutside.pipe(this.takeUntilDestroyed()).subscribe(() => this.clickOutside());\n }\n\n protected closeDropdown(): void {\n this.dropdown.close();\n }\n\n protected clickOutside(): void {\n this.closeDropdown();\n }\n\n @HostListener('keydown.alt.ArrowDown', ['$event'])\n protected openDatepicker(event: KeyboardEvent) {\n event.stopPropagation();\n\n if (this.isReadonly || this.isDisabled) return;\n\n this.dropdown.open(event);\n }\n\n private updateDateField(date: Date): void {\n if (!this.dateField) return;\n\n const dateFormat = getDatepickerInputFormat(this.config);\n this.dateField.nativeElementValue = format(date, dateFormat);\n }\n}\n","<ng-content select=\"input[odxDatepickerControl]\"></ng-content>\n\n<odx-action-group class=\"odx-no-margin\">\n <button\n #dropdownTrigger\n class=\"odx-datepicker__trigger\"\n odxButton\n size=\"small\"\n variant=\"ghost\"\n [odxDropdown]=\"calendarOverlay\"\n [odxDropdownOptions]=\"{ position: 'bottom-end' }\"\n [odxDropdownTriggerElement]=\"dropdownTriggerElement.nativeElement\"\n [odxDropdownHost]=\"null\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownClickOutsideActive]=\"false\"\n >\n <odx-icon name=\"calendar\"></odx-icon>\n </button>\n</odx-action-group>\n\n<ng-template #calendarOverlay>\n <odx-calendar\n [selectedDate]=\"value\"\n [filterFn]=\"filterFn\"\n [minDate]=\"minDate\"\n [maxDate]=\"maxDate\"\n cdkTrapFocus\n cdkTrapFocusAutoCapture\n (selectedChange)=\"selectDate($any($event))\"\n ></odx-calendar>\n</ng-template>\n","import { NgModule } from '@angular/core';\nimport { CoreModule } from '@odx/angular';\nimport { DatepickerComponent } from './datepicker.component';\nimport { DatepickerInputControlDirective } from './directives';\n\nconst modules = [DatepickerComponent, DatepickerInputControlDirective];\n\n@NgModule({\n imports: modules,\n exports: [CoreModule, ...modules],\n})\nexport class DatepickerModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAEa,MAAA,wBAAwB,GAAG;AACtC,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,KAAK;AACV,IAAA,GAAG,EAAE,KAAK;;;ACHC,MAAA,qBAAqB,GAAG;AACnC,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,IAAI,EAAE,MAAM;EACZ;AAEW,MAAA,mBAAmB,GAAG;AACjC,IAAA,IAAI,EAAE,IAAI;AACV,IAAA,KAAK,EAAE,IAAI;AACX,IAAA,IAAI,EAAE,MAAM;;;ACKD,MAAA,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,uBAAuB,EAAE,GAAG,kBAAkB,CAC9H,YAAY,EACZ,oCAAoC,EACpC;IACE,cAAc,EAAE,wBAAwB,CAAC,GAAG;AAC5C,IAAA,kBAAkB,EAAE,GAAG;AACxB,CAAA;;ACnBH,SAAS,yBAAyB,CAAC,EAAE,cAAc,EAAE,kBAAkB,EAAoB,EAAE,OAA+B,EAAA;AAC1H,IAAA,MAAM,WAAW,GAA6C;QAC5D,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAG,EAAA,OAAO,CAAC,IAAI,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,KAAK,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,IAAI,CAAE,CAAA;QAC1H,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAG,EAAA,OAAO,CAAC,KAAK,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,IAAI,CAAA,EAAG,kBAAkB,CAAG,EAAA,OAAO,CAAC,IAAI,CAAE,CAAA;QAC1H,CAAC,wBAAwB,CAAC,GAAG,GAAG,CAAG,EAAA,OA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B,EAAE,CAAC,QAAQ,CAAC,CAAA;;;AE1HnD,MAAM,OAAO,GAAG,CAAC,mBAAmB,EAAE,+BAA+B,CAAC,CAAC;MAM1D,gBAAgB,CAAA;;6GAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;8GAAhB,gBAAgB,EAAA,OAAA,EAAA,CANZ,mBAAmB,EAAE,+BAA+B,aAIzD,UAAU,EAJL,mBAAmB,EAAE,+BAA+B,CAAA,EAAA,CAAA,CAAA;8GAMxD,gBAAgB,EAAA,OAAA,EAAA,CANZ,mBAAmB,EAIxB,UAAU,CAAA,EAAA,CAAA,CAAA;2FAET,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,OAAO,EAAE,OAAO;AAChB,oBAAA,OAAO,EAAE,CAAC,UAAU,EAAE,GAAG,OAAO,CAAC;iBAClC,CAAA;;;ACVD;;AAEG;;;;"}
@@ -10,7 +10,8 @@ import { CheckboxComponent } from '@odx/angular/components/checkbox';
10
10
  import { CSSComponent, CSSModifier } from '@odx/angular/internal';
11
11
  import { Transform, deferFn } from '@odx/angular/utils';
12
12
  import * as i1 from '@angular/common';
13
- import { BaseSearchFieldDirective, BaseSearchFilterPipe, AutocompleteControl } from '@odx/angular/cdk/autocomplete-control';
13
+ import { InputControlDirective } from '@odx/angular/cdk/custom-form-control';
14
+ import { BaseSearchFilterPipe, AutocompleteControl, ODX_SEARCH_FILTER_HOST } from '@odx/angular/cdk/autocomplete-control';
14
15
  import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
15
16
  import { DropdownDirective } from '@odx/angular/components/dropdown';
16
17
  import { IconComponent } from '@odx/angular/components/icon';
@@ -82,7 +83,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
82
83
  type: Input
83
84
  }] } });
84
85
 
85
- let SelectSearchFieldDirective = class SelectSearchFieldDirective extends BaseSearchFieldDirective {
86
+ let SelectInputControlDirective = class SelectInputControlDirective extends InputControlDirective {
86
87
  constructor() {
87
88
  super(...arguments);
88
89
  // eslint-disable-next-line @angular-eslint/no-input-rename
@@ -92,12 +93,12 @@ let SelectSearchFieldDirective = class SelectSearchFieldDirective extends BaseSe
92
93
  this.reset();
93
94
  }
94
95
  };
95
- SelectSearchFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
96
- SelectSearchFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SelectSearchFieldDirective, isStandalone: true, selector: "input[odxSelectSearchField]", inputs: { notFoundContent: ["odxSelectSearchField", "notFoundContent"] }, host: { listeners: { "keydown.delete": "handleDelete()" } }, usesInheritance: true, ngImport: i0 });
97
- SelectSearchFieldDirective = __decorate([
98
- CSSComponent('select__search')
99
- ], SelectSearchFieldDirective);
100
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFieldDirective, decorators: [{
96
+ SelectInputControlDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectInputControlDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
97
+ SelectInputControlDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.9", type: SelectInputControlDirective, isStandalone: true, selector: "input[odxSelectSearchField]", inputs: { notFoundContent: ["odxSelectSearchField", "notFoundContent"] }, host: { listeners: { "keydown.delete": "handleDelete()" } }, usesInheritance: true, ngImport: i0 });
98
+ SelectInputControlDirective = __decorate([
99
+ CSSComponent('select__control')
100
+ ], SelectInputControlDirective);
101
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectInputControlDirective, decorators: [{
101
102
  type: Directive,
102
103
  args: [{
103
104
  standalone: true,
@@ -112,21 +113,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
112
113
  }] } });
113
114
 
114
115
  class SelectSearchFilterPipe extends BaseSearchFilterPipe {
115
- constructor() {
116
- super(...arguments);
117
- this.hostController = inject(SELECT_CONTROL, { optional: true });
118
- }
119
- get searchField() {
120
- var _a;
121
- return (_a = this.hostController) === null || _a === void 0 ? void 0 : _a.searchField;
122
- }
123
- queryHandler(query) {
124
- return query === null || query === void 0 ? void 0 : query.trim();
125
- }
126
- get searchBy() {
127
- var _a, _b;
128
- return (_b = (_a = this.hostController) === null || _a === void 0 ? void 0 : _a.stringify) !== null && _b !== void 0 ? _b : this.stringify;
129
- }
130
116
  }
131
117
  SelectSearchFilterPipe.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, deps: null, target: i0.ɵɵFactoryTarget.Pipe });
132
118
  SelectSearchFilterPipe.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectSearchFilterPipe, isStandalone: true, name: "odxSelectSearchFilter", pure: false });
@@ -272,7 +258,11 @@ SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", versio
272
258
  provide: SELECT_CONTROL,
273
259
  useExisting: forwardRef(() => SelectComponent_1),
274
260
  },
275
- ], queries: [{ propertyName: "searchField", first: true, predicate: SelectSearchFieldDirective, descendants: true }, { propertyName: "options", predicate: SelectOptionComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-select__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n>\n <ng-template [ngIf]=\"!searchFieldEnabled\" [ngIfElse]=\"searchFieldTemplate\">\n <div class=\"odx-select__value\" *ngIf=\"selectedOptionContent; else placeholderTemplate\">\n <ng-template [odxDynamicView]=\"selectedOptionContent\" [odxDynamicViewContext]=\"{ $implicit: value }\"></ng-template>\n </div>\n </ng-template>\n <ng-template #placeholderTemplate>\n <div class=\"odx-select__placeholder\">\n {{ placeholder }}\n </div>\n </ng-template>\n <ng-template #searchFieldTemplate>\n <ng-content select=\"[odxSelectSearchField]\"></ng-content>\n </ng-template>\n <odx-icon class=\"odx-select__indicator\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\" [ngIfElse]=\"noOptionsTemplate\">\n <ng-content></ng-content>\n </ng-template>\n <ng-template #noOptionsTemplate>\n <odx-select-option disabled notFoundMessage>\n <ng-template [odxDynamicView]=\"searchField?.notFoundContent\"></ng-template>\n </odx-select-option>\n </ng-template>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }, { kind: "component", type: SelectOptionComponent, selector: "odx-select-option, odx-option", inputs: ["notFoundMessage"] }, { kind: "ngmodule", type: LoadingSpinnerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
261
+ {
262
+ provide: ODX_SEARCH_FILTER_HOST,
263
+ useExisting: SELECT_CONTROL,
264
+ },
265
+ ], queries: [{ propertyName: "searchField", first: true, predicate: SelectInputControlDirective, descendants: true }, { propertyName: "options", predicate: SelectOptionComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n aria-haspopup=\"listbox\"\n class=\"odx-select__trigger\"\n [odxDropdown]=\"dropdownContent\"\n [odxDropdownDisabled]=\"isDisabled || isReadonly\"\n [odxDropdownOptions]=\"{ matchReferenceWidth: true, offset: 4, outerPadding: 10, position: 'bottom-start' }\"\n [odxDropdownReferenceElement]=\"element.nativeElement\"\n [odxDropdownShowLoader]=\"isLoading\"\n (odxDropdownBeforeOpen)=\"onDropdownOpen()\"\n (odxDropdownBeforeClose)=\"onDropdownClose()\"\n (odxDropdownAfterClose)=\"onDropdownClosed()\"\n (odxDropdownAfterOpen)=\"enableSmoothScroll()\"\n>\n <ng-template [ngIf]=\"!searchFieldEnabled\" [ngIfElse]=\"searchFieldTemplate\">\n <div class=\"odx-select__value\" *ngIf=\"selectedOptionContent; else placeholderTemplate\">\n <ng-template [odxDynamicView]=\"selectedOptionContent\" [odxDynamicViewContext]=\"{ $implicit: value }\"></ng-template>\n </div>\n </ng-template>\n <ng-template #placeholderTemplate>\n <div class=\"odx-select__placeholder\">\n {{ placeholder }}\n </div>\n </ng-template>\n <ng-template #searchFieldTemplate>\n <ng-content select=\"[odxSelectSearchField]\"></ng-content>\n </ng-template>\n <odx-icon class=\"odx-select__indicator\" name=\"chevron-down\" iconSet=\"core\"></odx-icon>\n</div>\n<ng-template #dropdownContent>\n <div class=\"odx-dropdown__option-list\" role=\"listbox\">\n <ng-template [ngIf]=\"hasOptions\" [ngIfElse]=\"noOptionsTemplate\">\n <ng-content></ng-content>\n </ng-template>\n <ng-template #noOptionsTemplate>\n <odx-select-option disabled notFoundMessage>\n <ng-template [odxDynamicView]=\"searchField?.notFoundContent\"></ng-template>\n </odx-select-option>\n </ng-template>\n </div>\n</ng-template>\n", dependencies: [{ kind: "ngmodule", type: CoreModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.DisabledController, selector: "[disabled]", inputs: ["disabled"] }, { kind: "directive", type: DropdownDirective, selector: "[odxDropdown]", inputs: ["odxDropdown", "odxDropdownDisabled", "odxDropdownShowLoader", "odxDropdownClickOutsideActive", "odxDropdownOptions", "odxDropdownReferenceElement", "odxDropdownTriggerElement", "odxDropdownHost", "odxDropdownOpenTrigger", "odxDropdownCloseTrigger"], outputs: ["odxDropdownBeforeOpen", "odxDropdownAfterOpen", "odxDropdownBeforeClose", "odxDropdownAfterClose"], exportAs: ["odxDropdown"] }, { kind: "component", type: IconComponent, selector: "odx-icon", inputs: ["inline", "size", "name", "iconSet"] }, { kind: "directive", type: DynamicViewDirective, selector: "ng-template[odxDynamicView]", inputs: ["odxDynamicView", "odxDynamicViewInjector", "odxDynamicViewContext"] }, { kind: "component", type: SelectOptionComponent, selector: "odx-select-option, odx-option", inputs: ["notFoundMessage"] }, { kind: "ngmodule", type: LoadingSpinnerModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
276
266
  __decorate([
277
267
  CSSModifier(),
278
268
  Transform(coerceBooleanProperty),
@@ -288,6 +278,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
288
278
  provide: SELECT_CONTROL,
289
279
  useExisting: forwardRef(() => SelectComponent),
290
280
  },
281
+ {
282
+ provide: ODX_SEARCH_FILTER_HOST,
283
+ useExisting: SELECT_CONTROL,
284
+ },
291
285
  ], host: {
292
286
  '[tabindex]': 'searchFieldEnabled || isDisabled ? -1 : 0',
293
287
  '[attr.aria-multiselectable]': 'multiple',
@@ -297,7 +291,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
297
291
  args: [SelectOptionComponent, { descendants: true, emitDistinctChangesOnly: true }]
298
292
  }], searchField: [{
299
293
  type: ContentChild,
300
- args: [SelectSearchFieldDirective]
294
+ args: [SelectInputControlDirective]
301
295
  }], placeholder: [{
302
296
  type: Input
303
297
  }], multiple: [{
@@ -314,11 +308,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
314
308
  args: ['keydown', ['$event']]
315
309
  }] } });
316
310
 
317
- const modules = [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, SelectOptionComponent];
311
+ const modules = [SelectComponent, SelectInputControlDirective, SelectSearchFilterPipe, SelectOptionComponent];
318
312
  class SelectModule {
319
313
  }
320
314
  SelectModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
321
- SelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, SelectOptionComponent], exports: [CoreModule, SelectComponent, SelectSearchFieldDirective, SelectSearchFilterPipe, SelectOptionComponent] });
315
+ SelectModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, SelectInputControlDirective, SelectSearchFilterPipe, SelectOptionComponent], exports: [CoreModule, SelectComponent, SelectInputControlDirective, SelectSearchFilterPipe, SelectOptionComponent] });
322
316
  SelectModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, imports: [SelectComponent, SelectOptionComponent, CoreModule] });
323
317
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImport: i0, type: SelectModule, decorators: [{
324
318
  type: NgModule,
@@ -332,5 +326,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.9", ngImpor
332
326
  * Generated bundle index. Do not edit.
333
327
  */
334
328
 
335
- export { SELECT_CONTROL, SelectComponent, SelectModule, SelectOptionComponent, SelectSearchFieldDirective, SelectSearchFilterPipe };
329
+ export { SELECT_CONTROL, SelectComponent, SelectInputControlDirective, SelectModule, SelectOptionComponent, SelectSearchFilterPipe };
336
330
  //# sourceMappingURL=odx-angular-components-select.mjs.map