@ni/nimble-angular 15.1.0 → 16.0.0
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/directives/menu-button/nimble-menu-button.directive.d.ts +4 -5
- package/esm2020/directives/menu-button/nimble-menu-button.directive.mjs +3 -14
- package/fesm2015/ni-nimble-angular.mjs +2 -13
- package/fesm2015/ni-nimble-angular.mjs.map +1 -1
- package/fesm2020/ni-nimble-angular.mjs +2 -13
- package/fesm2020/ni-nimble-angular.mjs.map +1 -1
- package/package.json +2 -2
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ElementRef,
|
|
1
|
+
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
2
|
import type { MenuButton } from '@ni/nimble-components/dist/esm/menu-button';
|
|
3
|
-
import type { ButtonAppearance } from '@ni/nimble-components/dist/esm/menu-button/types';
|
|
3
|
+
import type { ButtonAppearance, MenuButtonToggleEventDetail } from '@ni/nimble-components/dist/esm/menu-button/types';
|
|
4
4
|
import { BooleanValueOrAttribute } from '../utilities/template-value-helpers';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export type { MenuButton };
|
|
7
|
+
export type { MenuButtonToggleEventDetail };
|
|
7
8
|
/**
|
|
8
9
|
* Directive to provide Angular integration for the menu button.
|
|
9
10
|
*/
|
|
@@ -18,9 +19,7 @@ export declare class NimbleMenuButtonDirective {
|
|
|
18
19
|
set contentHidden(value: BooleanValueOrAttribute);
|
|
19
20
|
get open(): boolean;
|
|
20
21
|
set open(value: BooleanValueOrAttribute);
|
|
21
|
-
openChange: EventEmitter<boolean>;
|
|
22
22
|
constructor(renderer: Renderer2, elementRef: ElementRef<MenuButton>);
|
|
23
|
-
onOpenChange($event: Event): void;
|
|
24
23
|
static ɵfac: i0.ɵɵFactoryDeclaration<NimbleMenuButtonDirective, never>;
|
|
25
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleMenuButtonDirective, "nimble-menu-button", never, { "appearance": "appearance"; "disabled": "disabled"; "contentHidden": "content-hidden"; "open": "open"; }, {
|
|
24
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<NimbleMenuButtonDirective, "nimble-menu-button", never, { "appearance": "appearance"; "disabled": "disabled"; "contentHidden": "content-hidden"; "open": "open"; }, {}, never, never, false>;
|
|
26
25
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Directive,
|
|
1
|
+
import { Directive, Input } from '@angular/core';
|
|
2
2
|
import { toBooleanProperty } from '../utilities/template-value-helpers';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
/**
|
|
@@ -8,7 +8,6 @@ export class NimbleMenuButtonDirective {
|
|
|
8
8
|
constructor(renderer, elementRef) {
|
|
9
9
|
this.renderer = renderer;
|
|
10
10
|
this.elementRef = elementRef;
|
|
11
|
-
this.openChange = new EventEmitter();
|
|
12
11
|
}
|
|
13
12
|
get appearance() {
|
|
14
13
|
return this.elementRef.nativeElement.appearance;
|
|
@@ -36,14 +35,9 @@ export class NimbleMenuButtonDirective {
|
|
|
36
35
|
set open(value) {
|
|
37
36
|
this.renderer.setProperty(this.elementRef.nativeElement, 'open', toBooleanProperty(value));
|
|
38
37
|
}
|
|
39
|
-
onOpenChange($event) {
|
|
40
|
-
if ($event.target === this.elementRef.nativeElement) {
|
|
41
|
-
this.openChange.emit(this.open);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
38
|
}
|
|
45
39
|
NimbleMenuButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NimbleMenuButtonDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
46
|
-
NimbleMenuButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: NimbleMenuButtonDirective, selector: "nimble-menu-button", inputs: { appearance: "appearance", disabled: "disabled", contentHidden: ["content-hidden", "contentHidden"], open: "open" },
|
|
40
|
+
NimbleMenuButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: NimbleMenuButtonDirective, selector: "nimble-menu-button", inputs: { appearance: "appearance", disabled: "disabled", contentHidden: ["content-hidden", "contentHidden"], open: "open" }, ngImport: i0 });
|
|
47
41
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NimbleMenuButtonDirective, decorators: [{
|
|
48
42
|
type: Directive,
|
|
49
43
|
args: [{
|
|
@@ -58,10 +52,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
|
|
|
58
52
|
args: ['content-hidden']
|
|
59
53
|
}], open: [{
|
|
60
54
|
type: Input
|
|
61
|
-
}], openChange: [{
|
|
62
|
-
type: Output
|
|
63
|
-
}], onOpenChange: [{
|
|
64
|
-
type: HostListener,
|
|
65
|
-
args: ['open-change', ['$event']]
|
|
66
55
|
}] } });
|
|
67
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
56
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibmltYmxlLW1lbnUtYnV0dG9uLmRpcmVjdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL25pL25pbWJsZS1hbmd1bGFyL3NyYy9kaXJlY3RpdmVzL21lbnUtYnV0dG9uL25pbWJsZS1tZW51LWJ1dHRvbi5kaXJlY3RpdmUudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBYyxLQUFLLEVBQWEsTUFBTSxlQUFlLENBQUM7QUFHeEUsT0FBTyxFQUEyQixpQkFBaUIsRUFBRSxNQUFNLHFDQUFxQyxDQUFDOztBQUtqRzs7R0FFRztBQUlILE1BQU0sT0FBTyx5Q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yMiwgcHJpdmF0ZSByZWFkb25seSBlbGVtZW50UmVmOiBFbGVtZW50UmVmPE1lbnVCdXR0b24+KSB7fVxufVxuIl19
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { Directive, Input, NgModule, forwardRef, HostListener, Inject, Optional, Host, EventEmitter, Output
|
|
2
|
+
import { Directive, Input, NgModule, forwardRef, HostListener, Inject, Optional, Host, Injectable, EventEmitter, Output } from '@angular/core';
|
|
3
3
|
import { RouterLinkWithHref } from '@angular/router';
|
|
4
4
|
export { AnchorAppearance } from '@ni/nimble-components/dist/esm/anchor/types';
|
|
5
5
|
import { CommonModule } from '@angular/common';
|
|
@@ -6060,7 +6060,6 @@ class NimbleMenuButtonDirective {
|
|
|
6060
6060
|
constructor(renderer, elementRef) {
|
|
6061
6061
|
this.renderer = renderer;
|
|
6062
6062
|
this.elementRef = elementRef;
|
|
6063
|
-
this.openChange = new EventEmitter();
|
|
6064
6063
|
}
|
|
6065
6064
|
get appearance() {
|
|
6066
6065
|
return this.elementRef.nativeElement.appearance;
|
|
@@ -6088,14 +6087,9 @@ class NimbleMenuButtonDirective {
|
|
|
6088
6087
|
set open(value) {
|
|
6089
6088
|
this.renderer.setProperty(this.elementRef.nativeElement, 'open', toBooleanProperty(value));
|
|
6090
6089
|
}
|
|
6091
|
-
onOpenChange($event) {
|
|
6092
|
-
if ($event.target === this.elementRef.nativeElement) {
|
|
6093
|
-
this.openChange.emit(this.open);
|
|
6094
|
-
}
|
|
6095
|
-
}
|
|
6096
6090
|
}
|
|
6097
6091
|
NimbleMenuButtonDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NimbleMenuButtonDirective, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
6098
|
-
NimbleMenuButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: NimbleMenuButtonDirective, selector: "nimble-menu-button", inputs: { appearance: "appearance", disabled: "disabled", contentHidden: ["content-hidden", "contentHidden"], open: "open" },
|
|
6092
|
+
NimbleMenuButtonDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.10", type: NimbleMenuButtonDirective, selector: "nimble-menu-button", inputs: { appearance: "appearance", disabled: "disabled", contentHidden: ["content-hidden", "contentHidden"], open: "open" }, ngImport: i0 });
|
|
6099
6093
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImport: i0, type: NimbleMenuButtonDirective, decorators: [{
|
|
6100
6094
|
type: Directive,
|
|
6101
6095
|
args: [{
|
|
@@ -6110,11 +6104,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.10", ngImpo
|
|
|
6110
6104
|
args: ['content-hidden']
|
|
6111
6105
|
}], open: [{
|
|
6112
6106
|
type: Input
|
|
6113
|
-
}], openChange: [{
|
|
6114
|
-
type: Output
|
|
6115
|
-
}], onOpenChange: [{
|
|
6116
|
-
type: HostListener,
|
|
6117
|
-
args: ['open-change', ['$event']]
|
|
6118
6107
|
}] } });
|
|
6119
6108
|
|
|
6120
6109
|
class NimbleMenuButtonModule {
|