@spartan-ng/brain 0.0.1-alpha.489 → 0.0.1-alpha.491
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/avatar/lib/brn-avatar.component.d.ts +2 -2
- package/calendar/lib/brn-calendar-cell-button.directive.d.ts +2 -2
- package/calendar/lib/brn-calendar-grid.directive.d.ts +1 -1
- package/calendar/lib/brn-calendar-next-button.directive.d.ts +1 -1
- package/calendar/lib/brn-calendar-previous-button.directive.d.ts +1 -1
- package/calendar/lib/brn-calendar-week.directive.d.ts +1 -1
- package/calendar/lib/brn-calendar-weekday.directive.d.ts +1 -1
- package/calendar/lib/brn-calendar.directive.d.ts +3 -3
- package/calendar/lib/mode/brn-calendar-multiple.directive.d.ts +3 -3
- package/checkbox/lib/brn-checkbox.component.d.ts +3 -3
- package/collapsible/lib/brn-collapsible-content.component.d.ts +3 -3
- package/collapsible/lib/brn-collapsible-trigger.directive.d.ts +1 -1
- package/command/lib/brn-command-group.directive.d.ts +1 -1
- package/command/lib/brn-command-item.directive.d.ts +1 -1
- package/dialog/lib/brn-dialog-description.directive.d.ts +1 -1
- package/dialog/lib/brn-dialog-title.directive.d.ts +1 -1
- package/dialog/lib/brn-dialog.component.d.ts +1 -1
- package/fesm2022/spartan-ng-brain-avatar.mjs +4 -4
- package/fesm2022/spartan-ng-brain-avatar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-calendar.mjs +80 -80
- package/fesm2022/spartan-ng-brain-calendar.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-checkbox.mjs +30 -30
- package/fesm2022/spartan-ng-brain-checkbox.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-collapsible.mjs +22 -22
- package/fesm2022/spartan-ng-brain-collapsible.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-command.mjs +10 -9
- package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-dialog.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-hover-card.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-input-otp.mjs +18 -18
- package/fesm2022/spartan-ng-brain-input-otp.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-menu.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-progress.mjs +8 -8
- package/fesm2022/spartan-ng-brain-progress.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-radio-group.mjs +33 -33
- package/fesm2022/spartan-ng-brain-radio-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-select.mjs +44 -43
- package/fesm2022/spartan-ng-brain-select.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-separator.mjs +5 -5
- package/fesm2022/spartan-ng-brain-separator.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-sheet.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-slider.mjs +34 -35
- package/fesm2022/spartan-ng-brain-slider.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-switch.mjs +28 -28
- package/fesm2022/spartan-ng-brain-switch.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tabs.mjs +51 -50
- package/fesm2022/spartan-ng-brain-tabs.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle-group.mjs +13 -13
- package/fesm2022/spartan-ng-brain-toggle-group.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-toggle.mjs +4 -4
- package/fesm2022/spartan-ng-brain-toggle.mjs.map +1 -1
- package/fesm2022/spartan-ng-brain-tooltip.mjs +31 -31
- package/fesm2022/spartan-ng-brain-tooltip.mjs.map +1 -1
- package/hover-card/lib/brn-hover-card-content.service.d.ts +5 -5
- package/input-otp/lib/brn-input-otp-slot.component.d.ts +2 -2
- package/input-otp/lib/brn-input-otp.component.d.ts +2 -2
- package/menu/lib/brn-context-menu-trigger.directive.d.ts +2 -2
- package/package.json +1 -1
- package/progress/lib/brn-progress-indicator.component.d.ts +1 -1
- package/progress/lib/brn-progress.component.d.ts +2 -2
- package/radio-group/lib/brn-radio-group.directive.d.ts +1 -1
- package/radio-group/lib/brn-radio.component.d.ts +6 -6
- package/select/lib/brn-select-content.component.d.ts +6 -6
- package/select/lib/brn-select-value.component.d.ts +4 -4
- package/select/lib/brn-select.component.d.ts +4 -4
- package/separator/lib/brn-separator.component.d.ts +2 -2
- package/sheet/lib/brn-sheet-trigger.directive.d.ts +1 -1
- package/slider/lib/brn-slider-range.directive.d.ts +1 -1
- package/slider/lib/brn-slider-thumb.directive.d.ts +2 -2
- package/slider/lib/brn-slider-track.directive.d.ts +1 -1
- package/slider/lib/brn-slider.directive.d.ts +3 -3
- package/switch/lib/brn-switch.component.d.ts +6 -5
- package/tabs/lib/brn-tabs-content.directive.d.ts +2 -2
- package/tabs/lib/brn-tabs-paginated-list.directive.d.ts +12 -12
- package/tabs/lib/brn-tabs-trigger.directive.d.ts +2 -2
- package/tabs/lib/brn-tabs.directive.d.ts +2 -2
- package/toggle/lib/brn-toggle.directive.d.ts +1 -1
- package/toggle-group/lib/brn-toggle-item.directive.d.ts +2 -2
- package/tooltip/lib/brn-tooltip-content.component.d.ts +5 -5
- package/tooltip/lib/brn-tooltip-trigger.directive.d.ts +5 -5
|
@@ -40,22 +40,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
40
40
|
}] });
|
|
41
41
|
|
|
42
42
|
class BrnCollapsibleContentComponent {
|
|
43
|
-
|
|
43
|
+
_collapsible = inject(BrnCollapsibleComponent, { optional: true });
|
|
44
44
|
_elementRef = inject(ElementRef);
|
|
45
45
|
_platformId = inject(PLATFORM_ID);
|
|
46
46
|
/**
|
|
47
47
|
* The id of the collapsible content element.
|
|
48
48
|
*/
|
|
49
49
|
id = input();
|
|
50
|
-
|
|
51
|
-
|
|
50
|
+
_width = signal(null);
|
|
51
|
+
_height = signal(null);
|
|
52
52
|
constructor() {
|
|
53
|
-
if (!this.
|
|
53
|
+
if (!this._collapsible) {
|
|
54
54
|
throw Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');
|
|
55
55
|
}
|
|
56
56
|
effect(() => {
|
|
57
57
|
const id = this.id();
|
|
58
|
-
const collapsible = this.
|
|
58
|
+
const collapsible = this._collapsible;
|
|
59
59
|
if (!id || !collapsible)
|
|
60
60
|
return;
|
|
61
61
|
untracked(() => collapsible.contentId.set(id));
|
|
@@ -68,14 +68,14 @@ class BrnCollapsibleContentComponent {
|
|
|
68
68
|
// ensure the element is not hidden when measuring its size
|
|
69
69
|
this._elementRef.nativeElement.hidden = false;
|
|
70
70
|
const { width, height } = this._elementRef.nativeElement.getBoundingClientRect();
|
|
71
|
-
this.
|
|
72
|
-
this.
|
|
71
|
+
this._width.set(width);
|
|
72
|
+
this._height.set(height);
|
|
73
73
|
// we force the element to be hidden again if collapsed after measuring its size
|
|
74
74
|
// this is handled by the host binding, but it can cause a flicker if we don't do this here manually
|
|
75
|
-
this._elementRef.nativeElement.hidden = this.
|
|
75
|
+
this._elementRef.nativeElement.hidden = this._collapsible?.expanded() ?? false;
|
|
76
76
|
}
|
|
77
77
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleContentComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
78
|
-
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnCollapsibleContentComponent, isStandalone: true, selector: "brn-collapsible-content", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!
|
|
78
|
+
/** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.2.8", type: BrnCollapsibleContentComponent, isStandalone: true, selector: "brn-collapsible-content", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { properties: { "hidden": "!_collapsible?.expanded()", "attr.data-state": "_collapsible?.expanded() ? \"open\" : \"closed\"", "id": "_collapsible?.contentId()", "style.--brn-collapsible-content-width.px": "_width()", "style.--brn-collapsible-content-height.px": "_height()" } }, ngImport: i0, template: `
|
|
79
79
|
<ng-content />
|
|
80
80
|
`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
81
81
|
}
|
|
@@ -84,11 +84,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
84
84
|
args: [{
|
|
85
85
|
selector: 'brn-collapsible-content',
|
|
86
86
|
host: {
|
|
87
|
-
'[hidden]': '!
|
|
88
|
-
'[attr.data-state]': '
|
|
89
|
-
'[id]': '
|
|
90
|
-
'[style.--brn-collapsible-content-width.px]': '
|
|
91
|
-
'[style.--brn-collapsible-content-height.px]': '
|
|
87
|
+
'[hidden]': '!_collapsible?.expanded()',
|
|
88
|
+
'[attr.data-state]': '_collapsible?.expanded() ? "open" : "closed"',
|
|
89
|
+
'[id]': '_collapsible?.contentId()',
|
|
90
|
+
'[style.--brn-collapsible-content-width.px]': '_width()',
|
|
91
|
+
'[style.--brn-collapsible-content-height.px]': '_height()',
|
|
92
92
|
},
|
|
93
93
|
template: `
|
|
94
94
|
<ng-content />
|
|
@@ -98,27 +98,27 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
98
98
|
}], ctorParameters: () => [] });
|
|
99
99
|
|
|
100
100
|
class BrnCollapsibleTriggerDirective {
|
|
101
|
-
|
|
101
|
+
_collapsible = inject(BrnCollapsibleComponent, { optional: true });
|
|
102
102
|
constructor() {
|
|
103
|
-
if (!this.
|
|
103
|
+
if (!this._collapsible) {
|
|
104
104
|
throw Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
toggle() {
|
|
108
|
-
this.
|
|
108
|
+
this._collapsible?.toggle();
|
|
109
109
|
}
|
|
110
110
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleTriggerDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
111
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnCollapsibleTriggerDirective, isStandalone: true, selector: "button[brnCollapsibleTrigger]", host: { listeners: { "click": "toggle()" }, properties: { "attr.data-state": "
|
|
111
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.8", type: BrnCollapsibleTriggerDirective, isStandalone: true, selector: "button[brnCollapsibleTrigger]", host: { listeners: { "click": "toggle()" }, properties: { "attr.data-state": "_collapsible?.expanded() ? \"open\" : \"closed\"", "attr.disabled": "_collapsible?.disabled() ? true : undefined", "attr.aria-expanded": "_collapsible?.expanded()", "attr.aria-controls": "_collapsible?.contentId()" } }, ngImport: i0 });
|
|
112
112
|
}
|
|
113
113
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCollapsibleTriggerDirective, decorators: [{
|
|
114
114
|
type: Directive,
|
|
115
115
|
args: [{
|
|
116
116
|
selector: 'button[brnCollapsibleTrigger]',
|
|
117
117
|
host: {
|
|
118
|
-
'[attr.data-state]': '
|
|
119
|
-
'[attr.disabled]': '
|
|
120
|
-
'[attr.aria-expanded]': '
|
|
121
|
-
'[attr.aria-controls]': '
|
|
118
|
+
'[attr.data-state]': '_collapsible?.expanded() ? "open" : "closed"',
|
|
119
|
+
'[attr.disabled]': '_collapsible?.disabled() ? true : undefined',
|
|
120
|
+
'[attr.aria-expanded]': '_collapsible?.expanded()',
|
|
121
|
+
'[attr.aria-controls]': '_collapsible?.contentId()',
|
|
122
122
|
'(click)': 'toggle()',
|
|
123
123
|
},
|
|
124
124
|
}]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-collapsible.mjs","sources":["../../../../libs/brain/collapsible/src/lib/brn-collapsible.component.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-content.component.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-trigger.directive.ts","../../../../libs/brain/collapsible/src/index.ts","../../../../libs/brain/collapsible/src/spartan-ng-brain-collapsible.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, input, model, signal } from '@angular/core';\n\nlet collapsibleContentIdSequence = 0;\n\nexport type BrnCollapsibleState = 'open' | 'closed';\n\n@Component({\n\tselector: 'brn-collapsible',\n\thost: {\n\t\t'[attr.data-state]': 'expanded() ? \"open\" : \"closed\"',\n\t\t'[attr.disabled]': 'disabled() ? true : undefined',\n\t},\n\ttemplate: `\n\t\t<ng-content />\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnCollapsibleComponent {\n\tpublic readonly contentId = signal(`brn-collapsible-content-${collapsibleContentIdSequence++}`);\n\n\t/**\n\t * The expanded or collapsed state of the collapsible component.\n\t */\n\tpublic readonly expanded = model<boolean>(false);\n\n\t/**\n\t * The disabled state of the collapsible component.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Toggles the expanded state of the collapsible component.\n\t */\n\tpublic toggle(): void {\n\t\tthis.expanded.update((expanded) => !expanded);\n\t}\n}\n","import { isPlatformServer } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tOnInit,\n\tPLATFORM_ID,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n\tuntracked,\n} from '@angular/core';\nimport { BrnCollapsibleComponent } from './brn-collapsible.component';\n\n@Component({\n\tselector: 'brn-collapsible-content',\n\thost: {\n\t\t'[hidden]': '!collapsible?.expanded()',\n\t\t'[attr.data-state]': 'collapsible?.expanded() ? \"open\" : \"closed\"',\n\t\t'[id]': 'collapsible?.contentId()',\n\t\t'[style.--brn-collapsible-content-width.px]': 'width()',\n\t\t'[style.--brn-collapsible-content-height.px]': 'height()',\n\t},\n\ttemplate: `\n\t\t<ng-content />\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnCollapsibleContentComponent implements OnInit {\n\tprotected readonly collapsible = inject(BrnCollapsibleComponent, { optional: true });\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _platformId = inject(PLATFORM_ID);\n\t/**\n\t * The id of the collapsible content element.\n\t */\n\tpublic readonly id = input<string | null | undefined>();\n\tprotected readonly width = signal<number | null>(null);\n\tprotected readonly height = signal<number | null>(null);\n\n\tconstructor() {\n\t\tif (!this.collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\n\t\teffect(() => {\n\t\t\tconst id = this.id();\n\t\t\tconst collapsible = this.collapsible;\n\t\t\tif (!id || !collapsible) return;\n\t\t\tuntracked(() => collapsible.contentId.set(id));\n\t\t});\n\t}\n\n\tngOnInit(): void {\n\t\tif (isPlatformServer(this._platformId)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// ensure the element is not hidden when measuring its size\n\t\tthis._elementRef.nativeElement.hidden = false;\n\n\t\tconst { width, height } = this._elementRef.nativeElement.getBoundingClientRect();\n\t\tthis.width.set(width);\n\t\tthis.height.set(height);\n\n\t\t// we force the element to be hidden again if collapsed after measuring its size\n\t\t// this is handled by the host binding, but it can cause a flicker if we don't do this here manually\n\t\tthis._elementRef.nativeElement.hidden = this.collapsible?.expanded() ?? false;\n\t}\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnCollapsibleComponent } from './brn-collapsible.component';\n\n@Directive({\n\tselector: 'button[brnCollapsibleTrigger]',\n\thost: {\n\t\t'[attr.data-state]': 'collapsible?.expanded() ? \"open\" : \"closed\"',\n\t\t'[attr.disabled]': 'collapsible?.disabled() ? true : undefined',\n\t\t'[attr.aria-expanded]': 'collapsible?.expanded()',\n\t\t'[attr.aria-controls]': 'collapsible?.contentId()',\n\t\t'(click)': 'toggle()',\n\t},\n})\nexport class BrnCollapsibleTriggerDirective {\n\tprotected readonly collapsible = inject(BrnCollapsibleComponent, { optional: true });\n\n\tconstructor() {\n\t\tif (!this.collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\t}\n\n\ttoggle(): void {\n\t\tthis.collapsible?.toggle();\n\t}\n}\n","import { NgModule } from '@angular/core';\n\nimport { BrnCollapsibleContentComponent } from './lib/brn-collapsible-content.component';\nimport { BrnCollapsibleTriggerDirective } from './lib/brn-collapsible-trigger.directive';\nimport { BrnCollapsibleComponent } from './lib/brn-collapsible.component';\n\nexport * from './lib/brn-collapsible-content.component';\nexport * from './lib/brn-collapsible-trigger.directive';\nexport * from './lib/brn-collapsible.component';\n\nexport const BrnCollapsibleImports = [\n\tBrnCollapsibleComponent,\n\tBrnCollapsibleTriggerDirective,\n\tBrnCollapsibleContentComponent,\n] as const;\n\n@NgModule({\n\timports: [...BrnCollapsibleImports],\n\texports: [...BrnCollapsibleImports],\n})\nexport class BrnCollapsibleModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;AAGA,IAAI,4BAA4B,GAAG,CAAC;MAevB,uBAAuB,CAAA;IACnB,SAAS,GAAG,MAAM,CAAC,CAAA,wBAAA,EAA2B,4BAA4B,EAAE,CAAA,CAAE,CAAC;AAE/F;;AAEG;AACa,IAAA,QAAQ,GAAG,KAAK,CAAU,KAAK,CAAC;AAEhD;;AAEG;IACa,QAAQ,GAAG,KAAK,CAAwB,KAAK,EAAE,EAAE,SAAS,EAAE,gBAAgB,EAAE,CAAC;AAE/F;;AAEG;IACI,MAAM,GAAA;AACZ,QAAA,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,QAAQ,KAAK,CAAC,QAAQ,CAA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,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAThC,uBAAuB;YACvB,8BAA8B;AAC9B,YAAA,8BAA8B,aAF9B,uBAAuB;YACvB,8BAA8B;YAC9B,8BAA8B,CAAA,EAAA,CAAA;2HAOlB,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;AACnC,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-collapsible.mjs","sources":["../../../../libs/brain/collapsible/src/lib/brn-collapsible.component.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-content.component.ts","../../../../libs/brain/collapsible/src/lib/brn-collapsible-trigger.directive.ts","../../../../libs/brain/collapsible/src/index.ts","../../../../libs/brain/collapsible/src/spartan-ng-brain-collapsible.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { ChangeDetectionStrategy, Component, booleanAttribute, input, model, signal } from '@angular/core';\n\nlet collapsibleContentIdSequence = 0;\n\nexport type BrnCollapsibleState = 'open' | 'closed';\n\n@Component({\n\tselector: 'brn-collapsible',\n\thost: {\n\t\t'[attr.data-state]': 'expanded() ? \"open\" : \"closed\"',\n\t\t'[attr.disabled]': 'disabled() ? true : undefined',\n\t},\n\ttemplate: `\n\t\t<ng-content />\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnCollapsibleComponent {\n\tpublic readonly contentId = signal(`brn-collapsible-content-${collapsibleContentIdSequence++}`);\n\n\t/**\n\t * The expanded or collapsed state of the collapsible component.\n\t */\n\tpublic readonly expanded = model<boolean>(false);\n\n\t/**\n\t * The disabled state of the collapsible component.\n\t */\n\tpublic readonly disabled = input<boolean, BooleanInput>(false, { transform: booleanAttribute });\n\n\t/**\n\t * Toggles the expanded state of the collapsible component.\n\t */\n\tpublic toggle(): void {\n\t\tthis.expanded.update((expanded) => !expanded);\n\t}\n}\n","import { isPlatformServer } from '@angular/common';\nimport {\n\tChangeDetectionStrategy,\n\tComponent,\n\tElementRef,\n\tOnInit,\n\tPLATFORM_ID,\n\teffect,\n\tinject,\n\tinput,\n\tsignal,\n\tuntracked,\n} from '@angular/core';\nimport { BrnCollapsibleComponent } from './brn-collapsible.component';\n\n@Component({\n\tselector: 'brn-collapsible-content',\n\thost: {\n\t\t'[hidden]': '!_collapsible?.expanded()',\n\t\t'[attr.data-state]': '_collapsible?.expanded() ? \"open\" : \"closed\"',\n\t\t'[id]': '_collapsible?.contentId()',\n\t\t'[style.--brn-collapsible-content-width.px]': '_width()',\n\t\t'[style.--brn-collapsible-content-height.px]': '_height()',\n\t},\n\ttemplate: `\n\t\t<ng-content />\n\t`,\n\tchangeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class BrnCollapsibleContentComponent implements OnInit {\n\tprotected readonly _collapsible = inject(BrnCollapsibleComponent, { optional: true });\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\tprivate readonly _platformId = inject(PLATFORM_ID);\n\t/**\n\t * The id of the collapsible content element.\n\t */\n\tpublic readonly id = input<string | null | undefined>();\n\tprotected readonly _width = signal<number | null>(null);\n\tprotected readonly _height = signal<number | null>(null);\n\n\tconstructor() {\n\t\tif (!this._collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\n\t\teffect(() => {\n\t\t\tconst id = this.id();\n\t\t\tconst collapsible = this._collapsible;\n\t\t\tif (!id || !collapsible) return;\n\t\t\tuntracked(() => collapsible.contentId.set(id));\n\t\t});\n\t}\n\n\tngOnInit(): void {\n\t\tif (isPlatformServer(this._platformId)) {\n\t\t\treturn;\n\t\t}\n\n\t\t// ensure the element is not hidden when measuring its size\n\t\tthis._elementRef.nativeElement.hidden = false;\n\n\t\tconst { width, height } = this._elementRef.nativeElement.getBoundingClientRect();\n\t\tthis._width.set(width);\n\t\tthis._height.set(height);\n\n\t\t// we force the element to be hidden again if collapsed after measuring its size\n\t\t// this is handled by the host binding, but it can cause a flicker if we don't do this here manually\n\t\tthis._elementRef.nativeElement.hidden = this._collapsible?.expanded() ?? false;\n\t}\n}\n","import { Directive, inject } from '@angular/core';\nimport { BrnCollapsibleComponent } from './brn-collapsible.component';\n\n@Directive({\n\tselector: 'button[brnCollapsibleTrigger]',\n\thost: {\n\t\t'[attr.data-state]': '_collapsible?.expanded() ? \"open\" : \"closed\"',\n\t\t'[attr.disabled]': '_collapsible?.disabled() ? true : undefined',\n\t\t'[attr.aria-expanded]': '_collapsible?.expanded()',\n\t\t'[attr.aria-controls]': '_collapsible?.contentId()',\n\t\t'(click)': 'toggle()',\n\t},\n})\nexport class BrnCollapsibleTriggerDirective {\n\tprotected readonly _collapsible = inject(BrnCollapsibleComponent, { optional: true });\n\n\tconstructor() {\n\t\tif (!this._collapsible) {\n\t\t\tthrow Error('Collapsible trigger directive can only be used inside a brn-collapsible element.');\n\t\t}\n\t}\n\n\ttoggle(): void {\n\t\tthis._collapsible?.toggle();\n\t}\n}\n","import { NgModule } from '@angular/core';\n\nimport { BrnCollapsibleContentComponent } from './lib/brn-collapsible-content.component';\nimport { BrnCollapsibleTriggerDirective } from './lib/brn-collapsible-trigger.directive';\nimport { BrnCollapsibleComponent } from './lib/brn-collapsible.component';\n\nexport * from './lib/brn-collapsible-content.component';\nexport * from './lib/brn-collapsible-trigger.directive';\nexport * from './lib/brn-collapsible.component';\n\nexport const BrnCollapsibleImports = [\n\tBrnCollapsibleComponent,\n\tBrnCollapsibleTriggerDirective,\n\tBrnCollapsibleContentComponent,\n] as const;\n\n@NgModule({\n\timports: [...BrnCollapsibleImports],\n\texports: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AS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,+BAA+B;AACzC,oBAAA,IAAI,EAAE;AACL,wBAAA,mBAAmB,EAAE,8CAA8C;AACnE,wBAAA,iBAAiB,EAAE,6CAA6C;AAChE,wBAAA,sBAAsB,EAAE,0BAA0B;AAClD,wBAAA,sBAAsB,EAAE,2BAA2B;AACnD,wBAAA,SAAS,EAAE,UAAU;AACrB,qBAAA;AACD,iBAAA;;;ACFM,MAAM,qBAAqB,GAAG;IACpC,uBAAuB;IACvB,8BAA8B;IAC9B,8BAA8B;;MAOlB,oBAAoB,CAAA;0HAApB,oBAAoB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAApB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,oBAAoB,YAThC,uBAAuB;YACvB,8BAA8B;AAC9B,YAAA,8BAA8B,aAF9B,uBAAuB;YACvB,8BAA8B;YAC9B,8BAA8B,CAAA,EAAA,CAAA;2HAOlB,oBAAoB,EAAA,CAAA;;2FAApB,oBAAoB,EAAA,UAAA,EAAA,CAAA;kBAJhC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;AACnC,oBAAA,OAAO,EAAE,CAAC,GAAG,qBAAqB,CAAC;AACnC,iBAAA;;;ACnBD;;AAEG;;;;"}
|
|
@@ -54,9 +54,9 @@ class BrnCommandGroupDirective {
|
|
|
54
54
|
descendants: true,
|
|
55
55
|
});
|
|
56
56
|
/** Determine if there are any visible items in the group */
|
|
57
|
-
|
|
57
|
+
_visible = computed(() => this._items().some((item) => item.visible()));
|
|
58
58
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCommandGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
59
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.8", type: BrnCommandGroupDirective, isStandalone: true, selector: "[brnCommandGroup]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.data-hidden": "!
|
|
59
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "19.2.8", type: BrnCommandGroupDirective, isStandalone: true, selector: "[brnCommandGroup]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "group" }, properties: { "attr.data-hidden": "!_visible() ? \"\" : null", "id": "id()" } }, queries: [{ propertyName: "_items", predicate: BrnCommandItemToken, descendants: true, isSignal: true }], ngImport: i0 });
|
|
60
60
|
}
|
|
61
61
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCommandGroupDirective, decorators: [{
|
|
62
62
|
type: Directive,
|
|
@@ -64,7 +64,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
64
64
|
selector: '[brnCommandGroup]',
|
|
65
65
|
host: {
|
|
66
66
|
role: 'group',
|
|
67
|
-
'[attr.data-hidden]': '!
|
|
67
|
+
'[attr.data-hidden]': '!_visible() ? "" : null',
|
|
68
68
|
'[id]': 'id()',
|
|
69
69
|
},
|
|
70
70
|
}]
|
|
@@ -81,6 +81,7 @@ class BrnCommandItemDirective {
|
|
|
81
81
|
/** The value this item represents. */
|
|
82
82
|
value = input.required();
|
|
83
83
|
/** Whether the item is disabled. */
|
|
84
|
+
// eslint-disable-next-line @typescript-eslint/naming-convention
|
|
84
85
|
_disabled = input(false, {
|
|
85
86
|
alias: 'disabled',
|
|
86
87
|
transform: booleanAttribute,
|
|
@@ -94,7 +95,7 @@ class BrnCommandItemDirective {
|
|
|
94
95
|
*/
|
|
95
96
|
_initialized = signal(false);
|
|
96
97
|
/** Whether the item is selected. */
|
|
97
|
-
|
|
98
|
+
_active = signal(false);
|
|
98
99
|
/** Emits when the item is selected. */
|
|
99
100
|
selected = output();
|
|
100
101
|
/** @internal Determine if this item is visible based on the current search query */
|
|
@@ -114,7 +115,7 @@ class BrnCommandItemDirective {
|
|
|
114
115
|
}
|
|
115
116
|
/** @internal */
|
|
116
117
|
setActiveStyles() {
|
|
117
|
-
this.
|
|
118
|
+
this._active.set(true);
|
|
118
119
|
// ensure the item is in view
|
|
119
120
|
if (isPlatformBrowser(this._platform)) {
|
|
120
121
|
this._elementRef.nativeElement.scrollIntoView({ block: 'nearest' });
|
|
@@ -122,7 +123,7 @@ class BrnCommandItemDirective {
|
|
|
122
123
|
}
|
|
123
124
|
/** @internal */
|
|
124
125
|
setInactiveStyles() {
|
|
125
|
-
this.
|
|
126
|
+
this._active.set(false);
|
|
126
127
|
}
|
|
127
128
|
onClick() {
|
|
128
129
|
this._command.keyManager.setActiveItem(this);
|
|
@@ -132,7 +133,7 @@ class BrnCommandItemDirective {
|
|
|
132
133
|
this._initialized.set(true);
|
|
133
134
|
}
|
|
134
135
|
/** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCommandItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
135
|
-
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnCommandItemDirective, isStandalone: true, selector: "button[brnCommandItem]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { attributes: { "type": "button", "role": "option", "tabIndex": "-1" }, listeners: { "click": "onClick()" }, properties: { "id": "id()", "attr.disabled": "_disabled() ? true : null", "attr.data-disabled": "_disabled() ? \"\" : null", "attr.data-value": "value()", "attr.data-hidden": "!visible() ? '' : null", "attr.aria-selected": "
|
|
136
|
+
/** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.2.8", type: BrnCommandItemDirective, isStandalone: true, selector: "button[brnCommandItem]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, _disabled: { classPropertyName: "_disabled", publicName: "disabled", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { selected: "selected" }, host: { attributes: { "type": "button", "role": "option", "tabIndex": "-1" }, listeners: { "click": "onClick()" }, properties: { "id": "id()", "attr.disabled": "_disabled() ? true : null", "attr.data-disabled": "_disabled() ? \"\" : null", "attr.data-value": "value()", "attr.data-hidden": "!visible() ? '' : null", "attr.aria-selected": "_active()", "attr.data-selected": "_active() ? '' : null" } }, providers: [provideBrnCommandItem(BrnCommandItemDirective)], ngImport: i0 });
|
|
136
137
|
}
|
|
137
138
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImport: i0, type: BrnCommandItemDirective, decorators: [{
|
|
138
139
|
type: Directive,
|
|
@@ -148,8 +149,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.8", ngImpor
|
|
|
148
149
|
'[attr.data-disabled]': '_disabled() ? "" : null',
|
|
149
150
|
'[attr.data-value]': 'value()',
|
|
150
151
|
'[attr.data-hidden]': "!visible() ? '' : null",
|
|
151
|
-
'[attr.aria-selected]': '
|
|
152
|
-
'[attr.data-selected]': "
|
|
152
|
+
'[attr.aria-selected]': '_active()',
|
|
153
|
+
'[attr.data-selected]': "_active() ? '' : null",
|
|
153
154
|
},
|
|
154
155
|
}]
|
|
155
156
|
}], propDecorators: { onClick: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spartan-ng-brain-command.mjs","sources":["../../../../libs/brain/command/src/lib/brn-command.token.ts","../../../../libs/brain/command/src/lib/brn-command-empty.directive.ts","../../../../libs/brain/command/src/lib/brn-command-item.token.ts","../../../../libs/brain/command/src/lib/brn-command-group.directive.ts","../../../../libs/brain/command/src/lib/brn-command-item.directive.ts","../../../../libs/brain/command/src/lib/brn-command-list.directive.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.token.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.directive.ts","../../../../libs/brain/command/src/lib/brn-command.directive.ts","../../../../libs/brain/command/src/index.ts","../../../../libs/brain/command/src/spartan-ng-brain-command.ts"],"sourcesContent":["import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandDirective } from './brn-command.directive';\n\nexport const BrnCommandToken = new InjectionToken<BrnCommandDirective>('BrnCommandToken');\n\nexport function provideBrnCommand(command: Type<BrnCommandDirective>): ExistingProvider {\n\treturn { provide: BrnCommandToken, useExisting: command };\n}\n\nexport function injectBrnCommand(): BrnCommandDirective {\n\treturn inject(BrnCommandToken);\n}\n","import { computed, Directive, effect, inject, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommandEmpty]',\n})\nexport class BrnCommandEmptyDirective {\n\tprivate readonly _templateRef = inject<TemplateRef<void>>(TemplateRef);\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** Determine if the command has any visible items */\n\tprivate readonly _visible = computed(() => this._command.items().some((item) => item.visible()));\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tif (this._visible()) {\n\t\t\t\tthis._viewContainerRef.clear();\n\t\t\t} else {\n\t\t\t\tthis._viewContainerRef.createEmbeddedView(this._templateRef);\n\t\t\t}\n\t\t});\n\t}\n}\n","import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandItemDirective } from './brn-command-item.directive';\n\nexport const BrnCommandItemToken = new InjectionToken<BrnCommandItemDirective>('BrnCommandItemToken');\n\nexport function provideBrnCommandItem(command: Type<BrnCommandItemDirective>): ExistingProvider {\n\treturn { provide: BrnCommandItemToken, useExisting: command };\n}\n","import { computed, contentChildren, Directive, input } from '@angular/core';\nimport { BrnCommandItemToken } from './brn-command-item.token';\n\n@Directive({\n\tselector: '[brnCommandGroup]',\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.data-hidden]': '!visible() ? \"\" : null',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandGroupDirective {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-group-${BrnCommandGroupDirective._id++}`);\n\n\t/** Get the items in the group */\n\tprivate readonly _items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** Determine if there are any visible items in the group */\n\tprotected readonly visible = computed(() => this._items().some((item) => item.visible()));\n}\n","import { Highlightable } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tElementRef,\n\tHostListener,\n\tinject,\n\tinput,\n\tOnInit,\n\toutput,\n\tPLATFORM_ID,\n\tsignal,\n} from '@angular/core';\nimport { provideBrnCommandItem } from './brn-command-item.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'button[brnCommandItem]',\n\tproviders: [provideBrnCommandItem(BrnCommandItemDirective)],\n\thost: {\n\t\ttype: 'button',\n\t\trole: 'option',\n\t\ttabIndex: '-1',\n\t\t'[id]': 'id()',\n\t\t'[attr.disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-disabled]': '_disabled() ? \"\" : null',\n\t\t'[attr.data-value]': 'value()',\n\t\t'[attr.data-hidden]': \"!visible() ? '' : null\",\n\t\t'[attr.aria-selected]': 'active()',\n\t\t'[attr.data-selected]': \"active() ? '' : null\",\n\t},\n})\nexport class BrnCommandItemDirective implements Highlightable, OnInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t/** Access the command component */\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** A unique id for the item */\n\tpublic readonly id = input(`brn-command-item-${BrnCommandItemDirective._id++}`);\n\n\t/** The value this item represents. */\n\tpublic readonly value = input.required<string>();\n\n\t/** Whether the item is disabled. */\n\tpublic readonly _disabled = input<boolean, BooleanInput>(false, {\n\t\talias: 'disabled',\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Expose disabled as a value - used by the Highlightable interface */\n\tpublic get disabled() {\n\t\treturn this._disabled();\n\t}\n\n\t/** Whether the item is initialized, this is to prevent accessing the value-input before the component is initialized.\n\t * The brn-command-empty directive accesses the value before the component is initialized, which causes an error.\n\t */\n\tprivate readonly _initialized = signal(false);\n\n\t/** Whether the item is selected. */\n\tprotected readonly active = signal(false);\n\n\t/** Emits when the item is selected. */\n\tpublic readonly selected = output<void>();\n\n\t/** @internal Determine if this item is visible based on the current search query */\n\tpublic readonly visible = computed(() => {\n\t\treturn this._command.filter()(this.safeValue(), this._command.search());\n\t});\n\n\t/** @internal Get the value of the item, with check if it has been initialized to avoid errors */\n\tpublic safeValue = computed(() => {\n\t\tif (!this._initialized()) {\n\t\t\treturn '';\n\t\t}\n\t\treturn this.value();\n\t});\n\n\t/** @internal Get the display value */\n\tpublic getLabel(): string {\n\t\treturn this.safeValue();\n\t}\n\n\t/** @internal */\n\tsetActiveStyles(): void {\n\t\tthis.active.set(true);\n\n\t\t// ensure the item is in view\n\t\tif (isPlatformBrowser(this._platform)) {\n\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n\t\t}\n\t}\n\n\t/** @internal */\n\tsetInactiveStyles(): void {\n\t\tthis.active.set(false);\n\t}\n\n\t@HostListener('click')\n\tprotected onClick(): void {\n\t\tthis._command.keyManager.setActiveItem(this);\n\t\tthis.selected.emit();\n\t}\n\n\tngOnInit(): void {\n\t\tthis._initialized.set(true);\n\t}\n}\n","import { Directive, input } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCommandList]',\n\thost: {\n\t\trole: 'listbox',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandListDirective {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-list-${BrnCommandListDirective._id++}`);\n}\n","import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandSearchInputDirective } from './brn-command-search-input.directive';\n\nexport const BrnCommandSearchInputToken = new InjectionToken<BrnCommandSearchInputDirective>(\n\t'BrnCommandSearchInputToken',\n);\n\nexport function provideBrnCommandSearchInput(command: Type<BrnCommandSearchInputDirective>): ExistingProvider {\n\treturn { provide: BrnCommandSearchInputToken, useExisting: command };\n}\n","import {\n\tcomputed,\n\tDirective,\n\teffect,\n\tElementRef,\n\tforwardRef,\n\tInject,\n\tinput,\n\tOptional,\n\tRenderer2,\n\tsignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { COMPOSITION_BUFFER_MODE, DefaultValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { startWith } from 'rxjs/operators';\nimport { provideBrnCommandSearchInput } from './brn-command-search-input.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'input[brnCommandSearchInput]',\n\tproviders: [\n\t\tprovideBrnCommandSearchInput(BrnCommandSearchInputDirective),\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => BrnCommandSearchInputDirective),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\thost: {\n\t\trole: 'combobox',\n\t\t'aria-autocomplete': 'list',\n\t\t'[attr.aria-activedescendant]': '_activeDescendant()',\n\t\t'(keydown)': 'onKeyDown($event)',\n\t\t'(input)': 'onInput()',\n\t},\n})\nexport class BrnCommandSearchInputDirective extends DefaultValueAccessor {\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** The initial value of the search input */\n\tpublic readonly value = input<string>('');\n\n\t/** @internal The mutable value of the search input */\n\tpublic readonly mutableValue = computed(() => signal(this.value()));\n\n\t/** @internal The \"real\" value of the search input */\n\tpublic readonly valueState = computed(() => this.mutableValue()());\n\n\t/** The id of the active option */\n\tprotected readonly _activeDescendant = signal<string | undefined>(undefined);\n\n\tconstructor(\n\t\trenderer: Renderer2,\n\t\tprivate readonly elementRef: ElementRef,\n\t\t@Optional() @Inject(COMPOSITION_BUFFER_MODE) compositionMode: boolean,\n\t) {\n\t\tsuper(renderer, elementRef, compositionMode);\n\t\tthis._command.keyManager.change\n\t\t\t.pipe(startWith(this._command.keyManager.activeItemIndex), takeUntilDestroyed())\n\t\t\t.subscribe(() => this._activeDescendant.set(this._command.keyManager.activeItem?.id()));\n\t\teffect(() => {\n\t\t\tthis.elementRef.nativeElement.value = this.valueState();\n\t\t});\n\t}\n\t/** Listen for changes to the input value */\n\tprotected onInput(): void {\n\t\tthis.mutableValue().set(this.elementRef.nativeElement.value);\n\t}\n\n\t/** Listen for keydown events */\n\tprotected onKeyDown(event: KeyboardEvent): void {\n\t\tthis._command.keyManager.onKeydown(event);\n\t}\n\n\t/** CONROL VALUE ACCESSOR */\n\toverride writeValue(value: string | null): void {\n\t\tsuper.writeValue(value);\n\t\tif (value) {\n\t\t\tthis.mutableValue().set(value);\n\t\t}\n\t}\n}\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tAfterViewInit,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\teffect,\n\tHostListener,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\tPLATFORM_ID,\n\tuntracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { BrnCommandItemToken } from './brn-command-item.token';\nimport { BrnCommandSearchInputDirective } from './brn-command-search-input.directive';\nimport { provideBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommand]',\n\tproviders: [provideBrnCommand(BrnCommandDirective)],\n\thost: {\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandDirective implements AfterViewInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The id of the command */\n\tpublic readonly id = input<string>(`brn-command-${BrnCommandDirective._id++}`);\n\n\t/** The default filter function */\n\tprivate readonly _defaultFilter = (value: string, search: string) =>\n\t\tvalue.toLowerCase().includes(search.toLowerCase());\n\n\t/** A custom filter function to use when searching. */\n\tpublic readonly filter = input<CommandFilter>(this._defaultFilter);\n\n\t/** when the selection has changed */\n\tpublic readonly valueChange = output<string>();\n\n\t/** @internal The search query */\n\tpublic readonly search = computed(() => this._searchInput()?.valueState() ?? '');\n\n\t/** Access the search input if present */\n\tprivate readonly _searchInput = contentChild(BrnCommandSearchInputDirective, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal Access all the items within the commmand */\n\tpublic readonly items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal The key manager for managing active descendant */\n\tpublic readonly keyManager = new ActiveDescendantKeyManager(this.items, this._injector);\n\n\tconstructor() {\n\t\tthis.keyManager\n\t\t\t.withVerticalOrientation()\n\t\t\t.withHomeAndEnd()\n\t\t\t.withWrap()\n\t\t\t.skipPredicate((item) => item.disabled || !item.visible());\n\n\t\t// When clearing the search input we also want to reset the active item to the first one\n\t\teffect(() => {\n\t\t\tconst searchInput = this.search();\n\t\t\tuntracked(() => {\n\t\t\t\tconst activeItemIsVisible = this.keyManager.activeItem?.visible();\n\t\t\t\tif ((searchInput !== undefined && searchInput.length === 0) || !activeItemIsVisible) {\n\t\t\t\t\tthis.keyManager.setFirstItemActive();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tthis.keyManager.change.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\tconst value = this.keyManager.activeItem?.safeValue();\n\t\t\tif (value) {\n\t\t\t\tthis.valueChange.emit(value);\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\tif (isPlatformBrowser(this._platform) && this.items().length) {\n\t\t\tthis.keyManager.setActiveItem(0);\n\t\t}\n\t}\n\n\t@HostListener('keydown.enter')\n\tprotected selectActiveItem(): void {\n\t\tthis.keyManager.activeItem?.selected.emit();\n\t}\n}\n\nexport type CommandFilter = (value: string, search: string) => boolean;\n","import { NgModule } from '@angular/core';\nimport { BrnCommandEmptyDirective } from './lib/brn-command-empty.directive';\nimport { BrnCommandGroupDirective } from './lib/brn-command-group.directive';\nimport { BrnCommandItemDirective } from './lib/brn-command-item.directive';\nimport { BrnCommandListDirective } from './lib/brn-command-list.directive';\nimport { BrnCommandSearchInputDirective } from './lib/brn-command-search-input.directive';\nimport { BrnCommandDirective } from './lib/brn-command.directive';\n\nexport * from './lib/brn-command-empty.directive';\nexport * from './lib/brn-command-group.directive';\nexport * from './lib/brn-command-item.directive';\nexport * from './lib/brn-command-item.token';\nexport * from './lib/brn-command-list.directive';\nexport * from './lib/brn-command-search-input.directive';\nexport * from './lib/brn-command-search-input.token';\nexport * from './lib/brn-command.directive';\nexport * from './lib/brn-command.token';\n\nexport const BrnCommandImports = [\n\tBrnCommandEmptyDirective,\n\tBrnCommandGroupDirective,\n\tBrnCommandItemDirective,\n\tBrnCommandListDirective,\n\tBrnCommandSearchInputDirective,\n\tBrnCommandDirective,\n] as const;\n\n@NgModule({\n\timports: [...BrnCommandImports],\n\texports: [...BrnCommandImports],\n})\nexport class BrnCommandModule {}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E,CAAC,iBAAiB,CAAA,mBAAA,CAAqB,CAAC;AACnD,oBAAA,IAAI,EAAE;AACL,wBAAA,MAAM,EAAE,MAAM;AACd,qBAAA;AACD,iBAAA;wDAsEU,gBAAgB,EAAA,CAAA;sBADzB,YAAY;uBAAC,eAAe;;;AC/EvB,MAAM,iBAAiB,GAAG;IAChC,wBAAwB;IACxB,wBAAwB;IACxB,uBAAuB;IACvB,uBAAuB;IACvB,8BAA8B;IAC9B,mBAAmB;;MAOP,gBAAgB,CAAA;0HAAhB,gBAAgB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA;AAAhB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAZ5B,wBAAwB;YACxB,wBAAwB;YACxB,uBAAuB;YACvB,uBAAuB;YACvB,8BAA8B;AAC9B,YAAA,mBAAmB,aALnB,wBAAwB;YACxB,wBAAwB;YACxB,uBAAuB;YACvB,uBAAuB;YACvB,8BAA8B;YAC9B,mBAAmB,CAAA,EAAA,CAAA;2HAOP,gBAAgB,EAAA,CAAA;;2FAAhB,gBAAgB,EAAA,UAAA,EAAA,CAAA;kBAJ5B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACT,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,oBAAA,OAAO,EAAE,CAAC,GAAG,iBAAiB,CAAC;AAC/B,iBAAA;;;AC9BD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"spartan-ng-brain-command.mjs","sources":["../../../../libs/brain/command/src/lib/brn-command.token.ts","../../../../libs/brain/command/src/lib/brn-command-empty.directive.ts","../../../../libs/brain/command/src/lib/brn-command-item.token.ts","../../../../libs/brain/command/src/lib/brn-command-group.directive.ts","../../../../libs/brain/command/src/lib/brn-command-item.directive.ts","../../../../libs/brain/command/src/lib/brn-command-list.directive.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.token.ts","../../../../libs/brain/command/src/lib/brn-command-search-input.directive.ts","../../../../libs/brain/command/src/lib/brn-command.directive.ts","../../../../libs/brain/command/src/index.ts","../../../../libs/brain/command/src/spartan-ng-brain-command.ts"],"sourcesContent":["import { ExistingProvider, inject, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandDirective } from './brn-command.directive';\n\nexport const BrnCommandToken = new InjectionToken<BrnCommandDirective>('BrnCommandToken');\n\nexport function provideBrnCommand(command: Type<BrnCommandDirective>): ExistingProvider {\n\treturn { provide: BrnCommandToken, useExisting: command };\n}\n\nexport function injectBrnCommand(): BrnCommandDirective {\n\treturn inject(BrnCommandToken);\n}\n","import { computed, Directive, effect, inject, TemplateRef, ViewContainerRef } from '@angular/core';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommandEmpty]',\n})\nexport class BrnCommandEmptyDirective {\n\tprivate readonly _templateRef = inject<TemplateRef<void>>(TemplateRef);\n\tprivate readonly _viewContainerRef = inject(ViewContainerRef);\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** Determine if the command has any visible items */\n\tprivate readonly _visible = computed(() => this._command.items().some((item) => item.visible()));\n\n\tconstructor() {\n\t\teffect(() => {\n\t\t\tif (this._visible()) {\n\t\t\t\tthis._viewContainerRef.clear();\n\t\t\t} else {\n\t\t\t\tthis._viewContainerRef.createEmbeddedView(this._templateRef);\n\t\t\t}\n\t\t});\n\t}\n}\n","import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandItemDirective } from './brn-command-item.directive';\n\nexport const BrnCommandItemToken = new InjectionToken<BrnCommandItemDirective>('BrnCommandItemToken');\n\nexport function provideBrnCommandItem(command: Type<BrnCommandItemDirective>): ExistingProvider {\n\treturn { provide: BrnCommandItemToken, useExisting: command };\n}\n","import { computed, contentChildren, Directive, input } from '@angular/core';\nimport { BrnCommandItemToken } from './brn-command-item.token';\n\n@Directive({\n\tselector: '[brnCommandGroup]',\n\thost: {\n\t\trole: 'group',\n\t\t'[attr.data-hidden]': '!_visible() ? \"\" : null',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandGroupDirective {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-group-${BrnCommandGroupDirective._id++}`);\n\n\t/** Get the items in the group */\n\tprivate readonly _items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** Determine if there are any visible items in the group */\n\tprotected readonly _visible = computed(() => this._items().some((item) => item.visible()));\n}\n","import { Highlightable } from '@angular/cdk/a11y';\nimport { BooleanInput } from '@angular/cdk/coercion';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tbooleanAttribute,\n\tcomputed,\n\tDirective,\n\tElementRef,\n\tHostListener,\n\tinject,\n\tinput,\n\tOnInit,\n\toutput,\n\tPLATFORM_ID,\n\tsignal,\n} from '@angular/core';\nimport { provideBrnCommandItem } from './brn-command-item.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'button[brnCommandItem]',\n\tproviders: [provideBrnCommandItem(BrnCommandItemDirective)],\n\thost: {\n\t\ttype: 'button',\n\t\trole: 'option',\n\t\ttabIndex: '-1',\n\t\t'[id]': 'id()',\n\t\t'[attr.disabled]': '_disabled() ? true : null',\n\t\t'[attr.data-disabled]': '_disabled() ? \"\" : null',\n\t\t'[attr.data-value]': 'value()',\n\t\t'[attr.data-hidden]': \"!visible() ? '' : null\",\n\t\t'[attr.aria-selected]': '_active()',\n\t\t'[attr.data-selected]': \"_active() ? '' : null\",\n\t},\n})\nexport class BrnCommandItemDirective implements Highlightable, OnInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _elementRef = inject<ElementRef<HTMLElement>>(ElementRef);\n\n\t/** Access the command component */\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** A unique id for the item */\n\tpublic readonly id = input(`brn-command-item-${BrnCommandItemDirective._id++}`);\n\n\t/** The value this item represents. */\n\tpublic readonly value = input.required<string>();\n\n\t/** Whether the item is disabled. */\n\t// eslint-disable-next-line @typescript-eslint/naming-convention\n\tpublic readonly _disabled = input<boolean, BooleanInput>(false, {\n\t\talias: 'disabled',\n\t\ttransform: booleanAttribute,\n\t});\n\n\t/** Expose disabled as a value - used by the Highlightable interface */\n\tpublic get disabled() {\n\t\treturn this._disabled();\n\t}\n\n\t/** Whether the item is initialized, this is to prevent accessing the value-input before the component is initialized.\n\t * The brn-command-empty directive accesses the value before the component is initialized, which causes an error.\n\t */\n\tprivate readonly _initialized = signal(false);\n\n\t/** Whether the item is selected. */\n\tprotected readonly _active = signal(false);\n\n\t/** Emits when the item is selected. */\n\tpublic readonly selected = output<void>();\n\n\t/** @internal Determine if this item is visible based on the current search query */\n\tpublic readonly visible = computed(() => {\n\t\treturn this._command.filter()(this.safeValue(), this._command.search());\n\t});\n\n\t/** @internal Get the value of the item, with check if it has been initialized to avoid errors */\n\tpublic safeValue = computed(() => {\n\t\tif (!this._initialized()) {\n\t\t\treturn '';\n\t\t}\n\t\treturn this.value();\n\t});\n\n\t/** @internal Get the display value */\n\tpublic getLabel(): string {\n\t\treturn this.safeValue();\n\t}\n\n\t/** @internal */\n\tsetActiveStyles(): void {\n\t\tthis._active.set(true);\n\n\t\t// ensure the item is in view\n\t\tif (isPlatformBrowser(this._platform)) {\n\t\t\tthis._elementRef.nativeElement.scrollIntoView({ block: 'nearest' });\n\t\t}\n\t}\n\n\t/** @internal */\n\tsetInactiveStyles(): void {\n\t\tthis._active.set(false);\n\t}\n\n\t@HostListener('click')\n\tprotected onClick(): void {\n\t\tthis._command.keyManager.setActiveItem(this);\n\t\tthis.selected.emit();\n\t}\n\n\tngOnInit(): void {\n\t\tthis._initialized.set(true);\n\t}\n}\n","import { Directive, input } from '@angular/core';\n\n@Directive({\n\tselector: '[brnCommandList]',\n\thost: {\n\t\trole: 'listbox',\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandListDirective {\n\tprivate static _id = 0;\n\n\t/** The id of the command list */\n\tpublic readonly id = input<string>(`brn-command-list-${BrnCommandListDirective._id++}`);\n}\n","import { ExistingProvider, InjectionToken, Type } from '@angular/core';\nimport type { BrnCommandSearchInputDirective } from './brn-command-search-input.directive';\n\nexport const BrnCommandSearchInputToken = new InjectionToken<BrnCommandSearchInputDirective>(\n\t'BrnCommandSearchInputToken',\n);\n\nexport function provideBrnCommandSearchInput(command: Type<BrnCommandSearchInputDirective>): ExistingProvider {\n\treturn { provide: BrnCommandSearchInputToken, useExisting: command };\n}\n","import {\n\tcomputed,\n\tDirective,\n\teffect,\n\tElementRef,\n\tforwardRef,\n\tInject,\n\tinput,\n\tOptional,\n\tRenderer2,\n\tsignal,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { COMPOSITION_BUFFER_MODE, DefaultValueAccessor, NG_VALUE_ACCESSOR } from '@angular/forms';\nimport { startWith } from 'rxjs/operators';\nimport { provideBrnCommandSearchInput } from './brn-command-search-input.token';\nimport { injectBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: 'input[brnCommandSearchInput]',\n\tproviders: [\n\t\tprovideBrnCommandSearchInput(BrnCommandSearchInputDirective),\n\t\t{\n\t\t\tprovide: NG_VALUE_ACCESSOR,\n\t\t\tuseExisting: forwardRef(() => BrnCommandSearchInputDirective),\n\t\t\tmulti: true,\n\t\t},\n\t],\n\thost: {\n\t\trole: 'combobox',\n\t\t'aria-autocomplete': 'list',\n\t\t'[attr.aria-activedescendant]': '_activeDescendant()',\n\t\t'(keydown)': 'onKeyDown($event)',\n\t\t'(input)': 'onInput()',\n\t},\n})\nexport class BrnCommandSearchInputDirective extends DefaultValueAccessor {\n\tprivate readonly _command = injectBrnCommand();\n\n\t/** The initial value of the search input */\n\tpublic readonly value = input<string>('');\n\n\t/** @internal The mutable value of the search input */\n\tpublic readonly mutableValue = computed(() => signal(this.value()));\n\n\t/** @internal The \"real\" value of the search input */\n\tpublic readonly valueState = computed(() => this.mutableValue()());\n\n\t/** The id of the active option */\n\tprotected readonly _activeDescendant = signal<string | undefined>(undefined);\n\n\tconstructor(\n\t\trenderer: Renderer2,\n\t\tprivate readonly elementRef: ElementRef,\n\t\t@Optional() @Inject(COMPOSITION_BUFFER_MODE) compositionMode: boolean,\n\t) {\n\t\tsuper(renderer, elementRef, compositionMode);\n\t\tthis._command.keyManager.change\n\t\t\t.pipe(startWith(this._command.keyManager.activeItemIndex), takeUntilDestroyed())\n\t\t\t.subscribe(() => this._activeDescendant.set(this._command.keyManager.activeItem?.id()));\n\t\teffect(() => {\n\t\t\tthis.elementRef.nativeElement.value = this.valueState();\n\t\t});\n\t}\n\t/** Listen for changes to the input value */\n\tprotected onInput(): void {\n\t\tthis.mutableValue().set(this.elementRef.nativeElement.value);\n\t}\n\n\t/** Listen for keydown events */\n\tprotected onKeyDown(event: KeyboardEvent): void {\n\t\tthis._command.keyManager.onKeydown(event);\n\t}\n\n\t/** CONROL VALUE ACCESSOR */\n\toverride writeValue(value: string | null): void {\n\t\tsuper.writeValue(value);\n\t\tif (value) {\n\t\t\tthis.mutableValue().set(value);\n\t\t}\n\t}\n}\n","import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';\nimport { isPlatformBrowser } from '@angular/common';\nimport {\n\tAfterViewInit,\n\tcomputed,\n\tcontentChild,\n\tcontentChildren,\n\tDirective,\n\teffect,\n\tHostListener,\n\tinject,\n\tInjector,\n\tinput,\n\toutput,\n\tPLATFORM_ID,\n\tuntracked,\n} from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\nimport { BrnCommandItemToken } from './brn-command-item.token';\nimport { BrnCommandSearchInputDirective } from './brn-command-search-input.directive';\nimport { provideBrnCommand } from './brn-command.token';\n\n@Directive({\n\tselector: '[brnCommand]',\n\tproviders: [provideBrnCommand(BrnCommandDirective)],\n\thost: {\n\t\t'[id]': 'id()',\n\t},\n})\nexport class BrnCommandDirective implements AfterViewInit {\n\tprivate static _id = 0;\n\n\tprivate readonly _platform = inject(PLATFORM_ID);\n\n\tprivate readonly _injector = inject(Injector);\n\n\t/** The id of the command */\n\tpublic readonly id = input<string>(`brn-command-${BrnCommandDirective._id++}`);\n\n\t/** The default filter function */\n\tprivate readonly _defaultFilter = (value: string, search: string) =>\n\t\tvalue.toLowerCase().includes(search.toLowerCase());\n\n\t/** A custom filter function to use when searching. */\n\tpublic readonly filter = input<CommandFilter>(this._defaultFilter);\n\n\t/** when the selection has changed */\n\tpublic readonly valueChange = output<string>();\n\n\t/** @internal The search query */\n\tpublic readonly search = computed(() => this._searchInput()?.valueState() ?? '');\n\n\t/** Access the search input if present */\n\tprivate readonly _searchInput = contentChild(BrnCommandSearchInputDirective, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal Access all the items within the commmand */\n\tpublic readonly items = contentChildren(BrnCommandItemToken, {\n\t\tdescendants: true,\n\t});\n\n\t/** @internal The key manager for managing active descendant */\n\tpublic readonly keyManager = new ActiveDescendantKeyManager(this.items, this._injector);\n\n\tconstructor() {\n\t\tthis.keyManager\n\t\t\t.withVerticalOrientation()\n\t\t\t.withHomeAndEnd()\n\t\t\t.withWrap()\n\t\t\t.skipPredicate((item) => item.disabled || !item.visible());\n\n\t\t// When clearing the search input we also want to reset the active item to the first one\n\t\teffect(() => {\n\t\t\tconst searchInput = this.search();\n\t\t\tuntracked(() => {\n\t\t\t\tconst activeItemIsVisible = this.keyManager.activeItem?.visible();\n\t\t\t\tif ((searchInput !== undefined && searchInput.length === 0) || !activeItemIsVisible) {\n\t\t\t\t\tthis.keyManager.setFirstItemActive();\n\t\t\t\t}\n\t\t\t});\n\t\t});\n\n\t\tthis.keyManager.change.pipe(takeUntilDestroyed()).subscribe(() => {\n\t\t\tconst value = this.keyManager.activeItem?.safeValue();\n\t\t\tif (value) {\n\t\t\t\tthis.valueChange.emit(value);\n\t\t\t}\n\t\t});\n\t}\n\n\tngAfterViewInit(): void {\n\t\tif (isPlatformBrowser(this._platform) && this.items().length) {\n\t\t\tthis.keyManager.setActiveItem(0);\n\t\t}\n\t}\n\n\t@HostListener('keydown.enter')\n\tprotected selectActiveItem(): void {\n\t\tthis.keyManager.activeItem?.selected.emit();\n\t}\n}\n\nexport type CommandFilter = (value: string, search: string) => boolean;\n","import { NgModule } from '@angular/core';\nimport { BrnCommandEmptyDirective } from './lib/brn-command-empty.directive';\nimport { BrnCommandGroupDirective } from './lib/brn-command-group.directive';\nimport { BrnCommandItemDirective } from './lib/brn-command-item.directive';\nimport { BrnCommandListDirective } from './lib/brn-command-list.directive';\nimport { BrnCommandSearchInputDirective } from './lib/brn-command-search-input.directive';\nimport { BrnCommandDirective } from './lib/brn-command.directive';\n\nexport * from './lib/brn-command-empty.directive';\nexport * from './lib/brn-command-group.directive';\nexport * from './lib/brn-command-item.directive';\nexport * from './lib/brn-command-item.token';\nexport * from './lib/brn-command-list.directive';\nexport * from './lib/brn-command-search-input.directive';\nexport * from './lib/brn-command-search-input.token';\nexport * from './lib/brn-command.directive';\nexport * from './lib/brn-command.token';\n\nexport const BrnCommandImports = [\n\tBrnCommandEmptyDirective,\n\tBrnCommandGroupDirective,\n\tBrnCommandItemDirective,\n\tBrnCommandListDirective,\n\tBrnCommandSearchInputDirective,\n\tBrnCommandDirective,\n] as const;\n\n@NgModule({\n\timports: [...BrnCommandImports],\n\texports: [...BrnCommandImports],\n})\nexport class BrnCommandModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;MAGa,eAAe,GAAG,IAAI,cAAc,CAAsB,iBAAiB;AAElF,SAAU,iBAAiB,CAAC,OAAkC,EAAA;IACnE,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,WAAW,EAAE,OAAO,EAAE;AAC1D;SAEgB,gBAAgB,GAAA;AAC/B,IAAA,OAAO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