@spartan-ng/brain 0.0.1-alpha.396 → 0.0.1-alpha.397

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.
Files changed (35) hide show
  1. package/command/index.d.ts +19 -24
  2. package/command/lib/brn-command-empty.directive.d.ts +8 -3
  3. package/command/lib/brn-command-group.directive.d.ts +12 -0
  4. package/command/lib/brn-command-item.directive.d.ts +30 -3
  5. package/command/lib/brn-command-item.token.d.ts +4 -0
  6. package/command/lib/brn-command-list.directive.d.ts +8 -0
  7. package/command/lib/brn-command-search-input.directive.d.ts +16 -0
  8. package/command/lib/brn-command-search-input.token.d.ts +4 -0
  9. package/command/lib/brn-command.directive.d.ts +28 -0
  10. package/command/lib/brn-command.token.d.ts +5 -0
  11. package/esm2022/command/index.mjs +26 -42
  12. package/esm2022/command/lib/brn-command-empty.directive.mjs +23 -22
  13. package/esm2022/command/lib/brn-command-group.directive.mjs +29 -0
  14. package/esm2022/command/lib/brn-command-item.directive.mjs +68 -28
  15. package/esm2022/command/lib/brn-command-item.token.mjs +6 -0
  16. package/esm2022/command/lib/brn-command-list.directive.mjs +21 -0
  17. package/esm2022/command/lib/brn-command-search-input.directive.mjs +49 -0
  18. package/esm2022/command/lib/brn-command-search-input.token.mjs +6 -0
  19. package/esm2022/command/lib/brn-command.directive.mjs +63 -0
  20. package/esm2022/command/lib/brn-command.token.mjs +9 -0
  21. package/fesm2022/spartan-ng-brain-command.mjs +233 -213
  22. package/fesm2022/spartan-ng-brain-command.mjs.map +1 -1
  23. package/package.json +7 -19
  24. package/command/lib/brn-command-group.component.d.ts +0 -6
  25. package/command/lib/brn-command-input.directive.d.ts +0 -6
  26. package/command/lib/brn-command-list.component.d.ts +0 -6
  27. package/command/lib/brn-command-loader.directive.d.ts +0 -6
  28. package/command/lib/brn-command-separator.component.d.ts +0 -6
  29. package/command/lib/brn-command.component.d.ts +0 -6
  30. package/esm2022/command/lib/brn-command-group.component.mjs +0 -45
  31. package/esm2022/command/lib/brn-command-input.directive.mjs +0 -29
  32. package/esm2022/command/lib/brn-command-list.component.mjs +0 -35
  33. package/esm2022/command/lib/brn-command-loader.directive.mjs +0 -29
  34. package/esm2022/command/lib/brn-command-separator.component.mjs +0 -30
  35. package/esm2022/command/lib/brn-command.component.mjs +0 -21
@@ -1,272 +1,292 @@
1
1
  import * as i0 from '@angular/core';
2
- import { forwardRef, Directive, Component, NgModule } from '@angular/core';
3
- import { EmptyDirective, GroupComponent, InputDirective, ItemDirective, ListComponent, LoaderDirective, SeparatorComponent, CommandComponent, CmdkService, CmdkModule } from '@ngxpert/cmdk';
4
- import { NgIf } from '@angular/common';
5
- import * as i1 from '@ngneat/overview';
6
- import { DynamicViewModule } from '@ngneat/overview';
7
- import { __decorate } from 'tslib';
8
- import { UntilDestroy } from '@ngneat/until-destroy';
2
+ import { InjectionToken, inject, TemplateRef, ViewContainerRef, computed, effect, Directive, input, contentChildren, PLATFORM_ID, ElementRef, booleanAttribute, signal, output, HostListener, Injector, contentChild, NgModule } from '@angular/core';
3
+ import { isPlatformBrowser } from '@angular/common';
4
+ import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
5
+ import { startWith } from 'rxjs/operators';
6
+ import { ActiveDescendantKeyManager } from '@angular/cdk/a11y';
9
7
 
10
- class BrnCommandEmptyDirective extends EmptyDirective {
11
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandEmptyDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
12
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandEmptyDirective, isStandalone: true, selector: "[brnCmdEmpty]", host: { classAttribute: "cmdk-empty" }, providers: [
13
- {
14
- provide: EmptyDirective,
15
- useExisting: forwardRef((() => BrnCommandEmptyDirective)),
16
- },
17
- ], usesInheritance: true, ngImport: i0 });
8
+ const BrnCommandToken = new InjectionToken('BrnCommandToken');
9
+ function provideBrnCommand(command) {
10
+ return { provide: BrnCommandToken, useExisting: command };
11
+ }
12
+ function injectBrnCommand() {
13
+ return inject(BrnCommandToken);
14
+ }
15
+
16
+ class BrnCommandEmptyDirective {
17
+ _templateRef = inject(TemplateRef);
18
+ _viewContainerRef = inject(ViewContainerRef);
19
+ _command = injectBrnCommand();
20
+ /** Determine if the command has any visible items */
21
+ _visible = computed(() => this._command.items().some((item) => item.visible()));
22
+ constructor() {
23
+ effect(() => {
24
+ if (this._visible()) {
25
+ this._viewContainerRef.clear();
26
+ }
27
+ else {
28
+ this._viewContainerRef.createEmbeddedView(this._templateRef);
29
+ }
30
+ });
31
+ }
32
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandEmptyDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
33
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandEmptyDirective, isStandalone: true, selector: "[brnCommandEmpty]", ngImport: i0 });
18
34
  }
