@fundamental-ngx/core 0.49.2 → 0.49.3-rc.2
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/button/base-button.d.ts +1 -0
- package/esm2022/button/base-button.mjs +3 -2
- package/esm2022/shellbar/index.mjs +2 -1
- package/esm2022/shellbar/shellbar-actions/shellbar-actions.component.mjs +3 -3
- package/esm2022/shellbar/shellbar-actions-mobile/shellbar-actions-mobile.component.mjs +3 -3
- package/esm2022/shellbar/shellbar.component.mjs +6 -6
- package/esm2022/shellbar/user-menu/shellbar-user-menu-button.directive.mjs +34 -0
- package/esm2022/shellbar/user-menu/shellbar-user-menu.component.mjs +16 -5
- package/fesm2022/fundamental-ngx-core-button.mjs +3 -2
- package/fesm2022/fundamental-ngx-core-button.mjs.map +1 -1
- package/fesm2022/fundamental-ngx-core-shellbar.mjs +56 -15
- package/fesm2022/fundamental-ngx-core-shellbar.mjs.map +1 -1
- package/package.json +3 -3
- package/shellbar/index.d.ts +1 -0
- package/shellbar/shellbar.component.d.ts +1 -1
- package/shellbar/user-menu/shellbar-user-menu-button.directive.d.ts +12 -0
- package/shellbar/user-menu/shellbar-user-menu.component.d.ts +9 -2
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { ChangeDetectionStrategy, Component, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
1
|
+
import { ChangeDetectionStrategy, Component, ContentChild, EventEmitter, Input, Output, ViewChild } from '@angular/core';
|
|
2
2
|
import { AvatarComponent } from '@fundamental-ngx/core/avatar';
|
|
3
3
|
import { ButtonComponent } from '@fundamental-ngx/core/button';
|
|
4
4
|
import { MenuComponent, MenuModule } from '@fundamental-ngx/core/menu';
|
|
5
|
+
import { ShellbarUserMenuButtonDirective } from './shellbar-user-menu-button.directive';
|
|
5
6
|
import * as i0 from "@angular/core";
|
|
6
7
|
import * as i1 from "@fundamental-ngx/core/menu";
|
|
7
8
|
/**
|
|
@@ -27,6 +28,10 @@ export class ShellbarUserMenuComponent {
|
|
|
27
28
|
/** Event emitted on item click */
|
|
28
29
|
this.itemClicked = new EventEmitter();
|
|
29
30
|
}
|
|
31
|
+
/** Reference to Menu Component */
|
|
32
|
+
get menu() {
|
|
33
|
+
return this._contentPassedMenu || this._menu;
|
|
34
|
+
}
|
|
30
35
|
/**
|
|
31
36
|
* @hidden
|
|
32
37
|
*/
|
|
@@ -37,11 +42,11 @@ export class ShellbarUserMenuComponent {
|
|
|
37
42
|
}
|
|
38
43
|
}
|
|
39
44
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarUserMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
40
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarUserMenuComponent, isStandalone: true, selector: "fd-shellbar-user-menu", inputs: { user: "user", userMenu: "userMenu", fillControlMode: "fillControlMode", placement: "placement", triggers: "triggers", closeOnEscapeKey: "closeOnEscapeKey", closeOnOutsideClick: "closeOnOutsideClick", disabled: "disabled", noArrow: "noArrow" }, outputs: { itemClicked: "itemClicked" }, viewQueries: [{ propertyName: "
|
|
45
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarUserMenuComponent, isStandalone: true, selector: "fd-shellbar-user-menu", inputs: { user: "user", userMenu: "userMenu", fillControlMode: "fillControlMode", placement: "placement", triggers: "triggers", closeOnEscapeKey: "closeOnEscapeKey", closeOnOutsideClick: "closeOnOutsideClick", disabled: "disabled", noArrow: "noArrow" }, outputs: { itemClicked: "itemClicked" }, queries: [{ propertyName: "_contentPassedMenu", first: true, predicate: MenuComponent, descendants: true }, { propertyName: "_shellbarUserMenuButton", first: true, predicate: ShellbarUserMenuButtonDirective, descendants: true }], viewQueries: [{ propertyName: "_menu", first: true, predicate: MenuComponent, descendants: true }], ngImport: i0, template: "@if (user || _shellbarUserMenuButton) {\n <div class=\"fd-shellbar__action fd-shellbar__action--show-always\">\n <div class=\"fd-user-menu\">\n @if (!_shellbarUserMenuButton) {\n <button\n fd-button\n fdType=\"transparent\"\n fdShellbarUserMenuButton\n [disabled]=\"disabled\"\n [fdMenuTrigger]=\"menu\"\n >\n @if (!user.image) {\n <fd-avatar size=\"xs\" [colorAccent]=\"user.colorAccent\" [circle]=\"true\" [label]=\"user.fullName\">\n </fd-avatar>\n } @else {\n <fd-avatar\n [colorAccent]=\"user.colorAccent\"\n [circle]=\"true\"\n size=\"xs\"\n image=\"{{ user.image }}\"\n ></fd-avatar>\n }\n </button>\n } @else {\n <ng-content select=\"[fdShellbarUserMenuButton]\"></ng-content>\n }\n @if (userMenu) {\n <fd-menu\n [triggers]=\"triggers\"\n [placement]=\"placement\"\n [fillControlMode]=\"fillControlMode\"\n [closeOnEscapeKey]=\"closeOnEscapeKey\"\n [noArrow]=\"noArrow\"\n [closeOnOutsideClick]=\"closeOnOutsideClick\"\n >\n @for (item of userMenu; track item) {\n <li fd-menu-item (click)=\"itemClick(item, $event)\">\n <div fd-menu-interactive>\n <span fd-menu-title>{{ item.text }}</span>\n </div>\n </li>\n }\n </fd-menu>\n }\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i1.MenuComponent, selector: "fd-menu", inputs: ["mobile", "disabled", "focusTrapped", "focusAutoCapture", "openOnHoverTime", "mobileConfig", "ariaLabel", "ariaLabelledby", "id"], outputs: ["activePath"] }, { kind: "component", type: i1.MenuItemComponent, selector: "li[fd-menu-item]", inputs: ["disabled", "itemId", "submenu", "parentSubmenu", "hasSeparator"], outputs: ["onSelect"], exportAs: ["fd-menu-item"] }, { kind: "component", type: i1.MenuInteractiveComponent, selector: "[fd-menu-interactive]" }, { kind: "directive", type: i1.MenuTitleDirective, selector: "[fd-menu-title]" }, { kind: "directive", type: i1.MenuTriggerDirective, selector: "[fdMenuTrigger]", inputs: ["fdMenuTrigger"] }, { kind: "component", type: AvatarComponent, selector: "fd-avatar", inputs: ["class", "id", "ariaLabel", "ariaLabelledby", "label", "size", "font", "glyph", "zoomGlyph", "circle", "transparent", "contain", "placeholder", "tile", "border", "colorAccent", "random", "clickable", "valueState", "image", "alterIcon", "backupImage"], outputs: ["avatarClicked", "zoomGlyphClicked"] }, { kind: "directive", type: ShellbarUserMenuButtonDirective, selector: "[fd-button][fdShellbarUserMenuButton]", inputs: ["fdType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
41
46
|
}
|
|
42
47
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarUserMenuComponent, decorators: [{
|
|
43
48
|
type: Component,
|
|
44
|
-
args: [{ selector: 'fd-shellbar-user-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ButtonComponent, MenuModule, AvatarComponent], template: "@if (user) {\n <div class=\"fd-shellbar__action fd-shellbar__action--show-always\">\n <div class=\"fd-user-menu\">\n <button\n
|
|
49
|
+
args: [{ selector: 'fd-shellbar-user-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ButtonComponent, MenuModule, AvatarComponent, ShellbarUserMenuButtonDirective], template: "@if (user || _shellbarUserMenuButton) {\n <div class=\"fd-shellbar__action fd-shellbar__action--show-always\">\n <div class=\"fd-user-menu\">\n @if (!_shellbarUserMenuButton) {\n <button\n fd-button\n fdType=\"transparent\"\n fdShellbarUserMenuButton\n [disabled]=\"disabled\"\n [fdMenuTrigger]=\"menu\"\n >\n @if (!user.image) {\n <fd-avatar size=\"xs\" [colorAccent]=\"user.colorAccent\" [circle]=\"true\" [label]=\"user.fullName\">\n </fd-avatar>\n } @else {\n <fd-avatar\n [colorAccent]=\"user.colorAccent\"\n [circle]=\"true\"\n size=\"xs\"\n image=\"{{ user.image }}\"\n ></fd-avatar>\n }\n </button>\n } @else {\n <ng-content select=\"[fdShellbarUserMenuButton]\"></ng-content>\n }\n @if (userMenu) {\n <fd-menu\n [triggers]=\"triggers\"\n [placement]=\"placement\"\n [fillControlMode]=\"fillControlMode\"\n [closeOnEscapeKey]=\"closeOnEscapeKey\"\n [noArrow]=\"noArrow\"\n [closeOnOutsideClick]=\"closeOnOutsideClick\"\n >\n @for (item of userMenu; track item) {\n <li fd-menu-item (click)=\"itemClick(item, $event)\">\n <div fd-menu-interactive>\n <span fd-menu-title>{{ item.text }}</span>\n </div>\n </li>\n }\n </fd-menu>\n }\n </div>\n </div>\n}\n" }]
|
|
45
50
|
}], propDecorators: { user: [{
|
|
46
51
|
type: Input
|
|
47
52
|
}], userMenu: [{
|
|
@@ -62,8 +67,14 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
62
67
|
type: Input
|
|
63
68
|
}], itemClicked: [{
|
|
64
69
|
type: Output
|
|
65
|
-
}],
|
|
70
|
+
}], _menu: [{
|
|
66
71
|
type: ViewChild,
|
|
67
72
|
args: [MenuComponent]
|
|
73
|
+
}], _contentPassedMenu: [{
|
|
74
|
+
type: ContentChild,
|
|
75
|
+
args: [MenuComponent]
|
|
76
|
+
}], _shellbarUserMenuButton: [{
|
|
77
|
+
type: ContentChild,
|
|
78
|
+
args: [ShellbarUserMenuButtonDirective]
|
|
68
79
|
}] } });
|
|
69
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
80
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2hlbGxiYXItdXNlci1tZW51LmNvbXBvbmVudC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL2xpYnMvY29yZS9zaGVsbGJhci91c2VyLW1lbnUvc2hlbGxiYXItdXNlci1tZW51LmNvbXBvbmVudC50cyIsIi4uLy4uLy4uL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m9pZCB7XG4gICAgICAgIHRoaXMuaXRlbUNsaWNrZWQuZW1pdCgpO1xuICAgICAgICBpZiAoaXRlbS5jYWxsYmFjaykge1xuICAgICAgICAgICAgaXRlbS5jYWxsYmFjayhldmVudCk7XG4gICAgICAgIH1cbiAgICB9XG59XG4iLCJAaWYgKHVzZXIgfHwgX3NoZWxsYmFyVXNlck1lbnVCdXR0b24pIHtcbiAgICA8ZGl2IGNsYXNzPVwiZmQtc2hlbGxiYXJfX2FjdGlvbiBmZC1zaGVsbGJhcl9fYWN0aW9uLS1zaG93LWFsd2F5c1wiPlxuICAgICAgICA8ZGl2IGNsYXNzPVwiZmQtdXNlci1tZW51XCI+XG4gICAgICAgICAgICBAaWYgKCFfc2hlbGxiYXJVc2VyTWVudUJ1dHRvbikge1xuICAgICAgICAgICAgICAgIDxidXR0b25cbiAgICAgICAgICAgICAgICAgICAgZmQtYnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIGZkVHlwZT1cInRyYW5zcGFyZW50XCJcbiAgICAgICAgICAgICAgICAgICAgZmRTaGVsbGJhclVzZXJNZW51QnV0dG9uXG4gICAgICAgICAgICAgICAgICAgIFtkaXNhYmxlZF09XCJkaXNhYmxlZFwiXG4gICAgICAgICAgICAgICAgICAgIFtmZE1lbnVUcmlnZ2VyXT1cIm1lbnVcIlxuICAgICAgICAgICAgICAgID5cbiAgICAgICAgICAgICAgICAgICAgQGlmICghdXNlci5pbWFnZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgPGZkLWF2YXRhciBzaXplPVwieHNcIiBbY29sb3JBY2NlbnRdPVwidXNlci5jb2xvckFjY2VudFwiIFtjaXJjbGVdPVwidHJ1ZVwiIFtsYWJlbF09XCJ1c2VyLmZ1bGxOYW1lXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICA8L2ZkLWF2YXRhcj5cbiAgICAgICAgICAgICAgICAgICAgfSBAZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICA8ZmQtYXZhdGFyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgW2NvbG9yQWNjZW50XT1cInVzZXIuY29sb3JBY2NlbnRcIlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIFtjaXJjbGVdPVwidHJ1ZVwiXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgc2l6ZT1cInhzXCJcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbWFnZT1cInt7IHVzZXIuaW1hZ2UgfX1cIlxuICAgICAgICAgICAgICAgICAgICAgICAgPjwvZmQtYXZhdGFyPlxuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgPC9idXR0b24+XG4gICAgICAgICAgICB9IEBlbHNlIHtcbiAgICAgICAgICAgICAgICA8bmctY29udGVudCBzZWxlY3Q9XCJbZmRTaGVsbGJhclVzZXJNZW51QnV0dG9uXVwiPjwvbmctY29udGVudD5cbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIEBpZiAodXNlck1lbnUpIHtcbiAgICAgICAgICAgICAgICA8ZmQtbWVudVxuICAgICAgICAgICAgICAgICAgICBbdHJpZ2dlcnNdPVwidHJpZ2dlcnNcIlxuICAgICAgICAgICAgICAgICAgICBbcGxhY2VtZW50XT1cInBsYWNlbWVudFwiXG4gICAgICAgICAgICAgICAgICAgIFtmaWxsQ29udHJvbE1vZGVdPVwiZmlsbENvbnRyb2xNb2RlXCJcbiAgICAgICAgICAgICAgICAgICAgW2Nsb3NlT25Fc2NhcGVLZXldPVwiY2xvc2VPbkVzY2FwZUtleVwiXG4gICAgICAgICAgICAgICAgICAgIFtub0Fycm93XT1cIm5vQXJyb3dcIlxuICAgICAgICAgICAgICAgICAgICBbY2xvc2VPbk91dHNpZGVDbGlja109XCJjbG9zZU9uT3V0c2lkZUNsaWNrXCJcbiAgICAgICAgICAgICAgICA+XG4gICAgICAgICAgICAgICAgICAgIEBmb3IgKGl0ZW0gb2YgdXNlck1lbnU7IHRyYWNrIGl0ZW0pIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIDxsaSBmZC1tZW51LWl0ZW0gKGNsaWNrKT1cIml0ZW1DbGljayhpdGVtLCAkZXZlbnQpXCI+XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRpdiBmZC1tZW51LWludGVyYWN0aXZlPlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8c3BhbiBmZC1tZW51LXRpdGxlPnt7IGl0ZW0udGV4dCB9fTwvc3Bhbj5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2Rpdj5cbiAgICAgICAgICAgICAgICAgICAgICAgIDwvbGk+XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICA8L2ZkLW1lbnU+XG4gICAgICAgICAgICB9XG4gICAgICAgIDwvZGl2PlxuICAgIDwvZGl2PlxufVxuIl19
|
|
@@ -7,6 +7,7 @@ import * as i1 from '@fundamental-ngx/core/content-density';
|
|
|
7
7
|
import { contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';
|
|
8
8
|
import { Subscription } from 'rxjs';
|
|
9
9
|
|
|
10
|
+
const defaultButtonType = 'standard';
|
|
10
11
|
class BaseButton {
|
|
11
12
|
constructor() {
|
|
12
13
|
/**
|
|
@@ -22,7 +23,7 @@ class BaseButton {
|
|
|
22
23
|
* Leave empty for default (Standard button).'
|
|
23
24
|
* Default value is set to 'standard'
|
|
24
25
|
*/
|
|
25
|
-
this.fdType =
|
|
26
|
+
this.fdType = defaultButtonType;
|
|
26
27
|
/** Whether to apply menu mode to the button.
|
|
27
28
|
* Default value is set to false
|
|
28
29
|
*/
|
|
@@ -276,5 +277,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
276
277
|
* Generated bundle index. Do not edit.
|
|
277
278
|
*/
|
|
278
279
|
|
|
279
|
-
export { BaseButton, ButtonBadgeDirective, ButtonComponent, ButtonModule, FD_BUTTON_COMPONENT, badgeEnabledButtonTypes };
|
|
280
|
+
export { BaseButton, ButtonBadgeDirective, ButtonComponent, ButtonModule, FD_BUTTON_COMPONENT, badgeEnabledButtonTypes, defaultButtonType };
|
|
280
281
|
//# sourceMappingURL=fundamental-ngx-core-button.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fundamental-ngx-core-button.mjs","sources":["../../../../libs/core/button/base-button.ts","../../../../libs/core/button/tokens.ts","../../../../libs/core/button/button-badge.directive.ts","../../../../libs/core/button/button.component.ts","../../../../libs/core/button/button.component.html","../../../../libs/core/button/button.module.ts","../../../../libs/core/button/fundamental-ngx-core-button.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { ChangeDetectorRef, Directive, ElementRef, HostBinding, Input, booleanAttribute, inject } from '@angular/core';\n\nimport { HasElementRef, Nullable } from '@fundamental-ngx/cdk/utils';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconFont } from '@fundamental-ngx/core/icon';\n\nexport type GlyphPosition = 'before' | 'after';\n\nexport type ButtonType =\n | ''\n | 'standard'\n | 'positive'\n | 'negative'\n | 'attention'\n | 'half'\n | 'ghost'\n | 'transparent'\n | 'emphasized'\n | 'menu';\n\n@Directive()\nexport class BaseButton implements HasElementRef {\n /** Whether button is in toggled state. */\n @HostBinding('class.fd-button--toggled')\n @HostBinding('attr.aria-pressed')\n @Input({ transform: booleanAttribute })\n toggled: BooleanInput;\n\n /**\n * Native type of button element\n */\n @Input()\n type: Nullable<string> = 'button';\n\n /** Position of glyph related to text */\n @Input()\n glyphPosition: GlyphPosition = 'before';\n\n /** The icon to include in the button. See the icon page for the list of icons.\n * Setter is used to control when css class have to be rebuilded.\n * Default value is set to ''.\n */\n @Input()\n glyph: Nullable<string>;\n\n /** Glyph font family */\n @Input()\n glyphFont: IconFont = FD_DEFAULT_ICON_FONT_FAMILY;\n\n /** The type of the button. Types include:\n * 'standard' | 'positive' | 'negative' | 'attention' | 'half' | 'ghost' | 'transparent' | 'emphasized' | 'menu'.\n * Leave empty for default (Standard button).'\n * Default value is set to 'standard'\n */\n @Input()\n fdType: ButtonType = 'standard';\n\n /**\n * Text rendered inside button component\n */\n @Input()\n label: string;\n\n /** Whether to apply menu mode to the button.\n * Default value is set to false\n */\n @Input()\n fdMenu = false;\n\n /** adding native aria-label to the component */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** adding native aria-description to the componenet */\n @Input()\n ariaDescription: Nullable<string>;\n\n /**\n * Native disabled attribute of button element\n */\n @Input({ transform: booleanAttribute })\n disabled = false;\n\n /**\n * Native aria-disabled attribute of button element\n */\n @Input({ alias: 'aria-disabled', transform: booleanAttribute })\n ariaDisabled = false;\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /** @hidden */\n protected readonly _cdr = inject(ChangeDetectorRef);\n\n /** @hidden */\n detectChanges(): void {\n this._cdr.detectChanges();\n }\n\n /** @hidden */\n markForCheck(): void {\n this._cdr.markForCheck();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { BaseButton } from './base-button';\n\nexport const FD_BUTTON_COMPONENT = new InjectionToken<BaseButton>('FdButtonComponent');\n","import { Directive, ElementRef, inject, Input, isDevMode, OnChanges } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { BaseButton, ButtonType } from './base-button';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nexport const badgeEnabledButtonTypes: ButtonType[] = ['emphasized', 'standard', 'ghost', 'transparent'];\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-button-badge',\n host: {\n class: 'fd-button__badge'\n },\n standalone: true\n})\nexport class ButtonBadgeDirective implements OnChanges, HasElementRef {\n /**\n * Content, which should be shown inside the Badge.\n * It should not be longer than 4 characters.\n */\n @Input()\n content: string | number;\n\n /** @hidden */\n _buttonComponent = inject<BaseButton>(FD_BUTTON_COMPONENT, { host: true });\n\n /** @hidden */\n elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\n /** @hidden */\n ngOnChanges(): void {\n this.elementRef.nativeElement.innerHTML = `${this.content}` || '';\n if (isDevMode()) {\n if (this.content && this.content.toString().length > 4) {\n console.warn('Badge content should not be longer than 4 characters');\n }\n if (badgeEnabledButtonTypes.indexOf(this._buttonComponent.fdType) === -1) {\n console.warn(\n `Currently the ${JSON.stringify(\n badgeEnabledButtonTypes\n )} type of buttons are required for Badge enablement`\n );\n }\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n ViewEncapsulation\n} from '@angular/core';\nimport { CssClassBuilder, HasElementRef, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { Subscription } from 'rxjs';\nimport { BaseButton } from './base-button';\n\nimport { IconComponent } from '@fundamental-ngx/core/icon';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\n/**\n * Button directive, used to enhance standard HTML buttons.\n *\n * ``` selector: button[fd-button], a[fd-button] ```\n *\n * ```html\n * <button fd-button label=\"Button Text\"></button>\n * <a fd-button label=\"Button Text\"></a>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[fd-button], a[fd-button]',\n exportAs: 'fd-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.type]': 'type',\n '[attr.disabled]': 'disabled || null',\n '[attr.aria-label]': 'buttonArialabel',\n '[attr.aria-description]': 'buttonAriaDescription'\n },\n providers: [\n contentDensityObserverProviders(),\n {\n provide: FD_BUTTON_COMPONENT,\n useExisting: ButtonComponent\n }\n ],\n standalone: true,\n imports: [IconComponent]\n})\nexport class ButtonComponent\n extends BaseButton\n implements OnChanges, CssClassBuilder, OnInit, OnDestroy, HasElementRef\n{\n /** The property allows user to pass additional css classes. */\n @Input()\n class = '';\n\n /** @hidden */\n specialButtonType: Array<string> = ['emphasized', 'positive', 'negative', 'attention'];\n\n /**\n * Calculate aria-label attribute\n * @hidden\n */\n get buttonArialabel(): string | null {\n if (this.ariaLabel) {\n return this.ariaLabel;\n }\n\n if (this.specialButtonType.includes(this.fdType)) {\n if (this.label != null) {\n return this.label;\n }\n\n if (this.glyph != null) {\n return this.glyph.split('-').join(' ');\n }\n }\n\n return null;\n }\n\n /**\n * Calculate aria-description attribute\n * @hidden\n */\n get buttonAriaDescription(): string | null {\n if (this.ariaDescription) {\n return this.ariaDescription;\n }\n\n if (this.specialButtonType.includes(this.fdType)) {\n return this.fdType;\n }\n\n return null;\n }\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n public readonly elementRef: ElementRef,\n _contentDensityObserver: ContentDensityObserver\n ) {\n super();\n _contentDensityObserver.subscribe();\n }\n\n /** Forces the focus outline around the button, which is not default behavior in Safari. */\n @HostListener('click', ['$event'])\n clicked(event: MouseEvent): void {\n const target = event?.target as HTMLElement;\n // Target can be empty during unit tests execution.\n if (target && document.activeElement !== target) {\n target.focus();\n }\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n return [\n 'fd-button',\n this.fdType ? `fd-button--${this.fdType}` : '',\n this.fdMenu ? 'fd-button--menu' : '',\n this.disabled || this.ariaDisabled ? 'is-disabled' : '',\n this.toggled ? `fd-button--toggled` : '',\n this.class\n ];\n }\n\n /** Function runs when component is initialized\n * function should build component css class\n * function should build css style\n */\n ngOnChanges(): void {\n this.buildComponentCssClass();\n }\n\n /** @hidden */\n ngOnInit(): void {\n this.buildComponentCssClass();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n}\n","@if (glyph && glyphPosition === 'before') {\n <fd-icon [glyph]=\"glyph\" [font]=\"glyphFont\"></fd-icon>\n}\n@if (label) {\n <span class=\"fd-button__text\">\n {{ label }}\n </span>\n}\n<ng-content></ng-content>\n<ng-content select=\"fd-button-badge\"></ng-content>\n@if (glyph && glyphPosition === 'after') {\n <fd-icon [glyph]=\"glyph\" [font]=\"glyphFont\"></fd-icon>\n}\n@if (fdMenu) {\n <fd-icon glyph=\"slim-arrow-down\"></fd-icon>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ButtonComponent } from './button.component';\n\n/**\n * @deprecated\n * Use `ButtonComponent` import instead\n */\n@NgModule({\n imports: [ButtonComponent],\n exports: [ButtonComponent]\n})\nexport class ButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;MAqBa,UAAU,CAAA;AADvB,IAAA,WAAA,GAAA;AAQI;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAqB,QAAQ,CAAC;;QAIlC,IAAa,CAAA,aAAA,GAAkB,QAAQ,CAAC;;QAWxC,IAAS,CAAA,SAAA,GAAa,2BAA2B,CAAC;AAElD;;;;AAIG;QAEH,IAAM,CAAA,MAAA,GAAe,UAAU,CAAC;AAQhC;;AAEG;QAEH,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;AAUf;;AAEG;QAEH,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;AAEjB;;AAEG;QAEH,IAAY,CAAA,YAAA,GAAG,KAAK,CAAC;;AAGZ,QAAA,IAAA,CAAA,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC,CAAC;;AAGtB,QAAA,IAAA,CAAA,IAAI,GAAG,MAAM,CAAC,iBAAiB,CAAC,CAAC;AAWvD,KAAA;;IARG,aAAa,GAAA;AACT,QAAA,IAAI,CAAC,IAAI,CAAC,aAAa,EAAE,CAAC;KAC7B;;IAGD,YAAY,GAAA;AACR,QAAA,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;KAC5B;8GAlFQ,UAAU,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SA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CAAA,EAAA;+GAAZ,YAAY,EAAA,OAAA,EAAA,CAHX,eAAe,CAAA,EAAA,OAAA,EAAA,CACf,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;AAEhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAHX,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGhB,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe,CAAC;AAC7B,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
1
|
+
{"version":3,"file":"fundamental-ngx-core-button.mjs","sources":["../../../../libs/core/button/base-button.ts","../../../../libs/core/button/tokens.ts","../../../../libs/core/button/button-badge.directive.ts","../../../../libs/core/button/button.component.ts","../../../../libs/core/button/button.component.html","../../../../libs/core/button/button.module.ts","../../../../libs/core/button/fundamental-ngx-core-button.ts"],"sourcesContent":["import { BooleanInput } from '@angular/cdk/coercion';\nimport { ChangeDetectorRef, Directive, ElementRef, HostBinding, Input, booleanAttribute, inject } from '@angular/core';\n\nimport { HasElementRef, Nullable } from '@fundamental-ngx/cdk/utils';\nimport { FD_DEFAULT_ICON_FONT_FAMILY, IconFont } from '@fundamental-ngx/core/icon';\n\nexport type GlyphPosition = 'before' | 'after';\n\nexport type ButtonType =\n | ''\n | 'standard'\n | 'positive'\n | 'negative'\n | 'attention'\n | 'half'\n | 'ghost'\n | 'transparent'\n | 'emphasized'\n | 'menu';\n\nexport const defaultButtonType = 'standard' as ButtonType;\n\n@Directive()\nexport class BaseButton implements HasElementRef {\n /** Whether button is in toggled state. */\n @HostBinding('class.fd-button--toggled')\n @HostBinding('attr.aria-pressed')\n @Input({ transform: booleanAttribute })\n toggled: BooleanInput;\n\n /**\n * Native type of button element\n */\n @Input()\n type: Nullable<string> = 'button';\n\n /** Position of glyph related to text */\n @Input()\n glyphPosition: GlyphPosition = 'before';\n\n /** The icon to include in the button. See the icon page for the list of icons.\n * Setter is used to control when css class have to be rebuilded.\n * Default value is set to ''.\n */\n @Input()\n glyph: Nullable<string>;\n\n /** Glyph font family */\n @Input()\n glyphFont: IconFont = FD_DEFAULT_ICON_FONT_FAMILY;\n\n /** The type of the button. Types include:\n * 'standard' | 'positive' | 'negative' | 'attention' | 'half' | 'ghost' | 'transparent' | 'emphasized' | 'menu'.\n * Leave empty for default (Standard button).'\n * Default value is set to 'standard'\n */\n @Input()\n fdType: ButtonType = defaultButtonType;\n\n /**\n * Text rendered inside button component\n */\n @Input()\n label: string;\n\n /** Whether to apply menu mode to the button.\n * Default value is set to false\n */\n @Input()\n fdMenu = false;\n\n /** adding native aria-label to the component */\n @Input()\n ariaLabel: Nullable<string>;\n\n /** adding native aria-description to the componenet */\n @Input()\n ariaDescription: Nullable<string>;\n\n /**\n * Native disabled attribute of button element\n */\n @Input({ transform: booleanAttribute })\n disabled = false;\n\n /**\n * Native aria-disabled attribute of button element\n */\n @Input({ alias: 'aria-disabled', transform: booleanAttribute })\n ariaDisabled = false;\n\n /** @hidden */\n readonly elementRef = inject(ElementRef);\n\n /** @hidden */\n protected readonly _cdr = inject(ChangeDetectorRef);\n\n /** @hidden */\n detectChanges(): void {\n this._cdr.detectChanges();\n }\n\n /** @hidden */\n markForCheck(): void {\n this._cdr.markForCheck();\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { BaseButton } from './base-button';\n\nexport const FD_BUTTON_COMPONENT = new InjectionToken<BaseButton>('FdButtonComponent');\n","import { Directive, ElementRef, inject, Input, isDevMode, OnChanges } from '@angular/core';\nimport { HasElementRef } from '@fundamental-ngx/cdk/utils';\nimport { BaseButton, ButtonType } from './base-button';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\nexport const badgeEnabledButtonTypes: ButtonType[] = ['emphasized', 'standard', 'ghost', 'transparent'];\n\n@Directive({\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'fd-button-badge',\n host: {\n class: 'fd-button__badge'\n },\n standalone: true\n})\nexport class ButtonBadgeDirective implements OnChanges, HasElementRef {\n /**\n * Content, which should be shown inside the Badge.\n * It should not be longer than 4 characters.\n */\n @Input()\n content: string | number;\n\n /** @hidden */\n _buttonComponent = inject<BaseButton>(FD_BUTTON_COMPONENT, { host: true });\n\n /** @hidden */\n elementRef: ElementRef<HTMLElement> = inject(ElementRef);\n\n /** @hidden */\n ngOnChanges(): void {\n this.elementRef.nativeElement.innerHTML = `${this.content}` || '';\n if (isDevMode()) {\n if (this.content && this.content.toString().length > 4) {\n console.warn('Badge content should not be longer than 4 characters');\n }\n if (badgeEnabledButtonTypes.indexOf(this._buttonComponent.fdType) === -1) {\n console.warn(\n `Currently the ${JSON.stringify(\n badgeEnabledButtonTypes\n )} type of buttons are required for Badge enablement`\n );\n }\n }\n }\n}\n","import {\n ChangeDetectionStrategy,\n Component,\n ElementRef,\n HostListener,\n Input,\n OnChanges,\n OnDestroy,\n OnInit,\n ViewEncapsulation\n} from '@angular/core';\nimport { CssClassBuilder, HasElementRef, applyCssClass } from '@fundamental-ngx/cdk/utils';\nimport { ContentDensityObserver, contentDensityObserverProviders } from '@fundamental-ngx/core/content-density';\nimport { Subscription } from 'rxjs';\nimport { BaseButton } from './base-button';\n\nimport { IconComponent } from '@fundamental-ngx/core/icon';\nimport { FD_BUTTON_COMPONENT } from './tokens';\n\n/**\n * Button directive, used to enhance standard HTML buttons.\n *\n * ``` selector: button[fd-button], a[fd-button] ```\n *\n * ```html\n * <button fd-button label=\"Button Text\"></button>\n * <a fd-button label=\"Button Text\"></a>\n * ```\n */\n@Component({\n // eslint-disable-next-line @angular-eslint/component-selector\n selector: 'button[fd-button], a[fd-button]',\n exportAs: 'fd-button',\n templateUrl: './button.component.html',\n styleUrl: './button.component.scss',\n encapsulation: ViewEncapsulation.None,\n changeDetection: ChangeDetectionStrategy.OnPush,\n host: {\n '[attr.type]': 'type',\n '[attr.disabled]': 'disabled || null',\n '[attr.aria-label]': 'buttonArialabel',\n '[attr.aria-description]': 'buttonAriaDescription'\n },\n providers: [\n contentDensityObserverProviders(),\n {\n provide: FD_BUTTON_COMPONENT,\n useExisting: ButtonComponent\n }\n ],\n standalone: true,\n imports: [IconComponent]\n})\nexport class ButtonComponent\n extends BaseButton\n implements OnChanges, CssClassBuilder, OnInit, OnDestroy, HasElementRef\n{\n /** The property allows user to pass additional css classes. */\n @Input()\n class = '';\n\n /** @hidden */\n specialButtonType: Array<string> = ['emphasized', 'positive', 'negative', 'attention'];\n\n /**\n * Calculate aria-label attribute\n * @hidden\n */\n get buttonArialabel(): string | null {\n if (this.ariaLabel) {\n return this.ariaLabel;\n }\n\n if (this.specialButtonType.includes(this.fdType)) {\n if (this.label != null) {\n return this.label;\n }\n\n if (this.glyph != null) {\n return this.glyph.split('-').join(' ');\n }\n }\n\n return null;\n }\n\n /**\n * Calculate aria-description attribute\n * @hidden\n */\n get buttonAriaDescription(): string | null {\n if (this.ariaDescription) {\n return this.ariaDescription;\n }\n\n if (this.specialButtonType.includes(this.fdType)) {\n return this.fdType;\n }\n\n return null;\n }\n\n /** @hidden */\n private _subscriptions = new Subscription();\n\n /** @hidden */\n constructor(\n public readonly elementRef: ElementRef,\n _contentDensityObserver: ContentDensityObserver\n ) {\n super();\n _contentDensityObserver.subscribe();\n }\n\n /** Forces the focus outline around the button, which is not default behavior in Safari. */\n @HostListener('click', ['$event'])\n clicked(event: MouseEvent): void {\n const target = event?.target as HTMLElement;\n // Target can be empty during unit tests execution.\n if (target && document.activeElement !== target) {\n target.focus();\n }\n }\n\n /** @hidden\n * CssClassBuilder interface implementation\n * function must return single string\n * function is responsible for order which css classes are applied\n */\n @applyCssClass\n buildComponentCssClass(): string[] {\n return [\n 'fd-button',\n this.fdType ? `fd-button--${this.fdType}` : '',\n this.fdMenu ? 'fd-button--menu' : '',\n this.disabled || this.ariaDisabled ? 'is-disabled' : '',\n this.toggled ? `fd-button--toggled` : '',\n this.class\n ];\n }\n\n /** Function runs when component is initialized\n * function should build component css class\n * function should build css style\n */\n ngOnChanges(): void {\n this.buildComponentCssClass();\n }\n\n /** @hidden */\n ngOnInit(): void {\n this.buildComponentCssClass();\n }\n\n /** @hidden */\n ngOnDestroy(): void {\n this._subscriptions.unsubscribe();\n }\n}\n","@if (glyph && glyphPosition === 'before') {\n <fd-icon [glyph]=\"glyph\" [font]=\"glyphFont\"></fd-icon>\n}\n@if (label) {\n <span class=\"fd-button__text\">\n {{ label }}\n </span>\n}\n<ng-content></ng-content>\n<ng-content select=\"fd-button-badge\"></ng-content>\n@if (glyph && glyphPosition === 'after') {\n <fd-icon [glyph]=\"glyph\" [font]=\"glyphFont\"></fd-icon>\n}\n@if (fdMenu) {\n <fd-icon glyph=\"slim-arrow-down\"></fd-icon>\n}\n","import { NgModule } from '@angular/core';\n\nimport { ButtonComponent } from './button.component';\n\n/**\n * @deprecated\n * Use `ButtonComponent` import instead\n */\n@NgModule({\n imports: [ButtonComponent],\n exports: [ButtonComponent]\n})\nexport class ButtonModule {}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;;;AAoBO,MAAM,iBAAiB,GAAG,WAAyB;MAG7C,UAAU,CAAA;AADvB,IAAA,WAAA,GAAA;AAQI;;AAEG;QAEH,IAAI,CAAA,IAAA,GAAqB,QAAQ,CAAC;;QAIlC,IAAa,CAAA,aAAA,GAAkB,QAAQ,CAAC;;QAWxC,IAAS,CAAA,SAAA,GAAa,2BAA2B,CAAC;AAElD;;;;AAIG;QAEH,IAAM,CAAA,MAAA,GAAe,iBAAiB,CAAC;AAQvC;;AAEG;QAEH,IAAM,CAAA,MAAA,GAAG,KAAK,CAAC;AAUf;;AAEG;QAEH,IAAQ,CAAA,QAAA,GAAG,KAAK,CAAC;A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ACJ,qBAAA,EAAA,UAAA,EACW,IAAI,EAAA,OAAA,EACP,CAAC,aAAa,CAAC,EAAA,QAAA,EAAA,kdAAA,EAAA,MAAA,EAAA,CAAA,0m8CAAA,CAAA,EAAA,CAAA;oHAQxB,KAAK,EAAA,CAAA;sBADJ,KAAK;gBA0DN,OAAO,EAAA,CAAA;sBADN,YAAY;uBAAC,OAAO,EAAE,CAAC,QAAQ,CAAC,CAAA;gBAejC,sBAAsB,EAAA,EAAA,EAAA,EAAA,CAAA;;AE9H1B;;;AAGG;MAKU,YAAY,CAAA;8GAAZ,YAAY,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA,EAAA;+GAAZ,YAAY,EAAA,OAAA,EAAA,CAHX,eAAe,CAAA,EAAA,OAAA,EAAA,CACf,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;AAEhB,IAAA,SAAA,IAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,QAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,YAAY,YAHX,eAAe,CAAA,EAAA,CAAA,CAAA,EAAA;;2FAGhB,YAAY,EAAA,UAAA,EAAA,CAAA;kBAJxB,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;oBACN,OAAO,EAAE,CAAC,eAAe,CAAC;oBAC1B,OAAO,EAAE,CAAC,eAAe,CAAC;AAC7B,iBAAA,CAAA;;;ACXD;;AAEG;;;;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ViewChild, InjectionToken, EventEmitter, Output,
|
|
3
|
-
import { ButtonComponent, FD_BUTTON_COMPONENT } from '@fundamental-ngx/core/button';
|
|
2
|
+
import { Component, ViewEncapsulation, ChangeDetectionStrategy, Input, ViewChild, InjectionToken, EventEmitter, Output, inject, isDevMode, Directive, ContentChild, ChangeDetectorRef, ContentChildren, HostBinding, DestroyRef, ElementRef, NgModule } from '@angular/core';
|
|
3
|
+
import { ButtonComponent, FD_BUTTON_COMPONENT, defaultButtonType } from '@fundamental-ngx/core/button';
|
|
4
4
|
import { ContentDensityDirective, ContentDensityMode, contentDensityObserverProviders, ContentDensityModule } from '@fundamental-ngx/core/content-density';
|
|
5
5
|
import { IconComponent, FD_DEFAULT_ICON_FONT_FAMILY } from '@fundamental-ngx/core/icon';
|
|
6
6
|
import * as i1 from '@fundamental-ngx/core/menu';
|
|
@@ -159,11 +159,11 @@ class ShellbarActionsMobileComponent {
|
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarActionsMobileComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
162
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarActionsMobileComponent, isStandalone: true, selector: "fd-shellbar-actions-mobile", inputs: { shellbarActions: "shellbarActions", searchExists: "searchExists" }, outputs: { showSearch: "showSearch" }, ngImport: i0, template: "<div class=\"fd-shellbar-collapse\">\n
|
|
162
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarActionsMobileComponent, isStandalone: true, selector: "fd-shellbar-actions-mobile", inputs: { shellbarActions: "shellbarActions", searchExists: "searchExists" }, outputs: { showSearch: "showSearch" }, ngImport: i0, template: "@if (shellbarActions.length > 0 || searchExists) {\n <div class=\"fd-shellbar-collapse\">\n <fd-action-sheet placement=\"bottom-end\" #actionSheet>\n <fd-action-sheet-control>\n <button\n fd-button\n fdType=\"transparent\"\n glyph=\"overflow\"\n class=\"fd-shellbar__button\"\n [attr.aria-label]=\"'coreShellbar.collapsedItemMenuLabel' | fdTranslate\"\n >\n @if (totalNotifications) {\n <span class=\"fd-button__badge\">\n {{ totalNotifications }}\n </span>\n }\n </button>\n </fd-action-sheet-control>\n <fd-action-sheet-body>\n @if (searchExists) {\n <li\n fd-action-sheet-item\n tabindex=\"-1\"\n glyph=\"search\"\n [label]=\"'coreShellbar.search' | fdTranslate\"\n (click)=\"showSearch.emit(); actionSheet.close()\"\n ></li>\n }\n @for (action of shellbarActions; track action) {\n <li\n fd-action-sheet-item\n tabindex=\"-1\"\n [glyph]=\"action.glyph\"\n [label]=\"action.label\"\n (click)=\"actionClicked(action, $event)\"\n >\n @if (action.notificationCount) {\n <span class=\"fd-button__badge\">{{ action.notificationCount }}</span>\n }\n </li>\n }\n </fd-action-sheet-body>\n </fd-action-sheet>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: ActionSheetModule }, { kind: "component", type: i1$1.ActionSheetComponent, selector: "fd-action-sheet", inputs: ["mobile", "placement", "noArrow", "isOpen", "keyboardSupport", "triggers"], outputs: ["focusEscapeList", "isOpenChange"] }, { kind: "component", type: i1$1.ActionSheetControlComponent, selector: "fd-action-sheet-control", outputs: ["clicked"] }, { kind: "component", type: i1$1.ActionSheetItemComponent, selector: "[fd-action-sheet-item]", inputs: ["label", "glyph", "glyphFont", "negative", "isCloseButton", "disabled"], outputs: ["keyDown"] }, { kind: "component", type: i1$1.ActionSheetBodyComponent, selector: "fd-action-sheet-body", inputs: ["actionSheetBodyId", "mobile", "ariaLabel", "ariaLabelledby"] }, { kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "pipe", type: FdTranslatePipe, name: "fdTranslate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
163
163
|
}
|
|
164
164
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarActionsMobileComponent, decorators: [{
|
|
165
165
|
type: Component,
|
|
166
|
-
args: [{ selector: 'fd-shellbar-actions-mobile', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ActionSheetModule, ButtonComponent, FdTranslatePipe], template: "<div class=\"fd-shellbar-collapse\">\n
|
|
166
|
+
args: [{ selector: 'fd-shellbar-actions-mobile', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ActionSheetModule, ButtonComponent, FdTranslatePipe], template: "@if (shellbarActions.length > 0 || searchExists) {\n <div class=\"fd-shellbar-collapse\">\n <fd-action-sheet placement=\"bottom-end\" #actionSheet>\n <fd-action-sheet-control>\n <button\n fd-button\n fdType=\"transparent\"\n glyph=\"overflow\"\n class=\"fd-shellbar__button\"\n [attr.aria-label]=\"'coreShellbar.collapsedItemMenuLabel' | fdTranslate\"\n >\n @if (totalNotifications) {\n <span class=\"fd-button__badge\">\n {{ totalNotifications }}\n </span>\n }\n </button>\n </fd-action-sheet-control>\n <fd-action-sheet-body>\n @if (searchExists) {\n <li\n fd-action-sheet-item\n tabindex=\"-1\"\n glyph=\"search\"\n [label]=\"'coreShellbar.search' | fdTranslate\"\n (click)=\"showSearch.emit(); actionSheet.close()\"\n ></li>\n }\n @for (action of shellbarActions; track action) {\n <li\n fd-action-sheet-item\n tabindex=\"-1\"\n [glyph]=\"action.glyph\"\n [label]=\"action.label\"\n (click)=\"actionClicked(action, $event)\"\n >\n @if (action.notificationCount) {\n <span class=\"fd-button__badge\">{{ action.notificationCount }}</span>\n }\n </li>\n }\n </fd-action-sheet-body>\n </fd-action-sheet>\n </div>\n}\n" }]
|
|
167
167
|
}], propDecorators: { shellbarActions: [{
|
|
168
168
|
type: Input
|
|
169
169
|
}], searchExists: [{
|
|
@@ -172,6 +172,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
172
172
|
type: Output
|
|
173
173
|
}] } });
|
|
174
174
|
|
|
175
|
+
class ShellbarUserMenuButtonDirective {
|
|
176
|
+
constructor() {
|
|
177
|
+
/** The type of the button. In case of the ShellbarUserMenuButtonDirective, the type is always 'transparent'. */
|
|
178
|
+
this.fdType = 'transparent';
|
|
179
|
+
/** @hidden */
|
|
180
|
+
this._hostButton = inject(FD_BUTTON_COMPONENT, { host: true });
|
|
181
|
+
}
|
|
182
|
+
/** @hidden */
|
|
183
|
+
ngOnInit() {
|
|
184
|
+
if (this._hostButton.fdType !== 'transparent' && this._hostButton.fdType !== defaultButtonType && isDevMode()) {
|
|
185
|
+
console.warn('ShellbarUserMenuButtonDirective should be used with transparent button type. Overriding button type to transparent.');
|
|
186
|
+
}
|
|
187
|
+
this._hostButton.fdType = 'transparent';
|
|
188
|
+
}
|
|
189
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarUserMenuButtonDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
190
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.0", type: ShellbarUserMenuButtonDirective, isStandalone: true, selector: "[fd-button][fdShellbarUserMenuButton]", inputs: { fdType: "fdType" }, host: { properties: { "class.fd-shellbar__button": "true", "class.fd-shellbar__button--user-menu": "true" } }, ngImport: i0 }); }
|
|
191
|
+
}
|
|
192
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarUserMenuButtonDirective, decorators: [{
|
|
193
|
+
type: Directive,
|
|
194
|
+
args: [{
|
|
195
|
+
selector: '[fd-button][fdShellbarUserMenuButton]',
|
|
196
|
+
host: {
|
|
197
|
+
'[class.fd-shellbar__button]': 'true',
|
|
198
|
+
'[class.fd-shellbar__button--user-menu]': 'true'
|
|
199
|
+
},
|
|
200
|
+
standalone: true
|
|
201
|
+
}]
|
|
202
|
+
}], propDecorators: { fdType: [{
|
|
203
|
+
type: Input
|
|
204
|
+
}] } });
|
|
205
|
+
|
|
175
206
|
/**
|
|
176
207
|
* This Component extends popover component and passes all the options and events from outside to popover component
|
|
177
208
|
* and Vice Versa
|
|
@@ -195,6 +226,10 @@ class ShellbarUserMenuComponent {
|
|
|
195
226
|
/** Event emitted on item click */
|
|
196
227
|
this.itemClicked = new EventEmitter();
|
|
197
228
|
}
|
|
229
|
+
/** Reference to Menu Component */
|
|
230
|
+
get menu() {
|
|
231
|
+
return this._contentPassedMenu || this._menu;
|
|
232
|
+
}
|
|
198
233
|
/**
|
|
199
234
|
* @hidden
|
|
200
235
|
*/
|
|
@@ -205,11 +240,11 @@ class ShellbarUserMenuComponent {
|
|
|
205
240
|
}
|
|
206
241
|
}
|
|
207
242
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarUserMenuComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
208
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarUserMenuComponent, isStandalone: true, selector: "fd-shellbar-user-menu", inputs: { user: "user", userMenu: "userMenu", fillControlMode: "fillControlMode", placement: "placement", triggers: "triggers", closeOnEscapeKey: "closeOnEscapeKey", closeOnOutsideClick: "closeOnOutsideClick", disabled: "disabled", noArrow: "noArrow" }, outputs: { itemClicked: "itemClicked" }, viewQueries: [{ propertyName: "
|
|
243
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarUserMenuComponent, isStandalone: true, selector: "fd-shellbar-user-menu", inputs: { user: "user", userMenu: "userMenu", fillControlMode: "fillControlMode", placement: "placement", triggers: "triggers", closeOnEscapeKey: "closeOnEscapeKey", closeOnOutsideClick: "closeOnOutsideClick", disabled: "disabled", noArrow: "noArrow" }, outputs: { itemClicked: "itemClicked" }, queries: [{ propertyName: "_contentPassedMenu", first: true, predicate: MenuComponent, descendants: true }, { propertyName: "_shellbarUserMenuButton", first: true, predicate: ShellbarUserMenuButtonDirective, descendants: true }], viewQueries: [{ propertyName: "_menu", first: true, predicate: MenuComponent, descendants: true }], ngImport: i0, template: "@if (user || _shellbarUserMenuButton) {\n <div class=\"fd-shellbar__action fd-shellbar__action--show-always\">\n <div class=\"fd-user-menu\">\n @if (!_shellbarUserMenuButton) {\n <button\n fd-button\n fdType=\"transparent\"\n fdShellbarUserMenuButton\n [disabled]=\"disabled\"\n [fdMenuTrigger]=\"menu\"\n >\n @if (!user.image) {\n <fd-avatar size=\"xs\" [colorAccent]=\"user.colorAccent\" [circle]=\"true\" [label]=\"user.fullName\">\n </fd-avatar>\n } @else {\n <fd-avatar\n [colorAccent]=\"user.colorAccent\"\n [circle]=\"true\"\n size=\"xs\"\n image=\"{{ user.image }}\"\n ></fd-avatar>\n }\n </button>\n } @else {\n <ng-content select=\"[fdShellbarUserMenuButton]\"></ng-content>\n }\n @if (userMenu) {\n <fd-menu\n [triggers]=\"triggers\"\n [placement]=\"placement\"\n [fillControlMode]=\"fillControlMode\"\n [closeOnEscapeKey]=\"closeOnEscapeKey\"\n [noArrow]=\"noArrow\"\n [closeOnOutsideClick]=\"closeOnOutsideClick\"\n >\n @for (item of userMenu; track item) {\n <li fd-menu-item (click)=\"itemClick(item, $event)\">\n <div fd-menu-interactive>\n <span fd-menu-title>{{ item.text }}</span>\n </div>\n </li>\n }\n </fd-menu>\n }\n </div>\n </div>\n}\n", dependencies: [{ kind: "component", type: ButtonComponent, selector: "button[fd-button], a[fd-button]", inputs: ["class"], exportAs: ["fd-button"] }, { kind: "ngmodule", type: MenuModule }, { kind: "component", type: i1.MenuComponent, selector: "fd-menu", inputs: ["mobile", "disabled", "focusTrapped", "focusAutoCapture", "openOnHoverTime", "mobileConfig", "ariaLabel", "ariaLabelledby", "id"], outputs: ["activePath"] }, { kind: "component", type: i1.MenuItemComponent, selector: "li[fd-menu-item]", inputs: ["disabled", "itemId", "submenu", "parentSubmenu", "hasSeparator"], outputs: ["onSelect"], exportAs: ["fd-menu-item"] }, { kind: "component", type: i1.MenuInteractiveComponent, selector: "[fd-menu-interactive]" }, { kind: "directive", type: i1.MenuTitleDirective, selector: "[fd-menu-title]" }, { kind: "directive", type: i1.MenuTriggerDirective, selector: "[fdMenuTrigger]", inputs: ["fdMenuTrigger"] }, { kind: "component", type: AvatarComponent, selector: "fd-avatar", inputs: ["class", "id", "ariaLabel", "ariaLabelledby", "label", "size", "font", "glyph", "zoomGlyph", "circle", "transparent", "contain", "placeholder", "tile", "border", "colorAccent", "random", "clickable", "valueState", "image", "alterIcon", "backupImage"], outputs: ["avatarClicked", "zoomGlyphClicked"] }, { kind: "directive", type: ShellbarUserMenuButtonDirective, selector: "[fd-button][fdShellbarUserMenuButton]", inputs: ["fdType"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
209
244
|
}
|
|
210
245
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarUserMenuComponent, decorators: [{
|
|
211
246
|
type: Component,
|
|
212
|
-
args: [{ selector: 'fd-shellbar-user-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ButtonComponent, MenuModule, AvatarComponent], template: "@if (user) {\n <div class=\"fd-shellbar__action fd-shellbar__action--show-always\">\n <div class=\"fd-user-menu\">\n <button\n
|
|
247
|
+
args: [{ selector: 'fd-shellbar-user-menu', changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, imports: [ButtonComponent, MenuModule, AvatarComponent, ShellbarUserMenuButtonDirective], template: "@if (user || _shellbarUserMenuButton) {\n <div class=\"fd-shellbar__action fd-shellbar__action--show-always\">\n <div class=\"fd-user-menu\">\n @if (!_shellbarUserMenuButton) {\n <button\n fd-button\n fdType=\"transparent\"\n fdShellbarUserMenuButton\n [disabled]=\"disabled\"\n [fdMenuTrigger]=\"menu\"\n >\n @if (!user.image) {\n <fd-avatar size=\"xs\" [colorAccent]=\"user.colorAccent\" [circle]=\"true\" [label]=\"user.fullName\">\n </fd-avatar>\n } @else {\n <fd-avatar\n [colorAccent]=\"user.colorAccent\"\n [circle]=\"true\"\n size=\"xs\"\n image=\"{{ user.image }}\"\n ></fd-avatar>\n }\n </button>\n } @else {\n <ng-content select=\"[fdShellbarUserMenuButton]\"></ng-content>\n }\n @if (userMenu) {\n <fd-menu\n [triggers]=\"triggers\"\n [placement]=\"placement\"\n [fillControlMode]=\"fillControlMode\"\n [closeOnEscapeKey]=\"closeOnEscapeKey\"\n [noArrow]=\"noArrow\"\n [closeOnOutsideClick]=\"closeOnOutsideClick\"\n >\n @for (item of userMenu; track item) {\n <li fd-menu-item (click)=\"itemClick(item, $event)\">\n <div fd-menu-interactive>\n <span fd-menu-title>{{ item.text }}</span>\n </div>\n </li>\n }\n </fd-menu>\n }\n </div>\n </div>\n}\n" }]
|
|
213
248
|
}], propDecorators: { user: [{
|
|
214
249
|
type: Input
|
|
215
250
|
}], userMenu: [{
|
|
@@ -230,9 +265,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
230
265
|
type: Input
|
|
231
266
|
}], itemClicked: [{
|
|
232
267
|
type: Output
|
|
233
|
-
}],
|
|
268
|
+
}], _menu: [{
|
|
234
269
|
type: ViewChild,
|
|
235
270
|
args: [MenuComponent]
|
|
271
|
+
}], _contentPassedMenu: [{
|
|
272
|
+
type: ContentChild,
|
|
273
|
+
args: [MenuComponent]
|
|
274
|
+
}], _shellbarUserMenuButton: [{
|
|
275
|
+
type: ContentChild,
|
|
276
|
+
args: [ShellbarUserMenuButtonDirective]
|
|
236
277
|
}] } });
|
|
237
278
|
|
|
238
279
|
/**
|
|
@@ -349,14 +390,14 @@ class ShellbarActionsComponent {
|
|
|
349
390
|
}
|
|
350
391
|
}
|
|
351
392
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
352
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarActionsComponent, isStandalone: true, selector: "fd-shellbar-actions", inputs: { user: "user", userMenu: "userMenu", closePopoverOnSelect: "closePopoverOnSelect" }, outputs: { searchOpen: "searchOpen" }, host: { properties: { "class.fd-shellbar__group": "true", "class.fd-shellbar__group--actions": "true", "class.fd-shellbar__group--shrink": "this._groupShrink", "class.fd-shellbar__group--basis-auto": "this._groupBasisAuto" } }, queries: [{ propertyName: "userComponent", first: true, predicate: ShellbarUserMenuComponent, descendants: true }, { propertyName: "comboboxComponent", first: true, predicate: FD_COMBOBOX_COMPONENT, descendants: true }, { propertyName: "productSwitchComponent", first: true, predicate: FD_PRODUCT_SWITCH_COMPONENT, descendants: true }, { propertyName: "shellbarActions", predicate: FD_SHELLBAR_ACTION_COMPONENT }], viewQueries: [{ propertyName: "userComponentView", first: true, predicate: ShellbarUserMenuComponent, descendants: true }, { propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true }], ngImport: i0, template: "@if (comboboxComponent) {\n <div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content select=\"fd-combobox\"></ng-content>\n </div>\n}\n<!-- If portal outlet placed outside div, it will be added to the end of the root container. So this div actually keeps outlet in desired place. -->\n<div class=\"fd-shellbar__action\" cdkPortalOutlet></div>\n<div class=\"fd-shellbar__action fd-shellbar__action--mobile\">\n <fd-shellbar-actions-mobile\n [shellbarActions]=\"shellbarActions\"\n [searchExists]=\"!!_searchPortal\"\n (showSearch)=\"_toggleSearch()\"\n ></fd-shellbar-actions-mobile>\n</div>\n<div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content></ng-content>\n</div>\n@if (_addSearchIcon && !showSearch) {\n <fd-shellbar-action glyph=\"search\" [callback]=\"_toggleSearch\"></fd-shellbar-action>\n}\n<ng-content select=\"fd-shellbar-action\"></ng-content>\n@if (userItem) {\n @if (!userComponent) {\n <fd-shellbar-user-menu\n placement=\"bottom-end\"\n [user]=\"user\"\n [userMenu]=\"userMenu\"\n (itemClicked)=\"_triggerItems()\"\n ></fd-shellbar-user-menu>\n }
|
|
393
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarActionsComponent, isStandalone: true, selector: "fd-shellbar-actions", inputs: { user: "user", userMenu: "userMenu", closePopoverOnSelect: "closePopoverOnSelect" }, outputs: { searchOpen: "searchOpen" }, host: { properties: { "class.fd-shellbar__group": "true", "class.fd-shellbar__group--actions": "true", "class.fd-shellbar__group--shrink": "this._groupShrink", "class.fd-shellbar__group--basis-auto": "this._groupBasisAuto" } }, queries: [{ propertyName: "userComponent", first: true, predicate: ShellbarUserMenuComponent, descendants: true }, { propertyName: "comboboxComponent", first: true, predicate: FD_COMBOBOX_COMPONENT, descendants: true }, { propertyName: "productSwitchComponent", first: true, predicate: FD_PRODUCT_SWITCH_COMPONENT, descendants: true }, { propertyName: "shellbarActions", predicate: FD_SHELLBAR_ACTION_COMPONENT }], viewQueries: [{ propertyName: "userComponentView", first: true, predicate: ShellbarUserMenuComponent, descendants: true }, { propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true }], ngImport: i0, template: "@if (comboboxComponent) {\n <div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content select=\"fd-combobox\"></ng-content>\n </div>\n}\n<!-- If portal outlet placed outside div, it will be added to the end of the root container. So this div actually keeps outlet in desired place. -->\n<div class=\"fd-shellbar__action\" cdkPortalOutlet></div>\n<div class=\"fd-shellbar__action fd-shellbar__action--mobile\">\n <fd-shellbar-actions-mobile\n [shellbarActions]=\"shellbarActions\"\n [searchExists]=\"!!_searchPortal\"\n (showSearch)=\"_toggleSearch()\"\n ></fd-shellbar-actions-mobile>\n</div>\n<div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content></ng-content>\n</div>\n@if (_addSearchIcon && !showSearch) {\n <fd-shellbar-action glyph=\"search\" [callback]=\"_toggleSearch\"></fd-shellbar-action>\n}\n<ng-content select=\"fd-shellbar-action\"></ng-content>\n@if (userComponent || userItem) {\n @if (!userComponent) {\n <fd-shellbar-user-menu\n placement=\"bottom-end\"\n [user]=\"user\"\n [userMenu]=\"userMenu\"\n (itemClicked)=\"_triggerItems()\"\n ></fd-shellbar-user-menu>\n } @else {\n <ng-content select=\"fd-shellbar-user-menu\"></ng-content>\n }\n}\n@if (productSwitchComponent) {\n <div class=\"fd-shellbar__action\">\n <ng-content select=\"fd-product-switch\"></ng-content>\n </div>\n}\n", dependencies: [{ kind: "ngmodule", type: PortalModule }, { kind: "directive", type: i1$2.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }, { kind: "component", type: ShellbarActionsMobileComponent, selector: "fd-shellbar-actions-mobile", inputs: ["shellbarActions", "searchExists"], outputs: ["showSearch"] }, { kind: "component", type: ShellbarActionComponent, selector: "fd-shellbar-action", inputs: ["glyph", "glyphFont", "callback", "label", "notificationLabel", "notificationCount"] }, { kind: "component", type: ShellbarUserMenuComponent, selector: "fd-shellbar-user-menu", inputs: ["user", "userMenu", "fillControlMode", "placement", "triggers", "closeOnEscapeKey", "closeOnOutsideClick", "disabled", "noArrow"], outputs: ["itemClicked"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
353
394
|
}
|
|
354
395
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarActionsComponent, decorators: [{
|
|
355
396
|
type: Component,
|
|
356
397
|
args: [{ selector: 'fd-shellbar-actions', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
357
398
|
'[class.fd-shellbar__group]': 'true',
|
|
358
399
|
'[class.fd-shellbar__group--actions]': 'true'
|
|
359
|
-
}, standalone: true, imports: [PortalModule, ShellbarActionsMobileComponent, ShellbarActionComponent, ShellbarUserMenuComponent], template: "@if (comboboxComponent) {\n <div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content select=\"fd-combobox\"></ng-content>\n </div>\n}\n<!-- If portal outlet placed outside div, it will be added to the end of the root container. So this div actually keeps outlet in desired place. -->\n<div class=\"fd-shellbar__action\" cdkPortalOutlet></div>\n<div class=\"fd-shellbar__action fd-shellbar__action--mobile\">\n <fd-shellbar-actions-mobile\n [shellbarActions]=\"shellbarActions\"\n [searchExists]=\"!!_searchPortal\"\n (showSearch)=\"_toggleSearch()\"\n ></fd-shellbar-actions-mobile>\n</div>\n<div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content></ng-content>\n</div>\n@if (_addSearchIcon && !showSearch) {\n <fd-shellbar-action glyph=\"search\" [callback]=\"_toggleSearch\"></fd-shellbar-action>\n}\n<ng-content select=\"fd-shellbar-action\"></ng-content>\n@if (userItem) {\n @if (!userComponent) {\n <fd-shellbar-user-menu\n placement=\"bottom-end\"\n [user]=\"user\"\n [userMenu]=\"userMenu\"\n (itemClicked)=\"_triggerItems()\"\n ></fd-shellbar-user-menu>\n }
|
|
400
|
+
}, standalone: true, imports: [PortalModule, ShellbarActionsMobileComponent, ShellbarActionComponent, ShellbarUserMenuComponent], template: "@if (comboboxComponent) {\n <div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content select=\"fd-combobox\"></ng-content>\n </div>\n}\n<!-- If portal outlet placed outside div, it will be added to the end of the root container. So this div actually keeps outlet in desired place. -->\n<div class=\"fd-shellbar__action\" cdkPortalOutlet></div>\n<div class=\"fd-shellbar__action fd-shellbar__action--mobile\">\n <fd-shellbar-actions-mobile\n [shellbarActions]=\"shellbarActions\"\n [searchExists]=\"!!_searchPortal\"\n (showSearch)=\"_toggleSearch()\"\n ></fd-shellbar-actions-mobile>\n</div>\n<div class=\"fd-shellbar__action fd-shellbar__action--desktop\">\n <ng-content></ng-content>\n</div>\n@if (_addSearchIcon && !showSearch) {\n <fd-shellbar-action glyph=\"search\" [callback]=\"_toggleSearch\"></fd-shellbar-action>\n}\n<ng-content select=\"fd-shellbar-action\"></ng-content>\n@if (userComponent || userItem) {\n @if (!userComponent) {\n <fd-shellbar-user-menu\n placement=\"bottom-end\"\n [user]=\"user\"\n [userMenu]=\"userMenu\"\n (itemClicked)=\"_triggerItems()\"\n ></fd-shellbar-user-menu>\n } @else {\n <ng-content select=\"fd-shellbar-user-menu\"></ng-content>\n }\n}\n@if (productSwitchComponent) {\n <div class=\"fd-shellbar__action\">\n <ng-content select=\"fd-product-switch\"></ng-content>\n </div>\n}\n" }]
|
|
360
401
|
}], propDecorators: { user: [{
|
|
361
402
|
type: Input
|
|
362
403
|
}], userMenu: [{
|
|
@@ -561,7 +602,7 @@ class ShellbarComponent {
|
|
|
561
602
|
.subscribe((state) => {
|
|
562
603
|
if (!state.text) {
|
|
563
604
|
this._showMobileSearch = false;
|
|
564
|
-
this._actions
|
|
605
|
+
this._actions?._setSearchVisibility(false);
|
|
565
606
|
this._cd.detectChanges();
|
|
566
607
|
}
|
|
567
608
|
});
|
|
@@ -617,7 +658,7 @@ class ShellbarComponent {
|
|
|
617
658
|
/** @hidden */
|
|
618
659
|
_closeMobileSearch() {
|
|
619
660
|
this._showMobileSearch = false;
|
|
620
|
-
this._actions
|
|
661
|
+
this._actions?._setSearchVisibility(false);
|
|
621
662
|
this._cd.detectChanges();
|
|
622
663
|
}
|
|
623
664
|
/** @hidden */
|
|
@@ -689,7 +730,7 @@ class ShellbarComponent {
|
|
|
689
730
|
if (this._searchPortalOutlet?.hasAttached()) {
|
|
690
731
|
return;
|
|
691
732
|
}
|
|
692
|
-
this._actions
|
|
733
|
+
this._actions?._detachSearch();
|
|
693
734
|
this._searchPortalOutlet?.attach(this._searchPortal);
|
|
694
735
|
if (shouldFocus) {
|
|
695
736
|
this._searchComponent?.focus();
|
|
@@ -698,11 +739,11 @@ class ShellbarComponent {
|
|
|
698
739
|
/** @hidden */
|
|
699
740
|
_detachSearch() {
|
|
700
741
|
if (!this._searchPortalOutlet?.hasAttached()) {
|
|
701
|
-
this._actions
|
|
742
|
+
this._actions?._attachSearch(this._searchPortal, this._searchComponent, this._currentSize);
|
|
702
743
|
return;
|
|
703
744
|
}
|
|
704
745
|
this._searchPortalOutlet.detach();
|
|
705
|
-
this._actions
|
|
746
|
+
this._actions?._attachSearch(this._searchPortal, this._searchComponent, this._currentSize);
|
|
706
747
|
}
|
|
707
748
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.0", ngImport: i0, type: ShellbarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
708
749
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.0", type: ShellbarComponent, isStandalone: true, selector: "fd-shellbar", inputs: { size: "size", breakpoints: "breakpoints", sideNav: "sideNav", groupFlex: "groupFlex" }, providers: [
|
|
@@ -820,5 +861,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.0", ngImpor
|
|
|
820
861
|
* Generated bundle index. Do not edit.
|
|
821
862
|
*/
|
|
822
863
|
|
|
823
|
-
export { FD_SHELLBAR_ACTION_COMPONENT, FD_SHELLBAR_COMPONENT, FD_SHELLBAR_SEARCH_COMPONENT, FD_SHELLBAR_SEARCH_CONFIG, ProductMenuComponent, ShellbarActionComponent, ShellbarActionsComponent, ShellbarActionsMobileComponent, ShellbarComponent, ShellbarLogoComponent, ShellbarModule, ShellbarSidenavDirective, ShellbarSubtitleComponent, ShellbarTitleComponent, ShellbarUserMenuComponent };
|
|
864
|
+
export { FD_SHELLBAR_ACTION_COMPONENT, FD_SHELLBAR_COMPONENT, FD_SHELLBAR_SEARCH_COMPONENT, FD_SHELLBAR_SEARCH_CONFIG, ProductMenuComponent, ShellbarActionComponent, ShellbarActionsComponent, ShellbarActionsMobileComponent, ShellbarComponent, ShellbarLogoComponent, ShellbarModule, ShellbarSidenavDirective, ShellbarSubtitleComponent, ShellbarTitleComponent, ShellbarUserMenuButtonDirective, ShellbarUserMenuComponent };
|
|
824
865
|
//# sourceMappingURL=fundamental-ngx-core-shellbar.mjs.map
|