@spartan-ng/brain 0.0.1-alpha.493 → 0.0.1-alpha.494

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 (234) hide show
  1. package/accordion/index.d.ts +8 -8
  2. package/accordion/lib/{brn-accordion-content.component.d.ts → brn-accordion-content.d.ts} +3 -3
  3. package/accordion/lib/{brn-accordion.directive.d.ts → brn-accordion.d.ts} +11 -11
  4. package/alert-dialog/index.d.ts +20 -20
  5. package/alert-dialog/lib/brn-alert-dialog-content.d.ts +6 -0
  6. package/alert-dialog/lib/brn-alert-dialog-description.d.ts +6 -0
  7. package/alert-dialog/lib/brn-alert-dialog-overlay.d.ts +6 -0
  8. package/alert-dialog/lib/brn-alert-dialog-title.d.ts +6 -0
  9. package/alert-dialog/lib/brn-alert-dialog-trigger.d.ts +9 -0
  10. package/alert-dialog/lib/brn-alert-dialog.d.ts +7 -0
  11. package/avatar/index.d.ts +9 -9
  12. package/avatar/lib/brn-avatar.d.ts +7 -0
  13. package/avatar/lib/fallback/brn-avatar-fallback.d.ts +9 -0
  14. package/avatar/lib/fallback/index.d.ts +1 -1
  15. package/avatar/lib/image/brn-avatar-image.d.ts +9 -0
  16. package/avatar/lib/image/index.d.ts +1 -1
  17. package/calendar/index.d.ts +32 -32
  18. package/calendar/lib/{brn-calendar-cell-button.directive.d.ts → brn-calendar-cell-button.d.ts} +4 -4
  19. package/calendar/lib/brn-calendar-cell.d.ts +5 -0
  20. package/calendar/lib/brn-calendar-grid.d.ts +7 -0
  21. package/calendar/lib/brn-calendar-header.d.ts +7 -0
  22. package/calendar/lib/{brn-calendar-next-button.directive.d.ts → brn-calendar-next-button.d.ts} +3 -3
  23. package/calendar/lib/{brn-calendar-previous-button.directive.d.ts → brn-calendar-previous-button.d.ts} +3 -3
  24. package/calendar/lib/{brn-calendar-week.directive.d.ts → brn-calendar-week.d.ts} +4 -4
  25. package/calendar/lib/{brn-calendar-weekday.directive.d.ts → brn-calendar-weekday.d.ts} +4 -4
  26. package/calendar/lib/{brn-calendar.directive.d.ts → brn-calendar.d.ts} +8 -8
  27. package/calendar/lib/brn-calendar.token.d.ts +6 -6
  28. package/calendar/lib/mode/{brn-calendar-multiple.directive.d.ts → brn-calendar-multiple.d.ts} +9 -9
  29. package/checkbox/index.d.ts +5 -5
  30. package/checkbox/lib/{brn-checkbox.component.d.ts → brn-checkbox.d.ts} +3 -3
  31. package/collapsible/index.d.ts +11 -11
  32. package/collapsible/lib/{brn-collapsible-content.component.d.ts → brn-collapsible-content.d.ts} +5 -5
  33. package/collapsible/lib/brn-collapsible-trigger.d.ts +9 -0
  34. package/collapsible/lib/{brn-collapsible.component.d.ts → brn-collapsible.d.ts} +3 -3
  35. package/command/index.d.ts +20 -20
  36. package/command/lib/brn-command-empty.d.ts +11 -0
  37. package/command/lib/{brn-command-group.directive.d.ts → brn-command-group.d.ts} +3 -3
  38. package/command/lib/{brn-command-item.directive.d.ts → brn-command-item.d.ts} +3 -3
  39. package/command/lib/brn-command-item.token.d.ts +3 -3
  40. package/command/lib/brn-command-list.d.ts +8 -0
  41. package/command/lib/{brn-command-search-input.directive.d.ts → brn-command-search-input.d.ts} +3 -3
  42. package/command/lib/brn-command-search-input.token.d.ts +3 -3
  43. package/command/lib/{brn-command.directive.d.ts → brn-command.d.ts} +5 -5
  44. package/command/lib/brn-command.token.d.ts +4 -4
  45. package/dialog/index.d.ts +23 -23
  46. package/dialog/lib/brn-dialog-close.d.ts +8 -0
  47. package/dialog/lib/brn-dialog-content.d.ts +12 -0
  48. package/dialog/lib/{brn-dialog-description.directive.d.ts → brn-dialog-description.d.ts} +3 -3
  49. package/dialog/lib/brn-dialog-overlay.d.ts +9 -0
  50. package/dialog/lib/brn-dialog-title.d.ts +8 -0
  51. package/dialog/lib/brn-dialog-trigger.d.ts +18 -0
  52. package/dialog/lib/{brn-dialog.component.d.ts → brn-dialog.d.ts} +3 -3
  53. package/fesm2022/spartan-ng-brain-accordion.mjs +25 -36
  54. package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
  55. package/fesm2022/spartan-ng-brain-alert-dialog.mjs +79 -79
  56. package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
  57. package/fesm2022/spartan-ng-brain-avatar.mjs +16 -16
  58. package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -1
  59. package/fesm2022/spartan-ng-brain-calendar.mjs +239 -239
  60. package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
  61. package/fesm2022/spartan-ng-brain-checkbox.mjs +8 -8
  62. package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
  63. package/fesm2022/spartan-ng-brain-collapsible.mjs +17 -25
  64. package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
  65. package/fesm2022/spartan-ng-brain-command.mjs +195 -195
  66. package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
  67. package/fesm2022/spartan-ng-brain-dialog.mjs +98 -98
  68. package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
  69. package/fesm2022/spartan-ng-brain-form-field.mjs.map +1 -1
  70. package/fesm2022/spartan-ng-brain-forms.mjs +3 -2
  71. package/fesm2022/spartan-ng-brain-forms.mjs.map +1 -1
  72. package/fesm2022/spartan-ng-brain-hover-card.mjs +21 -29
  73. package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
  74. package/fesm2022/spartan-ng-brain-input-otp.mjs +44 -44
  75. package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
  76. package/fesm2022/spartan-ng-brain-label.mjs +8 -8
  77. package/fesm2022/spartan-ng-brain-label.mjs.map +1 -1
  78. package/fesm2022/spartan-ng-brain-menu.mjs +102 -131
  79. package/fesm2022/spartan-ng-brain-menu.mjs.map +1 -1
  80. package/fesm2022/spartan-ng-brain-popover.mjs +75 -86
  81. package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
  82. package/fesm2022/spartan-ng-brain-progress.mjs +28 -28
  83. package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -1
  84. package/fesm2022/spartan-ng-brain-radio-group.mjs +17 -17
  85. package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
  86. package/fesm2022/spartan-ng-brain-select.mjs +277 -277
  87. package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
  88. package/fesm2022/spartan-ng-brain-separator.mjs +8 -8
  89. package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -1
  90. package/fesm2022/spartan-ng-brain-sheet.mjs +69 -69
  91. package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
  92. package/fesm2022/spartan-ng-brain-slider.mjs +136 -142
  93. package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
  94. package/fesm2022/spartan-ng-brain-switch.mjs +26 -26
  95. package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
  96. package/fesm2022/spartan-ng-brain-tabs.mjs +28 -39
  97. package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
  98. package/fesm2022/spartan-ng-brain-toggle-group.mjs +18 -18
  99. package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
  100. package/fesm2022/spartan-ng-brain-toggle.mjs +9 -9
  101. package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
  102. package/fesm2022/spartan-ng-brain-tooltip.mjs +31 -42
  103. package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
  104. package/form-field/lib/brn-form-field-control.d.ts +2 -2
  105. package/forms/lib/error-options.d.ts +1 -1
  106. package/hover-card/index.d.ts +6 -6
  107. package/hover-card/lib/brn-hover-card-content.service.d.ts +9 -9
  108. package/hover-card/lib/brn-hover-card.d.ts +9 -0
  109. package/input-otp/index.d.ts +8 -8
  110. package/input-otp/lib/{brn-input-otp-slot.component.d.ts → brn-input-otp-slot.d.ts} +4 -4
  111. package/input-otp/lib/{brn-input-otp.component.d.ts → brn-input-otp.d.ts} +3 -3
  112. package/input-otp/lib/brn-input-otp.token.d.ts +4 -4
  113. package/label/index.d.ts +3 -3
  114. package/label/lib/{brn-label.directive.d.ts → brn-label.d.ts} +3 -3
  115. package/menu/index.d.ts +32 -32
  116. package/menu/lib/{brn-context-menu-trigger.directive.d.ts → brn-context-menu-trigger.d.ts} +3 -3
  117. package/menu/lib/brn-menu-bar.d.ts +6 -0
  118. package/menu/lib/brn-menu-group.d.ts +6 -0
  119. package/menu/lib/brn-menu-item-checkbox.d.ts +11 -0
  120. package/menu/lib/brn-menu-item-radio.d.ts +11 -0
  121. package/menu/lib/brn-menu-item.d.ts +10 -0
  122. package/menu/lib/brn-menu-trigger.d.ts +10 -0
  123. package/menu/lib/{brn-menu.directive.d.ts → brn-menu.d.ts} +3 -3
  124. package/package.json +1 -1
  125. package/popover/index.d.ts +14 -14
  126. package/popover/lib/brn-popover-close.d.ts +6 -0
  127. package/popover/lib/brn-popover-content.d.ts +6 -0
  128. package/popover/lib/brn-popover-trigger.d.ts +10 -0
  129. package/popover/lib/brn-popover.d.ts +12 -0
  130. package/progress/index.d.ts +8 -8
  131. package/progress/lib/{brn-progress-indicator.component.d.ts → brn-progress-indicator.d.ts} +4 -4
  132. package/progress/lib/{brn-progress.component.d.ts → brn-progress.d.ts} +3 -3
  133. package/progress/lib/brn-progress.token.d.ts +3 -3
  134. package/radio-group/index.d.ts +8 -8
  135. package/radio-group/lib/{brn-radio-group.directive.d.ts → brn-radio-group.d.ts} +6 -6
  136. package/radio-group/lib/brn-radio-group.token.d.ts +3 -3
  137. package/radio-group/lib/{brn-radio.component.d.ts → brn-radio.d.ts} +6 -6
  138. package/select/index.d.ts +29 -29
  139. package/select/lib/{brn-select-content.component.d.ts → brn-select-content.d.ts} +15 -15
  140. package/select/lib/brn-select-content.token.d.ts +3 -3
  141. package/select/lib/brn-select-group.d.ts +6 -0
  142. package/select/lib/brn-select-label.d.ts +9 -0
  143. package/select/lib/{brn-select-option.directive.d.ts → brn-select-option.d.ts} +5 -5
  144. package/select/lib/{brn-select-placeholder.directive.d.ts → brn-select-placeholder.d.ts} +3 -3
  145. package/select/lib/{brn-select-trigger.directive.d.ts → brn-select-trigger.d.ts} +4 -4
  146. package/select/lib/brn-select-value-template.d.ts +11 -0
  147. package/select/lib/{brn-select-value.component.d.ts → brn-select-value.d.ts} +8 -8
  148. package/select/lib/{brn-select.component.d.ts → brn-select.d.ts} +12 -12
  149. package/select/lib/brn-select.token.d.ts +3 -3
  150. package/separator/index.d.ts +3 -3
  151. package/separator/lib/{brn-separator.component.d.ts → brn-separator.d.ts} +3 -3
  152. package/sheet/index.d.ts +23 -23
  153. package/sheet/lib/brn-sheet-close.d.ts +6 -0
  154. package/sheet/lib/brn-sheet-content.d.ts +8 -0
  155. package/sheet/lib/brn-sheet-description.d.ts +6 -0
  156. package/sheet/lib/brn-sheet-overlay.d.ts +6 -0
  157. package/sheet/lib/brn-sheet-title.d.ts +6 -0
  158. package/sheet/lib/brn-sheet-trigger.d.ts +9 -0
  159. package/sheet/lib/brn-sheet.d.ts +10 -0
  160. package/slider/index.d.ts +11 -11
  161. package/slider/lib/brn-slider-range.d.ts +7 -0
  162. package/slider/lib/{brn-slider-thumb.directive.d.ts → brn-slider-thumb.d.ts} +4 -4
  163. package/slider/lib/brn-slider-tick.d.ts +12 -0
  164. package/slider/lib/{brn-slider-track.directive.d.ts → brn-slider-track.d.ts} +4 -4
  165. package/slider/lib/brn-slider-track.token.d.ts +4 -4
  166. package/slider/lib/{brn-slider.directive.d.ts → brn-slider.d.ts} +5 -5
  167. package/slider/lib/brn-slider.token.d.ts +3 -3
  168. package/switch/index.d.ts +8 -8
  169. package/switch/lib/brn-switch-thumb.d.ts +5 -0
  170. package/switch/lib/{brn-switch.component.d.ts → brn-switch.d.ts} +3 -3
  171. package/tabs/index.d.ts +15 -15
  172. package/tabs/lib/{brn-tabs-content.directive.d.ts → brn-tabs-content.d.ts} +3 -3
  173. package/tabs/lib/{brn-tabs-list.directive.d.ts → brn-tabs-list.d.ts} +6 -6
  174. package/tabs/lib/{brn-tabs-paginated-list.directive.d.ts → brn-tabs-paginated-list.d.ts} +3 -3
  175. package/tabs/lib/{brn-tabs-trigger.directive.d.ts → brn-tabs-trigger.d.ts} +4 -4
  176. package/tabs/lib/{brn-tabs.directive.d.ts → brn-tabs.d.ts} +9 -9
  177. package/toggle/index.d.ts +3 -3
  178. package/toggle/lib/{brn-toggle.directive.d.ts → brn-toggle.d.ts} +3 -3
  179. package/toggle-group/index.d.ts +6 -6
  180. package/toggle-group/lib/{brn-toggle-group.component.d.ts → brn-toggle-group.d.ts} +8 -8
  181. package/toggle-group/lib/brn-toggle-group.token.d.ts +3 -3
  182. package/toggle-group/lib/{brn-toggle-item.directive.d.ts → brn-toggle-item.d.ts} +4 -4
  183. package/tooltip/index.d.ts +14 -14
  184. package/tooltip/lib/brn-tooltip-content-template.d.ts +8 -0
  185. package/tooltip/lib/{brn-tooltip-content.component.d.ts → brn-tooltip-content.d.ts} +3 -3
  186. package/tooltip/lib/{brn-tooltip-trigger.directive.d.ts → brn-tooltip-trigger.d.ts} +3 -3
  187. package/tooltip/lib/brn-tooltip.d.ts +7 -0
  188. package/tooltip/lib/brn-tooltip.token.d.ts +1 -1
  189. package/alert-dialog/lib/brn-alert-dialog-content.directive.d.ts +0 -6
  190. package/alert-dialog/lib/brn-alert-dialog-description.directive.d.ts +0 -6
  191. package/alert-dialog/lib/brn-alert-dialog-overlay.component.d.ts +0 -6
  192. package/alert-dialog/lib/brn-alert-dialog-title.directive.d.ts +0 -6
  193. package/alert-dialog/lib/brn-alert-dialog-trigger.directive.d.ts +0 -9
  194. package/alert-dialog/lib/brn-alert-dialog.component.d.ts +0 -7
  195. package/avatar/lib/brn-avatar.component.d.ts +0 -7
  196. package/avatar/lib/fallback/brn-avatar-fallback.directive.d.ts +0 -9
  197. package/avatar/lib/image/brn-avatar-image.directive.d.ts +0 -9
  198. package/calendar/lib/brn-calendar-cell.directive.d.ts +0 -5
  199. package/calendar/lib/brn-calendar-grid.directive.d.ts +0 -7
  200. package/calendar/lib/brn-calendar-header.directive.d.ts +0 -7
  201. package/collapsible/lib/brn-collapsible-trigger.directive.d.ts +0 -9
  202. package/command/lib/brn-command-empty.directive.d.ts +0 -11
  203. package/command/lib/brn-command-list.directive.d.ts +0 -8
  204. package/dialog/lib/brn-dialog-close.directive.d.ts +0 -8
  205. package/dialog/lib/brn-dialog-content.directive.d.ts +0 -12
  206. package/dialog/lib/brn-dialog-overlay.component.d.ts +0 -9
  207. package/dialog/lib/brn-dialog-title.directive.d.ts +0 -8
  208. package/dialog/lib/brn-dialog-trigger.directive.d.ts +0 -18
  209. package/hover-card/lib/brn-hover-card.component.d.ts +0 -9
  210. package/menu/lib/brn-menu-bar.directive.d.ts +0 -6
  211. package/menu/lib/brn-menu-group.directive.d.ts +0 -6
  212. package/menu/lib/brn-menu-item-checkbox.directive.d.ts +0 -11
  213. package/menu/lib/brn-menu-item-radio.directive.d.ts +0 -11
  214. package/menu/lib/brn-menu-item.directive.d.ts +0 -10
  215. package/menu/lib/brn-menu-trigger.directive.d.ts +0 -10
  216. package/popover/lib/brn-popover-close.directive.d.ts +0 -6
  217. package/popover/lib/brn-popover-content.directive.d.ts +0 -6
  218. package/popover/lib/brn-popover-trigger.directive.d.ts +0 -10
  219. package/popover/lib/brn-popover.component.d.ts +0 -12
  220. package/select/lib/brn-select-group.directive.d.ts +0 -6
  221. package/select/lib/brn-select-label.directive.d.ts +0 -9
  222. package/select/lib/brn-select-value.directive.d.ts +0 -11
  223. package/sheet/lib/brn-sheet-close.directive.d.ts +0 -6
  224. package/sheet/lib/brn-sheet-content.directive.d.ts +0 -8
  225. package/sheet/lib/brn-sheet-description.directive.d.ts +0 -6
  226. package/sheet/lib/brn-sheet-overlay.component.d.ts +0 -6
  227. package/sheet/lib/brn-sheet-title.directive.d.ts +0 -6
  228. package/sheet/lib/brn-sheet-trigger.directive.d.ts +0 -9
  229. package/sheet/lib/brn-sheet.component.d.ts +0 -10
  230. package/slider/lib/brn-slider-range.directive.d.ts +0 -7
  231. package/slider/lib/brn-slider-tick.directive.d.ts +0 -12
  232. package/switch/lib/brn-switch-thumb.component.d.ts +0 -5
  233. package/tooltip/lib/brn-tooltip-content.directive.d.ts +0 -8
  234. package/tooltip/lib/brn-tooltip.directive.d.ts +0 -7
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-command.mjs","sources":["../../../../libs/brain/command/src/lib/brn-command.token.ts","../../../../libs/brain/command/src/lib/brn-command-empty.directive.ts","../../../../libs/brain/command/src/lib/brn-command-item.token.ts","../../../../libs/brain/command/src/lib/brn-command-group.directive.ts","../../../../libs/brain/command/src/lib/brn-command-item.directive.ts","../../../../libs/brain/command/src/lib/brn-command-list.directive.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.token.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.directive.ts","../../../../libs/brain/command/src/lib/brn-command.directive.ts","../../../../libs/brain/command/src/index.ts","../../../../libs/brain/command/src/spartan-ng-brain-command.ts"],"sourcesContent":["import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandDirective } from './brn-command.directive';\n\nexport const BrnCommandToken = new InjectionToken<BrnCommandDirective>('BrnCommandToken');\n\nexport function provideBrnCommand(command: Type<BrnCommandDirective>): ExistingProvider {\n\treturn { provide: BrnCommandToken, useExisting: command };\n}\n\nexport function injectBrnCommand(): BrnCommandDirective {\n\treturn inject(BrnCommandToken);\n}\n","import { computed, Directive, effect, inject, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommandEmpty]',\n})\nexport class BrnCommandEmptyDirective {\n\tprivate readonly _templateRef = inject<TemplateRef<void>>(TemplateRef);\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** Determine if the command has any visible items */\n\tprivate readonly _visible = computed(() => this._command.items().some((item) => item.visible()));\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tif (this._visible()) {\n\t\t\t\tthis._viewContainerRef.clear();\n\t\t\t} else {\n\t\t\t\tthis._viewContainerRef.createEmbeddedView(this._templateRef);\n\t\t\t}\n\t\t});\n\t}\n}\n","import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandItemDirective } from './brn-command-item.directive';\n\nexport const BrnCommandItemToken = new InjectionToken<BrnCommandItemDirective>('BrnCommandItemToken');\n\nexport function provideBrnCommandItem(command: Type<BrnCommandItemDirective>): ExistingProvider {\n\treturn { provide: BrnCommandItemToken, useExisting: command };\n}\n","import { computed, contentChildren, Directive, input } from '@angular/core';\nimport { BrnCommandItemToken } from './brn-command-item.token';\n\n@Directive({\n\tselector: '[brnCommandGroup]',\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.data-hidden]': '!_visible() ? \"\" : null',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandGroupDirective {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-group-${BrnCommandGroupDirective._id++}`);\n\n\t/** Get the items in the group */\n\tprivate readonly _items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** Determine if there are any visible items in the group */\n\tprotected readonly _visible = computed(() => this._items().some((item) => item.visible()));\n}\n","import { Highlightable } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tElementRef,\n\tHostListener,\n\tinject,\n\tinput,\n\tOnInit,\n\toutput,\n\tPLATFORM_ID,\n\tsignal,\n} from '@angular/core';\nimport { provideBrnCommandItem } from './brn-command-item.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'button[brnCommandItem]',\n\tproviders: [provideBrnCommandItem(BrnCommandItemDirective)],\n\thost: {\n\t\ttype: 'button',\n\t\trole: 'option',\n\t\ttabIndex: '-1',\n\t\t'[id]': 'id()',\n\t\t'[attr.disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-disabled]': '_disabled() ? \"\" : null',\n\t\t'[attr.data-value]': 'value()',\n\t\t'[attr.data-hidden]': \"!visible() ? '' : null\",\n\t\t'[attr.aria-selected]': '_active()',\n\t\t'[attr.data-selected]': \"_active() ? '' : null\",\n\t},\n})\nexport class BrnCommandItemDirective implements Highlightable, OnInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t/** Access the command component */\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** A unique id for the item */\n\tpublic readonly id = input(`brn-command-item-${BrnCommandItemDirective._id++}`);\n\n\t/** The value this item represents. */\n\tpublic readonly value = input.required<string>();\n\n\t/** Whether the item is disabled. */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tpublic readonly _disabled = input<boolean, BooleanInput>(false, {\n\t\talias: 'disabled',\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Expose disabled as a value - used by the Highlightable interface */\n\tpublic get disabled() {\n\t\treturn this._disabled();\n\t}\n\n\t/** Whether the item is initialized, this is to prevent accessing the value-input before the component is initialized.\n\t * The brn-command-empty directive accesses the value before the component is initialized, which causes an error.\n\t */\n\tprivate readonly _initialized = signal(false);\n\n\t/** Whether the item is selected. */\n\tprotected readonly _active = signal(false);\n\n\t/** Emits when the item is selected. */\n\tpublic readonly selected = output<void>();\n\n\t/** @internal Determine if this item is visible based on the current search query */\n\tpublic readonly visible = computed(() => {\n\t\treturn this._command.filter()(this.safeValue(), this._command.search());\n\t});\n\n\t/** @internal Get the value of the item, with check if it has been initialized to avoid errors */\n\tpublic safeValue = computed(() => {\n\t\tif (!this._initialized()) {\n\t\t\treturn '';\n\t\t}\n\t\treturn this.value();\n\t});\n\n\t/** @internal Get the display value */\n\tpublic getLabel(): string {\n\t\treturn this.safeValue();\n\t}\n\n\t/** @internal */\n\tsetActiveStyles(): void {\n\t\tthis._active.set(true);\n\n\t\t// ensure the item is in view\n\t\tif (isPlatformBrowser(this._platform)) {\n\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n\t\t}\n\t}\n\n\t/** @internal */\n\tsetInactiveStyles(): void {\n\t\tthis._active.set(false);\n\t}\n\n\t@HostListener('click')\n\tprotected onClick(): void {\n\t\tthis._command.keyManager.setActiveItem(this);\n\t\tthis.selected.emit();\n\t}\n\n\tngOnInit(): void {\n\t\tthis._initialized.set(true);\n\t}\n}\n","import { Directive, input } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCommandList]',\n\thost: {\n\t\trole: 'listbox',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandListDirective {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-list-${BrnCommandListDirective._id++}`);\n}\n","import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandSearchInputDirective } from './brn-command-search-input.directive';\n\nexport const BrnCommandSearchInputToken = new InjectionToken<BrnCommandSearchInputDirective>(\n\t'BrnCommandSearchInputToken',\n);\n\nexport function provideBrnCommandSearchInput(command: Type<BrnCommandSearchInputDirective>): ExistingProvider {\n\treturn { provide: BrnCommandSearchInputToken, useExisting: command };\n}\n","import {\n\tcomputed,\n\tDirective,\n\teffect,\n\tElementRef,\n\tforwardRef,\n\tInject,\n\tinput,\n\tOptional,\n\tRenderer2,\n\tsignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { COMPOSITION_BUFFER_MODE, DefaultValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { startWith } from 'rxjs/operators';\nimport { provideBrnCommandSearchInput } from './brn-command-search-input.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'input[brnCommandSearchInput]',\n\tproviders: [\n\t\tprovideBrnCommandSearchInput(BrnCommandSearchInputDirective),\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => BrnCommandSearchInputDirective),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\thost: {\n\t\trole: 'combobox',\n\t\t'aria-autocomplete': 'list',\n\t\t'[attr.aria-activedescendant]': '_activeDescendant()',\n\t\t'(keydown)': 'onKeyDown($event)',\n\t\t'(input)': 'onInput()',\n\t},\n})\nexport class BrnCommandSearchInputDirective extends DefaultValueAccessor {\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** The initial value of the search input */\n\tpublic readonly value = input<string>('');\n\n\t/** @internal The mutable value of the search input */\n\tpublic readonly mutableValue = computed(() => signal(this.value()));\n\n\t/** @internal The \"real\" value of the search input */\n\tpublic readonly valueState = computed(() => this.mutableValue()());\n\n\t/** The id of the active option */\n\tprotected readonly _activeDescendant = signal<string | undefined>(undefined);\n\n\tconstructor(\n\t\trenderer: Renderer2,\n\t\tprivate readonly elementRef: ElementRef,\n\t\t@Optional() @Inject(COMPOSITION_BUFFER_MODE) compositionMode: boolean,\n\t) {\n\t\tsuper(renderer, elementRef, compositionMode);\n\t\tthis._command.keyManager.change\n\t\t\t.pipe(startWith(this._command.keyManager.activeItemIndex), takeUntilDestroyed())\n\t\t\t.subscribe(() => this._activeDescendant.set(this._command.keyManager.activeItem?.id()));\n\t\teffect(() => {\n\t\t\tthis.elementRef.nativeElement.value = this.valueState();\n\t\t});\n\t}\n\t/** Listen for changes to the input value */\n\tprotected onInput(): void {\n\t\tthis.mutableValue().set(this.elementRef.nativeElement.value);\n\t}\n\n\t/** Listen for keydown events */\n\tprotected onKeyDown(event: KeyboardEvent): void {\n\t\tthis._command.keyManager.onKeydown(event);\n\t}\n\n\t/** CONROL VALUE ACCESSOR */\n\toverride writeValue(value: string | null): void {\n\t\tsuper.writeValue(value);\n\t\tif (value) {\n\t\t\tthis.mutableValue().set(value);\n\t\t}\n\t}\n}\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tAfterViewInit,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\teffect,\n\tHostListener,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\tPLATFORM_ID,\n\tuntracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { BrnCommandItemToken } from './brn-command-item.token';\nimport { BrnCommandSearchInputDirective } from './brn-command-search-input.directive';\nimport { provideBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommand]',\n\tproviders: [provideBrnCommand(BrnCommandDirective)],\n\thost: {\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandDirective implements AfterViewInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The id of the command */\n\tpublic readonly id = input<string>(`brn-command-${BrnCommandDirective._id++}`);\n\n\t/** The default filter function */\n\tprivate readonly _defaultFilter = (value: string, search: string) =>\n\t\tvalue.toLowerCase().includes(search.toLowerCase());\n\n\t/** A custom filter function to use when searching. */\n\tpublic readonly filter = input<CommandFilter>(this._defaultFilter);\n\n\t/** when the selection has changed */\n\tpublic readonly valueChange = output<string>();\n\n\t/** @internal The search query */\n\tpublic readonly search = computed(() => this._searchInput()?.valueState() ?? '');\n\n\t/** Access the search input if present */\n\tprivate readonly _searchInput = contentChild(BrnCommandSearchInputDirective, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal Access all the items within the commmand */\n\tpublic readonly items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal The key manager for managing active descendant */\n\tpublic readonly keyManager = new ActiveDescendantKeyManager(this.items, this._injector);\n\n\tconstructor() {\n\t\tthis.keyManager\n\t\t\t.withVerticalOrientation()\n\t\t\t.withHomeAndEnd()\n\t\t\t.withWrap()\n\t\t\t.skipPredicate((item) => item.disabled || !item.visible());\n\n\t\t// When clearing the search input we also want to reset the active item to the first one\n\t\teffect(() => {\n\t\t\tconst searchInput = this.search();\n\t\t\tuntracked(() => {\n\t\t\t\tconst activeItemIsVisible = this.keyManager.activeItem?.visible();\n\t\t\t\tif ((searchInput !== undefined && searchInput.length === 0) || !activeItemIsVisible) {\n\t\t\t\t\tthis.keyManager.setFirstItemActive();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tthis.keyManager.change.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\tconst value = this.keyManager.activeItem?.safeValue();\n\t\t\tif (value) {\n\t\t\t\tthis.valueChange.emit(value);\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\tif (isPlatformBrowser(this._platform) && this.items().length) {\n\t\t\tthis.keyManager.setActiveItem(0);\n\t\t}\n\t}\n\n\t@HostListener('keydown.enter')\n\tprotected selectActiveItem(): void {\n\t\tthis.keyManager.activeItem?.selected.emit();\n\t}\n}\n\nexport type CommandFilter = (value: string, search: string) => boolean;\n","import { NgModule } from '@angular/core';\nimport { BrnCommandEmptyDirective } from './lib/brn-command-empty.directive';\nimport { BrnCommandGroupDirective } from './lib/brn-command-group.directive';\nimport { BrnCommandItemDirective } from './lib/brn-command-item.directive';\nimport { BrnCommandListDirective } from './lib/brn-command-list.directive';\nimport { BrnCommandSearchInputDirective } from './lib/brn-command-search-input.directive';\nimport { BrnCommandDirective } from './lib/brn-command.directive';\n\nexport * from './lib/brn-command-empty.directive';\nexport * from './lib/brn-command-group.directive';\nexport * from './lib/brn-command-item.directive';\nexport * from './lib/brn-command-item.token';\nexport * from './lib/brn-command-list.directive';\nexport * from './lib/brn-command-search-input.directive';\nexport * from './lib/brn-command-search-input.token';\nexport * from './lib/brn-command.directive';\nexport * from './lib/brn-command.token';\n\nexport const BrnCommandImports = [\n\tBrnCommandEmptyDirective,\n\tBrnCommandGroupDirective,\n\tBrnCommandItemDirective,\n\tBrnCommandListDirective,\n\tBrnCommandSearchInputDirective,\n\tBrnCommandDirective,\n] as const;\n\n@NgModule({\n\timports: [...BrnCommandImports],\n\texports: [...BrnCommandImports],\n})\nexport class BrnCommandModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAGa,eAAe,GAAG,IAAI,cAAc,CAAsB,iBAAiB;AAElF,SAAU,iBAAiB,CAAC,OAAkC,EAAA;IACnE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE;AAC1D;SAEgB,gBAAgB,GAAA;AAC/B,IAAA,OAAO,MAAM,CAAC,eAAe,CAAC;AAC/B;;MCLa,wBAAwB,CAAA;AACnB,IAAA,YAAY,GAAG,MAAM,CAAoB,WAAW,CAAC;AACrD,IAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAC5C,QAAQ,GAAG,gBAAgB,EAAE;;IAG7B,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,IAAI,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC,CAAC;AAEhG,IAAA,WAAA,GAAA;QACC,MAAM,CAAC,MAAK;AACX,YAAA,IAAI,IAAI,CAAC,QAAQ,EAAE,EAAE;AACpB,gBAAA,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE;;iBACxB;gBACN,IAAI,CAAC,iBAAiB,CAAC,kBAAkB,CAAC,IAAI,CAAC,YAAY,CAAC;;AAE9D,SAAC,CAAC;;0HAfS,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;8GAAxB,wBAAwB,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAxB,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAHpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;A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AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,cAAc;AACxB,oBAAA,SAAS,EAAE,CAAC,iBAAiB,CAAA,mBAAA,CAAqB,CAAC;AACnD,oBAAA,IAAI,EAAE;AACL,wBAAA,MAAM,EAAE,MAAM;AACd,qBAAA;AACD,iBAAA;wDAsEU,gBAAgB,EAAA,CAAA;sBADzB,YAAY;uBAAC,eAAe;;;AC/EvB,MAAM,iBAAiB,GAAG;IAChC,wBAAwB;IACxB,wBAAwB;IACxB,uBAAuB;IACvB,uBAAuB;IACvB,8BAA8B;IAC9B,mBAAmB;;MAOP,gBAAgB,CAAA;0HAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAhB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAZ5B,wBAAwB;YACxB,wBAAwB;YACxB,uBAAuB;YACvB,uBAAuB;YACvB,8BAA8B;AAC9B,YAAA,mBAAmB,aALnB,wBAAwB;YACxB,wBAAwB;YACxB,uBAAuB;YACvB,uBAAuB;YACvB,8BAA8B;YAC9B,mBAAmB,CAAA,EAAA,CAAA;2HAOP,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,iBAAA;;;AC9BD;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-command.mjs","sources":["../../../../libs/brain/command/src/lib/brn-command-item.token.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.token.ts","../../../../libs/brain/command/src/lib/brn-command.token.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.ts","../../../../libs/brain/command/src/lib/brn-command.ts","../../../../libs/brain/command/src/lib/brn-command-empty.ts","../../../../libs/brain/command/src/lib/brn-command-group.ts","../../../../libs/brain/command/src/lib/brn-command-item.ts","../../../../libs/brain/command/src/lib/brn-command-list.ts","../../../../libs/brain/command/src/index.ts","../../../../libs/brain/command/src/spartan-ng-brain-command.ts"],"sourcesContent":["import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandItem } from './brn-command-item';\n\nexport const BrnCommandItemToken = new InjectionToken<BrnCommandItem>('BrnCommandItemToken');\n\nexport function provideBrnCommandItem(command: Type<BrnCommandItem>): ExistingProvider {\n\treturn { provide: BrnCommandItemToken, useExisting: command };\n}\n","import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandSearchInput } from './brn-command-search-input';\n\nexport const BrnCommandSearchInputToken = new InjectionToken<BrnCommandSearchInput>('BrnCommandSearchInputToken');\n\nexport function provideBrnCommandSearchInput(command: Type<BrnCommandSearchInput>): ExistingProvider {\n\treturn { provide: BrnCommandSearchInputToken, useExisting: command };\n}\n","import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommand } from './brn-command';\n\nexport const BrnCommandToken = new InjectionToken<BrnCommand>('BrnCommandToken');\n\nexport function provideBrnCommand(command: Type<BrnCommand>): ExistingProvider {\n\treturn { provide: BrnCommandToken, useExisting: command };\n}\n\nexport function injectBrnCommand(): BrnCommand {\n\treturn inject(BrnCommandToken);\n}\n","import {\n\tcomputed,\n\tDirective,\n\teffect,\n\tElementRef,\n\tforwardRef,\n\tInject,\n\tinput,\n\tOptional,\n\tRenderer2,\n\tsignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { COMPOSITION_BUFFER_MODE, DefaultValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { startWith } from 'rxjs/operators';\nimport { provideBrnCommandSearchInput } from './brn-command-search-input.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'input[brnCommandSearchInput]',\n\tproviders: [\n\t\tprovideBrnCommandSearchInput(BrnCommandSearchInput),\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => BrnCommandSearchInput),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\thost: {\n\t\trole: 'combobox',\n\t\t'aria-autocomplete': 'list',\n\t\t'[attr.aria-activedescendant]': '_activeDescendant()',\n\t\t'(keydown)': 'onKeyDown($event)',\n\t\t'(input)': 'onInput()',\n\t},\n})\nexport class BrnCommandSearchInput extends DefaultValueAccessor {\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** The initial value of the search input */\n\tpublic readonly value = input<string>('');\n\n\t/** @internal The mutable value of the search input */\n\tpublic readonly mutableValue = computed(() => signal(this.value()));\n\n\t/** @internal The \"real\" value of the search input */\n\tpublic readonly valueState = computed(() => this.mutableValue()());\n\n\t/** The id of the active option */\n\tprotected readonly _activeDescendant = signal<string | undefined>(undefined);\n\n\tconstructor(\n\t\trenderer: Renderer2,\n\t\tprivate readonly elementRef: ElementRef,\n\t\t@Optional() @Inject(COMPOSITION_BUFFER_MODE) compositionMode: boolean,\n\t) {\n\t\tsuper(renderer, elementRef, compositionMode);\n\t\tthis._command.keyManager.change\n\t\t\t.pipe(startWith(this._command.keyManager.activeItemIndex), takeUntilDestroyed())\n\t\t\t.subscribe(() => this._activeDescendant.set(this._command.keyManager.activeItem?.id()));\n\t\teffect(() => {\n\t\t\tthis.elementRef.nativeElement.value = this.valueState();\n\t\t});\n\t}\n\t/** Listen for changes to the input value */\n\tprotected onInput(): void {\n\t\tthis.mutableValue().set(this.elementRef.nativeElement.value);\n\t}\n\n\t/** Listen for keydown events */\n\tprotected onKeyDown(event: KeyboardEvent): void {\n\t\tthis._command.keyManager.onKeydown(event);\n\t}\n\n\t/** CONROL VALUE ACCESSOR */\n\toverride writeValue(value: string | null): void {\n\t\tsuper.writeValue(value);\n\t\tif (value) {\n\t\t\tthis.mutableValue().set(value);\n\t\t}\n\t}\n}\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tAfterViewInit,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\teffect,\n\tHostListener,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\tPLATFORM_ID,\n\tuntracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { BrnCommandItemToken } from './brn-command-item.token';\nimport { BrnCommandSearchInput } from './brn-command-search-input';\nimport { provideBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommand]',\n\tproviders: [provideBrnCommand(BrnCommand)],\n\thost: {\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommand implements AfterViewInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The id of the command */\n\tpublic readonly id = input<string>(`brn-command-${BrnCommand._id++}`);\n\n\t/** The default filter function */\n\tprivate readonly _defaultFilter = (value: string, search: string) =>\n\t\tvalue.toLowerCase().includes(search.toLowerCase());\n\n\t/** A custom filter function to use when searching. */\n\tpublic readonly filter = input<CommandFilter>(this._defaultFilter);\n\n\t/** when the selection has changed */\n\tpublic readonly valueChange = output<string>();\n\n\t/** @internal The search query */\n\tpublic readonly search = computed(() => this._searchInput()?.valueState() ?? '');\n\n\t/** Access the search input if present */\n\tprivate readonly _searchInput = contentChild(BrnCommandSearchInput, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal Access all the items within the commmand */\n\tpublic readonly items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal The key manager for managing active descendant */\n\tpublic readonly keyManager = new ActiveDescendantKeyManager(this.items, this._injector);\n\n\tconstructor() {\n\t\tthis.keyManager\n\t\t\t.withVerticalOrientation()\n\t\t\t.withHomeAndEnd()\n\t\t\t.withWrap()\n\t\t\t.skipPredicate((item) => item.disabled || !item.visible());\n\n\t\t// When clearing the search input we also want to reset the active item to the first one\n\t\teffect(() => {\n\t\t\tconst searchInput = this.search();\n\t\t\tuntracked(() => {\n\t\t\t\tconst activeItemIsVisible = this.keyManager.activeItem?.visible();\n\t\t\t\tif ((searchInput !== undefined && searchInput.length === 0) || !activeItemIsVisible) {\n\t\t\t\t\tthis.keyManager.setFirstItemActive();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tthis.keyManager.change.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\tconst value = this.keyManager.activeItem?.safeValue();\n\t\t\tif (value) {\n\t\t\t\tthis.valueChange.emit(value);\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\tif (isPlatformBrowser(this._platform) && this.items().length) {\n\t\t\tthis.keyManager.setActiveItem(0);\n\t\t}\n\t}\n\n\t@HostListener('keydown.enter')\n\tprotected selectActiveItem(): void {\n\t\tthis.keyManager.activeItem?.selected.emit();\n\t}\n}\n\nexport type CommandFilter = (value: string, search: string) => boolean;\n","import { computed, Directive, effect, inject, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommandEmpty]',\n})\nexport class BrnCommandEmpty {\n\tprivate readonly _templateRef = inject<TemplateRef<void>>(TemplateRef);\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** Determine if the command has any visible items */\n\tprivate readonly _visible = computed(() => this._command.items().some((item) => item.visible()));\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tif (this._visible()) {\n\t\t\t\tthis._viewContainerRef.clear();\n\t\t\t} else {\n\t\t\t\tthis._viewContainerRef.createEmbeddedView(this._templateRef);\n\t\t\t}\n\t\t});\n\t}\n}\n","import { computed, contentChildren, Directive, input } from '@angular/core';\nimport { BrnCommandItemToken } from './brn-command-item.token';\n\n@Directive({\n\tselector: '[brnCommandGroup]',\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.data-hidden]': '!_visible() ? \"\" : null',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandGroup {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-group-${BrnCommandGroup._id++}`);\n\n\t/** Get the items in the group */\n\tprivate readonly _items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** Determine if there are any visible items in the group */\n\tprotected readonly _visible = computed(() => this._items().some((item) => item.visible()));\n}\n","import { Highlightable } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tElementRef,\n\tHostListener,\n\tinject,\n\tinput,\n\tOnInit,\n\toutput,\n\tPLATFORM_ID,\n\tsignal,\n} from '@angular/core';\nimport { provideBrnCommandItem } from './brn-command-item.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'button[brnCommandItem]',\n\tproviders: [provideBrnCommandItem(BrnCommandItem)],\n\thost: {\n\t\ttype: 'button',\n\t\trole: 'option',\n\t\ttabIndex: '-1',\n\t\t'[id]': 'id()',\n\t\t'[attr.disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-disabled]': '_disabled() ? \"\" : null',\n\t\t'[attr.data-value]': 'value()',\n\t\t'[attr.data-hidden]': \"!visible() ? '' : null\",\n\t\t'[attr.aria-selected]': '_active()',\n\t\t'[attr.data-selected]': \"_active() ? '' : null\",\n\t},\n})\nexport class BrnCommandItem implements Highlightable, OnInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t/** Access the command component */\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** A unique id for the item */\n\tpublic readonly id = input(`brn-command-item-${BrnCommandItem._id++}`);\n\n\t/** The value this item represents. */\n\tpublic readonly value = input.required<string>();\n\n\t/** Whether the item is disabled. */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tpublic readonly _disabled = input<boolean, BooleanInput>(false, {\n\t\talias: 'disabled',\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Expose disabled as a value - used by the Highlightable interface */\n\tpublic get disabled() {\n\t\treturn this._disabled();\n\t}\n\n\t/** Whether the item is initialized, this is to prevent accessing the value-input before the component is initialized.\n\t * The brn-command-empty directive accesses the value before the component is initialized, which causes an error.\n\t */\n\tprivate readonly _initialized = signal(false);\n\n\t/** Whether the item is selected. */\n\tprotected readonly _active = signal(false);\n\n\t/** Emits when the item is selected. */\n\tpublic readonly selected = output<void>();\n\n\t/** @internal Determine if this item is visible based on the current search query */\n\tpublic readonly visible = computed(() => {\n\t\treturn this._command.filter()(this.safeValue(), this._command.search());\n\t});\n\n\t/** @internal Get the value of the item, with check if it has been initialized to avoid errors */\n\tpublic safeValue = computed(() => {\n\t\tif (!this._initialized()) {\n\t\t\treturn '';\n\t\t}\n\t\treturn this.value();\n\t});\n\n\t/** @internal Get the display value */\n\tpublic getLabel(): string {\n\t\treturn this.safeValue();\n\t}\n\n\t/** @internal */\n\tsetActiveStyles(): void {\n\t\tthis._active.set(true);\n\n\t\t// ensure the item is in view\n\t\tif (isPlatformBrowser(this._platform)) {\n\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n\t\t}\n\t}\n\n\t/** @internal */\n\tsetInactiveStyles(): void {\n\t\tthis._active.set(false);\n\t}\n\n\t@HostListener('click')\n\tprotected onClick(): void {\n\t\tthis._command.keyManager.setActiveItem(this);\n\t\tthis.selected.emit();\n\t}\n\n\tngOnInit(): void {\n\t\tthis._initialized.set(true);\n\t}\n}\n","import { Directive, input } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCommandList]',\n\thost: {\n\t\trole: 'listbox',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandList {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-list-${BrnCommandList._id++}`);\n}\n","import { NgModule } from '@angular/core';\nimport { BrnCommand } from './lib/brn-command';\nimport { BrnCommandEmpty } from './lib/brn-command-empty';\nimport { BrnCommandGroup } from './lib/brn-command-group';\nimport { BrnCommandItem } from './lib/brn-command-item';\nimport { BrnCommandList } from './lib/brn-command-list';\nimport { BrnCommandSearchInput } from './lib/brn-command-search-input';\n\nexport * from './lib/brn-command';\nexport * from './lib/brn-command-empty';\nexport * from './lib/brn-command-group';\nexport * from './lib/brn-command-item';\nexport * from './lib/brn-command-item.token';\nexport * from './lib/brn-command-list';\nexport * from './lib/brn-command-search-input';\nexport * from './lib/brn-command-search-input.token';\nexport * from './lib/brn-command.token';\n\nexport const BrnCommandImports = [\n\tBrnCommandEmpty,\n\tBrnCommandGroup,\n\tBrnCommandItem,\n\tBrnCommandList,\n\tBrnCommandSearchInput,\n\tBrnCommand,\n] as const;\n\n@NgModule({\n\timports: [...BrnCommandImports],\n\texports: [...BrnCommandImports],\n})\nexport class BrnCommandModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAGa,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB;AAErF,SAAU,qBAAqB,CAAC,OAA6B,EAAA;IAClE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,OAAO,EAAE;AAC9D;;MCJa,0BAA0B,GAAG,IAAI,cAAc,CAAwB,4BAA4B;AAE1G,SAAU,4BAA4B,CAAC,OAAoC,EAAA;IAChF,OAAO,EAAE,OAAO,EAAE,0BAA0B,EAAE,WAAW,EAAE,OAAO,EAAE;AACrE;;MCJa,eAAe,GAAG,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AAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAZ5B,eAAe;YACf,eAAe;YACf,cAAc;YACd,cAAc;YACd,qBAAqB;AACrB,YAAA,UAAU,aALV,eAAe;YACf,eAAe;YACf,cAAc;YACd,cAAc;YACd,qBAAqB;YACrB,UAAU,CAAA,EAAA,CAAA;2HAOE,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,iBAAA;;;AC9BD;;AAEG;;;;"}
@@ -1,11 +1,35 @@
1
1
  import * as i0 from '@angular/core';
2
- import { inject, input, Directive, InjectionToken, RendererFactory2, Injector, signal, computed, runInInjectionContext, effect, Injectable, ViewContainerRef, output, booleanAttribute, untracked, numberAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, TemplateRef, NgModule } from '@angular/core';
3
- import { coerceNumberProperty } from '@angular/cdk/coercion';
4
- import { Subject } from 'rxjs';
5
- import { take, takeUntil, filter } from 'rxjs/operators';
6
- import { provideExposesStateProviderExisting, provideCustomClassSettableExisting } from '@spartan-ng/brain/core';
2
+ import { InjectionToken, inject, RendererFactory2, Injector, signal, computed, runInInjectionContext, effect, Injectable, ViewContainerRef, output, input, booleanAttribute, untracked, numberAttribute, ViewEncapsulation, ChangeDetectionStrategy, Component, Directive, TemplateRef, NgModule } from '@angular/core';
7
3
  import { OverlayPositionBuilder, ScrollStrategyOptions } from '@angular/cdk/overlay';
4
+ import { take, takeUntil, filter } from 'rxjs/operators';
8
5
  import { DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
6
+ import { Subject } from 'rxjs';
7
+ import { coerceNumberProperty } from '@angular/cdk/coercion';
8
+ import { provideExposesStateProviderExisting, provideCustomClassSettableExisting } from '@spartan-ng/brain/core';
9
+
10
+ const defaultOptions = {
11
+ attachPositions: [],
12
+ autoFocus: 'first-tabbable',
13
+ closeDelay: 100,
14
+ closeOnBackdropClick: true,
15
+ closeOnOutsidePointerEvents: false,
16
+ disableClose: false,
17
+ hasBackdrop: true,
18
+ positionStrategy: null,
19
+ restoreFocus: true,
20
+ role: 'dialog',
21
+ scrollStrategy: null,
22
+ };
23
+ const BRN_DIALOG_DEFAULT_OPTIONS = new InjectionToken('brn-dialog-default-options', {
24
+ providedIn: 'root',
25
+ factory: () => defaultOptions,
26
+ });
27
+ function provideBrnDialogDefaultOptions(options) {
28
+ return { provide: BRN_DIALOG_DEFAULT_OPTIONS, useValue: { ...defaultOptions, ...options } };
29
+ }
30
+ function injectBrnDialogDefaultOptions() {
31
+ return inject(BRN_DIALOG_DEFAULT_OPTIONS, { optional: true }) ?? defaultOptions;
32
+ }
9
33
 
10
34
  // brn-dialog-utils.ts
11
35
  const cssClassesToArray = (classes, defaultClass = '') => {
@@ -70,49 +94,6 @@ class BrnDialogRef {
70
94
  }
71
95
  }
72
96
 
73
- class BrnDialogCloseDirective {
74
- _brnDialogRef = inject(BrnDialogRef);
75
- delay = input(undefined, { transform: coerceNumberProperty });
76
- close() {
77
- this._brnDialogRef.close(undefined, this.delay());
78
- }
79
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
80
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogCloseDirective, isStandalone: true, selector: "button[brnDialogClose]", inputs: { delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "close()" } }, ngImport: i0 });
81
- }
82
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogCloseDirective, decorators: [{
83
- type: Directive,
84
- args: [{
85
- selector: 'button[brnDialogClose]',
86
- host: {
87
- '(click)': 'close()',
88
- },
89
- }]
90
- }] });
91
-
92
- const defaultOptions = {
93
- attachPositions: [],
94
- autoFocus: 'first-tabbable',
95
- closeDelay: 100,
96
- closeOnBackdropClick: true,
97
- closeOnOutsidePointerEvents: false,
98
- disableClose: false,
99
- hasBackdrop: true,
100
- positionStrategy: null,
101
- restoreFocus: true,
102
- role: 'dialog',
103
- scrollStrategy: null,
104
- };
105
- const BRN_DIALOG_DEFAULT_OPTIONS = new InjectionToken('brn-dialog-default-options', {
106
- providedIn: 'root',
107
- factory: () => defaultOptions,
108
- });
109
- function provideBrnDialogDefaultOptions(options) {
110
- return { provide: BRN_DIALOG_DEFAULT_OPTIONS, useValue: { ...defaultOptions, ...options } };
111
- }
112
- function injectBrnDialogDefaultOptions() {
113
- return inject(BRN_DIALOG_DEFAULT_OPTIONS, { optional: true }) ?? defaultOptions;
114
- }
115
-
116
97
  let dialogSequence = 0;
117
98
  /** @deprecated `injectBrnDialogCtx` will no longer be supported once components are stable. Use `injectBrnDialogContext` instead. */
118
99
  const injectBrnDialogCtx = () => {
@@ -233,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
233
214
  args: [{ providedIn: 'root' }]
234
215
  }] });