19
35
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandEmptyDirective, decorators: [{
20
36
  type: Directive,
21
37
  args: [{
22
- selector: '[brnCmdEmpty]',
23
38
  standalone: true,
24
- providers: [
25
- {
26
- provide: EmptyDirective,
27
- useExisting: forwardRef((() => BrnCommandEmptyDirective)),
28
- },
29
- ],
30
- host: {
31
- class: 'cmdk-empty',
32
- },
39
+ selector: '[brnCommandEmpty]',
33
40
  }]
34
- }] });
41
+ }], ctorParameters: () => [] });
35
42
 
36
- class BrnCommandGroupComponent extends GroupComponent {
37
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandGroupComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
38
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandGroupComponent, isStandalone: true, selector: "brn-cmd-group", providers: [
39
- {
40
- provide: GroupComponent,
41
- useExisting: forwardRef((() => BrnCommandGroupComponent)),
42
- },
43
- ], usesInheritance: true, ngImport: i0, template: `
44
- <div role="presentation" *ngIf="label" class="cmdk-group-label">
45
- <ng-container *dynamicView="label"></ng-container>
46
- </div>
47
- <div class="cmdk-group-content" role="group" [attr.aria-label]="ariaLabel">
48
- <ng-content></ng-content>
49
- </div>
50
- `, isInline: true, dependencies: [{ kind: "directive", type: NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "ngmodule", type: DynamicViewModule }, { kind: "directive", type: i1.DynamicViewDirective, selector: "[dynamicView]", inputs: ["dynamicView", "dynamicViewInjector", "dynamicViewContext", "dynamicViewInputs"] }] });
43
+ const BrnCommandItemToken = new InjectionToken('BrnCommandItemToken');
44
+ function provideBrnCommandItem(command) {
45
+ return { provide: BrnCommandItemToken, useExisting: command };
51
46
  }
52
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandGroupComponent, decorators: [{
53
- type: Component,
54
- args: [{
55
- selector: 'brn-cmd-group',
56
- standalone: true,
57
- imports: [NgIf, DynamicViewModule],
58
- providers: [
59
- {
60
- provide: GroupComponent,
61
- useExisting: forwardRef((() => BrnCommandGroupComponent)),
62
- },
63
- ],
64
- template: `
65
- <div role="presentation" *ngIf="label" class="cmdk-group-label">
66
- <ng-container *dynamicView="label"></ng-container>
67
- </div>
68
- <div class="cmdk-group-content" role="group" [attr.aria-label]="ariaLabel">
69
- <ng-content></ng-content>
70
- </div>
71
- `,
72
- }]
73
- }] });
74
47
 
75
- class BrnCommandInputDirective extends InputDirective {
76
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandInputDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
77
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandInputDirective, isStandalone: true, selector: "input[brnCmdInput]", host: { classAttribute: "cmdk-input" }, providers: [
78
- {
79
- provide: InputDirective,
80
- useExisting: forwardRef((() => BrnCommandInputDirective)),
81
- },
82
- ], usesInheritance: true, ngImport: i0 });
48
+ class BrnCommandGroupDirective {
49
+ static _id = 0;
50
+ /** The id of the command list */
51
+ id = input(`brn-command-group-${BrnCommandGroupDirective._id++}`);
52
+ /** Get the items in the group */
53
+ _items = contentChildren(BrnCommandItemToken, {
54
+ descendants: true,
55
+ });
56
+ /** Determine if there are any visible items in the group */
57
+ visible = computed(() => this._items().some((item) => item.visible()));
58
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandGroupDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
59
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.5", 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 });
83
60
  }
84
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandInputDirective, decorators: [{
61
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandGroupDirective, decorators: [{
85
62
  type: Directive,
86
63
  args: [{
87
- selector: 'input[brnCmdInput]',
64
+ selector: '[brnCommandGroup]',
88
65
  standalone: true,
89
- providers: [
90
- {
91
- provide: InputDirective,
92
- useExisting: forwardRef((() => BrnCommandInputDirective)),
93
- },
94
- ],
95
66
  host: {
96
- class: 'cmdk-input',
67
+ role: 'group',
68
+ '[attr.data-hidden]': '!visible() ? "" : null',
69
+ '[id]': 'id()',
97
70
  },
98
71
  }]
99
72
  }] });
