@spartan-ng/brain 0.0.1-alpha.373 → 0.0.1-alpha.379
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.
- package/accordion/README.md +3 -0
- package/accordion/index.d.ts +13 -0
- package/accordion/lib/brn-accordion-content.component.d.ts +15 -0
- package/accordion/lib/brn-accordion.directive.d.ts +47 -0
- package/alert-dialog/README.md +3 -0
- package/alert-dialog/index.d.ts +25 -0
- package/alert-dialog/lib/brn-alert-dialog-content.directive.d.ts +6 -0
- package/alert-dialog/lib/brn-alert-dialog-description.directive.d.ts +6 -0
- package/alert-dialog/lib/brn-alert-dialog-overlay.component.d.ts +6 -0
- package/alert-dialog/lib/brn-alert-dialog-title.directive.d.ts +6 -0
- package/alert-dialog/lib/brn-alert-dialog-trigger.directive.d.ts +8 -0
- package/alert-dialog/lib/brn-alert-dialog.component.d.ts +7 -0
- package/avatar/README.md +3 -0
- package/avatar/index.d.ts +17 -0
- package/avatar/lib/brn-avatar.component.d.ts +7 -0
- package/avatar/lib/fallback/brn-avatar-fallback.directive.d.ts +11 -0
- package/avatar/lib/fallback/index.d.ts +1 -0
- package/avatar/lib/image/brn-avatar-image.directive.d.ts +9 -0
- package/avatar/lib/image/index.d.ts +1 -0
- package/avatar/lib/util/hex-color-for.d.ts +1 -0
- package/avatar/lib/util/index.d.ts +3 -0
- package/avatar/lib/util/initials.pipe.d.ts +7 -0
- package/avatar/lib/util/is-bright.d.ts +1 -0
- package/calendar/README.md +3 -0
- package/calendar/index.d.ts +36 -0
- package/calendar/lib/brn-calendar-cell-button.directive.d.ts +59 -0
- package/calendar/lib/brn-calendar-cell.directive.d.ts +5 -0
- package/calendar/lib/brn-calendar-grid.directive.d.ts +7 -0
- package/calendar/lib/brn-calendar-header.directive.d.ts +7 -0
- package/calendar/lib/brn-calendar-next-button.directive.d.ts +13 -0
- package/calendar/lib/brn-calendar-previous-button.directive.d.ts +13 -0
- package/calendar/lib/brn-calendar-week.directive.d.ts +25 -0
- package/calendar/lib/brn-calendar-weekday.directive.d.ts +25 -0
- package/calendar/lib/brn-calendar.directive.d.ts +55 -0
- package/calendar/lib/brn-calendar.token.d.ts +8 -0
- package/calendar/lib/i18n/calendar-i18n.d.ts +17 -0
- package/checkbox/lib/brn-checkbox.component.d.ts +1 -1
- package/collapsible/README.md +3 -0
- package/collapsible/index.d.ts +16 -0
- package/collapsible/lib/brn-collapsible-content.component.d.ts +19 -0
- package/collapsible/lib/brn-collapsible-trigger.directive.d.ts +12 -0
- package/collapsible/lib/brn-collapsible.component.d.ts +11 -0
- package/command/README.md +3 -0
- package/command/index.d.ts +33 -0
- package/command/lib/brn-command-empty.directive.d.ts +6 -0
- package/command/lib/brn-command-group.component.d.ts +6 -0
- package/command/lib/brn-command-input.directive.d.ts +6 -0
- package/command/lib/brn-command-item.directive.d.ts +6 -0
- package/command/lib/brn-command-list.component.d.ts +6 -0
- package/command/lib/brn-command-loader.directive.d.ts +6 -0
- package/command/lib/brn-command-separator.component.d.ts +6 -0
- package/command/lib/brn-command.component.d.ts +6 -0
- package/date-time/README.md +3 -0
- package/date-time/index.d.ts +2 -0
- package/date-time/lib/date-adapter.d.ts +176 -0
- package/date-time/lib/native-date-adapter.d.ts +103 -0
- package/date-time-luxon/README.md +3 -0
- package/date-time-luxon/index.d.ts +1 -0
- package/date-time-luxon/lib/date-adapter.d.ts +29 -0
- package/dialog/README.md +3 -0
- package/dialog/index.d.ts +33 -0
- package/dialog/lib/brn-dialog-close.directive.d.ts +10 -0
- package/dialog/lib/brn-dialog-content.directive.d.ts +12 -0
- package/dialog/lib/brn-dialog-description.directive.d.ts +8 -0
- package/dialog/lib/brn-dialog-options.d.ts +26 -0
- package/dialog/lib/brn-dialog-overlay.component.d.ts +8 -0
- package/dialog/lib/brn-dialog-ref.d.ts +24 -0
- package/dialog/lib/brn-dialog-state.d.ts +1 -0
- package/dialog/lib/brn-dialog-title.directive.d.ts +8 -0
- package/dialog/lib/brn-dialog-trigger.directive.d.ts +16 -0
- package/dialog/lib/brn-dialog-utils.d.ts +1 -0
- package/dialog/lib/brn-dialog.component.d.ts +56 -0
- package/dialog/lib/brn-dialog.service.d.ts +22 -0
- package/esm2022/accordion/index.mjs +31 -0
- package/esm2022/accordion/lib/brn-accordion-content.component.mjs +50 -0
- package/esm2022/accordion/lib/brn-accordion.directive.mjs +180 -0
- package/esm2022/accordion/spartan-ng-brain-accordion.mjs +5 -0
- package/esm2022/alert-dialog/index.mjs +45 -0
- package/esm2022/alert-dialog/lib/brn-alert-dialog-content.directive.mjs +17 -0
- package/esm2022/alert-dialog/lib/brn-alert-dialog-description.directive.mjs +18 -0
- package/esm2022/alert-dialog/lib/brn-alert-dialog-overlay.component.mjs +20 -0
- package/esm2022/alert-dialog/lib/brn-alert-dialog-title.directive.mjs +18 -0
- package/esm2022/alert-dialog/lib/brn-alert-dialog-trigger.directive.mjs +27 -0
- package/esm2022/alert-dialog/lib/brn-alert-dialog.component.mjs +40 -0
- package/esm2022/alert-dialog/spartan-ng-brain-alert-dialog.mjs +5 -0
- package/esm2022/avatar/index.mjs +23 -0
- package/esm2022/avatar/lib/brn-avatar.component.mjs +31 -0
- package/esm2022/avatar/lib/fallback/brn-avatar-fallback.directive.mjs +21 -0
- package/esm2022/avatar/lib/fallback/index.mjs +2 -0
- package/esm2022/avatar/lib/image/brn-avatar-image.directive.mjs +29 -0
- package/esm2022/avatar/lib/image/index.mjs +2 -0
- package/esm2022/avatar/lib/util/hex-color-for.mjs +22 -0
- package/esm2022/avatar/lib/util/index.mjs +4 -0
- package/esm2022/avatar/lib/util/initials.pipe.mjs +27 -0
- package/esm2022/avatar/lib/util/is-bright.mjs +12 -0
- package/esm2022/avatar/spartan-ng-brain-avatar.mjs +5 -0
- package/esm2022/calendar/index.mjs +62 -0
- package/esm2022/calendar/lib/brn-calendar-cell-button.directive.mjs +160 -0
- package/esm2022/calendar/lib/brn-calendar-cell.directive.mjs +17 -0
- package/esm2022/calendar/lib/brn-calendar-grid.directive.mjs +21 -0
- package/esm2022/calendar/lib/brn-calendar-header.directive.mjs +22 -0
- package/esm2022/calendar/lib/brn-calendar-next-button.directive.mjs +42 -0
- package/esm2022/calendar/lib/brn-calendar-previous-button.directive.mjs +42 -0
- package/esm2022/calendar/lib/brn-calendar-week.directive.mjs +64 -0
- package/esm2022/calendar/lib/brn-calendar-weekday.directive.mjs +48 -0
- package/esm2022/calendar/lib/brn-calendar.directive.mjs +154 -0
- package/esm2022/calendar/lib/brn-calendar.token.mjs +12 -0
- package/esm2022/calendar/lib/i18n/calendar-i18n.mjs +33 -0
- package/esm2022/calendar/spartan-ng-brain-calendar.mjs +5 -0
- package/esm2022/checkbox/lib/brn-checkbox.component.mjs +1 -1
- package/esm2022/collapsible/index.mjs +30 -0
- package/esm2022/collapsible/lib/brn-collapsible-content.component.mjs +61 -0
- package/esm2022/collapsible/lib/brn-collapsible-trigger.directive.mjs +35 -0
- package/esm2022/collapsible/lib/brn-collapsible.component.mjs +33 -0
- package/esm2022/collapsible/spartan-ng-brain-collapsible.mjs +5 -0
- package/esm2022/command/index.mjs +64 -0
- package/esm2022/command/lib/brn-command-empty.directive.mjs +29 -0
- package/esm2022/command/lib/brn-command-group.component.mjs +45 -0
- package/esm2022/command/lib/brn-command-input.directive.mjs +29 -0
- package/esm2022/command/lib/brn-command-item.directive.mjs +36 -0
- package/esm2022/command/lib/brn-command-list.component.mjs +35 -0
- package/esm2022/command/lib/brn-command-loader.directive.mjs +29 -0
- package/esm2022/command/lib/brn-command-separator.component.mjs +30 -0
- package/esm2022/command/lib/brn-command.component.mjs +21 -0
- package/esm2022/command/spartan-ng-brain-command.mjs +5 -0
- package/esm2022/date-time/index.mjs +3 -0
- package/esm2022/date-time/lib/date-adapter.mjs +16 -0
- package/esm2022/date-time/lib/native-date-adapter.mjs +155 -0
- package/esm2022/date-time/spartan-ng-brain-date-time.mjs +5 -0
- package/esm2022/date-time-luxon/index.mjs +2 -0
- package/esm2022/date-time-luxon/lib/date-adapter.mjs +85 -0
- package/esm2022/date-time-luxon/spartan-ng-brain-date-time-luxon.mjs +5 -0
- package/esm2022/dialog/index.mjs +55 -0
- package/esm2022/dialog/lib/brn-dialog-close.directive.mjs +29 -0
- package/esm2022/dialog/lib/brn-dialog-content.directive.mjs +41 -0
- package/esm2022/dialog/lib/brn-dialog-description.directive.mjs +25 -0
- package/esm2022/dialog/lib/brn-dialog-options.mjs +19 -0
- package/esm2022/dialog/lib/brn-dialog-overlay.component.mjs +29 -0
- package/esm2022/dialog/lib/brn-dialog-ref.mjs +53 -0
- package/esm2022/dialog/lib/brn-dialog-state.mjs +2 -0
- package/esm2022/dialog/lib/brn-dialog-title.directive.mjs +25 -0
- package/esm2022/dialog/lib/brn-dialog-trigger.directive.mjs +39 -0
- package/esm2022/dialog/lib/brn-dialog-utils.mjs +12 -0
- package/esm2022/dialog/lib/brn-dialog.component.mjs +208 -0
- package/esm2022/dialog/lib/brn-dialog.service.mjs +127 -0
- package/esm2022/dialog/spartan-ng-brain-dialog.mjs +5 -0
- package/esm2022/form-field/index.mjs +2 -0
- package/esm2022/form-field/lib/brn-form-field-control.mjs +14 -0
- package/esm2022/form-field/spartan-ng-brain-form-field.mjs +5 -0
- package/esm2022/forms/index.mjs +4 -0
- package/esm2022/forms/lib/control-value-accessor.mjs +2 -0
- package/esm2022/forms/lib/error-options.mjs +26 -0
- package/esm2022/forms/lib/error-state-tracker.mjs +29 -0
- package/esm2022/forms/spartan-ng-brain-forms.mjs +5 -0
- package/esm2022/hover-card/index.mjs +29 -0
- package/esm2022/hover-card/lib/brn-hover-card-content.service.mjs +205 -0
- package/esm2022/hover-card/lib/brn-hover-card.component.mjs +34 -0
- package/esm2022/hover-card/lib/createHoverObservable.mjs +19 -0
- package/esm2022/hover-card/spartan-ng-brain-hover-card.mjs +5 -0
- package/esm2022/label/index.mjs +17 -0
- package/esm2022/label/lib/brn-label.directive.mjs +49 -0
- package/esm2022/label/spartan-ng-brain-label.mjs +5 -0
- package/esm2022/menu/index.mjs +100 -0
- package/esm2022/menu/lib/brn-context-menu-trigger.directive.mjs +40 -0
- package/esm2022/menu/lib/brn-menu-align.mjs +15 -0
- package/esm2022/menu/lib/brn-menu-bar.directive.mjs +17 -0
- package/esm2022/menu/lib/brn-menu-group.directive.mjs +17 -0
- package/esm2022/menu/lib/brn-menu-item-checkbox.directive.mjs +30 -0
- package/esm2022/menu/lib/brn-menu-item-radio.directive.mjs +30 -0
- package/esm2022/menu/lib/brn-menu-item.directive.mjs +27 -0
- package/esm2022/menu/lib/brn-menu-trigger.directive.mjs +36 -0
- package/esm2022/menu/lib/brn-menu.directive.mjs +50 -0
- package/esm2022/menu/spartan-ng-brain-menu.mjs +5 -0
- package/esm2022/popover/index.mjs +35 -0
- package/esm2022/popover/lib/brn-popover-close.directive.mjs +15 -0
- package/esm2022/popover/lib/brn-popover-content.directive.mjs +17 -0
- package/esm2022/popover/lib/brn-popover-trigger.directive.mjs +37 -0
- package/esm2022/popover/lib/brn-popover.component.mjs +81 -0
- package/esm2022/popover/spartan-ng-brain-popover.mjs +5 -0
- package/esm2022/progress/index.mjs +21 -0
- package/esm2022/progress/lib/brn-progress-indicator.component.mjs +22 -0
- package/esm2022/progress/lib/brn-progress.component.mjs +61 -0
- package/esm2022/progress/lib/brn-progress.token.mjs +9 -0
- package/esm2022/progress/spartan-ng-brain-progress.mjs +5 -0
- package/esm2022/radio-group/index.mjs +20 -0
- package/esm2022/radio-group/lib/brn-radio-group.component.mjs +90 -0
- package/esm2022/radio-group/lib/brn-radio-group.token.mjs +9 -0
- package/esm2022/radio-group/lib/brn-radio.component.mjs +185 -0
- package/esm2022/radio-group/spartan-ng-brain-radio-group.mjs +5 -0
- package/esm2022/select/index.mjs +56 -0
- package/esm2022/select/lib/brn-select-content.component.mjs +204 -0
- package/esm2022/select/lib/brn-select-group.directive.mjs +19 -0
- package/esm2022/select/lib/brn-select-label.directive.mjs +23 -0
- package/esm2022/select/lib/brn-select-option.directive.mjs +65 -0
- package/esm2022/select/lib/brn-select-value.component.mjs +46 -0
- package/esm2022/select/lib/brn-select.component.mjs +358 -0
- package/esm2022/select/lib/brn-select.service.mjs +197 -0
- package/esm2022/select/spartan-ng-brain-select.mjs +5 -0
- package/esm2022/separator/index.mjs +17 -0
- package/esm2022/separator/lib/brn-separator.component.mjs +24 -0
- package/esm2022/separator/spartan-ng-brain-separator.mjs +5 -0
- package/esm2022/sheet/index.mjs +50 -0
- package/esm2022/sheet/lib/brn-sheet-close.directive.mjs +15 -0
- package/esm2022/sheet/lib/brn-sheet-content.directive.mjs +25 -0
- package/esm2022/sheet/lib/brn-sheet-description.directive.mjs +18 -0
- package/esm2022/sheet/lib/brn-sheet-overlay.component.mjs +20 -0
- package/esm2022/sheet/lib/brn-sheet-title.directive.mjs +18 -0
- package/esm2022/sheet/lib/brn-sheet-trigger.directive.mjs +26 -0
- package/esm2022/sheet/lib/brn-sheet.component.mjs +55 -0
- package/esm2022/sheet/spartan-ng-brain-sheet.mjs +5 -0
- package/esm2022/slider/index.mjs +13 -0
- package/esm2022/slider/lib/brn-slider-thumb.directive.mjs +41 -0
- package/esm2022/slider/lib/brn-slider-tick-mark.directive.mjs +37 -0
- package/esm2022/slider/lib/brn-slider-track-active-fill.directive.mjs +29 -0
- package/esm2022/slider/lib/brn-slider-track.directive.mjs +290 -0
- package/esm2022/slider/spartan-ng-brain-slider.mjs +5 -0
- package/esm2022/switch/index.mjs +20 -0
- package/esm2022/switch/lib/brn-switch-thumb.component.mjs +16 -0
- package/esm2022/switch/lib/brn-switch.component.mjs +236 -0
- package/esm2022/switch/spartan-ng-brain-switch.mjs +5 -0
- package/esm2022/table/index.mjs +47 -0
- package/esm2022/table/lib/brn-cell-def.directive.mjs +22 -0
- package/esm2022/table/lib/brn-column-def.component.mjs +82 -0
- package/esm2022/table/lib/brn-column-manager.mjs +61 -0
- package/esm2022/table/lib/brn-footer-def.directive.mjs +22 -0
- package/esm2022/table/lib/brn-header-def.directive.mjs +22 -0
- package/esm2022/table/lib/brn-paginator.directive.mjs +109 -0
- package/esm2022/table/lib/brn-table.component.mjs +169 -0
- package/esm2022/table/spartan-ng-brain-table.mjs +5 -0
- package/esm2022/tabs/index.mjs +32 -0
- package/esm2022/tabs/lib/brn-tabs-list.directive.mjs +65 -0
- package/esm2022/tabs/lib/brn-tabs-paginated-list.directive.mjs +525 -0
- package/esm2022/tabs/lib/brn-tabs-trigger.directive.mjs +134 -0
- package/esm2022/tabs/spartan-ng-brain-tabs.mjs +5 -0
- package/esm2022/toggle/index.mjs +31 -0
- package/esm2022/toggle/lib/brn-toggle-group.component.mjs +159 -0
- package/esm2022/toggle/lib/brn-toggle-group.token.mjs +9 -0
- package/esm2022/toggle/lib/brn-toggle.directive.mjs +65 -0
- package/esm2022/toggle/spartan-ng-brain-toggle.mjs +5 -0
- package/esm2022/tooltip/index.mjs +35 -0
- package/esm2022/tooltip/lib/brn-tooltip-content.component.mjs +228 -0
- package/esm2022/tooltip/lib/brn-tooltip-content.directive.mjs +22 -0
- package/esm2022/tooltip/lib/brn-tooltip-trigger.directive.mjs +689 -0
- package/esm2022/tooltip/lib/brn-tooltip.directive.mjs +15 -0
- package/esm2022/tooltip/spartan-ng-brain-tooltip.mjs +5 -0
- package/fesm2022/spartan-ng-brain-accordion.mjs +259 -0
- package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs +162 -0
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-avatar.mjs +156 -0
- package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-calendar.mjs +629 -0
- package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs +152 -0
- package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-command.mjs +284 -0
- package/fesm2022/spartan-ng-brain-command.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-date-time-luxon.mjs +92 -0
- package/fesm2022/spartan-ng-brain-date-time-luxon.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-date-time.mjs +177 -0
- package/fesm2022/spartan-ng-brain-date-time.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-dialog.mjs +617 -0
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-form-field.mjs +21 -0
- package/fesm2022/spartan-ng-brain-form-field.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-forms.mjs +61 -0
- package/fesm2022/spartan-ng-brain-forms.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-hover-card.mjs +274 -0
- package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-label.mjs +69 -0
- package/fesm2022/spartan-ng-brain-label.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-menu.mjs +316 -0
- package/fesm2022/spartan-ng-brain-menu.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-popover.mjs +173 -0
- package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-progress.mjs +108 -0
- package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-radio-group.mjs +299 -0
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-select.mjs +928 -0
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-separator.mjs +44 -0
- package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-sheet.mjs +197 -0
- package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-slider.mjs +399 -0
- package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-switch.mjs +271 -0
- package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-table.mjs +506 -0
- package/fesm2022/spartan-ng-brain-table.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-tabs.mjs +748 -0
- package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-toggle.mjs +260 -0
- package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -0
- package/fesm2022/spartan-ng-brain-tooltip.mjs +975 -0
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -0
- package/form-field/README.md +3 -0
- package/form-field/index.d.ts +1 -0
- package/form-field/lib/brn-form-field-control.d.ts +11 -0
- package/forms/README.md +3 -0
- package/forms/index.d.ts +3 -0
- package/forms/lib/control-value-accessor.d.ts +2 -0
- package/forms/lib/error-options.d.ts +14 -0
- package/forms/lib/error-state-tracker.d.ts +15 -0
- package/hover-card/README.md +3 -0
- package/hover-card/index.d.ts +14 -0
- package/hover-card/lib/brn-hover-card-content.service.d.ts +65 -0
- package/hover-card/lib/brn-hover-card.component.d.ts +9 -0
- package/hover-card/lib/createHoverObservable.d.ts +4 -0
- package/label/README.md +3 -0
- package/label/index.d.ts +8 -0
- package/label/lib/brn-label.directive.d.ts +15 -0
- package/menu/README.md +3 -0
- package/menu/index.d.ts +49 -0
- package/menu/lib/brn-context-menu-trigger.directive.d.ts +13 -0
- package/menu/lib/brn-menu-align.d.ts +3 -0
- package/menu/lib/brn-menu-bar.directive.d.ts +6 -0
- package/menu/lib/brn-menu-group.directive.d.ts +6 -0
- package/menu/lib/brn-menu-item-checkbox.directive.d.ts +11 -0
- package/menu/lib/brn-menu-item-radio.directive.d.ts +11 -0
- package/menu/lib/brn-menu-item.directive.d.ts +10 -0
- package/menu/lib/brn-menu-trigger.directive.d.ts +10 -0
- package/menu/lib/brn-menu.directive.d.ts +11 -0
- package/package.json +182 -9
- package/popover/README.md +3 -0
- package/popover/index.d.ts +19 -0
- package/popover/lib/brn-popover-close.directive.d.ts +6 -0
- package/popover/lib/brn-popover-content.directive.d.ts +6 -0
- package/popover/lib/brn-popover-trigger.directive.d.ts +10 -0
- package/popover/lib/brn-popover.component.d.ts +14 -0
- package/progress/README.md +3 -0
- package/progress/index.d.ts +14 -0
- package/progress/lib/brn-progress-indicator.component.d.ts +6 -0
- package/progress/lib/brn-progress.component.d.ts +15 -0
- package/progress/lib/brn-progress.token.d.ts +4 -0
- package/radio-group/README.md +3 -0
- package/radio-group/index.d.ts +13 -0
- package/radio-group/lib/brn-radio-group.component.d.ts +57 -0
- package/radio-group/lib/brn-radio-group.token.d.ts +4 -0
- package/radio-group/lib/brn-radio.component.d.ts +58 -0
- package/select/README.md +3 -0
- package/select/index.d.ts +28 -0
- package/select/lib/brn-select-content.component.d.ts +50 -0
- package/select/lib/brn-select-group.directive.d.ts +6 -0
- package/select/lib/brn-select-label.directive.d.ts +9 -0
- package/select/lib/brn-select-option.directive.d.ts +25 -0
- package/select/lib/brn-select-value.component.d.ts +11 -0
- package/select/lib/brn-select.component.d.ts +82 -0
- package/select/lib/brn-select.service.d.ts +67 -0
- package/separator/README.md +3 -0
- package/separator/index.d.ts +8 -0
- package/separator/lib/brn-separator.component.d.ts +11 -0
- package/sheet/README.md +3 -0
- package/sheet/index.d.ts +28 -0
- package/sheet/lib/brn-sheet-close.directive.d.ts +6 -0
- package/sheet/lib/brn-sheet-content.directive.d.ts +8 -0
- package/sheet/lib/brn-sheet-description.directive.d.ts +6 -0
- package/sheet/lib/brn-sheet-overlay.component.d.ts +6 -0
- package/sheet/lib/brn-sheet-title.directive.d.ts +6 -0
- package/sheet/lib/brn-sheet-trigger.directive.d.ts +9 -0
- package/sheet/lib/brn-sheet.component.d.ts +9 -0
- package/slider/README.md +3 -0
- package/slider/index.d.ts +7 -0
- package/slider/lib/brn-slider-thumb.directive.d.ts +17 -0
- package/slider/lib/brn-slider-tick-mark.directive.d.ts +15 -0
- package/slider/lib/brn-slider-track-active-fill.directive.d.ts +10 -0
- package/slider/lib/brn-slider-track.directive.d.ts +139 -0
- package/switch/README.md +3 -0
- package/switch/index.d.ts +13 -0
- package/switch/lib/brn-switch-thumb.component.d.ts +5 -0
- package/switch/lib/brn-switch.component.d.ts +58 -0
- package/table/README.md +3 -0
- package/table/index.d.ts +26 -0
- package/table/lib/brn-cell-def.directive.d.ts +9 -0
- package/table/lib/brn-column-def.component.d.ts +18 -0
- package/table/lib/brn-column-manager.d.ts +26 -0
- package/table/lib/brn-footer-def.directive.d.ts +9 -0
- package/table/lib/brn-header-def.directive.d.ts +9 -0
- package/table/lib/brn-paginator.directive.d.ts +41 -0
- package/table/lib/brn-table.component.d.ts +37 -0
- package/tabs/README.md +3 -0
- package/tabs/index.d.ts +14 -0
- package/tabs/lib/brn-tabs-list.directive.d.ts +17 -0
- package/tabs/lib/brn-tabs-paginated-list.directive.d.ts +196 -0
- package/tabs/lib/brn-tabs-trigger.directive.d.ts +61 -0
- package/toggle/README.md +3 -0
- package/toggle/index.d.ts +15 -0
- package/toggle/lib/brn-toggle-group.component.d.ts +68 -0
- package/toggle/lib/brn-toggle-group.token.d.ts +4 -0
- package/toggle/lib/brn-toggle.directive.d.ts +25 -0
- package/tooltip/README.md +3 -0
- package/tooltip/index.d.ts +19 -0
- package/tooltip/lib/brn-tooltip-content.component.d.ts +73 -0
- package/tooltip/lib/brn-tooltip-content.directive.d.ts +8 -0
- package/tooltip/lib/brn-tooltip-trigger.directive.d.ts +177 -0
- package/tooltip/lib/brn-tooltip.directive.d.ts +7 -0
|
@@ -0,0 +1,617 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Directive, Input, RendererFactory2, Injector, signal, computed, runInInjectionContext, effect, Injectable, ViewContainerRef, EventEmitter, booleanAttribute, numberAttribute, Component, ChangeDetectionStrategy, ViewEncapsulation, Output, TemplateRef, input, NgModule } from '@angular/core';
|
|
3
|
+
import { coerceNumberProperty } from '@angular/cdk/coercion';
|
|
4
|
+
import { Subject, take, takeUntil, filter } from 'rxjs';
|
|
5
|
+
import { provideExposesStateProviderExisting, provideCustomClassSettableExisting } from '@spartan-ng/ui-core';
|
|
6
|
+
import { OverlayPositionBuilder, ScrollStrategyOptions } from '@angular/cdk/overlay';
|
|
7
|
+
import { DIALOG_DATA, Dialog } from '@angular/cdk/dialog';
|
|
8
|
+
|
|
9
|
+
// brn-dialog-utils.ts
|
|
10
|
+
const cssClassesToArray = (classes, defaultClass = '') => {
|
|
11
|
+
if (typeof classes === 'string') {
|
|
12
|
+
const splitClasses = classes.trim().split(' ');
|
|
13
|
+
if (splitClasses.length === 0) {
|
|
14
|
+
return [defaultClass];
|
|
15
|
+
}
|
|
16
|
+
return splitClasses;
|
|
17
|
+
}
|
|
18
|
+
return classes ?? [];
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
22
|
+
class BrnDialogRef {
|
|
23
|
+
_cdkDialogRef;
|
|
24
|
+
_open;
|
|
25
|
+
state;
|
|
26
|
+
dialogId;
|
|
27
|
+
_options;
|
|
28
|
+
_closing$ = new Subject();
|
|
29
|
+
closing$ = this._closing$.asObservable();
|
|
30
|
+
closed$;
|
|
31
|
+
_previousTimeout;
|
|
32
|
+
get open() {
|
|
33
|
+
return this.state() === 'open';
|
|
34
|
+
}
|
|
35
|
+
constructor(_cdkDialogRef, _open, state, dialogId, _options) {
|
|
36
|
+
this._cdkDialogRef = _cdkDialogRef;
|
|
37
|
+
this._open = _open;
|
|
38
|
+
this.state = state;
|
|
39
|
+
this.dialogId = dialogId;
|
|
40
|
+
this._options = _options;
|
|
41
|
+
this.closed$ = this._cdkDialogRef.closed.pipe(take(1));
|
|
42
|
+
}
|
|
43
|
+
close(result, delay = this._options?.closeDelay ?? 0) {
|
|
44
|
+
if (!this.open || this._options?.disableClose)
|
|
45
|
+
return;
|
|
46
|
+
this._closing$.next();
|
|
47
|
+
this._open.set(false);
|
|
48
|
+
if (this._previousTimeout) {
|
|
49
|
+
clearTimeout(this._previousTimeout);
|
|
50
|
+
}
|
|
51
|
+
this._previousTimeout = setTimeout(() => {
|
|
52
|
+
this._cdkDialogRef.close(result);
|
|
53
|
+
}, delay);
|
|
54
|
+
}
|
|
55
|
+
setPanelClass(paneClass) {
|
|
56
|
+
this._cdkDialogRef.config.panelClass = cssClassesToArray(paneClass);
|
|
57
|
+
}
|
|
58
|
+
setOverlayClass(overlayClass) {
|
|
59
|
+
this._cdkDialogRef.config.backdropClass = cssClassesToArray(overlayClass);
|
|
60
|
+
}
|
|
61
|
+
setAriaDescribedBy(ariaDescribedBy) {
|
|
62
|
+
this._cdkDialogRef.config.ariaDescribedBy = ariaDescribedBy;
|
|
63
|
+
}
|
|
64
|
+
setAriaLabelledBy(ariaLabelledBy) {
|
|
65
|
+
this._cdkDialogRef.config.ariaLabelledBy = ariaLabelledBy;
|
|
66
|
+
}
|
|
67
|
+
setAriaLabel(ariaLabel) {
|
|
68
|
+
this._cdkDialogRef.config.ariaLabel = ariaLabel;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
class BrnDialogCloseDirective {
|
|
73
|
+
_brnDialogRef = inject(BrnDialogRef);
|
|
74
|
+
_delay;
|
|
75
|
+
set delay(value) {
|
|
76
|
+
this._delay = coerceNumberProperty(value);
|
|
77
|
+
}
|
|
78
|
+
close() {
|
|
79
|
+
this._brnDialogRef.close(undefined, this._delay);
|
|
80
|
+
}
|
|
81
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogCloseDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
82
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnDialogCloseDirective, isStandalone: true, selector: "button[brnDialogClose]", inputs: { delay: "delay" }, host: { listeners: { "click": "close()" } }, ngImport: i0 });
|
|
83
|
+
}
|
|
84
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogCloseDirective, decorators: [{
|
|
85
|
+
type: Directive,
|
|
86
|
+
args: [{
|
|
87
|
+
selector: 'button[brnDialogClose]',
|
|
88
|
+
standalone: true,
|
|
89
|
+
host: {
|
|
90
|
+
'(click)': 'close()',
|
|
91
|
+
},
|
|
92
|
+
}]
|
|
93
|
+
}], propDecorators: { delay: [{
|
|
94
|
+
type: Input
|
|
95
|
+
}] } });
|
|
96
|
+
|
|
97
|
+
const DEFAULT_BRN_DIALOG_OPTIONS = {
|
|
98
|
+
role: 'dialog',
|
|
99
|
+
attachPositions: [],
|
|
100
|
+
attachTo: null,
|
|
101
|
+
autoFocus: 'first-tabbable',
|
|
102
|
+
backdropClass: '',
|
|
103
|
+
closeDelay: 0,
|
|
104
|
+
closeOnBackdropClick: true,
|
|
105
|
+
closeOnOutsidePointerEvents: false,
|
|
106
|
+
hasBackdrop: true,
|
|
107
|
+
panelClass: '',
|
|
108
|
+
positionStrategy: null,
|
|
109
|
+
restoreFocus: true,
|
|
110
|
+
scrollStrategy: null,
|
|
111
|
+
disableClose: false,
|
|
112
|
+
ariaLabel: undefined,
|
|
113
|
+
ariaModal: true,
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
let dialogSequence = 0;
|
|
117
|
+
/** @deprecated `injectBrnDialogCtx` will no longer be supported once components are stable. Use `injectBrnDialogContext` instead. */
|
|
118
|
+
const injectBrnDialogCtx = () => {
|
|
119
|
+
return inject(DIALOG_DATA);
|
|
120
|
+
};
|
|
121
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
122
|
+
const injectBrnDialogContext = (options = {}) => {
|
|
123
|
+
return inject(DIALOG_DATA, options);
|
|
124
|
+
};
|
|
125
|
+
class BrnDialogService {
|
|
126
|
+
_cdkDialog = inject(Dialog);
|
|
127
|
+
_rendererFactory = inject(RendererFactory2);
|
|
128
|
+
_renderer = this._rendererFactory.createRenderer(null, null);
|
|
129
|
+
_positionBuilder = inject(OverlayPositionBuilder);
|
|
130
|
+
_sso = inject(ScrollStrategyOptions);
|
|
131
|
+
_injector = inject(Injector);
|
|
132
|
+
open(content, vcr, context, options) {
|
|
133
|
+
if (options?.id && this._cdkDialog.getDialogById(options.id)) {
|
|
134
|
+
throw new Error(`Dialog with ID: ${options.id} already exists`);
|
|
135
|
+
}
|
|
136
|
+
const positionStrategy = options?.positionStrategy ??
|
|
137
|
+
(options?.attachTo && options?.attachPositions && options?.attachPositions?.length > 0
|
|
138
|
+
? this._positionBuilder?.flexibleConnectedTo(options.attachTo).withPositions(options.attachPositions ?? [])
|
|
139
|
+
: this._positionBuilder.global().centerHorizontally().centerVertically());
|
|
140
|
+
let brnDialogRef;
|
|
141
|
+
let effectRef;
|
|
142
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
143
|
+
const contextOrData = {
|
|
144
|
+
...context,
|
|
145
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
146
|
+
close: (result = undefined) => brnDialogRef.close(result, options?.closeDelay),
|
|
147
|
+
};
|
|
148
|
+
const destroyed$ = new Subject();
|
|
149
|
+
const open = signal(true);
|
|
150
|
+
const state = computed(() => (open() ? 'open' : 'closed'));
|
|
151
|
+
const dialogId = dialogSequence++;
|
|
152
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
153
|
+
// @ts-ignore
|
|
154
|
+
const cdkDialogRef = this._cdkDialog.open(content, {
|
|
155
|
+
id: options?.id ?? `brn-dialog-${dialogId}`,
|
|
156
|
+
role: options?.role,
|
|
157
|
+
viewContainerRef: vcr,
|
|
158
|
+
templateContext: () => ({
|
|
159
|
+
$implicit: contextOrData,
|
|
160
|
+
}),
|
|
161
|
+
data: contextOrData,
|
|
162
|
+
hasBackdrop: options?.hasBackdrop,
|
|
163
|
+
panelClass: cssClassesToArray(options?.panelClass),
|
|
164
|
+
backdropClass: cssClassesToArray(options?.backdropClass, 'bg-transparent'),
|
|
165
|
+
positionStrategy,
|
|
166
|
+
scrollStrategy: options?.scrollStrategy ?? this._sso?.block(),
|
|
167
|
+
restoreFocus: options?.restoreFocus,
|
|
168
|
+
disableClose: true,
|
|
169
|
+
autoFocus: options?.autoFocus ?? 'first-tabbable',
|
|
170
|
+
ariaDescribedBy: options?.ariaDescribedBy ?? `brn-dialog-description-${dialogId}`,
|
|
171
|
+
ariaLabelledBy: options?.ariaLabelledBy ?? `brn-dialog-title-${dialogId}`,
|
|
172
|
+
ariaLabel: options?.ariaLabel,
|
|
173
|
+
ariaModal: options?.ariaModal,
|
|
174
|
+
providers: (cdkDialogRef) => {
|
|
175
|
+
brnDialogRef = new BrnDialogRef(cdkDialogRef, open, state, dialogId, options);
|
|
176
|
+
runInInjectionContext(this._injector, () => {
|
|
177
|
+
effectRef = effect(() => {
|
|
178
|
+
if (overlay) {
|
|
179
|
+
this._renderer.setAttribute(overlay, 'data-state', state());
|
|
180
|
+
}
|
|
181
|
+
if (backdrop) {
|
|
182
|
+
this._renderer.setAttribute(backdrop, 'data-state', state());
|
|
183
|
+
}
|
|
184
|
+
});
|
|
185
|
+
});
|
|
186
|
+
const providers = [
|
|
187
|
+
{
|
|
188
|
+
provide: BrnDialogRef,
|
|
189
|
+
useValue: brnDialogRef,
|
|
190
|
+
},
|
|
191
|
+
];
|
|
192
|
+
if (options?.providers) {
|
|
193
|
+
if (typeof options.providers === 'function') {
|
|
194
|
+
providers.push(...options.providers());
|
|
195
|
+
}
|
|
196
|
+
if (Array.isArray(options.providers)) {
|
|
197
|
+
providers.push(...options.providers);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
return providers;
|
|
201
|
+
},
|
|
202
|
+
});
|
|
203
|
+
const overlay = cdkDialogRef.overlayRef.overlayElement;
|
|
204
|
+
const backdrop = cdkDialogRef.overlayRef.backdropElement;
|
|
205
|
+
if (options?.closeOnOutsidePointerEvents) {
|
|
206
|
+
cdkDialogRef.outsidePointerEvents.pipe(takeUntil(destroyed$)).subscribe(() => {
|
|
207
|
+
brnDialogRef.close(undefined, options?.closeDelay);
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
if (options?.closeOnBackdropClick) {
|
|
211
|
+
cdkDialogRef.backdropClick.pipe(takeUntil(destroyed$)).subscribe(() => {
|
|
212
|
+
brnDialogRef.close(undefined, options?.closeDelay);
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
if (!options?.disableClose) {
|
|
216
|
+
cdkDialogRef.keydownEvents
|
|
217
|
+
.pipe(filter((e) => e.key === 'Escape'), takeUntil(destroyed$))
|
|
218
|
+
.subscribe(() => {
|
|
219
|
+
brnDialogRef.close(undefined, options?.closeDelay);
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
cdkDialogRef.closed.pipe(takeUntil(destroyed$)).subscribe(() => {
|
|
223
|
+
effectRef?.destroy();
|
|
224
|
+
destroyed$.next();
|
|
225
|
+
});
|
|
226
|
+
return brnDialogRef;
|
|
227
|
+
}
|
|
228
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
229
|
+
/** @nocollapse */ static ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogService, providedIn: 'root' });
|
|
230
|
+
}
|
|
231
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogService, decorators: [{
|
|
232
|
+
type: Injectable,
|
|
233
|
+
args: [{ providedIn: 'root' }]
|
|
234
|
+
}] });
|
|
235
|
+
|
|
236
|
+
class BrnDialogComponent {
|
|
237
|
+
_dialogService = inject(BrnDialogService);
|
|
238
|
+
_vcr = inject(ViewContainerRef);
|
|
239
|
+
positionBuilder = inject(OverlayPositionBuilder);
|
|
240
|
+
ssos = inject(ScrollStrategyOptions);
|
|
241
|
+
_injector = inject(Injector);
|
|
242
|
+
_context = {};
|
|
243
|
+
_options = {
|
|
244
|
+
...DEFAULT_BRN_DIALOG_OPTIONS,
|
|
245
|
+
};
|
|
246
|
+
_contentTemplate;
|
|
247
|
+
_dialogRef = signal(undefined);
|
|
248
|
+
_dialogStateEffectRef;
|
|
249
|
+
state = computed(() => this._dialogRef()?.state() ?? 'closed');
|
|
250
|
+
closed = new EventEmitter();
|
|
251
|
+
stateChanged = new EventEmitter();
|
|
252
|
+
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
253
|
+
set newState(state) {
|
|
254
|
+
if (state === 'open') {
|
|
255
|
+
this.open();
|
|
256
|
+
}
|
|
257
|
+
if (state === 'closed') {
|
|
258
|
+
this.close(this._options.closeDelay);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
set role(role) {
|
|
262
|
+
this._options.role = role;
|
|
263
|
+
}
|
|
264
|
+
set hasBackdrop(hasBackdrop) {
|
|
265
|
+
this._options.hasBackdrop = hasBackdrop;
|
|
266
|
+
}
|
|
267
|
+
set positionStrategy(positionStrategy) {
|
|
268
|
+
this._options.positionStrategy = positionStrategy;
|
|
269
|
+
}
|
|
270
|
+
set scrollStrategy(scrollStrategy) {
|
|
271
|
+
if (scrollStrategy === 'close') {
|
|
272
|
+
this._options.scrollStrategy = this.ssos.close();
|
|
273
|
+
}
|
|
274
|
+
else if (scrollStrategy === 'reposition') {
|
|
275
|
+
this._options.scrollStrategy = this.ssos.reposition();
|
|
276
|
+
}
|
|
277
|
+
else {
|
|
278
|
+
this._options.scrollStrategy = scrollStrategy;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
set restoreFocus(restoreFocus) {
|
|
282
|
+
this._options.restoreFocus = restoreFocus;
|
|
283
|
+
}
|
|
284
|
+
set closeOnOutsidePointerEvents(closeOnOutsidePointerEvents) {
|
|
285
|
+
this._options.closeOnOutsidePointerEvents = closeOnOutsidePointerEvents;
|
|
286
|
+
}
|
|
287
|
+
set closeOnBackdropClick(closeOnBackdropClick) {
|
|
288
|
+
this._options.closeOnBackdropClick = closeOnBackdropClick;
|
|
289
|
+
}
|
|
290
|
+
set attachTo(attachTo) {
|
|
291
|
+
this._options.attachTo = attachTo;
|
|
292
|
+
}
|
|
293
|
+
set attachPositions(attachPositions) {
|
|
294
|
+
this._options.attachPositions = attachPositions;
|
|
295
|
+
}
|
|
296
|
+
set autoFocus(autoFocus) {
|
|
297
|
+
this._options.autoFocus = autoFocus;
|
|
298
|
+
}
|
|
299
|
+
set closeDelay(closeDelay) {
|
|
300
|
+
this._options.closeDelay = closeDelay;
|
|
301
|
+
}
|
|
302
|
+
set disableClose(disableClose) {
|
|
303
|
+
this._options.disableClose = disableClose;
|
|
304
|
+
}
|
|
305
|
+
/* eslint-disable-next-line @angular-eslint/no-input-rename */
|
|
306
|
+
set ariaDescribedBy(ariaDescribedBy) {
|
|
307
|
+
this.setAriaDescribedBy(ariaDescribedBy);
|
|
308
|
+
}
|
|
309
|
+
/* eslint-disable-next-line @angular-eslint/no-input-rename */
|
|
310
|
+
set ariaLabelledBy(ariaLabelledBy) {
|
|
311
|
+
this.setAriaLabelledBy(ariaLabelledBy);
|
|
312
|
+
}
|
|
313
|
+
set ariaLabel(ariaLabel) {
|
|
314
|
+
this.setAriaLabel(ariaLabel);
|
|
315
|
+
}
|
|
316
|
+
set ariaModal(isModal) {
|
|
317
|
+
this.setAriaModal(isModal);
|
|
318
|
+
}
|
|
319
|
+
open() {
|
|
320
|
+
if (!this._contentTemplate || this._dialogRef())
|
|
321
|
+
return;
|
|
322
|
+
this._dialogStateEffectRef?.destroy();
|
|
323
|
+
const dialogRef = this._dialogService.open(this._contentTemplate, this._vcr, this._context, this._options);
|
|
324
|
+
this._dialogRef.set(dialogRef);
|
|
325
|
+
runInInjectionContext(this._injector, () => {
|
|
326
|
+
this._dialogStateEffectRef = effect(() => this.stateChanged.emit(dialogRef.state()));
|
|
327
|
+
});
|
|
328
|
+
dialogRef.closed$.pipe(take(1)).subscribe((result) => {
|
|
329
|
+
this._dialogRef.set(undefined);
|
|
330
|
+
this.closed.emit(result);
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
334
|
+
close(result, delay) {
|
|
335
|
+
this._dialogRef()?.close(result, delay ?? this._options.closeDelay);
|
|
336
|
+
}
|
|
337
|
+
registerTemplate(template) {
|
|
338
|
+
this._contentTemplate = template;
|
|
339
|
+
}
|
|
340
|
+
setOverlayClass(overlayClass) {
|
|
341
|
+
this._options.backdropClass = overlayClass ?? '';
|
|
342
|
+
this._dialogRef()?.setOverlayClass(overlayClass);
|
|
343
|
+
}
|
|
344
|
+
setPanelClass(panelClass) {
|
|
345
|
+
this._options.panelClass = panelClass ?? '';
|
|
346
|
+
this._dialogRef()?.setPanelClass(panelClass);
|
|
347
|
+
}
|
|
348
|
+
setContext(context) {
|
|
349
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
350
|
+
// @ts-expect-error
|
|
351
|
+
this._context = { ...this._context, ...context };
|
|
352
|
+
}
|
|
353
|
+
setAriaDescribedBy(ariaDescribedBy) {
|
|
354
|
+
this._options = { ...this._options, ariaDescribedBy };
|
|
355
|
+
this._dialogRef()?.setAriaDescribedBy(ariaDescribedBy);
|
|
356
|
+
}
|
|
357
|
+
setAriaLabelledBy(ariaLabelledBy) {
|
|
358
|
+
this._options = { ...this._options, ariaLabelledBy };
|
|
359
|
+
this._dialogRef()?.setAriaLabelledBy(ariaLabelledBy);
|
|
360
|
+
}
|
|
361
|
+
setAriaLabel(ariaLabel) {
|
|
362
|
+
this._options = { ...this._options, ariaLabel };
|
|
363
|
+
this._dialogRef()?.setAriaLabel(ariaLabel);
|
|
364
|
+
}
|
|
365
|
+
setAriaModal(ariaModal) {
|
|
366
|
+
this._options = { ...this._options, ariaModal };
|
|
367
|
+
}
|
|
368
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
369
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.5", type: BrnDialogComponent, isStandalone: true, selector: "brn-dialog", inputs: { newState: ["state", "newState"], role: "role", hasBackdrop: ["hasBackdrop", "hasBackdrop", booleanAttribute], positionStrategy: "positionStrategy", scrollStrategy: "scrollStrategy", restoreFocus: "restoreFocus", closeOnOutsidePointerEvents: ["closeOnOutsidePointerEvents", "closeOnOutsidePointerEvents", booleanAttribute], closeOnBackdropClick: ["closeOnBackdropClick", "closeOnBackdropClick", booleanAttribute], attachTo: "attachTo", attachPositions: "attachPositions", autoFocus: "autoFocus", closeDelay: ["closeDelay", "closeDelay", numberAttribute], disableClose: ["disableClose", "disableClose", booleanAttribute], ariaDescribedBy: ["aria-describedby", "ariaDescribedBy"], ariaLabelledBy: ["aria-labelledby", "ariaLabelledBy"], ariaLabel: ["aria-label", "ariaLabel"], ariaModal: ["aria-modal", "ariaModal", booleanAttribute] }, outputs: { closed: "closed", stateChanged: "stateChanged" }, exportAs: ["brnDialog"], ngImport: i0, template: `
|
|
370
|
+
<ng-content />
|
|
371
|
+
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
372
|
+
}
|
|
373
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogComponent, decorators: [{
|
|
374
|
+
type: Component,
|
|
375
|
+
args: [{
|
|
376
|
+
selector: 'brn-dialog',
|
|
377
|
+
standalone: true,
|
|
378
|
+
template: `
|
|
379
|
+
<ng-content />
|
|
380
|
+
`,
|
|
381
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
382
|
+
encapsulation: ViewEncapsulation.None,
|
|
383
|
+
exportAs: 'brnDialog',
|
|
384
|
+
}]
|
|
385
|
+
}], propDecorators: { closed: [{
|
|
386
|
+
type: Output
|
|
387
|
+
}], stateChanged: [{
|
|
388
|
+
type: Output
|
|
389
|
+
}], newState: [{
|
|
390
|
+
type: Input,
|
|
391
|
+
args: ['state']
|
|
392
|
+
}], role: [{
|
|
393
|
+
type: Input
|
|
394
|
+
}], hasBackdrop: [{
|
|
395
|
+
type: Input,
|
|
396
|
+
args: [{ transform: booleanAttribute }]
|
|
397
|
+
}], positionStrategy: [{
|
|
398
|
+
type: Input
|
|
399
|
+
}], scrollStrategy: [{
|
|
400
|
+
type: Input
|
|
401
|
+
}], restoreFocus: [{
|
|
402
|
+
type: Input
|
|
403
|
+
}], closeOnOutsidePointerEvents: [{
|
|
404
|
+
type: Input,
|
|
405
|
+
args: [{ transform: booleanAttribute }]
|
|
406
|
+
}], closeOnBackdropClick: [{
|
|
407
|
+
type: Input,
|
|
408
|
+
args: [{ transform: booleanAttribute }]
|
|
409
|
+
}], attachTo: [{
|
|
410
|
+
type: Input
|
|
411
|
+
}], attachPositions: [{
|
|
412
|
+
type: Input
|
|
413
|
+
}], autoFocus: [{
|
|
414
|
+
type: Input
|
|
415
|
+
}], closeDelay: [{
|
|
416
|
+
type: Input,
|
|
417
|
+
args: [{ transform: numberAttribute }]
|
|
418
|
+
}], disableClose: [{
|
|
419
|
+
type: Input,
|
|
420
|
+
args: [{ transform: booleanAttribute }]
|
|
421
|
+
}], ariaDescribedBy: [{
|
|
422
|
+
type: Input,
|
|
423
|
+
args: ['aria-describedby']
|
|
424
|
+
}], ariaLabelledBy: [{
|
|
425
|
+
type: Input,
|
|
426
|
+
args: ['aria-labelledby']
|
|
427
|
+
}], ariaLabel: [{
|
|
428
|
+
type: Input,
|
|
429
|
+
args: ['aria-label']
|
|
430
|
+
}], ariaModal: [{
|
|
431
|
+
type: Input,
|
|
432
|
+
args: [{
|
|
433
|
+
alias: 'aria-modal',
|
|
434
|
+
transform: booleanAttribute,
|
|
435
|
+
}]
|
|
436
|
+
}] } });
|
|
437
|
+
|
|
438
|
+
class BrnDialogContentDirective {
|
|
439
|
+
_brnDialog = inject(BrnDialogComponent, { optional: true });
|
|
440
|
+
_brnDialogRef = inject(BrnDialogRef, { optional: true });
|
|
441
|
+
_template = inject(TemplateRef);
|
|
442
|
+
state = computed(() => this._brnDialog?.state() ?? this._brnDialogRef?.state() ?? 'closed');
|
|
443
|
+
set class(newClass) {
|
|
444
|
+
if (!this._brnDialog)
|
|
445
|
+
return;
|
|
446
|
+
this._brnDialog.setPanelClass(newClass);
|
|
447
|
+
}
|
|
448
|
+
set context(context) {
|
|
449
|
+
if (!this._brnDialog)
|
|
450
|
+
return;
|
|
451
|
+
this._brnDialog.setContext(context);
|
|
452
|
+
}
|
|
453
|
+
constructor() {
|
|
454
|
+
if (!this._brnDialog)
|
|
455
|
+
return;
|
|
456
|
+
this._brnDialog.registerTemplate(this._template);
|
|
457
|
+
}
|
|
458
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
459
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnDialogContentDirective, isStandalone: true, selector: "[brnDialogContent]", inputs: { class: "class", context: "context" }, providers: [provideExposesStateProviderExisting((() => BrnDialogContentDirective))], ngImport: i0 });
|
|
460
|
+
}
|
|
461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogContentDirective, decorators: [{
|
|
462
|
+
type: Directive,
|
|
463
|
+
args: [{
|
|
464
|
+
selector: '[brnDialogContent]',
|
|
465
|
+
standalone: true,
|
|
466
|
+
providers: [provideExposesStateProviderExisting((() => BrnDialogContentDirective))],
|
|
467
|
+
}]
|
|
468
|
+
}], ctorParameters: () => [], propDecorators: { class: [{
|
|
469
|
+
type: Input
|
|
470
|
+
}], context: [{
|
|
471
|
+
type: Input
|
|
472
|
+
}] } });
|
|
473
|
+
|
|
474
|
+
class BrnDialogDescriptionDirective {
|
|
475
|
+
_brnDialogRef = inject(BrnDialogRef);
|
|
476
|
+
_id = signal(`brn-dialog-description-${this._brnDialogRef?.dialogId}`);
|
|
477
|
+
constructor() {
|
|
478
|
+
effect(() => {
|
|
479
|
+
this._brnDialogRef.setAriaDescribedBy(this._id());
|
|
480
|
+
});
|
|
481
|
+
}
|
|
482
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogDescriptionDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
483
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnDialogDescriptionDirective, isStandalone: true, selector: "[brnDialogDescription]", host: { properties: { "id": "_id()" } }, ngImport: i0 });
|
|
484
|
+
}
|
|
485
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogDescriptionDirective, decorators: [{
|
|
486
|
+
type: Directive,
|
|
487
|
+
args: [{
|
|
488
|
+
selector: '[brnDialogDescription]',
|
|
489
|
+
standalone: true,
|
|
490
|
+
host: {
|
|
491
|
+
'[id]': '_id()',
|
|
492
|
+
},
|
|
493
|
+
}]
|
|
494
|
+
}], ctorParameters: () => [] });
|
|
495
|
+
|
|
496
|
+
class BrnDialogOverlayComponent {
|
|
497
|
+
_brnDialog = inject(BrnDialogComponent);
|
|
498
|
+
set class(newClass) {
|
|
499
|
+
this._brnDialog.setOverlayClass(newClass);
|
|
500
|
+
}
|
|
501
|
+
setClassToCustomElement(newClass) {
|
|
502
|
+
this._brnDialog.setOverlayClass(newClass);
|
|
503
|
+
}
|
|
504
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogOverlayComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
505
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: BrnDialogOverlayComponent, isStandalone: true, selector: "brn-dialog-overlay", inputs: { class: "class" }, providers: [provideCustomClassSettableExisting((() => BrnDialogOverlayComponent))], ngImport: i0, template: '', isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
506
|
+
}
|
|
507
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogOverlayComponent, decorators: [{
|
|
508
|
+
type: Component,
|
|
509
|
+
args: [{
|
|
510
|
+
selector: 'brn-dialog-overlay',
|
|
511
|
+
standalone: true,
|
|
512
|
+
template: '',
|
|
513
|
+
providers: [provideCustomClassSettableExisting((() => BrnDialogOverlayComponent))],
|
|
514
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
515
|
+
encapsulation: ViewEncapsulation.None,
|
|
516
|
+
}]
|
|
517
|
+
}], propDecorators: { class: [{
|
|
518
|
+
type: Input
|
|
519
|
+
}] } });
|
|
520
|
+
|
|
521
|
+
class BrnDialogTitleDirective {
|
|
522
|
+
_brnDialogRef = inject(BrnDialogRef);
|
|
523
|
+
_id = signal(`brn-dialog-title-${this._brnDialogRef?.dialogId}`);
|
|
524
|
+
constructor() {
|
|
525
|
+
effect(() => {
|
|
526
|
+
this._brnDialogRef.setAriaLabelledBy(this._id());
|
|
527
|
+
});
|
|
528
|
+
}
|
|
529
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
530
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnDialogTitleDirective, isStandalone: true, selector: "[brnDialogTitle]", host: { properties: { "id": "_id()" } }, ngImport: i0 });
|
|
531
|
+
}
|
|
532
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogTitleDirective, decorators: [{
|
|
533
|
+
type: Directive,
|
|
534
|
+
args: [{
|
|
535
|
+
selector: '[brnDialogTitle]',
|
|
536
|
+
standalone: true,
|
|
537
|
+
host: {
|
|
538
|
+
'[id]': '_id()',
|
|
539
|
+
},
|
|
540
|
+
}]
|
|
541
|
+
}], ctorParameters: () => [] });
|
|
542
|
+
|
|
543
|
+
let idSequence = 0;
|
|
544
|
+
class BrnDialogTriggerDirective {
|
|
545
|
+
_brnDialog = inject(BrnDialogComponent, { optional: true });
|
|
546
|
+
_brnDialogRef = inject(BrnDialogRef, { optional: true });
|
|
547
|
+
id = input(`brn-dialog-trigger-${idSequence++}`);
|
|
548
|
+
state = this._brnDialogRef?.state ?? signal('closed');
|
|
549
|
+
dialogId = `brn-dialog-${this._brnDialogRef?.dialogId ?? idSequence++}`;
|
|
550
|
+
set brnDialogTriggerFor(brnDialog) {
|
|
551
|
+
this._brnDialog = brnDialog;
|
|
552
|
+
}
|
|
553
|
+
open() {
|
|
554
|
+
this._brnDialog?.open();
|
|
555
|
+
}
|
|
556
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
557
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", 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: false, 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 });
|
|
558
|
+
}
|
|
559
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogTriggerDirective, decorators: [{
|
|
560
|
+
type: Directive,
|
|
561
|
+
args: [{
|
|
562
|
+
selector: 'button[brnDialogTrigger],button[brnDialogTriggerFor]',
|
|
563
|
+
standalone: true,
|
|
564
|
+
host: {
|
|
565
|
+
'[id]': 'id()',
|
|
566
|
+
'(click)': 'open()',
|
|
567
|
+
'aria-haspopup': 'dialog',
|
|
568
|
+
'[attr.aria-expanded]': "state() === 'open' ? 'true': 'false'",
|
|
569
|
+
'[attr.data-state]': 'state()',
|
|
570
|
+
'[attr.aria-controls]': 'dialogId',
|
|
571
|
+
},
|
|
572
|
+
exportAs: 'brnDialogTrigger',
|
|
573
|
+
}]
|
|
574
|
+
}], propDecorators: { brnDialogTriggerFor: [{
|
|
575
|
+
type: Input
|
|
576
|
+
}] } });
|
|
577
|
+
|
|
578
|
+
const BrnDialogImports = [
|
|
579
|
+
BrnDialogComponent,
|
|
580
|
+
BrnDialogOverlayComponent,
|
|
581
|
+
BrnDialogTriggerDirective,
|
|
582
|
+
BrnDialogCloseDirective,
|
|
583
|
+
BrnDialogContentDirective,
|
|
584
|
+
BrnDialogTitleDirective,
|
|
585
|
+
BrnDialogDescriptionDirective,
|
|
586
|
+
];
|
|
587
|
+
class BrnDialogModule {
|
|
588
|
+
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
589
|
+
/** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogModule, imports: [BrnDialogComponent,
|
|
590
|
+
BrnDialogOverlayComponent,
|
|
591
|
+
BrnDialogTriggerDirective,
|
|
592
|
+
BrnDialogCloseDirective,
|
|
593
|
+
BrnDialogContentDirective,
|
|
594
|
+
BrnDialogTitleDirective,
|
|
595
|
+
BrnDialogDescriptionDirective], exports: [BrnDialogComponent,
|
|
596
|
+
BrnDialogOverlayComponent,
|
|
597
|
+
BrnDialogTriggerDirective,
|
|
598
|
+
BrnDialogCloseDirective,
|
|
599
|
+
BrnDialogContentDirective,
|
|
600
|
+
BrnDialogTitleDirective,
|
|
601
|
+
BrnDialogDescriptionDirective] });
|
|
602
|
+
/** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogModule });
|
|
603
|
+
}
|
|
604
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnDialogModule, decorators: [{
|
|
605
|
+
type: NgModule,
|
|
606
|
+
args: [{
|
|
607
|
+
imports: [...BrnDialogImports],
|
|
608
|
+
exports: [...BrnDialogImports],
|
|
609
|
+
}]
|
|
610
|
+
}] });
|
|
611
|
+
|
|
612
|
+
/**
|
|
613
|
+
* Generated bundle index. Do not edit.
|
|
614
|
+
*/
|
|
615
|
+
|
|
616
|
+
export { BrnDialogCloseDirective, BrnDialogComponent, BrnDialogContentDirective, BrnDialogDescriptionDirective, BrnDialogImports, BrnDialogModule, BrnDialogOverlayComponent, BrnDialogRef, BrnDialogService, BrnDialogTitleDirective, BrnDialogTriggerDirective, DEFAULT_BRN_DIALOG_OPTIONS, cssClassesToArray, injectBrnDialogContext, injectBrnDialogCtx };
|
|
617
|
+
//# sourceMappingURL=spartan-ng-brain-dialog.mjs.map
|