@spartan-ng/brain 0.0.1-alpha.438 → 0.0.1-alpha.439

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.
@@ -0,0 +1,212 @@
1
+ import * as i0 from '@angular/core';
2
+ import { InjectionToken, inject, input, numberAttribute, computed, Component, forwardRef, signal, booleanAttribute, model, output, NgModule } from '@angular/core';
3
+ import * as i1 from '@angular/forms';
4
+ import { NG_VALUE_ACCESSOR, FormsModule } from '@angular/forms';
5
+
6
+ const BrnInputOtpToken = new InjectionToken('BrnInputOtpToken');
7
+ function injectBrnInputOtp() {
8
+ return inject(BrnInputOtpToken);
9
+ }
10
+ function provideBrnInputOtp(inputOtp) {
11
+ return { provide: BrnInputOtpToken, useExisting: inputOtp };
12
+ }
13
+
14
+ class BrnInputOtpSlotComponent {
15
+ /** Access the input-otp component */
16
+ inputOtp = injectBrnInputOtp();
17
+ index = input.required({ transform: numberAttribute });
18
+ slot = computed(() => this.inputOtp.context()[this.index()]);
19
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpSlotComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
20
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.1", type: BrnInputOtpSlotComponent, isStandalone: true, selector: "brn-input-otp-slot", inputs: { index: { classPropertyName: "index", publicName: "index", isSignal: true, isRequired: true, transformFunction: null } }, host: { properties: { "attr.data-active": "slot().isActive" } }, ngImport: i0, template: `
21
+ {{ slot().char }}
22
+
23
+ @if (slot().hasFakeCaret) {
24
+ <ng-content />
25
+ }
26
+ `, isInline: true });
27
+ }
28
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpSlotComponent, decorators: [{
29
+ type: Component,
30
+ args: [{
31
+ selector: 'brn-input-otp-slot',
32
+ standalone: true,
33
+ template: `
34
+ {{ slot().char }}
35
+
36
+ @if (slot().hasFakeCaret) {
37
+ <ng-content />
38
+ }
39
+ `,
40
+ host: {
41
+ '[attr.data-active]': 'slot().isActive',
42
+ },
43
+ }]
44
+ }] });
45
+
46
+ const BRN_INPUT_OTP_VALUE_ACCESSOR = {
47
+ provide: NG_VALUE_ACCESSOR,
48
+ useExisting: forwardRef(() => BrnInputOtpComponent),
49
+ multi: true,
50
+ };
51
+ class BrnInputOtpComponent {
52
+ /** Whether the input has focus. */
53
+ focused = signal(false);
54
+ hostStyles = input('position: relative; cursor: text; user-select: none; pointer-events: none;');
55
+ inputStyles = input('position: absolute; inset: 0; width: 100%; height: 100%; display: flex; textAlign: left; opacity: 1; color: transparent; pointerEvents: all; background: transparent; caret-color: transparent; border: 0px solid transparent; outline: transparent solid 0px; box-shadow: none; line-height: 1; letter-spacing: -0.5em; font-family: monospace; font-variant-numeric: tabular-nums;');
56
+ containerStyles = input('position: absolute; inset: 0; pointer-events: none;');
57
+ /** Determine if the date picker is disabled. */
58
+ disabled = input(false, {
59
+ transform: booleanAttribute,
60
+ });
61
+ /** The number of slots. */
62
+ maxLength = input.required({ transform: numberAttribute });
63
+ /** Virtual keyboard appearance on mobile */
64
+ inputMode = input('numeric');
65
+ inputClass = input('');
66
+ /**
67
+ * Defines how the pasted text should be transformed before saving to model/form.
68
+ * Allows pasting text which contains extra characters like spaces, dashes, etc. and are longer than the maxLength.
69
+ *
70
+ * "XXX-XXX": (pastedText) => pastedText.replaceAll('-', '')
71
+ * "XXX XXX": (pastedText) => pastedText.replaceAll(/\s+/g, '')
72
+ */
73
+ transformPaste = input((text) => text);
74
+ /** The value controlling the input */
75
+ value = model('');
76
+ context = computed(() => {
77
+ const value = this.value();
78
+ const focused = this.focused();
79
+ const maxLength = this.maxLength();
80
+ const slots = Array.from({ length: this.maxLength() }).map((_, slotIndex) => {
81
+ const char = value[slotIndex] !== undefined ? value[slotIndex] : null;
82
+ const isActive = focused && (value.length === slotIndex || (value.length === maxLength && slotIndex === maxLength - 1));
83
+ return {
84
+ char,
85
+ isActive,
86
+ hasFakeCaret: isActive && value.length === slotIndex,
87
+ };
88
+ });
89
+ return slots;
90
+ });
91
+ /** Emitted when the input is complete, triggered through input or paste. */
92
+ completed = output();
93
+ state = computed(() => ({
94
+ disabled: signal(this.disabled()),
95
+ }));
96
+ _onChange;
97
+ _onTouched;
98
+ onInputChange(event) {
99
+ let newValue = event.target.value;
100
+ const maxLength = this.maxLength();
101
+ if (newValue.length > maxLength) {
102
+ // Replace the last character when max length is exceeded
103
+ newValue = newValue.slice(0, maxLength - 1) + newValue.slice(-1);
104
+ }
105
+ this.updateValue(newValue, maxLength);
106
+ }
107
+ onPaste(event) {
108
+ event.preventDefault();
109
+ const clipboardData = event.clipboardData?.getData('text/plain') || '';
110
+ const maxLength = this.maxLength();
111
+ const content = this.transformPaste()(clipboardData, maxLength);
112
+ const newValue = content.slice(0, maxLength);
113
+ this.updateValue(newValue, maxLength);
114
+ }
115
+ /** CONTROL VALUE ACCESSOR */
116
+ writeValue(value) {
117
+ // optional FormControl is initialized with null value
118
+ if (value === null)
119
+ return;
120
+ this.updateValue(value, this.maxLength());
121
+ }
122
+ registerOnChange(fn) {
123
+ this._onChange = fn;
124
+ }
125
+ registerOnTouched(fn) {
126
+ this._onTouched = fn;
127
+ }
128
+ setDisabledState(isDisabled) {
129
+ this.state().disabled.set(isDisabled);
130
+ }
131
+ isCompleted(newValue, previousValue, maxLength) {
132
+ return newValue !== previousValue && previousValue.length < maxLength && newValue.length === maxLength;
133
+ }
134
+ updateValue(newValue, maxLength) {
135
+ const previousValue = this.value();
136
+ this.value.set(newValue);
137
+ this._onChange?.(newValue);
138
+ if (this.isCompleted(newValue, previousValue, maxLength)) {
139
+ this.completed.emit(newValue);
140
+ }
141
+ }
142
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
143
+ /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.1", type: BrnInputOtpComponent, isStandalone: true, selector: "brn-input-otp", inputs: { hostStyles: { classPropertyName: "hostStyles", publicName: "hostStyles", isSignal: true, isRequired: false, transformFunction: null }, inputStyles: { classPropertyName: "inputStyles", publicName: "inputStyles", isSignal: true, isRequired: false, transformFunction: null }, containerStyles: { classPropertyName: "containerStyles", publicName: "containerStyles", isSignal: true, isRequired: false, transformFunction: null }, disabled: { classPropertyName: "disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null }, maxLength: { classPropertyName: "maxLength", publicName: "maxLength", isSignal: true, isRequired: true, transformFunction: null }, inputMode: { classPropertyName: "inputMode", publicName: "inputMode", isSignal: true, isRequired: false, transformFunction: null }, inputClass: { classPropertyName: "inputClass", publicName: "inputClass", isSignal: true, isRequired: false, transformFunction: null }, transformPaste: { classPropertyName: "transformPaste", publicName: "transformPaste", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { value: "valueChange", completed: "completed" }, host: { attributes: { "data-input-otp-container": "true" }, properties: { "style": "hostStyles()" } }, providers: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtpComponent)], ngImport: i0, template: `
144
+ <ng-content />
145
+ <div [style]="containerStyles()">
146
+ <input
147
+ [class]="inputClass()"
148
+ autocomplete="one-time-code"
149
+ data-slot="input-otp"
150
+ [style]="inputStyles()"
151
+ [disabled]="state().disabled()"
152
+ [inputMode]="inputMode()"
153
+ [ngModel]="value()"
154
+ (input)="onInputChange($event)"
155
+ (paste)="onPaste($event)"
156
+ (focus)="focused.set(true)"
157
+ (blur)="focused.set(false)"
158
+ />
159
+ </div>
160
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i1.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }] });
161
+ }
162
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpComponent, decorators: [{
163
+ type: Component,
164
+ args: [{
165
+ selector: 'brn-input-otp',
166
+ standalone: true,
167
+ imports: [FormsModule],
168
+ template: `
169
+ <ng-content />
170
+ <div [style]="containerStyles()">
171
+ <input
172
+ [class]="inputClass()"
173
+ autocomplete="one-time-code"
174
+ data-slot="input-otp"
175
+ [style]="inputStyles()"
176
+ [disabled]="state().disabled()"
177
+ [inputMode]="inputMode()"
178
+ [ngModel]="value()"
179
+ (input)="onInputChange($event)"
180
+ (paste)="onPaste($event)"
181
+ (focus)="focused.set(true)"
182
+ (blur)="focused.set(false)"
183
+ />
184
+ </div>
185
+ `,
186
+ host: {
187
+ '[style]': 'hostStyles()',
188
+ 'data-input-otp-container': 'true',
189
+ },
190
+ providers: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtpComponent)],
191
+ }]
192
+ }] });
193
+
194
+ class BrnInputOtpModule {
195
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
196
+ /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, imports: [BrnInputOtpComponent, BrnInputOtpSlotComponent], exports: [BrnInputOtpComponent, BrnInputOtpSlotComponent] });
197
+ /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, imports: [BrnInputOtpComponent] });
198
+ }
199
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnInputOtpModule, decorators: [{
200
+ type: NgModule,
201
+ args: [{
202
+ imports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],
203
+ exports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],
204
+ }]
205
+ }] });
206
+
207
+ /**
208
+ * Generated bundle index. Do not edit.
209
+ */
210
+
211
+ export { BRN_INPUT_OTP_VALUE_ACCESSOR, BrnInputOtpComponent, BrnInputOtpModule, BrnInputOtpSlotComponent };
212
+ //# sourceMappingURL=spartan-ng-brain-input-otp.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"spartan-ng-brain-input-otp.mjs","sources":["../../../../libs/brain/input-otp/src/lib/brn-input-otp.token.ts","../../../../libs/brain/input-otp/src/lib/brn-input-otp-slot.component.ts","../../../../libs/brain/input-otp/src/lib/brn-input-otp.component.ts","../../../../libs/brain/input-otp/src/index.ts","../../../../libs/brain/input-otp/src/spartan-ng-brain-input-otp.ts"],"sourcesContent":["import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport { BrnInputOtpComponent } from './brn-input-otp.component';\n\nexport const BrnInputOtpToken = new InjectionToken<BrnInputOtpComponent>('BrnInputOtpToken');\n\nexport function injectBrnInputOtp(): BrnInputOtpComponent {\n\treturn inject(BrnInputOtpToken) as BrnInputOtpComponent;\n}\n\nexport function provideBrnInputOtp(inputOtp: Type<BrnInputOtpComponent>): ExistingProvider {\n\treturn { provide: BrnInputOtpToken, useExisting: inputOtp };\n}\n","import { NumberInput } from '@angular/cdk/coercion';\nimport { Component, computed, input, numberAttribute } from '@angular/core';\nimport { injectBrnInputOtp } from './brn-input-otp.token';\n\n@Component({\n\tselector: 'brn-input-otp-slot',\n\tstandalone: true,\n\ttemplate: `\n\t\t{{ slot().char }}\n\n\t\t@if (slot().hasFakeCaret) {\n\t\t\t<ng-content />\n\t\t}\n\t`,\n\thost: {\n\t\t'[attr.data-active]': 'slot().isActive',\n\t},\n})\nexport class BrnInputOtpSlotComponent {\n\t/** Access the input-otp component */\n\tprotected readonly inputOtp = injectBrnInputOtp();\n\n\tpublic readonly index = input.required<number, NumberInput>({ transform: numberAttribute });\n\n\tpublic readonly slot = computed(() => this.inputOtp.context()[this.index()]);\n}\n","import { BooleanInput, NumberInput } from '@angular/cdk/coercion';\nimport {\n\tbooleanAttribute,\n\tComponent,\n\tcomputed,\n\tforwardRef,\n\tinput,\n\tmodel,\n\tnumberAttribute,\n\toutput,\n\tsignal,\n} from '@angular/core';\nimport { ControlValueAccessor, FormsModule, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';\nimport { provideBrnInputOtp } from './brn-input-otp.token';\n\nexport const BRN_INPUT_OTP_VALUE_ACCESSOR = {\n\tprovide: NG_VALUE_ACCESSOR,\n\tuseExisting: forwardRef(() => BrnInputOtpComponent),\n\tmulti: true,\n};\n\nexport type InputMode = 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';\n\n@Component({\n\tselector: 'brn-input-otp',\n\tstandalone: true,\n\timports: [FormsModule],\n\ttemplate: `\n\t\t<ng-content />\n\t\t<div [style]=\"containerStyles()\">\n\t\t\t<input\n\t\t\t\t[class]=\"inputClass()\"\n\t\t\t\tautocomplete=\"one-time-code\"\n\t\t\t\tdata-slot=\"input-otp\"\n\t\t\t\t[style]=\"inputStyles()\"\n\t\t\t\t[disabled]=\"state().disabled()\"\n\t\t\t\t[inputMode]=\"inputMode()\"\n\t\t\t\t[ngModel]=\"value()\"\n\t\t\t\t(input)=\"onInputChange($event)\"\n\t\t\t\t(paste)=\"onPaste($event)\"\n\t\t\t\t(focus)=\"focused.set(true)\"\n\t\t\t\t(blur)=\"focused.set(false)\"\n\t\t\t/>\n\t\t</div>\n\t`,\n\thost: {\n\t\t'[style]': 'hostStyles()',\n\t\t'data-input-otp-container': 'true',\n\t},\n\tproviders: [BRN_INPUT_OTP_VALUE_ACCESSOR, provideBrnInputOtp(BrnInputOtpComponent)],\n})\nexport class BrnInputOtpComponent implements ControlValueAccessor {\n\t/** Whether the input has focus. */\n\tprotected readonly focused = signal<boolean>(false);\n\n\tpublic readonly hostStyles = input<string>(\n\t\t'position: relative; cursor: text; user-select: none; pointer-events: none;',\n\t);\n\n\tpublic readonly inputStyles = input<string>(\n\t\t'position: absolute; inset: 0; width: 100%; height: 100%; display: flex; textAlign: left; opacity: 1; color: transparent; pointerEvents: all; background: transparent; caret-color: transparent; border: 0px solid transparent; outline: transparent solid 0px; box-shadow: none; line-height: 1; letter-spacing: -0.5em; font-family: monospace; font-variant-numeric: tabular-nums;',\n\t);\n\n\tpublic readonly containerStyles = input<string>('position: absolute; inset: 0; pointer-events: none;');\n\n\t/** Determine if the date picker is disabled. */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, {\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** The number of slots. */\n\tpublic readonly maxLength = input.required<number, NumberInput>({ transform: numberAttribute });\n\n\t/** Virtual keyboard appearance on mobile */\n\tpublic readonly inputMode = input<InputMode>('numeric');\n\n\tpublic readonly inputClass = input<string>('');\n\n\t/**\n\t * Defines how the pasted text should be transformed before saving to model/form.\n\t * Allows pasting text which contains extra characters like spaces, dashes, etc. and are longer than the maxLength.\n\t *\n\t * \"XXX-XXX\": (pastedText) => pastedText.replaceAll('-', '')\n\t * \"XXX XXX\": (pastedText) => pastedText.replaceAll(/\\s+/g, '')\n\t */\n\tpublic readonly transformPaste = input<(pastedText: string, maxLength: number) => string>((text) => text);\n\n\t/** The value controlling the input */\n\tpublic readonly value = model('');\n\n\tpublic readonly context = computed(() => {\n\t\tconst value = this.value();\n\t\tconst focused = this.focused();\n\t\tconst maxLength = this.maxLength();\n\t\tconst slots = Array.from({ length: this.maxLength() }).map((_, slotIndex) => {\n\t\t\tconst char = value[slotIndex] !== undefined ? value[slotIndex] : null;\n\n\t\t\tconst isActive =\n\t\t\t\tfocused && (value.length === slotIndex || (value.length === maxLength && slotIndex === maxLength - 1));\n\n\t\t\treturn {\n\t\t\t\tchar,\n\t\t\t\tisActive,\n\t\t\t\thasFakeCaret: isActive && value.length === slotIndex,\n\t\t\t};\n\t\t});\n\n\t\treturn slots;\n\t});\n\n\t/** Emitted when the input is complete, triggered through input or paste. */\n\tpublic readonly completed = output<string>();\n\n\tprotected readonly state = computed(() => ({\n\t\tdisabled: signal(this.disabled()),\n\t}));\n\n\tprotected _onChange?: ChangeFn<string>;\n\tprotected _onTouched?: TouchFn;\n\n\tprotected onInputChange(event: Event) {\n\t\tlet newValue = (event.target as HTMLInputElement).value;\n\t\tconst maxLength = this.maxLength();\n\n\t\tif (newValue.length > maxLength) {\n\t\t\t// Replace the last character when max length is exceeded\n\t\t\tnewValue = newValue.slice(0, maxLength - 1) + newValue.slice(-1);\n\t\t}\n\n\t\tthis.updateValue(newValue, maxLength);\n\t}\n\n\tprotected onPaste(event: ClipboardEvent) {\n\t\tevent.preventDefault();\n\t\tconst clipboardData = event.clipboardData?.getData('text/plain') || '';\n\n\t\tconst maxLength = this.maxLength();\n\n\t\tconst content = this.transformPaste()(clipboardData, maxLength);\n\t\tconst newValue = content.slice(0, maxLength);\n\n\t\tthis.updateValue(newValue, maxLength);\n\t}\n\n\t/** CONTROL VALUE ACCESSOR */\n\twriteValue(value: string | null): void {\n\t\t// optional FormControl is initialized with null value\n\t\tif (value === null) return;\n\n\t\tthis.updateValue(value, this.maxLength());\n\t}\n\n\tregisterOnChange(fn: ChangeFn<string>): void {\n\t\tthis._onChange = fn;\n\t}\n\n\tregisterOnTouched(fn: TouchFn): void {\n\t\tthis._onTouched = fn;\n\t}\n\n\tsetDisabledState(isDisabled: boolean): void {\n\t\tthis.state().disabled.set(isDisabled);\n\t}\n\n\tprivate isCompleted(newValue: string, previousValue: string, maxLength: number) {\n\t\treturn newValue !== previousValue && previousValue.length < maxLength && newValue.length === maxLength;\n\t}\n\n\tprivate updateValue(newValue: string, maxLength: number) {\n\t\tconst previousValue = this.value();\n\n\t\tthis.value.set(newValue);\n\t\tthis._onChange?.(newValue);\n\n\t\tif (this.isCompleted(newValue, previousValue, maxLength)) {\n\t\t\tthis.completed.emit(newValue);\n\t\t}\n\t}\n}\n","import { NgModule } from '@angular/core';\nimport { BrnInputOtpSlotComponent } from './lib/brn-input-otp-slot.component';\nimport { BrnInputOtpComponent } from './lib/brn-input-otp.component';\n\nexport * from './lib/brn-input-otp-slot.component';\nexport * from './lib/brn-input-otp.component';\n\n@NgModule({\n\timports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],\n\texports: [BrnInputOtpComponent, BrnInputOtpSlotComponent],\n})\nexport class BrnInputOtpModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;AAGO,MAAM,gBAAgB,GAAG,IAAI,cAAc,CAAuB,kBAAkB,CAAC;SAE5E,iBAAiB,GAAA;AAChC,IAAA,OAAO,MAAM,CAAC,gBAAgB,CAAyB;AACxD;AAEM,SAAU,kBAAkB,CAAC,QAAoC,EAAA;IACtE,OAAO,EAAE,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,QAAQ,EAAE;AAC5D;;MCOa,wBAAwB,CAAA;;IAEjB,QAAQ,GAAG,iBAAiB,EAAE;IAEjC,KAAK,GAAG,KAAK,CAAC,QAAQ,CAAsB,EAAE,SAAS,EAAE,eAAe,EAAE,CAAC;AAE3E,IAAA,IAAI,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC;0HANhE,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,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eAAA,CAAA,QAAA,EAAA,CAAA;AAAjB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHnB,oBAAoB,EAAE,wBAAwB,CAC9C,EAAA,OAAA,EAAA,CAAA,oBAAoB,EAAE,wBAAwB,CAAA,EAAA,CAAA;AAE5C,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,iBAAiB,YAHnB,oBAAoB,CAAA,EAAA,CAAA;;2FAGlB,iBAAiB,EAAA,UAAA,EAAA,CAAA;kBAJ7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;AACzD,oBAAA,OAAO,EAAE,CAAC,oBAAoB,EAAE,wBAAwB,CAAC;AACzD,iBAAA;;;ACVD;;AAEG;;;;"}
@@ -402,7 +402,10 @@ class BrnTooltipTriggerDirective {
402
402
  transform: numberAttribute,
403
403
  });
