@spartan-ng/brain 0.0.1-alpha.556 → 0.0.1-alpha.558
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 +8 -10
- package/fesm2022/spartan-ng-brain-alert-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-avatar.mjs +2 -3
- package/fesm2022/spartan-ng-brain-avatar.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 +7 -9
- 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 +6 -7
- package/fesm2022/spartan-ng-brain-popover.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-radio-group.mjs +13 -7
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +30 -27
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sheet.mjs +8 -10
- 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 +11 -12
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -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;;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,CAA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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 BrnToggleGroup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,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,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { signal, Directive, inject, ChangeDetectorRef, PLATFORM_ID, Renderer2, viewChild, ElementRef, ChangeDetectionStrategy,
|
|
2
|
+
import { signal, Directive, inject, ChangeDetectorRef, PLATFORM_ID, Renderer2, viewChild, ElementRef, ChangeDetectionStrategy, Component, TemplateRef, InjectionToken, ViewContainerRef, NgZone, input, booleanAttribute, numberAttribute, computed, effect, untracked, isDevMode } from '@angular/core';
|
|
3
3
|
import { isPlatformBrowser, NgTemplateOutlet, DOCUMENT } from '@angular/common';
|
|
4
4
|
import { Subject } from 'rxjs';
|
|
5
5
|
import { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';
|
|
@@ -205,12 +205,21 @@ class BrnTooltipContent {
|
|
|
205
205
|
<ng-container [ngTemplateOutlet]="content" />
|
|
206
206
|
}
|
|
207
207
|
</div>
|
|
208
|
-
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush
|
|
208
|
+
`, isInline: true, dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
209
209
|
}
|
|
210
210
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnTooltipContent, decorators: [{
|
|
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,16 +235,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
226
235
|
}
|
|
227
236
|
</div>
|
|
228
237
|
`,
|
|
229
|
-
encapsulation: ViewEncapsulation.None,
|
|
230
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
231
|
-
host: {
|
|
232
|
-
// Forces the element to have a layout in IE and Edge. This fixes issues where the element
|
|
233
|
-
// won't be rendered if the animations are disabled or there is no web animations polyfill.
|
|
234
|
-
'[style.zoom]': 'isVisible() ? 1 : null',
|
|
235
|
-
'(mouseleave)': '_handleMouseLeave($event)',
|
|
236
|
-
'aria-hidden': 'true',
|
|
237
|
-
},
|
|
238
|
-
imports: [NgTemplateOutlet],
|
|
239
238
|
}]
|
|
240
239
|
}] });
|
|
241
240
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-tooltip.mjs","sources":["../../../../libs/brain/tooltip/src/lib/brn-tooltip.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-content.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-content-template.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip.token.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-trigger.ts","../../../../libs/brain/tooltip/src/index.ts","../../../../libs/brain/tooltip/src/spartan-ng-brain-tooltip.ts"],"sourcesContent":["import { Directive, type TemplateRef, signal } from '@angular/core';\n\n@Directive({\n\tselector: '[brnTooltip]',\n})\nexport class BrnTooltip {\n\tpublic readonly tooltipTemplate = signal<TemplateRef<unknown> | null>(null);\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/tooltip/tooltip.ts\n * Check them out! Give them a try! Leave a star! Their work is incredible!\n */\n\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tinject,\n\ttype OnDestroy,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\ttype TemplateRef,\n\tviewChild,\n\tViewEncapsulation,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n\tselector: 'brn-tooltip-content',\n\ttemplate: `\n\t\t<div\n\t\t\t(mouseenter)=\"_contentHovered.set(true)\"\n\t\t\t(mouseleave)=\"_contentHovered.set(false)\"\n\t\t\t[class]=\"tooltipClasses()\"\n\t\t\t[style.visibility]=\"'hidden'\"\n\t\t\t#tooltip\n\t\t>\n\t\t\t@if (_isTypeOfString(content)) {\n\t\t\t\t{{ content }}\n\t\t\t} @else {\n\t\t\t\t<ng-container [ngTemplateOutlet]=\"content\" />\n\t\t\t}\n\t\t</div>\n\t`,\n\tencapsulation: ViewEncapsulation.None,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\t// Forces the element to have a layout in IE and Edge. This fixes issues where the element\n\t\t// won't be rendered if the animations are disabled or there is no web animations polyfill.\n\t\t'[style.zoom]': 'isVisible() ? 1 : null',\n\t\t'(mouseleave)': '_handleMouseLeave($event)',\n\t\t'aria-hidden': 'true',\n\t},\n\timports: [NgTemplateOutlet],\n})\nexport class BrnTooltipContent implements OnDestroy {\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\tprivate readonly _renderer2 = inject(Renderer2);\n\n\tprotected readonly _contentHovered = signal(false);\n\n\tpublic readonly tooltipClasses = signal('');\n\tpublic readonly side = signal('above');\n\t/** Message to display in the tooltip */\n\tpublic content: string | TemplateRef<unknown> | null = null;\n\n\t/** The timeout ID of any current timer set to show the tooltip */\n\tprivate _showTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\t/** The timeout ID of any current timer set to hide the tooltip */\n\tprivate _hideTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\t/** The timeout ID of any current timer set to animate the tooltip */\n\tprivate _animateTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n\t/** Element that caused the tooltip to open. */\n\tpublic triggerElement?: HTMLElement;\n\n\t/** Amount of milliseconds to delay the closing sequence. */\n\tpublic mouseLeaveHideDelay = 0;\n\t/** Amount of milliseconds of closing animation. */\n\tpublic exitAnimationDuration = 0;\n\n\t/** Reference to the internal tooltip element. */\n\tpublic readonly tooltip = viewChild('tooltip', { read: ElementRef<HTMLElement> });\n\n\t/** Whether interactions on the page should close the tooltip */\n\tprivate _closeOnInteraction = false;\n\n\t/** Whether the tooltip is currently visible. */\n\tprivate _isVisible = false;\n\n\t/** Subject for notifying that the tooltip has been hidden from the view */\n\tprivate readonly _onHide: Subject<void> = new Subject();\n\tpublic readonly afterHidden = this._onHide.asObservable();\n\n\t/**\n\t * Shows the tooltip with originating from the provided origin\n\t * @param delay Amount of milliseconds to the delay showing the tooltip.\n\t */\n\tshow(delay: number): void {\n\t\t// Cancel the delayed hide if it is scheduled\n\t\tif (this._hideTimeoutId !== null) {\n\t\t\tclearTimeout(this._hideTimeoutId);\n\t\t}\n\t\tif (this._animateTimeoutId !== null) {\n\t\t\tclearTimeout(this._animateTimeoutId);\n\t\t}\n\t\tthis._showTimeoutId = setTimeout(() => {\n\t\t\tthis._toggleDataAttributes(true, this.side());\n\t\t\tthis._toggleVisibility(true);\n\t\t\tthis._showTimeoutId = undefined;\n\t\t}, delay);\n\t}\n\n\t/**\n\t * Begins to hide the tooltip after the provided delay in ms.\n\t * @param delay Amount of milliseconds to delay hiding the tooltip.\n\t * @param exitAnimationDuration Time before hiding to finish animation\n\t * */\n\thide(delay: number, exitAnimationDuration: number): void {\n\t\t// Cancel the delayed show if it is scheduled\n\t\tif (this._showTimeoutId !== null) {\n\t\t\tclearTimeout(this._showTimeoutId);\n\t\t}\n\t\t// start out animation at delay minus animation delay or immediately if possible\n\t\tthis._animateTimeoutId = setTimeout(\n\t\t\t() => {\n\t\t\t\tthis._animateTimeoutId = undefined;\n\t\t\t\tif (this._contentHovered()) return;\n\t\t\t\tthis._toggleDataAttributes(false, this.side());\n\t\t\t},\n\t\t\tMath.max(delay, 0),\n\t\t);\n\t\tthis._hideTimeoutId = setTimeout(() => {\n\t\t\tthis._hideTimeoutId = undefined;\n\t\t\tif (this._contentHovered()) return;\n\t\t\tthis._toggleVisibility(false);\n\t\t}, delay + exitAnimationDuration);\n\t}\n\n\t/** Whether the tooltip is being displayed. */\n\tisVisible(): boolean {\n\t\treturn this._isVisible;\n\t}\n\n\tngOnDestroy() {\n\t\tthis._cancelPendingAnimations();\n\t\tthis._onHide.complete();\n\t\tthis.triggerElement = undefined;\n\t}\n\n\t_isTypeOfString(content: unknown): content is string {\n\t\treturn typeof content === 'string';\n\t}\n\n\t/**\n\t * Interactions on the HTML body should close the tooltip immediately as defined in the\n\t * material design spec.\n\t * https://material.io/design/components/tooltips.html#behavior\n\t */\n\t_handleBodyInteraction(): void {\n\t\tif (this._closeOnInteraction) {\n\t\t\tthis.hide(0, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Marks that the tooltip needs to be checked in the next change detection run.\n\t * Mainly used for rendering the initial text before positioning a tooltip, which\n\t * can be problematic in components with OnPush change detection.\n\t */\n\t_markForCheck(): void {\n\t\tthis._cdr.markForCheck();\n\t}\n\n\t_handleMouseLeave({ relatedTarget }: MouseEvent) {\n\t\tif (!relatedTarget || !this.triggerElement?.contains(relatedTarget as Node)) {\n\t\t\tif (this.isVisible()) {\n\t\t\t\tthis.hide(this.mouseLeaveHideDelay, this.exitAnimationDuration);\n\t\t\t} else {\n\t\t\t\tthis._finalize(false);\n\t\t\t}\n\t\t}\n\t\tthis._contentHovered.set(false);\n\t}\n\n\t/** Cancels any pending animation sequences. */\n\t_cancelPendingAnimations() {\n\t\tif (this._showTimeoutId !== null) {\n\t\t\tclearTimeout(this._showTimeoutId);\n\t\t}\n\n\t\tif (this._hideTimeoutId !== null) {\n\t\t\tclearTimeout(this._hideTimeoutId);\n\t\t}\n\n\t\tthis._showTimeoutId = this._hideTimeoutId = undefined;\n\t}\n\n\tprivate _finalize(toVisible: boolean) {\n\t\tif (toVisible) {\n\t\t\tthis._closeOnInteraction = true;\n\t\t} else if (!this.isVisible()) {\n\t\t\tthis._onHide.next();\n\t\t}\n\t}\n\n\t/** Toggles the visibility of the tooltip element. */\n\tprivate _toggleVisibility(isVisible: boolean) {\n\t\t// We set the classes directly here ourselves so that toggling the tooltip state\n\t\t// isn't bound by change detection. This allows us to hide it even if the\n\t\t// view ref has been detached from the CD tree.\n\t\tconst tooltip = this.tooltip()?.nativeElement;\n\t\tif (!tooltip || !this._isBrowser) return;\n\t\tthis._renderer2.setStyle(tooltip, 'visibility', isVisible ? 'visible' : 'hidden');\n\t\tif (isVisible) {\n\t\t\tthis._renderer2.removeStyle(tooltip, 'display');\n\t\t} else {\n\t\t\tthis._renderer2.setStyle(tooltip, 'display', 'none');\n\t\t}\n\t\tthis._isVisible = isVisible;\n\t}\n\n\tprivate _toggleDataAttributes(isVisible: boolean, side: string) {\n\t\t// We set the classes directly here ourselves so that toggling the tooltip state\n\t\t// isn't bound by change detection. This allows us to hide it even if the\n\t\t// view ref has been detached from the CD tree.\n\t\tconst tooltip = this.tooltip()?.nativeElement;\n\t\tif (!tooltip || !this._isBrowser) return;\n\t\tthis._renderer2.setAttribute(tooltip, 'data-side', side);\n\t\tthis._renderer2.setAttribute(tooltip, 'data-state', isVisible ? 'open' : 'closed');\n\t}\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { BrnTooltip } from './brn-tooltip';\n\n@Directive({\n\tselector: '[brnTooltipContent]',\n})\nexport class BrnTooltipContentTemplate {\n\tprivate readonly _brnTooltipDirective = inject(BrnTooltip, { optional: true });\n\tprivate readonly _tpl = inject(TemplateRef);\n\n\tconstructor() {\n\t\tif (!this._brnTooltipDirective || !this._tpl) return;\n\t\tthis._brnTooltipDirective.tooltipTemplate.set(this._tpl);\n\t}\n}\n","import { inject, InjectionToken, type ValueProvider } from '@angular/core';\nimport type { TooltipPosition, TooltipTouchGestures } from './brn-tooltip-trigger';\n\nexport interface BrnTooltipOptions {\n\t/** Default delay when the tooltip is shown. */\n\tshowDelay: number;\n\t/** Default delay when the tooltip is hidden. */\n\thideDelay: number;\n\t/** Default delay when hiding the tooltip on a touch device. */\n\ttouchendHideDelay: number;\n\t/** Default exit animation duration for the tooltip. */\n\texitAnimationDuration: number;\n\t/** Default touch gesture handling for tooltips. */\n\ttouchGestures?: TooltipTouchGestures;\n\t/** Default position for tooltips. */\n\tposition?: TooltipPosition;\n\t/**\n\t * Default value for whether tooltips should be positioned near the click or touch origin\n\t * instead of outside the element bounding box.\n\t */\n\tpositionAtOrigin?: boolean;\n\t/** Disables the ability for the user to interact with the tooltip element. */\n\tdisableTooltipInteractivity?: boolean;\n\t/** Default classes for the tooltip content. */\n\ttooltipContentClasses?: string;\n}\n\nexport const defaultOptions: BrnTooltipOptions = {\n\tshowDelay: 0,\n\thideDelay: 0,\n\texitAnimationDuration: 0,\n\ttouchendHideDelay: 1500,\n};\n\nconst BRN_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken<BrnTooltipOptions>('brn-tooltip-default-options', {\n\tprovidedIn: 'root',\n\tfactory: () => defaultOptions,\n});\n\nexport function provideBrnTooltipDefaultOptions(options: Partial<BrnTooltipOptions>): ValueProvider {\n\treturn { provide: BRN_TOOLTIP_DEFAULT_OPTIONS, useValue: { ...defaultOptions, ...options } };\n}\n\nexport function injectBrnTooltipDefaultOptions(): BrnTooltipOptions {\n\treturn inject(BRN_TOOLTIP_DEFAULT_OPTIONS, { optional: true }) ?? defaultOptions;\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/tooltip/tooltip.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 */\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { hasModifierKey } from '@angular/cdk/keycodes';\nimport {\n\ttype ConnectedPosition,\n\ttype ConnectionPositionPair,\n\ttype FlexibleConnectedPositionStrategy,\n\ttype HorizontalConnectionPos,\n\ttype OriginConnectionPosition,\n\tOverlay,\n\ttype OverlayConnectionPosition,\n\ttype OverlayRef,\n\tScrollDispatcher,\n\ttype ScrollStrategy,\n\ttype VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n\ttype AfterViewInit,\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\teffect,\n\tElementRef,\n\tinject,\n\tInjectionToken,\n\tinput,\n\tisDevMode,\n\tNgZone,\n\tnumberAttribute,\n\ttype OnDestroy,\n\ttype Provider,\n\tsignal,\n\ttype TemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { brnDevMode, computedPrevious } from '@spartan-ng/brain/core';\nimport { Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { BrnTooltip } from './brn-tooltip';\nimport { BrnTooltipContent } from './brn-tooltip-content';\nimport { injectBrnTooltipDefaultOptions } from './brn-tooltip.token';\n\nexport type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';\nexport type TooltipTouchGestures = 'auto' | 'on' | 'off';\n\n/** Time in ms to throttle repositioning after scroll events. */\nexport const SCROLL_THROTTLE_MS = 20;\n\nexport function getBrnTooltipInvalidPositionError(position: string) {\n\treturn Error(`Tooltip position \"${position}\" is invalid.`);\n}\n\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nexport const BRN_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>('brn-tooltip-scroll-strategy');\nexport const BRN_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: Provider = {\n\tprovide: BRN_TOOLTIP_SCROLL_STRATEGY,\n\tdeps: [Overlay],\n\tuseFactory:\n\t\t(overlay: Overlay): (() => ScrollStrategy) =>\n\t\t() =>\n\t\t\toverlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS }),\n};\n\nconst PANEL_CLASS = 'tooltip-panel';\n\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n\n// These constants were taken from MDC's `numbers` object.\nconst MIN_VIEWPORT_TOOLTIP_THRESHOLD = 8;\nconst UNBOUNDED_ANCHOR_GAP = 8;\n\n@Directive({\n\tselector: '[brnTooltipTrigger]',\n\texportAs: 'brnTooltipTrigger',\n\tproviders: [BRN_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n\thost: {\n\t\tclass: 'brn-tooltip-trigger',\n\t\t'[class.brn-tooltip-disabled]': 'brnTooltipDisabled()',\n\t},\n})\nexport class BrnTooltipTrigger implements OnDestroy, AfterViewInit {\n\tprivate readonly _tooltipDirective = inject(BrnTooltip, { optional: true });\n\tprivate readonly _tooltipComponent = BrnTooltipContent;\n\tprivate readonly _cssClassPrefix: string = 'brn';\n\tprivate readonly _destroyed = new Subject<void>();\n\tprivate readonly _passiveListeners: (readonly [string, EventListenerOrEventListenerObject])[] = [];\n\tprivate readonly _defaultOptions = injectBrnTooltipDefaultOptions();\n\n\tprivate readonly _overlay = inject(Overlay);\n\tprivate readonly _elementRef = inject(ElementRef<HTMLElement>);\n\tprivate readonly _scrollDispatcher = inject(ScrollDispatcher);\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\tprivate readonly _ngZone = inject(NgZone);\n\tprivate readonly _platform = inject(Platform);\n\tprivate readonly _ariaDescriber = inject(AriaDescriber);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _dir = inject(Directionality);\n\tprivate readonly _scrollStrategy = inject(BRN_TOOLTIP_SCROLL_STRATEGY);\n\tprivate readonly _document = inject(DOCUMENT);\n\n\tprivate _portal?: ComponentPortal<BrnTooltipContent>;\n\tprivate _viewInitialized = false;\n\tprivate _pointerExitEventsInitialized = false;\n\tprivate readonly _viewportMargin = 8;\n\tprivate _currentPosition?: TooltipPosition;\n\tprivate _touchstartTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate _overlayRef: OverlayRef | null = null;\n\tprivate _tooltipInstance: BrnTooltipContent | null = null;\n\n\t/** Allows the user to define the position of the tooltip relative to the parent element */\n\n\tpublic readonly position = input<TooltipPosition>(this._defaultOptions?.position ?? 'above');\n\n\t/**\n\t * Whether tooltip should be relative to the click or touch origin\n\t * instead of outside the element bounding box.\n\t */\n\n\tpublic readonly positionAtOrigin = input(this._defaultOptions?.positionAtOrigin ?? false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Disables the display of the tooltip. */\n\n\tpublic readonly brnTooltipDisabled = input(false, { transform: booleanAttribute });\n\n\t/** The default delay in ms before showing the tooltip after show is called */\n\n\tpublic readonly showDelay = input(this._defaultOptions?.showDelay ?? 0, { transform: numberAttribute });\n\n\t/** The default delay in ms before hiding the tooltip after hide is called */\n\n\tpublic readonly hideDelay = input(this._defaultOptions?.hideDelay ?? 0, { transform: numberAttribute });\n\n\t/** The default duration in ms that exit animation takes before hiding */\n\n\tpublic readonly exitAnimationDuration = input(this._defaultOptions?.exitAnimationDuration ?? 0, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** The default delay in ms before hiding the tooltip after hide is called */\n\n\tpublic readonly tooltipContentClasses = input<string>(this._defaultOptions?.tooltipContentClasses ?? '', {\n\t\talias: 'tooltipContentClasses',\n\t});\n\tpublic readonly computedTooltipContentClasses = computed(() => signal(this.tooltipContentClasses()));\n\n\t/**\n\t * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n\t * uses a long press gesture to show and hide, however it can conflict with the native browser\n\t * gestures. To work around the conflict, Angular Material disables native gestures on the\n\t * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n\t * elements). The different values for this option configure the touch event handling as follows:\n\t * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n\t * browser gestures on particular elements. In particular, it allows text selection on inputs\n\t * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n\t * - `on` - Enables touch gestures for all elements and disables native\n\t * browser gestures with no exceptions.\n\t * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n\t * showing on touch devices.\n\t */\n\n\tpublic readonly touchGestures = input<TooltipTouchGestures>(this._defaultOptions?.touchGestures ?? 'auto');\n\n\t/** The message to be used to describe the aria in the tooltip */\n\n\tpublic readonly ariaDescribedBy = input('', { alias: 'aria-describedby' });\n\tpublic readonly computedAriaDescribedBy = computed(() => signal(this.ariaDescribedBy()));\n\tpublic readonly ariaDescribedByPrevious = computedPrevious(this.computedAriaDescribedBy);\n\n\t/** The content to be displayed in the tooltip */\n\n\tpublic readonly brnTooltipTrigger = input<string | TemplateRef<unknown> | null>(null);\n\tpublic readonly brnTooltipTriggerState = computed(() => {\n\t\tif (this._tooltipDirective) {\n\t\t\treturn this._tooltipDirective.tooltipTemplate();\n\t\t}\n\t\treturn this.brnTooltipTrigger();\n\t});\n\n\tconstructor() {\n\t\tthis._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n\t\t\tif (this._overlayRef) {\n\t\t\t\tthis._updatePosition(this._overlayRef);\n\t\t\t}\n\t\t});\n\n\t\tthis._viewportMargin = MIN_VIEWPORT_TOOLTIP_THRESHOLD;\n\n\t\tthis._initBrnTooltipTriggerEffect();\n\t\tthis._initAriaDescribedByPreviousEffect();\n\t\tthis._initTooltipContentClassesEffect();\n\t\tthis._initPositionEffect();\n\t\tthis._initPositionAtOriginEffect();\n\t\tthis._initBrnTooltipDisabledEffect();\n\t\tthis._initExitAnimationDurationEffect();\n\t\tthis._initHideDelayEffect();\n\t}\n\tsetTooltipContentClasses(tooltipContentClasses: string) {\n\t\tthis.computedTooltipContentClasses().set(tooltipContentClasses);\n\t}\n\tsetAriaDescribedBy(ariaDescribedBy: string) {\n\t\tthis.computedAriaDescribedBy().set(ariaDescribedBy);\n\t}\n\n\tprivate _initPositionEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._overlayRef) {\n\t\t\t\tthis._updatePosition(this._overlayRef);\n\t\t\t\tthis._tooltipInstance?.show(0);\n\t\t\t\tthis._overlayRef.updatePosition();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initBrnTooltipDisabledEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this.brnTooltipDisabled()) {\n\t\t\t\tthis.hide(0);\n\t\t\t} else {\n\t\t\t\tthis._setupPointerEnterEventsIfNeeded();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initPositionAtOriginEffect(): void {\n\t\teffect(() => {\n\t\t\t// Needed that the effect got triggered\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\t\t\tconst _ = this.positionAtOrigin();\n\t\t\tthis._detach();\n\t\t\tthis._overlayRef = null;\n\t\t});\n\t}\n\n\tprivate _initTooltipContentClassesEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tthis._tooltipInstance.tooltipClasses.set(this.computedTooltipContentClasses()() ?? '');\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initAriaDescribedByPreviousEffect(): void {\n\t\teffect(() => {\n\t\t\tconst ariaDescribedBy = this.computedAriaDescribedBy()();\n\t\t\tthis._ariaDescriber.removeDescription(\n\t\t\t\tthis._elementRef.nativeElement,\n\t\t\t\tuntracked(() => this.ariaDescribedByPrevious()()),\n\t\t\t\t'tooltip',\n\t\t\t);\n\n\t\t\tif (ariaDescribedBy && !this._isTooltipVisible()) {\n\t\t\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\t\t\t// The `AriaDescriber` has some functionality that avoids adding a description if it's the\n\t\t\t\t\t// same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n\t\t\t\t\t// has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n\t\t\t\t\t// issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._ariaDescriber.describe(this._elementRef.nativeElement, ariaDescribedBy, 'tooltip');\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initBrnTooltipTriggerEffect(): void {\n\t\teffect(() => {\n\t\t\tconst brnTooltipTriggerState = this.brnTooltipTriggerState();\n\t\t\tconst isTooltipVisible = this._isTooltipVisible();\n\t\t\tuntracked(() => {\n\t\t\t\tif (!brnTooltipTriggerState && isTooltipVisible) {\n\t\t\t\t\tthis.hide(0);\n\t\t\t\t} else {\n\t\t\t\t\tthis._setupPointerEnterEventsIfNeeded();\n\t\t\t\t\tthis._updateTooltipContent();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate _initExitAnimationDurationEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tthis._tooltipInstance.exitAnimationDuration = this.exitAnimationDuration();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initHideDelayEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tthis._tooltipInstance.mouseLeaveHideDelay = this.hideDelay();\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\t// This needs to happen after view init so the initial values for all inputs have been set.\n\t\tthis._viewInitialized = true;\n\t\tthis._setupPointerEnterEventsIfNeeded();\n\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef)\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe((origin) => {\n\t\t\t\t// Note that the focus monitor runs outside the Angular zone.\n\t\t\t\tif (!origin) {\n\t\t\t\t\tthis._ngZone.run(() => this.hide(0));\n\t\t\t\t} else if (origin === 'keyboard') {\n\t\t\t\t\tthis._ngZone.run(() => this.show());\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (brnDevMode && !this.computedAriaDescribedBy()) {\n\t\t\tconsole.warn('BrnTooltip: \"aria-describedby\" attribute is required for accessibility');\n\t\t}\n\t}\n\n\t/**\n\t * Dispose the tooltip when destroyed.\n\t */\n\tngOnDestroy(): void {\n\t\tconst nativeElement = this._elementRef.nativeElement;\n\n\t\tclearTimeout(this._touchstartTimeout);\n\n\t\tif (this._overlayRef) {\n\t\t\tthis._overlayRef.dispose();\n\t\t\tthis._tooltipInstance = null;\n\t\t}\n\n\t\t// Clean up the event listeners set in the constructor\n\t\tthis._passiveListeners.forEach(([event, listener]) =>\n\t\t\tnativeElement.removeEventListener(event, listener, passiveListenerOptions),\n\t\t);\n\t\tthis._passiveListeners.length = 0;\n\n\t\tthis._destroyed.next();\n\t\tthis._destroyed.complete();\n\n\t\tthis._ariaDescriber.removeDescription(nativeElement, this.computedAriaDescribedBy()(), 'tooltip');\n\t\tthis._focusMonitor.stopMonitoring(nativeElement);\n\t}\n\n\t/** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n\tshow(delay: number = this.showDelay(), origin?: { x: number; y: number }): void {\n\t\tif (this.brnTooltipDisabled() || this._isTooltipVisible()) {\n\t\t\tthis._tooltipInstance?._cancelPendingAnimations();\n\t\t\treturn;\n\t\t}\n\n\t\tconst overlayRef = this._createOverlay(origin);\n\t\tthis._detach();\n\t\tthis._portal = this._portal || new ComponentPortal(this._tooltipComponent, this._viewContainerRef);\n\t\tconst instance = (this._tooltipInstance = overlayRef.attach(this._portal).instance);\n\t\tinstance.triggerElement = this._elementRef.nativeElement;\n\t\tinstance.mouseLeaveHideDelay = this.hideDelay();\n\t\tinstance.tooltipClasses.set(this.computedTooltipContentClasses()());\n\t\tinstance.exitAnimationDuration = this.exitAnimationDuration();\n\t\tinstance.side.set(this._currentPosition ?? 'above');\n\t\tinstance.afterHidden.pipe(takeUntil(this._destroyed)).subscribe(() => this._detach());\n\t\tthis._updateTooltipContent();\n\t\tinstance.show(delay);\n\t}\n\n\t/** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n\thide(delay: number = this.hideDelay(), exitAnimationDuration: number = this.exitAnimationDuration()): void {\n\t\tconst instance = this._tooltipInstance;\n\t\tif (instance) {\n\t\t\tif (instance.isVisible()) {\n\t\t\t\tinstance.hide(delay, exitAnimationDuration);\n\t\t\t} else {\n\t\t\t\tinstance._cancelPendingAnimations();\n\t\t\t\tthis._detach();\n\t\t\t}\n\t\t}\n\t}\n\n\ttoggle(origin?: { x: number; y: number }): void {\n\t\tthis._isTooltipVisible() ? this.hide() : this.show(undefined, origin);\n\t}\n\n\t_isTooltipVisible(): boolean {\n\t\treturn !!this._tooltipInstance && this._tooltipInstance.isVisible();\n\t}\n\n\tprivate _createOverlay(origin?: { x: number; y: number }): OverlayRef {\n\t\tif (this._overlayRef) {\n\t\t\tconst existingStrategy = this._overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy;\n\n\t\t\tif ((!this.positionAtOrigin() || !origin) && existingStrategy._origin instanceof ElementRef) {\n\t\t\t\treturn this._overlayRef;\n\t\t\t}\n\n\t\t\tthis._detach();\n\t\t}\n\n\t\tconst scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);\n\n\t\t// Create connected position strategy that listens for scroll events to reposition.\n\t\tconst strategy = this._overlay\n\t\t\t.position()\n\t\t\t.flexibleConnectedTo(this.positionAtOrigin() ? origin || this._elementRef : this._elementRef)\n\t\t\t.withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`)\n\t\t\t.withFlexibleDimensions(false)\n\t\t\t.withViewportMargin(this._viewportMargin)\n\t\t\t.withScrollableContainers(scrollableAncestors);\n\n\t\tstrategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe((change) => {\n\t\t\tthis._updateCurrentPositionClass(change.connectionPair);\n\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tif (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n\t\t\t\t\t// After position changes occur and the overlay is clipped by\n\t\t\t\t\t// a parent scrollable then close the tooltip.\n\t\t\t\t\tthis._ngZone.run(() => this.hide(0));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis._overlayRef = this._overlay.create({\n\t\t\tdirection: this._dir,\n\t\t\tpositionStrategy: strategy,\n\t\t\tpanelClass: `${this._cssClassPrefix}-${PANEL_CLASS}`,\n\t\t\tscrollStrategy: this._scrollStrategy(),\n\t\t});\n\n\t\tthis._updatePosition(this._overlayRef);\n\n\t\tthis._overlayRef\n\t\t\t.detachments()\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => this._detach());\n\n\t\tthis._overlayRef\n\t\t\t.outsidePointerEvents()\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => this._tooltipInstance?._handleBodyInteraction());\n\n\t\tthis._overlayRef\n\t\t\t.keydownEvents()\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe((event) => {\n\t\t\t\tif (this._isTooltipVisible() && event.key === 'Escape' && !hasModifierKey(event)) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tthis._ngZone.run(() => this.hide(0));\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (this._defaultOptions?.disableTooltipInteractivity) {\n\t\t\tthis._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`);\n\t\t}\n\n\t\treturn this._overlayRef;\n\t}\n\n\tprivate _detach(): void {\n\t\tif (this._overlayRef?.hasAttached()) {\n\t\t\tthis._overlayRef.detach();\n\t\t}\n\n\t\tthis._tooltipInstance = null;\n\t}\n\n\tprivate _updatePosition(overlayRef: OverlayRef) {\n\t\tconst position = overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy;\n\t\tconst origin = this._getOrigin();\n\t\tconst overlay = this._getOverlayPosition();\n\n\t\tposition.withPositions([\n\t\t\tthis._addOffset({ ...origin.main, ...overlay.main }),\n\t\t\tthis._addOffset({ ...origin.fallback, ...overlay.fallback }),\n\t\t]);\n\t}\n\n\t/** Adds the configured offset to a position. Used as a hook for child classes. */\n\tprotected _addOffset(position: ConnectedPosition): ConnectedPosition {\n\t\tconst offset = UNBOUNDED_ANCHOR_GAP;\n\t\tconst isLtr = !this._dir || this._dir.value === 'ltr';\n\n\t\tif (position.originY === 'top') {\n\t\t\tposition.offsetY = -offset;\n\t\t} else if (position.originY === 'bottom') {\n\t\t\tposition.offsetY = offset;\n\t\t} else if (position.originX === 'start') {\n\t\t\tposition.offsetX = isLtr ? -offset : offset;\n\t\t} else if (position.originX === 'end') {\n\t\t\tposition.offsetX = isLtr ? offset : -offset;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * Returns the origin position and a fallback position based on the user's position preference.\n\t * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n\t */\n\t_getOrigin(): { main: OriginConnectionPosition; fallback: OriginConnectionPosition } {\n\t\tconst isLtr = !this._dir || this._dir.value === 'ltr';\n\t\tconst position = this.position();\n\t\tlet originPosition: OriginConnectionPosition;\n\n\t\tif (position === 'above' || position === 'below') {\n\t\t\toriginPosition = { originX: 'center', originY: position === 'above' ? 'top' : 'bottom' };\n\t\t} else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n\t\t\toriginPosition = { originX: 'start', originY: 'center' };\n\t\t} else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n\t\t\toriginPosition = { originX: 'end', originY: 'center' };\n\t\t} else if (typeof isDevMode() === 'undefined' || isDevMode()) {\n\t\t\tthrow getBrnTooltipInvalidPositionError(position);\n\t\t}\n\n\t\tconst { x, y } = this._invertPosition(originPosition!.originX, originPosition!.originY);\n\n\t\treturn {\n\t\t\tmain: originPosition!,\n\t\t\tfallback: { originX: x, originY: y },\n\t\t};\n\t}\n\n\t/** Returns the overlay position and a fallback position based on the user's preference */\n\t_getOverlayPosition(): { main: OverlayConnectionPosition; fallback: OverlayConnectionPosition } {\n\t\tconst isLtr = !this._dir || this._dir.value === 'ltr';\n\t\tconst position = this.position();\n\t\tlet overlayPosition: OverlayConnectionPosition;\n\n\t\tif (position === 'above') {\n\t\t\toverlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n\t\t} else if (position === 'below') {\n\t\t\toverlayPosition = { overlayX: 'center', overlayY: 'top' };\n\t\t} else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n\t\t\toverlayPosition = { overlayX: 'end', overlayY: 'center' };\n\t\t} else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n\t\t\toverlayPosition = { overlayX: 'start', overlayY: 'center' };\n\t\t} else if (typeof isDevMode() === 'undefined' || isDevMode()) {\n\t\t\tthrow getBrnTooltipInvalidPositionError(position);\n\t\t}\n\n\t\tconst { x, y } = this._invertPosition(overlayPosition!.overlayX, overlayPosition!.overlayY);\n\n\t\treturn {\n\t\t\tmain: overlayPosition!,\n\t\t\tfallback: { overlayX: x, overlayY: y },\n\t\t};\n\t}\n\n\t/** Updates the tooltip message and repositions the overlay according to the new message length */\n\tprivate _updateTooltipContent(): void {\n\t\t// Must wait for the template to be painted to the tooltip so that the overlay can properly\n\t\t// calculate the correct positioning based on the size of the tek-pate.\n\t\tif (this._tooltipInstance) {\n\t\t\tthis._tooltipInstance.content = this.brnTooltipTriggerState();\n\t\t\tthis._tooltipInstance._markForCheck();\n\n\t\t\tthis._ngZone.onMicrotaskEmpty.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n\t\t\t\tif (this._tooltipInstance) {\n\t\t\t\t\tthis._overlayRef?.updatePosition();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t/** Inverts an overlay position. */\n\tprivate _invertPosition(x: HorizontalConnectionPos, y: VerticalConnectionPos) {\n\t\tif (this.position() === 'above' || this.position() === 'below') {\n\t\t\tif (y === 'top') {\n\t\t\t\ty = 'bottom';\n\t\t\t} else if (y === 'bottom') {\n\t\t\t\ty = 'top';\n\t\t\t}\n\t\t} else {\n\t\t\tif (x === 'end') {\n\t\t\t\tx = 'start';\n\t\t\t} else if (x === 'start') {\n\t\t\t\tx = 'end';\n\t\t\t}\n\t\t}\n\n\t\treturn { x, y };\n\t}\n\n\t/** Updates the class on the overlay panel based on the current position of the tooltip. */\n\tprivate _updateCurrentPositionClass(connectionPair: ConnectionPositionPair): void {\n\t\tconst { overlayY, originX, originY } = connectionPair;\n\t\tlet newPosition: TooltipPosition;\n\n\t\t// If the overlay is in the middle along the Y axis,\n\t\t// it means that it's either before or after.\n\t\tif (overlayY === 'center') {\n\t\t\t// Note that since this information is used for styling, we want to\n\t\t\t// resolve `start` and `end` to their real values, otherwise consumers\n\t\t\t// would have to remember to do it themselves on each consumption.\n\t\t\tif (this._dir && this._dir.value === 'rtl') {\n\t\t\t\tnewPosition = originX === 'end' ? 'left' : 'right';\n\t\t\t} else {\n\t\t\t\tnewPosition = originX === 'start' ? 'left' : 'right';\n\t\t\t}\n\t\t} else {\n\t\t\tnewPosition = overlayY === 'bottom' && originY === 'top' ? 'above' : 'below';\n\t\t}\n\n\t\tif (newPosition !== this._currentPosition) {\n\t\t\tthis._tooltipInstance?.side.set(newPosition);\n\t\t\tthis._currentPosition = newPosition;\n\t\t}\n\t}\n\n\t/** Binds the pointer events to the tooltip trigger. */\n\tprivate _setupPointerEnterEventsIfNeeded(): void {\n\t\t// Optimization: Defer hooking up events if there's no content or the tooltip is disabled.\n\t\tif (\n\t\t\tthis.brnTooltipDisabled() ||\n\t\t\t!this.brnTooltipTriggerState() ||\n\t\t\t!this._viewInitialized ||\n\t\t\tthis._passiveListeners.length\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The mouse events shouldn't be bound on mobile devices, because they can prevent the\n\t\t// first tap from firing its click event or can cause the tooltip to open for clicks.\n\t\tif (this._platformSupportsMouseEvents()) {\n\t\t\tthis._passiveListeners.push([\n\t\t\t\t'mouseenter',\n\t\t\t\t(event) => {\n\t\t\t\t\tthis._setupPointerExitEventsIfNeeded();\n\t\t\t\t\tlet point = undefined;\n\t\t\t\t\tif ((event as MouseEvent).x !== undefined && (event as MouseEvent).y !== undefined) {\n\t\t\t\t\t\tpoint = event as MouseEvent;\n\t\t\t\t\t}\n\t\t\t\t\tthis.show(undefined, point);\n\t\t\t\t},\n\t\t\t]);\n\t\t} else if (this.touchGestures() !== 'off') {\n\t\t\tthis._disableNativeGesturesIfNecessary();\n\n\t\t\tthis._passiveListeners.push([\n\t\t\t\t'touchstart',\n\t\t\t\t(event) => {\n\t\t\t\t\tconst touch = (event as TouchEvent).targetTouches?.[0];\n\t\t\t\t\tconst origin = touch ? { x: touch.clientX, y: touch.clientY } : undefined;\n\t\t\t\t\t// Note that it's important that we don't `preventDefault` here,\n\t\t\t\t\t// because it can prevent click events from firing on the element.\n\t\t\t\t\tthis._setupPointerExitEventsIfNeeded();\n\t\t\t\t\tclearTimeout(this._touchstartTimeout);\n\t\t\t\t\tthis._touchstartTimeout = setTimeout(() => this.show(undefined, origin), LONGPRESS_DELAY);\n\t\t\t\t},\n\t\t\t]);\n\t\t}\n\n\t\tthis._addListeners(this._passiveListeners);\n\t}\n\n\tprivate _setupPointerExitEventsIfNeeded(): void {\n\t\tif (this._pointerExitEventsInitialized) {\n\t\t\treturn;\n\t\t}\n\t\tthis._pointerExitEventsInitialized = true;\n\n\t\tconst exitListeners: (readonly [string, EventListenerOrEventListenerObject])[] = [];\n\t\tif (this._platformSupportsMouseEvents()) {\n\t\t\texitListeners.push(\n\t\t\t\t[\n\t\t\t\t\t'mouseleave',\n\t\t\t\t\t(event) => {\n\t\t\t\t\t\tconst newTarget = (event as MouseEvent).relatedTarget as Node | null;\n\t\t\t\t\t\tif (!newTarget || !this._overlayRef?.overlayElement.contains(newTarget)) {\n\t\t\t\t\t\t\tthis.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\t['wheel', (event) => this._wheelListener(event as WheelEvent)],\n\t\t\t);\n\t\t} else if (this.touchGestures() !== 'off') {\n\t\t\tthis._disableNativeGesturesIfNecessary();\n\t\t\tconst touchendListener = () => {\n\t\t\t\tclearTimeout(this._touchstartTimeout);\n\t\t\t\tthis.hide(this._defaultOptions?.touchendHideDelay);\n\t\t\t};\n\n\t\t\texitListeners.push(['touchend', touchendListener], ['touchcancel', touchendListener]);\n\t\t}\n\n\t\tthis._addListeners(exitListeners);\n\t\tthis._passiveListeners.push(...exitListeners);\n\t}\n\n\tprivate _addListeners(listeners: (readonly [string, EventListenerOrEventListenerObject])[]) {\n\t\tlisteners.forEach(([event, listener]) => {\n\t\t\tthis._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n\t\t});\n\t}\n\n\tprivate _platformSupportsMouseEvents(): boolean {\n\t\treturn !this._platform.IOS && !this._platform.ANDROID;\n\t}\n\n\t/** Listener for the `wheel` event on the element. */\n\tprivate _wheelListener(event: WheelEvent) {\n\t\tif (this._isTooltipVisible()) {\n\t\t\tconst elementUnderPointer = this._document.elementFromPoint(event.clientX, event.clientY);\n\t\t\tconst element = this._elementRef.nativeElement;\n\n\t\t\t// On non-touch devices we depend on the `mouseleave` event to close the tooltip, but it\n\t\t\t// won't fire if the user scrolls away using the wheel without moving their cursor. We\n\t\t\t// work around it by finding the element under the user's cursor and closing the tooltip\n\t\t\t// if it's not the trigger.\n\t\t\tif (elementUnderPointer !== element && !element.contains(elementUnderPointer)) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Disables the native browser gestures, based on how the tooltip has been configured. */\n\tprivate _disableNativeGesturesIfNecessary(): void {\n\t\tconst gestures = this.touchGestures();\n\n\t\tif (gestures !== 'off') {\n\t\t\tconst element = this._elementRef.nativeElement;\n\t\t\tconst style = element.style;\n\n\t\t\t// If gestures are set to `auto`, we don't disable text selection on inputs and\n\t\t\t// textareas, because it prevents the user from typing into them on iOS Safari.\n\t\t\tif (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\tstyle.userSelect = (style as any).msUserSelect = style.webkitUserSelect = (style as any).MozUserSelect = 'none';\n\t\t\t}\n\n\t\t\t// If we have `auto` gestures and the element uses native HTML dragging,\n\t\t\t// we don't set `-webkit-user-drag` because it prevents the native behavior.\n\t\t\tif (gestures === 'on' || !element.draggable) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t(style as any).webkitUserDrag = 'none';\n\t\t\t}\n\n\t\t\tstyle.touchAction = 'none';\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t(style as any).webkitTapHighlightColor = 'transparent';\n\t\t}\n\t}\n}\n","import { BrnTooltip } from './lib/brn-tooltip';\nimport { BrnTooltipContent } from './lib/brn-tooltip-content';\nimport { BrnTooltipContentTemplate } from './lib/brn-tooltip-content-template';\nimport { BrnTooltipTrigger } from './lib/brn-tooltip-trigger';\n\nexport * from './lib/brn-tooltip';\nexport * from './lib/brn-tooltip-content';\nexport * from './lib/brn-tooltip-content-template';\nexport * from './lib/brn-tooltip-trigger';\nexport * from './lib/brn-tooltip.token';\n\nexport const BrnTooltipImports = [BrnTooltip, BrnTooltipContentTemplate, BrnTooltipTrigger, BrnTooltipContent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAKa,UAAU,CAAA;AACN,IAAA,eAAe,GAAG,MAAM,CAA8B,IAAI,CAAC;0HAD/D,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;8GAAV,UAAU,EAAA,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,cAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAAV,UAAU,EAAA,UAAA,EAAA,CAAA;kBAHtB,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,cAAc;AACxB,iBAAA;;;ACJD;;;;AAIG;AAmBH;;;AAGG;MA6BU,iBAAiB,CAAA;AACZ,IAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC;IAChC,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;AACnD,IAAA,UAAU,GAAG,MAAM,CAAC,SAAS,CAAC;AAE5B,IAAA,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC;AAElC,IAAA,cAAc,GAAG,MAAM,CAAC,EAAE,CAAC;AAC3B,IAA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AA,EAAA,iBAAA,EAAA,IAAA,EAAA,EAAA,EAAA,IAAA,EAAA,EAAA,UAAA,EAAA,EAAA,4BAAA,EAAA,sBAAA,EAAA,EAAA,cAAA,EAAA,qBAAA,EAAA,EAAA,SAAA,EANlB,CAAC,4CAA4C,CAAC,EAAA,QAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAM7C,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAT7B,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,QAAQ,EAAE,mBAAmB;oBAC7B,SAAS,EAAE,CAAC,4CAA4C,CAAC;AACzD,oBAAA,IAAI,EAAE;AACL,wBAAA,KAAK,EAAE,qBAAqB;AAC5B,wBAAA,8BAA8B,EAAE,sBAAsB;AACtD,qBAAA;AACD,iBAAA;;;AC5FM,MAAM,iBAAiB,GAAG,CAAC,UAAU,EAAE,yBAAyB,EAAE,iBAAiB,EAAE,iBAAiB;;ACX7G;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-tooltip.mjs","sources":["../../../../libs/brain/tooltip/src/lib/brn-tooltip.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-content.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-content-template.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip.token.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-trigger.ts","../../../../libs/brain/tooltip/src/index.ts","../../../../libs/brain/tooltip/src/spartan-ng-brain-tooltip.ts"],"sourcesContent":["import { Directive, type TemplateRef, signal } from '@angular/core';\n\n@Directive({\n\tselector: '[brnTooltip]',\n})\nexport class BrnTooltip {\n\tpublic readonly tooltipTemplate = signal<TemplateRef<unknown> | null>(null);\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/tooltip/tooltip.ts\n * Check them out! Give them a try! Leave a star! Their work is incredible!\n */\n\nimport { isPlatformBrowser, NgTemplateOutlet } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tChangeDetectorRef,\n\tComponent,\n\tElementRef,\n\tinject,\n\ttype OnDestroy,\n\tPLATFORM_ID,\n\tRenderer2,\n\tsignal,\n\ttype TemplateRef,\n\tviewChild,\n} from '@angular/core';\nimport { Subject } from 'rxjs';\n\n/**\n * Internal component that wraps the tooltip's content.\n * @docs-private\n */\n@Component({\n\tselector: 'brn-tooltip-content',\n\timports: [NgTemplateOutlet],\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n\thost: {\n\t\t// Forces the element to have a layout in IE and Edge. This fixes issues where the element\n\t\t// won't be rendered if the animations are disabled or there is no web animations polyfill.\n\t\t'[style.zoom]': 'isVisible() ? 1 : null',\n\t\t'(mouseleave)': '_handleMouseLeave($event)',\n\t\t'aria-hidden': 'true',\n\t},\n\ttemplate: `\n\t\t<div\n\t\t\t(mouseenter)=\"_contentHovered.set(true)\"\n\t\t\t(mouseleave)=\"_contentHovered.set(false)\"\n\t\t\t[class]=\"tooltipClasses()\"\n\t\t\t[style.visibility]=\"'hidden'\"\n\t\t\t#tooltip\n\t\t>\n\t\t\t@if (_isTypeOfString(content)) {\n\t\t\t\t{{ content }}\n\t\t\t} @else {\n\t\t\t\t<ng-container [ngTemplateOutlet]=\"content\" />\n\t\t\t}\n\t\t</div>\n\t`,\n})\nexport class BrnTooltipContent implements OnDestroy {\n\tprivate readonly _cdr = inject(ChangeDetectorRef);\n\tprivate readonly _isBrowser = isPlatformBrowser(inject(PLATFORM_ID));\n\tprivate readonly _renderer2 = inject(Renderer2);\n\n\tprotected readonly _contentHovered = signal(false);\n\n\tpublic readonly tooltipClasses = signal('');\n\tpublic readonly side = signal('above');\n\t/** Message to display in the tooltip */\n\tpublic content: string | TemplateRef<unknown> | null = null;\n\n\t/** The timeout ID of any current timer set to show the tooltip */\n\tprivate _showTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\t/** The timeout ID of any current timer set to hide the tooltip */\n\tprivate _hideTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\t/** The timeout ID of any current timer set to animate the tooltip */\n\tprivate _animateTimeoutId: ReturnType<typeof setTimeout> | undefined;\n\n\t/** Element that caused the tooltip to open. */\n\tpublic triggerElement?: HTMLElement;\n\n\t/** Amount of milliseconds to delay the closing sequence. */\n\tpublic mouseLeaveHideDelay = 0;\n\t/** Amount of milliseconds of closing animation. */\n\tpublic exitAnimationDuration = 0;\n\n\t/** Reference to the internal tooltip element. */\n\tpublic readonly tooltip = viewChild('tooltip', { read: ElementRef<HTMLElement> });\n\n\t/** Whether interactions on the page should close the tooltip */\n\tprivate _closeOnInteraction = false;\n\n\t/** Whether the tooltip is currently visible. */\n\tprivate _isVisible = false;\n\n\t/** Subject for notifying that the tooltip has been hidden from the view */\n\tprivate readonly _onHide: Subject<void> = new Subject();\n\tpublic readonly afterHidden = this._onHide.asObservable();\n\n\t/**\n\t * Shows the tooltip with originating from the provided origin\n\t * @param delay Amount of milliseconds to the delay showing the tooltip.\n\t */\n\tshow(delay: number): void {\n\t\t// Cancel the delayed hide if it is scheduled\n\t\tif (this._hideTimeoutId !== null) {\n\t\t\tclearTimeout(this._hideTimeoutId);\n\t\t}\n\t\tif (this._animateTimeoutId !== null) {\n\t\t\tclearTimeout(this._animateTimeoutId);\n\t\t}\n\t\tthis._showTimeoutId = setTimeout(() => {\n\t\t\tthis._toggleDataAttributes(true, this.side());\n\t\t\tthis._toggleVisibility(true);\n\t\t\tthis._showTimeoutId = undefined;\n\t\t}, delay);\n\t}\n\n\t/**\n\t * Begins to hide the tooltip after the provided delay in ms.\n\t * @param delay Amount of milliseconds to delay hiding the tooltip.\n\t * @param exitAnimationDuration Time before hiding to finish animation\n\t * */\n\thide(delay: number, exitAnimationDuration: number): void {\n\t\t// Cancel the delayed show if it is scheduled\n\t\tif (this._showTimeoutId !== null) {\n\t\t\tclearTimeout(this._showTimeoutId);\n\t\t}\n\t\t// start out animation at delay minus animation delay or immediately if possible\n\t\tthis._animateTimeoutId = setTimeout(\n\t\t\t() => {\n\t\t\t\tthis._animateTimeoutId = undefined;\n\t\t\t\tif (this._contentHovered()) return;\n\t\t\t\tthis._toggleDataAttributes(false, this.side());\n\t\t\t},\n\t\t\tMath.max(delay, 0),\n\t\t);\n\t\tthis._hideTimeoutId = setTimeout(() => {\n\t\t\tthis._hideTimeoutId = undefined;\n\t\t\tif (this._contentHovered()) return;\n\t\t\tthis._toggleVisibility(false);\n\t\t}, delay + exitAnimationDuration);\n\t}\n\n\t/** Whether the tooltip is being displayed. */\n\tisVisible(): boolean {\n\t\treturn this._isVisible;\n\t}\n\n\tngOnDestroy() {\n\t\tthis._cancelPendingAnimations();\n\t\tthis._onHide.complete();\n\t\tthis.triggerElement = undefined;\n\t}\n\n\t_isTypeOfString(content: unknown): content is string {\n\t\treturn typeof content === 'string';\n\t}\n\n\t/**\n\t * Interactions on the HTML body should close the tooltip immediately as defined in the\n\t * material design spec.\n\t * https://material.io/design/components/tooltips.html#behavior\n\t */\n\t_handleBodyInteraction(): void {\n\t\tif (this._closeOnInteraction) {\n\t\t\tthis.hide(0, 0);\n\t\t}\n\t}\n\n\t/**\n\t * Marks that the tooltip needs to be checked in the next change detection run.\n\t * Mainly used for rendering the initial text before positioning a tooltip, which\n\t * can be problematic in components with OnPush change detection.\n\t */\n\t_markForCheck(): void {\n\t\tthis._cdr.markForCheck();\n\t}\n\n\t_handleMouseLeave({ relatedTarget }: MouseEvent) {\n\t\tif (!relatedTarget || !this.triggerElement?.contains(relatedTarget as Node)) {\n\t\t\tif (this.isVisible()) {\n\t\t\t\tthis.hide(this.mouseLeaveHideDelay, this.exitAnimationDuration);\n\t\t\t} else {\n\t\t\t\tthis._finalize(false);\n\t\t\t}\n\t\t}\n\t\tthis._contentHovered.set(false);\n\t}\n\n\t/** Cancels any pending animation sequences. */\n\t_cancelPendingAnimations() {\n\t\tif (this._showTimeoutId !== null) {\n\t\t\tclearTimeout(this._showTimeoutId);\n\t\t}\n\n\t\tif (this._hideTimeoutId !== null) {\n\t\t\tclearTimeout(this._hideTimeoutId);\n\t\t}\n\n\t\tthis._showTimeoutId = this._hideTimeoutId = undefined;\n\t}\n\n\tprivate _finalize(toVisible: boolean) {\n\t\tif (toVisible) {\n\t\t\tthis._closeOnInteraction = true;\n\t\t} else if (!this.isVisible()) {\n\t\t\tthis._onHide.next();\n\t\t}\n\t}\n\n\t/** Toggles the visibility of the tooltip element. */\n\tprivate _toggleVisibility(isVisible: boolean) {\n\t\t// We set the classes directly here ourselves so that toggling the tooltip state\n\t\t// isn't bound by change detection. This allows us to hide it even if the\n\t\t// view ref has been detached from the CD tree.\n\t\tconst tooltip = this.tooltip()?.nativeElement;\n\t\tif (!tooltip || !this._isBrowser) return;\n\t\tthis._renderer2.setStyle(tooltip, 'visibility', isVisible ? 'visible' : 'hidden');\n\t\tif (isVisible) {\n\t\t\tthis._renderer2.removeStyle(tooltip, 'display');\n\t\t} else {\n\t\t\tthis._renderer2.setStyle(tooltip, 'display', 'none');\n\t\t}\n\t\tthis._isVisible = isVisible;\n\t}\n\n\tprivate _toggleDataAttributes(isVisible: boolean, side: string) {\n\t\t// We set the classes directly here ourselves so that toggling the tooltip state\n\t\t// isn't bound by change detection. This allows us to hide it even if the\n\t\t// view ref has been detached from the CD tree.\n\t\tconst tooltip = this.tooltip()?.nativeElement;\n\t\tif (!tooltip || !this._isBrowser) return;\n\t\tthis._renderer2.setAttribute(tooltip, 'data-side', side);\n\t\tthis._renderer2.setAttribute(tooltip, 'data-state', isVisible ? 'open' : 'closed');\n\t}\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { BrnTooltip } from './brn-tooltip';\n\n@Directive({\n\tselector: '[brnTooltipContent]',\n})\nexport class BrnTooltipContentTemplate {\n\tprivate readonly _brnTooltipDirective = inject(BrnTooltip, { optional: true });\n\tprivate readonly _tpl = inject(TemplateRef);\n\n\tconstructor() {\n\t\tif (!this._brnTooltipDirective || !this._tpl) return;\n\t\tthis._brnTooltipDirective.tooltipTemplate.set(this._tpl);\n\t}\n}\n","import { inject, InjectionToken, type ValueProvider } from '@angular/core';\nimport type { TooltipPosition, TooltipTouchGestures } from './brn-tooltip-trigger';\n\nexport interface BrnTooltipOptions {\n\t/** Default delay when the tooltip is shown. */\n\tshowDelay: number;\n\t/** Default delay when the tooltip is hidden. */\n\thideDelay: number;\n\t/** Default delay when hiding the tooltip on a touch device. */\n\ttouchendHideDelay: number;\n\t/** Default exit animation duration for the tooltip. */\n\texitAnimationDuration: number;\n\t/** Default touch gesture handling for tooltips. */\n\ttouchGestures?: TooltipTouchGestures;\n\t/** Default position for tooltips. */\n\tposition?: TooltipPosition;\n\t/**\n\t * Default value for whether tooltips should be positioned near the click or touch origin\n\t * instead of outside the element bounding box.\n\t */\n\tpositionAtOrigin?: boolean;\n\t/** Disables the ability for the user to interact with the tooltip element. */\n\tdisableTooltipInteractivity?: boolean;\n\t/** Default classes for the tooltip content. */\n\ttooltipContentClasses?: string;\n}\n\nexport const defaultOptions: BrnTooltipOptions = {\n\tshowDelay: 0,\n\thideDelay: 0,\n\texitAnimationDuration: 0,\n\ttouchendHideDelay: 1500,\n};\n\nconst BRN_TOOLTIP_DEFAULT_OPTIONS = new InjectionToken<BrnTooltipOptions>('brn-tooltip-default-options', {\n\tprovidedIn: 'root',\n\tfactory: () => defaultOptions,\n});\n\nexport function provideBrnTooltipDefaultOptions(options: Partial<BrnTooltipOptions>): ValueProvider {\n\treturn { provide: BRN_TOOLTIP_DEFAULT_OPTIONS, useValue: { ...defaultOptions, ...options } };\n}\n\nexport function injectBrnTooltipDefaultOptions(): BrnTooltipOptions {\n\treturn inject(BRN_TOOLTIP_DEFAULT_OPTIONS, { optional: true }) ?? defaultOptions;\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/tooltip/tooltip.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 */\nimport { AriaDescriber, FocusMonitor } from '@angular/cdk/a11y';\nimport { Directionality } from '@angular/cdk/bidi';\nimport { hasModifierKey } from '@angular/cdk/keycodes';\nimport {\n\ttype ConnectedPosition,\n\ttype ConnectionPositionPair,\n\ttype FlexibleConnectedPositionStrategy,\n\ttype HorizontalConnectionPos,\n\ttype OriginConnectionPosition,\n\tOverlay,\n\ttype OverlayConnectionPosition,\n\ttype OverlayRef,\n\tScrollDispatcher,\n\ttype ScrollStrategy,\n\ttype VerticalConnectionPos,\n} from '@angular/cdk/overlay';\nimport { normalizePassiveListenerOptions, Platform } from '@angular/cdk/platform';\nimport { ComponentPortal } from '@angular/cdk/portal';\nimport { DOCUMENT } from '@angular/common';\nimport {\n\ttype AfterViewInit,\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\teffect,\n\tElementRef,\n\tinject,\n\tInjectionToken,\n\tinput,\n\tisDevMode,\n\tNgZone,\n\tnumberAttribute,\n\ttype OnDestroy,\n\ttype Provider,\n\tsignal,\n\ttype TemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { brnDevMode, computedPrevious } from '@spartan-ng/brain/core';\nimport { Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { BrnTooltip } from './brn-tooltip';\nimport { BrnTooltipContent } from './brn-tooltip-content';\nimport { injectBrnTooltipDefaultOptions } from './brn-tooltip.token';\n\nexport type TooltipPosition = 'left' | 'right' | 'above' | 'below' | 'before' | 'after';\nexport type TooltipTouchGestures = 'auto' | 'on' | 'off';\n\n/** Time in ms to throttle repositioning after scroll events. */\nexport const SCROLL_THROTTLE_MS = 20;\n\nexport function getBrnTooltipInvalidPositionError(position: string) {\n\treturn Error(`Tooltip position \"${position}\" is invalid.`);\n}\n\n/** Injection token that determines the scroll handling while a tooltip is visible. */\nexport const BRN_TOOLTIP_SCROLL_STRATEGY = new InjectionToken<() => ScrollStrategy>('brn-tooltip-scroll-strategy');\nexport const BRN_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER: Provider = {\n\tprovide: BRN_TOOLTIP_SCROLL_STRATEGY,\n\tdeps: [Overlay],\n\tuseFactory:\n\t\t(overlay: Overlay): (() => ScrollStrategy) =>\n\t\t() =>\n\t\t\toverlay.scrollStrategies.reposition({ scrollThrottle: SCROLL_THROTTLE_MS }),\n};\n\nconst PANEL_CLASS = 'tooltip-panel';\n\n/** Options used to bind passive event listeners. */\nconst passiveListenerOptions = normalizePassiveListenerOptions({ passive: true });\n\n/**\n * Time between the user putting the pointer on a tooltip\n * trigger and the long press event being fired.\n */\nconst LONGPRESS_DELAY = 500;\n\n// These constants were taken from MDC's `numbers` object.\nconst MIN_VIEWPORT_TOOLTIP_THRESHOLD = 8;\nconst UNBOUNDED_ANCHOR_GAP = 8;\n\n@Directive({\n\tselector: '[brnTooltipTrigger]',\n\texportAs: 'brnTooltipTrigger',\n\tproviders: [BRN_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER],\n\thost: {\n\t\tclass: 'brn-tooltip-trigger',\n\t\t'[class.brn-tooltip-disabled]': 'brnTooltipDisabled()',\n\t},\n})\nexport class BrnTooltipTrigger implements OnDestroy, AfterViewInit {\n\tprivate readonly _tooltipDirective = inject(BrnTooltip, { optional: true });\n\tprivate readonly _tooltipComponent = BrnTooltipContent;\n\tprivate readonly _cssClassPrefix: string = 'brn';\n\tprivate readonly _destroyed = new Subject<void>();\n\tprivate readonly _passiveListeners: (readonly [string, EventListenerOrEventListenerObject])[] = [];\n\tprivate readonly _defaultOptions = injectBrnTooltipDefaultOptions();\n\n\tprivate readonly _overlay = inject(Overlay);\n\tprivate readonly _elementRef = inject(ElementRef<HTMLElement>);\n\tprivate readonly _scrollDispatcher = inject(ScrollDispatcher);\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\tprivate readonly _ngZone = inject(NgZone);\n\tprivate readonly _platform = inject(Platform);\n\tprivate readonly _ariaDescriber = inject(AriaDescriber);\n\tprivate readonly _focusMonitor = inject(FocusMonitor);\n\tprivate readonly _dir = inject(Directionality);\n\tprivate readonly _scrollStrategy = inject(BRN_TOOLTIP_SCROLL_STRATEGY);\n\tprivate readonly _document = inject(DOCUMENT);\n\n\tprivate _portal?: ComponentPortal<BrnTooltipContent>;\n\tprivate _viewInitialized = false;\n\tprivate _pointerExitEventsInitialized = false;\n\tprivate readonly _viewportMargin = 8;\n\tprivate _currentPosition?: TooltipPosition;\n\tprivate _touchstartTimeout?: ReturnType<typeof setTimeout>;\n\n\tprivate _overlayRef: OverlayRef | null = null;\n\tprivate _tooltipInstance: BrnTooltipContent | null = null;\n\n\t/** Allows the user to define the position of the tooltip relative to the parent element */\n\n\tpublic readonly position = input<TooltipPosition>(this._defaultOptions?.position ?? 'above');\n\n\t/**\n\t * Whether tooltip should be relative to the click or touch origin\n\t * instead of outside the element bounding box.\n\t */\n\n\tpublic readonly positionAtOrigin = input(this._defaultOptions?.positionAtOrigin ?? false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Disables the display of the tooltip. */\n\n\tpublic readonly brnTooltipDisabled = input(false, { transform: booleanAttribute });\n\n\t/** The default delay in ms before showing the tooltip after show is called */\n\n\tpublic readonly showDelay = input(this._defaultOptions?.showDelay ?? 0, { transform: numberAttribute });\n\n\t/** The default delay in ms before hiding the tooltip after hide is called */\n\n\tpublic readonly hideDelay = input(this._defaultOptions?.hideDelay ?? 0, { transform: numberAttribute });\n\n\t/** The default duration in ms that exit animation takes before hiding */\n\n\tpublic readonly exitAnimationDuration = input(this._defaultOptions?.exitAnimationDuration ?? 0, {\n\t\ttransform: numberAttribute,\n\t});\n\n\t/** The default delay in ms before hiding the tooltip after hide is called */\n\n\tpublic readonly tooltipContentClasses = input<string>(this._defaultOptions?.tooltipContentClasses ?? '', {\n\t\talias: 'tooltipContentClasses',\n\t});\n\tpublic readonly computedTooltipContentClasses = computed(() => signal(this.tooltipContentClasses()));\n\n\t/**\n\t * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive\n\t * uses a long press gesture to show and hide, however it can conflict with the native browser\n\t * gestures. To work around the conflict, Angular Material disables native gestures on the\n\t * trigger, but that might not be desirable on particular elements (e.g. inputs and draggable\n\t * elements). The different values for this option configure the touch event handling as follows:\n\t * - `auto` - Enables touch gestures for all elements, but tries to avoid conflicts with native\n\t * browser gestures on particular elements. In particular, it allows text selection on inputs\n\t * and textareas, and preserves the native browser dragging on elements marked as `draggable`.\n\t * - `on` - Enables touch gestures for all elements and disables native\n\t * browser gestures with no exceptions.\n\t * - `off` - Disables touch gestures. Note that this will prevent the tooltip from\n\t * showing on touch devices.\n\t */\n\n\tpublic readonly touchGestures = input<TooltipTouchGestures>(this._defaultOptions?.touchGestures ?? 'auto');\n\n\t/** The message to be used to describe the aria in the tooltip */\n\n\tpublic readonly ariaDescribedBy = input('', { alias: 'aria-describedby' });\n\tpublic readonly computedAriaDescribedBy = computed(() => signal(this.ariaDescribedBy()));\n\tpublic readonly ariaDescribedByPrevious = computedPrevious(this.computedAriaDescribedBy);\n\n\t/** The content to be displayed in the tooltip */\n\n\tpublic readonly brnTooltipTrigger = input<string | TemplateRef<unknown> | null>(null);\n\tpublic readonly brnTooltipTriggerState = computed(() => {\n\t\tif (this._tooltipDirective) {\n\t\t\treturn this._tooltipDirective.tooltipTemplate();\n\t\t}\n\t\treturn this.brnTooltipTrigger();\n\t});\n\n\tconstructor() {\n\t\tthis._dir.change.pipe(takeUntil(this._destroyed)).subscribe(() => {\n\t\t\tif (this._overlayRef) {\n\t\t\t\tthis._updatePosition(this._overlayRef);\n\t\t\t}\n\t\t});\n\n\t\tthis._viewportMargin = MIN_VIEWPORT_TOOLTIP_THRESHOLD;\n\n\t\tthis._initBrnTooltipTriggerEffect();\n\t\tthis._initAriaDescribedByPreviousEffect();\n\t\tthis._initTooltipContentClassesEffect();\n\t\tthis._initPositionEffect();\n\t\tthis._initPositionAtOriginEffect();\n\t\tthis._initBrnTooltipDisabledEffect();\n\t\tthis._initExitAnimationDurationEffect();\n\t\tthis._initHideDelayEffect();\n\t}\n\tsetTooltipContentClasses(tooltipContentClasses: string) {\n\t\tthis.computedTooltipContentClasses().set(tooltipContentClasses);\n\t}\n\tsetAriaDescribedBy(ariaDescribedBy: string) {\n\t\tthis.computedAriaDescribedBy().set(ariaDescribedBy);\n\t}\n\n\tprivate _initPositionEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._overlayRef) {\n\t\t\t\tthis._updatePosition(this._overlayRef);\n\t\t\t\tthis._tooltipInstance?.show(0);\n\t\t\t\tthis._overlayRef.updatePosition();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initBrnTooltipDisabledEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this.brnTooltipDisabled()) {\n\t\t\t\tthis.hide(0);\n\t\t\t} else {\n\t\t\t\tthis._setupPointerEnterEventsIfNeeded();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initPositionAtOriginEffect(): void {\n\t\teffect(() => {\n\t\t\t// Needed that the effect got triggered\n\t\t\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\t\t\tconst _ = this.positionAtOrigin();\n\t\t\tthis._detach();\n\t\t\tthis._overlayRef = null;\n\t\t});\n\t}\n\n\tprivate _initTooltipContentClassesEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tthis._tooltipInstance.tooltipClasses.set(this.computedTooltipContentClasses()() ?? '');\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initAriaDescribedByPreviousEffect(): void {\n\t\teffect(() => {\n\t\t\tconst ariaDescribedBy = this.computedAriaDescribedBy()();\n\t\t\tthis._ariaDescriber.removeDescription(\n\t\t\t\tthis._elementRef.nativeElement,\n\t\t\t\tuntracked(() => this.ariaDescribedByPrevious()()),\n\t\t\t\t'tooltip',\n\t\t\t);\n\n\t\t\tif (ariaDescribedBy && !this._isTooltipVisible()) {\n\t\t\t\tthis._ngZone.runOutsideAngular(() => {\n\t\t\t\t\t// The `AriaDescriber` has some functionality that avoids adding a description if it's the\n\t\t\t\t\t// same as the `aria-label` of an element, however we can't know whether the tooltip trigger\n\t\t\t\t\t// has a data-bound `aria-label` or when it'll be set for the first time. We can avoid the\n\t\t\t\t\t// issue by deferring the description by a tick so Angular has time to set the `aria-label`.\n\t\t\t\t\tPromise.resolve().then(() => {\n\t\t\t\t\t\tthis._ariaDescriber.describe(this._elementRef.nativeElement, ariaDescribedBy, 'tooltip');\n\t\t\t\t\t});\n\t\t\t\t});\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initBrnTooltipTriggerEffect(): void {\n\t\teffect(() => {\n\t\t\tconst brnTooltipTriggerState = this.brnTooltipTriggerState();\n\t\t\tconst isTooltipVisible = this._isTooltipVisible();\n\t\t\tuntracked(() => {\n\t\t\t\tif (!brnTooltipTriggerState && isTooltipVisible) {\n\t\t\t\t\tthis.hide(0);\n\t\t\t\t} else {\n\t\t\t\t\tthis._setupPointerEnterEventsIfNeeded();\n\t\t\t\t\tthis._updateTooltipContent();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\t}\n\n\tprivate _initExitAnimationDurationEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tthis._tooltipInstance.exitAnimationDuration = this.exitAnimationDuration();\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initHideDelayEffect(): void {\n\t\teffect(() => {\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tthis._tooltipInstance.mouseLeaveHideDelay = this.hideDelay();\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\t// This needs to happen after view init so the initial values for all inputs have been set.\n\t\tthis._viewInitialized = true;\n\t\tthis._setupPointerEnterEventsIfNeeded();\n\n\t\tthis._focusMonitor\n\t\t\t.monitor(this._elementRef)\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe((origin) => {\n\t\t\t\t// Note that the focus monitor runs outside the Angular zone.\n\t\t\t\tif (!origin) {\n\t\t\t\t\tthis._ngZone.run(() => this.hide(0));\n\t\t\t\t} else if (origin === 'keyboard') {\n\t\t\t\t\tthis._ngZone.run(() => this.show());\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (brnDevMode && !this.computedAriaDescribedBy()) {\n\t\t\tconsole.warn('BrnTooltip: \"aria-describedby\" attribute is required for accessibility');\n\t\t}\n\t}\n\n\t/**\n\t * Dispose the tooltip when destroyed.\n\t */\n\tngOnDestroy(): void {\n\t\tconst nativeElement = this._elementRef.nativeElement;\n\n\t\tclearTimeout(this._touchstartTimeout);\n\n\t\tif (this._overlayRef) {\n\t\t\tthis._overlayRef.dispose();\n\t\t\tthis._tooltipInstance = null;\n\t\t}\n\n\t\t// Clean up the event listeners set in the constructor\n\t\tthis._passiveListeners.forEach(([event, listener]) =>\n\t\t\tnativeElement.removeEventListener(event, listener, passiveListenerOptions),\n\t\t);\n\t\tthis._passiveListeners.length = 0;\n\n\t\tthis._destroyed.next();\n\t\tthis._destroyed.complete();\n\n\t\tthis._ariaDescriber.removeDescription(nativeElement, this.computedAriaDescribedBy()(), 'tooltip');\n\t\tthis._focusMonitor.stopMonitoring(nativeElement);\n\t}\n\n\t/** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */\n\tshow(delay: number = this.showDelay(), origin?: { x: number; y: number }): void {\n\t\tif (this.brnTooltipDisabled() || this._isTooltipVisible()) {\n\t\t\tthis._tooltipInstance?._cancelPendingAnimations();\n\t\t\treturn;\n\t\t}\n\n\t\tconst overlayRef = this._createOverlay(origin);\n\t\tthis._detach();\n\t\tthis._portal = this._portal || new ComponentPortal(this._tooltipComponent, this._viewContainerRef);\n\t\tconst instance = (this._tooltipInstance = overlayRef.attach(this._portal).instance);\n\t\tinstance.triggerElement = this._elementRef.nativeElement;\n\t\tinstance.mouseLeaveHideDelay = this.hideDelay();\n\t\tinstance.tooltipClasses.set(this.computedTooltipContentClasses()());\n\t\tinstance.exitAnimationDuration = this.exitAnimationDuration();\n\t\tinstance.side.set(this._currentPosition ?? 'above');\n\t\tinstance.afterHidden.pipe(takeUntil(this._destroyed)).subscribe(() => this._detach());\n\t\tthis._updateTooltipContent();\n\t\tinstance.show(delay);\n\t}\n\n\t/** Hides the tooltip after the delay in ms, defaults to tooltip-delay-hide or 0ms if no input */\n\thide(delay: number = this.hideDelay(), exitAnimationDuration: number = this.exitAnimationDuration()): void {\n\t\tconst instance = this._tooltipInstance;\n\t\tif (instance) {\n\t\t\tif (instance.isVisible()) {\n\t\t\t\tinstance.hide(delay, exitAnimationDuration);\n\t\t\t} else {\n\t\t\t\tinstance._cancelPendingAnimations();\n\t\t\t\tthis._detach();\n\t\t\t}\n\t\t}\n\t}\n\n\ttoggle(origin?: { x: number; y: number }): void {\n\t\tthis._isTooltipVisible() ? this.hide() : this.show(undefined, origin);\n\t}\n\n\t_isTooltipVisible(): boolean {\n\t\treturn !!this._tooltipInstance && this._tooltipInstance.isVisible();\n\t}\n\n\tprivate _createOverlay(origin?: { x: number; y: number }): OverlayRef {\n\t\tif (this._overlayRef) {\n\t\t\tconst existingStrategy = this._overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy;\n\n\t\t\tif ((!this.positionAtOrigin() || !origin) && existingStrategy._origin instanceof ElementRef) {\n\t\t\t\treturn this._overlayRef;\n\t\t\t}\n\n\t\t\tthis._detach();\n\t\t}\n\n\t\tconst scrollableAncestors = this._scrollDispatcher.getAncestorScrollContainers(this._elementRef);\n\n\t\t// Create connected position strategy that listens for scroll events to reposition.\n\t\tconst strategy = this._overlay\n\t\t\t.position()\n\t\t\t.flexibleConnectedTo(this.positionAtOrigin() ? origin || this._elementRef : this._elementRef)\n\t\t\t.withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`)\n\t\t\t.withFlexibleDimensions(false)\n\t\t\t.withViewportMargin(this._viewportMargin)\n\t\t\t.withScrollableContainers(scrollableAncestors);\n\n\t\tstrategy.positionChanges.pipe(takeUntil(this._destroyed)).subscribe((change) => {\n\t\t\tthis._updateCurrentPositionClass(change.connectionPair);\n\n\t\t\tif (this._tooltipInstance) {\n\t\t\t\tif (change.scrollableViewProperties.isOverlayClipped && this._tooltipInstance.isVisible()) {\n\t\t\t\t\t// After position changes occur and the overlay is clipped by\n\t\t\t\t\t// a parent scrollable then close the tooltip.\n\t\t\t\t\tthis._ngZone.run(() => this.hide(0));\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\n\t\tthis._overlayRef = this._overlay.create({\n\t\t\tdirection: this._dir,\n\t\t\tpositionStrategy: strategy,\n\t\t\tpanelClass: `${this._cssClassPrefix}-${PANEL_CLASS}`,\n\t\t\tscrollStrategy: this._scrollStrategy(),\n\t\t});\n\n\t\tthis._updatePosition(this._overlayRef);\n\n\t\tthis._overlayRef\n\t\t\t.detachments()\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => this._detach());\n\n\t\tthis._overlayRef\n\t\t\t.outsidePointerEvents()\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe(() => this._tooltipInstance?._handleBodyInteraction());\n\n\t\tthis._overlayRef\n\t\t\t.keydownEvents()\n\t\t\t.pipe(takeUntil(this._destroyed))\n\t\t\t.subscribe((event) => {\n\t\t\t\tif (this._isTooltipVisible() && event.key === 'Escape' && !hasModifierKey(event)) {\n\t\t\t\t\tevent.preventDefault();\n\t\t\t\t\tevent.stopPropagation();\n\t\t\t\t\tthis._ngZone.run(() => this.hide(0));\n\t\t\t\t}\n\t\t\t});\n\n\t\tif (this._defaultOptions?.disableTooltipInteractivity) {\n\t\t\tthis._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`);\n\t\t}\n\n\t\treturn this._overlayRef;\n\t}\n\n\tprivate _detach(): void {\n\t\tif (this._overlayRef?.hasAttached()) {\n\t\t\tthis._overlayRef.detach();\n\t\t}\n\n\t\tthis._tooltipInstance = null;\n\t}\n\n\tprivate _updatePosition(overlayRef: OverlayRef) {\n\t\tconst position = overlayRef.getConfig().positionStrategy as FlexibleConnectedPositionStrategy;\n\t\tconst origin = this._getOrigin();\n\t\tconst overlay = this._getOverlayPosition();\n\n\t\tposition.withPositions([\n\t\t\tthis._addOffset({ ...origin.main, ...overlay.main }),\n\t\t\tthis._addOffset({ ...origin.fallback, ...overlay.fallback }),\n\t\t]);\n\t}\n\n\t/** Adds the configured offset to a position. Used as a hook for child classes. */\n\tprotected _addOffset(position: ConnectedPosition): ConnectedPosition {\n\t\tconst offset = UNBOUNDED_ANCHOR_GAP;\n\t\tconst isLtr = !this._dir || this._dir.value === 'ltr';\n\n\t\tif (position.originY === 'top') {\n\t\t\tposition.offsetY = -offset;\n\t\t} else if (position.originY === 'bottom') {\n\t\t\tposition.offsetY = offset;\n\t\t} else if (position.originX === 'start') {\n\t\t\tposition.offsetX = isLtr ? -offset : offset;\n\t\t} else if (position.originX === 'end') {\n\t\t\tposition.offsetX = isLtr ? offset : -offset;\n\t\t}\n\n\t\treturn position;\n\t}\n\n\t/**\n\t * Returns the origin position and a fallback position based on the user's position preference.\n\t * The fallback position is the inverse of the origin (e.g. `'below' -> 'above'`).\n\t */\n\t_getOrigin(): { main: OriginConnectionPosition; fallback: OriginConnectionPosition } {\n\t\tconst isLtr = !this._dir || this._dir.value === 'ltr';\n\t\tconst position = this.position();\n\t\tlet originPosition: OriginConnectionPosition;\n\n\t\tif (position === 'above' || position === 'below') {\n\t\t\toriginPosition = { originX: 'center', originY: position === 'above' ? 'top' : 'bottom' };\n\t\t} else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n\t\t\toriginPosition = { originX: 'start', originY: 'center' };\n\t\t} else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n\t\t\toriginPosition = { originX: 'end', originY: 'center' };\n\t\t} else if (typeof isDevMode() === 'undefined' || isDevMode()) {\n\t\t\tthrow getBrnTooltipInvalidPositionError(position);\n\t\t}\n\n\t\tconst { x, y } = this._invertPosition(originPosition!.originX, originPosition!.originY);\n\n\t\treturn {\n\t\t\tmain: originPosition!,\n\t\t\tfallback: { originX: x, originY: y },\n\t\t};\n\t}\n\n\t/** Returns the overlay position and a fallback position based on the user's preference */\n\t_getOverlayPosition(): { main: OverlayConnectionPosition; fallback: OverlayConnectionPosition } {\n\t\tconst isLtr = !this._dir || this._dir.value === 'ltr';\n\t\tconst position = this.position();\n\t\tlet overlayPosition: OverlayConnectionPosition;\n\n\t\tif (position === 'above') {\n\t\t\toverlayPosition = { overlayX: 'center', overlayY: 'bottom' };\n\t\t} else if (position === 'below') {\n\t\t\toverlayPosition = { overlayX: 'center', overlayY: 'top' };\n\t\t} else if (position === 'before' || (position === 'left' && isLtr) || (position === 'right' && !isLtr)) {\n\t\t\toverlayPosition = { overlayX: 'end', overlayY: 'center' };\n\t\t} else if (position === 'after' || (position === 'right' && isLtr) || (position === 'left' && !isLtr)) {\n\t\t\toverlayPosition = { overlayX: 'start', overlayY: 'center' };\n\t\t} else if (typeof isDevMode() === 'undefined' || isDevMode()) {\n\t\t\tthrow getBrnTooltipInvalidPositionError(position);\n\t\t}\n\n\t\tconst { x, y } = this._invertPosition(overlayPosition!.overlayX, overlayPosition!.overlayY);\n\n\t\treturn {\n\t\t\tmain: overlayPosition!,\n\t\t\tfallback: { overlayX: x, overlayY: y },\n\t\t};\n\t}\n\n\t/** Updates the tooltip message and repositions the overlay according to the new message length */\n\tprivate _updateTooltipContent(): void {\n\t\t// Must wait for the template to be painted to the tooltip so that the overlay can properly\n\t\t// calculate the correct positioning based on the size of the tek-pate.\n\t\tif (this._tooltipInstance) {\n\t\t\tthis._tooltipInstance.content = this.brnTooltipTriggerState();\n\t\t\tthis._tooltipInstance._markForCheck();\n\n\t\t\tthis._ngZone.onMicrotaskEmpty.pipe(take(1), takeUntil(this._destroyed)).subscribe(() => {\n\t\t\t\tif (this._tooltipInstance) {\n\t\t\t\t\tthis._overlayRef?.updatePosition();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\n\t/** Inverts an overlay position. */\n\tprivate _invertPosition(x: HorizontalConnectionPos, y: VerticalConnectionPos) {\n\t\tif (this.position() === 'above' || this.position() === 'below') {\n\t\t\tif (y === 'top') {\n\t\t\t\ty = 'bottom';\n\t\t\t} else if (y === 'bottom') {\n\t\t\t\ty = 'top';\n\t\t\t}\n\t\t} else {\n\t\t\tif (x === 'end') {\n\t\t\t\tx = 'start';\n\t\t\t} else if (x === 'start') {\n\t\t\t\tx = 'end';\n\t\t\t}\n\t\t}\n\n\t\treturn { x, y };\n\t}\n\n\t/** Updates the class on the overlay panel based on the current position of the tooltip. */\n\tprivate _updateCurrentPositionClass(connectionPair: ConnectionPositionPair): void {\n\t\tconst { overlayY, originX, originY } = connectionPair;\n\t\tlet newPosition: TooltipPosition;\n\n\t\t// If the overlay is in the middle along the Y axis,\n\t\t// it means that it's either before or after.\n\t\tif (overlayY === 'center') {\n\t\t\t// Note that since this information is used for styling, we want to\n\t\t\t// resolve `start` and `end` to their real values, otherwise consumers\n\t\t\t// would have to remember to do it themselves on each consumption.\n\t\t\tif (this._dir && this._dir.value === 'rtl') {\n\t\t\t\tnewPosition = originX === 'end' ? 'left' : 'right';\n\t\t\t} else {\n\t\t\t\tnewPosition = originX === 'start' ? 'left' : 'right';\n\t\t\t}\n\t\t} else {\n\t\t\tnewPosition = overlayY === 'bottom' && originY === 'top' ? 'above' : 'below';\n\t\t}\n\n\t\tif (newPosition !== this._currentPosition) {\n\t\t\tthis._tooltipInstance?.side.set(newPosition);\n\t\t\tthis._currentPosition = newPosition;\n\t\t}\n\t}\n\n\t/** Binds the pointer events to the tooltip trigger. */\n\tprivate _setupPointerEnterEventsIfNeeded(): void {\n\t\t// Optimization: Defer hooking up events if there's no content or the tooltip is disabled.\n\t\tif (\n\t\t\tthis.brnTooltipDisabled() ||\n\t\t\t!this.brnTooltipTriggerState() ||\n\t\t\t!this._viewInitialized ||\n\t\t\tthis._passiveListeners.length\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\t// The mouse events shouldn't be bound on mobile devices, because they can prevent the\n\t\t// first tap from firing its click event or can cause the tooltip to open for clicks.\n\t\tif (this._platformSupportsMouseEvents()) {\n\t\t\tthis._passiveListeners.push([\n\t\t\t\t'mouseenter',\n\t\t\t\t(event) => {\n\t\t\t\t\tthis._setupPointerExitEventsIfNeeded();\n\t\t\t\t\tlet point = undefined;\n\t\t\t\t\tif ((event as MouseEvent).x !== undefined && (event as MouseEvent).y !== undefined) {\n\t\t\t\t\t\tpoint = event as MouseEvent;\n\t\t\t\t\t}\n\t\t\t\t\tthis.show(undefined, point);\n\t\t\t\t},\n\t\t\t]);\n\t\t} else if (this.touchGestures() !== 'off') {\n\t\t\tthis._disableNativeGesturesIfNecessary();\n\n\t\t\tthis._passiveListeners.push([\n\t\t\t\t'touchstart',\n\t\t\t\t(event) => {\n\t\t\t\t\tconst touch = (event as TouchEvent).targetTouches?.[0];\n\t\t\t\t\tconst origin = touch ? { x: touch.clientX, y: touch.clientY } : undefined;\n\t\t\t\t\t// Note that it's important that we don't `preventDefault` here,\n\t\t\t\t\t// because it can prevent click events from firing on the element.\n\t\t\t\t\tthis._setupPointerExitEventsIfNeeded();\n\t\t\t\t\tclearTimeout(this._touchstartTimeout);\n\t\t\t\t\tthis._touchstartTimeout = setTimeout(() => this.show(undefined, origin), LONGPRESS_DELAY);\n\t\t\t\t},\n\t\t\t]);\n\t\t}\n\n\t\tthis._addListeners(this._passiveListeners);\n\t}\n\n\tprivate _setupPointerExitEventsIfNeeded(): void {\n\t\tif (this._pointerExitEventsInitialized) {\n\t\t\treturn;\n\t\t}\n\t\tthis._pointerExitEventsInitialized = true;\n\n\t\tconst exitListeners: (readonly [string, EventListenerOrEventListenerObject])[] = [];\n\t\tif (this._platformSupportsMouseEvents()) {\n\t\t\texitListeners.push(\n\t\t\t\t[\n\t\t\t\t\t'mouseleave',\n\t\t\t\t\t(event) => {\n\t\t\t\t\t\tconst newTarget = (event as MouseEvent).relatedTarget as Node | null;\n\t\t\t\t\t\tif (!newTarget || !this._overlayRef?.overlayElement.contains(newTarget)) {\n\t\t\t\t\t\t\tthis.hide();\n\t\t\t\t\t\t}\n\t\t\t\t\t},\n\t\t\t\t],\n\t\t\t\t['wheel', (event) => this._wheelListener(event as WheelEvent)],\n\t\t\t);\n\t\t} else if (this.touchGestures() !== 'off') {\n\t\t\tthis._disableNativeGesturesIfNecessary();\n\t\t\tconst touchendListener = () => {\n\t\t\t\tclearTimeout(this._touchstartTimeout);\n\t\t\t\tthis.hide(this._defaultOptions?.touchendHideDelay);\n\t\t\t};\n\n\t\t\texitListeners.push(['touchend', touchendListener], ['touchcancel', touchendListener]);\n\t\t}\n\n\t\tthis._addListeners(exitListeners);\n\t\tthis._passiveListeners.push(...exitListeners);\n\t}\n\n\tprivate _addListeners(listeners: (readonly [string, EventListenerOrEventListenerObject])[]) {\n\t\tlisteners.forEach(([event, listener]) => {\n\t\t\tthis._elementRef.nativeElement.addEventListener(event, listener, passiveListenerOptions);\n\t\t});\n\t}\n\n\tprivate _platformSupportsMouseEvents(): boolean {\n\t\treturn !this._platform.IOS && !this._platform.ANDROID;\n\t}\n\n\t/** Listener for the `wheel` event on the element. */\n\tprivate _wheelListener(event: WheelEvent) {\n\t\tif (this._isTooltipVisible()) {\n\t\t\tconst elementUnderPointer = this._document.elementFromPoint(event.clientX, event.clientY);\n\t\t\tconst element = this._elementRef.nativeElement;\n\n\t\t\t// On non-touch devices we depend on the `mouseleave` event to close the tooltip, but it\n\t\t\t// won't fire if the user scrolls away using the wheel without moving their cursor. We\n\t\t\t// work around it by finding the element under the user's cursor and closing the tooltip\n\t\t\t// if it's not the trigger.\n\t\t\tif (elementUnderPointer !== element && !element.contains(elementUnderPointer)) {\n\t\t\t\tthis.hide();\n\t\t\t}\n\t\t}\n\t}\n\n\t/** Disables the native browser gestures, based on how the tooltip has been configured. */\n\tprivate _disableNativeGesturesIfNecessary(): void {\n\t\tconst gestures = this.touchGestures();\n\n\t\tif (gestures !== 'off') {\n\t\t\tconst element = this._elementRef.nativeElement;\n\t\t\tconst style = element.style;\n\n\t\t\t// If gestures are set to `auto`, we don't disable text selection on inputs and\n\t\t\t// textareas, because it prevents the user from typing into them on iOS Safari.\n\t\t\tif (gestures === 'on' || (element.nodeName !== 'INPUT' && element.nodeName !== 'TEXTAREA')) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\tstyle.userSelect = (style as any).msUserSelect = style.webkitUserSelect = (style as any).MozUserSelect = 'none';\n\t\t\t}\n\n\t\t\t// If we have `auto` gestures and the element uses native HTML dragging,\n\t\t\t// we don't set `-webkit-user-drag` because it prevents the native behavior.\n\t\t\tif (gestures === 'on' || !element.draggable) {\n\t\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t\t(style as any).webkitUserDrag = 'none';\n\t\t\t}\n\n\t\t\tstyle.touchAction = 'none';\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-explicit-any\n\t\t\t(style as any).webkitTapHighlightColor = 'transparent';\n\t\t}\n\t}\n}\n","import { BrnTooltip } from './lib/brn-tooltip';\nimport { BrnTooltipContent } from './lib/brn-tooltip-content';\nimport { BrnTooltipContentTemplate } from './lib/brn-tooltip-content-template';\nimport { BrnTooltipTrigger } from './lib/brn-tooltip-trigger';\n\nexport * from './lib/brn-tooltip';\nexport * from './lib/brn-tooltip-content';\nexport * from './lib/brn-tooltip-content-template';\nexport * from './lib/brn-tooltip-trigger';\nexport * from './lib/brn-tooltip.token';\n\nexport const BrnTooltipImports = [BrnTooltip, BrnTooltipContentTemplate, BrnTooltipTrigger, BrnTooltipContent] as const;\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;MAKa,UAAU,CAAA;AACN,IAAA,eAAe,GAAG,MAAM,CAA8B,IAAI,CAAC;0HA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