100
73
 
101
- let BrnCommandItemDirective = class BrnCommandItemDirective extends ItemDirective {
102
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandItemDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
103
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandItemDirective, isStandalone: true, selector: "[brnCmdItem]", host: { attributes: { "tabindex": "-1" }, classAttribute: "cmdk-item" }, providers: [
104
- {
105
- provide: ItemDirective,
106
- useExisting: forwardRef((() => BrnCommandItemDirective)),
107
- },
108
- ], usesInheritance: true, ngImport: i0 });
109
- };
110
- BrnCommandItemDirective = __decorate([
111
- UntilDestroy()
112
- ], BrnCommandItemDirective);
74
+ class BrnCommandItemDirective {
75
+ static _id = 0;
76
+ _platform = inject(PLATFORM_ID);
77
+ _elementRef = inject(ElementRef);
78
+ /** Access the command component */
79
+ _command = injectBrnCommand();
80
+ /** A unique id for the item */
81
+ id = input(`brn-command-item-${BrnCommandItemDirective._id++}`);
82
+ /** The value this item represents. */
83
+ value = input.required();
84
+ /** Whether the item is disabled. */
85
+ _disabled = input(false, {
86
+ alias: 'disabled',
87
+ transform: booleanAttribute,
88
+ });
89
+ /** Expose disabled as a value - used by the Highlightable interface */
90
+ get disabled() {
91
+ return this._disabled();
92
+ }
93
+ /** Whether the item is selected. */
94
+ active = signal(false);
95
+ /** Emits when the item is selected. */
96
+ selected = output();
97
+ /** @internal Determine if this item is visible based on the current search query */
98
+ visible = computed(() => this._command.filter()(this.value(), this._command.search()));
99
+ /** @internal Get the display value */
100
+ getLabel() {
101
+ return this.value();
102
+ }
103
+ /** @internal */
104
+ setActiveStyles() {
105
+ this.active.set(true);
106
+ // ensure the item is in view
107
+ if (isPlatformBrowser(this._platform)) {
108
+ this._elementRef.nativeElement.scrollIntoView({ block: 'nearest' });
109
+ }
110
+ }
111
+ /** @internal */
112
+ setInactiveStyles() {
113
+ this.active.set(false);
114
+ }
115
+ onClick() {
116
+ this._command.keyManager.setActiveItem(this);
117
+ this.selected.emit();
118
+ }
119
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandItemDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
120
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", 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-value": "value()", "attr.data-hidden": "!visible() ? '' : null", "attr.aria-selected": "active()", "attr.data-selected": "active() ? '' : null" } }, providers: [provideBrnCommandItem(BrnCommandItemDirective)], ngImport: i0 });
121
+ }
113
122
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandItemDirective, decorators: [{
114
123
  type: Directive,
115
124
  args: [{
116
- selector: '[brnCmdItem]',
125
+ selector: 'button[brnCommandItem]',
117
126
  standalone: true,
118
- providers: [
119
- {
120
- provide: ItemDirective,
121
- useExisting: forwardRef((() => BrnCommandItemDirective)),
122
- },
123
- ],
127
+ providers: [provideBrnCommandItem(BrnCommandItemDirective)],
124
128
  host: {
125
- tabindex: '-1',
126
- class: 'cmdk-item',
129
+ type: 'button',
130
+ role: 'option',
131
+ tabIndex: '-1',
132
+ '[id]': 'id()',
133
+ '[attr.disabled]': '_disabled() ? true : null',
134
+ '[attr.data-value]': 'value()',
135
+ '[attr.data-hidden]': "!visible() ? '' : null",
136
+ '[attr.aria-selected]': 'active()',
137
+ '[attr.data-selected]': "active() ? '' : null",
127
138
  },
128
139
  }]
129
- }] });
130
-
131
- class BrnCommandListComponent extends ListComponent {
132
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandListComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
133
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandListComponent, isStandalone: true, selector: "brn-cmd-list", providers: [
134
- {
135
- provide: ListComponent,
136
- useExisting: forwardRef((() => BrnCommandListComponent)),
137
- },
138
- ], usesInheritance: true, ngImport: i0, template: `
139
- <div class="cmdk-list-content" role="listbox" [attr.aria-label]="ariaLabel" #height>
140
- <ng-content></ng-content>
141
- </div>
142
- `, isInline: true });
143
- }
144
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandListComponent, decorators: [{
145
- type: Component,
146
- args: [{
147
- selector: 'brn-cmd-list',
148
- standalone: true,
149
- providers: [
150
- {
151
- provide: ListComponent,
152
- useExisting: forwardRef((() => BrnCommandListComponent)),
153
- },
154
- ],
155
- template: `
156
- <div class="cmdk-list-content" role="listbox" [attr.aria-label]="ariaLabel" #height>
157
- <ng-content></ng-content>
158
- </div>
159
- `,
160
- }]
161
- }] });
140
+ }], propDecorators: { onClick: [{
141
+ type: HostListener,
142
+ args: ['click']
143
+ }] } });
162
144
 