404
404
  /** The default delay in ms before hiding the tooltip after hide is called */
405
- tooltipContentClasses = input(this._defaultOptions?.tooltipContentClasses ?? '');
405
+ _tooltipContentClasses = input(this._defaultOptions?.tooltipContentClasses ?? '', {
406
+ alias: 'tooltipContentClasses',
407
+ });
408
+ tooltipContentClasses = computed(() => signal(this._tooltipContentClasses()));
406
409
  /**
407
410
  * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
408
411
  * uses a long press gesture to show and hide, however it can conflict with the native browser
@@ -419,7 +422,8 @@ class BrnTooltipTriggerDirective {
419
422
  */
420
423
  touchGestures = input(this._defaultOptions?.touchGestures ?? 'auto');
421
424
  /** The message to be used to describe the aria in the tooltip */
422
- ariaDescribedBy = input('', { alias: 'aria-describedby' });
425
+ _ariaDescribedBy = input('', { alias: 'aria-describedby' });
426
+ ariaDescribedBy = computed(() => signal(this._ariaDescribedBy()));
423
427
  ariaDescribedByPrevious = computedPrevious(this.ariaDescribedBy);
424
428
  /** The content to be displayed in the tooltip */
425
429
  brnTooltipTrigger = input(null);
@@ -445,6 +449,12 @@ class BrnTooltipTriggerDirective {
445
449
  this._initExitAnimationDurationEffect();
446
450
  this._initHideDelayEffect();
447
451
  }
