@spartan-ng/brain 0.0.1-alpha.557 → 0.0.1-alpha.559
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/fesm2022/spartan-ng-brain-accordion.mjs +4 -4
- package/fesm2022/spartan-ng-brain-accordion.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs +5 -5
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-checkbox.mjs +14 -14
- package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-dialog.mjs +4 -4
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-hover-card.mjs +1 -1
- package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input-otp.mjs +10 -10
- package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-menu.mjs +1 -1
- package/fesm2022/spartan-ng-brain-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs +16 -16
- package/fesm2022/spartan-ng-brain-navigation-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-popover.mjs +4 -4
- package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-radio-group.mjs +2 -2
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +7 -7
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sheet.mjs +5 -5
- package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-switch.mjs +16 -16
- package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tabs.mjs +4 -4
- package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle-group.mjs +1 -1
- package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tooltip.mjs +9 -9
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-switch.mjs","sources":["../../../../libs/brain/switch/src/lib/brn-switch.ts","../../../../libs/brain/switch/src/lib/brn-switch-thumb.ts","../../../../libs/brain/switch/src/index.ts","../../../../libs/brain/switch/src/spartan-ng-brain-switch.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\teffect,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_SWITCH_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnSwitch),\n\tmulti: true,\n};\n\nconst CONTAINER_POST_FIX = '-switch';\n\nlet uniqueIdCounter = 0;\n\n@Component({\n\tselector: 'brn-switch',\n\ttemplate: `\n\t\t<button\n\t\t\t#switch\n\t\t\trole=\"switch\"\n\t\t\ttype=\"button\"\n\t\t\t[class]=\"class()\"\n\t\t\t[id]=\"getSwitchButtonId(_state().id) ?? ''\"\n\t\t\t[name]=\"getSwitchButtonId(_state().name) ?? ''\"\n\t\t\t[value]=\"checked() ? 'on' : 'off'\"\n\t\t\t[attr.aria-checked]=\"checked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"checked() ? 'checked' : 'unchecked'\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"tabIndex()\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content select=\"brn-switch-thumb\" />\n\t\t</button>\n\t`,\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\tproviders: [BRN_SWITCH_VALUE_ACCESSOR],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnSwitch implements AfterContentInit, OnDestroy, ControlValueAccessor {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _document = inject(DOCUMENT);\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * Whether switch is checked/toggled on.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checked = model<boolean>(false);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Unique identifier for switch component.\n\t * When provided, inner button gets ID without '-switch' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for switch.\n\t * When provided, inner button gets name without '-switch' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this switch for accessibility.\n\t * Auto-set when switch is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this switch for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether switch is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether switch is disabled.\n\t * Disabled switches cannot be toggled and indicate disabled state with data attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/**\n\t * Keyboard tab order for switch.\n\t * @default 0\n\t */\n\tpublic readonly tabIndex = input(0);\n\n\t/**\n\t * Event emitted when switch is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\tpublic readonly switch = viewChild.required<ElementRef<HTMLInputElement>>('switch');\n\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst switchButtonId = this.getSwitchButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${switchButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles switch between checked/unchecked states.\n\t * Does nothing if switch is disabled.\n\t */\n\tprotected toggle(): void {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tthis.checked.update((checked) => !checked);\n\t\tthis._onChange(this.checked());\n\t\tthis.checkedChange.emit(this.checked());\n\t}\n\n\tpublic ngAfterContentInit(): void {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (!this.switch()) return;\n\t\tthis.switch().nativeElement.value = this.checked() ? 'on' : 'off';\n\t\tthis.switch().nativeElement.dispatchEvent(new Event('change'));\n\t}\n\n\tpublic ngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-switch' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected getSwitchButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(CONTAINER_POST_FIX, '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checked state\n\t */\n\tpublic writeValue(value: boolean): void {\n\t\tthis.checked.set(Boolean(value));\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tpublic registerOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tpublic registerOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether switch should be disabled\n\t */\n\tpublic setDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n\tselector: 'brn-switch-thumb',\n\ttemplate: '',\n\thost: {\n\t\trole: 'presentation',\n\t\t'(click)': '$event.preventDefault()',\n\t},\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnSwitchThumb {}\n","import { BrnSwitch } from './lib/brn-switch';\nimport { BrnSwitchThumb } from './lib/brn-switch-thumb';\n\nexport * from './lib/brn-switch';\nexport * from './lib/brn-switch-thumb';\n\nexport const BrnSwitchImports = [BrnSwitch, BrnSwitchThumb] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA6BO,MAAM,yBAAyB,GAAG;AACxC,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,SAAS,CAAC;AACxC,IAAA,KAAK,EAAE,IAAI;;AAGZ,MAAM,kBAAkB,GAAG,SAAS;AAEpC,IAAI,eAAe,GAAG,CAAC;MA2CV,SAAS,CAAA;AACJ,IAAA,WAAW,GAAG,MAAM,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EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,iLAPhB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAOA,cAAc,EAAA,UAAA,EAAA,CAAA;kBAT1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,kBAAkB;AAC5B,oBAAA,QAAQ,EAAE,EAAE;AACZ,oBAAA,IAAI,EAAE;AACL,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,SAAS,EAAE,yBAAyB;AACpC,qBAAA;oBACD,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,iBAAA;;;MCJY,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc;;ACN1D;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-switch.mjs","sources":["../../../../libs/brain/switch/src/lib/brn-switch.ts","../../../../libs/brain/switch/src/lib/brn-switch-thumb.ts","../../../../libs/brain/switch/src/index.ts","../../../../libs/brain/switch/src/spartan-ng-brain-switch.ts"],"sourcesContent":["import { FocusMonitor } from '@angular/cdk/a11y';\nimport type { BooleanInput } from '@angular/cdk/coercion';\nimport { DOCUMENT, isPlatformBrowser } from '@angular/common';\nimport {\n\ttype AfterContentInit,\n\tbooleanAttribute,\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tcomputed,\n\tDestroyRef,\n\teffect,\n\tElementRef,\n\tforwardRef,\n\tinject,\n\tinput,\n\tlinkedSignal,\n\tmodel,\n\ttype OnDestroy,\n\toutput,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\tviewChild,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport type { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\n\nexport const BRN_SWITCH_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnSwitch),\n\tmulti: true,\n};\n\nconst CONTAINER_POST_FIX = '-switch';\n\nlet uniqueIdCounter = 0;\n\n@Component({\n\tselector: 'brn-switch',\n\tproviders: [BRN_SWITCH_VALUE_ACCESSOR],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\t'[style]': '{display: \"contents\"}',\n\t\t'[attr.id]': '_state().id',\n\t\t'[attr.name]': '_state().name',\n\t\t'[attr.aria-labelledby]': 'null',\n\t\t'[attr.aria-label]': 'null',\n\t\t'[attr.aria-describedby]': 'null',\n\t\t'[attr.data-state]': 'checked() ? \"checked\" : \"unchecked\"',\n\t\t'[attr.data-focus-visible]': '_focusVisible()',\n\t\t'[attr.data-focus]': '_focused()',\n\t\t'[attr.data-disabled]': '_state().disabled()',\n\t},\n\ttemplate: `\n\t\t<button\n\t\t\t#switch\n\t\t\trole=\"switch\"\n\t\t\ttype=\"button\"\n\t\t\t[class]=\"class()\"\n\t\t\t[id]=\"getSwitchButtonId(_state().id) ?? ''\"\n\t\t\t[name]=\"getSwitchButtonId(_state().name) ?? ''\"\n\t\t\t[value]=\"checked() ? 'on' : 'off'\"\n\t\t\t[attr.aria-checked]=\"checked()\"\n\t\t\t[attr.aria-label]=\"ariaLabel() || null\"\n\t\t\t[attr.aria-labelledby]=\"mutableAriaLabelledby() || null\"\n\t\t\t[attr.aria-describedby]=\"ariaDescribedby() || null\"\n\t\t\t[attr.data-state]=\"checked() ? 'checked' : 'unchecked'\"\n\t\t\t[attr.data-focus-visible]=\"_focusVisible()\"\n\t\t\t[attr.data-focus]=\"_focused()\"\n\t\t\t[attr.data-disabled]=\"_state().disabled()\"\n\t\t\t[disabled]=\"_state().disabled()\"\n\t\t\t[tabIndex]=\"tabIndex()\"\n\t\t\t(click)=\"$event.preventDefault(); toggle()\"\n\t\t>\n\t\t\t<ng-content select=\"brn-switch-thumb\" />\n\t\t</button>\n\t`,\n})\nexport class BrnSwitch implements AfterContentInit, OnDestroy, ControlValueAccessor {\n\tprivate readonly _destroyRef = inject(DestroyRef);\n\tprivate readonly _renderer = inject(Renderer2);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _document = inject(DOCUMENT);\n\n\tprotected readonly _focusVisible = signal(false);\n\tprotected readonly _focused = signal(false);\n\n\t/**\n\t * Whether switch is checked/toggled on.\n\t * Can be bound with [(checked)] for two-way binding.\n\t */\n\tpublic readonly checked = model<boolean>(false);\n\n\t/** Emits when checked state changes. */\n\tpublic readonly checkedChange = output<boolean>();\n\n\t/**\n\t * Unique identifier for switch component.\n\t * When provided, inner button gets ID without '-switch' suffix.\n\t * Auto-generates ID if not provided.\n\t */\n\tpublic readonly id = input<string | null>(++uniqueIdCounter + '');\n\n\t/**\n\t * Form control name for switch.\n\t * When provided, inner button gets name without '-switch' suffix.\n\t */\n\tpublic readonly name = input<string | null>(null);\n\n\t/**\n\t * CSS classes applied to inner button element.\n\t */\n\tpublic readonly class = input<string | null>(null);\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/**\n\t * ID of element that labels this switch for accessibility.\n\t * Auto-set when switch is inside label element.\n\t */\n\tpublic readonly ariaLabelledby = input<string | null>(null, { alias: 'aria-labelledby' });\n\tpublic readonly mutableAriaLabelledby = linkedSignal(() => this.ariaLabelledby());\n\n\t/**\n\t * ID of element that describes this switch for accessibility.\n\t */\n\tpublic readonly ariaDescribedby = input<string | null>(null, { alias: 'aria-describedby' });\n\n\t/**\n\t * Whether switch is required in a form.\n\t */\n\tpublic readonly required = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Whether switch is disabled.\n\t * Disabled switches cannot be toggled and indicate disabled state with data attribute.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/**\n\t * Keyboard tab order for switch.\n\t * @default 0\n\t */\n\tpublic readonly tabIndex = input(0);\n\n\t/**\n\t * Event emitted when switch is blurred (loses focus).\n\t * Used for form validation.\n\t */\n\tpublic readonly touched = output<void>();\n\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected _onChange: ChangeFn<boolean> = () => {};\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onTouched: TouchFn = () => {};\n\n\tpublic readonly switch = viewChild.required<ElementRef<HTMLInputElement>>('switch');\n\n\tprotected readonly _state = computed(() => {\n\t\tconst name = this.name();\n\t\tconst id = this.id();\n\t\treturn {\n\t\t\tdisabled: signal(this.disabled()),\n\t\t\tname: name ? name + CONTAINER_POST_FIX : null,\n\t\t\tid: id ? id + CONTAINER_POST_FIX : null,\n\t\t};\n\t});\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst state = this._state();\n\t\t\tconst isDisabled = state.disabled();\n\n\t\t\tif (!this._elementRef.nativeElement || !this._isBrowser) return;\n\n\t\t\tconst newLabelId = state.id + '-label';\n\t\t\tconst switchButtonId = this.getSwitchButtonId(state.id);\n\t\t\tconst labelElement =\n\t\t\t\tthis._elementRef.nativeElement.closest('label') ??\n\t\t\t\tthis._document.querySelector(`label[for=\"${switchButtonId}\"]`);\n\n\t\t\tif (!labelElement) return;\n\t\t\tconst existingLabelId = labelElement.id;\n\n\t\t\tthis._renderer.setAttribute(labelElement, 'data-disabled', isDisabled ? 'true' : 'false');\n\t\t\tthis.mutableAriaLabelledby.set(existingLabelId || newLabelId);\n\n\t\t\tif (!existingLabelId || existingLabelId.length === 0) {\n\t\t\t\tthis._renderer.setAttribute(labelElement, 'id', newLabelId);\n\t\t\t}\n\t\t});\n\t}\n\n\t/**\n\t * Toggles switch between checked/unchecked states.\n\t * Does nothing if switch is disabled.\n\t */\n\tprotected toggle(): void {\n\t\tif (this._state().disabled()) return;\n\n\t\tthis._onTouched();\n\t\tthis.touched.emit();\n\n\t\tthis.checked.update((checked) => !checked);\n\t\tthis._onChange(this.checked());\n\t\tthis.checkedChange.emit(this.checked());\n\t}\n\n\tpublic ngAfterContentInit(): void {\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef, true)\n\t\t\t.pipe(takeUntilDestroyed(this._destroyRef))\n\t\t\t.subscribe((focusOrigin) => {\n\t\t\t\tif (focusOrigin) this._focused.set(true);\n\t\t\t\tif (focusOrigin === 'keyboard' || focusOrigin === 'program') {\n\t\t\t\t\tthis._focusVisible.set(true);\n\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t}\n\t\t\t\tif (!focusOrigin) {\n\t\t\t\t\t// When a focused element becomes disabled, the browser *immediately* fires a blur event.\n\t\t\t\t\t// Angular does not expect events to be raised during change detection, so any state\n\t\t\t\t\t// change (such as a form control's ng-touched) will cause a changed-after-checked error.\n\t\t\t\t\t// See https://github.com/angular/angular/issues/17793. To work around this, we defer\n\t\t\t\t\t// telling the form control it has been touched until the next tick.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._focusVisible.set(false);\n\t\t\t\t\t\tthis._focused.set(false);\n\t\t\t\t\t\tthis._onTouched();\n\t\t\t\t\t\tthis.touched.emit();\n\t\t\t\t\t\tthis._cdr.markForCheck();\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (!this.switch()) return;\n\t\tthis.switch().nativeElement.value = this.checked() ? 'on' : 'off';\n\t\tthis.switch().nativeElement.dispatchEvent(new Event('change'));\n\t}\n\n\tpublic ngOnDestroy() {\n\t\tthis._focusMonitor.stopMonitoring(this._elementRef);\n\t}\n\n\t/**\n\t * Gets proper ID for inner button element.\n\t * Removes '-switch' suffix if present in container ID.\n\t *\n\t * @param idPassedToContainer - ID applied to container element\n\t * @returns ID to use for inner button or null\n\t */\n\tprotected getSwitchButtonId(idPassedToContainer: string | null | undefined): string | null {\n\t\treturn idPassedToContainer ? idPassedToContainer.replace(CONTAINER_POST_FIX, '') : null;\n\t}\n\n\t/**\n\t * Updates internal state when control value changes from outside.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param value - New checked state\n\t */\n\tpublic writeValue(value: boolean): void {\n\t\tthis.checked.set(Boolean(value));\n\t}\n\n\t/**\n\t * Registers callback for value changes.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when value changes\n\t */\n\tpublic registerOnChange(fn: ChangeFn<boolean>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\t/**\n\t * Registers callback for touched events.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param fn - Function to call when control is touched\n\t */\n\tpublic registerOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\t/**\n\t * Updates disabled state from form control.\n\t * Part of ControlValueAccessor interface.\n\t *\n\t * @param isDisabled - Whether switch should be disabled\n\t */\n\tpublic setDisabledState(isDisabled: boolean): void {\n\t\tthis._state().disabled.set(isDisabled);\n\t\tthis._cdr.markForCheck();\n\t}\n}\n","import { ChangeDetectionStrategy, Component } from '@angular/core';\n\n@Component({\n\tselector: 'brn-switch-thumb',\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\trole: 'presentation',\n\t\t'(click)': '$event.preventDefault()',\n\t},\n\ttemplate: '',\n})\nexport class BrnSwitchThumb {}\n","import { BrnSwitch } from './lib/brn-switch';\nimport { BrnSwitchThumb } from './lib/brn-switch-thumb';\n\nexport * from './lib/brn-switch';\nexport * from './lib/brn-switch-thumb';\n\nexport const BrnSwitchImports = [BrnSwitch, BrnSwitchThumb] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AA6BO,MAAM,yBAAyB,GAAG;AACxC,IAAA,OAAO,EAAE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;MCpEY,cAAc,CAAA;0HAAd,cAAc,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAd,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,cAAc,iLAFhB,EAAE,EAAA,QAAA,EAAA,IAAA,EAAA,eAAA,EAAA,EAAA,CAAA,uBAAA,CAAA,MAAA,EAAA,CAAA;;2FAEA,cAAc,EAAA,UAAA,EAAA,CAAA;kBAT1B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,kBAAkB;oBAC5B,eAAe,EAAE,uBAAuB,CAAC,MAAM;AAC/C,oBAAA,IAAI,EAAE;AACL,wBAAA,IAAI,EAAE,cAAc;AACpB,wBAAA,SAAS,EAAE,yBAAyB;AACpC,qBAAA;AACD,oBAAA,QAAQ,EAAE,EAAE;AACZ,iBAAA;;;MCJY,gBAAgB,GAAG,CAAC,SAAS,EAAE,cAAc;;ACN1D;;AAEG;;;;"}
|
|
@@ -65,11 +65,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
65
65
|
type: Directive,
|
|
66
66
|
args: [{
|
|
67
67
|
selector: '[brnTabs]',
|
|
68
|
+
exportAs: 'brnTabs',
|
|
68
69
|
host: {
|
|
69
70
|
'[attr.data-orientation]': 'orientation()',
|
|
70
71
|
'[attr.dir]': 'direction()',
|
|
71
72
|
},
|
|
72
|
-
exportAs: 'brnTabs',
|
|
73
73
|
}]
|
|
74
74
|
}] });
|
|
75
75
|
|
|
@@ -99,6 +99,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
99
99
|
type: Directive,
|
|
100
100
|
args: [{
|
|
101
101
|
selector: '[brnTabsContent]',
|
|
102
|
+
exportAs: 'brnTabsContent',
|
|
102
103
|
host: {
|
|
103
104
|
role: 'tabpanel',
|
|
104
105
|
tabindex: '0',
|
|
@@ -106,7 +107,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
106
107
|
'[attr.aria-labelledby]': '_labelId()',
|
|
107
108
|
'[hidden]': '_isSelected() === false',
|
|
108
109
|
},
|
|
109
|
-
exportAs: 'brnTabsContent',
|
|
110
110
|
}]
|
|
111
111
|
}], ctorParameters: () => [] });
|
|
112
112
|
|
|
@@ -157,6 +157,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
157
157
|
type: Directive,
|
|
158
158
|
args: [{
|
|
159
159
|
selector: 'button[brnTabsTrigger]',
|
|
160
|
+
exportAs: 'brnTabsTrigger',
|
|
160
161
|
host: {
|
|
161
162
|
'[id]': '_labelId()',
|
|
162
163
|
type: 'button',
|
|
@@ -171,7 +172,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
171
172
|
'[attr.disabled]': "_disabled() ? '' : undefined",
|
|
172
173
|
'(click)': 'activate()',
|
|
173
174
|
},
|
|
174
|
-
exportAs: 'brnTabsTrigger',
|
|
175
175
|
}]
|
|
176
176
|
}], ctorParameters: () => [] });
|
|
177
177
|
|
|
@@ -225,12 +225,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
225
225
|
type: Directive,
|
|
226
226
|
args: [{
|
|
227
227
|
selector: '[brnTabsList]',
|
|
228
|
+
exportAs: 'brnTabsList',
|
|
228
229
|
host: {
|
|
229
230
|
role: 'tablist',
|
|
230
231
|
'[attr.aria-orientation]': '_orientation()',
|
|
231
232
|
'[attr.data-orientation]': '_orientation()',
|
|
232
233
|
},
|
|
233
|
-
exportAs: 'brnTabsList',
|
|
234
234
|
}]
|
|
235
235
|
}] });
|
|
236
236
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-tabs.mjs","sources":["../../../../libs/brain/tabs/src/lib/brn-tabs.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-content.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-trigger.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-list.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-paginated-list.ts","../../../../libs/brain/tabs/src/index.ts","../../../../libs/brain/tabs/src/spartan-ng-brain-tabs.ts"],"sourcesContent":["import { Directive, input, model, output, signal } from '@angular/core';\nimport type { BrnTabsContent } from './brn-tabs-content';\nimport type { BrnTabsTrigger } from './brn-tabs-trigger';\n\nexport type BrnTabsOrientation = 'horizontal' | 'vertical';\nexport type BrnTabsDirection = 'ltr' | 'rtl';\nexport type BrnActivationMode = 'automatic' | 'manual';\nexport type TabEntry = { trigger: BrnTabsTrigger; content: BrnTabsContent };\n\n@Directive({\n\tselector: '[brnTabs]',\n\thost: {\n\t\t'[attr.data-orientation]': 'orientation()',\n\t\t'[attr.dir]': 'direction()',\n\t},\n\texportAs: 'brnTabs',\n})\nexport class BrnTabs {\n\tpublic readonly orientation = input<BrnTabsOrientation>('horizontal');\n\t/** internal **/\n\tpublic $orientation = this.orientation;\n\n\tpublic readonly direction = input<BrnTabsDirection>('ltr');\n\t/** internal **/\n\tpublic $direction = this.direction;\n\n\tpublic readonly activeTab = model<string | undefined>(undefined, { alias: 'brnTabs' });\n\t/** internal **/\n\tpublic $activeTab = this.activeTab.asReadonly();\n\n\tpublic readonly activationMode = input<BrnActivationMode>('automatic');\n\t/** internal **/\n\tpublic $activationMode = this.activationMode;\n\n\tpublic readonly tabActivated = output<string>();\n\n\tprivate readonly _tabs = signal<{ [key: string]: TabEntry }>({});\n\tpublic readonly $tabs = this._tabs.asReadonly();\n\n\tpublic registerTrigger(key: string, trigger: BrnTabsTrigger) {\n\t\tthis.updateEntry(key, { trigger });\n\t}\n\n\tpublic registerContent(key: string, content: BrnTabsContent) {\n\t\tthis.updateEntry(key, { content });\n\t}\n\n\tpublic unregisterTrigger(key: string) {\n\t\tthis.updateEntry(key, { trigger: undefined });\n\t\tif (this.activeTab() === key) {\n\t\t\tthis.activeTab.set(undefined);\n\t\t}\n\t}\n\n\tpublic unregisterContent(key: string): void {\n\t\tthis.updateEntry(key, { content: undefined });\n\t}\n\n\tprivate updateEntry(key: string, patch: Partial<TabEntry>) {\n\t\tthis._tabs.update((tabs) => {\n\t\t\tconst existing = tabs[key] ?? {};\n\t\t\tconst merged = { ...existing, ...patch };\n\t\t\tconst entryEmpty = !merged.trigger && !merged.content;\n\t\t\tif (entryEmpty) {\n\t\t\t\tconst { [key]: removed, ...rest } = tabs;\n\t\t\t\treturn rest;\n\t\t\t}\n\t\t\treturn { ...tabs, [key]: merged };\n\t\t});\n\t}\n\n\temitTabActivated(key: string) {\n\t\tthis.tabActivated.emit(key);\n\t}\n\n\tsetActiveTab(key: string) {\n\t\tthis.activeTab.set(key);\n\t}\n}\n","import { computed, Directive, effect, ElementRef, inject, input, type OnDestroy, untracked } from '@angular/core';\nimport { BrnTabs } from './brn-tabs';\n\n@Directive({\n\tselector: '[brnTabsContent]',\n\thost: {\n\t\trole: 'tabpanel',\n\t\ttabindex: '0',\n\t\t'[id]': '_contentId()',\n\t\t'[attr.aria-labelledby]': '_labelId()',\n\t\t'[hidden]': '_isSelected() === false',\n\t},\n\texportAs: 'brnTabsContent',\n})\nexport class BrnTabsContent implements OnDestroy {\n\tprivate readonly _root = inject(BrnTabs);\n\tprivate readonly _elementRef = inject(ElementRef);\n\n\tpublic readonly contentFor = input.required<string>({ alias: 'brnTabsContent' });\n\tprotected readonly _isSelected = computed(() => this._root.$activeTab() === this.contentFor());\n\tprotected readonly _contentId = computed(() => `brn-tabs-content-${this.contentFor()}`);\n\tprotected readonly _labelId = computed(() => `brn-tabs-label-${this.contentFor()}`);\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst contentFor = this.contentFor();\n\t\t\tuntracked(() => this._root.registerContent(contentFor, this));\n\t\t});\n\t}\n\n\tpublic focus() {\n\t\tthis._elementRef.nativeElement.focus();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._root.unregisterContent(this.contentFor());\n\t}\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport {\n\tDirective,\n\tElementRef,\n\ttype OnDestroy,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tuntracked,\n} from '@angular/core';\nimport { BrnTabs } from './brn-tabs';\n\n@Directive({\n\tselector: 'button[brnTabsTrigger]',\n\thost: {\n\t\t'[id]': '_labelId()',\n\t\ttype: 'button',\n\t\trole: 'tab',\n\t\t'[tabindex]': '_disabled() ? -1 : (selected() ? 0 : -1)',\n\t\t'[attr.aria-selected]': 'selected()',\n\t\t'[attr.aria-controls]': '_contentId()',\n\t\t'[attr.aria-disabled]': '_disabled()',\n\t\t'[attr.data-state]': \"selected() ? 'active' : 'inactive'\",\n\t\t'[attr.data-orientation]': '_orientation()',\n\t\t'[attr.data-disabled]': \"_disabled() ? '' : undefined\",\n\t\t'[attr.disabled]': \"_disabled() ? '' : undefined\",\n\t\t'(click)': 'activate()',\n\t},\n\texportAs: 'brnTabsTrigger',\n})\nexport class BrnTabsTrigger implements OnDestroy {\n\tpublic readonly elementRef = inject(ElementRef);\n\n\tprivate readonly _root = inject(BrnTabs);\n\n\tprotected readonly _orientation = this._root.$orientation;\n\n\tpublic readonly triggerFor = input.required<string>({ alias: 'brnTabsTrigger' });\n\tpublic readonly selected = computed(() => this._root.$activeTab() === this.triggerFor());\n\tprotected readonly _contentId = computed(() => `brn-tabs-content-${this.triggerFor()}`);\n\tprotected readonly _labelId = computed(() => `brn-tabs-label-${this.triggerFor()}`);\n\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\tpublic get disabled(): boolean {\n\t\treturn this._disabled();\n\t}\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst triggerFor = this.triggerFor();\n\t\t\tuntracked(() => this._root.registerTrigger(triggerFor, this));\n\t\t});\n\t}\n\n\tpublic focus() {\n\t\tthis.elementRef.nativeElement.focus();\n\t\tif (this._root.$activationMode() === 'automatic') {\n\t\t\tthis.activate();\n\t\t}\n\t}\n\n\tpublic activate() {\n\t\tif (!this.triggerFor()) return;\n\t\tthis._root.setActiveTab(this.triggerFor());\n\t\tthis._root.emitTabActivated(this.triggerFor());\n\t}\n\n\tpublic get key(): string | undefined {\n\t\treturn this.triggerFor();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._root.unregisterTrigger(this.triggerFor());\n\t}\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { type AfterContentInit, Directive, ElementRef, contentChildren, inject } from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { BrnTabs } from './brn-tabs';\nimport { BrnTabsTrigger } from './brn-tabs-trigger';\n\n@Directive({\n\tselector: '[brnTabsList]',\n\thost: {\n\t\trole: 'tablist',\n\t\t'[attr.aria-orientation]': '_orientation()',\n\t\t'[attr.data-orientation]': '_orientation()',\n\t},\n\texportAs: 'brnTabsList',\n})\nexport class BrnTabsList implements AfterContentInit {\n\tprivate readonly _root = inject(BrnTabs);\n\n\tprotected readonly _orientation = this._root.$orientation;\n\tprivate readonly _direction = this._root.$direction;\n\tprivate readonly _activeTab = this._root.$activeTab;\n\tprivate readonly _tabs = this._root.$tabs;\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _keyDownListener = fromEvent(this._elementRef.nativeElement, 'keydown');\n\n\tprivate _keyManager?: FocusKeyManager<BrnTabsTrigger>;\n\n\tpublic readonly triggers = contentChildren(BrnTabsTrigger, { descendants: true });\n\n\tpublic ngAfterContentInit() {\n\t\tthis._keyManager = new FocusKeyManager<BrnTabsTrigger>(this.triggers())\n\t\t\t.withHorizontalOrientation(this._direction())\n\t\t\t.withHomeAndEnd()\n\t\t\t.withPageUpDown()\n\t\t\t.withWrap();\n\n\t\t// needed because by default the index is set to -1, which means first interaction is skipped\n\t\tthis._keyDownListener.pipe(take(1)).subscribe(() => {\n\t\t\tconst currentTabKey = this._activeTab();\n\t\t\tconst tabs = this._tabs();\n\t\t\tlet activeIndex = 0;\n\t\t\tif (currentTabKey) {\n\t\t\t\tconst currentTab = tabs[currentTabKey];\n\t\t\t\tif (currentTab) {\n\t\t\t\t\tactiveIndex = this.triggers().indexOf(currentTab.trigger);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._keyManager?.setActiveItem(activeIndex);\n\t\t});\n\n\t\tthis._keyDownListener.subscribe((event) => {\n\t\t\tif ('key' in event) {\n\t\t\t\tif (this._orientation() === 'horizontal') {\n\t\t\t\t\tif (event.key === 'ArrowUp' || event.key === 'ArrowDown') return;\n\t\t\t\t}\n\t\t\t\tif (this._orientation() === 'vertical') {\n\t\t\t\t\tif (event.key === 'ArrowLeft' || event.key === 'ArrowRight') return;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._keyManager?.onKeydown(event as KeyboardEvent);\n\t\t});\n\t}\n}\n","/**\n * We are building on shoulders of giants here and adapt the implementation provided by the incredible Angular\n * team: https://github.com/angular/components/blob/main/src/material/tabs/paginated-tab-header.ts\n * Check them out! Give them a try! Leave a star! Their work is incredible!\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { FocusKeyManager, type FocusableOption } from '@angular/cdk/a11y';\nimport { type Direction, Directionality } from '@angular/cdk/bidi';\nimport { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { SharedResizeObserver } from '@angular/cdk/observers/private';\nimport { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport {\n\tANIMATION_MODULE_TYPE,\n\ttype AfterContentChecked,\n\ttype AfterContentInit,\n\ttype AfterViewInit,\n\tChangeDetectorRef,\n\tDirective,\n\tElementRef,\n\tInjector,\n\tNgZone,\n\ttype OnDestroy,\n\ttype Signal,\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { EMPTY, Observable, type Observer, Subject, fromEvent, merge, of as observableOf, timer } from 'rxjs';\nimport { debounceTime, filter, skip, startWith, switchMap, takeUntil } from 'rxjs/operators';\nimport { BrnTabs } from './brn-tabs';\n\n/** Config used to bind passive event listeners */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({\n\tpassive: true,\n}) as EventListenerOptions;\n\n/**\n * The directions that scrolling can go in when the header's tabs exceed the header width. 'After'\n * will scroll the header towards the end of the tabs list and 'before' will scroll towards the\n * beginning of the list.\n */\nexport type ScrollDirection = 'after' | 'before';\n\n/**\n * Amount of milliseconds to wait before starting to scroll the header automatically.\n * Set a little conservatively in order to handle fake events dispatched on touch devices.\n */\nconst HEADER_SCROLL_DELAY = 650;\n\n/**\n * Interval in milliseconds at which to scroll the header\n * while the user is holding their pointer.\n */\nconst HEADER_SCROLL_INTERVAL = 100;\n\n/** Item inside a paginated tab header. */\nexport type BrnPaginatedTabHeaderItem = FocusableOption & { elementRef: ElementRef };\n\n/**\n * Base class for a tab header that supported pagination.\n * @docs-private\n */\n@Directive()\nexport abstract class BrnTabsPaginatedList implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {\n\tpublic abstract items: Signal<ReadonlyArray<BrnPaginatedTabHeaderItem>>;\n\tpublic abstract itemsChanges: Observable<ReadonlyArray<BrnPaginatedTabHeaderItem>>;\n\tpublic abstract tabListContainer: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract tabList: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract tabListInner: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract nextPaginator: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract previousPaginator: Signal<ElementRef<HTMLElement>>;\n\n\t/** The distance in pixels that the tab labels should be translated to the left. */\n\tprivate _scrollDistance = 0;\n\n\t/** Whether the header should scroll to the selected index after the view has been checked. */\n\tprivate _selectedIndexChanged = false;\n\n\tprivate readonly _root = inject(BrnTabs);\n\tprivate readonly _activeTab = this._root.$activeTab;\n\tprivate readonly _tabs = this._root.$tabs;\n\n\t/** Emits when the component is destroyed. */\n\tprotected readonly _destroyed = new Subject<void>();\n\n\t/** Whether the controls for pagination should be displayed */\n\tpublic readonly showPaginationControls = signal(false);\n\n\t/** Whether the tab list can be scrolled more towards the end of the tab label list. */\n\tpublic disableScrollAfter = true;\n\n\t/** Whether the tab list can be scrolled more towards the beginning of the tab label list. */\n\tpublic disableScrollBefore = true;\n\n\t/**\n\t * The number of tab labels that are displayed on the header. When this changes, the header\n\t * should re-evaluate the scroll position.\n\t */\n\tprivate _tabLabelCount!: number;\n\n\t/** Whether the scroll distance has changed and should be applied after the view is checked. */\n\tprivate _scrollDistanceChanged!: boolean;\n\n\t/** Used to manage focus between the tabs. */\n\tprivate _keyManager!: FocusKeyManager<BrnPaginatedTabHeaderItem>;\n\n\t/** Cached text content of the header. */\n\tprivate _currentTextContent!: string;\n\n\t/** Stream that will stop the automated scrolling. */\n\tprivate readonly _stopScrolling = new Subject<void>();\n\n\t/**\n\t * Whether pagination should be disabled. This can be used to avoid unnecessary\n\t * layout recalculations if it's known that pagination won't be required.\n\t */\n\tpublic readonly disablePagination = input(false, { transform: booleanAttribute });\n\n\t/** The index of the active tab. */\n\tprivate readonly _selectedIndex = computed(() => {\n\t\tconst currentTabKey = this._activeTab();\n\t\tconst tabs = this._tabs();\n\n\t\tlet activeIndex = 0;\n\t\tif (currentTabKey && this.items()) {\n\t\t\tconst currentTab = tabs[currentTabKey];\n\t\t\tif (currentTab) {\n\t\t\t\tactiveIndex = this.items().indexOf(currentTab.trigger);\n\t\t\t}\n\t\t}\n\n\t\treturn activeIndex;\n\t});\n\n\t/** Event emitted when the option is selected. */\n\tpublic readonly selectFocusedIndex = output<number>();\n\n\t/** Event emitted when a label is focused. */\n\tpublic readonly indexFocused = output<number>();\n\n\tprivate readonly _sharedResizeObserver = inject(SharedResizeObserver);\n\n\tprivate readonly _injector = inject(Injector);\n\n\tprotected _elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\tprotected _changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\tprivate readonly _viewportRuler: ViewportRuler = inject(ViewportRuler);\n\tprivate readonly _dir = inject(Directionality, { optional: true });\n\tprivate readonly _ngZone: NgZone = inject(NgZone);\n\tprivate readonly _platform: Platform = inject(Platform);\n\tpublic readonly animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n\n\tconstructor() {\n\t\t// Bind the `mouseleave` event on the outside since it doesn't change anything in the view.\n\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\tfromEvent(this._elementRef.nativeElement, 'mouseleave')\n\t\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tthis._stopInterval();\n\t\t\t\t});\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst selectedIndex = this._selectedIndex();\n\n\t\t\tif (selectedIndex !== 0) {\n\t\t\t\tthis._selectedIndexChanged = true;\n\t\t\t\tif (this._keyManager) {\n\t\t\t\t\tthis._keyManager.updateActiveItem(selectedIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/** Called when the user has selected an item via the keyboard. */\n\tprotected abstract _itemSelected(event: KeyboardEvent): void;\n\n\tngAfterViewInit() {\n\t\t// We need to handle these events manually, because we want to bind passive event listeners.\n\t\tfromEvent(this.previousPaginator().nativeElement, 'touchstart', passiveEventListenerOptions)\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._handlePaginatorPress('before');\n\t\t\t});\n\n\t\tfromEvent(this.nextPaginator().nativeElement, 'touchstart', passiveEventListenerOptions)\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._handlePaginatorPress('after');\n\t\t\t});\n\t}\n\n\tngAfterContentInit() {\n\t\tconst dirChange = this._dir ? this._dir.change : observableOf('ltr');\n\t\t// We need to debounce resize events because the alignment logic is expensive.\n\t\t// If someone animates the width of tabs, we don't want to realign on every animation frame.\n\t\t// Once we haven't seen any more resize events in the last 32ms (~2 animaion frames) we can\n\t\t// re-align.\n\t\tconst resize = this._sharedResizeObserver\n\t\t\t.observe(this._elementRef.nativeElement)\n\t\t\t.pipe(debounceTime(32), takeUntil(this._destroyed));\n\t\t// Note: We do not actually need to watch these events for proper functioning of the tabs,\n\t\t// the resize events above should capture any viewport resize that we care about. However,\n\t\t// removing this is fairly breaking for screenshot tests, so we're leaving it here for now.\n\t\tconst viewportResize = this._viewportRuler.change(150).pipe(takeUntil(this._destroyed));\n\n\t\tconst realign = () => {\n\t\t\tthis.updatePagination();\n\t\t};\n\n\t\tthis._keyManager = new FocusKeyManager<BrnPaginatedTabHeaderItem>(this.items())\n\t\t\t.withHorizontalOrientation(this._getLayoutDirection())\n\t\t\t.withHomeAndEnd()\n\t\t\t.withWrap()\n\t\t\t// Allow focus to land on disabled tabs, as per https://w3c.github.io/aria-practices/#kbd_disabled_controls\n\t\t\t.skipPredicate(() => false);\n\n\t\tthis._keyManager.updateActiveItem(this._selectedIndex());\n\n\t\t// Note: We do not need to realign after the first render for proper functioning of the tabs\n\t\t// the resize events above should fire when we first start observing the element. However,\n\t\t// removing this is fairly breaking for screenshot tests, so we're leaving it here for now.\n\t\tafterNextRender(realign, { injector: this._injector });\n\n\t\t// On dir change or resize, realign the ink bar and update the orientation of\n\t\t// the key manager if the direction has changed.\n\t\tmerge(dirChange, viewportResize, resize, this.itemsChanges, this._itemsResized())\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => {\n\t\t\t\t// We need to defer this to give the browser some time to recalculate\n\t\t\t\t// the element dimensions. The call has to be wrapped in `NgZone.run`,\n\t\t\t\t// because the viewport change handler runs outside of Angular.\n\t\t\t\tthis._ngZone.run(() => {\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\t// Clamp the scroll distance, because it can change with the number of tabs.\n\t\t\t\t\t\tthis._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));\n\t\t\t\t\t\trealign();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tthis._keyManager.withHorizontalOrientation(this._getLayoutDirection());\n\t\t\t});\n\n\t\t// If there is a change in the focus key manager we need to emit the `indexFocused`\n\t\t// event in order to provide a public event that notifies about focus changes. Also we realign\n\t\t// the tabs container by scrolling the new focused tab into the visible section.\n\t\tthis._keyManager.change.subscribe((newFocusIndex) => {\n\t\t\tthis.indexFocused.emit(newFocusIndex);\n\t\t\tthis._setTabFocus(newFocusIndex);\n\t\t});\n\t}\n\n\t/** Sends any changes that could affect the layout of the items. */\n\tprivate _itemsResized(): Observable<ResizeObserverEntry[]> {\n\t\tif (typeof ResizeObserver !== 'function') {\n\t\t\treturn EMPTY;\n\t\t}\n\n\t\treturn this.itemsChanges.pipe(\n\t\t\tstartWith(this.items()),\n\t\t\tswitchMap(\n\t\t\t\t(tabItems: ReadonlyArray<BrnPaginatedTabHeaderItem>) =>\n\t\t\t\t\tnew Observable((observer: Observer<ResizeObserverEntry[]>) =>\n\t\t\t\t\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\t\t\t\t\tconst resizeObserver = new ResizeObserver((entries) => observer.next(entries));\n\t\t\t\t\t\t\tfor (const tabItem of tabItems) {\n\t\t\t\t\t\t\t\tresizeObserver.observe(tabItem.elementRef.nativeElement);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn () => {\n\t\t\t\t\t\t\t\tresizeObserver.disconnect();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t),\n\t\t\t// Skip the first emit since the resize observer emits when an item\n\t\t\t// is observed for new items when the tab is already inserted\n\t\t\tskip(1),\n\t\t\t// Skip emissions where all the elements are invisible since we don't want\n\t\t\t// the header to try and re-render with invalid measurements. See #25574.\n\t\t\tfilter((entries) => entries.some((e) => e.contentRect.width > 0 && e.contentRect.height > 0)),\n\t\t);\n\t}\n\n\tngAfterContentChecked(): void {\n\t\t// If the number of tab labels have changed, check if scrolling should be enabled\n\t\tif (this._tabLabelCount !== this.items().length) {\n\t\t\tthis.updatePagination();\n\t\t\tthis._tabLabelCount = this.items().length;\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\n\t\t// If the selected index has changed, scroll to the label and check if the scrolling controls\n\t\t// should be disabled.\n\t\tif (this._selectedIndexChanged) {\n\t\t\tthis._scrollToLabel(this._selectedIndex());\n\t\t\tthis._checkScrollingControls();\n\t\t\tthis._selectedIndexChanged = false;\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\n\t\t// If the scroll distance has been changed (tab selected, focused, scroll controls activated),\n\t\t// then translate the header to reflect this.\n\t\tif (this._scrollDistanceChanged) {\n\t\t\tthis._updateTabScrollPosition();\n\t\t\tthis._scrollDistanceChanged = false;\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis._keyManager?.destroy();\n\t\tthis._destroyed.next();\n\t\tthis._destroyed.complete();\n\t\tthis._stopScrolling.complete();\n\t}\n\n\t/** Handles keyboard events on the header. */\n\t_handleKeydown(event: KeyboardEvent) {\n\t\t// We don't handle any key bindings with a modifier key.\n\t\tif (hasModifierKey(event)) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (event.keyCode) {\n\t\t\tcase ENTER:\n\t\t\tcase SPACE:\n\t\t\t\tif (this.focusIndex !== this._selectedIndex()) {\n\t\t\t\t\tconst item = this.items()[this.focusIndex];\n\n\t\t\t\t\tif (item && !item.disabled) {\n\t\t\t\t\t\tthis.selectFocusedIndex.emit(this.focusIndex);\n\t\t\t\t\t\tthis._itemSelected(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis._keyManager.onKeydown(event);\n\t\t}\n\t}\n\n\t/**\n\t * Callback for when the MutationObserver detects that the content has changed.\n\t */\n\t_onContentChanges() {\n\t\tconst textContent = this._elementRef.nativeElement.textContent;\n\n\t\t// We need to diff the text content of the header, because the MutationObserver callback\n\t\t// will fire even if the text content didn't change which is inefficient and is prone\n\t\t// to infinite loops if a poorly constructed expression is passed in (see #14249).\n\t\tif (textContent !== this._currentTextContent) {\n\t\t\tthis._currentTextContent = textContent || '';\n\n\t\t\t// The content observer runs outside the `NgZone` by default, which\n\t\t\t// means that we need to bring the callback back in ourselves.\n\t\t\tthis._ngZone.run(() => {\n\t\t\t\tthis.updatePagination();\n\t\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Updates the view whether pagination should be enabled or not.\n\t *\n\t * WARNING: Calling this method can be very costly in terms of performance. It should be called\n\t * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n\t * page.\n\t */\n\tupdatePagination() {\n\t\tthis._checkPaginationEnabled();\n\t\tthis._checkScrollingControls();\n\t\tthis._updateTabScrollPosition();\n\t}\n\n\t/** Tracks which element has focus; used for keyboard navigation */\n\tpublic get focusIndex(): number {\n\t\treturn this._keyManager ? (this._keyManager.activeItemIndex ?? 0) : 0;\n\t}\n\n\t/** When the focus index is set, we must manually send focus to the correct label */\n\tpublic set focusIndex(value: number) {\n\t\tif (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._keyManager.setActiveItem(value);\n\t}\n\n\t/**\n\t * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is\n\t * providing a valid index and return true.\n\t */\n\t_isValidIndex(index: number): boolean {\n\t\treturn this.items() ? !!this.items()[index] : true;\n\t}\n\n\t/**\n\t * Sets focus on the HTML element for the label wrapper and scrolls it into the view if\n\t * scrolling is enabled.\n\t */\n\t_setTabFocus(tabIndex: number) {\n\t\tif (this.showPaginationControls()) {\n\t\t\tthis._scrollToLabel(tabIndex);\n\t\t}\n\n\t\tif (this.items()?.length) {\n\t\t\tthis.items()[tabIndex].focus();\n\n\t\t\t// Do not let the browser manage scrolling to focus the element, this will be handled\n\t\t\t// by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width\n\t\t\t// should be the full width minus the offset width.\n\t\t\tconst containerEl = this.tabListContainer().nativeElement;\n\t\t\tconst dir = this._getLayoutDirection();\n\n\t\t\tif (dir === 'ltr') {\n\t\t\t\tcontainerEl.scrollLeft = 0;\n\t\t\t} else {\n\t\t\t\tcontainerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** The layout direction of the containing app. */\n\t_getLayoutDirection(): Direction {\n\t\treturn this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n\t}\n\n\t/** Performs the CSS transformation on the tab list that will cause the list to scroll. */\n\t_updateTabScrollPosition() {\n\t\tif (this.disablePagination()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst scrollDistance = this.scrollDistance;\n\t\tconst translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;\n\n\t\t// Don't use `translate3d` here because we don't want to create a new layer. A new layer\n\t\t// seems to cause flickering and overflow in Internet Explorer. For example, the ink bar\n\t\t// and ripples will exceed the boundaries of the visible tab bar.\n\t\t// See: https://github.com/angular/components/issues/10276\n\t\t// We round the `transform` here, because transforms with sub-pixel precision cause some\n\t\t// browsers to blur the content of the element.\n\t\tthis.tabList().nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;\n\n\t\t// Setting the `transform` on IE will change the scroll offset of the parent, causing the\n\t\t// position to be thrown off in some cases. We have to reset it ourselves to ensure that\n\t\t// it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing\n\t\t// with the scroll position throws off Chrome 71+ in RTL mode (see #14689).\n\t\tif (this._platform.TRIDENT || this._platform.EDGE) {\n\t\t\tthis.tabListContainer().nativeElement.scrollLeft = 0;\n\t\t}\n\t}\n\n\t/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */\n\tpublic get scrollDistance(): number {\n\t\treturn this._scrollDistance;\n\t}\n\tpublic set scrollDistance(value: number) {\n\t\tthis._scrollTo(value);\n\t}\n\n\t/**\n\t * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or\n\t * the end of the list, respectively). The distance to scroll is computed to be a third of the\n\t * length of the tab list view window.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_scrollHeader(direction: ScrollDirection) {\n\t\tconst viewLength = this.tabListContainer().nativeElement.offsetWidth;\n\n\t\t// Move the scroll distance one-third the length of the tab list's viewport.\n\t\tconst scrollAmount = ((direction === 'before' ? -1 : 1) * viewLength) / 3;\n\n\t\treturn this._scrollTo(this._scrollDistance + scrollAmount);\n\t}\n\n\t/** Handles click events on the pagination arrows. */\n\t_handlePaginatorClick(direction: ScrollDirection) {\n\t\tthis._stopInterval();\n\t\tthis._scrollHeader(direction);\n\t}\n\n\t/**\n\t * Moves the tab list such that the desired tab label (marked by index) is moved into view.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_scrollToLabel(labelIndex: number) {\n\t\tif (this.disablePagination()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst selectedLabel = this.items() ? this.items()[labelIndex] : null;\n\n\t\tif (!selectedLabel) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The view length is the visible width of the tab labels.\n\t\tconst viewLength = this.tabListContainer().nativeElement.offsetWidth;\n\t\tconst { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;\n\n\t\tlet labelBeforePos: number;\n\t\tlet labelAfterPos: number;\n\t\tif (this._getLayoutDirection() === 'ltr') {\n\t\t\tlabelBeforePos = offsetLeft;\n\t\t\tlabelAfterPos = labelBeforePos + offsetWidth;\n\t\t} else {\n\t\t\tlabelAfterPos = this.tabListInner().nativeElement.offsetWidth - offsetLeft;\n\t\t\tlabelBeforePos = labelAfterPos - offsetWidth;\n\t\t}\n\n\t\tconst beforeVisiblePos = this.scrollDistance;\n\t\tconst afterVisiblePos = this.scrollDistance + viewLength;\n\n\t\tif (labelBeforePos < beforeVisiblePos) {\n\t\t\t// Scroll header to move label to the before direction\n\t\t\tthis.scrollDistance -= beforeVisiblePos - labelBeforePos;\n\t\t} else if (labelAfterPos > afterVisiblePos) {\n\t\t\t// Scroll header to move label to the after direction\n\t\t\tthis.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);\n\t\t}\n\t}\n\n\t/**\n\t * Evaluate whether the pagination controls should be displayed. If the scroll width of the\n\t * tab list is wider than the size of the header container, then the pagination controls should\n\t * be shown.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_checkPaginationEnabled() {\n\t\tif (this.disablePagination()) {\n\t\t\tthis.showPaginationControls.set(false);\n\t\t} else {\n\t\t\tconst isEnabled = this.tabListInner().nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;\n\n\t\t\tif (!isEnabled) {\n\t\t\t\tthis.scrollDistance = 0;\n\t\t\t}\n\n\t\t\tif (isEnabled !== this.showPaginationControls()) {\n\t\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t\t}\n\n\t\t\tthis.showPaginationControls.set(isEnabled);\n\t\t}\n\t}\n\n\t/**\n\t * Evaluate whether the before and after controls should be enabled or disabled.\n\t * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the\n\t * before button. If the header is at the end of the list (scroll distance is equal to the\n\t * maximum distance we can scroll), then disable the after button.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_checkScrollingControls() {\n\t\tif (this.disablePagination()) {\n\t\t\tthis.disableScrollAfter = this.disableScrollBefore = true;\n\t\t} else {\n\t\t\t// Check if the pagination arrows should be activated.\n\t\t\tthis.disableScrollBefore = this.scrollDistance === 0;\n\t\t\tthis.disableScrollAfter = this.scrollDistance === this._getMaxScrollDistance();\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\t/**\n\t * Determines what is the maximum length in pixels that can be set for the scroll distance. This\n\t * is equal to the difference in width between the tab list container and tab header container.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_getMaxScrollDistance(): number {\n\t\tconst lengthOfTabList = this.tabListInner().nativeElement.scrollWidth;\n\t\tconst viewLength = this.tabListContainer().nativeElement.offsetWidth;\n\t\treturn lengthOfTabList - viewLength || 0;\n\t}\n\n\t/** Stops the currently-running paginator interval. */\n\t_stopInterval() {\n\t\tthis._stopScrolling.next();\n\t}\n\n\t/**\n\t * Handles the user pressing down on one of the paginators.\n\t * Starts scrolling the header after a certain amount of time.\n\t * @param direction In which direction the paginator should be scrolled.\n\t */\n\t_handlePaginatorPress(direction: ScrollDirection, mouseEvent?: MouseEvent) {\n\t\t// Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to\n\t\t// null check the `button`, but we do it so we don't break tests that use fake events.\n\t\tif (mouseEvent && mouseEvent.button !== null && mouseEvent.button !== 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Avoid overlapping timers.\n\t\tthis._stopInterval();\n\n\t\t// Start a timer after the delay and keep firing based on the interval.\n\t\ttimer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)\n\t\t\t// Keep the timer going until something tells it to stop or the component is destroyed.\n\t\t\t.pipe(takeUntil(merge(this._stopScrolling, this._destroyed)))\n\t\t\t.subscribe(() => {\n\t\t\t\tconst { maxScrollDistance, distance } = this._scrollHeader(direction);\n\n\t\t\t\t// Stop the timer if we've reached the start or the end.\n\t\t\t\tif (distance === 0 || distance >= maxScrollDistance) {\n\t\t\t\t\tthis._stopInterval();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Scrolls the header to a given position.\n\t * @param position Position to which to scroll.\n\t * @returns Information on the current scroll distance and the maximum.\n\t */\n\tprivate _scrollTo(position: number) {\n\t\tif (this.disablePagination()) {\n\t\t\treturn { maxScrollDistance: 0, distance: 0 };\n\t\t}\n\n\t\tconst maxScrollDistance = this._getMaxScrollDistance();\n\t\tthis._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));\n\n\t\t// Mark that the scroll distance has changed so that after the view is checked, the CSS\n\t\t// transformation can move the header.\n\t\tthis._scrollDistanceChanged = true;\n\t\tthis._checkScrollingControls();\n\n\t\treturn { maxScrollDistance, distance: this._scrollDistance };\n\t}\n}\n","import { BrnTabs } from './lib/brn-tabs';\nimport { BrnTabsContent } from './lib/brn-tabs-content';\nimport { BrnTabsList } from './lib/brn-tabs-list';\nimport { BrnTabsTrigger } from './lib/brn-tabs-trigger';\n\nexport * from './lib/brn-tabs';\nexport * from './lib/brn-tabs-content';\nexport * from './lib/brn-tabs-list';\nexport * from './lib/brn-tabs-paginated-list';\nexport * from './lib/brn-tabs-trigger';\n\nexport const BrnTabsImports = [BrnTabs, BrnTabsList, BrnTabsTrigger, BrnTabsContent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;MAiBa,OAAO,CAAA;AACH,IAAA,WAAW,GAAG,KAAK,CAAqB,YAAY,CAAC;;AAE9D,IAAA,YAAY,GAAG,IAAI,CAAC,WAAW;AAEtB,IAAA,SAAS,GAAG,KAAK,CAAmB,KAAK,CAAC;;AAEnD,IAAA,UAAU,GAAG,IAAI,CAAC,SAAS;IAElB,SAAS,GAAG,KAAK,CAAqB,SAAS,EAAE,EAAE,KAAK,EA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;;AAG7C,QAAA,MAAM,iBAAiB,GAAG,IAAI,CAAC,qBAAqB,EAAE;AACtD,QAAA,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,iBAAiB,EAAE,QAAQ,CAAC,CAAC;;;AAIzE,QAAA,IAAI,CAAC,sBAAsB,GAAG,IAAI;QAClC,IAAI,CAAC,uBAAuB,EAAE;QAE9B,OAAO,EAAE,iBAAiB,EAAE,QAAQ,EAAE,IAAI,CAAC,eAAe,EAAE;;0HA9jBxC,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;8GAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADzC;;;ACjEM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc;;ACXnF;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-tabs.mjs","sources":["../../../../libs/brain/tabs/src/lib/brn-tabs.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-content.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-trigger.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-list.ts","../../../../libs/brain/tabs/src/lib/brn-tabs-paginated-list.ts","../../../../libs/brain/tabs/src/index.ts","../../../../libs/brain/tabs/src/spartan-ng-brain-tabs.ts"],"sourcesContent":["import { Directive, input, model, output, signal } from '@angular/core';\nimport type { BrnTabsContent } from './brn-tabs-content';\nimport type { BrnTabsTrigger } from './brn-tabs-trigger';\n\nexport type BrnTabsOrientation = 'horizontal' | 'vertical';\nexport type BrnTabsDirection = 'ltr' | 'rtl';\nexport type BrnActivationMode = 'automatic' | 'manual';\nexport type TabEntry = { trigger: BrnTabsTrigger; content: BrnTabsContent };\n\n@Directive({\n\tselector: '[brnTabs]',\n\texportAs: 'brnTabs',\n\thost: {\n\t\t'[attr.data-orientation]': 'orientation()',\n\t\t'[attr.dir]': 'direction()',\n\t},\n})\nexport class BrnTabs {\n\tpublic readonly orientation = input<BrnTabsOrientation>('horizontal');\n\t/** internal **/\n\tpublic $orientation = this.orientation;\n\n\tpublic readonly direction = input<BrnTabsDirection>('ltr');\n\t/** internal **/\n\tpublic $direction = this.direction;\n\n\tpublic readonly activeTab = model<string | undefined>(undefined, { alias: 'brnTabs' });\n\t/** internal **/\n\tpublic $activeTab = this.activeTab.asReadonly();\n\n\tpublic readonly activationMode = input<BrnActivationMode>('automatic');\n\t/** internal **/\n\tpublic $activationMode = this.activationMode;\n\n\tpublic readonly tabActivated = output<string>();\n\n\tprivate readonly _tabs = signal<{ [key: string]: TabEntry }>({});\n\tpublic readonly $tabs = this._tabs.asReadonly();\n\n\tpublic registerTrigger(key: string, trigger: BrnTabsTrigger) {\n\t\tthis.updateEntry(key, { trigger });\n\t}\n\n\tpublic registerContent(key: string, content: BrnTabsContent) {\n\t\tthis.updateEntry(key, { content });\n\t}\n\n\tpublic unregisterTrigger(key: string) {\n\t\tthis.updateEntry(key, { trigger: undefined });\n\t\tif (this.activeTab() === key) {\n\t\t\tthis.activeTab.set(undefined);\n\t\t}\n\t}\n\n\tpublic unregisterContent(key: string): void {\n\t\tthis.updateEntry(key, { content: undefined });\n\t}\n\n\tprivate updateEntry(key: string, patch: Partial<TabEntry>) {\n\t\tthis._tabs.update((tabs) => {\n\t\t\tconst existing = tabs[key] ?? {};\n\t\t\tconst merged = { ...existing, ...patch };\n\t\t\tconst entryEmpty = !merged.trigger && !merged.content;\n\t\t\tif (entryEmpty) {\n\t\t\t\tconst { [key]: removed, ...rest } = tabs;\n\t\t\t\treturn rest;\n\t\t\t}\n\t\t\treturn { ...tabs, [key]: merged };\n\t\t});\n\t}\n\n\temitTabActivated(key: string) {\n\t\tthis.tabActivated.emit(key);\n\t}\n\n\tsetActiveTab(key: string) {\n\t\tthis.activeTab.set(key);\n\t}\n}\n","import { computed, Directive, effect, ElementRef, inject, input, type OnDestroy, untracked } from '@angular/core';\nimport { BrnTabs } from './brn-tabs';\n\n@Directive({\n\tselector: '[brnTabsContent]',\n\texportAs: 'brnTabsContent',\n\thost: {\n\t\trole: 'tabpanel',\n\t\ttabindex: '0',\n\t\t'[id]': '_contentId()',\n\t\t'[attr.aria-labelledby]': '_labelId()',\n\t\t'[hidden]': '_isSelected() === false',\n\t},\n})\nexport class BrnTabsContent implements OnDestroy {\n\tprivate readonly _root = inject(BrnTabs);\n\tprivate readonly _elementRef = inject(ElementRef);\n\n\tpublic readonly contentFor = input.required<string>({ alias: 'brnTabsContent' });\n\tprotected readonly _isSelected = computed(() => this._root.$activeTab() === this.contentFor());\n\tprotected readonly _contentId = computed(() => `brn-tabs-content-${this.contentFor()}`);\n\tprotected readonly _labelId = computed(() => `brn-tabs-label-${this.contentFor()}`);\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst contentFor = this.contentFor();\n\t\t\tuntracked(() => this._root.registerContent(contentFor, this));\n\t\t});\n\t}\n\n\tpublic focus() {\n\t\tthis._elementRef.nativeElement.focus();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._root.unregisterContent(this.contentFor());\n\t}\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport {\n\tDirective,\n\tElementRef,\n\ttype OnDestroy,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\tuntracked,\n} from '@angular/core';\nimport { BrnTabs } from './brn-tabs';\n\n@Directive({\n\tselector: 'button[brnTabsTrigger]',\n\texportAs: 'brnTabsTrigger',\n\thost: {\n\t\t'[id]': '_labelId()',\n\t\ttype: 'button',\n\t\trole: 'tab',\n\t\t'[tabindex]': '_disabled() ? -1 : (selected() ? 0 : -1)',\n\t\t'[attr.aria-selected]': 'selected()',\n\t\t'[attr.aria-controls]': '_contentId()',\n\t\t'[attr.aria-disabled]': '_disabled()',\n\t\t'[attr.data-state]': \"selected() ? 'active' : 'inactive'\",\n\t\t'[attr.data-orientation]': '_orientation()',\n\t\t'[attr.data-disabled]': \"_disabled() ? '' : undefined\",\n\t\t'[attr.disabled]': \"_disabled() ? '' : undefined\",\n\t\t'(click)': 'activate()',\n\t},\n})\nexport class BrnTabsTrigger implements OnDestroy {\n\tpublic readonly elementRef = inject(ElementRef);\n\n\tprivate readonly _root = inject(BrnTabs);\n\n\tprotected readonly _orientation = this._root.$orientation;\n\n\tpublic readonly triggerFor = input.required<string>({ alias: 'brnTabsTrigger' });\n\tpublic readonly selected = computed(() => this._root.$activeTab() === this.triggerFor());\n\tprotected readonly _contentId = computed(() => `brn-tabs-content-${this.triggerFor()}`);\n\tprotected readonly _labelId = computed(() => `brn-tabs-label-${this.triggerFor()}`);\n\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\tpublic get disabled(): boolean {\n\t\treturn this._disabled();\n\t}\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tconst triggerFor = this.triggerFor();\n\t\t\tuntracked(() => this._root.registerTrigger(triggerFor, this));\n\t\t});\n\t}\n\n\tpublic focus() {\n\t\tthis.elementRef.nativeElement.focus();\n\t\tif (this._root.$activationMode() === 'automatic') {\n\t\t\tthis.activate();\n\t\t}\n\t}\n\n\tpublic activate() {\n\t\tif (!this.triggerFor()) return;\n\t\tthis._root.setActiveTab(this.triggerFor());\n\t\tthis._root.emitTabActivated(this.triggerFor());\n\t}\n\n\tpublic get key(): string | undefined {\n\t\treturn this.triggerFor();\n\t}\n\n\tngOnDestroy(): void {\n\t\tthis._root.unregisterTrigger(this.triggerFor());\n\t}\n}\n","import { FocusKeyManager } from '@angular/cdk/a11y';\nimport { type AfterContentInit, Directive, ElementRef, contentChildren, inject } from '@angular/core';\nimport { fromEvent } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { BrnTabs } from './brn-tabs';\nimport { BrnTabsTrigger } from './brn-tabs-trigger';\n\n@Directive({\n\tselector: '[brnTabsList]',\n\texportAs: 'brnTabsList',\n\thost: {\n\t\trole: 'tablist',\n\t\t'[attr.aria-orientation]': '_orientation()',\n\t\t'[attr.data-orientation]': '_orientation()',\n\t},\n})\nexport class BrnTabsList implements AfterContentInit {\n\tprivate readonly _root = inject(BrnTabs);\n\n\tprotected readonly _orientation = this._root.$orientation;\n\tprivate readonly _direction = this._root.$direction;\n\tprivate readonly _activeTab = this._root.$activeTab;\n\tprivate readonly _tabs = this._root.$tabs;\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _keyDownListener = fromEvent(this._elementRef.nativeElement, 'keydown');\n\n\tprivate _keyManager?: FocusKeyManager<BrnTabsTrigger>;\n\n\tpublic readonly triggers = contentChildren(BrnTabsTrigger, { descendants: true });\n\n\tpublic ngAfterContentInit() {\n\t\tthis._keyManager = new FocusKeyManager<BrnTabsTrigger>(this.triggers())\n\t\t\t.withHorizontalOrientation(this._direction())\n\t\t\t.withHomeAndEnd()\n\t\t\t.withPageUpDown()\n\t\t\t.withWrap();\n\n\t\t// needed because by default the index is set to -1, which means first interaction is skipped\n\t\tthis._keyDownListener.pipe(take(1)).subscribe(() => {\n\t\t\tconst currentTabKey = this._activeTab();\n\t\t\tconst tabs = this._tabs();\n\t\t\tlet activeIndex = 0;\n\t\t\tif (currentTabKey) {\n\t\t\t\tconst currentTab = tabs[currentTabKey];\n\t\t\t\tif (currentTab) {\n\t\t\t\t\tactiveIndex = this.triggers().indexOf(currentTab.trigger);\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._keyManager?.setActiveItem(activeIndex);\n\t\t});\n\n\t\tthis._keyDownListener.subscribe((event) => {\n\t\t\tif ('key' in event) {\n\t\t\t\tif (this._orientation() === 'horizontal') {\n\t\t\t\t\tif (event.key === 'ArrowUp' || event.key === 'ArrowDown') return;\n\t\t\t\t}\n\t\t\t\tif (this._orientation() === 'vertical') {\n\t\t\t\t\tif (event.key === 'ArrowLeft' || event.key === 'ArrowRight') return;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis._keyManager?.onKeydown(event as KeyboardEvent);\n\t\t});\n\t}\n}\n","/**\n * We are building on shoulders of giants here and adapt the implementation provided by the incredible Angular\n * team: https://github.com/angular/components/blob/main/src/material/tabs/paginated-tab-header.ts\n * Check them out! Give them a try! Leave a star! Their work is incredible!\n */\n\n/**\n * @license\n * Copyright Google LLC All Rights Reserved.\n *\n * Use of this source code is governed by an MIT-style license that can be\n * found in the LICENSE file at https://angular.io/license\n */\n\nimport { FocusKeyManager, type FocusableOption } from '@angular/cdk/a11y';\nimport { type Direction, Directionality } from '@angular/cdk/bidi';\nimport { ENTER, SPACE, hasModifierKey } from '@angular/cdk/keycodes';\nimport { SharedResizeObserver } from '@angular/cdk/observers/private';\nimport { Platform, normalizePassiveListenerOptions } from '@angular/cdk/platform';\nimport { ViewportRuler } from '@angular/cdk/scrolling';\nimport {\n\tANIMATION_MODULE_TYPE,\n\ttype AfterContentChecked,\n\ttype AfterContentInit,\n\ttype AfterViewInit,\n\tChangeDetectorRef,\n\tDirective,\n\tElementRef,\n\tInjector,\n\tNgZone,\n\ttype OnDestroy,\n\ttype Signal,\n\tafterNextRender,\n\tbooleanAttribute,\n\tcomputed,\n\teffect,\n\tinject,\n\tinput,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { EMPTY, Observable, type Observer, Subject, fromEvent, merge, of as observableOf, timer } from 'rxjs';\nimport { debounceTime, filter, skip, startWith, switchMap, takeUntil } from 'rxjs/operators';\nimport { BrnTabs } from './brn-tabs';\n\n/** Config used to bind passive event listeners */\nconst passiveEventListenerOptions = normalizePassiveListenerOptions({\n\tpassive: true,\n}) as EventListenerOptions;\n\n/**\n * The directions that scrolling can go in when the header's tabs exceed the header width. 'After'\n * will scroll the header towards the end of the tabs list and 'before' will scroll towards the\n * beginning of the list.\n */\nexport type ScrollDirection = 'after' | 'before';\n\n/**\n * Amount of milliseconds to wait before starting to scroll the header automatically.\n * Set a little conservatively in order to handle fake events dispatched on touch devices.\n */\nconst HEADER_SCROLL_DELAY = 650;\n\n/**\n * Interval in milliseconds at which to scroll the header\n * while the user is holding their pointer.\n */\nconst HEADER_SCROLL_INTERVAL = 100;\n\n/** Item inside a paginated tab header. */\nexport type BrnPaginatedTabHeaderItem = FocusableOption & { elementRef: ElementRef };\n\n/**\n * Base class for a tab header that supported pagination.\n * @docs-private\n */\n@Directive()\nexport abstract class BrnTabsPaginatedList implements AfterContentChecked, AfterContentInit, AfterViewInit, OnDestroy {\n\tpublic abstract items: Signal<ReadonlyArray<BrnPaginatedTabHeaderItem>>;\n\tpublic abstract itemsChanges: Observable<ReadonlyArray<BrnPaginatedTabHeaderItem>>;\n\tpublic abstract tabListContainer: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract tabList: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract tabListInner: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract nextPaginator: Signal<ElementRef<HTMLElement>>;\n\tpublic abstract previousPaginator: Signal<ElementRef<HTMLElement>>;\n\n\t/** The distance in pixels that the tab labels should be translated to the left. */\n\tprivate _scrollDistance = 0;\n\n\t/** Whether the header should scroll to the selected index after the view has been checked. */\n\tprivate _selectedIndexChanged = false;\n\n\tprivate readonly _root = inject(BrnTabs);\n\tprivate readonly _activeTab = this._root.$activeTab;\n\tprivate readonly _tabs = this._root.$tabs;\n\n\t/** Emits when the component is destroyed. */\n\tprotected readonly _destroyed = new Subject<void>();\n\n\t/** Whether the controls for pagination should be displayed */\n\tpublic readonly showPaginationControls = signal(false);\n\n\t/** Whether the tab list can be scrolled more towards the end of the tab label list. */\n\tpublic disableScrollAfter = true;\n\n\t/** Whether the tab list can be scrolled more towards the beginning of the tab label list. */\n\tpublic disableScrollBefore = true;\n\n\t/**\n\t * The number of tab labels that are displayed on the header. When this changes, the header\n\t * should re-evaluate the scroll position.\n\t */\n\tprivate _tabLabelCount!: number;\n\n\t/** Whether the scroll distance has changed and should be applied after the view is checked. */\n\tprivate _scrollDistanceChanged!: boolean;\n\n\t/** Used to manage focus between the tabs. */\n\tprivate _keyManager!: FocusKeyManager<BrnPaginatedTabHeaderItem>;\n\n\t/** Cached text content of the header. */\n\tprivate _currentTextContent!: string;\n\n\t/** Stream that will stop the automated scrolling. */\n\tprivate readonly _stopScrolling = new Subject<void>();\n\n\t/**\n\t * Whether pagination should be disabled. This can be used to avoid unnecessary\n\t * layout recalculations if it's known that pagination won't be required.\n\t */\n\tpublic readonly disablePagination = input(false, { transform: booleanAttribute });\n\n\t/** The index of the active tab. */\n\tprivate readonly _selectedIndex = computed(() => {\n\t\tconst currentTabKey = this._activeTab();\n\t\tconst tabs = this._tabs();\n\n\t\tlet activeIndex = 0;\n\t\tif (currentTabKey && this.items()) {\n\t\t\tconst currentTab = tabs[currentTabKey];\n\t\t\tif (currentTab) {\n\t\t\t\tactiveIndex = this.items().indexOf(currentTab.trigger);\n\t\t\t}\n\t\t}\n\n\t\treturn activeIndex;\n\t});\n\n\t/** Event emitted when the option is selected. */\n\tpublic readonly selectFocusedIndex = output<number>();\n\n\t/** Event emitted when a label is focused. */\n\tpublic readonly indexFocused = output<number>();\n\n\tprivate readonly _sharedResizeObserver = inject(SharedResizeObserver);\n\n\tprivate readonly _injector = inject(Injector);\n\n\tprotected _elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\tprotected _changeDetectorRef: ChangeDetectorRef = inject(ChangeDetectorRef);\n\tprivate readonly _viewportRuler: ViewportRuler = inject(ViewportRuler);\n\tprivate readonly _dir = inject(Directionality, { optional: true });\n\tprivate readonly _ngZone: NgZone = inject(NgZone);\n\tprivate readonly _platform: Platform = inject(Platform);\n\tpublic readonly animationMode = inject(ANIMATION_MODULE_TYPE, { optional: true });\n\n\tconstructor() {\n\t\t// Bind the `mouseleave` event on the outside since it doesn't change anything in the view.\n\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\tfromEvent(this._elementRef.nativeElement, 'mouseleave')\n\t\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t\t.subscribe(() => {\n\t\t\t\t\tthis._stopInterval();\n\t\t\t\t});\n\t\t});\n\n\t\teffect(() => {\n\t\t\tconst selectedIndex = this._selectedIndex();\n\n\t\t\tif (selectedIndex !== 0) {\n\t\t\t\tthis._selectedIndexChanged = true;\n\t\t\t\tif (this._keyManager) {\n\t\t\t\t\tthis._keyManager.updateActiveItem(selectedIndex);\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}\n\n\t/** Called when the user has selected an item via the keyboard. */\n\tprotected abstract _itemSelected(event: KeyboardEvent): void;\n\n\tngAfterViewInit() {\n\t\t// We need to handle these events manually, because we want to bind passive event listeners.\n\t\tfromEvent(this.previousPaginator().nativeElement, 'touchstart', passiveEventListenerOptions)\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._handlePaginatorPress('before');\n\t\t\t});\n\n\t\tfromEvent(this.nextPaginator().nativeElement, 'touchstart', passiveEventListenerOptions)\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => {\n\t\t\t\tthis._handlePaginatorPress('after');\n\t\t\t});\n\t}\n\n\tngAfterContentInit() {\n\t\tconst dirChange = this._dir ? this._dir.change : observableOf('ltr');\n\t\t// We need to debounce resize events because the alignment logic is expensive.\n\t\t// If someone animates the width of tabs, we don't want to realign on every animation frame.\n\t\t// Once we haven't seen any more resize events in the last 32ms (~2 animaion frames) we can\n\t\t// re-align.\n\t\tconst resize = this._sharedResizeObserver\n\t\t\t.observe(this._elementRef.nativeElement)\n\t\t\t.pipe(debounceTime(32), takeUntil(this._destroyed));\n\t\t// Note: We do not actually need to watch these events for proper functioning of the tabs,\n\t\t// the resize events above should capture any viewport resize that we care about. However,\n\t\t// removing this is fairly breaking for screenshot tests, so we're leaving it here for now.\n\t\tconst viewportResize = this._viewportRuler.change(150).pipe(takeUntil(this._destroyed));\n\n\t\tconst realign = () => {\n\t\t\tthis.updatePagination();\n\t\t};\n\n\t\tthis._keyManager = new FocusKeyManager<BrnPaginatedTabHeaderItem>(this.items())\n\t\t\t.withHorizontalOrientation(this._getLayoutDirection())\n\t\t\t.withHomeAndEnd()\n\t\t\t.withWrap()\n\t\t\t// Allow focus to land on disabled tabs, as per https://w3c.github.io/aria-practices/#kbd_disabled_controls\n\t\t\t.skipPredicate(() => false);\n\n\t\tthis._keyManager.updateActiveItem(this._selectedIndex());\n\n\t\t// Note: We do not need to realign after the first render for proper functioning of the tabs\n\t\t// the resize events above should fire when we first start observing the element. However,\n\t\t// removing this is fairly breaking for screenshot tests, so we're leaving it here for now.\n\t\tafterNextRender(realign, { injector: this._injector });\n\n\t\t// On dir change or resize, realign the ink bar and update the orientation of\n\t\t// the key manager if the direction has changed.\n\t\tmerge(dirChange, viewportResize, resize, this.itemsChanges, this._itemsResized())\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => {\n\t\t\t\t// We need to defer this to give the browser some time to recalculate\n\t\t\t\t// the element dimensions. The call has to be wrapped in `NgZone.run`,\n\t\t\t\t// because the viewport change handler runs outside of Angular.\n\t\t\t\tthis._ngZone.run(() => {\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\t// Clamp the scroll distance, because it can change with the number of tabs.\n\t\t\t\t\t\tthis._scrollDistance = Math.max(0, Math.min(this._getMaxScrollDistance(), this._scrollDistance));\n\t\t\t\t\t\trealign();\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t\tthis._keyManager.withHorizontalOrientation(this._getLayoutDirection());\n\t\t\t});\n\n\t\t// If there is a change in the focus key manager we need to emit the `indexFocused`\n\t\t// event in order to provide a public event that notifies about focus changes. Also we realign\n\t\t// the tabs container by scrolling the new focused tab into the visible section.\n\t\tthis._keyManager.change.subscribe((newFocusIndex) => {\n\t\t\tthis.indexFocused.emit(newFocusIndex);\n\t\t\tthis._setTabFocus(newFocusIndex);\n\t\t});\n\t}\n\n\t/** Sends any changes that could affect the layout of the items. */\n\tprivate _itemsResized(): Observable<ResizeObserverEntry[]> {\n\t\tif (typeof ResizeObserver !== 'function') {\n\t\t\treturn EMPTY;\n\t\t}\n\n\t\treturn this.itemsChanges.pipe(\n\t\t\tstartWith(this.items()),\n\t\t\tswitchMap(\n\t\t\t\t(tabItems: ReadonlyArray<BrnPaginatedTabHeaderItem>) =>\n\t\t\t\t\tnew Observable((observer: Observer<ResizeObserverEntry[]>) =>\n\t\t\t\t\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\t\t\t\t\tconst resizeObserver = new ResizeObserver((entries) => observer.next(entries));\n\t\t\t\t\t\t\tfor (const tabItem of tabItems) {\n\t\t\t\t\t\t\t\tresizeObserver.observe(tabItem.elementRef.nativeElement);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn () => {\n\t\t\t\t\t\t\t\tresizeObserver.disconnect();\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t),\n\t\t\t// Skip the first emit since the resize observer emits when an item\n\t\t\t// is observed for new items when the tab is already inserted\n\t\t\tskip(1),\n\t\t\t// Skip emissions where all the elements are invisible since we don't want\n\t\t\t// the header to try and re-render with invalid measurements. See #25574.\n\t\t\tfilter((entries) => entries.some((e) => e.contentRect.width > 0 && e.contentRect.height > 0)),\n\t\t);\n\t}\n\n\tngAfterContentChecked(): void {\n\t\t// If the number of tab labels have changed, check if scrolling should be enabled\n\t\tif (this._tabLabelCount !== this.items().length) {\n\t\t\tthis.updatePagination();\n\t\t\tthis._tabLabelCount = this.items().length;\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\n\t\t// If the selected index has changed, scroll to the label and check if the scrolling controls\n\t\t// should be disabled.\n\t\tif (this._selectedIndexChanged) {\n\t\t\tthis._scrollToLabel(this._selectedIndex());\n\t\t\tthis._checkScrollingControls();\n\t\t\tthis._selectedIndexChanged = false;\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\n\t\t// If the scroll distance has been changed (tab selected, focused, scroll controls activated),\n\t\t// then translate the header to reflect this.\n\t\tif (this._scrollDistanceChanged) {\n\t\t\tthis._updateTabScrollPosition();\n\t\t\tthis._scrollDistanceChanged = false;\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\tngOnDestroy() {\n\t\tthis._keyManager?.destroy();\n\t\tthis._destroyed.next();\n\t\tthis._destroyed.complete();\n\t\tthis._stopScrolling.complete();\n\t}\n\n\t/** Handles keyboard events on the header. */\n\t_handleKeydown(event: KeyboardEvent) {\n\t\t// We don't handle any key bindings with a modifier key.\n\t\tif (hasModifierKey(event)) {\n\t\t\treturn;\n\t\t}\n\n\t\tswitch (event.keyCode) {\n\t\t\tcase ENTER:\n\t\t\tcase SPACE:\n\t\t\t\tif (this.focusIndex !== this._selectedIndex()) {\n\t\t\t\t\tconst item = this.items()[this.focusIndex];\n\n\t\t\t\t\tif (item && !item.disabled) {\n\t\t\t\t\t\tthis.selectFocusedIndex.emit(this.focusIndex);\n\t\t\t\t\t\tthis._itemSelected(event);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tthis._keyManager.onKeydown(event);\n\t\t}\n\t}\n\n\t/**\n\t * Callback for when the MutationObserver detects that the content has changed.\n\t */\n\t_onContentChanges() {\n\t\tconst textContent = this._elementRef.nativeElement.textContent;\n\n\t\t// We need to diff the text content of the header, because the MutationObserver callback\n\t\t// will fire even if the text content didn't change which is inefficient and is prone\n\t\t// to infinite loops if a poorly constructed expression is passed in (see #14249).\n\t\tif (textContent !== this._currentTextContent) {\n\t\t\tthis._currentTextContent = textContent || '';\n\n\t\t\t// The content observer runs outside the `NgZone` by default, which\n\t\t\t// means that we need to bring the callback back in ourselves.\n\t\t\tthis._ngZone.run(() => {\n\t\t\t\tthis.updatePagination();\n\t\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t\t});\n\t\t}\n\t}\n\n\t/**\n\t * Updates the view whether pagination should be enabled or not.\n\t *\n\t * WARNING: Calling this method can be very costly in terms of performance. It should be called\n\t * as infrequently as possible from outside of the Tabs component as it causes a reflow of the\n\t * page.\n\t */\n\tupdatePagination() {\n\t\tthis._checkPaginationEnabled();\n\t\tthis._checkScrollingControls();\n\t\tthis._updateTabScrollPosition();\n\t}\n\n\t/** Tracks which element has focus; used for keyboard navigation */\n\tpublic get focusIndex(): number {\n\t\treturn this._keyManager ? (this._keyManager.activeItemIndex ?? 0) : 0;\n\t}\n\n\t/** When the focus index is set, we must manually send focus to the correct label */\n\tpublic set focusIndex(value: number) {\n\t\tif (!this._isValidIndex(value) || this.focusIndex === value || !this._keyManager) {\n\t\t\treturn;\n\t\t}\n\n\t\tthis._keyManager.setActiveItem(value);\n\t}\n\n\t/**\n\t * Determines if an index is valid. If the tabs are not ready yet, we assume that the user is\n\t * providing a valid index and return true.\n\t */\n\t_isValidIndex(index: number): boolean {\n\t\treturn this.items() ? !!this.items()[index] : true;\n\t}\n\n\t/**\n\t * Sets focus on the HTML element for the label wrapper and scrolls it into the view if\n\t * scrolling is enabled.\n\t */\n\t_setTabFocus(tabIndex: number) {\n\t\tif (this.showPaginationControls()) {\n\t\t\tthis._scrollToLabel(tabIndex);\n\t\t}\n\n\t\tif (this.items()?.length) {\n\t\t\tthis.items()[tabIndex].focus();\n\n\t\t\t// Do not let the browser manage scrolling to focus the element, this will be handled\n\t\t\t// by using translation. In LTR, the scroll left should be 0. In RTL, the scroll width\n\t\t\t// should be the full width minus the offset width.\n\t\t\tconst containerEl = this.tabListContainer().nativeElement;\n\t\t\tconst dir = this._getLayoutDirection();\n\n\t\t\tif (dir === 'ltr') {\n\t\t\t\tcontainerEl.scrollLeft = 0;\n\t\t\t} else {\n\t\t\t\tcontainerEl.scrollLeft = containerEl.scrollWidth - containerEl.offsetWidth;\n\t\t\t}\n\t\t}\n\t}\n\n\t/** The layout direction of the containing app. */\n\t_getLayoutDirection(): Direction {\n\t\treturn this._dir && this._dir.value === 'rtl' ? 'rtl' : 'ltr';\n\t}\n\n\t/** Performs the CSS transformation on the tab list that will cause the list to scroll. */\n\t_updateTabScrollPosition() {\n\t\tif (this.disablePagination()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst scrollDistance = this.scrollDistance;\n\t\tconst translateX = this._getLayoutDirection() === 'ltr' ? -scrollDistance : scrollDistance;\n\n\t\t// Don't use `translate3d` here because we don't want to create a new layer. A new layer\n\t\t// seems to cause flickering and overflow in Internet Explorer. For example, the ink bar\n\t\t// and ripples will exceed the boundaries of the visible tab bar.\n\t\t// See: https://github.com/angular/components/issues/10276\n\t\t// We round the `transform` here, because transforms with sub-pixel precision cause some\n\t\t// browsers to blur the content of the element.\n\t\tthis.tabList().nativeElement.style.transform = `translateX(${Math.round(translateX)}px)`;\n\n\t\t// Setting the `transform` on IE will change the scroll offset of the parent, causing the\n\t\t// position to be thrown off in some cases. We have to reset it ourselves to ensure that\n\t\t// it doesn't get thrown off. Note that we scope it only to IE and Edge, because messing\n\t\t// with the scroll position throws off Chrome 71+ in RTL mode (see #14689).\n\t\tif (this._platform.TRIDENT || this._platform.EDGE) {\n\t\t\tthis.tabListContainer().nativeElement.scrollLeft = 0;\n\t\t}\n\t}\n\n\t/** Sets the distance in pixels that the tab header should be transformed in the X-axis. */\n\tpublic get scrollDistance(): number {\n\t\treturn this._scrollDistance;\n\t}\n\tpublic set scrollDistance(value: number) {\n\t\tthis._scrollTo(value);\n\t}\n\n\t/**\n\t * Moves the tab list in the 'before' or 'after' direction (towards the beginning of the list or\n\t * the end of the list, respectively). The distance to scroll is computed to be a third of the\n\t * length of the tab list view window.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_scrollHeader(direction: ScrollDirection) {\n\t\tconst viewLength = this.tabListContainer().nativeElement.offsetWidth;\n\n\t\t// Move the scroll distance one-third the length of the tab list's viewport.\n\t\tconst scrollAmount = ((direction === 'before' ? -1 : 1) * viewLength) / 3;\n\n\t\treturn this._scrollTo(this._scrollDistance + scrollAmount);\n\t}\n\n\t/** Handles click events on the pagination arrows. */\n\t_handlePaginatorClick(direction: ScrollDirection) {\n\t\tthis._stopInterval();\n\t\tthis._scrollHeader(direction);\n\t}\n\n\t/**\n\t * Moves the tab list such that the desired tab label (marked by index) is moved into view.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_scrollToLabel(labelIndex: number) {\n\t\tif (this.disablePagination()) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst selectedLabel = this.items() ? this.items()[labelIndex] : null;\n\n\t\tif (!selectedLabel) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The view length is the visible width of the tab labels.\n\t\tconst viewLength = this.tabListContainer().nativeElement.offsetWidth;\n\t\tconst { offsetLeft, offsetWidth } = selectedLabel.elementRef.nativeElement;\n\n\t\tlet labelBeforePos: number;\n\t\tlet labelAfterPos: number;\n\t\tif (this._getLayoutDirection() === 'ltr') {\n\t\t\tlabelBeforePos = offsetLeft;\n\t\t\tlabelAfterPos = labelBeforePos + offsetWidth;\n\t\t} else {\n\t\t\tlabelAfterPos = this.tabListInner().nativeElement.offsetWidth - offsetLeft;\n\t\t\tlabelBeforePos = labelAfterPos - offsetWidth;\n\t\t}\n\n\t\tconst beforeVisiblePos = this.scrollDistance;\n\t\tconst afterVisiblePos = this.scrollDistance + viewLength;\n\n\t\tif (labelBeforePos < beforeVisiblePos) {\n\t\t\t// Scroll header to move label to the before direction\n\t\t\tthis.scrollDistance -= beforeVisiblePos - labelBeforePos;\n\t\t} else if (labelAfterPos > afterVisiblePos) {\n\t\t\t// Scroll header to move label to the after direction\n\t\t\tthis.scrollDistance += Math.min(labelAfterPos - afterVisiblePos, labelBeforePos - beforeVisiblePos);\n\t\t}\n\t}\n\n\t/**\n\t * Evaluate whether the pagination controls should be displayed. If the scroll width of the\n\t * tab list is wider than the size of the header container, then the pagination controls should\n\t * be shown.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_checkPaginationEnabled() {\n\t\tif (this.disablePagination()) {\n\t\t\tthis.showPaginationControls.set(false);\n\t\t} else {\n\t\t\tconst isEnabled = this.tabListInner().nativeElement.scrollWidth > this._elementRef.nativeElement.offsetWidth;\n\n\t\t\tif (!isEnabled) {\n\t\t\t\tthis.scrollDistance = 0;\n\t\t\t}\n\n\t\t\tif (isEnabled !== this.showPaginationControls()) {\n\t\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t\t}\n\n\t\t\tthis.showPaginationControls.set(isEnabled);\n\t\t}\n\t}\n\n\t/**\n\t * Evaluate whether the before and after controls should be enabled or disabled.\n\t * If the header is at the beginning of the list (scroll distance is equal to 0) then disable the\n\t * before button. If the header is at the end of the list (scroll distance is equal to the\n\t * maximum distance we can scroll), then disable the after button.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_checkScrollingControls() {\n\t\tif (this.disablePagination()) {\n\t\t\tthis.disableScrollAfter = this.disableScrollBefore = true;\n\t\t} else {\n\t\t\t// Check if the pagination arrows should be activated.\n\t\t\tthis.disableScrollBefore = this.scrollDistance === 0;\n\t\t\tthis.disableScrollAfter = this.scrollDistance === this._getMaxScrollDistance();\n\t\t\tthis._changeDetectorRef.markForCheck();\n\t\t}\n\t}\n\n\t/**\n\t * Determines what is the maximum length in pixels that can be set for the scroll distance. This\n\t * is equal to the difference in width between the tab list container and tab header container.\n\t *\n\t * This is an expensive call that forces a layout reflow to compute box and scroll metrics and\n\t * should be called sparingly.\n\t */\n\t_getMaxScrollDistance(): number {\n\t\tconst lengthOfTabList = this.tabListInner().nativeElement.scrollWidth;\n\t\tconst viewLength = this.tabListContainer().nativeElement.offsetWidth;\n\t\treturn lengthOfTabList - viewLength || 0;\n\t}\n\n\t/** Stops the currently-running paginator interval. */\n\t_stopInterval() {\n\t\tthis._stopScrolling.next();\n\t}\n\n\t/**\n\t * Handles the user pressing down on one of the paginators.\n\t * Starts scrolling the header after a certain amount of time.\n\t * @param direction In which direction the paginator should be scrolled.\n\t */\n\t_handlePaginatorPress(direction: ScrollDirection, mouseEvent?: MouseEvent) {\n\t\t// Don't start auto scrolling for right mouse button clicks. Note that we shouldn't have to\n\t\t// null check the `button`, but we do it so we don't break tests that use fake events.\n\t\tif (mouseEvent && mouseEvent.button !== null && mouseEvent.button !== 0) {\n\t\t\treturn;\n\t\t}\n\n\t\t// Avoid overlapping timers.\n\t\tthis._stopInterval();\n\n\t\t// Start a timer after the delay and keep firing based on the interval.\n\t\ttimer(HEADER_SCROLL_DELAY, HEADER_SCROLL_INTERVAL)\n\t\t\t// Keep the timer going until something tells it to stop or the component is destroyed.\n\t\t\t.pipe(takeUntil(merge(this._stopScrolling, this._destroyed)))\n\t\t\t.subscribe(() => {\n\t\t\t\tconst { maxScrollDistance, distance } = this._scrollHeader(direction);\n\n\t\t\t\t// Stop the timer if we've reached the start or the end.\n\t\t\t\tif (distance === 0 || distance >= maxScrollDistance) {\n\t\t\t\t\tthis._stopInterval();\n\t\t\t\t}\n\t\t\t});\n\t}\n\n\t/**\n\t * Scrolls the header to a given position.\n\t * @param position Position to which to scroll.\n\t * @returns Information on the current scroll distance and the maximum.\n\t */\n\tprivate _scrollTo(position: number) {\n\t\tif (this.disablePagination()) {\n\t\t\treturn { maxScrollDistance: 0, distance: 0 };\n\t\t}\n\n\t\tconst maxScrollDistance = this._getMaxScrollDistance();\n\t\tthis._scrollDistance = Math.max(0, Math.min(maxScrollDistance, position));\n\n\t\t// Mark that the scroll distance has changed so that after the view is checked, the CSS\n\t\t// transformation can move the header.\n\t\tthis._scrollDistanceChanged = true;\n\t\tthis._checkScrollingControls();\n\n\t\treturn { maxScrollDistance, distance: this._scrollDistance };\n\t}\n}\n","import { BrnTabs } from './lib/brn-tabs';\nimport { BrnTabsContent } from './lib/brn-tabs-content';\nimport { BrnTabsList } from './lib/brn-tabs-list';\nimport { BrnTabsTrigger } from './lib/brn-tabs-trigger';\n\nexport * from './lib/brn-tabs';\nexport * from './lib/brn-tabs-content';\nexport * from './lib/brn-tabs-list';\nexport * from './lib/brn-tabs-paginated-list';\nexport * from './lib/brn-tabs-trigger';\n\nexport const BrnTabsImports = [BrnTabs, BrnTabsList, BrnTabsTrigger, BrnTabsContent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["observableOf"],"mappings":";;;;;;;;;;;MAiBa,OAAO,CAAA;AACH,IAAA,WAAW,GAAG,KAAK,CAAqB,YAAY,CAAC;;AAE9D,IAAA,YAAY,GAAG,IAAI,CAAC,WAAW;AAEtB,IAAA,SAAS,GAAG,KAAK,CAAmB,KAAK,CAAC;;AAEnD,IAAA,UAAU,GAAG,IAAI,CAAC,SAAS;IAElB,SAAS,GAAG,KAAK,CAAqB,SAAS,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC;;AAE/E,IAAA,UAAU,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,EAAE;AAE/B,IAAA,cAAc,GAAG,KAAK,CAAoB,WAAW,CAAC;;AAE/D,IAAA,eAAe,GAAG,IAAI,CAAC,cAAc;IAE5B,YAAY,GAAG,MAAM,EAAU;AAE9B,IAAA,KAAK,GAAG,MAAM,CAA8B,EAAE,CAAC;AAChD,IAAA,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,EAAE;IAExC,eAAe,CAAC,GAAW,EAAE,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BxC,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;8GAApB,oBAAoB,EAAA,YAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,iBAAA,EAAA,EAAA,iBAAA,EAAA,mBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,QAAA,EAAA,IAAA,EAAA,UAAA,EAAA,KAAA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,kBAAA,EAAA,oBAAA,EAAA,YAAA,EAAA,cAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBADzC;;;ACjEM,MAAM,cAAc,GAAG,CAAC,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,cAAc;;ACXnF;;AAEG;;;;"}
|
|
@@ -143,6 +143,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
143
143
|
type: Directive,
|
|
144
144
|
args: [{
|
|
145
145
|
selector: '[brnToggleGroup],brn-toggle-group',
|
|
146
|
+
exportAs: 'brnToggleGroup',
|
|
146
147
|
providers: [provideBrnToggleGroup(BrnToggleGroup), BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR],
|
|
147
148
|
host: {
|
|
148
149
|
role: 'group',
|
|
@@ -150,7 +151,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
150
151
|
'[attr.data-disabled]': 'disabledState()',
|
|
151
152
|
'(focusout)': 'onTouched()',
|
|
152
153
|
},
|
|
153
|
-
exportAs: 'brnToggleGroup',
|
|
154
154
|
}]
|
|
155
155
|
}] });
|
|
156
156
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-toggle-group.mjs","sources":["../../../../libs/brain/toggle-group/src/lib/brn-toggle-group.token.ts","../../../../libs/brain/toggle-group/src/lib/brn-toggle-group.ts","../../../../libs/brain/toggle-group/src/lib/brn-toggle-item.ts","../../../../libs/brain/toggle-group/src/index.ts","../../../../libs/brain/toggle-group/src/spartan-ng-brain-toggle-group.ts"],"sourcesContent":["import { type ExistingProvider, InjectionToken, type Type, inject } from '@angular/core';\nimport type { BrnToggleGroup } from './brn-toggle-group';\n\nconst BrnToggleGroupToken = new InjectionToken<BrnToggleGroup>('BrnToggleGroupToken');\n\nexport function injectBrnToggleGroup<T>(): BrnToggleGroup<T> | null {\n\treturn inject(BrnToggleGroupToken, { optional: true }) as BrnToggleGroup<T> | null;\n}\n\nexport function provideBrnToggleGroup<T>(value: Type<BrnToggleGroup<T>>): ExistingProvider {\n\treturn { provide: BrnToggleGroupToken, useExisting: value };\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, forwardRef, input, linkedSignal, model, output } from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { provideBrnToggleGroup } from './brn-toggle-group.token';\nimport type { BrnToggleGroupItem } from './brn-toggle-item';\n\nexport const BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnToggleGroup),\n\tmulti: true,\n};\n\nexport class BrnButtonToggleChange<T = unknown> {\n\tconstructor(\n\t\tpublic source: BrnToggleGroupItem<T>,\n\t\tpublic value: ToggleValue<T>,\n\t) {}\n}\n\n@Directive({\n\tselector: '[brnToggleGroup],brn-toggle-group',\n\tproviders: [provideBrnToggleGroup(BrnToggleGroup), BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR],\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.aria-disabled]': 'disabledState()',\n\t\t'[attr.data-disabled]': 'disabledState()',\n\t\t'(focusout)': 'onTouched()',\n\t},\n\texportAs: 'brnToggleGroup',\n})\nexport class BrnToggleGroup<T = unknown> implements ControlValueAccessor {\n\t/** The type of the toggle group. */\n\tpublic readonly type = input<ToggleType>('single');\n\n\t/** Whether the toggle group allows multiple selections. */\n\tprotected readonly _multiple = computed(() => this.type() === 'multiple');\n\n\t/** Value of the toggle group. */\n\tpublic readonly value = model<ToggleValue<T>>(undefined);\n\n\t/** Emits when the value changes. */\n\tpublic readonly valueChange = output<ToggleValue<T>>();\n\n\t/** Whether no button toggles need to be selected. */\n\tpublic readonly nullable = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether the button toggle group is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The disabled state. */\n\tpublic readonly disabledState = linkedSignal(this.disabled);\n\n\t/** Emit event when the group value changes. */\n\tpublic readonly change = output<BrnButtonToggleChange<T>>();\n\n\t/**\n\t * The method to be called in order to update ngModel.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onChange: (value: ToggleValue<T>) => void = () => {};\n\n\t/** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected onTouched: () => void = () => {};\n\n\twriteValue(value: ToggleValue<T>): void {\n\t\tthis.value.set(value);\n\t}\n\n\tregisterOnChange(fn: (value: ToggleValue<T>) => void) {\n\t\tthis._onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void) {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabledState.set(isDisabled);\n\t}\n\n\t/**\n\t * @internal\n\t * Determines whether a value can be set on the group.\n\t */\n\tcanDeselect(value: ToggleValue<T>): boolean {\n\t\t// if null values are allowed, the group can always be nullable\n\t\tif (this.nullable()) return true;\n\n\t\tconst currentValue = this.value();\n\n\t\tif (this._multiple() && Array.isArray(currentValue)) {\n\t\t\treturn !(currentValue.length === 1 && currentValue[0] === value);\n\t\t}\n\n\t\treturn currentValue !== value;\n\t}\n\n\t/**\n\t * @internal\n\t * Selects a value.\n\t */\n\tselect(value: T, source: BrnToggleGroupItem<T>): void {\n\t\tif (this.disabledState() || this.isSelected(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentValue = this.value();\n\n\t\t// emit the valueChange event here as we should only emit based on user interaction\n\t\tif (this._multiple()) {\n\t\t\tthis.emitSelectionChange([...((currentValue ?? []) as T[]), value], source);\n\t\t} else {\n\t\t\tthis.emitSelectionChange(value, source);\n\t\t}\n\n\t\tthis._onChange(this.value());\n\t\tthis.change.emit(new BrnButtonToggleChange<T>(source, this.value()));\n\t}\n\n\t/**\n\t * @internal\n\t * Deselects a value.\n\t */\n\tdeselect(value: T, source: BrnToggleGroupItem<T>): void {\n\t\tif (this.disabledState() || !this.isSelected(value) || !this.canDeselect(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentValue = this.value();\n\n\t\tif (this._multiple()) {\n\t\t\tthis.emitSelectionChange(\n\t\t\t\t((currentValue ?? []) as T[]).filter((v) => v !== value),\n\t\t\t\tsource,\n\t\t\t);\n\t\t} else if (currentValue === value) {\n\t\t\tthis.emitSelectionChange(null, source);\n\t\t}\n\t}\n\n\t/**\n\t * @internal\n\t * Determines whether a value is selected.\n\t */\n\tisSelected(value: T): boolean {\n\t\tconst currentValue = this.value();\n\n\t\tif (\n\t\t\tcurrentValue == null ||\n\t\t\tcurrentValue === undefined ||\n\t\t\t(Array.isArray(currentValue) && currentValue.length === 0)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this._multiple()) {\n\t\t\treturn (currentValue as T[])?.includes(value);\n\t\t}\n\t\treturn currentValue === value;\n\t}\n\n\t/** Update the value of the group */\n\tprivate emitSelectionChange(value: ToggleValue<T>, source: BrnToggleGroupItem<T>): void {\n\t\tthis.value.set(value);\n\t\tthis.valueChange.emit(value);\n\t\tthis._onChange(value);\n\t\tthis.change.emit(new BrnButtonToggleChange<T>(source, this.value()));\n\t}\n}\n\nexport type ToggleValue<T> = T | T[] | null | undefined;\nexport type ToggleType = 'single' | 'multiple';\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input, model } from '@angular/core';\nimport { injectBrnToggleGroup } from './brn-toggle-group.token';\n\n@Directive({\n\tselector: 'button[brnToggleGroupItem]',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'[attr.disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-state]': '_state()',\n\t\t'[attr.aria-pressed]': '_isOn()',\n\t\t'[attr.aria-label]': 'ariaLabel() || null',\n\t\t'[type]': 'type()',\n\t\t'(click)': 'toggle()',\n\t},\n})\nexport class BrnToggleGroupItem<T> {\n\tprivate static _uniqueId = 0;\n\n\t/** Access the toggle group if available. */\n\tprotected readonly _group = injectBrnToggleGroup<T>();\n\n\t/** The id of the toggle. */\n\tpublic readonly id = input(`brn-toggle-group-item-${++BrnToggleGroupItem._uniqueId}`);\n\n\t/** The value this toggle represents. */\n\tpublic readonly value = input<T>();\n\n\t/** Whether the toggle is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether the toggle is disabled either from itself or from the group. */\n\tprotected readonly _disabled = computed(() => this.disabled() || this._group?.disabled());\n\n\t/** The current state of the toggle when not used in a group. */\n\tpublic readonly state = model<'on' | 'off'>('off');\n\n\t/** The type of the button. */\n\tpublic readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/** Whether the toggle is in the on state. */\n\tprotected readonly _isOn = computed(() => this._state() === 'on');\n\n\t/** The current state that reflects the group state or the model state. */\n\tprotected readonly _state = computed(() => {\n\t\tif (this._group) {\n\t\t\treturn this._group.isSelected(this.value() as T) ? 'on' : 'off';\n\t\t}\n\t\treturn this.state();\n\t});\n\n\ttoggle(): void {\n\t\tif (this._disabled()) return;\n\n\t\tif (this._group) {\n\t\t\tif (this._isOn()) {\n\t\t\t\tthis._group.deselect(this.value() as T, this);\n\t\t\t} else {\n\t\t\t\tthis._group.select(this.value() as T, this);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.state.set(this._isOn() ? 'off' : 'on');\n\t\t}\n\t}\n}\n","import { BrnToggleGroup } from './lib/brn-toggle-group';\nimport { BrnToggleGroupItem } from './lib/brn-toggle-item';\n\nexport * from './lib/brn-toggle-group';\nexport * from './lib/brn-toggle-group.token';\nexport * from './lib/brn-toggle-item';\n\nexport const BrnToggleGroupImports = [BrnToggleGroup, BrnToggleGroupItem] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAAM,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,CAAC;SAErE,oBAAoB,GAAA;IACnC,OAAO,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAA6B;AACnF;AAEM,SAAU,qBAAqB,CAAI,KAA8B,EAAA;IACtE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,KAAK,EAAE;AAC5D;;ACLO,MAAM,sCAAsC,GAAG;AACrD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,cAAc,CAAC;AAC7C,IAAA,KAAK,EAAE,IAAI;;MAGC,qBAAqB,CAAA;AAEzB,IAAA,MAAA;AACA,IAAA,KAAA;IAFR,WAAA,CACQ,MAA6B,EAC7B,KAAqB,EAAA;QADrB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;;AAEb;MAaY,cAAc,CAAA;;AAEV,IAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,CAAC;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AAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,OAAA,EAAA,EAAA,KAAA,EAAA,aAAA,EAAA,EAAA,IAAA,EAAA,EAAA,SAAA,EAAA,EAAA,OAAA,EAAA,UAAA,EAAA,EAAA,UAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,eAAA,EAAA,2BAAA,EAAA,oBAAA,EAAA,2BAAA,EAAA,iBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,IAAI,EAAE;AACL,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,iBAAiB,EAAE,2BAA2B;AAC9C,wBAAA,sBAAsB,EAAE,2BAA2B;AACnD,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,qBAAqB,EAAE,SAAS;AAChC,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,QAAQ,EAAE,QAAQ;AAClB,wBAAA,SAAS,EAAE,UAAU;AACrB,qBAAA;AACD,iBAAA;;;MCTY,qBAAqB,GAAG,CAAC,cAAc,EAAE,kBAAkB;;ACPxE;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-toggle-group.mjs","sources":["../../../../libs/brain/toggle-group/src/lib/brn-toggle-group.token.ts","../../../../libs/brain/toggle-group/src/lib/brn-toggle-group.ts","../../../../libs/brain/toggle-group/src/lib/brn-toggle-item.ts","../../../../libs/brain/toggle-group/src/index.ts","../../../../libs/brain/toggle-group/src/spartan-ng-brain-toggle-group.ts"],"sourcesContent":["import { type ExistingProvider, InjectionToken, type Type, inject } from '@angular/core';\nimport type { BrnToggleGroup } from './brn-toggle-group';\n\nconst BrnToggleGroupToken = new InjectionToken<BrnToggleGroup>('BrnToggleGroupToken');\n\nexport function injectBrnToggleGroup<T>(): BrnToggleGroup<T> | null {\n\treturn inject(BrnToggleGroupToken, { optional: true }) as BrnToggleGroup<T> | null;\n}\n\nexport function provideBrnToggleGroup<T>(value: Type<BrnToggleGroup<T>>): ExistingProvider {\n\treturn { provide: BrnToggleGroupToken, useExisting: value };\n}\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { booleanAttribute, computed, Directive, forwardRef, input, linkedSignal, model, output } from '@angular/core';\nimport { type ControlValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { provideBrnToggleGroup } from './brn-toggle-group.token';\nimport type { BrnToggleGroupItem } from './brn-toggle-item';\n\nexport const BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnToggleGroup),\n\tmulti: true,\n};\n\nexport class BrnButtonToggleChange<T = unknown> {\n\tconstructor(\n\t\tpublic source: BrnToggleGroupItem<T>,\n\t\tpublic value: ToggleValue<T>,\n\t) {}\n}\n\n@Directive({\n\tselector: '[brnToggleGroup],brn-toggle-group',\n\texportAs: 'brnToggleGroup',\n\tproviders: [provideBrnToggleGroup(BrnToggleGroup), BRN_BUTTON_TOGGLE_GROUP_VALUE_ACCESSOR],\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.aria-disabled]': 'disabledState()',\n\t\t'[attr.data-disabled]': 'disabledState()',\n\t\t'(focusout)': 'onTouched()',\n\t},\n})\nexport class BrnToggleGroup<T = unknown> implements ControlValueAccessor {\n\t/** The type of the toggle group. */\n\tpublic readonly type = input<ToggleType>('single');\n\n\t/** Whether the toggle group allows multiple selections. */\n\tprotected readonly _multiple = computed(() => this.type() === 'multiple');\n\n\t/** Value of the toggle group. */\n\tpublic readonly value = model<ToggleValue<T>>(undefined);\n\n\t/** Emits when the value changes. */\n\tpublic readonly valueChange = output<ToggleValue<T>>();\n\n\t/** Whether no button toggles need to be selected. */\n\tpublic readonly nullable = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether the button toggle group is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The disabled state. */\n\tpublic readonly disabledState = linkedSignal(this.disabled);\n\n\t/** Emit event when the group value changes. */\n\tpublic readonly change = output<BrnButtonToggleChange<T>>();\n\n\t/**\n\t * The method to be called in order to update ngModel.\n\t */\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprivate _onChange: (value: ToggleValue<T>) => void = () => {};\n\n\t/** onTouch function registered via registerOnTouch (ControlValueAccessor). */\n\t// eslint-disable-next-line @typescript-eslint/no-empty-function\n\tprotected onTouched: () => void = () => {};\n\n\twriteValue(value: ToggleValue<T>): void {\n\t\tthis.value.set(value);\n\t}\n\n\tregisterOnChange(fn: (value: ToggleValue<T>) => void) {\n\t\tthis._onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: () => void) {\n\t\tthis.onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.disabledState.set(isDisabled);\n\t}\n\n\t/**\n\t * @internal\n\t * Determines whether a value can be set on the group.\n\t */\n\tcanDeselect(value: ToggleValue<T>): boolean {\n\t\t// if null values are allowed, the group can always be nullable\n\t\tif (this.nullable()) return true;\n\n\t\tconst currentValue = this.value();\n\n\t\tif (this._multiple() && Array.isArray(currentValue)) {\n\t\t\treturn !(currentValue.length === 1 && currentValue[0] === value);\n\t\t}\n\n\t\treturn currentValue !== value;\n\t}\n\n\t/**\n\t * @internal\n\t * Selects a value.\n\t */\n\tselect(value: T, source: BrnToggleGroupItem<T>): void {\n\t\tif (this.disabledState() || this.isSelected(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentValue = this.value();\n\n\t\t// emit the valueChange event here as we should only emit based on user interaction\n\t\tif (this._multiple()) {\n\t\t\tthis.emitSelectionChange([...((currentValue ?? []) as T[]), value], source);\n\t\t} else {\n\t\t\tthis.emitSelectionChange(value, source);\n\t\t}\n\n\t\tthis._onChange(this.value());\n\t\tthis.change.emit(new BrnButtonToggleChange<T>(source, this.value()));\n\t}\n\n\t/**\n\t * @internal\n\t * Deselects a value.\n\t */\n\tdeselect(value: T, source: BrnToggleGroupItem<T>): void {\n\t\tif (this.disabledState() || !this.isSelected(value) || !this.canDeselect(value)) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst currentValue = this.value();\n\n\t\tif (this._multiple()) {\n\t\t\tthis.emitSelectionChange(\n\t\t\t\t((currentValue ?? []) as T[]).filter((v) => v !== value),\n\t\t\t\tsource,\n\t\t\t);\n\t\t} else if (currentValue === value) {\n\t\t\tthis.emitSelectionChange(null, source);\n\t\t}\n\t}\n\n\t/**\n\t * @internal\n\t * Determines whether a value is selected.\n\t */\n\tisSelected(value: T): boolean {\n\t\tconst currentValue = this.value();\n\n\t\tif (\n\t\t\tcurrentValue == null ||\n\t\t\tcurrentValue === undefined ||\n\t\t\t(Array.isArray(currentValue) && currentValue.length === 0)\n\t\t) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this._multiple()) {\n\t\t\treturn (currentValue as T[])?.includes(value);\n\t\t}\n\t\treturn currentValue === value;\n\t}\n\n\t/** Update the value of the group */\n\tprivate emitSelectionChange(value: ToggleValue<T>, source: BrnToggleGroupItem<T>): void {\n\t\tthis.value.set(value);\n\t\tthis.valueChange.emit(value);\n\t\tthis._onChange(value);\n\t\tthis.change.emit(new BrnButtonToggleChange<T>(source, this.value()));\n\t}\n}\n\nexport type ToggleValue<T> = T | T[] | null | undefined;\nexport type ToggleType = 'single' | 'multiple';\n","import type { BooleanInput } from '@angular/cdk/coercion';\nimport { Directive, booleanAttribute, computed, input, model } from '@angular/core';\nimport { injectBrnToggleGroup } from './brn-toggle-group.token';\n\n@Directive({\n\tselector: 'button[brnToggleGroupItem]',\n\thost: {\n\t\t'[id]': 'id()',\n\t\t'[attr.disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-state]': '_state()',\n\t\t'[attr.aria-pressed]': '_isOn()',\n\t\t'[attr.aria-label]': 'ariaLabel() || null',\n\t\t'[type]': 'type()',\n\t\t'(click)': 'toggle()',\n\t},\n})\nexport class BrnToggleGroupItem<T> {\n\tprivate static _uniqueId = 0;\n\n\t/** Access the toggle group if available. */\n\tprotected readonly _group = injectBrnToggleGroup<T>();\n\n\t/** The id of the toggle. */\n\tpublic readonly id = input(`brn-toggle-group-item-${++BrnToggleGroupItem._uniqueId}`);\n\n\t/** The value this toggle represents. */\n\tpublic readonly value = input<T>();\n\n\t/** Whether the toggle is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Whether the toggle is disabled either from itself or from the group. */\n\tprotected readonly _disabled = computed(() => this.disabled() || this._group?.disabled());\n\n\t/** The current state of the toggle when not used in a group. */\n\tpublic readonly state = model<'on' | 'off'>('off');\n\n\t/** The type of the button. */\n\tpublic readonly type = input<'button' | 'submit' | 'reset'>('button');\n\n\t/**\n\t * Accessibility label for screen readers.\n\t * Use when no visible label exists.\n\t */\n\tpublic readonly ariaLabel = input<string | null>(null, { alias: 'aria-label' });\n\n\t/** Whether the toggle is in the on state. */\n\tprotected readonly _isOn = computed(() => this._state() === 'on');\n\n\t/** The current state that reflects the group state or the model state. */\n\tprotected readonly _state = computed(() => {\n\t\tif (this._group) {\n\t\t\treturn this._group.isSelected(this.value() as T) ? 'on' : 'off';\n\t\t}\n\t\treturn this.state();\n\t});\n\n\ttoggle(): void {\n\t\tif (this._disabled()) return;\n\n\t\tif (this._group) {\n\t\t\tif (this._isOn()) {\n\t\t\t\tthis._group.deselect(this.value() as T, this);\n\t\t\t} else {\n\t\t\t\tthis._group.select(this.value() as T, this);\n\t\t\t}\n\t\t} else {\n\t\t\tthis.state.set(this._isOn() ? 'off' : 'on');\n\t\t}\n\t}\n}\n","import { BrnToggleGroup } from './lib/brn-toggle-group';\nimport { BrnToggleGroupItem } from './lib/brn-toggle-item';\n\nexport * from './lib/brn-toggle-group';\nexport * from './lib/brn-toggle-group.token';\nexport * from './lib/brn-toggle-item';\n\nexport const BrnToggleGroupImports = [BrnToggleGroup, BrnToggleGroupItem] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,MAAM,mBAAmB,GAAG,IAAI,cAAc,CAAiB,qBAAqB,CAAC;SAErE,oBAAoB,GAAA;IACnC,OAAO,MAAM,CAAC,mBAAmB,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE,CAA6B;AACnF;AAEM,SAAU,qBAAqB,CAAI,KAA8B,EAAA;IACtE,OAAO,EAAE,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,KAAK,EAAE;AAC5D;;ACLO,MAAM,sCAAsC,GAAG;AACrD,IAAA,OAAO,EAAE,iBAAiB;AAC1B,IAAA,WAAW,EAAE,UAAU,CAAC,MAAM,cAAc,CAAC;AAC7C,IAAA,KAAK,EAAE,IAAI;;MAGC,qBAAqB,CAAA;AAEzB,IAAA,MAAA;AACA,IAAA,KAAA;IAFR,WAAA,CACQ,MAA6B,EAC7B,KAAqB,EAAA;QADrB,IAAA,CAAA,MAAM,GAAN,MAAM;QACN,IAAA,CAAA,KAAK,GAAL,KAAK;;AAEb;MAaY,cAAc,CAAA;;AAEV,IAAA,IAAI,GAAG,KAAK,CAAa,QAAQ,CAAC;;AAG/B,IAAA,SAAS,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,IAAI,EAAE,KAAK,UAAU,CAAC;;AAGzD,IAAA,KAAK,GAAG,KAAK,CAAiB,SAAS,CAAC;;IAGxC,WAAW,GAAG,MAAM,EAAkB;;AAGtC,IAAA,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE;AAC9D,QAAA,SAAS,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EAAA,iBAAA,EAAA,UAAA,EAAA,mBAAA,EAAA,SAAA,EAAA,iBAAA,EAAA,qBAAA,EAAA,MAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAlB,kBAAkB,EAAA,UAAA,EAAA,CAAA;kBAb9B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,4BAA4B;AACtC,oBAAA,IAAI,EAAE;AACL,wBAAA,MAAM,EAAE,MAAM;AACd,wBAAA,iBAAiB,EAAE,2BAA2B;AAC9C,wBAAA,sBAAsB,EAAE,2BAA2B;AACnD,wBAAA,mBAAmB,EAAE,UAAU;AAC/B,wBAAA,qBAAqB,EAAE,SAAS;AAChC,wBAAA,mBAAmB,EAAE,qBAAqB;AAC1C,wBAAA,QAAQ,EAAE,QAAQ;AAClB,wBAAA,SAAS,EAAE,UAAU;AACrB,qBAAA;AACD,iBAAA;;;MCTY,qBAAqB,GAAG,CAAC,cAAc,EAAE,kBAAkB;;ACPxE;;AAEG;;;;"}
|
|
@@ -211,6 +211,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
211
211
|
type: Component,
|
|
212
212
|
args: [{
|
|
213
213
|
selector: 'brn-tooltip-content',
|
|
214
|
+
imports: [NgTemplateOutlet],
|
|
215
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
216
|
+
host: {
|
|
217
|
+
// Forces the element to have a layout in IE and Edge. This fixes issues where the element
|
|
218
|
+
// won't be rendered if the animations are disabled or there is no web animations polyfill.
|
|
219
|
+
'[style.zoom]': 'isVisible() ? 1 : null',
|
|
220
|
+
'(mouseleave)': '_handleMouseLeave($event)',
|
|
221
|
+
'aria-hidden': 'true',
|
|
222
|
+
},
|
|
214
223
|
template: `
|
|
215
224
|
<div
|
|
216
225
|
(mouseenter)="_contentHovered.set(true)"
|
|
@@ -226,15 +235,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
226
235
|
}
|
|
227
236
|
</div>
|
|
228
237
|
`,
|
|
229
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
230
|
-
host: {
|
|
231
|
-
// Forces the element to have a layout in IE and Edge. This fixes issues where the element
|
|
232
|
-
// won't be rendered if the animations are disabled or there is no web animations polyfill.
|
|
233
|
-
'[style.zoom]': 'isVisible() ? 1 : null',
|
|
234
|
-
'(mouseleave)': '_handleMouseLeave($event)',
|
|
235
|
-
'aria-hidden': 'true',
|
|
236
|
-
},
|
|
237
|
-
imports: [NgTemplateOutlet],
|
|
238
238
|
}]
|
|
239
239
|
}] });
|
|
240
240
|
|