163
- class BrnCommandLoaderDirective extends LoaderDirective {
164
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandLoaderDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
165
- /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandLoaderDirective, isStandalone: true, selector: "[brnCmdLoader]", host: { classAttribute: "cmdk-loader" }, providers: [
166
- {
167
- provide: LoaderDirective,
168
- useExisting: forwardRef((() => BrnCommandLoaderDirective)),
169
- },
170
- ], usesInheritance: true, ngImport: i0 });
145
+ class BrnCommandListDirective {
146
+ static _id = 0;
147
+ /** The id of the command list */
148
+ id = input(`brn-command-list-${BrnCommandListDirective._id++}`);
149
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandListDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
150
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "18.2.5", type: BrnCommandListDirective, isStandalone: true, selector: "[brnCommandList]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null } }, host: { attributes: { "role": "listbox" }, properties: { "id": "id()" } }, ngImport: i0 });
171
151
  }
172
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandLoaderDirective, decorators: [{
152
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandListDirective, decorators: [{
173
153
  type: Directive,
174
154
  args: [{
175
- selector: '[brnCmdLoader]',
176
155
  standalone: true,
177
- providers: [
178
- {
179
- provide: LoaderDirective,
180
- useExisting: forwardRef((() => BrnCommandLoaderDirective)),
181
- },
182
- ],
156
+ selector: '[brnCommandList]',
183
157
  host: {
184
- class: 'cmdk-loader',
158
+ role: 'listbox',
159
+ '[id]': 'id()',
185
160
  },
186
161
  }]
187
162
  }] });
188
163
 
189
- class BrnCommandSeparatorComponent extends SeparatorComponent {
190
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandSeparatorComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
191
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandSeparatorComponent, isStandalone: true, selector: "brn-cmd-separator", host: { classAttribute: "cmdk-separator" }, providers: [
192
- {
193
- provide: SeparatorComponent,
194
- useExisting: forwardRef((() => BrnCommandSeparatorComponent)),
195
- },
196
- ], usesInheritance: true, ngImport: i0, template: '<hr>', isInline: true });
164
+ const BrnCommandSearchInputToken = new InjectionToken('BrnCommandSearchInputToken');
165
+ function provideBrnCommandSearchInput(command) {
166
+ return { provide: BrnCommandSearchInputToken, useExisting: command };
167
+ }
168
+
169
+ class BrnCommandSearchInputDirective {
170
+ _command = injectBrnCommand();
171
+ _elementRef = inject(ElementRef);
172
+ /** @internal Expose the current text value */
173
+ value = signal('');
174
+ /** The id of the active option */
175
+ _activeDescendant = signal(undefined);
176
+ constructor() {
177
+ this._command.keyManager.change
178
+ .pipe(startWith(this._command.keyManager.activeItemIndex), takeUntilDestroyed())
179
+ .subscribe(() => this._activeDescendant.set(this._command.keyManager.activeItem?.id()));
180
+ }
181
+ /** Listen for changes to the input value */
182
+ onInput() {
183
+ this.value.set(this._elementRef.nativeElement.value);
184
+ }
185
+ /** Listen for keydown events */
186
+ onKeyDown(event) {
187
+ this._command.keyManager.onKeydown(event);
188
+ }
189
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandSearchInputDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
190
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandSearchInputDirective, isStandalone: true, selector: "input[brnCommandSearchInput]", host: { attributes: { "role": "combobox", "aria-autocomplete": "list" }, listeners: { "input": "onInput()", "keydown": "onKeyDown($event)" }, properties: { "attr.aria-activedescendant": "_activeDescendant()" } }, providers: [provideBrnCommandSearchInput(BrnCommandSearchInputDirective)], ngImport: i0 });
197
191
  }
198
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandSeparatorComponent, decorators: [{
199
- type: Component,
192
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandSearchInputDirective, decorators: [{
193
+ type: Directive,
200
194
  args: [{
201
- selector: 'brn-cmd-separator',
195
+ selector: 'input[brnCommandSearchInput]',
202
196
  standalone: true,
203
- template: '<hr>',
204
- providers: [
205
- {
206
- provide: SeparatorComponent,
207
- useExisting: forwardRef((() => BrnCommandSeparatorComponent)),
208
- },
209
- ],
197
+ providers: [provideBrnCommandSearchInput(BrnCommandSearchInputDirective)],
210
198
  host: {
211
- class: 'cmdk-separator',
199
+ role: 'combobox',
200
+ 'aria-autocomplete': 'list',
201
+ '[attr.aria-activedescendant]': '_activeDescendant()',
212
202
  },
213
203
  }]
214
- }] });
204
+ }], ctorParameters: () => [], propDecorators: { onInput: [{
205
+ type: HostListener,
206
+ args: ['input']
207
+ }], onKeyDown: [{
208
+ type: HostListener,
209
+ args: ['keydown', ['$event']]
210
+ }] } });
215
211
 