452
+ setTooltipContentClasses(tooltipContentClasses) {
453
+ this.tooltipContentClasses().set(tooltipContentClasses);
454
+ }
455
+ setAriaDescribedBy(ariaDescribedBy) {
456
+ this.ariaDescribedBy().set(ariaDescribedBy);
457
+ }
448
458
  _initPositionEffect() {
449
459
  effect(() => {
450
460
  if (this._overlayRef) {
@@ -476,14 +486,14 @@ class BrnTooltipTriggerDirective {
476
486
  _initTooltipContentClassesEffect() {
477
487
  effect(() => {
478
488
  if (this._tooltipInstance) {
479
- this._tooltipInstance._tooltipClasses.set(this.tooltipContentClasses() ?? '');
489
+ this._tooltipInstance._tooltipClasses.set(this.tooltipContentClasses()() ?? '');
480
490
  }
481
491
  });
482
492
  }
483
493
  _initAriaDescribedByPreviousEffect() {
484
494
  effect(() => {
485
- const ariaDescribedBy = this.ariaDescribedBy();
486
- this._ariaDescriber.removeDescription(this._elementRef.nativeElement, untracked(() => this.ariaDescribedByPrevious()), 'tooltip');
495
+ const ariaDescribedBy = this.ariaDescribedBy()();
496
+ this._ariaDescriber.removeDescription(this._elementRef.nativeElement, untracked(() => this.ariaDescribedByPrevious()()), 'tooltip');
487
497
  if (ariaDescribedBy && !this._isTooltipVisible()) {
488
498
  this._ngZone.runOutsideAngular(() => {
489
499
  // The `AriaDescriber` has some functionality that avoids adding a description if it's the
@@ -561,7 +571,7 @@ class BrnTooltipTriggerDirective {
561
571
  this._passiveListeners.length = 0;
562
572
  this._destroyed.next();
563
573
  this._destroyed.complete();
564
- this._ariaDescriber.removeDescription(nativeElement, this.ariaDescribedBy(), 'tooltip');
574
+ this._ariaDescriber.removeDescription(nativeElement, this.ariaDescribedBy()(), 'tooltip');
565
575
  this._focusMonitor.stopMonitoring(nativeElement);
566
576
  }
567
577
  /** Shows the tooltip after the delay in ms, defaults to tooltip-delay-show or 0ms if no input */
@@ -576,7 +586,7 @@ class BrnTooltipTriggerDirective {
576
586
  const instance = (this._tooltipInstance = overlayRef.attach(this._portal).instance);
577
587
  instance._triggerElement = this._elementRef.nativeElement;
578
588
  instance._mouseLeaveHideDelay = this.hideDelay();
579
- instance._tooltipClasses.set(this.tooltipContentClasses());
589
+ instance._tooltipClasses.set(this.tooltipContentClasses()());
580
590
  instance._exitAnimationDuration = this.exitAnimationDuration();
581
591
  instance.side.set(this._currentPosition ?? 'above');
582
592
  instance.afterHidden.pipe(takeUntil(this._destroyed)).subscribe(() => this._detach());
@@ -918,7 +928,7 @@ class BrnTooltipTriggerDirective {
918
928
  }
919
929
  }
920
930
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnTooltipTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
921
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: BrnTooltipTriggerDirective, isStandalone: true, selector: "[brnTooltipTrigger]", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, positionAtOrigin: { classPropertyName: "positionAtOrigin", publicName: "positionAtOrigin", isSignal: true, isRequired: false, transformFunction: null }, brnTooltipDisabled: { classPropertyName: "brnTooltipDisabled", publicName: "brnTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "showDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "hideDelay", isSignal: true, isRequired: false, transformFunction: null }, exitAnimationDuration: { classPropertyName: "exitAnimationDuration", publicName: "exitAnimationDuration", isSignal: true, isRequired: false, transformFunction: null }, tooltipContentClasses: { classPropertyName: "tooltipContentClasses", publicName: "tooltipContentClasses", isSignal: true, isRequired: false, transformFunction: null }, touchGestures: { classPropertyName: "touchGestures", publicName: "touchGestures", isSignal: true, isRequired: false, transformFunction: null }, ariaDescribedBy: { classPropertyName: "ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, brnTooltipTrigger: { classPropertyName: "brnTooltipTrigger", publicName: "brnTooltipTrigger", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.brn-tooltip-disabled": "brnTooltipDisabled()" }, classAttribute: "brn-tooltip-trigger" }, providers: [BRN_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], exportAs: ["brnTooltipTrigger"], ngImport: i0 });
931
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.1", type: BrnTooltipTriggerDirective, isStandalone: true, selector: "[brnTooltipTrigger]", inputs: { position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, positionAtOrigin: { classPropertyName: "positionAtOrigin", publicName: "positionAtOrigin", isSignal: true, isRequired: false, transformFunction: null }, brnTooltipDisabled: { classPropertyName: "brnTooltipDisabled", publicName: "brnTooltipDisabled", isSignal: true, isRequired: false, transformFunction: null }, showDelay: { classPropertyName: "showDelay", publicName: "showDelay", isSignal: true, isRequired: false, transformFunction: null }, hideDelay: { classPropertyName: "hideDelay", publicName: "hideDelay", isSignal: true, isRequired: false, transformFunction: null }, exitAnimationDuration: { classPropertyName: "exitAnimationDuration", publicName: "exitAnimationDuration", isSignal: true, isRequired: false, transformFunction: null }, _tooltipContentClasses: { classPropertyName: "_tooltipContentClasses", publicName: "tooltipContentClasses", isSignal: true, isRequired: false, transformFunction: null }, touchGestures: { classPropertyName: "touchGestures", publicName: "touchGestures", isSignal: true, isRequired: false, transformFunction: null }, _ariaDescribedBy: { classPropertyName: "_ariaDescribedBy", publicName: "aria-describedby", isSignal: true, isRequired: false, transformFunction: null }, brnTooltipTrigger: { classPropertyName: "brnTooltipTrigger", publicName: "brnTooltipTrigger", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "class.brn-tooltip-disabled": "brnTooltipDisabled()" }, classAttribute: "brn-tooltip-trigger" }, providers: [BRN_TOOLTIP_SCROLL_STRATEGY_FACTORY_PROVIDER], exportAs: ["brnTooltipTrigger"], ngImport: i0 });
922
932
  }
923
933
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.1", ngImport: i0, type: BrnTooltipTriggerDirective, decorators: [{
924
934
  type: Directive,
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-tooltip.mjs","sources":["../../../../libs/brain/tooltip/src/lib/brn-tooltip-content.component.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip.directive.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-content.directive.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip.token.ts","../../../../libs/brain/tooltip/src/lib/computed-previous.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-trigger.directive.ts","../../../../libs/brain/tooltip/src/index.ts","../../../../libs/brain/tooltip/src/spartan-ng-brain-tooltip.ts"],"sourcesContent":["/**\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 BrnTooltipContentComponent 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 _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, type TemplateRef, signal } from '@angular/core';\n\n@Directive({\n\tselector: '[brnTooltip]',\n\tstandalone: true,\n})\nexport class BrnTooltipDirective {\n\tpublic readonly tooltipTemplate = signal<TemplateRef<unknown> | null>(null);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { BrnTooltipDirective } from './brn-tooltip.directive';\n\n@Directive({\n\tselector: '[brnTooltipContent]',\n\tstandalone: true,\n})\nexport class BrnTooltipContentDirective {\n\tprivate readonly _brnTooltipDirective = inject(BrnTooltipDirective, { 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, ValueProvider } from '@angular/core';\nimport { TooltipPosition, TooltipTouchGestures } from './brn-tooltip-trigger.directive';\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","import { computed, type Signal, untracked } from '@angular/core';\n\n/**\n * Returns a signal that emits the previous value of the given signal.\n * The first time the signal is emitted, the previous value will be the same as the current value.\n *\n * @example\n * ```ts\n * const value = signal(0);\n * const previous = computedPrevious(value);\n *\n * effect(() => {\n * console.log('Current value:', value());\n * console.log('Previous value:', previous());\n * });\n *\n * Logs:\n * // Current value: 0\n * // Previous value: 0\n *\n * value.set(1);\n *\n * Logs:\n * // Current value: 1\n * // Previous value: 0\n *\n * value.set(2);\n *\n * Logs:\n * // Current value: 2\n * // Previous value: 1\n *```\n *\n * @param computation Signal to compute previous value for\n * @returns Signal that emits previous value of `s`\n */\nexport function computedPrevious<T>(computation: Signal<T>): Signal<T> {\n\tlet current = null as T;\n\tlet previous = untracked(() => computation()); // initial value is the current value\n\n\treturn computed(() => {\n\t\tcurrent = computation();\n\t\tconst result = previous;\n\t\tprevious = current;\n\t\treturn result;\n\t});\n}\n","/**\n * We are building on shoulders of giants here and adapt the implementation provided by the incredible Angular\n * team: https://github.com/angular/components/blob/main/src/material/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\ttype TemplateRef,\n\tuntracked,\n\tViewContainerRef,\n} from '@angular/core';\nimport { brnDevMode } from '@spartan-ng/brain/core';\nimport { Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { BrnTooltipContentComponent } from './brn-tooltip-content.component';\nimport { BrnTooltipDirective } from './brn-tooltip.directive';\nimport { injectBrnTooltipDefaultOptions } from './brn-tooltip.token';\nimport { computedPrevious } from './computed-previous';\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\tstandalone: true,\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 BrnTooltipTriggerDirective implements OnDestroy, AfterViewInit {\n\tprivate readonly _tooltipDirective = inject(BrnTooltipDirective, { optional: true });\n\tprivate readonly _tooltipComponent = BrnTooltipContentComponent;\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<BrnTooltipContentComponent>;\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: BrnTooltipContentComponent | 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\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 ariaDescribedByPrevious = computedPrevious(this.ariaDescribedBy);\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\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.tooltipContentClasses() ?? '');\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initAriaDescribedByPreviousEffect(): void {\n\t\teffect(() => {\n\t\t\tconst ariaDescribedBy = this.ariaDescribedBy();\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.ariaDescribedBy()) {\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.ariaDescribedBy(), '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.tooltipContentClasses());\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 { NgModule } from '@angular/core';\nimport { BrnTooltipContentComponent } from './lib/brn-tooltip-content.component';\nimport { BrnTooltipContentDirective } from './lib/brn-tooltip-content.directive';\nimport { BrnTooltipTriggerDirective } from './lib/brn-tooltip-trigger.directive';\nimport { BrnTooltipDirective } from './lib/brn-tooltip.directive';\n\nexport * from './lib/brn-tooltip-content.component';\nexport * from './lib/brn-tooltip-content.directive';\nexport * from './lib/brn-tooltip-trigger.directive';\nexport * from './lib/brn-tooltip.directive';\nexport * from './lib/brn-tooltip.token';\n\nexport const BrnTooltipImports = [\n\tBrnTooltipDirective,\n\tBrnTooltipContentDirective,\n\tBrnTooltipTriggerDirective,\n\tBrnTooltipContentComponent,\n] as const;\n\n@NgModule({\n\timports: [...BrnTooltipImports],\n\texports: [...BrnTooltipImports],\n})\nexport class BrnTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;;;;;AAAA;;;;AAIG;AAmBH;;;AAGG;MA6BU,0BAA0B,CAAA;AACrB,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,eAAe,GAAG,MAAM,CAAC,EAAE,CAAC;AAC5B,IAAA,IAAI,GAAG,MAAM,CAAC,OAAO,CAAC;;IAE/B,OAAO,GAAyC,IAAI;;AAGnD,IAAA,cAAc;;AAEd,IAAA,cAAc;;AAEd,IAAA,iBAAiB;;AAGlB,IAAA,eAAe;;IAGf,oBAAoB,GAAG,CAAC;;IAExB,sBAAsB,GAAG,CAAC;;AAG1B,IAAA,QAAQ,GAAG,SAAS,CAAC,SAAS,EAAE,EAAE,IAAI,GAAE,UAAuB,CAAA,EAAE,CAAC;;IAGjE,mBAAmB,GAAG,KAAK;;IAG3B,UAAU,GAAG,KAAK;;AAGT,IAAA,OAAO,GAAkB,IAAI,OAAO,EAAE;AACvC,IAAA,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,YAAY,EAAE;AAEzD;;;AAGG;AACH,IAAA,IAAI,CAAC,KAAa,EAAA;;AAEjB,QAAA,IAAI,IAAI,CAAC,cAAc,KAAK,IAAI,EAAE;AACjC,YAAA,YAAY,CAAC,IAAI,CAAC,cAAc,CAAC;;AAElC,QAAA,IAA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AAA,CAAA;kBAVtC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,qBAAqB;AAC/B,oBAAA,UAAU,EAAE,IAAI;AAChB,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;;;AC5FY,MAAA,iBAAiB,GAAG;IAChC,mBAAmB;IACnB,0BAA0B;IAC1B,0BAA0B;IAC1B,0BAA0B;;MAOd,gBAAgB,CAAA;0HAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAhB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAV5B,mBAAmB;YACnB,0BAA0B;YAC1B,0BAA0B;AAC1B,YAAA,0BAA0B,aAH1B,mBAAmB;YACnB,0BAA0B;YAC1B,0BAA0B;YAC1B,0BAA0B,CAAA,EAAA,CAAA;2HAOd,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,iBAAA;;;ACtBD;;AAEG;;;;"}
1
+ {"version":3,"file":"spartan-ng-brain-tooltip.mjs","sources":["../../../../libs/brain/tooltip/src/lib/brn-tooltip-content.component.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip.directive.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-content.directive.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip.token.ts","../../../../libs/brain/tooltip/src/lib/computed-previous.ts","../../../../libs/brain/tooltip/src/lib/brn-tooltip-trigger.directive.ts","../../../../libs/brain/tooltip/src/index.ts","../../../../libs/brain/tooltip/src/spartan-ng-brain-tooltip.ts"],"sourcesContent":["/**\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 BrnTooltipContentComponent 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 _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, type TemplateRef, signal } from '@angular/core';\n\n@Directive({\n\tselector: '[brnTooltip]',\n\tstandalone: true,\n})\nexport class BrnTooltipDirective {\n\tpublic readonly tooltipTemplate = signal<TemplateRef<unknown> | null>(null);\n}\n","import { Directive, TemplateRef, inject } from '@angular/core';\nimport { BrnTooltipDirective } from './brn-tooltip.directive';\n\n@Directive({\n\tselector: '[brnTooltipContent]',\n\tstandalone: true,\n})\nexport class BrnTooltipContentDirective {\n\tprivate readonly _brnTooltipDirective = inject(BrnTooltipDirective, { 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, ValueProvider } from '@angular/core';\nimport { TooltipPosition, TooltipTouchGestures } from './brn-tooltip-trigger.directive';\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","import { computed, type Signal, untracked } from '@angular/core';\n\n/**\n * Returns a signal that emits the previous value of the given signal.\n * The first time the signal is emitted, the previous value will be the same as the current value.\n *\n * @example\n * ```ts\n * const value = signal(0);\n * const previous = computedPrevious(value);\n *\n * effect(() => {\n * console.log('Current value:', value());\n * console.log('Previous value:', previous());\n * });\n *\n * Logs:\n * // Current value: 0\n * // Previous value: 0\n *\n * value.set(1);\n *\n * Logs:\n * // Current value: 1\n * // Previous value: 0\n *\n * value.set(2);\n *\n * Logs:\n * // Current value: 2\n * // Previous value: 1\n *```\n *\n * @param computation Signal to compute previous value for\n * @returns Signal that emits previous value of `s`\n */\nexport function computedPrevious<T>(computation: Signal<T>): Signal<T> {\n\tlet current = null as T;\n\tlet previous = untracked(() => computation()); // initial value is the current value\n\n\treturn computed(() => {\n\t\tcurrent = computation();\n\t\tconst result = previous;\n\t\tprevious = current;\n\t\treturn result;\n\t});\n}\n","/**\n * We are building on shoulders of giants here and adapt the implementation provided by the incredible Angular\n * team: https://github.com/angular/components/blob/main/src/material/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 } from '@spartan-ng/brain/core';\nimport { Subject } from 'rxjs';\nimport { take, takeUntil } from 'rxjs/operators';\nimport { BrnTooltipContentComponent } from './brn-tooltip-content.component';\nimport { BrnTooltipDirective } from './brn-tooltip.directive';\nimport { injectBrnTooltipDefaultOptions } from './brn-tooltip.token';\nimport { computedPrevious } from './computed-previous';\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\tstandalone: true,\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 BrnTooltipTriggerDirective implements OnDestroy, AfterViewInit {\n\tprivate readonly _tooltipDirective = inject(BrnTooltipDirective, { optional: true });\n\tprivate readonly _tooltipComponent = BrnTooltipContentComponent;\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<BrnTooltipContentComponent>;\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: BrnTooltipContentComponent | 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 tooltipContentClasses = 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 ariaDescribedBy = computed(() => signal(this._ariaDescribedBy()));\n\tpublic readonly ariaDescribedByPrevious = computedPrevious(this.ariaDescribedBy);\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.tooltipContentClasses().set(tooltipContentClasses);\n\t}\n\tsetAriaDescribedBy(ariaDescribedBy: string) {\n\t\tthis.ariaDescribedBy().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.tooltipContentClasses()() ?? '');\n\t\t\t}\n\t\t});\n\t}\n\n\tprivate _initAriaDescribedByPreviousEffect(): void {\n\t\teffect(() => {\n\t\t\tconst ariaDescribedBy = this.ariaDescribedBy()();\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.ariaDescribedBy()) {\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.ariaDescribedBy()(), '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.tooltipContentClasses()());\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 { NgModule } from '@angular/core';\nimport { BrnTooltipContentComponent } from './lib/brn-tooltip-content.component';\nimport { BrnTooltipContentDirective } from './lib/brn-tooltip-content.directive';\nimport { BrnTooltipTriggerDirective } from './lib/brn-tooltip-trigger.directive';\nimport { BrnTooltipDirective } from './lib/brn-tooltip.directive';\n\nexport * from './lib/brn-tooltip-content.component';\nexport * from './lib/brn-tooltip-content.directive';\nexport * from './lib/brn-tooltip-trigger.directive';\nexport * from './lib/brn-tooltip.directive';\nexport * from './lib/brn-tooltip.token';\n\nexport const BrnTooltipImports = [\n\tBrnTooltipDirective,\n\tBrnTooltipContentDirective,\n\tBrnTooltipTriggerDirective,\n\tBrnTooltipContentComponent,\n] as const;\n\n@NgModule({\n\timports: [...BrnTooltipImports],\n\texports: [...BrnTooltipImports],\n})\nexport class BrnTooltipModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;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AO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,iBAAA;;;ACtBD;;AAEG;;;;"}
@@ -63,9 +63,14 @@ module.exports = {
63
63
  transform: 'translateX(100%) scaleX(0.5)',
64
64
  },
65
65
  },
66
+ 'caret-blink': {
67
+ '0%,70%,100%': { opacity: '1' },
68
+ '20%,50%': { opacity: '0' },
69
+ },
66
70
  },
67
71
  animation: {
68
72
  indeterminate: 'indeterminate 4s infinite ease-in-out',
73
+ 'caret-blink': 'caret-blink 1.25s ease-out infinite',
69
74
  },
70
75
  },
71
76
  },
@@ -0,0 +1,3 @@
1
+ # @spartan-ng/brain/input-otp
2
+
3
+ Secondary entry point of `@spartan-ng/brain`. It can be used by importing from `@spartan-ng/brain/input-otp`.
@@ -0,0 +1,10 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./lib/brn-input-otp.component";
3
+ import * as i2 from "./lib/brn-input-otp-slot.component";
4
+ export * from './lib/brn-input-otp-slot.component';
5
+ export * from './lib/brn-input-otp.component';
6
+ export declare class BrnInputOtpModule {
7
+ static ɵfac: i0.ɵɵFactoryDeclaration<BrnInputOtpModule, never>;
8
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BrnInputOtpModule, never, [typeof i1.BrnInputOtpComponent, typeof i2.BrnInputOtpSlotComponent], [typeof i1.BrnInputOtpComponent, typeof i2.BrnInputOtpSlotComponent]>;
9
+ static ɵinj: i0.ɵɵInjectorDeclaration<BrnInputOtpModule>;
10
+ }
@@ -0,0 +1,14 @@
1
+ import { NumberInput } from '@angular/cdk/coercion';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BrnInputOtpSlotComponent {
4
+ /** Access the input-otp component */
5
+ protected readonly inputOtp: import("@spartan-ng/brain/input-otp").BrnInputOtpComponent;
6
+ readonly index: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
7
+ readonly slot: import("@angular/core").Signal<{
8
+ char: string | null;
9
+ isActive: boolean;
10
+ hasFakeCaret: boolean;
11
+ }>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<BrnInputOtpSlotComponent, never>;
13
+ static ɵcmp: i0.ɵɵComponentDeclaration<BrnInputOtpSlotComponent, "brn-input-otp-slot", never, { "index": { "alias": "index"; "required": true; "isSignal": true; }; }, {}, never, ["*"], true, never>;
14
+ }
@@ -0,0 +1,57 @@
1
+ import { BooleanInput, NumberInput } from '@angular/cdk/coercion';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { ChangeFn, TouchFn } from '@spartan-ng/brain/forms';
4
+ import * as i0 from "@angular/core";
5
+ export declare const BRN_INPUT_OTP_VALUE_ACCESSOR: {
6
+ provide: import("@angular/core").InjectionToken<readonly ControlValueAccessor[]>;
7
+ useExisting: import("@angular/core").Type<any>;
8
+ multi: boolean;
9
+ };
10
+ export type InputMode = 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search';
11
+ export declare class BrnInputOtpComponent implements ControlValueAccessor {
12
+ /** Whether the input has focus. */
13
+ protected readonly focused: import("@angular/core").WritableSignal<boolean>;
14
+ readonly hostStyles: import("@angular/core").InputSignal<string>;
15
+ readonly inputStyles: import("@angular/core").InputSignal<string>;
16
+ readonly containerStyles: import("@angular/core").InputSignal<string>;
17
+ /** Determine if the date picker is disabled. */
18
+ readonly disabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
19
+ /** The number of slots. */
20
+ readonly maxLength: import("@angular/core").InputSignalWithTransform<number, NumberInput>;
21
+ /** Virtual keyboard appearance on mobile */
22
+ readonly inputMode: import("@angular/core").InputSignal<InputMode>;
23
+ readonly inputClass: import("@angular/core").InputSignal<string>;
24
+ /**
25
+ * Defines how the pasted text should be transformed before saving to model/form.
26
+ * Allows pasting text which contains extra characters like spaces, dashes, etc. and are longer than the maxLength.
27
+ *
28
+ * "XXX-XXX": (pastedText) => pastedText.replaceAll('-', '')
29
+ * "XXX XXX": (pastedText) => pastedText.replaceAll(/\s+/g, '')
30
+ */
31
+ readonly transformPaste: import("@angular/core").InputSignal<(pastedText: string, maxLength: number) => string>;
32
+ /** The value controlling the input */
33
+ readonly value: import("@angular/core").ModelSignal<string>;
34
+ readonly context: import("@angular/core").Signal<{
35
+ char: string | null;
36
+ isActive: boolean;
37
+ hasFakeCaret: boolean;
38
+ }[]>;
39
+ /** Emitted when the input is complete, triggered through input or paste. */
40
+ readonly completed: import("@angular/core").OutputEmitterRef<string>;
41
+ protected readonly state: import("@angular/core").Signal<{
42
+ disabled: import("@angular/core").WritableSignal<boolean>;
43
+ }>;
44
+ protected _onChange?: ChangeFn<string>;
45
+ protected _onTouched?: TouchFn;
46
+ protected onInputChange(event: Event): void;
47
+ protected onPaste(event: ClipboardEvent): void;
48
+ /** CONTROL VALUE ACCESSOR */
49
+ writeValue(value: string | null): void;
50
+ registerOnChange(fn: ChangeFn<string>): void;
51
+ registerOnTouched(fn: TouchFn): void;
52
+ setDisabledState(isDisabled: boolean): void;
53
+ private isCompleted;
54
+ private updateValue;
55
+ static ɵfac: i0.ɵɵFactoryDeclaration<BrnInputOtpComponent, never>;
56
+ static ɵcmp: i0.ɵɵComponentDeclaration<BrnInputOtpComponent, "brn-input-otp", never, { "hostStyles": { "alias": "hostStyles"; "required": false; "isSignal": true; }; "inputStyles": { "alias": "inputStyles"; "required": false; "isSignal": true; }; "containerStyles": { "alias": "containerStyles"; "required": false; "isSignal": true; }; "disabled": { "alias": "disabled"; "required": false; "isSignal": true; }; "maxLength": { "alias": "maxLength"; "required": true; "isSignal": true; }; "inputMode": { "alias": "inputMode"; "required": false; "isSignal": true; }; "inputClass": { "alias": "inputClass"; "required": false; "isSignal": true; }; "transformPaste": { "alias": "transformPaste"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "value": "valueChange"; "completed": "completed"; }, never, ["*"], true, never>;
57
+ }
@@ -0,0 +1,5 @@
1
+ import { ExistingProvider, InjectionToken, Type } from '@angular/core';
2
+ import { BrnInputOtpComponent } from './brn-input-otp.component';
3
+ export declare const BrnInputOtpToken: InjectionToken<BrnInputOtpComponent>;
4
+ export declare function injectBrnInputOtp(): BrnInputOtpComponent;
5
+ export declare function provideBrnInputOtp(inputOtp: Type<BrnInputOtpComponent>): ExistingProvider;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spartan-ng/brain",
3
- "version": "0.0.1-alpha.438",
3
+ "version": "0.0.1-alpha.439",
4
4
  "sideEffects": false,
5
5
  "exports": {
6
6
  "./hlm-tailwind-preset": {
@@ -70,6 +70,10 @@
70
70
  "types": "./hover-card/index.d.ts",
71
71
  "default": "./fesm2022/spartan-ng-brain-hover-card.mjs"
72
72
  },
73
+ "./input-otp": {
74
+ "types": "./input-otp/index.d.ts",
75
+ "default": "./fesm2022/spartan-ng-brain-input-otp.mjs"
76
+ },
73
77
  "./label": {
74
78
  "types": "./label/index.d.ts",
75
79
  "default": "./fesm2022/spartan-ng-brain-label.mjs"
@@ -51,7 +51,8 @@ export declare class BrnTooltipTriggerDirective implements OnDestroy, AfterViewI
51
51
  /** The default duration in ms that exit animation takes before hiding */
52
52
  readonly exitAnimationDuration: import("@angular/core").InputSignalWithTransform<number, unknown>;
53
53
  /** The default delay in ms before hiding the tooltip after hide is called */
54
- readonly tooltipContentClasses: import("@angular/core").InputSignal<string>;
54
+ readonly _tooltipContentClasses: import("@angular/core").InputSignal<string>;
55
+ readonly tooltipContentClasses: import("@angular/core").Signal<import("@angular/core").WritableSignal<string>>;
55
56
  /**
56
57
  * How touch gestures should be handled by the tooltip. On touch devices the tooltip directive
57
58
  * uses a long press gesture to show and hide, however it can conflict with the native browser
@@ -68,12 +69,15 @@ export declare class BrnTooltipTriggerDirective implements OnDestroy, AfterViewI
68
69
  */
69
70
  readonly touchGestures: import("@angular/core").InputSignal<TooltipTouchGestures>;
70
71
  /** The message to be used to describe the aria in the tooltip */
71
- readonly ariaDescribedBy: import("@angular/core").InputSignal<string>;
72
- readonly ariaDescribedByPrevious: import("@angular/core").Signal<string>;
72
+ readonly _ariaDescribedBy: import("@angular/core").InputSignal<string>;
73
+ readonly ariaDescribedBy: import("@angular/core").Signal<import("@angular/core").WritableSignal<string>>;
74
+ readonly ariaDescribedByPrevious: import("@angular/core").Signal<import("@angular/core").WritableSignal<string>>;
73
75
  /** The content to be displayed in the tooltip */
74
76
  readonly brnTooltipTrigger: import("@angular/core").InputSignal<string | TemplateRef<unknown> | null>;
75
77
  readonly brnTooltipTriggerState: import("@angular/core").Signal<string | TemplateRef<unknown> | null>;
76
78
  constructor();
79
+ setTooltipContentClasses(tooltipContentClasses: string): void;
80
+ setAriaDescribedBy(ariaDescribedBy: string): void;
77
81
  private _initPositionEffect;
78
82
  private _initBrnTooltipDisabledEffect;
79
83
  private _initPositionAtOriginEffect;
@@ -133,5 +137,5 @@ export declare class BrnTooltipTriggerDirective implements OnDestroy, AfterViewI
133
137
  /** Disables the native browser gestures, based on how the tooltip has been configured. */
134
138
  private _disableNativeGesturesIfNecessary;
135
139
  static ɵfac: i0.ɵɵFactoryDeclaration<BrnTooltipTriggerDirective, never>;
136
- static ɵdir: i0.ɵɵDirectiveDeclaration<BrnTooltipTriggerDirective, "[brnTooltipTrigger]", ["brnTooltipTrigger"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; "positionAtOrigin": { "alias": "positionAtOrigin"; "required": false; "isSignal": true; }; "brnTooltipDisabled": { "alias": "brnTooltipDisabled"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; "exitAnimationDuration": { "alias": "exitAnimationDuration"; "required": false; "isSignal": true; }; "tooltipContentClasses": { "alias": "tooltipContentClasses"; "required": false; "isSignal": true; }; "touchGestures": { "alias": "touchGestures"; "required": false; "isSignal": true; }; "ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "brnTooltipTrigger": { "alias": "brnTooltipTrigger"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
140
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BrnTooltipTriggerDirective, "[brnTooltipTrigger]", ["brnTooltipTrigger"], { "position": { "alias": "position"; "required": false; "isSignal": true; }; "positionAtOrigin": { "alias": "positionAtOrigin"; "required": false; "isSignal": true; }; "brnTooltipDisabled": { "alias": "brnTooltipDisabled"; "required": false; "isSignal": true; }; "showDelay": { "alias": "showDelay"; "required": false; "isSignal": true; }; "hideDelay": { "alias": "hideDelay"; "required": false; "isSignal": true; }; "exitAnimationDuration": { "alias": "exitAnimationDuration"; "required": false; "isSignal": true; }; "_tooltipContentClasses": { "alias": "tooltipContentClasses"; "required": false; "isSignal": true; }; "touchGestures": { "alias": "touchGestures"; "required": false; "isSignal": true; }; "_ariaDescribedBy": { "alias": "aria-describedby"; "required": false; "isSignal": true; }; "brnTooltipTrigger": { "alias": "brnTooltipTrigger"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>;
137
141
  }