@ngneers/controls 0.0.1-next.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 (186) hide show
  1. package/fesm2022/ngneers-controls-accordion.mjs +234 -0
  2. package/fesm2022/ngneers-controls-accordion.mjs.map +1 -0
  3. package/fesm2022/ngneers-controls-api-ng.mjs +959 -0
  4. package/fesm2022/ngneers-controls-api-ng.mjs.map +1 -0
  5. package/fesm2022/ngneers-controls-api-resize.mjs +712 -0
  6. package/fesm2022/ngneers-controls-api-resize.mjs.map +1 -0
  7. package/fesm2022/ngneers-controls-api.mjs +347 -0
  8. package/fesm2022/ngneers-controls-api.mjs.map +1 -0
  9. package/fesm2022/ngneers-controls-avatar.mjs +77 -0
  10. package/fesm2022/ngneers-controls-avatar.mjs.map +1 -0
  11. package/fesm2022/ngneers-controls-base.mjs +620 -0
  12. package/fesm2022/ngneers-controls-base.mjs.map +1 -0
  13. package/fesm2022/ngneers-controls-breadcrumb.mjs +100 -0
  14. package/fesm2022/ngneers-controls-breadcrumb.mjs.map +1 -0
  15. package/fesm2022/ngneers-controls-button-group.mjs +110 -0
  16. package/fesm2022/ngneers-controls-button-group.mjs.map +1 -0
  17. package/fesm2022/ngneers-controls-button.mjs +83 -0
  18. package/fesm2022/ngneers-controls-button.mjs.map +1 -0
  19. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs +74 -0
  20. package/fesm2022/ngneers-controls-calendar-time-CJT5AFlA.mjs.map +1 -0
  21. package/fesm2022/ngneers-controls-calendar.mjs +801 -0
  22. package/fesm2022/ngneers-controls-calendar.mjs.map +1 -0
  23. package/fesm2022/ngneers-controls-checkbox.mjs +63 -0
  24. package/fesm2022/ngneers-controls-checkbox.mjs.map +1 -0
  25. package/fesm2022/ngneers-controls-chip.mjs +55 -0
  26. package/fesm2022/ngneers-controls-chip.mjs.map +1 -0
  27. package/fesm2022/ngneers-controls-default-icons.mjs +82 -0
  28. package/fesm2022/ngneers-controls-default-icons.mjs.map +1 -0
  29. package/fesm2022/ngneers-controls-defer.mjs +72 -0
  30. package/fesm2022/ngneers-controls-defer.mjs.map +1 -0
  31. package/fesm2022/ngneers-controls-dialog.mjs +407 -0
  32. package/fesm2022/ngneers-controls-dialog.mjs.map +1 -0
  33. package/fesm2022/ngneers-controls-directives.mjs +498 -0
  34. package/fesm2022/ngneers-controls-directives.mjs.map +1 -0
  35. package/fesm2022/ngneers-controls-drawer.mjs +271 -0
  36. package/fesm2022/ngneers-controls-drawer.mjs.map +1 -0
  37. package/fesm2022/ngneers-controls-edit-inplace.mjs +127 -0
  38. package/fesm2022/ngneers-controls-edit-inplace.mjs.map +1 -0
  39. package/fesm2022/ngneers-controls-errors.mjs +329 -0
  40. package/fesm2022/ngneers-controls-errors.mjs.map +1 -0
  41. package/fesm2022/ngneers-controls-filter.mjs +708 -0
  42. package/fesm2022/ngneers-controls-filter.mjs.map +1 -0
  43. package/fesm2022/ngneers-controls-hint.mjs +153 -0
  44. package/fesm2022/ngneers-controls-hint.mjs.map +1 -0
  45. package/fesm2022/ngneers-controls-i18n-translations-de.mjs +170 -0
  46. package/fesm2022/ngneers-controls-i18n-translations-de.mjs.map +1 -0
  47. package/fesm2022/ngneers-controls-i18n-translations-en.mjs +170 -0
  48. package/fesm2022/ngneers-controls-i18n-translations-en.mjs.map +1 -0
  49. package/fesm2022/ngneers-controls-i18n.mjs +57 -0
  50. package/fesm2022/ngneers-controls-i18n.mjs.map +1 -0
  51. package/fesm2022/ngneers-controls-icon.mjs +195 -0
  52. package/fesm2022/ngneers-controls-icon.mjs.map +1 -0
  53. package/fesm2022/ngneers-controls-inplace.mjs +150 -0
  54. package/fesm2022/ngneers-controls-inplace.mjs.map +1 -0
  55. package/fesm2022/ngneers-controls-input-field.mjs +165 -0
  56. package/fesm2022/ngneers-controls-input-field.mjs.map +1 -0
  57. package/fesm2022/ngneers-controls-input.mjs +72 -0
  58. package/fesm2022/ngneers-controls-input.mjs.map +1 -0
  59. package/fesm2022/ngneers-controls-item-view.mjs +473 -0
  60. package/fesm2022/ngneers-controls-item-view.mjs.map +1 -0
  61. package/fesm2022/ngneers-controls-list-box.mjs +281 -0
  62. package/fesm2022/ngneers-controls-list-box.mjs.map +1 -0
  63. package/fesm2022/ngneers-controls-mask-input.mjs +888 -0
  64. package/fesm2022/ngneers-controls-mask-input.mjs.map +1 -0
  65. package/fesm2022/ngneers-controls-menu.mjs +371 -0
  66. package/fesm2022/ngneers-controls-menu.mjs.map +1 -0
  67. package/fesm2022/ngneers-controls-message.mjs +30 -0
  68. package/fesm2022/ngneers-controls-message.mjs.map +1 -0
  69. package/fesm2022/ngneers-controls-number-input.mjs +366 -0
  70. package/fesm2022/ngneers-controls-number-input.mjs.map +1 -0
  71. package/fesm2022/ngneers-controls-paginator.mjs +129 -0
  72. package/fesm2022/ngneers-controls-paginator.mjs.map +1 -0
  73. package/fesm2022/ngneers-controls-popover.mjs +215 -0
  74. package/fesm2022/ngneers-controls-popover.mjs.map +1 -0
  75. package/fesm2022/ngneers-controls-progress.mjs +98 -0
  76. package/fesm2022/ngneers-controls-progress.mjs.map +1 -0
  77. package/fesm2022/ngneers-controls-radio.mjs +152 -0
  78. package/fesm2022/ngneers-controls-radio.mjs.map +1 -0
  79. package/fesm2022/ngneers-controls-roving-focus.mjs +323 -0
  80. package/fesm2022/ngneers-controls-roving-focus.mjs.map +1 -0
  81. package/fesm2022/ngneers-controls-scroll-shadow.mjs +65 -0
  82. package/fesm2022/ngneers-controls-scroll-shadow.mjs.map +1 -0
  83. package/fesm2022/ngneers-controls-scroller.mjs +308 -0
  84. package/fesm2022/ngneers-controls-scroller.mjs.map +1 -0
  85. package/fesm2022/ngneers-controls-select-button.mjs +58 -0
  86. package/fesm2022/ngneers-controls-select-button.mjs.map +1 -0
  87. package/fesm2022/ngneers-controls-select.mjs +417 -0
  88. package/fesm2022/ngneers-controls-select.mjs.map +1 -0
  89. package/fesm2022/ngneers-controls-slider.mjs +167 -0
  90. package/fesm2022/ngneers-controls-slider.mjs.map +1 -0
  91. package/fesm2022/ngneers-controls-snackbar.mjs +414 -0
  92. package/fesm2022/ngneers-controls-snackbar.mjs.map +1 -0
  93. package/fesm2022/ngneers-controls-spin-buttons.mjs +126 -0
  94. package/fesm2022/ngneers-controls-spin-buttons.mjs.map +1 -0
  95. package/fesm2022/ngneers-controls-spinner.mjs +184 -0
  96. package/fesm2022/ngneers-controls-spinner.mjs.map +1 -0
  97. package/fesm2022/ngneers-controls-splitter.mjs +604 -0
  98. package/fesm2022/ngneers-controls-splitter.mjs.map +1 -0
  99. package/fesm2022/ngneers-controls-state.mjs +185 -0
  100. package/fesm2022/ngneers-controls-state.mjs.map +1 -0
  101. package/fesm2022/ngneers-controls-switch.mjs +39 -0
  102. package/fesm2022/ngneers-controls-switch.mjs.map +1 -0
  103. package/fesm2022/ngneers-controls-table.mjs +2634 -0
  104. package/fesm2022/ngneers-controls-table.mjs.map +1 -0
  105. package/fesm2022/ngneers-controls-tabs.mjs +336 -0
  106. package/fesm2022/ngneers-controls-tabs.mjs.map +1 -0
  107. package/fesm2022/ngneers-controls-tag.mjs +30 -0
  108. package/fesm2022/ngneers-controls-tag.mjs.map +1 -0
  109. package/fesm2022/ngneers-controls-toast.mjs +350 -0
  110. package/fesm2022/ngneers-controls-toast.mjs.map +1 -0
  111. package/fesm2022/ngneers-controls-toggle-button.mjs +70 -0
  112. package/fesm2022/ngneers-controls-toggle-button.mjs.map +1 -0
  113. package/fesm2022/ngneers-controls-tooltip.mjs +506 -0
  114. package/fesm2022/ngneers-controls-tooltip.mjs.map +1 -0
  115. package/fesm2022/ngneers-controls-tree.mjs +599 -0
  116. package/fesm2022/ngneers-controls-tree.mjs.map +1 -0
  117. package/fesm2022/ngneers-controls-upload.mjs +377 -0
  118. package/fesm2022/ngneers-controls-upload.mjs.map +1 -0
  119. package/fesm2022/ngneers-controls-utils-ng.mjs +411 -0
  120. package/fesm2022/ngneers-controls-utils-ng.mjs.map +1 -0
  121. package/fesm2022/ngneers-controls-utils.mjs +261 -0
  122. package/fesm2022/ngneers-controls-utils.mjs.map +1 -0
  123. package/fesm2022/ngneers-controls.mjs +6 -0
  124. package/fesm2022/ngneers-controls.mjs.map +1 -0
  125. package/package.json +302 -0
  126. package/types/ngneers-controls-accordion.d.ts +139 -0
  127. package/types/ngneers-controls-api-ng.d.ts +364 -0
  128. package/types/ngneers-controls-api-resize.d.ts +318 -0
  129. package/types/ngneers-controls-api.d.ts +145 -0
  130. package/types/ngneers-controls-avatar.d.ts +54 -0
  131. package/types/ngneers-controls-base.d.ts +277 -0
  132. package/types/ngneers-controls-breadcrumb.d.ts +272 -0
  133. package/types/ngneers-controls-button-group.d.ts +46 -0
  134. package/types/ngneers-controls-button.d.ts +48 -0
  135. package/types/ngneers-controls-calendar.d.ts +466 -0
  136. package/types/ngneers-controls-checkbox.d.ts +40 -0
  137. package/types/ngneers-controls-chip.d.ts +202 -0
  138. package/types/ngneers-controls-default-icons.d.ts +5 -0
  139. package/types/ngneers-controls-defer.d.ts +48 -0
  140. package/types/ngneers-controls-dialog.d.ts +399 -0
  141. package/types/ngneers-controls-directives.d.ts +171 -0
  142. package/types/ngneers-controls-drawer.d.ts +308 -0
  143. package/types/ngneers-controls-edit-inplace.d.ts +263 -0
  144. package/types/ngneers-controls-errors.d.ts +155 -0
  145. package/types/ngneers-controls-filter.d.ts +609 -0
  146. package/types/ngneers-controls-hint.d.ts +88 -0
  147. package/types/ngneers-controls-i18n-translations-de.d.ts +164 -0
  148. package/types/ngneers-controls-i18n-translations-en.d.ts +164 -0
  149. package/types/ngneers-controls-i18n.d.ts +186 -0
  150. package/types/ngneers-controls-icon.d.ts +68 -0
  151. package/types/ngneers-controls-inplace.d.ts +98 -0
  152. package/types/ngneers-controls-input-field.d.ts +248 -0
  153. package/types/ngneers-controls-input.d.ts +30 -0
  154. package/types/ngneers-controls-item-view.d.ts +215 -0
  155. package/types/ngneers-controls-list-box.d.ts +334 -0
  156. package/types/ngneers-controls-mask-input.d.ts +434 -0
  157. package/types/ngneers-controls-menu.d.ts +192 -0
  158. package/types/ngneers-controls-message.d.ts +21 -0
  159. package/types/ngneers-controls-number-input.d.ts +146 -0
  160. package/types/ngneers-controls-paginator.d.ts +255 -0
  161. package/types/ngneers-controls-popover.d.ts +116 -0
  162. package/types/ngneers-controls-progress.d.ts +49 -0
  163. package/types/ngneers-controls-radio.d.ts +91 -0
  164. package/types/ngneers-controls-roving-focus.d.ts +107 -0
  165. package/types/ngneers-controls-scroll-shadow.d.ts +25 -0
  166. package/types/ngneers-controls-scroller.d.ts +151 -0
  167. package/types/ngneers-controls-select-button.d.ts +51 -0
  168. package/types/ngneers-controls-select.d.ts +409 -0
  169. package/types/ngneers-controls-slider.d.ts +57 -0
  170. package/types/ngneers-controls-snackbar.d.ts +330 -0
  171. package/types/ngneers-controls-spin-buttons.d.ts +69 -0
  172. package/types/ngneers-controls-spinner.d.ts +117 -0
  173. package/types/ngneers-controls-splitter.d.ts +465 -0
  174. package/types/ngneers-controls-state.d.ts +102 -0
  175. package/types/ngneers-controls-switch.d.ts +18 -0
  176. package/types/ngneers-controls-table.d.ts +3127 -0
  177. package/types/ngneers-controls-tabs.d.ts +118 -0
  178. package/types/ngneers-controls-tag.d.ts +21 -0
  179. package/types/ngneers-controls-toast.d.ts +298 -0
  180. package/types/ngneers-controls-toggle-button.d.ts +48 -0
  181. package/types/ngneers-controls-tooltip.d.ts +189 -0
  182. package/types/ngneers-controls-tree.d.ts +409 -0
  183. package/types/ngneers-controls-upload.d.ts +347 -0
  184. package/types/ngneers-controls-utils-ng.d.ts +129 -0
  185. package/types/ngneers-controls-utils.d.ts +130 -0
  186. package/types/ngneers-controls.d.ts +2 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-calendar.mjs","sources":["../../src/calendar/calendar-templates.ts","../../src/calendar/types.ts","../../src/calendar/days/days.ts","../../src/calendar/days/days.html","../../src/calendar/formatter.ts","../../src/calendar/calendar.ts","../../src/calendar/calendar.html","../../src/calendar/ngneers-controls-calendar.ts"],"sourcesContent":["import { computed, contentChild, Directive, input, TemplateRef, viewChild } from '@angular/core';\nimport { templateTypesFn } from '@ngneers/controls/api/ng';\nimport { ValueControlBase } from '@ngneers/controls/base';\n\nimport type {\n DayTemplateType,\n MonthTemplateType,\n TimeTemplateType,\n WeekDayTemplateType,\n YearTemplateType,\n} from './types';\n\n@Directive()\nexport abstract class CalendarTemplates extends ValueControlBase<'calendar', Date | null> {\n // Day template\n private readonly _defaultDayTemplate =\n viewChild.required<TemplateRef<typeof this.templateTypes.day>>('defaultDayTemplate');\n private readonly _userDayTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.day>>('day');\n /**\n * Set a custom template for a day.\n * Can also be set using an `<ng-template>` element with `#day` template reference variable.\n */\n public readonly templateDay = input<TemplateRef<typeof this.templateTypes.day> | null>(null);\n protected readonly dayTemplate = computed(\n () => this._userDayTemplate() ?? this.templateDay() ?? this._defaultDayTemplate()\n );\n // Week day template\n private readonly _defaultWeekDayTemplate =\n viewChild.required<TemplateRef<typeof this.templateTypes.weekDay>>('defaultWeekDayTemplate');\n private readonly _userWeekDayTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.weekDay>>('weekDay');\n /**\n * Set a custom template for a week day.\n * Can also be set using an `<ng-template>` element with `#weekDay` template reference variable.\n */\n public readonly templateWeekDay = input<TemplateRef<typeof this.templateTypes.weekDay> | null>(\n null\n );\n protected readonly weekDayTemplate = computed(\n () => this._userWeekDayTemplate() ?? this.templateWeekDay() ?? this._defaultWeekDayTemplate()\n );\n // Month template\n private readonly _defaultMonthTemplate =\n viewChild.required<TemplateRef<typeof this.templateTypes.month>>('defaultMonthTemplate');\n private readonly _userMonthTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.month>>('month');\n /**\n * Set a custom template for a month.\n * Can also be set using an `<ng-template>` element with `#month` template reference variable.\n */\n public readonly templateMonth = input<TemplateRef<typeof this.templateTypes.month> | null>(null);\n protected readonly monthTemplate = computed(\n () => this._userMonthTemplate() ?? this.templateMonth() ?? this._defaultMonthTemplate()\n );\n // Time template\n private readonly _defaultTimeTemplate =\n viewChild.required<TemplateRef<typeof this.templateTypes.time>>('defaultTimeTemplate');\n private readonly _userTimeTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.time>>('time');\n /**\n * Set a custom template for the time input.\n * Can also be set using an `<ng-template>` element with `#time` template reference variable.\n */\n public readonly templateTime = input<TemplateRef<typeof this.templateTypes.time> | null>(null);\n protected readonly timeTemplate = computed(\n () => this._userTimeTemplate() ?? this.templateTime() ?? this._defaultTimeTemplate()\n );\n // Year template\n private readonly _defaultYearTemplate =\n viewChild.required<TemplateRef<typeof this.templateTypes.year>>('defaultYearTemplate');\n private readonly _userYearTemplate =\n contentChild<TemplateRef<typeof this.templateTypes.year>>('year');\n /**\n * Set a custom template for the year input.\n * Can also be set using an `<ng-template>` element with `#year` template reference variable.\n */\n public readonly templateYear = input<TemplateRef<typeof this.templateTypes.year> | null>(null);\n protected readonly yearTemplate = computed(\n () => this._userYearTemplate() ?? this.templateYear() ?? this._defaultYearTemplate()\n );\n\n /**\n * Types for the calendar templates.\n */\n public readonly templateTypes = templateTypesFn<{\n /**\n * Type of the template variable for the day template.\n */\n day: DayTemplateType;\n /**\n * Type of the template variable for the week day template.\n */\n weekDay: WeekDayTemplateType;\n /**\n * Type of the template variable for the month template.\n */\n month: MonthTemplateType;\n /**\n * Type of the template variable for the time template.\n */\n time: TimeTemplateType;\n /**\n * Type of the template variable for the year template.\n */\n year: YearTemplateType;\n }>();\n}\n","export const MONTHS = [\n 'january',\n 'february',\n 'march',\n 'april',\n 'may',\n 'june',\n 'july',\n 'august',\n 'september',\n 'october',\n 'november',\n 'december',\n] as const;\n\nexport type Month = (typeof MONTHS)[number];\n\nexport const WEEK_DAYS = [\n 'sunday',\n 'monday',\n 'tuesday',\n 'wednesday',\n 'thursday',\n 'friday',\n 'saturday',\n] as const;\n\nexport type WeekDay = (typeof WEEK_DAYS)[number];\n\nexport type DayModel = {\n date: number;\n /**\n * -1 = previous month, 0 = current month, 1 = next month\n */\n monthOffset: number;\n};\n\nexport type DayTemplateType = {\n $implicit: {\n date: number;\n selected: boolean;\n today: boolean;\n fromOtherMonth: boolean;\n };\n};\n\nexport type WeekDayTemplateType = {\n $implicit: {\n weekDay: WeekDay;\n translation: string;\n };\n};\n\nexport type MonthTemplateType = {\n $implicit: {\n month: Month;\n change: (newMonth: Month) => void;\n };\n};\n\nexport type TimeTemplateType = {\n $implicit: {\n time: Date | null;\n showSeconds: boolean;\n change: (newTime: Date | null) => void;\n };\n};\n\nexport type YearTemplateType = {\n $implicit: {\n year: number;\n change: (newYear: number) => void;\n };\n};\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n Component,\n computed,\n ElementRef,\n inject,\n input,\n output,\n TemplateRef,\n viewChildren,\n} from '@angular/core';\nimport { type NgnBaseSafe, NgnPt } from '@ngneers/controls/base';\nimport { NgnButton } from '@ngneers/controls/button';\nimport { I18n } from '@ngneers/controls/i18n';\nimport { NgnIcon } from '@ngneers/controls/icon';\nimport { calendarControlTemplate } from '@ngneers/controls-themes/templates/calendar';\n\nimport {\n type DayModel,\n type DayTemplateType,\n type Month,\n MONTHS,\n type MonthTemplateType,\n type TimeTemplateType,\n WEEK_DAYS,\n type WeekDay,\n type WeekDayTemplateType,\n type YearTemplateType,\n} from '../types';\n\nimport type { ControlTemplateInfo } from '@ngneers/controls/api/ng';\n\n// Configuration: Number of weeks to show before and after the current month\nconst WEEKS_BEFORE = 1;\nconst WEEKS_AFTER = 1;\n\ntype MonthModel = {\n weeks: WeekModel[];\n};\n\ntype WeekModel = {\n days: DayModel[];\n};\n\n@Component({\n selector: 'ngn-calendar-days',\n templateUrl: './days.html',\n imports: [NgTemplateOutlet, NgnPt, NgnButton, NgnIcon],\n})\nexport class CalendarDays {\n public readonly component = input.required<NgnBaseSafe<'calendar'>>();\n public readonly theme = input.required<ControlTemplateInfo<typeof calendarControlTemplate>>();\n public readonly year = input.required<number>();\n public readonly month = input.required<number>();\n public readonly currentValue = input.required<Date | null>();\n public readonly firstDayOfWeek = input.required<WeekDay>();\n public readonly dayTemplate = input.required<TemplateRef<DayTemplateType>>();\n public readonly weekDayTemplate = input.required<TemplateRef<WeekDayTemplateType>>();\n public readonly timeTemplate = input.required<TemplateRef<TimeTemplateType>>();\n public readonly yearTemplate = input.required<TemplateRef<YearTemplateType>>();\n public readonly monthTemplate = input.required<TemplateRef<MonthTemplateType>>();\n public readonly showTime = input.required<boolean>();\n public readonly showSeconds = input.required<boolean>();\n public readonly previousMonth = output();\n public readonly nextMonth = output();\n public readonly daySelected = output<DayModel>();\n public readonly yearSelected = output<number>();\n public readonly monthSelected = output<Month>();\n public readonly timeChanged = output<Date | null>();\n\n protected readonly MONTHS = MONTHS;\n protected readonly i18n = inject(I18n).translations;\n protected readonly todaysDay = new Date().getDate();\n protected readonly todaysMonth = new Date().getMonth();\n protected readonly todaysYear = new Date().getFullYear();\n protected readonly doTimeChange = (t: Date | null) => this.timeChanged.emit(t);\n protected readonly doYearChange = (t: number) => this.yearSelected.emit(t);\n protected readonly doMonthChange = (t: Month) => this.monthSelected.emit(t);\n\n protected readonly weekDaysSorted = computed(() =>\n WEEK_DAYS.slice(this._firstDayOfWeekIndex())\n .concat(WEEK_DAYS.slice(0, this._firstDayOfWeekIndex()))\n .map(day => ({\n weekDay: day,\n translation: this.i18n[`calendar_weekdaysShort_${day}`],\n }))\n );\n\n private readonly _dayButton = viewChildren<ElementRef<HTMLButtonElement>>('dayButton');\n private readonly _firstDayOfWeekIndex = computed(() => WEEK_DAYS.indexOf(this.firstDayOfWeek()));\n private readonly _daysInMonth = computed(() =>\n new Date(this.year(), this.month() + 1, 0).getDate()\n );\n private readonly _daysInPreviousMonth = computed(() =>\n new Date(this.year(), this.month(), 0).getDate()\n );\n private readonly _firstDayOfMonth = computed(() =>\n new Date(this.year(), this.month(), 1).getDay()\n );\n\n protected readonly monthModel = computed((): MonthModel => {\n const firstDayOfMonth = this._firstDayOfMonth();\n const firstDayOfWeek = this._firstDayOfWeekIndex();\n const daysInMonth = this._daysInMonth();\n const daysInPreviousMonth = this._daysInPreviousMonth();\n\n // Calculate starting point and total days needed\n const firstDayOffset = (firstDayOfMonth - firstDayOfWeek + 7) % 7;\n const daysFromPreviousMonth = firstDayOffset + WEEKS_BEFORE * 7;\n const daysToNextMonth = (7 - ((daysFromPreviousMonth + daysInMonth) % 7)) % 7;\n const totalDays = daysFromPreviousMonth + daysInMonth + daysToNextMonth + WEEKS_AFTER * 7;\n const startDay = daysInPreviousMonth - daysFromPreviousMonth + 1;\n\n // Build all days in one pass\n const allDays: DayModel[] = [];\n let currentDate = startDay;\n let currentMonth = -1; // -1 = previous, 0 = current, 1 = next\n\n for (let i = 0; i < totalDays; i++) {\n // Determine which month we're in\n if (currentDate > daysInPreviousMonth && currentMonth === -1) {\n currentDate = 1;\n currentMonth = 0;\n } else if (currentDate > daysInMonth && currentMonth === 0) {\n currentDate = 1;\n currentMonth = 1;\n }\n\n allDays.push({\n date: currentDate,\n monthOffset: currentMonth,\n });\n\n currentDate++;\n }\n\n // Group into weeks\n const weeks: WeekModel[] = [];\n for (let i = 0; i < allDays.length; i += 7) {\n weeks.push({\n days: allDays.slice(i, i + 7),\n });\n }\n\n return { weeks };\n });\n\n protected readonly tabFocusDay = computed(() => {\n const val = this.currentValue();\n if (val && val.getMonth() === this.month() && val.getFullYear() === this.year()) {\n return val.getDate();\n }\n return 1;\n });\n\n /** Accessible name of the day grid — the visible month and year. */\n protected readonly gridLabel = computed(() =>\n new Date(this.year(), this.month(), 1).toLocaleDateString(undefined, {\n month: 'long',\n year: 'numeric',\n })\n );\n\n /** Full, localized date used as each day cell's accessible name (e.g. \"Thursday, 15 January 2026\"). */\n protected dayLabel(day: DayModel): string {\n return new Date(this.year(), this.month() + day.monthOffset, day.date).toLocaleDateString(\n undefined,\n { weekday: 'long', year: 'numeric', month: 'long', day: 'numeric' }\n );\n }\n\n /** Whether the given day cell holds the currently selected value. */\n protected isSelected(day: DayModel): boolean {\n const val = this.currentValue();\n return (\n !!val &&\n val.getDate() === day.date &&\n val.getMonth() === this.month() + day.monthOffset &&\n val.getFullYear() === this.year()\n );\n }\n\n /** Whether the given day cell is today. */\n protected isToday(day: DayModel): boolean {\n return (\n this.todaysMonth === this.month() + day.monthOffset &&\n this.todaysDay === day.date &&\n this.todaysYear === this.year()\n );\n }\n\n protected prev() {\n this.previousMonth.emit();\n }\n\n protected next() {\n this.nextMonth.emit();\n }\n\n protected selectYear(year: number) {\n this.yearSelected.emit(year);\n }\n\n protected dayKeydown(event: KeyboardEvent, day: HTMLButtonElement) {\n if (['ArrowRight', 'ArrowLeft', 'ArrowUp', 'ArrowDown'].includes(event.key)) {\n event.preventDefault();\n\n const getCurrentMonthButtons = () => {\n return this._dayButton()\n .map(ref => ref.nativeElement)\n .filter(x => !x.classList.contains(this.theme().class('day-other-month')));\n };\n\n const allDayButtons = getCurrentMonthButtons();\n const index = allDayButtons.indexOf(day);\n const daysInMonth = this._daysInMonth();\n if (event.key === 'ArrowRight') {\n if (index < daysInMonth - 1) {\n allDayButtons[index + 1]?.focus();\n } else {\n this.next();\n setTimeout(() => {\n getCurrentMonthButtons()[0]?.focus();\n });\n }\n } else if (event.key === 'ArrowLeft') {\n if (index > 0) {\n allDayButtons[index - 1]?.focus();\n } else {\n this.prev();\n setTimeout(() => {\n const buttons = getCurrentMonthButtons();\n buttons[buttons.length - 1]?.focus();\n });\n }\n } else if (event.key === 'ArrowDown') {\n if (index < daysInMonth - 7) {\n allDayButtons[index + 7]?.focus();\n } else {\n this.next();\n const nextIndex = (index + 7) % daysInMonth;\n setTimeout(() => {\n getCurrentMonthButtons()[nextIndex]?.focus();\n });\n }\n } else if (event.key === 'ArrowUp') {\n if (index >= 7) {\n allDayButtons[index - 7]?.focus();\n } else {\n this.prev();\n setTimeout(() => {\n const buttons = getCurrentMonthButtons();\n const targetIndex = Math.min(buttons.length - 7 + index, buttons.length - 1);\n buttons[targetIndex]?.focus();\n });\n }\n }\n }\n }\n}\n","<div [ptInt]=\"component()\" [ptClass]=\"'details'\">\n <div [ptInt]=\"component()\" [ptClass]=\"'header'\">\n <div [ptInt]=\"component()\" [ptClass]=\"'navigation'\">\n <button\n ngnButton\n [kind]=\"'icon'\"\n [ptInt]=\"component()\"\n [ptDep]=\"'previous'\"\n [attr.aria-label]=\"i18n['calendar_previousMonth']()\"\n (click)=\"prev()\"\n >\n <ngn-icon [defaultIcon]=\"'calendar-previous-month'\" />\n </button>\n <button\n ngnButton\n [kind]=\"'icon'\"\n [ptInt]=\"component()\"\n [ptDep]=\"'next'\"\n [attr.aria-label]=\"i18n['calendar_nextMonth']()\"\n (click)=\"next()\"\n >\n <ngn-icon [defaultIcon]=\"'calendar-next-month'\" />\n </button>\n </div>\n <ng-container\n *ngTemplateOutlet=\"\n monthTemplate();\n context: {\n $implicit: {\n month: MONTHS[month()],\n change: doMonthChange,\n },\n }\n \"\n />\n\n <ng-container\n *ngTemplateOutlet=\"\n yearTemplate();\n context: {\n $implicit: {\n year: year(),\n change: doYearChange,\n },\n }\n \"\n />\n </div>\n <div class=\"ngn-calendar-days\" role=\"grid\" [attr.aria-label]=\"gridLabel()\">\n <div role=\"row\" style=\"display: contents\">\n @for (weekDay of weekDaysSorted(); track weekDay) {\n <span role=\"columnheader\" [ptInt]=\"component()\" [ptClass]=\"'week-day'\">\n <ng-container\n *ngTemplateOutlet=\"\n weekDayTemplate();\n context: {\n $implicit: {\n weekDay: weekDay.weekDay,\n translation: weekDay.translation(),\n },\n }\n \"\n />\n </span>\n }\n </div>\n @for (item of monthModel().weeks; track $index) {\n <div role=\"row\" style=\"display: contents\">\n @for (day of item.days; track $index) {\n <div\n role=\"gridcell\"\n style=\"display: contents\"\n [attr.aria-selected]=\"isSelected(day) ? 'true' : null\"\n >\n <button\n #dayButton\n [ptInt]=\"component()\"\n [ptClass]=\"{\n day: true,\n 'day-other-month': day.monthOffset !== 0,\n 'day-today': isToday(day),\n 'day-selected': isSelected(day),\n }\"\n [tabIndex]=\"!day.monthOffset && tabFocusDay() === day.date ? 0 : -1\"\n [attr.aria-current]=\"isToday(day) ? 'date' : null\"\n [attr.aria-label]=\"dayLabel(day)\"\n type=\"button\"\n (click)=\"\n daySelected.emit({\n date: day.date,\n monthOffset: day.monthOffset,\n })\n \"\n (keydown)=\"dayKeydown($event, dayButton)\"\n >\n <ng-container\n *ngTemplateOutlet=\"\n dayTemplate();\n context: {\n $implicit: {\n date: day.date,\n fromOtherMonth: day.monthOffset !== 0,\n selected: isSelected(day),\n today: isToday(day),\n },\n }\n \"\n />\n </button>\n </div>\n }\n </div>\n }\n </div>\n @if (showTime()) {\n <ng-container\n *ngTemplateOutlet=\"\n timeTemplate();\n context: {\n $implicit: { time: currentValue(), showSeconds: showSeconds(), change: doTimeChange },\n }\n \"\n />\n }\n</div>\n","/**\n * Formats a Date object into a string based on the provided format.\n * @param value The Date object to format. If null, an empty string is returned.\n * @param format The format string that specifies how the date should be formatted. Supported tokens include:\n * Tokens follow the standard (Unicode/moment-style) convention — uppercase `M` is\n * month, lowercase `m` is minute — matching `getDateOrTimeMask`:\n * - 'dd': Day of the month, 2 digits with leading zeros (01 to 31)\n * - 'd': Day of the month without leading zeros (1 to 31)\n * - 'MM': Month, 2 digits with leading zeros (01 to 12)\n * - 'M': Month without leading zeros (1 to 12)\n * - 'yyyy': Year, 4 digits (e.g., 2024)\n * - 'yy': Year, 2 digits (e.g., 24)\n * - 'HH': Hours (24-hour), 2 digits with leading zeros (00 to 23)\n * - 'H': Hours (24-hour) without leading zeros (0 to 23)\n * - 'hh': Hours (12-hour), 2 digits with leading zeros (01 to 12)\n * - 'h': Hours (12-hour) without leading zeros (1 to 12)\n * - 'mm': Minutes, 2 digits with leading zeros (00 to 59)\n * - 'm': Minutes without leading zeros (0 to 59)\n * - 'ss': Seconds, 2 digits with leading zeros (00 to 59)\n * - 's': Seconds without leading zeros (0 to 59)\n * - 'a': AM/PM marker\n * - 'SSS': Milliseconds, 3 digits with leading zeros (000 to 999)\n * @returns The formatted date string.\n */\nconst DATE_TOKEN = /^(yyyy|yy|MM|M|dd|d|HH|H|hh|h|mm|m|ss|s|SSS|a)/;\n\n/** Maximum digit count per numeric token — bounds the capture so adjacent\n * numeric tokens (separator-free formats like `MMddyyyy`) still parse. */\nconst TOKEN_MAX_DIGITS: Record<string, number> = {\n yyyy: 4,\n yy: 2,\n MM: 2,\n M: 2,\n dd: 2,\n d: 2,\n HH: 2,\n H: 2,\n hh: 2,\n h: 2,\n mm: 2,\n m: 2,\n ss: 2,\n s: 2,\n SSS: 3,\n};\n\n/**\n * Parses a date string according to `format`, the inverse of {@link formatDate}.\n *\n * Unlike `new Date(string)` this is format-aware (so e.g. `dd.MM.yyyy` parses\n * correctly) and, crucially, **clamps the day to the number of days in the\n * resolved month/year** instead of rolling over: `31` in February becomes the\n * 28th/29th rather than spilling into March. Returns `null` when the string does\n * not match the format.\n *\n * Two-digit years (`yy`) are interpreted as 2000–2099. Numeric tokens are capped\n * at their natural digit count so separator-free formats parse unambiguously.\n */\nexport function parseDate(str: string, format: string): Date | null {\n // Build a regex from the format, remembering the token captured at each group.\n let pattern = '';\n const tokens: string[] = [];\n let i = 0;\n while (i < format.length) {\n const m = DATE_TOKEN.exec(format.slice(i));\n if (m) {\n const tok = m[0]; // the whole match is the token\n tokens.push(tok);\n pattern += tok === 'a' ? '(AM|PM)' : `(\\\\d{1,${TOKEN_MAX_DIGITS[tok]}})`;\n i += tok.length;\n } else {\n pattern += format.charAt(i).replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&');\n i++;\n }\n }\n\n const match = new RegExp(`^${pattern}$`).exec(str);\n if (!match) return null;\n\n const part: Record<string, string> = {};\n tokens.forEach((tok, idx) => (part[tok] = match[idx + 1] ?? ''));\n\n const num = (...keys: string[]): number | undefined => {\n for (const k of keys) if (part[k] !== undefined) return Number(part[k]);\n return undefined;\n };\n\n const now = new Date();\n const year =\n num('yyyy') ?? (part['yy'] !== undefined ? 2000 + Number(part['yy']) : now.getFullYear());\n const month = num('MM', 'M') ?? 1; // 1-12\n const dayRaw = num('dd', 'd') ?? 1;\n\n let hours = num('HH', 'H') ?? 0;\n const hour12 = num('hh', 'h');\n if (hour12 !== undefined) {\n if (hour12 < 1 || hour12 > 12) return null;\n const pm = part['a'] === 'PM';\n hours = (hour12 % 12) + (pm ? 12 : 0);\n }\n const minutes = num('mm', 'm') ?? 0;\n const seconds = num('ss', 's') ?? 0;\n const ms = num('SSS') ?? 0;\n\n // Reject out-of-range components rather than letting `new Date` silently\n // normalize them (e.g. month 13 → next year, hour 25 → next day).\n if (\n month < 1 ||\n month > 12 ||\n hours < 0 ||\n hours > 23 ||\n minutes < 0 ||\n minutes > 59 ||\n seconds < 0 ||\n seconds > 59 ||\n ms < 0 ||\n ms > 999\n ) {\n return null;\n }\n\n // Clamp the day to the resolved month's length (handles leap years) so an\n // out-of-range day never rolls over into the next month.\n const daysInMonth = new Date(year, month, 0).getDate();\n const day = Math.max(1, Math.min(dayRaw, daysInMonth));\n\n const date = new Date(year, month - 1, day, hours, minutes, seconds, ms);\n return isNaN(date.getTime()) ? null : date;\n}\n\nexport function formatDate(value: Date | null, format: string): string {\n if (!value) {\n return '';\n }\n const day = value.getDate();\n const month = value.getMonth() + 1;\n const year = value.getFullYear();\n const hours = value.getHours();\n const minutes = value.getMinutes();\n const seconds = value.getSeconds();\n const milliseconds = value.getMilliseconds();\n const ampm = hours >= 12 ? 'PM' : 'AM';\n const hour12 = hours % 12 || 12;\n // Longest tokens first within each group; 'a' (AM/PM) last so the inserted\n // letters are never re-matched by an earlier numeric replacement.\n return format\n .replace(/yyyy/g, String(year))\n .replace(/yy/g, String(year).slice(-2))\n .replace(/dd/g, String(day).padStart(2, '0'))\n .replace(/d/g, String(day))\n .replace(/MM/g, String(month).padStart(2, '0'))\n .replace(/M/g, String(month))\n .replace(/HH/g, String(hours).padStart(2, '0'))\n .replace(/H/g, String(hours))\n .replace(/hh/g, String(hour12).padStart(2, '0'))\n .replace(/h/g, String(hour12))\n .replace(/mm/g, String(minutes).padStart(2, '0'))\n .replace(/m/g, String(minutes))\n .replace(/ss/g, String(seconds).padStart(2, '0'))\n .replace(/s/g, String(seconds))\n .replace(/SSS/g, String(milliseconds).padStart(3, '0'))\n .replace(/a/g, ampm);\n}\n","import { NgTemplateOutlet } from '@angular/common';\nimport {\n booleanAttribute,\n Component,\n computed,\n effect,\n inject,\n input,\n linkedSignal,\n type Signal,\n signal,\n viewChild,\n} from '@angular/core';\nimport { NgnTemplate, Platform } from '@ngneers/controls/api/ng';\nimport { NgnPt, provideSelf } from '@ngneers/controls/base';\nimport { I18n } from '@ngneers/controls/i18n';\nimport { NgnIcon } from '@ngneers/controls/icon';\nimport { NgnInput } from '@ngneers/controls/input';\nimport { NgnInputField } from '@ngneers/controls/input-field';\nimport { getDateOrTimeMask, NgnMaskInput } from '@ngneers/controls/mask-input';\nimport { NgnPopover } from '@ngneers/controls/popover';\nimport { NgnSelect } from '@ngneers/controls/select';\nimport { NgnError, throwExp } from '@ngneers/controls/utils';\nimport { calendarControlTemplate } from '@ngneers/controls-themes/templates/calendar';\n\nimport { CalendarTemplates } from './calendar-templates';\nimport { CalendarDays } from './days/days';\nimport { formatDate, parseDate } from './formatter';\nimport { CalendarTime } from './time/time';\nimport { type DayModel, type Month, MONTHS, type WeekDay } from './types';\n\nimport type { NgnItem } from '@ngneers/controls/api';\n\nfunction generateYearOptions(): NgnItem[] {\n const MAX_ITEMS = 200;\n const currentYear = new Date().getFullYear();\n return Array.from({ length: MAX_ITEMS }, (_, i) => ({\n label: (currentYear - MAX_ITEMS / 2 + i).toString(),\n value: currentYear - MAX_ITEMS / 2 + i,\n }));\n}\n\ntype MonthItemType = NgnItem<{ $: (typeof MONTHS)[number] }, '$'>;\n\n/**\n * @category control\n */\n@Component({\n selector: 'ngn-calendar',\n templateUrl: './calendar.html',\n imports: [\n NgTemplateOutlet,\n NgnTemplate,\n NgnPt,\n NgnInput,\n NgnIcon,\n NgnSelect,\n NgnPopover,\n CalendarDays,\n CalendarTime,\n NgnInputField,\n NgnMaskInput,\n ],\n providers: [provideSelf(NgnCalendar)],\n host: {\n '[style.display]': '\"block\"',\n '[style.width]': 'inline() ? \"fit-content\" : \"100%\"',\n '[attr.aria-invalid]': 'invalid() ? \"true\" : null',\n },\n})\nexport class NgnCalendar extends CalendarTemplates {\n /**\n * Set the first day of the week.\n * @default 'monday'\n */\n public readonly firstDayOfWeek = input<WeekDay>('monday');\n /**\n * Whether to show the time input.\n * @default false\n */\n public readonly showTime = input(false, { transform: booleanAttribute });\n /**\n * Whether to show seconds in the time input.\n * @default false\n */\n public readonly showSeconds = input(false, { transform: booleanAttribute });\n /**\n * Whether to show the calendar inline instead of with a input field & popup.\n * @default false\n */\n public readonly inline = input(false, { transform: booleanAttribute });\n /**\n * The format of the date displayed in the input field.\n * @default 'MM/dd/yyyy'\n */\n public readonly format = input('MM/dd/yyyy');\n\n private readonly _popover = viewChild<NgnPopover>(NgnPopover);\n private readonly _mask = viewChild(NgnMaskInput);\n private readonly _platform = inject(Platform);\n protected readonly i18n = inject(I18n).translations;\n public override readonly isFieldControl = true;\n protected readonly theme = this.injectThemeTemplate(calendarControlTemplate);\n protected get anchorElement(): HTMLElement {\n return (\n (this.element.nativeElement.closest('ngn-input-field') as HTMLElement | null) ??\n this.element.nativeElement\n );\n }\n protected readonly year = linkedSignal(\n () => this.value()?.getFullYear() || new Date().getFullYear()\n );\n protected readonly month = linkedSignal(() => this.value()?.getMonth() ?? new Date().getMonth());\n protected readonly yearOptions = generateYearOptions();\n protected readonly monthOptions: Signal<NgnItem<MonthItemType>[]> = computed(() => {\n const months = Array.from(\n { length: 12 },\n (_, i) =>\n <NgnItem>{\n label:\n this.i18n[\n `calendar_months_${MONTHS[i] ?? throwExp('calendar', 'invalid month index')}`\n ],\n value: MONTHS[i],\n testId: `calendar-month-${MONTHS[i]}`,\n }\n );\n return months;\n });\n protected readonly valueStr = computed(() => {\n const value = this.value();\n const format = this.format();\n if (!value) {\n return null;\n }\n return formatDate(value, format);\n });\n protected readonly maskCfg = computed(() => {\n const format = this.format();\n const mask = getDateOrTimeMask(format);\n const value = this.value();\n if (!value) {\n return mask;\n }\n // Narrow the day field's max to the current month's length (leap-aware) so\n // the mask wraps/limits the day correctly within the month (e.g. Feb caps at\n // 28/29, stepping up from 28 wraps to 1). The mask keeps the typed value\n // across this change because only min/max — not the structure — differs.\n const daysInMonth = new Date(value.getFullYear(), value.getMonth() + 1, 0).getDate();\n return mask.map(seg =>\n typeof seg !== 'string' && seg.kind === 'number' && seg.segment === 'day'\n ? { ...seg, max: daysInMonth }\n : seg\n );\n });\n\n protected readonly previousMonth = () => {\n const currentMonth = this.month();\n const currentYear = this.year();\n if (currentMonth === 0) {\n this.year.set(currentYear - 1);\n this.month.set(11); // December\n } else {\n this.month.set(currentMonth - 1);\n }\n };\n\n protected readonly nextMonth = () => {\n const currentMonth = this.month();\n const currentYear = this.year();\n if (currentMonth === 11) {\n this.year.set(currentYear + 1);\n this.month.set(0); // January\n } else {\n this.month.set(currentMonth + 1);\n }\n };\n\n protected readonly previousYear = () => {\n this.year.set(this.year() - 1);\n };\n\n protected readonly nextYear = () => {\n this.year.set(this.year() + 1);\n };\n\n protected selectMonth(month: Month) {\n this.month.set(MONTHS.indexOf(month));\n }\n\n protected selectYear(year: number) {\n this.year.set(year);\n }\n\n protected selectDay(day: DayModel) {\n const newValue = new Date(this.value() || new Date());\n newValue.setFullYear(this.year());\n newValue.setMonth(this.month() + day.monthOffset);\n newValue.setDate(day.date);\n this.value.set(newValue);\n }\n\n protected changeTime(newTime: Date | null) {\n if (!newTime) {\n this.value.set(null);\n return;\n }\n const currentValue = this.value();\n if (currentValue) {\n const newValue = new Date(currentValue);\n newValue.setHours(newTime.getHours());\n newValue.setMinutes(newTime.getMinutes());\n newValue.setSeconds(newTime.getSeconds());\n this.value.set(newValue);\n }\n }\n\n /**\n * Places focus from a pointer event: forwards the location to the embedded\n * mask so the section nearest the cursor is selected, then opens the popup.\n * Implemented as the `NgnBase.focusFromPointer` hook so it also works when the\n * calendar is wrapped in an `ngn-input-field` — the outer field delegates the\n * click here (with the real coordinates) instead of synthesising a\n * coordinate-less click. Invoked by the calendar's own field click too.\n */\n public override focusFromPointer(event: MouseEvent): boolean {\n const handled = this._mask()?.focusFromPointer(event) ?? false;\n if (!this.inline()) {\n this.show();\n }\n return handled;\n }\n\n /**\n * Shows the calendar popup. Only works if `inline` is `false`.\n */\n public show() {\n if (this.inline()) {\n throw new NgnError('calendar', 'cannot open inline calendar');\n }\n if (this._platform.isTouchDevice() || this.disabled() || this.readonly()) {\n return;\n }\n const popover = this._popover();\n if (!popover) {\n throw new NgnError('calendar', 'popover not found despite inline being false');\n }\n popover.show();\n }\n\n /**\n * Hides the calendar popup. Only works if `inline` is `false`.\n */\n public hide() {\n if (this.inline()) {\n throw new NgnError('calendar', 'cannot close inline calendar');\n }\n const popover = this._popover();\n if (!popover) {\n throw new NgnError('calendar', 'popover not found despite inline being false');\n }\n popover.hide();\n }\n\n protected onKeyDown(event: KeyboardEvent) {\n // @todo: handle date selection with keys\n\n // if event is not handled by the listbox, we can handle it here\n if (event.key === 'Enter' && !this.inline()) {\n const popover = this._popover();\n if (!popover) {\n throw new NgnError('calendar', 'popover not found despite inline being false');\n }\n popover.toggle();\n event.stopPropagation();\n event.preventDefault();\n }\n }\n\n /** The current (possibly partial) text in the mask field, awaiting blur. */\n private readonly _inputString = signal<string | null>(null);\n private readonly _clearingMaskInput = signal(false);\n\n private readonly _clearValueWhenMaskBecomesEmpty = effect(() => {\n if (!this._clearingMaskInput() || !this._mask()?.empty()) {\n return;\n }\n this._clearingMaskInput.set(false);\n this.value.set(null);\n });\n\n protected stringValueChange(newValue: string | null) {\n this._inputString.set(newValue);\n // The mask emits null both while mid-typing and when fully cleared. Only the\n // fully-cleared case should null out the bound value; a partially-typed entry\n // leaves the previous value intact (one-directional sync).\n if (!newValue) {\n if (this._mask()?.empty()) {\n this._clearingMaskInput.set(false);\n this.value.set(null);\n } else {\n this._clearingMaskInput.set(true);\n }\n return;\n }\n this._clearingMaskInput.set(false);\n // One-directional sync: typing updates the calendar value (and thus the\n // dropdown UI) only once the mask is COMPLETE — a fully filled, parseable\n // date. Half-typed input never moves the calendar and is never reformatted\n // back over the input. The calendar UI updates the value directly via\n // selectDay / selectMonth / selectYear / changeTime (which then flow back\n // out to the mask text via `valueStr`).\n if (this._mask()?.complete()) {\n this.parseInputString();\n }\n }\n\n /** Parse the complete mask string into the calendar value. */\n private parseInputString() {\n const raw = this._inputString();\n if (!raw) {\n return;\n }\n // Format-aware parse that clamps an out-of-range day to the month's length\n // (e.g. Feb 31 → Feb 28) instead of rolling over into the next month.\n const date = parseDate(raw, this.format());\n if (!date) {\n return;\n }\n if (!this.showTime()) {\n date.setHours(this.value()?.getHours() ?? 0);\n date.setMinutes(this.value()?.getMinutes() ?? 0);\n date.setSeconds(this.value()?.getSeconds() ?? 0);\n } else if (!this.showSeconds()) {\n date.setSeconds(this.value()?.getSeconds() ?? 0);\n }\n // Skip if unchanged — prevents an echo loop when our own valueStr→input\n // write re-emits a (complete) valueChange for the value we just set.\n const current = this.value();\n if (current && current.getTime() === date.getTime()) {\n // The value is unchanged, but the mask may be showing a non-canonical\n // string (e.g. a clamped Feb 31 → Feb 28). Push the canonical text back so\n // the displayed sections match the real value.\n const canonical = formatDate(date, this.format());\n if (canonical !== raw) {\n this._mask()?.value.set(canonical);\n }\n return;\n }\n this.value.set(date);\n }\n\n protected potentiallyBlurred() {\n setTimeout(() => {\n if (this.element.nativeElement.contains(document.activeElement) || this._popover()?.open()) {\n return;\n }\n this.touched.set(true);\n });\n }\n}\n","@if (inline()) {\n <ng-container *ngTemplateOutlet=\"calendar\"></ng-container>\n} @else {\n <div\n #field\n [ptInt]=\"this\"\n [ptClass]=\"{ 'input-field': true, invalid: invalid() }\"\n [attr.aria-invalid]=\"invalid() ? 'true' : null\"\n (click)=\"focusFromPointer($event)\"\n (keydown)=\"onKeyDown($event)\"\n (focusout)=\"potentiallyBlurred()\"\n [tabindex]=\"disabled() ? -1 : 0\"\n >\n <ngn-mask-input\n [ptInt]=\"this\"\n [ptDep]=\"'input'\"\n [label]=\"i18n['calendar_input']()\"\n [mask]=\"maskCfg()\"\n [invalid]=\"invalid()\"\n [value]=\"valueStr()\"\n (valueChange)=\"stringValueChange($event)\"\n [disabled]=\"disabled()\"\n [readonly]=\"readonly()\"\n />\n <ngn-icon defaultIcon=\"calendar-trigger\" [ptInt]=\"this\" [ptDep]=\"'trigger-icon'\" />\n </div>\n <ngn-popover\n #popover\n [ptInt]=\"this\"\n [ptDep]=\"'popover'\"\n [anchor]=\"anchorElement\"\n [id]=\"inputId() + '_popover'\"\n (closing)=\"potentiallyBlurred()\"\n >\n <ng-template #lazy>\n <ng-container *ngTemplateOutlet=\"calendar\"></ng-container>\n </ng-template>\n </ngn-popover>\n}\n\n<ng-template #calendar>\n <div\n [ptInt]=\"this\"\n [ptClass]=\"{\n root: true,\n inline: inline(),\n }\"\n >\n <ngn-calendar-days\n [component]=\"this\"\n [theme]=\"theme\"\n [year]=\"year()\"\n [month]=\"month()\"\n [currentValue]=\"value()\"\n [firstDayOfWeek]=\"firstDayOfWeek()\"\n (previousMonth)=\"previousMonth()\"\n (nextMonth)=\"nextMonth()\"\n (daySelected)=\"selectDay($event)\"\n (monthSelected)=\"selectMonth($event)\"\n (yearSelected)=\"selectYear($event)\"\n (timeChanged)=\"changeTime($event)\"\n [dayTemplate]=\"dayTemplate()\"\n [weekDayTemplate]=\"weekDayTemplate()\"\n [timeTemplate]=\"timeTemplate()\"\n [yearTemplate]=\"yearTemplate()\"\n [monthTemplate]=\"monthTemplate()\"\n [showTime]=\"showTime()\"\n [showSeconds]=\"showSeconds()\"\n (focusout)=\"potentiallyBlurred()\"\n />\n </div>\n</ng-template>\n<ng-template #defaultDayTemplate [ngnTemplate]=\"templateTypes.day\" let-day>\n {{ day.date }}\n</ng-template>\n\n<ng-template #defaultWeekDayTemplate [ngnTemplate]=\"templateTypes.weekDay\" let-weekDay>\n <span>\n {{ weekDay.translation }}\n </span>\n</ng-template>\n\n<ng-template #defaultTimeTemplate [ngnTemplate]=\"templateTypes.time\" let-time>\n @defer {\n <div [ptInt]=\"this\" [ptClass]=\"'time'\">\n <ngn-calendar-time\n [component]=\"this\"\n [currentValue]=\"time.time\"\n [showSeconds]=\"time.showSeconds\"\n (timeChange)=\"time.change($event)\"\n />\n </div>\n }\n</ng-template>\n\n<ng-template #defaultYearTemplate [ngnTemplate]=\"templateTypes.year\" let-y>\n @defer {\n <ngn-input-field [ptInt]=\"this\" [ptDep]=\"'current-year-field'\">\n <ngn-select\n [ptInt]=\"this\"\n [ptDep]=\"'current-year'\"\n [editable]=\"true\"\n [value]=\"year() + ''\"\n (valueChange)=\"y.change(+($event || 0))\"\n [options]=\"yearOptions\"\n [virtual]=\"true\"\n [itemHeight]=\"40\"\n [popoverOptions]=\"{ sizeConstraints: { maxHeight: '300px' } }\"\n [scrollToSelectedItemOnOpen]=\"'center'\"\n [editableAutoFilter]=\"false\"\n [tabindex]=\"-1\"\n >\n <input ngnInput type=\"number\" [attr.aria-label]=\"i18n['calendar_selectYear']()\" />\n </ngn-select>\n </ngn-input-field>\n }\n</ng-template>\n\n<ng-template #defaultMonthTemplate [ngnTemplate]=\"templateTypes.month\" let-m>\n @defer {\n <ngn-input-field [ptInt]=\"this\" [ptDep]=\"'current-month-field'\">\n <ngn-select\n [ptInt]=\"this\"\n [ptDep]=\"'current-month'\"\n [label]=\"i18n['calendar_selectMonth']()\"\n [value]=\"m.month\"\n (valueChange)=\"m.change($event!)\"\n [options]=\"monthOptions()\"\n [popoverOptions]=\"{\n sizeConstraints: { maxHeight: '300px', width: '130px', maxWidth: '130px' },\n }\"\n [scrollToSelectedItemOnOpen]=\"'center'\"\n [tabindex]=\"-1\"\n />\n </ngn-input-field>\n }\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;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MAAA,UAAU,oFACzB,YAAY,CAAA,EAAA,EAAA,QAAA,EAAA,IAAA,EAAA,CAAA,EAAA,CAAA,EAAA,EAAA,CAAA,EAAA,CAAA;;AElGjD;;AAEG;;;;"}
@@ -0,0 +1,63 @@
1
+ import * as i0 from '@angular/core';
2
+ import { input, computed, Component } from '@angular/core';
3
+ import { ValueControlBase, NgnPt, provideSelf } from '@ngneers/controls/base';
4
+ import { NgnIcon } from '@ngneers/controls/icon';
5
+ import { checkboxControlTemplate } from '@ngneers/controls-themes/templates/checkbox';
6
+
7
+ /**
8
+ * @category control
9
+ */
10
+ class NgnCheckbox extends ValueControlBase {
11
+ theme = this.injectThemeTemplate(checkboxControlTemplate, {
12
+ root: true,
13
+ invalid: () => this.invalid(),
14
+ });
15
+ /**
16
+ * Set a custom icon for the checked state.
17
+ */
18
+ iconChecked = input(/* @ts-ignore */
19
+ ...(ngDevMode ? [undefined, { debugName: "iconChecked" }] : /* istanbul ignore next */ []));
20
+ /**
21
+ * Set a custom icon for the unchecked state.
22
+ */
23
+ iconUnchecked = input(/* @ts-ignore */
24
+ ...(ngDevMode ? [undefined, { debugName: "iconUnchecked" }] : /* istanbul ignore next */ []));
25
+ /**
26
+ * Set a custom icon for the indeterminate state.
27
+ */
28
+ iconIndeterminate = input(/* @ts-ignore */
29
+ ...(ngDevMode ? [undefined, { debugName: "iconIndeterminate" }] : /* istanbul ignore next */ []));
30
+ /**
31
+ * Set whether to allow the indeterminate state.
32
+ * If `true`, this will change the {@link value} type to `boolean | null`.
33
+ */
34
+ allowIndeterminate = input(/* @ts-ignore */
35
+ ...(ngDevMode ? [undefined, { debugName: "allowIndeterminate" }] : /* istanbul ignore next */ []));
36
+ indeterminate = computed(() => this.allowIndeterminate() && this.value() === null, /* @ts-ignore */
37
+ ...(ngDevMode ? [{ debugName: "indeterminate" }] : /* istanbul ignore next */ []));
38
+ changed(event) {
39
+ const target = event.target;
40
+ this.value.set(target.checked);
41
+ }
42
+ onClick(event) {
43
+ if (this.readonly() || this.disabled()) {
44
+ event.preventDefault();
45
+ }
46
+ }
47
+ constructor() {
48
+ super();
49
+ }
50
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnCheckbox, deps: [], target: i0.ɵɵFactoryTarget.Component });
51
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: NgnCheckbox, isStandalone: true, selector: "ngn-checkbox", inputs: { iconChecked: { classPropertyName: "iconChecked", publicName: "iconChecked", isSignal: true, isRequired: false, transformFunction: null }, iconUnchecked: { classPropertyName: "iconUnchecked", publicName: "iconUnchecked", isSignal: true, isRequired: false, transformFunction: null }, iconIndeterminate: { classPropertyName: "iconIndeterminate", publicName: "iconIndeterminate", isSignal: true, isRequired: false, transformFunction: null }, allowIndeterminate: { classPropertyName: "allowIndeterminate", publicName: "allowIndeterminate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideSelf(NgnCheckbox)], usesInheritance: true, ngImport: i0, template: "<div\n [ptInt]=\"this\"\n [ptClass]=\"{\n box: true,\n 'box-checked': !!value(),\n 'box-indeterminate': indeterminate(),\n }\"\n>\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': indeterminate(),\n }\"\n [icon]=\"iconIndeterminate()\"\n [defaultIcon]=\"'checkbox-indeterminate'\"\n />\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': !indeterminate() && !!value(),\n }\"\n [icon]=\"iconChecked()\"\n [defaultIcon]=\"'checkbox-checked'\"\n />\n @if (iconUnchecked()) {\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': !indeterminate() && !value(),\n }\"\n [icon]=\"iconUnchecked()\"\n />\n }\n</div>\n<input\n type=\"checkbox\"\n [checked]=\"value()\"\n (change)=\"changed($event)\"\n (click)=\"onClick($event)\"\n [indeterminate]=\"indeterminate()\"\n [ptInt]=\"this\"\n [ptClass]=\"'input'\"\n [attr.disabled]=\"disabled() ? '' : undefined\"\n [ariaReadOnly]=\"readonly() ? '' : undefined\"\n [ariaInvalid]=\"invalid() ? 'true' : undefined\"\n [attr.aria-label]=\"label()\"\n [ariaLabelledByElements]=\"labelledBy()\"\n (blur)=\"touched.set(true)\"\n [id]=\"inputId()\"\n/>\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass", "ptDep"] }, { kind: "component", type: NgnIcon, selector: "ngn-icon", inputs: ["defaultIcon", "icon"] }] });
52
+ }
53
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnCheckbox, decorators: [{
54
+ type: Component,
55
+ args: [{ selector: 'ngn-checkbox', imports: [NgnPt, NgnIcon], providers: [provideSelf(NgnCheckbox)], template: "<div\n [ptInt]=\"this\"\n [ptClass]=\"{\n box: true,\n 'box-checked': !!value(),\n 'box-indeterminate': indeterminate(),\n }\"\n>\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': indeterminate(),\n }\"\n [icon]=\"iconIndeterminate()\"\n [defaultIcon]=\"'checkbox-indeterminate'\"\n />\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': !indeterminate() && !!value(),\n }\"\n [icon]=\"iconChecked()\"\n [defaultIcon]=\"'checkbox-checked'\"\n />\n @if (iconUnchecked()) {\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': !indeterminate() && !value(),\n }\"\n [icon]=\"iconUnchecked()\"\n />\n }\n</div>\n<input\n type=\"checkbox\"\n [checked]=\"value()\"\n (change)=\"changed($event)\"\n (click)=\"onClick($event)\"\n [indeterminate]=\"indeterminate()\"\n [ptInt]=\"this\"\n [ptClass]=\"'input'\"\n [attr.disabled]=\"disabled() ? '' : undefined\"\n [ariaReadOnly]=\"readonly() ? '' : undefined\"\n [ariaInvalid]=\"invalid() ? 'true' : undefined\"\n [attr.aria-label]=\"label()\"\n [ariaLabelledByElements]=\"labelledBy()\"\n (blur)=\"touched.set(true)\"\n [id]=\"inputId()\"\n/>\n" }]
56
+ }], ctorParameters: () => [], propDecorators: { iconChecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconChecked", required: false }] }], iconUnchecked: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconUnchecked", required: false }] }], iconIndeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconIndeterminate", required: false }] }], allowIndeterminate: [{ type: i0.Input, args: [{ isSignal: true, alias: "allowIndeterminate", required: false }] }] } });
57
+
58
+ /**
59
+ * Generated bundle index. Do not edit.
60
+ */
61
+
62
+ export { NgnCheckbox };
63
+ //# sourceMappingURL=ngneers-controls-checkbox.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-checkbox.mjs","sources":["../../src/checkbox/checkbox.ts","../../src/checkbox/checkbox.html","../../src/checkbox/ngneers-controls-checkbox.ts"],"sourcesContent":["import { Component, computed, input } from '@angular/core';\nimport { NgnPt, provideSelf, ValueControlBase } from '@ngneers/controls/base';\nimport { NgnIcon } from '@ngneers/controls/icon';\nimport { checkboxControlTemplate } from '@ngneers/controls-themes/templates/checkbox';\n\nimport type { InputGeneric } from '@ngneers/controls/utils';\nimport type { IconType } from '@ngneers/controls-custom-types';\n\ntype ValueType<Indeterminate extends boolean> =\n InputGeneric<Indeterminate, false> extends false ? boolean : boolean | null;\n\n/**\n * @category control\n */\n@Component({\n selector: 'ngn-checkbox',\n templateUrl: './checkbox.html',\n imports: [NgnPt, NgnIcon],\n providers: [provideSelf(NgnCheckbox)],\n})\nexport class NgnCheckbox<Indeterminate extends boolean> extends ValueControlBase<\n 'checkbox',\n ValueType<Indeterminate>\n> {\n protected readonly theme = this.injectThemeTemplate(checkboxControlTemplate, {\n root: true,\n invalid: () => this.invalid(),\n });\n\n /**\n * Set a custom icon for the checked state.\n */\n public readonly iconChecked = input<IconType>();\n /**\n * Set a custom icon for the unchecked state.\n */\n public readonly iconUnchecked = input<IconType>();\n /**\n * Set a custom icon for the indeterminate state.\n */\n public readonly iconIndeterminate = input<IconType>();\n /**\n * Set whether to allow the indeterminate state.\n * If `true`, this will change the {@link value} type to `boolean | null`.\n */\n public readonly allowIndeterminate = input<Indeterminate>();\n protected readonly indeterminate = computed(\n () => this.allowIndeterminate() && this.value() === null\n );\n\n protected changed(event: Event) {\n const target = event.target as HTMLInputElement;\n this.value.set(target.checked);\n }\n\n protected onClick(event: Event) {\n if (this.readonly() || this.disabled()) {\n event.preventDefault();\n }\n }\n\n constructor() {\n super();\n }\n}\n","<div\n [ptInt]=\"this\"\n [ptClass]=\"{\n box: true,\n 'box-checked': !!value(),\n 'box-indeterminate': indeterminate(),\n }\"\n>\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': indeterminate(),\n }\"\n [icon]=\"iconIndeterminate()\"\n [defaultIcon]=\"'checkbox-indeterminate'\"\n />\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': !indeterminate() && !!value(),\n }\"\n [icon]=\"iconChecked()\"\n [defaultIcon]=\"'checkbox-checked'\"\n />\n @if (iconUnchecked()) {\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"{\n 'box-icon': true,\n 'box-icon-visible': !indeterminate() && !value(),\n }\"\n [icon]=\"iconUnchecked()\"\n />\n }\n</div>\n<input\n type=\"checkbox\"\n [checked]=\"value()\"\n (change)=\"changed($event)\"\n (click)=\"onClick($event)\"\n [indeterminate]=\"indeterminate()\"\n [ptInt]=\"this\"\n [ptClass]=\"'input'\"\n [attr.disabled]=\"disabled() ? '' : undefined\"\n [ariaReadOnly]=\"readonly() ? '' : undefined\"\n [ariaInvalid]=\"invalid() ? 'true' : undefined\"\n [attr.aria-label]=\"label()\"\n [ariaLabelledByElements]=\"labelledBy()\"\n (blur)=\"touched.set(true)\"\n [id]=\"inputId()\"\n/>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;AAWA;;AAEG;AAOG,MAAO,WAA2C,SAAQ,gBAG/D,CAAA;AACoB,IAAA,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,uBAAuB,EAAE;AAC3E,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,OAAO,EAAE,MAAM,IAAI,CAAC,OAAO,EAAE;AAC9B,KAAA,CAAC;AAEF;;AAEG;AACa,IAAA,WAAW,GAAG,KAAK;+FAAY;AAC/C;;AAEG;AACa,IAAA,aAAa,GAAG,KAAK;iGAAY;AACjD;;AAEG;AACa,IAAA,iBAAiB,GAAG,KAAK;qGAAY;AACrD;;;AAGG;AACa,IAAA,kBAAkB,GAAG,KAAK;sGAAiB;AACxC,IAAA,aAAa,GAAG,QAAQ,CACzC,MAAM,IAAI,CAAC,kBAAkB,EAAE,IAAI,IAAI,CAAC,KAAK,EAAE,KAAK,IAAI;sFACzD;AAES,IAAA,OAAO,CAAC,KAAY,EAAA;AAC5B,QAAA,MAAM,MAAM,GAAG,KAAK,CAAC,MAA0B;QAC/C,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC;IAChC;AAEU,IAAA,OAAO,CAAC,KAAY,EAAA;QAC5B,IAAI,IAAI,CAAC,QAAQ,EAAE,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;YACtC,KAAK,CAAC,cAAc,EAAE;QACxB;IACF;AAEA,IAAA,WAAA,GAAA;AACE,QAAA,KAAK,EAAE;IACT;uGA3CW,WAAW,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAX,IAAA,OAAA,IAAA,GAAA,EAAA,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AA,CAAA;kBANvB,SAAS;+BACE,cAAc,EAAA,OAAA,EAEf,CAAC,KAAK,EAAE,OAAO,CAAC,EAAA,SAAA,EACd,CAAC,WAAW,CAAA,WAAA,CAAa,CAAC,EAAA,QAAA,EAAA,wyCAAA,EAAA;;;AElBvC;;AAEG;;;;"}
@@ -0,0 +1,55 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { inject, input, booleanAttribute, output, Component } from '@angular/core';
4
+ import { NgnBase, NgnPt, provideSelf } from '@ngneers/controls/base';
5
+ import { I18n } from '@ngneers/controls/i18n';
6
+ import { NgnIcon } from '@ngneers/controls/icon';
7
+ import { chipControlTemplate } from '@ngneers/controls-themes/templates/chip';
8
+
9
+ /**
10
+ * @category control
11
+ */
12
+ class NgnChip extends NgnBase {
13
+ theme = this.injectThemeTemplate(chipControlTemplate, {
14
+ root: true,
15
+ closable: () => this.closable(),
16
+ actionable: () => this.actionable(),
17
+ });
18
+ i18n = inject(I18n).translations;
19
+ /**
20
+ * Set whether the chip can be closed (removed).
21
+ * @default false
22
+ */
23
+ closable = input(false, { ...(ngDevMode ? { debugName: "closable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
24
+ /**
25
+ * Set whether the chip is actionable (can be clicked).
26
+ * @default false
27
+ */
28
+ actionable = input(false, { ...(ngDevMode ? { debugName: "actionable" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
29
+ /**
30
+ * Set a custom icon for the close button.
31
+ */
32
+ iconClose = input(/* @ts-ignore */
33
+ ...(ngDevMode ? [undefined, { debugName: "iconClose" }] : /* istanbul ignore next */ []));
34
+ /**
35
+ * Emitted when the chip is closed (removed).
36
+ */
37
+ closed = output();
38
+ /**
39
+ * Emitted when the chip is clicked.
40
+ */
41
+ clicked = output();
42
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnChip, deps: null, target: i0.ɵɵFactoryTarget.Component });
43
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: NgnChip, isStandalone: true, selector: "ngn-chip", inputs: { closable: { classPropertyName: "closable", publicName: "closable", isSignal: true, isRequired: false, transformFunction: null }, actionable: { classPropertyName: "actionable", publicName: "actionable", isSignal: true, isRequired: false, transformFunction: null }, iconClose: { classPropertyName: "iconClose", publicName: "iconClose", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", clicked: "clicked" }, providers: [provideSelf(NgnChip)], usesInheritance: true, ngImport: i0, template: "@if (actionable()) {\n <button type=\"button\" [ptInt]=\"this\" [ptClass]=\"'content'\" (click)=\"clicked.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n} @else {\n <div [ptInt]=\"this\" [ptClass]=\"'content'\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n}\n\n@if (closable()) {\n <button\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'close-button'\"\n [attr.aria-label]=\"i18n['chip_close']()\"\n (click)=\"closed.emit($event)\"\n >\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'close-icon'\"\n [icon]=\"iconClose()\"\n [defaultIcon]=\"'chip-remove'\"\n />\n </button>\n}\n\n<ng-template #content>\n <ng-content />\n</ng-template>\n", dependencies: [{ kind: "directive", type: NgnPt, selector: "[ptInt]", inputs: ["ptInt", "ptClass", "ptDep"] }, { kind: "component", type: NgnIcon, selector: "ngn-icon", inputs: ["defaultIcon", "icon"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
44
+ }
45
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnChip, decorators: [{
46
+ type: Component,
47
+ args: [{ selector: 'ngn-chip', imports: [NgnPt, NgnIcon, NgTemplateOutlet], providers: [provideSelf(NgnChip)], template: "@if (actionable()) {\n <button type=\"button\" [ptInt]=\"this\" [ptClass]=\"'content'\" (click)=\"clicked.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n} @else {\n <div [ptInt]=\"this\" [ptClass]=\"'content'\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n}\n\n@if (closable()) {\n <button\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'close-button'\"\n [attr.aria-label]=\"i18n['chip_close']()\"\n (click)=\"closed.emit($event)\"\n >\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'close-icon'\"\n [icon]=\"iconClose()\"\n [defaultIcon]=\"'chip-remove'\"\n />\n </button>\n}\n\n<ng-template #content>\n <ng-content />\n</ng-template>\n" }]
48
+ }], propDecorators: { closable: [{ type: i0.Input, args: [{ isSignal: true, alias: "closable", required: false }] }], actionable: [{ type: i0.Input, args: [{ isSignal: true, alias: "actionable", required: false }] }], iconClose: [{ type: i0.Input, args: [{ isSignal: true, alias: "iconClose", required: false }] }], closed: [{ type: i0.Output, args: ["closed"] }], clicked: [{ type: i0.Output, args: ["clicked"] }] } });
49
+
50
+ /**
51
+ * Generated bundle index. Do not edit.
52
+ */
53
+
54
+ export { NgnChip };
55
+ //# sourceMappingURL=ngneers-controls-chip.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-chip.mjs","sources":["../../src/chip/chip.ts","../../src/chip/chip.html","../../src/chip/ngneers-controls-chip.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, Component, inject, input, output } from '@angular/core';\nimport { NgnBase, provideSelf, NgnPt } from '@ngneers/controls/base';\nimport { I18n } from '@ngneers/controls/i18n';\nimport { NgnIcon } from '@ngneers/controls/icon';\nimport { chipControlTemplate } from '@ngneers/controls-themes/templates/chip';\n\nimport type { IconType } from '@ngneers/controls-custom-types';\n\n/**\n * @category control\n */\n@Component({\n selector: 'ngn-chip',\n templateUrl: './chip.html',\n imports: [NgnPt, NgnIcon, NgTemplateOutlet],\n providers: [provideSelf(NgnChip)],\n})\nexport class NgnChip extends NgnBase<'chip'> {\n protected readonly theme = this.injectThemeTemplate(chipControlTemplate, {\n root: true,\n closable: () => this.closable(),\n actionable: () => this.actionable(),\n });\n protected readonly i18n = inject(I18n).translations;\n\n /**\n * Set whether the chip can be closed (removed).\n * @default false\n */\n public readonly closable = input(false, { transform: booleanAttribute });\n /**\n * Set whether the chip is actionable (can be clicked).\n * @default false\n */\n public readonly actionable = input(false, { transform: booleanAttribute });\n /**\n * Set a custom icon for the close button.\n */\n public readonly iconClose = input<IconType>();\n /**\n * Emitted when the chip is closed (removed).\n */\n public readonly closed = output<Event>();\n /**\n * Emitted when the chip is clicked.\n */\n public readonly clicked = output<Event>();\n}\n","@if (actionable()) {\n <button type=\"button\" [ptInt]=\"this\" [ptClass]=\"'content'\" (click)=\"clicked.emit($event)\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </button>\n} @else {\n <div [ptInt]=\"this\" [ptClass]=\"'content'\">\n <ng-container *ngTemplateOutlet=\"content\"></ng-container>\n </div>\n}\n\n@if (closable()) {\n <button\n type=\"button\"\n [ptInt]=\"this\"\n [ptClass]=\"'close-button'\"\n [attr.aria-label]=\"i18n['chip_close']()\"\n (click)=\"closed.emit($event)\"\n >\n <ngn-icon\n [ptInt]=\"this\"\n [ptClass]=\"'close-icon'\"\n [icon]=\"iconClose()\"\n [defaultIcon]=\"'chip-remove'\"\n />\n </button>\n}\n\n<ng-template #content>\n <ng-content />\n</ng-template>\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;AASA;;AAEG;AAOG,MAAO,OAAQ,SAAQ,OAAe,CAAA;AACvB,IAAA,KAAK,GAAG,IAAI,CAAC,mBAAmB,CAAC,mBAAmB,EAAE;AACvE,QAAA,IAAI,EAAE,IAAI;AACV,QAAA,QAAQ,EAAE,MAAM,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,EAAA,MAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,EAAA,SAAA,EAFP,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EChBnC,iwBA8BA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EDfY,KAAK,EAAA,QAAA,EAAA,SAAA,EAAA,MAAA,EAAA,CAAA,OAAA,EAAA,SAAA,EAAA,OAAA,CAAA,EAAA,EAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAE,OAAO,sFAAE,gBAAgB,EAAA,QAAA,EAAA,oBAAA,EAAA,MAAA,EAAA,CAAA,yBAAA,EAAA,kBAAA,EAAA,0BAAA,CAAA,EAAA,CAAA,EAAA,CAAA;;2FAG/B,OAAO,EAAA,UAAA,EAAA,CAAA;kBANnB,SAAS;AACE,YAAA,IAAA,EAAA,CAAA,EAAA,QAAA,EAAA,UAAU,EAAA,OAAA,EAEX,CAAC,KAAK,EAAE,OAAO,EAAE,gBAAgB,CAAC,EAAA,SAAA,EAChC,CAAC,WAAW,CAAA,OAAA,CAAS,CAAC,EAAA,QAAA,EAAA,iwBAAA,EAAA;;;AEhBnC;;AAEG;;;;"}
@@ -0,0 +1,82 @@
1
+ import tablerAlertCircle from '@iconify/icons-tabler/alert-circle';
2
+ import tablerAlertTriangle from '@iconify/icons-tabler/alert-triangle';
3
+ import tablerArrowsSort from '@iconify/icons-tabler/arrows-sort';
4
+ import tablerCalendar from '@iconify/icons-tabler/calendar';
5
+ import tablerCheck from '@iconify/icons-tabler/check';
6
+ import tablerChevronDown from '@iconify/icons-tabler/chevron-down';
7
+ import tablerChevronLeft from '@iconify/icons-tabler/chevron-left';
8
+ import tablerChevronRight from '@iconify/icons-tabler/chevron-right';
9
+ import tablerChevronUp from '@iconify/icons-tabler/chevron-up';
10
+ import tablerCircleCheck from '@iconify/icons-tabler/circle-check';
11
+ import tablerDots from '@iconify/icons-tabler/dots';
12
+ import tablerFilter from '@iconify/icons-tabler/filter';
13
+ import tablerFilterFilled from '@iconify/icons-tabler/filter-filled';
14
+ import tablerInfoCircle from '@iconify/icons-tabler/info-circle';
15
+ import tablerMinus from '@iconify/icons-tabler/minus';
16
+ import tablerRefresh from '@iconify/icons-tabler/refresh';
17
+ import tablerSearch from '@iconify/icons-tabler/search';
18
+ import tablerSortAscending from '@iconify/icons-tabler/sort-ascending';
19
+ import tablerSortDescending from '@iconify/icons-tabler/sort-descending';
20
+ import tablerUpload from '@iconify/icons-tabler/upload';
21
+ import tablerX from '@iconify/icons-tabler/x';
22
+ import { NGN_ICON_REGISTRY, NGN_CUSTOM_ICONS } from '@ngneers/controls/icon';
23
+
24
+ const NGN_DEFAULT_ICON_REGISTRY = {
25
+ 'accordion-collapse': { icon: tablerChevronUp, scale: 1.71 },
26
+ 'accordion-expand': { icon: tablerChevronDown, scale: 1.71 },
27
+ 'breadcrumb-separator': { icon: tablerChevronRight, scale: 1.71 },
28
+ 'breadcrumb-overflow': { icon: tablerDots, scale: 1.33 },
29
+ 'calendar-trigger': { icon: tablerCalendar, scale: 1.14 },
30
+ 'calendar-previous-month': { icon: tablerChevronLeft, scale: 1.71 },
31
+ 'calendar-next-month': { icon: tablerChevronRight, scale: 1.71 },
32
+ 'checkbox-checked': { icon: tablerCheck, scale: 1.41 },
33
+ 'checkbox-indeterminate': { icon: tablerMinus, scale: 1.5 },
34
+ 'chip-remove': { icon: tablerX, scale: 1.71 },
35
+ 'dialog-close': { icon: tablerX, scale: 1.71 },
36
+ 'drawer-close': { icon: tablerX, scale: 1.71 },
37
+ 'dropdown-toggle': { icon: tablerChevronDown, scale: 1.71 },
38
+ 'edit-confirm': { icon: tablerCheck, scale: 1.41 },
39
+ 'filter-active': { icon: tablerFilterFilled, scale: 1 },
40
+ 'filter-inactive': { icon: tablerFilter, scale: 1.12 },
41
+ 'filter-remove': { icon: tablerX, scale: 1.71 },
42
+ 'hint-info': { icon: tablerInfoCircle, scale: 1.14 },
43
+ 'hint-success': { icon: tablerCircleCheck, scale: 1.14 },
44
+ 'hint-warning': { icon: tablerAlertTriangle, scale: 1.14 },
45
+ 'hint-error': { icon: tablerAlertCircle, scale: 1.14 },
46
+ 'input-clear': { icon: tablerX, scale: 1.71 },
47
+ 'menu-submenu': { icon: tablerChevronRight, scale: 1.71 },
48
+ 'paginator-previous': { icon: tablerChevronLeft, scale: 1.71 },
49
+ 'paginator-next': { icon: tablerChevronRight, scale: 1.71 },
50
+ search: { icon: tablerSearch, scale: 1.2 },
51
+ 'sort-neutral': { icon: tablerArrowsSort, scale: 1.2 },
52
+ 'sort-ascending': { icon: tablerSortAscending, scale: 1.26 },
53
+ 'sort-descending': { icon: tablerSortDescending, scale: 1.26 },
54
+ 'spin-decrement': { icon: tablerChevronDown, scale: 1.71 },
55
+ 'spin-increment': { icon: tablerChevronUp, scale: 1.71 },
56
+ 'table-group-toggle': { icon: tablerChevronRight, scale: 1.71 },
57
+ 'tabs-scroll-left': { icon: tablerChevronLeft, scale: 1.71 },
58
+ 'tabs-scroll-right': { icon: tablerChevronRight, scale: 1.71 },
59
+ 'toast-close': { icon: tablerX, scale: 1.71 },
60
+ 'snackbar-close': { icon: tablerX, scale: 1.71 },
61
+ 'upload-trigger': { icon: tablerUpload, scale: 1.14 },
62
+ 'upload-done': { icon: tablerCircleCheck, scale: 1.14 },
63
+ 'upload-failed': { icon: tablerAlertCircle, scale: 1.14 },
64
+ 'upload-retry': { icon: tablerRefresh, scale: 1.33 },
65
+ 'upload-cancel': { icon: tablerX, scale: 1.71 },
66
+ 'upload-remove': { icon: tablerX, scale: 1.71 },
67
+ };
68
+ function withDefaultIcons() {
69
+ return {
70
+ providers: [
71
+ { provide: NGN_ICON_REGISTRY, useValue: NGN_DEFAULT_ICON_REGISTRY },
72
+ { provide: NGN_CUSTOM_ICONS, useValue: false },
73
+ ],
74
+ };
75
+ }
76
+
77
+ /**
78
+ * Generated bundle index. Do not edit.
79
+ */
80
+
81
+ export { withDefaultIcons };
82
+ //# sourceMappingURL=ngneers-controls-default-icons.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-default-icons.mjs","sources":["../../src/default-icons/provider.ts","../../src/default-icons/ngneers-controls-default-icons.ts"],"sourcesContent":["import tablerAlertCircle from '@iconify/icons-tabler/alert-circle';\nimport tablerAlertTriangle from '@iconify/icons-tabler/alert-triangle';\nimport tablerArrowsSort from '@iconify/icons-tabler/arrows-sort';\nimport tablerCalendar from '@iconify/icons-tabler/calendar';\nimport tablerCheck from '@iconify/icons-tabler/check';\nimport tablerChevronDown from '@iconify/icons-tabler/chevron-down';\nimport tablerChevronLeft from '@iconify/icons-tabler/chevron-left';\nimport tablerChevronRight from '@iconify/icons-tabler/chevron-right';\nimport tablerChevronUp from '@iconify/icons-tabler/chevron-up';\nimport tablerCircleCheck from '@iconify/icons-tabler/circle-check';\nimport tablerDots from '@iconify/icons-tabler/dots';\nimport tablerFilter from '@iconify/icons-tabler/filter';\nimport tablerFilterFilled from '@iconify/icons-tabler/filter-filled';\nimport tablerInfoCircle from '@iconify/icons-tabler/info-circle';\nimport tablerMinus from '@iconify/icons-tabler/minus';\nimport tablerRefresh from '@iconify/icons-tabler/refresh';\nimport tablerSearch from '@iconify/icons-tabler/search';\nimport tablerSortAscending from '@iconify/icons-tabler/sort-ascending';\nimport tablerSortDescending from '@iconify/icons-tabler/sort-descending';\nimport tablerUpload from '@iconify/icons-tabler/upload';\nimport tablerX from '@iconify/icons-tabler/x';\n\nimport { NGN_CUSTOM_ICONS, NGN_ICON_REGISTRY, type NgnIconRegistry } from '@ngneers/controls/icon';\n\nimport type { NgnFeature } from '@ngneers/controls/api/ng';\n\nconst NGN_DEFAULT_ICON_REGISTRY: NgnIconRegistry = {\n 'accordion-collapse': { icon: tablerChevronUp, scale: 1.71 },\n 'accordion-expand': { icon: tablerChevronDown, scale: 1.71 },\n 'breadcrumb-separator': { icon: tablerChevronRight, scale: 1.71 },\n 'breadcrumb-overflow': { icon: tablerDots, scale: 1.33 },\n 'calendar-trigger': { icon: tablerCalendar, scale: 1.14 },\n 'calendar-previous-month': { icon: tablerChevronLeft, scale: 1.71 },\n 'calendar-next-month': { icon: tablerChevronRight, scale: 1.71 },\n 'checkbox-checked': { icon: tablerCheck, scale: 1.41 },\n 'checkbox-indeterminate': { icon: tablerMinus, scale: 1.5 },\n 'chip-remove': { icon: tablerX, scale: 1.71 },\n 'dialog-close': { icon: tablerX, scale: 1.71 },\n 'drawer-close': { icon: tablerX, scale: 1.71 },\n 'dropdown-toggle': { icon: tablerChevronDown, scale: 1.71 },\n 'edit-confirm': { icon: tablerCheck, scale: 1.41 },\n 'filter-active': { icon: tablerFilterFilled, scale: 1 },\n 'filter-inactive': { icon: tablerFilter, scale: 1.12 },\n 'filter-remove': { icon: tablerX, scale: 1.71 },\n 'hint-info': { icon: tablerInfoCircle, scale: 1.14 },\n 'hint-success': { icon: tablerCircleCheck, scale: 1.14 },\n 'hint-warning': { icon: tablerAlertTriangle, scale: 1.14 },\n 'hint-error': { icon: tablerAlertCircle, scale: 1.14 },\n 'input-clear': { icon: tablerX, scale: 1.71 },\n 'menu-submenu': { icon: tablerChevronRight, scale: 1.71 },\n 'paginator-previous': { icon: tablerChevronLeft, scale: 1.71 },\n 'paginator-next': { icon: tablerChevronRight, scale: 1.71 },\n search: { icon: tablerSearch, scale: 1.2 },\n 'sort-neutral': { icon: tablerArrowsSort, scale: 1.2 },\n 'sort-ascending': { icon: tablerSortAscending, scale: 1.26 },\n 'sort-descending': { icon: tablerSortDescending, scale: 1.26 },\n 'spin-decrement': { icon: tablerChevronDown, scale: 1.71 },\n 'spin-increment': { icon: tablerChevronUp, scale: 1.71 },\n 'table-group-toggle': { icon: tablerChevronRight, scale: 1.71 },\n 'tabs-scroll-left': { icon: tablerChevronLeft, scale: 1.71 },\n 'tabs-scroll-right': { icon: tablerChevronRight, scale: 1.71 },\n 'toast-close': { icon: tablerX, scale: 1.71 },\n 'snackbar-close': { icon: tablerX, scale: 1.71 },\n 'upload-trigger': { icon: tablerUpload, scale: 1.14 },\n 'upload-done': { icon: tablerCircleCheck, scale: 1.14 },\n 'upload-failed': { icon: tablerAlertCircle, scale: 1.14 },\n 'upload-retry': { icon: tablerRefresh, scale: 1.33 },\n 'upload-cancel': { icon: tablerX, scale: 1.71 },\n 'upload-remove': { icon: tablerX, scale: 1.71 },\n};\n\nexport function withDefaultIcons(): NgnFeature {\n return {\n providers: [\n { provide: NGN_ICON_REGISTRY, useValue: NGN_DEFAULT_ICON_REGISTRY },\n { provide: NGN_CUSTOM_ICONS, useValue: false },\n ],\n };\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AA0BA,MAAM,yBAAyB,GAAoB;IACjD,oBAAoB,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,KAAK,EAAE,IAAI,EAAE;IAC5D,kBAAkB,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE;IAC5D,sBAAsB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE;IACjE,qBAAqB,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE;IACxD,kBAAkB,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,KAAK,EAAE,IAAI,EAAE;IACzD,yBAAyB,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,IAAI,EAAE;IACnE,qBAAqB,EAAE,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,IAAI,EAAE;IAChE,kBAAkB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,IAAI,EAAE;IACtD,wBAAwB,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,EAAE;IAC3D,aAAa,EA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CAChD;SAEe,gBAAgB,GAAA;IAC9B,OAAO;AACL,QAAA,SAAS,EAAE;AACT,YAAA,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,yBAAyB,EAAE;AACnE,YAAA,EAAE,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,KAAK,EAAE;AAC/C,SAAA;KACF;AACH;;AC9EA;;AAEG;;;;"}
@@ -0,0 +1,72 @@
1
+ import { NgTemplateOutlet } from '@angular/common';
2
+ import * as i0 from '@angular/core';
3
+ import { input, booleanAttribute, signal, effect, Component } from '@angular/core';
4
+ import { NgnBase, provideSelf } from '@ngneers/controls/base';
5
+
6
+ /**
7
+ * @category control
8
+ */
9
+ class NgnDefer extends NgnBase {
10
+ theme = null;
11
+ /**
12
+ * Template to render lazily. When omitted, the projected content
13
+ * (`ng-content`) is rendered instead.
14
+ */
15
+ lazyContent = input(undefined, /* @ts-ignore */
16
+ ...(ngDevMode ? [{ debugName: "lazyContent" }] : /* istanbul ignore next */ []));
17
+ /**
18
+ * Context object passed to {@link lazyContent} when it is rendered.
19
+ * @default null
20
+ */
21
+ lazyContentContext = input(null, /* @ts-ignore */
22
+ ...(ngDevMode ? [{ debugName: "lazyContentContext" }] : /* istanbul ignore next */ []));
23
+ /**
24
+ * Whether the deferred content is currently open (shown).
25
+ * @default false
26
+ */
27
+ open = input(false, { ...(ngDevMode ? { debugName: "open" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
28
+ /**
29
+ * Whether to defer rendering until first opened. When `false`, the content is
30
+ * rendered immediately regardless of {@link open}.
31
+ * @default true
32
+ */
33
+ lazy = input(true, { ...(ngDevMode ? { debugName: "lazy" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
34
+ /**
35
+ * Whether to keep the content rendered after it has been opened once, rather
36
+ * than tearing it down when {@link open} becomes `false`.
37
+ * @default false
38
+ */
39
+ cache = input(false, { ...(ngDevMode ? { debugName: "cache" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
40
+ /**
41
+ * Whether the host is visually hidden (but kept in the DOM) while closed.
42
+ * @default true
43
+ */
44
+ hiddenOnClosed = input(true, { ...(ngDevMode ? { debugName: "hiddenOnClosed" } : /* istanbul ignore next */ {}), transform: booleanAttribute });
45
+ hasBeenOpened = signal(false, /* @ts-ignore */
46
+ ...(ngDevMode ? [{ debugName: "hasBeenOpened" }] : /* istanbul ignore next */ []));
47
+ constructor() {
48
+ super();
49
+ effect(() => {
50
+ if (this.open()) {
51
+ this.hasBeenOpened.set(true);
52
+ }
53
+ });
54
+ }
55
+ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDefer, deps: [], target: i0.ɵɵFactoryTarget.Component });
56
+ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "22.0.5", type: NgnDefer, isStandalone: true, selector: "ngn-defer", inputs: { lazyContent: { classPropertyName: "lazyContent", publicName: "lazyContent", isSignal: true, isRequired: false, transformFunction: null }, lazyContentContext: { classPropertyName: "lazyContentContext", publicName: "lazyContentContext", isSignal: true, isRequired: false, transformFunction: null }, open: { classPropertyName: "open", publicName: "open", isSignal: true, isRequired: false, transformFunction: null }, lazy: { classPropertyName: "lazy", publicName: "lazy", isSignal: true, isRequired: false, transformFunction: null }, cache: { classPropertyName: "cache", publicName: "cache", isSignal: true, isRequired: false, transformFunction: null }, hiddenOnClosed: { classPropertyName: "hiddenOnClosed", publicName: "hiddenOnClosed", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.open": "open()", "class.hidden": "!open() && hiddenOnClosed()", "aria-hidden": "!open()" } }, providers: [provideSelf(NgnDefer)], usesInheritance: true, ngImport: i0, template: "@if (lazyContent()) {\n @if (open() || (cache() && hasBeenOpened()) || !lazy()) {\n <ng-container\n [ngTemplateOutlet]=\"lazyContent()\"\n [ngTemplateOutletContext]=\"lazyContentContext()\"\n />\n }\n} @else {\n <ng-content></ng-content>\n}\n", styles: [":host.hidden{visibility:hidden;position:absolute;top:-9999px;left:-9999px}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
57
+ }
58
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "22.0.5", ngImport: i0, type: NgnDefer, decorators: [{
59
+ type: Component,
60
+ args: [{ selector: 'ngn-defer', imports: [NgTemplateOutlet], providers: [provideSelf(NgnDefer)], host: {
61
+ '[class.open]': 'open()',
62
+ '[class.hidden]': '!open() && hiddenOnClosed()',
63
+ '[aria-hidden]': '!open()',
64
+ }, template: "@if (lazyContent()) {\n @if (open() || (cache() && hasBeenOpened()) || !lazy()) {\n <ng-container\n [ngTemplateOutlet]=\"lazyContent()\"\n [ngTemplateOutletContext]=\"lazyContentContext()\"\n />\n }\n} @else {\n <ng-content></ng-content>\n}\n", styles: [":host.hidden{visibility:hidden;position:absolute;top:-9999px;left:-9999px}\n"] }]
65
+ }], ctorParameters: () => [], propDecorators: { lazyContent: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyContent", required: false }] }], lazyContentContext: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazyContentContext", required: false }] }], open: [{ type: i0.Input, args: [{ isSignal: true, alias: "open", required: false }] }], lazy: [{ type: i0.Input, args: [{ isSignal: true, alias: "lazy", required: false }] }], cache: [{ type: i0.Input, args: [{ isSignal: true, alias: "cache", required: false }] }], hiddenOnClosed: [{ type: i0.Input, args: [{ isSignal: true, alias: "hiddenOnClosed", required: false }] }] } });
66
+
67
+ /**
68
+ * Generated bundle index. Do not edit.
69
+ */
70
+
71
+ export { NgnDefer };
72
+ //# sourceMappingURL=ngneers-controls-defer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ngneers-controls-defer.mjs","sources":["../../src/defer/defer.ts","../../src/defer/defer.html","../../src/defer/ngneers-controls-defer.ts"],"sourcesContent":["import { NgTemplateOutlet } from '@angular/common';\nimport { booleanAttribute, Component, effect, input, signal, TemplateRef } from '@angular/core';\nimport { NgnBase, provideSelf } from '@ngneers/controls/base';\n\n/**\n * @category control\n */\n@Component({\n selector: 'ngn-defer',\n templateUrl: './defer.html',\n imports: [NgTemplateOutlet],\n providers: [provideSelf(NgnDefer)],\n host: {\n '[class.open]': 'open()',\n '[class.hidden]': '!open() && hiddenOnClosed()',\n '[aria-hidden]': '!open()',\n },\n styles: [\n `\n :host.hidden {\n visibility: hidden;\n position: absolute;\n top: -9999px;\n left: -9999px;\n }\n `,\n ],\n})\nexport class NgnDefer<T> extends NgnBase<null> {\n protected readonly theme = null;\n /**\n * Template to render lazily. When omitted, the projected content\n * (`ng-content`) is rendered instead.\n */\n public readonly lazyContent = input<TemplateRef<T> | undefined | null>(undefined);\n /**\n * Context object passed to {@link lazyContent} when it is rendered.\n * @default null\n */\n public readonly lazyContentContext = input<T | null>(null);\n /**\n * Whether the deferred content is currently open (shown).\n * @default false\n */\n public readonly open = input(false, { transform: booleanAttribute });\n /**\n * Whether to defer rendering until first opened. When `false`, the content is\n * rendered immediately regardless of {@link open}.\n * @default true\n */\n public readonly lazy = input(true, { transform: booleanAttribute });\n /**\n * Whether to keep the content rendered after it has been opened once, rather\n * than tearing it down when {@link open} becomes `false`.\n * @default false\n */\n public readonly cache = input(false, { transform: booleanAttribute });\n /**\n * Whether the host is visually hidden (but kept in the DOM) while closed.\n * @default true\n */\n public readonly hiddenOnClosed = input(true, { transform: booleanAttribute });\n\n protected readonly hasBeenOpened = signal(false);\n\n constructor() {\n super();\n effect(() => {\n if (this.open()) {\n this.hasBeenOpened.set(true);\n }\n });\n }\n}\n","@if (lazyContent()) {\n @if (open() || (cache() && hasBeenOpened()) || !lazy()) {\n <ng-container\n [ngTemplateOutlet]=\"lazyContent()\"\n [ngTemplateOutletContext]=\"lazyContentContext()\"\n />\n }\n} @else {\n <ng-content></ng-content>\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"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