235
216
 
236
- class BrnDialogComponent {
217
+ class BrnDialog {
237
218
  _dialogService = inject(BrnDialogService);
238
219
  _vcr = inject(ViewContainerRef);
239
220
  positionBuilder = inject(OverlayPositionBuilder);
@@ -387,12 +368,12 @@ class BrnDialogComponent {
387
368
  setAriaModal(ariaModal) {
388
369
  this._mutableAriaModal().set(ariaModal);
389
370
  }
390
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
391
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogComponent, isStandalone: true, selector: "brn-dialog", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, positionStrategy: { classPropertyName: "positionStrategy", publicName: "positionStrategy", isSignal: true, isRequired: false, transformFunction: null }, scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsidePointerEvents: { classPropertyName: "closeOnOutsidePointerEvents", publicName: "closeOnOutsidePointerEvents", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, attachTo: { classPropertyName: "attachTo", publicName: "attachTo", isSignal: true, isRequired: false, transformFunction: null }, attachPositions: { classPropertyName: "attachPositions", publicName: "attachPositions", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaModal: { classPropertyName: "ariaModal", publicName: "aria-modal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", stateChanged: "stateChanged" }, exportAs: ["brnDialog"], ngImport: i0, template: `
371
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialog, deps: [], target: i0.ɵɵFactoryTarget.Component });
372
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialog, isStandalone: true, selector: "brn-dialog", inputs: { state: { classPropertyName: "state", publicName: "state", isSignal: true, isRequired: false, transformFunction: null }, role: { classPropertyName: "role", publicName: "role", isSignal: true, isRequired: false, transformFunction: null }, hasBackdrop: { classPropertyName: "hasBackdrop", publicName: "hasBackdrop", isSignal: true, isRequired: false, transformFunction: null }, positionStrategy: { classPropertyName: "positionStrategy", publicName: "positionStrategy", isSignal: true, isRequired: false, transformFunction: null }, scrollStrategy: { classPropertyName: "scrollStrategy", publicName: "scrollStrategy", isSignal: true, isRequired: false, transformFunction: null }, restoreFocus: { classPropertyName: "restoreFocus", publicName: "restoreFocus", isSignal: true, isRequired: false, transformFunction: null }, closeOnOutsidePointerEvents: { classPropertyName: "closeOnOutsidePointerEvents", publicName: "closeOnOutsidePointerEvents", isSignal: true, isRequired: false, transformFunction: null }, closeOnBackdropClick: { classPropertyName: "closeOnBackdropClick", publicName: "closeOnBackdropClick", isSignal: true, isRequired: false, transformFunction: null }, attachTo: { classPropertyName: "attachTo", publicName: "attachTo", isSignal: true, isRequired: false, transformFunction: null }, attachPositions: { classPropertyName: "attachPositions", publicName: "attachPositions", isSignal: true, isRequired: false, transformFunction: null }, autoFocus: { classPropertyName: "autoFocus", publicName: "autoFocus", isSignal: true, isRequired: false, transformFunction: null }, closeDelay: { classPropertyName: "closeDelay", publicName: "closeDelay", isSignal: true, isRequired: false, transformFunction: null }, disableClose: { classPropertyName: "disableClose", publicName: "disableClose", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabelledBy: { classPropertyName: "ariaLabelledBy", publicName: "aria-labelledby", isSignal: true, isRequired: false, transformFunction: null }, ariaLabel: { classPropertyName: "ariaLabel", publicName: "aria-label", isSignal: true, isRequired: false, transformFunction: null }, ariaModal: { classPropertyName: "ariaModal", publicName: "aria-modal", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { closed: "closed", stateChanged: "stateChanged" }, exportAs: ["brnDialog"], ngImport: i0, template: `
392
373
  <ng-content />
393
374
  `, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
394
375
  }
395
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogComponent, decorators: [{
376
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialog, decorators: [{
396
377
  type: Component,
397
378
  args: [{
398
379
  selector: 'brn-dialog',
@@ -405,8 +386,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
405
386
  }]
406
387
  }], ctorParameters: () => [] });
407
388
 
408
- class BrnDialogContentDirective {
409
- _brnDialog = inject(BrnDialogComponent, { optional: true });
389
+ class BrnDialogClose {
390
+ _brnDialogRef = inject(BrnDialogRef);
391
+ delay = input(undefined, { transform: coerceNumberProperty });
392
+ close() {
393
+ this._brnDialogRef.close(undefined, this.delay());
394
+ }
395
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogClose, deps: [], target: i0.ɵɵFactoryTarget.Directive });
396
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogClose, isStandalone: true, selector: "button[brnDialogClose]", inputs: { delay: { classPropertyName: "delay", publicName: "delay", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "click": "close()" } }, ngImport: i0 });
397
+ }
398
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogClose, decorators: [{
399
+ type: Directive,
400
+ args: [{
401
+ selector: 'button[brnDialogClose]',
402
+ host: {
403
+ '(click)': 'close()',
404
+ },
405
+ }]
406
+ }] });
407
+
408
+ class BrnDialogContent {
409
+ _brnDialog = inject(BrnDialog, { optional: true });
410
410
  _brnDialogRef = inject(BrnDialogRef, { optional: true });
411
411
  _template = inject(TemplateRef);
412
412
  state = computed(() => this._brnDialog?.stateComputed() ?? this._brnDialogRef?.state() ?? 'closed');
@@ -429,18 +429,18 @@ class BrnDialogContentDirective {
429
429
  untracked(() => this._brnDialog?.setPanelClass(newClass));
430
430
  });
431
431
  }
432
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
433
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogContentDirective, isStandalone: true, selector: "[brnDialogContent]", inputs: { className: { classPropertyName: "className", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideExposesStateProviderExisting((() => BrnDialogContentDirective))], ngImport: i0 });
432
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogContent, deps: [], target: i0.ɵɵFactoryTarget.Directive });
433
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogContent, isStandalone: true, selector: "[brnDialogContent]", inputs: { className: { classPropertyName: "className", publicName: "class", isSignal: true, isRequired: false, transformFunction: null }, context: { classPropertyName: "context", publicName: "context", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideExposesStateProviderExisting((() => BrnDialogContent))], ngImport: i0 });
434
434
  }
435
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogContentDirective, decorators: [{
435
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogContent, decorators: [{
436
436
  type: Directive,
437
437
  args: [{
438
438
  selector: '[brnDialogContent]',
439
- providers: [provideExposesStateProviderExisting((() => BrnDialogContentDirective))],
439
+ providers: [provideExposesStateProviderExisting((() => BrnDialogContent))],
440
440
  }]
441
441
  }], ctorParameters: () => [] });
442
442
 
443
- class BrnDialogDescriptionDirective {
443
+ class BrnDialogDescription {
444
444
  _brnDialogRef = inject(BrnDialogRef);
445
445
  _id = signal(`brn-dialog-description-${this._brnDialogRef?.dialogId}`);
446
446
  constructor() {
@@ -448,10 +448,10 @@ class BrnDialogDescriptionDirective {
448
448
  this._brnDialogRef.setAriaDescribedBy(this._id());
449
449
  });
450
450
  }
451
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
452
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnDialogDescriptionDirective, isStandalone: true, selector: "[brnDialogDescription]", host: { properties: { "id": "_id()" } }, ngImport: i0 });
451
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogDescription, deps: [], target: i0.ɵɵFactoryTarget.Directive });
452
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnDialogDescription, isStandalone: true, selector: "[brnDialogDescription]", host: { properties: { "id": "_id()" } }, ngImport: i0 });
453
453
  }
454
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogDescriptionDirective, decorators: [{
454
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogDescription, decorators: [{
455
455
  type: Directive,
456
456
  args: [{
457
457
  selector: '[brnDialogDescription]',
@@ -461,8 +461,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
461
461
  }]
462
462
  }], ctorParameters: () => [] });
463
463
 
464
- class BrnDialogOverlayComponent {
465
- _brnDialog = inject(BrnDialogComponent);
464
+ class BrnDialogOverlay {
465
+ _brnDialog = inject(BrnDialog);
466
466
  className = input(undefined, { alias: 'class' });
467
467
  setClassToCustomElement(newClass) {
468
468
  this._brnDialog.setOverlayClass(newClass);
@@ -475,21 +475,21 @@ class BrnDialogOverlayComponent {
475
475
  untracked(() => this._brnDialog.setOverlayClass(newClass));
476
476
  });
477
477
  }
478
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
479
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogOverlayComponent, isStandalone: true, selector: "brn-dialog-overlay", inputs: { className: { classPropertyName: "className", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideCustomClassSettableExisting((() => BrnDialogOverlayComponent))], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
478
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogOverlay, deps: [], target: i0.ɵɵFactoryTarget.Component });
479
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogOverlay, isStandalone: true, selector: "brn-dialog-overlay", inputs: { className: { classPropertyName: "className", publicName: "class", isSignal: true, isRequired: false, transformFunction: null } }, providers: [provideCustomClassSettableExisting((() => BrnDialogOverlay))], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
480
480
  }
481
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogOverlayComponent, decorators: [{
481
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogOverlay, decorators: [{
482
482
  type: Component,
483
483
  args: [{
484
484
  selector: 'brn-dialog-overlay',
485
485
  template: '',
486
- providers: [provideCustomClassSettableExisting((() => BrnDialogOverlayComponent))],
486
+ providers: [provideCustomClassSettableExisting((() => BrnDialogOverlay))],
487
487
  changeDetection: ChangeDetectionStrategy.OnPush,
488
488
  encapsulation: ViewEncapsulation.None,
489
489
  }]
490
490
  }], ctorParameters: () => [] });
491
491
 
492
- class BrnDialogTitleDirective {
492
+ class BrnDialogTitle {
493
493
  _brnDialogRef = inject(BrnDialogRef);
494
494
  _id = signal(`brn-dialog-title-${this._brnDialogRef?.dialogId}`);
495
495
  constructor() {
@@ -497,10 +497,10 @@ class BrnDialogTitleDirective {
497
497
  this._brnDialogRef.setAriaLabelledBy(this._id());
498
498
  });
499
499
  }
500
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
501
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnDialogTitleDirective, isStandalone: true, selector: "[brnDialogTitle]", host: { properties: { "id": "_id()" } }, ngImport: i0 });
500
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTitle, deps: [], target: i0.ɵɵFactoryTarget.Directive });
501
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnDialogTitle, isStandalone: true, selector: "[brnDialogTitle]", host: { properties: { "id": "_id()" } }, ngImport: i0 });
502
502
  }
503
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTitleDirective, decorators: [{
503
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTitle, decorators: [{
504
504
  type: Directive,
505
505
  args: [{
506
506
  selector: '[brnDialogTitle]',
@@ -511,8 +511,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
511
511
  }], ctorParameters: () => [] });
512
512
 
513
513
  let idSequence = 0;
514
- class BrnDialogTriggerDirective {
515
- _brnDialog = inject(BrnDialogComponent, { optional: true });
514
+ class BrnDialogTrigger {
515
+ _brnDialog = inject(BrnDialog, { optional: true });
516
516
  _brnDialogRef = inject(BrnDialogRef, { optional: true });
517
517
  id = input(`brn-dialog-trigger-${idSequence++}`);
518
518
  state = computed(() => {
@@ -548,10 +548,10 @@ class BrnDialogTriggerDirective {
548
548
  open() {
549
549
  this._brnDialog?.open();
550
550
  }
551
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
552
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogTriggerDirective, isStandalone: true, selector: "button[brnDialogTrigger],button[brnDialogTriggerFor]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, brnDialogTriggerFor: { classPropertyName: "brnDialogTriggerFor", publicName: "brnDialogTriggerFor", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-haspopup": "dialog" }, listeners: { "click": "open()" }, properties: { "id": "id()", "attr.aria-expanded": "state() === 'open' ? 'true': 'false'", "attr.data-state": "state()", "attr.aria-controls": "dialogId" } }, exportAs: ["brnDialogTrigger"], ngImport: i0 });
551
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTrigger, deps: [], target: i0.ɵɵFactoryTarget.Directive });
552
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnDialogTrigger, isStandalone: true, selector: "button[brnDialogTrigger],button[brnDialogTriggerFor]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, brnDialogTriggerFor: { classPropertyName: "brnDialogTriggerFor", publicName: "brnDialogTriggerFor", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "aria-haspopup": "dialog" }, listeners: { "click": "open()" }, properties: { "id": "id()", "attr.aria-expanded": "state() === 'open' ? 'true': 'false'", "attr.data-state": "state()", "attr.aria-controls": "dialogId" } }, exportAs: ["brnDialogTrigger"], ngImport: i0 });
553
553
  }
554
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTriggerDirective, decorators: [{
554
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogTrigger, decorators: [{
555
555
  type: Directive,
556
556
  args: [{
557
557
  selector: 'button[brnDialogTrigger],button[brnDialogTriggerFor]',
@@ -587,29 +587,29 @@ const DEFAULT_BRN_DIALOG_OPTIONS = {
587
587
  };
588
588
 
589
589
  const BrnDialogImports = [
590
- BrnDialogComponent,
591
- BrnDialogOverlayComponent,
592
- BrnDialogTriggerDirective,
593
- BrnDialogCloseDirective,
594
- BrnDialogContentDirective,
595
- BrnDialogTitleDirective,
596
- BrnDialogDescriptionDirective,
590
+ BrnDialog,
591
+ BrnDialogOverlay,
592
+ BrnDialogTrigger,
593
+ BrnDialogClose,
594
+ BrnDialogContent,
595
+ BrnDialogTitle,
596
+ BrnDialogDescription,
597
597
  ];
598
598
  class BrnDialogModule {
599
599
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
600
- /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogModule, imports: [BrnDialogComponent,
601
- BrnDialogOverlayComponent,
602
- BrnDialogTriggerDirective,
603
- BrnDialogCloseDirective,
604
- BrnDialogContentDirective,
605
- BrnDialogTitleDirective,
606
- BrnDialogDescriptionDirective], exports: [BrnDialogComponent,
607
- BrnDialogOverlayComponent,
608
- BrnDialogTriggerDirective,
609
- BrnDialogCloseDirective,
610
- BrnDialogContentDirective,
611
- BrnDialogTitleDirective,
612
- BrnDialogDescriptionDirective] });
600
+ /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogModule, imports: [BrnDialog,
601
+ BrnDialogOverlay,
602
+ BrnDialogTrigger,
603
+ BrnDialogClose,
604
+ BrnDialogContent,
605
+ BrnDialogTitle,
606
+ BrnDialogDescription], exports: [BrnDialog,
607
+ BrnDialogOverlay,
608
+ BrnDialogTrigger,
609
+ BrnDialogClose,
610
+ BrnDialogContent,
611
+ BrnDialogTitle,
612
+ BrnDialogDescription] });
613
613
  /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogModule });
614
614
  }
615
615
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnDialogModule, decorators: [{
@@ -624,5 +624,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
624
624
  * Generated bundle index. Do not edit.
625
625
  */
626
626
 
627
- export { BrnDialogCloseDirective, BrnDialogComponent, BrnDialogContentDirective, BrnDialogDescriptionDirective, BrnDialogImports, BrnDialogModule, BrnDialogOverlayComponent, BrnDialogRef, BrnDialogService, BrnDialogTitleDirective, BrnDialogTriggerDirective, DEFAULT_BRN_DIALOG_OPTIONS, cssClassesToArray, defaultOptions, injectBrnDialogContext, injectBrnDialogCtx, injectBrnDialogDefaultOptions, provideBrnDialogDefaultOptions };
627
+ export { BrnDialog, BrnDialogClose, BrnDialogContent, BrnDialogDescription, BrnDialogImports, BrnDialogModule, BrnDialogOverlay, BrnDialogRef, BrnDialogService, BrnDialogTitle, BrnDialogTrigger, DEFAULT_BRN_DIALOG_OPTIONS, cssClassesToArray, defaultOptions, injectBrnDialogContext, injectBrnDialogCtx, injectBrnDialogDefaultOptions, provideBrnDialogDefaultOptions };
628
628
  //# sourceMappingURL=spartan-ng-brain-dialog.mjs.map