216
- class BrnCommandComponent extends CommandComponent {
217
- /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandComponent, deps: null, target: i0.ɵɵFactoryTarget.Component });
218
- /** @nocollapse */ static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.5", type: BrnCommandComponent, isStandalone: true, selector: "brn-cmd", providers: [CmdkService], usesInheritance: true, ngImport: i0, template: `
219
- <ng-content />
220
- `, isInline: true });
212
+ class BrnCommandDirective {
213
+ static _id = 0;
214
+ _platform = inject(PLATFORM_ID);
215
+ _injector = inject(Injector);
216
+ /** The id of the command */
217
+ id = input(`brn-command-${BrnCommandDirective._id++}`);
218
+ /** The default filter function */
219
+ _defaultFilter = (value, search) => value.toLowerCase().includes(search.toLowerCase());
220
+ /** A custom filter function to use when searching. */
221
+ filter = input(this._defaultFilter);
222
+ /** @internal The search query */
223
+ search = computed(() => this._searchInput()?.value() ?? '');
224
+ /** Access the search input if present */
225
+ _searchInput = contentChild(BrnCommandSearchInputDirective, {
226
+ descendants: true,
227
+ });
228
+ /** @internal Access all the items within the commmand */
229
+ items = contentChildren(BrnCommandItemToken, {
230
+ descendants: true,
231
+ });
232
+ /** @internal The key manager for managing active descendant */
233
+ keyManager = new ActiveDescendantKeyManager(this.items, this._injector);
234
+ constructor() {
235
+ this.keyManager
236
+ .withVerticalOrientation()
237
+ .withHomeAndEnd()
238
+ .withWrap()
239
+ .withTypeAhead()
240
+ .skipPredicate((item) => item.disabled || !item.visible());
241
+ }
242
+ ngAfterViewInit() {
243
+ if (isPlatformBrowser(this._platform) && this.items().length) {
244
+ this.keyManager.setActiveItem(0);
245
+ }
246
+ }
247
+ selectActiveItem() {
248
+ this.keyManager.activeItem?.selected.emit();
249
+ }
250
+ /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
251
+ /** @nocollapse */ static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.2.0", version: "18.2.5", type: BrnCommandDirective, isStandalone: true, selector: "[brnCommand]", inputs: { id: { classPropertyName: "id", publicName: "id", isSignal: true, isRequired: false, transformFunction: null }, filter: { classPropertyName: "filter", publicName: "filter", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "keydown.enter": "selectActiveItem()" }, properties: { "id": "id()" } }, providers: [provideBrnCommand(BrnCommandDirective)], queries: [{ propertyName: "_searchInput", first: true, predicate: BrnCommandSearchInputDirective, descendants: true, isSignal: true }, { propertyName: "items", predicate: BrnCommandItemToken, descendants: true, isSignal: true }], ngImport: i0 });
221
252
  }
222
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandComponent, decorators: [{
223
- type: Component,
253
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandDirective, decorators: [{
254
+ type: Directive,
224
255
  args: [{
225
- selector: 'brn-cmd',
256
+ selector: '[brnCommand]',
226
257
  standalone: true,
227
- providers: [CmdkService],
228
- template: `
229
- <ng-content />
230
- `,
258
+ providers: [provideBrnCommand(BrnCommandDirective)],
259
+ host: {
260
+ '[id]': 'id()',
261
+ },
231
262
  }]
232
- }] });
263
+ }], ctorParameters: () => [], propDecorators: { selectActiveItem: [{
264
+ type: HostListener,
265
+ args: ['keydown.enter']
266
+ }] } });
233
267
 
234
268
  const BrnCommandImports = [
235
- CmdkModule,
236
- BrnCommandComponent,
237
269
  BrnCommandEmptyDirective,
238
- BrnCommandGroupComponent,
239
- BrnCommandInputDirective,
270
+ BrnCommandGroupDirective,
240
271
  BrnCommandItemDirective,
241
- BrnCommandListComponent,
242
- BrnCommandLoaderDirective,
243
- BrnCommandSeparatorComponent,
244
- BrnCommandSeparatorComponent,
272
+ BrnCommandListDirective,
273
+ BrnCommandSearchInputDirective,
274
+ BrnCommandDirective,
245
275
  ];
246
276
  class BrnCommandModule {
247
277
  /** @nocollapse */ static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
248
- /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandModule, imports: [CmdkModule,
249
- BrnCommandComponent,
250
- BrnCommandEmptyDirective,
251
- BrnCommandGroupComponent,
252
- BrnCommandInputDirective,
278
+ /** @nocollapse */ static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandModule, imports: [BrnCommandEmptyDirective,
279
+ BrnCommandGroupDirective,
253
280
  BrnCommandItemDirective,
254
- BrnCommandListComponent,
255
- BrnCommandLoaderDirective,
256
- BrnCommandSeparatorComponent,
257
- BrnCommandSeparatorComponent], exports: [CmdkModule,
258
- BrnCommandComponent,
259
- BrnCommandEmptyDirective,
260
- BrnCommandGroupComponent,
261
- BrnCommandInputDirective,
281
+ BrnCommandListDirective,
282
+ BrnCommandSearchInputDirective,
283
+ BrnCommandDirective], exports: [BrnCommandEmptyDirective,
284
+ BrnCommandGroupDirective,
262
285
  BrnCommandItemDirective,
263
- BrnCommandListComponent,
264
- BrnCommandLoaderDirective,
265
- BrnCommandSeparatorComponent,
266
- BrnCommandSeparatorComponent] });
267
- /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandModule, imports: [CmdkModule,
268
- BrnCommandGroupComponent,
269
- CmdkModule] });
286
+ BrnCommandListDirective,
287
+ BrnCommandSearchInputDirective,
288
+ BrnCommandDirective] });
289
+ /** @nocollapse */ static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandModule });
270
290
  }
271
291
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImport: i0, type: BrnCommandModule, decorators: [{
272
292
  type: NgModule,
@@ -280,5 +300,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.5", ngImpor
280
300
  * Generated bundle index. Do not edit.
281
301
  */
282
302
 
283
- export { BrnCommandComponent, BrnCommandEmptyDirective, BrnCommandGroupComponent, BrnCommandImports, BrnCommandInputDirective, BrnCommandItemDirective, BrnCommandListComponent, BrnCommandLoaderDirective, BrnCommandModule, BrnCommandSeparatorComponent };
303
+ export { BrnCommandDirective, BrnCommandEmptyDirective, BrnCommandGroupDirective, BrnCommandImports, BrnCommandItemDirective, BrnCommandItemToken, BrnCommandListDirective, BrnCommandModule, BrnCommandSearchInputDirective, BrnCommandSearchInputToken, BrnCommandToken, injectBrnCommand, provideBrnCommand, provideBrnCommandItem, provideBrnCommandSearchInput };
284
304
  //# sourceMappingURL=spartan-ng-brain-command.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"spartan-ng-brain-command.mjs","sources":["../../../../libs/brain/command/src/lib/brn-command-empty.directive.ts","../../../../libs/brain/command/src/lib/brn-command-group.component.ts","../../../../libs/brain/command/src/lib/brn-command-input.directive.ts","../../../../libs/brain/command/src/lib/brn-command-item.directive.ts","../../../../libs/brain/command/src/lib/brn-command-list.component.ts","../../../../libs/brain/command/src/lib/brn-command-loader.directive.ts","../../../../libs/brain/command/src/lib/brn-command-separator.component.ts","../../../../libs/brain/command/src/lib/brn-command.component.ts","../../../../libs/brain/command/src/index.ts","../../../../libs/brain/command/src/spartan-ng-brain-command.ts"],"sourcesContent":["import { Directive, forwardRef } from '@angular/core';\nimport { EmptyDirective } from '@ngxpert/cmdk';\n\n@Directive({\n\tselector: '[brnCmdEmpty]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: EmptyDirective,\n\t\t\tuseExisting: forwardRef(() => BrnCommandEmptyDirective),\n\t\t},\n\t],\n\thost: {\n\t\tclass: 'cmdk-empty',\n\t},\n})\nexport class BrnCommandEmptyDirective extends EmptyDirective {}\n","import { NgIf } from '@angular/common';\nimport { Component, forwardRef } from '@angular/core';\nimport { DynamicViewModule } from '@ngneat/overview';\nimport { GroupComponent } from '@ngxpert/cmdk';\n\n@Component({\n\tselector: 'brn-cmd-group',\n\tstandalone: true,\n\timports: [NgIf, DynamicViewModule],\n\tproviders: [\n\t\t{\n\t\t\tprovide: GroupComponent,\n\t\t\tuseExisting: forwardRef(() => BrnCommandGroupComponent),\n\t\t},\n\t],\n\ttemplate: `\n\t\t<div role=\"presentation\" *ngIf=\"label\" class=\"cmdk-group-label\">\n\t\t\t<ng-container *dynamicView=\"label\"></ng-container>\n\t\t</div>\n\t\t<div class=\"cmdk-group-content\" role=\"group\" [attr.aria-label]=\"ariaLabel\">\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t`,\n})\nexport class BrnCommandGroupComponent extends GroupComponent {}\n","import { Directive, forwardRef } from '@angular/core';\nimport { InputDirective } from '@ngxpert/cmdk';\n\n@Directive({\n\tselector: 'input[brnCmdInput]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: InputDirective,\n\t\t\tuseExisting: forwardRef(() => BrnCommandInputDirective),\n\t\t},\n\t],\n\thost: {\n\t\tclass: 'cmdk-input',\n\t},\n})\nexport class BrnCommandInputDirective extends InputDirective {}\n","import { Directive, forwardRef } from '@angular/core';\nimport { UntilDestroy } from '@ngneat/until-destroy';\nimport { ItemDirective } from '@ngxpert/cmdk';\n\n@UntilDestroy()\n@Directive({\n\tselector: '[brnCmdItem]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: ItemDirective,\n\t\t\tuseExisting: forwardRef(() => BrnCommandItemDirective),\n\t\t},\n\t],\n\thost: {\n\t\ttabindex: '-1',\n\t\tclass: 'cmdk-item',\n\t},\n})\nexport class BrnCommandItemDirective extends ItemDirective {}\n","import { Component, forwardRef } from '@angular/core';\nimport { ListComponent } from '@ngxpert/cmdk';\n\n@Component({\n\tselector: 'brn-cmd-list',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: ListComponent,\n\t\t\tuseExisting: forwardRef(() => BrnCommandListComponent),\n\t\t},\n\t],\n\ttemplate: `\n\t\t<div class=\"cmdk-list-content\" role=\"listbox\" [attr.aria-label]=\"ariaLabel\" #height>\n\t\t\t<ng-content></ng-content>\n\t\t</div>\n\t`,\n})\nexport class BrnCommandListComponent extends ListComponent {}\n","import { Directive, forwardRef } from '@angular/core';\nimport { LoaderDirective } from '@ngxpert/cmdk';\n\n@Directive({\n\tselector: '[brnCmdLoader]',\n\tstandalone: true,\n\tproviders: [\n\t\t{\n\t\t\tprovide: LoaderDirective,\n\t\t\tuseExisting: forwardRef(() => BrnCommandLoaderDirective),\n\t\t},\n\t],\n\thost: {\n\t\tclass: 'cmdk-loader',\n\t},\n})\nexport class BrnCommandLoaderDirective extends LoaderDirective {}\n","import { Component, forwardRef } from '@angular/core';\nimport { SeparatorComponent } from '@ngxpert/cmdk';\n\n@Component({\n\tselector: 'brn-cmd-separator',\n\tstandalone: true,\n\ttemplate: '<hr>',\n\tproviders: [\n\t\t{\n\t\t\tprovide: SeparatorComponent,\n\t\t\tuseExisting: forwardRef(() => BrnCommandSeparatorComponent),\n\t\t},\n\t],\n\thost: {\n\t\tclass: 'cmdk-separator',\n\t},\n})\nexport class BrnCommandSeparatorComponent extends SeparatorComponent {}\n","import { Component } from '@angular/core';\nimport { CmdkService, CommandComponent } from '@ngxpert/cmdk';\n\n@Component({\n\tselector: 'brn-cmd',\n\tstandalone: true,\n\tproviders: [CmdkService],\n\ttemplate: `\n\t\t<ng-content />\n\t`,\n})\nexport class BrnCommandComponent extends CommandComponent {}\n","import { NgModule } from '@angular/core';\n\nimport { CmdkModule } from '@ngxpert/cmdk';\nimport { BrnCommandEmptyDirective } from './lib/brn-command-empty.directive';\nimport { BrnCommandGroupComponent } from './lib/brn-command-group.component';\nimport { BrnCommandInputDirective } from './lib/brn-command-input.directive';\nimport { BrnCommandItemDirective } from './lib/brn-command-item.directive';\nimport { BrnCommandListComponent } from './lib/brn-command-list.component';\nimport { BrnCommandLoaderDirective } from './lib/brn-command-loader.directive';\nimport { BrnCommandSeparatorComponent } from './lib/brn-command-separator.component';\nimport { BrnCommandComponent } from './lib/brn-command.component';\n\nexport * from './lib/brn-command-empty.directive';\nexport * from './lib/brn-command-group.component';\nexport * from './lib/brn-command-input.directive';\nexport * from './lib/brn-command-item.directive';\nexport * from './lib/brn-command-list.component';\nexport * from './lib/brn-command-loader.directive';\nexport * from './lib/brn-command-separator.component';\nexport * from './lib/brn-command.component';\n\nexport const BrnCommandImports = [\n\tCmdkModule,\n\tBrnCommandComponent,\n\tBrnCommandEmptyDirective,\n\tBrnCommandGroupComponent,\n\tBrnCommandInputDirective,\n\tBrnCommandItemDirective,\n\tBrnCommandListComponent,\n\tBrnCommandLoaderDirective,\n\tBrnCommandSeparatorComponent,\n\tBrnCommandSeparatorComponent,\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":";;;;;;;;;AAgBM,MAAO,wBAAyB,SAAQ,cAAc,CAAA;0HAA/C,wBAAwB,EAAA,IAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA;AAAxB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,IAAA,EAAA,wBAAwB,EAVzB,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,eAAA,EAAA,IAAA,EAAA,EAAA,cAAA,EAAA,YAAA,EAAA,EAAA,SAAA,EAAA;AACV,YAAA;AACC,gBAAA,OAAO,EAAE,cAAc;AACvB,gBAAA,WAAW,EAAE,UAAU,EAAC,MAAM,wBAAwB,EAAC;AACvD,aAAA;AACD,SAAA,EAAA,eAAA,EAAA,IAAA,EAAA,QAAA,EAAA,EAAA,EAAA,CAAA;;2FAKW,wBAAwB,EAAA,UAAA,EAAA,CAAA;kBAbpC,SAAS;AAAC,YAAA,IAAA,EAAA,CAAA;AACV,oBAAA,QAAQ,EAAE,eAAe;AACzB,oBAAA,UAAU,EA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AA4B;;MAOhB,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,YAhB5B,UAAU;YACV,mBAAmB;YACnB,wBAAwB;YACxB,wBAAwB;YACxB,wBAAwB;YACxB,uBAAuB;YACvB,uBAAuB;YACvB,yBAAyB;YACzB,4BAA4B;AAC5B,YAAA,4BAA4B,aAT5B,UAAU;YACV,mBAAmB;YACnB,wBAAwB;YACxB,wBAAwB;YACxB,wBAAwB;YACxB,uBAAuB;YACvB,uBAAuB;YACvB,yBAAyB;YACzB,4BAA4B;YAC5B,4BAA4B,CAAA,EAAA,CAAA;AAOhB,uBAAA,OAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,gBAAgB,YAhB5B,UAAU;YAGV,wBAAwB;YAHxB,UAAU,CAAA,EAAA,CAAA;;2FAgBE,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;;;ACrCD;;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\tstandalone: true,\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\tstandalone: true,\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\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\tstandalone: true,\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-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 {\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 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(() => this._command.filter()(this.value(), this._command.search()));\n\n\t/** @internal Get the display value */\n\tpublic getLabel(): string {\n\t\treturn this.value();\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","import { Directive, input } from '@angular/core';\n\n@Directive({\n\tstandalone: true,\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 { Directive, ElementRef, HostListener, inject, signal } from '@angular/core';\nimport { takeUntilDestroyed } from '@angular/core/rxjs-interop';\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\tstandalone: true,\n\tproviders: [provideBrnCommandSearchInput(BrnCommandSearchInputDirective)],\n\thost: {\n\t\trole: 'combobox',\n\t\t'aria-autocomplete': 'list',\n\t\t'[attr.aria-activedescendant]': '_activeDescendant()',\n\t},\n})\nexport class BrnCommandSearchInputDirective {\n\tprivate readonly _command = injectBrnCommand();\n\tprivate readonly _elementRef = inject<ElementRef<HTMLInputElement>>(ElementRef);\n\n\t/** @internal Expose the current text value */\n\tpublic readonly value = signal<string>('');\n\n\t/** The id of the active option */\n\tprotected readonly _activeDescendant = signal<string | undefined>(undefined);\n\n\tconstructor() {\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}\n\n\t/** Listen for changes to the input value */\n\t@HostListener('input')\n\tprotected onInput(): void {\n\t\tthis.value.set(this._elementRef.nativeElement.value);\n\t}\n\n\t/** Listen for keydown events */\n\t@HostListener('keydown', ['$event'])\n\tprotected onKeyDown(event: KeyboardEvent): void {\n\t\tthis._command.keyManager.onKeydown(event);\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\tHostListener,\n\tinject,\n\tInjector,\n\tinput,\n\tPLATFORM_ID,\n} from '@angular/core';\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\tstandalone: true,\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/** @internal The search query */\n\tpublic readonly search = computed(() => this._searchInput()?.value() ?? '');\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.withTypeAhead()\n\t\t\t.skipPredicate((item) => item.disabled || !item.visible());\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,MAAM,CAAC,eAAe,CAAC;AAC/B;;MCJa,wBAAwB,CAAA;AACnB,IAAA,YAAY,GAAG,MAAM,CAAoB,WAAW,CAAC;AACrD,IAAA,iBAAiB,GAAG,MAAM,CAAC,gBAAgB,CAAC;IAC5C,QAAQ,GAAG,gBAAgB,EAAE;;IAG7B,QAAQ,GAAG,QAAQ,CAAC,MAAM,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CA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